summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-06-11 13:18:56 -0700
committerBenjamin Peterson <benjamin@python.org>2016-06-11 13:18:56 -0700
commit5a991226e84e935f2a50deec664eaf3860893354 (patch)
treee674175fd5bc642be83ceb674d57e303b26f4326
parent9997d0207649b71b5862d3c036c1f7dcacf4f7b1 (diff)
parent1ccde8e1ad13ea6943f6ef5ea4329c9827ba493e (diff)
downloadcpython-5a991226e84e935f2a50deec664eaf3860893354.tar.gz
merge 3.4
-rw-r--r--.bzrignore2
-rw-r--r--.gitignore50
-rw-r--r--.hgignore30
-rw-r--r--.hgtouch4
-rw-r--r--Doc/Makefile14
-rw-r--r--Doc/README.txt2
-rw-r--r--Doc/bugs.rst13
-rw-r--r--Doc/c-api/arg.rst7
-rw-r--r--Doc/c-api/buffer.rst15
-rw-r--r--Doc/c-api/code.rst6
-rw-r--r--Doc/c-api/codec.rst5
-rw-r--r--Doc/c-api/concrete.rst1
-rw-r--r--Doc/c-api/coro.rst34
-rw-r--r--Doc/c-api/exceptions.rst377
-rw-r--r--Doc/c-api/function.rst7
-rw-r--r--Doc/c-api/gcsupport.rst7
-rw-r--r--Doc/c-api/gen.rst20
-rw-r--r--Doc/c-api/import.rst15
-rw-r--r--Doc/c-api/init.rst19
-rw-r--r--Doc/c-api/mapping.rst14
-rw-r--r--Doc/c-api/memory.rst152
-rw-r--r--Doc/c-api/memoryview.rst2
-rw-r--r--Doc/c-api/method.rst2
-rw-r--r--Doc/c-api/module.rst350
-rw-r--r--Doc/c-api/number.rst17
-rw-r--r--Doc/c-api/object.rst27
-rw-r--r--Doc/c-api/sequence.rst6
-rw-r--r--Doc/c-api/set.rst6
-rw-r--r--Doc/c-api/stable.rst2
-rw-r--r--Doc/c-api/sys.rst54
-rw-r--r--Doc/c-api/typeobj.rst93
-rw-r--r--Doc/c-api/unicode.rst58
-rw-r--r--Doc/c-api/veryhigh.rst8
-rw-r--r--Doc/conf.py10
-rw-r--r--Doc/data/refcounts.dat11
-rw-r--r--Doc/distributing/index.rst18
-rw-r--r--Doc/distutils/apiref.rst59
-rw-r--r--Doc/distutils/builtdist.rst47
-rw-r--r--Doc/distutils/configfile.rst2
-rw-r--r--Doc/distutils/index.rst6
-rw-r--r--Doc/distutils/introduction.rst6
-rw-r--r--Doc/distutils/sourcedist.rst8
-rw-r--r--Doc/extending/building.rst74
-rw-r--r--Doc/extending/embedding.rst20
-rw-r--r--Doc/extending/extending.rst21
-rw-r--r--Doc/extending/index.rst2
-rw-r--r--Doc/extending/newtypes.rst2
-rw-r--r--Doc/faq/design.rst22
-rw-r--r--Doc/faq/extending.rst20
-rw-r--r--Doc/faq/general.rst21
-rw-r--r--Doc/faq/gui.rst18
-rw-r--r--Doc/faq/library.rst19
-rw-r--r--Doc/faq/programming.rst118
-rw-r--r--Doc/faq/windows.rst2
-rw-r--r--Doc/glossary.rst139
-rw-r--r--Doc/howto/argparse.rst2
-rw-r--r--Doc/howto/clinic.rst87
-rw-r--r--Doc/howto/cporting.rst2
-rw-r--r--Doc/howto/curses.rst2
-rw-r--r--Doc/howto/descriptor.rst64
-rw-r--r--Doc/howto/functional.rst36
-rw-r--r--Doc/howto/index.rst1
-rw-r--r--Doc/howto/logging-cookbook.rst234
-rw-r--r--Doc/howto/logging.rst6
-rw-r--r--Doc/howto/pyporting.rst71
-rw-r--r--Doc/howto/regex.rst23
-rw-r--r--Doc/howto/sorting.rst12
-rw-r--r--Doc/howto/unicode.rst27
-rw-r--r--Doc/howto/urllib2.rst22
-rw-r--r--Doc/howto/webservers.rst731
-rw-r--r--Doc/includes/noddy.c2
-rw-r--r--Doc/includes/run-func.c2
-rw-r--r--Doc/includes/typestruct.h3
-rw-r--r--Doc/install/index.rst19
-rw-r--r--Doc/installing/index.rst24
-rw-r--r--Doc/library/2to3.rst14
-rw-r--r--Doc/library/__future__.rst3
-rw-r--r--Doc/library/__main__.rst2
-rw-r--r--Doc/library/_thread.rst3
-rw-r--r--Doc/library/abc.rst1
-rw-r--r--Doc/library/aifc.rst3
-rw-r--r--Doc/library/argparse.rst116
-rw-r--r--Doc/library/array.rst7
-rw-r--r--Doc/library/asynchat.rst37
-rw-r--r--Doc/library/asyncio-dev.rst16
-rw-r--r--Doc/library/asyncio-eventloop.rst96
-rw-r--r--Doc/library/asyncio-eventloops.rst12
-rw-r--r--Doc/library/asyncio-protocol.rst10
-rw-r--r--Doc/library/asyncio-queue.rst11
-rw-r--r--Doc/library/asyncio-stream.rst40
-rw-r--r--Doc/library/asyncio-subprocess.rst4
-rw-r--r--Doc/library/asyncio-sync.rst8
-rw-r--r--Doc/library/asyncio-task.rst118
-rw-r--r--Doc/library/asyncio.rst8
-rw-r--r--Doc/library/asyncore.rst5
-rw-r--r--Doc/library/atexit.rst2
-rw-r--r--Doc/library/audioop.rst5
-rw-r--r--Doc/library/base64.rst146
-rw-r--r--Doc/library/binascii.rst32
-rw-r--r--Doc/library/binhex.rst3
-rw-r--r--Doc/library/bisect.rst2
-rw-r--r--Doc/library/builtins.rst1
-rw-r--r--Doc/library/bz2.rst44
-rw-r--r--Doc/library/calendar.rst1
-rw-r--r--Doc/library/cgi.rst10
-rw-r--r--Doc/library/cgitb.rst4
-rw-r--r--Doc/library/chunk.rst4
-rw-r--r--Doc/library/cmath.rst33
-rw-r--r--Doc/library/cmd.rst1
-rw-r--r--Doc/library/code.rst7
-rw-r--r--Doc/library/codecs.rst64
-rw-r--r--Doc/library/codeop.rst5
-rw-r--r--Doc/library/collections.abc.rst120
-rw-r--r--Doc/library/collections.rst102
-rw-r--r--Doc/library/colorsys.rst3
-rw-r--r--Doc/library/compileall.rst66
-rw-r--r--Doc/library/concurrent.futures.rst74
-rw-r--r--Doc/library/configparser.rst132
-rw-r--r--Doc/library/constants.rst1
-rw-r--r--Doc/library/contextlib.rst14
-rw-r--r--Doc/library/copy.rst4
-rw-r--r--Doc/library/copyreg.rst3
-rw-r--r--Doc/library/crypt.rst6
-rw-r--r--Doc/library/csv.rst8
-rw-r--r--Doc/library/ctypes.rst186
-rw-r--r--Doc/library/curses.ascii.rst2
-rw-r--r--Doc/library/curses.panel.rst2
-rw-r--r--Doc/library/curses.rst14
-rw-r--r--Doc/library/datetime.rst164
-rw-r--r--Doc/library/dbm.rst15
-rw-r--r--Doc/library/decimal.rst20
-rw-r--r--Doc/library/development.rst1
-rw-r--r--Doc/library/difflib.rst114
-rw-r--r--Doc/library/dis.rst93
-rw-r--r--Doc/library/distribution.rst1
-rw-r--r--Doc/library/distutils.rst4
-rw-r--r--Doc/library/doctest.rst16
-rw-r--r--Doc/library/email.charset.rst8
-rw-r--r--Doc/library/email.contentmanager.rst7
-rw-r--r--Doc/library/email.encoders.rst3
-rw-r--r--Doc/library/email.errors.rst3
-rw-r--r--Doc/library/email.generator.rst7
-rw-r--r--Doc/library/email.header.rst3
-rw-r--r--Doc/library/email.headerregistry.rst9
-rw-r--r--Doc/library/email.iterators.rst3
-rw-r--r--Doc/library/email.message.rst12
-rw-r--r--Doc/library/email.mime.rst9
-rw-r--r--Doc/library/email.parser.rst3
-rw-r--r--Doc/library/email.policy.rst46
-rw-r--r--Doc/library/email.rst4
-rw-r--r--Doc/library/email.util.rst3
-rw-r--r--Doc/library/ensurepip.rst2
-rw-r--r--Doc/library/enum.rst58
-rw-r--r--Doc/library/errno.rst6
-rw-r--r--Doc/library/exceptions.rst40
-rw-r--r--Doc/library/faulthandler.rst26
-rw-r--r--Doc/library/fcntl.rst76
-rw-r--r--Doc/library/filecmp.rst1
-rw-r--r--Doc/library/fileinput.rst11
-rw-r--r--Doc/library/fnmatch.rst3
-rw-r--r--Doc/library/formatter.rst4
-rw-r--r--Doc/library/fpectl.rst4
-rw-r--r--Doc/library/fractions.rst4
-rw-r--r--Doc/library/ftplib.rst17
-rw-r--r--Doc/library/functions.rst61
-rw-r--r--Doc/library/functools.rst15
-rw-r--r--Doc/library/gc.rst8
-rw-r--r--Doc/library/getopt.rst6
-rw-r--r--Doc/library/getpass.rst9
-rw-r--r--Doc/library/gettext.rst7
-rw-r--r--Doc/library/glob.rst27
-rw-r--r--Doc/library/grp.rst1
-rw-r--r--Doc/library/gzip.rst37
-rw-r--r--Doc/library/hashlib.rst21
-rw-r--r--Doc/library/heapq.rst21
-rw-r--r--Doc/library/hmac.rst1
-rw-r--r--Doc/library/html.entities.rst3
-rw-r--r--Doc/library/html.parser.rst64
-rw-r--r--Doc/library/http.client.rst245
-rw-r--r--Doc/library/http.cookiejar.rst3
-rw-r--r--Doc/library/http.cookies.rst44
-rw-r--r--Doc/library/http.rst115
-rw-r--r--Doc/library/http.server.rst36
-rw-r--r--Doc/library/idle.rst26
-rw-r--r--Doc/library/imaplib.rst49
-rw-r--r--Doc/library/imghdr.rst8
-rw-r--r--Doc/library/imp.rst15
-rw-r--r--Doc/library/importlib.rst191
-rw-r--r--Doc/library/inspect.rst254
-rw-r--r--Doc/library/io.rst105
-rw-r--r--Doc/library/ipaddress.rst41
-rw-r--r--Doc/library/itertools.rst92
-rw-r--r--Doc/library/json.rst112
-rw-r--r--Doc/library/linecache.rst9
-rw-r--r--Doc/library/locale.rst22
-rw-r--r--Doc/library/logging.config.rst5
-rw-r--r--Doc/library/logging.handlers.rst22
-rw-r--r--Doc/library/logging.rst20
-rw-r--r--Doc/library/lzma.rst45
-rw-r--r--Doc/library/macpath.rst3
-rw-r--r--Doc/library/mailbox.rst14
-rw-r--r--Doc/library/mailcap.rst2
-rw-r--r--Doc/library/marshal.rst6
-rw-r--r--Doc/library/math.rst76
-rw-r--r--Doc/library/mimetypes.rst6
-rw-r--r--Doc/library/mmap.rst14
-rw-r--r--Doc/library/modulefinder.rst5
-rw-r--r--Doc/library/msilib.rst68
-rw-r--r--Doc/library/msvcrt.rst2
-rw-r--r--Doc/library/multiprocessing.rst97
-rw-r--r--Doc/library/netrc.rst1
-rw-r--r--Doc/library/nis.rst8
-rw-r--r--Doc/library/nntplib.rst3
-rw-r--r--Doc/library/numbers.rst5
-rw-r--r--Doc/library/operator.rst22
-rw-r--r--Doc/library/optparse.rst37
-rw-r--r--Doc/library/os.path.rst40
-rw-r--r--Doc/library/os.rst374
-rw-r--r--Doc/library/ossaudiodev.rst30
-rw-r--r--Doc/library/othergui.rst18
-rw-r--r--Doc/library/parser.rst4
-rw-r--r--Doc/library/pathlib.rst118
-rw-r--r--Doc/library/pdb.rst4
-rw-r--r--Doc/library/pickle.rst18
-rw-r--r--Doc/library/pipes.rst1
-rw-r--r--Doc/library/pkgutil.rst8
-rw-r--r--Doc/library/platform.rst5
-rw-r--r--Doc/library/plistlib.rst5
-rw-r--r--Doc/library/poplib.rst14
-rw-r--r--Doc/library/posix.rst1
-rw-r--r--Doc/library/pprint.rst38
-rw-r--r--Doc/library/profile.rst2
-rw-r--r--Doc/library/pty.rst4
-rw-r--r--Doc/library/pwd.rst1
-rw-r--r--Doc/library/py_compile.rst14
-rw-r--r--Doc/library/pyclbr.rst1
-rw-r--r--Doc/library/pydoc.rst4
-rw-r--r--Doc/library/pyexpat.rst10
-rw-r--r--Doc/library/queue.rst36
-rw-r--r--Doc/library/quopri.rst3
-rw-r--r--Doc/library/random.rst17
-rw-r--r--Doc/library/re.rst143
-rw-r--r--Doc/library/readline.rst211
-rw-r--r--Doc/library/reprlib.rst1
-rw-r--r--Doc/library/resource.rst2
-rw-r--r--Doc/library/rlcompleter.rst1
-rw-r--r--Doc/library/runpy.rst4
-rw-r--r--Doc/library/sched.rst5
-rw-r--r--Doc/library/select.rst34
-rw-r--r--Doc/library/selectors.rst32
-rw-r--r--Doc/library/shelve.rst40
-rw-r--r--Doc/library/shlex.rst4
-rw-r--r--Doc/library/shutil.rst57
-rw-r--r--Doc/library/signal.rst44
-rw-r--r--Doc/library/site.rst21
-rw-r--r--Doc/library/smtpd.rst88
-rw-r--r--Doc/library/smtplib.rst121
-rw-r--r--Doc/library/sndhdr.rst20
-rw-r--r--Doc/library/socket.rst211
-rw-r--r--Doc/library/socketserver.rst371
-rw-r--r--Doc/library/spwd.rst1
-rw-r--r--Doc/library/sqlite3.rst48
-rw-r--r--Doc/library/ssl.rst335
-rw-r--r--Doc/library/stat.rst32
-rw-r--r--Doc/library/statistics.rst7
-rw-r--r--Doc/library/stdtypes.rst344
-rw-r--r--Doc/library/string.rst49
-rw-r--r--Doc/library/stringprep.rst4
-rw-r--r--Doc/library/struct.rst25
-rw-r--r--Doc/library/subprocess.rst323
-rw-r--r--Doc/library/sunau.rst1
-rw-r--r--Doc/library/symbol.rst1
-rw-r--r--Doc/library/symtable.rst4
-rw-r--r--Doc/library/sys.rst112
-rw-r--r--Doc/library/sysconfig.rst7
-rw-r--r--Doc/library/syslog.rst1
-rw-r--r--Doc/library/tabnanny.rst1
-rw-r--r--Doc/library/tarfile.rst98
-rw-r--r--Doc/library/telnetlib.rst4
-rw-r--r--Doc/library/tempfile.rst216
-rw-r--r--Doc/library/termios.rst11
-rw-r--r--Doc/library/test.rst17
-rw-r--r--Doc/library/textwrap.rst1
-rw-r--r--Doc/library/threading.rst2
-rw-r--r--Doc/library/time.rst10
-rw-r--r--Doc/library/timeit.rst53
-rw-r--r--Doc/library/tkinter.rst16
-rw-r--r--Doc/library/tkinter.scrolledtext.rst4
-rw-r--r--Doc/library/tkinter.tix.rst8
-rw-r--r--Doc/library/tkinter.ttk.rst10
-rw-r--r--Doc/library/token.rst8
-rw-r--r--Doc/library/tokenize.rst21
-rw-r--r--Doc/library/traceback.rst264
-rw-r--r--Doc/library/tracemalloc.rst13
-rw-r--r--Doc/library/tty.rst4
-rw-r--r--Doc/library/tulip_coro.diabin4461 -> 4459 bytes
-rw-r--r--Doc/library/tulip_coro.pngbin45565 -> 45021 bytes
-rw-r--r--Doc/library/turtle.rst10
-rw-r--r--Doc/library/types.rst40
-rw-r--r--Doc/library/typing.rst533
-rw-r--r--Doc/library/unicodedata.rst12
-rw-r--r--Doc/library/unittest.mock-examples.rst14
-rw-r--r--Doc/library/unittest.mock.rst61
-rw-r--r--Doc/library/unittest.rst162
-rw-r--r--Doc/library/urllib.error.rst4
-rw-r--r--Doc/library/urllib.parse.rst30
-rw-r--r--Doc/library/urllib.request.rst107
-rw-r--r--Doc/library/urllib.robotparser.rst4
-rw-r--r--Doc/library/urllib.rst4
-rw-r--r--Doc/library/uu.rst1
-rw-r--r--Doc/library/uuid.rst3
-rw-r--r--Doc/library/venv.rst13
-rw-r--r--Doc/library/warnings.rst6
-rw-r--r--Doc/library/wave.rst1
-rw-r--r--Doc/library/weakref.rst9
-rw-r--r--Doc/library/webbrowser.rst3
-rw-r--r--Doc/library/winreg.rst14
-rw-r--r--Doc/library/winsound.rst2
-rw-r--r--Doc/library/wsgiref.rst26
-rw-r--r--Doc/library/xdrlib.rst3
-rw-r--r--Doc/library/xml.dom.minidom.rst11
-rw-r--r--Doc/library/xml.dom.pulldom.rst5
-rw-r--r--Doc/library/xml.dom.rst16
-rw-r--r--Doc/library/xml.etree.elementtree.rst55
-rw-r--r--Doc/library/xml.rst14
-rw-r--r--Doc/library/xml.sax.handler.rst4
-rw-r--r--Doc/library/xml.sax.reader.rst22
-rw-r--r--Doc/library/xml.sax.rst10
-rw-r--r--Doc/library/xml.sax.utils.rst4
-rw-r--r--Doc/library/xmlrpc.client.rst247
-rw-r--r--Doc/library/xmlrpc.server.rst3
-rw-r--r--Doc/library/zipapp.rst258
-rw-r--r--Doc/library/zipfile.rst53
-rw-r--r--Doc/library/zipimport.rst9
-rw-r--r--Doc/library/zlib.rst108
-rw-r--r--Doc/license.rst374
-rw-r--r--Doc/make.bat32
-rw-r--r--Doc/reference/compound_stmts.rst133
-rw-r--r--Doc/reference/datamodel.rst286
-rw-r--r--Doc/reference/expressions.rst56
-rw-r--r--Doc/reference/import.rst31
-rw-r--r--Doc/reference/introduction.rst2
-rw-r--r--Doc/reference/lexical_analysis.rst13
-rw-r--r--Doc/reference/simple_stmts.rst39
-rw-r--r--Doc/tools/extensions/pyspecific.py16
-rw-r--r--Doc/tools/pydoctheme/static/pydoctheme.css5
-rwxr-xr-xDoc/tools/rstlint.py4
-rw-r--r--Doc/tools/susp-ignored.csv58
-rw-r--r--Doc/tools/templates/indexcontent.html78
-rw-r--r--Doc/tools/templates/indexsidebar.html23
-rw-r--r--Doc/tools/templates/layout.html18
-rw-r--r--Doc/tutorial/appendix.rst6
-rw-r--r--Doc/tutorial/classes.rst14
-rw-r--r--Doc/tutorial/controlflow.rst10
-rw-r--r--Doc/tutorial/datastructures.rst27
-rw-r--r--Doc/tutorial/errors.rst16
-rw-r--r--Doc/tutorial/floatingpoint.rst2
-rw-r--r--Doc/tutorial/inputoutput.rst29
-rw-r--r--Doc/tutorial/interactive.rst4
-rw-r--r--Doc/tutorial/interpreter.rst12
-rw-r--r--Doc/tutorial/introduction.rst13
-rw-r--r--Doc/tutorial/modules.rst16
-rw-r--r--Doc/tutorial/stdlib.rst6
-rw-r--r--Doc/tutorial/stdlib2.rst5
-rw-r--r--Doc/tutorial/whatnow.rst4
-rw-r--r--Doc/using/cmdline.rst11
-rw-r--r--Doc/using/mac.rst14
-rw-r--r--Doc/using/unix.rst16
-rw-r--r--Doc/using/venv-create.inc24
-rw-r--r--Doc/using/win_installer.pngbin0 -> 48994 bytes
-rw-r--r--Doc/using/windows.rst716
-rw-r--r--Doc/whatsnew/2.0.rst6
-rw-r--r--Doc/whatsnew/2.1.rst4
-rw-r--r--Doc/whatsnew/2.2.rst14
-rw-r--r--Doc/whatsnew/2.3.rst20
-rw-r--r--Doc/whatsnew/2.4.rst12
-rw-r--r--Doc/whatsnew/2.5.rst18
-rw-r--r--Doc/whatsnew/2.6.rst18
-rw-r--r--Doc/whatsnew/2.7.rst56
-rw-r--r--Doc/whatsnew/3.0.rst18
-rw-r--r--Doc/whatsnew/3.2.rst202
-rw-r--r--Doc/whatsnew/3.3.rst18
-rw-r--r--Doc/whatsnew/3.4.rst16
-rw-r--r--Doc/whatsnew/3.5.rst2535
-rw-r--r--Doc/whatsnew/index.rst1
-rw-r--r--Grammar/Grammar41
-rw-r--r--Include/Python-ast.h88
-rw-r--r--Include/Python.h2
-rw-r--r--Include/abstract.h52
-rw-r--r--Include/bytes_methods.h4
-rw-r--r--Include/bytesobject.h3
-rw-r--r--Include/ceval.h20
-rw-r--r--Include/code.h24
-rw-r--r--Include/codecs.h9
-rw-r--r--Include/compile.h1
-rw-r--r--Include/complexobject.h22
-rw-r--r--Include/dictobject.h31
-rw-r--r--Include/fileobject.h11
-rw-r--r--Include/fileutils.h81
-rw-r--r--Include/frameobject.h14
-rw-r--r--Include/genobject.h52
-rw-r--r--Include/graminit.h155
-rw-r--r--Include/grammar.h2
-rw-r--r--Include/listobject.h3
-rw-r--r--Include/longobject.h3
-rw-r--r--Include/memoryobject.h4
-rw-r--r--Include/methodobject.h5
-rw-r--r--Include/modsupport.h69
-rw-r--r--Include/moduleobject.h26
-rw-r--r--Include/node.h2
-rw-r--r--Include/object.h64
-rw-r--r--Include/objimpl.h4
-rw-r--r--Include/odictobject.h43
-rw-r--r--Include/opcode.h257
-rw-r--r--Include/osdefs.h5
-rw-r--r--Include/patchlevel.h6
-rw-r--r--Include/pyatomic.h90
-rw-r--r--Include/pydebug.h2
-rw-r--r--Include/pyerrors.h9
-rw-r--r--Include/pylifecycle.h124
-rw-r--r--Include/pymacconfig.h2
-rw-r--r--Include/pymacro.h15
-rw-r--r--Include/pymem.h13
-rw-r--r--Include/pyport.h61
-rw-r--r--Include/pystate.h22
-rw-r--r--Include/pystrhex.h17
-rw-r--r--Include/pythonrun.h115
-rw-r--r--Include/pytime.h188
-rw-r--r--Include/setobject.h96
-rw-r--r--Include/sliceobject.h2
-rw-r--r--Include/symtable.h5
-rw-r--r--Include/token.h15
-rw-r--r--Include/traceback.h4
-rw-r--r--Include/typeslots.h9
-rw-r--r--Include/ucnhash.h2
-rw-r--r--Include/unicodeobject.h38
-rw-r--r--Lib/__future__.py6
-rw-r--r--Lib/_collections_abc.py203
-rw-r--r--Lib/_compat_pickle.py7
-rw-r--r--Lib/_compression.py152
-rw-r--r--Lib/_dummy_thread.py8
-rw-r--r--Lib/_osx_support.py14
-rw-r--r--Lib/_pydecimal.py6380
-rw-r--r--Lib/_pyio.py511
-rw-r--r--Lib/_strptime.py13
-rw-r--r--Lib/abc.py2
-rw-r--r--Lib/argparse.py45
-rw-r--r--Lib/ast.py3
-rw-r--r--Lib/asynchat.py3
-rw-r--r--Lib/asyncio/base_events.py167
-rw-r--r--Lib/asyncio/base_subprocess.py6
-rw-r--r--Lib/asyncio/compat.py1
-rw-r--r--Lib/asyncio/coroutines.py3
-rw-r--r--Lib/asyncio/events.py6
-rw-r--r--Lib/asyncio/futures.py9
-rw-r--r--Lib/asyncio/locks.py18
-rw-r--r--Lib/asyncio/proactor_events.py11
-rw-r--r--Lib/asyncio/queues.py4
-rw-r--r--Lib/asyncio/selector_events.py60
-rw-r--r--Lib/asyncio/sslproto.py4
-rw-r--r--Lib/asyncio/streams.py95
-rw-r--r--Lib/asyncio/subprocess.py2
-rw-r--r--Lib/asyncio/tasks.py67
-rw-r--r--Lib/asyncio/unix_events.py18
-rw-r--r--Lib/asyncio/windows_events.py6
-rw-r--r--Lib/asyncore.py39
-rwxr-xr-xLib/base64.py135
-rw-r--r--Lib/binhex.py28
-rw-r--r--Lib/bz2.py237
-rwxr-xr-xLib/cgi.py8
-rw-r--r--Lib/cgitb.py5
-rw-r--r--Lib/code.py38
-rw-r--r--Lib/codecs.py18
-rw-r--r--Lib/collections/__init__.py104
-rw-r--r--Lib/compileall.py135
-rw-r--r--Lib/concurrent/futures/_base.py21
-rw-r--r--Lib/concurrent/futures/process.py80
-rw-r--r--Lib/concurrent/futures/thread.py10
-rw-r--r--Lib/configparser.py182
-rw-r--r--Lib/contextlib.py51
-rw-r--r--Lib/copy.py13
-rw-r--r--Lib/csv.py14
-rw-r--r--Lib/ctypes/__init__.py20
-rw-r--r--Lib/ctypes/_endian.py2
-rw-r--r--Lib/ctypes/macholib/README.ctypes2
-rw-r--r--Lib/ctypes/test/test_arrays.py12
-rw-r--r--Lib/ctypes/test/test_as_parameter.py2
-rw-r--r--Lib/ctypes/test/test_byteswap.py20
-rw-r--r--Lib/ctypes/test/test_frombuffer.py2
-rw-r--r--Lib/ctypes/test/test_loading.py4
-rw-r--r--Lib/ctypes/test/test_pointers.py14
-rw-r--r--Lib/ctypes/test/test_prototypes.py5
-rw-r--r--Lib/ctypes/test/test_values.py30
-rw-r--r--Lib/ctypes/util.py9
-rw-r--r--Lib/datetime.py361
-rw-r--r--Lib/dbm/__init__.py6
-rw-r--r--Lib/dbm/dumb.py27
-rw-r--r--Lib/decimal.py6418
-rw-r--r--Lib/difflib.py122
-rw-r--r--Lib/dis.py70
-rw-r--r--Lib/distutils/_msvccompiler.py535
-rw-r--r--Lib/distutils/archive_util.py21
-rw-r--r--Lib/distutils/ccompiler.py6
-rw-r--r--Lib/distutils/command/bdist.py3
-rw-r--r--Lib/distutils/command/bdist_dumb.py3
-rw-r--r--Lib/distutils/command/bdist_wininst.py36
-rw-r--r--Lib/distutils/command/build.py9
-rw-r--r--Lib/distutils/command/build_ext.py109
-rw-r--r--Lib/distutils/command/build_py.py4
-rw-r--r--Lib/distutils/command/install.py2
-rw-r--r--Lib/distutils/command/install_lib.py16
-rw-r--r--Lib/distutils/command/register.py6
-rw-r--r--Lib/distutils/command/upload.py54
-rw-r--r--Lib/distutils/command/wininst-14.0-amd64.exebin0 -> 589824 bytes
-rw-r--r--Lib/distutils/command/wininst-14.0.exebin0 -> 460288 bytes
-rw-r--r--Lib/distutils/config.py4
-rw-r--r--Lib/distutils/core.py2
-rw-r--r--Lib/distutils/dist.py69
-rw-r--r--Lib/distutils/extension.py8
-rw-r--r--Lib/distutils/msvc9compiler.py5
-rw-r--r--Lib/distutils/msvccompiler.py3
-rw-r--r--Lib/distutils/spawn.py3
-rw-r--r--Lib/distutils/sysconfig.py27
-rw-r--r--Lib/distutils/tests/test_archive_util.py154
-rw-r--r--Lib/distutils/tests/test_bdist.py2
-rw-r--r--Lib/distutils/tests/test_build_ext.py58
-rw-r--r--Lib/distutils/tests/test_build_py.py4
-rw-r--r--Lib/distutils/tests/test_install.py2
-rw-r--r--Lib/distutils/tests/test_install_lib.py13
-rw-r--r--Lib/distutils/tests/test_msvccompiler.py90
-rw-r--r--Lib/distutils/tests/test_register.py14
-rw-r--r--Lib/distutils/tests/test_unixccompiler.py2
-rw-r--r--Lib/distutils/tests/test_upload.py33
-rw-r--r--Lib/distutils/unixccompiler.py22
-rw-r--r--Lib/distutils/util.py9
-rw-r--r--Lib/distutils/version.py6
-rw-r--r--Lib/doctest.py26
-rw-r--r--Lib/email/__init__.py2
-rw-r--r--Lib/email/_header_value_parser.py19
-rw-r--r--Lib/email/_policybase.py8
-rw-r--r--Lib/email/charset.py3
-rw-r--r--Lib/email/feedparser.py16
-rw-r--r--Lib/email/generator.py13
-rw-r--r--Lib/email/header.py3
-rw-r--r--Lib/email/headerregistry.py10
-rw-r--r--Lib/email/message.py30
-rw-r--r--Lib/email/mime/text.py3
-rw-r--r--Lib/email/parser.py4
-rw-r--r--Lib/email/policy.py15
-rw-r--r--Lib/email/utils.py2
-rw-r--r--Lib/encodings/aliases.py5
-rw-r--r--Lib/encodings/cp65001.py9
-rw-r--r--Lib/encodings/hp_roman8.py2
-rw-r--r--Lib/encodings/koi8_t.py308
-rw-r--r--Lib/encodings/kz1048.py307
-rw-r--r--Lib/encodings/utf_16.py2
-rw-r--r--Lib/encodings/utf_32.py2
-rw-r--r--Lib/enum.py34
-rw-r--r--Lib/fileinput.py177
-rw-r--r--Lib/formatter.py4
-rw-r--r--Lib/fractions.py67
-rw-r--r--Lib/ftplib.py117
-rw-r--r--Lib/functools.py300
-rw-r--r--Lib/genericpath.py13
-rw-r--r--Lib/getpass.py2
-rw-r--r--Lib/gettext.py13
-rw-r--r--Lib/glob.py63
-rw-r--r--Lib/gzip.py506
-rw-r--r--Lib/heapq.py351
-rw-r--r--Lib/html/entities.py3
-rw-r--r--Lib/html/parser.py116
-rw-r--r--Lib/http/__init__.py135
-rw-r--r--Lib/http/client.py385
-rw-r--r--Lib/http/cookiejar.py10
-rw-r--r--Lib/http/cookies.py255
-rw-r--r--Lib/http/server.py191
-rw-r--r--Lib/idlelib/AutoComplete.py4
-rw-r--r--Lib/idlelib/CREDITS.txt2
-rw-r--r--Lib/idlelib/ChangeLog12
-rw-r--r--Lib/idlelib/CodeContext.py8
-rw-r--r--Lib/idlelib/ColorDelegator.py25
-rw-r--r--Lib/idlelib/Debugger.py2
-rw-r--r--Lib/idlelib/Delegator.py12
-rw-r--r--Lib/idlelib/EditorWindow.py17
-rw-r--r--Lib/idlelib/HISTORY.txt8
-rw-r--r--Lib/idlelib/IOBinding.py13
-rw-r--r--Lib/idlelib/MultiCall.py2
-rw-r--r--Lib/idlelib/NEWS.txt111
-rw-r--r--Lib/idlelib/Percolator.py49
-rwxr-xr-xLib/idlelib/PyShell.py15
-rw-r--r--Lib/idlelib/ReplaceDialog.py38
-rw-r--r--Lib/idlelib/SearchDialog.py28
-rw-r--r--Lib/idlelib/UndoDelegator.py25
-rw-r--r--Lib/idlelib/WidgetRedirector.py10
-rw-r--r--Lib/idlelib/aboutDialog.py9
-rw-r--r--Lib/idlelib/configDialog.py13
-rw-r--r--Lib/idlelib/configHandler.py2
-rw-r--r--Lib/idlelib/configHelpSourceEdit.py48
-rw-r--r--Lib/idlelib/help.html168
-rw-r--r--Lib/idlelib/help.py27
-rw-r--r--Lib/idlelib/idle_test/README.txt138
-rw-r--r--Lib/idlelib/idle_test/__init__.py6
-rw-r--r--Lib/idlelib/idle_test/htest.py3
-rw-r--r--Lib/idlelib/idle_test/mock_tk.py5
-rw-r--r--Lib/idlelib/idle_test/test_autocomplete.py3
-rw-r--r--Lib/idlelib/idle_test/test_autoexpand.py2
-rw-r--r--Lib/idlelib/idle_test/test_config_help.py106
-rw-r--r--Lib/idlelib/idle_test/test_configdialog.py22
-rw-r--r--Lib/idlelib/idle_test/test_delegator.py23
-rw-r--r--Lib/idlelib/idle_test/test_editmenu.py71
-rw-r--r--Lib/idlelib/idle_test/test_formatparagraph.py3
-rw-r--r--Lib/idlelib/idle_test/test_parenmatch.py13
-rw-r--r--Lib/idlelib/idle_test/test_percolator.py118
-rw-r--r--Lib/idlelib/idle_test/test_replacedialog.py293
-rw-r--r--Lib/idlelib/idle_test/test_searchdialog.py80
-rw-r--r--Lib/idlelib/idle_test/test_searchengine.py2
-rw-r--r--Lib/idlelib/idle_test/test_textview.py6
-rw-r--r--Lib/idlelib/idle_test/test_undodelegator.py135
-rw-r--r--Lib/idlelib/idle_test/test_warning.py9
-rw-r--r--Lib/idlelib/idle_test/test_widgetredir.py29
-rw-r--r--Lib/idlelib/rpc.py2
-rw-r--r--Lib/imaplib.py85
-rw-r--r--Lib/imghdr.py12
-rw-r--r--Lib/imp.py76
-rw-r--r--Lib/importlib/__init__.py29
-rw-r--r--Lib/importlib/_bootstrap.py1729
-rw-r--r--Lib/importlib/_bootstrap_external.py1429
-rw-r--r--Lib/importlib/abc.py28
-rw-r--r--Lib/importlib/machinery.py18
-rw-r--r--Lib/importlib/util.py106
-rw-r--r--Lib/inspect.py738
-rw-r--r--Lib/ipaddress.py589
-rw-r--r--Lib/json/__init__.py7
-rw-r--r--Lib/json/decoder.py86
-rw-r--r--Lib/json/encoder.py29
-rw-r--r--Lib/json/tool.py39
-rw-r--r--Lib/lib2to3/Grammar.txt10
-rw-r--r--Lib/lib2to3/btm_utils.py2
-rw-r--r--Lib/lib2to3/fixer_base.py2
-rw-r--r--Lib/lib2to3/fixes/fix_metaclass.py2
-rw-r--r--Lib/lib2to3/patcomp.py2
-rwxr-xr-xLib/lib2to3/pgen2/token.py6
-rw-r--r--Lib/lib2to3/pgen2/tokenize.py80
-rw-r--r--Lib/lib2to3/refactor.py2
-rwxr-xr-xLib/lib2to3/tests/pytree_idempotency.py4
-rw-r--r--Lib/lib2to3/tests/test_parser.py54
-rw-r--r--Lib/linecache.py89
-rw-r--r--Lib/locale.py36
-rw-r--r--Lib/logging/__init__.py31
-rw-r--r--Lib/logging/config.py10
-rw-r--r--Lib/logging/handlers.py16
-rw-r--r--Lib/lzma.py226
-rw-r--r--Lib/macpath.py34
-rw-r--r--Lib/mailbox.py16
-rw-r--r--Lib/mimetypes.py2
-rw-r--r--Lib/modulefinder.py46
-rw-r--r--Lib/msilib/__init__.py13
-rw-r--r--Lib/msilib/schema.py2
-rw-r--r--Lib/multiprocessing/connection.py35
-rw-r--r--Lib/multiprocessing/dummy/__init__.py2
-rw-r--r--Lib/multiprocessing/dummy/connection.py5
-rw-r--r--Lib/multiprocessing/forkserver.py28
-rw-r--r--Lib/multiprocessing/heap.py20
-rw-r--r--Lib/multiprocessing/managers.py37
-rw-r--r--Lib/multiprocessing/pool.py27
-rw-r--r--Lib/multiprocessing/popen_fork.py3
-rw-r--r--Lib/multiprocessing/process.py7
-rw-r--r--Lib/multiprocessing/queues.py27
-rw-r--r--Lib/multiprocessing/sharedctypes.py26
-rw-r--r--Lib/multiprocessing/spawn.py2
-rw-r--r--Lib/multiprocessing/synchronize.py32
-rw-r--r--Lib/multiprocessing/util.py37
-rw-r--r--Lib/nntplib.py8
-rw-r--r--Lib/ntpath.py325
-rw-r--r--Lib/opcode.py21
-rw-r--r--Lib/operator.py69
-rw-r--r--Lib/optparse.py4
-rw-r--r--Lib/os.py126
-rw-r--r--Lib/pathlib.py128
-rwxr-xr-xLib/pdb.py6
-rw-r--r--Lib/pickle.py35
-rw-r--r--Lib/pickletools.py10
-rw-r--r--Lib/pkgutil.py2
-rwxr-xr-xLib/platform.py113
-rw-r--r--Lib/plistlib.py6
-rw-r--r--Lib/poplib.py7
-rw-r--r--Lib/posixpath.py75
-rw-r--r--Lib/pprint.py459
-rw-r--r--Lib/py_compile.py19
-rw-r--r--Lib/pyclbr.py8
-rwxr-xr-xLib/pydoc.py50
-rw-r--r--Lib/pydoc_data/topics.py24
-rw-r--r--Lib/queue.py5
-rw-r--r--Lib/random.py4
-rw-r--r--Lib/re.py48
-rw-r--r--Lib/reprlib.py13
-rw-r--r--Lib/rlcompleter.py10
-rw-r--r--Lib/runpy.py66
-rw-r--r--Lib/sched.py6
-rw-r--r--Lib/selectors.py90
-rw-r--r--Lib/shlex.py3
-rw-r--r--Lib/shutil.py118
-rw-r--r--Lib/signal.py79
-rw-r--r--Lib/site.py29
-rwxr-xr-xLib/smtpd.py287
-rwxr-xr-xLib/smtplib.py240
-rw-r--r--Lib/sndhdr.py7
-rw-r--r--Lib/socket.py211
-rw-r--r--Lib/socketserver.py111
-rw-r--r--Lib/sqlite3/test/factory.py18
-rw-r--r--Lib/sqlite3/test/regression.py2
-rw-r--r--Lib/sqlite3/test/userfunctions.py31
-rw-r--r--Lib/sre_compile.py184
-rw-r--r--Lib/sre_constants.py259
-rw-r--r--Lib/sre_parse.py612
-rw-r--r--Lib/ssl.py329
-rw-r--r--Lib/stat.py23
-rw-r--r--Lib/statistics.py1
-rw-r--r--Lib/string.py13
-rw-r--r--Lib/subprocess.py294
-rwxr-xr-xLib/symbol.py155
-rw-r--r--Lib/symtable.py9
-rw-r--r--Lib/sysconfig.py26
-rwxr-xr-xLib/tarfile.py153
-rw-r--r--Lib/telnetlib.py9
-rw-r--r--Lib/tempfile.py169
-rw-r--r--Lib/test/_test_multiprocessing.py53
-rw-r--r--Lib/test/badsyntax_async1.py2
-rw-r--r--Lib/test/badsyntax_async2.py2
-rw-r--r--Lib/test/badsyntax_async3.py2
-rw-r--r--Lib/test/badsyntax_async4.py2
-rw-r--r--Lib/test/badsyntax_async5.py2
-rw-r--r--Lib/test/badsyntax_async6.py2
-rw-r--r--Lib/test/badsyntax_async7.py2
-rw-r--r--Lib/test/badsyntax_async8.py2
-rw-r--r--Lib/test/buffer_tests.py218
-rw-r--r--Lib/test/bytecode_helper.py4
-rw-r--r--Lib/test/cfgparser.22
-rw-r--r--Lib/test/datetimetester.py130
-rw-r--r--Lib/test/eintrdata/eintr_tester.py481
-rw-r--r--Lib/test/exception_hierarchy.txt2
-rw-r--r--Lib/test/fork_wait.py7
-rw-r--r--Lib/test/imghdrdata/python.exrbin0 -> 2635 bytes
-rw-r--r--Lib/test/imghdrdata/python.webpbin0 -> 432 bytes
-rw-r--r--Lib/test/imp_dummy.py3
-rw-r--r--Lib/test/inspect_fodder.py22
-rw-r--r--Lib/test/inspect_fodder2.py28
-rw-r--r--Lib/test/list_tests.py23
-rw-r--r--Lib/test/lock_tests.py17
-rw-r--r--Lib/test/mock_socket.py15
-rw-r--r--Lib/test/pickletester.py126
-rwxr-xr-xLib/test/pystone.py10
-rwxr-xr-xLib/test/re_tests.py6
-rwxr-xr-xLib/test/regrtest.py107
-rw-r--r--Lib/test/seq_tests.py5
-rw-r--r--Lib/test/ssl_servers.py8
-rw-r--r--Lib/test/string_tests.py160
-rw-r--r--Lib/test/support/__init__.py123
-rw-r--r--Lib/test/support/script_helper.py (renamed from Lib/test/script_helper.py)34
-rw-r--r--Lib/test/test___future__.py6
-rw-r--r--Lib/test/test__opcode.py7
-rw-r--r--Lib/test/test__osx_support.py6
-rw-r--r--Lib/test/test_argparse.py148
-rw-r--r--Lib/test/test_array.py56
-rw-r--r--Lib/test/test_asdl_parser.py122
-rw-r--r--Lib/test/test_ast.py94
-rw-r--r--Lib/test/test_asynchat.py13
-rw-r--r--Lib/test/test_asyncio/test_base_events.py138
-rw-r--r--Lib/test/test_asyncio/test_events.py81
-rw-r--r--Lib/test/test_asyncio/test_futures.py22
-rw-r--r--Lib/test/test_asyncio/test_locks.py25
-rw-r--r--Lib/test/test_asyncio/test_pep492.py231
-rw-r--r--Lib/test/test_asyncio/test_selector_events.py52
-rw-r--r--Lib/test/test_asyncio/test_sslproto.py2
-rw-r--r--Lib/test/test_asyncio/test_subprocess.py21
-rw-r--r--Lib/test/test_asyncio/test_tasks.py193
-rw-r--r--Lib/test/test_asyncore.py27
-rw-r--r--Lib/test/test_atexit.py6
-rw-r--r--Lib/test/test_augassign.py21
-rw-r--r--Lib/test/test_base64.py49
-rw-r--r--Lib/test/test_bigmem.py2
-rw-r--r--Lib/test/test_binascii.py9
-rw-r--r--Lib/test/test_binop.py8
-rw-r--r--Lib/test/test_bool.py4
-rw-r--r--Lib/test/test_buffer.py107
-rw-r--r--Lib/test/test_builtin.py163
-rw-r--r--Lib/test/test_bytes.py308
-rw-r--r--Lib/test/test_bz2.py133
-rw-r--r--Lib/test/test_calendar.py2
-rw-r--r--Lib/test/test_call.py7
-rw-r--r--Lib/test/test_capi.py136
-rw-r--r--Lib/test/test_cgi.py18
-rw-r--r--Lib/test/test_cgitb.py9
-rw-r--r--Lib/test/test_charmapcodec.py5
-rw-r--r--Lib/test/test_class.py22
-rw-r--r--Lib/test/test_cmath.py47
-rw-r--r--Lib/test/test_cmd_line.py11
-rw-r--r--Lib/test/test_cmd_line_script.py132
-rw-r--r--Lib/test/test_code_module.py36
-rw-r--r--Lib/test/test_codeccallbacks.py122
-rw-r--r--Lib/test/test_codecencodings_cn.py5
-rw-r--r--Lib/test/test_codecencodings_hk.py5
-rw-r--r--Lib/test/test_codecencodings_iso2022.py5
-rw-r--r--Lib/test/test_codecencodings_jp.py5
-rw-r--r--Lib/test/test_codecencodings_kr.py5
-rw-r--r--Lib/test/test_codecencodings_tw.py5
-rw-r--r--Lib/test/test_codecs.py102
-rw-r--r--Lib/test/test_codeop.py8
-rw-r--r--Lib/test/test_collections.py352
-rw-r--r--Lib/test/test_compare.py6
-rw-r--r--Lib/test/test_compile.py105
-rw-r--r--Lib/test/test_compileall.py122
-rw-r--r--Lib/test/test_concurrent_futures.py61
-rw-r--r--Lib/test/test_configparser.py277
-rw-r--r--Lib/test/test_contains.py6
-rw-r--r--Lib/test/test_contextlib.py94
-rw-r--r--Lib/test/test_copy.py150
-rw-r--r--Lib/test/test_copyreg.py7
-rw-r--r--Lib/test/test_coroutines.py1720
-rw-r--r--Lib/test/test_cprofile.py10
-rw-r--r--Lib/test/test_crashers.py7
-rw-r--r--Lib/test/test_crypt.py2
-rw-r--r--Lib/test/test_csv.py46
-rw-r--r--Lib/test/test_curses.py178
-rw-r--r--Lib/test/test_datetime.py10
-rw-r--r--Lib/test/test_dbm_dumb.py8
-rw-r--r--Lib/test/test_decimal.py158
-rw-r--r--Lib/test/test_decorators.py9
-rw-r--r--Lib/test/test_defaultdict.py11
-rw-r--r--Lib/test/test_deque.py254
-rw-r--r--Lib/test/test_descr.py162
-rw-r--r--Lib/test/test_dict.py17
-rw-r--r--Lib/test/test_dictviews.py8
-rw-r--r--Lib/test/test_difflib.py182
-rw-r--r--Lib/test/test_difflib_expect.html2
-rw-r--r--Lib/test/test_dis.py276
-rw-r--r--Lib/test/test_doctest.py76
-rw-r--r--Lib/test/test_docxmlrpc.py14
-rw-r--r--Lib/test/test_dummy_thread.py16
-rw-r--r--Lib/test/test_dummy_threading.py6
-rw-r--r--Lib/test/test_dynamic.py8
-rw-r--r--Lib/test/test_dynamicclassattribute.py6
-rw-r--r--Lib/test/test_eintr.py30
-rw-r--r--Lib/test/test_email/test__header_value_parser.py2
-rw-r--r--Lib/test/test_email/test_asian_codecs.py6
-rw-r--r--Lib/test/test_email/test_contentmanager.py2
-rw-r--r--Lib/test/test_email/test_email.py20
-rw-r--r--Lib/test/test_email/test_generator.py44
-rw-r--r--Lib/test/test_email/test_message.py10
-rw-r--r--Lib/test/test_email/test_policy.py8
-rw-r--r--Lib/test/test_email/torture_test.py15
-rw-r--r--Lib/test/test_ensurepip.py2
-rw-r--r--Lib/test/test_enum.py160
-rw-r--r--Lib/test/test_enumerate.py13
-rw-r--r--Lib/test/test_eof.py5
-rw-r--r--Lib/test/test_epoll.py7
-rw-r--r--Lib/test/test_errno.py7
-rw-r--r--Lib/test/test_exception_variations.py6
-rw-r--r--Lib/test/test_exceptions.py83
-rw-r--r--Lib/test/test_extcall.py71
-rw-r--r--Lib/test/test_faulthandler.py206
-rw-r--r--Lib/test/test_file_eintr.py46
-rw-r--r--Lib/test/test_fileinput.py81
-rw-r--r--Lib/test/test_fileio.py192
-rw-r--r--Lib/test/test_finalization.py5
-rw-r--r--Lib/test/test_float.py39
-rw-r--r--Lib/test/test_flufl.py7
-rw-r--r--Lib/test/test_fnmatch.py9
-rw-r--r--Lib/test/test_fork1.py13
-rw-r--r--Lib/test/test_format.py417
-rw-r--r--Lib/test/test_fractions.py43
-rw-r--r--Lib/test/test_frame.py5
-rw-r--r--Lib/test/test_ftplib.py29
-rw-r--r--Lib/test/test_funcattrs.py10
-rw-r--r--Lib/test/test_functools.py397
-rw-r--r--Lib/test/test_gc.py25
-rw-r--r--Lib/test/test_gdb.py45
-rw-r--r--Lib/test/test_generators.py137
-rw-r--r--Lib/test/test_genericpath.py40
-rw-r--r--Lib/test/test_getargs2.py405
-rw-r--r--Lib/test/test_getopt.py7
-rw-r--r--Lib/test/test_gettext.py70
-rw-r--r--Lib/test/test_glob.py137
-rw-r--r--Lib/test/test_grammar.py115
-rw-r--r--Lib/test/test_grp.py5
-rw-r--r--Lib/test/test_gzip.py40
-rw-r--r--Lib/test/test_hash.py2
-rw-r--r--Lib/test/test_hashlib.py5
-rw-r--r--Lib/test/test_heapq.py25
-rw-r--r--Lib/test/test_hmac.py11
-rw-r--r--Lib/test/test_html.py1
-rw-r--r--Lib/test/test_htmlparser.py76
-rw-r--r--Lib/test/test_http_cookiejar.py6
-rw-r--r--Lib/test/test_http_cookies.py219
-rw-r--r--Lib/test/test_httplib.py619
-rw-r--r--Lib/test/test_httpservers.py289
-rw-r--r--Lib/test/test_idle.py6
-rw-r--r--Lib/test/test_imaplib.py224
-rw-r--r--Lib/test/test_imghdr.py4
-rw-r--r--Lib/test/test_imp.py139
-rw-r--r--Lib/test/test_import/__init__.py (renamed from Lib/test/test_import.py)123
-rw-r--r--Lib/test/test_import/__main__.py3
-rw-r--r--Lib/test/test_import/data/circular_imports/basic.py2
-rw-r--r--Lib/test/test_import/data/circular_imports/basic2.py1
-rw-r--r--Lib/test/test_import/data/circular_imports/indirect.py1
-rw-r--r--Lib/test/test_import/data/circular_imports/rebinding.py3
-rw-r--r--Lib/test/test_import/data/circular_imports/rebinding2.py3
-rw-r--r--Lib/test/test_import/data/circular_imports/subpackage.py2
-rw-r--r--Lib/test/test_import/data/circular_imports/subpkg/subpackage2.py2
-rw-r--r--Lib/test/test_import/data/circular_imports/subpkg/util.py2
-rw-r--r--Lib/test/test_import/data/circular_imports/util.py2
-rw-r--r--Lib/test/test_importlib/builtin/test_finder.py33
-rw-r--r--Lib/test/test_importlib/builtin/test_loader.py38
-rw-r--r--Lib/test/test_importlib/builtin/util.py7
-rw-r--r--Lib/test/test_importlib/extension/test_case_sensitivity.py22
-rw-r--r--Lib/test/test_importlib/extension/test_finder.py15
-rw-r--r--Lib/test/test_importlib/extension/test_loader.py218
-rw-r--r--Lib/test/test_importlib/extension/test_path_hook.py13
-rw-r--r--Lib/test/test_importlib/extension/util.py19
-rw-r--r--Lib/test/test_importlib/frozen/test_finder.py12
-rw-r--r--Lib/test/test_importlib/frozen/test_loader.py17
-rw-r--r--Lib/test/test_importlib/import_/test___loader__.py15
-rw-r--r--Lib/test/test_importlib/import_/test___package__.py19
-rw-r--r--Lib/test/test_importlib/import_/test_api.py17
-rw-r--r--Lib/test/test_importlib/import_/test_caching.py9
-rw-r--r--Lib/test/test_importlib/import_/test_fromlist.py13
-rw-r--r--Lib/test/test_importlib/import_/test_meta_path.py21
-rw-r--r--Lib/test/test_importlib/import_/test_packages.py7
-rw-r--r--Lib/test/test_importlib/import_/test_path.py91
-rw-r--r--Lib/test/test_importlib/import_/test_relative_imports.py12
-rw-r--r--Lib/test/test_importlib/import_/util.py20
-rw-r--r--Lib/test/test_importlib/source/test_case_sensitivity.py23
-rw-r--r--Lib/test/test_importlib/source/test_file_loader.py111
-rw-r--r--Lib/test/test_importlib/source/test_finder.py28
-rw-r--r--Lib/test/test_importlib/source/test_path_hook.py8
-rw-r--r--Lib/test/test_importlib/source/test_source_encoding.py35
-rw-r--r--Lib/test/test_importlib/source/util.py96
-rw-r--r--Lib/test/test_importlib/test_abc.py292
-rw-r--r--Lib/test/test_importlib/test_api.py99
-rw-r--r--Lib/test/test_importlib/test_lazy.py133
-rw-r--r--Lib/test/test_importlib/test_locks.py178
-rw-r--r--Lib/test/test_importlib/test_spec.py256
-rw-r--r--Lib/test/test_importlib/test_util.py338
-rw-r--r--Lib/test/test_importlib/test_windows.py100
-rw-r--r--Lib/test/test_importlib/util.py187
-rw-r--r--Lib/test/test_inspect.py520
-rw-r--r--Lib/test/test_int.py5
-rw-r--r--Lib/test/test_int_literal.py6
-rw-r--r--Lib/test/test_io.py377
-rw-r--r--Lib/test/test_ioctl.py2
-rw-r--r--Lib/test/test_ipaddress.py239
-rw-r--r--Lib/test/test_isinstance.py21
-rw-r--r--Lib/test/test_iter.py51
-rw-r--r--Lib/test/test_itertools.py20
-rw-r--r--Lib/test/test_json/__init__.py4
-rw-r--r--Lib/test/test_json/test_decode.py8
-rw-r--r--Lib/test/test_json/test_encode_basestring_ascii.py3
-rw-r--r--Lib/test/test_json/test_fail.py59
-rw-r--r--Lib/test/test_json/test_recursion.py12
-rw-r--r--Lib/test/test_json/test_scanstring.py2
-rw-r--r--Lib/test/test_json/test_tool.py43
-rw-r--r--Lib/test/test_keywordonlyarg.py6
-rw-r--r--Lib/test/test_kqueue.py8
-rw-r--r--Lib/test/test_linecache.py43
-rw-r--r--Lib/test/test_list.py108
-rw-r--r--Lib/test/test_locale.py54
-rw-r--r--Lib/test/test_logging.py215
-rw-r--r--Lib/test/test_long.py24
-rw-r--r--Lib/test/test_longexp.py8
-rw-r--r--Lib/test/test_lzma.py118
-rw-r--r--Lib/test/test_macpath.py2
-rw-r--r--Lib/test/test_mailcap.py6
-rw-r--r--Lib/test/test_marshal.py2
-rw-r--r--Lib/test/test_math.py195
-rw-r--r--Lib/test/test_memoryio.py96
-rw-r--r--Lib/test/test_memoryview.py48
-rw-r--r--Lib/test/test_mimetypes.py8
-rw-r--r--Lib/test/test_minidom.py22
-rw-r--r--Lib/test/test_mmap.py10
-rw-r--r--Lib/test/test_module.py34
-rw-r--r--Lib/test/test_modulefinder.py13
-rw-r--r--Lib/test/test_msilib.py7
-rw-r--r--Lib/test/test_multibytecodec.py4
-rw-r--r--Lib/test/test_multiprocessing_main_handling.py31
-rw-r--r--Lib/test/test_nis.py5
-rw-r--r--Lib/test/test_nntplib.py84
-rw-r--r--Lib/test/test_normalization.py7
-rw-r--r--Lib/test/test_ntpath.py69
-rw-r--r--Lib/test/test_numeric_tower.py6
-rw-r--r--Lib/test/test_opcodes.py6
-rw-r--r--Lib/test/test_openpty.py6
-rw-r--r--Lib/test/test_operator.py125
-rw-r--r--Lib/test/test_ordered_dict.py466
-rw-r--r--Lib/test/test_os.py564
-rw-r--r--Lib/test/test_osx_env.py2
-rw-r--r--Lib/test/test_parser.py45
-rw-r--r--Lib/test/test_pathlib.py234
-rw-r--r--Lib/test/test_pdb.py2
-rw-r--r--Lib/test/test_peepholer.py18
-rw-r--r--Lib/test/test_pep247.py6
-rw-r--r--Lib/test/test_pep292.py254
-rw-r--r--Lib/test/test_pep3120.py8
-rw-r--r--Lib/test/test_pep3131.py8
-rw-r--r--Lib/test/test_pep3151.py14
-rw-r--r--Lib/test/test_pep380.py8
-rw-r--r--Lib/test/test_pep479.py34
-rw-r--r--Lib/test/test_pickle.py7
-rw-r--r--Lib/test/test_pkg.py6
-rw-r--r--Lib/test/test_pkgimport.py8
-rw-r--r--Lib/test/test_pkgutil.py3
-rw-r--r--Lib/test/test_platform.py60
-rw-r--r--Lib/test/test_plistlib.py15
-rw-r--r--Lib/test/test_popen.py5
-rw-r--r--Lib/test/test_poplib.py33
-rw-r--r--Lib/test/test_posix.py13
-rw-r--r--Lib/test/test_posixpath.py79
-rw-r--r--Lib/test/test_pow.py5
-rw-r--r--Lib/test/test_pprint.py456
-rw-r--r--Lib/test/test_property.py28
-rw-r--r--Lib/test/test_pstats.py9
-rw-r--r--Lib/test/test_pty.py34
-rw-r--r--Lib/test/test_pulldom.py8
-rw-r--r--Lib/test/test_pwd.py5
-rw-r--r--Lib/test/test_py_compile.py5
-rw-r--r--Lib/test/test_pyclbr.py9
-rw-r--r--Lib/test/test_pydoc.py65
-rw-r--r--Lib/test/test_pyexpat.py24
-rw-r--r--Lib/test/test_queue.py7
-rw-r--r--Lib/test/test_quopri.py7
-rw-r--r--Lib/test/test_raise.py3
-rw-r--r--Lib/test/test_random.py2
-rw-r--r--Lib/test/test_range.py5
-rw-r--r--Lib/test/test_re.py566
-rw-r--r--Lib/test/test_readline.py49
-rw-r--r--Lib/test/test_reprlib.py60
-rw-r--r--Lib/test/test_richcmp.py29
-rw-r--r--Lib/test/test_rlcompleter.py3
-rw-r--r--Lib/test/test_runpy.py43
-rw-r--r--Lib/test/test_sax.py40
-rw-r--r--Lib/test/test_scope.py7
-rw-r--r--Lib/test/test_script_helper.py28
-rw-r--r--Lib/test/test_select.py5
-rw-r--r--Lib/test/test_selectors.py62
-rw-r--r--Lib/test/test_set.py20
-rw-r--r--Lib/test/test_shlex.py6
-rw-r--r--Lib/test/test_shutil.py57
-rw-r--r--Lib/test/test_signal.py342
-rw-r--r--Lib/test/test_site.py27
-rw-r--r--Lib/test/test_slice.py21
-rw-r--r--Lib/test/test_smtpd.py492
-rw-r--r--Lib/test/test_smtplib.py452
-rw-r--r--Lib/test/test_smtpnet.py5
-rw-r--r--Lib/test/test_sndhdr.py14
-rw-r--r--Lib/test/test_socket.py458
-rw-r--r--Lib/test/test_socketserver.py94
-rw-r--r--Lib/test/test_sort.py21
-rw-r--r--Lib/test/test_source_encoding.py83
-rw-r--r--Lib/test/test_ssl.py629
-rw-r--r--Lib/test/test_startfile.py7
-rw-r--r--Lib/test/test_stat.py29
-rw-r--r--Lib/test/test_string.py279
-rw-r--r--Lib/test/test_stringprep.py6
-rw-r--r--Lib/test/test_strlit.py6
-rw-r--r--Lib/test/test_strptime.py45
-rw-r--r--Lib/test/test_strtod.py5
-rw-r--r--Lib/test/test_struct.py5
-rw-r--r--Lib/test/test_structmembers.py5
-rw-r--r--Lib/test/test_structseq.py6
-rw-r--r--Lib/test/test_subprocess.py246
-rw-r--r--Lib/test/test_sundry.py2
-rw-r--r--Lib/test/test_super.py12
-rw-r--r--Lib/test/test_support.py34
-rw-r--r--Lib/test/test_symtable.py6
-rw-r--r--Lib/test/test_syntax.py24
-rw-r--r--Lib/test/test_sys.py225
-rw-r--r--Lib/test/test_sys_setprofile.py14
-rw-r--r--Lib/test/test_sys_settrace.py9
-rw-r--r--Lib/test/test_sysconfig.py22
-rw-r--r--Lib/test/test_syslog.py5
-rw-r--r--Lib/test/test_tarfile.py331
-rw-r--r--Lib/test/test_tcl.py28
-rw-r--r--Lib/test/test_telnetlib.py22
-rw-r--r--Lib/test/test_tempfile.py187
-rw-r--r--Lib/test/test_textwrap.py16
-rw-r--r--Lib/test/test_thread.py6
-rw-r--r--Lib/test/test_threaded_import.py10
-rw-r--r--Lib/test/test_threading.py33
-rw-r--r--Lib/test/test_threading_local.py2
-rw-r--r--Lib/test/test_time.py445
-rw-r--r--Lib/test/test_timeit.py52
-rw-r--r--Lib/test/test_timeout.py8
-rw-r--r--Lib/test/test_tix.py32
-rw-r--r--Lib/test/test_tk.py3
-rw-r--r--Lib/test/test_tokenize.py290
-rw-r--r--Lib/test/test_tools/test_gprof2html.py2
-rw-r--r--Lib/test/test_tools/test_i18n.py68
-rw-r--r--Lib/test/test_tools/test_md5sum.py2
-rw-r--r--Lib/test/test_tools/test_pindent.py2
-rw-r--r--Lib/test/test_tools/test_reindent.py2
-rw-r--r--Lib/test/test_tools/test_unparse.py5
-rw-r--r--Lib/test/test_trace.py10
-rw-r--r--Lib/test/test_traceback.py451
-rw-r--r--Lib/test/test_tracemalloc.py20
-rw-r--r--Lib/test/test_ttk_guionly.py4
-rw-r--r--Lib/test/test_ttk_textonly.py3
-rw-r--r--Lib/test/test_tuple.py19
-rw-r--r--Lib/test/test_turtle.py436
-rw-r--r--Lib/test/test_typechecks.py5
-rw-r--r--Lib/test/test_types.py327
-rw-r--r--Lib/test/test_typing.py1590
-rw-r--r--Lib/test/test_ucn.py5
-rw-r--r--Lib/test/test_unary.py7
-rw-r--r--Lib/test/test_unicode.py90
-rw-r--r--Lib/test/test_unicodedata.py31
-rw-r--r--Lib/test/test_unpack.py2
-rw-r--r--Lib/test/test_unpack_ex.py195
-rw-r--r--Lib/test/test_urllib.py99
-rw-r--r--Lib/test/test_urllib2.py308
-rw-r--r--Lib/test/test_urllib2_localnet.py29
-rw-r--r--Lib/test/test_urllib2net.py2
-rw-r--r--Lib/test/test_urllibnet.py64
-rw-r--r--Lib/test/test_urlparse.py136
-rw-r--r--Lib/test/test_userdict.py8
-rw-r--r--Lib/test/test_userlist.py6
-rw-r--r--Lib/test/test_uuid.py44
-rw-r--r--Lib/test/test_venv.py25
-rw-r--r--Lib/test/test_wait3.py10
-rw-r--r--Lib/test/test_wait4.py13
-rw-r--r--Lib/test/test_warnings/__init__.py (renamed from Lib/test/test_warnings.py)174
-rw-r--r--Lib/test/test_warnings/__main__.py3
-rw-r--r--Lib/test/test_warnings/data/import_warning.py3
-rw-r--r--Lib/test/test_warnings/data/stacklevel.py (renamed from Lib/test/warning_tests.py)0
-rw-r--r--Lib/test/test_weakref.py27
-rw-r--r--Lib/test/test_weakset.py6
-rw-r--r--Lib/test/test_winsound.py9
-rw-r--r--Lib/test/test_with.py18
-rw-r--r--Lib/test/test_wsgiref.py137
-rw-r--r--Lib/test/test_xdrlib.py7
-rw-r--r--Lib/test/test_xml_etree.py63
-rw-r--r--Lib/test/test_xml_etree_c.py2
-rw-r--r--Lib/test/test_xmlrpc.py147
-rw-r--r--Lib/test/test_zipapp.py349
-rw-r--r--Lib/test/test_zipfile.py238
-rw-r--r--Lib/test/test_zipfile64.py10
-rw-r--r--Lib/test/test_zipimport.py254
-rw-r--r--Lib/test/test_zipimport_support.py19
-rw-r--r--Lib/test/test_zlib.py143
-rw-r--r--Lib/test/tf_inherit_check.py32
-rw-r--r--Lib/test/tokenize_tests-latin1-coding-cookie-and-utf8-bom-sig.txt2
-rw-r--r--Lib/test/wrongcert.pem32
-rw-r--r--Lib/textwrap.py23
-rw-r--r--Lib/threading.py19
-rwxr-xr-xLib/timeit.py113
-rw-r--r--Lib/tkinter/__init__.py266
-rw-r--r--Lib/tkinter/_fix.py78
-rw-r--r--Lib/tkinter/dnd.py2
-rw-r--r--Lib/tkinter/font.py8
-rw-r--r--Lib/tkinter/simpledialog.py4
-rw-r--r--Lib/tkinter/test/runtktests.py2
-rw-r--r--Lib/tkinter/test/test_tkinter/test_geometry_managers.py6
-rw-r--r--Lib/tkinter/test/test_tkinter/test_misc.py5
-rw-r--r--Lib/tkinter/test/test_tkinter/test_variables.py6
-rw-r--r--Lib/tkinter/test/test_tkinter/test_widgets.py20
-rw-r--r--Lib/tkinter/test/test_ttk/test_extensions.py6
-rw-r--r--Lib/tkinter/test/test_ttk/test_functions.py2
-rw-r--r--Lib/tkinter/test/test_ttk/test_widgets.py268
-rw-r--r--Lib/tkinter/test/widget_tests.py27
-rw-r--r--Lib/tkinter/tix.py10
-rw-r--r--Lib/tkinter/ttk.py4
-rw-r--r--Lib/token.py25
-rw-r--r--Lib/tokenize.py88
-rwxr-xr-xLib/trace.py66
-rw-r--r--Lib/traceback.py537
-rw-r--r--Lib/tracemalloc.py2
-rw-r--r--[-rwxr-xr-x]Lib/turtledemo/__main__.py5
-rwxr-xr-x[-rw-r--r--]Lib/turtledemo/bytedesign.py0
-rw-r--r--Lib/turtledemo/sorting_animate.py204
-rw-r--r--Lib/types.py102
-rw-r--r--Lib/typing.py1843
-rw-r--r--Lib/unittest/__init__.py11
-rw-r--r--Lib/unittest/case.py123
-rw-r--r--Lib/unittest/loader.py258
-rw-r--r--Lib/unittest/main.py25
-rw-r--r--Lib/unittest/mock.py77
-rw-r--r--Lib/unittest/result.py9
-rw-r--r--Lib/unittest/runner.py10
-rw-r--r--Lib/unittest/suite.py2
-rw-r--r--Lib/unittest/test/support.py4
-rw-r--r--Lib/unittest/test/test_assertions.py15
-rw-r--r--Lib/unittest/test/test_break.py3
-rw-r--r--Lib/unittest/test/test_case.py189
-rw-r--r--Lib/unittest/test/test_discovery.py360
-rw-r--r--Lib/unittest/test/test_loader.py425
-rw-r--r--Lib/unittest/test/test_program.py26
-rw-r--r--Lib/unittest/test/test_result.py43
-rw-r--r--Lib/unittest/test/test_runner.py19
-rw-r--r--Lib/unittest/test/test_setups.py7
-rw-r--r--Lib/unittest/test/testmock/testmagicmethods.py11
-rw-r--r--Lib/unittest/test/testmock/testmock.py74
-rw-r--r--Lib/unittest/test/testmock/testpatch.py50
-rw-r--r--Lib/unittest/util.py2
-rw-r--r--Lib/urllib/error.py7
-rw-r--r--Lib/urllib/parse.py204
-rw-r--r--Lib/urllib/request.py157
-rw-r--r--Lib/urllib/robotparser.py4
-rw-r--r--Lib/uuid.py135
-rw-r--r--Lib/venv/__init__.py15
-rw-r--r--Lib/venv/scripts/posix/activate.fish4
-rw-r--r--Lib/warnings.py73
-rw-r--r--Lib/weakref.py4
-rw-r--r--Lib/wsgiref/handlers.py14
-rw-r--r--Lib/wsgiref/headers.py8
-rw-r--r--Lib/wsgiref/simple_server.py19
-rw-r--r--Lib/xml/dom/minidom.py8
-rw-r--r--Lib/xml/dom/xmlbuilder.py26
-rw-r--r--Lib/xml/etree/ElementPath.py20
-rw-r--r--Lib/xml/etree/ElementTree.py20
-rw-r--r--Lib/xml/sax/__init__.py8
-rw-r--r--Lib/xml/sax/expatreader.py11
-rw-r--r--Lib/xml/sax/saxutils.py7
-rw-r--r--Lib/xml/sax/xmlreader.py4
-rw-r--r--Lib/xmlrpc/client.py73
-rw-r--r--Lib/xmlrpc/server.py4
-rw-r--r--Lib/zipapp.py201
-rw-r--r--Lib/zipfile.py658
-rw-r--r--Mac/BuildScript/README.txt71
-rwxr-xr-xMac/BuildScript/build-installer.py19
-rw-r--r--Mac/BuildScript/openssl_sdk_makedepend.patch22
-rw-r--r--Mac/BuildScript/resources/ReadMe.rtf90
-rw-r--r--Mac/BuildScript/resources/Welcome.rtf8
-rwxr-xr-xMac/BuildScript/scripts/postflight.ensurepip10
-rwxr-xr-xMac/BuildScript/scripts/postflight.framework16
-rwxr-xr-xMac/BuildScript/scripts/postflight.patch-profile4
-rw-r--r--Mac/Makefile.in6
-rw-r--r--Mac/PythonLauncher/Info.plist.in4
-rw-r--r--Mac/PythonLauncher/Makefile.in29
-rw-r--r--Mac/README25
-rwxr-xr-xMac/Tools/bundlebuilder.py934
-rw-r--r--Makefile.pre.in163
-rw-r--r--Misc/ACKS86
-rw-r--r--Misc/HISTORY1219
-rw-r--r--Misc/NEWS7938
-rw-r--r--Misc/Porting42
-rw-r--r--Misc/coverity_model.c60
-rw-r--r--Misc/gdbinit4
-rw-r--r--Misc/python.man27
-rw-r--r--Modules/README2
-rw-r--r--Modules/Setup.config.in2
-rw-r--r--Modules/Setup.dist2
-rw-r--r--Modules/_bz2module.c262
-rw-r--r--Modules/_codecsmodule.c1270
-rw-r--r--Modules/_collectionsmodule.c709
-rw-r--r--Modules/_cryptmodule.c41
-rw-r--r--Modules/_csv.c93
-rw-r--r--Modules/_ctypes/_ctypes.c57
-rw-r--r--Modules/_ctypes/callproc.c2
-rw-r--r--Modules/_ctypes/cfield.c28
-rw-r--r--Modules/_ctypes/ctypes_dlfcn.h4
-rw-r--r--Modules/_ctypes/libffi/m4/libtool.m42
-rw-r--r--Modules/_ctypes/libffi_msvc/ffi.c37
-rw-r--r--Modules/_curses_panel.c17
-rw-r--r--Modules/_cursesmodule.c85
-rw-r--r--Modules/_datetimemodule.c111
-rw-r--r--Modules/_dbmmodule.c203
-rw-r--r--Modules/_decimal/_decimal.c6
-rw-r--r--Modules/_decimal/docstrings.h860
-rw-r--r--Modules/_decimal/libmpdec/mpdecimal.c1
-rw-r--r--Modules/_decimal/tests/deccheck.py7
-rw-r--r--Modules/_elementtree.c1236
-rw-r--r--Modules/_functoolsmodule.c737
-rw-r--r--Modules/_gdbmmodule.c306
-rw-r--r--Modules/_hashopenssl.c34
-rw-r--r--Modules/_heapqmodule.c434
-rw-r--r--Modules/_io/_iomodule.c306
-rw-r--r--Modules/_io/_iomodule.h2
-rw-r--r--Modules/_io/bufferedio.c1035
-rw-r--r--Modules/_io/bytesio.c662
-rw-r--r--Modules/_io/clinic/_iomodule.c.h159
-rw-r--r--Modules/_io/clinic/bufferedio.c.h454
-rw-r--r--Modules/_io/clinic/bytesio.c.h422
-rw-r--r--Modules/_io/clinic/fileio.c.h367
-rw-r--r--Modules/_io/clinic/iobase.c.h279
-rw-r--r--Modules/_io/clinic/stringio.c.h286
-rw-r--r--Modules/_io/clinic/textio.c.h456
-rw-r--r--Modules/_io/fileio.c678
-rw-r--r--Modules/_io/iobase.c269
-rw-r--r--Modules/_io/stringio.c279
-rw-r--r--Modules/_io/textio.c551
-rw-r--r--Modules/_json.c226
-rw-r--r--Modules/_lsprof.c11
-rw-r--r--Modules/_lzmamodule.c227
-rw-r--r--Modules/_opcode.c37
-rw-r--r--Modules/_operator.c291
-rw-r--r--Modules/_pickle.c320
-rw-r--r--Modules/_posixsubprocess.c38
-rw-r--r--Modules/_randommodule.c138
-rw-r--r--Modules/_scproxy.c2
-rw-r--r--Modules/_sqlite/connection.c16
-rw-r--r--Modules/_sqlite/connection.h2
-rw-r--r--Modules/_sqlite/cursor.c23
-rw-r--r--Modules/_sqlite/microprotocols.h2
-rw-r--r--Modules/_sqlite/row.c5
-rw-r--r--Modules/_sre.c1056
-rw-r--r--Modules/_ssl.c1813
-rw-r--r--Modules/_stat.c36
-rw-r--r--Modules/_struct.c35
-rw-r--r--Modules/_testbuffer.c61
-rw-r--r--Modules/_testcapimodule.c836
-rw-r--r--Modules/_testmultiphase.c594
-rw-r--r--Modules/_threadmodule.c162
-rw-r--r--Modules/_tkinter.c1088
-rw-r--r--Modules/_tracemalloc.c130
-rw-r--r--Modules/_weakref.c31
-rw-r--r--Modules/_winapi.c991
-rw-r--r--Modules/arraymodule.c772
-rw-r--r--Modules/atexitmodule.c10
-rw-r--r--Modules/audioop.c73
-rw-r--r--Modules/binascii.c39
-rw-r--r--Modules/cjkcodecs/_codecs_iso2022.c7
-rw-r--r--Modules/cjkcodecs/cjkcodecs.h30
-rw-r--r--Modules/cjkcodecs/clinic/multibytecodec.c.h320
-rw-r--r--Modules/cjkcodecs/multibytecodec.c348
-rw-r--r--Modules/clinic/_bz2module.c.h48
-rw-r--r--Modules/clinic/_codecsmodule.c.h1396
-rw-r--r--Modules/clinic/_cryptmodule.c.h37
-rw-r--r--Modules/clinic/_cursesmodule.c.h71
-rw-r--r--Modules/clinic/_datetimemodule.c.h37
-rw-r--r--Modules/clinic/_dbmmodule.c.h141
-rw-r--r--Modules/clinic/_elementtree.c.h679
-rw-r--r--Modules/clinic/_gdbmmodule.c.h253
-rw-r--r--Modules/clinic/_lzmamodule.c.h73
-rw-r--r--Modules/clinic/_opcode.c.h36
-rw-r--r--Modules/clinic/_pickle.c.h49
-rw-r--r--Modules/clinic/_sre.c.h693
-rw-r--r--Modules/clinic/_ssl.c.h1105
-rw-r--r--Modules/clinic/_tkinter.c.h624
-rw-r--r--Modules/clinic/_weakref.c.h31
-rw-r--r--Modules/clinic/_winapi.c.h854
-rw-r--r--Modules/clinic/arraymodule.c.h499
-rw-r--r--Modules/clinic/audioop.c.h120
-rw-r--r--Modules/clinic/binascii.c.h117
-rw-r--r--Modules/clinic/cmathmodule.c.h860
-rw-r--r--Modules/clinic/fcntlmodule.c.h185
-rw-r--r--Modules/clinic/grpmodule.c.h85
-rw-r--r--Modules/clinic/md5module.c.h95
-rw-r--r--Modules/clinic/posixmodule.c.h5791
-rw-r--r--Modules/clinic/pwdmodule.c.h71
-rw-r--r--Modules/clinic/pyexpat.c.h284
-rw-r--r--Modules/clinic/sha1module.c.h95
-rw-r--r--Modules/clinic/sha256module.c.h123
-rw-r--r--Modules/clinic/sha512module.c.h171
-rw-r--r--Modules/clinic/signalmodule.c.h432
-rw-r--r--Modules/clinic/spwdmodule.c.h68
-rw-r--r--Modules/clinic/unicodedata.c.h368
-rw-r--r--Modules/clinic/zlibmodule.c.h78
-rw-r--r--Modules/cmathmodule.c558
-rw-r--r--Modules/config.c.in2
-rw-r--r--Modules/faulthandler.c239
-rw-r--r--Modules/fcntlmodule.c443
-rw-r--r--Modules/gcmodule.c82
-rw-r--r--Modules/getaddrinfo.c8
-rw-r--r--Modules/getpath.c59
-rw-r--r--Modules/grpmodule.c78
-rw-r--r--Modules/itertoolsmodule.c89
-rw-r--r--Modules/ld_so_aix.in12
-rw-r--r--Modules/main.c47
-rwxr-xr-xModules/makesetup2
-rw-r--r--Modules/mathmodule.c173
-rw-r--r--Modules/md5module.c123
-rw-r--r--Modules/mmapmodule.c64
-rw-r--r--Modules/nismodule.c4
-rw-r--r--Modules/ossaudiodev.c92
-rw-r--r--Modules/overlapped.c15
-rw-r--r--Modules/parsermodule.c377
-rw-r--r--Modules/posixmodule.c8230
-rw-r--r--Modules/pwdmodule.c71
-rw-r--r--Modules/pyexpat.c383
-rw-r--r--Modules/readline.c126
-rw-r--r--Modules/selectmodule.c467
-rw-r--r--Modules/sha1module.c114
-rw-r--r--Modules/sha256module.c148
-rw-r--r--Modules/sha512module.c158
-rw-r--r--Modules/signalmodule.c747
-rw-r--r--Modules/socketmodule.c1377
-rw-r--r--Modules/socketmodule.h9
-rw-r--r--Modules/spwdmodule.c48
-rw-r--r--Modules/sre.h9
-rw-r--r--Modules/sre_constants.h3
-rw-r--r--Modules/sre_lib.h28
-rw-r--r--Modules/symtablemodule.c3
-rw-r--r--Modules/timemodule.c412
-rw-r--r--Modules/tkappinit.c19
-rw-r--r--Modules/tkinter.h8
-rw-r--r--Modules/unicodedata.c463
-rw-r--r--Modules/unicodedata_db.h7130
-rw-r--r--Modules/unicodename_db.h42270
-rw-r--r--Modules/winreparse.h53
-rw-r--r--Modules/xxlimited.c83
-rw-r--r--Modules/xxmodule.c54
-rw-r--r--Modules/xxsubtype.c61
-rw-r--r--Modules/zipimport.c438
-rw-r--r--Modules/zlibmodule.c176
-rw-r--r--Objects/README1
-rw-r--r--Objects/abstract.c188
-rw-r--r--Objects/bytearrayobject.c958
-rw-r--r--Objects/bytes_methods.c27
-rw-r--r--Objects/bytesobject.c1343
-rw-r--r--Objects/cellobject.c6
-rw-r--r--Objects/classobject.c43
-rw-r--r--Objects/clinic/bytearrayobject.c.h698
-rw-r--r--Objects/clinic/bytesobject.c.h487
-rw-r--r--Objects/clinic/dictobject.c.h42
-rw-r--r--Objects/clinic/unicodeobject.c.h41
-rw-r--r--Objects/codeobject.c141
-rw-r--r--Objects/complexobject.c34
-rw-r--r--Objects/descrobject.c42
-rw-r--r--Objects/dict-common.h22
-rw-r--r--Objects/dictobject.c496
-rw-r--r--Objects/exceptions.c106
-rw-r--r--Objects/fileobject.c19
-rw-r--r--Objects/floatobject.c9
-rw-r--r--Objects/frameobject.c19
-rw-r--r--Objects/funcobject.c15
-rw-r--r--Objects/genobject.c612
-rw-r--r--Objects/iterobject.c4
-rw-r--r--Objects/listobject.c26
-rw-r--r--Objects/longobject.c314
-rw-r--r--Objects/memoryobject.c214
-rw-r--r--Objects/methodobject.c107
-rw-r--r--Objects/moduleobject.c388
-rw-r--r--Objects/object.c54
-rw-r--r--Objects/obmalloc.c142
-rw-r--r--Objects/odictobject.c2431
-rw-r--r--Objects/rangeobject.c17
-rw-r--r--Objects/setobject.c447
-rw-r--r--Objects/sliceobject.c21
-rw-r--r--Objects/stringlib/codecs.h87
-rw-r--r--Objects/stringlib/fastsearch.h4
-rw-r--r--Objects/stringlib/find.h23
-rw-r--r--Objects/stringlib/transmogrify.h2
-rw-r--r--Objects/stringlib/unicode_format.h2
-rw-r--r--Objects/tupleobject.c6
-rw-r--r--Objects/typeobject.c576
-rw-r--r--Objects/typeslots.inc6
-rwxr-xr-xObjects/typeslots.py2
-rw-r--r--Objects/unicodectype.c2
-rw-r--r--Objects/unicodeobject.c1156
-rw-r--r--Objects/unicodetype_db.h3856
-rw-r--r--Objects/weakrefobject.c4
-rw-r--r--PC/VS9.0/_bz2.vcproj581
-rw-r--r--PC/VS9.0/_ctypes.vcproj705
-rw-r--r--PC/VS9.0/_ctypes_test.vcproj521
-rw-r--r--PC/VS9.0/_decimal.vcproj743
-rw-r--r--PC/VS9.0/_elementtree.vcproj613
-rw-r--r--PC/VS9.0/_hashlib.vcproj537
-rw-r--r--PC/VS9.0/_lzma.vcproj537
-rw-r--r--PC/VS9.0/_msi.vcproj529
-rw-r--r--PC/VS9.0/_multiprocessing.vcproj541
-rw-r--r--PC/VS9.0/_socket.vcproj537
-rw-r--r--PC/VS9.0/_sqlite3.vcproj609
-rw-r--r--PC/VS9.0/_ssl.vcproj537
-rw-r--r--PC/VS9.0/_testbuffer.vcproj521
-rw-r--r--PC/VS9.0/_testcapi.vcproj521
-rw-r--r--PC/VS9.0/_testimportmultiple.vcproj521
-rw-r--r--PC/VS9.0/_tkinter.vcproj541
-rw-r--r--PC/VS9.0/bdist_wininst.vcproj270
-rw-r--r--PC/VS9.0/debug.vsprops15
-rw-r--r--PC/VS9.0/kill_python.c178
-rw-r--r--PC/VS9.0/kill_python.vcproj279
-rw-r--r--PC/VS9.0/make_buildinfo.c195
-rw-r--r--PC/VS9.0/make_buildinfo.vcproj101
-rw-r--r--PC/VS9.0/make_versioninfo.vcproj324
-rw-r--r--PC/VS9.0/pcbuild.sln690
-rw-r--r--PC/VS9.0/pginstrument.vsprops34
-rw-r--r--PC/VS9.0/pgupdate.vsprops14
-rw-r--r--PC/VS9.0/pyd.vsprops28
-rw-r--r--PC/VS9.0/pyd_d.vsprops36
-rw-r--r--PC/VS9.0/pyexpat.vcproj553
-rw-r--r--PC/VS9.0/pyproject.vsprops91
-rw-r--r--PC/VS9.0/python.vcproj637
-rw-r--r--PC/VS9.0/python3dll.vcproj246
-rw-r--r--PC/VS9.0/pythoncore.vcproj1877
-rw-r--r--PC/VS9.0/pythonw.vcproj618
-rw-r--r--PC/VS9.0/release.vsprops15
-rw-r--r--PC/VS9.0/select.vcproj537
-rw-r--r--PC/VS9.0/sqlite3.vcproj537
-rw-r--r--PC/VS9.0/sqlite3.vsprops14
-rw-r--r--PC/VS9.0/ssl.vcproj189
-rw-r--r--PC/VS9.0/unicodedata.vcproj533
-rw-r--r--PC/VS9.0/winsound.vcproj523
-rw-r--r--PC/VS9.0/x64.vsprops22
-rw-r--r--PC/VS9.0/xxlimited.vcproj417
-rw-r--r--PC/bdist_wininst/archive.h9
-rw-r--r--PC/bdist_wininst/bdist_wininst.vcxproj104
-rw-r--r--PC/bdist_wininst/bdist_wininst.vcxproj.filters (renamed from PCbuild/bdist_wininst.vcxproj.filters)0
-rw-r--r--PC/bdist_wininst/build.bat22
-rw-r--r--PC/bdist_wininst/extract.c9
-rw-r--r--PC/bdist_wininst/install.c55
-rw-r--r--PC/bdist_wininst/install.rc162
-rw-r--r--PC/bdist_wininst/resource.h24
-rw-r--r--PC/bdist_wininst/wininst-7.1.sln21
-rw-r--r--PC/bdist_wininst/wininst-7.1.vcproj214
-rw-r--r--PC/bdist_wininst/wininst-8.sln19
-rw-r--r--PC/bdist_wininst/wininst-8.vcproj320
-rw-r--r--PC/bdist_wininst/wininst.dsp123
-rw-r--r--PC/bdist_wininst/wininst.dsw29
-rw-r--r--PC/clinic/msvcrtmodule.c.h554
-rw-r--r--PC/clinic/winreg.c.h1059
-rw-r--r--PC/clinic/winsound.c.h100
-rw-r--r--PC/config.c6
-rw-r--r--PC/dl_nt.c8
-rw-r--r--PC/getpathp.c176
-rw-r--r--PC/icons/baselogo.svg609
-rw-r--r--PC/icons/source.xarbin71690 -> 0 bytes
-rw-r--r--PC/invalid_parameter_handler.c22
-rw-r--r--PC/launcher.c202
-rw-r--r--PC/msvcrtmodule.c604
-rw-r--r--PC/pyconfig.h60
-rw-r--r--PC/pylauncher.rc55
-rw-r--r--PC/python.manifest19
-rw-r--r--PC/python3.def1410
-rw-r--r--PC/python3.mak14
-rw-r--r--PC/python34gen.py26
-rw-r--r--PC/python34stub.def700
-rw-r--r--PC/python_exe.rc50
-rw-r--r--PC/python_nt.rc42
-rw-r--r--PC/python_ver_rc.h34
-rw-r--r--PC/readme.txt5
-rw-r--r--PC/sqlite3.rc49
-rw-r--r--PC/testpy.py2
-rw-r--r--PC/validate_ucrtbase.py88
-rw-r--r--PC/winreg.c1401
-rw-r--r--PC/winsound.c129
-rw-r--r--PCbuild/_bz2.vcxproj187
-rw-r--r--PCbuild/_ctypes.vcxproj214
-rw-r--r--PCbuild/_ctypes_test.vcxproj134
-rw-r--r--PCbuild/_decimal.vcxproj215
-rw-r--r--PCbuild/_elementtree.vcxproj186
-rw-r--r--PCbuild/_freeze_importlib.vcxproj174
-rw-r--r--PCbuild/_freeze_importlib.vcxproj.filters4
-rw-r--r--PCbuild/_hashlib.vcxproj227
-rw-r--r--PCbuild/_lzma.vcxproj192
-rw-r--r--PCbuild/_msi.vcxproj167
-rw-r--r--PCbuild/_multiprocessing.vcxproj165
-rw-r--r--PCbuild/_overlapped.vcxproj173
-rw-r--r--PCbuild/_socket.vcxproj165
-rw-r--r--PCbuild/_sqlite3.vcxproj186
-rw-r--r--PCbuild/_ssl.vcxproj227
-rw-r--r--PCbuild/_testbuffer.vcxproj159
-rw-r--r--PCbuild/_testcapi.vcxproj159
-rw-r--r--PCbuild/_testembed.vcxproj135
-rw-r--r--PCbuild/_testembed.vcxproj.filters2
-rw-r--r--PCbuild/_testimportmultiple.vcxproj159
-rw-r--r--PCbuild/_testmultiphase.vcxproj83
-rw-r--r--PCbuild/_testmultiphase.vcxproj.filters22
-rw-r--r--PCbuild/_tkinter.vcxproj195
-rw-r--r--PCbuild/bdist_wininst.vcxproj158
-rw-r--r--PCbuild/build.bat213
-rw-r--r--PCbuild/build_pgo.bat43
-rw-r--r--PCbuild/build_ssl.bat12
-rw-r--r--PCbuild/build_ssl.py269
-rw-r--r--PCbuild/build_tkinter.py78
-rw-r--r--PCbuild/clean.bat5
-rw-r--r--PCbuild/debug.props27
-rw-r--r--PCbuild/env.bat16
-rw-r--r--PCbuild/get_externals.bat21
-rw-r--r--PCbuild/idle.bat6
-rw-r--r--PCbuild/installer.bmpbin58806 -> 0 bytes
-rw-r--r--PCbuild/kill_python.c178
-rw-r--r--PCbuild/kill_python.vcxproj120
-rw-r--r--PCbuild/kill_python.vcxproj.filters13
-rw-r--r--PCbuild/libeay.vcxproj907
-rw-r--r--PCbuild/make_buildinfo.c194
-rw-r--r--PCbuild/make_buildinfo.vcxproj52
-rw-r--r--PCbuild/make_buildinfo.vcxproj.filters14
-rw-r--r--PCbuild/make_versioninfo.vcxproj200
-rw-r--r--PCbuild/make_versioninfo.vcxproj.filters13
-rw-r--r--PCbuild/openssl.props76
-rw-r--r--PCbuild/pcbuild.proj90
-rw-r--r--PCbuild/pcbuild.sln317
-rw-r--r--PCbuild/pginstrument.props38
-rw-r--r--PCbuild/pgupdate.props17
-rw-r--r--PCbuild/prepare_ssl.bat12
-rw-r--r--PCbuild/prepare_ssl.py196
-rw-r--r--PCbuild/pyd.props25
-rw-r--r--PCbuild/pyd_d.props31
-rw-r--r--PCbuild/pyexpat.vcxproj176
-rw-r--r--PCbuild/pylauncher.vcxproj249
-rw-r--r--PCbuild/pyproject.props216
-rw-r--r--PCbuild/python.props168
-rw-r--r--PCbuild/python.vcxproj312
-rw-r--r--PCbuild/python.vcxproj.filters4
-rw-r--r--PCbuild/python3dll.vcxproj205
-rw-r--r--PCbuild/pythoncore.vcxproj436
-rw-r--r--PCbuild/pythoncore.vcxproj.filters21
-rw-r--r--PCbuild/pythonw.vcxproj277
-rw-r--r--PCbuild/pywlauncher.vcxproj189
-rw-r--r--PCbuild/readme.txt234
-rw-r--r--PCbuild/release.props19
-rw-r--r--PCbuild/rt.bat14
-rw-r--r--PCbuild/select.vcxproj174
-rw-r--r--PCbuild/sqlite3.props16
-rw-r--r--PCbuild/sqlite3.vcxproj189
-rw-r--r--PCbuild/ssl.vcxproj221
-rw-r--r--PCbuild/ssleay.vcxproj119
-rw-r--r--PCbuild/tcl.vcxproj91
-rw-r--r--PCbuild/tcltk.props45
-rw-r--r--PCbuild/tix.vcxproj92
-rw-r--r--PCbuild/tk.vcxproj95
-rw-r--r--PCbuild/unicodedata.vcxproj158
-rw-r--r--PCbuild/vs9to10.py56
-rw-r--r--PCbuild/vs9to8.py34
-rw-r--r--PCbuild/winsound.vcxproj158
-rw-r--r--PCbuild/x64.props20
-rw-r--r--PCbuild/xxlimited.vcxproj152
-rw-r--r--Parser/Python.asdl33
-rw-r--r--Parser/asdl.py587
-rwxr-xr-xParser/asdl_c.py67
-rw-r--r--Parser/node.c4
-rw-r--r--Parser/pgen.c5
-rw-r--r--Parser/pgenmain.c7
-rw-r--r--Parser/printgrammar.c5
-rw-r--r--Parser/spark.py849
-rw-r--r--Parser/tokenizer.c76
-rw-r--r--Parser/tokenizer.h7
-rw-r--r--Programs/README1
-rw-r--r--Programs/_freeze_importlib.c (renamed from Modules/_freeze_importlib.c)30
-rw-r--r--Programs/_testembed.c (renamed from Modules/_testembed.c)6
-rw-r--r--Programs/python.c (renamed from Modules/python.c)10
-rw-r--r--Python/Python-ast.c633
-rw-r--r--Python/README1
-rw-r--r--Python/_warnings.c93
-rw-r--r--Python/asdl.c16
-rw-r--r--Python/ast.c538
-rw-r--r--Python/bltinmodule.c968
-rw-r--r--Python/ceval.c630
-rw-r--r--Python/ceval_gil.h24
-rw-r--r--Python/clinic/bltinmodule.c.h663
-rw-r--r--Python/clinic/import.c.h355
-rw-r--r--Python/codecs.c201
-rw-r--r--Python/compile.c723
-rw-r--r--Python/condvar.h6
-rw-r--r--Python/dtoa.c4
-rw-r--r--Python/dynload_aix.c5
-rw-r--r--Python/dynload_dl.c7
-rw-r--r--Python/dynload_hpux.c12
-rw-r--r--Python/dynload_next.c7
-rw-r--r--Python/dynload_shlib.c22
-rw-r--r--Python/dynload_win.c28
-rw-r--r--Python/errors.c85
-rw-r--r--Python/fileutils.c778
-rw-r--r--Python/formatter_unicode.c11
-rw-r--r--Python/frozen.c3
-rw-r--r--Python/frozenmain.c2
-rw-r--r--Python/future.c2
-rw-r--r--Python/getargs.c64
-rw-r--r--Python/graminit.c2525
-rw-r--r--Python/import.c598
-rw-r--r--Python/importdl.c226
-rw-r--r--Python/importdl.h3
-rw-r--r--Python/importlib.h6258
-rw-r--r--Python/importlib_external.h2596
-rw-r--r--Python/marshal.c225
-rw-r--r--Python/modsupport.c123
-rw-r--r--Python/opcode_targets.h30
-rw-r--r--Python/peephole.c17
-rw-r--r--Python/pyfpe.c4
-rw-r--r--Python/pylifecycle.c1597
-rw-r--r--Python/pystate.c74
-rw-r--r--Python/pystrhex.c61
-rw-r--r--Python/pythonrun.c1582
-rw-r--r--Python/pytime.c690
-rw-r--r--Python/random.c186
-rw-r--r--Python/symtable.c123
-rw-r--r--Python/sysmodule.c102
-rw-r--r--Python/thread.c2
-rw-r--r--Python/thread_foobar.h63
-rw-r--r--Python/thread_nt.h2
-rw-r--r--Python/thread_pthread.h10
-rw-r--r--Python/traceback.c41
-rw-r--r--README116
-rw-r--r--Tools/buildbot/buildmsi.bat22
-rw-r--r--Tools/buildbot/test.bat26
-rwxr-xr-xTools/clinic/clinic.py584
-rw-r--r--Tools/clinic/clinic_test.py10
-rwxr-xr-xTools/demo/ss1.py8
-rw-r--r--Tools/freeze/README18
-rw-r--r--Tools/freeze/bkfile.py67
-rw-r--r--Tools/freeze/extensions_win32.ini8
-rwxr-xr-xTools/freeze/freeze.py21
-rw-r--r--Tools/freeze/makefreeze.py54
-rw-r--r--Tools/freeze/makemakefile.py4
-rwxr-xr-xTools/gdb/libpython.py47
-rwxr-xr-xTools/i18n/makelocalealias.py62
-rwxr-xr-xTools/i18n/pygettext.py4
-rw-r--r--Tools/msi/README.txt558
-rw-r--r--Tools/msi/build.bat76
-rw-r--r--Tools/msi/buildrelease.bat228
-rw-r--r--Tools/msi/bundle/Default.thm136
-rw-r--r--Tools/msi/bundle/Default.wxl135
-rw-r--r--Tools/msi/bundle/SideBar.pngbin0 -> 57891 bytes
-rw-r--r--Tools/msi/bundle/bootstrap/LICENSE.txt25
-rw-r--r--Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp3257
-rw-r--r--Tools/msi/bundle/bootstrap/pch.cpp1
-rw-r--r--Tools/msi/bundle/bootstrap/pch.h60
-rw-r--r--Tools/msi/bundle/bootstrap/pythonba.cpp76
-rw-r--r--Tools/msi/bundle/bootstrap/pythonba.def18
-rw-r--r--Tools/msi/bundle/bootstrap/pythonba.sln22
-rw-r--r--Tools/msi/bundle/bootstrap/pythonba.vcxproj69
-rw-r--r--Tools/msi/bundle/bootstrap/resource.h25
-rw-r--r--Tools/msi/bundle/bundle.icobin0 -> 19790 bytes
-rw-r--r--Tools/msi/bundle/bundle.targets116
-rw-r--r--Tools/msi/bundle/bundle.wxl7
-rw-r--r--Tools/msi/bundle/bundle.wxs111
-rw-r--r--Tools/msi/bundle/full.wixproj21
-rw-r--r--Tools/msi/bundle/packagegroups/core.wxs62
-rw-r--r--Tools/msi/bundle/packagegroups/crt.wxs49
-rw-r--r--Tools/msi/bundle/packagegroups/dev.wxs44
-rw-r--r--Tools/msi/bundle/packagegroups/doc.wxs28
-rw-r--r--Tools/msi/bundle/packagegroups/exe.wxs64
-rw-r--r--Tools/msi/bundle/packagegroups/launcher.wxs27
-rw-r--r--Tools/msi/bundle/packagegroups/lib.wxs62
-rw-r--r--Tools/msi/bundle/packagegroups/packageinstall.wxs26
-rw-r--r--Tools/msi/bundle/packagegroups/pip.wxs25
-rw-r--r--Tools/msi/bundle/packagegroups/postinstall.wxs88
-rw-r--r--Tools/msi/bundle/packagegroups/tcltk.wxs68
-rw-r--r--Tools/msi/bundle/packagegroups/test.wxs62
-rw-r--r--Tools/msi/bundle/packagegroups/tools.wxs26
-rw-r--r--Tools/msi/bundle/releaselocal.wixproj21
-rw-r--r--Tools/msi/bundle/releaseweb.wixproj21
-rw-r--r--Tools/msi/bundle/snapshot.wixproj26
-rw-r--r--Tools/msi/common.wxs114
-rw-r--r--Tools/msi/common_en-US.wxl_template17
-rw-r--r--Tools/msi/core/core.wixproj19
-rw-r--r--Tools/msi/core/core.wxs13
-rw-r--r--Tools/msi/core/core_d.wixproj19
-rw-r--r--Tools/msi/core/core_d.wxs14
-rw-r--r--Tools/msi/core/core_en-US.wxl5
-rw-r--r--Tools/msi/core/core_files.wxs31
-rw-r--r--Tools/msi/core/core_pdb.wixproj19
-rw-r--r--Tools/msi/core/core_pdb.wxs14
-rw-r--r--Tools/msi/csv_to_wxs.py127
-rw-r--r--Tools/msi/dev/dev.wixproj49
-rw-r--r--Tools/msi/dev/dev.wxs19
-rw-r--r--Tools/msi/dev/dev_d.wixproj19
-rw-r--r--Tools/msi/dev/dev_d.wxs13
-rw-r--r--Tools/msi/dev/dev_en-US.wxl5
-rw-r--r--Tools/msi/dev/dev_files.wxs42
-rw-r--r--Tools/msi/doc/doc.wixproj30
-rw-r--r--Tools/msi/doc/doc.wxs33
-rw-r--r--Tools/msi/doc/doc_en-US.wxl_template7
-rw-r--r--Tools/msi/doc/doc_files.wxs15
-rw-r--r--Tools/msi/doc/doc_no_files.wxs17
-rw-r--r--Tools/msi/exe/crtlicense.txt (renamed from Tools/msi/crtlicense.txt)7
-rw-r--r--Tools/msi/exe/exe.wixproj43
-rw-r--r--Tools/msi/exe/exe.wxs33
-rw-r--r--Tools/msi/exe/exe_d.wixproj20
-rw-r--r--Tools/msi/exe/exe_d.wxs13
-rw-r--r--Tools/msi/exe/exe_en-US.wxl_template7
-rw-r--r--Tools/msi/exe/exe_files.wxs76
-rw-r--r--Tools/msi/exe/exe_pdb.wixproj20
-rw-r--r--Tools/msi/exe/exe_pdb.wxs13
-rw-r--r--Tools/msi/generate_md5.py27
-rw-r--r--Tools/msi/get_externals.bat27
-rw-r--r--Tools/msi/launcher/launcher.wixproj22
-rw-r--r--Tools/msi/launcher/launcher.wxs43
-rw-r--r--Tools/msi/launcher/launcher_en-US.wxl16
-rw-r--r--Tools/msi/launcher/launcher_files.wxs25
-rw-r--r--Tools/msi/launcher/launcher_reg.wxs46
-rw-r--r--Tools/msi/lib/lib.wixproj34
-rw-r--r--Tools/msi/lib/lib.wxs17
-rw-r--r--Tools/msi/lib/lib_d.wixproj19
-rw-r--r--Tools/msi/lib/lib_d.wxs13
-rw-r--r--Tools/msi/lib/lib_en-US.wxl5
-rw-r--r--Tools/msi/lib/lib_files.wxs79
-rw-r--r--Tools/msi/lib/lib_pdb.wixproj19
-rw-r--r--Tools/msi/lib/lib_pdb.wxs13
-rw-r--r--Tools/msi/make_zip.proj41
-rw-r--r--Tools/msi/make_zip.py201
-rw-r--r--Tools/msi/msi.props171
-rw-r--r--Tools/msi/msi.py1456
-rw-r--r--Tools/msi/msi.targets62
-rw-r--r--Tools/msi/msilib.py679
-rw-r--r--Tools/msi/msisupport.c93
-rw-r--r--Tools/msi/msisupport.mak9
-rw-r--r--Tools/msi/path/path.wixproj19
-rw-r--r--Tools/msi/path/path.wxs39
-rw-r--r--Tools/msi/path/path_en-US.wxl6
-rw-r--r--Tools/msi/pip/pip.wixproj19
-rw-r--r--Tools/msi/pip/pip.wxs39
-rw-r--r--Tools/msi/pip/pip_en-US.wxl6
-rw-r--r--Tools/msi/schema.py1007
-rw-r--r--Tools/msi/sequence.py126
-rw-r--r--Tools/msi/tcltk/tcltk.wixproj50
-rw-r--r--Tools/msi/tcltk/tcltk.wxs66
-rw-r--r--Tools/msi/tcltk/tcltk_d.wixproj28
-rw-r--r--Tools/msi/tcltk/tcltk_d.wxs14
-rw-r--r--Tools/msi/tcltk/tcltk_en-US.wxl_template12
-rw-r--r--Tools/msi/tcltk/tcltk_files.wxs35
-rw-r--r--Tools/msi/tcltk/tcltk_pdb.wixproj19
-rw-r--r--Tools/msi/tcltk/tcltk_pdb.wxs13
-rw-r--r--Tools/msi/tcltk/tcltk_reg.wxs48
-rw-r--r--Tools/msi/test/test.wixproj29
-rw-r--r--Tools/msi/test/test.wxs16
-rw-r--r--Tools/msi/test/test_d.wixproj19
-rw-r--r--Tools/msi/test/test_d.wxs13
-rw-r--r--Tools/msi/test/test_en-US.wxl7
-rw-r--r--Tools/msi/test/test_files.wxs77
-rw-r--r--Tools/msi/test/test_pdb.wixproj19
-rw-r--r--Tools/msi/test/test_pdb.wxs13
-rw-r--r--Tools/msi/testrelease.bat117
-rw-r--r--Tools/msi/tools/tools.wixproj43
-rw-r--r--Tools/msi/tools/tools.wxs15
-rw-r--r--Tools/msi/tools/tools_en-US.wxl5
-rw-r--r--Tools/msi/tools/tools_files.wxs16
-rw-r--r--Tools/msi/uisample.py1400
-rw-r--r--Tools/msi/uploadrelease.bat63
-rw-r--r--Tools/msi/uploadrelease.proj80
-rw-r--r--Tools/msi/wix.props12
-rw-r--r--Tools/parser/unparse.py76
-rw-r--r--Tools/pybench/README14
-rw-r--r--Tools/pynche/README14
-rwxr-xr-xTools/scripts/diff.py34
-rw-r--r--Tools/scripts/dutree.doc6
-rwxr-xr-xTools/scripts/eptags.py2
-rwxr-xr-xTools/scripts/find_recursionlimit.py4
-rwxr-xr-xTools/scripts/findnocoding.py2
-rw-r--r--Tools/scripts/generate_opcode_h.py54
-rw-r--r--Tools/scripts/run_tests.py8
-rw-r--r--Tools/scripts/win_add2path.py3
-rw-r--r--Tools/ssl/sslspeed.vcxproj70
-rw-r--r--Tools/unicode/gencodec.py2
-rw-r--r--Tools/unicode/makeunicodedata.py7
-rw-r--r--Tools/unittestgui/README.txt4
-rw-r--r--aclocal.m44
-rwxr-xr-xconfigure1440
-rw-r--r--configure.ac670
-rw-r--r--pyconfig.h.in34
-rw-r--r--setup.py113
1839 files changed, 181544 insertions, 122194 deletions
diff --git a/.bzrignore b/.bzrignore
index 897084dd04..5847110920 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -1,4 +1,4 @@
-´.purify
+.purify
autom4te.cache
config.log
config.cache
diff --git a/.gitignore b/.gitignore
index 88094351ed..c2b4fc703f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,13 +11,14 @@
*.rej
*.swp
*~
+*.gc??
+*.profclang?
+*.profraw
+*.dyn
.gdb_history
Doc/build/
-Doc/tools/docutils/
-Doc/tools/jinja/
-Doc/tools/jinja2/
-Doc/tools/pygments/
-Doc/tools/sphinx/
+Doc/venv/
+Lib/distutils/command/*.pdb
Lib/lib2to3/*.pickle
Lib/test/data/*
Lib/_sysconfigdata.py
@@ -31,18 +32,31 @@ Modules/Setup.config
Modules/Setup.local
Modules/config.c
Modules/ld_so_aix
-Modules/_freeze_importlib
-Modules/_testembed
-PCbuild/*.bsc
-PCbuild/*.dll
-PCbuild/*.exe
-PCbuild/*.exp
-PCbuild/*.lib
-PCbuild/*.ncb
-PCbuild/*.o
-PCbuild/*.pdb
-PCbuild/Win32-temp-*
+Programs/_freeze_importlib
+Programs/_testembed
+PC/python_nt*.h
+PC/pythonnt_rc*.h
+PC/*/*.exe
+PC/*/*.exp
+PC/*/*.lib
+PC/*/*.bsc
+PC/*/*.dll
+PC/*/*.pdb
+PC/*/*.user
+PC/*/*.ncb
+PC/*/*.suo
+PC/*/Win32-temp-*
+PC/*/x64-temp-*
+PC/*/amd64
+PCbuild/*.user
+PCbuild/*.suo
+PCbuild/*.*sdf
+PCbuild/*-pgi
+PCbuild/*-pgo
+PCbuild/.vs/
PCbuild/amd64/
+PCbuild/obj/
+PCBuild/win32/
.purify
Parser/pgen
__pycache__
@@ -64,6 +78,7 @@ pybuilddir.txt
pyconfig.h
python-config
python-config.py
+python.bat
python.exe
python-gdb.py
python.exe-gdb.py
@@ -75,3 +90,6 @@ TAGS
coverage/
externals/
htmlcov/
+Tools/msi/obj
+Tools/ssl/amd64
+Tools/ssl/win32
diff --git a/.hgignore b/.hgignore
index 9e5a583361..58c73fc99e 100644
--- a/.hgignore
+++ b/.hgignore
@@ -9,6 +9,7 @@ TAGS$
autom4te.cache$
^build/
^Doc/build/
+^Doc/venv/
buildno$
config.cache
config.log
@@ -18,6 +19,7 @@ db_home
platform$
pyconfig.h$
python$
+python.bat$
python.exe$
python-config$
python-config.py$
@@ -48,13 +50,16 @@ libpython*.so*
*.pyd
*.cover
*~
+*.gc??
+*.profclang?
+*.profraw
+*.dyn
+Lib/distutils/command/*.pdb
Lib/lib2to3/*.pickle
Lib/test/data/*
Misc/*.wpu
PC/python_nt*.h
PC/pythonnt_rc*.h
-PC/*.obj
-PC/*.exe
PC/*/*.exe
PC/*/*.exp
PC/*/*.lib
@@ -67,29 +72,21 @@ PC/*/*.suo
PC/*/Win32-temp-*
PC/*/x64-temp-*
PC/*/amd64
-PCbuild/*.exe
-PCbuild/*.dll
-PCbuild/*.pdb
-PCbuild/*.lib
-PCbuild/*.exp
-PCbuild/*.o
-PCbuild/*.ncb
-PCbuild/*.bsc
PCbuild/*.user
PCbuild/*.suo
PCbuild/*.*sdf
-PCbuild/Win32-temp-*
-PCbuild/x64-temp-*
PCbuild/*-pgi
PCbuild/*-pgo
+PCbuild/.vs
PCbuild/amd64
-PCbuild/ipch
+PCbuild/obj
+PCbuild/win32
Tools/unicode/build/
Tools/unicode/MAPPINGS/
BuildLog.htm
__pycache__
-Modules/_freeze_importlib
-Modules/_testembed
+Programs/_freeze_importlib
+Programs/_testembed
.coverage
coverage/
externals/
@@ -98,3 +95,6 @@ htmlcov/
*.gcno
*.gcov
coverage.info
+Tools/msi/obj
+Tools/ssl/amd64
+Tools/ssl/win32
diff --git a/.hgtouch b/.hgtouch
index 7e3a5e7370..b9be0f11fd 100644
--- a/.hgtouch
+++ b/.hgtouch
@@ -2,7 +2,9 @@
# Define dependencies of generated files that are checked into hg.
# The syntax of this file uses make rule dependencies, without actions
-Python/importlib.h: Lib/importlib/_bootstrap.py Modules/_freeze_importlib.c
+Python/importlib.h: Lib/importlib/_bootstrap.py Programs/_freeze_importlib.c
+
+Include/opcode.h: Lib/opcode.py Tools/scripts/generate_opcode_h.py
Include/Python-ast.h: Parser/Python.asdl Parser/asdl.py Parser/asdl_c.py
Python/Python-ast.c: Include/Python-ast.h
diff --git a/Doc/Makefile b/Doc/Makefile
index ea3023157d..a42e98bd9c 100644
--- a/Doc/Makefile
+++ b/Doc/Makefile
@@ -15,11 +15,12 @@ ALLSPHINXOPTS = -b $(BUILDER) -d build/doctrees -D latex_paper_size=$(PAPER) \
.PHONY: help build html htmlhelp latex text changes linkcheck \
suspicious coverage doctest pydoc-topics htmlview clean dist check serve \
- autobuild-dev autobuild-stable
+ autobuild-dev autobuild-stable venv
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " clean to remove build files"
+ @echo " venv to create a venv with necessary tools"
@echo " html to make standalone HTML files"
@echo " htmlview to open the index page built by the html target in your browser"
@echo " htmlhelp to make HTML files and a HTML help project"
@@ -95,14 +96,18 @@ doctest:
pydoc-topics: BUILDER = pydoc-topics
pydoc-topics: build
- @echo "Building finished; now copy build/pydoc-topics/topics.py" \
- "to ../Lib/pydoc_data/topics.py"
+ @echo "Building finished; now run this:" \
+ "cp build/pydoc-topics/topics.py ../Lib/pydoc_data/topics.py"
htmlview: html
$(PYTHON) -c "import webbrowser; webbrowser.open('build/html/index.html')"
clean:
- -rm -rf build/*
+ -rm -rf build/* venv/*
+
+venv:
+ $(PYTHON) -m venv venv
+ ./venv/bin/python3 -m pip install -U Sphinx
dist:
rm -rf dist
@@ -172,4 +177,3 @@ autobuild-stable:
exit 1;; \
esac
@make autobuild-dev
-
diff --git a/Doc/README.txt b/Doc/README.txt
index f985e6e3a8..4f8e9f8f14 100644
--- a/Doc/README.txt
+++ b/Doc/README.txt
@@ -3,7 +3,7 @@ Python Documentation README
This directory contains the reStructuredText (reST) sources to the Python
documentation. You don't need to build them yourself, prebuilt versions are
-available at <https://docs.python.org/3.4/download.html>.
+available at <https://docs.python.org/dev/download.html>.
Documentation on authoring Python documentation, including information about
both style and markup, is available in the "Documenting Python" chapter of the
diff --git a/Doc/bugs.rst b/Doc/bugs.rst
index f01ae0e390..1b0a5a9a93 100644
--- a/Doc/bugs.rst
+++ b/Doc/bugs.rst
@@ -1,13 +1,16 @@
.. _reporting-bugs:
-**************
-Reporting Bugs
-**************
+*****************
+Dealing with Bugs
+*****************
Python is a mature programming language which has established a reputation for
stability. In order to maintain this reputation, the developers would like to
know of any deficiencies you find in Python.
+It can be sometimes faster to fix bugs yourself and contribute patches to
+Python as it streamlines the process and involves less people. Learn how to
+:ref:`contribute <contributing-to-python>`.
Documentation bugs
==================
@@ -16,7 +19,8 @@ If you find a bug in this documentation or would like to propose an improvement,
please submit a bug report on the :ref:`tracker <using-the-tracker>`. If you
have a suggestion how to fix it, include that as well.
-If you're short on time, you can also email your bug report to docs@python.org.
+If you're short on time, you can also email documentation bug reports to
+docs@python.org (behavioral bugs can be sent to python-list@python.org).
'docs@' is a mailing list run by volunteers; your request will be noticed,
though it may take a while to be processed.
@@ -72,6 +76,7 @@ taken on the bug.
Information about writing a good bug report. Some of this is specific to the
Mozilla project, but describes general good practices.
+.. _contributing-to-python:
Getting started contributing to Python yourself
===============================================
diff --git a/Doc/c-api/arg.rst b/Doc/c-api/arg.rst
index 8427bc4d13..983d113f0a 100644
--- a/Doc/c-api/arg.rst
+++ b/Doc/c-api/arg.rst
@@ -30,7 +30,7 @@ variable(s) whose address should be passed.
Strings and buffers
-------------------
-These formats allow to access an object as a contiguous chunk of memory.
+These formats allow accessing an object as a contiguous chunk of memory.
You don't have to provide raw storage for the returned unicode or bytes
area. Also, you won't have to release any memory yourself, except with the
``es``, ``es#``, ``et`` and ``et#`` formats.
@@ -152,7 +152,7 @@ Unless otherwise stated, buffers are not NUL-terminated.
any conversion. Raises :exc:`TypeError` if the object is not a Unicode
object. The C variable may also be declared as :c:type:`PyObject\*`.
-``w*`` (:class:`bytearray` or read-write byte-oriented buffer) [Py_buffer]
+``w*`` (read-write :term:`bytes-like object`) [Py_buffer]
This format accepts any object which implements the read-write buffer
interface. It fills a :c:type:`Py_buffer` structure provided by the caller.
The buffer may contain embedded null bytes. The caller have to call
@@ -206,7 +206,8 @@ Unless otherwise stated, buffers are not NUL-terminated.
:c:func:`PyArg_ParseTuple` will use this location as the buffer and interpret the
initial value of *\*buffer_length* as the buffer size. It will then copy the
encoded data into the buffer and NUL-terminate it. If the buffer is not large
- enough, a :exc:`ValueError` will be set.
+ enough, a :exc:`TypeError` will be set.
+ Note: starting from Python 3.6 a :exc:`ValueError` will be set.
In both cases, *\*buffer_length* is set to the length of the encoded data
without the trailing NUL byte.
diff --git a/Doc/c-api/buffer.rst b/Doc/c-api/buffer.rst
index 7361099123..45c94887ed 100644
--- a/Doc/c-api/buffer.rst
+++ b/Doc/c-api/buffer.rst
@@ -96,8 +96,8 @@ a buffer, see :c:func:`PyObject_GetBuffer`.
block of the exporter. For example, with negative :c:member:`~Py_buffer.strides`
the value may point to the end of the memory block.
- For contiguous arrays, the value points to the beginning of the memory
- block.
+ For :term:`contiguous` arrays, the value points to the beginning of
+ the memory block.
.. c:member:: void \*obj
@@ -281,11 +281,14 @@ of the flags below it.
+-----------------------------+-------+---------+------------+
+.. index:: contiguous, C-contiguous, Fortran contiguous
+
contiguity requests
~~~~~~~~~~~~~~~~~~~
-C or Fortran contiguity can be explicitly requested, with and without stride
-information. Without stride information, the buffer must be C-contiguous.
+C or Fortran :term:`contiguity <contiguous>` can be explicitly requested,
+with and without stride information. Without stride information, the buffer
+must be C-contiguous.
.. tabularcolumns:: |p{0.35\linewidth}|l|l|l|l|
@@ -466,13 +469,13 @@ Buffer-related functions
.. c:function:: int PyBuffer_IsContiguous(Py_buffer *view, char order)
Return 1 if the memory defined by the *view* is C-style (*order* is
- ``'C'``) or Fortran-style (*order* is ``'F'``) contiguous or either one
+ ``'C'``) or Fortran-style (*order* is ``'F'``) :term:`contiguous` or either one
(*order* is ``'A'``). Return 0 otherwise.
.. c:function:: void PyBuffer_FillContiguousStrides(int ndim, Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t itemsize, char order)
- Fill the *strides* array with byte-strides of a contiguous (C-style if
+ Fill the *strides* array with byte-strides of a :term:`contiguous` (C-style if
*order* is ``'C'`` or Fortran-style if *order* is ``'F'``) array of the
given shape with the given number of bytes per element.
diff --git a/Doc/c-api/code.rst b/Doc/c-api/code.rst
index 9c93563382..10d89f297c 100644
--- a/Doc/c-api/code.rst
+++ b/Doc/c-api/code.rst
@@ -2,15 +2,13 @@
.. _codeobjects:
+.. index:: object; code, code object
+
Code Objects
------------
.. sectionauthor:: Jeffrey Yasskin <jyasskin@gmail.com>
-
-.. index::
- object: code
-
Code objects are a low-level detail of the CPython implementation.
Each one represents a chunk of executable code that hasn't yet been
bound into a function.
diff --git a/Doc/c-api/codec.rst b/Doc/c-api/codec.rst
index 83252afbb7..dfe3d436e5 100644
--- a/Doc/c-api/codec.rst
+++ b/Doc/c-api/codec.rst
@@ -116,3 +116,8 @@ Registry API for Unicode encoding error handlers
Replace the unicode encode error with backslash escapes (``\x``, ``\u`` and
``\U``).
+.. c:function:: PyObject* PyCodec_NameReplaceErrors(PyObject *exc)
+
+ Replace the unicode encode error with ``\N{...}`` escapes.
+
+ .. versionadded:: 3.5
diff --git a/Doc/c-api/concrete.rst b/Doc/c-api/concrete.rst
index 2d5638670e..47dab81891 100644
--- a/Doc/c-api/concrete.rst
+++ b/Doc/c-api/concrete.rst
@@ -112,5 +112,6 @@ Other Objects
weakref.rst
capsule.rst
gen.rst
+ coro.rst
datetime.rst
diff --git a/Doc/c-api/coro.rst b/Doc/c-api/coro.rst
new file mode 100644
index 0000000000..2fe50b5d8c
--- /dev/null
+++ b/Doc/c-api/coro.rst
@@ -0,0 +1,34 @@
+.. highlightlang:: c
+
+.. _coro-objects:
+
+Coroutine Objects
+-----------------
+
+.. versionadded:: 3.5
+
+Coroutine objects are what functions declared with an ``async`` keyword
+return.
+
+
+.. c:type:: PyCoroObject
+
+ The C structure used for coroutine objects.
+
+
+.. c:var:: PyTypeObject PyCoro_Type
+
+ The type object corresponding to coroutine objects.
+
+
+.. c:function:: int PyCoro_CheckExact(PyObject *ob)
+
+ Return true if *ob*'s type is *PyCoro_Type*; *ob* must not be *NULL*.
+
+
+.. c:function:: PyObject* PyCoro_New(PyFrameObject *frame, PyObject *name, PyObject *qualname)
+
+ Create and return a new coroutine object based on the *frame* object,
+ with ``__name__`` and ``__qualname__`` set to *name* and *qualname*.
+ A reference to *frame* is stolen by this function. The *frame* argument
+ must not be *NULL*.
diff --git a/Doc/c-api/exceptions.rst b/Doc/c-api/exceptions.rst
index c2df767998..19cbb3bcb8 100644
--- a/Doc/c-api/exceptions.rst
+++ b/Doc/c-api/exceptions.rst
@@ -9,13 +9,19 @@ Exception Handling
The functions described in this chapter will let you handle and raise Python
exceptions. It is important to understand some of the basics of Python
-exception handling. It works somewhat like the Unix :c:data:`errno` variable:
+exception handling. It works somewhat like the POSIX :c:data:`errno` variable:
there is a global indicator (per thread) of the last error that occurred. Most
-functions don't clear this on success, but will set it to indicate the cause of
-the error on failure. Most functions also return an error indicator, usually
-*NULL* if they are supposed to return a pointer, or ``-1`` if they return an
-integer (exception: the :c:func:`PyArg_\*` functions return ``1`` for success and
-``0`` for failure).
+C API functions don't clear this on success, but will set it to indicate the
+cause of the error on failure. Most C API functions also return an error
+indicator, usually *NULL* if they are supposed to return a pointer, or ``-1``
+if they return an integer (exception: the :c:func:`PyArg_\*` functions
+return ``1`` for success and ``0`` for failure).
+
+Concretely, the error indicator consists of three object pointers: the
+exception's type, the exception's value, and the traceback object. Any
+of those pointers can be NULL if non-set (although some combinations are
+forbidden, for example you can't have a non-NULL traceback if the exception
+type is NULL).
When a function must fail because some function it called failed, it generally
doesn't set the error indicator; the function it called already set it. It is
@@ -27,12 +33,21 @@ the caller that an error has been set. If the error is not handled or carefully
propagated, additional calls into the Python/C API may not behave as intended
and may fail in mysterious ways.
-The error indicator consists of three Python objects corresponding to the result
-of ``sys.exc_info()``. API functions exist to interact with the error indicator
-in various ways. There is a separate error indicator for each thread.
+.. note::
+ The error indicator is **not** the result of :func:`sys.exc_info()`.
+ The former corresponds to an exception that is not yet caught (and is
+ therefore still propagating), while the latter returns an exception after
+ it is caught (and has therefore stopped propagating).
-.. XXX Order of these should be more thoughtful.
- Either alphabetical or some kind of structure.
+
+Printing and clearing
+=====================
+
+
+.. c:function:: void PyErr_Clear()
+
+ Clear the error indicator. If the error indicator is not set, there is no
+ effect.
.. c:function:: void PyErr_PrintEx(int set_sys_last_vars)
@@ -51,127 +66,24 @@ in various ways. There is a separate error indicator for each thread.
Alias for ``PyErr_PrintEx(1)``.
-.. c:function:: PyObject* PyErr_Occurred()
-
- Test whether the error indicator is set. If set, return the exception *type*
- (the first argument to the last call to one of the :c:func:`PyErr_Set\*`
- functions or to :c:func:`PyErr_Restore`). If not set, return *NULL*. You do not
- own a reference to the return value, so you do not need to :c:func:`Py_DECREF`
- it.
-
- .. note::
-
- Do not compare the return value to a specific exception; use
- :c:func:`PyErr_ExceptionMatches` instead, shown below. (The comparison could
- easily fail since the exception may be an instance instead of a class, in the
- case of a class exception, or it may be a subclass of the expected exception.)
-
-
-.. c:function:: int PyErr_ExceptionMatches(PyObject *exc)
-
- Equivalent to ``PyErr_GivenExceptionMatches(PyErr_Occurred(), exc)``. This
- should only be called when an exception is actually set; a memory access
- violation will occur if no exception has been raised.
-
-
-.. c:function:: int PyErr_GivenExceptionMatches(PyObject *given, PyObject *exc)
-
- Return true if the *given* exception matches the exception in *exc*. If
- *exc* is a class object, this also returns true when *given* is an instance
- of a subclass. If *exc* is a tuple, all exceptions in the tuple (and
- recursively in subtuples) are searched for a match.
-
-
-.. c:function:: void PyErr_NormalizeException(PyObject**exc, PyObject**val, PyObject**tb)
-
- Under certain circumstances, the values returned by :c:func:`PyErr_Fetch` below
- can be "unnormalized", meaning that ``*exc`` is a class object but ``*val`` is
- not an instance of the same class. This function can be used to instantiate
- the class in that case. If the values are already normalized, nothing happens.
- The delayed normalization is implemented to improve performance.
-
- .. note::
-
- This function *does not* implicitly set the ``__traceback__``
- attribute on the exception value. If setting the traceback
- appropriately is desired, the following additional snippet is needed::
-
- if (tb != NULL) {
- PyException_SetTraceback(val, tb);
- }
-
-
-.. c:function:: void PyErr_Clear()
-
- Clear the error indicator. If the error indicator is not set, there is no
- effect.
-
-
-.. c:function:: void PyErr_Fetch(PyObject **ptype, PyObject **pvalue, PyObject **ptraceback)
-
- Retrieve the error indicator into three variables whose addresses are passed.
- If the error indicator is not set, set all three variables to *NULL*. If it is
- set, it will be cleared and you own a reference to each object retrieved. The
- value and traceback object may be *NULL* even when the type object is not.
-
- .. note::
-
- This function is normally only used by code that needs to handle exceptions or
- by code that needs to save and restore the error indicator temporarily.
-
-
-.. c:function:: void PyErr_Restore(PyObject *type, PyObject *value, PyObject *traceback)
-
- Set the error indicator from the three objects. If the error indicator is
- already set, it is cleared first. If the objects are *NULL*, the error
- indicator is cleared. Do not pass a *NULL* type and non-*NULL* value or
- traceback. The exception type should be a class. Do not pass an invalid
- exception type or value. (Violating these rules will cause subtle problems
- later.) This call takes away a reference to each object: you must own a
- reference to each object before the call and after the call you no longer own
- these references. (If you don't understand this, don't use this function. I
- warned you.)
-
- .. note::
-
- This function is normally only used by code that needs to save and restore the
- error indicator temporarily; use :c:func:`PyErr_Fetch` to save the current
- exception state.
-
-
-.. c:function:: void PyErr_GetExcInfo(PyObject **ptype, PyObject **pvalue, PyObject **ptraceback)
-
- Retrieve the exception info, as known from ``sys.exc_info()``. This refers
- to an exception that was already caught, not to an exception that was
- freshly raised. Returns new references for the three objects, any of which
- may be *NULL*. Does not modify the exception info state.
-
- .. note::
-
- This function is not normally used by code that wants to handle exceptions.
- Rather, it can be used when code needs to save and restore the exception
- state temporarily. Use :c:func:`PyErr_SetExcInfo` to restore or clear the
- exception state.
-
- .. versionadded:: 3.3
-
+.. c:function:: void PyErr_WriteUnraisable(PyObject *obj)
-.. c:function:: void PyErr_SetExcInfo(PyObject *type, PyObject *value, PyObject *traceback)
+ This utility function prints a warning message to ``sys.stderr`` when an
+ exception has been set but it is impossible for the interpreter to actually
+ raise the exception. It is used, for example, when an exception occurs in an
+ :meth:`__del__` method.
- Set the exception info, as known from ``sys.exc_info()``. This refers
- to an exception that was already caught, not to an exception that was
- freshly raised. This function steals the references of the arguments.
- To clear the exception state, pass *NULL* for all three arguments.
- For general rules about the three arguments, see :c:func:`PyErr_Restore`.
+ The function is called with a single argument *obj* that identifies the context
+ in which the unraisable exception occurred. If possible,
+ the repr of *obj* will be printed in the warning message.
- .. note::
- This function is not normally used by code that wants to handle exceptions.
- Rather, it can be used when code needs to save and restore the exception
- state temporarily. Use :c:func:`PyErr_GetExcInfo` to read the exception
- state.
+Raising exceptions
+==================
- .. versionadded:: 3.3
+These functions help you set the current thread's error indicator.
+For convenience, some of these functions will always return a
+NULL pointer for use in a ``return`` statement.
.. c:function:: void PyErr_SetString(PyObject *type, const char *message)
@@ -197,6 +109,14 @@ in various ways. There is a separate error indicator for each thread.
string.
+.. c:function:: PyObject* PyErr_FormatV(PyObject *exception, const char *format, va_list vargs)
+
+ Same as :c:func:`PyErr_Format`, but taking a :c:type:`va_list` argument rather
+ than a variable number of arguments.
+
+ .. versionadded:: 3.5
+
+
.. c:function:: void PyErr_SetNone(PyObject *type)
This is a shorthand for ``PyErr_SetObject(type, Py_None)``.
@@ -346,27 +266,31 @@ in various ways. There is a separate error indicator for each thread.
use.
+Issuing warnings
+================
+
+Use these functions to issue warnings from C code. They mirror similar
+functions exported by the Python :mod:`warnings` module. They normally
+print a warning message to *sys.stderr*; however, it is
+also possible that the user has specified that warnings are to be turned into
+errors, and in that case they will raise an exception. It is also possible that
+the functions raise an exception because of a problem with the warning machinery.
+The return value is ``0`` if no exception is raised, or ``-1`` if an exception
+is raised. (It is not possible to determine whether a warning message is
+actually printed, nor what the reason is for the exception; this is
+intentional.) If an exception is raised, the caller should do its normal
+exception handling (for example, :c:func:`Py_DECREF` owned references and return
+an error value).
+
.. c:function:: int PyErr_WarnEx(PyObject *category, const char *message, Py_ssize_t stack_level)
Issue a warning message. The *category* argument is a warning category (see
- below) or *NULL*; the *message* argument is an UTF-8 encoded string. *stack_level* is a
+ below) or *NULL*; the *message* argument is a UTF-8 encoded string. *stack_level* is a
positive number giving a number of stack frames; the warning will be issued from
the currently executing line of code in that stack frame. A *stack_level* of 1
is the function calling :c:func:`PyErr_WarnEx`, 2 is the function above that,
and so forth.
- This function normally prints a warning message to *sys.stderr*; however, it is
- also possible that the user has specified that warnings are to be turned into
- errors, and in that case this will raise an exception. It is also possible that
- the function raises an exception because of a problem with the warning machinery
- (the implementation imports the :mod:`warnings` module to do the heavy lifting).
- The return value is ``0`` if no exception is raised, or ``-1`` if an exception
- is raised. (It is not possible to determine whether a warning message is
- actually printed, nor what the reason is for the exception; this is
- intentional.) If an exception is raised, the caller should do its normal
- exception handling (for example, :c:func:`Py_DECREF` owned references and return
- an error value).
-
Warning categories must be subclasses of :c:data:`Warning`; the default warning
category is :c:data:`RuntimeWarning`. The standard Python warning categories are
available as global variables whose names are ``PyExc_`` followed by the Python
@@ -410,6 +334,139 @@ in various ways. There is a separate error indicator for each thread.
.. versionadded:: 3.2
+Querying the error indicator
+============================
+
+.. c:function:: PyObject* PyErr_Occurred()
+
+ Test whether the error indicator is set. If set, return the exception *type*
+ (the first argument to the last call to one of the :c:func:`PyErr_Set\*`
+ functions or to :c:func:`PyErr_Restore`). If not set, return *NULL*. You do not
+ own a reference to the return value, so you do not need to :c:func:`Py_DECREF`
+ it.
+
+ .. note::
+
+ Do not compare the return value to a specific exception; use
+ :c:func:`PyErr_ExceptionMatches` instead, shown below. (The comparison could
+ easily fail since the exception may be an instance instead of a class, in the
+ case of a class exception, or it may be a subclass of the expected exception.)
+
+
+.. c:function:: int PyErr_ExceptionMatches(PyObject *exc)
+
+ Equivalent to ``PyErr_GivenExceptionMatches(PyErr_Occurred(), exc)``. This
+ should only be called when an exception is actually set; a memory access
+ violation will occur if no exception has been raised.
+
+
+.. c:function:: int PyErr_GivenExceptionMatches(PyObject *given, PyObject *exc)
+
+ Return true if the *given* exception matches the exception type in *exc*. If
+ *exc* is a class object, this also returns true when *given* is an instance
+ of a subclass. If *exc* is a tuple, all exception types in the tuple (and
+ recursively in subtuples) are searched for a match.
+
+
+.. c:function:: void PyErr_Fetch(PyObject **ptype, PyObject **pvalue, PyObject **ptraceback)
+
+ Retrieve the error indicator into three variables whose addresses are passed.
+ If the error indicator is not set, set all three variables to *NULL*. If it is
+ set, it will be cleared and you own a reference to each object retrieved. The
+ value and traceback object may be *NULL* even when the type object is not.
+
+ .. note::
+
+ This function is normally only used by code that needs to catch exceptions or
+ by code that needs to save and restore the error indicator temporarily, e.g.::
+
+ {
+ PyObject **type, **value, **traceback;
+ PyErr_Fetch(&type, &value, &traceback);
+
+ /* ... code that might produce other errors ... */
+
+ PyErr_Restore(type, value, traceback);
+ }
+
+
+.. c:function:: void PyErr_Restore(PyObject *type, PyObject *value, PyObject *traceback)
+
+ Set the error indicator from the three objects. If the error indicator is
+ already set, it is cleared first. If the objects are *NULL*, the error
+ indicator is cleared. Do not pass a *NULL* type and non-*NULL* value or
+ traceback. The exception type should be a class. Do not pass an invalid
+ exception type or value. (Violating these rules will cause subtle problems
+ later.) This call takes away a reference to each object: you must own a
+ reference to each object before the call and after the call you no longer own
+ these references. (If you don't understand this, don't use this function. I
+ warned you.)
+
+ .. note::
+
+ This function is normally only used by code that needs to save and restore the
+ error indicator temporarily. Use :c:func:`PyErr_Fetch` to save the current
+ error indicator.
+
+
+.. c:function:: void PyErr_NormalizeException(PyObject**exc, PyObject**val, PyObject**tb)
+
+ Under certain circumstances, the values returned by :c:func:`PyErr_Fetch` below
+ can be "unnormalized", meaning that ``*exc`` is a class object but ``*val`` is
+ not an instance of the same class. This function can be used to instantiate
+ the class in that case. If the values are already normalized, nothing happens.
+ The delayed normalization is implemented to improve performance.
+
+ .. note::
+
+ This function *does not* implicitly set the ``__traceback__``
+ attribute on the exception value. If setting the traceback
+ appropriately is desired, the following additional snippet is needed::
+
+ if (tb != NULL) {
+ PyException_SetTraceback(val, tb);
+ }
+
+
+.. c:function:: void PyErr_GetExcInfo(PyObject **ptype, PyObject **pvalue, PyObject **ptraceback)
+
+ Retrieve the exception info, as known from ``sys.exc_info()``. This refers
+ to an exception that was *already caught*, not to an exception that was
+ freshly raised. Returns new references for the three objects, any of which
+ may be *NULL*. Does not modify the exception info state.
+
+ .. note::
+
+ This function is not normally used by code that wants to handle exceptions.
+ Rather, it can be used when code needs to save and restore the exception
+ state temporarily. Use :c:func:`PyErr_SetExcInfo` to restore or clear the
+ exception state.
+
+ .. versionadded:: 3.3
+
+
+.. c:function:: void PyErr_SetExcInfo(PyObject *type, PyObject *value, PyObject *traceback)
+
+ Set the exception info, as known from ``sys.exc_info()``. This refers
+ to an exception that was *already caught*, not to an exception that was
+ freshly raised. This function steals the references of the arguments.
+ To clear the exception state, pass *NULL* for all three arguments.
+ For general rules about the three arguments, see :c:func:`PyErr_Restore`.
+
+ .. note::
+
+ This function is not normally used by code that wants to handle exceptions.
+ Rather, it can be used when code needs to save and restore the exception
+ state temporarily. Use :c:func:`PyErr_GetExcInfo` to read the exception
+ state.
+
+ .. versionadded:: 3.3
+
+
+Signal Handling
+===============
+
+
.. c:function:: int PyErr_CheckSignals()
.. index::
@@ -443,13 +500,21 @@ in various ways. There is a separate error indicator for each thread.
.. c:function:: int PySignal_SetWakeupFd(int fd)
- This utility function specifies a file descriptor to which a ``'\0'`` byte will
- be written whenever a signal is received. It returns the previous such file
- descriptor. The value ``-1`` disables the feature; this is the initial state.
+ This utility function specifies a file descriptor to which the signal number
+ is written as a single byte whenever a signal is received. *fd* must be
+ non-blocking. It returns the previous such file descriptor.
+
+ The value ``-1`` disables the feature; this is the initial state.
This is equivalent to :func:`signal.set_wakeup_fd` in Python, but without any
error checking. *fd* should be a valid file descriptor. The function should
only be called from the main thread.
+ .. versionchanged:: 3.5
+ On Windows, the function now also supports socket handles.
+
+
+Exception Classes
+=================
.. c:function:: PyObject* PyErr_NewException(const char *name, PyObject *base, PyObject *dict)
@@ -475,18 +540,6 @@ in various ways. There is a separate error indicator for each thread.
.. versionadded:: 3.2
-.. c:function:: void PyErr_WriteUnraisable(PyObject *obj)
-
- This utility function prints a warning message to ``sys.stderr`` when an
- exception has been set but it is impossible for the interpreter to actually
- raise the exception. It is used, for example, when an exception occurs in an
- :meth:`__del__` method.
-
- The function is called with a single argument *obj* that identifies the context
- in which the unraisable exception occurred. The repr of *obj* will be printed in
- the warning message.
-
-
Exception Objects
=================
@@ -556,7 +609,7 @@ The following functions are used to create and modify Unicode exceptions from C.
.. c:function:: PyObject* PyUnicodeTranslateError_Create(const Py_UNICODE *object, Py_ssize_t length, Py_ssize_t start, Py_ssize_t end, const char *reason)
Create a :class:`UnicodeTranslateError` object with the attributes *object*,
- *length*, *start*, *end* and *reason*. *reason* is an UTF-8 encoded string.
+ *length*, *start*, *end* and *reason*. *reason* is a UTF-8 encoded string.
.. c:function:: PyObject* PyUnicodeDecodeError_GetEncoding(PyObject *exc)
PyObject* PyUnicodeEncodeError_GetEncoding(PyObject *exc)
@@ -630,12 +683,12 @@ recursion depth automatically).
sets a :exc:`MemoryError` and returns a nonzero value.
The function then checks if the recursion limit is reached. If this is the
- case, a :exc:`RuntimeError` is set and a nonzero value is returned.
+ case, a :exc:`RecursionError` is set and a nonzero value is returned.
Otherwise, zero is returned.
*where* should be a string such as ``" in instance check"`` to be
- concatenated to the :exc:`RuntimeError` message caused by the recursion depth
- limit.
+ concatenated to the :exc:`RecursionError` message caused by the recursion
+ depth limit.
.. c:function:: void Py_LeaveRecursiveCall()
@@ -747,6 +800,8 @@ the variables:
+-----------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_ProcessLookupError` | :exc:`ProcessLookupError` | |
+-----------------------------------------+---------------------------------+----------+
+| :c:data:`PyExc_RecursionError` | :exc:`RecursionError` | |
++-----------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_ReferenceError` | :exc:`ReferenceError` | \(2) |
+-----------------------------------------+---------------------------------+----------+
| :c:data:`PyExc_RuntimeError` | :exc:`RuntimeError` | |
@@ -776,6 +831,9 @@ the variables:
:c:data:`PyExc_PermissionError`, :c:data:`PyExc_ProcessLookupError`
and :c:data:`PyExc_TimeoutError` were introduced following :pep:`3151`.
+.. versionadded:: 3.5
+ :c:data:`PyExc_RecursionError`.
+
These are compatibility aliases to :c:data:`PyExc_OSError`:
@@ -824,6 +882,7 @@ These are compatibility aliases to :c:data:`PyExc_OSError`:
single: PyExc_OverflowError
single: PyExc_PermissionError
single: PyExc_ProcessLookupError
+ single: PyExc_RecursionError
single: PyExc_ReferenceError
single: PyExc_RuntimeError
single: PyExc_SyntaxError
diff --git a/Doc/c-api/function.rst b/Doc/c-api/function.rst
index ad9832233f..17279c732a 100644
--- a/Doc/c-api/function.rst
+++ b/Doc/c-api/function.rst
@@ -34,13 +34,14 @@ There are a few functions specific to Python functions.
Return a new function object associated with the code object *code*. *globals*
must be a dictionary with the global variables accessible to the function.
- The function's docstring, name and *__module__* are retrieved from the code
- object, the argument defaults and closure are set to *NULL*.
+ The function's docstring and name are retrieved from the code object. *__module__*
+ is retrieved from *globals*. The argument defaults, annotations and closure are
+ set to *NULL*. *__qualname__* is set to the same value as the function's name.
.. c:function:: PyObject* PyFunction_NewWithQualName(PyObject *code, PyObject *globals, PyObject *qualname)
- As :c:func:`PyFunction_New`, but also allows to set the function object's
+ As :c:func:`PyFunction_New`, but also allows setting the function object's
``__qualname__`` attribute. *qualname* should be a unicode object or NULL;
if NULL, the ``__qualname__`` attribute is set to the same value as its
``__name__`` attribute.
diff --git a/Doc/c-api/gcsupport.rst b/Doc/c-api/gcsupport.rst
index 9f6ad85226..f5e0d7ec9c 100644
--- a/Doc/c-api/gcsupport.rst
+++ b/Doc/c-api/gcsupport.rst
@@ -126,9 +126,10 @@ must name its arguments exactly *visit* and *arg*:
.. c:function:: void Py_VISIT(PyObject *o)
- Call the *visit* callback, with arguments *o* and *arg*. If *visit* returns
- a non-zero value, then return it. Using this macro, :c:member:`~PyTypeObject.tp_traverse`
- handlers look like::
+ If *o* is not *NULL*, call the *visit* callback, with arguments *o*
+ and *arg*. If *visit* returns a non-zero value, then return it.
+ Using this macro, :c:member:`~PyTypeObject.tp_traverse` handlers
+ look like::
static int
my_traverse(Noddy *self, visitproc visit, void *arg)
diff --git a/Doc/c-api/gen.rst b/Doc/c-api/gen.rst
index 0c851a75ef..1efbae4fcb 100644
--- a/Doc/c-api/gen.rst
+++ b/Doc/c-api/gen.rst
@@ -7,7 +7,7 @@ Generator Objects
Generator objects are what Python uses to implement generator iterators. They
are normally created by iterating over a function that yields values, rather
-than explicitly calling :c:func:`PyGen_New`.
+than explicitly calling :c:func:`PyGen_New` or :c:func:`PyGen_NewWithQualName`.
.. c:type:: PyGenObject
@@ -20,19 +20,25 @@ than explicitly calling :c:func:`PyGen_New`.
The type object corresponding to generator objects.
-.. c:function:: int PyGen_Check(ob)
+.. c:function:: int PyGen_Check(PyObject *ob)
Return true if *ob* is a generator object; *ob* must not be *NULL*.
-.. c:function:: int PyGen_CheckExact(ob)
+.. c:function:: int PyGen_CheckExact(PyObject *ob)
- Return true if *ob*'s type is *PyGen_Type* is a generator object; *ob* must not
- be *NULL*.
+ Return true if *ob*'s type is *PyGen_Type*; *ob* must not be *NULL*.
.. c:function:: PyObject* PyGen_New(PyFrameObject *frame)
- Create and return a new generator object based on the *frame* object. A
- reference to *frame* is stolen by this function. The parameter must not be
+ Create and return a new generator object based on the *frame* object.
+ A reference to *frame* is stolen by this function. The argument must not be
*NULL*.
+
+.. c:function:: PyObject* PyGen_NewWithQualName(PyFrameObject *frame, PyObject *name, PyObject *qualname)
+
+ Create and return a new generator object based on the *frame* object,
+ with ``__name__`` and ``__qualname__`` set to *name* and *qualname*.
+ A reference to *frame* is stolen by this function. The *frame* argument
+ must not be *NULL*.
diff --git a/Doc/c-api/import.rst b/Doc/c-api/import.rst
index 60865f456f..2936f4ff33 100644
--- a/Doc/c-api/import.rst
+++ b/Doc/c-api/import.rst
@@ -72,7 +72,7 @@ Importing Modules
.. c:function:: PyObject* PyImport_ImportModuleLevel(const char *name, PyObject *globals, PyObject *locals, PyObject *fromlist, int level)
- Similar to :c:func:`PyImport_ImportModuleLevelObject`, but the name is an
+ Similar to :c:func:`PyImport_ImportModuleLevelObject`, but the name is a
UTF-8 encoded string instead of a Unicode object.
.. versionchanged:: 3.3
@@ -183,9 +183,9 @@ Importing Modules
.. c:function:: long PyImport_GetMagicNumber()
- Return the magic number for Python bytecode files (a.k.a. :file:`.pyc` and
- :file:`.pyo` files). The magic number should be present in the first four bytes
- of the bytecode file, in little-endian byte order. Returns -1 on error.
+ Return the magic number for Python bytecode files (a.k.a. :file:`.pyc` file).
+ The magic number should be present in the first four bytes of the bytecode
+ file, in little-endian byte order. Returns -1 on error.
.. versionchanged:: 3.3
Return value of -1 upon failure.
@@ -236,11 +236,6 @@ Importing Modules
For internal use only.
-.. c:function:: PyObject* _PyImport_FixupExtension(char *, char *)
-
- For internal use only.
-
-
.. c:function:: int PyImport_ImportFrozenModuleObject(PyObject *name)
Load a frozen module named *name*. Return ``1`` for success, ``0`` if the
@@ -277,7 +272,7 @@ Importing Modules
};
-.. c:var:: struct _frozen* PyImport_FrozenModules
+.. c:var:: const struct _frozen* PyImport_FrozenModules
This pointer is initialized to point to an array of :c:type:`struct _frozen`
records, terminated by one whose members are all *NULL* or zero. When a frozen
diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst
index 4bb50649ef..639819ce29 100644
--- a/Doc/c-api/init.rst
+++ b/Doc/c-api/init.rst
@@ -134,6 +134,9 @@ Process-wide parameters
change for the duration of the program's execution. No code in the Python
interpreter will change the contents of this storage.
+ Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a
+ :c:type:`wchar_*` string.
+
.. c:function:: wchar* Py_GetProgramName()
@@ -245,6 +248,9 @@ Process-wide parameters
:data:`sys.exec_prefix` to be empty. It is up to the caller to modify these
if required after calling :c:func:`Py_Initialize`.
+ Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a
+ :c:type:`wchar_*` string.
+
The path argument is copied internally, so the caller may free it after the
call completes.
@@ -344,11 +350,14 @@ Process-wide parameters
:data:`sys.path`, which is the same as prepending the current working
directory (``"."``).
+ Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a
+ :c:type:`wchar_*` string.
+
.. note::
It is recommended that applications embedding the Python interpreter
for purposes other than executing a single script pass 0 as *updatepath*,
and update :data:`sys.path` themselves if desired.
- See `CVE-2008-5983 <http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983>`_.
+ See `CVE-2008-5983 <https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983>`_.
On versions before 3.1.3, you can achieve the same effect by manually
popping the first :data:`sys.path` element after having called
@@ -368,6 +377,9 @@ Process-wide parameters
to 1 unless the :program:`python` interpreter was started with the
:option:`-I`.
+ Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a
+ :c:type:`wchar_*` string.
+
.. versionchanged:: 3.4 The *updatepath* value depends on :option:`-I`.
@@ -382,6 +394,9 @@ Process-wide parameters
execution. No code in the Python interpreter will change the contents of
this storage.
+ Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a
+ :c:type:`wchar_*` string.
+
.. c:function:: w_char* Py_GetPythonHome()
@@ -858,6 +873,8 @@ been created.
instead.
+.. _sub-interpreter-support:
+
Sub-interpreter support
=======================
diff --git a/Doc/c-api/mapping.rst b/Doc/c-api/mapping.rst
index e34104708c..fe601b605b 100644
--- a/Doc/c-api/mapping.rst
+++ b/Doc/c-api/mapping.rst
@@ -50,21 +50,21 @@ Mapping Protocol
.. c:function:: PyObject* PyMapping_Keys(PyObject *o)
- On success, return a list of the keys in object *o*. On failure, return *NULL*.
- This is equivalent to the Python expression ``list(o.keys())``.
+ On success, return a list, a tuple or a dictionary view in case of a dict,
+ of the keys in object *o*. On failure, return *NULL*.
.. c:function:: PyObject* PyMapping_Values(PyObject *o)
- On success, return a list of the values in object *o*. On failure, return
- *NULL*. This is equivalent to the Python expression ``list(o.values())``.
+ On success, return a list, a tuple or a dictionary view in case of a dict, of
+ the values in object *o*. On failure, return *NULL*.
.. c:function:: PyObject* PyMapping_Items(PyObject *o)
- On success, return a list of the items in object *o*, where each item is a tuple
- containing a key-value pair. On failure, return *NULL*. This is equivalent to
- the Python expression ``list(o.items())``.
+ On success, return a list, a tuple or a dictionary view in case of a dict, of
+ the items in object *o*, where each item is a tuple containing a key-value
+ pair. On failure, return *NULL*.
.. c:function:: PyObject* PyMapping_GetItemString(PyObject *o, const char *key)
diff --git a/Doc/c-api/memory.rst b/Doc/c-api/memory.rst
index 7908622d2b..290ef09dce 100644
--- a/Doc/c-api/memory.rst
+++ b/Doc/c-api/memory.rst
@@ -83,6 +83,12 @@ collection, memory compaction or other preventive procedures. Note that by using
the C library allocator as shown in the previous example, the allocated memory
for the I/O buffer escapes completely the Python memory manager.
+.. seealso::
+
+ The :envvar:`PYTHONMALLOCSTATS` environment variable can be used to print
+ memory allocation statistics every time a new object arena is created, and
+ on shutdown.
+
Raw Memory Interface
====================
@@ -92,38 +98,59 @@ functions are thread-safe, the :term:`GIL <global interpreter lock>` does not
need to be held.
The default raw memory block allocator uses the following functions:
-:c:func:`malloc`, :c:func:`realloc` and :c:func:`free`; call ``malloc(1)`` when
-requesting zero bytes.
+:c:func:`malloc`, :c:func:`calloc`, :c:func:`realloc` and :c:func:`free`; call
+``malloc(1)`` (or ``calloc(1, 1)``) when requesting zero bytes.
.. versionadded:: 3.4
.. c:function:: void* PyMem_RawMalloc(size_t n)
Allocates *n* bytes and returns a pointer of type :c:type:`void\*` to the
- allocated memory, or *NULL* if the request fails. Requesting zero bytes
- returns a distinct non-*NULL* pointer if possible, as if
- ``PyMem_RawMalloc(1)`` had been called instead. The memory will not have
+ allocated memory, or *NULL* if the request fails.
+
+ Requesting zero bytes returns a distinct non-*NULL* pointer if possible, as
+ if ``PyMem_RawMalloc(1)`` had been called instead. The memory will not have
been initialized in any way.
+.. c:function:: void* PyMem_RawCalloc(size_t nelem, size_t elsize)
+
+ Allocates *nelem* elements each whose size in bytes is *elsize* and returns
+ a pointer of type :c:type:`void\*` to the allocated memory, or *NULL* if the
+ request fails. The memory is initialized to zeros.
+
+ Requesting zero elements or elements of size zero bytes returns a distinct
+ non-*NULL* pointer if possible, as if ``PyMem_RawCalloc(1, 1)`` had been
+ called instead.
+
+ .. versionadded:: 3.5
+
+
.. c:function:: void* PyMem_RawRealloc(void *p, size_t n)
Resizes the memory block pointed to by *p* to *n* bytes. The contents will
- be unchanged to the minimum of the old and the new sizes. If *p* is *NULL*,
- the call is equivalent to ``PyMem_RawMalloc(n)``; else if *n* is equal to
- zero, the memory block is resized but is not freed, and the returned pointer
- is non-*NULL*. Unless *p* is *NULL*, it must have been returned by a
- previous call to :c:func:`PyMem_RawMalloc` or :c:func:`PyMem_RawRealloc`. If
- the request fails, :c:func:`PyMem_RawRealloc` returns *NULL* and *p* remains
- a valid pointer to the previous memory area.
+ be unchanged to the minimum of the old and the new sizes.
+
+ If *p* is *NULL*, the call is equivalent to ``PyMem_RawMalloc(n)``; else if
+ *n* is equal to zero, the memory block is resized but is not freed, and the
+ returned pointer is non-*NULL*.
+
+ Unless *p* is *NULL*, it must have been returned by a previous call to
+ :c:func:`PyMem_RawMalloc`, :c:func:`PyMem_RawRealloc` or
+ :c:func:`PyMem_RawCalloc`.
+
+ If the request fails, :c:func:`PyMem_RawRealloc` returns *NULL* and *p*
+ remains a valid pointer to the previous memory area.
.. c:function:: void PyMem_RawFree(void *p)
Frees the memory block pointed to by *p*, which must have been returned by a
- previous call to :c:func:`PyMem_RawMalloc` or :c:func:`PyMem_RawRealloc`.
- Otherwise, or if ``PyMem_Free(p)`` has been called before, undefined
- behavior occurs. If *p* is *NULL*, no operation is performed.
+ previous call to :c:func:`PyMem_RawMalloc`, :c:func:`PyMem_RawRealloc` or
+ :c:func:`PyMem_RawCalloc`. Otherwise, or if ``PyMem_Free(p)`` has been
+ called before, undefined behavior occurs.
+
+ If *p* is *NULL*, no operation is performed.
.. _memoryinterface:
@@ -136,8 +163,8 @@ behavior when requesting zero bytes, are available for allocating and releasing
memory from the Python heap.
The default memory block allocator uses the following functions:
-:c:func:`malloc`, :c:func:`realloc` and :c:func:`free`; call ``malloc(1)`` when
-requesting zero bytes.
+:c:func:`malloc`, :c:func:`calloc`, :c:func:`realloc` and :c:func:`free`; call
+``malloc(1)`` (or ``calloc(1, 1)``) when requesting zero bytes.
.. warning::
@@ -147,29 +174,50 @@ requesting zero bytes.
.. c:function:: void* PyMem_Malloc(size_t n)
Allocates *n* bytes and returns a pointer of type :c:type:`void\*` to the
- allocated memory, or *NULL* if the request fails. Requesting zero bytes returns
- a distinct non-*NULL* pointer if possible, as if ``PyMem_Malloc(1)`` had
- been called instead. The memory will not have been initialized in any way.
+ allocated memory, or *NULL* if the request fails.
+
+ Requesting zero bytes returns a distinct non-*NULL* pointer if possible, as
+ if ``PyMem_Malloc(1)`` had been called instead. The memory will not have
+ been initialized in any way.
+
+
+.. c:function:: void* PyMem_Calloc(size_t nelem, size_t elsize)
+
+ Allocates *nelem* elements each whose size in bytes is *elsize* and returns
+ a pointer of type :c:type:`void\*` to the allocated memory, or *NULL* if the
+ request fails. The memory is initialized to zeros.
+
+ Requesting zero elements or elements of size zero bytes returns a distinct
+ non-*NULL* pointer if possible, as if ``PyMem_Calloc(1, 1)`` had been called
+ instead.
+
+ .. versionadded:: 3.5
.. c:function:: void* PyMem_Realloc(void *p, size_t n)
Resizes the memory block pointed to by *p* to *n* bytes. The contents will be
- unchanged to the minimum of the old and the new sizes. If *p* is *NULL*, the
- call is equivalent to ``PyMem_Malloc(n)``; else if *n* is equal to zero,
- the memory block is resized but is not freed, and the returned pointer is
- non-*NULL*. Unless *p* is *NULL*, it must have been returned by a previous call
- to :c:func:`PyMem_Malloc` or :c:func:`PyMem_Realloc`. If the request fails,
- :c:func:`PyMem_Realloc` returns *NULL* and *p* remains a valid pointer to the
- previous memory area.
+ unchanged to the minimum of the old and the new sizes.
+
+ If *p* is *NULL*, the call is equivalent to ``PyMem_Malloc(n)``; else if *n*
+ is equal to zero, the memory block is resized but is not freed, and the
+ returned pointer is non-*NULL*.
+
+ Unless *p* is *NULL*, it must have been returned by a previous call to
+ :c:func:`PyMem_Malloc`, :c:func:`PyMem_Realloc` or :c:func:`PyMem_Calloc`.
+
+ If the request fails, :c:func:`PyMem_Realloc` returns *NULL* and *p* remains
+ a valid pointer to the previous memory area.
.. c:function:: void PyMem_Free(void *p)
Frees the memory block pointed to by *p*, which must have been returned by a
- previous call to :c:func:`PyMem_Malloc` or :c:func:`PyMem_Realloc`. Otherwise, or
- if ``PyMem_Free(p)`` has been called before, undefined behavior occurs. If
- *p* is *NULL*, no operation is performed.
+ previous call to :c:func:`PyMem_Malloc`, :c:func:`PyMem_Realloc` or
+ :c:func:`PyMem_Calloc`. Otherwise, or if ``PyMem_Free(p)`` has been called
+ before, undefined behavior occurs.
+
+ If *p* is *NULL*, no operation is performed.
The following type-oriented macros are provided for convenience. Note that
*TYPE* refers to any C type.
@@ -187,8 +235,10 @@ The following type-oriented macros are provided for convenience. Note that
Same as :c:func:`PyMem_Realloc`, but the memory block is resized to ``(n *
sizeof(TYPE))`` bytes. Returns a pointer cast to :c:type:`TYPE\*`. On return,
*p* will be a pointer to the new memory area, or *NULL* in the event of
- failure. This is a C preprocessor macro; p is always reassigned. Save
- the original value of p to avoid losing memory when handling errors.
+ failure.
+
+ This is a C preprocessor macro; *p* is always reassigned. Save the original
+ value of *p* to avoid losing memory when handling errors.
.. c:function:: void PyMem_Del(void *p)
@@ -200,9 +250,12 @@ allocator directly, without involving the C API functions listed above. However,
note that their use does not preserve binary compatibility across Python
versions and is therefore deprecated in extension modules.
-:c:func:`PyMem_MALLOC`, :c:func:`PyMem_REALLOC`, :c:func:`PyMem_FREE`.
-
-:c:func:`PyMem_NEW`, :c:func:`PyMem_RESIZE`, :c:func:`PyMem_DEL`.
+* ``PyMem_MALLOC(size)``
+* ``PyMem_NEW(type, size)``
+* ``PyMem_REALLOC(ptr, size)``
+* ``PyMem_RESIZE(ptr, type, size)``
+* ``PyMem_FREE(ptr)``
+* ``PyMem_DEL(ptr)``
Customize Memory Allocators
@@ -210,7 +263,7 @@ Customize Memory Allocators
.. versionadded:: 3.4
-.. c:type:: PyMemAllocator
+.. c:type:: PyMemAllocatorEx
Structure used to describe a memory block allocator. The structure has
four fields:
@@ -222,29 +275,39 @@ Customize Memory Allocators
+----------------------------------------------------------+---------------------------------------+
| ``void* malloc(void *ctx, size_t size)`` | allocate a memory block |
+----------------------------------------------------------+---------------------------------------+
+ | ``void* calloc(void *ctx, size_t nelem, size_t elsize)`` | allocate a memory block initialized |
+ | | with zeros |
+ +----------------------------------------------------------+---------------------------------------+
| ``void* realloc(void *ctx, void *ptr, size_t new_size)`` | allocate or resize a memory block |
+----------------------------------------------------------+---------------------------------------+
| ``void free(void *ctx, void *ptr)`` | free a memory block |
+----------------------------------------------------------+---------------------------------------+
+ .. versionchanged:: 3.5
+ The :c:type:`PyMemAllocator` structure was renamed to
+ :c:type:`PyMemAllocatorEx` and a new ``calloc`` field was added.
+
+
.. c:type:: PyMemAllocatorDomain
Enum used to identify an allocator domain. Domains:
* :c:data:`PYMEM_DOMAIN_RAW`: functions :c:func:`PyMem_RawMalloc`,
- :c:func:`PyMem_RawRealloc` and :c:func:`PyMem_RawFree`
+ :c:func:`PyMem_RawRealloc`, :c:func:`PyMem_RawCalloc` and
+ :c:func:`PyMem_RawFree`
* :c:data:`PYMEM_DOMAIN_MEM`: functions :c:func:`PyMem_Malloc`,
- :c:func:`PyMem_Realloc` and :c:func:`PyMem_Free`
+ :c:func:`PyMem_Realloc`, :c:func:`PyMem_Calloc` and :c:func:`PyMem_Free`
* :c:data:`PYMEM_DOMAIN_OBJ`: functions :c:func:`PyObject_Malloc`,
- :c:func:`PyObject_Realloc` and :c:func:`PyObject_Free`
+ :c:func:`PyObject_Realloc`, :c:func:`PyObject_Calloc` and
+ :c:func:`PyObject_Free`
-.. c:function:: void PyMem_GetAllocator(PyMemAllocatorDomain domain, PyMemAllocator *allocator)
+.. c:function:: void PyMem_GetAllocator(PyMemAllocatorDomain domain, PyMemAllocatorEx *allocator)
Get the memory block allocator of the specified domain.
-.. c:function:: void PyMem_SetAllocator(PyMemAllocatorDomain domain, PyMemAllocator *allocator)
+.. c:function:: void PyMem_SetAllocator(PyMemAllocatorDomain domain, PyMemAllocatorEx *allocator)
Set the memory block allocator of the specified domain.
@@ -266,10 +329,11 @@ Customize Memory Allocators
functions:
- :c:func:`PyMem_RawMalloc`, :c:func:`PyMem_RawRealloc`,
- :c:func:`PyMem_RawFree`
- - :c:func:`PyMem_Malloc`, :c:func:`PyMem_Realloc`, :c:func:`PyMem_Free`
+ :c:func:`PyMem_RawCalloc`, :c:func:`PyMem_RawFree`
+ - :c:func:`PyMem_Malloc`, :c:func:`PyMem_Realloc`, :c:func:`PyMem_Calloc`,
+ :c:func:`PyMem_Free`
- :c:func:`PyObject_Malloc`, :c:func:`PyObject_Realloc`,
- :c:func:`PyObject_Free`
+ :c:func:`PyObject_Calloc`, :c:func:`PyObject_Free`
Newly allocated memory is filled with the byte ``0xCB``, freed memory is
filled with the byte ``0xDB``. Additional checks:
diff --git a/Doc/c-api/memoryview.rst b/Doc/c-api/memoryview.rst
index 5e50977cbe..9f6bfd751a 100644
--- a/Doc/c-api/memoryview.rst
+++ b/Doc/c-api/memoryview.rst
@@ -35,7 +35,7 @@ any other object.
.. c:function:: PyObject *PyMemoryView_GetContiguous(PyObject *obj, int buffertype, char order)
- Create a memoryview object to a contiguous chunk of memory (in either
+ Create a memoryview object to a :term:`contiguous` chunk of memory (in either
'C' or 'F'ortran *order*) from an object that defines the buffer
interface. If memory is contiguous, the memoryview object points to the
original memory. Otherwise, a copy is made and the memoryview points to a
diff --git a/Doc/c-api/method.rst b/Doc/c-api/method.rst
index acc81e4814..7a2a84fe11 100644
--- a/Doc/c-api/method.rst
+++ b/Doc/c-api/method.rst
@@ -49,7 +49,7 @@ Method Objects
.. index:: object: method
Methods are bound function objects. Methods are always bound to an instance of
-an user-defined class. Unbound methods (methods bound to a class object) are
+a user-defined class. Unbound methods (methods bound to a class object) are
no longer available.
diff --git a/Doc/c-api/module.rst b/Doc/c-api/module.rst
index 985a347d63..904b4b1f66 100644
--- a/Doc/c-api/module.rst
+++ b/Doc/c-api/module.rst
@@ -7,8 +7,6 @@ Module Objects
.. index:: object: module
-There are only a few functions special to module objects.
-
.. c:var:: PyTypeObject PyModule_Type
@@ -52,7 +50,7 @@ There are only a few functions special to module objects.
.. c:function:: PyObject* PyModule_New(const char *name)
- Similar to :c:func:`PyImport_NewObject`, but the name is an UTF-8 encoded
+ Similar to :c:func:`PyImport_NewObject`, but the name is a UTF-8 encoded
string instead of a Unicode object.
@@ -84,6 +82,18 @@ There are only a few functions special to module objects.
Similar to :c:func:`PyModule_GetNameObject` but return the name encoded to
``'utf-8'``.
+.. c:function:: void* PyModule_GetState(PyObject *module)
+
+ Return the "state" of the module, that is, a pointer to the block of memory
+ allocated at module creation time, or *NULL*. See
+ :c:member:`PyModuleDef.m_size`.
+
+
+.. c:function:: PyModuleDef* PyModule_GetDef(PyObject *module)
+
+ Return a pointer to the :c:type:`PyModuleDef` struct from which the module was
+ created, or *NULL* if the module wasn't created from a definition.
+
.. c:function:: PyObject* PyModule_GetFilenameObject(PyObject *module)
@@ -109,55 +119,109 @@ There are only a few functions special to module objects.
unencodable filenames, use :c:func:`PyModule_GetFilenameObject` instead.
-.. c:function:: void* PyModule_GetState(PyObject *module)
+.. _initializing-modules:
- Return the "state" of the module, that is, a pointer to the block of memory
- allocated at module creation time, or *NULL*. See
- :c:member:`PyModuleDef.m_size`.
+Initializing C modules
+^^^^^^^^^^^^^^^^^^^^^^
+Modules objects are usually created from extension modules (shared libraries
+which export an initialization function), or compiled-in modules
+(where the initialization function is added using :c:func:`PyImport_AppendInittab`).
+See :ref:`building` or :ref:`extending-with-embedding` for details.
-.. c:function:: PyModuleDef* PyModule_GetDef(PyObject *module)
+The initialization function can either pass a module definition instance
+to :c:func:`PyModule_Create`, and return the resulting module object,
+or request "multi-phase initialization" by returning the definition struct itself.
- Return a pointer to the :c:type:`PyModuleDef` struct from which the module was
- created, or *NULL* if the module wasn't created with
- :c:func:`PyModule_Create`.
+.. c:type:: PyModuleDef
-.. c:function:: PyObject* PyState_FindModule(PyModuleDef *def)
+ The module definition struct, which holds all information needed to create
+ a module object. There is usually only one statically initialized variable
+ of this type for each module.
- Returns the module object that was created from *def* for the current interpreter.
- This method requires that the module object has been attached to the interpreter state with
- :c:func:`PyState_AddModule` beforehand. In case the corresponding module object is not
- found or has not been attached to the interpreter state yet, it returns NULL.
+ .. c:member:: PyModuleDef_Base m_base
-.. c:function:: int PyState_AddModule(PyObject *module, PyModuleDef *def)
+ Always initialize this member to :const:`PyModuleDef_HEAD_INIT`.
- Attaches the module object passed to the function to the interpreter state. This allows
- the module object to be accessible via
- :c:func:`PyState_FindModule`.
+ .. c:member:: char* m_name
- .. versionadded:: 3.3
+ Name for the new module.
-.. c:function:: int PyState_RemoveModule(PyModuleDef *def)
+ .. c:member:: char* m_doc
- Removes the module object created from *def* from the interpreter state.
+ Docstring for the module; usually a docstring variable created with
+ :c:func:`PyDoc_STRVAR` is used.
- .. versionadded:: 3.3
+ .. c:member:: Py_ssize_t m_size
-Initializing C modules
-^^^^^^^^^^^^^^^^^^^^^^
+ Module state may be kept in a per-module memory area that can be
+ retrieved with :c:func:`PyModule_GetState`, rather than in static globals.
+ This makes modules safe for use in multiple sub-interpreters.
+
+ This memory area is allocated based on *m_size* on module creation,
+ and freed when the module object is deallocated, after the
+ :c:member:`m_free` function has been called, if present.
+
+ Setting ``m_size`` to ``-1`` means that the module does not support
+ sub-interpreters, because it has global state.
-These functions are usually used in the module initialization function.
+ Setting it to a non-negative value means that the module can be
+ re-initialized and specifies the additional amount of memory it requires
+ for its state. Non-negative ``m_size`` is required for multi-phase
+ initialization.
-.. c:function:: PyObject* PyModule_Create(PyModuleDef *module)
+ See :PEP:`3121` for more details.
+
+ .. c:member:: PyMethodDef* m_methods
- Create a new module object, given the definition in *module*. This behaves
+ A pointer to a table of module-level functions, described by
+ :c:type:`PyMethodDef` values. Can be *NULL* if no functions are present.
+
+ .. c:member:: PyModuleDef_Slot* m_slots
+
+ An array of slot definitions for multi-phase initialization, terminated by
+ a ``{0, NULL}`` entry.
+ When using single-phase initialization, *m_slots* must be *NULL*.
+
+ .. versionchanged:: 3.5
+
+ Prior to version 3.5, this member was always set to *NULL*,
+ and was defined as:
+
+ .. c:member:: inquiry m_reload
+
+ .. c:member:: traverseproc m_traverse
+
+ A traversal function to call during GC traversal of the module object, or
+ *NULL* if not needed.
+
+ .. c:member:: inquiry m_clear
+
+ A clear function to call during GC clearing of the module object, or
+ *NULL* if not needed.
+
+ .. c:member:: freefunc m_free
+
+ A function to call during deallocation of the module object, or *NULL* if
+ not needed.
+
+Single-phase initialization
+...........................
+
+The module initialization function may create and return the module object
+directly. This is referred to as "single-phase initialization", and uses one
+of the following two module creation functions:
+
+.. c:function:: PyObject* PyModule_Create(PyModuleDef *def)
+
+ Create a new module object, given the definition in *def*. This behaves
like :c:func:`PyModule_Create2` with *module_api_version* set to
:const:`PYTHON_API_VERSION`.
-.. c:function:: PyObject* PyModule_Create2(PyModuleDef *module, int module_api_version)
+.. c:function:: PyObject* PyModule_Create2(PyModuleDef *def, int module_api_version)
- Create a new module object, given the definition in *module*, assuming the
+ Create a new module object, given the definition in *def*, assuming the
API version *module_api_version*. If that version does not match the version
of the running interpreter, a :exc:`RuntimeWarning` is emitted.
@@ -166,69 +230,179 @@ These functions are usually used in the module initialization function.
Most uses of this function should be using :c:func:`PyModule_Create`
instead; only use this if you are sure you need it.
+Before it is returned from in the initialization function, the resulting module
+object is typically populated using functions like :c:func:`PyModule_AddObject`.
-.. c:type:: PyModuleDef
+.. _multi-phase-initialization:
- This struct holds all information that is needed to create a module object.
- There is usually only one static variable of that type for each module, which
- is statically initialized and then passed to :c:func:`PyModule_Create` in the
- module initialization function.
+Multi-phase initialization
+..........................
- .. c:member:: PyModuleDef_Base m_base
+An alternate way to specify extensions is to request "multi-phase initialization".
+Extension modules created this way behave more like Python modules: the
+initialization is split between the *creation phase*, when the module object
+is created, and the *execution phase*, when it is populated.
+The distinction is similar to the :py:meth:`__new__` and :py:meth:`__init__` methods
+of classes.
- Always initialize this member to :const:`PyModuleDef_HEAD_INIT`.
+Unlike modules created using single-phase initialization, these modules are not
+singletons: if the *sys.modules* entry is removed and the module is re-imported,
+a new module object is created, and the old module is subject to normal garbage
+collection -- as with Python modules.
+By default, multiple modules created from the same definition should be
+independent: changes to one should not affect the others.
+This means that all state should be specific to the module object (using e.g.
+using :c:func:`PyModule_GetState`), or its contents (such as the module's
+:attr:`__dict__` or individual classes created with :c:func:`PyType_FromSpec`).
- .. c:member:: char* m_name
+All modules created using multi-phase initialization are expected to support
+:ref:`sub-interpreters <sub-interpreter-support>`. Making sure multiple modules
+are independent is typically enough to achieve this.
- Name for the new module.
+To request multi-phase initialization, the initialization function
+(PyInit_modulename) returns a :c:type:`PyModuleDef` instance with non-empty
+:c:member:`~PyModuleDef.m_slots`. Before it is returned, the ``PyModuleDef``
+instance must be initialized with the following function:
- .. c:member:: char* m_doc
+.. c:function:: PyObject* PyModuleDef_Init(PyModuleDef *def)
- Docstring for the module; usually a docstring variable created with
- :c:func:`PyDoc_STRVAR` is used.
+ Ensures a module definition is a properly initialized Python object that
+ correctly reports its type and reference count.
- .. c:member:: Py_ssize_t m_size
+ Returns *def* cast to ``PyObject*``, or *NULL* if an error occurred.
- Some modules allow re-initialization (calling their ``PyInit_*`` function
- more than once). These modules should keep their state in a per-module
- memory area that can be retrieved with :c:func:`PyModule_GetState`.
+ .. versionadded:: 3.5
- This memory should be used, rather than static globals, to hold per-module
- state, since it is then safe for use in multiple sub-interpreters. It is
- freed when the module object is deallocated, after the :c:member:`m_free`
- function has been called, if present.
+The *m_slots* member of the module definition must point to an array of
+``PyModuleDef_Slot`` structures:
- Setting ``m_size`` to ``-1`` means that the module can not be
- re-initialized because it has global state. Setting it to a non-negative
- value means that the module can be re-initialized and specifies the
- additional amount of memory it requires for its state.
+.. c:type:: PyModuleDef_Slot
- See :PEP:`3121` for more details.
+ .. c:member:: int slot
- .. c:member:: PyMethodDef* m_methods
+ A slot ID, chosen from the available values explained below.
- A pointer to a table of module-level functions, described by
- :c:type:`PyMethodDef` values. Can be *NULL* if no functions are present.
+ .. c:member:: void* value
- .. c:member:: inquiry m_reload
+ Value of the slot, whose meaning depends on the slot ID.
- Currently unused, should be *NULL*.
+ .. versionadded:: 3.5
- .. c:member:: traverseproc m_traverse
+The *m_slots* array must be terminated by a slot with id 0.
- A traversal function to call during GC traversal of the module object, or
- *NULL* if not needed.
+The available slot types are:
- .. c:member:: inquiry m_clear
+.. c:var:: Py_mod_create
- A clear function to call during GC clearing of the module object, or
- *NULL* if not needed.
+ Specifies a function that is called to create the module object itself.
+ The *value* pointer of this slot must point to a function of the signature:
- .. c:member:: freefunc m_free
+ .. c:function:: PyObject* create_module(PyObject *spec, PyModuleDef *def)
- A function to call during deallocation of the module object, or *NULL* if
- not needed.
+ The function receives a :py:class:`~importlib.machinery.ModuleSpec`
+ instance, as defined in :PEP:`451`, and the module definition.
+ It should return a new module object, or set an error
+ and return *NULL*.
+
+ This function should be kept minimal. In particular, it should not
+ call arbitrary Python code, as trying to import the same module again may
+ result in an infinite loop.
+
+ Multiple ``Py_mod_create`` slots may not be specified in one module
+ definition.
+
+ If ``Py_mod_create`` is not specified, the import machinery will create
+ a normal module object using :c:func:`PyModule_New`. The name is taken from
+ *spec*, not the definition, to allow extension modules to dynamically adjust
+ to their place in the module hierarchy and be imported under different
+ names through symlinks, all while sharing a single module definition.
+
+ There is no requirement for the returned object to be an instance of
+ :c:type:`PyModule_Type`. Any type can be used, as long as it supports
+ setting and getting import-related attributes.
+ However, only ``PyModule_Type`` instances may be returned if the
+ ``PyModuleDef`` has non-*NULL* ``m_methods``, ``m_traverse``, ``m_clear``,
+ ``m_free``; non-zero ``m_size``; or slots other than ``Py_mod_create``.
+
+.. c:var:: Py_mod_exec
+
+ Specifies a function that is called to *execute* the module.
+ This is equivalent to executing the code of a Python module: typically,
+ this function adds classes and constants to the module.
+ The signature of the function is:
+
+ .. c:function:: int exec_module(PyObject* module)
+
+ If multiple ``Py_mod_exec`` slots are specified, they are processed in the
+ order they appear in the *m_slots* array.
+
+See :PEP:`489` for more details on multi-phase initialization.
+
+Low-level module creation functions
+...................................
+
+The following functions are called under the hood when using multi-phase
+initialization. They can be used directly, for example when creating module
+objects dynamically. Note that both ``PyModule_FromDefAndSpec`` and
+``PyModule_ExecDef`` must be called to fully initialize a module.
+
+.. c:function:: PyObject * PyModule_FromDefAndSpec(PyModuleDef *def, PyObject *spec)
+
+ Create a new module object, given the definition in *module* and the
+ ModuleSpec *spec*. This behaves like :c:func:`PyModule_FromDefAndSpec2`
+ with *module_api_version* set to :const:`PYTHON_API_VERSION`.
+
+ .. versionadded:: 3.5
+
+.. c:function:: PyObject * PyModule_FromDefAndSpec2(PyModuleDef *def, PyObject *spec, int module_api_version)
+
+ Create a new module object, given the definition in *module* and the
+ ModuleSpec *spec*, assuming the API version *module_api_version*.
+ If that version does not match the version of the running interpreter,
+ a :exc:`RuntimeWarning` is emitted.
+
+ .. note::
+ Most uses of this function should be using :c:func:`PyModule_FromDefAndSpec`
+ instead; only use this if you are sure you need it.
+
+ .. versionadded:: 3.5
+
+.. c:function:: int PyModule_ExecDef(PyObject *module, PyModuleDef *def)
+
+ Process any execution slots (:c:data:`Py_mod_exec`) given in *def*.
+
+ .. versionadded:: 3.5
+
+.. c:function:: int PyModule_SetDocString(PyObject *module, const char *docstring)
+
+ Set the docstring for *module* to *docstring*.
+ This function is called automatically when creating a module from
+ ``PyModuleDef``, using either ``PyModule_Create`` or
+ ``PyModule_FromDefAndSpec``.
+
+ .. versionadded:: 3.5
+
+.. c:function:: int PyModule_AddFunctions(PyObject *module, PyMethodDef *functions)
+
+ Add the functions from the *NULL* terminated *functions* array to *module*.
+ Refer to the :c:type:`PyMethodDef` documentation for details on individual
+ entries (due to the lack of a shared module namespace, module level
+ "functions" implemented in C typically receive the module as their first
+ parameter, making them similar to instance methods on Python classes).
+ This function is called automatically when creating a module from
+ ``PyModuleDef``, using either ``PyModule_Create`` or
+ ``PyModule_FromDefAndSpec``.
+
+ .. versionadded:: 3.5
+
+Support functions
+.................
+
+The module initialization function (if using single phase initialization) or
+a function called from a module execution slot (if using multi-phase
+initialization), can use the following functions to help initialize the module
+state:
.. c:function:: int PyModule_AddObject(PyObject *module, const char *name, PyObject *value)
@@ -236,7 +410,6 @@ These functions are usually used in the module initialization function.
be used from the module's initialization function. This steals a reference to
*value*. Return ``-1`` on error, ``0`` on success.
-
.. c:function:: int PyModule_AddIntConstant(PyObject *module, const char *name, long value)
Add an integer constant to *module* as *name*. This convenience function can be
@@ -248,7 +421,7 @@ These functions are usually used in the module initialization function.
Add a string constant to *module* as *name*. This convenience function can be
used from the module's initialization function. The string *value* must be
- null-terminated. Return ``-1`` on error, ``0`` on success.
+ *NULL*-terminated. Return ``-1`` on error, ``0`` on success.
.. c:function:: int PyModule_AddIntMacro(PyObject *module, macro)
@@ -262,3 +435,36 @@ These functions are usually used in the module initialization function.
.. c:function:: int PyModule_AddStringMacro(PyObject *module, macro)
Add a string constant to *module*.
+
+
+Module lookup
+^^^^^^^^^^^^^
+
+Single-phase initialization creates singleton modules that can be looked up
+in the context of the current interpreter. This allows the module object to be
+retrieved later with only a reference to the module definition.
+
+These functions will not work on modules created using multi-phase initialization,
+since multiple such modules can be created from a single definition.
+
+.. c:function:: PyObject* PyState_FindModule(PyModuleDef *def)
+
+ Returns the module object that was created from *def* for the current interpreter.
+ This method requires that the module object has been attached to the interpreter state with
+ :c:func:`PyState_AddModule` beforehand. In case the corresponding module object is not
+ found or has not been attached to the interpreter state yet, it returns *NULL*.
+
+.. c:function:: int PyState_AddModule(PyObject *module, PyModuleDef *def)
+
+ Attaches the module object passed to the function to the interpreter state. This allows
+ the module object to be accessible via :c:func:`PyState_FindModule`.
+
+ Only effective on modules created using single-phase initialization.
+
+ .. versionadded:: 3.3
+
+.. c:function:: int PyState_RemoveModule(PyModuleDef *def)
+
+ Removes the module object created from *def* from the interpreter state.
+
+ .. versionadded:: 3.3
diff --git a/Doc/c-api/number.rst b/Doc/c-api/number.rst
index 21951c38c0..9bcb649c9d 100644
--- a/Doc/c-api/number.rst
+++ b/Doc/c-api/number.rst
@@ -30,6 +30,14 @@ Number Protocol
the equivalent of the Python expression ``o1 * o2``.
+.. c:function:: PyObject* PyNumber_MatrixMultiply(PyObject *o1, PyObject *o2)
+
+ Returns the result of matrix multiplication on *o1* and *o2*, or *NULL* on
+ failure. This is the equivalent of the Python expression ``o1 @ o2``.
+
+ .. versionadded:: 3.5
+
+
.. c:function:: PyObject* PyNumber_FloorDivide(PyObject *o1, PyObject *o2)
Return the floor of *o1* divided by *o2*, or *NULL* on failure. This is
@@ -146,6 +154,15 @@ Number Protocol
the Python statement ``o1 *= o2``.
+.. c:function:: PyObject* PyNumber_InPlaceMatrixMultiply(PyObject *o1, PyObject *o2)
+
+ Returns the result of matrix multiplication on *o1* and *o2*, or *NULL* on
+ failure. The operation is done *in-place* when *o1* supports it. This is
+ the equivalent of the Python statement ``o1 @= o2``.
+
+ .. versionadded:: 3.5
+
+
.. c:function:: PyObject* PyNumber_InPlaceFloorDivide(PyObject *o1, PyObject *o2)
Returns the mathematical floor of dividing *o1* by *o2*, or *NULL* on failure.
diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst
index 97b45b12cb..b761c808fc 100644
--- a/Doc/c-api/object.rst
+++ b/Doc/c-api/object.rst
@@ -68,25 +68,35 @@ Object Protocol
.. c:function:: int PyObject_SetAttr(PyObject *o, PyObject *attr_name, PyObject *v)
Set the value of the attribute named *attr_name*, for object *o*, to the value
- *v*. Returns ``-1`` on failure. This is the equivalent of the Python statement
+ *v*. Raise an exception and return ``-1`` on failure;
+ return ``0`` on success. This is the equivalent of the Python statement
``o.attr_name = v``.
+ If *v* is *NULL*, the attribute is deleted, however this feature is
+ deprecated in favour of using :c:func:`PyObject_DelAttr`.
+
.. c:function:: int PyObject_SetAttrString(PyObject *o, const char *attr_name, PyObject *v)
Set the value of the attribute named *attr_name*, for object *o*, to the value
- *v*. Returns ``-1`` on failure. This is the equivalent of the Python statement
+ *v*. Raise an exception and return ``-1`` on failure;
+ return ``0`` on success. This is the equivalent of the Python statement
``o.attr_name = v``.
+ If *v* is *NULL*, the attribute is deleted, however this feature is
+ deprecated in favour of using :c:func:`PyObject_DelAttrString`.
+
.. c:function:: int PyObject_GenericSetAttr(PyObject *o, PyObject *name, PyObject *value)
- Generic attribute setter function that is meant to be put into a type
- object's ``tp_setattro`` slot. It looks for a data descriptor in the
+ Generic attribute setter and deleter function that is meant
+ to be put into a type object's :c:member:`~PyTypeObject.tp_setattro`
+ slot. It looks for a data descriptor in the
dictionary of classes in the object's MRO, and if found it takes preference
- over setting the attribute in the instance dictionary. Otherwise, the
- attribute is set in the object's :attr:`~object.__dict__` (if present).
- Otherwise, an :exc:`AttributeError` is raised and ``-1`` is returned.
+ over setting or deleting the attribute in the instance dictionary. Otherwise, the
+ attribute is set or deleted in the object's :attr:`~object.__dict__` (if present).
+ On success, ``0`` is returned, otherwise an :exc:`AttributeError`
+ is raised and ``-1`` is returned.
.. c:function:: int PyObject_DelAttr(PyObject *o, PyObject *attr_name)
@@ -378,7 +388,8 @@ Object Protocol
.. c:function:: int PyObject_SetItem(PyObject *o, PyObject *key, PyObject *v)
- Map the object *key* to the value *v*. Returns ``-1`` on failure. This is the
+ Map the object *key* to the value *v*. Raise an exception and
+ return ``-1`` on failure; return ``0`` on success. This is the
equivalent of the Python statement ``o[key] = v``.
diff --git a/Doc/c-api/sequence.rst b/Doc/c-api/sequence.rst
index 5960db9d42..f1825f079b 100644
--- a/Doc/c-api/sequence.rst
+++ b/Doc/c-api/sequence.rst
@@ -62,10 +62,14 @@ Sequence Protocol
.. c:function:: int PySequence_SetItem(PyObject *o, Py_ssize_t i, PyObject *v)
- Assign object *v* to the *i*\ th element of *o*. Returns ``-1`` on failure. This
+ Assign object *v* to the *i*\ th element of *o*. Raise an exception
+ and return ``-1`` on failure; return ``0`` on success. This
is the equivalent of the Python statement ``o[i] = v``. This function *does
not* steal a reference to *v*.
+ If *v* is *NULL*, the element is deleted, however this feature is
+ deprecated in favour of using :c:func:`PySequence_DelItem`.
+
.. c:function:: int PySequence_DelItem(PyObject *o, Py_ssize_t i)
diff --git a/Doc/c-api/set.rst b/Doc/c-api/set.rst
index 7f4d534a70..8de0394112 100644
--- a/Doc/c-api/set.rst
+++ b/Doc/c-api/set.rst
@@ -128,7 +128,7 @@ or :class:`frozenset` or instances of their subtypes.
of brand new frozensets before they are exposed to other code). Return 0 on
success or -1 on failure. Raise a :exc:`TypeError` if the *key* is
unhashable. Raise a :exc:`MemoryError` if there is no room to grow. Raise a
- :exc:`SystemError` if *set* is an not an instance of :class:`set` or its
+ :exc:`SystemError` if *set* is not an instance of :class:`set` or its
subtype.
@@ -142,7 +142,7 @@ subtypes but not for instances of :class:`frozenset` or its subtypes.
error is encountered. Does not raise :exc:`KeyError` for missing keys. Raise a
:exc:`TypeError` if the *key* is unhashable. Unlike the Python :meth:`~set.discard`
method, this function does not automatically convert unhashable sets into
- temporary frozensets. Raise :exc:`PyExc_SystemError` if *set* is an not an
+ temporary frozensets. Raise :exc:`PyExc_SystemError` if *set* is not an
instance of :class:`set` or its subtype.
@@ -150,7 +150,7 @@ subtypes but not for instances of :class:`frozenset` or its subtypes.
Return a new reference to an arbitrary object in the *set*, and removes the
object from the *set*. Return *NULL* on failure. Raise :exc:`KeyError` if the
- set is empty. Raise a :exc:`SystemError` if *set* is an not an instance of
+ set is empty. Raise a :exc:`SystemError` if *set* is not an instance of
:class:`set` or its subtype.
diff --git a/Doc/c-api/stable.rst b/Doc/c-api/stable.rst
index 063f856d22..5b771dd4ad 100644
--- a/Doc/c-api/stable.rst
+++ b/Doc/c-api/stable.rst
@@ -34,5 +34,5 @@ will work on all subsequent Python releases, but fail to load (because of
missing symbols) on the older releases.
As of Python 3.2, the set of functions available to the limited API is
-documented in PEP 384. In the C API documentation, API elements that are not
+documented in :pep:`384`. In the C API documentation, API elements that are not
part of the limited API are marked as "Not part of the limited API."
diff --git a/Doc/c-api/sys.rst b/Doc/c-api/sys.rst
index 7cead07081..3d83b279c2 100644
--- a/Doc/c-api/sys.rst
+++ b/Doc/c-api/sys.rst
@@ -47,6 +47,60 @@ Operating System Utilities
not call those functions directly! :c:type:`PyOS_sighandler_t` is a typedef
alias for :c:type:`void (\*)(int)`.
+.. c:function:: wchar_t* Py_DecodeLocale(const char* arg, size_t *size)
+
+ Decode a byte string from the locale encoding with the :ref:`surrogateescape
+ error handler <surrogateescape>`: undecodable bytes are decoded as
+ characters in range U+DC80..U+DCFF. If a byte sequence can be decoded as a
+ surrogate character, escape the bytes using the surrogateescape error
+ handler instead of decoding them.
+
+ Return a pointer to a newly allocated wide character string, use
+ :c:func:`PyMem_RawFree` to free the memory. If size is not ``NULL``, write
+ the number of wide characters excluding the null character into ``*size``
+
+ Return ``NULL`` on decoding error or memory allocation error. If *size* is
+ not ``NULL``, ``*size`` is set to ``(size_t)-1`` on memory error or set to
+ ``(size_t)-2`` on decoding error.
+
+ Decoding errors should never happen, unless there is a bug in the C
+ library.
+
+ Use the :c:func:`Py_EncodeLocale` function to encode the character string
+ back to a byte string.
+
+ .. seealso::
+
+ The :c:func:`PyUnicode_DecodeFSDefaultAndSize` and
+ :c:func:`PyUnicode_DecodeLocaleAndSize` functions.
+
+ .. versionadded:: 3.5
+
+
+.. c:function:: char* Py_EncodeLocale(const wchar_t *text, size_t *error_pos)
+
+ Encode a wide character string to the locale encoding with the
+ :ref:`surrogateescape error handler <surrogateescape>`: surrogate characters
+ in the range U+DC80..U+DCFF are converted to bytes 0x80..0xFF.
+
+ Return a pointer to a newly allocated byte string, use :c:func:`PyMem_Free`
+ to free the memory. Return ``NULL`` on encoding error or memory allocation
+ error
+
+ If error_pos is not ``NULL``, ``*error_pos`` is set to the index of the
+ invalid character on encoding error, or set to ``(size_t)-1`` otherwise.
+
+ Use the :c:func:`Py_DecodeLocale` function to decode the bytes string back
+ to a wide character string.
+
+ .. seealso::
+
+ The :c:func:`PyUnicode_EncodeFSDefault` and
+ :c:func:`PyUnicode_EncodeLocale` functions.
+
+ .. versionadded:: 3.5
+
+
.. _systemfunctions:
System Functions
diff --git a/Doc/c-api/typeobj.rst b/Doc/c-api/typeobj.rst
index 5de8be0680..ac589b87b8 100644
--- a/Doc/c-api/typeobj.rst
+++ b/Doc/c-api/typeobj.rst
@@ -208,21 +208,27 @@ type objects) *must* have the :attr:`ob_size` field.
.. c:member:: setattrfunc PyTypeObject.tp_setattr
- An optional pointer to the set-attribute-string function.
+ An optional pointer to the function for setting and deleting attributes.
This field is deprecated. When it is defined, it should point to a function
that acts the same as the :c:member:`~PyTypeObject.tp_setattro` function, but taking a C string
instead of a Python string object to give the attribute name. The signature is
- the same as for :c:func:`PyObject_SetAttrString`.
+ the same as for :c:func:`PyObject_SetAttrString`, but setting
+ *v* to *NULL* to delete an attribute must be supported.
This field is inherited by subtypes together with :c:member:`~PyTypeObject.tp_setattro`: a subtype
inherits both :c:member:`~PyTypeObject.tp_setattr` and :c:member:`~PyTypeObject.tp_setattro` from its base type when
the subtype's :c:member:`~PyTypeObject.tp_setattr` and :c:member:`~PyTypeObject.tp_setattro` are both *NULL*.
-.. c:member:: void* PyTypeObject.tp_reserved
+.. c:member:: PyAsyncMethods* tp_as_async
- Reserved slot, formerly known as tp_compare.
+ Pointer to an additional structure that contains fields relevant only to
+ objects which implement :term:`awaitable` and :term:`asynchronous iterator`
+ protocols at the C-level. See :ref:`async-structs` for details.
+
+ .. versionadded:: 3.5
+ Formerly known as ``tp_compare`` and ``tp_reserved``.
.. c:member:: reprfunc PyTypeObject.tp_repr
@@ -346,9 +352,10 @@ type objects) *must* have the :attr:`ob_size` field.
.. c:member:: setattrofunc PyTypeObject.tp_setattro
- An optional pointer to the set-attribute function.
+ An optional pointer to the function for setting and deleting attributes.
- The signature is the same as for :c:func:`PyObject_SetAttr`. It is usually
+ The signature is the same as for :c:func:`PyObject_SetAttr`, but setting
+ *v* to *NULL* to delete an attribute must be supported. It is usually
convenient to set this field to :c:func:`PyObject_GenericSetAttr`, which
implements the normal way of setting object attributes.
@@ -719,7 +726,7 @@ type objects) *must* have the :attr:`ob_size` field.
typedef struct PyGetSetDef {
char *name; /* attribute name */
getter get; /* C function to get the attribute */
- setter set; /* C function to set the attribute */
+ setter set; /* C function to set or delete the attribute */
char *doc; /* optional doc string */
void *closure; /* optional additional data for getter and setter */
} PyGetSetDef;
@@ -770,12 +777,14 @@ type objects) *must* have the :attr:`ob_size` field.
.. c:member:: descrsetfunc PyTypeObject.tp_descr_set
- An optional pointer to a "descriptor set" function.
+ An optional pointer to a function for setting and deleting
+ a descriptor's value.
The function signature is ::
int tp_descr_set(PyObject *self, PyObject *obj, PyObject *value);
+ The *value* argument is set to *NULL* to delete the value.
This field is inherited by subtypes.
.. XXX explain.
@@ -1118,6 +1127,9 @@ Number Object Structures
binaryfunc nb_inplace_true_divide;
unaryfunc nb_index;
+
+ binaryfunc nb_matrix_multiply;
+ binaryfunc nb_inplace_matrix_multiply;
} PyNumberMethods;
.. note::
@@ -1163,9 +1175,11 @@ Mapping Object Structures
.. c:member:: objobjargproc PyMappingMethods.mp_ass_subscript
- This function is used by :c:func:`PyObject_SetItem` and has the same
- signature. If this slot is *NULL*, the object does not support item
- assignment.
+ This function is used by :c:func:`PyObject_SetItem` and
+ :c:func:`PyObject_DelItem`. It has the same signature as
+ :c:func:`PyObject_SetItem`, but *v* can also be set to *NULL* to delete
+ an item. If this slot is *NULL*, the object does not support item
+ assignment and deletion.
.. _sequence-structs:
@@ -1214,7 +1228,7 @@ Sequence Object Structures
This function is used by :c:func:`PySequence_SetItem` and has the same
signature. This slot may be left to *NULL* if the object does not support
- item assignment.
+ item assignment and deletion.
.. c:member:: objobjproc PySequenceMethods.sq_contains
@@ -1329,3 +1343,58 @@ Buffer Object Structures
:c:func:`PyBuffer_Release` is the interface for the consumer that
wraps this function.
+
+
+.. _async-structs:
+
+
+Async Object Structures
+=======================
+
+.. sectionauthor:: Yury Selivanov <yselivanov@sprymix.com>
+
+.. versionadded:: 3.5
+
+.. c:type:: PyAsyncMethods
+
+ This structure holds pointers to the functions required to implement
+ :term:`awaitable` and :term:`asynchronous iterator` objects.
+
+ Here is the structure definition::
+
+ typedef struct {
+ unaryfunc am_await;
+ unaryfunc am_aiter;
+ unaryfunc am_anext;
+ } PyAsyncMethods;
+
+.. c:member:: unaryfunc PyAsyncMethods.am_await
+
+ The signature of this function is::
+
+ PyObject *am_await(PyObject *self)
+
+ The returned object must be an iterator, i.e. :c:func:`PyIter_Check` must
+ return ``1`` for it.
+
+ This slot may be set to *NULL* if an object is not an :term:`awaitable`.
+
+.. c:member:: unaryfunc PyAsyncMethods.am_aiter
+
+ The signature of this function is::
+
+ PyObject *am_aiter(PyObject *self)
+
+ Must return an :term:`awaitable` object. See :meth:`__anext__` for details.
+
+ This slot may be set to *NULL* if an object does not implement
+ asynchronous iteration protocol.
+
+.. c:member:: unaryfunc PyAsyncMethods.am_anext
+
+ The signature of this function is::
+
+ PyObject *am_anext(PyObject *self)
+
+ Must return an :term:`awaitable` object. See :meth:`__anext__` for details.
+ This slot may be set to *NULL*.
diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst
index f7e99d6d99..a0672ca257 100644
--- a/Doc/c-api/unicode.rst
+++ b/Doc/c-api/unicode.rst
@@ -367,7 +367,7 @@ These APIs can be used to work with surrogates:
.. c:macro:: Py_UNICODE_IS_HIGH_SURROGATE(ch)
- Check if *ch* is an high surrogate (``0xD800 <= ch <= 0xDBFF``).
+ Check if *ch* is a high surrogate (``0xD800 <= ch <= 0xDBFF``).
.. c:macro:: Py_UNICODE_IS_LOW_SURROGATE(ch)
@@ -423,7 +423,7 @@ APIs:
.. c:function:: PyObject *PyUnicode_FromString(const char *u)
- Create a Unicode object from an UTF-8 encoded null-terminated char buffer
+ Create a Unicode object from a UTF-8 encoded null-terminated char buffer
*u*.
@@ -450,7 +450,7 @@ APIs:
| :attr:`%%` | *n/a* | The literal % character. |
+-------------------+---------------------+--------------------------------+
| :attr:`%c` | int | A single character, |
- | | | represented as an C int. |
+ | | | represented as a C int. |
+-------------------+---------------------+--------------------------------+
| :attr:`%d` | int | Exactly equivalent to |
| | | ``printf("%d")``. |
@@ -556,14 +556,13 @@ APIs:
.. c:function:: PyObject* PyUnicode_FromEncodedObject(PyObject *obj, \
const char *encoding, const char *errors)
- Coerce an encoded object *obj* to an Unicode object and return a reference with
- incremented refcount.
+ Decode an encoded object *obj* to a Unicode object.
:class:`bytes`, :class:`bytearray` and other
:term:`bytes-like objects <bytes-like object>`
are decoded according to the given *encoding* and using the error handling
defined by *errors*. Both can be *NULL* to have the interface use the default
- values (see the next section for details).
+ values (see :ref:`builtincodecs` for details).
All other objects, including Unicode objects, cause a :exc:`TypeError` to be
set.
@@ -614,8 +613,7 @@ APIs:
This function checks that *unicode* is a Unicode object, that the index is
not out of bounds, and that the object can be modified safely (i.e. that it
- its reference count is one), in contrast to the macro version
- :c:func:`PyUnicode_WRITE_CHAR`.
+ its reference count is one).
.. versionadded:: 3.3
@@ -745,8 +743,11 @@ Extension modules can continue using them, as they will not be removed in Python
.. c:function:: PyObject* PyUnicode_FromObject(PyObject *obj)
- Shortcut for ``PyUnicode_FromEncodedObject(obj, NULL, "strict")`` which is used
- throughout the interpreter whenever coercion to Unicode is needed.
+ Copy an instance of a Unicode subtype to a new true Unicode object if
+ necessary. If *obj* is already a true Unicode object (not a subtype),
+ return the reference with incremented refcount.
+
+ Objects other than Unicode or its subtypes will cause a :exc:`TypeError`.
Locale Encoding
@@ -765,11 +766,13 @@ system.
*errors* is ``NULL``. *str* must end with a null character but
cannot contain embedded null characters.
+ Use :c:func:`PyUnicode_DecodeFSDefaultAndSize` to decode a string from
+ :c:data:`Py_FileSystemDefaultEncoding` (the locale encoding read at
+ Python startup).
+
.. seealso::
- Use :c:func:`PyUnicode_DecodeFSDefaultAndSize` to decode a string from
- :c:data:`Py_FileSystemDefaultEncoding` (the locale encoding read at
- Python startup).
+ The :c:func:`Py_DecodeLocale` function.
.. versionadded:: 3.3
@@ -790,11 +793,13 @@ system.
*errors* is ``NULL``. Return a :class:`bytes` object. *str* cannot
contain embedded null characters.
+ Use :c:func:`PyUnicode_EncodeFSDefault` to encode a string to
+ :c:data:`Py_FileSystemDefaultEncoding` (the locale encoding read at
+ Python startup).
+
.. seealso::
- Use :c:func:`PyUnicode_EncodeFSDefault` to encode a string to
- :c:data:`Py_FileSystemDefaultEncoding` (the locale encoding read at
- Python startup).
+ The :c:func:`Py_EncodeLocale` function.
.. versionadded:: 3.3
@@ -839,12 +844,14 @@ used, passing :c:func:`PyUnicode_FSDecoder` as the conversion function:
If :c:data:`Py_FileSystemDefaultEncoding` is not set, fall back to the
locale encoding.
+ :c:data:`Py_FileSystemDefaultEncoding` is initialized at startup from the
+ locale encoding and cannot be modified later. If you need to decode a string
+ from the current locale encoding, use
+ :c:func:`PyUnicode_DecodeLocaleAndSize`.
+
.. seealso::
- :c:data:`Py_FileSystemDefaultEncoding` is initialized at startup from the
- locale encoding and cannot be modified later. If you need to decode a
- string from the current locale encoding, use
- :c:func:`PyUnicode_DecodeLocaleAndSize`.
+ The :c:func:`Py_DecodeLocale` function.
.. versionchanged:: 3.2
Use ``"strict"`` error handler on Windows.
@@ -874,12 +881,13 @@ used, passing :c:func:`PyUnicode_FSDecoder` as the conversion function:
If :c:data:`Py_FileSystemDefaultEncoding` is not set, fall back to the
locale encoding.
+ :c:data:`Py_FileSystemDefaultEncoding` is initialized at startup from the
+ locale encoding and cannot be modified later. If you need to encode a string
+ to the current locale encoding, use :c:func:`PyUnicode_EncodeLocale`.
+
.. seealso::
- :c:data:`Py_FileSystemDefaultEncoding` is initialized at startup from the
- locale encoding and cannot be modified later. If you need to encode a
- string to the current locale encoding, use
- :c:func:`PyUnicode_EncodeLocale`.
+ The :c:func:`Py_EncodeLocale` function.
.. versionadded:: 3.2
@@ -1217,7 +1225,7 @@ These are the UTF-16 codec APIs:
If *Py_UNICODE_WIDE* is defined, a single :c:type:`Py_UNICODE` value may get
represented as a surrogate pair. If it is not defined, each :c:type:`Py_UNICODE`
- values is interpreted as an UCS-2 character.
+ values is interpreted as a UCS-2 character.
Return *NULL* if an exception was raised by the codec.
diff --git a/Doc/c-api/veryhigh.rst b/Doc/c-api/veryhigh.rst
index f8aaf0f67a..706efdfd55 100644
--- a/Doc/c-api/veryhigh.rst
+++ b/Doc/c-api/veryhigh.rst
@@ -307,10 +307,16 @@ the same library that the Python runtime is using.
cells.
+.. c:type:: PyFrameObject
+
+ The C structure of the objects used to describe frame objects. The
+ fields of this type are subject to change at any time.
+
+
.. c:function:: PyObject* PyEval_EvalFrame(PyFrameObject *f)
Evaluate an execution frame. This is a simplified interface to
- PyEval_EvalFrameEx, for backward compatibility.
+ :c:func:`PyEval_EvalFrameEx`, for backward compatibility.
.. c:function:: PyObject* PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
diff --git a/Doc/conf.py b/Doc/conf.py
index f803de238e..d6f20ba25c 100644
--- a/Doc/conf.py
+++ b/Doc/conf.py
@@ -17,7 +17,7 @@ extensions = ['sphinx.ext.coverage', 'sphinx.ext.doctest',
# General substitutions.
project = 'Python'
-copyright = '1990-%s, Python Software Foundation' % time.strftime('%Y')
+copyright = '2001-%s, Python Software Foundation' % time.strftime('%Y')
# We look for the Include/patchlevel.h file in the current Python source tree
# and replace the values accordingly.
@@ -36,6 +36,9 @@ highlight_language = 'python3'
# Require Sphinx 1.2 for build.
needs_sphinx = '1.2'
+# Ignore any .rst files in the venv/ directory.
+exclude_patterns = ['venv/*']
+
# Options for HTML output
# -----------------------
@@ -135,6 +138,11 @@ latex_appendices = ['glossary', 'about', 'license', 'copyright']
# Get LaTeX to handle Unicode correctly
latex_elements = {'inputenc': r'\usepackage[utf8x]{inputenc}', 'utf8extra': ''}
+# Options for Epub output
+# -----------------------
+
+epub_author = 'Python Documentation Authors'
+epub_publisher = 'Python Software Foundation'
# Options for the coverage checker
# --------------------------------
diff --git a/Doc/data/refcounts.dat b/Doc/data/refcounts.dat
index 6025617a1b..e388195757 100644
--- a/Doc/data/refcounts.dat
+++ b/Doc/data/refcounts.dat
@@ -349,6 +349,11 @@ PyErr_Format:PyObject*:exception:+1:
PyErr_Format:const char*:format::
PyErr_Format::...::
+PyErr_FormatV:PyObject*::null:
+PyErr_FormatV:PyObject*:exception:+1:
+PyErr_FormatV:const char*:format::
+PyErr_FormatV:va_list:vargs::
+
PyErr_WarnEx:int:::
PyErr_WarnEx:PyObject*:category:0:
PyErr_WarnEx:const char*:message::
@@ -486,6 +491,12 @@ PyFunction_SetDefaults:PyObject*:defaults:+1:
PyGen_New:PyObject*::+1:
PyGen_New:PyFrameObject*:frame:0:
+PyGen_NewWithQualName:PyObject*::+1:
+PyGen_NewWithQualName:PyFrameObject*:frame:0:
+
+PyCoro_New:PyObject*::+1:
+PyCoro_New:PyFrameObject*:frame:0:
+
Py_InitModule:PyObject*::0:
Py_InitModule:const char*:name::
Py_InitModule:PyMethodDef[]:methods::
diff --git a/Doc/distributing/index.rst b/Doc/distributing/index.rst
index 1774d23643..82ecd2c1ef 100644
--- a/Doc/distributing/index.rst
+++ b/Doc/distributing/index.rst
@@ -35,7 +35,7 @@ Key terms
repository of open source licensed packages made available for use by
other Python users
* the `Python Packaging Authority
- <https://packaging.python.org/en/latest/future.html>`__ are the group of
+ <https://www.pypa.io/>`__ are the group of
developers and documentation authors responsible for the maintenance and
evolution of the standard packaging tools and the associated metadata and
file format standards. They maintain a variety of tools, documentation
@@ -61,8 +61,8 @@ Key terms
extensions, to be installed on a system without needing to be built
locally.
-.. _setuptools: https://setuptools.pypa.io/en/latest/setuptools.html
-.. _wheel: http://wheel.readthedocs.org
+.. _setuptools: https://setuptools.readthedocs.io/en/latest/
+.. _wheel: https://wheel.readthedocs.org
Open source licensing and collaboration
=======================================
@@ -111,7 +111,7 @@ by invoking the ``pip`` module at the command line::
The Python Packaging User Guide includes more details on the `currently
recommended tools`_.
-.. _currently recommended tools: https://packaging.python.org/en/latest/current.html#packaging-tool-recommendations
+.. _currently recommended tools: https://packaging.python.org/en/latest/current/#packaging-tool-recommendations
Reading the guide
=================
@@ -124,11 +124,11 @@ involved in creating a project:
* `Uploading the project to the Python Packaging Index`_
.. _Project structure: \
- https://packaging.python.org/en/latest/distributing.html#creating-your-own-project
+ https://packaging.python.org/en/latest/distributing/
.. _Building and packaging the project: \
- https://packaging.python.org/en/latest/distributing.html#packaging-your-project
+ https://packaging.python.org/en/latest/distributing/#packaging-your-project
.. _Uploading the project to the Python Packaging Index: \
- https://packaging.python.org/en/latest/distributing.html#uploading-your-project-to-pypi
+ https://packaging.python.org/en/latest/distributing/#uploading-your-project-to-pypi
How do I...?
@@ -160,11 +160,11 @@ Python Packaging User Guide for more information and recommendations.
.. seealso::
`Python Packaging User Guide: Binary Extensions
- <https://packaging.python.org/en/latest/extensions.html>`__
+ <https://packaging.python.org/en/latest/extensions>`__
.. other topics:
Once the Development & Deployment part of PPUG is fleshed out, some of
those sections should be linked from new questions here (most notably,
we should have a question about avoiding depending on PyPI that links to
- https://packaging.python.org/en/latest/deployment.html#pypi-mirrors-and-caches)
+ https://packaging.python.org/en/latest/mirrors/)
diff --git a/Doc/distutils/apiref.rst b/Doc/distutils/apiref.rst
index f67fc5ae25..0672253471 100644
--- a/Doc/distutils/apiref.rst
+++ b/Doc/distutils/apiref.rst
@@ -319,12 +319,12 @@ This module provides the following functions.
.. function:: gen_preprocess_options(macros, include_dirs)
- Generate C pre-processor options (:option:`-D`, :option:`-U`, :option:`-I`) as
+ Generate C pre-processor options (:option:`-D`, :option:`!-U`, :option:`!-I`) as
used by at least two types of compilers: the typical Unix compiler and Visual
C++. *macros* is the usual thing, a list of 1- or 2-tuples, where ``(name,)``
- means undefine (:option:`-U`) macro *name*, and ``(name, value)`` means define
+ means undefine (:option:`!-U`) macro *name*, and ``(name, value)`` means define
(:option:`-D`) macro *name* to *value*. *include_dirs* is just a list of
- directory names to be added to the header file search path (:option:`-I`).
+ directory names to be added to the header file search path (:option:`!-I`).
Returns a list of command-line options suitable for either Unix compilers or
Visual C++.
@@ -799,7 +799,7 @@ This module provides the :class:`UnixCCompiler` class, a subclass of
* library search directories specified with :option:`-Ldir`
-* compile handled by :program:`cc` (or similar) executable with :option:`-c`
+* compile handled by :program:`cc` (or similar) executable with :option:`!-c`
option: compiles :file:`.c` to :file:`.o`
* link static library handled by :program:`ar` command (possibly with
@@ -837,7 +837,7 @@ selection by :class:`MSVCCompiler`.
.. module:: distutils.bcppcompiler
-This module provides :class:`BorlandCCompiler`, an subclass of the abstract
+This module provides :class:`BorlandCCompiler`, a subclass of the abstract
:class:`CCompiler` class for the Borland C++ compiler.
@@ -868,23 +868,31 @@ tarballs or zipfiles.
Create an archive file (eg. ``zip`` or ``tar``). *base_name* is the name of
the file to create, minus any format-specific extension; *format* is the
- archive format: one of ``zip``, ``tar``, ``ztar``, or ``gztar``. *root_dir* is
- a directory that will be the root directory of the archive; ie. we typically
- ``chdir`` into *root_dir* before creating the archive. *base_dir* is the
- directory where we start archiving from; ie. *base_dir* will be the common
- prefix of all files and directories in the archive. *root_dir* and *base_dir*
- both default to the current directory. Returns the name of the archive file.
+ archive format: one of ``zip``, ``tar``, ``gztar``, ``bztar``, ``xztar``, or
+ ``ztar``. *root_dir* is a directory that will be the root directory of the
+ archive; ie. we typically ``chdir`` into *root_dir* before creating the
+ archive. *base_dir* is the directory where we start archiving from; ie.
+ *base_dir* will be the common prefix of all files and directories in the
+ archive. *root_dir* and *base_dir* both default to the current directory.
+ Returns the name of the archive file.
+
+ .. versionchanged:: 3.5
+ Added support for the ``xztar`` format.
.. function:: make_tarball(base_name, base_dir[, compress='gzip', verbose=0, dry_run=0])
'Create an (optional compressed) archive as a tar file from all files in and
- under *base_dir*. *compress* must be ``'gzip'`` (the default), ``'compress'``,
- ``'bzip2'``, or ``None``. Both :program:`tar` and the compression utility named
- by *compress* must be on the default program search path, so this is probably
- Unix-specific. The output tar file will be named :file:`base_dir.tar`,
- possibly plus the appropriate compression extension (:file:`.gz`, :file:`.bz2`
- or :file:`.Z`). Return the output filename.
+ under *base_dir*. *compress* must be ``'gzip'`` (the default),
+ ``'bzip2'``, ``'xz'``, ``'compress'``, or ``None``. For the ``'compress'``
+ method the compression utility named by :program:`compress` must be on the
+ default program search path, so this is probably Unix-specific. The output
+ tar file will be named :file:`base_dir.tar`, possibly plus the appropriate
+ compression extension (``.gz``, ``.bz2``, ``.xz`` or ``.Z``). Return the
+ output filename.
+
+ .. versionchanged:: 3.5
+ Added support for the ``xz`` compression.
.. function:: make_zipfile(base_name, base_dir[, verbose=0, dry_run=0])
@@ -1193,12 +1201,12 @@ other utility module.
.. function:: byte_compile(py_files[, optimize=0, force=0, prefix=None, base_dir=None, verbose=1, dry_run=0, direct=None])
- Byte-compile a collection of Python source files to either :file:`.pyc` or
- :file:`.pyo` files in a :file:`__pycache__` subdirectory (see :pep:`3147`).
+ Byte-compile a collection of Python source files to :file:`.pyc` files in a
+ :file:`__pycache__` subdirectory (see :pep:`3147` and :pep:`488`).
*py_files* is a list of files to compile; any files that don't end in
:file:`.py` are silently skipped. *optimize* must be one of the following:
- * ``0`` - don't optimize (generate :file:`.pyc`)
+ * ``0`` - don't optimize
* ``1`` - normal optimization (like ``python -O``)
* ``2`` - extra optimization (like ``python -OO``)
@@ -1222,10 +1230,13 @@ other utility module.
doing, leave it set to ``None``.
.. versionchanged:: 3.2.3
- Create ``.pyc`` or ``.pyo`` files with an :func:`import magic tag
+ Create ``.pyc`` files with an :func:`import magic tag
<imp.get_tag>` in their name, in a :file:`__pycache__` subdirectory
instead of files without tag in the current directory.
+ .. versionchanged:: 3.5
+ Create ``.pyc`` files according to :pep:`488`.
+
.. function:: rfc822_escape(header)
@@ -1811,7 +1822,7 @@ Subclasses of :class:`Command` must define the following methods.
Builds a `Windows Installer`_ (.msi) binary package.
- .. _Windows Installer: http://msdn.microsoft.com/en-us/library/cc185688(VS.85).aspx
+ .. _Windows Installer: https://msdn.microsoft.com/en-us/library/cc185688(VS.85).aspx
In most cases, the ``bdist_msi`` installer is a better choice than the
``bdist_wininst`` installer, because it provides better support for
@@ -1896,9 +1907,9 @@ Subclasses of :class:`Command` must define the following methods.
that is designed to run with both Python 2.x and 3.x, add::
try:
- from distutils.command.build_py import build_py_2to3 as build_py
+ from distutils.command.build_py import build_py_2to3 as build_py
except ImportError:
- from distutils.command.build_py import build_py
+ from distutils.command.build_py import build_py
to your setup.py, and later::
diff --git a/Doc/distutils/builtdist.rst b/Doc/distutils/builtdist.rst
index c5827b63cf..523d1e0fff 100644
--- a/Doc/distutils/builtdist.rst
+++ b/Doc/distutils/builtdist.rst
@@ -72,13 +72,19 @@ The available formats for built distributions are:
+-------------+------------------------------+---------+
| Format | Description | Notes |
+=============+==============================+=========+
-| ``gztar`` | gzipped tar file | (1),(3) |
+| ``gztar`` | gzipped tar file | \(1) |
| | (:file:`.tar.gz`) | |
+-------------+------------------------------+---------+
+| ``bztar`` | bzipped tar file | |
+| | (:file:`.tar.bz2`) | |
++-------------+------------------------------+---------+
+| ``xztar`` | xzipped tar file | |
+| | (:file:`.tar.xz`) | |
++-------------+------------------------------+---------+
| ``ztar`` | compressed tar file | \(3) |
| | (:file:`.tar.Z`) | |
+-------------+------------------------------+---------+
-| ``tar`` | tar file (:file:`.tar`) | \(3) |
+| ``tar`` | tar file (:file:`.tar`) | |
+-------------+------------------------------+---------+
| ``zip`` | zip file (:file:`.zip`) | (2),(4) |
+-------------+------------------------------+---------+
@@ -94,6 +100,9 @@ The available formats for built distributions are:
| ``msi`` | Microsoft Installer. | |
+-------------+------------------------------+---------+
+.. versionchanged:: 3.5
+ Added support for the ``xztar`` format.
+
Notes:
@@ -104,8 +113,7 @@ Notes:
default on Windows
(3)
- requires external utilities: :program:`tar` and possibly one of :program:`gzip`,
- :program:`bzip2`, or :program:`compress`
+ requires external :program:`compress` utility.
(4)
requires either external :program:`zip` utility or :mod:`zipfile` module (part
@@ -119,21 +127,22 @@ You don't have to use the :command:`bdist` command with the :option:`--formats`
option; you can also use the command that directly implements the format you're
interested in. Some of these :command:`bdist` "sub-commands" actually generate
several similar formats; for instance, the :command:`bdist_dumb` command
-generates all the "dumb" archive formats (``tar``, ``ztar``, ``gztar``, and
-``zip``), and :command:`bdist_rpm` generates both binary and source RPMs. The
-:command:`bdist` sub-commands, and the formats generated by each, are:
-
-+--------------------------+-----------------------+
-| Command | Formats |
-+==========================+=======================+
-| :command:`bdist_dumb` | tar, ztar, gztar, zip |
-+--------------------------+-----------------------+
-| :command:`bdist_rpm` | rpm, srpm |
-+--------------------------+-----------------------+
-| :command:`bdist_wininst` | wininst |
-+--------------------------+-----------------------+
-| :command:`bdist_msi` | msi |
-+--------------------------+-----------------------+
+generates all the "dumb" archive formats (``tar``, ``gztar``, ``bztar``,
+``xztar``, ``ztar``, and ``zip``), and :command:`bdist_rpm` generates both
+binary and source RPMs. The :command:`bdist` sub-commands, and the formats
+generated by each, are:
+
++--------------------------+-------------------------------------+
+| Command | Formats |
++==========================+=====================================+
+| :command:`bdist_dumb` | tar, gztar, bztar, xztar, ztar, zip |
++--------------------------+-------------------------------------+
+| :command:`bdist_rpm` | rpm, srpm |
++--------------------------+-------------------------------------+
+| :command:`bdist_wininst` | wininst |
++--------------------------+-------------------------------------+
+| :command:`bdist_msi` | msi |
++--------------------------+-------------------------------------+
The following sections give details on the individual :command:`bdist_\*`
commands.
diff --git a/Doc/distutils/configfile.rst b/Doc/distutils/configfile.rst
index 8faffe6c20..51d88971a4 100644
--- a/Doc/distutils/configfile.rst
+++ b/Doc/distutils/configfile.rst
@@ -51,7 +51,7 @@ option values can be split across multiple lines simply by indenting the
continuation lines.
You can find out the list of options supported by a particular command with the
-universal :option:`--help` option, e.g. ::
+universal :option:`!--help` option, e.g. ::
> python setup.py --help build_ext
[...]
diff --git a/Doc/distutils/index.rst b/Doc/distutils/index.rst
index 335f804d42..c565bcc562 100644
--- a/Doc/distutils/index.rst
+++ b/Doc/distutils/index.rst
@@ -7,6 +7,11 @@
:Authors: Greg Ward, Anthony Baxter
:Email: distutils-sig@python.org
+.. seealso::
+
+ :ref:`distributing-index`
+ The up to date module distribution documentations
+
This document describes the Python Distribution Utilities ("Distutils") from
the module developer's point of view, describing how to use the Distutils to
make Python modules and extensions easily available to a wider audience with
@@ -20,7 +25,6 @@ very little overhead for build/release/install mechanics.
recommendations section <https://packaging.python.org/en/latest/current/>`__
in the Python Packaging User Guide for more information.
-
.. toctree::
:maxdepth: 2
:numbered:
diff --git a/Doc/distutils/introduction.rst b/Doc/distutils/introduction.rst
index 0ece646c34..8f46bd74c5 100644
--- a/Doc/distutils/introduction.rst
+++ b/Doc/distutils/introduction.rst
@@ -156,8 +156,8 @@ module
pure Python module
a module written in Python and contained in a single :file:`.py` file (and
- possibly associated :file:`.pyc` and/or :file:`.pyo` files). Sometimes referred
- to as a "pure module."
+ possibly associated :file:`.pyc` files). Sometimes referred to as a
+ "pure module."
extension module
a module written in the low-level language of the Python implementation: C/C++
@@ -210,5 +210,3 @@ distribution root
the top-level directory of your source tree (or source distribution); the
directory where :file:`setup.py` exists. Generally :file:`setup.py` will be
run from this directory.
-
-
diff --git a/Doc/distutils/sourcedist.rst b/Doc/distutils/sourcedist.rst
index b9f0cc863b..fb70514b79 100644
--- a/Doc/distutils/sourcedist.rst
+++ b/Doc/distutils/sourcedist.rst
@@ -32,12 +32,18 @@ to create a gzipped tarball and a zip file. The available formats are:
| ``bztar`` | bzip2'ed tar file | |
| | (:file:`.tar.bz2`) | |
+-----------+-------------------------+---------+
+| ``xztar`` | xz'ed tar file | |
+| | (:file:`.tar.xz`) | |
++-----------+-------------------------+---------+
| ``ztar`` | compressed tar file | \(4) |
| | (:file:`.tar.Z`) | |
+-----------+-------------------------+---------+
| ``tar`` | tar file (:file:`.tar`) | |
+-----------+-------------------------+---------+
+.. versionchanged:: 3.5
+ Added support for the ``xztar`` format.
+
Notes:
(1)
@@ -54,7 +60,7 @@ Notes:
requires the :program:`compress` program. Notice that this format is now
pending for deprecation and will be removed in the future versions of Python.
-When using any ``tar`` format (``gztar``, ``bztar``, ``ztar`` or
+When using any ``tar`` format (``gztar``, ``bztar``, ``xztar``, ``ztar`` or
``tar``), under Unix you can specify the ``owner`` and ``group`` names
that will be set for each member of the archive.
diff --git a/Doc/extending/building.rst b/Doc/extending/building.rst
index 656af88131..b5ccee75fe 100644
--- a/Doc/extending/building.rst
+++ b/Doc/extending/building.rst
@@ -1,27 +1,58 @@
.. highlightlang:: c
-
.. _building:
-********************************************
-Building C and C++ Extensions with distutils
-********************************************
+*****************************
+Building C and C++ Extensions
+*****************************
-.. sectionauthor:: Martin v. Löwis <martin@v.loewis.de>
+A C extension for CPython is a shared library (e.g. a ``.so`` file on Linux,
+``.pyd`` on Windows), which exports an *initialization function*.
+
+To be importable, the shared library must be available on :envvar:`PYTHONPATH`,
+and must be named after the module name, with an appropriate extension.
+When using distutils, the correct filename is generated automatically.
+
+The initialization function has the signature:
+
+.. c:function:: PyObject* PyInit_modulename(void)
+
+It returns either a fully-initialized module, or a :c:type:`PyModuleDef`
+instance. See :ref:`initializing-modules` for details.
+
+.. highlightlang:: python
+For modules with ASCII-only names, the function must be named
+``PyInit_<modulename>``, with ``<modulename>`` replaced by the name of the
+module. When using :ref:`multi-phase-initialization`, non-ASCII module names
+are allowed. In this case, the initialization function name is
+``PyInitU_<modulename>``, with ``<modulename>`` encoded using Python's
+*punycode* encoding with hyphens replaced by underscores. In Python::
-Starting in Python 1.4, Python provides, on Unix, a special make file for
-building make files for building dynamically-linked extensions and custom
-interpreters. Starting with Python 2.0, this mechanism (known as related to
-Makefile.pre.in, and Setup files) is no longer supported. Building custom
-interpreters was rarely used, and extension modules can be built using
-distutils.
+ def initfunc_name(name):
+ try:
+ suffix = b'_' + name.encode('ascii')
+ except UnicodeEncodeError:
+ suffix = b'U_' + name.encode('punycode').replace(b'-', b'_')
+ return b'PyInit' + suffix
+
+It is possible to export multiple modules from a single shared library by
+defining multiple initialization functions. However, importing them requires
+using symbolic links or a custom importer, because by default only the
+function corresponding to the filename is found.
+See the *"Multiple modules in one library"* section in :pep:`489` for details.
+
+
+.. highlightlang:: c
+
+Building C and C++ Extensions with distutils
+============================================
+
+.. sectionauthor:: Martin v. Löwis <martin@v.loewis.de>
-Building an extension module using distutils requires that distutils is
-installed on the build machine, which is included in Python 2.x and available
-separately for Python 1.5. Since distutils also supports creation of binary
-packages, users don't necessarily need a compiler and distutils to install the
-extension.
+Extension modules can be built using distutils, which is included in Python.
+Since distutils also supports creation of binary packages, users don't
+necessarily need a compiler and distutils to install the extension.
A distutils package contains a driver script, :file:`setup.py`. This is a plain
Python file, which, in the most simple case, could look like this::
@@ -50,14 +81,15 @@ In the :file:`setup.py`, all execution is performed by calling the ``setup``
function. This takes a variable number of keyword arguments, of which the
example above uses only a subset. Specifically, the example specifies
meta-information to build packages, and it specifies the contents of the
-package. Normally, a package will contain of addition modules, like Python
+package. Normally, a package will contain additional modules, like Python
source modules, documentation, subpackages, etc. Please refer to the distutils
documentation in :ref:`distutils-index` to learn more about the features of
distutils; this section explains building extension modules only.
It is common to pre-compute arguments to :func:`setup`, to better structure the
driver script. In the example above, the ``ext_modules`` argument to
-:func:`setup` is a list of extension modules, each of which is an instance of
+:func:`~distutils.core.setup` is a list of extension modules, each of which is
+an instance of
the :class:`~distutils.extension.Extension`. In the example, the instance
defines an extension named ``demo`` which is build by compiling a single source
file, :file:`demo.c`.
@@ -88,7 +120,8 @@ example below. ::
ext_modules = [module1])
-In this example, :func:`setup` is called with additional meta-information, which
+In this example, :func:`~distutils.core.setup` is called with additional
+meta-information, which
is recommended when distribution packages have to be built. For the extension
itself, it specifies preprocessor defines, include directories, library
directories, and libraries. Depending on the compiler, distutils passes this
@@ -119,8 +152,7 @@ Module maintainers should produce source packages; to do so, they run ::
python setup.py sdist
In some cases, additional files need to be included in a source distribution;
-this is done through a :file:`MANIFEST.in` file; see the distutils documentation
-for details.
+this is done through a :file:`MANIFEST.in` file; see :ref:`manifest` for details.
If the source distribution has been build successfully, maintainers can also
create binary distributions. Depending on the platform, one of the following
diff --git a/Doc/extending/embedding.rst b/Doc/extending/embedding.rst
index 6cb686ab09..acd60aef8c 100644
--- a/Doc/extending/embedding.rst
+++ b/Doc/extending/embedding.rst
@@ -58,12 +58,18 @@ perform some operation on a file. ::
int
main(int argc, char *argv[])
{
- Py_SetProgramName(argv[0]); /* optional but recommended */
- Py_Initialize();
- PyRun_SimpleString("from time import time,ctime\n"
- "print('Today is', ctime(time()))\n");
- Py_Finalize();
- return 0;
+ wchar_t *program = Py_DecodeLocale(argv[0], NULL);
+ if (program == NULL) {
+ fprintf(stderr, "Fatal error: cannot decode argv[0]\n");
+ exit(1);
+ }
+ Py_SetProgramName(program); /* optional but recommended */
+ Py_Initialize();
+ PyRun_SimpleString("from time import time,ctime\n"
+ "print('Today is', ctime(time()))\n");
+ Py_Finalize();
+ PyMem_RawFree(program);
+ return 0;
}
The :c:func:`Py_SetProgramName` function should be called before
@@ -160,7 +166,7 @@ for data conversion between Python and C, and for error reporting. The
interesting part with respect to embedding Python starts with ::
Py_Initialize();
- pName = PyUnicode_FromString(argv[1]);
+ pName = PyUnicode_DecodeFSDefault(argv[1]);
/* Error checking of pName left out */
pModule = PyImport_Import(pName);
diff --git a/Doc/extending/extending.rst b/Doc/extending/extending.rst
index ba6bfa70a2..523dfab70c 100644
--- a/Doc/extending/extending.rst
+++ b/Doc/extending/extending.rst
@@ -27,7 +27,7 @@ your system setup; details are given in later chapters.
avoid writing C extensions and preserve portability to other implementations.
For example, if your use case is calling C library functions or system calls,
you should consider using the :mod:`ctypes` module or the `cffi
- <http://cffi.readthedocs.org>`_ library rather than writing custom C code.
+ <https://cffi.readthedocs.org>`_ library rather than writing custom C code.
These modules let you write Python code to interface with C code and are more
portable between implementations of Python than writing and compiling a C
extension module.
@@ -375,11 +375,17 @@ optionally followed by an import of the module::
int
main(int argc, char *argv[])
{
+ wchar_t *program = Py_DecodeLocale(argv[0], NULL);
+ if (program == NULL) {
+ fprintf(stderr, "Fatal error: cannot decode argv[0]\n");
+ exit(1);
+ }
+
/* Add a built-in module, before Py_Initialize */
PyImport_AppendInittab("spam", PyInit_spam);
/* Pass argv[0] to the Python interpreter */
- Py_SetProgramName(argv[0]);
+ Py_SetProgramName(program);
/* Initialize the Python interpreter. Required. */
Py_Initialize();
@@ -391,6 +397,10 @@ optionally followed by an import of the module::
...
+ PyMem_RawFree(program);
+ return 0;
+ }
+
.. note::
Removing entries from ``sys.modules`` or importing compiled modules into
@@ -403,6 +413,13 @@ A more substantial example module is included in the Python source distribution
as :file:`Modules/xxmodule.c`. This file may be used as a template or simply
read as an example.
+.. note::
+
+ Unlike our ``spam`` example, ``xxmodule`` uses *multi-phase initialization*
+ (new in Python 3.5), where a PyModuleDef structure is returned from
+ ``PyInit_spam``, and creation of the module is left to the import machinery.
+ For details on multi-phase initialization, see :PEP:`489`.
+
.. _compilation:
diff --git a/Doc/extending/index.rst b/Doc/extending/index.rst
index dd43926450..9eec8c273a 100644
--- a/Doc/extending/index.rst
+++ b/Doc/extending/index.rst
@@ -32,7 +32,7 @@ approaches to creating C and C++ extensions for Python.
.. seealso::
- `Python Packaging User Guide: Binary Extensions <https://packaging.python.org/en/latest/extensions.html>`_
+ `Python Packaging User Guide: Binary Extensions <https://packaging.python.org/en/latest/extensions/>`_
The Python Packaging User Guide not only covers several available
tools that simplify the creation of binary extensions, but also
discusses the various reasons why creating an extension module may be
diff --git a/Doc/extending/newtypes.rst b/Doc/extending/newtypes.rst
index 0884430044..f60e208e86 100644
--- a/Doc/extending/newtypes.rst
+++ b/Doc/extending/newtypes.rst
@@ -80,7 +80,7 @@ Moving on, we come to the crunch --- the type object. ::
0, /* tp_print */
0, /* tp_getattr */
0, /* tp_setattr */
- 0, /* tp_reserved */
+ 0, /* tp_as_async */
0, /* tp_repr */
0, /* tp_as_number */
0, /* tp_as_sequence */
diff --git a/Doc/faq/design.rst b/Doc/faq/design.rst
index 9fdf8cb949..1b6cd7e241 100644
--- a/Doc/faq/design.rst
+++ b/Doc/faq/design.rst
@@ -158,7 +158,7 @@ where in Python you're forced to write this::
line = f.readline()
if not line:
break
- ... # do something with line
+ ... # do something with line
The reason for not allowing assignment in Python expressions is a common,
hard-to-find bug in those other languages, caused by this construct:
@@ -190,7 +190,7 @@ generally less robust than the "while True" solution::
line = f.readline()
while line:
- ... # do something with line...
+ ... # do something with line...
line = f.readline()
The problem with this is that if you change your mind about exactly how you get
@@ -203,7 +203,7 @@ objects using the ``for`` statement. For example, :term:`file objects
<file object>` support the iterator protocol, so you can write simply::
for line in f:
- ... # do something with line...
+ ... # do something with line...
@@ -368,9 +368,9 @@ Can Python be compiled to machine code, C or some other language?
Practical answer:
-`Cython <http://cython.org/>`_ and `Pyrex <http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/>`_
+`Cython <http://cython.org/>`_ and `Pyrex <https://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/>`_
compile a modified version of Python with optional annotations into C
-extensions. `Weave <http://docs.scipy.org/doc/scipy-dev/reference/tutorial/weave.html>`_ makes it easy to
+extensions. `Weave <https://scipy.github.io/devdocs/tutorial/weave.html>`_ makes it easy to
intermingle Python and C code in various ways to increase performance.
`Nuitka <http://www.nuitka.net/>`_ is an up-and-coming compiler of Python
into C++ code, aiming to support the full Python language.
@@ -577,8 +577,10 @@ other structure). ::
class ListWrapper:
def __init__(self, the_list):
self.the_list = the_list
+
def __eq__(self, other):
return self.the_list == other.the_list
+
def __hash__(self):
l = self.the_list
result = 98767 - len(l)*555
@@ -619,7 +621,7 @@ it and returns it. For example, here's how to iterate over the keys of a
dictionary in sorted order::
for key in sorted(mydict):
- ... # do whatever with mydict[key]...
+ ... # do whatever with mydict[key]...
How do you specify and enforce an interface spec in Python?
@@ -675,11 +677,11 @@ languages. For example::
class label(Exception): pass # declare a label
try:
- ...
- if condition: raise label() # goto label
- ...
+ ...
+ if condition: raise label() # goto label
+ ...
except label: # where to goto
- pass
+ pass
...
This doesn't allow you to jump into the middle of a loop, but that's usually
diff --git a/Doc/faq/extending.rst b/Doc/faq/extending.rst
index 7bb4dc2e60..852e35f8b5 100644
--- a/Doc/faq/extending.rst
+++ b/Doc/faq/extending.rst
@@ -42,7 +42,7 @@ on what you're trying to do.
.. XXX make sure these all work
`Cython <http://cython.org>`_ and its relative `Pyrex
-<http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/>`_ are compilers
+<https://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/>`_ are compilers
that accept a slightly modified form of Python and generate the corresponding
C code. Cython and Pyrex make it possible to write an extension without having
to learn Python's C API.
@@ -50,10 +50,10 @@ to learn Python's C API.
If you need to interface to some C or C++ library for which no Python extension
currently exists, you can try wrapping the library's data types and functions
with a tool such as `SWIG <http://www.swig.org>`_. `SIP
-<http://www.riverbankcomputing.co.uk/software/sip/intro>`__, `CXX
+<https://riverbankcomputing.com/software/sip/intro>`__, `CXX
<http://cxx.sourceforge.net/>`_ `Boost
<http://www.boost.org/libs/python/doc/index.html>`_, or `Weave
-<http://docs.scipy.org/doc/scipy-dev/reference/tutorial/weave.html>`_ are also
+<https://scipy.github.io/devdocs/tutorial/weave.html>`_ are also
alternatives for wrapping C++ libraries.
@@ -247,20 +247,6 @@ For Red Hat, install the python-devel RPM to get the necessary files.
For Debian, run ``apt-get install python-dev``.
-What does "SystemError: _PyImport_FixupExtension: module yourmodule not loaded" mean?
--------------------------------------------------------------------------------------
-
-This means that you have created an extension module named "yourmodule", but
-your module init function does not initialize with that name.
-
-Every module init function will have a line similar to::
-
- module = Py_InitModule("yourmodule", yourmodule_functions);
-
-If the string passed to this function is not the same name as your extension
-module, the :exc:`SystemError` exception will be raised.
-
-
How do I tell "incomplete input" from "invalid input"?
------------------------------------------------------
diff --git a/Doc/faq/general.rst b/Doc/faq/general.rst
index 2221f14927..6b773dd1e9 100644
--- a/Doc/faq/general.rst
+++ b/Doc/faq/general.rst
@@ -146,10 +146,9 @@ labeled 2.0aN precede the versions labeled 2.0bN, which precede versions labeled
2.0cN, and *those* precede 2.0.
You may also find version numbers with a "+" suffix, e.g. "2.2+". These are
-unreleased versions, built directly from the Subversion trunk. In practice,
-after a final minor release is made, the Subversion trunk is incremented to the
-next minor version, which becomes the "a0" version,
-e.g. "2.4a0".
+unreleased versions, built directly from the CPython development repository. In
+practice, after a final minor release is made, the version is incremented to the
+next minor version, which becomes the "a0" version, e.g. "2.4a0".
See also the documentation for :data:`sys.version`, :data:`sys.hexversion`, and
:data:`sys.version_info`.
@@ -159,7 +158,7 @@ How do I obtain a copy of the Python source?
--------------------------------------------
The latest Python source distribution is always available from python.org, at
-https://www.python.org/download/. The latest development sources can be obtained
+https://www.python.org/downloads/. The latest development sources can be obtained
via anonymous Mercurial access at https://hg.python.org/cpython.
The source distribution is a gzipped tar file containing the complete C source,
@@ -218,7 +217,7 @@ can be found at https://www.python.org/community/lists/.
How do I get a beta test version of Python?
-------------------------------------------
-Alpha and beta releases are available from https://www.python.org/download/. All
+Alpha and beta releases are available from https://www.python.org/downloads/. All
releases are announced on the comp.lang.python and comp.lang.python.announce
newsgroups and on the Python home page at https://www.python.org/; an RSS feed of
news is available.
@@ -271,9 +270,9 @@ Where in the world is www.python.org located?
The Python project's infrastructure is located all over the world.
`www.python.org <https://www.python.org>`_ is graciously hosted by `Rackspace
-<http://www.rackspace.com>`_, with CDN caching provided by `Fastly
+<https://www.rackspace.com>`_, with CDN caching provided by `Fastly
<https://www.fastly.com>`_. `Upfront Systems
-<http://www.upfrontsystems.co.za>`_ hosts `bugs.python.org
+<http://www.upfrontsystems.co.za/>`_ hosts `bugs.python.org
<https://bugs.python.org>`_. Many other Python services like `the Wiki
<https://wiki.python.org>`_ are hosted by `Oregon State
University Open Source Lab <https://osuosl.org>`_.
@@ -284,7 +283,7 @@ Why is it called Python?
When he began implementing Python, Guido van Rossum was also reading the
published scripts from `"Monty Python's Flying Circus"
-<http://en.wikipedia.org/wiki/Monty_Python>`__, a BBC comedy series from the 1970s. Van Rossum
+<https://en.wikipedia.org/wiki/Monty_Python>`__, a BBC comedy series from the 1970s. Van Rossum
thought he needed a name that was short, unique, and slightly mysterious, so he
decided to call the language Python.
@@ -313,7 +312,7 @@ guaranteed that interfaces will remain the same throughout a series of bugfix
releases.
The latest stable releases can always be found on the `Python download page
-<https://www.python.org/download/>`_. There are two recommended production-ready
+<https://www.python.org/downloads/>`_. There are two recommended production-ready
versions at this point in time, because at the moment there are two branches of
stable releases: 2.x and 3.x. Python 3.x may be less useful than 2.x, since
currently there is more third party software available for Python 2 than for
@@ -345,7 +344,7 @@ different companies and organizations.
High-profile Python projects include `the Mailman mailing list manager
<http://www.list.org>`_ and `the Zope application server
<http://www.zope.org>`_. Several Linux distributions, most notably `Red Hat
-<http://www.redhat.com>`_, have written part or all of their installer and
+<https://www.redhat.com>`_, have written part or all of their installer and
system administration software in Python. Companies that use Python internally
include Google, Yahoo, and Lucasfilm Ltd.
diff --git a/Doc/faq/gui.rst b/Doc/faq/gui.rst
index 5122de1c1a..98a28c3c8a 100644
--- a/Doc/faq/gui.rst
+++ b/Doc/faq/gui.rst
@@ -29,15 +29,15 @@ Tkinter
Standard builds of Python include an object-oriented interface to the Tcl/Tk
widget set, called :ref:`tkinter <Tkinter>`. This is probably the easiest to
install (since it comes included with most
-`binary distributions <https://www.python.org/download/>`_ of Python) and use.
+`binary distributions <https://www.python.org/downloads/>`_ of Python) and use.
For more info about Tk, including pointers to the source, see the
-`Tcl/Tk home page <http://www.tcl.tk>`_. Tcl/Tk is fully portable to the
+`Tcl/Tk home page <https://www.tcl.tk>`_. Tcl/Tk is fully portable to the
Mac OS X, Windows, and Unix platforms.
wxWidgets
---------
-wxWidgets (http://www.wxwidgets.org) is a free, portable GUI class
+wxWidgets (https://www.wxwidgets.org) is a free, portable GUI class
library written in C++ that provides a native look and feel on a
number of platforms, with Windows, Mac OS X, GTK, X11, all listed as
current stable targets. Language bindings are available for a number
@@ -58,21 +58,21 @@ Qt
---
There are bindings available for the Qt toolkit (using either `PyQt
-<http://www.riverbankcomputing.co.uk/software/pyqt/intro>`_ or `PySide
-<http://www.pyside.org/>`_) and for KDE (`PyKDE <https://techbase.kde.org/Development/Languages/Python>`__).
+<https://riverbankcomputing.com/software/pyqt/intro>`_ or `PySide
+<https://wiki.qt.io/PySide>`_) and for KDE (`PyKDE4 <https://techbase.kde.org/Languages/Python/Using_PyKDE_4>`__).
PyQt is currently more mature than PySide, but you must buy a PyQt license from
-`Riverbank Computing <http://www.riverbankcomputing.co.uk/software/pyqt/license>`_
+`Riverbank Computing <https://www.riverbankcomputing.com/commercial/license-faq>`_
if you want to write proprietary applications. PySide is free for all applications.
Qt 4.5 upwards is licensed under the LGPL license; also, commercial licenses
-are available from `The Qt Company <http://www.qt.io/licensing/>`_.
+are available from `The Qt Company <https://www.qt.io/licensing/>`_.
Gtk+
----
-The `GObject introspection bindings <https://live.gnome.org/PyGObject>`_
+The `GObject introspection bindings <https://wiki.gnome.org/Projects/PyGObject>`_
for Python allow you to write GTK+ 3 applications. There is also a
-`Python GTK+ 3 Tutorial <http://python-gtk-3-tutorial.readthedocs.org/en/latest/>`_.
+`Python GTK+ 3 Tutorial <https://python-gtk-3-tutorial.readthedocs.org/en/latest/>`_.
The older PyGtk bindings for the `Gtk+ 2 toolkit <http://www.gtk.org>`_ have
been implemented by James Henstridge; see <http://www.pygtk.org>.
diff --git a/Doc/faq/library.rst b/Doc/faq/library.rst
index 064728ff68..b5fdfa42cd 100644
--- a/Doc/faq/library.rst
+++ b/Doc/faq/library.rst
@@ -257,7 +257,8 @@ all the threads to finish::
import threading, time
def thread_task(name, n):
- for i in range(n): print(name, i)
+ for i in range(n):
+ print(name, i)
for i in range(10):
T = threading.Thread(target=thread_task, args=(str(i), i))
@@ -273,7 +274,8 @@ A simple fix is to add a tiny sleep to the start of the run function::
def thread_task(name, n):
time.sleep(0.001) # <--------------------!
- for i in range(n): print(name, i)
+ for i in range(n):
+ print(name, i)
for i in range(10):
T = threading.Thread(target=thread_task, args=(str(i), i))
@@ -502,8 +504,8 @@ in big-endian format from a file::
import struct
with open(filename, "rb") as f:
- s = f.read(8)
- x, y, z = struct.unpack(">hhl", s)
+ s = f.read(8)
+ x, y, z = struct.unpack(">hhl", s)
The '>' in the format string forces big-endian data; the letter 'h' reads one
"short integer" (2 bytes), and 'l' reads one "long integer" (4 bytes) from the
@@ -619,7 +621,7 @@ For Win32, POSIX (Linux, BSD, etc.), Jython:
For Unix, see a Usenet post by Mitch Chapman:
- http://groups.google.com/groups?selm=34A04430.CF9@ohioee.com
+ https://groups.google.com/groups?selm=34A04430.CF9@ohioee.com
Why doesn't closing sys.stdout (stdin, stderr) really close it?
@@ -681,10 +683,10 @@ Yes. Here's a simple example that uses urllib.request::
import urllib.request
- ### build the query string
+ # build the query string
qs = "First=Josephine&MI=Q&Last=Public"
- ### connect and send the server a path
+ # connect and send the server a path
req = urllib.request.urlopen('http://www.some-server.out-there'
'/cgi-bin/some-cgi-script', data=qs)
with req:
@@ -740,8 +742,9 @@ varies between systems; sometimes it is ``/usr/lib/sendmail``, sometimes
``/usr/sbin/sendmail``. The sendmail manual page will help you out. Here's
some sample code::
- SENDMAIL = "/usr/sbin/sendmail" # sendmail location
import os
+
+ SENDMAIL = "/usr/sbin/sendmail" # sendmail location
p = os.popen("%s -t -i" % SENDMAIL, "w")
p.write("To: receiver@example.com\n")
p.write("Subject: test\n")
diff --git a/Doc/faq/programming.rst b/Doc/faq/programming.rst
index 94b428d299..694753e5b9 100644
--- a/Doc/faq/programming.rst
+++ b/Doc/faq/programming.rst
@@ -28,9 +28,9 @@ graphical debugger.
PythonWin is a Python IDE that includes a GUI debugger based on pdb. The
Pythonwin debugger colors breakpoints and has quite a few cool features such as
debugging non-Pythonwin programs. Pythonwin is available as part of the `Python
-for Windows Extensions <http://sourceforge.net/projects/pywin32/>`__ project and
+for Windows Extensions <https://sourceforge.net/projects/pywin32/>`__ project and
as a part of the ActivePython distribution (see
-http://www.activestate.com/activepython\ ).
+https://www.activestate.com/activepython\ ).
`Boa Constructor <http://boa-constructor.sourceforge.net/>`_ is an IDE and GUI
builder that uses wxWidgets. It offers visual frame creation and manipulation,
@@ -44,13 +44,13 @@ and the Scintilla editing component.
Pydb is a version of the standard Python debugger pdb, modified for use with DDD
(Data Display Debugger), a popular graphical debugger front end. Pydb can be
found at http://bashdb.sourceforge.net/pydb/ and DDD can be found at
-http://www.gnu.org/software/ddd.
+https://www.gnu.org/software/ddd.
There are a number of commercial Python IDEs that include graphical debuggers.
They include:
-* Wing IDE (http://wingware.com/)
-* Komodo IDE (http://komodoide.com/)
+* Wing IDE (https://wingware.com/)
+* Komodo IDE (https://komodoide.com/)
* PyCharm (https://www.jetbrains.com/pycharm/)
@@ -63,13 +63,13 @@ PyChecker is a static analysis tool that finds bugs in Python source code and
warns about code complexity and style. You can get PyChecker from
http://pychecker.sourceforge.net/.
-`Pylint <http://www.logilab.org/projects/pylint>`_ is another tool that checks
+`Pylint <https://www.pylint.org/>`_ is another tool that checks
if a module satisfies a coding standard, and also makes it possible to write
plug-ins to add a custom feature. In addition to the bug checking that
PyChecker performs, Pylint offers some additional features such as checking line
length, whether variable names are well-formed according to your coding
standard, whether declared interfaces are fully implemented, and more.
-http://docs.pylint.org/ provides a full list of Pylint's features.
+https://docs.pylint.org/ provides a full list of Pylint's features.
How can I create a stand-alone binary from a Python script?
@@ -207,7 +207,7 @@ functions), e.g.::
>>> squares = []
>>> for x in range(5):
- ... squares.append(lambda: x**2)
+ ... squares.append(lambda: x**2)
This gives you a list that contains 5 lambdas that calculate ``x**2``. You
might expect that, when called, they would return, respectively, ``0``, ``1``,
@@ -234,7 +234,7 @@ lambdas, so that they don't rely on the value of the global ``x``::
>>> squares = []
>>> for x in range(5):
- ... squares.append(lambda n=x: n**2)
+ ... squares.append(lambda n=x: n**2)
Here, ``n=x`` creates a new variable ``n`` local to the lambda and computed
when the lambda is defined so that it has the same value that ``x`` had at
@@ -539,7 +539,7 @@ desired effect in a number of ways.
args['a'] = 'new-value' # args is a mutable dictionary
args['b'] = args['b'] + 1 # change it in-place
- args = {'a':' old-value', 'b': 99}
+ args = {'a': 'old-value', 'b': 99}
func3(args)
print(args['a'], args['b'])
@@ -655,16 +655,15 @@ Essentially, assignment always binds a name to a value; The same is true of
``def`` and ``class`` statements, but in that case the value is a
callable. Consider the following code::
- class A:
- pass
-
- B = A
-
- a = B()
- b = a
- print(b)
+ >>> class A:
+ ... pass
+ ...
+ >>> B = A
+ >>> a = B()
+ >>> b = a
+ >>> print(b)
<__main__.A object at 0x16D07CC>
- print(a)
+ >>> print(a)
<__main__.A object at 0x16D07CC>
Arguably the class has a name: even though it is bound to two names and invoked
@@ -839,7 +838,7 @@ How do I convert a number to a string?
To convert, e.g., the number 144 to the string '144', use the built-in type
constructor :func:`str`. If you want a hexadecimal or octal representation, use
the built-in functions :func:`hex` or :func:`oct`. For fancy formatting, see
-the :ref:`string-formatting` section, e.g. ``"{:04d}".format(144)`` yields
+the :ref:`formatstrings` section, e.g. ``"{:04d}".format(144)`` yields
``'0144'`` and ``"{:.3f}".format(1.0/3.0)`` yields ``'0.333'``.
@@ -1099,7 +1098,7 @@ How do I iterate over a sequence in reverse order?
Use the :func:`reversed` built-in function, which is new in Python 2.4::
for x in reversed(sequence):
- ... # do something with x...
+ ... # do something with x ...
This won't touch your original sequence, but build a new copy with reversed
order to iterate over.
@@ -1107,7 +1106,7 @@ order to iterate over.
With Python 2.3, you can use an extended slice syntax::
for x in sequence[::-1]:
- ... # do something with x...
+ ... # do something with x ...
How do you remove duplicates from a list?
@@ -1115,7 +1114,7 @@ How do you remove duplicates from a list?
See the Python Cookbook for a long discussion of many ways to do this:
- http://code.activestate.com/recipes/52560/
+ https://code.activestate.com/recipes/52560/
If you don't mind reordering the list, sort it and then scan from the end of the
list, deleting duplicates as you go::
@@ -1172,16 +1171,28 @@ You probably tried to make a multidimensional array like this::
>>> A = [[None] * 2] * 3
-This looks correct if you print it::
+This looks correct if you print it:
+
+.. testsetup::
+
+ A = [[None] * 2] * 3
+
+.. doctest::
>>> A
[[None, None], [None, None], [None, None]]
But when you assign a value, it shows up in multiple places:
- >>> A[0][0] = 5
- >>> A
- [[5, None], [5, None], [5, None]]
+.. testsetup::
+
+ A = [[None] * 2] * 3
+
+.. doctest::
+
+ >>> A[0][0] = 5
+ >>> A
+ [[5, None], [5, None], [5, None]]
The reason is that replicating a list with ``*`` doesn't create copies, it only
creates references to the existing objects. The ``*3`` creates a list
@@ -1201,7 +1212,7 @@ use a list comprehension::
w, h = 2, 3
A = [[None] * w for i in range(h)]
-Or, you can use an extension that provides a matrix datatype; `Numeric Python
+Or, you can use an extension that provides a matrix datatype; `NumPy
<http://www.numpy.org/>`_ is the best known.
@@ -1313,40 +1324,11 @@ I want to do a complicated sort: can you do a Schwartzian Transform in Python?
The technique, attributed to Randal Schwartz of the Perl community, sorts the
elements of a list by a metric which maps each element to its "sort value". In
-Python, just use the ``key`` argument for the ``sort()`` method::
+Python, use the ``key`` argument for the :meth:`list.sort` method::
Isorted = L[:]
Isorted.sort(key=lambda s: int(s[10:15]))
-The ``key`` argument is new in Python 2.4, for older versions this kind of
-sorting is quite simple to do with list comprehensions. To sort a list of
-strings by their uppercase values::
-
- tmp1 = [(x.upper(), x) for x in L] # Schwartzian transform
- tmp1.sort()
- Usorted = [x[1] for x in tmp1]
-
-To sort by the integer value of a subfield extending from positions 10-15 in
-each string::
-
- tmp2 = [(int(s[10:15]), s) for s in L] # Schwartzian transform
- tmp2.sort()
- Isorted = [x[1] for x in tmp2]
-
-For versions prior to 3.0, Isorted may also be computed by ::
-
- def intfield(s):
- return int(s[10:15])
-
- def Icmp(s1, s2):
- return cmp(intfield(s1), intfield(s2))
-
- Isorted = L[:]
- Isorted.sort(Icmp)
-
-but since this method calls ``intfield()`` many times for each element of L, it
-is slower than the Schwartzian Transform.
-
How can I sort one list by values from another list?
----------------------------------------------------
@@ -1405,7 +1387,7 @@ A method is a function on some object ``x`` that you normally call as
definition::
class C:
- def meth (self, arg):
+ def meth(self, arg):
return arg * 2 + self.attribute
@@ -1438,9 +1420,9 @@ that does something::
def search(obj):
if isinstance(obj, Mailbox):
- # ... code to search a mailbox
+ ... # code to search a mailbox
elif isinstance(obj, Document):
- # ... code to search a document
+ ... # code to search a document
elif ...
A better approach is to define a ``search()`` method on all the classes and just
@@ -1448,11 +1430,11 @@ call it::
class Mailbox:
def search(self):
- # ... code to search a mailbox
+ ... # code to search a mailbox
class Document:
def search(self):
- # ... code to search a document
+ ... # code to search a document
obj.search()
@@ -1509,7 +1491,7 @@ How do I call a method defined in a base class from a derived class that overrid
Use the built-in :func:`super` function::
class Derived(Base):
- def meth (self):
+ def meth(self):
super(Derived, self).meth()
For version prior to 3.0, you may be using classic classes: For a class
@@ -1694,9 +1676,9 @@ address, it happens frequently that after an object is deleted from memory, the
next freshly created object is allocated at the same position in memory. This
is illustrated by this example:
->>> id(1000)
+>>> id(1000) # doctest: +SKIP
13901272
->>> id(2000)
+>>> id(2000) # doctest: +SKIP
13901272
The two ids belong to different integer objects that are created before, and
@@ -1705,9 +1687,9 @@ objects whose id you want to examine are still alive, create another reference
to the object:
>>> a = 1000; b = 2000
->>> id(a)
+>>> id(a) # doctest: +SKIP
13901272
->>> id(b)
+>>> id(b) # doctest: +SKIP
13891296
diff --git a/Doc/faq/windows.rst b/Doc/faq/windows.rst
index 6db6637ed7..d7253436be 100644
--- a/Doc/faq/windows.rst
+++ b/Doc/faq/windows.rst
@@ -340,5 +340,5 @@ This is a mistake; the extension should be .TGZ.
Simply rename the downloaded file to have the .TGZ extension, and WinZip will be
able to handle it. (If your copy of WinZip doesn't, get a newer one from
-http://www.winzip.com.)
+https://www.winzip.com.)
diff --git a/Doc/glossary.rst b/Doc/glossary.rst
index 36832a33d4..45b794f48e 100644
--- a/Doc/glossary.rst
+++ b/Doc/glossary.rst
@@ -69,11 +69,33 @@ Glossary
:ref:`the difference between arguments and parameters
<faq-argument-vs-parameter>`, and :pep:`362`.
+ asynchronous context manager
+ An object which controls the environment seen in an
+ :keyword:`async with` statement by defining :meth:`__aenter__` and
+ :meth:`__aexit__` methods. Introduced by :pep:`492`.
+
+ asynchronous iterable
+ An object, that can be used in an :keyword:`async for` statement.
+ Must return an :term:`asynchronous iterator` from its
+ :meth:`__aiter__` method. Introduced by :pep:`492`.
+
+ asynchronous iterator
+ An object that implements :meth:`__aiter__` and :meth:`__anext__`
+ methods. ``__anext__`` must return an :term:`awaitable` object.
+ :keyword:`async for` resolves awaitable returned from asynchronous
+ iterator's :meth:`__anext__` method until it raises
+ :exc:`StopAsyncIteration` exception. Introduced by :pep:`492`.
+
attribute
A value associated with an object which is referenced by name using
dotted expressions. For example, if an object *o* has an attribute
*a* it would be referenced as *o.a*.
+ awaitable
+ An object that can be used in an :keyword:`await` expression. Can be
+ a :term:`coroutine` or an object with an :meth:`__await__` method.
+ See also :pep:`492`.
+
BDFL
Benevolent Dictator For Life, a.k.a. `Guido van Rossum
<https://www.python.org/~guido/>`_, Python's creator.
@@ -86,12 +108,21 @@ Glossary
A :term:`text file` reads and writes :class:`str` objects.
bytes-like object
- An object that supports the :ref:`bufferobjects`, like :class:`bytes`,
- :class:`bytearray` or :class:`memoryview`. Bytes-like objects can
- be used for various operations that expect binary data, such as
- compression, saving to a binary file or sending over a socket.
- Some operations need the binary data to be mutable, in which case
- not all bytes-like objects can apply.
+ An object that supports the :ref:`bufferobjects` and can
+ export a C-:term:`contiguous` buffer. This includes all :class:`bytes`,
+ :class:`bytearray`, and :class:`array.array` objects, as well as many
+ common :class:`memoryview` objects. Bytes-like objects can
+ be used for various operations that work with binary data; these include
+ compression, saving to a binary file, and sending over a socket.
+
+ Some operations need the binary data to be mutable. The documentation
+ often refers to these as "read-write bytes-like objects". Example
+ mutable buffer objects include :class:`bytearray` and a
+ :class:`memoryview` of a :class:`bytearray`.
+ Other operations require the binary data to be stored in
+ immutable objects ("read-only bytes-like objects"); examples
+ of these include :class:`bytes` and a :class:`memoryview`
+ of a :class:`bytes` object.
bytecode
Python source code is compiled into bytecode, the internal representation
@@ -139,6 +170,32 @@ Glossary
statement by defining :meth:`__enter__` and :meth:`__exit__` methods.
See :pep:`343`.
+ contiguous
+ .. index:: C-contiguous, Fortran contiguous
+
+ A buffer is considered contiguous exactly if it is either
+ *C-contiguous* or *Fortran contiguous*. Zero-dimensional buffers are
+ C and Fortran contiguous. In one-dimensional arrays, the items
+ must be laid out in memory next to each other, in order of
+ increasing indexes starting from zero. In multidimensional
+ C-contiguous arrays, the last index varies the fastest when
+ visiting items in order of memory address. However, in
+ Fortran contiguous arrays, the first index varies the fastest.
+
+ coroutine
+ Coroutines is a more generalized form of subroutines. Subroutines are
+ entered at one point and exited at another point. Coroutines can be
+ entered, exited, and resumed at many different points. They can be
+ implemented with the :keyword:`async def` statement. See also
+ :pep:`492`.
+
+ coroutine function
+ A function which returns a :term:`coroutine` object. A coroutine
+ function may be defined with the :keyword:`async def` statement,
+ and may contain :keyword:`await`, :keyword:`async for`, and
+ :keyword:`async with` keywords. These were introduced
+ by :pep:`492`.
+
CPython
The canonical implementation of the Python programming language, as
distributed on `python.org <https://www.python.org>`_. The term "CPython"
@@ -250,10 +307,14 @@ Glossary
A synonym for :term:`file object`.
finder
- An object that tries to find the :term:`loader` for a module. It must
- implement either a method named :meth:`find_loader` or a method named
- :meth:`find_module`. See :pep:`302` and :pep:`420` for details and
- :class:`importlib.abc.Finder` for an :term:`abstract base class`.
+ An object that tries to find the :term:`loader` for a module that is
+ being imported.
+
+ Since Python 3.3, there are two types of finder: :term:`meta path finders
+ <meta path finder>` for use with :data:`sys.meta_path`, and :term:`path
+ entry finders <path entry finder>` for use with :data:`sys.path_hooks`.
+
+ See :pep:`302`, :pep:`420` and :pep:`451` for much more detail.
floor division
Mathematical division that rounds down to nearest integer. The floor
@@ -298,14 +359,23 @@ Glossary
.. index:: single: generator
generator
- A function which returns an iterator. It looks like a normal function
- except that it contains :keyword:`yield` statements for producing a series
- of values usable in a for-loop or that can be retrieved one at a time with
- the :func:`next` function. Each :keyword:`yield` temporarily suspends
- processing, remembering the location execution state (including local
- variables and pending try-statements). When the generator resumes, it
- picks-up where it left-off (in contrast to functions which start fresh on
- every invocation).
+ A function which returns a :term:`generator iterator`. It looks like a
+ normal function except that it contains :keyword:`yield` expressions
+ for producing a series of values usable in a for-loop or that can be
+ retrieved one at a time with the :func:`next` function.
+
+ Usually refers to a generator function, but may refer to a
+ *generator iterator* in some contexts. In cases where the intended
+ meaning isn't clear, using the full terms avoids ambiguity.
+
+ generator iterator
+ An object created by a :term:`generator` function.
+
+ Each :keyword:`yield` temporarily suspends processing, remembering the
+ location execution state (including local variables and pending
+ try-statements). When the *generator iterator* resumes, it picks-up where
+ it left-off (in contrast to functions which start fresh on every
+ invocation).
.. index:: single: generator expression
@@ -410,6 +480,19 @@ Glossary
than compiled ones, though their programs generally also run more
slowly. See also :term:`interactive`.
+ interpreter shutdown
+ When asked to shut down, the Python interpreter enters a special phase
+ where it gradually releases all allocated resources, such as modules
+ and various critical internal structures. It also makes several calls
+ to the :term:`garbage collector <garbage collection>`. This can trigger
+ the execution of code in user-defined destructors or weakref callbacks.
+ Code executed during the shutdown phase can encounter various
+ exceptions as the resources it relies on may not function anymore
+ (common examples are library modules or the warnings machinery).
+
+ The main reason for interpreter shutdown is that the ``__main__`` module
+ or the script being run has finished executing.
+
iterable
An object capable of returning its members one at a time. Examples of
iterables include all sequence types (such as :class:`list`, :class:`str`,
@@ -452,12 +535,13 @@ Glossary
A number of tools in Python accept key functions to control how elements
are ordered or grouped. They include :func:`min`, :func:`max`,
- :func:`sorted`, :meth:`list.sort`, :func:`heapq.nsmallest`,
- :func:`heapq.nlargest`, and :func:`itertools.groupby`.
+ :func:`sorted`, :meth:`list.sort`, :func:`heapq.merge`,
+ :func:`heapq.nsmallest`, :func:`heapq.nlargest`, and
+ :func:`itertools.groupby`.
There are several ways to create a key function. For example. the
:meth:`str.lower` method can serve as a key function for case insensitive
- sorts. Alternatively, an ad-hoc key function can be built from a
+ sorts. Alternatively, a key function can be built from a
:keyword:`lambda` expression such as ``lambda r: (r[0], r[2])``. Also,
the :mod:`operator` module provides three key function constructors:
:func:`~operator.attrgetter`, :func:`~operator.itemgetter`, and
@@ -512,10 +596,13 @@ Glossary
:class:`collections.OrderedDict` and :class:`collections.Counter`.
meta path finder
- A finder returned by a search of :data:`sys.meta_path`. Meta path
+ A :term:`finder` returned by a search of :data:`sys.meta_path`. Meta path
finders are related to, but different from :term:`path entry finders
<path entry finder>`.
+ See :class:`importlib.abc.MetaPathFinder` for the methods that meta path
+ finders implement.
+
metaclass
The class of a class. Class definitions create a class name, a class
dictionary, and a list of base classes. The metaclass is responsible for
@@ -538,7 +625,8 @@ Glossary
method resolution order
Method Resolution Order is the order in which base classes are searched
for a member during lookup. See `The Python 2.3 Method Resolution Order
- <https://www.python.org/download/releases/2.3/mro/>`_.
+ <https://www.python.org/download/releases/2.3/mro/>`_ for details of the
+ algorithm used by the Python interpreter since the 2.3 release.
module
An object that serves as an organizational unit of Python code. Modules
@@ -549,7 +637,7 @@ Glossary
module spec
A namespace containing the import-related information used to load a
- module.
+ module. An instance of :class:`importlib.machinery.ModuleSpec`.
MRO
See :term:`method resolution order`.
@@ -676,6 +764,9 @@ Glossary
(i.e. a :term:`path entry hook`) which knows how to locate modules given
a :term:`path entry`.
+ See :class:`importlib.abc.PathEntryFinder` for the methods that path entry
+ finders implement.
+
path entry hook
A callable on the :data:`sys.path_hook` list which returns a :term:`path
entry finder` if it knows how to find modules on a specific :term:`path
diff --git a/Doc/howto/argparse.rst b/Doc/howto/argparse.rst
index 510d1d49db..cfe9868875 100644
--- a/Doc/howto/argparse.rst
+++ b/Doc/howto/argparse.rst
@@ -511,7 +511,7 @@ to count the number of occurrences of a specific optional arguments:
* Sadly, our help output isn't very informative on the new ability our script
has acquired, but that can always be fixed by improving the documentation for
- out script (e.g. via the ``help`` keyword argument).
+ our script (e.g. via the ``help`` keyword argument).
* That last output exposes a bug in our program.
diff --git a/Doc/howto/clinic.rst b/Doc/howto/clinic.rst
index e362631db6..b04edea189 100644
--- a/Doc/howto/clinic.rst
+++ b/Doc/howto/clinic.rst
@@ -758,6 +758,14 @@ All Argument Clinic converters accept the following arguments:
In addition, some converters accept additional arguments. Here is a list
of these arguments, along with their meanings:
+ ``accept``
+ A set of Python types (and possibly pseudo-types);
+ this restricts the allowable Python argument to values of these types.
+ (This is not a general-purpose facility; as a rule it only supports
+ specific lists of types as shown in the legacy converter table.)
+
+ To accept ``None``, add ``NoneType`` to this set.
+
``bitwise``
Only supported for unsigned integers. The native integer value of this
Python argument will be written to the parameter without any range checking,
@@ -772,39 +780,27 @@ of these arguments, along with their meanings:
Only supported for strings. Specifies the encoding to use when converting
this string from a Python str (Unicode) value into a C ``char *`` value.
- ``length``
- Only supported for strings. If true, requests that the length of the
- string be passed in to the impl function, just after the string parameter,
- in a parameter named ``<parameter_name>_length``.
-
- ``nullable``
- Only supported for strings. If true, this parameter may also be set to
- ``None``, in which case the C parameter will be set to ``NULL``.
``subclass_of``
Only supported for the ``object`` converter. Requires that the Python
value be a subclass of a Python type, as expressed in C.
- ``types``
- Only supported for the ``object`` (and ``self``) converter. Specifies
+ ``type``
+ Only supported for the ``object`` and ``self`` converters. Specifies
the C type that will be used to declare the variable. Default value is
``"PyObject *"``.
- ``types``
- A string containing a list of Python types (and possibly pseudo-types);
- this restricts the allowable Python argument to values of these types.
- (This is not a general-purpose facility; as a rule it only supports
- specific lists of types as shown in the legacy converter table.)
-
``zeroes``
Only supported for strings. If true, embedded NUL bytes (``'\\0'``) are
- permitted inside the value.
+ permitted inside the value. The length of the string will be passed in
+ to the impl function, just after the string parameter, as a parameter named
+ ``<parameter_name>_length``.
Please note, not every possible combination of arguments will work.
-Often these arguments are implemented internally by specific ``PyArg_ParseTuple``
+Usually these arguments are implemented by specific ``PyArg_ParseTuple``
*format units*, with specific behavior. For example, currently you cannot
-call ``str`` and pass in ``zeroes=True`` without also specifying an ``encoding``;
-although it's perfectly reasonable to think this would work, these semantics don't
+call ``unsigned_short`` without also specifying ``bitwise=True``.
+Although it's perfectly reasonable to think this would work, these semantics don't
map to any existing format unit. So Argument Clinic doesn't support it. (Or, at
least, not yet.)
@@ -816,13 +812,13 @@ on the right is the text you'd replace it with.
``'B'`` ``unsigned_char(bitwise=True)``
``'b'`` ``unsigned_char``
``'c'`` ``char``
-``'C'`` ``int(types='str')``
+``'C'`` ``int(accept={str})``
``'d'`` ``double``
``'D'`` ``Py_complex``
-``'es#'`` ``str(encoding='name_of_encoding', length=True, zeroes=True)``
``'es'`` ``str(encoding='name_of_encoding')``
-``'et#'`` ``str(encoding='name_of_encoding', types='bytes bytearray str', length=True)``
-``'et'`` ``str(encoding='name_of_encoding', types='bytes bytearray str')``
+``'es#'`` ``str(encoding='name_of_encoding', zeroes=True)``
+``'et'`` ``str(encoding='name_of_encoding', accept={bytes, bytearray, str})``
+``'et#'`` ``str(encoding='name_of_encoding', accept={bytes, bytearray, str}, zeroes=True)``
``'f'`` ``float``
``'h'`` ``short``
``'H'`` ``unsigned_short(bitwise=True)``
@@ -830,29 +826,30 @@ on the right is the text you'd replace it with.
``'I'`` ``unsigned_int(bitwise=True)``
``'k'`` ``unsigned_long(bitwise=True)``
``'K'`` ``unsigned_PY_LONG_LONG(bitwise=True)``
+``'l'`` ``long``
``'L'`` ``PY_LONG_LONG``
``'n'`` ``Py_ssize_t``
+``'O'`` ``object``
``'O!'`` ``object(subclass_of='&PySomething_Type')``
``'O&'`` ``object(converter='name_of_c_function')``
-``'O'`` ``object``
``'p'`` ``bool``
-``'s#'`` ``str(length=True)``
``'S'`` ``PyBytesObject``
``'s'`` ``str``
-``'s*'`` ``Py_buffer(types='str bytes bytearray buffer')``
-``'u#'`` ``Py_UNICODE(length=True)``
-``'u'`` ``Py_UNICODE``
+``'s#'`` ``str(zeroes=True)``
+``'s*'`` ``Py_buffer(accept={buffer, str})``
``'U'`` ``unicode``
-``'w*'`` ``Py_buffer(types='bytearray rwbuffer')``
-``'y#'`` ``str(types='bytes', length=True)``
+``'u'`` ``Py_UNICODE``
+``'u#'`` ``Py_UNICODE(zeroes=True)``
+``'w*'`` ``Py_buffer(accept={rwbuffer})``
``'Y'`` ``PyByteArrayObject``
-``'y'`` ``str(types='bytes')``
+``'y'`` ``str(accept={bytes})``
+``'y#'`` ``str(accept={robuffer}, zeroes=True)``
``'y*'`` ``Py_buffer``
-``'Z#'`` ``Py_UNICODE(nullable=True, length=True)``
-``'z#'`` ``str(nullable=True, length=True)``
-``'Z'`` ``Py_UNICODE(nullable=True)``
-``'z'`` ``str(nullable=True)``
-``'z*'`` ``Py_buffer(types='str bytes bytearray buffer', nullable=True)``
+``'Z'`` ``Py_UNICODE(accept={str, NoneType})``
+``'Z#'`` ``Py_UNICODE(accept={str, NoneType}, zeroes=True)``
+``'z'`` ``str(accept={str, NoneType})``
+``'z#'`` ``str(accept={str, NoneType}, zeroes=True)``
+``'z*'`` ``Py_buffer(accept={buffer, str, NoneType})``
========= =================================================================================
As an example, here's our sample ``pickle.Pickler.dump`` using the proper
@@ -1252,18 +1249,18 @@ Here's the simplest example of a custom converter, from ``Modules/zlibmodule.c``
/*[python input]
- class uint_converter(CConverter):
+ class capped_uint_converter(CConverter):
type = 'unsigned int'
- converter = 'uint_converter'
+ converter = 'capped_uint_converter'
[python start generated code]*/
- /*[python end generated code: checksum=da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
+ /*[python end generated code: output=da39a3ee5e6b4b0d input=35521e4e733823c7]*/
-This block adds a converter to Argument Clinic named ``uint``. Parameters
-declared as ``uint`` will be declared as type ``unsigned int``, and will
-be parsed by the ``'O&'`` format unit, which will call the ``uint_converter``
-converter function.
-``uint`` variables automatically support default values.
+This block adds a converter to Argument Clinic named ``capped_uint``. Parameters
+declared as ``capped_uint`` will be declared as type ``unsigned int``, and will
+be parsed by the ``'O&'`` format unit, which will call the
+``capped_uint_converter`` converter function. ``capped_uint`` variables
+automatically support default values.
More sophisticated custom converters can insert custom C code to
handle initialization and cleanup.
diff --git a/Doc/howto/cporting.rst b/Doc/howto/cporting.rst
index d7a7086302..27e7e6f6e0 100644
--- a/Doc/howto/cporting.rst
+++ b/Doc/howto/cporting.rst
@@ -161,7 +161,7 @@ simple example demonstrates how. ::
#define INITERROR return NULL
- PyObject *
+ PyMODINIT_FUNC
PyInit_myextension(void)
#else
diff --git a/Doc/howto/curses.rst b/Doc/howto/curses.rst
index 87a5cab142..188a5cf223 100644
--- a/Doc/howto/curses.rst
+++ b/Doc/howto/curses.rst
@@ -545,7 +545,7 @@ learn more about submitting patches to Python.
a lengthy tutorial for C programmers.
* `The ncurses man page <http://linux.die.net/man/3/ncurses>`_
* `The ncurses FAQ <http://invisible-island.net/ncurses/ncurses.faq.html>`_
-* `"Use curses... don't swear" <http://www.youtube.com/watch?v=eN1eZtjLEnU>`_:
+* `"Use curses... don't swear" <https://www.youtube.com/watch?v=eN1eZtjLEnU>`_:
video of a PyCon 2013 talk on controlling terminals using curses or Urwid.
* `"Console Applications with Urwid" <http://www.pyvideo.org/video/1568/console-applications-with-urwid>`_:
video of a PyCon CA 2012 talk demonstrating some applications written using
diff --git a/Doc/howto/descriptor.rst b/Doc/howto/descriptor.rst
index 530f34b88f..d370eb5572 100644
--- a/Doc/howto/descriptor.rst
+++ b/Doc/howto/descriptor.rst
@@ -104,7 +104,7 @@ like::
"Emulate type_getattro() in Objects/typeobject.c"
v = object.__getattribute__(self, key)
if hasattr(v, '__get__'):
- return v.__get__(None, self)
+ return v.__get__(None, self)
return v
The important points to remember are:
@@ -163,9 +163,9 @@ descriptor is useful for monitoring just a few chosen attributes::
self.val = val
>>> class MyClass(object):
- x = RevealAccess(10, 'var "x"')
- y = 5
-
+ ... x = RevealAccess(10, 'var "x"')
+ ... y = 5
+ ...
>>> m = MyClass()
>>> m.x
Retrieving var "x"
@@ -287,15 +287,15 @@ this::
Running the interpreter shows how the function descriptor works in practice::
>>> class D(object):
- def f(self, x):
- return x
-
+ ... def f(self, x):
+ ... return x
+ ...
>>> d = D()
- >>> D.__dict__['f'] # Stored internally as a function
+ >>> D.__dict__['f'] # Stored internally as a function
<function f at 0x00C45070>
- >>> D.f # Get from a class becomes an unbound method
+ >>> D.f # Get from a class becomes an unbound method
<unbound method D.f>
- >>> d.f # Get from an instance becomes a bound method
+ >>> d.f # Get from an instance becomes a bound method
<bound method D.f of <__main__.D object at 0x00B18C90>>
The output suggests that bound and unbound methods are two different types.
@@ -358,10 +358,10 @@ Since staticmethods return the underlying function with no changes, the example
calls are unexciting::
>>> class E(object):
- def f(x):
- print(x)
- f = staticmethod(f)
-
+ ... def f(x):
+ ... print(x)
+ ... f = staticmethod(f)
+ ...
>>> print(E.f(3))
3
>>> print(E().f(3))
@@ -371,23 +371,23 @@ Using the non-data descriptor protocol, a pure Python version of
:func:`staticmethod` would look like this::
class StaticMethod(object):
- "Emulate PyStaticMethod_Type() in Objects/funcobject.c"
+ "Emulate PyStaticMethod_Type() in Objects/funcobject.c"
- def __init__(self, f):
- self.f = f
+ def __init__(self, f):
+ self.f = f
- def __get__(self, obj, objtype=None):
- return self.f
+ def __get__(self, obj, objtype=None):
+ return self.f
Unlike static methods, class methods prepend the class reference to the
argument list before calling the function. This format is the same
for whether the caller is an object or a class::
>>> class E(object):
- def f(klass, x):
- return klass.__name__, x
- f = classmethod(f)
-
+ ... def f(klass, x):
+ ... return klass.__name__, x
+ ... f = classmethod(f)
+ ...
>>> print(E.f(3))
('E', 3)
>>> print(E().f(3))
@@ -419,15 +419,15 @@ Using the non-data descriptor protocol, a pure Python version of
:func:`classmethod` would look like this::
class ClassMethod(object):
- "Emulate PyClassMethod_Type() in Objects/funcobject.c"
+ "Emulate PyClassMethod_Type() in Objects/funcobject.c"
- def __init__(self, f):
- self.f = f
+ def __init__(self, f):
+ self.f = f
- def __get__(self, obj, klass=None):
- if klass is None:
- klass = type(obj)
- def newfunc(*args):
- return self.f(klass, *args)
- return newfunc
+ def __get__(self, obj, klass=None):
+ if klass is None:
+ klass = type(obj)
+ def newfunc(*args):
+ return self.f(klass, *args)
+ return newfunc
diff --git a/Doc/howto/functional.rst b/Doc/howto/functional.rst
index 1969b32108..6e21f93544 100644
--- a/Doc/howto/functional.rst
+++ b/Doc/howto/functional.rst
@@ -332,7 +332,7 @@ substring.
List comprehensions and generator expressions (short form: "listcomps" and
"genexps") are a concise notation for such operations, borrowed from the
-functional programming language Haskell (http://www.haskell.org/). You can strip
+functional programming language Haskell (https://www.haskell.org/). You can strip
all the whitespace from a stream of strings with the following code::
line_list = [' line 1\n', 'line 2 \n', ...]
@@ -395,14 +395,14 @@ equivalent to the following Python code::
continue # Skip this element
for expr2 in sequence2:
if not (condition2):
- continue # Skip this element
+ continue # Skip this element
...
for exprN in sequenceN:
- if not (conditionN):
- continue # Skip this element
+ if not (conditionN):
+ continue # Skip this element
- # Output the value of
- # the expression.
+ # Output the value of
+ # the expression.
This means that when there are multiple ``for...in`` clauses but no ``if``
clauses, the length of the resulting output will be equal to the product of the
@@ -481,10 +481,10 @@ Here's a sample usage of the ``generate_ints()`` generator:
You could equally write ``for i in generate_ints(5)``, or ``a,b,c =
generate_ints(3)``.
-Inside a generator function, ``return value`` is semantically equivalent to
-``raise StopIteration(value)``. If no value is returned or the bottom of the
-function is reached, the procession of values ends and the generator cannot
-return any further values.
+Inside a generator function, ``return value`` causes ``StopIteration(value)``
+to be raised from the :meth:`~generator.__next__` method. Once this happens, or
+the bottom of the function is reached, the procession of values ends and the
+generator cannot yield any further values.
You could achieve the effect of generators manually by writing your own class
and storing all the local variables of the generator as instance variables. For
@@ -716,7 +716,7 @@ returns them in a tuple::
It doesn't construct an in-memory list and exhaust all the input iterators
before returning; instead tuples are constructed and returned only if they're
requested. (The technical term for this behaviour is `lazy evaluation
-<http://en.wikipedia.org/wiki/Lazy_evaluation>`__.)
+<https://en.wikipedia.org/wiki/Lazy_evaluation>`__.)
This iterator is intended to be used with iterables that are all of the same
length. If the iterables are of different lengths, the resulting stream will be
@@ -1199,7 +1199,7 @@ General
**Structure and Interpretation of Computer Programs**, by Harold Abelson and
Gerald Jay Sussman with Julie Sussman. Full text at
-http://mitpress.mit.edu/sicp/. In this classic textbook of computer science,
+https://mitpress.mit.edu/sicp/. In this classic textbook of computer science,
chapters 2 and 3 discuss the use of sequences and streams to organize the data
flow inside a program. The book uses Scheme for its examples, but many of the
design approaches described in these chapters are applicable to functional-style
@@ -1208,12 +1208,12 @@ Python code.
http://www.defmacro.org/ramblings/fp.html: A general introduction to functional
programming that uses Java examples and has a lengthy historical introduction.
-http://en.wikipedia.org/wiki/Functional_programming: General Wikipedia entry
+https://en.wikipedia.org/wiki/Functional_programming: General Wikipedia entry
describing functional programming.
-http://en.wikipedia.org/wiki/Coroutine: Entry for coroutines.
+https://en.wikipedia.org/wiki/Coroutine: Entry for coroutines.
-http://en.wikipedia.org/wiki/Currying: Entry for the concept of currying.
+https://en.wikipedia.org/wiki/Currying: Entry for the concept of currying.
Python-specific
---------------
@@ -1225,9 +1225,9 @@ Text Processing".
Mertz also wrote a 3-part series of articles on functional programming
for IBM's DeveloperWorks site; see
-`part 1 <http://www.ibm.com/developerworks/linux/library/l-prog/index.html>`__,
-`part 2 <http://www.ibm.com/developerworks/linux/library/l-prog2/index.html>`__, and
-`part 3 <http://www.ibm.com/developerworks/linux/library/l-prog3/index.html>`__,
+`part 1 <https://www.ibm.com/developerworks/linux/library/l-prog/index.html>`__,
+`part 2 <https://www.ibm.com/developerworks/linux/library/l-prog2/index.html>`__, and
+`part 3 <https://www.ibm.com/developerworks/linux/library/l-prog3/index.html>`__,
Python documentation
diff --git a/Doc/howto/index.rst b/Doc/howto/index.rst
index 2c9d69910a..de659505f7 100644
--- a/Doc/howto/index.rst
+++ b/Doc/howto/index.rst
@@ -25,7 +25,6 @@ Currently, the HOWTOs are:
sorting.rst
unicode.rst
urllib2.rst
- webservers.rst
argparse.rst
ipaddress.rst
clinic.rst
diff --git a/Doc/howto/logging-cookbook.rst b/Doc/howto/logging-cookbook.rst
index af888c2b24..99b4cdcb5f 100644
--- a/Doc/howto/logging-cookbook.rst
+++ b/Doc/howto/logging-cookbook.rst
@@ -63,6 +63,7 @@ Here is the auxiliary module::
def __init__(self):
self.logger = logging.getLogger('spam_application.auxiliary.Auxiliary')
self.logger.info('creating an instance of Auxiliary')
+
def do_something(self):
self.logger.info('doing something')
a = 1 + 1
@@ -94,6 +95,61 @@ The output looks like this::
2005-03-23 23:47:11,673 - spam_application - INFO -
done with auxiliary_module.some_function()
+Logging from multiple threads
+-----------------------------
+
+Logging from multiple threads requires no special effort. The following example
+shows logging from the main (initial) thread and another thread::
+
+ import logging
+ import threading
+ import time
+
+ def worker(arg):
+ while not arg['stop']:
+ logging.debug('Hi from myfunc')
+ time.sleep(0.5)
+
+ def main():
+ logging.basicConfig(level=logging.DEBUG, format='%(relativeCreated)6d %(threadName)s %(message)s')
+ info = {'stop': False}
+ thread = threading.Thread(target=worker, args=(info,))
+ thread.start()
+ while True:
+ try:
+ logging.debug('Hello from main')
+ time.sleep(0.75)
+ except KeyboardInterrupt:
+ info['stop'] = True
+ break
+ thread.join()
+
+ if __name__ == '__main__':
+ main()
+
+When run, the script should print something like the following::
+
+ 0 Thread-1 Hi from myfunc
+ 3 MainThread Hello from main
+ 505 Thread-1 Hi from myfunc
+ 755 MainThread Hello from main
+ 1007 Thread-1 Hi from myfunc
+ 1507 MainThread Hello from main
+ 1508 Thread-1 Hi from myfunc
+ 2010 Thread-1 Hi from myfunc
+ 2258 MainThread Hello from main
+ 2512 Thread-1 Hi from myfunc
+ 3009 MainThread Hello from main
+ 3013 Thread-1 Hi from myfunc
+ 3515 Thread-1 Hi from myfunc
+ 3761 MainThread Hello from main
+ 4017 Thread-1 Hi from myfunc
+ 4513 MainThread Hello from main
+ 4518 Thread-1 Hi from myfunc
+
+This shows the logging output interspersed as one might expect. This approach
+works for more threads than shown here, of course.
+
Multiple handlers and formatters
--------------------------------
@@ -305,7 +361,7 @@ classes, which would eat up one thread per handler for no particular benefit.
An example of using these two classes follows (imports omitted)::
- que = queue.Queue(-1) # no limit on size
+ que = queue.Queue(-1) # no limit on size
queue_handler = QueueHandler(que)
handler = logging.StreamHandler()
listener = QueueListener(que, handler)
@@ -325,6 +381,15 @@ which, when run, will produce::
MainThread: Look out!
+.. versionchanged:: 3.5
+ Prior to Python 3.5, the :class:`QueueListener` always passed every message
+ received from the queue to every handler it was initialized with. (This was
+ because it was assumed that level filtering was all done on the other side,
+ where the queue is filled.) From 3.5 onwards, this behaviour can be changed
+ by passing a keyword argument ``respect_handler_level=True`` to the
+ listener's constructor. When this is done, the listener compares the level
+ of each message with the handler's level, and only passes a message to a
+ handler if it's appropriate to do so.
.. _network-logging:
@@ -592,21 +657,21 @@ script::
return True
if __name__ == '__main__':
- levels = (logging.DEBUG, logging.INFO, logging.WARNING, logging.ERROR, logging.CRITICAL)
- logging.basicConfig(level=logging.DEBUG,
- format='%(asctime)-15s %(name)-5s %(levelname)-8s IP: %(ip)-15s User: %(user)-8s %(message)s')
- a1 = logging.getLogger('a.b.c')
- a2 = logging.getLogger('d.e.f')
-
- f = ContextFilter()
- a1.addFilter(f)
- a2.addFilter(f)
- a1.debug('A debug message')
- a1.info('An info message with %s', 'some parameters')
- for x in range(10):
- lvl = choice(levels)
- lvlname = logging.getLevelName(lvl)
- a2.log(lvl, 'A message at %s level with %d %s', lvlname, 2, 'parameters')
+ levels = (logging.DEBUG, logging.INFO, logging.WARNING, logging.ERROR, logging.CRITICAL)
+ logging.basicConfig(level=logging.DEBUG,
+ format='%(asctime)-15s %(name)-5s %(levelname)-8s IP: %(ip)-15s User: %(user)-8s %(message)s')
+ a1 = logging.getLogger('a.b.c')
+ a2 = logging.getLogger('d.e.f')
+
+ f = ContextFilter()
+ a1.addFilter(f)
+ a2.addFilter(f)
+ a1.debug('A debug message')
+ a1.info('An info message with %s', 'some parameters')
+ for x in range(10):
+ lvl = choice(levels)
+ lvlname = logging.getLevelName(lvl)
+ a2.log(lvl, 'A message at %s level with %d %s', lvlname, 2, 'parameters')
which, when run, produces something like::
@@ -700,10 +765,10 @@ the basis for code meeting your own specific requirements::
while True:
try:
record = queue.get()
- if record is None: # We send this as a sentinel to tell the listener to quit.
+ if record is None: # We send this as a sentinel to tell the listener to quit.
break
logger = logging.getLogger(record.name)
- logger.handle(record) # No level or filter logic applied - just do it!
+ logger.handle(record) # No level or filter logic applied - just do it!
except Exception:
import sys, traceback
print('Whoops! Problem:', file=sys.stderr)
@@ -726,10 +791,11 @@ the basis for code meeting your own specific requirements::
# Note that on Windows you can't rely on fork semantics, so each process
# will run the logging configuration code when it starts.
def worker_configurer(queue):
- h = logging.handlers.QueueHandler(queue) # Just the one handler needed
+ h = logging.handlers.QueueHandler(queue) # Just the one handler needed
root = logging.getLogger()
root.addHandler(h)
- root.setLevel(logging.DEBUG) # send all messages, for demo; no other level or filter logic applied.
+ # send all messages, for demo; no other level or filter logic applied.
+ root.setLevel(logging.DEBUG)
# This is the worker process top-level loop, which just logs ten events with
# random intervening delays before terminating.
@@ -757,7 +823,7 @@ the basis for code meeting your own specific requirements::
workers = []
for i in range(10):
worker = multiprocessing.Process(target=worker_process,
- args=(queue, worker_configurer))
+ args=(queue, worker_configurer))
workers.append(worker)
worker.start()
for w in workers:
@@ -1181,12 +1247,12 @@ You can use a :class:`QueueHandler` subclass to send messages to other kinds
of queues, for example a ZeroMQ 'publish' socket. In the example below,the
socket is created separately and passed to the handler (as its 'queue')::
- import zmq # using pyzmq, the Python binding for ZeroMQ
- import json # for serializing records portably
+ import zmq # using pyzmq, the Python binding for ZeroMQ
+ import json # for serializing records portably
ctx = zmq.Context()
- sock = zmq.Socket(ctx, zmq.PUB) # or zmq.PUSH, or other suitable value
- sock.bind('tcp://*:5556') # or wherever
+ sock = zmq.Socket(ctx, zmq.PUB) # or zmq.PUSH, or other suitable value
+ sock.bind('tcp://*:5556') # or wherever
class ZeroMQSocketHandler(QueueHandler):
def enqueue(self, record):
@@ -1224,7 +1290,7 @@ of queues, for example a ZeroMQ 'subscribe' socket. Here's an example::
def __init__(self, uri, *handlers, **kwargs):
self.ctx = kwargs.get('ctx') or zmq.Context()
socket = zmq.Socket(self.ctx, zmq.SUB)
- socket.setsockopt(zmq.SUBSCRIBE, '') # subscribe to everything
+ socket.setsockopt(zmq.SUBSCRIBE, '') # subscribe to everything
socket.connect(uri)
def dequeue(self):
@@ -1252,7 +1318,7 @@ An example dictionary-based configuration
-----------------------------------------
Below is an example of a logging configuration dictionary - it's taken from
-the `documentation on the Django project <https://docs.djangoproject.com/en/1.3/topics/logging/#configuring-logging>`_.
+the `documentation on the Django project <https://docs.djangoproject.com/en/1.9/topics/logging/#configuring-logging>`_.
This dictionary is passed to :func:`~config.dictConfig` to put the configuration into effect::
LOGGING = {
@@ -1308,7 +1374,7 @@ This dictionary is passed to :func:`~config.dictConfig` to put the configuration
}
For more information about this configuration, you can see the `relevant
-section <https://docs.djangoproject.com/en/1.6/topics/logging/#configuring-logging>`_
+section <https://docs.djangoproject.com/en/1.9/topics/logging/#configuring-logging>`_
of the Django documentation.
.. _cookbook-rotator-namer:
@@ -1570,11 +1636,11 @@ works::
Inserting a BOM into messages sent to a SysLogHandler
-----------------------------------------------------
-`RFC 5424 <http://tools.ietf.org/html/rfc5424>`_ requires that a
+`RFC 5424 <https://tools.ietf.org/html/rfc5424>`_ requires that a
Unicode message be sent to a syslog daemon as a set of bytes which have the
following structure: an optional pure-ASCII component, followed by a UTF-8 Byte
Order Mark (BOM), followed by Unicode encoded using UTF-8. (See the `relevant
-section of the specification <http://tools.ietf.org/html/rfc5424#section-6>`_.)
+section of the specification <https://tools.ietf.org/html/rfc5424#section-6>`_.)
In Python 3.1, code was added to
:class:`~logging.handlers.SysLogHandler` to insert a BOM into the message, but
@@ -1680,7 +1746,7 @@ as in the following complete example::
def main():
logging.basicConfig(level=logging.INFO, format='%(message)s')
- logging.info(_('message 1', set_value=set([1, 2, 3]), snowman='\u2603'))
+ logging.info(_('message 1', set_value={1, 2, 3}, snowman='\u2603'))
if __name__ == '__main__':
main()
@@ -2052,7 +2118,7 @@ class, as shown in the following example::
Format an exception so that it prints on a single line.
"""
result = super(OneLineExceptionFormatter, self).formatException(exc_info)
- return repr(result) # or format into one line however you want to
+ return repr(result) # or format into one line however you want to
def format(self, record):
s = super(OneLineExceptionFormatter, self).format(record)
@@ -2167,7 +2233,7 @@ flushing behavior.
The example script has a simple function, ``foo``, which just cycles through
all the logging levels, writing to ``sys.stderr`` to say what level it's about
-to log at, and then actually logging a message that that level. You can pass a
+to log at, and then actually logging a message at that level. You can pass a
parameter to ``foo`` which, if true, will log at ERROR and CRITICAL levels -
otherwise, it only logs at DEBUG, INFO and WARNING levels.
@@ -2345,3 +2411,105 @@ When this script is run, it should print something like::
showing how the time is formatted both as local time and UTC, one for each
handler.
+
+
+.. _context-manager:
+
+Using a context manager for selective logging
+---------------------------------------------
+
+There are times when it would be useful to temporarily change the logging
+configuration and revert it back after doing something. For this, a context
+manager is the most obvious way of saving and restoring the logging context.
+Here is a simple example of such a context manager, which allows you to
+optionally change the logging level and add a logging handler purely in the
+scope of the context manager::
+
+ import logging
+ import sys
+
+ class LoggingContext(object):
+ def __init__(self, logger, level=None, handler=None, close=True):
+ self.logger = logger
+ self.level = level
+ self.handler = handler
+ self.close = close
+
+ def __enter__(self):
+ if self.level is not None:
+ self.old_level = self.logger.level
+ self.logger.setLevel(self.level)
+ if self.handler:
+ self.logger.addHandler(self.handler)
+
+ def __exit__(self, et, ev, tb):
+ if self.level is not None:
+ self.logger.setLevel(self.old_level)
+ if self.handler:
+ self.logger.removeHandler(self.handler)
+ if self.handler and self.close:
+ self.handler.close()
+ # implicit return of None => don't swallow exceptions
+
+If you specify a level value, the logger's level is set to that value in the
+scope of the with block covered by the context manager. If you specify a
+handler, it is added to the logger on entry to the block and removed on exit
+from the block. You can also ask the manager to close the handler for you on
+block exit - you could do this if you don't need the handler any more.
+
+To illustrate how it works, we can add the following block of code to the
+above::
+
+ if __name__ == '__main__':
+ logger = logging.getLogger('foo')
+ logger.addHandler(logging.StreamHandler())
+ logger.setLevel(logging.INFO)
+ logger.info('1. This should appear just once on stderr.')
+ logger.debug('2. This should not appear.')
+ with LoggingContext(logger, level=logging.DEBUG):
+ logger.debug('3. This should appear once on stderr.')
+ logger.debug('4. This should not appear.')
+ h = logging.StreamHandler(sys.stdout)
+ with LoggingContext(logger, level=logging.DEBUG, handler=h, close=True):
+ logger.debug('5. This should appear twice - once on stderr and once on stdout.')
+ logger.info('6. This should appear just once on stderr.')
+ logger.debug('7. This should not appear.')
+
+We initially set the logger's level to ``INFO``, so message #1 appears and
+message #2 doesn't. We then change the level to ``DEBUG`` temporarily in the
+following ``with`` block, and so message #3 appears. After the block exits, the
+logger's level is restored to ``INFO`` and so message #4 doesn't appear. In the
+next ``with`` block, we set the level to ``DEBUG`` again but also add a handler
+writing to ``sys.stdout``. Thus, message #5 appears twice on the console (once
+via ``stderr`` and once via ``stdout``). After the ``with`` statement's
+completion, the status is as it was before so message #6 appears (like message
+#1) whereas message #7 doesn't (just like message #2).
+
+If we run the resulting script, the result is as follows::
+
+ $ python logctx.py
+ 1. This should appear just once on stderr.
+ 3. This should appear once on stderr.
+ 5. This should appear twice - once on stderr and once on stdout.
+ 5. This should appear twice - once on stderr and once on stdout.
+ 6. This should appear just once on stderr.
+
+If we run it again, but pipe ``stderr`` to ``/dev/null``, we see the following,
+which is the only message written to ``stdout``::
+
+ $ python logctx.py 2>/dev/null
+ 5. This should appear twice - once on stderr and once on stdout.
+
+Once again, but piping ``stdout`` to ``/dev/null``, we get::
+
+ $ python logctx.py >/dev/null
+ 1. This should appear just once on stderr.
+ 3. This should appear once on stderr.
+ 5. This should appear twice - once on stderr and once on stdout.
+ 6. This should appear just once on stderr.
+
+In this case, the message #5 printed to ``stdout`` doesn't appear, as expected.
+
+Of course, the approach described here can be generalised, for example to attach
+logging filters temporarily. Note that the above code works in Python 2 as well
+as Python 3.
diff --git a/Doc/howto/logging.rst b/Doc/howto/logging.rst
index 4ce14f98ad..51e8430485 100644
--- a/Doc/howto/logging.rst
+++ b/Doc/howto/logging.rst
@@ -103,8 +103,8 @@ A simple example
A very simple example is::
import logging
- logging.warning('Watch out!') # will print a message to the console
- logging.info('I told you so') # will not print anything
+ logging.warning('Watch out!') # will print a message to the console
+ logging.info('I told you so') # will not print anything
If you type these lines into a script and run it, you'll see::
@@ -310,7 +310,7 @@ favourite beverage and carry on.
If your logging needs are simple, then use the above examples to incorporate
logging into your own scripts, and if you run into problems or don't
understand something, please post a question on the comp.lang.python Usenet
-group (available at http://groups.google.com/group/comp.lang.python) and you
+group (available at https://groups.google.com/group/comp.lang.python) and you
should receive help before too long.
Still here? You can carry on reading the next few sections, which provide a
diff --git a/Doc/howto/pyporting.rst b/Doc/howto/pyporting.rst
index 5e875cdee2..c479f2264e 100644
--- a/Doc/howto/pyporting.rst
+++ b/Doc/howto/pyporting.rst
@@ -207,13 +207,12 @@ that's ``str``/``bytes`` in Python 2 and ``bytes`` in Python 3). The following
table lists the **unique** methods of each data type across Python 2 & 3
(e.g., the ``decode()`` method is usable on the equivalent binary data type in
either Python 2 or 3, but it can't be used by the text data type consistently
-between Python 2 and 3 because ``str`` in Python 3 doesn't have the method).
+between Python 2 and 3 because ``str`` in Python 3 doesn't have the method). Do
+note that as of Python 3.5 the ``__mod__`` method was added to the bytes type.
======================== =====================
**Text data** **Binary data**
------------------------ ---------------------
-__mod__ (``%`` operator)
------------------------- ---------------------
\ decode
------------------------ ---------------------
encode
@@ -244,8 +243,8 @@ bothered to add the ``b`` mode when opening a binary file (e.g., ``rb`` for
binary reading). Under Python 3, binary files and text files are clearly
distinct and mutually incompatible; see the :mod:`io` module for details.
Therefore, you **must** make a decision of whether a file will be used for
-binary access (allowing to read and/or write binary data) or text access
-(allowing to read and/or write text data). You should also use :func:`io.open`
+binary access (allowing binary data to be read and/or written) or text access
+(allowing text data to be read and/or written). You should also use :func:`io.open`
for opening files instead of the built-in :func:`open` function as the :mod:`io`
module is consistent from Python 2 to 3 while the built-in :func:`open` function
is not (in Python 3 it's actually :func:`io.open`).
@@ -283,6 +282,50 @@ To summarize:
appropriate
#. Be careful when indexing binary data
+
+Use feature detection instead of version detection
+++++++++++++++++++++++++++++++++++++++++++++++++++
+Inevitably you will have code that has to choose what to do based on what
+version of Python is running. The best way to do this is with feature detection
+of whether the version of Python you're running under supports what you need.
+If for some reason that doesn't work then you should make the version check is
+against Python 2 and not Python 3. To help explain this, let's look at an
+example.
+
+Let's pretend that you need access to a feature of importlib_ that
+is available in Python's standard library since Python 3.3 and available for
+Python 2 through importlib2_ on PyPI. You might be tempted to write code to
+access e.g. the ``importlib.abc`` module by doing the following::
+
+ import sys
+
+ if sys.version[0] == 3:
+ from importlib import abc
+ else:
+ from importlib2 import abc
+
+The problem with this code is what happens when Python 4 comes out? It would
+be better to treat Python 2 as the exceptional case instead of Python 3 and
+assume that future Python versions will be more compatible with Python 3 than
+Python 2::
+
+ import sys
+
+ if sys.version[0] > 2:
+ from importlib import abc
+ else:
+ from importlib2 import abc
+
+The best solution, though, is to do no version detection at all and instead rely
+on feature detection. That avoids any potential issues of getting the version
+detection wrong and helps keep you future-compatible::
+
+ try:
+ from importlib import abc
+ except ImportError:
+ from importlib2 import abc
+
+
Prevent compatibility regressions
---------------------------------
@@ -347,11 +390,13 @@ your tests under multiple Python interpreters is tox_. You can then integrate
tox with your continuous integration system so that you never accidentally break
Python 2 or 3 support.
-You may also want to use use the ``-bb`` flag with the Python 3 interpreter to
-trigger an exception when you are comparing bytes to strings. Usually it's
-simply ``False``, but if you made a mistake in your separation of text/binary
-data handling you may be accidentally comparing text and binary data. This flag
-will raise an exception when that occurs to help track down such cases.
+You may also want to use the ``-bb`` flag with the Python 3 interpreter to
+trigger an exception when you are comparing bytes to strings or bytes to an int
+(the latter is available starting in Python 3.5). By default type-differing
+comparisons simply return ``False``, but if you made a mistake in your
+separation of text/binary data handling or indexing on bytes you wouldn't easily
+find the mistake. This flag will raise an exception when these kinds of
+comparisons occur, making the mistake much easier to track down.
And that's mostly it! At this point your code base is compatible with both
Python 2 and 3 simultaneously. Your testing will also be set up so that you
@@ -380,10 +425,12 @@ supported by Python 2. You should also update the classifiers in your
.. _cheat sheet: http://python-future.org/compatible_idioms.html
.. _coverage.py: https://pypi.python.org/pypi/coverage
.. _Futurize: http://python-future.org/automatic_conversion.html
-.. _Modernize: http://python-modernize.readthedocs.org/en/latest/
+.. _importlib: https://docs.python.org/3/library/importlib.html#module-importlib
+.. _importlib2: https://pypi.python.org/pypi/importlib2
+.. _Modernize: https://python-modernize.readthedocs.org/en/latest/
.. _Porting to Python 3: http://python3porting.com/
.. _Pylint: https://pypi.python.org/pypi/pylint
-.. _Python 3 Q & A: http://ncoghlan-devs-python-notes.readthedocs.org/en/latest/python3/questions_and_answers.html
+.. _Python 3 Q & A: https://ncoghlan-devs-python-notes.readthedocs.org/en/latest/python3/questions_and_answers.html
.. _python-future: http://python-future.org/
.. _python-porting: https://mail.python.org/mailman/listinfo/python-porting
diff --git a/Doc/howto/regex.rst b/Doc/howto/regex.rst
index 9ae04d718d..de3f4612cc 100644
--- a/Doc/howto/regex.rst
+++ b/Doc/howto/regex.rst
@@ -178,7 +178,7 @@ are usually not written to match that much data.
Repetitions such as ``*`` are :dfn:`greedy`; when repeating a RE, the matching
engine will try to repeat it as many times as possible. If later portions of the
pattern don't match, the matching engine will then back up and try again with
-few repetitions.
+fewer repetitions.
A step-by-step example will make this more obvious. Let's consider the
expression ``a[bcd]*b``. This matches the letter ``'a'``, zero or more letters
@@ -1004,17 +1004,18 @@ confusing.
A negative lookahead cuts through all this confusion:
-``.*[.](?!bat$).*$`` The negative lookahead means: if the expression ``bat``
+``.*[.](?!bat$)[^.]*$`` The negative lookahead means: if the expression ``bat``
doesn't match at this point, try the rest of the pattern; if ``bat$`` does
match, the whole pattern will fail. The trailing ``$`` is required to ensure
that something like ``sample.batch``, where the extension only starts with
-``bat``, will be allowed.
+``bat``, will be allowed. The ``[^.]*`` makes sure that the pattern works
+when there are multiple dots in the filename.
Excluding another filename extension is now easy; simply add it as an
alternative inside the assertion. The following pattern excludes filenames that
end in either ``bat`` or ``exe``:
-``.*[.](?!bat$|exe$).*$``
+``.*[.](?!bat$|exe$)[^.]*$``
Modifying Strings
@@ -1114,19 +1115,19 @@ which can be either a string or a function, and the string to be processed.
Here's a simple example of using the :meth:`sub` method. It replaces colour
names with the word ``colour``::
- >>> p = re.compile( '(blue|white|red)')
- >>> p.sub( 'colour', 'blue socks and red shoes')
+ >>> p = re.compile('(blue|white|red)')
+ >>> p.sub('colour', 'blue socks and red shoes')
'colour socks and colour shoes'
- >>> p.sub( 'colour', 'blue socks and red shoes', count=1)
+ >>> p.sub('colour', 'blue socks and red shoes', count=1)
'colour socks and red shoes'
The :meth:`subn` method does the same work, but returns a 2-tuple containing the
new string value and the number of replacements that were performed::
- >>> p = re.compile( '(blue|white|red)')
- >>> p.subn( 'colour', 'blue socks and red shoes')
+ >>> p = re.compile('(blue|white|red)')
+ >>> p.subn('colour', 'blue socks and red shoes')
('colour socks and colour shoes', 2)
- >>> p.subn( 'colour', 'no colours at all')
+ >>> p.subn('colour', 'no colours at all')
('no colours at all', 0)
Empty matches are replaced only when they're not adjacent to a previous match.
@@ -1138,7 +1139,7 @@ Empty matches are replaced only when they're not adjacent to a previous match.
If *replacement* is a string, any backslash escapes in it are processed. That
is, ``\n`` is converted to a single newline character, ``\r`` is converted to a
-carriage return, and so forth. Unknown escapes such as ``\j`` are left alone.
+carriage return, and so forth. Unknown escapes such as ``\&`` are left alone.
Backreferences, such as ``\6``, are replaced with the substring matched by the
corresponding group in the RE. This lets you incorporate portions of the
original text in the resulting replacement string.
diff --git a/Doc/howto/sorting.rst b/Doc/howto/sorting.rst
index f2e64ee98b..0334b26657 100644
--- a/Doc/howto/sorting.rst
+++ b/Doc/howto/sorting.rst
@@ -127,7 +127,7 @@ Sort Stability and Complex Sorts
================================
Sorts are guaranteed to be `stable
-<http://en.wikipedia.org/wiki/Sorting_algorithm#Stability>`_\. That means that
+<https://en.wikipedia.org/wiki/Sorting_algorithm#Stability>`_\. That means that
when multiple records have the same key, their original order is preserved.
>>> data = [('red', 1), ('blue', 1), ('red', 2), ('blue', 2)]
@@ -145,7 +145,7 @@ ascending *age*, do the *age* sort first and then sort again using *grade*:
>>> sorted(s, key=attrgetter('grade'), reverse=True) # now sort on primary key, descending
[('dave', 'B', 10), ('jane', 'B', 12), ('john', 'A', 15)]
-The `Timsort <http://en.wikipedia.org/wiki/Timsort>`_ algorithm used in Python
+The `Timsort <https://en.wikipedia.org/wiki/Timsort>`_ algorithm used in Python
does multiple sorts efficiently because it can take advantage of any ordering
already present in a dataset.
@@ -184,7 +184,7 @@ decorated list, but including it gives two benefits:
directly.
Another name for this idiom is
-`Schwartzian transform <http://en.wikipedia.org/wiki/Schwartzian_transform>`_\,
+`Schwartzian transform <https://en.wikipedia.org/wiki/Schwartzian_transform>`_\,
after Randal L. Schwartz, who popularized it among Perl programmers.
Now that Python sorting provides key-functions, this technique is not often needed.
@@ -262,7 +262,11 @@ Odd and Ends
twice:
>>> data = [('red', 1), ('blue', 1), ('red', 2), ('blue', 2)]
- >>> assert sorted(data, reverse=True) == list(reversed(sorted(reversed(data))))
+ >>> standard_way = sorted(data, key=itemgetter(0), reverse=True)
+ >>> double_reversed = list(reversed(sorted(reversed(data), key=itemgetter(0))))
+ >>> assert standard_way == double_reversed
+ >>> standard_way
+ [('red', 1), ('red', 2), ('blue', 1), ('blue', 2)]
* The sort routines are guaranteed to use :meth:`__lt__` when making comparisons
between two objects. So, it is easy to add a standard sort order to a class by
diff --git a/Doc/howto/unicode.rst b/Doc/howto/unicode.rst
index b49ac391ce..50a09bac4c 100644
--- a/Doc/howto/unicode.rst
+++ b/Doc/howto/unicode.rst
@@ -73,7 +73,7 @@ revision of Unicode.
precise historical details aren't necessary for understanding how to
use Unicode effectively, but if you're curious, consult the Unicode
consortium site listed in the References or
-the `Wikipedia entry for Unicode <http://en.wikipedia.org/wiki/Unicode#History>`_
+the `Wikipedia entry for Unicode <https://en.wikipedia.org/wiki/Unicode#History>`_
for more information.)
@@ -214,7 +214,7 @@ difficult reading. `A chronology <http://www.unicode.org/history/>`_ of the
origin and development of Unicode is also available on the site.
To help understand the standard, Jukka Korpela has written `an introductory
-guide <http://www.cs.tut.fi/~jkorpela/unicode/guide.html>`_ to reading the
+guide <https://www.cs.tut.fi/~jkorpela/unicode/guide.html>`_ to reading the
Unicode character tables.
Another `good introductory article <http://www.joelonsoftware.com/articles/Unicode.html>`_
@@ -223,8 +223,8 @@ If this introduction didn't make things clear to you, you should try
reading this alternate article before continuing.
Wikipedia entries are often helpful; see the entries for "`character encoding
-<http://en.wikipedia.org/wiki/Character_encoding>`_" and `UTF-8
-<http://en.wikipedia.org/wiki/UTF-8>`_, for example.
+<https://en.wikipedia.org/wiki/Character_encoding>`_" and `UTF-8
+<https://en.wikipedia.org/wiki/UTF-8>`_, for example.
Python's Unicode Support
@@ -280,8 +280,9 @@ and optionally an *errors* argument.
The *errors* argument specifies the response when the input string can't be
converted according to the encoding's rules. Legal values for this argument are
``'strict'`` (raise a :exc:`UnicodeDecodeError` exception), ``'replace'`` (use
-``U+FFFD``, ``REPLACEMENT CHARACTER``), or ``'ignore'`` (just leave the
-character out of the Unicode result).
+``U+FFFD``, ``REPLACEMENT CHARACTER``), ``'ignore'`` (just leave the
+character out of the Unicode result), or ``'backslashreplace'`` (inserts a
+``\xNN`` escape sequence).
The following examples show the differences::
>>> b'\x80abc'.decode("utf-8", "strict") #doctest: +NORMALIZE_WHITESPACE
@@ -291,12 +292,11 @@ The following examples show the differences::
invalid start byte
>>> b'\x80abc'.decode("utf-8", "replace")
'\ufffdabc'
+ >>> b'\x80abc'.decode("utf-8", "backslashreplace")
+ '\\x80abc'
>>> b'\x80abc'.decode("utf-8", "ignore")
'abc'
-(In this code example, the Unicode replacement character has been replaced by
-a question mark because it may not be displayed on some systems.)
-
Encodings are specified as strings containing the encoding's name. Python 3.2
comes with roughly 100 different encodings; see the Python Library Reference at
:ref:`standard-encodings` for a list. Some encodings have multiple names; for
@@ -325,8 +325,9 @@ The *errors* parameter is the same as the parameter of the
:meth:`~bytes.decode` method but supports a few more possible handlers. As well as
``'strict'``, ``'ignore'``, and ``'replace'`` (which in this case
inserts a question mark instead of the unencodable character), there is
-also ``'xmlcharrefreplace'`` (inserts an XML character reference) and
-``backslashreplace`` (inserts a ``\uNNNN`` escape sequence).
+also ``'xmlcharrefreplace'`` (inserts an XML character reference),
+``backslashreplace`` (inserts a ``\uNNNN`` escape sequence) and
+``namereplace`` (inserts a ``\N{...}`` escape sequence).
The following example shows the different results::
@@ -346,6 +347,8 @@ The following example shows the different results::
b'&#40960;abcd&#1972;'
>>> u.encode('ascii', 'backslashreplace')
b'\\ua000abcd\\u07b4'
+ >>> u.encode('ascii', 'namereplace')
+ b'\\N{YI SYLLABLE IT}abcd\\u07b4'
The low-level routines for registering and accessing the available
encodings are found in the :mod:`codecs` module. Implementing new
@@ -684,7 +687,7 @@ with the ``surrogateescape`` error handler::
# make changes to the string 'data'
with open(fname + '.new', 'w',
- encoding="ascii", errors="surrogateescape") as f:
+ encoding="ascii", errors="surrogateescape") as f:
f.write(data)
The ``surrogateescape`` error handler will decode any non-ASCII bytes
diff --git a/Doc/howto/urllib2.rst b/Doc/howto/urllib2.rst
index 9052ed59b0..24a415604f 100644
--- a/Doc/howto/urllib2.rst
+++ b/Doc/howto/urllib2.rst
@@ -64,7 +64,7 @@ you can do so via the :func:`~urllib.request.urlretrieve` function::
html = open(local_filename)
Many uses of urllib will be that simple (note that instead of an 'http:' URL we
-could have used an URL starting with 'ftp:', 'file:', etc.). However, it's the
+could have used a URL starting with 'ftp:', 'file:', etc.). However, it's the
purpose of this tutorial to explain the more complicated cases, concentrating on
HTTP.
@@ -122,7 +122,7 @@ library. ::
Note that other encodings are sometimes required (e.g. for file upload from HTML
forms - see `HTML Specification, Form Submission
-<http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13>`_ for more
+<https://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13>`_ for more
details).
If you do not pass the ``data`` argument, urllib uses a **GET** request. One
@@ -175,10 +175,10 @@ Explorer [#]_. ::
url = 'http://www.someserver.com/cgi-bin/register.cgi'
user_agent = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64)'
- values = {'name' : 'Michael Foord',
- 'location' : 'Northampton',
- 'language' : 'Python' }
- headers = { 'User-Agent' : user_agent }
+ values = {'name': 'Michael Foord',
+ 'location': 'Northampton',
+ 'language': 'Python' }
+ headers = {'User-Agent': user_agent}
data = urllib.parse.urlencode(values)
data = data.encode('ascii')
@@ -215,7 +215,7 @@ e.g. ::
>>> req = urllib.request.Request('http://www.pretend_server.org')
>>> try: urllib.request.urlopen(req)
... except urllib.error.URLError as e:
- ... print(e.reason) #doctest: +SKIP
+ ... print(e.reason) #doctest: +SKIP
...
(4, 'getaddrinfo failed')
@@ -372,7 +372,7 @@ Number 2
::
from urllib.request import Request, urlopen
- from urllib.error import URLError
+ from urllib.error import URLError
req = Request(someurl)
try:
response = urlopen(req)
@@ -403,7 +403,7 @@ fetched, particularly the headers sent by the server. It is currently an
:class:`http.client.HTTPMessage` instance.
Typical headers include 'Content-length', 'Content-type', and so on. See the
-`Quick Reference to HTTP Headers <http://www.cs.tut.fi/~jkorpela/http.html>`_
+`Quick Reference to HTTP Headers <https://www.cs.tut.fi/~jkorpela/http.html>`_
for a useful listing of HTTP headers with brief explanations of their meaning
and use.
@@ -514,7 +514,7 @@ component and the hostname and optionally the port number)
e.g. "http://example.com/" *or* an "authority" (i.e. the hostname,
optionally including the port number) e.g. "example.com" or "example.com:8080"
(the latter example includes a port number). The authority, if present, must
-NOT contain the "userinfo" component - for example "joe@password:example.com" is
+NOT contain the "userinfo" component - for example "joe:password@example.com" is
not correct.
@@ -586,5 +586,5 @@ This document was reviewed and revised by John Lee.
scripts with a localhost server, I have to prevent urllib from using
the proxy.
.. [#] urllib opener for SSL proxy (CONNECT method): `ASPN Cookbook Recipe
- <http://code.activestate.com/recipes/456195/>`_.
+ <https://code.activestate.com/recipes/456195/>`_.
diff --git a/Doc/howto/webservers.rst b/Doc/howto/webservers.rst
deleted file mode 100644
index 9e9b69d9eb..0000000000
--- a/Doc/howto/webservers.rst
+++ /dev/null
@@ -1,731 +0,0 @@
-*******************************
- HOWTO Use Python in the web
-*******************************
-
-:Author: Marek Kubica
-
-.. topic:: Abstract
-
- This document shows how Python fits into the web. It presents some ways
- to integrate Python with a web server, and general practices useful for
- developing web sites.
-
-
-Programming for the Web has become a hot topic since the rise of "Web 2.0",
-which focuses on user-generated content on web sites. It has always been
-possible to use Python for creating web sites, but it was a rather tedious task.
-Therefore, many frameworks and helper tools have been created to assist
-developers in creating faster and more robust sites. This HOWTO describes
-some of the methods used to combine Python with a web server to create
-dynamic content. It is not meant as a complete introduction, as this topic is
-far too broad to be covered in one single document. However, a short overview
-of the most popular libraries is provided.
-
-.. seealso::
-
- While this HOWTO tries to give an overview of Python in the web, it cannot
- always be as up to date as desired. Web development in Python is rapidly
- moving forward, so the wiki page on `Web Programming
- <https://wiki.python.org/moin/WebProgramming>`_ may be more in sync with
- recent development.
-
-
-The Low-Level View
-==================
-
-When a user enters a web site, their browser makes a connection to the site's
-web server (this is called the *request*). The server looks up the file in the
-file system and sends it back to the user's browser, which displays it (this is
-the *response*). This is roughly how the underlying protocol, HTTP, works.
-
-Dynamic web sites are not based on files in the file system, but rather on
-programs which are run by the web server when a request comes in, and which
-*generate* the content that is returned to the user. They can do all sorts of
-useful things, like display the postings of a bulletin board, show your email,
-configure software, or just display the current time. These programs can be
-written in any programming language the server supports. Since most servers
-support Python, it is easy to use Python to create dynamic web sites.
-
-Most HTTP servers are written in C or C++, so they cannot execute Python code
-directly -- a bridge is needed between the server and the program. These
-bridges, or rather interfaces, define how programs interact with the server.
-There have been numerous attempts to create the best possible interface, but
-there are only a few worth mentioning.
-
-Not every web server supports every interface. Many web servers only support
-old, now-obsolete interfaces; however, they can often be extended using
-third-party modules to support newer ones.
-
-
-Common Gateway Interface
-------------------------
-
-This interface, most commonly referred to as "CGI", is the oldest, and is
-supported by nearly every web server out of the box. Programs using CGI to
-communicate with their web server need to be started by the server for every
-request. So, every request starts a new Python interpreter -- which takes some
-time to start up -- thus making the whole interface only usable for low load
-situations.
-
-The upside of CGI is that it is simple -- writing a Python program which uses
-CGI is a matter of about three lines of code. This simplicity comes at a
-price: it does very few things to help the developer.
-
-Writing CGI programs, while still possible, is no longer recommended. With
-:ref:`WSGI <WSGI>`, a topic covered later in this document, it is possible to write
-programs that emulate CGI, so they can be run as CGI if no better option is
-available.
-
-.. seealso::
-
- The Python standard library includes some modules that are helpful for
- creating plain CGI programs:
-
- * :mod:`cgi` -- Handling of user input in CGI scripts
- * :mod:`cgitb` -- Displays nice tracebacks when errors happen in CGI
- applications, instead of presenting a "500 Internal Server Error" message
-
- The Python wiki features a page on `CGI scripts
- <https://wiki.python.org/moin/CgiScripts>`_ with some additional information
- about CGI in Python.
-
-
-Simple script for testing CGI
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-To test whether your web server works with CGI, you can use this short and
-simple CGI program::
-
- #!/usr/bin/env python
- # -*- coding: UTF-8 -*-
-
- # enable debugging
- import cgitb
- cgitb.enable()
-
- print("Content-Type: text/plain;charset=utf-8")
- print()
-
- print("Hello World!")
-
-Depending on your web server configuration, you may need to save this code with
-a ``.py`` or ``.cgi`` extension. Additionally, this file may also need to be
-in a ``cgi-bin`` folder, for security reasons.
-
-You might wonder what the ``cgitb`` line is about. This line makes it possible
-to display a nice traceback instead of just crashing and displaying an "Internal
-Server Error" in the user's browser. This is useful for debugging, but it might
-risk exposing some confidential data to the user. You should not use ``cgitb``
-in production code for this reason. You should *always* catch exceptions, and
-display proper error pages -- end-users don't like to see nondescript "Internal
-Server Errors" in their browsers.
-
-
-Setting up CGI on your own server
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-If you don't have your own web server, this does not apply to you. You can
-check whether it works as-is, and if not you will need to talk to the
-administrator of your web server. If it is a big host, you can try filing a
-ticket asking for Python support.
-
-If you are your own administrator or want to set up CGI for testing purposes on
-your own computers, you have to configure it by yourself. There is no single
-way to configure CGI, as there are many web servers with different
-configuration options. Currently the most widely used free web server is
-`Apache HTTPd <http://httpd.apache.org/>`_, or Apache for short. Apache can be
-easily installed on nearly every system using the system's package management
-tool. `lighttpd <http://www.lighttpd.net>`_ is another alternative and is
-said to have better performance. On many systems this server can also be
-installed using the package management tool, so manually compiling the web
-server may not be needed.
-
-* On Apache you can take a look at the `Dynamic Content with CGI
- <http://httpd.apache.org/docs/2.2/howto/cgi.html>`_ tutorial, where everything
- is described. Most of the time it is enough just to set ``+ExecCGI``. The
- tutorial also describes the most common gotchas that might arise.
-
-* On lighttpd you need to use the `CGI module
- <http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModCGI>`_\ , which can be configured
- in a straightforward way. It boils down to setting ``cgi.assign`` properly.
-
-
-Common problems with CGI scripts
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-Using CGI sometimes leads to small annoyances while trying to get these
-scripts to run. Sometimes a seemingly correct script does not work as
-expected, the cause being some small hidden problem that's difficult to spot.
-
-Some of these potential problems are:
-
-* The Python script is not marked as executable. When CGI scripts are not
- executable most web servers will let the user download it, instead of
- running it and sending the output to the user. For CGI scripts to run
- properly on Unix-like operating systems, the ``+x`` bit needs to be set.
- Using ``chmod a+x your_script.py`` may solve this problem.
-
-* On a Unix-like system, The line endings in the program file must be Unix
- style line endings. This is important because the web server checks the
- first line of the script (called shebang) and tries to run the program
- specified there. It gets easily confused by Windows line endings (Carriage
- Return & Line Feed, also called CRLF), so you have to convert the file to
- Unix line endings (only Line Feed, LF). This can be done automatically by
- uploading the file via FTP in text mode instead of binary mode, but the
- preferred way is just telling your editor to save the files with Unix line
- endings. Most editors support this.
-
-* Your web server must be able to read the file, and you need to make sure the
- permissions are correct. On unix-like systems, the server often runs as user
- and group ``www-data``, so it might be worth a try to change the file
- ownership, or making the file world readable by using ``chmod a+r
- your_script.py``.
-
-* The web server must know that the file you're trying to access is a CGI script.
- Check the configuration of your web server, as it may be configured
- to expect a specific file extension for CGI scripts.
-
-* On Unix-like systems, the path to the interpreter in the shebang
- (``#!/usr/bin/env python``) must be correct. This line calls
- ``/usr/bin/env`` to find Python, but it will fail if there is no
- ``/usr/bin/env``, or if Python is not in the web server's path. If you know
- where your Python is installed, you can also use that full path. The
- commands ``whereis python`` and ``type -p python`` could help you find
- where it is installed. Once you know the path, you can change the shebang
- accordingly: ``#!/usr/bin/python``.
-
-* The file must not contain a BOM (Byte Order Mark). The BOM is meant for
- determining the byte order of UTF-16 and UTF-32 encodings, but some editors
- write this also into UTF-8 files. The BOM interferes with the shebang line,
- so be sure to tell your editor not to write the BOM.
-
-* If the web server is using :ref:`mod-python`, ``mod_python`` may be having
- problems. ``mod_python`` is able to handle CGI scripts by itself, but it can
- also be a source of issues.
-
-
-.. _mod-python:
-
-mod_python
-----------
-
-People coming from PHP often find it hard to grasp how to use Python in the web.
-Their first thought is mostly `mod_python <http://modpython.org/>`_\ ,
-because they think that this is the equivalent to ``mod_php``. Actually, there
-are many differences. What ``mod_python`` does is embed the interpreter into
-the Apache process, thus speeding up requests by not having to start a Python
-interpreter for each request. On the other hand, it is not "Python intermixed
-with HTML" in the way that PHP is often intermixed with HTML. The Python
-equivalent of that is a template engine. ``mod_python`` itself is much more
-powerful and provides more access to Apache internals. It can emulate CGI,
-work in a "Python Server Pages" mode (similar to JSP) which is "HTML
-intermingled with Python", and it has a "Publisher" which designates one file
-to accept all requests and decide what to do with them.
-
-``mod_python`` does have some problems. Unlike the PHP interpreter, the Python
-interpreter uses caching when executing files, so changes to a file will
-require the web server to be restarted. Another problem is the basic concept
--- Apache starts child processes to handle the requests, and unfortunately
-every child process needs to load the whole Python interpreter even if it does
-not use it. This makes the whole web server slower. Another problem is that,
-because ``mod_python`` is linked against a specific version of ``libpython``,
-it is not possible to switch from an older version to a newer (e.g. 2.4 to 2.5)
-without recompiling ``mod_python``. ``mod_python`` is also bound to the Apache
-web server, so programs written for ``mod_python`` cannot easily run on other
-web servers.
-
-These are the reasons why ``mod_python`` should be avoided when writing new
-programs. In some circumstances it still might be a good idea to use
-``mod_python`` for deployment, but WSGI makes it possible to run WSGI programs
-under ``mod_python`` as well.
-
-
-FastCGI and SCGI
-----------------
-
-FastCGI and SCGI try to solve the performance problem of CGI in another way.
-Instead of embedding the interpreter into the web server, they create
-long-running background processes. There is still a module in the web server
-which makes it possible for the web server to "speak" with the background
-process. As the background process is independent of the server, it can be
-written in any language, including Python. The language just needs to have a
-library which handles the communication with the webserver.
-
-The difference between FastCGI and SCGI is very small, as SCGI is essentially
-just a "simpler FastCGI". As the web server support for SCGI is limited,
-most people use FastCGI instead, which works the same way. Almost everything
-that applies to SCGI also applies to FastCGI as well, so we'll only cover
-the latter.
-
-These days, FastCGI is never used directly. Just like ``mod_python``, it is only
-used for the deployment of WSGI applications.
-
-
-Setting up FastCGI
-^^^^^^^^^^^^^^^^^^
-
-Each web server requires a specific module.
-
-* Apache has both `mod_fastcgi <http://www.fastcgi.com/drupal/>`_ and `mod_fcgid
- <http://httpd.apache.org/mod_fcgid/>`_. ``mod_fastcgi`` is the original one, but it
- has some licensing issues, which is why it is sometimes considered non-free.
- ``mod_fcgid`` is a smaller, compatible alternative. One of these modules needs
- to be loaded by Apache.
-
-* lighttpd ships its own `FastCGI module
- <http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModFastCGI>`_ as well as an
- `SCGI module <http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModSCGI>`_.
-
-* `nginx <http://nginx.org/>`_ also supports `FastCGI
- <http://wiki.nginx.org/NginxSimplePythonFCGI>`_.
-
-Once you have installed and configured the module, you can test it with the
-following WSGI-application::
-
- #!/usr/bin/env python
- # -*- coding: UTF-8 -*-
-
- import sys, os
- from html import escape
- from flup.server.fcgi import WSGIServer
-
- def app(environ, start_response):
- start_response('200 OK', [('Content-Type', 'text/html')])
-
- yield '<h1>FastCGI Environment</h1>'
- yield '<table>'
- for k, v in sorted(environ.items()):
- yield '<tr><th>{0}</th><td>{1}</td></tr>'.format(
- escape(k), escape(v))
- yield '</table>'
-
- WSGIServer(app).run()
-
-This is a simple WSGI application, but you need to install `flup
-<https://pypi.python.org/pypi/flup/1.0>`_ first, as flup handles the low level
-FastCGI access.
-
-.. seealso::
-
- There is some documentation on `setting up Django with FastCGI
- <https://docs.djangoproject.com/en/dev/howto/deployment/fastcgi/>`_, most of
- which can be reused for other WSGI-compliant frameworks and libraries.
- Only the ``manage.py`` part has to be changed, the example used here can be
- used instead. Django does more or less the exact same thing.
-
-
-mod_wsgi
---------
-
-`mod_wsgi <http://code.google.com/p/modwsgi/>`_ is an attempt to get rid of the
-low level gateways. Given that FastCGI, SCGI, and mod_python are mostly used to
-deploy WSGI applications, mod_wsgi was started to directly embed WSGI applications
-into the Apache web server. mod_wsgi is specifically designed to host WSGI
-applications. It makes the deployment of WSGI applications much easier than
-deployment using other low level methods, which need glue code. The downside
-is that mod_wsgi is limited to the Apache web server; other servers would need
-their own implementations of mod_wsgi.
-
-mod_wsgi supports two modes: embedded mode, in which it integrates with the
-Apache process, and daemon mode, which is more FastCGI-like. Unlike FastCGI,
-mod_wsgi handles the worker-processes by itself, which makes administration
-easier.
-
-
-.. _WSGI:
-
-Step back: WSGI
-===============
-
-WSGI has already been mentioned several times, so it has to be something
-important. In fact it really is, and now it is time to explain it.
-
-The *Web Server Gateway Interface*, or WSGI for short, is defined in
-:pep:`333` and is currently the best way to do Python web programming. While
-it is great for programmers writing frameworks, a normal web developer does not
-need to get in direct contact with it. When choosing a framework for web
-development it is a good idea to choose one which supports WSGI.
-
-The big benefit of WSGI is the unification of the application programming
-interface. When your program is compatible with WSGI -- which at the outer
-level means that the framework you are using has support for WSGI -- your
-program can be deployed via any web server interface for which there are WSGI
-wrappers. You do not need to care about whether the application user uses
-mod_python or FastCGI or mod_wsgi -- with WSGI your application will work on
-any gateway interface. The Python standard library contains its own WSGI
-server, :mod:`wsgiref`, which is a small web server that can be used for
-testing.
-
-A really great WSGI feature is middleware. Middleware is a layer around your
-program which can add various functionality to it. There is quite a bit of
-`middleware <http://www.wsgi.org/en/latest/libraries.html>`_ already
-available. For example, instead of writing your own session management (HTTP
-is a stateless protocol, so to associate multiple HTTP requests with a single
-user your application must create and manage such state via a session), you can
-just download middleware which does that, plug it in, and get on with coding
-the unique parts of your application. The same thing with compression -- there
-is existing middleware which handles compressing your HTML using gzip to save
-on your server's bandwidth. Authentication is another a problem easily solved
-using existing middleware.
-
-Although WSGI may seem complex, the initial phase of learning can be very
-rewarding because WSGI and the associated middleware already have solutions to
-many problems that might arise while developing web sites.
-
-
-WSGI Servers
-------------
-
-The code that is used to connect to various low level gateways like CGI or
-mod_python is called a *WSGI server*. One of these servers is ``flup``, which
-supports FastCGI and SCGI, as well as `AJP
-<http://en.wikipedia.org/wiki/Apache_JServ_Protocol>`_. Some of these servers
-are written in Python, as ``flup`` is, but there also exist others which are
-written in C and can be used as drop-in replacements.
-
-There are many servers already available, so a Python web application
-can be deployed nearly anywhere. This is one big advantage that Python has
-compared with other web technologies.
-
-.. seealso::
-
- A good overview of WSGI-related code can be found in the `WSGI homepage
- <http://www.wsgi.org/en/latest/index.html>`_, which contains an extensive list of `WSGI servers
- <http://www.wsgi.org/en/latest/servers.html>`_ which can be used by *any* application
- supporting WSGI.
-
- You might be interested in some WSGI-supporting modules already contained in
- the standard library, namely:
-
- * :mod:`wsgiref` -- some tiny utilities and servers for WSGI
-
-
-Case study: MoinMoin
---------------------
-
-What does WSGI give the web application developer? Let's take a look at
-an application that's been around for a while, which was written in
-Python without using WSGI.
-
-One of the most widely used wiki software packages is `MoinMoin
-<http://moinmo.in/>`_. It was created in 2000, so it predates WSGI by about
-three years. Older versions needed separate code to run on CGI, mod_python,
-FastCGI and standalone.
-
-It now includes support for WSGI. Using WSGI, it is possible to deploy
-MoinMoin on any WSGI compliant server, with no additional glue code.
-Unlike the pre-WSGI versions, this could include WSGI servers that the
-authors of MoinMoin know nothing about.
-
-
-Model-View-Controller
-=====================
-
-The term *MVC* is often encountered in statements such as "framework *foo*
-supports MVC". MVC is more about the overall organization of code, rather than
-any particular API. Many web frameworks use this model to help the developer
-bring structure to their program. Bigger web applications can have lots of
-code, so it is a good idea to have an effective structure right from the beginning.
-That way, even users of other frameworks (or even other languages, since MVC is
-not Python-specific) can easily understand the code, given that they are
-already familiar with the MVC structure.
-
-MVC stands for three components:
-
-* The *model*. This is the data that will be displayed and modified. In
- Python frameworks, this component is often represented by the classes used by
- an object-relational mapper.
-
-* The *view*. This component's job is to display the data of the model to the
- user. Typically this component is implemented via templates.
-
-* The *controller*. This is the layer between the user and the model. The
- controller reacts to user actions (like opening some specific URL), tells
- the model to modify the data if necessary, and tells the view code what to
- display,
-
-While one might think that MVC is a complex design pattern, in fact it is not.
-It is used in Python because it has turned out to be useful for creating clean,
-maintainable web sites.
-
-.. note::
-
- While not all Python frameworks explicitly support MVC, it is often trivial
- to create a web site which uses the MVC pattern by separating the data logic
- (the model) from the user interaction logic (the controller) and the
- templates (the view). That's why it is important not to write unnecessary
- Python code in the templates -- it works against the MVC model and creates
- chaos in the code base, making it harder to understand and modify.
-
-.. seealso::
-
- The English Wikipedia has an article about the `Model-View-Controller pattern
- <http://en.wikipedia.org/wiki/Model-view-controller>`_. It includes a long
- list of web frameworks for various programming languages.
-
-
-Ingredients for Websites
-========================
-
-Websites are complex constructs, so tools have been created to help web
-developers make their code easier to write and more maintainable. Tools like
-these exist for all web frameworks in all languages. Developers are not forced
-to use these tools, and often there is no "best" tool. It is worth learning
-about the available tools because they can greatly simplify the process of
-developing a web site.
-
-
-.. seealso::
-
- There are far more components than can be presented here. The Python wiki
- has a page about these components, called
- `Web Components <https://wiki.python.org/moin/WebComponents>`_.
-
-
-Templates
----------
-
-Mixing of HTML and Python code is made possible by a few libraries. While
-convenient at first, it leads to horribly unmaintainable code. That's why
-templates exist. Templates are, in the simplest case, just HTML files with
-placeholders. The HTML is sent to the user's browser after filling in the
-placeholders.
-
-Python already includes a way to build simple templates::
-
- # a simple template
- template = "<html><body><h1>Hello {who}!</h1></body></html>"
- print(template.format(who="Reader"))
-
-To generate complex HTML based on non-trivial model data, conditional
-and looping constructs like Python's *for* and *if* are generally needed.
-*Template engines* support templates of this complexity.
-
-There are a lot of template engines available for Python which can be used with
-or without a `framework`_. Some of these define a plain-text programming
-language which is easy to learn, partly because it is limited in scope.
-Others use XML, and the template output is guaranteed to be always be valid
-XML. There are many other variations.
-
-Some `frameworks`_ ship their own template engine or recommend one in
-particular. In the absence of a reason to use a different template engine,
-using the one provided by or recommended by the framework is a good idea.
-
-Popular template engines include:
-
- * `Mako <http://www.makotemplates.org/>`_
- * `Genshi <http://genshi.edgewall.org/>`_
- * `Jinja <http://jinja.pocoo.org/>`_
-
-.. seealso::
-
- There are many template engines competing for attention, because it is
- pretty easy to create them in Python. The page `Templating
- <https://wiki.python.org/moin/Templating>`_ in the wiki lists a big,
- ever-growing number of these. The three listed above are considered "second
- generation" template engines and are a good place to start.
-
-
-Data persistence
-----------------
-
-*Data persistence*, while sounding very complicated, is just about storing data.
-This data might be the text of blog entries, the postings on a bulletin board or
-the text of a wiki page. There are, of course, a number of different ways to store
-information on a web server.
-
-Often, relational database engines like `MySQL <http://www.mysql.com/>`_ or
-`PostgreSQL <http://www.postgresql.org/>`_ are used because of their good
-performance when handling very large databases consisting of millions of
-entries. There is also a small database engine called `SQLite
-<http://www.sqlite.org/>`_, which is bundled with Python in the :mod:`sqlite3`
-module, and which uses only one file. It has no other dependencies. For
-smaller sites SQLite is just enough.
-
-Relational databases are *queried* using a language called `SQL
-<http://en.wikipedia.org/wiki/SQL>`_. Python programmers in general do not
-like SQL too much, as they prefer to work with objects. It is possible to save
-Python objects into a database using a technology called `ORM
-<http://en.wikipedia.org/wiki/Object-relational_mapping>`_ (Object Relational
-Mapping). ORM translates all object-oriented access into SQL code under the
-hood, so the developer does not need to think about it. Most `frameworks`_ use
-ORMs, and it works quite well.
-
-A second possibility is storing data in normal, plain text files (some
-times called "flat files"). This is very easy for simple sites,
-but can be difficult to get right if the web site is performing many
-updates to the stored data.
-
-A third possibility are object oriented databases (also called "object
-databases"). These databases store the object data in a form that closely
-parallels the way the objects are structured in memory during program
-execution. (By contrast, ORMs store the object data as rows of data in tables
-and relations between those rows.) Storing the objects directly has the
-advantage that nearly all objects can be saved in a straightforward way, unlike
-in relational databases where some objects are very hard to represent.
-
-`Frameworks`_ often give hints on which data storage method to choose. It is
-usually a good idea to stick to the data store recommended by the framework
-unless the application has special requirements better satisfied by an
-alternate storage mechanism.
-
-.. seealso::
-
- * `Persistence Tools <https://wiki.python.org/moin/PersistenceTools>`_ lists
- possibilities on how to save data in the file system. Some of these
- modules are part of the standard library
-
- * `Database Programming <https://wiki.python.org/moin/DatabaseProgramming>`_
- helps with choosing a method for saving data
-
- * `SQLAlchemy <http://www.sqlalchemy.org/>`_, the most powerful OR-Mapper
- for Python, and `Elixir <http://elixir.ematia.de/>`_, which makes
- SQLAlchemy easier to use
-
- * `SQLObject <http://www.sqlobject.org/>`_, another popular OR-Mapper
-
- * `ZODB <https://launchpad.net/zodb>`_ and `Durus
- <http://www.mems-exchange.org/software/durus/>`_, two object oriented
- databases
-
-
-.. _framework:
-
-Frameworks
-==========
-
-The process of creating code to run web sites involves writing code to provide
-various services. The code to provide a particular service often works the
-same way regardless of the complexity or purpose of the web site in question.
-Abstracting these common solutions into reusable code produces what are called
-"frameworks" for web development. Perhaps the most well-known framework for
-web development is Ruby on Rails, but Python has its own frameworks. Some of
-these were partly inspired by Rails, or borrowed ideas from Rails, but many
-existed a long time before Rails.
-
-Originally Python web frameworks tended to incorporate all of the services
-needed to develop web sites as a giant, integrated set of tools. No two web
-frameworks were interoperable: a program developed for one could not be
-deployed on a different one without considerable re-engineering work. This led
-to the development of "minimalist" web frameworks that provided just the tools
-to communicate between the Python code and the http protocol, with all other
-services to be added on top via separate components. Some ad hoc standards
-were developed that allowed for limited interoperability between frameworks,
-such as a standard that allowed different template engines to be used
-interchangeably.
-
-Since the advent of WSGI, the Python web framework world has been evolving
-toward interoperability based on the WSGI standard. Now many web frameworks,
-whether "full stack" (providing all the tools one needs to deploy the most
-complex web sites) or minimalist, or anything in between, are built from
-collections of reusable components that can be used with more than one
-framework.
-
-The majority of users will probably want to select a "full stack" framework
-that has an active community. These frameworks tend to be well documented,
-and provide the easiest path to producing a fully functional web site in
-minimal time.
-
-
-Some notable frameworks
------------------------
-
-There are an incredible number of frameworks, so they cannot all be covered
-here. Instead we will briefly touch on some of the most popular.
-
-
-Django
-^^^^^^
-
-`Django <https://www.djangoproject.com/>`_ is a framework consisting of several
-tightly coupled elements which were written from scratch and work together very
-well. It includes an ORM which is quite powerful while being simple to use,
-and has a great online administration interface which makes it possible to edit
-the data in the database with a browser. The template engine is text-based and
-is designed to be usable for page designers who cannot write Python. It
-supports template inheritance and filters (which work like Unix pipes). Django
-has many handy features bundled, such as creation of RSS feeds or generic views,
-which make it possible to create web sites almost without writing any Python code.
-
-It has a big, international community, the members of which have created many
-web sites. There are also a lot of add-on projects which extend Django's normal
-functionality. This is partly due to Django's well written `online
-documentation <https://docs.djangoproject.com/>`_ and the `Django book
-<http://www.djangobook.com/>`_.
-
-
-.. note::
-
- Although Django is an MVC-style framework, it names the elements
- differently, which is described in the `Django FAQ
- <https://docs.djangoproject.com/en/dev/faq/general/#django-appears-to-be-a-mvc-framework-but-you-call-the-controller-the-view-and-the-view-the-template-how-come-you-don-t-use-the-standard-names>`_.
-
-
-TurboGears
-^^^^^^^^^^
-
-Another popular web framework for Python is `TurboGears
-<http://www.turbogears.org/>`_. TurboGears takes the approach of using already
-existing components and combining them with glue code to create a seamless
-experience. TurboGears gives the user flexibility in choosing components. For
-example the ORM and template engine can be changed to use packages different
-from those used by default.
-
-The documentation can be found in the `TurboGears wiki
-<http://docs.turbogears.org/>`_, where links to screencasts can be found.
-TurboGears has also an active user community which can respond to most related
-questions. There is also a `TurboGears book <http://turbogearsbook.com/>`_
-published, which is a good starting point.
-
-The newest version of TurboGears, version 2.0, moves even further in direction
-of WSGI support and a component-based architecture. TurboGears 2 is based on
-the WSGI stack of another popular component-based web framework, `Pylons
-<http://www.pylonsproject.org/>`_.
-
-
-Zope
-^^^^
-
-The Zope framework is one of the "old original" frameworks. Its current
-incarnation in Zope2 is a tightly integrated full-stack framework. One of its
-most interesting feature is its tight integration with a powerful object
-database called the `ZODB <https://launchpad.net/zodb>`_ (Zope Object Database).
-Because of its highly integrated nature, Zope wound up in a somewhat isolated
-ecosystem: code written for Zope wasn't very usable outside of Zope, and
-vice-versa. To solve this problem the Zope 3 effort was started. Zope 3
-re-engineers Zope as a set of more cleanly isolated components. This effort
-was started before the advent of the WSGI standard, but there is WSGI support
-for Zope 3 from the `Repoze <http://repoze.org/>`_ project. Zope components
-have many years of production use behind them, and the Zope 3 project gives
-access to these components to the wider Python community. There is even a
-separate framework based on the Zope components: `Grok
-<http://grok.zope.org/>`_.
-
-Zope is also the infrastructure used by the `Plone <https://plone.org/>`_ content
-management system, one of the most powerful and popular content management
-systems available.
-
-
-Other notable frameworks
-^^^^^^^^^^^^^^^^^^^^^^^^
-
-Of course these are not the only frameworks that are available. There are
-many other frameworks worth mentioning.
-
-Another framework that's already been mentioned is `Pylons`_. Pylons is much
-like TurboGears, but with an even stronger emphasis on flexibility, which comes
-at the cost of being more difficult to use. Nearly every component can be
-exchanged, which makes it necessary to use the documentation of every single
-component, of which there are many. Pylons builds upon `Paste
-<http://pythonpaste.org/>`_, an extensive set of tools which are handy for WSGI.
-
-And that's still not everything. The most up-to-date information can always be
-found in the Python wiki.
-
-.. seealso::
-
- The Python wiki contains an extensive list of `web frameworks
- <https://wiki.python.org/moin/WebFrameworks>`_.
-
- Most frameworks also have their own mailing lists and IRC channels, look out
- for these on the projects' web sites.
diff --git a/Doc/includes/noddy.c b/Doc/includes/noddy.c
index 8f79fcf6bf..19a27a89e8 100644
--- a/Doc/includes/noddy.c
+++ b/Doc/includes/noddy.c
@@ -38,7 +38,7 @@ static PyModuleDef noddymodule = {
};
PyMODINIT_FUNC
-PyInit_noddy(void)
+PyInit_noddy(void)
{
PyObject* m;
diff --git a/Doc/includes/run-func.c b/Doc/includes/run-func.c
index 1c9860d7a8..986d670319 100644
--- a/Doc/includes/run-func.c
+++ b/Doc/includes/run-func.c
@@ -13,7 +13,7 @@ main(int argc, char *argv[])
}
Py_Initialize();
- pName = PyUnicode_FromString(argv[1]);
+ pName = PyUnicode_DecodeFSDefault(argv[1]);
/* Error checking of pName left out */
pModule = PyImport_Import(pName);
diff --git a/Doc/includes/typestruct.h b/Doc/includes/typestruct.h
index 726500980e..9f47899a19 100644
--- a/Doc/includes/typestruct.h
+++ b/Doc/includes/typestruct.h
@@ -9,7 +9,8 @@ typedef struct _typeobject {
printfunc tp_print;
getattrfunc tp_getattr;
setattrfunc tp_setattr;
- void *tp_reserved; /* formerly known as tp_compare */
+ PyAsyncMethods *tp_as_async; /* formerly known as tp_compare (Python 2)
+ or tp_reserved (Python 3) */
reprfunc tp_repr;
/* Method suites for standard classes */
diff --git a/Doc/install/index.rst b/Doc/install/index.rst
index e63b6cd3d3..b22fc5958c 100644
--- a/Doc/install/index.rst
+++ b/Doc/install/index.rst
@@ -10,6 +10,11 @@
.. TODO: Fill in XXX comments
+.. seealso::
+
+ :ref:`installing-index`
+ The up to date module installation documentations
+
.. The audience for this document includes people who don't know anything
about Python and aren't about to learn the language just in order to
install and maintain it for their users, i.e. system administrators.
@@ -361,7 +366,7 @@ And here are the values used on Windows:
Type of file Installation directory
=============== ===========================================================
modules :file:`{userbase}\\Python{XY}\\site-packages`
-scripts :file:`{userbase}\\Scripts`
+scripts :file:`{userbase}\\Python{XY}\\Scripts`
data :file:`{userbase}`
C headers :file:`{userbase}\\Python{XY}\\Include\\{distname}`
=============== ===========================================================
@@ -865,12 +870,12 @@ config file will apply. (Or if other commands that derive values from it are
run, they will use the values in the config file.)
You can find out the complete list of options for any command using the
-:option:`--help` option, e.g.::
+:option:`!--help` option, e.g.::
python setup.py build --help
and you can find out the complete list of global options by using
-:option:`--help` without a command::
+:option:`!--help` without a command::
python setup.py --help
@@ -927,7 +932,7 @@ Let's examine each of the fields in turn.
to be in Objective C.
* *cpparg* is an argument for the C preprocessor, and is anything starting with
- :option:`-I`, :option:`-D`, :option:`-U` or :option:`-C`.
+ :option:`!-I`, :option:`-D`, :option:`!-U` or :option:`-C`.
* *library* is anything ending in :file:`.a` or beginning with :option:`-l` or
:option:`-L`.
@@ -1012,7 +1017,7 @@ section :ref:`inst-config-files`.)
.. seealso::
- `C++Builder Compiler <http://www.embarcadero.com/downloads>`_
+ `C++Builder Compiler <https://www.embarcadero.com/products>`_
Information about the free C++ compiler from Borland, including links to the
download pages.
@@ -1055,7 +1060,7 @@ These compilers require some special libraries. This task is more complex than
for Borland's C++, because there is no program to convert the library. First
you have to create a list of symbols which the Python DLL exports. (You can find
a good program for this task at
-http://sourceforge.net/projects/mingw/files/MinGW/Extension/pexports/).
+https://sourceforge.net/projects/mingw/files/MinGW/Extension/pexports/).
.. I don't understand what the next line means. --amk
.. (inclusive the references on data structures.)
@@ -1093,7 +1098,7 @@ normal libraries do.
.. [#] This also means you could replace all existing COFF-libraries with OMF-libraries
of the same name.
-.. [#] Check http://www.sourceware.org/cygwin/ and http://www.mingw.org/ for more
+.. [#] Check https://www.sourceware.org/cygwin/ and http://www.mingw.org/ for more
information
.. [#] Then you have no POSIX emulation available, but you also don't need
diff --git a/Doc/installing/index.rst b/Doc/installing/index.rst
index 973c689861..1ef314999b 100644
--- a/Doc/installing/index.rst
+++ b/Doc/installing/index.rst
@@ -48,7 +48,7 @@ Key terms
repository of open source licensed packages made available for use by
other Python users
* the `Python Packaging Authority
- <https://packaging.python.org/en/latest/future.html>`__ are the group of
+ <https://www.pypa.io/en/latest/>`__ are the group of
developers and documentation authors responsible for the maintenance and
evolution of the standard packaging tools and the associated metadata and
file format standards. They maintain a variety of tools, documentation
@@ -84,10 +84,12 @@ dependencies from the Python Packaging Index::
Python.
It's also possible to specify an exact or minimum version directly on the
-command line::
+command line. When using comparator operators such as ``>``, ``<`` or some other
+special character which get interpreted by shell, the package name and the
+version should be enclosed within double quotes::
python -m pip install SomePackage==1.0.4 # specific version
- python -m pip install 'SomePackage>=1.0.4' # minimum version
+ python -m pip install "SomePackage>=1.0.4" # minimum version
Normally, if a suitable module is already installed, attempting to install
it again will have no effect. Upgrading existing modules must be requested
@@ -104,7 +106,7 @@ into an active virtual environment uses the commands shown above.
.. seealso::
`Python Packaging User Guide: Installing Python Distribution Packages
- <https://packaging.python.org/en/latest/installing.html#installing-python-distribution-packages>`__
+ <https://packaging.python.org/en/latest/installing/>`__
How do I ...?
@@ -121,8 +123,8 @@ User Guide.
.. seealso::
- `Python Packaging User Guide: Setup for Installing Distribution Packages
- <https://packaging.python.org/en/latest/installing.html#setup-for-installing-distribution-packages>`__
+ `Python Packaging User Guide: Requirements for Installing Packages
+ <https://packaging.python.org/en/latest/installing/#requirements-for-installing-packages>`__
.. installing-per-user-installation:
@@ -141,13 +143,13 @@ A number of scientific Python packages have complex binary dependencies, and
aren't currently easy to install using ``pip`` directly. At this point in
time, it will often be easier for users to install these packages by
`other means
-<https://packaging.python.org/en/latest/science.html>`__
+<https://packaging.python.org/en/latest/science/>`__
rather than attempting to install them with ``pip``.
.. seealso::
`Python Packaging User Guide: Installing Scientific Packages
- <https://packaging.python.org/en/latest/science.html>`__
+ <https://packaging.python.org/en/latest/science/>`__
... work with multiple versions of Python installed in parallel?
@@ -177,7 +179,7 @@ switch::
Once the Development & Deployment part of PPUG is fleshed out, some of
those sections should be linked from new questions here (most notably,
we should have a question about avoiding depending on PyPI that links to
- https://packaging.python.org/en/latest/deployment.html#pypi-mirrors-and-caches)
+ https://packaging.python.org/en/latest/mirrors/)
Common installation issues
@@ -210,11 +212,11 @@ as users are more regularly able to install pre-built extensions rather
than needing to build them themselves.
Some of the solutions for installing `scientific software
-<https://packaging.python.org/en/latest/science.html>`__
+<https://packaging.python.org/en/latest/science/>`__
that is not yet available as pre-built ``wheel`` files may also help with
obtaining other binary extensions without needing to build them locally.
.. seealso::
`Python Packaging User Guide: Binary Extensions
- <https://packaging.python.org/en/latest/extensions.html>`__
+ <https://packaging.python.org/en/latest/extensions/>`__
diff --git a/Doc/library/2to3.rst b/Doc/library/2to3.rst
index 31f681d7e0..6fc28656b8 100644
--- a/Doc/library/2to3.rst
+++ b/Doc/library/2to3.rst
@@ -56,7 +56,7 @@ Comments and exact indentation are preserved throughout the translation process.
By default, 2to3 runs a set of :ref:`predefined fixers <2to3-fixers>`. The
:option:`-l` flag lists all available fixers. An explicit set of fixers to run
-can be given with :option:`-f`. Likewise the :option:`-x` explicitly disables a
+can be given with :option:`-f`. Likewise the :option:`!-x` explicitly disables a
fixer. The following example runs only the ``imports`` and ``has_key`` fixers::
$ 2to3 -f imports -f has_key example.py
@@ -78,12 +78,12 @@ but 2to3 cannot fix automatically. In this case, 2to3 will print a warning
beneath the diff for a file. You should address the warning in order to have
compliant 3.x code.
-2to3 can also refactor doctests. To enable this mode, use the :option:`-d`
+2to3 can also refactor doctests. To enable this mode, use the :option:`!-d`
flag. Note that *only* doctests will be refactored. This also doesn't require
the module to be valid Python. For example, doctest like examples in a reST
document could also be refactored with this option.
-The :option:`-v` option enables output of more information on the translation
+The :option:`!-v` option enables output of more information on the translation
process.
Since some print statements can be parsed as function calls or statements, 2to3
@@ -102,14 +102,14 @@ when not overwriting the input files.
.. versionadded:: 3.2.3
The :option:`-o` option was added.
-The :option:`-W` or :option:`--write-unchanged-files` flag tells 2to3 to always
+The :option:`!-W` or :option:`--write-unchanged-files` flag tells 2to3 to always
write output files even if no changes were required to the file. This is most
useful with :option:`-o` so that an entire Python source tree is copied with
translation from one directory to another.
This option implies the :option:`-w` flag as it would not make sense otherwise.
.. versionadded:: 3.2.3
- The :option:`-W` flag was added.
+ The :option:`!-W` flag was added.
The :option:`--add-suffix` option specifies a string to append to all output
filenames. The :option:`-n` flag is required when specifying this as backups
@@ -449,10 +449,14 @@ and off individually. They are described here in more detail.
.. module:: lib2to3
:synopsis: the 2to3 library
+
.. moduleauthor:: Guido van Rossum
.. moduleauthor:: Collin Winter
.. moduleauthor:: Benjamin Peterson <benjamin@python.org>
+**Source code:** :source:`Lib/lib2to3/`
+
+--------------
.. note::
diff --git a/Doc/library/__future__.rst b/Doc/library/__future__.rst
index 72f2963a2c..73d8b6b7e8 100644
--- a/Doc/library/__future__.rst
+++ b/Doc/library/__future__.rst
@@ -87,6 +87,9 @@ language using this mechanism:
| unicode_literals | 2.6.0a2 | 3.0 | :pep:`3112`: |
| | | | *Bytes literals in Python 3000* |
+------------------+-------------+--------------+---------------------------------------------+
+| generator_stop | 3.5.0b1 | 3.7 | :pep:`479`: |
+| | | | *StopIteration handling inside generators* |
++------------------+-------------+--------------+---------------------------------------------+
.. seealso::
diff --git a/Doc/library/__main__.rst b/Doc/library/__main__.rst
index a46993d55e..a64faf1bbe 100644
--- a/Doc/library/__main__.rst
+++ b/Doc/library/__main__.rst
@@ -5,6 +5,8 @@
.. module:: __main__
:synopsis: The environment where the top-level script is run.
+--------------
+
``'__main__'`` is the name of the scope in which top-level code executes.
A module's __name__ is set equal to ``'__main__'`` when read from
standard input, a script, or from an interactive prompt.
diff --git a/Doc/library/_thread.rst b/Doc/library/_thread.rst
index 7122861c45..0d2d818f5f 100644
--- a/Doc/library/_thread.rst
+++ b/Doc/library/_thread.rst
@@ -4,13 +4,14 @@
.. module:: _thread
:synopsis: Low-level threading API.
-
.. index::
single: light-weight processes
single: processes, light-weight
single: binary semaphores
single: semaphores, binary
+--------------
+
This module provides low-level primitives for working with multiple threads
(also called :dfn:`light-weight processes` or :dfn:`tasks`) --- multiple threads of
control sharing their global data space. For synchronization, simple locks
diff --git a/Doc/library/abc.rst b/Doc/library/abc.rst
index 7a73704bf6..966003bd45 100644
--- a/Doc/library/abc.rst
+++ b/Doc/library/abc.rst
@@ -3,6 +3,7 @@
.. module:: abc
:synopsis: Abstract base classes according to PEP 3119.
+
.. moduleauthor:: Guido van Rossum
.. sectionauthor:: Georg Brandl
.. much of the content adapted from docstrings
diff --git a/Doc/library/aifc.rst b/Doc/library/aifc.rst
index 6fbcf286cf..23a96207d0 100644
--- a/Doc/library/aifc.rst
+++ b/Doc/library/aifc.rst
@@ -4,14 +4,13 @@
.. module:: aifc
:synopsis: Read and write audio files in AIFF or AIFC format.
+**Source code:** :source:`Lib/aifc.py`
.. index::
single: Audio Interchange File Format
single: AIFF
single: AIFF-C
-**Source code:** :source:`Lib/aifc.py`
-
--------------
This module provides support for reading and writing AIFF and AIFF-C files.
diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst
index d907203a02..10789e9f88 100644
--- a/Doc/library/argparse.rst
+++ b/Doc/library/argparse.rst
@@ -3,6 +3,7 @@
.. module:: argparse
:synopsis: Command-line option and argument parsing library.
+
.. moduleauthor:: Steven Bethard <steven.bethard@gmail.com>
.. sectionauthor:: Steven Bethard <steven.bethard@gmail.com>
@@ -35,10 +36,10 @@ produces either the sum or the max::
parser = argparse.ArgumentParser(description='Process some integers.')
parser.add_argument('integers', metavar='N', type=int, nargs='+',
- help='an integer for the accumulator')
+ help='an integer for the accumulator')
parser.add_argument('--sum', dest='accumulate', action='store_const',
- const=sum, default=max,
- help='sum the integers (default: find the max)')
+ const=sum, default=max,
+ help='sum the integers (default: find the max)')
args = parser.parse_args()
print(args.accumulate(args.integers))
@@ -135,7 +136,7 @@ ArgumentParser objects
formatter_class=argparse.HelpFormatter, \
prefix_chars='-', fromfile_prefix_chars=None, \
argument_default=None, conflict_handler='error', \
- add_help=True)
+ add_help=True, allow_abbrev=True)
Create a new :class:`ArgumentParser` object. All parameters should be passed
as keyword arguments. Each parameter has its own more detailed description
@@ -169,6 +170,12 @@ ArgumentParser objects
* add_help_ - Add a -h/--help option to the parser (default: ``True``)
+ * allow_abbrev_ - Allows long options to be abbreviated if the
+ abbreviation is unambiguous. (default: ``True``)
+
+ .. versionchanged:: 3.5
+ *allow_abbrev* parameter was added.
+
The following sections describe how each of these are used.
@@ -482,7 +489,7 @@ specified characters will be treated as files, and will be replaced by the
arguments they contain. For example::
>>> with open('args.txt', 'w') as fp:
- ... fp.write('-f\nbar')
+ ... fp.write('-f\nbar')
>>> parser = argparse.ArgumentParser(fromfile_prefix_chars='@')
>>> parser.add_argument('-f')
>>> parser.parse_args(['-f', 'foo', '@args.txt'])
@@ -518,6 +525,26 @@ calls, we supply ``argument_default=SUPPRESS``::
>>> parser.parse_args([])
Namespace()
+.. _allow_abbrev:
+
+allow_abbrev
+^^^^^^^^^^^^
+
+Normally, when you pass an argument list to the
+:meth:`~ArgumentParser.parse_args` method of an :class:`ArgumentParser`,
+it :ref:`recognizes abbreviations <prefix-matching>` of long options.
+
+This feature can be disabled by setting ``allow_abbrev`` to ``False``::
+
+ >>> parser = argparse.ArgumentParser(prog='PROG', allow_abbrev=False)
+ >>> parser.add_argument('--foobar', action='store_true')
+ >>> parser.add_argument('--foonley', action='store_false')
+ >>> parser.parse_args(['--foon'])
+ usage: PROG [-h] [--foobar] [--foonley]
+ PROG: error: unrecognized arguments: --foon
+
+.. versionadded:: 3.5
+
conflict_handler
^^^^^^^^^^^^^^^^
@@ -694,24 +721,25 @@ how the command-line arguments should be handled. The supplied actions are:
Namespace(foo='1')
* ``'store_const'`` - This stores the value specified by the const_ keyword
- argument. (Note that the const_ keyword argument defaults to the rather
- unhelpful ``None``.) The ``'store_const'`` action is most commonly used with
+ argument. The ``'store_const'`` action is most commonly used with
optional arguments that specify some sort of flag. For example::
>>> parser = argparse.ArgumentParser()
>>> parser.add_argument('--foo', action='store_const', const=42)
- >>> parser.parse_args('--foo'.split())
+ >>> parser.parse_args(['--foo'])
Namespace(foo=42)
-* ``'store_true'`` and ``'store_false'`` - These store the values ``True`` and
- ``False`` respectively. These are special cases of ``'store_const'``. For
- example::
+* ``'store_true'`` and ``'store_false'`` - These are special cases of
+ ``'store_const'`` used for storing the values ``True`` and ``False``
+ respectively. In addition, they create default values of ``False`` and
+ ``True`` respectively. For example::
>>> parser = argparse.ArgumentParser()
>>> parser.add_argument('--foo', action='store_true')
>>> parser.add_argument('--bar', action='store_false')
+ >>> parser.add_argument('--baz', action='store_false')
>>> parser.parse_args('--foo --bar'.split())
- Namespace(bar=False, foo=True)
+ Namespace(foo=True, bar=False, baz=True)
* ``'append'`` - This stores a list, and appends each argument value to the
list. This is useful to allow an option to be specified multiple times.
@@ -739,7 +767,7 @@ how the command-line arguments should be handled. The supplied actions are:
>>> parser = argparse.ArgumentParser()
>>> parser.add_argument('--verbose', '-v', action='count')
- >>> parser.parse_args('-vvv'.split())
+ >>> parser.parse_args(['-vvv'])
Namespace(verbose=3)
* ``'help'`` - This prints a complete help message for all the options in the
@@ -814,11 +842,11 @@ values are:
>>> parser = argparse.ArgumentParser()
>>> parser.add_argument('--foo', nargs='?', const='c', default='d')
>>> parser.add_argument('bar', nargs='?', default='d')
- >>> parser.parse_args('XX --foo YY'.split())
+ >>> parser.parse_args(['XX', '--foo', 'YY'])
Namespace(bar='XX', foo='YY')
- >>> parser.parse_args('XX --foo'.split())
+ >>> parser.parse_args(['XX', '--foo'])
Namespace(bar='XX', foo='c')
- >>> parser.parse_args(''.split())
+ >>> parser.parse_args([])
Namespace(bar='d', foo='d')
One of the more common uses of ``nargs='?'`` is to allow optional input and
@@ -854,9 +882,9 @@ values are:
>>> parser = argparse.ArgumentParser(prog='PROG')
>>> parser.add_argument('foo', nargs='+')
- >>> parser.parse_args('a b'.split())
+ >>> parser.parse_args(['a', 'b'])
Namespace(foo=['a', 'b'])
- >>> parser.parse_args(''.split())
+ >>> parser.parse_args([])
usage: PROG [-h] foo [foo ...]
PROG: error: too few arguments
@@ -895,7 +923,8 @@ the various :class:`ArgumentParser` actions. The two most common uses of it are
command-line argument following it, the value of ``const`` will be assumed instead.
See the nargs_ description for examples.
-The ``const`` keyword argument defaults to ``None``.
+With the ``'store_const'`` and ``'append_const'`` actions, the ``const``
+keyword argument must be given. For other actions, it defaults to ``None``.
default
@@ -910,9 +939,9 @@ was not present at the command line::
>>> parser = argparse.ArgumentParser()
>>> parser.add_argument('--foo', default=42)
- >>> parser.parse_args('--foo 2'.split())
+ >>> parser.parse_args(['--foo', '2'])
Namespace(foo='2')
- >>> parser.parse_args(''.split())
+ >>> parser.parse_args([])
Namespace(foo=42)
If the ``default`` value is a string, the parser parses the value as if it
@@ -931,9 +960,9 @@ is used when no command-line argument was present::
>>> parser = argparse.ArgumentParser()
>>> parser.add_argument('foo', nargs='?', default=42)
- >>> parser.parse_args('a'.split())
+ >>> parser.parse_args(['a'])
Namespace(foo='a')
- >>> parser.parse_args(''.split())
+ >>> parser.parse_args([])
Namespace(foo=42)
@@ -990,9 +1019,9 @@ the converted value::
...
>>> parser = argparse.ArgumentParser(prog='PROG')
>>> parser.add_argument('foo', type=perfect_square)
- >>> parser.parse_args('9'.split())
+ >>> parser.parse_args(['9'])
Namespace(foo=9)
- >>> parser.parse_args('7'.split())
+ >>> parser.parse_args(['7'])
usage: PROG [-h] foo
PROG: error: argument foo: '7' is not a perfect square
@@ -1001,9 +1030,9 @@ simply check against a range of values::
>>> parser = argparse.ArgumentParser(prog='PROG')
>>> parser.add_argument('foo', type=int, choices=range(5, 10))
- >>> parser.parse_args('7'.split())
+ >>> parser.parse_args(['7'])
Namespace(foo=7)
- >>> parser.parse_args('11'.split())
+ >>> parser.parse_args(['11'])
usage: PROG [-h] {5,6,7,8,9}
PROG: error: argument foo: invalid choice: 11 (choose from 5, 6, 7, 8, 9)
@@ -1081,10 +1110,10 @@ argument::
>>> parser = argparse.ArgumentParser(prog='frobble')
>>> parser.add_argument('--foo', action='store_true',
- ... help='foo the bars before frobbling')
+ ... help='foo the bars before frobbling')
>>> parser.add_argument('bar', nargs='+',
- ... help='one of the bars to be frobbled')
- >>> parser.parse_args('-h'.split())
+ ... help='one of the bars to be frobbled')
+ >>> parser.parse_args(['-h'])
usage: frobble [-h] [--foo] bar [bar ...]
positional arguments:
@@ -1101,7 +1130,7 @@ specifiers include the program name, ``%(prog)s`` and most keyword arguments to
>>> parser = argparse.ArgumentParser(prog='frobble')
>>> parser.add_argument('bar', nargs='?', type=int, default=42,
- ... help='the bar to %(prog)s (default: %(default)s)')
+ ... help='the bar to %(prog)s (default: %(default)s)')
>>> parser.print_help()
usage: frobble [-h] [bar]
@@ -1202,7 +1231,7 @@ attribute is determined by the ``dest`` keyword argument of
>>> parser = argparse.ArgumentParser()
>>> parser.add_argument('bar')
- >>> parser.parse_args('XXX'.split())
+ >>> parser.parse_args(['XXX'])
Namespace(bar='XXX')
For optional argument actions, the value of ``dest`` is normally inferred from
@@ -1299,22 +1328,22 @@ option and its value are passed as two separate arguments::
>>> parser = argparse.ArgumentParser(prog='PROG')
>>> parser.add_argument('-x')
>>> parser.add_argument('--foo')
- >>> parser.parse_args('-x X'.split())
+ >>> parser.parse_args(['-x', 'X'])
Namespace(foo=None, x='X')
- >>> parser.parse_args('--foo FOO'.split())
+ >>> parser.parse_args(['--foo', 'FOO'])
Namespace(foo='FOO', x=None)
For long options (options with names longer than a single character), the option
and value can also be passed as a single command-line argument, using ``=`` to
separate them::
- >>> parser.parse_args('--foo=FOO'.split())
+ >>> parser.parse_args(['--foo=FOO'])
Namespace(foo='FOO', x=None)
For short options (options only one character long), the option and its value
can be concatenated::
- >>> parser.parse_args('-xX'.split())
+ >>> parser.parse_args(['-xX'])
Namespace(foo=None, x='X')
Several short options can be joined together, using only a single ``-`` prefix,
@@ -1324,7 +1353,7 @@ as long as only the last option (or none of them) requires a value::
>>> parser.add_argument('-x', action='store_true')
>>> parser.add_argument('-y', action='store_true')
>>> parser.add_argument('-z')
- >>> parser.parse_args('-xyzZ'.split())
+ >>> parser.parse_args(['-xyzZ'])
Namespace(x=True, y=True, z='Z')
@@ -1410,9 +1439,9 @@ argument::
Argument abbreviations (prefix matching)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-The :meth:`~ArgumentParser.parse_args` method allows long options to be
-abbreviated to a prefix, if the abbreviation is unambiguous (the prefix matches
-a unique option)::
+The :meth:`~ArgumentParser.parse_args` method :ref:`by default <allow_abbrev>`
+allows long options to be abbreviated to a prefix, if the abbreviation is
+unambiguous (the prefix matches a unique option)::
>>> parser = argparse.ArgumentParser(prog='PROG')
>>> parser.add_argument('-bacon')
@@ -1426,6 +1455,7 @@ a unique option)::
PROG: error: ambiguous option: -ba could match -badger, -bacon
An error is produced for arguments that could produce more than one options.
+This feature can be disabled by setting :ref:`allow_abbrev` to ``False``.
Beyond ``sys.argv``
@@ -1439,13 +1469,13 @@ interactive prompt::
>>> parser = argparse.ArgumentParser()
>>> parser.add_argument(
... 'integers', metavar='int', type=int, choices=range(10),
- ... nargs='+', help='an integer in the range 0..9')
+ ... nargs='+', help='an integer in the range 0..9')
>>> parser.add_argument(
... '--sum', dest='accumulate', action='store_const', const=sum,
- ... default=max, help='sum the integers (default: find the max)')
+ ... default=max, help='sum the integers (default: find the max)')
>>> parser.parse_args(['1', '2', '3', '4'])
Namespace(accumulate=<built-in function max>, integers=[1, 2, 3, 4])
- >>> parser.parse_args('1 2 3 4 --sum'.split())
+ >>> parser.parse_args(['1', '2', '3', '4', '--sum'])
Namespace(accumulate=<built-in function sum>, integers=[1, 2, 3, 4])
diff --git a/Doc/library/array.rst b/Doc/library/array.rst
index f1ab959572..24f3f62ae7 100644
--- a/Doc/library/array.rst
+++ b/Doc/library/array.rst
@@ -4,9 +4,10 @@
.. module:: array
:synopsis: Space efficient arrays of uniformly typed numeric values.
-
.. index:: single: arrays
+--------------
+
This module defines an object type which can compactly represent an array of
basic values: characters, integers, floating point numbers. Arrays are sequence
types and behave very much like lists, except that the type of objects stored in
@@ -91,7 +92,7 @@ Array objects support the ordinary sequence operations of indexing, slicing,
concatenation, and multiplication. When using slice assignment, the assigned
value must be an array object with the same type code; in all other cases,
:exc:`TypeError` is raised. Array objects also implement the buffer interface,
-and may be used wherever :term:`bytes-like object`\ s are supported.
+and may be used wherever :term:`bytes-like objects <bytes-like object>` are supported.
The following data items and methods are also supported:
@@ -271,7 +272,7 @@ Examples::
Packing and unpacking of External Data Representation (XDR) data as used in some
remote procedure call systems.
- `The Numerical Python Documentation <http://docs.scipy.org/doc/>`_
+ `The Numerical Python Documentation <https://docs.scipy.org/doc/>`_
The Numeric Python extension (NumPy) defines another array type; see
http://www.numpy.org/ for further information about Numerical Python.
diff --git a/Doc/library/asynchat.rst b/Doc/library/asynchat.rst
index c6fa06162e..ae72d26122 100644
--- a/Doc/library/asynchat.rst
+++ b/Doc/library/asynchat.rst
@@ -3,6 +3,7 @@
.. module:: asynchat
:synopsis: Support for asynchronous command/response protocols.
+
.. moduleauthor:: Sam Rushing <rushing@nightmare.com>
.. sectionauthor:: Steve Holden <sholden@holdenweb.com>
@@ -147,40 +148,6 @@ connection requests.
by the channel after :meth:`found_terminator` is called.
-asynchat - Auxiliary Classes
-------------------------------------------
-
-.. class:: fifo(list=None)
-
- A :class:`fifo` holding data which has been pushed by the application but
- not yet popped for writing to the channel. A :class:`fifo` is a list used
- to hold data and/or producers until they are required. If the *list*
- argument is provided then it should contain producers or data items to be
- written to the channel.
-
-
- .. method:: is_empty()
-
- Returns ``True`` if and only if the fifo is empty.
-
-
- .. method:: first()
-
- Returns the least-recently :meth:`push`\ ed item from the fifo.
-
-
- .. method:: push(data)
-
- Adds the given data (which may be a string or a producer object) to the
- producer fifo.
-
-
- .. method:: pop()
-
- If the fifo is not empty, returns ``True, first()``, deleting the popped
- item. Returns ``False, None`` for an empty fifo.
-
-
.. _asynchat-example:
asynchat Example
@@ -236,7 +203,7 @@ any extraneous data sent by the web client are ignored. ::
self.set_terminator(None)
self.handle_request()
elif not self.handling:
- self.set_terminator(None) # browsers sometimes over-send
+ self.set_terminator(None) # browsers sometimes over-send
self.cgi_data = parse(self.headers, b"".join(self.ibuffer))
self.handling = True
self.ibuffer = []
diff --git a/Doc/library/asyncio-dev.rst b/Doc/library/asyncio-dev.rst
index 1d1f795294..156c5c06ac 100644
--- a/Doc/library/asyncio-dev.rst
+++ b/Doc/library/asyncio-dev.rst
@@ -106,6 +106,9 @@ directly its :meth:`Future.cancel` method, but::
loop.call_soon_threadsafe(fut.cancel)
+To handle signals and to execute subprocesses, the event loop must be run in
+the main thread.
+
To schedule a coroutine object from a different thread, the
:func:`run_coroutine_threadsafe` function should be used. It returns a
:class:`concurrent.futures.Future` to access the result::
@@ -113,9 +116,6 @@ To schedule a coroutine object from a different thread, the
future = asyncio.run_coroutine_threadsafe(coro_func(), loop)
result = future.result(timeout) # Wait for the result with a timeout
-To handle signals and to execute subprocesses, the event loop must be run in
-the main thread.
-
The :meth:`BaseEventLoop.run_in_executor` method can be used with a thread pool
executor to execute a callback in different thread to not block the thread of
the event loop.
@@ -168,10 +168,10 @@ Detect coroutine objects never scheduled
----------------------------------------
When a coroutine function is called and its result is not passed to
-:func:`async` or to the :meth:`BaseEventLoop.create_task` method, the execution
-of the coroutine object will never be scheduled which is probably a bug.
-:ref:`Enable the debug mode of asyncio <asyncio-debug-mode>` to :ref:`log a
-warning <asyncio-logger>` to detect it.
+:func:`ensure_future` or to the :meth:`BaseEventLoop.create_task` method,
+the execution of the coroutine object will never be scheduled which is
+probably a bug. :ref:`Enable the debug mode of asyncio <asyncio-debug-mode>`
+to :ref:`log a warning <asyncio-logger>` to detect it.
Example with the bug::
@@ -190,7 +190,7 @@ Output in debug mode::
File "test.py", line 7, in <module>
test()
-The fix is to call the :func:`async` function or the
+The fix is to call the :func:`ensure_future` function or the
:meth:`BaseEventLoop.create_task` method with the coroutine object.
.. seealso::
diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst
index 96468ae567..7ec3aa106e 100644
--- a/Doc/library/asyncio-eventloop.rst
+++ b/Doc/library/asyncio-eventloop.rst
@@ -38,14 +38,14 @@ Run an event loop
that callbacks scheduled by callbacks will not run in that case;
they will run the next time :meth:`run_forever` is called.
- .. versionchanged:: 3.4.4
+ .. versionchanged:: 3.5.1
.. method:: BaseEventLoop.run_until_complete(future)
Run until the :class:`Future` is done.
If the argument is a :ref:`coroutine object <coroutine>`, it is wrapped by
- :func:`async`.
+ :func:`ensure_future`.
Return the Future's result, or raise its exception.
@@ -60,7 +60,7 @@ Run an event loop
This causes :meth:`run_forever` to exit at the next suitable
opportunity (see there for more details).
- .. versionchanged:: 3.4.4
+ .. versionchanged:: 3.5.1
.. method:: BaseEventLoop.is_closed()
@@ -179,6 +179,20 @@ a different clock than :func:`time.time`.
The :func:`asyncio.sleep` function.
+Futures
+-------
+
+.. method:: BaseEventLoop.create_future()
+
+ Create an :class:`asyncio.Future` object attached to the loop.
+
+ This is a preferred way to create futures in asyncio, as event
+ loop implementations can provide alternative implementations
+ of the Future class (with better performance or instrumentation).
+
+ .. versionadded:: 3.5.2
+
+
Tasks
-----
@@ -253,7 +267,7 @@ Creating connections
a class. For example, if you want to use a pre-created
protocol instance, you can pass ``lambda: my_protocol``.
- Options allowing to change how the connection is created:
+ Options that change how the connection is created:
* *ssl*: if given and not false, a SSL/TLS transport is created
(by default a plain TCP transport is created). If *ssl* is
@@ -285,7 +299,9 @@ Creating connections
to bind the socket to locally. The *local_host* and *local_port*
are looked up using getaddrinfo(), similarly to *host* and *port*.
- On Windows with :class:`ProactorEventLoop`, SSL/TLS is not supported.
+ .. versionchanged:: 3.5
+
+ On Windows with :class:`ProactorEventLoop`, SSL/TLS is now supported.
.. seealso::
@@ -409,14 +425,16 @@ Creating listening connections
This method is a :ref:`coroutine <coroutine>`.
- On Windows with :class:`ProactorEventLoop`, SSL/TLS is not supported.
+ .. versionchanged:: 3.5
+
+ On Windows with :class:`ProactorEventLoop`, SSL/TLS is now supported.
.. seealso::
The function :func:`start_server` creates a (:class:`StreamReader`,
:class:`StreamWriter`) pair and calls back a function with this pair.
- .. versionchanged:: 3.4.4
+ .. versionchanged:: 3.5.1
The *host* parameter can now be a sequence of strings.
@@ -473,7 +491,10 @@ Low-level socket operations
.. coroutinemethod:: BaseEventLoop.sock_recv(sock, nbytes)
- Receive data from the socket. The return value is a bytes object
+ Receive data from the socket. Modeled after blocking
+ :meth:`socket.socket.recv` method.
+
+ The return value is a bytes object
representing the data received. The maximum amount of data to be received
at once is specified by *nbytes*.
@@ -482,13 +503,12 @@ Low-level socket operations
This method is a :ref:`coroutine <coroutine>`.
- .. seealso::
-
- The :meth:`socket.socket.recv` method.
-
.. coroutinemethod:: BaseEventLoop.sock_sendall(sock, data)
- Send data to the socket. The socket must be connected to a remote socket.
+ Send data to the socket. Modeled after blocking
+ :meth:`socket.socket.sendall` method.
+
+ The socket must be connected to a remote socket.
This method continues to send data from *data* until either all data has
been sent or an error occurs. ``None`` is returned on success. On error,
an exception is raised, and there is no way to determine how much data, if
@@ -499,35 +519,35 @@ Low-level socket operations
This method is a :ref:`coroutine <coroutine>`.
- .. seealso::
-
- The :meth:`socket.socket.sendall` method.
-
.. coroutinemethod:: BaseEventLoop.sock_connect(sock, address)
- Connect to a remote socket at *address*.
-
- The *address* must be already resolved to avoid the trap of hanging the
- entire event loop when the address requires doing a DNS lookup. For
- example, it must be an IP address, not an hostname, for
- :py:data:`~socket.AF_INET` and :py:data:`~socket.AF_INET6` address families.
- Use :meth:`getaddrinfo` to resolve the hostname asynchronously.
+ Connect to a remote socket at *address*. Modeled after
+ blocking :meth:`socket.socket.connect` method.
With :class:`SelectorEventLoop` event loop, the socket *sock* must be
non-blocking.
This method is a :ref:`coroutine <coroutine>`.
+ .. versionchanged:: 3.5.2
+ ``address`` no longer needs to be resolved. ``sock_connect``
+ will try to check if the *address* is already resolved by calling
+ :func:`socket.inet_pton`. If not,
+ :meth:`BaseEventLoop.getaddrinfo` will be used to resolve the
+ *address*.
+
.. seealso::
- The :meth:`BaseEventLoop.create_connection` method, the
- :func:`open_connection` function and the :meth:`socket.socket.connect`
- method.
+ :meth:`BaseEventLoop.create_connection`
+ and :func:`asyncio.open_connection() <open_connection>`.
.. coroutinemethod:: BaseEventLoop.sock_accept(sock)
- Accept a connection. The socket must be bound to an address and listening
+ Accept a connection. Modeled after blocking
+ :meth:`socket.socket.accept`.
+
+ The socket must be bound to an address and listening
for connections. The return value is a pair ``(conn, address)`` where *conn*
is a *new* socket object usable to send and receive data on the connection,
and *address* is the address bound to the socket on the other end of the
@@ -539,8 +559,7 @@ Low-level socket operations
.. seealso::
- The :meth:`BaseEventLoop.create_server` method, the :func:`start_server`
- function and the :meth:`socket.socket.accept` method.
+ :meth:`BaseEventLoop.create_server` and :func:`start_server`.
Resolve host name
@@ -650,7 +669,7 @@ pool of processes). By default, an event loop uses a thread pool executor
Error Handling API
------------------
-Allows to customize how exceptions are handled in the event loop.
+Allows customizing how exceptions are handled in the event loop.
.. method:: BaseEventLoop.set_exception_handler(handler)
@@ -665,6 +684,13 @@ Allows to customize how exceptions are handled in the event loop.
will be a ``dict`` object (see :meth:`call_exception_handler`
documentation for details about context).
+.. method:: BaseEventLoop.get_exception_handler()
+
+ Return the exception handler, or ``None`` if the default one
+ is in use.
+
+ .. versionadded:: 3.5.2
+
.. method:: BaseEventLoop.default_exception_handler(context)
Default exception handler.
@@ -735,11 +761,11 @@ Server
Stop serving: close listening sockets and set the :attr:`sockets`
attribute to ``None``.
- The sockets that represent existing incoming client connections are
- leaved open.
+ The sockets that represent existing incoming client connections are left
+ open.
- The server is closed asynchonously, use the :meth:`wait_closed` coroutine
- to wait until the server is closed.
+ The server is closed asynchronously, use the :meth:`wait_closed`
+ coroutine to wait until the server is closed.
.. coroutinemethod:: wait_closed()
diff --git a/Doc/library/asyncio-eventloops.rst b/Doc/library/asyncio-eventloops.rst
index f42f65a796..b8f29d78dd 100644
--- a/Doc/library/asyncio-eventloops.rst
+++ b/Doc/library/asyncio-eventloops.rst
@@ -41,7 +41,7 @@ asyncio currently provides two implementations of event loops:
On Windows, only sockets are supported (ex: pipes are not supported):
see the `MSDN documentation of select
- <http://msdn.microsoft.com/en-us/library/windows/desktop/ms740141%28v=vs.85%29.aspx>`_.
+ <https://msdn.microsoft.com/en-us/library/windows/desktop/ms740141%28v=vs.85%29.aspx>`_.
.. class:: ProactorEventLoop
@@ -53,7 +53,7 @@ asyncio currently provides two implementations of event loops:
.. seealso::
`MSDN documentation on I/O Completion Ports
- <http://msdn.microsoft.com/en-us/library/windows/desktop/aa365198%28v=vs.85%29.aspx>`_.
+ <https://msdn.microsoft.com/en-us/library/windows/desktop/aa365198%28v=vs.85%29.aspx>`_.
Example to use a :class:`ProactorEventLoop` on Windows::
@@ -100,8 +100,6 @@ Common limits of Windows event loops:
:class:`ProactorEventLoop` specific limits:
-- SSL is not supported: :meth:`~BaseEventLoop.create_connection` and
- :meth:`~BaseEventLoop.create_server` cannot be used with SSL for example
- :meth:`~BaseEventLoop.create_datagram_endpoint` (UDP) is not supported
- :meth:`~BaseEventLoop.add_reader` and :meth:`~BaseEventLoop.add_writer` are
not supported
@@ -109,9 +107,13 @@ Common limits of Windows event loops:
The resolution of the monotonic clock on Windows is usually around 15.6 msec.
The best resolution is 0.5 msec. The resolution depends on the hardware
(availability of `HPET
-<http://en.wikipedia.org/wiki/High_Precision_Event_Timer>`_) and on the Windows
+<https://en.wikipedia.org/wiki/High_Precision_Event_Timer>`_) and on the Windows
configuration. See :ref:`asyncio delayed calls <asyncio-delayed-calls>`.
+.. versionchanged:: 3.5
+
+ :class:`ProactorEventLoop` now supports SSL.
+
Mac OS X
^^^^^^^^
diff --git a/Doc/library/asyncio-protocol.rst b/Doc/library/asyncio-protocol.rst
index f9298b2d86..23d34d05c0 100644
--- a/Doc/library/asyncio-protocol.rst
+++ b/Doc/library/asyncio-protocol.rst
@@ -45,7 +45,7 @@ BaseTransport
Return ``True`` if the transport is closing or is closed.
- .. versionadded:: 3.4.4
+ .. versionadded:: 3.5.1
.. method:: get_extra_info(name, default=None)
@@ -87,7 +87,7 @@ BaseTransport
- ``'subprocess'``: :class:`subprocess.Popen` instance
- .. versionchanged:: 3.4.4
+ .. versionchanged:: 3.5.1
``'ssl_object'`` info was added to SSL sockets.
@@ -458,9 +458,9 @@ buffer size reaches the low-water mark.
Coroutines and protocols
------------------------
-Coroutines can be scheduled in a protocol method using :func:`async`, but there
-is no guarantee made about the execution order. Protocols are not aware of
-coroutines created in protocol methods and so will not wait for them.
+Coroutines can be scheduled in a protocol method using :func:`ensure_future`,
+but there is no guarantee made about the execution order. Protocols are not
+aware of coroutines created in protocol methods and so will not wait for them.
To have a reliable execution order, use :ref:`stream objects <asyncio-streams>` in a
coroutine with ``yield from``. For example, the :meth:`StreamWriter.drain`
diff --git a/Doc/library/asyncio-queue.rst b/Doc/library/asyncio-queue.rst
index 33706726a3..f11c09ac29 100644
--- a/Doc/library/asyncio-queue.rst
+++ b/Doc/library/asyncio-queue.rst
@@ -8,7 +8,6 @@ Queues:
* :class:`Queue`
* :class:`PriorityQueue`
* :class:`LifoQueue`
-* :class:`JoinableQueue`
asyncio queue API was designed to be close to classes of the :mod:`queue`
module (:class:`~queue.Queue`, :class:`~queue.PriorityQueue`,
@@ -144,16 +143,6 @@ LifoQueue
first.
-JoinableQueue
-^^^^^^^^^^^^^
-
-.. class:: JoinableQueue
-
- Deprecated alias for :class:`Queue`.
-
- .. deprecated:: 3.4.4
-
-
Exceptions
^^^^^^^^^^
diff --git a/Doc/library/asyncio-stream.rst b/Doc/library/asyncio-stream.rst
index 52b93f9ad9..08fe07156a 100644
--- a/Doc/library/asyncio-stream.rst
+++ b/Doc/library/asyncio-stream.rst
@@ -11,7 +11,7 @@ Stream functions
.. note::
- The top-level functions in this module are meant convenience wrappers
+ The top-level functions in this module are meant as convenience wrappers
only; there's really nothing special there, and if they don't do
exactly what you want, feel free to copy their code.
@@ -142,6 +142,30 @@ StreamReader
This method is a :ref:`coroutine <coroutine>`.
+ .. coroutinemethod:: readuntil(separator=b'\n')
+
+ Read data from the stream until ``separator`` is found.
+
+ On success, the data and separator will be removed from the
+ internal buffer (consumed). Returned data will include the
+ separator at the end.
+
+ Configured stream limit is used to check result. Limit sets the
+ maximal length of data that can be returned, not counting the
+ separator.
+
+ If an EOF occurs and the complete separator is still not found,
+ an :exc:`IncompleteReadError` exception will be
+ raised, and the internal buffer will be reset. The
+ :attr:`IncompleteReadError.partial` attribute may contain the
+ separator partially.
+
+ If the data cannot be read because of over limit, a
+ :exc:`LimitOverrunError` exception will be raised, and the data
+ will be left in the internal buffer, so it can be read again.
+
+ .. versionadded:: 3.5.2
+
.. method:: at_eof()
Return ``True`` if the buffer is empty and :meth:`feed_eof` was called.
@@ -223,7 +247,7 @@ StreamReaderProtocol
.. class:: StreamReaderProtocol(stream_reader, client_connected_cb=None, loop=None)
Trivial helper class to adapt between :class:`Protocol` and
- :class:`StreamReader`. Sublclass of :class:`Protocol`.
+ :class:`StreamReader`. Subclass of :class:`Protocol`.
*stream_reader* is a :class:`StreamReader` instance, *client_connected_cb*
is an optional function called with (stream_reader, stream_writer) when a
@@ -251,6 +275,18 @@ IncompleteReadError
Read bytes string before the end of stream was reached (:class:`bytes`).
+LimitOverrunError
+=================
+
+.. exception:: LimitOverrunError
+
+ Reached the buffer limit while looking for a separator.
+
+ .. attribute:: consumed
+
+ Total number of to be consumed bytes.
+
+
Stream examples
===============
diff --git a/Doc/library/asyncio-subprocess.rst b/Doc/library/asyncio-subprocess.rst
index 21dae54e38..51ce4278da 100644
--- a/Doc/library/asyncio-subprocess.rst
+++ b/Doc/library/asyncio-subprocess.rst
@@ -51,7 +51,7 @@ Create a subprocess: high-level API using Process
It is the application's responsibility to ensure that all whitespace and
metacharacters are quoted appropriately to avoid `shell injection
- <http://en.wikipedia.org/wiki/Shell_injection#Shell_injection>`_
+ <https://en.wikipedia.org/wiki/Shell_injection#Shell_injection>`_
vulnerabilities. The :func:`shlex.quote` function can be used to properly
escape whitespace and shell metacharacters in strings that are going to be
used to construct shell commands.
@@ -134,7 +134,7 @@ Run subprocesses asynchronously using the :mod:`subprocess` module.
It is the application's responsibility to ensure that all whitespace and
metacharacters are quoted appropriately to avoid `shell injection
- <http://en.wikipedia.org/wiki/Shell_injection#Shell_injection>`_
+ <https://en.wikipedia.org/wiki/Shell_injection#Shell_injection>`_
vulnerabilities. The :func:`shlex.quote` function can be used to properly
escape whitespace and shell metacharacters in strings that are going to be
used to construct shell commands.
diff --git a/Doc/library/asyncio-sync.rst b/Doc/library/asyncio-sync.rst
index ad3b523f98..0909352152 100644
--- a/Doc/library/asyncio-sync.rst
+++ b/Doc/library/asyncio-sync.rst
@@ -52,7 +52,7 @@ Lock
:meth:`acquire` is a coroutine and should be called with ``yield from``.
Locks also support the context management protocol. ``(yield from lock)``
- should be used as context manager expression.
+ should be used as the context manager expression.
This class is :ref:`not thread safe <asyncio-multithreading>`.
@@ -71,14 +71,14 @@ Lock
lock = Lock()
...
with (yield from lock):
- ...
+ ...
Lock objects can be tested for locking state::
if not lock.locked():
- yield from lock
+ yield from lock
else:
- # lock is acquired
+ # lock is acquired
...
.. method:: locked()
diff --git a/Doc/library/asyncio-task.rst b/Doc/library/asyncio-task.rst
index 76f084a267..de6ee58e92 100644
--- a/Doc/library/asyncio-task.rst
+++ b/Doc/library/asyncio-task.rst
@@ -8,17 +8,23 @@ Tasks and coroutines
Coroutines
----------
-A coroutine is a generator that follows certain conventions. For
-documentation purposes, all coroutines should be decorated with
-``@asyncio.coroutine``, but this cannot be strictly enforced.
-
-Coroutines use the ``yield from`` syntax introduced in :pep:`380`,
+Coroutines used with :mod:`asyncio` may be implemented using the
+:keyword:`async def` statement, or by using :term:`generators <generator>`.
+The :keyword:`async def` type of coroutine was added in Python 3.5, and
+is recommended if there is no need to support older Python versions.
+
+Generator-based coroutines should be decorated with :func:`@asyncio.coroutine
+<asyncio.coroutine>`, although this is not strictly enforced.
+The decorator enables compatibility with :keyword:`async def` coroutines,
+and also serves as documentation. Generator-based
+coroutines use the ``yield from`` syntax introduced in :pep:`380`,
instead of the original ``yield`` syntax.
The word "coroutine", like the word "generator", is used for two
different (though related) concepts:
-- The function that defines a coroutine (a function definition
+- The function that defines a coroutine
+ (a function definition using :keyword:`async def` or
decorated with ``@asyncio.coroutine``). If disambiguation is needed
we will call this a *coroutine function* (:func:`iscoroutinefunction`
returns ``True``).
@@ -30,29 +36,30 @@ different (though related) concepts:
Things a coroutine can do:
-- ``result = yield from future`` -- suspends the coroutine until the
+- ``result = await future`` or ``result = yield from future`` --
+ suspends the coroutine until the
future is done, then returns the future's result, or raises an
exception, which will be propagated. (If the future is cancelled,
it will raise a ``CancelledError`` exception.) Note that tasks are
futures, and everything said about futures also applies to tasks.
-- ``result = yield from coroutine`` -- wait for another coroutine to
+- ``result = await coroutine`` or ``result = yield from coroutine`` --
+ wait for another coroutine to
produce a result (or raise an exception, which will be propagated).
The ``coroutine`` expression must be a *call* to another coroutine.
- ``return expression`` -- produce a result to the coroutine that is
- waiting for this one using ``yield from``.
+ waiting for this one using :keyword:`await` or ``yield from``.
- ``raise exception`` -- raise an exception in the coroutine that is
- waiting for this one using ``yield from``.
+ waiting for this one using :keyword:`await` or ``yield from``.
-Calling a coroutine does not start its code running -- it is just a
-generator, and the coroutine object returned by the call is really a
-generator object, which doesn't do anything until you iterate over it.
-In the case of a coroutine object, there are two basic ways to start
-it running: call ``yield from coroutine`` from another coroutine
+Calling a coroutine does not start its code running --
+the coroutine object returned by the call doesn't do anything until you
+schedule its execution. There are two basic ways to start it running:
+call ``await coroutine`` or ``yield from coroutine`` from another coroutine
(assuming the other coroutine is already running!), or schedule its execution
-using the :func:`async` function or the :meth:`BaseEventLoop.create_task`
+using the :func:`ensure_future` function or the :meth:`BaseEventLoop.create_task`
method.
@@ -60,9 +67,15 @@ Coroutines (and tasks) can only run when the event loop is running.
.. decorator:: coroutine
- Decorator to mark coroutines.
+ Decorator to mark generator-based coroutines. This enables
+ the generator use :keyword:`!yield from` to call :keyword:`async
+ def` coroutines, and also enables the generator to be called by
+ :keyword:`async def` coroutines, for instance using an
+ :keyword:`await` expression.
+
+ There is no need to decorate :keyword:`async def` coroutines themselves.
- If the coroutine is not yielded from before it is destroyed, an error
+ If the generator is not yielded from before it is destroyed, an error
message is logged. See :ref:`Detect coroutines never scheduled
<asyncio-coroutine-not-scheduled>`.
@@ -72,7 +85,7 @@ Coroutines (and tasks) can only run when the event loop is running.
even if they are plain Python functions returning a :class:`Future`.
This is intentional to have a freedom of tweaking the implementation
of these functions in the future. If such a function is needed to be
- used in a callback-style code, wrap its result with :func:`async`.
+ used in a callback-style code, wrap its result with :func:`ensure_future`.
.. _asyncio-hello-world-coroutine:
@@ -84,8 +97,7 @@ Example of coroutine displaying ``"Hello World"``::
import asyncio
- @asyncio.coroutine
- def hello_world():
+ async def hello_world():
print("Hello World!")
loop = asyncio.get_event_loop()
@@ -111,20 +123,30 @@ using the :meth:`sleep` function::
import asyncio
import datetime
- @asyncio.coroutine
- def display_date(loop):
+ async def display_date(loop):
end_time = loop.time() + 5.0
while True:
print(datetime.datetime.now())
if (loop.time() + 1.0) >= end_time:
break
- yield from asyncio.sleep(1)
+ await asyncio.sleep(1)
loop = asyncio.get_event_loop()
# Blocking call which returns when the display_date() coroutine is done
loop.run_until_complete(display_date(loop))
loop.close()
+The same coroutine implemented using a generator::
+
+ @asyncio.coroutine
+ def display_date(loop):
+ end_time = loop.time() + 5.0
+ while True:
+ print(datetime.datetime.now())
+ if (loop.time() + 1.0) >= end_time:
+ break
+ yield from asyncio.sleep(1)
+
.. seealso::
The :ref:`display the current date with call_later()
@@ -139,15 +161,13 @@ Example chaining coroutines::
import asyncio
- @asyncio.coroutine
- def compute(x, y):
+ async def compute(x, y):
print("Compute %s + %s ..." % (x, y))
- yield from asyncio.sleep(1.0)
+ await asyncio.sleep(1.0)
return x + y
- @asyncio.coroutine
- def print_sum(x, y):
- result = yield from compute(x, y)
+ async def print_sum(x, y):
+ result = await compute(x, y)
print("%s + %s = %s" % (x, y, result))
loop = asyncio.get_event_loop()
@@ -375,7 +395,7 @@ Task
<coroutine>` did not complete. It is probably a bug and a warning is
logged: see :ref:`Pending task destroyed <asyncio-pending-task-destroyed>`.
- Don't directly create :class:`Task` instances: use the :func:`async`
+ Don't directly create :class:`Task` instances: use the :func:`ensure_future`
function or the :meth:`BaseEventLoop.create_task` method.
This class is :ref:`not thread safe <asyncio-multithreading>`.
@@ -490,7 +510,7 @@ Task functions
.. note::
- In the functions below, the optional *loop* argument allows to explicitly set
+ In the functions below, the optional *loop* argument allows explicitly setting
the event loop object used by the underlying task or coroutine. If it's
not provided, the default event loop is used.
@@ -521,6 +541,9 @@ Task functions
.. versionadded:: 3.4.4
+ .. versionchanged:: 3.5.1
+ The function accepts any :term:`awaitable` object.
+
.. seealso::
The :meth:`BaseEventLoop.create_task` method.
@@ -552,12 +575,14 @@ Task functions
.. function:: iscoroutine(obj)
- Return ``True`` if *obj* is a :ref:`coroutine object <coroutine>`.
+ Return ``True`` if *obj* is a :ref:`coroutine object <coroutine>`,
+ which may be based on a generator or an :keyword:`async def` coroutine.
-.. function:: iscoroutinefunction(obj)
+.. function:: iscoroutinefunction(func)
- Return ``True`` if *func* is a decorated :ref:`coroutine function
- <coroutine>`.
+ Return ``True`` if *func* is determined to be a :ref:`coroutine function
+ <coroutine>`, which may be a decorated generator function or an
+ :keyword:`async def` function.
.. function:: run_coroutine_threadsafe(coro, loop)
@@ -593,10 +618,11 @@ Task functions
.. note::
- Unlike the functions above, :func:`run_coroutine_threadsafe` requires the
- *loop* argument to be passed explicitely.
+ Unlike other functions from the module,
+ :func:`run_coroutine_threadsafe` requires the *loop* argument to
+ be passed explicitly.
- .. versionadded:: 3.4.4, 3.5.1
+ .. versionadded:: 3.5.1
.. coroutinefunction:: sleep(delay, result=None, \*, loop=None)
@@ -636,18 +662,6 @@ Task functions
except CancelledError:
res = None
-.. function:: timeout(timeout, \*, loop=None)
-
- Return a context manager that cancels a block on *timeout* expiring::
-
- with timeout(1.5):
- yield from inner()
-
- 1. If ``inner()`` is executed faster than in ``1.5`` seconds
- nothing happens.
- 2. Otherwise ``inner()`` is cancelled internally but
- :exc:`asyncio.TimeoutError` is raised outside of
- context manager scope.
.. coroutinefunction:: wait(futures, \*, loop=None, timeout=None,\
return_when=ALL_COMPLETED)
@@ -715,5 +729,3 @@ Task functions
.. versionchanged:: 3.4.3
If the wait is cancelled, the future *fut* is now also cancelled.
-
-
diff --git a/Doc/library/asyncio.rst b/Doc/library/asyncio.rst
index 9b4d65e5da..f764c683b1 100644
--- a/Doc/library/asyncio.rst
+++ b/Doc/library/asyncio.rst
@@ -4,6 +4,10 @@
.. module:: asyncio
:synopsis: Asynchronous I/O, event loop, coroutines and tasks.
+.. versionadded:: 3.4
+
+**Source code:** :source:`Lib/asyncio/`
+
.. note::
The asyncio package has been included in the standard library on a
@@ -11,10 +15,6 @@
changes (up to and including removal of the module) may occur if deemed
necessary by the core developers.
-.. versionadded:: 3.4
-
-**Source code:** :source:`Lib/asyncio/`
-
--------------
This module provides infrastructure for writing single-threaded concurrent
diff --git a/Doc/library/asyncore.rst b/Doc/library/asyncore.rst
index 917d0448c2..61061be34e 100644
--- a/Doc/library/asyncore.rst
+++ b/Doc/library/asyncore.rst
@@ -4,6 +4,7 @@
.. module:: asyncore
:synopsis: A base class for developing asynchronous socket handling
services.
+
.. moduleauthor:: Sam Rushing <rushing@nightmare.com>
.. sectionauthor:: Christopher Petrilli <petrilli@amber.org>
.. sectionauthor:: Steve Holden <sholden@holdenweb.com>
@@ -315,8 +316,8 @@ implement its socket handling::
self.buffer = self.buffer[sent:]
- client = HTTPClient('www.python.org', '/')
- asyncore.loop()
+ client = HTTPClient('www.python.org', '/')
+ asyncore.loop()
.. _asyncore-example-2:
diff --git a/Doc/library/atexit.rst b/Doc/library/atexit.rst
index dbdd81e6d0..1d84d4587f 100644
--- a/Doc/library/atexit.rst
+++ b/Doc/library/atexit.rst
@@ -3,9 +3,11 @@
.. module:: atexit
:synopsis: Register and execute cleanup functions.
+
.. moduleauthor:: Skip Montanaro <skip@pobox.com>
.. sectionauthor:: Skip Montanaro <skip@pobox.com>
+--------------
The :mod:`atexit` module defines functions to register and unregister cleanup
functions. Functions thus registered are automatically executed upon normal
diff --git a/Doc/library/audioop.rst b/Doc/library/audioop.rst
index ce127aa06a..bad9da2ec6 100644
--- a/Doc/library/audioop.rst
+++ b/Doc/library/audioop.rst
@@ -4,10 +4,11 @@
.. module:: audioop
:synopsis: Manipulate raw audio data.
+--------------
The :mod:`audioop` module contains some useful operations on sound fragments.
It operates on sound fragments consisting of signed integer samples 8, 16, 24
-or 32 bits wide, stored in :term:`bytes-like object`\ s. All scalar items are
+or 32 bits wide, stored in :term:`bytes-like objects <bytes-like object>`. All scalar items are
integers, unless specified otherwise.
.. versionchanged:: 3.4
@@ -276,6 +277,6 @@ sample and subtract the whole output sample from the input sample::
# out_test)
prefill = '\0'*(pos+ipos)*2
postfill = '\0'*(len(inputdata)-len(prefill)-len(outputdata))
- outputdata = prefill + audioop.mul(outputdata,2,-factor) + postfill
+ outputdata = prefill + audioop.mul(outputdata, 2, -factor) + postfill
return audioop.add(inputdata, outputdata, 2)
diff --git a/Doc/library/base64.rst b/Doc/library/base64.rst
index eba4b36e8a..080d9d77ec 100644
--- a/Doc/library/base64.rst
+++ b/Doc/library/base64.rst
@@ -5,11 +5,14 @@
:synopsis: RFC 3548: Base16, Base32, Base64 Data Encodings;
Base85 and Ascii85
+**Source code:** :source:`Lib/base64.py`
.. index::
pair: base64; encoding
single: MIME; base64 encoding
+--------------
+
This module provides functions for encoding binary data to printable
ASCII characters and decoding such encodings back to binary data.
It provides encoding and decoding functions for the encodings specified in
@@ -21,88 +24,103 @@ safely sent by email, used as parts of URLs, or included as part of an HTTP
POST request. The encoding algorithm is not the same as the
:program:`uuencode` program.
-There are two :rfc:`3548` interfaces provided by this module. The modern
-interface supports encoding and decoding ASCII byte string objects using all
-three :rfc:`3548` defined alphabets (normal, URL-safe, and filesystem-safe).
-Additionally, the decoding functions of the modern interface also accept
-Unicode strings containing only ASCII characters. The legacy interface provides
-for encoding and decoding to and from file-like objects as well as byte
-strings, but only using the Base64 standard alphabet.
+There are two interfaces provided by this module. The modern interface
+supports encoding :term:`bytes-like objects <bytes-like object>` to ASCII
+:class:`bytes`, and decoding :term:`bytes-like objects <bytes-like object>` or
+strings containing ASCII to :class:`bytes`. Both base-64 alphabets
+defined in :rfc:`3548` (normal, and URL- and filesystem-safe) are supported.
+
+The legacy interface does not support decoding from strings, but it does
+provide functions for encoding and decoding to and from :term:`file objects
+<file object>`. It only supports the Base64 standard alphabet, and it adds
+newlines every 76 characters as per :rfc:`2045`. Note that if you are looking
+for :rfc:`2045` support you probably want to be looking at the :mod:`email`
+package instead.
+
.. versionchanged:: 3.3
ASCII-only Unicode strings are now accepted by the decoding functions of
the modern interface.
.. versionchanged:: 3.4
- Any :term:`bytes-like object`\ s are now accepted by all
+ Any :term:`bytes-like objects <bytes-like object>` are now accepted by all
encoding and decoding functions in this module. Ascii85/Base85 support added.
The modern interface provides:
.. function:: b64encode(s, altchars=None)
- Encode a byte string using Base64.
+ Encode the :term:`bytes-like object` *s* using Base64 and return the encoded
+ :class:`bytes`.
- *s* is the string to encode. Optional *altchars* must be a string of at least
+ Optional *altchars* must be a :term:`bytes-like object` of at least
length 2 (additional characters are ignored) which specifies an alternative
alphabet for the ``+`` and ``/`` characters. This allows an application to e.g.
generate URL or filesystem safe Base64 strings. The default is ``None``, for
which the standard Base64 alphabet is used.
- The encoded byte string is returned.
-
.. function:: b64decode(s, altchars=None, validate=False)
- Decode a Base64 encoded byte string.
+ Decode the Base64 encoded :term:`bytes-like object` or ASCII string
+ *s* and return the decoded :class:`bytes`.
- *s* is the byte string to decode. Optional *altchars* must be a string of
+ Optional *altchars* must be a :term:`bytes-like object` or ASCII string of
at least length 2 (additional characters are ignored) which specifies the
alternative alphabet used instead of the ``+`` and ``/`` characters.
- The decoded string is returned. A :exc:`binascii.Error` exception is raised
+ A :exc:`binascii.Error` exception is raised
if *s* is incorrectly padded.
- If *validate* is ``False`` (the default), non-base64-alphabet characters are
+ If *validate* is ``False`` (the default), characters that are neither
+ in the normal base-64 alphabet nor the alternative alphabet are
discarded prior to the padding check. If *validate* is ``True``,
- non-base64-alphabet characters in the input result in a
+ these non-alphabet characters in the input result in a
:exc:`binascii.Error`.
.. function:: standard_b64encode(s)
- Encode byte string *s* using the standard Base64 alphabet.
+ Encode :term:`bytes-like object` *s* using the standard Base64 alphabet
+ and return the encoded :class:`bytes`.
.. function:: standard_b64decode(s)
- Decode byte string *s* using the standard Base64 alphabet.
+ Decode :term:`bytes-like object` or ASCII string *s* using the standard
+ Base64 alphabet and return the decoded :class:`bytes`.
.. function:: urlsafe_b64encode(s)
- Encode byte string *s* using a URL-safe alphabet, which substitutes ``-`` instead of
- ``+`` and ``_`` instead of ``/`` in the standard Base64 alphabet. The result
+ Encode :term:`bytes-like object` *s* using the
+ URL- and filesystem-safe alphabet, which
+ substitutes ``-`` instead of ``+`` and ``_`` instead of ``/`` in the
+ standard Base64 alphabet, and return the encoded :class:`bytes`. The result
can still contain ``=``.
.. function:: urlsafe_b64decode(s)
- Decode byte string *s* using a URL-safe alphabet, which substitutes ``-`` instead of
- ``+`` and ``_`` instead of ``/`` in the standard Base64 alphabet.
+ Decode :term:`bytes-like object` or ASCII string *s*
+ using the URL- and filesystem-safe
+ alphabet, which substitutes ``-`` instead of ``+`` and ``_`` instead of
+ ``/`` in the standard Base64 alphabet, and return the decoded
+ :class:`bytes`.
.. function:: b32encode(s)
- Encode a byte string using Base32. *s* is the string to encode. The encoded string
- is returned.
+ Encode the :term:`bytes-like object` *s* using Base32 and return the
+ encoded :class:`bytes`.
.. function:: b32decode(s, casefold=False, map01=None)
- Decode a Base32 encoded byte string.
+ Decode the Base32 encoded :term:`bytes-like object` or ASCII string *s* and
+ return the decoded :class:`bytes`.
- *s* is the byte string to decode. Optional *casefold* is a flag specifying
+ Optional *casefold* is a flag specifying
whether a lowercase alphabet is acceptable as input. For security purposes,
the default is ``False``.
@@ -113,46 +131,45 @@ The modern interface provides:
digit 0 is always mapped to the letter O). For security purposes the default is
``None``, so that 0 and 1 are not allowed in the input.
- The decoded byte string is returned. A :exc:`binascii.Error` is raised if *s* is
+ A :exc:`binascii.Error` is raised if *s* is
incorrectly padded or if there are non-alphabet characters present in the
- string.
+ input.
.. function:: b16encode(s)
- Encode a byte string using Base16.
-
- *s* is the string to encode. The encoded byte string is returned.
+ Encode the :term:`bytes-like object` *s* using Base16 and return the
+ encoded :class:`bytes`.
.. function:: b16decode(s, casefold=False)
- Decode a Base16 encoded byte string.
+ Decode the Base16 encoded :term:`bytes-like object` or ASCII string *s* and
+ return the decoded :class:`bytes`.
- *s* is the string to decode. Optional *casefold* is a flag specifying whether a
+ Optional *casefold* is a flag specifying whether a
lowercase alphabet is acceptable as input. For security purposes, the default
is ``False``.
- The decoded byte string is returned. A :exc:`TypeError` is raised if *s* were
+ A :exc:`binascii.Error` is raised if *s* is
incorrectly padded or if there are non-alphabet characters present in the
- string.
-
+ input.
-.. function:: a85encode(s, *, foldspaces=False, wrapcol=0, pad=False, adobe=False)
- Encode a byte string using Ascii85.
+.. function:: a85encode(b, *, foldspaces=False, wrapcol=0, pad=False, adobe=False)
- *s* is the string to encode. The encoded byte string is returned.
+ Encode the :term:`bytes-like object` *b* using Ascii85 and return the
+ encoded :class:`bytes`.
*foldspaces* is an optional flag that uses the special short sequence 'y'
instead of 4 consecutive spaces (ASCII 0x20) as supported by 'btoa'. This
feature is not supported by the "standard" Ascii85 encoding.
- *wrapcol* controls whether the output should have newline (``'\n'``)
+ *wrapcol* controls whether the output should have newline (``b'\n'``)
characters added to it. If this is non-zero, each output line will be
at most this many characters long.
- *pad* controls whether the input string is padded to a multiple of 4
+ *pad* controls whether the input is padded to a multiple of 4
before encoding. Note that the ``btoa`` implementation always pads.
*adobe* controls whether the encoded byte sequence is framed with ``<~``
@@ -161,11 +178,10 @@ The modern interface provides:
.. versionadded:: 3.4
-.. function:: a85decode(s, *, foldspaces=False, adobe=False, ignorechars=b' \\t\\n\\r\\v')
+.. function:: a85decode(b, *, foldspaces=False, adobe=False, ignorechars=b' \\t\\n\\r\\v')
- Decode an Ascii85 encoded byte string.
-
- *s* is the byte string to decode.
+ Decode the Ascii85 encoded :term:`bytes-like object` or ASCII string *b* and
+ return the decoded :class:`bytes`.
*foldspaces* is a flag that specifies whether the 'y' short sequence
should be accepted as shorthand for 4 consecutive spaces (ASCII 0x20).
@@ -174,27 +190,29 @@ The modern interface provides:
*adobe* controls whether the input sequence is in Adobe Ascii85 format
(i.e. is framed with <~ and ~>).
- *ignorechars* should be a byte string containing characters to ignore
+ *ignorechars* should be a :term:`bytes-like object` or ASCII string
+ containing characters to ignore
from the input. This should only contain whitespace characters, and by
default contains all whitespace characters in ASCII.
.. versionadded:: 3.4
-.. function:: b85encode(s, pad=False)
+.. function:: b85encode(b, pad=False)
- Encode a byte string using base85, as used in e.g. git-style binary
- diffs.
+ Encode the :term:`bytes-like object` *b* using base85 (as used in e.g.
+ git-style binary diffs) and return the encoded :class:`bytes`.
- If *pad* is true, the input is padded with "\\0" so its length is a
- multiple of 4 characters before encoding.
+ If *pad* is true, the input is padded with ``b'\0'`` so its length is a
+ multiple of 4 bytes before encoding.
.. versionadded:: 3.4
.. function:: b85decode(b)
- Decode base85-encoded byte string. Padding is implicitly removed, if
+ Decode the base85-encoded :term:`bytes-like object` or ASCII string *b* and
+ return the decoded :class:`bytes`. Padding is implicitly removed, if
necessary.
.. versionadded:: 3.4
@@ -214,15 +232,15 @@ The legacy interface:
Decode the contents of the binary *input* file and write the resulting binary
data to the *output* file. *input* and *output* must be :term:`file objects
- <file object>`. *input* will be read until ``input.read()`` returns an empty
- bytes object.
+ <file object>`. *input* will be read until ``input.readline()`` returns an
+ empty bytes object.
.. function:: decodebytes(s)
decodestring(s)
- Decode the byte string *s*, which must contain one or more lines of base64
- encoded data, and return a byte string containing the resulting binary data.
+ Decode the :term:`bytes-like object` *s*, which must contain one or more
+ lines of base64 encoded data, and return the decoded :class:`bytes`.
``decodestring`` is a deprecated alias.
.. versionadded:: 3.1
@@ -233,17 +251,19 @@ The legacy interface:
Encode the contents of the binary *input* file and write the resulting base64
encoded data to the *output* file. *input* and *output* must be :term:`file
objects <file object>`. *input* will be read until ``input.read()`` returns
- an empty bytes object. :func:`encode` returns the encoded data plus a trailing
- newline character (``b'\n'``).
+ an empty bytes object. :func:`encode` inserts a newline character (``b'\n'``)
+ after every 76 bytes of the output, as well as ensuring that the output
+ always ends with a newline, as per :rfc:`2045` (MIME).
.. function:: encodebytes(s)
encodestring(s)
- Encode the byte string *s*, which can contain arbitrary binary data, and
- return a byte string containing one or more lines of base64-encoded data.
- :func:`encodebytes` returns a string containing one or more lines of
- base64-encoded data always including an extra trailing newline (``b'\n'``).
+ Encode the :term:`bytes-like object` *s*, which can contain arbitrary binary
+ data, and return :class:`bytes` containing the base64-encoded data, with newlines
+ (``b'\n'``) inserted after every 76 bytes of output, and ensuring that
+ there is a trailing newline, as per :rfc:`2045` (MIME).
+
``encodestring`` is a deprecated alias.
diff --git a/Doc/library/binascii.rst b/Doc/library/binascii.rst
index dbe535d94d..878d8db53c 100644
--- a/Doc/library/binascii.rst
+++ b/Doc/library/binascii.rst
@@ -5,12 +5,13 @@
:synopsis: Tools for converting between binary and various ASCII-encoded binary
representations.
-
.. index::
module: uu
module: base64
module: binhex
+--------------
+
The :mod:`binascii` module contains a number of methods to convert between
binary and various ASCII-encoded binary representations. Normally, you will not
use these functions directly but use wrapper modules like :mod:`uu`,
@@ -21,7 +22,7 @@ higher-level modules.
.. note::
``a2b_*`` functions accept Unicode strings containing only ASCII characters.
- Other functions only accept :term:`bytes-like object`\ s (such as
+ Other functions only accept :term:`bytes-like objects <bytes-like object>` (such as
:class:`bytes`, :class:`bytearray` and other objects that support the buffer
protocol).
@@ -112,15 +113,16 @@ The :mod:`binascii` module defines the following functions:
possibly the last fragment).
-.. function:: crc_hqx(data, crc)
+.. function:: crc_hqx(data, value)
- Compute the binhex4 crc value of *data*, starting with an initial *crc* and
- returning the result.
+ Compute the binhex4 crc value of *data*, starting with *value* as the
+ initial crc, and return the result.
-.. function:: crc32(data[, crc])
+.. function:: crc32(data[, value])
- Compute CRC-32, the 32-bit checksum of data, starting with an initial crc. This
+ Compute CRC-32, the 32-bit checksum of *data*, starting with an
+ initial CRC of *value*. The default initial CRC is zero. The algorithm
is consistent with the ZIP file checksum. Since the algorithm is designed for
use as a checksum algorithm, it is not suitable for use as a general hash
algorithm. Use as follows::
@@ -128,15 +130,13 @@ The :mod:`binascii` module defines the following functions:
print(binascii.crc32(b"hello world"))
# Or, in two pieces:
crc = binascii.crc32(b"hello")
- crc = binascii.crc32(b" world", crc) & 0xffffffff
+ crc = binascii.crc32(b" world", crc)
print('crc32 = {:#010x}'.format(crc))
-.. note::
- To generate the same numeric value across all Python versions and
- platforms use crc32(data) & 0xffffffff. If you are only using
- the checksum in packed binary format this is not necessary as the
- return value is the correct 32bit binary representation
- regardless of sign.
+ .. versionchanged:: 3.0
+ The result is always unsigned.
+ To generate the same numeric value across all Python versions and
+ platforms, use ``crc32(data) & 0xffffffff``.
.. function:: b2a_hex(data)
@@ -152,8 +152,8 @@ The :mod:`binascii` module defines the following functions:
Return the binary data represented by the hexadecimal string *hexstr*. This
function is the inverse of :func:`b2a_hex`. *hexstr* must contain an even number
- of hexadecimal digits (which can be upper or lower case), otherwise a
- :exc:`TypeError` is raised.
+ of hexadecimal digits (which can be upper or lower case), otherwise an
+ :exc:`Error` exception is raised.
.. exception:: Error
diff --git a/Doc/library/binhex.rst b/Doc/library/binhex.rst
index 43c78237d2..359ab23b2f 100644
--- a/Doc/library/binhex.rst
+++ b/Doc/library/binhex.rst
@@ -4,6 +4,9 @@
.. module:: binhex
:synopsis: Encode and decode files in binhex4 format.
+**Source code:** :source:`Lib/binhex.py`
+
+--------------
This module encodes and decodes files in binhex4 format, a format allowing
representation of Macintosh files in ASCII. Only the data fork is handled.
diff --git a/Doc/library/bisect.rst b/Doc/library/bisect.rst
index 13b0147190..6bf7814b25 100644
--- a/Doc/library/bisect.rst
+++ b/Doc/library/bisect.rst
@@ -60,7 +60,7 @@ The following functions are provided:
.. seealso::
`SortedCollection recipe
- <http://code.activestate.com/recipes/577197-sortedcollection/>`_ that uses
+ <https://code.activestate.com/recipes/577197-sortedcollection/>`_ that uses
bisect to build a full-featured collection class with straight-forward search
methods and support for a key-function. The keys are precomputed to save
unnecessary calls to the key function during searches.
diff --git a/Doc/library/builtins.rst b/Doc/library/builtins.rst
index 2cca1d05df..4b589a588d 100644
--- a/Doc/library/builtins.rst
+++ b/Doc/library/builtins.rst
@@ -4,6 +4,7 @@
.. module:: builtins
:synopsis: The module that provides the built-in namespace.
+--------------
This module provides direct access to all 'built-in' identifiers of Python; for
example, ``builtins.open`` is the full name for the built-in function
diff --git a/Doc/library/bz2.rst b/Doc/library/bz2.rst
index 488cda5968..6c49d9fffe 100644
--- a/Doc/library/bz2.rst
+++ b/Doc/library/bz2.rst
@@ -3,11 +3,15 @@
.. module:: bz2
:synopsis: Interfaces for bzip2 compression and decompression.
+
.. moduleauthor:: Gustavo Niemeyer <niemeyer@conectiva.com>
.. moduleauthor:: Nadeem Vawda <nadeem.vawda@gmail.com>
.. sectionauthor:: Gustavo Niemeyer <niemeyer@conectiva.com>
.. sectionauthor:: Nadeem Vawda <nadeem.vawda@gmail.com>
+**Source code:** :source:`Lib/bz2.py`
+
+--------------
This module provides a comprehensive interface for compressing and
decompressing data using the bzip2 compression algorithm.
@@ -120,6 +124,10 @@ All of the classes in this module may safely be accessed from multiple threads.
.. versionchanged:: 3.4
The ``'x'`` (exclusive creation) mode was added.
+ .. versionchanged:: 3.5
+ The :meth:`~io.BufferedIOBase.read` method now accepts an argument of
+ ``None``.
+
Incremental (de)compression
---------------------------
@@ -162,15 +170,32 @@ Incremental (de)compression
you need to decompress a multi-stream input with :class:`BZ2Decompressor`,
you must use a new decompressor for each stream.
- .. method:: decompress(data)
+ .. method:: decompress(data, max_length=-1)
+
+ Decompress *data* (a :term:`bytes-like object`), returning
+ uncompressed data as bytes. Some of *data* may be buffered
+ internally, for use in later calls to :meth:`decompress`. The
+ returned data should be concatenated with the output of any
+ previous calls to :meth:`decompress`.
- Provide data to the decompressor object. Returns a chunk of decompressed
- data if possible, or an empty byte string otherwise.
+ If *max_length* is nonnegative, returns at most *max_length*
+ bytes of decompressed data. If this limit is reached and further
+ output can be produced, the :attr:`~.needs_input` attribute will
+ be set to ``False``. In this case, the next call to
+ :meth:`~.decompress` may provide *data* as ``b''`` to obtain
+ more of the output.
- Attempting to decompress data after the end of the current stream is
- reached raises an :exc:`EOFError`. If any data is found after the end of
- the stream, it is ignored and saved in the :attr:`unused_data` attribute.
+ If all of the input data was decompressed and returned (either
+ because this was less than *max_length* bytes, or because
+ *max_length* was negative), the :attr:`~.needs_input` attribute
+ will be set to ``True``.
+ Attempting to decompress data after the end of stream is reached
+ raises an `EOFError`. Any data found after the end of the
+ stream is ignored and saved in the :attr:`~.unused_data` attribute.
+
+ .. versionchanged:: 3.5
+ Added the *max_length* parameter.
.. attribute:: eof
@@ -186,6 +211,13 @@ Incremental (de)compression
If this attribute is accessed before the end of the stream has been
reached, its value will be ``b''``.
+ .. attribute:: needs_input
+
+ ``False`` if the :meth:`.decompress` method can provide more
+ decompressed data before requiring new uncompressed input.
+
+ .. versionadded:: 3.5
+
One-shot (de)compression
------------------------
diff --git a/Doc/library/calendar.rst b/Doc/library/calendar.rst
index 3187c43a84..df76e33668 100644
--- a/Doc/library/calendar.rst
+++ b/Doc/library/calendar.rst
@@ -4,6 +4,7 @@
.. module:: calendar
:synopsis: Functions for working with calendars, including some emulation
of the Unix cal program.
+
.. sectionauthor:: Drew Csillag <drew_csillag@geocities.com>
**Source code:** :source:`Lib/calendar.py`
diff --git a/Doc/library/cgi.rst b/Doc/library/cgi.rst
index 74abed5c55..0bc2c35137 100644
--- a/Doc/library/cgi.rst
+++ b/Doc/library/cgi.rst
@@ -4,6 +4,7 @@
.. module:: cgi
:synopsis: Helpers for running Python scripts via the Common Gateway Interface.
+**Source code:** :source:`Lib/cgi.py`
.. index::
pair: WWW; server
@@ -13,8 +14,6 @@
single: URL
single: Common Gateway Interface
-**Source code:** :source:`Lib/cgi.py`
-
--------------
Support module for Common Gateway Interface (CGI) scripts.
@@ -157,6 +156,9 @@ return bytes)::
if not line: break
linecount = linecount + 1
+:class:`FieldStorage` objects also support being used in a :keyword:`with`
+statement, which will automatically close them when done.
+
If an error is encountered when obtaining the contents of an uploaded file
(for example, when the user interrupts the form submission by clicking on
a Back or Cancel button) the :attr:`~FieldStorage.done` attribute of the
@@ -182,6 +184,10 @@ A form submitted via POST that also has a query string will contain both
The :attr:`~FieldStorage.file` attribute is automatically closed upon the
garbage collection of the creating :class:`FieldStorage` instance.
+.. versionchanged:: 3.5
+ Added support for the context management protocol to the
+ :class:`FieldStorage` class.
+
Higher Level Interface
----------------------
diff --git a/Doc/library/cgitb.rst b/Doc/library/cgitb.rst
index 6827c8eb5b..b65a6355fe 100644
--- a/Doc/library/cgitb.rst
+++ b/Doc/library/cgitb.rst
@@ -3,9 +3,11 @@
.. module:: cgitb
:synopsis: Configurable traceback handler for CGI scripts.
+
.. moduleauthor:: Ka-Ping Yee <ping@lfw.org>
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
+**Source code:** :source:`Lib/cgitb.py`
.. index::
single: CGI; exceptions
@@ -13,6 +15,8 @@
single: exceptions; in CGI scripts
single: tracebacks; in CGI scripts
+--------------
+
The :mod:`cgitb` module provides a special exception handler for Python scripts.
(Its name is a bit misleading. It was originally designed to display extensive
traceback information in HTML for CGI scripts. It was later generalized to also
diff --git a/Doc/library/chunk.rst b/Doc/library/chunk.rst
index a90e9f808b..5e24df923e 100644
--- a/Doc/library/chunk.rst
+++ b/Doc/library/chunk.rst
@@ -3,9 +3,11 @@
.. module:: chunk
:synopsis: Module to read IFF chunks.
+
.. moduleauthor:: Sjoerd Mullender <sjoerd@acm.org>
.. sectionauthor:: Sjoerd Mullender <sjoerd@acm.org>
+**Source code:** :source:`Lib/chunk.py`
.. index::
single: Audio Interchange File Format
@@ -14,6 +16,8 @@
single: Real Media File Format
single: RMFF
+--------------
+
This module provides an interface for reading files that use EA IFF 85 chunks.
[#]_ This format is used in at least the Audio Interchange File Format
(AIFF/AIFF-C) and the Real Media File Format (RMFF). The WAVE audio file format
diff --git a/Doc/library/cmath.rst b/Doc/library/cmath.rst
index a981d94a11..62ddb6bc48 100644
--- a/Doc/library/cmath.rst
+++ b/Doc/library/cmath.rst
@@ -4,6 +4,7 @@
.. module:: cmath
:synopsis: Mathematical functions for complex numbers.
+--------------
This module is always available. It provides access to mathematical functions
for complex numbers. The functions in this module accept integers,
@@ -207,6 +208,38 @@ Classification functions
and ``False`` otherwise.
+.. function:: isclose(a, b, *, rel_tol=1e-09, abs_tol=0.0)
+
+ Return ``True`` if the values *a* and *b* are close to each other and
+ ``False`` otherwise.
+
+ Whether or not two values are considered close is determined according to
+ given absolute and relative tolerances.
+
+ *rel_tol* is the relative tolerance -- it is the maximum allowed difference
+ between *a* and *b*, relative to the larger absolute value of *a* or *b*.
+ For example, to set a tolerance of 5%, pass ``rel_tol=0.05``. The default
+ tolerance is ``1e-09``, which assures that the two values are the same
+ within about 9 decimal digits. *rel_tol* must be greater than zero.
+
+ *abs_tol* is the minimum absolute tolerance -- useful for comparisons near
+ zero. *abs_tol* must be at least zero.
+
+ If no errors occur, the result will be:
+ ``abs(a-b) <= max(rel_tol * max(abs(a), abs(b)), abs_tol)``.
+
+ The IEEE 754 special values of ``NaN``, ``inf``, and ``-inf`` will be
+ handled according to IEEE rules. Specifically, ``NaN`` is not considered
+ close to any other value, including ``NaN``. ``inf`` and ``-inf`` are only
+ considered close to themselves.
+
+ .. versionadded:: 3.5
+
+ .. seealso::
+
+ :pep:`485` -- A function for testing approximate equality
+
+
Constants
---------
diff --git a/Doc/library/cmd.rst b/Doc/library/cmd.rst
index 1ab2d7423f..61ef0f6744 100644
--- a/Doc/library/cmd.rst
+++ b/Doc/library/cmd.rst
@@ -3,6 +3,7 @@
.. module:: cmd
:synopsis: Build line-oriented command interpreters.
+
.. sectionauthor:: Eric S. Raymond <esr@snark.thyrsus.com>
**Source code:** :source:`Lib/cmd.py`
diff --git a/Doc/library/code.rst b/Doc/library/code.rst
index 5b5d7cc8c1..443af699f2 100644
--- a/Doc/library/code.rst
+++ b/Doc/library/code.rst
@@ -4,6 +4,9 @@
.. module:: code
:synopsis: Facilities to implement read-eval-print loops.
+**Source code:** :source:`Lib/code.py`
+
+--------------
The ``code`` module provides facilities to implement read-eval-print loops in
Python. Two classes and convenience functions are included which can be used to
@@ -113,6 +116,9 @@ Interactive Interpreter Objects
because it is within the interpreter object implementation. The output is
written by the :meth:`write` method.
+ .. versionchanged:: 3.5 The full chained traceback is displayed instead
+ of just the primary traceback.
+
.. method:: InteractiveInterpreter.write(data)
@@ -165,4 +171,3 @@ interpreter objects as well as the following additions.
newline. When the user enters the EOF key sequence, :exc:`EOFError` is raised.
The base implementation reads from ``sys.stdin``; a subclass may replace this
with a different implementation.
-
diff --git a/Doc/library/codecs.rst b/Doc/library/codecs.rst
index 628969c65d..1add30072f 100644
--- a/Doc/library/codecs.rst
+++ b/Doc/library/codecs.rst
@@ -3,10 +3,12 @@
.. module:: codecs
:synopsis: Encode and decode data and streams.
+
.. moduleauthor:: Marc-André Lemburg <mal@lemburg.com>
.. sectionauthor:: Marc-André Lemburg <mal@lemburg.com>
.. sectionauthor:: Martin v. Löwis <martin@v.loewis.de>
+**Source code:** :source:`Lib/codecs.py`
.. index::
single: Unicode
@@ -16,6 +18,8 @@
single: streams
pair: stackable; streams
+--------------
+
This module defines base classes for standard Python codecs (encoders and
decoders) and provides access to the internal Python codec registry, which
manages the codec and error handling lookup process. Most standard codecs
@@ -29,10 +33,9 @@ module features are restricted to use specifically with
The module defines the following functions for encoding and decoding with
any codec:
-.. function:: encode(obj, [encoding[, errors]])
+.. function:: encode(obj, encoding='utf-8', errors='strict')
- Encodes *obj* using the codec registered for *encoding*. The default
- encoding is ``utf-8``.
+ Encodes *obj* using the codec registered for *encoding*.
*Errors* may be given to set the desired error handling scheme. The
default error handler is ``'strict'`` meaning that encoding errors raise
@@ -40,10 +43,9 @@ any codec:
:exc:`UnicodeEncodeError`). Refer to :ref:`codec-base-classes` for more
information on codec error handling.
-.. function:: decode(obj, [encoding[, errors]])
+.. function:: decode(obj, encoding='utf-8', errors='strict')
- Decodes *obj* using the codec registered for *encoding*. The default
- encoding is ``utf-8``.
+ Decodes *obj* using the codec registered for *encoding*.
*Errors* may be given to set the desired error handling scheme. The
default error handler is ``'strict'`` meaning that decoding errors raise
@@ -104,7 +106,6 @@ The full details for each codec can also be looked up directly:
To simplify access to the various codec components, the module provides
these additional functions which use :func:`lookup` for the codec lookup:
-
.. function:: getencoder(encoding)
Look up the codec for the given encoding and return its encoder function.
@@ -139,16 +140,16 @@ these additional functions which use :func:`lookup` for the codec lookup:
.. function:: getreader(encoding)
- Look up the codec for the given encoding and return its StreamReader class or
- factory function.
+ Look up the codec for the given encoding and return its :class:`StreamReader`
+ class or factory function.
Raises a :exc:`LookupError` in case the encoding cannot be found.
.. function:: getwriter(encoding)
- Look up the codec for the given encoding and return its StreamWriter class or
- factory function.
+ Look up the codec for the given encoding and return its :class:`StreamWriter`
+ class or factory function.
Raises a :exc:`LookupError` in case the encoding cannot be found.
@@ -274,6 +275,7 @@ implement the file protocols. Codec authors also need to define how the
codec will handle encoding and decoding errors.
+.. _surrogateescape:
.. _error-handlers:
Error Handlers
@@ -315,10 +317,14 @@ The following error handlers are only applicable to
| | reference (only for encoding). Implemented |
| | in :func:`xmlcharrefreplace_errors`. |
+-------------------------+-----------------------------------------------+
-| ``'backslashreplace'`` | Replace with backslashed escape sequences |
-| | (only for encoding). Implemented in |
+| ``'backslashreplace'`` | Replace with backslashed escape sequences. |
+| | Implemented in |
| | :func:`backslashreplace_errors`. |
+-------------------------+-----------------------------------------------+
+| ``'namereplace'`` | Replace with ``\N{...}`` escape sequences |
+| | (only for encoding). Implemented in |
+| | :func:`namereplace_errors`. |
++-------------------------+-----------------------------------------------+
| ``'surrogateescape'`` | On decoding, replace byte with individual |
| | surrogate code ranging from ``U+DC80`` to |
| | ``U+DCFF``. This code will then be turned |
@@ -344,6 +350,13 @@ In addition, the following error handler is specific to the given codecs:
.. versionchanged:: 3.4
The ``'surrogatepass'`` error handlers now works with utf-16\* and utf-32\* codecs.
+.. versionadded:: 3.5
+ The ``'namereplace'`` error handler.
+
+.. versionchanged:: 3.5
+ The ``'backslashreplace'`` error handlers now works with decoding and
+ translating.
+
The set of allowed values can be extended by registering a new named error
handler:
@@ -411,9 +424,17 @@ functions:
.. function:: backslashreplace_errors(exception)
- Implements the ``'backslashreplace'`` error handling (for encoding with
+ Implements the ``'backslashreplace'`` error handling (for
+ :term:`text encodings <text encoding>` only): malformed data is
+ replaced by a backslashed escape sequence.
+
+.. function:: namereplace_errors(exception)
+
+ Implements the ``'namereplace'`` error handling (for encoding with
:term:`text encodings <text encoding>` only): the
- unencodable character is replaced by a backslashed escape sequence.
+ unencodable character is replaced by a ``\N{...}`` escape sequence.
+
+ .. versionadded:: 3.5
.. _codec-objects:
@@ -959,7 +980,7 @@ particular, the following variants typically exist:
* an ISO 8859 codeset
-* a Microsoft Windows code page, which is typically derived from a 8859 codeset,
+* a Microsoft Windows code page, which is typically derived from an 8859 codeset,
but replaces control characters with additional graphic characters
* an IBM EBCDIC code page
@@ -1144,8 +1165,16 @@ particular, the following variants typically exist:
+-----------------+--------------------------------+--------------------------------+
| koi8_r | | Russian |
+-----------------+--------------------------------+--------------------------------+
+| koi8_t | | Tajik |
+| | | |
+| | | .. versionadded:: 3.5 |
++-----------------+--------------------------------+--------------------------------+
| koi8_u | | Ukrainian |
+-----------------+--------------------------------+--------------------------------+
+| kz1048 | kz_1048, strk1048_2002, rk1048 | Kazakh |
+| | | |
+| | | .. versionadded:: 3.5 |
++-----------------+--------------------------------+--------------------------------+
| mac_cyrillic | maccyrillic | Bulgarian, Byelorussian, |
| | | Macedonian, Russian, Serbian |
+-----------------+--------------------------------+--------------------------------+
@@ -1388,7 +1417,7 @@ parameters, such as :mod:`http.client` and :mod:`ftplib`, accept Unicode host
names (:mod:`http.client` then also transparently sends an IDNA hostname in the
:mailheader:`Host` field if it sends that field at all).
-.. _section 3.1: http://tools.ietf.org/html/rfc3490#section-3.1
+.. _section 3.1: https://tools.ietf.org/html/rfc3490#section-3.1
When receiving host names from the wire (such as in reverse name lookup), no
automatic conversion to Unicode is performed: Applications wishing to present
@@ -1446,4 +1475,3 @@ This module implements a variant of the UTF-8 codec: On encoding a UTF-8 encoded
BOM will be prepended to the UTF-8 encoded bytes. For the stateful encoder this
is only done once (on the first write to the byte stream). For decoding an
optional UTF-8 encoded BOM at the start of the data will be skipped.
-
diff --git a/Doc/library/codeop.rst b/Doc/library/codeop.rst
index 9ae4176485..a52d2c62c4 100644
--- a/Doc/library/codeop.rst
+++ b/Doc/library/codeop.rst
@@ -3,9 +3,14 @@
.. module:: codeop
:synopsis: Compile (possibly incomplete) Python code.
+
.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
.. sectionauthor:: Michael Hudson <mwh@python.net>
+**Source code:** :source:`Lib/codeop.py`
+
+--------------
+
The :mod:`codeop` module provides utilities upon which the Python
read-eval-print loop can be emulated, as is done in the :mod:`code` module. As
a result, you probably don't want to use the module directly; if you want to
diff --git a/Doc/library/collections.abc.rst b/Doc/library/collections.abc.rst
index d73f05ae56..61682ccd37 100644
--- a/Doc/library/collections.abc.rst
+++ b/Doc/library/collections.abc.rst
@@ -3,20 +3,21 @@
.. module:: collections.abc
:synopsis: Abstract base classes for containers
+
.. moduleauthor:: Raymond Hettinger <python at rcn.com>
.. sectionauthor:: Raymond Hettinger <python at rcn.com>
.. versionadded:: 3.3
Formerly, this module was part of the :mod:`collections` module.
+**Source code:** :source:`Lib/_collections_abc.py`
+
.. testsetup:: *
from collections import *
import itertools
__name__ = '<doctest>'
-**Source code:** :source:`Lib/_collections_abc.py`
-
--------------
This module provides :term:`abstract base classes <abstract base class>` that
@@ -33,13 +34,14 @@ The collections module offers the following :term:`ABCs <abstract base class>`:
.. tabularcolumns:: |l|L|L|L|
-========================= ===================== ====================== ====================================================
+========================== ====================== ======================= ====================================================
ABC Inherits from Abstract Methods Mixin Methods
-========================= ===================== ====================== ====================================================
+========================== ====================== ======================= ====================================================
:class:`Container` ``__contains__``
:class:`Hashable` ``__hash__``
:class:`Iterable` ``__iter__``
:class:`Iterator` :class:`Iterable` ``__next__`` ``__iter__``
+:class:`Generator` :class:`Iterator` ``send``, ``throw`` ``close``, ``__iter__``, ``__next__``
:class:`Sized` ``__len__``
:class:`Callable` ``__call__``
@@ -80,7 +82,11 @@ ABC Inherits from Abstract Methods Mixin
:class:`KeysView` :class:`MappingView`, ``__contains__``,
:class:`Set` ``__iter__``
:class:`ValuesView` :class:`MappingView` ``__contains__``, ``__iter__``
-========================= ===================== ====================== ====================================================
+:class:`Awaitable` ``__await__``
+:class:`Coroutine` :class:`Awaitable` ``send``, ``throw`` ``close``
+:class:`AsyncIterable` ``__aiter__``
+:class:`AsyncIterator` :class:`AsyncIterable` ``__anext__`` ``__aiter__``
+========================== ====================== ======================= ====================================================
.. class:: Container
@@ -102,11 +108,34 @@ ABC Inherits from Abstract Methods Mixin
:meth:`~iterator.__next__` methods. See also the definition of
:term:`iterator`.
+.. class:: Generator
+
+ ABC for generator classes that implement the protocol defined in
+ :pep:`342` that extends iterators with the :meth:`~generator.send`,
+ :meth:`~generator.throw` and :meth:`~generator.close` methods.
+ See also the definition of :term:`generator`.
+
+ .. versionadded:: 3.5
+
.. class:: Sequence
MutableSequence
ABCs for read-only and mutable :term:`sequences <sequence>`.
+ Implementation note: Some of the mixin methods, such as
+ :meth:`__iter__`, :meth:`__reversed__` and :meth:`index`, make
+ repeated calls to the underlying :meth:`__getitem__` method.
+ Consequently, if :meth:`__getitem__` is implemented with constant
+ access speed, the mixin methods will have linear performance;
+ however, if the underlying method is linear (as it would be with a
+ linked list), the mixins will have quadratic performance and will
+ likely need to be overridden.
+
+ .. versionchanged:: 3.5
+ The index() method added support for *stop* and *start*
+ arguments.
+
+
.. class:: Set
MutableSet
@@ -124,6 +153,56 @@ ABC Inherits from Abstract Methods Mixin
ABCs for mapping, items, keys, and values :term:`views <dictionary view>`.
+.. class:: Awaitable
+
+ ABC for :term:`awaitable` objects, which can be used in :keyword:`await`
+ expressions. Custom implementations must provide the :meth:`__await__`
+ method.
+
+ :term:`Coroutine` objects and instances of the
+ :class:`~collections.abc.Coroutine` ABC are all instances of this ABC.
+
+ .. note::
+ In CPython, generator-based coroutines (generators decorated with
+ :func:`types.coroutine` or :func:`asyncio.coroutine`) are
+ *awaitables*, even though they do not have an :meth:`__await__` method.
+ Using ``isinstance(gencoro, Awaitable)`` for them will return ``False``.
+ Use :func:`inspect.isawaitable` to detect them.
+
+ .. versionadded:: 3.5
+
+.. class:: Coroutine
+
+ ABC for coroutine compatible classes. These implement the
+ following methods, defined in :ref:`coroutine-objects`:
+ :meth:`~coroutine.send`, :meth:`~coroutine.throw`, and
+ :meth:`~coroutine.close`. Custom implementations must also implement
+ :meth:`__await__`. All :class:`Coroutine` instances are also instances of
+ :class:`Awaitable`. See also the definition of :term:`coroutine`.
+
+ .. note::
+ In CPython, generator-based coroutines (generators decorated with
+ :func:`types.coroutine` or :func:`asyncio.coroutine`) are
+ *awaitables*, even though they do not have an :meth:`__await__` method.
+ Using ``isinstance(gencoro, Coroutine)`` for them will return ``False``.
+ Use :func:`inspect.isawaitable` to detect them.
+
+ .. versionadded:: 3.5
+
+.. class:: AsyncIterable
+
+ ABC for classes that provide ``__aiter__`` method. See also the
+ definition of :term:`asynchronous iterable`.
+
+ .. versionadded:: 3.5
+
+.. class:: AsyncIterator
+
+ ABC for classes that provide ``__aiter__`` and ``__anext__``
+ methods. See also the definition of :term:`asynchronous iterator`.
+
+ .. versionadded:: 3.5
+
These ABCs allow us to ask classes or instances if they provide
particular functionality, for example::
@@ -140,19 +219,22 @@ The ABC supplies the remaining methods such as :meth:`__and__` and
:meth:`isdisjoint`::
class ListBasedSet(collections.abc.Set):
- ''' Alternate set implementation favoring space over speed
- and not requiring the set elements to be hashable. '''
- def __init__(self, iterable):
- self.elements = lst = []
- for value in iterable:
- if value not in lst:
- lst.append(value)
- def __iter__(self):
- return iter(self.elements)
- def __contains__(self, value):
- return value in self.elements
- def __len__(self):
- return len(self.elements)
+ ''' Alternate set implementation favoring space over speed
+ and not requiring the set elements to be hashable. '''
+ def __init__(self, iterable):
+ self.elements = lst = []
+ for value in iterable:
+ if value not in lst:
+ lst.append(value)
+
+ def __iter__(self):
+ return iter(self.elements)
+
+ def __contains__(self, value):
+ return value in self.elements
+
+ def __len__(self):
+ return len(self.elements)
s1 = ListBasedSet('abcdef')
s2 = ListBasedSet('defghi')
@@ -185,7 +267,7 @@ Notes on using :class:`Set` and :class:`MutableSet` as a mixin:
.. seealso::
- * `OrderedSet recipe <http://code.activestate.com/recipes/576694/>`_ for an
+ * `OrderedSet recipe <https://code.activestate.com/recipes/576694/>`_ for an
example built on :class:`MutableSet`.
* For more about ABCs, see the :mod:`abc` module and :pep:`3119`.
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst
index 09718254eb..4936b3a0f8 100644
--- a/Doc/library/collections.rst
+++ b/Doc/library/collections.rst
@@ -3,17 +3,18 @@
.. module:: collections
:synopsis: Container datatypes
+
.. moduleauthor:: Raymond Hettinger <python@rcn.com>
.. sectionauthor:: Raymond Hettinger <python@rcn.com>
+**Source code:** :source:`Lib/collections/__init__.py`
+
.. testsetup:: *
from collections import *
import itertools
__name__ = '<doctest>'
-**Source code:** :source:`Lib/collections/__init__.py`
-
--------------
This module implements specialized container datatypes providing alternatives to
@@ -56,7 +57,7 @@ The class can be used to simulate nested scopes and is useful in templating.
dictionary is provided so that a new chain always has at least one mapping.
The underlying mappings are stored in a list. That list is public and can
- accessed or updated using the *maps* attribute. There is no other state.
+ be accessed or updated using the *maps* attribute. There is no other state.
Lookups search the underlying mappings successively until a key is found. In
contrast, writes, updates, and deletions only operate on the first mapping.
@@ -116,12 +117,12 @@ The class can be used to simulate nested scopes and is useful in templating.
:meth:`~collections.ChainMap.parents` property.
* The `Nested Contexts recipe
- <http://code.activestate.com/recipes/577434/>`_ has options to control
+ <https://code.activestate.com/recipes/577434/>`_ has options to control
whether writes and other mutations apply only to the first mapping or to
any mapping in the chain.
* A `greatly simplified read-only version of Chainmap
- <http://code.activestate.com/recipes/305268/>`_.
+ <https://code.activestate.com/recipes/305268/>`_.
:class:`ChainMap` Examples and Recipes
@@ -374,12 +375,12 @@ or subtracting from an empty counter.
.. seealso::
- * `Bag class <http://www.gnu.org/software/smalltalk/manual-base/html_node/Bag.html>`_
+ * `Bag class <https://www.gnu.org/software/smalltalk/manual-base/html_node/Bag.html>`_
in Smalltalk.
- * Wikipedia entry for `Multisets <http://en.wikipedia.org/wiki/Multiset>`_.
+ * Wikipedia entry for `Multisets <https://en.wikipedia.org/wiki/Multiset>`_.
- * `C++ multisets <http://www.demo2s.com/Tutorial/Cpp/0380__set-multiset/Catalog0380__set-multiset.htm>`_
+ * `C++ multisets <http://www.java2s.com/Tutorial/Cpp/0380__set-multiset/Catalog0380__set-multiset.htm>`_
tutorial with examples.
* For mathematical operations on multisets and their use cases, see
@@ -387,7 +388,7 @@ or subtracting from an empty counter.
Section 4.6.3, Exercise 19*.
* To enumerate all distinct multisets of a given size over a given set of
- elements, see :func:`itertools.combinations_with_replacement`.
+ elements, see :func:`itertools.combinations_with_replacement`:
map(Counter, combinations_with_replacement('ABC', 2)) --> AA AB AC BB BC CC
@@ -437,6 +438,13 @@ or subtracting from an empty counter.
Remove all elements from the deque leaving it with length 0.
+ .. method:: copy()
+
+ Create a shallow copy of the deque.
+
+ .. versionadded:: 3.5
+
+
.. method:: count(x)
Count the number of deque elements equal to *x*.
@@ -457,6 +465,25 @@ or subtracting from an empty counter.
elements in the iterable argument.
+ .. method:: index(x[, start[, stop]])
+
+ Return the position of *x* in the deque (at or after index *start*
+ and before index *stop*). Returns the first match or raises
+ :exc:`ValueError` if not found.
+
+ .. versionadded:: 3.5
+
+
+ .. method:: insert(i, x)
+
+ Insert *x* into the deque at position *i*.
+
+ If the insertion would cause a bounded deque to grow beyond *maxlen*,
+ an :exc:`IndexError` is raised.
+
+ .. versionadded:: 3.5
+
+
.. method:: pop()
Remove and return an element from the right side of the deque. If no
@@ -471,7 +498,7 @@ or subtracting from an empty counter.
.. method:: remove(value)
- Removed the first occurrence of *value*. If not found, raises a
+ Remove the first occurrence of *value*. If not found, raises a
:exc:`ValueError`.
@@ -504,6 +531,9 @@ the :keyword:`in` operator, and subscript references such as ``d[-1]``. Indexed
access is O(1) at both ends but slows to O(n) in the middle. For fast random
access, use lists instead.
+Starting in version 3.5, deques support ``__add__()``, ``__mul__()``,
+and ``__imul__()``.
+
Example:
.. doctest::
@@ -763,6 +793,11 @@ they add the ability to access fields by name instead of position index.
Named tuple instances do not have per-instance dictionaries, so they are
lightweight and require no more memory than regular tuples.
+ For simple uses, where the only requirement is to be able to refer to a set
+ of values by name using attribute-style access, the
+ :class:`types.SimpleNamespace` type can be a suitable alternative to using
+ a namedtuple.
+
.. versionchanged:: 3.1
Added support for *rename*.
@@ -879,15 +914,15 @@ functionality with a subclass. Here is how to add a calculated field and
a fixed-width print format:
>>> class Point(namedtuple('Point', 'x y')):
- __slots__ = ()
- @property
- def hypot(self):
- return (self.x ** 2 + self.y ** 2) ** 0.5
- def __str__(self):
- return 'Point: x=%6.3f y=%6.3f hypot=%6.3f' % (self.x, self.y, self.hypot)
+ __slots__ = ()
+ @property
+ def hypot(self):
+ return (self.x ** 2 + self.y ** 2) ** 0.5
+ def __str__(self):
+ return 'Point: x=%6.3f y=%6.3f hypot=%6.3f' % (self.x, self.y, self.hypot)
>>> for p in Point(3, 4), Point(14, 5/7):
- print(p)
+ print(p)
Point: x= 3.000 y= 4.000 hypot= 5.000
Point: x=14.000 y= 0.714 hypot=14.018
@@ -899,6 +934,18 @@ create a new named tuple type from the :attr:`_fields` attribute:
>>> Point3D = namedtuple('Point3D', Point._fields + ('z',))
+Docstrings can be customized by making direct assignments to the ``__doc__``
+fields:
+
+ >>> Book = namedtuple('Book', ['id', 'title', 'authors'])
+ >>> Book.__doc__ += ': Hardcover book in active collection'
+ >>> Book.id.__doc__ = '13-digit ISBN'
+ >>> Book.title.__doc__ = 'Title of first printing'
+ >>> Book.authors.__doc__ = 'List of authors sorted by last name'
+
+.. versionchanged:: 3.5
+ Property docstrings became writeable.
+
Default values can be implemented by using :meth:`_replace` to
customize a prototype instance:
@@ -907,21 +954,11 @@ customize a prototype instance:
>>> johns_account = default_account._replace(owner='John')
>>> janes_account = default_account._replace(owner='Jane')
-Enumerated constants can be implemented with named tuples, but it is simpler
-and more efficient to use a simple :class:`~enum.Enum`:
-
- >>> Status = namedtuple('Status', 'open pending closed')._make(range(3))
- >>> Status.open, Status.pending, Status.closed
- (0, 1, 2)
- >>> from enum import Enum
- >>> class Status(Enum):
- ... open, pending, closed = range(3)
-
.. seealso::
* `Recipe for named tuple abstract base class with a metaclass mix-in
- <http://code.activestate.com/recipes/577629-namedtupleabc-abstract-base-class-mix-in-for-named/>`_
+ <https://code.activestate.com/recipes/577629-namedtupleabc-abstract-base-class-mix-in-for-named/>`_
by Jan Kaliszewski. Besides providing an :term:`abstract base class` for
named tuples, it also supports an alternate :term:`metaclass`-based
constructor that is convenient for use cases where named tuples are being
@@ -982,6 +1019,9 @@ The :class:`OrderedDict` constructor and :meth:`update` method both accept
keyword arguments, but their order is lost because Python's function call
semantics pass in keyword arguments using a regular unordered dictionary.
+.. versionchanged:: 3.5
+ The items, keys, and values :term:`views <dictionary view>`
+ of :class:`OrderedDict` now support reverse iteration using :func:`reversed`.
:class:`OrderedDict` Examples and Recipes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -990,7 +1030,7 @@ Since an ordered dictionary remembers its insertion order, it can be used
in conjunction with sorting to make a sorted dictionary::
>>> # regular unsorted dictionary
- >>> d = {'banana': 3, 'apple':4, 'pear': 1, 'orange': 2}
+ >>> d = {'banana': 3, 'apple': 4, 'pear': 1, 'orange': 2}
>>> # dictionary sorted by key
>>> OrderedDict(sorted(d.items(), key=lambda t: t[0]))
@@ -1119,3 +1159,7 @@ attribute.
be an instance of :class:`bytes`, :class:`str`, :class:`UserString` (or a
subclass) or an arbitrary sequence which can be converted into a string using
the built-in :func:`str` function.
+
+ .. versionchanged:: 3.5
+ New methods ``__getnewargs__``, ``__rmod__``, ``casefold``,
+ ``format_map``, ``isprintable``, and ``maketrans``.
diff --git a/Doc/library/colorsys.rst b/Doc/library/colorsys.rst
index 225306c2d3..c33f531cc1 100644
--- a/Doc/library/colorsys.rst
+++ b/Doc/library/colorsys.rst
@@ -3,6 +3,7 @@
.. module:: colorsys
:synopsis: Conversion functions between RGB and other color systems.
+
.. sectionauthor:: David Ascher <da@python.net>
**Source code:** :source:`Lib/colorsys.py`
@@ -21,7 +22,7 @@ spaces, the coordinates are all between 0 and 1.
More information about color spaces can be found at
http://www.poynton.com/ColorFAQ.html and
- http://www.cambridgeincolour.com/tutorials/color-spaces.htm.
+ https://www.cambridgeincolour.com/tutorials/color-spaces.htm.
The :mod:`colorsys` module defines the following functions:
diff --git a/Doc/library/compileall.rst b/Doc/library/compileall.rst
index 9712de2fef..511c581ad0 100644
--- a/Doc/library/compileall.rst
+++ b/Doc/library/compileall.rst
@@ -8,7 +8,6 @@
--------------
-
This module provides some utility functions to support installing Python
libraries. These functions compile Python source files in a directory tree.
This module can be used to create the cached byte-code files at library
@@ -42,7 +41,8 @@ compile Python sources.
.. cmdoption:: -q
- Do not print the list of files compiled, print only error messages.
+ Do not print the list of files compiled. If passed once, error messages will
+ still be printed. If passed twice (``-qq``), all output is suppressed.
.. cmdoption:: -d destdir
@@ -70,9 +70,28 @@ compile Python sources.
is to write files to their :pep:`3147` locations and names, which allows
byte-code files from multiple versions of Python to coexist.
+.. cmdoption:: -r
+
+ Control the maximum recursion level for subdirectories.
+ If this is given, then ``-l`` option will not be taken into account.
+ :program:`python -m compileall <directory> -r 0` is equivalent to
+ :program:`python -m compileall <directory> -l`.
+
+.. cmdoption:: -j N
+
+ Use *N* workers to compile the files within the given directory.
+ If ``0`` is used, then the result of :func:`os.cpu_count()`
+ will be used.
+
.. versionchanged:: 3.2
Added the ``-i``, ``-b`` and ``-h`` options.
+.. versionchanged:: 3.5
+ Added the ``-j``, ``-r``, and ``-qq`` options. ``-q`` option
+ was changed to a multilevel value. ``-b`` will always produce a
+ byte-code file ending in ``.pyc``, never ``.pyo``.
+
+
There is no command-line option to control the optimization level used by the
:func:`compile` function, because the Python interpreter itself already
provides the option: :program:`python -O -m compileall`.
@@ -80,7 +99,7 @@ provides the option: :program:`python -O -m compileall`.
Public functions
----------------
-.. function:: compile_dir(dir, maxlevels=10, ddir=None, force=False, rx=None, quiet=False, legacy=False, optimize=-1)
+.. function:: compile_dir(dir, maxlevels=10, ddir=None, force=False, rx=None, quiet=0, legacy=False, optimize=-1, workers=1)
Recursively descend the directory tree named by *dir*, compiling all :file:`.py`
files along the way.
@@ -101,8 +120,9 @@ Public functions
file considered for compilation, and if it returns a true value, the file
is skipped.
- If *quiet* is true, nothing is printed to the standard output unless errors
- occur.
+ If *quiet* is ``False`` or ``0`` (the default), the filenames and other
+ information are printed to standard out. Set to ``1``, only errors are
+ printed. Set to ``2``, all output is suppressed.
If *legacy* is true, byte-code files are written to their legacy locations
and names, which may overwrite byte-code files created by another version of
@@ -113,11 +133,26 @@ Public functions
*optimize* specifies the optimization level for the compiler. It is passed to
the built-in :func:`compile` function.
+ The argument *workers* specifies how many workers are used to
+ compile files in parallel. The default is to not use multiple workers.
+ If the platform can't use multiple workers and *workers* argument is given,
+ then sequential compilation will be used as a fallback. If *workers* is
+ lower than ``0``, a :exc:`ValueError` will be raised.
+
.. versionchanged:: 3.2
Added the *legacy* and *optimize* parameter.
+ .. versionchanged:: 3.5
+ Added the *workers* parameter.
+
+ .. versionchanged:: 3.5
+ *quiet* parameter was changed to a multilevel value.
-.. function:: compile_file(fullname, ddir=None, force=False, rx=None, quiet=False, legacy=False, optimize=-1)
+ .. versionchanged:: 3.5
+ The *legacy* parameter only writes out ``.pyc`` files, not ``.pyo`` files
+ no matter what the value of *optimize* is.
+
+.. function:: compile_file(fullname, ddir=None, force=False, rx=None, quiet=0, legacy=False, optimize=-1)
Compile the file with path *fullname*.
@@ -131,8 +166,9 @@ Public functions
file being compiled, and if it returns a true value, the file is not
compiled and ``True`` is returned.
- If *quiet* is true, nothing is printed to the standard output unless errors
- occur.
+ If *quiet* is ``False`` or ``0`` (the default), the filenames and other
+ information are printed to standard out. Set to ``1``, only errors are
+ printed. Set to ``2``, all output is suppressed.
If *legacy* is true, byte-code files are written to their legacy locations
and names, which may overwrite byte-code files created by another version of
@@ -145,8 +181,14 @@ Public functions
.. versionadded:: 3.2
+ .. versionchanged:: 3.5
+ *quiet* parameter was changed to a multilevel value.
+
+ .. versionchanged:: 3.5
+ The *legacy* parameter only writes out ``.pyc`` files, not ``.pyo`` files
+ no matter what the value of *optimize* is.
-.. function:: compile_path(skip_curdir=True, maxlevels=0, force=False, legacy=False, optimize=-1)
+.. function:: compile_path(skip_curdir=True, maxlevels=0, force=False, quiet=0, legacy=False, optimize=-1)
Byte-compile all the :file:`.py` files found along ``sys.path``. If
*skip_curdir* is true (the default), the current directory is not included
@@ -157,6 +199,12 @@ Public functions
.. versionchanged:: 3.2
Added the *legacy* and *optimize* parameter.
+ .. versionchanged:: 3.5
+ *quiet* parameter was changed to a multilevel value.
+
+ .. versionchanged:: 3.5
+ The *legacy* parameter only writes out ``.pyc`` files, not ``.pyo`` files
+ no matter what the value of *optimize* is.
To force a recompile of all the :file:`.py` files in the :file:`Lib/`
subdirectory and all its subdirectories::
diff --git a/Doc/library/concurrent.futures.rst b/Doc/library/concurrent.futures.rst
index e63e741b2e..ae03f4b8f4 100644
--- a/Doc/library/concurrent.futures.rst
+++ b/Doc/library/concurrent.futures.rst
@@ -38,17 +38,26 @@ Executor Objects
future = executor.submit(pow, 323, 1235)
print(future.result())
- .. method:: map(func, *iterables, timeout=None)
+ .. method:: map(func, *iterables, timeout=None, chunksize=1)
Equivalent to :func:`map(func, *iterables) <map>` except *func* is executed
asynchronously and several calls to *func* may be made concurrently. The
- returned iterator raises a :exc:`TimeoutError` if
+ returned iterator raises a :exc:`concurrent.futures.TimeoutError` if
:meth:`~iterator.__next__` is called and the result isn't available
after *timeout* seconds from the original call to :meth:`Executor.map`.
*timeout* can be an int or a float. If *timeout* is not specified or
``None``, there is no limit to the wait time. If a call raises an
exception, then that exception will be raised when its value is
- retrieved from the iterator.
+ retrieved from the iterator. When using :class:`ProcessPoolExecutor`, this
+ method chops *iterables* into a number of chunks which it submits to the
+ pool as separate tasks. The (approximate) size of these chunks can be
+ specified by setting *chunksize* to a positive integer. For very long
+ iterables, using a large value for *chunksize* can significantly improve
+ performance compared to the default size of 1. With :class:`ThreadPoolExecutor`,
+ *chunksize* has no effect.
+
+ .. versionchanged:: 3.5
+ Added the *chunksize* argument.
.. method:: shutdown(wait=True)
@@ -90,12 +99,12 @@ the results of another :class:`Future`. For example::
import time
def wait_on_b():
time.sleep(5)
- print(b.result()) # b will never complete because it is waiting on a.
+ print(b.result()) # b will never complete because it is waiting on a.
return 5
def wait_on_a():
time.sleep(5)
- print(a.result()) # a will never complete because it is waiting on b.
+ print(a.result()) # a will never complete because it is waiting on b.
return 6
@@ -115,11 +124,19 @@ And::
executor.submit(wait_on_future)
-.. class:: ThreadPoolExecutor(max_workers)
+.. class:: ThreadPoolExecutor(max_workers=None)
An :class:`Executor` subclass that uses a pool of at most *max_workers*
threads to execute calls asynchronously.
+ .. versionchanged:: 3.5
+ If *max_workers* is ``None`` or
+ not given, it will default to the number of processors on the machine,
+ multiplied by ``5``, assuming that :class:`ThreadPoolExecutor` is often
+ used to overlap I/O instead of CPU work and the number of workers
+ should be higher than the number of workers
+ for :class:`ProcessPoolExecutor`.
+
.. _threadpoolexecutor-example:
@@ -136,7 +153,7 @@ ThreadPoolExecutor Example
'http://www.bbc.co.uk/',
'http://some-made-up-domain.com/']
- # Retrieve a single page and report the url and contents
+ # Retrieve a single page and report the URL and contents
def load_url(url, timeout):
with urllib.request.urlopen(url, timeout=timeout) as conn:
return conn.read()
@@ -175,6 +192,8 @@ to a :class:`ProcessPoolExecutor` will result in deadlock.
An :class:`Executor` subclass that executes calls asynchronously using a pool
of at most *max_workers* processes. If *max_workers* is ``None`` or not
given, it will default to the number of processors on the machine.
+ If *max_workers* is lower or equal to ``0``, then a :exc:`ValueError`
+ will be raised.
.. versionchanged:: 3.3
When one of the worker processes terminates abruptly, a
@@ -255,11 +274,12 @@ The :class:`Future` class encapsulates the asynchronous execution of a callable.
Return the value returned by the call. If the call hasn't yet completed
then this method will wait up to *timeout* seconds. If the call hasn't
- completed in *timeout* seconds, then a :exc:`TimeoutError` will be
- raised. *timeout* can be an int or float. If *timeout* is not specified
- or ``None``, there is no limit to the wait time.
+ completed in *timeout* seconds, then a
+ :exc:`concurrent.futures.TimeoutError` will be raised. *timeout* can be
+ an int or float. If *timeout* is not specified or ``None``, there is no
+ limit to the wait time.
- If the future is cancelled before completing then :exc:`CancelledError`
+ If the future is cancelled before completing then :exc:`.CancelledError`
will be raised.
If the call raised, this method will raise the same exception.
@@ -268,11 +288,12 @@ The :class:`Future` class encapsulates the asynchronous execution of a callable.
Return the exception raised by the call. If the call hasn't yet
completed then this method will wait up to *timeout* seconds. If the
- call hasn't completed in *timeout* seconds, then a :exc:`TimeoutError`
- will be raised. *timeout* can be an int or float. If *timeout* is not
- specified or ``None``, there is no limit to the wait time.
+ call hasn't completed in *timeout* seconds, then a
+ :exc:`concurrent.futures.TimeoutError` will be raised. *timeout* can be
+ an int or float. If *timeout* is not specified or ``None``, there is no
+ limit to the wait time.
- If the future is cancelled before completing then :exc:`CancelledError`
+ If the future is cancelled before completing then :exc:`.CancelledError`
will be raised.
If the call completed without raising, ``None`` is returned.
@@ -372,13 +393,12 @@ Module Functions
Returns an iterator over the :class:`Future` instances (possibly created by
different :class:`Executor` instances) given by *fs* that yields futures as
they complete (finished or were cancelled). Any futures given by *fs* that
- are duplicated will be returned once. Any futures that completed
- before :func:`as_completed` is called will be yielded first. The returned
- iterator raises a :exc:`TimeoutError` if :meth:`~iterator.__next__` is
- called and the result isn't available after *timeout* seconds from the
- original call to :func:`as_completed`. *timeout* can be an int or float.
- If *timeout* is not specified or ``None``, there is no limit to the wait
- time.
+ are duplicated will be returned once. Any futures that completed before
+ :func:`as_completed` is called will be yielded first. The returned iterator
+ raises a :exc:`concurrent.futures.TimeoutError` if :meth:`~iterator.__next__`
+ is called and the result isn't available after *timeout* seconds from the
+ original call to :func:`as_completed`. *timeout* can be an int or float. If
+ *timeout* is not specified or ``None``, there is no limit to the wait time.
.. seealso::
@@ -391,6 +411,16 @@ Module Functions
Exception classes
-----------------
+.. currentmodule:: concurrent.futures
+
+.. exception:: CancelledError
+
+ Raised when a future is cancelled.
+
+.. exception:: TimeoutError
+
+ Raised when a future operation exceeds the given timeout.
+
.. currentmodule:: concurrent.futures.process
.. exception:: BrokenProcessPool
diff --git a/Doc/library/configparser.rst b/Doc/library/configparser.rst
index 92551bc3bd..eeae96aab9 100644
--- a/Doc/library/configparser.rst
+++ b/Doc/library/configparser.rst
@@ -11,12 +11,16 @@
.. sectionauthor:: Christopher G. Petrilli <petrilli@amber.org>
.. sectionauthor:: Åukasz Langa <lukasz@langa.pl>
+**Source code:** :source:`Lib/configparser.py`
+
.. index::
pair: .ini; file
pair: configuration; file
single: ini file
single: Windows ini file
+--------------
+
This module provides the :class:`ConfigParser` class which implements a basic
configuration language which provides a structure similar to what's found in
Microsoft Windows INI files. You can use this to write Python programs which
@@ -142,12 +146,13 @@ datatypes, you should convert on your own:
>>> float(topsecret['CompressionLevel'])
9.0
-Extracting Boolean values is not that simple, though. Passing the value
-to ``bool()`` would do no good since ``bool('False')`` is still
-``True``. This is why config parsers also provide :meth:`getboolean`.
-This method is case-insensitive and recognizes Boolean values from
-``'yes'``/``'no'``, ``'on'``/``'off'`` and ``'1'``/``'0'`` [1]_.
-For example:
+Since this task is so common, config parsers provide a range of handy getter
+methods to handle integers, floats and booleans. The last one is the most
+interesting because simply passing the value to ``bool()`` would do no good
+since ``bool('False')`` is still ``True``. This is why config parsers also
+provide :meth:`getboolean`. This method is case-insensitive and recognizes
+Boolean values from ``'yes'``/``'no'``, ``'on'``/``'off'``,
+``'true'``/``'false'`` and ``'1'``/``'0'`` [1]_. For example:
.. doctest::
@@ -159,10 +164,8 @@ For example:
True
Apart from :meth:`getboolean`, config parsers also provide equivalent
-:meth:`getint` and :meth:`getfloat` methods, but these are far less
-useful since conversion using :func:`int` and :func:`float` is
-sufficient for these types.
-
+:meth:`getint` and :meth:`getfloat` methods. You can register your own
+converters and customize the provided ones. [1]_
Fallback Values
---------------
@@ -317,11 +320,11 @@ from ``get()`` calls.
.. class:: ExtendedInterpolation()
An alternative handler for interpolation which implements a more advanced
- syntax, used for instance in ``zc.buildout``. Extended interpolation is
+ syntax, used for instance in ``zc.buildout``. Extended interpolation is
using ``${section:option}`` to denote a value from a foreign section.
- Interpolation can span multiple levels. For convenience, if the ``section:``
- part is omitted, interpolation defaults to the current section (and possibly
- the default values from the special section).
+ Interpolation can span multiple levels. For convenience, if the
+ ``section:`` part is omitted, interpolation defaults to the current section
+ (and possibly the default values from the special section).
For example, the configuration specified above with basic interpolation,
would look like this with extended interpolation:
@@ -399,13 +402,13 @@ However, there are a few differences that should be taken into account:
* ``parser.popitem()`` never returns it.
* ``parser.get(section, option, **kwargs)`` - the second argument is **not**
- a fallback value. Note however that the section-level ``get()`` methods are
+ a fallback value. Note however that the section-level ``get()`` methods are
compatible both with the mapping protocol and the classic configparser API.
* ``parser.items()`` is compatible with the mapping protocol (returns a list of
*section_name*, *section_proxy* pairs including the DEFAULTSECT). However,
this method can also be invoked with arguments: ``parser.items(section, raw,
- vars)``. The latter call returns a list of *option*, *value* pairs for
+ vars)``. The latter call returns a list of *option*, *value* pairs for
a specified ``section``, with all interpolations expanded (unless
``raw=True`` is provided).
@@ -539,9 +542,9 @@ the :meth:`__init__` options:
* *delimiters*, default value: ``('=', ':')``
- Delimiters are substrings that delimit keys from values within a section. The
- first occurrence of a delimiting substring on a line is considered a delimiter.
- This means values (but not keys) can contain the delimiters.
+ Delimiters are substrings that delimit keys from values within a section.
+ The first occurrence of a delimiting substring on a line is considered
+ a delimiter. This means values (but not keys) can contain the delimiters.
See also the *space_around_delimiters* argument to
:meth:`ConfigParser.write`.
@@ -553,7 +556,7 @@ the :meth:`__init__` options:
Comment prefixes are strings that indicate the start of a valid comment within
a config file. *comment_prefixes* are used only on otherwise empty lines
(optionally indented) whereas *inline_comment_prefixes* can be used after
- every valid value (e.g. section names, options and empty lines as well). By
+ every valid value (e.g. section names, options and empty lines as well). By
default inline comments are disabled and ``'#'`` and ``';'`` are used as
prefixes for whole line comments.
@@ -563,10 +566,10 @@ the :meth:`__init__` options:
Please note that config parsers don't support escaping of comment prefixes so
using *inline_comment_prefixes* may prevent users from specifying option
- values with characters used as comment prefixes. When in doubt, avoid setting
- *inline_comment_prefixes*. In any circumstances, the only way of storing
- comment prefix characters at the beginning of a line in multiline values is to
- interpolate the prefix, for example::
+ values with characters used as comment prefixes. When in doubt, avoid
+ setting *inline_comment_prefixes*. In any circumstances, the only way of
+ storing comment prefix characters at the beginning of a line in multiline
+ values is to interpolate the prefix, for example::
>>> from configparser import ConfigParser, ExtendedInterpolation
>>> parser = ConfigParser(interpolation=ExtendedInterpolation())
@@ -611,7 +614,7 @@ the :meth:`__init__` options:
When set to ``True``, the parser will not allow for any section or option
duplicates while reading from a single source (using :meth:`read_file`,
- :meth:`read_string` or :meth:`read_dict`). It is recommended to use strict
+ :meth:`read_string` or :meth:`read_dict`). It is recommended to use strict
parsers in new applications.
.. versionchanged:: 3.2
@@ -646,12 +649,12 @@ the :meth:`__init__` options:
The convention of allowing a special section of default values for other
sections or interpolation purposes is a powerful concept of this library,
- letting users create complex declarative configurations. This section is
+ letting users create complex declarative configurations. This section is
normally called ``"DEFAULT"`` but this can be customized to point to any
- other valid section name. Some typical values include: ``"general"`` or
- ``"common"``. The name provided is used for recognizing default sections when
- reading from any source and is used when writing configuration back to
- a file. Its current value can be retrieved using the
+ other valid section name. Some typical values include: ``"general"`` or
+ ``"common"``. The name provided is used for recognizing default sections
+ when reading from any source and is used when writing configuration back to
+ a file. Its current value can be retrieved using the
``parser_instance.default_section`` attribute and may be modified at runtime
(i.e. to convert files from one format to another).
@@ -660,14 +663,30 @@ the :meth:`__init__` options:
Interpolation behaviour may be customized by providing a custom handler
through the *interpolation* argument. ``None`` can be used to turn off
interpolation completely, ``ExtendedInterpolation()`` provides a more
- advanced variant inspired by ``zc.buildout``. More on the subject in the
+ advanced variant inspired by ``zc.buildout``. More on the subject in the
`dedicated documentation section <#interpolation-of-values>`_.
:class:`RawConfigParser` has a default value of ``None``.
+* *converters*, default value: not set
+
+ Config parsers provide option value getters that perform type conversion. By
+ default :meth:`getint`, :meth:`getfloat`, and :meth:`getboolean` are
+ implemented. Should other getters be desirable, users may define them in
+ a subclass or pass a dictionary where each key is a name of the converter and
+ each value is a callable implementing said conversion. For instance, passing
+ ``{'decimal': decimal.Decimal}`` would add :meth:`getdecimal` on both the
+ parser object and all section proxies. In other words, it will be possible
+ to write both ``parser_instance.getdecimal('section', 'key', fallback=0)``
+ and ``parser_instance['section'].getdecimal('key', 0)``.
+
+ If the converter needs to access the state of the parser, it can be
+ implemented as a method on a config parser subclass. If the name of this
+ method starts with ``get``, it will be available on all section proxies, in
+ the dict-compatible form (see the ``getdecimal()`` example above).
More advanced customization may be achieved by overriding default values of
-these parser attributes. The defaults are defined on the classes, so they
-may be overridden by subclasses or by attribute assignment.
+these parser attributes. The defaults are defined on the classes, so they may
+be overridden by subclasses or by attribute assignment.
.. attribute:: BOOLEAN_STATES
@@ -725,10 +744,11 @@ may be overridden by subclasses or by attribute assignment.
.. attribute:: SECTCRE
- A compiled regular expression used to parse section headers. The default
- matches ``[section]`` to the name ``"section"``. Whitespace is considered part
- of the section name, thus ``[ larch ]`` will be read as a section of name
- ``" larch "``. Override this attribute if that's unsuitable. For example:
+ A compiled regular expression used to parse section headers. The default
+ matches ``[section]`` to the name ``"section"``. Whitespace is considered
+ part of the section name, thus ``[ larch ]`` will be read as a section of
+ name ``" larch "``. Override this attribute if that's unsuitable. For
+ example:
.. doctest::
@@ -815,13 +835,13 @@ To get interpolation, use :class:`ConfigParser`::
# Set the optional *raw* argument of get() to True if you wish to disable
# interpolation in a single get operation.
- print(cfg.get('Section1', 'foo', raw=False)) # -> "Python is fun!"
- print(cfg.get('Section1', 'foo', raw=True)) # -> "%(bar)s is %(baz)s!"
+ print(cfg.get('Section1', 'foo', raw=False)) # -> "Python is fun!"
+ print(cfg.get('Section1', 'foo', raw=True)) # -> "%(bar)s is %(baz)s!"
# The optional *vars* argument is a dict with members that will take
# precedence in interpolation.
print(cfg.get('Section1', 'foo', vars={'bar': 'Documentation',
- 'baz': 'evil'}))
+ 'baz': 'evil'}))
# The optional *fallback* argument can be used to provide a fallback value
print(cfg.get('Section1', 'foo'))
@@ -848,10 +868,10 @@ interpolation if an option used is not defined elsewhere. ::
config = configparser.ConfigParser({'bar': 'Life', 'baz': 'hard'})
config.read('example.cfg')
- print(config.get('Section1', 'foo')) # -> "Python is fun!"
+ print(config.get('Section1', 'foo')) # -> "Python is fun!"
config.remove_option('Section1', 'bar')
config.remove_option('Section1', 'baz')
- print(config.get('Section1', 'foo')) # -> "Life is hard!"
+ print(config.get('Section1', 'foo')) # -> "Life is hard!"
.. _configparser-objects:
@@ -859,7 +879,7 @@ interpolation if an option used is not defined elsewhere. ::
ConfigParser Objects
--------------------
-.. class:: ConfigParser(defaults=None, dict_type=collections.OrderedDict, allow_no_value=False, delimiters=('=', ':'), comment_prefixes=('#', ';'), inline_comment_prefixes=None, strict=True, empty_lines_in_values=True, default_section=configparser.DEFAULTSECT, interpolation=BasicInterpolation())
+.. class:: ConfigParser(defaults=None, dict_type=collections.OrderedDict, allow_no_value=False, delimiters=('=', ':'), comment_prefixes=('#', ';'), inline_comment_prefixes=None, strict=True, empty_lines_in_values=True, default_section=configparser.DEFAULTSECT, interpolation=BasicInterpolation(), converters={})
The main configuration parser. When *defaults* is given, it is initialized
into the dictionary of intrinsic defaults. When *dict_type* is given, it
@@ -869,8 +889,8 @@ ConfigParser Objects
When *delimiters* is given, it is used as the set of substrings that
divide keys from values. When *comment_prefixes* is given, it will be used
as the set of substrings that prefix comments in otherwise empty lines.
- Comments can be indented. When *inline_comment_prefixes* is given, it will be
- used as the set of substrings that prefix comments in non-empty lines.
+ Comments can be indented. When *inline_comment_prefixes* is given, it will
+ be used as the set of substrings that prefix comments in non-empty lines.
When *strict* is ``True`` (the default), the parser won't allow for
any section or option duplicates while reading from a single source (file,
@@ -884,13 +904,13 @@ ConfigParser Objects
When *default_section* is given, it specifies the name for the special
section holding default values for other sections and interpolation purposes
- (normally named ``"DEFAULT"``). This value can be retrieved and changed on
+ (normally named ``"DEFAULT"``). This value can be retrieved and changed on
runtime using the ``default_section`` instance attribute.
Interpolation behaviour may be customized by providing a custom handler
through the *interpolation* argument. ``None`` can be used to turn off
interpolation completely, ``ExtendedInterpolation()`` provides a more
- advanced variant inspired by ``zc.buildout``. More on the subject in the
+ advanced variant inspired by ``zc.buildout``. More on the subject in the
`dedicated documentation section <#interpolation-of-values>`_.
All option names used in interpolation will be passed through the
@@ -899,6 +919,12 @@ ConfigParser Objects
converts option names to lower case), the values ``foo %(bar)s`` and ``foo
%(BAR)s`` are equivalent.
+ When *converters* is given, it should be a dictionary where each key
+ represents the name of a type converter and each value is a callable
+ implementing the conversion from string to the desired datatype. Every
+ converter gets its own corresponding :meth:`get*()` method on the parser
+ object and section proxies.
+
.. versionchanged:: 3.1
The default *dict_type* is :class:`collections.OrderedDict`.
@@ -907,6 +933,9 @@ ConfigParser Objects
*empty_lines_in_values*, *default_section* and *interpolation* were
added.
+ .. versionchanged:: 3.5
+ The *converters* argument was added.
+
.. method:: defaults()
@@ -944,7 +973,7 @@ ConfigParser Objects
.. method:: has_option(section, option)
If the given *section* exists, and contains the given *option*, return
- :const:`True`; otherwise return :const:`False`. If the specified
+ :const:`True`; otherwise return :const:`False`. If the specified
*section* is :const:`None` or an empty string, DEFAULT is assumed.
@@ -1069,7 +1098,7 @@ ConfigParser Objects
:meth:`get` method.
.. versionchanged:: 3.2
- Items present in *vars* no longer appear in the result. The previous
+ Items present in *vars* no longer appear in the result. The previous
behaviour mixed actual parser options with variables provided for
interpolation.
@@ -1170,7 +1199,7 @@ RawConfigParser Objects
.. note::
Consider using :class:`ConfigParser` instead which checks types of
- the values to be stored internally. If you don't want interpolation, you
+ the values to be stored internally. If you don't want interpolation, you
can use ``ConfigParser(interpolation=None)``.
@@ -1181,7 +1210,7 @@ RawConfigParser Objects
*default section* name is passed, :exc:`ValueError` is raised.
Type of *section* is not checked which lets users create non-string named
- sections. This behaviour is unsupported and may cause internal errors.
+ sections. This behaviour is unsupported and may cause internal errors.
.. method:: set(section, option, value)
@@ -1282,3 +1311,4 @@ Exceptions
.. [1] Config parsers allow for heavy customization. If you are interested in
changing the behaviour outlined by the footnote reference, consult the
`Customizing Parser Behaviour`_ section.
+
diff --git a/Doc/library/constants.rst b/Doc/library/constants.rst
index 42b5af23a5..d5a0f09173 100644
--- a/Doc/library/constants.rst
+++ b/Doc/library/constants.rst
@@ -45,7 +45,6 @@ A small number of constants live in the built-in namespace. They are:
for more details.
-
.. data:: Ellipsis
The same as ``...``. Special value used mostly in conjunction with extended
diff --git a/Doc/library/contextlib.rst b/Doc/library/contextlib.rst
index 2b2ceceb2e..cf85fcd4b2 100644
--- a/Doc/library/contextlib.rst
+++ b/Doc/library/contextlib.rst
@@ -172,6 +172,16 @@ Functions and classes provided:
.. versionadded:: 3.4
+.. function:: redirect_stderr(new_target)
+
+ Similar to :func:`~contextlib.redirect_stdout` but redirecting
+ :data:`sys.stderr` to another file or file-like object.
+
+ This context manager is :ref:`reentrant <reentrant-cms>`.
+
+ .. versionadded:: 3.5
+
+
.. class:: ContextDecorator()
A base class that enables a context manager to also be used as a decorator.
@@ -593,7 +603,7 @@ an explicit ``with`` statement.
.. seealso::
- :pep:`0343` - The "with" statement
+ :pep:`343` - The "with" statement
The specification, background, and examples for the Python :keyword:`with`
statement.
@@ -634,7 +644,7 @@ to yield if an attempt is made to use them a second time::
Before
After
>>> with cm:
- ... pass
+ ... pass
...
Traceback (most recent call last):
...
diff --git a/Doc/library/copy.rst b/Doc/library/copy.rst
index 02ef0e5ee7..a8adcadbe0 100644
--- a/Doc/library/copy.rst
+++ b/Doc/library/copy.rst
@@ -4,6 +4,10 @@
.. module:: copy
:synopsis: Shallow and deep copy operations.
+**Source code:** :source:`Lib/copy.py`
+
+--------------
+
Assignment statements in Python do not copy objects, they create bindings
between a target and an object. For collections that are mutable or contain
mutable items, a copy is sometimes needed so one can change one copy without
diff --git a/Doc/library/copyreg.rst b/Doc/library/copyreg.rst
index 18306c7f99..eeabb4c658 100644
--- a/Doc/library/copyreg.rst
+++ b/Doc/library/copyreg.rst
@@ -4,11 +4,14 @@
.. module:: copyreg
:synopsis: Register pickle support functions.
+**Source code:** :source:`Lib/copyreg.py`
.. index::
module: pickle
module: copy
+--------------
+
The :mod:`copyreg` module offers a way to define functions used while pickling
specific objects. The :mod:`pickle` and :mod:`copy` modules use those functions
when pickling/copying those objects. The module provides configuration
diff --git a/Doc/library/crypt.rst b/Doc/library/crypt.rst
index b4c90cd592..a21c1e7a75 100644
--- a/Doc/library/crypt.rst
+++ b/Doc/library/crypt.rst
@@ -4,15 +4,19 @@
.. module:: crypt
:platform: Unix
:synopsis: The crypt() function used to check Unix passwords.
+
.. moduleauthor:: Steven D. Majewski <sdm7g@virginia.edu>
.. sectionauthor:: Steven D. Majewski <sdm7g@virginia.edu>
.. sectionauthor:: Peter Funk <pf@artcom-gmbh.de>
+**Source code:** :source:`Lib/crypt.py`
.. index::
single: crypt(3)
pair: cipher; DES
+--------------
+
This module implements an interface to the :manpage:`crypt(3)` routine, which is
a one-way hash function based upon a modified DES algorithm; see the Unix man
page for further details. Possible uses include storing hashed passwords
@@ -149,4 +153,4 @@ check it against the original::
hashed = crypt.crypt(plaintext)
if not compare_hash(hashed, crypt.crypt(plaintext, hashed)):
- raise ValueError("hashed version doesn't validate against original")
+ raise ValueError("hashed version doesn't validate against original")
diff --git a/Doc/library/csv.rst b/Doc/library/csv.rst
index e9a9cb5ddb..7fb4fc8256 100644
--- a/Doc/library/csv.rst
+++ b/Doc/library/csv.rst
@@ -3,13 +3,17 @@
.. module:: csv
:synopsis: Write and read tabular data to and from delimited files.
+
.. sectionauthor:: Skip Montanaro <skip@pobox.com>
+**Source code:** :source:`Lib/csv.py`
.. index::
single: csv
pair: data; tabular
+--------------
+
The so-called CSV (Comma Separated Values) format is the most common import and
export format for spreadsheets and databases. CSV format was used for many
years prior to attempts to describe the format in a standardized way in
@@ -418,7 +422,7 @@ Writer Objects
:class:`Writer` objects (:class:`DictWriter` instances and objects returned by
the :func:`writer` function) have the following public methods. A *row* must be
-a sequence of strings or numbers for :class:`Writer` objects and a dictionary
+an iterable of strings or numbers for :class:`Writer` objects and a dictionary
mapping fieldnames to strings or numbers (by passing them through :func:`str`
first) for :class:`DictWriter` objects. Note that complex numbers are written
out surrounded by parens. This may cause some problems for other programs which
@@ -430,6 +434,8 @@ read CSV files (assuming they support complex numbers at all).
Write the *row* parameter to the writer's file object, formatted according to
the current dialect.
+ .. versionchanged:: 3.5
+ Added support of arbitrary iterables.
.. method:: csvwriter.writerows(rows)
diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst
index 630d279174..a675790737 100644
--- a/Doc/library/ctypes.rst
+++ b/Doc/library/ctypes.rst
@@ -3,8 +3,10 @@
.. module:: ctypes
:synopsis: A foreign function library for Python.
+
.. moduleauthor:: Thomas Heller <theller@python.net>
+--------------
:mod:`ctypes` is a foreign function library for Python. It provides C compatible
data types, and allows calling functions in DLLs or shared libraries. It can be
@@ -20,11 +22,10 @@ Note: The code samples in this tutorial use :mod:`doctest` to make sure that
they actually work. Since some code samples behave differently under Linux,
Windows, or Mac OS X, they contain doctest directives in comments.
-Note: Some code samples reference the ctypes :class:`c_int` type. This type is
-an alias for the :class:`c_long` type on 32-bit systems. So, you should not be
-confused if :class:`c_long` is printed if you would expect :class:`c_int` ---
-they are actually the same type.
-
+Note: Some code samples reference the ctypes :class:`c_int` type. On platforms
+where ``sizeof(long) == sizeof(int)`` it is an alias to :class:`c_long`.
+So, you should not be confused if :class:`c_long` is printed if you would expect
+:class:`c_int` --- they are actually the same type.
.. _ctypes-loading-dynamic-link-libraries:
@@ -52,24 +53,30 @@ library containing most standard C functions, and uses the cdecl calling
convention::
>>> from ctypes import *
- >>> print(windll.kernel32) # doctest: +WINDOWS
+ >>> print(windll.kernel32) # doctest: +WINDOWS
<WinDLL 'kernel32', handle ... at ...>
- >>> print(cdll.msvcrt) # doctest: +WINDOWS
+ >>> print(cdll.msvcrt) # doctest: +WINDOWS
<CDLL 'msvcrt', handle ... at ...>
- >>> libc = cdll.msvcrt # doctest: +WINDOWS
+ >>> libc = cdll.msvcrt # doctest: +WINDOWS
>>>
Windows appends the usual ``.dll`` file suffix automatically.
+.. note::
+ Accessing the standard C library through ``cdll.msvcrt`` will use an
+ outdated version of the library that may be incompatible with the one
+ being used by Python. Where possible, use native Python functionality,
+ or else import and use the ``msvcrt`` module.
+
On Linux, it is required to specify the filename *including* the extension to
load a library, so attribute access can not be used to load libraries. Either the
:meth:`LoadLibrary` method of the dll loaders should be used, or you should load
the library by creating an instance of CDLL by calling the constructor::
- >>> cdll.LoadLibrary("libc.so.6") # doctest: +LINUX
+ >>> cdll.LoadLibrary("libc.so.6") # doctest: +LINUX
<CDLL 'libc.so.6', handle ... at ...>
- >>> libc = CDLL("libc.so.6") # doctest: +LINUX
- >>> libc # doctest: +LINUX
+ >>> libc = CDLL("libc.so.6") # doctest: +LINUX
+ >>> libc # doctest: +LINUX
<CDLL 'libc.so.6', handle ... at ...>
>>>
@@ -86,9 +93,9 @@ Functions are accessed as attributes of dll objects::
>>> from ctypes import *
>>> libc.printf
<_FuncPtr object at 0x...>
- >>> print(windll.kernel32.GetModuleHandleA) # doctest: +WINDOWS
+ >>> print(windll.kernel32.GetModuleHandleA) # doctest: +WINDOWS
<_FuncPtr object at 0x...>
- >>> print(windll.kernel32.MyOwnFunction) # doctest: +WINDOWS
+ >>> print(windll.kernel32.MyOwnFunction) # doctest: +WINDOWS
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "ctypes.py", line 239, in __getattr__
@@ -117,16 +124,16 @@ Sometimes, dlls export functions with names which aren't valid Python
identifiers, like ``"??2@YAPAXI@Z"``. In this case you have to use
:func:`getattr` to retrieve the function::
- >>> getattr(cdll.msvcrt, "??2@YAPAXI@Z") # doctest: +WINDOWS
+ >>> getattr(cdll.msvcrt, "??2@YAPAXI@Z") # doctest: +WINDOWS
<_FuncPtr object at 0x...>
>>>
On Windows, some dlls export functions not by name but by ordinal. These
functions can be accessed by indexing the dll object with the ordinal number::
- >>> cdll.kernel32[1] # doctest: +WINDOWS
+ >>> cdll.kernel32[1] # doctest: +WINDOWS
<_FuncPtr object at 0x...>
- >>> cdll.kernel32[0] # doctest: +WINDOWS
+ >>> cdll.kernel32[0] # doctest: +WINDOWS
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "ctypes.py", line 310, in __getitem__
@@ -148,9 +155,9 @@ handle.
This example calls both functions with a NULL pointer (``None`` should be used
as the NULL pointer)::
- >>> print(libc.time(None)) # doctest: +SKIP
+ >>> print(libc.time(None)) # doctest: +SKIP
1150640792
- >>> print(hex(windll.kernel32.GetModuleHandleA(None))) # doctest: +WINDOWS
+ >>> print(hex(windll.kernel32.GetModuleHandleA(None))) # doctest: +WINDOWS
0x1d000000
>>>
@@ -159,11 +166,11 @@ of arguments or the wrong calling convention. Unfortunately this only works on
Windows. It does this by examining the stack after the function returns, so
although an error is raised the function *has* been called::
- >>> windll.kernel32.GetModuleHandleA() # doctest: +WINDOWS
+ >>> windll.kernel32.GetModuleHandleA() # doctest: +WINDOWS
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ValueError: Procedure probably called with not enough arguments (4 bytes missing)
- >>> windll.kernel32.GetModuleHandleA(0, 0) # doctest: +WINDOWS
+ >>> windll.kernel32.GetModuleHandleA(0, 0) # doctest: +WINDOWS
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ValueError: Procedure probably called with too many arguments (4 bytes in excess)
@@ -172,13 +179,13 @@ although an error is raised the function *has* been called::
The same exception is raised when you call an ``stdcall`` function with the
``cdecl`` calling convention, or vice versa::
- >>> cdll.kernel32.GetModuleHandleA(None) # doctest: +WINDOWS
+ >>> cdll.kernel32.GetModuleHandleA(None) # doctest: +WINDOWS
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ValueError: Procedure probably called with not enough arguments (4 bytes missing)
>>>
- >>> windll.msvcrt.printf(b"spam") # doctest: +WINDOWS
+ >>> windll.msvcrt.printf(b"spam") # doctest: +WINDOWS
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ValueError: Procedure probably called with too many arguments (4 bytes in excess)
@@ -191,7 +198,7 @@ On Windows, :mod:`ctypes` uses win32 structured exception handling to prevent
crashes from general protection faults when functions are called with invalid
argument values::
- >>> windll.kernel32.GetModuleHandleA(32) # doctest: +WINDOWS
+ >>> windll.kernel32.GetModuleHandleA(32) # doctest: +WINDOWS
Traceback (most recent call last):
File "<stdin>", line 1, in ?
OSError: exception: access violation reading 0x00000020
@@ -456,9 +463,9 @@ Here is a more advanced example, it uses the ``strchr`` function, which expects
a string pointer and a char, and returns a pointer to a string::
>>> strchr = libc.strchr
- >>> strchr(b"abcdef", ord("d")) # doctest: +SKIP
+ >>> strchr(b"abcdef", ord("d")) # doctest: +SKIP
8059983
- >>> strchr.restype = c_char_p # c_char_p is a pointer to a string
+ >>> strchr.restype = c_char_p # c_char_p is a pointer to a string
>>> strchr(b"abcdef", ord("d"))
b'def'
>>> print(strchr(b"abcdef", ord("x")))
@@ -489,17 +496,17 @@ callable will be called with the *integer* the C function returns, and the
result of this call will be used as the result of your function call. This is
useful to check for error return values and automatically raise an exception::
- >>> GetModuleHandle = windll.kernel32.GetModuleHandleA # doctest: +WINDOWS
+ >>> GetModuleHandle = windll.kernel32.GetModuleHandleA # doctest: +WINDOWS
>>> def ValidHandle(value):
... if value == 0:
... raise WinError()
... return value
...
>>>
- >>> GetModuleHandle.restype = ValidHandle # doctest: +WINDOWS
- >>> GetModuleHandle(None) # doctest: +WINDOWS
+ >>> GetModuleHandle.restype = ValidHandle # doctest: +WINDOWS
+ >>> GetModuleHandle(None) # doctest: +WINDOWS
486539264
- >>> GetModuleHandle("something silly") # doctest: +WINDOWS
+ >>> GetModuleHandle("something silly") # doctest: +WINDOWS
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "<stdin>", line 3, in ValidHandle
@@ -665,17 +672,17 @@ positive integer::
TenPointsArrayType = POINT * 10
-Here is an example of an somewhat artificial data type, a structure containing 4
+Here is an example of a somewhat artificial data type, a structure containing 4
POINTs among other stuff::
>>> from ctypes import *
>>> class POINT(Structure):
- ... _fields_ = ("x", c_int), ("y", c_int)
+ ... _fields_ = ("x", c_int), ("y", c_int)
...
>>> class MyStruct(Structure):
- ... _fields_ = [("a", c_int),
- ... ("b", c_float),
- ... ("point_array", POINT * 4)]
+ ... _fields_ = [("a", c_int),
+ ... ("b", c_float),
+ ... ("point_array", POINT * 4)]
>>>
>>> print(len(MyStruct().point_array))
4
@@ -716,8 +723,8 @@ Pointer instances are created by calling the :func:`pointer` function on a
>>> pi = pointer(i)
>>>
-Pointer instances have a :attr:`contents` attribute which returns the object to
-which the pointer points, the ``i`` object above::
+Pointer instances have a :attr:`~_Pointer.contents` attribute which
+returns the object to which the pointer points, the ``i`` object above::
>>> pi.contents
c_long(42)
@@ -942,7 +949,7 @@ other, and finally follow the pointer chain a few times::
Callback functions
^^^^^^^^^^^^^^^^^^
-:mod:`ctypes` allows to create C callable function pointers from Python callables.
+:mod:`ctypes` allows creating C callable function pointers from Python callables.
These are sometimes called *callback functions*.
First, you must create a class for the callback function. The class knows the
@@ -992,7 +999,7 @@ passed::
The result::
- >>> qsort(ia, len(ia), sizeof(c_int), cmp_func) # doctest: +LINUX
+ >>> qsort(ia, len(ia), sizeof(c_int), cmp_func) # doctest: +LINUX
py_cmp_func 5 1
py_cmp_func 33 99
py_cmp_func 7 33
@@ -1094,14 +1101,15 @@ access violation or whatever, so it's better to break out of the loop when we
hit the NULL entry::
>>> for item in table:
- ... print(item.name, item.size)
- ... if item.name is None:
- ... break
+ ... if item.name is None:
+ ... break
+ ... print(item.name.decode("ascii"), item.size)
...
- __hello__ 104
- __phello__ -104
- __phello__.spam 104
- None 0
+ _frozen_importlib 31764
+ _frozen_importlib_external 41499
+ __hello__ 161
+ __phello__ -161
+ __phello__.spam 161
>>>
The fact that standard Python has a frozen module and a frozen package
@@ -1291,7 +1299,7 @@ module instead of using :func:`find_library` to locate the library at runtime.
Loading shared libraries
^^^^^^^^^^^^^^^^^^^^^^^^
-There are several ways to loaded shared libraries into the Python process. One
+There are several ways to load shared libraries into the Python process. One
way is to instantiate one of the following classes:
@@ -1350,7 +1358,7 @@ details, consult the :manpage:`dlopen(3)` manpage, on Windows, *mode* is
ignored.
The *use_errno* parameter, when set to True, enables a ctypes mechanism that
-allows to access the system :data:`errno` error number in a safe way.
+allows accessing the system :data:`errno` error number in a safe way.
:mod:`ctypes` maintains a thread-local copy of the systems :data:`errno`
variable; if you call foreign functions created with ``use_errno=True`` then the
:data:`errno` value before the function call is swapped with the ctypes private
@@ -1421,7 +1429,7 @@ loader instance.
Class which loads shared libraries. *dlltype* should be one of the
:class:`CDLL`, :class:`PyDLL`, :class:`WinDLL`, or :class:`OleDLL` types.
- :meth:`__getattr__` has special behavior: It allows to load a shared library by
+ :meth:`__getattr__` has special behavior: It allows loading a shared library by
accessing it as attribute of a library loader instance. The result is cached,
so repeated attribute accesses return the same library each time.
@@ -1498,7 +1506,7 @@ They are instances of a private class:
It is possible to assign a callable Python object that is not a ctypes
type, in this case the function is assumed to return a C :c:type:`int`, and
- the callable will be called with this integer, allowing to do further
+ the callable will be called with this integer, allowing further
processing or error checking. Using this is deprecated, for more flexible
post processing or error checking use a ctypes data type as
:attr:`restype` and assign a callable to the :attr:`errcheck` attribute.
@@ -1513,7 +1521,7 @@ They are instances of a private class:
When a foreign function is called, each actual argument is passed to the
:meth:`from_param` class method of the items in the :attr:`argtypes`
- tuple, this method allows to adapt the actual argument to an object that
+ tuple, this method allows adapting the actual argument to an object that
the foreign function accepts. For example, a :class:`c_char_p` item in
the :attr:`argtypes` tuple will convert a string passed as argument into
a bytes object using ctypes conversion rules.
@@ -1521,7 +1529,7 @@ They are instances of a private class:
New: It is now possible to put items in argtypes which are not ctypes
types, but each item must have a :meth:`from_param` method which returns a
value usable as argument (integer, string, ctypes instance). This allows
- to define adapters that can adapt custom objects as function parameters.
+ defining adapters that can adapt custom objects as function parameters.
.. attribute:: errcheck
@@ -1535,12 +1543,12 @@ They are instances of a private class:
*result* is what the foreign function returns, as specified by the
:attr:`restype` attribute.
- *func* is the foreign function object itself, this allows to reuse the
+ *func* is the foreign function object itself, this allows reusing the
same callable object to check or post process the results of several
functions.
*arguments* is a tuple containing the parameters originally passed to
- the function call, this allows to specialize the behavior on the
+ the function call, this allows specializing the behavior on the
arguments used.
The object that this function returns will be returned from the
@@ -1785,7 +1793,7 @@ Utility functions
If a bytes object is specified as first argument, the buffer is made one item
larger than its length so that the last element in the array is a NUL
termination character. An integer can be passed as second argument which allows
- to specify the size of the array if the length of the bytes should not be used.
+ specifying the size of the array if the length of the bytes should not be used.
@@ -1800,21 +1808,21 @@ Utility functions
If a string is specified as first argument, the buffer is made one item
larger than the length of the string so that the last element in the array is a
NUL termination character. An integer can be passed as second argument which
- allows to specify the size of the array if the length of the string should not
+ allows specifying the size of the array if the length of the string should not
be used.
.. function:: DllCanUnloadNow()
- Windows only: This function is a hook which allows to implement in-process
+ Windows only: This function is a hook which allows implementing in-process
COM servers with ctypes. It is called from the DllCanUnloadNow function that
the _ctypes extension dll exports.
.. function:: DllGetClassObject()
- Windows only: This function is a hook which allows to implement in-process
+ Windows only: This function is a hook which allows implementing in-process
COM servers with ctypes. It is called from the DllGetClassObject function
that the ``_ctypes`` extension dll exports.
@@ -1882,7 +1890,7 @@ Utility functions
.. function:: POINTER(type)
This factory function creates and returns a new ctypes pointer type. Pointer
- types are cached an reused internally, so calling this function repeatedly is
+ types are cached and reused internally, so calling this function repeatedly is
cheap. *type* must be a ctypes type.
@@ -2321,7 +2329,7 @@ other data types containing pointer type fields.
checked, only one field can be accessed when names are repeated.
It is possible to define the :attr:`_fields_` class variable *after* the
- class statement that defines the Structure subclass, this allows to create
+ class statement that defines the Structure subclass, this allows creating
data types that directly or indirectly reference themselves::
class List(Structure):
@@ -2342,7 +2350,7 @@ other data types containing pointer type fields.
.. attribute:: _pack_
- An optional small integer that allows to override the alignment of
+ An optional small integer that allows overriding the alignment of
structure fields in the instance. :attr:`_pack_` must already be defined
when :attr:`_fields_` is assigned, otherwise it will have no effect.
@@ -2354,8 +2362,8 @@ other data types containing pointer type fields.
assigned, otherwise it will have no effect.
The fields listed in this variable must be structure or union type fields.
- :mod:`ctypes` will create descriptors in the structure type that allows to
- access the nested fields directly, without the need to create the
+ :mod:`ctypes` will create descriptors in the structure type that allows
+ accessing the nested fields directly, without the need to create the
structure or union field.
Here is an example type (Windows)::
@@ -2401,6 +2409,56 @@ other data types containing pointer type fields.
Arrays and pointers
^^^^^^^^^^^^^^^^^^^
-Not yet written - please see the sections :ref:`ctypes-pointers` and section
-:ref:`ctypes-arrays` in the tutorial.
+.. class:: Array(\*args)
+
+ Abstract base class for arrays.
+
+ The recommended way to create concrete array types is by multiplying any
+ :mod:`ctypes` data type with a positive integer. Alternatively, you can subclass
+ this type and define :attr:`_length_` and :attr:`_type_` class variables.
+ Array elements can be read and written using standard
+ subscript and slice accesses; for slice reads, the resulting object is
+ *not* itself an :class:`Array`.
+
+
+ .. attribute:: _length_
+
+ A positive integer specifying the number of elements in the array.
+ Out-of-range subscripts result in an :exc:`IndexError`. Will be
+ returned by :func:`len`.
+
+
+ .. attribute:: _type_
+
+ Specifies the type of each element in the array.
+
+
+ Array subclass constructors accept positional arguments, used to
+ initialize the elements in order.
+
+
+.. class:: _Pointer
+
+ Private, abstract base class for pointers.
+
+ Concrete pointer types are created by calling :func:`POINTER` with the
+ type that will be pointed to; this is done automatically by
+ :func:`pointer`.
+
+ If a pointer points to an array, its elements can be read and
+ written using standard subscript and slice accesses. Pointer objects
+ have no size, so :func:`len` will raise :exc:`TypeError`. Negative
+ subscripts will read from the memory *before* the pointer (as in C), and
+ out-of-range subscripts will probably crash with an access violation (if
+ you're lucky).
+
+
+ .. attribute:: _type_
+
+ Specifies the type pointed to.
+
+ .. attribute:: contents
+
+ Returns the object to which to pointer points. Assigning to this
+ attribute changes the pointer to point to the assigned object.
diff --git a/Doc/library/curses.ascii.rst b/Doc/library/curses.ascii.rst
index 6bc1fb9ae3..f3661d9bc5 100644
--- a/Doc/library/curses.ascii.rst
+++ b/Doc/library/curses.ascii.rst
@@ -3,9 +3,11 @@
.. module:: curses.ascii
:synopsis: Constants and set-membership functions for ASCII characters.
+
.. moduleauthor:: Eric S. Raymond <esr@thyrsus.com>
.. sectionauthor:: Eric S. Raymond <esr@thyrsus.com>
+--------------
The :mod:`curses.ascii` module supplies name constants for ASCII characters and
functions to test membership in various ASCII character classes. The constants
diff --git a/Doc/library/curses.panel.rst b/Doc/library/curses.panel.rst
index a3c8bda63c..c99c37a565 100644
--- a/Doc/library/curses.panel.rst
+++ b/Doc/library/curses.panel.rst
@@ -3,8 +3,10 @@
.. module:: curses.panel
:synopsis: A panel stack extension that adds depth to curses windows.
+
.. sectionauthor:: A.M. Kuchling <amk@amk.ca>
+--------------
Panels are windows with the added feature of depth, so they can be stacked on
top of each other, and only the visible portions of each window will be
diff --git a/Doc/library/curses.rst b/Doc/library/curses.rst
index f3e60b4be9..b12a325f37 100644
--- a/Doc/library/curses.rst
+++ b/Doc/library/curses.rst
@@ -5,9 +5,12 @@
:synopsis: An interface to the curses library, providing portable
terminal handling.
:platform: Unix
+
.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
.. sectionauthor:: Eric Raymond <esr@thyrsus.com>
+--------------
+
The :mod:`curses` module provides an interface to the curses library, the
de-facto standard for portable advanced terminal handling.
@@ -599,6 +602,13 @@ The module :mod:`curses` defines the following functions:
Only one *ch* can be pushed before :meth:`getch` is called.
+.. function:: update_lines_cols()
+
+ Update :envvar:`LINES` and :envvar:`COLS`. Useful for detecting manual screen resize.
+
+ .. versionadded:: 3.5
+
+
.. function:: unget_wch(ch)
Push *ch* so the next :meth:`get_wch` will return it.
@@ -1501,9 +1511,9 @@ keys); also, the following keypad mappings are standard:
+------------------+-----------+
| :kbd:`End` | KEY_END |
+------------------+-----------+
-| :kbd:`Page Up` | KEY_NPAGE |
+| :kbd:`Page Up` | KEY_PPAGE |
+------------------+-----------+
-| :kbd:`Page Down` | KEY_PPAGE |
+| :kbd:`Page Down` | KEY_NPAGE |
+------------------+-----------+
The following table lists characters from the alternate character set. These are
diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst
index 88f3f6eea7..9254ae8cfa 100644
--- a/Doc/library/datetime.rst
+++ b/Doc/library/datetime.rst
@@ -3,10 +3,15 @@
.. module:: datetime
:synopsis: Basic date and time types.
+
.. moduleauthor:: Tim Peters <tim@zope.com>
.. sectionauthor:: Tim Peters <tim@zope.com>
.. sectionauthor:: A.M. Kuchling <amk@amk.ca>
+**Source code:** :source:`Lib/datetime.py`
+
+--------------
+
.. XXX what order should the types be discussed in?
The :mod:`datetime` module supplies classes for manipulating dates and times in
@@ -31,7 +36,7 @@ particular number represents metres, miles, or mass. Naive objects are easy to
understand and to work with, at the cost of ignoring some aspects of reality.
For applications requiring aware objects, :class:`.datetime` and :class:`.time`
-objects have an optional time zone information attribute, :attr:`tzinfo`, that
+objects have an optional time zone information attribute, :attr:`!tzinfo`, that
can be set to an instance of a subclass of the abstract :class:`tzinfo` class.
These :class:`tzinfo` objects capture information about the offset from UTC
time, the time zone name, and whether Daylight Saving Time is in effect. Note
@@ -83,7 +88,7 @@ Available Types
An idealized time, independent of any particular day, assuming that every day
has exactly 24\*60\*60 seconds (there is no notion of "leap seconds" here).
Attributes: :attr:`hour`, :attr:`minute`, :attr:`second`, :attr:`microsecond`,
- and :attr:`tzinfo`.
+ and :attr:`.tzinfo`.
.. class:: datetime
@@ -91,7 +96,7 @@ Available Types
A combination of a date and a time. Attributes: :attr:`year`, :attr:`month`,
:attr:`day`, :attr:`hour`, :attr:`minute`, :attr:`second`, :attr:`microsecond`,
- and :attr:`tzinfo`.
+ and :attr:`.tzinfo`.
.. class:: timedelta
@@ -102,6 +107,7 @@ Available Types
.. class:: tzinfo
+ :noindex:
An abstract base class for time zone information objects. These are used by the
:class:`.datetime` and :class:`.time` classes to provide a customizable notion of
@@ -109,6 +115,7 @@ Available Types
time).
.. class:: timezone
+ :noindex:
A class that implements the :class:`tzinfo` abstract base class as a
fixed offset from the UTC.
@@ -558,7 +565,7 @@ Instance methods:
Return a 3-tuple, (ISO year, ISO week number, ISO weekday).
The ISO calendar is a widely used variant of the Gregorian calendar. See
- http://www.staff.science.uu.nl/~gent0113/calendar/isocalendar.htm for a good
+ https://www.staff.science.uu.nl/~gent0113/calendar/isocalendar.htm for a good
explanation.
The ISO year consists of 52 or 53 full weeks, and where a week starts on a
@@ -602,7 +609,7 @@ Instance methods:
.. method:: date.__format__(format)
- Same as :meth:`.date.strftime`. This makes it possible to specify format
+ Same as :meth:`.date.strftime`. This makes it possible to specify a format
string for a :class:`.date` object when using :meth:`str.format`. For a
complete list of formatting directives, see
:ref:`strftime-strptime-behavior`.
@@ -695,7 +702,7 @@ Other constructors, all class methods:
.. classmethod:: datetime.today()
- Return the current local datetime, with :attr:`tzinfo` ``None``. This is
+ Return the current local datetime, with :attr:`.tzinfo` ``None``. This is
equivalent to ``datetime.fromtimestamp(time.time())``. See also :meth:`now`,
:meth:`fromtimestamp`.
@@ -708,15 +715,15 @@ Other constructors, all class methods:
(for example, this may be possible on platforms supplying the C
:c:func:`gettimeofday` function).
- Else *tz* must be an instance of a class :class:`tzinfo` subclass, and the
- current date and time are converted to *tz*'s time zone. In this case the
+ If *tz* is not ``None``, it must be an instance of a :class:`tzinfo` subclass, and the
+ current date and time are converted to *tz*’s time zone. In this case the
result is equivalent to ``tz.fromutc(datetime.utcnow().replace(tzinfo=tz))``.
See also :meth:`today`, :meth:`utcnow`.
.. classmethod:: datetime.utcnow()
- Return the current UTC date and time, with :attr:`tzinfo` ``None``. This is like
+ Return the current UTC date and time, with :attr:`.tzinfo` ``None``. This is like
:meth:`now`, but returns the current UTC date and time, as a naive
:class:`.datetime` object. An aware current UTC datetime can be obtained by
calling ``datetime.now(timezone.utc)``. See also :meth:`now`.
@@ -728,8 +735,8 @@ Other constructors, all class methods:
specified, the timestamp is converted to the platform's local date and time, and
the returned :class:`.datetime` object is naive.
- Else *tz* must be an instance of a class :class:`tzinfo` subclass, and the
- timestamp is converted to *tz*'s time zone. In this case the result is
+ If *tz* is not ``None``, it must be an instance of a :class:`tzinfo` subclass, and the
+ timestamp is converted to *tz*’s time zone. In this case the result is
equivalent to
``tz.fromutc(datetime.utcfromtimestamp(timestamp).replace(tzinfo=tz))``.
@@ -754,16 +761,22 @@ Other constructors, all class methods:
.. classmethod:: datetime.utcfromtimestamp(timestamp)
Return the UTC :class:`.datetime` corresponding to the POSIX timestamp, with
- :attr:`tzinfo` ``None``. This may raise :exc:`OverflowError`, if the timestamp is
+ :attr:`.tzinfo` ``None``. This may raise :exc:`OverflowError`, if the timestamp is
out of the range of values supported by the platform C :c:func:`gmtime` function,
and :exc:`OSError` on :c:func:`gmtime` failure.
- It's common for this to be restricted to years in 1970 through 2038. See also
- :meth:`fromtimestamp`.
+ It's common for this to be restricted to years in 1970 through 2038.
+
+ To get an aware :class:`.datetime` object, call :meth:`fromtimestamp`::
+
+ datetime.fromtimestamp(timestamp, timezone.utc)
- On the POSIX compliant platforms, ``utcfromtimestamp(timestamp)``
- is equivalent to the following expression::
+ On the POSIX compliant platforms, it is equivalent to the following
+ expression::
- datetime(1970, 1, 1) + timedelta(seconds=timestamp)
+ datetime(1970, 1, 1, tzinfo=timezone.utc) + timedelta(seconds=timestamp)
+
+ except the latter formula always supports the full years range: between
+ :const:`MINYEAR` and :const:`MAXYEAR` inclusive.
.. versionchanged:: 3.3
Raise :exc:`OverflowError` instead of :exc:`ValueError` if the timestamp
@@ -777,17 +790,17 @@ Other constructors, all class methods:
Return the :class:`.datetime` corresponding to the proleptic Gregorian ordinal,
where January 1 of year 1 has ordinal 1. :exc:`ValueError` is raised unless ``1
<= ordinal <= datetime.max.toordinal()``. The hour, minute, second and
- microsecond of the result are all 0, and :attr:`tzinfo` is ``None``.
+ microsecond of the result are all 0, and :attr:`.tzinfo` is ``None``.
.. classmethod:: datetime.combine(date, time)
Return a new :class:`.datetime` object whose date components are equal to the
- given :class:`date` object's, and whose time components and :attr:`tzinfo`
+ given :class:`date` object's, and whose time components and :attr:`.tzinfo`
attributes are equal to the given :class:`.time` object's. For any
:class:`.datetime` object *d*,
``d == datetime.combine(d.date(), d.timetz())``. If date is a
- :class:`.datetime` object, its time components and :attr:`tzinfo` attributes
+ :class:`.datetime` object, its time components and :attr:`.tzinfo` attributes
are ignored.
@@ -883,7 +896,7 @@ Supported operations:
(1)
datetime2 is a duration of timedelta removed from datetime1, moving forward in
time if ``timedelta.days`` > 0, or backward if ``timedelta.days`` < 0. The
- result has the same :attr:`tzinfo` attribute as the input datetime, and
+ result has the same :attr:`~.datetime.tzinfo` attribute as the input datetime, and
datetime2 - datetime1 == timedelta after. :exc:`OverflowError` is raised if
datetime2.year would be smaller than :const:`MINYEAR` or larger than
:const:`MAXYEAR`. Note that no time zone adjustments are done even if the
@@ -891,7 +904,7 @@ Supported operations:
(2)
Computes the datetime2 such that datetime2 + timedelta == datetime1. As for
- addition, the result has the same :attr:`tzinfo` attribute as the input
+ addition, the result has the same :attr:`~.datetime.tzinfo` attribute as the input
datetime, and no time zone adjustments are done even if the input is aware.
This isn't quite equivalent to datetime1 + (-timedelta), because -timedelta
in isolation can overflow in cases where datetime1 - timedelta does not.
@@ -901,12 +914,12 @@ Supported operations:
both operands are naive, or if both are aware. If one is aware and the other is
naive, :exc:`TypeError` is raised.
- If both are naive, or both are aware and have the same :attr:`tzinfo` attribute,
- the :attr:`tzinfo` attributes are ignored, and the result is a :class:`timedelta`
+ If both are naive, or both are aware and have the same :attr:`~.datetime.tzinfo` attribute,
+ the :attr:`~.datetime.tzinfo` attributes are ignored, and the result is a :class:`timedelta`
object *t* such that ``datetime2 + t == datetime1``. No time zone adjustments
are done in this case.
- If both are aware and have different :attr:`tzinfo` attributes, ``a-b`` acts
+ If both are aware and have different :attr:`~.datetime.tzinfo` attributes, ``a-b`` acts
as if *a* and *b* were first converted to naive UTC datetimes first. The
result is ``(a.replace(tzinfo=None) - a.utcoffset()) - (b.replace(tzinfo=None)
- b.utcoffset())`` except that the implementation never overflows.
@@ -919,14 +932,14 @@ Supported operations:
is raised if an order comparison is attempted. For equality
comparisons, naive instances are never equal to aware instances.
- If both comparands are aware, and have the same :attr:`tzinfo` attribute, the
- common :attr:`tzinfo` attribute is ignored and the base datetimes are
- compared. If both comparands are aware and have different :attr:`tzinfo`
+ If both comparands are aware, and have the same :attr:`~.datetime.tzinfo` attribute, the
+ common :attr:`~.datetime.tzinfo` attribute is ignored and the base datetimes are
+ compared. If both comparands are aware and have different :attr:`~.datetime.tzinfo`
attributes, the comparands are first adjusted by subtracting their UTC
offsets (obtained from ``self.utcoffset()``).
.. versionchanged:: 3.3
- Equality comparisons between naive and aware :class:`datetime`
+ Equality comparisons between naive and aware :class:`.datetime`
instances don't raise :exc:`TypeError`.
.. note::
@@ -954,7 +967,7 @@ Instance methods:
.. method:: datetime.time()
Return :class:`.time` object with same hour, minute, second and microsecond.
- :attr:`tzinfo` is ``None``. See also method :meth:`timetz`.
+ :attr:`.tzinfo` is ``None``. See also method :meth:`timetz`.
.. method:: datetime.timetz()
@@ -973,7 +986,7 @@ Instance methods:
.. method:: datetime.astimezone(tz=None)
- Return a :class:`datetime` object with new :attr:`tzinfo` attribute *tz*,
+ Return a :class:`.datetime` object with new :attr:`.tzinfo` attribute *tz*,
adjusting the date and time data so the result is the same UTC time as
*self*, but in *tz*'s local time.
@@ -983,7 +996,7 @@ Instance methods:
not return ``None``).
If called without arguments (or with ``tz=None``) the system local
- timezone is assumed. The ``tzinfo`` attribute of the converted
+ timezone is assumed. The ``.tzinfo`` attribute of the converted
datetime instance will be set to an instance of :class:`timezone`
with the zone name and offset obtained from the OS.
@@ -1019,7 +1032,7 @@ Instance methods:
.. method:: datetime.utcoffset()
- If :attr:`tzinfo` is ``None``, returns ``None``, else returns
+ If :attr:`.tzinfo` is ``None``, returns ``None``, else returns
``self.tzinfo.utcoffset(self)``, and raises an exception if the latter doesn't
return ``None``, or a :class:`timedelta` object representing a whole number of
minutes with magnitude less than one day.
@@ -1027,7 +1040,7 @@ Instance methods:
.. method:: datetime.dst()
- If :attr:`tzinfo` is ``None``, returns ``None``, else returns
+ If :attr:`.tzinfo` is ``None``, returns ``None``, else returns
``self.tzinfo.dst(self)``, and raises an exception if the latter doesn't return
``None``, or a :class:`timedelta` object representing a whole number of minutes
with magnitude less than one day.
@@ -1035,7 +1048,7 @@ Instance methods:
.. method:: datetime.tzname()
- If :attr:`tzinfo` is ``None``, returns ``None``, else returns
+ If :attr:`.tzinfo` is ``None``, returns ``None``, else returns
``self.tzinfo.tzname(self)``, raises an exception if the latter doesn't return
``None`` or a string object,
@@ -1047,7 +1060,7 @@ Instance methods:
d.hour, d.minute, d.second, d.weekday(), yday, dst))``, where ``yday =
d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` is the day number within
the current year starting with ``1`` for January 1st. The :attr:`tm_isdst` flag
- of the result is set according to the :meth:`dst` method: :attr:`tzinfo` is
+ of the result is set according to the :meth:`dst` method: :attr:`.tzinfo` is
``None`` or :meth:`dst` returns ``None``, :attr:`tm_isdst` is set to ``-1``;
else if :meth:`dst` returns a non-zero value, :attr:`tm_isdst` is set to ``1``;
else :attr:`tm_isdst` is set to ``0``.
@@ -1074,18 +1087,18 @@ Instance methods:
.. method:: datetime.timestamp()
- Return POSIX timestamp corresponding to the :class:`datetime`
+ Return POSIX timestamp corresponding to the :class:`.datetime`
instance. The return value is a :class:`float` similar to that
returned by :func:`time.time`.
- Naive :class:`datetime` instances are assumed to represent local
+ Naive :class:`.datetime` instances are assumed to represent local
time and this method relies on the platform C :c:func:`mktime`
- function to perform the conversion. Since :class:`datetime`
+ function to perform the conversion. Since :class:`.datetime`
supports wider range of values than :c:func:`mktime` on many
platforms, this method may raise :exc:`OverflowError` for times far
in the past or far in the future.
- For aware :class:`datetime` instances, the return value is computed
+ For aware :class:`.datetime` instances, the return value is computed
as::
(dt - datetime(1970, 1, 1, tzinfo=timezone.utc)).total_seconds()
@@ -1095,7 +1108,7 @@ Instance methods:
.. note::
There is no method to obtain the POSIX timestamp directly from a
- naive :class:`datetime` instance representing UTC time. If your
+ naive :class:`.datetime` instance representing UTC time. If your
application uses this convention and your system timezone is not
set to UTC, you can obtain the POSIX timestamp by supplying
``tzinfo=timezone.utc``::
@@ -1171,7 +1184,7 @@ Instance methods:
.. method:: datetime.__format__(format)
- Same as :meth:`.datetime.strftime`. This makes it possible to specify format
+ Same as :meth:`.datetime.strftime`. This makes it possible to specify a format
string for a :class:`.datetime` object when using :meth:`str.format`. For a
complete list of formatting directives, see
:ref:`strftime-strptime-behavior`.
@@ -1359,9 +1372,9 @@ Supported operations:
comparisons, naive instances are never equal to aware instances.
If both comparands are aware, and have
- the same :attr:`tzinfo` attribute, the common :attr:`tzinfo` attribute is
+ the same :attr:`~time.tzinfo` attribute, the common :attr:`~time.tzinfo` attribute is
ignored and the base times are compared. If both comparands are aware and
- have different :attr:`tzinfo` attributes, the comparands are first adjusted by
+ have different :attr:`~time.tzinfo` attributes, the comparands are first adjusted by
subtracting their UTC offsets (obtained from ``self.utcoffset()``). In order
to stop mixed-type comparisons from falling back to the default comparison by
object address, when a :class:`.time` object is compared to an object of a
@@ -1376,10 +1389,13 @@ Supported operations:
* efficient pickling
-* in Boolean contexts, a :class:`.time` object is considered to be true if and
- only if, after converting it to minutes and subtracting :meth:`utcoffset` (or
- ``0`` if that's ``None``), the result is non-zero.
+In boolean contexts, a :class:`.time` object is always considered to be true.
+.. versionchanged:: 3.5
+ Before Python 3.5, a :class:`.time` object was considered to be false if it
+ represented midnight in UTC. This behavior was considered obscure and
+ error-prone and has been removed in Python 3.5. See :issue:`13936` for full
+ details.
Instance methods:
@@ -1413,7 +1429,7 @@ Instance methods:
.. method:: time.__format__(format)
- Same as :meth:`.time.strftime`. This makes it possible to specify format string
+ Same as :meth:`.time.strftime`. This makes it possible to specify a format string
for a :class:`.time` object when using :meth:`str.format`. For a
complete list of formatting directives, see
:ref:`strftime-strptime-behavior`.
@@ -1421,7 +1437,7 @@ Instance methods:
.. method:: time.utcoffset()
- If :attr:`tzinfo` is ``None``, returns ``None``, else returns
+ If :attr:`.tzinfo` is ``None``, returns ``None``, else returns
``self.tzinfo.utcoffset(None)``, and raises an exception if the latter doesn't
return ``None`` or a :class:`timedelta` object representing a whole number of
minutes with magnitude less than one day.
@@ -1429,7 +1445,7 @@ Instance methods:
.. method:: time.dst()
- If :attr:`tzinfo` is ``None``, returns ``None``, else returns
+ If :attr:`.tzinfo` is ``None``, returns ``None``, else returns
``self.tzinfo.dst(None)``, and raises an exception if the latter doesn't return
``None``, or a :class:`timedelta` object representing a whole number of minutes
with magnitude less than one day.
@@ -1437,7 +1453,7 @@ Instance methods:
.. method:: time.tzname()
- If :attr:`tzinfo` is ``None``, returns ``None``, else returns
+ If :attr:`.tzinfo` is ``None``, returns ``None``, else returns
``self.tzinfo.tzname(None)``, or raises an exception if the latter doesn't
return ``None`` or a string object.
@@ -1474,28 +1490,30 @@ Example:
:class:`tzinfo` Objects
-----------------------
-:class:`tzinfo` is an abstract base class, meaning that this class should not be
-instantiated directly. You need to derive a concrete subclass, and (at least)
-supply implementations of the standard :class:`tzinfo` methods needed by the
-:class:`.datetime` methods you use. The :mod:`datetime` module supplies
-a simple concrete subclass of :class:`tzinfo` :class:`timezone` which can represent
-timezones with fixed offset from UTC such as UTC itself or North American EST and
-EDT.
+.. class:: tzinfo()
+
+ This is an abstract base class, meaning that this class should not be
+ instantiated directly. You need to derive a concrete subclass, and (at least)
+ supply implementations of the standard :class:`tzinfo` methods needed by the
+ :class:`.datetime` methods you use. The :mod:`datetime` module supplies
+ a simple concrete subclass of :class:`tzinfo`, :class:`timezone`, which can represent
+ timezones with fixed offset from UTC such as UTC itself or North American EST and
+ EDT.
-An instance of (a concrete subclass of) :class:`tzinfo` can be passed to the
-constructors for :class:`.datetime` and :class:`.time` objects. The latter objects
-view their attributes as being in local time, and the :class:`tzinfo` object
-supports methods revealing offset of local time from UTC, the name of the time
-zone, and DST offset, all relative to a date or time object passed to them.
+ An instance of (a concrete subclass of) :class:`tzinfo` can be passed to the
+ constructors for :class:`.datetime` and :class:`.time` objects. The latter objects
+ view their attributes as being in local time, and the :class:`tzinfo` object
+ supports methods revealing offset of local time from UTC, the name of the time
+ zone, and DST offset, all relative to a date or time object passed to them.
-Special requirement for pickling: A :class:`tzinfo` subclass must have an
-:meth:`__init__` method that can be called with no arguments, else it can be
-pickled but possibly not unpickled again. This is a technical requirement that
-may be relaxed in the future.
+ Special requirement for pickling: A :class:`tzinfo` subclass must have an
+ :meth:`__init__` method that can be called with no arguments, else it can be
+ pickled but possibly not unpickled again. This is a technical requirement that
+ may be relaxed in the future.
-A concrete subclass of :class:`tzinfo` may need to implement the following
-methods. Exactly which methods are needed depends on the uses made of aware
-:mod:`datetime` objects. If in doubt, simply implement all of them.
+ A concrete subclass of :class:`tzinfo` may need to implement the following
+ methods. Exactly which methods are needed depends on the uses made of aware
+ :mod:`datetime` objects. If in doubt, simply implement all of them.
.. method:: tzinfo.utcoffset(dt)
@@ -1528,7 +1546,7 @@ methods. Exactly which methods are needed depends on the uses made of aware
(see :meth:`utcoffset` for details). Note that DST offset, if applicable, has
already been added to the UTC offset returned by :meth:`utcoffset`, so there's
no need to consult :meth:`dst` unless you're interested in obtaining DST info
- separately. For example, :meth:`datetime.timetuple` calls its :attr:`tzinfo`
+ separately. For example, :meth:`datetime.timetuple` calls its :attr:`~.datetime.tzinfo`
attribute's :meth:`dst` method to determine how the :attr:`tm_isdst` flag
should be set, and :meth:`tzinfo.fromutc` calls :meth:`dst` to account for
DST changes when crossing time zones.
@@ -1693,7 +1711,7 @@ only EST (fixed offset -5 hours), or only EDT (fixed offset -4 hours)).
*pytz* library brings the *IANA timezone database* (also known as the
Olson database) to Python and its usage is recommended.
- `IANA timezone database <http://www.iana.org/time-zones>`_
+ `IANA timezone database <https://www.iana.org/time-zones>`_
The Time Zone Database (often called tz or zoneinfo) contains code and
data that represent the history of local time for many representative
locations around the globe. It is updated periodically to reflect changes
@@ -1854,7 +1872,7 @@ format codes.
+-----------+--------------------------------+------------------------+-------+
| ``%z`` | UTC offset in the form +HHMM | (empty), +0000, -0400, | \(6) |
| | or -HHMM (empty string if the | +1030 | |
-| | the object is naive). | | |
+| | object is naive). | | |
+-----------+--------------------------------+------------------------+-------+
| ``%Z`` | Time zone name (empty string | (empty), UTC, EST, CST | |
| | if the object is naive). | | |
diff --git a/Doc/library/dbm.rst b/Doc/library/dbm.rst
index e6a82d67ce..6f64196a8a 100644
--- a/Doc/library/dbm.rst
+++ b/Doc/library/dbm.rst
@@ -4,10 +4,14 @@
.. module:: dbm
:synopsis: Interfaces to various Unix "database" formats.
+**Source code:** :source:`Lib/dbm/__init__.py`
+
+--------------
+
:mod:`dbm` is a generic interface to variants of the DBM database ---
:mod:`dbm.gnu` or :mod:`dbm.ndbm`. If none of these modules is installed, the
slow-but-simple implementation in module :mod:`dbm.dumb` will be used. There
-is a `third party interface <http://www.jcea.es/programacion/pybsddb.htm>`_ to
+is a `third party interface <https://www.jcea.es/programacion/pybsddb.htm>`_ to
the Oracle Berkeley DB.
@@ -325,13 +329,18 @@ The module defines the following:
dumbdbm database is created, files with :file:`.dat` and :file:`.dir` extensions
are created.
- The optional *flag* argument is currently ignored; the database is always opened
- for update, and will be created if it does not exist.
+ The optional *flag* argument supports only the semantics of ``'c'``
+ and ``'n'`` values. Other values will default to database being always
+ opened for update, and will be created if it does not exist.
The optional *mode* argument is the Unix mode of the file, used only when the
database has to be created. It defaults to octal ``0o666`` (and will be modified
by the prevailing umask).
+ .. versionchanged:: 3.5
+ :func:`.open` always creates a new database when the flag has the value
+ ``'n'``.
+
In addition to the methods provided by the
:class:`collections.abc.MutableMapping` class, :class:`dumbdbm` objects
provide the following methods:
diff --git a/Doc/library/decimal.rst b/Doc/library/decimal.rst
index ca41c3a824..528f97b1ab 100644
--- a/Doc/library/decimal.rst
+++ b/Doc/library/decimal.rst
@@ -12,6 +12,8 @@
.. moduleauthor:: Stefan Krah <skrah at bytereef.org>
.. sectionauthor:: Raymond D. Hettinger <python at rcn.com>
+**Source code:** :source:`Lib/decimal.py`
+
.. import modules for testing inline doctests with the Sphinx doctest builder
.. testsetup:: *
@@ -21,6 +23,8 @@
# make sure each group gets a fresh context
setcontext(Context())
+--------------
+
The :mod:`decimal` module provides support for fast correctly-rounded
decimal floating point arithmetic. It offers several advantages over the
:class:`float` datatype:
@@ -107,9 +111,6 @@ reset them before monitoring a calculation.
* IBM's General Decimal Arithmetic Specification, `The General Decimal Arithmetic
Specification <http://speleotrove.com/decimal/decarith.html>`_.
- * IEEE standard 854-1987, `Unofficial IEEE 854 Text
- <http://754r.ucbtest.org/standards/854.pdf>`_.
-
.. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -742,7 +743,7 @@ Decimal objects
* ``"NaN"``, indicating that the operand is a quiet NaN (Not a Number).
* ``"sNaN"``, indicating that the operand is a signaling NaN.
- .. method:: quantize(exp, rounding=None, context=None, watchexp=True)
+ .. method:: quantize(exp, rounding=None, context=None)
Return a value equal to the first operand after rounding and having the
exponent of the second operand.
@@ -765,14 +766,8 @@ Decimal objects
``context`` argument; if neither argument is given the rounding mode of
the current thread's context is used.
- If *watchexp* is set (default), then an error is returned whenever the
- resulting exponent is greater than :attr:`Emax` or less than
- :attr:`Etiny`.
-
- .. deprecated:: 3.3
- *watchexp* is an implementation detail from the pure Python version
- and is not present in the C version. It will be removed in version
- 3.4, where it defaults to ``True``.
+ An error is returned whenever the resulting exponent is greater than
+ :attr:`Emax` or less than :attr:`Etiny`.
.. method:: radix()
@@ -2092,4 +2087,3 @@ Alternatively, inputs can be rounded upon creation using the
>>> Context(prec=5, rounding=ROUND_DOWN).create_decimal('1.2345678')
Decimal('1.2345')
-
diff --git a/Doc/library/development.rst b/Doc/library/development.rst
index 06e7048a04..d2b5fa2aa4 100644
--- a/Doc/library/development.rst
+++ b/Doc/library/development.rst
@@ -16,6 +16,7 @@ The list of modules described in this chapter is:
.. toctree::
+ typing.rst
pydoc.rst
doctest.rst
unittest.rst
diff --git a/Doc/library/difflib.rst b/Doc/library/difflib.rst
index cead818adf..59a6478d8d 100644
--- a/Doc/library/difflib.rst
+++ b/Doc/library/difflib.rst
@@ -3,15 +3,20 @@
.. module:: difflib
:synopsis: Helpers for computing differences between objects.
+
.. moduleauthor:: Tim Peters <tim_one@users.sourceforge.net>
.. sectionauthor:: Tim Peters <tim_one@users.sourceforge.net>
.. Markup by Fred L. Drake, Jr. <fdrake@acm.org>
+**Source code:** :source:`Lib/difflib.py`
+
.. testsetup::
import sys
from difflib import *
+--------------
+
This module provides classes and functions for comparing sequences. It
can be used for example, for comparing files, and can produce difference
information in various formats, including HTML and context and unified
@@ -25,7 +30,9 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
little fancier than, an algorithm published in the late 1980's by Ratcliff and
Obershelp under the hyperbolic name "gestalt pattern matching." The idea is to
find the longest contiguous matching subsequence that contains no "junk"
- elements (the Ratcliff and Obershelp algorithm doesn't address junk). The same
+ elements; these "junk" elements are ones that are uninteresting in some
+ sense, such as blank lines or whitespace. (Handling junk is an
+ extension to the Ratcliff and Obershelp algorithm.) The same
idea is then applied recursively to the pieces of the sequences to the left and
to the right of the matching subsequence. This does not yield minimal edit
sequences, but does tend to yield matches that "look right" to people.
@@ -100,7 +107,8 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
The following methods are public:
- .. method:: make_file(fromlines, tolines, fromdesc='', todesc='', context=False, numlines=5)
+ .. method:: make_file(fromlines, tolines, fromdesc='', todesc='', context=False, \
+ numlines=5, *, charset='utf-8')
Compares *fromlines* and *tolines* (lists of strings) and returns a string which
is a complete HTML file containing a table showing line by line differences with
@@ -119,6 +127,10 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
the next difference highlight at the top of the browser without any leading
context).
+ .. versionchanged:: 3.5
+ *charset* keyword-only argument was added. The default charset of
+ HTML document changed from ``'ISO-8859-1'`` to ``'utf-8'``.
+
.. method:: make_table(fromlines, tolines, fromdesc='', todesc='', context=False, numlines=5)
Compares *fromlines* and *tolines* (lists of strings) and returns a string which
@@ -208,7 +220,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
Compare *a* and *b* (lists of strings); return a :class:`Differ`\ -style
delta (a :term:`generator` generating the delta lines).
- Optional keyword parameters *linejunk* and *charjunk* are for filter functions
+ Optional keyword parameters *linejunk* and *charjunk* are filtering functions
(or ``None``):
*linejunk*: A function that accepts a single string argument, and returns
@@ -222,7 +234,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
*charjunk*: A function that accepts a character (a string of length 1), and
returns if the character is junk, or false if not. The default is module-level
function :func:`IS_CHARACTER_JUNK`, which filters out whitespace characters (a
- blank or tab; note: bad idea to include newline in this!).
+ blank or tab; it's a bad idea to include newline in this!).
:file:`Tools/scripts/ndiff.py` is a command-line front-end to this function.
@@ -306,6 +318,21 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
See :ref:`difflib-interface` for a more detailed example.
+.. function:: diff_bytes(dfunc, a, b, fromfile=b'', tofile=b'', fromfiledate=b'', tofiledate=b'', n=3, lineterm=b'\\n')
+
+ Compare *a* and *b* (lists of bytes objects) using *dfunc*; yield a
+ sequence of delta lines (also bytes) in the format returned by *dfunc*.
+ *dfunc* must be a callable, typically either :func:`unified_diff` or
+ :func:`context_diff`.
+
+ Allows you to compare data with unknown or inconsistent encoding. All
+ inputs except *n* must be bytes objects, not str. Works by losslessly
+ converting all inputs (except *n*) to str, and calling ``dfunc(a, b,
+ fromfile, tofile, fromfiledate, tofiledate, n, lineterm)``. The output of
+ *dfunc* is then converted back to bytes, so the delta lines that you
+ receive have the same unknown/inconsistent encodings as *a* and *b*.
+
+ .. versionadded:: 3.5
.. function:: IS_LINE_JUNK(line)
@@ -477,16 +504,14 @@ The :class:`SequenceMatcher` class has this constructor:
| | are equal). |
+---------------+---------------------------------------------+
- For example:
+ For example::
>>> a = "qabxcd"
>>> b = "abycdf"
>>> s = SequenceMatcher(None, a, b)
>>> for tag, i1, i2, j1, j2 in s.get_opcodes():
- print('{:7} a[{}:{}] --> b[{}:{}] {!r:>8} --> {!r}'.format(
- tag, i1, i2, j1, j2, a[i1:i2], b[j1:j2]))
-
-
+ ... print('{:7} a[{}:{}] --> b[{}:{}] {!r:>8} --> {!r}'.format(
+ ... tag, i1, i2, j1, j2, a[i1:i2], b[j1:j2]))
delete a[0:1] --> b[0:0] 'q' --> ''
equal a[1:3] --> b[0:2] 'ab' --> 'ab'
replace a[3:4] --> b[2:3] 'x' --> 'y'
@@ -591,7 +616,7 @@ If you want to know how to change the first sequence into the second, use
work.
* `Simple version control recipe
- <http://code.activestate.com/recipes/576729/>`_ for a small application
+ <https://code.activestate.com/recipes/576729/>`_ for a small application
built with :class:`SequenceMatcher`.
@@ -622,6 +647,12 @@ The :class:`Differ` class has this constructor:
length 1), and returns true if the character is junk. The default is ``None``,
meaning that no character is considered junk.
+ These junk-filtering functions speed up matching to find
+ differences and do not cause any differing lines or characters to
+ be ignored. Read the description of the
+ :meth:`~SequenceMatcher.find_longest_match` method's *isjunk*
+ parameter for an explanation.
+
:class:`Differ` objects are used (deltas generated) via a single method:
@@ -713,65 +744,4 @@ This example shows how to use difflib to create a ``diff``-like utility.
It is also contained in the Python source distribution, as
:file:`Tools/scripts/diff.py`.
-.. testcode::
-
- """ Command line interface to difflib.py providing diffs in four formats:
-
- * ndiff: lists every line and highlights interline changes.
- * context: highlights clusters of changes in a before/after format.
- * unified: highlights clusters of changes in an inline format.
- * html: generates side by side comparison with change highlights.
-
- """
-
- import sys, os, time, difflib, optparse
-
- def main():
- # Configure the option parser
- usage = "usage: %prog [options] fromfile tofile"
- parser = optparse.OptionParser(usage)
- parser.add_option("-c", action="store_true", default=False,
- help='Produce a context format diff (default)')
- parser.add_option("-u", action="store_true", default=False,
- help='Produce a unified format diff')
- hlp = 'Produce HTML side by side diff (can use -c and -l in conjunction)'
- parser.add_option("-m", action="store_true", default=False, help=hlp)
- parser.add_option("-n", action="store_true", default=False,
- help='Produce a ndiff format diff')
- parser.add_option("-l", "--lines", type="int", default=3,
- help='Set number of context lines (default 3)')
- (options, args) = parser.parse_args()
-
- if len(args) == 0:
- parser.print_help()
- sys.exit(1)
- if len(args) != 2:
- parser.error("need to specify both a fromfile and tofile")
-
- n = options.lines
- fromfile, tofile = args # as specified in the usage string
-
- # we're passing these as arguments to the diff function
- fromdate = time.ctime(os.stat(fromfile).st_mtime)
- todate = time.ctime(os.stat(tofile).st_mtime)
- with open(fromfile) as fromf, open(tofile) as tof:
- fromlines, tolines = list(fromf), list(tof)
-
- if options.u:
- diff = difflib.unified_diff(fromlines, tolines, fromfile, tofile,
- fromdate, todate, n=n)
- elif options.n:
- diff = difflib.ndiff(fromlines, tolines)
- elif options.m:
- diff = difflib.HtmlDiff().make_file(fromlines, tolines, fromfile,
- tofile, context=options.c,
- numlines=n)
- else:
- diff = difflib.context_diff(fromlines, tolines, fromfile, tofile,
- fromdate, todate, n=n)
-
- # we're using writelines because diff is a generator
- sys.stdout.writelines(diff)
-
- if __name__ == '__main__':
- main()
+.. literalinclude:: ../../Tools/scripts/diff.py
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst
index 273fb20634..d2d8ac7839 100644
--- a/Doc/library/dis.rst
+++ b/Doc/library/dis.rst
@@ -48,8 +48,9 @@ code.
.. class:: Bytecode(x, *, first_line=None, current_offset=None)
- Analyse the bytecode corresponding to a function, method, string of source
- code, or a code object (as returned by :func:`compile`).
+
+ Analyse the bytecode corresponding to a function, generator, method, string
+ of source code, or a code object (as returned by :func:`compile`).
This is a convenience wrapper around many of the functions listed below, most
notably :func:`get_instructions`, as iterating over a :class:`Bytecode`
@@ -109,7 +110,7 @@ operation is being performed, so the intermediate analysis object isn't useful:
.. function:: code_info(x)
Return a formatted multi-line string with detailed code object information
- for the supplied function, method, source code string or code object.
+ for the supplied function, generator, method, source code string or code object.
Note that the exact contents of code info strings are highly implementation
dependent and they may change arbitrarily across Python VMs or Python
@@ -136,13 +137,13 @@ operation is being performed, so the intermediate analysis object isn't useful:
.. function:: dis(x=None, *, file=None)
Disassemble the *x* object. *x* can denote either a module, a class, a
- method, a function, a code object, a string of source code or a byte sequence
- of raw bytecode. For a module, it disassembles all functions. For a class,
- it disassembles all methods. For a code object or sequence of raw bytecode,
- it prints one line per bytecode instruction. Strings are first compiled to
- code objects with the :func:`compile` built-in function before being
- disassembled. If no object is provided, this function disassembles the last
- traceback.
+ method, a function, a generator, a code object, a string of source code or
+ a byte sequence of raw bytecode. For a module, it disassembles all functions.
+ For a class, it disassembles all methods (including class and static methods).
+ For a code object or sequence of raw bytecode, it prints one line per bytecode
+ instruction. Strings are first compiled to code objects with the :func:`compile`
+ built-in function before being disassembled. If no object is provided, this
+ function disassembles the last traceback.
The disassembly is written as text to the supplied *file* argument if
provided and to ``sys.stdout`` otherwise.
@@ -345,6 +346,14 @@ result back on the stack.
Implements ``TOS = iter(TOS)``.
+.. opcode:: GET_YIELD_FROM_ITER
+
+ If ``TOS`` is a :term:`generator iterator` or :term:`coroutine` object
+ it is left as is. Otherwise, implements ``TOS = iter(TOS)``.
+
+ .. versionadded:: 3.5
+
+
**Binary operations**
Binary operations remove the top of the stack (TOS) and the second top-most
@@ -361,6 +370,13 @@ result back on the stack.
Implements ``TOS = TOS1 * TOS``.
+.. opcode:: BINARY_MATRIX_MULTIPLY
+
+ Implements ``TOS = TOS1 @ TOS``.
+
+ .. versionadded:: 3.5
+
+
.. opcode:: BINARY_FLOOR_DIVIDE
Implements ``TOS = TOS1 // TOS``.
@@ -433,6 +449,13 @@ the original TOS1.
Implements in-place ``TOS = TOS1 * TOS``.
+.. opcode:: INPLACE_MATRIX_MULTIPLY
+
+ Implements in-place ``TOS = TOS1 @ TOS``.
+
+ .. versionadded:: 3.5
+
+
.. opcode:: INPLACE_FLOOR_DIVIDE
Implements in-place ``TOS = TOS1 // TOS``.
@@ -493,6 +516,40 @@ the original TOS1.
Implements ``del TOS1[TOS]``.
+**Coroutine opcodes**
+
+.. opcode:: GET_AWAITABLE
+
+ Implements ``TOS = get_awaitable(TOS)``, where ``get_awaitable(o)``
+ returns ``o`` if ``o`` is a coroutine object or a generator object with
+ the CO_ITERABLE_COROUTINE flag, or resolves
+ ``o.__await__``.
+
+
+.. opcode:: GET_AITER
+
+ Implements ``TOS = get_awaitable(TOS.__aiter__())``. See ``GET_AWAITABLE``
+ for details about ``get_awaitable``
+
+
+.. opcode:: GET_ANEXT
+
+ Implements ``PUSH(get_awaitable(TOS.__anext__()))``. See ``GET_AWAITABLE``
+ for details about ``get_awaitable``
+
+
+.. opcode:: BEFORE_ASYNC_WITH
+
+ Resolves ``__aenter__`` and ``__aexit__`` from the object on top of the
+ stack. Pushes ``__aexit__`` and result of ``__aenter__()`` to the stack.
+
+
+.. opcode:: SETUP_ASYNC_WITH
+
+ Creates a new frame object.
+
+
+
**Miscellaneous opcodes**
.. opcode:: PRINT_EXPR
@@ -597,7 +654,7 @@ iterations of the loop.
:opcode:`UNPACK_SEQUENCE`).
-.. opcode:: WITH_CLEANUP
+.. opcode:: WITH_CLEANUP_START
Cleans up the stack when a :keyword:`with` statement block exits. TOS is the
context manager's :meth:`__exit__` bound method. Below TOS are 1--3 values
@@ -609,7 +666,13 @@ iterations of the loop.
* (SECOND, THIRD, FOURTH) = exc_info()
In the last case, ``TOS(SECOND, THIRD, FOURTH)`` is called, otherwise
- ``TOS(None, None, None)``. In addition, TOS is removed from the stack.
+ ``TOS(None, None, None)``. Pushes SECOND and result of the call
+ to the stack.
+
+
+.. opcode:: WITH_CLEANUP_FINISH
+
+ Pops exception type and result of 'exit' function call from the stack.
If the stack represents an exception, *and* the function call returns a
'true' value, this information is "zapped" and replaced with a single
@@ -645,7 +708,7 @@ the more significant byte last.
Implements assignment with a starred target: Unpacks an iterable in TOS into
individual values, where the total number of values can be smaller than the
- number of items in the iterable: one the new values will be a list of all
+ number of items in the iterable: one of the new values will be a list of all
leftover items.
The low byte of *counts* is the number of values before the list value, the
@@ -795,10 +858,6 @@ the more significant byte last.
Pushes a try block from a try-except clause onto the block stack. *delta*
points to the finally block.
-.. opcode:: STORE_MAP
-
- Store a key and value pair in a dictionary. Pops the key and value while
- leaving the dictionary on the stack.
.. opcode:: LOAD_FAST (var_num)
diff --git a/Doc/library/distribution.rst b/Doc/library/distribution.rst
index c4954d1b4a..3e6e84b42a 100644
--- a/Doc/library/distribution.rst
+++ b/Doc/library/distribution.rst
@@ -12,3 +12,4 @@ with a local index server, or without any index server at all.
distutils.rst
ensurepip.rst
venv.rst
+ zipapp.rst
diff --git a/Doc/library/distutils.rst b/Doc/library/distutils.rst
index e3d1314572..62abc85ac3 100644
--- a/Doc/library/distutils.rst
+++ b/Doc/library/distutils.rst
@@ -4,8 +4,10 @@
.. module:: distutils
:synopsis: Support for building and installing Python modules into an
existing Python installation.
+
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
+--------------
The :mod:`distutils` package provides support for building and installing
additional modules into a Python installation. The new modules may be either
@@ -15,7 +17,7 @@ collections of Python packages which include modules coded in both Python and C.
Most Python users will *not* want to use this module directly, but instead
use the cross-version tools maintained by the Python Packaging Authority. In
particular,
-`setuptools <https://setuptools.pypa.io/en/latest/setuptools.html>`__ is an
+`setuptools <https://setuptools.readthedocs.io/en/latest/>`__ is an
enhanced alternative to :mod:`distutils` that provides:
* support for declaring project dependencies
diff --git a/Doc/library/doctest.rst b/Doc/library/doctest.rst
index ea6e1b5481..c58f417c31 100644
--- a/Doc/library/doctest.rst
+++ b/Doc/library/doctest.rst
@@ -5,11 +5,15 @@
.. module:: doctest
:synopsis: Test pieces of code within docstrings.
+
.. moduleauthor:: Tim Peters <tim@python.org>
.. sectionauthor:: Tim Peters <tim@python.org>
.. sectionauthor:: Moshe Zadka <moshez@debian.org>
.. sectionauthor:: Edward Loper <edloper@users.sourceforge.net>
+**Source code:** :source:`Lib/doctest.py`
+
+--------------
The :mod:`doctest` module searches for pieces of text that look like interactive
Python sessions, and then executes those sessions to verify that they work
@@ -1053,15 +1057,9 @@ from text files and modules with doctests:
This function uses the same search technique as :func:`testmod`.
- .. note::
- Unlike :func:`testmod` and :class:`DocTestFinder`, this function raises
- a :exc:`ValueError` if *module* contains no docstrings. You can prevent
- this error by passing a :class:`DocTestFinder` instance as the
- *test_finder* argument with its *exclude_empty* keyword argument set
- to ``False``::
-
- >>> finder = doctest.DocTestFinder(exclude_empty=False)
- >>> suite = doctest.DocTestSuite(test_finder=finder)
+ .. versionchanged:: 3.5
+ :func:`DocTestSuite` returns an empty :class:`unittest.TestSuite` if *module*
+ contains no docstrings instead of raising :exc:`ValueError`.
Under the covers, :func:`DocTestSuite` creates a :class:`unittest.TestSuite` out
diff --git a/Doc/library/email.charset.rst b/Doc/library/email.charset.rst
index 80ef3d62cc..161d86a3b7 100644
--- a/Doc/library/email.charset.rst
+++ b/Doc/library/email.charset.rst
@@ -4,6 +4,9 @@
.. module:: email.charset
:synopsis: Character Sets
+**Source code:** :source:`Lib/email/charset.py`
+
+--------------
This module provides a class :class:`Charset` for representing character sets
and character set conversions in email messages, as well as a character set
@@ -101,9 +104,10 @@ Import this class from the :mod:`email.charset` module.
returns the string ``base64`` if *body_encoding* is ``BASE64``, and
returns the string ``7bit`` otherwise.
+
.. XXX to_splittable and from_splittable are not there anymore!
- .. method to_splittable(s)
+ .. to_splittable(s)
Convert a possibly multibyte string to a safely splittable format. *s* is
the string to split.
@@ -118,7 +122,7 @@ Import this class from the :mod:`email.charset` module.
the Unicode replacement character ``'U+FFFD'``.
- .. method from_splittable(ustr[, to_output])
+ .. from_splittable(ustr[, to_output])
Convert a splittable string back into an encoded string. *ustr* is a
Unicode string to "unsplit".
diff --git a/Doc/library/email.contentmanager.rst b/Doc/library/email.contentmanager.rst
index f53d34b34c..cd63728372 100644
--- a/Doc/library/email.contentmanager.rst
+++ b/Doc/library/email.contentmanager.rst
@@ -7,6 +7,10 @@
.. moduleauthor:: R. David Murray <rdmurray@bitdance.com>
.. sectionauthor:: R. David Murray <rdmurray@bitdance.com>
+.. versionadded:: 3.4
+ as a :term:`provisional module <provisional package>`.
+
+**Source code:** :source:`Lib/email/contentmanager.py`
.. note::
@@ -15,8 +19,7 @@
changes (up to and including removal of the module) may occur if deemed
necessary by the core developers.
-.. versionadded:: 3.4
- as a :term:`provisional module <provisional package>`.
+--------------
The :mod:`~email.message` module provides a class that can represent an
arbitrary email message. That basic message model has a useful and flexible
diff --git a/Doc/library/email.encoders.rst b/Doc/library/email.encoders.rst
index 916ba5d18a..9d7f9bf5e9 100644
--- a/Doc/library/email.encoders.rst
+++ b/Doc/library/email.encoders.rst
@@ -4,6 +4,9 @@
.. module:: email.encoders
:synopsis: Encoders for email message payloads.
+**Source code:** :source:`Lib/email/encoders.py`
+
+--------------
When creating :class:`~email.message.Message` objects from scratch, you often
need to encode the payloads for transport through compliant mail servers. This
diff --git a/Doc/library/email.errors.rst b/Doc/library/email.errors.rst
index 294e3edbdc..8470783e81 100644
--- a/Doc/library/email.errors.rst
+++ b/Doc/library/email.errors.rst
@@ -4,6 +4,9 @@
.. module:: email.errors
:synopsis: The exception classes used by the email package.
+**Source code:** :source:`Lib/email/errors.py`
+
+--------------
The following exception classes are defined in the :mod:`email.errors` module:
diff --git a/Doc/library/email.generator.rst b/Doc/library/email.generator.rst
index 48d41e1dc7..d596ed8d85 100644
--- a/Doc/library/email.generator.rst
+++ b/Doc/library/email.generator.rst
@@ -4,6 +4,9 @@
.. module:: email.generator
:synopsis: Generate flat text email messages from a message structure.
+**Source code:** :source:`Lib/email/generator.py`
+
+--------------
One of the most common tasks is to generate the flat text of the email message
represented by a message object structure. You will need to do this if you want
@@ -43,7 +46,7 @@ Here are the public methods of the :class:`Generator` class, imported from the
followed by a space at the beginning of the line. This is the only guaranteed
portable way to avoid having such lines be mistaken for a Unix mailbox format
envelope header separator (see `WHY THE CONTENT-LENGTH FORMAT IS BAD
- <http://www.jwz.org/doc/content-length.html>`_ for details). *mangle_from_*
+ <https://www.jwz.org/doc/content-length.html>`_ for details). *mangle_from_*
defaults to ``True``, but you might want to set this to ``False`` if you are not
writing Unix mailbox format files.
@@ -123,7 +126,7 @@ formatted string representation of a message object. For more detail, see
i.e. ``From`` followed by a space at the beginning of the line. This is the
only guaranteed portable way to avoid having such lines be mistaken for a
Unix mailbox format envelope header separator (see `WHY THE CONTENT-LENGTH
- FORMAT IS BAD <http://www.jwz.org/doc/content-length.html>`_ for details).
+ FORMAT IS BAD <https://www.jwz.org/doc/content-length.html>`_ for details).
*mangle_from_* defaults to ``True``, but you might want to set this to
``False`` if you are not writing Unix mailbox format files.
diff --git a/Doc/library/email.header.rst b/Doc/library/email.header.rst
index 346d23fc8c..e94837c1c9 100644
--- a/Doc/library/email.header.rst
+++ b/Doc/library/email.header.rst
@@ -4,6 +4,9 @@
.. module:: email.header
:synopsis: Representing non-ASCII headers
+**Source code:** :source:`Lib/email/header.py`
+
+--------------
:rfc:`2822` is the base standard that describes the format of email messages.
It derives from the older :rfc:`822` standard which came into widespread use at
diff --git a/Doc/library/email.headerregistry.rst b/Doc/library/email.headerregistry.rst
index db3aade416..0707bd858a 100644
--- a/Doc/library/email.headerregistry.rst
+++ b/Doc/library/email.headerregistry.rst
@@ -7,6 +7,10 @@
.. moduleauthor:: R. David Murray <rdmurray@bitdance.com>
.. sectionauthor:: R. David Murray <rdmurray@bitdance.com>
+.. versionadded:: 3.3
+ as a :term:`provisional module <provisional package>`.
+
+**Source code:** :source:`Lib/email/headerregistry.py`
.. note::
@@ -15,8 +19,7 @@
changes (up to and including removal of the module) may occur if deemed
necessary by the core developers.
-.. versionadded:: 3.3
- as a :term:`provisional module <provisional package>`.
+--------------
Headers are represented by customized subclasses of :class:`str`. The
particular class used to represent a given header is determined by the
@@ -171,7 +174,7 @@ headers.
:class:`~datetime.datetime` instance. This means, for example, that
the following code is valid and does what one would expect::
- msg['Date'] = datetime(2011, 7, 15, 21)
+ msg['Date'] = datetime(2011, 7, 15, 21)
Because this is a naive ``datetime`` it will be interpreted as a UTC
timestamp, and the resulting value will have a timezone of ``-0000``. Much
diff --git a/Doc/library/email.iterators.rst b/Doc/library/email.iterators.rst
index f92f460249..f3e9e184a5 100644
--- a/Doc/library/email.iterators.rst
+++ b/Doc/library/email.iterators.rst
@@ -4,6 +4,9 @@
.. module:: email.iterators
:synopsis: Iterate over a message object tree.
+**Source code:** :source:`Lib/email/iterators.py`
+
+--------------
Iterating over a message object tree is fairly easy with the
:meth:`Message.walk <email.message.Message.walk>` method. The
diff --git a/Doc/library/email.message.rst b/Doc/library/email.message.rst
index aeea94221d..91a694f3ec 100644
--- a/Doc/library/email.message.rst
+++ b/Doc/library/email.message.rst
@@ -4,6 +4,9 @@
.. module:: email.message
:synopsis: The base class representing email messages.
+**Source code:** :source:`Lib/email/message.py`
+
+--------------
The central class in the :mod:`email` package is the :class:`Message` class,
imported from the :mod:`email.message` module. It is the base class for the
@@ -578,6 +581,15 @@ Here are the methods of the :class:`Message` class:
will be *failobj*.
+ .. method:: get_content_disposition()
+
+ Return the lowercased value (without parameters) of the message's
+ :mailheader:`Content-Disposition` header if it has one, or ``None``. The
+ possible values for this method are *inline*, *attachment* or ``None``
+ if the message follows :rfc:`2183`.
+
+ .. versionadded:: 3.5
+
.. method:: walk()
The :meth:`walk` method is an all-purpose generator which can be used to
diff --git a/Doc/library/email.mime.rst b/Doc/library/email.mime.rst
index 1d70225fc8..8297deaf93 100644
--- a/Doc/library/email.mime.rst
+++ b/Doc/library/email.mime.rst
@@ -4,6 +4,9 @@
.. module:: email.mime
:synopsis: Build MIME messages.
+**Source code:** :source:`Lib/email/mime/`
+
+--------------
Ordinarily, you get a message object structure by passing a file or some text to
a parser, which parses the text and returns the root message object. However
@@ -195,7 +198,8 @@ Here are the classes:
set of the text and is passed as an argument to the
:class:`~email.mime.nonmultipart.MIMENonMultipart` constructor; it defaults
to ``us-ascii`` if the string contains only ``ascii`` code points, and
- ``utf-8`` otherwise.
+ ``utf-8`` otherwise. The *_charset* parameter accepts either a string or a
+ :class:`~email.charset.Charset` instance.
Unless the *_charset* argument is explicitly set to ``None``, the
MIMEText object created will have both a :mailheader:`Content-Type` header
@@ -206,3 +210,6 @@ Here are the classes:
``Content-Transfer-Encoding`` header, after which a ``set_payload`` call
will automatically encode the new payload (and add a new
:mailheader:`Content-Transfer-Encoding` header).
+
+ .. versionchanged:: 3.5
+ *_charset* also accepts :class:`~email.charset.Charset` instances.
diff --git a/Doc/library/email.parser.rst b/Doc/library/email.parser.rst
index 177adc62e7..93c09ad960 100644
--- a/Doc/library/email.parser.rst
+++ b/Doc/library/email.parser.rst
@@ -4,6 +4,9 @@
.. module:: email.parser
:synopsis: Parse flat text email messages to produce a message object structure.
+**Source code:** :source:`Lib/email/parser.py`
+
+--------------
Message object structures can be created in one of two ways: they can be created
from whole cloth by instantiating :class:`~email.message.Message` objects and
diff --git a/Doc/library/email.policy.rst b/Doc/library/email.policy.rst
index d4e3fc186a..47f321227a 100644
--- a/Doc/library/email.policy.rst
+++ b/Doc/library/email.policy.rst
@@ -9,6 +9,9 @@
.. versionadded:: 3.3
+**Source code:** :source:`Lib/email/policy.py`
+
+--------------
The :mod:`email` package's prime focus is the handling of email messages as
described by the various email and MIME RFCs. However, the general format of
@@ -187,6 +190,18 @@ added matters. To illustrate::
:const:`False` (the default), defects will be passed to the
:meth:`register_defect` method.
+
+
+ .. attribute:: mangle_from\_
+
+ If :const:`True`, lines starting with *"From "* in the body are
+ escaped by putting a ``>`` in front of them. This parameter is used when
+ the message is being serialized by a generator.
+ Default: :const:`False`.
+
+ .. versionadded:: 3.5
+ The *mangle_from_* parameter.
+
The following :class:`Policy` method is intended to be called by code using
the email library to create policy instances with custom settings:
@@ -319,6 +334,13 @@ added matters. To illustrate::
:const:`compat32`, that is used as the default policy. Thus the default
behavior of the email package is to maintain compatibility with Python 3.2.
+ The following attributes have values that are different from the
+ :class:`Policy` default:
+
+ .. attribute:: mangle_from_
+
+ The default is ``True``.
+
The class provides the following concrete implementations of the
abstract methods of :class:`Policy`:
@@ -356,6 +378,14 @@ added matters. To illustrate::
line breaks and any (RFC invalid) binary data it may contain.
+An instance of :class:`Compat32` is provided as a module constant:
+
+.. data:: compat32
+
+ An instance of :class:`Compat32`, providing backward compatibility with the
+ behavior of the email package in Python 3.2.
+
+
.. note::
The documentation below describes new policies that are included in the
@@ -378,6 +408,14 @@ added matters. To illustrate::
In addition to the settable attributes listed above that apply to all
policies, this policy adds the following additional attributes:
+ .. attribute:: utf8
+
+ If ``False``, follow :rfc:`5322`, supporting non-ASCII characters in
+ headers by encoding them as "encoded words". If ``True``, follow
+ :rfc:`6532` and use ``utf-8`` encoding for headers. Messages
+ formatted in this way may be passed to SMTP servers that support
+ the ``SMTPUTF8`` extension (:rfc:`6531`).
+
.. attribute:: refold_source
If the value for a header in the ``Message`` object originated from a
@@ -499,6 +537,14 @@ more closely to the RFCs relevant to their domains.
Like ``default``, but with ``linesep`` set to ``\r\n``, which is RFC
compliant.
+.. data:: SMTPUTF8
+
+ The same as ``SMTP`` except that :attr:`~EmailPolicy.utf8` is ``True``.
+ Useful for serializing messages to a message store without using encoded
+ words in the headers. Should only be used for SMTP trasmission if the
+ sender or recipient addresses have non-ASCII characters (the
+ :meth:`smtplib.SMTP.send_message` method handles this automatically).
+
.. data:: HTTP
Suitable for serializing headers with for use in HTTP traffic. Like
diff --git a/Doc/library/email.rst b/Doc/library/email.rst
index 95c0a2f4a8..e8bb02bff5 100644
--- a/Doc/library/email.rst
+++ b/Doc/library/email.rst
@@ -4,10 +4,14 @@
.. module:: email
:synopsis: Package supporting the parsing, manipulating, and generating
email messages, including MIME documents.
+
.. moduleauthor:: Barry A. Warsaw <barry@python.org>
.. sectionauthor:: Barry A. Warsaw <barry@python.org>
.. Copyright (C) 2001-2010 Python Software Foundation
+**Source code:** :source:`Lib/email/__init__.py`
+
+--------------
The :mod:`email` package is a library for managing email messages, including
MIME and other :rfc:`2822`\ -based message documents. It is specifically *not*
diff --git a/Doc/library/email.util.rst b/Doc/library/email.util.rst
index 219e2847ea..5cff7465df 100644
--- a/Doc/library/email.util.rst
+++ b/Doc/library/email.util.rst
@@ -4,6 +4,9 @@
.. module:: email.utils
:synopsis: Miscellaneous email package utilities.
+**Source code:** :source:`Lib/email/utils.py`
+
+--------------
There are several useful utilities provided in the :mod:`email.utils` module:
diff --git a/Doc/library/ensurepip.rst b/Doc/library/ensurepip.rst
index d589f1cf12..6aeeabc306 100644
--- a/Doc/library/ensurepip.rst
+++ b/Doc/library/ensurepip.rst
@@ -7,6 +7,8 @@
.. versionadded:: 3.4
+--------------
+
The :mod:`ensurepip` package provides support for bootstrapping the ``pip``
installer into an existing Python installation or virtual environment. This
bootstrapping approach reflects the fact that ``pip`` is an independent
diff --git a/Doc/library/enum.rst b/Doc/library/enum.rst
index 1c76e8728d..60467b4acb 100644
--- a/Doc/library/enum.rst
+++ b/Doc/library/enum.rst
@@ -314,11 +314,11 @@ Then::
>>> str(Mood.funky)
'my custom str! 1'
-The rules for what is allowed are as follows: _sunder_ names (starting and
-ending with a single underscore) are reserved by enum and cannot be used;
-all other attributes defined within an enumeration will become members of this
-enumeration, with the exception of *__dunder__* names and descriptors (methods
-are also descriptors).
+The rules for what is allowed are as follows: names that start and end with
+a single underscore are reserved by enum and cannot be used; all other
+attributes defined within an enumeration will become members of this
+enumeration, with the exception of special methods (:meth:`__str__`,
+:meth:`__add__`, etc.) and descriptors (methods are also descriptors).
Note: if your enumeration defines :meth:`__new__` and/or :meth:`__init__` then
whatever value(s) were given to the enum member will be passed into those
@@ -400,7 +400,8 @@ The second argument is the *source* of enumeration member names. It can be a
whitespace-separated string of names, a sequence of names, a sequence of
2-tuples with key/value pairs, or a mapping (e.g. dictionary) of names to
values. The last two options enable assigning arbitrary values to
-enumerations; the others auto-assign increasing integers starting with 1. A
+enumerations; the others auto-assign increasing integers starting with 1 (use
+the ``start`` parameter to specify a different starting value). A
new class derived from :class:`Enum` is returned. In other words, the above
assignment to :class:`Animal` is equivalent to::
@@ -438,12 +439,12 @@ SomeData in the global scope::
The complete signature is::
- Enum(value='NewEnumName', names=<...>, *, module='...', qualname='...', type=<mixed-in class>)
+ Enum(value='NewEnumName', names=<...>, *, module='...', qualname='...', type=<mixed-in class>, start=1)
:value: What the new Enum class will record as its name.
:names: The Enum members. This can be a whitespace or comma separated string
- (values will start at 1)::
+ (values will start at 1 unless otherwise specified)::
'red green blue' | 'red,green,blue' | 'red, green, blue'
@@ -465,6 +466,11 @@ The complete signature is::
:type: type to mix in to new Enum class.
+:start: number to start counting at if only names are passed in.
+
+.. versionchanged:: 3.5
+ The *start* parameter was added.
+
Derived Enumerations
--------------------
@@ -549,12 +555,12 @@ Some rules:
3. When another data type is mixed in, the :attr:`value` attribute is *not the
same* as the enum member itself, although it is equivalent and will compare
equal.
-4. %-style formatting: `%s` and `%r` call :class:`Enum`'s :meth:`__str__` and
- :meth:`__repr__` respectively; other codes (such as `%i` or `%h` for
- IntEnum) treat the enum member as its mixed-in type.
-5. :meth:`str.__format__` (or :func:`format`) will use the mixed-in
- type's :meth:`__format__`. If the :class:`Enum`'s :func:`str` or
- :func:`repr` is desired use the `!s` or `!r` :class:`str` format codes.
+4. %-style formatting: `%s` and `%r` call the :class:`Enum` class's
+ :meth:`__str__` and :meth:`__repr__` respectively; other codes (such as
+ `%i` or `%h` for IntEnum) treat the enum member as its mixed-in type.
+5. :meth:`str.format` (or :func:`format`) will use the mixed-in
+ type's :meth:`__format__`. If the :class:`Enum` class's :func:`str` or
+ :func:`repr` is desired, use the `!s` or `!r` format codes.
Interesting examples
@@ -724,18 +730,24 @@ member instances.
Finer Points
^^^^^^^^^^^^
-Enum members are instances of an Enum class, and even though they are
-accessible as `EnumClass.member`, they are not accessible directly from
-the member::
+:class:`Enum` members are instances of an :class:`Enum` class, and even
+though they are accessible as `EnumClass.member`, they should not be accessed
+directly from the member as that lookup may fail or, worse, return something
+besides the :class:`Enum` member you looking for::
- >>> Color.red
- <Color.red: 1>
- >>> Color.red.blue
- Traceback (most recent call last):
+ >>> class FieldTypes(Enum):
+ ... name = 0
+ ... value = 1
+ ... size = 2
...
- AttributeError: 'Color' object has no attribute 'blue'
+ >>> FieldTypes.value.size
+ <FieldTypes.size: 2>
+ >>> FieldTypes.size.value
+ 2
+
+.. versionchanged:: 3.5
-Likewise, the :attr:`__members__` is only available on the class.
+The :attr:`__members__` attribute is only available on the class.
If you give your :class:`Enum` subclass extra methods, like the `Planet`_
class above, those methods will show up in a :func:`dir` of the member,
diff --git a/Doc/library/errno.rst b/Doc/library/errno.rst
index d2163b6258..1cbd51c582 100644
--- a/Doc/library/errno.rst
+++ b/Doc/library/errno.rst
@@ -4,6 +4,7 @@
.. module:: errno
:synopsis: Standard errno system symbols.
+----------------
This module makes available standard ``errno`` system symbols. The value of each
symbol is the corresponding integer value. The names and descriptions are
@@ -41,7 +42,10 @@ defined by the module. The specific list of defined symbols is available as
.. data:: EINTR
- Interrupted system call
+ Interrupted system call.
+
+ .. seealso::
+ This error is mapped to the exception :exc:`InterruptedError`.
.. data:: EIO
diff --git a/Doc/library/exceptions.rst b/Doc/library/exceptions.rst
index ef39e6c6f0..5a7193393c 100644
--- a/Doc/library/exceptions.rst
+++ b/Doc/library/exceptions.rst
@@ -162,7 +162,8 @@ The following exceptions are the exceptions that are usually raised.
.. exception:: GeneratorExit
- Raised when a :term:`generator`\'s :meth:`close` method is called. It
+ Raised when a :term:`generator` or :term:`coroutine` is closed;
+ see :meth:`generator.close` and :meth:`coroutine.close`. It
directly inherits from :exc:`BaseException` instead of :exc:`Exception` since
it is technically not an error.
@@ -287,7 +288,7 @@ The following exceptions are the exceptions that are usually raised.
.. versionchanged:: 3.3
:exc:`EnvironmentError`, :exc:`IOError`, :exc:`WindowsError`,
- :exc:`VMSError`, :exc:`socket.error`, :exc:`select.error` and
+ :exc:`socket.error`, :exc:`select.error` and
:exc:`mmap.error` have been merged into :exc:`OSError`, and the
constructor may return a subclass.
@@ -308,6 +309,16 @@ The following exceptions are the exceptions that are usually raised.
handling in C, most floating point operations are not checked.
+.. exception:: RecursionError
+
+ This exception is derived from :exc:`RuntimeError`. It is raised when the
+ interpreter detects that the maximum recursion depth (see
+ :func:`sys.getrecursionlimit`) is exceeded.
+
+ .. versionadded:: 3.5
+ Previously, a plain :exc:`RuntimeError` was raised.
+
+
.. exception:: ReferenceError
This exception is raised when a weak reference proxy, created by the
@@ -333,14 +344,30 @@ The following exceptions are the exceptions that are usually raised.
given as an argument when constructing the exception, and defaults
to :const:`None`.
- When a generator function returns, a new :exc:`StopIteration` instance is
+ When a :term:`generator` or :term:`coroutine` function
+ returns, a new :exc:`StopIteration` instance is
raised, and the value returned by the function is used as the
:attr:`value` parameter to the constructor of the exception.
+ If a generator function defined in the presence of a ``from __future__
+ import generator_stop`` directive raises :exc:`StopIteration`, it will be
+ converted into a :exc:`RuntimeError` (retaining the :exc:`StopIteration`
+ as the new exception's cause).
+
.. versionchanged:: 3.3
Added ``value`` attribute and the ability for generator functions to
use it to return a value.
+ .. versionchanged:: 3.5
+ Introduced the RuntimeError transformation.
+
+.. exception:: StopAsyncIteration
+
+ Must be raised by :meth:`__anext__` method of an
+ :term:`asynchronous iterator` object to stop the iteration.
+
+ .. versionadded:: 3.5
+
.. exception:: SyntaxError
Raised when the parser encounters a syntax error. This may occur in an
@@ -563,7 +590,12 @@ depending on the system error code.
.. exception:: InterruptedError
Raised when a system call is interrupted by an incoming signal.
- Corresponds to :c:data:`errno` ``EINTR``.
+ Corresponds to :c:data:`errno` :py:data:`~errno.EINTR`.
+
+ .. versionchanged:: 3.5
+ Python now retries system calls when a syscall is interrupted by a
+ signal, except if the signal handler raises an exception (see :pep:`475`
+ for the rationale), instead of raising :exc:`InterruptedError`.
.. exception:: IsADirectoryError
diff --git a/Doc/library/faulthandler.rst b/Doc/library/faulthandler.rst
index eb2016a7b9..deedea1f26 100644
--- a/Doc/library/faulthandler.rst
+++ b/Doc/library/faulthandler.rst
@@ -6,6 +6,8 @@
.. versionadded:: 3.3
+----------------
+
This module contains functions to dump Python tracebacks explicitly, on a fault,
after a timeout, or on a user signal. Call :func:`faulthandler.enable` to
install fault handlers for the :const:`SIGSEGV`, :const:`SIGFPE`,
@@ -47,6 +49,9 @@ Dumping the traceback
Dump the tracebacks of all threads into *file*. If *all_threads* is
``False``, dump only the current thread.
+ .. versionchanged:: 3.5
+ Added support for passing file descriptor to this function.
+
Fault handler state
-------------------
@@ -59,6 +64,12 @@ Fault handler state
produce tracebacks for every running thread. Otherwise, dump only the current
thread.
+ The *file* must be kept open until the fault handler is disabled: see
+ :ref:`issue with file descriptors <faulthandler-fd>`.
+
+ .. versionchanged:: 3.5
+ Added support for passing file descriptor to this function.
+
.. function:: disable()
Disable the fault handler: uninstall the signal handlers installed by
@@ -82,9 +93,16 @@ Dumping the tracebacks after a timeout
call replaces previous parameters and resets the timeout. The timer has a
sub-second resolution.
+ The *file* must be kept open until the traceback is dumped or
+ :func:`cancel_dump_traceback_later` is called: see :ref:`issue with file
+ descriptors <faulthandler-fd>`.
+
This function is implemented using a watchdog thread and therefore is not
available if Python is compiled with threads disabled.
+ .. versionchanged:: 3.5
+ Added support for passing file descriptor to this function.
+
.. function:: cancel_dump_traceback_later()
Cancel the last call to :func:`dump_traceback_later`.
@@ -99,8 +117,14 @@ Dumping the traceback on a user signal
the traceback of all threads, or of the current thread if *all_threads* is
``False``, into *file*. Call the previous handler if chain is ``True``.
+ The *file* must be kept open until the signal is unregistered by
+ :func:`unregister`: see :ref:`issue with file descriptors <faulthandler-fd>`.
+
Not available on Windows.
+ .. versionchanged:: 3.5
+ Added support for passing file descriptor to this function.
+
.. function:: unregister(signum)
Unregister a user signal: uninstall the handler of the *signum* signal
@@ -110,6 +134,8 @@ Dumping the traceback on a user signal
Not available on Windows.
+.. _faulthandler-fd:
+
Issue with file descriptors
---------------------------
diff --git a/Doc/library/fcntl.rst b/Doc/library/fcntl.rst
index b798f22d7f..88112f6b7e 100644
--- a/Doc/library/fcntl.rst
+++ b/Doc/library/fcntl.rst
@@ -4,15 +4,19 @@
.. module:: fcntl
:platform: Unix
:synopsis: The fcntl() and ioctl() system calls.
-.. sectionauthor:: Jaap Vermeulen
+.. sectionauthor:: Jaap Vermeulen
.. index::
pair: UNIX; file control
pair: UNIX; I/O control
+----------------
+
This module performs file control and I/O control on file descriptors. It is an
-interface to the :c:func:`fcntl` and :c:func:`ioctl` Unix routines.
+interface to the :c:func:`fcntl` and :c:func:`ioctl` Unix routines. For a
+complete description of these calls, see :manpage:`fcntl(2)` and
+:manpage:`ioctl(2)` Unix manual pages.
All functions in this module take a file descriptor *fd* as their first
argument. This can be an integer file descriptor, such as returned by
@@ -28,41 +32,41 @@ descriptor.
The module defines the following functions:
-.. function:: fcntl(fd, op[, arg])
+.. function:: fcntl(fd, cmd, arg=0)
- Perform the operation *op* on file descriptor *fd* (file objects providing
+ Perform the operation *cmd* on file descriptor *fd* (file objects providing
a :meth:`~io.IOBase.fileno` method are accepted as well). The values used
- for *op* are operating system dependent, and are available as constants
+ for *cmd* are operating system dependent, and are available as constants
in the :mod:`fcntl` module, using the same names as used in the relevant C
- header files. The argument *arg* is optional, and defaults to the integer
- value ``0``. When present, it can either be an integer value, or a string.
- With the argument missing or an integer value, the return value of this function
- is the integer return value of the C :c:func:`fcntl` call. When the argument is
- a string it represents a binary structure, e.g. created by :func:`struct.pack`.
- The binary data is copied to a buffer whose address is passed to the C
- :c:func:`fcntl` call. The return value after a successful call is the contents
- of the buffer, converted to a string object. The length of the returned string
- will be the same as the length of the *arg* argument. This is limited to 1024
- bytes. If the information returned in the buffer by the operating system is
- larger than 1024 bytes, this is most likely to result in a segmentation
- violation or a more subtle data corruption.
+ header files. The argument *arg* can either be an integer value, or a
+ :class:`bytes` object. With an integer value, the return value of this
+ function is the integer return value of the C :c:func:`fcntl` call. When
+ the argument is bytes it represents a binary structure, e.g. created by
+ :func:`struct.pack`. The binary data is copied to a buffer whose address is
+ passed to the C :c:func:`fcntl` call. The return value after a successful
+ call is the contents of the buffer, converted to a :class:`bytes` object.
+ The length of the returned object will be the same as the length of the
+ *arg* argument. This is limited to 1024 bytes. If the information returned
+ in the buffer by the operating system is larger than 1024 bytes, this is
+ most likely to result in a segmentation violation or a more subtle data
+ corruption.
If the :c:func:`fcntl` fails, an :exc:`OSError` is raised.
-.. function:: ioctl(fd, op[, arg[, mutate_flag]])
+.. function:: ioctl(fd, request, arg=0, mutate_flag=True)
This function is identical to the :func:`~fcntl.fcntl` function, except
that the argument handling is even more complicated.
- The op parameter is limited to values that can fit in 32-bits.
- Additional constants of interest for use as the *op* argument can be
+ The *request* parameter is limited to values that can fit in 32-bits.
+ Additional constants of interest for use as the *request* argument can be
found in the :mod:`termios` module, under the same names as used in
the relevant C header files.
- The parameter *arg* can be one of an integer, absent (treated identically to the
- integer ``0``), an object supporting the read-only buffer interface (most likely
- a plain Python string) or an object supporting the read-write buffer interface.
+ The parameter *arg* can be one of an integer, an object supporting the
+ read-only buffer interface (like :class:`bytes`) or an object supporting
+ the read-write buffer interface (like :class:`bytearray`).
In all but the last case, behaviour is as for the :func:`~fcntl.fcntl`
function.
@@ -72,7 +76,7 @@ The module defines the following functions:
If it is false, the buffer's mutability is ignored and behaviour is as for a
read-only buffer, except that the 1024 byte limit mentioned above is avoided --
- so long as the buffer you pass is as least as long as what the operating system
+ so long as the buffer you pass is at least as long as what the operating system
wants to put there, things should work.
If *mutate_flag* is true (the default), then the buffer is (in effect) passed
@@ -83,7 +87,7 @@ The module defines the following functions:
buffer 1024 bytes long which is then passed to :func:`ioctl` and copied back
into the supplied buffer.
- If the :c:func:`ioctl` fails, an :exc:`IOError` exception is raised.
+ If the :c:func:`ioctl` fails, an :exc:`OSError` exception is raised.
An example::
@@ -99,27 +103,27 @@ The module defines the following functions:
array('h', [13341])
-.. function:: flock(fd, op)
+.. function:: flock(fd, operation)
- Perform the lock operation *op* on file descriptor *fd* (file objects providing
+ Perform the lock operation *operation* on file descriptor *fd* (file objects providing
a :meth:`~io.IOBase.fileno` method are accepted as well). See the Unix manual
:manpage:`flock(2)` for details. (On some systems, this function is emulated
using :c:func:`fcntl`.)
- If the :c:func:`flock` fails, an :exc:`IOError` exception is raised.
+ If the :c:func:`flock` fails, an :exc:`OSError` exception is raised.
-.. function:: lockf(fd, operation, [length, [start, [whence]]])
+.. function:: lockf(fd, cmd, len=0, start=0, whence=0)
This is essentially a wrapper around the :func:`~fcntl.fcntl` locking calls.
- *fd* is the file descriptor of the file to lock or unlock, and *operation*
+ *fd* is the file descriptor of the file to lock or unlock, and *cmd*
is one of the following values:
* :const:`LOCK_UN` -- unlock
* :const:`LOCK_SH` -- acquire a shared lock
* :const:`LOCK_EX` -- acquire an exclusive lock
- When *operation* is :const:`LOCK_SH` or :const:`LOCK_EX`, it can also be
+ When *cmd* is :const:`LOCK_SH` or :const:`LOCK_EX`, it can also be
bitwise ORed with :const:`LOCK_NB` to avoid blocking on lock acquisition.
If :const:`LOCK_NB` is used and the lock cannot be acquired, an
:exc:`OSError` will be raised and the exception will have an *errno*
@@ -128,7 +132,7 @@ The module defines the following functions:
systems, :const:`LOCK_EX` can only be used if the file descriptor refers to a
file opened for writing.
- *length* is the number of bytes to lock, *start* is the byte offset at
+ *len* is the number of bytes to lock, *start* is the byte offset at
which the lock starts, relative to *whence*, and *whence* is as with
:func:`io.IOBase.seek`, specifically:
@@ -137,7 +141,7 @@ The module defines the following functions:
* :const:`2` -- relative to the end of the file (:data:`os.SEEK_END`)
The default for *start* is 0, which means to start at the beginning of the file.
- The default for *length* is 0 which means to lock to the end of the file. The
+ The default for *len* is 0 which means to lock to the end of the file. The
default for *whence* is also 0.
Examples (all on a SVR4 compliant system)::
@@ -151,9 +155,9 @@ Examples (all on a SVR4 compliant system)::
rv = fcntl.fcntl(f, fcntl.F_SETLKW, lockdata)
Note that in the first example the return value variable *rv* will hold an
-integer value; in the second example it will hold a string value. The structure
-lay-out for the *lockdata* variable is system dependent --- therefore using the
-:func:`flock` call may be better.
+integer value; in the second example it will hold a :class:`bytes` object. The
+structure lay-out for the *lockdata* variable is system dependent --- therefore
+using the :func:`flock` call may be better.
.. seealso::
diff --git a/Doc/library/filecmp.rst b/Doc/library/filecmp.rst
index 06d3f21300..31b9b4afab 100644
--- a/Doc/library/filecmp.rst
+++ b/Doc/library/filecmp.rst
@@ -3,6 +3,7 @@
.. module:: filecmp
:synopsis: Compare files efficiently.
+
.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
**Source code:** :source:`Lib/filecmp.py`
diff --git a/Doc/library/fileinput.rst b/Doc/library/fileinput.rst
index ee06830ad8..aa4c529b2a 100644
--- a/Doc/library/fileinput.rst
+++ b/Doc/library/fileinput.rst
@@ -3,6 +3,7 @@
.. module:: fileinput
:synopsis: Loop over standard input or a list of files.
+
.. moduleauthor:: Guido van Rossum <guido@python.org>
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
@@ -71,6 +72,9 @@ The following function is the primary interface of this module:
.. versionchanged:: 3.2
Can be used as a context manager.
+ .. versionchanged:: 3.5.2
+ The *bufsize* parameter is no longer used.
+
The following functions use the global state created by :func:`fileinput.input`;
if there is no active state, :exc:`RuntimeError` is raised.
@@ -161,7 +165,10 @@ available for subclassing as well:
Can be used as a context manager.
.. deprecated:: 3.4
- The ``'rU'`` and ``'U'`` modes.
+ The ``'rU'`` and ``'U'`` modes.
+
+ .. versionchanged:: 3.5.2
+ The *bufsize* parameter is no longer used.
**Optional in-place filtering:** if the keyword argument ``inplace=True`` is
@@ -190,7 +197,7 @@ The two following opening hooks are provided by this module:
.. function:: hook_encoded(encoding)
- Returns a hook which opens each file with :func:`codecs.open`, using the given
+ Returns a hook which opens each file with :func:`open`, using the given
*encoding* to read the file.
Usage example: ``fi =
diff --git a/Doc/library/fnmatch.rst b/Doc/library/fnmatch.rst
index 68b437f2c0..85ac484965 100644
--- a/Doc/library/fnmatch.rst
+++ b/Doc/library/fnmatch.rst
@@ -4,13 +4,12 @@
.. module:: fnmatch
:synopsis: Unix shell style filename pattern matching.
+**Source code:** :source:`Lib/fnmatch.py`
.. index:: single: filenames; wildcard expansion
.. index:: module: re
-**Source code:** :source:`Lib/fnmatch.py`
-
--------------
This module provides support for Unix shell-style wildcards, which are *not* the
diff --git a/Doc/library/formatter.rst b/Doc/library/formatter.rst
index 1847a8094b..6c10ac6fab 100644
--- a/Doc/library/formatter.rst
+++ b/Doc/library/formatter.rst
@@ -6,9 +6,9 @@
:deprecated:
.. deprecated:: 3.4
- Due to lack of usage, the formatter module has been deprecated and is slated
- for removal in Python 3.6.
+ Due to lack of usage, the formatter module has been deprecated.
+--------------
This module supports two interface definitions, each with multiple
implementations: The *formatter* interface, and the *writer* interface which is
diff --git a/Doc/library/fpectl.rst b/Doc/library/fpectl.rst
index fb15f69445..e4b528cf0b 100644
--- a/Doc/library/fpectl.rst
+++ b/Doc/library/fpectl.rst
@@ -4,10 +4,10 @@
.. module:: fpectl
:platform: Unix
:synopsis: Provide control for floating point exception handling.
+
.. moduleauthor:: Lee Busby <busby1@llnl.gov>
.. sectionauthor:: Lee Busby <busby1@llnl.gov>
-
.. note::
The :mod:`fpectl` module is not built by default, and its usage is discouraged
@@ -16,6 +16,8 @@
.. index:: single: IEEE-754
+--------------
+
Most computers carry out floating point operations in conformance with the
so-called IEEE-754 standard. On any real computer, some floating point
operations produce results that cannot be expressed as a normal floating point
diff --git a/Doc/library/fractions.rst b/Doc/library/fractions.rst
index 3d2529d1e5..b5a818e1ca 100644
--- a/Doc/library/fractions.rst
+++ b/Doc/library/fractions.rst
@@ -3,6 +3,7 @@
.. module:: fractions
:synopsis: Rational numbers.
+
.. moduleauthor:: Jeffrey Yasskin <jyasskin at gmail.com>
.. sectionauthor:: Jeffrey Yasskin <jyasskin at gmail.com>
@@ -172,6 +173,9 @@ another rational number, or from a string.
sign as *b* if *b* is nonzero; otherwise it takes the sign of *a*. ``gcd(0,
0)`` returns ``0``.
+ .. deprecated:: 3.5
+ Use :func:`math.gcd` instead.
+
.. seealso::
diff --git a/Doc/library/ftplib.rst b/Doc/library/ftplib.rst
index f06e678ecd..233e11fb5a 100644
--- a/Doc/library/ftplib.rst
+++ b/Doc/library/ftplib.rst
@@ -4,19 +4,18 @@
.. module:: ftplib
:synopsis: FTP protocol client (requires sockets).
+**Source code:** :source:`Lib/ftplib.py`
.. index::
pair: FTP; protocol
single: FTP; ftplib (standard module)
-**Source code:** :source:`Lib/ftplib.py`
-
--------------
This module defines the class :class:`FTP` and a few related items. The
:class:`FTP` class implements the client side of the FTP protocol. You can use
this to write Python programs that perform a variety of automated FTP jobs, such
-as mirroring other ftp servers. It is also used by the module
+as mirroring other FTP servers. It is also used by the module
:mod:`urllib.request` to handle URLs that use FTP. For more information on FTP
(File Transfer Protocol), see Internet :rfc:`959`.
@@ -148,12 +147,6 @@ The module defines the following items:
typically used by FTP clients to load user authentication information
before prompting the user.
- .. index:: single: ftpmirror.py
-
- The file :file:`Tools/scripts/ftpmirror.py` in the Python source distribution is
- a script that can mirror FTP sites, or portions thereof, using the :mod:`ftplib`
- module. It can be used as an extended example that applies this module.
-
.. _ftp-objects:
@@ -314,7 +307,7 @@ followed by ``lines`` for the text version or ``binary`` for the binary version.
.. method:: FTP.mlsd(path="", facts=[])
- List a directory in a standardized format by using MLSD command
+ List a directory in a standardized format by using ``MLSD`` command
(:rfc:`3659`). If *path* is omitted the current directory is assumed.
*facts* is a list of strings representing the type of information desired
(e.g. ``["type", "size", "perm"]``). Return a generator object yielding a
@@ -333,7 +326,7 @@ followed by ``lines`` for the text version or ``binary`` for the binary version.
directory). Multiple arguments can be used to pass non-standard options to
the ``NLST`` command.
- .. deprecated:: 3.3 use :meth:`mlsd` instead.
+ .. note:: If your server supports the command, :meth:`mlsd` offers a better API.
.. method:: FTP.dir(argument[, ...])
@@ -345,7 +338,7 @@ followed by ``lines`` for the text version or ``binary`` for the binary version.
as a *callback* function as for :meth:`retrlines`; the default prints to
``sys.stdout``. This method returns ``None``.
- .. deprecated:: 3.3 use :meth:`mlsd` instead.
+ .. note:: If your server supports the command, :meth:`mlsd` offers a better API.
.. method:: FTP.rename(fromname, toname)
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index 21aeaf9f5c..c3563f3690 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -156,11 +156,12 @@ are always available. They are listed here in alphabetical order.
.. function:: chr(i)
- Return the string representing a character whose Unicode code point is the integer
- *i*. For example, ``chr(97)`` returns the string ``'a'``. This is the
- inverse of :func:`ord`. The valid range for the argument is from 0 through
- 1,114,111 (0x10FFFF in base 16). :exc:`ValueError` will be raised if *i* is
- outside that range.
+ Return the string representing a character whose Unicode code point is the
+ integer *i*. For example, ``chr(97)`` returns the string ``'a'``, while
+ ``chr(8364)`` returns the string ``'€'``. This is the inverse of :func:`ord`.
+
+ The valid range for the argument is from 0 through 1,114,111 (0x10FFFF in
+ base 16). :exc:`ValueError` will be raised if *i* is outside that range.
.. function:: classmethod(function)
@@ -229,7 +230,7 @@ are always available. They are listed here in alphabetical order.
or ``2`` (docstrings are removed too).
This function raises :exc:`SyntaxError` if the compiled source is invalid,
- and :exc:`TypeError` if the source contains null bytes.
+ and :exc:`ValueError` if the source contains null bytes.
If you want to parse Python code into its AST representation, see
:func:`ast.parse`.
@@ -245,6 +246,10 @@ are always available. They are listed here in alphabetical order.
Allowed use of Windows and Mac newlines. Also input in ``'exec'`` mode
does not have to end in a newline anymore. Added the *optimize* parameter.
+ .. versionchanged:: 3.5
+ Previously, :exc:`TypeError` was raised when null bytes were encountered
+ in *source*.
+
.. class:: complex([real[, imag]])
@@ -972,9 +977,11 @@ are always available. They are listed here in alphabetical order.
Characters not supported by the encoding are replaced with the
appropriate XML character reference ``&#nnn;``.
- * ``'backslashreplace'`` (also only supported when writing)
- replaces unsupported characters with Python's backslashed escape
- sequences.
+ * ``'backslashreplace'`` replaces malformed data by Python's backslashed
+ escape sequences.
+
+ * ``'namereplace'`` (also only supported when writing)
+ replaces unsupported characters with ``\N{...}`` escape sequences.
.. index::
single: universal newlines; open() built-in function
@@ -999,8 +1006,8 @@ are always available. They are listed here in alphabetical order.
If *closefd* is ``False`` and a file descriptor rather than a filename was
given, the underlying file descriptor will be kept open when the file is
- closed. If a filename is given *closefd* has no effect and must be ``True``
- (the default).
+ closed. If a filename is given *closefd* must be ``True`` (the default)
+ otherwise an error will be raised.
A custom opener can be used by passing a callable as *opener*. The underlying
file descriptor for the file object is then obtained by calling *opener* with
@@ -1062,14 +1069,20 @@ are always available. They are listed here in alphabetical order.
The ``'U'`` mode.
+ .. versionchanged:: 3.5
+ If the system call is interrupted and the signal handler does not raise an
+ exception, the function now retries the system call instead of raising an
+ :exc:`InterruptedError` exception (see :pep:`475` for the rationale).
+
+ .. versionchanged:: 3.5
+ The ``'namereplace'`` error handler was added.
-.. XXX works for bytes too, but should it?
.. function:: ord(c)
Given a string representing one Unicode character, return an integer
- representing the Unicode code
- point of that character. For example, ``ord('a')`` returns the integer ``97``
- and ``ord('\u2020')`` returns ``8224``. This is the inverse of :func:`chr`.
+ representing the Unicode code point of that character. For example,
+ ``ord('a')`` returns the integer ``97`` and ``ord('€')`` (Euro sign)
+ returns ``8364``. This is the inverse of :func:`chr`.
.. function:: pow(x, y[, z])
@@ -1186,6 +1199,9 @@ are always available. They are listed here in alphabetical order.
The returned property object also has the attributes ``fget``, ``fset``, and
``fdel`` corresponding to the constructor arguments.
+ .. versionchanged:: 3.5
+ The docstrings of property objects are now writeable.
+
.. _func-range:
.. function:: range(stop)
@@ -1218,8 +1234,8 @@ are always available. They are listed here in alphabetical order.
.. function:: round(number[, ndigits])
Return the floating point value *number* rounded to *ndigits* digits after
- the decimal point. If *ndigits* is omitted, it defaults to zero. Delegates
- to ``number.__round__(ndigits)``.
+ the decimal point. If *ndigits* is omitted, it returns the nearest integer
+ to its input. Delegates to ``number.__round__(ndigits)``.
For the built-in types supporting :func:`round`, values are rounded to the
closest multiple of 10 to the power minus *ndigits*; if two multiples are
@@ -1404,7 +1420,7 @@ are always available. They are listed here in alphabetical order.
For practical suggestions on how to design cooperative classes using
:func:`super`, see `guide to using super()
- <http://rhettinger.wordpress.com/2011/05/26/super-considered-super/>`_.
+ <https://rhettinger.wordpress.com/2011/05/26/super-considered-super/>`_.
.. _func-tuple:
@@ -1433,8 +1449,9 @@ are always available. They are listed here in alphabetical order.
class name and becomes the :attr:`~class.__name__` attribute; the *bases*
tuple itemizes the base classes and becomes the :attr:`~class.__bases__`
attribute; and the *dict* dictionary is the namespace containing definitions
- for class body and becomes the :attr:`~object.__dict__` attribute. For
- example, the following two statements create identical :class:`type` objects:
+ for class body and is copied to a standard dictionary to become the
+ :attr:`~object.__dict__` attribute. For example, the following two
+ statements create identical :class:`type` objects:
>>> class X:
... a = 1
@@ -1484,7 +1501,9 @@ are always available. They are listed here in alphabetical order.
The left-to-right evaluation order of the iterables is guaranteed. This
makes possible an idiom for clustering a data series into n-length groups
- using ``zip(*[iter(s)]*n)``.
+ using ``zip(*[iter(s)]*n)``. This repeats the *same* iterator ``n`` times
+ so that each output tuple has the result of ``n`` calls to the iterator.
+ This has the effect of dividing the input into n-length chunks.
:func:`zip` should only be used with unequal length inputs when you don't
care about trailing, unmatched values from the longer iterables. If those
diff --git a/Doc/library/functools.rst b/Doc/library/functools.rst
index 46aa88767e..2dbcb5cc16 100644
--- a/Doc/library/functools.rst
+++ b/Doc/library/functools.rst
@@ -3,6 +3,7 @@
.. module:: functools
:synopsis: Higher-order functions and operations on callable objects.
+
.. moduleauthor:: Peter Harris <scav@blueyonder.co.uk>
.. moduleauthor:: Raymond Hettinger <python@rcn.com>
.. moduleauthor:: Nick Coghlan <ncoghlan@gmail.com>
@@ -73,7 +74,7 @@ The :mod:`functools` module defines the following functions:
bypassing the cache, or for rewrapping the function with a different cache.
An `LRU (least recently used) cache
- <http://en.wikipedia.org/wiki/Cache_algorithms#Examples>`_ works
+ <https://en.wikipedia.org/wiki/Cache_algorithms#Examples>`_ works
best when the most recent calls are the best predictors of upcoming calls (for
example, the most popular articles on a news server tend to change each day).
The cache's size limit assures that the cache does not grow without bound on
@@ -99,9 +100,9 @@ The :mod:`functools` module defines the following functions:
CacheInfo(hits=3, misses=8, maxsize=32, currsize=8)
Example of efficiently computing
- `Fibonacci numbers <http://en.wikipedia.org/wiki/Fibonacci_number>`_
+ `Fibonacci numbers <https://en.wikipedia.org/wiki/Fibonacci_number>`_
using a cache to implement a
- `dynamic programming <http://en.wikipedia.org/wiki/Dynamic_programming>`_
+ `dynamic programming <https://en.wikipedia.org/wiki/Dynamic_programming>`_
technique::
@lru_cache(maxsize=None)
@@ -375,10 +376,10 @@ The :mod:`functools` module defines the following functions:
assigned directly to the matching attributes on the wrapper function and which
attributes of the wrapper function are updated with the corresponding attributes
from the original function. The default values for these arguments are the
- module level constants *WRAPPER_ASSIGNMENTS* (which assigns to the wrapper
- function's *__name__*, *__module__*, *__annotations__* and *__doc__*, the
- documentation string) and *WRAPPER_UPDATES* (which updates the wrapper
- function's *__dict__*, i.e. the instance dictionary).
+ module level constants ``WRAPPER_ASSIGNMENTS`` (which assigns to the wrapper
+ function's ``__module__``, ``__name__``, ``__qualname__``, ``__annotations__``
+ and ``__doc__``, the documentation string) and ``WRAPPER_UPDATES`` (which
+ updates the wrapper function's ``__dict__``, i.e. the instance dictionary).
To allow access to the original function for introspection and other purposes
(e.g. bypassing a caching decorator such as :func:`lru_cache`), this function
diff --git a/Doc/library/gc.rst b/Doc/library/gc.rst
index 813554206a..4af16a9dfd 100644
--- a/Doc/library/gc.rst
+++ b/Doc/library/gc.rst
@@ -3,9 +3,11 @@
.. module:: gc
:synopsis: Interface to the cycle-detecting garbage collector.
+
.. moduleauthor:: Neil Schemenauer <nas@arctrix.com>
.. sectionauthor:: Neil Schemenauer <nas@arctrix.com>
+--------------
This module provides an interface to the optional garbage collector. It
provides the ability to disable the collector, tune the collection frequency,
@@ -186,7 +188,7 @@ values but should not rebind them):
added to this list rather than freed.
.. versionchanged:: 3.2
- If this list is non-empty at interpreter shutdown, a
+ If this list is non-empty at :term:`interpreter shutdown`, a
:exc:`ResourceWarning` is emitted, which is silent by default. If
:const:`DEBUG_UNCOLLECTABLE` is set, in addition all uncollectable objects
are printed.
@@ -252,8 +254,8 @@ The following constants are provided for use with :func:`set_debug`:
to the ``garbage`` list.
.. versionchanged:: 3.2
- Also print the contents of the :data:`garbage` list at interpreter
- shutdown, if it isn't empty.
+ Also print the contents of the :data:`garbage` list at
+ :term:`interpreter shutdown`, if it isn't empty.
.. data:: DEBUG_SAVEALL
diff --git a/Doc/library/getopt.rst b/Doc/library/getopt.rst
index f9a1e53e38..336deab28c 100644
--- a/Doc/library/getopt.rst
+++ b/Doc/library/getopt.rst
@@ -7,8 +7,6 @@
**Source code:** :source:`Lib/getopt.py`
---------------
-
.. note::
The :mod:`getopt` module is a parser for command line options whose API is
@@ -17,6 +15,8 @@
less code and get better help and error messages should consider using the
:mod:`argparse` module instead.
+--------------
+
This module helps scripts to parse the command line arguments in ``sys.argv``.
It supports the same conventions as the Unix :c:func:`getopt` function (including
the special meanings of arguments of the form '``-``' and '``--``'). Long
@@ -124,7 +124,7 @@ In a script, typical usage is something like this::
opts, args = getopt.getopt(sys.argv[1:], "ho:v", ["help", "output="])
except getopt.GetoptError as err:
# print help information and exit:
- print(err) # will print something like "option -a not recognized"
+ print(err) # will print something like "option -a not recognized"
usage()
sys.exit(2)
output = None
diff --git a/Doc/library/getpass.rst b/Doc/library/getpass.rst
index 211563e23e..5eb9f04a8d 100644
--- a/Doc/library/getpass.rst
+++ b/Doc/library/getpass.rst
@@ -3,10 +3,15 @@
.. module:: getpass
:synopsis: Portable reading of passwords and retrieval of the userid.
+
.. moduleauthor:: Piers Lauder <piers@cs.su.oz.au>
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
.. Windows (& Mac?) support by Guido van Rossum.
+**Source code:** :source:`Lib/getpass.py`
+
+--------------
+
The :mod:`getpass` module provides two functions:
@@ -23,8 +28,6 @@ The :mod:`getpass` module provides two functions:
a warning message to *stream* and reading from ``sys.stdin`` and
issuing a :exc:`GetPassWarning`.
- Availability: Macintosh, Unix, Windows.
-
.. note::
If you call getpass from within IDLE, the input may be done in the
terminal you launched IDLE from rather than the idle window itself.
@@ -36,7 +39,7 @@ The :mod:`getpass` module provides two functions:
.. function:: getuser()
- Return the "login name" of the user. Availability: Unix, Windows.
+ Return the "login name" of the user.
This function checks the environment variables :envvar:`LOGNAME`,
:envvar:`USER`, :envvar:`LNAME` and :envvar:`USERNAME`, in order, and returns
diff --git a/Doc/library/gettext.rst b/Doc/library/gettext.rst
index ff23b59156..ea439b527f 100644
--- a/Doc/library/gettext.rst
+++ b/Doc/library/gettext.rst
@@ -3,6 +3,7 @@
.. module:: gettext
:synopsis: Multilingual internationalization services.
+
.. moduleauthor:: Barry A. Warsaw <barry@python.org>
.. sectionauthor:: Barry A. Warsaw <barry@python.org>
@@ -344,9 +345,9 @@ will assume message ids as Unicode strings, not byte strings.
The entire set of key/value pairs are placed into a dictionary and set as the
"protected" :attr:`_info` instance variable.
-If the :file:`.mo` file's magic number is invalid, or if other problems occur
-while reading the file, instantiating a :class:`GNUTranslations` class can raise
-:exc:`OSError`.
+If the :file:`.mo` file's magic number is invalid, the major version number is
+unexpected, or if other problems occur while reading the file, instantiating a
+:class:`GNUTranslations` class can raise :exc:`OSError`.
The following methods are overridden from the base class implementation:
diff --git a/Doc/library/glob.rst b/Doc/library/glob.rst
index 8e9af376a8..328eef30f1 100644
--- a/Doc/library/glob.rst
+++ b/Doc/library/glob.rst
@@ -4,11 +4,10 @@
.. module:: glob
:synopsis: Unix shell style pathname pattern expansion.
+**Source code:** :source:`Lib/glob.py`
.. index:: single: filenames; pathname expansion
-**Source code:** :source:`Lib/glob.py`
-
--------------
The :mod:`glob` module finds all the pathnames matching a specified pattern
@@ -29,7 +28,7 @@ For example, ``'[?]'`` matches the character ``'?'``.
The :mod:`pathlib` module offers high-level path objects.
-.. function:: glob(pathname)
+.. function:: glob(pathname, *, recursive=False)
Return a possibly-empty list of path names that match *pathname*, which must be
a string containing a path specification. *pathname* can be either absolute
@@ -37,8 +36,19 @@ For example, ``'[?]'`` matches the character ``'?'``.
:file:`../../Tools/\*/\*.gif`), and can contain shell-style wildcards. Broken
symlinks are included in the results (as in the shell).
+ If *recursive* is true, the pattern "``**``" will match any files and zero or
+ more directories and subdirectories. If the pattern is followed by an
+ ``os.sep``, only directories and subdirectories match.
+
+ .. note::
+ Using the "``**``" pattern in large directory trees may consume
+ an inordinate amount of time.
+
+ .. versionchanged:: 3.5
+ Support for recursive globs using "``**``".
+
-.. function:: iglob(pathname)
+.. function:: iglob(pathname, recursive=False)
Return an :term:`iterator` which yields the same values as :func:`glob`
without actually storing them all simultaneously.
@@ -55,8 +65,9 @@ For example, ``'[?]'`` matches the character ``'?'``.
.. versionadded:: 3.4
-For example, consider a directory containing only the following files:
-:file:`1.gif`, :file:`2.txt`, and :file:`card.gif`. :func:`glob` will produce
+For example, consider a directory containing the following files:
+:file:`1.gif`, :file:`2.txt`, :file:`card.gif` and a subdirectory :file:`sub`
+which contains only the file :file:`3.txt`. :func:`glob` will produce
the following results. Notice how any leading components of the path are
preserved. ::
@@ -67,6 +78,10 @@ preserved. ::
['1.gif', 'card.gif']
>>> glob.glob('?.gif')
['1.gif']
+ >>> glob.glob('**/*.txt', recursive=True)
+ ['2.txt', 'sub/3.txt']
+ >>> glob.glob('./**/', recursive=True)
+ ['./', './sub/']
If the directory contains files starting with ``.`` they won't be matched by
default. For example, consider a directory containing :file:`card.gif` and
diff --git a/Doc/library/grp.rst b/Doc/library/grp.rst
index 88821406a3..a30e6229db 100644
--- a/Doc/library/grp.rst
+++ b/Doc/library/grp.rst
@@ -5,6 +5,7 @@
:platform: Unix
:synopsis: The group database (getgrnam() and friends).
+--------------
This module provides access to the Unix group database. It is available on all
Unix versions.
diff --git a/Doc/library/gzip.rst b/Doc/library/gzip.rst
index 355cf9ccfe..792d57a8a3 100644
--- a/Doc/library/gzip.rst
+++ b/Doc/library/gzip.rst
@@ -90,13 +90,9 @@ The module defines the following items:
is no compression. The default is ``9``.
The *mtime* argument is an optional numeric timestamp to be written to
- the stream when compressing. All :program:`gzip` compressed streams are
- required to contain a timestamp. If omitted or ``None``, the current
- time is used. This module ignores the timestamp when decompressing;
- however, some programs, such as :program:`gunzip`\ , make use of it.
- The format of the timestamp is the same as that of the return value of
- ``time.time()`` and of the ``st_mtime`` attribute of the object returned
- by ``os.stat()``.
+ the last modification time field in the stream when compressing. It
+ should only be provided in compression mode. If omitted or ``None``, the
+ current time is used. See the :attr:`mtime` attribute for more details.
Calling a :class:`GzipFile` object's :meth:`close` method does not close
*fileobj*, since you might wish to append more material after the compressed
@@ -108,9 +104,9 @@ The module defines the following items:
including iteration and the :keyword:`with` statement. Only the
:meth:`truncate` method isn't implemented.
- :class:`GzipFile` also provides the following method:
+ :class:`GzipFile` also provides the following method and attribute:
- .. method:: peek([n])
+ .. method:: peek(n)
Read *n* uncompressed bytes without advancing the file position.
At most one single read on the compressed stream is done to satisfy
@@ -124,9 +120,21 @@ The module defines the following items:
.. versionadded:: 3.2
+ .. attribute:: mtime
+
+ When decompressing, the value of the last modification time field in
+ the most recently read header may be read from this attribute, as an
+ integer. The initial value before reading any headers is ``None``.
+
+ All :program:`gzip` compressed streams are required to contain this
+ timestamp field. Some programs, such as :program:`gunzip`\ , make use
+ of the timestamp. The format is the same as the return value of
+ :func:`time.time` and the :attr:`~os.stat_result.st_mtime` attribute of
+ the object returned by :func:`os.stat`.
+
.. versionchanged:: 3.1
Support for the :keyword:`with` statement was added, along with the
- *mtime* argument.
+ *mtime* constructor argument and :attr:`mtime` attribute.
.. versionchanged:: 3.2
Support for zero-padded and unseekable files was added.
@@ -137,6 +145,12 @@ The module defines the following items:
.. versionchanged:: 3.4
Added support for the ``'x'`` and ``'xb'`` modes.
+ .. versionchanged:: 3.5
+ Added support for writing arbitrary
+ :term:`bytes-like objects <bytes-like object>`.
+ The :meth:`~io.BufferedIOBase.read` method now accepts an argument of
+ ``None``.
+
.. function:: compress(data, compresslevel=9)
@@ -175,9 +189,10 @@ Example of how to create a compressed GZIP file::
Example of how to GZIP compress an existing file::
import gzip
+ import shutil
with open('/home/joe/file.txt', 'rb') as f_in:
with gzip.open('/home/joe/file.txt.gz', 'wb') as f_out:
- f_out.writelines(f_in)
+ shutil.copyfileobj(f_in, f_out)
Example of how to GZIP compress a binary string::
diff --git a/Doc/library/hashlib.rst b/Doc/library/hashlib.rst
index 769f96f017..30be3354af 100644
--- a/Doc/library/hashlib.rst
+++ b/Doc/library/hashlib.rst
@@ -3,16 +3,16 @@
.. module:: hashlib
:synopsis: Secure hash and message digest algorithms.
+
.. moduleauthor:: Gregory P. Smith <greg@krypto.org>
.. sectionauthor:: Gregory P. Smith <greg@krypto.org>
+**Source code:** :source:`Lib/hashlib.py`
.. index::
single: message digest, MD5
single: secure hash algorithm, SHA1, SHA224, SHA256, SHA384, SHA512
-**Source code:** :source:`Lib/hashlib.py`
-
--------------
This module implements a common interface to many different secure hash and
@@ -41,7 +41,7 @@ Hash algorithms
There is one constructor method named for each type of :dfn:`hash`. All return
a hash object with the same simple interface. For example: use :func:`sha1` to
create a SHA1 hash object. You can now feed this object with :term:`bytes-like
-object`\ s (normally :class:`bytes`) using the :meth:`update` method.
+objects <bytes-like object>` (normally :class:`bytes`) using the :meth:`update` method.
At any point you can ask it for the :dfn:`digest` of the
concatenation of the data fed to it so far using the :meth:`digest` or
:meth:`hexdigest` methods.
@@ -185,22 +185,23 @@ brute-force attacks. A good password hashing function must be tunable, slow, and
include a `salt <https://en.wikipedia.org/wiki/Salt_%28cryptography%29>`_.
-.. function:: pbkdf2_hmac(name, password, salt, rounds, dklen=None)
+.. function:: pbkdf2_hmac(hash_name, password, salt, iterations, dklen=None)
The function provides PKCS#5 password-based key derivation function 2. It
uses HMAC as pseudorandom function.
- The string *name* is the desired name of the hash digest algorithm for
+ The string *hash_name* is the desired name of the hash digest algorithm for
HMAC, e.g. 'sha1' or 'sha256'. *password* and *salt* are interpreted as
buffers of bytes. Applications and libraries should limit *password* to
- a sensible value (e.g. 1024). *salt* should be about 16 or more bytes from
+ a sensible length (e.g. 1024). *salt* should be about 16 or more bytes from
a proper source, e.g. :func:`os.urandom`.
- The number of *rounds* should be chosen based on the hash algorithm and
- computing power. As of 2013, at least 100,000 rounds of SHA-256 is suggested.
+ The number of *iterations* should be chosen based on the hash algorithm and
+ computing power. As of 2013, at least 100,000 iterations of SHA-256 are
+ suggested.
*dklen* is the length of the derived key. If *dklen* is ``None`` then the
- digest size of the hash algorithm *name* is used, e.g. 64 for SHA-512.
+ digest size of the hash algorithm *hash_name* is used, e.g. 64 for SHA-512.
>>> import hashlib, binascii
>>> dk = hashlib.pbkdf2_hmac('sha256', b'password', b'salt', 100000)
@@ -231,5 +232,5 @@ include a `salt <https://en.wikipedia.org/wiki/Salt_%28cryptography%29>`_.
Wikipedia article with information on which algorithms have known issues and
what that means regarding their use.
- http://www.ietf.org/rfc/rfc2898.txt
+ https://www.ietf.org/rfc/rfc2898.txt
PKCS #5: Password-Based Cryptography Specification Version 2.0
diff --git a/Doc/library/heapq.rst b/Doc/library/heapq.rst
index f8970bed73..7e33e74814 100644
--- a/Doc/library/heapq.rst
+++ b/Doc/library/heapq.rst
@@ -3,6 +3,7 @@
.. module:: heapq
:synopsis: Heap queue algorithm (a.k.a. priority queue).
+
.. moduleauthor:: Kevin O'Connor
.. sectionauthor:: Guido van Rossum <guido@python.org>
.. sectionauthor:: François Pinard
@@ -82,7 +83,7 @@ The following functions are provided:
The module also offers three general purpose functions based on heaps.
-.. function:: merge(*iterables)
+.. function:: merge(*iterables, key=None, reverse=False)
Merge multiple sorted inputs into a single sorted output (for example, merge
timestamped entries from multiple log files). Returns an :term:`iterator`
@@ -92,6 +93,18 @@ The module also offers three general purpose functions based on heaps.
not pull the data into memory all at once, and assumes that each of the input
streams is already sorted (smallest to largest).
+ Has two optional arguments which must be specified as keyword arguments.
+
+ *key* specifies a :term:`key function` of one argument that is used to
+ extract a comparison key from each input element. The default value is
+ ``None`` (compare the elements directly).
+
+ *reverse* is a boolean value. If set to ``True``, then the input elements
+ are merged as if each comparison were reversed.
+
+ .. versionchanged:: 3.5
+ Added the optional *key* and *reverse* parameters.
+
.. function:: nlargest(n, iterable, key=None)
@@ -120,7 +133,7 @@ the iterable into an actual heap.
Basic Examples
--------------
-A `heapsort <http://en.wikipedia.org/wiki/Heapsort>`_ can be implemented by
+A `heapsort <https://en.wikipedia.org/wiki/Heapsort>`_ can be implemented by
pushing all values onto a heap and then popping off the smallest values one at a
time::
@@ -151,7 +164,7 @@ Heap elements can be tuples. This is useful for assigning comparison values
Priority Queue Implementation Notes
-----------------------------------
-A `priority queue <http://en.wikipedia.org/wiki/Priority_queue>`_ is common use
+A `priority queue <https://en.wikipedia.org/wiki/Priority_queue>`_ is common use
for a heap, and it presents several implementation challenges:
* Sort stability: how do you get two tasks with equal priorities to be returned
@@ -230,7 +243,7 @@ for a tournament. The numbers below are *k*, not ``a[k]``::
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
-In the tree above, each cell *k* is topping ``2*k+1`` and ``2*k+2``. In an usual
+In the tree above, each cell *k* is topping ``2*k+1`` and ``2*k+2``. In a usual
binary tournament we see in sports, each cell is the winner over the two cells
it tops, and we can trace the winner down the tree to see all opponents s/he
had. However, in many computer applications of such tournaments, we do not need
diff --git a/Doc/library/hmac.rst b/Doc/library/hmac.rst
index 1446da6ee6..bb44866879 100644
--- a/Doc/library/hmac.rst
+++ b/Doc/library/hmac.rst
@@ -3,6 +3,7 @@
.. module:: hmac
:synopsis: Keyed-Hashing for Message Authentication (HMAC) implementation
+
.. moduleauthor:: Gerhard Häring <ghaering@users.sourceforge.net>
.. sectionauthor:: Gerhard Häring <ghaering@users.sourceforge.net>
diff --git a/Doc/library/html.entities.rst b/Doc/library/html.entities.rst
index e10e46e2b8..067e1b1e5a 100644
--- a/Doc/library/html.entities.rst
+++ b/Doc/library/html.entities.rst
@@ -3,6 +3,7 @@
.. module:: html.entities
:synopsis: Definitions of HTML general entities.
+
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
**Source code:** :source:`Lib/html/entities.py`
@@ -43,4 +44,4 @@ This module defines four dictionaries, :data:`html5`,
.. rubric:: Footnotes
-.. [#] See http://www.w3.org/TR/html5/syntax.html#named-character-references
+.. [#] See https://www.w3.org/TR/html5/syntax.html#named-character-references
diff --git a/Doc/library/html.parser.rst b/Doc/library/html.parser.rst
index fef9c38411..16abb40621 100644
--- a/Doc/library/html.parser.rst
+++ b/Doc/library/html.parser.rst
@@ -4,33 +4,24 @@
.. module:: html.parser
:synopsis: A simple parser that can handle HTML and XHTML.
+**Source code:** :source:`Lib/html/parser.py`
.. index::
single: HTML
single: XHTML
-**Source code:** :source:`Lib/html/parser.py`
-
--------------
This module defines a class :class:`HTMLParser` which serves as the basis for
parsing text files formatted in HTML (HyperText Mark-up Language) and XHTML.
-.. class:: HTMLParser(strict=False, *, convert_charrefs=False)
+.. class:: HTMLParser(*, convert_charrefs=True)
- Create a parser instance.
+ Create a parser instance able to parse invalid markup.
- If *convert_charrefs* is ``True`` (default: ``False``), all character
+ If *convert_charrefs* is ``True`` (the default), all character
references (except the ones in ``script``/``style`` elements) are
automatically converted to the corresponding Unicode characters.
- The use of ``convert_charrefs=True`` is encouraged and will become
- the default in Python 3.5.
-
- If *strict* is ``False`` (the default), the parser will accept and parse
- invalid markup. If *strict* is ``True`` the parser will raise an
- :exc:`~html.parser.HTMLParseError` exception instead [#]_ when it's not
- able to parse the markup. The use of ``strict=True`` is discouraged and
- the *strict* argument is deprecated.
An :class:`.HTMLParser` instance is fed HTML data and calls handler methods
when start tags, end tags, text, comments, and other markup elements are
@@ -40,31 +31,11 @@ parsing text files formatted in HTML (HyperText Mark-up Language) and XHTML.
This parser does not check that end tags match start tags or call the end-tag
handler for elements which are closed implicitly by closing an outer element.
- .. versionchanged:: 3.2
- *strict* argument added.
-
- .. deprecated-removed:: 3.3 3.5
- The *strict* argument and the strict mode have been deprecated.
- The parser is now able to accept and parse invalid markup too.
-
.. versionchanged:: 3.4
*convert_charrefs* keyword argument added.
-An exception is defined as well:
-
-
-.. exception:: HTMLParseError
-
- Exception raised by the :class:`HTMLParser` class when it encounters an error
- while parsing and *strict* is ``True``. This exception provides three
- attributes: :attr:`msg` is a brief message explaining the error,
- :attr:`lineno` is the number of the line on which the broken construct was
- detected, and :attr:`offset` is the number of characters into the line at
- which the construct starts.
-
- .. deprecated-removed:: 3.3 3.5
- This exception has been deprecated because it's never raised by the parser
- (when the default non-strict mode is used).
+ .. versionchanged:: 3.5
+ The default value for argument *convert_charrefs* is now ``True``.
Example HTML Parser Application
@@ -79,8 +50,10 @@ as they are encountered::
class MyHTMLParser(HTMLParser):
def handle_starttag(self, tag, attrs):
print("Encountered a start tag:", tag)
+
def handle_endtag(self, tag):
print("Encountered an end tag :", tag)
+
def handle_data(self, data):
print("Encountered some data :", data)
@@ -159,8 +132,8 @@ implementations do nothing (except for :meth:`~HTMLParser.handle_startendtag`):
and quotes in the *value* have been removed, and character and entity references
have been replaced.
- For instance, for the tag ``<A HREF="http://www.cwi.nl/">``, this method
- would be called as ``handle_starttag('a', [('href', 'http://www.cwi.nl/')])``.
+ For instance, for the tag ``<A HREF="https://www.cwi.nl/">``, this method
+ would be called as ``handle_starttag('a', [('href', 'https://www.cwi.nl/')])``.
All entity references from :mod:`html.entities` are replaced in the attribute
values.
@@ -246,8 +219,7 @@ implementations do nothing (except for :meth:`~HTMLParser.handle_startendtag`):
The *data* parameter will be the entire contents of the declaration inside
the ``<![...]>`` markup. It is sometimes useful to be overridden by a
- derived class. The base class implementation raises an :exc:`HTMLParseError`
- when *strict* is ``True``.
+ derived class. The base class implementation does nothing.
.. _htmlparser-examples:
@@ -266,21 +238,27 @@ examples::
print("Start tag:", tag)
for attr in attrs:
print(" attr:", attr)
+
def handle_endtag(self, tag):
print("End tag :", tag)
+
def handle_data(self, data):
print("Data :", data)
+
def handle_comment(self, data):
print("Comment :", data)
+
def handle_entityref(self, name):
c = chr(name2codepoint[name])
print("Named ent:", c)
+
def handle_charref(self, name):
if name.startswith('x'):
c = chr(int(name[1:], 16))
else:
c = chr(int(name))
print("Num ent :", c)
+
def handle_decl(self, data):
print("Decl :", data)
@@ -312,7 +290,7 @@ further parsing::
attr: ('type', 'text/css')
Data : #python { color: green }
End tag : style
- >>>
+
>>> parser.feed('<script type="text/javascript">'
... 'alert("<strong>hello!</strong>");</script>')
Start tag: script
@@ -358,9 +336,3 @@ Parsing invalid HTML (e.g. unquoted attributes) also works::
Data : tag soup
End tag : p
End tag : a
-
-.. rubric:: Footnotes
-
-.. [#] For backward compatibility reasons *strict* mode does not raise
- exceptions for all non-compliant HTML. That is, some invalid HTML
- is tolerated even in *strict* mode.
diff --git a/Doc/library/http.client.rst b/Doc/library/http.client.rst
index 807f685248..8954648976 100644
--- a/Doc/library/http.client.rst
+++ b/Doc/library/http.client.rst
@@ -4,6 +4,7 @@
.. module:: http.client
:synopsis: HTTP and HTTPS protocol client (requires sockets).
+**Source code:** :source:`Lib/http/client.py`
.. index::
pair: HTTP; protocol
@@ -11,8 +12,6 @@
.. index:: module: urllib.request
-**Source code:** :source:`Lib/http/client.py`
-
--------------
This module defines classes which implement the client side of the HTTP and
@@ -21,8 +20,8 @@ HTTPS protocols. It is normally not used directly --- the module
.. seealso::
- The `Requests package <http://requests.readthedocs.org/>`_
- is recommended for a higher-level http client interface.
+ The `Requests package <https://requests.readthedocs.org/>`_
+ is recommended for a higher-level HTTP client interface.
.. note::
@@ -180,6 +179,17 @@ The following exceptions are raised as appropriate:
is received in the HTTP protocol from the server.
+.. exception:: RemoteDisconnected
+
+ A subclass of :exc:`ConnectionResetError` and :exc:`BadStatusLine`. Raised
+ by :meth:`HTTPConnection.getresponse` when the attempt to read the response
+ results in no data read from the connection, indicating that the remote end
+ has closed the connection.
+
+ .. versionadded:: 3.5
+ Previously, :exc:`BadStatusLine`\ ``('')`` was raised.
+
+
The constants defined in this module are:
.. data:: HTTP_PORT
@@ -191,221 +201,15 @@ The constants defined in this module are:
The default port for the HTTPS protocol (always ``443``).
-and also the following constants for integer status codes:
-
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| Constant | Value | Definition |
-+==========================================+=========+=======================================================================+
-| :const:`CONTINUE` | ``100`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.1.1 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.1.1>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`SWITCHING_PROTOCOLS` | ``101`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.1.2 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.1.2>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`PROCESSING` | ``102`` | WEBDAV, `RFC 2518, Section 10.1 |
-| | | <http://www.webdav.org/specs/rfc2518.html#STATUS_102>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`OK` | ``200`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.2.1 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.1>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`CREATED` | ``201`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.2.2 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.2>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`ACCEPTED` | ``202`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.2.3 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.3>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`NON_AUTHORITATIVE_INFORMATION` | ``203`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.2.4 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.4>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`NO_CONTENT` | ``204`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.2.5 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.5>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`RESET_CONTENT` | ``205`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.2.6 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.6>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`PARTIAL_CONTENT` | ``206`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.2.7 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.7>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`MULTI_STATUS` | ``207`` | WEBDAV `RFC 2518, Section 10.2 |
-| | | <http://www.webdav.org/specs/rfc2518.html#STATUS_207>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`IM_USED` | ``226`` | Delta encoding in HTTP, |
-| | | :rfc:`3229`, Section 10.4.1 |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`MULTIPLE_CHOICES` | ``300`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.3.1 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.1>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`MOVED_PERMANENTLY` | ``301`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.3.2 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.2>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`FOUND` | ``302`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.3.3 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.3>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`SEE_OTHER` | ``303`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.3.4 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.4>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`NOT_MODIFIED` | ``304`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.3.5 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.5>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`USE_PROXY` | ``305`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.3.6 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.6>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`TEMPORARY_REDIRECT` | ``307`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.3.8 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.8>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`BAD_REQUEST` | ``400`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.4.1 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`UNAUTHORIZED` | ``401`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.4.2 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`PAYMENT_REQUIRED` | ``402`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.4.3 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.3>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`FORBIDDEN` | ``403`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.4.4 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.4>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`NOT_FOUND` | ``404`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.4.5 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`METHOD_NOT_ALLOWED` | ``405`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.4.6 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`NOT_ACCEPTABLE` | ``406`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.4.7 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.7>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`PROXY_AUTHENTICATION_REQUIRED` | ``407`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.4.8 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.8>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`REQUEST_TIMEOUT` | ``408`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.4.9 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.9>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`CONFLICT` | ``409`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.4.10 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`GONE` | ``410`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.4.11 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.11>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`LENGTH_REQUIRED` | ``411`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.4.12 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.12>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`PRECONDITION_FAILED` | ``412`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.4.13 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.13>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`REQUEST_ENTITY_TOO_LARGE` | ``413`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.4.14 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.14>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`REQUEST_URI_TOO_LONG` | ``414`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.4.15 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.15>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`UNSUPPORTED_MEDIA_TYPE` | ``415`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.4.16 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.16>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`REQUESTED_RANGE_NOT_SATISFIABLE` | ``416`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.4.17 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.17>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`EXPECTATION_FAILED` | ``417`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.4.18 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.18>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`UNPROCESSABLE_ENTITY` | ``422`` | WEBDAV, `RFC 2518, Section 10.3 |
-| | | <http://www.webdav.org/specs/rfc2518.html#STATUS_422>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`LOCKED` | ``423`` | WEBDAV `RFC 2518, Section 10.4 |
-| | | <http://www.webdav.org/specs/rfc2518.html#STATUS_423>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`FAILED_DEPENDENCY` | ``424`` | WEBDAV, `RFC 2518, Section 10.5 |
-| | | <http://www.webdav.org/specs/rfc2518.html#STATUS_424>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`UPGRADE_REQUIRED` | ``426`` | HTTP Upgrade to TLS, |
-| | | :rfc:`2817`, Section 6 |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`PRECONDITION_REQUIRED` | ``428`` | Additional HTTP Status Codes, |
-| | | :rfc:`6585`, Section 3 |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`TOO_MANY_REQUESTS` | ``429`` | Additional HTTP Status Codes, |
-| | | :rfc:`6585`, Section 4 |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`REQUEST_HEADER_FIELDS_TOO_LARGE` | ``431`` | Additional HTTP Status Codes, |
-| | | :rfc:`6585`, Section 5 |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`INTERNAL_SERVER_ERROR` | ``500`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.5.1 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`NOT_IMPLEMENTED` | ``501`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.5.2 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`BAD_GATEWAY` | ``502`` | HTTP/1.1 `RFC 2616, Section |
-| | | 10.5.3 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.3>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`SERVICE_UNAVAILABLE` | ``503`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.5.4 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.4>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`GATEWAY_TIMEOUT` | ``504`` | HTTP/1.1 `RFC 2616, Section |
-| | | 10.5.5 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.5>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`HTTP_VERSION_NOT_SUPPORTED` | ``505`` | HTTP/1.1, `RFC 2616, Section |
-| | | 10.5.6 |
-| | | <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.6>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`INSUFFICIENT_STORAGE` | ``507`` | WEBDAV, `RFC 2518, Section 10.6 |
-| | | <http://www.webdav.org/specs/rfc2518.html#STATUS_507>`_ |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`NOT_EXTENDED` | ``510`` | An HTTP Extension Framework, |
-| | | :rfc:`2774`, Section 7 |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-| :const:`NETWORK_AUTHENTICATION_REQUIRED` | ``511`` | Additional HTTP Status Codes, |
-| | | :rfc:`6585`, Section 6 |
-+------------------------------------------+---------+-----------------------------------------------------------------------+
-
-.. versionchanged:: 3.3
- Added codes ``428``, ``429``, ``431`` and ``511`` from :rfc:`6585`.
-
-
.. data:: responses
This dictionary maps the HTTP 1.1 status codes to the W3C names.
Example: ``http.client.responses[http.client.NOT_FOUND]`` is ``'Not Found'``.
+See :ref:`http-status-codes` for a list of HTTP status codes that are
+available in this module as constants.
+
.. _httpconnection-objects:
@@ -458,6 +262,11 @@ HTTPConnection Objects
Note that you must have read the whole response before you can send a new
request to the server.
+ .. versionchanged:: 3.5
+ If a :exc:`ConnectionError` or subclass is raised, the
+ :class:`HTTPConnection` object will be ready to reconnect when
+ a new request is sent.
+
.. method:: HTTPConnection.set_debuglevel(level)
@@ -496,7 +305,9 @@ HTTPConnection Objects
.. method:: HTTPConnection.connect()
- Connect to the server specified when the object was created.
+ Connect to the server specified when the object was created. By default,
+ this is called automatically when making a request if the client does not
+ already have a connection.
.. method:: HTTPConnection.close()
@@ -550,6 +361,10 @@ server. It provides access to the request headers and the entity
body. The response is an iterable object and can be used in a with
statement.
+.. versionchanged:: 3.5
+ The :class:`io.BufferedIOBase` interface is now implemented and
+ all of its reader operations are supported.
+
.. method:: HTTPResponse.read([amt])
@@ -625,7 +440,7 @@ Here is an example session that uses the ``GET`` method::
>>> conn.request("GET", "/")
>>> r1 = conn.getresponse()
>>> while not r1.closed:
- ... print(r1.read(200)) # 200 bytes
+ ... print(r1.read(200)) # 200 bytes
b'<!doctype html>\n<!--[if"...
...
>>> # Example of an invalid request
diff --git a/Doc/library/http.cookiejar.rst b/Doc/library/http.cookiejar.rst
index ca68aacc92..5370601544 100644
--- a/Doc/library/http.cookiejar.rst
+++ b/Doc/library/http.cookiejar.rst
@@ -3,6 +3,7 @@
.. module:: http.cookiejar
:synopsis: Classes for automatic handling of HTTP cookies.
+
.. moduleauthor:: John J. Lee <jjl@pobox.com>
.. sectionauthor:: John J. Lee <jjl@pobox.com>
@@ -115,7 +116,7 @@ The following classes are provided:
:mod:`http.cookiejar` and :mod:`http.cookies` modules do not depend on each
other.
- http://curl.haxx.se/rfc/cookie_spec.html
+ https://curl.haxx.se/rfc/cookie_spec.html
The specification of the original Netscape cookie protocol. Though this is
still the dominant protocol, the 'Netscape cookie protocol' implemented by all
the major browsers (and :mod:`http.cookiejar`) only bears a passing resemblance to
diff --git a/Doc/library/http.cookies.rst b/Doc/library/http.cookies.rst
index d0c1e54dbe..4b45d4bc38 100644
--- a/Doc/library/http.cookies.rst
+++ b/Doc/library/http.cookies.rst
@@ -3,6 +3,7 @@
.. module:: http.cookies
:synopsis: Support for HTTP state management (cookies).
+
.. moduleauthor:: Timothy O'Malley <timo@alum.mit.edu>
.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
@@ -141,28 +142,45 @@ Morsel Objects
in HTTP requests, and is not accessible through JavaScript. This is intended
to mitigate some forms of cross-site scripting.
- The keys are case-insensitive.
+ The keys are case-insensitive and their default value is ``''``.
+
+ .. versionchanged:: 3.5
+ :meth:`~Morsel.__eq__` now takes :attr:`~Morsel.key` and :attr:`~Morsel.value`
+ into account.
.. attribute:: Morsel.value
The value of the cookie.
+ .. deprecated:: 3.5
+ assigning to ``value``; use :meth:`~Morsel.set` instead.
+
.. attribute:: Morsel.coded_value
The encoded value of the cookie --- this is what should be sent.
+ .. deprecated:: 3.5
+ assigning to ``coded_value``; use :meth:`~Morsel.set` instead.
+
.. attribute:: Morsel.key
The name of the cookie.
+ .. deprecated:: 3.5
+ assigning to ``key``; use :meth:`~Morsel.set` instead.
+
.. method:: Morsel.set(key, value, coded_value)
Set the *key*, *value* and *coded_value* attributes.
+ .. deprecated:: 3.5
+ The undocumented *LegalChars* parameter is ignored and will be removed in
+ a future version.
+
.. method:: Morsel.isReservedKey(K)
@@ -193,6 +211,30 @@ Morsel Objects
The meaning for *attrs* is the same as in :meth:`output`.
+.. method:: Morsel.update(values)
+
+ Update the values in the Morsel dictionary with the values in the dictionary
+ *values*. Raise an error if any of the keys in the *values* dict is not a
+ valid :rfc:`2109` attribute.
+
+ .. versionchanged:: 3.5
+ an error is raised for invalid keys.
+
+
+.. method:: Morsel.copy(value)
+
+ Return a shallow copy of the Morsel object.
+
+ .. versionchanged:: 3.5
+ return a Morsel object instead of a dict.
+
+
+.. method:: Morsel.setdefault(key, value=None)
+
+ Raise an error if key is not a valid :rfc:`2109` attribute, otherwise
+ behave the same as :meth:`dict.setdefault`.
+
+
.. _cookie-example:
Example
diff --git a/Doc/library/http.rst b/Doc/library/http.rst
index a387a37ddd..be661c5e8c 100644
--- a/Doc/library/http.rst
+++ b/Doc/library/http.rst
@@ -1,7 +1,18 @@
:mod:`http` --- HTTP modules
============================
-``http`` is a package that collects several modules for working with the
+.. module:: http
+ :synopsis: HTTP status codes and messages
+
+**Source code:** :source:`Lib/http/__init__.py`
+
+.. index::
+ pair: HTTP; protocol
+ single: HTTP; http (standard module)
+
+--------------
+
+:mod:`http` is a package that collects several modules for working with the
HyperText Transfer Protocol:
* :mod:`http.client` is a low-level HTTP protocol client; for high-level URL
@@ -9,3 +20,105 @@ HyperText Transfer Protocol:
* :mod:`http.server` contains basic HTTP server classes based on :mod:`socketserver`
* :mod:`http.cookies` has utilities for implementing state management with cookies
* :mod:`http.cookiejar` provides persistence of cookies
+
+:mod:`http` is also a module that defines a number of HTTP status codes and
+associated messages through the :class:`http.HTTPStatus` enum:
+
+.. class:: HTTPStatus
+
+ .. versionadded:: 3.5
+
+ A subclass of :class:`enum.IntEnum` that defines a set of HTTP status codes,
+ reason phrases and long descriptions written in English.
+
+ Usage::
+
+ >>> from http import HTTPStatus
+ >>> HTTPStatus.OK
+ <HTTPStatus.OK: 200>
+ >>> HTTPStatus.OK == 200
+ True
+ >>> http.HTTPStatus.OK.value
+ 200
+ >>> HTTPStatus.OK.phrase
+ 'OK'
+ >>> HTTPStatus.OK.description
+ 'Request fulfilled, document follows'
+ >>> list(HTTPStatus)
+ [<HTTPStatus.CONTINUE: 100>, <HTTPStatus.SWITCHING_PROTOCOLS: 101>, ...]
+
+.. _http-status-codes:
+
+HTTP status codes
+-----------------
+
+Supported,
+`IANA-registered <https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml>`_
+status codes available in :class:`http.HTTPStatus` are:
+
+======= =================================== ==================================================================
+Code Enum Name Details
+======= =================================== ==================================================================
+``100`` ``CONTINUE`` HTTP/1.1 :rfc:`7231`, Section 6.2.1
+``101`` ``SWITCHING_PROTOCOLS`` HTTP/1.1 :rfc:`7231`, Section 6.2.2
+``102`` ``PROCESSING`` WebDAV :rfc:`2518`, Section 10.1
+``200`` ``OK`` HTTP/1.1 :rfc:`7231`, Section 6.3.1
+``201`` ``CREATED`` HTTP/1.1 :rfc:`7231`, Section 6.3.2
+``202`` ``ACCEPTED`` HTTP/1.1 :rfc:`7231`, Section 6.3.3
+``203`` ``NON_AUTHORITATIVE_INFORMATION`` HTTP/1.1 :rfc:`7231`, Section 6.3.4
+``204`` ``NO_CONTENT`` HTTP/1.1 :rfc:`7231`, Section 6.3.5
+``205`` ``RESET_CONTENT`` HTTP/1.1 :rfc:`7231`, Section 6.3.6
+``206`` ``PARTIAL_CONTENT`` HTTP/1.1 :rfc:`7233`, Section 4.1
+``207`` ``MULTI_STATUS`` WebDAV :rfc:`4918`, Section 11.1
+``208`` ``ALREADY_REPORTED`` WebDAV Binding Extensions :rfc:`5842`, Section 7.1 (Experimental)
+``226`` ``IM_USED`` Delta Encoding in HTTP :rfc:`3229`, Section 10.4.1
+``300`` ``MULTIPLE_CHOICES`` HTTP/1.1 :rfc:`7231`, Section 6.4.1
+``301`` ``MOVED_PERMANENTLY`` HTTP/1.1 :rfc:`7231`, Section 6.4.2
+``302`` ``FOUND`` HTTP/1.1 :rfc:`7231`, Section 6.4.3
+``303`` ``SEE_OTHER`` HTTP/1.1 :rfc:`7231`, Section 6.4.4
+``304`` ``NOT_MODIFIED`` HTTP/1.1 :rfc:`7232`, Section 4.1
+``305`` ``USE_PROXY`` HTTP/1.1 :rfc:`7231`, Section 6.4.5
+``307`` ``TEMPORARY_REDIRECT`` HTTP/1.1 :rfc:`7231`, Section 6.4.7
+``308`` ``PERMANENT_REDIRECT`` Permanent Redirect :rfc:`7238`, Section 3 (Experimental)
+``400`` ``BAD_REQUEST`` HTTP/1.1 :rfc:`7231`, Section 6.5.1
+``401`` ``UNAUTHORIZED`` HTTP/1.1 Authentication :rfc:`7235`, Section 3.1
+``402`` ``PAYMENT_REQUIRED`` HTTP/1.1 :rfc:`7231`, Section 6.5.2
+``403`` ``FORBIDDEN`` HTTP/1.1 :rfc:`7231`, Section 6.5.3
+``404`` ``NOT_FOUND`` HTTP/1.1 :rfc:`7231`, Section 6.5.4
+``405`` ``METHOD_NOT_ALLOWED`` HTTP/1.1 :rfc:`7231`, Section 6.5.5
+``406`` ``NOT_ACCEPTABLE`` HTTP/1.1 :rfc:`7231`, Section 6.5.6
+``407`` ``PROXY_AUTHENTICATION_REQUIRED`` HTTP/1.1 Authentication :rfc:`7235`, Section 3.2
+``408`` ``REQUEST_TIMEOUT`` HTTP/1.1 :rfc:`7231`, Section 6.5.7
+``409`` ``CONFLICT`` HTTP/1.1 :rfc:`7231`, Section 6.5.8
+``410`` ``GONE`` HTTP/1.1 :rfc:`7231`, Section 6.5.9
+``411`` ``LENGTH_REQUIRED`` HTTP/1.1 :rfc:`7231`, Section 6.5.10
+``412`` ``PRECONDITION_FAILED`` HTTP/1.1 :rfc:`7232`, Section 4.2
+``413`` ``REQUEST_ENTITY_TOO_LARGE`` HTTP/1.1 :rfc:`7231`, Section 6.5.11
+``414`` ``REQUEST_URI_TOO_LONG`` HTTP/1.1 :rfc:`7231`, Section 6.5.12
+``415`` ``UNSUPPORTED_MEDIA_TYPE`` HTTP/1.1 :rfc:`7231`, Section 6.5.13
+``416`` ``REQUEST_RANGE_NOT_SATISFIABLE`` HTTP/1.1 Range Requests :rfc:`7233`, Section 4.4
+``417`` ``EXPECTATION_FAILED`` HTTP/1.1 :rfc:`7231`, Section 6.5.14
+``422`` ``UNPROCESSABLE_ENTITY`` WebDAV :rfc:`4918`, Section 11.2
+``423`` ``LOCKED`` WebDAV :rfc:`4918`, Section 11.3
+``424`` ``FAILED_DEPENDENCY`` WebDAV :rfc:`4918`, Section 11.4
+``426`` ``UPGRADE_REQUIRED`` HTTP/1.1 :rfc:`7231`, Section 6.5.15
+``428`` ``PRECONDITION_REQUIRED`` Additional HTTP Status Codes :rfc:`6585`
+``429`` ``TOO_MANY_REQUESTS`` Additional HTTP Status Codes :rfc:`6585`
+``431`` ``REQUEST_HEADER_FIELDS_TOO_LARGE`` Additional HTTP Status Codes :rfc:`6585`
+``500`` ``INTERNAL_SERVER_ERROR`` HTTP/1.1 :rfc:`7231`, Section 6.6.1
+``501`` ``NOT_IMPLEMENTED`` HTTP/1.1 :rfc:`7231`, Section 6.6.2
+``502`` ``BAD_GATEWAY`` HTTP/1.1 :rfc:`7231`, Section 6.6.3
+``503`` ``SERVICE_UNAVAILABLE`` HTTP/1.1 :rfc:`7231`, Section 6.6.4
+``504`` ``GATEWAY_TIMEOUT`` HTTP/1.1 :rfc:`7231`, Section 6.6.5
+``505`` ``HTTP_VERSION_NOT_SUPPORTED`` HTTP/1.1 :rfc:`7231`, Section 6.6.6
+``506`` ``VARIANT_ALSO_NEGOTIATES`` Transparent Content Negotiation in HTTP :rfc:`2295`, Section 8.1 (Experimental)
+``507`` ``INSUFFICIENT_STORAGE`` WebDAV :rfc:`4918`, Section 11.5
+``508`` ``LOOP_DETECTED`` WebDAV Binding Extensions :rfc:`5842`, Section 7.2 (Experimental)
+``510`` ``NOT_EXTENDED`` An HTTP Extension Framework :rfc:`2774`, Section 7 (Experimental)
+``511`` ``NETWORK_AUTHENTICATION_REQUIRED`` Additional HTTP Status Codes :rfc:`6585`, Section 6
+======= =================================== ==================================================================
+
+In order to preserve backwards compatibility, enum values are also present
+in the :mod:`http.client` module in the form of constants. The enum name is
+equal to the constant name (i.e. ``http.HTTPStatus.OK`` is also available as
+``http.client.OK``).
diff --git a/Doc/library/http.server.rst b/Doc/library/http.server.rst
index 0bde35b02a..16c4fac947 100644
--- a/Doc/library/http.server.rst
+++ b/Doc/library/http.server.rst
@@ -4,6 +4,7 @@
.. module:: http.server
:synopsis: HTTP server and request handlers.
+**Source code:** :source:`Lib/http/server.py`
.. index::
pair: WWW; server
@@ -11,8 +12,6 @@
single: URL
single: httpd
-**Source code:** :source:`Lib/http/server.py`
-
--------------
This module defines classes for implementing HTTP servers (Web servers).
@@ -97,7 +96,6 @@ of which this module provides three different variants:
:mod:`http.client` is used to parse the headers and it requires that the
HTTP request provide a valid :rfc:`2822` style header.
-
.. attribute:: rfile
Contains an input stream, positioned at the start of the optional input
@@ -109,7 +107,7 @@ of which this module provides three different variants:
client. Proper adherence to the HTTP protocol must be used when writing to
this stream.
- :class:`BaseHTTPRequestHandler` has the following class variables:
+ :class:`BaseHTTPRequestHandler` has the following attributes:
.. attribute:: server_version
@@ -125,13 +123,10 @@ of which this module provides three different variants:
.. attribute:: error_message_format
- Specifies a format string for building an error response to the client. It
- uses parenthesized, keyed format specifiers, so the format operand must be
- a dictionary. The *code* key should be an integer, specifying the numeric
- HTTP error code value. *message* should be a string containing a
- (detailed) error message of what occurred, and *explain* should be an
- explanation of the error code number. Default *message* and *explain*
- values can found in the :attr:`responses` class variable.
+ Specifies a format string that should be used by :meth:`send_error` method
+ for building an error response to the client. The string is filled by
+ default with variables from :attr:`responses` based on the status code
+ that passed to :meth:`send_error`.
.. attribute:: error_content_type
@@ -154,11 +149,11 @@ of which this module provides three different variants:
.. attribute:: responses
- This variable contains a mapping of error code integers to two-element tuples
+ This attribute contains a mapping of error code integers to two-element tuples
containing a short and long message. For example, ``{code: (shortmessage,
longmessage)}``. The *shortmessage* is usually used as the *message* key in an
- error response, and *longmessage* as the *explain* key (see the
- :attr:`error_message_format` class variable).
+ error response, and *longmessage* as the *explain* key. It is used by
+ :meth:`send_response_only` and :meth:`send_error` methods.
A :class:`BaseHTTPRequestHandler` instance has the following methods:
@@ -191,17 +186,18 @@ of which this module provides three different variants:
specifies the HTTP error code, with *message* as an optional, short, human
readable description of the error. The *explain* argument can be used to
provide more detailed information about the error; it will be formatted
- using the :attr:`error_message_format` class variable and emitted, after
+ using the :attr:`error_message_format` attribute and emitted, after
a complete set of headers, as the response body. The :attr:`responses`
- class variable holds the default values for *message* and *explain* that
+ attribute holds the default values for *message* and *explain* that
will be used if no value is provided; for unknown codes the default value
- for both is the string ``???``.
+ for both is the string ``???``. The body will be empty if the method is
+ HEAD or the response code is one of the following: ``1xx``,
+ ``204 No Content``, ``205 Reset Content``, ``304 Not Modified``.
.. versionchanged:: 3.4
The error response includes a Content-Length header.
Added the *explain* argument.
-
.. method:: send_response(code, message=None)
Adds a response header to the headers buffer and logs the accepted
@@ -217,7 +213,6 @@ of which this module provides three different variants:
Headers are stored to an internal buffer and :meth:`end_headers`
needs to be called explicitly.
-
.. method:: send_header(keyword, value)
Adds the HTTP header to an internal buffer which will be written to the
@@ -229,7 +224,6 @@ of which this module provides three different variants:
.. versionchanged:: 3.2
Headers are stored in an internal buffer.
-
.. method:: send_response_only(code, message=None)
Sends the response header only, used for the purposes when ``100
@@ -279,7 +273,7 @@ of which this module provides three different variants:
.. method:: version_string()
Returns the server software's version string. This is a combination of the
- :attr:`server_version` and :attr:`sys_version` class variables.
+ :attr:`server_version` and :attr:`sys_version` attributes.
.. method:: date_time_string(timestamp=None)
diff --git a/Doc/library/idle.rst b/Doc/library/idle.rst
index 4384d56814..9ca92ceb55 100644
--- a/Doc/library/idle.rst
+++ b/Doc/library/idle.rst
@@ -3,12 +3,16 @@
IDLE
====
+.. moduleauthor:: Guido van Rossum <guido@python.org>
+
+**Source code:** :source:`Lib/idlelib/`
+
.. index::
single: IDLE
single: Python Editor
single: Integrated Development Environment
-.. moduleauthor:: Guido van Rossum <guido@python.org>
+--------------
IDLE is Python's Integrated Development and Learning Environment.
@@ -128,7 +132,7 @@ Find Selection
Search for the currently selected string, if there is one.
Find in Files...
- Open a file search dialog. Put results in an new output window.
+ Open a file search dialog. Put results in a new output window.
Replace...
Open a search-and-replace dialog.
@@ -550,14 +554,16 @@ IDLE-console differences
As much as possible, the result of executing Python code with IDLE is the
same as executing the same code in a console window. However, the different
-interface and operation occasionally affects results.
-
-For instance, IDLE normally executes user code in a separate process from
-the IDLE GUI itself. The IDLE versions of sys.stdin, .stdout, and .stderr in the
-execution process get input from and send output to the GUI process,
-which keeps control of the keyboard and screen. This is normally transparent,
-but code that access these object will see different attribute values.
-Also, functions that directly access the keyboard and screen will not work.
+interface and operation occasionally affects visible results. For instance,
+``sys.modules`` starts with more entries.
+
+IDLE also replaces ``sys.stdin``, ``sys.stdout``, and ``sys.stderr`` with
+objects that get input from and send output to the Shell window.
+When this window has the focus, it controls the keyboard and screen.
+This is normally transparent, but functions that directly access the keyboard
+and screen will not work. If ``sys`` is reset with ``importlib.reload(sys)``,
+IDLE's changes are lost and things li ke ``input``, ``raw_input``, and
+``print`` will not work correctly.
With IDLE's Shell, one enters, edits, and recalls complete statements.
Some consoles only work with a single physical line at a time.
diff --git a/Doc/library/imaplib.rst b/Doc/library/imaplib.rst
index fa736fe3af..c25e7d8611 100644
--- a/Doc/library/imaplib.rst
+++ b/Doc/library/imaplib.rst
@@ -3,6 +3,7 @@
.. module:: imaplib
:synopsis: IMAP4 protocol client (requires sockets).
+
.. moduleauthor:: Piers Lauder <piers@communitysolutions.com.au>
.. sectionauthor:: Piers Lauder <piers@communitysolutions.com.au>
.. revised by ESR, January 2000
@@ -10,14 +11,13 @@
.. changes for IMAP4_stream by Piers Lauder <piers@communitysolutions.com.au>,
November 2002
+**Source code:** :source:`Lib/imaplib.py`
.. index::
pair: IMAP4; protocol
pair: IMAP4_SSL; protocol
pair: IMAP4_stream; protocol
-**Source code:** :source:`Lib/imaplib.py`
-
--------------
This module defines three classes, :class:`IMAP4`, :class:`IMAP4_SSL` and
@@ -37,6 +37,19 @@ base class:
initialized. If *host* is not specified, ``''`` (the local host) is used. If
*port* is omitted, the standard IMAP4 port (143) is used.
+ The :class:`IMAP4` class supports the :keyword:`with` statement. When used
+ like this, the IMAP4 ``LOGOUT`` command is issued automatically when the
+ :keyword:`with` statement exits. E.g.::
+
+ >>> from imaplib import IMAP4
+ >>> with IMAP4("domain.org") as M:
+ ... M.noop()
+ ...
+ ('OK', [b'Nothing Accomplished. d25if65hy903weo.87'])
+
+ .. versionchanged:: 3.5
+ Support for the :keyword:`with` statement was added.
+
Three exceptions are defined as attributes of the :class:`IMAP4` class:
@@ -64,7 +77,8 @@ Three exceptions are defined as attributes of the :class:`IMAP4` class:
There's also a subclass for secure connections:
-.. class:: IMAP4_SSL(host='', port=IMAP4_SSL_PORT, keyfile=None, certfile=None, ssl_context=None)
+.. class:: IMAP4_SSL(host='', port=IMAP4_SSL_PORT, keyfile=None, \
+ certfile=None, ssl_context=None)
This is a subclass derived from :class:`IMAP4` that connects over an SSL
encrypted socket (to use this class you need a socket module that was compiled
@@ -143,7 +157,7 @@ example of usage.
Documents describing the protocol, and sources and binaries for servers
implementing it, can all be found at the University of Washington's *IMAP
- Information Center* (http://www.washington.edu/imap/).
+ Information Center* (https://www.washington.edu/imap/).
.. _imap4-objects:
@@ -198,6 +212,10 @@ An :class:`IMAP4` instance has the following methods:
that will be base64 encoded and sent to the server. It should return
``None`` if the client abort response ``*`` should be sent instead.
+ .. versionchanged:: 3.5
+ string usernames and passwords are now encoded to ``utf-8`` instead of
+ being limited to ASCII.
+
.. method:: IMAP4.check()
@@ -230,6 +248,16 @@ An :class:`IMAP4` instance has the following methods:
Delete the ACLs (remove any rights) set for who on mailbox.
+.. method:: IMAP4.enable(capability)
+
+ Enable *capability* (see :rfc:`5161`). Most capabilities do not need to be
+ enabled. Currently only the ``UTF8=ACCEPT`` capability is supported
+ (see :RFC:`6855`).
+
+ .. versionadded:: 3.5
+ The :meth:`enable` method itself, and :RFC:`6855` support.
+
+
.. method:: IMAP4.expunge()
Permanently remove deleted items from selected mailbox. Generates an ``EXPUNGE``
@@ -367,7 +395,9 @@ An :class:`IMAP4` instance has the following methods:
Search mailbox for matching messages. *charset* may be ``None``, in which case
no ``CHARSET`` will be specified in the request to the server. The IMAP
protocol requires that at least one criterion be specified; an exception will be
- raised when the server returns an error.
+ raised when the server returns an error. *charset* must be ``None`` if
+ the ``UTF8=ACCEPT`` capability was enabled using the :meth:`enable`
+ command.
Example::
@@ -529,6 +559,15 @@ The following attributes are defined on instances of :class:`IMAP4`:
the module variable ``Debug``. Values greater than three trace each command.
+.. attribute:: IMAP4.utf8_enabled
+
+ Boolean value that is normally ``False``, but is set to ``True`` if an
+ :meth:`enable` command is successfully issued for the ``UTF8=ACCEPT``
+ capability.
+
+ .. versionadded:: 3.5
+
+
.. _imap4-example:
IMAP4 Example
diff --git a/Doc/library/imghdr.rst b/Doc/library/imghdr.rst
index 9e8952339c..f11f6dcf8e 100644
--- a/Doc/library/imghdr.rst
+++ b/Doc/library/imghdr.rst
@@ -48,6 +48,14 @@ from :func:`what`:
+------------+-----------------------------------+
| ``'png'`` | Portable Network Graphics |
+------------+-----------------------------------+
+| ``'webp'`` | WebP files |
++------------+-----------------------------------+
+| ``'exr'`` | OpenEXR Files |
++------------+-----------------------------------+
+
+.. versionadded:: 3.5
+ The *exr* and *webp* formats were added.
+
You can extend the list of file types :mod:`imghdr` can recognize by appending
to this variable:
diff --git a/Doc/library/imp.rst b/Doc/library/imp.rst
index 83a52e4e14..9828ba6fe2 100644
--- a/Doc/library/imp.rst
+++ b/Doc/library/imp.rst
@@ -5,11 +5,15 @@
:synopsis: Access the implementation of the import statement.
:deprecated:
+**Source code:** :source:`Lib/imp.py`
+
.. deprecated:: 3.4
The :mod:`imp` package is pending deprecation in favor of :mod:`importlib`.
.. index:: statement: import
+--------------
+
This module provides an interface to the mechanisms used to implement the
:keyword:`import` statement. It defines the following constants and functions:
@@ -197,11 +201,9 @@ file paths.
value would be ``/foo/bar/__pycache__/baz.cpython-32.pyc`` for Python 3.2.
The ``cpython-32`` string comes from the current magic tag (see
:func:`get_tag`; if :attr:`sys.implementation.cache_tag` is not defined then
- :exc:`NotImplementedError` will be raised). The returned path will end in
- ``.pyc`` when ``__debug__`` is ``True`` or ``.pyo`` for an optimized Python
- (i.e. ``__debug__`` is ``False``). By passing in ``True`` or ``False`` for
- *debug_override* you can override the system's value for ``__debug__`` for
- extension selection.
+ :exc:`NotImplementedError` will be raised). By passing in ``True`` or
+ ``False`` for *debug_override* you can override the system's value for
+ ``__debug__``, leading to optimized bytecode.
*path* need not exist.
@@ -212,6 +214,9 @@ file paths.
.. deprecated:: 3.4
Use :func:`importlib.util.cache_from_source` instead.
+ .. versionchanged:: 3.5
+ The *debug_override* parameter no longer creates a ``.pyo`` file.
+
.. function:: source_from_cache(path)
diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst
index 42812f67a0..3302446b40 100644
--- a/Doc/library/importlib.rst
+++ b/Doc/library/importlib.rst
@@ -9,6 +9,9 @@
.. versionadded:: 3.1
+**Source code:** :source:`Lib/importlib/__init__.py`
+
+--------------
Introduction
------------
@@ -52,9 +55,18 @@ generically as an :term:`importer`) to participate in the import process.
:pep:`366`
Main module explicit relative imports
+ :pep:`420`
+ Implicit namespace packages
+
:pep:`451`
A ModuleSpec Type for the Import System
+ :pep:`488`
+ Elimination of PYO files
+
+ :pep:`489`
+ Multi-phase extension module initialization
+
:pep:`3120`
Using UTF-8 as the Default Source Encoding
@@ -69,6 +81,10 @@ Functions
An implementation of the built-in :func:`__import__` function.
+ .. note::
+ Programmatic importing of modules should use :func:`import_module`
+ instead of this function.
+
.. function:: import_module(name, package=None)
Import a module. The *name* argument specifies what module to
@@ -81,12 +97,15 @@ Functions
The :func:`import_module` function acts as a simplifying wrapper around
:func:`importlib.__import__`. This means all semantics of the function are
- derived from :func:`importlib.__import__`, including requiring the package
- from which an import is occurring to have been previously imported
- (i.e., *package* must already be imported). The most important difference
- is that :func:`import_module` returns the specified package or module
- (e.g. ``pkg.mod``), while :func:`__import__` returns the
- top-level package or module (e.g. ``pkg``).
+ derived from :func:`importlib.__import__`. The most important difference
+ between these two functions is that :func:`import_module` returns the
+ specified package or module (e.g. ``pkg.mod``), while :func:`__import__`
+ returns the top-level package or module (e.g. ``pkg``).
+
+ If you are dynamically importing a module that was created since the
+ interpreter began execution (e.g., created a Python source file), you may
+ need to call :func:`invalidate_caches` in order for the new module to be
+ noticed by the import system.
.. versionchanged:: 3.3
Parent packages are automatically imported.
@@ -217,7 +236,7 @@ ABC hierarchy::
.. deprecated:: 3.3
Use :class:`MetaPathFinder` or :class:`PathEntryFinder` instead.
- .. method:: find_module(fullname, path=None)
+ .. abstractmethod:: find_module(fullname, path=None)
An abstact method for finding a :term:`loader` for the specified
module. Originally specified in :pep:`302`, this method was meant
@@ -341,13 +360,16 @@ ABC hierarchy::
.. method:: create_module(spec)
- An optional method that returns the module object to use when
- importing a module. create_module() may also return ``None``,
- indicating that the default module creation should take place
- instead.
+ A method that returns the module object to use when
+ importing a module. This method may return ``None``,
+ indicating that default module creation semantics should take place.
.. versionadded:: 3.4
+ .. versionchanged:: 3.5
+ Starting in Python 3.6, this method will not be optional when
+ :meth:`exec_module` is defined.
+
.. method:: exec_module(module)
An abstract method that executes the module in its own namespace
@@ -411,7 +433,7 @@ ABC hierarchy::
.. deprecated:: 3.4
The recommended API for loading a module is :meth:`exec_module`
- (and optionally :meth:`create_module`). Loaders should implement
+ (and :meth:`create_module`). Loaders should implement
it instead of load_module(). The import machinery takes care of
all the other responsibilities of load_module() when exec_module()
is implemented.
@@ -437,7 +459,7 @@ ABC hierarchy::
:pep:`302` protocol for loading arbitrary resources from the storage
back-end.
- .. method:: get_data(path)
+ .. abstractmethod:: get_data(path)
An abstract method to return the bytes for the data located at *path*.
Loaders that have a file-like storage back-end
@@ -473,7 +495,7 @@ ABC hierarchy::
.. versionchanged:: 3.4
No longer abstract and a concrete implementation is provided.
- .. method:: get_source(fullname)
+ .. abstractmethod:: get_source(fullname)
An abstract method to return the source of a module. It is returned as
a text string using :term:`universal newlines`, translating all
@@ -493,7 +515,7 @@ ABC hierarchy::
.. versionchanged:: 3.4
Raises :exc:`ImportError` instead of :exc:`NotImplementedError`.
- .. method:: source_to_code(data, path='<string>')
+ .. staticmethod:: source_to_code(data, path='<string>')
Create a code object from Python source.
@@ -502,8 +524,14 @@ ABC hierarchy::
the "path" to where the source code originated from, which can be an
abstract concept (e.g. location in a zip file).
+ With the subsequent code object one can execute it in a module by
+ running ``exec(code, module.__dict__)``.
+
.. versionadded:: 3.4
+ .. versionchanged:: 3.5
+ Made the method static.
+
.. method:: exec_module(module)
Implementation of :meth:`Loader.exec_module`.
@@ -524,7 +552,7 @@ ABC hierarchy::
when implemented, helps a module to be executed as a script. The ABC
represents an optional :pep:`302` protocol.
- .. method:: get_filename(fullname)
+ .. abstractmethod:: get_filename(fullname)
An abstract method that is to return the value of :attr:`__file__` for
the specified module. If no path is available, :exc:`ImportError` is
@@ -564,11 +592,11 @@ ABC hierarchy::
.. deprecated:: 3.4
Use :meth:`Loader.exec_module` instead.
- .. method:: get_filename(fullname)
+ .. abstractmethod:: get_filename(fullname)
Returns :attr:`path`.
- .. method:: get_data(path)
+ .. abstractmethod:: get_data(path)
Reads *path* as a binary file and returns the bytes from it.
@@ -689,6 +717,9 @@ find and load modules.
.. versionadded:: 3.3
+ .. deprecated:: 3.5
+ Use :attr:`BYTECODE_SUFFIXES` instead.
+
.. attribute:: OPTIMIZED_BYTECODE_SUFFIXES
A list of strings representing the file suffixes for optimized bytecode
@@ -696,14 +727,19 @@ find and load modules.
.. versionadded:: 3.3
+ .. deprecated:: 3.5
+ Use :attr:`BYTECODE_SUFFIXES` instead.
+
.. attribute:: BYTECODE_SUFFIXES
A list of strings representing the recognized file suffixes for bytecode
- modules. Set to either :attr:`DEBUG_BYTECODE_SUFFIXES` or
- :attr:`OPTIMIZED_BYTECODE_SUFFIXES` based on whether ``__debug__`` is true.
+ modules (including the leading dot).
.. versionadded:: 3.3
+ .. versionchanged:: 3.5
+ The value is no longer dependent on ``__debug__``.
+
.. attribute:: EXTENSION_SUFFIXES
A list of strings representing the recognized file suffixes for
@@ -732,9 +768,9 @@ find and load modules.
Only class methods are defined by this class to alleviate the need for
instantiation.
- .. note::
- Due to limitations in the extension module C-API, for now
- BuiltinImporter does not implement :meth:`Loader.exec_module`.
+ .. versionchanged:: 3.5
+ As part of :pep:`489`, the builtin importer now implements
+ :meth:`Loader.create_module` and :meth:`Loader.exec_module`
.. class:: FrozenImporter
@@ -782,6 +818,11 @@ find and load modules.
.. versionadded:: 3.4
+ .. versionchanged:: 3.5
+ If the current working directory -- represented by an empty string --
+ is no longer valid then ``None`` is returned but no value is cached
+ in :data:`sys.path_importer_cache`.
+
.. classmethod:: find_module(fullname, path=None)
A legacy wrapper around :meth:`find_spec`.
@@ -944,14 +985,18 @@ find and load modules.
Path to the extension module.
- .. method:: load_module(name=None)
+ .. method:: create_module(spec)
+
+ Creates the module object from the given specification in accordance
+ with :pep:`489`.
- Loads the extension module if and only if *fullname* is the same as
- :attr:`name` or is ``None``.
+ .. versionadded:: 3.5
- .. note::
- Due to limitations in the extension module C-API, for now
- ExtensionFileLoader does not implement :meth:`Loader.exec_module`.
+ .. method:: exec_module(module)
+
+ Initializes the given module object in accordance with :pep:`489`.
+
+ .. versionadded:: 3.5
.. method:: is_package(fullname)
@@ -1047,23 +1092,37 @@ an :term:`importer`.
.. versionadded:: 3.4
-.. function:: cache_from_source(path, debug_override=None)
+.. function:: cache_from_source(path, debug_override=None, *, optimization=None)
- Return the :pep:`3147` path to the byte-compiled file associated with the
- source *path*. For example, if *path* is ``/foo/bar/baz.py`` the return
+ Return the :pep:`3147`/:pep:`488` path to the byte-compiled file associated
+ with the source *path*. For example, if *path* is ``/foo/bar/baz.py`` the return
value would be ``/foo/bar/__pycache__/baz.cpython-32.pyc`` for Python 3.2.
The ``cpython-32`` string comes from the current magic tag (see
:func:`get_tag`; if :attr:`sys.implementation.cache_tag` is not defined then
- :exc:`NotImplementedError` will be raised). The returned path will end in
- ``.pyc`` when ``__debug__`` is ``True`` or ``.pyo`` for an optimized Python
- (i.e. ``__debug__`` is ``False``). By passing in ``True`` or ``False`` for
- *debug_override* you can override the system's value for ``__debug__`` for
- extension selection.
-
- *path* need not exist.
+ :exc:`NotImplementedError` will be raised).
+
+ The *optimization* parameter is used to specify the optimization level of the
+ bytecode file. An empty string represents no optimization, so
+ ``/foo/bar/baz.py`` with an *optimization* of ``''`` will result in a
+ bytecode path of ``/foo/bar/__pycache__/baz.cpython-32.pyc``. ``None`` causes
+ the interpter's optimization level to be used. Any other value's string
+ representation being used, so ``/foo/bar/baz.py`` with an *optimization* of
+ ``2`` will lead to the bytecode path of
+ ``/foo/bar/__pycache__/baz.cpython-32.opt-2.pyc``. The string representation
+ of *optimization* can only be alphanumeric, else :exc:`ValueError` is raised.
+
+ The *debug_override* parameter is deprecated and can be used to override
+ the system's value for ``__debug__``. A ``True`` value is the equivalent of
+ setting *optimization* to the empty string. A ``False`` value is the same as
+ setting *optimization* to ``1``. If both *debug_override* an *optimization*
+ are not ``None`` then :exc:`TypeError` is raised.
.. versionadded:: 3.4
+ .. versionchanged:: 3.5
+ The *optimization* parameter was added and the *debug_override* parameter
+ was deprecated.
+
.. function:: source_from_cache(path)
@@ -1071,7 +1130,7 @@ an :term:`importer`.
file path. For example, if *path* is
``/foo/bar/__pycache__/baz.cpython-32.pyc`` the returned path would be
``/foo/bar/baz.py``. *path* need not exist, however if it does not conform
- to :pep:`3147` format, a ``ValueError`` is raised. If
+ to :pep:`3147` or :pep:`488` format, a ``ValueError`` is raised. If
:attr:`sys.implementation.cache_tag` is not defined,
:exc:`NotImplementedError` is raised.
@@ -1117,6 +1176,21 @@ an :term:`importer`.
.. versionadded:: 3.4
+.. function:: module_from_spec(spec)
+
+ Create a new module based on **spec** and ``spec.loader.create_module()``.
+
+ If ``spec.loader.create_module()`` does not return ``None``, then any
+ pre-existing attributes will not be reset. Also, no :exc:`AttributeError`
+ will be raised if triggered while accessing **spec** or setting an attribute
+ on the module.
+
+ This function is preferred over using :class:`types.ModuleType` to create a
+ new module as **spec** is used to set as many import-controlled attributes on
+ the module as possible.
+
+ .. versionadded:: 3.5
+
.. decorator:: module_for_loader
A :term:`decorator` for :meth:`importlib.abc.Loader.load_module`
@@ -1195,3 +1269,40 @@ an :term:`importer`.
module will be file-based.
.. versionadded:: 3.4
+
+.. class:: LazyLoader(loader)
+
+ A class which postpones the execution of the loader of a module until the
+ module has an attribute accessed.
+
+ This class **only** works with loaders that define
+ :meth:`~importlib.abc.Loader.exec_module` as control over what module type
+ is used for the module is required. For those same reasons, the loader's
+ :meth:`~importlib.abc.Loader.create_module` method will be ignored (i.e., the
+ loader's method should only return ``None``; this excludes
+ :class:`BuiltinImporter` and :class:`ExtensionFileLoader`). Finally,
+ modules which substitute the object placed into :attr:`sys.modules` will
+ not work as there is no way to properly replace the module references
+ throughout the interpreter safely; :exc:`ValueError` is raised if such a
+ substitution is detected.
+
+ .. note::
+ For projects where startup time is critical, this class allows for
+ potentially minimizing the cost of loading a module if it is never used.
+ For projects where startup time is not essential then use of this class is
+ **heavily** discouraged due to error messages created during loading being
+ postponed and thus occurring out of context.
+
+ .. versionadded:: 3.5
+
+ .. classmethod:: factory(loader)
+
+ A static method which returns a callable that creates a lazy loader. This
+ is meant to be used in situations where the loader is passed by class
+ instead of by instance.
+ ::
+
+ suffixes = importlib.machinery.SOURCE_SUFFIXES
+ loader = importlib.machinery.SourceFileLoader
+ lazy_loader = importlib.util.LazyLoader.factory(loader)
+ finder = importlib.machinery.FileFinder(path, (lazy_loader, suffixes))
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst
index 57eb4fff82..b28d0f9885 100644
--- a/Doc/library/inspect.rst
+++ b/Doc/library/inspect.rst
@@ -3,6 +3,7 @@
.. module:: inspect
:synopsis: Extract information and source code from live objects.
+
.. moduleauthor:: Ka-Ping Yee <ping@lfw.org>
.. sectionauthor:: Ka-Ping Yee <ping@lfw.org>
@@ -28,7 +29,7 @@ Types and members
-----------------
The :func:`getmembers` function retrieves the members of an object such as a
-class or module. The sixteen functions whose names begin with "is" are mainly
+class or module. The functions whose names begin with "is" are mainly
provided as convenient choices for the second argument to :func:`getmembers`.
They also help you determine when you can expect to find the following special
attributes:
@@ -88,6 +89,12 @@ attributes:
| | __globals__ | global namespace in which |
| | | this function was defined |
+-----------+-----------------+---------------------------+
+| | __annotations__ | mapping of parameters |
+| | | names to annotations; |
+| | | ``"return"`` key is |
+| | | reserved for return |
+| | | annotations. |
++-----------+-----------------+---------------------------+
| traceback | tb_frame | frame object at this |
| | | level |
+-----------+-----------------+---------------------------+
@@ -168,6 +175,33 @@ attributes:
| | | arguments and local |
| | | variables |
+-----------+-----------------+---------------------------+
+| generator | __name__ | name |
++-----------+-----------------+---------------------------+
+| | __qualname__ | qualified name |
++-----------+-----------------+---------------------------+
+| | gi_frame | frame |
++-----------+-----------------+---------------------------+
+| | gi_running | is the generator running? |
++-----------+-----------------+---------------------------+
+| | gi_code | code |
++-----------+-----------------+---------------------------+
+| | gi_yieldfrom | object being iterated by |
+| | | ``yield from``, or |
+| | | ``None`` |
++-----------+-----------------+---------------------------+
+| coroutine | __name__ | name |
++-----------+-----------------+---------------------------+
+| | __qualname__ | qualified name |
++-----------+-----------------+---------------------------+
+| | cr_await | object being awaited on, |
+| | | or ``None`` |
++-----------+-----------------+---------------------------+
+| | cr_frame | frame |
++-----------+-----------------+---------------------------+
+| | cr_running | is the coroutine running? |
++-----------+-----------------+---------------------------+
+| | cr_code | code |
++-----------+-----------------+---------------------------+
| builtin | __doc__ | documentation string |
+-----------+-----------------+---------------------------+
| | __name__ | original name of this |
@@ -180,6 +214,13 @@ attributes:
| | | ``None`` |
+-----------+-----------------+---------------------------+
+.. versionchanged:: 3.5
+
+ Add ``__qualname__`` and ``gi_yieldfrom`` attributes to generators.
+
+ The ``__name__`` attribute of generators is now set from the function
+ name, instead of the code name, and it can now be modified.
+
.. function:: getmembers(object[, predicate])
@@ -261,6 +302,41 @@ attributes:
Return true if the object is a generator.
+.. function:: iscoroutinefunction(object)
+
+ Return true if the object is a :term:`coroutine function`
+ (a function defined with an :keyword:`async def` syntax).
+
+ .. versionadded:: 3.5
+
+
+.. function:: iscoroutine(object)
+
+ Return true if the object is a :term:`coroutine` created by an
+ :keyword:`async def` function.
+
+ .. versionadded:: 3.5
+
+
+.. function:: isawaitable(object)
+
+ Return true if the object can be used in :keyword:`await` expression.
+
+ Can also be used to distinguish generator-based coroutines from regular
+ generators::
+
+ def gen():
+ yield
+ @types.coroutine
+ def gen_coro():
+ yield
+
+ assert not isawaitable(gen())
+ assert isawaitable(gen_coro())
+
+ .. versionadded:: 3.5
+
+
.. function:: istraceback(object)
Return true if the object is a traceback.
@@ -351,6 +427,12 @@ Retrieving source code
.. function:: getdoc(object)
Get the documentation string for an object, cleaned up with :func:`cleandoc`.
+ If the documentation string for an object is not provided and the object is
+ a class, a method, a property or a descriptor, retrieve the documentation
+ string from the inheritance hierarchy.
+
+ .. versionchanged:: 3.5
+ Documentation strings are now inherited if not overridden.
.. function:: getcomments(object)
@@ -408,8 +490,12 @@ Retrieving source code
.. function:: cleandoc(doc)
Clean up indentation from docstrings that are indented to line up with blocks
- of code. Any whitespace that can be uniformly removed from the second line
- onwards is removed. Also, all tabs are expanded to spaces.
+ of code.
+
+ All leading whitespace is removed from the first line. Any leading whitespace
+ that can be uniformly removed from the second line onwards is removed. Empty
+ lines at the beginning and end are subsequently removed. Also, all tabs are
+ expanded to spaces.
.. _inspect-signature-object:
@@ -423,7 +509,7 @@ The Signature object represents the call signature of a callable object and its
return annotation. To retrieve a Signature object, use the :func:`signature`
function.
-.. function:: signature(callable)
+.. function:: signature(callable, \*, follow_wrapped=True)
Return a :class:`Signature` object for the given ``callable``::
@@ -448,6 +534,11 @@ function.
Raises :exc:`ValueError` if no signature can be provided, and
:exc:`TypeError` if that type of object is not supported.
+ .. versionadded:: 3.5
+ ``follow_wrapped`` parameter. Pass ``False`` to get a signature of
+ ``callable`` specifically (``callable.__wrapped__`` will not be used to
+ unwrap decorated callables.)
+
.. note::
Some callables may not be introspectable in certain implementations of
@@ -473,6 +564,9 @@ function.
Signature objects are *immutable*. Use :meth:`Signature.replace` to make a
modified copy.
+ .. versionchanged:: 3.5
+ Signature objects are picklable and hashable.
+
.. attribute:: Signature.empty
A special class-level marker to specify absence of a return annotation.
@@ -517,12 +611,30 @@ function.
>>> str(new_sig)
"(a, b) -> 'new return anno'"
+ .. classmethod:: Signature.from_callable(obj, \*, follow_wrapped=True)
+
+ Return a :class:`Signature` (or its subclass) object for a given callable
+ ``obj``. Pass ``follow_wrapped=False`` to get a signature of ``obj``
+ without unwrapping its ``__wrapped__`` chain.
+
+ This method simplifies subclassing of :class:`Signature`::
+
+ class MySignature(Signature):
+ pass
+ sig = MySignature.from_callable(min)
+ assert isinstance(sig, MySignature)
+
+ .. versionadded:: 3.5
+
.. class:: Parameter(name, kind, \*, default=Parameter.empty, annotation=Parameter.empty)
Parameter objects are *immutable*. Instead of modifying a Parameter object,
you can use :meth:`Parameter.replace` to create a modified copy.
+ .. versionchanged:: 3.5
+ Parameter objects are picklable and hashable.
+
.. attribute:: Parameter.empty
A special class-level marker to specify absence of default values and
@@ -639,27 +751,8 @@ function.
Arguments for which :meth:`Signature.bind` or
:meth:`Signature.bind_partial` relied on a default value are skipped.
- However, if needed, it is easy to include them.
-
- ::
-
- >>> def foo(a, b=10):
- ... pass
-
- >>> sig = signature(foo)
- >>> ba = sig.bind(5)
-
- >>> ba.args, ba.kwargs
- ((5,), {})
-
- >>> for param in sig.parameters.values():
- ... if (param.name not in ba.arguments
- ... and param.default is not param.empty):
- ... ba.arguments[param.name] = param.default
-
- >>> ba.args, ba.kwargs
- ((5, 10), {})
-
+ However, if needed, use :meth:`BoundArguments.apply_defaults` to add
+ them.
.. attribute:: BoundArguments.args
@@ -675,11 +768,31 @@ function.
A reference to the parent :class:`Signature` object.
+ .. method:: BoundArguments.apply_defaults()
+
+ Set default values for missing arguments.
+
+ For variable-positional arguments (``*args``) the default is an
+ empty tuple.
+
+ For variable-keyword arguments (``**kwargs``) the default is an
+ empty dict.
+
+ ::
+
+ >>> def foo(a, b='ham', *args): pass
+ >>> ba = inspect.signature(foo).bind('spam')
+ >>> ba.apply_defaults()
+ >>> ba.arguments
+ OrderedDict([('a', 'spam'), ('b', 'ham'), ('args', ())])
+
+ .. versionadded:: 3.5
+
The :attr:`args` and :attr:`kwargs` properties can be used to invoke
functions::
def test(a, *, b):
- ...
+ ...
sig = signature(test)
ba = sig.bind(10, b=20)
@@ -719,8 +832,9 @@ Classes and functions
*n* elements listed in *args*.
.. deprecated:: 3.0
- Use :func:`getfullargspec` instead, which provides information about
- keyword-only arguments and annotations.
+ Use :func:`signature` and
+ :ref:`Signature Object <inspect-signature-object>`, which provide a
+ better introspecting API for callables.
.. function:: getfullargspec(func)
@@ -741,15 +855,16 @@ Classes and functions
The first four items in the tuple correspond to :func:`getargspec`.
- .. note::
- Consider using the new :ref:`Signature Object <inspect-signature-object>`
- interface, which provides a better way of introspecting functions.
-
.. versionchanged:: 3.4
This function is now based on :func:`signature`, but still ignores
``__wrapped__`` attributes and includes the already bound first
parameter in the signature output for bound methods.
+ .. deprecated:: 3.5
+ Use :func:`signature` and
+ :ref:`Signature Object <inspect-signature-object>`, which provide a
+ better introspecting API for callables.
+
.. function:: getargvalues(frame)
@@ -759,6 +874,11 @@ Classes and functions
are the names of the ``*`` and ``**`` arguments or ``None``. *locals* is the
locals dictionary of the given frame.
+ .. deprecated:: 3.5
+ Use :func:`signature` and
+ :ref:`Signature Object <inspect-signature-object>`, which provide a
+ better introspecting API for callables.
+
.. function:: formatargspec(args[, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotations[, formatarg, formatvarargs, formatvarkw, formatvalue, formatreturns, formatannotations]])
@@ -781,6 +901,11 @@ Classes and functions
>>> formatargspec(*getfullargspec(f))
'(a: int, b: float)'
+ .. deprecated:: 3.5
+ Use :func:`signature` and
+ :ref:`Signature Object <inspect-signature-object>`, which provide a
+ better introspecting API for callables.
+
.. function:: formatargvalues(args[, varargs, varkw, locals, formatarg, formatvarargs, formatvarkw, formatvalue])
@@ -788,6 +913,11 @@ Classes and functions
:func:`getargvalues`. The format\* arguments are the corresponding optional
formatting functions that are called to turn names and values into strings.
+ .. deprecated:: 3.5
+ Use :func:`signature` and
+ :ref:`Signature Object <inspect-signature-object>`, which provide a
+ better introspecting API for callables.
+
.. function:: getmro(cls)
@@ -822,8 +952,8 @@ Classes and functions
.. versionadded:: 3.2
- .. note::
- Consider using the new :meth:`Signature.bind` instead.
+ .. deprecated:: 3.5
+ Use :meth:`Signature.bind` and :meth:`Signature.bind_partial` instead.
.. function:: getclosurevars(func)
@@ -864,11 +994,17 @@ Classes and functions
The interpreter stack
---------------------
-When the following functions return "frame records," each record is a tuple of
-six items: the frame object, the filename, the line number of the current line,
+When the following functions return "frame records," each record is a
+:term:`named tuple`
+``FrameInfo(frame, filename, lineno, function, code_context, index)``.
+The tuple contains the frame object, the filename, the line number of the
+current line,
the function name, a list of lines of context from the source code, and the
index of the current line within that list.
+.. versionchanged:: 3.5
+ Return a named tuple instead of a tuple.
+
.. note::
Keeping references to frame objects, as found in the first element of the frame
@@ -913,6 +1049,11 @@ line.
returned list represents *frame*; the last entry represents the outermost call
on *frame*'s stack.
+ .. versionchanged:: 3.5
+ A list of :term:`named tuples <named tuple>`
+ ``FrameInfo(frame, filename, lineno, function, code_context, index)``
+ is returned.
+
.. function:: getinnerframes(traceback, context=1)
@@ -921,6 +1062,11 @@ line.
list represents *traceback*; the last entry represents where the exception was
raised.
+ .. versionchanged:: 3.5
+ A list of :term:`named tuples <named tuple>`
+ ``FrameInfo(frame, filename, lineno, function, code_context, index)``
+ is returned.
+
.. function:: currentframe()
@@ -940,6 +1086,11 @@ line.
returned list represents the caller; the last entry represents the outermost
call on the stack.
+ .. versionchanged:: 3.5
+ A list of :term:`named tuples <named tuple>`
+ ``FrameInfo(frame, filename, lineno, function, code_context, index)``
+ is returned.
+
.. function:: trace(context=1)
@@ -948,6 +1099,11 @@ line.
entry in the list represents the caller; the last entry represents where the
exception was raised.
+ .. versionchanged:: 3.5
+ A list of :term:`named tuples <named tuple>`
+ ``FrameInfo(frame, filename, lineno, function, code_context, index)``
+ is returned.
+
Fetching attributes statically
------------------------------
@@ -1007,8 +1163,8 @@ code execution::
pass
-Current State of a Generator
-----------------------------
+Current State of Generators and Coroutines
+------------------------------------------
When implementing coroutine schedulers and for other advanced uses of
generators, it is useful to determine whether a generator is currently
@@ -1028,6 +1184,21 @@ generator to be determined easily.
.. versionadded:: 3.2
+.. function:: getcoroutinestate(coroutine)
+
+ Get current state of a coroutine object. The function is intended to be
+ used with coroutine objects created by :keyword:`async def` functions, but
+ will accept any coroutine-like object that has ``cr_running`` and
+ ``cr_frame`` attributes.
+
+ Possible states are:
+ * CORO_CREATED: Waiting to start execution.
+ * CORO_RUNNING: Currently being executed by the interpreter.
+ * CORO_SUSPENDED: Currently suspended at an await expression.
+ * CORO_CLOSED: Execution has completed.
+
+ .. versionadded:: 3.5
+
The current internal state of the generator can also be queried. This is
mostly useful for testing purposes, to ensure that internal state is being
updated as expected:
@@ -1052,6 +1223,13 @@ updated as expected:
.. versionadded:: 3.3
+.. function:: getcoroutinelocals(coroutine)
+
+ This function is analogous to :func:`~inspect.getgeneratorlocals`, but
+ works for coroutine objects created by :keyword:`async def` functions.
+
+ .. versionadded:: 3.5
+
.. _inspect-module-cli:
diff --git a/Doc/library/io.rst b/Doc/library/io.rst
index 592bc484ad..23df18f8e7 100644
--- a/Doc/library/io.rst
+++ b/Doc/library/io.rst
@@ -3,6 +3,7 @@
.. module:: io
:synopsis: Core tools for working with streams.
+
.. moduleauthor:: Guido van Rossum <guido@python.org>
.. moduleauthor:: Mike Verdone <mike.verdone@gmail.com>
.. moduleauthor:: Mark Russell <mark.russell@zen.co.uk>
@@ -11,6 +12,10 @@
.. moduleauthor:: Benjamin Peterson <benjamin@python.org>
.. sectionauthor:: Benjamin Peterson <benjamin@python.org>
+**Source code:** :source:`Lib/io.py`
+
+--------------
+
.. _io-overview:
Overview
@@ -66,7 +71,8 @@ The text stream API is described in detail in the documentation of
Binary I/O
^^^^^^^^^^
-Binary I/O (also called *buffered I/O*) expects and produces :class:`bytes`
+Binary I/O (also called *buffered I/O*) expects
+:term:`bytes-like objects <bytes-like object>` and produces :class:`bytes`
objects. No encoding, decoding, or newline translation is performed. This
category of streams can be used for all kinds of non-text data, and also when
manual control over the handling of text data is desired.
@@ -130,7 +136,7 @@ High-level Module Interface
In-memory streams
^^^^^^^^^^^^^^^^^
-It is also possible to use a :class:`str` or :class:`bytes`-like object as a
+It is also possible to use a :class:`str` or :term:`bytes-like object` as a
file for both reading and writing. For strings :class:`StringIO` can be used
like a file opened in text mode. :class:`BytesIO` can be used like a file
opened in binary mode. Both provide full read-write capabilities with random
@@ -227,9 +233,10 @@ I/O Base Classes
when operations they do not support are called.
The basic type used for binary data read from or written to a file is
- :class:`bytes`. :class:`bytearray`\s are accepted too, and in some cases
- (such as :meth:`readinto`) required. Text I/O classes work with
- :class:`str` data.
+ :class:`bytes`. Other :term:`bytes-like objects <bytes-like object>` are
+ accepted as method arguments too. In some cases, such as
+ :meth:`~RawIOBase.readinto`, a writable object such as :class:`bytearray`
+ is required. Text I/O classes work with :class:`str` data.
Note that calling any method (even inquiries) on a closed stream is
undefined. Implementations may raise :exc:`ValueError` in this case.
@@ -339,8 +346,11 @@ I/O Base Classes
if *size* is not specified). The current stream position isn't changed.
This resizing can extend or reduce the current file size. In case of
extension, the contents of the new file area depend on the platform
- (on most systems, additional bytes are zero-filled, on Windows they're
- undetermined). The new file size is returned.
+ (on most systems, additional bytes are zero-filled). The new file size
+ is returned.
+
+ .. versionchanged:: 3.5
+ Windows will now zero-fill files when extending.
.. method:: writable()
@@ -390,18 +400,22 @@ I/O Base Classes
.. method:: readinto(b)
- Read up to ``len(b)`` bytes into :class:`bytearray` *b* and return the
- number of bytes read. If the object is in non-blocking mode and no
- bytes are available, ``None`` is returned.
+ Read bytes into a pre-allocated, writable
+ :term:`bytes-like object` *b*, and return the
+ number of bytes read. If the object is in non-blocking mode and no bytes
+ are available, ``None`` is returned.
.. method:: write(b)
- Write the given :class:`bytes` or :class:`bytearray` object, *b*, to the
- underlying raw stream and return the number of bytes written. This can
- be less than ``len(b)``, depending on specifics of the underlying raw
+ Write the given :term:`bytes-like object`, *b*, to the
+ underlying raw stream, and return the number of
+ bytes written. This can be less than the length of *b* in
+ bytes, depending on specifics of the underlying raw
stream, and especially if it is in non-blocking mode. ``None`` is
returned if the raw stream is set not to block and no single byte could
- be readily written to it.
+ be readily written to it. The caller may release or mutate *b* after
+ this method returns, so the implementation should only access *b*
+ during the method call.
.. class:: BufferedIOBase
@@ -465,26 +479,39 @@ I/O Base Classes
.. method:: read1(size=-1)
- Read and return up to *size* bytes, with at most one call to the underlying
- raw stream's :meth:`~RawIOBase.read` method. This can be useful if you
- are implementing your own buffering on top of a :class:`BufferedIOBase`
+ Read and return up to *size* bytes, with at most one call to the
+ underlying raw stream's :meth:`~RawIOBase.read` (or
+ :meth:`~RawIOBase.readinto`) method. This can be useful if you are
+ implementing your own buffering on top of a :class:`BufferedIOBase`
object.
.. method:: readinto(b)
- Read up to ``len(b)`` bytes into bytearray *b* and return the number of
- bytes read.
+ Read bytes into a pre-allocated, writable
+ :term:`bytes-like object` *b* and return the number of bytes read.
Like :meth:`read`, multiple reads may be issued to the underlying raw
stream, unless the latter is interactive.
- A :exc:`BlockingIOError` is raised if the underlying raw stream is in
- non blocking-mode, and has no data available at the moment.
+ A :exc:`BlockingIOError` is raised if the underlying raw stream is in non
+ blocking-mode, and has no data available at the moment.
+
+ .. method:: readinto1(b)
+
+ Read bytes into a pre-allocated, writable
+ :term:`bytes-like object` *b*, using at most one call to
+ the underlying raw stream's :meth:`~RawIOBase.read` (or
+ :meth:`~RawIOBase.readinto`) method. Return the number of bytes read.
+
+ A :exc:`BlockingIOError` is raised if the underlying raw stream is in non
+ blocking-mode, and has no data available at the moment.
+
+ .. versionadded:: 3.5
.. method:: write(b)
- Write the given :class:`bytes` or :class:`bytearray` object, *b* and
- return the number of bytes written (never less than ``len(b)``, since if
+ Write the given :term:`bytes-like object`, *b*, and return the number
+ of bytes written (always equal to the length of *b* in bytes, since if
the write fails an :exc:`OSError` will be raised). Depending on the
actual implementation, these bytes may be readily written to the
underlying stream, or held in a buffer for performance and latency
@@ -494,6 +521,9 @@ I/O Base Classes
data needed to be written to the raw stream but it couldn't accept
all the data without blocking.
+ The caller may release or mutate *b* after this method returns,
+ so the implementation should only access *b* during the method call.
+
Raw File I/O
^^^^^^^^^^^^
@@ -507,9 +537,12 @@ Raw File I/O
The *name* can be one of two things:
* a character string or :class:`bytes` object representing the path to the
- file which will be opened;
+ file which will be opened. In this case closefd must be True (the default)
+ otherwise an error will be raised.
* an integer representing the number of an existing OS-level file descriptor
- to which the resulting :class:`FileIO` object will give access.
+ to which the resulting :class:`FileIO` object will give access. When the
+ FileIO object is closed this fd will be closed as well, unless *closefd*
+ is set to ``False``.
The *mode* can be ``'r'``, ``'w'``, ``'x'`` or ``'a'`` for reading
(default), writing, exclusive creation or appending. The file will be
@@ -566,7 +599,8 @@ than raw I/O does.
:class:`BufferedIOBase`. The buffer is discarded when the
:meth:`~IOBase.close` method is called.
- The argument *initial_bytes* contains optional initial :class:`bytes` data.
+ The optional argument *initial_bytes* is a :term:`bytes-like object` that
+ contains initial data.
:class:`BytesIO` provides or overrides these methods in addition to those
from :class:`BufferedIOBase` and :class:`IOBase`:
@@ -598,6 +632,11 @@ than raw I/O does.
In :class:`BytesIO`, this is the same as :meth:`read`.
+ .. method:: readinto1()
+
+ In :class:`BytesIO`, this is the same as :meth:`readinto`.
+
+ .. versionadded:: 3.5
.. class:: BufferedReader(raw, buffer_size=DEFAULT_BUFFER_SIZE)
@@ -659,7 +698,7 @@ than raw I/O does.
.. method:: write(b)
- Write the :class:`bytes` or :class:`bytearray` object, *b* and return the
+ Write the :term:`bytes-like object`, *b*, and return the
number of bytes written. When in non-blocking mode, a
:exc:`BlockingIOError` is raised if the buffer needs to be written out but
the raw stream blocks.
@@ -808,11 +847,13 @@ Text I/O
exception if there is an encoding error (the default of ``None`` has the same
effect), or pass ``'ignore'`` to ignore errors. (Note that ignoring encoding
errors can lead to data loss.) ``'replace'`` causes a replacement marker
- (such as ``'?'``) to be inserted where there is malformed data. When
- writing, ``'xmlcharrefreplace'`` (replace with the appropriate XML character
- reference) or ``'backslashreplace'`` (replace with backslashed escape
- sequences) can be used. Any other error handling name that has been
- registered with :func:`codecs.register_error` is also valid.
+ (such as ``'?'``) to be inserted where there is malformed data.
+ ``'backslashreplace'`` causes malformed data to be replaced by a
+ backslashed escape sequence. When writing, ``'xmlcharrefreplace'``
+ (replace with the appropriate XML character reference) or ``'namereplace'``
+ (replace with ``\N{...}`` escape sequences) can be used. Any other error
+ handling name that has been registered with
+ :func:`codecs.register_error` is also valid.
.. index::
single: universal newlines; io.TextIOWrapper class
diff --git a/Doc/library/ipaddress.rst b/Doc/library/ipaddress.rst
index 301048ef6a..23526b6c42 100644
--- a/Doc/library/ipaddress.rst
+++ b/Doc/library/ipaddress.rst
@@ -3,6 +3,7 @@
.. module:: ipaddress
:synopsis: IPv4/IPv6 manipulation library.
+
.. moduleauthor:: Peter Moody
**Source code:** :source:`Lib/ipaddress.py`
@@ -146,6 +147,20 @@ write code that handles both IP versions correctly.
the appropriate length (most significant octet first). This is 4 bytes
for IPv4 and 16 bytes for IPv6.
+ .. attribute:: reverse_pointer
+
+ The name of the reverse DNS PTR record for the IP address, e.g.::
+
+ >>> ipaddress.ip_address("127.0.0.1").reverse_pointer
+ '1.0.0.127.in-addr.arpa'
+ >>> ipaddress.ip_address("2001:db8::1").reverse_pointer
+ '1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa'
+
+ This is the name that could be used for performing a PTR lookup, not the
+ resolved hostname itself.
+
+ .. versionadded:: 3.5
+
.. attribute:: is_multicast
``True`` if the address is reserved for multicast use. See
@@ -184,8 +199,8 @@ write code that handles both IP versions correctly.
``True`` if the address is reserved for link-local usage. See
:RFC:`3927`.
-.. _iana-ipv4-special-registry: http://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml
-.. _iana-ipv6-special-registry: http://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtml
+.. _iana-ipv4-special-registry: https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml
+.. _iana-ipv6-special-registry: https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtml
.. class:: IPv6Address(address)
@@ -226,6 +241,7 @@ write code that handles both IP versions correctly.
:class:`IPv4Address` class:
.. attribute:: packed
+ .. attribute:: reverse_pointer
.. attribute:: version
.. attribute:: max_prefixlen
.. attribute:: is_multicast
@@ -377,6 +393,12 @@ so to avoid duplication they are only documented for :class:`IPv4Network`.
3. An integer packed into a :class:`bytes` object of length 4, big-endian.
The interpretation is similar to an integer *address*.
+ 4. A two-tuple of an address description and a netmask, where the address
+ description is either a string, a 32-bits integer, a 4-bytes packed
+ integer, or an existing IPv4Address object; and the netmask is either
+ an integer representing the prefix length (e.g. ``24``) or a string
+ representing the prefix mask (e.g. ``255.255.255.0``).
+
An :exc:`AddressValueError` is raised if *address* is not a valid IPv4
address. A :exc:`NetmaskValueError` is raised if the mask is not valid for
an IPv4 address.
@@ -389,6 +411,10 @@ so to avoid duplication they are only documented for :class:`IPv4Network`.
objects will raise :exc:`TypeError` if the argument's IP version is
incompatible to ``self``
+ .. versionchanged:: 3.5
+
+ Added the two-tuple form for the *address* constructor parameter.
+
.. attribute:: version
.. attribute:: max_prefixlen
@@ -553,6 +579,11 @@ so to avoid duplication they are only documented for :class:`IPv4Network`.
3. An integer packed into a :class:`bytes` object of length 16, big-endian.
The interpretation is similar to an integer *address*.
+ 4. A two-tuple of an address description and a netmask, where the address
+ description is either a string, a 128-bits integer, a 16-bytes packed
+ integer, or an existing IPv6Address object; and the netmask is an
+ integer representing the prefix length.
+
An :exc:`AddressValueError` is raised if *address* is not a valid IPv6
address. A :exc:`NetmaskValueError` is raised if the mask is not valid for
an IPv6 address.
@@ -561,6 +592,10 @@ so to avoid duplication they are only documented for :class:`IPv4Network`.
then :exc:`ValueError` is raised. Otherwise, the host bits are masked out
to determine the appropriate network address.
+ .. versionchanged:: 3.5
+
+ Added the two-tuple form for the *address* constructor parameter.
+
.. attribute:: version
.. attribute:: max_prefixlen
.. attribute:: is_multicast
@@ -619,7 +654,7 @@ network. For iteration, *all* hosts are returned, including unusable hosts
example::
>>> for addr in IPv4Network('192.0.2.0/28'):
- ... addr
+ ... addr
...
IPv4Address('192.0.2.0')
IPv4Address('192.0.2.1')
diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst
index f489535c53..dfc1ddc2d7 100644
--- a/Doc/library/itertools.rst
+++ b/Doc/library/itertools.rst
@@ -3,14 +3,15 @@
.. module:: itertools
:synopsis: Functions creating iterators for efficient looping.
+
.. moduleauthor:: Raymond Hettinger <python@rcn.com>
.. sectionauthor:: Raymond Hettinger <python@rcn.com>
-
.. testsetup::
from itertools import *
+--------------
This module implements a number of :term:`iterator` building blocks inspired
by constructs from APL, Haskell, and SML. Each has been recast in a form
@@ -87,19 +88,27 @@ loops that truncate the stream.
.. function:: accumulate(iterable[, func])
- Make an iterator that returns accumulated sums. Elements may be any addable
- type including :class:`~decimal.Decimal` or :class:`~fractions.Fraction`.
- If the optional *func* argument is supplied, it should be a function of two
- arguments and it will be used instead of addition.
+ Make an iterator that returns accumulated sums, or accumulated
+ results of other binary functions (specified via the optional
+ *func* argument). If *func* is supplied, it should be a function
+ of two arguments. Elements of the input *iterable* may be any type
+ that can be accepted as arguments to *func*. (For example, with
+ the default operation of addition, elements may be any addable
+ type including :class:`~decimal.Decimal` or
+ :class:`~fractions.Fraction`.) If the input iterable is empty, the
+ output iterable will also be empty.
- Equivalent to::
+ Roughly equivalent to::
def accumulate(iterable, func=operator.add):
'Return running totals'
# accumulate([1,2,3,4,5]) --> 1 3 6 10 15
# accumulate([1,2,3,4,5], operator.mul) --> 1 2 6 24 120
it = iter(iterable)
- total = next(it)
+ try:
+ total = next(it)
+ except StopIteration:
+ return
yield total
for element in it:
total = func(total, element)
@@ -109,7 +118,7 @@ loops that truncate the stream.
:func:`min` for a running minimum, :func:`max` for a running maximum, or
:func:`operator.mul` for a running product. Amortization tables can be
built by accumulating interest and applying payments. First-order
- `recurrence relations <http://en.wikipedia.org/wiki/Recurrence_relation>`_
+ `recurrence relations <https://en.wikipedia.org/wiki/Recurrence_relation>`_
can be modeled by supplying the initial value in the iterable and using only
the accumulated total in *func* argument::
@@ -124,7 +133,7 @@ loops that truncate the stream.
>>> list(accumulate(cashflows, lambda bal, pmt: bal*1.05 + pmt))
[1000, 960.0, 918.0, 873.9000000000001, 827.5950000000001]
- # Chaotic recurrence relation http://en.wikipedia.org/wiki/Logistic_map
+ # Chaotic recurrence relation https://en.wikipedia.org/wiki/Logistic_map
>>> logistic_map = lambda x, _: r * x * (1 - x)
>>> r = 3.8
>>> x0 = 0.4
@@ -148,7 +157,7 @@ loops that truncate the stream.
Make an iterator that returns elements from the first iterable until it is
exhausted, then proceeds to the next iterable, until all of the iterables are
exhausted. Used for treating consecutive sequences as a single sequence.
- Equivalent to::
+ Roughly equivalent to::
def chain(*iterables):
# chain('ABC', 'DEF') --> A B C D E F
@@ -181,7 +190,7 @@ loops that truncate the stream.
value. So if the input elements are unique, there will be no repeat
values in each combination.
- Equivalent to::
+ Roughly equivalent to::
def combinations(iterable, r):
# combinations('ABCD', 2) --> AB AC AD BC BD CD
@@ -230,7 +239,7 @@ loops that truncate the stream.
value. So if the input elements are unique, the generated combinations
will also be unique.
- Equivalent to::
+ Roughly equivalent to::
def combinations_with_replacement(iterable, r):
# combinations_with_replacement('ABC', 2) --> AA AB AC BB BC CC
@@ -270,7 +279,7 @@ loops that truncate the stream.
Make an iterator that filters elements from *data* returning only those that
have a corresponding element in *selectors* that evaluates to ``True``.
Stops when either the *data* or *selectors* iterables has been exhausted.
- Equivalent to::
+ Roughly equivalent to::
def compress(data, selectors):
# compress('ABCDEF', [1,0,1,0,1,1]) --> A C E F
@@ -283,7 +292,7 @@ loops that truncate the stream.
Make an iterator that returns evenly spaced values starting with number *start*. Often
used as an argument to :func:`map` to generate consecutive data points.
- Also, used with :func:`zip` to add sequence numbers. Equivalent to::
+ Also, used with :func:`zip` to add sequence numbers. Roughly equivalent to::
def count(start=0, step=1):
# count(10) --> 10 11 12 13 14 ...
@@ -304,7 +313,7 @@ loops that truncate the stream.
Make an iterator returning elements from the iterable and saving a copy of each.
When the iterable is exhausted, return elements from the saved copy. Repeats
- indefinitely. Equivalent to::
+ indefinitely. Roughly equivalent to::
def cycle(iterable):
# cycle('ABCD') --> A B C D A B C D A B C D ...
@@ -325,7 +334,7 @@ loops that truncate the stream.
Make an iterator that drops elements from the iterable as long as the predicate
is true; afterwards, returns every element. Note, the iterator does not produce
*any* output until the predicate first becomes false, so it may have a lengthy
- start-up time. Equivalent to::
+ start-up time. Roughly equivalent to::
def dropwhile(predicate, iterable):
# dropwhile(lambda x: x<5, [1,4,6,4,1]) --> 6 4 1
@@ -341,7 +350,7 @@ loops that truncate the stream.
Make an iterator that filters elements from iterable returning only those for
which the predicate is ``False``. If *predicate* is ``None``, return the items
- that are false. Equivalent to::
+ that are false. Roughly equivalent to::
def filterfalse(predicate, iterable):
# filterfalse(lambda x: x%2, range(10)) --> 0 2 4 6 8
@@ -378,7 +387,7 @@ loops that truncate the stream.
groups.append(list(g)) # Store group iterator as a list
uniquekeys.append(k)
- :func:`groupby` is equivalent to::
+ :func:`groupby` is roughly equivalent to::
class groupby:
# [k for k, g in groupby('AAAABBBCCDAABBB')] --> A B C D A B
@@ -400,7 +409,10 @@ loops that truncate the stream.
def _grouper(self, tgtkey):
while self.currkey == tgtkey:
yield self.currvalue
- self.currvalue = next(self.it) # Exit on StopIteration
+ try:
+ self.currvalue = next(self.it)
+ except StopIteration:
+ return
self.currkey = self.keyfunc(self.currvalue)
@@ -415,7 +427,7 @@ loops that truncate the stream.
specified position. Unlike regular slicing, :func:`islice` does not support
negative values for *start*, *stop*, or *step*. Can be used to extract related
fields from data where the internal structure has been flattened (for example, a
- multi-line report may list a name field on every third line). Equivalent to::
+ multi-line report may list a name field on every third line). Roughly equivalent to::
def islice(iterable, *args):
# islice('ABCDEFG', 2) --> A B
@@ -424,7 +436,10 @@ loops that truncate the stream.
# islice('ABCDEFG', 0, None, 2) --> A C E G
s = slice(*args)
it = iter(range(s.start or 0, s.stop or sys.maxsize, s.step or 1))
- nexti = next(it)
+ try:
+ nexti = next(it)
+ except StopIteration:
+ return
for i, element in enumerate(iterable):
if i == nexti:
yield element
@@ -450,7 +465,7 @@ loops that truncate the stream.
value. So if the input elements are unique, there will be no repeat
values in each permutation.
- Equivalent to::
+ Roughly equivalent to::
def permutations(iterable, r=None):
# permutations('ABCD', 2) --> AB AC AD BA BC BD CA CB CD DA DB DC
@@ -496,7 +511,7 @@ loops that truncate the stream.
Cartesian product of input iterables.
- Equivalent to nested for-loops in a generator expression. For example,
+ Roughly equivalent to nested for-loops in a generator expression. For example,
``product(A, B)`` returns the same as ``((x,y) for x in A for y in B)``.
The nested loops cycle like an odometer with the rightmost element advancing
@@ -508,7 +523,7 @@ loops that truncate the stream.
repetitions with the optional *repeat* keyword argument. For example,
``product(A, repeat=4)`` means the same as ``product(A, A, A, A)``.
- This function is equivalent to the following code, except that the
+ This function is roughly equivalent to the following code, except that the
actual implementation does not build up intermediate results in memory::
def product(*args, repeat=1):
@@ -527,7 +542,9 @@ loops that truncate the stream.
Make an iterator that returns *object* over and over again. Runs indefinitely
unless the *times* argument is specified. Used as argument to :func:`map` for
invariant parameters to the called function. Also used with :func:`zip` to
- create an invariant part of a tuple record. Equivalent to::
+ create an invariant part of a tuple record.
+
+ Roughly equivalent to::
def repeat(object, times=None):
# repeat(10, 3) --> 10 10 10
@@ -550,7 +567,7 @@ loops that truncate the stream.
the iterable. Used instead of :func:`map` when argument parameters are already
grouped in tuples from a single iterable (the data has been "pre-zipped"). The
difference between :func:`map` and :func:`starmap` parallels the distinction
- between ``function(a,b)`` and ``function(*c)``. Equivalent to::
+ between ``function(a,b)`` and ``function(*c)``. Roughly equivalent to::
def starmap(function, iterable):
# starmap(pow, [(2,5), (3,2), (10,3)]) --> 32 9 1000
@@ -561,7 +578,7 @@ loops that truncate the stream.
.. function:: takewhile(predicate, iterable)
Make an iterator that returns elements from the iterable as long as the
- predicate is true. Equivalent to::
+ predicate is true. Roughly equivalent to::
def takewhile(predicate, iterable):
# takewhile(lambda x: x<5, [1,4,6,4,1]) --> 1 4
@@ -574,7 +591,7 @@ loops that truncate the stream.
.. function:: tee(iterable, n=2)
- Return *n* independent iterators from a single iterable. Equivalent to::
+ Return *n* independent iterators from a single iterable. Roughly equivalent to::
def tee(iterable, n=2):
it = iter(iterable)
@@ -582,7 +599,10 @@ loops that truncate the stream.
def gen(mydeque):
while True:
if not mydeque: # when the local deque is empty
- newval = next(it) # fetch a new value and
+ try:
+ newval = next(it) # fetch a new value and
+ except StopIteration:
+ return
for d in deques: # load it to all the deques
d.append(newval)
yield mydeque.popleft()
@@ -602,7 +622,7 @@ loops that truncate the stream.
Make an iterator that aggregates elements from each of the iterables. If the
iterables are of uneven length, missing values are filled-in with *fillvalue*.
- Iteration continues until the longest iterable is exhausted. Equivalent to::
+ Iteration continues until the longest iterable is exhausted. Roughly equivalent to::
class ZipExhausted(Exception):
pass
@@ -657,6 +677,11 @@ which incur interpreter overhead.
"Return function(0), function(1), ..."
return map(function, count(start))
+ def tail(n, iterable):
+ "Return an iterator over the last n items"
+ # tail(3, 'ABCDEFG') --> E F G
+ return iter(collections.deque(iterable, maxlen=n))
+
def consume(iterator, n):
"Advance the iterator n-steps ahead. If n is none, consume entirely."
# Use functions that consume iterators at C speed.
@@ -671,6 +696,11 @@ which incur interpreter overhead.
"Returns the nth item or a default value"
return next(islice(iterable, n, None), default)
+ def all_equal(iterable):
+ "Returns True if all the elements are equal to each other"
+ g = groupby(iterable)
+ return next(g, True) and not next(g, False)
+
def quantify(iterable, pred=bool):
"Count how many times the predicate is true"
return sum(map(pred, iterable))
@@ -779,7 +809,7 @@ which incur interpreter overhead.
try:
if first is not None:
yield first() # For database APIs needing an initial cast to db.first()
- while 1:
+ while True:
yield func()
except exception:
pass
diff --git a/Doc/library/json.rst b/Doc/library/json.rst
index a01e636496..174e734115 100644
--- a/Doc/library/json.rst
+++ b/Doc/library/json.rst
@@ -3,14 +3,19 @@
.. module:: json
:synopsis: Encode and decode the JSON format.
+
.. moduleauthor:: Bob Ippolito <bob@redivi.com>
.. sectionauthor:: Bob Ippolito <bob@redivi.com>
+**Source code:** :source:`Lib/json/__init__.py`
+
+--------------
+
`JSON (JavaScript Object Notation) <http://json.org>`_, specified by
:rfc:`7159` (which obsoletes :rfc:`4627`) and by
`ECMA-404 <http://www.ecma-international.org/publications/standards/Ecma-404.htm>`_,
is a lightweight data interchange format inspired by
-`JavaScript <http://en.wikipedia.org/wiki/JavaScript>`_ object literal syntax
+`JavaScript <https://en.wikipedia.org/wiki/JavaScript>`_ object literal syntax
(although it is not a strict subset of JavaScript [#rfc-errata]_ ).
:mod:`json` exposes an API familiar to users of the standard library
@@ -106,6 +111,8 @@ Using json.tool from the shell to validate and pretty-print::
$ echo '{1.2:3.4}' | python -m json.tool
Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
+See :ref:`json-commandline` for detailed documentation.
+
.. highlight:: python3
.. note::
@@ -248,7 +255,7 @@ Basic Usage
will be passed to the constructor of the class.
If the data being deserialized is not a valid JSON document, a
- :exc:`ValueError` will be raised.
+ :exc:`JSONDecodeError` will be raised.
.. function:: loads(s, encoding=None, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, **kw)
@@ -259,7 +266,7 @@ Basic Usage
*encoding* which is ignored and deprecated.
If the data being deserialized is not a valid JSON document, a
- :exc:`ValueError` will be raised.
+ :exc:`JSONDecodeError` will be raised.
Encoders and Decoders
---------------------
@@ -332,13 +339,16 @@ Encoders and Decoders
``'\n'``, ``'\r'`` and ``'\0'``.
If the data being deserialized is not a valid JSON document, a
- :exc:`ValueError` will be raised.
+ :exc:`JSONDecodeError` will be raised.
.. method:: decode(s)
Return the Python representation of *s* (a :class:`str` instance
containing a JSON document).
+ :exc:`JSONDecodeError` will be raised if the given JSON document is not
+ valid.
+
.. method:: raw_decode(s)
Decode a JSON document from *s* (a :class:`str` beginning with a
@@ -467,6 +477,36 @@ Encoders and Decoders
mysocket.write(chunk)
+Exceptions
+----------
+
+.. exception:: JSONDecodeError(msg, doc, pos, end=None)
+
+ Subclass of :exc:`ValueError` with the following additional attributes:
+
+ .. attribute:: msg
+
+ The unformatted error message.
+
+ .. attribute:: doc
+
+ The JSON document being parsed.
+
+ .. attribute:: pos
+
+ The start index of *doc* where parsing failed.
+
+ .. attribute:: lineno
+
+ The line corresponding to *pos*.
+
+ .. attribute:: colno
+
+ The column corresponding to *pos*.
+
+ .. versionadded:: 3.5
+
+
Standard Compliance and Interoperability
----------------------------------------
@@ -588,11 +628,73 @@ when serializing Python :class:`int` values of extremely large magnitude, or
when serializing instances of "exotic" numerical types such as
:class:`decimal.Decimal`.
+.. highlight:: bash
+.. module:: json.tool
+
+.. _json-commandline:
+
+Command Line Interface
+----------------------
+
+The :mod:`json.tool` module provides a simple command line interface to validate
+and pretty-print JSON objects.
+
+If the optional ``infile`` and ``outfile`` arguments are not
+specified, :attr:`sys.stdin` and :attr:`sys.stdout` will be used respectively::
+
+ $ echo '{"json": "obj"}' | python -m json.tool
+ {
+ "json": "obj"
+ }
+ $ echo '{1.2:3.4}' | python -m json.tool
+ Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
+
+.. versionchanged:: 3.5
+ The output is now in the same order as the input. Use the
+ :option:`--sort-keys` option to sort the output of dictionaries
+ alphabetically by key.
+
+Command line options
+^^^^^^^^^^^^^^^^^^^^
+
+.. cmdoption:: infile
+
+ The JSON file to be validated or pretty-printed::
+
+ $ python -m json.tool mp_films.json
+ [
+ {
+ "title": "And Now for Something Completely Different",
+ "year": 1971
+ },
+ {
+ "title": "Monty Python and the Holy Grail",
+ "year": 1975
+ }
+ ]
+
+ If *infile* is not specified, read from :attr:`sys.stdin`.
+
+.. cmdoption:: outfile
+
+ Write the output of the *infile* to the given *outfile*. Otherwise, write it
+ to :attr:`sys.stdout`.
+
+.. cmdoption:: --sort-keys
+
+ Sort the output of dictionaries alphabetically by key.
+
+ .. versionadded:: 3.5
+
+.. cmdoption:: -h, --help
+
+ Show the help message.
+
.. rubric:: Footnotes
.. [#rfc-errata] As noted in `the errata for RFC 7159
- <http://www.rfc-editor.org/errata_search.php?rfc=7159>`_,
+ <https://www.rfc-editor.org/errata_search.php?rfc=7159>`_,
JSON permits literal U+2028 (LINE SEPARATOR) and
U+2029 (PARAGRAPH SEPARATOR) characters in strings, whereas JavaScript
(as of ECMAScript Edition 5.1) does not.
diff --git a/Doc/library/linecache.rst b/Doc/library/linecache.rst
index f18b1cdac0..ae3de9fc0a 100644
--- a/Doc/library/linecache.rst
+++ b/Doc/library/linecache.rst
@@ -3,6 +3,7 @@
.. module:: linecache
:synopsis: This module provides random access to individual lines from text files.
+
.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
**Source code:** :source:`Lib/linecache.py`
@@ -47,6 +48,14 @@ The :mod:`linecache` module defines the following functions:
changed on disk, and you require the updated version. If *filename* is omitted,
it will check all the entries in the cache.
+.. function:: lazycache(filename, module_globals)
+
+ Capture enough detail about a non-file-based module to permit getting its
+ lines later via :func:`getline` even if *module_globals* is None in the later
+ call. This avoids doing I/O until a line is actually needed, without having
+ to carry the module globals around indefinitely.
+
+ .. versionadded:: 3.5
Example::
diff --git a/Doc/library/locale.rst b/Doc/library/locale.rst
index b14c551b6e..5aaf4a398f 100644
--- a/Doc/library/locale.rst
+++ b/Doc/library/locale.rst
@@ -3,9 +3,13 @@
.. module:: locale
:synopsis: Internationalization services.
+
.. moduleauthor:: Martin von Löwis <martin@v.loewis.de>
.. sectionauthor:: Martin von Löwis <martin@v.loewis.de>
+**Source code:** :source:`Lib/locale.py`
+
+--------------
The :mod:`locale` module opens access to the POSIX locale database and
functionality. The POSIX locale mechanism allows programmers to deal with
@@ -387,6 +391,14 @@ The :mod:`locale` module defines the following exception and functions:
``str(float)``, but takes the decimal point into account.
+.. function:: delocalize(string)
+
+ Converts a string into a normalized number string, following the
+ :const:`LC_NUMERIC` settings.
+
+ .. versionadded:: 3.5
+
+
.. function:: atof(string)
Converts a string to a floating point number, following the :const:`LC_NUMERIC`
@@ -459,13 +471,13 @@ The :mod:`locale` module defines the following exception and functions:
Example::
>>> import locale
- >>> loc = locale.getlocale() # get current locale
+ >>> loc = locale.getlocale() # get current locale
# use German locale; name might vary with platform
>>> locale.setlocale(locale.LC_ALL, 'de_DE')
- >>> locale.strcoll('f\xe4n', 'foo') # compare a string containing an umlaut
- >>> locale.setlocale(locale.LC_ALL, '') # use user's preferred locale
- >>> locale.setlocale(locale.LC_ALL, 'C') # use default (C) locale
- >>> locale.setlocale(locale.LC_ALL, loc) # restore saved locale
+ >>> locale.strcoll('f\xe4n', 'foo') # compare a string containing an umlaut
+ >>> locale.setlocale(locale.LC_ALL, '') # use user's preferred locale
+ >>> locale.setlocale(locale.LC_ALL, 'C') # use default (C) locale
+ >>> locale.setlocale(locale.LC_ALL, loc) # restore saved locale
Background, details, hints, tips and caveats
diff --git a/Doc/library/logging.config.rst b/Doc/library/logging.config.rst
index fd6a47778f..e196724b82 100644
--- a/Doc/library/logging.config.rst
+++ b/Doc/library/logging.config.rst
@@ -4,10 +4,11 @@
.. module:: logging.config
:synopsis: Configuration of the logging module.
-
.. moduleauthor:: Vinay Sajip <vinay_sajip@red-dove.com>
.. sectionauthor:: Vinay Sajip <vinay_sajip@red-dove.com>
+**Source code:** :source:`Lib/logging/config.py`
+
.. sidebar:: Important
This page contains only reference information. For tutorials,
@@ -17,8 +18,6 @@
* :ref:`Advanced Tutorial <logging-advanced-tutorial>`
* :ref:`Logging Cookbook <logging-cookbook>`
-**Source code:** :source:`Lib/logging/config.py`
-
--------------
This section describes the API for configuring the logging module.
diff --git a/Doc/library/logging.handlers.rst b/Doc/library/logging.handlers.rst
index 9e558e549d..855adabf86 100644
--- a/Doc/library/logging.handlers.rst
+++ b/Doc/library/logging.handlers.rst
@@ -4,10 +4,11 @@
.. module:: logging.handlers
:synopsis: Handlers for the logging module.
-
.. moduleauthor:: Vinay Sajip <vinay_sajip@red-dove.com>
.. sectionauthor:: Vinay Sajip <vinay_sajip@red-dove.com>
+**Source code:** :source:`Lib/logging/handlers.py`
+
.. sidebar:: Important
This page contains only reference information. For tutorials,
@@ -17,8 +18,6 @@
* :ref:`Advanced Tutorial <logging-advanced-tutorial>`
* :ref:`Logging Cookbook <logging-cookbook>`
-**Source code:** :source:`Lib/logging/handlers.py`
-
--------------
.. currentmodule:: logging
@@ -544,7 +543,7 @@ supports sending logging messages to a remote or local Unix syslog.
(See: :issue:`12168`.) In earlier versions, the message sent to the
syslog daemons was always terminated with a NUL byte, because early
versions of these daemons expected a NUL terminated message - even
- though it's not in the relevant specification (RF 5424). More recent
+ though it's not in the relevant specification (RFC 5424). More recent
versions of these daemons don't expect the NUL byte but strip it off
if it's there, and even more recent daemons (which adhere more closely
to RFC 5424) pass the NUL byte on as part of the message.
@@ -853,7 +852,7 @@ supports sending logging messages to a Web server, using either ``GET`` or
credentials, you should also specify secure=True so that your userid and
password are not passed in cleartext across the wire.
- .. versionchanged:: 3.4.3
+ .. versionchanged:: 3.5
The *context* parameter was added.
.. method:: mapLogRecord(record)
@@ -866,7 +865,7 @@ supports sending logging messages to a Web server, using either ``GET`` or
.. method:: emit(record)
- Sends the record to the Web server as an URL-encoded dictionary. The
+ Sends the record to the Web server as a URL-encoded dictionary. The
:meth:`mapLogRecord` method is used to convert the record to the
dictionary to be sent.
@@ -953,13 +952,20 @@ applications where threads servicing clients need to respond as quickly as
possible, while any potentially slow operations (such as sending an email via
:class:`SMTPHandler`) are done on a separate thread.
-.. class:: QueueListener(queue, *handlers)
+.. class:: QueueListener(queue, *handlers, respect_handler_level=False)
Returns a new instance of the :class:`QueueListener` class. The instance is
initialized with the queue to send messages to and a list of handlers which
will handle entries placed on the queue. The queue can be any queue-
like object; it's passed as-is to the :meth:`dequeue` method, which needs
- to know how to get messages from it.
+ to know how to get messages from it. If ``respect_handler_level`` is ``True``,
+ a handler's level is respected (compared with the level for the message) when
+ deciding whether to pass messages to that handler; otherwise, the behaviour
+ is as in previous Python versions - to always pass each message to each
+ handler.
+
+ .. versionchanged:: 3.5
+ The ``respect_handler_levels`` argument was added.
.. method:: dequeue(block)
diff --git a/Doc/library/logging.rst b/Doc/library/logging.rst
index 8fd7e40599..72da385d72 100644
--- a/Doc/library/logging.rst
+++ b/Doc/library/logging.rst
@@ -4,10 +4,10 @@
.. module:: logging
:synopsis: Flexible event logging system for applications.
-
.. moduleauthor:: Vinay Sajip <vinay_sajip@red-dove.com>
.. sectionauthor:: Vinay Sajip <vinay_sajip@red-dove.com>
+**Source code:** :source:`Lib/logging/__init__.py`
.. index:: pair: Errors; logging
@@ -20,9 +20,6 @@
* :ref:`Advanced Tutorial <logging-advanced-tutorial>`
* :ref:`Logging Cookbook <logging-cookbook>`
-
-**Source code:** :source:`Lib/logging/__init__.py`
-
--------------
This module defines functions and classes which implement a flexible event
@@ -159,11 +156,13 @@ is the module's name in the Python package namespace.
*msg* using the string formatting operator. (Note that this means that you can
use keywords in the format string, together with a single dictionary argument.)
- There are three keyword arguments in *kwargs* which are inspected: *exc_info*
- which, if it does not evaluate as false, causes exception information to be
+ There are three keyword arguments in *kwargs* which are inspected:
+ *exc_info*, *stack_info*, and *extra*.
+
+ If *exc_info* does not evaluate as false, it causes exception information to be
added to the logging message. If an exception tuple (in the format returned by
- :func:`sys.exc_info`) is provided, it is used; otherwise, :func:`sys.exc_info`
- is called to get the exception information.
+ :func:`sys.exc_info`) or an exception instance is provided, it is used;
+ otherwise, :func:`sys.exc_info` is called to get the exception information.
The second optional keyword argument is *stack_info*, which defaults to
``False``. If true, stack information is added to the logging
@@ -220,6 +219,9 @@ is the module's name in the Python package namespace.
.. versionadded:: 3.2
The *stack_info* parameter was added.
+ .. versionchanged:: 3.5
+ The *exc_info* parameter can now accept exception instances.
+
.. method:: Logger.info(msg, *args, **kwargs)
@@ -1241,7 +1243,7 @@ with the :mod:`warnings` module.
The proposal which described this feature for inclusion in the Python standard
library.
- `Original Python logging package <http://www.red-dove.com/python_logging.html>`_
+ `Original Python logging package <https://www.red-dove.com/python_logging.html>`_
This is the original source for the :mod:`logging` package. The version of the
package available from this site is suitable for use with Python 1.5.2, 2.1.x
and 2.2.x, which do not include the :mod:`logging` package in the standard
diff --git a/Doc/library/lzma.rst b/Doc/library/lzma.rst
index b71051da85..f99c495ce9 100644
--- a/Doc/library/lzma.rst
+++ b/Doc/library/lzma.rst
@@ -3,11 +3,15 @@
.. module:: lzma
:synopsis: A Python wrapper for the liblzma compression library.
+
.. moduleauthor:: Nadeem Vawda <nadeem.vawda@gmail.com>
.. sectionauthor:: Nadeem Vawda <nadeem.vawda@gmail.com>
.. versionadded:: 3.3
+**Source code:** :source:`Lib/lzma.py`
+
+--------------
This module provides classes and convenience functions for compressing and
decompressing data using the LZMA compression algorithm. Also included is a file
@@ -110,6 +114,10 @@ Reading and writing compressed files
.. versionchanged:: 3.4
Added support for the ``"x"`` and ``"xb"`` modes.
+ .. versionchanged:: 3.5
+ The :meth:`~io.BufferedIOBase.read` method now accepts an argument of
+ ``None``.
+
Compressing and decompressing data in memory
--------------------------------------------
@@ -221,13 +229,32 @@ Compressing and decompressing data in memory
decompress a multi-stream input with :class:`LZMADecompressor`, you must
create a new decompressor for each stream.
- .. method:: decompress(data)
+ .. method:: decompress(data, max_length=-1)
+
+ Decompress *data* (a :term:`bytes-like object`), returning
+ uncompressed data as bytes. Some of *data* may be buffered
+ internally, for use in later calls to :meth:`decompress`. The
+ returned data should be concatenated with the output of any
+ previous calls to :meth:`decompress`.
+
+ If *max_length* is nonnegative, returns at most *max_length*
+ bytes of decompressed data. If this limit is reached and further
+ output can be produced, the :attr:`~.needs_input` attribute will
+ be set to ``False``. In this case, the next call to
+ :meth:`~.decompress` may provide *data* as ``b''`` to obtain
+ more of the output.
- Decompress *data* (a :class:`bytes` object), returning a :class:`bytes`
- object containing the decompressed data for at least part of the input.
- Some of *data* may be buffered internally, for use in later calls to
- :meth:`decompress`. The returned data should be concatenated with the
- output of any previous calls to :meth:`decompress`.
+ If all of the input data was decompressed and returned (either
+ because this was less than *max_length* bytes, or because
+ *max_length* was negative), the :attr:`~.needs_input` attribute
+ will be set to ``True``.
+
+ Attempting to decompress data after the end of stream is reached
+ raises an `EOFError`. Any data found after the end of the
+ stream is ignored and saved in the :attr:`~.unused_data` attribute.
+
+ .. versionchanged:: 3.5
+ Added the *max_length* parameter.
.. attribute:: check
@@ -245,6 +272,12 @@ Compressing and decompressing data in memory
Before the end of the stream is reached, this will be ``b""``.
+ .. attribute:: needs_input
+
+ ``False`` if the :meth:`.decompress` method can provide more
+ decompressed data before requiring new uncompressed input.
+
+ .. versionadded:: 3.5
.. function:: compress(data, format=FORMAT_XZ, check=-1, preset=None, filters=None)
diff --git a/Doc/library/macpath.rst b/Doc/library/macpath.rst
index b7a5d89239..b08bbe0809 100644
--- a/Doc/library/macpath.rst
+++ b/Doc/library/macpath.rst
@@ -4,6 +4,9 @@
.. module:: macpath
:synopsis: Mac OS 9 path manipulation functions.
+**Source code:** :source:`Lib/macpath.py`
+
+--------------
This module is the Mac OS 9 (and earlier) implementation of the :mod:`os.path`
module. It can be used to manipulate old-style Macintosh pathnames on Mac OS X
diff --git a/Doc/library/mailbox.rst b/Doc/library/mailbox.rst
index d29902dc85..81244c2ed0 100644
--- a/Doc/library/mailbox.rst
+++ b/Doc/library/mailbox.rst
@@ -3,9 +3,13 @@
.. module:: mailbox
:synopsis: Manipulate mailboxes in various formats
+
.. moduleauthor:: Gregory K. Johnson <gkj@gregorykjohnson.com>
.. sectionauthor:: Gregory K. Johnson <gkj@gregorykjohnson.com>
+**Source code:** :source:`Lib/mailbox.py`
+
+--------------
This module defines two classes, :class:`Mailbox` and :class:`Message`, for
accessing and manipulating on-disk mailboxes and the messages they contain.
@@ -422,7 +426,7 @@ Supported mailbox formats are Maildir, mbox, MH, Babyl, and MMDF.
`maildir man page from qmail <http://www.qmail.org/man/man5/maildir.html>`_
The original specification of the format.
- `Using maildir format <http://cr.yp.to/proto/maildir.html>`_
+ `Using maildir format <https://cr.yp.to/proto/maildir.html>`_
Notes on Maildir by its inventor. Includes an updated name-creation scheme and
details on "info" semantics.
@@ -484,7 +488,7 @@ Supported mailbox formats are Maildir, mbox, MH, Babyl, and MMDF.
`mbox man page from tin <http://www.tin.org/bin/man.cgi?section=5&topic=mbox>`_
Another specification of the format, with details on locking.
- `Configuring Netscape Mail on Unix: Why The Content-Length Format is Bad <http://www.jwz.org/doc/content-length.html>`_
+ `Configuring Netscape Mail on Unix: Why The Content-Length Format is Bad <https://www.jwz.org/doc/content-length.html>`_
An argument for using the original mbox format rather than a variation.
`"mbox" is a family of several mutually incompatible mailbox formats <http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/mail-mbox-formats.html>`_
@@ -690,10 +694,10 @@ Supported mailbox formats are Maildir, mbox, MH, Babyl, and MMDF.
.. seealso::
- `Format of Version 5 Babyl Files <http://quimby.gnus.org/notes/BABYL>`_
+ `Format of Version 5 Babyl Files <https://quimby.gnus.org/notes/BABYL>`_
A specification of the Babyl format.
- `Reading Mail with Rmail <http://www.gnu.org/software/emacs/manual/html_node/emacs/Rmail.html>`_
+ `Reading Mail with Rmail <https://www.gnu.org/software/emacs/manual/html_node/emacs/Rmail.html>`_
The Rmail manual, with some information on Babyl semantics.
@@ -744,7 +748,7 @@ Supported mailbox formats are Maildir, mbox, MH, Babyl, and MMDF.
`mmdf man page from tin <http://www.tin.org/bin/man.cgi?section=5&topic=mmdf>`_
A specification of MMDF format from the documentation of tin, a newsreader.
- `MMDF <http://en.wikipedia.org/wiki/MMDF>`_
+ `MMDF <https://en.wikipedia.org/wiki/MMDF>`_
A Wikipedia article describing the Multichannel Memorandum Distribution
Facility.
diff --git a/Doc/library/mailcap.rst b/Doc/library/mailcap.rst
index 8115e42603..896afd1d73 100644
--- a/Doc/library/mailcap.rst
+++ b/Doc/library/mailcap.rst
@@ -70,7 +70,7 @@ standard. However, mailcap files are supported on most Unix systems.
An example usage::
>>> import mailcap
- >>> d=mailcap.getcaps()
+ >>> d = mailcap.getcaps()
>>> mailcap.findmatch(d, 'video/mpeg', filename='tmp1223')
('xmpeg tmp1223', {'view': 'xmpeg %s'})
diff --git a/Doc/library/marshal.rst b/Doc/library/marshal.rst
index af43944b2c..1ffc6effc7 100644
--- a/Doc/library/marshal.rst
+++ b/Doc/library/marshal.rst
@@ -5,6 +5,7 @@
:synopsis: Convert Python objects to streams of bytes and back (with different
constraints).
+--------------
This module contains functions that can read and write Python values in a binary
format. The format is specific to Python, but independent of machine
@@ -16,7 +17,6 @@ rarely does). [#]_
.. index::
module: pickle
module: shelve
- object: code
This is not a general "persistence" module. For general persistence and
transfer of Python objects through RPC calls, see the modules :mod:`pickle` and
@@ -34,13 +34,15 @@ supports a substantially wider range of objects than marshal.
maliciously constructed data. Never unmarshal data received from an
untrusted or unauthenticated source.
+.. index:: object; code, code object
+
Not all Python object types are supported; in general, only objects whose value
is independent from a particular invocation of Python can be written and read by
this module. The following types are supported: booleans, integers, floating
point numbers, complex numbers, strings, bytes, bytearrays, tuples, lists, sets,
frozensets, dictionaries, and code objects, where it should be understood that
tuples, lists, sets, frozensets and dictionaries are only supported as long as
-the values contained therein are themselves supported.
+the values contained therein are themselves supported. The
singletons :const:`None`, :const:`Ellipsis` and :exc:`StopIteration` can also be
marshalled and unmarshalled.
For format *version* lower than 3, recursive lists, sets and dictionaries cannot
diff --git a/Doc/library/math.rst b/Doc/library/math.rst
index 0fc7c7c9b9..3fdea18cfd 100644
--- a/Doc/library/math.rst
+++ b/Doc/library/math.rst
@@ -8,6 +8,8 @@
from math import fsum
+--------------
+
This module is always available. It provides access to the mathematical
functions defined by the C standard.
@@ -97,7 +99,49 @@ Number-theoretic and representation functions
For further discussion and two alternative approaches, see the `ASPN cookbook
recipes for accurate floating point summation
- <http://code.activestate.com/recipes/393090/>`_\.
+ <https://code.activestate.com/recipes/393090/>`_\.
+
+
+.. function:: gcd(a, b)
+
+ Return the greatest common divisor of the integers *a* and *b*. If either
+ *a* or *b* is nonzero, then the value of ``gcd(a, b)`` is the largest
+ positive integer that divides both *a* and *b*. ``gcd(0, 0)`` returns
+ ``0``.
+
+ .. versionadded:: 3.5
+
+
+.. function:: isclose(a, b, *, rel_tol=1e-09, abs_tol=0.0)
+
+ Return ``True`` if the values *a* and *b* are close to each other and
+ ``False`` otherwise.
+
+ Whether or not two values are considered close is determined according to
+ given absolute and relative tolerances.
+
+ *rel_tol* is the relative tolerance -- it is the maximum allowed difference
+ between *a* and *b*, relative to the larger absolute value of *a* or *b*.
+ For example, to set a tolerance of 5%, pass ``rel_tol=0.05``. The default
+ tolerance is ``1e-09``, which assures that the two values are the same
+ within about 9 decimal digits. *rel_tol* must be greater than zero.
+
+ *abs_tol* is the minimum absolute tolerance -- useful for comparisons near
+ zero. *abs_tol* must be at least zero.
+
+ If no errors occur, the result will be:
+ ``abs(a-b) <= max(rel_tol * max(abs(a), abs(b)), abs_tol)``.
+
+ The IEEE 754 special values of ``NaN``, ``inf``, and ``-inf`` will be
+ handled according to IEEE rules. Specifically, ``NaN`` is not considered
+ close to any other value, including ``NaN``. ``inf`` and ``-inf`` are only
+ considered close to themselves.
+
+ .. versionadded:: 3.5
+
+ .. seealso::
+
+ :pep:`485` -- A function for testing approximate equality
.. function:: isfinite(x)
@@ -162,7 +206,7 @@ Power and logarithmic functions
Return ``e**x - 1``. For small floats *x*, the subtraction in ``exp(x) - 1``
can result in a `significant loss of precision
- <http://en.wikipedia.org/wiki/Loss_of_significance>`_\; the :func:`expm1`
+ <https://en.wikipedia.org/wiki/Loss_of_significance>`_\; the :func:`expm1`
function provides a way to compute this quantity to full precision::
>>> from math import exp, expm1
@@ -290,7 +334,7 @@ Angular conversion
Hyperbolic functions
--------------------
-`Hyperbolic functions <http://en.wikipedia.org/wiki/Hyperbolic_function>`_
+`Hyperbolic functions <https://en.wikipedia.org/wiki/Hyperbolic_function>`_
are analogs of trigonometric functions that are based on hyperbolas
instead of circles.
@@ -329,12 +373,12 @@ Special functions
.. function:: erf(x)
- Return the `error function <http://en.wikipedia.org/wiki/Error_function>`_ at
+ Return the `error function <https://en.wikipedia.org/wiki/Error_function>`_ at
*x*.
The :func:`erf` function can be used to compute traditional statistical
functions such as the `cumulative standard normal distribution
- <http://en.wikipedia.org/wiki/Normal_distribution#Cumulative_distribution_function>`_::
+ <https://en.wikipedia.org/wiki/Normal_distribution#Cumulative_distribution_function>`_::
def phi(x):
'Cumulative distribution function for the standard normal distribution'
@@ -346,17 +390,17 @@ Special functions
.. function:: erfc(x)
Return the complementary error function at *x*. The `complementary error
- function <http://en.wikipedia.org/wiki/Error_function>`_ is defined as
+ function <https://en.wikipedia.org/wiki/Error_function>`_ is defined as
``1.0 - erf(x)``. It is used for large values of *x* where a subtraction
from one would cause a `loss of significance
- <http://en.wikipedia.org/wiki/Loss_of_significance>`_\.
+ <https://en.wikipedia.org/wiki/Loss_of_significance>`_\.
.. versionadded:: 3.2
.. function:: gamma(x)
- Return the `Gamma function <http://en.wikipedia.org/wiki/Gamma_function>`_ at
+ Return the `Gamma function <https://en.wikipedia.org/wiki/Gamma_function>`_ at
*x*.
.. versionadded:: 3.2
@@ -383,6 +427,22 @@ Constants
The mathematical constant e = 2.718281..., to available precision.
+.. data:: inf
+
+ A floating-point positive infinity. (For negative infinity, use
+ ``-math.inf``.) Equivalent to the output of ``float('inf')``.
+
+ .. versionadded:: 3.5
+
+
+.. data:: nan
+
+ A floating-point "not a number" (NaN) value. Equivalent to the output of
+ ``float('nan')``.
+
+ .. versionadded:: 3.5
+
+
.. impl-detail::
The :mod:`math` module consists mostly of thin wrappers around the platform C
diff --git a/Doc/library/mimetypes.rst b/Doc/library/mimetypes.rst
index 8739ea3dcd..464248c3ea 100644
--- a/Doc/library/mimetypes.rst
+++ b/Doc/library/mimetypes.rst
@@ -3,13 +3,13 @@
.. module:: mimetypes
:synopsis: Mapping of filename extensions to MIME types.
+
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
+**Source code:** :source:`Lib/mimetypes.py`
.. index:: pair: MIME; content type
-**Source code:** :source:`Lib/mimetypes.py`
-
--------------
The :mod:`mimetypes` module converts between a filename or URL and the MIME type
@@ -44,7 +44,7 @@ the information :func:`init` sets up.
The optional *strict* argument is a flag specifying whether the list of known MIME types
is limited to only the official types `registered with IANA
- <http://www.iana.org/assignments/media-types/media-types.xhtml>`_.
+ <https://www.iana.org/assignments/media-types/media-types.xhtml>`_.
When *strict* is ``True`` (the default), only the IANA types are supported; when
*strict* is ``False``, some additional non-standard but commonly used MIME types
are also recognized.
diff --git a/Doc/library/mmap.rst b/Doc/library/mmap.rst
index 18e05e31f7..8f538339aa 100644
--- a/Doc/library/mmap.rst
+++ b/Doc/library/mmap.rst
@@ -4,6 +4,7 @@
.. module:: mmap
:synopsis: Interface to memory-mapped files for Unix and Windows.
+--------------
Memory-mapped file objects behave like both :class:`bytearray` and like
:term:`file objects <file object>`. You can use mmap objects in most places
@@ -127,7 +128,7 @@ To map anonymous memory, -1 should be passed as the fileno along with the length
import mmap
with mmap.mmap(-1, 13) as mm:
- mm.write("Hello world!")
+ mm.write(b"Hello world!")
.. versionadded:: 3.2
Context manager support.
@@ -144,7 +145,7 @@ To map anonymous memory, -1 should be passed as the fileno along with the length
pid = os.fork()
- if pid == 0: # In a child process
+ if pid == 0: # In a child process
mm.seek(0)
print(mm.readline())
@@ -174,6 +175,9 @@ To map anonymous memory, -1 should be passed as the fileno along with the length
Optional arguments *start* and *end* are interpreted as in slice notation.
Returns ``-1`` on failure.
+ .. versionchanged:: 3.5
+ Writable :term:`bytes-like object` is now accepted.
+
.. method:: flush([offset[, size]])
@@ -234,6 +238,9 @@ To map anonymous memory, -1 should be passed as the fileno along with the length
Optional arguments *start* and *end* are interpreted as in slice notation.
Returns ``-1`` on failure.
+ .. versionchanged:: 3.5
+ Writable :term:`bytes-like object` is now accepted.
+
.. method:: seek(pos[, whence])
@@ -261,6 +268,9 @@ To map anonymous memory, -1 should be passed as the fileno along with the length
were written. If the mmap was created with :const:`ACCESS_READ`, then
writing to it will raise a :exc:`TypeError` exception.
+ .. versionchanged:: 3.5
+ Writable :term:`bytes-like object` is now accepted.
+
.. method:: write_byte(byte)
diff --git a/Doc/library/modulefinder.rst b/Doc/library/modulefinder.rst
index e84a4964a0..7b39ce7d1a 100644
--- a/Doc/library/modulefinder.rst
+++ b/Doc/library/modulefinder.rst
@@ -1,12 +1,11 @@
:mod:`modulefinder` --- Find modules used by a script
=====================================================
-.. sectionauthor:: A.M. Kuchling <amk@amk.ca>
-
-
.. module:: modulefinder
:synopsis: Find modules used by a script.
+.. sectionauthor:: A.M. Kuchling <amk@amk.ca>
+
**Source code:** :source:`Lib/modulefinder.py`
--------------
diff --git a/Doc/library/msilib.rst b/Doc/library/msilib.rst
index 4145c8e7cc..0a42032974 100644
--- a/Doc/library/msilib.rst
+++ b/Doc/library/msilib.rst
@@ -4,12 +4,16 @@
.. module:: msilib
:platform: Windows
:synopsis: Creation of Microsoft Installer files, and CAB files.
+
.. moduleauthor:: Martin v. Löwis <martin@v.loewis.de>
.. sectionauthor:: Martin v. Löwis <martin@v.loewis.de>
+**Source code:** :source:`Lib/msilib/__init__.py`
.. index:: single: msi
+--------------
+
The :mod:`msilib` supports the creation of Microsoft Installer (``.msi``) files.
Because these files often contain an embedded "cabinet" file (``.cab``), it also
exposes an API to create CAB files. Support for reading ``.cab`` files is
@@ -120,9 +124,9 @@ structures.
.. seealso::
- `FCICreateFile <http://msdn.microsoft.com/library?url=/library/en-us/devnotes/winprog/fcicreate.asp>`_
- `UuidCreate <http://msdn.microsoft.com/library?url=/library/en-us/rpc/rpc/uuidcreate.asp>`_
- `UuidToString <http://msdn.microsoft.com/library?url=/library/en-us/rpc/rpc/uuidtostring.asp>`_
+ `FCICreateFile <https://msdn.microsoft.com/library?url=/library/en-us/devnotes/winprog/fcicreate.asp>`_
+ `UuidCreate <https://msdn.microsoft.com/library?url=/library/en-us/rpc/rpc/uuidcreate.asp>`_
+ `UuidToString <https://msdn.microsoft.com/library?url=/library/en-us/rpc/rpc/uuidtostring.asp>`_
.. _database-objects:
@@ -151,9 +155,9 @@ Database Objects
.. seealso::
- `MSIDatabaseOpenView <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msidatabaseopenview.asp>`_
- `MSIDatabaseCommit <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msidatabasecommit.asp>`_
- `MSIGetSummaryInformation <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msigetsummaryinformation.asp>`_
+ `MSIDatabaseOpenView <https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msidatabaseopenview.asp>`_
+ `MSIDatabaseCommit <https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msidatabasecommit.asp>`_
+ `MSIGetSummaryInformation <https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msigetsummaryinformation.asp>`_
.. _view-objects:
@@ -199,11 +203,11 @@ View Objects
.. seealso::
- `MsiViewExecute <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msiviewexecute.asp>`_
- `MSIViewGetColumnInfo <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msiviewgetcolumninfo.asp>`_
- `MsiViewFetch <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msiviewfetch.asp>`_
- `MsiViewModify <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msiviewmodify.asp>`_
- `MsiViewClose <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msiviewclose.asp>`_
+ `MsiViewExecute <https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msiviewexecute.asp>`_
+ `MSIViewGetColumnInfo <https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msiviewgetcolumninfo.asp>`_
+ `MsiViewFetch <https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msiviewfetch.asp>`_
+ `MsiViewModify <https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msiviewmodify.asp>`_
+ `MsiViewClose <https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msiviewclose.asp>`_
.. _summary-objects:
@@ -243,10 +247,10 @@ Summary Information Objects
.. seealso::
- `MsiSummaryInfoGetProperty <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msisummaryinfogetproperty.asp>`_
- `MsiSummaryInfoGetPropertyCount <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msisummaryinfogetpropertycount.asp>`_
- `MsiSummaryInfoSetProperty <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msisummaryinfosetproperty.asp>`_
- `MsiSummaryInfoPersist <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msisummaryinfopersist.asp>`_
+ `MsiSummaryInfoGetProperty <https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msisummaryinfogetproperty.asp>`_
+ `MsiSummaryInfoGetPropertyCount <https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msisummaryinfogetpropertycount.asp>`_
+ `MsiSummaryInfoSetProperty <https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msisummaryinfosetproperty.asp>`_
+ `MsiSummaryInfoPersist <https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msisummaryinfopersist.asp>`_
.. _record-objects:
@@ -297,11 +301,11 @@ Record Objects
.. seealso::
- `MsiRecordGetFieldCount <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msirecordgetfieldcount.asp>`_
- `MsiRecordSetString <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msirecordsetstring.asp>`_
- `MsiRecordSetStream <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msirecordsetstream.asp>`_
- `MsiRecordSetInteger <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msirecordsetinteger.asp>`_
- `MsiRecordClear <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msirecordclear.asp>`_
+ `MsiRecordGetFieldCount <https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msirecordgetfieldcount.asp>`_
+ `MsiRecordSetString <https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msirecordsetstring.asp>`_
+ `MsiRecordSetStream <https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msirecordsetstream.asp>`_
+ `MsiRecordSetInteger <https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msirecordsetinteger.asp>`_
+ `MsiRecordClear <https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/msirecordclear.asp>`_
.. _msi-errors:
@@ -393,10 +397,10 @@ Directory Objects
.. seealso::
- `Directory Table <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/directory_table.asp>`_
- `File Table <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/file_table.asp>`_
- `Component Table <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/component_table.asp>`_
- `FeatureComponents Table <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/featurecomponents_table.asp>`_
+ `Directory Table <https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/directory_table.asp>`_
+ `File Table <https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/file_table.asp>`_
+ `Component Table <https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/component_table.asp>`_
+ `FeatureComponents Table <https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/featurecomponents_table.asp>`_
.. _features:
@@ -421,7 +425,7 @@ Features
.. seealso::
- `Feature Table <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/feature_table.asp>`_
+ `Feature Table <https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/feature_table.asp>`_
.. _msi-gui:
@@ -516,13 +520,13 @@ for installing Python packages.
.. seealso::
- `Dialog Table <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/dialog_table.asp>`_
- `Control Table <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/control_table.asp>`_
- `Control Types <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/controls.asp>`_
- `ControlCondition Table <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/controlcondition_table.asp>`_
- `ControlEvent Table <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/controlevent_table.asp>`_
- `EventMapping Table <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/eventmapping_table.asp>`_
- `RadioButton Table <http://msdn.microsoft.com/library?url=/library/en-us/msi/setup/radiobutton_table.asp>`_
+ `Dialog Table <https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/dialog_table.asp>`_
+ `Control Table <https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/control_table.asp>`_
+ `Control Types <https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/controls.asp>`_
+ `ControlCondition Table <https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/controlcondition_table.asp>`_
+ `ControlEvent Table <https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/controlevent_table.asp>`_
+ `EventMapping Table <https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/eventmapping_table.asp>`_
+ `RadioButton Table <https://msdn.microsoft.com/library?url=/library/en-us/msi/setup/radiobutton_table.asp>`_
.. _msi-tables:
diff --git a/Doc/library/msvcrt.rst b/Doc/library/msvcrt.rst
index fadaf05a09..b334eeb314 100644
--- a/Doc/library/msvcrt.rst
+++ b/Doc/library/msvcrt.rst
@@ -4,8 +4,10 @@
.. module:: msvcrt
:platform: Windows
:synopsis: Miscellaneous useful routines from the MS VC++ runtime.
+
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
+--------------
These functions provide access to some useful capabilities on Windows platforms.
Some higher-level modules use these functions to build the Windows
diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst
index f7dc11bf3f..c5c092c1ce 100644
--- a/Doc/library/multiprocessing.rst
+++ b/Doc/library/multiprocessing.rst
@@ -4,6 +4,9 @@
.. module:: multiprocessing
:synopsis: Process-based parallelism.
+**Source code:** :source:`Lib/multiprocessing/`
+
+--------------
Introduction
------------
@@ -316,7 +319,7 @@ However, if you really do need to use some shared data then
proxies.
A manager returned by :func:`Manager` will support types
- :class:`list`, :class:`dict`, :class:`Namespace`, :class:`Lock`,
+ :class:`list`, :class:`dict`, :class:`~managers.Namespace`, :class:`Lock`,
:class:`RLock`, :class:`Semaphore`, :class:`BoundedSemaphore`,
:class:`Condition`, :class:`Event`, :class:`Barrier`,
:class:`Queue`, :class:`Value` and :class:`Array`. For example, ::
@@ -361,8 +364,9 @@ processes in a few different ways.
For example::
- from multiprocessing import Pool
- from time import sleep
+ from multiprocessing import Pool, TimeoutError
+ import time
+ import os
def f(x):
return x*x
@@ -378,15 +382,29 @@ For example::
for i in pool.imap_unordered(f, range(10)):
print(i)
- # evaluate "f(10)" asynchronously
- res = pool.apply_async(f, [10])
- print(res.get(timeout=1)) # prints "100"
+ # evaluate "f(20)" asynchronously
+ res = pool.apply_async(f, (20,)) # runs in *only* one process
+ print(res.get(timeout=1)) # prints "400"
+
+ # evaluate "os.getpid()" asynchronously
+ res = pool.apply_async(os.getpid, ()) # runs in *only* one process
+ print(res.get(timeout=1)) # prints the PID of that process
+
+ # launching multiple evaluations asynchronously *may* use more processes
+ multiple_results = [pool.apply_async(os.getpid, ()) for i in range(4)]
+ print([res.get(timeout=1) for res in multiple_results])
+
+ # make a single worker sleep for 10 secs
+ res = pool.apply_async(time.sleep, (10,))
+ try:
+ print(res.get(timeout=1))
+ except TimeoutError:
+ print("We lacked patience and got a multiprocessing.TimeoutError")
- # make worker sleep for 10 secs
- res = pool.apply_async(sleep, [10])
- print(res.get(timeout=1)) # raises multiprocessing.TimeoutError
+ print("For the moment, the pool remains available for more work")
# exiting the 'with'-block has stopped the pool
+ print("Now the pool is closed and no longer available")
Note that the methods of a pool should only ever be used by the
process which created it.
@@ -901,8 +919,10 @@ Miscellaneous
If the ``freeze_support()`` line is omitted then trying to run the frozen
executable will raise :exc:`RuntimeError`.
- If the module is being run normally by the Python interpreter then
- :func:`freeze_support` has no effect.
+ Calling ``freeze_support()`` has no effect when invoked on any operating
+ system other than Windows. In addition, if the module is being run
+ normally by the Python interpreter on Windows (the program has not been
+ frozen), then ``freeze_support()`` has no effect.
.. function:: get_all_start_methods()
@@ -1458,6 +1478,9 @@ processes.
Note that accessing the ctypes object through the wrapper can be a lot slower
than accessing the raw ctypes object.
+ .. versionchanged:: 3.5
+ Synchronized objects support the :term:`context manager` protocol.
+
The table below compares the syntax for creating shared ctypes objects from
shared memory with the normal ctypes syntax. (In the table ``MyStruct`` is some
@@ -1742,24 +1765,26 @@ their parent process exits. The manager classes are defined in the
lproxy[0] = d
-Namespace objects
->>>>>>>>>>>>>>>>>
+.. class:: Namespace
-A namespace object has no public methods, but does have writable attributes.
-Its representation shows the values of its attributes.
+ A type that can register with :class:`SyncManager`.
-However, when using a proxy for a namespace object, an attribute beginning with
-``'_'`` will be an attribute of the proxy and not an attribute of the referent:
+ A namespace object has no public methods, but does have writable attributes.
+ Its representation shows the values of its attributes.
-.. doctest::
+ However, when using a proxy for a namespace object, an attribute beginning
+ with ``'_'`` will be an attribute of the proxy and not an attribute of the
+ referent:
+
+ .. doctest::
- >>> manager = multiprocessing.Manager()
- >>> Global = manager.Namespace()
- >>> Global.x = 10
- >>> Global.y = 'hello'
- >>> Global._z = 12.3 # this is an attribute of the proxy
- >>> print(Global)
- Namespace(x=10, y='hello')
+ >>> manager = multiprocessing.Manager()
+ >>> Global = manager.Namespace()
+ >>> Global.x = 10
+ >>> Global.y = 'hello'
+ >>> Global._z = 12.3 # this is an attribute of the proxy
+ >>> print(Global)
+ Namespace(x=10, y='hello')
Customized managers
@@ -1945,9 +1970,9 @@ itself. This means, for example, that one shared object can contain a second:
>>> l = manager.list(range(10))
>>> l._callmethod('__len__')
10
- >>> l._callmethod('__getitem__', (slice(2, 7),)) # equiv to `l[2:7]`
+ >>> l._callmethod('__getitem__', (slice(2, 7),)) # equivalent to l[2:7]
[2, 3, 4, 5, 6]
- >>> l._callmethod('__getitem__', (20,)) # equiv to `l[20]`
+ >>> l._callmethod('__getitem__', (20,)) # equivalent to l[20]
Traceback (most recent call last):
...
IndexError: list index out of range
@@ -2164,13 +2189,14 @@ with the :class:`Pool` class.
The following example demonstrates the use of a pool::
from multiprocessing import Pool
+ import time
def f(x):
return x*x
if __name__ == '__main__':
with Pool(processes=4) as pool: # start 4 worker processes
- result = pool.apply_async(f, (10,)) # evaluate "f(10)" asynchronously
+ result = pool.apply_async(f, (10,)) # evaluate "f(10)" asynchronously in a single process
print(result.get(timeout=1)) # prints "100" unless your computer is *very* slow
print(pool.map(f, range(10))) # prints "[0, 1, 4,..., 81]"
@@ -2180,9 +2206,8 @@ The following example demonstrates the use of a pool::
print(next(it)) # prints "1"
print(it.next(timeout=1)) # prints "4" unless your computer is *very* slow
- import time
result = pool.apply_async(time.sleep, (10,))
- print(result.get(timeout=1)) # raises TimeoutError
+ print(result.get(timeout=1)) # raises multiprocessing.TimeoutError
.. _multiprocessing-listeners-clients:
@@ -2456,7 +2481,7 @@ the connection.)
If authentication is requested but no authentication key is specified then the
return value of ``current_process().authkey`` is used (see
-:class:`~multiprocessing.Process`). This value will automatically inherited by
+:class:`~multiprocessing.Process`). This value will be automatically inherited by
any :class:`~multiprocessing.Process` object that the current process creates.
This means that (by default) all processes of a multi-process program will share
a single authentication key which can be used when setting up connections
@@ -2641,8 +2666,8 @@ Explicitly pass resources to child processes
... do something using "lock" ...
if __name__ == '__main__':
- lock = Lock()
- for i in range(10):
+ lock = Lock()
+ for i in range(10):
Process(target=f).start()
should be rewritten as ::
@@ -2653,8 +2678,8 @@ Explicitly pass resources to child processes
... do something using "l" ...
if __name__ == '__main__':
- lock = Lock()
- for i in range(10):
+ lock = Lock()
+ for i in range(10):
Process(target=f, args=(lock,)).start()
Beware of replacing :data:`sys.stdin` with a "file like object"
@@ -2667,7 +2692,7 @@ Beware of replacing :data:`sys.stdin` with a "file like object"
in issues with processes-in-processes. This has been changed to::
sys.stdin.close()
- sys.stdin = open(os.devnull)
+ sys.stdin = open(os.open(os.devnull, os.O_RDONLY), closefd=False)
Which solves the fundamental issue of processes colliding with each other
resulting in a bad file descriptor error, but introduces a potential danger
diff --git a/Doc/library/netrc.rst b/Doc/library/netrc.rst
index 23ffed69eb..cdc2616368 100644
--- a/Doc/library/netrc.rst
+++ b/Doc/library/netrc.rst
@@ -4,6 +4,7 @@
.. module:: netrc
:synopsis: Loading of .netrc files.
+
.. moduleauthor:: Eric S. Raymond <esr@snark.thyrsus.com>
.. sectionauthor:: Eric S. Raymond <esr@snark.thyrsus.com>
diff --git a/Doc/library/nis.rst b/Doc/library/nis.rst
index ade2a7aad0..10c67cbb81 100644
--- a/Doc/library/nis.rst
+++ b/Doc/library/nis.rst
@@ -5,9 +5,11 @@
.. module:: nis
:platform: Unix
:synopsis: Interface to Sun's NIS (Yellow Pages) library.
+
.. moduleauthor:: Fred Gansevles <Fred.Gansevles@cs.utwente.nl>
.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
+--------------
The :mod:`nis` module gives a thin wrapper around the NIS library, useful for
central administration of several hosts.
@@ -26,7 +28,7 @@ The :mod:`nis` module defines the following functions:
Note that *mapname* is first checked if it is an alias to another name.
- The *domain* argument allows to override the NIS domain used for the lookup. If
+ The *domain* argument allows overriding the NIS domain used for the lookup. If
unspecified, lookup is in the default NIS domain.
@@ -38,7 +40,7 @@ The :mod:`nis` module defines the following functions:
Note that *mapname* is first checked if it is an alias to another name.
- The *domain* argument allows to override the NIS domain used for the lookup. If
+ The *domain* argument allows overriding the NIS domain used for the lookup. If
unspecified, lookup is in the default NIS domain.
@@ -46,7 +48,7 @@ The :mod:`nis` module defines the following functions:
Return a list of all valid maps.
- The *domain* argument allows to override the NIS domain used for the lookup. If
+ The *domain* argument allows overriding the NIS domain used for the lookup. If
unspecified, lookup is in the default NIS domain.
diff --git a/Doc/library/nntplib.rst b/Doc/library/nntplib.rst
index 9fb1b4594d..9790e3a0b2 100644
--- a/Doc/library/nntplib.rst
+++ b/Doc/library/nntplib.rst
@@ -4,13 +4,12 @@
.. module:: nntplib
:synopsis: NNTP protocol client (requires sockets).
+**Source code:** :source:`Lib/nntplib.py`
.. index::
pair: NNTP; protocol
single: Network News Transfer Protocol
-**Source code:** :source:`Lib/nntplib.py`
-
--------------
This module defines the class :class:`NNTP` which implements the client side of
diff --git a/Doc/library/numbers.rst b/Doc/library/numbers.rst
index 8ab07d0b93..1b594952ea 100644
--- a/Doc/library/numbers.rst
+++ b/Doc/library/numbers.rst
@@ -4,6 +4,9 @@
.. module:: numbers
:synopsis: Numeric abstract base classes (Complex, Real, Integral, etc.).
+**Source code:** :source:`Lib/numbers.py`
+
+--------------
The :mod:`numbers` module (:pep:`3141`) defines a hierarchy of numeric
:term:`abstract base classes <abstract base class>` which progressively define
@@ -35,7 +38,7 @@ The numeric tower
Abstract. Retrieves the imaginary component of this number.
- .. method:: conjugate()
+ .. abstractmethod:: conjugate()
Abstract. Returns the complex conjugate. For example, ``(1+3j).conjugate()
== (1-3j)``.
diff --git a/Doc/library/operator.rst b/Doc/library/operator.rst
index f9e2a3d003..8121b480cb 100644
--- a/Doc/library/operator.rst
+++ b/Doc/library/operator.rst
@@ -3,16 +3,16 @@
.. module:: operator
:synopsis: Functions corresponding to the standard operators.
+
.. sectionauthor:: Skip Montanaro <skip@automatrix.com>
+**Source code:** :source:`Lib/operator.py`
.. testsetup::
import operator
from operator import itemgetter, iadd
-**Source code:** :source:`Lib/operator.py`
-
--------------
The :mod:`operator` module exports a set of efficient functions corresponding to
@@ -138,6 +138,14 @@ The mathematical and bitwise operations are the most numerous:
Return ``a * b``, for *a* and *b* numbers.
+.. function:: matmul(a, b)
+ __matmul__(a, b)
+
+ Return ``a @ b``.
+
+ .. versionadded:: 3.5
+
+
.. function:: neg(obj)
__neg__(obj)
@@ -391,6 +399,8 @@ Python syntax and the functions in the :mod:`operator` module.
+-----------------------+-------------------------+---------------------------------------+
| Multiplication | ``a * b`` | ``mul(a, b)`` |
+-----------------------+-------------------------+---------------------------------------+
+| Matrix Multiplication | ``a @ b`` | ``matmul(a, b)`` |
++-----------------------+-------------------------+---------------------------------------+
| Negation (Arithmetic) | ``- a`` | ``neg(a)`` |
+-----------------------+-------------------------+---------------------------------------+
| Negation (Logical) | ``not a`` | ``not_(a)`` |
@@ -499,6 +509,14 @@ will perform the update, so no subsequent assignment is necessary:
``a = imul(a, b)`` is equivalent to ``a *= b``.
+.. function:: imatmul(a, b)
+ __imatmul__(a, b)
+
+ ``a = imatmul(a, b)`` is equivalent to ``a @= b``.
+
+ .. versionadded:: 3.5
+
+
.. function:: ior(a, b)
__ior__(a, b)
diff --git a/Doc/library/optparse.rst b/Doc/library/optparse.rst
index 160c29d3b5..9a4ba4e6ed 100644
--- a/Doc/library/optparse.rst
+++ b/Doc/library/optparse.rst
@@ -4,15 +4,16 @@
.. module:: optparse
:synopsis: Command-line option parsing library.
:deprecated:
+
.. moduleauthor:: Greg Ward <gward@python.net>
.. sectionauthor:: Greg Ward <gward@python.net>
+**Source code:** :source:`Lib/optparse.py`
+
.. deprecated:: 3.2
The :mod:`optparse` module is deprecated and will not be developed further;
development will continue with the :mod:`argparse` module.
-**Source code:** :source:`Lib/optparse.py`
-
--------------
:mod:`optparse` is a more convenient, flexible, and powerful library for parsing
@@ -25,7 +26,7 @@ GNU/POSIX syntax, and additionally generates usage and help messages for you.
Here's an example of using :mod:`optparse` in a simple script::
from optparse import OptionParser
- [...]
+ ...
parser = OptionParser()
parser.add_option("-f", "--file", dest="filename",
help="write report to FILE", metavar="FILE")
@@ -252,7 +253,7 @@ First, you need to import the OptionParser class; then, early in the main
program, create an OptionParser instance::
from optparse import OptionParser
- [...]
+ ...
parser = OptionParser()
Then you can start defining options. The basic syntax is::
@@ -718,7 +719,7 @@ you can call :func:`OptionParser.error` to signal an application-defined error
condition::
(options, args) = parser.parse_args()
- [...]
+ ...
if options.a and options.b:
parser.error("options -a and -b are mutually exclusive")
@@ -758,7 +759,7 @@ Putting it all together
Here's what :mod:`optparse`\ -based scripts usually look like::
from optparse import OptionParser
- [...]
+ ...
def main():
usage = "usage: %prog [options] arg"
parser = OptionParser(usage)
@@ -768,13 +769,13 @@ Here's what :mod:`optparse`\ -based scripts usually look like::
action="store_true", dest="verbose")
parser.add_option("-q", "--quiet",
action="store_false", dest="verbose")
- [...]
+ ...
(options, args) = parser.parse_args()
if len(args) != 1:
parser.error("incorrect number of arguments")
if options.verbose:
print("reading %s..." % options.filename)
- [...]
+ ...
if __name__ == "__main__":
main()
@@ -1409,7 +1410,7 @@ If you're not careful, it's easy to define options with conflicting option
strings::
parser.add_option("-n", "--dry-run", ...)
- [...]
+ ...
parser.add_option("-n", "--noisy", ...)
(This is particularly true if you've defined your own OptionParser subclass with
@@ -1450,7 +1451,7 @@ that option. If the user asks for help, the help message will reflect that::
Options:
--dry-run do no harm
- [...]
+ ...
-n, --noisy be noisy
It's possible to whittle away the option strings for a previously-added option
@@ -1465,7 +1466,7 @@ At this point, the original ``-n``/``--dry-run`` option is no longer
accessible, so :mod:`optparse` removes it, leaving this help text::
Options:
- [...]
+ ...
-n, --noisy be noisy
--dry-run new dry-run option
@@ -1701,7 +1702,7 @@ seen, but blow up if it comes after ``-b`` in the command-line. ::
if parser.values.b:
raise OptionValueError("can't use -a after -b")
parser.values.a = 1
- [...]
+ ...
parser.add_option("-a", action="callback", callback=check_order)
parser.add_option("-b", action="store_true", dest="b")
@@ -1719,7 +1720,7 @@ message and the flag that it sets must be generalized. ::
if parser.values.b:
raise OptionValueError("can't use %s after -b" % opt_str)
setattr(parser.values, option.dest, 1)
- [...]
+ ...
parser.add_option("-a", action="callback", callback=check_order, dest='a')
parser.add_option("-b", action="store_true", dest="b")
parser.add_option("-c", action="callback", callback=check_order, dest='c')
@@ -1739,7 +1740,7 @@ should not be called when the moon is full, all you have to do is this::
raise OptionValueError("%s option invalid when moon is full"
% opt_str)
setattr(parser.values, option.dest, 1)
- [...]
+ ...
parser.add_option("--foo",
action="callback", callback=check_moon, dest="foo")
@@ -1762,7 +1763,7 @@ Here's an example that just emulates the standard ``"store"`` action::
def store_value(option, opt_str, value, parser):
setattr(parser.values, option.dest, value)
- [...]
+ ...
parser.add_option("--foo",
action="callback", callback=store_value,
type="int", nargs=3, dest="foo")
@@ -1824,9 +1825,9 @@ arguments::
del parser.rargs[:len(value)]
setattr(parser.values, option.dest, value)
- [...]
- parser.add_option("-c", "--callback", dest="vararg_attr",
- action="callback", callback=vararg_callback)
+ ...
+ parser.add_option("-c", "--callback", dest="vararg_attr",
+ action="callback", callback=vararg_callback)
.. _optparse-extending-optparse:
diff --git a/Doc/library/os.path.rst b/Doc/library/os.path.rst
index 33ef564c2c..bf0dface7e 100644
--- a/Doc/library/os.path.rst
+++ b/Doc/library/os.path.rst
@@ -4,8 +4,14 @@
.. module:: os.path
:synopsis: Operations on pathnames.
+**Source code:** :source:`Lib/posixpath.py` (for POSIX),
+:source:`Lib/ntpath.py` (for Windows NT),
+and :source:`Lib/macpath.py` (for Macintosh)
+
.. index:: single: path; operations
+--------------
+
This module implements some useful functions on pathnames. To read or
write files see :func:`open`, and for accessing the filesystem see the
:mod:`os` module. The path parameters can be passed as either strings,
@@ -66,11 +72,37 @@ the :mod:`glob` module.)
empty string (``''``).
+.. function:: commonpath(paths)
+
+ Return the longest common sub-path of each pathname in the sequence
+ *paths*. Raise ValueError if *paths* contains both absolute and relative
+ pathnames, or if *paths* is empty. Unlike :func:`commonprefix`, this
+ returns a valid path.
+
+ Availability: Unix, Windows
+
+ .. versionadded:: 3.5
+
+
.. function:: commonprefix(list)
- Return the longest path prefix (taken character-by-character) that is a prefix
- of all paths in *list*. If *list* is empty, return the empty string (``''``).
- Note that this may return invalid paths because it works a character at a time.
+ Return the longest path prefix (taken character-by-character) that is a
+ prefix of all paths in *list*. If *list* is empty, return the empty string
+ (``''``).
+
+ .. note::
+
+ This function may return invalid paths because it works a
+ character at a time. To obtain a valid path, see
+ :func:`commonpath`.
+
+ ::
+
+ >>> os.path.commonprefix(['/usr/lib', '/usr/local/lib'])
+ '/usr/l'
+
+ >>> os.path.commonpath(['/usr/lib', '/usr/local/lib'])
+ '/usr'
.. function:: dirname(path)
@@ -188,7 +220,7 @@ the :mod:`glob` module.)
.. function:: islink(path)
Return ``True`` if *path* refers to a directory entry that is a symbolic link.
- Always ``False`` if symbolic links are not supported by the python runtime.
+ Always ``False`` if symbolic links are not supported by the Python runtime.
.. function:: ismount(path)
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index 7bc59898ab..743efb691a 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -4,6 +4,9 @@
.. module:: os
:synopsis: Miscellaneous operating system interfaces.
+**Source code:** :source:`Lib/os.py`
+
+--------------
This module provides a portable way of using operating system dependent
functionality. If you just want to read or write a file see :func:`open`, if
@@ -78,9 +81,10 @@ uses the file system encoding to perform this conversion (see
.. versionchanged:: 3.1
On some systems, conversion using the file system encoding may fail. In this
- case, Python uses the ``surrogateescape`` encoding error handler, which means
- that undecodable bytes are replaced by a Unicode character U+DCxx on
- decoding, and these are again translated to the original byte on encoding.
+ case, Python uses the :ref:`surrogateescape encoding error handler
+ <surrogateescape>`, which means that undecodable bytes are replaced by a
+ Unicode character U+DCxx on decoding, and these are again translated to the
+ original byte on encoding.
The file system encoding must guarantee to successfully decode all bytes
@@ -311,8 +315,6 @@ process and user.
Return the current process id.
- Availability: Unix, Windows.
-
.. function:: getppid()
@@ -549,8 +551,6 @@ process and user.
On platforms where :c:func:`strerror` returns ``NULL`` when given an unknown
error number, :exc:`ValueError` is raised.
- Availability: Unix, Windows.
-
.. data:: supports_bytes_environ
@@ -564,8 +564,6 @@ process and user.
Set the current numeric umask and return the previous umask.
- Availability: Unix, Windows.
-
.. function:: uname()
@@ -656,8 +654,6 @@ as internal buffering of data.
Close file descriptor *fd*.
- Availability: Unix, Windows.
-
.. note::
This function is intended for low-level I/O and must be applied to a file
@@ -677,8 +673,6 @@ as internal buffering of data.
except OSError:
pass
- Availability: Unix, Windows.
-
.. function:: device_encoding(fd)
@@ -695,8 +689,6 @@ as internal buffering of data.
2: stderr), the new file descriptor is :ref:`inheritable
<fd_inheritance>`.
- Availability: Unix, Windows.
-
.. versionchanged:: 3.4
The new file descriptor is now non-inheritable.
@@ -707,8 +699,6 @@ as internal buffering of data.
The file descriptor *fd2* is :ref:`inheritable <fd_inheritance>` by default,
or non-inheritable if *inheritable* is ``False``.
- Availability: Unix, Windows.
-
.. versionchanged:: 3.4
Add the optional *inheritable* parameter.
@@ -774,8 +764,6 @@ as internal buffering of data.
The :func:`.stat` function.
- Availability: Unix, Windows.
-
.. function:: fstatvfs(fd)
@@ -804,8 +792,21 @@ as internal buffering of data.
most *length* bytes in size. As of Python 3.3, this is equivalent to
``os.truncate(fd, length)``.
+ Availability: Unix, Windows.
+
+ .. versionchanged:: 3.5
+ Added support for Windows
+
+.. function:: get_blocking(fd)
+
+ Get the blocking mode of the file descriptor: ``False`` if the
+ :data:`O_NONBLOCK` flag is set, ``True`` if the flag is cleared.
+
+ See also :func:`set_blocking` and :meth:`socket.socket.setblocking`.
+
Availability: Unix.
+ .. versionadded:: 3.5
.. function:: isatty(fd)
@@ -846,8 +847,6 @@ as internal buffering of data.
current position; :const:`SEEK_END` or ``2`` to set it relative to the end of
the file. Return the new cursor position in bytes, starting from the beginning.
- Availability: Unix, Windows.
-
.. data:: SEEK_SET
SEEK_CUR
@@ -856,8 +855,6 @@ as internal buffering of data.
Parameters to the :func:`lseek` function. Their values are 0, 1, and 2,
respectively.
- Availability: Unix, Windows.
-
.. versionadded:: 3.3
Some operating systems could support additional values, like
:data:`os.SEEK_HOLE` or :data:`os.SEEK_DATA`.
@@ -878,8 +875,6 @@ as internal buffering of data.
This function can support :ref:`paths relative to directory descriptors
<dir_fd>` with the *dir_fd* parameter.
- Availability: Unix, Windows.
-
.. versionchanged:: 3.4
The new file descriptor is now non-inheritable.
@@ -893,11 +888,16 @@ as internal buffering of data.
.. versionadded:: 3.3
The *dir_fd* argument.
+ .. versionchanged:: 3.5
+ If the system call is interrupted and the signal handler does not raise an
+ exception, the function now retries the system call instead of raising an
+ :exc:`InterruptedError` exception (see :pep:`475` for the rationale).
+
The following constants are options for the *flags* parameter to the
:func:`~os.open` function. They can be combined using the bitwise OR operator
``|``. Some of them are not available on all platforms. For descriptions of
their availability and use, consult the :manpage:`open(2)` manual page on Unix
-or `the MSDN <http://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Windows.
+or `the MSDN <https://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Windows.
.. data:: O_RDONLY
@@ -1060,8 +1060,6 @@ or `the MSDN <http://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Window
bytes read. If the end of the file referred to by *fd* has been reached, an
empty bytes object is returned.
- Availability: Unix, Windows.
-
.. note::
This function is intended for low-level I/O and must be applied to a file
@@ -1070,6 +1068,11 @@ or `the MSDN <http://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Window
:func:`popen` or :func:`fdopen`, or :data:`sys.stdin`, use its
:meth:`~file.read` or :meth:`~file.readline` methods.
+ .. versionchanged:: 3.5
+ If the system call is interrupted and the signal handler does not raise an
+ exception, the function now retries the system call instead of raising an
+ :exc:`InterruptedError` exception (see :pep:`475` for the rationale).
+
.. function:: sendfile(out, in, offset, count)
sendfile(out, in, offset, count, [headers], [trailers], flags=0)
@@ -1099,9 +1102,26 @@ or `the MSDN <http://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Window
Availability: Unix.
+ .. note::
+
+ For a higher-level wrapper of :func:`sendfile`, see
+ :meth:`socket.socket.sendfile`.
+
.. versionadded:: 3.3
+.. function:: set_blocking(fd, blocking)
+
+ Set the blocking mode of the specified file descriptor. Set the
+ :data:`O_NONBLOCK` flag if blocking is ``False``, clear the flag otherwise.
+
+ See also :func:`get_blocking` and :meth:`socket.socket.setblocking`.
+
+ Availability: Unix.
+
+ .. versionadded:: 3.5
+
+
.. data:: SF_NODISKIO
SF_MNOWAIT
SF_SYNC
@@ -1158,8 +1178,6 @@ or `the MSDN <http://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Window
Write the bytestring in *str* to file descriptor *fd*. Return the number of
bytes actually written.
- Availability: Unix, Windows.
-
.. note::
This function is intended for low-level I/O and must be applied to a file
@@ -1168,6 +1186,11 @@ or `the MSDN <http://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Window
:func:`fdopen`, or :data:`sys.stdout` or :data:`sys.stderr`, use its
:meth:`~file.write` method.
+ .. versionchanged:: 3.5
+ If the system call is interrupted and the signal handler does not raise an
+ exception, the function now retries the system call instead of raising an
+ :exc:`InterruptedError` exception (see :pep:`475` for the rationale).
+
.. function:: writev(fd, buffers)
@@ -1330,8 +1353,6 @@ features:
or not it is available using :data:`os.supports_effective_ids`. If it is
unavailable, using it will raise a :exc:`NotImplementedError`.
- Availability: Unix, Windows.
-
.. note::
Using :func:`access` to check if a user is authorized to e.g. open a file
@@ -1384,8 +1405,6 @@ features:
This function can support :ref:`specifying a file descriptor <path_fd>`. The
descriptor must refer to an opened directory, not an open file.
- Availability: Unix, Windows.
-
.. versionadded:: 3.3
Added support for specifying *path* as a file descriptor
on some platforms.
@@ -1447,8 +1466,6 @@ features:
:ref:`paths relative to directory descriptors <dir_fd>` and :ref:`not
following symlinks <follow_symlinks>`.
- Availability: Unix, Windows.
-
.. note::
Although Windows supports :func:`chmod`, you can only set the file's
@@ -1499,15 +1516,11 @@ features:
Return a string representing the current working directory.
- Availability: Unix, Windows.
-
.. function:: getcwdb()
Return a bytestring representing the current working directory.
- Availability: Unix, Windows.
-
.. function:: lchflags(path, flags)
@@ -1570,7 +1583,11 @@ features:
.. note::
To encode ``str`` filenames to ``bytes``, use :func:`~os.fsencode`.
- Availability: Unix, Windows.
+ .. seealso::
+
+ The :func:`scandir` function returns directory entries along with
+ file attribute information, giving better performance for many
+ common use cases.
.. versionchanged:: 3.2
The *path* parameter became optional.
@@ -1609,9 +1626,15 @@ features:
Create a directory named *path* with numeric mode *mode*.
+ If the directory already exists, :exc:`FileExistsError` is raised.
+
+ .. _mkdir_modebits:
+
On some systems, *mode* is ignored. Where it is used, the current umask
- value is first masked out. If the directory already exists, :exc:`OSError`
- is raised.
+ value is first masked out. If bits other than the last 9 (i.e. the last 3
+ digits of the octal representation of the *mode*) are set, their meaning is
+ platform-dependent. On some platforms, they are ignored and you should call
+ :func:`chmod` explicitly to set them.
This function can also support :ref:`paths relative to directory descriptors
<dir_fd>`.
@@ -1619,8 +1642,6 @@ features:
It is also possible to create temporary directories; see the
:mod:`tempfile` module's :func:`tempfile.mkdtemp` function.
- Availability: Unix, Windows.
-
.. versionadded:: 3.3
The *dir_fd* argument.
@@ -1634,8 +1655,8 @@ features:
Recursive directory creation function. Like :func:`mkdir`, but makes all
intermediate-level directories needed to contain the leaf directory.
- The default *mode* is ``0o777`` (octal). On some systems, *mode* is
- ignored. Where it is used, the current umask value is first masked out.
+ The *mode* parameter is passed to :func:`mkdir`; see :ref:`the mkdir()
+ description <mkdir_modebits>` for how it is interpreted.
If *exist_ok* is ``False`` (the default), an :exc:`OSError` is raised if the
target directory already exists.
@@ -1750,7 +1771,7 @@ features:
``os.path.join(os.path.dirname(path), result)``.
If the *path* is a string object, the result will also be a string object,
- and the call may raise an UnicodeDecodeError. If the *path* is a bytes
+ and the call may raise a UnicodeDecodeError. If the *path* is a bytes
object, the result will be a bytes object.
This function can also support :ref:`paths relative to directory descriptors
@@ -1777,9 +1798,7 @@ features:
be raised; on Unix, the directory entry is removed but the storage allocated
to the file is not made available until the original file is no longer in use.
- This function is identical to :func:`unlink`.
-
- Availability: Unix, Windows.
+ This function is semantically identical to :func:`unlink`.
.. versionadded:: 3.3
The *dir_fd* argument.
@@ -1814,8 +1833,6 @@ features:
If you want cross-platform overwriting of the destination, use :func:`replace`.
- Availability: Unix, Windows.
-
.. versionadded:: 3.3
The *src_dir_fd* and *dst_dir_fd* arguments.
@@ -1844,8 +1861,6 @@ features:
This function can support specifying *src_dir_fd* and/or *dst_dir_fd* to
supply :ref:`paths relative to directory descriptors <dir_fd>`.
- Availability: Unix, Windows.
-
.. versionadded:: 3.3
@@ -1858,12 +1873,189 @@ features:
This function can support :ref:`paths relative to directory descriptors
<dir_fd>`.
- Availability: Unix, Windows.
-
.. versionadded:: 3.3
The *dir_fd* parameter.
+.. function:: scandir(path='.')
+
+ Return an iterator of :class:`DirEntry` objects corresponding to the entries
+ in the directory given by *path*. The entries are yielded in arbitrary
+ order, and the special entries ``'.'`` and ``'..'`` are not included.
+
+ Using :func:`scandir` instead of :func:`listdir` can significantly
+ increase the performance of code that also needs file type or file
+ attribute information, because :class:`DirEntry` objects expose this
+ information if the operating system provides it when scanning a directory.
+ All :class:`DirEntry` methods may perform a system call, but
+ :func:`~DirEntry.is_dir` and :func:`~DirEntry.is_file` usually only
+ require a system call for symbolic links; :func:`DirEntry.stat`
+ always requires a system call on Unix but only requires one for
+ symbolic links on Windows.
+
+ On Unix, *path* can be of type :class:`str` or :class:`bytes` (use
+ :func:`~os.fsencode` and :func:`~os.fsdecode` to encode and decode
+ :class:`bytes` paths). On Windows, *path* must be of type :class:`str`.
+ On both sytems, the type of the :attr:`~DirEntry.name` and
+ :attr:`~DirEntry.path` attributes of each :class:`DirEntry` will be of
+ the same type as *path*.
+
+ The following example shows a simple use of :func:`scandir` to display all
+ the files (excluding directories) in the given *path* that don't start with
+ ``'.'``. The ``entry.is_file()`` call will generally not make an additional
+ system call::
+
+ for entry in os.scandir(path):
+ if not entry.name.startswith('.') and entry.is_file():
+ print(entry.name)
+
+ .. note::
+
+ On Unix-based systems, :func:`scandir` uses the system's
+ `opendir() <http://pubs.opengroup.org/onlinepubs/009695399/functions/opendir.html>`_
+ and
+ `readdir() <http://pubs.opengroup.org/onlinepubs/009695399/functions/readdir_r.html>`_
+ functions. On Windows, it uses the Win32
+ `FindFirstFileW <https://msdn.microsoft.com/en-us/library/windows/desktop/aa364418(v=vs.85).aspx>`_
+ and
+ `FindNextFileW <https://msdn.microsoft.com/en-us/library/windows/desktop/aa364428(v=vs.85).aspx>`_
+ functions.
+
+ .. versionadded:: 3.5
+
+
+.. class:: DirEntry
+
+ Object yielded by :func:`scandir` to expose the file path and other file
+ attributes of a directory entry.
+
+ :func:`scandir` will provide as much of this information as possible without
+ making additional system calls. When a ``stat()`` or ``lstat()`` system call
+ is made, the ``DirEntry`` object will cache the result.
+
+ ``DirEntry`` instances are not intended to be stored in long-lived data
+ structures; if you know the file metadata has changed or if a long time has
+ elapsed since calling :func:`scandir`, call ``os.stat(entry.path)`` to fetch
+ up-to-date information.
+
+ Because the ``DirEntry`` methods can make operating system calls, they may
+ also raise :exc:`OSError`. If you need very fine-grained
+ control over errors, you can catch :exc:`OSError` when calling one of the
+ ``DirEntry`` methods and handle as appropriate.
+
+ Attributes and methods on a ``DirEntry`` instance are as follows:
+
+ .. attribute:: name
+
+ The entry's base filename, relative to the :func:`scandir` *path*
+ argument.
+
+ The :attr:`name` attribute will be of the same type (``str`` or
+ ``bytes``) as the :func:`scandir` *path* argument. Use
+ :func:`~os.fsdecode` to decode byte filenames.
+
+ .. attribute:: path
+
+ The entry's full path name: equivalent to ``os.path.join(scandir_path,
+ entry.name)`` where *scandir_path* is the :func:`scandir` *path*
+ argument. The path is only absolute if the :func:`scandir` *path*
+ argument was absolute.
+
+ The :attr:`path` attribute will be of the same type (``str`` or
+ ``bytes``) as the :func:`scandir` *path* argument. Use
+ :func:`~os.fsdecode` to decode byte filenames.
+
+ .. method:: inode()
+
+ Return the inode number of the entry.
+
+ The result is cached on the ``DirEntry`` object. Use ``os.stat(entry.path,
+ follow_symlinks=False).st_ino`` to fetch up-to-date information.
+
+ On the first, uncached call, a system call is required on Windows but
+ not on Unix.
+
+ .. method:: is_dir(\*, follow_symlinks=True)
+
+ Return ``True`` if this entry is a directory or a symbolic link pointing
+ to a directory; return ``False`` if the entry is or points to any other
+ kind of file, or if it doesn't exist anymore.
+
+ If *follow_symlinks* is ``False``, return ``True`` only if this entry
+ is a directory (without following symlinks); return ``False`` if the
+ entry is any other kind of file or if it doesn't exist anymore.
+
+ The result is cached on the ``DirEntry`` object, with a separate cache
+ for *follow_symlinks* ``True`` and ``False``. Call :func:`os.stat` along
+ with :func:`stat.S_ISDIR` to fetch up-to-date information.
+
+ On the first, uncached call, no system call is required in most cases.
+ Specifically, for non-symlinks, neither Windows or Unix require a system
+ call, except on certain Unix file systems, such as network file systems,
+ that return ``dirent.d_type == DT_UNKNOWN``. If the entry is a symlink,
+ a system call will be required to follow the symlink unless
+ *follow_symlinks* is ``False``.
+
+ This method can raise :exc:`OSError`, such as :exc:`PermissionError`,
+ but :exc:`FileNotFoundError` is caught and not raised.
+
+ .. method:: is_file(\*, follow_symlinks=True)
+
+ Return ``True`` if this entry is a file or a symbolic link pointing to a
+ file; return ``False`` if the entry is or points to a directory or other
+ non-file entry, or if it doesn't exist anymore.
+
+ If *follow_symlinks* is ``False``, return ``True`` only if this entry
+ is a file (without following symlinks); return ``False`` if the entry is
+ a directory or other non-file entry, or if it doesn't exist anymore.
+
+ The result is cached on the ``DirEntry`` object. Caching, system calls
+ made, and exceptions raised are as per :func:`~DirEntry.is_dir`.
+
+ .. method:: is_symlink()
+
+ Return ``True`` if this entry is a symbolic link (even if broken);
+ return ``False`` if the entry points to a directory or any kind of file,
+ or if it doesn't exist anymore.
+
+ The result is cached on the ``DirEntry`` object. Call
+ :func:`os.path.islink` to fetch up-to-date information.
+
+ On the first, uncached call, no system call is required in most cases.
+ Specifically, neither Windows or Unix require a system call, except on
+ certain Unix file systems, such as network file systems, that return
+ ``dirent.d_type == DT_UNKNOWN``.
+
+ This method can raise :exc:`OSError`, such as :exc:`PermissionError`,
+ but :exc:`FileNotFoundError` is caught and not raised.
+
+ .. method:: stat(\*, follow_symlinks=True)
+
+ Return a :class:`stat_result` object for this entry. This method
+ follows symbolic links by default; to stat a symbolic link add the
+ ``follow_symlinks=False`` argument.
+
+ On Unix, this method always requires a system call. On Windows, it
+ only requires a system call if *follow_symlinks* is ``True`` and the
+ entry is a symbolic link.
+
+ On Windows, the ``st_ino``, ``st_dev`` and ``st_nlink`` attributes of the
+ :class:`stat_result` are always set to zero. Call :func:`os.stat` to
+ get these attributes.
+
+ The result is cached on the ``DirEntry`` object, with a separate cache
+ for *follow_symlinks* ``True`` and ``False``. Call :func:`os.stat` to
+ fetch up-to-date information.
+
+ Note that there is a nice correspondence between several attributes
+ and methods of ``DirEntry`` and of :class:`pathlib.Path`. In
+ particular, the ``name`` and ``path`` attributes have the same
+ meaning, as do the ``is_dir()``, ``is_file()``, ``is_symlink()``
+ and ``stat()`` methods.
+
+ .. versionadded:: 3.5
+
+
.. function:: stat(path, \*, dir_fd=None, follow_symlinks=True)
Get the status of a file or a file descriptor. Perform the equivalent of a
@@ -1890,8 +2082,6 @@ features:
>>> statinfo.st_size
264
- Availability: Unix, Windows.
-
.. seealso::
:func:`fstat` and :func:`lstat` functions.
@@ -2039,6 +2229,15 @@ features:
File type.
+ On Windows systems, the following attribute is also available:
+
+ .. attribute:: st_file_attributes
+
+ Windows file attributes: ``dwFileAttributes`` member of the
+ ``BY_HANDLE_FILE_INFORMATION`` structure returned by
+ :c:func:`GetFileInformationByHandle`. See the ``FILE_ATTRIBUTE_*``
+ constants in the :mod:`stat` module.
+
The standard module :mod:`stat` defines functions and constants that are
useful for extracting information from a :c:type:`stat` structure. (On
Windows, some items are filled with dummy values.)
@@ -2056,6 +2255,9 @@ features:
Added the :attr:`st_atime_ns`, :attr:`st_mtime_ns`, and
:attr:`st_ctime_ns` members.
+ .. versionadded:: 3.5
+ Added the :attr:`st_file_attributes` member on Windows.
+
.. function:: stat_float_times([newvalue])
@@ -2259,19 +2461,19 @@ features:
This function can support :ref:`specifying a file descriptor <path_fd>`.
- Availability: Unix.
+ Availability: Unix, Windows.
.. versionadded:: 3.3
+ .. versionchanged:: 3.5
+ Added support for Windows
.. function:: unlink(path, *, dir_fd=None)
- Remove (delete) the file *path*. This function is identical to
- :func:`remove`; the ``unlink`` name is its traditional Unix
- name. Please see the documentation for :func:`remove` for
- further information.
-
- Availability: Unix, Windows.
+ Remove (delete) the file *path*. This function is semantically
+ identical to :func:`remove`; the ``unlink`` name is its
+ traditional Unix name. Please see the documentation for
+ :func:`remove` for further information.
.. versionadded:: 3.3
The *dir_fd* parameter.
@@ -2309,8 +2511,6 @@ features:
:ref:`paths relative to directory descriptors <dir_fd>` and :ref:`not
following symlinks <follow_symlinks>`.
- Availability: Unix, Windows.
-
.. versionadded:: 3.3
Added support for specifying an open file descriptor for *path*,
and the *dir_fd*, *follow_symlinks*, and *ns* parameters.
@@ -2401,6 +2601,10 @@ features:
for name in dirs:
os.rmdir(os.path.join(root, name))
+ .. versionchanged:: 3.5
+ This function now calls :func:`os.scandir` instead of :func:`os.listdir`,
+ making it faster by reducing the number of calls to :func:`os.stat`.
+
.. function:: fwalk(top='.', topdown=True, onerror=None, *, follow_symlinks=False, dir_fd=None)
@@ -2557,8 +2761,6 @@ to be ignored.
Python signal handler registered for :const:`SIGABRT` with
:func:`signal.signal`.
- Availability: Unix, Windows.
-
.. function:: execl(path, arg0, arg1, ...)
execle(path, arg0, arg1, ..., env)
@@ -2622,8 +2824,6 @@ to be ignored.
Exit the process with status *n*, without calling cleanup handlers, flushing
stdio buffers, etc.
- Availability: Unix, Windows.
-
.. note::
The standard way to exit is ``sys.exit(n)``. :func:`_exit` should
@@ -2986,6 +3186,10 @@ written in Python, such as a mail server's external command delivery program.
doesn't work if it is. Use the :func:`os.path.normpath` function to ensure that
the path is properly encoded for Win32.
+ To reduce interpreter startup overhead, the Win32 :c:func:`ShellExecute`
+ function is not resolved until this function is first called. If the function
+ cannot be resolved, :exc:`NotImplementedError` will be raised.
+
Availability: Windows.
@@ -3133,6 +3337,11 @@ written in Python, such as a mail server's external command delivery program.
id is known, not necessarily a child process. The :func:`spawn\* <spawnl>`
functions called with :const:`P_NOWAIT` return suitable process handles.
+ .. versionchanged:: 3.5
+ If the system call is interrupted and the signal handler does not raise an
+ exception, the function now retries the system call instead of raising an
+ :exc:`InterruptedError` exception (see :pep:`475` for the rationale).
+
.. function:: wait3(options)
@@ -3286,7 +3495,7 @@ operating system.
.. data:: SCHED_RESET_ON_FORK
- This flag can OR'ed with any other scheduling policy. When a process with
+ This flag can be OR'ed with any other scheduling policy. When a process with
this flag set forks, its child's scheduling policy and priority are reset to
the default.
@@ -3533,10 +3742,23 @@ Miscellaneous Functions
This function returns random bytes from an OS-specific randomness source. The
returned data should be unpredictable enough for cryptographic applications,
- though its exact quality depends on the OS implementation. On a Unix-like
- system this will query ``/dev/urandom``, and on Windows it will use
- ``CryptGenRandom()``. If a randomness source is not found,
+ though its exact quality depends on the OS implementation.
+
+ On Linux, ``getrandom()`` syscall is used if available and the urandom
+ entropy pool is initialized (``getrandom()`` does not block).
+ On a Unix-like system this will query ``/dev/urandom``. On Windows, it
+ will use ``CryptGenRandom()``. If a randomness source is not found,
:exc:`NotImplementedError` will be raised.
For an easy-to-use interface to the random number generator
provided by your platform, please see :class:`random.SystemRandom`.
+
+ .. versionchanged:: 3.5.2
+ On Linux, if ``getrandom()`` blocks (the urandom entropy pool is not
+ initialized yet), fall back on reading ``/dev/urandom``.
+
+ .. versionchanged:: 3.5
+ On Linux 3.17 and newer, the ``getrandom()`` syscall is now used
+ when available. On OpenBSD 5.6 and newer, the C ``getentropy()``
+ function is now used. These functions avoid the usage of an internal file
+ descriptor.
diff --git a/Doc/library/ossaudiodev.rst b/Doc/library/ossaudiodev.rst
index bb5081afde..ec40c0b93a 100644
--- a/Doc/library/ossaudiodev.rst
+++ b/Doc/library/ossaudiodev.rst
@@ -5,6 +5,7 @@
:platform: Linux, FreeBSD
:synopsis: Access to OSS-compatible audio devices.
+--------------
This module allows you to access the OSS (Open Sound System) audio interface.
OSS is available for a wide range of open-source and commercial Unices, and is
@@ -148,21 +149,30 @@ and (read-only) attributes:
.. method:: oss_audio_device.write(data)
- Write the Python string *data* to the audio device and return the number of
- bytes written. If the audio device is in blocking mode (the default), the
- entire string is always written (again, this is different from usual Unix device
- semantics). If the device is in non-blocking mode, some data may not be written
+ Write a :term:`bytes-like object` *data* to the audio device and return the
+ number of bytes written. If the audio device is in blocking mode (the
+ default), the entire data is always written (again, this is different from
+ usual Unix device semantics). If the device is in non-blocking mode, some
+ data may not be written
---see :meth:`writeall`.
+ .. versionchanged:: 3.5
+ Writable :term:`bytes-like object` is now accepted.
+
.. method:: oss_audio_device.writeall(data)
- Write the entire Python string *data* to the audio device: waits until the audio
- device is able to accept data, writes as much data as it will accept, and
- repeats until *data* has been completely written. If the device is in blocking
- mode (the default), this has the same effect as :meth:`write`; :meth:`writeall`
- is only useful in non-blocking mode. Has no return value, since the amount of
- data written is always equal to the amount of data supplied.
+ Write a :term:`bytes-like object` *data* to the audio device: waits until
+ the audio device is able to accept data, writes as much data as it will
+ accept, and repeats until *data* has been completely written. If the device
+ is in blocking mode (the default), this has the same effect as
+ :meth:`write`; :meth:`writeall` is only useful in non-blocking mode. Has
+ no return value, since the amount of data written is always equal to the
+ amount of data supplied.
+
+ .. versionchanged:: 3.5
+ Writable :term:`bytes-like object` is now accepted.
+
.. versionchanged:: 3.2
Audio device objects also support the context management protocol, i.e. they can
diff --git a/Doc/library/othergui.rst b/Doc/library/othergui.rst
index 43721b2688..ee1ce50b6b 100644
--- a/Doc/library/othergui.rst
+++ b/Doc/library/othergui.rst
@@ -8,40 +8,40 @@ available for Python:
.. seealso::
- `PyGObject <https://live.gnome.org/PyGObject>`_
+ `PyGObject <https://wiki.gnome.org/Projects/PyGObject>`_
provides introspection bindings for C libraries using
`GObject <https://developer.gnome.org/gobject/stable/>`_. One of
these libraries is the `GTK+ 3 <http://www.gtk.org/>`_ widget set.
GTK+ comes with many more widgets than Tkinter provides. An online
- `Python GTK+ 3 Tutorial <http://python-gtk-3-tutorial.readthedocs.org/en/latest/>`_
+ `Python GTK+ 3 Tutorial <https://python-gtk-3-tutorial.readthedocs.org/en/latest/>`_
is available.
`PyGTK <http://www.pygtk.org/>`_ provides bindings for an older version
of the library, GTK+ 2. It provides an object oriented interface that
is slightly higher level than the C one. There are also bindings to
- `GNOME <http://www.gnome.org>`_. An online `tutorial
+ `GNOME <https://www.gnome.org/>`_. An online `tutorial
<http://www.pygtk.org/pygtk2tutorial/index.html>`_ is available.
- `PyQt <http://www.riverbankcomputing.co.uk/software/pyqt/intro>`_
+ `PyQt <https://riverbankcomputing.com/software/pyqt/intro>`_
PyQt is a :program:`sip`\ -wrapped binding to the Qt toolkit. Qt is an
extensive C++ GUI application development framework that is
available for Unix, Windows and Mac OS X. :program:`sip` is a tool
for generating bindings for C++ libraries as Python classes, and
is specifically designed for Python. The *PyQt3* bindings have a
book, `GUI Programming with Python: QT Edition
- <http://www.commandprompt.com/community/pyqt/>`_ by Boudewijn
+ <https://www.commandprompt.com/community/pyqt/>`_ by Boudewijn
Rempt. The *PyQt4* bindings also have a book, `Rapid GUI Programming
- with Python and Qt <http://www.qtrac.eu/pyqtbook.html>`_, by Mark
+ with Python and Qt <https://www.qtrac.eu/pyqtbook.html>`_, by Mark
Summerfield.
- `PySide <http://qt-project.org/wiki/PySide>`_
+ `PySide <https://wiki.qt.io/PySide>`_
is a newer binding to the Qt toolkit, provided by Nokia.
Compared to PyQt, its licensing scheme is friendlier to non-open source
applications.
`wxPython <http://www.wxpython.org>`_
wxPython is a cross-platform GUI toolkit for Python that is built around
- the popular `wxWidgets <http://www.wxwidgets.org/>`_ (formerly wxWindows)
+ the popular `wxWidgets <https://www.wxwidgets.org/>`_ (formerly wxWindows)
C++ toolkit. It provides a native look and feel for applications on
Windows, Mac OS X, and Unix systems by using each platform's native
widgets where ever possible, (GTK+ on Unix-like systems). In addition to
@@ -50,7 +50,7 @@ available for Python:
low-level device context drawing, drag and drop, system clipboard access,
an XML-based resource format and more, including an ever growing library
of user-contributed modules. wxPython has a book, `wxPython in Action
- <http://www.manning.com/rappin/>`_, by Noel Rappin and
+ <https://www.manning.com/books/wxpython-in-action>`_, by Noel Rappin and
Robin Dunn.
PyGTK, PyQt, and wxPython, all have a modern look and feel and more
diff --git a/Doc/library/parser.rst b/Doc/library/parser.rst
index 3e1e31bc79..c3b699a360 100644
--- a/Doc/library/parser.rst
+++ b/Doc/library/parser.rst
@@ -3,10 +3,10 @@
.. module:: parser
:synopsis: Access parse trees for Python source code.
+
.. moduleauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-
.. Copyright 1995 Virginia Polytechnic Institute and State University and Fred
L. Drake, Jr. This copyright notice must be distributed on all copies, but
this document otherwise may be distributed as part of the Python
@@ -16,6 +16,8 @@
.. index:: single: parsing; Python source code
+--------------
+
The :mod:`parser` module provides an interface to Python's internal parser and
byte-code compiler. The primary purpose for this interface is to allow Python
code to edit the parse tree of a Python expression and create executable code
diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst
index 24e2a308df..f803fb6274 100644
--- a/Doc/library/pathlib.rst
+++ b/Doc/library/pathlib.rst
@@ -5,9 +5,13 @@
.. module:: pathlib
:synopsis: Object-oriented filesystem paths
+.. versionadded:: 3.4
+
+**Source code:** :source:`Lib/pathlib.py`
+
.. index:: single: path; operations
-.. versionadded:: 3.4
+--------------
This module offers classes representing filesystem paths with semantics
appropriate for different operating systems. Path classes are divided
@@ -628,6 +632,17 @@ call fails (for example because the path doesn't exist):
PosixPath('/home/antoine/pathlib')
+.. classmethod:: Path.home()
+
+ Return a new path object representing the user's home directory (as
+ returned by :func:`os.path.expanduser` with ``~`` construct)::
+
+ >>> Path.home()
+ PosixPath('/home/antoine')
+
+ .. versionadded:: 3.5
+
+
.. method:: Path.stat()
Return information about this path (similarly to :func:`os.stat`).
@@ -670,6 +685,18 @@ call fails (for example because the path doesn't exist):
symlink *points to* an existing file or directory.
+.. method:: Path.expanduser()
+
+ Return a new path with expanded ``~`` and ``~user`` constructs,
+ as returned by :meth:`os.path.expanduser`::
+
+ >>> p = PosixPath('~/films/Monty Python')
+ >>> p.expanduser()
+ PosixPath('/home/eric/films/Monty Python')
+
+ .. versionadded:: 3.5
+
+
.. method:: Path.glob(pattern)
Glob the given *pattern* in the directory represented by this path,
@@ -791,7 +818,7 @@ call fails (for example because the path doesn't exist):
the symbolic link's information rather than its target's.
-.. method:: Path.mkdir(mode=0o777, parents=False)
+.. method:: Path.mkdir(mode=0o777, parents=False, exist_ok=False)
Create a new directory at this given path. If *mode* is given, it is
combined with the process' ``umask`` value to determine the file mode
@@ -805,6 +832,16 @@ call fails (for example because the path doesn't exist):
If *parents* is false (the default), a missing parent raises
:exc:`FileNotFoundError`.
+ If *exist_ok* is false (the default), an :exc:`FileExistsError` is
+ raised if the target directory already exists.
+
+ If *exist_ok* is true, :exc:`FileExistsError` exceptions will be
+ ignored (same behavior as the POSIX ``mkdir -p`` command), but only if the
+ last path component is not an existing non-directory file.
+
+ .. versionchanged:: 3.5
+ The *exist_ok* parameter was added.
+
.. method:: Path.open(mode='r', buffering=-1, encoding=None, errors=None, newline=None)
@@ -824,6 +861,34 @@ call fails (for example because the path doesn't exist):
if the file's uid isn't found in the system database.
+.. method:: Path.read_bytes()
+
+ Return the binary contents of the pointed-to file as a bytes object::
+
+ >>> p = Path('my_binary_file')
+ >>> p.write_bytes(b'Binary file contents')
+ 20
+ >>> p.read_bytes()
+ b'Binary file contents'
+
+ .. versionadded:: 3.5
+
+
+.. method:: Path.read_text(encoding=None, errors=None)
+
+ Return the decoded contents of the pointed-to file as a string::
+
+ >>> p = Path('my_text_file')
+ >>> p.write_text('Text file contents')
+ 18
+ >>> p.read_text()
+ 'Text file contents'
+
+ The optional parameters have the same meaning as in :func:`open`.
+
+ .. versionadded:: 3.5
+
+
.. method:: Path.rename(target)
Rename this file or directory to the given *target*. *target* can be
@@ -884,6 +949,25 @@ call fails (for example because the path doesn't exist):
Remove this directory. The directory must be empty.
+.. method:: Path.samefile(other_path)
+
+ Return whether this path points to the same file as *other_path*, which
+ can be either a Path object, or a string. The semantics are similar
+ to :func:`os.path.samefile` and :func:`os.path.samestat`.
+
+ An :exc:`OSError` can be raised if either file cannot be accessed for some
+ reason.
+
+ >>> p = Path('spam')
+ >>> q = Path('eggs')
+ >>> p.samefile(q)
+ False
+ >>> p.samefile('spam')
+ True
+
+ .. versionadded:: 3.5
+
+
.. method:: Path.symlink_to(target, target_is_directory=False)
Make this path a symbolic link to *target*. Under Windows,
@@ -917,3 +1001,33 @@ call fails (for example because the path doesn't exist):
Remove this file or symbolic link. If the path points to a directory,
use :func:`Path.rmdir` instead.
+
+
+.. method:: Path.write_bytes(data)
+
+ Open the file pointed to in bytes mode, write *data* to it, and close the
+ file::
+
+ >>> p = Path('my_binary_file')
+ >>> p.write_bytes(b'Binary file contents')
+ 20
+ >>> p.read_bytes()
+ b'Binary file contents'
+
+ An existing file of the same name is overwritten.
+
+ .. versionadded:: 3.5
+
+
+.. method:: Path.write_text(data, encoding=None, errors=None)
+
+ Open the file pointed to in text mode, write *data* to it, and close the
+ file::
+
+ >>> p = Path('my_text_file')
+ >>> p.write_text('Text file contents')
+ 18
+ >>> p.read_text()
+ 'Text file contents'
+
+ .. versionadded:: 3.5
diff --git a/Doc/library/pdb.rst b/Doc/library/pdb.rst
index c144db6c1a..4520a9b6f3 100644
--- a/Doc/library/pdb.rst
+++ b/Doc/library/pdb.rst
@@ -8,10 +8,10 @@
**Source code:** :source:`Lib/pdb.py`
---------------
-
.. index:: single: debugging
+--------------
+
The module :mod:`pdb` defines an interactive source code debugger for Python
programs. It supports setting (conditional) breakpoints and single stepping at
the source line level, inspection of stack frames, source code listing, and
diff --git a/Doc/library/pickle.rst b/Doc/library/pickle.rst
index 3305195853..0d64191d79 100644
--- a/Doc/library/pickle.rst
+++ b/Doc/library/pickle.rst
@@ -1,6 +1,14 @@
:mod:`pickle` --- Python object serialization
=============================================
+.. module:: pickle
+ :synopsis: Convert Python objects to streams of bytes and back.
+
+.. sectionauthor:: Jim Kerr <jbkerr@sr.hp.com>.
+.. sectionauthor:: Barry Warsaw <barry@python.org>
+
+**Source code:** :source:`Lib/pickle.py`
+
.. index::
single: persistence
pair: persistent; objects
@@ -9,11 +17,7 @@
pair: flattening; objects
pair: pickling; objects
-.. module:: pickle
- :synopsis: Convert Python objects to streams of bytes and back.
-.. sectionauthor:: Jim Kerr <jbkerr@sr.hp.com>.
-.. sectionauthor:: Barry Warsaw <barry@python.org>
-
+--------------
The :mod:`pickle` module implements binary protocols for serializing and
de-serializing a Python object structure. *"Pickling"* is the process
@@ -425,7 +429,7 @@ The following types can be pickled:
Attempts to pickle unpicklable objects will raise the :exc:`PicklingError`
exception; when this happens, an unspecified number of bytes may have already
been written to the underlying file. Trying to pickle a highly recursive data
-structure may exceed the maximum recursion depth, a :exc:`RuntimeError` will be
+structure may exceed the maximum recursion depth, a :exc:`RecursionError` will be
raised in this case. You can carefully raise this limit with
:func:`sys.setrecursionlimit`.
@@ -859,7 +863,7 @@ For the simplest code, use the :func:`dump` and :func:`load` functions. ::
data = {
'a': [1, 2.0, 3, 4+6j],
'b': ("character string", b"byte string"),
- 'c': set([None, True, False])
+ 'c': {None, True, False}
}
with open('data.pickle', 'wb') as f:
diff --git a/Doc/library/pipes.rst b/Doc/library/pipes.rst
index 69e891db29..0a22da1f55 100644
--- a/Doc/library/pipes.rst
+++ b/Doc/library/pipes.rst
@@ -4,6 +4,7 @@
.. module:: pipes
:platform: Unix
:synopsis: A Python interface to Unix shell pipelines.
+
.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
**Source code:** :source:`Lib/pipes.py`
diff --git a/Doc/library/pkgutil.rst b/Doc/library/pkgutil.rst
index 13ea7b9b33..26c5ac066b 100644
--- a/Doc/library/pkgutil.rst
+++ b/Doc/library/pkgutil.rst
@@ -58,7 +58,7 @@ support.
.. deprecated:: 3.3
This emulation is no longer needed, as the standard import mechanism
- is now fully PEP 302 compliant and available in :mod:`importlib`
+ is now fully PEP 302 compliant and available in :mod:`importlib`.
.. class:: ImpLoader(fullname, file, filename, etc)
@@ -67,7 +67,7 @@ support.
.. deprecated:: 3.3
This emulation is no longer needed, as the standard import mechanism
- is now fully PEP 302 compliant and available in :mod:`importlib`
+ is now fully PEP 302 compliant and available in :mod:`importlib`.
.. function:: find_loader(fullname)
@@ -140,7 +140,7 @@ support.
.. function:: iter_modules(path=None, prefix='')
Yields ``(module_finder, name, ispkg)`` for all submodules on *path*, or, if
- path is ``None``, all top-level modules on ``sys.path``.
+ *path* is ``None``, all top-level modules on ``sys.path``.
*path* should be either ``None`` or a list of paths to look for modules in.
@@ -161,7 +161,7 @@ support.
.. function:: walk_packages(path=None, prefix='', onerror=None)
Yields ``(module_finder, name, ispkg)`` for all modules recursively on
- *path*, or, if path is ``None``, all accessible modules.
+ *path*, or, if *path* is ``None``, all accessible modules.
*path* should be either ``None`` or a list of paths to look for modules in.
diff --git a/Doc/library/platform.rst b/Doc/library/platform.rst
index 66b6892f17..eea0abbae4 100644
--- a/Doc/library/platform.rst
+++ b/Doc/library/platform.rst
@@ -3,6 +3,7 @@
.. module:: platform
:synopsis: Retrieves as much platform identifying data as possible.
+
.. moduleauthor:: Marc-André Lemburg <mal@egenix.com>
.. sectionauthor:: Bjorn Pettersen <bpettersen@corp.fairisaac.com>
@@ -247,6 +248,8 @@ Unix Platforms
This is another name for :func:`linux_distribution`.
+ .. deprecated-removed:: 3.5 3.7
+
.. function:: linux_distribution(distname='', version='', id='', supported_dists=('SuSE','debian','redhat','mandrake',...), full_distribution_name=1)
Tries to determine the name of the Linux OS distribution name.
@@ -263,6 +266,8 @@ Unix Platforms
parameters. ``id`` is the item in parentheses after the version number. It
is usually the version codename.
+ .. deprecated-removed:: 3.5 3.7
+
.. function:: libc_ver(executable=sys.executable, lib='', version='', chunksize=2048)
Tries to determine the libc version against which the file executable (defaults
diff --git a/Doc/library/plistlib.rst b/Doc/library/plistlib.rst
index 2c1f3dd79e..9ba226607d 100644
--- a/Doc/library/plistlib.rst
+++ b/Doc/library/plistlib.rst
@@ -3,16 +3,17 @@
.. module:: plistlib
:synopsis: Generate and parse Mac OS X plist files.
+
.. moduleauthor:: Jack Jansen
.. sectionauthor:: Georg Brandl <georg@python.org>
.. (harvested from docstrings in the original file)
+**Source code:** :source:`Lib/plistlib.py`
+
.. index::
pair: plist; file
single: property list
-**Source code:** :source:`Lib/plistlib.py`
-
--------------
This module provides an interface for reading and writing the "property list"
diff --git a/Doc/library/poplib.rst b/Doc/library/poplib.rst
index 45baad96af..ffabc32b6e 100644
--- a/Doc/library/poplib.rst
+++ b/Doc/library/poplib.rst
@@ -3,13 +3,14 @@
.. module:: poplib
:synopsis: POP3 protocol client (requires sockets).
+
.. sectionauthor:: Andrew T. Csillag
.. revised by ESR, January 2000
-.. index:: pair: POP3; protocol
-
**Source code:** :source:`Lib/poplib.py`
+.. index:: pair: POP3; protocol
+
--------------
This module defines a class, :class:`POP3`, which encapsulates a connection to a
@@ -194,6 +195,15 @@ An :class:`POP3` instance has the following methods:
the unique id for that message in the form ``'response mesgnum uid``, otherwise
result is list ``(response, ['mesgnum uid', ...], octets)``.
+
+.. method:: POP3.utf8()
+
+ Try to switch to UTF-8 mode. Returns the server response if successful,
+ raises :class:`error_proto` if not. Specified in :RFC:`6856`.
+
+ .. versionadded:: 3.5
+
+
.. method:: POP3.stls(context=None)
Start a TLS session on the active connection as specified in :rfc:`2595`.
diff --git a/Doc/library/posix.rst b/Doc/library/posix.rst
index 06bab04aaa..9cbc5505ae 100644
--- a/Doc/library/posix.rst
+++ b/Doc/library/posix.rst
@@ -5,6 +5,7 @@
:platform: Unix
:synopsis: The most common POSIX system calls (normally used via module os).
+--------------
This module provides access to operating system functionality that is
standardized by the C Standard and the POSIX standard (a thinly disguised Unix
diff --git a/Doc/library/pprint.rst b/Doc/library/pprint.rst
index c0589a31a9..65d94fe386 100644
--- a/Doc/library/pprint.rst
+++ b/Doc/library/pprint.rst
@@ -3,6 +3,7 @@
.. module:: pprint
:synopsis: Data pretty printer.
+
.. moduleauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
@@ -197,7 +198,7 @@ are converted to strings. The default implementation uses the internals of the
the current presentation context (direct and indirect containers for *object*
that are affecting the presentation) as the keys; if an object needs to be
presented which is already represented in *context*, the third return value
- should be ``True``. Recursive calls to the :meth:`format` method should add
+ should be ``True``. Recursive calls to the :meth:`.format` method should add
additional entries for containers to this dictionary. The third argument,
*maxlevels*, gives the requested limit to recursion; this will be ``0`` if there
is no requested limit. This argument should be passed unmodified to recursive
@@ -235,10 +236,10 @@ In its basic form, :func:`pprint` shows the whole object::
'classifiers': ['Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 2 :: Only'],
- 'description': 'An extensible framework for Python programming, '
- 'with special focus\r\n'
- 'on event-based network programming and '
- 'multiprotocol integration.',
+ 'description': 'An extensible framework for Python programming, with '
+ 'special focus\r\n'
+ 'on event-based network programming and multiprotocol '
+ 'integration.',
'docs_url': '',
'download_url': 'UNKNOWN',
'home_page': 'http://twistedmatrix.com/',
@@ -288,10 +289,10 @@ contents)::
'cheesecake_documentation_id': None,
'cheesecake_installability_id': None,
'classifiers': [...],
- 'description': 'An extensible framework for Python programming, '
- 'with special focus\r\n'
- 'on event-based network programming and '
- 'multiprotocol integration.',
+ 'description': 'An extensible framework for Python programming, with '
+ 'special focus\r\n'
+ 'on event-based network programming and multiprotocol '
+ 'integration.',
'docs_url': '',
'download_url': 'UNKNOWN',
'home_page': 'http://twistedmatrix.com/',
@@ -323,13 +324,12 @@ cannot be split, the specified width will be exceeded::
'cheesecake_installability_id': None,
'classifiers': [...],
'description': 'An extensible '
- 'framework for '
- 'Python programming, '
- 'with special '
- 'focus\r\n'
- 'on event-based '
- 'network programming '
- 'and multiprotocol '
+ 'framework for Python '
+ 'programming, with '
+ 'special focus\r\n'
+ 'on event-based network '
+ 'programming and '
+ 'multiprotocol '
'integration.',
'docs_url': '',
'download_url': 'UNKNOWN',
@@ -344,8 +344,8 @@ cannot be split, the specified width will be exceeded::
'release_url': 'http://pypi.python.org/pypi/Twisted/12.3.0',
'requires_python': None,
'stable_version': None,
- 'summary': 'An asynchronous '
- 'networking framework '
- 'written in Python',
+ 'summary': 'An asynchronous networking '
+ 'framework written in '
+ 'Python',
'version': '12.3.0'},
'urls': [{...}, {...}]}
diff --git a/Doc/library/profile.rst b/Doc/library/profile.rst
index 2928821d55..959d9b98a8 100644
--- a/Doc/library/profile.rst
+++ b/Doc/library/profile.rst
@@ -33,7 +33,7 @@ profiling interface:
2. :mod:`profile`, a pure Python module whose interface is imitated by
:mod:`cProfile`, but which adds significant overhead to profiled programs.
If you're trying to extend the profiler in some way, the task might be easier
- with this module.
+ with this module. Originally designed and written by Jim Roskind.
.. note::
diff --git a/Doc/library/pty.rst b/Doc/library/pty.rst
index b8a3897ab8..0ab766065d 100644
--- a/Doc/library/pty.rst
+++ b/Doc/library/pty.rst
@@ -4,9 +4,13 @@
.. module:: pty
:platform: Linux
:synopsis: Pseudo-Terminal Handling for Linux.
+
.. moduleauthor:: Steen Lumholt
.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
+**Source code:** :source:`Lib/pty.py`
+
+--------------
The :mod:`pty` module defines operations for handling the pseudo-terminal
concept: starting another process and being able to write to and read from its
diff --git a/Doc/library/pwd.rst b/Doc/library/pwd.rst
index 2c17d9e036..03ebb02e4e 100644
--- a/Doc/library/pwd.rst
+++ b/Doc/library/pwd.rst
@@ -5,6 +5,7 @@
:platform: Unix
:synopsis: The password database (getpwnam() and friends).
+--------------
This module provides access to the Unix user account and password database. It
is available on all Unix versions.
diff --git a/Doc/library/py_compile.rst b/Doc/library/py_compile.rst
index bae8450b7c..65f76b8bb8 100644
--- a/Doc/library/py_compile.rst
+++ b/Doc/library/py_compile.rst
@@ -3,13 +3,14 @@
.. module:: py_compile
:synopsis: Generate byte-code files from Python source files.
+
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
.. documentation based on module docstrings
-.. index:: pair: file; byte-code
-
**Source code:** :source:`Lib/py_compile.py`
+.. index:: pair: file; byte-code
+
--------------
The :mod:`py_compile` module provides a function to generate a byte-code file
@@ -29,9 +30,9 @@ byte-code cache files in the directory containing the source code.
.. function:: compile(file, cfile=None, dfile=None, doraise=False, optimize=-1)
Compile a source file to byte-code and write out the byte-code cache file.
- The source code is loaded from the file name *file*. The byte-code is
- written to *cfile*, which defaults to the :PEP:`3147` path, ending in
- ``.pyc`` (``.pyo`` if optimization is enabled in the current interpreter).
+ The source code is loaded from the file name *file*. The byte-code is
+ written to *cfile*, which defaults to the :pep:`3147`/:pep:`488` path, ending
+ in ``.pyc``.
For example, if *file* is ``/foo/bar/baz.py`` *cfile* will default to
``/foo/bar/__pycache__/baz.cpython-32.pyc`` for Python 3.2. If *dfile* is
specified, it is used as the name of the source file in error messages when
@@ -68,7 +69,7 @@ byte-code cache files in the directory containing the source code.
.. function:: main(args=None)
Compile several source files. The files named in *args* (or on the command
- line, if *args* is ``None``) are compiled and the resulting bytecode is
+ line, if *args* is ``None``) are compiled and the resulting byte-code is
cached in the normal manner. This function does not search a directory
structure to locate source files; it only compiles files named explicitly.
If ``'-'`` is the only parameter in args, the list of files is taken from
@@ -86,4 +87,3 @@ could not be compiled.
Module :mod:`compileall`
Utilities to compile all Python source files in a directory tree.
-
diff --git a/Doc/library/pyclbr.rst b/Doc/library/pyclbr.rst
index 13eaabf594..32842717bc 100644
--- a/Doc/library/pyclbr.rst
+++ b/Doc/library/pyclbr.rst
@@ -3,6 +3,7 @@
.. module:: pyclbr
:synopsis: Supports information extraction for a Python class browser.
+
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
**Source code:** :source:`Lib/pyclbr.py`
diff --git a/Doc/library/pydoc.rst b/Doc/library/pydoc.rst
index b5e3233619..f1bfab9a3b 100644
--- a/Doc/library/pydoc.rst
+++ b/Doc/library/pydoc.rst
@@ -3,17 +3,17 @@
.. module:: pydoc
:synopsis: Documentation generator and online help system.
+
.. moduleauthor:: Ka-Ping Yee <ping@lfw.org>
.. sectionauthor:: Ka-Ping Yee <ping@lfw.org>
+**Source code:** :source:`Lib/pydoc.py`
.. index::
single: documentation; generation
single: documentation; online
single: help; online
-**Source code:** :source:`Lib/pydoc.py`
-
--------------
The :mod:`pydoc` module automatically generates documentation from Python
diff --git a/Doc/library/pyexpat.rst b/Doc/library/pyexpat.rst
index 620ffb1cd4..29c9f347d2 100644
--- a/Doc/library/pyexpat.rst
+++ b/Doc/library/pyexpat.rst
@@ -3,8 +3,10 @@
.. module:: xml.parsers.expat
:synopsis: An interface to the Expat non-validating XML parser.
+
.. moduleauthor:: Paul Prescod <paul@prescod.net>
+--------------
.. Markup notes:
@@ -570,9 +572,9 @@ Content Model Descriptions
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
-Content modules are described using nested tuples. Each tuple contains four
+Content models are described using nested tuples. Each tuple contains four
values: the type, the quantifier, the name, and a tuple of children. Children
-are simply additional content module descriptions.
+are simply additional content model descriptions.
The values of the first two fields are constants defined in the
:mod:`xml.parsers.expat.model` module. These constants can be collected in two
@@ -867,6 +869,6 @@ The ``errors`` module has the following attributes:
.. [#] The encoding string included in XML output should conform to the
appropriate standards. For example, "UTF-8" is valid, but "UTF8" is
- not. See http://www.w3.org/TR/2006/REC-xml11-20060816/#NT-EncodingDecl
- and http://www.iana.org/assignments/character-sets/character-sets.xhtml.
+ not. See https://www.w3.org/TR/2006/REC-xml11-20060816/#NT-EncodingDecl
+ and https://www.iana.org/assignments/character-sets/character-sets.xhtml.
diff --git a/Doc/library/queue.rst b/Doc/library/queue.rst
index 680d690052..1cb0935377 100644
--- a/Doc/library/queue.rst
+++ b/Doc/library/queue.rst
@@ -158,22 +158,32 @@ fully processed by daemon consumer threads.
Example of how to wait for enqueued tasks to be completed::
- def worker():
- while True:
- item = q.get()
- do_work(item)
- q.task_done()
-
- q = Queue()
- for i in range(num_worker_threads):
- t = Thread(target=worker)
- t.daemon = True
+ def worker():
+ while True:
+ item = q.get()
+ if item is None:
+ break
+ do_work(item)
+ q.task_done()
+
+ q = queue.Queue()
+ threads = []
+ for i in range(num_worker_threads):
+ t = threading.Thread(target=worker)
t.start()
+ threads.append(t)
- for item in source():
- q.put(item)
+ for item in source():
+ q.put(item)
- q.join() # block until all tasks are done
+ # block until all tasks are done
+ q.join()
+
+ # stop workers
+ for i in range(num_worker_threads):
+ q.put(None)
+ for t in threads:
+ t.join()
.. seealso::
diff --git a/Doc/library/quopri.rst b/Doc/library/quopri.rst
index 3a74cf8511..3c31125435 100644
--- a/Doc/library/quopri.rst
+++ b/Doc/library/quopri.rst
@@ -4,13 +4,12 @@
.. module:: quopri
:synopsis: Encode and decode files using the MIME quoted-printable encoding.
+**Source code:** :source:`Lib/quopri.py`
.. index::
pair: quoted-printable; encoding
single: MIME; quoted-printable encoding
-**Source code:** :source:`Lib/quopri.py`
-
--------------
This module performs quoted-printable transport encoding and decoding, as
diff --git a/Doc/library/random.rst b/Doc/library/random.rst
index 11dd367f8a..df502a0aff 100644
--- a/Doc/library/random.rst
+++ b/Doc/library/random.rst
@@ -20,7 +20,7 @@ On the real line, there are functions to compute uniform, normal (Gaussian),
lognormal, negative exponential, gamma, and beta distributions. For generating
distributions of angles, the von Mises distribution is available.
-Almost all module functions depend on the basic function :func:`random`, which
+Almost all module functions depend on the basic function :func:`.random`, which
generates a random float uniformly in the semi-open range [0.0, 1.0). Python
uses the Mersenne Twister as the core generator. It produces 53-bit precision
floats and has a period of 2\*\*19937-1. The underlying implementation in C is
@@ -34,9 +34,9 @@ instance of the :class:`random.Random` class. You can instantiate your own
instances of :class:`Random` to get generators that don't share state.
Class :class:`Random` can also be subclassed if you want to use a different
-basic generator of your own devising: in that case, override the :meth:`random`,
-:meth:`seed`, :meth:`getstate`, and :meth:`setstate` methods.
-Optionally, a new generator can supply a :meth:`getrandbits` method --- this
+basic generator of your own devising: in that case, override the :meth:`~Random.random`,
+:meth:`~Random.seed`, :meth:`~Random.getstate`, and :meth:`~Random.setstate` methods.
+Optionally, a new generator can supply a :meth:`~Random.getrandbits` method --- this
allows :meth:`randrange` to produce selections over an arbitrarily large range.
The :mod:`random` module also provides the :class:`SystemRandom` class which
@@ -46,8 +46,7 @@ from sources provided by the operating system.
.. warning::
The pseudo-random generators of this module should not be used for
- security purposes. Use :func:`os.urandom` or :class:`SystemRandom` if
- you require a cryptographically secure pseudo-random number generator.
+ security purposes.
Bookkeeping functions:
@@ -126,7 +125,7 @@ Functions for sequences:
Shuffle the sequence *x* in place. The optional argument *random* is a
0-argument function returning a random float in [0.0, 1.0); by default, this is
- the function :func:`random`.
+ the function :func:`.random`.
Note that for even rather small ``len(x)``, the total number of permutations of
*x* is larger than the period of most random number generators; this implies
@@ -268,7 +267,7 @@ Alternative Generator:
`Complementary-Multiply-with-Carry recipe
- <http://code.activestate.com/recipes/576707/>`_ for a compatible alternative
+ <https://code.activestate.com/recipes/576707/>`_ for a compatible alternative
random number generator with a long period and comparatively simple update
operations.
@@ -286,7 +285,7 @@ change across Python versions, but two aspects are guaranteed not to change:
* If a new seeding method is added, then a backward compatible seeder will be
offered.
-* The generator's :meth:`random` method will continue to produce the same
+* The generator's :meth:`~Random.random` method will continue to produce the same
sequence when the compatible seeder is given the same seed.
.. _random-examples:
diff --git a/Doc/library/re.rst b/Doc/library/re.rst
index cae6874833..18d5596794 100644
--- a/Doc/library/re.rst
+++ b/Doc/library/re.rst
@@ -3,16 +3,20 @@
.. module:: re
:synopsis: Regular expression operations.
+
.. moduleauthor:: Fredrik Lundh <fredrik@pythonware.com>
.. sectionauthor:: Andrew M. Kuchling <amk@amk.ca>
+**Source code:** :source:`Lib/re.py`
+
+--------------
This module provides regular expression matching operations similar to
those found in Perl.
Both patterns and strings to be searched can be Unicode strings as well as
8-bit strings. However, Unicode strings and 8-bit strings cannot be mixed:
-that is, you cannot match an Unicode string with a byte pattern or
+that is, you cannot match a Unicode string with a byte pattern or
vice-versa; similarly, when asking for a substitution, the replacement
string must be of the same type as both the pattern and the search string.
@@ -113,11 +117,11 @@ The special characters are:
``*?``, ``+?``, ``??``
The ``'*'``, ``'+'``, and ``'?'`` qualifiers are all :dfn:`greedy`; they match
as much text as possible. Sometimes this behaviour isn't desired; if the RE
- ``<.*>`` is matched against ``'<H1>title</H1>'``, it will match the entire
- string, and not just ``'<H1>'``. Adding ``'?'`` after the qualifier makes it
+ ``<.*>`` is matched against ``<a> b <c>``, it will match the entire
+ string, and not just ``<a>``. Adding ``?`` after the qualifier makes it
perform the match in :dfn:`non-greedy` or :dfn:`minimal` fashion; as *few*
- characters as possible will be matched. Using ``.*?`` in the previous
- expression will match only ``'<H1>'``.
+ characters as possible will be matched. Using the RE ``<.*?>`` will match
+ only ``<a>``.
``{m}``
Specifies that exactly *m* copies of the previous RE should be matched; fewer
@@ -281,9 +285,7 @@ The special characters are:
assertion`. ``(?<=abc)def`` will find a match in ``abcdef``, since the
lookbehind will back up 3 characters and check if the contained pattern matches.
The contained pattern must only match strings of some fixed length, meaning that
- ``abc`` or ``a|b`` are allowed, but ``a*`` and ``a{3,4}`` are not. Group
- references are not supported even if they match strings of some fixed length.
- Note that
+ ``abc`` or ``a|b`` are allowed, but ``a*`` and ``a{3,4}`` are not. Note that
patterns which start with positive lookbehind assertions will not match at the
beginning of the string being searched; you will most likely want to use the
:func:`search` function rather than the :func:`match` function:
@@ -299,12 +301,14 @@ The special characters are:
>>> m.group(0)
'egg'
+ .. versionchanged:: 3.5
+ Added support for group references of fixed length.
+
``(?<!...)``
Matches if the current position in the string is not preceded by a match for
``...``. This is called a :dfn:`negative lookbehind assertion`. Similar to
positive lookbehind assertions, the contained pattern must only match strings of
- some fixed length and shouldn't contain group references.
- Patterns which start with negative lookbehind assertions may
+ some fixed length. Patterns which start with negative lookbehind assertions may
match at the beginning of the string being searched.
``(?(id/name)yes-pattern|no-pattern)``
@@ -438,6 +442,10 @@ three digits in length.
.. versionchanged:: 3.3
The ``'\u'`` and ``'\U'`` escape sequences have been added.
+.. deprecated-removed:: 3.5 3.6
+ Unknown escapes consist of ``'\'`` and ASCII letter now raise a
+ deprecation warning and will be forbidden in Python 3.6.
+
.. seealso::
@@ -524,7 +532,11 @@ form.
current locale. The use of this flag is discouraged as the locale mechanism
is very unreliable, and it only handles one "culture" at a time anyway;
you should use Unicode matching instead, which is the default in Python 3
- for Unicode (str) patterns.
+ for Unicode (str) patterns. This flag makes sense only with bytes patterns.
+
+ .. deprecated-removed:: 3.5 3.6
+ Deprecated the use of :const:`re.LOCALE` with string patterns or
+ :const:`re.ASCII`.
.. data:: M
@@ -627,17 +639,37 @@ form.
That way, separator components are always found at the same relative
indices within the result list.
- Note that *split* will never split a string on an empty pattern match.
- For example:
+ .. note::
+
+ :func:`split` doesn't currently split a string on an empty pattern match.
+ For example:
+
+ >>> re.split('x*', 'axbc')
+ ['a', 'bc']
- >>> re.split('x*', 'foo')
- ['foo']
- >>> re.split("(?m)^$", "foo\n\nbar\n")
- ['foo\n\nbar\n']
+ Even though ``'x*'`` also matches 0 'x' before 'a', between 'b' and 'c',
+ and after 'c', currently these matches are ignored. The correct behavior
+ (i.e. splitting on empty matches too and returning ``['', 'a', 'b', 'c',
+ '']``) will be implemented in future versions of Python, but since this
+ is a backward incompatible change, a :exc:`FutureWarning` will be raised
+ in the meanwhile.
+
+ Patterns that can only match empty strings currently never split the
+ string. Since this doesn't match the expected behavior, a
+ :exc:`ValueError` will be raised starting from Python 3.5::
+
+ >>> re.split("^$", "foo\n\nbar\n", flags=re.M)
+ Traceback (most recent call last):
+ File "<stdin>", line 1, in <module>
+ ...
+ ValueError: split() requires a non-empty pattern match.
.. versionchanged:: 3.1
Added the optional flags argument.
+ .. versionchanged:: 3.5
+ Splitting on a pattern that could match an empty string now raises
+ a warning. Patterns that can only match empty strings are now rejected.
.. function:: findall(pattern, string, flags=0)
@@ -665,7 +697,7 @@ form.
*string* is returned unchanged. *repl* can be a string or a function; if it is
a string, any backslash escapes in it are processed. That is, ``\n`` is
converted to a single newline character, ``\r`` is converted to a carriage return, and
- so forth. Unknown escapes such as ``\j`` are left alone. Backreferences, such
+ so forth. Unknown escapes such as ``\&`` are left alone. Backreferences, such
as ``\6``, are replaced with the substring matched by group 6 in the pattern.
For example:
@@ -707,6 +739,13 @@ form.
.. versionchanged:: 3.1
Added the optional flags argument.
+ .. versionchanged:: 3.5
+ Unmatched groups are replaced with an empty string.
+
+ .. deprecated-removed:: 3.5 3.6
+ Unknown escapes consist of ``'\'`` and ASCII letter now raise a
+ deprecation warning and will be forbidden in Python 3.6.
+
.. function:: subn(pattern, repl, string, count=0, flags=0)
@@ -716,6 +755,9 @@ form.
.. versionchanged:: 3.1
Added the optional flags argument.
+ .. versionchanged:: 3.5
+ Unmatched groups are replaced with an empty string.
+
.. function:: escape(string)
@@ -732,13 +774,36 @@ form.
Clear the regular expression cache.
-.. exception:: error
+.. exception:: error(msg, pattern=None, pos=None)
Exception raised when a string passed to one of the functions here is not a
valid regular expression (for example, it might contain unmatched parentheses)
or when some other error occurs during compilation or matching. It is never an
- error if a string contains no match for a pattern.
+ error if a string contains no match for a pattern. The error instance has
+ the following additional attributes:
+
+ .. attribute:: msg
+
+ The unformatted error message.
+
+ .. attribute:: pattern
+
+ The regular expression pattern.
+
+ .. attribute:: pos
+
+ The index of *pattern* where compilation failed.
+
+ .. attribute:: lineno
+
+ The line corresponding to *pos*.
+
+ .. attribute:: colno
+
+ The column corresponding to *pos*.
+ .. versionchanged:: 3.5
+ Added additional attributes.
.. _re-objects:
@@ -750,8 +815,8 @@ attributes:
.. method:: regex.search(string[, pos[, endpos]])
- Scan through *string* looking for a location where this regular expression
- produces a match, and return a corresponding :ref:`match object
+ Scan through *string* looking for the first location where this regular
+ expression produces a match, and return a corresponding :ref:`match object
<match-objects>`. Return ``None`` if no position in the string matches the
pattern; note that this is different from finding a zero-length match at some
point in the string.
@@ -891,6 +956,8 @@ Match objects support the following methods and attributes:
(``\g<1>``, ``\g<name>``) are replaced by the contents of the
corresponding group.
+ .. versionchanged:: 3.5
+ Unmatched groups are replaced with an empty string.
.. method:: match.group([group1, ...])
@@ -1171,15 +1238,15 @@ does by default).
For example::
- >>> re.match("c", "abcdef") # No match
- >>> re.search("c", "abcdef") # Match
+ >>> re.match("c", "abcdef") # No match
+ >>> re.search("c", "abcdef") # Match
<_sre.SRE_Match object; span=(2, 3), match='c'>
Regular expressions beginning with ``'^'`` can be used with :func:`search` to
restrict the match at the beginning of the string::
- >>> re.match("c", "abcdef") # No match
- >>> re.search("^c", "abcdef") # No match
+ >>> re.match("c", "abcdef") # No match
+ >>> re.search("^c", "abcdef") # No match
>>> re.search("^a", "abcdef") # Match
<_sre.SRE_Match object; span=(0, 1), match='a'>
@@ -1260,9 +1327,9 @@ a function to "munge" text, or randomize the order of all the characters
in each word of a sentence except for the first and last characters::
>>> def repl(m):
- ... inner_word = list(m.group(2))
- ... random.shuffle(inner_word)
- ... return m.group(1) + "".join(inner_word) + m.group(3)
+ ... inner_word = list(m.group(2))
+ ... random.shuffle(inner_word)
+ ... return m.group(1) + "".join(inner_word) + m.group(3)
>>> text = "Professor Abdolmalek, please report your absences promptly."
>>> re.sub(r"(\w)(\w+)(\w)", repl, text)
'Poefsrosr Aealmlobdk, pslaee reorpt your abnseces plmrptoy.'
@@ -1326,7 +1393,7 @@ functionally identical:
Writing a Tokenizer
^^^^^^^^^^^^^^^^^^^
-A `tokenizer or scanner <http://en.wikipedia.org/wiki/Lexical_analysis>`_
+A `tokenizer or scanner <https://en.wikipedia.org/wiki/Lexical_analysis>`_
analyzes a string to categorize groups of characters. This is a useful first
step in writing a compiler or interpreter.
@@ -1342,14 +1409,14 @@ successive matches::
def tokenize(code):
keywords = {'IF', 'THEN', 'ENDIF', 'FOR', 'NEXT', 'GOSUB', 'RETURN'}
token_specification = [
- ('NUMBER', r'\d+(\.\d*)?'), # Integer or decimal number
- ('ASSIGN', r':='), # Assignment operator
- ('END', r';'), # Statement terminator
- ('ID', r'[A-Za-z]+'), # Identifiers
- ('OP', r'[+\-*/]'), # Arithmetic operators
- ('NEWLINE', r'\n'), # Line endings
- ('SKIP', r'[ \t]+'), # Skip over spaces and tabs
- ('MISMATCH',r'.'), # Any other character
+ ('NUMBER', r'\d+(\.\d*)?'), # Integer or decimal number
+ ('ASSIGN', r':='), # Assignment operator
+ ('END', r';'), # Statement terminator
+ ('ID', r'[A-Za-z]+'), # Identifiers
+ ('OP', r'[+\-*/]'), # Arithmetic operators
+ ('NEWLINE', r'\n'), # Line endings
+ ('SKIP', r'[ \t]+'), # Skip over spaces and tabs
+ ('MISMATCH',r'.'), # Any other character
]
tok_regex = '|'.join('(?P<%s>%s)' % pair for pair in token_specification)
line_num = 1
diff --git a/Doc/library/readline.rst b/Doc/library/readline.rst
index 692310b941..e17e69c183 100644
--- a/Doc/library/readline.rst
+++ b/Doc/library/readline.rst
@@ -4,125 +4,201 @@
.. module:: readline
:platform: Unix
:synopsis: GNU readline support for Python.
+
.. sectionauthor:: Skip Montanaro <skip@pobox.com>
+--------------
The :mod:`readline` module defines a number of functions to facilitate
completion and reading/writing of history files from the Python interpreter.
-This module can be used directly or via the :mod:`rlcompleter` module. Settings
+This module can be used directly, or via the :mod:`rlcompleter` module, which
+supports completion of Python identifiers at the interactive prompt. Settings
made using this module affect the behaviour of both the interpreter's
interactive prompt and the prompts offered by the built-in :func:`input`
function.
.. note::
- On MacOS X the :mod:`readline` module can be implemented using
+ The underlying Readline library API may be implemented by
the ``libedit`` library instead of GNU readline.
+ On MacOS X the :mod:`readline` module detects which library is being used
+ at run time.
The configuration file for ``libedit`` is different from that
of GNU readline. If you programmatically load configuration strings
you can check for the text "libedit" in :const:`readline.__doc__`
to differentiate between GNU readline and libedit.
+Readline keybindings may be configured via an initialization file, typically
+``.inputrc`` in your home directory. See `Readline Init File
+<https://cnswww.cns.cwru.edu/php/chet/readline/rluserman.html#SEC9>`_
+in the GNU Readline manual for information about the format and
+allowable constructs of that file, and the capabilities of the
+Readline library in general.
+
-The :mod:`readline` module defines the following functions:
+Init file
+---------
+
+The following functions relate to the init file and user configuration:
.. function:: parse_and_bind(string)
- Parse and execute single line of a readline init file.
+ Execute the init line provided in the *string* argument. This calls
+ :c:func:`rl_parse_and_bind` in the underlying library.
+
+
+.. function:: read_init_file([filename])
+
+ Execute a readline initialization file. The default filename is the last filename
+ used. This calls :c:func:`rl_read_init_file` in the underlying library.
+
+
+Line buffer
+-----------
+
+The following functions operate on the line buffer:
.. function:: get_line_buffer()
- Return the current contents of the line buffer.
+ Return the current contents of the line buffer (:c:data:`rl_line_buffer`
+ in the underlying library).
.. function:: insert_text(string)
- Insert text into the command line.
+ Insert text into the line buffer at the cursor position. This calls
+ :c:func:`rl_insert_text` in the underlying library, but ignores
+ the return value.
-.. function:: read_init_file([filename])
+.. function:: redisplay()
+
+ Change what's displayed on the screen to reflect the current contents of the
+ line buffer. This calls :c:func:`rl_redisplay` in the underlying library.
+
- Parse a readline initialization file. The default filename is the last filename
- used.
+History file
+------------
+
+The following functions operate on a history file:
.. function:: read_history_file([filename])
- Load a readline history file. The default filename is :file:`~/.history`.
+ Load a readline history file, and append it to the history list.
+ The default filename is :file:`~/.history`. This calls
+ :c:func:`read_history` in the underlying library.
.. function:: write_history_file([filename])
- Save a readline history file. The default filename is :file:`~/.history`.
+ Save the history list to a readline history file, overwriting any
+ existing file. The default filename is :file:`~/.history`. This calls
+ :c:func:`write_history` in the underlying library.
-.. function:: clear_history()
+.. function:: append_history_file(nelements[, filename])
- Clear the current history. (Note: this function is not available if the
- installed version of GNU readline doesn't support it.)
+ Append the last *nelements* items of history to a file. The default filename is
+ :file:`~/.history`. The file must already exist. This calls
+ :c:func:`append_history` in the underlying library.
+
+ .. versionadded:: 3.5
.. function:: get_history_length()
+ set_history_length(length)
- Return the desired length of the history file. Negative values imply unlimited
- history file size.
+ Set or return the desired number of lines to save in the history file.
+ The :func:`write_history_file` function uses this value to truncate
+ the history file, by calling :c:func:`history_truncate_file` in
+ the underlying library. Negative values imply
+ unlimited history file size.
-.. function:: set_history_length(length)
+History list
+------------
- Set the number of lines to save in the history file. :func:`write_history_file`
- uses this value to truncate the history file when saving. Negative values imply
- unlimited history file size.
+The following functions operate on a global history list:
+
+
+.. function:: clear_history()
+
+ Clear the current history. This calls :c:func:`clear_history` in the
+ underlying library. The Python function only exists if Python was
+ compiled for a version of the library that supports it.
.. function:: get_current_history_length()
- Return the number of lines currently in the history. (This is different from
+ Return the number of items currently in the history. (This is different from
:func:`get_history_length`, which returns the maximum number of lines that will
be written to a history file.)
.. function:: get_history_item(index)
- Return the current contents of history item at *index*.
+ Return the current contents of history item at *index*. The item index
+ is one-based. This calls :c:func:`history_get` in the underlying library.
.. function:: remove_history_item(pos)
Remove history item specified by its position from the history.
+ The position is zero-based. This calls :c:func:`remove_history` in
+ the underlying library.
.. function:: replace_history_item(pos, line)
- Replace history item specified by its position with the given line.
+ Replace history item specified by its position with *line*.
+ The position is zero-based. This calls :c:func:`replace_history_entry`
+ in the underlying library.
-.. function:: redisplay()
+.. function:: add_history(line)
- Change what's displayed on the screen to reflect the current contents of the
- line buffer.
+ Append *line* to the history buffer, as if it was the last line typed.
+ This calls :c:func:`add_history` in the underlying library.
+
+
+Startup hooks
+-------------
.. function:: set_startup_hook([function])
- Set or remove the startup_hook function. If *function* is specified, it will be
- used as the new startup_hook function; if omitted or ``None``, any hook function
- already installed is removed. The startup_hook function is called with no
+ Set or remove the function invoked by the :c:data:`rl_startup_hook`
+ callback of the underlying library. If *function* is specified, it will
+ be used as the new hook function; if omitted or ``None``, any function
+ already installed is removed. The hook is called with no
arguments just before readline prints the first prompt.
.. function:: set_pre_input_hook([function])
- Set or remove the pre_input_hook function. If *function* is specified, it will
- be used as the new pre_input_hook function; if omitted or ``None``, any hook
- function already installed is removed. The pre_input_hook function is called
+ Set or remove the function invoked by the :c:data:`rl_pre_input_hook`
+ callback of the underlying library. If *function* is specified, it will
+ be used as the new hook function; if omitted or ``None``, any
+ function already installed is removed. The hook is called
with no arguments after the first prompt has been printed and just before
readline starts reading input characters.
+Completion
+----------
+
+The following functions relate to implementing a custom word completion
+function. This is typically operated by the Tab key, and can suggest and
+automatically complete a word being typed. By default, Readline is set up
+to be used by :mod:`rlcompleter` to complete Python identifiers for
+the interactive interpreter. If the :mod:`readline` module is to be used
+with a custom completer, a different set of word delimiters should be set.
+
+
.. function:: set_completer([function])
Set or remove the completer function. If *function* is specified, it will be
@@ -132,6 +208,12 @@ The :mod:`readline` module defines the following functions:
returns a non-string value. It should return the next possible completion
starting with *text*.
+ The installed completer function is invoked by the *entry_func* callback
+ passed to :c:func:`rl_completion_matches` in the underlying library.
+ The *text* string comes from the first parameter to the
+ :c:data:`rl_attempted_completion_function` callback of the
+ underlying library.
+
.. function:: get_completer()
@@ -140,27 +222,27 @@ The :mod:`readline` module defines the following functions:
.. function:: get_completion_type()
- Get the type of completion being attempted.
+ Get the type of completion being attempted. This returns the
+ :c:data:`rl_completion_type` variable in the underlying library as
+ an integer.
.. function:: get_begidx()
+ get_endidx()
- Get the beginning index of the readline tab-completion scope.
-
-
-.. function:: get_endidx()
-
- Get the ending index of the readline tab-completion scope.
+ Get the beginning or ending index of the completion scope.
+ These indexes are the *start* and *end* arguments passed to the
+ :c:data:`rl_attempted_completion_function` callback of the
+ underlying library.
.. function:: set_completer_delims(string)
+ get_completer_delims()
- Set the readline word delimiters for tab-completion.
-
-
-.. function:: get_completer_delims()
-
- Get the readline word delimiters for tab-completion.
+ Set or get the word delimiters for completion. These determine the
+ start of the word to be considered for completion (the completion scope).
+ These functions access the :c:data:`rl_completer_word_break_characters`
+ variable in the underlying library.
.. function:: set_completion_display_matches_hook([function])
@@ -168,21 +250,13 @@ The :mod:`readline` module defines the following functions:
Set or remove the completion display function. If *function* is
specified, it will be used as the new completion display function;
if omitted or ``None``, any completion display function already
- installed is removed. The completion display function is called as
+ installed is removed. This sets or clears the
+ :c:data:`rl_completion_display_matches_hook` callback in the
+ underlying library. The completion display function is called as
``function(substitution, [matches], longest_match_length)`` once
each time matches need to be displayed.
-.. function:: add_history(line)
-
- Append a line to the history buffer, as if it was the last line typed.
-
-.. seealso::
-
- Module :mod:`rlcompleter`
- Completion of Python identifiers at the interactive prompt.
-
-
.. _readline-example:
Example
@@ -201,6 +275,8 @@ from the user's :envvar:`PYTHONSTARTUP` file. ::
histfile = os.path.join(os.path.expanduser("~"), ".python_history")
try:
readline.read_history_file(histfile)
+ # default history len is -1 (infinite), which may grow unruly
+ readline.set_history_length(1000)
except FileNotFoundError:
pass
@@ -209,6 +285,27 @@ from the user's :envvar:`PYTHONSTARTUP` file. ::
This code is actually automatically run when Python is run in
:ref:`interactive mode <tut-interactive>` (see :ref:`rlcompleter-config`).
+The following example achieves the same goal but supports concurrent interactive
+sessions, by only appending the new history. ::
+
+ import atexit
+ import os
+ import readline
+ histfile = os.path.join(os.path.expanduser("~"), ".python_history")
+
+ try:
+ readline.read_history_file(histfile)
+ h_len = readline.get_history_length()
+ except FileNotFoundError:
+ open(histfile, 'wb').close()
+ h_len = 0
+
+ def save(prev_h_len, histfile):
+ new_h_len = readline.get_history_length()
+ readline.set_history_length(1000)
+ readline.append_history_file(new_h_len - prev_h_len, histfile)
+ atexit.register(save, h_len, histfile)
+
The following example extends the :class:`code.InteractiveConsole` class to
support history save/restore. ::
@@ -233,5 +330,5 @@ support history save/restore. ::
atexit.register(self.save_history, histfile)
def save_history(self, histfile):
+ readline.set_history_length(1000)
readline.write_history_file(histfile)
-
diff --git a/Doc/library/reprlib.rst b/Doc/library/reprlib.rst
index ee9a10d37e..0905b982cd 100644
--- a/Doc/library/reprlib.rst
+++ b/Doc/library/reprlib.rst
@@ -3,6 +3,7 @@
.. module:: reprlib
:synopsis: Alternate repr() implementation with size limits.
+
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
**Source code:** :source:`Lib/reprlib.py`
diff --git a/Doc/library/resource.rst b/Doc/library/resource.rst
index a7b229e98a..b213793a2c 100644
--- a/Doc/library/resource.rst
+++ b/Doc/library/resource.rst
@@ -4,9 +4,11 @@
.. module:: resource
:platform: Unix
:synopsis: An interface to provide resource usage information on the current process.
+
.. moduleauthor:: Jeremy Hylton <jeremy@alum.mit.edu>
.. sectionauthor:: Jeremy Hylton <jeremy@alum.mit.edu>
+--------------
This module provides basic mechanisms for measuring and controlling system
resources utilized by a program.
diff --git a/Doc/library/rlcompleter.rst b/Doc/library/rlcompleter.rst
index 9ed01c7146..40b09ce897 100644
--- a/Doc/library/rlcompleter.rst
+++ b/Doc/library/rlcompleter.rst
@@ -3,6 +3,7 @@
.. module:: rlcompleter
:synopsis: Python identifier completion, suitable for the GNU readline library.
+
.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
**Source code:** :source:`Lib/rlcompleter.py`
diff --git a/Doc/library/runpy.rst b/Doc/library/runpy.rst
index 7293f159e0..af35e81a2d 100644
--- a/Doc/library/runpy.rst
+++ b/Doc/library/runpy.rst
@@ -3,6 +3,7 @@
.. module:: runpy
:synopsis: Locate and run Python modules without importing them first.
+
.. moduleauthor:: Nick Coghlan <ncoghlan@gmail.com>
**Source code:** :source:`Lib/runpy.py`
@@ -36,7 +37,8 @@ The :mod:`runpy` module provides two functions:
import mechanism (refer to :pep:`302` for details) and then executed in a
fresh module namespace.
- If the supplied module name refers to a package rather than a normal
+ The *mod_name* argument should be an absolute module name.
+ If the module name refers to a package rather than a normal
module, then that package is imported and the ``__main__`` submodule within
that package is then executed and the resulting module globals dictionary
returned.
diff --git a/Doc/library/sched.rst b/Doc/library/sched.rst
index 26f59c556c..4d4a616105 100644
--- a/Doc/library/sched.rst
+++ b/Doc/library/sched.rst
@@ -3,12 +3,13 @@
.. module:: sched
:synopsis: General purpose event scheduler.
-.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
-.. index:: single: event scheduling
+.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
**Source code:** :source:`Lib/sched.py`
+.. index:: single: event scheduling
+
--------------
The :mod:`sched` module defines a class which implements a general purpose event
diff --git a/Doc/library/select.rst b/Doc/library/select.rst
index 5334af8ea4..6cec9f764b 100644
--- a/Doc/library/select.rst
+++ b/Doc/library/select.rst
@@ -4,6 +4,7 @@
.. module:: select
:synopsis: Wait for I/O completion on multiple streams.
+--------------
This module provides access to the :c:func:`select` and :c:func:`poll` functions
available in most operating systems, :c:func:`devpoll` available on
@@ -145,6 +146,13 @@ The module defines the following:
library, and does not handle file descriptors that don't originate from
WinSock.
+ .. versionchanged:: 3.5
+ The function is now retried with a recomputed timeout when interrupted by
+ a signal, except if the signal handler raises an exception (see
+ :pep:`475` for the rationale), instead of raising
+ :exc:`InterruptedError`.
+
+
.. attribute:: PIPE_BUF
The minimum number of bytes which can be written without blocking to a pipe
@@ -242,6 +250,12 @@ object.
returning. If *timeout* is omitted, -1, or :const:`None`, the call will
block until there is an event for this poll object.
+ .. versionchanged:: 3.5
+ The function is now retried with a recomputed timeout when interrupted by
+ a signal, except if the signal handler raises an exception (see
+ :pep:`475` for the rationale), instead of raising
+ :exc:`InterruptedError`.
+
.. _epoll-objects:
@@ -322,6 +336,12 @@ Edge and Level Trigger Polling (epoll) Objects
Wait for events. timeout in seconds (float)
+ .. versionchanged:: 3.5
+ The function is now retried with a recomputed timeout when interrupted by
+ a signal, except if the signal handler raises an exception (see
+ :pep:`475` for the rationale), instead of raising
+ :exc:`InterruptedError`.
+
.. _poll-objects:
@@ -401,6 +421,12 @@ linearly scanned again. :c:func:`select` is O(highest file descriptor), while
returning. If *timeout* is omitted, negative, or :const:`None`, the call will
block until there is an event for this poll object.
+ .. versionchanged:: 3.5
+ The function is now retried with a recomputed timeout when interrupted by
+ a signal, except if the signal handler raises an exception (see
+ :pep:`475` for the rationale), instead of raising
+ :exc:`InterruptedError`.
+
.. _kqueue-objects:
@@ -435,13 +461,19 @@ Kqueue Objects
- max_events must be 0 or a positive integer
- timeout in seconds (floats possible)
+ .. versionchanged:: 3.5
+ The function is now retried with a recomputed timeout when interrupted by
+ a signal, except if the signal handler raises an exception (see
+ :pep:`475` for the rationale), instead of raising
+ :exc:`InterruptedError`.
+
.. _kevent-objects:
Kevent Objects
--------------
-http://www.freebsd.org/cgi/man.cgi?query=kqueue&sektion=2
+https://www.freebsd.org/cgi/man.cgi?query=kqueue&sektion=2
.. attribute:: kevent.ident
diff --git a/Doc/library/selectors.rst b/Doc/library/selectors.rst
index 98377c890f..44b27f31c1 100644
--- a/Doc/library/selectors.rst
+++ b/Doc/library/selectors.rst
@@ -6,6 +6,9 @@
.. versionadded:: 3.4
+**Source code:** :source:`Lib/selectors.py`
+
+--------------
Introduction
------------
@@ -45,12 +48,13 @@ Classes hierarchy::
+-- SelectSelector
+-- PollSelector
+-- EpollSelector
+ +-- DevpollSelector
+-- KqueueSelector
In the following, *events* is a bitwise mask indicating which I/O events should
-be waited for on a given file object. It can be a combination of the constants
-below:
+be waited for on a given file object. It can be a combination of the modules
+constants below:
+-----------------------+-----------------------------------------------+
| Constant | Meaning |
@@ -98,7 +102,7 @@ below:
:class:`BaseSelector` and its concrete implementations support the
:term:`context manager` protocol.
- .. method:: register(fileobj, events, data=None)
+ .. abstractmethod:: register(fileobj, events, data=None)
Register a file object for selection, monitoring it for I/O events.
@@ -111,7 +115,7 @@ below:
:exc:`ValueError` in case of invalid event mask or file descriptor, or
:exc:`KeyError` if the file object is already registered.
- .. method:: unregister(fileobj)
+ .. abstractmethod:: unregister(fileobj)
Unregister a file object from selection, removing it from monitoring. A
file object shall be unregistered prior to being closed.
@@ -135,7 +139,7 @@ below:
:exc:`ValueError` in case of invalid event mask or file descriptor, or
:exc:`KeyError` if the file object is not registered.
- .. method:: select(timeout=None)
+ .. abstractmethod:: select(timeout=None)
Wait until some registered file objects become ready, or the timeout
expires.
@@ -158,6 +162,12 @@ below:
timeout has elapsed if the current process receives a signal: in this
case, an empty list will be returned.
+ .. versionchanged:: 3.5
+ The selector is now retried with a recomputed timeout when interrupted
+ by a signal if the signal handler did not raise an exception (see
+ :pep:`475` for the rationale), instead of returning an empty list
+ of events before the timeout.
+
.. method:: close()
Close the selector.
@@ -172,7 +182,7 @@ below:
This returns the :class:`SelectorKey` instance associated to this file
object, or raises :exc:`KeyError` if the file object is not registered.
- .. method:: get_map()
+ .. abstractmethod:: get_map()
Return a mapping of file objects to selector keys.
@@ -207,6 +217,16 @@ below:
This returns the file descriptor used by the underlying
:func:`select.epoll` object.
+.. class:: DevpollSelector()
+
+ :func:`select.devpoll`-based selector.
+
+ .. method:: fileno()
+
+ This returns the file descriptor used by the underlying
+ :func:`select.devpoll` object.
+
+ .. versionadded:: 3.5
.. class:: KqueueSelector()
diff --git a/Doc/library/shelve.rst b/Doc/library/shelve.rst
index 22e202dace..1ec158ee7e 100644
--- a/Doc/library/shelve.rst
+++ b/Doc/library/shelve.rst
@@ -4,11 +4,10 @@
.. module:: shelve
:synopsis: Python object persistence.
+**Source code:** :source:`Lib/shelve.py`
.. index:: module: pickle
-**Source code:** :source:`Lib/shelve.py`
-
--------------
A "shelf" is a persistent, dictionary-like object. The difference with "dbm"
@@ -76,7 +75,7 @@ Two additional methods are supported:
.. seealso::
- `Persistent dictionary recipe <http://code.activestate.com/recipes/576642/>`_
+ `Persistent dictionary recipe <https://code.activestate.com/recipes/576642/>`_
with widely supported storage formats and having the speed of native
dictionaries.
@@ -137,7 +136,7 @@ Restrictions
A subclass of :class:`Shelf` which exposes :meth:`first`, :meth:`!next`,
:meth:`previous`, :meth:`last` and :meth:`set_location` which are available
in the third-party :mod:`bsddb` module from `pybsddb
- <http://www.jcea.es/programacion/pybsddb.htm>`_ but not in other database
+ <https://www.jcea.es/programacion/pybsddb.htm>`_ but not in other database
modules. The *dict* object passed to the constructor must support those
methods. This is generally accomplished by calling one of
:func:`bsddb.hashopen`, :func:`bsddb.btopen` or :func:`bsddb.rnopen`. The
@@ -165,32 +164,33 @@ object)::
import shelve
- d = shelve.open(filename) # open -- file may get suffix added by low-level
- # library
+ d = shelve.open(filename) # open -- file may get suffix added by low-level
+ # library
+
+ d[key] = data # store data at key (overwrites old data if
+ # using an existing key)
+ data = d[key] # retrieve a COPY of data at key (raise KeyError
+ # if no such key)
+ del d[key] # delete data stored at key (raises KeyError
+ # if no such key)
- d[key] = data # store data at key (overwrites old data if
- # using an existing key)
- data = d[key] # retrieve a COPY of data at key (raise KeyError if no
- # such key)
- del d[key] # delete data stored at key (raises KeyError
- # if no such key)
- flag = key in d # true if the key exists
- klist = list(d.keys()) # a list of all existing keys (slow!)
+ flag = key in d # true if the key exists
+ klist = list(d.keys()) # a list of all existing keys (slow!)
# as d was opened WITHOUT writeback=True, beware:
- d['xx'] = [0, 1, 2] # this works as expected, but...
- d['xx'].append(3) # *this doesn't!* -- d['xx'] is STILL [0, 1, 2]!
+ d['xx'] = [0, 1, 2] # this works as expected, but...
+ d['xx'].append(3) # *this doesn't!* -- d['xx'] is STILL [0, 1, 2]!
# having opened d without writeback=True, you need to code carefully:
- temp = d['xx'] # extracts the copy
- temp.append(5) # mutates the copy
- d['xx'] = temp # stores the copy right back, to persist it
+ temp = d['xx'] # extracts the copy
+ temp.append(5) # mutates the copy
+ d['xx'] = temp # stores the copy right back, to persist it
# or, d=shelve.open(filename,writeback=True) would let you just code
# d['xx'].append(5) and have it work as expected, BUT it would also
# consume more memory and make the d.close() operation slower.
- d.close() # close it
+ d.close() # close it
.. seealso::
diff --git a/Doc/library/shlex.rst b/Doc/library/shlex.rst
index e40a10daa5..e81f9822bb 100644
--- a/Doc/library/shlex.rst
+++ b/Doc/library/shlex.rst
@@ -3,6 +3,7 @@
.. module:: shlex
:synopsis: Simple lexical analysis for Unix shell-like languages.
+
.. moduleauthor:: Eric S. Raymond <esr@snark.thyrsus.com>
.. moduleauthor:: Gustavo Niemeyer <niemeyer@conectiva.com>
.. sectionauthor:: Eric S. Raymond <esr@snark.thyrsus.com>
@@ -244,7 +245,8 @@ variables which either control lexical analysis or can be used for debugging:
This attribute is ``None`` by default. If you assign a string to it, that
string will be recognized as a lexical-level inclusion request similar to the
``source`` keyword in various shells. That is, the immediately following token
- will opened as a filename and input taken from that stream until EOF, at which
+ will be opened as a filename and input will
+ be taken from that stream until EOF, at which
point the :meth:`~io.IOBase.close` method of that stream will be called and
the input source will again become the original input stream. Source
requests may be stacked any number of levels deep.
diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst
index 7566521e2a..e9ba4e6219 100644
--- a/Doc/library/shutil.rst
+++ b/Doc/library/shutil.rst
@@ -3,15 +3,16 @@
.. module:: shutil
:synopsis: High-level file operations, including copying.
+
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
.. partly based on the docstrings
+**Source code:** :source:`Lib/shutil.py`
+
.. index::
single: file; copying
single: copying files
-**Source code:** :source:`Lib/shutil.py`
-
--------------
The :mod:`shutil` module offers a number of high-level operations on files and
@@ -191,7 +192,8 @@ Directory and files operations
match one of the glob-style *patterns* provided. See the example below.
-.. function:: copytree(src, dst, symlinks=False, ignore=None, copy_function=copy2, ignore_dangling_symlinks=False)
+.. function:: copytree(src, dst, symlinks=False, ignore=None, \
+ copy_function=copy2, ignore_dangling_symlinks=False)
Recursively copy an entire directory tree rooted at *src*, returning the
destination directory. The destination
@@ -282,7 +284,7 @@ Directory and files operations
.. versionadded:: 3.3
-.. function:: move(src, dst)
+.. function:: move(src, dst, copy_function=copy2)
Recursively move a file or directory (*src*) to another location (*dst*)
and return the destination.
@@ -292,15 +294,26 @@ Directory and files operations
be overwritten depending on :func:`os.rename` semantics.
If the destination is on the current filesystem, then :func:`os.rename` is
- used. Otherwise, *src* is copied (using :func:`shutil.copy2`) to *dst* and
- then removed. In case of symlinks, a new symlink pointing to the target of
- *src* will be created in or as *dst* and *src* will be removed.
+ used. Otherwise, *src* is copied to *dst* using *copy_function* and then
+ removed. In case of symlinks, a new symlink pointing to the target of *src*
+ will be created in or as *dst* and *src* will be removed.
+
+ If *copy_function* is given, it must be a callable that takes two arguments
+ *src* and *dst*, and will be used to copy *src* to *dest* if
+ :func:`os.rename` cannot be used. If the source is a directory,
+ :func:`copytree` is called, passing it the :func:`copy_function`. The
+ default *copy_function* is :func:`copy2`. Using :func:`copy` as the
+ *copy_function* allows the move to succeed when it is not possible to also
+ copy the metadata, at the expense of not copying any of the metadata.
.. versionchanged:: 3.3
Added explicit symlink handling for foreign filesystems, thus adapting
it to the behavior of GNU's :program:`mv`.
Now returns *dst*.
+ .. versionchanged:: 3.5
+ Added the *copy_function* keyword argument.
+
.. function:: disk_usage(path)
Return disk usage statistics about the given path as a :term:`named tuple`
@@ -330,7 +343,7 @@ Directory and files operations
Return the path to an executable which would be run if the given *cmd* was
called. If no *cmd* would be called, return ``None``.
- *mode* is a permission mask passed a to :func:`os.access`, by default
+ *mode* is a permission mask passed to :func:`os.access`, by default
determining if the file exists and executable.
When no *path* is specified, the results of :func:`os.environ` are used,
@@ -418,6 +431,26 @@ Another example that uses the *ignore* argument to add a logging call::
copytree(source, destination, ignore=_logpath)
+.. _shutil-rmtree-example:
+
+rmtree example
+~~~~~~~~~~~~~~
+
+This example shows how to remove a directory tree on Windows where some
+of the files have their read-only bit set. It uses the onerror callback
+to clear the readonly bit and reattempt the remove. Any subsequent failure
+will propagate. ::
+
+ import os, stat
+ import shutil
+
+ def remove_readonly(func, path, _):
+ "Clear the readonly bit and reattempt the removal"
+ os.chmod(path, stat.S_IWRITE)
+ func(path)
+
+ shutil.rmtree(directory, onerror=remove_readonly)
+
.. _archiving-operations:
Archiving operations
@@ -434,7 +467,8 @@ provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules.
*base_name* is the name of the file to create, including the path, minus
any format-specific extension. *format* is the archive format: one of
- "zip", "tar", "bztar" (if the :mod:`bz2` module is available) or "gztar".
+ "zip", "tar", "bztar" (if the :mod:`bz2` module is available), "xztar"
+ (if the :mod:`lzma` module is available) or "gztar".
*root_dir* is a directory that will be the root directory of the
archive; for example, we typically chdir into *root_dir* before creating the
@@ -457,6 +491,9 @@ provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules.
The *verbose* argument is unused and deprecated.
+ .. versionchanged:: 3.5
+ Added support for the *xztar* format.
+
.. function:: get_archive_formats()
@@ -467,6 +504,7 @@ provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules.
- *gztar*: gzip'ed tar-file
- *bztar*: bzip2'ed tar-file (if the :mod:`bz2` module is available.)
+ - *xztar*: xz'ed tar-file (if the :mod:`lzma` module is available.)
- *tar*: uncompressed tar file
- *zip*: ZIP file
@@ -542,6 +580,7 @@ provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules.
- *gztar*: gzip'ed tar-file
- *bztar*: bzip2'ed tar-file (if the :mod:`bz2` module is available.)
+ - *xztar*: xz'ed tar-file (if the :mod:`lzma` module is available.)
- *tar*: uncompressed tar file
- *zip*: ZIP file
diff --git a/Doc/library/signal.rst b/Doc/library/signal.rst
index 8b90994846..61252ce4e8 100644
--- a/Doc/library/signal.rst
+++ b/Doc/library/signal.rst
@@ -4,6 +4,7 @@
.. module:: signal
:synopsis: Set handlers for asynchronous events.
+--------------
This module provides mechanisms to use signal handlers in Python.
@@ -11,7 +12,7 @@ This module provides mechanisms to use signal handlers in Python.
General rules
-------------
-The :func:`signal.signal` function allows to define custom handlers to be
+The :func:`signal.signal` function allows defining custom handlers to be
executed when a signal is received. A small number of default handlers are
installed: :const:`SIGPIPE` is ignored (so write errors on pipes and sockets
can be reported as ordinary Python exceptions) and :const:`SIGINT` is
@@ -22,9 +23,6 @@ explicitly reset (Python emulates the BSD style interface regardless of the
underlying implementation), with the exception of the handler for
:const:`SIGCHLD`, which follows the underlying implementation.
-There is no way to "block" signals temporarily from critical sections (since
-this is not supported by all Unix flavors).
-
Execution of Python signal handlers
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -65,6 +63,16 @@ Besides, only the main thread is allowed to set a new signal handler.
Module contents
---------------
+.. versionchanged:: 3.5
+ signal (SIG*), handler (:const:`SIG_DFL`, :const:`SIG_IGN`) and sigmask
+ (:const:`SIG_BLOCK`, :const:`SIG_UNBLOCK`, :const:`SIG_SETMASK`)
+ related constants listed below were turned into
+ :class:`enums <enum.IntEnum>`.
+ :func:`getsignal`, :func:`pthread_sigmask`, :func:`sigpending` and
+ :func:`sigwait` functions return human-readable
+ :class:`enums <enum.IntEnum>`.
+
+
The variables defined in the :mod:`signal` module are:
@@ -209,21 +217,21 @@ The :mod:`signal` module defines the following functions:
:func:`sigpending`.
-.. function:: pthread_kill(thread_id, signum)
+.. function:: pthread_kill(thread_id, signalnum)
- Send the signal *signum* to the thread *thread_id*, another thread in the
+ Send the signal *signalnum* to the thread *thread_id*, another thread in the
same process as the caller. The target thread can be executing any code
(Python or not). However, if the target thread is executing the Python
interpreter, the Python signal handlers will be :ref:`executed by the main
- thread <signals-and-threads>`. Therefore, the only point of sending a signal to a particular
- Python thread would be to force a running system call to fail with
- :exc:`InterruptedError`.
+ thread <signals-and-threads>`. Therefore, the only point of sending a
+ signal to a particular Python thread would be to force a running system call
+ to fail with :exc:`InterruptedError`.
Use :func:`threading.get_ident()` or the :attr:`~threading.Thread.ident`
attribute of :class:`threading.Thread` objects to get a suitable value
for *thread_id*.
- If *signum* is 0, then no signal is sent, but error checking is still
+ If *signalnum* is 0, then no signal is sent, but error checking is still
performed; this can be used to check if the target thread is still running.
Availability: Unix (see the man page :manpage:`pthread_kill(3)` for further
@@ -308,6 +316,9 @@ The :mod:`signal` module defines the following functions:
attempting to call it from other threads will cause a :exc:`ValueError`
exception to be raised.
+ .. versionchanged:: 3.5
+ On Windows, the function now also supports socket handles.
+
.. function:: siginterrupt(signalnum, flag)
@@ -341,6 +352,9 @@ The :mod:`signal` module defines the following functions:
On Windows, :func:`signal` can only be called with :const:`SIGABRT`,
:const:`SIGFPE`, :const:`SIGILL`, :const:`SIGINT`, :const:`SIGSEGV`, or
:const:`SIGTERM`. A :exc:`ValueError` will be raised in any other case.
+ Note that not all systems define the same set of signal names; an
+ :exc:`AttributeError` will be raised if a signal name is not defined as
+ ``SIG*`` module level constant.
.. function:: sigpending()
@@ -395,6 +409,11 @@ The :mod:`signal` module defines the following functions:
.. versionadded:: 3.3
+ .. versionchanged:: 3.5
+ The function is now retried if interrupted by a signal not in *sigset*
+ and the signal handler does not raise an exception (see :pep:`475` for
+ the rationale).
+
.. function:: sigtimedwait(sigset, timeout)
@@ -409,6 +428,11 @@ The :mod:`signal` module defines the following functions:
.. versionadded:: 3.3
+ .. versionchanged:: 3.5
+ The function is now retried with the recomputed *timeout* if interrupted
+ by a signal not in *sigset* and the signal handler does not raise an
+ exception (see :pep:`475` for the rationale).
+
.. _signal-example:
diff --git a/Doc/library/site.rst b/Doc/library/site.rst
index 51e5da81d1..0a73f5abc6 100644
--- a/Doc/library/site.rst
+++ b/Doc/library/site.rst
@@ -26,24 +26,23 @@ additions, call the :func:`site.main` function.
:option:`-S`.
.. index::
- pair: site-python; directory
pair: site-packages; directory
It starts by constructing up to four directories from a head and a tail part.
For the head part, it uses ``sys.prefix`` and ``sys.exec_prefix``; empty heads
are skipped. For the tail part, it uses the empty string and then
:file:`lib/site-packages` (on Windows) or
-:file:`lib/python{X.Y}/site-packages` and then :file:`lib/site-python` (on
-Unix and Macintosh). For each of the distinct head-tail combinations, it sees
-if it refers to an existing directory, and if so, adds it to ``sys.path`` and
-also inspects the newly added path for configuration files.
+:file:`lib/python{X.Y}/site-packages` (on Unix and Macintosh). For each
+of the distinct head-tail combinations, it sees if it refers to an existing
+directory, and if so, adds it to ``sys.path`` and also inspects the newly
+added path for configuration files.
-.. deprecated:: 3.4
- Support for the "site-python" directory will be removed in 3.5.
+.. versionchanged:: 3.5
+ Support for the "site-python" directory has been removed.
If a file named "pyvenv.cfg" exists one directory above sys.executable,
sys.prefix and sys.exec_prefix are set to that directory and
-it is also checked for site-packages and site-python (sys.base_prefix and
+it is also checked for site-packages (sys.base_prefix and
sys.base_exec_prefix will always be the "real" prefixes of the Python
installation). If "pyvenv.cfg" (a bootstrap configuration file) contains
the key "include-system-site-packages" set to anything other than "false"
@@ -53,8 +52,7 @@ searched for site-packages; otherwise they won't.
A path configuration file is a file whose name has the form :file:`{name}.pth`
and exists in one of the four directories mentioned above; its contents are
additional items (one per line) to be added to ``sys.path``. Non-existing items
-are never added to ``sys.path``, and no check is made that the item refers to a
-directory rather than a file. No item is added to ``sys.path`` more than
+are never added to ``sys.path``. No item is added to ``sys.path`` more than
once. Blank lines and lines beginning with ``#`` are skipped. Lines starting
with ``import`` (followed by space or tab) are executed.
@@ -195,8 +193,7 @@ Module contents
.. function:: getsitepackages()
- Return a list containing all global site-packages directories (and possibly
- site-python).
+ Return a list containing all global site-packages directories.
.. versionadded:: 3.2
diff --git a/Doc/library/smtpd.rst b/Doc/library/smtpd.rst
index 3ebed06260..977f9a8748 100644
--- a/Doc/library/smtpd.rst
+++ b/Doc/library/smtpd.rst
@@ -20,7 +20,8 @@ specific mail-sending strategies.
Additionally the SMTPChannel may be extended to implement very specific
interaction behaviour with SMTP clients.
-The code supports :RFC:`5321`, plus the :rfc:`1870` SIZE extension.
+The code supports :RFC:`5321`, plus the :rfc:`1870` SIZE and :rfc:`6531`
+SMTPUTF8 extensions.
SMTPServer Objects
@@ -28,7 +29,7 @@ SMTPServer Objects
.. class:: SMTPServer(localaddr, remoteaddr, data_size_limit=33554432,\
- map=None)
+ map=None, enable_SMTPUTF8=False, decode_data=True)
Create a new :class:`SMTPServer` object, which binds to local address
*localaddr*. It will treat *remoteaddr* as an upstream SMTP relayer. It
@@ -39,25 +40,77 @@ SMTPServer Objects
accepted in a ``DATA`` command. A value of ``None`` or ``0`` means no
limit.
- A dictionary can be specified in *map* to avoid using a global socket map.
-
- .. method:: process_message(peer, mailfrom, rcpttos, data)
-
- Raise :exc:`NotImplementedError` exception. Override this in subclasses to
+ *map* is the socket map to use for connections (an initially empty
+ dictionary is a suitable value). If not specified the :mod:`asyncore`
+ global socket map is used.
+
+ *enable_SMTPUTF8* determins whether the ``SMTPUTF8`` extension (as defined
+ in :RFC:`6531`) should be enabled. The default is ``False``. If set to
+ ``True``, *decode_data* must be ``False`` (otherwise an error is raised).
+ When ``True``, ``SMTPUTF8`` is accepted as a parameter to the ``MAIL``
+ command and when present is passed to :meth:`process_message` in the
+ ``kwargs['mail_options']`` list.
+
+ *decode_data* specifies whether the data portion of the SMTP transaction
+ should be decoded using UTF-8. The default is ``True`` for backward
+ compatibility reasons, but will change to ``False`` in Python 3.6; specify
+ the keyword value explicitly to avoid the :exc:`DeprecationWarning`. When
+ *decode_data* is set to ``False`` the server advertises the ``8BITMIME``
+ extension (:rfc:`6152`), accepts the ``BODY=8BITMIME`` parameter to
+ the ``MAIL`` command, and when present passes it to :meth:`process_message`
+ in the ``kwargs['mail_options']`` list.
+
+ .. method:: process_message(peer, mailfrom, rcpttos, data, **kwargs)
+
+ Raise a :exc:`NotImplementedError` exception. Override this in subclasses to
do something useful with this message. Whatever was passed in the
constructor as *remoteaddr* will be available as the :attr:`_remoteaddr`
attribute. *peer* is the remote host's address, *mailfrom* is the envelope
originator, *rcpttos* are the envelope recipients and *data* is a string
- containing the contents of the e-mail (which should be in :rfc:`2822`
+ containing the contents of the e-mail (which should be in :rfc:`5321`
format).
+ If the *decode_data* constructor keyword is set to ``True``, the *data*
+ argument will be a unicode string. If it is set to ``False``, it
+ will be a bytes object.
+
+ *kwargs* is a dictionary containing additional information. It is empty
+ unless at least one of ``decode_data=False`` or ``enable_SMTPUTF8=True``
+ was given as an init parameter, in which case it contains the following
+ keys:
+
+ *mail_options*:
+ a list of all received parameters to the ``MAIL``
+ command (the elements are uppercase strings; example:
+ ``['BODY=8BITMIME', 'SMTPUTF8']``).
+
+ *rcpt_options*:
+ same as *mail_options* but for the ``RCPT`` command.
+ Currently no ``RCPT TO`` options are supported, so for now
+ this will always be an empty list.
+
+ Implementations of ``process_message`` should use the ``**kwargs``
+ signature to accept arbitrary keyword arguments, since future feature
+ enhancements may add keys to the kwargs dictionary.
+
+ Return ``None`` to request a normal ``250 Ok`` response; otherwise
+ return the desired response string in :RFC:`5321` format.
+
.. attribute:: channel_class
Override this in subclasses to use a custom :class:`SMTPChannel` for
managing SMTP clients.
- .. versionchanged:: 3.4
- The *map* argument was added.
+ .. versionadded:: 3.4
+ The *map* constructor argument.
+
+ .. versionchanged:: 3.5
+ *localaddr* and *remoteaddr* may now contain IPv6 addresses.
+
+ .. versionadded:: 3.5
+ the *decode_data* and *enable_SMTPUTF8* constructor arguments, and the
+ *kwargs* argument to :meth:`process_message` when one or more of these is
+ specified.
DebuggingServer Objects
@@ -97,7 +150,7 @@ SMTPChannel Objects
-------------------
.. class:: SMTPChannel(server, conn, addr, data_size_limit=33554432,\
- map=None))
+ map=None, enable_SMTPUTF8=False, decode_data=True)
Create a new :class:`SMTPChannel` object which manages the communication
between the server and a single SMTP client.
@@ -108,11 +161,24 @@ SMTPChannel Objects
accepted in a ``DATA`` command. A value of ``None`` or ``0`` means no
limit.
+ *enable_SMTPUTF8* determins whether the ``SMTPUTF8`` extension (as defined
+ in :RFC:`6531`) should be enabled. The default is ``False``. A
+ :exc:`ValueError` is raised if both *enable_SMTPUTF8* and *decode_data* are
+ set to ``True`` at the same time.
+
A dictionary can be specified in *map* to avoid using a global socket map.
+ *decode_data* specifies whether the data portion of the SMTP transaction
+ should be decoded using UTF-8. The default is ``True`` for backward
+ compatibility reasons, but will change to ``False`` in Python 3.6. Specify
+ the keyword value explicitly to avoid the :exc:`DeprecationWarning`.
+
To use a custom SMTPChannel implementation you need to override the
:attr:`SMTPServer.channel_class` of your :class:`SMTPServer`.
+ .. versionchanged:: 3.5
+ the *decode_data* and *enable_SMTPUTF8* arguments were added.
+
The :class:`SMTPChannel` has the following instance variables:
.. attribute:: smtp_server
diff --git a/Doc/library/smtplib.rst b/Doc/library/smtplib.rst
index b87ad5f326..bdf3805106 100644
--- a/Doc/library/smtplib.rst
+++ b/Doc/library/smtplib.rst
@@ -3,15 +3,15 @@
.. module:: smtplib
:synopsis: SMTP protocol client (requires sockets).
+
.. sectionauthor:: Eric S. Raymond <esr@snark.thyrsus.com>
+**Source code:** :source:`Lib/smtplib.py`
.. index::
pair: SMTP; protocol
single: Simple Mail Transfer Protocol
-**Source code:** :source:`Lib/smtplib.py`
-
--------------
The :mod:`smtplib` module defines an SMTP client session object that can be used
@@ -33,7 +33,7 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
*timeout* parameter specifies a timeout in seconds for blocking operations
like the connection attempt (if not specified, the global default timeout
setting will be used). If the timeout expires, :exc:`socket.timeout` is
- raised. The optional source_address parameter allows to bind
+ raised. The optional source_address parameter allows binding
to some specific source address in a machine with multiple network
interfaces, and/or to some specific source TCP port. It takes a 2-tuple
(host, port), for the socket to bind to as its source address before
@@ -61,6 +61,10 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
.. versionchanged:: 3.3
source_address argument was added.
+ .. versionadded:: 3.5
+ The SMTPUTF8 extension (:rfc:`6531`) is now supported.
+
+
.. class:: SMTP_SSL(host='', port=0, local_hostname=None, keyfile=None, \
certfile=None [, timeout], context=None, \
source_address=None)
@@ -72,7 +76,7 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions).
*port* is zero, the standard SMTP-over-SSL port (465) is used. The optional
arguments *local_hostname*, *timeout* and *source_address* have the same
meaning as they do in the :class:`SMTP` class. *context*, also optional,
- can contain a :class:`~ssl.SSLContext` and allows to configure various
+ can contain a :class:`~ssl.SSLContext` and allows configuring various
aspects of the secure connection. Please read :ref:`ssl-security` for
best practices.
@@ -161,6 +165,13 @@ A nice selection of exceptions is defined as well:
The server refused our ``HELO`` message.
+.. exception:: SMTPNotSupportedError
+
+ The command or option attempted is not supported by the server.
+
+ .. versionadded:: 3.5
+
+
.. exception:: SMTPAuthenticationError
SMTP authentication went wrong. Most probably the server didn't accept the
@@ -189,8 +200,12 @@ An :class:`SMTP` instance has the following methods:
.. method:: SMTP.set_debuglevel(level)
- Set the debug output level. A true value for *level* results in debug messages
- for connection and for all messages sent to and received from the server.
+ Set the debug output level. A value of 1 or ``True`` for *level* results in
+ debug messages for connection and for all messages sent to and received from
+ the server. A value of 2 for *level* results in these messages being
+ timestamped.
+
+ .. versionchanged:: 3.5 Added debuglevel 2.
.. method:: SMTP.docmd(cmd, args='')
@@ -240,8 +255,7 @@ An :class:`SMTP` instance has the following methods:
the server is stored as the :attr:`ehlo_resp` attribute, :attr:`does_esmtp`
is set to true or false depending on whether the server supports ESMTP, and
:attr:`esmtp_features` will be a dictionary containing the names of the
- SMTP service extensions this server supports, and their
- parameters (if any).
+ SMTP service extensions this server supports, and their parameters (if any).
Unless you wish to use :meth:`has_extn` before sending mail, it should not be
necessary to call this method explicitly. It will be implicitly called by
@@ -274,7 +288,7 @@ An :class:`SMTP` instance has the following methods:
Many sites disable SMTP ``VRFY`` in order to foil spammers.
-.. method:: SMTP.login(user, password)
+.. method:: SMTP.login(user, password, *, initial_response_ok=True)
Log in on an SMTP server that requires authentication. The arguments are the
username and the password to authenticate with. If there has been no previous
@@ -288,9 +302,68 @@ An :class:`SMTP` instance has the following methods:
:exc:`SMTPAuthenticationError`
The server didn't accept the username/password combination.
+ :exc:`SMTPNotSupportedError`
+ The ``AUTH`` command is not supported by the server.
+
:exc:`SMTPException`
No suitable authentication method was found.
+ Each of the authentication methods supported by :mod:`smtplib` are tried in
+ turn if they are advertised as supported by the server. See :meth:`auth`
+ for a list of supported authentication methods. *initial_response_ok* is
+ passed through to :meth:`auth`.
+
+ Optional keyword argument *initial_response_ok* specifies whether, for
+ authentication methods that support it, an "initial response" as specified
+ in :rfc:`4954` can be sent along with the ``AUTH`` command, rather than
+ requiring a challenge/response.
+
+ .. versionchanged:: 3.5
+ :exc:`SMTPNotSupportedError` may be raised, and the
+ *initial_response_ok* parameter was added.
+
+
+.. method:: SMTP.auth(mechanism, authobject, *, initial_response_ok=True)
+
+ Issue an ``SMTP`` ``AUTH`` command for the specified authentication
+ *mechanism*, and handle the challenge response via *authobject*.
+
+ *mechanism* specifies which authentication mechanism is to
+ be used as argument to the ``AUTH`` command; the valid values are
+ those listed in the ``auth`` element of :attr:`esmtp_features`.
+
+ *authobject* must be a callable object taking an optional single argument:
+
+ data = authobject(challenge=None)
+
+ If optional keyword argument *initial_response_ok* is true,
+ ``authobject()`` will be called first with no argument. It can return the
+ :rfc:`4954` "initial response" bytes which will be encoded and sent with
+ the ``AUTH`` command as below. If the ``authobject()`` does not support an
+ initial response (e.g. because it requires a challenge), it should return
+ None when called with ``challenge=None``. If *initial_response_ok* is
+ false, then ``authobject()`` will not be called first with None.
+
+ If the initial response check returns None, or if *initial_response_ok* is
+ false, ``authobject()`` will be called to process the server's challenge
+ response; the *challenge* argument it is passed will be a ``bytes``. It
+ should return ``bytes`` *data* that will be base64 encoded and sent to the
+ server.
+
+ The ``SMTP`` class provides ``authobjects`` for the ``CRAM-MD5``, ``PLAIN``,
+ and ``LOGIN`` mechanisms; they are named ``SMTP.auth_cram_md5``,
+ ``SMTP.auth_plain``, and ``SMTP.auth_login`` respectively. They all require
+ that the ``user`` and ``password`` properties of the ``SMTP`` instance are
+ set to appropriate values.
+
+ User code does not normally need to call ``auth`` directly, but can instead
+ call the :meth:`login` method, which will try each of the above mechanisms
+ in turn, in the order listed. ``auth`` is exposed to facilitate the
+ implementation of authentication methods not (or not yet) supported
+ directly by :mod:`smtplib`.
+
+ .. versionadded:: 3.5
+
.. method:: SMTP.starttls(keyfile=None, certfile=None, context=None)
@@ -310,7 +383,7 @@ An :class:`SMTP` instance has the following methods:
:exc:`SMTPHeloError`
The server didn't reply properly to the ``HELO`` greeting.
- :exc:`SMTPException`
+ :exc:`SMTPNotSupportedError`
The server does not support the STARTTLS extension.
:exc:`RuntimeError`
@@ -324,6 +397,11 @@ An :class:`SMTP` instance has the following methods:
:attr:`SSLContext.check_hostname` and *Server Name Indicator* (see
:data:`~ssl.HAS_SNI`).
+ .. versionchanged:: 3.5
+ The error raised for lack of STARTTLS support is now the
+ :exc:`SMTPNotSupportedError` subclass instead of the base
+ :exc:`SMTPException`.
+
.. method:: SMTP.sendmail(from_addr, to_addrs, msg, mail_options=[], rcpt_options=[])
@@ -360,6 +438,9 @@ An :class:`SMTP` instance has the following methods:
recipient that was refused. Each entry contains a tuple of the SMTP error code
and the accompanying error message sent by the server.
+ If ``SMTPUTF8`` is included in *mail_options*, and the server supports it,
+ *from_addr* and *to_addr* may contain non-ASCII characters.
+
This method may raise the following exceptions:
:exc:`SMTPRecipientsRefused`
@@ -378,12 +459,20 @@ An :class:`SMTP` instance has the following methods:
The server replied with an unexpected error code (other than a refusal of a
recipient).
+ :exc:`SMTPNotSupportedError`
+ ``SMTPUTF8`` was given in the *mail_options* but is not supported by the
+ server.
+
Unless otherwise noted, the connection will be open even after an exception is
raised.
.. versionchanged:: 3.2
*msg* may be a byte string.
+ .. versionchanged:: 3.5
+ ``SMTPUTF8`` support added, and :exc:`SMTPNotSupportedError` may be
+ raised if ``SMTPUTF8`` is specified but the server does not support it.
+
.. method:: SMTP.send_message(msg, from_addr=None, to_addrs=None, \
mail_options=[], rcpt_options=[])
@@ -395,7 +484,7 @@ An :class:`SMTP` instance has the following methods:
If *from_addr* is ``None`` or *to_addrs* is ``None``, ``send_message`` fills
those arguments with addresses extracted from the headers of *msg* as
- specified in :rfc:`2822`\: *from_addr* is set to the :mailheader:`Sender`
+ specified in :rfc:`5322`\: *from_addr* is set to the :mailheader:`Sender`
field if it is present, and otherwise to the :mailheader:`From` field.
*to_adresses* combines the values (if any) of the :mailheader:`To`,
:mailheader:`Cc`, and :mailheader:`Bcc` fields from *msg*. If exactly one
@@ -410,10 +499,18 @@ An :class:`SMTP` instance has the following methods:
calls :meth:`sendmail` to transmit the resulting message. Regardless of the
values of *from_addr* and *to_addrs*, ``send_message`` does not transmit any
:mailheader:`Bcc` or :mailheader:`Resent-Bcc` headers that may appear
- in *msg*.
+ in *msg*. If any of the addresses in *from_addr* and *to_addrs* contain
+ non-ASCII characters and the server does not advertise ``SMTPUTF8`` support,
+ an :exc:`SMTPNotSupported` error is raised. Otherwise the ``Message`` is
+ serialized with a clone of its :mod:`~email.policy` with the
+ :attr:`~email.policy.EmailPolicy.utf8` attribute set to ``True``, and
+ ``SMTPUTF8`` and ``BODY=8BITMIME`` are added to *mail_options*.
.. versionadded:: 3.2
+ .. versionadded:: 3.5
+ Support for internationalized addresses (``SMTPUTF8``).
+
.. method:: SMTP.quit()
diff --git a/Doc/library/sndhdr.rst b/Doc/library/sndhdr.rst
index f36df68703..6bfa9a9fd2 100644
--- a/Doc/library/sndhdr.rst
+++ b/Doc/library/sndhdr.rst
@@ -3,21 +3,23 @@
.. module:: sndhdr
:synopsis: Determine type of a sound file.
+
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
.. Based on comments in the module source file.
+**Source code:** :source:`Lib/sndhdr.py`
+
.. index::
single: A-LAW
single: u-LAW
-**Source code:** :source:`Lib/sndhdr.py`
-
--------------
The :mod:`sndhdr` provides utility functions which attempt to determine the type
of sound data which is in a file. When these functions are able to determine
-what type of sound data is stored in a file, they return a tuple ``(type,
-sampling_rate, channels, frames, bits_per_sample)``. The value for *type*
+what type of sound data is stored in a file, they return a
+:func:`~collections.namedtuple`, containing five attributes: (``filetype``,
+``framerate``, ``nchannels``, ``nframes``, ``sampwidth``). The value for *type*
indicates the data type and will be one of the strings ``'aifc'``, ``'aiff'``,
``'au'``, ``'hcom'``, ``'sndr'``, ``'sndt'``, ``'voc'``, ``'wav'``, ``'8svx'``,
``'sb'``, ``'ub'``, or ``'ul'``. The *sampling_rate* will be either the actual
@@ -31,13 +33,19 @@ be the sample size in bits or ``'A'`` for A-LAW or ``'U'`` for u-LAW.
.. function:: what(filename)
Determines the type of sound data stored in the file *filename* using
- :func:`whathdr`. If it succeeds, returns a tuple as described above, otherwise
+ :func:`whathdr`. If it succeeds, returns a namedtuple as described above, otherwise
``None`` is returned.
+ .. versionchanged:: 3.5
+ Result changed from a tuple to a namedtuple.
+
.. function:: whathdr(filename)
Determines the type of sound data stored in a file based on the file header.
- The name of the file is given by *filename*. This function returns a tuple as
+ The name of the file is given by *filename*. This function returns a namedtuple as
described above on success, or ``None``.
+ .. versionchanged:: 3.5
+ Result changed from a tuple to a namedtuple.
+
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index 8577c3c908..48311c5820 100644
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -4,6 +4,9 @@
.. module:: socket
:synopsis: Low-level networking interface.
+**Source code:** :source:`Lib/socket.py`
+
+--------------
This module provides access to the BSD *socket* interface. It is available on
all modern Unix systems, Windows, MacOS, and probably additional platforms.
@@ -46,17 +49,20 @@ created. Socket addresses are represented as follows:
- The address of an :const:`AF_UNIX` socket bound to a file system node
is represented as a string, using the file system encoding and the
``'surrogateescape'`` error handler (see :pep:`383`). An address in
- Linux's abstract namespace is returned as a :class:`bytes` object with
+ Linux's abstract namespace is returned as a :term:`bytes-like object` with
an initial null byte; note that sockets in this namespace can
communicate with normal file system sockets, so programs intended to
run on Linux may need to deal with both types of address. A string or
- :class:`bytes` object can be used for either type of address when
+ bytes-like object can be used for either type of address when
passing it as an argument.
.. versionchanged:: 3.3
Previously, :const:`AF_UNIX` socket paths were assumed to use UTF-8
encoding.
+ .. versionchanged:: 3.5
+ Writable :term:`bytes-like object` is now accepted.
+
- A pair ``(host, port)`` is used for the :const:`AF_INET` address family,
where *host* is a string representing either a hostname in Internet domain
notation like ``'daring.cwi.nl'`` or an IPv4 address like ``'100.50.200.5'``,
@@ -298,6 +304,18 @@ Constants
.. versionadded:: 3.4
+.. data:: CAN_RAW_FD_FRAMES
+
+ Enables CAN FD support in a CAN_RAW socket. This is disabled by default.
+ This allows your application to send both CAN and CAN FD frames; however,
+ you one must accept both CAN and CAN FD frames when reading from the socket.
+
+ This constant is documented in the Linux documentation.
+
+ Availability: Linux >= 3.6.
+
+ .. versionadded:: 3.5
+
.. data:: AF_RDS
PF_RDS
SOL_RDS
@@ -394,7 +412,6 @@ The following functions all create :ref:`socket objects <socket-objects>`.
type, and protocol number. Address family, socket type, and protocol number are
as for the :func:`.socket` function above. The default family is :const:`AF_UNIX`
if defined on the platform; otherwise, the default is :const:`AF_INET`.
- Availability: Unix.
The newly created sockets are :ref:`non-inheritable <fd_inheritance>`.
@@ -405,6 +422,9 @@ The following functions all create :ref:`socket objects <socket-objects>`.
.. versionchanged:: 3.4
The returned sockets are now non-inheritable.
+ .. versionchanged:: 3.5
+ Windows support added.
+
.. function:: create_connection(address[, timeout[, source_address]])
@@ -428,9 +448,6 @@ The following functions all create :ref:`socket objects <socket-objects>`.
.. versionchanged:: 3.2
*source_address* was added.
- .. versionchanged:: 3.2
- support for the :keyword:`with` statement was added.
-
.. function:: fromfd(fd, family, type, proto=0)
@@ -551,11 +568,6 @@ The :mod:`socket` module also offers various network-related services:
Return a string containing the hostname of the machine where the Python
interpreter is currently executing.
- If you want to know the current machine's IP address, you may want to use
- ``gethostbyname(gethostname())``. This operation assumes that there is a
- valid address-to-host mapping for the host, and the assumption does not
- always hold.
-
Note: :func:`gethostname` doesn't always return the fully qualified domain
name; use :func:`getfqdn` for that.
@@ -651,8 +663,8 @@ The :mod:`socket` module also offers various network-related services:
.. function:: inet_ntoa(packed_ip)
- Convert a 32-bit packed IPv4 address (a bytes object four characters in
- length) to its standard dotted-quad string representation (for example,
+ Convert a 32-bit packed IPv4 address (a :term:`bytes-like object` four
+ bytes in length) to its standard dotted-quad string representation (for example,
'123.45.67.89'). This is useful when conversing with a program that uses the
standard C library and needs objects of type :c:type:`struct in_addr`, which
is the C type for the 32-bit packed binary data this function takes as an
@@ -663,6 +675,9 @@ The :mod:`socket` module also offers various network-related services:
support IPv6, and :func:`inet_ntop` should be used instead for IPv4/v6 dual
stack support.
+ .. versionchanged:: 3.5
+ Writable :term:`bytes-like object` is now accepted.
+
.. function:: inet_pton(address_family, ip_string)
@@ -685,15 +700,16 @@ The :mod:`socket` module also offers various network-related services:
.. function:: inet_ntop(address_family, packed_ip)
- Convert a packed IP address (a bytes object of some number of characters) to its
- standard, family-specific string representation (for example, ``'7.10.0.5'`` or
- ``'5aef:2b::8'``). :func:`inet_ntop` is useful when a library or network protocol
- returns an object of type :c:type:`struct in_addr` (similar to :func:`inet_ntoa`)
- or :c:type:`struct in6_addr`.
+ Convert a packed IP address (a :term:`bytes-like object` of some number of
+ bytes) to its standard, family-specific string representation (for
+ example, ``'7.10.0.5'`` or ``'5aef:2b::8'``).
+ :func:`inet_ntop` is useful when a library or network protocol returns an
+ object of type :c:type:`struct in_addr` (similar to :func:`inet_ntoa`) or
+ :c:type:`struct in6_addr`.
Supported values for *address_family* are currently :const:`AF_INET` and
- :const:`AF_INET6`. If the string *packed_ip* is not the correct length for the
- specified address family, :exc:`ValueError` will be raised.
+ :const:`AF_INET6`. If the bytes object *packed_ip* is not the correct
+ length for the specified address family, :exc:`ValueError` will be raised.
:exc:`OSError` is raised for errors from the call to :func:`inet_ntop`.
Availability: Unix (maybe not all platforms), Windows.
@@ -701,6 +717,9 @@ The :mod:`socket` module also offers various network-related services:
.. versionchanged:: 3.4
Windows support added
+ .. versionchanged:: 3.5
+ Writable :term:`bytes-like object` is now accepted.
+
..
XXX: Are sendmsg(), recvmsg() and CMSG_*() available on any
@@ -812,6 +831,10 @@ Socket objects have the following methods. Except for
:meth:`~socket.makefile`, these correspond to Unix system calls applicable
to sockets.
+.. versionchanged:: 3.2
+ Support for the :term:`context manager` protocol was added. Exiting the
+ context manager is equivalent to calling :meth:`~socket.close`.
+
.. method:: socket.accept()
@@ -825,6 +848,11 @@ to sockets.
.. versionchanged:: 3.4
The socket is now non-inheritable.
+ .. versionchanged:: 3.5
+ If the system call is interrupted and the signal handler does not raise
+ an exception, the method now retries the system call instead of raising
+ an :exc:`InterruptedError` exception (see :pep:`475` for the rationale).
+
.. method:: socket.bind(address)
@@ -857,6 +885,19 @@ to sockets.
Connect to a remote socket at *address*. (The format of *address* depends on the
address family --- see above.)
+ If the connection is interrupted by a signal, the method waits until the
+ connection completes, or raise a :exc:`socket.timeout` on timeout, if the
+ signal handler doesn't raise an exception and the socket is blocking or has
+ a timeout. For non-blocking sockets, the method raises an
+ :exc:`InterruptedError` exception if the connection is interrupted by a
+ signal (or the exception raised by the signal handler).
+
+ .. versionchanged:: 3.5
+ The method now waits until the connection completes instead of raising an
+ :exc:`InterruptedError` exception if the connection is interrupted by a
+ signal, the signal handler doesn't raise an exception and the socket is
+ blocking or has a timeout (see the :pep:`475` for the rationale).
+
.. method:: socket.connect_ex(address)
@@ -889,14 +930,13 @@ to sockets.
.. method:: socket.fileno()
- Return the socket's file descriptor (a small integer). This is useful with
- :func:`select.select`.
+ Return the socket's file descriptor (a small integer), or -1 on failure. This
+ is useful with :func:`select.select`.
Under Windows the small integer returned by this method cannot be used where a
file descriptor can be used (such as :func:`os.fdopen`). Unix does not have
this limitation.
-
.. method:: socket.get_inheritable()
Get the :ref:`inheritable flag <fd_inheritance>` of the socket's file
@@ -946,18 +986,21 @@ to sockets.
The :meth:`ioctl` method is a limited interface to the WSAIoctl system
interface. Please refer to the `Win32 documentation
- <http://msdn.microsoft.com/en-us/library/ms741621%28VS.85%29.aspx>`_ for more
+ <https://msdn.microsoft.com/en-us/library/ms741621%28VS.85%29.aspx>`_ for more
information.
On other platforms, the generic :func:`fcntl.fcntl` and :func:`fcntl.ioctl`
functions may be used; they accept a socket object as their first argument.
-.. method:: socket.listen(backlog)
+.. method:: socket.listen([backlog])
- Listen for connections made to the socket. The *backlog* argument specifies the
- maximum number of queued connections and should be at least 0; the maximum value
- is system-dependent (usually 5), the minimum value is forced to 0.
+ Enable a server to accept connections. If *backlog* is specified, it must
+ be at least 0 (if it is lower, it is set to 0); it specifies the number of
+ unaccepted connections that the system will allow before refusing new
+ connections. If not specified, a default reasonable value is chosen.
+ .. versionchanged:: 3.5
+ The *backlog* parameter is now optional.
.. method:: socket.makefile(mode='r', buffering=None, *, encoding=None, \
errors=None, newline=None)
@@ -966,7 +1009,8 @@ to sockets.
Return a :term:`file object` associated with the socket. The exact returned
type depends on the arguments given to :meth:`makefile`. These arguments are
- interpreted the same way as by the built-in :func:`open` function.
+ interpreted the same way as by the built-in :func:`open` function, except
+ the only supported *mode* values are ``'r'`` (default), ``'w'`` and ``'b'``.
The socket must be in blocking mode; it can have a timeout, but the file
object's internal buffer may end up in an inconsistent state if a timeout
@@ -995,6 +1039,11 @@ to sockets.
For best match with hardware and network realities, the value of *bufsize*
should be a relatively small power of 2, for example, 4096.
+ .. versionchanged:: 3.5
+ If the system call is interrupted and the signal handler does not raise
+ an exception, the method now retries the system call instead of raising
+ an :exc:`InterruptedError` exception (see :pep:`475` for the rationale).
+
.. method:: socket.recvfrom(bufsize[, flags])
@@ -1004,6 +1053,11 @@ to sockets.
:manpage:`recv(2)` for the meaning of the optional argument *flags*; it defaults
to zero. (The format of *address* depends on the address family --- see above.)
+ .. versionchanged:: 3.5
+ If the system call is interrupted and the signal handler does not raise
+ an exception, the method now retries the system call instead of raising
+ an :exc:`InterruptedError` exception (see :pep:`475` for the rationale).
+
.. method:: socket.recvmsg(bufsize[, ancbufsize[, flags]])
@@ -1070,6 +1124,11 @@ to sockets.
.. versionadded:: 3.3
+ .. versionchanged:: 3.5
+ If the system call is interrupted and the signal handler does not raise
+ an exception, the method now retries the system call instead of raising
+ an :exc:`InterruptedError` exception (see :pep:`475` for the rationale).
+
.. method:: socket.recvmsg_into(buffers[, ancbufsize[, flags]])
@@ -1136,6 +1195,11 @@ to sockets.
application needs to attempt delivery of the remaining data. For further
information on this topic, consult the :ref:`socket-howto`.
+ .. versionchanged:: 3.5
+ If the system call is interrupted and the signal handler does not raise
+ an exception, the method now retries the system call instead of raising
+ an :exc:`InterruptedError` exception (see :pep:`475` for the rationale).
+
.. method:: socket.sendall(bytes[, flags])
@@ -1146,6 +1210,15 @@ to sockets.
success. On error, an exception is raised, and there is no way to determine how
much data, if any, was successfully sent.
+ .. versionchanged:: 3.5
+ The socket timeout is no more reset each time data is sent successfuly.
+ The socket timeout is now the maximum total duration to send all data.
+
+ .. versionchanged:: 3.5
+ If the system call is interrupted and the signal handler does not raise
+ an exception, the method now retries the system call instead of raising
+ an :exc:`InterruptedError` exception (see :pep:`475` for the rationale).
+
.. method:: socket.sendto(bytes, address)
socket.sendto(bytes, flags, address)
@@ -1156,6 +1229,11 @@ to sockets.
bytes sent. (The format of *address* depends on the address family --- see
above.)
+ .. versionchanged:: 3.5
+ If the system call is interrupted and the signal handler does not raise
+ an exception, the method now retries the system call instead of raising
+ an :exc:`InterruptedError` exception (see :pep:`475` for the rationale).
+
.. method:: socket.sendmsg(buffers[, ancdata[, flags[, address]]])
@@ -1192,6 +1270,26 @@ to sockets.
.. versionadded:: 3.3
+ .. versionchanged:: 3.5
+ If the system call is interrupted and the signal handler does not raise
+ an exception, the method now retries the system call instead of raising
+ an :exc:`InterruptedError` exception (see :pep:`475` for the rationale).
+
+.. method:: socket.sendfile(file, offset=0, count=None)
+
+ Send a file until EOF is reached by using high-performance
+ :mod:`os.sendfile` and return the total number of bytes which were sent.
+ *file* must be a regular file object opened in binary mode. If
+ :mod:`os.sendfile` is not available (e.g. Windows) or *file* is not a
+ regular file :meth:`send` will be used instead. *offset* tells from where to
+ start reading the file. If specified, *count* is the total number of bytes
+ to transmit as opposed to sending the file until EOF is reached. File
+ position is updated on return or also in case of error in which case
+ :meth:`file.tell() <io.IOBase.tell>` can be used to figure out the number of
+ bytes which were sent. The socket must be of :const:`SOCK_STREAM` type. Non-
+ blocking sockets are not supported.
+
+ .. versionadded:: 3.5
.. method:: socket.set_inheritable(inheritable)
@@ -1231,11 +1329,15 @@ to sockets.
Set the value of the given socket option (see the Unix manual page
:manpage:`setsockopt(2)`). The needed symbolic constants are defined in the
- :mod:`socket` module (:const:`SO_\*` etc.). The value can be an integer or a
- bytes object representing a buffer. In the latter case it is up to the caller to
+ :mod:`socket` module (:const:`SO_\*` etc.). The value can be an integer or
+ a :term:`bytes-like object` representing a buffer. In the latter case it is
+ up to the caller to
ensure that the bytestring contains the proper bits (see the optional built-in
module :mod:`struct` for a way to encode C structures as bytestrings).
+ .. versionchanged:: 3.5
+ Writable :term:`bytes-like object` is now accepted.
+
.. method:: socket.shutdown(how)
@@ -1358,16 +1460,16 @@ The first two examples support IPv4 only. ::
HOST = '' # Symbolic name meaning all available interfaces
PORT = 50007 # Arbitrary non-privileged port
- s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- s.bind((HOST, PORT))
- s.listen(1)
- conn, addr = s.accept()
- print('Connected by', addr)
- while True:
- data = conn.recv(1024)
- if not data: break
- conn.sendall(data)
- conn.close()
+ with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
+ s.bind((HOST, PORT))
+ s.listen(1)
+ conn, addr = s.accept()
+ with conn:
+ print('Connected by', addr)
+ while True:
+ data = conn.recv(1024)
+ if not data: break
+ conn.sendall(data)
::
@@ -1376,11 +1478,10 @@ The first two examples support IPv4 only. ::
HOST = 'daring.cwi.nl' # The remote host
PORT = 50007 # The same port as used by the server
- s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- s.connect((HOST, PORT))
- s.sendall(b'Hello, world')
- data = s.recv(1024)
- s.close()
+ with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
+ s.connect((HOST, PORT))
+ s.sendall(b'Hello, world')
+ data = s.recv(1024)
print('Received', repr(data))
The next two examples are identical to the above two, but support both IPv4 and
@@ -1417,12 +1518,12 @@ sends traffic to the first one connected successfully. ::
print('could not open socket')
sys.exit(1)
conn, addr = s.accept()
- print('Connected by', addr)
- while True:
- data = conn.recv(1024)
- if not data: break
- conn.send(data)
- conn.close()
+ with conn:
+ print('Connected by', addr)
+ while True:
+ data = conn.recv(1024)
+ if not data: break
+ conn.send(data)
::
@@ -1450,9 +1551,9 @@ sends traffic to the first one connected successfully. ::
if s is None:
print('could not open socket')
sys.exit(1)
- s.sendall(b'Hello, world')
- data = s.recv(1024)
- s.close()
+ with s:
+ s.sendall(b'Hello, world')
+ data = s.recv(1024)
print('Received', repr(data))
diff --git a/Doc/library/socketserver.rst b/Doc/library/socketserver.rst
index 3e49af6bba..98d2c46701 100644
--- a/Doc/library/socketserver.rst
+++ b/Doc/library/socketserver.rst
@@ -10,16 +10,34 @@
The :mod:`socketserver` module simplifies the task of writing network servers.
-There are four basic server classes: :class:`TCPServer` uses the Internet TCP
-protocol, which provides for continuous streams of data between the client and
-server. :class:`UDPServer` uses datagrams, which are discrete packets of
-information that may arrive out of order or be lost while in transit. The more
-infrequently used :class:`UnixStreamServer` and :class:`UnixDatagramServer`
-classes are similar, but use Unix domain sockets; they're not available on
-non-Unix platforms. For more details on network programming, consult a book
-such as
-W. Richard Steven's UNIX Network Programming or Ralph Davis's Win32 Network
-Programming.
+There are four basic concrete server classes:
+
+
+.. class:: TCPServer(server_address, RequestHandlerClass, bind_and_activate=True)
+
+ This uses the Internet TCP protocol, which provides for
+ continuous streams of data between the client and server.
+ If *bind_and_activate* is true, the constructor automatically attempts to
+ invoke :meth:`~BaseServer.server_bind` and
+ :meth:`~BaseServer.server_activate`. The other parameters are passed to
+ the :class:`BaseServer` base class.
+
+
+.. class:: UDPServer(server_address, RequestHandlerClass, bind_and_activate=True)
+
+ This uses datagrams, which are discrete packets of information that may
+ arrive out of order or be lost while in transit. The parameters are
+ the same as for :class:`TCPServer`.
+
+
+.. class:: UnixStreamServer(server_address, RequestHandlerClass, bind_and_activate=True)
+ UnixDatagramServer(server_address, RequestHandlerClass, bind_and_activate=True)
+
+ These more infrequently used classes are similar to the TCP and
+ UDP classes, but use Unix domain sockets; they're not available on
+ non-Unix platforms. The parameters are the same as for
+ :class:`TCPServer`.
+
These four classes process requests :dfn:`synchronously`; each request must be
completed before the next request can be started. This isn't suitable if each
@@ -31,10 +49,12 @@ support asynchronous behaviour.
Creating a server requires several steps. First, you must create a request
handler class by subclassing the :class:`BaseRequestHandler` class and
-overriding its :meth:`handle` method; this method will process incoming
+overriding its :meth:`~BaseRequestHandler.handle` method;
+this method will process incoming
requests. Second, you must instantiate one of the server classes, passing it
the server's address and the request handler class. Then call the
-:meth:`handle_request` or :meth:`serve_forever` method of the server object to
+:meth:`~BaseServer.handle_request` or
+:meth:`~BaseServer.serve_forever` method of the server object to
process one or many requests. Finally, call :meth:`~BaseServer.server_close`
to close the socket.
@@ -76,18 +96,33 @@ Note that :class:`UnixDatagramServer` derives from :class:`UDPServer`, not from
stream server is the address family, which is simply repeated in both Unix
server classes.
-Forking and threading versions of each type of server can be created using the
-:class:`ForkingMixIn` and :class:`ThreadingMixIn` mix-in classes. For instance,
-a threading UDP server class is created as follows::
- class ThreadingUDPServer(ThreadingMixIn, UDPServer): pass
+.. class:: ForkingMixIn
+ ThreadingMixIn
+
+ Forking and threading versions of each type of server can be created
+ using these mix-in classes. For instance, :class:`ThreadingUDPServer`
+ is created as follows::
+
+ class ThreadingUDPServer(ThreadingMixIn, UDPServer):
+ pass
+
+ The mix-in class comes first, since it overrides a method defined in
+ :class:`UDPServer`. Setting the various attributes also changes the
+ behavior of the underlying server mechanism.
+
+
+.. class:: ForkingTCPServer
+ ForkingUDPServer
+ ThreadingTCPServer
+ ThreadingUDPServer
+
+ These classes are pre-defined using the mix-in classes.
-The mix-in class must come first, since it overrides a method defined in
-:class:`UDPServer`. Setting the various attributes also change the
-behavior of the underlying server mechanism.
To implement a service, you must derive a class from :class:`BaseRequestHandler`
-and redefine its :meth:`handle` method. You can then run various versions of
+and redefine its :meth:`~BaseRequestHandler.handle` method.
+You can then run various versions of
the service by combining one of the server classes with your request handler
class. The request handler class must be different for datagram or stream
services. This can be hidden by using the handler subclasses
@@ -109,12 +144,12 @@ has requested. Here a threading or forking server is appropriate.
In some cases, it may be appropriate to process part of a request synchronously,
but to finish processing in a forked child depending on the request data. This
can be implemented by using a synchronous server and doing an explicit fork in
-the request handler class :meth:`handle` method.
+the request handler class :meth:`~BaseRequestHandler.handle` method.
Another approach to handling multiple simultaneous requests in an environment
that supports neither threads nor :func:`~os.fork` (or where these are too
expensive or inappropriate for the service) is to maintain an explicit table of
-partially finished requests and to use :func:`~select.select` to decide which
+partially finished requests and to use :mod:`selectors` to decide which
request to work on next (or whether to handle a new incoming request). This is
particularly important for stream services where each client can potentially be
connected for a long time (if threads or subprocesses cannot be used). See
@@ -127,227 +162,240 @@ connected for a long time (if threads or subprocesses cannot be used). See
Server Objects
--------------
-.. class:: BaseServer
+.. class:: BaseServer(server_address, RequestHandlerClass)
This is the superclass of all Server objects in the module. It defines the
interface, given below, but does not implement most of the methods, which is
- done in subclasses.
+ done in subclasses. The two parameters are stored in the respective
+ :attr:`server_address` and :attr:`RequestHandlerClass` attributes.
+
+
+ .. method:: fileno()
+ Return an integer file descriptor for the socket on which the server is
+ listening. This function is most commonly passed to :mod:`selectors`, to
+ allow monitoring multiple servers in the same process.
-.. method:: BaseServer.fileno()
- Return an integer file descriptor for the socket on which the server is
- listening. This function is most commonly passed to :func:`select.select`, to
- allow monitoring multiple servers in the same process.
+ .. method:: handle_request()
+ Process a single request. This function calls the following methods in
+ order: :meth:`get_request`, :meth:`verify_request`, and
+ :meth:`process_request`. If the user-provided
+ :meth:`~BaseRequestHandler.handle` method of the
+ handler class raises an exception, the server's :meth:`handle_error` method
+ will be called. If no request is received within :attr:`timeout`
+ seconds, :meth:`handle_timeout` will be called and :meth:`handle_request`
+ will return.
-.. method:: BaseServer.handle_request()
- Process a single request. This function calls the following methods in
- order: :meth:`get_request`, :meth:`verify_request`, and
- :meth:`process_request`. If the user-provided :meth:`handle` method of the
- handler class raises an exception, the server's :meth:`handle_error` method
- will be called. If no request is received within :attr:`self.timeout`
- seconds, :meth:`handle_timeout` will be called and :meth:`handle_request`
- will return.
+ .. method:: serve_forever(poll_interval=0.5)
+ Handle requests until an explicit :meth:`shutdown` request. Poll for
+ shutdown every *poll_interval* seconds.
+ Ignores the :attr:`timeout` attribute. It
+ also calls :meth:`service_actions`, which may be used by a subclass or mixin
+ to provide actions specific to a given service. For example, the
+ :class:`ForkingMixIn` class uses :meth:`service_actions` to clean up zombie
+ child processes.
-.. method:: BaseServer.serve_forever(poll_interval=0.5)
+ .. versionchanged:: 3.3
+ Added ``service_actions`` call to the ``serve_forever`` method.
- Handle requests until an explicit :meth:`shutdown` request. Poll for
- shutdown every *poll_interval* seconds. Ignores :attr:`self.timeout`. It
- also calls :meth:`service_actions`, which may be used by a subclass or mixin
- to provide actions specific to a given service. For example, the
- :class:`ForkingMixIn` class uses :meth:`service_actions` to clean up zombie
- child processes.
- .. versionchanged:: 3.3
- Added ``service_actions`` call to the ``serve_forever`` method.
+ .. method:: service_actions()
+ This is called in the :meth:`serve_forever` loop. This method can be
+ overridden by subclasses or mixin classes to perform actions specific to
+ a given service, such as cleanup actions.
-.. method:: BaseServer.service_actions()
+ .. versionadded:: 3.3
- This is called in the :meth:`serve_forever` loop. This method can be
- overridden by subclasses or mixin classes to perform actions specific to
- a given service, such as cleanup actions.
+ .. method:: shutdown()
- .. versionadded:: 3.3
+ Tell the :meth:`serve_forever` loop to stop and wait until it does.
-.. method:: BaseServer.shutdown()
- Tell the :meth:`serve_forever` loop to stop and wait until it does.
+ .. method:: server_close()
+ Clean up the server. May be overridden.
-.. method:: BaseServer.server_close()
- Clean up the server. May be overridden.
+ .. attribute:: address_family
- .. versionadded:: 2.6
+ The family of protocols to which the server's socket belongs.
+ Common examples are :const:`socket.AF_INET` and :const:`socket.AF_UNIX`.
-.. attribute:: BaseServer.address_family
+ .. attribute:: RequestHandlerClass
- The family of protocols to which the server's socket belongs.
- Common examples are :const:`socket.AF_INET` and :const:`socket.AF_UNIX`.
+ The user-provided request handler class; an instance of this class is created
+ for each request.
-.. attribute:: BaseServer.RequestHandlerClass
+ .. attribute:: server_address
- The user-provided request handler class; an instance of this class is created
- for each request.
+ The address on which the server is listening. The format of addresses varies
+ depending on the protocol family;
+ see the documentation for the :mod:`socket` module
+ for details. For Internet protocols, this is a tuple containing a string giving
+ the address, and an integer port number: ``('127.0.0.1', 80)``, for example.
-.. attribute:: BaseServer.server_address
+ .. attribute:: socket
- The address on which the server is listening. The format of addresses varies
- depending on the protocol family; see the documentation for the socket module
- for details. For Internet protocols, this is a tuple containing a string giving
- the address, and an integer port number: ``('127.0.0.1', 80)``, for example.
+ The socket object on which the server will listen for incoming requests.
-.. attribute:: BaseServer.socket
+ The server classes support the following class variables:
- The socket object on which the server will listen for incoming requests.
+ .. XXX should class variables be covered before instance variables, or vice versa?
+ .. attribute:: allow_reuse_address
-The server classes support the following class variables:
+ Whether the server will allow the reuse of an address. This defaults to
+ :const:`False`, and can be set in subclasses to change the policy.
-.. XXX should class variables be covered before instance variables, or vice versa?
-.. attribute:: BaseServer.allow_reuse_address
+ .. attribute:: request_queue_size
- Whether the server will allow the reuse of an address. This defaults to
- :const:`False`, and can be set in subclasses to change the policy.
+ The size of the request queue. If it takes a long time to process a single
+ request, any requests that arrive while the server is busy are placed into a
+ queue, up to :attr:`request_queue_size` requests. Once the queue is full,
+ further requests from clients will get a "Connection denied" error. The default
+ value is usually 5, but this can be overridden by subclasses.
-.. attribute:: BaseServer.request_queue_size
+ .. attribute:: socket_type
- The size of the request queue. If it takes a long time to process a single
- request, any requests that arrive while the server is busy are placed into a
- queue, up to :attr:`request_queue_size` requests. Once the queue is full,
- further requests from clients will get a "Connection denied" error. The default
- value is usually 5, but this can be overridden by subclasses.
+ The type of socket used by the server; :const:`socket.SOCK_STREAM` and
+ :const:`socket.SOCK_DGRAM` are two common values.
-.. attribute:: BaseServer.socket_type
+ .. attribute:: timeout
- The type of socket used by the server; :const:`socket.SOCK_STREAM` and
- :const:`socket.SOCK_DGRAM` are two common values.
+ Timeout duration, measured in seconds, or :const:`None` if no timeout is
+ desired. If :meth:`handle_request` receives no incoming requests within the
+ timeout period, the :meth:`handle_timeout` method is called.
-.. attribute:: BaseServer.timeout
+ There are various server methods that can be overridden by subclasses of base
+ server classes like :class:`TCPServer`; these methods aren't useful to external
+ users of the server object.
- Timeout duration, measured in seconds, or :const:`None` if no timeout is
- desired. If :meth:`handle_request` receives no incoming requests within the
- timeout period, the :meth:`handle_timeout` method is called.
+ .. XXX should the default implementations of these be documented, or should
+ it be assumed that the user will look at socketserver.py?
+ .. method:: finish_request()
-There are various server methods that can be overridden by subclasses of base
-server classes like :class:`TCPServer`; these methods aren't useful to external
-users of the server object.
+ Actually processes the request by instantiating :attr:`RequestHandlerClass` and
+ calling its :meth:`~BaseRequestHandler.handle` method.
-.. XXX should the default implementations of these be documented, or should
- it be assumed that the user will look at socketserver.py?
-.. method:: BaseServer.finish_request()
+ .. method:: get_request()
- Actually processes the request by instantiating :attr:`RequestHandlerClass` and
- calling its :meth:`handle` method.
+ Must accept a request from the socket, and return a 2-tuple containing the *new*
+ socket object to be used to communicate with the client, and the client's
+ address.
-.. method:: BaseServer.get_request()
+ .. method:: handle_error(request, client_address)
- Must accept a request from the socket, and return a 2-tuple containing the *new*
- socket object to be used to communicate with the client, and the client's
- address.
+ This function is called if the :meth:`~BaseRequestHandler.handle`
+ method of a :attr:`RequestHandlerClass` instance raises
+ an exception. The default action is to print the traceback to
+ standard output and continue handling further requests.
-.. method:: BaseServer.handle_error(request, client_address)
+ .. method:: handle_timeout()
- This function is called if the :attr:`RequestHandlerClass`'s :meth:`handle`
- method raises an exception. The default action is to print the traceback to
- standard output and continue handling further requests.
+ This function is called when the :attr:`timeout` attribute has been set to a
+ value other than :const:`None` and the timeout period has passed with no
+ requests being received. The default action for forking servers is
+ to collect the status of any child processes that have exited, while
+ in threading servers this method does nothing.
-.. method:: BaseServer.handle_timeout()
+ .. method:: process_request(request, client_address)
- This function is called when the :attr:`timeout` attribute has been set to a
- value other than :const:`None` and the timeout period has passed with no
- requests being received. The default action for forking servers is
- to collect the status of any child processes that have exited, while
- in threading servers this method does nothing.
+ Calls :meth:`finish_request` to create an instance of the
+ :attr:`RequestHandlerClass`. If desired, this function can create a new process
+ or thread to handle the request; the :class:`ForkingMixIn` and
+ :class:`ThreadingMixIn` classes do this.
-.. method:: BaseServer.process_request(request, client_address)
+ .. Is there any point in documenting the following two functions?
+ What would the purpose of overriding them be: initializing server
+ instance variables, adding new network families?
- Calls :meth:`finish_request` to create an instance of the
- :attr:`RequestHandlerClass`. If desired, this function can create a new process
- or thread to handle the request; the :class:`ForkingMixIn` and
- :class:`ThreadingMixIn` classes do this.
+ .. method:: server_activate()
+ Called by the server's constructor to activate the server. The default behavior
+ for a TCP server just invokes :meth:`~socket.socket.listen`
+ on the server's socket. May be overridden.
-.. Is there any point in documenting the following two functions?
- What would the purpose of overriding them be: initializing server
- instance variables, adding new network families?
-.. method:: BaseServer.server_activate()
+ .. method:: server_bind()
- Called by the server's constructor to activate the server. The default behavior
- just :meth:`listen`\ s to the server's socket. May be overridden.
+ Called by the server's constructor to bind the socket to the desired address.
+ May be overridden.
-.. method:: BaseServer.server_bind()
+ .. method:: verify_request(request, client_address)
- Called by the server's constructor to bind the socket to the desired address.
- May be overridden.
+ Must return a Boolean value; if the value is :const:`True`, the request will
+ be processed, and if it's :const:`False`, the request will be denied. This
+ function can be overridden to implement access controls for a server. The
+ default implementation always returns :const:`True`.
-.. method:: BaseServer.verify_request(request, client_address)
+Request Handler Objects
+-----------------------
- Must return a Boolean value; if the value is :const:`True`, the request will
- be processed, and if it's :const:`False`, the request will be denied. This
- function can be overridden to implement access controls for a server. The
- default implementation always returns :const:`True`.
+.. class:: BaseRequestHandler
+ This is the superclass of all request handler objects. It defines
+ the interface, given below. A concrete request handler subclass must
+ define a new :meth:`handle` method, and can override any of
+ the other methods. A new instance of the subclass is created for each
+ request.
-RequestHandler Objects
-----------------------
-The request handler class must define a new :meth:`handle` method, and can
-override any of the following methods. A new instance is created for each
-request.
+ .. method:: setup()
+ Called before the :meth:`handle` method to perform any initialization actions
+ required. The default implementation does nothing.
-.. method:: RequestHandler.finish()
- Called after the :meth:`handle` method to perform any clean-up actions
- required. The default implementation does nothing. If :meth:`setup`
- raises an exception, this function will not be called.
+ .. method:: handle()
+ This function must do all the work required to service a request. The
+ default implementation does nothing. Several instance attributes are
+ available to it; the request is available as :attr:`self.request`; the client
+ address as :attr:`self.client_address`; and the server instance as
+ :attr:`self.server`, in case it needs access to per-server information.
-.. method:: RequestHandler.handle()
+ The type of :attr:`self.request` is different for datagram or stream
+ services. For stream services, :attr:`self.request` is a socket object; for
+ datagram services, :attr:`self.request` is a pair of string and socket.
- This function must do all the work required to service a request. The
- default implementation does nothing. Several instance attributes are
- available to it; the request is available as :attr:`self.request`; the client
- address as :attr:`self.client_address`; and the server instance as
- :attr:`self.server`, in case it needs access to per-server information.
- The type of :attr:`self.request` is different for datagram or stream
- services. For stream services, :attr:`self.request` is a socket object; for
- datagram services, :attr:`self.request` is a pair of string and socket.
- However, this can be hidden by using the request handler subclasses
- :class:`StreamRequestHandler` or :class:`DatagramRequestHandler`, which
- override the :meth:`setup` and :meth:`finish` methods, and provide
- :attr:`self.rfile` and :attr:`self.wfile` attributes. :attr:`self.rfile` and
- :attr:`self.wfile` can be read or written, respectively, to get the request
- data or return data to the client.
+ .. method:: finish()
+ Called after the :meth:`handle` method to perform any clean-up actions
+ required. The default implementation does nothing. If :meth:`setup`
+ raises an exception, this function will not be called.
-.. method:: RequestHandler.setup()
- Called before the :meth:`handle` method to perform any initialization actions
- required. The default implementation does nothing.
+.. class:: StreamRequestHandler
+ DatagramRequestHandler
+
+ These :class:`BaseRequestHandler` subclasses override the
+ :meth:`~BaseRequestHandler.setup` and :meth:`~BaseRequestHandler.finish`
+ methods, and provide :attr:`self.rfile` and :attr:`self.wfile` attributes.
+ The :attr:`self.rfile` and :attr:`self.wfile` attributes can be
+ read or written, respectively, to get the request data or return data
+ to the client.
Examples
@@ -362,7 +410,7 @@ This is the server side::
class MyTCPHandler(socketserver.BaseRequestHandler):
"""
- The RequestHandler class for our server.
+ The request handler class for our server.
It is instantiated once per connection to the server, and must
override the handle() method to implement communication to the
@@ -417,17 +465,13 @@ This is the client side::
data = " ".join(sys.argv[1:])
# Create a socket (SOCK_STREAM means a TCP socket)
- sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-
- try:
+ with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
# Connect to server and send data
sock.connect((HOST, PORT))
sock.sendall(bytes(data + "\n", "utf-8"))
# Receive data from the server and shut down
received = str(sock.recv(1024), "utf-8")
- finally:
- sock.close()
print("Sent: {}".format(data))
print("Received: {}".format(received))
@@ -526,14 +570,11 @@ An example for the :class:`ThreadingMixIn` class::
pass
def client(ip, port, message):
- sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- sock.connect((ip, port))
- try:
+ with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
+ sock.connect((ip, port))
sock.sendall(bytes(message, 'ascii'))
response = str(sock.recv(1024), 'ascii')
print("Received: {}".format(response))
- finally:
- sock.close()
if __name__ == "__main__":
# Port 0 means to select an arbitrary unused port
diff --git a/Doc/library/spwd.rst b/Doc/library/spwd.rst
index 58be78f017..fd3c9adee4 100644
--- a/Doc/library/spwd.rst
+++ b/Doc/library/spwd.rst
@@ -5,6 +5,7 @@
:platform: Unix
:synopsis: The shadow password database (getspnam() and friends).
+--------------
This module provides access to the Unix shadow password database. It is
available on various Unix versions.
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
index 715321a19e..3bba935562 100644
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -3,8 +3,12 @@
.. module:: sqlite3
:synopsis: A DB-API 2.0 implementation using SQLite 3.x.
+
.. sectionauthor:: Gerhard Häring <gh@ghaering.de>
+**Source code:** :source:`Lib/sqlite3/`
+
+--------------
SQLite is a C library that provides a lightweight disk-based database that
doesn't require a separate server process and allows accessing the database
@@ -53,7 +57,7 @@ The data you've saved is persistent and is available in subsequent sessions::
Usually your SQL operations will need to use values from Python variables. You
shouldn't assemble your query using Python's string operations because doing so
is insecure; it makes your program vulnerable to an SQL injection attack
-(see http://xkcd.com/327/ for humorous example of what can go wrong).
+(see https://xkcd.com/327/ for humorous example of what can go wrong).
Instead, use the DB-API's parameter substitution. Put ``?`` as a placeholder
wherever you want to use a value, and then provide a tuple of values as the
@@ -99,7 +103,7 @@ This example uses the iterator form::
The pysqlite web page -- sqlite3 is developed externally under the name
"pysqlite".
- http://www.sqlite.org
+ https://www.sqlite.org
The SQLite web page; the documentation describes the syntax and the
available data types for the supported SQL dialect.
@@ -190,6 +194,11 @@ Module functions and constants
any combination of :const:`PARSE_DECLTYPES` and :const:`PARSE_COLNAMES` to turn
type detection on.
+ By default, *check_same_thread* is :const:`True` and only the creating thread may
+ use the connection. If set :const:`False`, the returned connection may be shared
+ across multiple threads. When using multiple threads with the same connection
+ writing operations should be serialized by the user to avoid data corruption.
+
By default, the :mod:`sqlite3` module uses its :class:`Connection` class for the
connect call. You can, however, subclass the :class:`Connection` class and make
:func:`connect` use your class instead by providing your class for the *factory*
@@ -209,7 +218,7 @@ Module functions and constants
db = sqlite3.connect('file:path/to/database?mode=ro', uri=True)
More information about this feature, including a list of recognized options, can
- be found in the `SQLite URI documentation <http://www.sqlite.org/uri.html>`_.
+ be found in the `SQLite URI documentation <https://www.sqlite.org/uri.html>`_.
.. versionchanged:: 3.4
Added the *uri* parameter.
@@ -324,8 +333,9 @@ Connection Objects
Creates a user-defined function that you can later use from within SQL
statements under the function name *name*. *num_params* is the number of
- parameters the function accepts, and *func* is a Python callable that is called
- as the SQL function.
+ parameters the function accepts (if *num_params* is -1, the function may
+ take any number of arguments), and *func* is a Python callable that is
+ called as the SQL function.
The function can return any of the types supported by SQLite: bytes, str, int,
float and None.
@@ -340,7 +350,8 @@ Connection Objects
Creates a user-defined aggregate function.
The aggregate class must implement a ``step`` method, which accepts the number
- of parameters *num_params*, and a ``finalize`` method which will return the
+ of parameters *num_params* (if *num_params* is -1, the function may take
+ any number of arguments), and a ``finalize`` method which will return the
final result of the aggregate.
The ``finalize`` method can return any of the types supported by SQLite:
@@ -495,7 +506,7 @@ Connection Objects
deleted since the database connection was opened.
- .. attribute:: iterdump
+ .. method:: iterdump
Returns an iterator to dump the database in an SQL text format. Useful when
saving an in-memory database for later restoration. This function provides
@@ -505,7 +516,7 @@ Connection Objects
Example::
# Convert file existing_db.db to SQL dump file dump.sql
- import sqlite3, os
+ import sqlite3
con = sqlite3.connect('existing_db.db')
with open('dump.sql', 'w') as f:
@@ -593,6 +604,12 @@ Cursor Objects
the cursor's arraysize attribute can affect the performance of this operation.
An empty list is returned when no rows are available.
+ .. method:: close()
+
+ Close the cursor now (rather than whenever ``__del__`` is called).
+
+ The cursor will be unusable from this point forward; a ``ProgrammingError``
+ exception will be raised if any operation is attempted with the cursor.
.. attribute:: rowcount
@@ -627,6 +644,18 @@ Cursor Objects
It is set for ``SELECT`` statements without any matching rows as well.
+ .. attribute:: connection
+
+ This read-only attribute provides the SQLite database :class:`Connection`
+ used by the :class:`Cursor` object. A :class:`Cursor` object created by
+ calling :meth:`con.cursor() <Connection.cursor>` will have a
+ :attr:`connection` attribute that refers to *con*::
+
+ >>> con = sqlite3.connect(":memory:")
+ >>> cur = con.cursor()
+ >>> cur.connection == con
+ True
+
.. _sqlite3-row-objects:
Row Objects
@@ -649,6 +678,9 @@ Row Objects
This method returns a list of column names. Immediately after a query,
it is the first member of each tuple in :attr:`Cursor.description`.
+ .. versionchanged:: 3.5
+ Added support of slicing.
+
Let's assume we initialize a table as in the example given above::
conn = sqlite3.connect(":memory:")
diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst
index b0cf4ebd83..5792d0d407 100644
--- a/Doc/library/ssl.rst
+++ b/Doc/library/ssl.rst
@@ -7,13 +7,12 @@
.. moduleauthor:: Bill Janssen <bill.janssen@gmail.com>
.. sectionauthor:: Bill Janssen <bill.janssen@gmail.com>
+**Source code:** :source:`Lib/ssl.py`
.. index:: single: OpenSSL; (use in module ssl)
.. index:: TLS, SSL, Transport Layer Security, Secure Sockets Layer
-**Source code:** :source:`Lib/ssl.py`
-
--------------
This module provides access to Transport Layer Security (often known as "Secure
@@ -206,7 +205,7 @@ instead.
The *ciphers* parameter sets the available ciphers for this SSL object.
It should be a string in the `OpenSSL cipher list format
- <http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT>`_.
+ <https://www.openssl.org/docs/apps/ciphers.html#CIPHER-LIST-FORMAT>`_.
The parameter ``do_handshake_on_connect`` specifies whether to do the SSL
handshake automatically after doing a :meth:`socket.connect`, or whether the
@@ -296,7 +295,7 @@ Random generation
Read the Wikipedia article, `Cryptographically secure pseudorandom number
generator (CSPRNG)
- <http://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator>`_,
+ <https://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator>`_,
to get the requirements of a cryptographically generator.
.. versionadded:: 3.3
@@ -335,6 +334,8 @@ Random generation
See http://egd.sourceforge.net/ or http://prngd.sourceforge.net/ for sources
of entropy-gathering daemons.
+ Availability: not available with LibreSSL.
+
.. function:: RAND_add(bytes, entropy)
Mix the given *bytes* into the SSL pseudo-random number generator. The
@@ -342,6 +343,9 @@ Random generation
string (so you can always use :const:`0.0`). See :rfc:`1750` for more
information on sources of entropy.
+ .. versionchanged:: 3.5
+ Writable :term:`bytes-like object` is now accepted.
+
Certificate handling
^^^^^^^^^^^^^^^^^^^^
@@ -350,10 +354,9 @@ Certificate handling
Verify that *cert* (in decoded format as returned by
:meth:`SSLSocket.getpeercert`) matches the given *hostname*. The rules
applied are those for checking the identity of HTTPS servers as outlined
- in :rfc:`2818` and :rfc:`6125`, except that IP addresses are not currently
- supported. In addition to HTTPS, this function should be suitable for
- checking the identity of servers in various SSL-based protocols such as
- FTPS, IMAPS, POPS and others.
+ in :rfc:`2818` and :rfc:`6125`. In addition to HTTPS, this function
+ should be suitable for checking the identity of servers in various
+ SSL-based protocols such as FTPS, IMAPS, POPS and others.
:exc:`CertificateError` is raised on failure. On success, the function
returns nothing::
@@ -375,22 +378,38 @@ Certificate handling
IDN A-labels such as ``www*.xn--pthon-kva.org`` are still supported,
but ``x*.python.org`` no longer matches ``xn--tda.python.org``.
-.. function:: cert_time_to_seconds(timestring)
+ .. versionchanged:: 3.5
+ Matching of IP addresses, when present in the subjectAltName field
+ of the certificate, is now supported.
- Returns a floating-point value containing a normal seconds-after-the-epoch
- time value, given the time-string representing the "notBefore" or "notAfter"
- date from a certificate.
+.. function:: cert_time_to_seconds(cert_time)
- Here's an example::
+ Return the time in seconds since the Epoch, given the ``cert_time``
+ string representing the "notBefore" or "notAfter" date from a
+ certificate in ``"%b %d %H:%M:%S %Y %Z"`` strptime format (C
+ locale).
- >>> import ssl
- >>> ssl.cert_time_to_seconds("May 9 00:00:00 2007 GMT")
- 1178694000.0
- >>> import time
- >>> time.ctime(ssl.cert_time_to_seconds("May 9 00:00:00 2007 GMT"))
- 'Wed May 9 00:00:00 2007'
+ Here's an example:
-.. function:: get_server_certificate(addr, ssl_version=PROTOCOL_SSLv3, ca_certs=None)
+ .. doctest:: newcontext
+
+ >>> import ssl
+ >>> timestamp = ssl.cert_time_to_seconds("Jan 5 09:34:43 2018 GMT")
+ >>> timestamp
+ 1515144883
+ >>> from datetime import datetime
+ >>> print(datetime.utcfromtimestamp(timestamp))
+ 2018-01-05 09:34:43
+
+ "notBefore" or "notAfter" dates must use GMT (:rfc:`5280`).
+
+ .. versionchanged:: 3.5
+ Interpret the input time as a time in UTC as specified by 'GMT'
+ timezone in the input string. Local timezone was used
+ previously. Return an integer (no fractions of a second in the
+ input format)
+
+.. function:: get_server_certificate(addr, ssl_version=PROTOCOL_SSLv23, ca_certs=None)
Given the address ``addr`` of an SSL-protected server, as a (*hostname*,
*port-number*) pair, fetches the server's certificate, and returns it as a
@@ -404,6 +423,10 @@ Certificate handling
.. versionchanged:: 3.3
This function is now IPv6-compatible.
+ .. versionchanged:: 3.5
+ The default *ssl_version* is changed from :data:`PROTOCOL_SSLv3` to
+ :data:`PROTOCOL_SSLv23` for maximum compatibility with modern servers.
+
.. function:: DER_cert_to_PEM_cert(DER_cert_bytes)
Given a certificate as a DER-encoded blob of bytes, returns a PEM-encoded
@@ -671,6 +694,13 @@ Constants
.. versionadded:: 3.3
+.. data:: HAS_ALPN
+
+ Whether the OpenSSL library has built-in support for the *Application-Layer
+ Protocol Negotiation* TLS extension as described in :rfc:`7301`.
+
+ .. versionadded:: 3.5
+
.. data:: HAS_ECDH
Whether the OpenSSL library has built-in support for Elliptic Curve-based
@@ -690,7 +720,7 @@ Constants
Whether the OpenSSL library has built-in support for *Next Protocol
Negotiation* as described in the `NPN draft specification
- <http://tools.ietf.org/html/draft-agl-tls-nextprotoneg>`_. When true,
+ <https://tools.ietf.org/html/draft-agl-tls-nextprotoneg>`_. When true,
you can use the :meth:`SSLContext.set_npn_protocols` method to advertise
which protocols you want to support.
@@ -738,7 +768,7 @@ Constants
ALERT_DESCRIPTION_*
Alert Descriptions from :rfc:`5246` and others. The `IANA TLS Alert Registry
- <http://www.iana.org/assignments/tls-parameters/tls-parameters.xml#tls-parameters-6>`_
+ <https://www.iana.org/assignments/tls-parameters/tls-parameters.xml#tls-parameters-6>`_
contains this list and references to the RFCs where their meaning is defined.
Used as the return value of the callback function in
@@ -788,6 +818,8 @@ SSL Sockets
(but passing a non-zero ``flags`` argument is not allowed)
- :meth:`~socket.socket.send()`, :meth:`~socket.socket.sendall()` (with
the same limitation)
+ - :meth:`~socket.socket.sendfile()` (but :mod:`os.sendfile` will be used
+ for plain-text sockets only, else :meth:`~socket.socket.send()` will be used)
- :meth:`~socket.socket.shutdown()`
However, since the SSL (and TLS) protocol has its own framing atop
@@ -798,9 +830,18 @@ SSL Sockets
Usually, :class:`SSLSocket` are not created directly, but using the
:func:`wrap_socket` function or the :meth:`SSLContext.wrap_socket` method.
+ .. versionchanged:: 3.5
+ The :meth:`sendfile` method was added.
+
+ .. versionchanged:: 3.5
+ The :meth:`shutdown` does not reset the socket timeout each time bytes
+ are received or sent. The socket timeout is now to maximum total duration
+ of the shutdown.
+
+
SSL sockets also have the following additional methods and attributes:
-.. method:: SSLSocket.read(len=0, buffer=None)
+.. method:: SSLSocket.read(len=1024, buffer=None)
Read up to *len* bytes of data from the SSL socket and return the result as
a ``bytes`` instance. If *buffer* is specified, then read into the buffer
@@ -812,6 +853,11 @@ SSL sockets also have the following additional methods and attributes:
As at any time a re-negotiation is possible, a call to :meth:`read` can also
cause write operations.
+ .. versionchanged:: 3.5
+ The socket timeout is no more reset each time bytes are received or sent.
+ The socket timeout is now to maximum total duration to read up to *len*
+ bytes.
+
.. method:: SSLSocket.write(buf)
Write *buf* to the SSL socket and return the number of bytes written. The
@@ -823,6 +869,10 @@ SSL sockets also have the following additional methods and attributes:
As at any time a re-negotiation is possible, a call to :meth:`write` can
also cause read operations.
+ .. versionchanged:: 3.5
+ The socket timeout is no more reset each time bytes are received or sent.
+ The socket timeout is now to maximum total duration to write *buf*.
+
.. note::
The :meth:`~SSLSocket.read` and :meth:`~SSLSocket.write` methods are the
@@ -844,6 +894,10 @@ SSL sockets also have the following additional methods and attributes:
:attr:`~SSLContext.check_hostname` attribute of the socket's
:attr:`~SSLSocket.context` is true.
+ .. versionchanged:: 3.5
+ The socket timeout is no more reset each time bytes are received or sent.
+ The socket timeout is now to maximum total duration of the handshake.
+
.. method:: SSLSocket.getpeercert(binary_form=False)
If there is no certificate for the peer on the other end of the connection,
@@ -917,6 +971,17 @@ SSL sockets also have the following additional methods and attributes:
version of the SSL protocol that defines its use, and the number of secret
bits being used. If no connection has been established, returns ``None``.
+.. method:: SSLSocket.shared_ciphers()
+
+ Return the list of ciphers shared by the client during the handshake. Each
+ entry of the returned list is a three-value tuple containing the name of the
+ cipher, the version of the SSL protocol that defines its use, and the number
+ of secret bits the cipher uses. :meth:`~SSLSocket.shared_ciphers` returns
+ ``None`` if no connection has been established or the socket is a client
+ socket.
+
+ .. versionadded:: 3.5
+
.. method:: SSLSocket.compression()
Return the compression algorithm being used as a string, or ``None``
@@ -940,12 +1005,22 @@ SSL sockets also have the following additional methods and attributes:
.. versionadded:: 3.3
+.. method:: SSLSocket.selected_alpn_protocol()
+
+ Return the protocol that was selected during the TLS handshake. If
+ :meth:`SSLContext.set_alpn_protocols` was not called, if the other party does
+ not support ALPN, if this socket does not support any of the client's
+ proposed protocols, or if the handshake has not happened yet, ``None`` is
+ returned.
+
+ .. versionadded:: 3.5
+
.. method:: SSLSocket.selected_npn_protocol()
- Returns the protocol that was selected during the TLS/SSL handshake. If
- :meth:`SSLContext.set_npn_protocols` was not called, or if the other party
- does not support NPN, or if the handshake has not yet happened, this will
- return ``None``.
+ Return the higher-level protocol that was selected during the TLS/SSL
+ handshake. If :meth:`SSLContext.set_npn_protocols` was not called, or
+ if the other party does not support NPN, or if the handshake has not yet
+ happened, this will return ``None``.
.. versionadded:: 3.3
@@ -957,6 +1032,16 @@ SSL sockets also have the following additional methods and attributes:
returned socket should always be used for further communication with the
other side of the connection, rather than the original socket.
+.. method:: SSLSocket.version()
+
+ Return the actual SSL protocol version negotiated by the connection
+ as a string, or ``None`` is no secure connection is established.
+ As of this writing, possible return values include ``"SSLv2"``,
+ ``"SSLv3"``, ``"TLSv1"``, ``"TLSv1.1"`` and ``"TLSv1.2"``.
+ Recent OpenSSL versions may define more return values.
+
+ .. versionadded:: 3.5
+
.. method:: SSLSocket.pending()
Returns the number of already decrypted bytes available for read, pending on
@@ -1088,7 +1173,7 @@ to speed up repeated connections from the same clients.
The *capath* string, if present, is
the path to a directory containing several CA certificates in PEM format,
following an `OpenSSL specific layout
- <http://www.openssl.org/docs/ssl/SSL_CTX_load_verify_locations.html>`_.
+ <https://www.openssl.org/docs/ssl/SSL_CTX_load_verify_locations.html>`_.
The *cadata* object, if present, is either an ASCII string of one or more
PEM-encoded certificates or a :term:`bytes-like object` of DER-encoded
@@ -1126,7 +1211,7 @@ to speed up repeated connections from the same clients.
Set the available ciphers for sockets created with this context.
It should be a string in the `OpenSSL cipher list format
- <http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT>`_.
+ <https://www.openssl.org/docs/apps/ciphers.html#CIPHER-LIST-FORMAT>`_.
If no cipher can be selected (because compile-time options or other
configuration forbids use of all the specified ciphers), an
:class:`SSLError` will be raised.
@@ -1135,13 +1220,27 @@ to speed up repeated connections from the same clients.
when connected, the :meth:`SSLSocket.cipher` method of SSL sockets will
give the currently selected cipher.
+.. method:: SSLContext.set_alpn_protocols(protocols)
+
+ Specify which protocols the socket should advertise during the SSL/TLS
+ handshake. It should be a list of ASCII strings, like ``['http/1.1',
+ 'spdy/2']``, ordered by preference. The selection of a protocol will happen
+ during the handshake, and will play out according to :rfc:`7301`. After a
+ successful handshake, the :meth:`SSLSocket.selected_alpn_protocol` method will
+ return the agreed-upon protocol.
+
+ This method will raise :exc:`NotImplementedError` if :data:`HAS_ALPN` is
+ False.
+
+ .. versionadded:: 3.5
+
.. method:: SSLContext.set_npn_protocols(protocols)
Specify which protocols the socket should advertise during the SSL/TLS
handshake. It should be a list of strings, like ``['http/1.1', 'spdy/2']``,
ordered by preference. The selection of a protocol will happen during the
handshake, and will play out according to the `NPN draft specification
- <http://tools.ietf.org/html/draft-agl-tls-nextprotoneg>`_. After a
+ <https://tools.ietf.org/html/draft-agl-tls-nextprotoneg>`_. After a
successful handshake, the :meth:`SSLSocket.selected_npn_protocol` method will
return the agreed-upon protocol.
@@ -1175,7 +1274,7 @@ to speed up repeated connections from the same clients.
Due to the early negotiation phase of the TLS connection, only limited
methods and attributes are usable like
- :meth:`SSLSocket.selected_npn_protocol` and :attr:`SSLSocket.context`.
+ :meth:`SSLSocket.selected_alpn_protocol` and :attr:`SSLSocket.context`.
:meth:`SSLSocket.getpeercert`, :meth:`SSLSocket.getpeercert`,
:meth:`SSLSocket.cipher` and :meth:`SSLSocket.compress` methods require that
the TLS connection has progressed beyond the TLS Client Hello and therefore
@@ -1251,15 +1350,25 @@ to speed up repeated connections from the same clients.
quite similarly to HTTP virtual hosts. Specifying *server_hostname* will
raise a :exc:`ValueError` if *server_side* is true.
- .. versionchanged:: 3.4.3
+ .. versionchanged:: 3.5
Always allow a server_hostname to be passed, even if OpenSSL does not
have SNI.
+.. method:: SSLContext.wrap_bio(incoming, outgoing, server_side=False, \
+ server_hostname=None)
+
+ Create a new :class:`SSLObject` instance by wrapping the BIO objects
+ *incoming* and *outgoing*. The SSL routines will read input data from the
+ incoming BIO and write data to the outgoing BIO.
+
+ The *server_side* and *server_hostname* parameters have the same meaning as
+ in :meth:`SSLContext.wrap_socket`.
+
.. method:: SSLContext.session_stats()
Get statistics about the SSL sessions created or managed by this context.
A dictionary is returned which maps the names of each `piece of information
- <http://www.openssl.org/docs/ssl/SSL_CTX_sess_number.html>`_ to their
+ <https://www.openssl.org/docs/ssl/SSL_CTX_sess_number.html>`_ to their
numeric values. For example, here is the total number of hits and misses
in the session cache since the context was created::
@@ -1475,7 +1584,7 @@ should use the following idiom::
except ImportError:
pass
else:
- ... # do something that requires SSL support
+ ... # do something that requires SSL support
Client-side operation
^^^^^^^^^^^^^^^^^^^^^
@@ -1627,7 +1736,7 @@ are finished with the client (or the client is finished with you)::
And go back to listening for new client connections (of course, a real server
would probably handle each client connection in a separate thread, or put
-the sockets in non-blocking mode and use an event loop).
+the sockets in :ref:`non-blocking mode <ssl-nonblocking>` and use an event loop).
.. _ssl-nonblocking:
@@ -1649,6 +1758,12 @@ thus several things you need to be aware of:
socket first, and attempts to *read* from the SSL socket may require
a prior *write* to the underlying socket.
+ .. versionchanged:: 3.5
+
+ In earlier Python versions, the :meth:`!SSLSocket.send` method
+ returned zero instead of raising :exc:`SSLWantWriteError` or
+ :exc:`SSLWantReadError`.
+
- Calling :func:`~select.select` tells you that the OS-level socket can be
read from (or written to), but it does not imply that there is sufficient
data at the upper SSL layer. For example, only part of an SSL frame might
@@ -1681,13 +1796,143 @@ thus several things you need to be aware of:
.. seealso::
- The :mod:`asyncio` module supports non-blocking SSL sockets and provides a
+ The :mod:`asyncio` module supports :ref:`non-blocking SSL sockets
+ <ssl-nonblocking>` and provides a
higher level API. It polls for events using the :mod:`selectors` module and
handles :exc:`SSLWantWriteError`, :exc:`SSLWantReadError` and
:exc:`BlockingIOError` exceptions. It runs the SSL handshake asynchronously
as well.
+Memory BIO Support
+------------------
+
+.. versionadded:: 3.5
+
+Ever since the SSL module was introduced in Python 2.6, the :class:`SSLSocket`
+class has provided two related but distinct areas of functionality:
+
+- SSL protocol handling
+- Network IO
+
+The network IO API is identical to that provided by :class:`socket.socket`,
+from which :class:`SSLSocket` also inherits. This allows an SSL socket to be
+used as a drop-in replacement for a regular socket, making it very easy to add
+SSL support to an existing application.
+
+Combining SSL protocol handling and network IO usually works well, but there
+are some cases where it doesn't. An example is async IO frameworks that want to
+use a different IO multiplexing model than the "select/poll on a file
+descriptor" (readiness based) model that is assumed by :class:`socket.socket`
+and by the internal OpenSSL socket IO routines. This is mostly relevant for
+platforms like Windows where this model is not efficient. For this purpose, a
+reduced scope variant of :class:`SSLSocket` called :class:`SSLObject` is
+provided.
+
+.. class:: SSLObject
+
+ A reduced-scope variant of :class:`SSLSocket` representing an SSL protocol
+ instance that does not contain any network IO methods. This class is
+ typically used by framework authors that want to implement asynchronous IO
+ for SSL through memory buffers.
+
+ This class implements an interface on top of a low-level SSL object as
+ implemented by OpenSSL. This object captures the state of an SSL connection
+ but does not provide any network IO itself. IO needs to be performed through
+ separate "BIO" objects which are OpenSSL's IO abstraction layer.
+
+ An :class:`SSLObject` instance can be created using the
+ :meth:`~SSLContext.wrap_bio` method. This method will create the
+ :class:`SSLObject` instance and bind it to a pair of BIOs. The *incoming*
+ BIO is used to pass data from Python to the SSL protocol instance, while the
+ *outgoing* BIO is used to pass data the other way around.
+
+ The following methods are available:
+
+ - :attr:`~SSLSocket.context`
+ - :attr:`~SSLSocket.server_side`
+ - :attr:`~SSLSocket.server_hostname`
+ - :meth:`~SSLSocket.read`
+ - :meth:`~SSLSocket.write`
+ - :meth:`~SSLSocket.getpeercert`
+ - :meth:`~SSLSocket.selected_npn_protocol`
+ - :meth:`~SSLSocket.cipher`
+ - :meth:`~SSLSocket.shared_ciphers`
+ - :meth:`~SSLSocket.compression`
+ - :meth:`~SSLSocket.pending`
+ - :meth:`~SSLSocket.do_handshake`
+ - :meth:`~SSLSocket.unwrap`
+ - :meth:`~SSLSocket.get_channel_binding`
+
+ When compared to :class:`SSLSocket`, this object lacks the following
+ features:
+
+ - Any form of network IO incluging methods such as ``recv()`` and
+ ``send()``.
+
+ - There is no *do_handshake_on_connect* machinery. You must always manually
+ call :meth:`~SSLSocket.do_handshake` to start the handshake.
+
+ - There is no handling of *suppress_ragged_eofs*. All end-of-file conditions
+ that are in violation of the protocol are reported via the
+ :exc:`SSLEOFError` exception.
+
+ - The method :meth:`~SSLSocket.unwrap` call does not return anything,
+ unlike for an SSL socket where it returns the underlying socket.
+
+ - The *server_name_callback* callback passed to
+ :meth:`SSLContext.set_servername_callback` will get an :class:`SSLObject`
+ instance instead of a :class:`SSLSocket` instance as its first parameter.
+
+ Some notes related to the use of :class:`SSLObject`:
+
+ - All IO on an :class:`SSLObject` is :ref:`non-blocking <ssl-nonblocking>`.
+ This means that for example :meth:`~SSLSocket.read` will raise an
+ :exc:`SSLWantReadError` if it needs more data than the incoming BIO has
+ available.
+
+ - There is no module-level ``wrap_bio()`` call like there is for
+ :meth:`~SSLContext.wrap_socket`. An :class:`SSLObject` is always created
+ via an :class:`SSLContext`.
+
+An SSLObject communicates with the outside world using memory buffers. The
+class :class:`MemoryBIO` provides a memory buffer that can be used for this
+purpose. It wraps an OpenSSL memory BIO (Basic IO) object:
+
+.. class:: MemoryBIO
+
+ A memory buffer that can be used to pass data between Python and an SSL
+ protocol instance.
+
+ .. attribute:: MemoryBIO.pending
+
+ Return the number of bytes currently in the memory buffer.
+
+ .. attribute:: MemoryBIO.eof
+
+ A boolean indicating whether the memory BIO is current at the end-of-file
+ position.
+
+ .. method:: MemoryBIO.read(n=-1)
+
+ Read up to *n* bytes from the memory buffer. If *n* is not specified or
+ negative, all bytes are returned.
+
+ .. method:: MemoryBIO.write(buf)
+
+ Write the bytes from *buf* to the memory BIO. The *buf* argument must be an
+ object supporting the buffer protocol.
+
+ The return value is the number of bytes written, which is always equal to
+ the length of *buf*.
+
+ .. method:: MemoryBIO.write_eof()
+
+ Write an EOF marker to the memory BIO. After this method has been called, it
+ is illegal to call :meth:`~MemoryBIO.write`. The attribute :attr:`eof` will
+ become true after all data currently in the buffer has been read.
+
+
.. _ssl-security:
Security considerations
@@ -1773,7 +2018,7 @@ enabled when negotiating a SSL session is possible through the
:meth:`SSLContext.set_ciphers` method. Starting from Python 3.2.3, the
ssl module disables certain weak ciphers by default, but you may want
to further restrict the cipher choice. Be sure to read OpenSSL's documentation
-about the `cipher list format <http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT>`_.
+about the `cipher list format <https://www.openssl.org/docs/apps/ciphers.html#CIPHER-LIST-FORMAT>`_.
If you want to check which ciphers are enabled by a given cipher list, use the
``openssl ciphers`` command on your system.
@@ -1794,26 +2039,26 @@ successful call of :func:`~ssl.RAND_add`, :func:`~ssl.RAND_bytes` or
Class :class:`socket.socket`
Documentation of underlying :mod:`socket` class
- `SSL/TLS Strong Encryption: An Introduction <http://httpd.apache.org/docs/trunk/en/ssl/ssl_intro.html>`_
+ `SSL/TLS Strong Encryption: An Introduction <https://httpd.apache.org/docs/trunk/en/ssl/ssl_intro.html>`_
Intro from the Apache webserver documentation
- `RFC 1422: Privacy Enhancement for Internet Electronic Mail: Part II: Certificate-Based Key Management <http://www.ietf.org/rfc/rfc1422>`_
+ `RFC 1422: Privacy Enhancement for Internet Electronic Mail: Part II: Certificate-Based Key Management <https://www.ietf.org/rfc/rfc1422>`_
Steve Kent
- `RFC 1750: Randomness Recommendations for Security <http://www.ietf.org/rfc/rfc1750>`_
+ `RFC 1750: Randomness Recommendations for Security <https://www.ietf.org/rfc/rfc1750>`_
D. Eastlake et. al.
- `RFC 3280: Internet X.509 Public Key Infrastructure Certificate and CRL Profile <http://www.ietf.org/rfc/rfc3280>`_
+ `RFC 3280: Internet X.509 Public Key Infrastructure Certificate and CRL Profile <https://www.ietf.org/rfc/rfc3280>`_
Housley et. al.
- `RFC 4366: Transport Layer Security (TLS) Extensions <http://www.ietf.org/rfc/rfc4366>`_
+ `RFC 4366: Transport Layer Security (TLS) Extensions <https://www.ietf.org/rfc/rfc4366>`_
Blake-Wilson et. al.
- `RFC 5246: The Transport Layer Security (TLS) Protocol Version 1.2 <http://tools.ietf.org/html/rfc5246>`_
+ `RFC 5246: The Transport Layer Security (TLS) Protocol Version 1.2 <https://tools.ietf.org/html/rfc5246>`_
T. Dierks et. al.
- `RFC 6066: Transport Layer Security (TLS) Extensions <http://tools.ietf.org/html/rfc6066>`_
+ `RFC 6066: Transport Layer Security (TLS) Extensions <https://tools.ietf.org/html/rfc6066>`_
D. Eastlake
- `IANA TLS: Transport Layer Security (TLS) Parameters <http://www.iana.org/assignments/tls-parameters/tls-parameters.xml>`_
+ `IANA TLS: Transport Layer Security (TLS) Parameters <https://www.iana.org/assignments/tls-parameters/tls-parameters.xml>`_
IANA
diff --git a/Doc/library/stat.rst b/Doc/library/stat.rst
index 24769f6893..b256312d91 100644
--- a/Doc/library/stat.rst
+++ b/Doc/library/stat.rst
@@ -4,10 +4,10 @@
.. module:: stat
:synopsis: Utilities for interpreting the results of os.stat(),
os.lstat() and os.fstat().
+
.. sectionauthor:: Skip Montanaro <skip@automatrix.com>
-**Source code:** :source:`Modules/_stat.c`
- :source:`Lib/stat.py`
+**Source code:** :source:`Lib/stat.py`
--------------
@@ -126,7 +126,7 @@ Example::
if __name__ == '__main__':
walktree(sys.argv[1], visitfile)
-An additional utility function is provided to covert a file's mode in a human
+An additional utility function is provided to convert a file's mode in a human
readable string:
.. function:: filemode(mode)
@@ -399,3 +399,29 @@ The following flags can be used in the *flags* argument of :func:`os.chflags`:
The file is a snapshot file.
See the \*BSD or Mac OS systems man page :manpage:`chflags(2)` for more information.
+
+On Windows, the following file attribute constants are available for use when
+testing bits in the ``st_file_attributes`` member returned by :func:`os.stat`.
+See the `Windows API documentation
+<https://msdn.microsoft.com/en-us/library/windows/desktop/gg258117.aspx>`_
+for more detail on the meaning of these constants.
+
+.. data:: FILE_ATTRIBUTE_ARCHIVE
+ FILE_ATTRIBUTE_COMPRESSED
+ FILE_ATTRIBUTE_DEVICE
+ FILE_ATTRIBUTE_DIRECTORY
+ FILE_ATTRIBUTE_ENCRYPTED
+ FILE_ATTRIBUTE_HIDDEN
+ FILE_ATTRIBUTE_INTEGRITY_STREAM
+ FILE_ATTRIBUTE_NORMAL
+ FILE_ATTRIBUTE_NOT_CONTENT_INDEXED
+ FILE_ATTRIBUTE_NO_SCRUB_DATA
+ FILE_ATTRIBUTE_OFFLINE
+ FILE_ATTRIBUTE_READONLY
+ FILE_ATTRIBUTE_REPARSE_POINT
+ FILE_ATTRIBUTE_SPARSE_FILE
+ FILE_ATTRIBUTE_SYSTEM
+ FILE_ATTRIBUTE_TEMPORARY
+ FILE_ATTRIBUTE_VIRTUAL
+
+ .. versionadded:: 3.5
diff --git a/Doc/library/statistics.rst b/Doc/library/statistics.rst
index 0c9d88c8de..ea3d7dab0f 100644
--- a/Doc/library/statistics.rst
+++ b/Doc/library/statistics.rst
@@ -3,18 +3,19 @@
.. module:: statistics
:synopsis: mathematical statistics functions
+
.. moduleauthor:: Steven D'Aprano <steve+python@pearwood.info>
.. sectionauthor:: Steven D'Aprano <steve+python@pearwood.info>
.. versionadded:: 3.4
+**Source code:** :source:`Lib/statistics.py`
+
.. testsetup:: *
from statistics import *
__name__ = '<doctest>'
-**Source code:** :source:`Lib/statistics.py`
-
--------------
This module provides functions for calculating mathematical statistics of
@@ -223,7 +224,7 @@ However, for reading convenience, most of the examples show sorted sequences.
* "Statistics for the Behavioral Sciences", Frederick J Gravetter and
Larry B Wallnau (8th Edition).
- * Calculating the `median <http://www.ualberta.ca/~opscan/median.html>`_.
+ * Calculating the `median <https://www.ualberta.ca/~opscan/median.html>`_.
* The `SSMEDIAN
<https://help.gnome.org/users/gnumeric/stable/gnumeric.html#gnumeric-function-SSMEDIAN>`_
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index 8815d38921..e8a488eb1b 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -354,26 +354,29 @@ Notes:
The numeric literals accepted include the digits ``0`` to ``9`` or any
Unicode equivalent (code points with the ``Nd`` property).
- See http://www.unicode.org/Public/6.3.0/ucd/extracted/DerivedNumericType.txt
+ See http://www.unicode.org/Public/8.0.0/ucd/extracted/DerivedNumericType.txt
for a complete list of code points with the ``Nd`` property.
All :class:`numbers.Real` types (:class:`int` and :class:`float`) also include
the following operations:
-+--------------------+------------------------------------+--------+
-| Operation | Result | Notes |
-+====================+====================================+========+
-| ``math.trunc(x)`` | *x* truncated to Integral | |
-+--------------------+------------------------------------+--------+
-| ``round(x[, n])`` | *x* rounded to n digits, | |
-| | rounding half to even. If n is | |
-| | omitted, it defaults to 0. | |
-+--------------------+------------------------------------+--------+
-| ``math.floor(x)`` | the greatest integral float <= *x* | |
-+--------------------+------------------------------------+--------+
-| ``math.ceil(x)`` | the least integral float >= *x* | |
-+--------------------+------------------------------------+--------+
++--------------------+---------------------------------------------+
+| Operation | Result |
++====================+=============================================+
+| :func:`math.trunc(\| *x* truncated to :class:`~numbers.Integral` |
+| x) <math.trunc>` | |
++--------------------+---------------------------------------------+
+| :func:`round(x[, | *x* rounded to *n* digits, |
+| n]) <round>` | rounding half to even. If *n* is |
+| | omitted, it defaults to 0. |
++--------------------+---------------------------------------------+
+| :func:`math.floor(\| the greatest :class:`~numbers.Integral` |
+| x) <math.floor>` | <= *x* |
++--------------------+---------------------------------------------+
+| :func:`math.ceil(x)| the least :class:`~numbers.Integral` >= *x* |
+| <math.ceil>` | |
++--------------------+---------------------------------------------+
For additional numeric operations see the :mod:`math` and :mod:`cmath`
modules.
@@ -397,8 +400,8 @@ Bitwise Operations on Integer Types
operator: >>
Bitwise operations only make sense for integers. Negative numbers are treated
-as their 2's complement value (this assumes a sufficiently large number of bits
-that no overflow occurs during the operation).
+as their 2's complement value (this assumes that there are enough bits so that
+no overflow occurs during the operation).
The priorities of the binary bitwise operations are all lower than the numeric
operations and higher than the comparisons; the unary operation ``~`` has the
@@ -1298,16 +1301,16 @@ loops.
only represent sequences that follow a strict pattern and repetition and
concatenation will usually violate that pattern).
- .. data: start
+ .. attribute:: start
The value of the *start* parameter (or ``0`` if the parameter was
not supplied)
- .. data: stop
+ .. attribute:: stop
The value of the *stop* parameter
- .. data: step
+ .. attribute:: step
The value of the *step* parameter (or ``1`` if the parameter was
not supplied)
@@ -1450,7 +1453,7 @@ multiple fragments.
For more information on the ``str`` class and its methods, see
:ref:`textseq` and the :ref:`string-methods` section below. To output
- formatted strings, see the :ref:`string-formatting` section. In addition,
+ formatted strings, see the :ref:`formatstrings` section. In addition,
see the :ref:`stringservices` section.
@@ -1949,6 +1952,16 @@ expression support in the :mod:`re` module).
>>> 'www.example.com'.strip('cmowz.')
'example'
+ The outermost leading and trailing *chars* argument values are stripped
+ from the string. Characters are removed from the leading end until
+ reaching a string character that is not contained in the set of
+ characters in *chars*. A similar action takes place on the trailing end.
+ For example::
+
+ >>> comment_string = '#....... Section 3.2.1 Issue #32 .......'
+ >>> comment_string.strip('.#! ')
+ 'Section 3.2.1 Issue #32'
+
.. method:: str.swapcase()
@@ -2302,6 +2315,19 @@ the bytes type has an additional class method to read data in that format:
>>> bytes.fromhex('2Ef0 F1f2 ')
b'.\xf0\xf1\xf2'
+A reverse conversion function exists to transform a bytes object into its
+hexadecimal representation.
+
+.. method:: bytes.hex()
+
+ Return a string object containing two hexadecimal digits for each
+ byte in the instance.
+
+ >>> b'\xf0\xf1\xf2'.hex()
+ 'f0f1f2'
+
+ .. versionadded:: 3.5
+
Since bytes objects are sequences of integers (akin to a tuple), for a bytes
object *b*, ``b[0]`` will be an integer, while ``b[0:1]`` will be a bytes
object of length 1. (This contrasts with text strings, where both indexing
@@ -2357,6 +2383,19 @@ the bytearray type has an additional class method to read data in that format:
>>> bytearray.fromhex('2Ef0 F1f2 ')
bytearray(b'.\xf0\xf1\xf2')
+A reverse conversion function exists to transform a bytearray object into its
+hexadecimal representation.
+
+.. method:: bytearray.hex()
+
+ Return a string object containing two hexadecimal digits for each
+ byte in the instance.
+
+ >>> bytearray(b'\xf0\xf1\xf2').hex()
+ 'f0f1f2'
+
+ .. versionadded:: 3.5
+
Since bytearray objects are sequences of integers (akin to a list), for a
bytearray object *b*, ``b[0]`` will be an integer, while ``b[0:1]`` will be
a bytearray object of length 1. (This contrasts with text strings, where
@@ -3102,6 +3141,203 @@ place, and instead produce new objects.
always produces a new object, even if no changes were made.
+.. _bytes-formatting:
+
+``printf``-style Bytes Formatting
+----------------------------------
+
+.. index::
+ single: formatting, bytes (%)
+ single: formatting, bytearray (%)
+ single: interpolation, bytes (%)
+ single: interpolation, bytearray (%)
+ single: bytes; formatting
+ single: bytearray; formatting
+ single: bytes; interpolation
+ single: bytearray; interpolation
+ single: printf-style formatting
+ single: sprintf-style formatting
+ single: % formatting
+ single: % interpolation
+
+.. note::
+
+ The formatting operations described here exhibit a variety of quirks that
+ lead to a number of common errors (such as failing to display tuples and
+ dictionaries correctly). If the value being printed may be a tuple or
+ dictionary, wrap it in a tuple.
+
+Bytes objects (``bytes``/``bytearray``) have one unique built-in operation:
+the ``%`` operator (modulo).
+This is also known as the bytes *formatting* or *interpolation* operator.
+Given ``format % values`` (where *format* is a bytes object), ``%`` conversion
+specifications in *format* are replaced with zero or more elements of *values*.
+The effect is similar to using the :c:func:`sprintf` in the C language.
+
+If *format* requires a single argument, *values* may be a single non-tuple
+object. [5]_ Otherwise, *values* must be a tuple with exactly the number of
+items specified by the format bytes object, or a single mapping object (for
+example, a dictionary).
+
+A conversion specifier contains two or more characters and has the following
+components, which must occur in this order:
+
+#. The ``'%'`` character, which marks the start of the specifier.
+
+#. Mapping key (optional), consisting of a parenthesised sequence of characters
+ (for example, ``(somename)``).
+
+#. Conversion flags (optional), which affect the result of some conversion
+ types.
+
+#. Minimum field width (optional). If specified as an ``'*'`` (asterisk), the
+ actual width is read from the next element of the tuple in *values*, and the
+ object to convert comes after the minimum field width and optional precision.
+
+#. Precision (optional), given as a ``'.'`` (dot) followed by the precision. If
+ specified as ``'*'`` (an asterisk), the actual precision is read from the next
+ element of the tuple in *values*, and the value to convert comes after the
+ precision.
+
+#. Length modifier (optional).
+
+#. Conversion type.
+
+When the right argument is a dictionary (or other mapping type), then the
+formats in the bytes object *must* include a parenthesised mapping key into that
+dictionary inserted immediately after the ``'%'`` character. The mapping key
+selects the value to be formatted from the mapping. For example:
+
+ >>> print(b'%(language)s has %(number)03d quote types.' %
+ ... {b'language': b"Python", b"number": 2})
+ b'Python has 002 quote types.'
+
+In this case no ``*`` specifiers may occur in a format (since they require a
+sequential parameter list).
+
+The conversion flag characters are:
+
++---------+---------------------------------------------------------------------+
+| Flag | Meaning |
++=========+=====================================================================+
+| ``'#'`` | The value conversion will use the "alternate form" (where defined |
+| | below). |
++---------+---------------------------------------------------------------------+
+| ``'0'`` | The conversion will be zero padded for numeric values. |
++---------+---------------------------------------------------------------------+
+| ``'-'`` | The converted value is left adjusted (overrides the ``'0'`` |
+| | conversion if both are given). |
++---------+---------------------------------------------------------------------+
+| ``' '`` | (a space) A blank should be left before a positive number (or empty |
+| | string) produced by a signed conversion. |
++---------+---------------------------------------------------------------------+
+| ``'+'`` | A sign character (``'+'`` or ``'-'``) will precede the conversion |
+| | (overrides a "space" flag). |
++---------+---------------------------------------------------------------------+
+
+A length modifier (``h``, ``l``, or ``L``) may be present, but is ignored as it
+is not necessary for Python -- so e.g. ``%ld`` is identical to ``%d``.
+
+The conversion types are:
+
++------------+-----------------------------------------------------+-------+
+| Conversion | Meaning | Notes |
++============+=====================================================+=======+
+| ``'d'`` | Signed integer decimal. | |
++------------+-----------------------------------------------------+-------+
+| ``'i'`` | Signed integer decimal. | |
++------------+-----------------------------------------------------+-------+
+| ``'o'`` | Signed octal value. | \(1) |
++------------+-----------------------------------------------------+-------+
+| ``'u'`` | Obsolete type -- it is identical to ``'d'``. | \(8) |
++------------+-----------------------------------------------------+-------+
+| ``'x'`` | Signed hexadecimal (lowercase). | \(2) |
++------------+-----------------------------------------------------+-------+
+| ``'X'`` | Signed hexadecimal (uppercase). | \(2) |
++------------+-----------------------------------------------------+-------+
+| ``'e'`` | Floating point exponential format (lowercase). | \(3) |
++------------+-----------------------------------------------------+-------+
+| ``'E'`` | Floating point exponential format (uppercase). | \(3) |
++------------+-----------------------------------------------------+-------+
+| ``'f'`` | Floating point decimal format. | \(3) |
++------------+-----------------------------------------------------+-------+
+| ``'F'`` | Floating point decimal format. | \(3) |
++------------+-----------------------------------------------------+-------+
+| ``'g'`` | Floating point format. Uses lowercase exponential | \(4) |
+| | format if exponent is less than -4 or not less than | |
+| | precision, decimal format otherwise. | |
++------------+-----------------------------------------------------+-------+
+| ``'G'`` | Floating point format. Uses uppercase exponential | \(4) |
+| | format if exponent is less than -4 or not less than | |
+| | precision, decimal format otherwise. | |
++------------+-----------------------------------------------------+-------+
+| ``'c'`` | Single byte (accepts integer or single | |
+| | byte objects). | |
++------------+-----------------------------------------------------+-------+
+| ``'b'`` | Bytes (any object that follows the | \(5) |
+| | :ref:`buffer protocol <bufferobjects>` or has | |
+| | :meth:`__bytes__`). | |
++------------+-----------------------------------------------------+-------+
+| ``'s'`` | ``'s'`` is an alias for ``'b'`` and should only | \(6) |
+| | be used for Python2/3 code bases. | |
++------------+-----------------------------------------------------+-------+
+| ``'a'`` | Bytes (converts any Python object using | \(5) |
+| | ``repr(obj).encode('ascii','backslashreplace)``). | |
++------------+-----------------------------------------------------+-------+
+| ``'r'`` | ``'r'`` is an alias for ``'a'`` and should only | \(7) |
+| | be used for Python2/3 code bases. | |
++------------+-----------------------------------------------------+-------+
+| ``'%'`` | No argument is converted, results in a ``'%'`` | |
+| | character in the result. | |
++------------+-----------------------------------------------------+-------+
+
+Notes:
+
+(1)
+ The alternate form causes a leading zero (``'0'``) to be inserted between
+ left-hand padding and the formatting of the number if the leading character
+ of the result is not already a zero.
+
+(2)
+ The alternate form causes a leading ``'0x'`` or ``'0X'`` (depending on whether
+ the ``'x'`` or ``'X'`` format was used) to be inserted between left-hand padding
+ and the formatting of the number if the leading character of the result is not
+ already a zero.
+
+(3)
+ The alternate form causes the result to always contain a decimal point, even if
+ no digits follow it.
+
+ The precision determines the number of digits after the decimal point and
+ defaults to 6.
+
+(4)
+ The alternate form causes the result to always contain a decimal point, and
+ trailing zeroes are not removed as they would otherwise be.
+
+ The precision determines the number of significant digits before and after the
+ decimal point and defaults to 6.
+
+(5)
+ If precision is ``N``, the output is truncated to ``N`` characters.
+
+(6)
+ ``b'%s'`` is deprecated, but will not be removed during the 3.x series.
+
+(7)
+ ``b'%r'`` is deprecated, but will not be removed during the 3.x series.
+
+(8)
+ See :pep:`237`.
+
+.. note::
+
+ The bytearray version of this method does *not* operate in place - it
+ always produces a new object, even if no changes were made.
+
+.. seealso:: :pep:`461`.
+.. versionadded:: 3.5
+
.. _typememoryview:
Memory Views
@@ -3130,10 +3366,8 @@ copying.
the view. The :class:`~memoryview.itemsize` attribute will give you the
number of bytes in a single element.
- A :class:`memoryview` supports slicing to expose its data. If
- :class:`~memoryview.format` is one of the native format specifiers
- from the :mod:`struct` module, indexing will return a single element
- with the correct type. Full slicing will result in a subview::
+ A :class:`memoryview` supports slicing and indexing to expose its data.
+ One-dimensional slicing will result in a subview::
>>> v = memoryview(b'abcefg')
>>> v[1]
@@ -3145,25 +3379,29 @@ copying.
>>> bytes(v[1:4])
b'bce'
- Other native formats::
+ If :class:`~memoryview.format` is one of the native format specifiers
+ from the :mod:`struct` module, indexing with an integer or a tuple of
+ integers is also supported and returns a single *element* with
+ the correct type. One-dimensional memoryviews can be indexed
+ with an integer or a one-integer tuple. Multi-dimensional memoryviews
+ can be indexed with tuples of exactly *ndim* integers where *ndim* is
+ the number of dimensions. Zero-dimensional memoryviews can be indexed
+ with the empty tuple.
+
+ Here is an example with a non-byte format::
>>> import array
>>> a = array.array('l', [-11111111, 22222222, -33333333, 44444444])
- >>> a[0]
+ >>> m = memoryview(a)
+ >>> m[0]
-11111111
- >>> a[-1]
+ >>> m[-1]
44444444
- >>> a[2:3].tolist()
- [-33333333]
- >>> a[::2].tolist()
+ >>> m[::2].tolist()
[-11111111, -33333333]
- >>> a[::-1].tolist()
- [44444444, -33333333, 22222222, -11111111]
- .. versionadded:: 3.3
-
- If the underlying object is writable, the memoryview supports slice
- assignment. Resizing is not allowed::
+ If the underlying object is writable, the memoryview supports
+ one-dimensional slice assignment. Resizing is not allowed::
>>> data = bytearray(b'abcefg')
>>> v = memoryview(data)
@@ -3196,12 +3434,16 @@ copying.
True
.. versionchanged:: 3.3
+ One-dimensional memoryviews can now be sliced.
One-dimensional memoryviews with formats 'B', 'b' or 'c' are now hashable.
.. versionchanged:: 3.4
memoryview is now registered automatically with
:class:`collections.abc.Sequence`
+ .. versionchanged:: 3.5
+ memoryviews can now be indexed with tuple of integers.
+
:class:`memoryview` has several methods:
.. method:: __eq__(exporter)
@@ -3268,6 +3510,17 @@ copying.
supports all format strings, including those that are not in
:mod:`struct` module syntax.
+ .. method:: hex()
+
+ Return a string object containing two hexadecimal digits for each
+ byte in the buffer. ::
+
+ >>> m = memoryview(b"abc")
+ >>> m.hex()
+ '616263'
+
+ .. versionadded:: 3.5
+
.. method:: tolist()
Return the data in the buffer as a list of elements. ::
@@ -3323,10 +3576,10 @@ copying.
Cast a memoryview to a new format or shape. *shape* defaults to
``[byte_length//new_itemsize]``, which means that the result view
will be one-dimensional. The return value is a new memoryview, but
- the buffer itself is not copied. Supported casts are 1D -> C-contiguous
+ the buffer itself is not copied. Supported casts are 1D -> C-:term:`contiguous`
and C-contiguous -> 1D.
- Both formats are restricted to single element native formats in
+ The destination format is restricted to a single element native format in
:mod:`struct` syntax. One of the formats must be a byte format
('B', 'b' or 'c'). The byte length of the result must be the same
as the original length.
@@ -3407,6 +3660,9 @@ copying.
.. versionadded:: 3.3
+ .. versionchanged:: 3.5
+ The source format is no longer restricted when casting to a byte view.
+
There are also several readonly attributes available:
.. attribute:: obj
@@ -3511,19 +3767,19 @@ copying.
.. attribute:: c_contiguous
- A bool indicating whether the memory is C-contiguous.
+ A bool indicating whether the memory is C-:term:`contiguous`.
.. versionadded:: 3.3
.. attribute:: f_contiguous
- A bool indicating whether the memory is Fortran contiguous.
+ A bool indicating whether the memory is Fortran :term:`contiguous`.
.. versionadded:: 3.3
.. attribute:: contiguous
- A bool indicating whether the memory is contiguous.
+ A bool indicating whether the memory is :term:`contiguous`.
.. versionadded:: 3.3
@@ -3575,7 +3831,7 @@ The constructors for both classes work the same:
.. describe:: len(s)
- Return the cardinality of set *s*.
+ Return the number of elements in set *s* (cardinality of *s*).
.. describe:: x in s
@@ -4180,13 +4436,13 @@ attribute, you need to explicitly set it on the underlying function object::
See :ref:`types` for more information.
+.. index:: object; code, code object
+
.. _bltin-code-objects:
Code Objects
------------
-.. index:: object: code
-
.. index::
builtin: compile
single: __code__ (function object attribute)
diff --git a/Doc/library/string.rst b/Doc/library/string.rst
index 19bdb21b3e..d5d24301b6 100644
--- a/Doc/library/string.rst
+++ b/Doc/library/string.rst
@@ -75,14 +75,14 @@ The constants defined in this module are:
.. _string-formatting:
-String Formatting
------------------
+Custom String Formatting
+------------------------
The built-in string class provides the ability to do complex variable
-substitutions and value formatting via the :func:`format` method described in
+substitutions and value formatting via the :meth:`~str.format` method described in
:pep:`3101`. The :class:`Formatter` class in the :mod:`string` module allows
you to create and customize your own string formatting behaviors using the same
-implementation as the built-in :meth:`format` method.
+implementation as the built-in :meth:`~str.format` method.
.. class:: Formatter
@@ -91,9 +91,13 @@ implementation as the built-in :meth:`format` method.
.. method:: format(format_string, *args, **kwargs)
- :meth:`format` is the primary API method. It takes a format string and
+ The primary API method. It takes a format string and
an arbitrary set of positional and keyword arguments.
- :meth:`format` is just a wrapper that calls :meth:`vformat`.
+ It is just a wrapper that calls :meth:`vformat`.
+
+ .. deprecated:: 3.5
+ Passing a format string as keyword argument *format_string* has been
+ deprecated.
.. method:: vformat(format_string, args, kwargs)
@@ -230,12 +234,12 @@ does an index lookup using :func:`__getitem__`.
Some simple format string examples::
- "First, thou shalt count to {0}" # References first positional argument
- "Bring me a {}" # Implicitly references the first positional argument
- "From {} to {}" # Same as "From {0} to {1}"
- "My quest is {name}" # References keyword argument 'name'
- "Weight in tons {0.weight}" # 'weight' attribute of first positional arg
- "Units destroyed: {players[0]}" # First element of keyword argument 'players'.
+ "First, thou shalt count to {0}" # References first positional argument
+ "Bring me a {}" # Implicitly references the first positional argument
+ "From {} to {}" # Same as "From {0} to {1}"
+ "My quest is {name}" # References keyword argument 'name'
+ "Weight in tons {0.weight}" # 'weight' attribute of first positional arg
+ "Units destroyed: {players[0]}" # First element of keyword argument 'players'.
The *conversion* field causes a type coercion before formatting. Normally, the
job of formatting a value is done by the :meth:`__format__` method of the value
@@ -263,8 +267,9 @@ Most built-in types support a common formatting mini-language, which is
described in the next section.
A *format_spec* field can also include nested replacement fields within it.
-These nested replacement fields can contain only a field name; conversion flags
-and format specifications are not allowed. The replacement fields within the
+These nested replacement fields may contain a field name, conversion flag
+and format specification, but deeper nesting is
+not allowed. The replacement fields within the
format_spec are substituted before the *format_spec* string is interpreted.
This allows the formatting of a value to be dynamically specified.
@@ -302,8 +307,10 @@ The general form of a *standard format specifier* is:
If a valid *align* value is specified, it can be preceded by a *fill*
character that can be any character and defaults to a space if omitted.
-Note that it is not possible to use ``{`` and ``}`` as *fill* char while
-using the :meth:`str.format` method; this limitation however doesn't
+It is not possible to use a literal curly brace ("``{``" or "``}``") as
+the *fill* character when using the :meth:`str.format`
+method. However, it is possible to insert a curly brace
+with a nested replacement field. This limitation doesn't
affect the :func:`format` function.
The meaning of the various alignment options is as follows:
@@ -320,7 +327,8 @@ The meaning of the various alignment options is as follows:
| ``'='`` | Forces the padding to be placed after the sign (if any) |
| | but before the digits. This is used for printing fields |
| | in the form '+000000120'. This alignment option is only |
- | | valid for numeric types. |
+ | | valid for numeric types. It becomes the default when '0'|
+ | | immediately precedes the field width. |
+---------+----------------------------------------------------------+
| ``'^'`` | Forces the field to be centered within the available |
| | space. |
@@ -369,7 +377,8 @@ instead.
*width* is a decimal integer defining the minimum field width. If not
specified, then the field width will be determined by the content.
-Preceding the *width* field by a zero (``'0'``) character enables
+When no explicit alignment is given, preceding the *width* field by a zero
+(``'0'``) character enables
sign-aware zero-padding for numeric types. This is equivalent to a *fill*
character of ``'0'`` with an *alignment* type of ``'='``.
@@ -492,8 +501,8 @@ The available presentation types for floating point and decimal values are:
Format examples
^^^^^^^^^^^^^^^
-This section contains examples of the new format syntax and comparison with
-the old ``%``-formatting.
+This section contains examples of the :meth:`str.format` syntax and
+comparison with the old ``%``-formatting.
In most of the cases the syntax is similar to the old ``%``-formatting, with the
addition of the ``{}`` and with ``:`` used instead of ``%``.
diff --git a/Doc/library/stringprep.rst b/Doc/library/stringprep.rst
index fc890cb232..e7fae5631d 100644
--- a/Doc/library/stringprep.rst
+++ b/Doc/library/stringprep.rst
@@ -3,9 +3,13 @@
.. module:: stringprep
:synopsis: String preparation, as per RFC 3453
+
.. moduleauthor:: Martin v. Löwis <martin@v.loewis.de>
.. sectionauthor:: Martin v. Löwis <martin@v.loewis.de>
+**Source code:** :source:`Lib/stringprep.py`
+
+--------------
When identifying things (such as host names) in the internet, it is often
necessary to compare such identifications for "equality". Exactly how this
diff --git a/Doc/library/struct.rst b/Doc/library/struct.rst
index 12d4fbcd52..ae2e38fdc0 100644
--- a/Doc/library/struct.rst
+++ b/Doc/library/struct.rst
@@ -4,10 +4,14 @@
.. module:: struct
:synopsis: Interpret bytes as packed binary data.
+**Source code:** :source:`Lib/struct.py`
+
.. index::
pair: C; structures
triple: packing; binary; data
+--------------
+
This module performs conversions between Python values and C structs represented
as Python :class:`bytes` objects. This can be used in handling binary data
stored in files or from network connections, among other sources. It uses
@@ -62,16 +66,16 @@ The module defines the following exception and functions:
Unpack from the buffer *buffer* (presumably packed by ``pack(fmt, ...)``)
according to the format string *fmt*. The result is a tuple even if it
- contains exactly one item. The buffer must contain exactly the amount of
- data required by the format (``len(bytes)`` must equal ``calcsize(fmt)``).
+ contains exactly one item. The buffer's size in bytes must match the
+ size required by the format, as reflected by :func:`calcsize`.
.. function:: unpack_from(fmt, buffer, offset=0)
Unpack from *buffer* starting at position *offset*, according to the format
string *fmt*. The result is a tuple even if it contains exactly one
- item. *buffer* must contain at least the amount of data required by the
- format (``len(buffer[offset:])`` must be at least ``calcsize(fmt)``).
+ item. The buffer's size in bytes, minus *offset*, must be at least
+ the size required by the format, as reflected by :func:`calcsize`.
.. function:: iter_unpack(fmt, buffer)
@@ -79,8 +83,8 @@ The module defines the following exception and functions:
Iteratively unpack from the buffer *buffer* according to the format
string *fmt*. This function returns an iterator which will read
equally-sized chunks from the buffer until all its contents have been
- consumed. The buffer's size in bytes must be a multiple of the amount
- of data required by the format, as reflected by :func:`calcsize`.
+ consumed. The buffer's size in bytes must be a multiple of the size
+ required by the format, as reflected by :func:`calcsize`.
Each iteration yields a tuple as specified by the format string.
@@ -389,7 +393,7 @@ The :mod:`struct` module also defines the following type:
.. method:: pack(v1, v2, ...)
Identical to the :func:`pack` function, using the compiled format.
- (``len(result)`` will equal :attr:`self.size`.)
+ (``len(result)`` will equal :attr:`size`.)
.. method:: pack_into(buffer, offset, v1, v2, ...)
@@ -400,19 +404,20 @@ The :mod:`struct` module also defines the following type:
.. method:: unpack(buffer)
Identical to the :func:`unpack` function, using the compiled format.
- (``len(buffer)`` must equal :attr:`self.size`).
+ The buffer's size in bytes must equal :attr:`size`.
.. method:: unpack_from(buffer, offset=0)
Identical to the :func:`unpack_from` function, using the compiled format.
- (``len(buffer[offset:])`` must be at least :attr:`self.size`).
+ The buffer's size in bytes, minus *offset*, must be at least
+ :attr:`size`.
.. method:: iter_unpack(buffer)
Identical to the :func:`iter_unpack` function, using the compiled format.
- (``len(buffer)`` must be a multiple of :attr:`self.size`).
+ The buffer's size in bytes must be a multiple of :attr:`size`.
.. versionadded:: 3.4
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index 9ac8882d32..f469107cba 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -3,9 +3,13 @@
.. module:: subprocess
:synopsis: Subprocess management.
+
.. moduleauthor:: Peter Ã…strand <astrand@lysator.liu.se>
.. sectionauthor:: Peter Ã…strand <astrand@lysator.liu.se>
+**Source code:** :source:`Lib/subprocess.py`
+
+--------------
The :mod:`subprocess` module allows you to spawn new processes, connect to their
input/output/error pipes, and obtain their return codes. This module intends to
@@ -25,160 +29,99 @@ modules and functions can be found in the following sections.
Using the :mod:`subprocess` Module
----------------------------------
-The recommended approach to invoking subprocesses is to use the following
-convenience functions for all use cases they can handle. For more advanced
-use cases, the underlying :class:`Popen` interface can be used directly.
+The recommended approach to invoking subprocesses is to use the :func:`run`
+function for all use cases it can handle. For more advanced use cases, the
+underlying :class:`Popen` interface can be used directly.
+The :func:`run` function was added in Python 3.5; if you need to retain
+compatibility with older versions, see the :ref:`call-function-trio` section.
-.. function:: call(args, *, stdin=None, stdout=None, stderr=None, shell=False, timeout=None)
+
+.. function:: run(args, *, stdin=None, input=None, stdout=None, stderr=None,\
+ shell=False, timeout=None, check=False)
Run the command described by *args*. Wait for command to complete, then
- return the :attr:`returncode` attribute.
+ return a :class:`CompletedProcess` instance.
The arguments shown above are merely the most common ones, described below
in :ref:`frequently-used-arguments` (hence the use of keyword-only notation
in the abbreviated signature). The full function signature is largely the
- same as that of the :class:`Popen` constructor - this function passes all
- supplied arguments other than *timeout* directly through to that interface.
+ same as that of the :class:`Popen` constructor - apart from *timeout*,
+ *input* and *check*, all the arguments to this function are passed through to
+ that interface.
- The *timeout* argument is passed to :meth:`Popen.wait`. If the timeout
- expires, the child process will be killed and then waited for again. The
+ This does not capture stdout or stderr by default. To do so, pass
+ :data:`PIPE` for the *stdout* and/or *stderr* arguments.
+
+ The *timeout* argument is passed to :meth:`Popen.communicate`. If the timeout
+ expires, the child process will be killed and waited for. The
:exc:`TimeoutExpired` exception will be re-raised after the child process
has terminated.
- Examples::
-
- >>> subprocess.call(["ls", "-l"])
- 0
-
- >>> subprocess.call("exit 1", shell=True)
- 1
-
- .. note::
-
- Do not use ``stdout=PIPE`` or ``stderr=PIPE`` with this
- function. The child process will block if it generates enough
- output to a pipe to fill up the OS pipe buffer as the pipes are
- not being read from.
-
- .. versionchanged:: 3.3
- *timeout* was added.
-
-
-.. function:: check_call(args, *, stdin=None, stdout=None, stderr=None, shell=False, timeout=None)
-
- Run command with arguments. Wait for command to complete. If the return
- code was zero then return, otherwise raise :exc:`CalledProcessError`. The
- :exc:`CalledProcessError` object will have the return code in the
- :attr:`~CalledProcessError.returncode` attribute.
-
- The arguments shown above are merely the most common ones, described below
- in :ref:`frequently-used-arguments` (hence the use of keyword-only notation
- in the abbreviated signature). The full function signature is largely the
- same as that of the :class:`Popen` constructor - this function passes all
- supplied arguments other than *timeout* directly through to that interface.
+ The *input* argument is passed to :meth:`Popen.communicate` and thus to the
+ subprocess's stdin. If used it must be a byte sequence, or a string if
+ ``universal_newlines=True``. When used, the internal :class:`Popen` object
+ is automatically created with ``stdin=PIPE``, and the *stdin* argument may
+ not be used as well.
- The *timeout* argument is passed to :meth:`Popen.wait`. If the timeout
- expires, the child process will be killed and then waited for again. The
- :exc:`TimeoutExpired` exception will be re-raised after the child process
- has terminated.
+ If *check* is True, and the process exits with a non-zero exit code, a
+ :exc:`CalledProcessError` exception will be raised. Attributes of that
+ exception hold the arguments, the exit code, and stdout and stderr if they
+ were captured.
Examples::
- >>> subprocess.check_call(["ls", "-l"])
- 0
+ >>> subprocess.run(["ls", "-l"]) # doesn't capture output
+ CompletedProcess(args=['ls', '-l'], returncode=0)
- >>> subprocess.check_call("exit 1", shell=True)
+ >>> subprocess.run("exit 1", shell=True, check=True)
Traceback (most recent call last):
- ...
+ ...
subprocess.CalledProcessError: Command 'exit 1' returned non-zero exit status 1
- .. note::
-
- Do not use ``stdout=PIPE`` or ``stderr=PIPE`` with this
- function. The child process will block if it generates enough
- output to a pipe to fill up the OS pipe buffer as the pipes are
- not being read from.
-
- .. versionchanged:: 3.3
- *timeout* was added.
+ >>> subprocess.run(["ls", "-l", "/dev/null"], stdout=subprocess.PIPE)
+ CompletedProcess(args=['ls', '-l', '/dev/null'], returncode=0,
+ stdout=b'crw-rw-rw- 1 root root 1, 3 Jan 23 16:23 /dev/null\n')
+ .. versionadded:: 3.5
-.. function:: check_output(args, *, input=None, stdin=None, stderr=None, shell=False, universal_newlines=False, timeout=None)
+.. class:: CompletedProcess
- Run command with arguments and return its output.
+ The return value from :func:`run`, representing a process that has finished.
- If the return code was non-zero it raises a :exc:`CalledProcessError`. The
- :exc:`CalledProcessError` object will have the return code in the
- :attr:`~CalledProcessError.returncode` attribute and any output in the
- :attr:`~CalledProcessError.output` attribute.
+ .. attribute:: args
- The arguments shown above are merely the most common ones, described below
- in :ref:`frequently-used-arguments` (hence the use of keyword-only notation
- in the abbreviated signature). The full function signature is largely the
- same as that of the :class:`Popen` constructor - this functions passes all
- supplied arguments other than *input* and *timeout* directly through to
- that interface. In addition, *stdout* is not permitted as an argument, as
- it is used internally to collect the output from the subprocess.
+ The arguments used to launch the process. This may be a list or a string.
- The *timeout* argument is passed to :meth:`Popen.wait`. If the timeout
- expires, the child process will be killed and then waited for again. The
- :exc:`TimeoutExpired` exception will be re-raised after the child process
- has terminated.
+ .. attribute:: returncode
- The *input* argument is passed to :meth:`Popen.communicate` and thus to the
- subprocess's stdin. If used it must be a byte sequence, or a string if
- ``universal_newlines=True``. When used, the internal :class:`Popen` object
- is automatically created with ``stdin=PIPE``, and the *stdin* argument may
- not be used as well.
+ Exit status of the child process. Typically, an exit status of 0 indicates
+ that it ran successfully.
- Examples::
+ A negative value ``-N`` indicates that the child was terminated by signal
+ ``N`` (POSIX only).
- >>> subprocess.check_output(["echo", "Hello World!"])
- b'Hello World!\n'
+ .. attribute:: stdout
- >>> subprocess.check_output(["echo", "Hello World!"], universal_newlines=True)
- 'Hello World!\n'
+ Captured stdout from the child process. A bytes sequence, or a string if
+ :func:`run` was called with ``universal_newlines=True``. None if stdout
+ was not captured.
- >>> subprocess.check_output(["sed", "-e", "s/foo/bar/"],
- ... input=b"when in the course of fooman events\n")
- b'when in the course of barman events\n'
+ If you ran the process with ``stderr=subprocess.STDOUT``, stdout and
+ stderr will be combined in this attribute, and :attr:`stderr` will be
+ None.
- >>> subprocess.check_output("exit 1", shell=True)
- Traceback (most recent call last):
- ...
- subprocess.CalledProcessError: Command 'exit 1' returned non-zero exit status 1
+ .. attribute:: stderr
- By default, this function will return the data as encoded bytes. The actual
- encoding of the output data may depend on the command being invoked, so the
- decoding to text will often need to be handled at the application level.
-
- This behaviour may be overridden by setting *universal_newlines* to
- ``True`` as described below in :ref:`frequently-used-arguments`.
-
- To also capture standard error in the result, use
- ``stderr=subprocess.STDOUT``::
-
- >>> subprocess.check_output(
- ... "ls non_existent_file; exit 0",
- ... stderr=subprocess.STDOUT,
- ... shell=True)
- 'ls: non_existent_file: No such file or directory\n'
+ Captured stderr from the child process. A bytes sequence, or a string if
+ :func:`run` was called with ``universal_newlines=True``. None if stderr
+ was not captured.
- .. note::
-
- Do not use ``stdout=PIPE`` or ``stderr=PIPE`` with this
- function. The child process will block if it generates enough
- output to a pipe to fill up the OS pipe buffer as the pipes are
- not being read from.
-
- .. versionadded:: 3.1
+ .. method:: check_returncode()
- .. versionchanged:: 3.3
- *timeout* was added.
+ If :attr:`returncode` is non-zero, raise a :exc:`CalledProcessError`.
- .. versionchanged:: 3.4
- *input* was added.
+ .. versionadded:: 3.5
.. data:: DEVNULL
@@ -225,11 +168,22 @@ use cases, the underlying :class:`Popen` interface can be used directly.
.. attribute:: output
- Output of the child process if this exception is raised by
+ Output of the child process if it was captured by :func:`run` or
:func:`check_output`. Otherwise, ``None``.
+ .. attribute:: stdout
+
+ Alias for output, for symmetry with :attr:`stderr`.
+
+ .. attribute:: stderr
+
+ Stderr output of the child process if it was captured by :func:`run`.
+ Otherwise, ``None``.
+
.. versionadded:: 3.3
+ .. versionchanged:: 3.5
+ *stdout* and *stderr* attributes added
.. exception:: CalledProcessError
@@ -238,7 +192,8 @@ use cases, the underlying :class:`Popen` interface can be used directly.
.. attribute:: returncode
- Exit status of the child process.
+ Exit status of the child process. If the process exited due to a
+ signal, this will be the negative signal number.
.. attribute:: cmd
@@ -246,9 +201,20 @@ use cases, the underlying :class:`Popen` interface can be used directly.
.. attribute:: output
- Output of the child process if this exception is raised by
+ Output of the child process if it was captured by :func:`run` or
:func:`check_output`. Otherwise, ``None``.
+ .. attribute:: stdout
+
+ Alias for output, for symmetry with :attr:`stderr`.
+
+ .. attribute:: stderr
+
+ Stderr output of the child process if it was captured by :func:`run`.
+ Otherwise, ``None``.
+
+ .. versionchanged:: 3.5
+ *stdout* and *stderr* attributes added
.. _frequently-used-arguments:
@@ -514,7 +480,7 @@ functions.
execute. On Windows, in order to run a `side-by-side assembly`_ the
specified *env* **must** include a valid :envvar:`SystemRoot`.
- .. _side-by-side assembly: http://en.wikipedia.org/wiki/Side-by-Side_Assembly
+ .. _side-by-side assembly: https://en.wikipedia.org/wiki/Side-by-Side_Assembly
If *universal_newlines* is ``True``, the file objects *stdin*, *stdout*
and *stderr* are opened as text streams in universal newlines mode, as
@@ -575,7 +541,7 @@ including shell metacharacters, can safely be passed to child processes.
If the shell is invoked explicitly, via ``shell=True``, it is the application's
responsibility to ensure that all whitespace and metacharacters are
quoted appropriately to avoid
-`shell injection <http://en.wikipedia.org/wiki/Shell_injection#Shell_injection>`_
+`shell injection <https://en.wikipedia.org/wiki/Shell_injection#Shell_injection>`_
vulnerabilities.
When using ``shell=True``, the :func:`shlex.quote` function can be
@@ -635,6 +601,7 @@ Instances of the :class:`Popen` class have the following methods:
must be bytes or, if *universal_newlines* was ``True``, a string.
:meth:`communicate` returns a tuple ``(stdout_data, stderr_data)``.
+ The data will be bytes or, if *universal_newlines* was ``True``, strings.
Note that if you want to send data to the process's stdin, you need to create
the Popen object with ``stdin=PIPE``. Similarly, to get anything other than
@@ -759,7 +726,7 @@ on Windows.
.. class:: STARTUPINFO()
Partial support of the Windows
- `STARTUPINFO <http://msdn.microsoft.com/en-us/library/ms686331(v=vs.85).aspx>`__
+ `STARTUPINFO <https://msdn.microsoft.com/en-us/library/ms686331(v=vs.85).aspx>`__
structure is used for :class:`Popen` creation.
.. attribute:: dwFlags
@@ -795,7 +762,7 @@ on Windows.
If :attr:`dwFlags` specifies :data:`STARTF_USESHOWWINDOW`, this attribute
can be any of the values that can be specified in the ``nCmdShow``
parameter for the
- `ShowWindow <http://msdn.microsoft.com/en-us/library/ms633548(v=vs.85).aspx>`__
+ `ShowWindow <https://msdn.microsoft.com/en-us/library/ms633548(v=vs.85).aspx>`__
function, except for ``SW_SHOWDEFAULT``. Otherwise, this attribute is
ignored.
@@ -851,6 +818,112 @@ The :mod:`subprocess` module exposes the following constants.
This flag is ignored if :data:`CREATE_NEW_CONSOLE` is specified.
+.. _call-function-trio:
+
+Older high-level API
+--------------------
+
+Prior to Python 3.5, these three functions comprised the high level API to
+subprocess. You can now use :func:`run` in many cases, but lots of existing code
+calls these functions.
+
+.. function:: call(args, *, stdin=None, stdout=None, stderr=None, shell=False, timeout=None)
+
+ Run the command described by *args*. Wait for command to complete, then
+ return the :attr:`~Popen.returncode` attribute.
+
+ This is equivalent to::
+
+ run(...).returncode
+
+ (except that the *input* and *check* parameters are not supported)
+
+ The arguments shown above are merely the most
+ common ones. The full function signature is largely the
+ same as that of the :class:`Popen` constructor - this function passes all
+ supplied arguments other than *timeout* directly through to that interface.
+
+ .. note::
+
+ Do not use ``stdout=PIPE`` or ``stderr=PIPE`` with this
+ function. The child process will block if it generates enough
+ output to a pipe to fill up the OS pipe buffer as the pipes are
+ not being read from.
+
+ .. versionchanged:: 3.3
+ *timeout* was added.
+
+.. function:: check_call(args, *, stdin=None, stdout=None, stderr=None, shell=False, timeout=None)
+
+ Run command with arguments. Wait for command to complete. If the return
+ code was zero then return, otherwise raise :exc:`CalledProcessError`. The
+ :exc:`CalledProcessError` object will have the return code in the
+ :attr:`~CalledProcessError.returncode` attribute.
+
+ This is equivalent to::
+
+ run(..., check=True)
+
+ (except that the *input* parameter is not supported)
+
+ The arguments shown above are merely the most
+ common ones. The full function signature is largely the
+ same as that of the :class:`Popen` constructor - this function passes all
+ supplied arguments other than *timeout* directly through to that interface.
+
+ .. note::
+
+ Do not use ``stdout=PIPE`` or ``stderr=PIPE`` with this
+ function. The child process will block if it generates enough
+ output to a pipe to fill up the OS pipe buffer as the pipes are
+ not being read from.
+
+ .. versionchanged:: 3.3
+ *timeout* was added.
+
+
+.. function:: check_output(args, *, stdin=None, stderr=None, shell=False, universal_newlines=False, timeout=None)
+
+ Run command with arguments and return its output.
+
+ If the return code was non-zero it raises a :exc:`CalledProcessError`. The
+ :exc:`CalledProcessError` object will have the return code in the
+ :attr:`~CalledProcessError.returncode` attribute and any output in the
+ :attr:`~CalledProcessError.output` attribute.
+
+ This is equivalent to::
+
+ run(..., check=True, stdout=PIPE).stdout
+
+ The arguments shown above are merely the most common ones.
+ The full function signature is largely the same as that of :func:`run` -
+ most arguments are passed directly through to that interface.
+ However, explicitly passing ``input=None`` to inherit the parent's
+ standard input file handle is not supported.
+
+ By default, this function will return the data as encoded bytes. The actual
+ encoding of the output data may depend on the command being invoked, so the
+ decoding to text will often need to be handled at the application level.
+
+ This behaviour may be overridden by setting *universal_newlines* to
+ ``True`` as described above in :ref:`frequently-used-arguments`.
+
+ To also capture standard error in the result, use
+ ``stderr=subprocess.STDOUT``::
+
+ >>> subprocess.check_output(
+ ... "ls non_existent_file; exit 0",
+ ... stderr=subprocess.STDOUT,
+ ... shell=True)
+ 'ls: non_existent_file: No such file or directory\n'
+
+ .. versionadded:: 3.1
+
+ .. versionchanged:: 3.3
+ *timeout* was added.
+
+ .. versionchanged:: 3.4
+ Support for the *input* keyword argument was added.
.. _subprocess-replacements:
diff --git a/Doc/library/sunau.rst b/Doc/library/sunau.rst
index bd37ee29cc..d0fd0a3cc7 100644
--- a/Doc/library/sunau.rst
+++ b/Doc/library/sunau.rst
@@ -3,6 +3,7 @@
.. module:: sunau
:synopsis: Provide an interface to the Sun AU sound format.
+
.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
**Source code:** :source:`Lib/sunau.py`
diff --git a/Doc/library/symbol.rst b/Doc/library/symbol.rst
index ef9ef1e129..44996936e2 100644
--- a/Doc/library/symbol.rst
+++ b/Doc/library/symbol.rst
@@ -3,6 +3,7 @@
.. module:: symbol
:synopsis: Constants representing internal nodes of the parse tree.
+
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
**Source code:** :source:`Lib/symbol.py`
diff --git a/Doc/library/symtable.rst b/Doc/library/symtable.rst
index 2503d335e8..ba2caff589 100644
--- a/Doc/library/symtable.rst
+++ b/Doc/library/symtable.rst
@@ -71,10 +71,6 @@ Examining Symbol Tables
Return ``True`` if the block uses ``exec``.
- .. method:: has_import_star()
-
- Return ``True`` if the block uses a starred from-import.
-
.. method:: get_identifiers()
Return a list of names of symbols in this table.
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst
index c0378e09b0..9f70a13aa9 100644
--- a/Doc/library/sys.rst
+++ b/Doc/library/sys.rst
@@ -4,6 +4,7 @@
.. module:: sys
:synopsis: Access system-specific parameters and functions.
+--------------
This module provides access to some variables used or maintained by the
interpreter and to functions that interact strongly with the interpreter. It is
@@ -167,7 +168,7 @@ always available.
.. data:: dont_write_bytecode
- If this is true, Python won't try to write ``.pyc`` or ``.pyo`` files on the
+ If this is true, Python won't try to write ``.pyc`` files on the
import of source modules. This value is initially set to ``True`` or
``False`` depending on the :option:`-B` command line option and the
:envvar:`PYTHONDONTWRITEBYTECODE` environment variable, but you can set it
@@ -474,7 +475,7 @@ always available.
additional garbage collector overhead if the object is managed by the garbage
collector.
- See `recursive sizeof recipe <http://code.activestate.com/recipes/577504>`_
+ See `recursive sizeof recipe <https://code.activestate.com/recipes/577504>`_
for an example of using :func:`getsizeof` recursively to find the size of
containers and all their contents.
@@ -576,6 +577,18 @@ always available.
*service_pack_major*, *suite_mask*, and *product_type*.
+.. function:: get_coroutine_wrapper()
+
+ Returns ``None``, or a wrapper set by :func:`set_coroutine_wrapper`.
+
+ .. versionadded:: 3.5
+ See :pep:`492` for more details.
+
+ .. note::
+ This function has been added on a provisional basis (see :pep:`411`
+ for details.) Use it only for debugging purposes.
+
+
.. data:: hash_info
A :term:`struct sequence` giving parameters of the numeric hash
@@ -718,6 +731,14 @@ always available.
value of :func:`intern` around to benefit from it.
+.. function:: is_finalizing()
+
+ Return :const:`True` if the Python interpreter is
+ :term:`shutting down <interpreter shutdown>`, :const:`False` otherwise.
+
+ .. versionadded:: 3.5
+
+
.. data:: last_type
last_value
last_traceback
@@ -754,19 +775,32 @@ always available.
.. data:: meta_path
- A list of :term:`finder` objects that have their :meth:`find_module`
- methods called to see if one of the objects can find the module to be
- imported. The :meth:`find_module` method is called at least with the
- absolute name of the module being imported. If the module to be imported is
- contained in package then the parent package's :attr:`__path__` attribute
- is passed in as a second argument. The method returns ``None`` if
- the module cannot be found, else returns a :term:`loader`.
-
- :data:`sys.meta_path` is searched before any implicit default finders or
- :data:`sys.path`.
-
- See :pep:`302` for the original specification.
-
+ A list of :term:`meta path finder` objects that have their
+ :meth:`~importlib.abc.MetaPathFinder.find_spec` methods called to see if one
+ of the objects can find the module to be imported. The
+ :meth:`~importlib.abc.MetaPathFinder.find_spec` method is called with at
+ least the absolute name of the module being imported. If the module to be
+ imported is contained in a package, then the parent package's :attr:`__path__`
+ attribute is passed in as a second argument. The method returns a
+ :term:`module spec`, or ``None`` if the module cannot be found.
+
+ .. seealso::
+
+ :class:`importlib.abc.MetaPathFinder`
+ The abstract base class defining the interface of finder objects on
+ :data:`meta_path`.
+ :class:`importlib.machinery.ModuleSpec`
+ The concrete class which
+ :meth:`~importlib.abc.MetaPathFinder.find_spec` should return
+ instances of.
+
+ .. versionchanged:: 3.4
+
+ :term:`Module specs <module spec>` were introduced in Python 3.4, by
+ :pep:`451`. Earlier versions of Python looked for a method called
+ :meth:`~importlib.abc.MetaPathFinder.find_module`.
+ This is still called as a fallback if a :data:`meta_path` entry doesn't
+ have a :meth:`~importlib.abc.MetaPathFinder.find_spec` method.
.. data:: modules
@@ -955,6 +989,13 @@ always available.
that supports a higher limit. This should be done with care, because a too-high
limit can lead to a crash.
+ If the new limit is too low at the current recursion depth, a
+ :exc:`RecursionError` exception is raised.
+
+ .. versionchanged:: 3.5.1
+ A :exc:`RecursionError` exception is now raised if the new limit is too
+ low at the current recursion depth.
+
.. function:: setswitchinterval(interval)
@@ -1053,6 +1094,46 @@ always available.
thus not likely to be implemented elsewhere.
+.. function:: set_coroutine_wrapper(wrapper)
+
+ Allows intercepting creation of :term:`coroutine` objects (only ones that
+ are created by an :keyword:`async def` function; generators decorated with
+ :func:`types.coroutine` or :func:`asyncio.coroutine` will not be
+ intercepted).
+
+ The *wrapper* argument must be either:
+
+ * a callable that accepts one argument (a coroutine object);
+ * ``None``, to reset the wrapper.
+
+ If called twice, the new wrapper replaces the previous one. The function
+ is thread-specific.
+
+ The *wrapper* callable cannot define new coroutines directly or indirectly::
+
+ def wrapper(coro):
+ async def wrap(coro):
+ return await coro
+ return wrap(coro)
+ sys.set_coroutine_wrapper(wrapper)
+
+ async def foo():
+ pass
+
+ # The following line will fail with a RuntimeError, because
+ # ``wrapper`` creates a ``wrap(coro)`` coroutine:
+ foo()
+
+ See also :func:`get_coroutine_wrapper`.
+
+ .. versionadded:: 3.5
+ See :pep:`492` for more details.
+
+ .. note::
+ This function has been added on a provisional basis (see :pep:`411`
+ for details.) Use it only for debugging purposes.
+
+
.. data:: stdin
stdout
stderr
@@ -1223,4 +1304,3 @@ always available.
.. rubric:: Citations
.. [C99] ISO/IEC 9899:1999. "Programming languages -- C." A public draft of this standard is available at http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf\ .
-
diff --git a/Doc/library/sysconfig.rst b/Doc/library/sysconfig.rst
index 535ac54b3c..0b0df9b375 100644
--- a/Doc/library/sysconfig.rst
+++ b/Doc/library/sysconfig.rst
@@ -3,16 +3,17 @@
.. module:: sysconfig
:synopsis: Python's configuration information
+
.. moduleauthor:: Tarek Ziadé <tarek@ziade.org>
.. sectionauthor:: Tarek Ziadé <tarek@ziade.org>
-.. index::
- single: configuration information
-
.. versionadded:: 3.2
**Source code:** :source:`Lib/sysconfig.py`
+.. index::
+ single: configuration information
+
--------------
The :mod:`sysconfig` module provides access to Python's configuration
diff --git a/Doc/library/syslog.rst b/Doc/library/syslog.rst
index 6e90dc05d9..af3fb9b57f 100644
--- a/Doc/library/syslog.rst
+++ b/Doc/library/syslog.rst
@@ -5,6 +5,7 @@
:platform: Unix
:synopsis: An interface to the Unix syslog library routines.
+--------------
This module provides an interface to the Unix ``syslog`` library routines.
Refer to the Unix manual pages for a detailed description of the ``syslog``
diff --git a/Doc/library/tabnanny.rst b/Doc/library/tabnanny.rst
index 4f3e705cab..1edb0fbabb 100644
--- a/Doc/library/tabnanny.rst
+++ b/Doc/library/tabnanny.rst
@@ -4,6 +4,7 @@
.. module:: tabnanny
:synopsis: Tool for detecting white space related problems in Python
source files in a directory tree.
+
.. moduleauthor:: Tim Peters <tim_one@users.sourceforge.net>
.. sectionauthor:: Peter Funk <pf@artcom-gmbh.de>
diff --git a/Doc/library/tarfile.rst b/Doc/library/tarfile.rst
index 05f29adb0b..32d69bf3ca 100644
--- a/Doc/library/tarfile.rst
+++ b/Doc/library/tarfile.rst
@@ -4,7 +4,6 @@
.. module:: tarfile
:synopsis: Read and write tar-format archive files.
-
.. moduleauthor:: Lars Gustäbel <lars@gustaebel.de>
.. sectionauthor:: Lars Gustäbel <lars@gustaebel.de>
@@ -62,6 +61,23 @@ Some facts and figures:
+------------------+---------------------------------------------+
| ``'r:xz'`` | Open for reading with lzma compression. |
+------------------+---------------------------------------------+
+ | ``'x'`` or | Create a tarfile exclusively without |
+ | ``'x:'`` | compression. |
+ | | Raise an :exc:`FileExistsError` exception |
+ | | if it is already exists. |
+ +------------------+---------------------------------------------+
+ | ``'x:gz'`` | Create a tarfile with gzip compression. |
+ | | Raise an :exc:`FileExistsError` exception |
+ | | if it is already exists. |
+ +------------------+---------------------------------------------+
+ | ``'x:bz2'`` | Create a tarfile with bzip2 compression. |
+ | | Raise an :exc:`FileExistsError` exception |
+ | | if it is already exists. |
+ +------------------+---------------------------------------------+
+ | ``'x:xz'`` | Create a tarfile with lzma compression. |
+ | | Raise an :exc:`FileExistsError` exception |
+ | | if it is already exists. |
+ +------------------+---------------------------------------------+
| ``'a' or 'a:'`` | Open for appending with no compression. The |
| | file is created if it does not exist. |
+------------------+---------------------------------------------+
@@ -82,9 +98,9 @@ Some facts and figures:
If *fileobj* is specified, it is used as an alternative to a :term:`file object`
opened in binary mode for *name*. It is supposed to be at position 0.
- For modes ``'w:gz'``, ``'r:gz'``, ``'w:bz2'``, ``'r:bz2'``, :func:`tarfile.open`
- accepts the keyword argument *compresslevel* to specify the compression level of
- the file.
+ For modes ``'w:gz'``, ``'r:gz'``, ``'w:bz2'``, ``'r:bz2'``, ``'x:gz'``,
+ ``'x:bz2'``, :func:`tarfile.open` accepts the keyword argument
+ *compresslevel* (default ``9``) to specify the compression level of the file.
For special purposes, there is a second format for *mode*:
``'filemode|[compression]'``. :func:`tarfile.open` will return a :class:`TarFile`
@@ -94,7 +110,7 @@ Some facts and figures:
specifies the blocksize and defaults to ``20 * 512`` bytes. Use this variant
in combination with e.g. ``sys.stdin``, a socket :term:`file object` or a tape
device. However, such a :class:`TarFile` object is limited in that it does
- not allow to be accessed randomly, see :ref:`tar-examples`. The currently
+ not allow random access, see :ref:`tar-examples`. The currently
possible modes:
+-------------+--------------------------------------------+
@@ -112,7 +128,7 @@ Some facts and figures:
| ``'r|bz2'`` | Open a bzip2 compressed *stream* for |
| | reading. |
+-------------+--------------------------------------------+
- | ``'r|xz'`` | Open a lzma compressed *stream* for |
+ | ``'r|xz'`` | Open an lzma compressed *stream* for |
| | reading. |
+-------------+--------------------------------------------+
| ``'w|'`` | Open an uncompressed *stream* for writing. |
@@ -127,6 +143,8 @@ Some facts and figures:
| | writing. |
+-------------+--------------------------------------------+
+ .. versionchanged:: 3.5
+ The ``'x'`` (exclusive creation) mode was added.
.. class:: TarFile
@@ -219,7 +237,7 @@ details.
Documentation of the higher-level archiving facilities provided by the
standard :mod:`shutil` module.
- `GNU tar manual, Basic Tar Format <http://www.gnu.org/software/tar/manual/html_node/Standard.html>`_
+ `GNU tar manual, Basic Tar Format <https://www.gnu.org/software/tar/manual/html_node/Standard.html>`_
Documentation for tar archive files, including GNU tar extensions.
@@ -252,8 +270,8 @@ be finalized; only the internally used file object will be closed. See the
In this case, the file object's :attr:`name` attribute is used if it exists.
*mode* is either ``'r'`` to read from an existing archive, ``'a'`` to append
- data to an existing file or ``'w'`` to create a new file overwriting an existing
- one.
+ data to an existing file, ``'w'`` to create a new file overwriting an existing
+ one or ``'x'`` to create a new file only if it's not exists.
If *fileobj* is given, it is used for reading or writing data. If it can be
determined, *mode* is overridden by *fileobj*'s mode. *fileobj* will be used
@@ -292,12 +310,14 @@ be finalized; only the internally used file object will be closed. See the
to be handled. The default settings will work for most users.
See section :ref:`tar-unicode` for in-depth information.
- .. versionchanged:: 3.2
- Use ``'surrogateescape'`` as the default for the *errors* argument.
-
The *pax_headers* argument is an optional dictionary of strings which
will be added as a pax global header if *format* is :const:`PAX_FORMAT`.
+ .. versionchanged:: 3.2
+ Use ``'surrogateescape'`` as the default for the *errors* argument.
+
+ .. versionchanged:: 3.5
+ The ``'x'`` (exclusive creation) mode was added.
.. classmethod:: TarFile.open(...)
@@ -328,11 +348,15 @@ be finalized; only the internally used file object will be closed. See the
returned by :meth:`getmembers`.
-.. method:: TarFile.list(verbose=True)
+.. method:: TarFile.list(verbose=True, *, members=None)
Print a table of contents to ``sys.stdout``. If *verbose* is :const:`False`,
only the names of the members are printed. If it is :const:`True`, output
- similar to that of :program:`ls -l` is produced.
+ similar to that of :program:`ls -l` is produced. If optional *members* is
+ given, it must be a subset of the list returned by :meth:`getmembers`.
+
+ .. versionchanged:: 3.5
+ Added the *members* parameter.
.. method:: TarFile.next()
@@ -342,7 +366,7 @@ be finalized; only the internally used file object will be closed. See the
available.
-.. method:: TarFile.extractall(path=".", members=None)
+.. method:: TarFile.extractall(path=".", members=None, *, numeric_owner=False)
Extract all members from the archive to the current working directory or
directory *path*. If optional *members* is given, it must be a subset of the
@@ -352,6 +376,10 @@ be finalized; only the internally used file object will be closed. See the
reset each time a file is created in it. And, if a directory's permissions do
not allow writing, extracting files to it will fail.
+ If *numeric_owner* is :const:`True`, the uid and gid numbers from the tarfile
+ are used to set the owner/group for the extracted files. Otherwise, the named
+ values from the tarfile are used.
+
.. warning::
Never extract archives from untrusted sources without prior inspection.
@@ -359,8 +387,11 @@ be finalized; only the internally used file object will be closed. See the
that have absolute filenames starting with ``"/"`` or filenames with two
dots ``".."``.
+ .. versionchanged:: 3.5
+ Added the *numeric_only* parameter.
+
-.. method:: TarFile.extract(member, path="", set_attrs=True)
+.. method:: TarFile.extract(member, path="", set_attrs=True, *, numeric_owner=False)
Extract a member from the archive to the current working directory, using its
full name. Its file information is extracted as accurately as possible. *member*
@@ -368,6 +399,10 @@ be finalized; only the internally used file object will be closed. See the
directory using *path*. File attributes (owner, mtime, mode) are set unless
*set_attrs* is false.
+ If *numeric_owner* is :const:`True`, the uid and gid numbers from the tarfile
+ are used to set the owner/group for the extracted files. Otherwise, the named
+ values from the tarfile are used.
+
.. note::
The :meth:`extract` method does not take care of several extraction issues.
@@ -380,6 +415,9 @@ be finalized; only the internally used file object will be closed. See the
.. versionchanged:: 3.2
Added the *set_attrs* parameter.
+ .. versionchanged:: 3.5
+ Added the *numeric_only* parameter.
+
.. method:: TarFile.extractfile(member)
Extract a member from the archive as a file object. *member* may be a filename
@@ -417,21 +455,28 @@ be finalized; only the internally used file object will be closed. See the
.. method:: TarFile.addfile(tarinfo, fileobj=None)
Add the :class:`TarInfo` object *tarinfo* to the archive. If *fileobj* is given,
+ it should be a :term:`binary file`, and
``tarinfo.size`` bytes are read from it and added to the archive. You can
- create :class:`TarInfo` objects using :meth:`gettarinfo`.
-
- .. note::
-
- On Windows platforms, *fileobj* should always be opened with mode ``'rb'`` to
- avoid irritation about the file size.
+ create :class:`TarInfo` objects directly, or by using :meth:`gettarinfo`.
.. method:: TarFile.gettarinfo(name=None, arcname=None, fileobj=None)
- Create a :class:`TarInfo` object for either the file *name* or the :term:`file
- object` *fileobj* (using :func:`os.fstat` on its file descriptor). You can modify
- some of the :class:`TarInfo`'s attributes before you add it using :meth:`addfile`.
- If given, *arcname* specifies an alternative name for the file in the archive.
+ Create a :class:`TarInfo` object from the result of :func:`os.stat` or
+ equivalent on an existing file. The file is either named by *name*, or
+ specified as a :term:`file object` *fileobj* with a file descriptor. If
+ given, *arcname* specifies an alternative name for the file in the
+ archive, otherwise, the name is taken from *fileobj*’s
+ :attr:`~io.FileIO.name` attribute, or the *name* argument. The name
+ should be a text string.
+
+ You can modify
+ some of the :class:`TarInfo`’s attributes before you add it using :meth:`addfile`.
+ If the file object is not an ordinary file object positioned at the
+ beginning of the file, attributes such as :attr:`~TarInfo.size` may need
+ modifying. This is the case for objects such as :class:`~gzip.GzipFile`.
+ The :attr:`~TarInfo.name` may also be modified, in which case *arcname*
+ could be a dummy string.
.. method:: TarFile.close()
@@ -802,4 +847,3 @@ In case of :const:`PAX_FORMAT` archives, *encoding* is generally not needed
because all the metadata is stored using *UTF-8*. *encoding* is only used in
the rare cases when binary pax headers are decoded or when strings with
surrogate characters are stored.
-
diff --git a/Doc/library/telnetlib.rst b/Doc/library/telnetlib.rst
index 4040f72ee8..b950e41dc1 100644
--- a/Doc/library/telnetlib.rst
+++ b/Doc/library/telnetlib.rst
@@ -3,13 +3,13 @@
.. module:: telnetlib
:synopsis: Telnet client class.
+
.. sectionauthor:: Skip Montanaro <skip@pobox.com>
+**Source code:** :source:`Lib/telnetlib.py`
.. index:: single: protocol; Telnet
-**Source code:** :source:`Lib/telnetlib.py`
-
--------------
The :mod:`telnetlib` module provides a :class:`Telnet` class that implements the
diff --git a/Doc/library/tempfile.rst b/Doc/library/tempfile.rst
index 1efb5e6bde..665261ffb2 100644
--- a/Doc/library/tempfile.rst
+++ b/Doc/library/tempfile.rst
@@ -1,66 +1,79 @@
:mod:`tempfile` --- Generate temporary files and directories
============================================================
-.. sectionauthor:: Zack Weinberg <zack@codesourcery.com>
-
-
.. module:: tempfile
:synopsis: Generate temporary files and directories.
+.. sectionauthor:: Zack Weinberg <zack@codesourcery.com>
+
+**Source code:** :source:`Lib/tempfile.py`
.. index::
pair: temporary; file name
pair: temporary; file
-**Source code:** :source:`Lib/tempfile.py`
-
--------------
-This module generates temporary files and directories. It works on all
-supported platforms. It provides three new functions,
-:func:`NamedTemporaryFile`, :func:`mkstemp`, and :func:`mkdtemp`, which should
-eliminate all remaining need to use the insecure :func:`mktemp` function.
-Temporary file names created by this module no longer contain the process ID;
-instead a string of six random characters is used.
-
-Also, all the user-callable functions now take additional arguments which
-allow direct control over the location and name of temporary files. It is
-no longer necessary to use the global *tempdir* variable.
+This module creates temporary files and directories. It works on all
+supported platforms. :class:`TemporaryFile`, :class:`NamedTemporaryFile`,
+:class:`TemporaryDirectory`, and :class:`SpooledTemporaryFile` are high-level
+interfaces which provide automatic cleanup and can be used as
+context managers. :func:`mkstemp` and
+:func:`mkdtemp` are lower-level functions which require manual cleanup.
+
+All the user-callable functions and constructors take additional arguments which
+allow direct control over the location and name of temporary files and
+directories. Files names used by this module include a string of
+random characters which allows those files to be securely created in
+shared temporary directories.
To maintain backward compatibility, the argument order is somewhat odd; it
is recommended to use keyword arguments for clarity.
The module defines the following user-callable items:
-.. function:: TemporaryFile(mode='w+b', buffering=None, encoding=None, newline=None, suffix='', prefix='tmp', dir=None)
+.. function:: TemporaryFile(mode='w+b', buffering=None, encoding=None, newline=None, suffix=None, prefix=None, dir=None)
Return a :term:`file-like object` that can be used as a temporary storage area.
- The file is created using :func:`mkstemp`. It will be destroyed as soon
+ The file is created securely, using the same rules as :func:`mkstemp`. It will be destroyed as soon
as it is closed (including an implicit close when the object is garbage
- collected). Under Unix, the directory entry for the file is removed
+ collected). Under Unix, the directory entry for the file is either not created at all or is removed
immediately after the file is created. Other platforms do not support
this; your code should not rely on a temporary file created using this
function having or not having a visible name in the file system.
+ The resulting object can be used as a context manager (see
+ :ref:`tempfile-examples`). On completion of the context or
+ destruction of the file object the temporary file will be removed
+ from the filesystem.
+
The *mode* parameter defaults to ``'w+b'`` so that the file created can
be read and written without being closed. Binary mode is used so that it
behaves consistently on all platforms without regard for the data that is
stored. *buffering*, *encoding* and *newline* are interpreted as for
:func:`open`.
- The *dir*, *prefix* and *suffix* parameters are passed to :func:`mkstemp`.
+ The *dir*, *prefix* and *suffix* parameters have the same meaning and
+ defaults as with :func:`mkstemp`.
The returned object is a true file object on POSIX platforms. On other
platforms, it is a file-like object whose :attr:`!file` attribute is the
- underlying true file object. This file-like object can be used in a
- :keyword:`with` statement, just like a normal file.
+ underlying true file object.
+ The :py:data:`os.O_TMPFILE` flag is used if it is available and works
+ (Linux-specific, requires Linux kernel 3.11 or later).
-.. function:: NamedTemporaryFile(mode='w+b', buffering=None, encoding=None, newline=None, suffix='', prefix='tmp', dir=None, delete=True)
+ .. versionchanged:: 3.5
+
+ The :py:data:`os.O_TMPFILE` flag is now used if available.
+
+
+.. function:: NamedTemporaryFile(mode='w+b', buffering=None, encoding=None, newline=None, suffix=None, prefix=None, dir=None, delete=True)
This function operates exactly as :func:`TemporaryFile` does, except that
the file is guaranteed to have a visible name in the file system (on
Unix, the directory entry is not unlinked). That name can be retrieved
- from the :attr:`name` attribute of the file object. Whether the name can be
+ from the :attr:`name` attribute of the returned
+ file-like object. Whether the name can be
used to open the file a second time, while the named temporary file is
still open, varies across platforms (it can be so used on Unix; it cannot
on Windows NT or later). If *delete* is true (the default), the file is
@@ -70,7 +83,7 @@ The module defines the following user-callable items:
be used in a :keyword:`with` statement, just like a normal file.
-.. function:: SpooledTemporaryFile(max_size=0, mode='w+b', buffering=None, encoding=None, newline=None, suffix='', prefix='tmp', dir=None)
+.. function:: SpooledTemporaryFile(max_size=0, mode='w+b', buffering=None, encoding=None, newline=None, suffix=None, prefix=None, dir=None)
This function operates exactly as :func:`TemporaryFile` does, except that
data is spooled in memory until the file size exceeds *max_size*, or
@@ -92,12 +105,11 @@ The module defines the following user-callable items:
the truncate method now accepts a ``size`` argument.
-.. function:: TemporaryDirectory(suffix='', prefix='tmp', dir=None)
+.. function:: TemporaryDirectory(suffix=None, prefix=None, dir=None)
- This function creates a temporary directory using :func:`mkdtemp`
- (the supplied arguments are passed directly to the underlying function).
+ This function securely creates a temporary directory using the same rules as :func:`mkdtemp`.
The resulting object can be used as a context manager (see
- :ref:`context-managers`). On completion of the context or destruction
+ :ref:`tempfile-examples`). On completion of the context or destruction
of the temporary directory object the newly created temporary directory
and all its contents are removed from the filesystem.
@@ -112,7 +124,7 @@ The module defines the following user-callable items:
.. versionadded:: 3.2
-.. function:: mkstemp(suffix='', prefix='tmp', dir=None, text=False)
+.. function:: mkstemp(suffix=None, prefix=None, dir=None, text=False)
Creates a temporary file in the most secure manner possible. There are
no race conditions in the file's creation, assuming that the platform
@@ -125,15 +137,16 @@ The module defines the following user-callable items:
Unlike :func:`TemporaryFile`, the user of :func:`mkstemp` is responsible
for deleting the temporary file when done with it.
- If *suffix* is specified, the file name will end with that suffix,
+ If *suffix* is not ``None``, the file name will end with that suffix,
otherwise there will be no suffix. :func:`mkstemp` does not put a dot
between the file name and the suffix; if you need one, put it at the
beginning of *suffix*.
- If *prefix* is specified, the file name will begin with that prefix;
- otherwise, a default prefix is used.
+ If *prefix* is not ``None``, the file name will begin with that prefix;
+ otherwise, a default prefix is used. The default is the return value of
+ :func:`gettempprefix` or :func:`gettempprefixb`, as appropriate.
- If *dir* is specified, the file will be created in that directory;
+ If *dir* is not ``None``, the file will be created in that directory;
otherwise, a default directory is used. The default directory is chosen
from a platform-dependent list, but the user of the application can
control the directory location by setting the *TMPDIR*, *TEMP* or *TMP*
@@ -141,6 +154,12 @@ The module defines the following user-callable items:
filename will have any nice properties, such as not requiring quoting
when passed to external commands via ``os.popen()``.
+ If any of *suffix*, *prefix*, and *dir* are not
+ ``None``, they must be the same type.
+ If they are bytes, the returned name will be bytes instead of str.
+ If you want to force a bytes return value with otherwise default behavior,
+ pass ``suffix=b''``.
+
If *text* is specified, it indicates whether to open the file in binary
mode (the default) or text mode. On some platforms, this makes no
difference.
@@ -149,8 +168,14 @@ The module defines the following user-callable items:
file (as would be returned by :func:`os.open`) and the absolute pathname
of that file, in that order.
+ .. versionchanged:: 3.5
+ *suffix*, *prefix*, and *dir* may now be supplied in bytes in order to
+ obtain a bytes return value. Prior to this, only str was allowed.
+ *suffix* and *prefix* now accept and default to ``None`` to cause
+ an appropriate default value to be used.
+
-.. function:: mkdtemp(suffix='', prefix='tmp', dir=None)
+.. function:: mkdtemp(suffix=None, prefix=None, dir=None)
Creates a temporary directory in the most secure manner possible. There
are no race conditions in the directory's creation. The directory is
@@ -164,50 +189,21 @@ The module defines the following user-callable items:
:func:`mkdtemp` returns the absolute pathname of the new directory.
-
-.. function:: mktemp(suffix='', prefix='tmp', dir=None)
-
- .. deprecated:: 2.3
- Use :func:`mkstemp` instead.
-
- Return an absolute pathname of a file that did not exist at the time the
- call is made. The *prefix*, *suffix*, and *dir* arguments are the same
- as for :func:`mkstemp`.
-
- .. warning::
-
- Use of this function may introduce a security hole in your program. By
- the time you get around to doing anything with the file name it returns,
- someone else may have beaten you to the punch. :func:`mktemp` usage can
- be replaced easily with :func:`NamedTemporaryFile`, passing it the
- ``delete=False`` parameter::
-
- >>> f = NamedTemporaryFile(delete=False)
- >>> f.name
- '/tmp/tmptjujjt'
- >>> f.write(b"Hello World!\n")
- 13
- >>> f.close()
- >>> os.unlink(f.name)
- >>> os.path.exists(f.name)
- False
-
-The module uses a global variable that tell it how to construct a
-temporary name. They are initialized at the first call to any of the
-functions above. The caller may change them, but this is discouraged; use
-the appropriate function arguments, instead.
+ .. versionchanged:: 3.5
+ *suffix*, *prefix*, and *dir* may now be supplied in bytes in order to
+ obtain a bytes return value. Prior to this, only str was allowed.
+ *suffix* and *prefix* now accept and default to ``None`` to cause
+ an appropriate default value to be used.
-.. data:: tempdir
+.. function:: gettempdir()
- When set to a value other than ``None``, this variable defines the
- default value for the *dir* argument to all the functions defined in this
- module.
+ Return the name of the directory used for temporary files. This
+ defines the default value for the *dir* argument to all functions
+ in this module.
- If ``tempdir`` is unset or ``None`` at any call to any of the above
- functions, Python searches a standard list of directories and sets
- *tempdir* to the first one which the calling user can create files in.
- The list is:
+ Python searches a standard list of directories to find one which
+ the calling user can create files in. The list is:
#. The directory named by the :envvar:`TMPDIR` environment variable.
@@ -225,19 +221,43 @@ the appropriate function arguments, instead.
#. As a last resort, the current working directory.
+ The result of this search is cached, see the description of
+ :data:`tempdir` below.
-.. function:: gettempdir()
+.. function:: gettempdirb()
- Return the directory currently selected to create temporary files in. If
- :data:`tempdir` is not ``None``, this simply returns its contents; otherwise,
- the search described above is performed, and the result returned.
+ Same as :func:`gettempdir` but the return value is in bytes.
+ .. versionadded:: 3.5
.. function:: gettempprefix()
Return the filename prefix used to create temporary files. This does not
contain the directory component.
+.. function:: gettempprefixb()
+
+ Same as :func:`gettempprefix` but the return value is in bytes.
+
+ .. versionadded:: 3.5
+
+The module uses a global variable to store the name of the directory
+used for temporary files returned by :func:`gettempdir`. It can be
+set directly to override the selection process, but this is discouraged.
+All functions in this module take a *dir* argument which can be used
+to specify the directory and this is the recommend approach.
+
+.. data:: tempdir
+
+ When set to a value other than ``None``, this variable defines the
+ default value for the *dir* argument to all the functions defined in this
+ module.
+
+ If ``tempdir`` is unset or ``None`` at any call to any of the above
+ functions except :func:`gettempprefix` it is initialized following the
+ algorithm described in :func:`gettempdir`.
+
+.. _tempfile-examples:
Examples
--------
@@ -271,3 +291,43 @@ Here are some examples of typical usage of the :mod:`tempfile` module::
>>>
# directory and contents have been removed
+
+Deprecated functions and variables
+----------------------------------
+
+A historical way to create temporary files was to first generate a
+file name with the :func:`mktemp` function and then create a file
+using this name. Unfortunately this is not secure, because a different
+process may create a file with this name in the time between the call
+to :func:`mktemp` and the subsequent attempt to create the file by the
+first process. The solution is to combine the two steps and create the
+file immediately. This approach is used by :func:`mkstemp` and the
+other functions described above.
+
+.. function:: mktemp(suffix='', prefix='tmp', dir=None)
+
+ .. deprecated:: 2.3
+ Use :func:`mkstemp` instead.
+
+ Return an absolute pathname of a file that did not exist at the time the
+ call is made. The *prefix*, *suffix*, and *dir* arguments are similar
+ to those of :func:`mkstemp`, except that bytes file names, ``suffix=None``
+ and ``prefix=None`` are not supported.
+
+ .. warning::
+
+ Use of this function may introduce a security hole in your program. By
+ the time you get around to doing anything with the file name it returns,
+ someone else may have beaten you to the punch. :func:`mktemp` usage can
+ be replaced easily with :func:`NamedTemporaryFile`, passing it the
+ ``delete=False`` parameter::
+
+ >>> f = NamedTemporaryFile(delete=False)
+ >>> f.name
+ '/tmp/tmptjujjt'
+ >>> f.write(b"Hello World!\n")
+ 13
+ >>> f.close()
+ >>> os.unlink(f.name)
+ >>> os.path.exists(f.name)
+ False
diff --git a/Doc/library/termios.rst b/Doc/library/termios.rst
index a90a825be4..ad6a9f7c97 100644
--- a/Doc/library/termios.rst
+++ b/Doc/library/termios.rst
@@ -5,15 +5,16 @@
:platform: Unix
:synopsis: POSIX style tty control.
-
.. index::
pair: POSIX; I/O control
pair: tty; I/O control
-This module provides an interface to the POSIX calls for tty I/O control. For a
-complete description of these calls, see the POSIX or Unix manual pages. It is
-only available for those Unix versions that support POSIX *termios* style tty
-I/O control (and then only if configured at installation time).
+--------------
+
+This module provides an interface to the POSIX calls for tty I/O control. For a
+complete description of these calls, see :manpage:`termios(2)` Unix manual
+page. It is only available for those Unix versions that support POSIX
+*termios* style tty I/O control configured during installation.
All functions in this module take a file descriptor *fd* as their first
argument. This can be an integer file descriptor, such as returned by
diff --git a/Doc/library/test.rst b/Doc/library/test.rst
index 2fdaf8cb37..2ea9c27e49 100644
--- a/Doc/library/test.rst
+++ b/Doc/library/test.rst
@@ -3,6 +3,7 @@
.. module:: test
:synopsis: Regression tests package containing the testing suite for Python.
+
.. sectionauthor:: Brett Cannon <brett@python.org>
.. note::
@@ -12,6 +13,7 @@
mentioned here can change or be removed without notice between releases of
Python.
+--------------
The :mod:`test` package contains all regression tests for Python as well as the
modules :mod:`test.support` and :mod:`test.regrtest`.
@@ -550,7 +552,7 @@ The :mod:`test.support` module defines the following functions:
or passed to an external program (i.e. the ``-accept`` argument to
openssl's s_server mode). Always prefer :func:`bind_port` over
:func:`find_unused_port` where possible. Using a hard coded port is
- discouraged since it can makes multiple instances of the test impossible to
+ discouraged since it can make multiple instances of the test impossible to
run simultaneously, which is a problem for buildbots.
@@ -568,6 +570,17 @@ The :mod:`test.support` module defines the following functions:
def load_tests(*args):
return load_package_tests(os.path.dirname(__file__), *args)
+.. function:: detect_api_mismatch(ref_api, other_api, *, ignore=()):
+
+ Returns the set of attributes, functions or methods of *ref_api* not
+ found on *other_api*, except for a defined list of items to be
+ ignored in this check specified in *ignore*.
+
+ By default this skips private attributes beginning with '_' but
+ includes all magic methods, i.e. those starting and ending in '__'.
+
+ .. versionadded:: 3.5
+
The :mod:`test.support` module defines the following classes:
@@ -608,7 +621,7 @@ The :mod:`test.support` module defines the following classes:
are expected to crash a subprocess.
On Windows, it disables Windows Error Reporting dialogs using
- `SetErrorMode <http://msdn.microsoft.com/en-us/library/windows/desktop/ms680621.aspx>`_.
+ `SetErrorMode <https://msdn.microsoft.com/en-us/library/windows/desktop/ms680621.aspx>`_.
On UNIX, :func:`resource.setrlimit` is used to set
:attr:`resource.RLIMIT_CORE`'s soft limit to 0 to prevent coredump file
diff --git a/Doc/library/textwrap.rst b/Doc/library/textwrap.rst
index 9fe7a3589a..438007d002 100644
--- a/Doc/library/textwrap.rst
+++ b/Doc/library/textwrap.rst
@@ -3,6 +3,7 @@
.. module:: textwrap
:synopsis: Text wrapping and filling
+
.. moduleauthor:: Greg Ward <gward@python.net>
.. sectionauthor:: Greg Ward <gward@python.net>
diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst
index c56d707342..3066496fa4 100644
--- a/Doc/library/threading.rst
+++ b/Doc/library/threading.rst
@@ -847,7 +847,7 @@ For example::
print("hello, world")
t = Timer(30.0, hello)
- t.start() # after 30 seconds, "hello, world" will be printed
+ t.start() # after 30 seconds, "hello, world" will be printed
.. class:: Timer(interval, function, args=None, kwargs=None)
diff --git a/Doc/library/time.rst b/Doc/library/time.rst
index 0a3d9772b3..e6626f262d 100644
--- a/Doc/library/time.rst
+++ b/Doc/library/time.rst
@@ -4,6 +4,7 @@
.. module:: time
:synopsis: Time access and conversions.
+--------------
This module provides various time-related functions. For related
functionality, see also the :mod:`datetime` and :mod:`calendar` modules.
@@ -314,9 +315,9 @@ The module defines the following functions and data items:
processes running for more than 49 days. On more recent versions of Windows
and on other operating systems, :func:`monotonic` is system-wide.
- Availability: Windows, Mac OS X, Linux, FreeBSD, OpenBSD, Solaris.
-
.. versionadded:: 3.3
+ .. versionchanged:: 3.5
+ The function is now always available.
.. function:: perf_counter()
@@ -350,6 +351,11 @@ The module defines the following functions and data items:
requested by an arbitrary amount because of the scheduling of other activity
in the system.
+ .. versionchanged:: 3.5
+ The function now sleeps at least *secs* even if the sleep is interrupted
+ by a signal, except if the signal handler raises an exception (see
+ :pep:`475` for the rationale).
+
.. function:: strftime(format[, t])
diff --git a/Doc/library/timeit.rst b/Doc/library/timeit.rst
index 70df409fac..57a4834c90 100644
--- a/Doc/library/timeit.rst
+++ b/Doc/library/timeit.rst
@@ -4,17 +4,16 @@
.. module:: timeit
:synopsis: Measure the execution time of small code snippets.
+**Source code:** :source:`Lib/timeit.py`
.. index::
single: Benchmarking
single: Performance
-**Source code:** :source:`Lib/timeit.py`
-
--------------
This module provides a simple way to time small bits of Python code. It has both
-a :ref:`command-line-interface` as well as a :ref:`callable <python-interface>`
+a :ref:`timeit-command-line-interface` as well as a :ref:`callable <python-interface>`
one. It avoids a number of common traps for measuring execution times.
See also Tim Peters' introduction to the "Algorithms" chapter in the *Python
Cookbook*, published by O'Reilly.
@@ -23,7 +22,7 @@ Cookbook*, published by O'Reilly.
Basic Examples
--------------
-The following example shows how the :ref:`command-line-interface`
+The following example shows how the :ref:`timeit-command-line-interface`
can be used to compare three different expressions:
.. code-block:: sh
@@ -59,18 +58,26 @@ Python Interface
The module defines three convenience functions and a public class:
-.. function:: timeit(stmt='pass', setup='pass', timer=<default timer>, number=1000000)
+.. function:: timeit(stmt='pass', setup='pass', timer=<default timer>, number=1000000, globals=None)
Create a :class:`Timer` instance with the given statement, *setup* code and
*timer* function and run its :meth:`.timeit` method with *number* executions.
+ The optional *globals* argument specifies a namespace in which to execute the
+ code.
+ .. versionchanged:: 3.5
+ The optional *globals* parameter was added.
-.. function:: repeat(stmt='pass', setup='pass', timer=<default timer>, repeat=3, number=1000000)
+
+.. function:: repeat(stmt='pass', setup='pass', timer=<default timer>, repeat=3, number=1000000, globals=None)
Create a :class:`Timer` instance with the given statement, *setup* code and
*timer* function and run its :meth:`.repeat` method with the given *repeat*
- count and *number* executions.
+ count and *number* executions. The optional *globals* argument specifies a
+ namespace in which to execute the code.
+ .. versionchanged:: 3.5
+ The optional *globals* parameter was added.
.. function:: default_timer()
@@ -80,7 +87,7 @@ The module defines three convenience functions and a public class:
:func:`time.perf_counter` is now the default timer.
-.. class:: Timer(stmt='pass', setup='pass', timer=<timer function>)
+.. class:: Timer(stmt='pass', setup='pass', timer=<timer function>, globals=None)
Class for timing execution speed of small code snippets.
@@ -88,7 +95,9 @@ The module defines three convenience functions and a public class:
for setup, and a timer function. Both statements default to ``'pass'``;
the timer function is platform-dependent (see the module doc string).
*stmt* and *setup* may also contain multiple statements separated by ``;``
- or newlines, as long as they don't contain multi-line string literals.
+ or newlines, as long as they don't contain multi-line string literals. The
+ statement will by default be executed within timeit's namespace; this behavior
+ can be controlled by passing a namespace to *globals*.
To measure the execution time of the first statement, use the :meth:`.timeit`
method. The :meth:`.repeat` method is a convenience to call :meth:`.timeit`
@@ -101,6 +110,8 @@ The module defines three convenience functions and a public class:
will then be executed by :meth:`.timeit`. Note that the timing overhead is a
little larger in this case because of the extra function calls.
+ .. versionchanged:: 3.5
+ The optional *globals* parameter was added.
.. method:: Timer.timeit(number=1000000)
@@ -162,14 +173,14 @@ The module defines three convenience functions and a public class:
where the traceback is sent; it defaults to :data:`sys.stderr`.
-.. _command-line-interface:
+.. _timeit-command-line-interface:
Command-Line Interface
----------------------
When called as a program from the command line, the following form is used::
- python -m timeit [-n N] [-r N] [-s S] [-t] [-c] [-h] [statement ...]
+ python -m timeit [-n N] [-r N] [-u U] [-s S] [-t] [-c] [-h] [statement ...]
Where the following options are understood:
@@ -198,6 +209,12 @@ Where the following options are understood:
use :func:`time.time` (deprecated)
+.. cmdoption:: -u, --unit=U
+
+ specify a time unit for timer output; can select usec, msec, or sec
+
+ .. versionadded:: 3.5
+
.. cmdoption:: -c, --clock
use :func:`time.clock` (deprecated)
@@ -320,3 +337,17 @@ To give the :mod:`timeit` module access to functions you define, you can pass a
if __name__ == '__main__':
import timeit
print(timeit.timeit("test()", setup="from __main__ import test"))
+
+Another option is to pass :func:`globals` to the *globals* parameter, which will cause the code
+to be executed within your current global namespace. This can be more convenient
+than individually specifying imports::
+
+ def f(x):
+ return x**2
+ def g(x):
+ return x**4
+ def h(x):
+ return x**8
+
+ import timeit
+ print(timeit.timeit('[func(42) for func in (f,g,h)]', globals=globals()))
diff --git a/Doc/library/tkinter.rst b/Doc/library/tkinter.rst
index 8b738c3481..130aafe8b9 100644
--- a/Doc/library/tkinter.rst
+++ b/Doc/library/tkinter.rst
@@ -3,8 +3,12 @@
.. module:: tkinter
:synopsis: Interface to Tcl/Tk for graphical user interfaces
+
.. moduleauthor:: Guido van Rossum <guido@Python.org>
+**Source code:** :source:`Lib/tkinter/__init__.py`
+
+--------------
The :mod:`tkinter` package ("Tk interface") is the standard Python interface to
the Tk GUI toolkit. Both Tk and :mod:`tkinter` are available on most Unix
@@ -22,22 +26,22 @@ this should open a window demonstrating a simple Tk interface.
`TKDocs <http://www.tkdocs.com/>`_
Extensive tutorial plus friendlier widget pages for some of the widgets.
- `Tkinter reference: a GUI for Python <http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/index.html>`_
+ `Tkinter reference: a GUI for Python <https://infohost.nmt.edu/tcc/help/pubs/tkinter/web/index.html>`_
On-line reference material.
`Tkinter docs from effbot <http://effbot.org/tkinterbook/>`_
Online reference for tkinter supported by effbot.org.
- `Tcl/Tk manual <http://www.tcl.tk/man/tcl8.5/>`_
+ `Tcl/Tk manual <https://www.tcl.tk/man/tcl8.5/>`_
Official manual for the latest tcl/tk version.
- `Programming Python <http://www.rmi.net/~lutz/about-pp4e.html>`_
+ `Programming Python <http://learning-python.com/books/about-pp4e.html>`_
Book by Mark Lutz, has excellent coverage of Tkinter.
`Modern Tkinter for Busy Python Developers <http://www.amazon.com/Modern-Tkinter-Python-Developers-ebook/dp/B0071QDNLO/>`_
Book by Mark Rozerman about building attractive and modern graphical user interfaces with Python and Tkinter.
- `Python and Tkinter Programming <http://www.manning.com/grayson/>`_
+ `Python and Tkinter Programming <https://www.manning.com/books/python-and-tkinter-programming>`_
The book by John Grayson (ISBN 1-884777-81-3).
@@ -173,7 +177,7 @@ documentation that exists. Here are some hints:
.. seealso::
- `Tcl/Tk 8.6 man pages <http://www.tcl.tk/man/tcl8.6/>`_
+ `Tcl/Tk 8.6 man pages <https://www.tcl.tk/man/tcl8.6/>`_
The Tcl/Tk manual on www.tcl.tk.
`ActiveState Tcl Home Page <http://tcl.activestate.com/>`_
@@ -206,7 +210,7 @@ A Simple Hello World Program
self.hi_there.pack(side="top")
self.QUIT = tk.Button(self, text="QUIT", fg="red",
- command=root.destroy)
+ command=root.destroy)
self.QUIT.pack(side="bottom")
def say_hi(self):
diff --git a/Doc/library/tkinter.scrolledtext.rst b/Doc/library/tkinter.scrolledtext.rst
index 520970f168..138720e478 100644
--- a/Doc/library/tkinter.scrolledtext.rst
+++ b/Doc/library/tkinter.scrolledtext.rst
@@ -4,8 +4,12 @@
.. module:: tkinter.scrolledtext
:platform: Tk
:synopsis: Text widget with a vertical scroll bar.
+
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
+**Source code:** :source:`Lib/tkinter/scrolledtext.py`
+
+--------------
The :mod:`tkinter.scrolledtext` module provides a class of the same name which
implements a basic text widget which has a vertical scroll bar configured to do
diff --git a/Doc/library/tkinter.tix.rst b/Doc/library/tkinter.tix.rst
index 9de73ade42..41f20ddf4e 100644
--- a/Doc/library/tkinter.tix.rst
+++ b/Doc/library/tkinter.tix.rst
@@ -3,11 +3,15 @@
.. module:: tkinter.tix
:synopsis: Tk Extension Widgets for Tkinter
+
.. sectionauthor:: Mike Clarkson <mikeclarkson@users.sourceforge.net>
+**Source code:** :source:`Lib/tkinter/tix.py`
.. index:: single: Tix
+--------------
+
The :mod:`tkinter.tix` (Tk Interface Extension) module provides an additional
rich set of widgets. Although the standard Tk library has many useful widgets,
they are far from complete. The :mod:`tkinter.tix` library provides most of the
@@ -142,7 +146,7 @@ Basic Widgets
The `LabelEntry
<http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixLabelEntry.htm>`_
- widget packages an entry widget and a label into one mega widget. It can be used
+ widget packages an entry widget and a label into one mega widget. It can
be used to simplify the creation of "entry-form" type of interface.
.. Python Demo of:
@@ -267,7 +271,7 @@ File Selectors
The `ExFileSelectBox
<http://tix.sourceforge.net/dist/current/man/html/TixCmd/tixExFileSelectBox.htm>`_
- widget is usually embedded in a tixExFileSelectDialog widget. It provides an
+ widget is usually embedded in a tixExFileSelectDialog widget. It provides a
convenient method for the user to select files. The style of the
:class:`ExFileSelectBox` widget is very similar to the standard file dialog on
MS Windows 3.1.
diff --git a/Doc/library/tkinter.ttk.rst b/Doc/library/tkinter.ttk.rst
index 4601171b59..dbb5bd2505 100644
--- a/Doc/library/tkinter.ttk.rst
+++ b/Doc/library/tkinter.ttk.rst
@@ -3,11 +3,15 @@
.. module:: tkinter.ttk
:synopsis: Tk themed widget set
+
.. sectionauthor:: Guilherme Polo <ggpolo@gmail.com>
+**Source code:** :source:`Lib/tkinter/ttk.py`
.. index:: single: ttk
+--------------
+
The :mod:`tkinter.ttk` module provides access to the Tk themed widget set,
introduced in Tk 8.5. If Python has not been compiled against Tk 8.5, this
module can still be accessed if *Tile* has been installed. The former
@@ -22,7 +26,7 @@ appearance.
.. seealso::
- `Tk Widget Styling Support <http://www.tcl.tk/cgi-bin/tct/tip/48>`_
+ `Tk Widget Styling Support <https://www.tcl.tk/cgi-bin/tct/tip/48>`_
A document introducing theming support for Tk
@@ -299,7 +303,7 @@ Besides the methods inherited from :class:`Widget`: :meth:`Widget.cget`,
:meth:`Widget.configure`, :meth:`Widget.identify`, :meth:`Widget.instate`
and :meth:`Widget.state`, and the following inherited from :class:`Entry`:
:meth:`Entry.bbox`, :meth:`Entry.delete`, :meth:`Entry.icursor`,
-:meth:`Entry.index`, :meth:`Entry.inset`, :meth:`Entry.selection`,
+:meth:`Entry.index`, :meth:`Entry.insert`, :meth:`Entry.selection`,
:meth:`Entry.xview`, it has some other methods, described at
:class:`ttk.Combobox`.
@@ -701,7 +705,7 @@ the widget option ``displaycolumns``. The tree widget can also display column
headings. Columns may be accessed by number or symbolic names listed in the
widget option columns. See `Column Identifiers`_.
-Each item is identified by an unique name. The widget will generate item IDs
+Each item is identified by a unique name. The widget will generate item IDs
if they are not supplied by the caller. There is a distinguished root item,
named ``{}``. The root item itself is not displayed; its children appear at the
top level of the hierarchy.
diff --git a/Doc/library/token.rst b/Doc/library/token.rst
index 4cd709814c..116efca715 100644
--- a/Doc/library/token.rst
+++ b/Doc/library/token.rst
@@ -3,6 +3,7 @@
.. module:: token
:synopsis: Constants representing terminal nodes of the parse tree.
+
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
**Source code:** :source:`Lib/token.py`
@@ -93,13 +94,20 @@ The token constants are:
DOUBLESLASH
DOUBLESLASHEQUAL
AT
+ ATEQUAL
RARROW
ELLIPSIS
OP
+ AWAIT
+ ASYNC
ERRORTOKEN
N_TOKENS
NT_OFFSET
+ .. versionchanged:: 3.5
+ Added :data:`AWAIT` and :data:`ASYNC` tokens. Starting with
+ Python 3.7, "async" and "await" will be tokenized as :data:`NAME`
+ tokens, and :data:`AWAIT` and :data:`ASYNC` will be removed.
.. seealso::
diff --git a/Doc/library/tokenize.rst b/Doc/library/tokenize.rst
index c9cb51896e..ff55aacbd4 100644
--- a/Doc/library/tokenize.rst
+++ b/Doc/library/tokenize.rst
@@ -3,6 +3,7 @@
.. module:: tokenize
:synopsis: Lexical scanner for Python source code.
+
.. moduleauthor:: Ka Ping Yee
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
@@ -27,7 +28,7 @@ The primary entry point is a :term:`generator`:
.. function:: tokenize(readline)
- The :func:`tokenize` generator requires one argument, *readline*, which
+ The :func:`.tokenize` generator requires one argument, *readline*, which
must be a callable object which provides the same interface as the
:meth:`io.IOBase.readline` method of file objects. Each call to the
function should return one line of input as bytes.
@@ -52,7 +53,7 @@ The primary entry point is a :term:`generator`:
.. versionchanged:: 3.3
Added support for ``exact_type``.
- :func:`tokenize` determines the source encoding of the file by looking for a
+ :func:`.tokenize` determines the source encoding of the file by looking for a
UTF-8 BOM or encoding cookie, according to :pep:`263`.
@@ -74,7 +75,7 @@ All constants from the :mod:`token` module are also exported from
.. data:: ENCODING
Token value that indicates the encoding used to decode the source bytes
- into text. The first token returned by :func:`tokenize` will always be an
+ into text. The first token returned by :func:`.tokenize` will always be an
ENCODING token.
@@ -96,17 +97,17 @@ write back the modified script.
positions) may change.
It returns bytes, encoded using the ENCODING token, which is the first
- token sequence output by :func:`tokenize`.
+ token sequence output by :func:`.tokenize`.
-:func:`tokenize` needs to detect the encoding of source files it tokenizes. The
+:func:`.tokenize` needs to detect the encoding of source files it tokenizes. The
function it uses to do this is available:
.. function:: detect_encoding(readline)
The :func:`detect_encoding` function is used to detect the encoding that
should be used to decode a Python source file. It requires one argument,
- readline, in the same way as the :func:`tokenize` generator.
+ readline, in the same way as the :func:`.tokenize` generator.
It will call readline a maximum of twice, and return the encoding used
(as a string) and a list of any lines (not decoded from bytes) it has read
@@ -120,7 +121,7 @@ function it uses to do this is available:
If no encoding is specified, then the default of ``'utf-8'`` will be
returned.
- Use :func:`open` to open Python source files: it uses
+ Use :func:`.open` to open Python source files: it uses
:func:`detect_encoding` to detect the file encoding.
@@ -201,7 +202,7 @@ objects::
we're only showing 12 digits, and the 13th isn't close to 5, the
rest of the output should be platform-independent.
- >>> exec(s) #doctest: +ELLIPSIS
+ >>> exec(s) #doctest: +ELLIPSIS
-3.21716034272e-0...7
Output from calculations with Decimal should be identical across all
@@ -211,8 +212,8 @@ objects::
-3.217160342717258261933904529E-7
"""
result = []
- g = tokenize(BytesIO(s.encode('utf-8')).readline) # tokenize the string
- for toknum, tokval, _, _, _ in g:
+ g = tokenize(BytesIO(s.encode('utf-8')).readline) # tokenize the string
+ for toknum, tokval, _, _, _ in g:
if toknum == NUMBER and '.' in tokval: # replace NUMBER tokens
result.extend([
(NAME, 'Decimal'),
diff --git a/Doc/library/traceback.rst b/Doc/library/traceback.rst
index 15fbedcf33..6ec9ada530 100644
--- a/Doc/library/traceback.rst
+++ b/Doc/library/traceback.rst
@@ -4,6 +4,9 @@
.. module:: traceback
:synopsis: Print or retrieve a stack traceback.
+**Source code:** :source:`Lib/traceback.py`
+
+--------------
This module provides a standard interface to extract, format and print stack
traces of Python programs. It exactly mimics the behavior of the Python
@@ -20,27 +23,33 @@ the :data:`sys.last_traceback` variable and returned as the third item from
The module defines the following functions:
-.. function:: print_tb(traceback, limit=None, file=None)
+.. function:: print_tb(tb, limit=None, file=None)
+
+ Print up to *limit* stack trace entries from traceback object *tb* (starting
+ from the caller's frame) if *limit* is positive. Otherwise, print the last
+ ``abs(limit)`` entries. If *limit* is omitted or ``None``, all entries are
+ printed. If *file* is omitted or ``None``, the output goes to
+ ``sys.stderr``; otherwise it should be an open file or file-like object to
+ receive the output.
- Print up to *limit* stack trace entries from *traceback*. If *limit* is omitted
- or ``None``, all entries are printed. If *file* is omitted or ``None``, the
- output goes to ``sys.stderr``; otherwise it should be an open file or file-like
- object to receive the output.
+ .. versionchanged:: 3.5
+ Added negative *limit* support.
-.. function:: print_exception(type, value, traceback, limit=None, file=None, chain=True)
+.. function:: print_exception(etype, value, tb, limit=None, file=None, chain=True)
- Print exception information and up to *limit* stack trace entries from
- *traceback* to *file*. This differs from :func:`print_tb` in the following
+ Print exception information and stack trace entries from traceback object
+ *tb* to *file*. This differs from :func:`print_tb` in the following
ways:
- * if *traceback* is not ``None``, it prints a header ``Traceback (most recent
+ * if *tb* is not ``None``, it prints a header ``Traceback (most recent
call last):``
- * it prints the exception *type* and *value* after the stack trace
- * if *type* is :exc:`SyntaxError` and *value* has the appropriate format, it
+ * it prints the exception *etype* and *value* after the stack trace
+ * if *etype* is :exc:`SyntaxError` and *value* has the appropriate format, it
prints the line where the syntax error occurred with a caret indicating the
approximate position of the error.
+ The optional *limit* argument has the same meaning as for :func:`print_tb`.
If *chain* is true (the default), then chained exceptions (the
:attr:`__cause__` or :attr:`__context__` attributes of the exception) will be
printed as well, like the interpreter itself does when printing an unhandled
@@ -49,33 +58,41 @@ The module defines the following functions:
.. function:: print_exc(limit=None, file=None, chain=True)
- This is a shorthand for ``print_exception(*sys.exc_info())``.
+ This is a shorthand for ``print_exception(*sys.exc_info(), limit, file,
+ chain)``.
.. function:: print_last(limit=None, file=None, chain=True)
This is a shorthand for ``print_exception(sys.last_type, sys.last_value,
- sys.last_traceback, limit, file)``. In general it will work only after
- an exception has reached an interactive prompt (see :data:`sys.last_type`).
+ sys.last_traceback, limit, file, chain)``. In general it will work only
+ after an exception has reached an interactive prompt (see
+ :data:`sys.last_type`).
.. function:: print_stack(f=None, limit=None, file=None)
- This function prints a stack trace from its invocation point. The optional *f*
- argument can be used to specify an alternate stack frame to start. The optional
- *limit* and *file* arguments have the same meaning as for
- :func:`print_exception`.
+ Print up to *limit* stack trace entries (starting from the invocation
+ point) if *limit* is positive. Otherwise, print the last ``abs(limit)``
+ entries. If *limit* is omitted or ``None``, all entries are printed.
+ The optional *f* argument can be used to specify an alternate stack frame
+ to start. The optional *file* argument has the same meaning as for
+ :func:`print_tb`.
+ .. versionchanged:: 3.5
+ Added negative *limit* support.
-.. function:: extract_tb(traceback, limit=None)
- Return a list of up to *limit* "pre-processed" stack trace entries extracted
- from the traceback object *traceback*. It is useful for alternate formatting of
- stack traces. If *limit* is omitted or ``None``, all entries are extracted. A
- "pre-processed" stack trace entry is a 4-tuple (*filename*, *line number*,
- *function name*, *text*) representing the information that is usually printed
- for a stack trace. The *text* is a string with leading and trailing whitespace
- stripped; if the source is not available it is ``None``.
+.. function:: extract_tb(tb, limit=None)
+
+ Return a list of "pre-processed" stack trace entries extracted from the
+ traceback object *tb*. It is useful for alternate formatting of
+ stack traces. The optional *limit* argument has the same meaning as for
+ :func:`print_tb`. A "pre-processed" stack trace entry is a 4-tuple
+ (*filename*, *line number*, *function name*, *text*) representing the
+ information that is usually printed for a stack trace. The *text* is a
+ string with leading and trailing whitespace stripped; if the source is
+ not available it is ``None``.
.. function:: extract_stack(f=None, limit=None)
@@ -85,39 +102,40 @@ The module defines the following functions:
arguments have the same meaning as for :func:`print_stack`.
-.. function:: format_list(list)
+.. function:: format_list(extracted_list)
Given a list of tuples as returned by :func:`extract_tb` or
- :func:`extract_stack`, return a list of strings ready for printing. Each string
- in the resulting list corresponds to the item with the same index in the
- argument list. Each string ends in a newline; the strings may contain internal
- newlines as well, for those items whose source text line is not ``None``.
+ :func:`extract_stack`, return a list of strings ready for printing. Each
+ string in the resulting list corresponds to the item with the same index in
+ the argument list. Each string ends in a newline; the strings may contain
+ internal newlines as well, for those items whose source text line is not
+ ``None``.
-.. function:: format_exception_only(type, value)
+.. function:: format_exception_only(etype, value)
- Format the exception part of a traceback. The arguments are the exception type
- and value such as given by ``sys.last_type`` and ``sys.last_value``. The return
- value is a list of strings, each ending in a newline. Normally, the list
- contains a single string; however, for :exc:`SyntaxError` exceptions, it
- contains several lines that (when printed) display detailed information about
- where the syntax error occurred. The message indicating which exception
- occurred is the always last string in the list.
+ Format the exception part of a traceback. The arguments are the exception
+ type and value such as given by ``sys.last_type`` and ``sys.last_value``.
+ The return value is a list of strings, each ending in a newline. Normally,
+ the list contains a single string; however, for :exc:`SyntaxError`
+ exceptions, it contains several lines that (when printed) display detailed
+ information about where the syntax error occurred. The message indicating
+ which exception occurred is the always last string in the list.
-.. function:: format_exception(type, value, tb, limit=None, chain=True)
+.. function:: format_exception(etype, value, tb, limit=None, chain=True)
Format a stack trace and the exception information. The arguments have the
same meaning as the corresponding arguments to :func:`print_exception`. The
- return value is a list of strings, each ending in a newline and some containing
- internal newlines. When these lines are concatenated and printed, exactly the
- same text is printed as does :func:`print_exception`.
+ return value is a list of strings, each ending in a newline and some
+ containing internal newlines. When these lines are concatenated and printed,
+ exactly the same text is printed as does :func:`print_exception`.
.. function:: format_exc(limit=None, chain=True)
- This is like ``print_exc(limit)`` but returns a string instead of printing to a
- file.
+ This is like ``print_exc(limit)`` but returns a string instead of printing to
+ a file.
.. function:: format_tb(tb, limit=None)
@@ -136,6 +154,162 @@ The module defines the following functions:
.. versionadded:: 3.4
+.. function:: walk_stack(f)
+
+ Walk a stack following ``f.f_back`` from the given frame, yielding the frame
+ and line number for each frame. If *f* is ``None``, the current stack is
+ used. This helper is used with :meth:`StackSummary.extract`.
+
+ .. versionadded:: 3.5
+
+.. function:: walk_tb(tb)
+
+ Walk a traceback following ``tb_next`` yielding the frame and line number
+ for each frame. This helper is used with :meth:`StackSummary.extract`.
+
+ .. versionadded:: 3.5
+
+The module also defines the following classes:
+
+:class:`TracebackException` Objects
+-----------------------------------
+
+.. versionadded:: 3.5
+
+:class:`TracebackException` objects are created from actual exceptions to
+capture data for later printing in a lightweight fashion.
+
+.. class:: TracebackException(exc_type, exc_value, exc_traceback, *, limit=None, lookup_lines=True, capture_locals=False)
+
+ Capture an exception for later rendering. *limit*, *lookup_lines* and
+ *capture_locals* are as for the :class:`StackSummary` class.
+
+ Note that when locals are captured, they are also shown in the traceback.
+
+ .. attribute:: __cause__
+
+ A :class:`TracebackException` of the original ``__cause__``.
+
+ .. attribute:: __context__
+
+ A :class:`TracebackException` of the original ``__context__``.
+
+ .. attribute:: __suppress_context__
+
+ The ``__suppress_context__`` value from the original exception.
+
+ .. attribute:: stack
+
+ A :class:`StackSummary` representing the traceback.
+
+ .. attribute:: exc_type
+
+ The class of the original traceback.
+
+ .. attribute:: filename
+
+ For syntax errors - the file name where the error occurred.
+
+ .. attribute:: lineno
+
+ For syntax errors - the line number where the error occurred.
+
+ .. attribute:: text
+
+ For syntax errors - the text where the error occurred.
+
+ .. attribute:: offset
+
+ For syntax errors - the offset into the text where the error occurred.
+
+ .. attribute:: msg
+
+ For syntax errors - the compiler error message.
+
+ .. classmethod:: from_exception(exc, *, limit=None, lookup_lines=True, capture_locals=False)
+
+ Capture an exception for later rendering. *limit*, *lookup_lines* and
+ *capture_locals* are as for the :class:`StackSummary` class.
+
+ Note that when locals are captured, they are also shown in the traceback.
+
+ .. method:: format(*, chain=True)
+
+ Format the exception.
+
+ If *chain* is not ``True``, ``__cause__`` and ``__context__`` will not
+ be formatted.
+
+ The return value is a generator of strings, each ending in a newline and
+ some containing internal newlines. :func:`~traceback.print_exception`
+ is a wrapper around this method which just prints the lines to a file.
+
+ The message indicating which exception occurred is always the last
+ string in the output.
+
+ .. method:: format_exception_only()
+
+ Format the exception part of the traceback.
+
+ The return value is a generator of strings, each ending in a newline.
+
+ Normally, the generator emits a single string; however, for
+ :exc:`SyntaxError` exceptions, it emits several lines that (when
+ printed) display detailed information about where the syntax
+ error occurred.
+
+ The message indicating which exception occurred is always the last
+ string in the output.
+
+
+:class:`StackSummary` Objects
+-----------------------------
+
+.. versionadded:: 3.5
+
+:class:`StackSummary` objects represent a call stack ready for formatting.
+
+.. class:: StackSummary
+
+ .. classmethod:: extract(frame_gen, *, limit=None, lookup_lines=True, capture_locals=False)
+
+ Construct a :class:`StackSummary` object from a frame generator (such as
+ is returned by :func:`~traceback.walk_stack` or
+ :func:`~traceback.walk_tb`).
+
+ If *limit* is supplied, only this many frames are taken from *frame_gen*.
+ If *lookup_lines* is ``False``, the returned :class:`FrameSummary`
+ objects will not have read their lines in yet, making the cost of
+ creating the :class:`StackSummary` cheaper (which may be valuable if it
+ may not actually get formatted). If *capture_locals* is ``True`` the
+ local variables in each :class:`FrameSummary` are captured as object
+ representations.
+
+ .. classmethod:: from_list(a_list)
+
+ Construct a :class:`StackSummary` object from a supplied old-style list
+ of tuples. Each tuple should be a 4-tuple with filename, lineno, name,
+ line as the elements.
+
+
+:class:`FrameSummary` Objects
+-----------------------------
+
+.. versionadded:: 3.5
+
+:class:`FrameSummary` objects represent a single frame in a traceback.
+
+.. class:: FrameSummary(filename, lineno, name, lookup_line=True, locals=None, line=None)
+
+ Represent a single frame in the traceback or stack that is being formatted
+ or printed. It may optionally have a stringified version of the frames
+ locals included in it. If *lookup_line* is ``False``, the source code is not
+ looked up until the :class:`FrameSummary` has the :attr:`~FrameSummary.line`
+ attribute accessed (which also happens when casting it to a tuple).
+ :attr:`~FrameSummary.line` may be directly provided, and will prevent line
+ lookups happening at all. *locals* is an optional local variable
+ dictionary, and if supplied the variable representations are stored in the
+ summary for later display.
.. _traceback-example:
diff --git a/Doc/library/tracemalloc.rst b/Doc/library/tracemalloc.rst
index cd62e556fb..3a0b1e0797 100644
--- a/Doc/library/tracemalloc.rst
+++ b/Doc/library/tracemalloc.rst
@@ -6,6 +6,10 @@
.. versionadded:: 3.4
+**Source code:** :source:`Lib/tracemalloc.py`
+
+--------------
+
The tracemalloc module is a debug tool to trace memory blocks allocated by
Python. It provides the following information:
@@ -363,7 +367,7 @@ Filter
Filter on traces of memory blocks.
See the :func:`fnmatch.fnmatch` function for the syntax of
- *filename_pattern*. The ``'.pyc'`` and ``'.pyo'`` file extensions are
+ *filename_pattern*. The ``'.pyc'`` file extension is
replaced with ``'.py'``.
Examples:
@@ -374,6 +378,10 @@ Filter
:mod:`tracemalloc` module
* ``Filter(False, "<unknown>")`` excludes empty tracebacks
+
+ .. versionchanged:: 3.5
+ The ``'.pyo'`` file extension is no longer replaced with ``'.py'``.
+
.. attribute:: inclusive
If *inclusive* is ``True`` (include), only trace memory blocks allocated
@@ -616,7 +624,7 @@ Traceback
*limit* is set, only format the *limit* most recent frames.
Similar to the :func:`traceback.format_tb` function, except that
- :meth:`format` does not include newlines.
+ :meth:`.format` does not include newlines.
Example::
@@ -631,4 +639,3 @@ Traceback
obj = Object()
File "test.py", line 12
tb = tracemalloc.get_object_traceback(f())
-
diff --git a/Doc/library/tty.rst b/Doc/library/tty.rst
index d13c6f92d3..b30bc3c7ac 100644
--- a/Doc/library/tty.rst
+++ b/Doc/library/tty.rst
@@ -4,9 +4,13 @@
.. module:: tty
:platform: Unix
:synopsis: Utility functions that perform common terminal control operations.
+
.. moduleauthor:: Steen Lumholt
.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
+**Source code:** :source:`Lib/tty.py`
+
+--------------
The :mod:`tty` module defines functions for putting the tty into cbreak and raw
modes.
diff --git a/Doc/library/tulip_coro.dia b/Doc/library/tulip_coro.dia
index eccf4fa7f5..70a33e3c00 100644
--- a/Doc/library/tulip_coro.dia
+++ b/Doc/library/tulip_coro.dia
Binary files differ
diff --git a/Doc/library/tulip_coro.png b/Doc/library/tulip_coro.png
index 65b6951550..36ced8ddbf 100644
--- a/Doc/library/tulip_coro.png
+++ b/Doc/library/tulip_coro.png
Binary files differ
diff --git a/Doc/library/turtle.rst b/Doc/library/turtle.rst
index efe5c54edf..e4a82eaada 100644
--- a/Doc/library/turtle.rst
+++ b/Doc/library/turtle.rst
@@ -4,13 +4,18 @@
.. module:: turtle
:synopsis: An educational framework for simple graphics applications
+
.. sectionauthor:: Gregor Lingl <gregor.lingl@aon.at>
+**Source code:** :source:`Lib/turtle.py`
+
.. testsetup:: default
from turtle import *
turtle = Turtle()
+--------------
+
Introduction
============
@@ -1879,7 +1884,7 @@ Settings and special methods
>>> cv = screen.getcanvas()
>>> cv
- <turtle.ScrolledCanvas object at ...>
+ <turtle.ScrolledCanvas object ...>
.. function:: getshapes()
@@ -2351,6 +2356,9 @@ The demo scripts are:
| | pairwise in opposite | shapesize, tilt, |
| | direction | get_shapepoly, update |
+----------------+------------------------------+-----------------------+
+| sorting_animate| visual demonstration of | simple alignment, |
+| | different sorting methods | randomization |
++----------------+------------------------------+-----------------------+
| tree | a (graphical) breadth | :func:`clone` |
| | first tree (using generators)| |
+----------------+------------------------------+-----------------------+
diff --git a/Doc/library/types.rst b/Doc/library/types.rst
index abdb939d1a..118bc4c29d 100644
--- a/Doc/library/types.rst
+++ b/Doc/library/types.rst
@@ -86,8 +86,16 @@ Standard names are defined for the following types:
.. data:: GeneratorType
- The type of :term:`generator`-iterator objects, produced by calling a
- generator function.
+ The type of :term:`generator`-iterator objects, created by
+ generator functions.
+
+
+.. data:: CoroutineType
+
+ The type of :term:`coroutine` objects, created by
+ :keyword:`async def` functions.
+
+ .. versionadded:: 3.5
.. data:: CodeType
@@ -115,6 +123,10 @@ Standard names are defined for the following types:
The type of :term:`modules <module>`. Constructor takes the name of the
module to be created and optionally its :term:`docstring`.
+ .. note::
+ Use :func:`importlib.util.module_from_spec` to create a new module if you
+ wish to set the various import-controlled attributes.
+
.. attribute:: __doc__
The :term:`docstring` of the module. Defaults to ``None``.
@@ -240,10 +252,12 @@ Additional Utility Classes and Functions
class SimpleNamespace:
def __init__(self, **kwargs):
self.__dict__.update(kwargs)
+
def __repr__(self):
keys = sorted(self.__dict__)
items = ("{}={!r}".format(k, self.__dict__[k]) for k in keys)
return "{}({})".format(type(self).__name__, ", ".join(items))
+
def __eq__(self, other):
return self.__dict__ == other.__dict__
@@ -267,3 +281,25 @@ Additional Utility Classes and Functions
attributes on the class with the same name (see Enum for an example).
.. versionadded:: 3.4
+
+
+Coroutine Utility Functions
+---------------------------
+
+.. function:: coroutine(gen_func)
+
+ This function transforms a :term:`generator` function into a
+ :term:`coroutine function` which returns a generator-based coroutine.
+ The generator-based coroutine is still a :term:`generator iterator`,
+ but is also considered to be a :term:`coroutine` object and is
+ :term:`awaitable`. However, it may not necessarily implement
+ the :meth:`__await__` method.
+
+ If *gen_func* is a generator function, it will be modified in-place.
+
+ If *gen_func* is not a generator function, it will be wrapped. If it
+ returns an instance of :class:`collections.abc.Generator`, the instance
+ will be wrapped in an *awaitable* proxy object. All other types
+ of objects will be returned as is.
+
+ .. versionadded:: 3.5
diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst
new file mode 100644
index 0000000000..731e2eca16
--- /dev/null
+++ b/Doc/library/typing.rst
@@ -0,0 +1,533 @@
+:mod:`typing` --- Support for type hints
+========================================
+
+.. module:: typing
+ :synopsis: Support for type hints (see PEP 484).
+
+.. versionadded:: 3.5
+
+**Source code:** :source:`Lib/typing.py`
+
+--------------
+
+This module supports type hints as specified by :pep:`484`. The most
+fundamental support consists of the type :class:`Any`, :class:`Union`,
+:class:`Tuple`, :class:`Callable`, :class:`TypeVar`, and
+:class:`Generic`. For full specification please see :pep:`484`. For
+a simplified introduction to type hints see :pep:`483`.
+
+
+The function below takes and returns a string and is annotated as follows::
+
+ def greeting(name: str) -> str:
+ return 'Hello ' + name
+
+In the function ``greeting``, the argument ``name`` is expected to be of type
+:class:`str` and the return type :class:`str`. Subtypes are accepted as
+arguments.
+
+Type aliases
+------------
+
+A type alias is defined by assigning the type to the alias::
+
+ Vector = List[float]
+
+Callable
+--------
+
+Frameworks expecting callback functions of specific signatures might be
+type hinted using ``Callable[[Arg1Type, Arg2Type], ReturnType]``.
+
+For example::
+
+ from typing import Callable
+
+ def feeder(get_next_item: Callable[[], str]) -> None:
+ # Body
+
+ def async_query(on_success: Callable[[int], None],
+ on_error: Callable[[int, Exception], None]) -> None:
+ # Body
+
+It is possible to declare the return type of a callable without specifying
+the call signature by substituting a literal ellipsis
+for the list of arguments in the type hint: ``Callable[..., ReturnType]``.
+``None`` as a type hint is a special case and is replaced by ``type(None)``.
+
+Generics
+--------
+
+Since type information about objects kept in containers cannot be statically
+inferred in a generic way, abstract base classes have been extended to support
+subscription to denote expected types for container elements.
+
+::
+
+ from typing import Mapping, Sequence
+
+ def notify_by_email(employees: Sequence[Employee],
+ overrides: Mapping[str, str]) -> None: ...
+
+Generics can be parametrized by using a new factory available in typing
+called :class:`TypeVar`.
+
+::
+
+ from typing import Sequence, TypeVar
+
+ T = TypeVar('T') # Declare type variable
+
+ def first(l: Sequence[T]) -> T: # Generic function
+ return l[0]
+
+
+User-defined generic types
+--------------------------
+
+A user-defined class can be defined as a generic class.
+
+::
+
+ from typing import TypeVar, Generic
+ from logging import Logger
+
+ T = TypeVar('T')
+
+ class LoggedVar(Generic[T]):
+ def __init__(self, value: T, name: str, logger: Logger) -> None:
+ self.name = name
+ self.logger = logger
+ self.value = value
+
+ def set(self, new: T) -> None:
+ self.log('Set ' + repr(self.value))
+ self.value = new
+
+ def get(self) -> T:
+ self.log('Get ' + repr(self.value))
+ return self.value
+
+ def log(self, message: str) -> None:
+ self.logger.info('{}: {}'.format(self.name, message))
+
+``Generic[T]`` as a base class defines that the class ``LoggedVar`` takes a
+single type parameter ``T`` . This also makes ``T`` valid as a type within the
+class body.
+
+The :class:`Generic` base class uses a metaclass that defines
+:meth:`__getitem__` so that ``LoggedVar[t]`` is valid as a type::
+
+ from typing import Iterable
+
+ def zero_all_vars(vars: Iterable[LoggedVar[int]]) -> None:
+ for var in vars:
+ var.set(0)
+
+A generic type can have any number of type variables, and type variables may
+be constrained::
+
+ from typing import TypeVar, Generic
+ ...
+
+ T = TypeVar('T')
+ S = TypeVar('S', int, str)
+
+ class StrangePair(Generic[T, S]):
+ ...
+
+Each type variable argument to :class:`Generic` must be distinct.
+This is thus invalid::
+
+ from typing import TypeVar, Generic
+ ...
+
+ T = TypeVar('T')
+
+ class Pair(Generic[T, T]): # INVALID
+ ...
+
+You can use multiple inheritance with :class:`Generic`::
+
+ from typing import TypeVar, Generic, Sized
+
+ T = TypeVar('T')
+
+ class LinkedList(Sized, Generic[T]):
+ ...
+
+When inheriting from generic classes, some type variables could be fixed::
+
+ from typing import TypeVar, Mapping
+
+ T = TypeVar('T')
+
+ class MyDict(Mapping[str, T]):
+ ...
+
+In this case ``MyDict`` has a single parameter, ``T``.
+
+Subclassing a generic class without specifying type parameters assumes
+:class:`Any` for each position. In the following example, ``MyIterable`` is
+not generic but implicitly inherits from ``Iterable[Any]``::
+
+ from typing import Iterable
+
+ class MyIterable(Iterable): # Same as Iterable[Any]
+
+The metaclass used by :class:`Generic` is a subclass of :class:`abc.ABCMeta`.
+A generic class can be an ABC by including abstract methods or properties,
+and generic classes can also have ABCs as base classes without a metaclass
+conflict. Generic metaclasses are not supported.
+
+
+The :class:`Any` type
+---------------------
+
+A special kind of type is :class:`Any`. Every type is a subtype of
+:class:`Any`. This is also true for the builtin type object. However, to the
+static type checker these are completely different.
+
+When the type of a value is :class:`object`, the type checker will reject
+almost all operations on it, and assigning it to a variable (or using it as a
+return value) of a more specialized type is a type error. On the other hand,
+when a value has type :class:`Any`, the type checker will allow all operations
+on it, and a value of type :class:`Any` can be assigned to a variable (or used
+as a return value) of a more constrained type.
+
+
+Classes, functions, and decorators
+----------------------------------
+
+The module defines the following classes, functions and decorators:
+
+.. class:: Any
+
+ Special type indicating an unconstrained type.
+
+ * Any object is an instance of :class:`Any`.
+ * Any class is a subclass of :class:`Any`.
+ * As a special case, :class:`Any` and :class:`object` are subclasses of
+ each other.
+
+.. class:: TypeVar
+
+ Type variable.
+
+ Usage::
+
+ T = TypeVar('T') # Can be anything
+ A = TypeVar('A', str, bytes) # Must be str or bytes
+
+ Type variables exist primarily for the benefit of static type
+ checkers. They serve as the parameters for generic types as well
+ as for generic function definitions. See class Generic for more
+ information on generic types. Generic functions work as follows::
+
+ def repeat(x: T, n: int) -> Sequence[T]:
+ """Return a list containing n references to x."""
+ return [x]*n
+
+ def longest(x: A, y: A) -> A:
+ """Return the longest of two strings."""
+ return x if len(x) >= len(y) else y
+
+ The latter example's signature is essentially the overloading
+ of ``(str, str) -> str`` and ``(bytes, bytes) -> bytes``. Also note
+ that if the arguments are instances of some subclass of :class:`str`,
+ the return type is still plain :class:`str`.
+
+ At runtime, ``isinstance(x, T)`` will raise :exc:`TypeError`. In general,
+ :func:`isinstance` and :func:`issubclass` should not be used with types.
+
+ Type variables may be marked covariant or contravariant by passing
+ ``covariant=True`` or ``contravariant=True``. See :pep:`484` for more
+ details. By default type variables are invariant. Alternatively,
+ a type variable may specify an upper bound using ``bound=<type>``.
+ This means that an actual type substituted (explicitly or implicitly)
+ for the type variable must be a subclass of the boundary type,
+ see :pep:`484`.
+
+.. class:: Union
+
+ Union type; ``Union[X, Y]`` means either X or Y.
+
+ To define a union, use e.g. ``Union[int, str]``. Details:
+
+ * The arguments must be types and there must be at least one.
+
+ * Unions of unions are flattened, e.g.::
+
+ Union[Union[int, str], float] == Union[int, str, float]
+
+ * Unions of a single argument vanish, e.g.::
+
+ Union[int] == int # The constructor actually returns int
+
+ * Redundant arguments are skipped, e.g.::
+
+ Union[int, str, int] == Union[int, str]
+
+ * When comparing unions, the argument order is ignored, e.g.::
+
+ Union[int, str] == Union[str, int]
+
+ * If :class:`Any` is present it is the sole survivor, e.g.::
+
+ Union[int, Any] == Any
+
+ * You cannot subclass or instantiate a union.
+
+ * You cannot write ``Union[X][Y]``.
+
+ * You can use ``Optional[X]`` as a shorthand for ``Union[X, None]``.
+
+.. class:: Optional
+
+ Optional type.
+
+ ``Optional[X]`` is equivalent to ``Union[X, type(None)]``.
+
+ Note that this is not the same concept as an optional argument,
+ which is one that has a default. An optional argument with a
+ default needn't use the ``Optional`` qualifier on its type
+ annotation (although it is inferred if the default is ``None``).
+ A mandatory argument may still have an ``Optional`` type if an
+ explicit value of ``None`` is allowed.
+
+.. class:: Tuple
+
+ Tuple type; ``Tuple[X, Y]`` is the type of a tuple of two items
+ with the first item of type X and the second of type Y.
+
+ Example: ``Tuple[T1, T2]`` is a tuple of two elements corresponding
+ to type variables T1 and T2. ``Tuple[int, float, str]`` is a tuple
+ of an int, a float and a string.
+
+ To specify a variable-length tuple of homogeneous type,
+ use literal ellipsis, e.g. ``Tuple[int, ...]``.
+
+.. class:: Callable
+
+ Callable type; ``Callable[[int], str]`` is a function of (int) -> str.
+
+ The subscription syntax must always be used with exactly two
+ values: the argument list and the return type. The argument list
+ must be a list of types; the return type must be a single type.
+
+ There is no syntax to indicate optional or keyword arguments,
+ such function types are rarely used as callback types.
+ ``Callable[..., ReturnType]`` could be used to type hint a callable
+ taking any number of arguments and returning ``ReturnType``.
+ A plain :class:`Callable` is equivalent to ``Callable[..., Any]``.
+
+.. class:: Generic
+
+ Abstract base class for generic types.
+
+ A generic type is typically declared by inheriting from an
+ instantiation of this class with one or more type variables.
+ For example, a generic mapping type might be defined as::
+
+ class Mapping(Generic[KT, VT]):
+ def __getitem__(self, key: KT) -> VT:
+ ...
+ # Etc.
+
+ This class can then be used as follows::
+
+ X = TypeVar('X')
+ Y = TypeVar('Y')
+
+ def lookup_name(mapping: Mapping[X, Y], key: X, default: Y) -> Y:
+ try:
+ return mapping[key]
+ except KeyError:
+ return default
+
+.. class:: Iterable(Generic[T_co])
+
+ A generic version of the :class:`collections.abc.Iterable`.
+
+.. class:: Iterator(Iterable[T_co])
+
+ A generic version of the :class:`collections.abc.Iterator`.
+
+.. class:: SupportsInt
+
+ An ABC with one abstract method ``__int__``.
+
+.. class:: SupportsFloat
+
+ An ABC with one abstract method ``__float__``.
+
+.. class:: SupportsAbs
+
+ An ABC with one abstract method ``__abs__`` that is covariant
+ in its return type.
+
+.. class:: SupportsRound
+
+ An ABC with one abstract method ``__round__``
+ that is covariant in its return type.
+
+.. class:: Reversible
+
+ An ABC with one abstract method ``__reversed__`` returning
+ an ``Iterator[T_co]``.
+
+.. class:: Container(Generic[T_co])
+
+ A generic version of :class:`collections.abc.Container`.
+
+.. class:: AbstractSet(Sized, Iterable[T_co], Container[T_co])
+
+ A generic version of :class:`collections.abc.Set`.
+
+.. class:: MutableSet(AbstractSet[T])
+
+ A generic version of :class:`collections.abc.MutableSet`.
+
+.. class:: Mapping(Sized, Iterable[KT], Container[KT], Generic[VT_co])
+
+ A generic version of :class:`collections.abc.Mapping`.
+
+.. class:: MutableMapping(Mapping[KT, VT])
+
+ A generic version of :class:`collections.abc.MutableMapping`.
+
+.. class:: Sequence(Sized, Iterable[T_co], Container[T_co])
+
+ A generic version of :class:`collections.abc.Sequence`.
+
+.. class:: MutableSequence(Sequence[T])
+
+ A generic version of :class:`collections.abc.MutableSequence`.
+
+.. class:: ByteString(Sequence[int])
+
+ A generic version of :class:`collections.abc.ByteString`.
+
+ This type represents the types :class:`bytes`, :class:`bytearray`,
+ and :class:`memoryview`.
+
+ As a shorthand for this type, :class:`bytes` can be used to
+ annotate arguments of any of the types mentioned above.
+
+.. class:: List(list, MutableSequence[T])
+
+ Generic version of :class:`list`.
+ Useful for annotating return types. To annotate arguments it is preferred
+ to use abstract collection types such as :class:`Mapping`, :class:`Sequence`,
+ or :class:`AbstractSet`.
+
+ This type may be used as follows::
+
+ T = TypeVar('T', int, float)
+
+ def vec2(x: T, y: T) -> List[T]:
+ return [x, y]
+
+ def slice__to_4(vector: Sequence[T]) -> List[T]:
+ return vector[0:4]
+
+.. class:: Set(set, MutableSet[T])
+
+ A generic version of :class:`builtins.set <set>`.
+
+.. class:: MappingView(Sized, Iterable[T_co])
+
+ A generic version of :class:`collections.abc.MappingView`.
+
+.. class:: KeysView(MappingView[KT_co], AbstractSet[KT_co])
+
+ A generic version of :class:`collections.abc.KeysView`.
+
+.. class:: ItemsView(MappingView, Generic[KT_co, VT_co])
+
+ A generic version of :class:`collections.abc.ItemsView`.
+
+.. class:: ValuesView(MappingView[VT_co])
+
+ A generic version of :class:`collections.abc.ValuesView`.
+
+.. class:: Dict(dict, MutableMapping[KT, VT])
+
+ A generic version of :class:`dict`.
+ The usage of this type is as follows::
+
+ def get_position_in_index(word_list: Dict[str, int], word: str) -> int:
+ return word_list[word]
+
+.. class:: Generator(Iterator[T_co], Generic[T_co, T_contra, V_co])
+
+.. class:: io
+
+ Wrapper namespace for I/O stream types.
+
+ This defines the generic type ``IO[AnyStr]`` and aliases ``TextIO``
+ and ``BinaryIO`` for respectively ``IO[str]`` and ``IO[bytes]``.
+ These representing the types of I/O streams such as returned by
+ :func:`open`.
+
+.. class:: re
+
+ Wrapper namespace for regular expression matching types.
+
+ This defines the type aliases ``Pattern`` and ``Match`` which
+ correspond to the return types from :func:`re.compile` and
+ :func:`re.match`. These types (and the corresponding functions)
+ are generic in ``AnyStr`` and can be made specific by writing
+ ``Pattern[str]``, ``Pattern[bytes]``, ``Match[str]``, or
+ ``Match[bytes]``.
+
+.. function:: NamedTuple(typename, fields)
+
+ Typed version of namedtuple.
+
+ Usage::
+
+ Employee = typing.NamedTuple('Employee', [('name', str), ('id', int)])
+
+ This is equivalent to::
+
+ Employee = collections.namedtuple('Employee', ['name', 'id'])
+
+ The resulting class has one extra attribute: _field_types,
+ giving a dict mapping field names to types. (The field names
+ are in the _fields attribute, which is part of the namedtuple
+ API.)
+
+.. function:: cast(typ, val)
+
+ Cast a value to a type.
+
+ This returns the value unchanged. To the type checker this
+ signals that the return value has the designated type, but at
+ runtime we intentionally don't check anything (we want this
+ to be as fast as possible).
+
+.. function:: get_type_hints(obj)
+
+ Return type hints for a function or method object.
+
+ This is often the same as ``obj.__annotations__``, but it handles
+ forward references encoded as string literals, and if necessary
+ adds ``Optional[t]`` if a default value equal to None is set.
+
+.. decorator:: no_type_check(arg)
+
+ Decorator to indicate that annotations are not type hints.
+
+ The argument must be a class or function; if it is a class, it
+ applies recursively to all methods defined in that class (but not
+ to methods defined in its superclasses or subclasses).
+
+ This mutates the function(s) in place.
+
+.. decorator:: no_type_check_decorator(decorator)
+
+ Decorator to give another decorator the :func:`no_type_check` effect.
+
+ This wraps the decorator with something that wraps the decorated
+ function in :func:`no_type_check`.
diff --git a/Doc/library/unicodedata.rst b/Doc/library/unicodedata.rst
index 3b3d3a0a8f..6cd8132f8a 100644
--- a/Doc/library/unicodedata.rst
+++ b/Doc/library/unicodedata.rst
@@ -3,20 +3,22 @@
.. module:: unicodedata
:synopsis: Access the Unicode Database.
+
.. moduleauthor:: Marc-André Lemburg <mal@lemburg.com>
.. sectionauthor:: Marc-André Lemburg <mal@lemburg.com>
.. sectionauthor:: Martin v. Löwis <martin@v.loewis.de>
-
.. index::
single: Unicode
single: character
pair: Unicode; database
+--------------
+
This module provides access to the Unicode Character Database (UCD) which
defines character properties for all Unicode characters. The data contained in
-this database is compiled from the `UCD version 6.3.0
-<http://www.unicode.org/Public/6.3.0/ucd>`_.
+this database is compiled from the `UCD version 8.0.0
+<http://www.unicode.org/Public/8.0.0/ucd>`_.
The module uses the same names and symbols as defined by Unicode
Standard Annex #44, `"Unicode Character Database"
@@ -166,6 +168,6 @@ Examples:
.. rubric:: Footnotes
-.. [#] http://www.unicode.org/Public/6.3.0/ucd/NameAliases.txt
+.. [#] http://www.unicode.org/Public/8.0.0/ucd/NameAliases.txt
-.. [#] http://www.unicode.org/Public/6.3.0/ucd/NamedSequences.txt
+.. [#] http://www.unicode.org/Public/8.0.0/ucd/NamedSequences.txt
diff --git a/Doc/library/unittest.mock-examples.rst b/Doc/library/unittest.mock-examples.rst
index 055abe0de1..05f33740d7 100644
--- a/Doc/library/unittest.mock-examples.rst
+++ b/Doc/library/unittest.mock-examples.rst
@@ -359,7 +359,7 @@ The module name can be 'dotted', in the form ``package.module`` if needed:
A nice pattern is to actually decorate test methods themselves:
- >>> class MyTest(unittest2.TestCase):
+ >>> class MyTest(unittest.TestCase):
... @patch.object(SomeClass, 'attribute', sentinel.attribute)
... def test_something(self):
... self.assertEqual(SomeClass.attribute, sentinel.attribute)
@@ -372,7 +372,7 @@ If you want to patch with a Mock, you can use :func:`patch` with only one argume
(or :func:`patch.object` with two arguments). The mock will be created for you and
passed into the test function / method:
- >>> class MyTest(unittest2.TestCase):
+ >>> class MyTest(unittest.TestCase):
... @patch.object(SomeClass, 'static_method')
... def test_something(self, mock_method):
... SomeClass.static_method()
@@ -382,7 +382,7 @@ passed into the test function / method:
You can stack up multiple patch decorators using this pattern:
- >>> class MyTest(unittest2.TestCase):
+ >>> class MyTest(unittest.TestCase):
... @patch('package.module.ClassName1')
... @patch('package.module.ClassName2')
... def test_something(self, MockClass2, MockClass1):
@@ -549,7 +549,7 @@ Calls to the date constructor are recorded in the ``mock_date`` attributes
An alternative way of dealing with mocking dates, or other builtin classes,
is discussed in `this blog entry
-<http://www.williamjohnbert.com/2011/07/how-to-unit-testing-in-django-with-mocking-and-patching/>`_.
+<https://williambert.online/2011/07/how-to-unit-testing-in-django-with-mocking-and-patching/>`_.
Mocking a Generator Method
@@ -1010,7 +1010,7 @@ subclass.
Sometimes this is inconvenient. For example, `one user
<https://code.google.com/p/mock/issues/detail?id=105>`_ is subclassing mock to
created a `Twisted adaptor
-<http://twistedmatrix.com/documents/11.0.0/api/twisted.python.components.html>`_.
+<https://twistedmatrix.com/documents/11.0.0/api/twisted.python.components.html>`_.
Having this applied to attributes too actually causes errors.
``Mock`` (in all its flavours) uses a method called ``_get_child_mock`` to create
@@ -1251,7 +1251,7 @@ With a bit of tweaking you could have the comparison function raise the
:exc:`AssertionError` directly and provide a more useful failure message.
As of version 1.5, the Python testing library `PyHamcrest
-<https://pypi.python.org/pypi/PyHamcrest>`_ provides similar functionality,
+<https://pyhamcrest.readthedocs.org/>`_ provides similar functionality,
that may be useful here, in the form of its equality matcher
(`hamcrest.library.integration.match_equality
-<http://pythonhosted.org/PyHamcrest/integration.html#hamcrest.library.integration.match_equality.match_equality>`_).
+<https://pyhamcrest.readthedocs.org/en/release-1.8/integration/#module-hamcrest.library.integration.match_equality>`_).
diff --git a/Doc/library/unittest.mock.rst b/Doc/library/unittest.mock.rst
index d7d735c5f5..5c9177a9c8 100644
--- a/Doc/library/unittest.mock.rst
+++ b/Doc/library/unittest.mock.rst
@@ -4,11 +4,16 @@
.. module:: unittest.mock
:synopsis: Mock object library.
+
.. moduleauthor:: Michael Foord <michael@python.org>
.. currentmodule:: unittest.mock
.. versionadded:: 3.3
+**Source code:** :source:`Lib/unittest/mock.py`
+
+--------------
+
:mod:`unittest.mock` is a library for testing in Python. It allows you to
replace parts of your system under test with mock objects and make assertions
about how they have been used.
@@ -32,8 +37,6 @@ used by many mocking frameworks.
There is a backport of :mod:`unittest.mock` for earlier versions of Python,
available as `mock on PyPI <https://pypi.python.org/pypi/mock>`_.
-**Source code:** :source:`Lib/unittest/mock.py`
-
Quick Guide
-----------
@@ -198,7 +201,7 @@ a :class:`MagicMock` for you. You can specify an alternative class of :class:`Mo
the *new_callable* argument to :func:`patch`.
-.. class:: Mock(spec=None, side_effect=None, return_value=DEFAULT, wraps=None, name=None, spec_set=None, **kwargs)
+.. class:: Mock(spec=None, side_effect=None, return_value=DEFAULT, wraps=None, name=None, spec_set=None, unsafe=False, **kwargs)
Create a new :class:`Mock` object. :class:`Mock` takes several optional arguments
that specify the behaviour of the Mock object:
@@ -235,6 +238,12 @@ the *new_callable* argument to :func:`patch`.
this is a new Mock (created on first access). See the
:attr:`return_value` attribute.
+ * *unsafe*: By default if any attribute starts with *assert* or
+ *assret* will raise an :exc:`AttributeError`. Passing ``unsafe=True``
+ will allow access to these attributes.
+
+ .. versionadded:: 3.5
+
* *wraps*: Item for the mock object to wrap. If *wraps* is not None then
calling the Mock will pass the call through to the wrapped object
(returning the real result). Attribute access on the mock will return a
@@ -315,6 +324,20 @@ the *new_callable* argument to :func:`patch`.
>>> calls = [call(4), call(2), call(3)]
>>> mock.assert_has_calls(calls, any_order=True)
+ .. method:: assert_not_called(*args, **kwargs)
+
+ Assert the mock was never called.
+
+ >>> m = Mock()
+ >>> m.hello.assert_not_called()
+ >>> obj = m.hello()
+ >>> m.hello.assert_not_called()
+ Traceback (most recent call last):
+ ...
+ AssertionError: Expected 'hello' to not have been called. Called 1 times.
+
+ .. versionadded:: 3.5
+
.. method:: reset_mock()
@@ -1032,6 +1055,12 @@ patch
default because it can be dangerous. With it switched on you can write
passing tests against APIs that don't actually exist!
+ .. note::
+
+ .. versionchanged:: 3.5
+ If you are patching builtins in a module then you don't
+ need to pass ``create=True``, it will be added by default.
+
Patch can be used as a :class:`TestCase` class decorator. It works by
decorating each test method in the class. This reduces the boilerplate
code when your test methods share a common patchings set. :func:`patch` finds
@@ -1403,6 +1432,22 @@ It is also possible to stop all patches which have been started by using
Stop all active patches. Only stops patches started with ``start``.
+.. _patch-builtins:
+
+patch builtins
+~~~~~~~~~~~~~~
+You can patch any builtins within a module. The following example patches
+builtin :func:`ord`:
+
+ >>> @patch('__main__.ord')
+ ... def test(mock_ord):
+ ... mock_ord.return_value = 101
+ ... print(ord('c'))
+ ...
+ >>> test()
+ 101
+
+
TEST_PREFIX
~~~~~~~~~~~
@@ -1587,7 +1632,7 @@ The full list of supported magic methods is:
* Context manager: ``__enter__`` and ``__exit__``
* Unary numeric methods: ``__neg__``, ``__pos__`` and ``__invert__``
* The numeric methods (including right hand and in-place variants):
- ``__add__``, ``__sub__``, ``__mul__``, ``__div__``, ``__truediv__``,
+ ``__add__``, ``__sub__``, ``__mul__``, ``__matmul__``, ``__div__``, ``__truediv__``,
``__floordiv__``, ``__mod__``, ``__divmod__``, ``__lshift__``,
``__rshift__``, ``__and__``, ``__xor__``, ``__or__``, and ``__pow__``
* Numeric conversion methods: ``__complex__``, ``__int__``, ``__float__``
@@ -1655,7 +1700,7 @@ Methods and their defaults:
* ``__ge__``: NotImplemented
* ``__int__``: 1
* ``__contains__``: False
-* ``__len__``: 1
+* ``__len__``: 0
* ``__iter__``: iter([])
* ``__exit__``: False
* ``__complex__``: 1j
@@ -2006,7 +2051,7 @@ mock_open
The mock of :meth:`~io.IOBase.read` changed to consume *read_data* rather
than returning it on each call.
- .. versionchanged:: 3.4.4
+ .. versionchanged:: 3.5
*read_data* is now reset on each call to the *mock*.
Using :func:`open` as a context manager is a great way to ensure your file handles
@@ -2023,7 +2068,7 @@ Mocking context managers with a :class:`MagicMock` is common enough and fiddly
enough that a helper function is useful.
>>> m = mock_open()
- >>> with patch('__main__.open', m, create=True):
+ >>> with patch('__main__.open', m):
... with open('foo', 'w') as h:
... h.write('some stuff')
...
@@ -2038,7 +2083,7 @@ enough that a helper function is useful.
And for reading files:
- >>> with patch('__main__.open', mock_open(read_data='bibble'), create=True) as m:
+ >>> with patch('__main__.open', mock_open(read_data='bibble')) as m:
... with open('foo') as h:
... result = h.read()
...
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst
index a896fc165a..0fc02c4dbe 100644
--- a/Doc/library/unittest.rst
+++ b/Doc/library/unittest.rst
@@ -3,11 +3,16 @@
.. module:: unittest
:synopsis: Unit testing framework for Python.
+
.. moduleauthor:: Steve Purcell <stephen_purcell@yahoo.com>
.. sectionauthor:: Steve Purcell <stephen_purcell@yahoo.com>
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
.. sectionauthor:: Raymond Hettinger <python@rcn.com>
+**Source code:** :source:`Lib/unittest/__init__.py`
+
+--------------
+
(If you are already familiar with the basic concepts of testing, you might want
to skip to :ref:`the list of assert methods <assert-methods>`.)
@@ -67,7 +72,7 @@ test runner
a GUI tool for test discovery and execution. This is intended largely for ease of use
for those new to unit testing. For production environments it is
recommended that tests be driven by a continuous integration system such as
- `Buildbot <http://buildbot.net/>`_, `Jenkins <http://jenkins-ci.org/>`_
+ `Buildbot <https://buildbot.net/>`_, `Jenkins <https://jenkins.io/>`_
or `Hudson <http://hudson-ci.org/>`_.
@@ -86,19 +91,19 @@ Here is a short script to test three string methods::
class TestStringMethods(unittest.TestCase):
- def test_upper(self):
- self.assertEqual('foo'.upper(), 'FOO')
+ def test_upper(self):
+ self.assertEqual('foo'.upper(), 'FOO')
- def test_isupper(self):
- self.assertTrue('FOO'.isupper())
- self.assertFalse('Foo'.isupper())
+ def test_isupper(self):
+ self.assertTrue('FOO'.isupper())
+ self.assertFalse('Foo'.isupper())
- def test_split(self):
- s = 'hello world'
- self.assertEqual(s.split(), ['hello', 'world'])
- # check that s.split fails when the separator is not a string
- with self.assertRaises(TypeError):
- s.split(2)
+ def test_split(self):
+ s = 'hello world'
+ self.assertEqual(s.split(), ['hello', 'world'])
+ # check that s.split fails when the separator is not a string
+ with self.assertRaises(TypeError):
+ s.split(2)
if __name__ == '__main__':
unittest.main()
@@ -214,9 +219,16 @@ Command-line options
Stop the test run on the first error or failure.
+.. cmdoption:: --locals
+
+ Show local variables in tracebacks.
+
.. versionadded:: 3.2
The command-line options ``-b``, ``-c`` and ``-f`` were added.
+.. versionadded:: 3.5
+ The command-line option ``--locals``.
+
The command line can also be used for test discovery, for running all of the
tests in a project or just a subset.
@@ -673,10 +685,12 @@ Test cases
Method called immediately after the test method has been called and the
result recorded. This is called even if the test method raised an
exception, so the implementation in subclasses may need to be particularly
- careful about checking internal state. Any exception, other than :exc:`AssertionError`
- or :exc:`SkipTest`, raised by this method will be considered an error rather than a
- test failure. This method will only be called if the :meth:`setUp` succeeds,
- regardless of the outcome of the test method. The default implementation does nothing.
+ careful about checking internal state. Any exception, other than
+ :exc:`AssertionError` or :exc:`SkipTest`, raised by this method will be
+ considered an additional error rather than a test failure (thus increasing
+ the total number of reported errors). This method will only be called if
+ the :meth:`setUp` succeeds, regardless of the outcome of the test method.
+ The default implementation does nothing.
.. method:: setUpClass()
@@ -755,8 +769,9 @@ Test cases
.. _assert-methods:
- The :class:`TestCase` class provides a number of methods to check for and
- report failures, such as:
+ The :class:`TestCase` class provides several assert methods to check for and
+ report failures. The following table lists the most commonly used methods
+ (see the tables below for more assert methods):
+-----------------------------------------+-----------------------------+---------------+
| Method | Checks that | New in |
@@ -877,7 +892,7 @@ Test cases
- It is also possible to check the production of exceptions, warnings and
+ It is also possible to check the production of exceptions, warnings, and
log messages using the following methods:
+---------------------------------------------------------+--------------------------------------+------------+
@@ -1541,6 +1556,20 @@ Loading and running tests
:data:`unittest.defaultTestLoader`. Using a subclass or instance, however,
allows customization of some configurable properties.
+ :class:`TestLoader` objects have the following attributes:
+
+
+ .. attribute:: errors
+
+ A list of the non-fatal errors encountered while loading tests. Not reset
+ by the loader at any point. Fatal errors are signalled by the relevant
+ a method raising an exception to the caller. Non-fatal errors are also
+ indicated by a synthetic test that will raise the original error when
+ run.
+
+ .. versionadded:: 3.5
+
+
:class:`TestLoader` objects have the following methods:
@@ -1556,7 +1585,7 @@ Loading and running tests
case is created for that method instead.
- .. method:: loadTestsFromModule(module)
+ .. method:: loadTestsFromModule(module, pattern=None)
Return a suite of all tests cases contained in the given module. This
method searches *module* for classes derived from :class:`TestCase` and
@@ -1573,11 +1602,18 @@ Loading and running tests
If a module provides a ``load_tests`` function it will be called to
load the tests. This allows modules to customize test loading.
- This is the `load_tests protocol`_.
+ This is the `load_tests protocol`_. The *pattern* argument is passed as
+ the third argument to ``load_tests``.
.. versionchanged:: 3.2
Support for ``load_tests`` added.
+ .. versionchanged:: 3.5
+ The undocumented and unofficial *use_load_tests* default argument is
+ deprecated and ignored, although it is still accepted for backward
+ compatibility. The method also now accepts a keyword-only argument
+ *pattern* which is passed to ``load_tests`` as the third argument.
+
.. method:: loadTestsFromName(name, module=None)
@@ -1603,6 +1639,12 @@ Loading and running tests
The method optionally resolves *name* relative to the given *module*.
+ .. versionchanged:: 3.5
+ If an :exc:`ImportError` or :exc:`AttributeError` occurs while traversing
+ *name* then a synthetic test that raises that error when run will be
+ returned. These errors are included in the errors accumulated by
+ self.errors.
+
.. method:: loadTestsFromNames(names, module=None)
@@ -1629,18 +1671,22 @@ Loading and running tests
the start directory is not the top level directory then the top level
directory must be specified separately.
- If importing a module fails, for example due to a syntax error, then this
- will be recorded as a single error and discovery will continue. If the
- import failure is due to :exc:`SkipTest` being raised, it will be recorded
- as a skip instead of an error.
+ If importing a module fails, for example due to a syntax error, then
+ this will be recorded as a single error and discovery will continue. If
+ the import failure is due to :exc:`SkipTest` being raised, it will be
+ recorded as a skip instead of an error.
- If a test package name (directory with :file:`__init__.py`) matches the
- pattern then the package will be checked for a ``load_tests``
- function. If this exists then it will be called with *loader*, *tests*,
- *pattern*.
+ If a package (a directory containing a file named :file:`__init__.py`) is
+ found, the package will be checked for a ``load_tests`` function. If this
+ exists then it will be called
+ ``package.load_tests(loader, tests, pattern)``. Test discovery takes care
+ to ensure that a package is only checked for tests once during an
+ invocation, even if the load_tests function itself calls
+ ``loader.discover``.
- If ``load_tests`` exists then discovery does *not* recurse into the package,
- ``load_tests`` is responsible for loading all tests in the package.
+ If ``load_tests`` exists then discovery does *not* recurse into the
+ package, ``load_tests`` is responsible for loading all tests in the
+ package.
The pattern is deliberately not stored as a loader attribute so that
packages can continue discovery themselves. *top_level_dir* is stored so
@@ -1659,6 +1705,11 @@ Loading and running tests
the same even if the underlying file system's ordering is not
dependent on file name.
+ .. versionchanged:: 3.5
+ Found packages are now checked for ``load_tests`` regardless of
+ whether their path matches *pattern*, because it is impossible for
+ a package name to match the default pattern.
+
The following attributes of a :class:`TestLoader` can be configured either by
subclassing or assignment on an instance:
@@ -1741,12 +1792,10 @@ Loading and running tests
Set to ``True`` when the execution of tests should stop by :meth:`stop`.
-
.. attribute:: testsRun
The total number of tests run so far.
-
.. attribute:: buffer
If set to true, ``sys.stdout`` and ``sys.stderr`` will be buffered in between
@@ -1756,7 +1805,6 @@ Loading and running tests
.. versionadded:: 3.2
-
.. attribute:: failfast
If set to true :meth:`stop` will be called on the first failure or error,
@@ -1764,6 +1812,11 @@ Loading and running tests
.. versionadded:: 3.2
+ .. attribute:: tb_locals
+
+ If set to true then local variables will be shown in tracebacks.
+
+ .. versionadded:: 3.5
.. method:: wasSuccessful()
@@ -1774,7 +1827,6 @@ Loading and running tests
Returns ``False`` if there were any :attr:`unexpectedSuccesses`
from tests marked with the :func:`expectedFailure` decorator.
-
.. method:: stop()
This method can be called to signal that the set of tests being run should
@@ -1906,12 +1958,14 @@ Loading and running tests
.. class:: TextTestRunner(stream=None, descriptions=True, verbosity=1, failfast=False, \
- buffer=False, resultclass=None, warnings=None)
+ buffer=False, resultclass=None, warnings=None, *, tb_locals=False)
A basic test runner implementation that outputs results to a stream. If *stream*
is ``None``, the default, :data:`sys.stderr` is used as the output stream. This class
has a few configurable parameters, but is essentially very simple. Graphical
- applications which run test suites should provide alternate implementations.
+ applications which run test suites should provide alternate implementations. Such
+ implementations should accept ``**kwargs`` as the interface to construct runners
+ changes when features are added to unittest.
By default this runner shows :exc:`DeprecationWarning`,
:exc:`PendingDeprecationWarning`, :exc:`ResourceWarning` and
@@ -1930,6 +1984,9 @@ Loading and running tests
The default stream is set to :data:`sys.stderr` at instantiation time rather
than import time.
+ .. versionchanged:: 3.5
+ Added the tb_locals parameter.
+
.. method:: _makeResult()
This method returns the instance of ``TestResult`` used by :meth:`run`.
@@ -2027,7 +2084,10 @@ test runs or test discovery by implementing a function called ``load_tests``.
If a test module defines ``load_tests`` it will be called by
:meth:`TestLoader.loadTestsFromModule` with the following arguments::
- load_tests(loader, standard_tests, None)
+ load_tests(loader, standard_tests, pattern)
+
+where *pattern* is passed straight through from ``loadTestsFromModule``. It
+defaults to ``None``.
It should return a :class:`TestSuite`.
@@ -2049,21 +2109,12 @@ A typical ``load_tests`` function that loads tests from a specific set of
suite.addTests(tests)
return suite
-If discovery is started, either from the command line or by calling
-:meth:`TestLoader.discover`, with a pattern that matches a package
-name then the package :file:`__init__.py` will be checked for ``load_tests``.
-
-.. note::
-
- The default pattern is ``'test*.py'``. This matches all Python files
- that start with ``'test'`` but *won't* match any test directories.
-
- A pattern like ``'test*'`` will match test packages as well as
- modules.
-
-If the package :file:`__init__.py` defines ``load_tests`` then it will be
-called and discovery not continued into the package. ``load_tests``
-is called with the following arguments::
+If discovery is started in a directory containing a package, either from the
+command line or by calling :meth:`TestLoader.discover`, then the package
+:file:`__init__.py` will be checked for ``load_tests``. If that function does
+not exist, discovery will recurse into the package as though it were just
+another directory. Otherwise, discovery of the package's tests will be left up
+to ``load_tests`` which is called with the following arguments::
load_tests(loader, standard_tests, pattern)
@@ -2082,6 +2133,11 @@ continue (and potentially modify) test discovery. A 'do nothing'
standard_tests.addTests(package_tests)
return standard_tests
+.. versionchanged:: 3.5
+ Discovery no longer checks package names for matching *pattern* due to the
+ impossibility of package names matching the default pattern.
+
+
Class and Module Fixtures
-------------------------
diff --git a/Doc/library/urllib.error.rst b/Doc/library/urllib.error.rst
index f7f0c9739d..5517b04f5d 100644
--- a/Doc/library/urllib.error.rst
+++ b/Doc/library/urllib.error.rst
@@ -3,9 +3,13 @@
.. module:: urllib.error
:synopsis: Exception classes raised by urllib.request.
+
.. moduleauthor:: Jeremy Hylton <jeremy@alum.mit.edu>
.. sectionauthor:: Senthil Kumaran <orsenthil@gmail.com>
+**Source code:** :source:`Lib/urllib/error.py`
+
+--------------
The :mod:`urllib.error` module defines the exception classes for exceptions
raised by :mod:`urllib.request`. The base exception class is :exc:`URLError`.
diff --git a/Doc/library/urllib.parse.rst b/Doc/library/urllib.parse.rst
index ac04f99deb..c6de2303c6 100644
--- a/Doc/library/urllib.parse.rst
+++ b/Doc/library/urllib.parse.rst
@@ -4,6 +4,7 @@
.. module:: urllib.parse
:synopsis: Parse URLs into or assemble them from components.
+**Source code:** :source:`Lib/urllib/parse.py`
.. index::
single: WWW
@@ -12,8 +13,6 @@
pair: URL; parsing
pair: relative; URL
-**Source code:** :source:`Lib/urllib/parse.py`
-
--------------
This module defines a standard interface to break Uniform Resource Locator (URL)
@@ -270,6 +269,11 @@ or on combining URL components into a URL string.
:func:`urlunsplit`, removing possible *scheme* and *netloc* parts.
+ .. versionchanged:: 3.5
+
+ Behaviour updated to match the semantics defined in :rfc:`3986`.
+
+
.. function:: urldefrag(url)
If *url* contains a fragment identifier, return a modified version of *url*
@@ -516,7 +520,8 @@ task isn't already covered by the URL parsing functions above.
Example: ``unquote_to_bytes('a%26%EF')`` yields ``b'a&\xef'``.
-.. function:: urlencode(query, doseq=False, safe='', encoding=None, errors=None)
+.. function:: urlencode(query, doseq=False, safe='', encoding=None, \
+ errors=None, quote_via=quote_plus)
Convert a mapping object or a sequence of two-element tuples, which may
contain :class:`str` or :class:`bytes` objects, to a percent-encoded ASCII
@@ -526,8 +531,16 @@ task isn't already covered by the URL parsing functions above.
:exc:`TypeError`.
The resulting string is a series of ``key=value`` pairs separated by ``'&'``
- characters, where both *key* and *value* are quoted using :func:`quote_plus`
- above. When a sequence of two-element tuples is used as the *query*
+ characters, where both *key* and *value* are quoted using the *quote_via*
+ function. By default, :func:`quote_plus` is used to quote the values, which
+ means spaces are quoted as a ``'+'`` character and '/' characters are
+ encoded as ``%2F``, which follows the standard for GET requests
+ (``application/x-www-form-urlencoded``). An alternate function that can be
+ passed as *quote_via* is :func:`quote`, which will encode spaces as ``%20``
+ and not encode '/' characters. For maximum control of what is quoted, use
+ ``quote`` and specify a value for *safe*.
+
+ When a sequence of two-element tuples is used as the *query*
argument, the first element of each tuple is a key and the second is a
value. The value element in itself can be a sequence and in that case, if
the optional parameter *doseq* is evaluates to *True*, individual
@@ -536,7 +549,7 @@ task isn't already covered by the URL parsing functions above.
string will match the order of parameter tuples in the sequence.
The *safe*, *encoding*, and *errors* parameters are passed down to
- :func:`quote_plus` (the *encoding* and *errors* parameters are only passed
+ *quote_via* (the *encoding* and *errors* parameters are only passed
when a query element is a :class:`str`).
To reverse this encoding process, :func:`parse_qs` and :func:`parse_qsl` are
@@ -548,6 +561,9 @@ task isn't already covered by the URL parsing functions above.
.. versionchanged:: 3.2
Query parameter supports bytes and string objects.
+ .. versionadded:: 3.5
+ *quote_via* parameter.
+
.. seealso::
@@ -565,7 +581,7 @@ task isn't already covered by the URL parsing functions above.
Names (URNs) and Uniform Resource Locators (URLs).
:rfc:`2368` - The mailto URL scheme.
- Parsing requirements for mailto url schemes.
+ Parsing requirements for mailto URL schemes.
:rfc:`1808` - Relative Uniform Resource Locators
This Request For Comments includes the rules for joining an absolute and a
diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst
index 4e595deeb6..1338906b64 100644
--- a/Doc/library/urllib.request.rst
+++ b/Doc/library/urllib.request.rst
@@ -3,10 +3,14 @@
.. module:: urllib.request
:synopsis: Extensible library for opening URLs.
+
.. moduleauthor:: Jeremy Hylton <jeremy@alum.mit.edu>
.. sectionauthor:: Moshe Zadka <moshez@users.sourceforge.net>
.. sectionauthor:: Senthil Kumaran <senthil@uthcode.com>
+**Source code:** :source:`Lib/urllib/request.py`
+
+--------------
The :mod:`urllib.request` module defines functions and classes which help in
opening URLs (mostly HTTP) in a complex world --- basic and digest
@@ -14,8 +18,8 @@ authentication, redirections, cookies and more.
.. seealso::
- The `Requests package <http://requests.readthedocs.org/>`_
- is recommended for a higher-level http client interface.
+ The `Requests package <https://requests.readthedocs.org/>`_
+ is recommended for a higher-level HTTP client interface.
The :mod:`urllib.request` module defines the following functions:
@@ -59,7 +63,7 @@ The :mod:`urllib.request` module defines the following functions:
The *cadefault* parameter is ignored.
- This function always returns an object which can work as
+ This function always returns an object which can work as a
:term:`context manager` and has methods such as
* :meth:`~urllib.response.addinfourl.geturl` --- return the URL of the resource retrieved,
@@ -67,11 +71,11 @@ The :mod:`urllib.request` module defines the following functions:
* :meth:`~urllib.response.addinfourl.info` --- return the meta-information of the page, such as headers,
in the form of an :func:`email.message_from_string` instance (see
- `Quick Reference to HTTP Headers <http://www.cs.tut.fi/~jkorpela/http.html>`_)
+ `Quick Reference to HTTP Headers <https://www.cs.tut.fi/~jkorpela/http.html>`_)
* :meth:`~urllib.response.addinfourl.getcode` -- return the HTTP status code of the response.
- For http and https urls, this function returns a
+ For HTTP and HTTPS URLs, this function returns a
:class:`http.client.HTTPResponse` object slightly modified. In addition
to the three new methods above, the msg attribute contains the
same information as the :attr:`~http.client.HTTPResponse.reason`
@@ -79,11 +83,11 @@ The :mod:`urllib.request` module defines the following functions:
the response headers as it is specified in the documentation for
:class:`~http.client.HTTPResponse`.
- For ftp, file, and data urls and requests explicitly handled by legacy
+ For FTP, file, and data URLs and requests explicitly handled by legacy
:class:`URLopener` and :class:`FancyURLopener` classes, this function
returns a :class:`urllib.response.addinfourl` object.
- Raises :exc:`~urllib.error.URLError` on errors.
+ Raises :exc:`~urllib.error.URLError` on protocol errors.
Note that ``None`` may be returned if no handler handles the request (though
the default installed global :class:`OpenerDirector` uses
@@ -116,6 +120,7 @@ The :mod:`urllib.request` module defines the following functions:
.. versionchanged:: 3.4.3
*context* was added.
+
.. function:: install_opener(opener)
Install an :class:`OpenerDirector` instance as the default global opener.
@@ -165,6 +170,8 @@ The :mod:`urllib.request` module defines the following functions:
in a case insensitive approach, for all operating systems first, and when it
cannot find it, looks for proxy information from Mac OSX System
Configuration for Mac OS X and Windows Systems Registry for Windows.
+ If both lowercase and uppercase environment variables exist (and disagree),
+ lowercase is preferred.
The following classes are provided:
@@ -186,7 +193,7 @@ The following classes are provided:
*headers* should be a dictionary, and will be treated as if
:meth:`add_header` was called with each key and value as arguments.
- This is often used to "spoof" the ``User-Agent`` header, which is
+ This is often used to "spoof" the ``User-Agent`` header value, which is
used by a browser to identify itself -- some HTTP servers only
allow requests coming from common browsers as opposed to scripts.
For example, Mozilla Firefox may identify itself as ``"Mozilla/5.0
@@ -268,6 +275,11 @@ The following classes are provided:
To disable autodetected proxy pass an empty dictionary.
+ The :envvar:`no_proxy` environment variable can be used to specify hosts
+ which shouldn't be reached via proxy; if set, it should be a comma-separated
+ list of hostname suffixes, optionally with ``:port`` appended, for example
+ ``cern.ch,ncsa.uiuc.edu,some.host:8080``.
+
.. class:: HTTPPasswordMgr()
@@ -281,13 +293,37 @@ The following classes are provided:
fits.
+.. class:: HTTPPasswordMgrWithPriorAuth()
+
+ A variant of :class:`HTTPPasswordMgrWithDefaultRealm` that also has a
+ database of ``uri -> is_authenticated`` mappings. Can be used by a
+ BasicAuth handler to determine when to send authentication credentials
+ immediately instead of waiting for a ``401`` response first.
+
+ .. versionadded:: 3.5
+
+
.. class:: AbstractBasicAuthHandler(password_mgr=None)
This is a mixin class that helps with HTTP authentication, both to the remote
host and to a proxy. *password_mgr*, if given, should be something that is
compatible with :class:`HTTPPasswordMgr`; refer to section
:ref:`http-password-mgr` for information on the interface that must be
- supported.
+ supported. If *passwd_mgr* also provides ``is_authenticated`` and
+ ``update_authenticated`` methods (see
+ :ref:`http-password-mgr-with-prior-auth`), then the handler will use the
+ ``is_authenticated`` result for a given URI to determine whether or not to
+ send authentication credentials with the request. If ``is_authenticated``
+ returns ``True`` for the URI, credentials are sent. If ``is_authenticated``
+ is ``False``, credentials are not sent, and then if a ``401`` response is
+ received the request is re-sent with the authentication credentials. If
+ authentication succeeds, ``update_authenticated`` is called to set
+ ``is_authenticated`` ``True`` for the URI, so that subsequent requests to
+ the URI or any of its super-URIs will automatically include the
+ authentication credentials.
+
+ .. versionadded:: 3.5
+ Added ``is_authenticated`` support.
.. class:: HTTPBasicAuthHandler(password_mgr=None)
@@ -421,7 +457,7 @@ request.
.. attribute:: Request.selector
The URI path. If the :class:`Request` uses a proxy, then selector
- will be the full url that is passed to the proxy.
+ will be the full URL that is passed to the proxy.
.. attribute:: Request.data
@@ -740,8 +776,8 @@ HTTPRedirectHandler Objects
details of the precise meanings of the various redirection codes.
An :class:`HTTPError` exception raised as a security consideration if the
- HTTPRedirectHandler is presented with a redirected url which is not an HTTP,
- HTTPS or FTP url.
+ HTTPRedirectHandler is presented with a redirected URL which is not an HTTP,
+ HTTPS or FTP URL.
.. method:: HTTPRedirectHandler.redirect_request(req, fp, code, msg, hdrs, newurl)
@@ -839,6 +875,42 @@ These methods are available on :class:`HTTPPasswordMgr` and
searched if the given *realm* has no matching user/password.
+.. _http-password-mgr-with-prior-auth:
+
+HTTPPasswordMgrWithPriorAuth Objects
+------------------------------------
+
+This password manager extends :class:`HTTPPasswordMgrWithDefaultRealm` to support
+tracking URIs for which authentication credentials should always be sent.
+
+
+.. method:: HTTPPasswordMgrWithPriorAuth.add_password(realm, uri, user, \
+ passwd, is_authenticated=False)
+
+ *realm*, *uri*, *user*, *passwd* are as for
+ :meth:`HTTPPasswordMgr.add_password`. *is_authenticated* sets the initial
+ value of the ``is_authenticated`` flag for the given URI or list of URIs.
+ If *is_authenticated* is specified as ``True``, *realm* is ignored.
+
+
+.. method:: HTTPPasswordMgr.find_user_password(realm, authuri)
+
+ Same as for :class:`HTTPPasswordMgrWithDefaultRealm` objects
+
+
+.. method:: HTTPPasswordMgrWithPriorAuth.update_authenticated(self, uri, \
+ is_authenticated=False)
+
+ Update the ``is_authenticated`` flag for the given *uri* or list
+ of URIs.
+
+
+.. method:: HTTPPasswordMgrWithPriorAuth.is_authenticated(self, authuri)
+
+ Returns the current state of the ``is_authenticated`` flag for
+ the given URI.
+
+
.. _abstract-basic-auth-handler:
AbstractBasicAuthHandler Objects
@@ -1043,6 +1115,9 @@ HTTPErrorProcessor Objects
Examples
--------
+In addition to the examples below, more examples are given in
+:ref:`urllib-howto`.
+
This example gets the python.org main page and displays the first 300 bytes of
it. ::
@@ -1058,11 +1133,11 @@ it. ::
Note that urlopen returns a bytes object. This is because there is no way
for urlopen to automatically determine the encoding of the byte stream
-it receives from the http server. In general, a program will decode
+it receives from the HTTP server. In general, a program will decode
the returned bytes object to string once it determines or guesses
the appropriate encoding.
-The following W3C document, http://www.w3.org/International/O-charset\ , lists
+The following W3C document, https://www.w3.org/International/O-charset\ , lists
the various ways in which a (X)HTML or a XML document could have specified its
encoding information.
@@ -1106,7 +1181,7 @@ The code for the sample CGI used in the above example is::
Here is an example of doing a ``PUT`` request using :class:`Request`::
import urllib.request
- DATA=b'some data'
+ DATA = b'some data'
req = urllib.request.Request(url='http://localhost:8080', data=DATA,method='PUT')
with urllib.request.urlopen(req) as f:
pass
@@ -1152,6 +1227,8 @@ Use the *headers* argument to the :class:`Request` constructor, or::
import urllib.request
req = urllib.request.Request('http://www.example.com/')
req.add_header('Referer', 'http://www.python.org/')
+ # Customize the default User-Agent header value:
+ req.add_header('User-Agent', 'urllib-example/0.1 (Contact: . . .)')
r = urllib.request.urlopen(req)
:class:`OpenerDirector` automatically adds a :mailheader:`User-Agent` header to
diff --git a/Doc/library/urllib.robotparser.rst b/Doc/library/urllib.robotparser.rst
index f179de2f92..ba701c3b68 100644
--- a/Doc/library/urllib.robotparser.rst
+++ b/Doc/library/urllib.robotparser.rst
@@ -4,8 +4,10 @@
.. module:: urllib.robotparser
:synopsis: Load a robots.txt file and answer questions about
fetchability of other URLs.
+
.. sectionauthor:: Skip Montanaro <skip@pobox.com>
+**Source code:** :source:`Lib/urllib/robotparser.py`
.. index::
single: WWW
@@ -13,6 +15,8 @@
single: URL
single: robots.txt
+--------------
+
This module provides a single class, :class:`RobotFileParser`, which answers
questions about whether or not a particular user agent can fetch a URL on the
Web site that published the :file:`robots.txt` file. For more details on the
diff --git a/Doc/library/urllib.rst b/Doc/library/urllib.rst
index 8e308bc589..624e164625 100644
--- a/Doc/library/urllib.rst
+++ b/Doc/library/urllib.rst
@@ -3,6 +3,10 @@
.. module:: urllib
+**Source code:** :source:`Lib/urllib/`
+
+--------------
+
``urllib`` is a package that collects several modules for working with URLs:
* :mod:`urllib.request` for opening and reading URLs
diff --git a/Doc/library/uu.rst b/Doc/library/uu.rst
index d61c178831..33fb36d0b8 100644
--- a/Doc/library/uu.rst
+++ b/Doc/library/uu.rst
@@ -3,6 +3,7 @@
.. module:: uu
:synopsis: Encode and decode files in uuencode format.
+
.. moduleauthor:: Lance Ellinghouse
**Source code:** :source:`Lib/uu.py`
diff --git a/Doc/library/uuid.rst b/Doc/library/uuid.rst
index 7dc46acd05..53cbd6c770 100644
--- a/Doc/library/uuid.rst
+++ b/Doc/library/uuid.rst
@@ -6,6 +6,9 @@
.. moduleauthor:: Ka-Ping Yee <ping@zesty.ca>
.. sectionauthor:: George Yoshida <quiver@users.sourceforge.net>
+**Source code:** :source:`Lib/uuid.py`
+
+--------------
This module provides immutable :class:`UUID` objects (the :class:`UUID` class)
and the functions :func:`uuid1`, :func:`uuid3`, :func:`uuid4`, :func:`uuid5` for
diff --git a/Doc/library/venv.rst b/Doc/library/venv.rst
index e9ede8b415..af4a6d1ab4 100644
--- a/Doc/library/venv.rst
+++ b/Doc/library/venv.rst
@@ -3,15 +3,15 @@
.. module:: venv
:synopsis: Creation of virtual environments.
+
.. moduleauthor:: Vinay Sajip <vinay_sajip@yahoo.co.uk>
.. sectionauthor:: Vinay Sajip <vinay_sajip@yahoo.co.uk>
-
-.. index:: pair: Environments; virtual
-
.. versionadded:: 3.3
-**Source code:** :source:`Lib/venv`
+**Source code:** :source:`Lib/venv/`
+
+.. index:: pair: Environments; virtual
--------------
@@ -43,11 +43,6 @@ Creating virtual environments
Common installation tools such as ``Setuptools`` and ``pip`` work as
expected with venvs - i.e. when a venv is active, they install Python
packages into the venv without needing to be told to do so explicitly.
- Of course, you need to install them into the venv first: this could be
- done by running ``ez_setup.py`` with the venv activated,
- followed by running ``easy_install pip``. Alternatively, you could download
- the source tarballs and run ``python setup.py install`` after unpacking,
- with the venv activated.
When a venv is active (i.e. the venv's Python interpreter is running), the
attributes :attr:`sys.prefix` and :attr:`sys.exec_prefix` point to the base
diff --git a/Doc/library/warnings.rst b/Doc/library/warnings.rst
index 8a538adb9b..5212131764 100644
--- a/Doc/library/warnings.rst
+++ b/Doc/library/warnings.rst
@@ -1,13 +1,13 @@
:mod:`warnings` --- Warning control
===================================
-.. index:: single: warnings
-
.. module:: warnings
:synopsis: Issue warning messages and control their disposition.
**Source code:** :source:`Lib/warnings.py`
+.. index:: single: warnings
+
--------------
Warning messages are typically issued in situations where it is useful to alert
@@ -265,7 +265,7 @@ Updating Code For New Versions of Python
Warnings that are only of interest to the developer are ignored by default. As
such you should make sure to test your code with typically ignored warnings
-made visible. You can do this from the command-line by passing :option:`-Wd`
+made visible. You can do this from the command-line by passing :option:`-Wd <-W>`
to the interpreter (this is shorthand for :option:`-W default`). This enables
default handling for all warnings, including those that are ignored by default.
To change what action is taken for encountered warnings you simply change what
diff --git a/Doc/library/wave.rst b/Doc/library/wave.rst
index ab64978cfd..7144379784 100644
--- a/Doc/library/wave.rst
+++ b/Doc/library/wave.rst
@@ -3,6 +3,7 @@
.. module:: wave
:synopsis: Provide an interface to the WAV sound format.
+
.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
.. Documentations stolen from comments in file.
diff --git a/Doc/library/weakref.rst b/Doc/library/weakref.rst
index cc883b1b51..0470bd113a 100644
--- a/Doc/library/weakref.rst
+++ b/Doc/library/weakref.rst
@@ -3,6 +3,7 @@
.. module:: weakref
:synopsis: Support for weak references and weak dictionaries.
+
.. moduleauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
.. moduleauthor:: Neil Schemenauer <nas@arctrix.com>
.. moduleauthor:: Martin von Löwis <martin@loewis.home.cs.tu-berlin.de>
@@ -258,7 +259,7 @@ These method have the same issues as the and :meth:`keyrefs` method of
are called in reverse order of creation.
A finalizer will never invoke its callback during the later part of
- the interpreter shutdown when module globals are liable to have
+ the :term:`interpreter shutdown` when module globals are liable to have
been replaced by :const:`None`.
.. method:: __call__()
@@ -329,7 +330,7 @@ These method have the same issues as the and :meth:`keyrefs` method of
.. seealso::
- :pep:`0205` - Weak References
+ :pep:`205` - Weak References
The proposal and rationale for this feature, including links to earlier
implementations and information about similar features in other languages.
@@ -527,8 +528,8 @@ follows::
Starting with Python 3.4, :meth:`__del__` methods no longer prevent
reference cycles from being garbage collected, and module globals are
-no longer forced to :const:`None` during interpreter shutdown. So this
-code should work without any issues on CPython.
+no longer forced to :const:`None` during :term:`interpreter shutdown`.
+So this code should work without any issues on CPython.
However, handling of :meth:`__del__` methods is notoriously implementation
specific, since it depends on internal details of the interpreter's garbage
diff --git a/Doc/library/webbrowser.rst b/Doc/library/webbrowser.rst
index aa5e4ad15d..85d3636722 100644
--- a/Doc/library/webbrowser.rst
+++ b/Doc/library/webbrowser.rst
@@ -3,6 +3,7 @@
.. module:: webbrowser
:synopsis: Easy-to-use controller for Web browsers.
+
.. moduleauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
@@ -33,7 +34,7 @@ browsers are not available on Unix, the controlling process will launch a new
browser and wait.
The script :program:`webbrowser` can be used as a command-line interface for the
-module. It accepts an URL as the argument. It accepts the following optional
+module. It accepts a URL as the argument. It accepts the following optional
parameters: ``-n`` opens the URL in a new browser window, if possible;
``-t`` opens the URL in a new browser page ("tab"). The options are,
naturally, mutually exclusive. Usage example::
diff --git a/Doc/library/winreg.rst b/Doc/library/winreg.rst
index 6c920b4882..52d591ad75 100644
--- a/Doc/library/winreg.rst
+++ b/Doc/library/winreg.rst
@@ -4,8 +4,10 @@
.. module:: winreg
:platform: Windows
:synopsis: Routines and objects for manipulating the Windows registry.
+
.. sectionauthor:: Mark Hammond <MarkH@ActiveState.com>
+--------------
These functions expose the Windows registry API to Python. Instead of using an
integer as the registry handle, a :ref:`handle object <handle-object>` is used
@@ -134,7 +136,7 @@ This module offers the following functions:
The :func:`DeleteKeyEx` function is implemented with the RegDeleteKeyEx
Windows API function, which is specific to 64-bit versions of Windows.
See the `RegDeleteKeyEx documentation
- <http://msdn.microsoft.com/en-us/library/ms724847%28VS.85%29.aspx>`__.
+ <https://msdn.microsoft.com/en-us/library/ms724847%28VS.85%29.aspx>`__.
*key* is an already open key, or one of the predefined
:ref:`HKEY_* constants <hkey-constants>`.
@@ -268,7 +270,7 @@ This module offers the following functions:
A call to :func:`LoadKey` fails if the calling process does not have the
:const:`SE_RESTORE_PRIVILEGE` privilege. Note that privileges are different
from permissions -- see the `RegLoadKey documentation
- <http://msdn.microsoft.com/en-us/library/ms724889%28v=VS.85%29.aspx>`__ for
+ <https://msdn.microsoft.com/en-us/library/ms724889%28v=VS.85%29.aspx>`__ for
more details.
If *key* is a handle returned by :func:`ConnectRegistry`, then the path
@@ -383,7 +385,7 @@ This module offers the following functions:
possess the :const:`SeBackupPrivilege` security privilege. Note that
privileges are different than permissions -- see the
`Conflicts Between User Rights and Permissions documentation
- <http://msdn.microsoft.com/en-us/library/ms724878%28v=VS.85%29.aspx>`__
+ <https://msdn.microsoft.com/en-us/library/ms724878%28v=VS.85%29.aspx>`__
for more details.
This function passes NULL for *security_attributes* to the API.
@@ -547,7 +549,7 @@ Access Rights
+++++++++++++
For more information, see `Registry Key Security and Access
-<http://msdn.microsoft.com/en-us/library/ms724878%28v=VS.85%29.aspx>`__.
+<https://msdn.microsoft.com/en-us/library/ms724878%28v=VS.85%29.aspx>`__.
.. data:: KEY_ALL_ACCESS
@@ -602,7 +604,7 @@ For more information, see `Registry Key Security and Access
***************
For more information, see `Accessing an Alternate Registry View
-<http://msdn.microsoft.com/en-us/library/aa384129(v=VS.85).aspx>`__.
+<https://msdn.microsoft.com/en-us/library/aa384129(v=VS.85).aspx>`__.
.. data:: KEY_WOW64_64KEY
@@ -621,7 +623,7 @@ Value Types
+++++++++++
For more information, see `Registry Value Types
-<http://msdn.microsoft.com/en-us/library/ms724884%28v=VS.85%29.aspx>`__.
+<https://msdn.microsoft.com/en-us/library/ms724884%28v=VS.85%29.aspx>`__.
.. data:: REG_BINARY
diff --git a/Doc/library/winsound.rst b/Doc/library/winsound.rst
index 61f34cddc1..d2c421047e 100644
--- a/Doc/library/winsound.rst
+++ b/Doc/library/winsound.rst
@@ -4,9 +4,11 @@
.. module:: winsound
:platform: Windows
:synopsis: Access to the sound-playing machinery for Windows.
+
.. moduleauthor:: Toby Dickenson <htrd90@zepler.org>
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
+--------------
The :mod:`winsound` module provides access to the basic sound-playing machinery
provided by Windows platforms. It includes functions and several constants.
diff --git a/Doc/library/wsgiref.rst b/Doc/library/wsgiref.rst
index 4ed945417b..aad27a88c9 100644
--- a/Doc/library/wsgiref.rst
+++ b/Doc/library/wsgiref.rst
@@ -3,9 +3,11 @@
.. module:: wsgiref
:synopsis: WSGI Utilities and Reference Implementation.
+
.. moduleauthor:: Phillip J. Eby <pje@telecommunity.com>
.. sectionauthor:: Phillip J. Eby <pje@telecommunity.com>
+--------------
The Web Server Gateway Interface (WSGI) is a standard interface between web
server software and web applications written in Python. Having a standard
@@ -24,8 +26,8 @@ for implementing WSGI servers, a demo HTTP server that serves WSGI applications,
and a validation tool that checks WSGI servers and applications for conformance
to the WSGI specification (:pep:`3333`).
-See http://www.wsgi.org for more information about WSGI, and links to tutorials
-and other resources.
+See https://wsgi.readthedocs.org/ for more information about WSGI, and links to
+tutorials and other resources.
.. XXX If you're just trying to write a web application...
@@ -184,10 +186,11 @@ This module provides a single class, :class:`Headers`, for convenient
manipulation of WSGI response headers using a mapping-like interface.
-.. class:: Headers(headers)
+.. class:: Headers([headers])
Create a mapping-like object wrapping *headers*, which must be a list of header
- name/value tuples as described in :pep:`3333`.
+ name/value tuples as described in :pep:`3333`. The default value of *headers* is
+ an empty list.
:class:`Headers` objects support typical mapping operations including
:meth:`__getitem__`, :meth:`get`, :meth:`__setitem__`, :meth:`setdefault`,
@@ -251,6 +254,10 @@ manipulation of WSGI response headers using a mapping-like interface.
Content-Disposition: attachment; filename="bud.gif"
+ .. versionchanged:: 3.5
+ *headers* parameter is optional.
+
+
:mod:`wsgiref.simple_server` -- a simple WSGI HTTP server
---------------------------------------------------------
@@ -414,8 +421,8 @@ Paste" library.
# Our callable object which is intentionally not compliant to the
# standard, so the validator is going to break
def simple_app(environ, start_response):
- status = '200 OK' # HTTP Status
- headers = [('Content-type', 'text/plain')] # HTTP Headers
+ status = '200 OK' # HTTP Status
+ headers = [('Content-type', 'text/plain')] # HTTP Headers
start_response(status, headers)
# This is going to break because we need to return a list, and
@@ -510,6 +517,9 @@ input, output, and error streams.
streams are stored in the :attr:`stdin`, :attr:`stdout`, :attr:`stderr`, and
:attr:`environ` attributes.
+ The :meth:`~io.BufferedIOBase.write` method of *stdout* should write
+ each chunk in full, like :class:`io.BufferedIOBase`.
+
.. class:: BaseHandler()
@@ -757,8 +767,8 @@ This is a working "Hello World" WSGI application::
# is a dictionary containing CGI-style environment variables and the
# second variable is the callable object (see PEP 333).
def hello_world_app(environ, start_response):
- status = '200 OK' # HTTP Status
- headers = [('Content-type', 'text/plain; charset=utf-8')] # HTTP Headers
+ status = '200 OK' # HTTP Status
+ headers = [('Content-type', 'text/plain; charset=utf-8')] # HTTP Headers
start_response(status, headers)
# The returned object is going to be printed
diff --git a/Doc/library/xdrlib.rst b/Doc/library/xdrlib.rst
index 5c7dfa454b..42a03a4675 100644
--- a/Doc/library/xdrlib.rst
+++ b/Doc/library/xdrlib.rst
@@ -4,13 +4,12 @@
.. module:: xdrlib
:synopsis: Encoders and decoders for the External Data Representation (XDR).
+**Source code:** :source:`Lib/xdrlib.py`
.. index::
single: XDR
single: External Data Representation
-**Source code:** :source:`Lib/xdrlib.py`
-
--------------
The :mod:`xdrlib` module supports the External Data Representation Standard as
diff --git a/Doc/library/xml.dom.minidom.rst b/Doc/library/xml.dom.minidom.rst
index 6762e9177f..e1042e7eea 100644
--- a/Doc/library/xml.dom.minidom.rst
+++ b/Doc/library/xml.dom.minidom.rst
@@ -3,6 +3,7 @@
.. module:: xml.dom.minidom
:synopsis: Minimal Document Object Model (DOM) implementation.
+
.. moduleauthor:: Paul Prescod <paul@prescod.net>
.. sectionauthor:: Paul Prescod <paul@prescod.net>
.. sectionauthor:: Martin v. Löwis <martin@v.loewis.de>
@@ -30,10 +31,10 @@ DOM applications typically start by parsing some XML into a DOM. With
from xml.dom.minidom import parse, parseString
- dom1 = parse('c:\\temp\\mydata.xml') # parse an XML file by name
+ dom1 = parse('c:\\temp\\mydata.xml') # parse an XML file by name
datasource = open('c:\\temp\\mydata.xml')
- dom2 = parse(datasource) # parse an open file
+ dom2 = parse(datasource) # parse an open file
dom3 = parseString('<myxml>Some data<empty/> some more data</myxml>')
@@ -100,7 +101,7 @@ eventually take care of the objects in the tree.
.. seealso::
- `Document Object Model (DOM) Level 1 Specification <http://www.w3.org/TR/REC-DOM-Level-1/>`_
+ `Document Object Model (DOM) Level 1 Specification <https://www.w3.org/TR/REC-DOM-Level-1/>`_
The W3C recommendation for the DOM supported by :mod:`xml.dom.minidom`.
@@ -251,5 +252,5 @@ utility to most DOM users.
the appropriate standards. For example, "UTF-8" is valid, but
"UTF8" is not valid in an XML document's declaration, even though
Python accepts it as an encoding name.
- See http://www.w3.org/TR/2006/REC-xml11-20060816/#NT-EncodingDecl
- and http://www.iana.org/assignments/character-sets/character-sets.xhtml.
+ See https://www.w3.org/TR/2006/REC-xml11-20060816/#NT-EncodingDecl
+ and https://www.iana.org/assignments/character-sets/character-sets.xhtml.
diff --git a/Doc/library/xml.dom.pulldom.rst b/Doc/library/xml.dom.pulldom.rst
index a3b8bc166a..c3339edd54 100644
--- a/Doc/library/xml.dom.pulldom.rst
+++ b/Doc/library/xml.dom.pulldom.rst
@@ -3,6 +3,7 @@
.. module:: xml.dom.pulldom
:synopsis: Support for building partial DOM trees from SAX events.
+
.. moduleauthor:: Paul Prescod <paul@prescod.net>
**Source code:** :source:`Lib/xml/dom/pulldom.py`
@@ -114,13 +115,15 @@ DOMEventStream Objects
Expands all children of *node* into *node*. Example::
+ from xml.dom import pulldom
+
xml = '<html><title>Foo</title> <p>Some text <div>and more</div></p> </html>'
doc = pulldom.parseString(xml)
for event, node in doc:
if event == pulldom.START_ELEMENT and node.tagName == 'p':
# Following statement only prints '<p/>'
print(node.toxml())
- doc.exandNode(node)
+ doc.expandNode(node)
# Following statement prints node with all its children '<p>Some text <div>and more</div></p>'
print(node.toxml())
diff --git a/Doc/library/xml.dom.rst b/Doc/library/xml.dom.rst
index a432202ec0..b037ff6b82 100644
--- a/Doc/library/xml.dom.rst
+++ b/Doc/library/xml.dom.rst
@@ -3,9 +3,13 @@
.. module:: xml.dom
:synopsis: Document Object Model API for Python.
+
.. sectionauthor:: Paul Prescod <paul@prescod.net>
.. sectionauthor:: Martin v. Löwis <martin@v.loewis.de>
+**Source code:** :source:`Lib/xml/dom/__init__.py`
+
+--------------
The Document Object Model, or "DOM," is a cross-language API from the World Wide
Web Consortium (W3C) for accessing and modifying XML documents. A DOM
@@ -63,10 +67,10 @@ implementations are free to support the strict mapping from IDL). See section
.. seealso::
- `Document Object Model (DOM) Level 2 Specification <http://www.w3.org/TR/DOM-Level-2-Core/>`_
+ `Document Object Model (DOM) Level 2 Specification <https://www.w3.org/TR/DOM-Level-2-Core/>`_
The W3C recommendation upon which the Python DOM API is based.
- `Document Object Model (DOM) Level 1 Specification <http://www.w3.org/TR/REC-DOM-Level-1/>`_
+ `Document Object Model (DOM) Level 1 Specification <https://www.w3.org/TR/REC-DOM-Level-1/>`_
The W3C recommendation for the DOM supported by :mod:`xml.dom.minidom`.
`Python Language Mapping Specification <http://www.omg.org/spec/PYTH/1.2/PDF>`_
@@ -115,20 +119,20 @@ Some convenience constants are also provided:
.. data:: XML_NAMESPACE
The namespace URI associated with the reserved prefix ``xml``, as defined by
- `Namespaces in XML <http://www.w3.org/TR/REC-xml-names/>`_ (section 4).
+ `Namespaces in XML <https://www.w3.org/TR/REC-xml-names/>`_ (section 4).
.. data:: XMLNS_NAMESPACE
The namespace URI for namespace declarations, as defined by `Document Object
Model (DOM) Level 2 Core Specification
- <http://www.w3.org/TR/DOM-Level-2-Core/core.html>`_ (section 1.1.8).
+ <https://www.w3.org/TR/DOM-Level-2-Core/core.html>`_ (section 1.1.8).
.. data:: XHTML_NAMESPACE
The URI of the XHTML namespace as defined by `XHTML 1.0: The Extensible
- HyperText Markup Language <http://www.w3.org/TR/xhtml1/>`_ (section 3.1.1).
+ HyperText Markup Language <https://www.w3.org/TR/xhtml1/>`_ (section 3.1.1).
In addition, :mod:`xml.dom` contains a base :class:`Node` class and the DOM
@@ -874,7 +878,7 @@ attribute.
.. exception:: NamespaceErr
If an attempt is made to change any object in a way that is not permitted with
- regard to the `Namespaces in XML <http://www.w3.org/TR/REC-xml-names/>`_
+ regard to the `Namespaces in XML <https://www.w3.org/TR/REC-xml-names/>`_
recommendation, this exception is raised.
diff --git a/Doc/library/xml.etree.elementtree.rst b/Doc/library/xml.etree.elementtree.rst
index dc0274eb0b..99d7e8b7ce 100644
--- a/Doc/library/xml.etree.elementtree.rst
+++ b/Doc/library/xml.etree.elementtree.rst
@@ -3,8 +3,13 @@
.. module:: xml.etree.ElementTree
:synopsis: Implementation of the ElementTree API.
+
.. moduleauthor:: Fredrik Lundh <fredrik@pythonware.com>
+**Source code:** :source:`Lib/xml/etree/ElementTree.py`
+
+--------------
+
The :mod:`xml.etree.ElementTree` module implements a simple and efficient API
for parsing and creating XML data.
@@ -94,7 +99,7 @@ As an :class:`Element`, ``root`` has a tag and a dictionary of attributes::
It also has children nodes over which we can iterate::
>>> for child in root:
- ... print(child.tag, child.attrib)
+ ... print(child.tag, child.attrib)
...
country {'name': 'Liechtenstein'}
country {'name': 'Singapore'}
@@ -143,8 +148,8 @@ elements, call :meth:`XMLPullParser.read_events`. Here is an example::
[('start', <Element 'mytag' at 0x7fa66db2be58>)]
>>> parser.feed(' more text</mytag>')
>>> for event, elem in parser.read_events():
- ... print(event)
- ... print(elem.tag, 'text=', elem.text)
+ ... print(event)
+ ... print(elem.tag, 'text=', elem.text)
...
end
@@ -166,7 +171,7 @@ the sub-tree below it (its children, their children, and so on). For example,
:meth:`Element.iter`::
>>> for neighbor in root.iter('neighbor'):
- ... print(neighbor.attrib)
+ ... print(neighbor.attrib)
...
{'name': 'Austria', 'direction': 'E'}
{'name': 'Switzerland', 'direction': 'W'}
@@ -180,9 +185,9 @@ with a particular tag, and :attr:`Element.text` accesses the element's text
content. :meth:`Element.get` accesses the element's attributes::
>>> for country in root.findall('country'):
- ... rank = country.find('rank').text
- ... name = country.get('name')
- ... print(name, rank)
+ ... rank = country.find('rank').text
+ ... name = country.get('name')
+ ... print(name, rank)
...
Liechtenstein 1
Singapore 4
@@ -206,9 +211,9 @@ Let's say we want to add one to each country's rank, and add an ``updated``
attribute to the rank element::
>>> for rank in root.iter('rank'):
- ... new_rank = int(rank.text) + 1
- ... rank.text = str(new_rank)
- ... rank.set('updated', 'yes')
+ ... new_rank = int(rank.text) + 1
+ ... rank.text = str(new_rank)
+ ... rank.set('updated', 'yes')
...
>>> tree.write('output.xml')
@@ -244,9 +249,9 @@ We can remove elements using :meth:`Element.remove`. Let's say we want to
remove all countries with a rank higher than 50::
>>> for country in root.findall('country'):
- ... rank = int(country.find('rank').text)
- ... if rank > 50:
- ... root.remove(country)
+ ... rank = int(country.find('rank').text)
+ ... if rank > 50:
+ ... root.remove(country)
...
>>> tree.write('output.xml')
@@ -292,7 +297,7 @@ If the XML input has `namespaces
with prefixes in the form ``prefix:sometag`` get expanded to
``{uri}sometag`` where the *prefix* is replaced by the full *URI*.
Also, if there is a `default namespace
-<http://www.w3.org/TR/2006/REC-xml-names-20060816/#defaulting>`__,
+<https://www.w3.org/TR/2006/REC-xml-names-20060816/#defaulting>`__,
that full URI gets prepended to all of the non-prefixed tags.
Here is an XML example that incorporates two namespaces, one with the
@@ -363,7 +368,7 @@ XPath support
-------------
This module provides limited support for
-`XPath expressions <http://www.w3.org/TR/xpath>`_ for locating elements in a
+`XPath expressions <https://www.w3.org/TR/xpath>`_ for locating elements in a
tree. The goal is to support a small subset of the abbreviated syntax; a full
XPath engine is outside the scope of the module.
@@ -978,7 +983,7 @@ QName Objects
to get proper namespace handling on output. *text_or_uri* is a string
containing the QName value, in the form {uri}local, or, if the tag argument
is given, the URI part of a QName. If *tag* is given, the first argument is
- interpreted as an URI, and this argument is interpreted as a local name.
+ interpreted as a URI, and this argument is interpreted as a local name.
:class:`QName` instances are opaque.
@@ -1044,16 +1049,16 @@ XMLParser Objects
This class is the low-level building block of the module. It uses
:mod:`xml.parsers.expat` for efficient, event-based parsing of XML. It can
- be fed XML data incrementall with the :meth:`feed` method, and parsing events
- are translated to a push API - by invoking callbacks on the *target* object.
- If *target* is omitted, the standard :class:`TreeBuilder` is used. The
- *html* argument was historically used for backwards compatibility and is now
- deprecated. If *encoding* [1]_ is given, the value overrides the encoding
- specified in the XML file.
+ be fed XML data incrementally with the :meth:`feed` method, and parsing
+ events are translated to a push API - by invoking callbacks on the *target*
+ object. If *target* is omitted, the standard :class:`TreeBuilder` is used.
+ The *html* argument was historically used for backwards compatibility and is
+ now deprecated. If *encoding* [1]_ is given, the value overrides the
+ encoding specified in the XML file.
.. deprecated:: 3.4
The *html* argument. The remaining arguments should be passed via
- keywword to prepare for the removal of the *html* argument.
+ keyword to prepare for the removal of the *html* argument.
.. method:: close()
@@ -1189,5 +1194,5 @@ Exceptions
.. [#] The encoding string included in XML output should conform to the
appropriate standards. For example, "UTF-8" is valid, but "UTF8" is
- not. See http://www.w3.org/TR/2006/REC-xml11-20060816/#NT-EncodingDecl
- and http://www.iana.org/assignments/character-sets/character-sets.xhtml.
+ not. See https://www.w3.org/TR/2006/REC-xml11-20060816/#NT-EncodingDecl
+ and https://www.iana.org/assignments/character-sets/character-sets.xhtml.
diff --git a/Doc/library/xml.rst b/Doc/library/xml.rst
index 0188219092..3c2fc89d50 100644
--- a/Doc/library/xml.rst
+++ b/Doc/library/xml.rst
@@ -5,9 +5,13 @@ XML Processing Modules
.. module:: xml
:synopsis: Package containing XML processing modules
+
.. sectionauthor:: Christian Heimes <christian@python.org>
.. sectionauthor:: Georg Brandl <georg@python.org>
+**Source code:** :source:`Lib/xml/`
+
+--------------
Python's interfaces for processing XML are grouped in the ``xml`` package.
@@ -62,7 +66,7 @@ kind sax etree minidom pulldom xmlrpc
billion laughs **Yes** **Yes** **Yes** **Yes** **Yes**
quadratic blowup **Yes** **Yes** **Yes** **Yes** **Yes**
external entity expansion **Yes** No (1) No (2) **Yes** No (3)
-DTD retrieval **Yes** No No **Yes** No
+`DTD`_ retrieval **Yes** No No **Yes** No
decompression bomb No No No No **Yes**
========================= ======== ========= ========= ======== =========
@@ -92,7 +96,7 @@ external entity expansion
also point to external resources or local files. The XML
parser accesses the resource and embeds the content into the XML document.
-DTD retrieval
+`DTD`_ retrieval
Some XML libraries like Python's :mod:`xml.dom.pulldom` retrieve document type
definitions from remote or local locations. The feature has similar
implications as the external entity expansion issue.
@@ -128,6 +132,6 @@ Python because they break backward compatibility.
.. _defusedxml: https://pypi.python.org/pypi/defusedxml/
.. _defusedexpat: https://pypi.python.org/pypi/defusedexpat/
-.. _Billion Laughs: http://en.wikipedia.org/wiki/Billion_laughs
-.. _ZIP bomb: http://en.wikipedia.org/wiki/Zip_bomb
-.. _DTD: http://en.wikipedia.org/wiki/Document_Type_Definition
+.. _Billion Laughs: https://en.wikipedia.org/wiki/Billion_laughs
+.. _ZIP bomb: https://en.wikipedia.org/wiki/Zip_bomb
+.. _DTD: https://en.wikipedia.org/wiki/Document_type_definition
diff --git a/Doc/library/xml.sax.handler.rst b/Doc/library/xml.sax.handler.rst
index 0fb3341c61..ae0877ca90 100644
--- a/Doc/library/xml.sax.handler.rst
+++ b/Doc/library/xml.sax.handler.rst
@@ -3,9 +3,13 @@
.. module:: xml.sax.handler
:synopsis: Base classes for SAX event handlers.
+
.. moduleauthor:: Lars Marius Garshol <larsga@garshol.priv.no>
.. sectionauthor:: Martin v. Löwis <martin@v.loewis.de>
+**Source code:** :source:`Lib/xml/sax/handler.py`
+
+--------------
The SAX API defines four kinds of handlers: content handlers, DTD handlers,
error handlers, and entity resolvers. Applications normally only need to
diff --git a/Doc/library/xml.sax.reader.rst b/Doc/library/xml.sax.reader.rst
index 3ab60636c5..c368fc2e5a 100644
--- a/Doc/library/xml.sax.reader.rst
+++ b/Doc/library/xml.sax.reader.rst
@@ -3,9 +3,13 @@
.. module:: xml.sax.xmlreader
:synopsis: Interface which SAX-compliant XML parsers must implement.
+
.. moduleauthor:: Lars Marius Garshol <larsga@garshol.priv.no>
.. sectionauthor:: Martin v. Löwis <martin@v.loewis.de>
+**Source code:** :source:`Lib/xml/sax/xmlreader.py`
+
+--------------
SAX parsers implement the :class:`XMLReader` interface. They are implemented in
a Python module, which must provide a function :func:`create_parser`. This
@@ -98,10 +102,12 @@ The :class:`XMLReader` interface supports the following methods:
Process an input source, producing SAX events. The *source* object can be a
system identifier (a string identifying the input source -- typically a file
- name or an URL), a file-like object, or an :class:`InputSource` object. When
+ name or a URL), a file-like object, or an :class:`InputSource` object. When
:meth:`parse` returns, the input is completely processed, and the parser object
- can be discarded or reset. As a limitation, the current implementation only
- accepts byte streams; processing of character streams is for further study.
+ can be discarded or reset.
+
+ .. versionchanged:: 3.5
+ Added support of character streams.
.. method:: XMLReader.getContentHandler()
@@ -226,12 +232,12 @@ Instances of :class:`Locator` provide these methods:
.. method:: Locator.getColumnNumber()
- Return the column number where the current event ends.
+ Return the column number where the current event begins.
.. method:: Locator.getLineNumber()
- Return the line number where the current event ends.
+ Return the line number where the current event begins.
.. method:: Locator.getPublicId()
@@ -288,8 +294,7 @@ InputSource Objects
.. method:: InputSource.setByteStream(bytefile)
- Set the byte stream (a Python file-like object which does not perform
- byte-to-character conversion) for this input source.
+ Set the byte stream (a :term:`binary file`) for this input source.
The SAX parser will ignore this if there is also a character stream specified,
but it will use a byte stream in preference to opening a URI connection itself.
@@ -308,8 +313,7 @@ InputSource Objects
.. method:: InputSource.setCharacterStream(charfile)
- Set the character stream for this input source. (The stream must be a Python 1.6
- Unicode-wrapped file-like that performs conversion to strings.)
+ Set the character stream (a :term:`text file`) for this input source.
If there is a character stream specified, the SAX parser will ignore any byte
stream and will not attempt to open a URI connection to the system identifier.
diff --git a/Doc/library/xml.sax.rst b/Doc/library/xml.sax.rst
index e95d6b0f85..78d6633e09 100644
--- a/Doc/library/xml.sax.rst
+++ b/Doc/library/xml.sax.rst
@@ -3,10 +3,14 @@
.. module:: xml.sax
:synopsis: Package containing SAX2 base classes and convenience functions.
+
.. moduleauthor:: Lars Marius Garshol <larsga@garshol.priv.no>
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
.. sectionauthor:: Martin v. Löwis <martin@v.loewis.de>
+**Source code:** :source:`Lib/xml/sax/__init__.py`
+
+--------------
The :mod:`xml.sax` package provides a number of modules which implement the
Simple API for XML (SAX) interface for Python. The package itself provides the
@@ -47,7 +51,11 @@ The convenience functions are:
.. function:: parseString(string, handler, error_handler=handler.ErrorHandler())
Similar to :func:`parse`, but parses from a buffer *string* received as a
- parameter.
+ parameter. *string* must be a :class:`str` instance or a
+ :term:`bytes-like object`.
+
+ .. versionchanged:: 3.5
+ Added support of :class:`str` instances.
A typical SAX application uses three kinds of objects: readers, handlers and
input sources. "Reader" in this context is another term for parser, i.e. some
diff --git a/Doc/library/xml.sax.utils.rst b/Doc/library/xml.sax.utils.rst
index 14cf07839b..538b7980bd 100644
--- a/Doc/library/xml.sax.utils.rst
+++ b/Doc/library/xml.sax.utils.rst
@@ -3,9 +3,13 @@
.. module:: xml.sax.saxutils
:synopsis: Convenience functions and classes for use with SAX.
+
.. moduleauthor:: Lars Marius Garshol <larsga@garshol.priv.no>
.. sectionauthor:: Martin v. Löwis <martin@v.loewis.de>
+**Source code:** :source:`Lib/xml/sax/saxutils.py`
+
+--------------
The module :mod:`xml.sax.saxutils` contains a number of classes and functions
that are commonly useful when creating SAX applications, either in direct use,
diff --git a/Doc/library/xmlrpc.client.rst b/Doc/library/xmlrpc.client.rst
index cc5e83a706..e7916d2bff 100644
--- a/Doc/library/xmlrpc.client.rst
+++ b/Doc/library/xmlrpc.client.rst
@@ -3,18 +3,18 @@
.. module:: xmlrpc.client
:synopsis: XML-RPC client access.
+
.. moduleauthor:: Fredrik Lundh <fredrik@pythonware.com>
.. sectionauthor:: Eric S. Raymond <esr@snark.thyrsus.com>
+**Source code:** :source:`Lib/xmlrpc/client.py`
.. XXX Not everything is documented yet. It might be good to describe
Marshaller, Unmarshaller, getparser and Transport.
-**Source code:** :source:`Lib/xmlrpc/client.py`
-
--------------
-XML-RPC is a Remote Procedure Call method that uses XML passed via HTTP as a
+XML-RPC is a Remote Procedure Call method that uses XML passed via HTTP(S) as a
transport. With it, a client can call methods with parameters on a remote
server (the server is named by a URI) and get back structured data. This module
supports writing XML-RPC client code; it handles all the details of translating
@@ -27,10 +27,10 @@ between conformable Python objects and XML on the wire.
constructed data. If you need to parse untrusted or unauthenticated data see
:ref:`xml-vulnerabilities`.
-.. versionchanged:: 3.4.3
+.. versionchanged:: 3.5
- For https URIs, :mod:`xmlrpc.client` now performs all the necessary
- certificate and hostname checks by default
+ For HTTPS URIs, :mod:`xmlrpc.client` now performs all the necessary
+ certificate and hostname checks by default.
.. class:: ServerProxy(uri, transport=None, encoding=None, verbose=False, \
allow_none=False, use_datetime=False, \
@@ -46,15 +46,19 @@ between conformable Python objects and XML on the wire.
:class:`SafeTransport` instance for https: URLs and an internal HTTP
:class:`Transport` instance otherwise. The optional third argument is an
encoding, by default UTF-8. The optional fourth argument is a debugging flag.
+
+ The following parameters govern the use of the returned proxy instance.
If *allow_none* is true, the Python constant ``None`` will be translated into
XML; the default behaviour is for ``None`` to raise a :exc:`TypeError`. This is
a commonly-used extension to the XML-RPC specification, but isn't supported by
- all clients and servers; see http://ontosys.com/xml-rpc/extensions.php for a
- description. The *use_builtin_types* flag can be used to cause date/time values
+ all clients and servers; see `http://ontosys.com/xml-rpc/extensions.php
+ <https://web.archive.org/web/20130120074804/http://ontosys.com/xml-rpc/extensions.php>`_
+ for a description.
+ The *use_builtin_types* flag can be used to cause date/time values
to be presented as :class:`datetime.datetime` objects and binary data to be
presented as :class:`bytes` objects; this flag is false by default.
- :class:`datetime.datetime` and :class:`bytes` objects may be passed to calls.
-
+ :class:`datetime.datetime`, :class:`bytes` and :class:`bytearray` objects
+ may be passed to calls.
The obsolete *use_datetime* flag is similar to *use_builtin_types* but it
applies only to date/time values.
@@ -63,7 +67,7 @@ between conformable Python objects and XML on the wire.
portion will be base64-encoded as an HTTP 'Authorization' header, and sent to
the remote server as part of the connection process when invoking an XML-RPC
method. You only need to use this if the remote server requires a Basic
- Authentication user and password. If an HTTPS url is provided, *context* may
+ Authentication user and password. If an HTTPS URL is provided, *context* may
be :class:`ssl.SSLContext` and configures the SSL settings of the underlying
HTTPS connection.
@@ -73,42 +77,43 @@ between conformable Python objects and XML on the wire.
methods it supports (service discovery) and fetch other server-associated
metadata.
- :class:`ServerProxy` instance methods take Python basic types and objects as
- arguments and return Python basic types and classes. Types that are conformable
- (e.g. that can be marshalled through XML), include the following (and except
- where noted, they are unmarshalled as the same Python type):
+ Types that are conformable (e.g. that can be marshalled through XML),
+ include the following (and except where noted, they are unmarshalled
+ as the same Python type):
.. tabularcolumns:: |l|L|
- +---------------------------------+---------------------------------------------+
- | Name | Meaning |
- +=================================+=============================================+
- | :const:`boolean` | The :const:`True` and :const:`False` |
- | | constants |
- +---------------------------------+---------------------------------------------+
- | :const:`integers` | Pass in directly |
- +---------------------------------+---------------------------------------------+
- | :const:`floating-point numbers` | Pass in directly |
- +---------------------------------+---------------------------------------------+
- | :const:`strings` | Pass in directly |
- +---------------------------------+---------------------------------------------+
- | :const:`arrays` | Any Python sequence type containing |
- | | conformable elements. Arrays are returned |
- | | as lists |
- +---------------------------------+---------------------------------------------+
- | :const:`structures` | A Python dictionary. Keys must be strings, |
- | | values may be any conformable type. Objects |
- | | of user-defined classes can be passed in; |
- | | only their *__dict__* attribute is |
- | | transmitted. |
- +---------------------------------+---------------------------------------------+
- | :const:`dates` | In seconds since the epoch. Pass in an |
- | | instance of the :class:`DateTime` class or |
- | | a :class:`datetime.datetime` instance. |
- +---------------------------------+---------------------------------------------+
- | :const:`binary data` | Pass in an instance of the :class:`Binary` |
- | | wrapper class or a :class:`bytes` instance. |
- +---------------------------------+---------------------------------------------+
+ +----------------------+-------------------------------------------------------+
+ | XML-RPC type | Python type |
+ +======================+=======================================================+
+ | ``boolean`` | :class:`bool` |
+ +----------------------+-------------------------------------------------------+
+ | ``int`` or ``i4`` | :class:`int` in range from -2147483648 to 2147483647. |
+ +----------------------+-------------------------------------------------------+
+ | ``double`` | :class:`float` |
+ +----------------------+-------------------------------------------------------+
+ | ``string`` | :class:`str` |
+ +----------------------+-------------------------------------------------------+
+ | ``array`` | :class:`list` or :class:`tuple` containing |
+ | | conformable elements. Arrays are returned as |
+ | | :class:`lists <list>`. |
+ +----------------------+-------------------------------------------------------+
+ | ``struct`` | :class:`dict`. Keys must be strings, values may be |
+ | | any conformable type. Objects of user-defined |
+ | | classes can be passed in; only their |
+ | | :attr:`~object.__dict__` attribute is transmitted. |
+ +----------------------+-------------------------------------------------------+
+ | ``dateTime.iso8601`` | :class:`DateTime` or :class:`datetime.datetime`. |
+ | | Returned type depends on values of |
+ | | *use_builtin_types* and *use_datetime* flags. |
+ +----------------------+-------------------------------------------------------+
+ | ``base64`` | :class:`Binary`, :class:`bytes` or |
+ | | :class:`bytearray`. Returned type depends on the |
+ | | value of the *use_builtin_types* flag. |
+ +----------------------+-------------------------------------------------------+
+ | ``nil`` | The ``None`` constant. Passing is allowed only if |
+ | | *allow_none* is true. |
+ +----------------------+-------------------------------------------------------+
This is the full set of data types supported by XML-RPC. Method calls may also
raise a special :exc:`Fault` instance, used to signal XML-RPC server errors, or
@@ -123,13 +128,13 @@ between conformable Python objects and XML on the wire.
the control characters with ASCII values between 0 and 31 (except, of course,
tab, newline and carriage return); failing to do this will result in an XML-RPC
request that isn't well-formed XML. If you have to pass arbitrary bytes
- via XML-RPC, use the :class:`bytes` class or the class:`Binary` wrapper class
- described below.
+ via XML-RPC, use :class:`bytes` or :class:`bytearray` classes or the
+ :class:`Binary` wrapper class described below.
:class:`Server` is retained as an alias for :class:`ServerProxy` for backwards
compatibility. New code should use :class:`ServerProxy`.
- .. versionchanged:: 3.4.3
+ .. versionchanged:: 3.5
Added the *context* argument.
@@ -142,7 +147,7 @@ between conformable Python objects and XML on the wire.
`XML-RPC Introspection <http://xmlrpc-c.sourceforge.net/introspection.html>`_
Describes the XML-RPC protocol extension for introspection.
- `XML-RPC Specification <http://www.xmlrpc.com/spec>`_
+ `XML-RPC Specification <http://xmlrpc.scripting.com/spec.html>`_
The official specification.
`Unofficial XML-RPC Errata <http://effbot.org/zone/xmlrpc-errata.htm>`_
@@ -164,7 +169,7 @@ returning a value, which may be either returned data in a conformant type or a
:class:`Fault` or :class:`ProtocolError` object indicating an error.
Servers that support the XML introspection API support some common methods
-grouped under the reserved :attr:`system` attribute:
+grouped under the reserved :attr:`~ServerProxy.system` attribute:
.. method:: ServerProxy.system.listMethods()
@@ -200,13 +205,18 @@ grouped under the reserved :attr:`system` attribute:
no such string is available, an empty string is returned. The documentation
string may contain HTML markup.
+.. versionchanged:: 3.5
+
+ Instances of :class:`ServerProxy` support the :term:`context manager` protocol
+ for closing the underlying transport.
+
A working example follows. The server code::
from xmlrpc.server import SimpleXMLRPCServer
def is_even(n):
- return n%2 == 0
+ return n % 2 == 0
server = SimpleXMLRPCServer(("localhost", 8000))
print("Listening on port 8000...")
@@ -217,33 +227,35 @@ The client code for the preceding server::
import xmlrpc.client
- proxy = xmlrpc.client.ServerProxy("http://localhost:8000/")
- print("3 is even: %s" % str(proxy.is_even(3)))
- print("100 is even: %s" % str(proxy.is_even(100)))
+ with xmlrpc.client.ServerProxy("http://localhost:8000/") as proxy:
+ print("3 is even: %s" % str(proxy.is_even(3)))
+ print("100 is even: %s" % str(proxy.is_even(100)))
.. _datetime-objects:
DateTime Objects
----------------
-This class may be initialized with seconds since the epoch, a time
-tuple, an ISO 8601 time/date string, or a :class:`datetime.datetime`
-instance. It has the following methods, supported mainly for internal
-use by the marshalling/unmarshalling code:
+.. class:: DateTime
+ This class may be initialized with seconds since the epoch, a time
+ tuple, an ISO 8601 time/date string, or a :class:`datetime.datetime`
+ instance. It has the following methods, supported mainly for internal
+ use by the marshalling/unmarshalling code:
-.. method:: DateTime.decode(string)
- Accept a string as the instance's new time value.
+ .. method:: decode(string)
+ Accept a string as the instance's new time value.
-.. method:: DateTime.encode(out)
- Write the XML-RPC encoding of this :class:`DateTime` item to the *out* stream
- object.
+ .. method:: encode(out)
-It also supports certain of Python's built-in operators through rich comparison
-and :meth:`__repr__` methods.
+ Write the XML-RPC encoding of this :class:`DateTime` item to the *out* stream
+ object.
+
+ It also supports certain of Python's built-in operators through rich comparison
+ and :meth:`__repr__` methods.
A working example follows. The server code::
@@ -277,36 +289,38 @@ The client code for the preceding server::
Binary Objects
--------------
-This class may be initialized from bytes data (which may include NULs). The
-primary access to the content of a :class:`Binary` object is provided by an
-attribute:
+.. class:: Binary
+
+ This class may be initialized from bytes data (which may include NULs). The
+ primary access to the content of a :class:`Binary` object is provided by an
+ attribute:
-.. attribute:: Binary.data
+ .. attribute:: data
- The binary data encapsulated by the :class:`Binary` instance. The data is
- provided as a :class:`bytes` object.
+ The binary data encapsulated by the :class:`Binary` instance. The data is
+ provided as a :class:`bytes` object.
-:class:`Binary` objects have the following methods, supported mainly for
-internal use by the marshalling/unmarshalling code:
+ :class:`Binary` objects have the following methods, supported mainly for
+ internal use by the marshalling/unmarshalling code:
-.. method:: Binary.decode(bytes)
+ .. method:: decode(bytes)
- Accept a base64 :class:`bytes` object and decode it as the instance's new data.
+ Accept a base64 :class:`bytes` object and decode it as the instance's new data.
-.. method:: Binary.encode(out)
+ .. method:: encode(out)
- Write the XML-RPC base 64 encoding of this binary item to the out stream object.
+ Write the XML-RPC base 64 encoding of this binary item to the *out* stream object.
- The encoded data will have newlines every 76 characters as per
- `RFC 2045 section 6.8 <http://tools.ietf.org/html/rfc2045#section-6.8>`_,
- which was the de facto standard base64 specification when the
- XML-RPC spec was written.
+ The encoded data will have newlines every 76 characters as per
+ `RFC 2045 section 6.8 <https://tools.ietf.org/html/rfc2045#section-6.8>`_,
+ which was the de facto standard base64 specification when the
+ XML-RPC spec was written.
-It also supports certain of Python's built-in operators through :meth:`__eq__`
-and :meth:`__ne__` methods.
+ It also supports certain of Python's built-in operators through :meth:`__eq__`
+ and :meth:`__ne__` methods.
Example usage of the binary objects. We're going to transfer an image over
XMLRPC::
@@ -337,18 +351,20 @@ The client gets the image and saves it to a file::
Fault Objects
-------------
-A :class:`Fault` object encapsulates the content of an XML-RPC fault tag. Fault
-objects have the following attributes:
+.. class:: Fault
+
+ A :class:`Fault` object encapsulates the content of an XML-RPC fault tag. Fault
+ objects have the following attributes:
-.. attribute:: Fault.faultCode
+ .. attribute:: faultCode
- A string indicating the fault type.
+ A string indicating the fault type.
-.. attribute:: Fault.faultString
+ .. attribute:: faultString
- A string containing a diagnostic message associated with the fault.
+ A string containing a diagnostic message associated with the fault.
In the following example we're going to intentionally cause a :exc:`Fault` by
returning a complex type object. The server code::
@@ -357,7 +373,7 @@ returning a complex type object. The server code::
# A marshalling error is going to occur because we're returning a
# complex number
- def add(x,y):
+ def add(x, y):
return x+y+0j
server = SimpleXMLRPCServer(("localhost", 8000))
@@ -385,37 +401,39 @@ The client code for the preceding server::
ProtocolError Objects
---------------------
-A :class:`ProtocolError` object describes a protocol error in the underlying
-transport layer (such as a 404 'not found' error if the server named by the URI
-does not exist). It has the following attributes:
+.. class:: ProtocolError
+
+ A :class:`ProtocolError` object describes a protocol error in the underlying
+ transport layer (such as a 404 'not found' error if the server named by the URI
+ does not exist). It has the following attributes:
-.. attribute:: ProtocolError.url
+ .. attribute:: url
- The URI or URL that triggered the error.
+ The URI or URL that triggered the error.
-.. attribute:: ProtocolError.errcode
+ .. attribute:: errcode
- The error code.
+ The error code.
-.. attribute:: ProtocolError.errmsg
+ .. attribute:: errmsg
- The error message or diagnostic string.
+ The error message or diagnostic string.
-.. attribute:: ProtocolError.headers
+ .. attribute:: headers
- A dict containing the headers of the HTTP/HTTPS request that triggered the
- error.
+ A dict containing the headers of the HTTP/HTTPS request that triggered the
+ error.
In the following example we're going to intentionally cause a :exc:`ProtocolError`
by providing an invalid URI::
import xmlrpc.client
- # create a ServerProxy with an URI that doesn't respond to XMLRPC requests
+ # create a ServerProxy with a URI that doesn't respond to XMLRPC requests
proxy = xmlrpc.client.ServerProxy("http://google.com/")
try:
@@ -527,16 +545,16 @@ Example of Client Usage
from xmlrpc.client import ServerProxy, Error
# server = ServerProxy("http://localhost:8000") # local server
- server = ServerProxy("http://betty.userland.com")
+ with ServerProxy("http://betty.userland.com") as proxy:
- print(server)
+ print(proxy)
- try:
- print(server.examples.getStateName(41))
- except Error as v:
- print("ERROR", v)
+ try:
+ print(proxy.examples.getStateName(41))
+ except Error as v:
+ print("ERROR", v)
-To access an XML-RPC server through a proxy, you need to define a custom
+To access an XML-RPC server through a HTTP proxy, you need to define a custom
transport. The following example shows how:
.. Example taken from http://lowlife.jp/nobonobo/wiki/xmlrpcwithproxy.html
@@ -548,18 +566,21 @@ transport. The following example shows how:
class ProxiedTransport(xmlrpc.client.Transport):
def set_proxy(self, proxy):
self.proxy = proxy
+
def make_connection(self, host):
self.realhost = host
- h = http.client.HTTP(self.proxy)
+ h = http.client.HTTPConnection(self.proxy)
return h
- def send_request(self, connection, handler, request_body):
+
+ def send_request(self, connection, handler, request_body, debug):
connection.putrequest("POST", 'http://%s%s' % (self.realhost, handler))
+
def send_host(self, connection, host):
connection.putheader('Host', self.realhost)
p = ProxiedTransport()
p.set_proxy('proxy-server:8080')
- server = xmlrpc.client.Server('http://time.xmlrpc.com/RPC2', transport=p)
+ server = xmlrpc.client.ServerProxy('http://time.xmlrpc.com/RPC2', transport=p)
print(server.currentTime.getCurrentTime())
@@ -572,7 +593,7 @@ See :ref:`simplexmlrpcserver-example`.
.. rubric:: Footnotes
.. [#] This approach has been first presented in `a discussion on xmlrpc.com
- <http://web.archive.org/web/20060624230303/http://www.xmlrpc.com/discuss/msgReader$1208?mode=topic>`_.
+ <https://web.archive.org/web/20060624230303/http://www.xmlrpc.com/discuss/msgReader$1208?mode=topic>`_.
.. the link now points to webarchive since the one at
.. http://www.xmlrpc.com/discuss/msgReader%241208 is broken (and webadmin
.. doesn't reply)
diff --git a/Doc/library/xmlrpc.server.rst b/Doc/library/xmlrpc.server.rst
index 37d1393eff..ad1e81203b 100644
--- a/Doc/library/xmlrpc.server.rst
+++ b/Doc/library/xmlrpc.server.rst
@@ -3,6 +3,7 @@
.. module:: xmlrpc.server
:synopsis: Basic XML-RPC server implementations.
+
.. moduleauthor:: Brian Quinlan <brianq@activestate.com>
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
@@ -18,7 +19,7 @@ servers written in Python. Servers can either be free standing, using
.. warning::
- The :mod:`xmlrpc.client` module is not secure against maliciously
+ The :mod:`xmlrpc.server` module is not secure against maliciously
constructed data. If you need to parse untrusted or unauthenticated data see
:ref:`xml-vulnerabilities`.
diff --git a/Doc/library/zipapp.rst b/Doc/library/zipapp.rst
new file mode 100644
index 0000000000..7c7767f0d4
--- /dev/null
+++ b/Doc/library/zipapp.rst
@@ -0,0 +1,258 @@
+:mod:`zipapp` --- Manage executable python zip archives
+=======================================================
+
+.. module:: zipapp
+ :synopsis: Manage executable python zip archives
+
+.. versionadded:: 3.5
+
+**Source code:** :source:`Lib/zipapp.py`
+
+.. index::
+ single: Executable Zip Files
+
+--------------
+
+This module provides tools to manage the creation of zip files containing
+Python code, which can be :ref:`executed directly by the Python interpreter
+<using-on-interface-options>`. The module provides both a
+:ref:`zipapp-command-line-interface` and a :ref:`zipapp-python-api`.
+
+
+Basic Example
+-------------
+
+The following example shows how the :ref:`zipapp-command-line-interface`
+can be used to create an executable archive from a directory containing
+Python code. When run, the archive will execute the ``main`` function from
+the module ``myapp`` in the archive.
+
+.. code-block:: sh
+
+ $ python -m zipapp myapp -m "myapp:main"
+ $ python myapp.pyz
+ <output from myapp>
+
+
+.. _zipapp-command-line-interface:
+
+Command-Line Interface
+----------------------
+
+When called as a program from the command line, the following form is used:
+
+.. code-block:: sh
+
+ $ python -m zipapp source [options]
+
+If *source* is a directory, this will create an archive from the contents of
+*source*. If *source* is a file, it should be an archive, and it will be
+copied to the target archive (or the contents of its shebang line will be
+displayed if the --info option is specified).
+
+The following options are understood:
+
+.. program:: zipapp
+
+.. cmdoption:: -o <output>, --output=<output>
+
+ Write the output to a file named *output*. If this option is not specified,
+ the output filename will be the same as the input *source*, with the
+ extension ``.pyz`` added. If an explicit filename is given, it is used as
+ is (so a ``.pyz`` extension should be included if required).
+
+ An output filename must be specified if the *source* is an archive (and in
+ that case, *output* must not be the same as *source*).
+
+.. cmdoption:: -p <interpreter>, --python=<interpreter>
+
+ Add a ``#!`` line to the archive specifying *interpreter* as the command
+ to run. Also, on POSIX, make the archive executable. The default is to
+ write no ``#!`` line, and not make the file executable.
+
+.. cmdoption:: -m <mainfn>, --main=<mainfn>
+
+ Write a ``__main__.py`` file to the archive that executes *mainfn*. The
+ *mainfn* argument should have the form "pkg.mod:fn", where "pkg.mod" is a
+ package/module in the archive, and "fn" is a callable in the given module.
+ The ``__main__.py`` file will execute that callable.
+
+ :option:`--main` cannot be specified when copying an archive.
+
+.. cmdoption:: --info
+
+ Display the interpreter embedded in the archive, for diagnostic purposes. In
+ this case, any other options are ignored and SOURCE must be an archive, not a
+ directory.
+
+.. cmdoption:: -h, --help
+
+ Print a short usage message and exit.
+
+
+.. _zipapp-python-api:
+
+Python API
+----------
+
+The module defines two convenience functions:
+
+
+.. function:: create_archive(source, target=None, interpreter=None, main=None)
+
+ Create an application archive from *source*. The source can be any
+ of the following:
+
+ * The name of a directory, or a :class:`pathlib.Path` object referring
+ to a directory, in which case a new application archive will be
+ created from the content of that directory.
+ * The name of an existing application archive file, or a :class:`pathlib.Path`
+ object referring to such a file, in which case the file is copied to
+ the target (modifying it to reflect the value given for the *interpreter*
+ argument). The file name should include the ``.pyz`` extension, if required.
+ * A file object open for reading in bytes mode. The content of the
+ file should be an application archive, and the file object is
+ assumed to be positioned at the start of the archive.
+
+ The *target* argument determines where the resulting archive will be
+ written:
+
+ * If it is the name of a file, or a :class:`pathlb.Path` object,
+ the archive will be written to that file.
+ * If it is an open file object, the archive will be written to that
+ file object, which must be open for writing in bytes mode.
+ * If the target is omitted (or None), the source must be a directory
+ and the target will be a file with the same name as the source, with
+ a ``.pyz`` extension added.
+
+ The *interpreter* argument specifies the name of the Python
+ interpreter with which the archive will be executed. It is written as
+ a "shebang" line at the start of the archive. On POSIX, this will be
+ interpreted by the OS, and on Windows it will be handled by the Python
+ launcher. Omitting the *interpreter* results in no shebang line being
+ written. If an interpreter is specified, and the target is a
+ filename, the executable bit of the target file will be set.
+
+ The *main* argument specifies the name of a callable which will be
+ used as the main program for the archive. It can only be specified if
+ the source is a directory, and the source does not already contain a
+ ``__main__.py`` file. The *main* argument should take the form
+ "pkg.module:callable" and the archive will be run by importing
+ "pkg.module" and executing the given callable with no arguments. It
+ is an error to omit *main* if the source is a directory and does not
+ contain a ``__main__.py`` file, as otherwise the resulting archive
+ would not be executable.
+
+ If a file object is specified for *source* or *target*, it is the
+ caller's responsibility to close it after calling create_archive.
+
+ When copying an existing archive, file objects supplied only need
+ ``read`` and ``readline``, or ``write`` methods. When creating an
+ archive from a directory, if the target is a file object it will be
+ passed to the ``zipfile.ZipFile`` class, and must supply the methods
+ needed by that class.
+
+.. function:: get_interpreter(archive)
+
+ Return the interpreter specified in the ``#!`` line at the start of the
+ archive. If there is no ``#!`` line, return :const:`None`.
+ The *archive* argument can be a filename or a file-like object open
+ for reading in bytes mode. It is assumed to be at the start of the archive.
+
+
+.. _zipapp-examples:
+
+Examples
+--------
+
+Pack up a directory into an archive, and run it.
+
+.. code-block:: sh
+
+ $ python -m zipapp myapp
+ $ python myapp.pyz
+ <output from myapp>
+
+The same can be done using the :func:`create_archive` functon::
+
+ >>> import zipapp
+ >>> zipapp.create_archive('myapp.pyz', 'myapp')
+
+To make the application directly executable on POSIX, specify an interpreter
+to use.
+
+.. code-block:: sh
+
+ $ python -m zipapp myapp -p "/usr/bin/env python"
+ $ ./myapp.pyz
+ <output from myapp>
+
+To replace the shebang line on an existing archive, create a modified archive
+using the :func:`create_archive` function::
+
+ >>> import zipapp
+ >>> zipapp.create_archive('old_archive.pyz', 'new_archive.pyz', '/usr/bin/python3')
+
+To update the file in place, do the replacement in memory using a :class:`BytesIO`
+object, and then overwrite the source afterwards. Note that there is a risk
+when overwriting a file in place that an error will result in the loss of
+the original file. This code does not protect against such errors, but
+production code should do so. Also, this method will only work if the archive
+fits in memory::
+
+ >>> import zipapp
+ >>> import io
+ >>> temp = io.BytesIO()
+ >>> zipapp.create_archive('myapp.pyz', temp, '/usr/bin/python2')
+ >>> with open('myapp.pyz', 'wb') as f:
+ >>> f.write(temp.getvalue())
+
+Note that if you specify an interpreter and then distribute your application
+archive, you need to ensure that the interpreter used is portable. The Python
+launcher for Windows supports most common forms of POSIX ``#!`` line, but there
+are other issues to consider:
+
+* If you use "/usr/bin/env python" (or other forms of the "python" command,
+ such as "/usr/bin/python"), you need to consider that your users may have
+ either Python 2 or Python 3 as their default, and write your code to work
+ under both versions.
+* If you use an explicit version, for example "/usr/bin/env python3" your
+ application will not work for users who do not have that version. (This
+ may be what you want if you have not made your code Python 2 compatible).
+* There is no way to say "python X.Y or later", so be careful of using an
+ exact version like "/usr/bin/env python3.4" as you will need to change your
+ shebang line for users of Python 3.5, for example.
+
+The Python Zip Application Archive Format
+-----------------------------------------
+
+Python has been able to execute zip files which contain a ``__main__.py`` file
+since version 2.6. In order to be executed by Python, an application archive
+simply has to be a standard zip file containing a ``__main__.py`` file which
+will be run as the entry point for the application. As usual for any Python
+script, the parent of the script (in this case the zip file) will be placed on
+:data:`sys.path` and thus further modules can be imported from the zip file.
+
+The zip file format allows arbitrary data to be prepended to a zip file. The
+zip application format uses this ability to prepend a standard POSIX "shebang"
+line to the file (``#!/path/to/interpreter``).
+
+Formally, the Python zip application format is therefore:
+
+1. An optional shebang line, containing the characters ``b'#!'`` followed by an
+ interpreter name, and then a newline (``b'\n'``) character. The interpreter
+ name can be anything acceptable to the OS "shebang" processing, or the Python
+ launcher on Windows. The interpreter should be encoded in UTF-8 on Windows,
+ and in :func:`sys.getfilesystemencoding()` on POSIX.
+2. Standard zipfile data, as generated by the :mod:`zipfile` module. The
+ zipfile content *must* include a file called ``__main__.py`` (which must be
+ in the "root" of the zipfile - i.e., it cannot be in a subdirectory). The
+ zipfile data can be compressed or uncompressed.
+
+If an application archive has a shebang line, it may have the executable bit set
+on POSIX systems, to allow it to be executed directly.
+
+There is no requirement that the tools in this module are used to create
+application archives - the module is a convenience, but archives in the above
+format created by any means are acceptable to Python.
+
diff --git a/Doc/library/zipfile.rst b/Doc/library/zipfile.rst
index 10a094f8b1..b421ea58fe 100644
--- a/Doc/library/zipfile.rst
+++ b/Doc/library/zipfile.rst
@@ -3,6 +3,7 @@
.. module:: zipfile
:synopsis: Read and write ZIP-format archive files.
+
.. moduleauthor:: James C. Ahlstrom <jim@interet.com>
.. sectionauthor:: James C. Ahlstrom <jim@interet.com>
@@ -13,8 +14,7 @@
The ZIP file format is a common archive and compression standard. This module
provides tools to create, read, write, append, and list a ZIP file. Any
advanced use of this module will require an understanding of the format, as
-defined in `PKZIP Application Note
-<http://www.pkware.com/documents/casestudies/APPNOTE.TXT>`_.
+defined in `PKZIP Application Note`_.
This module does not currently handle multi-disk ZIP files.
It can handle ZIP files that use the ZIP64 extensions
@@ -115,7 +115,7 @@ The module defines the following items:
.. seealso::
- `PKZIP Application Note <http://www.pkware.com/documents/casestudies/APPNOTE.TXT>`_
+ `PKZIP Application Note`_
Documentation on the ZIP file format by Phil Katz, the creator of the format and
algorithms used.
@@ -134,12 +134,16 @@ ZipFile Objects
Open a ZIP file, where *file* can be either a path to a file (a string) or a
file-like object. The *mode* parameter should be ``'r'`` to read an existing
- file, ``'w'`` to truncate and write a new file, or ``'a'`` to append to an
- existing file. If *mode* is ``'a'`` and *file* refers to an existing ZIP
+ file, ``'w'`` to truncate and write a new file, ``'a'`` to append to an
+ existing file, or ``'x'`` to exclusively create and write a new file.
+ If *mode* is ``'x'`` and *file* refers to an existing file,
+ a :exc:`FileExistsError` will be raised.
+ If *mode* is ``'a'`` and *file* refers to an existing ZIP
file, then additional files are added to it. If *file* does not refer to a
ZIP file, then a new ZIP archive is appended to the file. This is meant for
adding a ZIP archive to another file (such as :file:`python.exe`). If
*mode* is ``a`` and the file does not exist at all, it is created.
+ If *mode* is ``r`` or ``a``, the file should be seekable.
*compression* is the ZIP compression method to use when writing the archive,
and should be :const:`ZIP_STORED`, :const:`ZIP_DEFLATED`,
:const:`ZIP_BZIP2` or :const:`ZIP_LZMA`; unrecognized
@@ -151,7 +155,7 @@ ZipFile Objects
extensions when the zipfile is larger than 2 GiB. If it is false :mod:`zipfile`
will raise an exception when the ZIP file would require ZIP64 extensions.
- If the file is created with mode ``'a'`` or ``'w'`` and then
+ If the file is created with mode ``'w'``, ``'x'`` or ``'a'`` and then
:meth:`closed <close>` without adding any files to the archive, the appropriate
ZIP structures for an empty archive will be written to the file.
@@ -171,6 +175,10 @@ ZipFile Objects
.. versionchanged:: 3.4
ZIP64 extensions are enabled by default.
+ .. versionchanged:: 3.5
+ Added support for writing to unseekable streams.
+ Added support for the ``'x'`` mode.
+
.. method:: ZipFile.close()
@@ -226,14 +234,8 @@ ZipFile Objects
.. note::
- If the ZipFile was created by passing in a file-like object as the first
- argument to the constructor, then the object returned by :meth:`.open` shares the
- ZipFile's file pointer. Under these circumstances, the object returned by
- :meth:`.open` should not be used after any additional operations are performed
- on the ZipFile object. If the ZipFile was created by passing in a string (the
- filename) as the first argument to the constructor, then :meth:`.open` will
- create a new file object that will be held by the ZipExtFile, allowing it to
- operate independently of the ZipFile.
+ Objects returned by :meth:`.open` can operate independently of the
+ ZipFile.
.. note::
@@ -318,7 +320,8 @@ ZipFile Objects
*arcname* (by default, this will be the same as *filename*, but without a drive
letter and with leading path separators removed). If given, *compress_type*
overrides the value given for the *compression* parameter to the constructor for
- the new entry. The archive must be open with mode ``'w'`` or ``'a'`` -- calling
+ the new entry.
+ The archive must be open with mode ``'w'``, ``'x'`` or ``'a'`` -- calling
:meth:`write` on a ZipFile created with mode ``'r'`` will raise a
:exc:`RuntimeError`. Calling :meth:`write` on a closed ZipFile will raise a
:exc:`RuntimeError`.
@@ -340,16 +343,16 @@ ZipFile Objects
If ``arcname`` (or ``filename``, if ``arcname`` is not given) contains a null
byte, the name of the file in the archive will be truncated at the null byte.
-
.. method:: ZipFile.writestr(zinfo_or_arcname, bytes[, compress_type])
Write the string *bytes* to the archive; *zinfo_or_arcname* is either the file
name it will be given in the archive, or a :class:`ZipInfo` instance. If it's
an instance, at least the filename, date, and time must be given. If it's a
- name, the date and time is set to the current date and time. The archive must be
- opened with mode ``'w'`` or ``'a'`` -- calling :meth:`writestr` on a ZipFile
- created with mode ``'r'`` will raise a :exc:`RuntimeError`. Calling
- :meth:`writestr` on a closed ZipFile will raise a :exc:`RuntimeError`.
+ name, the date and time is set to the current date and time.
+ The archive must be opened with mode ``'w'``, ``'x'`` or ``'a'`` -- calling
+ :meth:`writestr` on a ZipFile created with mode ``'r'`` will raise a
+ :exc:`RuntimeError`. Calling :meth:`writestr` on a closed ZipFile will
+ raise a :exc:`RuntimeError`.
If given, *compress_type* overrides the value given for the *compression*
parameter to the constructor for the new entry, or in the *zinfo_or_arcname*
@@ -377,7 +380,8 @@ The following data attributes are also available:
.. attribute:: ZipFile.comment
The comment text associated with the ZIP file. If assigning a comment to a
- :class:`ZipFile` instance created with mode 'a' or 'w', this should be a
+ :class:`ZipFile` instance created with mode ``'w'``, ``'x'`` or ``'a'``,
+ this should be a
string no longer than 65535 bytes. Comments longer than this will be
truncated in the written archive when :meth:`close` is called.
@@ -407,8 +411,7 @@ The :class:`PyZipFile` constructor takes the same parameters as the
archive.
If the *optimize* parameter to :class:`PyZipFile` was not given or ``-1``,
- the corresponding file is a :file:`\*.pyo` file if available, else a
- :file:`\*.pyc` file, compiling if necessary.
+ the corresponding file is a :file:`\*.pyc` file, compiling if necessary.
If the *optimize* parameter to :class:`PyZipFile` was ``0``, ``1`` or
``2``, only files with that optimization level (see :func:`compile`) are
@@ -508,8 +511,7 @@ Instances have the following attributes:
.. attribute:: ZipInfo.extra
- Expansion field data. The `PKZIP Application Note
- <http://www.pkware.com/documents/casestudies/APPNOTE.TXT>`_ contains
+ Expansion field data. The `PKZIP Application Note`_ contains
some comments on the internal structure of the data contained in this string.
@@ -572,3 +574,4 @@ Instances have the following attributes:
Size of the uncompressed file.
+.. _PKZIP Application Note: https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT
diff --git a/Doc/library/zipimport.rst b/Doc/library/zipimport.rst
index 2cf508b85c..0a0f17547f 100644
--- a/Doc/library/zipimport.rst
+++ b/Doc/library/zipimport.rst
@@ -3,8 +3,10 @@
.. module:: zipimport
:synopsis: support for importing Python modules from ZIP archives.
+
.. moduleauthor:: Just van Rossum <just@letterror.com>
+--------------
This module adds the ability to import Python modules (:file:`\*.py`,
:file:`\*.py[co]`) and packages from ZIP-format archives. It is usually not
@@ -20,17 +22,17 @@ subdirectory. For example, the path :file:`example.zip/lib/` would only
import from the :file:`lib/` subdirectory within the archive.
Any files may be present in the ZIP archive, but only files :file:`.py` and
-:file:`.py[co]` are available for import. ZIP import of dynamic modules
+:file:`.pyc` are available for import. ZIP import of dynamic modules
(:file:`.pyd`, :file:`.so`) is disallowed. Note that if an archive only contains
:file:`.py` files, Python will not attempt to modify the archive by adding the
-corresponding :file:`.pyc` or :file:`.pyo` file, meaning that if a ZIP archive
+corresponding :file:`.pyc` file, meaning that if a ZIP archive
doesn't contain :file:`.pyc` files, importing may be rather slow.
ZIP archives with an archive comment are currently not supported.
.. seealso::
- `PKZIP Application Note <http://www.pkware.com/documents/casestudies/APPNOTE.TXT>`_
+ `PKZIP Application Note <https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT>`_
Documentation on the ZIP file format by Phil Katz, the creator of the format and
algorithms used.
@@ -161,4 +163,3 @@ Here is an example that imports a module from a ZIP archive - note that the
>>> import jwzthreading
>>> jwzthreading.__file__
'example.zip/jwzthreading.py'
-
diff --git a/Doc/library/zlib.rst b/Doc/library/zlib.rst
index 58fc31b095..1de7baee54 100644
--- a/Doc/library/zlib.rst
+++ b/Doc/library/zlib.rst
@@ -5,6 +5,7 @@
:synopsis: Low-level interface to compression and decompression routines
compatible with gzip.
+--------------
For applications that require data compression, the functions in this module
allow compression and decompression, using the zlib library. The zlib library
@@ -31,22 +32,19 @@ The available exception and functions in this module are:
.. function:: adler32(data[, value])
Computes an Adler-32 checksum of *data*. (An Adler-32 checksum is almost as
- reliable as a CRC32 but can be computed much more quickly.) If *value* is
- present, it is used as the starting value of the checksum; otherwise, a fixed
- default value is used. This allows computing a running checksum over the
+ reliable as a CRC32 but can be computed much more quickly.) The result
+ is an unsigned 32-bit integer. If *value* is present, it is used as
+ the starting value of the checksum; otherwise, a default value of 1
+ is used. Passing in *value* allows computing a running checksum over the
concatenation of several inputs. The algorithm is not cryptographically
strong, and should not be used for authentication or digital signatures. Since
the algorithm is designed for use as a checksum algorithm, it is not suitable
for use as a general hash algorithm.
- Always returns an unsigned 32-bit integer.
-
-.. note::
- To generate the same numeric value across all Python versions and
- platforms use adler32(data) & 0xffffffff. If you are only using
- the checksum in packed binary format this is not necessary as the
- return value is the correct 32bit binary representation
- regardless of sign.
+ .. versionchanged:: 3.0
+ Always returns an unsigned value.
+ To generate the same numeric value across all Python versions and
+ platforms, use ``adler32(data) & 0xffffffff``.
.. function:: compress(data[, level])
@@ -63,17 +61,31 @@ The available exception and functions in this module are:
Returns a compression object, to be used for compressing data streams that won't
fit into memory at once.
- *level* is the compression level -- an integer from ``0`` to ``9``. A value
- of ``1`` is fastest and produces the least compression, while a value of
+ *level* is the compression level -- an integer from ``0`` to ``9`` or ``-1``.
+ A value of ``1`` is fastest and produces the least compression, while a value of
``9`` is slowest and produces the most. ``0`` is no compression. The default
- value is ``6``.
+ value is ``-1`` (Z_DEFAULT_COMPRESSION). Z_DEFAULT_COMPRESSION represents a default
+ compromise between speed and compression (currently equivalent to level 6).
*method* is the compression algorithm. Currently, the only supported value is
``DEFLATED``.
- *wbits* is the base two logarithm of the size of the window buffer. This
- should be an integer from ``8`` to ``15``. Higher values give better
- compression, but use more memory.
+ The *wbits* argument controls the size of the history buffer (or the
+ "window size") used when compressing data, and whether a header and
+ trailer is included in the output. It can take several ranges of values:
+
+ * +9 to +15: The base-two logarithm of the window size, which
+ therefore ranges between 512 and 32768. Larger values produce
+ better compression at the expense of greater memory usage. The
+ resulting output will include a zlib-specific header and trailer.
+
+ * −9 to −15: Uses the absolute value of *wbits* as the
+ window size logarithm, while producing a raw output stream with no
+ header or trailing checksum.
+
+ * +25 to +31 = 16 + (9 to 15): Uses the low 4 bits of the value as the
+ window size logarithm, while including a basic :program:`gzip` header
+ and trailing checksum in the output.
The *memLevel* argument controls the amount of memory used for the
internal compression state. Valid values range from ``1`` to ``9``.
@@ -97,42 +109,58 @@ The available exception and functions in this module are:
single: Cyclic Redundancy Check
single: checksum; Cyclic Redundancy Check
- Computes a CRC (Cyclic Redundancy Check) checksum of *data*. If *value* is
- present, it is used as the starting value of the checksum; otherwise, a fixed
- default value is used. This allows computing a running checksum over the
+ Computes a CRC (Cyclic Redundancy Check) checksum of *data*. The
+ result is an unsigned 32-bit integer. If *value* is present, it is used
+ as the starting value of the checksum; otherwise, a default value of 0
+ is used. Passing in *value* allows computing a running checksum over the
concatenation of several inputs. The algorithm is not cryptographically
strong, and should not be used for authentication or digital signatures. Since
the algorithm is designed for use as a checksum algorithm, it is not suitable
for use as a general hash algorithm.
- Always returns an unsigned 32-bit integer.
-
- .. note::
-
+ .. versionchanged:: 3.0
+ Always returns an unsigned value.
To generate the same numeric value across all Python versions and
- platforms, use ``crc32(data) & 0xffffffff``. If you are only using
- the checksum in packed binary format this is not necessary as the
- return value is the correct 32-bit binary representation
- regardless of sign.
+ platforms, use ``crc32(data) & 0xffffffff``.
.. function:: decompress(data[, wbits[, bufsize]])
Decompresses the bytes in *data*, returning a bytes object containing the
- uncompressed data. The *wbits* parameter controls the size of the window
- buffer, and is discussed further below.
+ uncompressed data. The *wbits* parameter depends on
+ the format of *data*, and is discussed further below.
If *bufsize* is given, it is used as the initial size of the output
buffer. Raises the :exc:`error` exception if any error occurs.
- The absolute value of *wbits* is the base two logarithm of the size of the
- history buffer (the "window size") used when compressing data. Its absolute
- value should be between 8 and 15 for the most recent versions of the zlib
- library, larger values resulting in better compression at the expense of greater
- memory usage. When decompressing a stream, *wbits* must not be smaller
+ .. _decompress-wbits:
+
+ The *wbits* parameter controls the size of the history buffer
+ (or "window size"), and what header and trailer format is expected.
+ It is similar to the parameter for :func:`compressobj`, but accepts
+ more ranges of values:
+
+ * +8 to +15: The base-two logarithm of the window size. The input
+ must include a zlib header and trailer.
+
+ * 0: Automatically determine the window size from the zlib header.
+ Only supported since zlib 1.2.3.5.
+
+ * −8 to −15: Uses the absolute value of *wbits* as the window size
+ logarithm. The input must be a raw stream with no header or trailer.
+
+ * +24 to +31 = 16 + (8 to 15): Uses the low 4 bits of the value as
+ the window size logarithm. The input must include a gzip header and
+ trailer.
+
+ * +40 to +47 = 32 + (8 to 15): Uses the low 4 bits of the value as
+ the window size logarithm, and automatically accepts either
+ the zlib or gzip format.
+
+ When decompressing a stream, the window size must not be smaller
than the size originally used to compress the stream; using a too-small
- value will result in an exception. The default value is therefore the
- highest value, 15. When *wbits* is negative, the standard
- :program:`gzip` header is suppressed.
+ value may result in an :exc:`error` exception. The default *wbits* value
+ is 15, which corresponds to the largest window size and requires a zlib
+ header and trailer to be included.
*bufsize* is the initial size of the buffer used to hold decompressed data. If
more space is required, the buffer size will be increased as needed, so you
@@ -145,7 +173,9 @@ The available exception and functions in this module are:
Returns a decompression object, to be used for decompressing data streams that
won't fit into memory at once.
- The *wbits* parameter controls the size of the window buffer.
+ The *wbits* parameter controls the size of the history buffer (or the
+ "window size"), and what header and trailer format is expected. It has
+ the same meaning as `described for decompress() <#decompress-wbits>`__.
The *zdict* parameter specifies a predefined compression dictionary. If
provided, this must be the same dictionary as was used by the compressor that
diff --git a/Doc/license.rst b/Doc/license.rst
index 8a613b21f3..8843116a14 100644
--- a/Doc/license.rst
+++ b/Doc/license.rst
@@ -11,12 +11,12 @@ History of the software
=======================
Python was created in the early 1990s by Guido van Rossum at Stichting
-Mathematisch Centrum (CWI, see http://www.cwi.nl/) in the Netherlands as a
+Mathematisch Centrum (CWI, see https://www.cwi.nl/) in the Netherlands as a
successor of a language called ABC. Guido remains Python's principal author,
although it includes many contributions from others.
In 1995, Guido continued his work on Python at the Corporation for National
-Research Initiatives (CNRI, see http://www.cnri.reston.va.us/) in Reston,
+Research Initiatives (CNRI, see https://www.cnri.reston.va.us/) in Reston,
Virginia where he released several versions of the software.
In May 2000, Guido and the Python core development team moved to BeOpen.com to
@@ -27,7 +27,7 @@ https://www.python.org/psf/) was formed, a non-profit organization created
specifically to own Python-related Intellectual Property. Zope Corporation is a
sponsoring member of the PSF.
-All Python releases are Open Source (see http://opensource.org/ for the Open
+All Python releases are Open Source (see https://opensource.org/ for the Open
Source Definition). Historically, most, but not all, Python releases have also
been GPL-compatible; the table below summarizes the various releases.
@@ -73,181 +73,189 @@ Terms and conditions for accessing or otherwise using Python
============================================================
-.. centered:: PSF LICENSE AGREEMENT FOR PYTHON |release|
-
-#. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), and
- the Individual or Organization ("Licensee") accessing and otherwise using Python
- |release| software in source or binary form and its associated documentation.
-
-#. Subject to the terms and conditions of this License Agreement, PSF hereby
- grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
- analyze, test, perform and/or display publicly, prepare derivative works,
- distribute, and otherwise use Python |release| alone or in any derivative
- version, provided, however, that PSF's License Agreement and PSF's notice of
- copyright, i.e., "Copyright © 2001-2016 Python Software Foundation; All Rights
- Reserved" are retained in Python |release| alone or in any derivative version
- prepared by Licensee.
-
-#. In the event Licensee prepares a derivative work that is based on or
- incorporates Python |release| or any part thereof, and wants to make the
- derivative work available to others as provided herein, then Licensee hereby
- agrees to include in any such work a brief summary of the changes made to Python
- |release|.
-
-#. PSF is making Python |release| available to Licensee on an "AS IS" basis.
- PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF
- EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR
- WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE
- USE OF PYTHON |release| WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
-
-#. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON |release|
- FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF
- MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON |release|, OR ANY DERIVATIVE
- THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
-
-#. This License Agreement will automatically terminate upon a material breach of
- its terms and conditions.
-
-#. Nothing in this License Agreement shall be deemed to create any relationship
- of agency, partnership, or joint venture between PSF and Licensee. This License
- Agreement does not grant permission to use PSF trademarks or trade name in a
- trademark sense to endorse or promote products or services of Licensee, or any
- third party.
-
-#. By copying, installing or otherwise using Python |release|, Licensee agrees
- to be bound by the terms and conditions of this License Agreement.
-
-
-.. centered:: BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0
-
-
-.. centered:: BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1
-
-#. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an office at
- 160 Saratoga Avenue, Santa Clara, CA 95051, and the Individual or Organization
- ("Licensee") accessing and otherwise using this software in source or binary
- form and its associated documentation ("the Software").
-
-#. Subject to the terms and conditions of this BeOpen Python License Agreement,
- BeOpen hereby grants Licensee a non-exclusive, royalty-free, world-wide license
- to reproduce, analyze, test, perform and/or display publicly, prepare derivative
- works, distribute, and otherwise use the Software alone or in any derivative
- version, provided, however, that the BeOpen Python License is retained in the
- Software, alone or in any derivative version prepared by Licensee.
-
-#. BeOpen is making the Software available to Licensee on an "AS IS" basis.
- BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF
- EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND DISCLAIMS ANY REPRESENTATION OR
- WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE
- USE OF THE SOFTWARE WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
-
-#. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE SOFTWARE FOR
- ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF USING,
- MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY DERIVATIVE THEREOF, EVEN IF
- ADVISED OF THE POSSIBILITY THEREOF.
-
-#. This License Agreement will automatically terminate upon a material breach of
- its terms and conditions.
-
-#. This License Agreement shall be governed by and interpreted in all respects
- by the law of the State of California, excluding conflict of law provisions.
- Nothing in this License Agreement shall be deemed to create any relationship of
- agency, partnership, or joint venture between BeOpen and Licensee. This License
- Agreement does not grant permission to use BeOpen trademarks or trade names in a
- trademark sense to endorse or promote products or services of Licensee, or any
- third party. As an exception, the "BeOpen Python" logos available at
- http://www.pythonlabs.com/logos.html may be used according to the permissions
- granted on that web page.
-
-#. By copying, installing or otherwise using the software, Licensee agrees to be
- bound by the terms and conditions of this License Agreement.
-
-
-.. centered:: CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1
-
-#. This LICENSE AGREEMENT is between the Corporation for National Research
- Initiatives, having an office at 1895 Preston White Drive, Reston, VA 20191
- ("CNRI"), and the Individual or Organization ("Licensee") accessing and
- otherwise using Python 1.6.1 software in source or binary form and its
- associated documentation.
-
-#. Subject to the terms and conditions of this License Agreement, CNRI hereby
- grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
- analyze, test, perform and/or display publicly, prepare derivative works,
- distribute, and otherwise use Python 1.6.1 alone or in any derivative version,
- provided, however, that CNRI's License Agreement and CNRI's notice of copyright,
- i.e., "Copyright © 1995-2001 Corporation for National Research Initiatives; All
- Rights Reserved" are retained in Python 1.6.1 alone or in any derivative version
- prepared by Licensee. Alternately, in lieu of CNRI's License Agreement,
- Licensee may substitute the following text (omitting the quotes): "Python 1.6.1
- is made available subject to the terms and conditions in CNRI's License
- Agreement. This Agreement together with Python 1.6.1 may be located on the
- Internet using the following unique, persistent identifier (known as a handle):
- 1895.22/1013. This Agreement may also be obtained from a proxy server on the
- Internet using the following URL: http://hdl.handle.net/1895.22/1013."
-
-#. In the event Licensee prepares a derivative work that is based on or
- incorporates Python 1.6.1 or any part thereof, and wants to make the derivative
- work available to others as provided herein, then Licensee hereby agrees to
- include in any such work a brief summary of the changes made to Python 1.6.1.
-
-#. CNRI is making Python 1.6.1 available to Licensee on an "AS IS" basis. CNRI
- MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE,
- BUT NOT LIMITATION, CNRI MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY
- OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF
- PYTHON 1.6.1 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
-
-#. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 1.6.1 FOR
- ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF
- MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, OR ANY DERIVATIVE
- THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
-
-#. This License Agreement will automatically terminate upon a material breach of
- its terms and conditions.
-
-#. This License Agreement shall be governed by the federal intellectual property
- law of the United States, including without limitation the federal copyright
- law, and, to the extent such U.S. federal law does not apply, by the law of the
- Commonwealth of Virginia, excluding Virginia's conflict of law provisions.
- Notwithstanding the foregoing, with regard to derivative works based on Python
- 1.6.1 that incorporate non-separable material that was previously distributed
- under the GNU General Public License (GPL), the law of the Commonwealth of
- Virginia shall govern this License Agreement only as to issues arising under or
- with respect to Paragraphs 4, 5, and 7 of this License Agreement. Nothing in
- this License Agreement shall be deemed to create any relationship of agency,
- partnership, or joint venture between CNRI and Licensee. This License Agreement
- does not grant permission to use CNRI trademarks or trade name in a trademark
- sense to endorse or promote products or services of Licensee, or any third
- party.
-
-#. By clicking on the "ACCEPT" button where indicated, or by copying, installing
- or otherwise using Python 1.6.1, Licensee agrees to be bound by the terms and
- conditions of this License Agreement.
-
-
-.. centered:: ACCEPT
-
-
-.. centered:: CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2
-
-Copyright © 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, The
-Netherlands. All rights reserved.
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted, provided that
-the above copyright notice appear in all copies and that both that copyright
-notice and this permission notice appear in supporting documentation, and that
-the name of Stichting Mathematisch Centrum or CWI not be used in advertising or
-publicity pertaining to distribution of the software without specific, written
-prior permission.
-
-STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE FOR ANY SPECIAL, INDIRECT
-OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
-ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
+PSF LICENSE AGREEMENT FOR PYTHON |release|
+------------------------------------------
+
+.. parsed-literal::
+
+ 1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), and
+ the Individual or Organization ("Licensee") accessing and otherwise using Python
+ |release| software in source or binary form and its associated documentation.
+
+ 2. Subject to the terms and conditions of this License Agreement, PSF hereby
+ grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
+ analyze, test, perform and/or display publicly, prepare derivative works,
+ distribute, and otherwise use Python |release| alone or in any derivative
+ version, provided, however, that PSF's License Agreement and PSF's notice of
+ copyright, i.e., "Copyright © 2001-2016 Python Software Foundation; All Rights
+ Reserved" are retained in Python |release| alone or in any derivative version
+ prepared by Licensee.
+
+ 3. In the event Licensee prepares a derivative work that is based on or
+ incorporates Python |release| or any part thereof, and wants to make the
+ derivative work available to others as provided herein, then Licensee hereby
+ agrees to include in any such work a brief summary of the changes made to Python
+ |release|.
+
+ 4. PSF is making Python |release| available to Licensee on an "AS IS" basis.
+ PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF
+ EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR
+ WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE
+ USE OF PYTHON |release| WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
+
+ 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON |release|
+ FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF
+ MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON |release|, OR ANY DERIVATIVE
+ THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
+
+ 6. This License Agreement will automatically terminate upon a material breach of
+ its terms and conditions.
+
+ 7. Nothing in this License Agreement shall be deemed to create any relationship
+ of agency, partnership, or joint venture between PSF and Licensee. This License
+ Agreement does not grant permission to use PSF trademarks or trade name in a
+ trademark sense to endorse or promote products or services of Licensee, or any
+ third party.
+
+ 8. By copying, installing or otherwise using Python |release|, Licensee agrees
+ to be bound by the terms and conditions of this License Agreement.
+
+
+BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0
+-------------------------------------------
+
+BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1
+
+.. parsed-literal::
+
+ 1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an office at
+ 160 Saratoga Avenue, Santa Clara, CA 95051, and the Individual or Organization
+ ("Licensee") accessing and otherwise using this software in source or binary
+ form and its associated documentation ("the Software").
+
+ 2. Subject to the terms and conditions of this BeOpen Python License Agreement,
+ BeOpen hereby grants Licensee a non-exclusive, royalty-free, world-wide license
+ to reproduce, analyze, test, perform and/or display publicly, prepare derivative
+ works, distribute, and otherwise use the Software alone or in any derivative
+ version, provided, however, that the BeOpen Python License is retained in the
+ Software, alone or in any derivative version prepared by Licensee.
+
+ 3. BeOpen is making the Software available to Licensee on an "AS IS" basis.
+ BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF
+ EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND DISCLAIMS ANY REPRESENTATION OR
+ WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE
+ USE OF THE SOFTWARE WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
+
+ 4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE SOFTWARE FOR
+ ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF USING,
+ MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY DERIVATIVE THEREOF, EVEN IF
+ ADVISED OF THE POSSIBILITY THEREOF.
+
+ 5. This License Agreement will automatically terminate upon a material breach of
+ its terms and conditions.
+
+ 6. This License Agreement shall be governed by and interpreted in all respects
+ by the law of the State of California, excluding conflict of law provisions.
+ Nothing in this License Agreement shall be deemed to create any relationship of
+ agency, partnership, or joint venture between BeOpen and Licensee. This License
+ Agreement does not grant permission to use BeOpen trademarks or trade names in a
+ trademark sense to endorse or promote products or services of Licensee, or any
+ third party. As an exception, the "BeOpen Python" logos available at
+ http://www.pythonlabs.com/logos.html may be used according to the permissions
+ granted on that web page.
+
+ 7. By copying, installing or otherwise using the software, Licensee agrees to be
+ bound by the terms and conditions of this License Agreement.
+
+
+CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1
+---------------------------------------
+
+.. parsed-literal::
+
+ 1. This LICENSE AGREEMENT is between the Corporation for National Research
+ Initiatives, having an office at 1895 Preston White Drive, Reston, VA 20191
+ ("CNRI"), and the Individual or Organization ("Licensee") accessing and
+ otherwise using Python 1.6.1 software in source or binary form and its
+ associated documentation.
+
+ 2. Subject to the terms and conditions of this License Agreement, CNRI hereby
+ grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
+ analyze, test, perform and/or display publicly, prepare derivative works,
+ distribute, and otherwise use Python 1.6.1 alone or in any derivative version,
+ provided, however, that CNRI's License Agreement and CNRI's notice of copyright,
+ i.e., "Copyright © 1995-2001 Corporation for National Research Initiatives; All
+ Rights Reserved" are retained in Python 1.6.1 alone or in any derivative version
+ prepared by Licensee. Alternately, in lieu of CNRI's License Agreement,
+ Licensee may substitute the following text (omitting the quotes): "Python 1.6.1
+ is made available subject to the terms and conditions in CNRI's License
+ Agreement. This Agreement together with Python 1.6.1 may be located on the
+ Internet using the following unique, persistent identifier (known as a handle):
+ 1895.22/1013. This Agreement may also be obtained from a proxy server on the
+ Internet using the following URL: http://hdl.handle.net/1895.22/1013."
+
+ 3. In the event Licensee prepares a derivative work that is based on or
+ incorporates Python 1.6.1 or any part thereof, and wants to make the derivative
+ work available to others as provided herein, then Licensee hereby agrees to
+ include in any such work a brief summary of the changes made to Python 1.6.1.
+
+ 4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS" basis. CNRI
+ MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE,
+ BUT NOT LIMITATION, CNRI MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY
+ OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF
+ PYTHON 1.6.1 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.
+
+ 5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 1.6.1 FOR
+ ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF
+ MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, OR ANY DERIVATIVE
+ THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
+
+ 6. This License Agreement will automatically terminate upon a material breach of
+ its terms and conditions.
+
+ 7. This License Agreement shall be governed by the federal intellectual property
+ law of the United States, including without limitation the federal copyright
+ law, and, to the extent such U.S. federal law does not apply, by the law of the
+ Commonwealth of Virginia, excluding Virginia's conflict of law provisions.
+ Notwithstanding the foregoing, with regard to derivative works based on Python
+ 1.6.1 that incorporate non-separable material that was previously distributed
+ under the GNU General Public License (GPL), the law of the Commonwealth of
+ Virginia shall govern this License Agreement only as to issues arising under or
+ with respect to Paragraphs 4, 5, and 7 of this License Agreement. Nothing in
+ this License Agreement shall be deemed to create any relationship of agency,
+ partnership, or joint venture between CNRI and Licensee. This License Agreement
+ does not grant permission to use CNRI trademarks or trade name in a trademark
+ sense to endorse or promote products or services of Licensee, or any third
+ party.
+
+ 8. By clicking on the "ACCEPT" button where indicated, or by copying, installing
+ or otherwise using Python 1.6.1, Licensee agrees to be bound by the terms and
+ conditions of this License Agreement.
+
+
+CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2
+--------------------------------------------------
+
+.. parsed-literal::
+
+ Copyright © 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, The
+ Netherlands. All rights reserved.
+
+ Permission to use, copy, modify, and distribute this software and its
+ documentation for any purpose and without fee is hereby granted, provided that
+ the above copyright notice appear in all copies and that both that copyright
+ notice and this permission notice appear in supporting documentation, and that
+ the name of Stichting Mathematisch Centrum or CWI not be used in advertising or
+ publicity pertaining to distribution of the software without specific, written
+ prior permission.
+
+ STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE FOR ANY SPECIAL, INDIRECT
+ OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ SOFTWARE.
Licenses and Acknowledgements for Incorporated Software
@@ -329,14 +337,14 @@ Project, http://www.wide.ad.jp/. ::
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
- GAI_ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
- FOR GAI_ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- HOWEVER CAUSED AND ON GAI_ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN GAI_ANY WAY
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
@@ -946,5 +954,3 @@ library unless the build is configured ``--with-system-libmpdec``::
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-
-
diff --git a/Doc/make.bat b/Doc/make.bat
index 251f822abf..5ab80850a3 100644
--- a/Doc/make.bat
+++ b/Doc/make.bat
@@ -8,9 +8,23 @@ set this=%~n0
if "%SPHINXBUILD%" EQU "" set SPHINXBUILD=sphinx-build
if "%PYTHON%" EQU "" set PYTHON=py
-if DEFINED ProgramFiles(x86) set _PRGMFLS=%ProgramFiles(x86)%
-if NOT DEFINED ProgramFiles(x86) set _PRGMFLS=%ProgramFiles%
-if "%HTMLHELP%" EQU "" set HTMLHELP=%_PRGMFLS%\HTML Help Workshop\hhc.exe
+if "%1" NEQ "htmlhelp" goto :skiphhcsearch
+if exist "%HTMLHELP%" goto :skiphhcsearch
+
+rem Search for HHC in likely places
+set HTMLHELP=
+where hhc /q && set HTMLHELP=hhc && goto :skiphhcsearch
+where /R ..\externals hhc > "%TEMP%\hhc.loc" 2> nul && set /P HTMLHELP= < "%TEMP%\hhc.loc" & del "%TEMP%\hhc.loc"
+if not exist "%HTMLHELP%" where /R "%ProgramFiles(x86)%" hhc > "%TEMP%\hhc.loc" 2> nul && set /P HTMLHELP= < "%TEMP%\hhc.loc" & del "%TEMP%\hhc.loc"
+if not exist "%HTMLHELP%" where /R "%ProgramFiles%" hhc > "%TEMP%\hhc.loc" 2> nul && set /P HTMLHELP= < "%TEMP%\hhc.loc" & del "%TEMP%\hhc.loc"
+if not exist "%HTMLHELP%" (
+ echo.
+ echo.The HTML Help Workshop was not found. Set the HTMLHELP variable
+ echo.to the path to hhc.exe or download and install it from
+ echo.http://msdn.microsoft.com/en-us/library/ms669985
+ exit /B 1
+)
+:skiphhcsearch
if "%DISTVERSION%" EQU "" for /f "usebackq" %%v in (`%PYTHON% tools/extensions/patchlevel.py`) do set DISTVERSION=%%v
@@ -36,7 +50,8 @@ if errorlevel 9009 (
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
- goto end
+ popd
+ exit /B 1
)
rem Targets that do require sphinx-build and have their own label
@@ -76,15 +91,6 @@ if NOT "%PAPER%" == "" (
cmd /C %SPHINXBUILD% %SPHINXOPTS% -b%1 -dbuild\doctrees . %BUILDDIR%\%*
if "%1" EQU "htmlhelp" (
- if not exist "%HTMLHELP%" (
- echo.
- echo.The HTML Help Workshop was not found. Set the HTMLHELP variable
- echo.to the path to hhc.exe or download and install it from
- echo.http://msdn.microsoft.com/en-us/library/ms669985
- rem Set errorlevel to 1 and exit
- cmd /C exit /b 1
- goto end
- )
cmd /C "%HTMLHELP%" build\htmlhelp\python%DISTVERSION:.=%.hhp
rem hhc.exe seems to always exit with code 1, reset to 0 for less than 2
if not errorlevel 2 cmd /C exit /b 0
diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst
index 5dd17eb030..2469422565 100644
--- a/Doc/reference/compound_stmts.rst
+++ b/Doc/reference/compound_stmts.rst
@@ -51,6 +51,9 @@ Summarizing:
: | `with_stmt`
: | `funcdef`
: | `classdef`
+ : | `async_with_stmt`
+ : | `async_for_stmt`
+ : | `async_funcdef`
suite: `stmt_list` NEWLINE | NEWLINE INDENT `statement`+ DEDENT
statement: `stmt_list` NEWLINE | `compound_stmt`
stmt_list: `simple_stmt` (";" `simple_stmt`)* [";"]
@@ -436,7 +439,7 @@ is equivalent to ::
.. seealso::
- :pep:`0343` - The "with" statement
+ :pep:`343` - The "with" statement
The specification, background, and examples for the Python :keyword:`with`
statement.
@@ -466,7 +469,7 @@ A function definition defines a user-defined function object (see section
.. productionlist::
funcdef: [`decorators`] "def" `funcname` "(" [`parameter_list`] ")" ["->" `expression`] ":" `suite`
decorators: `decorator`+
- decorator: "@" `dotted_name` ["(" [`parameter_list` [","]] ")"] NEWLINE
+ decorator: "@" `dotted_name` ["(" [`argument_list` [","]] ")"] NEWLINE
dotted_name: `identifier` ("." `identifier`)*
parameter_list: (`defparameter` ",")*
: | "*" [`parameter`] ("," `defparameter`)* ["," "**" `parameter`]
@@ -601,7 +604,7 @@ A class definition defines a class object (see section :ref:`types`):
.. productionlist::
classdef: [`decorators`] "class" `classname` [`inheritance`] ":" `suite`
- inheritance: "(" [`parameter_list`] ")"
+ inheritance: "(" [`argument_list`] ")"
classname: `identifier`
A class definition is an executable statement. The inheritance list usually
@@ -660,6 +663,130 @@ can be used to create instance variables with different implementation details.
:pep:`3129` - Class Decorators
+Coroutines
+==========
+
+.. versionadded:: 3.5
+
+.. index:: statement: async def
+.. _`async def`:
+
+Coroutine function definition
+-----------------------------
+
+.. productionlist::
+ async_funcdef: [`decorators`] "async" "def" `funcname` "(" [`parameter_list`] ")" ["->" `expression`] ":" `suite`
+
+.. index::
+ keyword: async
+ keyword: await
+
+Execution of Python coroutines can be suspended and resumed at many points
+(see :term:`coroutine`). In the body of a coroutine, any ``await`` and
+``async`` identifiers become reserved keywords; :keyword:`await` expressions,
+:keyword:`async for` and :keyword:`async with` can only be used in
+coroutine bodies.
+
+Functions defined with ``async def`` syntax are always coroutine functions,
+even if they do not contain ``await`` or ``async`` keywords.
+
+It is a :exc:`SyntaxError` to use :keyword:`yield` expressions in
+``async def`` coroutines.
+
+An example of a coroutine function::
+
+ async def func(param1, param2):
+ do_stuff()
+ await some_coroutine()
+
+
+.. index:: statement: async for
+.. _`async for`:
+
+The :keyword:`async for` statement
+----------------------------------
+
+.. productionlist::
+ async_for_stmt: "async" `for_stmt`
+
+An :term:`asynchronous iterable` is able to call asynchronous code in its
+*iter* implementation, and :term:`asynchronous iterator` can call asynchronous
+code in its *next* method.
+
+The ``async for`` statement allows convenient iteration over asynchronous
+iterators.
+
+The following code::
+
+ async for TARGET in ITER:
+ BLOCK
+ else:
+ BLOCK2
+
+Is semantically equivalent to::
+
+ iter = (ITER)
+ iter = type(iter).__aiter__(iter)
+ running = True
+ while running:
+ try:
+ TARGET = await type(iter).__anext__(iter)
+ except StopAsyncIteration:
+ running = False
+ else:
+ BLOCK
+ else:
+ BLOCK2
+
+See also :meth:`__aiter__` and :meth:`__anext__` for details.
+
+It is a :exc:`SyntaxError` to use ``async for`` statement outside of an
+:keyword:`async def` function.
+
+
+.. index:: statement: async with
+.. _`async with`:
+
+The :keyword:`async with` statement
+-----------------------------------
+
+.. productionlist::
+ async_with_stmt: "async" `with_stmt`
+
+An :term:`asynchronous context manager` is a :term:`context manager` that is
+able to suspend execution in its *enter* and *exit* methods.
+
+The following code::
+
+ async with EXPR as VAR:
+ BLOCK
+
+Is semantically equivalent to::
+
+ mgr = (EXPR)
+ aexit = type(mgr).__aexit__
+ aenter = type(mgr).__aenter__(mgr)
+ exc = True
+
+ VAR = await aenter
+ try:
+ BLOCK
+ except:
+ if not await aexit(mgr, *sys.exc_info()):
+ raise
+ else:
+ await aexit(mgr, None, None, None)
+
+See also :meth:`__aenter__` and :meth:`__aexit__` for details.
+
+It is a :exc:`SyntaxError` to use ``async with`` statement outside of an
+:keyword:`async def` function.
+
+.. seealso::
+
+ :pep:`492` - Coroutines with async and await syntax
+
+
.. rubric:: Footnotes
.. [#] The exception is propagated to the invocation stack unless
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index 1560ad0d32..71d695f96f 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -616,6 +616,16 @@ Callable types
exception is raised and the iterator will have reached the end of the set of
values to be returned.
+ Coroutine functions
+ .. index::
+ single: coroutine; function
+
+ A function or method which is defined using :keyword:`async def` is called
+ a :dfn:`coroutine function`. Such a function, when called, returns a
+ :term:`coroutine` object. It may contain :keyword:`await` expressions,
+ as well as :keyword:`async with` and :keyword:`async for` statements. See
+ also the :ref:`coroutine-objects` section.
+
Built-in functions
.. index::
object: built-in function
@@ -836,11 +846,9 @@ Internal types
definitions may change with future versions of the interpreter, but they are
mentioned here for completeness.
- Code objects
- .. index::
- single: bytecode
- object: code
+ .. index:: bytecode, object; code, code object
+ Code objects
Code objects represent *byte-compiled* executable Python code, or :term:`bytecode`.
The difference between a code object and a function object is that the function
object contains an explicit reference to the function's globals (the module in
@@ -1724,6 +1732,11 @@ After the class object is created, it is passed to the class decorators
included in the class definition (if any) and the resulting object is bound
in the local namespace as the defined class.
+When a new class is created by ``type.__new__``, the object provided as the
+namespace parameter is copied to a standard Python dictionary and the original
+object is discarded. The new copy becomes the :attr:`~object.__dict__` attribute
+of the class object.
+
.. seealso::
:pep:`3135` - New super
@@ -1743,11 +1756,11 @@ to remember the order that class variables are defined::
class OrderedClass(type):
- @classmethod
- def __prepare__(metacls, name, bases, **kwds):
+ @classmethod
+ def __prepare__(metacls, name, bases, **kwds):
return collections.OrderedDict()
- def __new__(cls, name, bases, namespace, **kwds):
+ def __new__(cls, name, bases, namespace, **kwds):
result = type.__new__(cls, name, bases, dict(namespace))
result.members = tuple(namespace)
return result
@@ -1990,6 +2003,7 @@ left undefined.
.. method:: object.__add__(self, other)
object.__sub__(self, other)
object.__mul__(self, other)
+ object.__matmul__(self, other)
object.__truediv__(self, other)
object.__floordiv__(self, other)
object.__mod__(self, other)
@@ -2006,15 +2020,16 @@ left undefined.
builtin: pow
builtin: pow
- These methods are called to implement the binary arithmetic operations (``+``,
- ``-``, ``*``, ``/``, ``//``, ``%``, :func:`divmod`, :func:`pow`, ``**``, ``<<``,
- ``>>``, ``&``, ``^``, ``|``). For instance, to evaluate the expression
- ``x + y``, where *x* is an instance of a class that has an :meth:`__add__`
- method, ``x.__add__(y)`` is called. The :meth:`__divmod__` method should be the
- equivalent to using :meth:`__floordiv__` and :meth:`__mod__`; it should not be
- related to :meth:`__truediv__`. Note that :meth:`__pow__` should be defined
- to accept an optional third argument if the ternary version of the built-in
- :func:`pow` function is to be supported.
+ These methods are called to implement the binary arithmetic operations
+ (``+``, ``-``, ``*``, ``@``, ``/``, ``//``, ``%``, :func:`divmod`,
+ :func:`pow`, ``**``, ``<<``, ``>>``, ``&``, ``^``, ``|``). For instance, to
+ evaluate the expression ``x + y``, where *x* is an instance of a class that
+ has an :meth:`__add__` method, ``x.__add__(y)`` is called. The
+ :meth:`__divmod__` method should be the equivalent to using
+ :meth:`__floordiv__` and :meth:`__mod__`; it should not be related to
+ :meth:`__truediv__`. Note that :meth:`__pow__` should be defined to accept
+ an optional third argument if the ternary version of the built-in :func:`pow`
+ function is to be supported.
If one of those methods does not support the operation with the supplied
arguments, it should return ``NotImplemented``.
@@ -2023,6 +2038,7 @@ left undefined.
.. method:: object.__radd__(self, other)
object.__rsub__(self, other)
object.__rmul__(self, other)
+ object.__rmatmul__(self, other)
object.__rtruediv__(self, other)
object.__rfloordiv__(self, other)
object.__rmod__(self, other)
@@ -2038,14 +2054,14 @@ left undefined.
builtin: divmod
builtin: pow
- These methods are called to implement the binary arithmetic operations (``+``,
- ``-``, ``*``, ``/``, ``//``, ``%``, :func:`divmod`, :func:`pow`, ``**``,
- ``<<``, ``>>``, ``&``, ``^``, ``|``) with reflected (swapped) operands.
- These functions are only called if the left operand does not support the
- corresponding operation and the operands are of different types. [#]_ For
- instance, to evaluate the expression ``x - y``, where *y* is an instance of
- a class that has an :meth:`__rsub__` method, ``y.__rsub__(x)`` is called if
- ``x.__sub__(y)`` returns *NotImplemented*.
+ These methods are called to implement the binary arithmetic operations
+ (``+``, ``-``, ``*``, ``@``, ``/``, ``//``, ``%``, :func:`divmod`,
+ :func:`pow`, ``**``, ``<<``, ``>>``, ``&``, ``^``, ``|``) with reflected
+ (swapped) operands. These functions are only called if the left operand does
+ not support the corresponding operation and the operands are of different
+ types. [#]_ For instance, to evaluate the expression ``x - y``, where *y* is
+ an instance of a class that has an :meth:`__rsub__` method, ``y.__rsub__(x)``
+ is called if ``x.__sub__(y)`` returns *NotImplemented*.
.. index:: builtin: pow
@@ -2063,6 +2079,7 @@ left undefined.
.. method:: object.__iadd__(self, other)
object.__isub__(self, other)
object.__imul__(self, other)
+ object.__imatmul__(self, other)
object.__itruediv__(self, other)
object.__ifloordiv__(self, other)
object.__imod__(self, other)
@@ -2074,17 +2091,17 @@ left undefined.
object.__ior__(self, other)
These methods are called to implement the augmented arithmetic assignments
- (``+=``, ``-=``, ``*=``, ``/=``, ``//=``, ``%=``, ``**=``, ``<<=``, ``>>=``,
- ``&=``, ``^=``, ``|=``). These methods should attempt to do the operation
- in-place (modifying *self*) and return the result (which could be, but does
- not have to be, *self*). If a specific method is not defined, the augmented
- assignment falls back to the normal methods. For instance, if *x* is an
- instance of a class with an :meth:`__iadd__` method, ``x += y`` is equivalent
- to ``x = x.__iadd__(y)`` . Otherwise, ``x.__add__(y)`` and ``y.__radd__(x)``
- are considered, as with the evaluation of ``x + y``. In certain situations,
- augmented assignment can result in unexpected errors (see
- :ref:`faq-augmented-assignment-tuple-error`), but this behavior is in
- fact part of the data model.
+ (``+=``, ``-=``, ``*=``, ``@=``, ``/=``, ``//=``, ``%=``, ``**=``, ``<<=``,
+ ``>>=``, ``&=``, ``^=``, ``|=``). These methods should attempt to do the
+ operation in-place (modifying *self*) and return the result (which could be,
+ but does not have to be, *self*). If a specific method is not defined, the
+ augmented assignment falls back to the normal methods. For instance, if *x*
+ is an instance of a class with an :meth:`__iadd__` method, ``x += y`` is
+ equivalent to ``x = x.__iadd__(y)`` . Otherwise, ``x.__add__(y)`` and
+ ``y.__radd__(x)`` are considered, as with the evaluation of ``x + y``. In
+ certain situations, augmented assignment can result in unexpected errors (see
+ :ref:`faq-augmented-assignment-tuple-error`), but this behavior is in fact
+ part of the data model.
.. method:: object.__neg__(self)
@@ -2174,7 +2191,7 @@ For more information on context managers, see :ref:`typecontextmanager`.
.. seealso::
- :pep:`0343` - The "with" statement
+ :pep:`343` - The "with" statement
The specification, background, and examples for the Python :keyword:`with`
statement.
@@ -2254,6 +2271,203 @@ special methods (the special method *must* be set on the class
object itself in order to be consistently invoked by the interpreter).
+.. index::
+ single: coroutine
+
+Coroutines
+==========
+
+
+Awaitable Objects
+-----------------
+
+An :term:`awaitable` object generally implements an :meth:`__await__` method.
+:term:`Coroutine` objects returned from :keyword:`async def` functions
+are awaitable.
+
+.. note::
+
+ The :term:`generator iterator` objects returned from generators
+ decorated with :func:`types.coroutine` or :func:`asyncio.coroutine`
+ are also awaitable, but they do not implement :meth:`__await__`.
+
+.. method:: object.__await__(self)
+
+ Must return an :term:`iterator`. Should be used to implement
+ :term:`awaitable` objects. For instance, :class:`asyncio.Future` implements
+ this method to be compatible with the :keyword:`await` expression.
+
+.. versionadded:: 3.5
+
+.. seealso:: :pep:`492` for additional information about awaitable objects.
+
+
+.. _coroutine-objects:
+
+Coroutine Objects
+-----------------
+
+:term:`Coroutine` objects are :term:`awaitable` objects.
+A coroutine's execution can be controlled by calling :meth:`__await__` and
+iterating over the result. When the coroutine has finished executing and
+returns, the iterator raises :exc:`StopIteration`, and the exception's
+:attr:`~StopIteration.value` attribute holds the return value. If the
+coroutine raises an exception, it is propagated by the iterator. Coroutines
+should not directly raise unhandled :exc:`StopIteration` exceptions.
+
+Coroutines also have the methods listed below, which are analogous to
+those of generators (see :ref:`generator-methods`). However, unlike
+generators, coroutines do not directly support iteration.
+
+.. versionchanged:: 3.5.2
+ It is a :exc:`RuntimeError` to await on a coroutine more than once.
+
+
+.. method:: coroutine.send(value)
+
+ Starts or resumes execution of the coroutine. If *value* is ``None``,
+ this is equivalent to advancing the iterator returned by
+ :meth:`__await__`. If *value* is not ``None``, this method delegates
+ to the :meth:`~generator.send` method of the iterator that caused
+ the coroutine to suspend. The result (return value,
+ :exc:`StopIteration`, or other exception) is the same as when
+ iterating over the :meth:`__await__` return value, described above.
+
+.. method:: coroutine.throw(type[, value[, traceback]])
+
+ Raises the specified exception in the coroutine. This method delegates
+ to the :meth:`~generator.throw` method of the iterator that caused
+ the coroutine to suspend, if it has such a method. Otherwise,
+ the exception is raised at the suspension point. The result
+ (return value, :exc:`StopIteration`, or other exception) is the same as
+ when iterating over the :meth:`__await__` return value, described
+ above. If the exception is not caught in the coroutine, it propagates
+ back to the caller.
+
+.. method:: coroutine.close()
+
+ Causes the coroutine to clean itself up and exit. If the coroutine
+ is suspended, this method first delegates to the :meth:`~generator.close`
+ method of the iterator that caused the coroutine to suspend, if it
+ has such a method. Then it raises :exc:`GeneratorExit` at the
+ suspension point, causing the coroutine to immediately clean itself up.
+ Finally, the coroutine is marked as having finished executing, even if
+ it was never started.
+
+ Coroutine objects are automatically closed using the above process when
+ they are about to be destroyed.
+
+.. _async-iterators:
+
+Asynchronous Iterators
+----------------------
+
+An *asynchronous iterable* is able to call asynchronous code in its
+``__aiter__`` implementation, and an *asynchronous iterator* can call
+asynchronous code in its ``__anext__`` method.
+
+Asynchronous iterators can be used in an :keyword:`async for` statement.
+
+.. method:: object.__aiter__(self)
+
+ Must return an *asynchronous iterator* object.
+
+.. method:: object.__anext__(self)
+
+ Must return an *awaitable* resulting in a next value of the iterator. Should
+ raise a :exc:`StopAsyncIteration` error when the iteration is over.
+
+An example of an asynchronous iterable object::
+
+ class Reader:
+ async def readline(self):
+ ...
+
+ def __aiter__(self):
+ return self
+
+ async def __anext__(self):
+ val = await self.readline()
+ if val == b'':
+ raise StopAsyncIteration
+ return val
+
+.. versionadded:: 3.5
+
+.. note::
+
+ .. versionchanged:: 3.5.2
+ Starting with CPython 3.5.2, ``__aiter__`` can directly return
+ :term:`asynchronous iterators <asynchronous iterator>`. Returning
+ an :term:`awaitable` object will result in a
+ :exc:`PendingDeprecationWarning`.
+
+ The recommended way of writing backwards compatible code in
+ CPython 3.5.x is to continue returning awaitables from
+ ``__aiter__``. If you want to avoid the PendingDeprecationWarning
+ and keep the code backwards compatible, the following decorator
+ can be used::
+
+ import functools
+ import sys
+
+ if sys.version_info < (3, 5, 2):
+ def aiter_compat(func):
+ @functools.wraps(func)
+ async def wrapper(self):
+ return func(self)
+ return wrapper
+ else:
+ def aiter_compat(func):
+ return func
+
+ Example::
+
+ class AsyncIterator:
+
+ @aiter_compat
+ def __aiter__(self):
+ return self
+
+ async def __anext__(self):
+ ...
+
+ Starting with CPython 3.6, the :exc:`PendingDeprecationWarning`
+ will be replaced with the :exc:`DeprecationWarning`.
+ In CPython 3.7, returning an awaitable from ``__aiter__`` will
+ result in a :exc:`RuntimeError`.
+
+
+Asynchronous Context Managers
+-----------------------------
+
+An *asynchronous context manager* is a *context manager* that is able to
+suspend execution in its ``__aenter__`` and ``__aexit__`` methods.
+
+Asynchronous context managers can be used in an :keyword:`async with` statement.
+
+.. method:: object.__aenter__(self)
+
+ This method is semantically similar to the :meth:`__enter__`, with only
+ difference that it must return an *awaitable*.
+
+.. method:: object.__aexit__(self, exc_type, exc_value, traceback)
+
+ This method is semantically similar to the :meth:`__exit__`, with only
+ difference that it must return an *awaitable*.
+
+An example of an asynchronous context manager class::
+
+ class AsyncContextManager:
+ async def __aenter__(self):
+ await log('entering context')
+
+ async def __aexit__(self, exc_type, exc, tb):
+ await log('exiting context')
+
+.. versionadded:: 3.5
+
+
.. rubric:: Footnotes
.. [#] It *is* possible in some cases to change an object's type, under certain
diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst
index b6b2b006fa..036f4f1e89 100644
--- a/Doc/reference/expressions.rst
+++ b/Doc/reference/expressions.rst
@@ -378,18 +378,19 @@ on the right hand side of an assignment statement.
.. seealso::
- :pep:`0255` - Simple Generators
+ :pep:`255` - Simple Generators
The proposal for adding generators and the :keyword:`yield` statement to Python.
- :pep:`0342` - Coroutines via Enhanced Generators
+ :pep:`342` - Coroutines via Enhanced Generators
The proposal to enhance the API and syntax of generators, making them
usable as simple coroutines.
- :pep:`0380` - Syntax for Delegating to a Subgenerator
+ :pep:`380` - Syntax for Delegating to a Subgenerator
The proposal to introduce the :token:`yield_from` syntax, making delegation
to sub-generators easy.
.. index:: object: generator
+.. _generator-methods:
Generator-iterator methods
^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -443,12 +444,12 @@ is already executing raises a :exc:`ValueError` exception.
.. method:: generator.close()
Raises a :exc:`GeneratorExit` at the point where the generator function was
- paused. If the generator function then raises :exc:`StopIteration` (by
- exiting normally, or due to already being closed) or :exc:`GeneratorExit` (by
- not catching the exception), close returns to its caller. If the generator
- yields a value, a :exc:`RuntimeError` is raised. If the generator raises any
- other exception, it is propagated to the caller. :meth:`close` does nothing
- if the generator has already exited due to an exception or normal exit.
+ paused. If the generator function then exits gracefully, is already closed,
+ or raises :exc:`GeneratorExit` (by not catching the exception), close
+ returns to its caller. If the generator yields a value, a
+ :exc:`RuntimeError` is raised. If the generator raises any other exception,
+ it is propagated to the caller. :meth:`close` does nothing if the generator
+ has already exited due to an exception or normal exit.
.. index:: single: yield; examples
@@ -727,7 +728,7 @@ A consequence of this is that although the ``*expression`` syntax may appear
(and the ``**expression`` argument, if any -- see below). So::
>>> def f(a, b):
- ... print(a, b)
+ ... print(a, b)
...
>>> f(b=1, *(2,))
2 1
@@ -811,6 +812,20 @@ a class instance:
if that method was called.
+.. _await:
+
+Await expression
+================
+
+Suspend the execution of :term:`coroutine` on an :term:`awaitable` object.
+Can only be used inside a :term:`coroutine function`.
+
+.. productionlist::
+ await_expr: "await" `primary`
+
+.. versionadded:: 3.5
+
+
.. _power:
The power operator
@@ -820,7 +835,7 @@ The power operator binds more tightly than unary operators on its left; it binds
less tightly than unary operators on its right. The syntax is:
.. productionlist::
- power: `primary` ["**" `u_expr`]
+ power: ( `await_expr` | `primary` ) ["**" `u_expr`]
Thus, in an unparenthesized sequence of power and unary operators, the operators
are evaluated from right to left (this does not constrain the evaluation order
@@ -891,8 +906,9 @@ from the power operator, there are only two levels, one for multiplicative
operators and one for additive operators:
.. productionlist::
- m_expr: `u_expr` | `m_expr` "*" `u_expr` | `m_expr` "//" `u_expr` | `m_expr` "/" `u_expr`
- : | `m_expr` "%" `u_expr`
+ m_expr: `u_expr` | `m_expr` "*" `u_expr` | `m_expr` "@" `m_expr` |
+ : `m_expr` "//" `u_expr`| `m_expr` "/" `u_expr` |
+ : `m_expr` "%" `u_expr`
a_expr: `m_expr` | `a_expr` "+" `m_expr` | `a_expr` "-" `m_expr`
.. index:: single: multiplication
@@ -903,6 +919,13 @@ the other must be a sequence. In the former case, the numbers are converted to a
common type and then multiplied together. In the latter case, sequence
repetition is performed; a negative repetition factor yields an empty sequence.
+.. index:: single: matrix multiplication
+
+The ``@`` (at) operator is intended to be used for matrix multiplication. No
+builtin Python types implement this operator.
+
+.. versionadded:: 3.5
+
.. index::
exception: ZeroDivisionError
single: division
@@ -1466,13 +1489,16 @@ precedence and have a left-to-right chaining feature as described in the
+-----------------------------------------------+-------------------------------------+
| ``+``, ``-`` | Addition and subtraction |
+-----------------------------------------------+-------------------------------------+
-| ``*``, ``/``, ``//``, ``%`` | Multiplication, division, remainder |
-| | [#]_ |
+| ``*``, ``@``, ``/``, ``//``, ``%`` | Multiplication, matrix |
+| | multiplication division, |
+| | remainder [#]_ |
+-----------------------------------------------+-------------------------------------+
| ``+x``, ``-x``, ``~x`` | Positive, negative, bitwise NOT |
+-----------------------------------------------+-------------------------------------+
| ``**`` | Exponentiation [#]_ |
+-----------------------------------------------+-------------------------------------+
+| ``await`` ``x`` | Await expression |
++-----------------------------------------------+-------------------------------------+
| ``x[index]``, ``x[index:index]``, | Subscription, slicing, |
| ``x(arguments...)``, ``x.attribute`` | call, attribute reference |
+-----------------------------------------------+-------------------------------------+
diff --git a/Doc/reference/import.rst b/Doc/reference/import.rst
index 16d28d8c73..2144c1fa35 100644
--- a/Doc/reference/import.rst
+++ b/Doc/reference/import.rst
@@ -29,11 +29,10 @@ such as the importing of parent packages, and the updating of various caches
a name binding operation.
When calling :func:`__import__` as part of an import statement, the
-import system first checks the module global namespace for a function by
-that name. If it is not found, then the standard builtin :func:`__import__`
-is called. Other mechanisms for invoking the import system (such as
-:func:`importlib.import_module`) do not perform this check and will always
-use the standard import system.
+standard builtin :func:`__import__` is called. Other mechanisms for
+invoking the import system (such as :func:`importlib.import_module`) may
+choose to subvert :func:`__import__` and use its own solution to
+implement import semantics.
When a module is first imported, Python searches for the module and if found,
it creates a module object [#fnmo]_, initializing it. If the named module
@@ -339,6 +338,7 @@ of what happens during the loading portion of import::
module = None
if spec.loader is not None and hasattr(spec.loader, 'create_module'):
+ # It is assumed 'exec_module' will also be defined on the loader.
module = spec.loader.create_module(spec)
if module is None:
module = ModuleType(spec.name)
@@ -427,7 +427,7 @@ Module loaders may opt in to creating the module object during loading
by implementing a :meth:`~importlib.abc.Loader.create_module` method.
It takes one argument, the module spec, and returns the new module object
to use during loading. ``create_module()`` does not need to set any attributes
-on the module object. If the loader does not define ``create_module()``, the
+on the module object. If the method returns ``None``, the
import machinery will create the new module itself.
.. versionadded:: 3.4
@@ -459,7 +459,13 @@ import machinery will create the new module itself.
* If loading fails, the loader must remove any modules it has inserted
into :data:`sys.modules`, but it must remove **only** the failing
- module, and only if the loader itself has loaded it explicitly.
+ module(s), and only if the loader itself has loaded the module(s)
+ explicitly.
+
+.. versionchanged:: 3.5
+ A :exc:`DeprecationWarning` is raised when ``exec_module()`` is defined but
+ ``create_module()`` is not. Starting in Python 3.6 it will be an error to not
+ define ``create_module()`` on a loader attached to a ModuleSpec.
Submodules
----------
@@ -674,7 +680,7 @@ path entry finder that knows how to handle that particular kind of path.
The default set of path entry finders implement all the semantics for finding
modules on the file system, handling special file types such as Python source
-code (``.py`` files), Python byte code (``.pyc`` and ``.pyo`` files) and
+code (``.py`` files), Python byte code (``.pyc`` files) and
shared libraries (e.g. ``.so`` files). When supported by the :mod:`zipimport`
module in the standard library, the default path entry finders also handle
loading all of these file types (other than shared libraries) from zipfiles.
@@ -788,6 +794,15 @@ hook` callables on :data:`sys.path_hooks`, then the following protocol is used
to ask the finder for a module spec, which is then used when loading the
module.
+The current working directory -- denoted by an empty string -- is handled
+slightly differently from other entries on :data:`sys.path`. First, if the
+current working directory is found to not exist, no value is stored in
+:data:`sys.path_importer_cache`. Second, the value for the current working
+directory is looked up fresh for each module lookup. Third, the path used for
+:data:`sys.path_importer_cache` and returned by
+:meth:`importlib.machinery.PathFinder.find_spec` will be the actual current
+working directory and not the empty string.
+
Path entry finder protocol
--------------------------
diff --git a/Doc/reference/introduction.rst b/Doc/reference/introduction.rst
index 5633ae3eb1..bb7e3906db 100644
--- a/Doc/reference/introduction.rst
+++ b/Doc/reference/introduction.rst
@@ -60,7 +60,7 @@ Python for .NET
This implementation actually uses the CPython implementation, but is a managed
.NET application and makes .NET libraries available. It was created by Brian
Lloyd. For more information, see the `Python for .NET home page
- <http://pythonnet.sourceforge.net>`_.
+ <https://pythonnet.github.io/>`_.
IronPython
An alternate Python for .NET. Unlike Python.NET, this is a complete Python
diff --git a/Doc/reference/lexical_analysis.rst b/Doc/reference/lexical_analysis.rst
index a1265cfad1..71964d71e6 100644
--- a/Doc/reference/lexical_analysis.rst
+++ b/Doc/reference/lexical_analysis.rst
@@ -313,7 +313,7 @@ The Unicode category codes mentioned above stand for:
* *Nd* - decimal numbers
* *Pc* - connector punctuations
* *Other_ID_Start* - explicit list of characters in `PropList.txt
- <http://www.unicode.org/Public/6.3.0/ucd/PropList.txt>`_ to support backwards
+ <http://www.unicode.org/Public/8.0.0/ucd/PropList.txt>`_ to support backwards
compatibility
* *Other_ID_Continue* - likewise
@@ -322,7 +322,7 @@ of identifiers is based on NFKC.
A non-normative HTML file listing all valid identifier characters for Unicode
4.1 can be found at
-http://www.dcl.hpi.uni-potsdam.de/home/loewis/table-3131.html.
+https://www.dcl.hpi.uni-potsdam.de/home/loewis/table-3131.html.
.. _keywords:
@@ -538,8 +538,7 @@ Notes:
Support for name aliases [#]_ has been added.
(5)
- Individual code units which form parts of a surrogate pair can be encoded using
- this escape sequence. Exactly four hex digits are required.
+ Exactly four hex digits are required.
(6)
Any Unicode character can be encoded this way. Exactly eight hex digits
@@ -692,7 +691,7 @@ Operators
The following tokens are operators::
- + - * ** / // %
+ + - * ** / // % @
<< >> & | ^ ~
< > <= >= == !=
@@ -708,7 +707,7 @@ The following tokens serve as delimiters in the grammar::
( ) [ ] { }
, : . ; @ = ->
- += -= *= /= //= %=
+ += -= *= /= //= %= @=
&= |= ^= >>= <<= **=
The period can also occur in floating-point and imaginary literals. A sequence
@@ -729,4 +728,4 @@ occurrence outside string literals and comments is an unconditional error::
.. rubric:: Footnotes
-.. [#] http://www.unicode.org/Public/6.3.0/ucd/NameAliases.txt
+.. [#] http://www.unicode.org/Public/8.0.0/ucd/NameAliases.txt
diff --git a/Doc/reference/simple_stmts.rst b/Doc/reference/simple_stmts.rst
index 8946b4f354..7d71752936 100644
--- a/Doc/reference/simple_stmts.rst
+++ b/Doc/reference/simple_stmts.rst
@@ -85,7 +85,7 @@ attributes or items of mutable objects:
target_list: `target` ("," `target`)* [","]
target: `identifier`
: | "(" `target_list` ")"
- : | "[" `target_list` "]"
+ : | "[" [`target_list`] "]"
: | `attributeref`
: | `subscription`
: | `slicing`
@@ -115,21 +115,25 @@ given with the definition of the object types (see section :ref:`types`).
Assignment of an object to a target list, optionally enclosed in parentheses or
square brackets, is recursively defined as follows.
-* If the target list is a single target: The object is assigned to that target.
+* If the target list is empty: The object must also be an empty iterable.
-* If the target list is a comma-separated list of targets: The object must be an
- iterable with the same number of items as there are targets in the target list,
- and the items are assigned, from left to right, to the corresponding targets.
+* If the target list is a single target in parentheses: The object is assigned
+ to that target.
+
+* If the target list is a comma-separated list of targets, or a single target
+ in square brackets: The object must be an iterable with the same number of
+ items as there are targets in the target list, and the items are assigned,
+ from left to right, to the corresponding targets.
* If the target list contains one target prefixed with an asterisk, called a
- "starred" target: The object must be a sequence with at least as many items
+ "starred" target: The object must be an iterable with at least as many items
as there are targets in the target list, minus one. The first items of the
- sequence are assigned, from left to right, to the targets before the starred
- target. The final items of the sequence are assigned to the targets after
- the starred target. A list of the remaining items in the sequence is then
+ iterable are assigned, from left to right, to the targets before the starred
+ target. The final items of the iterable are assigned to the targets after
+ the starred target. A list of the remaining items in the iterable is then
assigned to the starred target (the list can be empty).
- * Else: The object must be a sequence with the same number of items as there
+ * Else: The object must be an iterable with the same number of items as there
are targets in the target list, and the items are assigned, from left to
right, to the corresponding targets.
@@ -150,11 +154,6 @@ Assignment of an object to a single target is recursively defined as follows.
count for the object previously bound to the name to reach zero, causing the
object to be deallocated and its destructor (if it has one) to be called.
-* If the target is a target list enclosed in parentheses or in square brackets:
- The object must be an iterable with the same number of items as there are
- targets in the target list, and its items are assigned, from left to right,
- to the corresponding targets.
-
.. index:: pair: attribute; assignment
* If the target is an attribute reference: The primary expression in the
@@ -237,7 +236,7 @@ Assignment of an object to a single target is recursively defined as follows.
phase, causing less detailed error messages.
Although the definition of assignment implies that overlaps between the
-left-hand side and the right-hand side are 'simultanenous' (for example ``a, b =
+left-hand side and the right-hand side are 'simultaneous' (for example ``a, b =
b, a`` swaps two variables), overlaps *within* the collection of assigned-to
variables occur left-to-right, sometimes resulting in confusion. For instance,
the following program prints ``[0, 2]``::
@@ -281,7 +280,7 @@ operation and an assignment statement:
.. productionlist::
augmented_assignment_stmt: `augtarget` `augop` (`expression_list` | `yield_expression`)
augtarget: `identifier` | `attributeref` | `subscription` | `slicing`
- augop: "+=" | "-=" | "*=" | "/=" | "//=" | "%=" | "**="
+ augop: "+=" | "-=" | "*=" | "@=" | "/=" | "//=" | "%=" | "**="
: | ">>=" | "<<=" | "&=" | "^=" | "|="
(See section :ref:`primaries` for the syntax definitions of the last three
@@ -331,12 +330,12 @@ program:
The simple form, ``assert expression``, is equivalent to ::
if __debug__:
- if not expression: raise AssertionError
+ if not expression: raise AssertionError
The extended form, ``assert expression1, expression2``, is equivalent to ::
if __debug__:
- if not expression1: raise AssertionError(expression2)
+ if not expression1: raise AssertionError(expression2)
.. index::
single: __debug__
@@ -661,7 +660,7 @@ steps:
When the statement contains multiple clauses (separated by
commas) the two steps are carried out separately for each clause, just
-as though the clauses had been separated out into individiual import
+as though the clauses had been separated out into individual import
statements.
The details of the first step, finding and loading modules are described in
diff --git a/Doc/tools/extensions/pyspecific.py b/Doc/tools/extensions/pyspecific.py
index 64a56655f7..63112830ba 100644
--- a/Doc/tools/extensions/pyspecific.py
+++ b/Doc/tools/extensions/pyspecific.py
@@ -34,7 +34,7 @@ import suspicious
ISSUE_URI = 'https://bugs.python.org/issue%s'
-SOURCE_URI = 'https://hg.python.org/cpython/file/3.4/%s'
+SOURCE_URI = 'https://hg.python.org/cpython/file/3.5/%s'
# monkey-patch reST parser to disable alphabetic and roman enumerated lists
from docutils.parsers.rst.states import Body
@@ -164,6 +164,19 @@ class PyCoroutineMethod(PyCoroutineMixin, PyClassmember):
return PyClassmember.run(self)
+class PyAbstractMethod(PyClassmember):
+
+ def handle_signature(self, sig, signode):
+ ret = super(PyAbstractMethod, self).handle_signature(sig, signode)
+ signode.insert(0, addnodes.desc_annotation('abstractmethod ',
+ 'abstractmethod '))
+ return ret
+
+ def run(self):
+ self.name = 'py:method'
+ return PyClassmember.run(self)
+
+
# Support for documenting version of removal in deprecations
class DeprecatedRemoved(Directive):
@@ -368,5 +381,6 @@ def setup(app):
app.add_directive_to_domain('py', 'decoratormethod', PyDecoratorMethod)
app.add_directive_to_domain('py', 'coroutinefunction', PyCoroutineFunction)
app.add_directive_to_domain('py', 'coroutinemethod', PyCoroutineMethod)
+ app.add_directive_to_domain('py', 'abstractmethod', PyAbstractMethod)
app.add_directive('miscnews', MiscNews)
return {'version': '1.0', 'parallel_read_safe': True}
diff --git a/Doc/tools/pydoctheme/static/pydoctheme.css b/Doc/tools/pydoctheme/static/pydoctheme.css
index 50835bb92c..e24043f02d 100644
--- a/Doc/tools/pydoctheme/static/pydoctheme.css
+++ b/Doc/tools/pydoctheme/static/pydoctheme.css
@@ -176,3 +176,8 @@ div.footer a:hover {
.stableabi {
color: #229;
}
+
+.highlight {
+ background: none !important;
+}
+
diff --git a/Doc/tools/rstlint.py b/Doc/tools/rstlint.py
index 7dccf72f99..de78041f77 100755
--- a/Doc/tools/rstlint.py
+++ b/Doc/tools/rstlint.py
@@ -43,7 +43,7 @@ directives = [
]
all_directives = '(' + '|'.join(directives) + ')'
-seems_directive_re = re.compile(r'\.\. %s([^a-z:]|:(?!:))' % all_directives)
+seems_directive_re = re.compile(r'(?<!\.)\.\. %s([^a-z:]|:(?!:))' % all_directives)
default_role_re = re.compile(r'(^| )`\w([^`]*?\w)?`($| )')
leaked_markup_re = re.compile(r'[a-z]::\s|`|\.\.\s*\w+:')
@@ -83,7 +83,7 @@ def check_suspicious_constructs(fn, lines):
"""Check for suspicious reST constructs."""
inprod = False
for lno, line in enumerate(lines):
- if seems_directive_re.match(line):
+ if seems_directive_re.search(line):
yield lno+1, 'comment seems to be intended as a directive'
if '.. productionlist::' in line:
inprod = True
diff --git a/Doc/tools/susp-ignored.csv b/Doc/tools/susp-ignored.csv
index 032531d3cb..dba93bf3a7 100644
--- a/Doc/tools/susp-ignored.csv
+++ b/Doc/tools/susp-ignored.csv
@@ -82,7 +82,7 @@ howto/pyporting,,::,Programming Language :: Python :: 2
howto/pyporting,,::,Programming Language :: Python :: 3
howto/regex,,::,
howto/regex,,:foo,(?:foo)
-howto/urllib2,,:example,"for example ""joe@password:example.com"""
+howto/urllib2,,:password,"for example ""joe:password@example.com"""
library/audioop,,:ipos,"# factor = audioop.findfactor(in_test[ipos*2:ipos*2+len(out_test)],"
library/bisect,32,:hi,all(val >= x for val in a[i:hi])
library/bisect,42,:hi,all(val > x for val in a[i:hi])
@@ -121,6 +121,8 @@ library/ipaddress,,:db8,>>> ipaddress.IPv6Address('2001:db8::1000')
library/ipaddress,,::,>>> ipaddress.IPv6Address('2001:db8::1000')
library/ipaddress,,:db8,IPv6Address('2001:db8::1000')
library/ipaddress,,::,IPv6Address('2001:db8::1000')
+library/ipaddress,,:db8,">>> ipaddress.ip_address(""2001:db8::1"").reverse_pointer"
+library/ipaddress,,::,">>> ipaddress.ip_address(""2001:db8::1"").reverse_pointer"
library/ipaddress,,::,"""::abc:7:def"""
library/ipaddress,,:def,"""::abc:7:def"""
library/ipaddress,,::,::FFFF/96
@@ -138,8 +140,6 @@ library/itertools,,:stop,elements from seq[start:stop:step]
library/logging.handlers,,:port,host:port
library/mmap,,:i2,obj[i1:i2]
library/multiprocessing,,`,# Add more tasks using `put()`
-library/multiprocessing,,`,">>> l._callmethod('__getitem__', (20,)) # equiv to `l[20]`"
-library/multiprocessing,,`,">>> l._callmethod('__getitem__', (slice(2, 7),)) # equiv to `l[2:7]`"
library/multiprocessing,,:queue,">>> QueueManager.register('get_queue', callable=lambda:queue)"
library/multiprocessing,,`,# register the Foo class; make `f()` and `g()` accessible via proxy
library/multiprocessing,,`,# register the Foo class; make `g()` and `_h()` accessible via proxy
@@ -176,8 +176,6 @@ library/ssl,,:MyState,State or Province Name (full name) [Some-State]:MyState
library/ssl,,:ops,Email Address []:ops@myserver.mygroup.myorganization.com
library/ssl,,:Some,"Locality Name (eg, city) []:Some City"
library/ssl,,:US,Country Name (2 letter code) [AU]:US
-library/stdtypes,,::,>>> a[::-1].tolist()
-library/stdtypes,,::,>>> a[::2].tolist()
library/stdtypes,,:end,s[start:end]
library/stdtypes,,::,>>> hash(v[::-2]) == hash(b'abcefg'[::-2])
library/stdtypes,,:len,s[len(s):len(s)]
@@ -200,6 +198,7 @@ library/unittest,,:first,"self.assertEqual(cm.output, ['INFO:foo:first message',
library/unittest,,:foo,'ERROR:foo.bar:second message'])
library/unittest,,:second,'ERROR:foo.bar:second message'])
library/urllib.request,,:close,Connection:close
+library/urllib.request,,:port,:port
library/urllib.request,,:lang,"xmlns=""http://www.w3.org/1999/xhtml"" xml:lang=""en"" lang=""en"">\n\n<head>\n"
library/urllib.request,,:password,"""joe:password@python.org"""
library/uuid,,:uuid,urn:uuid:12345678-1234-5678-1234-567812345678
@@ -207,16 +206,6 @@ library/venv,,:param,":param nodist: If True, setuptools and pip are not install
library/venv,,:param,":param progress: If setuptools or pip are installed, the progress of the"
library/venv,,:param,":param nopip: If True, pip is not installed into the created"
library/venv,,:param,:param context: The information for the environment creation request
-library/xml.etree.elementtree,,:sometag,prefix:sometag
-library/xml.etree.elementtree,,:fictional,"<actors xmlns:fictional=""http://characters.example.com"""
-library/xml.etree.elementtree,,:character,<fictional:character>Lancelot</fictional:character>
-library/xml.etree.elementtree,,:character,<fictional:character>Archie Leach</fictional:character>
-library/xml.etree.elementtree,,:character,<fictional:character>Sir Robin</fictional:character>
-library/xml.etree.elementtree,,:character,<fictional:character>Gunther</fictional:character>
-library/xml.etree.elementtree,,:character,<fictional:character>Commander Clement</fictional:character>
-library/xml.etree.elementtree,,:actor,"for actor in root.findall('real_person:actor', ns):"
-library/xml.etree.elementtree,,:name,"name = actor.find('real_person:name', ns)"
-library/xml.etree.elementtree,,:character,"for char in actor.findall('role:character', ns):"
library/xmlrpc.client,,:pass,http://user:pass@host:port/path
library/xmlrpc.client,,:pass,user:pass
library/xmlrpc.client,,:port,http://user:pass@host:port/path
@@ -243,14 +232,13 @@ tutorial/stdlib2,,:start,extra = data[start:start+extra_size]
tutorial/stdlib2,,:start,"fields = struct.unpack('<IIIHH', data[start:start+16])"
tutorial/stdlib2,,:start,filename = data[start:start+filenamesize]
tutorial/stdlib2,,:Warning,WARNING:root:Warning:config file server.conf not found
-tutorial/venv,,:c7b9645a6f35,"Python 3.4.3+ (3.4:c7b9645a6f35+, May 22 2015, 09:31:25)"
using/cmdline,,:category,action:message:category:module:line
using/cmdline,,:errorhandler,:errorhandler
using/cmdline,,:line,action:message:category:module:line
using/cmdline,,:line,file:line: category: message
using/cmdline,,:message,action:message:category:module:line
using/cmdline,,:module,action:message:category:module:line
-using/unix,,:Packaging,http://en.opensuse.org/Portal:Packaging
+using/unix,,:Packaging,https://en.opensuse.org/Portal:Packaging
whatsnew/2.0,418,:len,
whatsnew/2.3,,::,
whatsnew/2.3,,:config,
@@ -264,6 +252,11 @@ whatsnew/2.4,,:System,
whatsnew/2.5,,:memory,:memory:
whatsnew/2.5,,:step,[start:stop:step]
whatsnew/2.5,,:stop,[start:stop:step]
+whatsnew/2.7,,::,"ParseResult(scheme='http', netloc='[1080::8:800:200C:417A]',"
+whatsnew/2.7,,::,>>> urlparse.urlparse('http://[1080::8:800:200C:417A]/foo')
+whatsnew/2.7,,:Sunday,'2009:4:Sunday'
+whatsnew/2.7,,:Cookie,"export PYTHONWARNINGS=all,error:::Cookie:0"
+whatsnew/2.7,,::,"export PYTHONWARNINGS=all,error:::Cookie:0"
whatsnew/3.2,,:affe,"netloc='[dead:beef:cafe:5417:affe:8FA3:deaf:feed]',"
whatsnew/3.2,,:affe,>>> urllib.parse.urlparse('http://[dead:beef:cafe:5417:affe:8FA3:deaf:feed]/foo/')
whatsnew/3.2,,:beef,"netloc='[dead:beef:cafe:5417:affe:8FA3:deaf:feed]',"
@@ -279,14 +272,27 @@ whatsnew/3.2,,:feed,>>> urllib.parse.urlparse('http://[dead:beef:cafe:5417:affe:
whatsnew/3.2,,:gz,">>> with tarfile.open(name='myarchive.tar.gz', mode='w:gz') as tf:"
whatsnew/3.2,,:location,zope9-location = ${zope9:location}
whatsnew/3.2,,:prefix,zope-conf = ${custom:prefix}/etc/zope.conf
-whatsnew/changelog,,:platform,:platform:
whatsnew/changelog,,:gz,": TarFile opened with external fileobj and ""w:gz"" mode didn't"
-whatsnew/changelog,,:PythonCmd,"With Tk < 8.5 _tkinter.c:PythonCmd() raised UnicodeDecodeError, caused"
-whatsnew/changelog,,::,": Fix FTP tests for IPv6, bind to ""::1"" instead of ""localhost""."
whatsnew/changelog,,::,": Use ""127.0.0.1"" or ""::1"" instead of ""localhost"" as much as"
-whatsnew/changelog,,:password,user:password
-whatsnew/2.7,780,:Sunday,'2009:4:Sunday'
-whatsnew/2.7,907,::,"export PYTHONWARNINGS=all,error:::Cookie:0"
-whatsnew/2.7,907,:Cookie,"export PYTHONWARNINGS=all,error:::Cookie:0"
-whatsnew/2.7,1657,::,>>> urlparse.urlparse('http://[1080::8:800:200C:417A]/foo')
-whatsnew/2.7,1657,::,"ParseResult(scheme='http', netloc='[1080::8:800:200C:417A]',"
+library/tarfile,149,:xz,'x:xz'
+library/xml.etree.elementtree,290,:sometag,prefix:sometag
+library/xml.etree.elementtree,301,:fictional,"<actors xmlns:fictional=""http://characters.example.com"""
+library/xml.etree.elementtree,301,:character,<fictional:character>Lancelot</fictional:character>
+library/xml.etree.elementtree,301,:character,<fictional:character>Archie Leach</fictional:character>
+library/xml.etree.elementtree,301,:character,<fictional:character>Sir Robin</fictional:character>
+library/xml.etree.elementtree,301,:character,<fictional:character>Gunther</fictional:character>
+library/xml.etree.elementtree,301,:character,<fictional:character>Commander Clement</fictional:character>
+library/xml.etree.elementtree,,:actor,"for actor in root.findall('real_person:actor', ns):"
+library/xml.etree.elementtree,,:name,"name = actor.find('real_person:name', ns)"
+library/xml.etree.elementtree,,:character,"for char in actor.findall('role:character', ns):"
+library/zipapp,31,:main,"$ python -m zipapp myapp -m ""myapp:main"""
+library/zipapp,82,:fn,"argument should have the form ""pkg.mod:fn"", where ""pkg.mod"" is a"
+library/zipapp,155,:callable,"""pkg.module:callable"" and the archive will be run by importing"
+library/stdtypes,,::,>>> m[::2].tolist()
+library/sys,,`,# ``wrapper`` creates a ``wrap(coro)`` coroutine:
+tutorial/venv,77,:c7b9645a6f35,"Python 3.4.3+ (3.4:c7b9645a6f35+, May 22 2015, 09:31:25)"
+whatsnew/3.5,,:root,'WARNING:root:warning\n'
+whatsnew/3.5,,:warning,'WARNING:root:warning\n'
+whatsnew/3.5,,::,>>> addr6 = ipaddress.IPv6Address('::1')
+whatsnew/3.5,,:root,ERROR:root:exception
+whatsnew/3.5,,:exception,ERROR:root:exception
diff --git a/Doc/tools/templates/indexcontent.html b/Doc/tools/templates/indexcontent.html
index 969099a006..1076c1f51b 100644
--- a/Doc/tools/templates/indexcontent.html
+++ b/Doc/tools/templates/indexcontent.html
@@ -1,59 +1,59 @@
{% extends "defindex.html" %}
{% block tables %}
- <p><strong>Parts of the documentation:</strong></p>
+ <p><strong>{% trans %}Parts of the documentation:{% endtrans %}</strong></p>
<table class="contentstable" align="center"><tr>
<td width="50%">
- <p class="biglink"><a class="biglink" href="{{ pathto("whatsnew/" + version) }}">What's new in Python {{ version }}?</a><br/>
- <span class="linkdescr">or <a href="{{ pathto("whatsnew/index") }}">all "What's new" documents</a> since 2.0</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("tutorial/index") }}">Tutorial</a><br/>
- <span class="linkdescr">start here</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("library/index") }}">Library Reference</a><br/>
- <span class="linkdescr">keep this under your pillow</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("reference/index") }}">Language Reference</a><br/>
- <span class="linkdescr">describes syntax and language elements</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("using/index") }}">Python Setup and Usage</a><br/>
- <span class="linkdescr">how to use Python on different platforms</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("howto/index") }}">Python HOWTOs</a><br/>
- <span class="linkdescr">in-depth documents on specific topics</span></p>
+ <p class="biglink"><a class="biglink" href="{{ pathto("whatsnew/" + version) }}">{% trans %}What's new in Python {{ version }}?{% endtrans %}</a><br/>
+ <span class="linkdescr"> {% trans whatsnew_index=pathto("whatsnew/index") %}or <a href="{{ whatsnew_index }}">all "What's new" documents</a> since 2.0{% endtrans %}</span></p>
+ <p class="biglink"><a class="biglink" href="{{ pathto("tutorial/index") }}">{% trans %}Tutorial{% endtrans %}</a><br/>
+ <span class="linkdescr">{% trans %}start here{% endtrans %}</span></p>
+ <p class="biglink"><a class="biglink" href="{{ pathto("library/index") }}">{% trans %}Library Reference{% endtrans %}</a><br/>
+ <span class="linkdescr">{% trans %}keep this under your pillow{% endtrans %}</span></p>
+ <p class="biglink"><a class="biglink" href="{{ pathto("reference/index") }}">{% trans %}Language Reference{% endtrans %}</a><br/>
+ <span class="linkdescr">{% trans %}describes syntax and language elements{% endtrans %}</span></p>
+ <p class="biglink"><a class="biglink" href="{{ pathto("using/index") }}">{% trans %}Python Setup and Usage{% endtrans %}</a><br/>
+ <span class="linkdescr">{% trans %}how to use Python on different platforms{% endtrans %}</span></p>
+ <p class="biglink"><a class="biglink" href="{{ pathto("howto/index") }}">{% trans %}Python HOWTOs{% endtrans %}</a><br/>
+ <span class="linkdescr">{% trans %}in-depth documents on specific topics{% endtrans %}</span></p>
</td><td width="50%">
- <p class="biglink"><a class="biglink" href="{{ pathto("installing/index") }}">Installing Python Modules</a><br/>
- <span class="linkdescr">installing from the Python Package Index &amp; other sources</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("distributing/index") }}">Distributing Python Modules</a><br/>
- <span class="linkdescr">publishing modules for installation by others</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("extending/index") }}">Extending and Embedding</a><br/>
- <span class="linkdescr">tutorial for C/C++ programmers</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("c-api/index") }}">Python/C API</a><br/>
- <span class="linkdescr">reference for C/C++ programmers</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("faq/index") }}">FAQs</a><br/>
- <span class="linkdescr">frequently asked questions (with answers!)</span></p>
+ <p class="biglink"><a class="biglink" href="{{ pathto("installing/index") }}">{% trans %}Installing Python Modules{% endtrans %}</a><br/>
+ <span class="linkdescr">{% trans %}installing from the Python Package Index &amp; other sources{% endtrans %}</span></p>
+ <p class="biglink"><a class="biglink" href="{{ pathto("distributing/index") }}">{% trans %}Distributing Python Modules{% endtrans %}</a><br/>
+ <span class="linkdescr">{% trans %}publishing modules for installation by others{% endtrans %}</span></p>
+ <p class="biglink"><a class="biglink" href="{{ pathto("extending/index") }}">{% trans %}Extending and Embedding{% endtrans %}</a><br/>
+ <span class="linkdescr">{% trans %}tutorial for C/C++ programmers{% endtrans %}</span></p>
+ <p class="biglink"><a class="biglink" href="{{ pathto("c-api/index") }}">{% trans %}Python/C API{% endtrans %}</a><br/>
+ <span class="linkdescr">{% trans %}reference for C/C++ programmers{% endtrans %}</span></p>
+ <p class="biglink"><a class="biglink" href="{{ pathto("faq/index") }}">{% trans %}FAQs{% endtrans %}</a><br/>
+ <span class="linkdescr">{% trans %}frequently asked questions (with answers!){% endtrans %}</span></p>
</td></tr>
</table>
- <p><strong>Indices and tables:</strong></p>
+ <p><strong>{% trans %}Indices and tables:{% endtrans %}</strong></p>
<table class="contentstable" align="center"><tr>
<td width="50%">
- <p class="biglink"><a class="biglink" href="{{ pathto("py-modindex") }}">Global Module Index</a><br/>
- <span class="linkdescr">quick access to all modules</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("genindex") }}">General Index</a><br/>
- <span class="linkdescr">all functions, classes, terms</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("glossary") }}">Glossary</a><br/>
- <span class="linkdescr">the most important terms explained</span></p>
+ <p class="biglink"><a class="biglink" href="{{ pathto("py-modindex") }}">{% trans %}Global Module Index{% endtrans %}</a><br/>
+ <span class="linkdescr">{% trans %}quick access to all modules{% endtrans %}</span></p>
+ <p class="biglink"><a class="biglink" href="{{ pathto("genindex") }}">{% trans %}General Index{% endtrans %}</a><br/>
+ <span class="linkdescr">{% trans %}all functions, classes, terms{% endtrans %}</span></p>
+ <p class="biglink"><a class="biglink" href="{{ pathto("glossary") }}">{% trans %}Glossary{% endtrans %}</a><br/>
+ <span class="linkdescr">{% trans %}the most important terms explained{% endtrans %}</span></p>
</td><td width="50%">
- <p class="biglink"><a class="biglink" href="{{ pathto("search") }}">Search page</a><br/>
- <span class="linkdescr">search this documentation</span></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("contents") }}">Complete Table of Contents</a><br/>
- <span class="linkdescr">lists all sections and subsections</span></p>
+ <p class="biglink"><a class="biglink" href="{{ pathto("search") }}">{% trans %}Search page{% endtrans %}</a><br/>
+ <span class="linkdescr">{% trans %}search this documentation{% endtrans %}</span></p>
+ <p class="biglink"><a class="biglink" href="{{ pathto("contents") }}">{% trans %}Complete Table of Contents{% endtrans %}</a><br/>
+ <span class="linkdescr">{% trans %}lists all sections and subsections{% endtrans %}</span></p>
</td></tr>
</table>
- <p><strong>Meta information:</strong></p>
+ <p><strong>{% trans %}Meta information:{% endtrans %}</strong></p>
<table class="contentstable" align="center"><tr>
<td width="50%">
- <p class="biglink"><a class="biglink" href="{{ pathto("bugs") }}">Reporting bugs</a></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("about") }}">About the documentation</a></p>
+ <p class="biglink"><a class="biglink" href="{{ pathto("bugs") }}">{% trans %}Reporting bugs{% endtrans %}</a></p>
+ <p class="biglink"><a class="biglink" href="{{ pathto("about") }}">{% trans %}About the documentation{% endtrans %}</a></p>
</td><td width="50%">
- <p class="biglink"><a class="biglink" href="{{ pathto("license") }}">History and License of Python</a></p>
- <p class="biglink"><a class="biglink" href="{{ pathto("copyright") }}">Copyright</a></p>
+ <p class="biglink"><a class="biglink" href="{{ pathto("license") }}">{% trans %}History and License of Python{% endtrans %}</a></p>
+ <p class="biglink"><a class="biglink" href="{{ pathto("copyright") }}">{% trans %}Copyright{% endtrans %}</a></p>
</td></tr>
</table>
{% endblock %}
diff --git a/Doc/tools/templates/indexsidebar.html b/Doc/tools/templates/indexsidebar.html
index abdf070772..bb449ef1cd 100644
--- a/Doc/tools/templates/indexsidebar.html
+++ b/Doc/tools/templates/indexsidebar.html
@@ -1,18 +1,17 @@
-<h3>Download</h3>
-<p><a href="{{ pathto('download') }}">Download these documents</a></p>
-<h3>Docs for other versions</h3>
+<h3>{% trans %}Download{% endtrans %}</h3>
+<p><a href="{{ pathto('download') }}">{% trans %}Download these documents{% endtrans %}</a></p>
+<h3>{% trans %}Docs for other versions{% endtrans %}</h3>
<ul>
- <li><a href="https://docs.python.org/2.7/">Python 2.7 (stable)</a></li>
- <li><a href="https://docs.python.org/3.3/">Python 3.3 (stable)</a></li>
- <li><a href="https://docs.python.org/3.5/">Python 3.5 (in development)</a></li>
- <li><a href="https://www.python.org/doc/versions/">Old versions</a></li>
+ <li><a href="https://docs.python.org/2.7/">{% trans %}Python 2.7 (stable){% endtrans %}</a></li>
+ <li><a href="https://docs.python.org/3.4/">{% trans %}Python 3.4 (stable){% endtrans %}</a></li>
+ <li><a href="https://www.python.org/doc/versions/">{% trans %}Old versions{% endtrans %}</a></li>
</ul>
-<h3>Other resources</h3>
+<h3>{% trans %}Other resources{% endtrans %}</h3>
<ul>
{# XXX: many of these should probably be merged in the main docs #}
- <li><a href="https://www.python.org/dev/peps/">PEP Index</a></li>
- <li><a href="https://wiki.python.org/moin/BeginnersGuide">Beginner's Guide</a></li>
- <li><a href="https://wiki.python.org/moin/PythonBooks">Book List</a></li>
- <li><a href="https://www.python.org/doc/av/">Audio/Visual Talks</a></li>
+ <li><a href="https://www.python.org/dev/peps/">{% trans %}PEP Index{% endtrans %}</a></li>
+ <li><a href="https://wiki.python.org/moin/BeginnersGuide">{% trans %}Beginner's Guide{% endtrans %}</a></li>
+ <li><a href="https://wiki.python.org/moin/PythonBooks">{% trans %}Book List{% endtrans %}</a></li>
+ <li><a href="https://www.python.org/doc/av/">{% trans %}Audio/Visual Talks{% endtrans %}</a></li>
</ul>
diff --git a/Doc/tools/templates/layout.html b/Doc/tools/templates/layout.html
index 8ae6e23f80..1887b85b60 100644
--- a/Doc/tools/templates/layout.html
+++ b/Doc/tools/templates/layout.html
@@ -6,7 +6,7 @@
<li>
{%- if versionswitcher is defined %}
<span class="version_switcher_placeholder">{{ release }}</span>
- <a href="{{ pathto('index') }}">Documentation</a>{{ reldelim1 }}
+ <a href="{{ pathto('index') }}">{% trans %}Documentation {% endtrans %}</a>{{ reldelim1 }}
{%- else %}
<a href="{{ pathto('index') }}">{{ shorttitle }}</a>{{ reldelim1 }}
{%- endif %}
@@ -79,24 +79,24 @@
{% endblock %}
{% block footer %}
<div class="footer">
- &copy; <a href="{{ pathto('copyright') }}">Copyright</a> {{ copyright|e }}.
+ &copy; <a href="{{ pathto('copyright') }}">{% trans %}Copyright{% endtrans %}</a> {{ copyright|e }}.
<br />
- The Python Software Foundation is a non-profit corporation.
- <a href="https://www.python.org/psf/donations/">Please donate.</a>
+ {% trans %}The Python Software Foundation is a non-profit corporation.{% endtrans %}
+ <a href="https://www.python.org/psf/donations/">{% trans %}Please donate.{% endtrans %}</a>
<br />
- Last updated on {{ last_updated|e }}.
- <a href="{{ pathto('bugs') }}">Found a bug</a>?
+ {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
+ {% trans pathto_bugs=pathto('bugs') %}<a href="{{ pathto_bugs }}">Found a bug</a>?{% endtrans %}
<br />
- Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version|e }}.
+ {% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
</div>
{% endblock %}
{% block sidebarsourcelink %}
{%- if show_source and has_source and sourcename %}
<h3>{{ _('This Page') }}</h3>
<ul class="this-page-menu">
- <li><a href="{{ pathto('bugs') }}">Report a Bug</a></li>
+ <li><a href="{{ pathto('bugs') }}">{% trans %}Report a Bug{% endtrans %}</a></li>
<li><a href="{{ pathto('_sources/' + sourcename, true)|e }}"
- rel="nofollow">Show Source</a></li>
+ rel="nofollow">{% trans %}Show Source{% endtrans %}</a></li>
</ul>
{%- endif %}
{% endblock %}
diff --git a/Doc/tutorial/appendix.rst b/Doc/tutorial/appendix.rst
index ce50c1e8c3..ffd16aa97a 100644
--- a/Doc/tutorial/appendix.rst
+++ b/Doc/tutorial/appendix.rst
@@ -40,7 +40,7 @@ Executable Python Scripts
On BSD'ish Unix systems, Python scripts can be made directly executable, like
shell scripts, by putting the line ::
- #!/usr/bin/env python3.4
+ #!/usr/bin/env python3.5
(assuming that the interpreter is on the user's :envvar:`PATH`) at the beginning
of the script and giving the file an executable mode. The ``#!`` must be the
@@ -92,7 +92,7 @@ in the script::
filename = os.environ.get('PYTHONSTARTUP')
if filename and os.path.isfile(filename):
with open(filename) as fobj:
- startup_file = fobj.read()
+ startup_file = fobj.read()
exec(startup_file)
@@ -107,7 +107,7 @@ of your user site-packages directory. Start Python and run this code::
>>> import site
>>> site.getusersitepackages()
- '/home/user/.local/lib/python3.4/site-packages'
+ '/home/user/.local/lib/python3.5/site-packages'
Now you can create a file named :file:`usercustomize.py` in that directory and
put anything you want in it. It will affect every invocation of Python, unless
diff --git a/Doc/tutorial/classes.rst b/Doc/tutorial/classes.rst
index 7e014eff38..2489d75b16 100644
--- a/Doc/tutorial/classes.rst
+++ b/Doc/tutorial/classes.rst
@@ -120,7 +120,7 @@ are directly accessible:
If a name is declared global, then all references and assignments go directly to
the middle scope containing the module's global names. To rebind variables
found outside of the innermost scope, the :keyword:`nonlocal` statement can be
-used; if not declared nonlocal, those variable are read-only (an attempt to
+used; if not declared nonlocal, those variables are read-only (an attempt to
write to such a variable will simply create a *new* local variable in the
innermost scope, leaving the identically named outer variable unchanged).
@@ -162,12 +162,15 @@ binding::
def scope_test():
def do_local():
spam = "local spam"
+
def do_nonlocal():
nonlocal spam
spam = "nonlocal spam"
+
def do_global():
global spam
spam = "global spam"
+
spam = "test spam"
do_local()
print("After local assignment:", spam)
@@ -260,6 +263,7 @@ definition looked like this::
class MyClass:
"""A simple example class"""
i = 12345
+
def f(self):
return 'hello world'
@@ -508,8 +512,10 @@ variable in the class is also ok. For example::
class C:
f = f1
+
def g(self):
return 'hello world'
+
h = g
Now ``f``, ``g`` and ``h`` are all attributes of class :class:`C` that refer to
@@ -523,8 +529,10 @@ argument::
class Bag:
def __init__(self):
self.data = []
+
def add(self, x):
self.data.append(x)
+
def addtwice(self, x):
self.add(x)
self.add(x)
@@ -713,7 +721,7 @@ will do nicely::
class Employee:
pass
- john = Employee() # Create an empty employee record
+ john = Employee() # Create an empty employee record
# Fill the fields of the record
john.name = 'John Doe'
@@ -839,8 +847,10 @@ defines :meth:`__next__`, then :meth:`__iter__` can just return ``self``::
def __init__(self, data):
self.data = data
self.index = len(data)
+
def __iter__(self):
return self
+
def __next__(self):
if self.index == 0:
raise StopIteration
diff --git a/Doc/tutorial/controlflow.rst b/Doc/tutorial/controlflow.rst
index 813c8285f8..ddc08552ed 100644
--- a/Doc/tutorial/controlflow.rst
+++ b/Doc/tutorial/controlflow.rst
@@ -312,7 +312,7 @@ You can see it if you really want to using :func:`print`::
It is simple to write a function that returns a list of the numbers of the
Fibonacci series, instead of printing it::
- >>> def fib2(n): # return Fibonacci series up to n
+ >>> def fib2(n): # return Fibonacci series up to n
... """Return a list containing the Fibonacci series up to n."""
... result = []
... a, b = 0, 1
@@ -361,7 +361,7 @@ The most useful form is to specify a default value for one or more arguments.
This creates a function that can be called with fewer arguments than it is
defined to allow. For example::
- def ask_ok(prompt, retries=4, complaint='Yes or no, please!'):
+ def ask_ok(prompt, retries=4, reminder='Please try again!'):
while True:
ok = input(prompt)
if ok in ('y', 'ye', 'yes'):
@@ -370,8 +370,8 @@ defined to allow. For example::
return False
retries = retries - 1
if retries < 0:
- raise OSError('uncooperative user')
- print(complaint)
+ raise ValueError('invalid user response')
+ print(reminder)
This function can be called in several ways:
@@ -540,7 +540,7 @@ parameter are 'keyword-only' arguments, meaning that they can only be used as
keywords rather than positional arguments. ::
>>> def concat(*args, sep="/"):
- ... return sep.join(args)
+ ... return sep.join(args)
...
>>> concat("earth", "mars", "venus")
'earth/mars/venus'
diff --git a/Doc/tutorial/datastructures.rst b/Doc/tutorial/datastructures.rst
index 1ea299fbed..b39bdf4dfb 100644
--- a/Doc/tutorial/datastructures.rst
+++ b/Doc/tutorial/datastructures.rst
@@ -73,10 +73,11 @@ objects:
Return the number of times *x* appears in the list.
-.. method:: list.sort()
+.. method:: list.sort(key=None, reverse=False)
:noindex:
- Sort the items of the list in place.
+ Sort the items of the list in place (the arguments can be used for sort
+ customization, see :func:`sorted` for their explanation).
.. method:: list.reverse()
@@ -396,7 +397,7 @@ objects, such as lists.
Though tuples may seem similar to lists, they are often used in different
situations and for different purposes.
-Tuples are :term:`immutable`, and usually contain an heterogeneous sequence of
+Tuples are :term:`immutable`, and usually contain a heterogeneous sequence of
elements that are accessed via unpacking (see later in this section) or indexing
(or even by attribute in the case of :func:`namedtuples <collections.namedtuple>`).
Lists are :term:`mutable`, and their elements are usually homogeneous and are
@@ -611,18 +612,18 @@ returns a new sorted list while leaving the source unaltered. ::
orange
pear
-To change a sequence you are iterating over while inside the loop (for
-example to duplicate certain items), it is recommended that you first make
-a copy. Looping over a sequence does not implicitly make a copy. The slice
-notation makes this especially convenient::
+It is sometimes tempting to change a list while you are looping over it;
+however, it is often simpler and safer to create a new list instead. ::
- >>> words = ['cat', 'window', 'defenestrate']
- >>> for w in words[:]: # Loop over a slice copy of the entire list.
- ... if len(w) > 6:
- ... words.insert(0, w)
+ >>> import math
+ >>> raw_data = [56.2, float('NaN'), 51.7, 55.3, 52.5, float('NaN'), 47.8]
+ >>> filtered_data = []
+ >>> for value in raw_data:
+ ... if not math.isnan(value):
+ ... filtered_data.append(value)
...
- >>> words
- ['defenestrate', 'cat', 'window', 'defenestrate']
+ >>> filtered_data
+ [56.2, 51.7, 55.3, 52.5, 47.8]
.. _tut-conditions:
diff --git a/Doc/tutorial/errors.rst b/Doc/tutorial/errors.rst
index 351ee52b4e..4195c7e892 100644
--- a/Doc/tutorial/errors.rst
+++ b/Doc/tutorial/errors.rst
@@ -170,15 +170,15 @@ reference ``.args``. One may also instantiate an exception first before
raising it and add any attributes to it as desired. ::
>>> try:
- ... raise Exception('spam', 'eggs')
+ ... raise Exception('spam', 'eggs')
... except Exception as inst:
- ... print(type(inst)) # the exception instance
- ... print(inst.args) # arguments stored in .args
- ... print(inst) # __str__ allows args to be printed directly,
- ... # but may be overridden in exception subclasses
- ... x, y = inst.args # unpack args
- ... print('x =', x)
- ... print('y =', y)
+ ... print(type(inst)) # the exception instance
+ ... print(inst.args) # arguments stored in .args
+ ... print(inst) # __str__ allows args to be printed directly,
+ ... # but may be overridden in exception subclasses
+ ... x, y = inst.args # unpack args
+ ... print('x =', x)
+ ... print('y =', y)
...
<class 'Exception'>
('spam', 'eggs')
diff --git a/Doc/tutorial/floatingpoint.rst b/Doc/tutorial/floatingpoint.rst
index 9c3c1435c3..d440e53518 100644
--- a/Doc/tutorial/floatingpoint.rst
+++ b/Doc/tutorial/floatingpoint.rst
@@ -155,7 +155,7 @@ which implements arithmetic based on rational numbers (so the numbers like
If you are a heavy user of floating point operations you should take a look
at the Numerical Python package and many other packages for mathematical and
-statistical operations supplied by the SciPy project. See <http://scipy.org>.
+statistical operations supplied by the SciPy project. See <https://scipy.org>.
Python provides tools that may help on those rare occasions when you really
*do* want to know the exact value of a float. The
diff --git a/Doc/tutorial/inputoutput.rst b/Doc/tutorial/inputoutput.rst
index c157f22e6c..dd9c7cd731 100644
--- a/Doc/tutorial/inputoutput.rst
+++ b/Doc/tutorial/inputoutput.rst
@@ -152,11 +152,11 @@ Positional and keyword arguments can be arbitrarily combined::
``'!a'`` (apply :func:`ascii`), ``'!s'`` (apply :func:`str`) and ``'!r'``
(apply :func:`repr`) can be used to convert the value before it is formatted::
- >>> import math
- >>> print('The value of PI is approximately {}.'.format(math.pi))
- The value of PI is approximately 3.14159265359.
- >>> print('The value of PI is approximately {!r}.'.format(math.pi))
- The value of PI is approximately 3.141592653589793.
+ >>> contents = 'eels'
+ >>> print('My hovercraft is full of {}.'.format(contents))
+ My hovercraft is full of eels.
+ >>> print('My hovercraft is full of {!r}.'.format(contents))
+ My hovercraft is full of 'eels'.
An optional ``':'`` and format specifier can follow the field name. This allows
greater control over how the value is formatted. The following example
@@ -271,10 +271,11 @@ The rest of the examples in this section will assume that a file object called
``f`` has already been created.
To read a file's contents, call ``f.read(size)``, which reads some quantity of
-data and returns it as a string or bytes object. *size* is an optional numeric
-argument. When *size* is omitted or negative, the entire contents of the file
-will be read and returned; it's your problem if the file is twice as large as
-your machine's memory. Otherwise, at most *size* bytes are read and returned.
+data and returns it as a string (in text mode) or bytes object (in binary mode).
+*size* is an optional numeric argument. When *size* is omitted or negative, the
+entire contents of the file will be read and returned; it's your problem if the
+file is twice as large as your machine's memory. Otherwise, at most *size* bytes
+are read and returned.
If the end of the file has been reached, ``f.read()`` will return an empty
string (``''``). ::
@@ -315,11 +316,11 @@ the number of characters written. ::
>>> f.write('This is a test\n')
15
-To write something other than a string, it needs to be converted to a string
-first::
+Other types of objects need to be converted -- either to a string (in text mode)
+or a bytes object (in binary mode) -- before writing them::
>>> value = ('the answer', 42)
- >>> s = str(value)
+ >>> s = str(value) # convert the tuple to string
>>> f.write(s)
18
@@ -337,11 +338,11 @@ beginning of the file as the reference point. ::
>>> f = open('workfile', 'rb+')
>>> f.write(b'0123456789abcdef')
16
- >>> f.seek(5) # Go to the 6th byte in the file
+ >>> f.seek(5) # Go to the 6th byte in the file
5
>>> f.read(1)
b'5'
- >>> f.seek(-3, 2) # Go to the 3rd byte before the end
+ >>> f.seek(-3, 2) # Go to the 3rd byte before the end
13
>>> f.read(1)
b'd'
diff --git a/Doc/tutorial/interactive.rst b/Doc/tutorial/interactive.rst
index abf30f020d..d73cfeb34f 100644
--- a/Doc/tutorial/interactive.rst
+++ b/Doc/tutorial/interactive.rst
@@ -49,6 +49,6 @@ into other applications. Another similar enhanced interactive environment is
bpython_.
-.. _GNU Readline: http://tiswww.case.edu/php/chet/readline/rltop.html
-.. _IPython: http://ipython.scipy.org/
+.. _GNU Readline: https://tiswww.case.edu/php/chet/readline/rltop.html
+.. _IPython: https://ipython.org/
.. _bpython: http://www.bpython-interpreter.org/
diff --git a/Doc/tutorial/interpreter.rst b/Doc/tutorial/interpreter.rst
index dd6b1a9f38..e966085f93 100644
--- a/Doc/tutorial/interpreter.rst
+++ b/Doc/tutorial/interpreter.rst
@@ -10,13 +10,13 @@ Using the Python Interpreter
Invoking the Interpreter
========================
-The Python interpreter is usually installed as :file:`/usr/local/bin/python3.4`
+The Python interpreter is usually installed as :file:`/usr/local/bin/python3.5`
on those machines where it is available; putting :file:`/usr/local/bin` in your
Unix shell's search path makes it possible to start it by typing the command:
.. code-block:: text
- python3.4
+ python3.5
to the shell. [#]_ Since the choice of the directory where the interpreter lives
is an installation option, other places are possible; check with your local
@@ -24,11 +24,11 @@ Python guru or system administrator. (E.g., :file:`/usr/local/python` is a
popular alternative location.)
On Windows machines, the Python installation is usually placed in
-:file:`C:\\Python34`, though you can change this when you're running the
+:file:`C:\\Python35`, though you can change this when you're running the
installer. To add this directory to your path, you can type the following
command into the command prompt in a DOS box::
- set path=%path%;C:\python34
+ set path=%path%;C:\python35
Typing an end-of-file character (:kbd:`Control-D` on Unix, :kbd:`Control-Z` on
Windows) at the primary prompt causes the interpreter to exit with a zero exit
@@ -96,8 +96,8 @@ with the *secondary prompt*, by default three dots (``...``). The interpreter
prints a welcome message stating its version number and a copyright notice
before printing the first prompt::
- $ python3.4
- Python 3.4 (default, Mar 16 2014, 09:25:04)
+ $ python3.5
+ Python 3.5 (default, Sep 16 2015, 09:25:04)
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
diff --git a/Doc/tutorial/introduction.rst b/Doc/tutorial/introduction.rst
index c5c1343843..214032917b 100644
--- a/Doc/tutorial/introduction.rst
+++ b/Doc/tutorial/introduction.rst
@@ -232,7 +232,7 @@ If you want to concatenate variables or a variable and a literal, use ``+``::
This feature is particularly useful when you want to break long strings::
>>> text = ('Put several strings within parentheses '
- 'to have them joined together.')
+ ... 'to have them joined together.')
>>> text
'Put several strings within parentheses to have them joined together.'
@@ -276,11 +276,11 @@ makes sure that ``s[:i] + s[i:]`` is always equal to ``s``::
Slice indices have useful defaults; an omitted first index defaults to zero, an
omitted second index defaults to the size of the string being sliced. ::
- >>> word[:2] # character from the beginning to position 2 (excluded)
+ >>> word[:2] # character from the beginning to position 2 (excluded)
'Py'
- >>> word[4:] # characters from position 4 (included) to the end
+ >>> word[4:] # characters from position 4 (included) to the end
'on'
- >>> word[-2:] # characters from the second-last (included) to the end
+ >>> word[-2:] # characters from the second-last (included) to the end
'on'
One way to remember how slices work is to think of the indices as pointing
@@ -352,9 +352,8 @@ The built-in function :func:`len` returns the length of a string::
Strings support a large number of methods for
basic transformations and searching.
- :ref:`string-formatting`
- Information about string formatting with :meth:`str.format` is described
- here.
+ :ref:`formatstrings`
+ Information about string formatting with :meth:`str.format`.
:ref:`old-string-formatting`
The old formatting operations invoked when strings and Unicode strings are
diff --git a/Doc/tutorial/modules.rst b/Doc/tutorial/modules.rst
index fd361aed69..261a3f3657 100644
--- a/Doc/tutorial/modules.rst
+++ b/Doc/tutorial/modules.rst
@@ -34,7 +34,7 @@ called :file:`fibo.py` in the current directory with the following contents::
a, b = b, a+b
print()
- def fib2(n): # return Fibonacci series up to n
+ def fib2(n): # return Fibonacci series up to n
result = []
a, b = 0, 1
while b < n:
@@ -117,7 +117,8 @@ use it to save typing in interactive sessions.
For efficiency reasons, each module is only imported once per interpreter
session. Therefore, if you change your modules, you must restart the
interpreter -- or, if it's just one module you want to test interactively,
- use :func:`imp.reload`, e.g. ``import imp; imp.reload(modulename)``.
+ use :func:`importlib.reload`, e.g. ``import importlib;
+ importlib.reload(modulename)``.
.. _tut-modulesasscripts:
@@ -216,15 +217,15 @@ Some tips for experts:
statements, the ``-OO`` switch removes both assert statements and __doc__
strings. Since some programs may rely on having these available, you should
only use this option if you know what you're doing. "Optimized" modules have
- a .pyo rather than a .pyc suffix and are usually smaller. Future releases may
+ an ``opt-`` tag and are usually smaller. Future releases may
change the effects of optimization.
-* A program doesn't run any faster when it is read from a ``.pyc`` or ``.pyo``
+* A program doesn't run any faster when it is read from a ``.pyc``
file than when it is read from a ``.py`` file; the only thing that's faster
- about ``.pyc`` or ``.pyo`` files is the speed with which they are loaded.
+ about ``.pyc`` files is the speed with which they are loaded.
-* The module :mod:`compileall` can create .pyc files (or .pyo files when
- :option:`-O` is used) for all modules in a directory.
+* The module :mod:`compileall` can create .pyc files for all modules in a
+ directory.
* There is more detail on this process, including a flow chart of the
decisions, in PEP 3147.
@@ -548,4 +549,3 @@ modules found in a package.
.. [#] In fact function definitions are also 'statements' that are 'executed'; the
execution of a module-level function definition enters the function name in
the module's global symbol table.
-
diff --git a/Doc/tutorial/stdlib.rst b/Doc/tutorial/stdlib.rst
index 72d51de1c0..52ffdbe063 100644
--- a/Doc/tutorial/stdlib.rst
+++ b/Doc/tutorial/stdlib.rst
@@ -15,7 +15,7 @@ operating system::
>>> import os
>>> os.getcwd() # Return the current working directory
- 'C:\\Python34'
+ 'C:\\Python35'
>>> os.chdir('/server/accesslogs') # Change current working directory
>>> os.system('mkdir today') # Run the command mkdir in the system shell
0
@@ -152,7 +152,7 @@ The :mod:`statistics` module calculates basic statistical properties
>>> statistics.variance(data)
1.3720238095238095
-The SciPy project <http://scipy.org> has many other modules for numerical
+The SciPy project <https://scipy.org> has many other modules for numerical
computations.
.. _tut-internet-access:
@@ -301,7 +301,7 @@ file::
with self.assertRaises(TypeError):
average(20, 30, 70)
- unittest.main() # Calling from the command line invokes all tests
+ unittest.main() # Calling from the command line invokes all tests
.. _tut-batteries-included:
diff --git a/Doc/tutorial/stdlib2.rst b/Doc/tutorial/stdlib2.rst
index c0197ea5ef..3714384eb6 100644
--- a/Doc/tutorial/stdlib2.rst
+++ b/Doc/tutorial/stdlib2.rst
@@ -18,7 +18,7 @@ abbreviated displays of large or deeply nested containers::
>>> import reprlib
>>> reprlib.repr(set('supercalifragilisticexpialidocious'))
- "set(['a', 'c', 'd', 'e', 'f', 'g', ...])"
+ "{'a', 'c', 'd', 'e', 'f', 'g', ...}"
The :mod:`pprint` module offers more sophisticated control over printing both
built-in and user defined objects in a way that is readable by the interpreter.
@@ -180,6 +180,7 @@ tasks in background while the main program continues to run::
threading.Thread.__init__(self)
self.infile = infile
self.outfile = outfile
+
def run(self):
f = zipfile.ZipFile(self.outfile, 'w', zipfile.ZIP_DEFLATED)
f.write(self.infile)
@@ -277,7 +278,7 @@ applications include caching objects that are expensive to create::
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
d['primary'] # entry was automatically removed
- File "C:/python34/lib/weakref.py", line 46, in __getitem__
+ File "C:/python35/lib/weakref.py", line 46, in __getitem__
o = self.data[key]()
KeyError: 'primary'
diff --git a/Doc/tutorial/whatnow.rst b/Doc/tutorial/whatnow.rst
index 479542c172..1ea22ae5cd 100644
--- a/Doc/tutorial/whatnow.rst
+++ b/Doc/tutorial/whatnow.rst
@@ -43,7 +43,7 @@ More Python resources:
for download. Once you begin releasing code, you can register it here so that
others can find it.
-* http://code.activestate.com/recipes/langs/python/: The Python Cookbook is a
+* https://code.activestate.com/recipes/langs/python/: The Python Cookbook is a
sizable collection of code examples, larger modules, and useful scripts.
Particularly notable contributions are collected in a book also titled Python
Cookbook (O'Reilly & Associates, ISBN 0-596-00797-3.)
@@ -51,7 +51,7 @@ More Python resources:
* http://www.pyvideo.org collects links to Python-related videos from
conferences and user-group meetings.
-* http://scipy.org: The Scientific Python project includes modules for fast
+* https://scipy.org: The Scientific Python project includes modules for fast
array computations and manipulations plus a host of packages for such
things as linear algebra, Fourier transforms, non-linear solvers,
random number distributions, statistical analysis and the like.
diff --git a/Doc/using/cmdline.rst b/Doc/using/cmdline.rst
index a46349bcde..ec744a351d 100644
--- a/Doc/using/cmdline.rst
+++ b/Doc/using/cmdline.rst
@@ -77,7 +77,7 @@ source.
the :mod:`__main__` module.
Since the argument is a *module* name, you must not give a file extension
- (``.py``). The ``module-name`` should be a valid Python module name, but
+ (``.py``). The module name should be a valid absolute Python module name, but
the implementation may not always enforce this (e.g. it may allow you to
use a name that includes a hyphen).
@@ -190,13 +190,16 @@ Miscellaneous options
.. cmdoption:: -b
- Issue a warning when comparing str and bytes. Issue an error when the
+ Issue a warning when comparing :class:`bytes` or :class:`bytearray` with
+ :class:`str` or :class:`bytes` with :class:`int`. Issue an error when the
option is given twice (:option:`-bb`).
+ .. versionchanged:: 3.5
+ Affects comparisons of :class:`bytes` with :class:`int`.
.. cmdoption:: -B
- If given, Python won't try to write ``.pyc`` or ``.pyo`` files on the
+ If given, Python won't try to write ``.pyc`` files on the
import of source modules. See also :envvar:`PYTHONDONTWRITEBYTECODE`.
@@ -395,7 +398,7 @@ Miscellaneous options
tracing with a traceback limit of *NFRAME* frames. See the
:func:`tracemalloc.start` for more information.
- It also allows to pass arbitrary values and retrieve them through the
+ It also allows passing arbitrary values and retrieving them through the
:data:`sys._xoptions` dictionary.
.. versionchanged:: 3.2
diff --git a/Doc/using/mac.rst b/Doc/using/mac.rst
index ef091e5275..05c91bba59 100644
--- a/Doc/using/mac.rst
+++ b/Doc/using/mac.rst
@@ -25,7 +25,7 @@ there.
What you get after installing is a number of things:
-* A :file:`MacPython 3.4` folder in your :file:`Applications` folder. In here
+* A :file:`MacPython 3.5` folder in your :file:`Applications` folder. In here
you find IDLE, the development environment that is a standard part of official
Python distributions; PythonLauncher, which handles double-clicking Python
scripts from the Finder; and the "Build Applet" tool, which allows you to
@@ -65,7 +65,7 @@ number of standard Unix command line editors, :program:`vim` and
:program:`emacs` among them. If you want a more Mac-like editor,
:program:`BBEdit` or :program:`TextWrangler` from Bare Bones Software (see
http://www.barebones.com/products/bbedit/index.html) are good choices, as is
-:program:`TextMate` (see http://macromates.com/). Other editors include
+:program:`TextMate` (see https://macromates.com/). Other editors include
:program:`Gvim` (http://macvim.org) and :program:`Aquamacs`
(http://aquamacs.org/).
@@ -93,7 +93,7 @@ aware of: programs that talk to the Aqua window manager (in other words,
anything that has a GUI) need to be run in a special way. Use :program:`pythonw`
instead of :program:`python` to start such scripts.
-With Python 3.4, you can use either :program:`python` or :program:`pythonw`.
+With Python 3.5, you can use either :program:`python` or :program:`pythonw`.
Configuration
@@ -144,22 +144,22 @@ the foundation of most modern Mac development. Information on PyObjC is
available from https://pythonhosted.org/pyobjc/.
The standard Python GUI toolkit is :mod:`tkinter`, based on the cross-platform
-Tk toolkit (http://www.tcl.tk). An Aqua-native version of Tk is bundled with OS
+Tk toolkit (https://www.tcl.tk). An Aqua-native version of Tk is bundled with OS
X by Apple, and the latest version can be downloaded and installed from
-http://www.activestate.com; it can also be built from source.
+https://www.activestate.com; it can also be built from source.
*wxPython* is another popular cross-platform GUI toolkit that runs natively on
Mac OS X. Packages and documentation are available from http://www.wxpython.org.
*PyQt* is another popular cross-platform GUI toolkit that runs natively on Mac
OS X. More information can be found at
-http://www.riverbankcomputing.co.uk/software/pyqt/intro.
+https://riverbankcomputing.com/software/pyqt/intro.
Distributing Python Applications on the Mac
===========================================
-The "Build Applet" tool that is placed in the MacPython 3.4 folder is fine for
+The "Build Applet" tool that is placed in the MacPython 3.5 folder is fine for
packaging small Python scripts on your own machine to run as a standard Mac
application. This tool, however, is not robust enough to distribute Python
applications to other users.
diff --git a/Doc/using/unix.rst b/Doc/using/unix.rst
index 5da1f23346..4449d4f4d4 100644
--- a/Doc/using/unix.rst
+++ b/Doc/using/unix.rst
@@ -26,11 +26,11 @@ following links:
.. seealso::
- http://www.debian.org/doc/manuals/maint-guide/first.en.html
+ https://www.debian.org/doc/manuals/maint-guide/first.en.html
for Debian users
- http://en.opensuse.org/Portal:Packaging
+ https://en.opensuse.org/Portal:Packaging
for OpenSuse users
- http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch-creating-rpms.html
+ https://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch-creating-rpms.html
for Fedora users
http://www.slackbook.org/html/package-management-making-packages.html
for Slackware users
@@ -55,7 +55,7 @@ On FreeBSD and OpenBSD
On OpenSolaris
--------------
-You can get Python from `OpenCSW <http://www.opencsw.org/>`_. Various versions
+You can get Python from `OpenCSW <https://www.opencsw.org/>`_. Various versions
of Python are available and can be installed with e.g. ``pkgutil -i python27``.
@@ -65,7 +65,7 @@ Building Python
===============
If you want to compile CPython yourself, first thing you should do is get the
-`source <https://www.python.org/download/source/>`_. You can download either the
+`source <https://www.python.org/downloads/source/>`_. You can download either the
latest release's source or just grab a fresh `clone
<https://docs.python.org/devguide/setup.html#getting-the-source-code>`_. (If you want
to contribute patches, you will need a clone.)
@@ -139,10 +139,10 @@ Vim and Emacs are excellent editors which support Python very well. For more
information on how to code in Python in these editors, look at:
* http://www.vim.org/scripts/script.php?script_id=790
-* http://sourceforge.net/projects/python-mode
+* https://sourceforge.net/projects/python-mode
Geany is an excellent IDE with support for a lot of languages. For more
-information, read: http://www.geany.org/
+information, read: https://www.geany.org/
Komodo edit is another extremely good IDE. It also has support for a lot of
-languages. For more information, read http://komodoide.com/.
+languages. For more information, read https://komodoide.com/.
diff --git a/Doc/using/venv-create.inc b/Doc/using/venv-create.inc
index 45bdd5a46d..c5294786c2 100644
--- a/Doc/using/venv-create.inc
+++ b/Doc/using/venv-create.inc
@@ -14,23 +14,24 @@ subdirectory (on Windows, this is ``Lib\site-packages``).
.. seealso::
`Python Packaging User Guide: Creating and using virtual environments
- <https://packaging.python.org/en/latest/installing.html#virtual-environments>`__
+ <https://packaging.python.org/en/latest/installing/#creating-virtual-environments>`__
.. highlight:: none
On Windows, you may have to invoke the ``pyvenv`` script as follows, if you
don't have the relevant PATH and PATHEXT settings::
- c:\Temp>c:\Python34\python c:\Python34\Tools\Scripts\pyvenv.py myenv
+ c:\Temp>c:\Python35\python c:\Python35\Tools\Scripts\pyvenv.py myenv
or equivalently::
- c:\Temp>c:\Python34\python -m venv myenv
+ c:\Temp>c:\Python35\python -m venv myenv
The command, if run with ``-h``, will show the available options::
- usage: venv [-h] [--system-site-packages] [--symlinks] [--clear]
- [--upgrade] [--without-pip] ENV_DIR [ENV_DIR ...]
+ usage: venv [-h] [--system-site-packages] [--symlinks | --copies] [--clear]
+ [--upgrade] [--without-pip]
+ ENV_DIR [ENV_DIR ...]
Creates virtual Python environments in one or more target directories.
@@ -39,15 +40,14 @@ The command, if run with ``-h``, will show the available options::
optional arguments:
-h, --help show this help message and exit
- --system-site-packages Give access to the global site-packages dir to the
- virtual environment.
+ --system-site-packages Give the virtual environment access to the system
+ site-packages dir.
--symlinks Try to use symlinks rather than copies, when symlinks
are not the default for the platform.
--copies Try to use copies rather than symlinks, even when
symlinks are the default for the platform.
- --clear Delete the environment directory if it already exists.
- If not specified and the directory exists, an error is
- raised.
+ --clear Delete the contents of the environment directory if it
+ already exists, before environment creation.
--upgrade Upgrade the environment directory to use this version
of Python, assuming Python has been upgraded in-place.
--without-pip Skips installing or upgrading pip in the virtual
@@ -89,9 +89,9 @@ venv's binary directory. The invocation of the script is platform-specific:
+-------------+-----------------+-----------------------------------------+
| | csh/tcsh | $ source <venv>/bin/activate.csh |
+-------------+-----------------+-----------------------------------------+
-| Windows | cmd.exe | C:\> <venv>/Scripts/activate.bat |
+| Windows | cmd.exe | C:\> <venv>\Scripts\activate.bat |
+-------------+-----------------+-----------------------------------------+
-| | PowerShell | PS C:\> <venv>/Scripts/Activate.ps1 |
+| | PowerShell | PS C:\> <venv>\Scripts\Activate.ps1 |
+-------------+-----------------+-----------------------------------------+
You don't specifically *need* to activate an environment; activation just
diff --git a/Doc/using/win_installer.png b/Doc/using/win_installer.png
new file mode 100644
index 0000000000..00c88a830f
--- /dev/null
+++ b/Doc/using/win_installer.png
Binary files differ
diff --git a/Doc/using/windows.rst b/Doc/using/windows.rst
index c05f72a853..7520d60846 100644
--- a/Doc/using/windows.rst
+++ b/Doc/using/windows.rst
@@ -7,40 +7,256 @@
*************************
.. sectionauthor:: Robert Lehmann <lehmannro@gmail.com>
+.. sectionauthor:: Steve Dower <steve.dower@microsoft.com>
This document aims to give an overview of Windows-specific behaviour you should
know about when using Python on Microsoft Windows.
-.. XXX (ncoghlan)
-
- This looks rather stale to me...
-
-
Installing Python
=================
-Unlike most Unix systems and services, Windows does not require Python natively
-and thus does not pre-install a version of Python. However, the CPython team
+Unlike most Unix systems and services, Windows does not include a system
+supported installation of Python. To make Python available, the CPython team
has compiled Windows installers (MSI packages) with every `release
-<https://www.python.org/download/releases/>`_ for many years.
+<https://www.python.org/download/releases/>`_ for many years. These installers
+are primarily intended to add a per-user installation of Python, with the
+core interpreter and library being used by a single user. The installer is also
+able to install for all users of a single machine, and a separate ZIP file is
+available for application-local distributions.
+
+Supported Versions
+------------------
+
+As specified in :pep:`11`, a Python release only supports a Windows platform
+while Microsoft considers the platform under extended support. This means that
+Python 3.5 supports Windows Vista and newer. If you require Windows XP support
+then please install Python 3.4.
+
+Installation Steps
+------------------
+
+Four Python 3.5 installers are available for download - two each for the 32-bit
+and 64-bit versions of the interpreter. The *web installer* is a small initial
+download, and it will automatically download the required components as
+necessary. The *offline installer* includes the components necessary for a
+default installation and only requires an internet connection for optional
+features. See :ref:`install-layout-option` for other ways to avoid downloading
+during installation.
+
+After starting the installer, one of two options may be selected:
+
+.. image:: win_installer.png
+
+If you select "Install Now":
+
+* You will *not* need to be an administrator (unless a system update for the
+ C Runtime Library is required or you install the :ref:`launcher` for all
+ users)
+* Python will be installed into your user directory
+* The :ref:`launcher` will be installed according to the option at the bottom
+ of the first pace
+* The standard library, test suite, launcher and pip will be installed
+* If selected, the install directory will be added to your :envvar:`PATH`
+* Shortcuts will only be visible for the current user
+
+Selecting "Customize installation" will allow you to select the features to
+install, the installation location and other options or post-install actions.
+To install debugging symbols or binaries, you will need to use this option.
+
+To perform an all-users installation, you should select "Customize
+installation". In this case:
+
+* You may be required to provide administrative credentials or approval
+* Python will be installed into the Program Files directory
+* The :ref:`launcher` will be installed into the Windows directory
+* Optional features may be selected during installation
+* The standard library can be pre-compiled to bytecode
+* If selected, the install directory will be added to the system :envvar:`PATH`
+* Shortcuts are available for all users
+
+.. _install-quiet-option:
+
+Installing Without UI
+---------------------
+
+All of the options available in the installer UI can also be specified from the
+command line, allowing scripted installers to replicate an installation on many
+machines without user interaction. These options may also be set without
+suppressing the UI in order to change some of the defaults.
+
+To completely hide the installer UI and install Python silently, pass the
+``/quiet`` option. To skip past the user interaction but still display
+progress and errors, pass the ``/passive`` option. The ``/uninstall``
+option may be passed to immediately begin removing Python - no prompt will be
+displayed.
+
+All other options are passed as ``name=value``, where the value is usually
+``0`` to disable a feature, ``1`` to enable a feature, or a path. The full list
+of available options is shown below.
+
++---------------------------+--------------------------------------+--------------------------+
+| Name | Description | Default |
++===========================+======================================+==========================+
+| InstallAllUsers | Perform a system-wide installation. | 0 |
++---------------------------+--------------------------------------+--------------------------+
+| TargetDir | The installation directory | Selected based on |
+| | | InstallAllUsers |
++---------------------------+--------------------------------------+--------------------------+
+| DefaultAllUsersTargetDir | The default installation directory | :file:`%ProgramFiles%\\\ |
+| | for all-user installs | Python X.Y` or :file:`\ |
+| | | %ProgramFiles(x86)%\\\ |
+| | | Python X.Y` |
++---------------------------+--------------------------------------+--------------------------+
+| DefaultJustForMeTargetDir | The default install directory for | :file:`%LocalAppData%\\\ |
+| | just-for-me installs | Programs\\PythonXY` or |
+| | | :file:`%LocalAppData%\\\ |
+| | | Programs\\PythonXY-32` |
++---------------------------+--------------------------------------+--------------------------+
+| DefaultCustomTargetDir | The default custom install directory | (empty) |
+| | displayed in the UI | |
++---------------------------+--------------------------------------+--------------------------+
+| AssociateFiles | Create file associations if the | 1 |
+| | launcher is also installed. | |
++---------------------------+--------------------------------------+--------------------------+
+| CompileAll | Compile all ``.py`` files to | 0 |
+| | ``.pyc``. | |
++---------------------------+--------------------------------------+--------------------------+
+| PrependPath | Add install and Scripts directories | 0 |
+| | tho :envvar:`PATH` and ``.PY`` to | |
+| | :envvar:`PATHEXT` | |
++---------------------------+--------------------------------------+--------------------------+
+| Shortcuts | Create shortcuts for the interpreter,| 1 |
+| | documentation and IDLE if installed. | |
++---------------------------+--------------------------------------+--------------------------+
+| Include_doc | Install Python manual | 1 |
++---------------------------+--------------------------------------+--------------------------+
+| Include_debug | Install debug binaries | 0 |
++---------------------------+--------------------------------------+--------------------------+
+| Include_dev | Install developer headers and | 1 |
+| | libraries | |
++---------------------------+--------------------------------------+--------------------------+
+| Include_exe | Install :file:`python.exe` and | 1 |
+| | related files | |
++---------------------------+--------------------------------------+--------------------------+
+| Include_launcher | Install :ref:`launcher`. | 1 |
++---------------------------+--------------------------------------+--------------------------+
+| InstallLauncherAllUsers | Installs :ref:`launcher` for all | 1 |
+| | users. | |
++---------------------------+--------------------------------------+--------------------------+
+| Include_lib | Install standard library and | 1 |
+| | extension modules | |
++---------------------------+--------------------------------------+--------------------------+
+| Include_pip | Install bundled pip and setuptools | 1 |
++---------------------------+--------------------------------------+--------------------------+
+| Include_symbols | Install debugging symbols (`*`.pdb) | 0 |
++---------------------------+--------------------------------------+--------------------------+
+| Include_tcltk | Install Tcl/Tk support and IDLE | 1 |
++---------------------------+--------------------------------------+--------------------------+
+| Include_test | Install standard library test suite | 1 |
++---------------------------+--------------------------------------+--------------------------+
+| Include_tools | Install utility scripts | 1 |
++---------------------------+--------------------------------------+--------------------------+
+| LauncherOnly | Only installs the launcher. This | 0 |
+| | will override most other options. | |
++---------------------------+--------------------------------------+--------------------------+
+| SimpleInstall | Disable most install UI | 0 |
++---------------------------+--------------------------------------+--------------------------+
+| SimpleInstallDescription | A custom message to display when the | (empty) |
+| | simplified install UI is used. | |
++---------------------------+--------------------------------------+--------------------------+
+
+For example, to silently install a default, system-wide Python installation,
+you could use the following command (from an elevated command prompt)::
+
+ python-3.5.0.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0
+
+To allow users to easily install a personal copy of Python without the test
+suite, you could provide a shortcut with the following command. This will
+display a simplified initial page and disallow customization::
+
+ python-3.5.0.exe InstallAllUsers=0 Include_launcher=0 Include_test=0
+ SimpleInstall=1 SimpleInstallDescription="Just for me, no test suite."
+
+(Note that omitting the launcher also omits file associations, and is only
+recommended for per-user installs when there is also a system-wide installation
+that included the launcher.)
+
+The options listed above can also be provided in a file named ``unattend.xml``
+alongside the executable. This file specifies a list of options and values.
+When a value is provided as an attribute, it will be converted to a number if
+possible. Values provided as element text are always left as strings. This
+example file sets the same options and the previous example::
+
+ <Options>
+ <Option Name="InstallAllUsers" Value="no" />
+ <Option Name="Include_launcher" Value="0" />
+ <Option Name="Include_test" Value="no" />
+ <Option Name="SimpleInstall" Value="yes" />
+ <Option Name="SimpleInstallDescription">Just for me, no test suite</Option>
+ </Options>
+
+.. _install-layout-option:
+
+Installing Without Downloading
+------------------------------
+
+As some features of Python are not included in the initial installer download,
+selecting those features may require an internet connection. To avoid this
+need, all possible components may be downloaded on-demand to create a complete
+*layout* that will no longer require an internet connection regardless of the
+selected features. Note that this download may be bigger than required, but
+where a large number of installations are going to be performed it is very
+useful to have a locally cached copy.
+
+Execute the following command from Command Prompt to download all possible
+required files. Remember to substitute ``python-3.5.0.exe`` for the actual
+name of your installer, and to create layouts in their own directories to
+avoid collisions between files with the same name.
+
+::
+
+ python-3.5.0.exe /layout [optional target directory]
+
+You may also specify the ``/quiet`` option to hide the progress display.
+
+Modifying an install
+--------------------
+
+Once Python has been installed, you can add or remove features through the
+Programs and Features tool that is part of Windows. Select the Python entry and
+choose "Uninstall/Change" to open the installer in maintenance mode.
+
+"Modify" allows you to add or remove features by modifying the checkboxes -
+unchanged checkboxes will not install or remove anything. Some options cannot be
+changed in this mode, such as the install directory; to modify these, you will
+need to remove and then reinstall Python completely.
+
+"Repair" will verify all the files that should be installed using the current
+settings and replace any that have been removed or modified.
+
+"Uninstall" will remove Python entirely, with the exception of the
+:ref:`launcher`, which has its own entry in Programs and Features.
+
+Other Platforms
+---------------
With ongoing development of Python, some platforms that used to be supported
earlier are no longer supported (due to the lack of users or developers).
Check :pep:`11` for details on all unsupported platforms.
* `Windows CE <http://pythonce.sourceforge.net/>`_ is still supported.
-* The `Cygwin <http://cygwin.com/>`_ installer offers to install the Python
+* The `Cygwin <https://cygwin.com/>`_ installer offers to install the Python
interpreter as well (cf. `Cygwin package source
<ftp://ftp.uni-erlangen.de/pub/pc/gnuwin32/cygwin/mirrors/cygnus/
release/python>`_, `Maintainer releases
<http://www.tishler.net/jason/software/python/>`_)
-See `Python for Windows <https://www.python.org/download/windows/>`_
+See `Python for Windows <https://www.python.org/downloads/windows/>`_
for detailed information about platforms with pre-compiled installers.
.. seealso::
- `Python on XP <http://www.richarddooling.com/index.php/2006/03/14/python-on-xp-7-minutes-to-hello-world/>`_
+ `Python on XP <http://dooling.com/index.php/2006/03/14/python-on-xp-7-minutes-to-hello-world/>`_
"7 Minutes to "Hello World!""
by Richard Dooling, 2006
@@ -50,9 +266,9 @@ for detailed information about platforms with pre-compiled installers.
by Mark Pilgrim, 2004,
ISBN 1-59059-356-1
- `For Windows users <http://www.swaroopch.com/notes/python/#install_windows>`_
+ `For Windows users <http://python.swaroopch.com/installation.html#installation-on-windows>`_
in "Installing Python"
- in "`A Byte of Python <http://www.swaroopch.com/notes/python/>`_"
+ in "`A Byte of Python <http://python.swaroopch.com/>`_"
by Swaroop C H, 2003
@@ -63,22 +279,34 @@ Besides the standard CPython distribution, there are modified packages including
additional functionality. The following is a list of popular versions and their
key features:
-`ActivePython <http://www.activestate.com/activepython/>`_
+`ActivePython <https://www.activestate.com/activepython/>`_
Installer with multi-platform compatibility, documentation, PyWin32
-`Enthought Python Distribution <https://www.enthought.com/products/epd/>`_
- Popular modules (such as PyWin32) with their respective documentation, tool
- suite for building extensible Python applications
+`Anaconda <https://www.continuum.io/downloads/>`_
+ Popular scientific modules (such as numpy, scipy and pandas) and the
+ ``conda`` package manager.
+
+`Canopy <https://www.enthought.com/products/canopy/>`_
+ A "comprehensive Python analysis environment" with editors and other
+ development tools.
+
+`WinPython <https://winpython.github.io/>`_
+ Windows-specific distribution with prebuilt scientific packages and
+ tools for building packages.
-Notice that these packages are likely to install *older* versions of Python.
+Note that these packages may not include the latest versions of Python or
+other libraries, and are not maintained or supported by the core Python team.
Configuring Python
==================
-In order to run Python flawlessly, you might have to change certain environment
-settings in Windows.
+To run Python conveniently from a command prompt, you might consider changing
+some default environment variables in Windows. While the installer provides an
+option to configure the PATH and PATHEXT variables for you, this is only
+reliable for a single, system-wide installation. If you regularly use multiple
+versions of Python, consider using the :ref:`launcher`.
.. _setting-envvars:
@@ -86,163 +314,86 @@ settings in Windows.
Excursus: Setting environment variables
---------------------------------------
-Windows has a built-in dialog for changing environment variables (following
-guide applies to XP classical view): Right-click the icon for your machine
-(usually located on your Desktop and called "My Computer") and choose
-:menuselection:`Properties` there. Then, open the :guilabel:`Advanced` tab
-and click the :guilabel:`Environment Variables` button.
+Windows allows environment variables to be configured permanently at both the
+User level and the System level, or temporarily in a command prompt.
-In short, your path is:
+To temporarily set environment variables, open Command Prompt and use the
+:command:`set` command::
- :menuselection:`My Computer
- --> Properties
- --> Advanced
- --> Environment Variables`
+ C:\>set PATH=C:\Program Files\Python 3.5;%PATH%
+ C:\>set PYTHONPATH=%PYTHONPATH%;C:\My_python_lib
+ C:\>python
+These changes will apply to any further commands executed in that console, and
+will be inherited by any applications started from the console.
+
+Including the variable name within percent signs will expand to the existing
+value, allowing you to add your new value at either the start or the end.
+Modifying :envvar:`PATH` by adding the directory containing
+:program:`python.exe` to the start is a common way to ensure the correct version
+of Python is launched.
+
+To permanently modify the default environment variables, click Start and search
+for 'edit environment variables', or open System properties, :guilabel:`Advanced
+system settings` and click the :guilabel:`Environment Variables` button.
In this dialog, you can add or modify User and System variables. To change
System variables, you need non-restricted access to your machine
(i.e. Administrator rights).
-Another way of adding variables to your environment is using the :command:`set`
-command::
-
- set PYTHONPATH=%PYTHONPATH%;C:\My_python_lib
-
-To make this setting permanent, you could add the corresponding command line to
-your :file:`autoexec.bat`. :program:`msconfig` is a graphical interface to this
-file.
-
-Viewing environment variables can also be done more straight-forward: The
-command prompt will expand strings wrapped into percent signs automatically::
+.. note::
- echo %PATH%
+ Windows will concatenate User variables *after* System variables, which may
+ cause unexpected results when modifying :envvar:`PATH`.
-Consult :command:`set /?` for details on this behaviour.
+ The :envvar:`PYTHONPATH` variable is used by all versions of Python 2 and
+ Python 3, so you should not permanently configure this variable unless it
+ only includes code that is compatible with all of your installed Python
+ versions.
.. seealso::
- http://support.microsoft.com/kb/100843
+ https://support.microsoft.com/kb/100843
Environment variables in Windows NT
- http://support.microsoft.com/kb/310519
+ https://technet.microsoft.com/en-us/library/cc754250.aspx
+ The SET command, for temporarily modifying environment variables
+
+ https://technet.microsoft.com/en-us/library/cc755104.aspx
+ The SETX command, for permanently modifying environment variables
+
+ https://support.microsoft.com/kb/310519
How To Manage Environment Variables in Windows XP
- http://www.chem.gla.ac.uk/~louis/software/faq/q1.html
+ https://www.chem.gla.ac.uk/~louis/software/faq/q1.html
Setting Environment variables, Louis J. Farrugia
-
.. _windows-path-mod:
Finding the Python executable
-----------------------------
-.. versionchanged:: 3.3
+.. versionchanged:: 3.5
Besides using the automatically created start menu entry for the Python
-interpreter, you might want to start Python in the command prompt. As of
-Python 3.3, the installer has an option to set that up for you.
-
-At the "Customize Python 3.3" screen, an option called
-"Add python.exe to search path" can be enabled to have the installer place
-your installation into the :envvar:`%PATH%`. This allows you to type
-:command:`python` to run the interpreter. Thus, you can also execute your
+interpreter, you might want to start Python in the command prompt. The
+installer for Python 3.5 and later has an option to set that up for you.
+
+On the first page of the installer, an option labelled "Add Python 3.5 to
+PATH" can be selected to have the installer add the install location into the
+:envvar:`PATH`. The location of the :file:`Scripts\\` folder is also added.
+This allows you to type :command:`python` to run the interpreter, and
+:command:`pip` or . Thus, you can also execute your
scripts with command line options, see :ref:`using-on-cmdline` documentation.
If you don't enable this option at install time, you can always re-run the
-installer to choose it.
-
-The alternative is manually modifying the :envvar:`%PATH%` using the
-directions in :ref:`setting-envvars`. You need to set your :envvar:`%PATH%`
-environment variable to include the directory of your Python distribution,
-delimited by a semicolon from other entries. An example variable could look
-like this (assuming the first two entries are Windows' default)::
-
- C:\WINDOWS\system32;C:\WINDOWS;C:\Python33
-
-
-Finding modules
----------------
-
-Python usually stores its library (and thereby your site-packages folder) in the
-installation directory. So, if you had installed Python to
-:file:`C:\\Python\\`, the default library would reside in
-:file:`C:\\Python\\Lib\\` and third-party modules should be stored in
-:file:`C:\\Python\\Lib\\site-packages\\`.
-
-This is how :data:`sys.path` is populated on Windows:
-
-* An empty entry is added at the start, which corresponds to the current
- directory.
-
-* If the environment variable :envvar:`PYTHONPATH` exists, as described in
- :ref:`using-on-envvars`, its entries are added next. Note that on Windows,
- paths in this variable must be separated by semicolons, to distinguish them
- from the colon used in drive identifiers (``C:\`` etc.).
-
-* Additional "application paths" can be added in the registry as subkeys of
- :samp:`\\SOFTWARE\\Python\\PythonCore\\{version}\\PythonPath` under both the
- ``HKEY_CURRENT_USER`` and ``HKEY_LOCAL_MACHINE`` hives. Subkeys which have
- semicolon-delimited path strings as their default value will cause each path
- to be added to :data:`sys.path`. (Note that all known installers only use
- HKLM, so HKCU is typically empty.)
-
-* If the environment variable :envvar:`PYTHONHOME` is set, it is assumed as
- "Python Home". Otherwise, the path of the main Python executable is used to
- locate a "landmark file" (``Lib\os.py``) to deduce the "Python Home". If a
- Python home is found, the relevant sub-directories added to :data:`sys.path`
- (``Lib``, ``plat-win``, etc) are based on that folder. Otherwise, the core
- Python path is constructed from the PythonPath stored in the registry.
-
-* If the Python Home cannot be located, no :envvar:`PYTHONPATH` is specified in
- the environment, and no registry entries can be found, a default path with
- relative entries is used (e.g. ``.\Lib;.\plat-win``, etc).
-
-The end result of all this is:
-
-* When running :file:`python.exe`, or any other .exe in the main Python
- directory (either an installed version, or directly from the PCbuild
- directory), the core path is deduced, and the core paths in the registry are
- ignored. Other "application paths" in the registry are always read.
-
-* When Python is hosted in another .exe (different directory, embedded via COM,
- etc), the "Python Home" will not be deduced, so the core path from the
- registry is used. Other "application paths" in the registry are always read.
-
-* If Python can't find its home and there is no registry (eg, frozen .exe, some
- very strange installation setup) you get a path with some default, but
- relative, paths.
-
-
-Executing scripts
------------------
-
-As of Python 3.3, Python includes a launcher which facilitates running Python
-scripts. See :ref:`launcher` for more information.
-
-Executing scripts without the Python launcher
----------------------------------------------
-
-Without the Python launcher installed, Python scripts (files with the extension
-``.py``) will be executed by :program:`python.exe` by default. This executable
-opens a terminal, which stays open even if the program uses a GUI. If you do
-not want this to happen, use the extension ``.pyw`` which will cause the script
-to be executed by :program:`pythonw.exe` by default (both executables are
-located in the top-level of your Python installation directory). This
-suppresses the terminal window on startup.
-
-You can also make all ``.py`` scripts execute with :program:`pythonw.exe`,
-setting this through the usual facilities, for example (might require
-administrative rights):
-
-#. Launch a command prompt.
-#. Associate the correct file group with ``.py`` scripts::
-
- assoc .py=Python.File
-
-#. Redirect all Python files to the new executable::
-
- ftype Python.File=C:\Path\to\pythonw.exe "%1" %*
+installer, select Modify, and enable it. Alternatively, you can manually
+modify the :envvar:`PATH` using the directions in :ref:`setting-envvars`. You
+need to set your :envvar:`PATH` environment variable to include the directory
+of your Python installation, delimited by a semicolon from other entries. An
+example variable could look like this (assuming the first two entries already
+existed)::
+ C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Python 3.5
.. _launcher:
@@ -251,21 +402,26 @@ Python Launcher for Windows
.. versionadded:: 3.3
-The Python launcher for Windows is a utility which aids in the location and
-execution of different Python versions. It allows scripts (or the
+The Python launcher for Windows is a utility which aids in locating and
+executing of different Python versions. It allows scripts (or the
command-line) to indicate a preference for a specific Python version, and
will locate and execute that version.
+Unlike the :envvar:`PATH` variable, the launcher will correctly select the most
+appropriate version of Python. It will prefer per-user installations over
+system-wide ones, and orders by language version rather than using the most
+recently installed version.
+
Getting started
---------------
From the command-line
^^^^^^^^^^^^^^^^^^^^^
-You should ensure the launcher is on your PATH - depending on how it was
-installed it may already be there, but check just in case it is not.
-
-From a command-prompt, execute the following command:
+System-wide installations of Python 3.3 and later will put the launcher on your
+:envvar:`PATH`. The launcher is compatible with all available versions of
+Python, so it does not matter which version is installed. To check that the
+launcher is available, execute the following command in Command Prompt:
::
@@ -291,6 +447,28 @@ If you have a Python 3.x installed, try the command:
You should find the latest version of Python 3.x starts.
+If you see the following error, you do not have the launcher installed:
+
+::
+
+ 'py' is not recognized as an internal or external command,
+ operable program or batch file.
+
+Per-user installations of Python do not add the launcher to :envvar:`PATH`
+unless the option was selected on installation.
+
+Virtual environments
+^^^^^^^^^^^^^^^^^^^^
+
+.. versionadded:: 3.5
+
+If the launcher is run with no explicit Python version specification, and a
+virtual environment (created with the standard library :mod:`venv` module or
+the external ``virtualenv`` tool) active, the launcher will run the virtual
+environment's interpreter rather than the global one. To run the global
+interpreter, either deactivate the virtual environment, or explicitly specify
+the global Python version.
+
From a script
^^^^^^^^^^^^^
@@ -326,7 +504,7 @@ From file associations
^^^^^^^^^^^^^^^^^^^^^^
The launcher should have been associated with Python files (i.e. ``.py``,
-``.pyw``, ``.pyc``, ``.pyo`` files) when it was installed. This means that
+``.pyw``, ``.pyc`` files) when it was installed. This means that
when you double-click on one of these files from Windows explorer the launcher
will be used, and therefore you can use the same facilities described above to
have the script specify the version which should be used.
@@ -365,6 +543,16 @@ be used by the launcher without modification. If you are writing a new script
on Windows which you hope will be useful on Unix, you should use one of the
shebang lines starting with ``/usr``.
+Any of the above virtual commands can be suffixed with an explicit version
+(either just the major version, or the major and minor version) - for example
+``/usr/bin/python2.7`` - which will cause that specific version to be located
+and used.
+
+The ``/usr/bin/env`` form of shebang line has one further special property.
+Before looking for installed Python interpreters, this form will search the
+executable :envvar:`PATH` for a Python executable. This corresponds to the
+behaviour of the Unix ``env`` program, which performs a :envvar:`PATH` search.
+
Arguments in shebang lines
--------------------------
@@ -383,17 +571,16 @@ Customization
Customization via INI files
^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Two .ini files will be searched by the launcher - ``py.ini`` in the
- current user's "application data" directory (i.e. the directory returned
- by calling the Windows function SHGetFolderPath with CSIDL_LOCAL_APPDATA)
- and ``py.ini`` in the same directory as the launcher. The same .ini
- files are used for both the 'console' version of the launcher (i.e.
- py.exe) and for the 'windows' version (i.e. pyw.exe)
+Two .ini files will be searched by the launcher - ``py.ini`` in the current
+user's "application data" directory (i.e. the directory returned by calling the
+Windows function SHGetFolderPath with CSIDL_LOCAL_APPDATA) and ``py.ini`` in the
+same directory as the launcher. The same .ini files are used for both the
+'console' version of the launcher (i.e. py.exe) and for the 'windows' version
+(i.e. pyw.exe)
- Customization specified in the "application directory" will have
- precedence over the one next to the executable, so a user, who may not
- have write access to the .ini file next to the launcher, can override
- commands in that global .ini file)
+Customization specified in the "application directory" will have precedence over
+the one next to the executable, so a user, who may not have write access to the
+.ini file next to the launcher, can override commands in that global .ini file)
Customizing default Python versions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -488,6 +675,99 @@ particular version was chosen and the exact command-line used to execute the
target Python.
+
+.. finding_modules:
+
+Finding modules
+===============
+
+Python usually stores its library (and thereby your site-packages folder) in the
+installation directory. So, if you had installed Python to
+:file:`C:\\Python\\`, the default library would reside in
+:file:`C:\\Python\\Lib\\` and third-party modules should be stored in
+:file:`C:\\Python\\Lib\\site-packages\\`.
+
+This is how :data:`sys.path` is populated on Windows:
+
+* An empty entry is added at the start, which corresponds to the current
+ directory.
+
+* If the environment variable :envvar:`PYTHONPATH` exists, as described in
+ :ref:`using-on-envvars`, its entries are added next. Note that on Windows,
+ paths in this variable must be separated by semicolons, to distinguish them
+ from the colon used in drive identifiers (``C:\`` etc.).
+
+* Additional "application paths" can be added in the registry as subkeys of
+ :samp:`\\SOFTWARE\\Python\\PythonCore\\{version}\\PythonPath` under both the
+ ``HKEY_CURRENT_USER`` and ``HKEY_LOCAL_MACHINE`` hives. Subkeys which have
+ semicolon-delimited path strings as their default value will cause each path
+ to be added to :data:`sys.path`. (Note that all known installers only use
+ HKLM, so HKCU is typically empty.)
+
+* If the environment variable :envvar:`PYTHONHOME` is set, it is assumed as
+ "Python Home". Otherwise, the path of the main Python executable is used to
+ locate a "landmark file" (``Lib\os.py``) to deduce the "Python Home". If a
+ Python home is found, the relevant sub-directories added to :data:`sys.path`
+ (``Lib``, ``plat-win``, etc) are based on that folder. Otherwise, the core
+ Python path is constructed from the PythonPath stored in the registry.
+
+* If the Python Home cannot be located, no :envvar:`PYTHONPATH` is specified in
+ the environment, and no registry entries can be found, a default path with
+ relative entries is used (e.g. ``.\Lib;.\plat-win``, etc).
+
+If a ``pyvenv.cfg`` file is found alongside the main executable or in the
+directory one level above the executable, the following variations apply:
+
+* If ``home`` is an absolute path and :envvar:`PYTHONHOME` is not set, this
+ path is used instead of the path to the main executable when deducing the
+ home location.
+
+* If ``applocal`` is set to true, the ``home`` property or the main executable
+ is always used as the home path, and all environment variables or registry
+ values affecting the path are ignored. The landmark file is not checked.
+
+The end result of all this is:
+
+* When running :file:`python.exe`, or any other .exe in the main Python
+ directory (either an installed version, or directly from the PCbuild
+ directory), the core path is deduced, and the core paths in the registry are
+ ignored. Other "application paths" in the registry are always read.
+
+* When Python is hosted in another .exe (different directory, embedded via COM,
+ etc), the "Python Home" will not be deduced, so the core path from the
+ registry is used. Other "application paths" in the registry are always read.
+
+* If Python can't find its home and there are no registry value (frozen .exe,
+ some very strange installation setup) you get a path with some default, but
+ relative, paths.
+
+For those who want to bundle Python into their application or distribution, the
+following advice will prevent conflicts with other installations:
+
+* Include a ``pyvenv.cfg`` file alongside your executable containing
+ ``applocal = true``. This will ensure that your own directory will be used to
+ resolve paths even if you have included the standard library in a ZIP file.
+ It will also ignore user site-packages and other paths listed in the
+ registry.
+
+* If you are loading :file:`python3.dll` or :file:`python35.dll` in your own
+ executable, explicitly call :c:func:`Py_SetPath` or (at least)
+ :c:func:`Py_SetProgramName` before :c:func:`Py_Initialize`.
+
+* Clear and/or overwrite :envvar:`PYTHONPATH` and set :envvar:`PYTHONHOME`
+ before launching :file:`python.exe` from your application.
+
+* If you cannot use the previous suggestions (for example, you are a
+ distribution that allows people to run :file:`python.exe` directly), ensure
+ that the landmark file (:file:`Lib\\os.py`) exists in your install directory.
+ (Note that it will not be detected inside a ZIP file.)
+
+These will ensure that the files in a system-wide installation will not take
+precedence over the copy of the standard library bundled with your application.
+Otherwise, your users may experience problems using your application. Note that
+the first suggestion is the best, as the other may still be susceptible to
+non-standard paths in the registry and user site-packages.
+
Additional modules
==================
@@ -498,22 +778,21 @@ and external, and snippets exist to use these features.
The Windows-specific standard modules are documented in
:ref:`mswin-specific-services`.
-
PyWin32
-------
-The `PyWin32 <http://python.net/crew/mhammond/win32/>`_ module by Mark Hammond
+The `PyWin32 <https://pypi.python.org/pypi/pywin32>`_ module by Mark Hammond
is a collection of modules for advanced Windows-specific support. This includes
utilities for:
-* `Component Object Model <http://www.microsoft.com/com/>`_ (COM)
+* `Component Object Model <https://www.microsoft.com/com/>`_ (COM)
* Win32 API calls
* Registry
* Event log
-* `Microsoft Foundation Classes <http://msdn.microsoft.com/en-us/library/fe1cf721%28VS.80%29.aspx>`_ (MFC)
+* `Microsoft Foundation Classes <https://msdn.microsoft.com/en-us/library/fe1cf721%28VS.80%29.aspx>`_ (MFC)
user interfaces
-`PythonWin <http://web.archive.org/web/20060524042422/
+`PythonWin <https://web.archive.org/web/20060524042422/
https://www.python.org/windows/pythonwin/>`_ is a sample MFC application
shipped with PyWin32. It is an embeddable IDE with a built-in debugger.
@@ -552,25 +831,13 @@ Compiling Python on Windows
===========================
If you want to compile CPython yourself, first thing you should do is get the
-`source <https://www.python.org/download/source/>`_. You can download either the
+`source <https://www.python.org/downloads/source/>`_. You can download either the
latest release's source or just grab a fresh `checkout
<https://docs.python.org/devguide/setup.html#getting-the-source-code>`_.
The source tree contains a build solution and project files for Microsoft
-Visual C++, which is the compiler used to build the official Python releases.
-View the :file:`readme.txt` in their respective directories:
-
-+--------------------+--------------+-----------------------+
-| Directory | MSVC version | Visual Studio version |
-+====================+==============+=======================+
-| :file:`PC/VS9.0/` | 9.0 | 2008 |
-+--------------------+--------------+-----------------------+
-| :file:`PCbuild/` | 10.0 | 2010 |
-+--------------------+--------------+-----------------------+
-
-Note that any build directories within the :file:`PC` directory are not
-necessarily fully supported. The :file:`PCbuild` directory contains the files
-for the compiler used to build the official release.
+Visual Studio 2015, which is the compiler used to build the official Python
+releases. These files are in the :file:`PCbuild` directory.
Check :file:`PCbuild/readme.txt` for general information on the build process.
@@ -588,6 +855,83 @@ For extension modules, consult :ref:`building-on-windows`.
by Trent Apted et al, 2007
+Embedded Distribution
+=====================
+
+.. versionadded:: 3.5
+
+The embedded distribution is a ZIP file containing a minimal Python environment.
+It is intended for acting as part of another application, rather than being
+directly accessed by end-users.
+
+When extracted, the embedded distribution is (almost) fully isolated from the
+user's system, including environment variables, system registry settings, and
+installed packages. The standard library is included as pre-compiled and
+optimized ``.pyc`` files in a ZIP, and ``python3.dll``, ``python35.dll``,
+``python.exe`` and ``pythonw.exe`` are all provided. Tcl/tk (including all
+dependants, such as Idle), pip and the Python documentation are not included.
+
+.. note::
+
+ The embedded distribution does not include the `Microsoft C Runtime
+ <https://www.microsoft.com/en-us/download/details.aspx?id=48145>`_ and it is
+ the responsibility of the application installer to provide this. The
+ runtime may have already been installed on a user's system previously or
+ automatically via Windows Update, and can be detected by finding
+ ``ucrtbase.dll`` in the system directory.
+
+Third-party packages should be installed by the application installer alongside
+the embedded distribution. Using pip to manage dependencies as for a regular
+Python installation is not supported with this distribution, though with some
+care it may be possible to include and use pip for automatic updates. In
+general, third-party packages should be treated as part of the application
+("vendoring") so that the developer can ensure compatibility with newer
+versions before providing updates to users.
+
+The two recommended use cases for this distribution are described below.
+
+Python Application
+------------------
+
+An application written in Python does not necessarily require users to be aware
+of that fact. The embedded distribution may be used in this case to include a
+private version of Python in an install package. Depending on how transparent it
+should be (or conversely, how professional it should appear), there are two
+options.
+
+Using a specialized executable as a launcher requires some coding, but provides
+the most transparent experience for users. With a customized launcher, there are
+no obvious indications that the program is running on Python: icons can be
+customized, company and version information can be specified, and file
+associations behave properly. In most cases, a custom launcher should simply be
+able to call ``Py_Main`` with a hard-coded command line.
+
+The simpler approach is to provide a batch file or generated shortcut that
+directly calls the ``python.exe`` or ``pythonw.exe`` with the required
+command-line arguments. In this case, the application will appear to be Python
+and not its actual name, and users may have trouble distinguishing it from other
+running Python processes or file associations.
+
+With the latter approach, packages should be installed as directories alongside
+the Python executable to ensure they are available on the path. With the
+specialized launcher, packages can be located in other locations as there is an
+opportunity to specify the search path before launching the application.
+
+Embedding Python
+----------------
+
+Applications written in native code often require some form of scripting
+language, and the embedded Python distribution can be used for this purpose. In
+general, the majority of the application is in native code, and some part will
+either invoke ``python.exe`` or directly use ``python3.dll``. For either case,
+extracting the embedded distribution to a subdirectory of the application
+installation is sufficient to provide a loadable Python interpreter.
+
+As with the application use, packages can be installed to any location as there
+is an opportunity to specify search paths before initializing the interpreter.
+Otherwise, there is no fundamental differences between using the embedded
+distribution and a regular installation.
+
Other resources
===============
@@ -603,5 +947,3 @@ Other resources
:pep:`397` - Python launcher for Windows
The proposal for the launcher to be included in the Python distribution.
-
-
diff --git a/Doc/whatsnew/2.0.rst b/Doc/whatsnew/2.0.rst
index 10bb29ee8a..87462f3f84 100644
--- a/Doc/whatsnew/2.0.rst
+++ b/Doc/whatsnew/2.0.rst
@@ -61,7 +61,7 @@ how Python is developed: in May 2000 the Python developers began using the tools
made available by SourceForge for storing source code, tracking bug reports,
and managing the queue of patch submissions. To report bugs or submit patches
for Python 2.0, use the bug tracking and patch manager tools available from
-Python's project page, located at http://sourceforge.net/projects/python/.
+Python's project page, located at https://sourceforge.net/projects/python/.
The most important of the services now hosted at SourceForge is the Python CVS
tree, the version-controlled repository containing the source code for Python.
@@ -130,7 +130,7 @@ Guidelines":
Read the rest of PEP 1 for the details of the PEP editorial process, style, and
format. PEPs are kept in the Python CVS tree on SourceForge, though they're not
part of the Python 2.0 distribution, and are also available in HTML form from
-https://www.python.org/peps/. As of September 2000, there are 25 PEPS, ranging
+https://www.python.org/dev/peps/. As of September 2000, there are 25 PEPS, ranging
from PEP 201, "Lockstep Iteration", to PEP 225, "Elementwise/Objectwise
Operators".
@@ -337,7 +337,7 @@ comprehension below is a syntax error, while the second one is correct::
[ (x,y) for x in seq1 for y in seq2]
The idea of list comprehensions originally comes from the functional programming
-language Haskell (http://www.haskell.org). Greg Ewing argued most effectively
+language Haskell (https://www.haskell.org). Greg Ewing argued most effectively
for adding them to Python and wrote the initial list comprehension patch, which
was then discussed for a seemingly endless time on the python-dev mailing list
and kept up-to-date by Skip Montanaro.
diff --git a/Doc/whatsnew/2.1.rst b/Doc/whatsnew/2.1.rst
index 6de5bf57b3..e55eaace26 100644
--- a/Doc/whatsnew/2.1.rst
+++ b/Doc/whatsnew/2.1.rst
@@ -562,7 +562,7 @@ You can start creating packages containing :file:`PKG-INFO` even if you're not
using Python 2.1, since a new release of the Distutils will be made for users of
earlier Python versions. Version 1.0.2 of the Distutils includes the changes
described in PEP 241, as well as various bugfixes and enhancements. It will be
-available from the Distutils SIG at https://www.python.org/sigs/distutils-sig/.
+available from the Distutils SIG at https://www.python.org/community/sigs/current/distutils-sig/.
.. seealso::
@@ -731,7 +731,7 @@ of the more notable changes are:
...
For a fuller discussion of the line I/O changes, see the python-dev summary for
- January 1-15, 2001 at https://www.python.org/dev/summary/2001-01-1/.
+ January 1-15, 2001 at https://mail.python.org/pipermail/python-dev/2001-January/.
* A new method, :meth:`popitem`, was added to dictionaries to enable
destructively iterating through the contents of a dictionary; this can be faster
diff --git a/Doc/whatsnew/2.2.rst b/Doc/whatsnew/2.2.rst
index f3c4a91346..885fd60355 100644
--- a/Doc/whatsnew/2.2.rst
+++ b/Doc/whatsnew/2.2.rst
@@ -24,8 +24,8 @@ up irregularities and dark corners of the language design.
This article doesn't attempt to provide a complete specification of the new
features, but instead provides a convenient overview. For full details, you
should refer to the documentation for Python 2.2, such as the `Python Library
-Reference <https://www.python.org/doc/2.2/lib/lib.html>`_ and the `Python
-Reference Manual <https://www.python.org/doc/2.2/ref/ref.html>`_. If you want to
+Reference <https://docs.python.org/2.2/lib/lib.html>`_ and the `Python
+Reference Manual <https://docs.python.org/2.2/ref/ref.html>`_. If you want to
understand the complete implementation and design rationale for a change, refer
to the PEP for a particular new feature.
@@ -395,7 +395,7 @@ This section has just been a quick overview of the new features, giving enough
of an explanation to start you programming, but many details have been
simplified or ignored. Where should you go to get a more complete picture?
-https://www.python.org/2.2/descrintro.html is a lengthy tutorial introduction to
+https://docs.python.org/dev/howto/descriptor.html is a lengthy tutorial introduction to
the descriptor features, written by Guido van Rossum. If my description has
whetted your appetite, go read this tutorial next, because it goes into much
more detail about the new features while still remaining quite easy to read.
@@ -632,10 +632,10 @@ queen threatens another) and the Knight's Tour (a route that takes a knight to
every square of an $NxN$ chessboard without visiting any square twice).
The idea of generators comes from other programming languages, especially Icon
-(http://www.cs.arizona.edu/icon/), where the idea of generators is central. In
+(https://www.cs.arizona.edu/icon/), where the idea of generators is central. In
Icon, every expression and function call behaves like a generator. One example
from "An Overview of the Icon Programming Language" at
-http://www.cs.arizona.edu/icon/docs/ipd266.htm gives an idea of what this looks
+https://www.cs.arizona.edu/icon/docs/ipd266.htm gives an idea of what this looks
like::
sentence := "Store it in the neighboring harbor"
@@ -720,7 +720,7 @@ possible types of the operands.
(The controversy is over whether this is *really* a design flaw, and whether
it's worth breaking existing code to fix this. It's caused endless discussions
-on python-dev, and in July 2001 erupted into an storm of acidly sarcastic
+on python-dev, and in July 2001 erupted into a storm of acidly sarcastic
postings on :newsgroup:`comp.lang.python`. I won't argue for either side here
and will stick to describing what's implemented in 2.2. Read :pep:`238` for a
summary of arguments and counter-arguments.)
@@ -758,7 +758,7 @@ Here are the changes 2.2 introduces:
operators.
* Python 2.2 supports some command-line arguments for testing whether code will
- works with the changed division semantics. Running python with :option:`-Q
+ work with the changed division semantics. Running python with :option:`-Q
warn` will cause a warning to be issued whenever division is applied to two
integers. You can use this to find code that's affected by the change and fix
it. By default, Python 2.2 will simply perform classic division without a
diff --git a/Doc/whatsnew/2.3.rst b/Doc/whatsnew/2.3.rst
index 9d99074f22..b8cdcf1f52 100644
--- a/Doc/whatsnew/2.3.rst
+++ b/Doc/whatsnew/2.3.rst
@@ -218,10 +218,10 @@ queen threatens another) and the Knight's Tour (a route that takes a knight to
every square of an $NxN$ chessboard without visiting any square twice).
The idea of generators comes from other programming languages, especially Icon
-(http://www.cs.arizona.edu/icon/), where the idea of generators is central. In
+(https://www.cs.arizona.edu/icon/), where the idea of generators is central. In
Icon, every expression and function call behaves like a generator. One example
from "An Overview of the Icon Programming Language" at
-http://www.cs.arizona.edu/icon/docs/ipd266.htm gives an idea of what this looks
+https://www.cs.arizona.edu/icon/docs/ipd266.htm gives an idea of what this looks
like::
sentence := "Store it in the neighboring harbor"
@@ -1057,7 +1057,7 @@ Here are all of the changes that Python 2.3 makes to the core Python language.
* A new warning, :exc:`PendingDeprecationWarning` was added to indicate features
which are in the process of being deprecated. The warning will *not* be printed
by default. To check for use of features that will be deprecated in the future,
- supply :option:`-Walways::PendingDeprecationWarning::` on the command line or
+ supply :option:`-Walways::PendingDeprecationWarning:: <-W>` on the command line or
use :func:`warnings.filterwarnings`.
* The process of deprecating string-based exceptions, as in ``raise "Error
@@ -1080,9 +1080,9 @@ Here are all of the changes that Python 2.3 makes to the core Python language.
hierarchy. Classic classes are unaffected by this change. Python 2.2
originally used a topological sort of a class's ancestors, but 2.3 now uses the
C3 algorithm as described in the paper `"A Monotonic Superclass Linearization
- for Dylan" <http://www.webcom.com/haahr/dylan/linearization-oopsla96.html>`_. To
+ for Dylan" <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.19.3910>`_. To
understand the motivation for this change, read Michele Simionato's article
- `"Python 2.3 Method Resolution Order" <https://www.python.org/2.3/mro.html>`_, or
+ `"Python 2.3 Method Resolution Order" <http://www.phyast.pitt.edu/~micheles/mro.html>`_, or
read the thread on python-dev starting with the message at
https://mail.python.org/pipermail/python-dev/2002-October/029035.html. Samuele
Pedroni first pointed out the problem and also implemented the fix by coding the
@@ -1306,7 +1306,7 @@ complete list of changes, or look through the CVS logs for all the details.
partially sorted order such that, for every index *k*, ``heap[k] <=
heap[2*k+1]`` and ``heap[k] <= heap[2*k+2]``. This makes it quick to remove the
smallest item, and inserting a new item while maintaining the heap property is
- O(lg n). (See http://www.nist.gov/dads/HTML/priorityque.html for more
+ O(lg n). (See https://xlinux.nist.gov/dads//HTML/priorityque.html for more
information about the priority queue data structure.)
The :mod:`heapq` module provides :func:`heappush` and :func:`heappop` functions
@@ -1734,7 +1734,7 @@ The optparse Module
The :mod:`getopt` module provides simple parsing of command-line arguments. The
new :mod:`optparse` module (originally named Optik) provides more elaborate
command-line parsing that follows the Unix conventions, automatically creates
-the output for :option:`--help`, and can perform different actions for different
+the output for :option:`!--help`, and can perform different actions for different
options.
You start by creating an instance of :class:`OptionParser` and telling it what
@@ -1858,7 +1858,7 @@ and bundle it with the source of your extension.
.. seealso::
- https://svn.python.org/view/python/trunk/Objects/obmalloc.c
+ https://hg.python.org/cpython/file/default/Objects/obmalloc.c
For the full details of the pymalloc implementation, see the comments at
the top of the file :file:`Objects/obmalloc.c` in the Python source code.
The above link points to the file within the python.org SVN browser.
@@ -1949,7 +1949,7 @@ The RPM spec files, found in the :file:`Misc/RPM/` directory in the Python
source distribution, were updated for 2.3. (Contributed by Sean Reifschneider.)
Other new platforms now supported by Python include AtheOS
-(http://www.atheos.cx/), GNU/Hurd, and OpenVMS.
+(http://atheos.cx/), GNU/Hurd, and OpenVMS.
.. ======================================================================
@@ -1973,7 +1973,7 @@ Some of the more notable changes are:
the Python program as part of its execution.
* The :file:`regrtest.py` script now provides a way to allow "all resources
- except *foo*." A resource name passed to the :option:`-u` option can now be
+ except *foo*." A resource name passed to the :option:`!-u` option can now be
prefixed with a hyphen (``'-'``) to mean "remove this resource." For example,
the option '``-uall,-bsddb``' could be used to enable the use of all resources
except ``bsddb``.
diff --git a/Doc/whatsnew/2.4.rst b/Doc/whatsnew/2.4.rst
index 569e5e925f..fb4558b8d0 100644
--- a/Doc/whatsnew/2.4.rst
+++ b/Doc/whatsnew/2.4.rst
@@ -337,7 +337,7 @@ returned.
wrote patches implementing function decorators, but the one that was actually
checked in was patch #979728, written by Mark Russell.
- https://www.python.org/moin/PythonDecoratorLibrary
+ https://wiki.python.org/moin/PythonDecoratorLibrary
This Wiki page contains several examples of decorators.
.. ======================================================================
@@ -687,7 +687,7 @@ includes a quick-start tutorial and a reference.
The article uses Fortran code to illustrate many of the problems that floating-
point inaccuracy can cause.
- http://www2.hursley.ibm.com/decimal/
+ http://speleotrove.com/decimal/
A description of a decimal-based representation. This representation is being
proposed as a standard, and underlies the new Python decimal type. Much of this
material was written by Mike Cowlishaw, designer of the Rexx language.
@@ -756,7 +756,7 @@ API that perform ASCII-only conversions, ignoring the locale setting:
:c:type:`double` to an ASCII string.
The code for these functions came from the GLib library
-(http://library.gnome.org/devel/glib/stable/), whose developers kindly
+(https://developer.gnome.org/glib/stable/), whose developers kindly
relicensed the relevant functions and donated them to the Python Software
Foundation. The :mod:`locale` module can now change the numeric locale,
letting extensions such as GTK+ produce the correct results.
@@ -1481,10 +1481,10 @@ Some of the changes to Python's build process and to the C API are:
* Python can now be built with additional profiling for the interpreter itself,
intended as an aid to people developing the Python core. Providing
- :option:`----enable-profiling` to the :program:`configure` script will let you
+ :option:`--enable-profiling` to the :program:`configure` script will let you
profile the interpreter with :program:`gprof`, and providing the
- :option:`----with-tsc` switch enables profiling using the Pentium's Time-Stamp-
- Counter register. Note that the :option:`----with-tsc` switch is slightly
+ :option:`--with-tsc` switch enables profiling using the Pentium's Time-Stamp-
+ Counter register. Note that the :option:`--with-tsc` switch is slightly
misnamed, because the profiling feature also works on the PowerPC platform,
though that processor architecture doesn't call that register "the TSC
register". (Contributed by Jeremy Hylton.)
diff --git a/Doc/whatsnew/2.5.rst b/Doc/whatsnew/2.5.rst
index cb92e08d6f..093189e8ee 100644
--- a/Doc/whatsnew/2.5.rst
+++ b/Doc/whatsnew/2.5.rst
@@ -330,7 +330,7 @@ statement, only the ``from ... import`` form.
:pep:`328` - Imports: Multi-Line and Absolute/Relative
PEP written by Aahz; implemented by Thomas Wouters.
- http://codespeak.net/py/current/doc/index.html
+ https://pylib.readthedocs.org/
The py library by Holger Krekel, which contains the :mod:`py.std` package.
.. ======================================================================
@@ -547,7 +547,7 @@ exhausted.
Earlier versions of these features were proposed in :pep:`288` by Raymond
Hettinger and :pep:`325` by Samuele Pedroni.
- http://en.wikipedia.org/wiki/Coroutine
+ https://en.wikipedia.org/wiki/Coroutine
The Wikipedia entry for coroutines.
http://www.sidhe.org/~dan/blog/archives/000178.html
@@ -1095,7 +1095,7 @@ Here are all of the changes that Python 2.5 makes to the core Python language.
log all the paths searched. In Python 2.5, a new :exc:`ImportWarning` warning is
triggered when an import would have picked up a directory as a package but no
:file:`__init__.py` was found. This warning is silently ignored by default;
- provide the :option:`-Wd` option when running the Python executable to display
+ provide the :option:`-Wd <-W>` option when running the Python executable to display
the warning message. (Implemented by Thomas Wouters.)
* The list of base classes in a class definition can now be empty. As an
@@ -1126,7 +1126,7 @@ or ``exit()`` will now exit the interpreter as they expect. (Implemented by
Georg Brandl.)
The Python executable now accepts the standard long options :option:`--help`
-and :option:`--version`; on Windows, it also accepts the :option:`/?` option
+and :option:`--version`; on Windows, it also accepts the :option:`/? <-?>` option
for displaying a help message. (Implemented by Georg Brandl.)
.. ======================================================================
@@ -1528,7 +1528,7 @@ complete list of changes, or look through the SVN logs for all the details.
* The :mod:`socket` module now supports :const:`AF_NETLINK` sockets on Linux,
thanks to a patch from Philippe Biondi. Netlink sockets are a Linux-specific
mechanism for communications between a user-space process and kernel code; an
- introductory article about them is at http://www.linuxjournal.com/article/7356.
+ introductory article about them is at https://www.linuxjournal.com/article/7356.
In Python code, netlink addresses are represented as a tuple of 2 integers,
``(pid, group_mask)``.
@@ -1640,7 +1640,7 @@ complete list of changes, or look through the SVN logs for all the details.
* The :mod:`webbrowser` module received a number of enhancements. It's now
usable as a script with ``python -m webbrowser``, taking a URL as the argument;
there are a number of switches to control the behaviour (:option:`-n` for a new
- browser window, :option:`-t` for a new tab). New module-level functions,
+ browser window, :option:`!-t` for a new tab). New module-level functions,
:func:`open_new` and :func:`open_new_tab`, were added to support this. The
module's :func:`open` function supports an additional feature, an *autoraise*
parameter that signals whether to raise the open window when possible. A number
@@ -2013,7 +2013,7 @@ This example uses the iterator form::
>>>
For more information about the SQL dialect supported by SQLite, see
-http://www.sqlite.org.
+https://www.sqlite.org.
.. seealso::
@@ -2021,7 +2021,7 @@ http://www.sqlite.org.
http://www.pysqlite.org
The pysqlite web page.
- http://www.sqlite.org
+ https://www.sqlite.org
The SQLite web page; the documentation describes the syntax and the available
data types for the supported SQL dialect.
@@ -2088,7 +2088,7 @@ Changes to Python's build process and to the C API include:
provided the results of their examination of the Python source code. The
analysis found about 60 bugs that were quickly fixed. Many of the bugs were
refcounting problems, often occurring in error-handling code. See
- http://scan.coverity.com for the statistics.
+ https://scan.coverity.com for the statistics.
* The largest change to the C API came from :pep:`353`, which modifies the
interpreter to use a :c:type:`Py_ssize_t` type definition instead of
diff --git a/Doc/whatsnew/2.6.rst b/Doc/whatsnew/2.6.rst
index e763265269..4ab16563e8 100644
--- a/Doc/whatsnew/2.6.rst
+++ b/Doc/whatsnew/2.6.rst
@@ -153,10 +153,10 @@ The infrastructure committee of the Python Software Foundation
therefore posted a call for issue trackers, asking volunteers to set
up different products and import some of the bugs and patches from
SourceForge. Four different trackers were examined: `Jira
-<http://www.atlassian.com/software/jira/>`__,
-`Launchpad <http://www.launchpad.net>`__,
+<https://www.atlassian.com/software/jira/>`__,
+`Launchpad <https://launchpad.net/>`__,
`Roundup <http://roundup.sourceforge.net/>`__, and
-`Trac <http://trac.edgewall.org/>`__.
+`Trac <https://trac.edgewall.org/>`__.
The committee eventually settled on Jira
and Roundup as the two candidates. Jira is a commercial product that
offers no-cost hosted instances to free-software projects; Roundup
@@ -217,7 +217,7 @@ the time required to finish the job.
During the 2.6 development cycle, Georg Brandl put a lot of effort
into building a new toolchain for processing the documentation. The
resulting package is called Sphinx, and is available from
-http://sphinx.pocoo.org/.
+http://sphinx-doc.org/.
Sphinx concentrates on HTML output, producing attractively styled and
modern HTML; printed output is still supported through conversion to
@@ -1431,7 +1431,7 @@ one, :func:`math.trunc`, that's been backported to Python 2.6.
:pep:`3141` - A Type Hierarchy for Numbers
PEP written by Jeffrey Yasskin.
- `Scheme's numerical tower <http://www.gnu.org/software/guile/manual/html_node/Numerical-Tower.html#Numerical-Tower>`__, from the Guile manual.
+ `Scheme's numerical tower <https://www.gnu.org/software/guile/manual/html_node/Numerical-Tower.html#Numerical-Tower>`__, from the Guile manual.
`Scheme's number datatypes <http://schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-9.html#%_sec_6.2>`__ from the R5RS Scheme specification.
@@ -1796,7 +1796,7 @@ changes, or look through the Subversion logs for all the details.
* The :mod:`bsddb` module also has a new maintainer, Jesús Cea Avión, and the package
is now available as a standalone package. The web page for the package is
`www.jcea.es/programacion/pybsddb.htm
- <http://www.jcea.es/programacion/pybsddb.htm>`__.
+ <https://www.jcea.es/programacion/pybsddb.htm>`__.
The plan is to remove the package from the standard library
in Python 3.0, because its pace of releases is much more frequent than
Python's.
@@ -1926,7 +1926,7 @@ changes, or look through the Subversion logs for all the details.
the left to six places. (Contributed by Skip Montanaro; :issue:`1158`.)
* The :mod:`decimal` module was updated to version 1.66 of
- `the General Decimal Specification <http://www2.hursley.ibm.com/decimal/decarith.html>`__. New features
+ `the General Decimal Specification <http://speleotrove.com/decimal/decarith.html>`__. New features
include some methods for some basic mathematical functions such as
:meth:`exp` and :meth:`log10`::
@@ -2889,7 +2889,7 @@ Improved SSL Support
Bill Janssen made extensive improvements to Python 2.6's support for
the Secure Sockets Layer by adding a new module, :mod:`ssl`, that's
-built atop the `OpenSSL <http://www.openssl.org/>`__ library.
+built atop the `OpenSSL <https://www.openssl.org/>`__ library.
This new module provides more control over the protocol negotiated,
the X.509 certificates used, and has better support for writing SSL
servers (as opposed to clients) in Python. The existing SSL support
@@ -3154,7 +3154,7 @@ Port-Specific Changes: Mac OS X
:func:`macostools.touched` function to be removed because it depended on the
:mod:`macfs` module. (:issue:`1490190`)
-* Many other Mac OS modules have been deprecated and will removed in
+* Many other Mac OS modules have been deprecated and will be removed in
Python 3.0:
:mod:`_builtinSuites`,
:mod:`aepack`,
diff --git a/Doc/whatsnew/2.7.rst b/Doc/whatsnew/2.7.rst
index 3966cb4323..702aeb4c31 100644
--- a/Doc/whatsnew/2.7.rst
+++ b/Doc/whatsnew/2.7.rst
@@ -613,6 +613,9 @@ PEP 3137: The memoryview Object
The :class:`memoryview` object provides a view of another object's
memory content that matches the :class:`bytes` type's interface.
+.. doctest::
+ :options: +SKIP
+
>>> import string
>>> m = memoryview(string.letters)
>>> m
@@ -628,6 +631,9 @@ memory content that matches the :class:`bytes` type's interface.
The content of the view can be converted to a string of bytes or
a list of integers:
+.. doctest::
+ :options: +SKIP
+
>>> m2.tobytes()
'abcdefghijklmnopqrstuvwxyz'
>>> m2.tolist()
@@ -637,6 +643,9 @@ a list of integers:
:class:`memoryview` objects allow modifying the underlying object if
it's a mutable object.
+.. doctest::
+ :options: +SKIP
+
>>> m2[0] = 75
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
@@ -671,6 +680,9 @@ Some smaller changes made to the core Python language are:
``{}`` continues to represent an empty dictionary; use
``set()`` for an empty set.
+ .. doctest::
+ :options: +SKIP
+
>>> {1, 2, 3, 4, 5}
set([1, 2, 3, 4, 5])
>>> set() # empty set
@@ -684,6 +696,9 @@ Some smaller changes made to the core Python language are:
3.x, generalizing list/generator comprehensions to use
the literal syntax for sets and dictionaries.
+ .. doctest::
+ :options: +SKIP
+
>>> {x: x*x for x in range(6)}
{0: 0, 1: 1, 2: 4, 3: 9, 4: 16, 5: 25}
>>> {('a'*x) for x in range(6)}
@@ -1029,7 +1044,7 @@ changes, or look through the Subversion logs for all the details.
* Updated module: the :mod:`bsddb` module has been updated from 4.7.2devel9
to version 4.8.4 of
- `the pybsddb package <http://www.jcea.es/programacion/pybsddb.htm>`__.
+ `the pybsddb package <https://www.jcea.es/programacion/pybsddb.htm>`__.
The new version features better Python 3.x compatibility, various bug fixes,
and adds several new BerkeleyDB flags and methods.
(Updated by Jesús Cea Avión; :issue:`8156`. The pybsddb
@@ -1052,7 +1067,7 @@ changes, or look through the Subversion logs for all the details.
>>> for letter in 'here is a sample of english text':
... c[letter] += 1
...
- >>> c
+ >>> c # doctest: +SKIP
Counter({' ': 6, 'e': 5, 's': 3, 'a': 2, 'i': 2, 'h': 2,
'l': 2, 't': 2, 'g': 1, 'f': 1, 'm': 1, 'o': 1, 'n': 1,
'p': 1, 'r': 1, 'x': 1})
@@ -1157,7 +1172,7 @@ changes, or look through the Subversion logs for all the details.
* The :mod:`ctypes` module now always converts ``None`` to a C NULL
pointer for arguments declared as pointers. (Changed by Thomas
Heller; :issue:`4606`.) The underlying `libffi library
- <http://sourceware.org/libffi/>`__ has been updated to version
+ <https://sourceware.org/libffi/>`__ has been updated to version
3.0.9, containing various fixes for different platforms. (Updated
by Matthias Klose; :issue:`8142`.)
@@ -1513,7 +1528,7 @@ changes, or look through the Subversion logs for all the details.
(Contributed by Kristján Valur Jónsson; :issue:`6192` and :issue:`6267`.)
* Updated module: the :mod:`sqlite3` module has been updated to
- version 2.6.0 of the `pysqlite package <http://code.google.com/p/pysqlite/>`__. Version 2.6.0 includes a number of bugfixes, and adds
+ version 2.6.0 of the `pysqlite package <https://github.com/ghaering/pysqlite>`__. Version 2.6.0 includes a number of bugfixes, and adds
the ability to load SQLite extensions from shared libraries.
Call the ``enable_load_extension(True)`` method to enable extensions,
and then call :meth:`~sqlite3.Connection.load_extension` to load a particular shared library.
@@ -1530,7 +1545,7 @@ changes, or look through the Subversion logs for all the details.
*ciphers* argument that's a string listing the encryption algorithms
to be allowed; the format of the string is described
`in the OpenSSL documentation
- <http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT>`__.
+ <https://www.openssl.org/docs/apps/ciphers.html#CIPHER-LIST-FORMAT>`__.
(Added by Antoine Pitrou; :issue:`8322`.)
Another change makes the extension load all of OpenSSL's ciphers and
@@ -1638,12 +1653,18 @@ changes, or look through the Subversion logs for all the details.
worked around the old behaviour. For example, Python 2.6.4 or 2.5
will return the following:
+ .. doctest::
+ :options: +SKIP
+
>>> import urlparse
>>> urlparse.urlsplit('invented://host/filename?query')
('invented', '', '//host/filename?query', '', '')
Python 2.7 (and Python 2.6.5) will return:
+ .. doctest::
+ :options: +SKIP
+
>>> import urlparse
>>> urlparse.urlsplit('invented://host/filename?query')
('invented', 'host', '/filename?query', '', '')
@@ -1652,7 +1673,10 @@ changes, or look through the Subversion logs for all the details.
returns a named tuple instead of a standard tuple.)
The :mod:`urlparse` module also supports IPv6 literal addresses as defined by
- :rfc:`2732` (contributed by Senthil Kumaran; :issue:`2987`). ::
+ :rfc:`2732` (contributed by Senthil Kumaran; :issue:`2987`).
+
+ .. doctest::
+ :options: +SKIP
>>> urlparse.urlparse('http://[1080::8:800:200C:417A]/foo')
ParseResult(scheme='http', netloc='[1080::8:800:200C:417A]',
@@ -1783,7 +1807,7 @@ on being added to Tcl/Tck release 8.5.
To learn more, read the :mod:`ttk` module documentation. You may also
wish to read the Tcl/Tk manual page describing the
Ttk theme engine, available at
-http://www.tcl.tk/man/tcl8.5/TkCmd/ttk_intro.htm. Some
+https://www.tcl.tk/man/tcl8.5/TkCmd/ttk_intro.htm. Some
screenshots of the Python/Ttk code in use are at
http://code.google.com/p/python-ttk/wiki/Screenshots.
@@ -1820,12 +1844,12 @@ Consult the :mod:`unittest` module documentation for more details.
The :func:`~unittest.main` function supports some other new options:
-* :option:`-b` or :option:`--buffer` will buffer the standard output
+* :option:`-b <unittest -b>` or :option:`--buffer` will buffer the standard output
and standard error streams during each test. If the test passes,
any resulting output will be discarded; on failure, the buffered
output will be displayed.
-* :option:`-c` or :option:`--catch` will cause the control-C interrupt
+* :option:`-c <unittest -c>` or :option:`--catch` will cause the control-C interrupt
to be handled more gracefully. Instead of interrupting the test
process immediately, the currently running test will be completed
and then the partial results up to the interruption will be reported.
@@ -1839,7 +1863,7 @@ The :func:`~unittest.main` function supports some other new options:
:func:`~unittest.removeHandler` decorator that can be used to mark tests that
should have the control-C handling disabled.
-* :option:`-f` or :option:`--failfast` makes
+* :option:`-f <unittest -f>` or :option:`--failfast` makes
test execution stop immediately when a test fails instead of
continuing to execute further tests. (Suggested by Cliff Dyer and
implemented by Michael Foord; :issue:`8074`.)
@@ -2079,7 +2103,7 @@ Changes to Python's build process and to the C API include:
* The latest release of the GNU Debugger, GDB 7, can be `scripted
using Python
- <http://sourceware.org/gdb/current/onlinedocs/gdb/Python.html>`__.
+ <https://sourceware.org/gdb/current/onlinedocs/gdb/Python.html>`__.
When you begin debugging an executable program P, GDB will look for
a file named ``P-gdb.py`` and automatically read it. Dave Malcolm
contributed a :file:`python-gdb.py` that adds a number of
@@ -2149,7 +2173,7 @@ Changes to Python's build process and to the C API include:
with *updatepath* set to false.
Security issue reported as `CVE-2008-5983
- <http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983>`_;
+ <https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983>`_;
discussed in :issue:`5753`, and fixed by Antoine Pitrou.
* New macros: the Python header files now define the following macros:
@@ -2381,7 +2405,7 @@ Other Changes and Fixes
takes an integer specifying how many tests run in parallel. This
allows reducing the total runtime on multi-core machines.
This option is compatible with several other options, including the
- :option:`-R` switch which is known to produce long runtimes.
+ :option:`!-R` switch which is known to produce long runtimes.
(Added by Antoine Pitrou, :issue:`6152`.) This can also be used
with a new :option:`-F` switch that runs selected tests in a loop
until they fail. (Added by Antoine Pitrou; :issue:`7312`.)
@@ -2475,12 +2499,18 @@ In the standard library:
worked around the old behaviour. For example, Python 2.6.4 or 2.5
will return the following:
+ .. doctest::
+ :options: +SKIP
+
>>> import urlparse
>>> urlparse.urlsplit('invented://host/filename?query')
('invented', '', '//host/filename?query', '', '')
Python 2.7 (and Python 2.6.5) will return:
+ .. doctest::
+ :options: +SKIP
+
>>> import urlparse
>>> urlparse.urlsplit('invented://host/filename?query')
('invented', 'host', '/filename?query', '', '')
diff --git a/Doc/whatsnew/3.0.rst b/Doc/whatsnew/3.0.rst
index 99411305a5..044d7beea6 100644
--- a/Doc/whatsnew/3.0.rst
+++ b/Doc/whatsnew/3.0.rst
@@ -204,11 +204,11 @@ Python 3.0 has simplified the rules for ordering comparisons:
Integers
--------
-* :pep:`0237`: Essentially, :class:`long` renamed to :class:`int`.
+* :pep:`237`: Essentially, :class:`long` renamed to :class:`int`.
That is, there is only one built-in integral type, named
:class:`int`; but it behaves mostly like the old :class:`long` type.
-* :pep:`0238`: An expression like ``1/2`` returns a float. Use
+* :pep:`238`: An expression like ``1/2`` returns a float. Use
``1//2`` to get the truncating behavior. (The latter syntax has
existed for years, at least since Python 2.2.)
@@ -384,7 +384,7 @@ New Syntax
* Dictionary comprehensions: ``{k: v for k, v in stuff}`` means the
same thing as ``dict(stuff)`` but is more flexible. (This is
- :pep:`0274` vindicated. :-)
+ :pep:`274` vindicated. :-)
* Set literals, e.g. ``{1, 2}``. Note that ``{}`` is an empty
dictionary; use ``set()`` for an empty set. Set comprehensions are
@@ -469,7 +469,7 @@ Removed Syntax
* The only acceptable syntax for relative imports is :samp:`from .[{module}]
import {name}`. All :keyword:`import` forms not starting with ``.`` are
- interpreted as absolute imports. (:pep:`0328`)
+ interpreted as absolute imports. (:pep:`328`)
* Classic classes are gone.
@@ -555,9 +555,9 @@ review:
* Many old modules were removed. Some, like :mod:`gopherlib` (no
longer used) and :mod:`md5` (replaced by :mod:`hashlib`), were
- already deprecated by :pep:`0004`. Others were removed as a result
+ already deprecated by :pep:`4`. Others were removed as a result
of the removal of support for various platforms such as Irix, BeOS
- and Mac OS 9 (see :pep:`0011`). Some modules were also selected for
+ and Mac OS 9 (see :pep:`11`). Some modules were also selected for
removal in Python 3.0 due to lack of use or because a better
replacement exists. See :pep:`3108` for an exhaustive list.
@@ -565,10 +565,10 @@ review:
core standard library has proved over time to be a particular burden
for the core developers due to testing instability and Berkeley DB's
release schedule. However, the package is alive and well,
- externally maintained at http://www.jcea.es/programacion/pybsddb.htm.
+ externally maintained at https://www.jcea.es/programacion/pybsddb.htm.
* Some modules were renamed because their old name disobeyed
- :pep:`0008`, or for various other reasons. Here's the list:
+ :pep:`8`, or for various other reasons. Here's the list:
======================= =======================
Old Name New Name
@@ -685,7 +685,7 @@ Changes To Exceptions
The APIs for raising and catching exception have been cleaned up and
new powerful features added:
-* :pep:`0352`: All exceptions must be derived (directly or indirectly)
+* :pep:`352`: All exceptions must be derived (directly or indirectly)
from :exc:`BaseException`. This is the root of the exception
hierarchy. This is not new as a recommendation, but the
*requirement* to inherit from :exc:`BaseException` is new. (Python
diff --git a/Doc/whatsnew/3.2.rst b/Doc/whatsnew/3.2.rst
index 582250450d..baaf797e31 100644
--- a/Doc/whatsnew/3.2.rst
+++ b/Doc/whatsnew/3.2.rst
@@ -116,7 +116,7 @@ or more positional arguments is present, and making a required option::
Example of calling the parser on a command string::
- >>> cmd = 'deploy sneezy.example.com sleepy.example.com -u skycaptain'
+ >>> cmd = 'deploy sneezy.example.com sleepy.example.com -u skycaptain'
>>> result = parser.parse_args(cmd.split())
>>> result.action
'deploy'
@@ -212,7 +212,8 @@ loaded and called with code like this::
>>> import json, logging.config
>>> with open('conf.json') as f:
- conf = json.load(f)
+ ... conf = json.load(f)
+ ...
>>> logging.config.dictConfig(conf)
>>> logging.info("Transaction completed normally")
INFO : root : Transaction completed normally
@@ -460,15 +461,15 @@ Some smaller changes made to the core Python language are:
'The testing project status is green as of February 15, 2011'
>>> class LowerCasedDict(dict):
- def __getitem__(self, key):
- return dict.__getitem__(self, key.lower())
+ ... def __getitem__(self, key):
+ ... return dict.__getitem__(self, key.lower())
>>> lcd = LowerCasedDict(part='widgets', quantity=10)
>>> 'There are {QUANTITY} {Part} in stock'.format_map(lcd)
'There are 10 widgets in stock'
>>> class PlaceholderDict(dict):
- def __missing__(self, key):
- return '<{}>'.format(key)
+ ... def __missing__(self, key):
+ ... return '<{}>'.format(key)
>>> 'Hello {name}, welcome to {location}'.format_map(PlaceholderDict())
'Hello <name>, welcome to <location>'
@@ -496,10 +497,10 @@ Some smaller changes made to the core Python language are:
exceptions pass through::
>>> class A:
- @property
- def f(self):
- return 1 // 0
-
+ ... @property
+ ... def f(self):
+ ... return 1 // 0
+ ...
>>> a = A()
>>> hasattr(a, 'f')
Traceback (most recent call last):
@@ -537,7 +538,7 @@ Some smaller changes made to the core Python language are:
def outer(x):
def inner():
- return x
+ return x
inner()
del x
@@ -547,12 +548,12 @@ Some smaller changes made to the core Python language are:
def f():
def print_error():
- print(e)
+ print(e)
try:
- something
+ something
except Exception as e:
- print_error()
- # implicit "del e" here
+ print_error()
+ # implicit "del e" here
(See :issue:`4617`.)
@@ -769,8 +770,8 @@ functools
(Contributed by Raymond Hettinger and incorporating design ideas from Jim
Baker, Miki Tebeka, and Nick Coghlan; see `recipe 498245
- <http://code.activestate.com/recipes/498245>`_\, `recipe 577479
- <http://code.activestate.com/recipes/577479>`_\, :issue:`10586`, and
+ <https://code.activestate.com/recipes/498245>`_\, `recipe 577479
+ <https://code.activestate.com/recipes/577479>`_\, :issue:`10586`, and
:issue:`10593`.)
* The :func:`functools.wraps` decorator now adds a :attr:`__wrapped__` attribute
@@ -799,6 +800,7 @@ functools
def __eq__(self, other):
return ((self.lastname.lower(), self.firstname.lower()) ==
(other.lastname.lower(), other.firstname.lower()))
+
def __lt__(self, other):
return ((self.lastname.lower(), self.firstname.lower()) <
(other.lastname.lower(), other.firstname.lower()))
@@ -845,9 +847,9 @@ collections
* The :class:`collections.Counter` class now has two forms of in-place
subtraction, the existing *-=* operator for `saturating subtraction
- <http://en.wikipedia.org/wiki/Saturation_arithmetic>`_ and the new
+ <https://en.wikipedia.org/wiki/Saturation_arithmetic>`_ and the new
:meth:`~collections.Counter.subtract` method for regular subtraction. The
- former is suitable for `multisets <http://en.wikipedia.org/wiki/Multiset>`_
+ former is suitable for `multisets <https://en.wikipedia.org/wiki/Multiset>`_
which only have positive counts, and the latter is more suitable for use cases
that allow negative counts:
@@ -906,7 +908,7 @@ with multiple preconditions does not run until all of the predecessor tasks are
complete.
Barriers can work with an arbitrary number of threads. This is a generalization
-of a `Rendezvous <http://en.wikipedia.org/wiki/Synchronous_rendezvous>`_ which
+of a `Rendezvous <https://en.wikipedia.org/wiki/Synchronous_rendezvous>`_ which
is defined for only two threads.
Implemented as a two-phase cyclic barrier, :class:`~threading.Barrier` objects
@@ -942,7 +944,7 @@ released and a :exc:`~threading.BrokenBarrierError` exception is raised::
def get_votes(site):
ballots = conduct_election(site)
try:
- all_polls_closed.wait(timeout = midnight - time.now())
+ all_polls_closed.wait(timeout=midnight - time.now())
except BrokenBarrierError:
lockbox = seal_ballots(ballots)
queue.put(lockbox)
@@ -955,7 +957,7 @@ sites do not finish before midnight, the barrier times-out and the ballots are
sealed and deposited in a queue for later handling.
See `Barrier Synchronization Patterns
-<http://parlab.eecs.berkeley.edu/wiki/_media/patterns/paraplop_g1_3.pdf>`_ for
+<https://parlab.eecs.berkeley.edu/wiki/_media/patterns/paraplop_g1_3.pdf>`_ for
more examples of how barriers can be used in parallel computing. Also, there is
a simple but thorough explanation of barriers in `The Little Book of Semaphores
<http://greenteapress.com/semaphores/downey08semaphores.pdf>`_, *section 3.6*.
@@ -1043,7 +1045,7 @@ of nearly equal quantities:
0.013765762467652909
The :func:`~math.erf` function computes a probability integral or `Gaussian
-error function <http://en.wikipedia.org/wiki/Error_function>`_. The
+error function <https://en.wikipedia.org/wiki/Error_function>`_. The
complementary error function, :func:`~math.erfc`, is ``1 - erf(x)``:
>>> erf(1.0/sqrt(2.0)) # portion of normal distribution within 1 standard deviation
@@ -1054,7 +1056,7 @@ complementary error function, :func:`~math.erfc`, is ``1 - erf(x)``:
1.0
The :func:`~math.gamma` function is a continuous extension of the factorial
-function. See http://en.wikipedia.org/wiki/Gamma_function for details. Because
+function. See https://en.wikipedia.org/wiki/Gamma_function for details. Because
the function is related to factorials, it grows large even for small values of
*x*, so there is also a :func:`~math.lgamma` function for computing the natural
logarithm of the gamma function:
@@ -1097,16 +1099,16 @@ for slice notation are well-suited to in-place editing::
>>> REC_LEN, LOC_START, LOC_LEN = 34, 7, 11
>>> def change_location(buffer, record_number, location):
- start = record_number * REC_LEN + LOC_START
- buffer[start: start+LOC_LEN] = location
+ ... start = record_number * REC_LEN + LOC_START
+ ... buffer[start: start+LOC_LEN] = location
>>> import io
>>> byte_stream = io.BytesIO(
- b'G3805 storeroom Main chassis '
- b'X7899 shipping Reserve cog '
- b'L6988 receiving Primary sprocket'
- )
+ ... b'G3805 storeroom Main chassis '
+ ... b'X7899 shipping Reserve cog '
+ ... b'L6988 receiving Primary sprocket'
+ ... )
>>> buffer = byte_stream.getbuffer()
>>> change_location(buffer, 1, b'warehouse ')
>>> change_location(buffer, 0, b'showroom ')
@@ -1131,10 +1133,10 @@ decorator, :func:`~reprlib.recursive_repr`, for detecting recursive calls to
:meth:`__repr__` and substituting a placeholder string instead::
>>> class MyList(list):
- @recursive_repr()
- def __repr__(self):
- return '<' + '|'.join(map(repr, self)) + '>'
-
+ ... @recursive_repr()
+ ... def __repr__(self):
+ ... return '<' + '|'.join(map(repr, self)) + '>'
+ ...
>>> m = MyList('abc')
>>> m.append(m)
>>> m.append('x')
@@ -1197,8 +1199,8 @@ the field names::
>>> w.writeheader()
"name","dept"
>>> w.writerows([
- {'name': 'tom', 'dept': 'accounting'},
- {'name': 'susan', 'dept': 'Salesl'}])
+ ... {'name': 'tom', 'dept': 'accounting'},
+ ... {'name': 'susan', 'dept': 'Salesl'}])
"tom","accounting"
"susan","sales"
@@ -1423,14 +1425,14 @@ function can return *None*::
>>> import tarfile, glob
>>> def myfilter(tarinfo):
- if tarinfo.isfile(): # only save real files
- tarinfo.uname = 'monty' # redact the user name
- return tarinfo
+ ... if tarinfo.isfile(): # only save real files
+ ... tarinfo.uname = 'monty' # redact the user name
+ ... return tarinfo
>>> with tarfile.open(name='myarchive.tar.gz', mode='w:gz') as tf:
- for filename in glob.glob('*.txt'):
- tf.add(filename, filter=myfilter)
- tf.list()
+ ... for filename in glob.glob('*.txt'):
+ ... tf.add(filename, filter=myfilter)
+ ... tf.list()
-rw-r--r-- monty/501 902 2011-01-26 17:59:11 annotations.txt
-rw-r--r-- monty/501 123 2011-01-26 17:59:11 general_questions.txt
-rw-r--r-- monty/501 3514 2011-01-26 17:59:11 prion.txt
@@ -1536,26 +1538,26 @@ step is non-destructive (the original files are left unchanged).
>>> import shutil, pprint
- >>> os.chdir('mydata') # change to the source directory
+ >>> os.chdir('mydata') # change to the source directory
>>> f = shutil.make_archive('/var/backup/mydata',
- 'zip') # archive the current directory
- >>> f # show the name of archive
+ ... 'zip') # archive the current directory
+ >>> f # show the name of archive
'/var/backup/mydata.zip'
- >>> os.chdir('tmp') # change to an unpacking
+ >>> os.chdir('tmp') # change to an unpacking
>>> shutil.unpack_archive('/var/backup/mydata.zip') # recover the data
- >>> pprint.pprint(shutil.get_archive_formats()) # display known formats
+ >>> pprint.pprint(shutil.get_archive_formats()) # display known formats
[('bztar', "bzip2'ed tar-file"),
('gztar', "gzip'ed tar-file"),
('tar', 'uncompressed tar file'),
('zip', 'ZIP file')]
- >>> shutil.register_archive_format( # register a new archive format
- name = 'xz',
- function = xz.compress, # callable archiving function
- extra_args = [('level', 8)], # arguments to the function
- description = 'xz compression'
- )
+ >>> shutil.register_archive_format( # register a new archive format
+ ... name='xz',
+ ... function=xz.compress, # callable archiving function
+ ... extra_args=[('level', 8)], # arguments to the function
+ ... description='xz compression'
+ ... )
(Contributed by Tarek Ziadé.)
@@ -1618,7 +1620,7 @@ for secure (encrypted, authenticated) internet connections:
* The :func:`ssl.wrap_socket` constructor function now takes a *ciphers*
argument. The *ciphers* string lists the allowed encryption algorithms using
the format described in the `OpenSSL documentation
- <http://www.openssl.org/docs/apps/ciphers.html#CIPHER_LIST_FORMAT>`__.
+ <https://www.openssl.org/docs/apps/ciphers.html#CIPHER-LIST-FORMAT>`__.
* When linked against recent versions of OpenSSL, the :mod:`ssl` module now
supports the Server Name Indication extension to the TLS protocol, allowing
@@ -1854,7 +1856,7 @@ inspect
>>> from inspect import getgeneratorstate
>>> def gen():
- yield 'demo'
+ ... yield 'demo'
>>> g = gen()
>>> getgeneratorstate(g)
'GEN_CREATED'
@@ -1874,11 +1876,11 @@ inspect
change state while it is searching::
>>> class A:
- @property
- def f(self):
- print('Running')
- return 10
-
+ ... @property
+ ... def f(self):
+ ... print('Running')
+ ... return 10
+ ...
>>> a = A()
>>> getattr(a, 'f')
Running
@@ -2102,19 +2104,19 @@ Config parsers gained a new API based on the mapping protocol::
>>> parser = ConfigParser()
>>> parser.read_string("""
- [DEFAULT]
- location = upper left
- visible = yes
- editable = no
- color = blue
-
- [main]
- title = Main Menu
- color = green
-
- [options]
- title = Options
- """)
+ ... [DEFAULT]
+ ... location = upper left
+ ... visible = yes
+ ... editable = no
+ ... color = blue
+ ...
+ ... [main]
+ ... title = Main Menu
+ ... color = green
+ ...
+ ... [options]
+ ... title = Options
+ ... """)
>>> parser['main']['color']
'green'
>>> parser['main']['editable']
@@ -2138,24 +2140,24 @@ handler :class:`~configparser.ExtendedInterpolation`::
>>> parser = ConfigParser(interpolation=ExtendedInterpolation())
>>> parser.read_dict({'buildout': {'directory': '/home/ambv/zope9'},
- 'custom': {'prefix': '/usr/local'}})
+ ... 'custom': {'prefix': '/usr/local'}})
>>> parser.read_string("""
- [buildout]
- parts =
- zope9
- instance
- find-links =
- ${buildout:directory}/downloads/dist
-
- [zope9]
- recipe = plone.recipe.zope9install
- location = /opt/zope
-
- [instance]
- recipe = plone.recipe.zope9instance
- zope9-location = ${zope9:location}
- zope-conf = ${custom:prefix}/etc/zope.conf
- """)
+ ... [buildout]
+ ... parts =
+ ... zope9
+ ... instance
+ ... find-links =
+ ... ${buildout:directory}/downloads/dist
+ ...
+ ... [zope9]
+ ... recipe = plone.recipe.zope9install
+ ... location = /opt/zope
+ ...
+ ... [instance]
+ ... recipe = plone.recipe.zope9instance
+ ... zope9-location = ${zope9:location}
+ ... zope-conf = ${custom:prefix}/etc/zope.conf
+ ... """)
>>> parser['buildout']['find-links']
'\n/home/ambv/zope9/downloads/dist'
>>> parser['instance']['zope-conf']
@@ -2180,7 +2182,7 @@ urllib.parse
A number of usability improvements were made for the :mod:`urllib.parse` module.
The :func:`~urllib.parse.urlparse` function now supports `IPv6
-<http://en.wikipedia.org/wiki/IPv6>`_ addresses as described in :rfc:`2732`:
+<https://en.wikipedia.org/wiki/IPv6>`_ addresses as described in :rfc:`2732`:
>>> import urllib.parse
>>> urllib.parse.urlparse('http://[dead:beef:cafe:5417:affe:8FA3:deaf:feed]/foo/')
@@ -2207,9 +2209,9 @@ string, then the *safe*, *encoding*, and *error* parameters are sent to
:func:`~urllib.parse.quote_plus` for encoding::
>>> urllib.parse.urlencode([
- ('type', 'telenovela'),
- ('name', '¿Dónde Está Elisa?')],
- encoding='latin-1')
+ ... ('type', 'telenovela'),
+ ... ('name', '¿Dónde Está Elisa?')],
+ ... encoding='latin-1')
'type=telenovela&name=%BFD%F3nde+Est%E1+Elisa%3F'
As detailed in :ref:`parsing-ascii-encoded-bytes`, all the :mod:`urllib.parse`
@@ -2328,7 +2330,7 @@ A number of small performance enhancements have been added:
(Contributed by Alexandre Vassalotti, Antoine Pitrou
and the Unladen Swallow team in :issue:`9410` and :issue:`3873`.)
-* The `Timsort algorithm <http://en.wikipedia.org/wiki/Timsort>`_ used in
+* The `Timsort algorithm <https://en.wikipedia.org/wiki/Timsort>`_ used in
:meth:`list.sort` and :func:`sorted` now runs faster and uses less memory
when called with a :term:`key function`. Previously, every element of
a list was wrapped with a temporary object that remembered the key value
@@ -2380,7 +2382,7 @@ Unicode
Python has been updated to `Unicode 6.0.0
<http://unicode.org/versions/Unicode6.0.0/>`_. The update to the standard adds
-over 2,000 new characters including `emoji <http://en.wikipedia.org/wiki/Emoji>`_
+over 2,000 new characters including `emoji <https://en.wikipedia.org/wiki/Emoji>`_
symbols which are important for mobile phones.
In addition, the updated standard has altered the character properties for two
@@ -2432,7 +2434,7 @@ The documentation continues to be improved.
**Source code** :source:`Lib/functools.py`.
(Contributed by Raymond Hettinger; see
- `rationale <http://rhettinger.wordpress.com/2011/01/28/open-your-source-more/>`_.)
+ `rationale <https://rhettinger.wordpress.com/2011/01/28/open-your-source-more/>`_.)
* The docs now contain more examples and recipes. In particular, :mod:`re`
module has an extensive section, :ref:`re-examples`. Likewise, the
@@ -2468,7 +2470,7 @@ Code Repository
===============
In addition to the existing Subversion code repository at http://svn.python.org
-there is now a `Mercurial <http://mercurial.selenic.com/>`_ repository at
+there is now a `Mercurial <https://www.mercurial-scm.org/>`_ repository at
https://hg.python.org/\ .
After the 3.2 release, there are plans to switch to Mercurial as the primary
@@ -2478,7 +2480,7 @@ members of the community to create and share external changesets. See
To learn to use the new version control system, see the `tutorial by Joel
Spolsky <http://hginit.com>`_ or the `Guide to Mercurial Workflows
-<http://mercurial.selenic.com/guide>`_.
+<https://www.mercurial-scm.org/guide>`_.
Build and C API Changes
@@ -2559,7 +2561,7 @@ Also, there were a number of updates to the Mac OS X build, see
:source:`Mac/BuildScript/README.txt` for details. For users running a 32/64-bit
build, there is a known problem with the default Tcl/Tk on Mac OS X 10.6.
Accordingly, we recommend installing an updated alternative such as
-`ActiveState Tcl/Tk 8.5.9 <http://www.activestate.com/activetcl/downloads>`_\.
+`ActiveState Tcl/Tk 8.5.9 <https://www.activestate.com/activetcl/downloads>`_\.
See https://www.python.org/download/mac/tcltk/ for additional details.
Porting to Python 3.2
diff --git a/Doc/whatsnew/3.3.rst b/Doc/whatsnew/3.3.rst
index 094eff87db..2096b0b634 100644
--- a/Doc/whatsnew/3.3.rst
+++ b/Doc/whatsnew/3.3.rst
@@ -440,15 +440,15 @@ return a final value to the outer generator::
...
>>> tallies = []
>>> acc = gather_tallies(tallies)
- >>> next(acc) # Ensure the accumulator is ready to accept values
+ >>> next(acc) # Ensure the accumulator is ready to accept values
>>> for i in range(4):
... acc.send(i)
...
- >>> acc.send(None) # Finish the first tally
+ >>> acc.send(None) # Finish the first tally
>>> for i in range(5):
... acc.send(i)
...
- >>> acc.send(None) # Finish the second tally
+ >>> acc.send(None) # Finish the second tally
>>> tallies
[6, 10]
@@ -1528,7 +1528,7 @@ by Petri Lehtinen in :issue:`12021`.)
multiprocessing
---------------
-The new :func:`multiprocessing.connection.wait` function allows to poll
+The new :func:`multiprocessing.connection.wait` function allows polling
multiple objects (such as connections, sockets and pipes) with a timeout.
(Contributed by Richard Oudkerk in :issue:`12328`.)
@@ -1715,8 +1715,8 @@ pickle
------
:class:`pickle.Pickler` objects now have an optional
-:attr:`~pickle.Pickler.dispatch_table` attribute allowing to set per-pickler
-reduction functions.
+:attr:`~pickle.Pickler.dispatch_table` attribute allowing per-pickler
+reduction functions to be set.
(Contributed by Richard Oudkerk in :issue:`14166`.)
@@ -1884,13 +1884,13 @@ socket
Heiko Wundram)
* The :class:`~socket.socket` class now supports the PF_CAN protocol family
- (http://en.wikipedia.org/wiki/Socketcan), on Linux
- (http://lwn.net/Articles/253425).
+ (https://en.wikipedia.org/wiki/Socketcan), on Linux
+ (https://lwn.net/Articles/253425).
(Contributed by Matthias Fuchs, updated by Tiago Gonçalves in :issue:`10141`.)
* The :class:`~socket.socket` class now supports the PF_RDS protocol family
- (http://en.wikipedia.org/wiki/Reliable_Datagram_Sockets and
+ (https://en.wikipedia.org/wiki/Reliable_Datagram_Sockets and
https://oss.oracle.com/projects/rds/).
* The :class:`~socket.socket` class now supports the ``PF_SYSTEM`` protocol
diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst
index 7d9bc0d8af..1e5c9d1fbd 100644
--- a/Doc/whatsnew/3.4.rst
+++ b/Doc/whatsnew/3.4.rst
@@ -144,7 +144,7 @@ Security improvements:
all of the parent's inheritable handles, only the necessary ones.
* A new :func:`hashlib.pbkdf2_hmac` function provides
the `PKCS#5 password-based key derivation function 2
- <http://en.wikipedia.org/wiki/PBKDF2>`_.
+ <https://en.wikipedia.org/wiki/PBKDF2>`_.
* :ref:`TLSv1.1 and TLSv1.2 support <whatsnew-tls-11-12>` for :mod:`ssl`.
* :ref:`Retrieving certificates from the Windows system cert store support
<whatsnew34-win-cert-store>` for :mod:`ssl`.
@@ -746,7 +746,7 @@ optional *current_offset*), and the resulting object can be iterated to produce
method, equivalent to calling :mod:`~dis.dis` on the constructor argument, but
returned as a multi-line string::
- >>> bytecode = dis.Bytecode(lambda x: x +1, current_offset=3)
+ >>> bytecode = dis.Bytecode(lambda x: x + 1, current_offset=3)
>>> for instr in bytecode:
... print('{} ({})'.format(instr.opname, instr.opcode))
LOAD_FAST (124)
@@ -902,7 +902,7 @@ hashlib
A new :func:`hashlib.pbkdf2_hmac` function provides
the `PKCS#5 password-based key derivation function 2
-<http://en.wikipedia.org/wiki/PBKDF2>`_. (Contributed by Christian
+<https://en.wikipedia.org/wiki/PBKDF2>`_. (Contributed by Christian
Heimes in :issue:`18582`.)
The :attr:`~hashlib.hash.name` attribute of :mod:`hashlib` hash objects is now
@@ -1322,7 +1322,7 @@ kernel version of 2.6.36 or later and glibc of 2.13 or later, provides the
ability to query or set the resource limits for processes other than the one
making the call. (Contributed by Christian Heimes in :issue:`16595`.)
-On Linux kernel version 2.6.36 or later, there are there are also some new
+On Linux kernel version 2.6.36 or later, there are also some new
Linux specific constants: :attr:`~resource.RLIMIT_MSGQUEUE`,
:attr:`~resource.RLIMIT_NICE`, :attr:`~resource.RLIMIT_RTPRIO`,
:attr:`~resource.RLIMIT_RTTIME`, and :attr:`~resource.RLIMIT_SIGPENDING`.
@@ -1410,7 +1410,7 @@ sqlite3
A new boolean parameter to the :func:`~sqlite3.connect` function, *uri*, can be
used to indicate that the *database* parameter is a ``uri`` (see the `SQLite
-URI documentation <http://www.sqlite.org/uri.html>`_). (Contributed by poq in
+URI documentation <https://www.sqlite.org/uri.html>`_). (Contributed by poq in
:issue:`13773`.)
@@ -1457,7 +1457,7 @@ s), as well as a :meth:`~ssl.SSLContext.get_ca_certs` method that returns a
list of the loaded ``CA`` certificates. (Contributed by Christian Heimes in
:issue:`18147`.)
-If OpenSSL 0.9.8 or later is available, :class:`~ssl.SSLContext` has an new
+If OpenSSL 0.9.8 or later is available, :class:`~ssl.SSLContext` has a new
attribute :attr:`~ssl.SSLContext.verify_flags` that can be used to control the
certificate verification process by setting it to some combination of the new
constants :data:`~ssl.VERIFY_DEFAULT`, :data:`~ssl.VERIFY_CRL_CHECK_LEAF`,
@@ -1917,8 +1917,8 @@ Other Build and C API Changes
:issue:`18596`.)
* The Windows build now uses `Address Space Layout Randomization
- <http://en.wikipedia.org/wiki/ASLR>`_ and `Data Execution Prevention
- <http://en.wikipedia.org/wiki/Data_Execution_Prevention>`_. (Contributed by
+ <https://en.wikipedia.org/wiki/Address_space_layout_randomization>`_ and `Data Execution Prevention
+ <https://en.wikipedia.org/wiki/Data_Execution_Prevention>`_. (Contributed by
Christian Heimes in :issue:`16632`.)
* New function :c:func:`PyObject_LengthHint` is the C API equivalent
diff --git a/Doc/whatsnew/3.5.rst b/Doc/whatsnew/3.5.rst
new file mode 100644
index 0000000000..2d7f8a4266
--- /dev/null
+++ b/Doc/whatsnew/3.5.rst
@@ -0,0 +1,2535 @@
+****************************
+ What's New In Python 3.5
+****************************
+
+:Editors: Elvis Pranskevichus <elvis@magic.io>, Yury Selivanov <yury@magic.io>
+
+.. Rules for maintenance:
+
+ * Anyone can add text to this document. Do not spend very much time
+ on the wording of your changes, because your text will probably
+ get rewritten to some degree.
+
+ * The maintainer will go through Misc/NEWS periodically and add
+ changes; it's therefore more important to add your changes to
+ Misc/NEWS than to this file.
+
+ * This is not a complete list of every single change; completeness
+ is the purpose of Misc/NEWS. Some changes I consider too small
+ or esoteric to include. If such a change is added to the text,
+ I'll just remove it. (This is another reason you shouldn't spend
+ too much time on writing your addition.)
+
+ * If you want to draw your new text to the attention of the
+ maintainer, add 'XXX' to the beginning of the paragraph or
+ section.
+
+ * It's OK to just add a fragmentary note about a change. For
+ example: "XXX Describe the transmogrify() function added to the
+ socket module." The maintainer will research the change and
+ write the necessary text.
+
+ * You can comment out your additions if you like, but it's not
+ necessary (especially when a final release is some months away).
+
+ * Credit the author of a patch or bugfix. Just the name is
+ sufficient; the e-mail address isn't necessary.
+
+ * It's helpful to add the bug/patch number as a comment:
+
+ XXX Describe the transmogrify() function added to the socket
+ module.
+ (Contributed by P.Y. Developer in :issue:`12345`.)
+
+ This saves the maintainer the effort of going through the Mercurial log
+ when researching a change.
+
+This article explains the new features in Python 3.5, compared to 3.4.
+Python 3.5 was released on September 13, 2015.  See the
+`changelog <https://docs.python.org/3.5/whatsnew/changelog.html>`_ for a full
+list of changes.
+
+.. seealso::
+
+ :pep:`478` - Python 3.5 Release Schedule
+
+
+Summary -- Release highlights
+=============================
+
+New syntax features:
+
+* :ref:`PEP 492 <whatsnew-pep-492>`, coroutines with async and await syntax.
+* :ref:`PEP 465 <whatsnew-pep-465>`, a new matrix multiplication operator: ``a @ b``.
+* :ref:`PEP 448 <whatsnew-pep-448>`, additional unpacking generalizations.
+
+
+New library modules:
+
+* :mod:`typing`: :ref:`PEP 484 -- Type Hints <whatsnew-pep-484>`.
+* :mod:`zipapp`: :ref:`PEP 441 Improving Python ZIP Application Support
+ <whatsnew-zipapp>`.
+
+
+New built-in features:
+
+* ``bytes % args``, ``bytearray % args``: :ref:`PEP 461 <whatsnew-pep-461>` --
+ Adding ``%`` formatting to bytes and bytearray.
+
+* New :meth:`bytes.hex`, :meth:`bytearray.hex` and :meth:`memoryview.hex`
+ methods. (Contributed by Arnon Yaari in :issue:`9951`.)
+
+* :class:`memoryview` now supports tuple indexing (including multi-dimensional).
+ (Contributed by Antoine Pitrou in :issue:`23632`.)
+
+* Generators have a new ``gi_yieldfrom`` attribute, which returns the
+ object being iterated by ``yield from`` expressions. (Contributed
+ by Benno Leslie and Yury Selivanov in :issue:`24450`.)
+
+* A new :exc:`RecursionError` exception is now raised when maximum
+ recursion depth is reached. (Contributed by Georg Brandl
+ in :issue:`19235`.)
+
+
+CPython implementation improvements:
+
+* When the ``LC_TYPE`` locale is the POSIX locale (``C`` locale),
+ :py:data:`sys.stdin` and :py:data:`sys.stdout` now use the
+ ``surrogateescape`` error handler, instead of the ``strict`` error handler.
+ (Contributed by Victor Stinner in :issue:`19977`.)
+
+* ``.pyo`` files are no longer used and have been replaced by a more flexible
+ scheme that includes the optimization level explicitly in ``.pyc`` name.
+ (See :ref:`PEP 488 overview <whatsnew-pep-488>`.)
+
+* Builtin and extension modules are now initialized in a multi-phase process,
+ which is similar to how Python modules are loaded.
+ (See :ref:`PEP 489 overview <whatsnew-pep-489>`.)
+
+
+Significant improvements in the standard library:
+
+* :class:`collections.OrderedDict` is now
+ :ref:`implemented in C <whatsnew-ordereddict>`, which makes it
+ 4 to 100 times faster.
+
+* The :mod:`ssl` module gained
+ :ref:`support for Memory BIO <whatsnew-sslmemorybio>`, which decouples SSL
+ protocol handling from network IO.
+
+* The new :func:`os.scandir` function provides a
+ :ref:`better and significantly faster way <whatsnew-pep-471>`
+ of directory traversal.
+
+* :func:`functools.lru_cache` has been mostly
+ :ref:`reimplemented in C <whatsnew-lrucache>`, yielding much better
+ performance.
+
+* The new :func:`subprocess.run` function provides a
+ :ref:`streamlined way to run subprocesses <whatsnew-subprocess>`.
+
+* The :mod:`traceback` module has been significantly
+ :ref:`enhanced <whatsnew-traceback>` for improved
+ performance and developer convenience.
+
+
+Security improvements:
+
+* SSLv3 is now disabled throughout the standard library.
+ It can still be enabled by instantiating a :class:`ssl.SSLContext`
+ manually. (See :issue:`22638` for more details; this change was
+ backported to CPython 3.4 and 2.7.)
+
+* HTTP cookie parsing is now stricter, in order to protect
+ against potential injection attacks. (Contributed by Antoine Pitrou
+ in :issue:`22796`.)
+
+
+Windows improvements:
+
+* A new installer for Windows has replaced the old MSI.
+ See :ref:`using-on-windows` for more information.
+
+* Windows builds now use Microsoft Visual C++ 14.0, and extension modules
+ should use the same.
+
+
+Please read on for a comprehensive list of user-facing changes, including many
+other smaller improvements, CPython optimizations, deprecations, and potential
+porting issues.
+
+
+New Features
+============
+
+.. _whatsnew-pep-492:
+
+PEP 492 - Coroutines with async and await syntax
+------------------------------------------------
+
+:pep:`492` greatly improves support for asynchronous programming in Python
+by adding :term:`awaitable objects <awaitable>`,
+:term:`coroutine functions <coroutine function>`,
+:term:`asynchronous iteration <asynchronous iterable>`,
+and :term:`asynchronous context managers <asynchronous context manager>`.
+
+Coroutine functions are declared using the new :keyword:`async def` syntax::
+
+ >>> async def coro():
+ ... return 'spam'
+
+Inside a coroutine function, the new :keyword:`await` expression can be used
+to suspend coroutine execution until the result is available. Any object
+can be *awaited*, as long as it implements the :term:`awaitable` protocol by
+defining the :meth:`__await__` method.
+
+PEP 492 also adds :keyword:`async for` statement for convenient iteration
+over asynchronous iterables.
+
+An example of a rudimentary HTTP client written using the new syntax::
+
+ import asyncio
+
+ async def http_get(domain):
+ reader, writer = await asyncio.open_connection(domain, 80)
+
+ writer.write(b'\r\n'.join([
+ b'GET / HTTP/1.1',
+ b'Host: %b' % domain.encode('latin-1'),
+ b'Connection: close',
+ b'', b''
+ ]))
+
+ async for line in reader:
+ print('>>>', line)
+
+ writer.close()
+
+ loop = asyncio.get_event_loop()
+ try:
+ loop.run_until_complete(http_get('example.com'))
+ finally:
+ loop.close()
+
+
+Similarly to asynchronous iteration, there is a new syntax for asynchronous
+context managers. The following script::
+
+ import asyncio
+
+ async def coro(name, lock):
+ print('coro {}: waiting for lock'.format(name))
+ async with lock:
+ print('coro {}: holding the lock'.format(name))
+ await asyncio.sleep(1)
+ print('coro {}: releasing the lock'.format(name))
+
+ loop = asyncio.get_event_loop()
+ lock = asyncio.Lock()
+ coros = asyncio.gather(coro(1, lock), coro(2, lock))
+ try:
+ loop.run_until_complete(coros)
+ finally:
+ loop.close()
+
+will output::
+
+ coro 2: waiting for lock
+ coro 2: holding the lock
+ coro 1: waiting for lock
+ coro 2: releasing the lock
+ coro 1: holding the lock
+ coro 1: releasing the lock
+
+Note that both :keyword:`async for` and :keyword:`async with` can only
+be used inside a coroutine function declared with :keyword:`async def`.
+
+Coroutine functions are intended to be run inside a compatible event loop,
+such as the :ref:`asyncio loop <asyncio-event-loop>`.
+
+
+.. note::
+
+ .. versionchanged:: 3.5.2
+ Starting with CPython 3.5.2, ``__aiter__`` can directly return
+ :term:`asynchronous iterators <asynchronous iterator>`. Returning
+ an :term:`awaitable` object will result in a
+ :exc:`PendingDeprecationWarning`.
+
+ See more details in the :ref:`async-iterators` documentation
+ section.
+
+
+.. seealso::
+
+ :pep:`492` -- Coroutines with async and await syntax
+ PEP written and implemented by Yury Selivanov.
+
+
+.. _whatsnew-pep-465:
+
+PEP 465 - A dedicated infix operator for matrix multiplication
+--------------------------------------------------------------
+
+:pep:`465` adds the ``@`` infix operator for matrix multiplication.
+Currently, no builtin Python types implement the new operator, however, it
+can be implemented by defining :meth:`__matmul__`, :meth:`__rmatmul__`,
+and :meth:`__imatmul__` for regular, reflected, and in-place matrix
+multiplication. The semantics of these methods is similar to that of
+methods defining other infix arithmetic operators.
+
+Matrix multiplication is a notably common operation in many fields of
+mathematics, science, engineering, and the addition of ``@`` allows writing
+cleaner code::
+
+ S = (H @ beta - r).T @ inv(H @ V @ H.T) @ (H @ beta - r)
+
+instead of::
+
+ S = dot((dot(H, beta) - r).T,
+ dot(inv(dot(dot(H, V), H.T)), dot(H, beta) - r))
+
+NumPy 1.10 has support for the new operator::
+
+ >>> import numpy
+
+ >>> x = numpy.ones(3)
+ >>> x
+ array([ 1., 1., 1.])
+
+ >>> m = numpy.eye(3)
+ >>> m
+ array([[ 1., 0., 0.],
+ [ 0., 1., 0.],
+ [ 0., 0., 1.]])
+
+ >>> x @ m
+ array([ 1., 1., 1.])
+
+
+.. seealso::
+
+ :pep:`465` -- A dedicated infix operator for matrix multiplication
+ PEP written by Nathaniel J. Smith; implemented by Benjamin Peterson.
+
+
+.. _whatsnew-pep-448:
+
+PEP 448 - Additional Unpacking Generalizations
+----------------------------------------------
+
+:pep:`448` extends the allowed uses of the ``*`` iterable unpacking
+operator and ``**`` dictionary unpacking operator. It is now possible
+to use an arbitrary number of unpackings in function calls::
+
+ >>> print(*[1], *[2], 3, *[4, 5])
+ 1 2 3 4 5
+
+ >>> def fn(a, b, c, d):
+ ... print(a, b, c, d)
+ ...
+
+ >>> fn(**{'a': 1, 'c': 3}, **{'b': 2, 'd': 4})
+ 1 2 3 4
+
+Similarly, tuple, list, set, and dictionary displays allow multiple
+unpackings::
+
+ >>> *range(4), 4
+ (0, 1, 2, 3, 4)
+
+ >>> [*range(4), 4]
+ [0, 1, 2, 3, 4]
+
+ >>> {*range(4), 4, *(5, 6, 7)}
+ {0, 1, 2, 3, 4, 5, 6, 7}
+
+ >>> {'x': 1, **{'y': 2}}
+ {'x': 1, 'y': 2}
+
+.. seealso::
+
+ :pep:`448` -- Additional Unpacking Generalizations
+ PEP written by Joshua Landau; implemented by Neil Girdhar,
+ Thomas Wouters, and Joshua Landau.
+
+
+.. _whatsnew-pep-461:
+
+PEP 461 - % formatting support for bytes and bytearray
+------------------------------------------------------
+
+:pep:`461` adds support for the ``%``
+:ref:`interpolation operator <bytes-formatting>` to :class:`bytes`
+and :class:`bytearray`.
+
+While interpolation is usually thought of as a string operation, there are
+cases where interpolation on ``bytes`` or ``bytearrays`` makes sense, and the
+work needed to make up for this missing functionality detracts from the
+overall readability of the code. This issue is particularly important when
+dealing with wire format protocols, which are often a mixture of binary
+and ASCII compatible text.
+
+Examples::
+
+ >>> b'Hello %b!' % b'World'
+ b'Hello World!'
+
+ >>> b'x=%i y=%f' % (1, 2.5)
+ b'x=1 y=2.500000'
+
+Unicode is not allowed for ``%b``, but it is accepted by ``%a`` (equivalent of
+``repr(obj).encode('ascii', 'backslashreplace')``)::
+
+ >>> b'Hello %b!' % 'World'
+ Traceback (most recent call last):
+ File "<stdin>", line 1, in <module>
+ TypeError: %b requires bytes, or an object that implements __bytes__, not 'str'
+
+ >>> b'price: %a' % '10€'
+ b"price: '10\\u20ac'"
+
+Note that ``%s`` and ``%r`` conversion types, although supported, should
+only be used in codebases that need compatibility with Python 2.
+
+.. seealso::
+
+ :pep:`461` -- Adding % formatting to bytes and bytearray
+ PEP written by Ethan Furman; implemented by Neil Schemenauer and
+ Ethan Furman.
+
+
+.. _whatsnew-pep-484:
+
+PEP 484 - Type Hints
+--------------------
+
+Function annotation syntax has been a Python feature since version 3.0
+(:pep:`3107`), however the semantics of annotations has been left undefined.
+
+Experience has shown that the majority of function annotation
+uses were to provide type hints to function parameters and return values. It
+became evident that it would be beneficial for Python users, if the
+standard library included the base definitions and tools for type annotations.
+
+:pep:`484` introduces a :term:`provisional module <provisional api>` to
+provide these standard definitions and tools, along with some conventions
+for situations where annotations are not available.
+
+For example, here is a simple function whose argument and return type
+are declared in the annotations::
+
+ def greeting(name: str) -> str:
+ return 'Hello ' + name
+
+While these annotations are available at runtime through the usual
+:attr:`__annotations__` attribute, *no automatic type checking happens at
+runtime*. Instead, it is assumed that a separate off-line type checker
+(e.g. `mypy <http://mypy-lang.org>`_) will be used for on-demand
+source code analysis.
+
+The type system supports unions, generic types, and a special type
+named :class:`~typing.Any` which is consistent with (i.e. assignable to
+and from) all types.
+
+.. seealso::
+
+ * :mod:`typing` module documentation
+ * :pep:`484` -- Type Hints
+ PEP written by Guido van Rossum, Jukka Lehtosalo, and Åukasz Langa;
+ implemented by Guido van Rossum.
+ * :pep:`483` -- The Theory of Type Hints
+ PEP written by Guido van Rossum
+
+
+.. _whatsnew-pep-471:
+
+PEP 471 - os.scandir() function -- a better and faster directory iterator
+-------------------------------------------------------------------------
+
+:pep:`471` adds a new directory iteration function, :func:`os.scandir`,
+to the standard library. Additionally, :func:`os.walk` is now
+implemented using ``scandir``, which makes it 3 to 5 times faster
+on POSIX systems and 7 to 20 times faster on Windows systems. This is
+largely achieved by greatly reducing the number of calls to :func:`os.stat`
+required to walk a directory tree.
+
+Additionally, ``scandir`` returns an iterator, as opposed to returning
+a list of file names, which improves memory efficiency when iterating
+over very large directories.
+
+The following example shows a simple use of :func:`os.scandir` to display all
+the files (excluding directories) in the given *path* that don't start with
+``'.'``. The :meth:`entry.is_file() <os.DirEntry.is_file>` call will generally
+not make an additional system call::
+
+ for entry in os.scandir(path):
+ if not entry.name.startswith('.') and entry.is_file():
+ print(entry.name)
+
+.. seealso::
+
+ :pep:`471` -- os.scandir() function -- a better and faster directory iterator
+ PEP written and implemented by Ben Hoyt with the help of Victor Stinner.
+
+
+.. _whatsnew-pep-475:
+
+PEP 475: Retry system calls failing with EINTR
+----------------------------------------------
+
+An :py:data:`errno.EINTR` error code is returned whenever a system call, that
+is waiting for I/O, is interrupted by a signal. Previously, Python would
+raise :exc:`InterruptedError` in such cases. This meant that, when writing a
+Python application, the developer had two choices:
+
+#. Ignore the ``InterruptedError``.
+#. Handle the ``InterruptedError`` and attempt to restart the interrupted
+ system call at every call site.
+
+The first option makes an application fail intermittently.
+The second option adds a large amount of boilerplate that makes the
+code nearly unreadable. Compare::
+
+ print("Hello World")
+
+and::
+
+ while True:
+ try:
+ print("Hello World")
+ break
+ except InterruptedError:
+ continue
+
+:pep:`475` implements automatic retry of system calls on
+``EINTR``. This removes the burden of dealing with ``EINTR``
+or :exc:`InterruptedError` in user code in most situations and makes
+Python programs, including the standard library, more robust. Note that
+the system call is only retried if the signal handler does not raise an
+exception.
+
+Below is a list of functions which are now retried when interrupted
+by a signal:
+
+* :func:`open` and :func:`io.open`;
+
+* functions of the :mod:`faulthandler` module;
+
+* :mod:`os` functions: :func:`~os.fchdir`, :func:`~os.fchmod`,
+ :func:`~os.fchown`, :func:`~os.fdatasync`, :func:`~os.fstat`,
+ :func:`~os.fstatvfs`, :func:`~os.fsync`, :func:`~os.ftruncate`,
+ :func:`~os.mkfifo`, :func:`~os.mknod`, :func:`~os.open`,
+ :func:`~os.posix_fadvise`, :func:`~os.posix_fallocate`, :func:`~os.pread`,
+ :func:`~os.pwrite`, :func:`~os.read`, :func:`~os.readv`, :func:`~os.sendfile`,
+ :func:`~os.wait3`, :func:`~os.wait4`, :func:`~os.wait`,
+ :func:`~os.waitid`, :func:`~os.waitpid`, :func:`~os.write`,
+ :func:`~os.writev`;
+
+* special cases: :func:`os.close` and :func:`os.dup2` now ignore
+ :py:data:`~errno.EINTR` errors; the syscall is not retried (see the PEP
+ for the rationale);
+
+* :mod:`select` functions: :func:`devpoll.poll() <select.devpoll.poll>`,
+ :func:`epoll.poll() <select.epoll.poll>`,
+ :func:`kqueue.control() <select.kqueue.control>`,
+ :func:`poll.poll() <select.poll.poll>`, :func:`~select.select`;
+
+* methods of the :class:`~socket.socket` class: :meth:`~socket.socket.accept`,
+ :meth:`~socket.socket.connect` (except for non-blocking sockets),
+ :meth:`~socket.socket.recv`, :meth:`~socket.socket.recvfrom`,
+ :meth:`~socket.socket.recvmsg`, :meth:`~socket.socket.send`,
+ :meth:`~socket.socket.sendall`, :meth:`~socket.socket.sendmsg`,
+ :meth:`~socket.socket.sendto`;
+
+* :func:`signal.sigtimedwait` and :func:`signal.sigwaitinfo`;
+
+* :func:`time.sleep`.
+
+.. seealso::
+
+ :pep:`475` -- Retry system calls failing with EINTR
+ PEP and implementation written by Charles-François Natali and
+ Victor Stinner, with the help of Antoine Pitrou (the French connection).
+
+
+.. _whatsnew-pep-479:
+
+PEP 479: Change StopIteration handling inside generators
+--------------------------------------------------------
+
+The interaction of generators and :exc:`StopIteration` in Python 3.4 and
+earlier was sometimes surprising, and could conceal obscure bugs. Previously,
+``StopIteration`` raised accidentally inside a generator function was
+interpreted as the end of the iteration by the loop construct driving the
+generator.
+
+:pep:`479` changes the behavior of generators: when a ``StopIteration``
+exception is raised inside a generator, it is replaced with a
+:exc:`RuntimeError` before it exits the generator frame. The main goal of
+this change is to ease debugging in the situation where an unguarded
+:func:`next` call raises ``StopIteration`` and causes the iteration controlled
+by the generator to terminate silently. This is particularly pernicious in
+combination with the ``yield from`` construct.
+
+This is a backwards incompatible change, so to enable the new behavior,
+a :term:`__future__` import is necessary::
+
+ >>> from __future__ import generator_stop
+
+ >>> def gen():
+ ... next(iter([]))
+ ... yield
+ ...
+ >>> next(gen())
+ Traceback (most recent call last):
+ File "<stdin>", line 2, in gen
+ StopIteration
+
+ The above exception was the direct cause of the following exception:
+
+ Traceback (most recent call last):
+ File "<stdin>", line 1, in <module>
+ RuntimeError: generator raised StopIteration
+
+Without a ``__future__`` import, a :exc:`PendingDeprecationWarning` will be
+raised whenever a ``StopIteration`` exception is raised inside a generator.
+
+.. seealso::
+
+ :pep:`479` -- Change StopIteration handling inside generators
+ PEP written by Chris Angelico and Guido van Rossum. Implemented by
+ Chris Angelico, Yury Selivanov and Nick Coghlan.
+
+
+.. _whatsnew-pep-485:
+
+PEP 485: A function for testing approximate equality
+----------------------------------------------------
+
+:pep:`485` adds the :func:`math.isclose` and :func:`cmath.isclose`
+functions which tell whether two values are approximately equal or
+"close" to each other. Whether or not two values are considered
+close is determined according to given absolute and relative tolerances.
+Relative tolerance is the maximum allowed difference between ``isclose``
+arguments, relative to the larger absolute value::
+
+ >>> import math
+ >>> a = 5.0
+ >>> b = 4.99998
+ >>> math.isclose(a, b, rel_tol=1e-5)
+ True
+ >>> math.isclose(a, b, rel_tol=1e-6)
+ False
+
+It is also possible to compare two values using absolute tolerance, which
+must be a non-negative value::
+
+ >>> import math
+ >>> a = 5.0
+ >>> b = 4.99998
+ >>> math.isclose(a, b, abs_tol=0.00003)
+ True
+ >>> math.isclose(a, b, abs_tol=0.00001)
+ False
+
+.. seealso::
+
+ :pep:`485` -- A function for testing approximate equality
+ PEP written by Christopher Barker; implemented by Chris Barker and
+ Tal Einat.
+
+
+.. _whatsnew-pep-486:
+
+PEP 486: Make the Python Launcher aware of virtual environments
+---------------------------------------------------------------
+
+:pep:`486` makes the Windows launcher (see :pep:`397`) aware of an active
+virtual environment. When the default interpreter would be used and the
+``VIRTUAL_ENV`` environment variable is set, the interpreter in the virtual
+environment will be used.
+
+.. seealso::
+
+ :pep:`486` -- Make the Python Launcher aware of virtual environments
+ PEP written and implemented by Paul Moore.
+
+
+.. _whatsnew-pep-488:
+
+PEP 488: Elimination of PYO files
+---------------------------------
+
+:pep:`488` does away with the concept of ``.pyo`` files. This means that
+``.pyc`` files represent both unoptimized and optimized bytecode. To prevent the
+need to constantly regenerate bytecode files, ``.pyc`` files now have an
+optional ``opt-`` tag in their name when the bytecode is optimized. This has the
+side-effect of no more bytecode file name clashes when running under either
+:option:`-O` or :option:`-OO`. Consequently, bytecode files generated from
+:option:`-O`, and :option:`-OO` may now exist simultaneously.
+:func:`importlib.util.cache_from_source` has an updated API to help with
+this change.
+
+.. seealso::
+
+ :pep:`488` -- Elimination of PYO files
+ PEP written and implemented by Brett Cannon.
+
+
+.. _whatsnew-pep-489:
+
+PEP 489: Multi-phase extension module initialization
+----------------------------------------------------
+
+:pep:`489` updates extension module initialization to take advantage of the
+two step module loading mechanism introduced by :pep:`451` in Python 3.4.
+
+This change brings the import semantics of extension modules that opt-in to
+using the new mechanism much closer to those of Python source and bytecode
+modules, including the ability to use any valid identifier as a module name,
+rather than being restricted to ASCII.
+
+.. seealso::
+
+ :pep:`489` -- Multi-phase extension module initialization
+ PEP written by Petr Viktorin, Stefan Behnel, and Nick Coghlan;
+ implemented by Petr Viktorin.
+
+
+Other Language Changes
+======================
+
+Some smaller changes made to the core Python language are:
+
+* Added the ``"namereplace"`` error handlers. The ``"backslashreplace"``
+ error handlers now work with decoding and translating.
+ (Contributed by Serhiy Storchaka in :issue:`19676` and :issue:`22286`.)
+
+* The :option:`-b` option now affects comparisons of :class:`bytes` with
+ :class:`int`. (Contributed by Serhiy Storchaka in :issue:`23681`.)
+
+* New Kazakh ``kz1048`` and Tajik ``koi8_t`` :ref:`codecs <standard-encodings>`.
+ (Contributed by Serhiy Storchaka in :issue:`22682` and :issue:`22681`.)
+
+* Property docstrings are now writable. This is especially useful for
+ :func:`collections.namedtuple` docstrings.
+ (Contributed by Berker Peksag in :issue:`24064`.)
+
+* Circular imports involving relative imports are now supported.
+ (Contributed by Brett Cannon and Antoine Pitrou in :issue:`17636`.)
+
+
+New Modules
+===========
+
+typing
+------
+
+The new :mod:`typing` :term:`provisional <provisional api>` module
+provides standard definitions and tools for function type annotations.
+See :ref:`Type Hints <whatsnew-pep-484>` for more information.
+
+.. _whatsnew-zipapp:
+
+zipapp
+------
+
+The new :mod:`zipapp` module (specified in :pep:`441`) provides an API and
+command line tool for creating executable Python Zip Applications, which
+were introduced in Python 2.6 in :issue:`1739468`, but which were not well
+publicized, either at the time or since.
+
+With the new module, bundling your application is as simple as putting all
+the files, including a ``__main__.py`` file, into a directory ``myapp``
+and running::
+
+ $ python -m zipapp myapp
+ $ python myapp.pyz
+
+The module implementation has been contributed by Paul Moore in
+:issue:`23491`.
+
+.. seealso::
+
+ :pep:`441` -- Improving Python ZIP Application Support
+
+
+Improved Modules
+================
+
+argparse
+--------
+
+The :class:`~argparse.ArgumentParser` class now allows disabling
+:ref:`abbreviated usage <prefix-matching>` of long options by setting
+:ref:`allow_abbrev` to ``False``. (Contributed by Jonathan Paugh,
+Steven Bethard, paul j3 and Daniel Eriksson in :issue:`14910`.)
+
+
+asyncio
+-------
+
+Since the :mod:`asyncio` module is :term:`provisional <provisional api>`,
+all changes introduced in Python 3.5 have also been backported to Python 3.4.x.
+
+Notable changes in the :mod:`asyncio` module since Python 3.4.0:
+
+* New debugging APIs: :meth:`loop.set_debug() <asyncio.BaseEventLoop.set_debug>`
+ and :meth:`loop.get_debug() <asyncio.BaseEventLoop.get_debug>` methods.
+ (Contributed by Victor Stinner.)
+
+* The proactor event loop now supports SSL.
+ (Contributed by Antoine Pitrou and Victor Stinner in :issue:`22560`.)
+
+* A new :meth:`loop.is_closed() <asyncio.BaseEventLoop.is_closed>` method to
+ check if the event loop is closed.
+ (Contributed by Victor Stinner in :issue:`21326`.)
+
+* A new :meth:`loop.create_task() <asyncio.BaseEventLoop.create_task>`
+ to conveniently create and schedule a new :class:`~asyncio.Task`
+ for a coroutine. The ``create_task`` method is also used by all
+ asyncio functions that wrap coroutines into tasks, such as
+ :func:`asyncio.wait`, :func:`asyncio.gather`, etc.
+ (Contributed by Victor Stinner.)
+
+* A new :meth:`transport.get_write_buffer_limits() <asyncio.WriteTransport.get_write_buffer_limits>`
+ method to inquire for *high-* and *low-* water limits of the flow
+ control.
+ (Contributed by Victor Stinner.)
+
+* The :func:`~asyncio.async` function is deprecated in favor of
+ :func:`~asyncio.ensure_future`.
+ (Contributed by Yury Selivanov.)
+
+* New :meth:`loop.set_task_factory() <asyncio.BaseEventLoop.set_task_factory>`
+ and :meth:`loop.set_task_factory() <asyncio.BaseEventLoop.get_task_factory>`
+ methods to customize the task factory that
+ :meth:`loop.create_task() <asyncio.BaseEventLoop.create_task>` method uses.
+ (Contributed by Yury Selivanov.)
+
+* New :meth:`Queue.join() <asyncio.Queue.join>` and
+ :meth:`Queue.task_done() <asyncio.Queue.task_done>` queue methods.
+ (Contributed by Victor Stinner.)
+
+* The ``JoinableQueue`` class was removed, in favor of the
+ :class:`asyncio.Queue` class.
+ (Contributed by Victor Stinner.)
+
+Updates in 3.5.1:
+
+* The :func:`~asyncio.ensure_future` function and all functions that
+ use it, such as :meth:`loop.run_until_complete() <asyncio.BaseEventLoop.run_until_complete>`,
+ now accept all kinds of :term:`awaitable objects <awaitable>`.
+ (Contributed by Yury Selivanov.)
+
+* New :func:`~asyncio.run_coroutine_threadsafe` function to submit
+ coroutines to event loops from other threads.
+ (Contributed by Vincent Michel.)
+
+* New :meth:`Transport.is_closing() <asyncio.BaseTransport.is_closing>`
+ method to check if the transport is closing or closed.
+ (Contributed by Yury Selivanov.)
+
+* The :meth:`loop.create_server() <asyncio.BaseEventLoop.create_server>`
+ method can now accept a list of hosts.
+ (Contributed by Yann Sionneau.)
+
+Updates in 3.5.2:
+
+* New :meth:`loop.create_future() <asyncio.BaseEventLoop.create_future>`
+ method to create Future objects. This allows alternative event
+ loop implementations, such as
+ `uvloop <https://github.com/MagicStack/uvloop>`_, to provide a faster
+ :class:`asyncio.Future` implementation.
+ (Contributed by Yury Selivanov.)
+
+* New :meth:`loop.get_exception_handler() <asyncio.BaseEventLoop.get_exception_handler>`
+ method to get the current exception handler.
+ (Contributed by Yury Selivanov.)
+
+* New :meth:`StreamReader.readuntil() <asyncio.StreamReader.readuntil>`
+ method to read data from the stream until a separator bytes
+ sequence appears.
+ (Contributed by Mark Korenberg.)
+
+* The :meth:`loop.create_connection() <asyncio.BaseEventLoop.create_connection>`
+ and :meth:`loop.create_server() <asyncio.BaseEventLoop.create_server>`
+ methods are optimized to avoid calling the system ``getaddrinfo``
+ function if the address is already resolved.
+ (Contributed by A. Jesse Jiryu Davis.)
+
+* The :meth:`loop.sock_connect(sock, address) <asyncio.BaseEventLoop.sock_connect>`
+ no longer requires the *address* to be resolved prior to the call.
+ (Contributed by A. Jesse Jiryu Davis.)
+
+
+bz2
+---
+
+The :meth:`BZ2Decompressor.decompress <bz2.BZ2Decompressor.decompress>`
+method now accepts an optional *max_length* argument to limit the maximum
+size of decompressed data. (Contributed by Nikolaus Rath in :issue:`15955`.)
+
+
+cgi
+---
+
+The :class:`~cgi.FieldStorage` class now supports the :term:`context manager`
+protocol. (Contributed by Berker Peksag in :issue:`20289`.)
+
+
+cmath
+-----
+
+A new function :func:`~cmath.isclose` provides a way to test for approximate
+equality. (Contributed by Chris Barker and Tal Einat in :issue:`24270`.)
+
+
+code
+----
+
+The :func:`InteractiveInterpreter.showtraceback() <code.InteractiveInterpreter.showtraceback>`
+method now prints the full chained traceback, just like the interactive
+interpreter. (Contributed by Claudiu Popa in :issue:`17442`.)
+
+
+collections
+-----------
+
+.. _whatsnew-ordereddict:
+
+The :class:`~collections.OrderedDict` class is now implemented in C, which
+makes it 4 to 100 times faster. (Contributed by Eric Snow in :issue:`16991`.)
+
+:meth:`OrderedDict.items() <collections.OrderedDict.items>`,
+:meth:`OrderedDict.keys() <collections.OrderedDict.keys>`,
+:meth:`OrderedDict.values() <collections.OrderedDict.values>` views now support
+:func:`reversed` iteration.
+(Contributed by Serhiy Storchaka in :issue:`19505`.)
+
+The :class:`~collections.deque` class now defines
+:meth:`~collections.deque.index`, :meth:`~collections.deque.insert`, and
+:meth:`~collections.deque.copy`, and supports the ``+`` and ``*`` operators.
+This allows deques to be recognized as a :class:`~collections.abc.MutableSequence`
+and improves their substitutability for lists.
+(Contributed by Raymond Hettinger in :issue:`23704`.)
+
+Docstrings produced by :func:`~collections.namedtuple` can now be updated::
+
+ Point = namedtuple('Point', ['x', 'y'])
+ Point.__doc__ += ': Cartesian coodinate'
+ Point.x.__doc__ = 'abscissa'
+ Point.y.__doc__ = 'ordinate'
+
+(Contributed by Berker Peksag in :issue:`24064`.)
+
+The :class:`~collections.UserString` class now implements the
+:meth:`__getnewargs__`, :meth:`__rmod__`, :meth:`~str.casefold`,
+:meth:`~str.format_map`, :meth:`~str.isprintable`, and :meth:`~str.maketrans`
+methods to match the corresponding methods of :class:`str`.
+(Contributed by Joe Jevnik in :issue:`22189`.)
+
+
+collections.abc
+---------------
+
+The :meth:`Sequence.index() <collections.abc.Sequence.index>` method now
+accepts *start* and *stop* arguments to match the corresponding methods
+of :class:`tuple`, :class:`list`, etc.
+(Contributed by Devin Jeanpierre in :issue:`23086`.)
+
+A new :class:`~collections.abc.Generator` abstract base class. (Contributed
+by Stefan Behnel in :issue:`24018`.)
+
+New :class:`~collections.abc.Awaitable`, :class:`~collections.abc.Coroutine`,
+:class:`~collections.abc.AsyncIterator`, and
+:class:`~collections.abc.AsyncIterable` abstract base classes.
+(Contributed by Yury Selivanov in :issue:`24184`.)
+
+For earlier Python versions, a backport of the new ABCs is available in an
+external `PyPI package <https://pypi.python.org/pypi/backports_abc>`_.
+
+
+compileall
+----------
+
+A new :mod:`compileall` option, :samp:`-j {N}`, allows running *N* workers
+simultaneously to perform parallel bytecode compilation.
+The :func:`~compileall.compile_dir` function has a corresponding ``workers``
+parameter. (Contributed by Claudiu Popa in :issue:`16104`.)
+
+Another new option, ``-r``, allows controlling the maximum recursion
+level for subdirectories. (Contributed by Claudiu Popa in :issue:`19628`.)
+
+The ``-q`` command line option can now be specified more than once, in
+which case all output, including errors, will be suppressed. The corresponding
+``quiet`` parameter in :func:`~compileall.compile_dir`,
+:func:`~compileall.compile_file`, and :func:`~compileall.compile_path` can now
+accept an integer value indicating the level of output suppression.
+(Contributed by Thomas Kluyver in :issue:`21338`.)
+
+
+concurrent.futures
+------------------
+
+The :meth:`Executor.map() <concurrent.futures.Executor.map>` method now accepts a
+*chunksize* argument to allow batching of tasks to improve performance when
+:meth:`~concurrent.futures.ProcessPoolExecutor` is used.
+(Contributed by Dan O'Reilly in :issue:`11271`.)
+
+The number of workers in the :class:`~concurrent.futures.ThreadPoolExecutor`
+constructor is optional now. The default value is 5 times the number of CPUs.
+(Contributed by Claudiu Popa in :issue:`21527`.)
+
+
+configparser
+------------
+
+:mod:`configparser` now provides a way to customize the conversion
+of values by specifying a dictionary of converters in the
+:class:`~configparser.ConfigParser` constructor, or by defining them
+as methods in ``ConfigParser`` subclasses. Converters defined in
+a parser instance are inherited by its section proxies.
+
+Example::
+
+ >>> import configparser
+ >>> conv = {}
+ >>> conv['list'] = lambda v: [e.strip() for e in v.split() if e.strip()]
+ >>> cfg = configparser.ConfigParser(converters=conv)
+ >>> cfg.read_string("""
+ ... [s]
+ ... list = a b c d e f g
+ ... """)
+ >>> cfg.get('s', 'list')
+ 'a b c d e f g'
+ >>> cfg.getlist('s', 'list')
+ ['a', 'b', 'c', 'd', 'e', 'f', 'g']
+ >>> section = cfg['s']
+ >>> section.getlist('list')
+ ['a', 'b', 'c', 'd', 'e', 'f', 'g']
+
+(Contributed by Åukasz Langa in :issue:`18159`.)
+
+
+contextlib
+----------
+
+The new :func:`~contextlib.redirect_stderr` :term:`context manager` (similar to
+:func:`~contextlib.redirect_stdout`) makes it easier for utility scripts to
+handle inflexible APIs that write their output to :data:`sys.stderr` and
+don't provide any options to redirect it::
+
+ >>> import contextlib, io, logging
+ >>> f = io.StringIO()
+ >>> with contextlib.redirect_stderr(f):
+ ... logging.warning('warning')
+ ...
+ >>> f.getvalue()
+ 'WARNING:root:warning\n'
+
+(Contributed by Berker Peksag in :issue:`22389`.)
+
+
+csv
+---
+
+The :meth:`~csv.csvwriter.writerow` method now supports arbitrary iterables,
+not just sequences. (Contributed by Serhiy Storchaka in :issue:`23171`.)
+
+
+curses
+------
+
+The new :func:`~curses.update_lines_cols` function updates the :envvar:`LINES`
+and :envvar:`COLS` environment variables. This is useful for detecting
+manual screen resizing. (Contributed by Arnon Yaari in :issue:`4254`.)
+
+
+dbm
+---
+
+:func:`dumb.open <dbm.dumb.open>` always creates a new database when the flag
+has the value ``"n"``. (Contributed by Claudiu Popa in :issue:`18039`.)
+
+
+difflib
+-------
+
+The charset of HTML documents generated by
+:meth:`HtmlDiff.make_file() <difflib.HtmlDiff.make_file>`
+can now be customized by using a new *charset* keyword-only argument.
+The default charset of HTML document changed from ``"ISO-8859-1"``
+to ``"utf-8"``.
+(Contributed by Berker Peksag in :issue:`2052`.)
+
+The :func:`~difflib.diff_bytes` function can now compare lists of byte
+strings. This fixes a regression from Python 2.
+(Contributed by Terry J. Reedy and Greg Ward in :issue:`17445`.)
+
+
+distutils
+---------
+
+Both the ``build`` and ``build_ext`` commands now accept a ``-j`` option to
+enable parallel building of extension modules.
+(Contributed by Antoine Pitrou in :issue:`5309`.)
+
+The :mod:`distutils` module now supports ``xz`` compression, and can be
+enabled by passing ``xztar`` as an argument to ``bdist --format``.
+(Contributed by Serhiy Storchaka in :issue:`16314`.)
+
+
+doctest
+-------
+
+The :func:`~doctest.DocTestSuite` function returns an empty
+:class:`unittest.TestSuite` if *module* contains no docstrings, instead of
+raising :exc:`ValueError`. (Contributed by Glenn Jones in :issue:`15916`.)
+
+
+email
+-----
+
+A new policy option :attr:`Policy.mangle_from_ <email.policy.Policy.mangle_from_>`
+controls whether or not lines that start with ``"From "`` in email bodies are
+prefixed with a ``">"`` character by generators. The default is ``True`` for
+:attr:`~email.policy.compat32` and ``False`` for all other policies.
+(Contributed by Milan Oberkirch in :issue:`20098`.)
+
+A new
+:meth:`Message.get_content_disposition() <email.message.Message.get_content_disposition>`
+method provides easy access to a canonical value for the
+:mailheader:`Content-Disposition` header.
+(Contributed by Abhilash Raj in :issue:`21083`.)
+
+A new policy option :attr:`EmailPolicy.utf8 <email.policy.EmailPolicy.utf8>`
+can be set to ``True`` to encode email headers using the UTF-8 charset instead
+of using encoded words. This allows ``Messages`` to be formatted according to
+:rfc:`6532` and used with an SMTP server that supports the :rfc:`6531`
+``SMTPUTF8`` extension. (Contributed by R. David Murray in
+:issue:`24211`.)
+
+The :class:`mime.text.MIMEText <email.mime.text.MIMEText>` constructor now
+accepts a :class:`charset.Charset <email.charset.Charset>` instance.
+(Contributed by Claude Paroz and Berker Peksag in :issue:`16324`.)
+
+
+enum
+----
+
+The :class:`~enum.Enum` callable has a new parameter *start* to
+specify the initial number of enum values if only *names* are provided::
+
+ >>> Animal = enum.Enum('Animal', 'cat dog', start=10)
+ >>> Animal.cat
+ <Animal.cat: 10>
+ >>> Animal.dog
+ <Animal.dog: 11>
+
+(Contributed by Ethan Furman in :issue:`21706`.)
+
+
+faulthandler
+------------
+
+The :func:`~faulthandler.enable`, :func:`~faulthandler.register`,
+:func:`~faulthandler.dump_traceback` and
+:func:`~faulthandler.dump_traceback_later` functions now accept file
+descriptors in addition to file-like objects.
+(Contributed by Wei Wu in :issue:`23566`.)
+
+
+functools
+---------
+
+.. _whatsnew-lrucache:
+
+Most of the :func:`~functools.lru_cache` machinery is now implemented in C, making
+it significantly faster. (Contributed by Matt Joiner, Alexey Kachayev, and
+Serhiy Storchaka in :issue:`14373`.)
+
+
+glob
+----
+
+The :func:`~glob.iglob` and :func:`~glob.glob` functions now support recursive
+search in subdirectories, using the ``"**"`` pattern.
+(Contributed by Serhiy Storchaka in :issue:`13968`.)
+
+
+gzip
+----
+
+The *mode* argument of the :class:`~gzip.GzipFile` constructor now
+accepts ``"x"`` to request exclusive creation.
+(Contributed by Tim Heaney in :issue:`19222`.)
+
+
+heapq
+-----
+
+Element comparison in :func:`~heapq.merge` can now be customized by
+passing a :term:`key function` in a new optional *key* keyword argument,
+and a new optional *reverse* keyword argument can be used to reverse element
+comparison::
+
+ >>> import heapq
+ >>> a = ['9', '777', '55555']
+ >>> b = ['88', '6666']
+ >>> list(heapq.merge(a, b, key=len))
+ ['9', '88', '777', '6666', '55555']
+ >>> list(heapq.merge(reversed(a), reversed(b), key=len, reverse=True))
+ ['55555', '6666', '777', '88', '9']
+
+(Contributed by Raymond Hettinger in :issue:`13742`.)
+
+
+http
+----
+
+A new :class:`HTTPStatus <http.HTTPStatus>` enum that defines a set of
+HTTP status codes, reason phrases and long descriptions written in English.
+(Contributed by Demian Brecht in :issue:`21793`.)
+
+
+http.client
+-----------
+
+:meth:`HTTPConnection.getresponse() <http.client.HTTPConnection.getresponse>`
+now raises a :exc:`~http.client.RemoteDisconnected` exception when a
+remote server connection is closed unexpectedly. Additionally, if a
+:exc:`ConnectionError` (of which ``RemoteDisconnected``
+is a subclass) is raised, the client socket is now closed automatically,
+and will reconnect on the next request::
+
+ import http.client
+ conn = http.client.HTTPConnection('www.python.org')
+ for retries in range(3):
+ try:
+ conn.request('GET', '/')
+ resp = conn.getresponse()
+ except http.client.RemoteDisconnected:
+ pass
+
+(Contributed by Martin Panter in :issue:`3566`.)
+
+
+idlelib and IDLE
+----------------
+
+Since idlelib implements the IDLE shell and editor and is not intended for
+import by other programs, it gets improvements with every release. See
+:file:`Lib/idlelib/NEWS.txt` for a cumulative list of changes since 3.4.0,
+as well as changes made in future 3.5.x releases. This file is also available
+from the IDLE :menuselection:`Help --> About IDLE` dialog.
+
+
+imaplib
+-------
+
+The :class:`~imaplib.IMAP4` class now supports the :term:`context manager` protocol.
+When used in a :keyword:`with` statement, the IMAP4 ``LOGOUT``
+command will be called automatically at the end of the block.
+(Contributed by Tarek Ziadé and Serhiy Storchaka in :issue:`4972`.)
+
+The :mod:`imaplib` module now supports :rfc:`5161` (ENABLE Extension)
+and :rfc:`6855` (UTF-8 Support) via the :meth:`IMAP4.enable() <imaplib.IMAP4.enable>`
+method. A new :attr:`IMAP4.utf8_enabled <imaplib.IMAP4.utf8_enabled>`
+attribute tracks whether or not :rfc:`6855` support is enabled.
+(Contributed by Milan Oberkirch, R. David Murray, and Maciej Szulik in
+:issue:`21800`.)
+
+The :mod:`imaplib` module now automatically encodes non-ASCII string usernames
+and passwords using UTF-8, as recommended by the RFCs. (Contributed by Milan
+Oberkirch in :issue:`21800`.)
+
+
+imghdr
+------
+
+The :func:`~imghdr.what` function now recognizes the
+`OpenEXR <http://www.openexr.com>`_ format
+(contributed by Martin Vignali and Claudiu Popa in :issue:`20295`),
+and the `WebP <https://en.wikipedia.org/wiki/WebP>`_ format
+(contributed by Fabrice Aneche and Claudiu Popa in :issue:`20197`.)
+
+
+importlib
+---------
+
+The :class:`util.LazyLoader <importlib.util.LazyLoader>` class allows for
+lazy loading of modules in applications where startup time is important.
+(Contributed by Brett Cannon in :issue:`17621`.)
+
+The :func:`abc.InspectLoader.source_to_code() <importlib.abc.InspectLoader.source_to_code>`
+method is now a static method. This makes it easier to initialize a module
+object with code compiled from a string by running
+``exec(code, module.__dict__)``.
+(Contributed by Brett Cannon in :issue:`21156`.)
+
+The new :func:`util.module_from_spec() <importlib.util.module_from_spec>`
+function is now the preferred way to create a new module. As opposed to
+creating a :class:`types.ModuleType` instance directly, this new function
+will set the various import-controlled attributes based on the passed-in
+spec object. (Contributed by Brett Cannon in :issue:`20383`.)
+
+
+inspect
+-------
+
+Both the :class:`~inspect.Signature` and :class:`~inspect.Parameter` classes are
+now picklable and hashable. (Contributed by Yury Selivanov in :issue:`20726`
+and :issue:`20334`.)
+
+A new
+:meth:`BoundArguments.apply_defaults() <inspect.BoundArguments.apply_defaults>`
+method provides a way to set default values for missing arguments::
+
+ >>> def foo(a, b='ham', *args): pass
+ >>> ba = inspect.signature(foo).bind('spam')
+ >>> ba.apply_defaults()
+ >>> ba.arguments
+ OrderedDict([('a', 'spam'), ('b', 'ham'), ('args', ())])
+
+(Contributed by Yury Selivanov in :issue:`24190`.)
+
+A new class method
+:meth:`Signature.from_callable() <inspect.Signature.from_callable>` makes
+subclassing of :class:`~inspect.Signature` easier. (Contributed
+by Yury Selivanov and Eric Snow in :issue:`17373`.)
+
+The :func:`~inspect.signature` function now accepts a *follow_wrapped*
+optional keyword argument, which, when set to ``False``, disables automatic
+following of ``__wrapped__`` links.
+(Contributed by Yury Selivanov in :issue:`20691`.)
+
+A set of new functions to inspect
+:term:`coroutine functions <coroutine function>` and
+:term:`coroutine objects <coroutine>` has been added:
+:func:`~inspect.iscoroutine`, :func:`~inspect.iscoroutinefunction`,
+:func:`~inspect.isawaitable`, :func:`~inspect.getcoroutinelocals`,
+and :func:`~inspect.getcoroutinestate`.
+(Contributed by Yury Selivanov in :issue:`24017` and :issue:`24400`.)
+
+The :func:`~inspect.stack`, :func:`~inspect.trace`,
+:func:`~inspect.getouterframes`, and :func:`~inspect.getinnerframes`
+functions now return a list of named tuples.
+(Contributed by Daniel Shahaf in :issue:`16808`.)
+
+
+io
+--
+
+A new :meth:`BufferedIOBase.readinto1() <io.BufferedIOBase.readinto1>`
+method, that uses at most one call to the underlying raw stream's
+:meth:`RawIOBase.read() <io.RawIOBase.read>` or
+:meth:`RawIOBase.readinto() <io.RawIOBase.readinto>` methods.
+(Contributed by Nikolaus Rath in :issue:`20578`.)
+
+
+ipaddress
+---------
+
+Both the :class:`~ipaddress.IPv4Network` and :class:`~ipaddress.IPv6Network` classes
+now accept an ``(address, netmask)`` tuple argument, so as to easily construct
+network objects from existing addresses::
+
+ >>> import ipaddress
+ >>> ipaddress.IPv4Network(('127.0.0.0', 8))
+ IPv4Network('127.0.0.0/8')
+ >>> ipaddress.IPv4Network(('127.0.0.0', '255.0.0.0'))
+ IPv4Network('127.0.0.0/8')
+
+(Contributed by Peter Moody and Antoine Pitrou in :issue:`16531`.)
+
+A new :attr:`~ipaddress.IPv4Network.reverse_pointer` attribute for the
+:class:`~ipaddress.IPv4Network` and :class:`~ipaddress.IPv6Network` classes
+returns the name of the reverse DNS PTR record::
+
+ >>> import ipaddress
+ >>> addr = ipaddress.IPv4Address('127.0.0.1')
+ >>> addr.reverse_pointer
+ '1.0.0.127.in-addr.arpa'
+ >>> addr6 = ipaddress.IPv6Address('::1')
+ >>> addr6.reverse_pointer
+ '1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa'
+
+(Contributed by Leon Weber in :issue:`20480`.)
+
+
+json
+----
+
+The :mod:`json.tool` command line interface now preserves the order of keys in
+JSON objects passed in input. The new ``--sort-keys`` option can be used
+to sort the keys alphabetically. (Contributed by Berker Peksag
+in :issue:`21650`.)
+
+JSON decoder now raises :exc:`~json.JSONDecodeError` instead of
+:exc:`ValueError` to provide better context information about the error.
+(Contributed by Serhiy Storchaka in :issue:`19361`.)
+
+
+linecache
+---------
+
+A new :func:`~linecache.lazycache` function can be used to capture information
+about a non-file-based module to permit getting its lines later via
+:func:`~linecache.getline`. This avoids doing I/O until a line is actually
+needed, without having to carry the module globals around indefinitely.
+(Contributed by Robert Collins in :issue:`17911`.)
+
+
+locale
+------
+
+A new :func:`~locale.delocalize` function can be used to convert a string into
+a normalized number string, taking the ``LC_NUMERIC`` settings into account::
+
+ >>> import locale
+ >>> locale.setlocale(locale.LC_NUMERIC, 'de_DE.UTF-8')
+ 'de_DE.UTF-8'
+ >>> locale.delocalize('1.234,56')
+ '1234.56'
+ >>> locale.setlocale(locale.LC_NUMERIC, 'en_US.UTF-8')
+ 'en_US.UTF-8'
+ >>> locale.delocalize('1,234.56')
+ '1234.56'
+
+(Contributed by Cédric Krier in :issue:`13918`.)
+
+
+logging
+-------
+
+All logging methods (:class:`~logging.Logger` :meth:`~logging.Logger.log`,
+:meth:`~logging.Logger.exception`, :meth:`~logging.Logger.critical`,
+:meth:`~logging.Logger.debug`, etc.), now accept exception instances
+as an *exc_info* argument, in addition to boolean values and exception
+tuples::
+
+ >>> import logging
+ >>> try:
+ ... 1/0
+ ... except ZeroDivisionError as ex:
+ ... logging.error('exception', exc_info=ex)
+ ERROR:root:exception
+
+(Contributed by Yury Selivanov in :issue:`20537`.)
+
+The :class:`handlers.HTTPHandler <logging.handlers.HTTPHandler>` class now
+accepts an optional :class:`ssl.SSLContext` instance to configure SSL
+settings used in an HTTP connection.
+(Contributed by Alex Gaynor in :issue:`22788`.)
+
+The :class:`handlers.QueueListener <logging.handlers.QueueListener>` class now
+takes a *respect_handler_level* keyword argument which, if set to ``True``,
+will pass messages to handlers taking handler levels into account.
+(Contributed by Vinay Sajip.)
+
+
+lzma
+----
+
+The :meth:`LZMADecompressor.decompress() <lzma.LZMADecompressor.decompress>`
+method now accepts an optional *max_length* argument to limit the maximum
+size of decompressed data.
+(Contributed by Martin Panter in :issue:`15955`.)
+
+
+math
+----
+
+Two new constants have been added to the :mod:`math` module: :data:`~math.inf`
+and :data:`~math.nan`. (Contributed by Mark Dickinson in :issue:`23185`.)
+
+A new function :func:`~math.isclose` provides a way to test for approximate
+equality. (Contributed by Chris Barker and Tal Einat in :issue:`24270`.)
+
+A new :func:`~math.gcd` function has been added. The :func:`fractions.gcd`
+function is now deprecated. (Contributed by Mark Dickinson and Serhiy
+Storchaka in :issue:`22486`.)
+
+
+multiprocessing
+---------------
+
+:func:`sharedctypes.synchronized() <multiprocessing.sharedctypes.synchronized>`
+objects now support the :term:`context manager` protocol.
+(Contributed by Charles-François Natali in :issue:`21565`.)
+
+
+operator
+--------
+
+:func:`~operator.attrgetter`, :func:`~operator.itemgetter`,
+and :func:`~operator.methodcaller` objects now support pickling.
+(Contributed by Josh Rosenberg and Serhiy Storchaka in :issue:`22955`.)
+
+New :func:`~operator.matmul` and :func:`~operator.imatmul` functions
+to perform matrix multiplication.
+(Contributed by Benjamin Peterson in :issue:`21176`.)
+
+
+os
+--
+
+The new :func:`~os.scandir` function returning an iterator of
+:class:`~os.DirEntry` objects has been added. If possible, :func:`~os.scandir`
+extracts file attributes while scanning a directory, removing the need to
+perform subsequent system calls to determine file type or attributes, which may
+significantly improve performance. (Contributed by Ben Hoyt with the help
+of Victor Stinner in :issue:`22524`.)
+
+On Windows, a new
+:attr:`stat_result.st_file_attributes <os.stat_result.st_file_attributes>`
+attribute is now available. It corresponds to the ``dwFileAttributes`` member
+of the ``BY_HANDLE_FILE_INFORMATION`` structure returned by
+``GetFileInformationByHandle()``. (Contributed by Ben Hoyt in :issue:`21719`.)
+
+The :func:`~os.urandom` function now uses the ``getrandom()`` syscall on Linux 3.17
+or newer, and ``getentropy()`` on OpenBSD 5.6 and newer, removing the need to
+use ``/dev/urandom`` and avoiding failures due to potential file descriptor
+exhaustion. (Contributed by Victor Stinner in :issue:`22181`.)
+
+New :func:`~os.get_blocking` and :func:`~os.set_blocking` functions allow
+getting and setting a file descriptor's blocking mode (:data:`~os.O_NONBLOCK`.)
+(Contributed by Victor Stinner in :issue:`22054`.)
+
+The :func:`~os.truncate` and :func:`~os.ftruncate` functions are now supported
+on Windows. (Contributed by Steve Dower in :issue:`23668`.)
+
+There is a new :func:`os.path.commonpath` function returning the longest
+common sub-path of each passed pathname. Unlike the
+:func:`os.path.commonprefix` function, it always returns a valid
+path::
+
+ >>> os.path.commonprefix(['/usr/lib', '/usr/local/lib'])
+ '/usr/l'
+
+ >>> os.path.commonpath(['/usr/lib', '/usr/local/lib'])
+ '/usr'
+
+(Contributed by Rafik Draoui and Serhiy Storchaka in :issue:`10395`.)
+
+
+pathlib
+-------
+
+The new :meth:`Path.samefile() <pathlib.Path.samefile>` method can be used
+to check whether the path points to the same file as another path, which can
+be either another :class:`~pathlib.Path` object, or a string::
+
+ >>> import pathlib
+ >>> p1 = pathlib.Path('/etc/hosts')
+ >>> p2 = pathlib.Path('/etc/../etc/hosts')
+ >>> p1.samefile(p2)
+ True
+
+(Contributed by Vajrasky Kok and Antoine Pitrou in :issue:`19775`.)
+
+The :meth:`Path.mkdir() <pathlib.Path.mkdir>` method now accepts a new optional
+*exist_ok* argument to match ``mkdir -p`` and :func:`os.makedirs`
+functionality. (Contributed by Berker Peksag in :issue:`21539`.)
+
+There is a new :meth:`Path.expanduser() <pathlib.Path.expanduser>` method to
+expand ``~`` and ``~user`` prefixes. (Contributed by Serhiy Storchaka and
+Claudiu Popa in :issue:`19776`.)
+
+A new :meth:`Path.home() <pathlib.Path.home>` class method can be used to get
+a :class:`~pathlib.Path` instance representing the user’s home
+directory.
+(Contributed by Victor Salgado and Mayank Tripathi in :issue:`19777`.)
+
+New :meth:`Path.write_text() <pathlib.Path.write_text>`,
+:meth:`Path.read_text() <pathlib.Path.read_text>`,
+:meth:`Path.write_bytes() <pathlib.Path.write_bytes>`,
+:meth:`Path.read_bytes() <pathlib.Path.read_bytes>` methods to simplify
+read/write operations on files.
+
+The following code snippet will create or rewrite existing file
+``~/spam42``::
+
+ >>> import pathlib
+ >>> p = pathlib.Path('~/spam42')
+ >>> p.expanduser().write_text('ham')
+ 3
+
+(Contributed by Christopher Welborn in :issue:`20218`.)
+
+
+pickle
+------
+
+Nested objects, such as unbound methods or nested classes, can now be pickled
+using :ref:`pickle protocols <pickle-protocols>` older than protocol version 4.
+Protocol version 4 already supports these cases. (Contributed by Serhiy
+Storchaka in :issue:`23611`.)
+
+
+poplib
+------
+
+A new :meth:`POP3.utf8() <poplib.POP3.utf8>` command enables :rfc:`6856`
+(Internationalized Email) support, if a POP server supports it.
+(Contributed by Milan OberKirch in :issue:`21804`.)
+
+
+re
+--
+
+References and conditional references to groups with fixed length are now
+allowed in lookbehind assertions::
+
+ >>> import re
+ >>> pat = re.compile(r'(a|b).(?<=\1)c')
+ >>> pat.match('aac')
+ <_sre.SRE_Match object; span=(0, 3), match='aac'>
+ >>> pat.match('bbc')
+ <_sre.SRE_Match object; span=(0, 3), match='bbc'>
+
+(Contributed by Serhiy Storchaka in :issue:`9179`.)
+
+The number of capturing groups in regular expressions is no longer limited to
+100. (Contributed by Serhiy Storchaka in :issue:`22437`.)
+
+The :func:`~re.sub` and :func:`~re.subn` functions now replace unmatched
+groups with empty strings instead of raising an exception.
+(Contributed by Serhiy Storchaka in :issue:`1519638`.)
+
+The :class:`re.error` exceptions have new attributes,
+:attr:`~re.error.msg`, :attr:`~re.error.pattern`,
+:attr:`~re.error.pos`, :attr:`~re.error.lineno`,
+and :attr:`~re.error.colno`, that provide better context
+information about the error::
+
+ >>> re.compile("""
+ ... (?x)
+ ... .++
+ ... """)
+ Traceback (most recent call last):
+ ...
+ sre_constants.error: multiple repeat at position 16 (line 3, column 7)
+
+(Contributed by Serhiy Storchaka in :issue:`22578`.)
+
+
+readline
+--------
+
+A new :func:`~readline.append_history_file` function can be used to append
+the specified number of trailing elements in history to the given file.
+(Contributed by Bruno Cauet in :issue:`22940`.)
+
+
+selectors
+---------
+
+The new :class:`~selectors.DevpollSelector` supports efficient
+``/dev/poll`` polling on Solaris.
+(Contributed by Giampaolo Rodola' in :issue:`18931`.)
+
+
+shutil
+------
+
+The :func:`~shutil.move` function now accepts a *copy_function* argument,
+allowing, for example, the :func:`~shutil.copy` function to be used instead of
+the default :func:`~shutil.copy2` if there is a need to ignore file metadata
+when moving.
+(Contributed by Claudiu Popa in :issue:`19840`.)
+
+The :func:`~shutil.make_archive` function now supports the *xztar* format.
+(Contributed by Serhiy Storchaka in :issue:`5411`.)
+
+
+signal
+------
+
+On Windows, the :func:`~signal.set_wakeup_fd` function now also supports
+socket handles. (Contributed by Victor Stinner in :issue:`22018`.)
+
+Various ``SIG*`` constants in the :mod:`signal` module have been converted into
+:mod:`Enums <enum>`. This allows meaningful names to be printed
+during debugging, instead of integer "magic numbers".
+(Contributed by Giampaolo Rodola' in :issue:`21076`.)
+
+
+smtpd
+-----
+
+Both the :class:`~smtpd.SMTPServer` and :class:`~smtpd.SMTPChannel` classes now
+accept a *decode_data* keyword argument to determine if the ``DATA`` portion of
+the SMTP transaction is decoded using the ``"utf-8"`` codec or is instead
+provided to the
+:meth:`SMTPServer.process_message() <smtpd.SMTPServer.process_message>`
+method as a byte string. The default is ``True`` for backward compatibility
+reasons, but will change to ``False`` in Python 3.6. If *decode_data* is set
+to ``False``, the ``process_message`` method must be prepared to accept keyword
+arguments.
+(Contributed by Maciej Szulik in :issue:`19662`.)
+
+The :class:`~smtpd.SMTPServer` class now advertises the ``8BITMIME`` extension
+(:rfc:`6152`) if *decode_data* has been set ``True``. If the client
+specifies ``BODY=8BITMIME`` on the ``MAIL`` command, it is passed to
+:meth:`SMTPServer.process_message() <smtpd.SMTPServer.process_message>`
+via the *mail_options* keyword.
+(Contributed by Milan Oberkirch and R. David Murray in :issue:`21795`.)
+
+The :class:`~smtpd.SMTPServer` class now also supports the ``SMTPUTF8``
+extension (:rfc:`6531`: Internationalized Email). If the client specified
+``SMTPUTF8 BODY=8BITMIME`` on the ``MAIL`` command, they are passed to
+:meth:`SMTPServer.process_message() <smtpd.SMTPServer.process_message>`
+via the *mail_options* keyword. It is the responsibility of the
+``process_message`` method to correctly handle the ``SMTPUTF8`` data.
+(Contributed by Milan Oberkirch in :issue:`21725`.)
+
+It is now possible to provide, directly or via name resolution, IPv6
+addresses in the :class:`~smtpd.SMTPServer` constructor, and have it
+successfully connect. (Contributed by Milan Oberkirch in :issue:`14758`.)
+
+
+smtplib
+-------
+
+A new :meth:`SMTP.auth() <smtplib.SMTP.auth>` method provides a convenient way to
+implement custom authentication mechanisms. (Contributed by Milan
+Oberkirch in :issue:`15014`.)
+
+The :meth:`SMTP.set_debuglevel() <smtplib.SMTP.set_debuglevel>` method now
+accepts an additional debuglevel (2), which enables timestamps in debug
+messages. (Contributed by Gavin Chappell and Maciej Szulik in :issue:`16914`.)
+
+Both the :meth:`SMTP.sendmail() <smtplib.SMTP.sendmail>` and
+:meth:`SMTP.send_message() <smtplib.SMTP.send_message>` methods now
+support :rfc:`6531` (SMTPUTF8).
+(Contributed by Milan Oberkirch and R. David Murray in :issue:`22027`.)
+
+
+sndhdr
+------
+
+The :func:`~sndhdr.what` and :func:`~sndhdr.whathdr` functions now return
+a :func:`~collections.namedtuple`. (Contributed by Claudiu Popa in
+:issue:`18615`.)
+
+
+socket
+------
+
+Functions with timeouts now use a monotonic clock, instead of a system clock.
+(Contributed by Victor Stinner in :issue:`22043`.)
+
+A new :meth:`socket.sendfile() <socket.socket.sendfile>` method allows
+sending a file over a socket by using the high-performance :func:`os.sendfile`
+function on UNIX, resulting in uploads being from 2 to 3 times faster than when
+using plain :meth:`socket.send() <socket.socket.send>`.
+(Contributed by Giampaolo Rodola' in :issue:`17552`.)
+
+The :meth:`socket.sendall() <socket.socket.sendall>` method no longer resets the
+socket timeout every time bytes are received or sent. The socket timeout is
+now the maximum total duration to send all data.
+(Contributed by Victor Stinner in :issue:`23853`.)
+
+The *backlog* argument of the :meth:`socket.listen() <socket.socket.listen>`
+method is now optional. By default it is set to
+:data:`SOMAXCONN <socket.SOMAXCONN>` or to ``128``, whichever is less.
+(Contributed by Charles-François Natali in :issue:`21455`.)
+
+
+ssl
+---
+
+.. _whatsnew-sslmemorybio:
+
+Memory BIO Support
+~~~~~~~~~~~~~~~~~~
+
+(Contributed by Geert Jansen in :issue:`21965`.)
+
+The new :class:`~ssl.SSLObject` class has been added to provide SSL protocol
+support for cases when the network I/O capabilities of :class:`~ssl.SSLSocket`
+are not necessary or are suboptimal. ``SSLObject`` represents
+an SSL protocol instance, but does not implement any network I/O methods, and
+instead provides a memory buffer interface. The new :class:`~ssl.MemoryBIO`
+class can be used to pass data between Python and an SSL protocol instance.
+
+The memory BIO SSL support is primarily intended to be used in frameworks
+implementing asynchronous I/O for which :class:`~ssl.SSLSocket`'s readiness
+model ("select/poll") is inefficient.
+
+A new :meth:`SSLContext.wrap_bio() <ssl.SSLContext.wrap_bio>` method can be used
+to create a new ``SSLObject`` instance.
+
+
+Application-Layer Protocol Negotiation Support
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+(Contributed by Benjamin Peterson in :issue:`20188`.)
+
+Where OpenSSL support is present, the :mod:`ssl` module now implements
+the *Application-Layer Protocol Negotiation* TLS extension as described
+in :rfc:`7301`.
+
+The new :meth:`SSLContext.set_alpn_protocols() <ssl.SSLContext.set_alpn_protocols>`
+can be used to specify which protocols a socket should advertise during
+the TLS handshake.
+
+The new
+:meth:`SSLSocket.selected_alpn_protocol() <ssl.SSLSocket.selected_alpn_protocol>`
+returns the protocol that was selected during the TLS handshake.
+The :data:`~ssl.HAS_ALPN` flag indicates whether ALPN support is present.
+
+
+Other Changes
+~~~~~~~~~~~~~
+
+There is a new :meth:`SSLSocket.version() <ssl.SSLSocket.version>` method to
+query the actual protocol version in use.
+(Contributed by Antoine Pitrou in :issue:`20421`.)
+
+The :class:`~ssl.SSLSocket` class now implements
+a :meth:`SSLSocket.sendfile() <ssl.SSLSocket.sendfile>` method.
+(Contributed by Giampaolo Rodola' in :issue:`17552`.)
+
+The :meth:`SSLSocket.send() <ssl.SSLSocket.send>` method now raises either
+the :exc:`ssl.SSLWantReadError` or :exc:`ssl.SSLWantWriteError` exception on a
+non-blocking socket if the operation would block. Previously, it would return
+``0``. (Contributed by Nikolaus Rath in :issue:`20951`.)
+
+The :func:`~ssl.cert_time_to_seconds` function now interprets the input time
+as UTC and not as local time, per :rfc:`5280`. Additionally, the return
+value is always an :class:`int`. (Contributed by Akira Li in :issue:`19940`.)
+
+New :meth:`SSLObject.shared_ciphers() <ssl.SSLObject.shared_ciphers>` and
+:meth:`SSLSocket.shared_ciphers() <ssl.SSLSocket.shared_ciphers>` methods return
+the list of ciphers sent by the client during the handshake.
+(Contributed by Benjamin Peterson in :issue:`23186`.)
+
+The :meth:`SSLSocket.do_handshake() <ssl.SSLSocket.do_handshake>`,
+:meth:`SSLSocket.read() <ssl.SSLSocket.read>`,
+:meth:`SSLSocket.shutdown() <ssl.SSLSocket.shutdown>`, and
+:meth:`SSLSocket.write() <ssl.SSLSocket.write>` methods of the :class:`~ssl.SSLSocket`
+class no longer reset the socket timeout every time bytes are received or sent.
+The socket timeout is now the maximum total duration of the method.
+(Contributed by Victor Stinner in :issue:`23853`.)
+
+The :func:`~ssl.match_hostname` function now supports matching of IP addresses.
+(Contributed by Antoine Pitrou in :issue:`23239`.)
+
+
+sqlite3
+-------
+
+The :class:`~sqlite3.Row` class now fully supports the sequence protocol,
+in particular :func:`reversed` iteration and slice indexing.
+(Contributed by Claudiu Popa in :issue:`10203`; by Lucas Sinclair,
+Jessica McKellar, and Serhiy Storchaka in :issue:`13583`.)
+
+
+.. _whatsnew-subprocess:
+
+subprocess
+----------
+
+The new :func:`~subprocess.run` function has been added.
+It runs the specified command and returns a
+:class:`~subprocess.CompletedProcess` object, which describes a finished
+process. The new API is more consistent and is the recommended approach
+to invoking subprocesses in Python code that does not need to maintain
+compatibility with earlier Python versions.
+(Contributed by Thomas Kluyver in :issue:`23342`.)
+
+Examples::
+
+ >>> subprocess.run(["ls", "-l"]) # doesn't capture output
+ CompletedProcess(args=['ls', '-l'], returncode=0)
+
+ >>> subprocess.run("exit 1", shell=True, check=True)
+ Traceback (most recent call last):
+ ...
+ subprocess.CalledProcessError: Command 'exit 1' returned non-zero exit status 1
+
+ >>> subprocess.run(["ls", "-l", "/dev/null"], stdout=subprocess.PIPE)
+ CompletedProcess(args=['ls', '-l', '/dev/null'], returncode=0,
+ stdout=b'crw-rw-rw- 1 root root 1, 3 Jan 23 16:23 /dev/null\n')
+
+
+sys
+---
+
+A new :func:`~sys.set_coroutine_wrapper` function allows setting a global
+hook that will be called whenever a :term:`coroutine object <coroutine>`
+is created by an :keyword:`async def` function. A corresponding
+:func:`~sys.get_coroutine_wrapper` can be used to obtain a currently set
+wrapper. Both functions are :term:`provisional <provisional api>`,
+and are intended for debugging purposes only. (Contributed by Yury Selivanov
+in :issue:`24017`.)
+
+A new :func:`~sys.is_finalizing` function can be used to check if the Python
+interpreter is :term:`shutting down <interpreter shutdown>`.
+(Contributed by Antoine Pitrou in :issue:`22696`.)
+
+
+sysconfig
+---------
+
+The name of the user scripts directory on Windows now includes the first
+two components of the Python version. (Contributed by Paul Moore
+in :issue:`23437`.)
+
+
+tarfile
+-------
+
+The *mode* argument of the :func:`~tarfile.open` function now accepts ``"x"``
+to request exclusive creation. (Contributed by Berker Peksag in :issue:`21717`.)
+
+The :meth:`TarFile.extractall() <tarfile.TarFile.extractall>` and
+:meth:`TarFile.extract() <tarfile.TarFile.extract>` methods now take a keyword
+argument *numeric_only*. If set to ``True``, the extracted files and
+directories will be owned by the numeric ``uid`` and ``gid`` from the tarfile.
+If set to ``False`` (the default, and the behavior in versions prior to 3.5),
+they will be owned by the named user and group in the tarfile.
+(Contributed by Michael Vogt and Eric Smith in :issue:`23193`.)
+
+The :meth:`TarFile.list() <tarfile.TarFile.list>` now accepts an optional
+*members* keyword argument that can be set to a subset of the list returned
+by :meth:`TarFile.getmembers() <tarfile.TarFile.getmembers>`.
+(Contributed by Serhiy Storchaka in :issue:`21549`.)
+
+
+threading
+---------
+
+Both the :meth:`Lock.acquire() <threading.Lock.acquire>` and
+:meth:`RLock.acquire() <threading.RLock.acquire>` methods
+now use a monotonic clock for timeout management.
+(Contributed by Victor Stinner in :issue:`22043`.)
+
+
+time
+----
+
+The :func:`~time.monotonic` function is now always available.
+(Contributed by Victor Stinner in :issue:`22043`.)
+
+
+timeit
+------
+
+A new command line option ``-u`` or :samp:`--unit={U}` can be used to specify the time
+unit for the timer output. Supported options are ``usec``, ``msec``,
+or ``sec``. (Contributed by Julian Gindi in :issue:`18983`.)
+
+The :func:`~timeit.timeit` function has a new *globals* parameter for
+specifying the namespace in which the code will be running.
+(Contributed by Ben Roberts in :issue:`2527`.)
+
+
+tkinter
+-------
+
+The :mod:`tkinter._fix` module used for setting up the Tcl/Tk environment
+on Windows has been replaced by a private function in the :mod:`_tkinter`
+module which makes no permanent changes to environment variables.
+(Contributed by Zachary Ware in :issue:`20035`.)
+
+
+.. _whatsnew-traceback:
+
+traceback
+---------
+
+New :func:`~traceback.walk_stack` and :func:`~traceback.walk_tb`
+functions to conveniently traverse frame and traceback objects.
+(Contributed by Robert Collins in :issue:`17911`.)
+
+New lightweight classes: :class:`~traceback.TracebackException`,
+:class:`~traceback.StackSummary`, and :class:`~traceback.FrameSummary`.
+(Contributed by Robert Collins in :issue:`17911`.)
+
+Both the :func:`~traceback.print_tb` and :func:`~traceback.print_stack` functions
+now support negative values for the *limit* argument.
+(Contributed by Dmitry Kazakov in :issue:`22619`.)
+
+
+types
+-----
+
+A new :func:`~types.coroutine` function to transform
+:term:`generator <generator iterator>` and
+:class:`generator-like <collections.abc.Generator>` objects into
+:term:`awaitables <awaitable>`.
+(Contributed by Yury Selivanov in :issue:`24017`.)
+
+A new type called :class:`~types.CoroutineType`, which is used for
+:term:`coroutine` objects created by :keyword:`async def` functions.
+(Contributed by Yury Selivanov in :issue:`24400`.)
+
+
+unicodedata
+-----------
+
+The :mod:`unicodedata` module now uses data from `Unicode 8.0.0
+<http://unicode.org/versions/Unicode8.0.0/>`_.
+
+
+unittest
+--------
+
+The :meth:`TestLoader.loadTestsFromModule() <unittest.TestLoader.loadTestsFromModule>`
+method now accepts a keyword-only argument *pattern* which is passed to
+``load_tests`` as the third argument. Found packages are now checked for
+``load_tests`` regardless of whether their path matches *pattern*, because it
+is impossible for a package name to match the default pattern.
+(Contributed by Robert Collins and Barry A. Warsaw in :issue:`16662`.)
+
+Unittest discovery errors now are exposed in the
+:data:`TestLoader.errors <unittest.TestLoader.errors>` attribute of the
+:class:`~unittest.TestLoader` instance.
+(Contributed by Robert Collins in :issue:`19746`.)
+
+A new command line option ``--locals`` to show local variables in
+tracebacks. (Contributed by Robert Collins in :issue:`22936`.)
+
+
+unittest.mock
+-------------
+
+The :class:`~unittest.mock.Mock` class has the following improvements:
+
+* The class constructor has a new *unsafe* parameter, which causes mock
+ objects to raise :exc:`AttributeError` on attribute names starting
+ with ``"assert"``.
+ (Contributed by Kushal Das in :issue:`21238`.)
+
+* A new :meth:`Mock.assert_not_called() <unittest.mock.Mock.assert_not_called>`
+ method to check if the mock object was called.
+ (Contributed by Kushal Das in :issue:`21262`.)
+
+The :class:`~unittest.mock.MagicMock` class now supports :meth:`__truediv__`,
+:meth:`__divmod__` and :meth:`__matmul__` operators.
+(Contributed by Johannes Baiter in :issue:`20968`, and Håkan Lövdahl
+in :issue:`23581` and :issue:`23568`.)
+
+It is no longer necessary to explicitly pass ``create=True`` to the
+:func:`~unittest.mock.patch` function when patching builtin names.
+(Contributed by Kushal Das in :issue:`17660`.)
+
+
+urllib
+------
+
+A new
+:class:`request.HTTPPasswordMgrWithPriorAuth <urllib.request.HTTPPasswordMgrWithPriorAuth>`
+class allows HTTP Basic Authentication credentials to be managed so as to
+eliminate unnecessary ``401`` response handling, or to unconditionally send
+credentials on the first request in order to communicate with servers that
+return a ``404`` response instead of a ``401`` if the ``Authorization`` header
+is not sent. (Contributed by Matej Cepl in :issue:`19494` and Akshit Khurana in
+:issue:`7159`.)
+
+A new *quote_via* argument for the
+:func:`parse.urlencode() <urllib.parse.urlencode>`
+function provides a way to control the encoding of query parts if needed.
+(Contributed by Samwyse and Arnon Yaari in :issue:`13866`.)
+
+The :func:`request.urlopen() <urllib.request.urlopen>` function accepts an
+:class:`ssl.SSLContext` object as a *context* argument, which will be used for
+the HTTPS connection. (Contributed by Alex Gaynor in :issue:`22366`.)
+
+The :func:`parse.urljoin() <urllib.parse.urljoin>` was updated to use the
+:rfc:`3986` semantics for the resolution of relative URLs, rather than
+:rfc:`1808` and :rfc:`2396`.
+(Contributed by Demian Brecht and Senthil Kumaran in :issue:`22118`.)
+
+
+wsgiref
+-------
+
+The *headers* argument of the :class:`headers.Headers <wsgiref.headers.Headers>`
+class constructor is now optional.
+(Contributed by Pablo Torres Navarrete and SilentGhost in :issue:`5800`.)
+
+
+xmlrpc
+------
+
+The :class:`client.ServerProxy <xmlrpc.client.ServerProxy>` class now supports
+the :term:`context manager` protocol.
+(Contributed by Claudiu Popa in :issue:`20627`.)
+
+The :class:`client.ServerProxy <xmlrpc.client.ServerProxy>` constructor now accepts
+an optional :class:`ssl.SSLContext` instance.
+(Contributed by Alex Gaynor in :issue:`22960`.)
+
+
+xml.sax
+-------
+
+SAX parsers now support a character stream of the
+:class:`xmlreader.InputSource <xml.sax.xmlreader.InputSource>` object.
+(Contributed by Serhiy Storchaka in :issue:`2175`.)
+
+:func:`~xml.sax.parseString` now accepts a :class:`str` instance.
+(Contributed by Serhiy Storchaka in :issue:`10590`.)
+
+
+zipfile
+-------
+
+ZIP output can now be written to unseekable streams.
+(Contributed by Serhiy Storchaka in :issue:`23252`.)
+
+The *mode* argument of :meth:`ZipFile.open() <zipfile.ZipFile.open>` method now
+accepts ``"x"`` to request exclusive creation.
+(Contributed by Serhiy Storchaka in :issue:`21717`.)
+
+
+Other module-level changes
+==========================
+
+Many functions in the :mod:`mmap`, :mod:`ossaudiodev`, :mod:`socket`,
+:mod:`ssl`, and :mod:`codecs` modules now accept writable
+:term:`bytes-like objects <bytes-like object>`.
+(Contributed by Serhiy Storchaka in :issue:`23001`.)
+
+
+Optimizations
+=============
+
+The :func:`os.walk` function has been sped up by 3 to 5 times on POSIX systems,
+and by 7 to 20 times on Windows. This was done using the new :func:`os.scandir`
+function, which exposes file information from the underlying ``readdir`` or
+``FindFirstFile``/``FindNextFile`` system calls. (Contributed by
+Ben Hoyt with help from Victor Stinner in :issue:`23605`.)
+
+Construction of ``bytes(int)`` (filled by zero bytes) is faster and uses less
+memory for large objects. ``calloc()`` is used instead of ``malloc()`` to
+allocate memory for these objects.
+(Contributed by Victor Stinner in :issue:`21233`.)
+
+Some operations on :mod:`ipaddress` :class:`~ipaddress.IPv4Network` and
+:class:`~ipaddress.IPv6Network` have been massively sped up, such as
+:meth:`~ipaddress.IPv4Network.subnets`, :meth:`~ipaddress.IPv4Network.supernet`,
+:func:`~ipaddress.summarize_address_range`, :func:`~ipaddress.collapse_addresses`.
+The speed up can range from 3 to 15 times.
+(Contributed by Antoine Pitrou, Michel Albert, and Markus in
+:issue:`21486`, :issue:`21487`, :issue:`20826`, :issue:`23266`.)
+
+Pickling of :mod:`ipaddress` objects was optimized to produce significantly
+smaller output. (Contributed by Serhiy Storchaka in :issue:`23133`.)
+
+Many operations on :class:`io.BytesIO` are now 50% to 100% faster.
+(Contributed by Serhiy Storchaka in :issue:`15381` and David Wilson in
+:issue:`22003`.)
+
+The :func:`marshal.dumps` function is now faster: 65-85% with versions 3
+and 4, 20-25% with versions 0 to 2 on typical data, and up to 5 times in
+best cases.
+(Contributed by Serhiy Storchaka in :issue:`20416` and :issue:`23344`.)
+
+The UTF-32 encoder is now 3 to 7 times faster.
+(Contributed by Serhiy Storchaka in :issue:`15027`.)
+
+Regular expressions are now parsed up to 10% faster.
+(Contributed by Serhiy Storchaka in :issue:`19380`.)
+
+The :func:`json.dumps` function was optimized to run with
+``ensure_ascii=False`` as fast as with ``ensure_ascii=True``.
+(Contributed by Naoki Inada in :issue:`23206`.)
+
+The :c:func:`PyObject_IsInstance` and :c:func:`PyObject_IsSubclass`
+functions have been sped up in the common case that the second argument
+has :class:`type` as its metaclass.
+(Contributed Georg Brandl by in :issue:`22540`.)
+
+Method caching was slightly improved, yielding up to 5% performance
+improvement in some benchmarks.
+(Contributed by Antoine Pitrou in :issue:`22847`.)
+
+Objects from the :mod:`random` module now use 50% less memory on 64-bit
+builds. (Contributed by Serhiy Storchaka in :issue:`23488`.)
+
+The :func:`property` getter calls are up to 25% faster.
+(Contributed by Joe Jevnik in :issue:`23910`.)
+
+Instantiation of :class:`fractions.Fraction` is now up to 30% faster.
+(Contributed by Stefan Behnel in :issue:`22464`.)
+
+String methods :meth:`~str.find`, :meth:`~str.rfind`, :meth:`~str.split`,
+:meth:`~str.partition` and the :keyword:`in` string operator are now significantly
+faster for searching 1-character substrings.
+(Contributed by Serhiy Storchaka in :issue:`23573`.)
+
+
+Build and C API Changes
+=======================
+
+New ``calloc`` functions were added:
+
+* :c:func:`PyMem_RawCalloc`,
+* :c:func:`PyMem_Calloc`,
+* :c:func:`PyObject_Calloc`,
+* :c:func:`_PyObject_GC_Calloc`.
+
+(Contributed by Victor Stinner in :issue:`21233`.)
+
+New encoding/decoding helper functions:
+
+* :c:func:`Py_DecodeLocale` (replaced ``_Py_char2wchar()``),
+* :c:func:`Py_EncodeLocale` (replaced ``_Py_wchar2char()``).
+
+(Contributed by Victor Stinner in :issue:`18395`.)
+
+A new :c:func:`PyCodec_NameReplaceErrors` function to replace the unicode
+encode error with ``\N{...}`` escapes.
+(Contributed by Serhiy Storchaka in :issue:`19676`.)
+
+A new :c:func:`PyErr_FormatV` function similar to :c:func:`PyErr_Format`,
+but accepts a ``va_list`` argument.
+(Contributed by Antoine Pitrou in :issue:`18711`.)
+
+A new :c:data:`PyExc_RecursionError` exception.
+(Contributed by Georg Brandl in :issue:`19235`.)
+
+New :c:func:`PyModule_FromDefAndSpec`, :c:func:`PyModule_FromDefAndSpec2`,
+and :c:func:`PyModule_ExecDef` functions introduced by :pep:`489` --
+multi-phase extension module initialization.
+(Contributed by Petr Viktorin in :issue:`24268`.)
+
+New :c:func:`PyNumber_MatrixMultiply` and
+:c:func:`PyNumber_InPlaceMatrixMultiply` functions to perform matrix
+multiplication.
+(Contributed by Benjamin Peterson in :issue:`21176`. See also :pep:`465`
+for details.)
+
+The :c:member:`PyTypeObject.tp_finalize` slot is now part of the stable ABI.
+
+Windows builds now require Microsoft Visual C++ 14.0, which
+is available as part of `Visual Studio 2015 <https://www.visualstudio.com/>`_.
+
+Extension modules now include a platform information tag in their filename on
+some platforms (the tag is optional, and CPython will import extensions without
+it, although if the tag is present and mismatched, the extension won't be
+loaded):
+
+* On Linux, extension module filenames end with
+ ``.cpython-<major><minor>m-<architecture>-<os>.pyd``:
+
+ * ``<major>`` is the major number of the Python version;
+ for Python 3.5 this is ``3``.
+
+ * ``<minor>`` is the minor number of the Python version;
+ for Python 3.5 this is ``5``.
+
+ * ``<architecture>`` is the hardware architecture the extension module
+ was built to run on. It's most commonly either ``i386`` for 32-bit Intel
+ platforms or ``x86_64`` for 64-bit Intel (and AMD) platforms.
+
+ * ``<os>`` is always ``linux-gnu``, except for extensions built to
+ talk to the 32-bit ABI on 64-bit platforms, in which case it is
+ ``linux-gnu32`` (and ``<architecture>`` will be ``x86_64``).
+
+* On Windows, extension module filenames end with
+ ``<debug>.cp<major><minor>-<platform>.pyd``:
+
+ * ``<major>`` is the major number of the Python version;
+ for Python 3.5 this is ``3``.
+
+ * ``<minor>`` is the minor number of the Python version;
+ for Python 3.5 this is ``5``.
+
+ * ``<platform>`` is the platform the extension module was built for,
+ either ``win32`` for Win32, ``win_amd64`` for Win64, ``win_ia64`` for
+ Windows Itanium 64, and ``win_arm`` for Windows on ARM.
+
+ * If built in debug mode, ``<debug>`` will be ``_d``,
+ otherwise it will be blank.
+
+* On OS X platforms, extension module filenames now end with ``-darwin.so``.
+
+* On all other platforms, extension module filenames are the same as they were
+ with Python 3.4.
+
+
+Deprecated
+==========
+
+New Keywords
+------------
+
+``async`` and ``await`` are not recommended to be used as variable, class,
+function or module names. Introduced by :pep:`492` in Python 3.5, they will
+become proper keywords in Python 3.7.
+
+
+Deprecated Python Behavior
+--------------------------
+
+Raising the :exc:`StopIteration` exception inside a generator will now generate a silent
+:exc:`PendingDeprecationWarning`, which will become a non-silent deprecation
+warning in Python 3.6 and will trigger a :exc:`RuntimeError` in Python 3.7.
+See :ref:`PEP 479: Change StopIteration handling inside generators <whatsnew-pep-479>`
+for details.
+
+
+Unsupported Operating Systems
+-----------------------------
+
+Windows XP is no longer supported by Microsoft, thus, per :PEP:`11`, CPython
+3.5 is no longer officially supported on this OS.
+
+
+Deprecated Python modules, functions and methods
+------------------------------------------------
+
+The :mod:`formatter` module has now graduated to full deprecation and is still
+slated for removal in Python 3.6.
+
+The :func:`asyncio.async` function is deprecated in favor of
+:func:`~asyncio.ensure_future`.
+
+The :mod:`smtpd` module has in the past always decoded the DATA portion of
+email messages using the ``utf-8`` codec. This can now be controlled by the
+new *decode_data* keyword to :class:`~smtpd.SMTPServer`. The default value is
+``True``, but this default is deprecated. Specify the *decode_data* keyword
+with an appropriate value to avoid the deprecation warning.
+
+Directly assigning values to the :attr:`~http.cookies.Morsel.key`,
+:attr:`~http.cookies.Morsel.value` and
+:attr:`~http.cookies.Morsel.coded_value` of :class:`http.cookies.Morsel`
+objects is deprecated. Use the :meth:`~http.cookies.Morsel.set` method
+instead. In addition, the undocumented *LegalChars* parameter of
+:meth:`~http.cookies.Morsel.set` is deprecated, and is now ignored.
+
+Passing a format string as keyword argument *format_string* to the
+:meth:`~string.Formatter.format` method of the :class:`string.Formatter`
+class has been deprecated.
+(Contributed by Serhiy Storchaka in :issue:`23671`.)
+
+The :func:`platform.dist` and :func:`platform.linux_distribution` functions
+are now deprecated. Linux distributions use too many different ways of
+describing themselves, so the functionality is left to a package.
+(Contributed by Vajrasky Kok and Berker Peksag in :issue:`1322`.)
+
+The previously undocumented ``from_function`` and ``from_builtin`` methods of
+:class:`inspect.Signature` are deprecated. Use the new
+:meth:`Signature.from_callable() <inspect.Signature.from_callable>`
+method instead. (Contributed by Yury Selivanov in :issue:`24248`.)
+
+The :func:`inspect.getargspec` function is deprecated and scheduled to be
+removed in Python 3.6. (See :issue:`20438` for details.)
+
+The :mod:`inspect` :func:`~inspect.getfullargspec`,
+:func:`~inspect.getargvalues`, :func:`~inspect.getcallargs`,
+:func:`~inspect.getargvalues`, :func:`~inspect.formatargspec`, and
+:func:`~inspect.formatargvalues` functions are deprecated in favor of
+the :func:`inspect.signature` API.
+(Contributed by Yury Selivanov in :issue:`20438`.)
+
+Use of :const:`re.LOCALE` flag with str patterns or :const:`re.ASCII` is now
+deprecated. (Contributed by Serhiy Storchaka in :issue:`22407`.)
+
+Use of unrecognized special sequences consisting of ``'\'`` and an ASCII letter
+in regular expression patterns and replacement patterns now raises a
+deprecation warning and will be forbidden in Python 3.6.
+(Contributed by Serhiy Storchaka in :issue:`23622`.)
+
+The undocumented and unofficial *use_load_tests* default argument of the
+:meth:`unittest.TestLoader.loadTestsFromModule` method now is
+deprecated and ignored.
+(Contributed by Robert Collins and Barry A. Warsaw in :issue:`16662`.)
+
+
+Removed
+=======
+
+API and Feature Removals
+------------------------
+
+The following obsolete and previously deprecated APIs and features have been
+removed:
+
+* The ``__version__`` attribute has been dropped from the email package. The
+ email code hasn't been shipped separately from the stdlib for a long time,
+ and the ``__version__`` string was not updated in the last few releases.
+
+* The internal ``Netrc`` class in the :mod:`ftplib` module was deprecated in
+ 3.4, and has now been removed.
+ (Contributed by Matt Chaput in :issue:`6623`.)
+
+* The concept of ``.pyo`` files has been removed.
+
+* The JoinableQueue class in the provisional :mod:`asyncio` module was
+ deprecated in 3.4.4 and is now removed.
+ (Contributed by A. Jesse Jiryu Davis in :issue:`23464`.)
+
+
+Porting to Python 3.5
+=====================
+
+This section lists previously described changes and other bugfixes
+that may require changes to your code.
+
+
+Changes in Python behavior
+--------------------------
+
+* Due to an oversight, earlier Python versions erroneously accepted the
+ following syntax::
+
+ f(1 for x in [1], *args)
+ f(1 for x in [1], **kwargs)
+
+ Python 3.5 now correctly raises a :exc:`SyntaxError`, as generator
+ expressions must be put in parentheses if not a sole argument to a function.
+
+
+Changes in the Python API
+-------------------------
+
+* :pep:`475`: System calls are now retried when interrupted by a signal instead
+ of raising :exc:`InterruptedError` if the Python signal handler does not
+ raise an exception.
+
+* Before Python 3.5, a :class:`datetime.time` object was considered to be false
+ if it represented midnight in UTC. This behavior was considered obscure and
+ error-prone and has been removed in Python 3.5. See :issue:`13936` for full
+ details.
+
+* The :meth:`ssl.SSLSocket.send()` method now raises either
+ :exc:`ssl.SSLWantReadError` or :exc:`ssl.SSLWantWriteError`
+ on a non-blocking socket if the operation would block. Previously,
+ it would return ``0``. (Contributed by Nikolaus Rath in :issue:`20951`.)
+
+* The ``__name__`` attribute of generators is now set from the function name,
+ instead of being set from the code name. Use ``gen.gi_code.co_name`` to
+ retrieve the code name. Generators also have a new ``__qualname__``
+ attribute, the qualified name, which is now used for the representation
+ of a generator (``repr(gen)``).
+ (Contributed by Victor Stinner in :issue:`21205`.)
+
+* The deprecated "strict" mode and argument of :class:`~html.parser.HTMLParser`,
+ :meth:`HTMLParser.error`, and the :exc:`HTMLParserError` exception have been
+ removed. (Contributed by Ezio Melotti in :issue:`15114`.)
+ The *convert_charrefs* argument of :class:`~html.parser.HTMLParser` is
+ now ``True`` by default. (Contributed by Berker Peksag in :issue:`21047`.)
+
+* Although it is not formally part of the API, it is worth noting for porting
+ purposes (ie: fixing tests) that error messages that were previously of the
+ form "'sometype' does not support the buffer protocol" are now of the form "a
+ :term:`bytes-like object` is required, not 'sometype'".
+ (Contributed by Ezio Melotti in :issue:`16518`.)
+
+* If the current directory is set to a directory that no longer exists then
+ :exc:`FileNotFoundError` will no longer be raised and instead
+ :meth:`~importlib.machinery.FileFinder.find_spec` will return ``None``
+ **without** caching ``None`` in :data:`sys.path_importer_cache`, which is
+ different than the typical case (:issue:`22834`).
+
+* HTTP status code and messages from :mod:`http.client` and :mod:`http.server`
+ were refactored into a common :class:`~http.HTTPStatus` enum. The values in
+ :mod:`http.client` and :mod:`http.server` remain available for backwards
+ compatibility. (Contributed by Demian Brecht in :issue:`21793`.)
+
+* When an import loader defines :meth:`importlib.machinery.Loader.exec_module`
+ it is now expected to also define
+ :meth:`~importlib.machinery.Loader.create_module` (raises a
+ :exc:`DeprecationWarning` now, will be an error in Python 3.6). If the loader
+ inherits from :class:`importlib.abc.Loader` then there is nothing to do, else
+ simply define :meth:`~importlib.machinery.Loader.create_module` to return
+ ``None``. (Contributed by Brett Cannon in :issue:`23014`.)
+
+* The :func:`re.split` function always ignored empty pattern matches, so the
+ ``"x*"`` pattern worked the same as ``"x+"``, and the ``"\b"`` pattern never
+ worked. Now :func:`re.split` raises a warning if the pattern could match
+ an empty string. For compatibility, use patterns that never match an empty
+ string (e.g. ``"x+"`` instead of ``"x*"``). Patterns that could only match
+ an empty string (such as ``"\b"``) now raise an error.
+ (Contributed by Serhiy Storchaka in :issue:`22818`.)
+
+* The :class:`http.cookies.Morsel` dict-like interface has been made self
+ consistent: morsel comparison now takes the :attr:`~http.cookies.Morsel.key`
+ and :attr:`~http.cookies.Morsel.value` into account,
+ :meth:`~http.cookies.Morsel.copy` now results in a
+ :class:`~http.cookies.Morsel` instance rather than a :class:`dict`, and
+ :meth:`~http.cookies.Morsel.update` will now raise an exception if any of the
+ keys in the update dictionary are invalid. In addition, the undocumented
+ *LegalChars* parameter of :func:`~http.cookies.Morsel.set` is deprecated and
+ is now ignored. (Contributed by Demian Brecht in :issue:`2211`.)
+
+* :pep:`488` has removed ``.pyo`` files from Python and introduced the optional
+ ``opt-`` tag in ``.pyc`` file names. The
+ :func:`importlib.util.cache_from_source` has gained an *optimization*
+ parameter to help control the ``opt-`` tag. Because of this, the
+ *debug_override* parameter of the function is now deprecated. `.pyo` files
+ are also no longer supported as a file argument to the Python interpreter and
+ thus serve no purpose when distributed on their own (i.e. sourcless code
+ distribution). Due to the fact that the magic number for bytecode has changed
+ in Python 3.5, all old `.pyo` files from previous versions of Python are
+ invalid regardless of this PEP.
+
+* The :mod:`socket` module now exports the :data:`~socket.CAN_RAW_FD_FRAMES`
+ constant on linux 3.6 and greater.
+
+* The :func:`ssl.cert_time_to_seconds` function now interprets the input time
+ as UTC and not as local time, per :rfc:`5280`. Additionally, the return
+ value is always an :class:`int`. (Contributed by Akira Li in :issue:`19940`.)
+
+* The ``pygettext.py`` Tool now uses the standard +NNNN format for timezones in
+ the POT-Creation-Date header.
+
+* The :mod:`smtplib` module now uses :data:`sys.stderr` instead of the previous
+ module-level :data:`stderr` variable for debug output. If your (test)
+ program depends on patching the module-level variable to capture the debug
+ output, you will need to update it to capture sys.stderr instead.
+
+* The :meth:`str.startswith` and :meth:`str.endswith` methods no longer return
+ ``True`` when finding the empty string and the indexes are completely out of
+ range. (Contributed by Serhiy Storchaka in :issue:`24284`.)
+
+* The :func:`inspect.getdoc` function now returns documentation strings
+ inherited from base classes. Documentation strings no longer need to be
+ duplicated if the inherited documentation is appropriate. To suppress an
+ inherited string, an empty string must be specified (or the documentation
+ may be filled in). This change affects the output of the :mod:`pydoc`
+ module and the :func:`help` function.
+ (Contributed by Serhiy Storchaka in :issue:`15582`.)
+
+* Nested :func:`functools.partial` calls are now flattened. If you were
+ relying on the previous behavior, you can now either add an attribute to a
+ :func:`functools.partial` object or you can create a subclass of
+ :func:`functools.partial`.
+ (Contributed by Alexander Belopolsky in :issue:`7830`.)
+
+Changes in the C API
+--------------------
+
+* The undocumented :c:member:`~PyMemoryViewObject.format` member of the
+ (non-public) :c:type:`PyMemoryViewObject` structure has been removed.
+ All extensions relying on the relevant parts in ``memoryobject.h``
+ must be rebuilt.
+
+* The :c:type:`PyMemAllocator` structure was renamed to
+ :c:type:`PyMemAllocatorEx` and a new ``calloc`` field was added.
+
+* Removed non-documented macro :c:macro:`PyObject_REPR` which leaked references.
+ Use format character ``%R`` in :c:func:`PyUnicode_FromFormat`-like functions
+ to format the :func:`repr` of the object.
+ (Contributed by Serhiy Storchaka in :issue:`22453`.)
+
+* Because the lack of the :attr:`__module__` attribute breaks pickling and
+ introspection, a deprecation warning is now raised for builtin types without
+ the :attr:`__module__` attribute. This would be an AttributeError in
+ the future.
+ (Contributed by Serhiy Storchaka in :issue:`20204`.)
+
+* As part of the :pep:`492` implementation, the ``tp_reserved`` slot of
+ :c:type:`PyTypeObject` was replaced with a
+ :c:member:`tp_as_async` slot. Refer to :ref:`coro-objects` for
+ new types, structures and functions.
+
diff --git a/Doc/whatsnew/index.rst b/Doc/whatsnew/index.rst
index 29902e407c..edb55022bd 100644
--- a/Doc/whatsnew/index.rst
+++ b/Doc/whatsnew/index.rst
@@ -11,6 +11,7 @@ anyone wishing to stay up-to-date after a new release.
.. toctree::
:maxdepth: 2
+ 3.5.rst
3.4.rst
3.3.rst
3.2.rst
diff --git a/Grammar/Grammar b/Grammar/Grammar
index 05c3181627..99fcea026a 100644
--- a/Grammar/Grammar
+++ b/Grammar/Grammar
@@ -21,8 +21,11 @@ eval_input: testlist NEWLINE* ENDMARKER
decorator: '@' dotted_name [ '(' [arglist] ')' ] NEWLINE
decorators: decorator+
-decorated: decorators (classdef | funcdef)
+decorated: decorators (classdef | funcdef | async_funcdef)
+
+async_funcdef: ASYNC funcdef
funcdef: 'def' NAME parameters ['->' test] ':' suite
+
parameters: '(' [typedargslist] ')'
typedargslist: (tfpdef ['=' test] (',' tfpdef ['=' test])* [','
['*' [tfpdef] (',' tfpdef ['=' test])* [',' '**' tfpdef] | '**' tfpdef]]
@@ -40,7 +43,7 @@ small_stmt: (expr_stmt | del_stmt | pass_stmt | flow_stmt |
expr_stmt: testlist_star_expr (augassign (yield_expr|testlist) |
('=' (yield_expr|testlist_star_expr))*)
testlist_star_expr: (test|star_expr) (',' (test|star_expr))* [',']
-augassign: ('+=' | '-=' | '*=' | '/=' | '%=' | '&=' | '|=' | '^=' |
+augassign: ('+=' | '-=' | '*=' | '@=' | '/=' | '%=' | '&=' | '|=' | '^=' |
'<<=' | '>>=' | '**=' | '//=')
# For normal assignments, additional restrictions enforced by the interpreter
del_stmt: 'del' exprlist
@@ -65,7 +68,8 @@ global_stmt: 'global' NAME (',' NAME)*
nonlocal_stmt: 'nonlocal' NAME (',' NAME)*
assert_stmt: 'assert' test [',' test]
-compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | with_stmt | funcdef | classdef | decorated
+compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | with_stmt | funcdef | classdef | decorated | async_stmt
+async_stmt: ASYNC (funcdef | with_stmt | for_stmt)
if_stmt: 'if' test ':' suite ('elif' test ':' suite)* ['else' ':' suite]
while_stmt: 'while' test ':' suite ['else' ':' suite]
for_stmt: 'for' exprlist 'in' testlist ':' suite ['else' ':' suite]
@@ -89,7 +93,7 @@ and_test: not_test ('and' not_test)*
not_test: 'not' not_test | comparison
comparison: expr (comp_op expr)*
# <> isn't actually a valid comparison operator in Python. It's here for the
-# sake of a __future__ import described in PEP 401
+# sake of a __future__ import described in PEP 401 (which really works :-)
comp_op: '<'|'>'|'=='|'>='|'<='|'<>'|'!='|'in'|'not' 'in'|'is'|'is' 'not'
star_expr: '*' expr
expr: xor_expr ('|' xor_expr)*
@@ -97,9 +101,10 @@ xor_expr: and_expr ('^' and_expr)*
and_expr: shift_expr ('&' shift_expr)*
shift_expr: arith_expr (('<<'|'>>') arith_expr)*
arith_expr: term (('+'|'-') term)*
-term: factor (('*'|'/'|'%'|'//') factor)*
+term: factor (('*'|'@'|'/'|'%'|'//') factor)*
factor: ('+'|'-'|'~') factor | power
-power: atom trailer* ['**' factor]
+power: atom_expr ['**' factor]
+atom_expr: [AWAIT] atom trailer*
atom: ('(' [yield_expr|testlist_comp] ')' |
'[' [testlist_comp] ']' |
'{' [dictorsetmaker] '}' |
@@ -111,17 +116,29 @@ subscript: test | [test] ':' [test] [sliceop]
sliceop: ':' [test]
exprlist: (expr|star_expr) (',' (expr|star_expr))* [',']
testlist: test (',' test)* [',']
-dictorsetmaker: ( (test ':' test (comp_for | (',' test ':' test)* [','])) |
- (test (comp_for | (',' test)* [','])) )
+dictorsetmaker: ( ((test ':' test | '**' expr)
+ (comp_for | (',' (test ':' test | '**' expr))* [','])) |
+ ((test | star_expr)
+ (comp_for | (',' (test | star_expr))* [','])) )
classdef: 'class' NAME ['(' [arglist] ')'] ':' suite
-arglist: (argument ',')* (argument [',']
- |'*' test (',' argument)* [',' '**' test]
- |'**' test)
+arglist: argument (',' argument)* [',']
+
# The reason that keywords are test nodes instead of NAME is that using NAME
# results in an ambiguity. ast.c makes sure it's a NAME.
-argument: test [comp_for] | test '=' test # Really [keyword '='] test
+# "test '=' test" is really "keyword '=' test", but we have no such token.
+# These need to be in a single rule to avoid grammar that is ambiguous
+# to our LL(1) parser. Even though 'test' includes '*expr' in star_expr,
+# we explicitly match '*' here, too, to give it proper precedence.
+# Illegal combinations and orderings are blocked in ast.c:
+# multiple (test comp_for) arguements are blocked; keyword unpackings
+# that precede iterable unpackings are blocked; etc.
+argument: ( test [comp_for] |
+ test '=' test |
+ '**' test |
+ '*' test )
+
comp_iter: comp_for | comp_if
comp_for: 'for' exprlist 'in' or_test [comp_iter]
comp_if: 'if' test_nocond [comp_iter]
diff --git a/Include/Python-ast.h b/Include/Python-ast.h
index 67d677b233..2d3eacb9c3 100644
--- a/Include/Python-ast.h
+++ b/Include/Python-ast.h
@@ -15,9 +15,9 @@ typedef struct _slice *slice_ty;
typedef enum _boolop { And=1, Or=2 } boolop_ty;
-typedef enum _operator { Add=1, Sub=2, Mult=3, Div=4, Mod=5, Pow=6, LShift=7,
- RShift=8, BitOr=9, BitXor=10, BitAnd=11, FloorDiv=12 }
- operator_ty;
+typedef enum _operator { Add=1, Sub=2, Mult=3, MatMult=4, Div=5, Mod=6, Pow=7,
+ LShift=8, RShift=9, BitOr=10, BitXor=11, BitAnd=12,
+ FloorDiv=13 } operator_ty;
typedef enum _unaryop { Invert=1, Not=2, UAdd=3, USub=4 } unaryop_ty;
@@ -63,12 +63,13 @@ struct _mod {
} v;
};
-enum _stmt_kind {FunctionDef_kind=1, ClassDef_kind=2, Return_kind=3,
- Delete_kind=4, Assign_kind=5, AugAssign_kind=6, For_kind=7,
- While_kind=8, If_kind=9, With_kind=10, Raise_kind=11,
- Try_kind=12, Assert_kind=13, Import_kind=14,
- ImportFrom_kind=15, Global_kind=16, Nonlocal_kind=17,
- Expr_kind=18, Pass_kind=19, Break_kind=20, Continue_kind=21};
+enum _stmt_kind {FunctionDef_kind=1, AsyncFunctionDef_kind=2, ClassDef_kind=3,
+ Return_kind=4, Delete_kind=5, Assign_kind=6,
+ AugAssign_kind=7, For_kind=8, AsyncFor_kind=9, While_kind=10,
+ If_kind=11, With_kind=12, AsyncWith_kind=13, Raise_kind=14,
+ Try_kind=15, Assert_kind=16, Import_kind=17,
+ ImportFrom_kind=18, Global_kind=19, Nonlocal_kind=20,
+ Expr_kind=21, Pass_kind=22, Break_kind=23, Continue_kind=24};
struct _stmt {
enum _stmt_kind kind;
union {
@@ -82,10 +83,16 @@ struct _stmt {
struct {
identifier name;
+ arguments_ty args;
+ asdl_seq *body;
+ asdl_seq *decorator_list;
+ expr_ty returns;
+ } AsyncFunctionDef;
+
+ struct {
+ identifier name;
asdl_seq *bases;
asdl_seq *keywords;
- expr_ty starargs;
- expr_ty kwargs;
asdl_seq *body;
asdl_seq *decorator_list;
} ClassDef;
@@ -117,6 +124,13 @@ struct _stmt {
} For;
struct {
+ expr_ty target;
+ expr_ty iter;
+ asdl_seq *body;
+ asdl_seq *orelse;
+ } AsyncFor;
+
+ struct {
expr_ty test;
asdl_seq *body;
asdl_seq *orelse;
@@ -134,6 +148,11 @@ struct _stmt {
} With;
struct {
+ asdl_seq *items;
+ asdl_seq *body;
+ } AsyncWith;
+
+ struct {
expr_ty exc;
expr_ty cause;
} Raise;
@@ -180,11 +199,11 @@ struct _stmt {
enum _expr_kind {BoolOp_kind=1, BinOp_kind=2, UnaryOp_kind=3, Lambda_kind=4,
IfExp_kind=5, Dict_kind=6, Set_kind=7, ListComp_kind=8,
SetComp_kind=9, DictComp_kind=10, GeneratorExp_kind=11,
- Yield_kind=12, YieldFrom_kind=13, Compare_kind=14,
- Call_kind=15, Num_kind=16, Str_kind=17, Bytes_kind=18,
- NameConstant_kind=19, Ellipsis_kind=20, Attribute_kind=21,
- Subscript_kind=22, Starred_kind=23, Name_kind=24,
- List_kind=25, Tuple_kind=26};
+ Await_kind=12, Yield_kind=13, YieldFrom_kind=14,
+ Compare_kind=15, Call_kind=16, Num_kind=17, Str_kind=18,
+ Bytes_kind=19, NameConstant_kind=20, Ellipsis_kind=21,
+ Attribute_kind=22, Subscript_kind=23, Starred_kind=24,
+ Name_kind=25, List_kind=26, Tuple_kind=27};
struct _expr {
enum _expr_kind kind;
union {
@@ -247,6 +266,10 @@ struct _expr {
struct {
expr_ty value;
+ } Await;
+
+ struct {
+ expr_ty value;
} Yield;
struct {
@@ -263,8 +286,6 @@ struct _expr {
expr_ty func;
asdl_seq *args;
asdl_seq *keywords;
- expr_ty starargs;
- expr_ty kwargs;
} Call;
struct {
@@ -406,11 +427,14 @@ mod_ty _Py_Suite(asdl_seq * body, PyArena *arena);
stmt_ty _Py_FunctionDef(identifier name, arguments_ty args, asdl_seq * body,
asdl_seq * decorator_list, expr_ty returns, int lineno,
int col_offset, PyArena *arena);
-#define ClassDef(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) _Py_ClassDef(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)
+#define AsyncFunctionDef(a0, a1, a2, a3, a4, a5, a6, a7) _Py_AsyncFunctionDef(a0, a1, a2, a3, a4, a5, a6, a7)
+stmt_ty _Py_AsyncFunctionDef(identifier name, arguments_ty args, asdl_seq *
+ body, asdl_seq * decorator_list, expr_ty returns,
+ int lineno, int col_offset, PyArena *arena);
+#define ClassDef(a0, a1, a2, a3, a4, a5, a6, a7) _Py_ClassDef(a0, a1, a2, a3, a4, a5, a6, a7)
stmt_ty _Py_ClassDef(identifier name, asdl_seq * bases, asdl_seq * keywords,
- expr_ty starargs, expr_ty kwargs, asdl_seq * body,
- asdl_seq * decorator_list, int lineno, int col_offset,
- PyArena *arena);
+ asdl_seq * body, asdl_seq * decorator_list, int lineno,
+ int col_offset, PyArena *arena);
#define Return(a0, a1, a2, a3) _Py_Return(a0, a1, a2, a3)
stmt_ty _Py_Return(expr_ty value, int lineno, int col_offset, PyArena *arena);
#define Delete(a0, a1, a2, a3) _Py_Delete(a0, a1, a2, a3)
@@ -425,6 +449,9 @@ stmt_ty _Py_AugAssign(expr_ty target, operator_ty op, expr_ty value, int
#define For(a0, a1, a2, a3, a4, a5, a6) _Py_For(a0, a1, a2, a3, a4, a5, a6)
stmt_ty _Py_For(expr_ty target, expr_ty iter, asdl_seq * body, asdl_seq *
orelse, int lineno, int col_offset, PyArena *arena);
+#define AsyncFor(a0, a1, a2, a3, a4, a5, a6) _Py_AsyncFor(a0, a1, a2, a3, a4, a5, a6)
+stmt_ty _Py_AsyncFor(expr_ty target, expr_ty iter, asdl_seq * body, asdl_seq *
+ orelse, int lineno, int col_offset, PyArena *arena);
#define While(a0, a1, a2, a3, a4, a5) _Py_While(a0, a1, a2, a3, a4, a5)
stmt_ty _Py_While(expr_ty test, asdl_seq * body, asdl_seq * orelse, int lineno,
int col_offset, PyArena *arena);
@@ -434,6 +461,9 @@ stmt_ty _Py_If(expr_ty test, asdl_seq * body, asdl_seq * orelse, int lineno,
#define With(a0, a1, a2, a3, a4) _Py_With(a0, a1, a2, a3, a4)
stmt_ty _Py_With(asdl_seq * items, asdl_seq * body, int lineno, int col_offset,
PyArena *arena);
+#define AsyncWith(a0, a1, a2, a3, a4) _Py_AsyncWith(a0, a1, a2, a3, a4)
+stmt_ty _Py_AsyncWith(asdl_seq * items, asdl_seq * body, int lineno, int
+ col_offset, PyArena *arena);
#define Raise(a0, a1, a2, a3, a4) _Py_Raise(a0, a1, a2, a3, a4)
stmt_ty _Py_Raise(expr_ty exc, expr_ty cause, int lineno, int col_offset,
PyArena *arena);
@@ -496,6 +526,8 @@ expr_ty _Py_DictComp(expr_ty key, expr_ty value, asdl_seq * generators, int
#define GeneratorExp(a0, a1, a2, a3, a4) _Py_GeneratorExp(a0, a1, a2, a3, a4)
expr_ty _Py_GeneratorExp(expr_ty elt, asdl_seq * generators, int lineno, int
col_offset, PyArena *arena);
+#define Await(a0, a1, a2, a3) _Py_Await(a0, a1, a2, a3)
+expr_ty _Py_Await(expr_ty value, int lineno, int col_offset, PyArena *arena);
#define Yield(a0, a1, a2, a3) _Py_Yield(a0, a1, a2, a3)
expr_ty _Py_Yield(expr_ty value, int lineno, int col_offset, PyArena *arena);
#define YieldFrom(a0, a1, a2, a3) _Py_YieldFrom(a0, a1, a2, a3)
@@ -504,10 +536,9 @@ expr_ty _Py_YieldFrom(expr_ty value, int lineno, int col_offset, PyArena
#define Compare(a0, a1, a2, a3, a4, a5) _Py_Compare(a0, a1, a2, a3, a4, a5)
expr_ty _Py_Compare(expr_ty left, asdl_int_seq * ops, asdl_seq * comparators,
int lineno, int col_offset, PyArena *arena);
-#define Call(a0, a1, a2, a3, a4, a5, a6, a7) _Py_Call(a0, a1, a2, a3, a4, a5, a6, a7)
-expr_ty _Py_Call(expr_ty func, asdl_seq * args, asdl_seq * keywords, expr_ty
- starargs, expr_ty kwargs, int lineno, int col_offset, PyArena
- *arena);
+#define Call(a0, a1, a2, a3, a4, a5) _Py_Call(a0, a1, a2, a3, a4, a5)
+expr_ty _Py_Call(expr_ty func, asdl_seq * args, asdl_seq * keywords, int
+ lineno, int col_offset, PyArena *arena);
#define Num(a0, a1, a2, a3) _Py_Num(a0, a1, a2, a3)
expr_ty _Py_Num(object n, int lineno, int col_offset, PyArena *arena);
#define Str(a0, a1, a2, a3) _Py_Str(a0, a1, a2, a3)
@@ -554,8 +585,9 @@ excepthandler_ty _Py_ExceptHandler(expr_ty type, identifier name, asdl_seq *
arguments_ty _Py_arguments(asdl_seq * args, arg_ty vararg, asdl_seq *
kwonlyargs, asdl_seq * kw_defaults, arg_ty kwarg,
asdl_seq * defaults, PyArena *arena);
-#define arg(a0, a1, a2) _Py_arg(a0, a1, a2)
-arg_ty _Py_arg(identifier arg, expr_ty annotation, PyArena *arena);
+#define arg(a0, a1, a2, a3, a4) _Py_arg(a0, a1, a2, a3, a4)
+arg_ty _Py_arg(identifier arg, expr_ty annotation, int lineno, int col_offset,
+ PyArena *arena);
#define keyword(a0, a1, a2) _Py_keyword(a0, a1, a2)
keyword_ty _Py_keyword(identifier arg, expr_ty value, PyArena *arena);
#define alias(a0, a1, a2) _Py_alias(a0, a1, a2)
diff --git a/Include/Python.h b/Include/Python.h
index 2dd82903bc..858dbd1a66 100644
--- a/Include/Python.h
+++ b/Include/Python.h
@@ -85,6 +85,7 @@
#include "tupleobject.h"
#include "listobject.h"
#include "dictobject.h"
+#include "odictobject.h"
#include "enumobject.h"
#include "setobject.h"
#include "methodobject.h"
@@ -112,6 +113,7 @@
#include "pyarena.h"
#include "modsupport.h"
#include "pythonrun.h"
+#include "pylifecycle.h"
#include "ceval.h"
#include "sysmodule.h"
#include "intrcheck.h"
diff --git a/Include/abstract.h b/Include/abstract.h
index bbedafd8c2..4ff79f2928 100644
--- a/Include/abstract.h
+++ b/Include/abstract.h
@@ -192,8 +192,8 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
int PyObject_SetAttrString(PyObject *o, const char *attr_name, PyObject *v);
Set the value of the attribute named attr_name, for object o,
- to the value, v. Returns -1 on failure. This is
- the equivalent of the Python statement: o.attr_name=v.
+ to the value v. Raise an exception and return -1 on failure; return 0 on
+ success. This is the equivalent of the Python statement o.attr_name=v.
*/
@@ -202,8 +202,8 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
int PyObject_SetAttr(PyObject *o, PyObject *attr_name, PyObject *v);
Set the value of the attribute named attr_name, for object o,
- to the value, v. Returns -1 on failure. This is
- the equivalent of the Python statement: o.attr_name=v.
+ to the value v. Raise an exception and return -1 on failure; return 0 on
+ success. This is the equivalent of the Python statement o.attr_name=v.
*/
@@ -266,6 +266,12 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
PyAPI_FUNC(PyObject *) PyObject_Call(PyObject *callable_object,
PyObject *args, PyObject *kw);
+#ifndef Py_LIMITED_API
+ PyAPI_FUNC(PyObject *) _Py_CheckFunctionResult(PyObject *func,
+ PyObject *result,
+ const char *where);
+#endif
+
/*
Call a callable Python object, callable_object, with
arguments and keywords arguments. The 'args' argument can not be
@@ -429,9 +435,9 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
PyAPI_FUNC(int) PyObject_SetItem(PyObject *o, PyObject *key, PyObject *v);
/*
- Map the object, key, to the value, v. Returns
- -1 on failure. This is the equivalent of the Python
- statement: o[key]=v.
+ Map the object key to the value v. Raise an exception and return -1
+ on failure; return 0 on success. This is the equivalent of the Python
+ statement o[key]=v.
*/
PyAPI_FUNC(int) PyObject_DelItemString(PyObject *o, const char *key);
@@ -658,6 +664,12 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
o1*o2.
*/
+ PyAPI_FUNC(PyObject *) PyNumber_MatrixMultiply(PyObject *o1, PyObject *o2);
+
+ /*
+ This is the equivalent of the Python expression: o1 @ o2.
+ */
+
PyAPI_FUNC(PyObject *) PyNumber_FloorDivide(PyObject *o1, PyObject *o2);
/*
@@ -832,6 +844,12 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
o1 *= o2.
*/
+ PyAPI_FUNC(PyObject *) PyNumber_InPlaceMatrixMultiply(PyObject *o1, PyObject *o2);
+
+ /*
+ This is the equivalent of the Python expression: o1 @= o2.
+ */
+
PyAPI_FUNC(PyObject *) PyNumber_InPlaceFloorDivide(PyObject *o1,
PyObject *o2);
@@ -975,9 +993,9 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
PyAPI_FUNC(int) PySequence_SetItem(PyObject *o, Py_ssize_t i, PyObject *v);
/*
- Assign object v to the ith element of o. Returns
- -1 on failure. This is the equivalent of the Python
- statement: o[i]=v.
+ Assign object v to the ith element of o. Raise an exception and return
+ -1 on failure; return 0 on success. This is the equivalent of the
+ Python statement o[i]=v.
*/
PyAPI_FUNC(int) PySequence_DelItem(PyObject *o, Py_ssize_t i);
@@ -1198,23 +1216,23 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
PyAPI_FUNC(PyObject *) PyMapping_Keys(PyObject *o);
/*
- On success, return a list or tuple of the keys in object o.
- On failure, return NULL.
+ On success, return a list, a tuple or a dictionary view in case of a dict,
+ of the keys in object o. On failure, return NULL.
*/
PyAPI_FUNC(PyObject *) PyMapping_Values(PyObject *o);
/*
- On success, return a list or tuple of the values in object o.
- On failure, return NULL.
+ On success, return a list, a tuple or a dictionary view in case of a dict,
+ of the values in object o. On failure, return NULL.
*/
PyAPI_FUNC(PyObject *) PyMapping_Items(PyObject *o);
/*
- On success, return a list or tuple of the items in object o,
- where each item is a tuple containing a key-value pair.
- On failure, return NULL.
+ On success, return a list, a tuple or a dictionary view in case of a dict,
+ of the items in object o, where each item is a tuple containing a key-value
+ pair. On failure, return NULL.
*/
diff --git a/Include/bytes_methods.h b/Include/bytes_methods.h
index 1498b8f83c..11d5f42752 100644
--- a/Include/bytes_methods.h
+++ b/Include/bytes_methods.h
@@ -21,8 +21,8 @@ extern void _Py_bytes_title(char *result, char *s, Py_ssize_t len);
extern void _Py_bytes_capitalize(char *result, char *s, Py_ssize_t len);
extern void _Py_bytes_swapcase(char *result, char *s, Py_ssize_t len);
-/* This one gets the raw argument list. */
-extern PyObject* _Py_bytes_maketrans(PyObject *args);
+/* The maketrans() static method. */
+extern PyObject* _Py_bytes_maketrans(Py_buffer *frm, Py_buffer *to);
/* Shared __doc__ strings. */
extern const char _Py_isspace__doc__[];
diff --git a/Include/bytesobject.h b/Include/bytesobject.h
index 0ee8d366d4..6c1e0c3aac 100644
--- a/Include/bytesobject.h
+++ b/Include/bytesobject.h
@@ -62,6 +62,7 @@ PyAPI_FUNC(void) PyBytes_Concat(PyObject **, PyObject *);
PyAPI_FUNC(void) PyBytes_ConcatAndDel(PyObject **, PyObject *);
#ifndef Py_LIMITED_API
PyAPI_FUNC(int) _PyBytes_Resize(PyObject **, Py_ssize_t);
+PyAPI_FUNC(PyObject *) _PyBytes_Format(PyObject *, PyObject *);
#endif
PyAPI_FUNC(PyObject *) PyBytes_DecodeEscape(const char *, Py_ssize_t,
const char *, Py_ssize_t,
@@ -81,7 +82,7 @@ PyAPI_FUNC(PyObject *) _PyBytes_Join(PyObject *sep, PyObject *x);
#endif
/* Provides access to the internal data buffer and size of a string
- object or the default encoded version of an Unicode object. Passing
+ object or the default encoded version of a Unicode object. Passing
NULL as *len parameter will force the string buffer to be
0-terminated (passing a string with embedded NULL characters will
cause an exception). */
diff --git a/Include/ceval.h b/Include/ceval.h
index 4937f2c431..b5373a9cc4 100644
--- a/Include/ceval.h
+++ b/Include/ceval.h
@@ -23,6 +23,8 @@ PyAPI_FUNC(PyObject *) PyEval_CallMethod(PyObject *obj,
#ifndef Py_LIMITED_API
PyAPI_FUNC(void) PyEval_SetProfile(Py_tracefunc, PyObject *);
PyAPI_FUNC(void) PyEval_SetTrace(Py_tracefunc, PyObject *);
+PyAPI_FUNC(void) _PyEval_SetCoroutineWrapper(PyObject *);
+PyAPI_FUNC(PyObject *) _PyEval_GetCoroutineWrapper(void);
#endif
struct _frame; /* Avoid including frameobject.h */
@@ -46,16 +48,16 @@ PyAPI_FUNC(int) Py_MakePendingCalls(void);
In Python 3.0, this protection has two levels:
* normal anti-recursion protection is triggered when the recursion level
- exceeds the current recursion limit. It raises a RuntimeError, and sets
+ exceeds the current recursion limit. It raises a RecursionError, and sets
the "overflowed" flag in the thread state structure. This flag
temporarily *disables* the normal protection; this allows cleanup code
to potentially outgrow the recursion limit while processing the
- RuntimeError.
+ RecursionError.
* "last chance" anti-recursion protection is triggered when the recursion
level exceeds "current recursion limit + 50". By construction, this
protection can only be triggered when the "overflowed" flag is set. It
means the cleanup code has itself gone into an infinite loop, or the
- RuntimeError has been mistakingly ignored. When this protection is
+ RecursionError has been mistakingly ignored. When this protection is
triggered, the interpreter aborts with a Fatal Error.
In addition, the "overflowed" flag is automatically reset when the
@@ -92,10 +94,16 @@ PyAPI_DATA(int) _Py_CheckRecursionLimit;
# define _Py_MakeRecCheck(x) (++(x) > _Py_CheckRecursionLimit)
#endif
+/* Compute the "lower-water mark" for a recursion limit. When
+ * Py_LeaveRecursiveCall() is called with a recursion depth below this mark,
+ * the overflowed flag is reset to 0. */
+#define _Py_RecursionLimitLowerWaterMark(limit) \
+ (((limit) > 200) \
+ ? ((limit) - 50) \
+ : (3 * ((limit) >> 2)))
+
#define _Py_MakeEndRecCheck(x) \
- (--(x) < ((_Py_CheckRecursionLimit > 100) \
- ? (_Py_CheckRecursionLimit - 50) \
- : (3 * (_Py_CheckRecursionLimit >> 2))))
+ (--(x) < _Py_RecursionLimitLowerWaterMark(_Py_CheckRecursionLimit))
#define Py_ALLOW_RECURSION \
do { unsigned char _old = PyThreadState_GET()->recursion_critical;\
diff --git a/Include/code.h b/Include/code.h
index 7c7e5bf8dc..8ecf38a324 100644
--- a/Include/code.h
+++ b/Include/code.h
@@ -21,7 +21,12 @@ typedef struct {
PyObject *co_varnames; /* tuple of strings (local variable names) */
PyObject *co_freevars; /* tuple of strings (free variable names) */
PyObject *co_cellvars; /* tuple of strings (cell variable names) */
- /* The rest doesn't count for hash or comparisons */
+ /* The rest aren't used in either hash or comparisons, except for
+ co_name (used in both) and co_firstlineno (used only in
+ comparisons). This is done to preserve the name and line number
+ for tracebacks and debuggers; otherwise, constant de-duplication
+ would collapse identical functions/lambdas defined on different lines.
+ */
unsigned char *co_cell2arg; /* Maps cell vars which are arguments. */
PyObject *co_filename; /* unicode (where it was loaded from) */
PyObject *co_name; /* unicode (name, for reference) */
@@ -46,6 +51,11 @@ typedef struct {
*/
#define CO_NOFREE 0x0040
+/* The CO_COROUTINE flag is set for coroutine functions (defined with
+ ``async def`` keywords) */
+#define CO_COROUTINE 0x0080
+#define CO_ITERABLE_COROUTINE 0x0100
+
/* These are no longer used. */
#if 0
#define CO_GENERATOR_ALLOWED 0x1000
@@ -57,6 +67,7 @@ typedef struct {
#define CO_FUTURE_UNICODE_LITERALS 0x20000
#define CO_FUTURE_BARRY_AS_BDFL 0x40000
+#define CO_FUTURE_GENERATOR_STOP 0x80000
/* This value is found in the co_cell2arg array when the associated cell
variable does not correspond to an argument. The maximum number of
@@ -97,12 +108,21 @@ typedef struct _addr_pair {
int ap_upper;
} PyAddrPair;
+#ifndef Py_LIMITED_API
/* Update *bounds to describe the first and one-past-the-last instructions in the
same line as lasti. Return the number of that line.
*/
-#ifndef Py_LIMITED_API
PyAPI_FUNC(int) _PyCode_CheckLineNumber(PyCodeObject* co,
int lasti, PyAddrPair *bounds);
+
+/* Create a comparable key used to compare constants taking in account the
+ * object type. It is used to make sure types are not coerced (e.g., float and
+ * complex) _and_ to distinguish 0.0 from -0.0 e.g. on IEEE platforms
+ *
+ * Return (type(obj), obj, ...): a tuple with variable size (at least 2 items)
+ * depending on the type and the value. The type is the first item to not
+ * compare bytes and str which can raise a BytesWarning exception. */
+PyAPI_FUNC(PyObject*) _PyCode_ConstantKey(PyObject *obj);
#endif
PyAPI_FUNC(PyObject*) PyCode_Optimize(PyObject *code, PyObject* consts,
diff --git a/Include/codecs.h b/Include/codecs.h
index dfcfa9c1b6..f8275a121d 100644
--- a/Include/codecs.h
+++ b/Include/codecs.h
@@ -71,7 +71,7 @@ PyAPI_FUNC(int) PyCodec_KnownEncoding(
object is passed through the encoder function found for the given
encoding using the error handling method defined by errors. errors
may be NULL to use the default method defined for the codec.
-
+
Raises a LookupError in case no encoder can be found.
*/
@@ -87,7 +87,7 @@ PyAPI_FUNC(PyObject *) PyCodec_Encode(
object is passed through the decoder function found for the given
encoding using the error handling method defined by errors. errors
may be NULL to use the default method defined for the codec.
-
+
Raises a LookupError in case no encoder can be found.
*/
@@ -145,7 +145,7 @@ PyAPI_FUNC(PyObject *) _PyCodecInfo_GetIncrementalEncoder(
-/* --- Codec Lookup APIs --------------------------------------------------
+/* --- Codec Lookup APIs --------------------------------------------------
All APIs return a codec object with incremented refcount and are
based on _PyCodec_Lookup(). The same comments w/r to the encoding
@@ -225,6 +225,9 @@ PyAPI_FUNC(PyObject *) PyCodec_XMLCharRefReplaceErrors(PyObject *exc);
/* replace the unicode encode error with backslash escapes (\x, \u and \U) */
PyAPI_FUNC(PyObject *) PyCodec_BackslashReplaceErrors(PyObject *exc);
+/* replace the unicode encode error with backslash escapes (\N, \x, \u and \U) */
+PyAPI_FUNC(PyObject *) PyCodec_NameReplaceErrors(PyObject *exc);
+
PyAPI_DATA(const char *) Py_hexdigits;
#ifdef __cplusplus
diff --git a/Include/compile.h b/Include/compile.h
index c6650d7f77..ecd8dc1d10 100644
--- a/Include/compile.h
+++ b/Include/compile.h
@@ -27,6 +27,7 @@ typedef struct {
#define FUTURE_PRINT_FUNCTION "print_function"
#define FUTURE_UNICODE_LITERALS "unicode_literals"
#define FUTURE_BARRY_AS_BDFL "barry_as_FLUFL"
+#define FUTURE_GENERATOR_STOP "generator_stop"
struct _mod; /* Declare the existence of this type */
#define PyAST_Compile(mod, s, f, ar) PyAST_CompileEx(mod, s, f, -1, ar)
diff --git a/Include/complexobject.h b/Include/complexobject.h
index 1934f3b380..cb8c52c580 100644
--- a/Include/complexobject.h
+++ b/Include/complexobject.h
@@ -14,21 +14,13 @@ typedef struct {
/* Operations on complex numbers from complexmodule.c */
-#define c_sum _Py_c_sum
-#define c_diff _Py_c_diff
-#define c_neg _Py_c_neg
-#define c_prod _Py_c_prod
-#define c_quot _Py_c_quot
-#define c_pow _Py_c_pow
-#define c_abs _Py_c_abs
-
-PyAPI_FUNC(Py_complex) c_sum(Py_complex, Py_complex);
-PyAPI_FUNC(Py_complex) c_diff(Py_complex, Py_complex);
-PyAPI_FUNC(Py_complex) c_neg(Py_complex);
-PyAPI_FUNC(Py_complex) c_prod(Py_complex, Py_complex);
-PyAPI_FUNC(Py_complex) c_quot(Py_complex, Py_complex);
-PyAPI_FUNC(Py_complex) c_pow(Py_complex, Py_complex);
-PyAPI_FUNC(double) c_abs(Py_complex);
+PyAPI_FUNC(Py_complex) _Py_c_sum(Py_complex, Py_complex);
+PyAPI_FUNC(Py_complex) _Py_c_diff(Py_complex, Py_complex);
+PyAPI_FUNC(Py_complex) _Py_c_neg(Py_complex);
+PyAPI_FUNC(Py_complex) _Py_c_prod(Py_complex, Py_complex);
+PyAPI_FUNC(Py_complex) _Py_c_quot(Py_complex, Py_complex);
+PyAPI_FUNC(Py_complex) _Py_c_pow(Py_complex, Py_complex);
+PyAPI_FUNC(double) _Py_c_abs(Py_complex);
#endif
/* Complex object interface */
diff --git a/Include/dictobject.h b/Include/dictobject.h
index ef122bde97..ba90aaf676 100644
--- a/Include/dictobject.h
+++ b/Include/dictobject.h
@@ -27,6 +27,11 @@ typedef struct {
PyObject **ma_values;
} PyDictObject;
+typedef struct {
+ PyObject_HEAD
+ PyDictObject *dv_dict;
+} _PyDictViewObject;
+
#endif /* Py_LIMITED_API */
PyAPI_DATA(PyTypeObject) PyDict_Type;
@@ -40,9 +45,9 @@ PyAPI_DATA(PyTypeObject) PyDictValues_Type;
#define PyDict_Check(op) \
PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_DICT_SUBCLASS)
#define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
-#define PyDictKeys_Check(op) (Py_TYPE(op) == &PyDictKeys_Type)
-#define PyDictItems_Check(op) (Py_TYPE(op) == &PyDictItems_Type)
-#define PyDictValues_Check(op) (Py_TYPE(op) == &PyDictValues_Type)
+#define PyDictKeys_Check(op) PyObject_TypeCheck(op, &PyDictKeys_Type)
+#define PyDictItems_Check(op) PyObject_TypeCheck(op, &PyDictItems_Type)
+#define PyDictValues_Check(op) PyObject_TypeCheck(op, &PyDictValues_Type)
/* This excludes Values, since they are not sets. */
# define PyDictViewSet_Check(op) \
(PyDictKeys_Check(op) || PyDictItems_Check(op))
@@ -50,6 +55,10 @@ PyAPI_DATA(PyTypeObject) PyDictValues_Type;
PyAPI_FUNC(PyObject *) PyDict_New(void);
PyAPI_FUNC(PyObject *) PyDict_GetItem(PyObject *mp, PyObject *key);
+#ifndef Py_LIMITED_API
+PyAPI_FUNC(PyObject *) _PyDict_GetItem_KnownHash(PyObject *mp, PyObject *key,
+ Py_hash_t hash);
+#endif
PyAPI_FUNC(PyObject *) PyDict_GetItemWithError(PyObject *mp, PyObject *key);
PyAPI_FUNC(PyObject *) _PyDict_GetItemIdWithError(PyObject *dp,
struct _Py_Identifier *key);
@@ -58,7 +67,15 @@ PyAPI_FUNC(PyObject *) PyDict_SetDefault(
PyObject *mp, PyObject *key, PyObject *defaultobj);
#endif
PyAPI_FUNC(int) PyDict_SetItem(PyObject *mp, PyObject *key, PyObject *item);
+#ifndef Py_LIMITED_API
+PyAPI_FUNC(int) _PyDict_SetItem_KnownHash(PyObject *mp, PyObject *key,
+ PyObject *item, Py_hash_t hash);
+#endif
PyAPI_FUNC(int) PyDict_DelItem(PyObject *mp, PyObject *key);
+#ifndef Py_LIMITED_API
+PyAPI_FUNC(int) _PyDict_DelItem_KnownHash(PyObject *mp, PyObject *key,
+ Py_hash_t hash);
+#endif
PyAPI_FUNC(void) PyDict_Clear(PyObject *mp);
PyAPI_FUNC(int) PyDict_Next(
PyObject *mp, Py_ssize_t *pos, PyObject **key, PyObject **value);
@@ -67,6 +84,7 @@ PyDictKeysObject *_PyDict_NewKeysForClass(void);
PyAPI_FUNC(PyObject *) PyObject_GenericGetDict(PyObject *, void *);
PyAPI_FUNC(int) _PyDict_Next(
PyObject *mp, Py_ssize_t *pos, PyObject **key, PyObject **value, Py_hash_t *hash);
+PyObject *_PyDictView_New(PyObject *, PyTypeObject *);
#endif
PyAPI_FUNC(PyObject *) PyDict_Keys(PyObject *mp);
PyAPI_FUNC(PyObject *) PyDict_Values(PyObject *mp);
@@ -80,6 +98,9 @@ PyAPI_FUNC(PyObject *) _PyDict_NewPresized(Py_ssize_t minused);
PyAPI_FUNC(void) _PyDict_MaybeUntrack(PyObject *mp);
PyAPI_FUNC(int) _PyDict_HasOnlyStringKeys(PyObject *mp);
Py_ssize_t _PyDict_KeysSize(PyDictKeysObject *keys);
+Py_ssize_t _PyDict_SizeOf(PyDictObject *);
+PyObject *_PyDict_Pop(PyDictObject *, PyObject *, PyObject *);
+PyObject *_PyDict_FromKeys(PyObject *, PyObject *, PyObject *);
#define _PyDict_HasSplitTable(d) ((d)->ma_values != NULL)
PyAPI_FUNC(int) PyDict_ClearFreeList(void);
@@ -97,6 +118,10 @@ PyAPI_FUNC(int) PyDict_Merge(PyObject *mp,
PyObject *other,
int override);
+#ifndef Py_LIMITED_API
+PyAPI_FUNC(PyObject *) _PyDictView_Intersect(PyObject* self, PyObject *other);
+#endif
+
/* PyDict_MergeFromSeq2 updates/merges from an iterable object producing
iterable objects of length 2. If override is true, the last occurrence
of a key wins, else the first. The Python dict constructor dict(seq2)
diff --git a/Include/fileobject.h b/Include/fileobject.h
index 0939744e6d..03155d3da7 100644
--- a/Include/fileobject.h
+++ b/Include/fileobject.h
@@ -32,17 +32,6 @@ PyAPI_DATA(int) Py_HasFileSystemDefaultEncoding;
#ifndef Py_LIMITED_API
PyAPI_FUNC(PyObject *) PyFile_NewStdPrinter(int);
PyAPI_DATA(PyTypeObject) PyStdPrinter_Type;
-
-#if defined _MSC_VER && _MSC_VER >= 1400
-/* A routine to check if a file descriptor is valid on Windows. Returns 0
- * and sets errno to EBADF if it isn't. This is to avoid Assertions
- * from various functions in the Windows CRT beginning with
- * Visual Studio 2005
- */
-int _PyVerify_fd(int fd);
-#else
-#define _PyVerify_fd(A) (1) /* dummy */
-#endif
#endif /* Py_LIMITED_API */
/* A routine to check if a file descriptor can be select()-ed. */
diff --git a/Include/fileutils.h b/Include/fileutils.h
index e9bad80b87..b4a683c176 100644
--- a/Include/fileutils.h
+++ b/Include/fileutils.h
@@ -7,30 +7,59 @@ extern "C" {
PyAPI_FUNC(PyObject *) _Py_device_encoding(int);
-PyAPI_FUNC(wchar_t *) _Py_char2wchar(
+PyAPI_FUNC(wchar_t *) Py_DecodeLocale(
const char *arg,
size_t *size);
-PyAPI_FUNC(char*) _Py_wchar2char(
+PyAPI_FUNC(char*) Py_EncodeLocale(
const wchar_t *text,
size_t *error_pos);
-#if defined(HAVE_STAT) && !defined(MS_WINDOWS)
-PyAPI_FUNC(int) _Py_wstat(
- const wchar_t* path,
- struct stat *buf);
+#ifndef Py_LIMITED_API
+
+#ifdef MS_WINDOWS
+struct _Py_stat_struct {
+ unsigned long st_dev;
+ __int64 st_ino;
+ unsigned short st_mode;
+ int st_nlink;
+ int st_uid;
+ int st_gid;
+ unsigned long st_rdev;
+ __int64 st_size;
+ time_t st_atime;
+ int st_atime_nsec;
+ time_t st_mtime;
+ int st_mtime_nsec;
+ time_t st_ctime;
+ int st_ctime_nsec;
+ unsigned long st_file_attributes;
+};
+#else
+# define _Py_stat_struct stat
#endif
-#ifdef HAVE_STAT
+PyAPI_FUNC(int) _Py_fstat(
+ int fd,
+ struct _Py_stat_struct *status);
+
+PyAPI_FUNC(int) _Py_fstat_noraise(
+ int fd,
+ struct _Py_stat_struct *status);
+#endif /* Py_LIMITED_API */
+
PyAPI_FUNC(int) _Py_stat(
PyObject *path,
- struct stat *statbuf);
-#endif
+ struct stat *status);
#ifndef Py_LIMITED_API
PyAPI_FUNC(int) _Py_open(
const char *pathname,
int flags);
+
+PyAPI_FUNC(int) _Py_open_noraise(
+ const char *pathname,
+ int flags);
#endif
PyAPI_FUNC(FILE *) _Py_wfopen(
@@ -45,6 +74,21 @@ PyAPI_FUNC(FILE*) _Py_fopen_obj(
PyObject *path,
const char *mode);
+PyAPI_FUNC(Py_ssize_t) _Py_read(
+ int fd,
+ void *buf,
+ size_t count);
+
+PyAPI_FUNC(Py_ssize_t) _Py_write(
+ int fd,
+ const void *buf,
+ size_t count);
+
+PyAPI_FUNC(Py_ssize_t) _Py_write_noraise(
+ int fd,
+ const void *buf,
+ size_t count);
+
#ifdef HAVE_READLINK
PyAPI_FUNC(int) _Py_wreadlink(
const wchar_t *path,
@@ -70,8 +114,27 @@ PyAPI_FUNC(int) _Py_set_inheritable(int fd, int inheritable,
int *atomic_flag_works);
PyAPI_FUNC(int) _Py_dup(int fd);
+
+#ifndef MS_WINDOWS
+PyAPI_FUNC(int) _Py_get_blocking(int fd);
+
+PyAPI_FUNC(int) _Py_set_blocking(int fd, int blocking);
+#endif /* !MS_WINDOWS */
+
+#if defined _MSC_VER && _MSC_VER >= 1400 && _MSC_VER < 1900
+/* A routine to check if a file descriptor is valid on Windows. Returns 0
+ * and sets errno to EBADF if it isn't. This is to avoid Assertions
+ * from various functions in the Windows CRT beginning with
+ * Visual Studio 2005
+ */
+int _PyVerify_fd(int fd);
+
+#else
+#define _PyVerify_fd(A) (1) /* dummy */
#endif
+#endif /* Py_LIMITED_API */
+
#ifdef __cplusplus
}
#endif
diff --git a/Include/frameobject.h b/Include/frameobject.h
index 966ff1f6e6..00c50933dc 100644
--- a/Include/frameobject.h
+++ b/Include/frameobject.h
@@ -28,13 +28,13 @@ typedef struct _frame {
PyObject **f_stacktop;
PyObject *f_trace; /* Trace function */
- /* In a generator, we need to be able to swap between the exception
- state inside the generator and the exception state of the calling
- frame (which shouldn't be impacted when the generator "yields"
- from an except handler).
- These three fields exist exactly for that, and are unused for
- non-generator frames. See the save_exc_state and swap_exc_state
- functions in ceval.c for details of their use. */
+ /* In a generator, we need to be able to swap between the exception
+ state inside the generator and the exception state of the calling
+ frame (which shouldn't be impacted when the generator "yields"
+ from an except handler).
+ These three fields exist exactly for that, and are unused for
+ non-generator frames. See the save_exc_state and swap_exc_state
+ functions in ceval.c for details of their use. */
PyObject *f_exc_type, *f_exc_value, *f_exc_traceback;
/* Borrowed reference to a generator, or NULL */
PyObject *f_gen;
diff --git a/Include/genobject.h b/Include/genobject.h
index 65f1ecfd54..1ff32a8eaf 100644
--- a/Include/genobject.h
+++ b/Include/genobject.h
@@ -10,21 +10,26 @@ extern "C" {
struct _frame; /* Avoid including frameobject.h */
+/* _PyGenObject_HEAD defines the initial segment of generator
+ and coroutine objects. */
+#define _PyGenObject_HEAD(prefix) \
+ PyObject_HEAD \
+ /* Note: gi_frame can be NULL if the generator is "finished" */ \
+ struct _frame *prefix##_frame; \
+ /* True if generator is being executed. */ \
+ char prefix##_running; \
+ /* The code object backing the generator */ \
+ PyObject *prefix##_code; \
+ /* List of weak reference. */ \
+ PyObject *prefix##_weakreflist; \
+ /* Name of the generator. */ \
+ PyObject *prefix##_name; \
+ /* Qualified name of the generator. */ \
+ PyObject *prefix##_qualname;
+
typedef struct {
- PyObject_HEAD
/* The gi_ prefix is intended to remind of generator-iterator. */
-
- /* Note: gi_frame can be NULL if the generator is "finished" */
- struct _frame *gi_frame;
-
- /* True if generator is being executed. */
- char gi_running;
-
- /* The code object backing the generator */
- PyObject *gi_code;
-
- /* List of weak reference. */
- PyObject *gi_weakreflist;
+ _PyGenObject_HEAD(gi)
} PyGenObject;
PyAPI_DATA(PyTypeObject) PyGen_Type;
@@ -33,11 +38,32 @@ PyAPI_DATA(PyTypeObject) PyGen_Type;
#define PyGen_CheckExact(op) (Py_TYPE(op) == &PyGen_Type)
PyAPI_FUNC(PyObject *) PyGen_New(struct _frame *);
+PyAPI_FUNC(PyObject *) PyGen_NewWithQualName(struct _frame *,
+ PyObject *name, PyObject *qualname);
PyAPI_FUNC(int) PyGen_NeedsFinalizing(PyGenObject *);
PyAPI_FUNC(int) _PyGen_FetchStopIterationValue(PyObject **);
PyObject *_PyGen_Send(PyGenObject *, PyObject *);
+PyObject *_PyGen_yf(PyGenObject *);
PyAPI_FUNC(void) _PyGen_Finalize(PyObject *self);
+#ifndef Py_LIMITED_API
+typedef struct {
+ _PyGenObject_HEAD(cr)
+} PyCoroObject;
+
+PyAPI_DATA(PyTypeObject) PyCoro_Type;
+PyAPI_DATA(PyTypeObject) _PyCoroWrapper_Type;
+
+PyAPI_DATA(PyTypeObject) _PyAIterWrapper_Type;
+PyObject *_PyAIterWrapper_New(PyObject *aiter);
+
+#define PyCoro_CheckExact(op) (Py_TYPE(op) == &PyCoro_Type)
+PyObject *_PyCoro_GetAwaitableIter(PyObject *o);
+PyAPI_FUNC(PyObject *) PyCoro_New(struct _frame *,
+ PyObject *name, PyObject *qualname);
+#endif
+
+#undef _PyGenObject_HEAD
#ifdef __cplusplus
}
diff --git a/Include/graminit.h b/Include/graminit.h
index 3ec949ab46..d030bc3d29 100644
--- a/Include/graminit.h
+++ b/Include/graminit.h
@@ -6,79 +6,82 @@
#define decorator 259
#define decorators 260
#define decorated 261
-#define funcdef 262
-#define parameters 263
-#define typedargslist 264
-#define tfpdef 265
-#define varargslist 266
-#define vfpdef 267
-#define stmt 268
-#define simple_stmt 269
-#define small_stmt 270
-#define expr_stmt 271
-#define testlist_star_expr 272
-#define augassign 273
-#define del_stmt 274
-#define pass_stmt 275
-#define flow_stmt 276
-#define break_stmt 277
-#define continue_stmt 278
-#define return_stmt 279
-#define yield_stmt 280
-#define raise_stmt 281
-#define import_stmt 282
-#define import_name 283
-#define import_from 284
-#define import_as_name 285
-#define dotted_as_name 286
-#define import_as_names 287
-#define dotted_as_names 288
-#define dotted_name 289
-#define global_stmt 290
-#define nonlocal_stmt 291
-#define assert_stmt 292
-#define compound_stmt 293
-#define if_stmt 294
-#define while_stmt 295
-#define for_stmt 296
-#define try_stmt 297
-#define with_stmt 298
-#define with_item 299
-#define except_clause 300
-#define suite 301
-#define test 302
-#define test_nocond 303
-#define lambdef 304
-#define lambdef_nocond 305
-#define or_test 306
-#define and_test 307
-#define not_test 308
-#define comparison 309
-#define comp_op 310
-#define star_expr 311
-#define expr 312
-#define xor_expr 313
-#define and_expr 314
-#define shift_expr 315
-#define arith_expr 316
-#define term 317
-#define factor 318
-#define power 319
-#define atom 320
-#define testlist_comp 321
-#define trailer 322
-#define subscriptlist 323
-#define subscript 324
-#define sliceop 325
-#define exprlist 326
-#define testlist 327
-#define dictorsetmaker 328
-#define classdef 329
-#define arglist 330
-#define argument 331
-#define comp_iter 332
-#define comp_for 333
-#define comp_if 334
-#define encoding_decl 335
-#define yield_expr 336
-#define yield_arg 337
+#define async_funcdef 262
+#define funcdef 263
+#define parameters 264
+#define typedargslist 265
+#define tfpdef 266
+#define varargslist 267
+#define vfpdef 268
+#define stmt 269
+#define simple_stmt 270
+#define small_stmt 271
+#define expr_stmt 272
+#define testlist_star_expr 273
+#define augassign 274
+#define del_stmt 275
+#define pass_stmt 276
+#define flow_stmt 277
+#define break_stmt 278
+#define continue_stmt 279
+#define return_stmt 280
+#define yield_stmt 281
+#define raise_stmt 282
+#define import_stmt 283
+#define import_name 284
+#define import_from 285
+#define import_as_name 286
+#define dotted_as_name 287
+#define import_as_names 288
+#define dotted_as_names 289
+#define dotted_name 290
+#define global_stmt 291
+#define nonlocal_stmt 292
+#define assert_stmt 293
+#define compound_stmt 294
+#define async_stmt 295
+#define if_stmt 296
+#define while_stmt 297
+#define for_stmt 298
+#define try_stmt 299
+#define with_stmt 300
+#define with_item 301
+#define except_clause 302
+#define suite 303
+#define test 304
+#define test_nocond 305
+#define lambdef 306
+#define lambdef_nocond 307
+#define or_test 308
+#define and_test 309
+#define not_test 310
+#define comparison 311
+#define comp_op 312
+#define star_expr 313
+#define expr 314
+#define xor_expr 315
+#define and_expr 316
+#define shift_expr 317
+#define arith_expr 318
+#define term 319
+#define factor 320
+#define power 321
+#define atom_expr 322
+#define atom 323
+#define testlist_comp 324
+#define trailer 325
+#define subscriptlist 326
+#define subscript 327
+#define sliceop 328
+#define exprlist 329
+#define testlist 330
+#define dictorsetmaker 331
+#define classdef 332
+#define arglist 333
+#define argument 334
+#define comp_iter 335
+#define comp_for 336
+#define comp_if 337
+#define encoding_decl 338
+#define yield_expr 339
+#define yield_arg 340
diff --git a/Include/grammar.h b/Include/grammar.h
index ba7d19d821..85120b9be9 100644
--- a/Include/grammar.h
+++ b/Include/grammar.h
@@ -37,7 +37,7 @@ typedef struct {
typedef struct {
int s_narcs;
arc *s_arc; /* Array of arcs */
-
+
/* Optional accelerators */
int s_lower; /* Lowest label index */
int s_upper; /* Highest label index */
diff --git a/Include/listobject.h b/Include/listobject.h
index 74cf46f4f9..31843b5db0 100644
--- a/Include/listobject.h
+++ b/Include/listobject.h
@@ -2,7 +2,7 @@
/* List object interface */
/*
-Another generally useful object type is an list of object pointers.
+Another generally useful object type is a list of object pointers.
This is a mutable type: the list items can be changed, and items can be
added or removed. Out-of-range indices or non-list objects are ignored.
@@ -72,6 +72,7 @@ PyAPI_FUNC(void) _PyList_DebugMallocStats(FILE *out);
#define PyList_GET_ITEM(op, i) (((PyListObject *)(op))->ob_item[i])
#define PyList_SET_ITEM(op, i, v) (((PyListObject *)(op))->ob_item[i] = (v))
#define PyList_GET_SIZE(op) Py_SIZE(op)
+#define _PyList_ITEMS(op) (((PyListObject *)(op))->ob_item)
#endif
#ifdef __cplusplus
diff --git a/Include/longobject.h b/Include/longobject.h
index ff43309c76..aed59ce01d 100644
--- a/Include/longobject.h
+++ b/Include/longobject.h
@@ -198,6 +198,9 @@ PyAPI_FUNC(int) _PyLong_FormatAdvancedWriter(
PyAPI_FUNC(unsigned long) PyOS_strtoul(const char *, char **, int);
PyAPI_FUNC(long) PyOS_strtol(const char *, char **, int);
+/* For use by the gcd function in mathmodule.c */
+PyAPI_FUNC(PyObject *) _PyLong_GCD(PyObject *, PyObject *);
+
#ifdef __cplusplus
}
#endif
diff --git a/Include/memoryobject.h b/Include/memoryobject.h
index 382ca92e1f..ab5ee0956c 100644
--- a/Include/memoryobject.h
+++ b/Include/memoryobject.h
@@ -45,9 +45,6 @@ typedef struct {
} _PyManagedBufferObject;
-/* deprecated, removed in 3.5 */
-#define _Py_MEMORYVIEW_MAX_FORMAT 3 /* must be >= 3 */
-
/* memoryview state flags */
#define _Py_MEMORYVIEW_RELEASED 0x001 /* access to master buffer blocked */
#define _Py_MEMORYVIEW_C 0x002 /* C-contiguous layout */
@@ -62,7 +59,6 @@ typedef struct {
int flags; /* state flags */
Py_ssize_t exports; /* number of buffer re-exports */
Py_buffer view; /* private copy of the exporter's view */
- char format[_Py_MEMORYVIEW_MAX_FORMAT]; /* deprecated, removed in 3.5 */
PyObject *weakreflist;
Py_ssize_t ob_array[1]; /* shape, strides, suboffsets */
} PyMemoryViewObject;
diff --git a/Include/methodobject.h b/Include/methodobject.h
index 3cc2ea9308..e2ad80440b 100644
--- a/Include/methodobject.h
+++ b/Include/methodobject.h
@@ -47,7 +47,7 @@ struct PyMethodDef {
typedef struct PyMethodDef PyMethodDef;
#define PyCFunction_New(ML, SELF) PyCFunction_NewEx((ML), (SELF), NULL)
-PyAPI_FUNC(PyObject *) PyCFunction_NewEx(PyMethodDef *, PyObject *,
+PyAPI_FUNC(PyObject *) PyCFunction_NewEx(PyMethodDef *, PyObject *,
PyObject *);
/* Flag passed to newmethodobject */
@@ -66,7 +66,7 @@ PyAPI_FUNC(PyObject *) PyCFunction_NewEx(PyMethodDef *, PyObject *,
/* METH_COEXIST allows a method to be entered even though a slot has
already filled the entry. When defined, the flag allows a separate
- method, "__contains__" for example, to coexist with a defined
+ method, "__contains__" for example, to coexist with a defined
slot like sq_contains. */
#define METH_COEXIST 0x0040
@@ -77,6 +77,7 @@ typedef struct {
PyMethodDef *m_ml; /* Description of the C function to call */
PyObject *m_self; /* Passed as 'self' arg to the C func, can be NULL */
PyObject *m_module; /* The __module__ attribute, can be anything */
+ PyObject *m_weakreflist; /* List of weak references */
} PyCFunctionObject;
#endif
diff --git a/Include/modsupport.h b/Include/modsupport.h
index 5de0458245..829aaf8596 100644
--- a/Include/modsupport.h
+++ b/Include/modsupport.h
@@ -12,13 +12,13 @@ extern "C" {
/* If PY_SSIZE_T_CLEAN is defined, each functions treats #-specifier
to mean Py_ssize_t */
#ifdef PY_SSIZE_T_CLEAN
-#define PyArg_Parse _PyArg_Parse_SizeT
-#define PyArg_ParseTuple _PyArg_ParseTuple_SizeT
-#define PyArg_ParseTupleAndKeywords _PyArg_ParseTupleAndKeywords_SizeT
-#define PyArg_VaParse _PyArg_VaParse_SizeT
-#define PyArg_VaParseTupleAndKeywords _PyArg_VaParseTupleAndKeywords_SizeT
-#define Py_BuildValue _Py_BuildValue_SizeT
-#define Py_VaBuildValue _Py_VaBuildValue_SizeT
+#define PyArg_Parse _PyArg_Parse_SizeT
+#define PyArg_ParseTuple _PyArg_ParseTuple_SizeT
+#define PyArg_ParseTupleAndKeywords _PyArg_ParseTupleAndKeywords_SizeT
+#define PyArg_VaParse _PyArg_VaParse_SizeT
+#define PyArg_VaParseTupleAndKeywords _PyArg_VaParseTupleAndKeywords_SizeT
+#define Py_BuildValue _Py_BuildValue_SizeT
+#define Py_VaBuildValue _Py_VaBuildValue_SizeT
#else
PyAPI_FUNC(PyObject *) _Py_VaBuildValue_SizeT(const char *, va_list);
#endif
@@ -50,6 +50,13 @@ PyAPI_FUNC(int) PyModule_AddStringConstant(PyObject *, const char *, const char
#define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
#define PyModule_AddStringMacro(m, c) PyModule_AddStringConstant(m, #c, c)
+#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
+/* New in 3.5 */
+PyAPI_FUNC(int) PyModule_SetDocString(PyObject *, const char *);
+PyAPI_FUNC(int) PyModule_AddFunctions(PyObject *, PyMethodDef *);
+PyAPI_FUNC(int) PyModule_ExecDef(PyObject *module, PyModuleDef *def);
+#endif
+
#define Py_CLEANUP_SUPPORTED 0x20000
#define PYTHON_API_VERSION 1013
@@ -67,35 +74,35 @@ PyAPI_FUNC(int) PyModule_AddStringConstant(PyObject *, const char *, const char
Please add a line or two to the top of this log for each API
version change:
- 22-Feb-2006 MvL 1013 PEP 353 - long indices for sequence lengths
+ 22-Feb-2006 MvL 1013 PEP 353 - long indices for sequence lengths
- 19-Aug-2002 GvR 1012 Changes to string object struct for
- interning changes, saving 3 bytes.
+ 19-Aug-2002 GvR 1012 Changes to string object struct for
+ interning changes, saving 3 bytes.
- 17-Jul-2001 GvR 1011 Descr-branch, just to be on the safe side
+ 17-Jul-2001 GvR 1011 Descr-branch, just to be on the safe side
25-Jan-2001 FLD 1010 Parameters added to PyCode_New() and
PyFrame_New(); Python 2.1a2
14-Mar-2000 GvR 1009 Unicode API added
- 3-Jan-1999 GvR 1007 Decided to change back! (Don't reuse 1008!)
+ 3-Jan-1999 GvR 1007 Decided to change back! (Don't reuse 1008!)
- 3-Dec-1998 GvR 1008 Python 1.5.2b1
+ 3-Dec-1998 GvR 1008 Python 1.5.2b1
- 18-Jan-1997 GvR 1007 string interning and other speedups
+ 18-Jan-1997 GvR 1007 string interning and other speedups
- 11-Oct-1996 GvR renamed Py_Ellipses to Py_Ellipsis :-(
+ 11-Oct-1996 GvR renamed Py_Ellipses to Py_Ellipsis :-(
- 30-Jul-1996 GvR Slice and ellipses syntax added
+ 30-Jul-1996 GvR Slice and ellipses syntax added
- 23-Jul-1996 GvR For 1.4 -- better safe than sorry this time :-)
+ 23-Jul-1996 GvR For 1.4 -- better safe than sorry this time :-)
- 7-Nov-1995 GvR Keyword arguments (should've been done at 1.3 :-( )
+ 7-Nov-1995 GvR Keyword arguments (should've been done at 1.3 :-( )
- 10-Jan-1995 GvR Renamed globals to new naming scheme
+ 10-Jan-1995 GvR Renamed globals to new naming scheme
- 9-Jan-1995 GvR Initial version (incompatible with older API)
+ 9-Jan-1995 GvR Initial version (incompatible with older API)
*/
/* The PYTHON_ABI_VERSION is introduced in PEP 384. For the lifetime of
@@ -105,10 +112,11 @@ PyAPI_FUNC(int) PyModule_AddStringConstant(PyObject *, const char *, const char
#define PYTHON_ABI_STRING "3"
#ifdef Py_TRACE_REFS
- /* When we are tracing reference counts, rename PyModule_Create2 so
+ /* When we are tracing reference counts, rename module creation functions so
modules compiled with incompatible settings will generate a
link-time error. */
#define PyModule_Create2 PyModule_Create2TraceRefs
+ #define PyModule_FromDefAndSpec2 PyModule_FromDefAndSpec2TraceRefs
#endif
PyAPI_FUNC(PyObject *) PyModule_Create2(struct PyModuleDef*,
@@ -116,12 +124,27 @@ PyAPI_FUNC(PyObject *) PyModule_Create2(struct PyModuleDef*,
#ifdef Py_LIMITED_API
#define PyModule_Create(module) \
- PyModule_Create2(module, PYTHON_ABI_VERSION)
+ PyModule_Create2(module, PYTHON_ABI_VERSION)
#else
#define PyModule_Create(module) \
- PyModule_Create2(module, PYTHON_API_VERSION)
+ PyModule_Create2(module, PYTHON_API_VERSION)
#endif
+#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
+/* New in 3.5 */
+PyAPI_FUNC(PyObject *) PyModule_FromDefAndSpec2(PyModuleDef *def,
+ PyObject *spec,
+ int module_api_version);
+
+#ifdef Py_LIMITED_API
+#define PyModule_FromDefAndSpec(module, spec) \
+ PyModule_FromDefAndSpec2(module, spec, PYTHON_ABI_VERSION)
+#else
+#define PyModule_FromDefAndSpec(module, spec) \
+ PyModule_FromDefAndSpec2(module, spec, PYTHON_API_VERSION)
+#endif /* Py_LIMITED_API */
+#endif /* New in 3.5 */
+
#ifndef Py_LIMITED_API
PyAPI_DATA(char *) _Py_PackageContext;
#endif
diff --git a/Include/moduleobject.h b/Include/moduleobject.h
index f119364b88..229d7fadc2 100644
--- a/Include/moduleobject.h
+++ b/Include/moduleobject.h
@@ -30,6 +30,12 @@ PyAPI_FUNC(void) _PyModule_ClearDict(PyObject *);
PyAPI_FUNC(struct PyModuleDef*) PyModule_GetDef(PyObject*);
PyAPI_FUNC(void*) PyModule_GetState(PyObject*);
+#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
+/* New in 3.5 */
+PyAPI_FUNC(PyObject *) PyModuleDef_Init(struct PyModuleDef*);
+PyAPI_DATA(PyTypeObject) PyModuleDef_Type;
+#endif
+
typedef struct PyModuleDef_Base {
PyObject_HEAD
PyObject* (*m_init)(void);
@@ -44,19 +50,35 @@ typedef struct PyModuleDef_Base {
NULL, /* m_copy */ \
}
+struct PyModuleDef_Slot;
+#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
+/* New in 3.5 */
+typedef struct PyModuleDef_Slot{
+ int slot;
+ void *value;
+} PyModuleDef_Slot;
+
+#define Py_mod_create 1
+#define Py_mod_exec 2
+
+#ifndef Py_LIMITED_API
+#define _Py_mod_LAST_SLOT 2
+#endif
+
+#endif /* New in 3.5 */
+
typedef struct PyModuleDef{
PyModuleDef_Base m_base;
const char* m_name;
const char* m_doc;
Py_ssize_t m_size;
PyMethodDef *m_methods;
- inquiry m_reload;
+ struct PyModuleDef_Slot* m_slots;
traverseproc m_traverse;
inquiry m_clear;
freefunc m_free;
}PyModuleDef;
-
#ifdef __cplusplus
}
#endif
diff --git a/Include/node.h b/Include/node.h
index 2e4e2bada7..654ad85823 100644
--- a/Include/node.h
+++ b/Include/node.h
@@ -26,7 +26,7 @@ PyAPI_FUNC(Py_ssize_t) _PyNode_SizeOf(node *n);
/* Node access functions */
#define NCH(n) ((n)->n_nchildren)
-
+
#define CHILD(n, i) (&(n)->n_child[i])
#define RCHILD(n, i) (CHILD(n, NCH(n) + i))
#define TYPE(n) ((n)->n_type)
diff --git a/Include/object.h b/Include/object.h
index 5f862ab6e9..50d9747cf9 100644
--- a/Include/object.h
+++ b/Include/object.h
@@ -65,6 +65,7 @@ whose size is determined when the object is allocated.
#error Py_LIMITED_API is incompatible with Py_DEBUG, Py_TRACE_REFS, and Py_REF_DEBUG
#endif
+
#ifdef Py_TRACE_REFS
/* Define pointers to support a doubly-linked list of all live heap objects. */
#define _PyObject_HEAD_EXTRA \
@@ -133,7 +134,7 @@ typedef struct {
usage, the string "foo" is interned, and the structures are linked. On interpreter
shutdown, all strings are released (through _PyUnicode_ClearStaticStrings).
- Alternatively, _Py_static_string allows to choose the variable name.
+ Alternatively, _Py_static_string allows choosing the variable name.
_PyUnicode_FromId returns a borrowed reference to the interned string.
_PyObject_{Get,Set,Has}AttrId are __getattr__ versions using _Py_Identifier*.
*/
@@ -275,6 +276,9 @@ typedef struct {
binaryfunc nb_inplace_true_divide;
unaryfunc nb_index;
+
+ binaryfunc nb_matrix_multiply;
+ binaryfunc nb_inplace_matrix_multiply;
} PyNumberMethods;
typedef struct {
@@ -297,6 +301,11 @@ typedef struct {
objobjargproc mp_ass_subscript;
} PyMappingMethods;
+typedef struct {
+ unaryfunc am_await;
+ unaryfunc am_aiter;
+ unaryfunc am_anext;
+} PyAsyncMethods;
typedef struct {
getbufferproc bf_getbuffer;
@@ -342,7 +351,8 @@ typedef struct _typeobject {
printfunc tp_print;
getattrfunc tp_getattr;
setattrfunc tp_setattr;
- void *tp_reserved; /* formerly known as tp_compare */
+ PyAsyncMethods *tp_as_async; /* formerly known as tp_compare (Python 2)
+ or tp_reserved (Python 3) */
reprfunc tp_repr;
/* Method suites for standard classes */
@@ -449,6 +459,7 @@ typedef struct _heaptypeobject {
/* Note: there's a dependency on the order of these members
in slotptr() in typeobject.c . */
PyTypeObject ht_type;
+ PyAsyncMethods as_async;
PyNumberMethods as_number;
PyMappingMethods as_mapping;
PySequenceMethods as_sequence; /* as_sequence comes after as_mapping,
@@ -572,13 +583,6 @@ PyAPI_FUNC(PyObject *) PyObject_Dir(PyObject *);
PyAPI_FUNC(int) Py_ReprEnter(PyObject *);
PyAPI_FUNC(void) Py_ReprLeave(PyObject *);
-#ifndef Py_LIMITED_API
-/* Helper for passing objects to printf and the like.
- Leaks refcounts. Don't use it!
-*/
-#define PyObject_REPR(obj) PyUnicode_AsUTF8(PyObject_Repr(obj))
-#endif
-
/* Flag bits for printing: */
#define Py_PRINT_RAW 1 /* No string quotes etc. */
@@ -714,11 +718,17 @@ PyAPI_FUNC(Py_ssize_t) _Py_GetRefTotal(void);
_Py_NegativeRefcount(__FILE__, __LINE__, \
(PyObject *)(OP)); \
}
+/* Py_REF_DEBUG also controls the display of refcounts and memory block
+ * allocations at the interactive prompt and at interpreter shutdown
+ */
+PyAPI_FUNC(void) _PyDebug_PrintTotalRefs(void);
+#define _PY_DEBUG_PRINT_TOTAL_REFS() _PyDebug_PrintTotalRefs()
#else
#define _Py_INC_REFTOTAL
#define _Py_DEC_REFTOTAL
#define _Py_REF_DEBUG_COMMA
#define _Py_CHECK_REFCNT(OP) /* a semicolon */;
+#define _PY_DEBUG_PRINT_TOTAL_REFS()
#endif /* Py_REF_DEBUG */
#ifdef COUNT_ALLOCS
@@ -836,6 +846,42 @@ PyAPI_FUNC(void) _Py_Dealloc(PyObject *);
Py_DECREF(_py_xdecref_tmp); \
} while (0)
+#ifndef Py_LIMITED_API
+/* Safely decref `op` and set `op` to `op2`.
+ *
+ * As in case of Py_CLEAR "the obvious" code can be deadly:
+ *
+ * Py_DECREF(op);
+ * op = op2;
+ *
+ * The safe way is:
+ *
+ * Py_SETREF(op, op2);
+ *
+ * That arranges to set `op` to `op2` _before_ decref'ing, so that any code
+ * triggered as a side-effect of `op` getting torn down no longer believes
+ * `op` points to a valid object.
+ *
+ * Py_XSETREF is a variant of Py_SETREF that uses Py_XDECREF instead of
+ * Py_DECREF.
+ */
+
+#define Py_SETREF(op, op2) \
+ do { \
+ PyObject *_py_tmp = (PyObject *)(op); \
+ (op) = (op2); \
+ Py_DECREF(_py_tmp); \
+ } while (0)
+
+#define Py_XSETREF(op, op2) \
+ do { \
+ PyObject *_py_tmp = (PyObject *)(op); \
+ (op) = (op2); \
+ Py_XDECREF(_py_tmp); \
+ } while (0)
+
+#endif /* ifndef Py_LIMITED_API */
+
/*
These are provided as conveniences to Python runtime embedders, so that
they can have object code that is not dependent on Python compilation flags.
diff --git a/Include/objimpl.h b/Include/objimpl.h
index 3f21b70e07..65b6d91c36 100644
--- a/Include/objimpl.h
+++ b/Include/objimpl.h
@@ -95,6 +95,7 @@ PyObject_{New, NewVar, Del}.
the raw memory.
*/
PyAPI_FUNC(void *) PyObject_Malloc(size_t size);
+PyAPI_FUNC(void *) PyObject_Calloc(size_t nelem, size_t elsize);
PyAPI_FUNC(void *) PyObject_Realloc(void *ptr, size_t new_size);
PyAPI_FUNC(void) PyObject_Free(void *ptr);
@@ -321,7 +322,8 @@ extern PyGC_Head *_PyGC_generation0;
(!PyTuple_CheckExact(obj) || _PyObject_GC_IS_TRACKED(obj)))
#endif /* Py_LIMITED_API */
-PyAPI_FUNC(PyObject *) _PyObject_GC_Malloc(size_t);
+PyAPI_FUNC(PyObject *) _PyObject_GC_Malloc(size_t size);
+PyAPI_FUNC(PyObject *) _PyObject_GC_Calloc(size_t size);
PyAPI_FUNC(PyObject *) _PyObject_GC_New(PyTypeObject *);
PyAPI_FUNC(PyVarObject *) _PyObject_GC_NewVar(PyTypeObject *, Py_ssize_t);
PyAPI_FUNC(void) PyObject_GC_Track(void *);
diff --git a/Include/odictobject.h b/Include/odictobject.h
new file mode 100644
index 0000000000..c1d9592a1d
--- /dev/null
+++ b/Include/odictobject.h
@@ -0,0 +1,43 @@
+#ifndef Py_ODICTOBJECT_H
+#define Py_ODICTOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* OrderedDict */
+
+#ifndef Py_LIMITED_API
+
+typedef struct _odictobject PyODictObject;
+
+PyAPI_DATA(PyTypeObject) PyODict_Type;
+PyAPI_DATA(PyTypeObject) PyODictIter_Type;
+PyAPI_DATA(PyTypeObject) PyODictKeys_Type;
+PyAPI_DATA(PyTypeObject) PyODictItems_Type;
+PyAPI_DATA(PyTypeObject) PyODictValues_Type;
+
+#endif /* Py_LIMITED_API */
+
+#define PyODict_Check(op) PyObject_TypeCheck(op, &PyODict_Type)
+#define PyODict_CheckExact(op) (Py_TYPE(op) == &PyODict_Type)
+#define PyODict_SIZE(op) ((PyDictObject *)op)->ma_used
+#define PyODict_HasKey(od, key) (PyMapping_HasKey(PyObject *)od, key)
+
+PyAPI_FUNC(PyObject *) PyODict_New(void);
+PyAPI_FUNC(int) PyODict_SetItem(PyObject *od, PyObject *key, PyObject *item);
+PyAPI_FUNC(int) PyODict_DelItem(PyObject *od, PyObject *key);
+
+/* wrappers around PyDict* functions */
+#define PyODict_GetItem(od, key) PyDict_GetItem((PyObject *)od, key)
+#define PyODict_GetItemWithError(od, key) \
+ PyDict_GetItemWithError((PyObject *)od, key)
+#define PyODict_Contains(od, key) PyDict_Contains((PyObject *)od, key)
+#define PyODict_Size(od) PyDict_Size((PyObject *)od)
+#define PyODict_GetItemString(od, key) \
+ PyDict_GetItemString((PyObject *)od, key)
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_ODICTOBJECT_H */
diff --git a/Include/opcode.h b/Include/opcode.h
index 0936f2d9f4..3f917fb6ee 100644
--- a/Include/opcode.h
+++ b/Include/opcode.h
@@ -1,3 +1,4 @@
+/* Auto-generated by Tools/scripts/generate_opcode_h.py */
#ifndef Py_OPCODE_H
#define Py_OPCODE_H
#ifdef __cplusplus
@@ -5,141 +6,122 @@ extern "C" {
#endif
-/* Instruction opcodes for compiled code */
-
-#define POP_TOP 1
-#define ROT_TWO 2
-#define ROT_THREE 3
-#define DUP_TOP 4
-#define DUP_TOP_TWO 5
-#define NOP 9
-
-#define UNARY_POSITIVE 10
-#define UNARY_NEGATIVE 11
-#define UNARY_NOT 12
-
-#define UNARY_INVERT 15
-
-#define BINARY_POWER 19
-
-#define BINARY_MULTIPLY 20
-
-#define BINARY_MODULO 22
-#define BINARY_ADD 23
-#define BINARY_SUBTRACT 24
-#define BINARY_SUBSCR 25
-#define BINARY_FLOOR_DIVIDE 26
-#define BINARY_TRUE_DIVIDE 27
-#define INPLACE_FLOOR_DIVIDE 28
-#define INPLACE_TRUE_DIVIDE 29
-
-#define STORE_MAP 54
-#define INPLACE_ADD 55
-#define INPLACE_SUBTRACT 56
-#define INPLACE_MULTIPLY 57
-
-#define INPLACE_MODULO 59
-#define STORE_SUBSCR 60
-#define DELETE_SUBSCR 61
-
-#define BINARY_LSHIFT 62
-#define BINARY_RSHIFT 63
-#define BINARY_AND 64
-#define BINARY_XOR 65
-#define BINARY_OR 66
-#define INPLACE_POWER 67
-#define GET_ITER 68
-#define PRINT_EXPR 70
-#define LOAD_BUILD_CLASS 71
-#define YIELD_FROM 72
-
-#define INPLACE_LSHIFT 75
-#define INPLACE_RSHIFT 76
-#define INPLACE_AND 77
-#define INPLACE_XOR 78
-#define INPLACE_OR 79
-#define BREAK_LOOP 80
-#define WITH_CLEANUP 81
-
-#define RETURN_VALUE 83
-#define IMPORT_STAR 84
-
-#define YIELD_VALUE 86
-#define POP_BLOCK 87
-#define END_FINALLY 88
-#define POP_EXCEPT 89
-
-#define HAVE_ARGUMENT 90 /* Opcodes from here have an argument: */
-
-#define STORE_NAME 90 /* Index in name list */
-#define DELETE_NAME 91 /* "" */
-#define UNPACK_SEQUENCE 92 /* Number of sequence items */
-#define FOR_ITER 93
-#define UNPACK_EX 94 /* Num items before variable part +
- (Num items after variable part << 8) */
-
-#define STORE_ATTR 95 /* Index in name list */
-#define DELETE_ATTR 96 /* "" */
-#define STORE_GLOBAL 97 /* "" */
-#define DELETE_GLOBAL 98 /* "" */
-
-#define LOAD_CONST 100 /* Index in const list */
-#define LOAD_NAME 101 /* Index in name list */
-#define BUILD_TUPLE 102 /* Number of tuple items */
-#define BUILD_LIST 103 /* Number of list items */
-#define BUILD_SET 104 /* Number of set items */
-#define BUILD_MAP 105 /* Always zero for now */
-#define LOAD_ATTR 106 /* Index in name list */
-#define COMPARE_OP 107 /* Comparison operator */
-#define IMPORT_NAME 108 /* Index in name list */
-#define IMPORT_FROM 109 /* Index in name list */
-
-#define JUMP_FORWARD 110 /* Number of bytes to skip */
-#define JUMP_IF_FALSE_OR_POP 111 /* Target byte offset from beginning of code */
-#define JUMP_IF_TRUE_OR_POP 112 /* "" */
-#define JUMP_ABSOLUTE 113 /* "" */
-#define POP_JUMP_IF_FALSE 114 /* "" */
-#define POP_JUMP_IF_TRUE 115 /* "" */
-
-#define LOAD_GLOBAL 116 /* Index in name list */
-
-#define CONTINUE_LOOP 119 /* Start of loop (absolute) */
-#define SETUP_LOOP 120 /* Target address (relative) */
-#define SETUP_EXCEPT 121 /* "" */
-#define SETUP_FINALLY 122 /* "" */
-
-#define LOAD_FAST 124 /* Local variable number */
-#define STORE_FAST 125 /* Local variable number */
-#define DELETE_FAST 126 /* Local variable number */
-
-#define RAISE_VARARGS 130 /* Number of raise arguments (1, 2 or 3) */
-/* CALL_FUNCTION_XXX opcodes defined below depend on this definition */
-#define CALL_FUNCTION 131 /* #args + (#kwargs<<8) */
-#define MAKE_FUNCTION 132 /* #defaults + #kwdefaults<<8 + #annotations<<16 */
-#define BUILD_SLICE 133 /* Number of items */
-
-#define MAKE_CLOSURE 134 /* same as MAKE_FUNCTION */
-#define LOAD_CLOSURE 135 /* Load free variable from closure */
-#define LOAD_DEREF 136 /* Load and dereference from closure cell */
-#define STORE_DEREF 137 /* Store into cell */
-#define DELETE_DEREF 138 /* Delete closure cell */
-
-/* The next 3 opcodes must be contiguous and satisfy
- (CALL_FUNCTION_VAR - CALL_FUNCTION) & 3 == 1 */
-#define CALL_FUNCTION_VAR 140 /* #args + (#kwargs<<8) */
-#define CALL_FUNCTION_KW 141 /* #args + (#kwargs<<8) */
-#define CALL_FUNCTION_VAR_KW 142 /* #args + (#kwargs<<8) */
-
-#define SETUP_WITH 143
-
-/* Support for opargs more than 16 bits long */
-#define EXTENDED_ARG 144
-
-#define LIST_APPEND 145
-#define SET_ADD 146
-#define MAP_ADD 147
-
-#define LOAD_CLASSDEREF 148
+ /* Instruction opcodes for compiled code */
+#define POP_TOP 1
+#define ROT_TWO 2
+#define ROT_THREE 3
+#define DUP_TOP 4
+#define DUP_TOP_TWO 5
+#define NOP 9
+#define UNARY_POSITIVE 10
+#define UNARY_NEGATIVE 11
+#define UNARY_NOT 12
+#define UNARY_INVERT 15
+#define BINARY_MATRIX_MULTIPLY 16
+#define INPLACE_MATRIX_MULTIPLY 17
+#define BINARY_POWER 19
+#define BINARY_MULTIPLY 20
+#define BINARY_MODULO 22
+#define BINARY_ADD 23
+#define BINARY_SUBTRACT 24
+#define BINARY_SUBSCR 25
+#define BINARY_FLOOR_DIVIDE 26
+#define BINARY_TRUE_DIVIDE 27
+#define INPLACE_FLOOR_DIVIDE 28
+#define INPLACE_TRUE_DIVIDE 29
+#define GET_AITER 50
+#define GET_ANEXT 51
+#define BEFORE_ASYNC_WITH 52
+#define INPLACE_ADD 55
+#define INPLACE_SUBTRACT 56
+#define INPLACE_MULTIPLY 57
+#define INPLACE_MODULO 59
+#define STORE_SUBSCR 60
+#define DELETE_SUBSCR 61
+#define BINARY_LSHIFT 62
+#define BINARY_RSHIFT 63
+#define BINARY_AND 64
+#define BINARY_XOR 65
+#define BINARY_OR 66
+#define INPLACE_POWER 67
+#define GET_ITER 68
+#define GET_YIELD_FROM_ITER 69
+#define PRINT_EXPR 70
+#define LOAD_BUILD_CLASS 71
+#define YIELD_FROM 72
+#define GET_AWAITABLE 73
+#define INPLACE_LSHIFT 75
+#define INPLACE_RSHIFT 76
+#define INPLACE_AND 77
+#define INPLACE_XOR 78
+#define INPLACE_OR 79
+#define BREAK_LOOP 80
+#define WITH_CLEANUP_START 81
+#define WITH_CLEANUP_FINISH 82
+#define RETURN_VALUE 83
+#define IMPORT_STAR 84
+#define YIELD_VALUE 86
+#define POP_BLOCK 87
+#define END_FINALLY 88
+#define POP_EXCEPT 89
+#define HAVE_ARGUMENT 90
+#define STORE_NAME 90
+#define DELETE_NAME 91
+#define UNPACK_SEQUENCE 92
+#define FOR_ITER 93
+#define UNPACK_EX 94
+#define STORE_ATTR 95
+#define DELETE_ATTR 96
+#define STORE_GLOBAL 97
+#define DELETE_GLOBAL 98
+#define LOAD_CONST 100
+#define LOAD_NAME 101
+#define BUILD_TUPLE 102
+#define BUILD_LIST 103
+#define BUILD_SET 104
+#define BUILD_MAP 105
+#define LOAD_ATTR 106
+#define COMPARE_OP 107
+#define IMPORT_NAME 108
+#define IMPORT_FROM 109
+#define JUMP_FORWARD 110
+#define JUMP_IF_FALSE_OR_POP 111
+#define JUMP_IF_TRUE_OR_POP 112
+#define JUMP_ABSOLUTE 113
+#define POP_JUMP_IF_FALSE 114
+#define POP_JUMP_IF_TRUE 115
+#define LOAD_GLOBAL 116
+#define CONTINUE_LOOP 119
+#define SETUP_LOOP 120
+#define SETUP_EXCEPT 121
+#define SETUP_FINALLY 122
+#define LOAD_FAST 124
+#define STORE_FAST 125
+#define DELETE_FAST 126
+#define RAISE_VARARGS 130
+#define CALL_FUNCTION 131
+#define MAKE_FUNCTION 132
+#define BUILD_SLICE 133
+#define MAKE_CLOSURE 134
+#define LOAD_CLOSURE 135
+#define LOAD_DEREF 136
+#define STORE_DEREF 137
+#define DELETE_DEREF 138
+#define CALL_FUNCTION_VAR 140
+#define CALL_FUNCTION_KW 141
+#define CALL_FUNCTION_VAR_KW 142
+#define SETUP_WITH 143
+#define EXTENDED_ARG 144
+#define LIST_APPEND 145
+#define SET_ADD 146
+#define MAP_ADD 147
+#define LOAD_CLASSDEREF 148
+#define BUILD_LIST_UNPACK 149
+#define BUILD_MAP_UNPACK 150
+#define BUILD_MAP_UNPACK_WITH_CALL 151
+#define BUILD_TUPLE_UNPACK 152
+#define BUILD_SET_UNPACK 153
+#define SETUP_ASYNC_WITH 154
/* EXCEPT_HANDLER is a special, implicit block type which is created when
entering an except handler. It is not an opcode but we define it here
@@ -148,8 +130,9 @@ extern "C" {
#define EXCEPT_HANDLER 257
-enum cmp_op {PyCmp_LT=Py_LT, PyCmp_LE=Py_LE, PyCmp_EQ=Py_EQ, PyCmp_NE=Py_NE, PyCmp_GT=Py_GT, PyCmp_GE=Py_GE,
- PyCmp_IN, PyCmp_NOT_IN, PyCmp_IS, PyCmp_IS_NOT, PyCmp_EXC_MATCH, PyCmp_BAD};
+enum cmp_op {PyCmp_LT=Py_LT, PyCmp_LE=Py_LE, PyCmp_EQ=Py_EQ, PyCmp_NE=Py_NE,
+ PyCmp_GT=Py_GT, PyCmp_GE=Py_GE, PyCmp_IN, PyCmp_NOT_IN,
+ PyCmp_IS, PyCmp_IS_NOT, PyCmp_EXC_MATCH, PyCmp_BAD};
#define HAS_ARG(op) ((op) >= HAVE_ARGUMENT)
diff --git a/Include/osdefs.h b/Include/osdefs.h
index 0c2e34b879..bd84c1c12c 100644
--- a/Include/osdefs.h
+++ b/Include/osdefs.h
@@ -7,15 +7,12 @@ extern "C" {
/* Operating system dependencies */
-/* Mod by chrish: QNX has WATCOM, but isn't DOS */
-#if !defined(__QNX__)
-#if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__DJGPP__)
+#ifdef MS_WINDOWS
#define SEP L'\\'
#define ALTSEP L'/'
#define MAXPATHLEN 256
#define DELIM L';'
#endif
-#endif
/* Filename separator */
#ifndef SEP
diff --git a/Include/patchlevel.h b/Include/patchlevel.h
index e1a147b775..1249086ff5 100644
--- a/Include/patchlevel.h
+++ b/Include/patchlevel.h
@@ -17,13 +17,13 @@
/* Version parsed out into numeric values */
/*--start constants--*/
#define PY_MAJOR_VERSION 3
-#define PY_MINOR_VERSION 4
-#define PY_MICRO_VERSION 4
+#define PY_MINOR_VERSION 5
+#define PY_MICRO_VERSION 1
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL
#define PY_RELEASE_SERIAL 0
/* Version as a string */
-#define PY_VERSION "3.4.4+"
+#define PY_VERSION "3.5.1+"
/*--end constants--*/
/* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.
diff --git a/Include/pyatomic.h b/Include/pyatomic.h
index d4e19e0070..89028ef378 100644
--- a/Include/pyatomic.h
+++ b/Include/pyatomic.h
@@ -1,14 +1,13 @@
-#ifndef Py_LIMITED_API
#ifndef Py_ATOMIC_H
#define Py_ATOMIC_H
-/* XXX: When compilers start offering a stdatomic.h with lock-free
- atomic_int and atomic_address types, include that here and rewrite
- the atomic operations in terms of it. */
+#ifdef Py_BUILD_CORE
#include "dynamic_annotations.h"
-#ifdef __cplusplus
-extern "C" {
+#include "pyconfig.h"
+
+#if defined(HAVE_STD_ATOMIC)
+#include <stdatomic.h>
#endif
/* This is modeled after the atomics interface from C1x, according to
@@ -20,6 +19,76 @@ extern "C" {
* Beware, the implementations here are deep magic.
*/
+#if defined(HAVE_STD_ATOMIC)
+
+typedef enum _Py_memory_order {
+ _Py_memory_order_relaxed = memory_order_relaxed,
+ _Py_memory_order_acquire = memory_order_acquire,
+ _Py_memory_order_release = memory_order_release,
+ _Py_memory_order_acq_rel = memory_order_acq_rel,
+ _Py_memory_order_seq_cst = memory_order_seq_cst
+} _Py_memory_order;
+
+typedef struct _Py_atomic_address {
+ atomic_uintptr_t _value;
+} _Py_atomic_address;
+
+typedef struct _Py_atomic_int {
+ atomic_int _value;
+} _Py_atomic_int;
+
+#define _Py_atomic_signal_fence(/*memory_order*/ ORDER) \
+ atomic_signal_fence(ORDER)
+
+#define _Py_atomic_thread_fence(/*memory_order*/ ORDER) \
+ atomic_thread_fence(ORDER)
+
+#define _Py_atomic_store_explicit(ATOMIC_VAL, NEW_VAL, ORDER) \
+ atomic_store_explicit(&(ATOMIC_VAL)->_value, NEW_VAL, ORDER)
+
+#define _Py_atomic_load_explicit(ATOMIC_VAL, ORDER) \
+ atomic_load_explicit(&(ATOMIC_VAL)->_value, ORDER)
+
+/* Use builtin atomic operations in GCC >= 4.7 */
+#elif defined(HAVE_BUILTIN_ATOMIC)
+
+typedef enum _Py_memory_order {
+ _Py_memory_order_relaxed = __ATOMIC_RELAXED,
+ _Py_memory_order_acquire = __ATOMIC_ACQUIRE,
+ _Py_memory_order_release = __ATOMIC_RELEASE,
+ _Py_memory_order_acq_rel = __ATOMIC_ACQ_REL,
+ _Py_memory_order_seq_cst = __ATOMIC_SEQ_CST
+} _Py_memory_order;
+
+typedef struct _Py_atomic_address {
+ Py_uintptr_t _value;
+} _Py_atomic_address;
+
+typedef struct _Py_atomic_int {
+ int _value;
+} _Py_atomic_int;
+
+#define _Py_atomic_signal_fence(/*memory_order*/ ORDER) \
+ __atomic_signal_fence(ORDER)
+
+#define _Py_atomic_thread_fence(/*memory_order*/ ORDER) \
+ __atomic_thread_fence(ORDER)
+
+#define _Py_atomic_store_explicit(ATOMIC_VAL, NEW_VAL, ORDER) \
+ (assert((ORDER) == __ATOMIC_RELAXED \
+ || (ORDER) == __ATOMIC_SEQ_CST \
+ || (ORDER) == __ATOMIC_RELEASE), \
+ __atomic_store_n(&(ATOMIC_VAL)->_value, NEW_VAL, ORDER))
+
+#define _Py_atomic_load_explicit(ATOMIC_VAL, ORDER) \
+ (assert((ORDER) == __ATOMIC_RELAXED \
+ || (ORDER) == __ATOMIC_SEQ_CST \
+ || (ORDER) == __ATOMIC_ACQUIRE \
+ || (ORDER) == __ATOMIC_CONSUME), \
+ __atomic_load_n(&(ATOMIC_VAL)->_value, ORDER))
+
+#else
+
typedef enum _Py_memory_order {
_Py_memory_order_relaxed,
_Py_memory_order_acquire,
@@ -29,7 +98,7 @@ typedef enum _Py_memory_order {
} _Py_memory_order;
typedef struct _Py_atomic_address {
- void *_value;
+ Py_uintptr_t _value;
} _Py_atomic_address;
typedef struct _Py_atomic_int {
@@ -162,6 +231,7 @@ _Py_ANNOTATE_MEMORY_ORDER(const volatile void *address, _Py_memory_order order)
((ATOMIC_VAL)->_value)
#endif /* !gcc x86 */
+#endif
/* Standardized shortcuts. */
#define _Py_atomic_store(ATOMIC_VAL, NEW_VAL) \
@@ -176,9 +246,5 @@ _Py_ANNOTATE_MEMORY_ORDER(const volatile void *address, _Py_memory_order order)
#define _Py_atomic_load_relaxed(ATOMIC_VAL) \
_Py_atomic_load_explicit(ATOMIC_VAL, _Py_memory_order_relaxed)
-#ifdef __cplusplus
-}
-#endif
-
+#endif /* Py_BUILD_CORE */
#endif /* Py_ATOMIC_H */
-#endif /* Py_LIMITED_API */
diff --git a/Include/pydebug.h b/Include/pydebug.h
index 8fe98183f9..19bec2bd81 100644
--- a/Include/pydebug.h
+++ b/Include/pydebug.h
@@ -5,6 +5,8 @@
extern "C" {
#endif
+/* These global variable are defined in pylifecycle.c */
+/* XXX (ncoghlan): move these declarations to pylifecycle.h? */
PyAPI_DATA(int) Py_DebugFlag;
PyAPI_DATA(int) Py_VerboseFlag;
PyAPI_DATA(int) Py_QuietFlag;
diff --git a/Include/pyerrors.h b/Include/pyerrors.h
index 02f65d6603..35aedb7349 100644
--- a/Include/pyerrors.h
+++ b/Include/pyerrors.h
@@ -99,6 +99,7 @@ PyAPI_FUNC(void) PyErr_SetExcInfo(PyObject *, PyObject *, PyObject *);
#define _Py_NO_RETURN
#endif
+/* Defined in Python/pylifecycle.c */
PyAPI_FUNC(void) Py_FatalError(const char *message) _Py_NO_RETURN;
#if defined(Py_DEBUG) || defined(Py_LIMITED_API)
@@ -146,6 +147,7 @@ PyAPI_FUNC(void) _PyErr_ChainExceptions(PyObject *, PyObject *, PyObject *);
PyAPI_DATA(PyObject *) PyExc_BaseException;
PyAPI_DATA(PyObject *) PyExc_Exception;
+PyAPI_DATA(PyObject *) PyExc_StopAsyncIteration;
PyAPI_DATA(PyObject *) PyExc_StopIteration;
PyAPI_DATA(PyObject *) PyExc_GeneratorExit;
PyAPI_DATA(PyObject *) PyExc_ArithmeticError;
@@ -165,6 +167,7 @@ PyAPI_DATA(PyObject *) PyExc_MemoryError;
PyAPI_DATA(PyObject *) PyExc_NameError;
PyAPI_DATA(PyObject *) PyExc_OverflowError;
PyAPI_DATA(PyObject *) PyExc_RuntimeError;
+PyAPI_DATA(PyObject *) PyExc_RecursionError;
PyAPI_DATA(PyObject *) PyExc_NotImplementedError;
PyAPI_DATA(PyObject *) PyExc_SyntaxError;
PyAPI_DATA(PyObject *) PyExc_IndentationError;
@@ -244,6 +247,12 @@ PyAPI_FUNC(PyObject *) PyErr_Format(
const char *format, /* ASCII-encoded string */
...
);
+#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
+PyAPI_FUNC(PyObject *) PyErr_FormatV(
+ PyObject *exception,
+ const char *format,
+ va_list vargs);
+#endif
#ifdef MS_WINDOWS
PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithFilename(
diff --git a/Include/pylifecycle.h b/Include/pylifecycle.h
new file mode 100644
index 0000000000..ccdebe26a4
--- /dev/null
+++ b/Include/pylifecycle.h
@@ -0,0 +1,124 @@
+
+/* Interfaces to configure, query, create & destroy the Python runtime */
+
+#ifndef Py_PYLIFECYCLE_H
+#define Py_PYLIFECYCLE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+PyAPI_FUNC(void) Py_SetProgramName(wchar_t *);
+PyAPI_FUNC(wchar_t *) Py_GetProgramName(void);
+
+PyAPI_FUNC(void) Py_SetPythonHome(wchar_t *);
+PyAPI_FUNC(wchar_t *) Py_GetPythonHome(void);
+
+#ifndef Py_LIMITED_API
+/* Only used by applications that embed the interpreter and need to
+ * override the standard encoding determination mechanism
+ */
+PyAPI_FUNC(int) Py_SetStandardStreamEncoding(const char *encoding,
+ const char *errors);
+#endif
+
+PyAPI_FUNC(void) Py_Initialize(void);
+PyAPI_FUNC(void) Py_InitializeEx(int);
+#ifndef Py_LIMITED_API
+PyAPI_FUNC(void) _Py_InitializeEx_Private(int, int);
+#endif
+PyAPI_FUNC(void) Py_Finalize(void);
+PyAPI_FUNC(int) Py_IsInitialized(void);
+PyAPI_FUNC(PyThreadState *) Py_NewInterpreter(void);
+PyAPI_FUNC(void) Py_EndInterpreter(PyThreadState *);
+
+
+/* Py_PyAtExit is for the atexit module, Py_AtExit is for low-level
+ * exit functions.
+ */
+#ifndef Py_LIMITED_API
+PyAPI_FUNC(void) _Py_PyAtExit(void (*func)(void));
+#endif
+PyAPI_FUNC(int) Py_AtExit(void (*func)(void));
+
+PyAPI_FUNC(void) Py_Exit(int);
+
+/* Restore signals that the interpreter has called SIG_IGN on to SIG_DFL. */
+#ifndef Py_LIMITED_API
+PyAPI_FUNC(void) _Py_RestoreSignals(void);
+
+PyAPI_FUNC(int) Py_FdIsInteractive(FILE *, const char *);
+#endif
+
+/* Bootstrap __main__ (defined in Modules/main.c) */
+PyAPI_FUNC(int) Py_Main(int argc, wchar_t **argv);
+
+/* In getpath.c */
+PyAPI_FUNC(wchar_t *) Py_GetProgramFullPath(void);
+PyAPI_FUNC(wchar_t *) Py_GetPrefix(void);
+PyAPI_FUNC(wchar_t *) Py_GetExecPrefix(void);
+PyAPI_FUNC(wchar_t *) Py_GetPath(void);
+PyAPI_FUNC(void) Py_SetPath(const wchar_t *);
+#ifdef MS_WINDOWS
+int _Py_CheckPython3();
+#endif
+
+/* In their own files */
+PyAPI_FUNC(const char *) Py_GetVersion(void);
+PyAPI_FUNC(const char *) Py_GetPlatform(void);
+PyAPI_FUNC(const char *) Py_GetCopyright(void);
+PyAPI_FUNC(const char *) Py_GetCompiler(void);
+PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
+#ifndef Py_LIMITED_API
+PyAPI_FUNC(const char *) _Py_hgidentifier(void);
+PyAPI_FUNC(const char *) _Py_hgversion(void);
+#endif
+
+/* Internal -- various one-time initializations */
+#ifndef Py_LIMITED_API
+PyAPI_FUNC(PyObject *) _PyBuiltin_Init(void);
+PyAPI_FUNC(PyObject *) _PySys_Init(void);
+PyAPI_FUNC(void) _PyImport_Init(void);
+PyAPI_FUNC(void) _PyExc_Init(PyObject * bltinmod);
+PyAPI_FUNC(void) _PyImportHooks_Init(void);
+PyAPI_FUNC(int) _PyFrame_Init(void);
+PyAPI_FUNC(int) _PyFloat_Init(void);
+PyAPI_FUNC(int) PyByteArray_Init(void);
+PyAPI_FUNC(void) _PyRandom_Init(void);
+#endif
+
+/* Various internal finalizers */
+#ifndef Py_LIMITED_API
+PyAPI_FUNC(void) _PyExc_Fini(void);
+PyAPI_FUNC(void) _PyImport_Fini(void);
+PyAPI_FUNC(void) PyMethod_Fini(void);
+PyAPI_FUNC(void) PyFrame_Fini(void);
+PyAPI_FUNC(void) PyCFunction_Fini(void);
+PyAPI_FUNC(void) PyDict_Fini(void);
+PyAPI_FUNC(void) PyTuple_Fini(void);
+PyAPI_FUNC(void) PyList_Fini(void);
+PyAPI_FUNC(void) PySet_Fini(void);
+PyAPI_FUNC(void) PyBytes_Fini(void);
+PyAPI_FUNC(void) PyByteArray_Fini(void);
+PyAPI_FUNC(void) PyFloat_Fini(void);
+PyAPI_FUNC(void) PyOS_FiniInterrupts(void);
+PyAPI_FUNC(void) _PyGC_DumpShutdownStats(void);
+PyAPI_FUNC(void) _PyGC_Fini(void);
+PyAPI_FUNC(void) PySlice_Fini(void);
+PyAPI_FUNC(void) _PyType_Fini(void);
+PyAPI_FUNC(void) _PyRandom_Fini(void);
+
+PyAPI_DATA(PyThreadState *) _Py_Finalizing;
+#endif
+
+/* Signals */
+typedef void (*PyOS_sighandler_t)(int);
+PyAPI_FUNC(PyOS_sighandler_t) PyOS_getsig(int);
+PyAPI_FUNC(PyOS_sighandler_t) PyOS_setsig(int, PyOS_sighandler_t);
+
+/* Random */
+PyAPI_FUNC(int) _PyOS_URandom (void *buffer, Py_ssize_t size);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_PYLIFECYCLE_H */
diff --git a/Include/pymacconfig.h b/Include/pymacconfig.h
index 24e7b8dac6..0c28f5c06d 100644
--- a/Include/pymacconfig.h
+++ b/Include/pymacconfig.h
@@ -66,7 +66,7 @@
* Therefore surpress the toolbox-glue in 64-bit mode.
*/
- /* In 64-bit mode setpgrp always has no argments, in 32-bit
+ /* In 64-bit mode setpgrp always has no arguments, in 32-bit
* mode that depends on the compilation environment
*/
# undef SETPGRP_HAVE_ARG
diff --git a/Include/pymacro.h b/Include/pymacro.h
index 7997c55cd6..3f6f5dce61 100644
--- a/Include/pymacro.h
+++ b/Include/pymacro.h
@@ -1,13 +1,26 @@
#ifndef Py_PYMACRO_H
#define Py_PYMACRO_H
+/* Minimum value between x and y */
#define Py_MIN(x, y) (((x) > (y)) ? (y) : (x))
+
+/* Maximum value between x and y */
#define Py_MAX(x, y) (((x) > (y)) ? (x) : (y))
+/* Absolute value of the number x */
+#define Py_ABS(x) ((x) < 0 ? -(x) : (x))
+
+#define _Py_XSTRINGIFY(x) #x
+
+/* Convert the argument to a string. For example, Py_STRINGIFY(123) is replaced
+ with "123" by the preprocessor. Defines are also replaced by their value.
+ For example Py_STRINGIFY(__LINE__) is replaced by the line number, not
+ by "__LINE__". */
+#define Py_STRINGIFY(x) _Py_XSTRINGIFY(x)
+
/* Argument must be a char or an int in [-128, 127] or [0, 255]. */
#define Py_CHARMASK(c) ((unsigned char)((c) & 0xff))
-
/* Assert a build-time dependency, as an expression.
Your compile will fail if the condition isn't true, or can't be evaluated
diff --git a/Include/pymem.h b/Include/pymem.h
index 2372b864a1..043db64deb 100644
--- a/Include/pymem.h
+++ b/Include/pymem.h
@@ -13,6 +13,7 @@ extern "C" {
#ifndef Py_LIMITED_API
PyAPI_FUNC(void *) PyMem_RawMalloc(size_t size);
+PyAPI_FUNC(void *) PyMem_RawCalloc(size_t nelem, size_t elsize);
PyAPI_FUNC(void *) PyMem_RawRealloc(void *ptr, size_t new_size);
PyAPI_FUNC(void) PyMem_RawFree(void *ptr);
#endif
@@ -57,6 +58,7 @@ PyAPI_FUNC(void) PyMem_RawFree(void *ptr);
*/
PyAPI_FUNC(void *) PyMem_Malloc(size_t size);
+PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize);
PyAPI_FUNC(void *) PyMem_Realloc(void *ptr, size_t new_size);
PyAPI_FUNC(void) PyMem_Free(void *ptr);
@@ -126,22 +128,25 @@ typedef enum {
} PyMemAllocatorDomain;
typedef struct {
- /* user context passed as the first argument to the 3 functions */
+ /* user context passed as the first argument to the 4 functions */
void *ctx;
/* allocate a memory block */
void* (*malloc) (void *ctx, size_t size);
+ /* allocate a memory block initialized by zeros */
+ void* (*calloc) (void *ctx, size_t nelem, size_t elsize);
+
/* allocate or resize a memory block */
void* (*realloc) (void *ctx, void *ptr, size_t new_size);
/* release a memory block */
void (*free) (void *ctx, void *ptr);
-} PyMemAllocator;
+} PyMemAllocatorEx;
/* Get the memory block allocator of the specified domain. */
PyAPI_FUNC(void) PyMem_GetAllocator(PyMemAllocatorDomain domain,
- PyMemAllocator *allocator);
+ PyMemAllocatorEx *allocator);
/* Set the memory block allocator of the specified domain.
@@ -155,7 +160,7 @@ PyAPI_FUNC(void) PyMem_GetAllocator(PyMemAllocatorDomain domain,
PyMem_SetupDebugHooks() function must be called to reinstall the debug hooks
on top on the new allocator. */
PyAPI_FUNC(void) PyMem_SetAllocator(PyMemAllocatorDomain domain,
- PyMemAllocator *allocator);
+ PyMemAllocatorEx *allocator);
/* Setup hooks to detect bugs in the following Python memory allocator
functions:
diff --git a/Include/pyport.h b/Include/pyport.h
index b29f9bd929..66e00d4e6d 100644
--- a/Include/pyport.h
+++ b/Include/pyport.h
@@ -357,28 +357,6 @@ typedef int Py_ssize_clean_t;
* stat() and fstat() fiddling *
*******************************/
-/* We expect that stat and fstat exist on most systems.
- * It's confirmed on Unix, Mac and Windows.
- * If you don't have them, add
- * #define DONT_HAVE_STAT
- * and/or
- * #define DONT_HAVE_FSTAT
- * to your pyconfig.h. Python code beyond this should check HAVE_STAT and
- * HAVE_FSTAT instead.
- * Also
- * #define HAVE_SYS_STAT_H
- * if <sys/stat.h> exists on your platform, and
- * #define HAVE_STAT_H
- * if <stat.h> does.
- */
-#ifndef DONT_HAVE_STAT
-#define HAVE_STAT
-#endif
-
-#ifndef DONT_HAVE_FSTAT
-#define HAVE_FSTAT
-#endif
-
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#elif defined(HAVE_STAT_H)
@@ -588,6 +566,25 @@ extern "C" {
} while (0)
#endif
+#ifdef HAVE_GCC_ASM_FOR_MC68881
+#define HAVE_PY_SET_53BIT_PRECISION 1
+#define _Py_SET_53BIT_PRECISION_HEADER \
+ unsigned int old_fpcr, new_fpcr
+#define _Py_SET_53BIT_PRECISION_START \
+ do { \
+ __asm__ ("fmove.l %%fpcr,%0" : "=g" (old_fpcr)); \
+ /* Set double precision / round to nearest. */ \
+ new_fpcr = (old_fpcr & ~0xf0) | 0x80; \
+ if (new_fpcr != old_fpcr) \
+ __asm__ volatile ("fmove.l %0,%%fpcr" : : "g" (new_fpcr)); \
+ } while (0)
+#define _Py_SET_53BIT_PRECISION_END \
+ do { \
+ if (new_fpcr != old_fpcr) \
+ __asm__ volatile ("fmove.l %0,%%fpcr" : : "g" (old_fpcr)); \
+ } while (0)
+#endif
+
/* default definitions are empty */
#ifndef HAVE_PY_SET_53BIT_PRECISION
#define _Py_SET_53BIT_PRECISION_HEADER
@@ -880,4 +877,24 @@ extern pid_t forkpty(int *, char *, struct termios *, struct winsize *);
#define PY_LITTLE_ENDIAN 1
#endif
+#ifdef Py_BUILD_CORE
+/*
+ * Macros to protect CRT calls against instant termination when passed an
+ * invalid parameter (issue23524).
+ */
+#if defined _MSC_VER && _MSC_VER >= 1900
+
+extern _invalid_parameter_handler _Py_silent_invalid_parameter_handler;
+#define _Py_BEGIN_SUPPRESS_IPH { _invalid_parameter_handler _Py_old_handler = \
+ _set_thread_local_invalid_parameter_handler(_Py_silent_invalid_parameter_handler);
+#define _Py_END_SUPPRESS_IPH _set_thread_local_invalid_parameter_handler(_Py_old_handler); }
+
+#else
+
+#define _Py_BEGIN_SUPPRESS_IPH
+#define _Py_END_SUPPRESS_IPH
+
+#endif /* _MSC_VER >= 1900 */
+#endif /* Py_BUILD_CORE */
+
#endif /* Py_PYPORT_H */
diff --git a/Include/pystate.h b/Include/pystate.h
index 4992c22684..0499a74280 100644
--- a/Include/pystate.h
+++ b/Include/pystate.h
@@ -134,6 +134,9 @@ typedef struct _ts {
void (*on_delete)(void *);
void *on_delete_data;
+ PyObject *coroutine_wrapper;
+ int in_coroutine_wrapper;
+
/* XXX signal handlers should also be here */
} PyThreadState;
@@ -165,7 +168,15 @@ PyAPI_FUNC(void) PyThreadState_DeleteCurrent(void);
PyAPI_FUNC(void) _PyGILState_Reinit(void);
#endif
+/* Return the current thread state. The global interpreter lock must be held.
+ * When the current thread state is NULL, this issues a fatal error (so that
+ * the caller needn't check for NULL). */
PyAPI_FUNC(PyThreadState *) PyThreadState_Get(void);
+
+/* Similar to PyThreadState_Get(), but don't issue a fatal error
+ * if it is NULL. */
+PyAPI_FUNC(PyThreadState *) _PyThreadState_UncheckedGet(void);
+
PyAPI_FUNC(PyThreadState *) PyThreadState_Swap(PyThreadState *);
PyAPI_FUNC(PyObject *) PyThreadState_GetDict(void);
PyAPI_FUNC(int) PyThreadState_SetAsyncExc(long, PyObject *);
@@ -175,15 +186,12 @@ PyAPI_FUNC(int) PyThreadState_SetAsyncExc(long, PyObject *);
/* Assuming the current thread holds the GIL, this is the
PyThreadState for the current thread. */
-#ifndef Py_LIMITED_API
+#ifdef Py_BUILD_CORE
PyAPI_DATA(_Py_atomic_address) _PyThreadState_Current;
-#endif
-
-#if defined(Py_DEBUG) || defined(Py_LIMITED_API)
-#define PyThreadState_GET() PyThreadState_Get()
+# define PyThreadState_GET() \
+ ((PyThreadState*)_Py_atomic_load_relaxed(&_PyThreadState_Current))
#else
-#define PyThreadState_GET() \
- ((PyThreadState*)_Py_atomic_load_relaxed(&_PyThreadState_Current))
+# define PyThreadState_GET() PyThreadState_Get()
#endif
typedef
diff --git a/Include/pystrhex.h b/Include/pystrhex.h
new file mode 100644
index 0000000000..1dc125575b
--- /dev/null
+++ b/Include/pystrhex.h
@@ -0,0 +1,17 @@
+#ifndef Py_STRHEX_H
+#define Py_STRHEX_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Returns a str() containing the hex representation of argbuf. */
+PyAPI_FUNC(PyObject*) _Py_strhex(const char* argbuf, const Py_ssize_t arglen);
+/* Returns a bytes() containing the ASCII hex representation of argbuf. */
+PyAPI_FUNC(PyObject*) _Py_strhex_bytes(const char* argbuf, const Py_ssize_t arglen);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !Py_STRHEX_H */
diff --git a/Include/pythonrun.h b/Include/pythonrun.h
index 2fc5578f04..9c2e813ad0 100644
--- a/Include/pythonrun.h
+++ b/Include/pythonrun.h
@@ -9,7 +9,8 @@ extern "C" {
#define PyCF_MASK (CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | \
CO_FUTURE_WITH_STATEMENT | CO_FUTURE_PRINT_FUNCTION | \
- CO_FUTURE_UNICODE_LITERALS | CO_FUTURE_BARRY_AS_BDFL)
+ CO_FUTURE_UNICODE_LITERALS | CO_FUTURE_BARRY_AS_BDFL | \
+ CO_FUTURE_GENERATOR_STOP)
#define PyCF_MASK_OBSOLETE (CO_NESTED)
#define PyCF_SOURCE_IS_UTF8 0x0100
#define PyCF_DONT_IMPLY_DEDENT 0x0200
@@ -22,30 +23,6 @@ typedef struct {
} PyCompilerFlags;
#endif
-PyAPI_FUNC(void) Py_SetProgramName(wchar_t *);
-PyAPI_FUNC(wchar_t *) Py_GetProgramName(void);
-
-PyAPI_FUNC(void) Py_SetPythonHome(wchar_t *);
-PyAPI_FUNC(wchar_t *) Py_GetPythonHome(void);
-
-#ifndef Py_LIMITED_API
-/* Only used by applications that embed the interpreter and need to
- * override the standard encoding determination mechanism
- */
-PyAPI_FUNC(int) Py_SetStandardStreamEncoding(const char *encoding,
- const char *errors);
-#endif
-
-PyAPI_FUNC(void) Py_Initialize(void);
-PyAPI_FUNC(void) Py_InitializeEx(int);
-#ifndef Py_LIMITED_API
-PyAPI_FUNC(void) _Py_InitializeEx_Private(int, int);
-#endif
-PyAPI_FUNC(void) Py_Finalize(void);
-PyAPI_FUNC(int) Py_IsInitialized(void);
-PyAPI_FUNC(PyThreadState *) Py_NewInterpreter(void);
-PyAPI_FUNC(void) Py_EndInterpreter(PyThreadState *);
-
#ifndef Py_LIMITED_API
PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *);
PyAPI_FUNC(int) PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *);
@@ -166,26 +143,6 @@ PyAPI_FUNC(void) PyErr_Print(void);
PyAPI_FUNC(void) PyErr_PrintEx(int);
PyAPI_FUNC(void) PyErr_Display(PyObject *, PyObject *, PyObject *);
-/* Py_PyAtExit is for the atexit module, Py_AtExit is for low-level
- * exit functions.
- */
-#ifndef Py_LIMITED_API
-PyAPI_FUNC(void) _Py_PyAtExit(void (*func)(void));
-#endif
-PyAPI_FUNC(int) Py_AtExit(void (*func)(void));
-
-PyAPI_FUNC(void) Py_Exit(int);
-
-/* Restore signals that the interpreter has called SIG_IGN on to SIG_DFL. */
-#ifndef Py_LIMITED_API
-PyAPI_FUNC(void) _Py_RestoreSignals(void);
-
-PyAPI_FUNC(int) Py_FdIsInteractive(FILE *, const char *);
-#endif
-
-/* Bootstrap */
-PyAPI_FUNC(int) Py_Main(int argc, wchar_t **argv);
-
#ifndef Py_LIMITED_API
/* Use macros for a bunch of old variants */
#define PyRun_String(str, s, g, l) PyRun_StringFlags(str, s, g, l, NULL)
@@ -207,64 +164,6 @@ PyAPI_FUNC(int) Py_Main(int argc, wchar_t **argv);
PyRun_FileExFlags(fp, p, s, g, l, 0, flags)
#endif
-/* In getpath.c */
-PyAPI_FUNC(wchar_t *) Py_GetProgramFullPath(void);
-PyAPI_FUNC(wchar_t *) Py_GetPrefix(void);
-PyAPI_FUNC(wchar_t *) Py_GetExecPrefix(void);
-PyAPI_FUNC(wchar_t *) Py_GetPath(void);
-PyAPI_FUNC(void) Py_SetPath(const wchar_t *);
-#ifdef MS_WINDOWS
-int _Py_CheckPython3();
-#endif
-
-/* In their own files */
-PyAPI_FUNC(const char *) Py_GetVersion(void);
-PyAPI_FUNC(const char *) Py_GetPlatform(void);
-PyAPI_FUNC(const char *) Py_GetCopyright(void);
-PyAPI_FUNC(const char *) Py_GetCompiler(void);
-PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
-#ifndef Py_LIMITED_API
-PyAPI_FUNC(const char *) _Py_hgidentifier(void);
-PyAPI_FUNC(const char *) _Py_hgversion(void);
-#endif
-
-/* Internal -- various one-time initializations */
-#ifndef Py_LIMITED_API
-PyAPI_FUNC(PyObject *) _PyBuiltin_Init(void);
-PyAPI_FUNC(PyObject *) _PySys_Init(void);
-PyAPI_FUNC(void) _PyImport_Init(void);
-PyAPI_FUNC(void) _PyExc_Init(PyObject * bltinmod);
-PyAPI_FUNC(void) _PyImportHooks_Init(void);
-PyAPI_FUNC(int) _PyFrame_Init(void);
-PyAPI_FUNC(int) _PyFloat_Init(void);
-PyAPI_FUNC(int) PyByteArray_Init(void);
-PyAPI_FUNC(void) _PyRandom_Init(void);
-#endif
-
-/* Various internal finalizers */
-#ifndef Py_LIMITED_API
-PyAPI_FUNC(void) _PyExc_Fini(void);
-PyAPI_FUNC(void) _PyImport_Fini(void);
-PyAPI_FUNC(void) PyMethod_Fini(void);
-PyAPI_FUNC(void) PyFrame_Fini(void);
-PyAPI_FUNC(void) PyCFunction_Fini(void);
-PyAPI_FUNC(void) PyDict_Fini(void);
-PyAPI_FUNC(void) PyTuple_Fini(void);
-PyAPI_FUNC(void) PyList_Fini(void);
-PyAPI_FUNC(void) PySet_Fini(void);
-PyAPI_FUNC(void) PyBytes_Fini(void);
-PyAPI_FUNC(void) PyByteArray_Fini(void);
-PyAPI_FUNC(void) PyFloat_Fini(void);
-PyAPI_FUNC(void) PyOS_FiniInterrupts(void);
-PyAPI_FUNC(void) _PyGC_DumpShutdownStats(void);
-PyAPI_FUNC(void) _PyGC_Fini(void);
-PyAPI_FUNC(void) PySlice_Fini(void);
-PyAPI_FUNC(void) _PyType_Fini(void);
-PyAPI_FUNC(void) _PyRandom_Fini(void);
-
-PyAPI_DATA(PyThreadState *) _Py_Finalizing;
-#endif
-
/* Stuff with no proper home (yet) */
#ifndef Py_LIMITED_API
PyAPI_FUNC(char *) PyOS_Readline(FILE *, FILE *, const char *);
@@ -277,7 +176,7 @@ PyAPI_DATA(PyThreadState*) _PyOS_ReadlineTState;
/* Stack size, in "pointers" (so we get extra safety margins
on 64-bit platforms). On a 32-bit platform, this translates
- to a 8k margin. */
+ to an 8k margin. */
#define PYOS_STACK_MARGIN 2048
#if defined(WIN32) && !defined(MS_WIN64) && defined(_MSC_VER) && _MSC_VER >= 1300
@@ -290,14 +189,6 @@ PyAPI_DATA(PyThreadState*) _PyOS_ReadlineTState;
PyAPI_FUNC(int) PyOS_CheckStack(void);
#endif
-/* Signals */
-typedef void (*PyOS_sighandler_t)(int);
-PyAPI_FUNC(PyOS_sighandler_t) PyOS_getsig(int);
-PyAPI_FUNC(PyOS_sighandler_t) PyOS_setsig(int, PyOS_sighandler_t);
-
-/* Random */
-PyAPI_FUNC(int) _PyOS_URandom (void *buffer, Py_ssize_t size);
-
#ifdef __cplusplus
}
#endif
diff --git a/Include/pytime.h b/Include/pytime.h
index b0fc6d0354..494322c580 100644
--- a/Include/pytime.h
+++ b/Include/pytime.h
@@ -13,60 +13,26 @@ functions and constants
extern "C" {
#endif
-#ifdef HAVE_GETTIMEOFDAY
-typedef struct timeval _PyTime_timeval;
+#ifdef PY_INT64_T
+/* _PyTime_t: Python timestamp with subsecond precision. It can be used to
+ store a duration, and so indirectly a date (related to another date, like
+ UNIX epoch). */
+typedef PY_INT64_T _PyTime_t;
+#define _PyTime_MIN PY_LLONG_MIN
+#define _PyTime_MAX PY_LLONG_MAX
#else
-typedef struct {
- time_t tv_sec; /* seconds since Jan. 1, 1970 */
- long tv_usec; /* and microseconds */
-} _PyTime_timeval;
+# error "_PyTime_t need signed 64-bit integer type"
#endif
-/* Structure used by time.get_clock_info() */
-typedef struct {
- const char *implementation;
- int monotonic;
- int adjustable;
- double resolution;
-} _Py_clock_info_t;
-
-/* Similar to POSIX gettimeofday but cannot fail. If system gettimeofday
- * fails or is not available, fall back to lower resolution clocks.
- */
-PyAPI_FUNC(void) _PyTime_gettimeofday(_PyTime_timeval *tp);
-
-/* Similar to _PyTime_gettimeofday() but retrieve also information on the
- * clock used to get the current time. */
-PyAPI_FUNC(void) _PyTime_gettimeofday_info(
- _PyTime_timeval *tp,
- _Py_clock_info_t *info);
-
-#define _PyTime_ADD_SECONDS(tv, interval) \
-do { \
- tv.tv_usec += (long) (((long) interval - interval) * 1000000); \
- tv.tv_sec += (time_t) interval + (time_t) (tv.tv_usec / 1000000); \
- tv.tv_usec %= 1000000; \
-} while (0)
-
-#define _PyTime_INTERVAL(tv_start, tv_end) \
- ((tv_end.tv_sec - tv_start.tv_sec) + \
- (tv_end.tv_usec - tv_start.tv_usec) * 0.000001)
-
-#ifndef Py_LIMITED_API
-
typedef enum {
- /* Round towards zero. */
- _PyTime_ROUND_DOWN=0,
- /* Round away from zero. */
- _PyTime_ROUND_UP
+ /* Round towards minus infinity (-inf).
+ For example, used to read a clock. */
+ _PyTime_ROUND_FLOOR=0,
+ /* Round towards infinity (+inf).
+ For example, used for timeout to wait "at least" N seconds. */
+ _PyTime_ROUND_CEILING
} _PyTime_round_t;
-/* Convert a number of seconds, int or float, to time_t. */
-PyAPI_FUNC(int) _PyTime_ObjectToTime_t(
- PyObject *obj,
- time_t *sec,
- _PyTime_round_t);
-
/* Convert a time_t to a PyLong. */
PyAPI_FUNC(PyObject *) _PyLong_FromTime_t(
time_t sec);
@@ -75,6 +41,12 @@ PyAPI_FUNC(PyObject *) _PyLong_FromTime_t(
PyAPI_FUNC(time_t) _PyLong_AsTime_t(
PyObject *obj);
+/* Convert a number of seconds, int or float, to time_t. */
+PyAPI_FUNC(int) _PyTime_ObjectToTime_t(
+ PyObject *obj,
+ time_t *sec,
+ _PyTime_round_t);
+
/* Convert a number of seconds, int or float, to a timeval structure.
usec is in the range [0; 999999] and rounded towards zero.
For example, -1.2 is converted to (-2, 800000). */
@@ -92,10 +64,126 @@ PyAPI_FUNC(int) _PyTime_ObjectToTimespec(
time_t *sec,
long *nsec,
_PyTime_round_t);
+
+
+/* Create a timestamp from a number of seconds. */
+PyAPI_FUNC(_PyTime_t) _PyTime_FromSeconds(int seconds);
+
+/* Macro to create a timestamp from a number of seconds, no integer overflow.
+ Only use the macro for small values, prefer _PyTime_FromSeconds(). */
+#define _PYTIME_FROMSECONDS(seconds) \
+ ((_PyTime_t)(seconds) * (1000 * 1000 * 1000))
+
+/* Create a timestamp from a number of nanoseconds. */
+PyAPI_FUNC(_PyTime_t) _PyTime_FromNanoseconds(PY_LONG_LONG ns);
+
+/* Convert a number of seconds (Python float or int) to a timetamp.
+ Raise an exception and return -1 on error, return 0 on success. */
+PyAPI_FUNC(int) _PyTime_FromSecondsObject(_PyTime_t *t,
+ PyObject *obj,
+ _PyTime_round_t round);
+
+/* Convert a number of milliseconds (Python float or int, 10^-3) to a timetamp.
+ Raise an exception and return -1 on error, return 0 on success. */
+PyAPI_FUNC(int) _PyTime_FromMillisecondsObject(_PyTime_t *t,
+ PyObject *obj,
+ _PyTime_round_t round);
+
+/* Convert a timestamp to a number of seconds as a C double. */
+PyAPI_FUNC(double) _PyTime_AsSecondsDouble(_PyTime_t t);
+
+/* Convert timestamp to a number of milliseconds (10^-3 seconds). */
+PyAPI_FUNC(_PyTime_t) _PyTime_AsMilliseconds(_PyTime_t t,
+ _PyTime_round_t round);
+
+/* Convert timestamp to a number of microseconds (10^-6 seconds). */
+PyAPI_FUNC(_PyTime_t) _PyTime_AsMicroseconds(_PyTime_t t,
+ _PyTime_round_t round);
+
+/* Convert timestamp to a number of nanoseconds (10^-9 seconds) as a Python int
+ object. */
+PyAPI_FUNC(PyObject *) _PyTime_AsNanosecondsObject(_PyTime_t t);
+
+/* Convert a timestamp to a timeval structure (microsecond resolution).
+ tv_usec is always positive.
+ Raise an exception and return -1 if the conversion overflowed,
+ return 0 on success. */
+PyAPI_FUNC(int) _PyTime_AsTimeval(_PyTime_t t,
+ struct timeval *tv,
+ _PyTime_round_t round);
+
+/* Similar to _PyTime_AsTimeval(), but don't raise an exception on error. */
+PyAPI_FUNC(int) _PyTime_AsTimeval_noraise(_PyTime_t t,
+ struct timeval *tv,
+ _PyTime_round_t round);
+
+/* Convert a timestamp to a number of seconds (secs) and microseconds (us).
+ us is always positive. This function is similar to _PyTime_AsTimeval()
+ except that secs is always a time_t type, whereas the timeval structure
+ uses a C long for tv_sec on Windows.
+ Raise an exception and return -1 if the conversion overflowed,
+ return 0 on success. */
+PyAPI_FUNC(int) _PyTime_AsTimevalTime_t(
+ _PyTime_t t,
+ time_t *secs,
+ int *us,
+ _PyTime_round_t round);
+
+#if defined(HAVE_CLOCK_GETTIME) || defined(HAVE_KQUEUE)
+/* Convert a timestamp to a timespec structure (nanosecond resolution).
+ tv_nsec is always positive.
+ Raise an exception and return -1 on error, return 0 on success. */
+PyAPI_FUNC(int) _PyTime_AsTimespec(_PyTime_t t, struct timespec *ts);
#endif
-/* Dummy to force linking. */
-PyAPI_FUNC(void) _PyTime_Init(void);
+/* Get the current time from the system clock.
+
+ The function cannot fail. _PyTime_Init() ensures that the system clock
+ works. */
+PyAPI_FUNC(_PyTime_t) _PyTime_GetSystemClock(void);
+
+/* Get the time of a monotonic clock, i.e. a clock that cannot go backwards.
+ The clock is not affected by system clock updates. The reference point of
+ the returned value is undefined, so that only the difference between the
+ results of consecutive calls is valid.
+
+ The function cannot fail. _PyTime_Init() ensures that a monotonic clock
+ is available and works. */
+PyAPI_FUNC(_PyTime_t) _PyTime_GetMonotonicClock(void);
+
+
+/* Structure used by time.get_clock_info() */
+typedef struct {
+ const char *implementation;
+ int monotonic;
+ int adjustable;
+ double resolution;
+} _Py_clock_info_t;
+
+/* Get the current time from the system clock.
+ * Fill clock information if info is not NULL.
+ * Raise an exception and return -1 on error, return 0 on success.
+ */
+PyAPI_FUNC(int) _PyTime_GetSystemClockWithInfo(
+ _PyTime_t *t,
+ _Py_clock_info_t *info);
+
+/* Get the time of a monotonic clock, i.e. a clock that cannot go backwards.
+ The clock is not affected by system clock updates. The reference point of
+ the returned value is undefined, so that only the difference between the
+ results of consecutive calls is valid.
+
+ Fill info (if set) with information of the function used to get the time.
+
+ Return 0 on success, raise an exception and return -1 on error. */
+PyAPI_FUNC(int) _PyTime_GetMonotonicClockWithInfo(
+ _PyTime_t *t,
+ _Py_clock_info_t *info);
+
+
+/* Initialize time.
+ Return 0 on success, raise an exception and return -1 on error. */
+PyAPI_FUNC(int) _PyTime_Init(void);
#ifdef __cplusplus
}
diff --git a/Include/setobject.h b/Include/setobject.h
index ae3f556365..f17bc1b035 100644
--- a/Include/setobject.h
+++ b/Include/setobject.h
@@ -6,38 +6,43 @@
extern "C" {
#endif
+#ifndef Py_LIMITED_API
-/*
-There are three kinds of slots in the table:
+/* There are three kinds of entries in the table:
1. Unused: key == NULL
2. Active: key != NULL and key != dummy
3. Dummy: key == dummy
-Note: .pop() abuses the hash field of an Unused or Dummy slot to
-hold a search finger. The hash field of Unused or Dummy slots has
-no meaning otherwise.
+The hash field of Unused slots have no meaning.
+The hash field of Dummny slots are set to -1
+meaning that dummy entries can be detected by
+either entry->key==dummy or by entry->hash==-1.
*/
-#ifndef Py_LIMITED_API
+
#define PySet_MINSIZE 8
typedef struct {
- /* Cached hash code of the key. */
PyObject *key;
- Py_hash_t hash;
+ Py_hash_t hash; /* Cached hash code of the key */
} setentry;
+/* The SetObject data structure is shared by set and frozenset objects.
+
+Invariant for sets:
+ - hash is -1
+
+Invariants for frozensets:
+ - data is immutable.
+ - hash is the hash of the frozenset or -1 if not computed yet.
-/*
-This data structure is shared by set and frozenset objects.
*/
-typedef struct _setobject PySetObject;
-struct _setobject {
+typedef struct {
PyObject_HEAD
- Py_ssize_t fill; /* # Active + # Dummy */
- Py_ssize_t used; /* # Active */
+ Py_ssize_t fill; /* Number active and dummy entries*/
+ Py_ssize_t used; /* Number active entries */
/* The table contains mask + 1 slots, and that's a power of 2.
* We store the mask instead of the size because the mask is more
@@ -45,33 +50,42 @@ struct _setobject {
*/
Py_ssize_t mask;
- /* table points to smalltable for small tables, else to
- * additional malloc'ed memory. table is never NULL! This rule
- * saves repeated runtime null-tests.
+ /* The table points to a fixed-size smalltable for small tables
+ * or to additional malloc'ed memory for bigger tables.
+ * The table pointer is never NULL which saves us from repeated
+ * runtime null-tests.
*/
setentry *table;
- setentry *(*lookup)(PySetObject *so, PyObject *key, Py_hash_t hash);
- Py_hash_t hash; /* only used by frozenset objects */
- setentry smalltable[PySet_MINSIZE];
+ Py_hash_t hash; /* Only used by frozenset objects */
+ Py_ssize_t finger; /* Search finger for pop() */
+ setentry smalltable[PySet_MINSIZE];
PyObject *weakreflist; /* List of weak references */
-};
-#endif /* Py_LIMITED_API */
+} PySetObject;
+
+#define PySet_GET_SIZE(so) (((PySetObject *)(so))->used)
+
+PyAPI_DATA(PyObject *) _PySet_Dummy;
+
+PyAPI_FUNC(int) _PySet_NextEntry(PyObject *set, Py_ssize_t *pos, PyObject **key, Py_hash_t *hash);
+PyAPI_FUNC(int) _PySet_Update(PyObject *set, PyObject *iterable);
+PyAPI_FUNC(int) PySet_ClearFreeList(void);
+
+#endif /* Section excluded by Py_LIMITED_API */
PyAPI_DATA(PyTypeObject) PySet_Type;
PyAPI_DATA(PyTypeObject) PyFrozenSet_Type;
PyAPI_DATA(PyTypeObject) PySetIter_Type;
-#ifndef Py_LIMITED_API
-PyAPI_DATA(PyObject *) _PySet_Dummy;
-#endif
+PyAPI_FUNC(PyObject *) PySet_New(PyObject *);
+PyAPI_FUNC(PyObject *) PyFrozenSet_New(PyObject *);
-/* Invariants for frozensets:
- * data is immutable.
- * hash is the hash of the frozenset or -1 if not computed yet.
- * Invariants for sets:
- * hash is -1
- */
+PyAPI_FUNC(int) PySet_Add(PyObject *set, PyObject *key);
+PyAPI_FUNC(int) PySet_Clear(PyObject *set);
+PyAPI_FUNC(int) PySet_Contains(PyObject *anyset, PyObject *key);
+PyAPI_FUNC(int) PySet_Discard(PyObject *set, PyObject *key);
+PyAPI_FUNC(PyObject *) PySet_Pop(PyObject *set);
+PyAPI_FUNC(Py_ssize_t) PySet_Size(PyObject *anyset);
#define PyFrozenSet_CheckExact(ob) (Py_TYPE(ob) == &PyFrozenSet_Type)
#define PyAnySet_CheckExact(ob) \
@@ -87,26 +101,6 @@ PyAPI_DATA(PyObject *) _PySet_Dummy;
(Py_TYPE(ob) == &PyFrozenSet_Type || \
PyType_IsSubtype(Py_TYPE(ob), &PyFrozenSet_Type))
-PyAPI_FUNC(PyObject *) PySet_New(PyObject *);
-PyAPI_FUNC(PyObject *) PyFrozenSet_New(PyObject *);
-PyAPI_FUNC(Py_ssize_t) PySet_Size(PyObject *anyset);
-#ifndef Py_LIMITED_API
-#define PySet_GET_SIZE(so) (((PySetObject *)(so))->used)
-#endif
-PyAPI_FUNC(int) PySet_Clear(PyObject *set);
-PyAPI_FUNC(int) PySet_Contains(PyObject *anyset, PyObject *key);
-PyAPI_FUNC(int) PySet_Discard(PyObject *set, PyObject *key);
-PyAPI_FUNC(int) PySet_Add(PyObject *set, PyObject *key);
-#ifndef Py_LIMITED_API
-PyAPI_FUNC(int) _PySet_NextEntry(PyObject *set, Py_ssize_t *pos, PyObject **key, Py_hash_t *hash);
-#endif
-PyAPI_FUNC(PyObject *) PySet_Pop(PyObject *set);
-#ifndef Py_LIMITED_API
-PyAPI_FUNC(int) _PySet_Update(PyObject *set, PyObject *iterable);
-
-PyAPI_FUNC(int) PySet_ClearFreeList(void);
-#endif
-
#ifdef __cplusplus
}
#endif
diff --git a/Include/sliceobject.h b/Include/sliceobject.h
index f7ee90c3cc..26370e0175 100644
--- a/Include/sliceobject.h
+++ b/Include/sliceobject.h
@@ -41,7 +41,7 @@ PyAPI_FUNC(int) _PySlice_GetLongIndices(PySliceObject *self, PyObject *length,
PyAPI_FUNC(int) PySlice_GetIndices(PyObject *r, Py_ssize_t length,
Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step);
PyAPI_FUNC(int) PySlice_GetIndicesEx(PyObject *r, Py_ssize_t length,
- Py_ssize_t *start, Py_ssize_t *stop,
+ Py_ssize_t *start, Py_ssize_t *stop,
Py_ssize_t *step, Py_ssize_t *slicelength);
#ifdef __cplusplus
diff --git a/Include/symtable.h b/Include/symtable.h
index 1cfd8844e5..1409cd91ce 100644
--- a/Include/symtable.h
+++ b/Include/symtable.h
@@ -43,7 +43,6 @@ typedef struct _symtable_entry {
PyObject *ste_children; /* list of child blocks */
PyObject *ste_directives;/* locations of global and nonlocal statements */
_Py_block_ty ste_type; /* module, class, or function */
- int ste_unoptimized; /* false if namespace is optimized */
int ste_nested; /* true if block is nested */
unsigned ste_free : 1; /* true if block has free variables */
unsigned ste_child_free : 1; /* true if a child block has free vars,
@@ -108,10 +107,6 @@ PyAPI_FUNC(void) PySymtable_Free(struct symtable *);
#define FREE 4
#define CELL 5
-/* The following two names are used for the ste_unoptimized bit field */
-#define OPT_IMPORT_STAR 1
-#define OPT_TOPLEVEL 2 /* top-level names, including eval and exec */
-
#define GENERATOR 1
#define GENERATOR_EXPRESSION 2
diff --git a/Include/token.h b/Include/token.h
index 905022b8d2..595afa0158 100644
--- a/Include/token.h
+++ b/Include/token.h
@@ -58,13 +58,16 @@ extern "C" {
#define DOUBLESTAREQUAL 46
#define DOUBLESLASH 47
#define DOUBLESLASHEQUAL 48
-#define AT 49
-#define RARROW 50
-#define ELLIPSIS 51
+#define AT 49
+#define ATEQUAL 50
+#define RARROW 51
+#define ELLIPSIS 52
/* Don't forget to update the table _PyParser_TokenNames in tokenizer.c! */
-#define OP 52
-#define ERRORTOKEN 53
-#define N_TOKENS 54
+#define OP 53
+#define AWAIT 54
+#define ASYNC 55
+#define ERRORTOKEN 56
+#define N_TOKENS 57
/* Special definitions for cooperation with parser */
diff --git a/Include/traceback.h b/Include/traceback.h
index 891000c8fe..c3ecbe296f 100644
--- a/Include/traceback.h
+++ b/Include/traceback.h
@@ -48,7 +48,7 @@ PyAPI_DATA(PyTypeObject) PyTraceBack_Type;
This function is signal safe. */
-PyAPI_DATA(void) _Py_DumpTraceback(
+PyAPI_FUNC(void) _Py_DumpTraceback(
int fd,
PyThreadState *tstate);
@@ -62,7 +62,7 @@ PyAPI_DATA(void) _Py_DumpTraceback(
This function is signal safe. */
-PyAPI_DATA(const char*) _Py_DumpTracebackThreads(
+PyAPI_FUNC(const char*) _Py_DumpTracebackThreads(
int fd, PyInterpreterState *interp,
PyThreadState *current_thread);
diff --git a/Include/typeslots.h b/Include/typeslots.h
index ad3cdfb19a..0ce6a377dc 100644
--- a/Include/typeslots.h
+++ b/Include/typeslots.h
@@ -74,3 +74,12 @@
#define Py_tp_members 72
#define Py_tp_getset 73
#define Py_tp_free 74
+#define Py_nb_matrix_multiply 75
+#define Py_nb_inplace_matrix_multiply 76
+#define Py_am_await 77
+#define Py_am_aiter 78
+#define Py_am_anext 79
+#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
+/* New in 3.5 */
+#define Py_tp_finalize 80
+#endif
diff --git a/Include/ucnhash.h b/Include/ucnhash.h
index 8de9ba0cff..45362e997d 100644
--- a/Include/ucnhash.h
+++ b/Include/ucnhash.h
@@ -16,7 +16,7 @@ typedef struct {
int size;
/* Get name for a given character code. Returns non-zero if
- success, zero if not. Does not set Python exceptions.
+ success, zero if not. Does not set Python exceptions.
If self is NULL, data come from the default version of the database.
If it is not NULL, it should be a unicodedata.ucd_X_Y_Z object */
int (*getname)(PyObject *self, Py_UCS4 code, char* buffer, int buflen,
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h
index f19d9bf641..533dd75d2c 100644
--- a/Include/unicodeobject.h
+++ b/Include/unicodeobject.h
@@ -823,7 +823,7 @@ PyAPI_FUNC(int) PyUnicode_WriteChar(
PyAPI_FUNC(Py_UNICODE) PyUnicode_GetMax(void);
#endif
-/* Resize an Unicode object. The length is the number of characters, except
+/* Resize a Unicode object. The length is the number of characters, except
if the kind of the string is PyUnicode_WCHAR_KIND: in this case, the length
is the number of Py_UNICODE characters.
@@ -844,17 +844,13 @@ PyAPI_FUNC(int) PyUnicode_Resize(
Py_ssize_t length /* New length */
);
-/* Coerce obj to an Unicode object and return a reference with
- *incremented* refcount.
+/* Decode obj to a Unicode object.
- Coercion is done in the following way:
+ bytes, bytearray and other bytes-like objects are decoded according to the
+ given encoding and error handler. The encoding and error handler can be
+ NULL to have the interface use UTF-8 and "strict".
- 1. bytes, bytearray and other bytes-like objects are decoded
- under the assumptions that they contain data using the UTF-8
- encoding. Decoding is done in "strict" mode.
-
- 2. All other objects (including Unicode objects) raise an
- exception.
+ All other objects (including Unicode objects) raise an exception.
The API returns NULL in case of an error. The caller is responsible
for decref'ing the returned objects.
@@ -867,13 +863,9 @@ PyAPI_FUNC(PyObject*) PyUnicode_FromEncodedObject(
const char *errors /* error handling */
);
-/* Coerce obj to an Unicode object and return a reference with
- *incremented* refcount.
-
- Unicode objects are passed back as-is (subclasses are converted to
- true Unicode objects), all other objects are delegated to
- PyUnicode_FromEncodedObject(obj, NULL, "strict") which results in
- using UTF-8 encoding as basis for decoding the object.
+/* Copy an instance of a Unicode subtype to a new true Unicode object if
+ necessary. If obj is already a true Unicode object (not a subtype), return
+ the reference with *incremented* refcount.
The API returns NULL in case of an error. The caller is responsible
for decref'ing the returned objects.
@@ -981,7 +973,7 @@ _PyUnicodeWriter_WriteLatin1String(_PyUnicodeWriter *writer,
Py_ssize_t len /* length in bytes */
);
-/* Get the value of the writer as an Unicode string. Clear the
+/* Get the value of the writer as a Unicode string. Clear the
buffer of the writer. Raise an exception and return NULL
on error. */
PyAPI_FUNC(PyObject *)
@@ -2052,7 +2044,7 @@ PyAPI_FUNC(PyObject *) PyUnicode_Format(
/* Checks whether element is contained in container and return 1/0
accordingly.
- element has to coerce to an one element Unicode string. -1 is
+ element has to coerce to a one element Unicode string. -1 is
returned in case of an error. */
PyAPI_FUNC(int) PyUnicode_Contains(
@@ -2060,12 +2052,6 @@ PyAPI_FUNC(int) PyUnicode_Contains(
PyObject *element /* Element string */
);
-/* Checks whether the string contains any NUL characters. */
-
-#ifndef Py_LIMITED_API
-PyAPI_FUNC(int) _PyUnicode_HasNULChars(PyObject *);
-#endif
-
/* Checks whether argument is a valid identifier. */
PyAPI_FUNC(int) PyUnicode_IsIdentifier(PyObject *s);
@@ -2245,6 +2231,8 @@ PyAPI_FUNC(Py_UNICODE*) Py_UNICODE_strrchr(
Py_UNICODE c
);
+PyAPI_FUNC(PyObject*) _PyUnicode_FormatLong(PyObject *, int, int, int);
+
/* Create a copy of a unicode string ending with a nul character. Return NULL
and raise a MemoryError exception on memory allocation failure, otherwise
return a new allocated buffer (use PyMem_Free() to free the buffer). */
diff --git a/Lib/__future__.py b/Lib/__future__.py
index 3b2d5ecb92..63b2be3524 100644
--- a/Lib/__future__.py
+++ b/Lib/__future__.py
@@ -56,6 +56,7 @@ all_feature_names = [
"print_function",
"unicode_literals",
"barry_as_FLUFL",
+ "generator_stop",
]
__all__ = ["all_feature_names"] + all_feature_names
@@ -72,6 +73,7 @@ CO_FUTURE_WITH_STATEMENT = 0x8000 # with statement
CO_FUTURE_PRINT_FUNCTION = 0x10000 # print function
CO_FUTURE_UNICODE_LITERALS = 0x20000 # unicode string literals
CO_FUTURE_BARRY_AS_BDFL = 0x40000
+CO_FUTURE_GENERATOR_STOP = 0x80000 # StopIteration becomes RuntimeError in generators
class _Feature:
def __init__(self, optionalRelease, mandatoryRelease, compiler_flag):
@@ -132,3 +134,7 @@ unicode_literals = _Feature((2, 6, 0, "alpha", 2),
barry_as_FLUFL = _Feature((3, 1, 0, "alpha", 2),
(3, 9, 0, "alpha", 0),
CO_FUTURE_BARRY_AS_BDFL)
+
+generator_stop = _Feature((3, 5, 0, "beta", 1),
+ (3, 7, 0, "alpha", 0),
+ CO_FUTURE_GENERATOR_STOP)
diff --git a/Lib/_collections_abc.py b/Lib/_collections_abc.py
index 33b59aba1b..fc9c9f1cc1 100644
--- a/Lib/_collections_abc.py
+++ b/Lib/_collections_abc.py
@@ -9,7 +9,8 @@ Unit tests are in test_collections.
from abc import ABCMeta, abstractmethod
import sys
-__all__ = ["Hashable", "Iterable", "Iterator",
+__all__ = ["Awaitable", "Coroutine", "AsyncIterable", "AsyncIterator",
+ "Hashable", "Iterable", "Iterator", "Generator",
"Sized", "Container", "Callable",
"Set", "MutableSet",
"Mapping", "MutableMapping",
@@ -50,6 +51,13 @@ dict_values = type({}.values())
dict_items = type({}.items())
## misc ##
mappingproxy = type(type.__dict__)
+generator = type((lambda: (yield))())
+## coroutine ##
+async def _coro(): pass
+_coro = _coro()
+coroutine = type(_coro)
+_coro.close() # Prevent ResourceWarning
+del _coro
### ONE-TRICK PONIES ###
@@ -73,6 +81,113 @@ class Hashable(metaclass=ABCMeta):
return NotImplemented
+class Awaitable(metaclass=ABCMeta):
+
+ __slots__ = ()
+
+ @abstractmethod
+ def __await__(self):
+ yield
+
+ @classmethod
+ def __subclasshook__(cls, C):
+ if cls is Awaitable:
+ for B in C.__mro__:
+ if "__await__" in B.__dict__:
+ if B.__dict__["__await__"]:
+ return True
+ break
+ return NotImplemented
+
+
+class Coroutine(Awaitable):
+
+ __slots__ = ()
+
+ @abstractmethod
+ def send(self, value):
+ """Send a value into the coroutine.
+ Return next yielded value or raise StopIteration.
+ """
+ raise StopIteration
+
+ @abstractmethod
+ def throw(self, typ, val=None, tb=None):
+ """Raise an exception in the coroutine.
+ Return next yielded value or raise StopIteration.
+ """
+ if val is None:
+ if tb is None:
+ raise typ
+ val = typ()
+ if tb is not None:
+ val = val.with_traceback(tb)
+ raise val
+
+ def close(self):
+ """Raise GeneratorExit inside coroutine.
+ """
+ try:
+ self.throw(GeneratorExit)
+ except (GeneratorExit, StopIteration):
+ pass
+ else:
+ raise RuntimeError("coroutine ignored GeneratorExit")
+
+ @classmethod
+ def __subclasshook__(cls, C):
+ if cls is Coroutine:
+ mro = C.__mro__
+ for method in ('__await__', 'send', 'throw', 'close'):
+ for base in mro:
+ if method in base.__dict__:
+ break
+ else:
+ return NotImplemented
+ return True
+ return NotImplemented
+
+
+Coroutine.register(coroutine)
+
+
+class AsyncIterable(metaclass=ABCMeta):
+
+ __slots__ = ()
+
+ @abstractmethod
+ def __aiter__(self):
+ return AsyncIterator()
+
+ @classmethod
+ def __subclasshook__(cls, C):
+ if cls is AsyncIterable:
+ if any("__aiter__" in B.__dict__ for B in C.__mro__):
+ return True
+ return NotImplemented
+
+
+class AsyncIterator(AsyncIterable):
+
+ __slots__ = ()
+
+ @abstractmethod
+ async def __anext__(self):
+ """Return the next item or raise StopAsyncIteration when exhausted."""
+ raise StopAsyncIteration
+
+ def __aiter__(self):
+ return self
+
+ @classmethod
+ def __subclasshook__(cls, C):
+ if cls is AsyncIterator:
+ if (any("__anext__" in B.__dict__ for B in C.__mro__) and
+ any("__aiter__" in B.__dict__ for B in C.__mro__)):
+ return True
+ return NotImplemented
+
+
class Iterable(metaclass=ABCMeta):
__slots__ = ()
@@ -124,6 +239,64 @@ Iterator.register(str_iterator)
Iterator.register(tuple_iterator)
Iterator.register(zip_iterator)
+
+class Generator(Iterator):
+
+ __slots__ = ()
+
+ def __next__(self):
+ """Return the next item from the generator.
+ When exhausted, raise StopIteration.
+ """
+ return self.send(None)
+
+ @abstractmethod
+ def send(self, value):
+ """Send a value into the generator.
+ Return next yielded value or raise StopIteration.
+ """
+ raise StopIteration
+
+ @abstractmethod
+ def throw(self, typ, val=None, tb=None):
+ """Raise an exception in the generator.
+ Return next yielded value or raise StopIteration.
+ """
+ if val is None:
+ if tb is None:
+ raise typ
+ val = typ()
+ if tb is not None:
+ val = val.with_traceback(tb)
+ raise val
+
+ def close(self):
+ """Raise GeneratorExit inside generator.
+ """
+ try:
+ self.throw(GeneratorExit)
+ except (GeneratorExit, StopIteration):
+ pass
+ else:
+ raise RuntimeError("generator ignored GeneratorExit")
+
+ @classmethod
+ def __subclasshook__(cls, C):
+ if cls is Generator:
+ mro = C.__mro__
+ for method in ('__iter__', '__next__', 'send', 'throw', 'close'):
+ for base in mro:
+ if method in base.__dict__:
+ break
+ else:
+ return NotImplemented
+ return True
+ return NotImplemented
+
+
+Generator.register(generator)
+
+
class Sized(metaclass=ABCMeta):
__slots__ = ()
@@ -453,6 +626,8 @@ Mapping.register(mappingproxy)
class MappingView(Sized):
+ __slots__ = '_mapping',
+
def __init__(self, mapping):
self._mapping = mapping
@@ -465,6 +640,8 @@ class MappingView(Sized):
class KeysView(MappingView, Set):
+ __slots__ = ()
+
@classmethod
def _from_iterable(self, it):
return set(it)
@@ -480,6 +657,8 @@ KeysView.register(dict_keys)
class ItemsView(MappingView, Set):
+ __slots__ = ()
+
@classmethod
def _from_iterable(self, it):
return set(it)
@@ -502,6 +681,8 @@ ItemsView.register(dict_items)
class ValuesView(MappingView):
+ __slots__ = ()
+
def __contains__(self, value):
for key in self._mapping:
if value == self._mapping[key]:
@@ -647,13 +828,23 @@ class Sequence(Sized, Iterable, Container):
for i in reversed(range(len(self))):
yield self[i]
- def index(self, value):
- '''S.index(value) -> integer -- return first index of value.
+ def index(self, value, start=0, stop=None):
+ '''S.index(value, [start, [stop]]) -> integer -- return first index of value.
Raises ValueError if the value is not present.
'''
- for i, v in enumerate(self):
- if v == value:
- return i
+ if start is not None and start < 0:
+ start = max(len(self) + start, 0)
+ if stop is not None and stop < 0:
+ stop += len(self)
+
+ i = start
+ while stop is None or i < stop:
+ try:
+ if self[i] == value:
+ return i
+ except IndexError:
+ break
+ i += 1
raise ValueError
def count(self, value):
diff --git a/Lib/_compat_pickle.py b/Lib/_compat_pickle.py
index 6e39d4aee3..c0e0443cf2 100644
--- a/Lib/_compat_pickle.py
+++ b/Lib/_compat_pickle.py
@@ -177,6 +177,13 @@ IMPORT_MAPPING.update({
'DocXMLRPCServer': 'xmlrpc.server',
'SimpleHTTPServer': 'http.server',
'CGIHTTPServer': 'http.server',
+ # For compatibility with broken pickles saved in old Python 3 versions
+ 'UserDict': 'collections',
+ 'UserList': 'collections',
+ 'UserString': 'collections',
+ 'whichdb': 'dbm',
+ 'StringIO': 'io',
+ 'cStringIO': 'io',
})
REVERSE_IMPORT_MAPPING.update({
diff --git a/Lib/_compression.py b/Lib/_compression.py
new file mode 100644
index 0000000000..b00f31b400
--- /dev/null
+++ b/Lib/_compression.py
@@ -0,0 +1,152 @@
+"""Internal classes used by the gzip, lzma and bz2 modules"""
+
+import io
+
+
+BUFFER_SIZE = io.DEFAULT_BUFFER_SIZE # Compressed data read chunk size
+
+
+class BaseStream(io.BufferedIOBase):
+ """Mode-checking helper functions."""
+
+ def _check_not_closed(self):
+ if self.closed:
+ raise ValueError("I/O operation on closed file")
+
+ def _check_can_read(self):
+ if not self.readable():
+ raise io.UnsupportedOperation("File not open for reading")
+
+ def _check_can_write(self):
+ if not self.writable():
+ raise io.UnsupportedOperation("File not open for writing")
+
+ def _check_can_seek(self):
+ if not self.readable():
+ raise io.UnsupportedOperation("Seeking is only supported "
+ "on files open for reading")
+ if not self.seekable():
+ raise io.UnsupportedOperation("The underlying file object "
+ "does not support seeking")
+
+
+class DecompressReader(io.RawIOBase):
+ """Adapts the decompressor API to a RawIOBase reader API"""
+
+ def readable(self):
+ return True
+
+ def __init__(self, fp, decomp_factory, trailing_error=(), **decomp_args):
+ self._fp = fp
+ self._eof = False
+ self._pos = 0 # Current offset in decompressed stream
+
+ # Set to size of decompressed stream once it is known, for SEEK_END
+ self._size = -1
+
+ # Save the decompressor factory and arguments.
+ # If the file contains multiple compressed streams, each
+ # stream will need a separate decompressor object. A new decompressor
+ # object is also needed when implementing a backwards seek().
+ self._decomp_factory = decomp_factory
+ self._decomp_args = decomp_args
+ self._decompressor = self._decomp_factory(**self._decomp_args)
+
+ # Exception class to catch from decompressor signifying invalid
+ # trailing data to ignore
+ self._trailing_error = trailing_error
+
+ def close(self):
+ self._decompressor = None
+ return super().close()
+
+ def seekable(self):
+ return self._fp.seekable()
+
+ def readinto(self, b):
+ with memoryview(b) as view, view.cast("B") as byte_view:
+ data = self.read(len(byte_view))
+ byte_view[:len(data)] = data
+ return len(data)
+
+ def read(self, size=-1):
+ if size < 0:
+ return self.readall()
+
+ if not size or self._eof:
+ return b""
+ data = None # Default if EOF is encountered
+ # Depending on the input data, our call to the decompressor may not
+ # return any data. In this case, try again after reading another block.
+ while True:
+ if self._decompressor.eof:
+ rawblock = (self._decompressor.unused_data or
+ self._fp.read(BUFFER_SIZE))
+ if not rawblock:
+ break
+ # Continue to next stream.
+ self._decompressor = self._decomp_factory(
+ **self._decomp_args)
+ try:
+ data = self._decompressor.decompress(rawblock, size)
+ except self._trailing_error:
+ # Trailing data isn't a valid compressed stream; ignore it.
+ break
+ else:
+ if self._decompressor.needs_input:
+ rawblock = self._fp.read(BUFFER_SIZE)
+ if not rawblock:
+ raise EOFError("Compressed file ended before the "
+ "end-of-stream marker was reached")
+ else:
+ rawblock = b""
+ data = self._decompressor.decompress(rawblock, size)
+ if data:
+ break
+ if not data:
+ self._eof = True
+ self._size = self._pos
+ return b""
+ self._pos += len(data)
+ return data
+
+ # Rewind the file to the beginning of the data stream.
+ def _rewind(self):
+ self._fp.seek(0)
+ self._eof = False
+ self._pos = 0
+ self._decompressor = self._decomp_factory(**self._decomp_args)
+
+ def seek(self, offset, whence=io.SEEK_SET):
+ # Recalculate offset as an absolute file position.
+ if whence == io.SEEK_SET:
+ pass
+ elif whence == io.SEEK_CUR:
+ offset = self._pos + offset
+ elif whence == io.SEEK_END:
+ # Seeking relative to EOF - we need to know the file's size.
+ if self._size < 0:
+ while self.read(io.DEFAULT_BUFFER_SIZE):
+ pass
+ offset = self._size + offset
+ else:
+ raise ValueError("Invalid value for whence: {}".format(whence))
+
+ # Make it so that offset is the number of bytes to skip forward.
+ if offset < self._pos:
+ self._rewind()
+ else:
+ offset -= self._pos
+
+ # Read and discard data until we reach the desired position.
+ while offset > 0:
+ data = self.read(min(io.DEFAULT_BUFFER_SIZE, offset))
+ if not data:
+ break
+ offset -= len(data)
+
+ return self._pos
+
+ def tell(self):
+ """Return the current file position."""
+ return self._pos
diff --git a/Lib/_dummy_thread.py b/Lib/_dummy_thread.py
index b67cfb95be..36e5f38ae0 100644
--- a/Lib/_dummy_thread.py
+++ b/Lib/_dummy_thread.py
@@ -140,6 +140,14 @@ class LockType(object):
def locked(self):
return self.locked_status
+ def __repr__(self):
+ return "<%s %s.%s object at %s>" % (
+ "locked" if self.locked_status else "unlocked",
+ self.__class__.__module__,
+ self.__class__.__qualname__,
+ hex(id(self))
+ )
+
# Used to signal that interrupt_main was called in a "thread"
_interrupt = False
# True when not executing in a "thread"
diff --git a/Lib/_osx_support.py b/Lib/_osx_support.py
index b07e75d0e8..13fcd8b8d2 100644
--- a/Lib/_osx_support.py
+++ b/Lib/_osx_support.py
@@ -151,13 +151,13 @@ def _find_appropriate_compiler(_config_vars):
# can only be found inside Xcode.app if the "Command Line Tools"
# are not installed.
#
- # Futhermore, the compiler that can be used varies between
+ # Furthermore, the compiler that can be used varies between
# Xcode releases. Up to Xcode 4 it was possible to use 'gcc-4.2'
# as the compiler, after that 'clang' should be used because
# gcc-4.2 is either not present, or a copy of 'llvm-gcc' that
# miscompiles Python.
- # skip checks if the compiler was overriden with a CC env variable
+ # skip checks if the compiler was overridden with a CC env variable
if 'CC' in os.environ:
return _config_vars
@@ -193,7 +193,7 @@ def _find_appropriate_compiler(_config_vars):
if cc != oldcc:
# Found a replacement compiler.
# Modify config vars using new compiler, if not already explicitly
- # overriden by an env variable, preserving additional arguments.
+ # overridden by an env variable, preserving additional arguments.
for cv in _COMPILER_CONFIG_VARS:
if cv in _config_vars and cv not in os.environ:
cv_split = _config_vars[cv].split()
@@ -207,7 +207,7 @@ def _remove_universal_flags(_config_vars):
"""Remove all universal build arguments from config vars"""
for cv in _UNIVERSAL_CONFIG_VARS:
- # Do not alter a config var explicitly overriden by env var
+ # Do not alter a config var explicitly overridden by env var
if cv in _config_vars and cv not in os.environ:
flags = _config_vars[cv]
flags = re.sub('-arch\s+\w+\s', ' ', flags, re.ASCII)
@@ -228,7 +228,7 @@ def _remove_unsupported_archs(_config_vars):
# build extensions on OSX 10.7 and later with the prebuilt
# 32-bit installer on the python.org website.
- # skip checks if the compiler was overriden with a CC env variable
+ # skip checks if the compiler was overridden with a CC env variable
if 'CC' in os.environ:
return _config_vars
@@ -244,7 +244,7 @@ def _remove_unsupported_archs(_config_vars):
# across Xcode and compiler versions, there is no reliable way
# to be sure why it failed. Assume here it was due to lack of
# PPC support and remove the related '-arch' flags from each
- # config variables not explicitly overriden by an environment
+ # config variables not explicitly overridden by an environment
# variable. If the error was for some other reason, we hope the
# failure will show up again when trying to compile an extension
# module.
@@ -292,7 +292,7 @@ def _check_for_unavailable_sdk(_config_vars):
sdk = m.group(1)
if not os.path.exists(sdk):
for cv in _UNIVERSAL_CONFIG_VARS:
- # Do not alter a config var explicitly overriden by env var
+ # Do not alter a config var explicitly overridden by env var
if cv in _config_vars and cv not in os.environ:
flags = _config_vars[cv]
flags = re.sub(r'-isysroot\s+\S+(?:\s|$)', ' ', flags)
diff --git a/Lib/_pydecimal.py b/Lib/_pydecimal.py
new file mode 100644
index 0000000000..c719424472
--- /dev/null
+++ b/Lib/_pydecimal.py
@@ -0,0 +1,6380 @@
+# Copyright (c) 2004 Python Software Foundation.
+# All rights reserved.
+
+# Written by Eric Price <eprice at tjhsst.edu>
+# and Facundo Batista <facundo at taniquetil.com.ar>
+# and Raymond Hettinger <python at rcn.com>
+# and Aahz <aahz at pobox.com>
+# and Tim Peters
+
+# This module should be kept in sync with the latest updates of the
+# IBM specification as it evolves. Those updates will be treated
+# as bug fixes (deviation from the spec is a compatibility, usability
+# bug) and will be backported. At this point the spec is stabilizing
+# and the updates are becoming fewer, smaller, and less significant.
+
+"""
+This is an implementation of decimal floating point arithmetic based on
+the General Decimal Arithmetic Specification:
+
+ http://speleotrove.com/decimal/decarith.html
+
+and IEEE standard 854-1987:
+
+ http://en.wikipedia.org/wiki/IEEE_854-1987
+
+Decimal floating point has finite precision with arbitrarily large bounds.
+
+The purpose of this module is to support arithmetic using familiar
+"schoolhouse" rules and to avoid some of the tricky representation
+issues associated with binary floating point. The package is especially
+useful for financial applications or for contexts where users have
+expectations that are at odds with binary floating point (for instance,
+in binary floating point, 1.00 % 0.1 gives 0.09999999999999995 instead
+of 0.0; Decimal('1.00') % Decimal('0.1') returns the expected
+Decimal('0.00')).
+
+Here are some examples of using the decimal module:
+
+>>> from decimal import *
+>>> setcontext(ExtendedContext)
+>>> Decimal(0)
+Decimal('0')
+>>> Decimal('1')
+Decimal('1')
+>>> Decimal('-.0123')
+Decimal('-0.0123')
+>>> Decimal(123456)
+Decimal('123456')
+>>> Decimal('123.45e12345678')
+Decimal('1.2345E+12345680')
+>>> Decimal('1.33') + Decimal('1.27')
+Decimal('2.60')
+>>> Decimal('12.34') + Decimal('3.87') - Decimal('18.41')
+Decimal('-2.20')
+>>> dig = Decimal(1)
+>>> print(dig / Decimal(3))
+0.333333333
+>>> getcontext().prec = 18
+>>> print(dig / Decimal(3))
+0.333333333333333333
+>>> print(dig.sqrt())
+1
+>>> print(Decimal(3).sqrt())
+1.73205080756887729
+>>> print(Decimal(3) ** 123)
+4.85192780976896427E+58
+>>> inf = Decimal(1) / Decimal(0)
+>>> print(inf)
+Infinity
+>>> neginf = Decimal(-1) / Decimal(0)
+>>> print(neginf)
+-Infinity
+>>> print(neginf + inf)
+NaN
+>>> print(neginf * inf)
+-Infinity
+>>> print(dig / 0)
+Infinity
+>>> getcontext().traps[DivisionByZero] = 1
+>>> print(dig / 0)
+Traceback (most recent call last):
+ ...
+ ...
+ ...
+decimal.DivisionByZero: x / 0
+>>> c = Context()
+>>> c.traps[InvalidOperation] = 0
+>>> print(c.flags[InvalidOperation])
+0
+>>> c.divide(Decimal(0), Decimal(0))
+Decimal('NaN')
+>>> c.traps[InvalidOperation] = 1
+>>> print(c.flags[InvalidOperation])
+1
+>>> c.flags[InvalidOperation] = 0
+>>> print(c.flags[InvalidOperation])
+0
+>>> print(c.divide(Decimal(0), Decimal(0)))
+Traceback (most recent call last):
+ ...
+ ...
+ ...
+decimal.InvalidOperation: 0 / 0
+>>> print(c.flags[InvalidOperation])
+1
+>>> c.flags[InvalidOperation] = 0
+>>> c.traps[InvalidOperation] = 0
+>>> print(c.divide(Decimal(0), Decimal(0)))
+NaN
+>>> print(c.flags[InvalidOperation])
+1
+>>>
+"""
+
+__all__ = [
+ # Two major classes
+ 'Decimal', 'Context',
+
+ # Named tuple representation
+ 'DecimalTuple',
+
+ # Contexts
+ 'DefaultContext', 'BasicContext', 'ExtendedContext',
+
+ # Exceptions
+ 'DecimalException', 'Clamped', 'InvalidOperation', 'DivisionByZero',
+ 'Inexact', 'Rounded', 'Subnormal', 'Overflow', 'Underflow',
+ 'FloatOperation',
+
+ # Exceptional conditions that trigger InvalidOperation
+ 'DivisionImpossible', 'InvalidContext', 'ConversionSyntax', 'DivisionUndefined',
+
+ # Constants for use in setting up contexts
+ 'ROUND_DOWN', 'ROUND_HALF_UP', 'ROUND_HALF_EVEN', 'ROUND_CEILING',
+ 'ROUND_FLOOR', 'ROUND_UP', 'ROUND_HALF_DOWN', 'ROUND_05UP',
+
+ # Functions for manipulating contexts
+ 'setcontext', 'getcontext', 'localcontext',
+
+ # Limits for the C version for compatibility
+ 'MAX_PREC', 'MAX_EMAX', 'MIN_EMIN', 'MIN_ETINY',
+
+ # C version: compile time choice that enables the thread local context
+ 'HAVE_THREADS'
+]
+
+__xname__ = __name__ # sys.modules lookup (--without-threads)
+__name__ = 'decimal' # For pickling
+__version__ = '1.70' # Highest version of the spec this complies with
+ # See http://speleotrove.com/decimal/
+__libmpdec_version__ = "2.4.1" # compatible libmpdec version
+
+import math as _math
+import numbers as _numbers
+import sys
+
+try:
+ from collections import namedtuple as _namedtuple
+ DecimalTuple = _namedtuple('DecimalTuple', 'sign digits exponent')
+except ImportError:
+ DecimalTuple = lambda *args: args
+
+# Rounding
+ROUND_DOWN = 'ROUND_DOWN'
+ROUND_HALF_UP = 'ROUND_HALF_UP'
+ROUND_HALF_EVEN = 'ROUND_HALF_EVEN'
+ROUND_CEILING = 'ROUND_CEILING'
+ROUND_FLOOR = 'ROUND_FLOOR'
+ROUND_UP = 'ROUND_UP'
+ROUND_HALF_DOWN = 'ROUND_HALF_DOWN'
+ROUND_05UP = 'ROUND_05UP'
+
+# Compatibility with the C version
+HAVE_THREADS = True
+if sys.maxsize == 2**63-1:
+ MAX_PREC = 999999999999999999
+ MAX_EMAX = 999999999999999999
+ MIN_EMIN = -999999999999999999
+else:
+ MAX_PREC = 425000000
+ MAX_EMAX = 425000000
+ MIN_EMIN = -425000000
+
+MIN_ETINY = MIN_EMIN - (MAX_PREC-1)
+
+# Errors
+
+class DecimalException(ArithmeticError):
+ """Base exception class.
+
+ Used exceptions derive from this.
+ If an exception derives from another exception besides this (such as
+ Underflow (Inexact, Rounded, Subnormal) that indicates that it is only
+ called if the others are present. This isn't actually used for
+ anything, though.
+
+ handle -- Called when context._raise_error is called and the
+ trap_enabler is not set. First argument is self, second is the
+ context. More arguments can be given, those being after
+ the explanation in _raise_error (For example,
+ context._raise_error(NewError, '(-x)!', self._sign) would
+ call NewError().handle(context, self._sign).)
+
+ To define a new exception, it should be sufficient to have it derive
+ from DecimalException.
+ """
+ def handle(self, context, *args):
+ pass
+
+
+class Clamped(DecimalException):
+ """Exponent of a 0 changed to fit bounds.
+
+ This occurs and signals clamped if the exponent of a result has been
+ altered in order to fit the constraints of a specific concrete
+ representation. This may occur when the exponent of a zero result would
+ be outside the bounds of a representation, or when a large normal
+ number would have an encoded exponent that cannot be represented. In
+ this latter case, the exponent is reduced to fit and the corresponding
+ number of zero digits are appended to the coefficient ("fold-down").
+ """
+
+class InvalidOperation(DecimalException):
+ """An invalid operation was performed.
+
+ Various bad things cause this:
+
+ Something creates a signaling NaN
+ -INF + INF
+ 0 * (+-)INF
+ (+-)INF / (+-)INF
+ x % 0
+ (+-)INF % x
+ x._rescale( non-integer )
+ sqrt(-x) , x > 0
+ 0 ** 0
+ x ** (non-integer)
+ x ** (+-)INF
+ An operand is invalid
+
+ The result of the operation after these is a quiet positive NaN,
+ except when the cause is a signaling NaN, in which case the result is
+ also a quiet NaN, but with the original sign, and an optional
+ diagnostic information.
+ """
+ def handle(self, context, *args):
+ if args:
+ ans = _dec_from_triple(args[0]._sign, args[0]._int, 'n', True)
+ return ans._fix_nan(context)
+ return _NaN
+
+class ConversionSyntax(InvalidOperation):
+ """Trying to convert badly formed string.
+
+ This occurs and signals invalid-operation if a string is being
+ converted to a number and it does not conform to the numeric string
+ syntax. The result is [0,qNaN].
+ """
+ def handle(self, context, *args):
+ return _NaN
+
+class DivisionByZero(DecimalException, ZeroDivisionError):
+ """Division by 0.
+
+ This occurs and signals division-by-zero if division of a finite number
+ by zero was attempted (during a divide-integer or divide operation, or a
+ power operation with negative right-hand operand), and the dividend was
+ not zero.
+
+ The result of the operation is [sign,inf], where sign is the exclusive
+ or of the signs of the operands for divide, or is 1 for an odd power of
+ -0, for power.
+ """
+
+ def handle(self, context, sign, *args):
+ return _SignedInfinity[sign]
+
+class DivisionImpossible(InvalidOperation):
+ """Cannot perform the division adequately.
+
+ This occurs and signals invalid-operation if the integer result of a
+ divide-integer or remainder operation had too many digits (would be
+ longer than precision). The result is [0,qNaN].
+ """
+
+ def handle(self, context, *args):
+ return _NaN
+
+class DivisionUndefined(InvalidOperation, ZeroDivisionError):
+ """Undefined result of division.
+
+ This occurs and signals invalid-operation if division by zero was
+ attempted (during a divide-integer, divide, or remainder operation), and
+ the dividend is also zero. The result is [0,qNaN].
+ """
+
+ def handle(self, context, *args):
+ return _NaN
+
+class Inexact(DecimalException):
+ """Had to round, losing information.
+
+ This occurs and signals inexact whenever the result of an operation is
+ not exact (that is, it needed to be rounded and any discarded digits
+ were non-zero), or if an overflow or underflow condition occurs. The
+ result in all cases is unchanged.
+
+ The inexact signal may be tested (or trapped) to determine if a given
+ operation (or sequence of operations) was inexact.
+ """
+
+class InvalidContext(InvalidOperation):
+ """Invalid context. Unknown rounding, for example.
+
+ This occurs and signals invalid-operation if an invalid context was
+ detected during an operation. This can occur if contexts are not checked
+ on creation and either the precision exceeds the capability of the
+ underlying concrete representation or an unknown or unsupported rounding
+ was specified. These aspects of the context need only be checked when
+ the values are required to be used. The result is [0,qNaN].
+ """
+
+ def handle(self, context, *args):
+ return _NaN
+
+class Rounded(DecimalException):
+ """Number got rounded (not necessarily changed during rounding).
+
+ This occurs and signals rounded whenever the result of an operation is
+ rounded (that is, some zero or non-zero digits were discarded from the
+ coefficient), or if an overflow or underflow condition occurs. The
+ result in all cases is unchanged.
+
+ The rounded signal may be tested (or trapped) to determine if a given
+ operation (or sequence of operations) caused a loss of precision.
+ """
+
+class Subnormal(DecimalException):
+ """Exponent < Emin before rounding.
+
+ This occurs and signals subnormal whenever the result of a conversion or
+ operation is subnormal (that is, its adjusted exponent is less than
+ Emin, before any rounding). The result in all cases is unchanged.
+
+ The subnormal signal may be tested (or trapped) to determine if a given
+ or operation (or sequence of operations) yielded a subnormal result.
+ """
+
+class Overflow(Inexact, Rounded):
+ """Numerical overflow.
+
+ This occurs and signals overflow if the adjusted exponent of a result
+ (from a conversion or from an operation that is not an attempt to divide
+ by zero), after rounding, would be greater than the largest value that
+ can be handled by the implementation (the value Emax).
+
+ The result depends on the rounding mode:
+
+ For round-half-up and round-half-even (and for round-half-down and
+ round-up, if implemented), the result of the operation is [sign,inf],
+ where sign is the sign of the intermediate result. For round-down, the
+ result is the largest finite number that can be represented in the
+ current precision, with the sign of the intermediate result. For
+ round-ceiling, the result is the same as for round-down if the sign of
+ the intermediate result is 1, or is [0,inf] otherwise. For round-floor,
+ the result is the same as for round-down if the sign of the intermediate
+ result is 0, or is [1,inf] otherwise. In all cases, Inexact and Rounded
+ will also be raised.
+ """
+
+ def handle(self, context, sign, *args):
+ if context.rounding in (ROUND_HALF_UP, ROUND_HALF_EVEN,
+ ROUND_HALF_DOWN, ROUND_UP):
+ return _SignedInfinity[sign]
+ if sign == 0:
+ if context.rounding == ROUND_CEILING:
+ return _SignedInfinity[sign]
+ return _dec_from_triple(sign, '9'*context.prec,
+ context.Emax-context.prec+1)
+ if sign == 1:
+ if context.rounding == ROUND_FLOOR:
+ return _SignedInfinity[sign]
+ return _dec_from_triple(sign, '9'*context.prec,
+ context.Emax-context.prec+1)
+
+
+class Underflow(Inexact, Rounded, Subnormal):
+ """Numerical underflow with result rounded to 0.
+
+ This occurs and signals underflow if a result is inexact and the
+ adjusted exponent of the result would be smaller (more negative) than
+ the smallest value that can be handled by the implementation (the value
+ Emin). That is, the result is both inexact and subnormal.
+
+ The result after an underflow will be a subnormal number rounded, if
+ necessary, so that its exponent is not less than Etiny. This may result
+ in 0 with the sign of the intermediate result and an exponent of Etiny.
+
+ In all cases, Inexact, Rounded, and Subnormal will also be raised.
+ """
+
+class FloatOperation(DecimalException, TypeError):
+ """Enable stricter semantics for mixing floats and Decimals.
+
+ If the signal is not trapped (default), mixing floats and Decimals is
+ permitted in the Decimal() constructor, context.create_decimal() and
+ all comparison operators. Both conversion and comparisons are exact.
+ Any occurrence of a mixed operation is silently recorded by setting
+ FloatOperation in the context flags. Explicit conversions with
+ Decimal.from_float() or context.create_decimal_from_float() do not
+ set the flag.
+
+ Otherwise (the signal is trapped), only equality comparisons and explicit
+ conversions are silent. All other mixed operations raise FloatOperation.
+ """
+
+# List of public traps and flags
+_signals = [Clamped, DivisionByZero, Inexact, Overflow, Rounded,
+ Underflow, InvalidOperation, Subnormal, FloatOperation]
+
+# Map conditions (per the spec) to signals
+_condition_map = {ConversionSyntax:InvalidOperation,
+ DivisionImpossible:InvalidOperation,
+ DivisionUndefined:InvalidOperation,
+ InvalidContext:InvalidOperation}
+
+# Valid rounding modes
+_rounding_modes = (ROUND_DOWN, ROUND_HALF_UP, ROUND_HALF_EVEN, ROUND_CEILING,
+ ROUND_FLOOR, ROUND_UP, ROUND_HALF_DOWN, ROUND_05UP)
+
+##### Context Functions ##################################################
+
+# The getcontext() and setcontext() function manage access to a thread-local
+# current context. Py2.4 offers direct support for thread locals. If that
+# is not available, use threading.current_thread() which is slower but will
+# work for older Pythons. If threads are not part of the build, create a
+# mock threading object with threading.local() returning the module namespace.
+
+try:
+ import threading
+except ImportError:
+ # Python was compiled without threads; create a mock object instead
+ class MockThreading(object):
+ def local(self, sys=sys):
+ return sys.modules[__xname__]
+ threading = MockThreading()
+ del MockThreading
+
+try:
+ threading.local
+
+except AttributeError:
+
+ # To fix reloading, force it to create a new context
+ # Old contexts have different exceptions in their dicts, making problems.
+ if hasattr(threading.current_thread(), '__decimal_context__'):
+ del threading.current_thread().__decimal_context__
+
+ def setcontext(context):
+ """Set this thread's context to context."""
+ if context in (DefaultContext, BasicContext, ExtendedContext):
+ context = context.copy()
+ context.clear_flags()
+ threading.current_thread().__decimal_context__ = context
+
+ def getcontext():
+ """Returns this thread's context.
+
+ If this thread does not yet have a context, returns
+ a new context and sets this thread's context.
+ New contexts are copies of DefaultContext.
+ """
+ try:
+ return threading.current_thread().__decimal_context__
+ except AttributeError:
+ context = Context()
+ threading.current_thread().__decimal_context__ = context
+ return context
+
+else:
+
+ local = threading.local()
+ if hasattr(local, '__decimal_context__'):
+ del local.__decimal_context__
+
+ def getcontext(_local=local):
+ """Returns this thread's context.
+
+ If this thread does not yet have a context, returns
+ a new context and sets this thread's context.
+ New contexts are copies of DefaultContext.
+ """
+ try:
+ return _local.__decimal_context__
+ except AttributeError:
+ context = Context()
+ _local.__decimal_context__ = context
+ return context
+
+ def setcontext(context, _local=local):
+ """Set this thread's context to context."""
+ if context in (DefaultContext, BasicContext, ExtendedContext):
+ context = context.copy()
+ context.clear_flags()
+ _local.__decimal_context__ = context
+
+ del threading, local # Don't contaminate the namespace
+
+def localcontext(ctx=None):
+ """Return a context manager for a copy of the supplied context
+
+ Uses a copy of the current context if no context is specified
+ The returned context manager creates a local decimal context
+ in a with statement:
+ def sin(x):
+ with localcontext() as ctx:
+ ctx.prec += 2
+ # Rest of sin calculation algorithm
+ # uses a precision 2 greater than normal
+ return +s # Convert result to normal precision
+
+ def sin(x):
+ with localcontext(ExtendedContext):
+ # Rest of sin calculation algorithm
+ # uses the Extended Context from the
+ # General Decimal Arithmetic Specification
+ return +s # Convert result to normal context
+
+ >>> setcontext(DefaultContext)
+ >>> print(getcontext().prec)
+ 28
+ >>> with localcontext():
+ ... ctx = getcontext()
+ ... ctx.prec += 2
+ ... print(ctx.prec)
+ ...
+ 30
+ >>> with localcontext(ExtendedContext):
+ ... print(getcontext().prec)
+ ...
+ 9
+ >>> print(getcontext().prec)
+ 28
+ """
+ if ctx is None: ctx = getcontext()
+ return _ContextManager(ctx)
+
+
+##### Decimal class #######################################################
+
+# Do not subclass Decimal from numbers.Real and do not register it as such
+# (because Decimals are not interoperable with floats). See the notes in
+# numbers.py for more detail.
+
+class Decimal(object):
+ """Floating point class for decimal arithmetic."""
+
+ __slots__ = ('_exp','_int','_sign', '_is_special')
+ # Generally, the value of the Decimal instance is given by
+ # (-1)**_sign * _int * 10**_exp
+ # Special values are signified by _is_special == True
+
+ # We're immutable, so use __new__ not __init__
+ def __new__(cls, value="0", context=None):
+ """Create a decimal point instance.
+
+ >>> Decimal('3.14') # string input
+ Decimal('3.14')
+ >>> Decimal((0, (3, 1, 4), -2)) # tuple (sign, digit_tuple, exponent)
+ Decimal('3.14')
+ >>> Decimal(314) # int
+ Decimal('314')
+ >>> Decimal(Decimal(314)) # another decimal instance
+ Decimal('314')
+ >>> Decimal(' 3.14 \\n') # leading and trailing whitespace okay
+ Decimal('3.14')
+ """
+
+ # Note that the coefficient, self._int, is actually stored as
+ # a string rather than as a tuple of digits. This speeds up
+ # the "digits to integer" and "integer to digits" conversions
+ # that are used in almost every arithmetic operation on
+ # Decimals. This is an internal detail: the as_tuple function
+ # and the Decimal constructor still deal with tuples of
+ # digits.
+
+ self = object.__new__(cls)
+
+ # From a string
+ # REs insist on real strings, so we can too.
+ if isinstance(value, str):
+ m = _parser(value.strip())
+ if m is None:
+ if context is None:
+ context = getcontext()
+ return context._raise_error(ConversionSyntax,
+ "Invalid literal for Decimal: %r" % value)
+
+ if m.group('sign') == "-":
+ self._sign = 1
+ else:
+ self._sign = 0
+ intpart = m.group('int')
+ if intpart is not None:
+ # finite number
+ fracpart = m.group('frac') or ''
+ exp = int(m.group('exp') or '0')
+ self._int = str(int(intpart+fracpart))
+ self._exp = exp - len(fracpart)
+ self._is_special = False
+ else:
+ diag = m.group('diag')
+ if diag is not None:
+ # NaN
+ self._int = str(int(diag or '0')).lstrip('0')
+ if m.group('signal'):
+ self._exp = 'N'
+ else:
+ self._exp = 'n'
+ else:
+ # infinity
+ self._int = '0'
+ self._exp = 'F'
+ self._is_special = True
+ return self
+
+ # From an integer
+ if isinstance(value, int):
+ if value >= 0:
+ self._sign = 0
+ else:
+ self._sign = 1
+ self._exp = 0
+ self._int = str(abs(value))
+ self._is_special = False
+ return self
+
+ # From another decimal
+ if isinstance(value, Decimal):
+ self._exp = value._exp
+ self._sign = value._sign
+ self._int = value._int
+ self._is_special = value._is_special
+ return self
+
+ # From an internal working value
+ if isinstance(value, _WorkRep):
+ self._sign = value.sign
+ self._int = str(value.int)
+ self._exp = int(value.exp)
+ self._is_special = False
+ return self
+
+ # tuple/list conversion (possibly from as_tuple())
+ if isinstance(value, (list,tuple)):
+ if len(value) != 3:
+ raise ValueError('Invalid tuple size in creation of Decimal '
+ 'from list or tuple. The list or tuple '
+ 'should have exactly three elements.')
+ # process sign. The isinstance test rejects floats
+ if not (isinstance(value[0], int) and value[0] in (0,1)):
+ raise ValueError("Invalid sign. The first value in the tuple "
+ "should be an integer; either 0 for a "
+ "positive number or 1 for a negative number.")
+ self._sign = value[0]
+ if value[2] == 'F':
+ # infinity: value[1] is ignored
+ self._int = '0'
+ self._exp = value[2]
+ self._is_special = True
+ else:
+ # process and validate the digits in value[1]
+ digits = []
+ for digit in value[1]:
+ if isinstance(digit, int) and 0 <= digit <= 9:
+ # skip leading zeros
+ if digits or digit != 0:
+ digits.append(digit)
+ else:
+ raise ValueError("The second value in the tuple must "
+ "be composed of integers in the range "
+ "0 through 9.")
+ if value[2] in ('n', 'N'):
+ # NaN: digits form the diagnostic
+ self._int = ''.join(map(str, digits))
+ self._exp = value[2]
+ self._is_special = True
+ elif isinstance(value[2], int):
+ # finite number: digits give the coefficient
+ self._int = ''.join(map(str, digits or [0]))
+ self._exp = value[2]
+ self._is_special = False
+ else:
+ raise ValueError("The third value in the tuple must "
+ "be an integer, or one of the "
+ "strings 'F', 'n', 'N'.")
+ return self
+
+ if isinstance(value, float):
+ if context is None:
+ context = getcontext()
+ context._raise_error(FloatOperation,
+ "strict semantics for mixing floats and Decimals are "
+ "enabled")
+ value = Decimal.from_float(value)
+ self._exp = value._exp
+ self._sign = value._sign
+ self._int = value._int
+ self._is_special = value._is_special
+ return self
+
+ raise TypeError("Cannot convert %r to Decimal" % value)
+
+ @classmethod
+ def from_float(cls, f):
+ """Converts a float to a decimal number, exactly.
+
+ Note that Decimal.from_float(0.1) is not the same as Decimal('0.1').
+ Since 0.1 is not exactly representable in binary floating point, the
+ value is stored as the nearest representable value which is
+ 0x1.999999999999ap-4. The exact equivalent of the value in decimal
+ is 0.1000000000000000055511151231257827021181583404541015625.
+
+ >>> Decimal.from_float(0.1)
+ Decimal('0.1000000000000000055511151231257827021181583404541015625')
+ >>> Decimal.from_float(float('nan'))
+ Decimal('NaN')
+ >>> Decimal.from_float(float('inf'))
+ Decimal('Infinity')
+ >>> Decimal.from_float(-float('inf'))
+ Decimal('-Infinity')
+ >>> Decimal.from_float(-0.0)
+ Decimal('-0')
+
+ """
+ if isinstance(f, int): # handle integer inputs
+ return cls(f)
+ if not isinstance(f, float):
+ raise TypeError("argument must be int or float.")
+ if _math.isinf(f) or _math.isnan(f):
+ return cls(repr(f))
+ if _math.copysign(1.0, f) == 1.0:
+ sign = 0
+ else:
+ sign = 1
+ n, d = abs(f).as_integer_ratio()
+ k = d.bit_length() - 1
+ result = _dec_from_triple(sign, str(n*5**k), -k)
+ if cls is Decimal:
+ return result
+ else:
+ return cls(result)
+
+ def _isnan(self):
+ """Returns whether the number is not actually one.
+
+ 0 if a number
+ 1 if NaN
+ 2 if sNaN
+ """
+ if self._is_special:
+ exp = self._exp
+ if exp == 'n':
+ return 1
+ elif exp == 'N':
+ return 2
+ return 0
+
+ def _isinfinity(self):
+ """Returns whether the number is infinite
+
+ 0 if finite or not a number
+ 1 if +INF
+ -1 if -INF
+ """
+ if self._exp == 'F':
+ if self._sign:
+ return -1
+ return 1
+ return 0
+
+ def _check_nans(self, other=None, context=None):
+ """Returns whether the number is not actually one.
+
+ if self, other are sNaN, signal
+ if self, other are NaN return nan
+ return 0
+
+ Done before operations.
+ """
+
+ self_is_nan = self._isnan()
+ if other is None:
+ other_is_nan = False
+ else:
+ other_is_nan = other._isnan()
+
+ if self_is_nan or other_is_nan:
+ if context is None:
+ context = getcontext()
+
+ if self_is_nan == 2:
+ return context._raise_error(InvalidOperation, 'sNaN',
+ self)
+ if other_is_nan == 2:
+ return context._raise_error(InvalidOperation, 'sNaN',
+ other)
+ if self_is_nan:
+ return self._fix_nan(context)
+
+ return other._fix_nan(context)
+ return 0
+
+ def _compare_check_nans(self, other, context):
+ """Version of _check_nans used for the signaling comparisons
+ compare_signal, __le__, __lt__, __ge__, __gt__.
+
+ Signal InvalidOperation if either self or other is a (quiet
+ or signaling) NaN. Signaling NaNs take precedence over quiet
+ NaNs.
+
+ Return 0 if neither operand is a NaN.
+
+ """
+ if context is None:
+ context = getcontext()
+
+ if self._is_special or other._is_special:
+ if self.is_snan():
+ return context._raise_error(InvalidOperation,
+ 'comparison involving sNaN',
+ self)
+ elif other.is_snan():
+ return context._raise_error(InvalidOperation,
+ 'comparison involving sNaN',
+ other)
+ elif self.is_qnan():
+ return context._raise_error(InvalidOperation,
+ 'comparison involving NaN',
+ self)
+ elif other.is_qnan():
+ return context._raise_error(InvalidOperation,
+ 'comparison involving NaN',
+ other)
+ return 0
+
+ def __bool__(self):
+ """Return True if self is nonzero; otherwise return False.
+
+ NaNs and infinities are considered nonzero.
+ """
+ return self._is_special or self._int != '0'
+
+ def _cmp(self, other):
+ """Compare the two non-NaN decimal instances self and other.
+
+ Returns -1 if self < other, 0 if self == other and 1
+ if self > other. This routine is for internal use only."""
+
+ if self._is_special or other._is_special:
+ self_inf = self._isinfinity()
+ other_inf = other._isinfinity()
+ if self_inf == other_inf:
+ return 0
+ elif self_inf < other_inf:
+ return -1
+ else:
+ return 1
+
+ # check for zeros; Decimal('0') == Decimal('-0')
+ if not self:
+ if not other:
+ return 0
+ else:
+ return -((-1)**other._sign)
+ if not other:
+ return (-1)**self._sign
+
+ # If different signs, neg one is less
+ if other._sign < self._sign:
+ return -1
+ if self._sign < other._sign:
+ return 1
+
+ self_adjusted = self.adjusted()
+ other_adjusted = other.adjusted()
+ if self_adjusted == other_adjusted:
+ self_padded = self._int + '0'*(self._exp - other._exp)
+ other_padded = other._int + '0'*(other._exp - self._exp)
+ if self_padded == other_padded:
+ return 0
+ elif self_padded < other_padded:
+ return -(-1)**self._sign
+ else:
+ return (-1)**self._sign
+ elif self_adjusted > other_adjusted:
+ return (-1)**self._sign
+ else: # self_adjusted < other_adjusted
+ return -((-1)**self._sign)
+
+ # Note: The Decimal standard doesn't cover rich comparisons for
+ # Decimals. In particular, the specification is silent on the
+ # subject of what should happen for a comparison involving a NaN.
+ # We take the following approach:
+ #
+ # == comparisons involving a quiet NaN always return False
+ # != comparisons involving a quiet NaN always return True
+ # == or != comparisons involving a signaling NaN signal
+ # InvalidOperation, and return False or True as above if the
+ # InvalidOperation is not trapped.
+ # <, >, <= and >= comparisons involving a (quiet or signaling)
+ # NaN signal InvalidOperation, and return False if the
+ # InvalidOperation is not trapped.
+ #
+ # This behavior is designed to conform as closely as possible to
+ # that specified by IEEE 754.
+
+ def __eq__(self, other, context=None):
+ self, other = _convert_for_comparison(self, other, equality_op=True)
+ if other is NotImplemented:
+ return other
+ if self._check_nans(other, context):
+ return False
+ return self._cmp(other) == 0
+
+ def __lt__(self, other, context=None):
+ self, other = _convert_for_comparison(self, other)
+ if other is NotImplemented:
+ return other
+ ans = self._compare_check_nans(other, context)
+ if ans:
+ return False
+ return self._cmp(other) < 0
+
+ def __le__(self, other, context=None):
+ self, other = _convert_for_comparison(self, other)
+ if other is NotImplemented:
+ return other
+ ans = self._compare_check_nans(other, context)
+ if ans:
+ return False
+ return self._cmp(other) <= 0
+
+ def __gt__(self, other, context=None):
+ self, other = _convert_for_comparison(self, other)
+ if other is NotImplemented:
+ return other
+ ans = self._compare_check_nans(other, context)
+ if ans:
+ return False
+ return self._cmp(other) > 0
+
+ def __ge__(self, other, context=None):
+ self, other = _convert_for_comparison(self, other)
+ if other is NotImplemented:
+ return other
+ ans = self._compare_check_nans(other, context)
+ if ans:
+ return False
+ return self._cmp(other) >= 0
+
+ def compare(self, other, context=None):
+ """Compare self to other. Return a decimal value:
+
+ a or b is a NaN ==> Decimal('NaN')
+ a < b ==> Decimal('-1')
+ a == b ==> Decimal('0')
+ a > b ==> Decimal('1')
+ """
+ other = _convert_other(other, raiseit=True)
+
+ # Compare(NaN, NaN) = NaN
+ if (self._is_special or other and other._is_special):
+ ans = self._check_nans(other, context)
+ if ans:
+ return ans
+
+ return Decimal(self._cmp(other))
+
+ def __hash__(self):
+ """x.__hash__() <==> hash(x)"""
+
+ # In order to make sure that the hash of a Decimal instance
+ # agrees with the hash of a numerically equal integer, float
+ # or Fraction, we follow the rules for numeric hashes outlined
+ # in the documentation. (See library docs, 'Built-in Types').
+ if self._is_special:
+ if self.is_snan():
+ raise TypeError('Cannot hash a signaling NaN value.')
+ elif self.is_nan():
+ return _PyHASH_NAN
+ else:
+ if self._sign:
+ return -_PyHASH_INF
+ else:
+ return _PyHASH_INF
+
+ if self._exp >= 0:
+ exp_hash = pow(10, self._exp, _PyHASH_MODULUS)
+ else:
+ exp_hash = pow(_PyHASH_10INV, -self._exp, _PyHASH_MODULUS)
+ hash_ = int(self._int) * exp_hash % _PyHASH_MODULUS
+ ans = hash_ if self >= 0 else -hash_
+ return -2 if ans == -1 else ans
+
+ def as_tuple(self):
+ """Represents the number as a triple tuple.
+
+ To show the internals exactly as they are.
+ """
+ return DecimalTuple(self._sign, tuple(map(int, self._int)), self._exp)
+
+ def __repr__(self):
+ """Represents the number as an instance of Decimal."""
+ # Invariant: eval(repr(d)) == d
+ return "Decimal('%s')" % str(self)
+
+ def __str__(self, eng=False, context=None):
+ """Return string representation of the number in scientific notation.
+
+ Captures all of the information in the underlying representation.
+ """
+
+ sign = ['', '-'][self._sign]
+ if self._is_special:
+ if self._exp == 'F':
+ return sign + 'Infinity'
+ elif self._exp == 'n':
+ return sign + 'NaN' + self._int
+ else: # self._exp == 'N'
+ return sign + 'sNaN' + self._int
+
+ # number of digits of self._int to left of decimal point
+ leftdigits = self._exp + len(self._int)
+
+ # dotplace is number of digits of self._int to the left of the
+ # decimal point in the mantissa of the output string (that is,
+ # after adjusting the exponent)
+ if self._exp <= 0 and leftdigits > -6:
+ # no exponent required
+ dotplace = leftdigits
+ elif not eng:
+ # usual scientific notation: 1 digit on left of the point
+ dotplace = 1
+ elif self._int == '0':
+ # engineering notation, zero
+ dotplace = (leftdigits + 1) % 3 - 1
+ else:
+ # engineering notation, nonzero
+ dotplace = (leftdigits - 1) % 3 + 1
+
+ if dotplace <= 0:
+ intpart = '0'
+ fracpart = '.' + '0'*(-dotplace) + self._int
+ elif dotplace >= len(self._int):
+ intpart = self._int+'0'*(dotplace-len(self._int))
+ fracpart = ''
+ else:
+ intpart = self._int[:dotplace]
+ fracpart = '.' + self._int[dotplace:]
+ if leftdigits == dotplace:
+ exp = ''
+ else:
+ if context is None:
+ context = getcontext()
+ exp = ['e', 'E'][context.capitals] + "%+d" % (leftdigits-dotplace)
+
+ return sign + intpart + fracpart + exp
+
+ def to_eng_string(self, context=None):
+ """Convert to engineering-type string.
+
+ Engineering notation has an exponent which is a multiple of 3, so there
+ are up to 3 digits left of the decimal place.
+
+ Same rules for when in exponential and when as a value as in __str__.
+ """
+ return self.__str__(eng=True, context=context)
+
+ def __neg__(self, context=None):
+ """Returns a copy with the sign switched.
+
+ Rounds, if it has reason.
+ """
+ if self._is_special:
+ ans = self._check_nans(context=context)
+ if ans:
+ return ans
+
+ if context is None:
+ context = getcontext()
+
+ if not self and context.rounding != ROUND_FLOOR:
+ # -Decimal('0') is Decimal('0'), not Decimal('-0'), except
+ # in ROUND_FLOOR rounding mode.
+ ans = self.copy_abs()
+ else:
+ ans = self.copy_negate()
+
+ return ans._fix(context)
+
+ def __pos__(self, context=None):
+ """Returns a copy, unless it is a sNaN.
+
+ Rounds the number (if more than precision digits)
+ """
+ if self._is_special:
+ ans = self._check_nans(context=context)
+ if ans:
+ return ans
+
+ if context is None:
+ context = getcontext()
+
+ if not self and context.rounding != ROUND_FLOOR:
+ # + (-0) = 0, except in ROUND_FLOOR rounding mode.
+ ans = self.copy_abs()
+ else:
+ ans = Decimal(self)
+
+ return ans._fix(context)
+
+ def __abs__(self, round=True, context=None):
+ """Returns the absolute value of self.
+
+ If the keyword argument 'round' is false, do not round. The
+ expression self.__abs__(round=False) is equivalent to
+ self.copy_abs().
+ """
+ if not round:
+ return self.copy_abs()
+
+ if self._is_special:
+ ans = self._check_nans(context=context)
+ if ans:
+ return ans
+
+ if self._sign:
+ ans = self.__neg__(context=context)
+ else:
+ ans = self.__pos__(context=context)
+
+ return ans
+
+ def __add__(self, other, context=None):
+ """Returns self + other.
+
+ -INF + INF (or the reverse) cause InvalidOperation errors.
+ """
+ other = _convert_other(other)
+ if other is NotImplemented:
+ return other
+
+ if context is None:
+ context = getcontext()
+
+ if self._is_special or other._is_special:
+ ans = self._check_nans(other, context)
+ if ans:
+ return ans
+
+ if self._isinfinity():
+ # If both INF, same sign => same as both, opposite => error.
+ if self._sign != other._sign and other._isinfinity():
+ return context._raise_error(InvalidOperation, '-INF + INF')
+ return Decimal(self)
+ if other._isinfinity():
+ return Decimal(other) # Can't both be infinity here
+
+ exp = min(self._exp, other._exp)
+ negativezero = 0
+ if context.rounding == ROUND_FLOOR and self._sign != other._sign:
+ # If the answer is 0, the sign should be negative, in this case.
+ negativezero = 1
+
+ if not self and not other:
+ sign = min(self._sign, other._sign)
+ if negativezero:
+ sign = 1
+ ans = _dec_from_triple(sign, '0', exp)
+ ans = ans._fix(context)
+ return ans
+ if not self:
+ exp = max(exp, other._exp - context.prec-1)
+ ans = other._rescale(exp, context.rounding)
+ ans = ans._fix(context)
+ return ans
+ if not other:
+ exp = max(exp, self._exp - context.prec-1)
+ ans = self._rescale(exp, context.rounding)
+ ans = ans._fix(context)
+ return ans
+
+ op1 = _WorkRep(self)
+ op2 = _WorkRep(other)
+ op1, op2 = _normalize(op1, op2, context.prec)
+
+ result = _WorkRep()
+ if op1.sign != op2.sign:
+ # Equal and opposite
+ if op1.int == op2.int:
+ ans = _dec_from_triple(negativezero, '0', exp)
+ ans = ans._fix(context)
+ return ans
+ if op1.int < op2.int:
+ op1, op2 = op2, op1
+ # OK, now abs(op1) > abs(op2)
+ if op1.sign == 1:
+ result.sign = 1
+ op1.sign, op2.sign = op2.sign, op1.sign
+ else:
+ result.sign = 0
+ # So we know the sign, and op1 > 0.
+ elif op1.sign == 1:
+ result.sign = 1
+ op1.sign, op2.sign = (0, 0)
+ else:
+ result.sign = 0
+ # Now, op1 > abs(op2) > 0
+
+ if op2.sign == 0:
+ result.int = op1.int + op2.int
+ else:
+ result.int = op1.int - op2.int
+
+ result.exp = op1.exp
+ ans = Decimal(result)
+ ans = ans._fix(context)
+ return ans
+
+ __radd__ = __add__
+
+ def __sub__(self, other, context=None):
+ """Return self - other"""
+ other = _convert_other(other)
+ if other is NotImplemented:
+ return other
+
+ if self._is_special or other._is_special:
+ ans = self._check_nans(other, context=context)
+ if ans:
+ return ans
+
+ # self - other is computed as self + other.copy_negate()
+ return self.__add__(other.copy_negate(), context=context)
+
+ def __rsub__(self, other, context=None):
+ """Return other - self"""
+ other = _convert_other(other)
+ if other is NotImplemented:
+ return other
+
+ return other.__sub__(self, context=context)
+
+ def __mul__(self, other, context=None):
+ """Return self * other.
+
+ (+-) INF * 0 (or its reverse) raise InvalidOperation.
+ """
+ other = _convert_other(other)
+ if other is NotImplemented:
+ return other
+
+ if context is None:
+ context = getcontext()
+
+ resultsign = self._sign ^ other._sign
+
+ if self._is_special or other._is_special:
+ ans = self._check_nans(other, context)
+ if ans:
+ return ans
+
+ if self._isinfinity():
+ if not other:
+ return context._raise_error(InvalidOperation, '(+-)INF * 0')
+ return _SignedInfinity[resultsign]
+
+ if other._isinfinity():
+ if not self:
+ return context._raise_error(InvalidOperation, '0 * (+-)INF')
+ return _SignedInfinity[resultsign]
+
+ resultexp = self._exp + other._exp
+
+ # Special case for multiplying by zero
+ if not self or not other:
+ ans = _dec_from_triple(resultsign, '0', resultexp)
+ # Fixing in case the exponent is out of bounds
+ ans = ans._fix(context)
+ return ans
+
+ # Special case for multiplying by power of 10
+ if self._int == '1':
+ ans = _dec_from_triple(resultsign, other._int, resultexp)
+ ans = ans._fix(context)
+ return ans
+ if other._int == '1':
+ ans = _dec_from_triple(resultsign, self._int, resultexp)
+ ans = ans._fix(context)
+ return ans
+
+ op1 = _WorkRep(self)
+ op2 = _WorkRep(other)
+
+ ans = _dec_from_triple(resultsign, str(op1.int * op2.int), resultexp)
+ ans = ans._fix(context)
+
+ return ans
+ __rmul__ = __mul__
+
+ def __truediv__(self, other, context=None):
+ """Return self / other."""
+ other = _convert_other(other)
+ if other is NotImplemented:
+ return NotImplemented
+
+ if context is None:
+ context = getcontext()
+
+ sign = self._sign ^ other._sign
+
+ if self._is_special or other._is_special:
+ ans = self._check_nans(other, context)
+ if ans:
+ return ans
+
+ if self._isinfinity() and other._isinfinity():
+ return context._raise_error(InvalidOperation, '(+-)INF/(+-)INF')
+
+ if self._isinfinity():
+ return _SignedInfinity[sign]
+
+ if other._isinfinity():
+ context._raise_error(Clamped, 'Division by infinity')
+ return _dec_from_triple(sign, '0', context.Etiny())
+
+ # Special cases for zeroes
+ if not other:
+ if not self:
+ return context._raise_error(DivisionUndefined, '0 / 0')
+ return context._raise_error(DivisionByZero, 'x / 0', sign)
+
+ if not self:
+ exp = self._exp - other._exp
+ coeff = 0
+ else:
+ # OK, so neither = 0, INF or NaN
+ shift = len(other._int) - len(self._int) + context.prec + 1
+ exp = self._exp - other._exp - shift
+ op1 = _WorkRep(self)
+ op2 = _WorkRep(other)
+ if shift >= 0:
+ coeff, remainder = divmod(op1.int * 10**shift, op2.int)
+ else:
+ coeff, remainder = divmod(op1.int, op2.int * 10**-shift)
+ if remainder:
+ # result is not exact; adjust to ensure correct rounding
+ if coeff % 5 == 0:
+ coeff += 1
+ else:
+ # result is exact; get as close to ideal exponent as possible
+ ideal_exp = self._exp - other._exp
+ while exp < ideal_exp and coeff % 10 == 0:
+ coeff //= 10
+ exp += 1
+
+ ans = _dec_from_triple(sign, str(coeff), exp)
+ return ans._fix(context)
+
+ def _divide(self, other, context):
+ """Return (self // other, self % other), to context.prec precision.
+
+ Assumes that neither self nor other is a NaN, that self is not
+ infinite and that other is nonzero.
+ """
+ sign = self._sign ^ other._sign
+ if other._isinfinity():
+ ideal_exp = self._exp
+ else:
+ ideal_exp = min(self._exp, other._exp)
+
+ expdiff = self.adjusted() - other.adjusted()
+ if not self or other._isinfinity() or expdiff <= -2:
+ return (_dec_from_triple(sign, '0', 0),
+ self._rescale(ideal_exp, context.rounding))
+ if expdiff <= context.prec:
+ op1 = _WorkRep(self)
+ op2 = _WorkRep(other)
+ if op1.exp >= op2.exp:
+ op1.int *= 10**(op1.exp - op2.exp)
+ else:
+ op2.int *= 10**(op2.exp - op1.exp)
+ q, r = divmod(op1.int, op2.int)
+ if q < 10**context.prec:
+ return (_dec_from_triple(sign, str(q), 0),
+ _dec_from_triple(self._sign, str(r), ideal_exp))
+
+ # Here the quotient is too large to be representable
+ ans = context._raise_error(DivisionImpossible,
+ 'quotient too large in //, % or divmod')
+ return ans, ans
+
+ def __rtruediv__(self, other, context=None):
+ """Swaps self/other and returns __truediv__."""
+ other = _convert_other(other)
+ if other is NotImplemented:
+ return other
+ return other.__truediv__(self, context=context)
+
+ def __divmod__(self, other, context=None):
+ """
+ Return (self // other, self % other)
+ """
+ other = _convert_other(other)
+ if other is NotImplemented:
+ return other
+
+ if context is None:
+ context = getcontext()
+
+ ans = self._check_nans(other, context)
+ if ans:
+ return (ans, ans)
+
+ sign = self._sign ^ other._sign
+ if self._isinfinity():
+ if other._isinfinity():
+ ans = context._raise_error(InvalidOperation, 'divmod(INF, INF)')
+ return ans, ans
+ else:
+ return (_SignedInfinity[sign],
+ context._raise_error(InvalidOperation, 'INF % x'))
+
+ if not other:
+ if not self:
+ ans = context._raise_error(DivisionUndefined, 'divmod(0, 0)')
+ return ans, ans
+ else:
+ return (context._raise_error(DivisionByZero, 'x // 0', sign),
+ context._raise_error(InvalidOperation, 'x % 0'))
+
+ quotient, remainder = self._divide(other, context)
+ remainder = remainder._fix(context)
+ return quotient, remainder
+
+ def __rdivmod__(self, other, context=None):
+ """Swaps self/other and returns __divmod__."""
+ other = _convert_other(other)
+ if other is NotImplemented:
+ return other
+ return other.__divmod__(self, context=context)
+
+ def __mod__(self, other, context=None):
+ """
+ self % other
+ """
+ other = _convert_other(other)
+ if other is NotImplemented:
+ return other
+
+ if context is None:
+ context = getcontext()
+
+ ans = self._check_nans(other, context)
+ if ans:
+ return ans
+
+ if self._isinfinity():
+ return context._raise_error(InvalidOperation, 'INF % x')
+ elif not other:
+ if self:
+ return context._raise_error(InvalidOperation, 'x % 0')
+ else:
+ return context._raise_error(DivisionUndefined, '0 % 0')
+
+ remainder = self._divide(other, context)[1]
+ remainder = remainder._fix(context)
+ return remainder
+
+ def __rmod__(self, other, context=None):
+ """Swaps self/other and returns __mod__."""
+ other = _convert_other(other)
+ if other is NotImplemented:
+ return other
+ return other.__mod__(self, context=context)
+
+ def remainder_near(self, other, context=None):
+ """
+ Remainder nearest to 0- abs(remainder-near) <= other/2
+ """
+ if context is None:
+ context = getcontext()
+
+ other = _convert_other(other, raiseit=True)
+
+ ans = self._check_nans(other, context)
+ if ans:
+ return ans
+
+ # self == +/-infinity -> InvalidOperation
+ if self._isinfinity():
+ return context._raise_error(InvalidOperation,
+ 'remainder_near(infinity, x)')
+
+ # other == 0 -> either InvalidOperation or DivisionUndefined
+ if not other:
+ if self:
+ return context._raise_error(InvalidOperation,
+ 'remainder_near(x, 0)')
+ else:
+ return context._raise_error(DivisionUndefined,
+ 'remainder_near(0, 0)')
+
+ # other = +/-infinity -> remainder = self
+ if other._isinfinity():
+ ans = Decimal(self)
+ return ans._fix(context)
+
+ # self = 0 -> remainder = self, with ideal exponent
+ ideal_exponent = min(self._exp, other._exp)
+ if not self:
+ ans = _dec_from_triple(self._sign, '0', ideal_exponent)
+ return ans._fix(context)
+
+ # catch most cases of large or small quotient
+ expdiff = self.adjusted() - other.adjusted()
+ if expdiff >= context.prec + 1:
+ # expdiff >= prec+1 => abs(self/other) > 10**prec
+ return context._raise_error(DivisionImpossible)
+ if expdiff <= -2:
+ # expdiff <= -2 => abs(self/other) < 0.1
+ ans = self._rescale(ideal_exponent, context.rounding)
+ return ans._fix(context)
+
+ # adjust both arguments to have the same exponent, then divide
+ op1 = _WorkRep(self)
+ op2 = _WorkRep(other)
+ if op1.exp >= op2.exp:
+ op1.int *= 10**(op1.exp - op2.exp)
+ else:
+ op2.int *= 10**(op2.exp - op1.exp)
+ q, r = divmod(op1.int, op2.int)
+ # remainder is r*10**ideal_exponent; other is +/-op2.int *
+ # 10**ideal_exponent. Apply correction to ensure that
+ # abs(remainder) <= abs(other)/2
+ if 2*r + (q&1) > op2.int:
+ r -= op2.int
+ q += 1
+
+ if q >= 10**context.prec:
+ return context._raise_error(DivisionImpossible)
+
+ # result has same sign as self unless r is negative
+ sign = self._sign
+ if r < 0:
+ sign = 1-sign
+ r = -r
+
+ ans = _dec_from_triple(sign, str(r), ideal_exponent)
+ return ans._fix(context)
+
+ def __floordiv__(self, other, context=None):
+ """self // other"""
+ other = _convert_other(other)
+ if other is NotImplemented:
+ return other
+
+ if context is None:
+ context = getcontext()
+
+ ans = self._check_nans(other, context)
+ if ans:
+ return ans
+
+ if self._isinfinity():
+ if other._isinfinity():
+ return context._raise_error(InvalidOperation, 'INF // INF')
+ else:
+ return _SignedInfinity[self._sign ^ other._sign]
+
+ if not other:
+ if self:
+ return context._raise_error(DivisionByZero, 'x // 0',
+ self._sign ^ other._sign)
+ else:
+ return context._raise_error(DivisionUndefined, '0 // 0')
+
+ return self._divide(other, context)[0]
+
+ def __rfloordiv__(self, other, context=None):
+ """Swaps self/other and returns __floordiv__."""
+ other = _convert_other(other)
+ if other is NotImplemented:
+ return other
+ return other.__floordiv__(self, context=context)
+
+ def __float__(self):
+ """Float representation."""
+ if self._isnan():
+ if self.is_snan():
+ raise ValueError("Cannot convert signaling NaN to float")
+ s = "-nan" if self._sign else "nan"
+ else:
+ s = str(self)
+ return float(s)
+
+ def __int__(self):
+ """Converts self to an int, truncating if necessary."""
+ if self._is_special:
+ if self._isnan():
+ raise ValueError("Cannot convert NaN to integer")
+ elif self._isinfinity():
+ raise OverflowError("Cannot convert infinity to integer")
+ s = (-1)**self._sign
+ if self._exp >= 0:
+ return s*int(self._int)*10**self._exp
+ else:
+ return s*int(self._int[:self._exp] or '0')
+
+ __trunc__ = __int__
+
+ def real(self):
+ return self
+ real = property(real)
+
+ def imag(self):
+ return Decimal(0)
+ imag = property(imag)
+
+ def conjugate(self):
+ return self
+
+ def __complex__(self):
+ return complex(float(self))
+
+ def _fix_nan(self, context):
+ """Decapitate the payload of a NaN to fit the context"""
+ payload = self._int
+
+ # maximum length of payload is precision if clamp=0,
+ # precision-1 if clamp=1.
+ max_payload_len = context.prec - context.clamp
+ if len(payload) > max_payload_len:
+ payload = payload[len(payload)-max_payload_len:].lstrip('0')
+ return _dec_from_triple(self._sign, payload, self._exp, True)
+ return Decimal(self)
+
+ def _fix(self, context):
+ """Round if it is necessary to keep self within prec precision.
+
+ Rounds and fixes the exponent. Does not raise on a sNaN.
+
+ Arguments:
+ self - Decimal instance
+ context - context used.
+ """
+
+ if self._is_special:
+ if self._isnan():
+ # decapitate payload if necessary
+ return self._fix_nan(context)
+ else:
+ # self is +/-Infinity; return unaltered
+ return Decimal(self)
+
+ # if self is zero then exponent should be between Etiny and
+ # Emax if clamp==0, and between Etiny and Etop if clamp==1.
+ Etiny = context.Etiny()
+ Etop = context.Etop()
+ if not self:
+ exp_max = [context.Emax, Etop][context.clamp]
+ new_exp = min(max(self._exp, Etiny), exp_max)
+ if new_exp != self._exp:
+ context._raise_error(Clamped)
+ return _dec_from_triple(self._sign, '0', new_exp)
+ else:
+ return Decimal(self)
+
+ # exp_min is the smallest allowable exponent of the result,
+ # equal to max(self.adjusted()-context.prec+1, Etiny)
+ exp_min = len(self._int) + self._exp - context.prec
+ if exp_min > Etop:
+ # overflow: exp_min > Etop iff self.adjusted() > Emax
+ ans = context._raise_error(Overflow, 'above Emax', self._sign)
+ context._raise_error(Inexact)
+ context._raise_error(Rounded)
+ return ans
+
+ self_is_subnormal = exp_min < Etiny
+ if self_is_subnormal:
+ exp_min = Etiny
+
+ # round if self has too many digits
+ if self._exp < exp_min:
+ digits = len(self._int) + self._exp - exp_min
+ if digits < 0:
+ self = _dec_from_triple(self._sign, '1', exp_min-1)
+ digits = 0
+ rounding_method = self._pick_rounding_function[context.rounding]
+ changed = rounding_method(self, digits)
+ coeff = self._int[:digits] or '0'
+ if changed > 0:
+ coeff = str(int(coeff)+1)
+ if len(coeff) > context.prec:
+ coeff = coeff[:-1]
+ exp_min += 1
+
+ # check whether the rounding pushed the exponent out of range
+ if exp_min > Etop:
+ ans = context._raise_error(Overflow, 'above Emax', self._sign)
+ else:
+ ans = _dec_from_triple(self._sign, coeff, exp_min)
+
+ # raise the appropriate signals, taking care to respect
+ # the precedence described in the specification
+ if changed and self_is_subnormal:
+ context._raise_error(Underflow)
+ if self_is_subnormal:
+ context._raise_error(Subnormal)
+ if changed:
+ context._raise_error(Inexact)
+ context._raise_error(Rounded)
+ if not ans:
+ # raise Clamped on underflow to 0
+ context._raise_error(Clamped)
+ return ans
+
+ if self_is_subnormal:
+ context._raise_error(Subnormal)
+
+ # fold down if clamp == 1 and self has too few digits
+ if context.clamp == 1 and self._exp > Etop:
+ context._raise_error(Clamped)
+ self_padded = self._int + '0'*(self._exp - Etop)
+ return _dec_from_triple(self._sign, self_padded, Etop)
+
+ # here self was representable to begin with; return unchanged
+ return Decimal(self)
+
+ # for each of the rounding functions below:
+ # self is a finite, nonzero Decimal
+ # prec is an integer satisfying 0 <= prec < len(self._int)
+ #
+ # each function returns either -1, 0, or 1, as follows:
+ # 1 indicates that self should be rounded up (away from zero)
+ # 0 indicates that self should be truncated, and that all the
+ # digits to be truncated are zeros (so the value is unchanged)
+ # -1 indicates that there are nonzero digits to be truncated
+
+ def _round_down(self, prec):
+ """Also known as round-towards-0, truncate."""
+ if _all_zeros(self._int, prec):
+ return 0
+ else:
+ return -1
+
+ def _round_up(self, prec):
+ """Rounds away from 0."""
+ return -self._round_down(prec)
+
+ def _round_half_up(self, prec):
+ """Rounds 5 up (away from 0)"""
+ if self._int[prec] in '56789':
+ return 1
+ elif _all_zeros(self._int, prec):
+ return 0
+ else:
+ return -1
+
+ def _round_half_down(self, prec):
+ """Round 5 down"""
+ if _exact_half(self._int, prec):
+ return -1
+ else:
+ return self._round_half_up(prec)
+
+ def _round_half_even(self, prec):
+ """Round 5 to even, rest to nearest."""
+ if _exact_half(self._int, prec) and \
+ (prec == 0 or self._int[prec-1] in '02468'):
+ return -1
+ else:
+ return self._round_half_up(prec)
+
+ def _round_ceiling(self, prec):
+ """Rounds up (not away from 0 if negative.)"""
+ if self._sign:
+ return self._round_down(prec)
+ else:
+ return -self._round_down(prec)
+
+ def _round_floor(self, prec):
+ """Rounds down (not towards 0 if negative)"""
+ if not self._sign:
+ return self._round_down(prec)
+ else:
+ return -self._round_down(prec)
+
+ def _round_05up(self, prec):
+ """Round down unless digit prec-1 is 0 or 5."""
+ if prec and self._int[prec-1] not in '05':
+ return self._round_down(prec)
+ else:
+ return -self._round_down(prec)
+
+ _pick_rounding_function = dict(
+ ROUND_DOWN = _round_down,
+ ROUND_UP = _round_up,
+ ROUND_HALF_UP = _round_half_up,
+ ROUND_HALF_DOWN = _round_half_down,
+ ROUND_HALF_EVEN = _round_half_even,
+ ROUND_CEILING = _round_ceiling,
+ ROUND_FLOOR = _round_floor,
+ ROUND_05UP = _round_05up,
+ )
+
+ def __round__(self, n=None):
+ """Round self to the nearest integer, or to a given precision.
+
+ If only one argument is supplied, round a finite Decimal
+ instance self to the nearest integer. If self is infinite or
+ a NaN then a Python exception is raised. If self is finite
+ and lies exactly halfway between two integers then it is
+ rounded to the integer with even last digit.
+
+ >>> round(Decimal('123.456'))
+ 123
+ >>> round(Decimal('-456.789'))
+ -457
+ >>> round(Decimal('-3.0'))
+ -3
+ >>> round(Decimal('2.5'))
+ 2
+ >>> round(Decimal('3.5'))
+ 4
+ >>> round(Decimal('Inf'))
+ Traceback (most recent call last):
+ ...
+ OverflowError: cannot round an infinity
+ >>> round(Decimal('NaN'))
+ Traceback (most recent call last):
+ ...
+ ValueError: cannot round a NaN
+
+ If a second argument n is supplied, self is rounded to n
+ decimal places using the rounding mode for the current
+ context.
+
+ For an integer n, round(self, -n) is exactly equivalent to
+ self.quantize(Decimal('1En')).
+
+ >>> round(Decimal('123.456'), 0)
+ Decimal('123')
+ >>> round(Decimal('123.456'), 2)
+ Decimal('123.46')
+ >>> round(Decimal('123.456'), -2)
+ Decimal('1E+2')
+ >>> round(Decimal('-Infinity'), 37)
+ Decimal('NaN')
+ >>> round(Decimal('sNaN123'), 0)
+ Decimal('NaN123')
+
+ """
+ if n is not None:
+ # two-argument form: use the equivalent quantize call
+ if not isinstance(n, int):
+ raise TypeError('Second argument to round should be integral')
+ exp = _dec_from_triple(0, '1', -n)
+ return self.quantize(exp)
+
+ # one-argument form
+ if self._is_special:
+ if self.is_nan():
+ raise ValueError("cannot round a NaN")
+ else:
+ raise OverflowError("cannot round an infinity")
+ return int(self._rescale(0, ROUND_HALF_EVEN))
+
+ def __floor__(self):
+ """Return the floor of self, as an integer.
+
+ For a finite Decimal instance self, return the greatest
+ integer n such that n <= self. If self is infinite or a NaN
+ then a Python exception is raised.
+
+ """
+ if self._is_special:
+ if self.is_nan():
+ raise ValueError("cannot round a NaN")
+ else:
+ raise OverflowError("cannot round an infinity")
+ return int(self._rescale(0, ROUND_FLOOR))
+
+ def __ceil__(self):
+ """Return the ceiling of self, as an integer.
+
+ For a finite Decimal instance self, return the least integer n
+ such that n >= self. If self is infinite or a NaN then a
+ Python exception is raised.
+
+ """
+ if self._is_special:
+ if self.is_nan():
+ raise ValueError("cannot round a NaN")
+ else:
+ raise OverflowError("cannot round an infinity")
+ return int(self._rescale(0, ROUND_CEILING))
+
+ def fma(self, other, third, context=None):
+ """Fused multiply-add.
+
+ Returns self*other+third with no rounding of the intermediate
+ product self*other.
+
+ self and other are multiplied together, with no rounding of
+ the result. The third operand is then added to the result,
+ and a single final rounding is performed.
+ """
+
+ other = _convert_other(other, raiseit=True)
+ third = _convert_other(third, raiseit=True)
+
+ # compute product; raise InvalidOperation if either operand is
+ # a signaling NaN or if the product is zero times infinity.
+ if self._is_special or other._is_special:
+ if context is None:
+ context = getcontext()
+ if self._exp == 'N':
+ return context._raise_error(InvalidOperation, 'sNaN', self)
+ if other._exp == 'N':
+ return context._raise_error(InvalidOperation, 'sNaN', other)
+ if self._exp == 'n':
+ product = self
+ elif other._exp == 'n':
+ product = other
+ elif self._exp == 'F':
+ if not other:
+ return context._raise_error(InvalidOperation,
+ 'INF * 0 in fma')
+ product = _SignedInfinity[self._sign ^ other._sign]
+ elif other._exp == 'F':
+ if not self:
+ return context._raise_error(InvalidOperation,
+ '0 * INF in fma')
+ product = _SignedInfinity[self._sign ^ other._sign]
+ else:
+ product = _dec_from_triple(self._sign ^ other._sign,
+ str(int(self._int) * int(other._int)),
+ self._exp + other._exp)
+
+ return product.__add__(third, context)
+
+ def _power_modulo(self, other, modulo, context=None):
+ """Three argument version of __pow__"""
+
+ other = _convert_other(other)
+ if other is NotImplemented:
+ return other
+ modulo = _convert_other(modulo)
+ if modulo is NotImplemented:
+ return modulo
+
+ if context is None:
+ context = getcontext()
+
+ # deal with NaNs: if there are any sNaNs then first one wins,
+ # (i.e. behaviour for NaNs is identical to that of fma)
+ self_is_nan = self._isnan()
+ other_is_nan = other._isnan()
+ modulo_is_nan = modulo._isnan()
+ if self_is_nan or other_is_nan or modulo_is_nan:
+ if self_is_nan == 2:
+ return context._raise_error(InvalidOperation, 'sNaN',
+ self)
+ if other_is_nan == 2:
+ return context._raise_error(InvalidOperation, 'sNaN',
+ other)
+ if modulo_is_nan == 2:
+ return context._raise_error(InvalidOperation, 'sNaN',
+ modulo)
+ if self_is_nan:
+ return self._fix_nan(context)
+ if other_is_nan:
+ return other._fix_nan(context)
+ return modulo._fix_nan(context)
+
+ # check inputs: we apply same restrictions as Python's pow()
+ if not (self._isinteger() and
+ other._isinteger() and
+ modulo._isinteger()):
+ return context._raise_error(InvalidOperation,
+ 'pow() 3rd argument not allowed '
+ 'unless all arguments are integers')
+ if other < 0:
+ return context._raise_error(InvalidOperation,
+ 'pow() 2nd argument cannot be '
+ 'negative when 3rd argument specified')
+ if not modulo:
+ return context._raise_error(InvalidOperation,
+ 'pow() 3rd argument cannot be 0')
+
+ # additional restriction for decimal: the modulus must be less
+ # than 10**prec in absolute value
+ if modulo.adjusted() >= context.prec:
+ return context._raise_error(InvalidOperation,
+ 'insufficient precision: pow() 3rd '
+ 'argument must not have more than '
+ 'precision digits')
+
+ # define 0**0 == NaN, for consistency with two-argument pow
+ # (even though it hurts!)
+ if not other and not self:
+ return context._raise_error(InvalidOperation,
+ 'at least one of pow() 1st argument '
+ 'and 2nd argument must be nonzero ;'
+ '0**0 is not defined')
+
+ # compute sign of result
+ if other._iseven():
+ sign = 0
+ else:
+ sign = self._sign
+
+ # convert modulo to a Python integer, and self and other to
+ # Decimal integers (i.e. force their exponents to be >= 0)
+ modulo = abs(int(modulo))
+ base = _WorkRep(self.to_integral_value())
+ exponent = _WorkRep(other.to_integral_value())
+
+ # compute result using integer pow()
+ base = (base.int % modulo * pow(10, base.exp, modulo)) % modulo
+ for i in range(exponent.exp):
+ base = pow(base, 10, modulo)
+ base = pow(base, exponent.int, modulo)
+
+ return _dec_from_triple(sign, str(base), 0)
+
+ def _power_exact(self, other, p):
+ """Attempt to compute self**other exactly.
+
+ Given Decimals self and other and an integer p, attempt to
+ compute an exact result for the power self**other, with p
+ digits of precision. Return None if self**other is not
+ exactly representable in p digits.
+
+ Assumes that elimination of special cases has already been
+ performed: self and other must both be nonspecial; self must
+ be positive and not numerically equal to 1; other must be
+ nonzero. For efficiency, other._exp should not be too large,
+ so that 10**abs(other._exp) is a feasible calculation."""
+
+ # In the comments below, we write x for the value of self and y for the
+ # value of other. Write x = xc*10**xe and abs(y) = yc*10**ye, with xc
+ # and yc positive integers not divisible by 10.
+
+ # The main purpose of this method is to identify the *failure*
+ # of x**y to be exactly representable with as little effort as
+ # possible. So we look for cheap and easy tests that
+ # eliminate the possibility of x**y being exact. Only if all
+ # these tests are passed do we go on to actually compute x**y.
+
+ # Here's the main idea. Express y as a rational number m/n, with m and
+ # n relatively prime and n>0. Then for x**y to be exactly
+ # representable (at *any* precision), xc must be the nth power of a
+ # positive integer and xe must be divisible by n. If y is negative
+ # then additionally xc must be a power of either 2 or 5, hence a power
+ # of 2**n or 5**n.
+ #
+ # There's a limit to how small |y| can be: if y=m/n as above
+ # then:
+ #
+ # (1) if xc != 1 then for the result to be representable we
+ # need xc**(1/n) >= 2, and hence also xc**|y| >= 2. So
+ # if |y| <= 1/nbits(xc) then xc < 2**nbits(xc) <=
+ # 2**(1/|y|), hence xc**|y| < 2 and the result is not
+ # representable.
+ #
+ # (2) if xe != 0, |xe|*(1/n) >= 1, so |xe|*|y| >= 1. Hence if
+ # |y| < 1/|xe| then the result is not representable.
+ #
+ # Note that since x is not equal to 1, at least one of (1) and
+ # (2) must apply. Now |y| < 1/nbits(xc) iff |yc|*nbits(xc) <
+ # 10**-ye iff len(str(|yc|*nbits(xc)) <= -ye.
+ #
+ # There's also a limit to how large y can be, at least if it's
+ # positive: the normalized result will have coefficient xc**y,
+ # so if it's representable then xc**y < 10**p, and y <
+ # p/log10(xc). Hence if y*log10(xc) >= p then the result is
+ # not exactly representable.
+
+ # if len(str(abs(yc*xe)) <= -ye then abs(yc*xe) < 10**-ye,
+ # so |y| < 1/xe and the result is not representable.
+ # Similarly, len(str(abs(yc)*xc_bits)) <= -ye implies |y|
+ # < 1/nbits(xc).
+
+ x = _WorkRep(self)
+ xc, xe = x.int, x.exp
+ while xc % 10 == 0:
+ xc //= 10
+ xe += 1
+
+ y = _WorkRep(other)
+ yc, ye = y.int, y.exp
+ while yc % 10 == 0:
+ yc //= 10
+ ye += 1
+
+ # case where xc == 1: result is 10**(xe*y), with xe*y
+ # required to be an integer
+ if xc == 1:
+ xe *= yc
+ # result is now 10**(xe * 10**ye); xe * 10**ye must be integral
+ while xe % 10 == 0:
+ xe //= 10
+ ye += 1
+ if ye < 0:
+ return None
+ exponent = xe * 10**ye
+ if y.sign == 1:
+ exponent = -exponent
+ # if other is a nonnegative integer, use ideal exponent
+ if other._isinteger() and other._sign == 0:
+ ideal_exponent = self._exp*int(other)
+ zeros = min(exponent-ideal_exponent, p-1)
+ else:
+ zeros = 0
+ return _dec_from_triple(0, '1' + '0'*zeros, exponent-zeros)
+
+ # case where y is negative: xc must be either a power
+ # of 2 or a power of 5.
+ if y.sign == 1:
+ last_digit = xc % 10
+ if last_digit in (2,4,6,8):
+ # quick test for power of 2
+ if xc & -xc != xc:
+ return None
+ # now xc is a power of 2; e is its exponent
+ e = _nbits(xc)-1
+
+ # We now have:
+ #
+ # x = 2**e * 10**xe, e > 0, and y < 0.
+ #
+ # The exact result is:
+ #
+ # x**y = 5**(-e*y) * 10**(e*y + xe*y)
+ #
+ # provided that both e*y and xe*y are integers. Note that if
+ # 5**(-e*y) >= 10**p, then the result can't be expressed
+ # exactly with p digits of precision.
+ #
+ # Using the above, we can guard against large values of ye.
+ # 93/65 is an upper bound for log(10)/log(5), so if
+ #
+ # ye >= len(str(93*p//65))
+ #
+ # then
+ #
+ # -e*y >= -y >= 10**ye > 93*p/65 > p*log(10)/log(5),
+ #
+ # so 5**(-e*y) >= 10**p, and the coefficient of the result
+ # can't be expressed in p digits.
+
+ # emax >= largest e such that 5**e < 10**p.
+ emax = p*93//65
+ if ye >= len(str(emax)):
+ return None
+
+ # Find -e*y and -xe*y; both must be integers
+ e = _decimal_lshift_exact(e * yc, ye)
+ xe = _decimal_lshift_exact(xe * yc, ye)
+ if e is None or xe is None:
+ return None
+
+ if e > emax:
+ return None
+ xc = 5**e
+
+ elif last_digit == 5:
+ # e >= log_5(xc) if xc is a power of 5; we have
+ # equality all the way up to xc=5**2658
+ e = _nbits(xc)*28//65
+ xc, remainder = divmod(5**e, xc)
+ if remainder:
+ return None
+ while xc % 5 == 0:
+ xc //= 5
+ e -= 1
+
+ # Guard against large values of ye, using the same logic as in
+ # the 'xc is a power of 2' branch. 10/3 is an upper bound for
+ # log(10)/log(2).
+ emax = p*10//3
+ if ye >= len(str(emax)):
+ return None
+
+ e = _decimal_lshift_exact(e * yc, ye)
+ xe = _decimal_lshift_exact(xe * yc, ye)
+ if e is None or xe is None:
+ return None
+
+ if e > emax:
+ return None
+ xc = 2**e
+ else:
+ return None
+
+ if xc >= 10**p:
+ return None
+ xe = -e-xe
+ return _dec_from_triple(0, str(xc), xe)
+
+ # now y is positive; find m and n such that y = m/n
+ if ye >= 0:
+ m, n = yc*10**ye, 1
+ else:
+ if xe != 0 and len(str(abs(yc*xe))) <= -ye:
+ return None
+ xc_bits = _nbits(xc)
+ if xc != 1 and len(str(abs(yc)*xc_bits)) <= -ye:
+ return None
+ m, n = yc, 10**(-ye)
+ while m % 2 == n % 2 == 0:
+ m //= 2
+ n //= 2
+ while m % 5 == n % 5 == 0:
+ m //= 5
+ n //= 5
+
+ # compute nth root of xc*10**xe
+ if n > 1:
+ # if 1 < xc < 2**n then xc isn't an nth power
+ if xc != 1 and xc_bits <= n:
+ return None
+
+ xe, rem = divmod(xe, n)
+ if rem != 0:
+ return None
+
+ # compute nth root of xc using Newton's method
+ a = 1 << -(-_nbits(xc)//n) # initial estimate
+ while True:
+ q, r = divmod(xc, a**(n-1))
+ if a <= q:
+ break
+ else:
+ a = (a*(n-1) + q)//n
+ if not (a == q and r == 0):
+ return None
+ xc = a
+
+ # now xc*10**xe is the nth root of the original xc*10**xe
+ # compute mth power of xc*10**xe
+
+ # if m > p*100//_log10_lb(xc) then m > p/log10(xc), hence xc**m >
+ # 10**p and the result is not representable.
+ if xc > 1 and m > p*100//_log10_lb(xc):
+ return None
+ xc = xc**m
+ xe *= m
+ if xc > 10**p:
+ return None
+
+ # by this point the result *is* exactly representable
+ # adjust the exponent to get as close as possible to the ideal
+ # exponent, if necessary
+ str_xc = str(xc)
+ if other._isinteger() and other._sign == 0:
+ ideal_exponent = self._exp*int(other)
+ zeros = min(xe-ideal_exponent, p-len(str_xc))
+ else:
+ zeros = 0
+ return _dec_from_triple(0, str_xc+'0'*zeros, xe-zeros)
+
+ def __pow__(self, other, modulo=None, context=None):
+ """Return self ** other [ % modulo].
+
+ With two arguments, compute self**other.
+
+ With three arguments, compute (self**other) % modulo. For the
+ three argument form, the following restrictions on the
+ arguments hold:
+
+ - all three arguments must be integral
+ - other must be nonnegative
+ - either self or other (or both) must be nonzero
+ - modulo must be nonzero and must have at most p digits,
+ where p is the context precision.
+
+ If any of these restrictions is violated the InvalidOperation
+ flag is raised.
+
+ The result of pow(self, other, modulo) is identical to the
+ result that would be obtained by computing (self**other) %
+ modulo with unbounded precision, but is computed more
+ efficiently. It is always exact.
+ """
+
+ if modulo is not None:
+ return self._power_modulo(other, modulo, context)
+
+ other = _convert_other(other)
+ if other is NotImplemented:
+ return other
+
+ if context is None:
+ context = getcontext()
+
+ # either argument is a NaN => result is NaN
+ ans = self._check_nans(other, context)
+ if ans:
+ return ans
+
+ # 0**0 = NaN (!), x**0 = 1 for nonzero x (including +/-Infinity)
+ if not other:
+ if not self:
+ return context._raise_error(InvalidOperation, '0 ** 0')
+ else:
+ return _One
+
+ # result has sign 1 iff self._sign is 1 and other is an odd integer
+ result_sign = 0
+ if self._sign == 1:
+ if other._isinteger():
+ if not other._iseven():
+ result_sign = 1
+ else:
+ # -ve**noninteger = NaN
+ # (-0)**noninteger = 0**noninteger
+ if self:
+ return context._raise_error(InvalidOperation,
+ 'x ** y with x negative and y not an integer')
+ # negate self, without doing any unwanted rounding
+ self = self.copy_negate()
+
+ # 0**(+ve or Inf)= 0; 0**(-ve or -Inf) = Infinity
+ if not self:
+ if other._sign == 0:
+ return _dec_from_triple(result_sign, '0', 0)
+ else:
+ return _SignedInfinity[result_sign]
+
+ # Inf**(+ve or Inf) = Inf; Inf**(-ve or -Inf) = 0
+ if self._isinfinity():
+ if other._sign == 0:
+ return _SignedInfinity[result_sign]
+ else:
+ return _dec_from_triple(result_sign, '0', 0)
+
+ # 1**other = 1, but the choice of exponent and the flags
+ # depend on the exponent of self, and on whether other is a
+ # positive integer, a negative integer, or neither
+ if self == _One:
+ if other._isinteger():
+ # exp = max(self._exp*max(int(other), 0),
+ # 1-context.prec) but evaluating int(other) directly
+ # is dangerous until we know other is small (other
+ # could be 1e999999999)
+ if other._sign == 1:
+ multiplier = 0
+ elif other > context.prec:
+ multiplier = context.prec
+ else:
+ multiplier = int(other)
+
+ exp = self._exp * multiplier
+ if exp < 1-context.prec:
+ exp = 1-context.prec
+ context._raise_error(Rounded)
+ else:
+ context._raise_error(Inexact)
+ context._raise_error(Rounded)
+ exp = 1-context.prec
+
+ return _dec_from_triple(result_sign, '1'+'0'*-exp, exp)
+
+ # compute adjusted exponent of self
+ self_adj = self.adjusted()
+
+ # self ** infinity is infinity if self > 1, 0 if self < 1
+ # self ** -infinity is infinity if self < 1, 0 if self > 1
+ if other._isinfinity():
+ if (other._sign == 0) == (self_adj < 0):
+ return _dec_from_triple(result_sign, '0', 0)
+ else:
+ return _SignedInfinity[result_sign]
+
+ # from here on, the result always goes through the call
+ # to _fix at the end of this function.
+ ans = None
+ exact = False
+
+ # crude test to catch cases of extreme overflow/underflow. If
+ # log10(self)*other >= 10**bound and bound >= len(str(Emax))
+ # then 10**bound >= 10**len(str(Emax)) >= Emax+1 and hence
+ # self**other >= 10**(Emax+1), so overflow occurs. The test
+ # for underflow is similar.
+ bound = self._log10_exp_bound() + other.adjusted()
+ if (self_adj >= 0) == (other._sign == 0):
+ # self > 1 and other +ve, or self < 1 and other -ve
+ # possibility of overflow
+ if bound >= len(str(context.Emax)):
+ ans = _dec_from_triple(result_sign, '1', context.Emax+1)
+ else:
+ # self > 1 and other -ve, or self < 1 and other +ve
+ # possibility of underflow to 0
+ Etiny = context.Etiny()
+ if bound >= len(str(-Etiny)):
+ ans = _dec_from_triple(result_sign, '1', Etiny-1)
+
+ # try for an exact result with precision +1
+ if ans is None:
+ ans = self._power_exact(other, context.prec + 1)
+ if ans is not None:
+ if result_sign == 1:
+ ans = _dec_from_triple(1, ans._int, ans._exp)
+ exact = True
+
+ # usual case: inexact result, x**y computed directly as exp(y*log(x))
+ if ans is None:
+ p = context.prec
+ x = _WorkRep(self)
+ xc, xe = x.int, x.exp
+ y = _WorkRep(other)
+ yc, ye = y.int, y.exp
+ if y.sign == 1:
+ yc = -yc
+
+ # compute correctly rounded result: start with precision +3,
+ # then increase precision until result is unambiguously roundable
+ extra = 3
+ while True:
+ coeff, exp = _dpower(xc, xe, yc, ye, p+extra)
+ if coeff % (5*10**(len(str(coeff))-p-1)):
+ break
+ extra += 3
+
+ ans = _dec_from_triple(result_sign, str(coeff), exp)
+
+ # unlike exp, ln and log10, the power function respects the
+ # rounding mode; no need to switch to ROUND_HALF_EVEN here
+
+ # There's a difficulty here when 'other' is not an integer and
+ # the result is exact. In this case, the specification
+ # requires that the Inexact flag be raised (in spite of
+ # exactness), but since the result is exact _fix won't do this
+ # for us. (Correspondingly, the Underflow signal should also
+ # be raised for subnormal results.) We can't directly raise
+ # these signals either before or after calling _fix, since
+ # that would violate the precedence for signals. So we wrap
+ # the ._fix call in a temporary context, and reraise
+ # afterwards.
+ if exact and not other._isinteger():
+ # pad with zeros up to length context.prec+1 if necessary; this
+ # ensures that the Rounded signal will be raised.
+ if len(ans._int) <= context.prec:
+ expdiff = context.prec + 1 - len(ans._int)
+ ans = _dec_from_triple(ans._sign, ans._int+'0'*expdiff,
+ ans._exp-expdiff)
+
+ # create a copy of the current context, with cleared flags/traps
+ newcontext = context.copy()
+ newcontext.clear_flags()
+ for exception in _signals:
+ newcontext.traps[exception] = 0
+
+ # round in the new context
+ ans = ans._fix(newcontext)
+
+ # raise Inexact, and if necessary, Underflow
+ newcontext._raise_error(Inexact)
+ if newcontext.flags[Subnormal]:
+ newcontext._raise_error(Underflow)
+
+ # propagate signals to the original context; _fix could
+ # have raised any of Overflow, Underflow, Subnormal,
+ # Inexact, Rounded, Clamped. Overflow needs the correct
+ # arguments. Note that the order of the exceptions is
+ # important here.
+ if newcontext.flags[Overflow]:
+ context._raise_error(Overflow, 'above Emax', ans._sign)
+ for exception in Underflow, Subnormal, Inexact, Rounded, Clamped:
+ if newcontext.flags[exception]:
+ context._raise_error(exception)
+
+ else:
+ ans = ans._fix(context)
+
+ return ans
+
+ def __rpow__(self, other, context=None):
+ """Swaps self/other and returns __pow__."""
+ other = _convert_other(other)
+ if other is NotImplemented:
+ return other
+ return other.__pow__(self, context=context)
+
+ def normalize(self, context=None):
+ """Normalize- strip trailing 0s, change anything equal to 0 to 0e0"""
+
+ if context is None:
+ context = getcontext()
+
+ if self._is_special:
+ ans = self._check_nans(context=context)
+ if ans:
+ return ans
+
+ dup = self._fix(context)
+ if dup._isinfinity():
+ return dup
+
+ if not dup:
+ return _dec_from_triple(dup._sign, '0', 0)
+ exp_max = [context.Emax, context.Etop()][context.clamp]
+ end = len(dup._int)
+ exp = dup._exp
+ while dup._int[end-1] == '0' and exp < exp_max:
+ exp += 1
+ end -= 1
+ return _dec_from_triple(dup._sign, dup._int[:end], exp)
+
+ def quantize(self, exp, rounding=None, context=None):
+ """Quantize self so its exponent is the same as that of exp.
+
+ Similar to self._rescale(exp._exp) but with error checking.
+ """
+ exp = _convert_other(exp, raiseit=True)
+
+ if context is None:
+ context = getcontext()
+ if rounding is None:
+ rounding = context.rounding
+
+ if self._is_special or exp._is_special:
+ ans = self._check_nans(exp, context)
+ if ans:
+ return ans
+
+ if exp._isinfinity() or self._isinfinity():
+ if exp._isinfinity() and self._isinfinity():
+ return Decimal(self) # if both are inf, it is OK
+ return context._raise_error(InvalidOperation,
+ 'quantize with one INF')
+
+ # exp._exp should be between Etiny and Emax
+ if not (context.Etiny() <= exp._exp <= context.Emax):
+ return context._raise_error(InvalidOperation,
+ 'target exponent out of bounds in quantize')
+
+ if not self:
+ ans = _dec_from_triple(self._sign, '0', exp._exp)
+ return ans._fix(context)
+
+ self_adjusted = self.adjusted()
+ if self_adjusted > context.Emax:
+ return context._raise_error(InvalidOperation,
+ 'exponent of quantize result too large for current context')
+ if self_adjusted - exp._exp + 1 > context.prec:
+ return context._raise_error(InvalidOperation,
+ 'quantize result has too many digits for current context')
+
+ ans = self._rescale(exp._exp, rounding)
+ if ans.adjusted() > context.Emax:
+ return context._raise_error(InvalidOperation,
+ 'exponent of quantize result too large for current context')
+ if len(ans._int) > context.prec:
+ return context._raise_error(InvalidOperation,
+ 'quantize result has too many digits for current context')
+
+ # raise appropriate flags
+ if ans and ans.adjusted() < context.Emin:
+ context._raise_error(Subnormal)
+ if ans._exp > self._exp:
+ if ans != self:
+ context._raise_error(Inexact)
+ context._raise_error(Rounded)
+
+ # call to fix takes care of any necessary folddown, and
+ # signals Clamped if necessary
+ ans = ans._fix(context)
+ return ans
+
+ def same_quantum(self, other, context=None):
+ """Return True if self and other have the same exponent; otherwise
+ return False.
+
+ If either operand is a special value, the following rules are used:
+ * return True if both operands are infinities
+ * return True if both operands are NaNs
+ * otherwise, return False.
+ """
+ other = _convert_other(other, raiseit=True)
+ if self._is_special or other._is_special:
+ return (self.is_nan() and other.is_nan() or
+ self.is_infinite() and other.is_infinite())
+ return self._exp == other._exp
+
+ def _rescale(self, exp, rounding):
+ """Rescale self so that the exponent is exp, either by padding with zeros
+ or by truncating digits, using the given rounding mode.
+
+ Specials are returned without change. This operation is
+ quiet: it raises no flags, and uses no information from the
+ context.
+
+ exp = exp to scale to (an integer)
+ rounding = rounding mode
+ """
+ if self._is_special:
+ return Decimal(self)
+ if not self:
+ return _dec_from_triple(self._sign, '0', exp)
+
+ if self._exp >= exp:
+ # pad answer with zeros if necessary
+ return _dec_from_triple(self._sign,
+ self._int + '0'*(self._exp - exp), exp)
+
+ # too many digits; round and lose data. If self.adjusted() <
+ # exp-1, replace self by 10**(exp-1) before rounding
+ digits = len(self._int) + self._exp - exp
+ if digits < 0:
+ self = _dec_from_triple(self._sign, '1', exp-1)
+ digits = 0
+ this_function = self._pick_rounding_function[rounding]
+ changed = this_function(self, digits)
+ coeff = self._int[:digits] or '0'
+ if changed == 1:
+ coeff = str(int(coeff)+1)
+ return _dec_from_triple(self._sign, coeff, exp)
+
+ def _round(self, places, rounding):
+ """Round a nonzero, nonspecial Decimal to a fixed number of
+ significant figures, using the given rounding mode.
+
+ Infinities, NaNs and zeros are returned unaltered.
+
+ This operation is quiet: it raises no flags, and uses no
+ information from the context.
+
+ """
+ if places <= 0:
+ raise ValueError("argument should be at least 1 in _round")
+ if self._is_special or not self:
+ return Decimal(self)
+ ans = self._rescale(self.adjusted()+1-places, rounding)
+ # it can happen that the rescale alters the adjusted exponent;
+ # for example when rounding 99.97 to 3 significant figures.
+ # When this happens we end up with an extra 0 at the end of
+ # the number; a second rescale fixes this.
+ if ans.adjusted() != self.adjusted():
+ ans = ans._rescale(ans.adjusted()+1-places, rounding)
+ return ans
+
+ def to_integral_exact(self, rounding=None, context=None):
+ """Rounds to a nearby integer.
+
+ If no rounding mode is specified, take the rounding mode from
+ the context. This method raises the Rounded and Inexact flags
+ when appropriate.
+
+ See also: to_integral_value, which does exactly the same as
+ this method except that it doesn't raise Inexact or Rounded.
+ """
+ if self._is_special:
+ ans = self._check_nans(context=context)
+ if ans:
+ return ans
+ return Decimal(self)
+ if self._exp >= 0:
+ return Decimal(self)
+ if not self:
+ return _dec_from_triple(self._sign, '0', 0)
+ if context is None:
+ context = getcontext()
+ if rounding is None:
+ rounding = context.rounding
+ ans = self._rescale(0, rounding)
+ if ans != self:
+ context._raise_error(Inexact)
+ context._raise_error(Rounded)
+ return ans
+
+ def to_integral_value(self, rounding=None, context=None):
+ """Rounds to the nearest integer, without raising inexact, rounded."""
+ if context is None:
+ context = getcontext()
+ if rounding is None:
+ rounding = context.rounding
+ if self._is_special:
+ ans = self._check_nans(context=context)
+ if ans:
+ return ans
+ return Decimal(self)
+ if self._exp >= 0:
+ return Decimal(self)
+ else:
+ return self._rescale(0, rounding)
+
+ # the method name changed, but we provide also the old one, for compatibility
+ to_integral = to_integral_value
+
+ def sqrt(self, context=None):
+ """Return the square root of self."""
+ if context is None:
+ context = getcontext()
+
+ if self._is_special:
+ ans = self._check_nans(context=context)
+ if ans:
+ return ans
+
+ if self._isinfinity() and self._sign == 0:
+ return Decimal(self)
+
+ if not self:
+ # exponent = self._exp // 2. sqrt(-0) = -0
+ ans = _dec_from_triple(self._sign, '0', self._exp // 2)
+ return ans._fix(context)
+
+ if self._sign == 1:
+ return context._raise_error(InvalidOperation, 'sqrt(-x), x > 0')
+
+ # At this point self represents a positive number. Let p be
+ # the desired precision and express self in the form c*100**e
+ # with c a positive real number and e an integer, c and e
+ # being chosen so that 100**(p-1) <= c < 100**p. Then the
+ # (exact) square root of self is sqrt(c)*10**e, and 10**(p-1)
+ # <= sqrt(c) < 10**p, so the closest representable Decimal at
+ # precision p is n*10**e where n = round_half_even(sqrt(c)),
+ # the closest integer to sqrt(c) with the even integer chosen
+ # in the case of a tie.
+ #
+ # To ensure correct rounding in all cases, we use the
+ # following trick: we compute the square root to an extra
+ # place (precision p+1 instead of precision p), rounding down.
+ # Then, if the result is inexact and its last digit is 0 or 5,
+ # we increase the last digit to 1 or 6 respectively; if it's
+ # exact we leave the last digit alone. Now the final round to
+ # p places (or fewer in the case of underflow) will round
+ # correctly and raise the appropriate flags.
+
+ # use an extra digit of precision
+ prec = context.prec+1
+
+ # write argument in the form c*100**e where e = self._exp//2
+ # is the 'ideal' exponent, to be used if the square root is
+ # exactly representable. l is the number of 'digits' of c in
+ # base 100, so that 100**(l-1) <= c < 100**l.
+ op = _WorkRep(self)
+ e = op.exp >> 1
+ if op.exp & 1:
+ c = op.int * 10
+ l = (len(self._int) >> 1) + 1
+ else:
+ c = op.int
+ l = len(self._int)+1 >> 1
+
+ # rescale so that c has exactly prec base 100 'digits'
+ shift = prec-l
+ if shift >= 0:
+ c *= 100**shift
+ exact = True
+ else:
+ c, remainder = divmod(c, 100**-shift)
+ exact = not remainder
+ e -= shift
+
+ # find n = floor(sqrt(c)) using Newton's method
+ n = 10**prec
+ while True:
+ q = c//n
+ if n <= q:
+ break
+ else:
+ n = n + q >> 1
+ exact = exact and n*n == c
+
+ if exact:
+ # result is exact; rescale to use ideal exponent e
+ if shift >= 0:
+ # assert n % 10**shift == 0
+ n //= 10**shift
+ else:
+ n *= 10**-shift
+ e += shift
+ else:
+ # result is not exact; fix last digit as described above
+ if n % 5 == 0:
+ n += 1
+
+ ans = _dec_from_triple(0, str(n), e)
+
+ # round, and fit to current context
+ context = context._shallow_copy()
+ rounding = context._set_rounding(ROUND_HALF_EVEN)
+ ans = ans._fix(context)
+ context.rounding = rounding
+
+ return ans
+
+ def max(self, other, context=None):
+ """Returns the larger value.
+
+ Like max(self, other) except if one is not a number, returns
+ NaN (and signals if one is sNaN). Also rounds.
+ """
+ other = _convert_other(other, raiseit=True)
+
+ if context is None:
+ context = getcontext()
+
+ if self._is_special or other._is_special:
+ # If one operand is a quiet NaN and the other is number, then the
+ # number is always returned
+ sn = self._isnan()
+ on = other._isnan()
+ if sn or on:
+ if on == 1 and sn == 0:
+ return self._fix(context)
+ if sn == 1 and on == 0:
+ return other._fix(context)
+ return self._check_nans(other, context)
+
+ c = self._cmp(other)
+ if c == 0:
+ # If both operands are finite and equal in numerical value
+ # then an ordering is applied:
+ #
+ # If the signs differ then max returns the operand with the
+ # positive sign and min returns the operand with the negative sign
+ #
+ # If the signs are the same then the exponent is used to select
+ # the result. This is exactly the ordering used in compare_total.
+ c = self.compare_total(other)
+
+ if c == -1:
+ ans = other
+ else:
+ ans = self
+
+ return ans._fix(context)
+
+ def min(self, other, context=None):
+ """Returns the smaller value.
+
+ Like min(self, other) except if one is not a number, returns
+ NaN (and signals if one is sNaN). Also rounds.
+ """
+ other = _convert_other(other, raiseit=True)
+
+ if context is None:
+ context = getcontext()
+
+ if self._is_special or other._is_special:
+ # If one operand is a quiet NaN and the other is number, then the
+ # number is always returned
+ sn = self._isnan()
+ on = other._isnan()
+ if sn or on:
+ if on == 1 and sn == 0:
+ return self._fix(context)
+ if sn == 1 and on == 0:
+ return other._fix(context)
+ return self._check_nans(other, context)
+
+ c = self._cmp(other)
+ if c == 0:
+ c = self.compare_total(other)
+
+ if c == -1:
+ ans = self
+ else:
+ ans = other
+
+ return ans._fix(context)
+
+ def _isinteger(self):
+ """Returns whether self is an integer"""
+ if self._is_special:
+ return False
+ if self._exp >= 0:
+ return True
+ rest = self._int[self._exp:]
+ return rest == '0'*len(rest)
+
+ def _iseven(self):
+ """Returns True if self is even. Assumes self is an integer."""
+ if not self or self._exp > 0:
+ return True
+ return self._int[-1+self._exp] in '02468'
+
+ def adjusted(self):
+ """Return the adjusted exponent of self"""
+ try:
+ return self._exp + len(self._int) - 1
+ # If NaN or Infinity, self._exp is string
+ except TypeError:
+ return 0
+
+ def canonical(self):
+ """Returns the same Decimal object.
+
+ As we do not have different encodings for the same number, the
+ received object already is in its canonical form.
+ """
+ return self
+
+ def compare_signal(self, other, context=None):
+ """Compares self to the other operand numerically.
+
+ It's pretty much like compare(), but all NaNs signal, with signaling
+ NaNs taking precedence over quiet NaNs.
+ """
+ other = _convert_other(other, raiseit = True)
+ ans = self._compare_check_nans(other, context)
+ if ans:
+ return ans
+ return self.compare(other, context=context)
+
+ def compare_total(self, other, context=None):
+ """Compares self to other using the abstract representations.
+
+ This is not like the standard compare, which use their numerical
+ value. Note that a total ordering is defined for all possible abstract
+ representations.
+ """
+ other = _convert_other(other, raiseit=True)
+
+ # if one is negative and the other is positive, it's easy
+ if self._sign and not other._sign:
+ return _NegativeOne
+ if not self._sign and other._sign:
+ return _One
+ sign = self._sign
+
+ # let's handle both NaN types
+ self_nan = self._isnan()
+ other_nan = other._isnan()
+ if self_nan or other_nan:
+ if self_nan == other_nan:
+ # compare payloads as though they're integers
+ self_key = len(self._int), self._int
+ other_key = len(other._int), other._int
+ if self_key < other_key:
+ if sign:
+ return _One
+ else:
+ return _NegativeOne
+ if self_key > other_key:
+ if sign:
+ return _NegativeOne
+ else:
+ return _One
+ return _Zero
+
+ if sign:
+ if self_nan == 1:
+ return _NegativeOne
+ if other_nan == 1:
+ return _One
+ if self_nan == 2:
+ return _NegativeOne
+ if other_nan == 2:
+ return _One
+ else:
+ if self_nan == 1:
+ return _One
+ if other_nan == 1:
+ return _NegativeOne
+ if self_nan == 2:
+ return _One
+ if other_nan == 2:
+ return _NegativeOne
+
+ if self < other:
+ return _NegativeOne
+ if self > other:
+ return _One
+
+ if self._exp < other._exp:
+ if sign:
+ return _One
+ else:
+ return _NegativeOne
+ if self._exp > other._exp:
+ if sign:
+ return _NegativeOne
+ else:
+ return _One
+ return _Zero
+
+
+ def compare_total_mag(self, other, context=None):
+ """Compares self to other using abstract repr., ignoring sign.
+
+ Like compare_total, but with operand's sign ignored and assumed to be 0.
+ """
+ other = _convert_other(other, raiseit=True)
+
+ s = self.copy_abs()
+ o = other.copy_abs()
+ return s.compare_total(o)
+
+ def copy_abs(self):
+ """Returns a copy with the sign set to 0. """
+ return _dec_from_triple(0, self._int, self._exp, self._is_special)
+
+ def copy_negate(self):
+ """Returns a copy with the sign inverted."""
+ if self._sign:
+ return _dec_from_triple(0, self._int, self._exp, self._is_special)
+ else:
+ return _dec_from_triple(1, self._int, self._exp, self._is_special)
+
+ def copy_sign(self, other, context=None):
+ """Returns self with the sign of other."""
+ other = _convert_other(other, raiseit=True)
+ return _dec_from_triple(other._sign, self._int,
+ self._exp, self._is_special)
+
+ def exp(self, context=None):
+ """Returns e ** self."""
+
+ if context is None:
+ context = getcontext()
+
+ # exp(NaN) = NaN
+ ans = self._check_nans(context=context)
+ if ans:
+ return ans
+
+ # exp(-Infinity) = 0
+ if self._isinfinity() == -1:
+ return _Zero
+
+ # exp(0) = 1
+ if not self:
+ return _One
+
+ # exp(Infinity) = Infinity
+ if self._isinfinity() == 1:
+ return Decimal(self)
+
+ # the result is now guaranteed to be inexact (the true
+ # mathematical result is transcendental). There's no need to
+ # raise Rounded and Inexact here---they'll always be raised as
+ # a result of the call to _fix.
+ p = context.prec
+ adj = self.adjusted()
+
+ # we only need to do any computation for quite a small range
+ # of adjusted exponents---for example, -29 <= adj <= 10 for
+ # the default context. For smaller exponent the result is
+ # indistinguishable from 1 at the given precision, while for
+ # larger exponent the result either overflows or underflows.
+ if self._sign == 0 and adj > len(str((context.Emax+1)*3)):
+ # overflow
+ ans = _dec_from_triple(0, '1', context.Emax+1)
+ elif self._sign == 1 and adj > len(str((-context.Etiny()+1)*3)):
+ # underflow to 0
+ ans = _dec_from_triple(0, '1', context.Etiny()-1)
+ elif self._sign == 0 and adj < -p:
+ # p+1 digits; final round will raise correct flags
+ ans = _dec_from_triple(0, '1' + '0'*(p-1) + '1', -p)
+ elif self._sign == 1 and adj < -p-1:
+ # p+1 digits; final round will raise correct flags
+ ans = _dec_from_triple(0, '9'*(p+1), -p-1)
+ # general case
+ else:
+ op = _WorkRep(self)
+ c, e = op.int, op.exp
+ if op.sign == 1:
+ c = -c
+
+ # compute correctly rounded result: increase precision by
+ # 3 digits at a time until we get an unambiguously
+ # roundable result
+ extra = 3
+ while True:
+ coeff, exp = _dexp(c, e, p+extra)
+ if coeff % (5*10**(len(str(coeff))-p-1)):
+ break
+ extra += 3
+
+ ans = _dec_from_triple(0, str(coeff), exp)
+
+ # at this stage, ans should round correctly with *any*
+ # rounding mode, not just with ROUND_HALF_EVEN
+ context = context._shallow_copy()
+ rounding = context._set_rounding(ROUND_HALF_EVEN)
+ ans = ans._fix(context)
+ context.rounding = rounding
+
+ return ans
+
+ def is_canonical(self):
+ """Return True if self is canonical; otherwise return False.
+
+ Currently, the encoding of a Decimal instance is always
+ canonical, so this method returns True for any Decimal.
+ """
+ return True
+
+ def is_finite(self):
+ """Return True if self is finite; otherwise return False.
+
+ A Decimal instance is considered finite if it is neither
+ infinite nor a NaN.
+ """
+ return not self._is_special
+
+ def is_infinite(self):
+ """Return True if self is infinite; otherwise return False."""
+ return self._exp == 'F'
+
+ def is_nan(self):
+ """Return True if self is a qNaN or sNaN; otherwise return False."""
+ return self._exp in ('n', 'N')
+
+ def is_normal(self, context=None):
+ """Return True if self is a normal number; otherwise return False."""
+ if self._is_special or not self:
+ return False
+ if context is None:
+ context = getcontext()
+ return context.Emin <= self.adjusted()
+
+ def is_qnan(self):
+ """Return True if self is a quiet NaN; otherwise return False."""
+ return self._exp == 'n'
+
+ def is_signed(self):
+ """Return True if self is negative; otherwise return False."""
+ return self._sign == 1
+
+ def is_snan(self):
+ """Return True if self is a signaling NaN; otherwise return False."""
+ return self._exp == 'N'
+
+ def is_subnormal(self, context=None):
+ """Return True if self is subnormal; otherwise return False."""
+ if self._is_special or not self:
+ return False
+ if context is None:
+ context = getcontext()
+ return self.adjusted() < context.Emin
+
+ def is_zero(self):
+ """Return True if self is a zero; otherwise return False."""
+ return not self._is_special and self._int == '0'
+
+ def _ln_exp_bound(self):
+ """Compute a lower bound for the adjusted exponent of self.ln().
+ In other words, compute r such that self.ln() >= 10**r. Assumes
+ that self is finite and positive and that self != 1.
+ """
+
+ # for 0.1 <= x <= 10 we use the inequalities 1-1/x <= ln(x) <= x-1
+ adj = self._exp + len(self._int) - 1
+ if adj >= 1:
+ # argument >= 10; we use 23/10 = 2.3 as a lower bound for ln(10)
+ return len(str(adj*23//10)) - 1
+ if adj <= -2:
+ # argument <= 0.1
+ return len(str((-1-adj)*23//10)) - 1
+ op = _WorkRep(self)
+ c, e = op.int, op.exp
+ if adj == 0:
+ # 1 < self < 10
+ num = str(c-10**-e)
+ den = str(c)
+ return len(num) - len(den) - (num < den)
+ # adj == -1, 0.1 <= self < 1
+ return e + len(str(10**-e - c)) - 1
+
+
+ def ln(self, context=None):
+ """Returns the natural (base e) logarithm of self."""
+
+ if context is None:
+ context = getcontext()
+
+ # ln(NaN) = NaN
+ ans = self._check_nans(context=context)
+ if ans:
+ return ans
+
+ # ln(0.0) == -Infinity
+ if not self:
+ return _NegativeInfinity
+
+ # ln(Infinity) = Infinity
+ if self._isinfinity() == 1:
+ return _Infinity
+
+ # ln(1.0) == 0.0
+ if self == _One:
+ return _Zero
+
+ # ln(negative) raises InvalidOperation
+ if self._sign == 1:
+ return context._raise_error(InvalidOperation,
+ 'ln of a negative value')
+
+ # result is irrational, so necessarily inexact
+ op = _WorkRep(self)
+ c, e = op.int, op.exp
+ p = context.prec
+
+ # correctly rounded result: repeatedly increase precision by 3
+ # until we get an unambiguously roundable result
+ places = p - self._ln_exp_bound() + 2 # at least p+3 places
+ while True:
+ coeff = _dlog(c, e, places)
+ # assert len(str(abs(coeff)))-p >= 1
+ if coeff % (5*10**(len(str(abs(coeff)))-p-1)):
+ break
+ places += 3
+ ans = _dec_from_triple(int(coeff<0), str(abs(coeff)), -places)
+
+ context = context._shallow_copy()
+ rounding = context._set_rounding(ROUND_HALF_EVEN)
+ ans = ans._fix(context)
+ context.rounding = rounding
+ return ans
+
+ def _log10_exp_bound(self):
+ """Compute a lower bound for the adjusted exponent of self.log10().
+ In other words, find r such that self.log10() >= 10**r.
+ Assumes that self is finite and positive and that self != 1.
+ """
+
+ # For x >= 10 or x < 0.1 we only need a bound on the integer
+ # part of log10(self), and this comes directly from the
+ # exponent of x. For 0.1 <= x <= 10 we use the inequalities
+ # 1-1/x <= log(x) <= x-1. If x > 1 we have |log10(x)| >
+ # (1-1/x)/2.31 > 0. If x < 1 then |log10(x)| > (1-x)/2.31 > 0
+
+ adj = self._exp + len(self._int) - 1
+ if adj >= 1:
+ # self >= 10
+ return len(str(adj))-1
+ if adj <= -2:
+ # self < 0.1
+ return len(str(-1-adj))-1
+ op = _WorkRep(self)
+ c, e = op.int, op.exp
+ if adj == 0:
+ # 1 < self < 10
+ num = str(c-10**-e)
+ den = str(231*c)
+ return len(num) - len(den) - (num < den) + 2
+ # adj == -1, 0.1 <= self < 1
+ num = str(10**-e-c)
+ return len(num) + e - (num < "231") - 1
+
+ def log10(self, context=None):
+ """Returns the base 10 logarithm of self."""
+
+ if context is None:
+ context = getcontext()
+
+ # log10(NaN) = NaN
+ ans = self._check_nans(context=context)
+ if ans:
+ return ans
+
+ # log10(0.0) == -Infinity
+ if not self:
+ return _NegativeInfinity
+
+ # log10(Infinity) = Infinity
+ if self._isinfinity() == 1:
+ return _Infinity
+
+ # log10(negative or -Infinity) raises InvalidOperation
+ if self._sign == 1:
+ return context._raise_error(InvalidOperation,
+ 'log10 of a negative value')
+
+ # log10(10**n) = n
+ if self._int[0] == '1' and self._int[1:] == '0'*(len(self._int) - 1):
+ # answer may need rounding
+ ans = Decimal(self._exp + len(self._int) - 1)
+ else:
+ # result is irrational, so necessarily inexact
+ op = _WorkRep(self)
+ c, e = op.int, op.exp
+ p = context.prec
+
+ # correctly rounded result: repeatedly increase precision
+ # until result is unambiguously roundable
+ places = p-self._log10_exp_bound()+2
+ while True:
+ coeff = _dlog10(c, e, places)
+ # assert len(str(abs(coeff)))-p >= 1
+ if coeff % (5*10**(len(str(abs(coeff)))-p-1)):
+ break
+ places += 3
+ ans = _dec_from_triple(int(coeff<0), str(abs(coeff)), -places)
+
+ context = context._shallow_copy()
+ rounding = context._set_rounding(ROUND_HALF_EVEN)
+ ans = ans._fix(context)
+ context.rounding = rounding
+ return ans
+
+ def logb(self, context=None):
+ """ Returns the exponent of the magnitude of self's MSD.
+
+ The result is the integer which is the exponent of the magnitude
+ of the most significant digit of self (as though it were truncated
+ to a single digit while maintaining the value of that digit and
+ without limiting the resulting exponent).
+ """
+ # logb(NaN) = NaN
+ ans = self._check_nans(context=context)
+ if ans:
+ return ans
+
+ if context is None:
+ context = getcontext()
+
+ # logb(+/-Inf) = +Inf
+ if self._isinfinity():
+ return _Infinity
+
+ # logb(0) = -Inf, DivisionByZero
+ if not self:
+ return context._raise_error(DivisionByZero, 'logb(0)', 1)
+
+ # otherwise, simply return the adjusted exponent of self, as a
+ # Decimal. Note that no attempt is made to fit the result
+ # into the current context.
+ ans = Decimal(self.adjusted())
+ return ans._fix(context)
+
+ def _islogical(self):
+ """Return True if self is a logical operand.
+
+ For being logical, it must be a finite number with a sign of 0,
+ an exponent of 0, and a coefficient whose digits must all be
+ either 0 or 1.
+ """
+ if self._sign != 0 or self._exp != 0:
+ return False
+ for dig in self._int:
+ if dig not in '01':
+ return False
+ return True
+
+ def _fill_logical(self, context, opa, opb):
+ dif = context.prec - len(opa)
+ if dif > 0:
+ opa = '0'*dif + opa
+ elif dif < 0:
+ opa = opa[-context.prec:]
+ dif = context.prec - len(opb)
+ if dif > 0:
+ opb = '0'*dif + opb
+ elif dif < 0:
+ opb = opb[-context.prec:]
+ return opa, opb
+
+ def logical_and(self, other, context=None):
+ """Applies an 'and' operation between self and other's digits."""
+ if context is None:
+ context = getcontext()
+
+ other = _convert_other(other, raiseit=True)
+
+ if not self._islogical() or not other._islogical():
+ return context._raise_error(InvalidOperation)
+
+ # fill to context.prec
+ (opa, opb) = self._fill_logical(context, self._int, other._int)
+
+ # make the operation, and clean starting zeroes
+ result = "".join([str(int(a)&int(b)) for a,b in zip(opa,opb)])
+ return _dec_from_triple(0, result.lstrip('0') or '0', 0)
+
+ def logical_invert(self, context=None):
+ """Invert all its digits."""
+ if context is None:
+ context = getcontext()
+ return self.logical_xor(_dec_from_triple(0,'1'*context.prec,0),
+ context)
+
+ def logical_or(self, other, context=None):
+ """Applies an 'or' operation between self and other's digits."""
+ if context is None:
+ context = getcontext()
+
+ other = _convert_other(other, raiseit=True)
+
+ if not self._islogical() or not other._islogical():
+ return context._raise_error(InvalidOperation)
+
+ # fill to context.prec
+ (opa, opb) = self._fill_logical(context, self._int, other._int)
+
+ # make the operation, and clean starting zeroes
+ result = "".join([str(int(a)|int(b)) for a,b in zip(opa,opb)])
+ return _dec_from_triple(0, result.lstrip('0') or '0', 0)
+
+ def logical_xor(self, other, context=None):
+ """Applies an 'xor' operation between self and other's digits."""
+ if context is None:
+ context = getcontext()
+
+ other = _convert_other(other, raiseit=True)
+
+ if not self._islogical() or not other._islogical():
+ return context._raise_error(InvalidOperation)
+
+ # fill to context.prec
+ (opa, opb) = self._fill_logical(context, self._int, other._int)
+
+ # make the operation, and clean starting zeroes
+ result = "".join([str(int(a)^int(b)) for a,b in zip(opa,opb)])
+ return _dec_from_triple(0, result.lstrip('0') or '0', 0)
+
+ def max_mag(self, other, context=None):
+ """Compares the values numerically with their sign ignored."""
+ other = _convert_other(other, raiseit=True)
+
+ if context is None:
+ context = getcontext()
+
+ if self._is_special or other._is_special:
+ # If one operand is a quiet NaN and the other is number, then the
+ # number is always returned
+ sn = self._isnan()
+ on = other._isnan()
+ if sn or on:
+ if on == 1 and sn == 0:
+ return self._fix(context)
+ if sn == 1 and on == 0:
+ return other._fix(context)
+ return self._check_nans(other, context)
+
+ c = self.copy_abs()._cmp(other.copy_abs())
+ if c == 0:
+ c = self.compare_total(other)
+
+ if c == -1:
+ ans = other
+ else:
+ ans = self
+
+ return ans._fix(context)
+
+ def min_mag(self, other, context=None):
+ """Compares the values numerically with their sign ignored."""
+ other = _convert_other(other, raiseit=True)
+
+ if context is None:
+ context = getcontext()
+
+ if self._is_special or other._is_special:
+ # If one operand is a quiet NaN and the other is number, then the
+ # number is always returned
+ sn = self._isnan()
+ on = other._isnan()
+ if sn or on:
+ if on == 1 and sn == 0:
+ return self._fix(context)
+ if sn == 1 and on == 0:
+ return other._fix(context)
+ return self._check_nans(other, context)
+
+ c = self.copy_abs()._cmp(other.copy_abs())
+ if c == 0:
+ c = self.compare_total(other)
+
+ if c == -1:
+ ans = self
+ else:
+ ans = other
+
+ return ans._fix(context)
+
+ def next_minus(self, context=None):
+ """Returns the largest representable number smaller than itself."""
+ if context is None:
+ context = getcontext()
+
+ ans = self._check_nans(context=context)
+ if ans:
+ return ans
+
+ if self._isinfinity() == -1:
+ return _NegativeInfinity
+ if self._isinfinity() == 1:
+ return _dec_from_triple(0, '9'*context.prec, context.Etop())
+
+ context = context.copy()
+ context._set_rounding(ROUND_FLOOR)
+ context._ignore_all_flags()
+ new_self = self._fix(context)
+ if new_self != self:
+ return new_self
+ return self.__sub__(_dec_from_triple(0, '1', context.Etiny()-1),
+ context)
+
+ def next_plus(self, context=None):
+ """Returns the smallest representable number larger than itself."""
+ if context is None:
+ context = getcontext()
+
+ ans = self._check_nans(context=context)
+ if ans:
+ return ans
+
+ if self._isinfinity() == 1:
+ return _Infinity
+ if self._isinfinity() == -1:
+ return _dec_from_triple(1, '9'*context.prec, context.Etop())
+
+ context = context.copy()
+ context._set_rounding(ROUND_CEILING)
+ context._ignore_all_flags()
+ new_self = self._fix(context)
+ if new_self != self:
+ return new_self
+ return self.__add__(_dec_from_triple(0, '1', context.Etiny()-1),
+ context)
+
+ def next_toward(self, other, context=None):
+ """Returns the number closest to self, in the direction towards other.
+
+ The result is the closest representable number to self
+ (excluding self) that is in the direction towards other,
+ unless both have the same value. If the two operands are
+ numerically equal, then the result is a copy of self with the
+ sign set to be the same as the sign of other.
+ """
+ other = _convert_other(other, raiseit=True)
+
+ if context is None:
+ context = getcontext()
+
+ ans = self._check_nans(other, context)
+ if ans:
+ return ans
+
+ comparison = self._cmp(other)
+ if comparison == 0:
+ return self.copy_sign(other)
+
+ if comparison == -1:
+ ans = self.next_plus(context)
+ else: # comparison == 1
+ ans = self.next_minus(context)
+
+ # decide which flags to raise using value of ans
+ if ans._isinfinity():
+ context._raise_error(Overflow,
+ 'Infinite result from next_toward',
+ ans._sign)
+ context._raise_error(Inexact)
+ context._raise_error(Rounded)
+ elif ans.adjusted() < context.Emin:
+ context._raise_error(Underflow)
+ context._raise_error(Subnormal)
+ context._raise_error(Inexact)
+ context._raise_error(Rounded)
+ # if precision == 1 then we don't raise Clamped for a
+ # result 0E-Etiny.
+ if not ans:
+ context._raise_error(Clamped)
+
+ return ans
+
+ def number_class(self, context=None):
+ """Returns an indication of the class of self.
+
+ The class is one of the following strings:
+ sNaN
+ NaN
+ -Infinity
+ -Normal
+ -Subnormal
+ -Zero
+ +Zero
+ +Subnormal
+ +Normal
+ +Infinity
+ """
+ if self.is_snan():
+ return "sNaN"
+ if self.is_qnan():
+ return "NaN"
+ inf = self._isinfinity()
+ if inf == 1:
+ return "+Infinity"
+ if inf == -1:
+ return "-Infinity"
+ if self.is_zero():
+ if self._sign:
+ return "-Zero"
+ else:
+ return "+Zero"
+ if context is None:
+ context = getcontext()
+ if self.is_subnormal(context=context):
+ if self._sign:
+ return "-Subnormal"
+ else:
+ return "+Subnormal"
+ # just a normal, regular, boring number, :)
+ if self._sign:
+ return "-Normal"
+ else:
+ return "+Normal"
+
+ def radix(self):
+ """Just returns 10, as this is Decimal, :)"""
+ return Decimal(10)
+
+ def rotate(self, other, context=None):
+ """Returns a rotated copy of self, value-of-other times."""
+ if context is None:
+ context = getcontext()
+
+ other = _convert_other(other, raiseit=True)
+
+ ans = self._check_nans(other, context)
+ if ans:
+ return ans
+
+ if other._exp != 0:
+ return context._raise_error(InvalidOperation)
+ if not (-context.prec <= int(other) <= context.prec):
+ return context._raise_error(InvalidOperation)
+
+ if self._isinfinity():
+ return Decimal(self)
+
+ # get values, pad if necessary
+ torot = int(other)
+ rotdig = self._int
+ topad = context.prec - len(rotdig)
+ if topad > 0:
+ rotdig = '0'*topad + rotdig
+ elif topad < 0:
+ rotdig = rotdig[-topad:]
+
+ # let's rotate!
+ rotated = rotdig[torot:] + rotdig[:torot]
+ return _dec_from_triple(self._sign,
+ rotated.lstrip('0') or '0', self._exp)
+
+ def scaleb(self, other, context=None):
+ """Returns self operand after adding the second value to its exp."""
+ if context is None:
+ context = getcontext()
+
+ other = _convert_other(other, raiseit=True)
+
+ ans = self._check_nans(other, context)
+ if ans:
+ return ans
+
+ if other._exp != 0:
+ return context._raise_error(InvalidOperation)
+ liminf = -2 * (context.Emax + context.prec)
+ limsup = 2 * (context.Emax + context.prec)
+ if not (liminf <= int(other) <= limsup):
+ return context._raise_error(InvalidOperation)
+
+ if self._isinfinity():
+ return Decimal(self)
+
+ d = _dec_from_triple(self._sign, self._int, self._exp + int(other))
+ d = d._fix(context)
+ return d
+
+ def shift(self, other, context=None):
+ """Returns a shifted copy of self, value-of-other times."""
+ if context is None:
+ context = getcontext()
+
+ other = _convert_other(other, raiseit=True)
+
+ ans = self._check_nans(other, context)
+ if ans:
+ return ans
+
+ if other._exp != 0:
+ return context._raise_error(InvalidOperation)
+ if not (-context.prec <= int(other) <= context.prec):
+ return context._raise_error(InvalidOperation)
+
+ if self._isinfinity():
+ return Decimal(self)
+
+ # get values, pad if necessary
+ torot = int(other)
+ rotdig = self._int
+ topad = context.prec - len(rotdig)
+ if topad > 0:
+ rotdig = '0'*topad + rotdig
+ elif topad < 0:
+ rotdig = rotdig[-topad:]
+
+ # let's shift!
+ if torot < 0:
+ shifted = rotdig[:torot]
+ else:
+ shifted = rotdig + '0'*torot
+ shifted = shifted[-context.prec:]
+
+ return _dec_from_triple(self._sign,
+ shifted.lstrip('0') or '0', self._exp)
+
+ # Support for pickling, copy, and deepcopy
+ def __reduce__(self):
+ return (self.__class__, (str(self),))
+
+ def __copy__(self):
+ if type(self) is Decimal:
+ return self # I'm immutable; therefore I am my own clone
+ return self.__class__(str(self))
+
+ def __deepcopy__(self, memo):
+ if type(self) is Decimal:
+ return self # My components are also immutable
+ return self.__class__(str(self))
+
+ # PEP 3101 support. the _localeconv keyword argument should be
+ # considered private: it's provided for ease of testing only.
+ def __format__(self, specifier, context=None, _localeconv=None):
+ """Format a Decimal instance according to the given specifier.
+
+ The specifier should be a standard format specifier, with the
+ form described in PEP 3101. Formatting types 'e', 'E', 'f',
+ 'F', 'g', 'G', 'n' and '%' are supported. If the formatting
+ type is omitted it defaults to 'g' or 'G', depending on the
+ value of context.capitals.
+ """
+
+ # Note: PEP 3101 says that if the type is not present then
+ # there should be at least one digit after the decimal point.
+ # We take the liberty of ignoring this requirement for
+ # Decimal---it's presumably there to make sure that
+ # format(float, '') behaves similarly to str(float).
+ if context is None:
+ context = getcontext()
+
+ spec = _parse_format_specifier(specifier, _localeconv=_localeconv)
+
+ # special values don't care about the type or precision
+ if self._is_special:
+ sign = _format_sign(self._sign, spec)
+ body = str(self.copy_abs())
+ if spec['type'] == '%':
+ body += '%'
+ return _format_align(sign, body, spec)
+
+ # a type of None defaults to 'g' or 'G', depending on context
+ if spec['type'] is None:
+ spec['type'] = ['g', 'G'][context.capitals]
+
+ # if type is '%', adjust exponent of self accordingly
+ if spec['type'] == '%':
+ self = _dec_from_triple(self._sign, self._int, self._exp+2)
+
+ # round if necessary, taking rounding mode from the context
+ rounding = context.rounding
+ precision = spec['precision']
+ if precision is not None:
+ if spec['type'] in 'eE':
+ self = self._round(precision+1, rounding)
+ elif spec['type'] in 'fF%':
+ self = self._rescale(-precision, rounding)
+ elif spec['type'] in 'gG' and len(self._int) > precision:
+ self = self._round(precision, rounding)
+ # special case: zeros with a positive exponent can't be
+ # represented in fixed point; rescale them to 0e0.
+ if not self and self._exp > 0 and spec['type'] in 'fF%':
+ self = self._rescale(0, rounding)
+
+ # figure out placement of the decimal point
+ leftdigits = self._exp + len(self._int)
+ if spec['type'] in 'eE':
+ if not self and precision is not None:
+ dotplace = 1 - precision
+ else:
+ dotplace = 1
+ elif spec['type'] in 'fF%':
+ dotplace = leftdigits
+ elif spec['type'] in 'gG':
+ if self._exp <= 0 and leftdigits > -6:
+ dotplace = leftdigits
+ else:
+ dotplace = 1
+
+ # find digits before and after decimal point, and get exponent
+ if dotplace < 0:
+ intpart = '0'
+ fracpart = '0'*(-dotplace) + self._int
+ elif dotplace > len(self._int):
+ intpart = self._int + '0'*(dotplace-len(self._int))
+ fracpart = ''
+ else:
+ intpart = self._int[:dotplace] or '0'
+ fracpart = self._int[dotplace:]
+ exp = leftdigits-dotplace
+
+ # done with the decimal-specific stuff; hand over the rest
+ # of the formatting to the _format_number function
+ return _format_number(self._sign, intpart, fracpart, exp, spec)
+
+def _dec_from_triple(sign, coefficient, exponent, special=False):
+ """Create a decimal instance directly, without any validation,
+ normalization (e.g. removal of leading zeros) or argument
+ conversion.
+
+ This function is for *internal use only*.
+ """
+
+ self = object.__new__(Decimal)
+ self._sign = sign
+ self._int = coefficient
+ self._exp = exponent
+ self._is_special = special
+
+ return self
+
+# Register Decimal as a kind of Number (an abstract base class).
+# However, do not register it as Real (because Decimals are not
+# interoperable with floats).
+_numbers.Number.register(Decimal)
+
+
+##### Context class #######################################################
+
+class _ContextManager(object):
+ """Context manager class to support localcontext().
+
+ Sets a copy of the supplied context in __enter__() and restores
+ the previous decimal context in __exit__()
+ """
+ def __init__(self, new_context):
+ self.new_context = new_context.copy()
+ def __enter__(self):
+ self.saved_context = getcontext()
+ setcontext(self.new_context)
+ return self.new_context
+ def __exit__(self, t, v, tb):
+ setcontext(self.saved_context)
+
+class Context(object):
+ """Contains the context for a Decimal instance.
+
+ Contains:
+ prec - precision (for use in rounding, division, square roots..)
+ rounding - rounding type (how you round)
+ traps - If traps[exception] = 1, then the exception is
+ raised when it is caused. Otherwise, a value is
+ substituted in.
+ flags - When an exception is caused, flags[exception] is set.
+ (Whether or not the trap_enabler is set)
+ Should be reset by user of Decimal instance.
+ Emin - Minimum exponent
+ Emax - Maximum exponent
+ capitals - If 1, 1*10^1 is printed as 1E+1.
+ If 0, printed as 1e1
+ clamp - If 1, change exponents if too high (Default 0)
+ """
+
+ def __init__(self, prec=None, rounding=None, Emin=None, Emax=None,
+ capitals=None, clamp=None, flags=None, traps=None,
+ _ignored_flags=None):
+ # Set defaults; for everything except flags and _ignored_flags,
+ # inherit from DefaultContext.
+ try:
+ dc = DefaultContext
+ except NameError:
+ pass
+
+ self.prec = prec if prec is not None else dc.prec
+ self.rounding = rounding if rounding is not None else dc.rounding
+ self.Emin = Emin if Emin is not None else dc.Emin
+ self.Emax = Emax if Emax is not None else dc.Emax
+ self.capitals = capitals if capitals is not None else dc.capitals
+ self.clamp = clamp if clamp is not None else dc.clamp
+
+ if _ignored_flags is None:
+ self._ignored_flags = []
+ else:
+ self._ignored_flags = _ignored_flags
+
+ if traps is None:
+ self.traps = dc.traps.copy()
+ elif not isinstance(traps, dict):
+ self.traps = dict((s, int(s in traps)) for s in _signals + traps)
+ else:
+ self.traps = traps
+
+ if flags is None:
+ self.flags = dict.fromkeys(_signals, 0)
+ elif not isinstance(flags, dict):
+ self.flags = dict((s, int(s in flags)) for s in _signals + flags)
+ else:
+ self.flags = flags
+
+ def _set_integer_check(self, name, value, vmin, vmax):
+ if not isinstance(value, int):
+ raise TypeError("%s must be an integer" % name)
+ if vmin == '-inf':
+ if value > vmax:
+ raise ValueError("%s must be in [%s, %d]. got: %s" % (name, vmin, vmax, value))
+ elif vmax == 'inf':
+ if value < vmin:
+ raise ValueError("%s must be in [%d, %s]. got: %s" % (name, vmin, vmax, value))
+ else:
+ if value < vmin or value > vmax:
+ raise ValueError("%s must be in [%d, %d]. got %s" % (name, vmin, vmax, value))
+ return object.__setattr__(self, name, value)
+
+ def _set_signal_dict(self, name, d):
+ if not isinstance(d, dict):
+ raise TypeError("%s must be a signal dict" % d)
+ for key in d:
+ if not key in _signals:
+ raise KeyError("%s is not a valid signal dict" % d)
+ for key in _signals:
+ if not key in d:
+ raise KeyError("%s is not a valid signal dict" % d)
+ return object.__setattr__(self, name, d)
+
+ def __setattr__(self, name, value):
+ if name == 'prec':
+ return self._set_integer_check(name, value, 1, 'inf')
+ elif name == 'Emin':
+ return self._set_integer_check(name, value, '-inf', 0)
+ elif name == 'Emax':
+ return self._set_integer_check(name, value, 0, 'inf')
+ elif name == 'capitals':
+ return self._set_integer_check(name, value, 0, 1)
+ elif name == 'clamp':
+ return self._set_integer_check(name, value, 0, 1)
+ elif name == 'rounding':
+ if not value in _rounding_modes:
+ # raise TypeError even for strings to have consistency
+ # among various implementations.
+ raise TypeError("%s: invalid rounding mode" % value)
+ return object.__setattr__(self, name, value)
+ elif name == 'flags' or name == 'traps':
+ return self._set_signal_dict(name, value)
+ elif name == '_ignored_flags':
+ return object.__setattr__(self, name, value)
+ else:
+ raise AttributeError(
+ "'decimal.Context' object has no attribute '%s'" % name)
+
+ def __delattr__(self, name):
+ raise AttributeError("%s cannot be deleted" % name)
+
+ # Support for pickling, copy, and deepcopy
+ def __reduce__(self):
+ flags = [sig for sig, v in self.flags.items() if v]
+ traps = [sig for sig, v in self.traps.items() if v]
+ return (self.__class__,
+ (self.prec, self.rounding, self.Emin, self.Emax,
+ self.capitals, self.clamp, flags, traps))
+
+ def __repr__(self):
+ """Show the current context."""
+ s = []
+ s.append('Context(prec=%(prec)d, rounding=%(rounding)s, '
+ 'Emin=%(Emin)d, Emax=%(Emax)d, capitals=%(capitals)d, '
+ 'clamp=%(clamp)d'
+ % vars(self))
+ names = [f.__name__ for f, v in self.flags.items() if v]
+ s.append('flags=[' + ', '.join(names) + ']')
+ names = [t.__name__ for t, v in self.traps.items() if v]
+ s.append('traps=[' + ', '.join(names) + ']')
+ return ', '.join(s) + ')'
+
+ def clear_flags(self):
+ """Reset all flags to zero"""
+ for flag in self.flags:
+ self.flags[flag] = 0
+
+ def clear_traps(self):
+ """Reset all traps to zero"""
+ for flag in self.traps:
+ self.traps[flag] = 0
+
+ def _shallow_copy(self):
+ """Returns a shallow copy from self."""
+ nc = Context(self.prec, self.rounding, self.Emin, self.Emax,
+ self.capitals, self.clamp, self.flags, self.traps,
+ self._ignored_flags)
+ return nc
+
+ def copy(self):
+ """Returns a deep copy from self."""
+ nc = Context(self.prec, self.rounding, self.Emin, self.Emax,
+ self.capitals, self.clamp,
+ self.flags.copy(), self.traps.copy(),
+ self._ignored_flags)
+ return nc
+ __copy__ = copy
+
+ def _raise_error(self, condition, explanation = None, *args):
+ """Handles an error
+
+ If the flag is in _ignored_flags, returns the default response.
+ Otherwise, it sets the flag, then, if the corresponding
+ trap_enabler is set, it reraises the exception. Otherwise, it returns
+ the default value after setting the flag.
+ """
+ error = _condition_map.get(condition, condition)
+ if error in self._ignored_flags:
+ # Don't touch the flag
+ return error().handle(self, *args)
+
+ self.flags[error] = 1
+ if not self.traps[error]:
+ # The errors define how to handle themselves.
+ return condition().handle(self, *args)
+
+ # Errors should only be risked on copies of the context
+ # self._ignored_flags = []
+ raise error(explanation)
+
+ def _ignore_all_flags(self):
+ """Ignore all flags, if they are raised"""
+ return self._ignore_flags(*_signals)
+
+ def _ignore_flags(self, *flags):
+ """Ignore the flags, if they are raised"""
+ # Do not mutate-- This way, copies of a context leave the original
+ # alone.
+ self._ignored_flags = (self._ignored_flags + list(flags))
+ return list(flags)
+
+ def _regard_flags(self, *flags):
+ """Stop ignoring the flags, if they are raised"""
+ if flags and isinstance(flags[0], (tuple,list)):
+ flags = flags[0]
+ for flag in flags:
+ self._ignored_flags.remove(flag)
+
+ # We inherit object.__hash__, so we must deny this explicitly
+ __hash__ = None
+
+ def Etiny(self):
+ """Returns Etiny (= Emin - prec + 1)"""
+ return int(self.Emin - self.prec + 1)
+
+ def Etop(self):
+ """Returns maximum exponent (= Emax - prec + 1)"""
+ return int(self.Emax - self.prec + 1)
+
+ def _set_rounding(self, type):
+ """Sets the rounding type.
+
+ Sets the rounding type, and returns the current (previous)
+ rounding type. Often used like:
+
+ context = context.copy()
+ # so you don't change the calling context
+ # if an error occurs in the middle.
+ rounding = context._set_rounding(ROUND_UP)
+ val = self.__sub__(other, context=context)
+ context._set_rounding(rounding)
+
+ This will make it round up for that operation.
+ """
+ rounding = self.rounding
+ self.rounding= type
+ return rounding
+
+ def create_decimal(self, num='0'):
+ """Creates a new Decimal instance but using self as context.
+
+ This method implements the to-number operation of the
+ IBM Decimal specification."""
+
+ if isinstance(num, str) and num != num.strip():
+ return self._raise_error(ConversionSyntax,
+ "no trailing or leading whitespace is "
+ "permitted.")
+
+ d = Decimal(num, context=self)
+ if d._isnan() and len(d._int) > self.prec - self.clamp:
+ return self._raise_error(ConversionSyntax,
+ "diagnostic info too long in NaN")
+ return d._fix(self)
+
+ def create_decimal_from_float(self, f):
+ """Creates a new Decimal instance from a float but rounding using self
+ as the context.
+
+ >>> context = Context(prec=5, rounding=ROUND_DOWN)
+ >>> context.create_decimal_from_float(3.1415926535897932)
+ Decimal('3.1415')
+ >>> context = Context(prec=5, traps=[Inexact])
+ >>> context.create_decimal_from_float(3.1415926535897932)
+ Traceback (most recent call last):
+ ...
+ decimal.Inexact
+
+ """
+ d = Decimal.from_float(f) # An exact conversion
+ return d._fix(self) # Apply the context rounding
+
+ # Methods
+ def abs(self, a):
+ """Returns the absolute value of the operand.
+
+ If the operand is negative, the result is the same as using the minus
+ operation on the operand. Otherwise, the result is the same as using
+ the plus operation on the operand.
+
+ >>> ExtendedContext.abs(Decimal('2.1'))
+ Decimal('2.1')
+ >>> ExtendedContext.abs(Decimal('-100'))
+ Decimal('100')
+ >>> ExtendedContext.abs(Decimal('101.5'))
+ Decimal('101.5')
+ >>> ExtendedContext.abs(Decimal('-101.5'))
+ Decimal('101.5')
+ >>> ExtendedContext.abs(-1)
+ Decimal('1')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.__abs__(context=self)
+
+ def add(self, a, b):
+ """Return the sum of the two operands.
+
+ >>> ExtendedContext.add(Decimal('12'), Decimal('7.00'))
+ Decimal('19.00')
+ >>> ExtendedContext.add(Decimal('1E+2'), Decimal('1.01E+4'))
+ Decimal('1.02E+4')
+ >>> ExtendedContext.add(1, Decimal(2))
+ Decimal('3')
+ >>> ExtendedContext.add(Decimal(8), 5)
+ Decimal('13')
+ >>> ExtendedContext.add(5, 5)
+ Decimal('10')
+ """
+ a = _convert_other(a, raiseit=True)
+ r = a.__add__(b, context=self)
+ if r is NotImplemented:
+ raise TypeError("Unable to convert %s to Decimal" % b)
+ else:
+ return r
+
+ def _apply(self, a):
+ return str(a._fix(self))
+
+ def canonical(self, a):
+ """Returns the same Decimal object.
+
+ As we do not have different encodings for the same number, the
+ received object already is in its canonical form.
+
+ >>> ExtendedContext.canonical(Decimal('2.50'))
+ Decimal('2.50')
+ """
+ if not isinstance(a, Decimal):
+ raise TypeError("canonical requires a Decimal as an argument.")
+ return a.canonical()
+
+ def compare(self, a, b):
+ """Compares values numerically.
+
+ If the signs of the operands differ, a value representing each operand
+ ('-1' if the operand is less than zero, '0' if the operand is zero or
+ negative zero, or '1' if the operand is greater than zero) is used in
+ place of that operand for the comparison instead of the actual
+ operand.
+
+ The comparison is then effected by subtracting the second operand from
+ the first and then returning a value according to the result of the
+ subtraction: '-1' if the result is less than zero, '0' if the result is
+ zero or negative zero, or '1' if the result is greater than zero.
+
+ >>> ExtendedContext.compare(Decimal('2.1'), Decimal('3'))
+ Decimal('-1')
+ >>> ExtendedContext.compare(Decimal('2.1'), Decimal('2.1'))
+ Decimal('0')
+ >>> ExtendedContext.compare(Decimal('2.1'), Decimal('2.10'))
+ Decimal('0')
+ >>> ExtendedContext.compare(Decimal('3'), Decimal('2.1'))
+ Decimal('1')
+ >>> ExtendedContext.compare(Decimal('2.1'), Decimal('-3'))
+ Decimal('1')
+ >>> ExtendedContext.compare(Decimal('-3'), Decimal('2.1'))
+ Decimal('-1')
+ >>> ExtendedContext.compare(1, 2)
+ Decimal('-1')
+ >>> ExtendedContext.compare(Decimal(1), 2)
+ Decimal('-1')
+ >>> ExtendedContext.compare(1, Decimal(2))
+ Decimal('-1')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.compare(b, context=self)
+
+ def compare_signal(self, a, b):
+ """Compares the values of the two operands numerically.
+
+ It's pretty much like compare(), but all NaNs signal, with signaling
+ NaNs taking precedence over quiet NaNs.
+
+ >>> c = ExtendedContext
+ >>> c.compare_signal(Decimal('2.1'), Decimal('3'))
+ Decimal('-1')
+ >>> c.compare_signal(Decimal('2.1'), Decimal('2.1'))
+ Decimal('0')
+ >>> c.flags[InvalidOperation] = 0
+ >>> print(c.flags[InvalidOperation])
+ 0
+ >>> c.compare_signal(Decimal('NaN'), Decimal('2.1'))
+ Decimal('NaN')
+ >>> print(c.flags[InvalidOperation])
+ 1
+ >>> c.flags[InvalidOperation] = 0
+ >>> print(c.flags[InvalidOperation])
+ 0
+ >>> c.compare_signal(Decimal('sNaN'), Decimal('2.1'))
+ Decimal('NaN')
+ >>> print(c.flags[InvalidOperation])
+ 1
+ >>> c.compare_signal(-1, 2)
+ Decimal('-1')
+ >>> c.compare_signal(Decimal(-1), 2)
+ Decimal('-1')
+ >>> c.compare_signal(-1, Decimal(2))
+ Decimal('-1')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.compare_signal(b, context=self)
+
+ def compare_total(self, a, b):
+ """Compares two operands using their abstract representation.
+
+ This is not like the standard compare, which use their numerical
+ value. Note that a total ordering is defined for all possible abstract
+ representations.
+
+ >>> ExtendedContext.compare_total(Decimal('12.73'), Decimal('127.9'))
+ Decimal('-1')
+ >>> ExtendedContext.compare_total(Decimal('-127'), Decimal('12'))
+ Decimal('-1')
+ >>> ExtendedContext.compare_total(Decimal('12.30'), Decimal('12.3'))
+ Decimal('-1')
+ >>> ExtendedContext.compare_total(Decimal('12.30'), Decimal('12.30'))
+ Decimal('0')
+ >>> ExtendedContext.compare_total(Decimal('12.3'), Decimal('12.300'))
+ Decimal('1')
+ >>> ExtendedContext.compare_total(Decimal('12.3'), Decimal('NaN'))
+ Decimal('-1')
+ >>> ExtendedContext.compare_total(1, 2)
+ Decimal('-1')
+ >>> ExtendedContext.compare_total(Decimal(1), 2)
+ Decimal('-1')
+ >>> ExtendedContext.compare_total(1, Decimal(2))
+ Decimal('-1')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.compare_total(b)
+
+ def compare_total_mag(self, a, b):
+ """Compares two operands using their abstract representation ignoring sign.
+
+ Like compare_total, but with operand's sign ignored and assumed to be 0.
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.compare_total_mag(b)
+
+ def copy_abs(self, a):
+ """Returns a copy of the operand with the sign set to 0.
+
+ >>> ExtendedContext.copy_abs(Decimal('2.1'))
+ Decimal('2.1')
+ >>> ExtendedContext.copy_abs(Decimal('-100'))
+ Decimal('100')
+ >>> ExtendedContext.copy_abs(-1)
+ Decimal('1')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.copy_abs()
+
+ def copy_decimal(self, a):
+ """Returns a copy of the decimal object.
+
+ >>> ExtendedContext.copy_decimal(Decimal('2.1'))
+ Decimal('2.1')
+ >>> ExtendedContext.copy_decimal(Decimal('-1.00'))
+ Decimal('-1.00')
+ >>> ExtendedContext.copy_decimal(1)
+ Decimal('1')
+ """
+ a = _convert_other(a, raiseit=True)
+ return Decimal(a)
+
+ def copy_negate(self, a):
+ """Returns a copy of the operand with the sign inverted.
+
+ >>> ExtendedContext.copy_negate(Decimal('101.5'))
+ Decimal('-101.5')
+ >>> ExtendedContext.copy_negate(Decimal('-101.5'))
+ Decimal('101.5')
+ >>> ExtendedContext.copy_negate(1)
+ Decimal('-1')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.copy_negate()
+
+ def copy_sign(self, a, b):
+ """Copies the second operand's sign to the first one.
+
+ In detail, it returns a copy of the first operand with the sign
+ equal to the sign of the second operand.
+
+ >>> ExtendedContext.copy_sign(Decimal( '1.50'), Decimal('7.33'))
+ Decimal('1.50')
+ >>> ExtendedContext.copy_sign(Decimal('-1.50'), Decimal('7.33'))
+ Decimal('1.50')
+ >>> ExtendedContext.copy_sign(Decimal( '1.50'), Decimal('-7.33'))
+ Decimal('-1.50')
+ >>> ExtendedContext.copy_sign(Decimal('-1.50'), Decimal('-7.33'))
+ Decimal('-1.50')
+ >>> ExtendedContext.copy_sign(1, -2)
+ Decimal('-1')
+ >>> ExtendedContext.copy_sign(Decimal(1), -2)
+ Decimal('-1')
+ >>> ExtendedContext.copy_sign(1, Decimal(-2))
+ Decimal('-1')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.copy_sign(b)
+
+ def divide(self, a, b):
+ """Decimal division in a specified context.
+
+ >>> ExtendedContext.divide(Decimal('1'), Decimal('3'))
+ Decimal('0.333333333')
+ >>> ExtendedContext.divide(Decimal('2'), Decimal('3'))
+ Decimal('0.666666667')
+ >>> ExtendedContext.divide(Decimal('5'), Decimal('2'))
+ Decimal('2.5')
+ >>> ExtendedContext.divide(Decimal('1'), Decimal('10'))
+ Decimal('0.1')
+ >>> ExtendedContext.divide(Decimal('12'), Decimal('12'))
+ Decimal('1')
+ >>> ExtendedContext.divide(Decimal('8.00'), Decimal('2'))
+ Decimal('4.00')
+ >>> ExtendedContext.divide(Decimal('2.400'), Decimal('2.0'))
+ Decimal('1.20')
+ >>> ExtendedContext.divide(Decimal('1000'), Decimal('100'))
+ Decimal('10')
+ >>> ExtendedContext.divide(Decimal('1000'), Decimal('1'))
+ Decimal('1000')
+ >>> ExtendedContext.divide(Decimal('2.40E+6'), Decimal('2'))
+ Decimal('1.20E+6')
+ >>> ExtendedContext.divide(5, 5)
+ Decimal('1')
+ >>> ExtendedContext.divide(Decimal(5), 5)
+ Decimal('1')
+ >>> ExtendedContext.divide(5, Decimal(5))
+ Decimal('1')
+ """
+ a = _convert_other(a, raiseit=True)
+ r = a.__truediv__(b, context=self)
+ if r is NotImplemented:
+ raise TypeError("Unable to convert %s to Decimal" % b)
+ else:
+ return r
+
+ def divide_int(self, a, b):
+ """Divides two numbers and returns the integer part of the result.
+
+ >>> ExtendedContext.divide_int(Decimal('2'), Decimal('3'))
+ Decimal('0')
+ >>> ExtendedContext.divide_int(Decimal('10'), Decimal('3'))
+ Decimal('3')
+ >>> ExtendedContext.divide_int(Decimal('1'), Decimal('0.3'))
+ Decimal('3')
+ >>> ExtendedContext.divide_int(10, 3)
+ Decimal('3')
+ >>> ExtendedContext.divide_int(Decimal(10), 3)
+ Decimal('3')
+ >>> ExtendedContext.divide_int(10, Decimal(3))
+ Decimal('3')
+ """
+ a = _convert_other(a, raiseit=True)
+ r = a.__floordiv__(b, context=self)
+ if r is NotImplemented:
+ raise TypeError("Unable to convert %s to Decimal" % b)
+ else:
+ return r
+
+ def divmod(self, a, b):
+ """Return (a // b, a % b).
+
+ >>> ExtendedContext.divmod(Decimal(8), Decimal(3))
+ (Decimal('2'), Decimal('2'))
+ >>> ExtendedContext.divmod(Decimal(8), Decimal(4))
+ (Decimal('2'), Decimal('0'))
+ >>> ExtendedContext.divmod(8, 4)
+ (Decimal('2'), Decimal('0'))
+ >>> ExtendedContext.divmod(Decimal(8), 4)
+ (Decimal('2'), Decimal('0'))
+ >>> ExtendedContext.divmod(8, Decimal(4))
+ (Decimal('2'), Decimal('0'))
+ """
+ a = _convert_other(a, raiseit=True)
+ r = a.__divmod__(b, context=self)
+ if r is NotImplemented:
+ raise TypeError("Unable to convert %s to Decimal" % b)
+ else:
+ return r
+
+ def exp(self, a):
+ """Returns e ** a.
+
+ >>> c = ExtendedContext.copy()
+ >>> c.Emin = -999
+ >>> c.Emax = 999
+ >>> c.exp(Decimal('-Infinity'))
+ Decimal('0')
+ >>> c.exp(Decimal('-1'))
+ Decimal('0.367879441')
+ >>> c.exp(Decimal('0'))
+ Decimal('1')
+ >>> c.exp(Decimal('1'))
+ Decimal('2.71828183')
+ >>> c.exp(Decimal('0.693147181'))
+ Decimal('2.00000000')
+ >>> c.exp(Decimal('+Infinity'))
+ Decimal('Infinity')
+ >>> c.exp(10)
+ Decimal('22026.4658')
+ """
+ a =_convert_other(a, raiseit=True)
+ return a.exp(context=self)
+
+ def fma(self, a, b, c):
+ """Returns a multiplied by b, plus c.
+
+ The first two operands are multiplied together, using multiply,
+ the third operand is then added to the result of that
+ multiplication, using add, all with only one final rounding.
+
+ >>> ExtendedContext.fma(Decimal('3'), Decimal('5'), Decimal('7'))
+ Decimal('22')
+ >>> ExtendedContext.fma(Decimal('3'), Decimal('-5'), Decimal('7'))
+ Decimal('-8')
+ >>> ExtendedContext.fma(Decimal('888565290'), Decimal('1557.96930'), Decimal('-86087.7578'))
+ Decimal('1.38435736E+12')
+ >>> ExtendedContext.fma(1, 3, 4)
+ Decimal('7')
+ >>> ExtendedContext.fma(1, Decimal(3), 4)
+ Decimal('7')
+ >>> ExtendedContext.fma(1, 3, Decimal(4))
+ Decimal('7')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.fma(b, c, context=self)
+
+ def is_canonical(self, a):
+ """Return True if the operand is canonical; otherwise return False.
+
+ Currently, the encoding of a Decimal instance is always
+ canonical, so this method returns True for any Decimal.
+
+ >>> ExtendedContext.is_canonical(Decimal('2.50'))
+ True
+ """
+ if not isinstance(a, Decimal):
+ raise TypeError("is_canonical requires a Decimal as an argument.")
+ return a.is_canonical()
+
+ def is_finite(self, a):
+ """Return True if the operand is finite; otherwise return False.
+
+ A Decimal instance is considered finite if it is neither
+ infinite nor a NaN.
+
+ >>> ExtendedContext.is_finite(Decimal('2.50'))
+ True
+ >>> ExtendedContext.is_finite(Decimal('-0.3'))
+ True
+ >>> ExtendedContext.is_finite(Decimal('0'))
+ True
+ >>> ExtendedContext.is_finite(Decimal('Inf'))
+ False
+ >>> ExtendedContext.is_finite(Decimal('NaN'))
+ False
+ >>> ExtendedContext.is_finite(1)
+ True
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.is_finite()
+
+ def is_infinite(self, a):
+ """Return True if the operand is infinite; otherwise return False.
+
+ >>> ExtendedContext.is_infinite(Decimal('2.50'))
+ False
+ >>> ExtendedContext.is_infinite(Decimal('-Inf'))
+ True
+ >>> ExtendedContext.is_infinite(Decimal('NaN'))
+ False
+ >>> ExtendedContext.is_infinite(1)
+ False
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.is_infinite()
+
+ def is_nan(self, a):
+ """Return True if the operand is a qNaN or sNaN;
+ otherwise return False.
+
+ >>> ExtendedContext.is_nan(Decimal('2.50'))
+ False
+ >>> ExtendedContext.is_nan(Decimal('NaN'))
+ True
+ >>> ExtendedContext.is_nan(Decimal('-sNaN'))
+ True
+ >>> ExtendedContext.is_nan(1)
+ False
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.is_nan()
+
+ def is_normal(self, a):
+ """Return True if the operand is a normal number;
+ otherwise return False.
+
+ >>> c = ExtendedContext.copy()
+ >>> c.Emin = -999
+ >>> c.Emax = 999
+ >>> c.is_normal(Decimal('2.50'))
+ True
+ >>> c.is_normal(Decimal('0.1E-999'))
+ False
+ >>> c.is_normal(Decimal('0.00'))
+ False
+ >>> c.is_normal(Decimal('-Inf'))
+ False
+ >>> c.is_normal(Decimal('NaN'))
+ False
+ >>> c.is_normal(1)
+ True
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.is_normal(context=self)
+
+ def is_qnan(self, a):
+ """Return True if the operand is a quiet NaN; otherwise return False.
+
+ >>> ExtendedContext.is_qnan(Decimal('2.50'))
+ False
+ >>> ExtendedContext.is_qnan(Decimal('NaN'))
+ True
+ >>> ExtendedContext.is_qnan(Decimal('sNaN'))
+ False
+ >>> ExtendedContext.is_qnan(1)
+ False
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.is_qnan()
+
+ def is_signed(self, a):
+ """Return True if the operand is negative; otherwise return False.
+
+ >>> ExtendedContext.is_signed(Decimal('2.50'))
+ False
+ >>> ExtendedContext.is_signed(Decimal('-12'))
+ True
+ >>> ExtendedContext.is_signed(Decimal('-0'))
+ True
+ >>> ExtendedContext.is_signed(8)
+ False
+ >>> ExtendedContext.is_signed(-8)
+ True
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.is_signed()
+
+ def is_snan(self, a):
+ """Return True if the operand is a signaling NaN;
+ otherwise return False.
+
+ >>> ExtendedContext.is_snan(Decimal('2.50'))
+ False
+ >>> ExtendedContext.is_snan(Decimal('NaN'))
+ False
+ >>> ExtendedContext.is_snan(Decimal('sNaN'))
+ True
+ >>> ExtendedContext.is_snan(1)
+ False
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.is_snan()
+
+ def is_subnormal(self, a):
+ """Return True if the operand is subnormal; otherwise return False.
+
+ >>> c = ExtendedContext.copy()
+ >>> c.Emin = -999
+ >>> c.Emax = 999
+ >>> c.is_subnormal(Decimal('2.50'))
+ False
+ >>> c.is_subnormal(Decimal('0.1E-999'))
+ True
+ >>> c.is_subnormal(Decimal('0.00'))
+ False
+ >>> c.is_subnormal(Decimal('-Inf'))
+ False
+ >>> c.is_subnormal(Decimal('NaN'))
+ False
+ >>> c.is_subnormal(1)
+ False
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.is_subnormal(context=self)
+
+ def is_zero(self, a):
+ """Return True if the operand is a zero; otherwise return False.
+
+ >>> ExtendedContext.is_zero(Decimal('0'))
+ True
+ >>> ExtendedContext.is_zero(Decimal('2.50'))
+ False
+ >>> ExtendedContext.is_zero(Decimal('-0E+2'))
+ True
+ >>> ExtendedContext.is_zero(1)
+ False
+ >>> ExtendedContext.is_zero(0)
+ True
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.is_zero()
+
+ def ln(self, a):
+ """Returns the natural (base e) logarithm of the operand.
+
+ >>> c = ExtendedContext.copy()
+ >>> c.Emin = -999
+ >>> c.Emax = 999
+ >>> c.ln(Decimal('0'))
+ Decimal('-Infinity')
+ >>> c.ln(Decimal('1.000'))
+ Decimal('0')
+ >>> c.ln(Decimal('2.71828183'))
+ Decimal('1.00000000')
+ >>> c.ln(Decimal('10'))
+ Decimal('2.30258509')
+ >>> c.ln(Decimal('+Infinity'))
+ Decimal('Infinity')
+ >>> c.ln(1)
+ Decimal('0')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.ln(context=self)
+
+ def log10(self, a):
+ """Returns the base 10 logarithm of the operand.
+
+ >>> c = ExtendedContext.copy()
+ >>> c.Emin = -999
+ >>> c.Emax = 999
+ >>> c.log10(Decimal('0'))
+ Decimal('-Infinity')
+ >>> c.log10(Decimal('0.001'))
+ Decimal('-3')
+ >>> c.log10(Decimal('1.000'))
+ Decimal('0')
+ >>> c.log10(Decimal('2'))
+ Decimal('0.301029996')
+ >>> c.log10(Decimal('10'))
+ Decimal('1')
+ >>> c.log10(Decimal('70'))
+ Decimal('1.84509804')
+ >>> c.log10(Decimal('+Infinity'))
+ Decimal('Infinity')
+ >>> c.log10(0)
+ Decimal('-Infinity')
+ >>> c.log10(1)
+ Decimal('0')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.log10(context=self)
+
+ def logb(self, a):
+ """ Returns the exponent of the magnitude of the operand's MSD.
+
+ The result is the integer which is the exponent of the magnitude
+ of the most significant digit of the operand (as though the
+ operand were truncated to a single digit while maintaining the
+ value of that digit and without limiting the resulting exponent).
+
+ >>> ExtendedContext.logb(Decimal('250'))
+ Decimal('2')
+ >>> ExtendedContext.logb(Decimal('2.50'))
+ Decimal('0')
+ >>> ExtendedContext.logb(Decimal('0.03'))
+ Decimal('-2')
+ >>> ExtendedContext.logb(Decimal('0'))
+ Decimal('-Infinity')
+ >>> ExtendedContext.logb(1)
+ Decimal('0')
+ >>> ExtendedContext.logb(10)
+ Decimal('1')
+ >>> ExtendedContext.logb(100)
+ Decimal('2')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.logb(context=self)
+
+ def logical_and(self, a, b):
+ """Applies the logical operation 'and' between each operand's digits.
+
+ The operands must be both logical numbers.
+
+ >>> ExtendedContext.logical_and(Decimal('0'), Decimal('0'))
+ Decimal('0')
+ >>> ExtendedContext.logical_and(Decimal('0'), Decimal('1'))
+ Decimal('0')
+ >>> ExtendedContext.logical_and(Decimal('1'), Decimal('0'))
+ Decimal('0')
+ >>> ExtendedContext.logical_and(Decimal('1'), Decimal('1'))
+ Decimal('1')
+ >>> ExtendedContext.logical_and(Decimal('1100'), Decimal('1010'))
+ Decimal('1000')
+ >>> ExtendedContext.logical_and(Decimal('1111'), Decimal('10'))
+ Decimal('10')
+ >>> ExtendedContext.logical_and(110, 1101)
+ Decimal('100')
+ >>> ExtendedContext.logical_and(Decimal(110), 1101)
+ Decimal('100')
+ >>> ExtendedContext.logical_and(110, Decimal(1101))
+ Decimal('100')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.logical_and(b, context=self)
+
+ def logical_invert(self, a):
+ """Invert all the digits in the operand.
+
+ The operand must be a logical number.
+
+ >>> ExtendedContext.logical_invert(Decimal('0'))
+ Decimal('111111111')
+ >>> ExtendedContext.logical_invert(Decimal('1'))
+ Decimal('111111110')
+ >>> ExtendedContext.logical_invert(Decimal('111111111'))
+ Decimal('0')
+ >>> ExtendedContext.logical_invert(Decimal('101010101'))
+ Decimal('10101010')
+ >>> ExtendedContext.logical_invert(1101)
+ Decimal('111110010')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.logical_invert(context=self)
+
+ def logical_or(self, a, b):
+ """Applies the logical operation 'or' between each operand's digits.
+
+ The operands must be both logical numbers.
+
+ >>> ExtendedContext.logical_or(Decimal('0'), Decimal('0'))
+ Decimal('0')
+ >>> ExtendedContext.logical_or(Decimal('0'), Decimal('1'))
+ Decimal('1')
+ >>> ExtendedContext.logical_or(Decimal('1'), Decimal('0'))
+ Decimal('1')
+ >>> ExtendedContext.logical_or(Decimal('1'), Decimal('1'))
+ Decimal('1')
+ >>> ExtendedContext.logical_or(Decimal('1100'), Decimal('1010'))
+ Decimal('1110')
+ >>> ExtendedContext.logical_or(Decimal('1110'), Decimal('10'))
+ Decimal('1110')
+ >>> ExtendedContext.logical_or(110, 1101)
+ Decimal('1111')
+ >>> ExtendedContext.logical_or(Decimal(110), 1101)
+ Decimal('1111')
+ >>> ExtendedContext.logical_or(110, Decimal(1101))
+ Decimal('1111')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.logical_or(b, context=self)
+
+ def logical_xor(self, a, b):
+ """Applies the logical operation 'xor' between each operand's digits.
+
+ The operands must be both logical numbers.
+
+ >>> ExtendedContext.logical_xor(Decimal('0'), Decimal('0'))
+ Decimal('0')
+ >>> ExtendedContext.logical_xor(Decimal('0'), Decimal('1'))
+ Decimal('1')
+ >>> ExtendedContext.logical_xor(Decimal('1'), Decimal('0'))
+ Decimal('1')
+ >>> ExtendedContext.logical_xor(Decimal('1'), Decimal('1'))
+ Decimal('0')
+ >>> ExtendedContext.logical_xor(Decimal('1100'), Decimal('1010'))
+ Decimal('110')
+ >>> ExtendedContext.logical_xor(Decimal('1111'), Decimal('10'))
+ Decimal('1101')
+ >>> ExtendedContext.logical_xor(110, 1101)
+ Decimal('1011')
+ >>> ExtendedContext.logical_xor(Decimal(110), 1101)
+ Decimal('1011')
+ >>> ExtendedContext.logical_xor(110, Decimal(1101))
+ Decimal('1011')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.logical_xor(b, context=self)
+
+ def max(self, a, b):
+ """max compares two values numerically and returns the maximum.
+
+ If either operand is a NaN then the general rules apply.
+ Otherwise, the operands are compared as though by the compare
+ operation. If they are numerically equal then the left-hand operand
+ is chosen as the result. Otherwise the maximum (closer to positive
+ infinity) of the two operands is chosen as the result.
+
+ >>> ExtendedContext.max(Decimal('3'), Decimal('2'))
+ Decimal('3')
+ >>> ExtendedContext.max(Decimal('-10'), Decimal('3'))
+ Decimal('3')
+ >>> ExtendedContext.max(Decimal('1.0'), Decimal('1'))
+ Decimal('1')
+ >>> ExtendedContext.max(Decimal('7'), Decimal('NaN'))
+ Decimal('7')
+ >>> ExtendedContext.max(1, 2)
+ Decimal('2')
+ >>> ExtendedContext.max(Decimal(1), 2)
+ Decimal('2')
+ >>> ExtendedContext.max(1, Decimal(2))
+ Decimal('2')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.max(b, context=self)
+
+ def max_mag(self, a, b):
+ """Compares the values numerically with their sign ignored.
+
+ >>> ExtendedContext.max_mag(Decimal('7'), Decimal('NaN'))
+ Decimal('7')
+ >>> ExtendedContext.max_mag(Decimal('7'), Decimal('-10'))
+ Decimal('-10')
+ >>> ExtendedContext.max_mag(1, -2)
+ Decimal('-2')
+ >>> ExtendedContext.max_mag(Decimal(1), -2)
+ Decimal('-2')
+ >>> ExtendedContext.max_mag(1, Decimal(-2))
+ Decimal('-2')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.max_mag(b, context=self)
+
+ def min(self, a, b):
+ """min compares two values numerically and returns the minimum.
+
+ If either operand is a NaN then the general rules apply.
+ Otherwise, the operands are compared as though by the compare
+ operation. If they are numerically equal then the left-hand operand
+ is chosen as the result. Otherwise the minimum (closer to negative
+ infinity) of the two operands is chosen as the result.
+
+ >>> ExtendedContext.min(Decimal('3'), Decimal('2'))
+ Decimal('2')
+ >>> ExtendedContext.min(Decimal('-10'), Decimal('3'))
+ Decimal('-10')
+ >>> ExtendedContext.min(Decimal('1.0'), Decimal('1'))
+ Decimal('1.0')
+ >>> ExtendedContext.min(Decimal('7'), Decimal('NaN'))
+ Decimal('7')
+ >>> ExtendedContext.min(1, 2)
+ Decimal('1')
+ >>> ExtendedContext.min(Decimal(1), 2)
+ Decimal('1')
+ >>> ExtendedContext.min(1, Decimal(29))
+ Decimal('1')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.min(b, context=self)
+
+ def min_mag(self, a, b):
+ """Compares the values numerically with their sign ignored.
+
+ >>> ExtendedContext.min_mag(Decimal('3'), Decimal('-2'))
+ Decimal('-2')
+ >>> ExtendedContext.min_mag(Decimal('-3'), Decimal('NaN'))
+ Decimal('-3')
+ >>> ExtendedContext.min_mag(1, -2)
+ Decimal('1')
+ >>> ExtendedContext.min_mag(Decimal(1), -2)
+ Decimal('1')
+ >>> ExtendedContext.min_mag(1, Decimal(-2))
+ Decimal('1')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.min_mag(b, context=self)
+
+ def minus(self, a):
+ """Minus corresponds to unary prefix minus in Python.
+
+ The operation is evaluated using the same rules as subtract; the
+ operation minus(a) is calculated as subtract('0', a) where the '0'
+ has the same exponent as the operand.
+
+ >>> ExtendedContext.minus(Decimal('1.3'))
+ Decimal('-1.3')
+ >>> ExtendedContext.minus(Decimal('-1.3'))
+ Decimal('1.3')
+ >>> ExtendedContext.minus(1)
+ Decimal('-1')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.__neg__(context=self)
+
+ def multiply(self, a, b):
+ """multiply multiplies two operands.
+
+ If either operand is a special value then the general rules apply.
+ Otherwise, the operands are multiplied together
+ ('long multiplication'), resulting in a number which may be as long as
+ the sum of the lengths of the two operands.
+
+ >>> ExtendedContext.multiply(Decimal('1.20'), Decimal('3'))
+ Decimal('3.60')
+ >>> ExtendedContext.multiply(Decimal('7'), Decimal('3'))
+ Decimal('21')
+ >>> ExtendedContext.multiply(Decimal('0.9'), Decimal('0.8'))
+ Decimal('0.72')
+ >>> ExtendedContext.multiply(Decimal('0.9'), Decimal('-0'))
+ Decimal('-0.0')
+ >>> ExtendedContext.multiply(Decimal('654321'), Decimal('654321'))
+ Decimal('4.28135971E+11')
+ >>> ExtendedContext.multiply(7, 7)
+ Decimal('49')
+ >>> ExtendedContext.multiply(Decimal(7), 7)
+ Decimal('49')
+ >>> ExtendedContext.multiply(7, Decimal(7))
+ Decimal('49')
+ """
+ a = _convert_other(a, raiseit=True)
+ r = a.__mul__(b, context=self)
+ if r is NotImplemented:
+ raise TypeError("Unable to convert %s to Decimal" % b)
+ else:
+ return r
+
+ def next_minus(self, a):
+ """Returns the largest representable number smaller than a.
+
+ >>> c = ExtendedContext.copy()
+ >>> c.Emin = -999
+ >>> c.Emax = 999
+ >>> ExtendedContext.next_minus(Decimal('1'))
+ Decimal('0.999999999')
+ >>> c.next_minus(Decimal('1E-1007'))
+ Decimal('0E-1007')
+ >>> ExtendedContext.next_minus(Decimal('-1.00000003'))
+ Decimal('-1.00000004')
+ >>> c.next_minus(Decimal('Infinity'))
+ Decimal('9.99999999E+999')
+ >>> c.next_minus(1)
+ Decimal('0.999999999')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.next_minus(context=self)
+
+ def next_plus(self, a):
+ """Returns the smallest representable number larger than a.
+
+ >>> c = ExtendedContext.copy()
+ >>> c.Emin = -999
+ >>> c.Emax = 999
+ >>> ExtendedContext.next_plus(Decimal('1'))
+ Decimal('1.00000001')
+ >>> c.next_plus(Decimal('-1E-1007'))
+ Decimal('-0E-1007')
+ >>> ExtendedContext.next_plus(Decimal('-1.00000003'))
+ Decimal('-1.00000002')
+ >>> c.next_plus(Decimal('-Infinity'))
+ Decimal('-9.99999999E+999')
+ >>> c.next_plus(1)
+ Decimal('1.00000001')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.next_plus(context=self)
+
+ def next_toward(self, a, b):
+ """Returns the number closest to a, in direction towards b.
+
+ The result is the closest representable number from the first
+ operand (but not the first operand) that is in the direction
+ towards the second operand, unless the operands have the same
+ value.
+
+ >>> c = ExtendedContext.copy()
+ >>> c.Emin = -999
+ >>> c.Emax = 999
+ >>> c.next_toward(Decimal('1'), Decimal('2'))
+ Decimal('1.00000001')
+ >>> c.next_toward(Decimal('-1E-1007'), Decimal('1'))
+ Decimal('-0E-1007')
+ >>> c.next_toward(Decimal('-1.00000003'), Decimal('0'))
+ Decimal('-1.00000002')
+ >>> c.next_toward(Decimal('1'), Decimal('0'))
+ Decimal('0.999999999')
+ >>> c.next_toward(Decimal('1E-1007'), Decimal('-100'))
+ Decimal('0E-1007')
+ >>> c.next_toward(Decimal('-1.00000003'), Decimal('-10'))
+ Decimal('-1.00000004')
+ >>> c.next_toward(Decimal('0.00'), Decimal('-0.0000'))
+ Decimal('-0.00')
+ >>> c.next_toward(0, 1)
+ Decimal('1E-1007')
+ >>> c.next_toward(Decimal(0), 1)
+ Decimal('1E-1007')
+ >>> c.next_toward(0, Decimal(1))
+ Decimal('1E-1007')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.next_toward(b, context=self)
+
+ def normalize(self, a):
+ """normalize reduces an operand to its simplest form.
+
+ Essentially a plus operation with all trailing zeros removed from the
+ result.
+
+ >>> ExtendedContext.normalize(Decimal('2.1'))
+ Decimal('2.1')
+ >>> ExtendedContext.normalize(Decimal('-2.0'))
+ Decimal('-2')
+ >>> ExtendedContext.normalize(Decimal('1.200'))
+ Decimal('1.2')
+ >>> ExtendedContext.normalize(Decimal('-120'))
+ Decimal('-1.2E+2')
+ >>> ExtendedContext.normalize(Decimal('120.00'))
+ Decimal('1.2E+2')
+ >>> ExtendedContext.normalize(Decimal('0.00'))
+ Decimal('0')
+ >>> ExtendedContext.normalize(6)
+ Decimal('6')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.normalize(context=self)
+
+ def number_class(self, a):
+ """Returns an indication of the class of the operand.
+
+ The class is one of the following strings:
+ -sNaN
+ -NaN
+ -Infinity
+ -Normal
+ -Subnormal
+ -Zero
+ +Zero
+ +Subnormal
+ +Normal
+ +Infinity
+
+ >>> c = ExtendedContext.copy()
+ >>> c.Emin = -999
+ >>> c.Emax = 999
+ >>> c.number_class(Decimal('Infinity'))
+ '+Infinity'
+ >>> c.number_class(Decimal('1E-10'))
+ '+Normal'
+ >>> c.number_class(Decimal('2.50'))
+ '+Normal'
+ >>> c.number_class(Decimal('0.1E-999'))
+ '+Subnormal'
+ >>> c.number_class(Decimal('0'))
+ '+Zero'
+ >>> c.number_class(Decimal('-0'))
+ '-Zero'
+ >>> c.number_class(Decimal('-0.1E-999'))
+ '-Subnormal'
+ >>> c.number_class(Decimal('-1E-10'))
+ '-Normal'
+ >>> c.number_class(Decimal('-2.50'))
+ '-Normal'
+ >>> c.number_class(Decimal('-Infinity'))
+ '-Infinity'
+ >>> c.number_class(Decimal('NaN'))
+ 'NaN'
+ >>> c.number_class(Decimal('-NaN'))
+ 'NaN'
+ >>> c.number_class(Decimal('sNaN'))
+ 'sNaN'
+ >>> c.number_class(123)
+ '+Normal'
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.number_class(context=self)
+
+ def plus(self, a):
+ """Plus corresponds to unary prefix plus in Python.
+
+ The operation is evaluated using the same rules as add; the
+ operation plus(a) is calculated as add('0', a) where the '0'
+ has the same exponent as the operand.
+
+ >>> ExtendedContext.plus(Decimal('1.3'))
+ Decimal('1.3')
+ >>> ExtendedContext.plus(Decimal('-1.3'))
+ Decimal('-1.3')
+ >>> ExtendedContext.plus(-1)
+ Decimal('-1')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.__pos__(context=self)
+
+ def power(self, a, b, modulo=None):
+ """Raises a to the power of b, to modulo if given.
+
+ With two arguments, compute a**b. If a is negative then b
+ must be integral. The result will be inexact unless b is
+ integral and the result is finite and can be expressed exactly
+ in 'precision' digits.
+
+ With three arguments, compute (a**b) % modulo. For the
+ three argument form, the following restrictions on the
+ arguments hold:
+
+ - all three arguments must be integral
+ - b must be nonnegative
+ - at least one of a or b must be nonzero
+ - modulo must be nonzero and have at most 'precision' digits
+
+ The result of pow(a, b, modulo) is identical to the result
+ that would be obtained by computing (a**b) % modulo with
+ unbounded precision, but is computed more efficiently. It is
+ always exact.
+
+ >>> c = ExtendedContext.copy()
+ >>> c.Emin = -999
+ >>> c.Emax = 999
+ >>> c.power(Decimal('2'), Decimal('3'))
+ Decimal('8')
+ >>> c.power(Decimal('-2'), Decimal('3'))
+ Decimal('-8')
+ >>> c.power(Decimal('2'), Decimal('-3'))
+ Decimal('0.125')
+ >>> c.power(Decimal('1.7'), Decimal('8'))
+ Decimal('69.7575744')
+ >>> c.power(Decimal('10'), Decimal('0.301029996'))
+ Decimal('2.00000000')
+ >>> c.power(Decimal('Infinity'), Decimal('-1'))
+ Decimal('0')
+ >>> c.power(Decimal('Infinity'), Decimal('0'))
+ Decimal('1')
+ >>> c.power(Decimal('Infinity'), Decimal('1'))
+ Decimal('Infinity')
+ >>> c.power(Decimal('-Infinity'), Decimal('-1'))
+ Decimal('-0')
+ >>> c.power(Decimal('-Infinity'), Decimal('0'))
+ Decimal('1')
+ >>> c.power(Decimal('-Infinity'), Decimal('1'))
+ Decimal('-Infinity')
+ >>> c.power(Decimal('-Infinity'), Decimal('2'))
+ Decimal('Infinity')
+ >>> c.power(Decimal('0'), Decimal('0'))
+ Decimal('NaN')
+
+ >>> c.power(Decimal('3'), Decimal('7'), Decimal('16'))
+ Decimal('11')
+ >>> c.power(Decimal('-3'), Decimal('7'), Decimal('16'))
+ Decimal('-11')
+ >>> c.power(Decimal('-3'), Decimal('8'), Decimal('16'))
+ Decimal('1')
+ >>> c.power(Decimal('3'), Decimal('7'), Decimal('-16'))
+ Decimal('11')
+ >>> c.power(Decimal('23E12345'), Decimal('67E189'), Decimal('123456789'))
+ Decimal('11729830')
+ >>> c.power(Decimal('-0'), Decimal('17'), Decimal('1729'))
+ Decimal('-0')
+ >>> c.power(Decimal('-23'), Decimal('0'), Decimal('65537'))
+ Decimal('1')
+ >>> ExtendedContext.power(7, 7)
+ Decimal('823543')
+ >>> ExtendedContext.power(Decimal(7), 7)
+ Decimal('823543')
+ >>> ExtendedContext.power(7, Decimal(7), 2)
+ Decimal('1')
+ """
+ a = _convert_other(a, raiseit=True)
+ r = a.__pow__(b, modulo, context=self)
+ if r is NotImplemented:
+ raise TypeError("Unable to convert %s to Decimal" % b)
+ else:
+ return r
+
+ def quantize(self, a, b):
+ """Returns a value equal to 'a' (rounded), having the exponent of 'b'.
+
+ The coefficient of the result is derived from that of the left-hand
+ operand. It may be rounded using the current rounding setting (if the
+ exponent is being increased), multiplied by a positive power of ten (if
+ the exponent is being decreased), or is unchanged (if the exponent is
+ already equal to that of the right-hand operand).
+
+ Unlike other operations, if the length of the coefficient after the
+ quantize operation would be greater than precision then an Invalid
+ operation condition is raised. This guarantees that, unless there is
+ an error condition, the exponent of the result of a quantize is always
+ equal to that of the right-hand operand.
+
+ Also unlike other operations, quantize will never raise Underflow, even
+ if the result is subnormal and inexact.
+
+ >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('0.001'))
+ Decimal('2.170')
+ >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('0.01'))
+ Decimal('2.17')
+ >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('0.1'))
+ Decimal('2.2')
+ >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('1e+0'))
+ Decimal('2')
+ >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('1e+1'))
+ Decimal('0E+1')
+ >>> ExtendedContext.quantize(Decimal('-Inf'), Decimal('Infinity'))
+ Decimal('-Infinity')
+ >>> ExtendedContext.quantize(Decimal('2'), Decimal('Infinity'))
+ Decimal('NaN')
+ >>> ExtendedContext.quantize(Decimal('-0.1'), Decimal('1'))
+ Decimal('-0')
+ >>> ExtendedContext.quantize(Decimal('-0'), Decimal('1e+5'))
+ Decimal('-0E+5')
+ >>> ExtendedContext.quantize(Decimal('+35236450.6'), Decimal('1e-2'))
+ Decimal('NaN')
+ >>> ExtendedContext.quantize(Decimal('-35236450.6'), Decimal('1e-2'))
+ Decimal('NaN')
+ >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e-1'))
+ Decimal('217.0')
+ >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e-0'))
+ Decimal('217')
+ >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e+1'))
+ Decimal('2.2E+2')
+ >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e+2'))
+ Decimal('2E+2')
+ >>> ExtendedContext.quantize(1, 2)
+ Decimal('1')
+ >>> ExtendedContext.quantize(Decimal(1), 2)
+ Decimal('1')
+ >>> ExtendedContext.quantize(1, Decimal(2))
+ Decimal('1')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.quantize(b, context=self)
+
+ def radix(self):
+ """Just returns 10, as this is Decimal, :)
+
+ >>> ExtendedContext.radix()
+ Decimal('10')
+ """
+ return Decimal(10)
+
+ def remainder(self, a, b):
+ """Returns the remainder from integer division.
+
+ The result is the residue of the dividend after the operation of
+ calculating integer division as described for divide-integer, rounded
+ to precision digits if necessary. The sign of the result, if
+ non-zero, is the same as that of the original dividend.
+
+ This operation will fail under the same conditions as integer division
+ (that is, if integer division on the same two operands would fail, the
+ remainder cannot be calculated).
+
+ >>> ExtendedContext.remainder(Decimal('2.1'), Decimal('3'))
+ Decimal('2.1')
+ >>> ExtendedContext.remainder(Decimal('10'), Decimal('3'))
+ Decimal('1')
+ >>> ExtendedContext.remainder(Decimal('-10'), Decimal('3'))
+ Decimal('-1')
+ >>> ExtendedContext.remainder(Decimal('10.2'), Decimal('1'))
+ Decimal('0.2')
+ >>> ExtendedContext.remainder(Decimal('10'), Decimal('0.3'))
+ Decimal('0.1')
+ >>> ExtendedContext.remainder(Decimal('3.6'), Decimal('1.3'))
+ Decimal('1.0')
+ >>> ExtendedContext.remainder(22, 6)
+ Decimal('4')
+ >>> ExtendedContext.remainder(Decimal(22), 6)
+ Decimal('4')
+ >>> ExtendedContext.remainder(22, Decimal(6))
+ Decimal('4')
+ """
+ a = _convert_other(a, raiseit=True)
+ r = a.__mod__(b, context=self)
+ if r is NotImplemented:
+ raise TypeError("Unable to convert %s to Decimal" % b)
+ else:
+ return r
+
+ def remainder_near(self, a, b):
+ """Returns to be "a - b * n", where n is the integer nearest the exact
+ value of "x / b" (if two integers are equally near then the even one
+ is chosen). If the result is equal to 0 then its sign will be the
+ sign of a.
+
+ This operation will fail under the same conditions as integer division
+ (that is, if integer division on the same two operands would fail, the
+ remainder cannot be calculated).
+
+ >>> ExtendedContext.remainder_near(Decimal('2.1'), Decimal('3'))
+ Decimal('-0.9')
+ >>> ExtendedContext.remainder_near(Decimal('10'), Decimal('6'))
+ Decimal('-2')
+ >>> ExtendedContext.remainder_near(Decimal('10'), Decimal('3'))
+ Decimal('1')
+ >>> ExtendedContext.remainder_near(Decimal('-10'), Decimal('3'))
+ Decimal('-1')
+ >>> ExtendedContext.remainder_near(Decimal('10.2'), Decimal('1'))
+ Decimal('0.2')
+ >>> ExtendedContext.remainder_near(Decimal('10'), Decimal('0.3'))
+ Decimal('0.1')
+ >>> ExtendedContext.remainder_near(Decimal('3.6'), Decimal('1.3'))
+ Decimal('-0.3')
+ >>> ExtendedContext.remainder_near(3, 11)
+ Decimal('3')
+ >>> ExtendedContext.remainder_near(Decimal(3), 11)
+ Decimal('3')
+ >>> ExtendedContext.remainder_near(3, Decimal(11))
+ Decimal('3')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.remainder_near(b, context=self)
+
+ def rotate(self, a, b):
+ """Returns a rotated copy of a, b times.
+
+ The coefficient of the result is a rotated copy of the digits in
+ the coefficient of the first operand. The number of places of
+ rotation is taken from the absolute value of the second operand,
+ with the rotation being to the left if the second operand is
+ positive or to the right otherwise.
+
+ >>> ExtendedContext.rotate(Decimal('34'), Decimal('8'))
+ Decimal('400000003')
+ >>> ExtendedContext.rotate(Decimal('12'), Decimal('9'))
+ Decimal('12')
+ >>> ExtendedContext.rotate(Decimal('123456789'), Decimal('-2'))
+ Decimal('891234567')
+ >>> ExtendedContext.rotate(Decimal('123456789'), Decimal('0'))
+ Decimal('123456789')
+ >>> ExtendedContext.rotate(Decimal('123456789'), Decimal('+2'))
+ Decimal('345678912')
+ >>> ExtendedContext.rotate(1333333, 1)
+ Decimal('13333330')
+ >>> ExtendedContext.rotate(Decimal(1333333), 1)
+ Decimal('13333330')
+ >>> ExtendedContext.rotate(1333333, Decimal(1))
+ Decimal('13333330')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.rotate(b, context=self)
+
+ def same_quantum(self, a, b):
+ """Returns True if the two operands have the same exponent.
+
+ The result is never affected by either the sign or the coefficient of
+ either operand.
+
+ >>> ExtendedContext.same_quantum(Decimal('2.17'), Decimal('0.001'))
+ False
+ >>> ExtendedContext.same_quantum(Decimal('2.17'), Decimal('0.01'))
+ True
+ >>> ExtendedContext.same_quantum(Decimal('2.17'), Decimal('1'))
+ False
+ >>> ExtendedContext.same_quantum(Decimal('Inf'), Decimal('-Inf'))
+ True
+ >>> ExtendedContext.same_quantum(10000, -1)
+ True
+ >>> ExtendedContext.same_quantum(Decimal(10000), -1)
+ True
+ >>> ExtendedContext.same_quantum(10000, Decimal(-1))
+ True
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.same_quantum(b)
+
+ def scaleb (self, a, b):
+ """Returns the first operand after adding the second value its exp.
+
+ >>> ExtendedContext.scaleb(Decimal('7.50'), Decimal('-2'))
+ Decimal('0.0750')
+ >>> ExtendedContext.scaleb(Decimal('7.50'), Decimal('0'))
+ Decimal('7.50')
+ >>> ExtendedContext.scaleb(Decimal('7.50'), Decimal('3'))
+ Decimal('7.50E+3')
+ >>> ExtendedContext.scaleb(1, 4)
+ Decimal('1E+4')
+ >>> ExtendedContext.scaleb(Decimal(1), 4)
+ Decimal('1E+4')
+ >>> ExtendedContext.scaleb(1, Decimal(4))
+ Decimal('1E+4')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.scaleb(b, context=self)
+
+ def shift(self, a, b):
+ """Returns a shifted copy of a, b times.
+
+ The coefficient of the result is a shifted copy of the digits
+ in the coefficient of the first operand. The number of places
+ to shift is taken from the absolute value of the second operand,
+ with the shift being to the left if the second operand is
+ positive or to the right otherwise. Digits shifted into the
+ coefficient are zeros.
+
+ >>> ExtendedContext.shift(Decimal('34'), Decimal('8'))
+ Decimal('400000000')
+ >>> ExtendedContext.shift(Decimal('12'), Decimal('9'))
+ Decimal('0')
+ >>> ExtendedContext.shift(Decimal('123456789'), Decimal('-2'))
+ Decimal('1234567')
+ >>> ExtendedContext.shift(Decimal('123456789'), Decimal('0'))
+ Decimal('123456789')
+ >>> ExtendedContext.shift(Decimal('123456789'), Decimal('+2'))
+ Decimal('345678900')
+ >>> ExtendedContext.shift(88888888, 2)
+ Decimal('888888800')
+ >>> ExtendedContext.shift(Decimal(88888888), 2)
+ Decimal('888888800')
+ >>> ExtendedContext.shift(88888888, Decimal(2))
+ Decimal('888888800')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.shift(b, context=self)
+
+ def sqrt(self, a):
+ """Square root of a non-negative number to context precision.
+
+ If the result must be inexact, it is rounded using the round-half-even
+ algorithm.
+
+ >>> ExtendedContext.sqrt(Decimal('0'))
+ Decimal('0')
+ >>> ExtendedContext.sqrt(Decimal('-0'))
+ Decimal('-0')
+ >>> ExtendedContext.sqrt(Decimal('0.39'))
+ Decimal('0.624499800')
+ >>> ExtendedContext.sqrt(Decimal('100'))
+ Decimal('10')
+ >>> ExtendedContext.sqrt(Decimal('1'))
+ Decimal('1')
+ >>> ExtendedContext.sqrt(Decimal('1.0'))
+ Decimal('1.0')
+ >>> ExtendedContext.sqrt(Decimal('1.00'))
+ Decimal('1.0')
+ >>> ExtendedContext.sqrt(Decimal('7'))
+ Decimal('2.64575131')
+ >>> ExtendedContext.sqrt(Decimal('10'))
+ Decimal('3.16227766')
+ >>> ExtendedContext.sqrt(2)
+ Decimal('1.41421356')
+ >>> ExtendedContext.prec
+ 9
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.sqrt(context=self)
+
+ def subtract(self, a, b):
+ """Return the difference between the two operands.
+
+ >>> ExtendedContext.subtract(Decimal('1.3'), Decimal('1.07'))
+ Decimal('0.23')
+ >>> ExtendedContext.subtract(Decimal('1.3'), Decimal('1.30'))
+ Decimal('0.00')
+ >>> ExtendedContext.subtract(Decimal('1.3'), Decimal('2.07'))
+ Decimal('-0.77')
+ >>> ExtendedContext.subtract(8, 5)
+ Decimal('3')
+ >>> ExtendedContext.subtract(Decimal(8), 5)
+ Decimal('3')
+ >>> ExtendedContext.subtract(8, Decimal(5))
+ Decimal('3')
+ """
+ a = _convert_other(a, raiseit=True)
+ r = a.__sub__(b, context=self)
+ if r is NotImplemented:
+ raise TypeError("Unable to convert %s to Decimal" % b)
+ else:
+ return r
+
+ def to_eng_string(self, a):
+ """Converts a number to a string, using scientific notation.
+
+ The operation is not affected by the context.
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.to_eng_string(context=self)
+
+ def to_sci_string(self, a):
+ """Converts a number to a string, using scientific notation.
+
+ The operation is not affected by the context.
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.__str__(context=self)
+
+ def to_integral_exact(self, a):
+ """Rounds to an integer.
+
+ When the operand has a negative exponent, the result is the same
+ as using the quantize() operation using the given operand as the
+ left-hand-operand, 1E+0 as the right-hand-operand, and the precision
+ of the operand as the precision setting; Inexact and Rounded flags
+ are allowed in this operation. The rounding mode is taken from the
+ context.
+
+ >>> ExtendedContext.to_integral_exact(Decimal('2.1'))
+ Decimal('2')
+ >>> ExtendedContext.to_integral_exact(Decimal('100'))
+ Decimal('100')
+ >>> ExtendedContext.to_integral_exact(Decimal('100.0'))
+ Decimal('100')
+ >>> ExtendedContext.to_integral_exact(Decimal('101.5'))
+ Decimal('102')
+ >>> ExtendedContext.to_integral_exact(Decimal('-101.5'))
+ Decimal('-102')
+ >>> ExtendedContext.to_integral_exact(Decimal('10E+5'))
+ Decimal('1.0E+6')
+ >>> ExtendedContext.to_integral_exact(Decimal('7.89E+77'))
+ Decimal('7.89E+77')
+ >>> ExtendedContext.to_integral_exact(Decimal('-Inf'))
+ Decimal('-Infinity')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.to_integral_exact(context=self)
+
+ def to_integral_value(self, a):
+ """Rounds to an integer.
+
+ When the operand has a negative exponent, the result is the same
+ as using the quantize() operation using the given operand as the
+ left-hand-operand, 1E+0 as the right-hand-operand, and the precision
+ of the operand as the precision setting, except that no flags will
+ be set. The rounding mode is taken from the context.
+
+ >>> ExtendedContext.to_integral_value(Decimal('2.1'))
+ Decimal('2')
+ >>> ExtendedContext.to_integral_value(Decimal('100'))
+ Decimal('100')
+ >>> ExtendedContext.to_integral_value(Decimal('100.0'))
+ Decimal('100')
+ >>> ExtendedContext.to_integral_value(Decimal('101.5'))
+ Decimal('102')
+ >>> ExtendedContext.to_integral_value(Decimal('-101.5'))
+ Decimal('-102')
+ >>> ExtendedContext.to_integral_value(Decimal('10E+5'))
+ Decimal('1.0E+6')
+ >>> ExtendedContext.to_integral_value(Decimal('7.89E+77'))
+ Decimal('7.89E+77')
+ >>> ExtendedContext.to_integral_value(Decimal('-Inf'))
+ Decimal('-Infinity')
+ """
+ a = _convert_other(a, raiseit=True)
+ return a.to_integral_value(context=self)
+
+ # the method name changed, but we provide also the old one, for compatibility
+ to_integral = to_integral_value
+
+class _WorkRep(object):
+ __slots__ = ('sign','int','exp')
+ # sign: 0 or 1
+ # int: int
+ # exp: None, int, or string
+
+ def __init__(self, value=None):
+ if value is None:
+ self.sign = None
+ self.int = 0
+ self.exp = None
+ elif isinstance(value, Decimal):
+ self.sign = value._sign
+ self.int = int(value._int)
+ self.exp = value._exp
+ else:
+ # assert isinstance(value, tuple)
+ self.sign = value[0]
+ self.int = value[1]
+ self.exp = value[2]
+
+ def __repr__(self):
+ return "(%r, %r, %r)" % (self.sign, self.int, self.exp)
+
+ __str__ = __repr__
+
+
+
+def _normalize(op1, op2, prec = 0):
+ """Normalizes op1, op2 to have the same exp and length of coefficient.
+
+ Done during addition.
+ """
+ if op1.exp < op2.exp:
+ tmp = op2
+ other = op1
+ else:
+ tmp = op1
+ other = op2
+
+ # Let exp = min(tmp.exp - 1, tmp.adjusted() - precision - 1).
+ # Then adding 10**exp to tmp has the same effect (after rounding)
+ # as adding any positive quantity smaller than 10**exp; similarly
+ # for subtraction. So if other is smaller than 10**exp we replace
+ # it with 10**exp. This avoids tmp.exp - other.exp getting too large.
+ tmp_len = len(str(tmp.int))
+ other_len = len(str(other.int))
+ exp = tmp.exp + min(-1, tmp_len - prec - 2)
+ if other_len + other.exp - 1 < exp:
+ other.int = 1
+ other.exp = exp
+
+ tmp.int *= 10 ** (tmp.exp - other.exp)
+ tmp.exp = other.exp
+ return op1, op2
+
+##### Integer arithmetic functions used by ln, log10, exp and __pow__ #####
+
+_nbits = int.bit_length
+
+def _decimal_lshift_exact(n, e):
+ """ Given integers n and e, return n * 10**e if it's an integer, else None.
+
+ The computation is designed to avoid computing large powers of 10
+ unnecessarily.
+
+ >>> _decimal_lshift_exact(3, 4)
+ 30000
+ >>> _decimal_lshift_exact(300, -999999999) # returns None
+
+ """
+ if n == 0:
+ return 0
+ elif e >= 0:
+ return n * 10**e
+ else:
+ # val_n = largest power of 10 dividing n.
+ str_n = str(abs(n))
+ val_n = len(str_n) - len(str_n.rstrip('0'))
+ return None if val_n < -e else n // 10**-e
+
+def _sqrt_nearest(n, a):
+ """Closest integer to the square root of the positive integer n. a is
+ an initial approximation to the square root. Any positive integer
+ will do for a, but the closer a is to the square root of n the
+ faster convergence will be.
+
+ """
+ if n <= 0 or a <= 0:
+ raise ValueError("Both arguments to _sqrt_nearest should be positive.")
+
+ b=0
+ while a != b:
+ b, a = a, a--n//a>>1
+ return a
+
+def _rshift_nearest(x, shift):
+ """Given an integer x and a nonnegative integer shift, return closest
+ integer to x / 2**shift; use round-to-even in case of a tie.
+
+ """
+ b, q = 1 << shift, x >> shift
+ return q + (2*(x & (b-1)) + (q&1) > b)
+
+def _div_nearest(a, b):
+ """Closest integer to a/b, a and b positive integers; rounds to even
+ in the case of a tie.
+
+ """
+ q, r = divmod(a, b)
+ return q + (2*r + (q&1) > b)
+
+def _ilog(x, M, L = 8):
+ """Integer approximation to M*log(x/M), with absolute error boundable
+ in terms only of x/M.
+
+ Given positive integers x and M, return an integer approximation to
+ M * log(x/M). For L = 8 and 0.1 <= x/M <= 10 the difference
+ between the approximation and the exact result is at most 22. For
+ L = 8 and 1.0 <= x/M <= 10.0 the difference is at most 15. In
+ both cases these are upper bounds on the error; it will usually be
+ much smaller."""
+
+ # The basic algorithm is the following: let log1p be the function
+ # log1p(x) = log(1+x). Then log(x/M) = log1p((x-M)/M). We use
+ # the reduction
+ #
+ # log1p(y) = 2*log1p(y/(1+sqrt(1+y)))
+ #
+ # repeatedly until the argument to log1p is small (< 2**-L in
+ # absolute value). For small y we can use the Taylor series
+ # expansion
+ #
+ # log1p(y) ~ y - y**2/2 + y**3/3 - ... - (-y)**T/T
+ #
+ # truncating at T such that y**T is small enough. The whole
+ # computation is carried out in a form of fixed-point arithmetic,
+ # with a real number z being represented by an integer
+ # approximation to z*M. To avoid loss of precision, the y below
+ # is actually an integer approximation to 2**R*y*M, where R is the
+ # number of reductions performed so far.
+
+ y = x-M
+ # argument reduction; R = number of reductions performed
+ R = 0
+ while (R <= L and abs(y) << L-R >= M or
+ R > L and abs(y) >> R-L >= M):
+ y = _div_nearest((M*y) << 1,
+ M + _sqrt_nearest(M*(M+_rshift_nearest(y, R)), M))
+ R += 1
+
+ # Taylor series with T terms
+ T = -int(-10*len(str(M))//(3*L))
+ yshift = _rshift_nearest(y, R)
+ w = _div_nearest(M, T)
+ for k in range(T-1, 0, -1):
+ w = _div_nearest(M, k) - _div_nearest(yshift*w, M)
+
+ return _div_nearest(w*y, M)
+
+def _dlog10(c, e, p):
+ """Given integers c, e and p with c > 0, p >= 0, compute an integer
+ approximation to 10**p * log10(c*10**e), with an absolute error of
+ at most 1. Assumes that c*10**e is not exactly 1."""
+
+ # increase precision by 2; compensate for this by dividing
+ # final result by 100
+ p += 2
+
+ # write c*10**e as d*10**f with either:
+ # f >= 0 and 1 <= d <= 10, or
+ # f <= 0 and 0.1 <= d <= 1.
+ # Thus for c*10**e close to 1, f = 0
+ l = len(str(c))
+ f = e+l - (e+l >= 1)
+
+ if p > 0:
+ M = 10**p
+ k = e+p-f
+ if k >= 0:
+ c *= 10**k
+ else:
+ c = _div_nearest(c, 10**-k)
+
+ log_d = _ilog(c, M) # error < 5 + 22 = 27
+ log_10 = _log10_digits(p) # error < 1
+ log_d = _div_nearest(log_d*M, log_10)
+ log_tenpower = f*M # exact
+ else:
+ log_d = 0 # error < 2.31
+ log_tenpower = _div_nearest(f, 10**-p) # error < 0.5
+
+ return _div_nearest(log_tenpower+log_d, 100)
+
+def _dlog(c, e, p):
+ """Given integers c, e and p with c > 0, compute an integer
+ approximation to 10**p * log(c*10**e), with an absolute error of
+ at most 1. Assumes that c*10**e is not exactly 1."""
+
+ # Increase precision by 2. The precision increase is compensated
+ # for at the end with a division by 100.
+ p += 2
+
+ # rewrite c*10**e as d*10**f with either f >= 0 and 1 <= d <= 10,
+ # or f <= 0 and 0.1 <= d <= 1. Then we can compute 10**p * log(c*10**e)
+ # as 10**p * log(d) + 10**p*f * log(10).
+ l = len(str(c))
+ f = e+l - (e+l >= 1)
+
+ # compute approximation to 10**p*log(d), with error < 27
+ if p > 0:
+ k = e+p-f
+ if k >= 0:
+ c *= 10**k
+ else:
+ c = _div_nearest(c, 10**-k) # error of <= 0.5 in c
+
+ # _ilog magnifies existing error in c by a factor of at most 10
+ log_d = _ilog(c, 10**p) # error < 5 + 22 = 27
+ else:
+ # p <= 0: just approximate the whole thing by 0; error < 2.31
+ log_d = 0
+
+ # compute approximation to f*10**p*log(10), with error < 11.
+ if f:
+ extra = len(str(abs(f)))-1
+ if p + extra >= 0:
+ # error in f * _log10_digits(p+extra) < |f| * 1 = |f|
+ # after division, error < |f|/10**extra + 0.5 < 10 + 0.5 < 11
+ f_log_ten = _div_nearest(f*_log10_digits(p+extra), 10**extra)
+ else:
+ f_log_ten = 0
+ else:
+ f_log_ten = 0
+
+ # error in sum < 11+27 = 38; error after division < 0.38 + 0.5 < 1
+ return _div_nearest(f_log_ten + log_d, 100)
+
+class _Log10Memoize(object):
+ """Class to compute, store, and allow retrieval of, digits of the
+ constant log(10) = 2.302585.... This constant is needed by
+ Decimal.ln, Decimal.log10, Decimal.exp and Decimal.__pow__."""
+ def __init__(self):
+ self.digits = "23025850929940456840179914546843642076011014886"
+
+ def getdigits(self, p):
+ """Given an integer p >= 0, return floor(10**p)*log(10).
+
+ For example, self.getdigits(3) returns 2302.
+ """
+ # digits are stored as a string, for quick conversion to
+ # integer in the case that we've already computed enough
+ # digits; the stored digits should always be correct
+ # (truncated, not rounded to nearest).
+ if p < 0:
+ raise ValueError("p should be nonnegative")
+
+ if p >= len(self.digits):
+ # compute p+3, p+6, p+9, ... digits; continue until at
+ # least one of the extra digits is nonzero
+ extra = 3
+ while True:
+ # compute p+extra digits, correct to within 1ulp
+ M = 10**(p+extra+2)
+ digits = str(_div_nearest(_ilog(10*M, M), 100))
+ if digits[-extra:] != '0'*extra:
+ break
+ extra += 3
+ # keep all reliable digits so far; remove trailing zeros
+ # and next nonzero digit
+ self.digits = digits.rstrip('0')[:-1]
+ return int(self.digits[:p+1])
+
+_log10_digits = _Log10Memoize().getdigits
+
+def _iexp(x, M, L=8):
+ """Given integers x and M, M > 0, such that x/M is small in absolute
+ value, compute an integer approximation to M*exp(x/M). For 0 <=
+ x/M <= 2.4, the absolute error in the result is bounded by 60 (and
+ is usually much smaller)."""
+
+ # Algorithm: to compute exp(z) for a real number z, first divide z
+ # by a suitable power R of 2 so that |z/2**R| < 2**-L. Then
+ # compute expm1(z/2**R) = exp(z/2**R) - 1 using the usual Taylor
+ # series
+ #
+ # expm1(x) = x + x**2/2! + x**3/3! + ...
+ #
+ # Now use the identity
+ #
+ # expm1(2x) = expm1(x)*(expm1(x)+2)
+ #
+ # R times to compute the sequence expm1(z/2**R),
+ # expm1(z/2**(R-1)), ... , exp(z/2), exp(z).
+
+ # Find R such that x/2**R/M <= 2**-L
+ R = _nbits((x<<L)//M)
+
+ # Taylor series. (2**L)**T > M
+ T = -int(-10*len(str(M))//(3*L))
+ y = _div_nearest(x, T)
+ Mshift = M<<R
+ for i in range(T-1, 0, -1):
+ y = _div_nearest(x*(Mshift + y), Mshift * i)
+
+ # Expansion
+ for k in range(R-1, -1, -1):
+ Mshift = M<<(k+2)
+ y = _div_nearest(y*(y+Mshift), Mshift)
+
+ return M+y
+
+def _dexp(c, e, p):
+ """Compute an approximation to exp(c*10**e), with p decimal places of
+ precision.
+
+ Returns integers d, f such that:
+
+ 10**(p-1) <= d <= 10**p, and
+ (d-1)*10**f < exp(c*10**e) < (d+1)*10**f
+
+ In other words, d*10**f is an approximation to exp(c*10**e) with p
+ digits of precision, and with an error in d of at most 1. This is
+ almost, but not quite, the same as the error being < 1ulp: when d
+ = 10**(p-1) the error could be up to 10 ulp."""
+
+ # we'll call iexp with M = 10**(p+2), giving p+3 digits of precision
+ p += 2
+
+ # compute log(10) with extra precision = adjusted exponent of c*10**e
+ extra = max(0, e + len(str(c)) - 1)
+ q = p + extra
+
+ # compute quotient c*10**e/(log(10)) = c*10**(e+q)/(log(10)*10**q),
+ # rounding down
+ shift = e+q
+ if shift >= 0:
+ cshift = c*10**shift
+ else:
+ cshift = c//10**-shift
+ quot, rem = divmod(cshift, _log10_digits(q))
+
+ # reduce remainder back to original precision
+ rem = _div_nearest(rem, 10**extra)
+
+ # error in result of _iexp < 120; error after division < 0.62
+ return _div_nearest(_iexp(rem, 10**p), 1000), quot - p + 3
+
+def _dpower(xc, xe, yc, ye, p):
+ """Given integers xc, xe, yc and ye representing Decimals x = xc*10**xe and
+ y = yc*10**ye, compute x**y. Returns a pair of integers (c, e) such that:
+
+ 10**(p-1) <= c <= 10**p, and
+ (c-1)*10**e < x**y < (c+1)*10**e
+
+ in other words, c*10**e is an approximation to x**y with p digits
+ of precision, and with an error in c of at most 1. (This is
+ almost, but not quite, the same as the error being < 1ulp: when c
+ == 10**(p-1) we can only guarantee error < 10ulp.)
+
+ We assume that: x is positive and not equal to 1, and y is nonzero.
+ """
+
+ # Find b such that 10**(b-1) <= |y| <= 10**b
+ b = len(str(abs(yc))) + ye
+
+ # log(x) = lxc*10**(-p-b-1), to p+b+1 places after the decimal point
+ lxc = _dlog(xc, xe, p+b+1)
+
+ # compute product y*log(x) = yc*lxc*10**(-p-b-1+ye) = pc*10**(-p-1)
+ shift = ye-b
+ if shift >= 0:
+ pc = lxc*yc*10**shift
+ else:
+ pc = _div_nearest(lxc*yc, 10**-shift)
+
+ if pc == 0:
+ # we prefer a result that isn't exactly 1; this makes it
+ # easier to compute a correctly rounded result in __pow__
+ if ((len(str(xc)) + xe >= 1) == (yc > 0)): # if x**y > 1:
+ coeff, exp = 10**(p-1)+1, 1-p
+ else:
+ coeff, exp = 10**p-1, -p
+ else:
+ coeff, exp = _dexp(pc, -(p+1), p+1)
+ coeff = _div_nearest(coeff, 10)
+ exp += 1
+
+ return coeff, exp
+
+def _log10_lb(c, correction = {
+ '1': 100, '2': 70, '3': 53, '4': 40, '5': 31,
+ '6': 23, '7': 16, '8': 10, '9': 5}):
+ """Compute a lower bound for 100*log10(c) for a positive integer c."""
+ if c <= 0:
+ raise ValueError("The argument to _log10_lb should be nonnegative.")
+ str_c = str(c)
+ return 100*len(str_c) - correction[str_c[0]]
+
+##### Helper Functions ####################################################
+
+def _convert_other(other, raiseit=False, allow_float=False):
+ """Convert other to Decimal.
+
+ Verifies that it's ok to use in an implicit construction.
+ If allow_float is true, allow conversion from float; this
+ is used in the comparison methods (__eq__ and friends).
+
+ """
+ if isinstance(other, Decimal):
+ return other
+ if isinstance(other, int):
+ return Decimal(other)
+ if allow_float and isinstance(other, float):
+ return Decimal.from_float(other)
+
+ if raiseit:
+ raise TypeError("Unable to convert %s to Decimal" % other)
+ return NotImplemented
+
+def _convert_for_comparison(self, other, equality_op=False):
+ """Given a Decimal instance self and a Python object other, return
+ a pair (s, o) of Decimal instances such that "s op o" is
+ equivalent to "self op other" for any of the 6 comparison
+ operators "op".
+
+ """
+ if isinstance(other, Decimal):
+ return self, other
+
+ # Comparison with a Rational instance (also includes integers):
+ # self op n/d <=> self*d op n (for n and d integers, d positive).
+ # A NaN or infinity can be left unchanged without affecting the
+ # comparison result.
+ if isinstance(other, _numbers.Rational):
+ if not self._is_special:
+ self = _dec_from_triple(self._sign,
+ str(int(self._int) * other.denominator),
+ self._exp)
+ return self, Decimal(other.numerator)
+
+ # Comparisons with float and complex types. == and != comparisons
+ # with complex numbers should succeed, returning either True or False
+ # as appropriate. Other comparisons return NotImplemented.
+ if equality_op and isinstance(other, _numbers.Complex) and other.imag == 0:
+ other = other.real
+ if isinstance(other, float):
+ context = getcontext()
+ if equality_op:
+ context.flags[FloatOperation] = 1
+ else:
+ context._raise_error(FloatOperation,
+ "strict semantics for mixing floats and Decimals are enabled")
+ return self, Decimal.from_float(other)
+ return NotImplemented, NotImplemented
+
+
+##### Setup Specific Contexts ############################################
+
+# The default context prototype used by Context()
+# Is mutable, so that new contexts can have different default values
+
+DefaultContext = Context(
+ prec=28, rounding=ROUND_HALF_EVEN,
+ traps=[DivisionByZero, Overflow, InvalidOperation],
+ flags=[],
+ Emax=999999,
+ Emin=-999999,
+ capitals=1,
+ clamp=0
+)
+
+# Pre-made alternate contexts offered by the specification
+# Don't change these; the user should be able to select these
+# contexts and be able to reproduce results from other implementations
+# of the spec.
+
+BasicContext = Context(
+ prec=9, rounding=ROUND_HALF_UP,
+ traps=[DivisionByZero, Overflow, InvalidOperation, Clamped, Underflow],
+ flags=[],
+)
+
+ExtendedContext = Context(
+ prec=9, rounding=ROUND_HALF_EVEN,
+ traps=[],
+ flags=[],
+)
+
+
+##### crud for parsing strings #############################################
+#
+# Regular expression used for parsing numeric strings. Additional
+# comments:
+#
+# 1. Uncomment the two '\s*' lines to allow leading and/or trailing
+# whitespace. But note that the specification disallows whitespace in
+# a numeric string.
+#
+# 2. For finite numbers (not infinities and NaNs) the body of the
+# number between the optional sign and the optional exponent must have
+# at least one decimal digit, possibly after the decimal point. The
+# lookahead expression '(?=\d|\.\d)' checks this.
+
+import re
+_parser = re.compile(r""" # A numeric string consists of:
+# \s*
+ (?P<sign>[-+])? # an optional sign, followed by either...
+ (
+ (?=\d|\.\d) # ...a number (with at least one digit)
+ (?P<int>\d*) # having a (possibly empty) integer part
+ (\.(?P<frac>\d*))? # followed by an optional fractional part
+ (E(?P<exp>[-+]?\d+))? # followed by an optional exponent, or...
+ |
+ Inf(inity)? # ...an infinity, or...
+ |
+ (?P<signal>s)? # ...an (optionally signaling)
+ NaN # NaN
+ (?P<diag>\d*) # with (possibly empty) diagnostic info.
+ )
+# \s*
+ \Z
+""", re.VERBOSE | re.IGNORECASE).match
+
+_all_zeros = re.compile('0*$').match
+_exact_half = re.compile('50*$').match
+
+##### PEP3101 support functions ##############################################
+# The functions in this section have little to do with the Decimal
+# class, and could potentially be reused or adapted for other pure
+# Python numeric classes that want to implement __format__
+#
+# A format specifier for Decimal looks like:
+#
+# [[fill]align][sign][#][0][minimumwidth][,][.precision][type]
+
+_parse_format_specifier_regex = re.compile(r"""\A
+(?:
+ (?P<fill>.)?
+ (?P<align>[<>=^])
+)?
+(?P<sign>[-+ ])?
+(?P<alt>\#)?
+(?P<zeropad>0)?
+(?P<minimumwidth>(?!0)\d+)?
+(?P<thousands_sep>,)?
+(?:\.(?P<precision>0|(?!0)\d+))?
+(?P<type>[eEfFgGn%])?
+\Z
+""", re.VERBOSE|re.DOTALL)
+
+del re
+
+# The locale module is only needed for the 'n' format specifier. The
+# rest of the PEP 3101 code functions quite happily without it, so we
+# don't care too much if locale isn't present.
+try:
+ import locale as _locale
+except ImportError:
+ pass
+
+def _parse_format_specifier(format_spec, _localeconv=None):
+ """Parse and validate a format specifier.
+
+ Turns a standard numeric format specifier into a dict, with the
+ following entries:
+
+ fill: fill character to pad field to minimum width
+ align: alignment type, either '<', '>', '=' or '^'
+ sign: either '+', '-' or ' '
+ minimumwidth: nonnegative integer giving minimum width
+ zeropad: boolean, indicating whether to pad with zeros
+ thousands_sep: string to use as thousands separator, or ''
+ grouping: grouping for thousands separators, in format
+ used by localeconv
+ decimal_point: string to use for decimal point
+ precision: nonnegative integer giving precision, or None
+ type: one of the characters 'eEfFgG%', or None
+
+ """
+ m = _parse_format_specifier_regex.match(format_spec)
+ if m is None:
+ raise ValueError("Invalid format specifier: " + format_spec)
+
+ # get the dictionary
+ format_dict = m.groupdict()
+
+ # zeropad; defaults for fill and alignment. If zero padding
+ # is requested, the fill and align fields should be absent.
+ fill = format_dict['fill']
+ align = format_dict['align']
+ format_dict['zeropad'] = (format_dict['zeropad'] is not None)
+ if format_dict['zeropad']:
+ if fill is not None:
+ raise ValueError("Fill character conflicts with '0'"
+ " in format specifier: " + format_spec)
+ if align is not None:
+ raise ValueError("Alignment conflicts with '0' in "
+ "format specifier: " + format_spec)
+ format_dict['fill'] = fill or ' '
+ # PEP 3101 originally specified that the default alignment should
+ # be left; it was later agreed that right-aligned makes more sense
+ # for numeric types. See http://bugs.python.org/issue6857.
+ format_dict['align'] = align or '>'
+
+ # default sign handling: '-' for negative, '' for positive
+ if format_dict['sign'] is None:
+ format_dict['sign'] = '-'
+
+ # minimumwidth defaults to 0; precision remains None if not given
+ format_dict['minimumwidth'] = int(format_dict['minimumwidth'] or '0')
+ if format_dict['precision'] is not None:
+ format_dict['precision'] = int(format_dict['precision'])
+
+ # if format type is 'g' or 'G' then a precision of 0 makes little
+ # sense; convert it to 1. Same if format type is unspecified.
+ if format_dict['precision'] == 0:
+ if format_dict['type'] is None or format_dict['type'] in 'gGn':
+ format_dict['precision'] = 1
+
+ # determine thousands separator, grouping, and decimal separator, and
+ # add appropriate entries to format_dict
+ if format_dict['type'] == 'n':
+ # apart from separators, 'n' behaves just like 'g'
+ format_dict['type'] = 'g'
+ if _localeconv is None:
+ _localeconv = _locale.localeconv()
+ if format_dict['thousands_sep'] is not None:
+ raise ValueError("Explicit thousands separator conflicts with "
+ "'n' type in format specifier: " + format_spec)
+ format_dict['thousands_sep'] = _localeconv['thousands_sep']
+ format_dict['grouping'] = _localeconv['grouping']
+ format_dict['decimal_point'] = _localeconv['decimal_point']
+ else:
+ if format_dict['thousands_sep'] is None:
+ format_dict['thousands_sep'] = ''
+ format_dict['grouping'] = [3, 0]
+ format_dict['decimal_point'] = '.'
+
+ return format_dict
+
+def _format_align(sign, body, spec):
+ """Given an unpadded, non-aligned numeric string 'body' and sign
+ string 'sign', add padding and alignment conforming to the given
+ format specifier dictionary 'spec' (as produced by
+ parse_format_specifier).
+
+ """
+ # how much extra space do we have to play with?
+ minimumwidth = spec['minimumwidth']
+ fill = spec['fill']
+ padding = fill*(minimumwidth - len(sign) - len(body))
+
+ align = spec['align']
+ if align == '<':
+ result = sign + body + padding
+ elif align == '>':
+ result = padding + sign + body
+ elif align == '=':
+ result = sign + padding + body
+ elif align == '^':
+ half = len(padding)//2
+ result = padding[:half] + sign + body + padding[half:]
+ else:
+ raise ValueError('Unrecognised alignment field')
+
+ return result
+
+def _group_lengths(grouping):
+ """Convert a localeconv-style grouping into a (possibly infinite)
+ iterable of integers representing group lengths.
+
+ """
+ # The result from localeconv()['grouping'], and the input to this
+ # function, should be a list of integers in one of the
+ # following three forms:
+ #
+ # (1) an empty list, or
+ # (2) nonempty list of positive integers + [0]
+ # (3) list of positive integers + [locale.CHAR_MAX], or
+
+ from itertools import chain, repeat
+ if not grouping:
+ return []
+ elif grouping[-1] == 0 and len(grouping) >= 2:
+ return chain(grouping[:-1], repeat(grouping[-2]))
+ elif grouping[-1] == _locale.CHAR_MAX:
+ return grouping[:-1]
+ else:
+ raise ValueError('unrecognised format for grouping')
+
+def _insert_thousands_sep(digits, spec, min_width=1):
+ """Insert thousands separators into a digit string.
+
+ spec is a dictionary whose keys should include 'thousands_sep' and
+ 'grouping'; typically it's the result of parsing the format
+ specifier using _parse_format_specifier.
+
+ The min_width keyword argument gives the minimum length of the
+ result, which will be padded on the left with zeros if necessary.
+
+ If necessary, the zero padding adds an extra '0' on the left to
+ avoid a leading thousands separator. For example, inserting
+ commas every three digits in '123456', with min_width=8, gives
+ '0,123,456', even though that has length 9.
+
+ """
+
+ sep = spec['thousands_sep']
+ grouping = spec['grouping']
+
+ groups = []
+ for l in _group_lengths(grouping):
+ if l <= 0:
+ raise ValueError("group length should be positive")
+ # max(..., 1) forces at least 1 digit to the left of a separator
+ l = min(max(len(digits), min_width, 1), l)
+ groups.append('0'*(l - len(digits)) + digits[-l:])
+ digits = digits[:-l]
+ min_width -= l
+ if not digits and min_width <= 0:
+ break
+ min_width -= len(sep)
+ else:
+ l = max(len(digits), min_width, 1)
+ groups.append('0'*(l - len(digits)) + digits[-l:])
+ return sep.join(reversed(groups))
+
+def _format_sign(is_negative, spec):
+ """Determine sign character."""
+
+ if is_negative:
+ return '-'
+ elif spec['sign'] in ' +':
+ return spec['sign']
+ else:
+ return ''
+
+def _format_number(is_negative, intpart, fracpart, exp, spec):
+ """Format a number, given the following data:
+
+ is_negative: true if the number is negative, else false
+ intpart: string of digits that must appear before the decimal point
+ fracpart: string of digits that must come after the point
+ exp: exponent, as an integer
+ spec: dictionary resulting from parsing the format specifier
+
+ This function uses the information in spec to:
+ insert separators (decimal separator and thousands separators)
+ format the sign
+ format the exponent
+ add trailing '%' for the '%' type
+ zero-pad if necessary
+ fill and align if necessary
+ """
+
+ sign = _format_sign(is_negative, spec)
+
+ if fracpart or spec['alt']:
+ fracpart = spec['decimal_point'] + fracpart
+
+ if exp != 0 or spec['type'] in 'eE':
+ echar = {'E': 'E', 'e': 'e', 'G': 'E', 'g': 'e'}[spec['type']]
+ fracpart += "{0}{1:+}".format(echar, exp)
+ if spec['type'] == '%':
+ fracpart += '%'
+
+ if spec['zeropad']:
+ min_width = spec['minimumwidth'] - len(fracpart) - len(sign)
+ else:
+ min_width = 0
+ intpart = _insert_thousands_sep(intpart, spec, min_width)
+
+ return _format_align(sign, intpart+fracpart, spec)
+
+
+##### Useful Constants (internal use only) ################################
+
+# Reusable defaults
+_Infinity = Decimal('Inf')
+_NegativeInfinity = Decimal('-Inf')
+_NaN = Decimal('NaN')
+_Zero = Decimal(0)
+_One = Decimal(1)
+_NegativeOne = Decimal(-1)
+
+# _SignedInfinity[sign] is infinity w/ that sign
+_SignedInfinity = (_Infinity, _NegativeInfinity)
+
+# Constants related to the hash implementation; hash(x) is based
+# on the reduction of x modulo _PyHASH_MODULUS
+_PyHASH_MODULUS = sys.hash_info.modulus
+# hash values to use for positive and negative infinities, and nans
+_PyHASH_INF = sys.hash_info.inf
+_PyHASH_NAN = sys.hash_info.nan
+
+# _PyHASH_10INV is the inverse of 10 modulo the prime _PyHASH_MODULUS
+_PyHASH_10INV = pow(10, _PyHASH_MODULUS - 2, _PyHASH_MODULUS)
+del sys
diff --git a/Lib/_pyio.py b/Lib/_pyio.py
index f1e3a79290..0d98b74476 100644
--- a/Lib/_pyio.py
+++ b/Lib/_pyio.py
@@ -6,11 +6,18 @@ import os
import abc
import codecs
import errno
+import array
+import stat
+import sys
# Import _thread instead of threading to reduce startup cost
try:
from _thread import allocate_lock as Lock
except ImportError:
from _dummy_thread import allocate_lock as Lock
+if sys.platform in {'win32', 'cygwin'}:
+ from msvcrt import setmode as _setmode
+else:
+ _setmode = None
import io
from io import (__all__, SEEK_SET, SEEK_CUR, SEEK_END)
@@ -256,7 +263,7 @@ class OpenWrapper:
Trick so that open won't become a bound method when stored
as a class variable (as dbm.dumb does).
- See initstdio() in Python/pythonrun.c.
+ See initstdio() in Python/pylifecycle.c.
"""
__doc__ = DocDescriptor()
@@ -289,8 +296,9 @@ class IOBase(metaclass=abc.ABCMeta):
called.
The basic type used for binary data read from or written to a file is
- bytes. bytearrays are accepted too, and in some cases (such as
- readinto) needed. Text I/O classes work with str data.
+ bytes. Other bytes-like objects are accepted as method arguments too. In
+ some cases (such as readinto), a writable object is required. Text I/O
+ classes work with str data.
Note that calling any method (even inquiries) on a closed stream is
undefined. Implementations may raise OSError in this case.
@@ -383,7 +391,7 @@ class IOBase(metaclass=abc.ABCMeta):
def seekable(self):
"""Return a bool indicating whether object supports random access.
- If False, seek(), tell() and truncate() will raise UnsupportedOperation.
+ If False, seek(), tell() and truncate() will raise OSError.
This method may need to do a test seek().
"""
return False
@@ -398,7 +406,7 @@ class IOBase(metaclass=abc.ABCMeta):
def readable(self):
"""Return a bool indicating whether object was opened for reading.
- If False, read() will raise UnsupportedOperation.
+ If False, read() will raise OSError.
"""
return False
@@ -412,7 +420,7 @@ class IOBase(metaclass=abc.ABCMeta):
def writable(self):
"""Return a bool indicating whether object was opened for writing.
- If False, write() and truncate() will raise UnsupportedOperation.
+ If False, write() and truncate() will raise OSError.
"""
return False
@@ -432,7 +440,7 @@ class IOBase(metaclass=abc.ABCMeta):
return self.__closed
def _checkClosed(self, msg=None):
- """Internal: raise an ValueError if file is closed
+ """Internal: raise a ValueError if file is closed
"""
if self.closed:
raise ValueError("I/O operation on closed file."
@@ -589,7 +597,7 @@ class RawIOBase(IOBase):
return data
def readinto(self, b):
- """Read up to len(b) bytes into bytearray b.
+ """Read bytes into a pre-allocated bytes-like object b.
Returns an int representing the number of bytes read (0 for EOF), or
None if the object is set not to block and has no data to read.
@@ -599,7 +607,8 @@ class RawIOBase(IOBase):
def write(self, b):
"""Write the given buffer to the IO stream.
- Returns the number of bytes written, which may be less than len(b).
+ Returns the number of bytes written, which may be less than the
+ length of b in bytes.
"""
self._unsupported("write")
@@ -652,7 +661,7 @@ class BufferedIOBase(IOBase):
self._unsupported("read1")
def readinto(self, b):
- """Read up to len(b) bytes into bytearray b.
+ """Read bytes into a pre-allocated bytes-like object b.
Like read(), this may issue multiple reads to the underlying raw
stream, unless the latter is 'interactive'.
@@ -662,23 +671,40 @@ class BufferedIOBase(IOBase):
Raises BlockingIOError if the underlying raw stream has no
data at the moment.
"""
- # XXX This ought to work with anything that supports the buffer API
- data = self.read(len(b))
+
+ return self._readinto(b, read1=False)
+
+ def readinto1(self, b):
+ """Read bytes into buffer *b*, using at most one system call
+
+ Returns an int representing the number of bytes read (0 for EOF).
+
+ Raises BlockingIOError if the underlying raw stream has no
+ data at the moment.
+ """
+
+ return self._readinto(b, read1=True)
+
+ def _readinto(self, b, read1):
+ if not isinstance(b, memoryview):
+ b = memoryview(b)
+ b = b.cast('B')
+
+ if read1:
+ data = self.read1(len(b))
+ else:
+ data = self.read(len(b))
n = len(data)
- try:
- b[:n] = data
- except TypeError as err:
- import array
- if not isinstance(b, array.array):
- raise err
- b[:n] = array.array('b', data)
+
+ b[:n] = data
+
return n
def write(self, b):
"""Write the given bytes buffer to the IO stream.
- Return the number of bytes written, which is never less than
- len(b).
+ Return the number of bytes written, which is always the length of b
+ in bytes.
Raises BlockingIOError if the buffer is full and the
underlying raw stream cannot accept more data at the moment.
@@ -763,12 +789,6 @@ class _BufferedIOMixin(BufferedIOBase):
def seekable(self):
return self.raw.seekable()
- def readable(self):
- return self.raw.readable()
-
- def writable(self):
- return self.raw.writable()
-
@property
def raw(self):
return self._raw
@@ -790,13 +810,14 @@ class _BufferedIOMixin(BufferedIOBase):
.format(self.__class__.__name__))
def __repr__(self):
- clsname = self.__class__.__name__
+ modname = self.__class__.__module__
+ clsname = self.__class__.__qualname__
try:
name = self.name
except Exception:
- return "<_pyio.{0}>".format(clsname)
+ return "<{}.{}>".format(modname, clsname)
else:
- return "<_pyio.{0} name={1!r}>".format(clsname, name)
+ return "<{}.{} name={!r}>".format(modname, clsname, name)
### Lower-level APIs ###
@@ -865,7 +886,8 @@ class BytesIO(BufferedIOBase):
raise ValueError("write to closed file")
if isinstance(b, str):
raise TypeError("can't write str to binary stream")
- n = len(b)
+ with memoryview(b) as view:
+ n = view.nbytes # Size of any bytes-like object
if n == 0:
return 0
pos = self._pos
@@ -957,6 +979,9 @@ class BufferedReader(_BufferedIOMixin):
self._reset_read_buf()
self._read_lock = Lock()
+ def readable(self):
+ return self.raw.readable()
+
def _reset_read_buf(self):
self._read_buf = b""
self._read_pos = 0
@@ -993,10 +1018,7 @@ class BufferedReader(_BufferedIOMixin):
current_size = 0
while True:
# Read until EOF or until read() would block.
- try:
- chunk = self.raw.read()
- except InterruptedError:
- continue
+ chunk = self.raw.read()
if chunk in empty_values:
nodata_val = chunk
break
@@ -1015,16 +1037,13 @@ class BufferedReader(_BufferedIOMixin):
chunks = [buf[pos:]]
wanted = max(self.buffer_size, n)
while avail < n:
- try:
- chunk = self.raw.read(wanted)
- except InterruptedError:
- continue
+ chunk = self.raw.read(wanted)
if chunk in empty_values:
nodata_val = chunk
break
avail += len(chunk)
chunks.append(chunk)
- # n is more then avail only when an EOF occurred or when
+ # n is more than avail only when an EOF occurred or when
# read() would have blocked.
n = min(n, avail)
out = b"".join(chunks)
@@ -1047,12 +1066,7 @@ class BufferedReader(_BufferedIOMixin):
have = len(self._read_buf) - self._read_pos
if have < want or have <= 0:
to_read = self.buffer_size - have
- while True:
- try:
- current = self.raw.read(to_read)
- except InterruptedError:
- continue
- break
+ current = self.raw.read(to_read)
if current:
self._read_buf = self._read_buf[self._read_pos:] + current
self._read_pos = 0
@@ -1071,6 +1085,57 @@ class BufferedReader(_BufferedIOMixin):
return self._read_unlocked(
min(size, len(self._read_buf) - self._read_pos))
+ # Implementing readinto() and readinto1() is not strictly necessary (we
+ # could rely on the base class that provides an implementation in terms of
+ # read() and read1()). We do it anyway to keep the _pyio implementation
+ # similar to the io implementation (which implements the methods for
+ # performance reasons).
+ def _readinto(self, buf, read1):
+ """Read data into *buf* with at most one system call."""
+
+ # Need to create a memoryview object of type 'b', otherwise
+ # we may not be able to assign bytes to it, and slicing it
+ # would create a new object.
+ if not isinstance(buf, memoryview):
+ buf = memoryview(buf)
+ if buf.nbytes == 0:
+ return 0
+ buf = buf.cast('B')
+
+ written = 0
+ with self._read_lock:
+ while written < len(buf):
+
+ # First try to read from internal buffer
+ avail = min(len(self._read_buf) - self._read_pos, len(buf))
+ if avail:
+ buf[written:written+avail] = \
+ self._read_buf[self._read_pos:self._read_pos+avail]
+ self._read_pos += avail
+ written += avail
+ if written == len(buf):
+ break
+
+ # If remaining space in callers buffer is larger than
+ # internal buffer, read directly into callers buffer
+ if len(buf) - written > self.buffer_size:
+ n = self.raw.readinto(buf[written:])
+ if not n:
+ break # eof
+ written += n
+
+ # Otherwise refill internal buffer - unless we're
+ # in read1 mode and already got some data
+ elif not (read1 and written):
+ if not self._peek_unlocked(1):
+ break # eof
+
+ # In readinto1 mode, return as soon as we have some data
+ if read1 and written:
+ break
+
+ return written
+
def tell(self):
return _BufferedIOMixin.tell(self) - len(self._read_buf) + self._read_pos
@@ -1104,6 +1169,9 @@ class BufferedWriter(_BufferedIOMixin):
self._write_buf = bytearray()
self._write_lock = Lock()
+ def writable(self):
+ return self.raw.writable()
+
def write(self, b):
if self.closed:
raise ValueError("write to closed file")
@@ -1149,8 +1217,6 @@ class BufferedWriter(_BufferedIOMixin):
while self._write_buf:
try:
n = self.raw.write(self._write_buf)
- except InterruptedError:
- continue
except BlockingIOError:
raise RuntimeError("self.raw should implement RawIOBase: it "
"should not raise BlockingIOError")
@@ -1220,6 +1286,9 @@ class BufferedRWPair(BufferedIOBase):
def read1(self, size):
return self.reader.read1(size)
+ def readinto1(self, b):
+ return self.reader.readinto1(b)
+
def readable(self):
return self.reader.readable()
@@ -1304,6 +1373,10 @@ class BufferedRandom(BufferedWriter, BufferedReader):
self.flush()
return BufferedReader.read1(self, size)
+ def readinto1(self, b):
+ self.flush()
+ return BufferedReader.readinto1(self, b)
+
def write(self, b):
if self._read_buf:
# Undo readahead
@@ -1313,6 +1386,345 @@ class BufferedRandom(BufferedWriter, BufferedReader):
return BufferedWriter.write(self, b)
+class FileIO(RawIOBase):
+ _fd = -1
+ _created = False
+ _readable = False
+ _writable = False
+ _appending = False
+ _seekable = None
+ _closefd = True
+
+ def __init__(self, file, mode='r', closefd=True, opener=None):
+ """Open a file. The mode can be 'r' (default), 'w', 'x' or 'a' for reading,
+ writing, exclusive creation or appending. The file will be created if it
+ doesn't exist when opened for writing or appending; it will be truncated
+ when opened for writing. A FileExistsError will be raised if it already
+ exists when opened for creating. Opening a file for creating implies
+ writing so this mode behaves in a similar way to 'w'. Add a '+' to the mode
+ to allow simultaneous reading and writing. A custom opener can be used by
+ passing a callable as *opener*. The underlying file descriptor for the file
+ object is then obtained by calling opener with (*name*, *flags*).
+ *opener* must return an open file descriptor (passing os.open as *opener*
+ results in functionality similar to passing None).
+ """
+ if self._fd >= 0:
+ # Have to close the existing file first.
+ try:
+ if self._closefd:
+ os.close(self._fd)
+ finally:
+ self._fd = -1
+
+ if isinstance(file, float):
+ raise TypeError('integer argument expected, got float')
+ if isinstance(file, int):
+ fd = file
+ if fd < 0:
+ raise ValueError('negative file descriptor')
+ else:
+ fd = -1
+
+ if not isinstance(mode, str):
+ raise TypeError('invalid mode: %s' % (mode,))
+ if not set(mode) <= set('xrwab+'):
+ raise ValueError('invalid mode: %s' % (mode,))
+ if sum(c in 'rwax' for c in mode) != 1 or mode.count('+') > 1:
+ raise ValueError('Must have exactly one of create/read/write/append '
+ 'mode and at most one plus')
+
+ if 'x' in mode:
+ self._created = True
+ self._writable = True
+ flags = os.O_EXCL | os.O_CREAT
+ elif 'r' in mode:
+ self._readable = True
+ flags = 0
+ elif 'w' in mode:
+ self._writable = True
+ flags = os.O_CREAT | os.O_TRUNC
+ elif 'a' in mode:
+ self._writable = True
+ self._appending = True
+ flags = os.O_APPEND | os.O_CREAT
+
+ if '+' in mode:
+ self._readable = True
+ self._writable = True
+
+ if self._readable and self._writable:
+ flags |= os.O_RDWR
+ elif self._readable:
+ flags |= os.O_RDONLY
+ else:
+ flags |= os.O_WRONLY
+
+ flags |= getattr(os, 'O_BINARY', 0)
+
+ noinherit_flag = (getattr(os, 'O_NOINHERIT', 0) or
+ getattr(os, 'O_CLOEXEC', 0))
+ flags |= noinherit_flag
+
+ owned_fd = None
+ try:
+ if fd < 0:
+ if not closefd:
+ raise ValueError('Cannot use closefd=False with file name')
+ if opener is None:
+ fd = os.open(file, flags, 0o666)
+ else:
+ fd = opener(file, flags)
+ if not isinstance(fd, int):
+ raise TypeError('expected integer from opener')
+ if fd < 0:
+ raise OSError('Negative file descriptor')
+ owned_fd = fd
+ if not noinherit_flag:
+ os.set_inheritable(fd, False)
+
+ self._closefd = closefd
+ fdfstat = os.fstat(fd)
+ try:
+ if stat.S_ISDIR(fdfstat.st_mode):
+ raise IsADirectoryError(errno.EISDIR,
+ os.strerror(errno.EISDIR), file)
+ except AttributeError:
+ # Ignore the AttribueError if stat.S_ISDIR or errno.EISDIR
+ # don't exist.
+ pass
+ self._blksize = getattr(fdfstat, 'st_blksize', 0)
+ if self._blksize <= 1:
+ self._blksize = DEFAULT_BUFFER_SIZE
+
+ if _setmode:
+ # don't translate newlines (\r\n <=> \n)
+ _setmode(fd, os.O_BINARY)
+
+ self.name = file
+ if self._appending:
+ # For consistent behaviour, we explicitly seek to the
+ # end of file (otherwise, it might be done only on the
+ # first write()).
+ os.lseek(fd, 0, SEEK_END)
+ except:
+ if owned_fd is not None:
+ os.close(owned_fd)
+ raise
+ self._fd = fd
+
+ def __del__(self):
+ if self._fd >= 0 and self._closefd and not self.closed:
+ import warnings
+ warnings.warn('unclosed file %r' % (self,), ResourceWarning,
+ stacklevel=2)
+ self.close()
+
+ def __getstate__(self):
+ raise TypeError("cannot serialize '%s' object", self.__class__.__name__)
+
+ def __repr__(self):
+ class_name = '%s.%s' % (self.__class__.__module__,
+ self.__class__.__qualname__)
+ if self.closed:
+ return '<%s [closed]>' % class_name
+ try:
+ name = self.name
+ except AttributeError:
+ return ('<%s fd=%d mode=%r closefd=%r>' %
+ (class_name, self._fd, self.mode, self._closefd))
+ else:
+ return ('<%s name=%r mode=%r closefd=%r>' %
+ (class_name, name, self.mode, self._closefd))
+
+ def _checkReadable(self):
+ if not self._readable:
+ raise UnsupportedOperation('File not open for reading')
+
+ def _checkWritable(self, msg=None):
+ if not self._writable:
+ raise UnsupportedOperation('File not open for writing')
+
+ def read(self, size=None):
+ """Read at most size bytes, returned as bytes.
+
+ Only makes one system call, so less data may be returned than requested
+ In non-blocking mode, returns None if no data is available.
+ Return an empty bytes object at EOF.
+ """
+ self._checkClosed()
+ self._checkReadable()
+ if size is None or size < 0:
+ return self.readall()
+ try:
+ return os.read(self._fd, size)
+ except BlockingIOError:
+ return None
+
+ def readall(self):
+ """Read all data from the file, returned as bytes.
+
+ In non-blocking mode, returns as much as is immediately available,
+ or None if no data is available. Return an empty bytes object at EOF.
+ """
+ self._checkClosed()
+ self._checkReadable()
+ bufsize = DEFAULT_BUFFER_SIZE
+ try:
+ pos = os.lseek(self._fd, 0, SEEK_CUR)
+ end = os.fstat(self._fd).st_size
+ if end >= pos:
+ bufsize = end - pos + 1
+ except OSError:
+ pass
+
+ result = bytearray()
+ while True:
+ if len(result) >= bufsize:
+ bufsize = len(result)
+ bufsize += max(bufsize, DEFAULT_BUFFER_SIZE)
+ n = bufsize - len(result)
+ try:
+ chunk = os.read(self._fd, n)
+ except BlockingIOError:
+ if result:
+ break
+ return None
+ if not chunk: # reached the end of the file
+ break
+ result += chunk
+
+ return bytes(result)
+
+ def readinto(self, b):
+ """Same as RawIOBase.readinto()."""
+ m = memoryview(b).cast('B')
+ data = self.read(len(m))
+ n = len(data)
+ m[:n] = data
+ return n
+
+ def write(self, b):
+ """Write bytes b to file, return number written.
+
+ Only makes one system call, so not all of the data may be written.
+ The number of bytes actually written is returned. In non-blocking mode,
+ returns None if the write would block.
+ """
+ self._checkClosed()
+ self._checkWritable()
+ try:
+ return os.write(self._fd, b)
+ except BlockingIOError:
+ return None
+
+ def seek(self, pos, whence=SEEK_SET):
+ """Move to new file position.
+
+ Argument offset is a byte count. Optional argument whence defaults to
+ SEEK_SET or 0 (offset from start of file, offset should be >= 0); other values
+ are SEEK_CUR or 1 (move relative to current position, positive or negative),
+ and SEEK_END or 2 (move relative to end of file, usually negative, although
+ many platforms allow seeking beyond the end of a file).
+
+ Note that not all file objects are seekable.
+ """
+ if isinstance(pos, float):
+ raise TypeError('an integer is required')
+ self._checkClosed()
+ return os.lseek(self._fd, pos, whence)
+
+ def tell(self):
+ """tell() -> int. Current file position.
+
+ Can raise OSError for non seekable files."""
+ self._checkClosed()
+ return os.lseek(self._fd, 0, SEEK_CUR)
+
+ def truncate(self, size=None):
+ """Truncate the file to at most size bytes.
+
+ Size defaults to the current file position, as returned by tell().
+ The current file position is changed to the value of size.
+ """
+ self._checkClosed()
+ self._checkWritable()
+ if size is None:
+ size = self.tell()
+ os.ftruncate(self._fd, size)
+ return size
+
+ def close(self):
+ """Close the file.
+
+ A closed file cannot be used for further I/O operations. close() may be
+ called more than once without error.
+ """
+ if not self.closed:
+ try:
+ if self._closefd:
+ os.close(self._fd)
+ finally:
+ super().close()
+
+ def seekable(self):
+ """True if file supports random-access."""
+ self._checkClosed()
+ if self._seekable is None:
+ try:
+ self.tell()
+ except OSError:
+ self._seekable = False
+ else:
+ self._seekable = True
+ return self._seekable
+
+ def readable(self):
+ """True if file was opened in a read mode."""
+ self._checkClosed()
+ return self._readable
+
+ def writable(self):
+ """True if file was opened in a write mode."""
+ self._checkClosed()
+ return self._writable
+
+ def fileno(self):
+ """Return the underlying file descriptor (an integer)."""
+ self._checkClosed()
+ return self._fd
+
+ def isatty(self):
+ """True if the file is connected to a TTY device."""
+ self._checkClosed()
+ return os.isatty(self._fd)
+
+ @property
+ def closefd(self):
+ """True if the file descriptor will be closed by close()."""
+ return self._closefd
+
+ @property
+ def mode(self):
+ """String giving the file mode"""
+ if self._created:
+ if self._readable:
+ return 'xb+'
+ else:
+ return 'xb'
+ elif self._appending:
+ if self._readable:
+ return 'ab+'
+ else:
+ return 'ab'
+ elif self._readable:
+ if self._writable:
+ return 'rb+'
+ else:
+ return 'rb'
+ else:
+ return 'wb'
+
+
class TextIOBase(IOBase):
"""Base class for text I/O.
@@ -1566,7 +1978,8 @@ class TextIOWrapper(TextIOBase):
# - "chars_..." for integer variables that count decoded characters
def __repr__(self):
- result = "<_pyio.TextIOWrapper"
+ result = "<{}.{}".format(self.__class__.__module__,
+ self.__class__.__qualname__)
try:
name = self.name
except Exception:
diff --git a/Lib/_strptime.py b/Lib/_strptime.py
index 6d648568b6..f84227be49 100644
--- a/Lib/_strptime.py
+++ b/Lib/_strptime.py
@@ -171,9 +171,9 @@ class LocaleTime(object):
pass
self.tzname = time.tzname
self.daylight = time.daylight
- no_saving = frozenset(["utc", "gmt", self.tzname[0].lower()])
+ no_saving = frozenset({"utc", "gmt", self.tzname[0].lower()})
if self.daylight:
- has_saving = frozenset([self.tzname[1].lower()])
+ has_saving = frozenset({self.tzname[1].lower()})
else:
has_saving = frozenset()
self.timezone = (no_saving, has_saving)
@@ -257,8 +257,8 @@ class TimeRE(dict):
# format directives (%m, etc.).
regex_chars = re_compile(r"([\\.^$*+?\(\){}\[\]|])")
format = regex_chars.sub(r"\\\1", format)
- whitespace_replacement = re_compile('\s+')
- format = whitespace_replacement.sub('\s+', format)
+ whitespace_replacement = re_compile(r'\s+')
+ format = whitespace_replacement.sub(r'\\s+', format)
while '%' in format:
directive_index = format.index('%')+1
processed_format = "%s%s%s" % (processed_format,
@@ -311,7 +311,6 @@ def _strptime(data_string, format="%a %b %d %H:%M:%S %Y"):
global _TimeRE_cache, _regex_cache
with _cache_lock:
-
locale_time = _TimeRE_cache.locale_time
if (_getlang() != locale_time.lang or
time.tzname != locale_time.tzname or
@@ -463,6 +462,10 @@ def _strptime(data_string, format="%a %b %d %H:%M:%S %Y"):
week_starts_Mon = True if week_of_year_start == 0 else False
julian = _calc_julian_from_U_or_W(year, week_of_year, weekday,
week_starts_Mon)
+ if julian <= 0:
+ year -= 1
+ yday = 366 if calendar.isleap(year) else 365
+ julian += yday
# Cannot pre-calculate datetime_date() since can change in Julian
# calculation and thus could have different value for the day of the week
# calculation.
diff --git a/Lib/abc.py b/Lib/abc.py
index 0358a4696d..1cbf96a61f 100644
--- a/Lib/abc.py
+++ b/Lib/abc.py
@@ -168,7 +168,7 @@ class ABCMeta(type):
def _dump_registry(cls, file=None):
"""Debug helper to print the ABC registry."""
- print("Class: %s.%s" % (cls.__module__, cls.__name__), file=file)
+ print("Class: %s.%s" % (cls.__module__, cls.__qualname__), file=file)
print("Inv.counter: %s" % ABCMeta._abc_invalidation_counter, file=file)
for name in sorted(cls.__dict__.keys()):
if name.startswith("_abc_"):
diff --git a/Lib/argparse.py b/Lib/argparse.py
index be276bb62f..9a067196da 100644
--- a/Lib/argparse.py
+++ b/Lib/argparse.py
@@ -1209,11 +1209,6 @@ class Namespace(_AttributeHolder):
return NotImplemented
return vars(self) == vars(other)
- def __ne__(self, other):
- if not isinstance(other, Namespace):
- return NotImplemented
- return not (self == other)
-
def __contains__(self, key):
return key in self.__dict__
@@ -1595,6 +1590,7 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
- argument_default -- The default value for all arguments
- conflict_handler -- String indicating how to handle conflicts
- add_help -- Add a -h/-help option
+ - allow_abbrev -- Allow long options to be abbreviated unambiguously
"""
def __init__(self,
@@ -1608,7 +1604,8 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
fromfile_prefix_chars=None,
argument_default=None,
conflict_handler='error',
- add_help=True):
+ add_help=True,
+ allow_abbrev=True):
superinit = super(ArgumentParser, self).__init__
superinit(description=description,
@@ -1626,6 +1623,7 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
self.formatter_class = formatter_class
self.fromfile_prefix_chars = fromfile_prefix_chars
self.add_help = add_help
+ self.allow_abbrev = allow_abbrev
add_group = self.add_argument_group
self._positionals = add_group(_('positional arguments'))
@@ -2103,23 +2101,24 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
action = self._option_string_actions[option_string]
return action, option_string, explicit_arg
- # search through all possible prefixes of the option string
- # and all actions in the parser for possible interpretations
- option_tuples = self._get_option_tuples(arg_string)
-
- # if multiple actions match, the option string was ambiguous
- if len(option_tuples) > 1:
- options = ', '.join([option_string
- for action, option_string, explicit_arg in option_tuples])
- args = {'option': arg_string, 'matches': options}
- msg = _('ambiguous option: %(option)s could match %(matches)s')
- self.error(msg % args)
-
- # if exactly one action matched, this segmentation is good,
- # so return the parsed action
- elif len(option_tuples) == 1:
- option_tuple, = option_tuples
- return option_tuple
+ if self.allow_abbrev:
+ # search through all possible prefixes of the option string
+ # and all actions in the parser for possible interpretations
+ option_tuples = self._get_option_tuples(arg_string)
+
+ # if multiple actions match, the option string was ambiguous
+ if len(option_tuples) > 1:
+ options = ', '.join([option_string
+ for action, option_string, explicit_arg in option_tuples])
+ args = {'option': arg_string, 'matches': options}
+ msg = _('ambiguous option: %(option)s could match %(matches)s')
+ self.error(msg % args)
+
+ # if exactly one action matched, this segmentation is good,
+ # so return the parsed action
+ elif len(option_tuples) == 1:
+ option_tuple, = option_tuples
+ return option_tuple
# if it was not found as an option, but it looks like a negative
# number, it was meant to be positional
diff --git a/Lib/ast.py b/Lib/ast.py
index 02c3b2867f..017047275b 100644
--- a/Lib/ast.py
+++ b/Lib/ast.py
@@ -194,7 +194,7 @@ def get_docstring(node, clean=True):
be found. If the node provided does not have docstrings a TypeError
will be raised.
"""
- if not isinstance(node, (FunctionDef, ClassDef, Module)):
+ if not isinstance(node, (AsyncFunctionDef, FunctionDef, ClassDef, Module)):
raise TypeError("%r can't have docstrings" % node.__class__.__name__)
if node.body and isinstance(node.body[0], Expr) and \
isinstance(node.body[0].value, Str):
@@ -293,7 +293,6 @@ class NodeTransformer(NodeVisitor):
def generic_visit(self, node):
for field, old_value in iter_fields(node):
- old_value = getattr(node, field, None)
if isinstance(old_value, list):
new_values = []
for value in old_value:
diff --git a/Lib/asynchat.py b/Lib/asynchat.py
index 14c152f059..f728d1b470 100644
--- a/Lib/asynchat.py
+++ b/Lib/asynchat.py
@@ -287,6 +287,9 @@ class simple_producer:
class fifo:
def __init__(self, list=None):
+ import warnings
+ warnings.warn('fifo class will be removed in Python 3.6',
+ DeprecationWarning, stacklevel=2)
if not list:
self.list = deque()
else:
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py
index 4505732f9a..172a463ef8 100644
--- a/Lib/asyncio/base_events.py
+++ b/Lib/asyncio/base_events.py
@@ -16,10 +16,8 @@ to modify the meaning of the API call itself.
import collections
import concurrent.futures
-import functools
import heapq
import inspect
-import ipaddress
import itertools
import logging
import os
@@ -54,6 +52,12 @@ _MIN_SCHEDULED_TIMER_HANDLES = 100
# before cleanup of cancelled handles is performed.
_MIN_CANCELLED_TIMER_HANDLES_FRACTION = 0.5
+# Exceptions which must not call the exception handler in fatal error
+# methods (_fatal_error())
+_FATAL_ERROR_IGNORE = (BrokenPipeError,
+ ConnectionResetError, ConnectionAbortedError)
+
+
def _format_handle(handle):
cb = handle._callback
if inspect.ismethod(cb) and isinstance(cb.__self__, tasks.Task):
@@ -80,12 +84,14 @@ if hasattr(socket, 'SOCK_CLOEXEC'):
_SOCKET_TYPE_MASK |= socket.SOCK_CLOEXEC
-@functools.lru_cache(maxsize=1024)
def _ipaddr_info(host, port, family, type, proto):
- # Try to skip getaddrinfo if "host" is already an IP. Since getaddrinfo
- # blocks on an exclusive lock on some platforms, users might handle name
- # resolution in their own code and pass in resolved IPs.
- if proto not in {0, socket.IPPROTO_TCP, socket.IPPROTO_UDP} or host is None:
+ # Try to skip getaddrinfo if "host" is already an IP. Users might have
+ # handled name resolution in their own code and pass in resolved IPs.
+ if not hasattr(socket, 'inet_pton'):
+ return
+
+ if proto not in {0, socket.IPPROTO_TCP, socket.IPPROTO_UDP} or \
+ host is None:
return None
type &= ~_SOCKET_TYPE_MASK
@@ -96,59 +102,63 @@ def _ipaddr_info(host, port, family, type, proto):
else:
return None
- if hasattr(socket, 'inet_pton'):
- if family == socket.AF_UNSPEC:
- afs = [socket.AF_INET, socket.AF_INET6]
+ if port is None:
+ port = 0
+ elif isinstance(port, bytes):
+ if port == b'':
+ port = 0
else:
- afs = [family]
-
- for af in afs:
- # Linux's inet_pton doesn't accept an IPv6 zone index after host,
- # like '::1%lo0', so strip it. If we happen to make an invalid
- # address look valid, we fail later in sock.connect or sock.bind.
try:
- if af == socket.AF_INET6:
- socket.inet_pton(af, host.partition('%')[0])
- else:
- socket.inet_pton(af, host)
- return af, type, proto, '', (host, port)
- except OSError:
- pass
-
- # "host" is not an IP address.
- return None
+ port = int(port)
+ except ValueError:
+ # Might be a service name like b"http".
+ port = socket.getservbyname(port.decode('ascii'))
+ elif isinstance(port, str):
+ if port == '':
+ port = 0
+ else:
+ try:
+ port = int(port)
+ except ValueError:
+ # Might be a service name like "http".
+ port = socket.getservbyname(port)
- # No inet_pton. (On Windows it's only available since Python 3.4.)
- # Even though getaddrinfo with AI_NUMERICHOST would be non-blocking, it
- # still requires a lock on some platforms, and waiting for that lock could
- # block the event loop. Use ipaddress instead, it's just text parsing.
- try:
- addr = ipaddress.IPv4Address(host)
- except ValueError:
- try:
- addr = ipaddress.IPv6Address(host.partition('%')[0])
- except ValueError:
- return None
+ if family == socket.AF_UNSPEC:
+ afs = [socket.AF_INET, socket.AF_INET6]
+ else:
+ afs = [family]
- af = socket.AF_INET if addr.version == 4 else socket.AF_INET6
- if family not in (socket.AF_UNSPEC, af):
- # "host" is wrong IP version for "family".
+ if isinstance(host, bytes):
+ host = host.decode('idna')
+ if '%' in host:
+ # Linux's inet_pton doesn't accept an IPv6 zone index after host,
+ # like '::1%lo0'.
return None
- return af, type, proto, '', (host, port)
-
+ for af in afs:
+ try:
+ socket.inet_pton(af, host)
+ # The host has already been resolved.
+ return af, type, proto, '', (host, port)
+ except OSError:
+ pass
-def _check_resolved_address(sock, address):
- # Ensure that the address is already resolved to avoid the trap of hanging
- # the entire event loop when the address requires doing a DNS lookup.
+ # "host" is not an IP address.
+ return None
- if hasattr(socket, 'AF_UNIX') and sock.family == socket.AF_UNIX:
- return
+def _ensure_resolved(address, *, family=0, type=socket.SOCK_STREAM, proto=0,
+ flags=0, loop):
host, port = address[:2]
- if _ipaddr_info(host, port, sock.family, sock.type, sock.proto) is None:
- raise ValueError("address must be resolved (IP address),"
- " got host %r" % host)
+ info = _ipaddr_info(host, port, family, type, proto)
+ if info is not None:
+ # "host" is already a resolved IP.
+ fut = loop.create_future()
+ fut.set_result([info])
+ return fut
+ else:
+ return loop.getaddrinfo(host, port, family=family, type=type,
+ proto=proto, flags=flags)
def _run_until_complete_cb(fut):
@@ -203,7 +213,7 @@ class Server(events.AbstractServer):
def wait_closed(self):
if self.sockets is None or self._waiters is None:
return
- waiter = futures.Future(loop=self._loop)
+ waiter = self._loop.create_future()
self._waiters.append(waiter)
yield from waiter
@@ -237,6 +247,10 @@ class BaseEventLoop(events.AbstractEventLoop):
% (self.__class__.__name__, self.is_running(),
self.is_closed(), self.get_debug()))
+ def create_future(self):
+ """Create a Future object attached to the loop."""
+ return futures.Future(loop=self)
+
def create_task(self, coro):
"""Schedule a coroutine object.
@@ -530,7 +544,7 @@ class BaseEventLoop(events.AbstractEventLoop):
assert not args
assert not isinstance(func, events.TimerHandle)
if func._cancelled:
- f = futures.Future(loop=self)
+ f = self.create_future()
f.set_result(None)
return f
func, args = func._callback, func._args
@@ -571,12 +585,7 @@ class BaseEventLoop(events.AbstractEventLoop):
def getaddrinfo(self, host, port, *,
family=0, type=0, proto=0, flags=0):
- info = _ipaddr_info(host, port, family, type, proto)
- if info is not None:
- fut = futures.Future(loop=self)
- fut.set_result([info])
- return fut
- elif self._debug:
+ if self._debug:
return self.run_in_executor(None, self._getaddrinfo_debug,
host, port, family, type, proto, flags)
else:
@@ -625,14 +634,14 @@ class BaseEventLoop(events.AbstractEventLoop):
raise ValueError(
'host/port and sock can not be specified at the same time')
- f1 = self.getaddrinfo(
- host, port, family=family,
- type=socket.SOCK_STREAM, proto=proto, flags=flags)
+ f1 = _ensure_resolved((host, port), family=family,
+ type=socket.SOCK_STREAM, proto=proto,
+ flags=flags, loop=self)
fs = [f1]
if local_addr is not None:
- f2 = self.getaddrinfo(
- *local_addr, family=family,
- type=socket.SOCK_STREAM, proto=proto, flags=flags)
+ f2 = _ensure_resolved(local_addr, family=family,
+ type=socket.SOCK_STREAM, proto=proto,
+ flags=flags, loop=self)
fs.append(f2)
else:
f2 = None
@@ -714,7 +723,7 @@ class BaseEventLoop(events.AbstractEventLoop):
def _create_connection_transport(self, sock, protocol_factory, ssl,
server_hostname):
protocol = protocol_factory()
- waiter = futures.Future(loop=self)
+ waiter = self.create_future()
if ssl:
sslcontext = None if isinstance(ssl, bool) else ssl
transport = self._make_ssl_transport(
@@ -767,9 +776,9 @@ class BaseEventLoop(events.AbstractEventLoop):
assert isinstance(addr, tuple) and len(addr) == 2, (
'2-tuple is expected')
- infos = yield from self.getaddrinfo(
- *addr, family=family, type=socket.SOCK_DGRAM,
- proto=proto, flags=flags)
+ infos = yield from _ensure_resolved(
+ addr, family=family, type=socket.SOCK_DGRAM,
+ proto=proto, flags=flags, loop=self)
if not infos:
raise OSError('getaddrinfo() returned empty list')
@@ -834,7 +843,7 @@ class BaseEventLoop(events.AbstractEventLoop):
raise exceptions[0]
protocol = protocol_factory()
- waiter = futures.Future(loop=self)
+ waiter = self.create_future()
transport = self._make_datagram_transport(
sock, protocol, r_addr, waiter)
if self._debug:
@@ -857,9 +866,9 @@ class BaseEventLoop(events.AbstractEventLoop):
@coroutine
def _create_server_getaddrinfo(self, host, port, family, flags):
- infos = yield from self.getaddrinfo(host, port, family=family,
+ infos = yield from _ensure_resolved((host, port), family=family,
type=socket.SOCK_STREAM,
- flags=flags)
+ flags=flags, loop=self)
if not infos:
raise OSError('getaddrinfo({!r}) returned empty list'.format(host))
return infos
@@ -880,7 +889,10 @@ class BaseEventLoop(events.AbstractEventLoop):
to host and port.
The host parameter can also be a sequence of strings and in that case
- the TCP server is bound to all hosts of the sequence.
+ the TCP server is bound to all hosts of the sequence. If a host
+ appears multiple times (possibly indirectly e.g. when hostnames
+ resolve to the same IP address), the server is only bound once to that
+ host.
Return a Server object which can be used to stop the service.
@@ -909,7 +921,7 @@ class BaseEventLoop(events.AbstractEventLoop):
flags=flags)
for host in hosts]
infos = yield from tasks.gather(*fs, loop=self)
- infos = itertools.chain.from_iterable(infos)
+ infos = set(itertools.chain.from_iterable(infos))
completed = False
try:
@@ -970,7 +982,7 @@ class BaseEventLoop(events.AbstractEventLoop):
@coroutine
def connect_read_pipe(self, protocol_factory, pipe):
protocol = protocol_factory()
- waiter = futures.Future(loop=self)
+ waiter = self.create_future()
transport = self._make_read_pipe_transport(pipe, protocol, waiter)
try:
@@ -987,7 +999,7 @@ class BaseEventLoop(events.AbstractEventLoop):
@coroutine
def connect_write_pipe(self, protocol_factory, pipe):
protocol = protocol_factory()
- waiter = futures.Future(loop=self)
+ waiter = self.create_future()
transport = self._make_write_pipe_transport(pipe, protocol, waiter)
try:
@@ -1069,6 +1081,11 @@ class BaseEventLoop(events.AbstractEventLoop):
logger.info('%s: %r' % (debug_log, transport))
return transport, protocol
+ def get_exception_handler(self):
+ """Return an exception handler, or None if the default one is in use.
+ """
+ return self._exception_handler
+
def set_exception_handler(self, handler):
"""Set handler as the new event loop exception handler.
diff --git a/Lib/asyncio/base_subprocess.py b/Lib/asyncio/base_subprocess.py
index 73425d9bbc..8fc253c18e 100644
--- a/Lib/asyncio/base_subprocess.py
+++ b/Lib/asyncio/base_subprocess.py
@@ -210,6 +210,10 @@ class BaseSubprocessTransport(transports.SubprocessTransport):
logger.info('%r exited with return code %r',
self, returncode)
self._returncode = returncode
+ if self._proc.returncode is None:
+ # asyncio uses a child watcher: copy the status into the Popen
+ # object. On Python 3.6, it is required to avoid a ResourceWarning.
+ self._proc.returncode = returncode
self._call(self._protocol.process_exited)
self._try_finish()
@@ -227,7 +231,7 @@ class BaseSubprocessTransport(transports.SubprocessTransport):
if self._returncode is not None:
return self._returncode
- waiter = futures.Future(loop=self._loop)
+ waiter = self._loop.create_future()
self._exit_waiters.append(waiter)
return (yield from waiter)
diff --git a/Lib/asyncio/compat.py b/Lib/asyncio/compat.py
index 660b7e7e6c..4790bb4a35 100644
--- a/Lib/asyncio/compat.py
+++ b/Lib/asyncio/compat.py
@@ -4,6 +4,7 @@ import sys
PY34 = sys.version_info >= (3, 4)
PY35 = sys.version_info >= (3, 5)
+PY352 = sys.version_info >= (3, 5, 2)
def flatten_list_bytes(list_of_data):
diff --git a/Lib/asyncio/coroutines.py b/Lib/asyncio/coroutines.py
index 27ab42a5bf..71bc6fb2ea 100644
--- a/Lib/asyncio/coroutines.py
+++ b/Lib/asyncio/coroutines.py
@@ -204,7 +204,8 @@ def coroutine(func):
@functools.wraps(func)
def coro(*args, **kw):
res = func(*args, **kw)
- if isinstance(res, futures.Future) or inspect.isgenerator(res):
+ if isinstance(res, futures.Future) or inspect.isgenerator(res) or \
+ isinstance(res, CoroWrapper):
res = yield from res
elif _AwaitableABC is not None:
# If 'func' returns an Awaitable (new in 3.5) we
diff --git a/Lib/asyncio/events.py b/Lib/asyncio/events.py
index 176a846698..c48c5bed73 100644
--- a/Lib/asyncio/events.py
+++ b/Lib/asyncio/events.py
@@ -266,6 +266,9 @@ class AbstractEventLoop:
def time(self):
raise NotImplementedError
+ def create_future(self):
+ raise NotImplementedError
+
# Method scheduling a coroutine object: create a task.
def create_task(self, coro):
@@ -484,6 +487,9 @@ class AbstractEventLoop:
# Error handlers.
+ def get_exception_handler(self):
+ raise NotImplementedError
+
def set_exception_handler(self, handler):
raise NotImplementedError
diff --git a/Lib/asyncio/futures.py b/Lib/asyncio/futures.py
index 4dcb6546be..1feba4d370 100644
--- a/Lib/asyncio/futures.py
+++ b/Lib/asyncio/futures.py
@@ -142,7 +142,7 @@ class Future:
def __init__(self, *, loop=None):
"""Initialize the future.
- The optional event_loop argument allows to explicitly set the event
+ The optional event_loop argument allows explicitly setting the event
loop object used by the future. If it's not provided, the future uses
the default event loop.
"""
@@ -341,6 +341,9 @@ class Future:
raise InvalidStateError('{}: {!r}'.format(self._state, self))
if isinstance(exception, type):
exception = exception()
+ if type(exception) is StopIteration:
+ raise TypeError("StopIteration interacts badly with generators "
+ "and cannot be raised into a Future")
self._exception = exception
self._state = _FINISHED
self._schedule_callbacks()
@@ -448,6 +451,8 @@ def wrap_future(future, *, loop=None):
return future
assert isinstance(future, concurrent.futures.Future), \
'concurrent.futures.Future is expected, got {!r}'.format(future)
- new_future = Future(loop=loop)
+ if loop is None:
+ loop = events.get_event_loop()
+ new_future = loop.create_future()
_chain_future(future, new_future)
return new_future
diff --git a/Lib/asyncio/locks.py b/Lib/asyncio/locks.py
index 34f6bc16ad..741aaf27c5 100644
--- a/Lib/asyncio/locks.py
+++ b/Lib/asyncio/locks.py
@@ -111,7 +111,7 @@ class Lock(_ContextManagerMixin):
acquire() is a coroutine and should be called with 'yield from'.
Locks also support the context management protocol. '(yield from lock)'
- should be used as context manager expression.
+ should be used as the context manager expression.
Usage:
@@ -170,7 +170,7 @@ class Lock(_ContextManagerMixin):
self._locked = True
return True
- fut = futures.Future(loop=self._loop)
+ fut = self._loop.create_future()
self._waiters.append(fut)
try:
yield from fut
@@ -258,7 +258,7 @@ class Event:
if self._value:
return True
- fut = futures.Future(loop=self._loop)
+ fut = self._loop.create_future()
self._waiters.append(fut)
try:
yield from fut
@@ -320,7 +320,7 @@ class Condition(_ContextManagerMixin):
self.release()
try:
- fut = futures.Future(loop=self._loop)
+ fut = self._loop.create_future()
self._waiters.append(fut)
try:
yield from fut
@@ -329,7 +329,13 @@ class Condition(_ContextManagerMixin):
self._waiters.remove(fut)
finally:
- yield from self.acquire()
+ # Must reacquire lock even if wait is cancelled
+ while True:
+ try:
+ yield from self.acquire()
+ break
+ except futures.CancelledError:
+ pass
@coroutine
def wait_for(self, predicate):
@@ -433,7 +439,7 @@ class Semaphore(_ContextManagerMixin):
True.
"""
while self._value <= 0:
- fut = futures.Future(loop=self._loop)
+ fut = self._loop.create_future()
self._waiters.append(fut)
try:
yield from fut
diff --git a/Lib/asyncio/proactor_events.py b/Lib/asyncio/proactor_events.py
index 14c0659dde..3ac314c0cc 100644
--- a/Lib/asyncio/proactor_events.py
+++ b/Lib/asyncio/proactor_events.py
@@ -90,7 +90,7 @@ class _ProactorBasePipeTransport(transports._FlowControlMixin,
self.close()
def _fatal_error(self, exc, message='Fatal error on pipe transport'):
- if isinstance(exc, (BrokenPipeError, ConnectionResetError)):
+ if isinstance(exc, base_events._FATAL_ERROR_IGNORE):
if self._loop.get_debug():
logger.debug("%r: %s", self, message, exc_info=True)
else:
@@ -440,14 +440,7 @@ class BaseProactorEventLoop(base_events.BaseEventLoop):
return self._proactor.send(sock, data)
def sock_connect(self, sock, address):
- try:
- base_events._check_resolved_address(sock, address)
- except ValueError as err:
- fut = futures.Future(loop=self)
- fut.set_exception(err)
- return fut
- else:
- return self._proactor.connect(sock, address)
+ return self._proactor.connect(sock, address)
def sock_accept(self, sock):
return self._proactor.accept(sock)
diff --git a/Lib/asyncio/queues.py b/Lib/asyncio/queues.py
index e3a1d5ed60..c453f02d8c 100644
--- a/Lib/asyncio/queues.py
+++ b/Lib/asyncio/queues.py
@@ -128,7 +128,7 @@ class Queue:
This method is a coroutine.
"""
while self.full():
- putter = futures.Future(loop=self._loop)
+ putter = self._loop.create_future()
self._putters.append(putter)
try:
yield from putter
@@ -162,7 +162,7 @@ class Queue:
This method is a coroutine.
"""
while self.empty():
- getter = futures.Future(loop=self._loop)
+ getter = self._loop.create_future()
self._getters.append(getter)
try:
yield from getter
diff --git a/Lib/asyncio/selector_events.py b/Lib/asyncio/selector_events.py
index 5b26631d80..9564d01dfa 100644
--- a/Lib/asyncio/selector_events.py
+++ b/Lib/asyncio/selector_events.py
@@ -196,7 +196,7 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop):
transport = None
try:
protocol = protocol_factory()
- waiter = futures.Future(loop=self)
+ waiter = self.create_future()
if sslcontext:
transport = self._make_ssl_transport(
conn, protocol, sslcontext, waiter=waiter,
@@ -314,7 +314,7 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop):
"""
if self._debug and sock.gettimeout() != 0:
raise ValueError("the socket must be non-blocking")
- fut = futures.Future(loop=self)
+ fut = self.create_future()
self._sock_recv(fut, False, sock, n)
return fut
@@ -352,7 +352,7 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop):
"""
if self._debug and sock.gettimeout() != 0:
raise ValueError("the socket must be non-blocking")
- fut = futures.Future(loop=self)
+ fut = self.create_future()
if data:
self._sock_sendall(fut, False, sock, data)
else:
@@ -385,24 +385,28 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop):
def sock_connect(self, sock, address):
"""Connect to a remote socket at address.
- The address must be already resolved to avoid the trap of hanging the
- entire event loop when the address requires doing a DNS lookup. For
- example, it must be an IP address, not an hostname, for AF_INET and
- AF_INET6 address families. Use getaddrinfo() to resolve the hostname
- asynchronously.
-
This method is a coroutine.
"""
if self._debug and sock.gettimeout() != 0:
raise ValueError("the socket must be non-blocking")
- fut = futures.Future(loop=self)
+
+ fut = self.create_future()
+ if hasattr(socket, 'AF_UNIX') and sock.family == socket.AF_UNIX:
+ self._sock_connect(fut, sock, address)
+ else:
+ resolved = base_events._ensure_resolved(address, loop=self)
+ resolved.add_done_callback(
+ lambda resolved: self._on_resolved(fut, sock, resolved))
+
+ return fut
+
+ def _on_resolved(self, fut, sock, resolved):
try:
- base_events._check_resolved_address(sock, address)
- except ValueError as err:
- fut.set_exception(err)
+ _, _, _, _, address = resolved.result()[0]
+ except Exception as exc:
+ fut.set_exception(exc)
else:
self._sock_connect(fut, sock, address)
- return fut
def _sock_connect(self, fut, sock, address):
fd = sock.fileno()
@@ -453,7 +457,7 @@ class BaseSelectorEventLoop(base_events.BaseEventLoop):
"""
if self._debug and sock.gettimeout() != 0:
raise ValueError("the socket must be non-blocking")
- fut = futures.Future(loop=self)
+ fut = self.create_future()
self._sock_accept(fut, False, sock)
return fut
@@ -565,6 +569,7 @@ class _SelectorTransport(transports._FlowControlMixin,
self._loop.remove_reader(self._sock_fd)
if not self._buffer:
self._conn_lost += 1
+ self._loop.remove_writer(self._sock_fd)
self._loop.call_soon(self._call_connection_lost, None)
# On Python 3.3 and older, objects with a destructor part of a reference
@@ -578,8 +583,7 @@ class _SelectorTransport(transports._FlowControlMixin,
def _fatal_error(self, exc, message='Fatal error on transport'):
# Should be called from exception handler only.
- if isinstance(exc, (BrokenPipeError,
- ConnectionResetError, ConnectionAbortedError)):
+ if isinstance(exc, base_events._FATAL_ERROR_IGNORE):
if self._loop.get_debug():
logger.debug("%r: %s", self, message, exc_info=True)
else:
@@ -659,6 +663,8 @@ class _SelectorSocketTransport(_SelectorTransport):
logger.debug("%r resumes reading", self)
def _read_ready(self):
+ if self._conn_lost:
+ return
try:
data = self._sock.recv(self.max_size)
except (BlockingIOError, InterruptedError):
@@ -682,8 +688,8 @@ class _SelectorSocketTransport(_SelectorTransport):
def write(self, data):
if not isinstance(data, (bytes, bytearray, memoryview)):
- raise TypeError('data argument must be byte-ish (%r)',
- type(data))
+ raise TypeError('data argument must be a bytes-like object, '
+ 'not %r' % type(data).__name__)
if self._eof:
raise RuntimeError('Cannot call write() after write_eof()')
if not data:
@@ -718,6 +724,8 @@ class _SelectorSocketTransport(_SelectorTransport):
def _write_ready(self):
assert self._buffer, 'Data should not be empty'
+ if self._conn_lost:
+ return
try:
n = self._sock.send(self._buffer)
except (BlockingIOError, InterruptedError):
@@ -888,6 +896,8 @@ class _SelectorSslTransport(_SelectorTransport):
logger.debug("%r resumes reading", self)
def _read_ready(self):
+ if self._conn_lost:
+ return
if self._write_wants_read:
self._write_wants_read = False
self._write_ready()
@@ -920,6 +930,8 @@ class _SelectorSslTransport(_SelectorTransport):
self.close()
def _write_ready(self):
+ if self._conn_lost:
+ return
if self._read_wants_write:
self._read_wants_write = False
self._read_ready()
@@ -954,8 +966,8 @@ class _SelectorSslTransport(_SelectorTransport):
def write(self, data):
if not isinstance(data, (bytes, bytearray, memoryview)):
- raise TypeError('data argument must be byte-ish (%r)',
- type(data))
+ raise TypeError('data argument must be a bytes-like object, '
+ 'not %r' % type(data).__name__)
if not data:
return
@@ -997,6 +1009,8 @@ class _SelectorDatagramTransport(_SelectorTransport):
return sum(len(data) for data, _ in self._buffer)
def _read_ready(self):
+ if self._conn_lost:
+ return
try:
data, addr = self._sock.recvfrom(self.max_size)
except (BlockingIOError, InterruptedError):
@@ -1010,8 +1024,8 @@ class _SelectorDatagramTransport(_SelectorTransport):
def sendto(self, data, addr=None):
if not isinstance(data, (bytes, bytearray, memoryview)):
- raise TypeError('data argument must be byte-ish (%r)',
- type(data))
+ raise TypeError('data argument must be a bytes-like object, '
+ 'not %r' % type(data).__name__)
if not data:
return
diff --git a/Lib/asyncio/sslproto.py b/Lib/asyncio/sslproto.py
index dde980b68f..f58b5ac502 100644
--- a/Lib/asyncio/sslproto.py
+++ b/Lib/asyncio/sslproto.py
@@ -603,7 +603,7 @@ class SSLProtocol(protocols.Protocol):
self._wakeup_waiter()
self._session_established = True
# In case transport.write() was already called. Don't call
- # immediatly _process_write_backlog(), but schedule it:
+ # immediately _process_write_backlog(), but schedule it:
# _on_handshake_complete() can be called indirectly from
# _process_write_backlog(), and _process_write_backlog() is not
# reentrant.
@@ -655,7 +655,7 @@ class SSLProtocol(protocols.Protocol):
def _fatal_error(self, exc, message='Fatal error on transport'):
# Should be called from exception handler only.
- if isinstance(exc, (BrokenPipeError, ConnectionResetError)):
+ if isinstance(exc, base_events._FATAL_ERROR_IGNORE):
if self._loop.get_debug():
logger.debug("%r: %s", self, message, exc_info=True)
else:
diff --git a/Lib/asyncio/streams.py b/Lib/asyncio/streams.py
index 0008d51450..c88a87cd09 100644
--- a/Lib/asyncio/streams.py
+++ b/Lib/asyncio/streams.py
@@ -14,13 +14,12 @@ if hasattr(socket, 'AF_UNIX'):
from . import coroutines
from . import compat
from . import events
-from . import futures
from . import protocols
from .coroutines import coroutine
from .log import logger
-_DEFAULT_LIMIT = 2**16
+_DEFAULT_LIMIT = 2 ** 16
class IncompleteReadError(EOFError):
@@ -38,15 +37,13 @@ class IncompleteReadError(EOFError):
class LimitOverrunError(Exception):
- """Reached buffer limit while looking for the separator.
+ """Reached the buffer limit while looking for a separator.
Attributes:
- - message: error message
- - consumed: total number of bytes that should be consumed
+ - consumed: total number of to be consumed bytes.
"""
def __init__(self, message, consumed):
super().__init__(message)
- self.message = message
self.consumed = consumed
@@ -132,7 +129,6 @@ if hasattr(socket, 'AF_UNIX'):
writer = StreamWriter(transport, protocol, reader, loop)
return reader, writer
-
@coroutine
def start_unix_server(client_connected_cb, path=None, *,
loop=None, limit=_DEFAULT_LIMIT, **kwds):
@@ -210,7 +206,7 @@ class FlowControlMixin(protocols.Protocol):
return
waiter = self._drain_waiter
assert waiter is None or waiter.cancelled()
- waiter = futures.Future(loop=self._loop)
+ waiter = self._loop.create_future()
self._drain_waiter = waiter
yield from waiter
@@ -229,9 +225,11 @@ class StreamReaderProtocol(FlowControlMixin, protocols.Protocol):
self._stream_reader = stream_reader
self._stream_writer = None
self._client_connected_cb = client_connected_cb
+ self._over_ssl = False
def connection_made(self, transport):
self._stream_reader.set_transport(transport)
+ self._over_ssl = transport.get_extra_info('sslcontext') is not None
if self._client_connected_cb is not None:
self._stream_writer = StreamWriter(transport, self,
self._stream_reader,
@@ -242,17 +240,25 @@ class StreamReaderProtocol(FlowControlMixin, protocols.Protocol):
self._loop.create_task(res)
def connection_lost(self, exc):
- if exc is None:
- self._stream_reader.feed_eof()
- else:
- self._stream_reader.set_exception(exc)
+ if self._stream_reader is not None:
+ if exc is None:
+ self._stream_reader.feed_eof()
+ else:
+ self._stream_reader.set_exception(exc)
super().connection_lost(exc)
+ self._stream_reader = None
+ self._stream_writer = None
def data_received(self, data):
self._stream_reader.feed_data(data)
def eof_received(self):
self._stream_reader.feed_eof()
+ if self._over_ssl:
+ # Prevent a warning in SSLProtocol.eof_received:
+ # "returning true from eof_received()
+ # has no effect when using ssl"
+ return False
return True
@@ -413,8 +419,8 @@ class StreamReader:
self._wakeup_waiter()
if (self._transport is not None and
- not self._paused and
- len(self._buffer) > 2*self._limit):
+ not self._paused and
+ len(self._buffer) > 2 * self._limit):
try:
self._transport.pause_reading()
except NotImplementedError:
@@ -446,7 +452,7 @@ class StreamReader:
self._paused = False
self._transport.resume_reading()
- self._waiter = futures.Future(loop=self._loop)
+ self._waiter = self._loop.create_future()
try:
yield from self._waiter
finally:
@@ -486,24 +492,24 @@ class StreamReader:
@coroutine
def readuntil(self, separator=b'\n'):
- """Read chunk of data from the stream until `separator` is found.
-
- On success, chunk and its separator will be removed from internal buffer
- (i.e. consumed). Returned chunk will include separator at the end.
+ """Read data from the stream until ``separator`` is found.
- Configured stream limit is used to check result. Limit means maximal
- length of chunk that can be returned, not counting the separator.
+ On success, the data and separator will be removed from the
+ internal buffer (consumed). Returned data will include the
+ separator at the end.
- If EOF occurs and complete separator still not found,
- IncompleteReadError(<partial data>, None) will be raised and internal
- buffer becomes empty. This partial data may contain a partial separator.
+ Configured stream limit is used to check result. Limit sets the
+ maximal length of data that can be returned, not counting the
+ separator.
- If chunk cannot be read due to overlimit, LimitOverrunError will be raised
- and data will be left in internal buffer, so it can be read again, in
- some different way.
+ If an EOF occurs and the complete separator is still not found,
+ an IncompleteReadError exception will be raised, and the internal
+ buffer will be reset. The IncompleteReadError.partial attribute
+ may contain the separator partially.
- If stream was paused, this function will automatically resume it if
- needed.
+ If the data cannot be read because of over limit, a
+ LimitOverrunError exception will be raised, and the data
+ will be left in the internal buffer, so it can be read again.
"""
seplen = len(separator)
if seplen == 0:
@@ -529,8 +535,8 @@ class StreamReader:
# performance problems. Even when reading MIME-encoded
# messages :)
- # `offset` is the number of bytes from the beginning of the buffer where
- # is no occurrence of `separator`.
+ # `offset` is the number of bytes from the beginning of the buffer
+ # where there is no occurrence of `separator`.
offset = 0
# Loop until we find `separator` in the buffer, exceed the buffer size,
@@ -544,14 +550,16 @@ class StreamReader:
isep = self._buffer.find(separator, offset)
if isep != -1:
- # `separator` is in the buffer. `isep` will be used later to
- # retrieve the data.
+ # `separator` is in the buffer. `isep` will be used later
+ # to retrieve the data.
break
# see upper comment for explanation.
offset = buflen + 1 - seplen
if offset > self._limit:
- raise LimitOverrunError('Separator is not found, and chunk exceed the limit', offset)
+ raise LimitOverrunError(
+ 'Separator is not found, and chunk exceed the limit',
+ offset)
# Complete message (with full separator) may be present in buffer
# even when EOF flag is set. This may happen when the last chunk
@@ -566,7 +574,8 @@ class StreamReader:
yield from self._wait_for_data('readuntil')
if isep > self._limit:
- raise LimitOverrunError('Separator is found, but chunk is longer than limit', isep)
+ raise LimitOverrunError(
+ 'Separator is found, but chunk is longer than limit', isep)
chunk = self._buffer[:isep + seplen]
del self._buffer[:isep + seplen]
@@ -588,7 +597,8 @@ class StreamReader:
received before any byte is read, this function returns empty byte
object.
- Returned value is not limited with limit, configured at stream creation.
+ Returned value is not limited with limit, configured at stream
+ creation.
If stream was paused, this function will automatically resume it if
needed.
@@ -627,13 +637,14 @@ class StreamReader:
def readexactly(self, n):
"""Read exactly `n` bytes.
- Raise an `IncompleteReadError` if EOF is reached before `n` bytes can be
- read. The `IncompleteReadError.partial` attribute of the exception will
+ Raise an IncompleteReadError if EOF is reached before `n` bytes can be
+ read. The IncompleteReadError.partial attribute of the exception will
contain the partial read bytes.
if n is zero, return empty bytes object.
- Returned value is not limited with limit, configured at stream creation.
+ Returned value is not limited with limit, configured at stream
+ creation.
If stream was paused, this function will automatically resume it if
needed.
@@ -678,3 +689,9 @@ class StreamReader:
if val == b'':
raise StopAsyncIteration
return val
+
+ if compat.PY352:
+ # In Python 3.5.2 and greater, __aiter__ should return
+ # the asynchronous iterator directly.
+ def __aiter__(self):
+ return self
diff --git a/Lib/asyncio/subprocess.py b/Lib/asyncio/subprocess.py
index ead4039b2f..b2f5304f77 100644
--- a/Lib/asyncio/subprocess.py
+++ b/Lib/asyncio/subprocess.py
@@ -166,7 +166,7 @@ class Process:
@coroutine
def communicate(self, input=None):
- if input:
+ if input is not None:
stdin = self._feed_stdin(input)
else:
stdin = self._noop()
diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py
index c37aa4195d..0cca8e36a5 100644
--- a/Lib/asyncio/tasks.py
+++ b/Lib/asyncio/tasks.py
@@ -4,7 +4,6 @@ __all__ = ['Task',
'FIRST_COMPLETED', 'FIRST_EXCEPTION', 'ALL_COMPLETED',
'wait', 'wait_for', 'as_completed', 'sleep', 'async',
'gather', 'shield', 'ensure_future', 'run_coroutine_threadsafe',
- 'timeout',
]
import concurrent.futures
@@ -373,7 +372,7 @@ def wait_for(fut, timeout, *, loop=None):
if timeout is None:
return (yield from fut)
- waiter = futures.Future(loop=loop)
+ waiter = loop.create_future()
timeout_handle = loop.call_later(timeout, _release_waiter, waiter)
cb = functools.partial(_release_waiter, waiter)
@@ -401,12 +400,12 @@ def wait_for(fut, timeout, *, loop=None):
@coroutine
def _wait(fs, timeout, return_when, loop):
- """Internal helper for wait() and _wait_for().
+ """Internal helper for wait() and wait_for().
The fs argument must be a collection of Futures.
"""
assert fs, 'Set of Futures is empty.'
- waiter = futures.Future(loop=loop)
+ waiter = loop.create_future()
timeout_handle = None
if timeout is not None:
timeout_handle = loop.call_later(timeout, _release_waiter, waiter)
@@ -507,7 +506,9 @@ def sleep(delay, result=None, *, loop=None):
yield
return result
- future = futures.Future(loop=loop)
+ if loop is None:
+ loop = events.get_event_loop()
+ future = loop.create_future()
h = future._loop.call_later(delay,
futures._set_result_unless_cancelled,
future, result)
@@ -604,7 +605,9 @@ def gather(*coros_or_futures, loop=None, return_exceptions=False):
be cancelled.)
"""
if not coros_or_futures:
- outer = futures.Future(loop=loop)
+ if loop is None:
+ loop = events.get_event_loop()
+ outer = loop.create_future()
outer.set_result([])
return outer
@@ -692,7 +695,7 @@ def shield(arg, *, loop=None):
# Shortcut.
return inner
loop = inner._loop
- outer = futures.Future(loop=loop)
+ outer = loop.create_future()
def _done_callback(inner):
if outer.cancelled():
@@ -733,53 +736,3 @@ def run_coroutine_threadsafe(coro, loop):
loop.call_soon_threadsafe(callback)
return future
-
-
-def timeout(timeout, *, loop=None):
- """A factory which produce a context manager with timeout.
-
- Useful in cases when you want to apply timeout logic around block
- of code or in cases when asyncio.wait_for is not suitable.
-
- For example:
-
- >>> with asyncio.timeout(0.001):
- ... yield from coro()
-
-
- timeout: timeout value in seconds
- loop: asyncio compatible event loop
- """
- if loop is None:
- loop = events.get_event_loop()
- return _Timeout(timeout, loop=loop)
-
-
-class _Timeout:
- def __init__(self, timeout, *, loop):
- self._timeout = timeout
- self._loop = loop
- self._task = None
- self._cancelled = False
- self._cancel_handler = None
-
- def __enter__(self):
- self._task = Task.current_task(loop=self._loop)
- if self._task is None:
- raise RuntimeError('Timeout context manager should be used '
- 'inside a task')
- self._cancel_handler = self._loop.call_later(
- self._timeout, self._cancel_task)
- return self
-
- def __exit__(self, exc_type, exc_val, exc_tb):
- if exc_type is futures.CancelledError and self._cancelled:
- self._cancel_handler = None
- self._task = None
- raise futures.TimeoutError
- self._cancel_handler.cancel()
- self._cancel_handler = None
- self._task = None
-
- def _cancel_task(self):
- self._cancelled = self._task.cancel()
diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py
index 7747ff41bb..d712749ee5 100644
--- a/Lib/asyncio/unix_events.py
+++ b/Lib/asyncio/unix_events.py
@@ -177,7 +177,7 @@ class _UnixSelectorEventLoop(selector_events.BaseSelectorEventLoop):
stdin, stdout, stderr, bufsize,
extra=None, **kwargs):
with events.get_child_watcher() as watcher:
- waiter = futures.Future(loop=self)
+ waiter = self.create_future()
transp = _UnixSubprocessTransport(self, protocol, args, shell,
stdin, stdout, stderr, bufsize,
waiter=waiter, extra=extra,
@@ -329,14 +329,17 @@ class _UnixReadPipeTransport(transports.ReadTransport):
elif self._closing:
info.append('closing')
info.append('fd=%s' % self._fileno)
- if self._pipe is not None:
+ selector = getattr(self._loop, '_selector', None)
+ if self._pipe is not None and selector is not None:
polling = selector_events._test_selector_event(
- self._loop._selector,
+ selector,
self._fileno, selectors.EVENT_READ)
if polling:
info.append('polling')
else:
info.append('idle')
+ elif self._pipe is not None:
+ info.append('open')
else:
info.append('closed')
return '<%s>' % ' '.join(info)
@@ -453,9 +456,10 @@ class _UnixWritePipeTransport(transports._FlowControlMixin,
elif self._closing:
info.append('closing')
info.append('fd=%s' % self._fileno)
- if self._pipe is not None:
+ selector = getattr(self._loop, '_selector', None)
+ if self._pipe is not None and selector is not None:
polling = selector_events._test_selector_event(
- self._loop._selector,
+ selector,
self._fileno, selectors.EVENT_WRITE)
if polling:
info.append('polling')
@@ -464,6 +468,8 @@ class _UnixWritePipeTransport(transports._FlowControlMixin,
bufsize = self.get_write_buffer_size()
info.append('bufsize=%s' % bufsize)
+ elif self._pipe is not None:
+ info.append('open')
else:
info.append('closed')
return '<%s>' % ' '.join(info)
@@ -575,7 +581,7 @@ class _UnixWritePipeTransport(transports._FlowControlMixin,
def _fatal_error(self, exc, message='Fatal error on pipe transport'):
# should be called by exception handler only
- if isinstance(exc, (BrokenPipeError, ConnectionResetError)):
+ if isinstance(exc, base_events._FATAL_ERROR_IGNORE):
if self._loop.get_debug():
logger.debug("%r: %s", self, message, exc_info=True)
else:
diff --git a/Lib/asyncio/windows_events.py b/Lib/asyncio/windows_events.py
index 922594f172..668fe1451b 100644
--- a/Lib/asyncio/windows_events.py
+++ b/Lib/asyncio/windows_events.py
@@ -197,7 +197,7 @@ class _WaitHandleFuture(_BaseWaitHandleFuture):
#
# If the IocpProactor already received the event, it's safe to call
# _unregister() because we kept a reference to the Overlapped object
- # which is used as an unique key.
+ # which is used as a unique key.
self._proactor._unregister(self._ov)
self._proactor = None
@@ -366,7 +366,7 @@ class ProactorEventLoop(proactor_events.BaseProactorEventLoop):
def _make_subprocess_transport(self, protocol, args, shell,
stdin, stdout, stderr, bufsize,
extra=None, **kwargs):
- waiter = futures.Future(loop=self)
+ waiter = self.create_future()
transp = _WindowsSubprocessTransport(self, protocol, args, shell,
stdin, stdout, stderr, bufsize,
waiter=waiter, extra=extra,
@@ -417,7 +417,7 @@ class IocpProactor:
return tmp
def _result(self, value):
- fut = futures.Future(loop=self._loop)
+ fut = self._loop.create_future()
fut.set_result(value)
return fut
diff --git a/Lib/asyncore.py b/Lib/asyncore.py
index 00a6396dd4..3b51f0f337 100644
--- a/Lib/asyncore.py
+++ b/Lib/asyncore.py
@@ -57,8 +57,8 @@ from errno import EALREADY, EINPROGRESS, EWOULDBLOCK, ECONNRESET, EINVAL, \
ENOTCONN, ESHUTDOWN, EISCONN, EBADF, ECONNABORTED, EPIPE, EAGAIN, \
errorcode
-_DISCONNECTED = frozenset((ECONNRESET, ENOTCONN, ESHUTDOWN, ECONNABORTED, EPIPE,
- EBADF))
+_DISCONNECTED = frozenset({ECONNRESET, ENOTCONN, ESHUTDOWN, ECONNABORTED, EPIPE,
+ EBADF})
try:
socket_map
@@ -141,10 +141,7 @@ def poll(timeout=0.0, map=None):
time.sleep(timeout)
return
- try:
- r, w, e = select.select(r, w, e, timeout)
- except InterruptedError:
- return
+ r, w, e = select.select(r, w, e, timeout)
for fd in r:
obj = map.get(fd)
@@ -182,10 +179,8 @@ def poll2(timeout=0.0, map=None):
flags |= select.POLLOUT
if flags:
pollster.register(fd, flags)
- try:
- r = pollster.poll(timeout)
- except InterruptedError:
- r = []
+
+ r = pollster.poll(timeout)
for fd, flags in r:
obj = map.get(fd)
if obj is None:
@@ -220,7 +215,7 @@ class dispatcher:
connecting = False
closing = False
addr = None
- ignore_log_types = frozenset(['warning'])
+ ignore_log_types = frozenset({'warning'})
def __init__(self, sock=None, map=None):
if map is None:
@@ -255,7 +250,7 @@ class dispatcher:
self.socket = None
def __repr__(self):
- status = [self.__class__.__module__+"."+self.__class__.__name__]
+ status = [self.__class__.__module__+"."+self.__class__.__qualname__]
if self.accepting and self.addr:
status.append('listening')
elif self.connected:
@@ -404,20 +399,6 @@ class dispatcher:
if why.args[0] not in (ENOTCONN, EBADF):
raise
- # cheap inheritance, used to pass all other attribute
- # references to the underlying socket object.
- def __getattr__(self, attr):
- try:
- retattr = getattr(self.socket, attr)
- except AttributeError:
- raise AttributeError("%s instance has no attribute '%s'"
- %(self.__class__.__name__, attr))
- else:
- msg = "%(me)s.%(attr)s is deprecated; use %(me)s.socket.%(attr)s " \
- "instead" % {'me' : self.__class__.__name__, 'attr' : attr}
- warnings.warn(msg, DeprecationWarning, stacklevel=2)
- return retattr
-
# log and log_info may be overridden to provide more sophisticated
# logging and warning methods. In general, log is for 'hit' logging
# and 'log_info' is for informational, warning and error logging.
@@ -604,8 +585,6 @@ def close_all(map=None, ignore_all=False):
# Regardless, this is useful for pipes, and stdin/stdout...
if os.name == 'posix':
- import fcntl
-
class file_wrapper:
# Here we override just enough to make a file
# look like a socket for the purposes of asyncore.
@@ -656,9 +635,7 @@ if os.name == 'posix':
pass
self.set_file(fd)
# set it to non-blocking mode
- flags = fcntl.fcntl(fd, fcntl.F_GETFL, 0)
- flags = flags | os.O_NONBLOCK
- fcntl.fcntl(fd, fcntl.F_SETFL, flags)
+ os.set_blocking(fd, False)
def set_file(self, fd):
self.socket = file_wrapper(fd)
diff --git a/Lib/base64.py b/Lib/base64.py
index 640f787c73..adaec1de61 100755
--- a/Lib/base64.py
+++ b/Lib/base64.py
@@ -12,7 +12,7 @@ import binascii
__all__ = [
- # Legacy interface exports traditional RFC 1521 Base64 encodings
+ # Legacy interface exports traditional RFC 2045 Base64 encodings
'encode', 'decode', 'encodebytes', 'decodebytes',
# Generalized interface for other encodings
'b64encode', 'b64decode', 'b32encode', 'b32decode',
@@ -49,14 +49,11 @@ def _bytes_from_decode_data(s):
# Base64 encoding/decoding uses binascii
def b64encode(s, altchars=None):
- """Encode a byte string using Base64.
+ """Encode the bytes-like object s using Base64 and return a bytes object.
- s is the byte string to encode. Optional altchars must be a byte
- string of length 2 which specifies an alternative alphabet for the
- '+' and '/' characters. This allows an application to
- e.g. generate url or filesystem safe Base64 strings.
-
- The encoded byte string is returned.
+ Optional altchars should be a byte string of length 2 which specifies an
+ alternative alphabet for the '+' and '/' characters. This allows an
+ application to e.g. generate url or filesystem safe Base64 strings.
"""
# Strip off the trailing newline
encoded = binascii.b2a_base64(s)[:-1]
@@ -67,18 +64,19 @@ def b64encode(s, altchars=None):
def b64decode(s, altchars=None, validate=False):
- """Decode a Base64 encoded byte string.
+ """Decode the Base64 encoded bytes-like object or ASCII string s.
- s is the byte string to decode. Optional altchars must be a
- string of length 2 which specifies the alternative alphabet used
- instead of the '+' and '/' characters.
+ Optional altchars must be a bytes-like object or ASCII string of length 2
+ which specifies the alternative alphabet used instead of the '+' and '/'
+ characters.
- The decoded string is returned. A binascii.Error is raised if s is
- incorrectly padded.
+ The result is returned as a bytes object. A binascii.Error is raised if
+ s is incorrectly padded.
- If validate is False (the default), non-base64-alphabet characters are
- discarded prior to the padding check. If validate is True,
- non-base64-alphabet characters in the input result in a binascii.Error.
+ If validate is False (the default), characters that are neither in the
+ normal base-64 alphabet nor the alternative alphabet are discarded prior
+ to the padding check. If validate is True, these non-alphabet characters
+ in the input result in a binascii.Error.
"""
s = _bytes_from_decode_data(s)
if altchars is not None:
@@ -91,19 +89,19 @@ def b64decode(s, altchars=None, validate=False):
def standard_b64encode(s):
- """Encode a byte string using the standard Base64 alphabet.
+ """Encode bytes-like object s using the standard Base64 alphabet.
- s is the byte string to encode. The encoded byte string is returned.
+ The result is returned as a bytes object.
"""
return b64encode(s)
def standard_b64decode(s):
- """Decode a byte string encoded with the standard Base64 alphabet.
+ """Decode bytes encoded with the standard Base64 alphabet.
- s is the byte string to decode. The decoded byte string is
- returned. binascii.Error is raised if the input is incorrectly
- padded or if there are non-alphabet characters present in the
- input.
+ Argument s is a bytes-like object or ASCII string to decode. The result
+ is returned as a bytes object. A binascii.Error is raised if the input
+ is incorrectly padded. Characters that are not in the standard alphabet
+ are discarded prior to the padding check.
"""
return b64decode(s)
@@ -112,21 +110,22 @@ _urlsafe_encode_translation = bytes.maketrans(b'+/', b'-_')
_urlsafe_decode_translation = bytes.maketrans(b'-_', b'+/')
def urlsafe_b64encode(s):
- """Encode a byte string using a url-safe Base64 alphabet.
+ """Encode bytes using the URL- and filesystem-safe Base64 alphabet.
- s is the byte string to encode. The encoded byte string is
- returned. The alphabet uses '-' instead of '+' and '_' instead of
+ Argument s is a bytes-like object to encode. The result is returned as a
+ bytes object. The alphabet uses '-' instead of '+' and '_' instead of
'/'.
"""
return b64encode(s).translate(_urlsafe_encode_translation)
def urlsafe_b64decode(s):
- """Decode a byte string encoded with the standard Base64 alphabet.
+ """Decode bytes using the URL- and filesystem-safe Base64 alphabet.
- s is the byte string to decode. The decoded byte string is
- returned. binascii.Error is raised if the input is incorrectly
- padded or if there are non-alphabet characters present in the
- input.
+ Argument s is a bytes-like object or ASCII string to decode. The result
+ is returned as a bytes object. A binascii.Error is raised if the input
+ is incorrectly padded. Characters that are not in the URL-safe base-64
+ alphabet, and are not a plus '+' or slash '/', are discarded prior to the
+ padding check.
The alphabet uses '-' instead of '+' and '_' instead of '/'.
"""
@@ -142,9 +141,7 @@ _b32tab2 = None
_b32rev = None
def b32encode(s):
- """Encode a byte string using Base32.
-
- s is the byte string to encode. The encoded byte string is returned.
+ """Encode the bytes-like object s using Base32 and return a bytes object.
"""
global _b32tab2
# Delay the initialization of the table to not waste memory
@@ -182,11 +179,10 @@ def b32encode(s):
return bytes(encoded)
def b32decode(s, casefold=False, map01=None):
- """Decode a Base32 encoded byte string.
+ """Decode the Base32 encoded bytes-like object or ASCII string s.
- s is the byte string to decode. Optional casefold is a flag
- specifying whether a lowercase alphabet is acceptable as input.
- For security purposes, the default is False.
+ Optional casefold is a flag specifying whether a lowercase alphabet is
+ acceptable as input. For security purposes, the default is False.
RFC 3548 allows for optional mapping of the digit 0 (zero) to the
letter O (oh), and for optional mapping of the digit 1 (one) to
@@ -196,7 +192,7 @@ def b32decode(s, casefold=False, map01=None):
the letter O). For security purposes the default is None, so that
0 and 1 are not allowed in the input.
- The decoded byte string is returned. binascii.Error is raised if
+ The result is returned as a bytes object. A binascii.Error is raised if
the input is incorrectly padded or if there are non-alphabet
characters present in the input.
"""
@@ -257,23 +253,20 @@ def b32decode(s, casefold=False, map01=None):
# lowercase. The RFC also recommends against accepting input case
# insensitively.
def b16encode(s):
- """Encode a byte string using Base16.
-
- s is the byte string to encode. The encoded byte string is returned.
+ """Encode the bytes-like object s using Base16 and return a bytes object.
"""
return binascii.hexlify(s).upper()
def b16decode(s, casefold=False):
- """Decode a Base16 encoded byte string.
+ """Decode the Base16 encoded bytes-like object or ASCII string s.
- s is the byte string to decode. Optional casefold is a flag
- specifying whether a lowercase alphabet is acceptable as input.
- For security purposes, the default is False.
+ Optional casefold is a flag specifying whether a lowercase alphabet is
+ acceptable as input. For security purposes, the default is False.
- The decoded byte string is returned. binascii.Error is raised if
- s were incorrectly padded or if there are non-alphabet characters
- present in the string.
+ The result is returned as a bytes object. A binascii.Error is raised if
+ s is incorrectly padded or if there are non-alphabet characters present
+ in the input.
"""
s = _bytes_from_decode_data(s)
if casefold:
@@ -316,19 +309,17 @@ def _85encode(b, chars, chars2, pad=False, foldnuls=False, foldspaces=False):
return b''.join(chunks)
def a85encode(b, *, foldspaces=False, wrapcol=0, pad=False, adobe=False):
- """Encode a byte string using Ascii85.
-
- b is the byte string to encode. The encoded byte string is returned.
+ """Encode bytes-like object b using Ascii85 and return a bytes object.
foldspaces is an optional flag that uses the special short sequence 'y'
instead of 4 consecutive spaces (ASCII 0x20) as supported by 'btoa'. This
feature is not supported by the "standard" Adobe encoding.
- wrapcol controls whether the output should have newline ('\\n') characters
+ wrapcol controls whether the output should have newline (b'\\n') characters
added to it. If this is non-zero, each output line will be at most this
many characters long.
- pad controls whether the input string is padded to a multiple of 4 before
+ pad controls whether the input is padded to a multiple of 4 before
encoding. Note that the btoa implementation always pads.
adobe controls whether the encoded byte sequence is framed with <~ and ~>,
@@ -359,9 +350,7 @@ def a85encode(b, *, foldspaces=False, wrapcol=0, pad=False, adobe=False):
return result
def a85decode(b, *, foldspaces=False, adobe=False, ignorechars=b' \t\n\r\v'):
- """Decode an Ascii85 encoded byte string.
-
- s is the byte string to decode.
+ """Decode the Ascii85 encoded bytes-like object or ASCII string b.
foldspaces is a flag that specifies whether the 'y' short sequence should be
accepted as shorthand for 4 consecutive spaces (ASCII 0x20). This feature is
@@ -373,13 +362,20 @@ def a85decode(b, *, foldspaces=False, adobe=False, ignorechars=b' \t\n\r\v'):
ignorechars should be a byte string containing characters to ignore from the
input. This should only contain whitespace characters, and by default
contains all whitespace characters in ASCII.
+
+ The result is returned as a bytes object.
"""
b = _bytes_from_decode_data(b)
if adobe:
- if not (b.startswith(_A85START) and b.endswith(_A85END)):
- raise ValueError("Ascii85 encoded byte sequences must be bracketed "
- "by {!r} and {!r}".format(_A85START, _A85END))
- b = b[2:-2] # Strip off start/end markers
+ if not b.endswith(_A85END):
+ raise ValueError(
+ "Ascii85 encoded byte sequences must end "
+ "with {!r}".format(_A85END)
+ )
+ if b.startswith(_A85START):
+ b = b[2:-2] # Strip off start/end markers
+ else:
+ b = b[:-2]
#
# We have to go through this stepwise, so as to ignore spaces and handle
# special short sequences
@@ -432,10 +428,10 @@ _b85chars2 = None
_b85dec = None
def b85encode(b, pad=False):
- """Encode an ASCII-encoded byte array in base85 format.
+ """Encode bytes-like object b in base85 format and return a bytes object.
- If pad is true, the input is padded with "\\0" so its length is a multiple of
- 4 characters before encoding.
+ If pad is true, the input is padded with b'\\0' so its length is a multiple of
+ 4 bytes before encoding.
"""
global _b85chars, _b85chars2
# Delay the initialization of tables to not waste memory
@@ -446,7 +442,10 @@ def b85encode(b, pad=False):
return _85encode(b, _b85chars, _b85chars2, pad)
def b85decode(b):
- """Decode base85-encoded byte array"""
+ """Decode the base85-encoded bytes-like object or ASCII string b
+
+ The result is returned as a bytes object.
+ """
global _b85dec
# Delay the initialization of tables to not waste memory
# if the function is never called
@@ -531,7 +530,7 @@ def _input_type_check(s):
def encodebytes(s):
- """Encode a bytestring into a bytestring containing multiple lines
+ """Encode a bytestring into a bytes object containing multiple lines
of base-64 data."""
_input_type_check(s)
pieces = []
@@ -549,7 +548,7 @@ def encodestring(s):
def decodebytes(s):
- """Decode a bytestring of base-64 data into a bytestring."""
+ """Decode a bytestring of base-64 data into a bytes object."""
_input_type_check(s)
return binascii.a2b_base64(s)
diff --git a/Lib/binhex.py b/Lib/binhex.py
index 8272d5ca33..56b5f852c0 100644
--- a/Lib/binhex.py
+++ b/Lib/binhex.py
@@ -235,14 +235,13 @@ def binhex(inp, out):
finfo = getfileinfo(inp)
ofp = BinHex(finfo, out)
- ifp = io.open(inp, 'rb')
- # XXXX Do textfile translation on non-mac systems
- while True:
- d = ifp.read(128000)
- if not d: break
- ofp.write(d)
- ofp.close_data()
- ifp.close()
+ with io.open(inp, 'rb') as ifp:
+ # XXXX Do textfile translation on non-mac systems
+ while True:
+ d = ifp.read(128000)
+ if not d: break
+ ofp.write(d)
+ ofp.close_data()
ifp = openrsrc(inp, 'rb')
while True:
@@ -459,13 +458,12 @@ def hexbin(inp, out):
if not out:
out = ifp.FName
- ofp = io.open(out, 'wb')
- # XXXX Do translation on non-mac systems
- while True:
- d = ifp.read(128000)
- if not d: break
- ofp.write(d)
- ofp.close()
+ with io.open(out, 'wb') as ofp:
+ # XXXX Do translation on non-mac systems
+ while True:
+ d = ifp.read(128000)
+ if not d: break
+ ofp.write(d)
ifp.close_data()
d = ifp.read_rsrc(128000)
diff --git a/Lib/bz2.py b/Lib/bz2.py
index 6c5a60d619..bc78c54485 100644
--- a/Lib/bz2.py
+++ b/Lib/bz2.py
@@ -12,6 +12,7 @@ __author__ = "Nadeem Vawda <nadeem.vawda@gmail.com>"
from builtins import open as _builtin_open
import io
import warnings
+import _compression
try:
from threading import RLock
@@ -23,13 +24,11 @@ from _bz2 import BZ2Compressor, BZ2Decompressor
_MODE_CLOSED = 0
_MODE_READ = 1
-_MODE_READ_EOF = 2
+# Value 2 no longer used
_MODE_WRITE = 3
-_BUFFER_SIZE = 8192
-
-class BZ2File(io.BufferedIOBase):
+class BZ2File(_compression.BaseStream):
"""A file object providing transparent bzip2 (de)compression.
@@ -61,13 +60,11 @@ class BZ2File(io.BufferedIOBase):
multiple compressed streams.
"""
# This lock must be recursive, so that BufferedIOBase's
- # readline(), readlines() and writelines() don't deadlock.
+ # writelines() does not deadlock.
self._lock = RLock()
self._fp = None
self._closefp = False
self._mode = _MODE_CLOSED
- self._pos = 0
- self._size = -1
if buffering is not None:
warnings.warn("Use of 'buffering' argument is deprecated",
@@ -79,9 +76,6 @@ class BZ2File(io.BufferedIOBase):
if mode in ("", "r", "rb"):
mode = "rb"
mode_code = _MODE_READ
- self._decompressor = BZ2Decompressor()
- self._buffer = b""
- self._buffer_offset = 0
elif mode in ("w", "wb"):
mode = "wb"
mode_code = _MODE_WRITE
@@ -107,6 +101,13 @@ class BZ2File(io.BufferedIOBase):
else:
raise TypeError("filename must be a str or bytes object, or a file")
+ if self._mode == _MODE_READ:
+ raw = _compression.DecompressReader(self._fp,
+ BZ2Decompressor, trailing_error=OSError)
+ self._buffer = io.BufferedReader(raw)
+ else:
+ self._pos = 0
+
def close(self):
"""Flush and close the file.
@@ -117,8 +118,8 @@ class BZ2File(io.BufferedIOBase):
if self._mode == _MODE_CLOSED:
return
try:
- if self._mode in (_MODE_READ, _MODE_READ_EOF):
- self._decompressor = None
+ if self._mode == _MODE_READ:
+ self._buffer.close()
elif self._mode == _MODE_WRITE:
self._fp.write(self._compressor.flush())
self._compressor = None
@@ -130,8 +131,7 @@ class BZ2File(io.BufferedIOBase):
self._fp = None
self._closefp = False
self._mode = _MODE_CLOSED
- self._buffer = b""
- self._buffer_offset = 0
+ self._buffer = None
@property
def closed(self):
@@ -145,125 +145,18 @@ class BZ2File(io.BufferedIOBase):
def seekable(self):
"""Return whether the file supports seeking."""
- return self.readable() and self._fp.seekable()
+ return self.readable() and self._buffer.seekable()
def readable(self):
"""Return whether the file was opened for reading."""
self._check_not_closed()
- return self._mode in (_MODE_READ, _MODE_READ_EOF)
+ return self._mode == _MODE_READ
def writable(self):
"""Return whether the file was opened for writing."""
self._check_not_closed()
return self._mode == _MODE_WRITE
- # Mode-checking helper functions.
-
- def _check_not_closed(self):
- if self.closed:
- raise ValueError("I/O operation on closed file")
-
- def _check_can_read(self):
- if self._mode not in (_MODE_READ, _MODE_READ_EOF):
- self._check_not_closed()
- raise io.UnsupportedOperation("File not open for reading")
-
- def _check_can_write(self):
- if self._mode != _MODE_WRITE:
- self._check_not_closed()
- raise io.UnsupportedOperation("File not open for writing")
-
- def _check_can_seek(self):
- if self._mode not in (_MODE_READ, _MODE_READ_EOF):
- self._check_not_closed()
- raise io.UnsupportedOperation("Seeking is only supported "
- "on files open for reading")
- if not self._fp.seekable():
- raise io.UnsupportedOperation("The underlying file object "
- "does not support seeking")
-
- # Fill the readahead buffer if it is empty. Returns False on EOF.
- def _fill_buffer(self):
- if self._mode == _MODE_READ_EOF:
- return False
- # Depending on the input data, our call to the decompressor may not
- # return any data. In this case, try again after reading another block.
- while self._buffer_offset == len(self._buffer):
- rawblock = (self._decompressor.unused_data or
- self._fp.read(_BUFFER_SIZE))
-
- if not rawblock:
- if self._decompressor.eof:
- # End-of-stream marker and end of file. We're good.
- self._mode = _MODE_READ_EOF
- self._size = self._pos
- return False
- else:
- # Problem - we were expecting more compressed data.
- raise EOFError("Compressed file ended before the "
- "end-of-stream marker was reached")
-
- if self._decompressor.eof:
- # Continue to next stream.
- self._decompressor = BZ2Decompressor()
- try:
- self._buffer = self._decompressor.decompress(rawblock)
- except OSError:
- # Trailing data isn't a valid bzip2 stream. We're done here.
- self._mode = _MODE_READ_EOF
- self._size = self._pos
- return False
- else:
- self._buffer = self._decompressor.decompress(rawblock)
- self._buffer_offset = 0
- return True
-
- # Read data until EOF.
- # If return_data is false, consume the data without returning it.
- def _read_all(self, return_data=True):
- # The loop assumes that _buffer_offset is 0. Ensure that this is true.
- self._buffer = self._buffer[self._buffer_offset:]
- self._buffer_offset = 0
-
- blocks = []
- while self._fill_buffer():
- if return_data:
- blocks.append(self._buffer)
- self._pos += len(self._buffer)
- self._buffer = b""
- if return_data:
- return b"".join(blocks)
-
- # Read a block of up to n bytes.
- # If return_data is false, consume the data without returning it.
- def _read_block(self, n, return_data=True):
- # If we have enough data buffered, return immediately.
- end = self._buffer_offset + n
- if end <= len(self._buffer):
- data = self._buffer[self._buffer_offset : end]
- self._buffer_offset = end
- self._pos += len(data)
- return data if return_data else None
-
- # The loop assumes that _buffer_offset is 0. Ensure that this is true.
- self._buffer = self._buffer[self._buffer_offset:]
- self._buffer_offset = 0
-
- blocks = []
- while n > 0 and self._fill_buffer():
- if n < len(self._buffer):
- data = self._buffer[:n]
- self._buffer_offset = n
- else:
- data = self._buffer
- self._buffer = b""
- if return_data:
- blocks.append(data)
- self._pos += len(data)
- n -= len(data)
- if return_data:
- return b"".join(blocks)
-
def peek(self, n=0):
"""Return buffered data without advancing the file position.
@@ -272,9 +165,10 @@ class BZ2File(io.BufferedIOBase):
"""
with self._lock:
self._check_can_read()
- if not self._fill_buffer():
- return b""
- return self._buffer[self._buffer_offset:]
+ # Relies on the undocumented fact that BufferedReader.peek()
+ # always returns at least one byte (except at EOF), independent
+ # of the value of n
+ return self._buffer.peek(n)
def read(self, size=-1):
"""Read up to size uncompressed bytes from the file.
@@ -284,47 +178,29 @@ class BZ2File(io.BufferedIOBase):
"""
with self._lock:
self._check_can_read()
- if size == 0:
- return b""
- elif size < 0:
- return self._read_all()
- else:
- return self._read_block(size)
+ return self._buffer.read(size)
def read1(self, size=-1):
"""Read up to size uncompressed bytes, while trying to avoid
- making multiple reads from the underlying stream.
+ making multiple reads from the underlying stream. Reads up to a
+ buffer's worth of data if size is negative.
Returns b'' if the file is at EOF.
"""
- # Usually, read1() calls _fp.read() at most once. However, sometimes
- # this does not give enough data for the decompressor to make progress.
- # In this case we make multiple reads, to avoid returning b"".
with self._lock:
self._check_can_read()
- if (size == 0 or
- # Only call _fill_buffer() if the buffer is actually empty.
- # This gives a significant speedup if *size* is small.
- (self._buffer_offset == len(self._buffer) and not self._fill_buffer())):
- return b""
- if size > 0:
- data = self._buffer[self._buffer_offset :
- self._buffer_offset + size]
- self._buffer_offset += len(data)
- else:
- data = self._buffer[self._buffer_offset:]
- self._buffer = b""
- self._buffer_offset = 0
- self._pos += len(data)
- return data
+ if size < 0:
+ size = io.DEFAULT_BUFFER_SIZE
+ return self._buffer.read1(size)
def readinto(self, b):
- """Read up to len(b) bytes into b.
+ """Read bytes into b.
Returns the number of bytes read (0 for EOF).
"""
with self._lock:
- return io.BufferedIOBase.readinto(self, b)
+ self._check_can_read()
+ return self._buffer.readinto(b)
def readline(self, size=-1):
"""Read a line of uncompressed bytes from the file.
@@ -339,15 +215,7 @@ class BZ2File(io.BufferedIOBase):
size = size.__index__()
with self._lock:
self._check_can_read()
- # Shortcut for the common case - the whole line is in the buffer.
- if size < 0:
- end = self._buffer.find(b"\n", self._buffer_offset) + 1
- if end > 0:
- line = self._buffer[self._buffer_offset : end]
- self._buffer_offset = end
- self._pos += len(line)
- return line
- return io.BufferedIOBase.readline(self, size)
+ return self._buffer.readline(size)
def readlines(self, size=-1):
"""Read a list of lines of uncompressed bytes from the file.
@@ -361,7 +229,8 @@ class BZ2File(io.BufferedIOBase):
raise TypeError("Integer argument expected")
size = size.__index__()
with self._lock:
- return io.BufferedIOBase.readlines(self, size)
+ self._check_can_read()
+ return self._buffer.readlines(size)
def write(self, data):
"""Write a byte string to the file.
@@ -386,18 +255,9 @@ class BZ2File(io.BufferedIOBase):
Line separators are not added between the written byte strings.
"""
with self._lock:
- return io.BufferedIOBase.writelines(self, seq)
-
- # Rewind the file to the beginning of the data stream.
- def _rewind(self):
- self._fp.seek(0, 0)
- self._mode = _MODE_READ
- self._pos = 0
- self._decompressor = BZ2Decompressor()
- self._buffer = b""
- self._buffer_offset = 0
-
- def seek(self, offset, whence=0):
+ return _compression.BaseStream.writelines(self, seq)
+
+ def seek(self, offset, whence=io.SEEK_SET):
"""Change the file position.
The new position is specified by offset, relative to the
@@ -414,35 +274,14 @@ class BZ2File(io.BufferedIOBase):
"""
with self._lock:
self._check_can_seek()
-
- # Recalculate offset as an absolute file position.
- if whence == 0:
- pass
- elif whence == 1:
- offset = self._pos + offset
- elif whence == 2:
- # Seeking relative to EOF - we need to know the file's size.
- if self._size < 0:
- self._read_all(return_data=False)
- offset = self._size + offset
- else:
- raise ValueError("Invalid value for whence: %s" % (whence,))
-
- # Make it so that offset is the number of bytes to skip forward.
- if offset < self._pos:
- self._rewind()
- else:
- offset -= self._pos
-
- # Read and discard data until we reach the desired position.
- self._read_block(offset, return_data=False)
-
- return self._pos
+ return self._buffer.seek(offset, whence)
def tell(self):
"""Return the current file position."""
with self._lock:
self._check_not_closed()
+ if self._mode == _MODE_READ:
+ return self._buffer.tell()
return self._pos
diff --git a/Lib/cgi.py b/Lib/cgi.py
index 45badf6cc6..189c6d5b4a 100755
--- a/Lib/cgi.py
+++ b/Lib/cgi.py
@@ -184,7 +184,7 @@ def parse(fp=None, environ=os.environ, keep_blank_values=0, strict_parsing=0):
# parse query string function called from urlparse,
-# this is done in order to maintain backward compatiblity.
+# this is done in order to maintain backward compatibility.
def parse_qs(qs, keep_blank_values=0, strict_parsing=0):
"""Parse a query given as a string argument."""
@@ -566,6 +566,12 @@ class FieldStorage:
except AttributeError:
pass
+ def __enter__(self):
+ return self
+
+ def __exit__(self, *args):
+ self.file.close()
+
def __repr__(self):
"""Return a printable representation."""
return "FieldStorage(%r, %r, %r)" % (
diff --git a/Lib/cgitb.py b/Lib/cgitb.py
index 6eb52e764e..b29110018c 100644
--- a/Lib/cgitb.py
+++ b/Lib/cgitb.py
@@ -294,9 +294,8 @@ class Hook:
(fd, path) = tempfile.mkstemp(suffix=suffix, dir=self.logdir)
try:
- file = os.fdopen(fd, 'w')
- file.write(doc)
- file.close()
+ with os.fdopen(fd, 'w') as file:
+ file.write(doc)
msg = '%s contains the description of this error.' % path
except:
msg = 'Tried to save traceback to %s, but failed.' % path
diff --git a/Lib/code.py b/Lib/code.py
index f8184b6c22..53244e32ad 100644
--- a/Lib/code.py
+++ b/Lib/code.py
@@ -7,6 +7,7 @@
import sys
import traceback
+import argparse
from codeop import CommandCompiler, compile_command
__all__ = ["InteractiveInterpreter", "InteractiveConsole", "interact",
@@ -136,25 +137,18 @@ class InteractiveInterpreter:
The output is written by self.write(), below.
"""
+ sys.last_type, sys.last_value, last_tb = ei = sys.exc_info()
+ sys.last_traceback = last_tb
try:
- type, value, tb = sys.exc_info()
- sys.last_type = type
- sys.last_value = value
- sys.last_traceback = tb
- tblist = traceback.extract_tb(tb)
- del tblist[:1]
- lines = traceback.format_list(tblist)
- if lines:
- lines.insert(0, "Traceback (most recent call last):\n")
- lines.extend(traceback.format_exception_only(type, value))
+ lines = traceback.format_exception(ei[0], ei[1], last_tb.tb_next)
+ if sys.excepthook is sys.__excepthook__:
+ self.write(''.join(lines))
+ else:
+ # If someone has set sys.excepthook, we let that take precedence
+ # over self.write
+ sys.excepthook(ei[0], ei[1], last_tb)
finally:
- tblist = tb = None
- if sys.excepthook is sys.__excepthook__:
- self.write(''.join(lines))
- else:
- # If someone has set sys.excepthook, we let that take precedence
- # over self.write
- sys.excepthook(type, value, tb)
+ last_tb = ei = None
def write(self, data):
"""Write a string.
@@ -299,4 +293,12 @@ def interact(banner=None, readfunc=None, local=None):
if __name__ == "__main__":
- interact()
+ parser = argparse.ArgumentParser()
+ parser.add_argument('-q', action='store_true',
+ help="don't print version and copyright messages")
+ args = parser.parse_args()
+ if args.q or sys.flags.quiet:
+ banner = ''
+ else:
+ banner = None
+ interact(banner)
diff --git a/Lib/codecs.py b/Lib/codecs.py
index 6cdf3f4f6c..39ec8454ac 100644
--- a/Lib/codecs.py
+++ b/Lib/codecs.py
@@ -27,7 +27,8 @@ __all__ = ["register", "lookup", "open", "EncodedFile", "BOM", "BOM_BE",
"getincrementaldecoder", "getreader", "getwriter",
"encode", "decode", "iterencode", "iterdecode",
"strict_errors", "ignore_errors", "replace_errors",
- "xmlcharrefreplace_errors", "backslashreplace_errors",
+ "xmlcharrefreplace_errors",
+ "backslashreplace_errors", "namereplace_errors",
"register_error", "lookup_error"]
### Constants
@@ -105,8 +106,8 @@ class CodecInfo(tuple):
return self
def __repr__(self):
- return "<%s.%s object for encoding %s at 0x%x>" % \
- (self.__class__.__module__, self.__class__.__name__,
+ return "<%s.%s object for encoding %s at %#x>" % \
+ (self.__class__.__module__, self.__class__.__qualname__,
self.name, id(self))
class Codec:
@@ -126,7 +127,8 @@ class Codec:
'surrogateescape' - replace with private code points U+DCnn.
'xmlcharrefreplace' - Replace with the appropriate XML
character reference (only for encoding).
- 'backslashreplace' - Replace with backslashed escape sequences
+ 'backslashreplace' - Replace with backslashed escape sequences.
+ 'namereplace' - Replace with \\N{...} escape sequences
(only for encoding).
The set of allowed values can be extended via register_error.
@@ -358,7 +360,8 @@ class StreamWriter(Codec):
'xmlcharrefreplace' - Replace with the appropriate XML
character reference.
'backslashreplace' - Replace with backslashed escape
- sequences (only for encoding).
+ sequences.
+ 'namereplace' - Replace with \\N{...} escape sequences.
The set of allowed parameter values can be extended via
register_error.
@@ -428,7 +431,8 @@ class StreamReader(Codec):
'strict' - raise a ValueError (or a subclass)
'ignore' - ignore the character and continue with the next
- 'replace'- replace with a suitable replacement character;
+ 'replace'- replace with a suitable replacement character
+ 'backslashreplace' - Replace with backslashed escape sequences;
The set of allowed parameter values can be extended via
register_error.
@@ -1080,6 +1084,7 @@ try:
replace_errors = lookup_error("replace")
xmlcharrefreplace_errors = lookup_error("xmlcharrefreplace")
backslashreplace_errors = lookup_error("backslashreplace")
+ namereplace_errors = lookup_error("namereplace")
except LookupError:
# In --disable-unicode builds, these error handler are missing
strict_errors = None
@@ -1087,6 +1092,7 @@ except LookupError:
replace_errors = None
xmlcharrefreplace_errors = None
backslashreplace_errors = None
+ namereplace_errors = None
# Tell modulefinder that using codecs probably needs the encodings
# package
diff --git a/Lib/collections/__init__.py b/Lib/collections/__init__.py
index f94210efa2..ebe8ee7a83 100644
--- a/Lib/collections/__init__.py
+++ b/Lib/collections/__init__.py
@@ -1,3 +1,19 @@
+'''This module implements specialized container datatypes providing
+alternatives to Python's general purpose built-in containers, dict,
+list, set, and tuple.
+
+* namedtuple factory function for creating tuple subclasses with named fields
+* deque list-like container with fast appends and pops on either end
+* ChainMap dict-like class for creating a single view of multiple mappings
+* Counter dict subclass for counting hashable objects
+* OrderedDict dict subclass that remembers the order entries were added
+* defaultdict dict subclass that calls a factory function to supply missing values
+* UserDict wrapper around dictionary objects for easier dict subclassing
+* UserList wrapper around list objects for easier list subclassing
+* UserString wrapper around string objects for easier string subclassing
+
+'''
+
__all__ = ['deque', 'defaultdict', 'namedtuple', 'UserDict', 'UserList',
'UserString', 'Counter', 'OrderedDict', 'ChainMap']
@@ -7,7 +23,6 @@ from _collections_abc import *
import _collections_abc
__all__ += _collections_abc.__all__
-from _collections import deque, defaultdict
from operator import itemgetter as _itemgetter, eq as _eq
from keyword import iskeyword as _iskeyword
import sys as _sys
@@ -16,10 +31,40 @@ from _weakref import proxy as _proxy
from itertools import repeat as _repeat, chain as _chain, starmap as _starmap
from reprlib import recursive_repr as _recursive_repr
+try:
+ from _collections import deque
+except ImportError:
+ pass
+else:
+ MutableSequence.register(deque)
+
+try:
+ from _collections import defaultdict
+except ImportError:
+ pass
+
+
################################################################################
### OrderedDict
################################################################################
+class _OrderedDictKeysView(KeysView):
+
+ def __reversed__(self):
+ yield from reversed(self._mapping)
+
+class _OrderedDictItemsView(ItemsView):
+
+ def __reversed__(self):
+ for key in reversed(self._mapping):
+ yield (key, self._mapping[key])
+
+class _OrderedDictValuesView(ValuesView):
+
+ def __reversed__(self):
+ for key in reversed(self._mapping):
+ yield self._mapping[key]
+
class _Link(object):
__slots__ = 'prev', 'next', 'key', '__weakref__'
@@ -83,6 +128,8 @@ class OrderedDict(dict):
link_next = link.next
link_prev.next = link_next
link_next.prev = link_prev
+ link.prev = None
+ link.next = None
def __iter__(self):
'od.__iter__() <==> iter(od)'
@@ -166,9 +213,19 @@ class OrderedDict(dict):
return size
update = __update = MutableMapping.update
- keys = MutableMapping.keys
- values = MutableMapping.values
- items = MutableMapping.items
+
+ def keys(self):
+ "D.keys() -> a set-like object providing a view on D's keys"
+ return _OrderedDictKeysView(self)
+
+ def items(self):
+ "D.items() -> a set-like object providing a view on D's items"
+ return _OrderedDictItemsView(self)
+
+ def values(self):
+ "D.values() -> an object providing a view on D's values"
+ return _OrderedDictValuesView(self)
+
__ne__ = MutableMapping.__ne__
__marker = object()
@@ -233,6 +290,13 @@ class OrderedDict(dict):
return dict.__eq__(self, other)
+try:
+ from _collections import OrderedDict
+except ImportError:
+ # Leave the pure Python version in place.
+ pass
+
+
################################################################################
### namedtuple
################################################################################
@@ -301,7 +365,7 @@ def namedtuple(typename, field_names, verbose=False, rename=False):
>>> x, y = p # unpack like a regular tuple
>>> x, y
(11, 22)
- >>> p.x + p.y # fields also accessable by name
+ >>> p.x + p.y # fields also accessible by name
33
>>> d = p._asdict() # convert to a dictionary
>>> d['x']
@@ -696,14 +760,22 @@ class Counter(dict):
def __pos__(self):
'Adds an empty counter, effectively stripping negative and zero counts'
- return self + Counter()
+ result = Counter()
+ for elem, count in self.items():
+ if count > 0:
+ result[elem] = count
+ return result
def __neg__(self):
'''Subtracts from an empty counter. Strips positive and zero counts,
and flips the sign on negative counts.
'''
- return Counter() - self
+ result = Counter()
+ for elem, count in self.items():
+ if count < 0:
+ result[elem] = 0 - count
+ return result
def _keep_positive(self):
'''Internal method to strip elements with a negative or zero count'''
@@ -778,7 +850,8 @@ class ChainMap(MutableMapping):
to create a single, updateable view.
The underlying mappings are stored in a list. That list is public and can
- accessed or updated using the *maps* attribute. There is no other state.
+ be accessed or updated using the *maps* attribute. There is no other
+ state.
Lookups search the underlying mappings successively until a key is found.
In contrast, writes, updates, and deletions only operate on the first
@@ -963,7 +1036,6 @@ class UserList(MutableSequence):
def __lt__(self, other): return self.data < self.__cast(other)
def __le__(self, other): return self.data <= self.__cast(other)
def __eq__(self, other): return self.data == self.__cast(other)
- def __ne__(self, other): return self.data != self.__cast(other)
def __gt__(self, other): return self.data > self.__cast(other)
def __ge__(self, other): return self.data >= self.__cast(other)
def __cast(self, other):
@@ -1035,15 +1107,13 @@ class UserString(Sequence):
def __float__(self): return float(self.data)
def __complex__(self): return complex(self.data)
def __hash__(self): return hash(self.data)
+ def __getnewargs__(self):
+ return (self.data[:],)
def __eq__(self, string):
if isinstance(string, UserString):
return self.data == string.data
return self.data == string
- def __ne__(self, string):
- if isinstance(string, UserString):
- return self.data != string.data
- return self.data != string
def __lt__(self, string):
if isinstance(string, UserString):
return self.data < string.data
@@ -1083,9 +1153,13 @@ class UserString(Sequence):
__rmul__ = __mul__
def __mod__(self, args):
return self.__class__(self.data % args)
+ def __rmod__(self, format):
+ return self.__class__(format % args)
# the following methods are defined in alphabetical order:
def capitalize(self): return self.__class__(self.data.capitalize())
+ def casefold(self):
+ return self.__class__(self.data.casefold())
def center(self, width, *args):
return self.__class__(self.data.center(width, *args))
def count(self, sub, start=0, end=_sys.maxsize):
@@ -1108,6 +1182,8 @@ class UserString(Sequence):
return self.data.find(sub, start, end)
def format(self, *args, **kwds):
return self.data.format(*args, **kwds)
+ def format_map(self, mapping):
+ return self.data.format_map(mapping)
def index(self, sub, start=0, end=_sys.maxsize):
return self.data.index(sub, start, end)
def isalpha(self): return self.data.isalpha()
@@ -1117,6 +1193,7 @@ class UserString(Sequence):
def isidentifier(self): return self.data.isidentifier()
def islower(self): return self.data.islower()
def isnumeric(self): return self.data.isnumeric()
+ def isprintable(self): return self.data.isprintable()
def isspace(self): return self.data.isspace()
def istitle(self): return self.data.istitle()
def isupper(self): return self.data.isupper()
@@ -1125,6 +1202,7 @@ class UserString(Sequence):
return self.__class__(self.data.ljust(width, *args))
def lower(self): return self.__class__(self.data.lower())
def lstrip(self, chars=None): return self.__class__(self.data.lstrip(chars))
+ maketrans = str.maketrans
def partition(self, sep):
return self.data.partition(sep)
def replace(self, old, new, maxsplit=-1):
diff --git a/Lib/compileall.py b/Lib/compileall.py
index 8e1569c58e..0cc0c1d530 100644
--- a/Lib/compileall.py
+++ b/Lib/compileall.py
@@ -1,4 +1,4 @@
-"""Module/script to byte-compile all .py files to .pyc (or .pyo) files.
+"""Module/script to byte-compile all .py files to .pyc files.
When called as a script with arguments, this compiles the directories
given as arguments recursively; the -l option prevents it from
@@ -16,32 +16,24 @@ import importlib.util
import py_compile
import struct
-__all__ = ["compile_dir","compile_file","compile_path"]
-
-def compile_dir(dir, maxlevels=10, ddir=None, force=False, rx=None,
- quiet=False, legacy=False, optimize=-1):
- """Byte-compile all modules in the given directory tree.
+try:
+ from concurrent.futures import ProcessPoolExecutor
+except ImportError:
+ ProcessPoolExecutor = None
+from functools import partial
- Arguments (only dir is required):
+__all__ = ["compile_dir","compile_file","compile_path"]
- dir: the directory to byte-compile
- maxlevels: maximum recursion level (default 10)
- ddir: the directory that will be prepended to the path to the
- file as it is compiled into each byte-code file.
- force: if True, force compilation, even if timestamps are up-to-date
- quiet: if True, be quiet during compilation
- legacy: if True, produce legacy pyc paths instead of PEP 3147 paths
- optimize: optimization level or -1 for level of the interpreter
- """
+def _walk_dir(dir, ddir=None, maxlevels=10, quiet=0):
if not quiet:
print('Listing {!r}...'.format(dir))
try:
names = os.listdir(dir)
except OSError:
- print("Can't list {!r}".format(dir))
+ if quiet < 2:
+ print("Can't list {!r}".format(dir))
names = []
names.sort()
- success = 1
for name in names:
if name == '__pycache__':
continue
@@ -51,17 +43,53 @@ def compile_dir(dir, maxlevels=10, ddir=None, force=False, rx=None,
else:
dfile = None
if not os.path.isdir(fullname):
- if not compile_file(fullname, ddir, force, rx, quiet,
- legacy, optimize):
- success = 0
+ yield fullname
elif (maxlevels > 0 and name != os.curdir and name != os.pardir and
os.path.isdir(fullname) and not os.path.islink(fullname)):
- if not compile_dir(fullname, maxlevels - 1, dfile, force, rx,
- quiet, legacy, optimize):
+ yield from _walk_dir(fullname, ddir=dfile,
+ maxlevels=maxlevels - 1, quiet=quiet)
+
+def compile_dir(dir, maxlevels=10, ddir=None, force=False, rx=None,
+ quiet=0, legacy=False, optimize=-1, workers=1):
+ """Byte-compile all modules in the given directory tree.
+
+ Arguments (only dir is required):
+
+ dir: the directory to byte-compile
+ maxlevels: maximum recursion level (default 10)
+ ddir: the directory that will be prepended to the path to the
+ file as it is compiled into each byte-code file.
+ force: if True, force compilation, even if timestamps are up-to-date
+ quiet: full output with False or 0, errors only with 1,
+ no output with 2
+ legacy: if True, produce legacy pyc paths instead of PEP 3147 paths
+ optimize: optimization level or -1 for level of the interpreter
+ workers: maximum number of parallel workers
+ """
+ files = _walk_dir(dir, quiet=quiet, maxlevels=maxlevels,
+ ddir=ddir)
+ success = 1
+ if workers is not None and workers != 1 and ProcessPoolExecutor is not None:
+ if workers < 0:
+ raise ValueError('workers must be greater or equal to 0')
+
+ workers = workers or None
+ with ProcessPoolExecutor(max_workers=workers) as executor:
+ results = executor.map(partial(compile_file,
+ ddir=ddir, force=force,
+ rx=rx, quiet=quiet,
+ legacy=legacy,
+ optimize=optimize),
+ files)
+ success = min(results, default=1)
+ else:
+ for file in files:
+ if not compile_file(file, ddir, force, rx, quiet,
+ legacy, optimize):
success = 0
return success
-def compile_file(fullname, ddir=None, force=False, rx=None, quiet=False,
+def compile_file(fullname, ddir=None, force=False, rx=None, quiet=0,
legacy=False, optimize=-1):
"""Byte-compile one file.
@@ -71,7 +99,8 @@ def compile_file(fullname, ddir=None, force=False, rx=None, quiet=False,
ddir: if given, the directory name compiled in to the
byte-code file.
force: if True, force compilation, even if timestamps are up-to-date
- quiet: if True, be quiet during compilation
+ quiet: full output with False or 0, errors only with 1,
+ no output with 2
legacy: if True, produce legacy pyc paths instead of PEP 3147 paths
optimize: optimization level or -1 for level of the interpreter
"""
@@ -87,11 +116,12 @@ def compile_file(fullname, ddir=None, force=False, rx=None, quiet=False,
return success
if os.path.isfile(fullname):
if legacy:
- cfile = fullname + ('c' if __debug__ else 'o')
+ cfile = fullname + 'c'
else:
if optimize >= 0:
+ opt = optimize if optimize >= 1 else ''
cfile = importlib.util.cache_from_source(
- fullname, debug_override=not optimize)
+ fullname, optimization=opt)
else:
cfile = importlib.util.cache_from_source(fullname)
cache_dir = os.path.dirname(cfile)
@@ -114,7 +144,10 @@ def compile_file(fullname, ddir=None, force=False, rx=None, quiet=False,
ok = py_compile.compile(fullname, cfile, dfile, True,
optimize=optimize)
except py_compile.PyCompileError as err:
- if quiet:
+ success = 0
+ if quiet >= 2:
+ return success
+ elif quiet:
print('*** Error compiling {!r}...'.format(fullname))
else:
print('*** ', end='')
@@ -123,20 +156,21 @@ def compile_file(fullname, ddir=None, force=False, rx=None, quiet=False,
errors='backslashreplace')
msg = msg.decode(sys.stdout.encoding)
print(msg)
- success = 0
except (SyntaxError, UnicodeError, OSError) as e:
- if quiet:
+ success = 0
+ if quiet >= 2:
+ return success
+ elif quiet:
print('*** Error compiling {!r}...'.format(fullname))
else:
print('*** ', end='')
print(e.__class__.__name__ + ':', e)
- success = 0
else:
if ok == 0:
success = 0
return success
-def compile_path(skip_curdir=1, maxlevels=0, force=False, quiet=False,
+def compile_path(skip_curdir=1, maxlevels=0, force=False, quiet=0,
legacy=False, optimize=-1):
"""Byte-compile all module on sys.path.
@@ -145,14 +179,15 @@ def compile_path(skip_curdir=1, maxlevels=0, force=False, quiet=False,
skip_curdir: if true, skip current directory (default True)
maxlevels: max recursion level (default 0)
force: as for compile_dir() (default False)
- quiet: as for compile_dir() (default False)
+ quiet: as for compile_dir() (default 0)
legacy: as for compile_dir() (default False)
optimize: as for compile_dir() (default -1)
"""
success = 1
for dir in sys.path:
if (not dir or dir == os.curdir) and skip_curdir:
- print('Skipping current directory')
+ if quiet < 2:
+ print('Skipping current directory')
else:
success = success and compile_dir(dir, maxlevels, None,
force, quiet=quiet,
@@ -169,10 +204,15 @@ def main():
parser.add_argument('-l', action='store_const', const=0,
default=10, dest='maxlevels',
help="don't recurse into subdirectories")
+ parser.add_argument('-r', type=int, dest='recursion',
+ help=('control the maximum recursion level. '
+ 'if `-l` and `-r` options are specified, '
+ 'then `-r` takes precedence.'))
parser.add_argument('-f', action='store_true', dest='force',
help='force rebuild even if timestamps are up to date')
- parser.add_argument('-q', action='store_true', dest='quiet',
- help='output only error messages')
+ parser.add_argument('-q', action='count', dest='quiet', default=0,
+ help='output only error messages; -qq will suppress '
+ 'the error messages as well.')
parser.add_argument('-b', action='store_true', dest='legacy',
help='use legacy (pre-PEP3147) compiled file locations')
parser.add_argument('-d', metavar='DESTDIR', dest='ddir', default=None,
@@ -192,14 +232,22 @@ def main():
help=('zero or more file and directory names '
'to compile; if no arguments given, defaults '
'to the equivalent of -l sys.path'))
- args = parser.parse_args()
+ parser.add_argument('-j', '--workers', default=1,
+ type=int, help='Run compileall concurrently')
+ args = parser.parse_args()
compile_dests = args.compile_dest
if args.rx:
import re
args.rx = re.compile(args.rx)
+
+ if args.recursion is not None:
+ maxlevels = args.recursion
+ else:
+ maxlevels = args.maxlevels
+
# if flist is provided then load it
if args.flist:
try:
@@ -207,9 +255,13 @@ def main():
for line in f:
compile_dests.append(line.strip())
except OSError:
- print("Error reading file list {}".format(args.flist))
+ if args.quiet < 2:
+ print("Error reading file list {}".format(args.flist))
return False
+ if args.workers is not None:
+ args.workers = args.workers or None
+
success = True
try:
if compile_dests:
@@ -219,16 +271,17 @@ def main():
args.quiet, args.legacy):
success = False
else:
- if not compile_dir(dest, args.maxlevels, args.ddir,
+ if not compile_dir(dest, maxlevels, args.ddir,
args.force, args.rx, args.quiet,
- args.legacy):
+ args.legacy, workers=args.workers):
success = False
return success
else:
return compile_path(legacy=args.legacy, force=args.force,
quiet=args.quiet)
except KeyboardInterrupt:
- print("\n[interrupted]")
+ if args.quiet < 2:
+ print("\n[interrupted]")
return False
return True
diff --git a/Lib/concurrent/futures/_base.py b/Lib/concurrent/futures/_base.py
index b2598339bb..295489c93e 100644
--- a/Lib/concurrent/futures/_base.py
+++ b/Lib/concurrent/futures/_base.py
@@ -302,17 +302,20 @@ class Future(object):
with self._condition:
if self._state == FINISHED:
if self._exception:
- return '<Future at %s state=%s raised %s>' % (
- hex(id(self)),
+ return '<%s at %#x state=%s raised %s>' % (
+ self.__class__.__name__,
+ id(self),
_STATE_TO_DESCRIPTION_MAP[self._state],
self._exception.__class__.__name__)
else:
- return '<Future at %s state=%s returned %s>' % (
- hex(id(self)),
+ return '<%s at %#x state=%s returned %s>' % (
+ self.__class__.__name__,
+ id(self),
_STATE_TO_DESCRIPTION_MAP[self._state],
self._result.__class__.__name__)
- return '<Future at %s state=%s>' % (
- hex(id(self)),
+ return '<%s at %#x state=%s>' % (
+ self.__class__.__name__,
+ id(self),
_STATE_TO_DESCRIPTION_MAP[self._state])
def cancel(self):
@@ -517,7 +520,7 @@ class Executor(object):
"""
raise NotImplementedError()
- def map(self, fn, *iterables, timeout=None):
+ def map(self, fn, *iterables, timeout=None, chunksize=1):
"""Returns an iterator equivalent to map(fn, iter).
Args:
@@ -525,6 +528,10 @@ class Executor(object):
passed iterables.
timeout: The maximum number of seconds to wait. If None, then there
is no limit on the wait time.
+ chunksize: The size of the chunks the iterable will be broken into
+ before being passed to a child process. This argument is only
+ used by ProcessPoolExecutor; it is ignored by
+ ThreadPoolExecutor.
Returns:
An iterator equivalent to: map(func, *iterables) but the calls may
diff --git a/Lib/concurrent/futures/process.py b/Lib/concurrent/futures/process.py
index 07b5225d1d..590edba24e 100644
--- a/Lib/concurrent/futures/process.py
+++ b/Lib/concurrent/futures/process.py
@@ -55,6 +55,9 @@ from multiprocessing import SimpleQueue
from multiprocessing.connection import wait
import threading
import weakref
+from functools import partial
+import itertools
+import traceback
# Workers are created as daemon threads and processes. This is done to allow the
# interpreter to exit when there are still idle processes in a
@@ -88,6 +91,27 @@ def _python_exit():
# (Futures in the call queue cannot be cancelled).
EXTRA_QUEUED_CALLS = 1
+# Hack to embed stringification of remote traceback in local traceback
+
+class _RemoteTraceback(Exception):
+ def __init__(self, tb):
+ self.tb = tb
+ def __str__(self):
+ return self.tb
+
+class _ExceptionWithTraceback:
+ def __init__(self, exc, tb):
+ tb = traceback.format_exception(type(exc), exc, tb)
+ tb = ''.join(tb)
+ self.exc = exc
+ self.tb = '\n"""\n%s"""' % tb
+ def __reduce__(self):
+ return _rebuild_exc, (self.exc, self.tb)
+
+def _rebuild_exc(exc, tb):
+ exc.__cause__ = _RemoteTraceback(tb)
+ return exc
+
class _WorkItem(object):
def __init__(self, future, fn, args, kwargs):
self.future = future
@@ -108,6 +132,26 @@ class _CallItem(object):
self.args = args
self.kwargs = kwargs
+def _get_chunks(*iterables, chunksize):
+ """ Iterates over zip()ed iterables in chunks. """
+ it = zip(*iterables)
+ while True:
+ chunk = tuple(itertools.islice(it, chunksize))
+ if not chunk:
+ return
+ yield chunk
+
+def _process_chunk(fn, chunk):
+ """ Processes a chunk of an iterable passed to map.
+
+ Runs the function passed to map() on a chunk of the
+ iterable passed to map.
+
+ This function is run in a separate process.
+
+ """
+ return [fn(*args) for args in chunk]
+
def _process_worker(call_queue, result_queue):
"""Evaluates calls from call_queue and places the results in result_queue.
@@ -130,8 +174,8 @@ def _process_worker(call_queue, result_queue):
try:
r = call_item.fn(*call_item.args, **call_item.kwargs)
except BaseException as e:
- result_queue.put(_ResultItem(call_item.work_id,
- exception=e))
+ exc = _ExceptionWithTraceback(e, e.__traceback__)
+ result_queue.put(_ResultItem(call_item.work_id, exception=exc))
else:
result_queue.put(_ResultItem(call_item.work_id,
result=r))
@@ -334,6 +378,9 @@ class ProcessPoolExecutor(_base.Executor):
if max_workers is None:
self._max_workers = os.cpu_count() or 1
else:
+ if max_workers <= 0:
+ raise ValueError("max_workers must be greater than 0")
+
self._max_workers = max_workers
# Make the call queue slightly larger than the number of processes to
@@ -408,6 +455,35 @@ class ProcessPoolExecutor(_base.Executor):
return f
submit.__doc__ = _base.Executor.submit.__doc__
+ def map(self, fn, *iterables, timeout=None, chunksize=1):
+ """Returns an iterator equivalent to map(fn, iter).
+
+ Args:
+ fn: A callable that will take as many arguments as there are
+ passed iterables.
+ timeout: The maximum number of seconds to wait. If None, then there
+ is no limit on the wait time.
+ chunksize: If greater than one, the iterables will be chopped into
+ chunks of size chunksize and submitted to the process pool.
+ If set to one, the items in the list will be sent one at a time.
+
+ Returns:
+ An iterator equivalent to: map(func, *iterables) but the calls may
+ be evaluated out-of-order.
+
+ Raises:
+ TimeoutError: If the entire result iterator could not be generated
+ before the given timeout.
+ Exception: If fn(*args) raises for any values.
+ """
+ if chunksize < 1:
+ raise ValueError("chunksize must be >= 1.")
+
+ results = super().map(partial(_process_chunk, fn),
+ _get_chunks(*iterables, chunksize=chunksize),
+ timeout=timeout)
+ return itertools.chain.from_iterable(results)
+
def shutdown(self, wait=True):
with self._shutdown_lock:
self._shutdown_thread = True
diff --git a/Lib/concurrent/futures/thread.py b/Lib/concurrent/futures/thread.py
index f9beb0f7f7..3ae442d987 100644
--- a/Lib/concurrent/futures/thread.py
+++ b/Lib/concurrent/futures/thread.py
@@ -10,6 +10,7 @@ from concurrent.futures import _base
import queue
import threading
import weakref
+import os
# Workers are created as daemon threads. This is done to allow the interpreter
# to exit when there are still idle threads in a ThreadPoolExecutor's thread
@@ -80,13 +81,20 @@ def _worker(executor_reference, work_queue):
_base.LOGGER.critical('Exception in worker', exc_info=True)
class ThreadPoolExecutor(_base.Executor):
- def __init__(self, max_workers):
+ def __init__(self, max_workers=None):
"""Initializes a new ThreadPoolExecutor instance.
Args:
max_workers: The maximum number of threads that can be used to
execute the given calls.
"""
+ if max_workers is None:
+ # Use this number because ThreadPoolExecutor is often
+ # used to overlap I/O instead of CPU work.
+ max_workers = (os.cpu_count() or 1) * 5
+ if max_workers <= 0:
+ raise ValueError("max_workers must be greater than 0")
+
self._max_workers = max_workers
self._work_queue = queue.Queue()
self._threads = set()
diff --git a/Lib/configparser.py b/Lib/configparser.py
index dcb7ec4df2..3a9fb56dc6 100644
--- a/Lib/configparser.py
+++ b/Lib/configparser.py
@@ -17,7 +17,8 @@ ConfigParser -- responsible for parsing a list of
__init__(defaults=None, dict_type=_default_dict, allow_no_value=False,
delimiters=('=', ':'), comment_prefixes=('#', ';'),
inline_comment_prefixes=None, strict=True,
- empty_lines_in_values=True):
+ empty_lines_in_values=True, default_section='DEFAULT',
+ interpolation=<unset>, converters=<unset>):
Create the parser. When `defaults' is given, it is initialized into the
dictionary or intrinsic defaults. The keys must be strings, the values
must be appropriate for %()s string interpolation.
@@ -47,6 +48,25 @@ ConfigParser -- responsible for parsing a list of
When `allow_no_value' is True (default: False), options without
values are accepted; the value presented for these is None.
+ When `default_section' is given, the name of the special section is
+ named accordingly. By default it is called ``"DEFAULT"`` but this can
+ be customized to point to any other valid section name. Its current
+ value can be retrieved using the ``parser_instance.default_section``
+ attribute and may be modified at runtime.
+
+ When `interpolation` is given, it should be an Interpolation subclass
+ instance. It will be used as the handler for option value
+ pre-processing when using getters. RawConfigParser object s don't do
+ any sort of interpolation, whereas ConfigParser uses an instance of
+ BasicInterpolation. The library also provides a ``zc.buildbot``
+ inspired ExtendedInterpolation implementation.
+
+ When `converters` is given, it should be a dictionary where each key
+ represents the name of a type converter and each value is a callable
+ implementing the conversion from string to the desired datatype. Every
+ converter gets its corresponding get*() method on the parser object and
+ section proxies.
+
sections()
Return all the configuration section names, sans DEFAULT.
@@ -129,9 +149,11 @@ import warnings
__all__ = ["NoSectionError", "DuplicateOptionError", "DuplicateSectionError",
"NoOptionError", "InterpolationError", "InterpolationDepthError",
- "InterpolationSyntaxError", "ParsingError",
- "MissingSectionHeaderError",
+ "InterpolationMissingOptionError", "InterpolationSyntaxError",
+ "ParsingError", "MissingSectionHeaderError",
"ConfigParser", "SafeConfigParser", "RawConfigParser",
+ "Interpolation", "BasicInterpolation", "ExtendedInterpolation",
+ "LegacyInterpolation", "SectionProxy", "ConverterMapping",
"DEFAULTSECT", "MAX_INTERPOLATION_DEPTH"]
DEFAULTSECT = "DEFAULT"
@@ -408,7 +430,7 @@ class BasicInterpolation(Interpolation):
v = map[var]
except KeyError:
raise InterpolationMissingOptionError(
- option, section, rawval, var)
+ option, section, rawval, var) from None
if "%" in v:
self._interpolate_some(parser, option, accum, v,
section, map, depth + 1)
@@ -481,7 +503,7 @@ class ExtendedInterpolation(Interpolation):
"More than one ':' found: %r" % (rest,))
except (KeyError, NoSectionError, NoOptionError):
raise InterpolationMissingOptionError(
- option, section, rawval, ":".join(path))
+ option, section, rawval, ":".join(path)) from None
if "$" in v:
self._interpolate_some(parser, opt, accum, v, sect,
dict(parser.items(sect, raw=True)),
@@ -514,7 +536,7 @@ class LegacyInterpolation(Interpolation):
value = value % vars
except KeyError as e:
raise InterpolationMissingOptionError(
- option, section, rawval, e.args[0])
+ option, section, rawval, e.args[0]) from None
else:
break
if value and "%(" in value:
@@ -579,11 +601,12 @@ class RawConfigParser(MutableMapping):
comment_prefixes=('#', ';'), inline_comment_prefixes=None,
strict=True, empty_lines_in_values=True,
default_section=DEFAULTSECT,
- interpolation=_UNSET):
+ interpolation=_UNSET, converters=_UNSET):
self._dict = dict_type
self._sections = self._dict()
self._defaults = self._dict()
+ self._converters = ConverterMapping(self)
self._proxies = self._dict()
self._proxies[default_section] = SectionProxy(self, default_section)
if defaults:
@@ -611,6 +634,8 @@ class RawConfigParser(MutableMapping):
self._interpolation = self._DEFAULT_INTERPOLATION
if self._interpolation is None:
self._interpolation = Interpolation()
+ if converters is not _UNSET:
+ self._converters.update(converters)
def defaults(self):
return self._defaults
@@ -646,7 +671,7 @@ class RawConfigParser(MutableMapping):
try:
opts = self._sections[section].copy()
except KeyError:
- raise NoSectionError(section)
+ raise NoSectionError(section) from None
opts.update(self._defaults)
return list(opts.keys())
@@ -774,36 +799,31 @@ class RawConfigParser(MutableMapping):
def _get(self, section, conv, option, **kwargs):
return conv(self.get(section, option, **kwargs))
- def getint(self, section, option, *, raw=False, vars=None,
- fallback=_UNSET):
+ def _get_conv(self, section, option, conv, *, raw=False, vars=None,
+ fallback=_UNSET, **kwargs):
try:
- return self._get(section, int, option, raw=raw, vars=vars)
+ return self._get(section, conv, option, raw=raw, vars=vars,
+ **kwargs)
except (NoSectionError, NoOptionError):
if fallback is _UNSET:
raise
- else:
- return fallback
+ return fallback
+
+ # getint, getfloat and getboolean provided directly for backwards compat
+ def getint(self, section, option, *, raw=False, vars=None,
+ fallback=_UNSET, **kwargs):
+ return self._get_conv(section, option, int, raw=raw, vars=vars,
+ fallback=fallback, **kwargs)
def getfloat(self, section, option, *, raw=False, vars=None,
- fallback=_UNSET):
- try:
- return self._get(section, float, option, raw=raw, vars=vars)
- except (NoSectionError, NoOptionError):
- if fallback is _UNSET:
- raise
- else:
- return fallback
+ fallback=_UNSET, **kwargs):
+ return self._get_conv(section, option, float, raw=raw, vars=vars,
+ fallback=fallback, **kwargs)
def getboolean(self, section, option, *, raw=False, vars=None,
- fallback=_UNSET):
- try:
- return self._get(section, self._convert_to_boolean, option,
- raw=raw, vars=vars)
- except (NoSectionError, NoOptionError):
- if fallback is _UNSET:
- raise
- else:
- return fallback
+ fallback=_UNSET, **kwargs):
+ return self._get_conv(section, option, self._convert_to_boolean,
+ raw=raw, vars=vars, fallback=fallback, **kwargs)
def items(self, section=_UNSET, raw=False, vars=None):
"""Return a list of (name, value) tuples for each option in a section.
@@ -875,7 +895,7 @@ class RawConfigParser(MutableMapping):
try:
sectdict = self._sections[section]
except KeyError:
- raise NoSectionError(section)
+ raise NoSectionError(section) from None
sectdict[self.optionxform(option)] = value
def write(self, fp, space_around_delimiters=True):
@@ -916,7 +936,7 @@ class RawConfigParser(MutableMapping):
try:
sectdict = self._sections[section]
except KeyError:
- raise NoSectionError(section)
+ raise NoSectionError(section) from None
option = self.optionxform(option)
existed = option in sectdict
if existed:
@@ -1153,6 +1173,10 @@ class RawConfigParser(MutableMapping):
if not isinstance(value, str):
raise TypeError("option values must be strings")
+ @property
+ def converters(self):
+ return self._converters
+
class ConfigParser(RawConfigParser):
"""ConfigParser implementing interpolation."""
@@ -1193,6 +1217,10 @@ class SectionProxy(MutableMapping):
"""Creates a view on a section of the specified `name` in `parser`."""
self._parser = parser
self._name = name
+ for conv in parser.converters:
+ key = 'get' + conv
+ getter = functools.partial(self.get, _impl=getattr(parser, key))
+ setattr(self, key, getter)
def __repr__(self):
return '<Section: {}>'.format(self._name)
@@ -1226,22 +1254,6 @@ class SectionProxy(MutableMapping):
else:
return self._parser.defaults()
- def get(self, option, fallback=None, *, raw=False, vars=None):
- return self._parser.get(self._name, option, raw=raw, vars=vars,
- fallback=fallback)
-
- def getint(self, option, fallback=None, *, raw=False, vars=None):
- return self._parser.getint(self._name, option, raw=raw, vars=vars,
- fallback=fallback)
-
- def getfloat(self, option, fallback=None, *, raw=False, vars=None):
- return self._parser.getfloat(self._name, option, raw=raw, vars=vars,
- fallback=fallback)
-
- def getboolean(self, option, fallback=None, *, raw=False, vars=None):
- return self._parser.getboolean(self._name, option, raw=raw, vars=vars,
- fallback=fallback)
-
@property
def parser(self):
# The parser object of the proxy is read-only.
@@ -1251,3 +1263,77 @@ class SectionProxy(MutableMapping):
def name(self):
# The name of the section on a proxy is read-only.
return self._name
+
+ def get(self, option, fallback=None, *, raw=False, vars=None,
+ _impl=None, **kwargs):
+ """Get an option value.
+
+ Unless `fallback` is provided, `None` will be returned if the option
+ is not found.
+
+ """
+ # If `_impl` is provided, it should be a getter method on the parser
+ # object that provides the desired type conversion.
+ if not _impl:
+ _impl = self._parser.get
+ return _impl(self._name, option, raw=raw, vars=vars,
+ fallback=fallback, **kwargs)
+
+
+class ConverterMapping(MutableMapping):
+ """Enables reuse of get*() methods between the parser and section proxies.
+
+ If a parser class implements a getter directly, the value for the given
+ key will be ``None``. The presence of the converter name here enables
+ section proxies to find and use the implementation on the parser class.
+ """
+
+ GETTERCRE = re.compile(r"^get(?P<name>.+)$")
+
+ def __init__(self, parser):
+ self._parser = parser
+ self._data = {}
+ for getter in dir(self._parser):
+ m = self.GETTERCRE.match(getter)
+ if not m or not callable(getattr(self._parser, getter)):
+ continue
+ self._data[m.group('name')] = None # See class docstring.
+
+ def __getitem__(self, key):
+ return self._data[key]
+
+ def __setitem__(self, key, value):
+ try:
+ k = 'get' + key
+ except TypeError:
+ raise ValueError('Incompatible key: {} (type: {})'
+ ''.format(key, type(key)))
+ if k == 'get':
+ raise ValueError('Incompatible key: cannot use "" as a name')
+ self._data[key] = value
+ func = functools.partial(self._parser._get_conv, conv=value)
+ func.converter = value
+ setattr(self._parser, k, func)
+ for proxy in self._parser.values():
+ getter = functools.partial(proxy.get, _impl=func)
+ setattr(proxy, k, getter)
+
+ def __delitem__(self, key):
+ try:
+ k = 'get' + (key or None)
+ except TypeError:
+ raise KeyError(key)
+ del self._data[key]
+ for inst in itertools.chain((self._parser,), self._parser.values()):
+ try:
+ delattr(inst, k)
+ except AttributeError:
+ # don't raise since the entry was present in _data, silently
+ # clean up
+ continue
+
+ def __iter__(self):
+ return iter(self._data)
+
+ def __len__(self):
+ return len(self._data)
diff --git a/Lib/contextlib.py b/Lib/contextlib.py
index 07b2261115..5377987ddf 100644
--- a/Lib/contextlib.py
+++ b/Lib/contextlib.py
@@ -5,7 +5,7 @@ from collections import deque
from functools import wraps
__all__ = ["contextmanager", "closing", "ContextDecorator", "ExitStack",
- "redirect_stdout", "suppress"]
+ "redirect_stdout", "redirect_stderr", "suppress"]
class ContextDecorator(object):
@@ -77,10 +77,17 @@ class _GeneratorContextManager(ContextDecorator):
self.gen.throw(type, value, traceback)
raise RuntimeError("generator didn't stop after throw()")
except StopIteration as exc:
- # Suppress the exception *unless* it's the same exception that
+ # Suppress StopIteration *unless* it's the same exception that
# was passed to throw(). This prevents a StopIteration
- # raised inside the "with" statement from being suppressed
+ # raised inside the "with" statement from being suppressed.
return exc is not value
+ except RuntimeError as exc:
+ # Likewise, avoid suppressing if a StopIteration exception
+ # was passed to throw() and later wrapped into a RuntimeError
+ # (see PEP 479).
+ if exc.__cause__ is value:
+ return False
+ raise
except:
# only re-raise if it's *not* the exception that was
# passed to throw(), because __exit__() must not raise
@@ -151,8 +158,27 @@ class closing(object):
def __exit__(self, *exc_info):
self.thing.close()
-class redirect_stdout:
- """Context manager for temporarily redirecting stdout to another file
+
+class _RedirectStream:
+
+ _stream = None
+
+ def __init__(self, new_target):
+ self._new_target = new_target
+ # We use a list of old targets to make this CM re-entrant
+ self._old_targets = []
+
+ def __enter__(self):
+ self._old_targets.append(getattr(sys, self._stream))
+ setattr(sys, self._stream, self._new_target)
+ return self._new_target
+
+ def __exit__(self, exctype, excinst, exctb):
+ setattr(sys, self._stream, self._old_targets.pop())
+
+
+class redirect_stdout(_RedirectStream):
+ """Context manager for temporarily redirecting stdout to another file.
# How to send help() to stderr
with redirect_stdout(sys.stderr):
@@ -164,18 +190,13 @@ class redirect_stdout:
help(pow)
"""
- def __init__(self, new_target):
- self._new_target = new_target
- # We use a list of old targets to make this CM re-entrant
- self._old_targets = []
+ _stream = "stdout"
- def __enter__(self):
- self._old_targets.append(sys.stdout)
- sys.stdout = self._new_target
- return self._new_target
- def __exit__(self, exctype, excinst, exctb):
- sys.stdout = self._old_targets.pop()
+class redirect_stderr(_RedirectStream):
+ """Context manager for temporarily redirecting stderr to another file."""
+
+ _stream = "stderr"
class suppress:
diff --git a/Lib/copy.py b/Lib/copy.py
index f0fb443777..972b94ab49 100644
--- a/Lib/copy.py
+++ b/Lib/copy.py
@@ -94,7 +94,7 @@ def copy(x):
else:
reductor = getattr(x, "__reduce_ex__", None)
if reductor:
- rv = reductor(2)
+ rv = reductor(4)
else:
reductor = getattr(x, "__reduce__", None)
if reductor:
@@ -171,7 +171,7 @@ def deepcopy(x, memo=None, _nil=[]):
else:
reductor = getattr(x, "__reduce_ex__", None)
if reductor:
- rv = reductor(2)
+ rv = reductor(4)
else:
reductor = getattr(x, "__reduce__", None)
if reductor:
@@ -207,7 +207,6 @@ try:
except AttributeError:
pass
d[type] = _deepcopy_atomic
-d[range] = _deepcopy_atomic
d[types.BuiltinFunctionType] = _deepcopy_atomic
d[types.FunctionType] = _deepcopy_atomic
d[weakref.ref] = _deepcopy_atomic
@@ -221,17 +220,15 @@ def _deepcopy_list(x, memo):
d[list] = _deepcopy_list
def _deepcopy_tuple(x, memo):
- y = []
- for a in x:
- y.append(deepcopy(a, memo))
+ y = [deepcopy(a, memo) for a in x]
# We're not going to put the tuple in the memo, but it's still important we
# check for it, in case the tuple contains recursive mutable structures.
try:
return memo[id(x)]
except KeyError:
pass
- for i in range(len(x)):
- if x[i] is not y[i]:
+ for k, j in zip(x, y):
+ if k is not j:
y = tuple(y)
break
else:
diff --git a/Lib/csv.py b/Lib/csv.py
index a56eed88c8..ca40e5e0ef 100644
--- a/Lib/csv.py
+++ b/Lib/csv.py
@@ -147,16 +147,13 @@ class DictWriter:
if wrong_fields:
raise ValueError("dict contains fields not in fieldnames: "
+ ", ".join([repr(x) for x in wrong_fields]))
- return [rowdict.get(key, self.restval) for key in self.fieldnames]
+ return (rowdict.get(key, self.restval) for key in self.fieldnames)
def writerow(self, rowdict):
return self.writer.writerow(self._dict_to_list(rowdict))
def writerows(self, rowdicts):
- rows = []
- for rowdict in rowdicts:
- rows.append(self._dict_to_list(rowdict))
- return self.writer.writerows(rows)
+ return self.writer.writerows(map(self._dict_to_list, rowdicts))
# Guard Sniffer's type checking against builds that exclude complex()
try:
@@ -231,20 +228,21 @@ class Sniffer:
quotes = {}
delims = {}
spaces = 0
+ groupindex = regexp.groupindex
for m in matches:
- n = regexp.groupindex['quote'] - 1
+ n = groupindex['quote'] - 1
key = m[n]
if key:
quotes[key] = quotes.get(key, 0) + 1
try:
- n = regexp.groupindex['delim'] - 1
+ n = groupindex['delim'] - 1
key = m[n]
except KeyError:
continue
if key and (delimiters is None or key in delimiters):
delims[key] = delims.get(key, 0) + 1
try:
- n = regexp.groupindex['space'] - 1
+ n = groupindex['space'] - 1
except KeyError:
continue
if m[n]:
diff --git a/Lib/ctypes/__init__.py b/Lib/ctypes/__init__.py
index 5c803ffcb3..0d860784bc 100644
--- a/Lib/ctypes/__init__.py
+++ b/Lib/ctypes/__init__.py
@@ -47,7 +47,7 @@ from _ctypes import FUNCFLAG_CDECL as _FUNCFLAG_CDECL, \
def create_string_buffer(init, size=None):
"""create_string_buffer(aBytes) -> character array
create_string_buffer(anInteger) -> character array
- create_string_buffer(aString, anInteger) -> character array
+ create_string_buffer(aBytes, anInteger) -> character array
"""
if isinstance(init, bytes):
if size is None:
@@ -237,14 +237,8 @@ _check_size(c_char)
class c_char_p(_SimpleCData):
_type_ = "z"
- if _os.name == "nt":
- def __repr__(self):
- if not windll.kernel32.IsBadStringPtrA(self, -1):
- return "%s(%r)" % (self.__class__.__name__, self.value)
- return "%s(%s)" % (self.__class__.__name__, cast(self, c_void_p).value)
- else:
- def __repr__(self):
- return "%s(%s)" % (self.__class__.__name__, cast(self, c_void_p).value)
+ def __repr__(self):
+ return "%s(%s)" % (self.__class__.__name__, c_void_p.from_buffer(self).value)
_check_size(c_char_p, "P")
class c_void_p(_SimpleCData):
@@ -259,6 +253,8 @@ from _ctypes import POINTER, pointer, _pointer_type_cache
class c_wchar_p(_SimpleCData):
_type_ = "Z"
+ def __repr__(self):
+ return "%s(%s)" % (self.__class__.__name__, c_void_p.from_buffer(self).value)
class c_wchar(_SimpleCData):
_type_ = "u"
@@ -353,7 +349,7 @@ class CDLL(object):
self._handle = handle
def __repr__(self):
- return "<%s '%s', handle %x at %x>" % \
+ return "<%s '%s', handle %x at %#x>" % \
(self.__class__.__name__, self._name,
(self._handle & (_sys.maxsize*2 + 1)),
id(self) & (_sys.maxsize*2 + 1))
@@ -372,8 +368,8 @@ class CDLL(object):
return func
class PyDLL(CDLL):
- """This class represents the Python library itself. It allows to
- access Python API functions. The GIL is not released, and
+ """This class represents the Python library itself. It allows
+ accessing Python API functions. The GIL is not released, and
Python exceptions are handled correctly.
"""
_func_flags_ = _FUNCFLAG_CDECL | _FUNCFLAG_PYTHONAPI
diff --git a/Lib/ctypes/_endian.py b/Lib/ctypes/_endian.py
index dae65fc215..37444bd6a7 100644
--- a/Lib/ctypes/_endian.py
+++ b/Lib/ctypes/_endian.py
@@ -45,6 +45,7 @@ if sys.byteorder == "little":
class BigEndianStructure(Structure, metaclass=_swapped_meta):
"""Structure with big endian byte order"""
+ __slots__ = ()
_swappedbytes_ = None
elif sys.byteorder == "big":
@@ -53,6 +54,7 @@ elif sys.byteorder == "big":
BigEndianStructure = Structure
class LittleEndianStructure(Structure, metaclass=_swapped_meta):
"""Structure with little endian byte order"""
+ __slots__ = ()
_swappedbytes_ = None
else:
diff --git a/Lib/ctypes/macholib/README.ctypes b/Lib/ctypes/macholib/README.ctypes
index 4e10cbe411..2866e9f349 100644
--- a/Lib/ctypes/macholib/README.ctypes
+++ b/Lib/ctypes/macholib/README.ctypes
@@ -1,4 +1,4 @@
-Files in this directory from from Bob Ippolito's py2app.
+Files in this directory come from Bob Ippolito's py2app.
License: Any components of the py2app suite may be distributed under
the MIT or PSF open source licenses.
diff --git a/Lib/ctypes/test/test_arrays.py b/Lib/ctypes/test/test_arrays.py
index 8ca77e0f30..4ed566b48e 100644
--- a/Lib/ctypes/test/test_arrays.py
+++ b/Lib/ctypes/test/test_arrays.py
@@ -24,20 +24,24 @@ class ArrayTestCase(unittest.TestCase):
self.assertEqual(len(ia), alen)
# slot values ok?
- values = [ia[i] for i in range(len(init))]
+ values = [ia[i] for i in range(alen)]
self.assertEqual(values, init)
+ # out-of-bounds accesses should be caught
+ with self.assertRaises(IndexError): ia[alen]
+ with self.assertRaises(IndexError): ia[-alen-1]
+
# change the items
from operator import setitem
new_values = list(range(42, 42+alen))
[setitem(ia, n, new_values[n]) for n in range(alen)]
- values = [ia[i] for i in range(len(init))]
+ values = [ia[i] for i in range(alen)]
self.assertEqual(values, new_values)
# are the items initialized to 0?
ia = int_array()
- values = [ia[i] for i in range(len(init))]
- self.assertEqual(values, [0] * len(init))
+ values = [ia[i] for i in range(alen)]
+ self.assertEqual(values, [0] * alen)
# Too many initializers should be caught
self.assertRaises(IndexError, int_array, *range(alen*2))
diff --git a/Lib/ctypes/test/test_as_parameter.py b/Lib/ctypes/test/test_as_parameter.py
index 948b463215..2a3484bec0 100644
--- a/Lib/ctypes/test/test_as_parameter.py
+++ b/Lib/ctypes/test/test_as_parameter.py
@@ -194,7 +194,7 @@ class BasicWrapTestCase(unittest.TestCase):
a = A()
a._as_parameter_ = a
- with self.assertRaises(RuntimeError):
+ with self.assertRaises(RecursionError):
c_int.from_param(a)
diff --git a/Lib/ctypes/test/test_byteswap.py b/Lib/ctypes/test/test_byteswap.py
index 427bb8bcc1..01c97e83ca 100644
--- a/Lib/ctypes/test/test_byteswap.py
+++ b/Lib/ctypes/test/test_byteswap.py
@@ -22,6 +22,26 @@ class Test(unittest.TestCase):
setattr(bits, "i%s" % i, 1)
dump(bits)
+ def test_slots(self):
+ class BigPoint(BigEndianStructure):
+ __slots__ = ()
+ _fields_ = [("x", c_int), ("y", c_int)]
+
+ class LowPoint(LittleEndianStructure):
+ __slots__ = ()
+ _fields_ = [("x", c_int), ("y", c_int)]
+
+ big = BigPoint()
+ little = LowPoint()
+ big.x = 4
+ big.y = 2
+ little.x = 2
+ little.y = 4
+ with self.assertRaises(AttributeError):
+ big.z = 42
+ with self.assertRaises(AttributeError):
+ little.z = 24
+
def test_endian_short(self):
if sys.byteorder == "little":
self.assertIs(c_short.__ctype_le__, c_short)
diff --git a/Lib/ctypes/test/test_frombuffer.py b/Lib/ctypes/test/test_frombuffer.py
index 86954fe61e..29c5a19328 100644
--- a/Lib/ctypes/test/test_frombuffer.py
+++ b/Lib/ctypes/test/test_frombuffer.py
@@ -44,7 +44,7 @@ class Test(unittest.TestCase):
(c_char * 16).from_buffer(memoryview(b"a" * 16))
with self.assertRaisesRegex(TypeError, "not C contiguous"):
(c_char * 16).from_buffer(memoryview(bytearray(b"a" * 16))[::-1])
- msg = "does not have the buffer interface"
+ msg = "bytes-like object is required"
with self.assertRaisesRegex(TypeError, msg):
(c_char * 16).from_buffer("a" * 16)
diff --git a/Lib/ctypes/test/test_loading.py b/Lib/ctypes/test/test_loading.py
index 4fb89642e1..28468c1cd3 100644
--- a/Lib/ctypes/test/test_loading.py
+++ b/Lib/ctypes/test/test_loading.py
@@ -52,7 +52,9 @@ class LoaderTest(unittest.TestCase):
@unittest.skipUnless(os.name in ("nt", "ce"),
'test specific to Windows (NT/CE)')
def test_load_library(self):
- self.assertIsNotNone(libc_name)
+ # CRT is no longer directly loadable. See issue23606 for the
+ # discussion about alternative approaches.
+ #self.assertIsNotNone(libc_name)
if test.support.verbose:
print(find_library("kernel32"))
print(find_library("user32"))
diff --git a/Lib/ctypes/test/test_pointers.py b/Lib/ctypes/test/test_pointers.py
index 6eea58fb43..751f85fd11 100644
--- a/Lib/ctypes/test/test_pointers.py
+++ b/Lib/ctypes/test/test_pointers.py
@@ -22,7 +22,10 @@ class PointersTestCase(unittest.TestCase):
def test_pass_pointers(self):
dll = CDLL(_ctypes_test.__file__)
func = dll._testfunc_p_p
- func.restype = c_long
+ if sizeof(c_longlong) == sizeof(c_void_p):
+ func.restype = c_longlong
+ else:
+ func.restype = c_long
i = c_int(12345678)
## func.argtypes = (POINTER(c_int),)
@@ -53,9 +56,13 @@ class PointersTestCase(unittest.TestCase):
# C code:
# int x = 12321;
# res = &x
- res.contents = c_int(12321)
+ x = c_int(12321)
+ res.contents = x
self.assertEqual(i.value, 54345)
+ x.value = -99
+ self.assertEqual(res.contents.value, -99)
+
def test_callbacks_with_pointers(self):
# a function type receiving a pointer
PROTOTYPE = CFUNCTYPE(c_int, POINTER(c_int))
@@ -128,9 +135,10 @@ class PointersTestCase(unittest.TestCase):
def test_basic(self):
p = pointer(c_int(42))
- # Although a pointer can be indexed, it ha no length
+ # Although a pointer can be indexed, it has no length
self.assertRaises(TypeError, len, p)
self.assertEqual(p[0], 42)
+ self.assertEqual(p[0:1], [42])
self.assertEqual(p.contents.value, 42)
def test_charpp(self):
diff --git a/Lib/ctypes/test/test_prototypes.py b/Lib/ctypes/test/test_prototypes.py
index 818c1110e3..cd0c649de3 100644
--- a/Lib/ctypes/test/test_prototypes.py
+++ b/Lib/ctypes/test/test_prototypes.py
@@ -69,7 +69,10 @@ class CharPointersTestCase(unittest.TestCase):
def test_int_pointer_arg(self):
func = testdll._testfunc_p_p
- func.restype = c_long
+ if sizeof(c_longlong) == sizeof(c_void_p):
+ func.restype = c_longlong
+ else:
+ func.restype = c_long
self.assertEqual(0, func(0))
ci = c_int(0)
diff --git a/Lib/ctypes/test/test_values.py b/Lib/ctypes/test/test_values.py
index 6850cf00b3..5a3a47f968 100644
--- a/Lib/ctypes/test/test_values.py
+++ b/Lib/ctypes/test/test_values.py
@@ -58,8 +58,13 @@ class PythonValuesTestCase(unittest.TestCase):
items = []
# _frozen_importlib changes size whenever importlib._bootstrap
# changes, so it gets a special case. We should make sure it's
- # found, but don't worry about its size too much.
- _fzn_implib_seen = False
+ # found, but don't worry about its size too much. The same
+ # applies to _frozen_importlib_external.
+ bootstrap_seen = []
+ bootstrap_expected = [
+ b'_frozen_importlib',
+ b'_frozen_importlib_external',
+ ]
for entry in ft:
# This is dangerous. We *can* iterate over a pointer, but
# the loop will not terminate (maybe with an access
@@ -67,21 +72,22 @@ class PythonValuesTestCase(unittest.TestCase):
if entry.name is None:
break
- if entry.name == b'_frozen_importlib':
- _fzn_implib_seen = True
+ if entry.name in bootstrap_expected:
+ bootstrap_seen.append(entry.name)
self.assertTrue(entry.size,
- "_frozen_importlib was reported as having no size")
+ "{!r} was reported as having no size".format(entry.name))
continue
- items.append((entry.name, entry.size))
+ items.append((entry.name.decode("ascii"), entry.size))
- expected = [(b"__hello__", 161),
- (b"__phello__", -161),
- (b"__phello__.spam", 161),
+ expected = [("__hello__", 161),
+ ("__phello__", -161),
+ ("__phello__.spam", 161),
]
- self.assertEqual(items, expected)
+ self.assertEqual(items, expected, "PyImport_FrozenModules example "
+ "in Doc/library/ctypes.rst may be out of date")
- self.assertTrue(_fzn_implib_seen,
- "_frozen_importlib wasn't found in PyImport_FrozenModules")
+ self.assertEqual(sorted(bootstrap_seen), bootstrap_expected,
+ "frozen bootstrap modules did not match PyImport_FrozenModules")
from ctypes import _pointer_type_cache
del _pointer_type_cache[struct_frozen]
diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py
index 595113bffd..8ff4aff0ca 100644
--- a/Lib/ctypes/util.py
+++ b/Lib/ctypes/util.py
@@ -19,6 +19,8 @@ if os.name == "nt":
i = i + len(prefix)
s, rest = sys.version[i:].split(" ", 1)
majorVersion = int(s[:-2]) - 6
+ if majorVersion >= 13:
+ majorVersion += 1
minorVersion = int(s[2:3]) / 10.0
# I don't think paths are affected by minor version in version 6
if majorVersion == 6:
@@ -36,8 +38,12 @@ if os.name == "nt":
return None
if version <= 6:
clibname = 'msvcrt'
- else:
+ elif version <= 13:
clibname = 'msvcr%d' % (version * 10)
+ else:
+ # CRT is no longer directly loadable. See issue23606 for the
+ # discussion about alternative approaches.
+ return None
# If python was built with in debug mode
import importlib.machinery
@@ -178,6 +184,7 @@ elif os.name == "posix":
else:
cmd = 'env LC_ALL=C /usr/bin/crle 2>/dev/null'
+ paths = None
with contextlib.closing(os.popen(cmd)) as f:
for line in f.readlines():
line = line.strip()
diff --git a/Lib/datetime.py b/Lib/datetime.py
index 3af12e7716..2f9421829e 100644
--- a/Lib/datetime.py
+++ b/Lib/datetime.py
@@ -12,7 +12,7 @@ def _cmp(x, y):
MINYEAR = 1
MAXYEAR = 9999
-_MAXORDINAL = 3652059 # date.max.toordinal()
+_MAXORDINAL = 3652059 # date.max.toordinal()
# Utility functions, adapted from Python's Demo/classes/Dates.py, which
# also assumes the current Gregorian calendar indefinitely extended in
@@ -26,7 +26,7 @@ _MAXORDINAL = 3652059 # date.max.toordinal()
# -1 is a placeholder for indexing purposes.
_DAYS_IN_MONTH = [-1, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
-_DAYS_BEFORE_MONTH = [-1] # -1 is a placeholder for indexing purposes.
+_DAYS_BEFORE_MONTH = [-1] # -1 is a placeholder for indexing purposes.
dbm = 0
for dim in _DAYS_IN_MONTH[1:]:
_DAYS_BEFORE_MONTH.append(dbm)
@@ -162,9 +162,9 @@ def _format_time(hh, mm, ss, us):
# Correctly substitute for %z and %Z escapes in strftime formats.
def _wrap_strftime(object, format, timetuple):
# Don't call utcoffset() or tzname() unless actually needed.
- freplace = None # the string to use for %f
- zreplace = None # the string to use for %z
- Zreplace = None # the string to use for %Z
+ freplace = None # the string to use for %f
+ zreplace = None # the string to use for %z
+ Zreplace = None # the string to use for %Z
# Scan format for %z and %Z escapes, replacing as needed.
newformat = []
@@ -217,11 +217,6 @@ def _wrap_strftime(object, format, timetuple):
newformat = "".join(newformat)
return _time.strftime(newformat, timetuple)
-def _call_tzinfo_method(tzinfo, methname, tzinfoarg):
- if tzinfo is None:
- return None
- return getattr(tzinfo, methname)(tzinfoarg)
-
# Just raise TypeError if the arg isn't None or a string.
def _check_tzname(name):
if name is not None and not isinstance(name, str):
@@ -245,13 +240,31 @@ def _check_utc_offset(name, offset):
raise ValueError("tzinfo.%s() must return a whole number "
"of minutes, got %s" % (name, offset))
if not -timedelta(1) < offset < timedelta(1):
- raise ValueError("%s()=%s, must be must be strictly between"
- " -timedelta(hours=24) and timedelta(hours=24)"
- % (name, offset))
+ raise ValueError("%s()=%s, must be must be strictly between "
+ "-timedelta(hours=24) and timedelta(hours=24)" %
+ (name, offset))
+
+def _check_int_field(value):
+ if isinstance(value, int):
+ return value
+ if not isinstance(value, float):
+ try:
+ value = value.__int__()
+ except AttributeError:
+ pass
+ else:
+ if isinstance(value, int):
+ return value
+ raise TypeError('__int__ returned non-int (type %s)' %
+ type(value).__name__)
+ raise TypeError('an integer is required (got type %s)' %
+ type(value).__name__)
+ raise TypeError('integer argument expected, got float')
def _check_date_fields(year, month, day):
- if not isinstance(year, int):
- raise TypeError('int expected')
+ year = _check_int_field(year)
+ month = _check_int_field(month)
+ day = _check_int_field(day)
if not MINYEAR <= year <= MAXYEAR:
raise ValueError('year must be in %d..%d' % (MINYEAR, MAXYEAR), year)
if not 1 <= month <= 12:
@@ -259,10 +272,13 @@ def _check_date_fields(year, month, day):
dim = _days_in_month(year, month)
if not 1 <= day <= dim:
raise ValueError('day must be in 1..%d' % dim, day)
+ return year, month, day
def _check_time_fields(hour, minute, second, microsecond):
- if not isinstance(hour, int):
- raise TypeError('int expected')
+ hour = _check_int_field(hour)
+ minute = _check_int_field(minute)
+ second = _check_int_field(second)
+ microsecond = _check_int_field(microsecond)
if not 0 <= hour <= 23:
raise ValueError('hour must be in 0..23', hour)
if not 0 <= minute <= 59:
@@ -271,6 +287,7 @@ def _check_time_fields(hour, minute, second, microsecond):
raise ValueError('second must be in 0..59', second)
if not 0 <= microsecond <= 999999:
raise ValueError('microsecond must be in 0..999999', microsecond)
+ return hour, minute, second, microsecond
def _check_tzinfo_arg(tz):
if tz is not None and not isinstance(tz, tzinfo):
@@ -316,7 +333,7 @@ class timedelta:
Representation: (days, seconds, microseconds). Why? Because I
felt like it.
"""
- __slots__ = '_days', '_seconds', '_microseconds'
+ __slots__ = '_days', '_seconds', '_microseconds', '_hashcode'
def __new__(cls, days=0, seconds=0, microseconds=0,
milliseconds=0, minutes=0, hours=0, weeks=0):
@@ -382,38 +399,26 @@ class timedelta:
# secondsfrac isn't referenced again
if isinstance(microseconds, float):
- microseconds += usdouble
- microseconds = round(microseconds, 0)
- seconds, microseconds = divmod(microseconds, 1e6)
- assert microseconds == int(microseconds)
- assert seconds == int(seconds)
- days, seconds = divmod(seconds, 24.*3600.)
- assert days == int(days)
- assert seconds == int(seconds)
- d += int(days)
- s += int(seconds) # can't overflow
- assert isinstance(s, int)
- assert abs(s) <= 3 * 24 * 3600
+ microseconds = round(microseconds + usdouble)
+ seconds, microseconds = divmod(microseconds, 1000000)
+ days, seconds = divmod(seconds, 24*3600)
+ d += days
+ s += seconds
else:
+ microseconds = int(microseconds)
seconds, microseconds = divmod(microseconds, 1000000)
days, seconds = divmod(seconds, 24*3600)
d += days
- s += int(seconds) # can't overflow
- assert isinstance(s, int)
- assert abs(s) <= 3 * 24 * 3600
- microseconds = float(microseconds)
- microseconds += usdouble
- microseconds = round(microseconds, 0)
+ s += seconds
+ microseconds = round(microseconds + usdouble)
+ assert isinstance(s, int)
+ assert isinstance(microseconds, int)
assert abs(s) <= 3 * 24 * 3600
assert abs(microseconds) < 3.1e6
# Just a little bit of carrying possible for microseconds and seconds.
- assert isinstance(microseconds, float)
- assert int(microseconds) == microseconds
- us = int(microseconds)
- seconds, us = divmod(us, 1000000)
- s += seconds # cant't overflow
- assert isinstance(s, int)
+ seconds, us = divmod(microseconds, 1000000)
+ s += seconds
days, s = divmod(s, 24*3600)
d += days
@@ -421,27 +426,31 @@ class timedelta:
assert isinstance(s, int) and 0 <= s < 24*3600
assert isinstance(us, int) and 0 <= us < 1000000
- self = object.__new__(cls)
+ if abs(d) > 999999999:
+ raise OverflowError("timedelta # of days is too large: %d" % d)
+ self = object.__new__(cls)
self._days = d
self._seconds = s
self._microseconds = us
- if abs(d) > 999999999:
- raise OverflowError("timedelta # of days is too large: %d" % d)
-
+ self._hashcode = -1
return self
def __repr__(self):
if self._microseconds:
- return "%s(%d, %d, %d)" % ('datetime.' + self.__class__.__name__,
- self._days,
- self._seconds,
- self._microseconds)
+ return "%s.%s(%d, %d, %d)" % (self.__class__.__module__,
+ self.__class__.__qualname__,
+ self._days,
+ self._seconds,
+ self._microseconds)
if self._seconds:
- return "%s(%d, %d)" % ('datetime.' + self.__class__.__name__,
- self._days,
- self._seconds)
- return "%s(%d)" % ('datetime.' + self.__class__.__name__, self._days)
+ return "%s.%s(%d, %d)" % (self.__class__.__module__,
+ self.__class__.__qualname__,
+ self._days,
+ self._seconds)
+ return "%s.%s(%d)" % (self.__class__.__module__,
+ self.__class__.__qualname__,
+ self._days)
def __str__(self):
mm, ss = divmod(self._seconds, 60)
@@ -457,7 +466,7 @@ class timedelta:
def total_seconds(self):
"""Total seconds in the duration."""
- return ((self.days * 86400 + self.seconds)*10**6 +
+ return ((self.days * 86400 + self.seconds) * 10**6 +
self.microseconds) / 10**6
# Read-only field accessors
@@ -578,12 +587,6 @@ class timedelta:
else:
return False
- def __ne__(self, other):
- if isinstance(other, timedelta):
- return self._cmp(other) != 0
- else:
- return True
-
def __le__(self, other):
if isinstance(other, timedelta):
return self._cmp(other) <= 0
@@ -613,7 +616,9 @@ class timedelta:
return _cmp(self._getstate(), other._getstate())
def __hash__(self):
- return hash(self._getstate())
+ if self._hashcode == -1:
+ self._hashcode = hash(self._getstate())
+ return self._hashcode
def __bool__(self):
return (self._days != 0 or
@@ -661,7 +666,7 @@ class date:
Properties (readonly):
year, month, day
"""
- __slots__ = '_year', '_month', '_day'
+ __slots__ = '_year', '_month', '_day', '_hashcode'
def __new__(cls, year, month=None, day=None):
"""Constructor.
@@ -670,17 +675,19 @@ class date:
year, month, day (required, base 1)
"""
- if (isinstance(year, bytes) and len(year) == 4 and
- 1 <= year[2] <= 12 and month is None): # Month is sane
+ if month is None and isinstance(year, bytes) and len(year) == 4 and \
+ 1 <= year[2] <= 12:
# Pickle support
self = object.__new__(cls)
self.__setstate(year)
+ self._hashcode = -1
return self
- _check_date_fields(year, month, day)
+ year, month, day = _check_date_fields(year, month, day)
self = object.__new__(cls)
self._year = year
self._month = month
self._day = day
+ self._hashcode = -1
return self
# Additional constructors
@@ -720,10 +727,11 @@ class date:
>>> repr(dt)
'datetime.datetime(2010, 1, 1, 0, 0, tzinfo=datetime.timezone.utc)'
"""
- return "%s(%d, %d, %d)" % ('datetime.' + self.__class__.__name__,
- self._year,
- self._month,
- self._day)
+ return "%s.%s(%d, %d, %d)" % (self.__class__.__module__,
+ self.__class__.__qualname__,
+ self._year,
+ self._month,
+ self._day)
# XXX These shouldn't depend on time.localtime(), because that
# clips the usable dates to [1970 .. 2038). At least ctime() is
# easily done without using strftime() -- that's better too because
@@ -743,6 +751,8 @@ class date:
return _wrap_strftime(self, fmt, self.timetuple())
def __format__(self, fmt):
+ if not isinstance(fmt, str):
+ raise TypeError("must be str, not %s" % type(fmt).__name__)
if len(fmt) != 0:
return self.strftime(fmt)
return str(self)
@@ -800,7 +810,6 @@ class date:
month = self._month
if day is None:
day = self._day
- _check_date_fields(year, month, day)
return date(year, month, day)
# Comparisons of date objects with other.
@@ -810,11 +819,6 @@ class date:
return self._cmp(other) == 0
return NotImplemented
- def __ne__(self, other):
- if isinstance(other, date):
- return self._cmp(other) != 0
- return NotImplemented
-
def __le__(self, other):
if isinstance(other, date):
return self._cmp(other) <= 0
@@ -843,7 +847,9 @@ class date:
def __hash__(self):
"Hash."
- return hash(self._getstate())
+ if self._hashcode == -1:
+ self._hashcode = hash(self._getstate())
+ return self._hashcode
# Computations
@@ -890,6 +896,7 @@ class date:
ISO calendar algorithm taken from
http://www.phys.uu.nl/~vgent/calendar/isocalendar.htm
+ (used with permission)
"""
year = self._year
week1monday = _isoweek1monday(year)
@@ -913,8 +920,6 @@ class date:
return bytes([yhi, ylo, self._month, self._day]),
def __setstate(self, string):
- if len(string) != 4 or not (1 <= string[2] <= 12):
- raise TypeError("not enough arguments")
yhi, ylo, self._month, self._day = string
self._year = yhi * 256 + ylo
@@ -933,6 +938,7 @@ class tzinfo:
Subclasses must override the name(), utcoffset() and dst() methods.
"""
__slots__ = ()
+
def tzname(self, dt):
"datetime -> string name of time zone."
raise NotImplementedError("tzinfo subclass must override tzname()")
@@ -1019,6 +1025,7 @@ class time:
Properties (readonly):
hour, minute, second, microsecond, tzinfo
"""
+ __slots__ = '_hour', '_minute', '_second', '_microsecond', '_tzinfo', '_hashcode'
def __new__(cls, hour=0, minute=0, second=0, microsecond=0, tzinfo=None):
"""Constructor.
@@ -1029,18 +1036,22 @@ class time:
second, microsecond (default to zero)
tzinfo (default to None)
"""
- self = object.__new__(cls)
- if isinstance(hour, bytes) and len(hour) == 6:
+ if isinstance(hour, bytes) and len(hour) == 6 and hour[0] < 24:
# Pickle support
+ self = object.__new__(cls)
self.__setstate(hour, minute or None)
+ self._hashcode = -1
return self
+ hour, minute, second, microsecond = _check_time_fields(
+ hour, minute, second, microsecond)
_check_tzinfo_arg(tzinfo)
- _check_time_fields(hour, minute, second, microsecond)
+ self = object.__new__(cls)
self._hour = hour
self._minute = minute
self._second = second
self._microsecond = microsecond
self._tzinfo = tzinfo
+ self._hashcode = -1
return self
# Read-only field accessors
@@ -1079,12 +1090,6 @@ class time:
else:
return False
- def __ne__(self, other):
- if isinstance(other, time):
- return self._cmp(other, allow_mixed=True) != 0
- else:
- return True
-
def __le__(self, other):
if isinstance(other, time):
return self._cmp(other) <= 0
@@ -1125,8 +1130,8 @@ class time:
if base_compare:
return _cmp((self._hour, self._minute, self._second,
self._microsecond),
- (other._hour, other._minute, other._second,
- other._microsecond))
+ (other._hour, other._minute, other._second,
+ other._microsecond))
if myoff is None or otoff is None:
if allow_mixed:
return 2 # arbitrary non-zero value
@@ -1139,16 +1144,20 @@ class time:
def __hash__(self):
"""Hash."""
- tzoff = self.utcoffset()
- if not tzoff: # zero or None
- return hash(self._getstate()[0])
- h, m = divmod(timedelta(hours=self.hour, minutes=self.minute) - tzoff,
- timedelta(hours=1))
- assert not m % timedelta(minutes=1), "whole minute"
- m //= timedelta(minutes=1)
- if 0 <= h < 24:
- return hash(time(h, m, self.second, self.microsecond))
- return hash((h, m, self.second, self.microsecond))
+ if self._hashcode == -1:
+ tzoff = self.utcoffset()
+ if not tzoff: # zero or None
+ self._hashcode = hash(self._getstate()[0])
+ else:
+ h, m = divmod(timedelta(hours=self.hour, minutes=self.minute) - tzoff,
+ timedelta(hours=1))
+ assert not m % timedelta(minutes=1), "whole minute"
+ m //= timedelta(minutes=1)
+ if 0 <= h < 24:
+ self._hashcode = hash(time(h, m, self.second, self.microsecond))
+ else:
+ self._hashcode = hash((h, m, self.second, self.microsecond))
+ return self._hashcode
# Conversion to string
@@ -1176,8 +1185,9 @@ class time:
s = ", %d" % self._second
else:
s = ""
- s= "%s(%d, %d%s)" % ('datetime.' + self.__class__.__name__,
- self._hour, self._minute, s)
+ s= "%s.%s(%d, %d%s)" % (self.__class__.__module__,
+ self.__class__.__qualname__,
+ self._hour, self._minute, s)
if self._tzinfo is not None:
assert s[-1:] == ")"
s = s[:-1] + ", tzinfo=%r" % self._tzinfo + ")"
@@ -1210,6 +1220,8 @@ class time:
return _wrap_strftime(self, fmt, timetuple)
def __format__(self, fmt):
+ if not isinstance(fmt, str):
+ raise TypeError("must be str, not %s" % type(fmt).__name__)
if len(fmt) != 0:
return self.strftime(fmt)
return str(self)
@@ -1266,16 +1278,8 @@ class time:
microsecond = self.microsecond
if tzinfo is True:
tzinfo = self.tzinfo
- _check_time_fields(hour, minute, second, microsecond)
- _check_tzinfo_arg(tzinfo)
return time(hour, minute, second, microsecond, tzinfo)
- def __bool__(self):
- if self.second or self.microsecond:
- return True
- offset = self.utcoffset() or timedelta(0)
- return timedelta(hours=self.hour, minutes=self.minute) != offset
-
# Pickle support.
def _getstate(self):
@@ -1289,15 +1293,11 @@ class time:
return (basestate, self._tzinfo)
def __setstate(self, string, tzinfo):
- if len(string) != 6 or string[0] >= 24:
- raise TypeError("an integer is required")
- (self._hour, self._minute, self._second,
- us1, us2, us3) = string
+ if tzinfo is not None and not isinstance(tzinfo, _tzinfo_class):
+ raise TypeError("bad tzinfo state arg")
+ self._hour, self._minute, self._second, us1, us2, us3 = string
self._microsecond = (((us1 << 8) | us2) << 8) | us3
- if tzinfo is None or isinstance(tzinfo, _tzinfo_class):
- self._tzinfo = tzinfo
- else:
- raise TypeError("bad tzinfo state arg %r" % tzinfo)
+ self._tzinfo = tzinfo
def __reduce__(self):
return (time, self._getstate())
@@ -1314,25 +1314,30 @@ class datetime(date):
The year, month and day arguments are required. tzinfo may be None, or an
instance of a tzinfo subclass. The remaining arguments may be ints.
"""
+ __slots__ = date.__slots__ + time.__slots__
- __slots__ = date.__slots__ + (
- '_hour', '_minute', '_second',
- '_microsecond', '_tzinfo')
def __new__(cls, year, month=None, day=None, hour=0, minute=0, second=0,
microsecond=0, tzinfo=None):
- if isinstance(year, bytes) and len(year) == 10:
+ if isinstance(year, bytes) and len(year) == 10 and 1 <= year[2] <= 12:
# Pickle support
- self = date.__new__(cls, year[:4])
+ self = object.__new__(cls)
self.__setstate(year, month)
+ self._hashcode = -1
return self
+ year, month, day = _check_date_fields(year, month, day)
+ hour, minute, second, microsecond = _check_time_fields(
+ hour, minute, second, microsecond)
_check_tzinfo_arg(tzinfo)
- _check_time_fields(hour, minute, second, microsecond)
- self = date.__new__(cls, year, month, day)
+ self = object.__new__(cls)
+ self._year = year
+ self._month = month
+ self._day = day
self._hour = hour
self._minute = minute
self._second = second
self._microsecond = microsecond
self._tzinfo = tzinfo
+ self._hashcode = -1
return self
# Read-only field accessors
@@ -1399,11 +1404,6 @@ class datetime(date):
"""Construct a naive UTC datetime from a POSIX timestamp."""
return cls._fromtimestamp(t, True, None)
- # XXX This is supposed to do better than we *can* do by using time.time(),
- # XXX if the platform supports a more accurate way. The C implementation
- # XXX uses gettimeofday on platforms that have it, but that isn't
- # XXX available from Python. So now() may return different results
- # XXX across the implementations.
@classmethod
def now(cls, tz=None):
"Construct a datetime from time.time() and optional time zone info."
@@ -1490,11 +1490,8 @@ class datetime(date):
microsecond = self.microsecond
if tzinfo is True:
tzinfo = self.tzinfo
- _check_date_fields(year, month, day)
- _check_time_fields(hour, minute, second, microsecond)
- _check_tzinfo_arg(tzinfo)
- return datetime(year, month, day, hour, minute, second,
- microsecond, tzinfo)
+ return datetime(year, month, day, hour, minute, second, microsecond,
+ tzinfo)
def astimezone(self, tz=None):
if tz is None:
@@ -1564,10 +1561,9 @@ class datetime(date):
Optional argument sep specifies the separator between date and
time, default 'T'.
"""
- s = ("%04d-%02d-%02d%c" % (self._year, self._month, self._day,
- sep) +
- _format_time(self._hour, self._minute, self._second,
- self._microsecond))
+ s = ("%04d-%02d-%02d%c" % (self._year, self._month, self._day, sep) +
+ _format_time(self._hour, self._minute, self._second,
+ self._microsecond))
off = self.utcoffset()
if off is not None:
if off.days < 0:
@@ -1583,14 +1579,15 @@ class datetime(date):
def __repr__(self):
"""Convert to formal string, for repr()."""
- L = [self._year, self._month, self._day, # These are never zero
+ L = [self._year, self._month, self._day, # These are never zero
self._hour, self._minute, self._second, self._microsecond]
if L[-1] == 0:
del L[-1]
if L[-1] == 0:
del L[-1]
- s = ", ".join(map(str, L))
- s = "%s(%s)" % ('datetime.' + self.__class__.__name__, s)
+ s = "%s.%s(%s)" % (self.__class__.__module__,
+ self.__class__.__qualname__,
+ ", ".join(map(str, L)))
if self._tzinfo is not None:
assert s[-1:] == ")"
s = s[:-1] + ", tzinfo=%r" % self._tzinfo + ")"
@@ -1622,7 +1619,9 @@ class datetime(date):
it mean anything in particular. For example, "GMT", "UTC", "-500",
"-5:00", "EDT", "US/Eastern", "America/New York" are all valid replies.
"""
- name = _call_tzinfo_method(self._tzinfo, "tzname", self)
+ if self._tzinfo is None:
+ return None
+ name = self._tzinfo.tzname(self)
_check_tzname(name)
return name
@@ -1651,14 +1650,6 @@ class datetime(date):
else:
return False
- def __ne__(self, other):
- if isinstance(other, datetime):
- return self._cmp(other, allow_mixed=True) != 0
- elif not isinstance(other, date):
- return NotImplemented
- else:
- return True
-
def __le__(self, other):
if isinstance(other, datetime):
return self._cmp(other) <= 0
@@ -1708,9 +1699,9 @@ class datetime(date):
return _cmp((self._year, self._month, self._day,
self._hour, self._minute, self._second,
self._microsecond),
- (other._year, other._month, other._day,
- other._hour, other._minute, other._second,
- other._microsecond))
+ (other._year, other._month, other._day,
+ other._hour, other._minute, other._second,
+ other._microsecond))
if myoff is None or otoff is None:
if allow_mixed:
return 2 # arbitrary non-zero value
@@ -1768,12 +1759,15 @@ class datetime(date):
return base + otoff - myoff
def __hash__(self):
- tzoff = self.utcoffset()
- if tzoff is None:
- return hash(self._getstate()[0])
- days = _ymd2ord(self.year, self.month, self.day)
- seconds = self.hour * 3600 + self.minute * 60 + self.second
- return hash(timedelta(days, seconds, self.microsecond) - tzoff)
+ if self._hashcode == -1:
+ tzoff = self.utcoffset()
+ if tzoff is None:
+ self._hashcode = hash(self._getstate()[0])
+ else:
+ days = _ymd2ord(self.year, self.month, self.day)
+ seconds = self.hour * 3600 + self.minute * 60 + self.second
+ self._hashcode = hash(timedelta(days, seconds, self.microsecond) - tzoff)
+ return self._hashcode
# Pickle support.
@@ -1790,14 +1784,13 @@ class datetime(date):
return (basestate, self._tzinfo)
def __setstate(self, string, tzinfo):
+ if tzinfo is not None and not isinstance(tzinfo, _tzinfo_class):
+ raise TypeError("bad tzinfo state arg")
(yhi, ylo, self._month, self._day, self._hour,
self._minute, self._second, us1, us2, us3) = string
self._year = yhi * 256 + ylo
self._microsecond = (((us1 << 8) | us2) << 8) | us3
- if tzinfo is None or isinstance(tzinfo, _tzinfo_class):
- self._tzinfo = tzinfo
- else:
- raise TypeError("bad tzinfo state arg %r" % tzinfo)
+ self._tzinfo = tzinfo
def __reduce__(self):
return (self.__class__, self._getstate())
@@ -1813,7 +1806,7 @@ def _isoweek1monday(year):
# XXX This could be done more efficiently
THURSDAY = 3
firstday = _ymd2ord(year, 1, 1)
- firstweekday = (firstday + 6) % 7 # See weekday() above
+ firstweekday = (firstday + 6) % 7 # See weekday() above
week1monday = firstday - firstweekday
if firstweekday > THURSDAY:
week1monday += 7
@@ -1834,13 +1827,12 @@ class timezone(tzinfo):
elif not isinstance(name, str):
raise TypeError("name must be a string")
if not cls._minoffset <= offset <= cls._maxoffset:
- raise ValueError("offset must be a timedelta"
- " strictly between -timedelta(hours=24) and"
- " timedelta(hours=24).")
- if (offset.microseconds != 0 or
- offset.seconds % 60 != 0):
- raise ValueError("offset must be a timedelta"
- " representing a whole number of minutes")
+ raise ValueError("offset must be a timedelta "
+ "strictly between -timedelta(hours=24) and "
+ "timedelta(hours=24).")
+ if (offset.microseconds != 0 or offset.seconds % 60 != 0):
+ raise ValueError("offset must be a timedelta "
+ "representing a whole number of minutes")
return cls._create(offset, name)
@classmethod
@@ -1877,10 +1869,12 @@ class timezone(tzinfo):
if self is self.utc:
return 'datetime.timezone.utc'
if self._name is None:
- return "%s(%r)" % ('datetime.' + self.__class__.__name__,
- self._offset)
- return "%s(%r, %r)" % ('datetime.' + self.__class__.__name__,
- self._offset, self._name)
+ return "%s.%s(%r)" % (self.__class__.__module__,
+ self.__class__.__qualname__,
+ self._offset)
+ return "%s.%s(%r, %r)" % (self.__class__.__module__,
+ self.__class__.__qualname__,
+ self._offset, self._name)
def __str__(self):
return self.tzname(None)
@@ -2135,14 +2129,13 @@ except ImportError:
pass
else:
# Clean up unused names
- del (_DAYNAMES, _DAYS_BEFORE_MONTH, _DAYS_IN_MONTH,
- _DI100Y, _DI400Y, _DI4Y, _MAXORDINAL, _MONTHNAMES,
- _build_struct_time, _call_tzinfo_method, _check_date_fields,
- _check_time_fields, _check_tzinfo_arg, _check_tzname,
- _check_utc_offset, _cmp, _cmperror, _date_class, _days_before_month,
- _days_before_year, _days_in_month, _format_time, _is_leap,
- _isoweek1monday, _math, _ord2ymd, _time, _time_class, _tzinfo_class,
- _wrap_strftime, _ymd2ord)
+ del (_DAYNAMES, _DAYS_BEFORE_MONTH, _DAYS_IN_MONTH, _DI100Y, _DI400Y,
+ _DI4Y, _EPOCH, _MAXORDINAL, _MONTHNAMES, _build_struct_time,
+ _check_date_fields, _check_int_field, _check_time_fields,
+ _check_tzinfo_arg, _check_tzname, _check_utc_offset, _cmp, _cmperror,
+ _date_class, _days_before_month, _days_before_year, _days_in_month,
+ _format_time, _is_leap, _isoweek1monday, _math, _ord2ymd,
+ _time, _time_class, _tzinfo_class, _wrap_strftime, _ymd2ord)
# XXX Since import * above excludes names that start with _,
# docstring does not get overwritten. In the future, it may be
# appropriate to maintain a single module level docstring and
diff --git a/Lib/dbm/__init__.py b/Lib/dbm/__init__.py
index 5f4664a7c6..6831a84407 100644
--- a/Lib/dbm/__init__.py
+++ b/Lib/dbm/__init__.py
@@ -153,9 +153,9 @@ def whichdb(filename):
except OSError:
return None
- # Read the start of the file -- the magic number
- s16 = f.read(16)
- f.close()
+ with f:
+ # Read the start of the file -- the magic number
+ s16 = f.read(16)
s = s16[0:4]
# Return "" if not at least 4 bytes
diff --git a/Lib/dbm/dumb.py b/Lib/dbm/dumb.py
index 63bc329421..7777a7cae6 100644
--- a/Lib/dbm/dumb.py
+++ b/Lib/dbm/dumb.py
@@ -45,7 +45,7 @@ class _Database(collections.MutableMapping):
_os = _os # for _commit()
_io = _io # for _commit()
- def __init__(self, filebasename, mode):
+ def __init__(self, filebasename, mode, flag='c'):
self._mode = mode
# The directory file is a text file. Each line looks like
@@ -65,6 +65,17 @@ class _Database(collections.MutableMapping):
# The index is an in-memory dict, mirroring the directory file.
self._index = None # maps keys to (pos, siz) pairs
+ # Handle the creation
+ self._create(flag)
+ self._update()
+
+ def _create(self, flag):
+ if flag == 'n':
+ for filename in (self._datfile, self._bakfile, self._dirfile):
+ try:
+ _os.remove(filename)
+ except OSError:
+ pass
# Mod by Jack: create data file if needed
try:
f = _io.open(self._datfile, 'r', encoding="Latin-1")
@@ -73,7 +84,6 @@ class _Database(collections.MutableMapping):
self._chmod(self._datfile)
else:
f.close()
- self._update()
# Read directory file into the in-memory index dict.
def _update(self):
@@ -266,20 +276,20 @@ class _Database(collections.MutableMapping):
self.close()
-def open(file, flag=None, mode=0o666):
+def open(file, flag='c', mode=0o666):
"""Open the database file, filename, and return corresponding object.
The flag argument, used to control how the database is opened in the
- other DBM implementations, is ignored in the dbm.dumb module; the
- database is always opened for update, and will be created if it does
- not exist.
+ other DBM implementations, supports only the semantics of 'c' and 'n'
+ values. Other values will default to the semantics of 'c' value:
+ the database will always opened for update and will be created if it
+ does not exist.
The optional mode argument is the UNIX mode of the file, used only when
the database has to be created. It defaults to octal code 0o666 (and
will be modified by the prevailing umask).
"""
- # flag argument is currently ignored
# Modify mode depending on the umask
try:
@@ -290,5 +300,4 @@ def open(file, flag=None, mode=0o666):
else:
# Turn off any bits that are set in the umask
mode = mode & (~um)
-
- return _Database(file, mode)
+ return _Database(file, mode, flag=flag)
diff --git a/Lib/decimal.py b/Lib/decimal.py
index 324e4f91ca..7746ea2601 100644
--- a/Lib/decimal.py
+++ b/Lib/decimal.py
@@ -1,6413 +1,11 @@
-# Copyright (c) 2004 Python Software Foundation.
-# All rights reserved.
-
-# Written by Eric Price <eprice at tjhsst.edu>
-# and Facundo Batista <facundo at taniquetil.com.ar>
-# and Raymond Hettinger <python at rcn.com>
-# and Aahz <aahz at pobox.com>
-# and Tim Peters
-
-# This module should be kept in sync with the latest updates of the
-# IBM specification as it evolves. Those updates will be treated
-# as bug fixes (deviation from the spec is a compatibility, usability
-# bug) and will be backported. At this point the spec is stabilizing
-# and the updates are becoming fewer, smaller, and less significant.
-
-"""
-This is an implementation of decimal floating point arithmetic based on
-the General Decimal Arithmetic Specification:
-
- http://speleotrove.com/decimal/decarith.html
-
-and IEEE standard 854-1987:
-
- http://en.wikipedia.org/wiki/IEEE_854-1987
-
-Decimal floating point has finite precision with arbitrarily large bounds.
-
-The purpose of this module is to support arithmetic using familiar
-"schoolhouse" rules and to avoid some of the tricky representation
-issues associated with binary floating point. The package is especially
-useful for financial applications or for contexts where users have
-expectations that are at odds with binary floating point (for instance,
-in binary floating point, 1.00 % 0.1 gives 0.09999999999999995 instead
-of 0.0; Decimal('1.00') % Decimal('0.1') returns the expected
-Decimal('0.00')).
-
-Here are some examples of using the decimal module:
-
->>> from decimal import *
->>> setcontext(ExtendedContext)
->>> Decimal(0)
-Decimal('0')
->>> Decimal('1')
-Decimal('1')
->>> Decimal('-.0123')
-Decimal('-0.0123')
->>> Decimal(123456)
-Decimal('123456')
->>> Decimal('123.45e12345678')
-Decimal('1.2345E+12345680')
->>> Decimal('1.33') + Decimal('1.27')
-Decimal('2.60')
->>> Decimal('12.34') + Decimal('3.87') - Decimal('18.41')
-Decimal('-2.20')
->>> dig = Decimal(1)
->>> print(dig / Decimal(3))
-0.333333333
->>> getcontext().prec = 18
->>> print(dig / Decimal(3))
-0.333333333333333333
->>> print(dig.sqrt())
-1
->>> print(Decimal(3).sqrt())
-1.73205080756887729
->>> print(Decimal(3) ** 123)
-4.85192780976896427E+58
->>> inf = Decimal(1) / Decimal(0)
->>> print(inf)
-Infinity
->>> neginf = Decimal(-1) / Decimal(0)
->>> print(neginf)
--Infinity
->>> print(neginf + inf)
-NaN
->>> print(neginf * inf)
--Infinity
->>> print(dig / 0)
-Infinity
->>> getcontext().traps[DivisionByZero] = 1
->>> print(dig / 0)
-Traceback (most recent call last):
- ...
- ...
- ...
-decimal.DivisionByZero: x / 0
->>> c = Context()
->>> c.traps[InvalidOperation] = 0
->>> print(c.flags[InvalidOperation])
-0
->>> c.divide(Decimal(0), Decimal(0))
-Decimal('NaN')
->>> c.traps[InvalidOperation] = 1
->>> print(c.flags[InvalidOperation])
-1
->>> c.flags[InvalidOperation] = 0
->>> print(c.flags[InvalidOperation])
-0
->>> print(c.divide(Decimal(0), Decimal(0)))
-Traceback (most recent call last):
- ...
- ...
- ...
-decimal.InvalidOperation: 0 / 0
->>> print(c.flags[InvalidOperation])
-1
->>> c.flags[InvalidOperation] = 0
->>> c.traps[InvalidOperation] = 0
->>> print(c.divide(Decimal(0), Decimal(0)))
-NaN
->>> print(c.flags[InvalidOperation])
-1
->>>
-"""
-
-__all__ = [
- # Two major classes
- 'Decimal', 'Context',
-
- # Named tuple representation
- 'DecimalTuple',
-
- # Contexts
- 'DefaultContext', 'BasicContext', 'ExtendedContext',
-
- # Exceptions
- 'DecimalException', 'Clamped', 'InvalidOperation', 'DivisionByZero',
- 'Inexact', 'Rounded', 'Subnormal', 'Overflow', 'Underflow',
- 'FloatOperation',
-
- # Exceptional conditions that trigger InvalidOperation
- 'DivisionImpossible', 'InvalidContext', 'ConversionSyntax', 'DivisionUndefined',
-
- # Constants for use in setting up contexts
- 'ROUND_DOWN', 'ROUND_HALF_UP', 'ROUND_HALF_EVEN', 'ROUND_CEILING',
- 'ROUND_FLOOR', 'ROUND_UP', 'ROUND_HALF_DOWN', 'ROUND_05UP',
-
- # Functions for manipulating contexts
- 'setcontext', 'getcontext', 'localcontext',
-
- # Limits for the C version for compatibility
- 'MAX_PREC', 'MAX_EMAX', 'MIN_EMIN', 'MIN_ETINY',
-
- # C version: compile time choice that enables the thread local context
- 'HAVE_THREADS'
-]
-
-__version__ = '1.70' # Highest version of the spec this complies with
- # See http://speleotrove.com/decimal/
-__libmpdec_version__ = "2.4.1" # compatible libmpdec version
-
-import math as _math
-import numbers as _numbers
-import sys
-
-try:
- from collections import namedtuple as _namedtuple
- DecimalTuple = _namedtuple('DecimalTuple', 'sign digits exponent')
-except ImportError:
- DecimalTuple = lambda *args: args
-
-# Rounding
-ROUND_DOWN = 'ROUND_DOWN'
-ROUND_HALF_UP = 'ROUND_HALF_UP'
-ROUND_HALF_EVEN = 'ROUND_HALF_EVEN'
-ROUND_CEILING = 'ROUND_CEILING'
-ROUND_FLOOR = 'ROUND_FLOOR'
-ROUND_UP = 'ROUND_UP'
-ROUND_HALF_DOWN = 'ROUND_HALF_DOWN'
-ROUND_05UP = 'ROUND_05UP'
-
-# Compatibility with the C version
-HAVE_THREADS = True
-if sys.maxsize == 2**63-1:
- MAX_PREC = 999999999999999999
- MAX_EMAX = 999999999999999999
- MIN_EMIN = -999999999999999999
-else:
- MAX_PREC = 425000000
- MAX_EMAX = 425000000
- MIN_EMIN = -425000000
-
-MIN_ETINY = MIN_EMIN - (MAX_PREC-1)
-
-# Errors
-
-class DecimalException(ArithmeticError):
- """Base exception class.
-
- Used exceptions derive from this.
- If an exception derives from another exception besides this (such as
- Underflow (Inexact, Rounded, Subnormal) that indicates that it is only
- called if the others are present. This isn't actually used for
- anything, though.
-
- handle -- Called when context._raise_error is called and the
- trap_enabler is not set. First argument is self, second is the
- context. More arguments can be given, those being after
- the explanation in _raise_error (For example,
- context._raise_error(NewError, '(-x)!', self._sign) would
- call NewError().handle(context, self._sign).)
-
- To define a new exception, it should be sufficient to have it derive
- from DecimalException.
- """
- def handle(self, context, *args):
- pass
-
-
-class Clamped(DecimalException):
- """Exponent of a 0 changed to fit bounds.
-
- This occurs and signals clamped if the exponent of a result has been
- altered in order to fit the constraints of a specific concrete
- representation. This may occur when the exponent of a zero result would
- be outside the bounds of a representation, or when a large normal
- number would have an encoded exponent that cannot be represented. In
- this latter case, the exponent is reduced to fit and the corresponding
- number of zero digits are appended to the coefficient ("fold-down").
- """
-
-class InvalidOperation(DecimalException):
- """An invalid operation was performed.
-
- Various bad things cause this:
-
- Something creates a signaling NaN
- -INF + INF
- 0 * (+-)INF
- (+-)INF / (+-)INF
- x % 0
- (+-)INF % x
- x._rescale( non-integer )
- sqrt(-x) , x > 0
- 0 ** 0
- x ** (non-integer)
- x ** (+-)INF
- An operand is invalid
-
- The result of the operation after these is a quiet positive NaN,
- except when the cause is a signaling NaN, in which case the result is
- also a quiet NaN, but with the original sign, and an optional
- diagnostic information.
- """
- def handle(self, context, *args):
- if args:
- ans = _dec_from_triple(args[0]._sign, args[0]._int, 'n', True)
- return ans._fix_nan(context)
- return _NaN
-
-class ConversionSyntax(InvalidOperation):
- """Trying to convert badly formed string.
-
- This occurs and signals invalid-operation if an string is being
- converted to a number and it does not conform to the numeric string
- syntax. The result is [0,qNaN].
- """
- def handle(self, context, *args):
- return _NaN
-
-class DivisionByZero(DecimalException, ZeroDivisionError):
- """Division by 0.
-
- This occurs and signals division-by-zero if division of a finite number
- by zero was attempted (during a divide-integer or divide operation, or a
- power operation with negative right-hand operand), and the dividend was
- not zero.
-
- The result of the operation is [sign,inf], where sign is the exclusive
- or of the signs of the operands for divide, or is 1 for an odd power of
- -0, for power.
- """
-
- def handle(self, context, sign, *args):
- return _SignedInfinity[sign]
-
-class DivisionImpossible(InvalidOperation):
- """Cannot perform the division adequately.
-
- This occurs and signals invalid-operation if the integer result of a
- divide-integer or remainder operation had too many digits (would be
- longer than precision). The result is [0,qNaN].
- """
-
- def handle(self, context, *args):
- return _NaN
-
-class DivisionUndefined(InvalidOperation, ZeroDivisionError):
- """Undefined result of division.
-
- This occurs and signals invalid-operation if division by zero was
- attempted (during a divide-integer, divide, or remainder operation), and
- the dividend is also zero. The result is [0,qNaN].
- """
-
- def handle(self, context, *args):
- return _NaN
-
-class Inexact(DecimalException):
- """Had to round, losing information.
-
- This occurs and signals inexact whenever the result of an operation is
- not exact (that is, it needed to be rounded and any discarded digits
- were non-zero), or if an overflow or underflow condition occurs. The
- result in all cases is unchanged.
-
- The inexact signal may be tested (or trapped) to determine if a given
- operation (or sequence of operations) was inexact.
- """
-
-class InvalidContext(InvalidOperation):
- """Invalid context. Unknown rounding, for example.
-
- This occurs and signals invalid-operation if an invalid context was
- detected during an operation. This can occur if contexts are not checked
- on creation and either the precision exceeds the capability of the
- underlying concrete representation or an unknown or unsupported rounding
- was specified. These aspects of the context need only be checked when
- the values are required to be used. The result is [0,qNaN].
- """
-
- def handle(self, context, *args):
- return _NaN
-
-class Rounded(DecimalException):
- """Number got rounded (not necessarily changed during rounding).
-
- This occurs and signals rounded whenever the result of an operation is
- rounded (that is, some zero or non-zero digits were discarded from the
- coefficient), or if an overflow or underflow condition occurs. The
- result in all cases is unchanged.
-
- The rounded signal may be tested (or trapped) to determine if a given
- operation (or sequence of operations) caused a loss of precision.
- """
-
-class Subnormal(DecimalException):
- """Exponent < Emin before rounding.
-
- This occurs and signals subnormal whenever the result of a conversion or
- operation is subnormal (that is, its adjusted exponent is less than
- Emin, before any rounding). The result in all cases is unchanged.
-
- The subnormal signal may be tested (or trapped) to determine if a given
- or operation (or sequence of operations) yielded a subnormal result.
- """
-
-class Overflow(Inexact, Rounded):
- """Numerical overflow.
-
- This occurs and signals overflow if the adjusted exponent of a result
- (from a conversion or from an operation that is not an attempt to divide
- by zero), after rounding, would be greater than the largest value that
- can be handled by the implementation (the value Emax).
-
- The result depends on the rounding mode:
-
- For round-half-up and round-half-even (and for round-half-down and
- round-up, if implemented), the result of the operation is [sign,inf],
- where sign is the sign of the intermediate result. For round-down, the
- result is the largest finite number that can be represented in the
- current precision, with the sign of the intermediate result. For
- round-ceiling, the result is the same as for round-down if the sign of
- the intermediate result is 1, or is [0,inf] otherwise. For round-floor,
- the result is the same as for round-down if the sign of the intermediate
- result is 0, or is [1,inf] otherwise. In all cases, Inexact and Rounded
- will also be raised.
- """
-
- def handle(self, context, sign, *args):
- if context.rounding in (ROUND_HALF_UP, ROUND_HALF_EVEN,
- ROUND_HALF_DOWN, ROUND_UP):
- return _SignedInfinity[sign]
- if sign == 0:
- if context.rounding == ROUND_CEILING:
- return _SignedInfinity[sign]
- return _dec_from_triple(sign, '9'*context.prec,
- context.Emax-context.prec+1)
- if sign == 1:
- if context.rounding == ROUND_FLOOR:
- return _SignedInfinity[sign]
- return _dec_from_triple(sign, '9'*context.prec,
- context.Emax-context.prec+1)
-
-
-class Underflow(Inexact, Rounded, Subnormal):
- """Numerical underflow with result rounded to 0.
-
- This occurs and signals underflow if a result is inexact and the
- adjusted exponent of the result would be smaller (more negative) than
- the smallest value that can be handled by the implementation (the value
- Emin). That is, the result is both inexact and subnormal.
-
- The result after an underflow will be a subnormal number rounded, if
- necessary, so that its exponent is not less than Etiny. This may result
- in 0 with the sign of the intermediate result and an exponent of Etiny.
-
- In all cases, Inexact, Rounded, and Subnormal will also be raised.
- """
-
-class FloatOperation(DecimalException, TypeError):
- """Enable stricter semantics for mixing floats and Decimals.
-
- If the signal is not trapped (default), mixing floats and Decimals is
- permitted in the Decimal() constructor, context.create_decimal() and
- all comparison operators. Both conversion and comparisons are exact.
- Any occurrence of a mixed operation is silently recorded by setting
- FloatOperation in the context flags. Explicit conversions with
- Decimal.from_float() or context.create_decimal_from_float() do not
- set the flag.
-
- Otherwise (the signal is trapped), only equality comparisons and explicit
- conversions are silent. All other mixed operations raise FloatOperation.
- """
-
-# List of public traps and flags
-_signals = [Clamped, DivisionByZero, Inexact, Overflow, Rounded,
- Underflow, InvalidOperation, Subnormal, FloatOperation]
-
-# Map conditions (per the spec) to signals
-_condition_map = {ConversionSyntax:InvalidOperation,
- DivisionImpossible:InvalidOperation,
- DivisionUndefined:InvalidOperation,
- InvalidContext:InvalidOperation}
-
-# Valid rounding modes
-_rounding_modes = (ROUND_DOWN, ROUND_HALF_UP, ROUND_HALF_EVEN, ROUND_CEILING,
- ROUND_FLOOR, ROUND_UP, ROUND_HALF_DOWN, ROUND_05UP)
-
-##### Context Functions ##################################################
-
-# The getcontext() and setcontext() function manage access to a thread-local
-# current context. Py2.4 offers direct support for thread locals. If that
-# is not available, use threading.current_thread() which is slower but will
-# work for older Pythons. If threads are not part of the build, create a
-# mock threading object with threading.local() returning the module namespace.
-
-try:
- import threading
-except ImportError:
- # Python was compiled without threads; create a mock object instead
- class MockThreading(object):
- def local(self, sys=sys):
- return sys.modules[__name__]
- threading = MockThreading()
- del MockThreading
-
-try:
- threading.local
-
-except AttributeError:
-
- # To fix reloading, force it to create a new context
- # Old contexts have different exceptions in their dicts, making problems.
- if hasattr(threading.current_thread(), '__decimal_context__'):
- del threading.current_thread().__decimal_context__
-
- def setcontext(context):
- """Set this thread's context to context."""
- if context in (DefaultContext, BasicContext, ExtendedContext):
- context = context.copy()
- context.clear_flags()
- threading.current_thread().__decimal_context__ = context
-
- def getcontext():
- """Returns this thread's context.
-
- If this thread does not yet have a context, returns
- a new context and sets this thread's context.
- New contexts are copies of DefaultContext.
- """
- try:
- return threading.current_thread().__decimal_context__
- except AttributeError:
- context = Context()
- threading.current_thread().__decimal_context__ = context
- return context
-
-else:
-
- local = threading.local()
- if hasattr(local, '__decimal_context__'):
- del local.__decimal_context__
-
- def getcontext(_local=local):
- """Returns this thread's context.
-
- If this thread does not yet have a context, returns
- a new context and sets this thread's context.
- New contexts are copies of DefaultContext.
- """
- try:
- return _local.__decimal_context__
- except AttributeError:
- context = Context()
- _local.__decimal_context__ = context
- return context
-
- def setcontext(context, _local=local):
- """Set this thread's context to context."""
- if context in (DefaultContext, BasicContext, ExtendedContext):
- context = context.copy()
- context.clear_flags()
- _local.__decimal_context__ = context
-
- del threading, local # Don't contaminate the namespace
-
-def localcontext(ctx=None):
- """Return a context manager for a copy of the supplied context
-
- Uses a copy of the current context if no context is specified
- The returned context manager creates a local decimal context
- in a with statement:
- def sin(x):
- with localcontext() as ctx:
- ctx.prec += 2
- # Rest of sin calculation algorithm
- # uses a precision 2 greater than normal
- return +s # Convert result to normal precision
-
- def sin(x):
- with localcontext(ExtendedContext):
- # Rest of sin calculation algorithm
- # uses the Extended Context from the
- # General Decimal Arithmetic Specification
- return +s # Convert result to normal context
-
- >>> setcontext(DefaultContext)
- >>> print(getcontext().prec)
- 28
- >>> with localcontext():
- ... ctx = getcontext()
- ... ctx.prec += 2
- ... print(ctx.prec)
- ...
- 30
- >>> with localcontext(ExtendedContext):
- ... print(getcontext().prec)
- ...
- 9
- >>> print(getcontext().prec)
- 28
- """
- if ctx is None: ctx = getcontext()
- return _ContextManager(ctx)
-
-
-##### Decimal class #######################################################
-
-# Do not subclass Decimal from numbers.Real and do not register it as such
-# (because Decimals are not interoperable with floats). See the notes in
-# numbers.py for more detail.
-
-class Decimal(object):
- """Floating point class for decimal arithmetic."""
-
- __slots__ = ('_exp','_int','_sign', '_is_special')
- # Generally, the value of the Decimal instance is given by
- # (-1)**_sign * _int * 10**_exp
- # Special values are signified by _is_special == True
-
- # We're immutable, so use __new__ not __init__
- def __new__(cls, value="0", context=None):
- """Create a decimal point instance.
-
- >>> Decimal('3.14') # string input
- Decimal('3.14')
- >>> Decimal((0, (3, 1, 4), -2)) # tuple (sign, digit_tuple, exponent)
- Decimal('3.14')
- >>> Decimal(314) # int
- Decimal('314')
- >>> Decimal(Decimal(314)) # another decimal instance
- Decimal('314')
- >>> Decimal(' 3.14 \\n') # leading and trailing whitespace okay
- Decimal('3.14')
- """
-
- # Note that the coefficient, self._int, is actually stored as
- # a string rather than as a tuple of digits. This speeds up
- # the "digits to integer" and "integer to digits" conversions
- # that are used in almost every arithmetic operation on
- # Decimals. This is an internal detail: the as_tuple function
- # and the Decimal constructor still deal with tuples of
- # digits.
-
- self = object.__new__(cls)
-
- # From a string
- # REs insist on real strings, so we can too.
- if isinstance(value, str):
- m = _parser(value.strip())
- if m is None:
- if context is None:
- context = getcontext()
- return context._raise_error(ConversionSyntax,
- "Invalid literal for Decimal: %r" % value)
-
- if m.group('sign') == "-":
- self._sign = 1
- else:
- self._sign = 0
- intpart = m.group('int')
- if intpart is not None:
- # finite number
- fracpart = m.group('frac') or ''
- exp = int(m.group('exp') or '0')
- self._int = str(int(intpart+fracpart))
- self._exp = exp - len(fracpart)
- self._is_special = False
- else:
- diag = m.group('diag')
- if diag is not None:
- # NaN
- self._int = str(int(diag or '0')).lstrip('0')
- if m.group('signal'):
- self._exp = 'N'
- else:
- self._exp = 'n'
- else:
- # infinity
- self._int = '0'
- self._exp = 'F'
- self._is_special = True
- return self
-
- # From an integer
- if isinstance(value, int):
- if value >= 0:
- self._sign = 0
- else:
- self._sign = 1
- self._exp = 0
- self._int = str(abs(value))
- self._is_special = False
- return self
-
- # From another decimal
- if isinstance(value, Decimal):
- self._exp = value._exp
- self._sign = value._sign
- self._int = value._int
- self._is_special = value._is_special
- return self
-
- # From an internal working value
- if isinstance(value, _WorkRep):
- self._sign = value.sign
- self._int = str(value.int)
- self._exp = int(value.exp)
- self._is_special = False
- return self
-
- # tuple/list conversion (possibly from as_tuple())
- if isinstance(value, (list,tuple)):
- if len(value) != 3:
- raise ValueError('Invalid tuple size in creation of Decimal '
- 'from list or tuple. The list or tuple '
- 'should have exactly three elements.')
- # process sign. The isinstance test rejects floats
- if not (isinstance(value[0], int) and value[0] in (0,1)):
- raise ValueError("Invalid sign. The first value in the tuple "
- "should be an integer; either 0 for a "
- "positive number or 1 for a negative number.")
- self._sign = value[0]
- if value[2] == 'F':
- # infinity: value[1] is ignored
- self._int = '0'
- self._exp = value[2]
- self._is_special = True
- else:
- # process and validate the digits in value[1]
- digits = []
- for digit in value[1]:
- if isinstance(digit, int) and 0 <= digit <= 9:
- # skip leading zeros
- if digits or digit != 0:
- digits.append(digit)
- else:
- raise ValueError("The second value in the tuple must "
- "be composed of integers in the range "
- "0 through 9.")
- if value[2] in ('n', 'N'):
- # NaN: digits form the diagnostic
- self._int = ''.join(map(str, digits))
- self._exp = value[2]
- self._is_special = True
- elif isinstance(value[2], int):
- # finite number: digits give the coefficient
- self._int = ''.join(map(str, digits or [0]))
- self._exp = value[2]
- self._is_special = False
- else:
- raise ValueError("The third value in the tuple must "
- "be an integer, or one of the "
- "strings 'F', 'n', 'N'.")
- return self
-
- if isinstance(value, float):
- if context is None:
- context = getcontext()
- context._raise_error(FloatOperation,
- "strict semantics for mixing floats and Decimals are "
- "enabled")
- value = Decimal.from_float(value)
- self._exp = value._exp
- self._sign = value._sign
- self._int = value._int
- self._is_special = value._is_special
- return self
-
- raise TypeError("Cannot convert %r to Decimal" % value)
-
- @classmethod
- def from_float(cls, f):
- """Converts a float to a decimal number, exactly.
-
- Note that Decimal.from_float(0.1) is not the same as Decimal('0.1').
- Since 0.1 is not exactly representable in binary floating point, the
- value is stored as the nearest representable value which is
- 0x1.999999999999ap-4. The exact equivalent of the value in decimal
- is 0.1000000000000000055511151231257827021181583404541015625.
-
- >>> Decimal.from_float(0.1)
- Decimal('0.1000000000000000055511151231257827021181583404541015625')
- >>> Decimal.from_float(float('nan'))
- Decimal('NaN')
- >>> Decimal.from_float(float('inf'))
- Decimal('Infinity')
- >>> Decimal.from_float(-float('inf'))
- Decimal('-Infinity')
- >>> Decimal.from_float(-0.0)
- Decimal('-0')
-
- """
- if isinstance(f, int): # handle integer inputs
- return cls(f)
- if not isinstance(f, float):
- raise TypeError("argument must be int or float.")
- if _math.isinf(f) or _math.isnan(f):
- return cls(repr(f))
- if _math.copysign(1.0, f) == 1.0:
- sign = 0
- else:
- sign = 1
- n, d = abs(f).as_integer_ratio()
- k = d.bit_length() - 1
- result = _dec_from_triple(sign, str(n*5**k), -k)
- if cls is Decimal:
- return result
- else:
- return cls(result)
-
- def _isnan(self):
- """Returns whether the number is not actually one.
-
- 0 if a number
- 1 if NaN
- 2 if sNaN
- """
- if self._is_special:
- exp = self._exp
- if exp == 'n':
- return 1
- elif exp == 'N':
- return 2
- return 0
-
- def _isinfinity(self):
- """Returns whether the number is infinite
-
- 0 if finite or not a number
- 1 if +INF
- -1 if -INF
- """
- if self._exp == 'F':
- if self._sign:
- return -1
- return 1
- return 0
-
- def _check_nans(self, other=None, context=None):
- """Returns whether the number is not actually one.
-
- if self, other are sNaN, signal
- if self, other are NaN return nan
- return 0
-
- Done before operations.
- """
-
- self_is_nan = self._isnan()
- if other is None:
- other_is_nan = False
- else:
- other_is_nan = other._isnan()
-
- if self_is_nan or other_is_nan:
- if context is None:
- context = getcontext()
-
- if self_is_nan == 2:
- return context._raise_error(InvalidOperation, 'sNaN',
- self)
- if other_is_nan == 2:
- return context._raise_error(InvalidOperation, 'sNaN',
- other)
- if self_is_nan:
- return self._fix_nan(context)
-
- return other._fix_nan(context)
- return 0
-
- def _compare_check_nans(self, other, context):
- """Version of _check_nans used for the signaling comparisons
- compare_signal, __le__, __lt__, __ge__, __gt__.
-
- Signal InvalidOperation if either self or other is a (quiet
- or signaling) NaN. Signaling NaNs take precedence over quiet
- NaNs.
-
- Return 0 if neither operand is a NaN.
-
- """
- if context is None:
- context = getcontext()
-
- if self._is_special or other._is_special:
- if self.is_snan():
- return context._raise_error(InvalidOperation,
- 'comparison involving sNaN',
- self)
- elif other.is_snan():
- return context._raise_error(InvalidOperation,
- 'comparison involving sNaN',
- other)
- elif self.is_qnan():
- return context._raise_error(InvalidOperation,
- 'comparison involving NaN',
- self)
- elif other.is_qnan():
- return context._raise_error(InvalidOperation,
- 'comparison involving NaN',
- other)
- return 0
-
- def __bool__(self):
- """Return True if self is nonzero; otherwise return False.
-
- NaNs and infinities are considered nonzero.
- """
- return self._is_special or self._int != '0'
-
- def _cmp(self, other):
- """Compare the two non-NaN decimal instances self and other.
-
- Returns -1 if self < other, 0 if self == other and 1
- if self > other. This routine is for internal use only."""
-
- if self._is_special or other._is_special:
- self_inf = self._isinfinity()
- other_inf = other._isinfinity()
- if self_inf == other_inf:
- return 0
- elif self_inf < other_inf:
- return -1
- else:
- return 1
-
- # check for zeros; Decimal('0') == Decimal('-0')
- if not self:
- if not other:
- return 0
- else:
- return -((-1)**other._sign)
- if not other:
- return (-1)**self._sign
-
- # If different signs, neg one is less
- if other._sign < self._sign:
- return -1
- if self._sign < other._sign:
- return 1
-
- self_adjusted = self.adjusted()
- other_adjusted = other.adjusted()
- if self_adjusted == other_adjusted:
- self_padded = self._int + '0'*(self._exp - other._exp)
- other_padded = other._int + '0'*(other._exp - self._exp)
- if self_padded == other_padded:
- return 0
- elif self_padded < other_padded:
- return -(-1)**self._sign
- else:
- return (-1)**self._sign
- elif self_adjusted > other_adjusted:
- return (-1)**self._sign
- else: # self_adjusted < other_adjusted
- return -((-1)**self._sign)
-
- # Note: The Decimal standard doesn't cover rich comparisons for
- # Decimals. In particular, the specification is silent on the
- # subject of what should happen for a comparison involving a NaN.
- # We take the following approach:
- #
- # == comparisons involving a quiet NaN always return False
- # != comparisons involving a quiet NaN always return True
- # == or != comparisons involving a signaling NaN signal
- # InvalidOperation, and return False or True as above if the
- # InvalidOperation is not trapped.
- # <, >, <= and >= comparisons involving a (quiet or signaling)
- # NaN signal InvalidOperation, and return False if the
- # InvalidOperation is not trapped.
- #
- # This behavior is designed to conform as closely as possible to
- # that specified by IEEE 754.
-
- def __eq__(self, other, context=None):
- self, other = _convert_for_comparison(self, other, equality_op=True)
- if other is NotImplemented:
- return other
- if self._check_nans(other, context):
- return False
- return self._cmp(other) == 0
-
- def __ne__(self, other, context=None):
- self, other = _convert_for_comparison(self, other, equality_op=True)
- if other is NotImplemented:
- return other
- if self._check_nans(other, context):
- return True
- return self._cmp(other) != 0
-
-
- def __lt__(self, other, context=None):
- self, other = _convert_for_comparison(self, other)
- if other is NotImplemented:
- return other
- ans = self._compare_check_nans(other, context)
- if ans:
- return False
- return self._cmp(other) < 0
-
- def __le__(self, other, context=None):
- self, other = _convert_for_comparison(self, other)
- if other is NotImplemented:
- return other
- ans = self._compare_check_nans(other, context)
- if ans:
- return False
- return self._cmp(other) <= 0
-
- def __gt__(self, other, context=None):
- self, other = _convert_for_comparison(self, other)
- if other is NotImplemented:
- return other
- ans = self._compare_check_nans(other, context)
- if ans:
- return False
- return self._cmp(other) > 0
-
- def __ge__(self, other, context=None):
- self, other = _convert_for_comparison(self, other)
- if other is NotImplemented:
- return other
- ans = self._compare_check_nans(other, context)
- if ans:
- return False
- return self._cmp(other) >= 0
-
- def compare(self, other, context=None):
- """Compare self to other. Return a decimal value:
-
- a or b is a NaN ==> Decimal('NaN')
- a < b ==> Decimal('-1')
- a == b ==> Decimal('0')
- a > b ==> Decimal('1')
- """
- other = _convert_other(other, raiseit=True)
-
- # Compare(NaN, NaN) = NaN
- if (self._is_special or other and other._is_special):
- ans = self._check_nans(other, context)
- if ans:
- return ans
-
- return Decimal(self._cmp(other))
-
- def __hash__(self):
- """x.__hash__() <==> hash(x)"""
-
- # In order to make sure that the hash of a Decimal instance
- # agrees with the hash of a numerically equal integer, float
- # or Fraction, we follow the rules for numeric hashes outlined
- # in the documentation. (See library docs, 'Built-in Types').
- if self._is_special:
- if self.is_snan():
- raise TypeError('Cannot hash a signaling NaN value.')
- elif self.is_nan():
- return _PyHASH_NAN
- else:
- if self._sign:
- return -_PyHASH_INF
- else:
- return _PyHASH_INF
-
- if self._exp >= 0:
- exp_hash = pow(10, self._exp, _PyHASH_MODULUS)
- else:
- exp_hash = pow(_PyHASH_10INV, -self._exp, _PyHASH_MODULUS)
- hash_ = int(self._int) * exp_hash % _PyHASH_MODULUS
- ans = hash_ if self >= 0 else -hash_
- return -2 if ans == -1 else ans
-
- def as_tuple(self):
- """Represents the number as a triple tuple.
-
- To show the internals exactly as they are.
- """
- return DecimalTuple(self._sign, tuple(map(int, self._int)), self._exp)
-
- def __repr__(self):
- """Represents the number as an instance of Decimal."""
- # Invariant: eval(repr(d)) == d
- return "Decimal('%s')" % str(self)
-
- def __str__(self, eng=False, context=None):
- """Return string representation of the number in scientific notation.
-
- Captures all of the information in the underlying representation.
- """
-
- sign = ['', '-'][self._sign]
- if self._is_special:
- if self._exp == 'F':
- return sign + 'Infinity'
- elif self._exp == 'n':
- return sign + 'NaN' + self._int
- else: # self._exp == 'N'
- return sign + 'sNaN' + self._int
-
- # number of digits of self._int to left of decimal point
- leftdigits = self._exp + len(self._int)
-
- # dotplace is number of digits of self._int to the left of the
- # decimal point in the mantissa of the output string (that is,
- # after adjusting the exponent)
- if self._exp <= 0 and leftdigits > -6:
- # no exponent required
- dotplace = leftdigits
- elif not eng:
- # usual scientific notation: 1 digit on left of the point
- dotplace = 1
- elif self._int == '0':
- # engineering notation, zero
- dotplace = (leftdigits + 1) % 3 - 1
- else:
- # engineering notation, nonzero
- dotplace = (leftdigits - 1) % 3 + 1
-
- if dotplace <= 0:
- intpart = '0'
- fracpart = '.' + '0'*(-dotplace) + self._int
- elif dotplace >= len(self._int):
- intpart = self._int+'0'*(dotplace-len(self._int))
- fracpart = ''
- else:
- intpart = self._int[:dotplace]
- fracpart = '.' + self._int[dotplace:]
- if leftdigits == dotplace:
- exp = ''
- else:
- if context is None:
- context = getcontext()
- exp = ['e', 'E'][context.capitals] + "%+d" % (leftdigits-dotplace)
-
- return sign + intpart + fracpart + exp
-
- def to_eng_string(self, context=None):
- """Convert to engineering-type string.
-
- Engineering notation has an exponent which is a multiple of 3, so there
- are up to 3 digits left of the decimal place.
-
- Same rules for when in exponential and when as a value as in __str__.
- """
- return self.__str__(eng=True, context=context)
-
- def __neg__(self, context=None):
- """Returns a copy with the sign switched.
-
- Rounds, if it has reason.
- """
- if self._is_special:
- ans = self._check_nans(context=context)
- if ans:
- return ans
-
- if context is None:
- context = getcontext()
-
- if not self and context.rounding != ROUND_FLOOR:
- # -Decimal('0') is Decimal('0'), not Decimal('-0'), except
- # in ROUND_FLOOR rounding mode.
- ans = self.copy_abs()
- else:
- ans = self.copy_negate()
-
- return ans._fix(context)
-
- def __pos__(self, context=None):
- """Returns a copy, unless it is a sNaN.
-
- Rounds the number (if more then precision digits)
- """
- if self._is_special:
- ans = self._check_nans(context=context)
- if ans:
- return ans
-
- if context is None:
- context = getcontext()
-
- if not self and context.rounding != ROUND_FLOOR:
- # + (-0) = 0, except in ROUND_FLOOR rounding mode.
- ans = self.copy_abs()
- else:
- ans = Decimal(self)
-
- return ans._fix(context)
-
- def __abs__(self, round=True, context=None):
- """Returns the absolute value of self.
-
- If the keyword argument 'round' is false, do not round. The
- expression self.__abs__(round=False) is equivalent to
- self.copy_abs().
- """
- if not round:
- return self.copy_abs()
-
- if self._is_special:
- ans = self._check_nans(context=context)
- if ans:
- return ans
-
- if self._sign:
- ans = self.__neg__(context=context)
- else:
- ans = self.__pos__(context=context)
-
- return ans
-
- def __add__(self, other, context=None):
- """Returns self + other.
-
- -INF + INF (or the reverse) cause InvalidOperation errors.
- """
- other = _convert_other(other)
- if other is NotImplemented:
- return other
-
- if context is None:
- context = getcontext()
-
- if self._is_special or other._is_special:
- ans = self._check_nans(other, context)
- if ans:
- return ans
-
- if self._isinfinity():
- # If both INF, same sign => same as both, opposite => error.
- if self._sign != other._sign and other._isinfinity():
- return context._raise_error(InvalidOperation, '-INF + INF')
- return Decimal(self)
- if other._isinfinity():
- return Decimal(other) # Can't both be infinity here
-
- exp = min(self._exp, other._exp)
- negativezero = 0
- if context.rounding == ROUND_FLOOR and self._sign != other._sign:
- # If the answer is 0, the sign should be negative, in this case.
- negativezero = 1
-
- if not self and not other:
- sign = min(self._sign, other._sign)
- if negativezero:
- sign = 1
- ans = _dec_from_triple(sign, '0', exp)
- ans = ans._fix(context)
- return ans
- if not self:
- exp = max(exp, other._exp - context.prec-1)
- ans = other._rescale(exp, context.rounding)
- ans = ans._fix(context)
- return ans
- if not other:
- exp = max(exp, self._exp - context.prec-1)
- ans = self._rescale(exp, context.rounding)
- ans = ans._fix(context)
- return ans
-
- op1 = _WorkRep(self)
- op2 = _WorkRep(other)
- op1, op2 = _normalize(op1, op2, context.prec)
-
- result = _WorkRep()
- if op1.sign != op2.sign:
- # Equal and opposite
- if op1.int == op2.int:
- ans = _dec_from_triple(negativezero, '0', exp)
- ans = ans._fix(context)
- return ans
- if op1.int < op2.int:
- op1, op2 = op2, op1
- # OK, now abs(op1) > abs(op2)
- if op1.sign == 1:
- result.sign = 1
- op1.sign, op2.sign = op2.sign, op1.sign
- else:
- result.sign = 0
- # So we know the sign, and op1 > 0.
- elif op1.sign == 1:
- result.sign = 1
- op1.sign, op2.sign = (0, 0)
- else:
- result.sign = 0
- # Now, op1 > abs(op2) > 0
-
- if op2.sign == 0:
- result.int = op1.int + op2.int
- else:
- result.int = op1.int - op2.int
-
- result.exp = op1.exp
- ans = Decimal(result)
- ans = ans._fix(context)
- return ans
-
- __radd__ = __add__
-
- def __sub__(self, other, context=None):
- """Return self - other"""
- other = _convert_other(other)
- if other is NotImplemented:
- return other
-
- if self._is_special or other._is_special:
- ans = self._check_nans(other, context=context)
- if ans:
- return ans
-
- # self - other is computed as self + other.copy_negate()
- return self.__add__(other.copy_negate(), context=context)
-
- def __rsub__(self, other, context=None):
- """Return other - self"""
- other = _convert_other(other)
- if other is NotImplemented:
- return other
-
- return other.__sub__(self, context=context)
-
- def __mul__(self, other, context=None):
- """Return self * other.
-
- (+-) INF * 0 (or its reverse) raise InvalidOperation.
- """
- other = _convert_other(other)
- if other is NotImplemented:
- return other
-
- if context is None:
- context = getcontext()
-
- resultsign = self._sign ^ other._sign
-
- if self._is_special or other._is_special:
- ans = self._check_nans(other, context)
- if ans:
- return ans
-
- if self._isinfinity():
- if not other:
- return context._raise_error(InvalidOperation, '(+-)INF * 0')
- return _SignedInfinity[resultsign]
-
- if other._isinfinity():
- if not self:
- return context._raise_error(InvalidOperation, '0 * (+-)INF')
- return _SignedInfinity[resultsign]
-
- resultexp = self._exp + other._exp
-
- # Special case for multiplying by zero
- if not self or not other:
- ans = _dec_from_triple(resultsign, '0', resultexp)
- # Fixing in case the exponent is out of bounds
- ans = ans._fix(context)
- return ans
-
- # Special case for multiplying by power of 10
- if self._int == '1':
- ans = _dec_from_triple(resultsign, other._int, resultexp)
- ans = ans._fix(context)
- return ans
- if other._int == '1':
- ans = _dec_from_triple(resultsign, self._int, resultexp)
- ans = ans._fix(context)
- return ans
-
- op1 = _WorkRep(self)
- op2 = _WorkRep(other)
-
- ans = _dec_from_triple(resultsign, str(op1.int * op2.int), resultexp)
- ans = ans._fix(context)
-
- return ans
- __rmul__ = __mul__
-
- def __truediv__(self, other, context=None):
- """Return self / other."""
- other = _convert_other(other)
- if other is NotImplemented:
- return NotImplemented
-
- if context is None:
- context = getcontext()
-
- sign = self._sign ^ other._sign
-
- if self._is_special or other._is_special:
- ans = self._check_nans(other, context)
- if ans:
- return ans
-
- if self._isinfinity() and other._isinfinity():
- return context._raise_error(InvalidOperation, '(+-)INF/(+-)INF')
-
- if self._isinfinity():
- return _SignedInfinity[sign]
-
- if other._isinfinity():
- context._raise_error(Clamped, 'Division by infinity')
- return _dec_from_triple(sign, '0', context.Etiny())
-
- # Special cases for zeroes
- if not other:
- if not self:
- return context._raise_error(DivisionUndefined, '0 / 0')
- return context._raise_error(DivisionByZero, 'x / 0', sign)
-
- if not self:
- exp = self._exp - other._exp
- coeff = 0
- else:
- # OK, so neither = 0, INF or NaN
- shift = len(other._int) - len(self._int) + context.prec + 1
- exp = self._exp - other._exp - shift
- op1 = _WorkRep(self)
- op2 = _WorkRep(other)
- if shift >= 0:
- coeff, remainder = divmod(op1.int * 10**shift, op2.int)
- else:
- coeff, remainder = divmod(op1.int, op2.int * 10**-shift)
- if remainder:
- # result is not exact; adjust to ensure correct rounding
- if coeff % 5 == 0:
- coeff += 1
- else:
- # result is exact; get as close to ideal exponent as possible
- ideal_exp = self._exp - other._exp
- while exp < ideal_exp and coeff % 10 == 0:
- coeff //= 10
- exp += 1
-
- ans = _dec_from_triple(sign, str(coeff), exp)
- return ans._fix(context)
-
- def _divide(self, other, context):
- """Return (self // other, self % other), to context.prec precision.
-
- Assumes that neither self nor other is a NaN, that self is not
- infinite and that other is nonzero.
- """
- sign = self._sign ^ other._sign
- if other._isinfinity():
- ideal_exp = self._exp
- else:
- ideal_exp = min(self._exp, other._exp)
-
- expdiff = self.adjusted() - other.adjusted()
- if not self or other._isinfinity() or expdiff <= -2:
- return (_dec_from_triple(sign, '0', 0),
- self._rescale(ideal_exp, context.rounding))
- if expdiff <= context.prec:
- op1 = _WorkRep(self)
- op2 = _WorkRep(other)
- if op1.exp >= op2.exp:
- op1.int *= 10**(op1.exp - op2.exp)
- else:
- op2.int *= 10**(op2.exp - op1.exp)
- q, r = divmod(op1.int, op2.int)
- if q < 10**context.prec:
- return (_dec_from_triple(sign, str(q), 0),
- _dec_from_triple(self._sign, str(r), ideal_exp))
-
- # Here the quotient is too large to be representable
- ans = context._raise_error(DivisionImpossible,
- 'quotient too large in //, % or divmod')
- return ans, ans
-
- def __rtruediv__(self, other, context=None):
- """Swaps self/other and returns __truediv__."""
- other = _convert_other(other)
- if other is NotImplemented:
- return other
- return other.__truediv__(self, context=context)
-
- def __divmod__(self, other, context=None):
- """
- Return (self // other, self % other)
- """
- other = _convert_other(other)
- if other is NotImplemented:
- return other
-
- if context is None:
- context = getcontext()
-
- ans = self._check_nans(other, context)
- if ans:
- return (ans, ans)
-
- sign = self._sign ^ other._sign
- if self._isinfinity():
- if other._isinfinity():
- ans = context._raise_error(InvalidOperation, 'divmod(INF, INF)')
- return ans, ans
- else:
- return (_SignedInfinity[sign],
- context._raise_error(InvalidOperation, 'INF % x'))
-
- if not other:
- if not self:
- ans = context._raise_error(DivisionUndefined, 'divmod(0, 0)')
- return ans, ans
- else:
- return (context._raise_error(DivisionByZero, 'x // 0', sign),
- context._raise_error(InvalidOperation, 'x % 0'))
-
- quotient, remainder = self._divide(other, context)
- remainder = remainder._fix(context)
- return quotient, remainder
-
- def __rdivmod__(self, other, context=None):
- """Swaps self/other and returns __divmod__."""
- other = _convert_other(other)
- if other is NotImplemented:
- return other
- return other.__divmod__(self, context=context)
-
- def __mod__(self, other, context=None):
- """
- self % other
- """
- other = _convert_other(other)
- if other is NotImplemented:
- return other
-
- if context is None:
- context = getcontext()
-
- ans = self._check_nans(other, context)
- if ans:
- return ans
-
- if self._isinfinity():
- return context._raise_error(InvalidOperation, 'INF % x')
- elif not other:
- if self:
- return context._raise_error(InvalidOperation, 'x % 0')
- else:
- return context._raise_error(DivisionUndefined, '0 % 0')
-
- remainder = self._divide(other, context)[1]
- remainder = remainder._fix(context)
- return remainder
-
- def __rmod__(self, other, context=None):
- """Swaps self/other and returns __mod__."""
- other = _convert_other(other)
- if other is NotImplemented:
- return other
- return other.__mod__(self, context=context)
-
- def remainder_near(self, other, context=None):
- """
- Remainder nearest to 0- abs(remainder-near) <= other/2
- """
- if context is None:
- context = getcontext()
-
- other = _convert_other(other, raiseit=True)
-
- ans = self._check_nans(other, context)
- if ans:
- return ans
-
- # self == +/-infinity -> InvalidOperation
- if self._isinfinity():
- return context._raise_error(InvalidOperation,
- 'remainder_near(infinity, x)')
-
- # other == 0 -> either InvalidOperation or DivisionUndefined
- if not other:
- if self:
- return context._raise_error(InvalidOperation,
- 'remainder_near(x, 0)')
- else:
- return context._raise_error(DivisionUndefined,
- 'remainder_near(0, 0)')
-
- # other = +/-infinity -> remainder = self
- if other._isinfinity():
- ans = Decimal(self)
- return ans._fix(context)
-
- # self = 0 -> remainder = self, with ideal exponent
- ideal_exponent = min(self._exp, other._exp)
- if not self:
- ans = _dec_from_triple(self._sign, '0', ideal_exponent)
- return ans._fix(context)
-
- # catch most cases of large or small quotient
- expdiff = self.adjusted() - other.adjusted()
- if expdiff >= context.prec + 1:
- # expdiff >= prec+1 => abs(self/other) > 10**prec
- return context._raise_error(DivisionImpossible)
- if expdiff <= -2:
- # expdiff <= -2 => abs(self/other) < 0.1
- ans = self._rescale(ideal_exponent, context.rounding)
- return ans._fix(context)
-
- # adjust both arguments to have the same exponent, then divide
- op1 = _WorkRep(self)
- op2 = _WorkRep(other)
- if op1.exp >= op2.exp:
- op1.int *= 10**(op1.exp - op2.exp)
- else:
- op2.int *= 10**(op2.exp - op1.exp)
- q, r = divmod(op1.int, op2.int)
- # remainder is r*10**ideal_exponent; other is +/-op2.int *
- # 10**ideal_exponent. Apply correction to ensure that
- # abs(remainder) <= abs(other)/2
- if 2*r + (q&1) > op2.int:
- r -= op2.int
- q += 1
-
- if q >= 10**context.prec:
- return context._raise_error(DivisionImpossible)
-
- # result has same sign as self unless r is negative
- sign = self._sign
- if r < 0:
- sign = 1-sign
- r = -r
-
- ans = _dec_from_triple(sign, str(r), ideal_exponent)
- return ans._fix(context)
-
- def __floordiv__(self, other, context=None):
- """self // other"""
- other = _convert_other(other)
- if other is NotImplemented:
- return other
-
- if context is None:
- context = getcontext()
-
- ans = self._check_nans(other, context)
- if ans:
- return ans
-
- if self._isinfinity():
- if other._isinfinity():
- return context._raise_error(InvalidOperation, 'INF // INF')
- else:
- return _SignedInfinity[self._sign ^ other._sign]
-
- if not other:
- if self:
- return context._raise_error(DivisionByZero, 'x // 0',
- self._sign ^ other._sign)
- else:
- return context._raise_error(DivisionUndefined, '0 // 0')
-
- return self._divide(other, context)[0]
-
- def __rfloordiv__(self, other, context=None):
- """Swaps self/other and returns __floordiv__."""
- other = _convert_other(other)
- if other is NotImplemented:
- return other
- return other.__floordiv__(self, context=context)
-
- def __float__(self):
- """Float representation."""
- if self._isnan():
- if self.is_snan():
- raise ValueError("Cannot convert signaling NaN to float")
- s = "-nan" if self._sign else "nan"
- else:
- s = str(self)
- return float(s)
-
- def __int__(self):
- """Converts self to an int, truncating if necessary."""
- if self._is_special:
- if self._isnan():
- raise ValueError("Cannot convert NaN to integer")
- elif self._isinfinity():
- raise OverflowError("Cannot convert infinity to integer")
- s = (-1)**self._sign
- if self._exp >= 0:
- return s*int(self._int)*10**self._exp
- else:
- return s*int(self._int[:self._exp] or '0')
-
- __trunc__ = __int__
-
- def real(self):
- return self
- real = property(real)
-
- def imag(self):
- return Decimal(0)
- imag = property(imag)
-
- def conjugate(self):
- return self
-
- def __complex__(self):
- return complex(float(self))
-
- def _fix_nan(self, context):
- """Decapitate the payload of a NaN to fit the context"""
- payload = self._int
-
- # maximum length of payload is precision if clamp=0,
- # precision-1 if clamp=1.
- max_payload_len = context.prec - context.clamp
- if len(payload) > max_payload_len:
- payload = payload[len(payload)-max_payload_len:].lstrip('0')
- return _dec_from_triple(self._sign, payload, self._exp, True)
- return Decimal(self)
-
- def _fix(self, context):
- """Round if it is necessary to keep self within prec precision.
-
- Rounds and fixes the exponent. Does not raise on a sNaN.
-
- Arguments:
- self - Decimal instance
- context - context used.
- """
-
- if self._is_special:
- if self._isnan():
- # decapitate payload if necessary
- return self._fix_nan(context)
- else:
- # self is +/-Infinity; return unaltered
- return Decimal(self)
-
- # if self is zero then exponent should be between Etiny and
- # Emax if clamp==0, and between Etiny and Etop if clamp==1.
- Etiny = context.Etiny()
- Etop = context.Etop()
- if not self:
- exp_max = [context.Emax, Etop][context.clamp]
- new_exp = min(max(self._exp, Etiny), exp_max)
- if new_exp != self._exp:
- context._raise_error(Clamped)
- return _dec_from_triple(self._sign, '0', new_exp)
- else:
- return Decimal(self)
-
- # exp_min is the smallest allowable exponent of the result,
- # equal to max(self.adjusted()-context.prec+1, Etiny)
- exp_min = len(self._int) + self._exp - context.prec
- if exp_min > Etop:
- # overflow: exp_min > Etop iff self.adjusted() > Emax
- ans = context._raise_error(Overflow, 'above Emax', self._sign)
- context._raise_error(Inexact)
- context._raise_error(Rounded)
- return ans
-
- self_is_subnormal = exp_min < Etiny
- if self_is_subnormal:
- exp_min = Etiny
-
- # round if self has too many digits
- if self._exp < exp_min:
- digits = len(self._int) + self._exp - exp_min
- if digits < 0:
- self = _dec_from_triple(self._sign, '1', exp_min-1)
- digits = 0
- rounding_method = self._pick_rounding_function[context.rounding]
- changed = rounding_method(self, digits)
- coeff = self._int[:digits] or '0'
- if changed > 0:
- coeff = str(int(coeff)+1)
- if len(coeff) > context.prec:
- coeff = coeff[:-1]
- exp_min += 1
-
- # check whether the rounding pushed the exponent out of range
- if exp_min > Etop:
- ans = context._raise_error(Overflow, 'above Emax', self._sign)
- else:
- ans = _dec_from_triple(self._sign, coeff, exp_min)
-
- # raise the appropriate signals, taking care to respect
- # the precedence described in the specification
- if changed and self_is_subnormal:
- context._raise_error(Underflow)
- if self_is_subnormal:
- context._raise_error(Subnormal)
- if changed:
- context._raise_error(Inexact)
- context._raise_error(Rounded)
- if not ans:
- # raise Clamped on underflow to 0
- context._raise_error(Clamped)
- return ans
-
- if self_is_subnormal:
- context._raise_error(Subnormal)
-
- # fold down if clamp == 1 and self has too few digits
- if context.clamp == 1 and self._exp > Etop:
- context._raise_error(Clamped)
- self_padded = self._int + '0'*(self._exp - Etop)
- return _dec_from_triple(self._sign, self_padded, Etop)
-
- # here self was representable to begin with; return unchanged
- return Decimal(self)
-
- # for each of the rounding functions below:
- # self is a finite, nonzero Decimal
- # prec is an integer satisfying 0 <= prec < len(self._int)
- #
- # each function returns either -1, 0, or 1, as follows:
- # 1 indicates that self should be rounded up (away from zero)
- # 0 indicates that self should be truncated, and that all the
- # digits to be truncated are zeros (so the value is unchanged)
- # -1 indicates that there are nonzero digits to be truncated
-
- def _round_down(self, prec):
- """Also known as round-towards-0, truncate."""
- if _all_zeros(self._int, prec):
- return 0
- else:
- return -1
-
- def _round_up(self, prec):
- """Rounds away from 0."""
- return -self._round_down(prec)
-
- def _round_half_up(self, prec):
- """Rounds 5 up (away from 0)"""
- if self._int[prec] in '56789':
- return 1
- elif _all_zeros(self._int, prec):
- return 0
- else:
- return -1
-
- def _round_half_down(self, prec):
- """Round 5 down"""
- if _exact_half(self._int, prec):
- return -1
- else:
- return self._round_half_up(prec)
-
- def _round_half_even(self, prec):
- """Round 5 to even, rest to nearest."""
- if _exact_half(self._int, prec) and \
- (prec == 0 or self._int[prec-1] in '02468'):
- return -1
- else:
- return self._round_half_up(prec)
-
- def _round_ceiling(self, prec):
- """Rounds up (not away from 0 if negative.)"""
- if self._sign:
- return self._round_down(prec)
- else:
- return -self._round_down(prec)
-
- def _round_floor(self, prec):
- """Rounds down (not towards 0 if negative)"""
- if not self._sign:
- return self._round_down(prec)
- else:
- return -self._round_down(prec)
-
- def _round_05up(self, prec):
- """Round down unless digit prec-1 is 0 or 5."""
- if prec and self._int[prec-1] not in '05':
- return self._round_down(prec)
- else:
- return -self._round_down(prec)
-
- _pick_rounding_function = dict(
- ROUND_DOWN = _round_down,
- ROUND_UP = _round_up,
- ROUND_HALF_UP = _round_half_up,
- ROUND_HALF_DOWN = _round_half_down,
- ROUND_HALF_EVEN = _round_half_even,
- ROUND_CEILING = _round_ceiling,
- ROUND_FLOOR = _round_floor,
- ROUND_05UP = _round_05up,
- )
-
- def __round__(self, n=None):
- """Round self to the nearest integer, or to a given precision.
-
- If only one argument is supplied, round a finite Decimal
- instance self to the nearest integer. If self is infinite or
- a NaN then a Python exception is raised. If self is finite
- and lies exactly halfway between two integers then it is
- rounded to the integer with even last digit.
-
- >>> round(Decimal('123.456'))
- 123
- >>> round(Decimal('-456.789'))
- -457
- >>> round(Decimal('-3.0'))
- -3
- >>> round(Decimal('2.5'))
- 2
- >>> round(Decimal('3.5'))
- 4
- >>> round(Decimal('Inf'))
- Traceback (most recent call last):
- ...
- OverflowError: cannot round an infinity
- >>> round(Decimal('NaN'))
- Traceback (most recent call last):
- ...
- ValueError: cannot round a NaN
-
- If a second argument n is supplied, self is rounded to n
- decimal places using the rounding mode for the current
- context.
-
- For an integer n, round(self, -n) is exactly equivalent to
- self.quantize(Decimal('1En')).
-
- >>> round(Decimal('123.456'), 0)
- Decimal('123')
- >>> round(Decimal('123.456'), 2)
- Decimal('123.46')
- >>> round(Decimal('123.456'), -2)
- Decimal('1E+2')
- >>> round(Decimal('-Infinity'), 37)
- Decimal('NaN')
- >>> round(Decimal('sNaN123'), 0)
- Decimal('NaN123')
-
- """
- if n is not None:
- # two-argument form: use the equivalent quantize call
- if not isinstance(n, int):
- raise TypeError('Second argument to round should be integral')
- exp = _dec_from_triple(0, '1', -n)
- return self.quantize(exp)
-
- # one-argument form
- if self._is_special:
- if self.is_nan():
- raise ValueError("cannot round a NaN")
- else:
- raise OverflowError("cannot round an infinity")
- return int(self._rescale(0, ROUND_HALF_EVEN))
-
- def __floor__(self):
- """Return the floor of self, as an integer.
-
- For a finite Decimal instance self, return the greatest
- integer n such that n <= self. If self is infinite or a NaN
- then a Python exception is raised.
-
- """
- if self._is_special:
- if self.is_nan():
- raise ValueError("cannot round a NaN")
- else:
- raise OverflowError("cannot round an infinity")
- return int(self._rescale(0, ROUND_FLOOR))
-
- def __ceil__(self):
- """Return the ceiling of self, as an integer.
-
- For a finite Decimal instance self, return the least integer n
- such that n >= self. If self is infinite or a NaN then a
- Python exception is raised.
-
- """
- if self._is_special:
- if self.is_nan():
- raise ValueError("cannot round a NaN")
- else:
- raise OverflowError("cannot round an infinity")
- return int(self._rescale(0, ROUND_CEILING))
-
- def fma(self, other, third, context=None):
- """Fused multiply-add.
-
- Returns self*other+third with no rounding of the intermediate
- product self*other.
-
- self and other are multiplied together, with no rounding of
- the result. The third operand is then added to the result,
- and a single final rounding is performed.
- """
-
- other = _convert_other(other, raiseit=True)
- third = _convert_other(third, raiseit=True)
-
- # compute product; raise InvalidOperation if either operand is
- # a signaling NaN or if the product is zero times infinity.
- if self._is_special or other._is_special:
- if context is None:
- context = getcontext()
- if self._exp == 'N':
- return context._raise_error(InvalidOperation, 'sNaN', self)
- if other._exp == 'N':
- return context._raise_error(InvalidOperation, 'sNaN', other)
- if self._exp == 'n':
- product = self
- elif other._exp == 'n':
- product = other
- elif self._exp == 'F':
- if not other:
- return context._raise_error(InvalidOperation,
- 'INF * 0 in fma')
- product = _SignedInfinity[self._sign ^ other._sign]
- elif other._exp == 'F':
- if not self:
- return context._raise_error(InvalidOperation,
- '0 * INF in fma')
- product = _SignedInfinity[self._sign ^ other._sign]
- else:
- product = _dec_from_triple(self._sign ^ other._sign,
- str(int(self._int) * int(other._int)),
- self._exp + other._exp)
-
- return product.__add__(third, context)
-
- def _power_modulo(self, other, modulo, context=None):
- """Three argument version of __pow__"""
-
- other = _convert_other(other)
- if other is NotImplemented:
- return other
- modulo = _convert_other(modulo)
- if modulo is NotImplemented:
- return modulo
-
- if context is None:
- context = getcontext()
-
- # deal with NaNs: if there are any sNaNs then first one wins,
- # (i.e. behaviour for NaNs is identical to that of fma)
- self_is_nan = self._isnan()
- other_is_nan = other._isnan()
- modulo_is_nan = modulo._isnan()
- if self_is_nan or other_is_nan or modulo_is_nan:
- if self_is_nan == 2:
- return context._raise_error(InvalidOperation, 'sNaN',
- self)
- if other_is_nan == 2:
- return context._raise_error(InvalidOperation, 'sNaN',
- other)
- if modulo_is_nan == 2:
- return context._raise_error(InvalidOperation, 'sNaN',
- modulo)
- if self_is_nan:
- return self._fix_nan(context)
- if other_is_nan:
- return other._fix_nan(context)
- return modulo._fix_nan(context)
-
- # check inputs: we apply same restrictions as Python's pow()
- if not (self._isinteger() and
- other._isinteger() and
- modulo._isinteger()):
- return context._raise_error(InvalidOperation,
- 'pow() 3rd argument not allowed '
- 'unless all arguments are integers')
- if other < 0:
- return context._raise_error(InvalidOperation,
- 'pow() 2nd argument cannot be '
- 'negative when 3rd argument specified')
- if not modulo:
- return context._raise_error(InvalidOperation,
- 'pow() 3rd argument cannot be 0')
-
- # additional restriction for decimal: the modulus must be less
- # than 10**prec in absolute value
- if modulo.adjusted() >= context.prec:
- return context._raise_error(InvalidOperation,
- 'insufficient precision: pow() 3rd '
- 'argument must not have more than '
- 'precision digits')
-
- # define 0**0 == NaN, for consistency with two-argument pow
- # (even though it hurts!)
- if not other and not self:
- return context._raise_error(InvalidOperation,
- 'at least one of pow() 1st argument '
- 'and 2nd argument must be nonzero ;'
- '0**0 is not defined')
-
- # compute sign of result
- if other._iseven():
- sign = 0
- else:
- sign = self._sign
-
- # convert modulo to a Python integer, and self and other to
- # Decimal integers (i.e. force their exponents to be >= 0)
- modulo = abs(int(modulo))
- base = _WorkRep(self.to_integral_value())
- exponent = _WorkRep(other.to_integral_value())
-
- # compute result using integer pow()
- base = (base.int % modulo * pow(10, base.exp, modulo)) % modulo
- for i in range(exponent.exp):
- base = pow(base, 10, modulo)
- base = pow(base, exponent.int, modulo)
-
- return _dec_from_triple(sign, str(base), 0)
-
- def _power_exact(self, other, p):
- """Attempt to compute self**other exactly.
-
- Given Decimals self and other and an integer p, attempt to
- compute an exact result for the power self**other, with p
- digits of precision. Return None if self**other is not
- exactly representable in p digits.
-
- Assumes that elimination of special cases has already been
- performed: self and other must both be nonspecial; self must
- be positive and not numerically equal to 1; other must be
- nonzero. For efficiency, other._exp should not be too large,
- so that 10**abs(other._exp) is a feasible calculation."""
-
- # In the comments below, we write x for the value of self and y for the
- # value of other. Write x = xc*10**xe and abs(y) = yc*10**ye, with xc
- # and yc positive integers not divisible by 10.
-
- # The main purpose of this method is to identify the *failure*
- # of x**y to be exactly representable with as little effort as
- # possible. So we look for cheap and easy tests that
- # eliminate the possibility of x**y being exact. Only if all
- # these tests are passed do we go on to actually compute x**y.
-
- # Here's the main idea. Express y as a rational number m/n, with m and
- # n relatively prime and n>0. Then for x**y to be exactly
- # representable (at *any* precision), xc must be the nth power of a
- # positive integer and xe must be divisible by n. If y is negative
- # then additionally xc must be a power of either 2 or 5, hence a power
- # of 2**n or 5**n.
- #
- # There's a limit to how small |y| can be: if y=m/n as above
- # then:
- #
- # (1) if xc != 1 then for the result to be representable we
- # need xc**(1/n) >= 2, and hence also xc**|y| >= 2. So
- # if |y| <= 1/nbits(xc) then xc < 2**nbits(xc) <=
- # 2**(1/|y|), hence xc**|y| < 2 and the result is not
- # representable.
- #
- # (2) if xe != 0, |xe|*(1/n) >= 1, so |xe|*|y| >= 1. Hence if
- # |y| < 1/|xe| then the result is not representable.
- #
- # Note that since x is not equal to 1, at least one of (1) and
- # (2) must apply. Now |y| < 1/nbits(xc) iff |yc|*nbits(xc) <
- # 10**-ye iff len(str(|yc|*nbits(xc)) <= -ye.
- #
- # There's also a limit to how large y can be, at least if it's
- # positive: the normalized result will have coefficient xc**y,
- # so if it's representable then xc**y < 10**p, and y <
- # p/log10(xc). Hence if y*log10(xc) >= p then the result is
- # not exactly representable.
-
- # if len(str(abs(yc*xe)) <= -ye then abs(yc*xe) < 10**-ye,
- # so |y| < 1/xe and the result is not representable.
- # Similarly, len(str(abs(yc)*xc_bits)) <= -ye implies |y|
- # < 1/nbits(xc).
-
- x = _WorkRep(self)
- xc, xe = x.int, x.exp
- while xc % 10 == 0:
- xc //= 10
- xe += 1
-
- y = _WorkRep(other)
- yc, ye = y.int, y.exp
- while yc % 10 == 0:
- yc //= 10
- ye += 1
-
- # case where xc == 1: result is 10**(xe*y), with xe*y
- # required to be an integer
- if xc == 1:
- xe *= yc
- # result is now 10**(xe * 10**ye); xe * 10**ye must be integral
- while xe % 10 == 0:
- xe //= 10
- ye += 1
- if ye < 0:
- return None
- exponent = xe * 10**ye
- if y.sign == 1:
- exponent = -exponent
- # if other is a nonnegative integer, use ideal exponent
- if other._isinteger() and other._sign == 0:
- ideal_exponent = self._exp*int(other)
- zeros = min(exponent-ideal_exponent, p-1)
- else:
- zeros = 0
- return _dec_from_triple(0, '1' + '0'*zeros, exponent-zeros)
-
- # case where y is negative: xc must be either a power
- # of 2 or a power of 5.
- if y.sign == 1:
- last_digit = xc % 10
- if last_digit in (2,4,6,8):
- # quick test for power of 2
- if xc & -xc != xc:
- return None
- # now xc is a power of 2; e is its exponent
- e = _nbits(xc)-1
-
- # We now have:
- #
- # x = 2**e * 10**xe, e > 0, and y < 0.
- #
- # The exact result is:
- #
- # x**y = 5**(-e*y) * 10**(e*y + xe*y)
- #
- # provided that both e*y and xe*y are integers. Note that if
- # 5**(-e*y) >= 10**p, then the result can't be expressed
- # exactly with p digits of precision.
- #
- # Using the above, we can guard against large values of ye.
- # 93/65 is an upper bound for log(10)/log(5), so if
- #
- # ye >= len(str(93*p//65))
- #
- # then
- #
- # -e*y >= -y >= 10**ye > 93*p/65 > p*log(10)/log(5),
- #
- # so 5**(-e*y) >= 10**p, and the coefficient of the result
- # can't be expressed in p digits.
-
- # emax >= largest e such that 5**e < 10**p.
- emax = p*93//65
- if ye >= len(str(emax)):
- return None
-
- # Find -e*y and -xe*y; both must be integers
- e = _decimal_lshift_exact(e * yc, ye)
- xe = _decimal_lshift_exact(xe * yc, ye)
- if e is None or xe is None:
- return None
-
- if e > emax:
- return None
- xc = 5**e
-
- elif last_digit == 5:
- # e >= log_5(xc) if xc is a power of 5; we have
- # equality all the way up to xc=5**2658
- e = _nbits(xc)*28//65
- xc, remainder = divmod(5**e, xc)
- if remainder:
- return None
- while xc % 5 == 0:
- xc //= 5
- e -= 1
-
- # Guard against large values of ye, using the same logic as in
- # the 'xc is a power of 2' branch. 10/3 is an upper bound for
- # log(10)/log(2).
- emax = p*10//3
- if ye >= len(str(emax)):
- return None
-
- e = _decimal_lshift_exact(e * yc, ye)
- xe = _decimal_lshift_exact(xe * yc, ye)
- if e is None or xe is None:
- return None
-
- if e > emax:
- return None
- xc = 2**e
- else:
- return None
-
- if xc >= 10**p:
- return None
- xe = -e-xe
- return _dec_from_triple(0, str(xc), xe)
-
- # now y is positive; find m and n such that y = m/n
- if ye >= 0:
- m, n = yc*10**ye, 1
- else:
- if xe != 0 and len(str(abs(yc*xe))) <= -ye:
- return None
- xc_bits = _nbits(xc)
- if xc != 1 and len(str(abs(yc)*xc_bits)) <= -ye:
- return None
- m, n = yc, 10**(-ye)
- while m % 2 == n % 2 == 0:
- m //= 2
- n //= 2
- while m % 5 == n % 5 == 0:
- m //= 5
- n //= 5
-
- # compute nth root of xc*10**xe
- if n > 1:
- # if 1 < xc < 2**n then xc isn't an nth power
- if xc != 1 and xc_bits <= n:
- return None
-
- xe, rem = divmod(xe, n)
- if rem != 0:
- return None
-
- # compute nth root of xc using Newton's method
- a = 1 << -(-_nbits(xc)//n) # initial estimate
- while True:
- q, r = divmod(xc, a**(n-1))
- if a <= q:
- break
- else:
- a = (a*(n-1) + q)//n
- if not (a == q and r == 0):
- return None
- xc = a
-
- # now xc*10**xe is the nth root of the original xc*10**xe
- # compute mth power of xc*10**xe
-
- # if m > p*100//_log10_lb(xc) then m > p/log10(xc), hence xc**m >
- # 10**p and the result is not representable.
- if xc > 1 and m > p*100//_log10_lb(xc):
- return None
- xc = xc**m
- xe *= m
- if xc > 10**p:
- return None
-
- # by this point the result *is* exactly representable
- # adjust the exponent to get as close as possible to the ideal
- # exponent, if necessary
- str_xc = str(xc)
- if other._isinteger() and other._sign == 0:
- ideal_exponent = self._exp*int(other)
- zeros = min(xe-ideal_exponent, p-len(str_xc))
- else:
- zeros = 0
- return _dec_from_triple(0, str_xc+'0'*zeros, xe-zeros)
-
- def __pow__(self, other, modulo=None, context=None):
- """Return self ** other [ % modulo].
-
- With two arguments, compute self**other.
-
- With three arguments, compute (self**other) % modulo. For the
- three argument form, the following restrictions on the
- arguments hold:
-
- - all three arguments must be integral
- - other must be nonnegative
- - either self or other (or both) must be nonzero
- - modulo must be nonzero and must have at most p digits,
- where p is the context precision.
-
- If any of these restrictions is violated the InvalidOperation
- flag is raised.
-
- The result of pow(self, other, modulo) is identical to the
- result that would be obtained by computing (self**other) %
- modulo with unbounded precision, but is computed more
- efficiently. It is always exact.
- """
-
- if modulo is not None:
- return self._power_modulo(other, modulo, context)
-
- other = _convert_other(other)
- if other is NotImplemented:
- return other
-
- if context is None:
- context = getcontext()
-
- # either argument is a NaN => result is NaN
- ans = self._check_nans(other, context)
- if ans:
- return ans
-
- # 0**0 = NaN (!), x**0 = 1 for nonzero x (including +/-Infinity)
- if not other:
- if not self:
- return context._raise_error(InvalidOperation, '0 ** 0')
- else:
- return _One
-
- # result has sign 1 iff self._sign is 1 and other is an odd integer
- result_sign = 0
- if self._sign == 1:
- if other._isinteger():
- if not other._iseven():
- result_sign = 1
- else:
- # -ve**noninteger = NaN
- # (-0)**noninteger = 0**noninteger
- if self:
- return context._raise_error(InvalidOperation,
- 'x ** y with x negative and y not an integer')
- # negate self, without doing any unwanted rounding
- self = self.copy_negate()
-
- # 0**(+ve or Inf)= 0; 0**(-ve or -Inf) = Infinity
- if not self:
- if other._sign == 0:
- return _dec_from_triple(result_sign, '0', 0)
- else:
- return _SignedInfinity[result_sign]
-
- # Inf**(+ve or Inf) = Inf; Inf**(-ve or -Inf) = 0
- if self._isinfinity():
- if other._sign == 0:
- return _SignedInfinity[result_sign]
- else:
- return _dec_from_triple(result_sign, '0', 0)
-
- # 1**other = 1, but the choice of exponent and the flags
- # depend on the exponent of self, and on whether other is a
- # positive integer, a negative integer, or neither
- if self == _One:
- if other._isinteger():
- # exp = max(self._exp*max(int(other), 0),
- # 1-context.prec) but evaluating int(other) directly
- # is dangerous until we know other is small (other
- # could be 1e999999999)
- if other._sign == 1:
- multiplier = 0
- elif other > context.prec:
- multiplier = context.prec
- else:
- multiplier = int(other)
-
- exp = self._exp * multiplier
- if exp < 1-context.prec:
- exp = 1-context.prec
- context._raise_error(Rounded)
- else:
- context._raise_error(Inexact)
- context._raise_error(Rounded)
- exp = 1-context.prec
-
- return _dec_from_triple(result_sign, '1'+'0'*-exp, exp)
-
- # compute adjusted exponent of self
- self_adj = self.adjusted()
-
- # self ** infinity is infinity if self > 1, 0 if self < 1
- # self ** -infinity is infinity if self < 1, 0 if self > 1
- if other._isinfinity():
- if (other._sign == 0) == (self_adj < 0):
- return _dec_from_triple(result_sign, '0', 0)
- else:
- return _SignedInfinity[result_sign]
-
- # from here on, the result always goes through the call
- # to _fix at the end of this function.
- ans = None
- exact = False
-
- # crude test to catch cases of extreme overflow/underflow. If
- # log10(self)*other >= 10**bound and bound >= len(str(Emax))
- # then 10**bound >= 10**len(str(Emax)) >= Emax+1 and hence
- # self**other >= 10**(Emax+1), so overflow occurs. The test
- # for underflow is similar.
- bound = self._log10_exp_bound() + other.adjusted()
- if (self_adj >= 0) == (other._sign == 0):
- # self > 1 and other +ve, or self < 1 and other -ve
- # possibility of overflow
- if bound >= len(str(context.Emax)):
- ans = _dec_from_triple(result_sign, '1', context.Emax+1)
- else:
- # self > 1 and other -ve, or self < 1 and other +ve
- # possibility of underflow to 0
- Etiny = context.Etiny()
- if bound >= len(str(-Etiny)):
- ans = _dec_from_triple(result_sign, '1', Etiny-1)
-
- # try for an exact result with precision +1
- if ans is None:
- ans = self._power_exact(other, context.prec + 1)
- if ans is not None:
- if result_sign == 1:
- ans = _dec_from_triple(1, ans._int, ans._exp)
- exact = True
-
- # usual case: inexact result, x**y computed directly as exp(y*log(x))
- if ans is None:
- p = context.prec
- x = _WorkRep(self)
- xc, xe = x.int, x.exp
- y = _WorkRep(other)
- yc, ye = y.int, y.exp
- if y.sign == 1:
- yc = -yc
-
- # compute correctly rounded result: start with precision +3,
- # then increase precision until result is unambiguously roundable
- extra = 3
- while True:
- coeff, exp = _dpower(xc, xe, yc, ye, p+extra)
- if coeff % (5*10**(len(str(coeff))-p-1)):
- break
- extra += 3
-
- ans = _dec_from_triple(result_sign, str(coeff), exp)
-
- # unlike exp, ln and log10, the power function respects the
- # rounding mode; no need to switch to ROUND_HALF_EVEN here
-
- # There's a difficulty here when 'other' is not an integer and
- # the result is exact. In this case, the specification
- # requires that the Inexact flag be raised (in spite of
- # exactness), but since the result is exact _fix won't do this
- # for us. (Correspondingly, the Underflow signal should also
- # be raised for subnormal results.) We can't directly raise
- # these signals either before or after calling _fix, since
- # that would violate the precedence for signals. So we wrap
- # the ._fix call in a temporary context, and reraise
- # afterwards.
- if exact and not other._isinteger():
- # pad with zeros up to length context.prec+1 if necessary; this
- # ensures that the Rounded signal will be raised.
- if len(ans._int) <= context.prec:
- expdiff = context.prec + 1 - len(ans._int)
- ans = _dec_from_triple(ans._sign, ans._int+'0'*expdiff,
- ans._exp-expdiff)
-
- # create a copy of the current context, with cleared flags/traps
- newcontext = context.copy()
- newcontext.clear_flags()
- for exception in _signals:
- newcontext.traps[exception] = 0
-
- # round in the new context
- ans = ans._fix(newcontext)
-
- # raise Inexact, and if necessary, Underflow
- newcontext._raise_error(Inexact)
- if newcontext.flags[Subnormal]:
- newcontext._raise_error(Underflow)
-
- # propagate signals to the original context; _fix could
- # have raised any of Overflow, Underflow, Subnormal,
- # Inexact, Rounded, Clamped. Overflow needs the correct
- # arguments. Note that the order of the exceptions is
- # important here.
- if newcontext.flags[Overflow]:
- context._raise_error(Overflow, 'above Emax', ans._sign)
- for exception in Underflow, Subnormal, Inexact, Rounded, Clamped:
- if newcontext.flags[exception]:
- context._raise_error(exception)
-
- else:
- ans = ans._fix(context)
-
- return ans
-
- def __rpow__(self, other, context=None):
- """Swaps self/other and returns __pow__."""
- other = _convert_other(other)
- if other is NotImplemented:
- return other
- return other.__pow__(self, context=context)
-
- def normalize(self, context=None):
- """Normalize- strip trailing 0s, change anything equal to 0 to 0e0"""
-
- if context is None:
- context = getcontext()
-
- if self._is_special:
- ans = self._check_nans(context=context)
- if ans:
- return ans
-
- dup = self._fix(context)
- if dup._isinfinity():
- return dup
-
- if not dup:
- return _dec_from_triple(dup._sign, '0', 0)
- exp_max = [context.Emax, context.Etop()][context.clamp]
- end = len(dup._int)
- exp = dup._exp
- while dup._int[end-1] == '0' and exp < exp_max:
- exp += 1
- end -= 1
- return _dec_from_triple(dup._sign, dup._int[:end], exp)
-
- def quantize(self, exp, rounding=None, context=None, watchexp=True):
- """Quantize self so its exponent is the same as that of exp.
-
- Similar to self._rescale(exp._exp) but with error checking.
- """
- exp = _convert_other(exp, raiseit=True)
-
- if context is None:
- context = getcontext()
- if rounding is None:
- rounding = context.rounding
-
- if self._is_special or exp._is_special:
- ans = self._check_nans(exp, context)
- if ans:
- return ans
-
- if exp._isinfinity() or self._isinfinity():
- if exp._isinfinity() and self._isinfinity():
- return Decimal(self) # if both are inf, it is OK
- return context._raise_error(InvalidOperation,
- 'quantize with one INF')
-
- # if we're not watching exponents, do a simple rescale
- if not watchexp:
- ans = self._rescale(exp._exp, rounding)
- # raise Inexact and Rounded where appropriate
- if ans._exp > self._exp:
- context._raise_error(Rounded)
- if ans != self:
- context._raise_error(Inexact)
- return ans
-
- # exp._exp should be between Etiny and Emax
- if not (context.Etiny() <= exp._exp <= context.Emax):
- return context._raise_error(InvalidOperation,
- 'target exponent out of bounds in quantize')
-
- if not self:
- ans = _dec_from_triple(self._sign, '0', exp._exp)
- return ans._fix(context)
-
- self_adjusted = self.adjusted()
- if self_adjusted > context.Emax:
- return context._raise_error(InvalidOperation,
- 'exponent of quantize result too large for current context')
- if self_adjusted - exp._exp + 1 > context.prec:
- return context._raise_error(InvalidOperation,
- 'quantize result has too many digits for current context')
-
- ans = self._rescale(exp._exp, rounding)
- if ans.adjusted() > context.Emax:
- return context._raise_error(InvalidOperation,
- 'exponent of quantize result too large for current context')
- if len(ans._int) > context.prec:
- return context._raise_error(InvalidOperation,
- 'quantize result has too many digits for current context')
-
- # raise appropriate flags
- if ans and ans.adjusted() < context.Emin:
- context._raise_error(Subnormal)
- if ans._exp > self._exp:
- if ans != self:
- context._raise_error(Inexact)
- context._raise_error(Rounded)
-
- # call to fix takes care of any necessary folddown, and
- # signals Clamped if necessary
- ans = ans._fix(context)
- return ans
-
- def same_quantum(self, other, context=None):
- """Return True if self and other have the same exponent; otherwise
- return False.
-
- If either operand is a special value, the following rules are used:
- * return True if both operands are infinities
- * return True if both operands are NaNs
- * otherwise, return False.
- """
- other = _convert_other(other, raiseit=True)
- if self._is_special or other._is_special:
- return (self.is_nan() and other.is_nan() or
- self.is_infinite() and other.is_infinite())
- return self._exp == other._exp
-
- def _rescale(self, exp, rounding):
- """Rescale self so that the exponent is exp, either by padding with zeros
- or by truncating digits, using the given rounding mode.
-
- Specials are returned without change. This operation is
- quiet: it raises no flags, and uses no information from the
- context.
-
- exp = exp to scale to (an integer)
- rounding = rounding mode
- """
- if self._is_special:
- return Decimal(self)
- if not self:
- return _dec_from_triple(self._sign, '0', exp)
-
- if self._exp >= exp:
- # pad answer with zeros if necessary
- return _dec_from_triple(self._sign,
- self._int + '0'*(self._exp - exp), exp)
-
- # too many digits; round and lose data. If self.adjusted() <
- # exp-1, replace self by 10**(exp-1) before rounding
- digits = len(self._int) + self._exp - exp
- if digits < 0:
- self = _dec_from_triple(self._sign, '1', exp-1)
- digits = 0
- this_function = self._pick_rounding_function[rounding]
- changed = this_function(self, digits)
- coeff = self._int[:digits] or '0'
- if changed == 1:
- coeff = str(int(coeff)+1)
- return _dec_from_triple(self._sign, coeff, exp)
-
- def _round(self, places, rounding):
- """Round a nonzero, nonspecial Decimal to a fixed number of
- significant figures, using the given rounding mode.
-
- Infinities, NaNs and zeros are returned unaltered.
-
- This operation is quiet: it raises no flags, and uses no
- information from the context.
-
- """
- if places <= 0:
- raise ValueError("argument should be at least 1 in _round")
- if self._is_special or not self:
- return Decimal(self)
- ans = self._rescale(self.adjusted()+1-places, rounding)
- # it can happen that the rescale alters the adjusted exponent;
- # for example when rounding 99.97 to 3 significant figures.
- # When this happens we end up with an extra 0 at the end of
- # the number; a second rescale fixes this.
- if ans.adjusted() != self.adjusted():
- ans = ans._rescale(ans.adjusted()+1-places, rounding)
- return ans
-
- def to_integral_exact(self, rounding=None, context=None):
- """Rounds to a nearby integer.
-
- If no rounding mode is specified, take the rounding mode from
- the context. This method raises the Rounded and Inexact flags
- when appropriate.
-
- See also: to_integral_value, which does exactly the same as
- this method except that it doesn't raise Inexact or Rounded.
- """
- if self._is_special:
- ans = self._check_nans(context=context)
- if ans:
- return ans
- return Decimal(self)
- if self._exp >= 0:
- return Decimal(self)
- if not self:
- return _dec_from_triple(self._sign, '0', 0)
- if context is None:
- context = getcontext()
- if rounding is None:
- rounding = context.rounding
- ans = self._rescale(0, rounding)
- if ans != self:
- context._raise_error(Inexact)
- context._raise_error(Rounded)
- return ans
-
- def to_integral_value(self, rounding=None, context=None):
- """Rounds to the nearest integer, without raising inexact, rounded."""
- if context is None:
- context = getcontext()
- if rounding is None:
- rounding = context.rounding
- if self._is_special:
- ans = self._check_nans(context=context)
- if ans:
- return ans
- return Decimal(self)
- if self._exp >= 0:
- return Decimal(self)
- else:
- return self._rescale(0, rounding)
-
- # the method name changed, but we provide also the old one, for compatibility
- to_integral = to_integral_value
-
- def sqrt(self, context=None):
- """Return the square root of self."""
- if context is None:
- context = getcontext()
-
- if self._is_special:
- ans = self._check_nans(context=context)
- if ans:
- return ans
-
- if self._isinfinity() and self._sign == 0:
- return Decimal(self)
-
- if not self:
- # exponent = self._exp // 2. sqrt(-0) = -0
- ans = _dec_from_triple(self._sign, '0', self._exp // 2)
- return ans._fix(context)
-
- if self._sign == 1:
- return context._raise_error(InvalidOperation, 'sqrt(-x), x > 0')
-
- # At this point self represents a positive number. Let p be
- # the desired precision and express self in the form c*100**e
- # with c a positive real number and e an integer, c and e
- # being chosen so that 100**(p-1) <= c < 100**p. Then the
- # (exact) square root of self is sqrt(c)*10**e, and 10**(p-1)
- # <= sqrt(c) < 10**p, so the closest representable Decimal at
- # precision p is n*10**e where n = round_half_even(sqrt(c)),
- # the closest integer to sqrt(c) with the even integer chosen
- # in the case of a tie.
- #
- # To ensure correct rounding in all cases, we use the
- # following trick: we compute the square root to an extra
- # place (precision p+1 instead of precision p), rounding down.
- # Then, if the result is inexact and its last digit is 0 or 5,
- # we increase the last digit to 1 or 6 respectively; if it's
- # exact we leave the last digit alone. Now the final round to
- # p places (or fewer in the case of underflow) will round
- # correctly and raise the appropriate flags.
-
- # use an extra digit of precision
- prec = context.prec+1
-
- # write argument in the form c*100**e where e = self._exp//2
- # is the 'ideal' exponent, to be used if the square root is
- # exactly representable. l is the number of 'digits' of c in
- # base 100, so that 100**(l-1) <= c < 100**l.
- op = _WorkRep(self)
- e = op.exp >> 1
- if op.exp & 1:
- c = op.int * 10
- l = (len(self._int) >> 1) + 1
- else:
- c = op.int
- l = len(self._int)+1 >> 1
-
- # rescale so that c has exactly prec base 100 'digits'
- shift = prec-l
- if shift >= 0:
- c *= 100**shift
- exact = True
- else:
- c, remainder = divmod(c, 100**-shift)
- exact = not remainder
- e -= shift
-
- # find n = floor(sqrt(c)) using Newton's method
- n = 10**prec
- while True:
- q = c//n
- if n <= q:
- break
- else:
- n = n + q >> 1
- exact = exact and n*n == c
-
- if exact:
- # result is exact; rescale to use ideal exponent e
- if shift >= 0:
- # assert n % 10**shift == 0
- n //= 10**shift
- else:
- n *= 10**-shift
- e += shift
- else:
- # result is not exact; fix last digit as described above
- if n % 5 == 0:
- n += 1
-
- ans = _dec_from_triple(0, str(n), e)
-
- # round, and fit to current context
- context = context._shallow_copy()
- rounding = context._set_rounding(ROUND_HALF_EVEN)
- ans = ans._fix(context)
- context.rounding = rounding
-
- return ans
-
- def max(self, other, context=None):
- """Returns the larger value.
-
- Like max(self, other) except if one is not a number, returns
- NaN (and signals if one is sNaN). Also rounds.
- """
- other = _convert_other(other, raiseit=True)
-
- if context is None:
- context = getcontext()
-
- if self._is_special or other._is_special:
- # If one operand is a quiet NaN and the other is number, then the
- # number is always returned
- sn = self._isnan()
- on = other._isnan()
- if sn or on:
- if on == 1 and sn == 0:
- return self._fix(context)
- if sn == 1 and on == 0:
- return other._fix(context)
- return self._check_nans(other, context)
-
- c = self._cmp(other)
- if c == 0:
- # If both operands are finite and equal in numerical value
- # then an ordering is applied:
- #
- # If the signs differ then max returns the operand with the
- # positive sign and min returns the operand with the negative sign
- #
- # If the signs are the same then the exponent is used to select
- # the result. This is exactly the ordering used in compare_total.
- c = self.compare_total(other)
-
- if c == -1:
- ans = other
- else:
- ans = self
-
- return ans._fix(context)
-
- def min(self, other, context=None):
- """Returns the smaller value.
-
- Like min(self, other) except if one is not a number, returns
- NaN (and signals if one is sNaN). Also rounds.
- """
- other = _convert_other(other, raiseit=True)
-
- if context is None:
- context = getcontext()
-
- if self._is_special or other._is_special:
- # If one operand is a quiet NaN and the other is number, then the
- # number is always returned
- sn = self._isnan()
- on = other._isnan()
- if sn or on:
- if on == 1 and sn == 0:
- return self._fix(context)
- if sn == 1 and on == 0:
- return other._fix(context)
- return self._check_nans(other, context)
-
- c = self._cmp(other)
- if c == 0:
- c = self.compare_total(other)
-
- if c == -1:
- ans = self
- else:
- ans = other
-
- return ans._fix(context)
-
- def _isinteger(self):
- """Returns whether self is an integer"""
- if self._is_special:
- return False
- if self._exp >= 0:
- return True
- rest = self._int[self._exp:]
- return rest == '0'*len(rest)
-
- def _iseven(self):
- """Returns True if self is even. Assumes self is an integer."""
- if not self or self._exp > 0:
- return True
- return self._int[-1+self._exp] in '02468'
-
- def adjusted(self):
- """Return the adjusted exponent of self"""
- try:
- return self._exp + len(self._int) - 1
- # If NaN or Infinity, self._exp is string
- except TypeError:
- return 0
-
- def canonical(self):
- """Returns the same Decimal object.
-
- As we do not have different encodings for the same number, the
- received object already is in its canonical form.
- """
- return self
-
- def compare_signal(self, other, context=None):
- """Compares self to the other operand numerically.
-
- It's pretty much like compare(), but all NaNs signal, with signaling
- NaNs taking precedence over quiet NaNs.
- """
- other = _convert_other(other, raiseit = True)
- ans = self._compare_check_nans(other, context)
- if ans:
- return ans
- return self.compare(other, context=context)
-
- def compare_total(self, other, context=None):
- """Compares self to other using the abstract representations.
-
- This is not like the standard compare, which use their numerical
- value. Note that a total ordering is defined for all possible abstract
- representations.
- """
- other = _convert_other(other, raiseit=True)
-
- # if one is negative and the other is positive, it's easy
- if self._sign and not other._sign:
- return _NegativeOne
- if not self._sign and other._sign:
- return _One
- sign = self._sign
-
- # let's handle both NaN types
- self_nan = self._isnan()
- other_nan = other._isnan()
- if self_nan or other_nan:
- if self_nan == other_nan:
- # compare payloads as though they're integers
- self_key = len(self._int), self._int
- other_key = len(other._int), other._int
- if self_key < other_key:
- if sign:
- return _One
- else:
- return _NegativeOne
- if self_key > other_key:
- if sign:
- return _NegativeOne
- else:
- return _One
- return _Zero
-
- if sign:
- if self_nan == 1:
- return _NegativeOne
- if other_nan == 1:
- return _One
- if self_nan == 2:
- return _NegativeOne
- if other_nan == 2:
- return _One
- else:
- if self_nan == 1:
- return _One
- if other_nan == 1:
- return _NegativeOne
- if self_nan == 2:
- return _One
- if other_nan == 2:
- return _NegativeOne
-
- if self < other:
- return _NegativeOne
- if self > other:
- return _One
-
- if self._exp < other._exp:
- if sign:
- return _One
- else:
- return _NegativeOne
- if self._exp > other._exp:
- if sign:
- return _NegativeOne
- else:
- return _One
- return _Zero
-
-
- def compare_total_mag(self, other, context=None):
- """Compares self to other using abstract repr., ignoring sign.
-
- Like compare_total, but with operand's sign ignored and assumed to be 0.
- """
- other = _convert_other(other, raiseit=True)
-
- s = self.copy_abs()
- o = other.copy_abs()
- return s.compare_total(o)
-
- def copy_abs(self):
- """Returns a copy with the sign set to 0. """
- return _dec_from_triple(0, self._int, self._exp, self._is_special)
-
- def copy_negate(self):
- """Returns a copy with the sign inverted."""
- if self._sign:
- return _dec_from_triple(0, self._int, self._exp, self._is_special)
- else:
- return _dec_from_triple(1, self._int, self._exp, self._is_special)
-
- def copy_sign(self, other, context=None):
- """Returns self with the sign of other."""
- other = _convert_other(other, raiseit=True)
- return _dec_from_triple(other._sign, self._int,
- self._exp, self._is_special)
-
- def exp(self, context=None):
- """Returns e ** self."""
-
- if context is None:
- context = getcontext()
-
- # exp(NaN) = NaN
- ans = self._check_nans(context=context)
- if ans:
- return ans
-
- # exp(-Infinity) = 0
- if self._isinfinity() == -1:
- return _Zero
-
- # exp(0) = 1
- if not self:
- return _One
-
- # exp(Infinity) = Infinity
- if self._isinfinity() == 1:
- return Decimal(self)
-
- # the result is now guaranteed to be inexact (the true
- # mathematical result is transcendental). There's no need to
- # raise Rounded and Inexact here---they'll always be raised as
- # a result of the call to _fix.
- p = context.prec
- adj = self.adjusted()
-
- # we only need to do any computation for quite a small range
- # of adjusted exponents---for example, -29 <= adj <= 10 for
- # the default context. For smaller exponent the result is
- # indistinguishable from 1 at the given precision, while for
- # larger exponent the result either overflows or underflows.
- if self._sign == 0 and adj > len(str((context.Emax+1)*3)):
- # overflow
- ans = _dec_from_triple(0, '1', context.Emax+1)
- elif self._sign == 1 and adj > len(str((-context.Etiny()+1)*3)):
- # underflow to 0
- ans = _dec_from_triple(0, '1', context.Etiny()-1)
- elif self._sign == 0 and adj < -p:
- # p+1 digits; final round will raise correct flags
- ans = _dec_from_triple(0, '1' + '0'*(p-1) + '1', -p)
- elif self._sign == 1 and adj < -p-1:
- # p+1 digits; final round will raise correct flags
- ans = _dec_from_triple(0, '9'*(p+1), -p-1)
- # general case
- else:
- op = _WorkRep(self)
- c, e = op.int, op.exp
- if op.sign == 1:
- c = -c
-
- # compute correctly rounded result: increase precision by
- # 3 digits at a time until we get an unambiguously
- # roundable result
- extra = 3
- while True:
- coeff, exp = _dexp(c, e, p+extra)
- if coeff % (5*10**(len(str(coeff))-p-1)):
- break
- extra += 3
-
- ans = _dec_from_triple(0, str(coeff), exp)
-
- # at this stage, ans should round correctly with *any*
- # rounding mode, not just with ROUND_HALF_EVEN
- context = context._shallow_copy()
- rounding = context._set_rounding(ROUND_HALF_EVEN)
- ans = ans._fix(context)
- context.rounding = rounding
-
- return ans
-
- def is_canonical(self):
- """Return True if self is canonical; otherwise return False.
-
- Currently, the encoding of a Decimal instance is always
- canonical, so this method returns True for any Decimal.
- """
- return True
-
- def is_finite(self):
- """Return True if self is finite; otherwise return False.
-
- A Decimal instance is considered finite if it is neither
- infinite nor a NaN.
- """
- return not self._is_special
-
- def is_infinite(self):
- """Return True if self is infinite; otherwise return False."""
- return self._exp == 'F'
-
- def is_nan(self):
- """Return True if self is a qNaN or sNaN; otherwise return False."""
- return self._exp in ('n', 'N')
-
- def is_normal(self, context=None):
- """Return True if self is a normal number; otherwise return False."""
- if self._is_special or not self:
- return False
- if context is None:
- context = getcontext()
- return context.Emin <= self.adjusted()
-
- def is_qnan(self):
- """Return True if self is a quiet NaN; otherwise return False."""
- return self._exp == 'n'
-
- def is_signed(self):
- """Return True if self is negative; otherwise return False."""
- return self._sign == 1
-
- def is_snan(self):
- """Return True if self is a signaling NaN; otherwise return False."""
- return self._exp == 'N'
-
- def is_subnormal(self, context=None):
- """Return True if self is subnormal; otherwise return False."""
- if self._is_special or not self:
- return False
- if context is None:
- context = getcontext()
- return self.adjusted() < context.Emin
-
- def is_zero(self):
- """Return True if self is a zero; otherwise return False."""
- return not self._is_special and self._int == '0'
-
- def _ln_exp_bound(self):
- """Compute a lower bound for the adjusted exponent of self.ln().
- In other words, compute r such that self.ln() >= 10**r. Assumes
- that self is finite and positive and that self != 1.
- """
-
- # for 0.1 <= x <= 10 we use the inequalities 1-1/x <= ln(x) <= x-1
- adj = self._exp + len(self._int) - 1
- if adj >= 1:
- # argument >= 10; we use 23/10 = 2.3 as a lower bound for ln(10)
- return len(str(adj*23//10)) - 1
- if adj <= -2:
- # argument <= 0.1
- return len(str((-1-adj)*23//10)) - 1
- op = _WorkRep(self)
- c, e = op.int, op.exp
- if adj == 0:
- # 1 < self < 10
- num = str(c-10**-e)
- den = str(c)
- return len(num) - len(den) - (num < den)
- # adj == -1, 0.1 <= self < 1
- return e + len(str(10**-e - c)) - 1
-
-
- def ln(self, context=None):
- """Returns the natural (base e) logarithm of self."""
-
- if context is None:
- context = getcontext()
-
- # ln(NaN) = NaN
- ans = self._check_nans(context=context)
- if ans:
- return ans
-
- # ln(0.0) == -Infinity
- if not self:
- return _NegativeInfinity
-
- # ln(Infinity) = Infinity
- if self._isinfinity() == 1:
- return _Infinity
-
- # ln(1.0) == 0.0
- if self == _One:
- return _Zero
-
- # ln(negative) raises InvalidOperation
- if self._sign == 1:
- return context._raise_error(InvalidOperation,
- 'ln of a negative value')
-
- # result is irrational, so necessarily inexact
- op = _WorkRep(self)
- c, e = op.int, op.exp
- p = context.prec
-
- # correctly rounded result: repeatedly increase precision by 3
- # until we get an unambiguously roundable result
- places = p - self._ln_exp_bound() + 2 # at least p+3 places
- while True:
- coeff = _dlog(c, e, places)
- # assert len(str(abs(coeff)))-p >= 1
- if coeff % (5*10**(len(str(abs(coeff)))-p-1)):
- break
- places += 3
- ans = _dec_from_triple(int(coeff<0), str(abs(coeff)), -places)
-
- context = context._shallow_copy()
- rounding = context._set_rounding(ROUND_HALF_EVEN)
- ans = ans._fix(context)
- context.rounding = rounding
- return ans
-
- def _log10_exp_bound(self):
- """Compute a lower bound for the adjusted exponent of self.log10().
- In other words, find r such that self.log10() >= 10**r.
- Assumes that self is finite and positive and that self != 1.
- """
-
- # For x >= 10 or x < 0.1 we only need a bound on the integer
- # part of log10(self), and this comes directly from the
- # exponent of x. For 0.1 <= x <= 10 we use the inequalities
- # 1-1/x <= log(x) <= x-1. If x > 1 we have |log10(x)| >
- # (1-1/x)/2.31 > 0. If x < 1 then |log10(x)| > (1-x)/2.31 > 0
-
- adj = self._exp + len(self._int) - 1
- if adj >= 1:
- # self >= 10
- return len(str(adj))-1
- if adj <= -2:
- # self < 0.1
- return len(str(-1-adj))-1
- op = _WorkRep(self)
- c, e = op.int, op.exp
- if adj == 0:
- # 1 < self < 10
- num = str(c-10**-e)
- den = str(231*c)
- return len(num) - len(den) - (num < den) + 2
- # adj == -1, 0.1 <= self < 1
- num = str(10**-e-c)
- return len(num) + e - (num < "231") - 1
-
- def log10(self, context=None):
- """Returns the base 10 logarithm of self."""
-
- if context is None:
- context = getcontext()
-
- # log10(NaN) = NaN
- ans = self._check_nans(context=context)
- if ans:
- return ans
-
- # log10(0.0) == -Infinity
- if not self:
- return _NegativeInfinity
-
- # log10(Infinity) = Infinity
- if self._isinfinity() == 1:
- return _Infinity
-
- # log10(negative or -Infinity) raises InvalidOperation
- if self._sign == 1:
- return context._raise_error(InvalidOperation,
- 'log10 of a negative value')
-
- # log10(10**n) = n
- if self._int[0] == '1' and self._int[1:] == '0'*(len(self._int) - 1):
- # answer may need rounding
- ans = Decimal(self._exp + len(self._int) - 1)
- else:
- # result is irrational, so necessarily inexact
- op = _WorkRep(self)
- c, e = op.int, op.exp
- p = context.prec
-
- # correctly rounded result: repeatedly increase precision
- # until result is unambiguously roundable
- places = p-self._log10_exp_bound()+2
- while True:
- coeff = _dlog10(c, e, places)
- # assert len(str(abs(coeff)))-p >= 1
- if coeff % (5*10**(len(str(abs(coeff)))-p-1)):
- break
- places += 3
- ans = _dec_from_triple(int(coeff<0), str(abs(coeff)), -places)
-
- context = context._shallow_copy()
- rounding = context._set_rounding(ROUND_HALF_EVEN)
- ans = ans._fix(context)
- context.rounding = rounding
- return ans
-
- def logb(self, context=None):
- """ Returns the exponent of the magnitude of self's MSD.
-
- The result is the integer which is the exponent of the magnitude
- of the most significant digit of self (as though it were truncated
- to a single digit while maintaining the value of that digit and
- without limiting the resulting exponent).
- """
- # logb(NaN) = NaN
- ans = self._check_nans(context=context)
- if ans:
- return ans
-
- if context is None:
- context = getcontext()
-
- # logb(+/-Inf) = +Inf
- if self._isinfinity():
- return _Infinity
-
- # logb(0) = -Inf, DivisionByZero
- if not self:
- return context._raise_error(DivisionByZero, 'logb(0)', 1)
-
- # otherwise, simply return the adjusted exponent of self, as a
- # Decimal. Note that no attempt is made to fit the result
- # into the current context.
- ans = Decimal(self.adjusted())
- return ans._fix(context)
-
- def _islogical(self):
- """Return True if self is a logical operand.
-
- For being logical, it must be a finite number with a sign of 0,
- an exponent of 0, and a coefficient whose digits must all be
- either 0 or 1.
- """
- if self._sign != 0 or self._exp != 0:
- return False
- for dig in self._int:
- if dig not in '01':
- return False
- return True
-
- def _fill_logical(self, context, opa, opb):
- dif = context.prec - len(opa)
- if dif > 0:
- opa = '0'*dif + opa
- elif dif < 0:
- opa = opa[-context.prec:]
- dif = context.prec - len(opb)
- if dif > 0:
- opb = '0'*dif + opb
- elif dif < 0:
- opb = opb[-context.prec:]
- return opa, opb
-
- def logical_and(self, other, context=None):
- """Applies an 'and' operation between self and other's digits."""
- if context is None:
- context = getcontext()
-
- other = _convert_other(other, raiseit=True)
-
- if not self._islogical() or not other._islogical():
- return context._raise_error(InvalidOperation)
-
- # fill to context.prec
- (opa, opb) = self._fill_logical(context, self._int, other._int)
-
- # make the operation, and clean starting zeroes
- result = "".join([str(int(a)&int(b)) for a,b in zip(opa,opb)])
- return _dec_from_triple(0, result.lstrip('0') or '0', 0)
-
- def logical_invert(self, context=None):
- """Invert all its digits."""
- if context is None:
- context = getcontext()
- return self.logical_xor(_dec_from_triple(0,'1'*context.prec,0),
- context)
-
- def logical_or(self, other, context=None):
- """Applies an 'or' operation between self and other's digits."""
- if context is None:
- context = getcontext()
-
- other = _convert_other(other, raiseit=True)
-
- if not self._islogical() or not other._islogical():
- return context._raise_error(InvalidOperation)
-
- # fill to context.prec
- (opa, opb) = self._fill_logical(context, self._int, other._int)
-
- # make the operation, and clean starting zeroes
- result = "".join([str(int(a)|int(b)) for a,b in zip(opa,opb)])
- return _dec_from_triple(0, result.lstrip('0') or '0', 0)
-
- def logical_xor(self, other, context=None):
- """Applies an 'xor' operation between self and other's digits."""
- if context is None:
- context = getcontext()
-
- other = _convert_other(other, raiseit=True)
-
- if not self._islogical() or not other._islogical():
- return context._raise_error(InvalidOperation)
-
- # fill to context.prec
- (opa, opb) = self._fill_logical(context, self._int, other._int)
-
- # make the operation, and clean starting zeroes
- result = "".join([str(int(a)^int(b)) for a,b in zip(opa,opb)])
- return _dec_from_triple(0, result.lstrip('0') or '0', 0)
-
- def max_mag(self, other, context=None):
- """Compares the values numerically with their sign ignored."""
- other = _convert_other(other, raiseit=True)
-
- if context is None:
- context = getcontext()
-
- if self._is_special or other._is_special:
- # If one operand is a quiet NaN and the other is number, then the
- # number is always returned
- sn = self._isnan()
- on = other._isnan()
- if sn or on:
- if on == 1 and sn == 0:
- return self._fix(context)
- if sn == 1 and on == 0:
- return other._fix(context)
- return self._check_nans(other, context)
-
- c = self.copy_abs()._cmp(other.copy_abs())
- if c == 0:
- c = self.compare_total(other)
-
- if c == -1:
- ans = other
- else:
- ans = self
-
- return ans._fix(context)
-
- def min_mag(self, other, context=None):
- """Compares the values numerically with their sign ignored."""
- other = _convert_other(other, raiseit=True)
-
- if context is None:
- context = getcontext()
-
- if self._is_special or other._is_special:
- # If one operand is a quiet NaN and the other is number, then the
- # number is always returned
- sn = self._isnan()
- on = other._isnan()
- if sn or on:
- if on == 1 and sn == 0:
- return self._fix(context)
- if sn == 1 and on == 0:
- return other._fix(context)
- return self._check_nans(other, context)
-
- c = self.copy_abs()._cmp(other.copy_abs())
- if c == 0:
- c = self.compare_total(other)
-
- if c == -1:
- ans = self
- else:
- ans = other
-
- return ans._fix(context)
-
- def next_minus(self, context=None):
- """Returns the largest representable number smaller than itself."""
- if context is None:
- context = getcontext()
-
- ans = self._check_nans(context=context)
- if ans:
- return ans
-
- if self._isinfinity() == -1:
- return _NegativeInfinity
- if self._isinfinity() == 1:
- return _dec_from_triple(0, '9'*context.prec, context.Etop())
-
- context = context.copy()
- context._set_rounding(ROUND_FLOOR)
- context._ignore_all_flags()
- new_self = self._fix(context)
- if new_self != self:
- return new_self
- return self.__sub__(_dec_from_triple(0, '1', context.Etiny()-1),
- context)
-
- def next_plus(self, context=None):
- """Returns the smallest representable number larger than itself."""
- if context is None:
- context = getcontext()
-
- ans = self._check_nans(context=context)
- if ans:
- return ans
-
- if self._isinfinity() == 1:
- return _Infinity
- if self._isinfinity() == -1:
- return _dec_from_triple(1, '9'*context.prec, context.Etop())
-
- context = context.copy()
- context._set_rounding(ROUND_CEILING)
- context._ignore_all_flags()
- new_self = self._fix(context)
- if new_self != self:
- return new_self
- return self.__add__(_dec_from_triple(0, '1', context.Etiny()-1),
- context)
-
- def next_toward(self, other, context=None):
- """Returns the number closest to self, in the direction towards other.
-
- The result is the closest representable number to self
- (excluding self) that is in the direction towards other,
- unless both have the same value. If the two operands are
- numerically equal, then the result is a copy of self with the
- sign set to be the same as the sign of other.
- """
- other = _convert_other(other, raiseit=True)
-
- if context is None:
- context = getcontext()
-
- ans = self._check_nans(other, context)
- if ans:
- return ans
-
- comparison = self._cmp(other)
- if comparison == 0:
- return self.copy_sign(other)
-
- if comparison == -1:
- ans = self.next_plus(context)
- else: # comparison == 1
- ans = self.next_minus(context)
-
- # decide which flags to raise using value of ans
- if ans._isinfinity():
- context._raise_error(Overflow,
- 'Infinite result from next_toward',
- ans._sign)
- context._raise_error(Inexact)
- context._raise_error(Rounded)
- elif ans.adjusted() < context.Emin:
- context._raise_error(Underflow)
- context._raise_error(Subnormal)
- context._raise_error(Inexact)
- context._raise_error(Rounded)
- # if precision == 1 then we don't raise Clamped for a
- # result 0E-Etiny.
- if not ans:
- context._raise_error(Clamped)
-
- return ans
-
- def number_class(self, context=None):
- """Returns an indication of the class of self.
-
- The class is one of the following strings:
- sNaN
- NaN
- -Infinity
- -Normal
- -Subnormal
- -Zero
- +Zero
- +Subnormal
- +Normal
- +Infinity
- """
- if self.is_snan():
- return "sNaN"
- if self.is_qnan():
- return "NaN"
- inf = self._isinfinity()
- if inf == 1:
- return "+Infinity"
- if inf == -1:
- return "-Infinity"
- if self.is_zero():
- if self._sign:
- return "-Zero"
- else:
- return "+Zero"
- if context is None:
- context = getcontext()
- if self.is_subnormal(context=context):
- if self._sign:
- return "-Subnormal"
- else:
- return "+Subnormal"
- # just a normal, regular, boring number, :)
- if self._sign:
- return "-Normal"
- else:
- return "+Normal"
-
- def radix(self):
- """Just returns 10, as this is Decimal, :)"""
- return Decimal(10)
-
- def rotate(self, other, context=None):
- """Returns a rotated copy of self, value-of-other times."""
- if context is None:
- context = getcontext()
-
- other = _convert_other(other, raiseit=True)
-
- ans = self._check_nans(other, context)
- if ans:
- return ans
-
- if other._exp != 0:
- return context._raise_error(InvalidOperation)
- if not (-context.prec <= int(other) <= context.prec):
- return context._raise_error(InvalidOperation)
-
- if self._isinfinity():
- return Decimal(self)
-
- # get values, pad if necessary
- torot = int(other)
- rotdig = self._int
- topad = context.prec - len(rotdig)
- if topad > 0:
- rotdig = '0'*topad + rotdig
- elif topad < 0:
- rotdig = rotdig[-topad:]
-
- # let's rotate!
- rotated = rotdig[torot:] + rotdig[:torot]
- return _dec_from_triple(self._sign,
- rotated.lstrip('0') or '0', self._exp)
-
- def scaleb(self, other, context=None):
- """Returns self operand after adding the second value to its exp."""
- if context is None:
- context = getcontext()
-
- other = _convert_other(other, raiseit=True)
-
- ans = self._check_nans(other, context)
- if ans:
- return ans
-
- if other._exp != 0:
- return context._raise_error(InvalidOperation)
- liminf = -2 * (context.Emax + context.prec)
- limsup = 2 * (context.Emax + context.prec)
- if not (liminf <= int(other) <= limsup):
- return context._raise_error(InvalidOperation)
-
- if self._isinfinity():
- return Decimal(self)
-
- d = _dec_from_triple(self._sign, self._int, self._exp + int(other))
- d = d._fix(context)
- return d
-
- def shift(self, other, context=None):
- """Returns a shifted copy of self, value-of-other times."""
- if context is None:
- context = getcontext()
-
- other = _convert_other(other, raiseit=True)
-
- ans = self._check_nans(other, context)
- if ans:
- return ans
-
- if other._exp != 0:
- return context._raise_error(InvalidOperation)
- if not (-context.prec <= int(other) <= context.prec):
- return context._raise_error(InvalidOperation)
-
- if self._isinfinity():
- return Decimal(self)
-
- # get values, pad if necessary
- torot = int(other)
- rotdig = self._int
- topad = context.prec - len(rotdig)
- if topad > 0:
- rotdig = '0'*topad + rotdig
- elif topad < 0:
- rotdig = rotdig[-topad:]
-
- # let's shift!
- if torot < 0:
- shifted = rotdig[:torot]
- else:
- shifted = rotdig + '0'*torot
- shifted = shifted[-context.prec:]
-
- return _dec_from_triple(self._sign,
- shifted.lstrip('0') or '0', self._exp)
-
- # Support for pickling, copy, and deepcopy
- def __reduce__(self):
- return (self.__class__, (str(self),))
-
- def __copy__(self):
- if type(self) is Decimal:
- return self # I'm immutable; therefore I am my own clone
- return self.__class__(str(self))
-
- def __deepcopy__(self, memo):
- if type(self) is Decimal:
- return self # My components are also immutable
- return self.__class__(str(self))
-
- # PEP 3101 support. the _localeconv keyword argument should be
- # considered private: it's provided for ease of testing only.
- def __format__(self, specifier, context=None, _localeconv=None):
- """Format a Decimal instance according to the given specifier.
-
- The specifier should be a standard format specifier, with the
- form described in PEP 3101. Formatting types 'e', 'E', 'f',
- 'F', 'g', 'G', 'n' and '%' are supported. If the formatting
- type is omitted it defaults to 'g' or 'G', depending on the
- value of context.capitals.
- """
-
- # Note: PEP 3101 says that if the type is not present then
- # there should be at least one digit after the decimal point.
- # We take the liberty of ignoring this requirement for
- # Decimal---it's presumably there to make sure that
- # format(float, '') behaves similarly to str(float).
- if context is None:
- context = getcontext()
-
- spec = _parse_format_specifier(specifier, _localeconv=_localeconv)
-
- # special values don't care about the type or precision
- if self._is_special:
- sign = _format_sign(self._sign, spec)
- body = str(self.copy_abs())
- if spec['type'] == '%':
- body += '%'
- return _format_align(sign, body, spec)
-
- # a type of None defaults to 'g' or 'G', depending on context
- if spec['type'] is None:
- spec['type'] = ['g', 'G'][context.capitals]
-
- # if type is '%', adjust exponent of self accordingly
- if spec['type'] == '%':
- self = _dec_from_triple(self._sign, self._int, self._exp+2)
-
- # round if necessary, taking rounding mode from the context
- rounding = context.rounding
- precision = spec['precision']
- if precision is not None:
- if spec['type'] in 'eE':
- self = self._round(precision+1, rounding)
- elif spec['type'] in 'fF%':
- self = self._rescale(-precision, rounding)
- elif spec['type'] in 'gG' and len(self._int) > precision:
- self = self._round(precision, rounding)
- # special case: zeros with a positive exponent can't be
- # represented in fixed point; rescale them to 0e0.
- if not self and self._exp > 0 and spec['type'] in 'fF%':
- self = self._rescale(0, rounding)
-
- # figure out placement of the decimal point
- leftdigits = self._exp + len(self._int)
- if spec['type'] in 'eE':
- if not self and precision is not None:
- dotplace = 1 - precision
- else:
- dotplace = 1
- elif spec['type'] in 'fF%':
- dotplace = leftdigits
- elif spec['type'] in 'gG':
- if self._exp <= 0 and leftdigits > -6:
- dotplace = leftdigits
- else:
- dotplace = 1
-
- # find digits before and after decimal point, and get exponent
- if dotplace < 0:
- intpart = '0'
- fracpart = '0'*(-dotplace) + self._int
- elif dotplace > len(self._int):
- intpart = self._int + '0'*(dotplace-len(self._int))
- fracpart = ''
- else:
- intpart = self._int[:dotplace] or '0'
- fracpart = self._int[dotplace:]
- exp = leftdigits-dotplace
-
- # done with the decimal-specific stuff; hand over the rest
- # of the formatting to the _format_number function
- return _format_number(self._sign, intpart, fracpart, exp, spec)
-
-def _dec_from_triple(sign, coefficient, exponent, special=False):
- """Create a decimal instance directly, without any validation,
- normalization (e.g. removal of leading zeros) or argument
- conversion.
-
- This function is for *internal use only*.
- """
-
- self = object.__new__(Decimal)
- self._sign = sign
- self._int = coefficient
- self._exp = exponent
- self._is_special = special
-
- return self
-
-# Register Decimal as a kind of Number (an abstract base class).
-# However, do not register it as Real (because Decimals are not
-# interoperable with floats).
-_numbers.Number.register(Decimal)
-
-
-##### Context class #######################################################
-
-class _ContextManager(object):
- """Context manager class to support localcontext().
-
- Sets a copy of the supplied context in __enter__() and restores
- the previous decimal context in __exit__()
- """
- def __init__(self, new_context):
- self.new_context = new_context.copy()
- def __enter__(self):
- self.saved_context = getcontext()
- setcontext(self.new_context)
- return self.new_context
- def __exit__(self, t, v, tb):
- setcontext(self.saved_context)
-
-class Context(object):
- """Contains the context for a Decimal instance.
-
- Contains:
- prec - precision (for use in rounding, division, square roots..)
- rounding - rounding type (how you round)
- traps - If traps[exception] = 1, then the exception is
- raised when it is caused. Otherwise, a value is
- substituted in.
- flags - When an exception is caused, flags[exception] is set.
- (Whether or not the trap_enabler is set)
- Should be reset by user of Decimal instance.
- Emin - Minimum exponent
- Emax - Maximum exponent
- capitals - If 1, 1*10^1 is printed as 1E+1.
- If 0, printed as 1e1
- clamp - If 1, change exponents if too high (Default 0)
- """
-
- def __init__(self, prec=None, rounding=None, Emin=None, Emax=None,
- capitals=None, clamp=None, flags=None, traps=None,
- _ignored_flags=None):
- # Set defaults; for everything except flags and _ignored_flags,
- # inherit from DefaultContext.
- try:
- dc = DefaultContext
- except NameError:
- pass
-
- self.prec = prec if prec is not None else dc.prec
- self.rounding = rounding if rounding is not None else dc.rounding
- self.Emin = Emin if Emin is not None else dc.Emin
- self.Emax = Emax if Emax is not None else dc.Emax
- self.capitals = capitals if capitals is not None else dc.capitals
- self.clamp = clamp if clamp is not None else dc.clamp
-
- if _ignored_flags is None:
- self._ignored_flags = []
- else:
- self._ignored_flags = _ignored_flags
-
- if traps is None:
- self.traps = dc.traps.copy()
- elif not isinstance(traps, dict):
- self.traps = dict((s, int(s in traps)) for s in _signals + traps)
- else:
- self.traps = traps
-
- if flags is None:
- self.flags = dict.fromkeys(_signals, 0)
- elif not isinstance(flags, dict):
- self.flags = dict((s, int(s in flags)) for s in _signals + flags)
- else:
- self.flags = flags
-
- def _set_integer_check(self, name, value, vmin, vmax):
- if not isinstance(value, int):
- raise TypeError("%s must be an integer" % name)
- if vmin == '-inf':
- if value > vmax:
- raise ValueError("%s must be in [%s, %d]. got: %s" % (name, vmin, vmax, value))
- elif vmax == 'inf':
- if value < vmin:
- raise ValueError("%s must be in [%d, %s]. got: %s" % (name, vmin, vmax, value))
- else:
- if value < vmin or value > vmax:
- raise ValueError("%s must be in [%d, %d]. got %s" % (name, vmin, vmax, value))
- return object.__setattr__(self, name, value)
-
- def _set_signal_dict(self, name, d):
- if not isinstance(d, dict):
- raise TypeError("%s must be a signal dict" % d)
- for key in d:
- if not key in _signals:
- raise KeyError("%s is not a valid signal dict" % d)
- for key in _signals:
- if not key in d:
- raise KeyError("%s is not a valid signal dict" % d)
- return object.__setattr__(self, name, d)
-
- def __setattr__(self, name, value):
- if name == 'prec':
- return self._set_integer_check(name, value, 1, 'inf')
- elif name == 'Emin':
- return self._set_integer_check(name, value, '-inf', 0)
- elif name == 'Emax':
- return self._set_integer_check(name, value, 0, 'inf')
- elif name == 'capitals':
- return self._set_integer_check(name, value, 0, 1)
- elif name == 'clamp':
- return self._set_integer_check(name, value, 0, 1)
- elif name == 'rounding':
- if not value in _rounding_modes:
- # raise TypeError even for strings to have consistency
- # among various implementations.
- raise TypeError("%s: invalid rounding mode" % value)
- return object.__setattr__(self, name, value)
- elif name == 'flags' or name == 'traps':
- return self._set_signal_dict(name, value)
- elif name == '_ignored_flags':
- return object.__setattr__(self, name, value)
- else:
- raise AttributeError(
- "'decimal.Context' object has no attribute '%s'" % name)
-
- def __delattr__(self, name):
- raise AttributeError("%s cannot be deleted" % name)
-
- # Support for pickling, copy, and deepcopy
- def __reduce__(self):
- flags = [sig for sig, v in self.flags.items() if v]
- traps = [sig for sig, v in self.traps.items() if v]
- return (self.__class__,
- (self.prec, self.rounding, self.Emin, self.Emax,
- self.capitals, self.clamp, flags, traps))
-
- def __repr__(self):
- """Show the current context."""
- s = []
- s.append('Context(prec=%(prec)d, rounding=%(rounding)s, '
- 'Emin=%(Emin)d, Emax=%(Emax)d, capitals=%(capitals)d, '
- 'clamp=%(clamp)d'
- % vars(self))
- names = [f.__name__ for f, v in self.flags.items() if v]
- s.append('flags=[' + ', '.join(names) + ']')
- names = [t.__name__ for t, v in self.traps.items() if v]
- s.append('traps=[' + ', '.join(names) + ']')
- return ', '.join(s) + ')'
-
- def clear_flags(self):
- """Reset all flags to zero"""
- for flag in self.flags:
- self.flags[flag] = 0
-
- def clear_traps(self):
- """Reset all traps to zero"""
- for flag in self.traps:
- self.traps[flag] = 0
-
- def _shallow_copy(self):
- """Returns a shallow copy from self."""
- nc = Context(self.prec, self.rounding, self.Emin, self.Emax,
- self.capitals, self.clamp, self.flags, self.traps,
- self._ignored_flags)
- return nc
-
- def copy(self):
- """Returns a deep copy from self."""
- nc = Context(self.prec, self.rounding, self.Emin, self.Emax,
- self.capitals, self.clamp,
- self.flags.copy(), self.traps.copy(),
- self._ignored_flags)
- return nc
- __copy__ = copy
-
- def _raise_error(self, condition, explanation = None, *args):
- """Handles an error
-
- If the flag is in _ignored_flags, returns the default response.
- Otherwise, it sets the flag, then, if the corresponding
- trap_enabler is set, it reraises the exception. Otherwise, it returns
- the default value after setting the flag.
- """
- error = _condition_map.get(condition, condition)
- if error in self._ignored_flags:
- # Don't touch the flag
- return error().handle(self, *args)
-
- self.flags[error] = 1
- if not self.traps[error]:
- # The errors define how to handle themselves.
- return condition().handle(self, *args)
-
- # Errors should only be risked on copies of the context
- # self._ignored_flags = []
- raise error(explanation)
-
- def _ignore_all_flags(self):
- """Ignore all flags, if they are raised"""
- return self._ignore_flags(*_signals)
-
- def _ignore_flags(self, *flags):
- """Ignore the flags, if they are raised"""
- # Do not mutate-- This way, copies of a context leave the original
- # alone.
- self._ignored_flags = (self._ignored_flags + list(flags))
- return list(flags)
-
- def _regard_flags(self, *flags):
- """Stop ignoring the flags, if they are raised"""
- if flags and isinstance(flags[0], (tuple,list)):
- flags = flags[0]
- for flag in flags:
- self._ignored_flags.remove(flag)
-
- # We inherit object.__hash__, so we must deny this explicitly
- __hash__ = None
-
- def Etiny(self):
- """Returns Etiny (= Emin - prec + 1)"""
- return int(self.Emin - self.prec + 1)
-
- def Etop(self):
- """Returns maximum exponent (= Emax - prec + 1)"""
- return int(self.Emax - self.prec + 1)
-
- def _set_rounding(self, type):
- """Sets the rounding type.
-
- Sets the rounding type, and returns the current (previous)
- rounding type. Often used like:
-
- context = context.copy()
- # so you don't change the calling context
- # if an error occurs in the middle.
- rounding = context._set_rounding(ROUND_UP)
- val = self.__sub__(other, context=context)
- context._set_rounding(rounding)
-
- This will make it round up for that operation.
- """
- rounding = self.rounding
- self.rounding= type
- return rounding
-
- def create_decimal(self, num='0'):
- """Creates a new Decimal instance but using self as context.
-
- This method implements the to-number operation of the
- IBM Decimal specification."""
-
- if isinstance(num, str) and num != num.strip():
- return self._raise_error(ConversionSyntax,
- "no trailing or leading whitespace is "
- "permitted.")
-
- d = Decimal(num, context=self)
- if d._isnan() and len(d._int) > self.prec - self.clamp:
- return self._raise_error(ConversionSyntax,
- "diagnostic info too long in NaN")
- return d._fix(self)
-
- def create_decimal_from_float(self, f):
- """Creates a new Decimal instance from a float but rounding using self
- as the context.
-
- >>> context = Context(prec=5, rounding=ROUND_DOWN)
- >>> context.create_decimal_from_float(3.1415926535897932)
- Decimal('3.1415')
- >>> context = Context(prec=5, traps=[Inexact])
- >>> context.create_decimal_from_float(3.1415926535897932)
- Traceback (most recent call last):
- ...
- decimal.Inexact: None
-
- """
- d = Decimal.from_float(f) # An exact conversion
- return d._fix(self) # Apply the context rounding
-
- # Methods
- def abs(self, a):
- """Returns the absolute value of the operand.
-
- If the operand is negative, the result is the same as using the minus
- operation on the operand. Otherwise, the result is the same as using
- the plus operation on the operand.
-
- >>> ExtendedContext.abs(Decimal('2.1'))
- Decimal('2.1')
- >>> ExtendedContext.abs(Decimal('-100'))
- Decimal('100')
- >>> ExtendedContext.abs(Decimal('101.5'))
- Decimal('101.5')
- >>> ExtendedContext.abs(Decimal('-101.5'))
- Decimal('101.5')
- >>> ExtendedContext.abs(-1)
- Decimal('1')
- """
- a = _convert_other(a, raiseit=True)
- return a.__abs__(context=self)
-
- def add(self, a, b):
- """Return the sum of the two operands.
-
- >>> ExtendedContext.add(Decimal('12'), Decimal('7.00'))
- Decimal('19.00')
- >>> ExtendedContext.add(Decimal('1E+2'), Decimal('1.01E+4'))
- Decimal('1.02E+4')
- >>> ExtendedContext.add(1, Decimal(2))
- Decimal('3')
- >>> ExtendedContext.add(Decimal(8), 5)
- Decimal('13')
- >>> ExtendedContext.add(5, 5)
- Decimal('10')
- """
- a = _convert_other(a, raiseit=True)
- r = a.__add__(b, context=self)
- if r is NotImplemented:
- raise TypeError("Unable to convert %s to Decimal" % b)
- else:
- return r
-
- def _apply(self, a):
- return str(a._fix(self))
-
- def canonical(self, a):
- """Returns the same Decimal object.
-
- As we do not have different encodings for the same number, the
- received object already is in its canonical form.
-
- >>> ExtendedContext.canonical(Decimal('2.50'))
- Decimal('2.50')
- """
- if not isinstance(a, Decimal):
- raise TypeError("canonical requires a Decimal as an argument.")
- return a.canonical()
-
- def compare(self, a, b):
- """Compares values numerically.
-
- If the signs of the operands differ, a value representing each operand
- ('-1' if the operand is less than zero, '0' if the operand is zero or
- negative zero, or '1' if the operand is greater than zero) is used in
- place of that operand for the comparison instead of the actual
- operand.
-
- The comparison is then effected by subtracting the second operand from
- the first and then returning a value according to the result of the
- subtraction: '-1' if the result is less than zero, '0' if the result is
- zero or negative zero, or '1' if the result is greater than zero.
-
- >>> ExtendedContext.compare(Decimal('2.1'), Decimal('3'))
- Decimal('-1')
- >>> ExtendedContext.compare(Decimal('2.1'), Decimal('2.1'))
- Decimal('0')
- >>> ExtendedContext.compare(Decimal('2.1'), Decimal('2.10'))
- Decimal('0')
- >>> ExtendedContext.compare(Decimal('3'), Decimal('2.1'))
- Decimal('1')
- >>> ExtendedContext.compare(Decimal('2.1'), Decimal('-3'))
- Decimal('1')
- >>> ExtendedContext.compare(Decimal('-3'), Decimal('2.1'))
- Decimal('-1')
- >>> ExtendedContext.compare(1, 2)
- Decimal('-1')
- >>> ExtendedContext.compare(Decimal(1), 2)
- Decimal('-1')
- >>> ExtendedContext.compare(1, Decimal(2))
- Decimal('-1')
- """
- a = _convert_other(a, raiseit=True)
- return a.compare(b, context=self)
-
- def compare_signal(self, a, b):
- """Compares the values of the two operands numerically.
-
- It's pretty much like compare(), but all NaNs signal, with signaling
- NaNs taking precedence over quiet NaNs.
-
- >>> c = ExtendedContext
- >>> c.compare_signal(Decimal('2.1'), Decimal('3'))
- Decimal('-1')
- >>> c.compare_signal(Decimal('2.1'), Decimal('2.1'))
- Decimal('0')
- >>> c.flags[InvalidOperation] = 0
- >>> print(c.flags[InvalidOperation])
- 0
- >>> c.compare_signal(Decimal('NaN'), Decimal('2.1'))
- Decimal('NaN')
- >>> print(c.flags[InvalidOperation])
- 1
- >>> c.flags[InvalidOperation] = 0
- >>> print(c.flags[InvalidOperation])
- 0
- >>> c.compare_signal(Decimal('sNaN'), Decimal('2.1'))
- Decimal('NaN')
- >>> print(c.flags[InvalidOperation])
- 1
- >>> c.compare_signal(-1, 2)
- Decimal('-1')
- >>> c.compare_signal(Decimal(-1), 2)
- Decimal('-1')
- >>> c.compare_signal(-1, Decimal(2))
- Decimal('-1')
- """
- a = _convert_other(a, raiseit=True)
- return a.compare_signal(b, context=self)
-
- def compare_total(self, a, b):
- """Compares two operands using their abstract representation.
-
- This is not like the standard compare, which use their numerical
- value. Note that a total ordering is defined for all possible abstract
- representations.
-
- >>> ExtendedContext.compare_total(Decimal('12.73'), Decimal('127.9'))
- Decimal('-1')
- >>> ExtendedContext.compare_total(Decimal('-127'), Decimal('12'))
- Decimal('-1')
- >>> ExtendedContext.compare_total(Decimal('12.30'), Decimal('12.3'))
- Decimal('-1')
- >>> ExtendedContext.compare_total(Decimal('12.30'), Decimal('12.30'))
- Decimal('0')
- >>> ExtendedContext.compare_total(Decimal('12.3'), Decimal('12.300'))
- Decimal('1')
- >>> ExtendedContext.compare_total(Decimal('12.3'), Decimal('NaN'))
- Decimal('-1')
- >>> ExtendedContext.compare_total(1, 2)
- Decimal('-1')
- >>> ExtendedContext.compare_total(Decimal(1), 2)
- Decimal('-1')
- >>> ExtendedContext.compare_total(1, Decimal(2))
- Decimal('-1')
- """
- a = _convert_other(a, raiseit=True)
- return a.compare_total(b)
-
- def compare_total_mag(self, a, b):
- """Compares two operands using their abstract representation ignoring sign.
-
- Like compare_total, but with operand's sign ignored and assumed to be 0.
- """
- a = _convert_other(a, raiseit=True)
- return a.compare_total_mag(b)
-
- def copy_abs(self, a):
- """Returns a copy of the operand with the sign set to 0.
-
- >>> ExtendedContext.copy_abs(Decimal('2.1'))
- Decimal('2.1')
- >>> ExtendedContext.copy_abs(Decimal('-100'))
- Decimal('100')
- >>> ExtendedContext.copy_abs(-1)
- Decimal('1')
- """
- a = _convert_other(a, raiseit=True)
- return a.copy_abs()
-
- def copy_decimal(self, a):
- """Returns a copy of the decimal object.
-
- >>> ExtendedContext.copy_decimal(Decimal('2.1'))
- Decimal('2.1')
- >>> ExtendedContext.copy_decimal(Decimal('-1.00'))
- Decimal('-1.00')
- >>> ExtendedContext.copy_decimal(1)
- Decimal('1')
- """
- a = _convert_other(a, raiseit=True)
- return Decimal(a)
-
- def copy_negate(self, a):
- """Returns a copy of the operand with the sign inverted.
-
- >>> ExtendedContext.copy_negate(Decimal('101.5'))
- Decimal('-101.5')
- >>> ExtendedContext.copy_negate(Decimal('-101.5'))
- Decimal('101.5')
- >>> ExtendedContext.copy_negate(1)
- Decimal('-1')
- """
- a = _convert_other(a, raiseit=True)
- return a.copy_negate()
-
- def copy_sign(self, a, b):
- """Copies the second operand's sign to the first one.
-
- In detail, it returns a copy of the first operand with the sign
- equal to the sign of the second operand.
-
- >>> ExtendedContext.copy_sign(Decimal( '1.50'), Decimal('7.33'))
- Decimal('1.50')
- >>> ExtendedContext.copy_sign(Decimal('-1.50'), Decimal('7.33'))
- Decimal('1.50')
- >>> ExtendedContext.copy_sign(Decimal( '1.50'), Decimal('-7.33'))
- Decimal('-1.50')
- >>> ExtendedContext.copy_sign(Decimal('-1.50'), Decimal('-7.33'))
- Decimal('-1.50')
- >>> ExtendedContext.copy_sign(1, -2)
- Decimal('-1')
- >>> ExtendedContext.copy_sign(Decimal(1), -2)
- Decimal('-1')
- >>> ExtendedContext.copy_sign(1, Decimal(-2))
- Decimal('-1')
- """
- a = _convert_other(a, raiseit=True)
- return a.copy_sign(b)
-
- def divide(self, a, b):
- """Decimal division in a specified context.
-
- >>> ExtendedContext.divide(Decimal('1'), Decimal('3'))
- Decimal('0.333333333')
- >>> ExtendedContext.divide(Decimal('2'), Decimal('3'))
- Decimal('0.666666667')
- >>> ExtendedContext.divide(Decimal('5'), Decimal('2'))
- Decimal('2.5')
- >>> ExtendedContext.divide(Decimal('1'), Decimal('10'))
- Decimal('0.1')
- >>> ExtendedContext.divide(Decimal('12'), Decimal('12'))
- Decimal('1')
- >>> ExtendedContext.divide(Decimal('8.00'), Decimal('2'))
- Decimal('4.00')
- >>> ExtendedContext.divide(Decimal('2.400'), Decimal('2.0'))
- Decimal('1.20')
- >>> ExtendedContext.divide(Decimal('1000'), Decimal('100'))
- Decimal('10')
- >>> ExtendedContext.divide(Decimal('1000'), Decimal('1'))
- Decimal('1000')
- >>> ExtendedContext.divide(Decimal('2.40E+6'), Decimal('2'))
- Decimal('1.20E+6')
- >>> ExtendedContext.divide(5, 5)
- Decimal('1')
- >>> ExtendedContext.divide(Decimal(5), 5)
- Decimal('1')
- >>> ExtendedContext.divide(5, Decimal(5))
- Decimal('1')
- """
- a = _convert_other(a, raiseit=True)
- r = a.__truediv__(b, context=self)
- if r is NotImplemented:
- raise TypeError("Unable to convert %s to Decimal" % b)
- else:
- return r
-
- def divide_int(self, a, b):
- """Divides two numbers and returns the integer part of the result.
-
- >>> ExtendedContext.divide_int(Decimal('2'), Decimal('3'))
- Decimal('0')
- >>> ExtendedContext.divide_int(Decimal('10'), Decimal('3'))
- Decimal('3')
- >>> ExtendedContext.divide_int(Decimal('1'), Decimal('0.3'))
- Decimal('3')
- >>> ExtendedContext.divide_int(10, 3)
- Decimal('3')
- >>> ExtendedContext.divide_int(Decimal(10), 3)
- Decimal('3')
- >>> ExtendedContext.divide_int(10, Decimal(3))
- Decimal('3')
- """
- a = _convert_other(a, raiseit=True)
- r = a.__floordiv__(b, context=self)
- if r is NotImplemented:
- raise TypeError("Unable to convert %s to Decimal" % b)
- else:
- return r
-
- def divmod(self, a, b):
- """Return (a // b, a % b).
-
- >>> ExtendedContext.divmod(Decimal(8), Decimal(3))
- (Decimal('2'), Decimal('2'))
- >>> ExtendedContext.divmod(Decimal(8), Decimal(4))
- (Decimal('2'), Decimal('0'))
- >>> ExtendedContext.divmod(8, 4)
- (Decimal('2'), Decimal('0'))
- >>> ExtendedContext.divmod(Decimal(8), 4)
- (Decimal('2'), Decimal('0'))
- >>> ExtendedContext.divmod(8, Decimal(4))
- (Decimal('2'), Decimal('0'))
- """
- a = _convert_other(a, raiseit=True)
- r = a.__divmod__(b, context=self)
- if r is NotImplemented:
- raise TypeError("Unable to convert %s to Decimal" % b)
- else:
- return r
-
- def exp(self, a):
- """Returns e ** a.
-
- >>> c = ExtendedContext.copy()
- >>> c.Emin = -999
- >>> c.Emax = 999
- >>> c.exp(Decimal('-Infinity'))
- Decimal('0')
- >>> c.exp(Decimal('-1'))
- Decimal('0.367879441')
- >>> c.exp(Decimal('0'))
- Decimal('1')
- >>> c.exp(Decimal('1'))
- Decimal('2.71828183')
- >>> c.exp(Decimal('0.693147181'))
- Decimal('2.00000000')
- >>> c.exp(Decimal('+Infinity'))
- Decimal('Infinity')
- >>> c.exp(10)
- Decimal('22026.4658')
- """
- a =_convert_other(a, raiseit=True)
- return a.exp(context=self)
-
- def fma(self, a, b, c):
- """Returns a multiplied by b, plus c.
-
- The first two operands are multiplied together, using multiply,
- the third operand is then added to the result of that
- multiplication, using add, all with only one final rounding.
-
- >>> ExtendedContext.fma(Decimal('3'), Decimal('5'), Decimal('7'))
- Decimal('22')
- >>> ExtendedContext.fma(Decimal('3'), Decimal('-5'), Decimal('7'))
- Decimal('-8')
- >>> ExtendedContext.fma(Decimal('888565290'), Decimal('1557.96930'), Decimal('-86087.7578'))
- Decimal('1.38435736E+12')
- >>> ExtendedContext.fma(1, 3, 4)
- Decimal('7')
- >>> ExtendedContext.fma(1, Decimal(3), 4)
- Decimal('7')
- >>> ExtendedContext.fma(1, 3, Decimal(4))
- Decimal('7')
- """
- a = _convert_other(a, raiseit=True)
- return a.fma(b, c, context=self)
-
- def is_canonical(self, a):
- """Return True if the operand is canonical; otherwise return False.
-
- Currently, the encoding of a Decimal instance is always
- canonical, so this method returns True for any Decimal.
-
- >>> ExtendedContext.is_canonical(Decimal('2.50'))
- True
- """
- if not isinstance(a, Decimal):
- raise TypeError("is_canonical requires a Decimal as an argument.")
- return a.is_canonical()
-
- def is_finite(self, a):
- """Return True if the operand is finite; otherwise return False.
-
- A Decimal instance is considered finite if it is neither
- infinite nor a NaN.
-
- >>> ExtendedContext.is_finite(Decimal('2.50'))
- True
- >>> ExtendedContext.is_finite(Decimal('-0.3'))
- True
- >>> ExtendedContext.is_finite(Decimal('0'))
- True
- >>> ExtendedContext.is_finite(Decimal('Inf'))
- False
- >>> ExtendedContext.is_finite(Decimal('NaN'))
- False
- >>> ExtendedContext.is_finite(1)
- True
- """
- a = _convert_other(a, raiseit=True)
- return a.is_finite()
-
- def is_infinite(self, a):
- """Return True if the operand is infinite; otherwise return False.
-
- >>> ExtendedContext.is_infinite(Decimal('2.50'))
- False
- >>> ExtendedContext.is_infinite(Decimal('-Inf'))
- True
- >>> ExtendedContext.is_infinite(Decimal('NaN'))
- False
- >>> ExtendedContext.is_infinite(1)
- False
- """
- a = _convert_other(a, raiseit=True)
- return a.is_infinite()
-
- def is_nan(self, a):
- """Return True if the operand is a qNaN or sNaN;
- otherwise return False.
-
- >>> ExtendedContext.is_nan(Decimal('2.50'))
- False
- >>> ExtendedContext.is_nan(Decimal('NaN'))
- True
- >>> ExtendedContext.is_nan(Decimal('-sNaN'))
- True
- >>> ExtendedContext.is_nan(1)
- False
- """
- a = _convert_other(a, raiseit=True)
- return a.is_nan()
-
- def is_normal(self, a):
- """Return True if the operand is a normal number;
- otherwise return False.
-
- >>> c = ExtendedContext.copy()
- >>> c.Emin = -999
- >>> c.Emax = 999
- >>> c.is_normal(Decimal('2.50'))
- True
- >>> c.is_normal(Decimal('0.1E-999'))
- False
- >>> c.is_normal(Decimal('0.00'))
- False
- >>> c.is_normal(Decimal('-Inf'))
- False
- >>> c.is_normal(Decimal('NaN'))
- False
- >>> c.is_normal(1)
- True
- """
- a = _convert_other(a, raiseit=True)
- return a.is_normal(context=self)
-
- def is_qnan(self, a):
- """Return True if the operand is a quiet NaN; otherwise return False.
-
- >>> ExtendedContext.is_qnan(Decimal('2.50'))
- False
- >>> ExtendedContext.is_qnan(Decimal('NaN'))
- True
- >>> ExtendedContext.is_qnan(Decimal('sNaN'))
- False
- >>> ExtendedContext.is_qnan(1)
- False
- """
- a = _convert_other(a, raiseit=True)
- return a.is_qnan()
-
- def is_signed(self, a):
- """Return True if the operand is negative; otherwise return False.
-
- >>> ExtendedContext.is_signed(Decimal('2.50'))
- False
- >>> ExtendedContext.is_signed(Decimal('-12'))
- True
- >>> ExtendedContext.is_signed(Decimal('-0'))
- True
- >>> ExtendedContext.is_signed(8)
- False
- >>> ExtendedContext.is_signed(-8)
- True
- """
- a = _convert_other(a, raiseit=True)
- return a.is_signed()
-
- def is_snan(self, a):
- """Return True if the operand is a signaling NaN;
- otherwise return False.
-
- >>> ExtendedContext.is_snan(Decimal('2.50'))
- False
- >>> ExtendedContext.is_snan(Decimal('NaN'))
- False
- >>> ExtendedContext.is_snan(Decimal('sNaN'))
- True
- >>> ExtendedContext.is_snan(1)
- False
- """
- a = _convert_other(a, raiseit=True)
- return a.is_snan()
-
- def is_subnormal(self, a):
- """Return True if the operand is subnormal; otherwise return False.
-
- >>> c = ExtendedContext.copy()
- >>> c.Emin = -999
- >>> c.Emax = 999
- >>> c.is_subnormal(Decimal('2.50'))
- False
- >>> c.is_subnormal(Decimal('0.1E-999'))
- True
- >>> c.is_subnormal(Decimal('0.00'))
- False
- >>> c.is_subnormal(Decimal('-Inf'))
- False
- >>> c.is_subnormal(Decimal('NaN'))
- False
- >>> c.is_subnormal(1)
- False
- """
- a = _convert_other(a, raiseit=True)
- return a.is_subnormal(context=self)
-
- def is_zero(self, a):
- """Return True if the operand is a zero; otherwise return False.
-
- >>> ExtendedContext.is_zero(Decimal('0'))
- True
- >>> ExtendedContext.is_zero(Decimal('2.50'))
- False
- >>> ExtendedContext.is_zero(Decimal('-0E+2'))
- True
- >>> ExtendedContext.is_zero(1)
- False
- >>> ExtendedContext.is_zero(0)
- True
- """
- a = _convert_other(a, raiseit=True)
- return a.is_zero()
-
- def ln(self, a):
- """Returns the natural (base e) logarithm of the operand.
-
- >>> c = ExtendedContext.copy()
- >>> c.Emin = -999
- >>> c.Emax = 999
- >>> c.ln(Decimal('0'))
- Decimal('-Infinity')
- >>> c.ln(Decimal('1.000'))
- Decimal('0')
- >>> c.ln(Decimal('2.71828183'))
- Decimal('1.00000000')
- >>> c.ln(Decimal('10'))
- Decimal('2.30258509')
- >>> c.ln(Decimal('+Infinity'))
- Decimal('Infinity')
- >>> c.ln(1)
- Decimal('0')
- """
- a = _convert_other(a, raiseit=True)
- return a.ln(context=self)
-
- def log10(self, a):
- """Returns the base 10 logarithm of the operand.
-
- >>> c = ExtendedContext.copy()
- >>> c.Emin = -999
- >>> c.Emax = 999
- >>> c.log10(Decimal('0'))
- Decimal('-Infinity')
- >>> c.log10(Decimal('0.001'))
- Decimal('-3')
- >>> c.log10(Decimal('1.000'))
- Decimal('0')
- >>> c.log10(Decimal('2'))
- Decimal('0.301029996')
- >>> c.log10(Decimal('10'))
- Decimal('1')
- >>> c.log10(Decimal('70'))
- Decimal('1.84509804')
- >>> c.log10(Decimal('+Infinity'))
- Decimal('Infinity')
- >>> c.log10(0)
- Decimal('-Infinity')
- >>> c.log10(1)
- Decimal('0')
- """
- a = _convert_other(a, raiseit=True)
- return a.log10(context=self)
-
- def logb(self, a):
- """ Returns the exponent of the magnitude of the operand's MSD.
-
- The result is the integer which is the exponent of the magnitude
- of the most significant digit of the operand (as though the
- operand were truncated to a single digit while maintaining the
- value of that digit and without limiting the resulting exponent).
-
- >>> ExtendedContext.logb(Decimal('250'))
- Decimal('2')
- >>> ExtendedContext.logb(Decimal('2.50'))
- Decimal('0')
- >>> ExtendedContext.logb(Decimal('0.03'))
- Decimal('-2')
- >>> ExtendedContext.logb(Decimal('0'))
- Decimal('-Infinity')
- >>> ExtendedContext.logb(1)
- Decimal('0')
- >>> ExtendedContext.logb(10)
- Decimal('1')
- >>> ExtendedContext.logb(100)
- Decimal('2')
- """
- a = _convert_other(a, raiseit=True)
- return a.logb(context=self)
-
- def logical_and(self, a, b):
- """Applies the logical operation 'and' between each operand's digits.
-
- The operands must be both logical numbers.
-
- >>> ExtendedContext.logical_and(Decimal('0'), Decimal('0'))
- Decimal('0')
- >>> ExtendedContext.logical_and(Decimal('0'), Decimal('1'))
- Decimal('0')
- >>> ExtendedContext.logical_and(Decimal('1'), Decimal('0'))
- Decimal('0')
- >>> ExtendedContext.logical_and(Decimal('1'), Decimal('1'))
- Decimal('1')
- >>> ExtendedContext.logical_and(Decimal('1100'), Decimal('1010'))
- Decimal('1000')
- >>> ExtendedContext.logical_and(Decimal('1111'), Decimal('10'))
- Decimal('10')
- >>> ExtendedContext.logical_and(110, 1101)
- Decimal('100')
- >>> ExtendedContext.logical_and(Decimal(110), 1101)
- Decimal('100')
- >>> ExtendedContext.logical_and(110, Decimal(1101))
- Decimal('100')
- """
- a = _convert_other(a, raiseit=True)
- return a.logical_and(b, context=self)
-
- def logical_invert(self, a):
- """Invert all the digits in the operand.
-
- The operand must be a logical number.
-
- >>> ExtendedContext.logical_invert(Decimal('0'))
- Decimal('111111111')
- >>> ExtendedContext.logical_invert(Decimal('1'))
- Decimal('111111110')
- >>> ExtendedContext.logical_invert(Decimal('111111111'))
- Decimal('0')
- >>> ExtendedContext.logical_invert(Decimal('101010101'))
- Decimal('10101010')
- >>> ExtendedContext.logical_invert(1101)
- Decimal('111110010')
- """
- a = _convert_other(a, raiseit=True)
- return a.logical_invert(context=self)
-
- def logical_or(self, a, b):
- """Applies the logical operation 'or' between each operand's digits.
-
- The operands must be both logical numbers.
-
- >>> ExtendedContext.logical_or(Decimal('0'), Decimal('0'))
- Decimal('0')
- >>> ExtendedContext.logical_or(Decimal('0'), Decimal('1'))
- Decimal('1')
- >>> ExtendedContext.logical_or(Decimal('1'), Decimal('0'))
- Decimal('1')
- >>> ExtendedContext.logical_or(Decimal('1'), Decimal('1'))
- Decimal('1')
- >>> ExtendedContext.logical_or(Decimal('1100'), Decimal('1010'))
- Decimal('1110')
- >>> ExtendedContext.logical_or(Decimal('1110'), Decimal('10'))
- Decimal('1110')
- >>> ExtendedContext.logical_or(110, 1101)
- Decimal('1111')
- >>> ExtendedContext.logical_or(Decimal(110), 1101)
- Decimal('1111')
- >>> ExtendedContext.logical_or(110, Decimal(1101))
- Decimal('1111')
- """
- a = _convert_other(a, raiseit=True)
- return a.logical_or(b, context=self)
-
- def logical_xor(self, a, b):
- """Applies the logical operation 'xor' between each operand's digits.
-
- The operands must be both logical numbers.
-
- >>> ExtendedContext.logical_xor(Decimal('0'), Decimal('0'))
- Decimal('0')
- >>> ExtendedContext.logical_xor(Decimal('0'), Decimal('1'))
- Decimal('1')
- >>> ExtendedContext.logical_xor(Decimal('1'), Decimal('0'))
- Decimal('1')
- >>> ExtendedContext.logical_xor(Decimal('1'), Decimal('1'))
- Decimal('0')
- >>> ExtendedContext.logical_xor(Decimal('1100'), Decimal('1010'))
- Decimal('110')
- >>> ExtendedContext.logical_xor(Decimal('1111'), Decimal('10'))
- Decimal('1101')
- >>> ExtendedContext.logical_xor(110, 1101)
- Decimal('1011')
- >>> ExtendedContext.logical_xor(Decimal(110), 1101)
- Decimal('1011')
- >>> ExtendedContext.logical_xor(110, Decimal(1101))
- Decimal('1011')
- """
- a = _convert_other(a, raiseit=True)
- return a.logical_xor(b, context=self)
-
- def max(self, a, b):
- """max compares two values numerically and returns the maximum.
-
- If either operand is a NaN then the general rules apply.
- Otherwise, the operands are compared as though by the compare
- operation. If they are numerically equal then the left-hand operand
- is chosen as the result. Otherwise the maximum (closer to positive
- infinity) of the two operands is chosen as the result.
-
- >>> ExtendedContext.max(Decimal('3'), Decimal('2'))
- Decimal('3')
- >>> ExtendedContext.max(Decimal('-10'), Decimal('3'))
- Decimal('3')
- >>> ExtendedContext.max(Decimal('1.0'), Decimal('1'))
- Decimal('1')
- >>> ExtendedContext.max(Decimal('7'), Decimal('NaN'))
- Decimal('7')
- >>> ExtendedContext.max(1, 2)
- Decimal('2')
- >>> ExtendedContext.max(Decimal(1), 2)
- Decimal('2')
- >>> ExtendedContext.max(1, Decimal(2))
- Decimal('2')
- """
- a = _convert_other(a, raiseit=True)
- return a.max(b, context=self)
-
- def max_mag(self, a, b):
- """Compares the values numerically with their sign ignored.
-
- >>> ExtendedContext.max_mag(Decimal('7'), Decimal('NaN'))
- Decimal('7')
- >>> ExtendedContext.max_mag(Decimal('7'), Decimal('-10'))
- Decimal('-10')
- >>> ExtendedContext.max_mag(1, -2)
- Decimal('-2')
- >>> ExtendedContext.max_mag(Decimal(1), -2)
- Decimal('-2')
- >>> ExtendedContext.max_mag(1, Decimal(-2))
- Decimal('-2')
- """
- a = _convert_other(a, raiseit=True)
- return a.max_mag(b, context=self)
-
- def min(self, a, b):
- """min compares two values numerically and returns the minimum.
-
- If either operand is a NaN then the general rules apply.
- Otherwise, the operands are compared as though by the compare
- operation. If they are numerically equal then the left-hand operand
- is chosen as the result. Otherwise the minimum (closer to negative
- infinity) of the two operands is chosen as the result.
-
- >>> ExtendedContext.min(Decimal('3'), Decimal('2'))
- Decimal('2')
- >>> ExtendedContext.min(Decimal('-10'), Decimal('3'))
- Decimal('-10')
- >>> ExtendedContext.min(Decimal('1.0'), Decimal('1'))
- Decimal('1.0')
- >>> ExtendedContext.min(Decimal('7'), Decimal('NaN'))
- Decimal('7')
- >>> ExtendedContext.min(1, 2)
- Decimal('1')
- >>> ExtendedContext.min(Decimal(1), 2)
- Decimal('1')
- >>> ExtendedContext.min(1, Decimal(29))
- Decimal('1')
- """
- a = _convert_other(a, raiseit=True)
- return a.min(b, context=self)
-
- def min_mag(self, a, b):
- """Compares the values numerically with their sign ignored.
-
- >>> ExtendedContext.min_mag(Decimal('3'), Decimal('-2'))
- Decimal('-2')
- >>> ExtendedContext.min_mag(Decimal('-3'), Decimal('NaN'))
- Decimal('-3')
- >>> ExtendedContext.min_mag(1, -2)
- Decimal('1')
- >>> ExtendedContext.min_mag(Decimal(1), -2)
- Decimal('1')
- >>> ExtendedContext.min_mag(1, Decimal(-2))
- Decimal('1')
- """
- a = _convert_other(a, raiseit=True)
- return a.min_mag(b, context=self)
-
- def minus(self, a):
- """Minus corresponds to unary prefix minus in Python.
-
- The operation is evaluated using the same rules as subtract; the
- operation minus(a) is calculated as subtract('0', a) where the '0'
- has the same exponent as the operand.
-
- >>> ExtendedContext.minus(Decimal('1.3'))
- Decimal('-1.3')
- >>> ExtendedContext.minus(Decimal('-1.3'))
- Decimal('1.3')
- >>> ExtendedContext.minus(1)
- Decimal('-1')
- """
- a = _convert_other(a, raiseit=True)
- return a.__neg__(context=self)
-
- def multiply(self, a, b):
- """multiply multiplies two operands.
-
- If either operand is a special value then the general rules apply.
- Otherwise, the operands are multiplied together
- ('long multiplication'), resulting in a number which may be as long as
- the sum of the lengths of the two operands.
-
- >>> ExtendedContext.multiply(Decimal('1.20'), Decimal('3'))
- Decimal('3.60')
- >>> ExtendedContext.multiply(Decimal('7'), Decimal('3'))
- Decimal('21')
- >>> ExtendedContext.multiply(Decimal('0.9'), Decimal('0.8'))
- Decimal('0.72')
- >>> ExtendedContext.multiply(Decimal('0.9'), Decimal('-0'))
- Decimal('-0.0')
- >>> ExtendedContext.multiply(Decimal('654321'), Decimal('654321'))
- Decimal('4.28135971E+11')
- >>> ExtendedContext.multiply(7, 7)
- Decimal('49')
- >>> ExtendedContext.multiply(Decimal(7), 7)
- Decimal('49')
- >>> ExtendedContext.multiply(7, Decimal(7))
- Decimal('49')
- """
- a = _convert_other(a, raiseit=True)
- r = a.__mul__(b, context=self)
- if r is NotImplemented:
- raise TypeError("Unable to convert %s to Decimal" % b)
- else:
- return r
-
- def next_minus(self, a):
- """Returns the largest representable number smaller than a.
-
- >>> c = ExtendedContext.copy()
- >>> c.Emin = -999
- >>> c.Emax = 999
- >>> ExtendedContext.next_minus(Decimal('1'))
- Decimal('0.999999999')
- >>> c.next_minus(Decimal('1E-1007'))
- Decimal('0E-1007')
- >>> ExtendedContext.next_minus(Decimal('-1.00000003'))
- Decimal('-1.00000004')
- >>> c.next_minus(Decimal('Infinity'))
- Decimal('9.99999999E+999')
- >>> c.next_minus(1)
- Decimal('0.999999999')
- """
- a = _convert_other(a, raiseit=True)
- return a.next_minus(context=self)
-
- def next_plus(self, a):
- """Returns the smallest representable number larger than a.
-
- >>> c = ExtendedContext.copy()
- >>> c.Emin = -999
- >>> c.Emax = 999
- >>> ExtendedContext.next_plus(Decimal('1'))
- Decimal('1.00000001')
- >>> c.next_plus(Decimal('-1E-1007'))
- Decimal('-0E-1007')
- >>> ExtendedContext.next_plus(Decimal('-1.00000003'))
- Decimal('-1.00000002')
- >>> c.next_plus(Decimal('-Infinity'))
- Decimal('-9.99999999E+999')
- >>> c.next_plus(1)
- Decimal('1.00000001')
- """
- a = _convert_other(a, raiseit=True)
- return a.next_plus(context=self)
-
- def next_toward(self, a, b):
- """Returns the number closest to a, in direction towards b.
-
- The result is the closest representable number from the first
- operand (but not the first operand) that is in the direction
- towards the second operand, unless the operands have the same
- value.
-
- >>> c = ExtendedContext.copy()
- >>> c.Emin = -999
- >>> c.Emax = 999
- >>> c.next_toward(Decimal('1'), Decimal('2'))
- Decimal('1.00000001')
- >>> c.next_toward(Decimal('-1E-1007'), Decimal('1'))
- Decimal('-0E-1007')
- >>> c.next_toward(Decimal('-1.00000003'), Decimal('0'))
- Decimal('-1.00000002')
- >>> c.next_toward(Decimal('1'), Decimal('0'))
- Decimal('0.999999999')
- >>> c.next_toward(Decimal('1E-1007'), Decimal('-100'))
- Decimal('0E-1007')
- >>> c.next_toward(Decimal('-1.00000003'), Decimal('-10'))
- Decimal('-1.00000004')
- >>> c.next_toward(Decimal('0.00'), Decimal('-0.0000'))
- Decimal('-0.00')
- >>> c.next_toward(0, 1)
- Decimal('1E-1007')
- >>> c.next_toward(Decimal(0), 1)
- Decimal('1E-1007')
- >>> c.next_toward(0, Decimal(1))
- Decimal('1E-1007')
- """
- a = _convert_other(a, raiseit=True)
- return a.next_toward(b, context=self)
-
- def normalize(self, a):
- """normalize reduces an operand to its simplest form.
-
- Essentially a plus operation with all trailing zeros removed from the
- result.
-
- >>> ExtendedContext.normalize(Decimal('2.1'))
- Decimal('2.1')
- >>> ExtendedContext.normalize(Decimal('-2.0'))
- Decimal('-2')
- >>> ExtendedContext.normalize(Decimal('1.200'))
- Decimal('1.2')
- >>> ExtendedContext.normalize(Decimal('-120'))
- Decimal('-1.2E+2')
- >>> ExtendedContext.normalize(Decimal('120.00'))
- Decimal('1.2E+2')
- >>> ExtendedContext.normalize(Decimal('0.00'))
- Decimal('0')
- >>> ExtendedContext.normalize(6)
- Decimal('6')
- """
- a = _convert_other(a, raiseit=True)
- return a.normalize(context=self)
-
- def number_class(self, a):
- """Returns an indication of the class of the operand.
-
- The class is one of the following strings:
- -sNaN
- -NaN
- -Infinity
- -Normal
- -Subnormal
- -Zero
- +Zero
- +Subnormal
- +Normal
- +Infinity
-
- >>> c = ExtendedContext.copy()
- >>> c.Emin = -999
- >>> c.Emax = 999
- >>> c.number_class(Decimal('Infinity'))
- '+Infinity'
- >>> c.number_class(Decimal('1E-10'))
- '+Normal'
- >>> c.number_class(Decimal('2.50'))
- '+Normal'
- >>> c.number_class(Decimal('0.1E-999'))
- '+Subnormal'
- >>> c.number_class(Decimal('0'))
- '+Zero'
- >>> c.number_class(Decimal('-0'))
- '-Zero'
- >>> c.number_class(Decimal('-0.1E-999'))
- '-Subnormal'
- >>> c.number_class(Decimal('-1E-10'))
- '-Normal'
- >>> c.number_class(Decimal('-2.50'))
- '-Normal'
- >>> c.number_class(Decimal('-Infinity'))
- '-Infinity'
- >>> c.number_class(Decimal('NaN'))
- 'NaN'
- >>> c.number_class(Decimal('-NaN'))
- 'NaN'
- >>> c.number_class(Decimal('sNaN'))
- 'sNaN'
- >>> c.number_class(123)
- '+Normal'
- """
- a = _convert_other(a, raiseit=True)
- return a.number_class(context=self)
-
- def plus(self, a):
- """Plus corresponds to unary prefix plus in Python.
-
- The operation is evaluated using the same rules as add; the
- operation plus(a) is calculated as add('0', a) where the '0'
- has the same exponent as the operand.
-
- >>> ExtendedContext.plus(Decimal('1.3'))
- Decimal('1.3')
- >>> ExtendedContext.plus(Decimal('-1.3'))
- Decimal('-1.3')
- >>> ExtendedContext.plus(-1)
- Decimal('-1')
- """
- a = _convert_other(a, raiseit=True)
- return a.__pos__(context=self)
-
- def power(self, a, b, modulo=None):
- """Raises a to the power of b, to modulo if given.
-
- With two arguments, compute a**b. If a is negative then b
- must be integral. The result will be inexact unless b is
- integral and the result is finite and can be expressed exactly
- in 'precision' digits.
-
- With three arguments, compute (a**b) % modulo. For the
- three argument form, the following restrictions on the
- arguments hold:
-
- - all three arguments must be integral
- - b must be nonnegative
- - at least one of a or b must be nonzero
- - modulo must be nonzero and have at most 'precision' digits
-
- The result of pow(a, b, modulo) is identical to the result
- that would be obtained by computing (a**b) % modulo with
- unbounded precision, but is computed more efficiently. It is
- always exact.
-
- >>> c = ExtendedContext.copy()
- >>> c.Emin = -999
- >>> c.Emax = 999
- >>> c.power(Decimal('2'), Decimal('3'))
- Decimal('8')
- >>> c.power(Decimal('-2'), Decimal('3'))
- Decimal('-8')
- >>> c.power(Decimal('2'), Decimal('-3'))
- Decimal('0.125')
- >>> c.power(Decimal('1.7'), Decimal('8'))
- Decimal('69.7575744')
- >>> c.power(Decimal('10'), Decimal('0.301029996'))
- Decimal('2.00000000')
- >>> c.power(Decimal('Infinity'), Decimal('-1'))
- Decimal('0')
- >>> c.power(Decimal('Infinity'), Decimal('0'))
- Decimal('1')
- >>> c.power(Decimal('Infinity'), Decimal('1'))
- Decimal('Infinity')
- >>> c.power(Decimal('-Infinity'), Decimal('-1'))
- Decimal('-0')
- >>> c.power(Decimal('-Infinity'), Decimal('0'))
- Decimal('1')
- >>> c.power(Decimal('-Infinity'), Decimal('1'))
- Decimal('-Infinity')
- >>> c.power(Decimal('-Infinity'), Decimal('2'))
- Decimal('Infinity')
- >>> c.power(Decimal('0'), Decimal('0'))
- Decimal('NaN')
-
- >>> c.power(Decimal('3'), Decimal('7'), Decimal('16'))
- Decimal('11')
- >>> c.power(Decimal('-3'), Decimal('7'), Decimal('16'))
- Decimal('-11')
- >>> c.power(Decimal('-3'), Decimal('8'), Decimal('16'))
- Decimal('1')
- >>> c.power(Decimal('3'), Decimal('7'), Decimal('-16'))
- Decimal('11')
- >>> c.power(Decimal('23E12345'), Decimal('67E189'), Decimal('123456789'))
- Decimal('11729830')
- >>> c.power(Decimal('-0'), Decimal('17'), Decimal('1729'))
- Decimal('-0')
- >>> c.power(Decimal('-23'), Decimal('0'), Decimal('65537'))
- Decimal('1')
- >>> ExtendedContext.power(7, 7)
- Decimal('823543')
- >>> ExtendedContext.power(Decimal(7), 7)
- Decimal('823543')
- >>> ExtendedContext.power(7, Decimal(7), 2)
- Decimal('1')
- """
- a = _convert_other(a, raiseit=True)
- r = a.__pow__(b, modulo, context=self)
- if r is NotImplemented:
- raise TypeError("Unable to convert %s to Decimal" % b)
- else:
- return r
-
- def quantize(self, a, b):
- """Returns a value equal to 'a' (rounded), having the exponent of 'b'.
-
- The coefficient of the result is derived from that of the left-hand
- operand. It may be rounded using the current rounding setting (if the
- exponent is being increased), multiplied by a positive power of ten (if
- the exponent is being decreased), or is unchanged (if the exponent is
- already equal to that of the right-hand operand).
-
- Unlike other operations, if the length of the coefficient after the
- quantize operation would be greater than precision then an Invalid
- operation condition is raised. This guarantees that, unless there is
- an error condition, the exponent of the result of a quantize is always
- equal to that of the right-hand operand.
-
- Also unlike other operations, quantize will never raise Underflow, even
- if the result is subnormal and inexact.
-
- >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('0.001'))
- Decimal('2.170')
- >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('0.01'))
- Decimal('2.17')
- >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('0.1'))
- Decimal('2.2')
- >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('1e+0'))
- Decimal('2')
- >>> ExtendedContext.quantize(Decimal('2.17'), Decimal('1e+1'))
- Decimal('0E+1')
- >>> ExtendedContext.quantize(Decimal('-Inf'), Decimal('Infinity'))
- Decimal('-Infinity')
- >>> ExtendedContext.quantize(Decimal('2'), Decimal('Infinity'))
- Decimal('NaN')
- >>> ExtendedContext.quantize(Decimal('-0.1'), Decimal('1'))
- Decimal('-0')
- >>> ExtendedContext.quantize(Decimal('-0'), Decimal('1e+5'))
- Decimal('-0E+5')
- >>> ExtendedContext.quantize(Decimal('+35236450.6'), Decimal('1e-2'))
- Decimal('NaN')
- >>> ExtendedContext.quantize(Decimal('-35236450.6'), Decimal('1e-2'))
- Decimal('NaN')
- >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e-1'))
- Decimal('217.0')
- >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e-0'))
- Decimal('217')
- >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e+1'))
- Decimal('2.2E+2')
- >>> ExtendedContext.quantize(Decimal('217'), Decimal('1e+2'))
- Decimal('2E+2')
- >>> ExtendedContext.quantize(1, 2)
- Decimal('1')
- >>> ExtendedContext.quantize(Decimal(1), 2)
- Decimal('1')
- >>> ExtendedContext.quantize(1, Decimal(2))
- Decimal('1')
- """
- a = _convert_other(a, raiseit=True)
- return a.quantize(b, context=self)
-
- def radix(self):
- """Just returns 10, as this is Decimal, :)
-
- >>> ExtendedContext.radix()
- Decimal('10')
- """
- return Decimal(10)
-
- def remainder(self, a, b):
- """Returns the remainder from integer division.
-
- The result is the residue of the dividend after the operation of
- calculating integer division as described for divide-integer, rounded
- to precision digits if necessary. The sign of the result, if
- non-zero, is the same as that of the original dividend.
-
- This operation will fail under the same conditions as integer division
- (that is, if integer division on the same two operands would fail, the
- remainder cannot be calculated).
-
- >>> ExtendedContext.remainder(Decimal('2.1'), Decimal('3'))
- Decimal('2.1')
- >>> ExtendedContext.remainder(Decimal('10'), Decimal('3'))
- Decimal('1')
- >>> ExtendedContext.remainder(Decimal('-10'), Decimal('3'))
- Decimal('-1')
- >>> ExtendedContext.remainder(Decimal('10.2'), Decimal('1'))
- Decimal('0.2')
- >>> ExtendedContext.remainder(Decimal('10'), Decimal('0.3'))
- Decimal('0.1')
- >>> ExtendedContext.remainder(Decimal('3.6'), Decimal('1.3'))
- Decimal('1.0')
- >>> ExtendedContext.remainder(22, 6)
- Decimal('4')
- >>> ExtendedContext.remainder(Decimal(22), 6)
- Decimal('4')
- >>> ExtendedContext.remainder(22, Decimal(6))
- Decimal('4')
- """
- a = _convert_other(a, raiseit=True)
- r = a.__mod__(b, context=self)
- if r is NotImplemented:
- raise TypeError("Unable to convert %s to Decimal" % b)
- else:
- return r
-
- def remainder_near(self, a, b):
- """Returns to be "a - b * n", where n is the integer nearest the exact
- value of "x / b" (if two integers are equally near then the even one
- is chosen). If the result is equal to 0 then its sign will be the
- sign of a.
-
- This operation will fail under the same conditions as integer division
- (that is, if integer division on the same two operands would fail, the
- remainder cannot be calculated).
-
- >>> ExtendedContext.remainder_near(Decimal('2.1'), Decimal('3'))
- Decimal('-0.9')
- >>> ExtendedContext.remainder_near(Decimal('10'), Decimal('6'))
- Decimal('-2')
- >>> ExtendedContext.remainder_near(Decimal('10'), Decimal('3'))
- Decimal('1')
- >>> ExtendedContext.remainder_near(Decimal('-10'), Decimal('3'))
- Decimal('-1')
- >>> ExtendedContext.remainder_near(Decimal('10.2'), Decimal('1'))
- Decimal('0.2')
- >>> ExtendedContext.remainder_near(Decimal('10'), Decimal('0.3'))
- Decimal('0.1')
- >>> ExtendedContext.remainder_near(Decimal('3.6'), Decimal('1.3'))
- Decimal('-0.3')
- >>> ExtendedContext.remainder_near(3, 11)
- Decimal('3')
- >>> ExtendedContext.remainder_near(Decimal(3), 11)
- Decimal('3')
- >>> ExtendedContext.remainder_near(3, Decimal(11))
- Decimal('3')
- """
- a = _convert_other(a, raiseit=True)
- return a.remainder_near(b, context=self)
-
- def rotate(self, a, b):
- """Returns a rotated copy of a, b times.
-
- The coefficient of the result is a rotated copy of the digits in
- the coefficient of the first operand. The number of places of
- rotation is taken from the absolute value of the second operand,
- with the rotation being to the left if the second operand is
- positive or to the right otherwise.
-
- >>> ExtendedContext.rotate(Decimal('34'), Decimal('8'))
- Decimal('400000003')
- >>> ExtendedContext.rotate(Decimal('12'), Decimal('9'))
- Decimal('12')
- >>> ExtendedContext.rotate(Decimal('123456789'), Decimal('-2'))
- Decimal('891234567')
- >>> ExtendedContext.rotate(Decimal('123456789'), Decimal('0'))
- Decimal('123456789')
- >>> ExtendedContext.rotate(Decimal('123456789'), Decimal('+2'))
- Decimal('345678912')
- >>> ExtendedContext.rotate(1333333, 1)
- Decimal('13333330')
- >>> ExtendedContext.rotate(Decimal(1333333), 1)
- Decimal('13333330')
- >>> ExtendedContext.rotate(1333333, Decimal(1))
- Decimal('13333330')
- """
- a = _convert_other(a, raiseit=True)
- return a.rotate(b, context=self)
-
- def same_quantum(self, a, b):
- """Returns True if the two operands have the same exponent.
-
- The result is never affected by either the sign or the coefficient of
- either operand.
-
- >>> ExtendedContext.same_quantum(Decimal('2.17'), Decimal('0.001'))
- False
- >>> ExtendedContext.same_quantum(Decimal('2.17'), Decimal('0.01'))
- True
- >>> ExtendedContext.same_quantum(Decimal('2.17'), Decimal('1'))
- False
- >>> ExtendedContext.same_quantum(Decimal('Inf'), Decimal('-Inf'))
- True
- >>> ExtendedContext.same_quantum(10000, -1)
- True
- >>> ExtendedContext.same_quantum(Decimal(10000), -1)
- True
- >>> ExtendedContext.same_quantum(10000, Decimal(-1))
- True
- """
- a = _convert_other(a, raiseit=True)
- return a.same_quantum(b)
-
- def scaleb (self, a, b):
- """Returns the first operand after adding the second value its exp.
-
- >>> ExtendedContext.scaleb(Decimal('7.50'), Decimal('-2'))
- Decimal('0.0750')
- >>> ExtendedContext.scaleb(Decimal('7.50'), Decimal('0'))
- Decimal('7.50')
- >>> ExtendedContext.scaleb(Decimal('7.50'), Decimal('3'))
- Decimal('7.50E+3')
- >>> ExtendedContext.scaleb(1, 4)
- Decimal('1E+4')
- >>> ExtendedContext.scaleb(Decimal(1), 4)
- Decimal('1E+4')
- >>> ExtendedContext.scaleb(1, Decimal(4))
- Decimal('1E+4')
- """
- a = _convert_other(a, raiseit=True)
- return a.scaleb(b, context=self)
-
- def shift(self, a, b):
- """Returns a shifted copy of a, b times.
-
- The coefficient of the result is a shifted copy of the digits
- in the coefficient of the first operand. The number of places
- to shift is taken from the absolute value of the second operand,
- with the shift being to the left if the second operand is
- positive or to the right otherwise. Digits shifted into the
- coefficient are zeros.
-
- >>> ExtendedContext.shift(Decimal('34'), Decimal('8'))
- Decimal('400000000')
- >>> ExtendedContext.shift(Decimal('12'), Decimal('9'))
- Decimal('0')
- >>> ExtendedContext.shift(Decimal('123456789'), Decimal('-2'))
- Decimal('1234567')
- >>> ExtendedContext.shift(Decimal('123456789'), Decimal('0'))
- Decimal('123456789')
- >>> ExtendedContext.shift(Decimal('123456789'), Decimal('+2'))
- Decimal('345678900')
- >>> ExtendedContext.shift(88888888, 2)
- Decimal('888888800')
- >>> ExtendedContext.shift(Decimal(88888888), 2)
- Decimal('888888800')
- >>> ExtendedContext.shift(88888888, Decimal(2))
- Decimal('888888800')
- """
- a = _convert_other(a, raiseit=True)
- return a.shift(b, context=self)
-
- def sqrt(self, a):
- """Square root of a non-negative number to context precision.
-
- If the result must be inexact, it is rounded using the round-half-even
- algorithm.
-
- >>> ExtendedContext.sqrt(Decimal('0'))
- Decimal('0')
- >>> ExtendedContext.sqrt(Decimal('-0'))
- Decimal('-0')
- >>> ExtendedContext.sqrt(Decimal('0.39'))
- Decimal('0.624499800')
- >>> ExtendedContext.sqrt(Decimal('100'))
- Decimal('10')
- >>> ExtendedContext.sqrt(Decimal('1'))
- Decimal('1')
- >>> ExtendedContext.sqrt(Decimal('1.0'))
- Decimal('1.0')
- >>> ExtendedContext.sqrt(Decimal('1.00'))
- Decimal('1.0')
- >>> ExtendedContext.sqrt(Decimal('7'))
- Decimal('2.64575131')
- >>> ExtendedContext.sqrt(Decimal('10'))
- Decimal('3.16227766')
- >>> ExtendedContext.sqrt(2)
- Decimal('1.41421356')
- >>> ExtendedContext.prec
- 9
- """
- a = _convert_other(a, raiseit=True)
- return a.sqrt(context=self)
-
- def subtract(self, a, b):
- """Return the difference between the two operands.
-
- >>> ExtendedContext.subtract(Decimal('1.3'), Decimal('1.07'))
- Decimal('0.23')
- >>> ExtendedContext.subtract(Decimal('1.3'), Decimal('1.30'))
- Decimal('0.00')
- >>> ExtendedContext.subtract(Decimal('1.3'), Decimal('2.07'))
- Decimal('-0.77')
- >>> ExtendedContext.subtract(8, 5)
- Decimal('3')
- >>> ExtendedContext.subtract(Decimal(8), 5)
- Decimal('3')
- >>> ExtendedContext.subtract(8, Decimal(5))
- Decimal('3')
- """
- a = _convert_other(a, raiseit=True)
- r = a.__sub__(b, context=self)
- if r is NotImplemented:
- raise TypeError("Unable to convert %s to Decimal" % b)
- else:
- return r
-
- def to_eng_string(self, a):
- """Converts a number to a string, using scientific notation.
-
- The operation is not affected by the context.
- """
- a = _convert_other(a, raiseit=True)
- return a.to_eng_string(context=self)
-
- def to_sci_string(self, a):
- """Converts a number to a string, using scientific notation.
-
- The operation is not affected by the context.
- """
- a = _convert_other(a, raiseit=True)
- return a.__str__(context=self)
-
- def to_integral_exact(self, a):
- """Rounds to an integer.
-
- When the operand has a negative exponent, the result is the same
- as using the quantize() operation using the given operand as the
- left-hand-operand, 1E+0 as the right-hand-operand, and the precision
- of the operand as the precision setting; Inexact and Rounded flags
- are allowed in this operation. The rounding mode is taken from the
- context.
-
- >>> ExtendedContext.to_integral_exact(Decimal('2.1'))
- Decimal('2')
- >>> ExtendedContext.to_integral_exact(Decimal('100'))
- Decimal('100')
- >>> ExtendedContext.to_integral_exact(Decimal('100.0'))
- Decimal('100')
- >>> ExtendedContext.to_integral_exact(Decimal('101.5'))
- Decimal('102')
- >>> ExtendedContext.to_integral_exact(Decimal('-101.5'))
- Decimal('-102')
- >>> ExtendedContext.to_integral_exact(Decimal('10E+5'))
- Decimal('1.0E+6')
- >>> ExtendedContext.to_integral_exact(Decimal('7.89E+77'))
- Decimal('7.89E+77')
- >>> ExtendedContext.to_integral_exact(Decimal('-Inf'))
- Decimal('-Infinity')
- """
- a = _convert_other(a, raiseit=True)
- return a.to_integral_exact(context=self)
-
- def to_integral_value(self, a):
- """Rounds to an integer.
-
- When the operand has a negative exponent, the result is the same
- as using the quantize() operation using the given operand as the
- left-hand-operand, 1E+0 as the right-hand-operand, and the precision
- of the operand as the precision setting, except that no flags will
- be set. The rounding mode is taken from the context.
-
- >>> ExtendedContext.to_integral_value(Decimal('2.1'))
- Decimal('2')
- >>> ExtendedContext.to_integral_value(Decimal('100'))
- Decimal('100')
- >>> ExtendedContext.to_integral_value(Decimal('100.0'))
- Decimal('100')
- >>> ExtendedContext.to_integral_value(Decimal('101.5'))
- Decimal('102')
- >>> ExtendedContext.to_integral_value(Decimal('-101.5'))
- Decimal('-102')
- >>> ExtendedContext.to_integral_value(Decimal('10E+5'))
- Decimal('1.0E+6')
- >>> ExtendedContext.to_integral_value(Decimal('7.89E+77'))
- Decimal('7.89E+77')
- >>> ExtendedContext.to_integral_value(Decimal('-Inf'))
- Decimal('-Infinity')
- """
- a = _convert_other(a, raiseit=True)
- return a.to_integral_value(context=self)
-
- # the method name changed, but we provide also the old one, for compatibility
- to_integral = to_integral_value
-
-class _WorkRep(object):
- __slots__ = ('sign','int','exp')
- # sign: 0 or 1
- # int: int
- # exp: None, int, or string
-
- def __init__(self, value=None):
- if value is None:
- self.sign = None
- self.int = 0
- self.exp = None
- elif isinstance(value, Decimal):
- self.sign = value._sign
- self.int = int(value._int)
- self.exp = value._exp
- else:
- # assert isinstance(value, tuple)
- self.sign = value[0]
- self.int = value[1]
- self.exp = value[2]
-
- def __repr__(self):
- return "(%r, %r, %r)" % (self.sign, self.int, self.exp)
-
- __str__ = __repr__
-
-
-
-def _normalize(op1, op2, prec = 0):
- """Normalizes op1, op2 to have the same exp and length of coefficient.
-
- Done during addition.
- """
- if op1.exp < op2.exp:
- tmp = op2
- other = op1
- else:
- tmp = op1
- other = op2
-
- # Let exp = min(tmp.exp - 1, tmp.adjusted() - precision - 1).
- # Then adding 10**exp to tmp has the same effect (after rounding)
- # as adding any positive quantity smaller than 10**exp; similarly
- # for subtraction. So if other is smaller than 10**exp we replace
- # it with 10**exp. This avoids tmp.exp - other.exp getting too large.
- tmp_len = len(str(tmp.int))
- other_len = len(str(other.int))
- exp = tmp.exp + min(-1, tmp_len - prec - 2)
- if other_len + other.exp - 1 < exp:
- other.int = 1
- other.exp = exp
-
- tmp.int *= 10 ** (tmp.exp - other.exp)
- tmp.exp = other.exp
- return op1, op2
-
-##### Integer arithmetic functions used by ln, log10, exp and __pow__ #####
-
-_nbits = int.bit_length
-
-def _decimal_lshift_exact(n, e):
- """ Given integers n and e, return n * 10**e if it's an integer, else None.
-
- The computation is designed to avoid computing large powers of 10
- unnecessarily.
-
- >>> _decimal_lshift_exact(3, 4)
- 30000
- >>> _decimal_lshift_exact(300, -999999999) # returns None
-
- """
- if n == 0:
- return 0
- elif e >= 0:
- return n * 10**e
- else:
- # val_n = largest power of 10 dividing n.
- str_n = str(abs(n))
- val_n = len(str_n) - len(str_n.rstrip('0'))
- return None if val_n < -e else n // 10**-e
-
-def _sqrt_nearest(n, a):
- """Closest integer to the square root of the positive integer n. a is
- an initial approximation to the square root. Any positive integer
- will do for a, but the closer a is to the square root of n the
- faster convergence will be.
-
- """
- if n <= 0 or a <= 0:
- raise ValueError("Both arguments to _sqrt_nearest should be positive.")
-
- b=0
- while a != b:
- b, a = a, a--n//a>>1
- return a
-
-def _rshift_nearest(x, shift):
- """Given an integer x and a nonnegative integer shift, return closest
- integer to x / 2**shift; use round-to-even in case of a tie.
-
- """
- b, q = 1 << shift, x >> shift
- return q + (2*(x & (b-1)) + (q&1) > b)
-
-def _div_nearest(a, b):
- """Closest integer to a/b, a and b positive integers; rounds to even
- in the case of a tie.
-
- """
- q, r = divmod(a, b)
- return q + (2*r + (q&1) > b)
-
-def _ilog(x, M, L = 8):
- """Integer approximation to M*log(x/M), with absolute error boundable
- in terms only of x/M.
-
- Given positive integers x and M, return an integer approximation to
- M * log(x/M). For L = 8 and 0.1 <= x/M <= 10 the difference
- between the approximation and the exact result is at most 22. For
- L = 8 and 1.0 <= x/M <= 10.0 the difference is at most 15. In
- both cases these are upper bounds on the error; it will usually be
- much smaller."""
-
- # The basic algorithm is the following: let log1p be the function
- # log1p(x) = log(1+x). Then log(x/M) = log1p((x-M)/M). We use
- # the reduction
- #
- # log1p(y) = 2*log1p(y/(1+sqrt(1+y)))
- #
- # repeatedly until the argument to log1p is small (< 2**-L in
- # absolute value). For small y we can use the Taylor series
- # expansion
- #
- # log1p(y) ~ y - y**2/2 + y**3/3 - ... - (-y)**T/T
- #
- # truncating at T such that y**T is small enough. The whole
- # computation is carried out in a form of fixed-point arithmetic,
- # with a real number z being represented by an integer
- # approximation to z*M. To avoid loss of precision, the y below
- # is actually an integer approximation to 2**R*y*M, where R is the
- # number of reductions performed so far.
-
- y = x-M
- # argument reduction; R = number of reductions performed
- R = 0
- while (R <= L and abs(y) << L-R >= M or
- R > L and abs(y) >> R-L >= M):
- y = _div_nearest((M*y) << 1,
- M + _sqrt_nearest(M*(M+_rshift_nearest(y, R)), M))
- R += 1
-
- # Taylor series with T terms
- T = -int(-10*len(str(M))//(3*L))
- yshift = _rshift_nearest(y, R)
- w = _div_nearest(M, T)
- for k in range(T-1, 0, -1):
- w = _div_nearest(M, k) - _div_nearest(yshift*w, M)
-
- return _div_nearest(w*y, M)
-
-def _dlog10(c, e, p):
- """Given integers c, e and p with c > 0, p >= 0, compute an integer
- approximation to 10**p * log10(c*10**e), with an absolute error of
- at most 1. Assumes that c*10**e is not exactly 1."""
-
- # increase precision by 2; compensate for this by dividing
- # final result by 100
- p += 2
-
- # write c*10**e as d*10**f with either:
- # f >= 0 and 1 <= d <= 10, or
- # f <= 0 and 0.1 <= d <= 1.
- # Thus for c*10**e close to 1, f = 0
- l = len(str(c))
- f = e+l - (e+l >= 1)
-
- if p > 0:
- M = 10**p
- k = e+p-f
- if k >= 0:
- c *= 10**k
- else:
- c = _div_nearest(c, 10**-k)
-
- log_d = _ilog(c, M) # error < 5 + 22 = 27
- log_10 = _log10_digits(p) # error < 1
- log_d = _div_nearest(log_d*M, log_10)
- log_tenpower = f*M # exact
- else:
- log_d = 0 # error < 2.31
- log_tenpower = _div_nearest(f, 10**-p) # error < 0.5
-
- return _div_nearest(log_tenpower+log_d, 100)
-
-def _dlog(c, e, p):
- """Given integers c, e and p with c > 0, compute an integer
- approximation to 10**p * log(c*10**e), with an absolute error of
- at most 1. Assumes that c*10**e is not exactly 1."""
-
- # Increase precision by 2. The precision increase is compensated
- # for at the end with a division by 100.
- p += 2
-
- # rewrite c*10**e as d*10**f with either f >= 0 and 1 <= d <= 10,
- # or f <= 0 and 0.1 <= d <= 1. Then we can compute 10**p * log(c*10**e)
- # as 10**p * log(d) + 10**p*f * log(10).
- l = len(str(c))
- f = e+l - (e+l >= 1)
-
- # compute approximation to 10**p*log(d), with error < 27
- if p > 0:
- k = e+p-f
- if k >= 0:
- c *= 10**k
- else:
- c = _div_nearest(c, 10**-k) # error of <= 0.5 in c
-
- # _ilog magnifies existing error in c by a factor of at most 10
- log_d = _ilog(c, 10**p) # error < 5 + 22 = 27
- else:
- # p <= 0: just approximate the whole thing by 0; error < 2.31
- log_d = 0
-
- # compute approximation to f*10**p*log(10), with error < 11.
- if f:
- extra = len(str(abs(f)))-1
- if p + extra >= 0:
- # error in f * _log10_digits(p+extra) < |f| * 1 = |f|
- # after division, error < |f|/10**extra + 0.5 < 10 + 0.5 < 11
- f_log_ten = _div_nearest(f*_log10_digits(p+extra), 10**extra)
- else:
- f_log_ten = 0
- else:
- f_log_ten = 0
-
- # error in sum < 11+27 = 38; error after division < 0.38 + 0.5 < 1
- return _div_nearest(f_log_ten + log_d, 100)
-
-class _Log10Memoize(object):
- """Class to compute, store, and allow retrieval of, digits of the
- constant log(10) = 2.302585.... This constant is needed by
- Decimal.ln, Decimal.log10, Decimal.exp and Decimal.__pow__."""
- def __init__(self):
- self.digits = "23025850929940456840179914546843642076011014886"
-
- def getdigits(self, p):
- """Given an integer p >= 0, return floor(10**p)*log(10).
-
- For example, self.getdigits(3) returns 2302.
- """
- # digits are stored as a string, for quick conversion to
- # integer in the case that we've already computed enough
- # digits; the stored digits should always be correct
- # (truncated, not rounded to nearest).
- if p < 0:
- raise ValueError("p should be nonnegative")
-
- if p >= len(self.digits):
- # compute p+3, p+6, p+9, ... digits; continue until at
- # least one of the extra digits is nonzero
- extra = 3
- while True:
- # compute p+extra digits, correct to within 1ulp
- M = 10**(p+extra+2)
- digits = str(_div_nearest(_ilog(10*M, M), 100))
- if digits[-extra:] != '0'*extra:
- break
- extra += 3
- # keep all reliable digits so far; remove trailing zeros
- # and next nonzero digit
- self.digits = digits.rstrip('0')[:-1]
- return int(self.digits[:p+1])
-
-_log10_digits = _Log10Memoize().getdigits
-
-def _iexp(x, M, L=8):
- """Given integers x and M, M > 0, such that x/M is small in absolute
- value, compute an integer approximation to M*exp(x/M). For 0 <=
- x/M <= 2.4, the absolute error in the result is bounded by 60 (and
- is usually much smaller)."""
-
- # Algorithm: to compute exp(z) for a real number z, first divide z
- # by a suitable power R of 2 so that |z/2**R| < 2**-L. Then
- # compute expm1(z/2**R) = exp(z/2**R) - 1 using the usual Taylor
- # series
- #
- # expm1(x) = x + x**2/2! + x**3/3! + ...
- #
- # Now use the identity
- #
- # expm1(2x) = expm1(x)*(expm1(x)+2)
- #
- # R times to compute the sequence expm1(z/2**R),
- # expm1(z/2**(R-1)), ... , exp(z/2), exp(z).
-
- # Find R such that x/2**R/M <= 2**-L
- R = _nbits((x<<L)//M)
-
- # Taylor series. (2**L)**T > M
- T = -int(-10*len(str(M))//(3*L))
- y = _div_nearest(x, T)
- Mshift = M<<R
- for i in range(T-1, 0, -1):
- y = _div_nearest(x*(Mshift + y), Mshift * i)
-
- # Expansion
- for k in range(R-1, -1, -1):
- Mshift = M<<(k+2)
- y = _div_nearest(y*(y+Mshift), Mshift)
-
- return M+y
-
-def _dexp(c, e, p):
- """Compute an approximation to exp(c*10**e), with p decimal places of
- precision.
-
- Returns integers d, f such that:
-
- 10**(p-1) <= d <= 10**p, and
- (d-1)*10**f < exp(c*10**e) < (d+1)*10**f
-
- In other words, d*10**f is an approximation to exp(c*10**e) with p
- digits of precision, and with an error in d of at most 1. This is
- almost, but not quite, the same as the error being < 1ulp: when d
- = 10**(p-1) the error could be up to 10 ulp."""
-
- # we'll call iexp with M = 10**(p+2), giving p+3 digits of precision
- p += 2
-
- # compute log(10) with extra precision = adjusted exponent of c*10**e
- extra = max(0, e + len(str(c)) - 1)
- q = p + extra
-
- # compute quotient c*10**e/(log(10)) = c*10**(e+q)/(log(10)*10**q),
- # rounding down
- shift = e+q
- if shift >= 0:
- cshift = c*10**shift
- else:
- cshift = c//10**-shift
- quot, rem = divmod(cshift, _log10_digits(q))
-
- # reduce remainder back to original precision
- rem = _div_nearest(rem, 10**extra)
-
- # error in result of _iexp < 120; error after division < 0.62
- return _div_nearest(_iexp(rem, 10**p), 1000), quot - p + 3
-
-def _dpower(xc, xe, yc, ye, p):
- """Given integers xc, xe, yc and ye representing Decimals x = xc*10**xe and
- y = yc*10**ye, compute x**y. Returns a pair of integers (c, e) such that:
-
- 10**(p-1) <= c <= 10**p, and
- (c-1)*10**e < x**y < (c+1)*10**e
-
- in other words, c*10**e is an approximation to x**y with p digits
- of precision, and with an error in c of at most 1. (This is
- almost, but not quite, the same as the error being < 1ulp: when c
- == 10**(p-1) we can only guarantee error < 10ulp.)
-
- We assume that: x is positive and not equal to 1, and y is nonzero.
- """
-
- # Find b such that 10**(b-1) <= |y| <= 10**b
- b = len(str(abs(yc))) + ye
-
- # log(x) = lxc*10**(-p-b-1), to p+b+1 places after the decimal point
- lxc = _dlog(xc, xe, p+b+1)
-
- # compute product y*log(x) = yc*lxc*10**(-p-b-1+ye) = pc*10**(-p-1)
- shift = ye-b
- if shift >= 0:
- pc = lxc*yc*10**shift
- else:
- pc = _div_nearest(lxc*yc, 10**-shift)
-
- if pc == 0:
- # we prefer a result that isn't exactly 1; this makes it
- # easier to compute a correctly rounded result in __pow__
- if ((len(str(xc)) + xe >= 1) == (yc > 0)): # if x**y > 1:
- coeff, exp = 10**(p-1)+1, 1-p
- else:
- coeff, exp = 10**p-1, -p
- else:
- coeff, exp = _dexp(pc, -(p+1), p+1)
- coeff = _div_nearest(coeff, 10)
- exp += 1
-
- return coeff, exp
-
-def _log10_lb(c, correction = {
- '1': 100, '2': 70, '3': 53, '4': 40, '5': 31,
- '6': 23, '7': 16, '8': 10, '9': 5}):
- """Compute a lower bound for 100*log10(c) for a positive integer c."""
- if c <= 0:
- raise ValueError("The argument to _log10_lb should be nonnegative.")
- str_c = str(c)
- return 100*len(str_c) - correction[str_c[0]]
-
-##### Helper Functions ####################################################
-
-def _convert_other(other, raiseit=False, allow_float=False):
- """Convert other to Decimal.
-
- Verifies that it's ok to use in an implicit construction.
- If allow_float is true, allow conversion from float; this
- is used in the comparison methods (__eq__ and friends).
-
- """
- if isinstance(other, Decimal):
- return other
- if isinstance(other, int):
- return Decimal(other)
- if allow_float and isinstance(other, float):
- return Decimal.from_float(other)
-
- if raiseit:
- raise TypeError("Unable to convert %s to Decimal" % other)
- return NotImplemented
-
-def _convert_for_comparison(self, other, equality_op=False):
- """Given a Decimal instance self and a Python object other, return
- a pair (s, o) of Decimal instances such that "s op o" is
- equivalent to "self op other" for any of the 6 comparison
- operators "op".
-
- """
- if isinstance(other, Decimal):
- return self, other
-
- # Comparison with a Rational instance (also includes integers):
- # self op n/d <=> self*d op n (for n and d integers, d positive).
- # A NaN or infinity can be left unchanged without affecting the
- # comparison result.
- if isinstance(other, _numbers.Rational):
- if not self._is_special:
- self = _dec_from_triple(self._sign,
- str(int(self._int) * other.denominator),
- self._exp)
- return self, Decimal(other.numerator)
-
- # Comparisons with float and complex types. == and != comparisons
- # with complex numbers should succeed, returning either True or False
- # as appropriate. Other comparisons return NotImplemented.
- if equality_op and isinstance(other, _numbers.Complex) and other.imag == 0:
- other = other.real
- if isinstance(other, float):
- context = getcontext()
- if equality_op:
- context.flags[FloatOperation] = 1
- else:
- context._raise_error(FloatOperation,
- "strict semantics for mixing floats and Decimals are enabled")
- return self, Decimal.from_float(other)
- return NotImplemented, NotImplemented
-
-
-##### Setup Specific Contexts ############################################
-
-# The default context prototype used by Context()
-# Is mutable, so that new contexts can have different default values
-
-DefaultContext = Context(
- prec=28, rounding=ROUND_HALF_EVEN,
- traps=[DivisionByZero, Overflow, InvalidOperation],
- flags=[],
- Emax=999999,
- Emin=-999999,
- capitals=1,
- clamp=0
-)
-
-# Pre-made alternate contexts offered by the specification
-# Don't change these; the user should be able to select these
-# contexts and be able to reproduce results from other implementations
-# of the spec.
-
-BasicContext = Context(
- prec=9, rounding=ROUND_HALF_UP,
- traps=[DivisionByZero, Overflow, InvalidOperation, Clamped, Underflow],
- flags=[],
-)
-
-ExtendedContext = Context(
- prec=9, rounding=ROUND_HALF_EVEN,
- traps=[],
- flags=[],
-)
-
-
-##### crud for parsing strings #############################################
-#
-# Regular expression used for parsing numeric strings. Additional
-# comments:
-#
-# 1. Uncomment the two '\s*' lines to allow leading and/or trailing
-# whitespace. But note that the specification disallows whitespace in
-# a numeric string.
-#
-# 2. For finite numbers (not infinities and NaNs) the body of the
-# number between the optional sign and the optional exponent must have
-# at least one decimal digit, possibly after the decimal point. The
-# lookahead expression '(?=\d|\.\d)' checks this.
-
-import re
-_parser = re.compile(r""" # A numeric string consists of:
-# \s*
- (?P<sign>[-+])? # an optional sign, followed by either...
- (
- (?=\d|\.\d) # ...a number (with at least one digit)
- (?P<int>\d*) # having a (possibly empty) integer part
- (\.(?P<frac>\d*))? # followed by an optional fractional part
- (E(?P<exp>[-+]?\d+))? # followed by an optional exponent, or...
- |
- Inf(inity)? # ...an infinity, or...
- |
- (?P<signal>s)? # ...an (optionally signaling)
- NaN # NaN
- (?P<diag>\d*) # with (possibly empty) diagnostic info.
- )
-# \s*
- \Z
-""", re.VERBOSE | re.IGNORECASE).match
-
-_all_zeros = re.compile('0*$').match
-_exact_half = re.compile('50*$').match
-
-##### PEP3101 support functions ##############################################
-# The functions in this section have little to do with the Decimal
-# class, and could potentially be reused or adapted for other pure
-# Python numeric classes that want to implement __format__
-#
-# A format specifier for Decimal looks like:
-#
-# [[fill]align][sign][#][0][minimumwidth][,][.precision][type]
-
-_parse_format_specifier_regex = re.compile(r"""\A
-(?:
- (?P<fill>.)?
- (?P<align>[<>=^])
-)?
-(?P<sign>[-+ ])?
-(?P<alt>\#)?
-(?P<zeropad>0)?
-(?P<minimumwidth>(?!0)\d+)?
-(?P<thousands_sep>,)?
-(?:\.(?P<precision>0|(?!0)\d+))?
-(?P<type>[eEfFgGn%])?
-\Z
-""", re.VERBOSE|re.DOTALL)
-
-del re
-
-# The locale module is only needed for the 'n' format specifier. The
-# rest of the PEP 3101 code functions quite happily without it, so we
-# don't care too much if locale isn't present.
-try:
- import locale as _locale
-except ImportError:
- pass
-
-def _parse_format_specifier(format_spec, _localeconv=None):
- """Parse and validate a format specifier.
-
- Turns a standard numeric format specifier into a dict, with the
- following entries:
-
- fill: fill character to pad field to minimum width
- align: alignment type, either '<', '>', '=' or '^'
- sign: either '+', '-' or ' '
- minimumwidth: nonnegative integer giving minimum width
- zeropad: boolean, indicating whether to pad with zeros
- thousands_sep: string to use as thousands separator, or ''
- grouping: grouping for thousands separators, in format
- used by localeconv
- decimal_point: string to use for decimal point
- precision: nonnegative integer giving precision, or None
- type: one of the characters 'eEfFgG%', or None
-
- """
- m = _parse_format_specifier_regex.match(format_spec)
- if m is None:
- raise ValueError("Invalid format specifier: " + format_spec)
-
- # get the dictionary
- format_dict = m.groupdict()
-
- # zeropad; defaults for fill and alignment. If zero padding
- # is requested, the fill and align fields should be absent.
- fill = format_dict['fill']
- align = format_dict['align']
- format_dict['zeropad'] = (format_dict['zeropad'] is not None)
- if format_dict['zeropad']:
- if fill is not None:
- raise ValueError("Fill character conflicts with '0'"
- " in format specifier: " + format_spec)
- if align is not None:
- raise ValueError("Alignment conflicts with '0' in "
- "format specifier: " + format_spec)
- format_dict['fill'] = fill or ' '
- # PEP 3101 originally specified that the default alignment should
- # be left; it was later agreed that right-aligned makes more sense
- # for numeric types. See http://bugs.python.org/issue6857.
- format_dict['align'] = align or '>'
-
- # default sign handling: '-' for negative, '' for positive
- if format_dict['sign'] is None:
- format_dict['sign'] = '-'
-
- # minimumwidth defaults to 0; precision remains None if not given
- format_dict['minimumwidth'] = int(format_dict['minimumwidth'] or '0')
- if format_dict['precision'] is not None:
- format_dict['precision'] = int(format_dict['precision'])
-
- # if format type is 'g' or 'G' then a precision of 0 makes little
- # sense; convert it to 1. Same if format type is unspecified.
- if format_dict['precision'] == 0:
- if format_dict['type'] is None or format_dict['type'] in 'gGn':
- format_dict['precision'] = 1
-
- # determine thousands separator, grouping, and decimal separator, and
- # add appropriate entries to format_dict
- if format_dict['type'] == 'n':
- # apart from separators, 'n' behaves just like 'g'
- format_dict['type'] = 'g'
- if _localeconv is None:
- _localeconv = _locale.localeconv()
- if format_dict['thousands_sep'] is not None:
- raise ValueError("Explicit thousands separator conflicts with "
- "'n' type in format specifier: " + format_spec)
- format_dict['thousands_sep'] = _localeconv['thousands_sep']
- format_dict['grouping'] = _localeconv['grouping']
- format_dict['decimal_point'] = _localeconv['decimal_point']
- else:
- if format_dict['thousands_sep'] is None:
- format_dict['thousands_sep'] = ''
- format_dict['grouping'] = [3, 0]
- format_dict['decimal_point'] = '.'
-
- return format_dict
-
-def _format_align(sign, body, spec):
- """Given an unpadded, non-aligned numeric string 'body' and sign
- string 'sign', add padding and alignment conforming to the given
- format specifier dictionary 'spec' (as produced by
- parse_format_specifier).
-
- """
- # how much extra space do we have to play with?
- minimumwidth = spec['minimumwidth']
- fill = spec['fill']
- padding = fill*(minimumwidth - len(sign) - len(body))
-
- align = spec['align']
- if align == '<':
- result = sign + body + padding
- elif align == '>':
- result = padding + sign + body
- elif align == '=':
- result = sign + padding + body
- elif align == '^':
- half = len(padding)//2
- result = padding[:half] + sign + body + padding[half:]
- else:
- raise ValueError('Unrecognised alignment field')
-
- return result
-
-def _group_lengths(grouping):
- """Convert a localeconv-style grouping into a (possibly infinite)
- iterable of integers representing group lengths.
-
- """
- # The result from localeconv()['grouping'], and the input to this
- # function, should be a list of integers in one of the
- # following three forms:
- #
- # (1) an empty list, or
- # (2) nonempty list of positive integers + [0]
- # (3) list of positive integers + [locale.CHAR_MAX], or
-
- from itertools import chain, repeat
- if not grouping:
- return []
- elif grouping[-1] == 0 and len(grouping) >= 2:
- return chain(grouping[:-1], repeat(grouping[-2]))
- elif grouping[-1] == _locale.CHAR_MAX:
- return grouping[:-1]
- else:
- raise ValueError('unrecognised format for grouping')
-
-def _insert_thousands_sep(digits, spec, min_width=1):
- """Insert thousands separators into a digit string.
-
- spec is a dictionary whose keys should include 'thousands_sep' and
- 'grouping'; typically it's the result of parsing the format
- specifier using _parse_format_specifier.
-
- The min_width keyword argument gives the minimum length of the
- result, which will be padded on the left with zeros if necessary.
-
- If necessary, the zero padding adds an extra '0' on the left to
- avoid a leading thousands separator. For example, inserting
- commas every three digits in '123456', with min_width=8, gives
- '0,123,456', even though that has length 9.
-
- """
-
- sep = spec['thousands_sep']
- grouping = spec['grouping']
-
- groups = []
- for l in _group_lengths(grouping):
- if l <= 0:
- raise ValueError("group length should be positive")
- # max(..., 1) forces at least 1 digit to the left of a separator
- l = min(max(len(digits), min_width, 1), l)
- groups.append('0'*(l - len(digits)) + digits[-l:])
- digits = digits[:-l]
- min_width -= l
- if not digits and min_width <= 0:
- break
- min_width -= len(sep)
- else:
- l = max(len(digits), min_width, 1)
- groups.append('0'*(l - len(digits)) + digits[-l:])
- return sep.join(reversed(groups))
-
-def _format_sign(is_negative, spec):
- """Determine sign character."""
-
- if is_negative:
- return '-'
- elif spec['sign'] in ' +':
- return spec['sign']
- else:
- return ''
-
-def _format_number(is_negative, intpart, fracpart, exp, spec):
- """Format a number, given the following data:
-
- is_negative: true if the number is negative, else false
- intpart: string of digits that must appear before the decimal point
- fracpart: string of digits that must come after the point
- exp: exponent, as an integer
- spec: dictionary resulting from parsing the format specifier
-
- This function uses the information in spec to:
- insert separators (decimal separator and thousands separators)
- format the sign
- format the exponent
- add trailing '%' for the '%' type
- zero-pad if necessary
- fill and align if necessary
- """
-
- sign = _format_sign(is_negative, spec)
-
- if fracpart or spec['alt']:
- fracpart = spec['decimal_point'] + fracpart
-
- if exp != 0 or spec['type'] in 'eE':
- echar = {'E': 'E', 'e': 'e', 'G': 'E', 'g': 'e'}[spec['type']]
- fracpart += "{0}{1:+}".format(echar, exp)
- if spec['type'] == '%':
- fracpart += '%'
-
- if spec['zeropad']:
- min_width = spec['minimumwidth'] - len(fracpart) - len(sign)
- else:
- min_width = 0
- intpart = _insert_thousands_sep(intpart, spec, min_width)
-
- return _format_align(sign, intpart+fracpart, spec)
-
-
-##### Useful Constants (internal use only) ################################
-
-# Reusable defaults
-_Infinity = Decimal('Inf')
-_NegativeInfinity = Decimal('-Inf')
-_NaN = Decimal('NaN')
-_Zero = Decimal(0)
-_One = Decimal(1)
-_NegativeOne = Decimal(-1)
-
-# _SignedInfinity[sign] is infinity w/ that sign
-_SignedInfinity = (_Infinity, _NegativeInfinity)
-
-# Constants related to the hash implementation; hash(x) is based
-# on the reduction of x modulo _PyHASH_MODULUS
-_PyHASH_MODULUS = sys.hash_info.modulus
-# hash values to use for positive and negative infinities, and nans
-_PyHASH_INF = sys.hash_info.inf
-_PyHASH_NAN = sys.hash_info.nan
-
-# _PyHASH_10INV is the inverse of 10 modulo the prime _PyHASH_MODULUS
-_PyHASH_10INV = pow(10, _PyHASH_MODULUS - 2, _PyHASH_MODULUS)
-del sys
try:
- import _decimal
-except ImportError:
- pass
-else:
- s1 = set(dir())
- s2 = set(dir(_decimal))
- for name in s1 - s2:
- del globals()[name]
- del s1, s2, name
from _decimal import *
-
-if __name__ == '__main__':
- import doctest, decimal
- doctest.testmod(decimal)
+ from _decimal import __doc__
+ from _decimal import __version__
+ from _decimal import __libmpdec_version__
+except ImportError:
+ from _pydecimal import *
+ from _pydecimal import __doc__
+ from _pydecimal import __version__
+ from _pydecimal import __libmpdec_version__
diff --git a/Lib/difflib.py b/Lib/difflib.py
index 56d4852a37..076bbac01d 100644
--- a/Lib/difflib.py
+++ b/Lib/difflib.py
@@ -28,9 +28,9 @@ Class HtmlDiff:
__all__ = ['get_close_matches', 'ndiff', 'restore', 'SequenceMatcher',
'Differ','IS_CHARACTER_JUNK', 'IS_LINE_JUNK', 'context_diff',
- 'unified_diff', 'HtmlDiff', 'Match']
+ 'unified_diff', 'diff_bytes', 'HtmlDiff', 'Match']
-import heapq
+from heapq import nlargest as _nlargest
from collections import namedtuple as _namedtuple
Match = _namedtuple('Match', 'a b size')
@@ -729,7 +729,7 @@ def get_close_matches(word, possibilities, n=3, cutoff=0.6):
result.append((s.ratio(), x))
# Move the best scorers to head of list
- result = heapq.nlargest(n, result)
+ result = _nlargest(n, result)
# Strip scores for the best n matches
return [x for score, x in result]
@@ -852,10 +852,9 @@ class Differ:
and return true iff the string is junk. The module-level function
`IS_LINE_JUNK` may be used to filter out lines without visible
characters, except for at most one splat ('#'). It is recommended
- to leave linejunk None; as of Python 2.3, the underlying
- SequenceMatcher class has grown an adaptive notion of "noise" lines
- that's better than any static definition the author has ever been
- able to craft.
+ to leave linejunk None; the underlying SequenceMatcher class has
+ an adaptive notion of "noise" lines that's better than any static
+ definition the author has ever been able to craft.
- `charjunk`: A function that should accept a string of length 1. The
module-level function `IS_CHARACTER_JUNK` may be used to filter out
@@ -1175,6 +1174,7 @@ def unified_diff(a, b, fromfile='', tofile='', fromfiledate='',
four
"""
+ _check_types(a, b, fromfile, tofile, fromfiledate, tofiledate, lineterm)
started = False
for group in SequenceMatcher(None,a,b).get_grouped_opcodes(n):
if not started:
@@ -1262,6 +1262,7 @@ def context_diff(a, b, fromfile='', tofile='',
four
"""
+ _check_types(a, b, fromfile, tofile, fromfiledate, tofiledate, lineterm)
prefix = dict(insert='+ ', delete='- ', replace='! ', equal=' ')
started = False
for group in SequenceMatcher(None,a,b).get_grouped_opcodes(n):
@@ -1293,22 +1294,70 @@ def context_diff(a, b, fromfile='', tofile='',
for line in b[j1:j2]:
yield prefix[tag] + line
+def _check_types(a, b, *args):
+ # Checking types is weird, but the alternative is garbled output when
+ # someone passes mixed bytes and str to {unified,context}_diff(). E.g.
+ # without this check, passing filenames as bytes results in output like
+ # --- b'oldfile.txt'
+ # +++ b'newfile.txt'
+ # because of how str.format() incorporates bytes objects.
+ if a and not isinstance(a[0], str):
+ raise TypeError('lines to compare must be str, not %s (%r)' %
+ (type(a[0]).__name__, a[0]))
+ if b and not isinstance(b[0], str):
+ raise TypeError('lines to compare must be str, not %s (%r)' %
+ (type(b[0]).__name__, b[0]))
+ for arg in args:
+ if not isinstance(arg, str):
+ raise TypeError('all arguments must be str, not: %r' % (arg,))
+
+def diff_bytes(dfunc, a, b, fromfile=b'', tofile=b'',
+ fromfiledate=b'', tofiledate=b'', n=3, lineterm=b'\n'):
+ r"""
+ Compare `a` and `b`, two sequences of lines represented as bytes rather
+ than str. This is a wrapper for `dfunc`, which is typically either
+ unified_diff() or context_diff(). Inputs are losslessly converted to
+ strings so that `dfunc` only has to worry about strings, and encoded
+ back to bytes on return. This is necessary to compare files with
+ unknown or inconsistent encoding. All other inputs (except `n`) must be
+ bytes rather than str.
+ """
+ def decode(s):
+ try:
+ return s.decode('ascii', 'surrogateescape')
+ except AttributeError as err:
+ msg = ('all arguments must be bytes, not %s (%r)' %
+ (type(s).__name__, s))
+ raise TypeError(msg) from err
+ a = list(map(decode, a))
+ b = list(map(decode, b))
+ fromfile = decode(fromfile)
+ tofile = decode(tofile)
+ fromfiledate = decode(fromfiledate)
+ tofiledate = decode(tofiledate)
+ lineterm = decode(lineterm)
+
+ lines = dfunc(a, b, fromfile, tofile, fromfiledate, tofiledate, n, lineterm)
+ for line in lines:
+ yield line.encode('ascii', 'surrogateescape')
+
def ndiff(a, b, linejunk=None, charjunk=IS_CHARACTER_JUNK):
r"""
Compare `a` and `b` (lists of strings); return a `Differ`-style delta.
Optional keyword parameters `linejunk` and `charjunk` are for filter
- functions (or None):
+ functions, or can be None:
- - linejunk: A function that should accept a single string argument, and
+ - linejunk: A function that should accept a single string argument and
return true iff the string is junk. The default is None, and is
- recommended; as of Python 2.3, an adaptive notion of "noise" lines is
- used that does a good job on its own.
+ recommended; the underlying SequenceMatcher class has an adaptive
+ notion of "noise" lines.
- - charjunk: A function that should accept a string of length 1. The
- default is module-level function IS_CHARACTER_JUNK, which filters out
- whitespace characters (a blank or tab; note: bad idea to include newline
- in this!).
+ - charjunk: A function that accepts a character (string of length
+ 1), and returns true iff the character is junk. The default is
+ the module-level function IS_CHARACTER_JUNK, which filters out
+ whitespace characters (a blank or tab; note: it's a bad idea to
+ include newline in this!).
Tools/scripts/ndiff.py is a command-line front-end to this function.
@@ -1410,7 +1459,7 @@ def _mdiff(fromlines, tolines, context=None, linejunk=None,
change_re.sub(record_sub_info,markers)
# process each tuple inserting our special marks that won't be
# noticed by an xml/html escaper.
- for key,(begin,end) in sub_info[::-1]:
+ for key,(begin,end) in reversed(sub_info):
text = text[0:begin]+'\0'+key+text[begin:end]+'\1'+text[end:]
text = text[2:]
# Handle case of add/delete entire line
@@ -1448,10 +1497,7 @@ def _mdiff(fromlines, tolines, context=None, linejunk=None,
# are a concatenation of the first character of each of the 4 lines
# so we can do some very readable comparisons.
while len(lines) < 4:
- try:
- lines.append(next(diff_lines_iterator))
- except StopIteration:
- lines.append('X')
+ lines.append(next(diff_lines_iterator, 'X'))
s = ''.join([line[0] for line in lines])
if s.startswith('X'):
# When no more lines, pump out any remaining blank lines so the
@@ -1514,7 +1560,7 @@ def _mdiff(fromlines, tolines, context=None, linejunk=None,
num_blanks_to_yield -= 1
yield ('','\n'),None,True
if s.startswith('X'):
- raise StopIteration
+ return
else:
yield from_line,to_line,True
@@ -1536,7 +1582,10 @@ def _mdiff(fromlines, tolines, context=None, linejunk=None,
while True:
# Collecting lines of text until we have a from/to pair
while (len(fromlines)==0 or len(tolines)==0):
- from_line, to_line, found_diff = next(line_iterator)
+ try:
+ from_line, to_line, found_diff = next(line_iterator)
+ except StopIteration:
+ return
if from_line is not None:
fromlines.append((from_line,found_diff))
if to_line is not None:
@@ -1550,8 +1599,7 @@ def _mdiff(fromlines, tolines, context=None, linejunk=None,
# them up without doing anything else with them.
line_pair_iterator = _line_pair_iterator()
if context is None:
- while True:
- yield next(line_pair_iterator)
+ yield from line_pair_iterator
# Handle case where user wants context differencing. We must do some
# storage of lines until we know for sure that they are to be yielded.
else:
@@ -1564,7 +1612,10 @@ def _mdiff(fromlines, tolines, context=None, linejunk=None,
index, contextLines = 0, [None]*(context)
found_diff = False
while(found_diff is False):
- from_line, to_line, found_diff = next(line_pair_iterator)
+ try:
+ from_line, to_line, found_diff = next(line_pair_iterator)
+ except StopIteration:
+ return
i = index % context
contextLines[i] = (from_line, to_line, found_diff)
index += 1
@@ -1601,7 +1652,7 @@ _file_template = """
<head>
<meta http-equiv="Content-Type"
- content="text/html; charset=ISO-8859-1" />
+ content="text/html; charset=%(charset)s" />
<title></title>
<style type="text/css">%(styles)s
</style>
@@ -1679,7 +1730,7 @@ class HtmlDiff(object):
tabsize -- tab stop spacing, defaults to 8.
wrapcolumn -- column number where lines are broken and wrapped,
defaults to None where lines are not wrapped.
- linejunk,charjunk -- keyword arguments passed into ndiff() (used to by
+ linejunk,charjunk -- keyword arguments passed into ndiff() (used by
HtmlDiff() to generate the side by side HTML differences). See
ndiff() documentation for argument default values and descriptions.
"""
@@ -1688,8 +1739,8 @@ class HtmlDiff(object):
self._linejunk = linejunk
self._charjunk = charjunk
- def make_file(self,fromlines,tolines,fromdesc='',todesc='',context=False,
- numlines=5):
+ def make_file(self, fromlines, tolines, fromdesc='', todesc='',
+ context=False, numlines=5, *, charset='utf-8'):
"""Returns HTML file of side by side comparison with change highlights
Arguments:
@@ -1704,13 +1755,16 @@ class HtmlDiff(object):
When context is False, controls the number of lines to place
the "next" link anchors before the next change (so click of
"next" link jumps to just before the change).
+ charset -- charset of the HTML document
"""
- return self._file_template % dict(
- styles = self._styles,
- legend = self._legend,
- table = self.make_table(fromlines,tolines,fromdesc,todesc,
- context=context,numlines=numlines))
+ return (self._file_template % dict(
+ styles=self._styles,
+ legend=self._legend,
+ table=self.make_table(fromlines, tolines, fromdesc, todesc,
+ context=context, numlines=numlines),
+ charset=charset
+ )).encode(charset, 'xmlcharrefreplace').decode(charset)
def _tab_newline_replace(self,fromlines,tolines):
"""Returns from/to line lists with tabs expanded and newlines removed.
diff --git a/Lib/dis.py b/Lib/dis.py
index 81cbe7f4f9..f7e3c7f8d7 100644
--- a/Lib/dis.py
+++ b/Lib/dis.py
@@ -13,7 +13,8 @@ __all__ = ["code_info", "dis", "disassemble", "distb", "disco",
"get_instructions", "Instruction", "Bytecode"] + _opcodes_all
del _opcodes_all
-_have_code = (types.MethodType, types.FunctionType, types.CodeType, type)
+_have_code = (types.MethodType, types.FunctionType, types.CodeType,
+ classmethod, staticmethod, type)
def _try_compile(source, name):
"""Attempts to compile the given source, first as an expression and
@@ -29,7 +30,7 @@ def _try_compile(source, name):
return c
def dis(x=None, *, file=None):
- """Disassemble classes, methods, functions, or code.
+ """Disassemble classes, methods, functions, generators, or code.
With no argument, disassemble the last traceback.
@@ -41,6 +42,8 @@ def dis(x=None, *, file=None):
x = x.__func__
if hasattr(x, '__code__'): # Function
x = x.__code__
+ if hasattr(x, 'gi_code'): # Generator
+ x = x.gi_code
if hasattr(x, '__dict__'): # Class or module
items = sorted(x.__dict__.items())
for name, x1 in items:
@@ -82,6 +85,8 @@ COMPILER_FLAG_NAMES = {
16: "NESTED",
32: "GENERATOR",
64: "NOFREE",
+ 128: "COROUTINE",
+ 256: "ITERABLE_COROUTINE",
}
def pretty_flags(flags):
@@ -99,11 +104,13 @@ def pretty_flags(flags):
return ", ".join(names)
def _get_code_object(x):
- """Helper to handle methods, functions, strings and raw code objects"""
+ """Helper to handle methods, functions, generators, strings and raw code objects"""
if hasattr(x, '__func__'): # Method
x = x.__func__
if hasattr(x, '__code__'): # Function
x = x.__code__
+ if hasattr(x, 'gi_code'): # Generator
+ x = x.gi_code
if isinstance(x, str): # Source code
x = _try_compile(x, "<disassembly>")
if hasattr(x, 'co_code'): # Code object
@@ -268,33 +275,19 @@ def _get_instructions_bytes(code, varnames=None, names=None, constants=None,
"""
labels = findlabels(code)
- extended_arg = 0
starts_line = None
free = None
- # enumerate() is not an option, since we sometimes process
- # multiple elements on a single pass through the loop
- n = len(code)
- i = 0
- while i < n:
- op = code[i]
- offset = i
+ for offset, op, arg in _unpack_opargs(code):
if linestarts is not None:
- starts_line = linestarts.get(i, None)
+ starts_line = linestarts.get(offset, None)
if starts_line is not None:
starts_line += line_offset
- is_jump_target = i in labels
- i = i+1
- arg = None
+ is_jump_target = offset in labels
argval = None
argrepr = ''
- if op >= HAVE_ARGUMENT:
- arg = code[i] + code[i+1]*256 + extended_arg
- extended_arg = 0
- i = i+2
- if op == EXTENDED_ARG:
- extended_arg = arg*65536
+ if arg is not None:
# Set argval to the dereferenced value of the argument when
- # availabe, and argrepr to the string representation of argval.
+ # available, and argrepr to the string representation of argval.
# _disassemble_bytes needs the string repr of the
# raw name index for LOAD_GLOBAL, LOAD_CONST, etc.
argval = arg
@@ -303,7 +296,7 @@ def _get_instructions_bytes(code, varnames=None, names=None, constants=None,
elif op in hasname:
argval, argrepr = _get_name_info(arg, names)
elif op in hasjrel:
- argval = i + arg
+ argval = offset + 3 + arg
argrepr = "to " + repr(argval)
elif op in haslocal:
argval, argrepr = _get_name_info(arg, varnames)
@@ -313,7 +306,7 @@ def _get_instructions_bytes(code, varnames=None, names=None, constants=None,
elif op in hasfree:
argval, argrepr = _get_name_info(arg, cells)
elif op in hasnargs:
- argrepr = "%d positional, %d keyword pair" % (code[i-2], code[i-1])
+ argrepr = "%d positional, %d keyword pair" % (arg%256, arg//256)
yield Instruction(opname[op], op,
arg, argval, argrepr,
offset, starts_line, is_jump_target)
@@ -349,26 +342,37 @@ def _disassemble_str(source, *, file=None):
disco = disassemble # XXX For backwards compatibility
-def findlabels(code):
- """Detect all offsets in a byte code which are jump targets.
-
- Return the list of offsets.
-
- """
- labels = []
+def _unpack_opargs(code):
# enumerate() is not an option, since we sometimes process
# multiple elements on a single pass through the loop
+ extended_arg = 0
n = len(code)
i = 0
while i < n:
op = code[i]
+ offset = i
i = i+1
+ arg = None
if op >= HAVE_ARGUMENT:
- arg = code[i] + code[i+1]*256
+ arg = code[i] + code[i+1]*256 + extended_arg
+ extended_arg = 0
i = i+2
+ if op == EXTENDED_ARG:
+ extended_arg = arg*65536
+ yield (offset, op, arg)
+
+def findlabels(code):
+ """Detect all offsets in a byte code which are jump targets.
+
+ Return the list of offsets.
+
+ """
+ labels = []
+ for offset, op, arg in _unpack_opargs(code):
+ if arg is not None:
label = -1
if op in hasjrel:
- label = i+arg
+ label = offset + 3 + arg
elif op in hasjabs:
label = arg
if label >= 0:
diff --git a/Lib/distutils/_msvccompiler.py b/Lib/distutils/_msvccompiler.py
new file mode 100644
index 0000000000..d0ba7d6d1e
--- /dev/null
+++ b/Lib/distutils/_msvccompiler.py
@@ -0,0 +1,535 @@
+"""distutils._msvccompiler
+
+Contains MSVCCompiler, an implementation of the abstract CCompiler class
+for Microsoft Visual Studio 2015.
+
+The module is compatible with VS 2015 and later. You can find legacy support
+for older versions in distutils.msvc9compiler and distutils.msvccompiler.
+"""
+
+# Written by Perry Stoll
+# hacked by Robin Becker and Thomas Heller to do a better job of
+# finding DevStudio (through the registry)
+# ported to VS 2005 and VS 2008 by Christian Heimes
+# ported to VS 2015 by Steve Dower
+
+import os
+import shutil
+import stat
+import subprocess
+
+from distutils.errors import DistutilsExecError, DistutilsPlatformError, \
+ CompileError, LibError, LinkError
+from distutils.ccompiler import CCompiler, gen_lib_options
+from distutils import log
+from distutils.util import get_platform
+
+import winreg
+from itertools import count
+
+def _find_vcvarsall(plat_spec):
+ try:
+ key = winreg.OpenKeyEx(
+ winreg.HKEY_LOCAL_MACHINE,
+ r"Software\Microsoft\VisualStudio\SxS\VC7",
+ access=winreg.KEY_READ | winreg.KEY_WOW64_32KEY
+ )
+ except OSError:
+ log.debug("Visual C++ is not registered")
+ return None, None
+
+ with key:
+ best_version = 0
+ best_dir = None
+ for i in count():
+ try:
+ v, vc_dir, vt = winreg.EnumValue(key, i)
+ except OSError:
+ break
+ if v and vt == winreg.REG_SZ and os.path.isdir(vc_dir):
+ try:
+ version = int(float(v))
+ except (ValueError, TypeError):
+ continue
+ if version >= 14 and version > best_version:
+ best_version, best_dir = version, vc_dir
+ if not best_version:
+ log.debug("No suitable Visual C++ version found")
+ return None, None
+
+ vcvarsall = os.path.join(best_dir, "vcvarsall.bat")
+ if not os.path.isfile(vcvarsall):
+ log.debug("%s cannot be found", vcvarsall)
+ return None, None
+
+ vcruntime = None
+ vcruntime_spec = _VCVARS_PLAT_TO_VCRUNTIME_REDIST.get(plat_spec)
+ if vcruntime_spec:
+ vcruntime = os.path.join(best_dir,
+ vcruntime_spec.format(best_version))
+ if not os.path.isfile(vcruntime):
+ log.debug("%s cannot be found", vcruntime)
+ vcruntime = None
+
+ return vcvarsall, vcruntime
+
+def _get_vc_env(plat_spec):
+ if os.getenv("DISTUTILS_USE_SDK"):
+ return {
+ key.lower(): value
+ for key, value in os.environ.items()
+ }
+
+ vcvarsall, vcruntime = _find_vcvarsall(plat_spec)
+ if not vcvarsall:
+ raise DistutilsPlatformError("Unable to find vcvarsall.bat")
+
+ try:
+ out = subprocess.check_output(
+ '"{}" {} && set'.format(vcvarsall, plat_spec),
+ shell=True,
+ stderr=subprocess.STDOUT,
+ universal_newlines=True,
+ )
+ except subprocess.CalledProcessError as exc:
+ log.error(exc.output)
+ raise DistutilsPlatformError("Error executing {}"
+ .format(exc.cmd))
+
+ env = {
+ key.lower(): value
+ for key, _, value in
+ (line.partition('=') for line in out.splitlines())
+ if key and value
+ }
+
+ if vcruntime:
+ env['py_vcruntime_redist'] = vcruntime
+ return env
+
+def _find_exe(exe, paths=None):
+ """Return path to an MSVC executable program.
+
+ Tries to find the program in several places: first, one of the
+ MSVC program search paths from the registry; next, the directories
+ in the PATH environment variable. If any of those work, return an
+ absolute path that is known to exist. If none of them work, just
+ return the original program name, 'exe'.
+ """
+ if not paths:
+ paths = os.getenv('path').split(os.pathsep)
+ for p in paths:
+ fn = os.path.join(os.path.abspath(p), exe)
+ if os.path.isfile(fn):
+ return fn
+ return exe
+
+# A map keyed by get_platform() return values to values accepted by
+# 'vcvarsall.bat'. Always cross-compile from x86 to work with the
+# lighter-weight MSVC installs that do not include native 64-bit tools.
+PLAT_TO_VCVARS = {
+ 'win32' : 'x86',
+ 'win-amd64' : 'x86_amd64',
+}
+
+# A map keyed by get_platform() return values to the file under
+# the VC install directory containing the vcruntime redistributable.
+_VCVARS_PLAT_TO_VCRUNTIME_REDIST = {
+ 'x86' : 'redist\\x86\\Microsoft.VC{0}0.CRT\\vcruntime{0}0.dll',
+ 'amd64' : 'redist\\x64\\Microsoft.VC{0}0.CRT\\vcruntime{0}0.dll',
+ 'x86_amd64' : 'redist\\x64\\Microsoft.VC{0}0.CRT\\vcruntime{0}0.dll',
+}
+
+# A set containing the DLLs that are guaranteed to be available for
+# all micro versions of this Python version. Known extension
+# dependencies that are not in this set will be copied to the output
+# path.
+_BUNDLED_DLLS = frozenset(['vcruntime140.dll'])
+
+class MSVCCompiler(CCompiler) :
+ """Concrete class that implements an interface to Microsoft Visual C++,
+ as defined by the CCompiler abstract class."""
+
+ compiler_type = 'msvc'
+
+ # Just set this so CCompiler's constructor doesn't barf. We currently
+ # don't use the 'set_executables()' bureaucracy provided by CCompiler,
+ # as it really isn't necessary for this sort of single-compiler class.
+ # Would be nice to have a consistent interface with UnixCCompiler,
+ # though, so it's worth thinking about.
+ executables = {}
+
+ # Private class data (need to distinguish C from C++ source for compiler)
+ _c_extensions = ['.c']
+ _cpp_extensions = ['.cc', '.cpp', '.cxx']
+ _rc_extensions = ['.rc']
+ _mc_extensions = ['.mc']
+
+ # Needed for the filename generation methods provided by the
+ # base class, CCompiler.
+ src_extensions = (_c_extensions + _cpp_extensions +
+ _rc_extensions + _mc_extensions)
+ res_extension = '.res'
+ obj_extension = '.obj'
+ static_lib_extension = '.lib'
+ shared_lib_extension = '.dll'
+ static_lib_format = shared_lib_format = '%s%s'
+ exe_extension = '.exe'
+
+
+ def __init__(self, verbose=0, dry_run=0, force=0):
+ CCompiler.__init__ (self, verbose, dry_run, force)
+ # target platform (.plat_name is consistent with 'bdist')
+ self.plat_name = None
+ self.initialized = False
+
+ def initialize(self, plat_name=None):
+ # multi-init means we would need to check platform same each time...
+ assert not self.initialized, "don't init multiple times"
+ if plat_name is None:
+ plat_name = get_platform()
+ # sanity check for platforms to prevent obscure errors later.
+ if plat_name not in PLAT_TO_VCVARS:
+ raise DistutilsPlatformError("--plat-name must be one of {}"
+ .format(tuple(PLAT_TO_VCVARS)))
+
+ # Get the vcvarsall.bat spec for the requested platform.
+ plat_spec = PLAT_TO_VCVARS[plat_name]
+
+ vc_env = _get_vc_env(plat_spec)
+ if not vc_env:
+ raise DistutilsPlatformError("Unable to find a compatible "
+ "Visual Studio installation.")
+
+ self._paths = vc_env.get('path', '')
+ paths = self._paths.split(os.pathsep)
+ self.cc = _find_exe("cl.exe", paths)
+ self.linker = _find_exe("link.exe", paths)
+ self.lib = _find_exe("lib.exe", paths)
+ self.rc = _find_exe("rc.exe", paths) # resource compiler
+ self.mc = _find_exe("mc.exe", paths) # message compiler
+ self.mt = _find_exe("mt.exe", paths) # message compiler
+ self._vcruntime_redist = vc_env.get('py_vcruntime_redist', '')
+
+ for dir in vc_env.get('include', '').split(os.pathsep):
+ if dir:
+ self.add_include_dir(dir)
+
+ for dir in vc_env.get('lib', '').split(os.pathsep):
+ if dir:
+ self.add_library_dir(dir)
+
+ self.preprocess_options = None
+ # If vcruntime_redist is available, link against it dynamically. Otherwise,
+ # use /MT[d] to build statically, then switch from libucrt[d].lib to ucrt[d].lib
+ # later to dynamically link to ucrtbase but not vcruntime.
+ self.compile_options = [
+ '/nologo', '/Ox', '/W3', '/GL', '/DNDEBUG'
+ ]
+ self.compile_options.append('/MD' if self._vcruntime_redist else '/MT')
+
+ self.compile_options_debug = [
+ '/nologo', '/Od', '/MDd', '/Zi', '/W3', '/D_DEBUG'
+ ]
+
+ ldflags = [
+ '/nologo', '/INCREMENTAL:NO', '/LTCG'
+ ]
+ if not self._vcruntime_redist:
+ ldflags.extend(('/nodefaultlib:libucrt.lib', 'ucrt.lib'))
+
+ ldflags_debug = [
+ '/nologo', '/INCREMENTAL:NO', '/LTCG', '/DEBUG:FULL'
+ ]
+
+ self.ldflags_exe = [*ldflags, '/MANIFEST:EMBED,ID=1']
+ self.ldflags_exe_debug = [*ldflags_debug, '/MANIFEST:EMBED,ID=1']
+ self.ldflags_shared = [*ldflags, '/DLL', '/MANIFEST:EMBED,ID=2', '/MANIFESTUAC:NO']
+ self.ldflags_shared_debug = [*ldflags_debug, '/DLL', '/MANIFEST:EMBED,ID=2', '/MANIFESTUAC:NO']
+ self.ldflags_static = [*ldflags]
+ self.ldflags_static_debug = [*ldflags_debug]
+
+ self._ldflags = {
+ (CCompiler.EXECUTABLE, None): self.ldflags_exe,
+ (CCompiler.EXECUTABLE, False): self.ldflags_exe,
+ (CCompiler.EXECUTABLE, True): self.ldflags_exe_debug,
+ (CCompiler.SHARED_OBJECT, None): self.ldflags_shared,
+ (CCompiler.SHARED_OBJECT, False): self.ldflags_shared,
+ (CCompiler.SHARED_OBJECT, True): self.ldflags_shared_debug,
+ (CCompiler.SHARED_LIBRARY, None): self.ldflags_static,
+ (CCompiler.SHARED_LIBRARY, False): self.ldflags_static,
+ (CCompiler.SHARED_LIBRARY, True): self.ldflags_static_debug,
+ }
+
+ self.initialized = True
+
+ # -- Worker methods ------------------------------------------------
+
+ def object_filenames(self,
+ source_filenames,
+ strip_dir=0,
+ output_dir=''):
+ ext_map = {
+ **{ext: self.obj_extension for ext in self.src_extensions},
+ **{ext: self.res_extension for ext in self._rc_extensions + self._mc_extensions},
+ }
+
+ output_dir = output_dir or ''
+
+ def make_out_path(p):
+ base, ext = os.path.splitext(p)
+ if strip_dir:
+ base = os.path.basename(base)
+ else:
+ _, base = os.path.splitdrive(base)
+ if base.startswith((os.path.sep, os.path.altsep)):
+ base = base[1:]
+ try:
+ # XXX: This may produce absurdly long paths. We should check
+ # the length of the result and trim base until we fit within
+ # 260 characters.
+ return os.path.join(output_dir, base + ext_map[ext])
+ except LookupError:
+ # Better to raise an exception instead of silently continuing
+ # and later complain about sources and targets having
+ # different lengths
+ raise CompileError("Don't know how to compile {}".format(p))
+
+ return list(map(make_out_path, source_filenames))
+
+
+ def compile(self, sources,
+ output_dir=None, macros=None, include_dirs=None, debug=0,
+ extra_preargs=None, extra_postargs=None, depends=None):
+
+ if not self.initialized:
+ self.initialize()
+ compile_info = self._setup_compile(output_dir, macros, include_dirs,
+ sources, depends, extra_postargs)
+ macros, objects, extra_postargs, pp_opts, build = compile_info
+
+ compile_opts = extra_preargs or []
+ compile_opts.append('/c')
+ if debug:
+ compile_opts.extend(self.compile_options_debug)
+ else:
+ compile_opts.extend(self.compile_options)
+
+
+ add_cpp_opts = False
+
+ for obj in objects:
+ try:
+ src, ext = build[obj]
+ except KeyError:
+ continue
+ if debug:
+ # pass the full pathname to MSVC in debug mode,
+ # this allows the debugger to find the source file
+ # without asking the user to browse for it
+ src = os.path.abspath(src)
+
+ if ext in self._c_extensions:
+ input_opt = "/Tc" + src
+ elif ext in self._cpp_extensions:
+ input_opt = "/Tp" + src
+ add_cpp_opts = True
+ elif ext in self._rc_extensions:
+ # compile .RC to .RES file
+ input_opt = src
+ output_opt = "/fo" + obj
+ try:
+ self.spawn([self.rc] + pp_opts + [output_opt, input_opt])
+ except DistutilsExecError as msg:
+ raise CompileError(msg)
+ continue
+ elif ext in self._mc_extensions:
+ # Compile .MC to .RC file to .RES file.
+ # * '-h dir' specifies the directory for the
+ # generated include file
+ # * '-r dir' specifies the target directory of the
+ # generated RC file and the binary message resource
+ # it includes
+ #
+ # For now (since there are no options to change this),
+ # we use the source-directory for the include file and
+ # the build directory for the RC file and message
+ # resources. This works at least for win32all.
+ h_dir = os.path.dirname(src)
+ rc_dir = os.path.dirname(obj)
+ try:
+ # first compile .MC to .RC and .H file
+ self.spawn([self.mc, '-h', h_dir, '-r', rc_dir, src])
+ base, _ = os.path.splitext(os.path.basename (src))
+ rc_file = os.path.join(rc_dir, base + '.rc')
+ # then compile .RC to .RES file
+ self.spawn([self.rc, "/fo" + obj, rc_file])
+
+ except DistutilsExecError as msg:
+ raise CompileError(msg)
+ continue
+ else:
+ # how to handle this file?
+ raise CompileError("Don't know how to compile {} to {}"
+ .format(src, obj))
+
+ args = [self.cc] + compile_opts + pp_opts
+ if add_cpp_opts:
+ args.append('/EHsc')
+ args.append(input_opt)
+ args.append("/Fo" + obj)
+ args.extend(extra_postargs)
+
+ try:
+ self.spawn(args)
+ except DistutilsExecError as msg:
+ raise CompileError(msg)
+
+ return objects
+
+
+ def create_static_lib(self,
+ objects,
+ output_libname,
+ output_dir=None,
+ debug=0,
+ target_lang=None):
+
+ if not self.initialized:
+ self.initialize()
+ objects, output_dir = self._fix_object_args(objects, output_dir)
+ output_filename = self.library_filename(output_libname,
+ output_dir=output_dir)
+
+ if self._need_link(objects, output_filename):
+ lib_args = objects + ['/OUT:' + output_filename]
+ if debug:
+ pass # XXX what goes here?
+ try:
+ log.debug('Executing "%s" %s', self.lib, ' '.join(lib_args))
+ self.spawn([self.lib] + lib_args)
+ except DistutilsExecError as msg:
+ raise LibError(msg)
+ else:
+ log.debug("skipping %s (up-to-date)", output_filename)
+
+
+ def link(self,
+ target_desc,
+ objects,
+ output_filename,
+ output_dir=None,
+ libraries=None,
+ library_dirs=None,
+ runtime_library_dirs=None,
+ export_symbols=None,
+ debug=0,
+ extra_preargs=None,
+ extra_postargs=None,
+ build_temp=None,
+ target_lang=None):
+
+ if not self.initialized:
+ self.initialize()
+ objects, output_dir = self._fix_object_args(objects, output_dir)
+ fixed_args = self._fix_lib_args(libraries, library_dirs,
+ runtime_library_dirs)
+ libraries, library_dirs, runtime_library_dirs = fixed_args
+
+ if runtime_library_dirs:
+ self.warn("I don't know what to do with 'runtime_library_dirs': "
+ + str(runtime_library_dirs))
+
+ lib_opts = gen_lib_options(self,
+ library_dirs, runtime_library_dirs,
+ libraries)
+ if output_dir is not None:
+ output_filename = os.path.join(output_dir, output_filename)
+
+ if self._need_link(objects, output_filename):
+ ldflags = self._ldflags[target_desc, debug]
+
+ export_opts = ["/EXPORT:" + sym for sym in (export_symbols or [])]
+
+ ld_args = (ldflags + lib_opts + export_opts +
+ objects + ['/OUT:' + output_filename])
+
+ # The MSVC linker generates .lib and .exp files, which cannot be
+ # suppressed by any linker switches. The .lib files may even be
+ # needed! Make sure they are generated in the temporary build
+ # directory. Since they have different names for debug and release
+ # builds, they can go into the same directory.
+ build_temp = os.path.dirname(objects[0])
+ if export_symbols is not None:
+ (dll_name, dll_ext) = os.path.splitext(
+ os.path.basename(output_filename))
+ implib_file = os.path.join(
+ build_temp,
+ self.library_filename(dll_name))
+ ld_args.append ('/IMPLIB:' + implib_file)
+
+ if extra_preargs:
+ ld_args[:0] = extra_preargs
+ if extra_postargs:
+ ld_args.extend(extra_postargs)
+
+ output_dir = os.path.dirname(os.path.abspath(output_filename))
+ self.mkpath(output_dir)
+ try:
+ log.debug('Executing "%s" %s', self.linker, ' '.join(ld_args))
+ self.spawn([self.linker] + ld_args)
+ self._copy_vcruntime(output_dir)
+ except DistutilsExecError as msg:
+ raise LinkError(msg)
+ else:
+ log.debug("skipping %s (up-to-date)", output_filename)
+
+ def _copy_vcruntime(self, output_dir):
+ vcruntime = self._vcruntime_redist
+ if not vcruntime or not os.path.isfile(vcruntime):
+ return
+
+ if os.path.basename(vcruntime).lower() in _BUNDLED_DLLS:
+ return
+
+ log.debug('Copying "%s"', vcruntime)
+ vcruntime = shutil.copy(vcruntime, output_dir)
+ os.chmod(vcruntime, stat.S_IWRITE)
+
+ def spawn(self, cmd):
+ old_path = os.getenv('path')
+ try:
+ os.environ['path'] = self._paths
+ return super().spawn(cmd)
+ finally:
+ os.environ['path'] = old_path
+
+ # -- Miscellaneous methods -----------------------------------------
+ # These are all used by the 'gen_lib_options() function, in
+ # ccompiler.py.
+
+ def library_dir_option(self, dir):
+ return "/LIBPATH:" + dir
+
+ def runtime_library_dir_option(self, dir):
+ raise DistutilsPlatformError(
+ "don't know how to set runtime library search path for MSVC")
+
+ def library_option(self, lib):
+ return self.library_filename(lib)
+
+ def find_library_file(self, dirs, lib, debug=0):
+ # Prefer a debugging library if found (and requested), but deal
+ # with it if we don't have one.
+ if debug:
+ try_names = [lib + "_d", lib]
+ else:
+ try_names = [lib]
+ for dir in dirs:
+ for name in try_names:
+ libfile = os.path.join(dir, self.library_filename(name))
+ if os.path.isfile(libfile):
+ return libfile
+ else:
+ # Oops, didn't find it in *any* of 'dirs'
+ return None
diff --git a/Lib/distutils/archive_util.py b/Lib/distutils/archive_util.py
index 4470bb0222..bed1384900 100644
--- a/Lib/distutils/archive_util.py
+++ b/Lib/distutils/archive_util.py
@@ -57,26 +57,28 @@ def make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0,
"""Create a (possibly compressed) tar file from all the files under
'base_dir'.
- 'compress' must be "gzip" (the default), "compress", "bzip2", or None.
- (compress will be deprecated in Python 3.2)
+ 'compress' must be "gzip" (the default), "bzip2", "xz", "compress", or
+ None. ("compress" will be deprecated in Python 3.2)
'owner' and 'group' can be used to define an owner and a group for the
archive that is being built. If not provided, the current owner and group
will be used.
The output tar file will be named 'base_dir' + ".tar", possibly plus
- the appropriate compression extension (".gz", ".bz2" or ".Z").
+ the appropriate compression extension (".gz", ".bz2", ".xz" or ".Z").
Returns the output filename.
"""
- tar_compression = {'gzip': 'gz', 'bzip2': 'bz2', None: '', 'compress': ''}
- compress_ext = {'gzip': '.gz', 'bzip2': '.bz2', 'compress': '.Z'}
+ tar_compression = {'gzip': 'gz', 'bzip2': 'bz2', 'xz': 'xz', None: '',
+ 'compress': ''}
+ compress_ext = {'gzip': '.gz', 'bzip2': '.bz2', 'xz': '.xz',
+ 'compress': '.Z'}
# flags for compression program, each element of list will be an argument
if compress is not None and compress not in compress_ext.keys():
raise ValueError(
- "bad value for 'compress': must be None, 'gzip', 'bzip2' "
- "or 'compress'")
+ "bad value for 'compress': must be None, 'gzip', 'bzip2', "
+ "'xz' or 'compress'")
archive_name = base_name + '.tar'
if compress != 'compress':
@@ -177,6 +179,7 @@ def make_zipfile(base_name, base_dir, verbose=0, dry_run=0):
ARCHIVE_FORMATS = {
'gztar': (make_tarball, [('compress', 'gzip')], "gzip'ed tar-file"),
'bztar': (make_tarball, [('compress', 'bzip2')], "bzip2'ed tar-file"),
+ 'xztar': (make_tarball, [('compress', 'xz')], "xz'ed tar-file"),
'ztar': (make_tarball, [('compress', 'compress')], "compressed tar file"),
'tar': (make_tarball, [('compress', None)], "uncompressed tar file"),
'zip': (make_zipfile, [],"ZIP file")
@@ -197,8 +200,8 @@ def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0,
"""Create an archive file (eg. zip or tar).
'base_name' is the name of the file to create, minus any format-specific
- extension; 'format' is the archive format: one of "zip", "tar", "ztar",
- or "gztar".
+ extension; 'format' is the archive format: one of "zip", "tar", "gztar",
+ "bztar", "xztar", or "ztar".
'root_dir' is a directory that will be the root directory of the
archive; ie. we typically chdir into 'root_dir' before creating the
diff --git a/Lib/distutils/ccompiler.py b/Lib/distutils/ccompiler.py
index e93a27363f..b71d1d39bc 100644
--- a/Lib/distutils/ccompiler.py
+++ b/Lib/distutils/ccompiler.py
@@ -875,9 +875,9 @@ main (int argc, char **argv) {
def library_filename(self, libname, lib_type='static', # or 'shared'
strip_dir=0, output_dir=''):
assert output_dir is not None
- if lib_type not in ("static", "shared", "dylib"):
+ if lib_type not in ("static", "shared", "dylib", "xcode_stub"):
raise ValueError(
- "'lib_type' must be \"static\", \"shared\" or \"dylib\"")
+ "'lib_type' must be \"static\", \"shared\", \"dylib\", or \"xcode_stub\"")
fmt = getattr(self, lib_type + "_lib_format")
ext = getattr(self, lib_type + "_lib_extension")
@@ -959,7 +959,7 @@ def get_default_compiler(osname=None, platform=None):
# is assumed to be in the 'distutils' package.)
compiler_class = { 'unix': ('unixccompiler', 'UnixCCompiler',
"standard UNIX-style compiler"),
- 'msvc': ('msvccompiler', 'MSVCCompiler',
+ 'msvc': ('_msvccompiler', 'MSVCCompiler',
"Microsoft Visual C++"),
'cygwin': ('cygwinccompiler', 'CygwinCCompiler',
"Cygwin port of GNU C Compiler for Win32"),
diff --git a/Lib/distutils/command/bdist.py b/Lib/distutils/command/bdist.py
index 6814a1c382..014871d280 100644
--- a/Lib/distutils/command/bdist.py
+++ b/Lib/distutils/command/bdist.py
@@ -61,13 +61,14 @@ class bdist(Command):
'nt': 'zip'}
# Establish the preferred order (for the --help-formats option).
- format_commands = ['rpm', 'gztar', 'bztar', 'ztar', 'tar',
+ format_commands = ['rpm', 'gztar', 'bztar', 'xztar', 'ztar', 'tar',
'wininst', 'zip', 'msi']
# And the real information.
format_command = {'rpm': ('bdist_rpm', "RPM distribution"),
'gztar': ('bdist_dumb', "gzip'ed tar file"),
'bztar': ('bdist_dumb', "bzip2'ed tar file"),
+ 'xztar': ('bdist_dumb', "xz'ed tar file"),
'ztar': ('bdist_dumb', "compressed tar file"),
'tar': ('bdist_dumb', "tar file"),
'wininst': ('bdist_wininst',
diff --git a/Lib/distutils/command/bdist_dumb.py b/Lib/distutils/command/bdist_dumb.py
index 4405d12c05..f1bfb24923 100644
--- a/Lib/distutils/command/bdist_dumb.py
+++ b/Lib/distutils/command/bdist_dumb.py
@@ -22,7 +22,8 @@ class bdist_dumb(Command):
"platform name to embed in generated filenames "
"(default: %s)" % get_platform()),
('format=', 'f',
- "archive format to create (tar, ztar, gztar, zip)"),
+ "archive format to create (tar, gztar, bztar, xztar, "
+ "ztar, zip)"),
('keep-temp', 'k',
"keep the pseudo-installation tree around after " +
"creating the distribution archive"),
diff --git a/Lib/distutils/command/bdist_wininst.py b/Lib/distutils/command/bdist_wininst.py
index 959a8bf62e..0c0e2c1a26 100644
--- a/Lib/distutils/command/bdist_wininst.py
+++ b/Lib/distutils/command/bdist_wininst.py
@@ -303,7 +303,6 @@ class bdist_wininst(Command):
return installer_name
def get_exe_bytes(self):
- from distutils.msvccompiler import get_build_version
# If a target-version other than the current version has been
# specified, then using the MSVC version from *this* build is no good.
# Without actually finding and executing the target version and parsing
@@ -313,20 +312,33 @@ class bdist_wininst(Command):
# We can then execute this program to obtain any info we need, such
# as the real sys.version string for the build.
cur_version = get_python_version()
- if self.target_version and self.target_version != cur_version:
- # If the target version is *later* than us, then we assume they
- # use what we use
- # string compares seem wrong, but are what sysconfig.py itself uses
- if self.target_version > cur_version:
- bv = get_build_version()
+
+ # If the target version is *later* than us, then we assume they
+ # use what we use
+ # string compares seem wrong, but are what sysconfig.py itself uses
+ if self.target_version and self.target_version < cur_version:
+ if self.target_version < "2.4":
+ bv = 6.0
+ elif self.target_version == "2.4":
+ bv = 7.1
+ elif self.target_version == "2.5":
+ bv = 8.0
+ elif self.target_version <= "3.2":
+ bv = 9.0
+ elif self.target_version <= "3.4":
+ bv = 10.0
else:
- if self.target_version < "2.4":
- bv = 6.0
- else:
- bv = 7.1
+ bv = 14.0
else:
# for current version - use authoritative check.
- bv = get_build_version()
+ try:
+ from msvcrt import CRT_ASSEMBLY_VERSION
+ except ImportError:
+ # cross-building, so assume the latest version
+ bv = 14.0
+ else:
+ bv = float('.'.join(CRT_ASSEMBLY_VERSION.split('.', 2)[:2]))
+
# wininst-x.y.exe is in the same directory as this file
directory = os.path.dirname(__file__)
diff --git a/Lib/distutils/command/build.py b/Lib/distutils/command/build.py
index cfc15cf0dd..337dd0bfc1 100644
--- a/Lib/distutils/command/build.py
+++ b/Lib/distutils/command/build.py
@@ -36,6 +36,8 @@ class build(Command):
"(default: %s)" % get_platform()),
('compiler=', 'c',
"specify the compiler type"),
+ ('parallel=', 'j',
+ "number of parallel build jobs"),
('debug', 'g',
"compile extensions and libraries with debugging information"),
('force', 'f',
@@ -65,6 +67,7 @@ class build(Command):
self.debug = None
self.force = 0
self.executable = None
+ self.parallel = None
def finalize_options(self):
if self.plat_name is None:
@@ -116,6 +119,12 @@ class build(Command):
if self.executable is None:
self.executable = os.path.normpath(sys.executable)
+ if isinstance(self.parallel, str):
+ try:
+ self.parallel = int(self.parallel)
+ except ValueError:
+ raise DistutilsOptionError("parallel should be an integer")
+
def run(self):
# Run all relevant sub-commands. This will be some subset of:
# - build_py - pure Python modules
diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py
index acbe648036..f03a4e31d8 100644
--- a/Lib/distutils/command/build_ext.py
+++ b/Lib/distutils/command/build_ext.py
@@ -4,7 +4,10 @@ Implements the Distutils 'build_ext' command, for building extension
modules (currently limited to C extensions, should accommodate C++
extensions ASAP)."""
-import sys, os, re
+import contextlib
+import os
+import re
+import sys
from distutils.core import Command
from distutils.errors import *
from distutils.sysconfig import customize_compiler, get_python_version
@@ -16,10 +19,6 @@ from distutils import log
from site import USER_BASE
-if os.name == 'nt':
- from distutils.msvccompiler import get_build_version
- MSVC_VERSION = int(get_build_version())
-
# An extension name is just a dot-separated list of Python NAMEs (ie.
# the same as a fully-qualified module name).
extension_name_re = re.compile \
@@ -85,6 +84,8 @@ class build_ext(Command):
"forcibly build everything (ignore file timestamps)"),
('compiler=', 'c',
"specify the compiler type"),
+ ('parallel=', 'j',
+ "number of parallel build jobs"),
('swig-cpp', None,
"make SWIG create C++ files (default is C)"),
('swig-opts=', None,
@@ -124,6 +125,7 @@ class build_ext(Command):
self.swig_cpp = None
self.swig_opts = None
self.user = None
+ self.parallel = None
def finalize_options(self):
from distutils import sysconfig
@@ -134,6 +136,7 @@ class build_ext(Command):
('compiler', 'compiler'),
('debug', 'debug'),
('force', 'force'),
+ ('parallel', 'parallel'),
('plat_name', 'plat_name'),
)
@@ -199,27 +202,17 @@ class build_ext(Command):
_sys_home = getattr(sys, '_home', None)
if _sys_home:
self.library_dirs.append(_sys_home)
- if MSVC_VERSION >= 9:
- # Use the .lib files for the correct architecture
- if self.plat_name == 'win32':
- suffix = ''
- else:
- # win-amd64 or win-ia64
- suffix = self.plat_name[4:]
- new_lib = os.path.join(sys.exec_prefix, 'PCbuild')
- if suffix:
- new_lib = os.path.join(new_lib, suffix)
- self.library_dirs.append(new_lib)
-
- elif MSVC_VERSION == 8:
- self.library_dirs.append(os.path.join(sys.exec_prefix,
- 'PC', 'VS8.0'))
- elif MSVC_VERSION == 7:
- self.library_dirs.append(os.path.join(sys.exec_prefix,
- 'PC', 'VS7.1'))
+
+ # Use the .lib files for the correct architecture
+ if self.plat_name == 'win32':
+ suffix = 'win32'
else:
- self.library_dirs.append(os.path.join(sys.exec_prefix,
- 'PC', 'VC6'))
+ # win-amd64 or win-ia64
+ suffix = self.plat_name[4:]
+ new_lib = os.path.join(sys.exec_prefix, 'PCbuild')
+ if suffix:
+ new_lib = os.path.join(new_lib, suffix)
+ self.library_dirs.append(new_lib)
# for extensions under Cygwin and AtheOS Python's library directory must be
# appended to library_dirs
@@ -274,6 +267,12 @@ class build_ext(Command):
self.library_dirs.append(user_lib)
self.rpath.append(user_lib)
+ if isinstance(self.parallel, str):
+ try:
+ self.parallel = int(self.parallel)
+ except ValueError:
+ raise DistutilsOptionError("parallel should be an integer")
+
def run(self):
from distutils.ccompiler import new_compiler
@@ -442,15 +441,45 @@ class build_ext(Command):
def build_extensions(self):
# First, sanity-check the 'extensions' list
self.check_extensions_list(self.extensions)
+ if self.parallel:
+ self._build_extensions_parallel()
+ else:
+ self._build_extensions_serial()
+
+ def _build_extensions_parallel(self):
+ workers = self.parallel
+ if self.parallel is True:
+ workers = os.cpu_count() # may return None
+ try:
+ from concurrent.futures import ThreadPoolExecutor
+ except ImportError:
+ workers = None
+
+ if workers is None:
+ self._build_extensions_serial()
+ return
+
+ with ThreadPoolExecutor(max_workers=workers) as executor:
+ futures = [executor.submit(self.build_extension, ext)
+ for ext in self.extensions]
+ for ext, fut in zip(self.extensions, futures):
+ with self._filter_build_errors(ext):
+ fut.result()
+ def _build_extensions_serial(self):
for ext in self.extensions:
- try:
+ with self._filter_build_errors(ext):
self.build_extension(ext)
- except (CCompilerError, DistutilsError, CompileError) as e:
- if not ext.optional:
- raise
- self.warn('building extension "%s" failed: %s' %
- (ext.name, e))
+
+ @contextlib.contextmanager
+ def _filter_build_errors(self, ext):
+ try:
+ yield
+ except (CCompilerError, DistutilsError, CompileError) as e:
+ if not ext.optional:
+ raise
+ self.warn('building extension "%s" failed: %s' %
+ (ext.name, e))
def build_extension(self, ext):
sources = ext.sources
@@ -502,15 +531,8 @@ class build_ext(Command):
extra_postargs=extra_args,
depends=ext.depends)
- # XXX -- this is a Vile HACK!
- #
- # The setup.py script for Python on Unix needs to be able to
- # get this list so it can perform all the clean up needed to
- # avoid keeping object files around when cleaning out a failed
- # build of an extension module. Since Distutils does not
- # track dependencies, we have to get rid of intermediates to
- # ensure all the intermediates will be properly re-built.
- #
+ # XXX outdated variable, kept here in case third-part code
+ # needs it.
self._built_objects = objects[:]
# Now link the object files together into a "shared object" --
@@ -655,10 +677,7 @@ class build_ext(Command):
"""
from distutils.sysconfig import get_config_var
ext_path = ext_name.split('.')
- # extensions in debug_mode are named 'module_d.pyd' under windows
ext_suffix = get_config_var('EXT_SUFFIX')
- if os.name == 'nt' and self.debug:
- return os.path.join(*ext_path) + '_d' + ext_suffix
return os.path.join(*ext_path) + ext_suffix
def get_export_symbols(self, ext):
@@ -683,7 +702,7 @@ class build_ext(Command):
# to need it mentioned explicitly, though, so that's what we do.
# Append '_d' to the python import library on debug builds.
if sys.platform == "win32":
- from distutils.msvccompiler import MSVCCompiler
+ from distutils._msvccompiler import MSVCCompiler
if not isinstance(self.compiler, MSVCCompiler):
template = "python%d%d"
if self.debug:
@@ -729,7 +748,7 @@ class build_ext(Command):
if sysconfig.get_config_var('Py_ENABLE_SHARED'):
pythonlib = 'python{}.{}{}'.format(
sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff,
- sys.abiflags)
+ sysconfig.get_config_var('ABIFLAGS'))
return ext.libraries + [pythonlib]
else:
return ext.libraries
diff --git a/Lib/distutils/command/build_py.py b/Lib/distutils/command/build_py.py
index 9100b96a2a..cf0ca57c32 100644
--- a/Lib/distutils/command/build_py.py
+++ b/Lib/distutils/command/build_py.py
@@ -314,10 +314,10 @@ class build_py (Command):
if include_bytecode:
if self.compile:
outputs.append(importlib.util.cache_from_source(
- filename, debug_override=True))
+ filename, optimization=''))
if self.optimize > 0:
outputs.append(importlib.util.cache_from_source(
- filename, debug_override=False))
+ filename, optimization=self.optimize))
outputs += [
os.path.join(build_dir, filename)
diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
index d768dc5463..67db007a02 100644
--- a/Lib/distutils/command/install.py
+++ b/Lib/distutils/command/install.py
@@ -51,7 +51,7 @@ if HAS_USER_SITE:
'purelib': '$usersite',
'platlib': '$usersite',
'headers': '$userbase/Python$py_version_nodot/Include/$dist_name',
- 'scripts': '$userbase/Scripts',
+ 'scripts': '$userbase/Python$py_version_nodot/Scripts',
'data' : '$userbase',
}
diff --git a/Lib/distutils/command/install_lib.py b/Lib/distutils/command/install_lib.py
index 215813ba97..6154cf0943 100644
--- a/Lib/distutils/command/install_lib.py
+++ b/Lib/distutils/command/install_lib.py
@@ -22,15 +22,15 @@ class install_lib(Command):
# possible scenarios:
# 1) no compilation at all (--no-compile --no-optimize)
# 2) compile .pyc only (--compile --no-optimize; default)
- # 3) compile .pyc and "level 1" .pyo (--compile --optimize)
- # 4) compile "level 1" .pyo only (--no-compile --optimize)
- # 5) compile .pyc and "level 2" .pyo (--compile --optimize-more)
- # 6) compile "level 2" .pyo only (--no-compile --optimize-more)
+ # 3) compile .pyc and "opt-1" .pyc (--compile --optimize)
+ # 4) compile "opt-1" .pyc only (--no-compile --optimize)
+ # 5) compile .pyc and "opt-2" .pyc (--compile --optimize-more)
+ # 6) compile "opt-2" .pyc only (--no-compile --optimize-more)
#
- # The UI for this is two option, 'compile' and 'optimize'.
+ # The UI for this is two options, 'compile' and 'optimize'.
# 'compile' is strictly boolean, and only decides whether to
# generate .pyc files. 'optimize' is three-way (0, 1, or 2), and
- # decides both whether to generate .pyo files and what level of
+ # decides both whether to generate .pyc files and what level of
# optimization to use.
user_options = [
@@ -166,10 +166,10 @@ class install_lib(Command):
continue
if self.compile:
bytecode_files.append(importlib.util.cache_from_source(
- py_file, debug_override=True))
+ py_file, optimization=''))
if self.optimize > 0:
bytecode_files.append(importlib.util.cache_from_source(
- py_file, debug_override=False))
+ py_file, optimization=self.optimize))
return bytecode_files
diff --git a/Lib/distutils/command/register.py b/Lib/distutils/command/register.py
index b49f86fe58..86343c8017 100644
--- a/Lib/distutils/command/register.py
+++ b/Lib/distutils/command/register.py
@@ -296,9 +296,9 @@ Your selection [default 1]: ''', log.INFO)
result = 500, str(e)
else:
if self.show_response:
- data = result.read()
+ data = self._read_pypi_response(result)
result = 200, 'OK'
if self.show_response:
- dashes = '-' * 75
- self.announce('%s%r%s' % (dashes, data, dashes))
+ msg = '\n'.join(('-' * 75, data, '-' * 75))
+ self.announce(msg, log.INFO)
return result
diff --git a/Lib/distutils/command/upload.py b/Lib/distutils/command/upload.py
index 1a96e2221e..0afcbf233e 100644
--- a/Lib/distutils/command/upload.py
+++ b/Lib/distutils/command/upload.py
@@ -1,11 +1,14 @@
-"""distutils.command.upload
+"""
+distutils.command.upload
-Implements the Distutils 'upload' subcommand (upload package to PyPI)."""
+Implements the Distutils 'upload' subcommand (upload package to a package
+index).
+"""
-import sys
-import os, io
-import socket
+import os
+import io
import platform
+import hashlib
from base64 import standard_b64encode
from urllib.request import urlopen, Request, HTTPError
from urllib.parse import urlparse
@@ -14,12 +17,6 @@ from distutils.core import PyPIRCCommand
from distutils.spawn import spawn
from distutils import log
-# this keeps compatibility for 2.3 and 2.4
-if sys.version < "2.5":
- from md5 import md5
-else:
- from hashlib import md5
-
class upload(PyPIRCCommand):
description = "upload binary package to PyPI"
@@ -60,7 +57,8 @@ class upload(PyPIRCCommand):
def run(self):
if not self.distribution.dist_files:
- raise DistutilsOptionError("No dist file created in earlier command")
+ msg = "No dist file created in earlier command"
+ raise DistutilsOptionError(msg)
for command, pyversion, filename in self.distribution.dist_files:
self.upload_file(command, pyversion, filename)
@@ -103,10 +101,10 @@ class upload(PyPIRCCommand):
'content': (os.path.basename(filename),content),
'filetype': command,
'pyversion': pyversion,
- 'md5_digest': md5(content).hexdigest(),
+ 'md5_digest': hashlib.md5(content).hexdigest(),
# additional meta-data
- 'metadata_version' : '1.0',
+ 'metadata_version': '1.0',
'summary': meta.get_description(),
'home_page': meta.get_url(),
'author': meta.get_contact(),
@@ -149,7 +147,7 @@ class upload(PyPIRCCommand):
for key, value in data.items():
title = '\r\nContent-Disposition: form-data; name="%s"' % key
# handle multiple entries for the same name
- if type(value) != type([]):
+ if not isinstance(value, list):
value = [value]
for value in value:
if type(value) is tuple:
@@ -166,13 +164,15 @@ class upload(PyPIRCCommand):
body.write(end_boundary)
body = body.getvalue()
- self.announce("Submitting %s to %s" % (filename, self.repository), log.INFO)
+ msg = "Submitting %s to %s" % (filename, self.repository)
+ self.announce(msg, log.INFO)
# build the Request
- headers = {'Content-type':
- 'multipart/form-data; boundary=%s' % boundary,
- 'Content-length': str(len(body)),
- 'Authorization': auth}
+ headers = {
+ 'Content-type': 'multipart/form-data; boundary=%s' % boundary,
+ 'Content-length': str(len(body)),
+ 'Authorization': auth,
+ }
request = Request(self.repository, data=body,
headers=headers)
@@ -181,21 +181,21 @@ class upload(PyPIRCCommand):
result = urlopen(request)
status = result.getcode()
reason = result.msg
- except OSError as e:
- self.announce(str(e), log.ERROR)
- raise
except HTTPError as e:
status = e.code
reason = e.msg
+ except OSError as e:
+ self.announce(str(e), log.ERROR)
+ raise
if status == 200:
self.announce('Server response (%s): %s' % (status, reason),
log.INFO)
+ if self.show_response:
+ text = self._read_pypi_response(result)
+ msg = '\n'.join(('-' * 75, text, '-' * 75))
+ self.announce(msg, log.INFO)
else:
msg = 'Upload failed (%s): %s' % (status, reason)
self.announce(msg, log.ERROR)
raise DistutilsError(msg)
- if self.show_response:
- text = self._read_pypi_response(result)
- msg = '\n'.join(('-' * 75, text, '-' * 75))
- self.announce(msg, log.INFO)
diff --git a/Lib/distutils/command/wininst-14.0-amd64.exe b/Lib/distutils/command/wininst-14.0-amd64.exe
new file mode 100644
index 0000000000..22299543a9
--- /dev/null
+++ b/Lib/distutils/command/wininst-14.0-amd64.exe
Binary files differ
diff --git a/Lib/distutils/command/wininst-14.0.exe b/Lib/distutils/command/wininst-14.0.exe
new file mode 100644
index 0000000000..0dac1103d9
--- /dev/null
+++ b/Lib/distutils/command/wininst-14.0.exe
Binary files differ
diff --git a/Lib/distutils/config.py b/Lib/distutils/config.py
index 382aca8fc1..f0c7373171 100644
--- a/Lib/distutils/config.py
+++ b/Lib/distutils/config.py
@@ -4,7 +4,7 @@ Provides the PyPIRCCommand class, the base class for the command classes
that uses .pypirc in the distutils.command package.
"""
import os
-from configparser import ConfigParser
+from configparser import RawConfigParser
from distutils.cmd import Command
@@ -53,7 +53,7 @@ class PyPIRCCommand(Command):
repository = self.repository or self.DEFAULT_REPOSITORY
realm = self.realm or self.DEFAULT_REALM
- config = ConfigParser()
+ config = RawConfigParser()
config.read(rc)
sections = config.sections()
if 'distutils' in sections:
diff --git a/Lib/distutils/core.py b/Lib/distutils/core.py
index 2bfe66aa2f..f05b34b295 100644
--- a/Lib/distutils/core.py
+++ b/Lib/distutils/core.py
@@ -221,8 +221,6 @@ def run_setup (script_name, script_args=None, stop_after="run"):
# Hmm, should we do something if exiting with a non-zero code
# (ie. error)?
pass
- except:
- raise
if _setup_distribution is None:
raise RuntimeError(("'distutils.core.setup()' was never called -- "
diff --git a/Lib/distutils/dist.py b/Lib/distutils/dist.py
index 7eb04bc3f5..ffb33ff645 100644
--- a/Lib/distutils/dist.py
+++ b/Lib/distutils/dist.py
@@ -4,7 +4,9 @@ Provides the Distribution class, which represents the module distribution
being built/installed/distributed.
"""
-import sys, os, re
+import sys
+import os
+import re
from email import message_from_file
try:
@@ -22,7 +24,7 @@ from distutils.debug import DEBUG
# the same as a Python NAME -- I don't allow leading underscores. The fact
# that they're very similar is no coincidence; the default naming scheme is
# to look for a Python module named after the command.
-command_re = re.compile (r'^[a-zA-Z]([a-zA-Z0-9_]*)$')
+command_re = re.compile(r'^[a-zA-Z]([a-zA-Z0-9_]*)$')
class Distribution:
@@ -39,7 +41,6 @@ class Distribution:
See the code for 'setup()', in core.py, for details.
"""
-
# 'global_options' describes the command-line options that may be
# supplied to the setup script prior to any actual commands.
# Eg. "./setup.py -n" or "./setup.py --quiet" both take advantage of
@@ -48,12 +49,13 @@ class Distribution:
# don't want to pollute the commands with too many options that they
# have minimal control over.
# The fourth entry for verbose means that it can be repeated.
- global_options = [('verbose', 'v', "run verbosely (default)", 1),
- ('quiet', 'q', "run quietly (turns verbosity off)"),
- ('dry-run', 'n', "don't actually do anything"),
- ('help', 'h', "show detailed help message"),
- ('no-user-cfg', None,
- 'ignore pydistutils.cfg in your home directory'),
+ global_options = [
+ ('verbose', 'v', "run verbosely (default)", 1),
+ ('quiet', 'q', "run quietly (turns verbosity off)"),
+ ('dry-run', 'n', "don't actually do anything"),
+ ('help', 'h', "show detailed help message"),
+ ('no-user-cfg', None,
+ 'ignore pydistutils.cfg in your home directory'),
]
# 'common_usage' is a short (2-3 line) string describing the common
@@ -115,10 +117,9 @@ Common commands: (see '--help-commands' for more)
# negative options are options that exclude other options
negative_opt = {'quiet': 'verbose'}
-
# -- Creation/initialization methods -------------------------------
- def __init__ (self, attrs=None):
+ def __init__(self, attrs=None):
"""Construct a new Distribution instance: initialize all the
attributes of a Distribution, and then use 'attrs' (a dictionary
mapping attribute names to values) to assign some of those
@@ -532,15 +533,15 @@ Common commands: (see '--help-commands' for more)
# to be sure that the basic "command" interface is implemented.
if not issubclass(cmd_class, Command):
raise DistutilsClassError(
- "command class %s must subclass Command" % cmd_class)
+ "command class %s must subclass Command" % cmd_class)
# Also make sure that the command object provides a list of its
# known options.
if not (hasattr(cmd_class, 'user_options') and
isinstance(cmd_class.user_options, list)):
- raise DistutilsClassError(("command class %s must provide " +
- "'user_options' attribute (a list of tuples)") % \
- cmd_class)
+ msg = ("command class %s must provide "
+ "'user_options' attribute (a list of tuples)")
+ raise DistutilsClassError(msg % cmd_class)
# If the command class has a list of negative alias options,
# merge it in with the global negative aliases.
@@ -552,12 +553,11 @@ Common commands: (see '--help-commands' for more)
# Check for help_options in command class. They have a different
# format (tuple of four) so we need to preprocess them here.
if (hasattr(cmd_class, 'help_options') and
- isinstance(cmd_class.help_options, list)):
+ isinstance(cmd_class.help_options, list)):
help_options = fix_help_options(cmd_class.help_options)
else:
help_options = []
-
# All commands support the global options too, just by adding
# in 'global_options'.
parser.set_option_table(self.global_options +
@@ -570,7 +570,7 @@ Common commands: (see '--help-commands' for more)
return
if (hasattr(cmd_class, 'help_options') and
- isinstance(cmd_class.help_options, list)):
+ isinstance(cmd_class.help_options, list)):
help_option_found=0
for (help_option, short, desc, func) in cmd_class.help_options:
if hasattr(opts, parser.get_attr_name(help_option)):
@@ -647,7 +647,7 @@ Common commands: (see '--help-commands' for more)
else:
klass = self.get_command_class(command)
if (hasattr(klass, 'help_options') and
- isinstance(klass.help_options, list)):
+ isinstance(klass.help_options, list)):
parser.set_option_table(klass.user_options +
fix_help_options(klass.help_options))
else:
@@ -814,7 +814,7 @@ Common commands: (see '--help-commands' for more)
klass_name = command
try:
- __import__ (module_name)
+ __import__(module_name)
module = sys.modules[module_name]
except ImportError:
continue
@@ -823,8 +823,8 @@ Common commands: (see '--help-commands' for more)
klass = getattr(module, klass_name)
except AttributeError:
raise DistutilsModuleError(
- "invalid command '%s' (no class '%s' in module '%s')"
- % (command, klass_name, module_name))
+ "invalid command '%s' (no class '%s' in module '%s')"
+ % (command, klass_name, module_name))
self.cmdclass[command] = klass
return klass
@@ -840,7 +840,7 @@ Common commands: (see '--help-commands' for more)
cmd_obj = self.command_obj.get(command)
if not cmd_obj and create:
if DEBUG:
- self.announce("Distribution.get_command_obj(): " \
+ self.announce("Distribution.get_command_obj(): "
"creating '%s' command object" % command)
klass = self.get_command_class(command)
@@ -897,8 +897,8 @@ Common commands: (see '--help-commands' for more)
setattr(command_obj, option, value)
else:
raise DistutilsOptionError(
- "error in %s: command '%s' has no such option '%s'"
- % (source, command_name, option))
+ "error in %s: command '%s' has no such option '%s'"
+ % (source, command_name, option))
except ValueError as msg:
raise DistutilsOptionError(msg)
@@ -974,7 +974,6 @@ Common commands: (see '--help-commands' for more)
cmd_obj.run()
self.have_run[command] = 1
-
# -- Distribution query methods ------------------------------------
def has_pure_modules(self):
@@ -1112,17 +1111,17 @@ class DistributionMetadata:
"""
version = '1.0'
if (self.provides or self.requires or self.obsoletes or
- self.classifiers or self.download_url):
+ self.classifiers or self.download_url):
version = '1.1'
file.write('Metadata-Version: %s\n' % version)
- file.write('Name: %s\n' % self.get_name() )
- file.write('Version: %s\n' % self.get_version() )
- file.write('Summary: %s\n' % self.get_description() )
- file.write('Home-page: %s\n' % self.get_url() )
- file.write('Author: %s\n' % self.get_contact() )
- file.write('Author-email: %s\n' % self.get_contact_email() )
- file.write('License: %s\n' % self.get_license() )
+ file.write('Name: %s\n' % self.get_name())
+ file.write('Version: %s\n' % self.get_version())
+ file.write('Summary: %s\n' % self.get_description())
+ file.write('Home-page: %s\n' % self.get_url())
+ file.write('Author: %s\n' % self.get_contact())
+ file.write('Author-email: %s\n' % self.get_contact_email())
+ file.write('License: %s\n' % self.get_license())
if self.download_url:
file.write('Download-URL: %s\n' % self.download_url)
@@ -1131,7 +1130,7 @@ class DistributionMetadata:
keywords = ','.join(self.get_keywords())
if keywords:
- file.write('Keywords: %s\n' % keywords )
+ file.write('Keywords: %s\n' % keywords)
self._write_list(file, 'Platform', self.get_platforms())
self._write_list(file, 'Classifier', self.get_classifiers())
diff --git a/Lib/distutils/extension.py b/Lib/distutils/extension.py
index a93655af2c..7efbb74f89 100644
--- a/Lib/distutils/extension.py
+++ b/Lib/distutils/extension.py
@@ -131,6 +131,14 @@ class Extension:
msg = "Unknown Extension options: %s" % options
warnings.warn(msg)
+ def __repr__(self):
+ return '<%s.%s(%r) at %#x>' % (
+ self.__class__.__module__,
+ self.__class__.__qualname__,
+ self.name,
+ id(self))
+
+
def read_setup_file(filename):
"""Reads a Setup file and returns Extension instances."""
from distutils.sysconfig import (parse_makefile, expand_makefile_vars,
diff --git a/Lib/distutils/msvc9compiler.py b/Lib/distutils/msvc9compiler.py
index a5a5010053..0b1fd19ff6 100644
--- a/Lib/distutils/msvc9compiler.py
+++ b/Lib/distutils/msvc9compiler.py
@@ -51,7 +51,7 @@ else:
# A map keyed by get_platform() return values to values accepted by
# 'vcvarsall.bat'. Note a cross-compile may combine these (eg, 'x86_amd64' is
-# the param to cross-compile on x86 targetting amd64.)
+# the param to cross-compile on x86 targeting amd64.)
PLAT_TO_VCVARS = {
'win32' : 'x86',
'win-amd64' : 'amd64',
@@ -179,6 +179,9 @@ def get_build_version():
i = i + len(prefix)
s, rest = sys.version[i:].split(" ", 1)
majorVersion = int(s[:-2]) - 6
+ if majorVersion >= 13:
+ # v13 was skipped and should be v14
+ majorVersion += 1
minorVersion = int(s[2:3]) / 10.0
# I don't think paths are affected by minor version in version 6
if majorVersion == 6:
diff --git a/Lib/distutils/msvccompiler.py b/Lib/distutils/msvccompiler.py
index 8116656961..1048cd4159 100644
--- a/Lib/distutils/msvccompiler.py
+++ b/Lib/distutils/msvccompiler.py
@@ -157,6 +157,9 @@ def get_build_version():
i = i + len(prefix)
s, rest = sys.version[i:].split(" ", 1)
majorVersion = int(s[:-2]) - 6
+ if majorVersion >= 13:
+ # v13 was skipped and should be v14
+ majorVersion += 1
minorVersion = int(s[2:3]) / 10.0
# I don't think paths are affected by minor version in version 6
if majorVersion == 6:
diff --git a/Lib/distutils/spawn.py b/Lib/distutils/spawn.py
index 22e87e8fdb..5dd415a283 100644
--- a/Lib/distutils/spawn.py
+++ b/Lib/distutils/spawn.py
@@ -137,9 +137,6 @@ def _spawn_posix(cmd, search_path=1, verbose=0, dry_run=0):
try:
pid, status = os.waitpid(pid, 0)
except OSError as exc:
- import errno
- if exc.errno == errno.EINTR:
- continue
if not DEBUG:
cmd = executable
raise DistutilsExecError(
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
index a1452fe167..573724ddd7 100644
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
@@ -9,6 +9,7 @@ Written by: Fred L. Drake, Jr.
Email: <fdrake@acm.org>
"""
+import _imp
import os
import re
import sys
@@ -22,23 +23,15 @@ BASE_PREFIX = os.path.normpath(sys.base_prefix)
BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
# Path to the base directory of the project. On Windows the binary may
-# live in project/PCBuild9. If we're dealing with an x64 Windows build,
-# it'll live in project/PCbuild/amd64.
+# live in project/PCBuild/win32 or project/PCBuild/amd64.
# set for cross builds
if "_PYTHON_PROJECT_BASE" in os.environ:
project_base = os.path.abspath(os.environ["_PYTHON_PROJECT_BASE"])
else:
project_base = os.path.dirname(os.path.abspath(sys.executable))
-if os.name == "nt" and "pcbuild" in project_base[-8:].lower():
- project_base = os.path.abspath(os.path.join(project_base, os.path.pardir))
-# PC/VS7.1
-if os.name == "nt" and "\\pc\\v" in project_base[-10:].lower():
- project_base = os.path.abspath(os.path.join(project_base, os.path.pardir,
- os.path.pardir))
-# PC/AMD64
-if os.name == "nt" and "\\pcbuild\\amd64" in project_base[-14:].lower():
- project_base = os.path.abspath(os.path.join(project_base, os.path.pardir,
- os.path.pardir))
+if (os.name == 'nt' and
+ project_base.lower().endswith(('\\pcbuild\\win32', '\\pcbuild\\amd64'))):
+ project_base = os.path.dirname(os.path.dirname(project_base))
# python_build: (Boolean) if true, we're either building Python or
# building an extension with an un-installed Python, so we use
@@ -51,11 +44,9 @@ def _is_python_source_dir(d):
return True
return False
_sys_home = getattr(sys, '_home', None)
-if _sys_home and os.name == 'nt' and \
- _sys_home.lower().endswith(('pcbuild', 'pcbuild\\amd64')):
- _sys_home = os.path.dirname(_sys_home)
- if _sys_home.endswith('pcbuild'): # must be amd64
- _sys_home = os.path.dirname(_sys_home)
+if (_sys_home and os.name == 'nt' and
+ _sys_home.lower().endswith(('\\pcbuild\\win32', '\\pcbuild\\amd64'))):
+ _sys_home = os.path.dirname(os.path.dirname(_sys_home))
def _python_build():
if _sys_home:
return _is_python_source_dir(_sys_home)
@@ -468,7 +459,7 @@ def _init_nt():
# XXX hmmm.. a normal install puts include files here
g['INCLUDEPY'] = get_python_inc(plat_specific=0)
- g['EXT_SUFFIX'] = '.pyd'
+ g['EXT_SUFFIX'] = _imp.extension_suffixes()[0]
g['EXE'] = ".exe"
g['VERSION'] = get_python_version().replace(".", "")
g['BINDIR'] = os.path.dirname(os.path.abspath(sys.executable))
diff --git a/Lib/distutils/tests/test_archive_util.py b/Lib/distutils/tests/test_archive_util.py
index 2d72af4aa6..02fa1e27a4 100644
--- a/Lib/distutils/tests/test_archive_util.py
+++ b/Lib/distutils/tests/test_archive_util.py
@@ -13,7 +13,7 @@ from distutils.archive_util import (check_archive_formats, make_tarball,
ARCHIVE_FORMATS)
from distutils.spawn import find_executable, spawn
from distutils.tests import support
-from test.support import check_warnings, run_unittest, patch
+from test.support import check_warnings, run_unittest, patch, change_cwd
try:
import grp
@@ -34,6 +34,16 @@ try:
except ImportError:
ZLIB_SUPPORT = False
+try:
+ import bz2
+except ImportError:
+ bz2 = None
+
+try:
+ import lzma
+except ImportError:
+ lzma = None
+
def can_fs_encode(filename):
"""
Return True if the filename can be saved in the file system.
@@ -52,19 +62,36 @@ class ArchiveUtilTestCase(support.TempdirManager,
unittest.TestCase):
@unittest.skipUnless(ZLIB_SUPPORT, 'Need zlib support to run')
- def test_make_tarball(self):
- self._make_tarball('archive')
+ def test_make_tarball(self, name='archive'):
+ # creating something to tar
+ tmpdir = self._create_files()
+ self._make_tarball(tmpdir, name, '.tar.gz')
+ # trying an uncompressed one
+ self._make_tarball(tmpdir, name, '.tar', compress=None)
@unittest.skipUnless(ZLIB_SUPPORT, 'Need zlib support to run')
+ def test_make_tarball_gzip(self):
+ tmpdir = self._create_files()
+ self._make_tarball(tmpdir, 'archive', '.tar.gz', compress='gzip')
+
+ @unittest.skipUnless(bz2, 'Need bz2 support to run')
+ def test_make_tarball_bzip2(self):
+ tmpdir = self._create_files()
+ self._make_tarball(tmpdir, 'archive', '.tar.bz2', compress='bzip2')
+
+ @unittest.skipUnless(lzma, 'Need lzma support to run')
+ def test_make_tarball_xz(self):
+ tmpdir = self._create_files()
+ self._make_tarball(tmpdir, 'archive', '.tar.xz', compress='xz')
+
@unittest.skipUnless(can_fs_encode('Ã¥rchiv'),
'File system cannot handle this filename')
def test_make_tarball_latin1(self):
"""
Mirror test_make_tarball, except filename contains latin characters.
"""
- self._make_tarball('Ã¥rchiv') # note this isn't a real word
+ self.test_make_tarball('Ã¥rchiv') # note this isn't a real word
- @unittest.skipUnless(ZLIB_SUPPORT, 'Need zlib support to run')
@unittest.skipUnless(can_fs_encode('ã®ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–'),
'File system cannot handle this filename')
def test_make_tarball_extended(self):
@@ -72,16 +99,9 @@ class ArchiveUtilTestCase(support.TempdirManager,
Mirror test_make_tarball, except filename contains extended
characters outside the latin charset.
"""
- self._make_tarball('ã®ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–') # japanese for archive
-
- def _make_tarball(self, target_name):
- # creating something to tar
- tmpdir = self.mkdtemp()
- self.write_file([tmpdir, 'file1'], 'xxx')
- self.write_file([tmpdir, 'file2'], 'xxx')
- os.mkdir(os.path.join(tmpdir, 'sub'))
- self.write_file([tmpdir, 'sub', 'file3'], 'xxx')
+ self.test_make_tarball('ã®ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–') # japanese for archive
+ def _make_tarball(self, tmpdir, target_name, suffix, **kwargs):
tmpdir2 = self.mkdtemp()
unittest.skipUnless(splitdrive(tmpdir)[0] == splitdrive(tmpdir2)[0],
"source and target should be on same drive")
@@ -89,27 +109,13 @@ class ArchiveUtilTestCase(support.TempdirManager,
base_name = os.path.join(tmpdir2, target_name)
# working with relative paths to avoid tar warnings
- old_dir = os.getcwd()
- os.chdir(tmpdir)
- try:
- make_tarball(splitdrive(base_name)[1], '.')
- finally:
- os.chdir(old_dir)
+ with change_cwd(tmpdir):
+ make_tarball(splitdrive(base_name)[1], 'dist', **kwargs)
# check if the compressed tarball was created
- tarball = base_name + '.tar.gz'
- self.assertTrue(os.path.exists(tarball))
-
- # trying an uncompressed one
- base_name = os.path.join(tmpdir2, target_name)
- old_dir = os.getcwd()
- os.chdir(tmpdir)
- try:
- make_tarball(splitdrive(base_name)[1], '.', compress=None)
- finally:
- os.chdir(old_dir)
- tarball = base_name + '.tar'
+ tarball = base_name + suffix
self.assertTrue(os.path.exists(tarball))
+ self.assertEqual(self._tarinfo(tarball), self._created_files)
def _tarinfo(self, path):
tar = tarfile.open(path)
@@ -120,6 +126,9 @@ class ArchiveUtilTestCase(support.TempdirManager,
finally:
tar.close()
+ _created_files = ('dist', 'dist/file1', 'dist/file2',
+ 'dist/sub', 'dist/sub/file3', 'dist/sub2')
+
def _create_files(self):
# creating something to tar
tmpdir = self.mkdtemp()
@@ -130,15 +139,15 @@ class ArchiveUtilTestCase(support.TempdirManager,
os.mkdir(os.path.join(dist, 'sub'))
self.write_file([dist, 'sub', 'file3'], 'xxx')
os.mkdir(os.path.join(dist, 'sub2'))
- tmpdir2 = self.mkdtemp()
- base_name = os.path.join(tmpdir2, 'archive')
- return tmpdir, tmpdir2, base_name
+ return tmpdir
@unittest.skipUnless(find_executable('tar') and find_executable('gzip')
and ZLIB_SUPPORT,
'Need the tar, gzip and zlib command to run')
def test_tarfile_vs_tar(self):
- tmpdir, tmpdir2, base_name = self._create_files()
+ tmpdir = self._create_files()
+ tmpdir2 = self.mkdtemp()
+ base_name = os.path.join(tmpdir2, 'archive')
old_dir = os.getcwd()
os.chdir(tmpdir)
try:
@@ -164,7 +173,8 @@ class ArchiveUtilTestCase(support.TempdirManager,
self.assertTrue(os.path.exists(tarball2))
# let's compare both tarballs
- self.assertEqual(self._tarinfo(tarball), self._tarinfo(tarball2))
+ self.assertEqual(self._tarinfo(tarball), self._created_files)
+ self.assertEqual(self._tarinfo(tarball2), self._created_files)
# trying an uncompressed one
base_name = os.path.join(tmpdir2, 'archive')
@@ -191,7 +201,8 @@ class ArchiveUtilTestCase(support.TempdirManager,
@unittest.skipUnless(find_executable('compress'),
'The compress program is required')
def test_compress_deprecated(self):
- tmpdir, tmpdir2, base_name = self._create_files()
+ tmpdir = self._create_files()
+ base_name = os.path.join(self.mkdtemp(), 'archive')
# using compress and testing the PendingDeprecationWarning
old_dir = os.getcwd()
@@ -224,17 +235,17 @@ class ArchiveUtilTestCase(support.TempdirManager,
'Need zip and zlib support to run')
def test_make_zipfile(self):
# creating something to tar
- tmpdir = self.mkdtemp()
- self.write_file([tmpdir, 'file1'], 'xxx')
- self.write_file([tmpdir, 'file2'], 'xxx')
-
- tmpdir2 = self.mkdtemp()
- base_name = os.path.join(tmpdir2, 'archive')
- make_zipfile(base_name, tmpdir)
+ tmpdir = self._create_files()
+ base_name = os.path.join(self.mkdtemp(), 'archive')
+ with change_cwd(tmpdir):
+ make_zipfile(base_name, 'dist')
# check if the compressed tarball was created
tarball = base_name + '.zip'
self.assertTrue(os.path.exists(tarball))
+ with zipfile.ZipFile(tarball) as zf:
+ self.assertEqual(sorted(zf.namelist()),
+ ['dist/file1', 'dist/file2', 'dist/sub/file3'])
@unittest.skipUnless(ZIP_SUPPORT, 'Need zip support to run')
def test_make_zipfile_no_zlib(self):
@@ -250,18 +261,24 @@ class ArchiveUtilTestCase(support.TempdirManager,
patch(self, archive_util.zipfile, 'ZipFile', fake_zipfile)
# create something to tar and compress
- tmpdir, tmpdir2, base_name = self._create_files()
- make_zipfile(base_name, tmpdir)
+ tmpdir = self._create_files()
+ base_name = os.path.join(self.mkdtemp(), 'archive')
+ with change_cwd(tmpdir):
+ make_zipfile(base_name, 'dist')
tarball = base_name + '.zip'
self.assertEqual(called,
[((tarball, "w"), {'compression': zipfile.ZIP_STORED})])
self.assertTrue(os.path.exists(tarball))
+ with zipfile.ZipFile(tarball) as zf:
+ self.assertEqual(sorted(zf.namelist()),
+ ['dist/file1', 'dist/file2', 'dist/sub/file3'])
def test_check_archive_formats(self):
self.assertEqual(check_archive_formats(['gztar', 'xxx', 'zip']),
'xxx')
- self.assertEqual(check_archive_formats(['gztar', 'zip']), None)
+ self.assertIsNone(check_archive_formats(['gztar', 'bztar', 'xztar',
+ 'ztar', 'tar', 'zip']))
def test_make_archive(self):
tmpdir = self.mkdtemp()
@@ -282,6 +299,41 @@ class ArchiveUtilTestCase(support.TempdirManager,
finally:
del ARCHIVE_FORMATS['xxx']
+ def test_make_archive_tar(self):
+ base_dir = self._create_files()
+ base_name = os.path.join(self.mkdtemp() , 'archive')
+ res = make_archive(base_name, 'tar', base_dir, 'dist')
+ self.assertTrue(os.path.exists(res))
+ self.assertEqual(os.path.basename(res), 'archive.tar')
+ self.assertEqual(self._tarinfo(res), self._created_files)
+
+ @unittest.skipUnless(ZLIB_SUPPORT, 'Need zlib support to run')
+ def test_make_archive_gztar(self):
+ base_dir = self._create_files()
+ base_name = os.path.join(self.mkdtemp() , 'archive')
+ res = make_archive(base_name, 'gztar', base_dir, 'dist')
+ self.assertTrue(os.path.exists(res))
+ self.assertEqual(os.path.basename(res), 'archive.tar.gz')
+ self.assertEqual(self._tarinfo(res), self._created_files)
+
+ @unittest.skipUnless(bz2, 'Need bz2 support to run')
+ def test_make_archive_bztar(self):
+ base_dir = self._create_files()
+ base_name = os.path.join(self.mkdtemp() , 'archive')
+ res = make_archive(base_name, 'bztar', base_dir, 'dist')
+ self.assertTrue(os.path.exists(res))
+ self.assertEqual(os.path.basename(res), 'archive.tar.bz2')
+ self.assertEqual(self._tarinfo(res), self._created_files)
+
+ @unittest.skipUnless(lzma, 'Need xz support to run')
+ def test_make_archive_xztar(self):
+ base_dir = self._create_files()
+ base_name = os.path.join(self.mkdtemp() , 'archive')
+ res = make_archive(base_name, 'xztar', base_dir, 'dist')
+ self.assertTrue(os.path.exists(res))
+ self.assertEqual(os.path.basename(res), 'archive.tar.xz')
+ self.assertEqual(self._tarinfo(res), self._created_files)
+
def test_make_archive_owner_group(self):
# testing make_archive with owner and group, with various combinations
# this works even if there's not gid/uid support
@@ -291,7 +343,8 @@ class ArchiveUtilTestCase(support.TempdirManager,
else:
group = owner = 'root'
- base_dir, root_dir, base_name = self._create_files()
+ base_dir = self._create_files()
+ root_dir = self.mkdtemp()
base_name = os.path.join(self.mkdtemp() , 'archive')
res = make_archive(base_name, 'zip', root_dir, base_dir, owner=owner,
group=group)
@@ -311,7 +364,8 @@ class ArchiveUtilTestCase(support.TempdirManager,
@unittest.skipUnless(ZLIB_SUPPORT, "Requires zlib")
@unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support")
def test_tarfile_root_owner(self):
- tmpdir, tmpdir2, base_name = self._create_files()
+ tmpdir = self._create_files()
+ base_name = os.path.join(self.mkdtemp(), 'archive')
old_dir = os.getcwd()
os.chdir(tmpdir)
group = grp.getgrgid(0)[0]
diff --git a/Lib/distutils/tests/test_bdist.py b/Lib/distutils/tests/test_bdist.py
index 503a6e857d..f762f5d987 100644
--- a/Lib/distutils/tests/test_bdist.py
+++ b/Lib/distutils/tests/test_bdist.py
@@ -21,7 +21,7 @@ class BuildTestCase(support.TempdirManager,
# what formats does bdist offer?
formats = ['bztar', 'gztar', 'msi', 'rpm', 'tar',
- 'wininst', 'zip', 'ztar']
+ 'wininst', 'xztar', 'zip', 'ztar']
found = sorted(cmd.format_command)
self.assertEqual(found, formats)
diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py
index b9f407f401..8f62b1a848 100644
--- a/Lib/distutils/tests/test_build_ext.py
+++ b/Lib/distutils/tests/test_build_ext.py
@@ -37,6 +37,9 @@ class BuildExtTestCase(TempdirManager,
from distutils.command import build_ext
build_ext.USER_BASE = site.USER_BASE
+ def build_ext(self, *args, **kwargs):
+ return build_ext(*args, **kwargs)
+
def test_build_ext(self):
global ALREADY_TESTED
copy_xxmodule_c(self.tmp_dir)
@@ -44,7 +47,7 @@ class BuildExtTestCase(TempdirManager,
xx_ext = Extension('xx', [xx_c])
dist = Distribution({'name': 'xx', 'ext_modules': [xx_ext]})
dist.package_dir = self.tmp_dir
- cmd = build_ext(dist)
+ cmd = self.build_ext(dist)
fixup_build_ext(cmd)
cmd.build_lib = self.tmp_dir
cmd.build_temp = self.tmp_dir
@@ -91,7 +94,7 @@ class BuildExtTestCase(TempdirManager,
def test_solaris_enable_shared(self):
dist = Distribution({'name': 'xx'})
- cmd = build_ext(dist)
+ cmd = self.build_ext(dist)
old = sys.platform
sys.platform = 'sunos' # fooling finalize_options
@@ -113,7 +116,7 @@ class BuildExtTestCase(TempdirManager,
def test_user_site(self):
import site
dist = Distribution({'name': 'xx'})
- cmd = build_ext(dist)
+ cmd = self.build_ext(dist)
# making sure the user option is there
options = [name for name, short, lable in
@@ -144,14 +147,14 @@ class BuildExtTestCase(TempdirManager,
# with the optional argument.
modules = [Extension('foo', ['xxx'], optional=False)]
dist = Distribution({'name': 'xx', 'ext_modules': modules})
- cmd = build_ext(dist)
+ cmd = self.build_ext(dist)
cmd.ensure_finalized()
self.assertRaises((UnknownFileError, CompileError),
cmd.run) # should raise an error
modules = [Extension('foo', ['xxx'], optional=True)]
dist = Distribution({'name': 'xx', 'ext_modules': modules})
- cmd = build_ext(dist)
+ cmd = self.build_ext(dist)
cmd.ensure_finalized()
cmd.run() # should pass
@@ -160,7 +163,7 @@ class BuildExtTestCase(TempdirManager,
# etc.) are in the include search path.
modules = [Extension('foo', ['xxx'], optional=False)]
dist = Distribution({'name': 'xx', 'ext_modules': modules})
- cmd = build_ext(dist)
+ cmd = self.build_ext(dist)
cmd.finalize_options()
from distutils import sysconfig
@@ -172,14 +175,14 @@ class BuildExtTestCase(TempdirManager,
# make sure cmd.libraries is turned into a list
# if it's a string
- cmd = build_ext(dist)
+ cmd = self.build_ext(dist)
cmd.libraries = 'my_lib, other_lib lastlib'
cmd.finalize_options()
self.assertEqual(cmd.libraries, ['my_lib', 'other_lib', 'lastlib'])
# make sure cmd.library_dirs is turned into a list
# if it's a string
- cmd = build_ext(dist)
+ cmd = self.build_ext(dist)
cmd.library_dirs = 'my_lib_dir%sother_lib_dir' % os.pathsep
cmd.finalize_options()
self.assertIn('my_lib_dir', cmd.library_dirs)
@@ -187,7 +190,7 @@ class BuildExtTestCase(TempdirManager,
# make sure rpath is turned into a list
# if it's a string
- cmd = build_ext(dist)
+ cmd = self.build_ext(dist)
cmd.rpath = 'one%stwo' % os.pathsep
cmd.finalize_options()
self.assertEqual(cmd.rpath, ['one', 'two'])
@@ -196,32 +199,32 @@ class BuildExtTestCase(TempdirManager,
# make sure define is turned into 2-tuples
# strings if they are ','-separated strings
- cmd = build_ext(dist)
+ cmd = self.build_ext(dist)
cmd.define = 'one,two'
cmd.finalize_options()
self.assertEqual(cmd.define, [('one', '1'), ('two', '1')])
# make sure undef is turned into a list of
# strings if they are ','-separated strings
- cmd = build_ext(dist)
+ cmd = self.build_ext(dist)
cmd.undef = 'one,two'
cmd.finalize_options()
self.assertEqual(cmd.undef, ['one', 'two'])
# make sure swig_opts is turned into a list
- cmd = build_ext(dist)
+ cmd = self.build_ext(dist)
cmd.swig_opts = None
cmd.finalize_options()
self.assertEqual(cmd.swig_opts, [])
- cmd = build_ext(dist)
+ cmd = self.build_ext(dist)
cmd.swig_opts = '1 2'
cmd.finalize_options()
self.assertEqual(cmd.swig_opts, ['1', '2'])
def test_check_extensions_list(self):
dist = Distribution()
- cmd = build_ext(dist)
+ cmd = self.build_ext(dist)
cmd.finalize_options()
#'extensions' option must be a list of Extension instances
@@ -270,16 +273,16 @@ class BuildExtTestCase(TempdirManager,
def test_get_source_files(self):
modules = [Extension('foo', ['xxx'], optional=False)]
dist = Distribution({'name': 'xx', 'ext_modules': modules})
- cmd = build_ext(dist)
+ cmd = self.build_ext(dist)
cmd.ensure_finalized()
self.assertEqual(cmd.get_source_files(), ['xxx'])
def test_compiler_option(self):
# cmd.compiler is an option and
- # should not be overriden by a compiler instance
+ # should not be overridden by a compiler instance
# when the command is run
dist = Distribution()
- cmd = build_ext(dist)
+ cmd = self.build_ext(dist)
cmd.compiler = 'unix'
cmd.ensure_finalized()
cmd.run()
@@ -292,7 +295,7 @@ class BuildExtTestCase(TempdirManager,
ext = Extension('foo', [c_file], optional=False)
dist = Distribution({'name': 'xx',
'ext_modules': [ext]})
- cmd = build_ext(dist)
+ cmd = self.build_ext(dist)
fixup_build_ext(cmd)
cmd.ensure_finalized()
self.assertEqual(len(cmd.get_outputs()), 1)
@@ -355,7 +358,7 @@ class BuildExtTestCase(TempdirManager,
#etree_ext = Extension('lxml.etree', [etree_c])
#dist = Distribution({'name': 'lxml', 'ext_modules': [etree_ext]})
dist = Distribution()
- cmd = build_ext(dist)
+ cmd = self.build_ext(dist)
cmd.inplace = 1
cmd.distribution.package_dir = {'': 'src'}
cmd.distribution.packages = ['lxml', 'lxml.html']
@@ -462,7 +465,7 @@ class BuildExtTestCase(TempdirManager,
'ext_modules': [deptarget_ext]
})
dist.package_dir = self.tmp_dir
- cmd = build_ext(dist)
+ cmd = self.build_ext(dist)
cmd.build_lib = self.tmp_dir
cmd.build_temp = self.tmp_dir
@@ -481,8 +484,19 @@ class BuildExtTestCase(TempdirManager,
self.fail("Wrong deployment target during compilation")
+class ParallelBuildExtTestCase(BuildExtTestCase):
+
+ def build_ext(self, *args, **kwargs):
+ build_ext = super().build_ext(*args, **kwargs)
+ build_ext.parallel = True
+ return build_ext
+
+
def test_suite():
- return unittest.makeSuite(BuildExtTestCase)
+ suite = unittest.TestSuite()
+ suite.addTest(unittest.makeSuite(BuildExtTestCase))
+ suite.addTest(unittest.makeSuite(ParallelBuildExtTestCase))
+ return suite
if __name__ == '__main__':
- support.run_unittest(test_suite())
+ support.run_unittest(__name__)
diff --git a/Lib/distutils/tests/test_build_py.py b/Lib/distutils/tests/test_build_py.py
index c8f6b89919..18283dc722 100644
--- a/Lib/distutils/tests/test_build_py.py
+++ b/Lib/distutils/tests/test_build_py.py
@@ -120,8 +120,8 @@ class BuildPyTestCase(support.TempdirManager,
found = os.listdir(cmd.build_lib)
self.assertEqual(sorted(found), ['__pycache__', 'boiledeggs.py'])
found = os.listdir(os.path.join(cmd.build_lib, '__pycache__'))
- self.assertEqual(sorted(found),
- ['boiledeggs.%s.pyo' % sys.implementation.cache_tag])
+ expect = 'boiledeggs.{}.opt-1.pyc'.format(sys.implementation.cache_tag)
+ self.assertEqual(sorted(found), [expect])
def test_dir_in_package_data(self):
"""
diff --git a/Lib/distutils/tests/test_install.py b/Lib/distutils/tests/test_install.py
index 18e1e57505..9313330e2b 100644
--- a/Lib/distutils/tests/test_install.py
+++ b/Lib/distutils/tests/test_install.py
@@ -20,8 +20,6 @@ from distutils.tests import support
def _make_ext_name(modname):
- if os.name == 'nt' and sys.executable.endswith('_d.exe'):
- modname += '_d'
return modname + sysconfig.get_config_var('EXT_SUFFIX')
diff --git a/Lib/distutils/tests/test_install_lib.py b/Lib/distutils/tests/test_install_lib.py
index 40dd1a95a6..5378aa8249 100644
--- a/Lib/distutils/tests/test_install_lib.py
+++ b/Lib/distutils/tests/test_install_lib.py
@@ -44,12 +44,11 @@ class InstallLibTestCase(support.TempdirManager,
f = os.path.join(project_dir, 'foo.py')
self.write_file(f, '# python file')
cmd.byte_compile([f])
- pyc_file = importlib.util.cache_from_source('foo.py',
- debug_override=True)
- pyo_file = importlib.util.cache_from_source('foo.py',
- debug_override=False)
+ pyc_file = importlib.util.cache_from_source('foo.py', optimization='')
+ pyc_opt_file = importlib.util.cache_from_source('foo.py',
+ optimization=cmd.optimize)
self.assertTrue(os.path.exists(pyc_file))
- self.assertTrue(os.path.exists(pyo_file))
+ self.assertTrue(os.path.exists(pyc_opt_file))
def test_get_outputs(self):
project_dir, dist = self.create_dist()
@@ -66,8 +65,8 @@ class InstallLibTestCase(support.TempdirManager,
cmd.distribution.packages = ['spam']
cmd.distribution.script_name = 'setup.py'
- # get_outputs should return 4 elements: spam/__init__.py, .pyc and
- # .pyo, foo.import-tag-abiflags.so / foo.pyd
+ # get_outputs should return 4 elements: spam/__init__.py and .pyc,
+ # foo.import-tag-abiflags.so / foo.pyd
outputs = cmd.get_outputs()
self.assertEqual(len(outputs), 4, outputs)
diff --git a/Lib/distutils/tests/test_msvccompiler.py b/Lib/distutils/tests/test_msvccompiler.py
new file mode 100644
index 0000000000..c4d911ff83
--- /dev/null
+++ b/Lib/distutils/tests/test_msvccompiler.py
@@ -0,0 +1,90 @@
+"""Tests for distutils._msvccompiler."""
+import sys
+import unittest
+import os
+
+from distutils.errors import DistutilsPlatformError
+from distutils.tests import support
+from test.support import run_unittest
+
+
+SKIP_MESSAGE = (None if sys.platform == "win32" else
+ "These tests are only for win32")
+
+@unittest.skipUnless(SKIP_MESSAGE is None, SKIP_MESSAGE)
+class msvccompilerTestCase(support.TempdirManager,
+ unittest.TestCase):
+
+ def test_no_compiler(self):
+ import distutils._msvccompiler as _msvccompiler
+ # makes sure query_vcvarsall raises
+ # a DistutilsPlatformError if the compiler
+ # is not found
+ def _find_vcvarsall(plat_spec):
+ return None, None
+
+ old_find_vcvarsall = _msvccompiler._find_vcvarsall
+ _msvccompiler._find_vcvarsall = _find_vcvarsall
+ try:
+ self.assertRaises(DistutilsPlatformError,
+ _msvccompiler._get_vc_env,
+ 'wont find this version')
+ finally:
+ _msvccompiler._find_vcvarsall = old_find_vcvarsall
+
+ def test_compiler_options(self):
+ import distutils._msvccompiler as _msvccompiler
+ # suppress path to vcruntime from _find_vcvarsall to
+ # check that /MT is added to compile options
+ old_find_vcvarsall = _msvccompiler._find_vcvarsall
+ def _find_vcvarsall(plat_spec):
+ return old_find_vcvarsall(plat_spec)[0], None
+ _msvccompiler._find_vcvarsall = _find_vcvarsall
+ try:
+ compiler = _msvccompiler.MSVCCompiler()
+ compiler.initialize()
+
+ self.assertIn('/MT', compiler.compile_options)
+ self.assertNotIn('/MD', compiler.compile_options)
+ finally:
+ _msvccompiler._find_vcvarsall = old_find_vcvarsall
+
+ def test_vcruntime_copy(self):
+ import distutils._msvccompiler as _msvccompiler
+ # force path to a known file - it doesn't matter
+ # what we copy as long as its name is not in
+ # _msvccompiler._BUNDLED_DLLS
+ old_find_vcvarsall = _msvccompiler._find_vcvarsall
+ def _find_vcvarsall(plat_spec):
+ return old_find_vcvarsall(plat_spec)[0], __file__
+ _msvccompiler._find_vcvarsall = _find_vcvarsall
+ try:
+ tempdir = self.mkdtemp()
+ compiler = _msvccompiler.MSVCCompiler()
+ compiler.initialize()
+ compiler._copy_vcruntime(tempdir)
+
+ self.assertTrue(os.path.isfile(os.path.join(
+ tempdir, os.path.basename(__file__))))
+ finally:
+ _msvccompiler._find_vcvarsall = old_find_vcvarsall
+
+ def test_vcruntime_skip_copy(self):
+ import distutils._msvccompiler as _msvccompiler
+
+ tempdir = self.mkdtemp()
+ compiler = _msvccompiler.MSVCCompiler()
+ compiler.initialize()
+ dll = compiler._vcruntime_redist
+ self.assertTrue(os.path.isfile(dll))
+
+ compiler._copy_vcruntime(tempdir)
+
+ self.assertFalse(os.path.isfile(os.path.join(
+ tempdir, os.path.basename(dll))))
+
+def test_suite():
+ return unittest.makeSuite(msvccompilerTestCase)
+
+if __name__ == "__main__":
+ run_unittest(test_suite())
diff --git a/Lib/distutils/tests/test_register.py b/Lib/distutils/tests/test_register.py
index 6180133994..01acf2375f 100644
--- a/Lib/distutils/tests/test_register.py
+++ b/Lib/distutils/tests/test_register.py
@@ -301,6 +301,20 @@ class RegisterTestCase(PyPIRCCommandTestCase):
results = self.get_logs(INFO)
self.assertEqual(results, ['running check', 'xxx'])
+ def test_show_response(self):
+ # test that the --show-response option return a well formatted response
+ cmd = self._get_cmd()
+ inputs = Inputs('1', 'tarek', 'y')
+ register_module.input = inputs.__call__
+ cmd.show_response = 1
+ try:
+ cmd.run()
+ finally:
+ del register_module.input
+
+ results = self.get_logs(INFO)
+ self.assertEqual(results[3], 75 * '-' + '\nxxx\n' + 75 * '-')
+
def test_suite():
return unittest.makeSuite(RegisterTestCase)
diff --git a/Lib/distutils/tests/test_unixccompiler.py b/Lib/distutils/tests/test_unixccompiler.py
index 3d14e12aa9..e171ee9c4d 100644
--- a/Lib/distutils/tests/test_unixccompiler.py
+++ b/Lib/distutils/tests/test_unixccompiler.py
@@ -127,7 +127,7 @@ class UnixCCompilerTestCase(unittest.TestCase):
self.assertEqual(self.cc.linker_so[0], 'my_cc')
@unittest.skipUnless(sys.platform == 'darwin', 'test only relevant for OS X')
- def test_osx_explict_ldshared(self):
+ def test_osx_explicit_ldshared(self):
# Issue #18080:
# ensure that setting CC env variable does not change
# explicit LDSHARED setting for linker
diff --git a/Lib/distutils/tests/test_upload.py b/Lib/distutils/tests/test_upload.py
index dccaf77e3e..964aac7e80 100644
--- a/Lib/distutils/tests/test_upload.py
+++ b/Lib/distutils/tests/test_upload.py
@@ -1,13 +1,16 @@
"""Tests for distutils.command.upload."""
import os
import unittest
+import unittest.mock as mock
+from urllib.request import HTTPError
+
from test.support import run_unittest
from distutils.command import upload as upload_mod
from distutils.command.upload import upload
from distutils.core import Distribution
from distutils.errors import DistutilsError
-from distutils.log import INFO
+from distutils.log import ERROR, INFO
from distutils.tests.test_config import PYPIRC, PyPIRCCommandTestCase
@@ -137,13 +140,39 @@ class uploadTestCase(PyPIRCCommandTestCase):
# The PyPI response body was echoed
results = self.get_logs(INFO)
- self.assertIn('xyzzy\n', results[-1])
+ self.assertEqual(results[-1], 75 * '-' + '\nxyzzy\n' + 75 * '-')
def test_upload_fails(self):
self.next_msg = "Not Found"
self.next_code = 404
self.assertRaises(DistutilsError, self.test_upload)
+ def test_wrong_exception_order(self):
+ tmp = self.mkdtemp()
+ path = os.path.join(tmp, 'xxx')
+ self.write_file(path)
+ dist_files = [('xxx', '2.6', path)] # command, pyversion, filename
+ self.write_file(self.rc, PYPIRC_LONG_PASSWORD)
+
+ pkg_dir, dist = self.create_dist(dist_files=dist_files)
+ tests = [
+ (OSError('oserror'), 'oserror', OSError),
+ (HTTPError('url', 400, 'httperror', {}, None),
+ 'Upload failed (400): httperror', DistutilsError),
+ ]
+ for exception, expected, raised_exception in tests:
+ with self.subTest(exception=type(exception).__name__):
+ with mock.patch('distutils.command.upload.urlopen',
+ new=mock.Mock(side_effect=exception)):
+ with self.assertRaises(raised_exception):
+ cmd = upload(dist)
+ cmd.ensure_finalized()
+ cmd.run()
+ results = self.get_logs(ERROR)
+ self.assertIn(expected, results[-1])
+ self.clear_logs()
+
+
def test_suite():
return unittest.makeSuite(uploadTestCase)
diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py
index 094a2f0bd0..92d14dfee7 100644
--- a/Lib/distutils/unixccompiler.py
+++ b/Lib/distutils/unixccompiler.py
@@ -76,7 +76,9 @@ class UnixCCompiler(CCompiler):
static_lib_extension = ".a"
shared_lib_extension = ".so"
dylib_lib_extension = ".dylib"
+ xcode_stub_lib_extension = ".tbd"
static_lib_format = shared_lib_format = dylib_lib_format = "lib%s%s"
+ xcode_stub_lib_format = dylib_lib_format
if sys.platform == "cygwin":
exe_extension = ".exe"
@@ -255,12 +257,28 @@ class UnixCCompiler(CCompiler):
def find_library_file(self, dirs, lib, debug=0):
shared_f = self.library_filename(lib, lib_type='shared')
dylib_f = self.library_filename(lib, lib_type='dylib')
+ xcode_stub_f = self.library_filename(lib, lib_type='xcode_stub')
static_f = self.library_filename(lib, lib_type='static')
if sys.platform == 'darwin':
# On OSX users can specify an alternate SDK using
# '-isysroot', calculate the SDK root if it is specified
# (and use it further on)
+ #
+ # Note that, as of Xcode 7, Apple SDKs may contain textual stub
+ # libraries with .tbd extensions rather than the normal .dylib
+ # shared libraries installed in /. The Apple compiler tool
+ # chain handles this transparently but it can cause problems
+ # for programs that are being built with an SDK and searching
+ # for specific libraries. Callers of find_library_file need to
+ # keep in mind that the base filename of the returned SDK library
+ # file might have a different extension from that of the library
+ # file installed on the running system, for example:
+ # /Applications/Xcode.app/Contents/Developer/Platforms/
+ # MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/
+ # usr/lib/libedit.tbd
+ # vs
+ # /usr/lib/libedit.dylib
cflags = sysconfig.get_config_var('CFLAGS')
m = re.search(r'-isysroot\s+(\S+)', cflags)
if m is None:
@@ -274,6 +292,7 @@ class UnixCCompiler(CCompiler):
shared = os.path.join(dir, shared_f)
dylib = os.path.join(dir, dylib_f)
static = os.path.join(dir, static_f)
+ xcode_stub = os.path.join(dir, xcode_stub_f)
if sys.platform == 'darwin' and (
dir.startswith('/System/') or (
@@ -282,6 +301,7 @@ class UnixCCompiler(CCompiler):
shared = os.path.join(sysroot, dir[1:], shared_f)
dylib = os.path.join(sysroot, dir[1:], dylib_f)
static = os.path.join(sysroot, dir[1:], static_f)
+ xcode_stub = os.path.join(sysroot, dir[1:], xcode_stub_f)
# We're second-guessing the linker here, with not much hard
# data to go on: GCC seems to prefer the shared library, so I'm
@@ -289,6 +309,8 @@ class UnixCCompiler(CCompiler):
# ignoring even GCC's "-static" option. So sue me.
if os.path.exists(dylib):
return dylib
+ elif os.path.exists(xcode_stub):
+ return xcode_stub
elif os.path.exists(shared):
return shared
elif os.path.exists(static):
diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py
index 5adcac5a95..e423325de4 100644
--- a/Lib/distutils/util.py
+++ b/Lib/distutils/util.py
@@ -322,11 +322,11 @@ def byte_compile (py_files,
prefix=None, base_dir=None,
verbose=1, dry_run=0,
direct=None):
- """Byte-compile a collection of Python source files to either .pyc
- or .pyo files in a __pycache__ subdirectory. 'py_files' is a list
+ """Byte-compile a collection of Python source files to .pyc
+ files in a __pycache__ subdirectory. 'py_files' is a list
of files to compile; any files that don't end in ".py" are silently
skipped. 'optimize' must be one of the following:
- 0 - don't optimize (generate .pyc)
+ 0 - don't optimize
1 - normal optimization (like "python -O")
2 - extra optimization (like "python -OO")
If 'force' is true, all files are recompiled regardless of
@@ -438,8 +438,9 @@ byte_compile(files, optimize=%r, force=%r,
# cfile - byte-compiled file
# dfile - purported source filename (same as 'file' by default)
if optimize >= 0:
+ opt = '' if optimize == 0 else optimize
cfile = importlib.util.cache_from_source(
- file, debug_override=not optimize)
+ file, optimization=opt)
else:
cfile = importlib.util.cache_from_source(file)
dfile = file
diff --git a/Lib/distutils/version.py b/Lib/distutils/version.py
index ebcab84e4e..af14cc1348 100644
--- a/Lib/distutils/version.py
+++ b/Lib/distutils/version.py
@@ -48,12 +48,6 @@ class Version:
return c
return c == 0
- def __ne__(self, other):
- c = self._cmp(other)
- if c is NotImplemented:
- return c
- return c != 0
-
def __lt__(self, other):
c = self._cmp(other)
if c is NotImplemented:
diff --git a/Lib/doctest.py b/Lib/doctest.py
index 432ef05ef0..38fdd80b4a 100644
--- a/Lib/doctest.py
+++ b/Lib/doctest.py
@@ -399,8 +399,9 @@ def _module_relative_path(module, path):
basedir = os.curdir
else:
# A module w/o __file__ (this includes builtins)
- raise ValueError("Can't resolve paths relative to the module " +
- module + " (it has no __file__)")
+ raise ValueError("Can't resolve paths relative to the module "
+ "%r (it has no __file__)"
+ % module.__name__)
# Combine the base directory and the path.
return os.path.join(basedir, *(path.split('/')))
@@ -530,8 +531,9 @@ class DocTest:
examples = '1 example'
else:
examples = '%d examples' % len(self.examples)
- return ('<DocTest %s from %s:%s (%s)>' %
- (self.name, self.filename, self.lineno, examples))
+ return ('<%s %s from %s:%s (%s)>' %
+ (self.__class__.__name__,
+ self.name, self.filename, self.lineno, examples))
def __eq__(self, other):
if type(self) is not type(other):
@@ -978,7 +980,8 @@ class DocTestFinder:
for valname, val in obj.__dict__.items():
valname = '%s.%s' % (name, valname)
# Recurse to functions & classes.
- if ((inspect.isroutine(val) or inspect.isclass(val)) and
+ if ((inspect.isroutine(inspect.unwrap(val))
+ or inspect.isclass(val)) and
self._from_module(module, val)):
self._find(tests, val, valname, module, source_lines,
globs, seen)
@@ -1049,7 +1052,7 @@ class DocTestFinder:
filename = None
else:
filename = getattr(module, '__file__', module.__name__)
- if filename[-4:] in (".pyc", ".pyo"):
+ if filename[-4:] == ".pyc":
filename = filename[:-1]
return self._parser.get_doctest(docstring, globs, name,
filename, lineno)
@@ -2367,15 +2370,6 @@ def DocTestSuite(module=None, globs=None, extraglobs=None, test_finder=None,
suite = _DocTestSuite()
suite.addTest(SkipDocTestCase(module))
return suite
- elif not tests:
- # Why do we want to do this? Because it reveals a bug that might
- # otherwise be hidden.
- # It is probably a bug that this exception is not also raised if the
- # number of doctest examples in tests is zero (i.e. if no doctest
- # examples were found). However, we should probably not be raising
- # an exception at all here, though it is too late to make this change
- # for a maintenance release. See also issue #14649.
- raise ValueError(module, "has no docstrings")
tests.sort()
suite = _DocTestSuite()
@@ -2385,7 +2379,7 @@ def DocTestSuite(module=None, globs=None, extraglobs=None, test_finder=None,
continue
if not test.filename:
filename = module.__file__
- if filename[-4:] in (".pyc", ".pyo"):
+ if filename[-4:] == ".pyc":
filename = filename[:-1]
test.filename = filename
suite.addTest(DocTestCase(test, **options))
diff --git a/Lib/email/__init__.py b/Lib/email/__init__.py
index ff16f6af3f..fae872439e 100644
--- a/Lib/email/__init__.py
+++ b/Lib/email/__init__.py
@@ -4,8 +4,6 @@
"""A package for parsing, handling, and generating email messages."""
-__version__ = '5.1.0'
-
__all__ = [
'base64mime',
'charset',
diff --git a/Lib/email/_header_value_parser.py b/Lib/email/_header_value_parser.py
index a9bdf4458b..2226e137e1 100644
--- a/Lib/email/_header_value_parser.py
+++ b/Lib/email/_header_value_parser.py
@@ -320,17 +320,18 @@ class TokenList(list):
return ''.join(res)
def _fold(self, folded):
+ encoding = 'utf-8' if folded.policy.utf8 else 'ascii'
for part in self.parts:
tstr = str(part)
tlen = len(tstr)
try:
- str(part).encode('us-ascii')
+ str(part).encode(encoding)
except UnicodeEncodeError:
if any(isinstance(x, errors.UndecodableBytesDefect)
for x in part.all_defects):
charset = 'unknown-8bit'
else:
- # XXX: this should be a policy setting
+ # XXX: this should be a policy setting when utf8 is False.
charset = 'utf-8'
tstr = part.cte_encode(charset, folded.policy)
tlen = len(tstr)
@@ -394,11 +395,12 @@ class UnstructuredTokenList(TokenList):
def _fold(self, folded):
last_ew = None
+ encoding = 'utf-8' if folded.policy.utf8 else 'ascii'
for part in self.parts:
tstr = str(part)
is_ew = False
try:
- str(part).encode('us-ascii')
+ str(part).encode(encoding)
except UnicodeEncodeError:
if any(isinstance(x, errors.UndecodableBytesDefect)
for x in part.all_defects):
@@ -475,12 +477,13 @@ class Phrase(TokenList):
# comment that becomes a barrier across which we can't compose encoded
# words.
last_ew = None
+ encoding = 'utf-8' if folded.policy.utf8 else 'ascii'
for part in self.parts:
tstr = str(part)
tlen = len(tstr)
has_ew = False
try:
- str(part).encode('us-ascii')
+ str(part).encode(encoding)
except UnicodeEncodeError:
if any(isinstance(x, errors.UndecodableBytesDefect)
for x in part.all_defects):
@@ -1519,7 +1522,7 @@ def get_qp_ctext(value):
This is not the RFC ctext, since we are handling nested comments in comment
and unquoting quoted-pairs here. We allow anything except the '()'
characters, but if we find any ASCII other than the RFC defined printable
- ASCII an NonPrintableDefect is added to the token's defects list. Since
+ ASCII, a NonPrintableDefect is added to the token's defects list. Since
quoted pairs are converted to their unquoted values, what is returned is
a 'ptext' token. In this case it is a WhiteSpaceTerminal, so it's value
is ' '.
@@ -1534,7 +1537,7 @@ def get_qcontent(value):
"""qcontent = qtext / quoted-pair
We allow anything except the DQUOTE character, but if we find any ASCII
- other than the RFC defined printable ASCII an NonPrintableDefect is
+ other than the RFC defined printable ASCII, a NonPrintableDefect is
added to the token's defects list. Any quoted pairs are converted to their
unquoted values, so what is returned is a 'ptext' token. In this case it
is a ValueTerminal.
@@ -1879,7 +1882,7 @@ def get_dtext(value):
obs-dtext = obs-NO-WS-CTL / quoted-pair
We allow anything except the excluded characters, but if we find any
- ASCII other than the RFC defined printable ASCII an NonPrintableDefect is
+ ASCII other than the RFC defined printable ASCII, a NonPrintableDefect is
added to the token's defects list. Quoted pairs are converted to their
unquoted values, so what is returned is a ptext token, in this case a
ValueTerminal. If there were quoted-printables, an ObsoleteHeaderDefect is
@@ -2869,7 +2872,7 @@ def parse_content_type_header(value):
_find_mime_parameters(ctype, value)
return ctype
ctype.append(token)
- # XXX: If we really want to follow the formal grammer we should make
+ # XXX: If we really want to follow the formal grammar we should make
# mantype and subtype specialized TokenLists here. Probably not worth it.
if not value or value[0] != '/':
ctype.defects.append(errors.InvalidHeaderDefect(
diff --git a/Lib/email/_policybase.py b/Lib/email/_policybase.py
index 81061149c3..c0d98a4f54 100644
--- a/Lib/email/_policybase.py
+++ b/Lib/email/_policybase.py
@@ -149,12 +149,18 @@ class Policy(_PolicyBase, metaclass=abc.ABCMeta):
during serialization. None or 0 means no line
wrapping is done. Default is 78.
+ mangle_from_ -- a flag that, when True escapes From_ lines in the
+ body of the message by putting a `>' in front of
+ them. This is used when the message is being
+ serialized by a generator. Default: True.
+
"""
raise_on_defect = False
linesep = '\n'
cte_type = '8bit'
max_line_length = 78
+ mangle_from_ = False
def handle_defect(self, obj, defect):
"""Based on policy, either raise defect or call register_defect.
@@ -266,6 +272,8 @@ class Compat32(Policy):
replicates the behavior of the email package version 5.1.
"""
+ mangle_from_ = True
+
def _sanitize_header(self, name, value):
# If the header value contains surrogates, return a Header using
# the unknown-8bit charset to encode the bytes as encoded words.
diff --git a/Lib/email/charset.py b/Lib/email/charset.py
index e999472355..ee564040c6 100644
--- a/Lib/email/charset.py
+++ b/Lib/email/charset.py
@@ -249,9 +249,6 @@ class Charset:
def __eq__(self, other):
return str(self) == str(other).lower()
- def __ne__(self, other):
- return not self.__eq__(other)
-
def get_body_encoding(self):
"""Return the content-transfer-encoding used for body encoding.
diff --git a/Lib/email/feedparser.py b/Lib/email/feedparser.py
index c95b27f12f..e2e3e96a15 100644
--- a/Lib/email/feedparser.py
+++ b/Lib/email/feedparser.py
@@ -26,6 +26,7 @@ import re
from email import errors
from email import message
from email._policybase import compat32
+from collections import deque
NLCRE = re.compile('\r\n|\r|\n')
NLCRE_bol = re.compile('(\r\n|\r|\n)')
@@ -52,8 +53,8 @@ class BufferedSubFile(object):
def __init__(self):
# Chunks of the last partial line pushed into this object.
self._partial = []
- # The list of full, pushed lines, in reverse order
- self._lines = []
+ # A deque of full, pushed lines
+ self._lines = deque()
# The stack of false-EOF checking predicates.
self._eofstack = []
# A flag indicating whether the file has been closed or not.
@@ -78,21 +79,21 @@ class BufferedSubFile(object):
return NeedMoreData
# Pop the line off the stack and see if it matches the current
# false-EOF predicate.
- line = self._lines.pop()
+ line = self._lines.popleft()
# RFC 2046, section 5.1.2 requires us to recognize outer level
# boundaries at any level of inner nesting. Do this, but be sure it's
# in the order of most to least nested.
- for ateof in self._eofstack[::-1]:
+ for ateof in reversed(self._eofstack):
if ateof(line):
# We're at the false EOF. But push the last line back first.
- self._lines.append(line)
+ self._lines.appendleft(line)
return ''
return line
def unreadline(self, line):
# Let the consumer push a line back into the buffer.
assert line is not NeedMoreData
- self._lines.append(line)
+ self._lines.appendleft(line)
def push(self, data):
"""Push some new data into this object."""
@@ -119,8 +120,7 @@ class BufferedSubFile(object):
self.pushlines(parts)
def pushlines(self, lines):
- # Reverse and insert at the front of the lines.
- self._lines[:0] = lines[::-1]
+ self._lines.extend(lines)
def __iter__(self):
return self
diff --git a/Lib/email/generator.py b/Lib/email/generator.py
index 4735721bb0..11ff16df9a 100644
--- a/Lib/email/generator.py
+++ b/Lib/email/generator.py
@@ -32,16 +32,16 @@ class Generator:
# Public interface
#
- def __init__(self, outfp, mangle_from_=True, maxheaderlen=None, *,
+ def __init__(self, outfp, mangle_from_=None, maxheaderlen=None, *,
policy=None):
"""Create the generator for message flattening.
outfp is the output file-like object for writing the message to. It
must have a write() method.
- Optional mangle_from_ is a flag that, when True (the default), escapes
- From_ lines in the body of the message by putting a `>' in front of
- them.
+ Optional mangle_from_ is a flag that, when True (the default if policy
+ is not set), escapes From_ lines in the body of the message by putting
+ a `>' in front of them.
Optional maxheaderlen specifies the longest length for a non-continued
header. When a header line is longer (in characters, with tabs
@@ -56,6 +56,9 @@ class Generator:
flatten method is used.
"""
+
+ if mangle_from_ is None:
+ mangle_from_ = True if policy is None else policy.mangle_from_
self._fp = outfp
self._mangle_from_ = mangle_from_
self.maxheaderlen = maxheaderlen
@@ -449,7 +452,7 @@ class DecodedGenerator(Generator):
Like the Generator base class, except that non-text parts are substituted
with a format string representing the part.
"""
- def __init__(self, outfp, mangle_from_=True, maxheaderlen=78, fmt=None):
+ def __init__(self, outfp, mangle_from_=None, maxheaderlen=78, fmt=None):
"""Like Generator.__init__() except that an additional optional
argument is allowed.
diff --git a/Lib/email/header.py b/Lib/email/header.py
index 9c89589e6e..6820ea16ba 100644
--- a/Lib/email/header.py
+++ b/Lib/email/header.py
@@ -262,9 +262,6 @@ class Header:
# args and do another comparison.
return other == str(self)
- def __ne__(self, other):
- return not self == other
-
def append(self, s, charset=None, errors='strict'):
"""Append a string to the MIME header.
diff --git a/Lib/email/headerregistry.py b/Lib/email/headerregistry.py
index 911a2afea7..0fc2231e5c 100644
--- a/Lib/email/headerregistry.py
+++ b/Lib/email/headerregistry.py
@@ -16,7 +16,7 @@ from email import _header_value_parser as parser
class Address:
def __init__(self, display_name='', username='', domain='', addr_spec=None):
- """Create an object represeting a full email address.
+ """Create an object representing a full email address.
An address can have a 'display_name', a 'username', and a 'domain'. In
addition to specifying the username and domain separately, they may be
@@ -81,7 +81,8 @@ class Address:
return lp
def __repr__(self):
- return "Address(display_name={!r}, username={!r}, domain={!r})".format(
+ return "{}(display_name={!r}, username={!r}, domain={!r})".format(
+ self.__class__.__name__,
self.display_name, self.username, self.domain)
def __str__(self):
@@ -108,7 +109,7 @@ class Group:
def __init__(self, display_name=None, addresses=None):
"""Create an object representing an address group.
- An address group consists of a display_name followed by colon and an
+ An address group consists of a display_name followed by colon and a
list of addresses (see Address) terminated by a semi-colon. The Group
is created by specifying a display_name and a possibly empty list of
Address objects. A Group can also be used to represent a single
@@ -132,7 +133,8 @@ class Group:
return self._addresses
def __repr__(self):
- return "Group(display_name={!r}, addresses={!r}".format(
+ return "{}(display_name={!r}, addresses={!r}".format(
+ self.__class__.__name__,
self.display_name, self.addresses)
def __str__(self):
diff --git a/Lib/email/message.py b/Lib/email/message.py
index 2f37dbb892..aefaf57d00 100644
--- a/Lib/email/message.py
+++ b/Lib/email/message.py
@@ -710,7 +710,7 @@ class Message:
message, it will be set to "text/plain" and the new parameter and
value will be appended as per RFC 2045.
- An alternate header can specified in the header argument, and all
+ An alternate header can be specified in the header argument, and all
parameters will be quoted as necessary unless requote is False.
If charset is specified, the parameter will be encoded according to RFC
@@ -927,20 +927,21 @@ class Message:
"""
return [part.get_content_charset(failobj) for part in self.walk()]
+ def get_content_disposition(self):
+ """Return the message's content-disposition if it exists, or None.
+
+ The return values can be either 'inline', 'attachment' or None
+ according to the rfc2183.
+ """
+ value = self.get('content-disposition')
+ if value is None:
+ return None
+ c_d = _splitparam(value)[0].lower()
+ return c_d
+
# I.e. def walk(self): ...
from email.iterators import walk
-# XXX Support for temporary deprecation hack for is_attachment property.
-class _IsAttachment:
- def __init__(self, value):
- self.value = value
- def __call__(self):
- return self.value
- def __bool__(self):
- warnings.warn("is_attachment will be a method, not a property, in 3.5",
- DeprecationWarning,
- stacklevel=3)
- return self.value
class MIMEPart(Message):
@@ -950,12 +951,9 @@ class MIMEPart(Message):
policy = default
Message.__init__(self, policy)
- @property
def is_attachment(self):
c_d = self.get('content-disposition')
- result = False if c_d is None else c_d.content_disposition == 'attachment'
- # XXX transitional hack to raise deprecation if not called.
- return _IsAttachment(result)
+ return False if c_d is None else c_d.content_disposition == 'attachment'
def _find_body(self, part, preferencelist):
if part.is_attachment():
diff --git a/Lib/email/mime/text.py b/Lib/email/mime/text.py
index ec18b8594d..479928ec94 100644
--- a/Lib/email/mime/text.py
+++ b/Lib/email/mime/text.py
@@ -6,6 +6,7 @@
__all__ = ['MIMEText']
+from email.charset import Charset
from email.mime.nonmultipart import MIMENonMultipart
@@ -34,6 +35,8 @@ class MIMEText(MIMENonMultipart):
_charset = 'us-ascii'
except UnicodeEncodeError:
_charset = 'utf-8'
+ if isinstance(_charset, Charset):
+ _charset = str(_charset)
MIMENonMultipart.__init__(self, 'text', _subtype,
**{'charset': _charset})
diff --git a/Lib/email/parser.py b/Lib/email/parser.py
index 8c9bc9e44e..555b172560 100644
--- a/Lib/email/parser.py
+++ b/Lib/email/parser.py
@@ -23,7 +23,7 @@ class Parser:
textual representation of the message.
The string must be formatted as a block of RFC 2822 headers and header
- continuation lines, optionally preceeded by a `Unix-from' header. The
+ continuation lines, optionally preceded by a `Unix-from' header. The
header block is terminated either by the end of the string or by a
blank line.
@@ -87,7 +87,7 @@ class BytesParser:
textual representation of the message.
The input must be formatted as a block of RFC 2822 headers and header
- continuation lines, optionally preceeded by a `Unix-from' header. The
+ continuation lines, optionally preceded by a `Unix-from' header. The
header block is terminated either by the end of the input or by a
blank line.
diff --git a/Lib/email/policy.py b/Lib/email/policy.py
index f0b20f4b19..6ac64a5683 100644
--- a/Lib/email/policy.py
+++ b/Lib/email/policy.py
@@ -35,6 +35,13 @@ class EmailPolicy(Policy):
In addition to the settable attributes listed above that apply to
all Policies, this policy adds the following additional attributes:
+ utf8 -- if False (the default) message headers will be
+ serialized as ASCII, using encoded words to encode
+ any non-ASCII characters in the source strings. If
+ True, the message headers will be serialized using
+ utf8 and will not contain encoded words (see RFC
+ 6532 for more on this serialization format).
+
refold_source -- if the value for a header in the Message object
came from the parsing of some source, this attribute
indicates whether or not a generator should refold
@@ -72,6 +79,7 @@ class EmailPolicy(Policy):
"""
+ utf8 = False
refold_source = 'long'
header_factory = HeaderRegistry()
content_manager = raw_data_manager
@@ -175,9 +183,13 @@ class EmailPolicy(Policy):
refold_header setting, since there is no way to know whether the binary
data consists of single byte characters or multibyte characters.
+ If utf8 is true, headers are encoded to utf8, otherwise to ascii with
+ non-ASCII unicode rendered as encoded words.
+
"""
folded = self._fold(name, value, refold_binary=self.cte_type=='7bit')
- return folded.encode('ascii', 'surrogateescape')
+ charset = 'utf8' if self.utf8 else 'ascii'
+ return folded.encode(charset, 'surrogateescape')
def _fold(self, name, value, refold_binary=False):
if hasattr(value, 'name'):
@@ -199,3 +211,4 @@ del default.header_factory
strict = default.clone(raise_on_defect=True)
SMTP = default.clone(linesep='\r\n')
HTTP = default.clone(linesep='\r\n', max_line_length=None)
+SMTPUTF8 = SMTP.clone(utf8=True)
diff --git a/Lib/email/utils.py b/Lib/email/utils.py
index 5080d81909..a759d23308 100644
--- a/Lib/email/utils.py
+++ b/Lib/email/utils.py
@@ -87,7 +87,7 @@ def formataddr(pair, charset='utf-8'):
'utf-8'.
"""
name, address = pair
- # The address MUST (per RFC) be ascii, so raise an UnicodeError if it isn't.
+ # The address MUST (per RFC) be ascii, so raise a UnicodeError if it isn't.
address.encode('ascii')
if name:
try:
diff --git a/Lib/encodings/aliases.py b/Lib/encodings/aliases.py
index 4cbaadea3e..67c828d639 100644
--- a/Lib/encodings/aliases.py
+++ b/Lib/encodings/aliases.py
@@ -412,6 +412,11 @@ aliases = {
# koi8_r codec
'cskoi8r' : 'koi8_r',
+ # kz1048 codec
+ 'kz_1048' : 'kz1048',
+ 'rk1048' : 'kz1048',
+ 'strk1048_2002' : 'kz1048',
+
# latin_1 codec
#
# Note that the latin_1 codec is implemented internally in C and a
diff --git a/Lib/encodings/cp65001.py b/Lib/encodings/cp65001.py
index 287eb877fe..95cb2aecf0 100644
--- a/Lib/encodings/cp65001.py
+++ b/Lib/encodings/cp65001.py
@@ -11,20 +11,23 @@ if not hasattr(codecs, 'code_page_encode'):
### Codec APIs
encode = functools.partial(codecs.code_page_encode, 65001)
-decode = functools.partial(codecs.code_page_decode, 65001)
+_decode = functools.partial(codecs.code_page_decode, 65001)
+
+def decode(input, errors='strict'):
+ return codecs.code_page_decode(65001, input, errors, True)
class IncrementalEncoder(codecs.IncrementalEncoder):
def encode(self, input, final=False):
return encode(input, self.errors)[0]
class IncrementalDecoder(codecs.BufferedIncrementalDecoder):
- _buffer_decode = decode
+ _buffer_decode = _decode
class StreamWriter(codecs.StreamWriter):
encode = encode
class StreamReader(codecs.StreamReader):
- decode = decode
+ decode = _decode
### encodings module API
diff --git a/Lib/encodings/hp_roman8.py b/Lib/encodings/hp_roman8.py
index 2334208812..58de1033c1 100644
--- a/Lib/encodings/hp_roman8.py
+++ b/Lib/encodings/hp_roman8.py
@@ -5,6 +5,8 @@
Original source: LaserJet IIP Printer User's Manual HP part no
33471-90901, Hewlet-Packard, June 1989.
+ (Used with permission)
+
"""#"
import codecs
diff --git a/Lib/encodings/koi8_t.py b/Lib/encodings/koi8_t.py
new file mode 100644
index 0000000000..b5415ba366
--- /dev/null
+++ b/Lib/encodings/koi8_t.py
@@ -0,0 +1,308 @@
+""" Python Character Mapping Codec koi8_t
+"""
+# http://ru.wikipedia.org/wiki/КОИ-8
+# http://www.opensource.apple.com/source/libiconv/libiconv-4/libiconv/tests/KOI8-T.TXT
+
+import codecs
+
+### Codec APIs
+
+class Codec(codecs.Codec):
+
+ def encode(self,input,errors='strict'):
+ return codecs.charmap_encode(input,errors,encoding_table)
+
+ def decode(self,input,errors='strict'):
+ return codecs.charmap_decode(input,errors,decoding_table)
+
+class IncrementalEncoder(codecs.IncrementalEncoder):
+ def encode(self, input, final=False):
+ return codecs.charmap_encode(input,self.errors,encoding_table)[0]
+
+class IncrementalDecoder(codecs.IncrementalDecoder):
+ def decode(self, input, final=False):
+ return codecs.charmap_decode(input,self.errors,decoding_table)[0]
+
+class StreamWriter(Codec,codecs.StreamWriter):
+ pass
+
+class StreamReader(Codec,codecs.StreamReader):
+ pass
+
+### encodings module API
+
+def getregentry():
+ return codecs.CodecInfo(
+ name='koi8-t',
+ encode=Codec().encode,
+ decode=Codec().decode,
+ incrementalencoder=IncrementalEncoder,
+ incrementaldecoder=IncrementalDecoder,
+ streamreader=StreamReader,
+ streamwriter=StreamWriter,
+ )
+
+
+### Decoding Table
+
+decoding_table = (
+ '\x00' # 0x00 -> NULL
+ '\x01' # 0x01 -> START OF HEADING
+ '\x02' # 0x02 -> START OF TEXT
+ '\x03' # 0x03 -> END OF TEXT
+ '\x04' # 0x04 -> END OF TRANSMISSION
+ '\x05' # 0x05 -> ENQUIRY
+ '\x06' # 0x06 -> ACKNOWLEDGE
+ '\x07' # 0x07 -> BELL
+ '\x08' # 0x08 -> BACKSPACE
+ '\t' # 0x09 -> HORIZONTAL TABULATION
+ '\n' # 0x0A -> LINE FEED
+ '\x0b' # 0x0B -> VERTICAL TABULATION
+ '\x0c' # 0x0C -> FORM FEED
+ '\r' # 0x0D -> CARRIAGE RETURN
+ '\x0e' # 0x0E -> SHIFT OUT
+ '\x0f' # 0x0F -> SHIFT IN
+ '\x10' # 0x10 -> DATA LINK ESCAPE
+ '\x11' # 0x11 -> DEVICE CONTROL ONE
+ '\x12' # 0x12 -> DEVICE CONTROL TWO
+ '\x13' # 0x13 -> DEVICE CONTROL THREE
+ '\x14' # 0x14 -> DEVICE CONTROL FOUR
+ '\x15' # 0x15 -> NEGATIVE ACKNOWLEDGE
+ '\x16' # 0x16 -> SYNCHRONOUS IDLE
+ '\x17' # 0x17 -> END OF TRANSMISSION BLOCK
+ '\x18' # 0x18 -> CANCEL
+ '\x19' # 0x19 -> END OF MEDIUM
+ '\x1a' # 0x1A -> SUBSTITUTE
+ '\x1b' # 0x1B -> ESCAPE
+ '\x1c' # 0x1C -> FILE SEPARATOR
+ '\x1d' # 0x1D -> GROUP SEPARATOR
+ '\x1e' # 0x1E -> RECORD SEPARATOR
+ '\x1f' # 0x1F -> UNIT SEPARATOR
+ ' ' # 0x20 -> SPACE
+ '!' # 0x21 -> EXCLAMATION MARK
+ '"' # 0x22 -> QUOTATION MARK
+ '#' # 0x23 -> NUMBER SIGN
+ '$' # 0x24 -> DOLLAR SIGN
+ '%' # 0x25 -> PERCENT SIGN
+ '&' # 0x26 -> AMPERSAND
+ "'" # 0x27 -> APOSTROPHE
+ '(' # 0x28 -> LEFT PARENTHESIS
+ ')' # 0x29 -> RIGHT PARENTHESIS
+ '*' # 0x2A -> ASTERISK
+ '+' # 0x2B -> PLUS SIGN
+ ',' # 0x2C -> COMMA
+ '-' # 0x2D -> HYPHEN-MINUS
+ '.' # 0x2E -> FULL STOP
+ '/' # 0x2F -> SOLIDUS
+ '0' # 0x30 -> DIGIT ZERO
+ '1' # 0x31 -> DIGIT ONE
+ '2' # 0x32 -> DIGIT TWO
+ '3' # 0x33 -> DIGIT THREE
+ '4' # 0x34 -> DIGIT FOUR
+ '5' # 0x35 -> DIGIT FIVE
+ '6' # 0x36 -> DIGIT SIX
+ '7' # 0x37 -> DIGIT SEVEN
+ '8' # 0x38 -> DIGIT EIGHT
+ '9' # 0x39 -> DIGIT NINE
+ ':' # 0x3A -> COLON
+ ';' # 0x3B -> SEMICOLON
+ '<' # 0x3C -> LESS-THAN SIGN
+ '=' # 0x3D -> EQUALS SIGN
+ '>' # 0x3E -> GREATER-THAN SIGN
+ '?' # 0x3F -> QUESTION MARK
+ '@' # 0x40 -> COMMERCIAL AT
+ 'A' # 0x41 -> LATIN CAPITAL LETTER A
+ 'B' # 0x42 -> LATIN CAPITAL LETTER B
+ 'C' # 0x43 -> LATIN CAPITAL LETTER C
+ 'D' # 0x44 -> LATIN CAPITAL LETTER D
+ 'E' # 0x45 -> LATIN CAPITAL LETTER E
+ 'F' # 0x46 -> LATIN CAPITAL LETTER F
+ 'G' # 0x47 -> LATIN CAPITAL LETTER G
+ 'H' # 0x48 -> LATIN CAPITAL LETTER H
+ 'I' # 0x49 -> LATIN CAPITAL LETTER I
+ 'J' # 0x4A -> LATIN CAPITAL LETTER J
+ 'K' # 0x4B -> LATIN CAPITAL LETTER K
+ 'L' # 0x4C -> LATIN CAPITAL LETTER L
+ 'M' # 0x4D -> LATIN CAPITAL LETTER M
+ 'N' # 0x4E -> LATIN CAPITAL LETTER N
+ 'O' # 0x4F -> LATIN CAPITAL LETTER O
+ 'P' # 0x50 -> LATIN CAPITAL LETTER P
+ 'Q' # 0x51 -> LATIN CAPITAL LETTER Q
+ 'R' # 0x52 -> LATIN CAPITAL LETTER R
+ 'S' # 0x53 -> LATIN CAPITAL LETTER S
+ 'T' # 0x54 -> LATIN CAPITAL LETTER T
+ 'U' # 0x55 -> LATIN CAPITAL LETTER U
+ 'V' # 0x56 -> LATIN CAPITAL LETTER V
+ 'W' # 0x57 -> LATIN CAPITAL LETTER W
+ 'X' # 0x58 -> LATIN CAPITAL LETTER X
+ 'Y' # 0x59 -> LATIN CAPITAL LETTER Y
+ 'Z' # 0x5A -> LATIN CAPITAL LETTER Z
+ '[' # 0x5B -> LEFT SQUARE BRACKET
+ '\\' # 0x5C -> REVERSE SOLIDUS
+ ']' # 0x5D -> RIGHT SQUARE BRACKET
+ '^' # 0x5E -> CIRCUMFLEX ACCENT
+ '_' # 0x5F -> LOW LINE
+ '`' # 0x60 -> GRAVE ACCENT
+ 'a' # 0x61 -> LATIN SMALL LETTER A
+ 'b' # 0x62 -> LATIN SMALL LETTER B
+ 'c' # 0x63 -> LATIN SMALL LETTER C
+ 'd' # 0x64 -> LATIN SMALL LETTER D
+ 'e' # 0x65 -> LATIN SMALL LETTER E
+ 'f' # 0x66 -> LATIN SMALL LETTER F
+ 'g' # 0x67 -> LATIN SMALL LETTER G
+ 'h' # 0x68 -> LATIN SMALL LETTER H
+ 'i' # 0x69 -> LATIN SMALL LETTER I
+ 'j' # 0x6A -> LATIN SMALL LETTER J
+ 'k' # 0x6B -> LATIN SMALL LETTER K
+ 'l' # 0x6C -> LATIN SMALL LETTER L
+ 'm' # 0x6D -> LATIN SMALL LETTER M
+ 'n' # 0x6E -> LATIN SMALL LETTER N
+ 'o' # 0x6F -> LATIN SMALL LETTER O
+ 'p' # 0x70 -> LATIN SMALL LETTER P
+ 'q' # 0x71 -> LATIN SMALL LETTER Q
+ 'r' # 0x72 -> LATIN SMALL LETTER R
+ 's' # 0x73 -> LATIN SMALL LETTER S
+ 't' # 0x74 -> LATIN SMALL LETTER T
+ 'u' # 0x75 -> LATIN SMALL LETTER U
+ 'v' # 0x76 -> LATIN SMALL LETTER V
+ 'w' # 0x77 -> LATIN SMALL LETTER W
+ 'x' # 0x78 -> LATIN SMALL LETTER X
+ 'y' # 0x79 -> LATIN SMALL LETTER Y
+ 'z' # 0x7A -> LATIN SMALL LETTER Z
+ '{' # 0x7B -> LEFT CURLY BRACKET
+ '|' # 0x7C -> VERTICAL LINE
+ '}' # 0x7D -> RIGHT CURLY BRACKET
+ '~' # 0x7E -> TILDE
+ '\x7f' # 0x7F -> DELETE
+ '\u049b' # 0x80 -> CYRILLIC SMALL LETTER KA WITH DESCENDER
+ '\u0493' # 0x81 -> CYRILLIC SMALL LETTER GHE WITH STROKE
+ '\u201a' # 0x82 -> SINGLE LOW-9 QUOTATION MARK
+ '\u0492' # 0x83 -> CYRILLIC CAPITAL LETTER GHE WITH STROKE
+ '\u201e' # 0x84 -> DOUBLE LOW-9 QUOTATION MARK
+ '\u2026' # 0x85 -> HORIZONTAL ELLIPSIS
+ '\u2020' # 0x86 -> DAGGER
+ '\u2021' # 0x87 -> DOUBLE DAGGER
+ '\ufffe' # 0x88 -> UNDEFINED
+ '\u2030' # 0x89 -> PER MILLE SIGN
+ '\u04b3' # 0x8A -> CYRILLIC SMALL LETTER HA WITH DESCENDER
+ '\u2039' # 0x8B -> SINGLE LEFT-POINTING ANGLE QUOTATION MARK
+ '\u04b2' # 0x8C -> CYRILLIC CAPITAL LETTER HA WITH DESCENDER
+ '\u04b7' # 0x8D -> CYRILLIC SMALL LETTER CHE WITH DESCENDER
+ '\u04b6' # 0x8E -> CYRILLIC CAPITAL LETTER CHE WITH DESCENDER
+ '\ufffe' # 0x8F -> UNDEFINED
+ '\u049a' # 0x90 -> CYRILLIC CAPITAL LETTER KA WITH DESCENDER
+ '\u2018' # 0x91 -> LEFT SINGLE QUOTATION MARK
+ '\u2019' # 0x92 -> RIGHT SINGLE QUOTATION MARK
+ '\u201c' # 0x93 -> LEFT DOUBLE QUOTATION MARK
+ '\u201d' # 0x94 -> RIGHT DOUBLE QUOTATION MARK
+ '\u2022' # 0x95 -> BULLET
+ '\u2013' # 0x96 -> EN DASH
+ '\u2014' # 0x97 -> EM DASH
+ '\ufffe' # 0x98 -> UNDEFINED
+ '\u2122' # 0x99 -> TRADE MARK SIGN
+ '\ufffe' # 0x9A -> UNDEFINED
+ '\u203a' # 0x9B -> SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
+ '\ufffe' # 0x9C -> UNDEFINED
+ '\ufffe' # 0x9D -> UNDEFINED
+ '\ufffe' # 0x9E -> UNDEFINED
+ '\ufffe' # 0x9F -> UNDEFINED
+ '\ufffe' # 0xA0 -> UNDEFINED
+ '\u04ef' # 0xA1 -> CYRILLIC SMALL LETTER U WITH MACRON
+ '\u04ee' # 0xA2 -> CYRILLIC CAPITAL LETTER U WITH MACRON
+ '\u0451' # 0xA3 -> CYRILLIC SMALL LETTER IO
+ '\xa4' # 0xA4 -> CURRENCY SIGN
+ '\u04e3' # 0xA5 -> CYRILLIC SMALL LETTER I WITH MACRON
+ '\xa6' # 0xA6 -> BROKEN BAR
+ '\xa7' # 0xA7 -> SECTION SIGN
+ '\ufffe' # 0xA8 -> UNDEFINED
+ '\ufffe' # 0xA9 -> UNDEFINED
+ '\ufffe' # 0xAA -> UNDEFINED
+ '\xab' # 0xAB -> LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+ '\xac' # 0xAC -> NOT SIGN
+ '\xad' # 0xAD -> SOFT HYPHEN
+ '\xae' # 0xAE -> REGISTERED SIGN
+ '\ufffe' # 0xAF -> UNDEFINED
+ '\xb0' # 0xB0 -> DEGREE SIGN
+ '\xb1' # 0xB1 -> PLUS-MINUS SIGN
+ '\xb2' # 0xB2 -> SUPERSCRIPT TWO
+ '\u0401' # 0xB3 -> CYRILLIC CAPITAL LETTER IO
+ '\ufffe' # 0xB4 -> UNDEFINED
+ '\u04e2' # 0xB5 -> CYRILLIC CAPITAL LETTER I WITH MACRON
+ '\xb6' # 0xB6 -> PILCROW SIGN
+ '\xb7' # 0xB7 -> MIDDLE DOT
+ '\ufffe' # 0xB8 -> UNDEFINED
+ '\u2116' # 0xB9 -> NUMERO SIGN
+ '\ufffe' # 0xBA -> UNDEFINED
+ '\xbb' # 0xBB -> RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+ '\ufffe' # 0xBC -> UNDEFINED
+ '\ufffe' # 0xBD -> UNDEFINED
+ '\ufffe' # 0xBE -> UNDEFINED
+ '\xa9' # 0xBF -> COPYRIGHT SIGN
+ '\u044e' # 0xC0 -> CYRILLIC SMALL LETTER YU
+ '\u0430' # 0xC1 -> CYRILLIC SMALL LETTER A
+ '\u0431' # 0xC2 -> CYRILLIC SMALL LETTER BE
+ '\u0446' # 0xC3 -> CYRILLIC SMALL LETTER TSE
+ '\u0434' # 0xC4 -> CYRILLIC SMALL LETTER DE
+ '\u0435' # 0xC5 -> CYRILLIC SMALL LETTER IE
+ '\u0444' # 0xC6 -> CYRILLIC SMALL LETTER EF
+ '\u0433' # 0xC7 -> CYRILLIC SMALL LETTER GHE
+ '\u0445' # 0xC8 -> CYRILLIC SMALL LETTER HA
+ '\u0438' # 0xC9 -> CYRILLIC SMALL LETTER I
+ '\u0439' # 0xCA -> CYRILLIC SMALL LETTER SHORT I
+ '\u043a' # 0xCB -> CYRILLIC SMALL LETTER KA
+ '\u043b' # 0xCC -> CYRILLIC SMALL LETTER EL
+ '\u043c' # 0xCD -> CYRILLIC SMALL LETTER EM
+ '\u043d' # 0xCE -> CYRILLIC SMALL LETTER EN
+ '\u043e' # 0xCF -> CYRILLIC SMALL LETTER O
+ '\u043f' # 0xD0 -> CYRILLIC SMALL LETTER PE
+ '\u044f' # 0xD1 -> CYRILLIC SMALL LETTER YA
+ '\u0440' # 0xD2 -> CYRILLIC SMALL LETTER ER
+ '\u0441' # 0xD3 -> CYRILLIC SMALL LETTER ES
+ '\u0442' # 0xD4 -> CYRILLIC SMALL LETTER TE
+ '\u0443' # 0xD5 -> CYRILLIC SMALL LETTER U
+ '\u0436' # 0xD6 -> CYRILLIC SMALL LETTER ZHE
+ '\u0432' # 0xD7 -> CYRILLIC SMALL LETTER VE
+ '\u044c' # 0xD8 -> CYRILLIC SMALL LETTER SOFT SIGN
+ '\u044b' # 0xD9 -> CYRILLIC SMALL LETTER YERU
+ '\u0437' # 0xDA -> CYRILLIC SMALL LETTER ZE
+ '\u0448' # 0xDB -> CYRILLIC SMALL LETTER SHA
+ '\u044d' # 0xDC -> CYRILLIC SMALL LETTER E
+ '\u0449' # 0xDD -> CYRILLIC SMALL LETTER SHCHA
+ '\u0447' # 0xDE -> CYRILLIC SMALL LETTER CHE
+ '\u044a' # 0xDF -> CYRILLIC SMALL LETTER HARD SIGN
+ '\u042e' # 0xE0 -> CYRILLIC CAPITAL LETTER YU
+ '\u0410' # 0xE1 -> CYRILLIC CAPITAL LETTER A
+ '\u0411' # 0xE2 -> CYRILLIC CAPITAL LETTER BE
+ '\u0426' # 0xE3 -> CYRILLIC CAPITAL LETTER TSE
+ '\u0414' # 0xE4 -> CYRILLIC CAPITAL LETTER DE
+ '\u0415' # 0xE5 -> CYRILLIC CAPITAL LETTER IE
+ '\u0424' # 0xE6 -> CYRILLIC CAPITAL LETTER EF
+ '\u0413' # 0xE7 -> CYRILLIC CAPITAL LETTER GHE
+ '\u0425' # 0xE8 -> CYRILLIC CAPITAL LETTER HA
+ '\u0418' # 0xE9 -> CYRILLIC CAPITAL LETTER I
+ '\u0419' # 0xEA -> CYRILLIC CAPITAL LETTER SHORT I
+ '\u041a' # 0xEB -> CYRILLIC CAPITAL LETTER KA
+ '\u041b' # 0xEC -> CYRILLIC CAPITAL LETTER EL
+ '\u041c' # 0xED -> CYRILLIC CAPITAL LETTER EM
+ '\u041d' # 0xEE -> CYRILLIC CAPITAL LETTER EN
+ '\u041e' # 0xEF -> CYRILLIC CAPITAL LETTER O
+ '\u041f' # 0xF0 -> CYRILLIC CAPITAL LETTER PE
+ '\u042f' # 0xF1 -> CYRILLIC CAPITAL LETTER YA
+ '\u0420' # 0xF2 -> CYRILLIC CAPITAL LETTER ER
+ '\u0421' # 0xF3 -> CYRILLIC CAPITAL LETTER ES
+ '\u0422' # 0xF4 -> CYRILLIC CAPITAL LETTER TE
+ '\u0423' # 0xF5 -> CYRILLIC CAPITAL LETTER U
+ '\u0416' # 0xF6 -> CYRILLIC CAPITAL LETTER ZHE
+ '\u0412' # 0xF7 -> CYRILLIC CAPITAL LETTER VE
+ '\u042c' # 0xF8 -> CYRILLIC CAPITAL LETTER SOFT SIGN
+ '\u042b' # 0xF9 -> CYRILLIC CAPITAL LETTER YERU
+ '\u0417' # 0xFA -> CYRILLIC CAPITAL LETTER ZE
+ '\u0428' # 0xFB -> CYRILLIC CAPITAL LETTER SHA
+ '\u042d' # 0xFC -> CYRILLIC CAPITAL LETTER E
+ '\u0429' # 0xFD -> CYRILLIC CAPITAL LETTER SHCHA
+ '\u0427' # 0xFE -> CYRILLIC CAPITAL LETTER CHE
+ '\u042a' # 0xFF -> CYRILLIC CAPITAL LETTER HARD SIGN
+)
+
+### Encoding table
+encoding_table=codecs.charmap_build(decoding_table)
diff --git a/Lib/encodings/kz1048.py b/Lib/encodings/kz1048.py
new file mode 100644
index 0000000000..712aee6e93
--- /dev/null
+++ b/Lib/encodings/kz1048.py
@@ -0,0 +1,307 @@
+""" Python Character Mapping Codec kz1048 generated from 'MAPPINGS/VENDORS/MISC/KZ1048.TXT' with gencodec.py.
+
+"""#"
+
+import codecs
+
+### Codec APIs
+
+class Codec(codecs.Codec):
+
+ def encode(self, input, errors='strict'):
+ return codecs.charmap_encode(input, errors, encoding_table)
+
+ def decode(self, input, errors='strict'):
+ return codecs.charmap_decode(input, errors, decoding_table)
+
+class IncrementalEncoder(codecs.IncrementalEncoder):
+ def encode(self, input, final=False):
+ return codecs.charmap_encode(input, self.errors, encoding_table)[0]
+
+class IncrementalDecoder(codecs.IncrementalDecoder):
+ def decode(self, input, final=False):
+ return codecs.charmap_decode(input, self.errors, decoding_table)[0]
+
+class StreamWriter(Codec, codecs.StreamWriter):
+ pass
+
+class StreamReader(Codec, codecs.StreamReader):
+ pass
+
+### encodings module API
+
+def getregentry():
+ return codecs.CodecInfo(
+ name='kz1048',
+ encode=Codec().encode,
+ decode=Codec().decode,
+ incrementalencoder=IncrementalEncoder,
+ incrementaldecoder=IncrementalDecoder,
+ streamreader=StreamReader,
+ streamwriter=StreamWriter,
+ )
+
+
+### Decoding Table
+
+decoding_table = (
+ '\x00' # 0x00 -> NULL
+ '\x01' # 0x01 -> START OF HEADING
+ '\x02' # 0x02 -> START OF TEXT
+ '\x03' # 0x03 -> END OF TEXT
+ '\x04' # 0x04 -> END OF TRANSMISSION
+ '\x05' # 0x05 -> ENQUIRY
+ '\x06' # 0x06 -> ACKNOWLEDGE
+ '\x07' # 0x07 -> BELL
+ '\x08' # 0x08 -> BACKSPACE
+ '\t' # 0x09 -> HORIZONTAL TABULATION
+ '\n' # 0x0A -> LINE FEED
+ '\x0b' # 0x0B -> VERTICAL TABULATION
+ '\x0c' # 0x0C -> FORM FEED
+ '\r' # 0x0D -> CARRIAGE RETURN
+ '\x0e' # 0x0E -> SHIFT OUT
+ '\x0f' # 0x0F -> SHIFT IN
+ '\x10' # 0x10 -> DATA LINK ESCAPE
+ '\x11' # 0x11 -> DEVICE CONTROL ONE
+ '\x12' # 0x12 -> DEVICE CONTROL TWO
+ '\x13' # 0x13 -> DEVICE CONTROL THREE
+ '\x14' # 0x14 -> DEVICE CONTROL FOUR
+ '\x15' # 0x15 -> NEGATIVE ACKNOWLEDGE
+ '\x16' # 0x16 -> SYNCHRONOUS IDLE
+ '\x17' # 0x17 -> END OF TRANSMISSION BLOCK
+ '\x18' # 0x18 -> CANCEL
+ '\x19' # 0x19 -> END OF MEDIUM
+ '\x1a' # 0x1A -> SUBSTITUTE
+ '\x1b' # 0x1B -> ESCAPE
+ '\x1c' # 0x1C -> FILE SEPARATOR
+ '\x1d' # 0x1D -> GROUP SEPARATOR
+ '\x1e' # 0x1E -> RECORD SEPARATOR
+ '\x1f' # 0x1F -> UNIT SEPARATOR
+ ' ' # 0x20 -> SPACE
+ '!' # 0x21 -> EXCLAMATION MARK
+ '"' # 0x22 -> QUOTATION MARK
+ '#' # 0x23 -> NUMBER SIGN
+ '$' # 0x24 -> DOLLAR SIGN
+ '%' # 0x25 -> PERCENT SIGN
+ '&' # 0x26 -> AMPERSAND
+ "'" # 0x27 -> APOSTROPHE
+ '(' # 0x28 -> LEFT PARENTHESIS
+ ')' # 0x29 -> RIGHT PARENTHESIS
+ '*' # 0x2A -> ASTERISK
+ '+' # 0x2B -> PLUS SIGN
+ ',' # 0x2C -> COMMA
+ '-' # 0x2D -> HYPHEN-MINUS
+ '.' # 0x2E -> FULL STOP
+ '/' # 0x2F -> SOLIDUS
+ '0' # 0x30 -> DIGIT ZERO
+ '1' # 0x31 -> DIGIT ONE
+ '2' # 0x32 -> DIGIT TWO
+ '3' # 0x33 -> DIGIT THREE
+ '4' # 0x34 -> DIGIT FOUR
+ '5' # 0x35 -> DIGIT FIVE
+ '6' # 0x36 -> DIGIT SIX
+ '7' # 0x37 -> DIGIT SEVEN
+ '8' # 0x38 -> DIGIT EIGHT
+ '9' # 0x39 -> DIGIT NINE
+ ':' # 0x3A -> COLON
+ ';' # 0x3B -> SEMICOLON
+ '<' # 0x3C -> LESS-THAN SIGN
+ '=' # 0x3D -> EQUALS SIGN
+ '>' # 0x3E -> GREATER-THAN SIGN
+ '?' # 0x3F -> QUESTION MARK
+ '@' # 0x40 -> COMMERCIAL AT
+ 'A' # 0x41 -> LATIN CAPITAL LETTER A
+ 'B' # 0x42 -> LATIN CAPITAL LETTER B
+ 'C' # 0x43 -> LATIN CAPITAL LETTER C
+ 'D' # 0x44 -> LATIN CAPITAL LETTER D
+ 'E' # 0x45 -> LATIN CAPITAL LETTER E
+ 'F' # 0x46 -> LATIN CAPITAL LETTER F
+ 'G' # 0x47 -> LATIN CAPITAL LETTER G
+ 'H' # 0x48 -> LATIN CAPITAL LETTER H
+ 'I' # 0x49 -> LATIN CAPITAL LETTER I
+ 'J' # 0x4A -> LATIN CAPITAL LETTER J
+ 'K' # 0x4B -> LATIN CAPITAL LETTER K
+ 'L' # 0x4C -> LATIN CAPITAL LETTER L
+ 'M' # 0x4D -> LATIN CAPITAL LETTER M
+ 'N' # 0x4E -> LATIN CAPITAL LETTER N
+ 'O' # 0x4F -> LATIN CAPITAL LETTER O
+ 'P' # 0x50 -> LATIN CAPITAL LETTER P
+ 'Q' # 0x51 -> LATIN CAPITAL LETTER Q
+ 'R' # 0x52 -> LATIN CAPITAL LETTER R
+ 'S' # 0x53 -> LATIN CAPITAL LETTER S
+ 'T' # 0x54 -> LATIN CAPITAL LETTER T
+ 'U' # 0x55 -> LATIN CAPITAL LETTER U
+ 'V' # 0x56 -> LATIN CAPITAL LETTER V
+ 'W' # 0x57 -> LATIN CAPITAL LETTER W
+ 'X' # 0x58 -> LATIN CAPITAL LETTER X
+ 'Y' # 0x59 -> LATIN CAPITAL LETTER Y
+ 'Z' # 0x5A -> LATIN CAPITAL LETTER Z
+ '[' # 0x5B -> LEFT SQUARE BRACKET
+ '\\' # 0x5C -> REVERSE SOLIDUS
+ ']' # 0x5D -> RIGHT SQUARE BRACKET
+ '^' # 0x5E -> CIRCUMFLEX ACCENT
+ '_' # 0x5F -> LOW LINE
+ '`' # 0x60 -> GRAVE ACCENT
+ 'a' # 0x61 -> LATIN SMALL LETTER A
+ 'b' # 0x62 -> LATIN SMALL LETTER B
+ 'c' # 0x63 -> LATIN SMALL LETTER C
+ 'd' # 0x64 -> LATIN SMALL LETTER D
+ 'e' # 0x65 -> LATIN SMALL LETTER E
+ 'f' # 0x66 -> LATIN SMALL LETTER F
+ 'g' # 0x67 -> LATIN SMALL LETTER G
+ 'h' # 0x68 -> LATIN SMALL LETTER H
+ 'i' # 0x69 -> LATIN SMALL LETTER I
+ 'j' # 0x6A -> LATIN SMALL LETTER J
+ 'k' # 0x6B -> LATIN SMALL LETTER K
+ 'l' # 0x6C -> LATIN SMALL LETTER L
+ 'm' # 0x6D -> LATIN SMALL LETTER M
+ 'n' # 0x6E -> LATIN SMALL LETTER N
+ 'o' # 0x6F -> LATIN SMALL LETTER O
+ 'p' # 0x70 -> LATIN SMALL LETTER P
+ 'q' # 0x71 -> LATIN SMALL LETTER Q
+ 'r' # 0x72 -> LATIN SMALL LETTER R
+ 's' # 0x73 -> LATIN SMALL LETTER S
+ 't' # 0x74 -> LATIN SMALL LETTER T
+ 'u' # 0x75 -> LATIN SMALL LETTER U
+ 'v' # 0x76 -> LATIN SMALL LETTER V
+ 'w' # 0x77 -> LATIN SMALL LETTER W
+ 'x' # 0x78 -> LATIN SMALL LETTER X
+ 'y' # 0x79 -> LATIN SMALL LETTER Y
+ 'z' # 0x7A -> LATIN SMALL LETTER Z
+ '{' # 0x7B -> LEFT CURLY BRACKET
+ '|' # 0x7C -> VERTICAL LINE
+ '}' # 0x7D -> RIGHT CURLY BRACKET
+ '~' # 0x7E -> TILDE
+ '\x7f' # 0x7F -> DELETE
+ '\u0402' # 0x80 -> CYRILLIC CAPITAL LETTER DJE
+ '\u0403' # 0x81 -> CYRILLIC CAPITAL LETTER GJE
+ '\u201a' # 0x82 -> SINGLE LOW-9 QUOTATION MARK
+ '\u0453' # 0x83 -> CYRILLIC SMALL LETTER GJE
+ '\u201e' # 0x84 -> DOUBLE LOW-9 QUOTATION MARK
+ '\u2026' # 0x85 -> HORIZONTAL ELLIPSIS
+ '\u2020' # 0x86 -> DAGGER
+ '\u2021' # 0x87 -> DOUBLE DAGGER
+ '\u20ac' # 0x88 -> EURO SIGN
+ '\u2030' # 0x89 -> PER MILLE SIGN
+ '\u0409' # 0x8A -> CYRILLIC CAPITAL LETTER LJE
+ '\u2039' # 0x8B -> SINGLE LEFT-POINTING ANGLE QUOTATION MARK
+ '\u040a' # 0x8C -> CYRILLIC CAPITAL LETTER NJE
+ '\u049a' # 0x8D -> CYRILLIC CAPITAL LETTER KA WITH DESCENDER
+ '\u04ba' # 0x8E -> CYRILLIC CAPITAL LETTER SHHA
+ '\u040f' # 0x8F -> CYRILLIC CAPITAL LETTER DZHE
+ '\u0452' # 0x90 -> CYRILLIC SMALL LETTER DJE
+ '\u2018' # 0x91 -> LEFT SINGLE QUOTATION MARK
+ '\u2019' # 0x92 -> RIGHT SINGLE QUOTATION MARK
+ '\u201c' # 0x93 -> LEFT DOUBLE QUOTATION MARK
+ '\u201d' # 0x94 -> RIGHT DOUBLE QUOTATION MARK
+ '\u2022' # 0x95 -> BULLET
+ '\u2013' # 0x96 -> EN DASH
+ '\u2014' # 0x97 -> EM DASH
+ '\ufffe' # 0x98 -> UNDEFINED
+ '\u2122' # 0x99 -> TRADE MARK SIGN
+ '\u0459' # 0x9A -> CYRILLIC SMALL LETTER LJE
+ '\u203a' # 0x9B -> SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
+ '\u045a' # 0x9C -> CYRILLIC SMALL LETTER NJE
+ '\u049b' # 0x9D -> CYRILLIC SMALL LETTER KA WITH DESCENDER
+ '\u04bb' # 0x9E -> CYRILLIC SMALL LETTER SHHA
+ '\u045f' # 0x9F -> CYRILLIC SMALL LETTER DZHE
+ '\xa0' # 0xA0 -> NO-BREAK SPACE
+ '\u04b0' # 0xA1 -> CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE
+ '\u04b1' # 0xA2 -> CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE
+ '\u04d8' # 0xA3 -> CYRILLIC CAPITAL LETTER SCHWA
+ '\xa4' # 0xA4 -> CURRENCY SIGN
+ '\u04e8' # 0xA5 -> CYRILLIC CAPITAL LETTER BARRED O
+ '\xa6' # 0xA6 -> BROKEN BAR
+ '\xa7' # 0xA7 -> SECTION SIGN
+ '\u0401' # 0xA8 -> CYRILLIC CAPITAL LETTER IO
+ '\xa9' # 0xA9 -> COPYRIGHT SIGN
+ '\u0492' # 0xAA -> CYRILLIC CAPITAL LETTER GHE WITH STROKE
+ '\xab' # 0xAB -> LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+ '\xac' # 0xAC -> NOT SIGN
+ '\xad' # 0xAD -> SOFT HYPHEN
+ '\xae' # 0xAE -> REGISTERED SIGN
+ '\u04ae' # 0xAF -> CYRILLIC CAPITAL LETTER STRAIGHT U
+ '\xb0' # 0xB0 -> DEGREE SIGN
+ '\xb1' # 0xB1 -> PLUS-MINUS SIGN
+ '\u0406' # 0xB2 -> CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I
+ '\u0456' # 0xB3 -> CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I
+ '\u04e9' # 0xB4 -> CYRILLIC SMALL LETTER BARRED O
+ '\xb5' # 0xB5 -> MICRO SIGN
+ '\xb6' # 0xB6 -> PILCROW SIGN
+ '\xb7' # 0xB7 -> MIDDLE DOT
+ '\u0451' # 0xB8 -> CYRILLIC SMALL LETTER IO
+ '\u2116' # 0xB9 -> NUMERO SIGN
+ '\u0493' # 0xBA -> CYRILLIC SMALL LETTER GHE WITH STROKE
+ '\xbb' # 0xBB -> RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+ '\u04d9' # 0xBC -> CYRILLIC SMALL LETTER SCHWA
+ '\u04a2' # 0xBD -> CYRILLIC CAPITAL LETTER EN WITH DESCENDER
+ '\u04a3' # 0xBE -> CYRILLIC SMALL LETTER EN WITH DESCENDER
+ '\u04af' # 0xBF -> CYRILLIC SMALL LETTER STRAIGHT U
+ '\u0410' # 0xC0 -> CYRILLIC CAPITAL LETTER A
+ '\u0411' # 0xC1 -> CYRILLIC CAPITAL LETTER BE
+ '\u0412' # 0xC2 -> CYRILLIC CAPITAL LETTER VE
+ '\u0413' # 0xC3 -> CYRILLIC CAPITAL LETTER GHE
+ '\u0414' # 0xC4 -> CYRILLIC CAPITAL LETTER DE
+ '\u0415' # 0xC5 -> CYRILLIC CAPITAL LETTER IE
+ '\u0416' # 0xC6 -> CYRILLIC CAPITAL LETTER ZHE
+ '\u0417' # 0xC7 -> CYRILLIC CAPITAL LETTER ZE
+ '\u0418' # 0xC8 -> CYRILLIC CAPITAL LETTER I
+ '\u0419' # 0xC9 -> CYRILLIC CAPITAL LETTER SHORT I
+ '\u041a' # 0xCA -> CYRILLIC CAPITAL LETTER KA
+ '\u041b' # 0xCB -> CYRILLIC CAPITAL LETTER EL
+ '\u041c' # 0xCC -> CYRILLIC CAPITAL LETTER EM
+ '\u041d' # 0xCD -> CYRILLIC CAPITAL LETTER EN
+ '\u041e' # 0xCE -> CYRILLIC CAPITAL LETTER O
+ '\u041f' # 0xCF -> CYRILLIC CAPITAL LETTER PE
+ '\u0420' # 0xD0 -> CYRILLIC CAPITAL LETTER ER
+ '\u0421' # 0xD1 -> CYRILLIC CAPITAL LETTER ES
+ '\u0422' # 0xD2 -> CYRILLIC CAPITAL LETTER TE
+ '\u0423' # 0xD3 -> CYRILLIC CAPITAL LETTER U
+ '\u0424' # 0xD4 -> CYRILLIC CAPITAL LETTER EF
+ '\u0425' # 0xD5 -> CYRILLIC CAPITAL LETTER HA
+ '\u0426' # 0xD6 -> CYRILLIC CAPITAL LETTER TSE
+ '\u0427' # 0xD7 -> CYRILLIC CAPITAL LETTER CHE
+ '\u0428' # 0xD8 -> CYRILLIC CAPITAL LETTER SHA
+ '\u0429' # 0xD9 -> CYRILLIC CAPITAL LETTER SHCHA
+ '\u042a' # 0xDA -> CYRILLIC CAPITAL LETTER HARD SIGN
+ '\u042b' # 0xDB -> CYRILLIC CAPITAL LETTER YERU
+ '\u042c' # 0xDC -> CYRILLIC CAPITAL LETTER SOFT SIGN
+ '\u042d' # 0xDD -> CYRILLIC CAPITAL LETTER E
+ '\u042e' # 0xDE -> CYRILLIC CAPITAL LETTER YU
+ '\u042f' # 0xDF -> CYRILLIC CAPITAL LETTER YA
+ '\u0430' # 0xE0 -> CYRILLIC SMALL LETTER A
+ '\u0431' # 0xE1 -> CYRILLIC SMALL LETTER BE
+ '\u0432' # 0xE2 -> CYRILLIC SMALL LETTER VE
+ '\u0433' # 0xE3 -> CYRILLIC SMALL LETTER GHE
+ '\u0434' # 0xE4 -> CYRILLIC SMALL LETTER DE
+ '\u0435' # 0xE5 -> CYRILLIC SMALL LETTER IE
+ '\u0436' # 0xE6 -> CYRILLIC SMALL LETTER ZHE
+ '\u0437' # 0xE7 -> CYRILLIC SMALL LETTER ZE
+ '\u0438' # 0xE8 -> CYRILLIC SMALL LETTER I
+ '\u0439' # 0xE9 -> CYRILLIC SMALL LETTER SHORT I
+ '\u043a' # 0xEA -> CYRILLIC SMALL LETTER KA
+ '\u043b' # 0xEB -> CYRILLIC SMALL LETTER EL
+ '\u043c' # 0xEC -> CYRILLIC SMALL LETTER EM
+ '\u043d' # 0xED -> CYRILLIC SMALL LETTER EN
+ '\u043e' # 0xEE -> CYRILLIC SMALL LETTER O
+ '\u043f' # 0xEF -> CYRILLIC SMALL LETTER PE
+ '\u0440' # 0xF0 -> CYRILLIC SMALL LETTER ER
+ '\u0441' # 0xF1 -> CYRILLIC SMALL LETTER ES
+ '\u0442' # 0xF2 -> CYRILLIC SMALL LETTER TE
+ '\u0443' # 0xF3 -> CYRILLIC SMALL LETTER U
+ '\u0444' # 0xF4 -> CYRILLIC SMALL LETTER EF
+ '\u0445' # 0xF5 -> CYRILLIC SMALL LETTER HA
+ '\u0446' # 0xF6 -> CYRILLIC SMALL LETTER TSE
+ '\u0447' # 0xF7 -> CYRILLIC SMALL LETTER CHE
+ '\u0448' # 0xF8 -> CYRILLIC SMALL LETTER SHA
+ '\u0449' # 0xF9 -> CYRILLIC SMALL LETTER SHCHA
+ '\u044a' # 0xFA -> CYRILLIC SMALL LETTER HARD SIGN
+ '\u044b' # 0xFB -> CYRILLIC SMALL LETTER YERU
+ '\u044c' # 0xFC -> CYRILLIC SMALL LETTER SOFT SIGN
+ '\u044d' # 0xFD -> CYRILLIC SMALL LETTER E
+ '\u044e' # 0xFE -> CYRILLIC SMALL LETTER YU
+ '\u044f' # 0xFF -> CYRILLIC SMALL LETTER YA
+)
+
+### Encoding table
+encoding_table = codecs.charmap_build(decoding_table)
diff --git a/Lib/encodings/utf_16.py b/Lib/encodings/utf_16.py
index 809bc9ab36..c61248242b 100644
--- a/Lib/encodings/utf_16.py
+++ b/Lib/encodings/utf_16.py
@@ -73,7 +73,7 @@ class IncrementalDecoder(codecs.BufferedIncrementalDecoder):
self.decoder = None
def getstate(self):
- # additonal state info from the base class must be None here,
+ # additional state info from the base class must be None here,
# as it isn't passed along to the caller
state = codecs.BufferedIncrementalDecoder.getstate(self)[0]
# additional state info we pass to the caller:
diff --git a/Lib/encodings/utf_32.py b/Lib/encodings/utf_32.py
index c0529285f6..cdf84d1412 100644
--- a/Lib/encodings/utf_32.py
+++ b/Lib/encodings/utf_32.py
@@ -68,7 +68,7 @@ class IncrementalDecoder(codecs.BufferedIncrementalDecoder):
self.decoder = None
def getstate(self):
- # additonal state info from the base class must be None here,
+ # additional state info from the base class must be None here,
# as it isn't passed along to the caller
state = codecs.BufferedIncrementalDecoder.getstate(self)[0]
# additional state info we pass to the caller:
diff --git a/Lib/enum.py b/Lib/enum.py
index 7cb9d45b32..b8787d19b8 100644
--- a/Lib/enum.py
+++ b/Lib/enum.py
@@ -106,12 +106,20 @@ class EnumMeta(type):
raise ValueError('Invalid enum member name: {0}'.format(
','.join(invalid_names)))
+ # create a default docstring if one has not been provided
+ if '__doc__' not in classdict:
+ classdict['__doc__'] = 'An enumeration.'
+
# create our new Enum type
enum_class = super().__new__(metacls, cls, bases, classdict)
enum_class._member_names_ = [] # names in definition order
enum_class._member_map_ = OrderedDict() # name->value map
enum_class._member_type_ = member_type
+ # save attributes from super classes so we know if we can take
+ # the shortcut of storing members in the class dict
+ base_attributes = {a for b in enum_class.mro() for a in b.__dict__}
+
# Reverse value->name map for hashable values.
enum_class._value2member_map_ = {}
@@ -165,6 +173,11 @@ class EnumMeta(type):
else:
# Aliases don't appear in member names (only in __members__).
enum_class._member_names_.append(member_name)
+ # performance boost for any member that would not shadow
+ # a DynamicClassAttribute
+ if member_name not in base_attributes:
+ setattr(enum_class, member_name, enum_member)
+ # now add to _member_map_
enum_class._member_map_[member_name] = enum_member
try:
# This may fail if value is not hashable. We can't add the value
@@ -199,7 +212,7 @@ class EnumMeta(type):
"""
return True
- def __call__(cls, value, names=None, *, module=None, qualname=None, type=None):
+ def __call__(cls, value, names=None, *, module=None, qualname=None, type=None, start=1):
"""Either returns an existing member, or creates a new enum class.
This method is used both when an enum class is given a value to match
@@ -211,7 +224,7 @@ class EnumMeta(type):
`value` will be the name of the new class.
`names` should be either a string of white-space/comma delimited names
- (values will start at 1), or an iterator/mapping of name, value pairs.
+ (values will start at `start`), or an iterator/mapping of name, value pairs.
`module` should be set to the module this class is being created in;
if it is not set, an attempt to find that module will be made, but if
@@ -227,7 +240,7 @@ class EnumMeta(type):
if names is None: # simple value lookup
return cls.__new__(cls, value)
# otherwise, functional API: we're creating a new Enum type
- return cls._create_(value, names, module=module, qualname=qualname, type=type)
+ return cls._create_(value, names, module=module, qualname=qualname, type=type, start=start)
def __contains__(cls, member):
return isinstance(member, cls) and member._name_ in cls._member_map_
@@ -298,16 +311,16 @@ class EnumMeta(type):
raise AttributeError('Cannot reassign members.')
super().__setattr__(name, value)
- def _create_(cls, class_name, names=None, *, module=None, qualname=None, type=None):
+ def _create_(cls, class_name, names=None, *, module=None, qualname=None, type=None, start=1):
"""Convenience method to create a new Enum class.
`names` can be:
* A string containing member names, separated either with spaces or
- commas. Values are auto-numbered from 1.
- * An iterable of member names. Values are auto-numbered from 1.
+ commas. Values are incremented by 1 from `start`.
+ * An iterable of member names. Values are incremented by 1 from `start`.
* An iterable of (member name, value) pairs.
- * A mapping of member name -> value.
+ * A mapping of member name -> value pairs.
"""
metacls = cls.__class__
@@ -318,7 +331,7 @@ class EnumMeta(type):
if isinstance(names, str):
names = names.replace(',', ' ').split()
if isinstance(names, (tuple, list)) and isinstance(names[0], str):
- names = [(e, i) for (i, e) in enumerate(names, 1)]
+ names = [(e, i) for (i, e) in enumerate(names, start)]
# Here, names is either an iterable of (name, value) or a mapping.
for item in names:
@@ -474,10 +487,9 @@ class Enum(metaclass=EnumMeta):
m
for cls in self.__class__.mro()
for m in cls.__dict__
- if m[0] != '_'
+ if m[0] != '_' and m not in self._member_map_
]
- return (['__class__', '__doc__', '__module__', 'name', 'value'] +
- added_behavior)
+ return (['__class__', '__doc__', '__module__'] + added_behavior)
def __format__(self, format_spec):
# mixed-in Enums should use the mixed-in type's __format__, otherwise
diff --git a/Lib/fileinput.py b/Lib/fileinput.py
index 81a7545dd8..d2b52066d9 100644
--- a/Lib/fileinput.py
+++ b/Lib/fileinput.py
@@ -64,13 +64,6 @@ deleted when the output file is closed. In-place filtering is
disabled when standard input is read. XXX The current implementation
does not work for MS-DOS 8+3 filesystems.
-Performance: this module is unfortunately one of the slower ways of
-processing large numbers of input lines. Nevertheless, a significant
-speed-up has been obtained by using readlines(bufsize) instead of
-readline(). A new keyword argument, bufsize=N, is present on the
-input() function and the FileInput() class to override the default
-buffer size.
-
XXX Possible additions:
- optional getopt argument processing
@@ -86,6 +79,7 @@ __all__ = ["input", "close", "nextfile", "filename", "lineno", "filelineno",
_state = None
+# No longer used
DEFAULT_BUFSIZE = 8*1024
def input(files=None, inplace=False, backup="", bufsize=0,
@@ -207,17 +201,14 @@ class FileInput:
self._files = files
self._inplace = inplace
self._backup = backup
- self._bufsize = bufsize or DEFAULT_BUFSIZE
self._savestdout = None
self._output = None
self._filename = None
- self._lineno = 0
+ self._startlineno = 0
self._filelineno = 0
self._file = None
self._isstdin = False
self._backupfilename = None
- self._buffer = []
- self._bufindex = 0
# restrict mode argument to reading modes
if mode not in ('r', 'rU', 'U', 'rb'):
raise ValueError("FileInput opening mode must be one of "
@@ -253,22 +244,18 @@ class FileInput:
return self
def __next__(self):
- try:
- line = self._buffer[self._bufindex]
- except IndexError:
- pass
- else:
- self._bufindex += 1
- self._lineno += 1
- self._filelineno += 1
- return line
- line = self.readline()
- if not line:
- raise StopIteration
- return line
+ while True:
+ line = self._readline()
+ if line:
+ self._filelineno += 1
+ return line
+ if not self._file:
+ raise StopIteration
+ self.nextfile()
+ # repeat with next file
def __getitem__(self, i):
- if i != self._lineno:
+ if i != self.lineno():
raise RuntimeError("accessing lines out of order")
try:
return self.__next__()
@@ -277,108 +264,108 @@ class FileInput:
def nextfile(self):
savestdout = self._savestdout
- self._savestdout = 0
+ self._savestdout = None
if savestdout:
sys.stdout = savestdout
output = self._output
- self._output = 0
+ self._output = None
try:
if output:
output.close()
finally:
file = self._file
- self._file = 0
+ self._file = None
+ try:
+ del self._readline # restore FileInput._readline
+ except AttributeError:
+ pass
try:
if file and not self._isstdin:
file.close()
finally:
backupfilename = self._backupfilename
- self._backupfilename = 0
+ self._backupfilename = None
if backupfilename and not self._backup:
try: os.unlink(backupfilename)
except OSError: pass
self._isstdin = False
- self._buffer = []
- self._bufindex = 0
def readline(self):
- try:
- line = self._buffer[self._bufindex]
- except IndexError:
- pass
+ while True:
+ line = self._readline()
+ if line:
+ self._filelineno += 1
+ return line
+ if not self._file:
+ return line
+ self.nextfile()
+ # repeat with next file
+
+ def _readline(self):
+ if not self._files:
+ if 'b' in self._mode:
+ return b''
+ else:
+ return ''
+ self._filename = self._files[0]
+ self._files = self._files[1:]
+ self._startlineno = self.lineno()
+ self._filelineno = 0
+ self._file = None
+ self._isstdin = False
+ self._backupfilename = 0
+ if self._filename == '-':
+ self._filename = '<stdin>'
+ if 'b' in self._mode:
+ self._file = getattr(sys.stdin, 'buffer', sys.stdin)
+ else:
+ self._file = sys.stdin
+ self._isstdin = True
else:
- self._bufindex += 1
- self._lineno += 1
- self._filelineno += 1
- return line
- if not self._file:
- if not self._files:
- if 'b' in self._mode:
- return b''
- else:
- return ''
- self._filename = self._files[0]
- self._files = self._files[1:]
- self._filelineno = 0
- self._file = None
- self._isstdin = False
- self._backupfilename = 0
- if self._filename == '-':
- self._filename = '<stdin>'
- if 'b' in self._mode:
- self._file = sys.stdin.buffer
+ if self._inplace:
+ self._backupfilename = (
+ self._filename + (self._backup or ".bak"))
+ try:
+ os.unlink(self._backupfilename)
+ except OSError:
+ pass
+ # The next few lines may raise OSError
+ os.rename(self._filename, self._backupfilename)
+ self._file = open(self._backupfilename, self._mode)
+ try:
+ perm = os.fstat(self._file.fileno()).st_mode
+ except OSError:
+ self._output = open(self._filename, "w")
else:
- self._file = sys.stdin
- self._isstdin = True
- else:
- if self._inplace:
- self._backupfilename = (
- self._filename + (self._backup or ".bak"))
+ mode = os.O_CREAT | os.O_WRONLY | os.O_TRUNC
+ if hasattr(os, 'O_BINARY'):
+ mode |= os.O_BINARY
+
+ fd = os.open(self._filename, mode, perm)
+ self._output = os.fdopen(fd, "w")
try:
- os.unlink(self._backupfilename)
+ if hasattr(os, 'chmod'):
+ os.chmod(self._filename, perm)
except OSError:
pass
- # The next few lines may raise OSError
- os.rename(self._filename, self._backupfilename)
- self._file = open(self._backupfilename, self._mode)
- try:
- perm = os.fstat(self._file.fileno()).st_mode
- except OSError:
- self._output = open(self._filename, "w")
- else:
- mode = os.O_CREAT | os.O_WRONLY | os.O_TRUNC
- if hasattr(os, 'O_BINARY'):
- mode |= os.O_BINARY
-
- fd = os.open(self._filename, mode, perm)
- self._output = os.fdopen(fd, "w")
- try:
- if hasattr(os, 'chmod'):
- os.chmod(self._filename, perm)
- except OSError:
- pass
- self._savestdout = sys.stdout
- sys.stdout = self._output
+ self._savestdout = sys.stdout
+ sys.stdout = self._output
+ else:
+ # This may raise OSError
+ if self._openhook:
+ self._file = self._openhook(self._filename, self._mode)
else:
- # This may raise OSError
- if self._openhook:
- self._file = self._openhook(self._filename, self._mode)
- else:
- self._file = open(self._filename, self._mode)
- self._buffer = self._file.readlines(self._bufsize)
- self._bufindex = 0
- if not self._buffer:
- self.nextfile()
- # Recursive call
- return self.readline()
+ self._file = open(self._filename, self._mode)
+ self._readline = self._file.readline # hide FileInput._readline
+ return self._readline()
def filename(self):
return self._filename
def lineno(self):
- return self._lineno
+ return self._startlineno + self._filelineno
def filelineno(self):
return self._filelineno
diff --git a/Lib/formatter.py b/Lib/formatter.py
index 9338261be7..e2394de8c2 100644
--- a/Lib/formatter.py
+++ b/Lib/formatter.py
@@ -20,8 +20,8 @@ manage and inserting data into the output.
import sys
import warnings
-warnings.warn('the formatter module is deprecated and will be removed in '
- 'Python 3.6', PendingDeprecationWarning)
+warnings.warn('the formatter module is deprecated', DeprecationWarning,
+ stacklevel=2)
AS_IS = None
diff --git a/Lib/fractions.py b/Lib/fractions.py
index 79e83ff2c0..60b0728807 100644
--- a/Lib/fractions.py
+++ b/Lib/fractions.py
@@ -20,6 +20,17 @@ def gcd(a, b):
Unless b==0, the result will have the same sign as b (so that when
b is divided by it, the result comes out positive).
"""
+ import warnings
+ warnings.warn('fractions.gcd() is deprecated. Use math.gcd() instead.',
+ DeprecationWarning, 2)
+ if type(a) is int is type(b):
+ if (b or a) < 0:
+ return -math.gcd(a, b)
+ return math.gcd(a, b)
+ return _gcd(a, b)
+
+def _gcd(a, b):
+ # Supports non-integers for backward compatibility.
while b:
a, b = b, a%b
return a
@@ -70,7 +81,7 @@ class Fraction(numbers.Rational):
__slots__ = ('_numerator', '_denominator')
# We're immutable, so use __new__ not __init__
- def __new__(cls, numerator=0, denominator=None):
+ def __new__(cls, numerator=0, denominator=None, _normalize=True):
"""Constructs a Rational.
Takes a string like '3/2' or '1.5', another Rational instance, a
@@ -104,7 +115,12 @@ class Fraction(numbers.Rational):
self = super(Fraction, cls).__new__(cls)
if denominator is None:
- if isinstance(numerator, numbers.Rational):
+ if type(numerator) is int:
+ self._numerator = numerator
+ self._denominator = 1
+ return self
+
+ elif isinstance(numerator, numbers.Rational):
self._numerator = numerator.numerator
self._denominator = numerator.denominator
return self
@@ -153,6 +169,9 @@ class Fraction(numbers.Rational):
raise TypeError("argument should be a string "
"or a Rational instance")
+ elif type(numerator) is int is type(denominator):
+ pass # *very* normal case
+
elif (isinstance(numerator, numbers.Rational) and
isinstance(denominator, numbers.Rational)):
numerator, denominator = (
@@ -165,9 +184,18 @@ class Fraction(numbers.Rational):
if denominator == 0:
raise ZeroDivisionError('Fraction(%s, 0)' % numerator)
- g = gcd(numerator, denominator)
- self._numerator = numerator // g
- self._denominator = denominator // g
+ if _normalize:
+ if type(numerator) is int is type(denominator):
+ # *very* normal case
+ g = math.gcd(numerator, denominator)
+ if denominator < 0:
+ g = -g
+ else:
+ g = _gcd(numerator, denominator)
+ numerator //= g
+ denominator //= g
+ self._numerator = numerator
+ self._denominator = denominator
return self
@classmethod
@@ -277,7 +305,8 @@ class Fraction(numbers.Rational):
def __repr__(self):
"""repr(self)"""
- return ('Fraction(%s, %s)' % (self._numerator, self._denominator))
+ return '%s(%s, %s)' % (self.__class__.__name__,
+ self._numerator, self._denominator)
def __str__(self):
"""str(self)"""
@@ -395,17 +424,17 @@ class Fraction(numbers.Rational):
def _add(a, b):
"""a + b"""
- return Fraction(a.numerator * b.denominator +
- b.numerator * a.denominator,
- a.denominator * b.denominator)
+ da, db = a.denominator, b.denominator
+ return Fraction(a.numerator * db + b.numerator * da,
+ da * db)
__add__, __radd__ = _operator_fallbacks(_add, operator.add)
def _sub(a, b):
"""a - b"""
- return Fraction(a.numerator * b.denominator -
- b.numerator * a.denominator,
- a.denominator * b.denominator)
+ da, db = a.denominator, b.denominator
+ return Fraction(a.numerator * db - b.numerator * da,
+ da * db)
__sub__, __rsub__ = _operator_fallbacks(_sub, operator.sub)
@@ -453,10 +482,12 @@ class Fraction(numbers.Rational):
power = b.numerator
if power >= 0:
return Fraction(a._numerator ** power,
- a._denominator ** power)
+ a._denominator ** power,
+ _normalize=False)
else:
return Fraction(a._denominator ** -power,
- a._numerator ** -power)
+ a._numerator ** -power,
+ _normalize=False)
else:
# A fractional power will generally produce an
# irrational number.
@@ -480,15 +511,15 @@ class Fraction(numbers.Rational):
def __pos__(a):
"""+a: Coerces a subclass instance to Fraction"""
- return Fraction(a._numerator, a._denominator)
+ return Fraction(a._numerator, a._denominator, _normalize=False)
def __neg__(a):
"""-a"""
- return Fraction(-a._numerator, a._denominator)
+ return Fraction(-a._numerator, a._denominator, _normalize=False)
def __abs__(a):
"""abs(a)"""
- return Fraction(abs(a._numerator), a._denominator)
+ return Fraction(abs(a._numerator), a._denominator, _normalize=False)
def __trunc__(a):
"""trunc(a)"""
@@ -555,6 +586,8 @@ class Fraction(numbers.Rational):
def __eq__(a, b):
"""a == b"""
+ if type(b) is int:
+ return a._numerator == b and a._denominator == 1
if isinstance(b, numbers.Rational):
return (a._numerator == b.numerator and
a._denominator == b.denominator)
diff --git a/Lib/ftplib.py b/Lib/ftplib.py
index 1d3bd9ef21..c416d8562b 100644
--- a/Lib/ftplib.py
+++ b/Lib/ftplib.py
@@ -42,7 +42,7 @@ import socket
import warnings
from socket import _GLOBAL_DEFAULT_TIMEOUT
-__all__ = ["FTP", "Netrc"]
+__all__ = ["FTP"]
# Magic number from <socket.h>
MSG_OOB = 0x1 # Process data out of band
@@ -923,115 +923,6 @@ def ftpcp(source, sourcename, target, targetname = '', type = 'I'):
target.voidresp()
-class Netrc:
- """Class to parse & provide access to 'netrc' format files.
-
- See the netrc(4) man page for information on the file format.
-
- WARNING: This class is obsolete -- use module netrc instead.
-
- """
- __defuser = None
- __defpasswd = None
- __defacct = None
-
- def __init__(self, filename=None):
- warnings.warn("This class is deprecated, use the netrc module instead",
- DeprecationWarning, 2)
- if filename is None:
- if "HOME" in os.environ:
- filename = os.path.join(os.environ["HOME"],
- ".netrc")
- else:
- raise OSError("specify file to load or set $HOME")
- self.__hosts = {}
- self.__macros = {}
- fp = open(filename, "r")
- in_macro = 0
- while 1:
- line = fp.readline()
- if not line:
- break
- if in_macro and line.strip():
- macro_lines.append(line)
- continue
- elif in_macro:
- self.__macros[macro_name] = tuple(macro_lines)
- in_macro = 0
- words = line.split()
- host = user = passwd = acct = None
- default = 0
- i = 0
- while i < len(words):
- w1 = words[i]
- if i+1 < len(words):
- w2 = words[i + 1]
- else:
- w2 = None
- if w1 == 'default':
- default = 1
- elif w1 == 'machine' and w2:
- host = w2.lower()
- i = i + 1
- elif w1 == 'login' and w2:
- user = w2
- i = i + 1
- elif w1 == 'password' and w2:
- passwd = w2
- i = i + 1
- elif w1 == 'account' and w2:
- acct = w2
- i = i + 1
- elif w1 == 'macdef' and w2:
- macro_name = w2
- macro_lines = []
- in_macro = 1
- break
- i = i + 1
- if default:
- self.__defuser = user or self.__defuser
- self.__defpasswd = passwd or self.__defpasswd
- self.__defacct = acct or self.__defacct
- if host:
- if host in self.__hosts:
- ouser, opasswd, oacct = \
- self.__hosts[host]
- user = user or ouser
- passwd = passwd or opasswd
- acct = acct or oacct
- self.__hosts[host] = user, passwd, acct
- fp.close()
-
- def get_hosts(self):
- """Return a list of hosts mentioned in the .netrc file."""
- return self.__hosts.keys()
-
- def get_account(self, host):
- """Returns login information for the named host.
-
- The return value is a triple containing userid,
- password, and the accounting field.
-
- """
- host = host.lower()
- user = passwd = acct = None
- if host in self.__hosts:
- user, passwd, acct = self.__hosts[host]
- user = user or self.__defuser
- passwd = passwd or self.__defpasswd
- acct = acct or self.__defacct
- return user, passwd, acct
-
- def get_macros(self):
- """Return a list of all defined macro names."""
- return self.__macros.keys()
-
- def get_macro(self, macro):
- """Return a sequence of lines which define a named macro."""
- return self.__macros[macro]
-
-
-
def test():
'''Test program.
Usage: ftp [-d] [-r[file]] host [-l[dir]] [-d[dir]] [-p] [file] ...
@@ -1045,6 +936,8 @@ def test():
print(test.__doc__)
sys.exit(0)
+ import netrc
+
debugging = 0
rcfile = None
while sys.argv[1] == '-d':
@@ -1059,14 +952,14 @@ def test():
ftp.set_debuglevel(debugging)
userid = passwd = acct = ''
try:
- netrc = Netrc(rcfile)
+ netrcobj = netrc.netrc(rcfile)
except OSError:
if rcfile is not None:
sys.stderr.write("Could not open account file"
" -- using anonymous login.")
else:
try:
- userid, passwd, acct = netrc.get_account(host)
+ userid, acct, passwd = netrcobj.authenticators(host)
except KeyError:
# no account for host
sys.stderr.write(
diff --git a/Lib/functools.py b/Lib/functools.py
index 2c299d7133..214523cbc2 100644
--- a/Lib/functools.py
+++ b/Lib/functools.py
@@ -23,7 +23,7 @@ from types import MappingProxyType
from weakref import WeakKeyDictionary
try:
from _thread import RLock
-except:
+except ImportError:
class RLock:
'Dummy reentrant lock for builds without threads'
def __enter__(self): pass
@@ -94,108 +94,109 @@ def wraps(wrapped,
# infinite recursion that could occur when the operator dispatch logic
# detects a NotImplemented result and then calls a reflected method.
-def _gt_from_lt(self, other):
+def _gt_from_lt(self, other, NotImplemented=NotImplemented):
'Return a > b. Computed by @total_ordering from (not a < b) and (a != b).'
op_result = self.__lt__(other)
if op_result is NotImplemented:
- return NotImplemented
+ return op_result
return not op_result and self != other
-def _le_from_lt(self, other):
+def _le_from_lt(self, other, NotImplemented=NotImplemented):
'Return a <= b. Computed by @total_ordering from (a < b) or (a == b).'
op_result = self.__lt__(other)
return op_result or self == other
-def _ge_from_lt(self, other):
+def _ge_from_lt(self, other, NotImplemented=NotImplemented):
'Return a >= b. Computed by @total_ordering from (not a < b).'
op_result = self.__lt__(other)
if op_result is NotImplemented:
- return NotImplemented
+ return op_result
return not op_result
-def _ge_from_le(self, other):
+def _ge_from_le(self, other, NotImplemented=NotImplemented):
'Return a >= b. Computed by @total_ordering from (not a <= b) or (a == b).'
op_result = self.__le__(other)
if op_result is NotImplemented:
- return NotImplemented
+ return op_result
return not op_result or self == other
-def _lt_from_le(self, other):
+def _lt_from_le(self, other, NotImplemented=NotImplemented):
'Return a < b. Computed by @total_ordering from (a <= b) and (a != b).'
op_result = self.__le__(other)
if op_result is NotImplemented:
- return NotImplemented
+ return op_result
return op_result and self != other
-def _gt_from_le(self, other):
+def _gt_from_le(self, other, NotImplemented=NotImplemented):
'Return a > b. Computed by @total_ordering from (not a <= b).'
op_result = self.__le__(other)
if op_result is NotImplemented:
- return NotImplemented
+ return op_result
return not op_result
-def _lt_from_gt(self, other):
+def _lt_from_gt(self, other, NotImplemented=NotImplemented):
'Return a < b. Computed by @total_ordering from (not a > b) and (a != b).'
op_result = self.__gt__(other)
if op_result is NotImplemented:
- return NotImplemented
+ return op_result
return not op_result and self != other
-def _ge_from_gt(self, other):
+def _ge_from_gt(self, other, NotImplemented=NotImplemented):
'Return a >= b. Computed by @total_ordering from (a > b) or (a == b).'
op_result = self.__gt__(other)
return op_result or self == other
-def _le_from_gt(self, other):
+def _le_from_gt(self, other, NotImplemented=NotImplemented):
'Return a <= b. Computed by @total_ordering from (not a > b).'
op_result = self.__gt__(other)
if op_result is NotImplemented:
- return NotImplemented
+ return op_result
return not op_result
-def _le_from_ge(self, other):
+def _le_from_ge(self, other, NotImplemented=NotImplemented):
'Return a <= b. Computed by @total_ordering from (not a >= b) or (a == b).'
op_result = self.__ge__(other)
if op_result is NotImplemented:
- return NotImplemented
+ return op_result
return not op_result or self == other
-def _gt_from_ge(self, other):
+def _gt_from_ge(self, other, NotImplemented=NotImplemented):
'Return a > b. Computed by @total_ordering from (a >= b) and (a != b).'
op_result = self.__ge__(other)
if op_result is NotImplemented:
- return NotImplemented
+ return op_result
return op_result and self != other
-def _lt_from_ge(self, other):
+def _lt_from_ge(self, other, NotImplemented=NotImplemented):
'Return a < b. Computed by @total_ordering from (not a >= b).'
op_result = self.__ge__(other)
if op_result is NotImplemented:
- return NotImplemented
+ return op_result
return not op_result
+_convert = {
+ '__lt__': [('__gt__', _gt_from_lt),
+ ('__le__', _le_from_lt),
+ ('__ge__', _ge_from_lt)],
+ '__le__': [('__ge__', _ge_from_le),
+ ('__lt__', _lt_from_le),
+ ('__gt__', _gt_from_le)],
+ '__gt__': [('__lt__', _lt_from_gt),
+ ('__ge__', _ge_from_gt),
+ ('__le__', _le_from_gt)],
+ '__ge__': [('__le__', _le_from_ge),
+ ('__gt__', _gt_from_ge),
+ ('__lt__', _lt_from_ge)]
+}
+
def total_ordering(cls):
"""Class decorator that fills in missing ordering methods"""
- convert = {
- '__lt__': [('__gt__', _gt_from_lt),
- ('__le__', _le_from_lt),
- ('__ge__', _ge_from_lt)],
- '__le__': [('__ge__', _ge_from_le),
- ('__lt__', _lt_from_le),
- ('__gt__', _gt_from_le)],
- '__gt__': [('__lt__', _lt_from_gt),
- ('__ge__', _ge_from_gt),
- ('__le__', _le_from_gt)],
- '__ge__': [('__le__', _le_from_ge),
- ('__gt__', _gt_from_ge),
- ('__lt__', _lt_from_ge)]
- }
# Find user-defined comparisons (not those inherited from object).
- roots = [op for op in convert if getattr(cls, op, None) is not getattr(object, op, None)]
+ roots = [op for op in _convert if getattr(cls, op, None) is not getattr(object, op, None)]
if not roots:
raise ValueError('must define at least one ordering operation: < > <= >=')
root = max(roots) # prefer __lt__ to __le__ to __gt__ to __ge__
- for opname, opfunc in convert[root]:
+ for opname, opfunc in _convert[root]:
if opname not in roots:
opfunc.__name__ = opname
setattr(cls, opname, opfunc)
@@ -222,8 +223,6 @@ def cmp_to_key(mycmp):
return mycmp(self.obj, other.obj) <= 0
def __ge__(self, other):
return mycmp(self.obj, other.obj) >= 0
- def __ne__(self, other):
- return mycmp(self.obj, other.obj) != 0
__hash__ = None
return K
@@ -242,6 +241,14 @@ def partial(func, *args, **keywords):
"""New function with partial application of the given arguments
and keywords.
"""
+ if hasattr(func, 'func'):
+ args = func.args + args
+ tmpkw = func.keywords.copy()
+ tmpkw.update(keywords)
+ keywords = tmpkw
+ del tmpkw
+ func = func.func
+
def newfunc(*fargs, **fkeywords):
newkeywords = keywords.copy()
newkeywords.update(fkeywords)
@@ -291,7 +298,7 @@ class partialmethod(object):
for k, v in self.keywords.items())
format_string = "{module}.{cls}({func}, {args}, {keywords})"
return format_string.format(module=self.__class__.__module__,
- cls=self.__class__.__name__,
+ cls=self.__class__.__qualname__,
func=self.func,
args=args,
keywords=keywords)
@@ -412,120 +419,129 @@ def lru_cache(maxsize=128, typed=False):
if maxsize is not None and not isinstance(maxsize, int):
raise TypeError('Expected maxsize to be an integer or None')
+ def decorating_function(user_function):
+ wrapper = _lru_cache_wrapper(user_function, maxsize, typed, _CacheInfo)
+ return update_wrapper(wrapper, user_function)
+
+ return decorating_function
+
+def _lru_cache_wrapper(user_function, maxsize, typed, _CacheInfo):
# Constants shared by all lru cache instances:
sentinel = object() # unique object used to signal cache misses
make_key = _make_key # build a key from the function arguments
PREV, NEXT, KEY, RESULT = 0, 1, 2, 3 # names for the link fields
- def decorating_function(user_function):
- cache = {}
- hits = misses = 0
- full = False
- cache_get = cache.get # bound method to lookup a key or return None
- lock = RLock() # because linkedlist updates aren't threadsafe
- root = [] # root of the circular doubly linked list
- root[:] = [root, root, None, None] # initialize by pointing to self
-
- if maxsize == 0:
-
- def wrapper(*args, **kwds):
- # No caching -- just a statistics update after a successful call
- nonlocal misses
- result = user_function(*args, **kwds)
- misses += 1
- return result
+ cache = {}
+ hits = misses = 0
+ full = False
+ cache_get = cache.get # bound method to lookup a key or return None
+ lock = RLock() # because linkedlist updates aren't threadsafe
+ root = [] # root of the circular doubly linked list
+ root[:] = [root, root, None, None] # initialize by pointing to self
+
+ if maxsize == 0:
+
+ def wrapper(*args, **kwds):
+ # No caching -- just a statistics update after a successful call
+ nonlocal misses
+ result = user_function(*args, **kwds)
+ misses += 1
+ return result
- elif maxsize is None:
+ elif maxsize is None:
- def wrapper(*args, **kwds):
- # Simple caching without ordering or size limit
- nonlocal hits, misses
- key = make_key(args, kwds, typed)
- result = cache_get(key, sentinel)
- if result is not sentinel:
- hits += 1
- return result
- result = user_function(*args, **kwds)
- cache[key] = result
- misses += 1
+ def wrapper(*args, **kwds):
+ # Simple caching without ordering or size limit
+ nonlocal hits, misses
+ key = make_key(args, kwds, typed)
+ result = cache_get(key, sentinel)
+ if result is not sentinel:
+ hits += 1
return result
+ result = user_function(*args, **kwds)
+ cache[key] = result
+ misses += 1
+ return result
- else:
-
- def wrapper(*args, **kwds):
- # Size limited caching that tracks accesses by recency
- nonlocal root, hits, misses, full
- key = make_key(args, kwds, typed)
- with lock:
- link = cache_get(key)
- if link is not None:
- # Move the link to the front of the circular queue
- link_prev, link_next, _key, result = link
- link_prev[NEXT] = link_next
- link_next[PREV] = link_prev
- last = root[PREV]
- last[NEXT] = root[PREV] = link
- link[PREV] = last
- link[NEXT] = root
- hits += 1
- return result
- result = user_function(*args, **kwds)
- with lock:
- if key in cache:
- # Getting here means that this same key was added to the
- # cache while the lock was released. Since the link
- # update is already done, we need only return the
- # computed result and update the count of misses.
- pass
- elif full:
- # Use the old root to store the new key and result.
- oldroot = root
- oldroot[KEY] = key
- oldroot[RESULT] = result
- # Empty the oldest link and make it the new root.
- # Keep a reference to the old key and old result to
- # prevent their ref counts from going to zero during the
- # update. That will prevent potentially arbitrary object
- # clean-up code (i.e. __del__) from running while we're
- # still adjusting the links.
- root = oldroot[NEXT]
- oldkey = root[KEY]
- oldresult = root[RESULT]
- root[KEY] = root[RESULT] = None
- # Now update the cache dictionary.
- del cache[oldkey]
- # Save the potentially reentrant cache[key] assignment
- # for last, after the root and links have been put in
- # a consistent state.
- cache[key] = oldroot
- else:
- # Put result in a new link at the front of the queue.
- last = root[PREV]
- link = [last, root, key, result]
- last[NEXT] = root[PREV] = cache[key] = link
- full = (len(cache) >= maxsize)
- misses += 1
- return result
+ else:
- def cache_info():
- """Report cache statistics"""
+ def wrapper(*args, **kwds):
+ # Size limited caching that tracks accesses by recency
+ nonlocal root, hits, misses, full
+ key = make_key(args, kwds, typed)
with lock:
- return _CacheInfo(hits, misses, maxsize, len(cache))
-
- def cache_clear():
- """Clear the cache and cache statistics"""
- nonlocal hits, misses, full
+ link = cache_get(key)
+ if link is not None:
+ # Move the link to the front of the circular queue
+ link_prev, link_next, _key, result = link
+ link_prev[NEXT] = link_next
+ link_next[PREV] = link_prev
+ last = root[PREV]
+ last[NEXT] = root[PREV] = link
+ link[PREV] = last
+ link[NEXT] = root
+ hits += 1
+ return result
+ result = user_function(*args, **kwds)
with lock:
- cache.clear()
- root[:] = [root, root, None, None]
- hits = misses = 0
- full = False
+ if key in cache:
+ # Getting here means that this same key was added to the
+ # cache while the lock was released. Since the link
+ # update is already done, we need only return the
+ # computed result and update the count of misses.
+ pass
+ elif full:
+ # Use the old root to store the new key and result.
+ oldroot = root
+ oldroot[KEY] = key
+ oldroot[RESULT] = result
+ # Empty the oldest link and make it the new root.
+ # Keep a reference to the old key and old result to
+ # prevent their ref counts from going to zero during the
+ # update. That will prevent potentially arbitrary object
+ # clean-up code (i.e. __del__) from running while we're
+ # still adjusting the links.
+ root = oldroot[NEXT]
+ oldkey = root[KEY]
+ oldresult = root[RESULT]
+ root[KEY] = root[RESULT] = None
+ # Now update the cache dictionary.
+ del cache[oldkey]
+ # Save the potentially reentrant cache[key] assignment
+ # for last, after the root and links have been put in
+ # a consistent state.
+ cache[key] = oldroot
+ else:
+ # Put result in a new link at the front of the queue.
+ last = root[PREV]
+ link = [last, root, key, result]
+ last[NEXT] = root[PREV] = cache[key] = link
+ full = (len(cache) >= maxsize)
+ misses += 1
+ return result
- wrapper.cache_info = cache_info
- wrapper.cache_clear = cache_clear
- return update_wrapper(wrapper, user_function)
+ def cache_info():
+ """Report cache statistics"""
+ with lock:
+ return _CacheInfo(hits, misses, maxsize, len(cache))
+
+ def cache_clear():
+ """Clear the cache and cache statistics"""
+ nonlocal hits, misses, full
+ with lock:
+ cache.clear()
+ root[:] = [root, root, None, None]
+ hits = misses = 0
+ full = False
+
+ wrapper.cache_info = cache_info
+ wrapper.cache_clear = cache_clear
+ return wrapper
- return decorating_function
+try:
+ from _functools import _lru_cache_wrapper
+except ImportError:
+ pass
################################################################################
diff --git a/Lib/genericpath.py b/Lib/genericpath.py
index ca4a5108fd..671406197a 100644
--- a/Lib/genericpath.py
+++ b/Lib/genericpath.py
@@ -130,3 +130,16 @@ def _splitext(p, sep, altsep, extsep):
filenameIndex += 1
return p, p[:0]
+
+def _check_arg_types(funcname, *args):
+ hasstr = hasbytes = False
+ for s in args:
+ if isinstance(s, str):
+ hasstr = True
+ elif isinstance(s, bytes):
+ hasbytes = True
+ else:
+ raise TypeError('%s() argument must be str or bytes, not %r' %
+ (funcname, s.__class__.__name__)) from None
+ if hasstr and hasbytes:
+ raise TypeError("Can't mix strings and bytes in path components") from None
diff --git a/Lib/getpass.py b/Lib/getpass.py
index 7c4e976174..be51121158 100644
--- a/Lib/getpass.py
+++ b/Lib/getpass.py
@@ -99,7 +99,7 @@ def win_getpass(prompt='Password: ', stream=None):
"""Prompt for password with echo off, using Windows getch()."""
if sys.stdin is not sys.__stdin__:
return fallback_getpass(prompt, stream)
- import msvcrt
+
for c in prompt:
msvcrt.putwch(c)
pw = ""
diff --git a/Lib/gettext.py b/Lib/gettext.py
index 8caf1d1227..101378fefa 100644
--- a/Lib/gettext.py
+++ b/Lib/gettext.py
@@ -227,6 +227,13 @@ class GNUTranslations(NullTranslations):
LE_MAGIC = 0x950412de
BE_MAGIC = 0xde120495
+ # Acceptable .mo versions
+ VERSIONS = (0, 1)
+
+ def _get_versions(self, version):
+ """Returns a tuple of major version, minor version"""
+ return (version >> 16, version & 0xffff)
+
def _parse(self, fp):
"""Override this method to support alternative .mo formats."""
unpack = struct.unpack
@@ -247,6 +254,12 @@ class GNUTranslations(NullTranslations):
ii = '>II'
else:
raise OSError(0, 'Bad magic number', filename)
+
+ major_version, minor_version = self._get_versions(version)
+
+ if major_version not in self.VERSIONS:
+ raise OSError(0, 'Bad version number ' + str(major_version), filename)
+
# Now put all messages from the .mo file buffer into the catalog
# dictionary.
for i in range(0, msgcount):
diff --git a/Lib/glob.py b/Lib/glob.py
index d6eca248eb..16330d816a 100644
--- a/Lib/glob.py
+++ b/Lib/glob.py
@@ -4,9 +4,9 @@ import os
import re
import fnmatch
-__all__ = ["glob", "iglob"]
+__all__ = ["glob", "iglob", "escape"]
-def glob(pathname):
+def glob(pathname, *, recursive=False):
"""Return a list of paths matching a pathname pattern.
The pattern may contain simple shell-style wildcards a la
@@ -14,10 +14,12 @@ def glob(pathname):
dot are special cases that are not matched by '*' and '?'
patterns.
+ If recursive is true, the pattern '**' will match any files and
+ zero or more directories and subdirectories.
"""
- return list(iglob(pathname))
+ return list(iglob(pathname, recursive=recursive))
-def iglob(pathname):
+def iglob(pathname, *, recursive=False):
"""Return an iterator which yields the paths matching a pathname pattern.
The pattern may contain simple shell-style wildcards a la
@@ -25,7 +27,16 @@ def iglob(pathname):
dot are special cases that are not matched by '*' and '?'
patterns.
+ If recursive is true, the pattern '**' will match any files and
+ zero or more directories and subdirectories.
"""
+ it = _iglob(pathname, recursive)
+ if recursive and _isrecursive(pathname):
+ s = next(it) # skip empty string
+ assert not s
+ return it
+
+def _iglob(pathname, recursive):
dirname, basename = os.path.split(pathname)
if not has_magic(pathname):
if basename:
@@ -37,17 +48,23 @@ def iglob(pathname):
yield pathname
return
if not dirname:
- yield from glob1(None, basename)
+ if recursive and _isrecursive(basename):
+ yield from glob2(dirname, basename)
+ else:
+ yield from glob1(dirname, basename)
return
# `os.path.split()` returns the argument itself as a dirname if it is a
# drive or UNC path. Prevent an infinite recursion if a drive or UNC path
# contains magic characters (i.e. r'\\?\C:').
if dirname != pathname and has_magic(dirname):
- dirs = iglob(dirname)
+ dirs = _iglob(dirname, recursive)
else:
dirs = [dirname]
if has_magic(basename):
- glob_in_dir = glob1
+ if recursive and _isrecursive(basename):
+ glob_in_dir = glob2
+ else:
+ glob_in_dir = glob1
else:
glob_in_dir = glob0
for dirname in dirs:
@@ -83,6 +100,32 @@ def glob0(dirname, basename):
return [basename]
return []
+# This helper function recursively yields relative pathnames inside a literal
+# directory.
+
+def glob2(dirname, pattern):
+ assert _isrecursive(pattern)
+ yield pattern[:0]
+ yield from _rlistdir(dirname)
+
+# Recursively yields relative pathnames inside a literal directory.
+def _rlistdir(dirname):
+ if not dirname:
+ if isinstance(dirname, bytes):
+ dirname = bytes(os.curdir, 'ASCII')
+ else:
+ dirname = os.curdir
+ try:
+ names = os.listdir(dirname)
+ except os.error:
+ return
+ for x in names:
+ if not _ishidden(x):
+ yield x
+ path = os.path.join(dirname, x) if dirname else x
+ for y in _rlistdir(path):
+ yield os.path.join(x, y)
+
magic_check = re.compile('([*?[])')
magic_check_bytes = re.compile(b'([*?[])')
@@ -97,6 +140,12 @@ def has_magic(s):
def _ishidden(path):
return path[0] in ('.', b'.'[0])
+def _isrecursive(pattern):
+ if isinstance(pattern, bytes):
+ return pattern == b'**'
+ else:
+ return pattern == '**'
+
def escape(pathname):
"""Escape all special characters.
"""
diff --git a/Lib/gzip.py b/Lib/gzip.py
index 7ad00e1772..da4479e9d0 100644
--- a/Lib/gzip.py
+++ b/Lib/gzip.py
@@ -9,6 +9,7 @@ import struct, sys, time, os
import zlib
import builtins
import io
+import _compression
__all__ = ["GzipFile", "open", "compress", "decompress"]
@@ -89,49 +90,35 @@ class _PaddedFile:
return self._buffer[read:] + \
self.file.read(size-self._length+read)
- def prepend(self, prepend=b'', readprevious=False):
+ def prepend(self, prepend=b''):
if self._read is None:
self._buffer = prepend
- elif readprevious and len(prepend) <= self._read:
+ else: # Assume data was read since the last prepend() call
self._read -= len(prepend)
return
- else:
- self._buffer = self._buffer[self._read:] + prepend
self._length = len(self._buffer)
self._read = 0
- def unused(self):
- if self._read is None:
- return b''
- return self._buffer[self._read:]
-
- def seek(self, offset, whence=0):
- # This is only ever called with offset=whence=0
- if whence == 1 and self._read is not None:
- if 0 <= offset + self._read <= self._length:
- self._read += offset
- return
- else:
- offset += self._length - self._read
+ def seek(self, off):
self._read = None
self._buffer = None
- return self.file.seek(offset, whence)
-
- def __getattr__(self, name):
- return getattr(self.file, name)
+ return self.file.seek(off)
+ def seekable(self):
+ return True # Allows fast-forwarding even in unseekable streams
-class GzipFile(io.BufferedIOBase):
+class GzipFile(_compression.BaseStream):
"""The GzipFile class simulates most of the methods of a file object with
- the exception of the readinto() and truncate() methods.
+ the exception of the truncate() method.
This class only supports opening files in binary mode. If you need to open a
compressed file in text mode, use the gzip.open() function.
"""
+ # Overridden with internal file object to be closed, if only a filename
+ # is passed in
myfileobj = None
- max_read_chunk = 10 * 1024 * 1024 # 10Mb
def __init__(self, filename=None, mode=None,
compresslevel=9, fileobj=None, mtime=None):
@@ -146,7 +133,7 @@ class GzipFile(io.BufferedIOBase):
a file object.
When fileobj is not None, the filename argument is only used to be
- included in the gzip file header, which may includes the original
+ included in the gzip file header, which may include the original
filename of the uncompressed file. It defaults to the filename of
fileobj, if discernible; otherwise, it defaults to the empty string,
and in this case the original filename is not included in the header.
@@ -163,13 +150,8 @@ class GzipFile(io.BufferedIOBase):
at all. The default is 9.
The mtime argument is an optional numeric timestamp to be written
- to the stream when compressing. All gzip compressed streams
- are required to contain a timestamp. If omitted or None, the
- current time is used. This module ignores the timestamp when
- decompressing; however, some programs, such as gunzip, make use
- of it. The format of the timestamp is the same as that of the
- return value of time.time() and of the st_mtime member of the
- object returned by os.stat().
+ to the last modification time field in the stream when compressing.
+ If omitted or None, the current time is used.
"""
@@ -188,18 +170,9 @@ class GzipFile(io.BufferedIOBase):
if mode.startswith('r'):
self.mode = READ
- # Set flag indicating start of a new member
- self._new_member = True
- # Buffer data read from gzip file. extrastart is offset in
- # stream where buffer starts. extrasize is number of
- # bytes remaining in buffer from current stream position.
- self.extrabuf = b""
- self.extrasize = 0
- self.extrastart = 0
+ raw = _GzipReader(fileobj)
+ self._buffer = io.BufferedReader(raw)
self.name = filename
- # Starts small, scales exponentially
- self.min_readsize = 100
- fileobj = _PaddedFile(fileobj)
elif mode.startswith(('w', 'a', 'x')):
self.mode = WRITE
@@ -209,12 +182,11 @@ class GzipFile(io.BufferedIOBase):
-zlib.MAX_WBITS,
zlib.DEF_MEM_LEVEL,
0)
+ self._write_mtime = mtime
else:
raise ValueError("Invalid mode: {!r}".format(mode))
self.fileobj = fileobj
- self.offset = 0
- self.mtime = mtime
if self.mode == WRITE:
self._write_gzip_header()
@@ -227,26 +199,22 @@ class GzipFile(io.BufferedIOBase):
return self.name + ".gz"
return self.name
+ @property
+ def mtime(self):
+ """Last modification time read from stream, or None"""
+ return self._buffer.raw._last_mtime
+
def __repr__(self):
- fileobj = self.fileobj
- if isinstance(fileobj, _PaddedFile):
- fileobj = fileobj.file
- s = repr(fileobj)
+ s = repr(self.fileobj)
return '<gzip ' + s[1:-1] + ' ' + hex(id(self)) + '>'
- def _check_closed(self):
- """Raises a ValueError if the underlying file object has been closed.
-
- """
- if self.closed:
- raise ValueError('I/O operation on closed file.')
-
def _init_write(self, filename):
self.name = filename
- self.crc = zlib.crc32(b"") & 0xffffffff
+ self.crc = zlib.crc32(b"")
self.size = 0
self.writebuf = []
self.bufsize = 0
+ self.offset = 0 # Current file offset for seek(), tell(), etc
def _write_gzip_header(self):
self.fileobj.write(b'\037\213') # magic header
@@ -265,7 +233,7 @@ class GzipFile(io.BufferedIOBase):
if fname:
flags = FNAME
self.fileobj.write(chr(flags).encode('latin-1'))
- mtime = self.mtime
+ mtime = self._write_mtime
if mtime is None:
mtime = time.time()
write32u(self.fileobj, int(mtime))
@@ -274,59 +242,8 @@ class GzipFile(io.BufferedIOBase):
if fname:
self.fileobj.write(fname + b'\000')
- def _init_read(self):
- self.crc = zlib.crc32(b"") & 0xffffffff
- self.size = 0
-
- def _read_exact(self, n):
- data = self.fileobj.read(n)
- while len(data) < n:
- b = self.fileobj.read(n - len(data))
- if not b:
- raise EOFError("Compressed file ended before the "
- "end-of-stream marker was reached")
- data += b
- return data
-
- def _read_gzip_header(self):
- magic = self.fileobj.read(2)
- if magic == b'':
- return False
-
- if magic != b'\037\213':
- raise OSError('Not a gzipped file')
-
- method, flag, self.mtime = struct.unpack("<BBIxx", self._read_exact(8))
- if method != 8:
- raise OSError('Unknown compression method')
-
- if flag & FEXTRA:
- # Read & discard the extra field, if present
- extra_len, = struct.unpack("<H", self._read_exact(2))
- self._read_exact(extra_len)
- if flag & FNAME:
- # Read and discard a null-terminated string containing the filename
- while True:
- s = self.fileobj.read(1)
- if not s or s==b'\000':
- break
- if flag & FCOMMENT:
- # Read and discard a null-terminated string containing a comment
- while True:
- s = self.fileobj.read(1)
- if not s or s==b'\000':
- break
- if flag & FHCRC:
- self._read_exact(2) # Read & discard the 16-bit header CRC
-
- unused = self.fileobj.unused()
- if unused:
- uncompress = self.decompress.decompress(unused)
- self._add_read_data(uncompress)
- return True
-
def write(self,data):
- self._check_closed()
+ self._check_not_closed()
if self.mode != WRITE:
import errno
raise OSError(errno.EBADF, "write() on read-only GzipFile object")
@@ -334,166 +251,47 @@ class GzipFile(io.BufferedIOBase):
if self.fileobj is None:
raise ValueError("write() on closed GzipFile object")
- # Convert data type if called by io.BufferedWriter.
- if isinstance(data, memoryview):
- data = data.tobytes()
+ if isinstance(data, bytes):
+ length = len(data)
+ else:
+ # accept any data that supports the buffer protocol
+ data = memoryview(data)
+ length = data.nbytes
- if len(data) > 0:
+ if length > 0:
self.fileobj.write(self.compress.compress(data))
- self.size += len(data)
- self.crc = zlib.crc32(data, self.crc) & 0xffffffff
- self.offset += len(data)
+ self.size += length
+ self.crc = zlib.crc32(data, self.crc)
+ self.offset += length
- return len(data)
+ return length
def read(self, size=-1):
- self._check_closed()
+ self._check_not_closed()
if self.mode != READ:
import errno
raise OSError(errno.EBADF, "read() on write-only GzipFile object")
-
- if self.extrasize <= 0 and self.fileobj is None:
- return b''
-
- readsize = 1024
- if size < 0: # get the whole thing
- while self._read(readsize):
- readsize = min(self.max_read_chunk, readsize * 2)
- size = self.extrasize
- else: # just get some more of it
- while size > self.extrasize:
- if not self._read(readsize):
- if size > self.extrasize:
- size = self.extrasize
- break
- readsize = min(self.max_read_chunk, readsize * 2)
-
- offset = self.offset - self.extrastart
- chunk = self.extrabuf[offset: offset + size]
- self.extrasize = self.extrasize - size
-
- self.offset += size
- return chunk
+ return self._buffer.read(size)
def read1(self, size=-1):
- self._check_closed()
+ """Implements BufferedIOBase.read1()
+
+ Reads up to a buffer's worth of data is size is negative."""
+ self._check_not_closed()
if self.mode != READ:
import errno
raise OSError(errno.EBADF, "read1() on write-only GzipFile object")
- if self.extrasize <= 0 and self.fileobj is None:
- return b''
-
- # For certain input data, a single call to _read() may not return
- # any data. In this case, retry until we get some data or reach EOF.
- while self.extrasize <= 0 and self._read():
- pass
- if size < 0 or size > self.extrasize:
- size = self.extrasize
-
- offset = self.offset - self.extrastart
- chunk = self.extrabuf[offset: offset + size]
- self.extrasize -= size
- self.offset += size
- return chunk
+ if size < 0:
+ size = io.DEFAULT_BUFFER_SIZE
+ return self._buffer.read1(size)
def peek(self, n):
+ self._check_not_closed()
if self.mode != READ:
import errno
raise OSError(errno.EBADF, "peek() on write-only GzipFile object")
-
- # Do not return ridiculously small buffers, for one common idiom
- # is to call peek(1) and expect more bytes in return.
- if n < 100:
- n = 100
- if self.extrasize == 0:
- if self.fileobj is None:
- return b''
- # Ensure that we don't return b"" if we haven't reached EOF.
- # 1024 is the same buffering heuristic used in read()
- while self.extrasize == 0 and self._read(max(n, 1024)):
- pass
- offset = self.offset - self.extrastart
- remaining = self.extrasize
- assert remaining == len(self.extrabuf) - offset
- return self.extrabuf[offset:offset + n]
-
- def _unread(self, buf):
- self.extrasize = len(buf) + self.extrasize
- self.offset -= len(buf)
-
- def _read(self, size=1024):
- if self.fileobj is None:
- return False
-
- if self._new_member:
- # If the _new_member flag is set, we have to
- # jump to the next member, if there is one.
- self._init_read()
- if not self._read_gzip_header():
- return False
- self.decompress = zlib.decompressobj(-zlib.MAX_WBITS)
- self._new_member = False
-
- # Read a chunk of data from the file
- buf = self.fileobj.read(size)
-
- # If the EOF has been reached, flush the decompression object
- # and mark this object as finished.
-
- if buf == b"":
- uncompress = self.decompress.flush()
- # Prepend the already read bytes to the fileobj to they can be
- # seen by _read_eof()
- self.fileobj.prepend(self.decompress.unused_data, True)
- self._read_eof()
- self._add_read_data( uncompress )
- return False
-
- uncompress = self.decompress.decompress(buf)
- self._add_read_data( uncompress )
-
- if self.decompress.unused_data != b"":
- # Ending case: we've come to the end of a member in the file,
- # so seek back to the start of the unused data, finish up
- # this member, and read a new gzip header.
- # Prepend the already read bytes to the fileobj to they can be
- # seen by _read_eof() and _read_gzip_header()
- self.fileobj.prepend(self.decompress.unused_data, True)
- # Check the CRC and file size, and set the flag so we read
- # a new member on the next call
- self._read_eof()
- self._new_member = True
- return True
-
- def _add_read_data(self, data):
- self.crc = zlib.crc32(data, self.crc) & 0xffffffff
- offset = self.offset - self.extrastart
- self.extrabuf = self.extrabuf[offset:] + data
- self.extrasize = self.extrasize + len(data)
- self.extrastart = self.offset
- self.size = self.size + len(data)
-
- def _read_eof(self):
- # We've read to the end of the file
- # We check the that the computed CRC and size of the
- # uncompressed data matches the stored values. Note that the size
- # stored is the true file size mod 2**32.
- crc32, isize = struct.unpack("<II", self._read_exact(8))
- if crc32 != self.crc:
- raise OSError("CRC check failed %s != %s" % (hex(crc32),
- hex(self.crc)))
- elif isize != (self.size & 0xffffffff):
- raise OSError("Incorrect length of data produced")
-
- # Gzip files can be padded with zeroes and still have archives.
- # Consume all zero bytes and set the file position to the first
- # non-zero byte. See http://www.gzip.org/#faq8
- c = b"\x00"
- while c == b"\x00":
- c = self.fileobj.read(1)
- if c:
- self.fileobj.prepend(c, True)
+ return self._buffer.peek(n)
@property
def closed(self):
@@ -510,6 +308,8 @@ class GzipFile(io.BufferedIOBase):
write32u(fileobj, self.crc)
# self.size may exceed 2GB, or even 4GB
write32u(fileobj, self.size & 0xffffffff)
+ elif self.mode == READ:
+ self._buffer.close()
finally:
myfileobj = self.myfileobj
if myfileobj:
@@ -517,7 +317,7 @@ class GzipFile(io.BufferedIOBase):
myfileobj.close()
def flush(self,zlib_mode=zlib.Z_SYNC_FLUSH):
- self._check_closed()
+ self._check_not_closed()
if self.mode == WRITE:
# Ensure the compressor's buffer is flushed
self.fileobj.write(self.compress.flush(zlib_mode))
@@ -536,12 +336,7 @@ class GzipFile(io.BufferedIOBase):
beginning of the file'''
if self.mode != READ:
raise OSError("Can't rewind in write mode")
- self.fileobj.seek(0)
- self._new_member = True
- self.extrabuf = b""
- self.extrasize = 0
- self.extrastart = 0
- self.offset = 0
+ self._buffer.seek(0)
def readable(self):
return self.mode == READ
@@ -552,13 +347,13 @@ class GzipFile(io.BufferedIOBase):
def seekable(self):
return True
- def seek(self, offset, whence=0):
- if whence:
- if whence == 1:
- offset = self.offset + offset
- else:
- raise ValueError('Seek from end not supported')
+ def seek(self, offset, whence=io.SEEK_SET):
if self.mode == WRITE:
+ if whence != io.SEEK_SET:
+ if whence == io.SEEK_CUR:
+ offset = self.offset + offset
+ else:
+ raise ValueError('Seek from end not supported')
if offset < self.offset:
raise OSError('Negative seek in write mode')
count = offset - self.offset
@@ -567,55 +362,156 @@ class GzipFile(io.BufferedIOBase):
self.write(chunk)
self.write(bytes(count % 1024))
elif self.mode == READ:
- if offset < self.offset:
- # for negative seek, rewind and do positive seek
- self.rewind()
- count = offset - self.offset
- for i in range(count // 1024):
- self.read(1024)
- self.read(count % 1024)
+ self._check_not_closed()
+ return self._buffer.seek(offset, whence)
return self.offset
def readline(self, size=-1):
+ self._check_not_closed()
+ return self._buffer.readline(size)
+
+
+class _GzipReader(_compression.DecompressReader):
+ def __init__(self, fp):
+ super().__init__(_PaddedFile(fp), zlib.decompressobj,
+ wbits=-zlib.MAX_WBITS)
+ # Set flag indicating start of a new member
+ self._new_member = True
+ self._last_mtime = None
+
+ def _init_read(self):
+ self._crc = zlib.crc32(b"")
+ self._stream_size = 0 # Decompressed size of unconcatenated stream
+
+ def _read_exact(self, n):
+ '''Read exactly *n* bytes from `self._fp`
+
+ This method is required because self._fp may be unbuffered,
+ i.e. return short reads.
+ '''
+
+ data = self._fp.read(n)
+ while len(data) < n:
+ b = self._fp.read(n - len(data))
+ if not b:
+ raise EOFError("Compressed file ended before the "
+ "end-of-stream marker was reached")
+ data += b
+ return data
+
+ def _read_gzip_header(self):
+ magic = self._fp.read(2)
+ if magic == b'':
+ return False
+
+ if magic != b'\037\213':
+ raise OSError('Not a gzipped file (%r)' % magic)
+
+ (method, flag,
+ self._last_mtime) = struct.unpack("<BBIxx", self._read_exact(8))
+ if method != 8:
+ raise OSError('Unknown compression method')
+
+ if flag & FEXTRA:
+ # Read & discard the extra field, if present
+ extra_len, = struct.unpack("<H", self._read_exact(2))
+ self._read_exact(extra_len)
+ if flag & FNAME:
+ # Read and discard a null-terminated string containing the filename
+ while True:
+ s = self._fp.read(1)
+ if not s or s==b'\000':
+ break
+ if flag & FCOMMENT:
+ # Read and discard a null-terminated string containing a comment
+ while True:
+ s = self._fp.read(1)
+ if not s or s==b'\000':
+ break
+ if flag & FHCRC:
+ self._read_exact(2) # Read & discard the 16-bit header CRC
+ return True
+
+ def read(self, size=-1):
if size < 0:
- # Shortcut common case - newline found in buffer.
- offset = self.offset - self.extrastart
- i = self.extrabuf.find(b'\n', offset) + 1
- if i > 0:
- self.extrasize -= i - offset
- self.offset += i - offset
- return self.extrabuf[offset: i]
-
- size = sys.maxsize
- readsize = self.min_readsize
- else:
- readsize = size
- bufs = []
- while size != 0:
- c = self.read(readsize)
- i = c.find(b'\n')
-
- # We set i=size to break out of the loop under two
- # conditions: 1) there's no newline, and the chunk is
- # larger than size, or 2) there is a newline, but the
- # resulting line would be longer than 'size'.
- if (size <= i) or (i == -1 and len(c) > size):
- i = size - 1
-
- if i >= 0 or c == b'':
- bufs.append(c[:i + 1]) # Add portion of last chunk
- self._unread(c[i + 1:]) # Push back rest of chunk
+ return self.readall()
+ # size=0 is special because decompress(max_length=0) is not supported
+ if not size:
+ return b""
+
+ # For certain input data, a single
+ # call to decompress() may not return
+ # any data. In this case, retry until we get some data or reach EOF.
+ while True:
+ if self._decompressor.eof:
+ # Ending case: we've come to the end of a member in the file,
+ # so finish up this member, and read a new gzip header.
+ # Check the CRC and file size, and set the flag so we read
+ # a new member
+ self._read_eof()
+ self._new_member = True
+ self._decompressor = self._decomp_factory(
+ **self._decomp_args)
+
+ if self._new_member:
+ # If the _new_member flag is set, we have to
+ # jump to the next member, if there is one.
+ self._init_read()
+ if not self._read_gzip_header():
+ self._size = self._pos
+ return b""
+ self._new_member = False
+
+ # Read a chunk of data from the file
+ buf = self._fp.read(io.DEFAULT_BUFFER_SIZE)
+
+ uncompress = self._decompressor.decompress(buf, size)
+ if self._decompressor.unconsumed_tail != b"":
+ self._fp.prepend(self._decompressor.unconsumed_tail)
+ elif self._decompressor.unused_data != b"":
+ # Prepend the already read bytes to the fileobj so they can
+ # be seen by _read_eof() and _read_gzip_header()
+ self._fp.prepend(self._decompressor.unused_data)
+
+ if uncompress != b"":
break
+ if buf == b"":
+ raise EOFError("Compressed file ended before the "
+ "end-of-stream marker was reached")
- # Append chunk to list, decrease 'size',
- bufs.append(c)
- size = size - len(c)
- readsize = min(size, readsize * 2)
- if readsize > self.min_readsize:
- self.min_readsize = min(readsize, self.min_readsize * 2, 512)
- return b''.join(bufs) # Return resulting line
+ self._add_read_data( uncompress )
+ self._pos += len(uncompress)
+ return uncompress
+
+ def _add_read_data(self, data):
+ self._crc = zlib.crc32(data, self._crc)
+ self._stream_size = self._stream_size + len(data)
+
+ def _read_eof(self):
+ # We've read to the end of the file
+ # We check the that the computed CRC and size of the
+ # uncompressed data matches the stored values. Note that the size
+ # stored is the true file size mod 2**32.
+ crc32, isize = struct.unpack("<II", self._read_exact(8))
+ if crc32 != self._crc:
+ raise OSError("CRC check failed %s != %s" % (hex(crc32),
+ hex(self._crc)))
+ elif isize != (self._stream_size & 0xffffffff):
+ raise OSError("Incorrect length of data produced")
+
+ # Gzip files can be padded with zeroes and still have archives.
+ # Consume all zero bytes and set the file position to the first
+ # non-zero byte. See http://www.gzip.org/#faq8
+ c = b"\x00"
+ while c == b"\x00":
+ c = self._fp.read(1)
+ if c:
+ self._fp.prepend(c)
+ def _rewind(self):
+ super()._rewind()
+ self._new_member = True
def compress(data, compresslevel=9):
"""Compress data in one shot and return the compressed string.
diff --git a/Lib/heapq.py b/Lib/heapq.py
index d615239b94..0b3e89a3a9 100644
--- a/Lib/heapq.py
+++ b/Lib/heapq.py
@@ -54,7 +54,7 @@ representation for a tournament. The numbers below are `k', not a[k]:
In the tree above, each cell `k' is topping `2*k+1' and `2*k+2'. In
-an usual binary tournament we see in sports, each cell is the winner
+a usual binary tournament we see in sports, each cell is the winner
over the two cells it tops, and we can trace the winner down the tree
to see all opponents s/he had. However, in many computer applications
of such tournaments, we do not need to trace the history of a winner.
@@ -127,8 +127,6 @@ From all times, sorting has always been a Great Art! :-)
__all__ = ['heappush', 'heappop', 'heapify', 'heapreplace', 'merge',
'nlargest', 'nsmallest', 'heappushpop']
-from itertools import islice, count, tee, chain
-
def heappush(heap, item):
"""Push item onto heap, maintaining the heap invariant."""
heap.append(item)
@@ -141,9 +139,8 @@ def heappop(heap):
returnitem = heap[0]
heap[0] = lastelt
_siftup(heap, 0)
- else:
- returnitem = lastelt
- return returnitem
+ return returnitem
+ return lastelt
def heapreplace(heap, item):
"""Pop and return the current smallest value, and add the new item.
@@ -179,12 +176,22 @@ def heapify(x):
for i in reversed(range(n//2)):
_siftup(x, i)
-def _heappushpop_max(heap, item):
- """Maxheap version of a heappush followed by a heappop."""
- if heap and item < heap[0]:
- item, heap[0] = heap[0], item
+def _heappop_max(heap):
+ """Maxheap version of a heappop."""
+ lastelt = heap.pop() # raises appropriate IndexError if heap is empty
+ if heap:
+ returnitem = heap[0]
+ heap[0] = lastelt
_siftup_max(heap, 0)
- return item
+ return returnitem
+ return lastelt
+
+def _heapreplace_max(heap, item):
+ """Maxheap version of a heappop followed by a heappush."""
+ returnitem = heap[0] # raises appropriate IndexError if heap is empty
+ heap[0] = item
+ _siftup_max(heap, 0)
+ return returnitem
def _heapify_max(x):
"""Transform list into a maxheap, in-place, in O(len(x)) time."""
@@ -192,42 +199,6 @@ def _heapify_max(x):
for i in reversed(range(n//2)):
_siftup_max(x, i)
-def nlargest(n, iterable):
- """Find the n largest elements in a dataset.
-
- Equivalent to: sorted(iterable, reverse=True)[:n]
- """
- if n < 0:
- return []
- it = iter(iterable)
- result = list(islice(it, n))
- if not result:
- return result
- heapify(result)
- _heappushpop = heappushpop
- for elem in it:
- _heappushpop(result, elem)
- result.sort(reverse=True)
- return result
-
-def nsmallest(n, iterable):
- """Find the n smallest elements in a dataset.
-
- Equivalent to: sorted(iterable)[:n]
- """
- if n < 0:
- return []
- it = iter(iterable)
- result = list(islice(it, n))
- if not result:
- return result
- _heapify_max(result)
- _heappushpop = _heappushpop_max
- for elem in it:
- _heappushpop(result, elem)
- result.sort()
- return result
-
# 'heap' is a heap at all indices >= startpos, except possibly for pos. pos
# is the index of a leaf with a possibly out-of-order value. Restore the
# heap invariant.
@@ -340,13 +311,7 @@ def _siftup_max(heap, pos):
heap[pos] = newitem
_siftdown_max(heap, startpos, pos)
-# If available, use C implementation
-try:
- from _heapq import *
-except ImportError:
- pass
-
-def merge(*iterables):
+def merge(*iterables, key=None, reverse=False):
'''Merge multiple sorted inputs into a single sorted output.
Similar to sorted(itertools.chain(*iterables)) but returns a generator,
@@ -356,51 +321,158 @@ def merge(*iterables):
>>> list(merge([1,3,5,7], [0,2,4,8], [5,10,15,20], [], [25]))
[0, 1, 2, 3, 4, 5, 5, 7, 8, 10, 15, 20, 25]
+ If *key* is not None, applies a key function to each element to determine
+ its sort order.
+
+ >>> list(merge(['dog', 'horse'], ['cat', 'fish', 'kangaroo'], key=len))
+ ['dog', 'cat', 'fish', 'horse', 'kangaroo']
+
'''
- _heappop, _heapreplace, _StopIteration = heappop, heapreplace, StopIteration
- _len = len
h = []
h_append = h.append
- for itnum, it in enumerate(map(iter, iterables)):
+
+ if reverse:
+ _heapify = _heapify_max
+ _heappop = _heappop_max
+ _heapreplace = _heapreplace_max
+ direction = -1
+ else:
+ _heapify = heapify
+ _heappop = heappop
+ _heapreplace = heapreplace
+ direction = 1
+
+ if key is None:
+ for order, it in enumerate(map(iter, iterables)):
+ try:
+ next = it.__next__
+ h_append([next(), order * direction, next])
+ except StopIteration:
+ pass
+ _heapify(h)
+ while len(h) > 1:
+ try:
+ while True:
+ value, order, next = s = h[0]
+ yield value
+ s[0] = next() # raises StopIteration when exhausted
+ _heapreplace(h, s) # restore heap condition
+ except StopIteration:
+ _heappop(h) # remove empty iterator
+ if h:
+ # fast case when only a single iterator remains
+ value, order, next = h[0]
+ yield value
+ yield from next.__self__
+ return
+
+ for order, it in enumerate(map(iter, iterables)):
try:
next = it.__next__
- h_append([next(), itnum, next])
- except _StopIteration:
+ value = next()
+ h_append([key(value), order * direction, value, next])
+ except StopIteration:
pass
- heapify(h)
-
- while _len(h) > 1:
+ _heapify(h)
+ while len(h) > 1:
try:
while True:
- v, itnum, next = s = h[0]
- yield v
- s[0] = next() # raises StopIteration when exhausted
- _heapreplace(h, s) # restore heap condition
- except _StopIteration:
- _heappop(h) # remove empty iterator
+ key_value, order, value, next = s = h[0]
+ yield value
+ value = next()
+ s[0] = key(value)
+ s[2] = value
+ _heapreplace(h, s)
+ except StopIteration:
+ _heappop(h)
if h:
- # fast case when only a single iterator remains
- v, itnum, next = h[0]
- yield v
+ key_value, order, value, next = h[0]
+ yield value
yield from next.__self__
-# Extend the implementations of nsmallest and nlargest to use a key= argument
-_nsmallest = nsmallest
+
+# Algorithm notes for nlargest() and nsmallest()
+# ==============================================
+#
+# Make a single pass over the data while keeping the k most extreme values
+# in a heap. Memory consumption is limited to keeping k values in a list.
+#
+# Measured performance for random inputs:
+#
+# number of comparisons
+# n inputs k-extreme values (average of 5 trials) % more than min()
+# ------------- ---------------- --------------------- -----------------
+# 1,000 100 3,317 231.7%
+# 10,000 100 14,046 40.5%
+# 100,000 100 105,749 5.7%
+# 1,000,000 100 1,007,751 0.8%
+# 10,000,000 100 10,009,401 0.1%
+#
+# Theoretical number of comparisons for k smallest of n random inputs:
+#
+# Step Comparisons Action
+# ---- -------------------------- ---------------------------
+# 1 1.66 * k heapify the first k-inputs
+# 2 n - k compare remaining elements to top of heap
+# 3 k * (1 + lg2(k)) * ln(n/k) replace the topmost value on the heap
+# 4 k * lg2(k) - (k/2) final sort of the k most extreme values
+#
+# Combining and simplifying for a rough estimate gives:
+#
+# comparisons = n + k * (log(k, 2) * log(n/k) + log(k, 2) + log(n/k))
+#
+# Computing the number of comparisons for step 3:
+# -----------------------------------------------
+# * For the i-th new value from the iterable, the probability of being in the
+# k most extreme values is k/i. For example, the probability of the 101st
+# value seen being in the 100 most extreme values is 100/101.
+# * If the value is a new extreme value, the cost of inserting it into the
+# heap is 1 + log(k, 2).
+# * The probability times the cost gives:
+# (k/i) * (1 + log(k, 2))
+# * Summing across the remaining n-k elements gives:
+# sum((k/i) * (1 + log(k, 2)) for i in range(k+1, n+1))
+# * This reduces to:
+# (H(n) - H(k)) * k * (1 + log(k, 2))
+# * Where H(n) is the n-th harmonic number estimated by:
+# gamma = 0.5772156649
+# H(n) = log(n, e) + gamma + 1 / (2 * n)
+# http://en.wikipedia.org/wiki/Harmonic_series_(mathematics)#Rate_of_divergence
+# * Substituting the H(n) formula:
+# comparisons = k * (1 + log(k, 2)) * (log(n/k, e) + (1/n - 1/k) / 2)
+#
+# Worst-case for step 3:
+# ----------------------
+# In the worst case, the input data is reversed sorted so that every new element
+# must be inserted in the heap:
+#
+# comparisons = 1.66 * k + log(k, 2) * (n - k)
+#
+# Alternative Algorithms
+# ----------------------
+# Other algorithms were not used because they:
+# 1) Took much more auxiliary memory,
+# 2) Made multiple passes over the data.
+# 3) Made more comparisons in common cases (small k, large n, semi-random input).
+# See the more detailed comparison of approach at:
+# http://code.activestate.com/recipes/577573-compare-algorithms-for-heapqsmallest
+
def nsmallest(n, iterable, key=None):
"""Find the n smallest elements in a dataset.
Equivalent to: sorted(iterable, key=key)[:n]
"""
- # Short-cut for n==1 is to use min() when len(iterable)>0
+
+ # Short-cut for n==1 is to use min()
if n == 1:
it = iter(iterable)
- head = list(islice(it, 1))
- if not head:
- return []
+ sentinel = object()
if key is None:
- return [min(chain(head, it))]
- return [min(chain(head, it), key=key)]
+ result = min(it, default=sentinel)
+ else:
+ result = min(it, default=sentinel, key=key)
+ return [] if result is sentinel else [result]
# When n>=size, it's faster to use sorted()
try:
@@ -413,32 +485,57 @@ def nsmallest(n, iterable, key=None):
# When key is none, use simpler decoration
if key is None:
- it = zip(iterable, count()) # decorate
- result = _nsmallest(n, it)
- return [r[0] for r in result] # undecorate
+ it = iter(iterable)
+ # put the range(n) first so that zip() doesn't
+ # consume one too many elements from the iterator
+ result = [(elem, i) for i, elem in zip(range(n), it)]
+ if not result:
+ return result
+ _heapify_max(result)
+ top = result[0][0]
+ order = n
+ _heapreplace = _heapreplace_max
+ for elem in it:
+ if elem < top:
+ _heapreplace(result, (elem, order))
+ top = result[0][0]
+ order += 1
+ result.sort()
+ return [r[0] for r in result]
# General case, slowest method
- in1, in2 = tee(iterable)
- it = zip(map(key, in1), count(), in2) # decorate
- result = _nsmallest(n, it)
- return [r[2] for r in result] # undecorate
+ it = iter(iterable)
+ result = [(key(elem), i, elem) for i, elem in zip(range(n), it)]
+ if not result:
+ return result
+ _heapify_max(result)
+ top = result[0][0]
+ order = n
+ _heapreplace = _heapreplace_max
+ for elem in it:
+ k = key(elem)
+ if k < top:
+ _heapreplace(result, (k, order, elem))
+ top = result[0][0]
+ order += 1
+ result.sort()
+ return [r[2] for r in result]
-_nlargest = nlargest
def nlargest(n, iterable, key=None):
"""Find the n largest elements in a dataset.
Equivalent to: sorted(iterable, key=key, reverse=True)[:n]
"""
- # Short-cut for n==1 is to use max() when len(iterable)>0
+ # Short-cut for n==1 is to use max()
if n == 1:
it = iter(iterable)
- head = list(islice(it, 1))
- if not head:
- return []
+ sentinel = object()
if key is None:
- return [max(chain(head, it))]
- return [max(chain(head, it), key=key)]
+ result = max(it, default=sentinel)
+ else:
+ result = max(it, default=sentinel, key=key)
+ return [] if result is sentinel else [result]
# When n>=size, it's faster to use sorted()
try:
@@ -451,26 +548,60 @@ def nlargest(n, iterable, key=None):
# When key is none, use simpler decoration
if key is None:
- it = zip(iterable, count(0,-1)) # decorate
- result = _nlargest(n, it)
- return [r[0] for r in result] # undecorate
+ it = iter(iterable)
+ result = [(elem, i) for i, elem in zip(range(0, -n, -1), it)]
+ if not result:
+ return result
+ heapify(result)
+ top = result[0][0]
+ order = -n
+ _heapreplace = heapreplace
+ for elem in it:
+ if top < elem:
+ _heapreplace(result, (elem, order))
+ top = result[0][0]
+ order -= 1
+ result.sort(reverse=True)
+ return [r[0] for r in result]
# General case, slowest method
- in1, in2 = tee(iterable)
- it = zip(map(key, in1), count(0,-1), in2) # decorate
- result = _nlargest(n, it)
- return [r[2] for r in result] # undecorate
+ it = iter(iterable)
+ result = [(key(elem), i, elem) for i, elem in zip(range(0, -n, -1), it)]
+ if not result:
+ return result
+ heapify(result)
+ top = result[0][0]
+ order = -n
+ _heapreplace = heapreplace
+ for elem in it:
+ k = key(elem)
+ if top < k:
+ _heapreplace(result, (k, order, elem))
+ top = result[0][0]
+ order -= 1
+ result.sort(reverse=True)
+ return [r[2] for r in result]
+
+# If available, use C implementation
+try:
+ from _heapq import *
+except ImportError:
+ pass
+try:
+ from _heapq import _heapreplace_max
+except ImportError:
+ pass
+try:
+ from _heapq import _heapify_max
+except ImportError:
+ pass
+try:
+ from _heapq import _heappop_max
+except ImportError:
+ pass
+
if __name__ == "__main__":
- # Simple sanity test
- heap = []
- data = [1, 3, 5, 7, 9, 2, 4, 6, 8, 0]
- for item in data:
- heappush(heap, item)
- sort = []
- while heap:
- sort.append(heappop(heap))
- print(sort)
import doctest
- doctest.testmod()
+ print(doctest.testmod())
diff --git a/Lib/html/entities.py b/Lib/html/entities.py
index be3f627c8f..91ea5da2af 100644
--- a/Lib/html/entities.py
+++ b/Lib/html/entities.py
@@ -1,5 +1,8 @@
"""HTML character entity references."""
+__all__ = ['html5', 'name2codepoint', 'codepoint2name', 'entitydefs']
+
+
# maps the HTML entity name to the Unicode code point
name2codepoint = {
'AElig': 0x00c6, # latin capital letter AE = latin capital ligature AE, U+00C6 ISOlat1
diff --git a/Lib/html/parser.py b/Lib/html/parser.py
index 9ae31b9128..b781c63f33 100644
--- a/Lib/html/parser.py
+++ b/Lib/html/parser.py
@@ -29,35 +29,15 @@ starttagopen = re.compile('<[a-zA-Z]')
piclose = re.compile('>')
commentclose = re.compile(r'--\s*>')
# Note:
-# 1) the strict attrfind isn't really strict, but we can't make it
-# correctly strict without breaking backward compatibility;
-# 2) if you change tagfind/attrfind remember to update locatestarttagend too;
-# 3) if you change tagfind/attrfind and/or locatestarttagend the parser will
+# 1) if you change tagfind/attrfind remember to update locatestarttagend too;
+# 2) if you change tagfind/attrfind and/or locatestarttagend the parser will
# explode, so don't do it.
-tagfind = re.compile('([a-zA-Z][-.a-zA-Z0-9:_]*)(?:\s|/(?!>))*')
# see http://www.w3.org/TR/html5/tokenization.html#tag-open-state
# and http://www.w3.org/TR/html5/tokenization.html#tag-name-state
tagfind_tolerant = re.compile('([a-zA-Z][^\t\n\r\f />\x00]*)(?:\s|/(?!>))*')
-attrfind = re.compile(
- r'\s*([a-zA-Z_][-.:a-zA-Z_0-9]*)(\s*=\s*'
- r'(\'[^\']*\'|"[^"]*"|[^\s"\'=<>`]*))?')
attrfind_tolerant = re.compile(
r'((?<=[\'"\s/])[^\s/>][^\s/=>]*)(\s*=+\s*'
r'(\'[^\']*\'|"[^"]*"|(?![\'"])[^>\s]*))?(?:\s|/(?!>))*')
-locatestarttagend = re.compile(r"""
- <[a-zA-Z][-.a-zA-Z0-9:_]* # tag name
- (?:\s+ # whitespace before attribute name
- (?:[a-zA-Z_][-.:a-zA-Z0-9_]* # attribute name
- (?:\s*=\s* # value indicator
- (?:'[^']*' # LITA-enclosed value
- |\"[^\"]*\" # LIT-enclosed value
- |[^'\">\s]+ # bare value
- )
- )?
- )
- )*
- \s* # trailing whitespace
-""", re.VERBOSE)
locatestarttagend_tolerant = re.compile(r"""
<[a-zA-Z][^\t\n\r\f />\x00]* # tag name
(?:[\s/]* # optional whitespace before attribute name
@@ -79,25 +59,6 @@ endendtag = re.compile('>')
endtagfind = re.compile('</\s*([a-zA-Z][-.a-zA-Z0-9:_]*)\s*>')
-class HTMLParseError(Exception):
- """Exception raised for all parse errors."""
-
- def __init__(self, msg, position=(None, None)):
- assert msg
- self.msg = msg
- self.lineno = position[0]
- self.offset = position[1]
-
- def __str__(self):
- result = self.msg
- if self.lineno is not None:
- result = result + ", at line %d" % self.lineno
- if self.offset is not None:
- result = result + ", column %d" % (self.offset + 1)
- return result
-
-
-_default_sentinel = object()
class HTMLParser(_markupbase.ParserBase):
"""Find tags and other markup and call handler functions.
@@ -123,27 +84,12 @@ class HTMLParser(_markupbase.ParserBase):
CDATA_CONTENT_ELEMENTS = ("script", "style")
- def __init__(self, strict=_default_sentinel, *,
- convert_charrefs=_default_sentinel):
+ def __init__(self, *, convert_charrefs=True):
"""Initialize and reset this instance.
- If convert_charrefs is True (default: False), all character references
+ If convert_charrefs is True (the default), all character references
are automatically converted to the corresponding Unicode characters.
- If strict is set to False (the default) the parser will parse invalid
- markup, otherwise it will raise an error. Note that the strict mode
- and argument are deprecated.
"""
- if strict is not _default_sentinel:
- warnings.warn("The strict argument and mode are deprecated.",
- DeprecationWarning, stacklevel=2)
- else:
- strict = False # default
- self.strict = strict
- if convert_charrefs is _default_sentinel:
- convert_charrefs = False # default
- warnings.warn("The value of convert_charrefs will become True in "
- "3.5. You are encouraged to set the value explicitly.",
- DeprecationWarning, stacklevel=2)
self.convert_charrefs = convert_charrefs
self.reset()
@@ -168,11 +114,6 @@ class HTMLParser(_markupbase.ParserBase):
"""Handle any buffered data."""
self.goahead(1)
- def error(self, message):
- warnings.warn("The 'error' method is deprecated.",
- DeprecationWarning, stacklevel=2)
- raise HTMLParseError(message, self.getpos())
-
__starttag_text = None
def get_starttag_text(self):
@@ -202,7 +143,7 @@ class HTMLParser(_markupbase.ParserBase):
# or there's more text incoming. If the latter is True,
# we can't pass the text to handle_data in case we have
# a charref cut in half at end. Try to determine if
- # this is the case before proceding by looking for an
+ # this is the case before proceeding by looking for an
# & near the end and see if it's followed by a space or ;.
amppos = rawdata.rfind('&', max(i, n-34))
if (amppos >= 0 and
@@ -235,10 +176,7 @@ class HTMLParser(_markupbase.ParserBase):
elif startswith("<?", i):
k = self.parse_pi(i)
elif startswith("<!", i):
- if self.strict:
- k = self.parse_declaration(i)
- else:
- k = self.parse_html_declaration(i)
+ k = self.parse_html_declaration(i)
elif (i + 1) < n:
self.handle_data("<")
k = i + 1
@@ -247,8 +185,6 @@ class HTMLParser(_markupbase.ParserBase):
if k < 0:
if not end:
break
- if self.strict:
- self.error("EOF in middle of construct")
k = rawdata.find('>', i + 1)
if k < 0:
k = rawdata.find('<', i + 1)
@@ -290,13 +226,10 @@ class HTMLParser(_markupbase.ParserBase):
if match:
# match.group() will contain at least 2 chars
if end and match.group() == rawdata[i:]:
- if self.strict:
- self.error("EOF in middle of entity or char ref")
- else:
- k = match.end()
- if k <= i:
- k = n
- i = self.updatepos(i, i + 1)
+ k = match.end()
+ if k <= i:
+ k = n
+ i = self.updatepos(i, i + 1)
# incomplete
break
elif (i + 1) < n:
@@ -375,18 +308,12 @@ class HTMLParser(_markupbase.ParserBase):
# Now parse the data between i+1 and j into a tag and attrs
attrs = []
- if self.strict:
- match = tagfind.match(rawdata, i+1)
- else:
- match = tagfind_tolerant.match(rawdata, i+1)
+ match = tagfind_tolerant.match(rawdata, i+1)
assert match, 'unexpected call to parse_starttag()'
k = match.end()
self.lasttag = tag = match.group(1).lower()
while k < endpos:
- if self.strict:
- m = attrfind.match(rawdata, k)
- else:
- m = attrfind_tolerant.match(rawdata, k)
+ m = attrfind_tolerant.match(rawdata, k)
if not m:
break
attrname, rest, attrvalue = m.group(1, 2, 3)
@@ -409,9 +336,6 @@ class HTMLParser(_markupbase.ParserBase):
- self.__starttag_text.rfind("\n")
else:
offset = offset + len(self.__starttag_text)
- if self.strict:
- self.error("junk characters in start tag: %r"
- % (rawdata[k:endpos][:20],))
self.handle_data(rawdata[i:endpos])
return endpos
if end.endswith('/>'):
@@ -427,10 +351,7 @@ class HTMLParser(_markupbase.ParserBase):
# or -1 if incomplete.
def check_for_whole_start_tag(self, i):
rawdata = self.rawdata
- if self.strict:
- m = locatestarttagend.match(rawdata, i)
- else:
- m = locatestarttagend_tolerant.match(rawdata, i)
+ m = locatestarttagend_tolerant.match(rawdata, i)
if m:
j = m.end()
next = rawdata[j:j+1]
@@ -443,9 +364,6 @@ class HTMLParser(_markupbase.ParserBase):
# buffer boundary
return -1
# else bogus input
- if self.strict:
- self.updatepos(i, j + 1)
- self.error("malformed empty start tag")
if j > i:
return j
else:
@@ -458,9 +376,6 @@ class HTMLParser(_markupbase.ParserBase):
# end of input in or before attribute value, or we have the
# '/' from a '/>' ending
return -1
- if self.strict:
- self.updatepos(i, j)
- self.error("malformed start tag")
if j > i:
return j
else:
@@ -480,8 +395,6 @@ class HTMLParser(_markupbase.ParserBase):
if self.cdata_elem is not None:
self.handle_data(rawdata[i:gtpos])
return gtpos
- if self.strict:
- self.error("bad end tag: %r" % (rawdata[i:gtpos],))
# find the name: w3.org/TR/html5/tokenization.html#tag-name-state
namematch = tagfind_tolerant.match(rawdata, i+2)
if not namematch:
@@ -547,8 +460,7 @@ class HTMLParser(_markupbase.ParserBase):
pass
def unknown_decl(self, data):
- if self.strict:
- self.error("unknown declaration: %r" % (data,))
+ pass
# Internal -- helper to remove special character quoting
def unescape(self, s):
diff --git a/Lib/http/__init__.py b/Lib/http/__init__.py
index 196d378857..d4334cc88f 100644
--- a/Lib/http/__init__.py
+++ b/Lib/http/__init__.py
@@ -1 +1,134 @@
-# This directory is a Python package.
+from enum import IntEnum
+
+__all__ = ['HTTPStatus']
+
+class HTTPStatus(IntEnum):
+ """HTTP status codes and reason phrases
+
+ Status codes from the following RFCs are all observed:
+
+ * RFC 7231: Hypertext Transfer Protocol (HTTP/1.1), obsoletes 2616
+ * RFC 6585: Additional HTTP Status Codes
+ * RFC 3229: Delta encoding in HTTP
+ * RFC 4918: HTTP Extensions for WebDAV, obsoletes 2518
+ * RFC 5842: Binding Extensions to WebDAV
+ * RFC 7238: Permanent Redirect
+ * RFC 2295: Transparent Content Negotiation in HTTP
+ * RFC 2774: An HTTP Extension Framework
+ """
+ def __new__(cls, value, phrase, description=''):
+ obj = int.__new__(cls, value)
+ obj._value_ = value
+
+ obj.phrase = phrase
+ obj.description = description
+ return obj
+
+ # informational
+ CONTINUE = 100, 'Continue', 'Request received, please continue'
+ SWITCHING_PROTOCOLS = (101, 'Switching Protocols',
+ 'Switching to new protocol; obey Upgrade header')
+ PROCESSING = 102, 'Processing'
+
+ # success
+ OK = 200, 'OK', 'Request fulfilled, document follows'
+ CREATED = 201, 'Created', 'Document created, URL follows'
+ ACCEPTED = (202, 'Accepted',
+ 'Request accepted, processing continues off-line')
+ NON_AUTHORITATIVE_INFORMATION = (203,
+ 'Non-Authoritative Information', 'Request fulfilled from cache')
+ NO_CONTENT = 204, 'No Content', 'Request fulfilled, nothing follows'
+ RESET_CONTENT = 205, 'Reset Content', 'Clear input form for further input'
+ PARTIAL_CONTENT = 206, 'Partial Content', 'Partial content follows'
+ MULTI_STATUS = 207, 'Multi-Status'
+ ALREADY_REPORTED = 208, 'Already Reported'
+ IM_USED = 226, 'IM Used'
+
+ # redirection
+ MULTIPLE_CHOICES = (300, 'Multiple Choices',
+ 'Object has several resources -- see URI list')
+ MOVED_PERMANENTLY = (301, 'Moved Permanently',
+ 'Object moved permanently -- see URI list')
+ FOUND = 302, 'Found', 'Object moved temporarily -- see URI list'
+ SEE_OTHER = 303, 'See Other', 'Object moved -- see Method and URL list'
+ NOT_MODIFIED = (304, 'Not Modified',
+ 'Document has not changed since given time')
+ USE_PROXY = (305, 'Use Proxy',
+ 'You must use proxy specified in Location to access this resource')
+ TEMPORARY_REDIRECT = (307, 'Temporary Redirect',
+ 'Object moved temporarily -- see URI list')
+ PERMANENT_REDIRECT = (308, 'Permanent Redirect',
+ 'Object moved temporarily -- see URI list')
+
+ # client error
+ BAD_REQUEST = (400, 'Bad Request',
+ 'Bad request syntax or unsupported method')
+ UNAUTHORIZED = (401, 'Unauthorized',
+ 'No permission -- see authorization schemes')
+ PAYMENT_REQUIRED = (402, 'Payment Required',
+ 'No payment -- see charging schemes')
+ FORBIDDEN = (403, 'Forbidden',
+ 'Request forbidden -- authorization will not help')
+ NOT_FOUND = (404, 'Not Found',
+ 'Nothing matches the given URI')
+ METHOD_NOT_ALLOWED = (405, 'Method Not Allowed',
+ 'Specified method is invalid for this resource')
+ NOT_ACCEPTABLE = (406, 'Not Acceptable',
+ 'URI not available in preferred format')
+ PROXY_AUTHENTICATION_REQUIRED = (407,
+ 'Proxy Authentication Required',
+ 'You must authenticate with this proxy before proceeding')
+ REQUEST_TIMEOUT = (408, 'Request Timeout',
+ 'Request timed out; try again later')
+ CONFLICT = 409, 'Conflict', 'Request conflict'
+ GONE = (410, 'Gone',
+ 'URI no longer exists and has been permanently removed')
+ LENGTH_REQUIRED = (411, 'Length Required',
+ 'Client must specify Content-Length')
+ PRECONDITION_FAILED = (412, 'Precondition Failed',
+ 'Precondition in headers is false')
+ REQUEST_ENTITY_TOO_LARGE = (413, 'Request Entity Too Large',
+ 'Entity is too large')
+ REQUEST_URI_TOO_LONG = (414, 'Request-URI Too Long',
+ 'URI is too long')
+ UNSUPPORTED_MEDIA_TYPE = (415, 'Unsupported Media Type',
+ 'Entity body in unsupported format')
+ REQUESTED_RANGE_NOT_SATISFIABLE = (416,
+ 'Requested Range Not Satisfiable',
+ 'Cannot satisfy request range')
+ EXPECTATION_FAILED = (417, 'Expectation Failed',
+ 'Expect condition could not be satisfied')
+ UNPROCESSABLE_ENTITY = 422, 'Unprocessable Entity'
+ LOCKED = 423, 'Locked'
+ FAILED_DEPENDENCY = 424, 'Failed Dependency'
+ UPGRADE_REQUIRED = 426, 'Upgrade Required'
+ PRECONDITION_REQUIRED = (428, 'Precondition Required',
+ 'The origin server requires the request to be conditional')
+ TOO_MANY_REQUESTS = (429, 'Too Many Requests',
+ 'The user has sent too many requests in '
+ 'a given amount of time ("rate limiting")')
+ REQUEST_HEADER_FIELDS_TOO_LARGE = (431,
+ 'Request Header Fields Too Large',
+ 'The server is unwilling to process the request because its header '
+ 'fields are too large')
+
+ # server errors
+ INTERNAL_SERVER_ERROR = (500, 'Internal Server Error',
+ 'Server got itself in trouble')
+ NOT_IMPLEMENTED = (501, 'Not Implemented',
+ 'Server does not support this operation')
+ BAD_GATEWAY = (502, 'Bad Gateway',
+ 'Invalid responses from another server/proxy')
+ SERVICE_UNAVAILABLE = (503, 'Service Unavailable',
+ 'The server cannot process the request due to a high load')
+ GATEWAY_TIMEOUT = (504, 'Gateway Timeout',
+ 'The gateway server did not receive a timely response')
+ HTTP_VERSION_NOT_SUPPORTED = (505, 'HTTP Version Not Supported',
+ 'Cannot fulfill request')
+ VARIANT_ALSO_NEGOTIATES = 506, 'Variant Also Negotiates'
+ INSUFFICIENT_STORAGE = 507, 'Insufficient Storage'
+ LOOP_DETECTED = 508, 'Loop Detected'
+ NOT_EXTENDED = 510, 'Not Extended'
+ NETWORK_AUTHENTICATION_REQUIRED = (511,
+ 'Network Authentication Required',
+ 'The client needs to authenticate to gain network access')
diff --git a/Lib/http/client.py b/Lib/http/client.py
index 1c69dcb5c7..350313e87b 100644
--- a/Lib/http/client.py
+++ b/Lib/http/client.py
@@ -20,10 +20,12 @@ request. This diagram details these state transitions:
| ( putheader() )* endheaders()
v
Request-sent
- |
- | response = getresponse()
- v
- Unread-response [Response-headers-read]
+ |\_____________________________
+ | | getresponse() raises
+ | response = getresponse() | ConnectionError
+ v v
+ Unread-response Idle
+ [Response-headers-read]
|\____________________
| |
| response.read() | putrequest()
@@ -68,6 +70,7 @@ Req-sent-unread-response _CS_REQ_SENT <response_class>
import email.parser
import email.message
+import http
import io
import os
import re
@@ -82,7 +85,8 @@ __all__ = ["HTTPResponse", "HTTPConnection",
"UnknownTransferEncoding", "UnimplementedFileMode",
"IncompleteRead", "InvalidURL", "ImproperConnectionState",
"CannotSendRequest", "CannotSendHeader", "ResponseNotReady",
- "BadStatusLine", "LineTooLong", "error", "responses"]
+ "BadStatusLine", "LineTooLong", "RemoteDisconnected", "error",
+ "responses"]
HTTP_PORT = 80
HTTPS_PORT = 443
@@ -94,122 +98,13 @@ _CS_IDLE = 'Idle'
_CS_REQ_STARTED = 'Request-started'
_CS_REQ_SENT = 'Request-sent'
-# status codes
-# informational
-CONTINUE = 100
-SWITCHING_PROTOCOLS = 101
-PROCESSING = 102
-
-# successful
-OK = 200
-CREATED = 201
-ACCEPTED = 202
-NON_AUTHORITATIVE_INFORMATION = 203
-NO_CONTENT = 204
-RESET_CONTENT = 205
-PARTIAL_CONTENT = 206
-MULTI_STATUS = 207
-IM_USED = 226
-
-# redirection
-MULTIPLE_CHOICES = 300
-MOVED_PERMANENTLY = 301
-FOUND = 302
-SEE_OTHER = 303
-NOT_MODIFIED = 304
-USE_PROXY = 305
-TEMPORARY_REDIRECT = 307
-
-# client error
-BAD_REQUEST = 400
-UNAUTHORIZED = 401
-PAYMENT_REQUIRED = 402
-FORBIDDEN = 403
-NOT_FOUND = 404
-METHOD_NOT_ALLOWED = 405
-NOT_ACCEPTABLE = 406
-PROXY_AUTHENTICATION_REQUIRED = 407
-REQUEST_TIMEOUT = 408
-CONFLICT = 409
-GONE = 410
-LENGTH_REQUIRED = 411
-PRECONDITION_FAILED = 412
-REQUEST_ENTITY_TOO_LARGE = 413
-REQUEST_URI_TOO_LONG = 414
-UNSUPPORTED_MEDIA_TYPE = 415
-REQUESTED_RANGE_NOT_SATISFIABLE = 416
-EXPECTATION_FAILED = 417
-UNPROCESSABLE_ENTITY = 422
-LOCKED = 423
-FAILED_DEPENDENCY = 424
-UPGRADE_REQUIRED = 426
-PRECONDITION_REQUIRED = 428
-TOO_MANY_REQUESTS = 429
-REQUEST_HEADER_FIELDS_TOO_LARGE = 431
-
-# server error
-INTERNAL_SERVER_ERROR = 500
-NOT_IMPLEMENTED = 501
-BAD_GATEWAY = 502
-SERVICE_UNAVAILABLE = 503
-GATEWAY_TIMEOUT = 504
-HTTP_VERSION_NOT_SUPPORTED = 505
-INSUFFICIENT_STORAGE = 507
-NOT_EXTENDED = 510
-NETWORK_AUTHENTICATION_REQUIRED = 511
+# hack to maintain backwards compatibility
+globals().update(http.HTTPStatus.__members__)
+
+# another hack to maintain backwards compatibility
# Mapping status codes to official W3C names
-responses = {
- 100: 'Continue',
- 101: 'Switching Protocols',
-
- 200: 'OK',
- 201: 'Created',
- 202: 'Accepted',
- 203: 'Non-Authoritative Information',
- 204: 'No Content',
- 205: 'Reset Content',
- 206: 'Partial Content',
-
- 300: 'Multiple Choices',
- 301: 'Moved Permanently',
- 302: 'Found',
- 303: 'See Other',
- 304: 'Not Modified',
- 305: 'Use Proxy',
- 306: '(Unused)',
- 307: 'Temporary Redirect',
-
- 400: 'Bad Request',
- 401: 'Unauthorized',
- 402: 'Payment Required',
- 403: 'Forbidden',
- 404: 'Not Found',
- 405: 'Method Not Allowed',
- 406: 'Not Acceptable',
- 407: 'Proxy Authentication Required',
- 408: 'Request Timeout',
- 409: 'Conflict',
- 410: 'Gone',
- 411: 'Length Required',
- 412: 'Precondition Failed',
- 413: 'Request Entity Too Large',
- 414: 'Request-URI Too Long',
- 415: 'Unsupported Media Type',
- 416: 'Requested Range Not Satisfiable',
- 417: 'Expectation Failed',
- 428: 'Precondition Required',
- 429: 'Too Many Requests',
- 431: 'Request Header Fields Too Large',
-
- 500: 'Internal Server Error',
- 501: 'Not Implemented',
- 502: 'Bad Gateway',
- 503: 'Service Unavailable',
- 504: 'Gateway Timeout',
- 505: 'HTTP Version Not Supported',
- 511: 'Network Authentication Required',
-}
+responses = {v: v.phrase for v in http.HTTPStatus.__members__.values()}
# maximal amount of data to read at one time in _safe_read
MAXAMOUNT = 1048576
@@ -251,6 +146,21 @@ _is_illegal_header_value = re.compile(rb'\n(?![ \t])|\r(?![ \t\n])').search
_METHODS_EXPECTING_BODY = {'PATCH', 'POST', 'PUT'}
+def _encode(data, name='data'):
+ """Call data.encode("latin-1") but show a better error message."""
+ try:
+ return data.encode("latin-1")
+ except UnicodeEncodeError as err:
+ raise UnicodeEncodeError(
+ err.encoding,
+ err.object,
+ err.start,
+ err.end,
+ "%s (%.20r) is not valid Latin-1. Use %s.encode('utf-8') "
+ "if you want to send it encoded in UTF-8." %
+ (name.title(), data[err.start:err.end], name)) from None
+
+
class HTTPMessage(email.message.Message):
# XXX The only usage of this method is in
# http.server.CGIHTTPRequestHandler. Maybe move the code there so
@@ -305,7 +215,7 @@ def parse_headers(fp, _class=HTTPMessage):
return email.parser.Parser(_class=_class).parsestr(hstring)
-class HTTPResponse(io.RawIOBase):
+class HTTPResponse(io.BufferedIOBase):
# See RFC 2616 sec 19.6 and RFC 1945 sec 6 for details.
@@ -353,7 +263,8 @@ class HTTPResponse(io.RawIOBase):
if not line:
# Presumably, the server closed the connection before
# sending a valid response.
- raise BadStatusLine(line)
+ raise RemoteDisconnected("Remote end closed connection without"
+ " response")
try:
version, status, reason = line.split(None, 2)
except ValueError:
@@ -532,9 +443,10 @@ class HTTPResponse(io.RawIOBase):
return b""
if amt is not None:
- # Amount is given, so call base class version
- # (which is implemented in terms of self.readinto)
- return super(HTTPResponse, self).read(amt)
+ # Amount is given, implement using readinto
+ b = bytearray(amt)
+ n = self.readinto(b)
+ return memoryview(b)[:n].tobytes()
else:
# Amount is not given (unbounded read) so we must check self.length
# and self.chunked
@@ -614,71 +526,67 @@ class HTTPResponse(io.RawIOBase):
if line in (b'\r\n', b'\n', b''):
break
+ def _get_chunk_left(self):
+ # return self.chunk_left, reading a new chunk if necessary.
+ # chunk_left == 0: at the end of the current chunk, need to close it
+ # chunk_left == None: No current chunk, should read next.
+ # This function returns non-zero or None if the last chunk has
+ # been read.
+ chunk_left = self.chunk_left
+ if not chunk_left: # Can be 0 or None
+ if chunk_left is not None:
+ # We are at the end of chunk. dicard chunk end
+ self._safe_read(2) # toss the CRLF at the end of the chunk
+ try:
+ chunk_left = self._read_next_chunk_size()
+ except ValueError:
+ raise IncompleteRead(b'')
+ if chunk_left == 0:
+ # last chunk: 1*("0") [ chunk-extension ] CRLF
+ self._read_and_discard_trailer()
+ # we read everything; close the "file"
+ self._close_conn()
+ chunk_left = None
+ self.chunk_left = chunk_left
+ return chunk_left
+
def _readall_chunked(self):
assert self.chunked != _UNKNOWN
- chunk_left = self.chunk_left
value = []
- while True:
- if chunk_left is None:
- try:
- chunk_left = self._read_next_chunk_size()
- if chunk_left == 0:
- break
- except ValueError:
- raise IncompleteRead(b''.join(value))
- value.append(self._safe_read(chunk_left))
-
- # we read the whole chunk, get another
- self._safe_read(2) # toss the CRLF at the end of the chunk
- chunk_left = None
-
- self._read_and_discard_trailer()
-
- # we read everything; close the "file"
- self._close_conn()
-
- return b''.join(value)
+ try:
+ while True:
+ chunk_left = self._get_chunk_left()
+ if chunk_left is None:
+ break
+ value.append(self._safe_read(chunk_left))
+ self.chunk_left = 0
+ return b''.join(value)
+ except IncompleteRead:
+ raise IncompleteRead(b''.join(value))
def _readinto_chunked(self, b):
assert self.chunked != _UNKNOWN
- chunk_left = self.chunk_left
-
total_bytes = 0
mvb = memoryview(b)
- while True:
- if chunk_left is None:
- try:
- chunk_left = self._read_next_chunk_size()
- if chunk_left == 0:
- break
- except ValueError:
- raise IncompleteRead(bytes(b[0:total_bytes]))
-
- if len(mvb) < chunk_left:
- n = self._safe_readinto(mvb)
- self.chunk_left = chunk_left - n
- return total_bytes + n
- elif len(mvb) == chunk_left:
- n = self._safe_readinto(mvb)
- self._safe_read(2) # toss the CRLF at the end of the chunk
- self.chunk_left = None
- return total_bytes + n
- else:
- temp_mvb = mvb[0:chunk_left]
+ try:
+ while True:
+ chunk_left = self._get_chunk_left()
+ if chunk_left is None:
+ return total_bytes
+
+ if len(mvb) <= chunk_left:
+ n = self._safe_readinto(mvb)
+ self.chunk_left = chunk_left - n
+ return total_bytes + n
+
+ temp_mvb = mvb[:chunk_left]
n = self._safe_readinto(temp_mvb)
mvb = mvb[n:]
total_bytes += n
+ self.chunk_left = 0
- # we read the whole chunk, get another
- self._safe_read(2) # toss the CRLF at the end of the chunk
- chunk_left = None
-
- self._read_and_discard_trailer()
-
- # we read everything; close the "file"
- self._close_conn()
-
- return total_bytes
+ except IncompleteRead:
+ raise IncompleteRead(bytes(b[0:total_bytes]))
def _safe_read(self, amt):
"""Read the number of bytes requested, compensating for partial reads.
@@ -719,6 +627,81 @@ class HTTPResponse(io.RawIOBase):
total_bytes += n
return total_bytes
+ def read1(self, n=-1):
+ """Read with at most one underlying system call. If at least one
+ byte is buffered, return that instead.
+ """
+ if self.fp is None or self._method == "HEAD":
+ return b""
+ if self.chunked:
+ return self._read1_chunked(n)
+ if self.length is not None and (n < 0 or n > self.length):
+ n = self.length
+ try:
+ result = self.fp.read1(n)
+ except ValueError:
+ if n >= 0:
+ raise
+ # some implementations, like BufferedReader, don't support -1
+ # Read an arbitrarily selected largeish chunk.
+ result = self.fp.read1(16*1024)
+ if not result and n:
+ self._close_conn()
+ elif self.length is not None:
+ self.length -= len(result)
+ return result
+
+ def peek(self, n=-1):
+ # Having this enables IOBase.readline() to read more than one
+ # byte at a time
+ if self.fp is None or self._method == "HEAD":
+ return b""
+ if self.chunked:
+ return self._peek_chunked(n)
+ return self.fp.peek(n)
+
+ def readline(self, limit=-1):
+ if self.fp is None or self._method == "HEAD":
+ return b""
+ if self.chunked:
+ # Fallback to IOBase readline which uses peek() and read()
+ return super().readline(limit)
+ if self.length is not None and (limit < 0 or limit > self.length):
+ limit = self.length
+ result = self.fp.readline(limit)
+ if not result and limit:
+ self._close_conn()
+ elif self.length is not None:
+ self.length -= len(result)
+ return result
+
+ def _read1_chunked(self, n):
+ # Strictly speaking, _get_chunk_left() may cause more than one read,
+ # but that is ok, since that is to satisfy the chunked protocol.
+ chunk_left = self._get_chunk_left()
+ if chunk_left is None or n == 0:
+ return b''
+ if not (0 <= n <= chunk_left):
+ n = chunk_left # if n is negative or larger than chunk_left
+ read = self.fp.read1(n)
+ self.chunk_left -= len(read)
+ if not read:
+ raise IncompleteRead(b"")
+ return read
+
+ def _peek_chunked(self, n):
+ # Strictly speaking, _get_chunk_left() may cause more than one read,
+ # but that is ok, since that is to satisfy the chunked protocol.
+ try:
+ chunk_left = self._get_chunk_left()
+ except IncompleteRead:
+ return b'' # peek doesn't worry about protocol
+ if chunk_left is None:
+ return b'' # eof
+ # peek is allowed to return more than requested. Just request the
+ # entire chunk, and truncate what we get.
+ return self.fp.peek(chunk_left)[:chunk_left]
+
def fileno(self):
return self.fp.fileno()
@@ -762,14 +745,6 @@ class HTTPConnection:
default_port = HTTP_PORT
auto_open = 1
debuglevel = 0
- # TCP Maximum Segment Size (MSS) is determined by the TCP stack on
- # a per-connection basis. There is no simple and efficient
- # platform independent mechanism for determining the MSS, so
- # instead a reasonable estimate is chosen. The getsockopt()
- # interface using the TCP_MAXSEG parameter may be a suitable
- # approach on some operating systems. A value of 16KiB is chosen
- # as a reasonable estimate of the maximum MSS.
- mss = 16384
def __init__(self, host, port=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
source_address=None):
@@ -851,7 +826,7 @@ class HTTPConnection:
response = self.response_class(self.sock, method=self._method)
(version, code, message) = response._read_status()
- if code != 200:
+ if code != http.HTTPStatus.OK:
self.close()
raise OSError("Tunnel connection failed: %d %s" % (code,
message.strip()))
@@ -865,10 +840,14 @@ class HTTPConnection:
if line in (b'\r\n', b'\n', b''):
break
+ if self.debuglevel > 0:
+ print('header:', line.decode())
+
def connect(self):
"""Connect to the host and port specified in __init__."""
- self.sock = self._create_connection((self.host,self.port),
- self.timeout, self.source_address)
+ self.sock = self._create_connection(
+ (self.host,self.port), self.timeout, self.source_address)
+ self.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
if self._tunnel_host:
self._tunnel()
@@ -951,19 +930,9 @@ class HTTPConnection:
self._buffer.extend((b"", b""))
msg = b"\r\n".join(self._buffer)
del self._buffer[:]
- # If msg and message_body are sent in a single send() call,
- # it will avoid performance problems caused by the interaction
- # between delayed ack and the Nagle algorithm. However,
- # there is no performance gain if the message is larger
- # than MSS (and there is a memory penalty for the message
- # copy).
- if isinstance(message_body, bytes) and len(message_body) < self.mss:
- msg += message_body
- message_body = None
+
self.send(msg)
if message_body is not None:
- # message_body was not a string (i.e. it is a file), and
- # we must run the risk of Nagle.
self.send(message_body)
def putrequest(self, method, url, skip_host=0, skip_accept_encoding=0):
@@ -1178,7 +1147,7 @@ class HTTPConnection:
if isinstance(body, str):
# RFC 2616 Section 3.7.1 says that text default has a
# default charset of iso-8859-1.
- body = body.encode('iso-8859-1')
+ body = _encode(body, 'body')
self.endheaders(body)
def getresponse(self):
@@ -1186,7 +1155,7 @@ class HTTPConnection:
If the HTTPConnection is in the correct state, returns an
instance of HTTPResponse or of whatever object is returned by
- class the response_class variable.
+ the response_class variable.
If a request has not been sent or if a previous response has
not be handled, ResponseNotReady is raised. If the HTTP
@@ -1224,7 +1193,11 @@ class HTTPConnection:
response = self.response_class(self.sock, method=self._method)
try:
- response.begin()
+ try:
+ response.begin()
+ except ConnectionError:
+ self.close()
+ raise
assert response.will_close != _UNKNOWN
self.__state = _CS_IDLE
@@ -1327,7 +1300,8 @@ class IncompleteRead(HTTPException):
e = ', %i more expected' % self.expected
else:
e = ''
- return 'IncompleteRead(%i bytes read%s)' % (len(self.partial), e)
+ return '%s(%i bytes read%s)' % (self.__class__.__name__,
+ len(self.partial), e)
def __str__(self):
return repr(self)
@@ -1355,5 +1329,10 @@ class LineTooLong(HTTPException):
HTTPException.__init__(self, "got more than %d bytes when reading %s"
% (_MAXLINE, line_type))
+class RemoteDisconnected(ConnectionResetError, BadStatusLine):
+ def __init__(self, *pos, **kw):
+ BadStatusLine.__init__(self, "")
+ ConnectionResetError.__init__(self, *pos, **kw)
+
# for backwards compatibility
error = HTTPException
diff --git a/Lib/http/cookiejar.py b/Lib/http/cookiejar.py
index cad6b3ac60..265ccf99f2 100644
--- a/Lib/http/cookiejar.py
+++ b/Lib/http/cookiejar.py
@@ -143,6 +143,10 @@ def offset_from_tz_string(tz):
return offset
def _str2time(day, mon, yr, hr, min, sec, tz):
+ yr = int(yr)
+ if yr > datetime.MAXYEAR:
+ return None
+
# translate month name to number
# month numbers start with 1 (January)
try:
@@ -163,7 +167,6 @@ def _str2time(day, mon, yr, hr, min, sec, tz):
if min is None: min = 0
if sec is None: sec = 0
- yr = int(yr)
day = int(day)
hr = int(hr)
min = int(min)
@@ -821,7 +824,7 @@ class Cookie:
args.append("%s=%s" % (name, repr(attr)))
args.append("rest=%s" % repr(self._rest))
args.append("rfc2109=%s" % repr(self.rfc2109))
- return "Cookie(%s)" % ", ".join(args)
+ return "%s(%s)" % (self.__class__.__name__, ", ".join(args))
class CookiePolicy:
@@ -1838,7 +1841,7 @@ def lwp_cookie_str(cookie):
class LWPCookieJar(FileCookieJar):
"""
The LWPCookieJar saves a sequence of "Set-Cookie3" lines.
- "Set-Cookie3" is the format used by the libwww-perl libary, not known
+ "Set-Cookie3" is the format used by the libwww-perl library, not known
to be compatible with any browser, but which is easy to read and
doesn't lose information about RFC 2965 cookies.
@@ -1999,7 +2002,6 @@ class MozillaCookieJar(FileCookieJar):
magic = f.readline()
if not self.magic_re.search(magic):
- f.close()
raise LoadError(
"%r does not look like a Netscape format cookies file" %
filename)
diff --git a/Lib/http/cookies.py b/Lib/http/cookies.py
index 482e601dca..a73fe387f8 100644
--- a/Lib/http/cookies.py
+++ b/Lib/http/cookies.py
@@ -138,6 +138,12 @@ _nulljoin = ''.join
_semispacejoin = '; '.join
_spacejoin = ' '.join
+def _warn_deprecated_setter(setter):
+ import warnings
+ msg = ('The .%s setter is deprecated. The attribute will be read-only in '
+ 'future releases. Please use the set() method instead.' % setter)
+ warnings.warn(msg, DeprecationWarning, stacklevel=3)
+
#
# Define an exception visible to External modules
#
@@ -150,89 +156,37 @@ class CookieError(Exception):
# a two-way quoting algorithm. Any non-text character is translated
# into a 4 character sequence: a forward-slash followed by the
# three-digit octal equivalent of the character. Any '\' or '"' is
-# quoted with a preceeding '\' slash.
+# quoted with a preceding '\' slash.
+# Because of the way browsers really handle cookies (as opposed to what
+# the RFC says) we also encode "," and ";".
#
# These are taken from RFC2068 and RFC2109.
# _LegalChars is the list of chars which don't require "'s
# _Translator hash-table for fast quoting
#
-_LegalChars = string.ascii_letters + string.digits + "!#$%&'*+-.^_`|~:"
-_Translator = {
- '\000' : '\\000', '\001' : '\\001', '\002' : '\\002',
- '\003' : '\\003', '\004' : '\\004', '\005' : '\\005',
- '\006' : '\\006', '\007' : '\\007', '\010' : '\\010',
- '\011' : '\\011', '\012' : '\\012', '\013' : '\\013',
- '\014' : '\\014', '\015' : '\\015', '\016' : '\\016',
- '\017' : '\\017', '\020' : '\\020', '\021' : '\\021',
- '\022' : '\\022', '\023' : '\\023', '\024' : '\\024',
- '\025' : '\\025', '\026' : '\\026', '\027' : '\\027',
- '\030' : '\\030', '\031' : '\\031', '\032' : '\\032',
- '\033' : '\\033', '\034' : '\\034', '\035' : '\\035',
- '\036' : '\\036', '\037' : '\\037',
-
- # Because of the way browsers really handle cookies (as opposed
- # to what the RFC says) we also encode , and ;
-
- ',' : '\\054', ';' : '\\073',
-
- '"' : '\\"', '\\' : '\\\\',
-
- '\177' : '\\177', '\200' : '\\200', '\201' : '\\201',
- '\202' : '\\202', '\203' : '\\203', '\204' : '\\204',
- '\205' : '\\205', '\206' : '\\206', '\207' : '\\207',
- '\210' : '\\210', '\211' : '\\211', '\212' : '\\212',
- '\213' : '\\213', '\214' : '\\214', '\215' : '\\215',
- '\216' : '\\216', '\217' : '\\217', '\220' : '\\220',
- '\221' : '\\221', '\222' : '\\222', '\223' : '\\223',
- '\224' : '\\224', '\225' : '\\225', '\226' : '\\226',
- '\227' : '\\227', '\230' : '\\230', '\231' : '\\231',
- '\232' : '\\232', '\233' : '\\233', '\234' : '\\234',
- '\235' : '\\235', '\236' : '\\236', '\237' : '\\237',
- '\240' : '\\240', '\241' : '\\241', '\242' : '\\242',
- '\243' : '\\243', '\244' : '\\244', '\245' : '\\245',
- '\246' : '\\246', '\247' : '\\247', '\250' : '\\250',
- '\251' : '\\251', '\252' : '\\252', '\253' : '\\253',
- '\254' : '\\254', '\255' : '\\255', '\256' : '\\256',
- '\257' : '\\257', '\260' : '\\260', '\261' : '\\261',
- '\262' : '\\262', '\263' : '\\263', '\264' : '\\264',
- '\265' : '\\265', '\266' : '\\266', '\267' : '\\267',
- '\270' : '\\270', '\271' : '\\271', '\272' : '\\272',
- '\273' : '\\273', '\274' : '\\274', '\275' : '\\275',
- '\276' : '\\276', '\277' : '\\277', '\300' : '\\300',
- '\301' : '\\301', '\302' : '\\302', '\303' : '\\303',
- '\304' : '\\304', '\305' : '\\305', '\306' : '\\306',
- '\307' : '\\307', '\310' : '\\310', '\311' : '\\311',
- '\312' : '\\312', '\313' : '\\313', '\314' : '\\314',
- '\315' : '\\315', '\316' : '\\316', '\317' : '\\317',
- '\320' : '\\320', '\321' : '\\321', '\322' : '\\322',
- '\323' : '\\323', '\324' : '\\324', '\325' : '\\325',
- '\326' : '\\326', '\327' : '\\327', '\330' : '\\330',
- '\331' : '\\331', '\332' : '\\332', '\333' : '\\333',
- '\334' : '\\334', '\335' : '\\335', '\336' : '\\336',
- '\337' : '\\337', '\340' : '\\340', '\341' : '\\341',
- '\342' : '\\342', '\343' : '\\343', '\344' : '\\344',
- '\345' : '\\345', '\346' : '\\346', '\347' : '\\347',
- '\350' : '\\350', '\351' : '\\351', '\352' : '\\352',
- '\353' : '\\353', '\354' : '\\354', '\355' : '\\355',
- '\356' : '\\356', '\357' : '\\357', '\360' : '\\360',
- '\361' : '\\361', '\362' : '\\362', '\363' : '\\363',
- '\364' : '\\364', '\365' : '\\365', '\366' : '\\366',
- '\367' : '\\367', '\370' : '\\370', '\371' : '\\371',
- '\372' : '\\372', '\373' : '\\373', '\374' : '\\374',
- '\375' : '\\375', '\376' : '\\376', '\377' : '\\377'
- }
+_LegalChars = string.ascii_letters + string.digits + "!#$%&'*+-.^_`|~:"
+_UnescapedChars = _LegalChars + ' ()/<=>?@[]{}'
+
+_Translator = {n: '\\%03o' % n
+ for n in set(range(256)) - set(map(ord, _UnescapedChars))}
+_Translator.update({
+ ord('"'): '\\"',
+ ord('\\'): '\\\\',
+})
-def _quote(str, LegalChars=_LegalChars):
+_is_legal_key = re.compile('[%s]+' % re.escape(_LegalChars)).fullmatch
+
+def _quote(str):
r"""Quote a string for use in a cookie header.
If the string does not need to be double-quoted, then just return the
string. Otherwise, surround the string in doublequotes and quote
(with a \) special characters.
"""
- if all(c in LegalChars for c in str):
+ if str is None or _is_legal_key(str):
return str
else:
- return '"' + _nulljoin(_Translator.get(s, s) for s in str) + '"'
+ return '"' + str.translate(_Translator) + '"'
_OctalPatt = re.compile(r"\\[0-3][0-7][0-7]")
@@ -241,7 +195,7 @@ _QuotePatt = re.compile(r"[\\].")
def _unquote(str):
# If there aren't any doublequotes,
# then there can't be any special characters. See RFC 2109.
- if len(str) < 2:
+ if str is None or len(str) < 2:
return str
if str[0] != '"' or str[-1] != '"':
return str
@@ -339,33 +293,108 @@ class Morsel(dict):
def __init__(self):
# Set defaults
- self.key = self.value = self.coded_value = None
+ self._key = self._value = self._coded_value = None
# Set default attributes
for key in self._reserved:
dict.__setitem__(self, key, "")
+ @property
+ def key(self):
+ return self._key
+
+ @key.setter
+ def key(self, key):
+ _warn_deprecated_setter('key')
+ self._key = key
+
+ @property
+ def value(self):
+ return self._value
+
+ @value.setter
+ def value(self, value):
+ _warn_deprecated_setter('value')
+ self._value = value
+
+ @property
+ def coded_value(self):
+ return self._coded_value
+
+ @coded_value.setter
+ def coded_value(self, coded_value):
+ _warn_deprecated_setter('coded_value')
+ self._coded_value = coded_value
+
def __setitem__(self, K, V):
K = K.lower()
if not K in self._reserved:
- raise CookieError("Invalid Attribute %s" % K)
+ raise CookieError("Invalid attribute %r" % (K,))
dict.__setitem__(self, K, V)
+ def setdefault(self, key, val=None):
+ key = key.lower()
+ if key not in self._reserved:
+ raise CookieError("Invalid attribute %r" % (key,))
+ return dict.setdefault(self, key, val)
+
+ def __eq__(self, morsel):
+ if not isinstance(morsel, Morsel):
+ return NotImplemented
+ return (dict.__eq__(self, morsel) and
+ self._value == morsel._value and
+ self._key == morsel._key and
+ self._coded_value == morsel._coded_value)
+
+ __ne__ = object.__ne__
+
+ def copy(self):
+ morsel = Morsel()
+ dict.update(morsel, self)
+ morsel.__dict__.update(self.__dict__)
+ return morsel
+
+ def update(self, values):
+ data = {}
+ for key, val in dict(values).items():
+ key = key.lower()
+ if key not in self._reserved:
+ raise CookieError("Invalid attribute %r" % (key,))
+ data[key] = val
+ dict.update(self, data)
+
def isReservedKey(self, K):
return K.lower() in self._reserved
def set(self, key, val, coded_val, LegalChars=_LegalChars):
- # First we verify that the key isn't a reserved word
- # Second we make sure it only contains legal characters
+ if LegalChars != _LegalChars:
+ import warnings
+ warnings.warn(
+ 'LegalChars parameter is deprecated, ignored and will '
+ 'be removed in future versions.', DeprecationWarning,
+ stacklevel=2)
+
if key.lower() in self._reserved:
- raise CookieError("Attempt to set a reserved key: %s" % key)
- if any(c not in LegalChars for c in key):
- raise CookieError("Illegal key value: %s" % key)
+ raise CookieError('Attempt to set a reserved key %r' % (key,))
+ if not _is_legal_key(key):
+ raise CookieError('Illegal key %r' % (key,))
# It's a good key, so save it.
- self.key = key
- self.value = val
- self.coded_value = coded_val
+ self._key = key
+ self._value = val
+ self._coded_value = coded_val
+
+ def __getstate__(self):
+ return {
+ 'key': self._key,
+ 'value': self._value,
+ 'coded_value': self._coded_value,
+ }
+
+ def __setstate__(self, state):
+ self._key = state['key']
+ self._value = state['value']
+ self._coded_value = state['coded_value']
def output(self, attrs=None, header="Set-Cookie:"):
return "%s %s" % (header, self.OutputString(attrs))
@@ -373,8 +402,7 @@ class Morsel(dict):
__str__ = output
def __repr__(self):
- return '<%s: %s=%s>' % (self.__class__.__name__,
- self.key, repr(self.value))
+ return '<%s: %s>' % (self.__class__.__name__, self.OutputString())
def js_output(self, attrs=None):
# Print javascript
@@ -408,10 +436,9 @@ class Morsel(dict):
append("%s=%s" % (self._reserved[key], _getdate(value)))
elif key == "max-age" and isinstance(value, int):
append("%s=%d" % (self._reserved[key], value))
- elif key == "secure":
- append(str(self._reserved[key]))
- elif key == "httponly":
- append(str(self._reserved[key]))
+ elif key in self._flags:
+ if value:
+ append(str(self._reserved[key]))
else:
append("%s=%s" % (self._reserved[key], value))
@@ -534,10 +561,17 @@ class BaseCookie(dict):
return
def __parse_string(self, str, patt=_CookiePattern):
- i = 0 # Our starting point
- n = len(str) # Length of string
- M = None # current morsel
+ i = 0 # Our starting point
+ n = len(str) # Length of string
+ parsed_items = [] # Parsed (type, key, value) triples
+ morsel_seen = False # A key=value pair was previously encountered
+
+ TYPE_ATTRIBUTE = 1
+ TYPE_KEYVALUE = 2
+ # We first parse the whole cookie string and reject it if it's
+ # syntactically invalid (this helps avoid some classes of injection
+ # attacks).
while 0 <= i < n:
# Start looking for a cookie
match = patt.match(str, i)
@@ -548,22 +582,41 @@ class BaseCookie(dict):
key, value = match.group("key"), match.group("val")
i = match.end(0)
- # Parse the key, value in case it's metainfo
if key[0] == "$":
- # We ignore attributes which pertain to the cookie
- # mechanism as a whole. See RFC 2109.
- # (Does anyone care?)
- if M:
- M[key[1:]] = value
+ if not morsel_seen:
+ # We ignore attributes which pertain to the cookie
+ # mechanism as a whole, such as "$Version".
+ # See RFC 2965. (Does anyone care?)
+ continue
+ parsed_items.append((TYPE_ATTRIBUTE, key[1:], value))
elif key.lower() in Morsel._reserved:
- if M:
- if value is None:
- if key.lower() in Morsel._flags:
- M[key] = True
+ if not morsel_seen:
+ # Invalid cookie string
+ return
+ if value is None:
+ if key.lower() in Morsel._flags:
+ parsed_items.append((TYPE_ATTRIBUTE, key, True))
else:
- M[key] = _unquote(value)
+ # Invalid cookie string
+ return
+ else:
+ parsed_items.append((TYPE_ATTRIBUTE, key, _unquote(value)))
elif value is not None:
- rval, cval = self.value_decode(value)
+ parsed_items.append((TYPE_KEYVALUE, key, self.value_decode(value)))
+ morsel_seen = True
+ else:
+ # Invalid cookie string
+ return
+
+ # The cookie string is valid, apply it.
+ M = None # current morsel
+ for tp, key, value in parsed_items:
+ if tp == TYPE_ATTRIBUTE:
+ assert M is not None
+ M[key] = value
+ else:
+ assert tp == TYPE_KEYVALUE
+ rval, cval = value
self.__set(key, rval, cval)
M = self[key]
diff --git a/Lib/http/server.py b/Lib/http/server.py
index 4688096b31..00620d1f85 100644
--- a/Lib/http/server.py
+++ b/Lib/http/server.py
@@ -103,6 +103,8 @@ import urllib.parse
import copy
import argparse
+from http import HTTPStatus
+
# Default error message template
DEFAULT_ERROR_MESSAGE = """\
@@ -281,7 +283,9 @@ class BaseHTTPRequestHandler(socketserver.StreamRequestHandler):
if len(words) == 3:
command, path, version = words
if version[:5] != 'HTTP/':
- self.send_error(400, "Bad request version (%r)" % version)
+ self.send_error(
+ HTTPStatus.BAD_REQUEST,
+ "Bad request version (%r)" % version)
return False
try:
base_version_number = version.split('/', 1)[1]
@@ -296,25 +300,31 @@ class BaseHTTPRequestHandler(socketserver.StreamRequestHandler):
raise ValueError
version_number = int(version_number[0]), int(version_number[1])
except (ValueError, IndexError):
- self.send_error(400, "Bad request version (%r)" % version)
+ self.send_error(
+ HTTPStatus.BAD_REQUEST,
+ "Bad request version (%r)" % version)
return False
if version_number >= (1, 1) and self.protocol_version >= "HTTP/1.1":
self.close_connection = False
if version_number >= (2, 0):
- self.send_error(505,
- "Invalid HTTP Version (%s)" % base_version_number)
+ self.send_error(
+ HTTPStatus.HTTP_VERSION_NOT_SUPPORTED,
+ "Invalid HTTP Version (%s)" % base_version_number)
return False
elif len(words) == 2:
command, path = words
self.close_connection = True
if command != 'GET':
- self.send_error(400,
- "Bad HTTP/0.9 request type (%r)" % command)
+ self.send_error(
+ HTTPStatus.BAD_REQUEST,
+ "Bad HTTP/0.9 request type (%r)" % command)
return False
elif not words:
return False
else:
- self.send_error(400, "Bad request syntax (%r)" % requestline)
+ self.send_error(
+ HTTPStatus.BAD_REQUEST,
+ "Bad request syntax (%r)" % requestline)
return False
self.command, self.path, self.request_version = command, path, version
@@ -323,7 +333,16 @@ class BaseHTTPRequestHandler(socketserver.StreamRequestHandler):
self.headers = http.client.parse_headers(self.rfile,
_class=self.MessageClass)
except http.client.LineTooLong:
- self.send_error(400, "Line too long")
+ self.send_error(
+ HTTPStatus.BAD_REQUEST,
+ "Line too long")
+ return False
+ except http.client.HTTPException as err:
+ self.send_error(
+ HTTPStatus.REQUEST_HEADER_FIELDS_TOO_LARGE,
+ "Too many headers",
+ str(err)
+ )
return False
conntype = self.headers.get('Connection', "")
@@ -355,7 +374,7 @@ class BaseHTTPRequestHandler(socketserver.StreamRequestHandler):
False.
"""
- self.send_response_only(100)
+ self.send_response_only(HTTPStatus.CONTINUE)
self.end_headers()
return True
@@ -373,7 +392,7 @@ class BaseHTTPRequestHandler(socketserver.StreamRequestHandler):
self.requestline = ''
self.request_version = ''
self.command = ''
- self.send_error(414)
+ self.send_error(HTTPStatus.REQUEST_URI_TOO_LONG)
return
if not self.raw_requestline:
self.close_connection = True
@@ -383,7 +402,9 @@ class BaseHTTPRequestHandler(socketserver.StreamRequestHandler):
return
mname = 'do_' + self.command
if not hasattr(self, mname):
- self.send_error(501, "Unsupported method (%r)" % self.command)
+ self.send_error(
+ HTTPStatus.NOT_IMPLEMENTED,
+ "Unsupported method (%r)" % self.command)
return
method = getattr(self, mname)
method()
@@ -429,16 +450,30 @@ class BaseHTTPRequestHandler(socketserver.StreamRequestHandler):
if explain is None:
explain = longmsg
self.log_error("code %d, message %s", code, message)
- # using _quote_html to prevent Cross Site Scripting attacks (see bug #1100201)
- content = (self.error_message_format %
- {'code': code, 'message': _quote_html(message), 'explain': _quote_html(explain)})
- body = content.encode('UTF-8', 'replace')
self.send_response(code, message)
- self.send_header("Content-Type", self.error_content_type)
self.send_header('Connection', 'close')
- self.send_header('Content-Length', int(len(body)))
+
+ # Message body is omitted for cases described in:
+ # - RFC7230: 3.3. 1xx, 204(No Content), 304(Not Modified)
+ # - RFC7231: 6.3.6. 205(Reset Content)
+ body = None
+ if (code >= 200 and
+ code not in (HTTPStatus.NO_CONTENT,
+ HTTPStatus.RESET_CONTENT,
+ HTTPStatus.NOT_MODIFIED)):
+ # HTML encode to prevent Cross Site Scripting attacks
+ # (see bug #1100201)
+ content = (self.error_message_format % {
+ 'code': code,
+ 'message': _quote_html(message),
+ 'explain': _quote_html(explain)
+ })
+ body = content.encode('UTF-8', 'replace')
+ self.send_header("Content-Type", self.error_content_type)
+ self.send_header('Content-Length', int(len(body)))
self.end_headers()
- if self.command != 'HEAD' and code >= 200 and code not in (204, 304):
+
+ if self.command != 'HEAD' and body:
self.wfile.write(body)
def send_response(self, code, message=None):
@@ -499,7 +534,8 @@ class BaseHTTPRequestHandler(socketserver.StreamRequestHandler):
This is called by send_response().
"""
-
+ if isinstance(code, HTTPStatus):
+ code = code.value
self.log_message('"%s" %s %s',
self.requestline, str(code), str(size))
@@ -582,82 +618,11 @@ class BaseHTTPRequestHandler(socketserver.StreamRequestHandler):
# MessageClass used to parse headers
MessageClass = http.client.HTTPMessage
- # Table mapping response codes to messages; entries have the
- # form {code: (shortmessage, longmessage)}.
- # See RFC 2616 and 6585.
+ # hack to maintain backwards compatibility
responses = {
- 100: ('Continue', 'Request received, please continue'),
- 101: ('Switching Protocols',
- 'Switching to new protocol; obey Upgrade header'),
-
- 200: ('OK', 'Request fulfilled, document follows'),
- 201: ('Created', 'Document created, URL follows'),
- 202: ('Accepted',
- 'Request accepted, processing continues off-line'),
- 203: ('Non-Authoritative Information', 'Request fulfilled from cache'),
- 204: ('No Content', 'Request fulfilled, nothing follows'),
- 205: ('Reset Content', 'Clear input form for further input.'),
- 206: ('Partial Content', 'Partial content follows.'),
-
- 300: ('Multiple Choices',
- 'Object has several resources -- see URI list'),
- 301: ('Moved Permanently', 'Object moved permanently -- see URI list'),
- 302: ('Found', 'Object moved temporarily -- see URI list'),
- 303: ('See Other', 'Object moved -- see Method and URL list'),
- 304: ('Not Modified',
- 'Document has not changed since given time'),
- 305: ('Use Proxy',
- 'You must use proxy specified in Location to access this '
- 'resource.'),
- 307: ('Temporary Redirect',
- 'Object moved temporarily -- see URI list'),
-
- 400: ('Bad Request',
- 'Bad request syntax or unsupported method'),
- 401: ('Unauthorized',
- 'No permission -- see authorization schemes'),
- 402: ('Payment Required',
- 'No payment -- see charging schemes'),
- 403: ('Forbidden',
- 'Request forbidden -- authorization will not help'),
- 404: ('Not Found', 'Nothing matches the given URI'),
- 405: ('Method Not Allowed',
- 'Specified method is invalid for this resource.'),
- 406: ('Not Acceptable', 'URI not available in preferred format.'),
- 407: ('Proxy Authentication Required', 'You must authenticate with '
- 'this proxy before proceeding.'),
- 408: ('Request Timeout', 'Request timed out; try again later.'),
- 409: ('Conflict', 'Request conflict.'),
- 410: ('Gone',
- 'URI no longer exists and has been permanently removed.'),
- 411: ('Length Required', 'Client must specify Content-Length.'),
- 412: ('Precondition Failed', 'Precondition in headers is false.'),
- 413: ('Request Entity Too Large', 'Entity is too large.'),
- 414: ('Request-URI Too Long', 'URI is too long.'),
- 415: ('Unsupported Media Type', 'Entity body in unsupported format.'),
- 416: ('Requested Range Not Satisfiable',
- 'Cannot satisfy request range.'),
- 417: ('Expectation Failed',
- 'Expect condition could not be satisfied.'),
- 428: ('Precondition Required',
- 'The origin server requires the request to be conditional.'),
- 429: ('Too Many Requests', 'The user has sent too many requests '
- 'in a given amount of time ("rate limiting").'),
- 431: ('Request Header Fields Too Large', 'The server is unwilling to '
- 'process the request because its header fields are too large.'),
-
- 500: ('Internal Server Error', 'Server got itself in trouble'),
- 501: ('Not Implemented',
- 'Server does not support this operation'),
- 502: ('Bad Gateway', 'Invalid responses from another server/proxy.'),
- 503: ('Service Unavailable',
- 'The server cannot process the request due to a high load'),
- 504: ('Gateway Timeout',
- 'The gateway server did not receive a timely response'),
- 505: ('HTTP Version Not Supported', 'Cannot fulfill request.'),
- 511: ('Network Authentication Required',
- 'The client needs to authenticate to gain network access.'),
- }
+ v: (v.phrase, v.description)
+ for v in HTTPStatus.__members__.values()
+ }
class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
@@ -707,7 +672,7 @@ class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
parts = urllib.parse.urlsplit(self.path)
if not parts.path.endswith('/'):
# redirect browser - doing basically what apache does
- self.send_response(301)
+ self.send_response(HTTPStatus.MOVED_PERMANENTLY)
new_parts = (parts[0], parts[1], parts[2] + '/',
parts[3], parts[4])
new_url = urllib.parse.urlunsplit(new_parts)
@@ -725,10 +690,10 @@ class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
try:
f = open(path, 'rb')
except OSError:
- self.send_error(404, "File not found")
+ self.send_error(HTTPStatus.NOT_FOUND, "File not found")
return None
try:
- self.send_response(200)
+ self.send_response(HTTPStatus.OK)
self.send_header("Content-type", ctype)
fs = os.fstat(f.fileno())
self.send_header("Content-Length", str(fs[6]))
@@ -750,7 +715,9 @@ class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
try:
list = os.listdir(path)
except OSError:
- self.send_error(404, "No permission to list directory")
+ self.send_error(
+ HTTPStatus.NOT_FOUND,
+ "No permission to list directory")
return None
list.sort(key=lambda a: a.lower())
r = []
@@ -789,7 +756,7 @@ class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
f = io.BytesIO()
f.write(encoded)
f.seek(0)
- self.send_response(200)
+ self.send_response(HTTPStatus.OK)
self.send_header("Content-type", "text/html; charset=%s" % enc)
self.send_header("Content-Length", str(len(encoded)))
self.end_headers()
@@ -817,9 +784,9 @@ class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
words = filter(None, words)
path = os.getcwd()
for word in words:
- drive, word = os.path.splitdrive(word)
- head, word = os.path.split(word)
- if word in (os.curdir, os.pardir): continue
+ if os.path.dirname(word) or word in (os.curdir, os.pardir):
+ # Ignore components that are not a simple file/directory name
+ continue
path = os.path.join(path, word)
if trailing_slash:
path += '/'
@@ -976,7 +943,9 @@ class CGIHTTPRequestHandler(SimpleHTTPRequestHandler):
if self.is_cgi():
self.run_cgi()
else:
- self.send_error(501, "Can only POST to CGI scripts")
+ self.send_error(
+ HTTPStatus.NOT_IMPLEMENTED,
+ "Can only POST to CGI scripts")
def send_head(self):
"""Version of send_head that support CGI scripts"""
@@ -1050,17 +1019,21 @@ class CGIHTTPRequestHandler(SimpleHTTPRequestHandler):
scriptname = dir + '/' + script
scriptfile = self.translate_path(scriptname)
if not os.path.exists(scriptfile):
- self.send_error(404, "No such CGI script (%r)" % scriptname)
+ self.send_error(
+ HTTPStatus.NOT_FOUND,
+ "No such CGI script (%r)" % scriptname)
return
if not os.path.isfile(scriptfile):
- self.send_error(403, "CGI script is not a plain file (%r)" %
- scriptname)
+ self.send_error(
+ HTTPStatus.FORBIDDEN,
+ "CGI script is not a plain file (%r)" % scriptname)
return
ispy = self.is_python(scriptname)
if self.have_fork or not ispy:
if not self.is_executable(scriptfile):
- self.send_error(403, "CGI script is not executable (%r)" %
- scriptname)
+ self.send_error(
+ HTTPStatus.FORBIDDEN,
+ "CGI script is not executable (%r)" % scriptname)
return
# Reference: http://hoohoo.ncsa.uiuc.edu/cgi/env.html
@@ -1128,7 +1101,7 @@ class CGIHTTPRequestHandler(SimpleHTTPRequestHandler):
'HTTP_USER_AGENT', 'HTTP_COOKIE', 'HTTP_REFERER'):
env.setdefault(k, "")
- self.send_response(200, "Script output follows")
+ self.send_response(HTTPStatus.OK, "Script output follows")
self.flush_headers()
decoded_query = query.replace('+', ' ')
diff --git a/Lib/idlelib/AutoComplete.py b/Lib/idlelib/AutoComplete.py
index b20512dfa0..ff085d5c70 100644
--- a/Lib/idlelib/AutoComplete.py
+++ b/Lib/idlelib/AutoComplete.py
@@ -1,6 +1,6 @@
"""AutoComplete.py - An IDLE extension for automatically completing names.
-This extension can complete either attribute names of file names. It can pop
+This extension can complete either attribute names or file names. It can pop
a window with all available names, for the user to select from.
"""
import os
@@ -64,7 +64,7 @@ class AutoComplete:
def try_open_completions_event(self, event):
"""Happens when it would be nice to open a completion list, but not
- really necessary, for example after an dot, so function
+ really necessary, for example after a dot, so function
calls won't be made.
"""
lastchar = self.text.get("insert-1c")
diff --git a/Lib/idlelib/CREDITS.txt b/Lib/idlelib/CREDITS.txt
index 5ff599dee1..3a50eb8e7f 100644
--- a/Lib/idlelib/CREDITS.txt
+++ b/Lib/idlelib/CREDITS.txt
@@ -24,7 +24,7 @@ Noam Raphael (Code Context, Call Tips, many other patches), and Chui Tey (RPC
integration, debugger integration and persistent breakpoints).
Scott David Daniels, Tal Einat, Hernan Foffani, Christos Georgiou,
-Jim Jewett, Martin v. Löwis, Jason Orendorff, Guilherme Polo, Josh Robb,
+Jim Jewett, Martin v. Löwis, Jason Orendorff, Guilherme Polo, Josh Robb,
Nigel Rowe, Bruce Sherwood, Jeff Shute, and Weeble have submitted useful
patches. Thanks, guys!
diff --git a/Lib/idlelib/ChangeLog b/Lib/idlelib/ChangeLog
index 985871bee7..0c36664512 100644
--- a/Lib/idlelib/ChangeLog
+++ b/Lib/idlelib/ChangeLog
@@ -20,7 +20,7 @@ IDLEfork ChangeLog
2001-07-19 14:49 elguavas
* ChangeLog, EditorWindow.py, INSTALLATION, NEWS.txt, README.txt,
- TODO.txt, idlever.py:
+ TODO.txt, idlever.py:
minor tidy-ups ready for 0.8.1 alpha tarball release
2001-07-17 15:12 kbk
@@ -172,7 +172,7 @@ IDLEfork ChangeLog
all this work w/ a future-stmt just looks harder and harder."
--tim_one
- (From Rel 1.8: "Hack to make this still work with Python 1.5.2.
+ (From Rel 1.8: "Hack to make this still work with Python 1.5.2.
;-( " --fdrake)
2001-07-14 14:51 kbk
@@ -193,7 +193,7 @@ IDLEfork ChangeLog
test() to _test()." --GvR
This was an interesting merge. The join completely missed removing
- goodname(), which was adjacent, but outside of, a small conflict.
+ goodname(), which was adjacent, but outside of, a small conflict.
I only caught it by comparing the 1.1.3.2/1.1.3.3 diff. CVS ain't
infallible.
@@ -516,12 +516,12 @@ IDLEfork ChangeLog
2000-08-15 22:51 nowonder
- * IDLEFORK.html:
+ * IDLEFORK.html:
corrected email address
2000-08-15 22:47 nowonder
- * IDLEFORK.html:
+ * IDLEFORK.html:
added .html file for http://idlefork.sourceforge.net
2000-08-15 11:13 dscherer
@@ -1574,7 +1574,7 @@ Mon Oct 12 23:59:27 1998 Guido van Rossum <guido@cnri.reston.va.us>
* Attic/PopupMenu.py: Pass a root to the help window.
* SearchBinding.py:
- Add parent argument to 'to to line number' dialog box.
+ Add parent argument to 'go to line number' dialog box.
Sat Oct 10 19:15:32 1998 Guido van Rossum <guido@cnri.reston.va.us>
diff --git a/Lib/idlelib/CodeContext.py b/Lib/idlelib/CodeContext.py
index 44783b69d0..7d25adaa4c 100644
--- a/Lib/idlelib/CodeContext.py
+++ b/Lib/idlelib/CodeContext.py
@@ -57,18 +57,18 @@ class CodeContext:
# Calculate the border width and horizontal padding required to
# align the context with the text in the main Text widget.
#
- # All values are passed through int(str(<value>)), since some
+ # All values are passed through getint(), since some
# values may be pixel objects, which can't simply be added to ints.
widgets = self.editwin.text, self.editwin.text_frame
# Calculate the required vertical padding
padx = 0
for widget in widgets:
- padx += int(str( widget.pack_info()['padx'] ))
- padx += int(str( widget.cget('padx') ))
+ padx += widget.tk.getint(widget.pack_info()['padx'])
+ padx += widget.tk.getint(widget.cget('padx'))
# Calculate the required border width
border = 0
for widget in widgets:
- border += int(str( widget.cget('border') ))
+ border += widget.tk.getint(widget.cget('border'))
self.label = tkinter.Label(self.editwin.top,
text="\n" * (self.context_depth - 1),
anchor=W, justify=LEFT,
diff --git a/Lib/idlelib/ColorDelegator.py b/Lib/idlelib/ColorDelegator.py
index 9f31349604..02eac47068 100644
--- a/Lib/idlelib/ColorDelegator.py
+++ b/Lib/idlelib/ColorDelegator.py
@@ -2,6 +2,7 @@ import time
import re
import keyword
import builtins
+from tkinter import TkVersion
from idlelib.Delegator import Delegator
from idlelib.configHandler import idleConf
@@ -32,6 +33,28 @@ def make_pat():
prog = re.compile(make_pat(), re.S)
idprog = re.compile(r"\s+(\w+)", re.S)
+def color_config(text): # Called from htest, Editor, and Turtle Demo.
+ '''Set color opitons of Text widget.
+
+ Should be called whenever ColorDelegator is called.
+ '''
+ # Not automatic because ColorDelegator does not know 'text'.
+ theme = idleConf.CurrentTheme()
+ normal_colors = idleConf.GetHighlight(theme, 'normal')
+ cursor_color = idleConf.GetHighlight(theme, 'cursor', fgBg='fg')
+ select_colors = idleConf.GetHighlight(theme, 'hilite')
+ text.config(
+ foreground=normal_colors['foreground'],
+ background=normal_colors['background'],
+ insertbackground=cursor_color,
+ selectforeground=select_colors['foreground'],
+ selectbackground=select_colors['background'],
+ )
+ if TkVersion >= 8.5:
+ text.config(
+ inactiveselectbackground=select_colors['background'])
+
+
class ColorDelegator(Delegator):
def __init__(self):
@@ -233,6 +256,7 @@ class ColorDelegator(Delegator):
for tag in self.tagdefs:
self.tag_remove(tag, "1.0", "end")
+
def _color_delegator(parent): # htest #
from tkinter import Toplevel, Text
from idlelib.Percolator import Percolator
@@ -247,6 +271,7 @@ def _color_delegator(parent): # htest #
text.insert("insert", source)
text.focus_set()
+ color_config(text)
p = Percolator(text)
d = ColorDelegator()
p.insertfilter(d)
diff --git a/Lib/idlelib/Debugger.py b/Lib/idlelib/Debugger.py
index 250422edbb..d5e217dde9 100644
--- a/Lib/idlelib/Debugger.py
+++ b/Lib/idlelib/Debugger.py
@@ -372,7 +372,7 @@ class StackViewer(ScrolledList):
def __init__(self, master, flist, gui):
if macosxSupport.isAquaTk():
# At least on with the stock AquaTk version on OSX 10.4 you'll
- # get an shaking GUI that eventually kills IDLE if the width
+ # get a shaking GUI that eventually kills IDLE if the width
# argument is specified.
ScrolledList.__init__(self, master)
else:
diff --git a/Lib/idlelib/Delegator.py b/Lib/idlelib/Delegator.py
index c4765163f8..dc2a1aaeea 100644
--- a/Lib/idlelib/Delegator.py
+++ b/Lib/idlelib/Delegator.py
@@ -1,10 +1,10 @@
class Delegator:
- # The cache is only used to be able to change delegates!
-
def __init__(self, delegate=None):
self.delegate = delegate
self.__cache = set()
+ # Cache is used to only remove added attributes
+ # when changing the delegate.
def __getattr__(self, name):
attr = getattr(self.delegate, name) # May raise AttributeError
@@ -13,6 +13,9 @@ class Delegator:
return attr
def resetcache(self):
+ "Removes added attributes while leaving original attributes."
+ # Function is really about resetting delagator dict
+ # to original state. Cache is just a means
for key in self.__cache:
try:
delattr(self, key)
@@ -21,5 +24,10 @@ class Delegator:
self.__cache.clear()
def setdelegate(self, delegate):
+ "Reset attributes and change delegate."
self.resetcache()
self.delegate = delegate
+
+if __name__ == '__main__':
+ from unittest import main
+ main('idlelib.idle_test.test_delegator', verbosity=2)
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
index b5868be3fb..9944da3e70 100644
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -90,7 +90,7 @@ helpDialog = HelpDialog() # singleton instance, no longer used
class EditorWindow(object):
from idlelib.Percolator import Percolator
- from idlelib.ColorDelegator import ColorDelegator
+ from idlelib.ColorDelegator import ColorDelegator, color_config
from idlelib.UndoDelegator import UndoDelegator
from idlelib.IOBinding import IOBinding, filesystemencoding, encoding
from idlelib import Bindings
@@ -742,20 +742,7 @@ class EditorWindow(object):
# Called from self.filename_change_hook and from configDialog.py
self._rmcolorizer()
self._addcolorizer()
- theme = idleConf.CurrentTheme()
- normal_colors = idleConf.GetHighlight(theme, 'normal')
- cursor_color = idleConf.GetHighlight(theme, 'cursor', fgBg='fg')
- select_colors = idleConf.GetHighlight(theme, 'hilite')
- self.text.config(
- foreground=normal_colors['foreground'],
- background=normal_colors['background'],
- insertbackground=cursor_color,
- selectforeground=select_colors['foreground'],
- selectbackground=select_colors['background'],
- )
- if TkVersion >= 8.5:
- self.text.config(
- inactiveselectbackground=select_colors['background'])
+ EditorWindow.color_config(self.text)
IDENTCHARS = string.ascii_letters + string.digits + "_"
diff --git a/Lib/idlelib/HISTORY.txt b/Lib/idlelib/HISTORY.txt
index 01d73ed2ba..731fabd185 100644
--- a/Lib/idlelib/HISTORY.txt
+++ b/Lib/idlelib/HISTORY.txt
@@ -11,7 +11,7 @@ What's New in IDLEfork 0.8.1?
*Release date: 22-Jul-2001*
- New tarball released as a result of the 'revitalisation' of the IDLEfork
- project.
+ project.
- This release requires python 2.1 or better. Compatibility with earlier
versions of python (especially ancient ones like 1.5x) is no longer a
@@ -26,8 +26,8 @@ What's New in IDLEfork 0.8.1?
not working, but I believe this was the case with the previous IDLE fork
release (0.7.1) as well.
-- This release is being made now to mark the point at which IDLEfork is
- launching into a new stage of development.
+- This release is being made now to mark the point at which IDLEfork is
+ launching into a new stage of development.
- IDLEfork CVS will now be branched to enable further development and
exploration of the two "execution in a remote process" patches submitted by
@@ -96,7 +96,7 @@ IDLEfork 0.7.1 - 29 May 2000
instead of the IDLE help; shift-TAB is now a synonym for unindent.
- New modules:
-
+
ExecBinding.py Executes program through loader
loader.py Bootstraps user program
protocol.py RPC protocol
diff --git a/Lib/idlelib/IOBinding.py b/Lib/idlelib/IOBinding.py
index 5ec9d546fd..84f39a2fee 100644
--- a/Lib/idlelib/IOBinding.py
+++ b/Lib/idlelib/IOBinding.py
@@ -10,6 +10,7 @@ import tkinter.filedialog as tkFileDialog
import tkinter.messagebox as tkMessageBox
from tkinter.simpledialog import askstring
+from idlelib.configHandler import idleConf
# Try setting the locale, so that we can find out
@@ -61,7 +62,7 @@ locale_encoding = locale_encoding.lower()
encoding = locale_encoding ### KBK 07Sep07 This is used all over IDLE, check!
### 'encoding' is used below in encode(), check!
-coding_re = re.compile(r'^[ \t\f]*#.*coding[:=][ \t]*([-\w.]+)', re.ASCII)
+coding_re = re.compile(r'^[ \t\f]*#.*?coding[:=][ \t]*([-\w.]+)', re.ASCII)
blank_re = re.compile(r'^[ \t\f]*(?:[#\r\n]|$)', re.ASCII)
def coding_spec(data):
@@ -525,7 +526,6 @@ class IOBinding:
def _io_binding(parent): # htest #
from tkinter import Toplevel, Text
- from idlelib.configHandler import idleConf
root = Toplevel(parent)
root.title("Test IOBinding")
@@ -536,14 +536,23 @@ def _io_binding(parent): # htest #
self.text = text
self.flist = None
self.text.bind("<Control-o>", self.open)
+ self.text.bind('<Control-p>', self.print)
self.text.bind("<Control-s>", self.save)
+ self.text.bind("<Alt-s>", self.saveas)
+ self.text.bind('<Control-c>', self.savecopy)
def get_saved(self): return 0
def set_saved(self, flag): pass
def reset_undo(self): pass
def open(self, event):
self.text.event_generate("<<open-window-from-file>>")
+ def print(self, event):
+ self.text.event_generate("<<print-window>>")
def save(self, event):
self.text.event_generate("<<save-window>>")
+ def saveas(self, event):
+ self.text.event_generate("<<save-window-as-file>>")
+ def savecopy(self, event):
+ self.text.event_generate("<<save-copy-of-window-as-file>>")
text = Text(root)
text.pack()
diff --git a/Lib/idlelib/MultiCall.py b/Lib/idlelib/MultiCall.py
index 251a84d083..8462854921 100644
--- a/Lib/idlelib/MultiCall.py
+++ b/Lib/idlelib/MultiCall.py
@@ -111,7 +111,7 @@ class _SimpleBinder:
raise
# An int in range(1 << len(_modifiers)) represents a combination of modifiers
-# (if the least significent bit is on, _modifiers[0] is on, and so on).
+# (if the least significant bit is on, _modifiers[0] is on, and so on).
# _state_subsets gives for each combination of modifiers, or *state*,
# a list of the states which are a subset of it. This list is ordered by the
# number of modifiers is the state - the most specific state comes first.
diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt
index 8b8e10b5ea..6c41e2892c 100644
--- a/Lib/idlelib/NEWS.txt
+++ b/Lib/idlelib/NEWS.txt
@@ -1,6 +1,61 @@
-What's New in Idle 3.4.4?
+What's New in IDLE 3.5.2?
=========================
-*Release date: 2015-12-20*
+*Release date: 2016-06-30?*
+
+- Issue #5124: Paste with text selected now replaces the selection on X11.
+ This matches how paste works on Windows, Mac, most modern Linux apps,
+ and ttk widgets. Original patch by Serhiy Storchaka.
+
+- Issue #24759: Make clear in idlelib.idle_test.__init__ that the directory
+ is a private implementation of test.test_idle and tool for maintainers.
+
+- Issue #27196: Stop 'ThemeChangef' warnings when running IDLE tests.
+ These persisted after other warnings were suppressed in #20567.
+ Apply Serhiy Storchaka's update_idletasks solution to four test files.
+ Record this additional advice in idle_test/README.txt
+
+- Issue #20567: Revise idle_test/README.txt with advice about avoiding
+ tk warning messages from tests. Apply advice to several IDLE tests.
+
+- Issue #27117: Make colorizer htest and turtledemo work with dark themes.
+ Move code for configuring text widget colors to a new function.
+
+- Issue #26673: When tk reports font size as 0, change to size 10.
+ Such fonts on Linux prevented the configuration dialog from opening.
+
+- Issue #21939: Add test for IDLE's percolator.
+ Original patch by Saimadhav Heblikar.
+
+- Issue #21676: Add test for IDLE's replace dialog.
+ Original patch by Saimadhav Heblikar.
+
+- Issue #18410: Add test for IDLE's search dialog.
+ Original patch by Westley Martínez.
+
+- Issue #21703: Add test for undo delegator.
+ Original patch by Saimadhav Heblikar .
+
+- Issue #27044: Add ConfigDialog.remove_var_callbacks to stop memory leaks.
+
+- Issue #23977: Add more asserts to test_delegator.
+
+- Issue #20640: Add tests for idlelib.configHelpSourceEdit.
+ Patch by Saimadhav Heblikar.
+
+- In the 'IDLE-console differences' section of the IDLE doc, clarify
+ how running with IDLE affects sys.modules and the standard streams.
+
+- Issue #25507: fix incorrect change in IOBinding that prevented printing.
+ Augment IOBinding htest to include all major IOBinding functions.
+
+- Issue #25905: Revert unwanted conversion of ' to ’ RIGHT SINGLE QUOTATION
+ MARK in README.txt and open this and NEWS.txt with 'ascii'.
+ Re-encode CREDITS.txt to utf-8 and open it with 'utf-8'.
+
+
+What's New in IDLE 3.5.1?
+=========================
+*Release date: 2015-12-06*
- Issue 15348: Stop the debugger engine (normally in a user process)
before closing the debugger window (running in the IDLE process).
@@ -96,6 +151,11 @@ What's New in Idle 3.4.4?
- Issue #24790: Remove extraneous code (which also create 2 & 3 conflicts).
+
+What's New in IDLE 3.5.0?
+=========================
+*Release date: 2015-09-13*
+
- Issue #23672: Allow Idle to edit and run files with astral chars in name.
Patch by Mohd Sanad Zaki Rizvi.
@@ -112,11 +172,6 @@ What's New in Idle 3.4.4?
- Issue #23184: remove unused names and imports in idlelib.
Initial patch by Al Sweigart.
-
-What's New in Idle 3.4.3?
-=========================
-*Release date: 2015-02-25*
-
- Issue #20577: Configuration of the max line length for the FormatParagraph
extension has been moved from the General tab of the Idle preferences dialog
to the FormatParagraph tab of the Config Extensions dialog.
@@ -145,16 +200,11 @@ What's New in Idle 3.4.3?
- Issue #23180: Rename IDLE "Windows" menu item to "Window".
Patch by Al Sweigart.
-
-What's New in IDLE 3.4.2?
-=========================
-*Release date: 2014-10-06*
-
- Issue #17390: Adjust Editor window title; remove 'Python',
move version to end.
- Issue #14105: Idle debugger breakpoints no longer disappear
- when inseting or deleting lines.
+ when inserting or deleting lines.
- Issue #17172: Turtledemo can now be run from Idle.
Currently, the entry is on the Help menu, but it may move to Run.
@@ -184,14 +234,8 @@ What's New in IDLE 3.4.2?
- Issue #18409: Add unittest for AutoComplete. Patch by Phil Webster.
-- Issue #18104: Add idlelib/idle_test/htest.py with a few sample tests to begin
- consolidating and improving human-validated tests of Idle. Change other files
- as needed to work with htest. Running the module as __main__ runs all tests.
-
-
-What's New in IDLE 3.4.1?
-=========================
-*Release date: 2014-05-18*
+- Issue #21477: htest.py - Improve framework, complete set of tests.
+ Patches by Saimadhav Heblikar
- Issue #18104: Add idlelib/idle_test/htest.py with a few sample tests to begin
consolidating and improving human-validated tests of Idle. Change other files
@@ -290,11 +334,6 @@ What's New in IDLE 3.1b1?
- Use of 'filter' in keybindingDialog.py was causing custom key assignment to
fail. Patch 5707 amaury.forgeotdarc.
-
-What's New in IDLE 3.1a1?
-=========================
-*Release date: 07-Mar-09*
-
- Issue #4815: Offer conversion to UTF-8 if source files have
no encoding declaration and are not encoded in UTF-8.
@@ -334,11 +373,6 @@ What's New in IDLE 2.7? (UNRELEASED, but merged into 3.1 releases above.)
- Issue #3549: On MacOS the preferences menu was not present
-
-What's New in IDLE 3.0 final?
-=============================
-*Release date: 03-Dec-2008*
-
- IDLE would print a "Unhandled server exception!" message when internal
debugging is enabled.
@@ -348,11 +382,6 @@ What's New in IDLE 3.0 final?
- Issue #4383: When IDLE cannot make the connection to its subprocess, it would
fail to properly display the error message.
-
-What's New in IDLE 3.0a3?
-=========================
-*Release date: 29-Feb-2008*
-
- help() was not paging to the shell. Issue1650.
- CodeContext was not importing.
@@ -364,19 +393,9 @@ What's New in IDLE 3.0a3?
- Issue #1585: IDLE uses non-existent xrange() function.
-
-What's New in IDLE 3.0a2?
-=========================
-*Release date: 06-Dec-2007*
-
- Windows EOL sequence not converted correctly, encoding error.
Caused file save to fail. Bug 1130.
-
-What's New in IDLE 3.0a1?
-=========================
-*Release date: 31-Aug-2007*
-
- IDLE converted to Python 3000 syntax.
- Strings became Unicode.
diff --git a/Lib/idlelib/Percolator.py b/Lib/idlelib/Percolator.py
index 9e9331940f..b8be2aa746 100644
--- a/Lib/idlelib/Percolator.py
+++ b/Lib/idlelib/Percolator.py
@@ -1,6 +1,7 @@
from idlelib.WidgetRedirector import WidgetRedirector
from idlelib.Delegator import Delegator
+
class Percolator:
def __init__(self, text):
@@ -16,8 +17,10 @@ class Percolator:
while self.top is not self.bottom:
self.removefilter(self.top)
self.top = None
- self.bottom.setdelegate(None); self.bottom = None
- self.redir.close(); self.redir = None
+ self.bottom.setdelegate(None)
+ self.bottom = None
+ self.redir.close()
+ self.redir = None
self.text = None
def insert(self, index, chars, tags=None):
@@ -51,54 +54,52 @@ class Percolator:
f.setdelegate(filter.delegate)
filter.setdelegate(None)
-def _percolator(parent):
+
+def _percolator(parent): # htest #
import tkinter as tk
import re
+
class Tracer(Delegator):
def __init__(self, name):
self.name = name
Delegator.__init__(self, None)
+
def insert(self, *args):
print(self.name, ": insert", args)
self.delegate.insert(*args)
+
def delete(self, *args):
print(self.name, ": delete", args)
self.delegate.delete(*args)
- root = tk.Tk()
- root.title("Test Percolator")
+
+ box = tk.Toplevel(parent)
+ box.title("Test Percolator")
width, height, x, y = list(map(int, re.split('[x+]', parent.geometry())))
- root.geometry("+%d+%d"%(x, y + 150))
- text = tk.Text(root)
+ box.geometry("+%d+%d" % (x, y + 150))
+ text = tk.Text(box)
p = Percolator(text)
+ pin = p.insertfilter
+ pout = p.removefilter
t1 = Tracer("t1")
t2 = Tracer("t2")
def toggle1():
- if var1.get() == 0:
- var1.set(1)
- p.insertfilter(t1)
- elif var1.get() == 1:
- var1.set(0)
- p.removefilter(t1)
-
+ (pin if var1.get() else pout)(t1)
def toggle2():
- if var2.get() == 0:
- var2.set(1)
- p.insertfilter(t2)
- elif var2.get() == 1:
- var2.set(0)
- p.removefilter(t2)
+ (pin if var2.get() else pout)(t2)
text.pack()
var1 = tk.IntVar()
- cb1 = tk.Checkbutton(root, text="Tracer1", command=toggle1, variable=var1)
+ cb1 = tk.Checkbutton(box, text="Tracer1", command=toggle1, variable=var1)
cb1.pack()
var2 = tk.IntVar()
- cb2 = tk.Checkbutton(root, text="Tracer2", command=toggle2, variable=var2)
+ cb2 = tk.Checkbutton(box, text="Tracer2", command=toggle2, variable=var2)
cb2.pack()
- root.mainloop()
-
if __name__ == "__main__":
+ import unittest
+ unittest.main('idlelib.idle_test.test_percolator', verbosity=2,
+ exit=False)
+
from idlelib.idle_test.htest import run
run(_percolator)
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
index 1bcc9b6814..5dec68e580 100755
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -1396,6 +1396,17 @@ class PseudoInputFile(PseudoFile):
self.shell.close()
+def fix_x11_paste(root):
+ "Make paste replace selection on x11. See issue #5124."
+ if root._windowingsystem == 'x11':
+ for cls in 'Text', 'Entry', 'Spinbox':
+ root.bind_class(
+ cls,
+ '<<Paste>>',
+ 'catch {%W delete sel.first sel.last}\n' +
+ root.bind_class(cls, '<<Paste>>'))
+
+
usage_msg = """\
USAGE: idle [-deins] [-t title] [file]*
@@ -1528,8 +1539,10 @@ def main():
'editor-on-startup', type='bool')
enable_edit = enable_edit or edit_start
enable_shell = enable_shell or not enable_edit
+
# start editor and/or shell windows:
root = Tk(className="Idle")
+ root.withdraw()
# set application icon
icondir = os.path.join(os.path.dirname(__file__), 'Icons')
@@ -1544,7 +1557,7 @@ def main():
root.wm_iconphoto(True, *icons)
fixwordbreaks(root)
- root.withdraw()
+ fix_x11_paste(root)
flist = PyShellFileList(root)
macosxSupport.setupApp(root, flist)
diff --git a/Lib/idlelib/ReplaceDialog.py b/Lib/idlelib/ReplaceDialog.py
index 2665a1c630..f2ea22e7f7 100644
--- a/Lib/idlelib/ReplaceDialog.py
+++ b/Lib/idlelib/ReplaceDialog.py
@@ -1,3 +1,8 @@
+"""Replace dialog for IDLE. Inherits SearchDialogBase for GUI.
+Uses idlelib.SearchEngine for search capability.
+Defines various replace related functions like replace, replace all,
+replace+find.
+"""
from tkinter import *
from idlelib import SearchEngine
@@ -6,6 +11,8 @@ import re
def replace(text):
+ """Returns a singleton ReplaceDialog instance.The single dialog
+ saves user entries and preferences across instances."""
root = text._root()
engine = SearchEngine.get(root)
if not hasattr(engine, "_replacedialog"):
@@ -24,6 +31,7 @@ class ReplaceDialog(SearchDialogBase):
self.replvar = StringVar(root)
def open(self, text):
+ """Display the replace dialog"""
SearchDialogBase.open(self, text)
try:
first = text.index("sel.first")
@@ -39,6 +47,7 @@ class ReplaceDialog(SearchDialogBase):
self.ok = 1
def create_entries(self):
+ """Create label and text entry widgets"""
SearchDialogBase.create_entries(self)
self.replent = self.make_entry("Replace with:", self.replvar)[0]
@@ -57,9 +66,10 @@ class ReplaceDialog(SearchDialogBase):
self.do_replace()
def default_command(self, event=None):
+ "Replace and find next."
if self.do_find(self.ok):
- if self.do_replace(): # Only find next match if replace succeeded.
- # A bad re can cause it to fail.
+ if self.do_replace(): # Only find next match if replace succeeded.
+ # A bad re can cause it to fail.
self.do_find(0)
def _replace_expand(self, m, repl):
@@ -77,6 +87,7 @@ class ReplaceDialog(SearchDialogBase):
return new
def replace_all(self, event=None):
+ """Replace all instances of patvar with replvar in text"""
prog = self.engine.getprog()
if not prog:
return
@@ -173,6 +184,8 @@ class ReplaceDialog(SearchDialogBase):
return True
def show_hit(self, first, last):
+ """Highlight text from 'first' to 'last'.
+ 'first', 'last' - Text indices"""
text = self.text
text.mark_set("insert", first)
text.tag_remove("sel", "1.0", "end")
@@ -189,11 +202,13 @@ class ReplaceDialog(SearchDialogBase):
SearchDialogBase.close(self, event)
self.text.tag_remove("hit", "1.0", "end")
-def _replace_dialog(parent):
- root = Tk()
- root.title("Test ReplaceDialog")
+
+def _replace_dialog(parent): # htest #
+ """htest wrapper function"""
+ box = Toplevel(parent)
+ box.title("Test ReplaceDialog")
width, height, x, y = list(map(int, re.split('[x+]', parent.geometry())))
- root.geometry("+%d+%d"%(x, y + 150))
+ box.geometry("+%d+%d"%(x, y + 150))
# mock undo delegator methods
def undo_block_start():
@@ -202,20 +217,25 @@ def _replace_dialog(parent):
def undo_block_stop():
pass
- text = Text(root)
+ text = Text(box, inactiveselectbackground='gray')
text.undo_block_start = undo_block_start
text.undo_block_stop = undo_block_stop
text.pack()
- text.insert("insert","This is a sample string.\n"*10)
+ text.insert("insert","This is a sample sTring\nPlus MORE.")
+ text.focus_set()
def show_replace():
text.tag_add(SEL, "1.0", END)
replace(text)
text.tag_remove(SEL, "1.0", END)
- button = Button(root, text="Replace", command=show_replace)
+ button = Button(box, text="Replace", command=show_replace)
button.pack()
if __name__ == '__main__':
+ import unittest
+ unittest.main('idlelib.idle_test.test_replacedialog',
+ verbosity=2, exit=False)
+
from idlelib.idle_test.htest import run
run(_replace_dialog)
diff --git a/Lib/idlelib/SearchDialog.py b/Lib/idlelib/SearchDialog.py
index 77ef7b9a82..765d53fe92 100644
--- a/Lib/idlelib/SearchDialog.py
+++ b/Lib/idlelib/SearchDialog.py
@@ -4,6 +4,7 @@ from idlelib import SearchEngine
from idlelib.SearchDialogBase import SearchDialogBase
def _setup(text):
+ "Create or find the singleton SearchDialog instance."
root = text._root()
engine = SearchEngine.get(root)
if not hasattr(engine, "_searchdialog"):
@@ -11,13 +12,16 @@ def _setup(text):
return engine._searchdialog
def find(text):
+ "Handle the editor edit menu item and corresponding event."
pat = text.get("sel.first", "sel.last")
- return _setup(text).open(text,pat)
+ return _setup(text).open(text, pat) # Open is inherited from SDBase.
def find_again(text):
+ "Handle the editor edit menu item and corresponding event."
return _setup(text).find_again(text)
def find_selection(text):
+ "Handle the editor edit menu item and corresponding event."
return _setup(text).find_selection(text)
class SearchDialog(SearchDialogBase):
@@ -66,24 +70,28 @@ class SearchDialog(SearchDialogBase):
self.engine.setcookedpat(pat)
return self.find_again(text)
-def _search_dialog(parent):
- root = Tk()
- root.title("Test SearchDialog")
+
+def _search_dialog(parent): # htest #
+ '''Display search test box.'''
+ box = Toplevel(parent)
+ box.title("Test SearchDialog")
width, height, x, y = list(map(int, re.split('[x+]', parent.geometry())))
- root.geometry("+%d+%d"%(x, y + 150))
- text = Text(root)
+ box.geometry("+%d+%d"%(x, y + 150))
+ text = Text(box, inactiveselectbackground='gray')
text.pack()
- text.insert("insert","This is a sample string.\n"*10)
+ text.insert("insert","This is a sample string.\n"*5)
def show_find():
text.tag_add(SEL, "1.0", END)
- s = _setup(text)
- s.open(text)
+ _setup(text).open(text)
text.tag_remove(SEL, "1.0", END)
- button = Button(root, text="Search", command=show_find)
+ button = Button(box, text="Search (selection ignored)", command=show_find)
button.pack()
if __name__ == '__main__':
+ import unittest
+ unittest.main('idlelib.idle_test.test_searchdialog',
+ verbosity=2, exit=False)
from idlelib.idle_test.htest import run
run(_search_dialog)
diff --git a/Lib/idlelib/UndoDelegator.py b/Lib/idlelib/UndoDelegator.py
index 04c1cf5a27..1c2502d818 100644
--- a/Lib/idlelib/UndoDelegator.py
+++ b/Lib/idlelib/UndoDelegator.py
@@ -336,30 +336,33 @@ class CommandSequence(Command):
self.depth = self.depth + incr
return self.depth
-def _undo_delegator(parent):
+
+def _undo_delegator(parent): # htest #
+ import re
+ import tkinter as tk
from idlelib.Percolator import Percolator
- root = Tk()
- root.title("Test UndoDelegator")
+ undowin = tk.Toplevel()
+ undowin.title("Test UndoDelegator")
width, height, x, y = list(map(int, re.split('[x+]', parent.geometry())))
- root.geometry("+%d+%d"%(x, y + 150))
+ undowin.geometry("+%d+%d"%(x, y + 150))
- text = Text(root)
- text.config(height=10)
+ text = Text(undowin, height=10)
text.pack()
text.focus_set()
p = Percolator(text)
d = UndoDelegator()
p.insertfilter(d)
- undo = Button(root, text="Undo", command=lambda:d.undo_event(None))
+ undo = Button(undowin, text="Undo", command=lambda:d.undo_event(None))
undo.pack(side='left')
- redo = Button(root, text="Redo", command=lambda:d.redo_event(None))
+ redo = Button(undowin, text="Redo", command=lambda:d.redo_event(None))
redo.pack(side='left')
- dump = Button(root, text="Dump", command=lambda:d.dump_event(None))
+ dump = Button(undowin, text="Dump", command=lambda:d.dump_event(None))
dump.pack(side='left')
- root.mainloop()
-
if __name__ == "__main__":
+ import unittest
+ unittest.main('idlelib.idle_test.test_undodelegator', verbosity=2,
+ exit=False)
from idlelib.idle_test.htest import run
run(_undo_delegator)
diff --git a/Lib/idlelib/WidgetRedirector.py b/Lib/idlelib/WidgetRedirector.py
index b3d7bfa3c4..b66be9e721 100644
--- a/Lib/idlelib/WidgetRedirector.py
+++ b/Lib/idlelib/WidgetRedirector.py
@@ -47,8 +47,9 @@ class WidgetRedirector:
tk.createcommand(w, self.dispatch)
def __repr__(self):
- return "WidgetRedirector(%s<%s>)" % (self.widget.__class__.__name__,
- self.widget._w)
+ return "%s(%s<%s>)" % (self.__class__.__name__,
+ self.widget.__class__.__name__,
+ self.widget._w)
def close(self):
"Unregister operations and revert redirection created by .__init__."
@@ -67,7 +68,7 @@ class WidgetRedirector:
'''Return OriginalCommand(operation) after registering function.
Registration adds an operation: function pair to ._operations.
- It also adds an widget function attribute that masks the tkinter
+ It also adds a widget function attribute that masks the tkinter
class instance method. Method masking operates independently
from command dispatch.
@@ -142,7 +143,8 @@ class OriginalCommand:
self.orig_and_operation = (redir.orig, operation)
def __repr__(self):
- return "OriginalCommand(%r, %r)" % (self.redir, self.operation)
+ return "%s(%r, %r)" % (self.__class__.__name__,
+ self.redir, self.operation)
def __call__(self, *args):
return self.tk_call(self.orig_and_operation + args)
diff --git a/Lib/idlelib/aboutDialog.py b/Lib/idlelib/aboutDialog.py
index d876a97115..3112e6a3da 100644
--- a/Lib/idlelib/aboutDialog.py
+++ b/Lib/idlelib/aboutDialog.py
@@ -111,6 +111,7 @@ class AboutDialog(Toplevel):
command=self.ShowIDLECredits)
idle_credits_b.pack(side=LEFT, padx=10, pady=10)
+ # License, et all, are of type _sitebuiltins._Printer
def ShowLicense(self):
self.display_printer_text('About - License', license)
@@ -120,14 +121,16 @@ class AboutDialog(Toplevel):
def ShowPythonCredits(self):
self.display_printer_text('About - Python Credits', credits)
+ # Encode CREDITS.txt to utf-8 for proper version of Loewis.
+ # Specify others as ascii until need utf-8, so catch errors.
def ShowIDLECredits(self):
- self.display_file_text('About - Credits', 'CREDITS.txt', 'iso-8859-1')
+ self.display_file_text('About - Credits', 'CREDITS.txt', 'utf-8')
def ShowIDLEAbout(self):
- self.display_file_text('About - Readme', 'README.txt')
+ self.display_file_text('About - Readme', 'README.txt', 'ascii')
def ShowIDLENEWS(self):
- self.display_file_text('About - NEWS', 'NEWS.txt')
+ self.display_file_text('About - NEWS', 'NEWS.txt', 'ascii')
def display_printer_text(self, title, printer):
printer._Printer__setup()
diff --git a/Lib/idlelib/configDialog.py b/Lib/idlelib/configDialog.py
index 9b16459d54..b7022537e6 100644
--- a/Lib/idlelib/configDialog.py
+++ b/Lib/idlelib/configDialog.py
@@ -483,6 +483,17 @@ class ConfigDialog(Toplevel):
self.autoSave.trace_variable('w', self.VarChanged_autoSave)
self.encoding.trace_variable('w', self.VarChanged_encoding)
+ def remove_var_callbacks(self):
+ "Remove callbacks to prevent memory leaks."
+ for var in (
+ self.fontSize, self.fontName, self.fontBold,
+ self.spaceNum, self.colour, self.builtinTheme,
+ self.customTheme, self.themeIsBuiltin, self.highlightTarget,
+ self.keyBinding, self.builtinKeys, self.customKeys,
+ self.keysAreBuiltin, self.winWidth, self.winHeight,
+ self.startupEdit, self.autoSave, self.encoding,):
+ var.trace_vdelete('w', var.trace_vinfo()[0][1])
+
def VarChanged_font(self, *params):
'''When one font attribute changes, save them all, as they are
not independent from each other. In particular, when we are
@@ -1196,7 +1207,7 @@ class ConfigDialog(Toplevel):
All values are treated as text, and it is up to the user to supply
reasonable values. The only exception to this are the 'enable*' options,
- which are boolean, and can be toggled with an True/False button.
+ which are boolean, and can be toggled with a True/False button.
"""
parent = self.parent
frame = self.tabPages.pages['Extensions'].frame
diff --git a/Lib/idlelib/configHandler.py b/Lib/idlelib/configHandler.py
index 531efb4b3e..8ac1f6097a 100644
--- a/Lib/idlelib/configHandler.py
+++ b/Lib/idlelib/configHandler.py
@@ -720,7 +720,7 @@ class IdleConf:
actualFont = Font.actual(f)
family = actualFont['family']
size = actualFont['size']
- if size < 0:
+ if size <= 0:
size = 10 # if font in pixels, ignore actual size
bold = actualFont['weight']=='bold'
return (family, size, 'bold' if bold else 'normal')
diff --git a/Lib/idlelib/configHelpSourceEdit.py b/Lib/idlelib/configHelpSourceEdit.py
index 242b08db56..cde8118fe6 100644
--- a/Lib/idlelib/configHelpSourceEdit.py
+++ b/Lib/idlelib/configHelpSourceEdit.py
@@ -23,10 +23,10 @@ class GetHelpSourceDialog(Toplevel):
self.title(title)
self.transient(parent)
self.grab_set()
- self.protocol("WM_DELETE_WINDOW", self.Cancel)
+ self.protocol("WM_DELETE_WINDOW", self.cancel)
self.parent = parent
self.result = None
- self.CreateWidgets()
+ self.create_widgets()
self.menu.set(menuItem)
self.path.set(filePath)
self.withdraw() #hide while setting geometry
@@ -41,10 +41,10 @@ class GetHelpSourceDialog(Toplevel):
((parent.winfo_height()/2 - self.winfo_reqheight()/2)
if not _htest else 150)))
self.deiconify() #geometry set, unhide
- self.bind('<Return>', self.Ok)
+ self.bind('<Return>', self.ok)
self.wait_window()
- def CreateWidgets(self):
+ def create_widgets(self):
self.menu = StringVar(self)
self.path = StringVar(self)
self.fontSize = StringVar(self)
@@ -65,18 +65,18 @@ class GetHelpSourceDialog(Toplevel):
labelPath.pack(anchor=W, padx=5, pady=3)
self.entryPath.pack(anchor=W, padx=5, pady=3)
browseButton = Button(self.frameMain, text='Browse', width=8,
- command=self.browseFile)
+ command=self.browse_file)
browseButton.pack(pady=3)
frameButtons = Frame(self)
frameButtons.pack(side=BOTTOM, fill=X)
self.buttonOk = Button(frameButtons, text='OK',
- width=8, default=ACTIVE, command=self.Ok)
+ width=8, default=ACTIVE, command=self.ok)
self.buttonOk.grid(row=0, column=0, padx=5,pady=5)
self.buttonCancel = Button(frameButtons, text='Cancel',
- width=8, command=self.Cancel)
+ width=8, command=self.cancel)
self.buttonCancel.grid(row=0, column=1, padx=5, pady=5)
- def browseFile(self):
+ def browse_file(self):
filetypes = [
("HTML Files", "*.htm *.html", "TEXT"),
("PDF Files", "*.pdf", "TEXT"),
@@ -99,9 +99,9 @@ class GetHelpSourceDialog(Toplevel):
if file:
self.path.set(file)
- def MenuOk(self):
+ def menu_ok(self):
"Simple validity check for a sensible menu item name"
- menuOk = True
+ menu_ok = True
menu = self.menu.get()
menu.strip()
if not menu:
@@ -109,19 +109,19 @@ class GetHelpSourceDialog(Toplevel):
message='No menu item specified',
parent=self)
self.entryMenu.focus_set()
- menuOk = False
+ menu_ok = False
elif len(menu) > 30:
tkMessageBox.showerror(title='Menu Item Error',
message='Menu item too long:'
'\nLimit 30 characters.',
parent=self)
self.entryMenu.focus_set()
- menuOk = False
- return menuOk
+ menu_ok = False
+ return menu_ok
- def PathOk(self):
+ def path_ok(self):
"Simple validity check for menu file path"
- pathOk = True
+ path_ok = True
path = self.path.get()
path.strip()
if not path: #no path specified
@@ -129,7 +129,7 @@ class GetHelpSourceDialog(Toplevel):
message='No help file path specified.',
parent=self)
self.entryPath.focus_set()
- pathOk = False
+ path_ok = False
elif path.startswith(('www.', 'http')):
pass
else:
@@ -140,16 +140,16 @@ class GetHelpSourceDialog(Toplevel):
message='Help file path does not exist.',
parent=self)
self.entryPath.focus_set()
- pathOk = False
- return pathOk
+ path_ok = False
+ return path_ok
- def Ok(self, event=None):
- if self.MenuOk() and self.PathOk():
+ def ok(self, event=None):
+ if self.menu_ok() and self.path_ok():
self.result = (self.menu.get().strip(),
self.path.get().strip())
if sys.platform == 'darwin':
path = self.result[1]
- if path.startswith(('www', 'file:', 'http:')):
+ if path.startswith(('www', 'file:', 'http:', 'https:')):
pass
else:
# Mac Safari insists on using the URI form for local files
@@ -157,10 +157,14 @@ class GetHelpSourceDialog(Toplevel):
self.result[1] = "file://" + path
self.destroy()
- def Cancel(self, event=None):
+ def cancel(self, event=None):
self.result = None
self.destroy()
if __name__ == '__main__':
+ import unittest
+ unittest.main('idlelib.idle_test.test_config_help',
+ verbosity=2, exit=False)
+
from idlelib.idle_test.htest import run
run(GetHelpSourceDialog)
diff --git a/Lib/idlelib/help.html b/Lib/idlelib/help.html
index 2189fd4cf0..6f739c42ab 100644
--- a/Lib/idlelib/help.html
+++ b/Lib/idlelib/help.html
@@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>25.5. IDLE &mdash; Python 3.4.3 documentation</title>
+ <title>25.5. IDLE &mdash; Python 3.5.1 documentation</title>
<link rel="stylesheet" href="../_static/pydoctheme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@@ -14,7 +14,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
- VERSION: '3.4.3',
+ VERSION: '3.5.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@@ -25,11 +25,11 @@
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/sidebar.js"></script>
<link rel="search" type="application/opensearchdescription+xml"
- title="Search within Python 3.4.3 documentation"
+ title="Search within Python 3.5.1 documentation"
href="../_static/opensearch.xml"/>
<link rel="author" title="About these documents" href="../about.html" />
<link rel="copyright" title="Copyright" href="../copyright.html" />
- <link rel="top" title="Python 3.4.3 documentation" href="../index.html" />
+ <link rel="top" title="Python 3.5.1 documentation" href="../contents.html" />
<link rel="up" title="25. Graphical User Interfaces with Tk" href="tk.html" />
<link rel="next" title="25.6. Other Graphical User Interface Packages" href="othergui.html" />
<link rel="prev" title="25.4. tkinter.scrolledtext — Scrolled Text Widget" href="tkinter.scrolledtext.html" />
@@ -40,8 +40,8 @@
</head>
- <body>
- <div class="related">
+ <body role="document">
+ <div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
@@ -60,25 +60,27 @@
style="vertical-align: middle; margin-top: -1px"/></li>
<li><a href="https://www.python.org/">Python</a> &raquo;</li>
<li>
- <a href="../index.html">3.4.3 Documentation</a> &raquo;
+ <a href="../index.html">3.5.1 Documentation</a> &raquo;
</li>
- <li><a href="index.html" >The Python Standard Library</a> &raquo;</li>
- <li><a href="tk.html" accesskey="U">25. Graphical User Interfaces with Tk</a> &raquo;</li>
+ <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &raquo;</li>
+ <li class="nav-item nav-item-2"><a href="tk.html" accesskey="U">25. Graphical User Interfaces with Tk</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
- <div class="body">
+ <div class="body" role="main">
<div class="section" id="idle">
<span id="id1"></span><h1>25.5. IDLE<a class="headerlink" href="#idle" title="Permalink to this headline">¶</a></h1>
-<p id="index-0">IDLE is Python&#8217;s Integrated Development and Learning Environment.</p>
+<p><strong>Source code:</strong> <a class="reference external" href="https://hg.python.org/cpython/file/3.5/Lib/idlelib/">Lib/idlelib/</a></p>
+<hr class="docutils" id="index-0" />
+<p>IDLE is Python&#8217;s Integrated Development and Learning Environment.</p>
<p>IDLE has the following features:</p>
<ul class="simple">
-<li>coded in 100% pure Python, using the <a class="reference internal" href="tkinter.html#module-tkinter" title="tkinter: Interface to Tcl/Tk for graphical user interfaces"><tt class="xref py py-mod docutils literal"><span class="pre">tkinter</span></tt></a> GUI toolkit</li>
+<li>coded in 100% pure Python, using the <a class="reference internal" href="tkinter.html#module-tkinter" title="tkinter: Interface to Tcl/Tk for graphical user interfaces"><code class="xref py py-mod docutils literal"><span class="pre">tkinter</span></code></a> GUI toolkit</li>
<li>cross-platform: works mostly the same on Windows, Unix, and Mac OS X</li>
<li>Python shell window (interactive interpreter) with colorizing
of code input, output, and error messages</li>
@@ -163,7 +165,7 @@ be undone.</dd>
<dt>Find Selection</dt>
<dd>Search for the currently selected string, if there is one.</dd>
<dt>Find in Files...</dt>
-<dd>Open a file search dialog. Put results in an new output window.</dd>
+<dd>Open a file search dialog. Put results in a new output window.</dd>
<dt>Replace...</dt>
<dd>Open a search-and-replace dialog.</dd>
<dt>Go to Line</dt>
@@ -224,10 +226,10 @@ Editor window.</dd>
<dt>Run Module</dt>
<dd>Do Check Module (above). If no error, restart the shell to clean the
environment, then execute the module. Output is displayed in the Shell
-window. Note that output requires use of <tt class="docutils literal"><span class="pre">print</span></tt> or <tt class="docutils literal"><span class="pre">write</span></tt>.
+window. Note that output requires use of <code class="docutils literal"><span class="pre">print</span></code> or <code class="docutils literal"><span class="pre">write</span></code>.
When execution is complete, the Shell retains focus and displays a prompt.
At this point, one may interactively explore the result of execution.
-This is similar to executing a file with <tt class="docutils literal"><span class="pre">python</span> <span class="pre">-i</span> <span class="pre">file</span></tt> at a command
+This is similar to executing a file with <code class="docutils literal"><span class="pre">python</span> <span class="pre">-i</span> <span class="pre">file</span></code> at a command
line.</dd>
</dl>
</div>
@@ -339,47 +341,47 @@ debugger. Breakpoints for a file are saved in the user&#8217;s .idlerc director
</div>
<div class="section" id="editing-and-navigation">
<h2>25.5.2. Editing and navigation<a class="headerlink" href="#editing-and-navigation" title="Permalink to this headline">¶</a></h2>
-<p>In this section, &#8216;C&#8217; refers to the <tt class="kbd docutils literal"><span class="pre">Control</span></tt> key on Windows and Unix and
-the <tt class="kbd docutils literal"><span class="pre">Command</span></tt> key on Mac OSX.</p>
+<p>In this section, &#8216;C&#8217; refers to the <code class="kbd docutils literal"><span class="pre">Control</span></code> key on Windows and Unix and
+the <code class="kbd docutils literal"><span class="pre">Command</span></code> key on Mac OSX.</p>
<ul>
-<li><p class="first"><tt class="kbd docutils literal"><span class="pre">Backspace</span></tt> deletes to the left; <tt class="kbd docutils literal"><span class="pre">Del</span></tt> deletes to the right</p>
+<li><p class="first"><code class="kbd docutils literal"><span class="pre">Backspace</span></code> deletes to the left; <code class="kbd docutils literal"><span class="pre">Del</span></code> deletes to the right</p>
</li>
-<li><p class="first"><tt class="kbd docutils literal"><span class="pre">C-Backspace</span></tt> delete word left; <tt class="kbd docutils literal"><span class="pre">C-Del</span></tt> delete word to the right</p>
+<li><p class="first"><code class="kbd docutils literal"><span class="pre">C-Backspace</span></code> delete word left; <code class="kbd docutils literal"><span class="pre">C-Del</span></code> delete word to the right</p>
</li>
-<li><p class="first">Arrow keys and <tt class="kbd docutils literal"><span class="pre">Page</span> <span class="pre">Up</span></tt>/<tt class="kbd docutils literal"><span class="pre">Page</span> <span class="pre">Down</span></tt> to move around</p>
+<li><p class="first">Arrow keys and <code class="kbd docutils literal"><span class="pre">Page</span> <span class="pre">Up</span></code>/<code class="kbd docutils literal"><span class="pre">Page</span> <span class="pre">Down</span></code> to move around</p>
</li>
-<li><p class="first"><tt class="kbd docutils literal"><span class="pre">C-LeftArrow</span></tt> and <tt class="kbd docutils literal"><span class="pre">C-RightArrow</span></tt> moves by words</p>
+<li><p class="first"><code class="kbd docutils literal"><span class="pre">C-LeftArrow</span></code> and <code class="kbd docutils literal"><span class="pre">C-RightArrow</span></code> moves by words</p>
</li>
-<li><p class="first"><tt class="kbd docutils literal"><span class="pre">Home</span></tt>/<tt class="kbd docutils literal"><span class="pre">End</span></tt> go to begin/end of line</p>
+<li><p class="first"><code class="kbd docutils literal"><span class="pre">Home</span></code>/<code class="kbd docutils literal"><span class="pre">End</span></code> go to begin/end of line</p>
</li>
-<li><p class="first"><tt class="kbd docutils literal"><span class="pre">C-Home</span></tt>/<tt class="kbd docutils literal"><span class="pre">C-End</span></tt> go to begin/end of file</p>
+<li><p class="first"><code class="kbd docutils literal"><span class="pre">C-Home</span></code>/<code class="kbd docutils literal"><span class="pre">C-End</span></code> go to begin/end of file</p>
</li>
<li><p class="first">Some useful Emacs bindings are inherited from Tcl/Tk:</p>
<blockquote>
<div><ul class="simple">
-<li><tt class="kbd docutils literal"><span class="pre">C-a</span></tt> beginning of line</li>
-<li><tt class="kbd docutils literal"><span class="pre">C-e</span></tt> end of line</li>
-<li><tt class="kbd docutils literal"><span class="pre">C-k</span></tt> kill line (but doesn&#8217;t put it in clipboard)</li>
-<li><tt class="kbd docutils literal"><span class="pre">C-l</span></tt> center window around the insertion point</li>
-<li><tt class="kbd docutils literal"><span class="pre">C-b</span></tt> go backwards one character without deleting (usually you can
+<li><code class="kbd docutils literal"><span class="pre">C-a</span></code> beginning of line</li>
+<li><code class="kbd docutils literal"><span class="pre">C-e</span></code> end of line</li>
+<li><code class="kbd docutils literal"><span class="pre">C-k</span></code> kill line (but doesn&#8217;t put it in clipboard)</li>
+<li><code class="kbd docutils literal"><span class="pre">C-l</span></code> center window around the insertion point</li>
+<li><code class="kbd docutils literal"><span class="pre">C-b</span></code> go backwards one character without deleting (usually you can
also use the cursor key for this)</li>
-<li><tt class="kbd docutils literal"><span class="pre">C-f</span></tt> go forward one character without deleting (usually you can
+<li><code class="kbd docutils literal"><span class="pre">C-f</span></code> go forward one character without deleting (usually you can
also use the cursor key for this)</li>
-<li><tt class="kbd docutils literal"><span class="pre">C-p</span></tt> go up one line (usually you can also use the cursor key for
+<li><code class="kbd docutils literal"><span class="pre">C-p</span></code> go up one line (usually you can also use the cursor key for
this)</li>
-<li><tt class="kbd docutils literal"><span class="pre">C-d</span></tt> delete next character</li>
+<li><code class="kbd docutils literal"><span class="pre">C-d</span></code> delete next character</li>
</ul>
</div></blockquote>
</li>
</ul>
-<p>Standard keybindings (like <tt class="kbd docutils literal"><span class="pre">C-c</span></tt> to copy and <tt class="kbd docutils literal"><span class="pre">C-v</span></tt> to paste)
+<p>Standard keybindings (like <code class="kbd docutils literal"><span class="pre">C-c</span></code> to copy and <code class="kbd docutils literal"><span class="pre">C-v</span></code> to paste)
may work. Keybindings are selected in the Configure IDLE dialog.</p>
<div class="section" id="automatic-indentation">
<h3>25.5.2.1. Automatic indentation<a class="headerlink" href="#automatic-indentation" title="Permalink to this headline">¶</a></h3>
<p>After a block-opening statement, the next line is indented by 4 spaces (in the
Python Shell window by one tab). After certain keywords (break, return etc.)
-the next line is dedented. In leading indentation, <tt class="kbd docutils literal"><span class="pre">Backspace</span></tt> deletes up
-to 4 spaces if they are there. <tt class="kbd docutils literal"><span class="pre">Tab</span></tt> inserts spaces (in the Python
+the next line is dedented. In leading indentation, <code class="kbd docutils literal"><span class="pre">Backspace</span></code> deletes up
+to 4 spaces if they are there. <code class="kbd docutils literal"><span class="pre">Tab</span></code> inserts spaces (in the Python
Shell window one tab), number depends on Indent width. Currently tabs
are restricted to four spaces due to Tcl/Tk limitations.</p>
<p>See also the indent/dedent region commands in the edit menu.</p>
@@ -394,25 +396,25 @@ two seconds) after a &#8216;.&#8217; or (in a string) an os.sep is typed. If aft
of those characters (plus zero or more other characters) a tab is typed
the ACW will open immediately if a possible continuation is found.</p>
<p>If there is only one possible completion for the characters entered, a
-<tt class="kbd docutils literal"><span class="pre">Tab</span></tt> will supply that completion without opening the ACW.</p>
+<code class="kbd docutils literal"><span class="pre">Tab</span></code> will supply that completion without opening the ACW.</p>
<p>&#8216;Show Completions&#8217; will force open a completions window, by default the
-<tt class="kbd docutils literal"><span class="pre">C-space</span></tt> will open a completions window. In an empty
+<code class="kbd docutils literal"><span class="pre">C-space</span></code> will open a completions window. In an empty
string, this will contain the files in the current directory. On a
blank line, it will contain the built-in and user-defined functions and
classes in the current name spaces, plus any modules imported. If some
characters have been entered, the ACW will attempt to be more specific.</p>
<p>If a string of characters is typed, the ACW selection will jump to the
-entry most closely matching those characters. Entering a <tt class="kbd docutils literal"><span class="pre">tab</span></tt> will
+entry most closely matching those characters. Entering a <code class="kbd docutils literal"><span class="pre">tab</span></code> will
cause the longest non-ambiguous match to be entered in the Editor window or
-Shell. Two <tt class="kbd docutils literal"><span class="pre">tab</span></tt> in a row will supply the current ACW selection, as
+Shell. Two <code class="kbd docutils literal"><span class="pre">tab</span></code> in a row will supply the current ACW selection, as
will return or a double click. Cursor keys, Page Up/Down, mouse selection,
and the scroll wheel all operate on the ACW.</p>
<p>&#8220;Hidden&#8221; attributes can be accessed by typing the beginning of hidden
name after a &#8216;.&#8217;, e.g. &#8216;_&#8217;. This allows access to modules with
-<tt class="docutils literal"><span class="pre">__all__</span></tt> set, or to class-private attributes.</p>
+<code class="docutils literal"><span class="pre">__all__</span></code> set, or to class-private attributes.</p>
<p>Completions and the &#8216;Expand Word&#8217; facility can save a lot of typing!</p>
<p>Completions are currently limited to those in the namespaces. Names in
-an Editor window which are not via <tt class="docutils literal"><span class="pre">__main__</span></tt> and <a class="reference internal" href="sys.html#sys.modules" title="sys.modules"><tt class="xref py py-data docutils literal"><span class="pre">sys.modules</span></tt></a> will
+an Editor window which are not via <code class="docutils literal"><span class="pre">__main__</span></code> and <a class="reference internal" href="sys.html#sys.modules" title="sys.modules"><code class="xref py py-data docutils literal"><span class="pre">sys.modules</span></code></a> will
not be found. Run the module once with your imports to correct this situation.
Note that IDLE itself places quite a few modules in sys.modules, so
much can be found by default, e.g. the re module.</p>
@@ -421,10 +423,10 @@ longer or disable the extension.</p>
</div>
<div class="section" id="calltips">
<h3>25.5.2.3. Calltips<a class="headerlink" href="#calltips" title="Permalink to this headline">¶</a></h3>
-<p>A calltip is shown when one types <tt class="kbd docutils literal"><span class="pre">(</span></tt> after the name of an <em>acccessible</em>
+<p>A calltip is shown when one types <code class="kbd docutils literal"><span class="pre">(</span></code> after the name of an <em>acccessible</em>
function. A name expression may include dots and subscripts. A calltip
remains until it is clicked, the cursor is moved out of the argument area,
-or <tt class="kbd docutils literal"><span class="pre">)</span></tt> is typed. When the cursor is in the argument part of a definition,
+or <code class="kbd docutils literal"><span class="pre">)</span></code> is typed. When the cursor is in the argument part of a definition,
the menu or shortcut display a calltip.</p>
<p>A calltip consists of the function signature and the first line of the
docstring. For builtins without an accessible signature, the calltip
@@ -433,11 +435,11 @@ details may change.</p>
<p>The set of <em>accessible</em> functions depends on what modules have been imported
into the user process, including those imported by Idle itself,
and what definitions have been run, all since the last restart.</p>
-<p>For example, restart the Shell and enter <tt class="docutils literal"><span class="pre">itertools.count(</span></tt>. A calltip
+<p>For example, restart the Shell and enter <code class="docutils literal"><span class="pre">itertools.count(</span></code>. A calltip
appears because Idle imports itertools into the user process for its own use.
-(This could change.) Enter <tt class="docutils literal"><span class="pre">turtle.write(</span></tt> and nothing appears. Idle does
+(This could change.) Enter <code class="docutils literal"><span class="pre">turtle.write(</span></code> and nothing appears. Idle does
not import turtle. The menu or shortcut do nothing either. Enter
-<tt class="docutils literal"><span class="pre">import</span> <span class="pre">turtle</span></tt> and then <tt class="docutils literal"><span class="pre">turtle.write(</span></tt> will work.</p>
+<code class="docutils literal"><span class="pre">import</span> <span class="pre">turtle</span></code> and then <code class="docutils literal"><span class="pre">turtle.write(</span></code> will work.</p>
<p>In an editor, import statements have no effect until one runs the file. One
might want to run a file after writing the import statements at the top,
or immediately run an existing file before editing.</p>
@@ -445,17 +447,17 @@ or immediately run an existing file before editing.</p>
<div class="section" id="python-shell-window">
<h3>25.5.2.4. Python Shell window<a class="headerlink" href="#python-shell-window" title="Permalink to this headline">¶</a></h3>
<ul>
-<li><p class="first"><tt class="kbd docutils literal"><span class="pre">C-c</span></tt> interrupts executing command</p>
+<li><p class="first"><code class="kbd docutils literal"><span class="pre">C-c</span></code> interrupts executing command</p>
</li>
-<li><p class="first"><tt class="kbd docutils literal"><span class="pre">C-d</span></tt> sends end-of-file; closes window if typed at a <tt class="docutils literal"><span class="pre">&gt;&gt;&gt;</span></tt> prompt</p>
+<li><p class="first"><code class="kbd docutils literal"><span class="pre">C-d</span></code> sends end-of-file; closes window if typed at a <code class="docutils literal"><span class="pre">&gt;&gt;&gt;</span></code> prompt</p>
</li>
-<li><p class="first"><tt class="kbd docutils literal"><span class="pre">Alt-/</span></tt> (Expand word) is also useful to reduce typing</p>
+<li><p class="first"><code class="kbd docutils literal"><span class="pre">Alt-/</span></code> (Expand word) is also useful to reduce typing</p>
<p>Command history</p>
<ul class="simple">
-<li><tt class="kbd docutils literal"><span class="pre">Alt-p</span></tt> retrieves previous command matching what you have typed. On
-OS X use <tt class="kbd docutils literal"><span class="pre">C-p</span></tt>.</li>
-<li><tt class="kbd docutils literal"><span class="pre">Alt-n</span></tt> retrieves next. On OS X use <tt class="kbd docutils literal"><span class="pre">C-n</span></tt>.</li>
-<li><tt class="kbd docutils literal"><span class="pre">Return</span></tt> while on any previous command retrieves that command</li>
+<li><code class="kbd docutils literal"><span class="pre">Alt-p</span></code> retrieves previous command matching what you have typed. On
+OS X use <code class="kbd docutils literal"><span class="pre">C-p</span></code>.</li>
+<li><code class="kbd docutils literal"><span class="pre">Alt-n</span></code> retrieves next. On OS X use <code class="kbd docutils literal"><span class="pre">C-n</span></code>.</li>
+<li><code class="kbd docutils literal"><span class="pre">Return</span></code> while on any previous command retrieves that command</li>
</ul>
</li>
</ul>
@@ -465,8 +467,8 @@ OS X use <tt class="kbd docutils literal"><span class="pre">C-p</span></tt>.</li
<p>Idle defaults to black on white text, but colors text with special meanings.
For the shell, these are shell output, shell error, user output, and
user error. For Python code, at the shell prompt or in an editor, these are
-keywords, builtin class and function names, names following <tt class="docutils literal"><span class="pre">class</span></tt> and
-<tt class="docutils literal"><span class="pre">def</span></tt>, strings, and comments. For any text window, these are the cursor (when
+keywords, builtin class and function names, names following <code class="docutils literal"><span class="pre">class</span></code> and
+<code class="docutils literal"><span class="pre">def</span></code>, strings, and comments. For any text window, these are the cursor (when
present), found text (when possible), and selected text.</p>
<p>Text coloring is done in the background, so uncolorized text is occasionally
visible. To change the color scheme, use the Configure IDLE dialog
@@ -476,15 +478,15 @@ text in popups and dialogs is not user-configurable.</p>
</div>
<div class="section" id="startup-and-code-execution">
<h2>25.5.3. Startup and code execution<a class="headerlink" href="#startup-and-code-execution" title="Permalink to this headline">¶</a></h2>
-<p>Upon startup with the <tt class="docutils literal"><span class="pre">-s</span></tt> option, IDLE will execute the file referenced by
-the environment variables <span class="target" id="index-5"></span><tt class="xref std std-envvar docutils literal"><span class="pre">IDLESTARTUP</span></tt> or <span class="target" id="index-6"></span><a class="reference internal" href="../using/cmdline.html#envvar-PYTHONSTARTUP"><tt class="xref std std-envvar docutils literal"><span class="pre">PYTHONSTARTUP</span></tt></a>.
-IDLE first checks for <tt class="docutils literal"><span class="pre">IDLESTARTUP</span></tt>; if <tt class="docutils literal"><span class="pre">IDLESTARTUP</span></tt> is present the file
-referenced is run. If <tt class="docutils literal"><span class="pre">IDLESTARTUP</span></tt> is not present, IDLE checks for
-<tt class="docutils literal"><span class="pre">PYTHONSTARTUP</span></tt>. Files referenced by these environment variables are
+<p>Upon startup with the <code class="docutils literal"><span class="pre">-s</span></code> option, IDLE will execute the file referenced by
+the environment variables <span class="target" id="index-5"></span><code class="xref std std-envvar docutils literal"><span class="pre">IDLESTARTUP</span></code> or <span class="target" id="index-6"></span><a class="reference internal" href="../using/cmdline.html#envvar-PYTHONSTARTUP"><code class="xref std std-envvar docutils literal"><span class="pre">PYTHONSTARTUP</span></code></a>.
+IDLE first checks for <code class="docutils literal"><span class="pre">IDLESTARTUP</span></code>; if <code class="docutils literal"><span class="pre">IDLESTARTUP</span></code> is present the file
+referenced is run. If <code class="docutils literal"><span class="pre">IDLESTARTUP</span></code> is not present, IDLE checks for
+<code class="docutils literal"><span class="pre">PYTHONSTARTUP</span></code>. Files referenced by these environment variables are
convenient places to store functions that are used frequently from the IDLE
shell, or for executing import statements to import common modules.</p>
-<p>In addition, <tt class="docutils literal"><span class="pre">Tk</span></tt> also loads a startup file if it is present. Note that the
-Tk file is loaded unconditionally. This additional file is <tt class="docutils literal"><span class="pre">.Idle.py</span></tt> and is
+<p>In addition, <code class="docutils literal"><span class="pre">Tk</span></code> also loads a startup file if it is present. Note that the
+Tk file is loaded unconditionally. This additional file is <code class="docutils literal"><span class="pre">.Idle.py</span></code> and is
looked for in the user&#8217;s home directory. Statements in this file will be
executed in the Tk namespace, so this file is not useful for importing
functions to be used from IDLE&#8217;s Python shell.</p>
@@ -505,25 +507,27 @@ functions to be used from IDLE&#8217;s Python shell.</p>
</div>
<p>If there are arguments:</p>
<ul class="simple">
-<li>If <tt class="docutils literal"><span class="pre">-</span></tt>, <tt class="docutils literal"><span class="pre">-c</span></tt>, or <tt class="docutils literal"><span class="pre">r</span></tt> is used, all arguments are placed in
-<tt class="docutils literal"><span class="pre">sys.argv[1:...]</span></tt> and <tt class="docutils literal"><span class="pre">sys.argv[0]</span></tt> is set to <tt class="docutils literal"><span class="pre">''</span></tt>, <tt class="docutils literal"><span class="pre">'-c'</span></tt>,
-or <tt class="docutils literal"><span class="pre">'-r'</span></tt>. No editor window is opened, even if that is the default
+<li>If <code class="docutils literal"><span class="pre">-</span></code>, <code class="docutils literal"><span class="pre">-c</span></code>, or <code class="docutils literal"><span class="pre">r</span></code> is used, all arguments are placed in
+<code class="docutils literal"><span class="pre">sys.argv[1:...]</span></code> and <code class="docutils literal"><span class="pre">sys.argv[0]</span></code> is set to <code class="docutils literal"><span class="pre">''</span></code>, <code class="docutils literal"><span class="pre">'-c'</span></code>,
+or <code class="docutils literal"><span class="pre">'-r'</span></code>. No editor window is opened, even if that is the default
set in the Options dialog.</li>
<li>Otherwise, arguments are files opened for editing and
-<tt class="docutils literal"><span class="pre">sys.argv</span></tt> reflects the arguments passed to IDLE itself.</li>
+<code class="docutils literal"><span class="pre">sys.argv</span></code> reflects the arguments passed to IDLE itself.</li>
</ul>
</div>
<div class="section" id="idle-console-differences">
<h3>25.5.3.2. IDLE-console differences<a class="headerlink" href="#idle-console-differences" title="Permalink to this headline">¶</a></h3>
<p>As much as possible, the result of executing Python code with IDLE is the
same as executing the same code in a console window. However, the different
-interface and operation occasionally affects results.</p>
-<p>For instance, IDLE normally executes user code in a separate process from
-the IDLE GUI itself. The IDLE versions of sys.stdin, .stdout, and .stderr in the
-execution process get input from and send output to the GUI process,
-which keeps control of the keyboard and screen. This is normally transparent,
-but code that access these object will see different attribute values.
-Also, functions that directly access the keyboard and screen will not work.</p>
+interface and operation occasionally affects visible results. For instance,
+<code class="docutils literal"><span class="pre">sys.modules</span></code> starts with more entries.</p>
+<p>IDLE also replaces <code class="docutils literal"><span class="pre">sys.stdin</span></code>, <code class="docutils literal"><span class="pre">sys.stdout</span></code>, and <code class="docutils literal"><span class="pre">sys.stderr</span></code> with
+objects that get input from and send output to the Shell window.
+When this window has the focus, it controls the keyboard and screen.
+This is normally transparent, but functions that directly access the keyboard
+and screen will not work. If <code class="docutils literal"><span class="pre">sys</span></code> is reset with <code class="docutils literal"><span class="pre">importlib.reload(sys)</span></code>,
+IDLE&#8217;s changes are lost and things li ke <code class="docutils literal"><span class="pre">input</span></code>, <code class="docutils literal"><span class="pre">raw_input</span></code>, and
+<code class="docutils literal"><span class="pre">print</span></code> will not work correctly.</p>
<p>With IDLE&#8217;s Shell, one enters, edits, and recalls complete statements.
Some consoles only work with a single physical line at a time.</p>
</div>
@@ -595,7 +599,7 @@ are currently:</p>
</div>
</div>
</div>
- <div class="sphinxsidebar">
+ <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="../contents.html">Table Of Contents</a></h3>
<ul>
@@ -639,7 +643,7 @@ are currently:</p>
<h4>Previous topic</h4>
<p class="topless"><a href="tkinter.scrolledtext.html"
- title="previous chapter">25.4. <tt class="docutils literal"><span class="pre">tkinter.scrolledtext</span></tt> &#8212; Scrolled Text Widget</a></p>
+ title="previous chapter">25.4. <code class="docutils literal"><span class="pre">tkinter.scrolledtext</span></code> &#8212; Scrolled Text Widget</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="othergui.html"
title="next chapter">25.6. Other Graphical User Interface Packages</a></p>
@@ -650,7 +654,7 @@ are currently:</p>
rel="nofollow">Show Source</a></li>
</ul>
-<div id="searchbox" style="display: none">
+<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
<input type="text" name="q" />
@@ -667,7 +671,7 @@ are currently:</p>
</div>
<div class="clearer"></div>
</div>
- <div class="related">
+ <div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
@@ -686,23 +690,23 @@ are currently:</p>
style="vertical-align: middle; margin-top: -1px"/></li>
<li><a href="https://www.python.org/">Python</a> &raquo;</li>
<li>
- <a href="../index.html">3.4.3 Documentation</a> &raquo;
+ <a href="../index.html">3.5.1 Documentation</a> &raquo;
</li>
- <li><a href="index.html" >The Python Standard Library</a> &raquo;</li>
- <li><a href="tk.html" >25. Graphical User Interfaces with Tk</a> &raquo;</li>
+ <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &raquo;</li>
+ <li class="nav-item nav-item-2"><a href="tk.html" >25. Graphical User Interfaces with Tk</a> &raquo;</li>
</ul>
</div>
<div class="footer">
- &copy; <a href="../copyright.html">Copyright</a> 1990-2015, Python Software Foundation.
+ &copy; <a href="../copyright.html">Copyright</a> 2001-2016, Python Software Foundation.
<br />
The Python Software Foundation is a non-profit corporation.
<a href="https://www.python.org/psf/donations/">Please donate.</a>
<br />
- Last updated on Oct 13, 2015.
+ Last updated on Jun 11, 2016.
<a href="../bugs.html">Found a bug</a>?
<br />
- Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.2.3.
+ Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.3.3.
</div>
</body>
diff --git a/Lib/idlelib/help.py b/Lib/idlelib/help.py
index b31596c2eb..d0c59c5fcf 100644
--- a/Lib/idlelib/help.py
+++ b/Lib/idlelib/help.py
@@ -11,7 +11,7 @@ Help => IDLE Help: Display help.html with proper formatting.
Doc/library/idle.rst (Sphinx)=> Doc/build/html/library/idle.html
(help.copy_strip)=> Lib/idlelib/help.html
-HelpParser - Parse help.html and and render to tk Text.
+HelpParser - Parse help.html and render to tk Text.
HelpText - Display formatted help.html.
@@ -45,6 +45,8 @@ class HelpParser(HTMLParser):
The overridden handle_xyz methods handle a subset of html tags.
The supplied text should have the needed tag configurations.
The behavior for unsupported tags, such as table, is undefined.
+ If the tags generated by Sphinx change, this class, especially
+ the handle_starttag and handle_endtags methods, might have to also.
"""
def __init__(self, text):
HTMLParser.__init__(self, convert_charrefs=True)
@@ -226,7 +228,28 @@ class HelpWindow(Toplevel):
def copy_strip():
- "Copy idle.html to idlelib/help.html, stripping trailing whitespace."
+ """Copy idle.html to idlelib/help.html, stripping trailing whitespace.
+
+ Files with trailing whitespace cannot be pushed to the hg cpython
+ repository. For 3.x (on Windows), help.html is generated, after
+ editing idle.rst in the earliest maintenance version, with
+ sphinx-build -bhtml . build/html
+ python_d.exe -c "from idlelib.help import copy_strip; copy_strip()"
+ After refreshing TortoiseHG workshop to generate a diff,
+ check both the diff and displayed text. Push the diff along with
+ the idle.rst change and merge both into default (or an intermediate
+ maintenance version).
+
+ When the 'earlist' version gets its final maintenance release,
+ do an update as described above, without editing idle.rst, to
+ rebase help.html on the next version of idle.rst. Do not worry
+ about version changes as version is not displayed. Examine other
+ changes and the result of Help -> IDLE Help.
+
+ If maintenance and default versions of idle.rst diverge, and
+ merging does not go smoothly, then consider generating
+ separate help.html files from separate idle.htmls.
+ """
src = join(abspath(dirname(dirname(dirname(__file__)))),
'Doc', 'build', 'html', 'library', 'idle.html')
dst = join(abspath(dirname(__file__)), 'help.html')
diff --git a/Lib/idlelib/idle_test/README.txt b/Lib/idlelib/idle_test/README.txt
index 2339926ef3..dc7a28697c 100644
--- a/Lib/idlelib/idle_test/README.txt
+++ b/Lib/idlelib/idle_test/README.txt
@@ -2,12 +2,12 @@ README FOR IDLE TESTS IN IDLELIB.IDLE_TEST
0. Quick Start
-Automated unit tests were added in 2.7 for Python 2.x and 3.3 for Python 3.x.
+Automated unit tests were added in 3.3 for Python 3.x.
To run the tests from a command line:
python -m test.test_idle
-Human-mediated tests were added later in 2.7 and in 3.4.
+Human-mediated tests were added later in 3.4.
python -m idlelib.idle_test.htest
@@ -15,9 +15,9 @@ python -m idlelib.idle_test.htest
1. Test Files
The idle directory, idlelib, has over 60 xyz.py files. The idle_test
-subdirectory should contain a test_xyz.py for each, where 'xyz' is lowercased
-even if xyz.py is not. Here is a possible template, with the blanks after after
-'.' and 'as', and before and after '_' to be filled in.
+subdirectory should contain a test_xyz.py for each, where 'xyz' is
+lowercased even if xyz.py is not. Here is a possible template, with the
+blanks after '.' and 'as', and before and after '_' to be filled in.
import unittest
from test.support import requires
@@ -30,9 +30,9 @@ class _Test(unittest.TestCase):
if __name__ == '__main__':
unittest.main(verbosity=2)
-Add the following at the end of xyy.py, with the appropriate name added after
-'test_'. Some files already have something like this for htest. If so, insert
-the import and unittest.main lines before the htest lines.
+Add the following at the end of xyy.py, with the appropriate name added
+after 'test_'. Some files already have something like this for htest.
+If so, insert the import and unittest.main lines before the htest lines.
if __name__ == "__main__":
import unittest
@@ -42,64 +42,82 @@ if __name__ == "__main__":
2. GUI Tests
-When run as part of the Python test suite, Idle gui tests need to run
-test.support.requires('gui') (test.test_support in 2.7). A test is a gui test
-if it creates a Tk root or master object either directly or indirectly by
-instantiating a tkinter or idle class. For the benefit of test processes that
-either have no graphical environment available or are not allowed to use it, gui
-tests must be 'guarded' by "requires('gui')" in a setUp function or method.
-This will typically be setUpClass.
+When run as part of the Python test suite, Idle GUI tests need to run
+test.support.requires('gui'). A test is a GUI test if it creates a
+tkinter.Tk root or master object either directly or indirectly by
+instantiating a tkinter or idle class. GUI tests cannot run in test
+processes that either have no graphical environment available or are not
+allowed to use it.
-To avoid interfering with other gui tests, all gui objects must be destroyed and
-deleted by the end of the test. Widgets, such as a Tk root, created in a setUpX
-function, should be destroyed in the corresponding tearDownX. Module and class
-widget attributes should also be deleted..
+To guard a module consisting entirely of GUI tests, start with
+
+from test.support import requires
+requires('gui')
+
+To guard a test class, put "requires('gui')" in its setUpClass function.
+
+To avoid interfering with other GUI tests, all GUI objects must be destroyed and
+deleted by the end of the test. The Tk root created in a setUpX function should
+be destroyed in the corresponding tearDownX and the module or class attribute
+deleted. Others widgets should descend from the single root and the attributes
+deleted BEFORE root is destroyed. See https://bugs.python.org/issue20567.
@classmethod
def setUpClass(cls):
requires('gui')
cls.root = tk.Tk()
+ cls.text = tk.Text(root)
@classmethod
def tearDownClass(cls):
+ del cls.text
+ cls.root.update_idletasks()
cls.root.destroy()
del cls.root
+The update_idletasks call is sometimes needed to prevent the following warning
+either when running a test alone or as part of the test suite (#27196).
+ can't invoke "event" command: application has been destroyed
+ ...
+ "ttk::ThemeChanged"
Requires('gui') causes the test(s) it guards to be skipped if any of
-a few conditions are met:
-
- - The tests are being run by regrtest.py, and it was started without enabling
- the "gui" resource with the "-u" command line option.
-
- - The tests are being run on Windows by a service that is not allowed to
- interact with the graphical environment.
-
- - The tests are being run on Mac OSX in a process that cannot make a window
- manager connection.
-
+these conditions are met:
+
+ - The tests are being run by regrtest.py, and it was started without
+ enabling the "gui" resource with the "-u" command line option.
+
+ - The tests are being run on Windows by a service that is not allowed
+ to interact with the graphical environment.
+
+ - The tests are being run on Linux and X Windows is not available.
+
+ - The tests are being run on Mac OSX in a process that cannot make a
+ window manager connection.
+
- tkinter.Tk cannot be successfully instantiated for some reason.
-
+
- test.support.use_resources has been set by something other than
regrtest.py and does not contain "gui".
-
-Tests of non-gui operations should avoid creating tk widgets. Incidental uses of
-tk variables and messageboxes can be replaced by the mock classes in
-idle_test/mock_tk.py. The mock text handles some uses of the tk Text widget.
+
+Tests of non-GUI operations should avoid creating tk widgets. Incidental
+uses of tk variables and messageboxes can be replaced by the mock
+classes in idle_test/mock_tk.py. The mock text handles some uses of the
+tk Text widget.
3. Running Unit Tests
Assume that xyz.py and test_xyz.py both end with a unittest.main() call.
-Running either from an Idle editor runs all tests in the test_xyz file with the
-version of Python running Idle. Test output appears in the Shell window. The
-'verbosity=2' option lists all test methods in the file, which is appropriate
-when developing tests. The 'exit=False' option is needed in xyx.py files when an
-htest follows.
+Running either from an Idle editor runs all tests in the test_xyz file
+with the version of Python running Idle. Test output appears in the
+Shell window. The 'verbosity=2' option lists all test methods in the
+file, which is appropriate when developing tests. The 'exit=False'
+option is needed in xyx.py files when an htest follows.
The following command lines also run all test methods, including
-gui tests, in test_xyz.py. (Both '-m idlelib' and '-m idlelib.idle' start
-Idle and so cannot run tests.)
+GUI tests, in test_xyz.py. (Both '-m idlelib' and '-m idlelib.idle'
+start Idle and so cannot run tests.)
python -m idlelib.xyz
python -m idlelib.idle_test.test_xyz
@@ -109,35 +127,35 @@ The following runs all idle_test/test_*.py tests interactively.
>>> import unittest
>>> unittest.main('idlelib.idle_test', verbosity=2)
-The following run all Idle tests at a command line. Option '-v' is the same as
-'verbosity=2'. (For 2.7, replace 'test' in the second line with
-'test.regrtest'.)
+The following run all Idle tests at a command line. Option '-v' is the
+same as 'verbosity=2'.
python -m unittest -v idlelib.idle_test
python -m test -v -ugui test_idle
python -m test.test_idle
-The idle tests are 'discovered' by idlelib.idle_test.__init__.load_tests,
-which is also imported into test.test_idle. Normally, neither file should be
-changed when working on individual test modules. The third command runs
-unittest indirectly through regrtest. The same happens when the entire test
-suite is run with 'python -m test'. So that command must work for buildbots
-to stay green. Idle tests must not disturb the environment in a way that
-makes other tests fail (issue 18081).
+The idle tests are 'discovered' by
+idlelib.idle_test.__init__.load_tests, which is also imported into
+test.test_idle. Normally, neither file should be changed when working on
+individual test modules. The third command runs unittest indirectly
+through regrtest. The same happens when the entire test suite is run
+with 'python -m test'. So that command must work for buildbots to stay
+green. Idle tests must not disturb the environment in a way that makes
+other tests fail (issue 18081).
-To run an individual Testcase or test method, extend the dotted name given to
-unittest on the command line.
+To run an individual Testcase or test method, extend the dotted name
+given to unittest on the command line.
python -m unittest -v idlelib.idle_test.test_xyz.Test_case.test_meth
4. Human-mediated Tests
-Human-mediated tests are widget tests that cannot be automated but need human
-verification. They are contained in idlelib/idle_test/htest.py, which has
-instructions. (Some modules need an auxiliary function, identified with # htest
-# on the header line.) The set is about complete, though some tests need
-improvement. To run all htests, run the htest file from an editor or from the
-command line with:
+Human-mediated tests are widget tests that cannot be automated but need
+human verification. They are contained in idlelib/idle_test/htest.py,
+which has instructions. (Some modules need an auxiliary function,
+identified with "# htest # on the header line.) The set is about
+complete, though some tests need improvement. To run all htests, run the
+htest file from an editor or from the command line with:
python -m idlelib.idle_test.htest
diff --git a/Lib/idlelib/idle_test/__init__.py b/Lib/idlelib/idle_test/__init__.py
index 1bc953643e..845c92d372 100644
--- a/Lib/idlelib/idle_test/__init__.py
+++ b/Lib/idlelib/idle_test/__init__.py
@@ -1,3 +1,9 @@
+'''idlelib.idle_test is a private implementation of test.test_idle,
+which tests the IDLE application as part of the stdlib test suite.
+Run IDLE tests alone with "python -m test.test_idle".
+This package and its contained modules are subject to change and
+any direct use is at your own risk.
+'''
from os.path import dirname
def load_tests(loader, standard_tests, pattern):
diff --git a/Lib/idlelib/idle_test/htest.py b/Lib/idlelib/idle_test/htest.py
index 3e24518a0f..58e62cb4e2 100644
--- a/Lib/idlelib/idle_test/htest.py
+++ b/Lib/idlelib/idle_test/htest.py
@@ -192,7 +192,10 @@ _io_binding_spec = {
'msg': "Test the following bindings.\n"
"<Control-o> to open file from dialog.\n"
"Edit the file.\n"
+ "<Control-p> to print the file.\n"
"<Control-s> to save the file.\n"
+ "<Alt-s> to save-as another file.\n"
+ "<Control-c> to save-copy-as another file.\n"
"Check that changes were saved by opening the file elsewhere."
}
diff --git a/Lib/idlelib/idle_test/mock_tk.py b/Lib/idlelib/idle_test/mock_tk.py
index 86fe84884f..6e351297d7 100644
--- a/Lib/idlelib/idle_test/mock_tk.py
+++ b/Lib/idlelib/idle_test/mock_tk.py
@@ -296,3 +296,8 @@ class Text:
def bind(sequence=None, func=None, add=None):
"Bind to this widget at event sequence a call to function func."
pass
+
+class Entry:
+ "Mock for tkinter.Entry."
+ def focus_set(self):
+ pass
diff --git a/Lib/idlelib/idle_test/test_autocomplete.py b/Lib/idlelib/idle_test/test_autocomplete.py
index 3a2192e8af..e4493d1205 100644
--- a/Lib/idlelib/idle_test/test_autocomplete.py
+++ b/Lib/idlelib/idle_test/test_autocomplete.py
@@ -33,9 +33,8 @@ class AutoCompleteTest(unittest.TestCase):
@classmethod
def tearDownClass(cls):
+ del cls.editor, cls.text
cls.root.destroy()
- del cls.text
- del cls.editor
del cls.root
def setUp(self):
diff --git a/Lib/idlelib/idle_test/test_autoexpand.py b/Lib/idlelib/idle_test/test_autoexpand.py
index 7ca941ec29..d2a3156dca 100644
--- a/Lib/idlelib/idle_test/test_autoexpand.py
+++ b/Lib/idlelib/idle_test/test_autoexpand.py
@@ -25,10 +25,10 @@ class AutoExpandTest(unittest.TestCase):
@classmethod
def tearDownClass(cls):
+ del cls.text, cls.auto_expand
if hasattr(cls, 'tk'):
cls.tk.destroy()
del cls.tk
- del cls.text, cls.auto_expand
def tearDown(self):
self.text.delete('1.0', 'end')
diff --git a/Lib/idlelib/idle_test/test_config_help.py b/Lib/idlelib/idle_test/test_config_help.py
new file mode 100644
index 0000000000..664f8edc62
--- /dev/null
+++ b/Lib/idlelib/idle_test/test_config_help.py
@@ -0,0 +1,106 @@
+"""Unittests for idlelib.configHelpSourceEdit"""
+import unittest
+from idlelib.idle_test.mock_tk import Var, Mbox, Entry
+from idlelib import configHelpSourceEdit as help_dialog_module
+
+help_dialog = help_dialog_module.GetHelpSourceDialog
+
+
+class Dummy_help_dialog:
+ # Mock for testing the following methods of help_dialog
+ menu_ok = help_dialog.menu_ok
+ path_ok = help_dialog.path_ok
+ ok = help_dialog.ok
+ cancel = help_dialog.cancel
+ # Attributes, constant or variable, needed for tests
+ menu = Var()
+ entryMenu = Entry()
+ path = Var()
+ entryPath = Entry()
+ result = None
+ destroyed = False
+
+ def destroy(self):
+ self.destroyed = True
+
+
+# menu_ok and path_ok call Mbox.showerror if menu and path are not ok.
+orig_mbox = help_dialog_module.tkMessageBox
+showerror = Mbox.showerror
+
+
+class ConfigHelpTest(unittest.TestCase):
+ dialog = Dummy_help_dialog()
+
+ @classmethod
+ def setUpClass(cls):
+ help_dialog_module.tkMessageBox = Mbox
+
+ @classmethod
+ def tearDownClass(cls):
+ help_dialog_module.tkMessageBox = orig_mbox
+
+ def test_blank_menu(self):
+ self.dialog.menu.set('')
+ self.assertFalse(self.dialog.menu_ok())
+ self.assertEqual(showerror.title, 'Menu Item Error')
+ self.assertIn('No', showerror.message)
+
+ def test_long_menu(self):
+ self.dialog.menu.set('hello' * 10)
+ self.assertFalse(self.dialog.menu_ok())
+ self.assertEqual(showerror.title, 'Menu Item Error')
+ self.assertIn('long', showerror.message)
+
+ def test_good_menu(self):
+ self.dialog.menu.set('help')
+ showerror.title = 'No Error' # should not be called
+ self.assertTrue(self.dialog.menu_ok())
+ self.assertEqual(showerror.title, 'No Error')
+
+ def test_blank_path(self):
+ self.dialog.path.set('')
+ self.assertFalse(self.dialog.path_ok())
+ self.assertEqual(showerror.title, 'File Path Error')
+ self.assertIn('No', showerror.message)
+
+ def test_invalid_file_path(self):
+ self.dialog.path.set('foobar' * 100)
+ self.assertFalse(self.dialog.path_ok())
+ self.assertEqual(showerror.title, 'File Path Error')
+ self.assertIn('not exist', showerror.message)
+
+ def test_invalid_url_path(self):
+ self.dialog.path.set('ww.foobar.com')
+ self.assertFalse(self.dialog.path_ok())
+ self.assertEqual(showerror.title, 'File Path Error')
+ self.assertIn('not exist', showerror.message)
+
+ self.dialog.path.set('htt.foobar.com')
+ self.assertFalse(self.dialog.path_ok())
+ self.assertEqual(showerror.title, 'File Path Error')
+ self.assertIn('not exist', showerror.message)
+
+ def test_good_path(self):
+ self.dialog.path.set('https://docs.python.org')
+ showerror.title = 'No Error' # should not be called
+ self.assertTrue(self.dialog.path_ok())
+ self.assertEqual(showerror.title, 'No Error')
+
+ def test_ok(self):
+ self.dialog.destroyed = False
+ self.dialog.menu.set('help')
+ self.dialog.path.set('https://docs.python.org')
+ self.dialog.ok()
+ self.assertEqual(self.dialog.result, ('help',
+ 'https://docs.python.org'))
+ self.assertTrue(self.dialog.destroyed)
+
+ def test_cancel(self):
+ self.dialog.destroyed = False
+ self.dialog.cancel()
+ self.assertEqual(self.dialog.result, None)
+ self.assertTrue(self.dialog.destroyed)
+
+if __name__ == '__main__':
+ unittest.main(verbosity=2, exit=False)
diff --git a/Lib/idlelib/idle_test/test_configdialog.py b/Lib/idlelib/idle_test/test_configdialog.py
index 68831236b7..b063601b27 100644
--- a/Lib/idlelib/idle_test/test_configdialog.py
+++ b/Lib/idlelib/idle_test/test_configdialog.py
@@ -1,31 +1,31 @@
-'''Unittests for idlelib/configHandler.py
-
-Coverage: 46% just by creating dialog. The other half is change code.
+'''Test idlelib.configDialog.
+Coverage: 46% just by creating dialog.
+The other half is code for working with user customizations.
'''
-import unittest
+from idlelib.configDialog import ConfigDialog # always test import
from test.support import requires
+requires('gui')
from tkinter import Tk
-from idlelib.configDialog import ConfigDialog
-from idlelib.macosxSupport import _initializeTkVariantTests
-
+import unittest
+from idlelib import macosxSupport as macosx
class ConfigDialogTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
- requires('gui')
cls.root = Tk()
- _initializeTkVariantTests(cls.root)
+ macosx._initializeTkVariantTests(cls.root)
@classmethod
def tearDownClass(cls):
+ cls.root.update_idletasks()
cls.root.destroy()
del cls.root
def test_dialog(self):
- d=ConfigDialog(self.root, 'Test', _utest=True)
- d.destroy()
+ d = ConfigDialog(self.root, 'Test', _utest=True)
+ d.remove_var_callbacks()
if __name__ == '__main__':
diff --git a/Lib/idlelib/idle_test/test_delegator.py b/Lib/idlelib/idle_test/test_delegator.py
index b8ae5eeefe..1f0baa9c0d 100644
--- a/Lib/idlelib/idle_test/test_delegator.py
+++ b/Lib/idlelib/idle_test/test_delegator.py
@@ -4,34 +4,37 @@ from idlelib.Delegator import Delegator
class DelegatorTest(unittest.TestCase):
def test_mydel(self):
- # test a simple use scenario
+ # Test a simple use scenario.
- # initialize
+ # Initialize an int delegator.
mydel = Delegator(int)
self.assertIs(mydel.delegate, int)
self.assertEqual(mydel._Delegator__cache, set())
-
- # add an attribute:
+ # Trying to access a non-attribute of int fails.
self.assertRaises(AttributeError, mydel.__getattr__, 'xyz')
+
+ # Add real int attribute 'bit_length' by accessing it.
bl = mydel.bit_length
self.assertIs(bl, int.bit_length)
self.assertIs(mydel.__dict__['bit_length'], int.bit_length)
self.assertEqual(mydel._Delegator__cache, {'bit_length'})
- # add a second attribute
+ # Add attribute 'numerator'.
mydel.numerator
self.assertEqual(mydel._Delegator__cache, {'bit_length', 'numerator'})
- # delete the second (which, however, leaves it in the name cache)
+ # Delete 'numerator'.
del mydel.numerator
self.assertNotIn('numerator', mydel.__dict__)
- self.assertIn('numerator', mydel._Delegator__cache)
+ # The current implementation leaves it in the name cache.
+ # self.assertIn('numerator', mydel._Delegator__cache)
+ # However, this is not required and not part of the specification
- # reset by calling .setdelegate, which calls .resetcache
- mydel.setdelegate(float)
- self.assertIs(mydel.delegate, float)
+ # Change delegate to float, first resetting the attributes.
+ mydel.setdelegate(float) # calls resetcache
self.assertNotIn('bit_length', mydel.__dict__)
self.assertEqual(mydel._Delegator__cache, set())
+ self.assertIs(mydel.delegate, float)
if __name__ == '__main__':
unittest.main(verbosity=2, exit=2)
diff --git a/Lib/idlelib/idle_test/test_editmenu.py b/Lib/idlelib/idle_test/test_editmenu.py
new file mode 100644
index 0000000000..50317a97e5
--- /dev/null
+++ b/Lib/idlelib/idle_test/test_editmenu.py
@@ -0,0 +1,71 @@
+'''Test (selected) IDLE Edit menu items.
+
+Edit modules have their own test files files
+'''
+from test.support import requires
+requires('gui')
+import tkinter as tk
+import unittest
+from idlelib import PyShell
+
+class PasteTest(unittest.TestCase):
+ '''Test pasting into widgets that allow pasting.
+
+ On X11, replacing selections requires tk fix.
+ '''
+ @classmethod
+ def setUpClass(cls):
+ cls.root = root = tk.Tk()
+ PyShell.fix_x11_paste(root)
+ cls.text = tk.Text(root)
+ cls.entry = tk.Entry(root)
+ cls.spin = tk.Spinbox(root)
+ root.clipboard_clear()
+ root.clipboard_append('two')
+
+ @classmethod
+ def tearDownClass(cls):
+ del cls.text, cls.entry, cls.spin
+ cls.root.clipboard_clear()
+ cls.root.update_idletasks()
+ cls.root.destroy()
+ del cls.root
+
+ def test_paste_text(self):
+ "Test pasting into text with and without a selection."
+ text = self.text
+ for tag, ans in ('', 'onetwo\n'), ('sel', 'two\n'):
+ with self.subTest(tag=tag, ans=ans):
+ text.delete('1.0', 'end')
+ text.insert('1.0', 'one', tag)
+ text.event_generate('<<Paste>>')
+ self.assertEqual(text.get('1.0', 'end'), ans)
+
+ def test_paste_entry(self):
+ "Test pasting into an entry with and without a selection."
+ # On 3.6, generated <<Paste>> fails without empty select range
+ # for 'no selection'. Live widget works fine.
+ entry = self.entry
+ for end, ans in (0, 'onetwo'), ('end', 'two'):
+ with self.subTest(entry=entry, end=end, ans=ans):
+ entry.delete(0, 'end')
+ entry.insert(0, 'one')
+ entry.select_range(0, end) # see note
+ entry.event_generate('<<Paste>>')
+ self.assertEqual(entry.get(), ans)
+
+ def test_paste_spin(self):
+ "Test pasting into a spinbox with and without a selection."
+ # See note above for entry.
+ spin = self.spin
+ for end, ans in (0, 'onetwo'), ('end', 'two'):
+ with self.subTest(end=end, ans=ans):
+ spin.delete(0, 'end')
+ spin.insert(0, 'one')
+ spin.selection('range', 0, end) # see note
+ spin.event_generate('<<Paste>>')
+ self.assertEqual(spin.get(), ans)
+
+
+if __name__ == '__main__':
+ unittest.main(verbosity=2)
diff --git a/Lib/idlelib/idle_test/test_formatparagraph.py b/Lib/idlelib/idle_test/test_formatparagraph.py
index f6039e6ab4..e5561d84a6 100644
--- a/Lib/idlelib/idle_test/test_formatparagraph.py
+++ b/Lib/idlelib/idle_test/test_formatparagraph.py
@@ -276,10 +276,9 @@ class FormatEventTest(unittest.TestCase):
@classmethod
def tearDownClass(cls):
+ del cls.text, cls.formatter
cls.root.destroy()
del cls.root
- del cls.text
- del cls.formatter
def test_short_line(self):
self.text.insert('1.0', "Short line\n")
diff --git a/Lib/idlelib/idle_test/test_parenmatch.py b/Lib/idlelib/idle_test/test_parenmatch.py
index 9aba4bec93..95cc22cf68 100644
--- a/Lib/idlelib/idle_test/test_parenmatch.py
+++ b/Lib/idlelib/idle_test/test_parenmatch.py
@@ -1,10 +1,13 @@
-"""Test idlelib.ParenMatch."""
-# This must currently be a gui test because ParenMatch methods use
-# several text methods not defined on idlelib.idle_test.mock_tk.Text.
+'''Test idlelib.ParenMatch.
+
+This must currently be a gui test because ParenMatch methods use
+several text methods not defined on idlelib.idle_test.mock_tk.Text.
+'''
+from test.support import requires
+requires('gui')
import unittest
from unittest.mock import Mock
-from test.support import requires
from tkinter import Tk, Text
from idlelib.ParenMatch import ParenMatch
@@ -20,7 +23,6 @@ class ParenMatchTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
- requires('gui')
cls.root = Tk()
cls.text = Text(cls.root)
cls.editwin = DummyEditwin(cls.text)
@@ -29,6 +31,7 @@ class ParenMatchTest(unittest.TestCase):
@classmethod
def tearDownClass(cls):
del cls.text, cls.editwin
+ cls.root.update_idletasks()
cls.root.destroy()
del cls.root
diff --git a/Lib/idlelib/idle_test/test_percolator.py b/Lib/idlelib/idle_test/test_percolator.py
new file mode 100644
index 0000000000..4c0a7ad2bd
--- /dev/null
+++ b/Lib/idlelib/idle_test/test_percolator.py
@@ -0,0 +1,118 @@
+'''Test Percolator'''
+from test.support import requires
+requires('gui')
+
+import unittest
+from tkinter import Text, Tk, END
+from idlelib.Percolator import Percolator, Delegator
+
+
+class MyFilter(Delegator):
+ def __init__(self):
+ Delegator.__init__(self, None)
+
+ def insert(self, *args):
+ self.insert_called_with = args
+ self.delegate.insert(*args)
+
+ def delete(self, *args):
+ self.delete_called_with = args
+ self.delegate.delete(*args)
+
+ def uppercase_insert(self, index, chars, tags=None):
+ chars = chars.upper()
+ self.delegate.insert(index, chars)
+
+ def lowercase_insert(self, index, chars, tags=None):
+ chars = chars.lower()
+ self.delegate.insert(index, chars)
+
+ def dont_insert(self, index, chars, tags=None):
+ pass
+
+
+class PercolatorTest(unittest.TestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ cls.root = Tk()
+ cls.text = Text(cls.root)
+
+ @classmethod
+ def tearDownClass(cls):
+ del cls.text
+ cls.root.destroy()
+ del cls.root
+
+ def setUp(self):
+ self.percolator = Percolator(self.text)
+ self.filter_one = MyFilter()
+ self.filter_two = MyFilter()
+ self.percolator.insertfilter(self.filter_one)
+ self.percolator.insertfilter(self.filter_two)
+
+ def tearDown(self):
+ self.percolator.close()
+ self.text.delete('1.0', END)
+
+ def test_insertfilter(self):
+ self.assertIsNotNone(self.filter_one.delegate)
+ self.assertEqual(self.percolator.top, self.filter_two)
+ self.assertEqual(self.filter_two.delegate, self.filter_one)
+ self.assertEqual(self.filter_one.delegate, self.percolator.bottom)
+
+ def test_removefilter(self):
+ filter_three = MyFilter()
+ self.percolator.removefilter(self.filter_two)
+ self.assertEqual(self.percolator.top, self.filter_one)
+ self.assertIsNone(self.filter_two.delegate)
+
+ filter_three = MyFilter()
+ self.percolator.insertfilter(self.filter_two)
+ self.percolator.insertfilter(filter_three)
+ self.percolator.removefilter(self.filter_one)
+ self.assertEqual(self.percolator.top, filter_three)
+ self.assertEqual(filter_three.delegate, self.filter_two)
+ self.assertEqual(self.filter_two.delegate, self.percolator.bottom)
+ self.assertIsNone(self.filter_one.delegate)
+
+ def test_insert(self):
+ self.text.insert('insert', 'foo')
+ self.assertEqual(self.text.get('1.0', END), 'foo\n')
+ self.assertTupleEqual(self.filter_one.insert_called_with,
+ ('insert', 'foo', None))
+
+ def test_modify_insert(self):
+ self.filter_one.insert = self.filter_one.uppercase_insert
+ self.text.insert('insert', 'bAr')
+ self.assertEqual(self.text.get('1.0', END), 'BAR\n')
+
+ def test_modify_chain_insert(self):
+ filter_three = MyFilter()
+ self.percolator.insertfilter(filter_three)
+ self.filter_two.insert = self.filter_two.uppercase_insert
+ self.filter_one.insert = self.filter_one.lowercase_insert
+ self.text.insert('insert', 'BaR')
+ self.assertEqual(self.text.get('1.0', END), 'bar\n')
+
+ def test_dont_insert(self):
+ self.filter_one.insert = self.filter_one.dont_insert
+ self.text.insert('insert', 'foo bar')
+ self.assertEqual(self.text.get('1.0', END), '\n')
+ self.filter_one.insert = self.filter_one.dont_insert
+ self.text.insert('insert', 'foo bar')
+ self.assertEqual(self.text.get('1.0', END), '\n')
+
+ def test_without_filter(self):
+ self.text.insert('insert', 'hello')
+ self.assertEqual(self.text.get('1.0', 'end'), 'hello\n')
+
+ def test_delete(self):
+ self.text.insert('insert', 'foo')
+ self.text.delete('1.0', '1.2')
+ self.assertEqual(self.text.get('1.0', END), 'o\n')
+ self.assertTupleEqual(self.filter_one.delete_called_with,
+ ('1.0', '1.2'))
+
+if __name__ == '__main__':
+ unittest.main(verbosity=2)
diff --git a/Lib/idlelib/idle_test/test_replacedialog.py b/Lib/idlelib/idle_test/test_replacedialog.py
new file mode 100644
index 0000000000..ff44820809
--- /dev/null
+++ b/Lib/idlelib/idle_test/test_replacedialog.py
@@ -0,0 +1,293 @@
+"""Unittest for idlelib.ReplaceDialog"""
+from test.support import requires
+requires('gui')
+
+import unittest
+from unittest.mock import Mock
+from tkinter import Tk, Text
+from idlelib.idle_test.mock_tk import Mbox
+import idlelib.SearchEngine as se
+import idlelib.ReplaceDialog as rd
+
+orig_mbox = se.tkMessageBox
+showerror = Mbox.showerror
+
+
+class ReplaceDialogTest(unittest.TestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ cls.root = Tk()
+ cls.root.withdraw()
+ se.tkMessageBox = Mbox
+ cls.engine = se.SearchEngine(cls.root)
+ cls.dialog = rd.ReplaceDialog(cls.root, cls.engine)
+ cls.dialog.ok = Mock()
+ cls.text = Text(cls.root)
+ cls.text.undo_block_start = Mock()
+ cls.text.undo_block_stop = Mock()
+ cls.dialog.text = cls.text
+
+ @classmethod
+ def tearDownClass(cls):
+ se.tkMessageBox = orig_mbox
+ del cls.text, cls.dialog, cls.engine
+ cls.root.destroy()
+ del cls.root
+
+ def setUp(self):
+ self.text.insert('insert', 'This is a sample sTring')
+
+ def tearDown(self):
+ self.engine.patvar.set('')
+ self.dialog.replvar.set('')
+ self.engine.wordvar.set(False)
+ self.engine.casevar.set(False)
+ self.engine.revar.set(False)
+ self.engine.wrapvar.set(True)
+ self.engine.backvar.set(False)
+ showerror.title = ''
+ showerror.message = ''
+ self.text.delete('1.0', 'end')
+
+ def test_replace_simple(self):
+ # Test replace function with all options at default setting.
+ # Wrap around - True
+ # Regular Expression - False
+ # Match case - False
+ # Match word - False
+ # Direction - Forwards
+ text = self.text
+ equal = self.assertEqual
+ pv = self.engine.patvar
+ rv = self.dialog.replvar
+ replace = self.dialog.replace_it
+
+ # test accessor method
+ self.engine.setpat('asdf')
+ equal(self.engine.getpat(), pv.get())
+
+ # text found and replaced
+ pv.set('a')
+ rv.set('asdf')
+ self.dialog.open(self.text)
+ replace()
+ equal(text.get('1.8', '1.12'), 'asdf')
+
+ # dont "match word" case
+ text.mark_set('insert', '1.0')
+ pv.set('is')
+ rv.set('hello')
+ replace()
+ equal(text.get('1.2', '1.7'), 'hello')
+
+ # dont "match case" case
+ pv.set('string')
+ rv.set('world')
+ replace()
+ equal(text.get('1.23', '1.28'), 'world')
+
+ # without "regular expression" case
+ text.mark_set('insert', 'end')
+ text.insert('insert', '\nline42:')
+ before_text = text.get('1.0', 'end')
+ pv.set('[a-z][\d]+')
+ replace()
+ after_text = text.get('1.0', 'end')
+ equal(before_text, after_text)
+
+ # test with wrap around selected and complete a cycle
+ text.mark_set('insert', '1.9')
+ pv.set('i')
+ rv.set('j')
+ replace()
+ equal(text.get('1.8'), 'i')
+ equal(text.get('2.1'), 'j')
+ replace()
+ equal(text.get('2.1'), 'j')
+ equal(text.get('1.8'), 'j')
+ before_text = text.get('1.0', 'end')
+ replace()
+ after_text = text.get('1.0', 'end')
+ equal(before_text, after_text)
+
+ # text not found
+ before_text = text.get('1.0', 'end')
+ pv.set('foobar')
+ replace()
+ after_text = text.get('1.0', 'end')
+ equal(before_text, after_text)
+
+ # test access method
+ self.dialog.find_it(0)
+
+ def test_replace_wrap_around(self):
+ text = self.text
+ equal = self.assertEqual
+ pv = self.engine.patvar
+ rv = self.dialog.replvar
+ replace = self.dialog.replace_it
+ self.engine.wrapvar.set(False)
+
+ # replace candidate found both after and before 'insert'
+ text.mark_set('insert', '1.4')
+ pv.set('i')
+ rv.set('j')
+ replace()
+ equal(text.get('1.2'), 'i')
+ equal(text.get('1.5'), 'j')
+ replace()
+ equal(text.get('1.2'), 'i')
+ equal(text.get('1.20'), 'j')
+ replace()
+ equal(text.get('1.2'), 'i')
+
+ # replace candidate found only before 'insert'
+ text.mark_set('insert', '1.8')
+ pv.set('is')
+ before_text = text.get('1.0', 'end')
+ replace()
+ after_text = text.get('1.0', 'end')
+ equal(before_text, after_text)
+
+ def test_replace_whole_word(self):
+ text = self.text
+ equal = self.assertEqual
+ pv = self.engine.patvar
+ rv = self.dialog.replvar
+ replace = self.dialog.replace_it
+ self.engine.wordvar.set(True)
+
+ pv.set('is')
+ rv.set('hello')
+ replace()
+ equal(text.get('1.0', '1.4'), 'This')
+ equal(text.get('1.5', '1.10'), 'hello')
+
+ def test_replace_match_case(self):
+ equal = self.assertEqual
+ text = self.text
+ pv = self.engine.patvar
+ rv = self.dialog.replvar
+ replace = self.dialog.replace_it
+ self.engine.casevar.set(True)
+
+ before_text = self.text.get('1.0', 'end')
+ pv.set('this')
+ rv.set('that')
+ replace()
+ after_text = self.text.get('1.0', 'end')
+ equal(before_text, after_text)
+
+ pv.set('This')
+ replace()
+ equal(text.get('1.0', '1.4'), 'that')
+
+ def test_replace_regex(self):
+ equal = self.assertEqual
+ text = self.text
+ pv = self.engine.patvar
+ rv = self.dialog.replvar
+ replace = self.dialog.replace_it
+ self.engine.revar.set(True)
+
+ before_text = text.get('1.0', 'end')
+ pv.set('[a-z][\d]+')
+ rv.set('hello')
+ replace()
+ after_text = text.get('1.0', 'end')
+ equal(before_text, after_text)
+
+ text.insert('insert', '\nline42')
+ replace()
+ equal(text.get('2.0', '2.8'), 'linhello')
+
+ pv.set('')
+ replace()
+ self.assertIn('error', showerror.title)
+ self.assertIn('Empty', showerror.message)
+
+ pv.set('[\d')
+ replace()
+ self.assertIn('error', showerror.title)
+ self.assertIn('Pattern', showerror.message)
+
+ showerror.title = ''
+ showerror.message = ''
+ pv.set('[a]')
+ rv.set('test\\')
+ replace()
+ self.assertIn('error', showerror.title)
+ self.assertIn('Invalid Replace Expression', showerror.message)
+
+ # test access method
+ self.engine.setcookedpat("\'")
+ equal(pv.get(), "\\'")
+
+ def test_replace_backwards(self):
+ equal = self.assertEqual
+ text = self.text
+ pv = self.engine.patvar
+ rv = self.dialog.replvar
+ replace = self.dialog.replace_it
+ self.engine.backvar.set(True)
+
+ text.insert('insert', '\nis as ')
+
+ pv.set('is')
+ rv.set('was')
+ replace()
+ equal(text.get('1.2', '1.4'), 'is')
+ equal(text.get('2.0', '2.3'), 'was')
+ replace()
+ equal(text.get('1.5', '1.8'), 'was')
+ replace()
+ equal(text.get('1.2', '1.5'), 'was')
+
+ def test_replace_all(self):
+ text = self.text
+ pv = self.engine.patvar
+ rv = self.dialog.replvar
+ replace_all = self.dialog.replace_all
+
+ text.insert('insert', '\n')
+ text.insert('insert', text.get('1.0', 'end')*100)
+ pv.set('is')
+ rv.set('was')
+ replace_all()
+ self.assertNotIn('is', text.get('1.0', 'end'))
+
+ self.engine.revar.set(True)
+ pv.set('')
+ replace_all()
+ self.assertIn('error', showerror.title)
+ self.assertIn('Empty', showerror.message)
+
+ pv.set('[s][T]')
+ rv.set('\\')
+ replace_all()
+
+ self.engine.revar.set(False)
+ pv.set('text which is not present')
+ rv.set('foobar')
+ replace_all()
+
+ def test_default_command(self):
+ text = self.text
+ pv = self.engine.patvar
+ rv = self.dialog.replvar
+ replace_find = self.dialog.default_command
+ equal = self.assertEqual
+
+ pv.set('This')
+ rv.set('was')
+ replace_find()
+ equal(text.get('sel.first', 'sel.last'), 'was')
+
+ self.engine.revar.set(True)
+ pv.set('')
+ replace_find()
+
+
+if __name__ == '__main__':
+ unittest.main(verbosity=2)
diff --git a/Lib/idlelib/idle_test/test_searchdialog.py b/Lib/idlelib/idle_test/test_searchdialog.py
new file mode 100644
index 0000000000..190c866a18
--- /dev/null
+++ b/Lib/idlelib/idle_test/test_searchdialog.py
@@ -0,0 +1,80 @@
+"""Test SearchDialog class in SearchDialogue.py"""
+
+# Does not currently test the event handler wrappers.
+# A usage test should simulate clicks and check hilighting.
+# Tests need to be coordinated with SearchDialogBase tests
+# to avoid duplication.
+
+from test.support import requires
+requires('gui')
+
+import unittest
+import tkinter as tk
+from tkinter import BooleanVar
+import idlelib.SearchEngine as se
+import idlelib.SearchDialog as sd
+
+
+class SearchDialogTest(unittest.TestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ cls.root = tk.Tk()
+
+ @classmethod
+ def tearDownClass(cls):
+ cls.root.destroy()
+ del cls.root
+
+ def setUp(self):
+ self.engine = se.SearchEngine(self.root)
+ self.dialog = sd.SearchDialog(self.root, self.engine)
+ self.text = tk.Text(self.root)
+ self.text.insert('1.0', 'Hello World!')
+
+ def test_find_again(self):
+ # Search for various expressions
+ text = self.text
+
+ self.engine.setpat('')
+ self.assertFalse(self.dialog.find_again(text))
+
+ self.engine.setpat('Hello')
+ self.assertTrue(self.dialog.find_again(text))
+
+ self.engine.setpat('Goodbye')
+ self.assertFalse(self.dialog.find_again(text))
+
+ self.engine.setpat('World!')
+ self.assertTrue(self.dialog.find_again(text))
+
+ self.engine.setpat('Hello World!')
+ self.assertTrue(self.dialog.find_again(text))
+
+ # Regular expression
+ self.engine.revar = BooleanVar(self.root, True)
+ self.engine.setpat('W[aeiouy]r')
+ self.assertTrue(self.dialog.find_again(text))
+
+ def test_find_selection(self):
+ # Select some text and make sure it's found
+ text = self.text
+ # Add additional line to find
+ self.text.insert('2.0', 'Hello World!')
+
+ text.tag_add('sel', '1.0', '1.4') # Select 'Hello'
+ self.assertTrue(self.dialog.find_selection(text))
+
+ text.tag_remove('sel', '1.0', 'end')
+ text.tag_add('sel', '1.6', '1.11') # Select 'World!'
+ self.assertTrue(self.dialog.find_selection(text))
+
+ text.tag_remove('sel', '1.0', 'end')
+ text.tag_add('sel', '1.0', '1.11') # Select 'Hello World!'
+ self.assertTrue(self.dialog.find_selection(text))
+
+ # Remove additional line
+ text.delete('2.0', 'end')
+
+if __name__ == '__main__':
+ unittest.main(verbosity=2, exit=2)
diff --git a/Lib/idlelib/idle_test/test_searchengine.py b/Lib/idlelib/idle_test/test_searchengine.py
index c7792fb188..edbd558133 100644
--- a/Lib/idlelib/idle_test/test_searchengine.py
+++ b/Lib/idlelib/idle_test/test_searchengine.py
@@ -178,7 +178,7 @@ class SearchEngineTest(unittest.TestCase):
engine.revar.set(1)
Equal(engine.getprog(), None)
self.assertEqual(Mbox.showerror.message,
- 'Error: nothing to repeat\nPattern: +')
+ 'Error: nothing to repeat at position 0\nPattern: +')
def test_report_error(self):
showerror = Mbox.showerror
diff --git a/Lib/idlelib/idle_test/test_textview.py b/Lib/idlelib/idle_test/test_textview.py
index 68e5b82ad9..02d1472240 100644
--- a/Lib/idlelib/idle_test/test_textview.py
+++ b/Lib/idlelib/idle_test/test_textview.py
@@ -1,4 +1,4 @@
-'''Test the functions and main class method of textView.py.
+'''Test idlelib.textView.
Since all methods and functions create (or destroy) a TextViewer, which
is a widget containing multiple widgets, all tests must be gui tests.
@@ -22,7 +22,9 @@ def setUpModule():
root = Tk()
def tearDownModule():
- global root
+ global root, TV
+ del TV
+ root.update_idletasks()
root.destroy() # pyflakes falsely sees root as undefined
del root
diff --git a/Lib/idlelib/idle_test/test_undodelegator.py b/Lib/idlelib/idle_test/test_undodelegator.py
new file mode 100644
index 0000000000..2b83c991e2
--- /dev/null
+++ b/Lib/idlelib/idle_test/test_undodelegator.py
@@ -0,0 +1,135 @@
+"""Unittest for UndoDelegator in idlelib.UndoDelegator.
+
+Coverage about 80% (retest).
+"""
+from test.support import requires
+requires('gui')
+
+import unittest
+from unittest.mock import Mock
+from tkinter import Text, Tk
+from idlelib.UndoDelegator import UndoDelegator
+from idlelib.Percolator import Percolator
+
+
+class UndoDelegatorTest(unittest.TestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ cls.root = Tk()
+ cls.text = Text(cls.root)
+ cls.percolator = Percolator(cls.text)
+
+ @classmethod
+ def tearDownClass(cls):
+ cls.percolator.redir.close()
+ del cls.percolator, cls.text
+ cls.root.destroy()
+ del cls.root
+
+ def setUp(self):
+ self.delegator = UndoDelegator()
+ self.percolator.insertfilter(self.delegator)
+ self.delegator.bell = Mock(wraps=self.delegator.bell)
+
+ def tearDown(self):
+ self.percolator.removefilter(self.delegator)
+ self.text.delete('1.0', 'end')
+ self.delegator.resetcache()
+
+ def test_undo_event(self):
+ text = self.text
+
+ text.insert('insert', 'foobar')
+ text.insert('insert', 'h')
+ text.event_generate('<<undo>>')
+ self.assertEqual(text.get('1.0', 'end'), '\n')
+
+ text.insert('insert', 'foo')
+ text.insert('insert', 'bar')
+ text.delete('1.2', '1.4')
+ text.insert('insert', 'hello')
+ text.event_generate('<<undo>>')
+ self.assertEqual(text.get('1.0', '1.4'), 'foar')
+ text.event_generate('<<undo>>')
+ self.assertEqual(text.get('1.0', '1.6'), 'foobar')
+ text.event_generate('<<undo>>')
+ self.assertEqual(text.get('1.0', '1.3'), 'foo')
+ text.event_generate('<<undo>>')
+ self.delegator.undo_event('event')
+ self.assertTrue(self.delegator.bell.called)
+
+ def test_redo_event(self):
+ text = self.text
+
+ text.insert('insert', 'foo')
+ text.insert('insert', 'bar')
+ text.delete('1.0', '1.3')
+ text.event_generate('<<undo>>')
+ text.event_generate('<<redo>>')
+ self.assertEqual(text.get('1.0', '1.3'), 'bar')
+ text.event_generate('<<redo>>')
+ self.assertTrue(self.delegator.bell.called)
+
+ def test_dump_event(self):
+ """
+ Dump_event cannot be tested directly without changing
+ environment variables. So, test statements in dump_event
+ indirectly
+ """
+ text = self.text
+ d = self.delegator
+
+ text.insert('insert', 'foo')
+ text.insert('insert', 'bar')
+ text.delete('1.2', '1.4')
+ self.assertTupleEqual((d.pointer, d.can_merge), (3, True))
+ text.event_generate('<<undo>>')
+ self.assertTupleEqual((d.pointer, d.can_merge), (2, False))
+
+ def test_get_set_saved(self):
+ # test the getter method get_saved
+ # test the setter method set_saved
+ # indirectly test check_saved
+ d = self.delegator
+
+ self.assertTrue(d.get_saved())
+ self.text.insert('insert', 'a')
+ self.assertFalse(d.get_saved())
+ d.saved_change_hook = Mock()
+
+ d.set_saved(True)
+ self.assertEqual(d.pointer, d.saved)
+ self.assertTrue(d.saved_change_hook.called)
+
+ d.set_saved(False)
+ self.assertEqual(d.saved, -1)
+ self.assertTrue(d.saved_change_hook.called)
+
+ def test_undo_start_stop(self):
+ # test the undo_block_start and undo_block_stop methods
+ text = self.text
+
+ text.insert('insert', 'foo')
+ self.delegator.undo_block_start()
+ text.insert('insert', 'bar')
+ text.insert('insert', 'bar')
+ self.delegator.undo_block_stop()
+ self.assertEqual(text.get('1.0', '1.3'), 'foo')
+
+ # test another code path
+ self.delegator.undo_block_start()
+ text.insert('insert', 'bar')
+ self.delegator.undo_block_stop()
+ self.assertEqual(text.get('1.0', '1.3'), 'foo')
+
+ def test_addcmd(self):
+ text = self.text
+ # when number of undo operations exceeds max_undo
+ self.delegator.max_undo = max_undo = 10
+ for i in range(max_undo + 10):
+ text.insert('insert', 'foo')
+ self.assertLessEqual(len(self.delegator.undolist), max_undo)
+
+if __name__ == '__main__':
+ unittest.main(verbosity=2, exit=False)
diff --git a/Lib/idlelib/idle_test/test_warning.py b/Lib/idlelib/idle_test/test_warning.py
index 54ac993e88..18627ddd23 100644
--- a/Lib/idlelib/idle_test/test_warning.py
+++ b/Lib/idlelib/idle_test/test_warning.py
@@ -68,15 +68,6 @@ class ShellWarnTest(unittest.TestCase):
'Test', UserWarning, 'test_warning.py', 99, f, 'Line of code')
self.assertEqual(shellmsg.splitlines(), f.getvalue().splitlines())
-class ImportWarnTest(unittest.TestCase):
- def test_idlever(self):
- with warnings.catch_warnings(record=True) as w:
- warnings.simplefilter("always")
- import idlelib.idlever
- self.assertEqual(len(w), 1)
- self.assertTrue(issubclass(w[-1].category, DeprecationWarning))
- self.assertIn("version", str(w[-1].message))
-
if __name__ == '__main__':
unittest.main(verbosity=2, exit=False)
diff --git a/Lib/idlelib/idle_test/test_widgetredir.py b/Lib/idlelib/idle_test/test_widgetredir.py
index 64405615a0..c68dfcc412 100644
--- a/Lib/idlelib/idle_test/test_widgetredir.py
+++ b/Lib/idlelib/idle_test/test_widgetredir.py
@@ -1,7 +1,7 @@
-"""Unittest for idlelib.WidgetRedirector
+'''Test idlelib.WidgetRedirector.
100% coverage
-"""
+'''
from test.support import requires
import unittest
from idlelib.idle_test.mock_idle import Func
@@ -14,14 +14,14 @@ class InitCloseTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
requires('gui')
- cls.tk = Tk()
- cls.text = Text(cls.tk)
+ cls.root = Tk()
+ cls.text = Text(cls.root)
@classmethod
def tearDownClass(cls):
- cls.text.destroy()
- cls.tk.destroy()
- del cls.text, cls.tk
+ del cls.text
+ cls.root.destroy()
+ del cls.root
def test_init(self):
redir = WidgetRedirector(self.text)
@@ -43,14 +43,15 @@ class WidgetRedirectorTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
requires('gui')
- cls.tk = Tk()
- cls.text = Text(cls.tk)
+ cls.root = Tk()
+ cls.text = Text(cls.root)
@classmethod
def tearDownClass(cls):
- cls.text.destroy()
- cls.tk.destroy()
- del cls.text, cls.tk
+ del cls.text
+ cls.root.update_idletasks()
+ cls.root.destroy()
+ del cls.root
def setUp(self):
self.redir = WidgetRedirector(self.text)
@@ -108,13 +109,13 @@ class WidgetRedirectorTest(unittest.TestCase):
def test_command_dispatch(self):
# Test that .__init__ causes redirection of tk calls
# through redir.dispatch
- self.tk.call(self.text._w, 'insert', 'hello')
+ self.root.call(self.text._w, 'insert', 'hello')
self.assertEqual(self.func.args, ('hello',))
self.assertEqual(self.text.get('1.0', 'end'), '\n')
# Ensure that called through redir .dispatch and not through
# self.text.insert by having mock raise TclError.
self.func.__init__(TclError())
- self.assertEqual(self.tk.call(self.text._w, 'insert', 'boo'), '')
+ self.assertEqual(self.root.call(self.text._w, 'insert', 'boo'), '')
diff --git a/Lib/idlelib/rpc.py b/Lib/idlelib/rpc.py
index aa33041e7b..48105f2aa1 100644
--- a/Lib/idlelib/rpc.py
+++ b/Lib/idlelib/rpc.py
@@ -1,4 +1,4 @@
-"""RPC Implemention, originally written for the Python Idle IDE
+"""RPC Implementation, originally written for the Python Idle IDE
For security reasons, GvR requested that Idle's Python execution server process
connect to the Idle process, which listens for the connection. Since Idle has
diff --git a/Lib/imaplib.py b/Lib/imaplib.py
index eb05dcb4f1..4e8a4bb6fa 100644
--- a/Lib/imaplib.py
+++ b/Lib/imaplib.py
@@ -66,6 +66,7 @@ Commands = {
'CREATE': ('AUTH', 'SELECTED'),
'DELETE': ('AUTH', 'SELECTED'),
'DELETEACL': ('AUTH', 'SELECTED'),
+ 'ENABLE': ('AUTH', ),
'EXAMINE': ('AUTH', 'SELECTED'),
'EXPUNGE': ('SELECTED',),
'FETCH': ('SELECTED',),
@@ -107,12 +108,17 @@ InternalDate = re.compile(br'.*INTERNALDATE "'
br' (?P<hour>[0-9][0-9]):(?P<min>[0-9][0-9]):(?P<sec>[0-9][0-9])'
br' (?P<zonen>[-+])(?P<zoneh>[0-9][0-9])(?P<zonem>[0-9][0-9])'
br'"')
+# Literal is no longer used; kept for backward compatibility.
Literal = re.compile(br'.*{(?P<size>\d+)}$', re.ASCII)
MapCRLF = re.compile(br'\r\n|\r|\n')
Response_code = re.compile(br'\[(?P<type>[A-Z-]+)( (?P<data>[^\]]*))?\]')
Untagged_response = re.compile(br'\* (?P<type>[A-Z-]+)( (?P<data>.*))?')
+# Untagged_status is no longer used; kept for backward compatibility
Untagged_status = re.compile(
br'\* (?P<data>\d+) (?P<type>[A-Z-]+)( (?P<data2>.*))?', re.ASCII)
+# We compile these in _mode_xxx.
+_Literal = br'.*{(?P<size>\d+)}$'
+_Untagged_status = br'\* (?P<data>\d+) (?P<type>[A-Z-]+)( (?P<data2>.*))?'
@@ -166,7 +172,7 @@ class IMAP4:
class abort(error): pass # Service errors - close and retry
class readonly(abort): pass # Mailbox status changed to READ-ONLY
- def __init__(self, host = '', port = IMAP4_PORT):
+ def __init__(self, host='', port=IMAP4_PORT):
self.debug = Debug
self.state = 'LOGOUT'
self.literal = None # A literal argument to a command
@@ -176,6 +182,7 @@ class IMAP4:
self.is_readonly = False # READ-ONLY desired state
self.tagnum = 0
self._tls_established = False
+ self._mode_ascii()
# Open socket to server.
@@ -190,6 +197,19 @@ class IMAP4:
pass
raise
+ def _mode_ascii(self):
+ self.utf8_enabled = False
+ self._encoding = 'ascii'
+ self.Literal = re.compile(_Literal, re.ASCII)
+ self.Untagged_status = re.compile(_Untagged_status, re.ASCII)
+
+
+ def _mode_utf8(self):
+ self.utf8_enabled = True
+ self._encoding = 'utf-8'
+ self.Literal = re.compile(_Literal)
+ self.Untagged_status = re.compile(_Untagged_status)
+
def _connect(self):
# Create unique tag for this session,
@@ -239,6 +259,14 @@ class IMAP4:
return getattr(self, attr.lower())
raise AttributeError("Unknown IMAP4 command: '%s'" % attr)
+ def __enter__(self):
+ return self
+
+ def __exit__(self, *args):
+ try:
+ self.logout()
+ except OSError:
+ pass
# Overridable methods
@@ -352,7 +380,10 @@ class IMAP4:
date_time = Time2Internaldate(date_time)
else:
date_time = None
- self.literal = MapCRLF.sub(CRLF, message)
+ literal = MapCRLF.sub(CRLF, message)
+ if self.utf8_enabled:
+ literal = b'UTF8 (' + literal + b')'
+ self.literal = literal
return self._simple_command(name, mailbox, flags, date_time)
@@ -447,6 +478,18 @@ class IMAP4:
"""
return self._simple_command('DELETEACL', mailbox, who)
+ def enable(self, capability):
+ """Send an RFC5161 enable string to the server.
+
+ (typ, [data]) = <intance>.enable(capability)
+ """
+ if 'ENABLE' not in self.capabilities:
+ raise IMAP4.error("Server does not support ENABLE")
+ typ, data = self._simple_command('ENABLE', capability)
+ if typ == 'OK' and 'UTF8=ACCEPT' in capability.upper():
+ self._mode_utf8()
+ return typ, data
+
def expunge(self):
"""Permanently remove deleted items from selected mailbox.
@@ -553,7 +596,7 @@ class IMAP4:
def _CRAM_MD5_AUTH(self, challenge):
""" Authobject to use with CRAM-MD5 authentication. """
import hmac
- pwd = (self.password.encode('ASCII') if isinstance(self.password, str)
+ pwd = (self.password.encode('utf-8') if isinstance(self.password, str)
else self.password)
return self.user + " " + hmac.HMAC(pwd, challenge, 'md5').hexdigest()
@@ -653,9 +696,12 @@ class IMAP4:
(typ, [data]) = <instance>.search(charset, criterion, ...)
'data' is space separated list of matching message numbers.
+ If UTF8 is enabled, charset MUST be None.
"""
name = 'SEARCH'
if charset:
+ if self.utf8_enabled:
+ raise IMAP4.error("Non-None charset not valid in UTF8 mode")
typ, dat = self._simple_command(name, 'CHARSET', charset, *criteria)
else:
typ, dat = self._simple_command(name, *criteria)
@@ -869,7 +915,7 @@ class IMAP4:
def _check_bye(self):
bye = self.untagged_responses.get('BYE')
if bye:
- raise self.abort(bye[-1].decode('ascii', 'replace'))
+ raise self.abort(bye[-1].decode(self._encoding, 'replace'))
def _command(self, name, *args):
@@ -890,12 +936,12 @@ class IMAP4:
raise self.readonly('mailbox status changed to READ-ONLY')
tag = self._new_tag()
- name = bytes(name, 'ASCII')
+ name = bytes(name, self._encoding)
data = tag + b' ' + name
for arg in args:
if arg is None: continue
if isinstance(arg, str):
- arg = bytes(arg, "ASCII")
+ arg = bytes(arg, self._encoding)
data = data + b' ' + arg
literal = self.literal
@@ -905,7 +951,7 @@ class IMAP4:
literator = literal
else:
literator = None
- data = data + bytes(' {%s}' % len(literal), 'ASCII')
+ data = data + bytes(' {%s}' % len(literal), self._encoding)
if __debug__:
if self.debug >= 4:
@@ -970,7 +1016,7 @@ class IMAP4:
typ, dat = self.capability()
if dat == [None]:
raise self.error('no CAPABILITY response from server')
- dat = str(dat[-1], "ASCII")
+ dat = str(dat[-1], self._encoding)
dat = dat.upper()
self.capabilities = tuple(dat.split())
@@ -989,10 +1035,10 @@ class IMAP4:
if self._match(self.tagre, resp):
tag = self.mo.group('tag')
if not tag in self.tagged_commands:
- raise self.abort('unexpected tagged response: %s' % resp)
+ raise self.abort('unexpected tagged response: %r' % resp)
typ = self.mo.group('type')
- typ = str(typ, 'ASCII')
+ typ = str(typ, self._encoding)
dat = self.mo.group('data')
self.tagged_commands[tag] = (typ, [dat])
else:
@@ -1001,7 +1047,7 @@ class IMAP4:
# '*' (untagged) responses?
if not self._match(Untagged_response, resp):
- if self._match(Untagged_status, resp):
+ if self._match(self.Untagged_status, resp):
dat2 = self.mo.group('data2')
if self.mo is None:
@@ -1011,17 +1057,17 @@ class IMAP4:
self.continuation_response = self.mo.group('data')
return None # NB: indicates continuation
- raise self.abort("unexpected response: '%s'" % resp)
+ raise self.abort("unexpected response: %r" % resp)
typ = self.mo.group('type')
- typ = str(typ, 'ascii')
+ typ = str(typ, self._encoding)
dat = self.mo.group('data')
if dat is None: dat = b'' # Null untagged response
if dat2: dat = dat + b' ' + dat2
# Is there a literal to come?
- while self._match(Literal, dat):
+ while self._match(self.Literal, dat):
# Read literal direct from connection.
@@ -1045,7 +1091,7 @@ class IMAP4:
if typ in ('OK', 'NO', 'BAD') and self._match(Response_code, dat):
typ = self.mo.group('type')
- typ = str(typ, "ASCII")
+ typ = str(typ, self._encoding)
self._append_untagged(typ, self.mo.group('data'))
if __debug__:
@@ -1115,7 +1161,7 @@ class IMAP4:
def _new_tag(self):
- tag = self.tagpre + bytes(str(self.tagnum), 'ASCII')
+ tag = self.tagpre + bytes(str(self.tagnum), self._encoding)
self.tagnum = self.tagnum + 1
self.tagged_commands[tag] = None
return tag
@@ -1205,7 +1251,8 @@ if HAVE_SSL:
"""
- def __init__(self, host='', port=IMAP4_SSL_PORT, keyfile=None, certfile=None, ssl_context=None):
+ def __init__(self, host='', port=IMAP4_SSL_PORT, keyfile=None,
+ certfile=None, ssl_context=None):
if ssl_context is not None and keyfile is not None:
raise ValueError("ssl_context and keyfile arguments are mutually "
"exclusive")
@@ -1243,7 +1290,7 @@ class IMAP4_stream(IMAP4):
Instantiate with: IMAP4_stream(command)
- where "command" is a string that can be passed to subprocess.Popen()
+ "command" - a string that can be passed to subprocess.Popen()
for more documentation see the docstring of the parent class IMAP4.
"""
@@ -1320,7 +1367,7 @@ class _Authenticator:
#
oup = b''
if isinstance(inp, str):
- inp = inp.encode('ASCII')
+ inp = inp.encode('utf-8')
while inp:
if len(inp) > 48:
t = inp[:48]
diff --git a/Lib/imghdr.py b/Lib/imghdr.py
index add2ea8898..b26792539d 100644
--- a/Lib/imghdr.py
+++ b/Lib/imghdr.py
@@ -110,6 +110,18 @@ def test_bmp(h, f):
tests.append(test_bmp)
+def test_webp(h, f):
+ if h.startswith(b'RIFF') and h[8:12] == b'WEBP':
+ return 'webp'
+
+tests.append(test_webp)
+
+def test_exr(h, f):
+ if h.startswith(b'\x76\x2f\x31\x01'):
+ return 'exr'
+
+tests.append(test_exr)
+
#--------------------#
# Small test program #
#--------------------#
diff --git a/Lib/imp.py b/Lib/imp.py
index c922e921b5..f6fff44201 100644
--- a/Lib/imp.py
+++ b/Lib/imp.py
@@ -8,15 +8,16 @@ functionality over this module.
# (Probably) need to stay in _imp
from _imp import (lock_held, acquire_lock, release_lock,
get_frozen_object, is_frozen_package,
- init_builtin, init_frozen, is_builtin, is_frozen,
+ init_frozen, is_builtin, is_frozen,
_fix_co_filename)
try:
- from _imp import load_dynamic
+ from _imp import create_dynamic
except ImportError:
# Platform doesn't support dynamic loading.
- load_dynamic = None
+ create_dynamic = None
-from importlib._bootstrap import SourcelessFileLoader, _ERR_MSG, _SpecMethods
+from importlib._bootstrap import _ERR_MSG, _exec, _load, _builtin_from_name
+from importlib._bootstrap_external import SourcelessFileLoader
from importlib import machinery
from importlib import util
@@ -29,7 +30,7 @@ import warnings
warnings.warn("the imp module is deprecated in favour of importlib; "
"see the module's documentation for alternative uses",
- PendingDeprecationWarning)
+ PendingDeprecationWarning, stacklevel=2)
# DEPRECATED
SEARCH_ERROR = 0
@@ -58,24 +59,23 @@ def new_module(name):
def get_magic():
"""**DEPRECATED**
- Return the magic number for .pyc or .pyo files.
+ Return the magic number for .pyc files.
"""
return util.MAGIC_NUMBER
def get_tag():
- """Return the magic tag for .pyc or .pyo files."""
+ """Return the magic tag for .pyc files."""
return sys.implementation.cache_tag
def cache_from_source(path, debug_override=None):
"""**DEPRECATED**
- Given the path to a .py file, return the path to its .pyc/.pyo file.
+ Given the path to a .py file, return the path to its .pyc file.
The .py file does not need to exist; this simply returns the path to the
- .pyc/.pyo file calculated as if the .py file were imported. The extension
- will be .pyc unless sys.flags.optimize is non-zero, then it will be .pyo.
+ .pyc file calculated as if the .py file were imported.
If debug_override is not None, then it must be a boolean and is used in
place of sys.flags.optimize.
@@ -83,16 +83,18 @@ def cache_from_source(path, debug_override=None):
If sys.implementation.cache_tag is None then NotImplementedError is raised.
"""
- return util.cache_from_source(path, debug_override)
+ with warnings.catch_warnings():
+ warnings.simplefilter('ignore')
+ return util.cache_from_source(path, debug_override)
def source_from_cache(path):
"""**DEPRECATED**
- Given the path to a .pyc./.pyo file, return the path to its .py file.
+ Given the path to a .pyc. file, return the path to its .py file.
- The .pyc/.pyo file does not need to exist; this simply returns the path to
- the .py file calculated to correspond to the .pyc/.pyo file. If path does
+ The .pyc file does not need to exist; this simply returns the path to
+ the .py file calculated to correspond to the .pyc file. If path does
not conform to PEP 3147 format, ValueError will be raised. If
sys.implementation.cache_tag is None then NotImplementedError is raised.
@@ -164,11 +166,10 @@ class _LoadSourceCompatibility(_HackedGetData, machinery.SourceFileLoader):
def load_source(name, pathname, file=None):
loader = _LoadSourceCompatibility(name, pathname, file)
spec = util.spec_from_file_location(name, pathname, loader=loader)
- methods = _SpecMethods(spec)
if name in sys.modules:
- module = methods.exec(sys.modules[name])
+ module = _exec(spec, sys.modules[name])
else:
- module = methods.load()
+ module = _load(spec)
# To allow reloading to potentially work, use a non-hacked loader which
# won't rely on a now-closed file object.
module.__loader__ = machinery.SourceFileLoader(name, pathname)
@@ -185,11 +186,10 @@ def load_compiled(name, pathname, file=None):
"""**DEPRECATED**"""
loader = _LoadCompiledCompatibility(name, pathname, file)
spec = util.spec_from_file_location(name, pathname, loader=loader)
- methods = _SpecMethods(spec)
if name in sys.modules:
- module = methods.exec(sys.modules[name])
+ module = _exec(spec, sys.modules[name])
else:
- module = methods.load()
+ module = _load(spec)
# To allow reloading to potentially work, use a non-hacked loader which
# won't rely on a now-closed file object.
module.__loader__ = SourcelessFileLoader(name, pathname)
@@ -210,11 +210,10 @@ def load_package(name, path):
raise ValueError('{!r} is not a package'.format(path))
spec = util.spec_from_file_location(name, path,
submodule_search_locations=[])
- methods = _SpecMethods(spec)
if name in sys.modules:
- return methods.exec(sys.modules[name])
+ return _exec(spec, sys.modules[name])
else:
- return methods.load()
+ return _load(spec)
def load_module(name, file, filename, details):
@@ -313,3 +312,34 @@ def reload(module):
"""
return importlib.reload(module)
+
+
+def init_builtin(name):
+ """**DEPRECATED**
+
+ Load and return a built-in module by name, or None is such module doesn't
+ exist
+ """
+ try:
+ return _builtin_from_name(name)
+ except ImportError:
+ return None
+
+
+if create_dynamic:
+ def load_dynamic(name, path, file=None):
+ """**DEPRECATED**
+
+ Load an extension module.
+ """
+ import importlib.machinery
+ loader = importlib.machinery.ExtensionFileLoader(name, path)
+
+ # Issue #24748: Skip the sys.modules check in _load_module_shim;
+ # always load new extension
+ spec = importlib.machinery.ModuleSpec(
+ name=name, loader=loader, origin=path)
+ return _load(spec)
+
+else:
+ load_dynamic = None
diff --git a/Lib/importlib/__init__.py b/Lib/importlib/__init__.py
index 1bc99474f2..b6a9f82e05 100644
--- a/Lib/importlib/__init__.py
+++ b/Lib/importlib/__init__.py
@@ -30,9 +30,26 @@ else:
pass
sys.modules['importlib._bootstrap'] = _bootstrap
+try:
+ import _frozen_importlib_external as _bootstrap_external
+except ImportError:
+ from . import _bootstrap_external
+ _bootstrap_external._setup(_bootstrap)
+ _bootstrap._bootstrap_external = _bootstrap_external
+else:
+ _bootstrap_external.__name__ = 'importlib._bootstrap_external'
+ _bootstrap_external.__package__ = 'importlib'
+ try:
+ _bootstrap_external.__file__ = __file__.replace('__init__.py', '_bootstrap_external.py')
+ except NameError:
+ # __file__ is not guaranteed to be defined, e.g. if this code gets
+ # frozen by a tool like cx_Freeze.
+ pass
+ sys.modules['importlib._bootstrap_external'] = _bootstrap_external
+
# To simplify imports in test code
-_w_long = _bootstrap._w_long
-_r_long = _bootstrap._r_long
+_w_long = _bootstrap_external._w_long
+_r_long = _bootstrap_external._r_long
# Fully bootstrapped at this point, import whatever you like, circular
# dependencies and startup overhead minimisation permitting :)
@@ -73,7 +90,7 @@ def find_loader(name, path=None):
except KeyError:
pass
except AttributeError:
- raise ValueError('{}.__loader__ is not set'.format(name))
+ raise ValueError('{}.__loader__ is not set'.format(name)) from None
spec = _bootstrap._find_spec(name, path)
# We won't worry about malformed specs (missing attributes).
@@ -138,15 +155,15 @@ def reload(module):
parent = sys.modules[parent_name]
except KeyError:
msg = "parent {!r} not in sys.modules"
- raise ImportError(msg.format(parent_name), name=parent_name)
+ raise ImportError(msg.format(parent_name),
+ name=parent_name) from None
else:
pkgpath = parent.__path__
else:
pkgpath = None
target = module
spec = module.__spec__ = _bootstrap._find_spec(name, pkgpath, target)
- methods = _bootstrap._SpecMethods(spec)
- methods.exec(module)
+ _bootstrap._exec(spec, module)
# The module may have replaced itself in sys.modules!
return sys.modules[name]
finally:
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py
index 64bbb4620d..9eecbfe967 100644
--- a/Lib/importlib/_bootstrap.py
+++ b/Lib/importlib/_bootstrap.py
@@ -9,7 +9,7 @@ work. One should use importlib as the public-facing version of this module.
#
# IMPORTANT: Whenever making changes to this module, be sure to run
# a top-level make in order to get the frozen version of the module
-# update. Not doing so will result in the Makefile to fail for
+# updated. Not doing so will result in the Makefile to fail for
# all others who don't have a ./python around to freeze the module
# in the early stages of compilation.
#
@@ -22,101 +22,7 @@ work. One should use importlib as the public-facing version of this module.
# Bootstrap-related code ######################################################
-_CASE_INSENSITIVE_PLATFORMS = 'win', 'cygwin', 'darwin'
-
-
-def _make_relax_case():
- if sys.platform.startswith(_CASE_INSENSITIVE_PLATFORMS):
- def _relax_case():
- """True if filenames must be checked case-insensitively."""
- return b'PYTHONCASEOK' in _os.environ
- else:
- def _relax_case():
- """True if filenames must be checked case-insensitively."""
- return False
- return _relax_case
-
-
-def _w_long(x):
- """Convert a 32-bit integer to little-endian."""
- return (int(x) & 0xFFFFFFFF).to_bytes(4, 'little')
-
-
-def _r_long(int_bytes):
- """Convert 4 bytes in little-endian to an integer."""
- return int.from_bytes(int_bytes, 'little')
-
-
-def _path_join(*path_parts):
- """Replacement for os.path.join()."""
- return path_sep.join([part.rstrip(path_separators)
- for part in path_parts if part])
-
-
-def _path_split(path):
- """Replacement for os.path.split()."""
- if len(path_separators) == 1:
- front, _, tail = path.rpartition(path_sep)
- return front, tail
- for x in reversed(path):
- if x in path_separators:
- front, tail = path.rsplit(x, maxsplit=1)
- return front, tail
- return '', path
-
-
-def _path_stat(path):
- """Stat the path.
-
- Made a separate function to make it easier to override in experiments
- (e.g. cache stat results).
-
- """
- return _os.stat(path)
-
-
-def _path_is_mode_type(path, mode):
- """Test whether the path is the specified mode type."""
- try:
- stat_info = _path_stat(path)
- except OSError:
- return False
- return (stat_info.st_mode & 0o170000) == mode
-
-
-def _path_isfile(path):
- """Replacement for os.path.isfile."""
- return _path_is_mode_type(path, 0o100000)
-
-
-def _path_isdir(path):
- """Replacement for os.path.isdir."""
- if not path:
- path = _os.getcwd()
- return _path_is_mode_type(path, 0o040000)
-
-
-def _write_atomic(path, data, mode=0o666):
- """Best-effort function to write data to a path atomically.
- Be prepared to handle a FileExistsError if concurrent writing of the
- temporary file is attempted."""
- # id() is used to generate a pseudo-random filename.
- path_tmp = '{}.{}'.format(path, id(path))
- fd = _os.open(path_tmp,
- _os.O_EXCL | _os.O_CREAT | _os.O_WRONLY, mode & 0o666)
- try:
- # We first write data to a temporary file, and then use os.replace() to
- # perform an atomic rename.
- with _io.FileIO(fd, 'wb') as file:
- file.write(data)
- _os.replace(path_tmp, path)
- except OSError:
- try:
- _os.unlink(path_tmp)
- except OSError:
- pass
- raise
-
+_bootstrap_external = None
def _wrap(new, old):
"""Simple substitute for functools.update_wrapper."""
@@ -130,10 +36,6 @@ def _new_module(name):
return type(sys)(name)
-_code_type = type(_wrap.__code__)
-
-
-
class _ManageReload:
"""Manages the possible clean-up of sys.modules for load_module()."""
@@ -309,7 +211,6 @@ def _lock_unlock_module(name):
lock.release()
# Frame stripping magic ###############################################
-
def _call_with_frames_removed(f, *args, **kwds):
"""remove_importlib_frames in import.c will always remove sequences
of importlib frames that end with a call to this function
@@ -321,200 +222,6 @@ def _call_with_frames_removed(f, *args, **kwds):
return f(*args, **kwds)
-# Finder/loader utility code ###############################################
-
-# Magic word to reject .pyc files generated by other Python versions.
-# It should change for each incompatible change to the bytecode.
-#
-# The value of CR and LF is incorporated so if you ever read or write
-# a .pyc file in text mode the magic number will be wrong; also, the
-# Apple MPW compiler swaps their values, botching string constants.
-#
-# The magic numbers must be spaced apart at least 2 values, as the
-# -U interpeter flag will cause MAGIC+1 being used. They have been
-# odd numbers for some time now.
-#
-# There were a variety of old schemes for setting the magic number.
-# The current working scheme is to increment the previous value by
-# 10.
-#
-# Starting with the adoption of PEP 3147 in Python 3.2, every bump in magic
-# number also includes a new "magic tag", i.e. a human readable string used
-# to represent the magic number in __pycache__ directories. When you change
-# the magic number, you must also set a new unique magic tag. Generally this
-# can be named after the Python major version of the magic number bump, but
-# it can really be anything, as long as it's different than anything else
-# that's come before. The tags are included in the following table, starting
-# with Python 3.2a0.
-#
-# Known values:
-# Python 1.5: 20121
-# Python 1.5.1: 20121
-# Python 1.5.2: 20121
-# Python 1.6: 50428
-# Python 2.0: 50823
-# Python 2.0.1: 50823
-# Python 2.1: 60202
-# Python 2.1.1: 60202
-# Python 2.1.2: 60202
-# Python 2.2: 60717
-# Python 2.3a0: 62011
-# Python 2.3a0: 62021
-# Python 2.3a0: 62011 (!)
-# Python 2.4a0: 62041
-# Python 2.4a3: 62051
-# Python 2.4b1: 62061
-# Python 2.5a0: 62071
-# Python 2.5a0: 62081 (ast-branch)
-# Python 2.5a0: 62091 (with)
-# Python 2.5a0: 62092 (changed WITH_CLEANUP opcode)
-# Python 2.5b3: 62101 (fix wrong code: for x, in ...)
-# Python 2.5b3: 62111 (fix wrong code: x += yield)
-# Python 2.5c1: 62121 (fix wrong lnotab with for loops and
-# storing constants that should have been removed)
-# Python 2.5c2: 62131 (fix wrong code: for x, in ... in listcomp/genexp)
-# Python 2.6a0: 62151 (peephole optimizations and STORE_MAP opcode)
-# Python 2.6a1: 62161 (WITH_CLEANUP optimization)
-# Python 2.7a0: 62171 (optimize list comprehensions/change LIST_APPEND)
-# Python 2.7a0: 62181 (optimize conditional branches:
-# introduce POP_JUMP_IF_FALSE and POP_JUMP_IF_TRUE)
-# Python 2.7a0 62191 (introduce SETUP_WITH)
-# Python 2.7a0 62201 (introduce BUILD_SET)
-# Python 2.7a0 62211 (introduce MAP_ADD and SET_ADD)
-# Python 3000: 3000
-# 3010 (removed UNARY_CONVERT)
-# 3020 (added BUILD_SET)
-# 3030 (added keyword-only parameters)
-# 3040 (added signature annotations)
-# 3050 (print becomes a function)
-# 3060 (PEP 3115 metaclass syntax)
-# 3061 (string literals become unicode)
-# 3071 (PEP 3109 raise changes)
-# 3081 (PEP 3137 make __file__ and __name__ unicode)
-# 3091 (kill str8 interning)
-# 3101 (merge from 2.6a0, see 62151)
-# 3103 (__file__ points to source file)
-# Python 3.0a4: 3111 (WITH_CLEANUP optimization).
-# Python 3.0a5: 3131 (lexical exception stacking, including POP_EXCEPT)
-# Python 3.1a0: 3141 (optimize list, set and dict comprehensions:
-# change LIST_APPEND and SET_ADD, add MAP_ADD)
-# Python 3.1a0: 3151 (optimize conditional branches:
-# introduce POP_JUMP_IF_FALSE and POP_JUMP_IF_TRUE)
-# Python 3.2a0: 3160 (add SETUP_WITH)
-# tag: cpython-32
-# Python 3.2a1: 3170 (add DUP_TOP_TWO, remove DUP_TOPX and ROT_FOUR)
-# tag: cpython-32
-# Python 3.2a2 3180 (add DELETE_DEREF)
-# Python 3.3a0 3190 __class__ super closure changed
-# Python 3.3a0 3200 (__qualname__ added)
-# 3210 (added size modulo 2**32 to the pyc header)
-# Python 3.3a1 3220 (changed PEP 380 implementation)
-# Python 3.3a4 3230 (revert changes to implicit __class__ closure)
-# Python 3.4a1 3250 (evaluate positional default arguments before
-# keyword-only defaults)
-# Python 3.4a1 3260 (add LOAD_CLASSDEREF; allow locals of class to override
-# free vars)
-# Python 3.4a1 3270 (various tweaks to the __class__ closure)
-# Python 3.4a1 3280 (remove implicit class argument)
-# Python 3.4a4 3290 (changes to __qualname__ computation)
-# Python 3.4a4 3300 (more changes to __qualname__ computation)
-# Python 3.4rc2 3310 (alter __qualname__ computation)
-#
-# MAGIC must change whenever the bytecode emitted by the compiler may no
-# longer be understood by older implementations of the eval loop (usually
-# due to the addition of new opcodes).
-
-MAGIC_NUMBER = (3310).to_bytes(2, 'little') + b'\r\n'
-_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c
-
-_PYCACHE = '__pycache__'
-
-SOURCE_SUFFIXES = ['.py'] # _setup() adds .pyw as needed.
-
-DEBUG_BYTECODE_SUFFIXES = ['.pyc']
-OPTIMIZED_BYTECODE_SUFFIXES = ['.pyo']
-
-def cache_from_source(path, debug_override=None):
- """Given the path to a .py file, return the path to its .pyc/.pyo file.
-
- The .py file does not need to exist; this simply returns the path to the
- .pyc/.pyo file calculated as if the .py file were imported. The extension
- will be .pyc unless sys.flags.optimize is non-zero, then it will be .pyo.
-
- If debug_override is not None, then it must be a boolean and is used in
- place of sys.flags.optimize.
-
- If sys.implementation.cache_tag is None then NotImplementedError is raised.
-
- """
- debug = not sys.flags.optimize if debug_override is None else debug_override
- if debug:
- suffixes = DEBUG_BYTECODE_SUFFIXES
- else:
- suffixes = OPTIMIZED_BYTECODE_SUFFIXES
- head, tail = _path_split(path)
- base, sep, rest = tail.rpartition('.')
- tag = sys.implementation.cache_tag
- if tag is None:
- raise NotImplementedError('sys.implementation.cache_tag is None')
- filename = ''.join([(base if base else rest), sep, tag, suffixes[0]])
- return _path_join(head, _PYCACHE, filename)
-
-
-def source_from_cache(path):
- """Given the path to a .pyc./.pyo file, return the path to its .py file.
-
- The .pyc/.pyo file does not need to exist; this simply returns the path to
- the .py file calculated to correspond to the .pyc/.pyo file. If path does
- not conform to PEP 3147 format, ValueError will be raised. If
- sys.implementation.cache_tag is None then NotImplementedError is raised.
-
- """
- if sys.implementation.cache_tag is None:
- raise NotImplementedError('sys.implementation.cache_tag is None')
- head, pycache_filename = _path_split(path)
- head, pycache = _path_split(head)
- if pycache != _PYCACHE:
- raise ValueError('{} not bottom-level directory in '
- '{!r}'.format(_PYCACHE, path))
- if pycache_filename.count('.') != 2:
- raise ValueError('expected only 2 dots in '
- '{!r}'.format(pycache_filename))
- base_filename = pycache_filename.partition('.')[0]
- return _path_join(head, base_filename + SOURCE_SUFFIXES[0])
-
-
-def _get_sourcefile(bytecode_path):
- """Convert a bytecode file path to a source path (if possible).
-
- This function exists purely for backwards-compatibility for
- PyImport_ExecCodeModuleWithFilenames() in the C API.
-
- """
- if len(bytecode_path) == 0:
- return None
- rest, _, extension = bytecode_path.rpartition('.')
- if not rest or extension.lower()[-3:-1] != 'py':
- return bytecode_path
- try:
- source_path = source_from_cache(bytecode_path)
- except (NotImplementedError, ValueError):
- source_path = bytecode_path[:-1]
- return source_path if _path_isfile(source_path) else bytecode_path
-
-
-def _calc_mode(path):
- """Calculate the mode permissions for a bytecode file."""
- try:
- mode = _path_stat(path).st_mode
- except OSError:
- mode = 0o666
- # We always ensure write access so we can update cached files
- # later even when the source files are read-only on Windows (#6074)
- mode |= 0o200
- return mode
-
-
def _verbose_message(message, *args, verbosity=1):
"""Print the message to stderr if -v/PYTHONVERBOSE is turned on."""
if sys.flags.verbose >= verbosity:
@@ -523,24 +230,6 @@ def _verbose_message(message, *args, verbosity=1):
print(message.format(*args), file=sys.stderr)
-def _check_name(method):
- """Decorator to verify that the module being requested matches the one the
- loader can handle.
-
- The first argument (self) must define _name which the second argument is
- compared against. If the comparison fails then ImportError is raised.
-
- """
- def _check_name_wrapper(self, name=None, *args, **kwargs):
- if name is None:
- name = self.name
- elif self.name != name:
- raise ImportError('loader cannot handle %s' % name, name=name)
- return method(self, name, *args, **kwargs)
- _wrap(_check_name_wrapper, method)
- return _check_name_wrapper
-
-
def _requires_builtin(fxn):
"""Decorator to verify the named module is built-in."""
def _requires_builtin_wrapper(self, fullname):
@@ -563,23 +252,7 @@ def _requires_frozen(fxn):
return _requires_frozen_wrapper
-def _find_module_shim(self, fullname):
- """Try to find a loader for the specified module by delegating to
- self.find_loader().
-
- This method is deprecated in favor of finder.find_spec().
-
- """
- # Call find_loader(). If it returns a string (indicating this
- # is a namespace package portion), generate a warning and
- # return None.
- loader, portions = self.find_loader(fullname)
- if loader is None and len(portions):
- msg = 'Not importing directory {}: missing __init__'
- _warnings.warn(msg.format(portions[0]), ImportWarning)
- return loader
-
-
+# Typically used by loader classes as a method replacement.
def _load_module_shim(self, fullname):
"""Load the specified module into sys.modules and return it.
@@ -587,103 +260,12 @@ def _load_module_shim(self, fullname):
"""
spec = spec_from_loader(fullname, self)
- methods = _SpecMethods(spec)
if fullname in sys.modules:
module = sys.modules[fullname]
- methods.exec(module)
+ _exec(spec, module)
return sys.modules[fullname]
else:
- return methods.load()
-
-
-def _validate_bytecode_header(data, source_stats=None, name=None, path=None):
- """Validate the header of the passed-in bytecode against source_stats (if
- given) and returning the bytecode that can be compiled by compile().
-
- All other arguments are used to enhance error reporting.
-
- ImportError is raised when the magic number is incorrect or the bytecode is
- found to be stale. EOFError is raised when the data is found to be
- truncated.
-
- """
- exc_details = {}
- if name is not None:
- exc_details['name'] = name
- else:
- # To prevent having to make all messages have a conditional name.
- name = '<bytecode>'
- if path is not None:
- exc_details['path'] = path
- magic = data[:4]
- raw_timestamp = data[4:8]
- raw_size = data[8:12]
- if magic != MAGIC_NUMBER:
- message = 'bad magic number in {!r}: {!r}'.format(name, magic)
- _verbose_message('{}', message)
- raise ImportError(message, **exc_details)
- elif len(raw_timestamp) != 4:
- message = 'reached EOF while reading timestamp in {!r}'.format(name)
- _verbose_message('{}', message)
- raise EOFError(message)
- elif len(raw_size) != 4:
- message = 'reached EOF while reading size of source in {!r}'.format(name)
- _verbose_message('{}', message)
- raise EOFError(message)
- if source_stats is not None:
- try:
- source_mtime = int(source_stats['mtime'])
- except KeyError:
- pass
- else:
- if _r_long(raw_timestamp) != source_mtime:
- message = 'bytecode is stale for {!r}'.format(name)
- _verbose_message('{}', message)
- raise ImportError(message, **exc_details)
- try:
- source_size = source_stats['size'] & 0xFFFFFFFF
- except KeyError:
- pass
- else:
- if _r_long(raw_size) != source_size:
- raise ImportError('bytecode is stale for {!r}'.format(name),
- **exc_details)
- return data[12:]
-
-
-def _compile_bytecode(data, name=None, bytecode_path=None, source_path=None):
- """Compile bytecode as returned by _validate_bytecode_header()."""
- code = marshal.loads(data)
- if isinstance(code, _code_type):
- _verbose_message('code object from {!r}', bytecode_path)
- if source_path is not None:
- _imp._fix_co_filename(code, source_path)
- return code
- else:
- raise ImportError('Non-code object in {!r}'.format(bytecode_path),
- name=name, path=bytecode_path)
-
-def _code_to_bytecode(code, mtime=0, source_size=0):
- """Compile a code object into bytecode for writing out to a byte-compiled
- file."""
- data = bytearray(MAGIC_NUMBER)
- data.extend(_w_long(mtime))
- data.extend(_w_long(source_size))
- data.extend(marshal.dumps(code))
- return data
-
-
-def decode_source(source_bytes):
- """Decode bytes representing source code and return the string.
-
- Universal newline support is used in the decoding.
- """
- import tokenize # To avoid bootstrap issues.
- source_bytes_readline = _io.BytesIO(source_bytes).readline
- encoding = tokenize.detect_encoding(source_bytes_readline)
- newline_decoder = _io.IncrementalNewlineDecoder(None, True)
- return newline_decoder.decode(source_bytes.decode(encoding[0]))
-
+ return _load(spec)
# Module specifications #######################################################
@@ -704,7 +286,7 @@ def _module_repr(module):
pass
else:
if spec is not None:
- return _SpecMethods(spec).module_repr()
+ return _module_repr_from_spec(spec)
# We could use module.__class__.__name__ instead of 'module' in the
# various repr permutations.
@@ -825,14 +407,9 @@ class ModuleSpec:
def cached(self):
if self._cached is None:
if self.origin is not None and self._set_fileattr:
- filename = self.origin
- if filename.endswith(tuple(SOURCE_SUFFIXES)):
- try:
- self._cached = cache_from_source(filename)
- except NotImplementedError:
- pass
- elif filename.endswith(tuple(BYTECODE_SUFFIXES)):
- self._cached = filename
+ if _bootstrap_external is None:
+ raise NotImplementedError
+ self._cached = _bootstrap_external._get_cached(self.origin)
return self._cached
@cached.setter
@@ -859,6 +436,10 @@ class ModuleSpec:
def spec_from_loader(name, loader, *, origin=None, is_package=None):
"""Return a module spec based on various loader methods."""
if hasattr(loader, 'get_filename'):
+ if _bootstrap_external is None:
+ raise NotImplementedError
+ spec_from_file_location = _bootstrap_external.spec_from_file_location
+
if is_package is None:
return spec_from_file_location(name, loader=loader)
search = [] if is_package else None
@@ -881,70 +462,6 @@ def spec_from_loader(name, loader, *, origin=None, is_package=None):
_POPULATE = object()
-def spec_from_file_location(name, location=None, *, loader=None,
- submodule_search_locations=_POPULATE):
- """Return a module spec based on a file location.
-
- To indicate that the module is a package, set
- submodule_search_locations to a list of directory paths. An
- empty list is sufficient, though its not otherwise useful to the
- import system.
-
- The loader must take a spec as its only __init__() arg.
-
- """
- if location is None:
- # The caller may simply want a partially populated location-
- # oriented spec. So we set the location to a bogus value and
- # fill in as much as we can.
- location = '<unknown>'
- if hasattr(loader, 'get_filename'):
- # ExecutionLoader
- try:
- location = loader.get_filename(name)
- except ImportError:
- pass
-
- # If the location is on the filesystem, but doesn't actually exist,
- # we could return None here, indicating that the location is not
- # valid. However, we don't have a good way of testing since an
- # indirect location (e.g. a zip file or URL) will look like a
- # non-existent file relative to the filesystem.
-
- spec = ModuleSpec(name, loader, origin=location)
- spec._set_fileattr = True
-
- # Pick a loader if one wasn't provided.
- if loader is None:
- for loader_class, suffixes in _get_supported_file_loaders():
- if location.endswith(tuple(suffixes)):
- loader = loader_class(name, location)
- spec.loader = loader
- break
- else:
- return None
-
- # Set submodule_search_paths appropriately.
- if submodule_search_locations is _POPULATE:
- # Check the loader.
- if hasattr(loader, 'is_package'):
- try:
- is_package = loader.is_package(name)
- except ImportError:
- pass
- else:
- if is_package:
- spec.submodule_search_locations = []
- else:
- spec.submodule_search_locations = submodule_search_locations
- if spec.submodule_search_locations == []:
- if location:
- dirname = _path_split(location)[0]
- spec.submodule_search_locations.append(dirname)
-
- return spec
-
-
def _spec_from_module(module, loader=None, origin=None):
# This function is meant for use in _setup().
try:
@@ -990,257 +507,190 @@ def _spec_from_module(module, loader=None, origin=None):
return spec
-class _SpecMethods:
-
- """Convenience wrapper around spec objects to provide spec-specific
- methods."""
-
- # The various spec_from_* functions could be made factory methods here.
-
- def __init__(self, spec):
- self.spec = spec
-
- def module_repr(self):
- """Return the repr to use for the module."""
- # We mostly replicate _module_repr() using the spec attributes.
- spec = self.spec
- name = '?' if spec.name is None else spec.name
- if spec.origin is None:
- if spec.loader is None:
- return '<module {!r}>'.format(name)
- else:
- return '<module {!r} ({!r})>'.format(name, spec.loader)
- else:
- if spec.has_location:
- return '<module {!r} from {!r}>'.format(name, spec.origin)
- else:
- return '<module {!r} ({})>'.format(spec.name, spec.origin)
-
- def init_module_attrs(self, module, *, _override=False, _force_name=True):
- """Set the module's attributes.
-
- All missing import-related module attributes will be set. Here
- is how the spec attributes map onto the module:
-
- spec.name -> module.__name__
- spec.loader -> module.__loader__
- spec.parent -> module.__package__
- spec -> module.__spec__
-
- Optional:
- spec.origin -> module.__file__ (if spec.set_fileattr is true)
- spec.cached -> module.__cached__ (if __file__ also set)
- spec.submodule_search_locations -> module.__path__ (if set)
-
- """
- spec = self.spec
-
- # The passed in module may be not support attribute assignment,
- # in which case we simply don't set the attributes.
-
- # __name__
- if (_override or _force_name or
- getattr(module, '__name__', None) is None):
- try:
- module.__name__ = spec.name
- except AttributeError:
- pass
+def _init_module_attrs(spec, module, *, override=False):
+ # The passed-in module may be not support attribute assignment,
+ # in which case we simply don't set the attributes.
+ # __name__
+ if (override or getattr(module, '__name__', None) is None):
+ try:
+ module.__name__ = spec.name
+ except AttributeError:
+ pass
+ # __loader__
+ if override or getattr(module, '__loader__', None) is None:
+ loader = spec.loader
+ if loader is None:
+ # A backward compatibility hack.
+ if spec.submodule_search_locations is not None:
+ if _bootstrap_external is None:
+ raise NotImplementedError
+ _NamespaceLoader = _bootstrap_external._NamespaceLoader
- # __loader__
- if _override or getattr(module, '__loader__', None) is None:
- loader = spec.loader
- if loader is None:
- # A backward compatibility hack.
- if spec.submodule_search_locations is not None:
- loader = _NamespaceLoader.__new__(_NamespaceLoader)
- loader._path = spec.submodule_search_locations
+ loader = _NamespaceLoader.__new__(_NamespaceLoader)
+ loader._path = spec.submodule_search_locations
+ try:
+ module.__loader__ = loader
+ except AttributeError:
+ pass
+ # __package__
+ if override or getattr(module, '__package__', None) is None:
+ try:
+ module.__package__ = spec.parent
+ except AttributeError:
+ pass
+ # __spec__
+ try:
+ module.__spec__ = spec
+ except AttributeError:
+ pass
+ # __path__
+ if override or getattr(module, '__path__', None) is None:
+ if spec.submodule_search_locations is not None:
try:
- module.__loader__ = loader
+ module.__path__ = spec.submodule_search_locations
except AttributeError:
pass
-
- # __package__
- if _override or getattr(module, '__package__', None) is None:
+ # __file__/__cached__
+ if spec.has_location:
+ if override or getattr(module, '__file__', None) is None:
try:
- module.__package__ = spec.parent
+ module.__file__ = spec.origin
except AttributeError:
pass
- # __spec__
- try:
- module.__spec__ = spec
- except AttributeError:
- pass
-
- # __path__
- if _override or getattr(module, '__path__', None) is None:
- if spec.submodule_search_locations is not None:
- try:
- module.__path__ = spec.submodule_search_locations
- except AttributeError:
- pass
-
- if spec.has_location:
- # __file__
- if _override or getattr(module, '__file__', None) is None:
+ if override or getattr(module, '__cached__', None) is None:
+ if spec.cached is not None:
try:
- module.__file__ = spec.origin
+ module.__cached__ = spec.cached
except AttributeError:
pass
+ return module
- # __cached__
- if _override or getattr(module, '__cached__', None) is None:
- if spec.cached is not None:
- try:
- module.__cached__ = spec.cached
- except AttributeError:
- pass
- def create(self):
- """Return a new module to be loaded.
+def module_from_spec(spec):
+ """Create a module based on the provided spec."""
+ # Typically loaders will not implement create_module().
+ module = None
+ if hasattr(spec.loader, 'create_module'):
+ # If create_module() returns `None` then it means default
+ # module creation should be used.
+ module = spec.loader.create_module(spec)
+ elif hasattr(spec.loader, 'exec_module'):
+ _warnings.warn('starting in Python 3.6, loaders defining exec_module() '
+ 'must also define create_module()',
+ DeprecationWarning, stacklevel=2)
+ if module is None:
+ module = _new_module(spec.name)
+ _init_module_attrs(spec, module)
+ return module
- The import-related module attributes are also set with the
- appropriate values from the spec.
- """
- spec = self.spec
- # Typically loaders will not implement create_module().
- if hasattr(spec.loader, 'create_module'):
- # If create_module() returns `None` it means the default
- # module creation should be used.
- module = spec.loader.create_module(spec)
+def _module_repr_from_spec(spec):
+ """Return the repr to use for the module."""
+ # We mostly replicate _module_repr() using the spec attributes.
+ name = '?' if spec.name is None else spec.name
+ if spec.origin is None:
+ if spec.loader is None:
+ return '<module {!r}>'.format(name)
else:
- module = None
- if module is None:
- # This must be done before open() is ever called as the 'io'
- # module implicitly imports 'locale' and would otherwise
- # trigger an infinite loop.
- module = _new_module(spec.name)
- self.init_module_attrs(module)
- return module
-
- def _exec(self, module):
- """Do everything necessary to execute the module.
+ return '<module {!r} ({!r})>'.format(name, spec.loader)
+ else:
+ if spec.has_location:
+ return '<module {!r} from {!r}>'.format(name, spec.origin)
+ else:
+ return '<module {!r} ({})>'.format(spec.name, spec.origin)
- The namespace of `module` is used as the target of execution.
- This method uses the loader's `exec_module()` method.
- """
- self.spec.loader.exec_module(module)
+# Used by importlib.reload() and _load_module_shim().
+def _exec(spec, module):
+ """Execute the spec in an existing module's namespace."""
+ name = spec.name
+ _imp.acquire_lock()
+ with _ModuleLockManager(name):
+ if sys.modules.get(name) is not module:
+ msg = 'module {!r} not in sys.modules'.format(name)
+ raise ImportError(msg, name=name)
+ if spec.loader is None:
+ if spec.submodule_search_locations is None:
+ raise ImportError('missing loader', name=spec.name)
+ # namespace package
+ _init_module_attrs(spec, module, override=True)
+ return module
+ _init_module_attrs(spec, module, override=True)
+ if not hasattr(spec.loader, 'exec_module'):
+ # (issue19713) Once BuiltinImporter and ExtensionFileLoader
+ # have exec_module() implemented, we can add a deprecation
+ # warning here.
+ spec.loader.load_module(name)
+ else:
+ spec.loader.exec_module(module)
+ return sys.modules[name]
+
+
+def _load_backward_compatible(spec):
+ # (issue19713) Once BuiltinImporter and ExtensionFileLoader
+ # have exec_module() implemented, we can add a deprecation
+ # warning here.
+ spec.loader.load_module(spec.name)
+ # The module must be in sys.modules at this point!
+ module = sys.modules[spec.name]
+ if getattr(module, '__loader__', None) is None:
+ try:
+ module.__loader__ = spec.loader
+ except AttributeError:
+ pass
+ if getattr(module, '__package__', None) is None:
+ try:
+ # Since module.__path__ may not line up with
+ # spec.submodule_search_paths, we can't necessarily rely
+ # on spec.parent here.
+ module.__package__ = module.__name__
+ if not hasattr(module, '__path__'):
+ module.__package__ = spec.name.rpartition('.')[0]
+ except AttributeError:
+ pass
+ if getattr(module, '__spec__', None) is None:
+ try:
+ module.__spec__ = spec
+ except AttributeError:
+ pass
+ return module
- # Used by importlib.reload() and _load_module_shim().
- def exec(self, module):
- """Execute the spec in an existing module's namespace."""
- name = self.spec.name
- _imp.acquire_lock()
- with _ModuleLockManager(name):
- if sys.modules.get(name) is not module:
- msg = 'module {!r} not in sys.modules'.format(name)
- raise ImportError(msg, name=name)
- if self.spec.loader is None:
- if self.spec.submodule_search_locations is None:
- raise ImportError('missing loader', name=self.spec.name)
- # namespace package
- self.init_module_attrs(module, _override=True)
- return module
- self.init_module_attrs(module, _override=True)
- if not hasattr(self.spec.loader, 'exec_module'):
- # (issue19713) Once BuiltinImporter and ExtensionFileLoader
- # have exec_module() implemented, we can add a deprecation
- # warning here.
- self.spec.loader.load_module(name)
- else:
- self._exec(module)
- return sys.modules[name]
-
- def _load_backward_compatible(self):
- # (issue19713) Once BuiltinImporter and ExtensionFileLoader
- # have exec_module() implemented, we can add a deprecation
- # warning here.
- spec = self.spec
- spec.loader.load_module(spec.name)
- # The module must be in sys.modules at this point!
- module = sys.modules[spec.name]
- if getattr(module, '__loader__', None) is None:
- try:
- module.__loader__ = spec.loader
- except AttributeError:
- pass
- if getattr(module, '__package__', None) is None:
- try:
- # Since module.__path__ may not line up with
- # spec.submodule_search_paths, we can't necessarily rely
- # on spec.parent here.
- module.__package__ = module.__name__
- if not hasattr(module, '__path__'):
- module.__package__ = spec.name.rpartition('.')[0]
- except AttributeError:
- pass
- if getattr(module, '__spec__', None) is None:
- try:
- module.__spec__ = spec
- except AttributeError:
- pass
- return module
-
- def _load_unlocked(self):
- # A helper for direct use by the import system.
- if self.spec.loader is not None:
- # not a namespace package
- if not hasattr(self.spec.loader, 'exec_module'):
- return self._load_backward_compatible()
-
- module = self.create()
- with _installed_safely(module):
- if self.spec.loader is None:
- if self.spec.submodule_search_locations is None:
- raise ImportError('missing loader', name=self.spec.name)
- # A namespace package so do nothing.
- else:
- self._exec(module)
+def _load_unlocked(spec):
+ # A helper for direct use by the import system.
+ if spec.loader is not None:
+ # not a namespace package
+ if not hasattr(spec.loader, 'exec_module'):
+ return _load_backward_compatible(spec)
+
+ module = module_from_spec(spec)
+ with _installed_safely(module):
+ if spec.loader is None:
+ if spec.submodule_search_locations is None:
+ raise ImportError('missing loader', name=spec.name)
+ # A namespace package so do nothing.
+ else:
+ spec.loader.exec_module(module)
- # We don't ensure that the import-related module attributes get
- # set in the sys.modules replacement case. Such modules are on
- # their own.
- return sys.modules[self.spec.name]
+ # We don't ensure that the import-related module attributes get
+ # set in the sys.modules replacement case. Such modules are on
+ # their own.
+ return sys.modules[spec.name]
- # A method used during testing of _load_unlocked() and by
- # _load_module_shim().
- def load(self):
- """Return a new module object, loaded by the spec's loader.
+# A method used during testing of _load_unlocked() and by
+# _load_module_shim().
+def _load(spec):
+ """Return a new module object, loaded by the spec's loader.
- The module is not added to its parent.
+ The module is not added to its parent.
- If a module is already in sys.modules, that existing module gets
- clobbered.
+ If a module is already in sys.modules, that existing module gets
+ clobbered.
- """
- _imp.acquire_lock()
- with _ModuleLockManager(self.spec.name):
- return self._load_unlocked()
-
-
-def _fix_up_module(ns, name, pathname, cpathname=None):
- # This function is used by PyImport_ExecCodeModuleObject().
- loader = ns.get('__loader__')
- spec = ns.get('__spec__')
- if not loader:
- if spec:
- loader = spec.loader
- elif pathname == cpathname:
- loader = SourcelessFileLoader(name, pathname)
- else:
- loader = SourceFileLoader(name, pathname)
- if not spec:
- spec = spec_from_file_location(name, pathname, loader=loader)
- try:
- ns['__spec__'] = spec
- ns['__loader__'] = loader
- ns['__file__'] = pathname
- ns['__cached__'] = cpathname
- except Exception:
- # Not important enough to report.
- pass
+ """
+ _imp.acquire_lock()
+ with _ModuleLockManager(spec.name):
+ return _load_unlocked(spec)
# Loaders #####################################################################
@@ -1285,16 +735,17 @@ class BuiltinImporter:
return spec.loader if spec is not None else None
@classmethod
- @_requires_builtin
- def load_module(cls, fullname):
- """Load a built-in module."""
- # Once an exec_module() implementation is added we can also
- # add a deprecation warning here.
- with _ManageReload(fullname):
- module = _call_with_frames_removed(_imp.init_builtin, fullname)
- module.__loader__ = cls
- module.__package__ = ''
- return module
+ def create_module(self, spec):
+ """Create a built-in module"""
+ if spec.name not in sys.builtin_module_names:
+ raise ImportError('{!r} is not a built-in module'.format(spec.name),
+ name=spec.name)
+ return _call_with_frames_removed(_imp.create_builtin, spec)
+
+ @classmethod
+ def exec_module(self, module):
+ """Exec a built-in module"""
+ _call_with_frames_removed(_imp.exec_builtin, module)
@classmethod
@_requires_builtin
@@ -1314,6 +765,8 @@ class BuiltinImporter:
"""Return False as built-in modules are never packages."""
return False
+ load_module = classmethod(_load_module_shim)
+
class FrozenImporter:
@@ -1349,6 +802,10 @@ class FrozenImporter:
"""
return cls if _imp.is_frozen(fullname) else None
+ @classmethod
+ def create_module(cls, spec):
+ """Use default semantics for module creation."""
+
@staticmethod
def exec_module(module):
name = module.__spec__.name
@@ -1386,731 +843,6 @@ class FrozenImporter:
return _imp.is_frozen_package(fullname)
-class WindowsRegistryFinder:
-
- """Meta path finder for modules declared in the Windows registry."""
-
- REGISTRY_KEY = (
- 'Software\\Python\\PythonCore\\{sys_version}'
- '\\Modules\\{fullname}')
- REGISTRY_KEY_DEBUG = (
- 'Software\\Python\\PythonCore\\{sys_version}'
- '\\Modules\\{fullname}\\Debug')
- DEBUG_BUILD = False # Changed in _setup()
-
- @classmethod
- def _open_registry(cls, key):
- try:
- return _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, key)
- except OSError:
- return _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, key)
-
- @classmethod
- def _search_registry(cls, fullname):
- if cls.DEBUG_BUILD:
- registry_key = cls.REGISTRY_KEY_DEBUG
- else:
- registry_key = cls.REGISTRY_KEY
- key = registry_key.format(fullname=fullname,
- sys_version=sys.version[:3])
- try:
- with cls._open_registry(key) as hkey:
- filepath = _winreg.QueryValue(hkey, '')
- except OSError:
- return None
- return filepath
-
- @classmethod
- def find_spec(cls, fullname, path=None, target=None):
- filepath = cls._search_registry(fullname)
- if filepath is None:
- return None
- try:
- _path_stat(filepath)
- except OSError:
- return None
- for loader, suffixes in _get_supported_file_loaders():
- if filepath.endswith(tuple(suffixes)):
- spec = spec_from_loader(fullname, loader(fullname, filepath),
- origin=filepath)
- return spec
-
- @classmethod
- def find_module(cls, fullname, path=None):
- """Find module named in the registry.
-
- This method is deprecated. Use exec_module() instead.
-
- """
- spec = cls.find_spec(fullname, path)
- if spec is not None:
- return spec.loader
- else:
- return None
-
-
-class _LoaderBasics:
-
- """Base class of common code needed by both SourceLoader and
- SourcelessFileLoader."""
-
- def is_package(self, fullname):
- """Concrete implementation of InspectLoader.is_package by checking if
- the path returned by get_filename has a filename of '__init__.py'."""
- filename = _path_split(self.get_filename(fullname))[1]
- filename_base = filename.rsplit('.', 1)[0]
- tail_name = fullname.rpartition('.')[2]
- return filename_base == '__init__' and tail_name != '__init__'
-
- def exec_module(self, module):
- """Execute the module."""
- code = self.get_code(module.__name__)
- if code is None:
- raise ImportError('cannot load module {!r} when get_code() '
- 'returns None'.format(module.__name__))
- _call_with_frames_removed(exec, code, module.__dict__)
-
- load_module = _load_module_shim
-
-
-class SourceLoader(_LoaderBasics):
-
- def path_mtime(self, path):
- """Optional method that returns the modification time (an int) for the
- specified path, where path is a str.
-
- Raises IOError when the path cannot be handled.
- """
- raise IOError
-
- def path_stats(self, path):
- """Optional method returning a metadata dict for the specified path
- to by the path (str).
- Possible keys:
- - 'mtime' (mandatory) is the numeric timestamp of last source
- code modification;
- - 'size' (optional) is the size in bytes of the source code.
-
- Implementing this method allows the loader to read bytecode files.
- Raises IOError when the path cannot be handled.
- """
- return {'mtime': self.path_mtime(path)}
-
- def _cache_bytecode(self, source_path, cache_path, data):
- """Optional method which writes data (bytes) to a file path (a str).
-
- Implementing this method allows for the writing of bytecode files.
-
- The source path is needed in order to correctly transfer permissions
- """
- # For backwards compatibility, we delegate to set_data()
- return self.set_data(cache_path, data)
-
- def set_data(self, path, data):
- """Optional method which writes data (bytes) to a file path (a str).
-
- Implementing this method allows for the writing of bytecode files.
- """
-
-
- def get_source(self, fullname):
- """Concrete implementation of InspectLoader.get_source."""
- path = self.get_filename(fullname)
- try:
- source_bytes = self.get_data(path)
- except OSError as exc:
- raise ImportError('source not available through get_data()',
- name=fullname) from exc
- return decode_source(source_bytes)
-
- def source_to_code(self, data, path, *, _optimize=-1):
- """Return the code object compiled from source.
-
- The 'data' argument can be any object type that compile() supports.
- """
- return _call_with_frames_removed(compile, data, path, 'exec',
- dont_inherit=True, optimize=_optimize)
-
- def get_code(self, fullname):
- """Concrete implementation of InspectLoader.get_code.
-
- Reading of bytecode requires path_stats to be implemented. To write
- bytecode, set_data must also be implemented.
-
- """
- source_path = self.get_filename(fullname)
- source_mtime = None
- try:
- bytecode_path = cache_from_source(source_path)
- except NotImplementedError:
- bytecode_path = None
- else:
- try:
- st = self.path_stats(source_path)
- except IOError:
- pass
- else:
- source_mtime = int(st['mtime'])
- try:
- data = self.get_data(bytecode_path)
- except OSError:
- pass
- else:
- try:
- bytes_data = _validate_bytecode_header(data,
- source_stats=st, name=fullname,
- path=bytecode_path)
- except (ImportError, EOFError):
- pass
- else:
- _verbose_message('{} matches {}', bytecode_path,
- source_path)
- return _compile_bytecode(bytes_data, name=fullname,
- bytecode_path=bytecode_path,
- source_path=source_path)
- source_bytes = self.get_data(source_path)
- code_object = self.source_to_code(source_bytes, source_path)
- _verbose_message('code object from {}', source_path)
- if (not sys.dont_write_bytecode and bytecode_path is not None and
- source_mtime is not None):
- data = _code_to_bytecode(code_object, source_mtime,
- len(source_bytes))
- try:
- self._cache_bytecode(source_path, bytecode_path, data)
- _verbose_message('wrote {!r}', bytecode_path)
- except NotImplementedError:
- pass
- return code_object
-
-
-class FileLoader:
-
- """Base file loader class which implements the loader protocol methods that
- require file system usage."""
-
- def __init__(self, fullname, path):
- """Cache the module name and the path to the file found by the
- finder."""
- self.name = fullname
- self.path = path
-
- def __eq__(self, other):
- return (self.__class__ == other.__class__ and
- self.__dict__ == other.__dict__)
-
- def __hash__(self):
- return hash(self.name) ^ hash(self.path)
-
- @_check_name
- def load_module(self, fullname):
- """Load a module from a file.
-
- This method is deprecated. Use exec_module() instead.
-
- """
- # The only reason for this method is for the name check.
- # Issue #14857: Avoid the zero-argument form of super so the implementation
- # of that form can be updated without breaking the frozen module
- return super(FileLoader, self).load_module(fullname)
-
- @_check_name
- def get_filename(self, fullname):
- """Return the path to the source file as found by the finder."""
- return self.path
-
- def get_data(self, path):
- """Return the data from path as raw bytes."""
- with _io.FileIO(path, 'r') as file:
- return file.read()
-
-
-class SourceFileLoader(FileLoader, SourceLoader):
-
- """Concrete implementation of SourceLoader using the file system."""
-
- def path_stats(self, path):
- """Return the metadata for the path."""
- st = _path_stat(path)
- return {'mtime': st.st_mtime, 'size': st.st_size}
-
- def _cache_bytecode(self, source_path, bytecode_path, data):
- # Adapt between the two APIs
- mode = _calc_mode(source_path)
- return self.set_data(bytecode_path, data, _mode=mode)
-
- def set_data(self, path, data, *, _mode=0o666):
- """Write bytes data to a file."""
- parent, filename = _path_split(path)
- path_parts = []
- # Figure out what directories are missing.
- while parent and not _path_isdir(parent):
- parent, part = _path_split(parent)
- path_parts.append(part)
- # Create needed directories.
- for part in reversed(path_parts):
- parent = _path_join(parent, part)
- try:
- _os.mkdir(parent)
- except FileExistsError:
- # Probably another Python process already created the dir.
- continue
- except OSError as exc:
- # Could be a permission error, read-only filesystem: just forget
- # about writing the data.
- _verbose_message('could not create {!r}: {!r}', parent, exc)
- return
- try:
- _write_atomic(path, data, _mode)
- _verbose_message('created {!r}', path)
- except OSError as exc:
- # Same as above: just don't write the bytecode.
- _verbose_message('could not create {!r}: {!r}', path, exc)
-
-
-class SourcelessFileLoader(FileLoader, _LoaderBasics):
-
- """Loader which handles sourceless file imports."""
-
- def get_code(self, fullname):
- path = self.get_filename(fullname)
- data = self.get_data(path)
- bytes_data = _validate_bytecode_header(data, name=fullname, path=path)
- return _compile_bytecode(bytes_data, name=fullname, bytecode_path=path)
-
- def get_source(self, fullname):
- """Return None as there is no source code."""
- return None
-
-
-# Filled in by _setup().
-EXTENSION_SUFFIXES = []
-
-
-class ExtensionFileLoader:
-
- """Loader for extension modules.
-
- The constructor is designed to work with FileFinder.
-
- """
-
- def __init__(self, name, path):
- self.name = name
- self.path = path
-
- def __eq__(self, other):
- return (self.__class__ == other.__class__ and
- self.__dict__ == other.__dict__)
-
- def __hash__(self):
- return hash(self.name) ^ hash(self.path)
-
- @_check_name
- def load_module(self, fullname):
- """Load an extension module."""
- # Once an exec_module() implementation is added we can also
- # add a deprecation warning here.
- with _ManageReload(fullname):
- module = _call_with_frames_removed(_imp.load_dynamic,
- fullname, self.path)
- _verbose_message('extension module loaded from {!r}', self.path)
- is_package = self.is_package(fullname)
- if is_package and not hasattr(module, '__path__'):
- module.__path__ = [_path_split(self.path)[0]]
- module.__loader__ = self
- module.__package__ = module.__name__
- if not is_package:
- module.__package__ = module.__package__.rpartition('.')[0]
- return module
-
- def is_package(self, fullname):
- """Return True if the extension module is a package."""
- file_name = _path_split(self.path)[1]
- return any(file_name == '__init__' + suffix
- for suffix in EXTENSION_SUFFIXES)
-
- def get_code(self, fullname):
- """Return None as an extension module cannot create a code object."""
- return None
-
- def get_source(self, fullname):
- """Return None as extension modules have no source code."""
- return None
-
- @_check_name
- def get_filename(self, fullname):
- """Return the path to the source file as found by the finder."""
- return self.path
-
-
-class _NamespacePath:
- """Represents a namespace package's path. It uses the module name
- to find its parent module, and from there it looks up the parent's
- __path__. When this changes, the module's own path is recomputed,
- using path_finder. For top-level modules, the parent module's path
- is sys.path."""
-
- def __init__(self, name, path, path_finder):
- self._name = name
- self._path = path
- self._last_parent_path = tuple(self._get_parent_path())
- self._path_finder = path_finder
-
- def _find_parent_path_names(self):
- """Returns a tuple of (parent-module-name, parent-path-attr-name)"""
- parent, dot, me = self._name.rpartition('.')
- if dot == '':
- # This is a top-level module. sys.path contains the parent path.
- return 'sys', 'path'
- # Not a top-level module. parent-module.__path__ contains the
- # parent path.
- return parent, '__path__'
-
- def _get_parent_path(self):
- parent_module_name, path_attr_name = self._find_parent_path_names()
- return getattr(sys.modules[parent_module_name], path_attr_name)
-
- def _recalculate(self):
- # If the parent's path has changed, recalculate _path
- parent_path = tuple(self._get_parent_path()) # Make a copy
- if parent_path != self._last_parent_path:
- spec = self._path_finder(self._name, parent_path)
- # Note that no changes are made if a loader is returned, but we
- # do remember the new parent path
- if spec is not None and spec.loader is None:
- if spec.submodule_search_locations:
- self._path = spec.submodule_search_locations
- self._last_parent_path = parent_path # Save the copy
- return self._path
-
- def __iter__(self):
- return iter(self._recalculate())
-
- def __len__(self):
- return len(self._recalculate())
-
- def __repr__(self):
- return '_NamespacePath({!r})'.format(self._path)
-
- def __contains__(self, item):
- return item in self._recalculate()
-
- def append(self, item):
- self._path.append(item)
-
-
-# We use this exclusively in init_module_attrs() for backward-compatibility.
-class _NamespaceLoader:
- def __init__(self, name, path, path_finder):
- self._path = _NamespacePath(name, path, path_finder)
-
- @classmethod
- def module_repr(cls, module):
- """Return repr for the module.
-
- The method is deprecated. The import machinery does the job itself.
-
- """
- return '<module {!r} (namespace)>'.format(module.__name__)
-
- def is_package(self, fullname):
- return True
-
- def get_source(self, fullname):
- return ''
-
- def get_code(self, fullname):
- return compile('', '<string>', 'exec', dont_inherit=True)
-
- def exec_module(self, module):
- pass
-
- def load_module(self, fullname):
- """Load a namespace module.
-
- This method is deprecated. Use exec_module() instead.
-
- """
- # The import system never calls this method.
- _verbose_message('namespace module loaded with path {!r}', self._path)
- return _load_module_shim(self, fullname)
-
-
-# Finders #####################################################################
-
-class PathFinder:
-
- """Meta path finder for sys.path and package __path__ attributes."""
-
- @classmethod
- def invalidate_caches(cls):
- """Call the invalidate_caches() method on all path entry finders
- stored in sys.path_importer_caches (where implemented)."""
- for finder in sys.path_importer_cache.values():
- if hasattr(finder, 'invalidate_caches'):
- finder.invalidate_caches()
-
- @classmethod
- def _path_hooks(cls, path):
- """Search sequence of hooks for a finder for 'path'.
-
- If 'hooks' is false then use sys.path_hooks.
-
- """
- if not sys.path_hooks:
- _warnings.warn('sys.path_hooks is empty', ImportWarning)
- for hook in sys.path_hooks:
- try:
- return hook(path)
- except ImportError:
- continue
- else:
- return None
-
- @classmethod
- def _path_importer_cache(cls, path):
- """Get the finder for the path entry from sys.path_importer_cache.
-
- If the path entry is not in the cache, find the appropriate finder
- and cache it. If no finder is available, store None.
-
- """
- if path == '':
- path = _os.getcwd()
- try:
- finder = sys.path_importer_cache[path]
- except KeyError:
- finder = cls._path_hooks(path)
- sys.path_importer_cache[path] = finder
- return finder
-
- @classmethod
- def _legacy_get_spec(cls, fullname, finder):
- # This would be a good place for a DeprecationWarning if
- # we ended up going that route.
- if hasattr(finder, 'find_loader'):
- loader, portions = finder.find_loader(fullname)
- else:
- loader = finder.find_module(fullname)
- portions = []
- if loader is not None:
- return spec_from_loader(fullname, loader)
- spec = ModuleSpec(fullname, None)
- spec.submodule_search_locations = portions
- return spec
-
- @classmethod
- def _get_spec(cls, fullname, path, target=None):
- """Find the loader or namespace_path for this module/package name."""
- # If this ends up being a namespace package, namespace_path is
- # the list of paths that will become its __path__
- namespace_path = []
- for entry in path:
- if not isinstance(entry, (str, bytes)):
- continue
- finder = cls._path_importer_cache(entry)
- if finder is not None:
- if hasattr(finder, 'find_spec'):
- spec = finder.find_spec(fullname, target)
- else:
- spec = cls._legacy_get_spec(fullname, finder)
- if spec is None:
- continue
- if spec.loader is not None:
- return spec
- portions = spec.submodule_search_locations
- if portions is None:
- raise ImportError('spec missing loader')
- # This is possibly part of a namespace package.
- # Remember these path entries (if any) for when we
- # create a namespace package, and continue iterating
- # on path.
- namespace_path.extend(portions)
- else:
- spec = ModuleSpec(fullname, None)
- spec.submodule_search_locations = namespace_path
- return spec
-
- @classmethod
- def find_spec(cls, fullname, path=None, target=None):
- """find the module on sys.path or 'path' based on sys.path_hooks and
- sys.path_importer_cache."""
- if path is None:
- path = sys.path
- spec = cls._get_spec(fullname, path, target)
- if spec is None:
- return None
- elif spec.loader is None:
- namespace_path = spec.submodule_search_locations
- if namespace_path:
- # We found at least one namespace path. Return a
- # spec which can create the namespace package.
- spec.origin = 'namespace'
- spec.submodule_search_locations = _NamespacePath(fullname, namespace_path, cls._get_spec)
- return spec
- else:
- return None
- else:
- return spec
-
- @classmethod
- def find_module(cls, fullname, path=None):
- """find the module on sys.path or 'path' based on sys.path_hooks and
- sys.path_importer_cache.
-
- This method is deprecated. Use find_spec() instead.
-
- """
- spec = cls.find_spec(fullname, path)
- if spec is None:
- return None
- return spec.loader
-
-
-class FileFinder:
-
- """File-based finder.
-
- Interactions with the file system are cached for performance, being
- refreshed when the directory the finder is handling has been modified.
-
- """
-
- def __init__(self, path, *loader_details):
- """Initialize with the path to search on and a variable number of
- 2-tuples containing the loader and the file suffixes the loader
- recognizes."""
- loaders = []
- for loader, suffixes in loader_details:
- loaders.extend((suffix, loader) for suffix in suffixes)
- self._loaders = loaders
- # Base (directory) path
- self.path = path or '.'
- self._path_mtime = -1
- self._path_cache = set()
- self._relaxed_path_cache = set()
-
- def invalidate_caches(self):
- """Invalidate the directory mtime."""
- self._path_mtime = -1
-
- find_module = _find_module_shim
-
- def find_loader(self, fullname):
- """Try to find a loader for the specified module, or the namespace
- package portions. Returns (loader, list-of-portions).
-
- This method is deprecated. Use find_spec() instead.
-
- """
- spec = self.find_spec(fullname)
- if spec is None:
- return None, []
- return spec.loader, spec.submodule_search_locations or []
-
- def _get_spec(self, loader_class, fullname, path, smsl, target):
- loader = loader_class(fullname, path)
- return spec_from_file_location(fullname, path, loader=loader,
- submodule_search_locations=smsl)
-
- def find_spec(self, fullname, target=None):
- """Try to find a loader for the specified module, or the namespace
- package portions. Returns (loader, list-of-portions)."""
- is_namespace = False
- tail_module = fullname.rpartition('.')[2]
- try:
- mtime = _path_stat(self.path or _os.getcwd()).st_mtime
- except OSError:
- mtime = -1
- if mtime != self._path_mtime:
- self._fill_cache()
- self._path_mtime = mtime
- # tail_module keeps the original casing, for __file__ and friends
- if _relax_case():
- cache = self._relaxed_path_cache
- cache_module = tail_module.lower()
- else:
- cache = self._path_cache
- cache_module = tail_module
- # Check if the module is the name of a directory (and thus a package).
- if cache_module in cache:
- base_path = _path_join(self.path, tail_module)
- for suffix, loader_class in self._loaders:
- init_filename = '__init__' + suffix
- full_path = _path_join(base_path, init_filename)
- if _path_isfile(full_path):
- return self._get_spec(loader_class, fullname, full_path, [base_path], target)
- else:
- # If a namespace package, return the path if we don't
- # find a module in the next section.
- is_namespace = _path_isdir(base_path)
- # Check for a file w/ a proper suffix exists.
- for suffix, loader_class in self._loaders:
- full_path = _path_join(self.path, tail_module + suffix)
- _verbose_message('trying {}'.format(full_path), verbosity=2)
- if cache_module + suffix in cache:
- if _path_isfile(full_path):
- return self._get_spec(loader_class, fullname, full_path, None, target)
- if is_namespace:
- _verbose_message('possible namespace for {}'.format(base_path))
- spec = ModuleSpec(fullname, None)
- spec.submodule_search_locations = [base_path]
- return spec
- return None
-
- def _fill_cache(self):
- """Fill the cache of potential modules and packages for this directory."""
- path = self.path
- try:
- contents = _os.listdir(path or _os.getcwd())
- except (FileNotFoundError, PermissionError, NotADirectoryError):
- # Directory has either been removed, turned into a file, or made
- # unreadable.
- contents = []
- # We store two cached versions, to handle runtime changes of the
- # PYTHONCASEOK environment variable.
- if not sys.platform.startswith('win'):
- self._path_cache = set(contents)
- else:
- # Windows users can import modules with case-insensitive file
- # suffixes (for legacy reasons). Make the suffix lowercase here
- # so it's done once instead of for every import. This is safe as
- # the specified suffixes to check against are always specified in a
- # case-sensitive manner.
- lower_suffix_contents = set()
- for item in contents:
- name, dot, suffix = item.partition('.')
- if dot:
- new_name = '{}.{}'.format(name, suffix.lower())
- else:
- new_name = name
- lower_suffix_contents.add(new_name)
- self._path_cache = lower_suffix_contents
- if sys.platform.startswith(_CASE_INSENSITIVE_PLATFORMS):
- self._relaxed_path_cache = {fn.lower() for fn in contents}
-
- @classmethod
- def path_hook(cls, *loader_details):
- """A class method which returns a closure to use on sys.path_hook
- which will return an instance using the specified loaders and the path
- called on the closure.
-
- If the path called on the closure is not a directory, ImportError is
- raised.
-
- """
- def path_hook_for_FileFinder(path):
- """Path hook for importlib.machinery.FileFinder."""
- if not _path_isdir(path):
- raise ImportError('only directories are supported', path=path)
- return cls(path, *loader_details)
-
- return path_hook_for_FileFinder
-
- def __repr__(self):
- return 'FileFinder({!r})'.format(self.path)
-
-
# Import itself ###############################################################
class _ImportLockContext:
@@ -2146,7 +878,7 @@ def _find_spec_legacy(finder, name, path):
def _find_spec(name, path, target=None):
"""Find a module's loader."""
- if not sys.meta_path:
+ if sys.meta_path is not None and not sys.meta_path:
_warnings.warn('sys.meta_path is empty', ImportWarning)
# We check sys.modules here for the reload case. While a passed-in
# target will usually indicate a reload there is no guarantee, whereas
@@ -2190,7 +922,7 @@ def _sanity_check(name, package, level):
raise TypeError('module name must be str, not {}'.format(type(name)))
if level < 0:
raise ValueError('level must be >= 0')
- if package:
+ if level > 0:
if not isinstance(package, str):
raise TypeError('__package__ not set to a string')
elif package not in sys.modules:
@@ -2218,12 +950,12 @@ def _find_and_load_unlocked(name, import_):
path = parent_module.__path__
except AttributeError:
msg = (_ERR_MSG + '; {!r} is not a package').format(name, parent)
- raise ImportError(msg, name=name)
+ raise ImportError(msg, name=name) from None
spec = _find_spec(name, path)
if spec is None:
raise ImportError(_ERR_MSG.format(name), name=name)
else:
- module = _SpecMethods(spec)._load_unlocked()
+ module = _load_unlocked(spec)
if parent:
# Set the module as an attribute on its parent.
parent_module = sys.modules[parent]
@@ -2308,21 +1040,10 @@ def _calc___package__(globals):
return package
-def _get_supported_file_loaders():
- """Returns a list of file-based module loaders.
-
- Each item is a tuple (loader, suffixes).
- """
- extensions = ExtensionFileLoader, _imp.extension_suffixes()
- source = SourceFileLoader, SOURCE_SUFFIXES
- bytecode = SourcelessFileLoader, BYTECODE_SUFFIXES
- return [extensions, source, bytecode]
-
-
def __import__(name, globals=None, locals=None, fromlist=(), level=0):
"""Import a module.
- The 'globals' argument is used to infer where the import is occuring from
+ The 'globals' argument is used to infer where the import is occurring from
to handle relative imports. The 'locals' argument is ignored. The
'fromlist' argument specifies what should exist as attributes on the module
being imported (e.g. ``from module import <fromlist>``). The 'level'
@@ -2358,8 +1079,7 @@ def _builtin_from_name(name):
spec = BuiltinImporter.find_spec(name)
if spec is None:
raise ImportError('no built-in module named ' + name)
- methods = _SpecMethods(spec)
- return methods._load_unlocked()
+ return _load_unlocked(spec)
def _setup(sys_module, _imp_module):
@@ -2370,15 +1090,10 @@ def _setup(sys_module, _imp_module):
modules, those two modules must be explicitly passed in.
"""
- global _imp, sys, BYTECODE_SUFFIXES
+ global _imp, sys
_imp = _imp_module
sys = sys_module
- if sys.flags.optimize:
- BYTECODE_SUFFIXES = OPTIMIZED_BYTECODE_SUFFIXES
- else:
- BYTECODE_SUFFIXES = DEBUG_BYTECODE_SUFFIXES
-
# Set up the spec for existing builtin/frozen modules.
module_type = type(sys)
for name, module in sys.modules.items():
@@ -2390,39 +1105,17 @@ def _setup(sys_module, _imp_module):
else:
continue
spec = _spec_from_module(module, loader)
- methods = _SpecMethods(spec)
- methods.init_module_attrs(module)
+ _init_module_attrs(spec, module)
# Directly load built-in modules needed during bootstrap.
self_module = sys.modules[__name__]
- for builtin_name in ('_io', '_warnings', 'builtins', 'marshal'):
+ for builtin_name in ('_warnings',):
if builtin_name not in sys.modules:
builtin_module = _builtin_from_name(builtin_name)
else:
builtin_module = sys.modules[builtin_name]
setattr(self_module, builtin_name, builtin_module)
- # Directly load the os module (needed during bootstrap).
- os_details = ('posix', ['/']), ('nt', ['\\', '/'])
- for builtin_os, path_separators in os_details:
- # Assumption made in _path_join()
- assert all(len(sep) == 1 for sep in path_separators)
- path_sep = path_separators[0]
- if builtin_os in sys.modules:
- os_module = sys.modules[builtin_os]
- break
- else:
- try:
- os_module = _builtin_from_name(builtin_os)
- break
- except ImportError:
- continue
- else:
- raise ImportError('importlib requires posix or nt')
- setattr(self_module, '_os', os_module)
- setattr(self_module, 'path_sep', path_sep)
- setattr(self_module, 'path_separators', ''.join(path_separators))
-
# Directly load the _thread module (needed during bootstrap).
try:
thread_module = _builtin_from_name('_thread')
@@ -2435,27 +1128,15 @@ def _setup(sys_module, _imp_module):
weakref_module = _builtin_from_name('_weakref')
setattr(self_module, '_weakref', weakref_module)
- # Directly load the winreg module (needed during bootstrap).
- if builtin_os == 'nt':
- winreg_module = _builtin_from_name('winreg')
- setattr(self_module, '_winreg', winreg_module)
-
- # Constants
- setattr(self_module, '_relax_case', _make_relax_case())
- EXTENSION_SUFFIXES.extend(_imp.extension_suffixes())
- if builtin_os == 'nt':
- SOURCE_SUFFIXES.append('.pyw')
- if '_d.pyd' in EXTENSION_SUFFIXES:
- WindowsRegistryFinder.DEBUG_BUILD = True
-
def _install(sys_module, _imp_module):
"""Install importlib as the implementation of import."""
_setup(sys_module, _imp_module)
- supported_loaders = _get_supported_file_loaders()
- sys.path_hooks.extend([FileFinder.path_hook(*supported_loaders)])
+
sys.meta_path.append(BuiltinImporter)
sys.meta_path.append(FrozenImporter)
- if _os.__name__ == 'nt':
- sys.meta_path.append(WindowsRegistryFinder)
- sys.meta_path.append(PathFinder)
+
+ global _bootstrap_external
+ import _frozen_importlib_external
+ _bootstrap_external = _frozen_importlib_external
+ _frozen_importlib_external._install(sys.modules[__name__])
diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py
new file mode 100644
index 0000000000..9788828688
--- /dev/null
+++ b/Lib/importlib/_bootstrap_external.py
@@ -0,0 +1,1429 @@
+"""Core implementation of path-based import.
+
+This module is NOT meant to be directly imported! It has been designed such
+that it can be bootstrapped into Python as the implementation of import. As
+such it requires the injection of specific modules and attributes in order to
+work. One should use importlib as the public-facing version of this module.
+
+"""
+#
+# IMPORTANT: Whenever making changes to this module, be sure to run
+# a top-level make in order to get the frozen version of the module
+# updated. Not doing so will result in the Makefile to fail for
+# all others who don't have a ./python around to freeze the module
+# in the early stages of compilation.
+#
+
+# See importlib._setup() for what is injected into the global namespace.
+
+# When editing this code be aware that code executed at import time CANNOT
+# reference any injected objects! This includes not only global code but also
+# anything specified at the class level.
+
+# Bootstrap-related code ######################################################
+
+_CASE_INSENSITIVE_PLATFORMS = 'win', 'cygwin', 'darwin'
+
+
+def _make_relax_case():
+ if sys.platform.startswith(_CASE_INSENSITIVE_PLATFORMS):
+ def _relax_case():
+ """True if filenames must be checked case-insensitively."""
+ return b'PYTHONCASEOK' in _os.environ
+ else:
+ def _relax_case():
+ """True if filenames must be checked case-insensitively."""
+ return False
+ return _relax_case
+
+
+def _w_long(x):
+ """Convert a 32-bit integer to little-endian."""
+ return (int(x) & 0xFFFFFFFF).to_bytes(4, 'little')
+
+
+def _r_long(int_bytes):
+ """Convert 4 bytes in little-endian to an integer."""
+ return int.from_bytes(int_bytes, 'little')
+
+
+def _path_join(*path_parts):
+ """Replacement for os.path.join()."""
+ return path_sep.join([part.rstrip(path_separators)
+ for part in path_parts if part])
+
+
+def _path_split(path):
+ """Replacement for os.path.split()."""
+ if len(path_separators) == 1:
+ front, _, tail = path.rpartition(path_sep)
+ return front, tail
+ for x in reversed(path):
+ if x in path_separators:
+ front, tail = path.rsplit(x, maxsplit=1)
+ return front, tail
+ return '', path
+
+
+def _path_stat(path):
+ """Stat the path.
+
+ Made a separate function to make it easier to override in experiments
+ (e.g. cache stat results).
+
+ """
+ return _os.stat(path)
+
+
+def _path_is_mode_type(path, mode):
+ """Test whether the path is the specified mode type."""
+ try:
+ stat_info = _path_stat(path)
+ except OSError:
+ return False
+ return (stat_info.st_mode & 0o170000) == mode
+
+
+def _path_isfile(path):
+ """Replacement for os.path.isfile."""
+ return _path_is_mode_type(path, 0o100000)
+
+
+def _path_isdir(path):
+ """Replacement for os.path.isdir."""
+ if not path:
+ path = _os.getcwd()
+ return _path_is_mode_type(path, 0o040000)
+
+
+def _write_atomic(path, data, mode=0o666):
+ """Best-effort function to write data to a path atomically.
+ Be prepared to handle a FileExistsError if concurrent writing of the
+ temporary file is attempted."""
+ # id() is used to generate a pseudo-random filename.
+ path_tmp = '{}.{}'.format(path, id(path))
+ fd = _os.open(path_tmp,
+ _os.O_EXCL | _os.O_CREAT | _os.O_WRONLY, mode & 0o666)
+ try:
+ # We first write data to a temporary file, and then use os.replace() to
+ # perform an atomic rename.
+ with _io.FileIO(fd, 'wb') as file:
+ file.write(data)
+ _os.replace(path_tmp, path)
+ except OSError:
+ try:
+ _os.unlink(path_tmp)
+ except OSError:
+ pass
+ raise
+
+
+_code_type = type(_write_atomic.__code__)
+
+
+# Finder/loader utility code ###############################################
+
+# Magic word to reject .pyc files generated by other Python versions.
+# It should change for each incompatible change to the bytecode.
+#
+# The value of CR and LF is incorporated so if you ever read or write
+# a .pyc file in text mode the magic number will be wrong; also, the
+# Apple MPW compiler swaps their values, botching string constants.
+#
+# The magic numbers must be spaced apart at least 2 values, as the
+# -U interpeter flag will cause MAGIC+1 being used. They have been
+# odd numbers for some time now.
+#
+# There were a variety of old schemes for setting the magic number.
+# The current working scheme is to increment the previous value by
+# 10.
+#
+# Starting with the adoption of PEP 3147 in Python 3.2, every bump in magic
+# number also includes a new "magic tag", i.e. a human readable string used
+# to represent the magic number in __pycache__ directories. When you change
+# the magic number, you must also set a new unique magic tag. Generally this
+# can be named after the Python major version of the magic number bump, but
+# it can really be anything, as long as it's different than anything else
+# that's come before. The tags are included in the following table, starting
+# with Python 3.2a0.
+#
+# Known values:
+# Python 1.5: 20121
+# Python 1.5.1: 20121
+# Python 1.5.2: 20121
+# Python 1.6: 50428
+# Python 2.0: 50823
+# Python 2.0.1: 50823
+# Python 2.1: 60202
+# Python 2.1.1: 60202
+# Python 2.1.2: 60202
+# Python 2.2: 60717
+# Python 2.3a0: 62011
+# Python 2.3a0: 62021
+# Python 2.3a0: 62011 (!)
+# Python 2.4a0: 62041
+# Python 2.4a3: 62051
+# Python 2.4b1: 62061
+# Python 2.5a0: 62071
+# Python 2.5a0: 62081 (ast-branch)
+# Python 2.5a0: 62091 (with)
+# Python 2.5a0: 62092 (changed WITH_CLEANUP opcode)
+# Python 2.5b3: 62101 (fix wrong code: for x, in ...)
+# Python 2.5b3: 62111 (fix wrong code: x += yield)
+# Python 2.5c1: 62121 (fix wrong lnotab with for loops and
+# storing constants that should have been removed)
+# Python 2.5c2: 62131 (fix wrong code: for x, in ... in listcomp/genexp)
+# Python 2.6a0: 62151 (peephole optimizations and STORE_MAP opcode)
+# Python 2.6a1: 62161 (WITH_CLEANUP optimization)
+# Python 2.7a0: 62171 (optimize list comprehensions/change LIST_APPEND)
+# Python 2.7a0: 62181 (optimize conditional branches:
+# introduce POP_JUMP_IF_FALSE and POP_JUMP_IF_TRUE)
+# Python 2.7a0 62191 (introduce SETUP_WITH)
+# Python 2.7a0 62201 (introduce BUILD_SET)
+# Python 2.7a0 62211 (introduce MAP_ADD and SET_ADD)
+# Python 3000: 3000
+# 3010 (removed UNARY_CONVERT)
+# 3020 (added BUILD_SET)
+# 3030 (added keyword-only parameters)
+# 3040 (added signature annotations)
+# 3050 (print becomes a function)
+# 3060 (PEP 3115 metaclass syntax)
+# 3061 (string literals become unicode)
+# 3071 (PEP 3109 raise changes)
+# 3081 (PEP 3137 make __file__ and __name__ unicode)
+# 3091 (kill str8 interning)
+# 3101 (merge from 2.6a0, see 62151)
+# 3103 (__file__ points to source file)
+# Python 3.0a4: 3111 (WITH_CLEANUP optimization).
+# Python 3.0a5: 3131 (lexical exception stacking, including POP_EXCEPT)
+# Python 3.1a0: 3141 (optimize list, set and dict comprehensions:
+# change LIST_APPEND and SET_ADD, add MAP_ADD)
+# Python 3.1a0: 3151 (optimize conditional branches:
+# introduce POP_JUMP_IF_FALSE and POP_JUMP_IF_TRUE)
+# Python 3.2a0: 3160 (add SETUP_WITH)
+# tag: cpython-32
+# Python 3.2a1: 3170 (add DUP_TOP_TWO, remove DUP_TOPX and ROT_FOUR)
+# tag: cpython-32
+# Python 3.2a2 3180 (add DELETE_DEREF)
+# Python 3.3a0 3190 __class__ super closure changed
+# Python 3.3a0 3200 (__qualname__ added)
+# 3210 (added size modulo 2**32 to the pyc header)
+# Python 3.3a1 3220 (changed PEP 380 implementation)
+# Python 3.3a4 3230 (revert changes to implicit __class__ closure)
+# Python 3.4a1 3250 (evaluate positional default arguments before
+# keyword-only defaults)
+# Python 3.4a1 3260 (add LOAD_CLASSDEREF; allow locals of class to override
+# free vars)
+# Python 3.4a1 3270 (various tweaks to the __class__ closure)
+# Python 3.4a1 3280 (remove implicit class argument)
+# Python 3.4a4 3290 (changes to __qualname__ computation)
+# Python 3.4a4 3300 (more changes to __qualname__ computation)
+# Python 3.4rc2 3310 (alter __qualname__ computation)
+# Python 3.5a0 3320 (matrix multiplication operator)
+# Python 3.5b1 3330 (PEP 448: Additional Unpacking Generalizations)
+# Python 3.5b2 3340 (fix dictionary display evaluation order #11205)
+# Python 3.5b2 3350 (add GET_YIELD_FROM_ITER opcode #24400)
+#
+# MAGIC must change whenever the bytecode emitted by the compiler may no
+# longer be understood by older implementations of the eval loop (usually
+# due to the addition of new opcodes).
+#
+# Whenever MAGIC_NUMBER is changed, the ranges in the magic_values array
+# in PC/launcher.c must also be updated.
+
+MAGIC_NUMBER = (3350).to_bytes(2, 'little') + b'\r\n'
+_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c
+
+_PYCACHE = '__pycache__'
+_OPT = 'opt-'
+
+SOURCE_SUFFIXES = ['.py'] # _setup() adds .pyw as needed.
+
+BYTECODE_SUFFIXES = ['.pyc']
+# Deprecated.
+DEBUG_BYTECODE_SUFFIXES = OPTIMIZED_BYTECODE_SUFFIXES = BYTECODE_SUFFIXES
+
+def cache_from_source(path, debug_override=None, *, optimization=None):
+ """Given the path to a .py file, return the path to its .pyc file.
+
+ The .py file does not need to exist; this simply returns the path to the
+ .pyc file calculated as if the .py file were imported.
+
+ The 'optimization' parameter controls the presumed optimization level of
+ the bytecode file. If 'optimization' is not None, the string representation
+ of the argument is taken and verified to be alphanumeric (else ValueError
+ is raised).
+
+ The debug_override parameter is deprecated. If debug_override is not None,
+ a True value is the same as setting 'optimization' to the empty string
+ while a False value is equivalent to setting 'optimization' to '1'.
+
+ If sys.implementation.cache_tag is None then NotImplementedError is raised.
+
+ """
+ if debug_override is not None:
+ _warnings.warn('the debug_override parameter is deprecated; use '
+ "'optimization' instead", DeprecationWarning)
+ if optimization is not None:
+ message = 'debug_override or optimization must be set to None'
+ raise TypeError(message)
+ optimization = '' if debug_override else 1
+ head, tail = _path_split(path)
+ base, sep, rest = tail.rpartition('.')
+ tag = sys.implementation.cache_tag
+ if tag is None:
+ raise NotImplementedError('sys.implementation.cache_tag is None')
+ almost_filename = ''.join([(base if base else rest), sep, tag])
+ if optimization is None:
+ if sys.flags.optimize == 0:
+ optimization = ''
+ else:
+ optimization = sys.flags.optimize
+ optimization = str(optimization)
+ if optimization != '':
+ if not optimization.isalnum():
+ raise ValueError('{!r} is not alphanumeric'.format(optimization))
+ almost_filename = '{}.{}{}'.format(almost_filename, _OPT, optimization)
+ return _path_join(head, _PYCACHE, almost_filename + BYTECODE_SUFFIXES[0])
+
+
+def source_from_cache(path):
+ """Given the path to a .pyc. file, return the path to its .py file.
+
+ The .pyc file does not need to exist; this simply returns the path to
+ the .py file calculated to correspond to the .pyc file. If path does
+ not conform to PEP 3147/488 format, ValueError will be raised. If
+ sys.implementation.cache_tag is None then NotImplementedError is raised.
+
+ """
+ if sys.implementation.cache_tag is None:
+ raise NotImplementedError('sys.implementation.cache_tag is None')
+ head, pycache_filename = _path_split(path)
+ head, pycache = _path_split(head)
+ if pycache != _PYCACHE:
+ raise ValueError('{} not bottom-level directory in '
+ '{!r}'.format(_PYCACHE, path))
+ dot_count = pycache_filename.count('.')
+ if dot_count not in {2, 3}:
+ raise ValueError('expected only 2 or 3 dots in '
+ '{!r}'.format(pycache_filename))
+ elif dot_count == 3:
+ optimization = pycache_filename.rsplit('.', 2)[-2]
+ if not optimization.startswith(_OPT):
+ raise ValueError("optimization portion of filename does not start "
+ "with {!r}".format(_OPT))
+ opt_level = optimization[len(_OPT):]
+ if not opt_level.isalnum():
+ raise ValueError("optimization level {!r} is not an alphanumeric "
+ "value".format(optimization))
+ base_filename = pycache_filename.partition('.')[0]
+ return _path_join(head, base_filename + SOURCE_SUFFIXES[0])
+
+
+def _get_sourcefile(bytecode_path):
+ """Convert a bytecode file path to a source path (if possible).
+
+ This function exists purely for backwards-compatibility for
+ PyImport_ExecCodeModuleWithFilenames() in the C API.
+
+ """
+ if len(bytecode_path) == 0:
+ return None
+ rest, _, extension = bytecode_path.rpartition('.')
+ if not rest or extension.lower()[-3:-1] != 'py':
+ return bytecode_path
+ try:
+ source_path = source_from_cache(bytecode_path)
+ except (NotImplementedError, ValueError):
+ source_path = bytecode_path[:-1]
+ return source_path if _path_isfile(source_path) else bytecode_path
+
+
+def _get_cached(filename):
+ if filename.endswith(tuple(SOURCE_SUFFIXES)):
+ try:
+ return cache_from_source(filename)
+ except NotImplementedError:
+ pass
+ elif filename.endswith(tuple(BYTECODE_SUFFIXES)):
+ return filename
+ else:
+ return None
+
+
+def _calc_mode(path):
+ """Calculate the mode permissions for a bytecode file."""
+ try:
+ mode = _path_stat(path).st_mode
+ except OSError:
+ mode = 0o666
+ # We always ensure write access so we can update cached files
+ # later even when the source files are read-only on Windows (#6074)
+ mode |= 0o200
+ return mode
+
+
+def _verbose_message(message, *args, verbosity=1):
+ """Print the message to stderr if -v/PYTHONVERBOSE is turned on."""
+ if sys.flags.verbose >= verbosity:
+ if not message.startswith(('#', 'import ')):
+ message = '# ' + message
+ print(message.format(*args), file=sys.stderr)
+
+
+def _check_name(method):
+ """Decorator to verify that the module being requested matches the one the
+ loader can handle.
+
+ The first argument (self) must define _name which the second argument is
+ compared against. If the comparison fails then ImportError is raised.
+
+ """
+ def _check_name_wrapper(self, name=None, *args, **kwargs):
+ if name is None:
+ name = self.name
+ elif self.name != name:
+ raise ImportError('loader for %s cannot handle %s' %
+ (self.name, name), name=name)
+ return method(self, name, *args, **kwargs)
+ try:
+ _wrap = _bootstrap._wrap
+ except NameError:
+ # XXX yuck
+ def _wrap(new, old):
+ for replace in ['__module__', '__name__', '__qualname__', '__doc__']:
+ if hasattr(old, replace):
+ setattr(new, replace, getattr(old, replace))
+ new.__dict__.update(old.__dict__)
+ _wrap(_check_name_wrapper, method)
+ return _check_name_wrapper
+
+
+def _find_module_shim(self, fullname):
+ """Try to find a loader for the specified module by delegating to
+ self.find_loader().
+
+ This method is deprecated in favor of finder.find_spec().
+
+ """
+ # Call find_loader(). If it returns a string (indicating this
+ # is a namespace package portion), generate a warning and
+ # return None.
+ loader, portions = self.find_loader(fullname)
+ if loader is None and len(portions):
+ msg = 'Not importing directory {}: missing __init__'
+ _warnings.warn(msg.format(portions[0]), ImportWarning)
+ return loader
+
+
+def _validate_bytecode_header(data, source_stats=None, name=None, path=None):
+ """Validate the header of the passed-in bytecode against source_stats (if
+ given) and returning the bytecode that can be compiled by compile().
+
+ All other arguments are used to enhance error reporting.
+
+ ImportError is raised when the magic number is incorrect or the bytecode is
+ found to be stale. EOFError is raised when the data is found to be
+ truncated.
+
+ """
+ exc_details = {}
+ if name is not None:
+ exc_details['name'] = name
+ else:
+ # To prevent having to make all messages have a conditional name.
+ name = '<bytecode>'
+ if path is not None:
+ exc_details['path'] = path
+ magic = data[:4]
+ raw_timestamp = data[4:8]
+ raw_size = data[8:12]
+ if magic != MAGIC_NUMBER:
+ message = 'bad magic number in {!r}: {!r}'.format(name, magic)
+ _verbose_message('{}', message)
+ raise ImportError(message, **exc_details)
+ elif len(raw_timestamp) != 4:
+ message = 'reached EOF while reading timestamp in {!r}'.format(name)
+ _verbose_message('{}', message)
+ raise EOFError(message)
+ elif len(raw_size) != 4:
+ message = 'reached EOF while reading size of source in {!r}'.format(name)
+ _verbose_message('{}', message)
+ raise EOFError(message)
+ if source_stats is not None:
+ try:
+ source_mtime = int(source_stats['mtime'])
+ except KeyError:
+ pass
+ else:
+ if _r_long(raw_timestamp) != source_mtime:
+ message = 'bytecode is stale for {!r}'.format(name)
+ _verbose_message('{}', message)
+ raise ImportError(message, **exc_details)
+ try:
+ source_size = source_stats['size'] & 0xFFFFFFFF
+ except KeyError:
+ pass
+ else:
+ if _r_long(raw_size) != source_size:
+ raise ImportError('bytecode is stale for {!r}'.format(name),
+ **exc_details)
+ return data[12:]
+
+
+def _compile_bytecode(data, name=None, bytecode_path=None, source_path=None):
+ """Compile bytecode as returned by _validate_bytecode_header()."""
+ code = marshal.loads(data)
+ if isinstance(code, _code_type):
+ _verbose_message('code object from {!r}', bytecode_path)
+ if source_path is not None:
+ _imp._fix_co_filename(code, source_path)
+ return code
+ else:
+ raise ImportError('Non-code object in {!r}'.format(bytecode_path),
+ name=name, path=bytecode_path)
+
+def _code_to_bytecode(code, mtime=0, source_size=0):
+ """Compile a code object into bytecode for writing out to a byte-compiled
+ file."""
+ data = bytearray(MAGIC_NUMBER)
+ data.extend(_w_long(mtime))
+ data.extend(_w_long(source_size))
+ data.extend(marshal.dumps(code))
+ return data
+
+
+def decode_source(source_bytes):
+ """Decode bytes representing source code and return the string.
+
+ Universal newline support is used in the decoding.
+ """
+ import tokenize # To avoid bootstrap issues.
+ source_bytes_readline = _io.BytesIO(source_bytes).readline
+ encoding = tokenize.detect_encoding(source_bytes_readline)
+ newline_decoder = _io.IncrementalNewlineDecoder(None, True)
+ return newline_decoder.decode(source_bytes.decode(encoding[0]))
+
+
+# Module specifications #######################################################
+
+_POPULATE = object()
+
+
+def spec_from_file_location(name, location=None, *, loader=None,
+ submodule_search_locations=_POPULATE):
+ """Return a module spec based on a file location.
+
+ To indicate that the module is a package, set
+ submodule_search_locations to a list of directory paths. An
+ empty list is sufficient, though its not otherwise useful to the
+ import system.
+
+ The loader must take a spec as its only __init__() arg.
+
+ """
+ if location is None:
+ # The caller may simply want a partially populated location-
+ # oriented spec. So we set the location to a bogus value and
+ # fill in as much as we can.
+ location = '<unknown>'
+ if hasattr(loader, 'get_filename'):
+ # ExecutionLoader
+ try:
+ location = loader.get_filename(name)
+ except ImportError:
+ pass
+
+ # If the location is on the filesystem, but doesn't actually exist,
+ # we could return None here, indicating that the location is not
+ # valid. However, we don't have a good way of testing since an
+ # indirect location (e.g. a zip file or URL) will look like a
+ # non-existent file relative to the filesystem.
+
+ spec = _bootstrap.ModuleSpec(name, loader, origin=location)
+ spec._set_fileattr = True
+
+ # Pick a loader if one wasn't provided.
+ if loader is None:
+ for loader_class, suffixes in _get_supported_file_loaders():
+ if location.endswith(tuple(suffixes)):
+ loader = loader_class(name, location)
+ spec.loader = loader
+ break
+ else:
+ return None
+
+ # Set submodule_search_paths appropriately.
+ if submodule_search_locations is _POPULATE:
+ # Check the loader.
+ if hasattr(loader, 'is_package'):
+ try:
+ is_package = loader.is_package(name)
+ except ImportError:
+ pass
+ else:
+ if is_package:
+ spec.submodule_search_locations = []
+ else:
+ spec.submodule_search_locations = submodule_search_locations
+ if spec.submodule_search_locations == []:
+ if location:
+ dirname = _path_split(location)[0]
+ spec.submodule_search_locations.append(dirname)
+
+ return spec
+
+
+# Loaders #####################################################################
+
+class WindowsRegistryFinder:
+
+ """Meta path finder for modules declared in the Windows registry."""
+
+ REGISTRY_KEY = (
+ 'Software\\Python\\PythonCore\\{sys_version}'
+ '\\Modules\\{fullname}')
+ REGISTRY_KEY_DEBUG = (
+ 'Software\\Python\\PythonCore\\{sys_version}'
+ '\\Modules\\{fullname}\\Debug')
+ DEBUG_BUILD = False # Changed in _setup()
+
+ @classmethod
+ def _open_registry(cls, key):
+ try:
+ return _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, key)
+ except OSError:
+ return _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, key)
+
+ @classmethod
+ def _search_registry(cls, fullname):
+ if cls.DEBUG_BUILD:
+ registry_key = cls.REGISTRY_KEY_DEBUG
+ else:
+ registry_key = cls.REGISTRY_KEY
+ key = registry_key.format(fullname=fullname,
+ sys_version=sys.version[:3])
+ try:
+ with cls._open_registry(key) as hkey:
+ filepath = _winreg.QueryValue(hkey, '')
+ except OSError:
+ return None
+ return filepath
+
+ @classmethod
+ def find_spec(cls, fullname, path=None, target=None):
+ filepath = cls._search_registry(fullname)
+ if filepath is None:
+ return None
+ try:
+ _path_stat(filepath)
+ except OSError:
+ return None
+ for loader, suffixes in _get_supported_file_loaders():
+ if filepath.endswith(tuple(suffixes)):
+ spec = _bootstrap.spec_from_loader(fullname,
+ loader(fullname, filepath),
+ origin=filepath)
+ return spec
+
+ @classmethod
+ def find_module(cls, fullname, path=None):
+ """Find module named in the registry.
+
+ This method is deprecated. Use exec_module() instead.
+
+ """
+ spec = cls.find_spec(fullname, path)
+ if spec is not None:
+ return spec.loader
+ else:
+ return None
+
+
+class _LoaderBasics:
+
+ """Base class of common code needed by both SourceLoader and
+ SourcelessFileLoader."""
+
+ def is_package(self, fullname):
+ """Concrete implementation of InspectLoader.is_package by checking if
+ the path returned by get_filename has a filename of '__init__.py'."""
+ filename = _path_split(self.get_filename(fullname))[1]
+ filename_base = filename.rsplit('.', 1)[0]
+ tail_name = fullname.rpartition('.')[2]
+ return filename_base == '__init__' and tail_name != '__init__'
+
+ def create_module(self, spec):
+ """Use default semantics for module creation."""
+
+ def exec_module(self, module):
+ """Execute the module."""
+ code = self.get_code(module.__name__)
+ if code is None:
+ raise ImportError('cannot load module {!r} when get_code() '
+ 'returns None'.format(module.__name__))
+ _bootstrap._call_with_frames_removed(exec, code, module.__dict__)
+
+ def load_module(self, fullname):
+ return _bootstrap._load_module_shim(self, fullname)
+
+
+class SourceLoader(_LoaderBasics):
+
+ def path_mtime(self, path):
+ """Optional method that returns the modification time (an int) for the
+ specified path, where path is a str.
+
+ Raises IOError when the path cannot be handled.
+ """
+ raise IOError
+
+ def path_stats(self, path):
+ """Optional method returning a metadata dict for the specified path
+ to by the path (str).
+ Possible keys:
+ - 'mtime' (mandatory) is the numeric timestamp of last source
+ code modification;
+ - 'size' (optional) is the size in bytes of the source code.
+
+ Implementing this method allows the loader to read bytecode files.
+ Raises IOError when the path cannot be handled.
+ """
+ return {'mtime': self.path_mtime(path)}
+
+ def _cache_bytecode(self, source_path, cache_path, data):
+ """Optional method which writes data (bytes) to a file path (a str).
+
+ Implementing this method allows for the writing of bytecode files.
+
+ The source path is needed in order to correctly transfer permissions
+ """
+ # For backwards compatibility, we delegate to set_data()
+ return self.set_data(cache_path, data)
+
+ def set_data(self, path, data):
+ """Optional method which writes data (bytes) to a file path (a str).
+
+ Implementing this method allows for the writing of bytecode files.
+ """
+
+
+ def get_source(self, fullname):
+ """Concrete implementation of InspectLoader.get_source."""
+ path = self.get_filename(fullname)
+ try:
+ source_bytes = self.get_data(path)
+ except OSError as exc:
+ raise ImportError('source not available through get_data()',
+ name=fullname) from exc
+ return decode_source(source_bytes)
+
+ def source_to_code(self, data, path, *, _optimize=-1):
+ """Return the code object compiled from source.
+
+ The 'data' argument can be any object type that compile() supports.
+ """
+ return _bootstrap._call_with_frames_removed(compile, data, path, 'exec',
+ dont_inherit=True, optimize=_optimize)
+
+ def get_code(self, fullname):
+ """Concrete implementation of InspectLoader.get_code.
+
+ Reading of bytecode requires path_stats to be implemented. To write
+ bytecode, set_data must also be implemented.
+
+ """
+ source_path = self.get_filename(fullname)
+ source_mtime = None
+ try:
+ bytecode_path = cache_from_source(source_path)
+ except NotImplementedError:
+ bytecode_path = None
+ else:
+ try:
+ st = self.path_stats(source_path)
+ except IOError:
+ pass
+ else:
+ source_mtime = int(st['mtime'])
+ try:
+ data = self.get_data(bytecode_path)
+ except OSError:
+ pass
+ else:
+ try:
+ bytes_data = _validate_bytecode_header(data,
+ source_stats=st, name=fullname,
+ path=bytecode_path)
+ except (ImportError, EOFError):
+ pass
+ else:
+ _verbose_message('{} matches {}', bytecode_path,
+ source_path)
+ return _compile_bytecode(bytes_data, name=fullname,
+ bytecode_path=bytecode_path,
+ source_path=source_path)
+ source_bytes = self.get_data(source_path)
+ code_object = self.source_to_code(source_bytes, source_path)
+ _verbose_message('code object from {}', source_path)
+ if (not sys.dont_write_bytecode and bytecode_path is not None and
+ source_mtime is not None):
+ data = _code_to_bytecode(code_object, source_mtime,
+ len(source_bytes))
+ try:
+ self._cache_bytecode(source_path, bytecode_path, data)
+ _verbose_message('wrote {!r}', bytecode_path)
+ except NotImplementedError:
+ pass
+ return code_object
+
+
+class FileLoader:
+
+ """Base file loader class which implements the loader protocol methods that
+ require file system usage."""
+
+ def __init__(self, fullname, path):
+ """Cache the module name and the path to the file found by the
+ finder."""
+ self.name = fullname
+ self.path = path
+
+ def __eq__(self, other):
+ return (self.__class__ == other.__class__ and
+ self.__dict__ == other.__dict__)
+
+ def __hash__(self):
+ return hash(self.name) ^ hash(self.path)
+
+ @_check_name
+ def load_module(self, fullname):
+ """Load a module from a file.
+
+ This method is deprecated. Use exec_module() instead.
+
+ """
+ # The only reason for this method is for the name check.
+ # Issue #14857: Avoid the zero-argument form of super so the implementation
+ # of that form can be updated without breaking the frozen module
+ return super(FileLoader, self).load_module(fullname)
+
+ @_check_name
+ def get_filename(self, fullname):
+ """Return the path to the source file as found by the finder."""
+ return self.path
+
+ def get_data(self, path):
+ """Return the data from path as raw bytes."""
+ with _io.FileIO(path, 'r') as file:
+ return file.read()
+
+
+class SourceFileLoader(FileLoader, SourceLoader):
+
+ """Concrete implementation of SourceLoader using the file system."""
+
+ def path_stats(self, path):
+ """Return the metadata for the path."""
+ st = _path_stat(path)
+ return {'mtime': st.st_mtime, 'size': st.st_size}
+
+ def _cache_bytecode(self, source_path, bytecode_path, data):
+ # Adapt between the two APIs
+ mode = _calc_mode(source_path)
+ return self.set_data(bytecode_path, data, _mode=mode)
+
+ def set_data(self, path, data, *, _mode=0o666):
+ """Write bytes data to a file."""
+ parent, filename = _path_split(path)
+ path_parts = []
+ # Figure out what directories are missing.
+ while parent and not _path_isdir(parent):
+ parent, part = _path_split(parent)
+ path_parts.append(part)
+ # Create needed directories.
+ for part in reversed(path_parts):
+ parent = _path_join(parent, part)
+ try:
+ _os.mkdir(parent)
+ except FileExistsError:
+ # Probably another Python process already created the dir.
+ continue
+ except OSError as exc:
+ # Could be a permission error, read-only filesystem: just forget
+ # about writing the data.
+ _verbose_message('could not create {!r}: {!r}', parent, exc)
+ return
+ try:
+ _write_atomic(path, data, _mode)
+ _verbose_message('created {!r}', path)
+ except OSError as exc:
+ # Same as above: just don't write the bytecode.
+ _verbose_message('could not create {!r}: {!r}', path, exc)
+
+
+class SourcelessFileLoader(FileLoader, _LoaderBasics):
+
+ """Loader which handles sourceless file imports."""
+
+ def get_code(self, fullname):
+ path = self.get_filename(fullname)
+ data = self.get_data(path)
+ bytes_data = _validate_bytecode_header(data, name=fullname, path=path)
+ return _compile_bytecode(bytes_data, name=fullname, bytecode_path=path)
+
+ def get_source(self, fullname):
+ """Return None as there is no source code."""
+ return None
+
+
+# Filled in by _setup().
+EXTENSION_SUFFIXES = []
+
+
+class ExtensionFileLoader(FileLoader, _LoaderBasics):
+
+ """Loader for extension modules.
+
+ The constructor is designed to work with FileFinder.
+
+ """
+
+ def __init__(self, name, path):
+ self.name = name
+ self.path = path
+
+ def __eq__(self, other):
+ return (self.__class__ == other.__class__ and
+ self.__dict__ == other.__dict__)
+
+ def __hash__(self):
+ return hash(self.name) ^ hash(self.path)
+
+ def create_module(self, spec):
+ """Create an unitialized extension module"""
+ module = _bootstrap._call_with_frames_removed(
+ _imp.create_dynamic, spec)
+ _verbose_message('extension module {!r} loaded from {!r}',
+ spec.name, self.path)
+ return module
+
+ def exec_module(self, module):
+ """Initialize an extension module"""
+ _bootstrap._call_with_frames_removed(_imp.exec_dynamic, module)
+ _verbose_message('extension module {!r} executed from {!r}',
+ self.name, self.path)
+
+ def is_package(self, fullname):
+ """Return True if the extension module is a package."""
+ file_name = _path_split(self.path)[1]
+ return any(file_name == '__init__' + suffix
+ for suffix in EXTENSION_SUFFIXES)
+
+ def get_code(self, fullname):
+ """Return None as an extension module cannot create a code object."""
+ return None
+
+ def get_source(self, fullname):
+ """Return None as extension modules have no source code."""
+ return None
+
+ @_check_name
+ def get_filename(self, fullname):
+ """Return the path to the source file as found by the finder."""
+ return self.path
+
+
+class _NamespacePath:
+ """Represents a namespace package's path. It uses the module name
+ to find its parent module, and from there it looks up the parent's
+ __path__. When this changes, the module's own path is recomputed,
+ using path_finder. For top-level modules, the parent module's path
+ is sys.path."""
+
+ def __init__(self, name, path, path_finder):
+ self._name = name
+ self._path = path
+ self._last_parent_path = tuple(self._get_parent_path())
+ self._path_finder = path_finder
+
+ def _find_parent_path_names(self):
+ """Returns a tuple of (parent-module-name, parent-path-attr-name)"""
+ parent, dot, me = self._name.rpartition('.')
+ if dot == '':
+ # This is a top-level module. sys.path contains the parent path.
+ return 'sys', 'path'
+ # Not a top-level module. parent-module.__path__ contains the
+ # parent path.
+ return parent, '__path__'
+
+ def _get_parent_path(self):
+ parent_module_name, path_attr_name = self._find_parent_path_names()
+ return getattr(sys.modules[parent_module_name], path_attr_name)
+
+ def _recalculate(self):
+ # If the parent's path has changed, recalculate _path
+ parent_path = tuple(self._get_parent_path()) # Make a copy
+ if parent_path != self._last_parent_path:
+ spec = self._path_finder(self._name, parent_path)
+ # Note that no changes are made if a loader is returned, but we
+ # do remember the new parent path
+ if spec is not None and spec.loader is None:
+ if spec.submodule_search_locations:
+ self._path = spec.submodule_search_locations
+ self._last_parent_path = parent_path # Save the copy
+ return self._path
+
+ def __iter__(self):
+ return iter(self._recalculate())
+
+ def __len__(self):
+ return len(self._recalculate())
+
+ def __repr__(self):
+ return '_NamespacePath({!r})'.format(self._path)
+
+ def __contains__(self, item):
+ return item in self._recalculate()
+
+ def append(self, item):
+ self._path.append(item)
+
+
+# We use this exclusively in module_from_spec() for backward-compatibility.
+class _NamespaceLoader:
+ def __init__(self, name, path, path_finder):
+ self._path = _NamespacePath(name, path, path_finder)
+
+ @classmethod
+ def module_repr(cls, module):
+ """Return repr for the module.
+
+ The method is deprecated. The import machinery does the job itself.
+
+ """
+ return '<module {!r} (namespace)>'.format(module.__name__)
+
+ def is_package(self, fullname):
+ return True
+
+ def get_source(self, fullname):
+ return ''
+
+ def get_code(self, fullname):
+ return compile('', '<string>', 'exec', dont_inherit=True)
+
+ def create_module(self, spec):
+ """Use default semantics for module creation."""
+
+ def exec_module(self, module):
+ pass
+
+ def load_module(self, fullname):
+ """Load a namespace module.
+
+ This method is deprecated. Use exec_module() instead.
+
+ """
+ # The import system never calls this method.
+ _verbose_message('namespace module loaded with path {!r}', self._path)
+ return _bootstrap._load_module_shim(self, fullname)
+
+
+# Finders #####################################################################
+
+class PathFinder:
+
+ """Meta path finder for sys.path and package __path__ attributes."""
+
+ @classmethod
+ def invalidate_caches(cls):
+ """Call the invalidate_caches() method on all path entry finders
+ stored in sys.path_importer_caches (where implemented)."""
+ for finder in sys.path_importer_cache.values():
+ if hasattr(finder, 'invalidate_caches'):
+ finder.invalidate_caches()
+
+ @classmethod
+ def _path_hooks(cls, path):
+ """Search sequence of hooks for a finder for 'path'.
+
+ If 'hooks' is false then use sys.path_hooks.
+
+ """
+ if sys.path_hooks is not None and not sys.path_hooks:
+ _warnings.warn('sys.path_hooks is empty', ImportWarning)
+ for hook in sys.path_hooks:
+ try:
+ return hook(path)
+ except ImportError:
+ continue
+ else:
+ return None
+
+ @classmethod
+ def _path_importer_cache(cls, path):
+ """Get the finder for the path entry from sys.path_importer_cache.
+
+ If the path entry is not in the cache, find the appropriate finder
+ and cache it. If no finder is available, store None.
+
+ """
+ if path == '':
+ try:
+ path = _os.getcwd()
+ except FileNotFoundError:
+ # Don't cache the failure as the cwd can easily change to
+ # a valid directory later on.
+ return None
+ try:
+ finder = sys.path_importer_cache[path]
+ except KeyError:
+ finder = cls._path_hooks(path)
+ sys.path_importer_cache[path] = finder
+ return finder
+
+ @classmethod
+ def _legacy_get_spec(cls, fullname, finder):
+ # This would be a good place for a DeprecationWarning if
+ # we ended up going that route.
+ if hasattr(finder, 'find_loader'):
+ loader, portions = finder.find_loader(fullname)
+ else:
+ loader = finder.find_module(fullname)
+ portions = []
+ if loader is not None:
+ return _bootstrap.spec_from_loader(fullname, loader)
+ spec = _bootstrap.ModuleSpec(fullname, None)
+ spec.submodule_search_locations = portions
+ return spec
+
+ @classmethod
+ def _get_spec(cls, fullname, path, target=None):
+ """Find the loader or namespace_path for this module/package name."""
+ # If this ends up being a namespace package, namespace_path is
+ # the list of paths that will become its __path__
+ namespace_path = []
+ for entry in path:
+ if not isinstance(entry, (str, bytes)):
+ continue
+ finder = cls._path_importer_cache(entry)
+ if finder is not None:
+ if hasattr(finder, 'find_spec'):
+ spec = finder.find_spec(fullname, target)
+ else:
+ spec = cls._legacy_get_spec(fullname, finder)
+ if spec is None:
+ continue
+ if spec.loader is not None:
+ return spec
+ portions = spec.submodule_search_locations
+ if portions is None:
+ raise ImportError('spec missing loader')
+ # This is possibly part of a namespace package.
+ # Remember these path entries (if any) for when we
+ # create a namespace package, and continue iterating
+ # on path.
+ namespace_path.extend(portions)
+ else:
+ spec = _bootstrap.ModuleSpec(fullname, None)
+ spec.submodule_search_locations = namespace_path
+ return spec
+
+ @classmethod
+ def find_spec(cls, fullname, path=None, target=None):
+ """find the module on sys.path or 'path' based on sys.path_hooks and
+ sys.path_importer_cache."""
+ if path is None:
+ path = sys.path
+ spec = cls._get_spec(fullname, path, target)
+ if spec is None:
+ return None
+ elif spec.loader is None:
+ namespace_path = spec.submodule_search_locations
+ if namespace_path:
+ # We found at least one namespace path. Return a
+ # spec which can create the namespace package.
+ spec.origin = 'namespace'
+ spec.submodule_search_locations = _NamespacePath(fullname, namespace_path, cls._get_spec)
+ return spec
+ else:
+ return None
+ else:
+ return spec
+
+ @classmethod
+ def find_module(cls, fullname, path=None):
+ """find the module on sys.path or 'path' based on sys.path_hooks and
+ sys.path_importer_cache.
+
+ This method is deprecated. Use find_spec() instead.
+
+ """
+ spec = cls.find_spec(fullname, path)
+ if spec is None:
+ return None
+ return spec.loader
+
+
+class FileFinder:
+
+ """File-based finder.
+
+ Interactions with the file system are cached for performance, being
+ refreshed when the directory the finder is handling has been modified.
+
+ """
+
+ def __init__(self, path, *loader_details):
+ """Initialize with the path to search on and a variable number of
+ 2-tuples containing the loader and the file suffixes the loader
+ recognizes."""
+ loaders = []
+ for loader, suffixes in loader_details:
+ loaders.extend((suffix, loader) for suffix in suffixes)
+ self._loaders = loaders
+ # Base (directory) path
+ self.path = path or '.'
+ self._path_mtime = -1
+ self._path_cache = set()
+ self._relaxed_path_cache = set()
+
+ def invalidate_caches(self):
+ """Invalidate the directory mtime."""
+ self._path_mtime = -1
+
+ find_module = _find_module_shim
+
+ def find_loader(self, fullname):
+ """Try to find a loader for the specified module, or the namespace
+ package portions. Returns (loader, list-of-portions).
+
+ This method is deprecated. Use find_spec() instead.
+
+ """
+ spec = self.find_spec(fullname)
+ if spec is None:
+ return None, []
+ return spec.loader, spec.submodule_search_locations or []
+
+ def _get_spec(self, loader_class, fullname, path, smsl, target):
+ loader = loader_class(fullname, path)
+ return spec_from_file_location(fullname, path, loader=loader,
+ submodule_search_locations=smsl)
+
+ def find_spec(self, fullname, target=None):
+ """Try to find a spec for the specified module. Returns the
+ matching spec, or None if not found."""
+ is_namespace = False
+ tail_module = fullname.rpartition('.')[2]
+ try:
+ mtime = _path_stat(self.path or _os.getcwd()).st_mtime
+ except OSError:
+ mtime = -1
+ if mtime != self._path_mtime:
+ self._fill_cache()
+ self._path_mtime = mtime
+ # tail_module keeps the original casing, for __file__ and friends
+ if _relax_case():
+ cache = self._relaxed_path_cache
+ cache_module = tail_module.lower()
+ else:
+ cache = self._path_cache
+ cache_module = tail_module
+ # Check if the module is the name of a directory (and thus a package).
+ if cache_module in cache:
+ base_path = _path_join(self.path, tail_module)
+ for suffix, loader_class in self._loaders:
+ init_filename = '__init__' + suffix
+ full_path = _path_join(base_path, init_filename)
+ if _path_isfile(full_path):
+ return self._get_spec(loader_class, fullname, full_path, [base_path], target)
+ else:
+ # If a namespace package, return the path if we don't
+ # find a module in the next section.
+ is_namespace = _path_isdir(base_path)
+ # Check for a file w/ a proper suffix exists.
+ for suffix, loader_class in self._loaders:
+ full_path = _path_join(self.path, tail_module + suffix)
+ _verbose_message('trying {}'.format(full_path), verbosity=2)
+ if cache_module + suffix in cache:
+ if _path_isfile(full_path):
+ return self._get_spec(loader_class, fullname, full_path, None, target)
+ if is_namespace:
+ _verbose_message('possible namespace for {}'.format(base_path))
+ spec = _bootstrap.ModuleSpec(fullname, None)
+ spec.submodule_search_locations = [base_path]
+ return spec
+ return None
+
+ def _fill_cache(self):
+ """Fill the cache of potential modules and packages for this directory."""
+ path = self.path
+ try:
+ contents = _os.listdir(path or _os.getcwd())
+ except (FileNotFoundError, PermissionError, NotADirectoryError):
+ # Directory has either been removed, turned into a file, or made
+ # unreadable.
+ contents = []
+ # We store two cached versions, to handle runtime changes of the
+ # PYTHONCASEOK environment variable.
+ if not sys.platform.startswith('win'):
+ self._path_cache = set(contents)
+ else:
+ # Windows users can import modules with case-insensitive file
+ # suffixes (for legacy reasons). Make the suffix lowercase here
+ # so it's done once instead of for every import. This is safe as
+ # the specified suffixes to check against are always specified in a
+ # case-sensitive manner.
+ lower_suffix_contents = set()
+ for item in contents:
+ name, dot, suffix = item.partition('.')
+ if dot:
+ new_name = '{}.{}'.format(name, suffix.lower())
+ else:
+ new_name = name
+ lower_suffix_contents.add(new_name)
+ self._path_cache = lower_suffix_contents
+ if sys.platform.startswith(_CASE_INSENSITIVE_PLATFORMS):
+ self._relaxed_path_cache = {fn.lower() for fn in contents}
+
+ @classmethod
+ def path_hook(cls, *loader_details):
+ """A class method which returns a closure to use on sys.path_hook
+ which will return an instance using the specified loaders and the path
+ called on the closure.
+
+ If the path called on the closure is not a directory, ImportError is
+ raised.
+
+ """
+ def path_hook_for_FileFinder(path):
+ """Path hook for importlib.machinery.FileFinder."""
+ if not _path_isdir(path):
+ raise ImportError('only directories are supported', path=path)
+ return cls(path, *loader_details)
+
+ return path_hook_for_FileFinder
+
+ def __repr__(self):
+ return 'FileFinder({!r})'.format(self.path)
+
+
+# Import setup ###############################################################
+
+def _fix_up_module(ns, name, pathname, cpathname=None):
+ # This function is used by PyImport_ExecCodeModuleObject().
+ loader = ns.get('__loader__')
+ spec = ns.get('__spec__')
+ if not loader:
+ if spec:
+ loader = spec.loader
+ elif pathname == cpathname:
+ loader = SourcelessFileLoader(name, pathname)
+ else:
+ loader = SourceFileLoader(name, pathname)
+ if not spec:
+ spec = spec_from_file_location(name, pathname, loader=loader)
+ try:
+ ns['__spec__'] = spec
+ ns['__loader__'] = loader
+ ns['__file__'] = pathname
+ ns['__cached__'] = cpathname
+ except Exception:
+ # Not important enough to report.
+ pass
+
+
+def _get_supported_file_loaders():
+ """Returns a list of file-based module loaders.
+
+ Each item is a tuple (loader, suffixes).
+ """
+ extensions = ExtensionFileLoader, _imp.extension_suffixes()
+ source = SourceFileLoader, SOURCE_SUFFIXES
+ bytecode = SourcelessFileLoader, BYTECODE_SUFFIXES
+ return [extensions, source, bytecode]
+
+
+def _setup(_bootstrap_module):
+ """Setup the path-based importers for importlib by importing needed
+ built-in modules and injecting them into the global namespace.
+
+ Other components are extracted from the core bootstrap module.
+
+ """
+ global sys, _imp, _bootstrap
+ _bootstrap = _bootstrap_module
+ sys = _bootstrap.sys
+ _imp = _bootstrap._imp
+
+ # Directly load built-in modules needed during bootstrap.
+ self_module = sys.modules[__name__]
+ for builtin_name in ('_io', '_warnings', 'builtins', 'marshal'):
+ if builtin_name not in sys.modules:
+ builtin_module = _bootstrap._builtin_from_name(builtin_name)
+ else:
+ builtin_module = sys.modules[builtin_name]
+ setattr(self_module, builtin_name, builtin_module)
+
+ # Directly load the os module (needed during bootstrap).
+ os_details = ('posix', ['/']), ('nt', ['\\', '/'])
+ for builtin_os, path_separators in os_details:
+ # Assumption made in _path_join()
+ assert all(len(sep) == 1 for sep in path_separators)
+ path_sep = path_separators[0]
+ if builtin_os in sys.modules:
+ os_module = sys.modules[builtin_os]
+ break
+ else:
+ try:
+ os_module = _bootstrap._builtin_from_name(builtin_os)
+ break
+ except ImportError:
+ continue
+ else:
+ raise ImportError('importlib requires posix or nt')
+ setattr(self_module, '_os', os_module)
+ setattr(self_module, 'path_sep', path_sep)
+ setattr(self_module, 'path_separators', ''.join(path_separators))
+
+ # Directly load the _thread module (needed during bootstrap).
+ try:
+ thread_module = _bootstrap._builtin_from_name('_thread')
+ except ImportError:
+ # Python was built without threads
+ thread_module = None
+ setattr(self_module, '_thread', thread_module)
+
+ # Directly load the _weakref module (needed during bootstrap).
+ weakref_module = _bootstrap._builtin_from_name('_weakref')
+ setattr(self_module, '_weakref', weakref_module)
+
+ # Directly load the winreg module (needed during bootstrap).
+ if builtin_os == 'nt':
+ winreg_module = _bootstrap._builtin_from_name('winreg')
+ setattr(self_module, '_winreg', winreg_module)
+
+ # Constants
+ setattr(self_module, '_relax_case', _make_relax_case())
+ EXTENSION_SUFFIXES.extend(_imp.extension_suffixes())
+ if builtin_os == 'nt':
+ SOURCE_SUFFIXES.append('.pyw')
+ if '_d.pyd' in EXTENSION_SUFFIXES:
+ WindowsRegistryFinder.DEBUG_BUILD = True
+
+
+def _install(_bootstrap_module):
+ """Install the path-based import components."""
+ _setup(_bootstrap_module)
+ supported_loaders = _get_supported_file_loaders()
+ sys.path_hooks.extend([FileFinder.path_hook(*supported_loaders)])
+ if _os.__name__ == 'nt':
+ sys.meta_path.append(WindowsRegistryFinder)
+ sys.meta_path.append(PathFinder)
+
+ # XXX We expose a couple of classes in _bootstrap for the sake of
+ # a setuptools bug (https://bitbucket.org/pypa/setuptools/issue/378).
+ _bootstrap_module.FileFinder = FileFinder
+ _bootstrap_module.SourceFileLoader = SourceFileLoader
diff --git a/Lib/importlib/abc.py b/Lib/importlib/abc.py
index 558abd3d9a..daff681e69 100644
--- a/Lib/importlib/abc.py
+++ b/Lib/importlib/abc.py
@@ -1,5 +1,6 @@
"""Abstract base classes related to import."""
from . import _bootstrap
+from . import _bootstrap_external
from . import machinery
try:
import _frozen_importlib
@@ -7,6 +8,10 @@ except ImportError as exc:
if exc.name != '_frozen_importlib':
raise
_frozen_importlib = None
+try:
+ import _frozen_importlib_external
+except ImportError as exc:
+ _frozen_importlib_external = _bootstrap_external
import abc
@@ -14,7 +19,10 @@ def _register(abstract_cls, *classes):
for cls in classes:
abstract_cls.register(cls)
if _frozen_importlib is not None:
- frozen_cls = getattr(_frozen_importlib, cls.__name__)
+ try:
+ frozen_cls = getattr(_frozen_importlib, cls.__name__)
+ except AttributeError:
+ frozen_cls = getattr(_frozen_importlib_external, cls.__name__)
abstract_cls.register(frozen_cls)
@@ -102,7 +110,7 @@ class PathEntryFinder(Finder):
else:
return None, []
- find_module = _bootstrap._find_module_shim
+ find_module = _bootstrap_external._find_module_shim
def invalidate_caches(self):
"""An optional method for clearing the finder's cache, if any.
@@ -122,11 +130,8 @@ class Loader(metaclass=abc.ABCMeta):
This method should raise ImportError if anything prevents it
from creating a new module. It may return None to indicate
that the spec should create the new module.
-
- create_module() is optional.
-
"""
- # By default, defer to _SpecMethods.create() for the new module.
+ # By default, defer to default semantics for the new module.
return None
# We don't define exec_module() here since that would break
@@ -217,15 +222,16 @@ class InspectLoader(Loader):
"""
raise ImportError
- def source_to_code(self, data, path='<string>'):
+ @staticmethod
+ def source_to_code(data, path='<string>'):
"""Compile 'data' into a code object.
The 'data' argument can be anything that compile() can handle. The'path'
argument should be where the data was retrieved (when applicable)."""
return compile(data, path, 'exec', dont_inherit=True)
- exec_module = _bootstrap._LoaderBasics.exec_module
- load_module = _bootstrap._LoaderBasics.load_module
+ exec_module = _bootstrap_external._LoaderBasics.exec_module
+ load_module = _bootstrap_external._LoaderBasics.load_module
_register(InspectLoader, machinery.BuiltinImporter, machinery.FrozenImporter)
@@ -267,7 +273,7 @@ class ExecutionLoader(InspectLoader):
_register(ExecutionLoader, machinery.ExtensionFileLoader)
-class FileLoader(_bootstrap.FileLoader, ResourceLoader, ExecutionLoader):
+class FileLoader(_bootstrap_external.FileLoader, ResourceLoader, ExecutionLoader):
"""Abstract base class partially implementing the ResourceLoader and
ExecutionLoader ABCs."""
@@ -276,7 +282,7 @@ _register(FileLoader, machinery.SourceFileLoader,
machinery.SourcelessFileLoader)
-class SourceLoader(_bootstrap.SourceLoader, ResourceLoader, ExecutionLoader):
+class SourceLoader(_bootstrap_external.SourceLoader, ResourceLoader, ExecutionLoader):
"""Abstract base class for loading source code (and optionally any
corresponding bytecode).
diff --git a/Lib/importlib/machinery.py b/Lib/importlib/machinery.py
index 2e1b2d73e7..1b2b5c9b4f 100644
--- a/Lib/importlib/machinery.py
+++ b/Lib/importlib/machinery.py
@@ -2,18 +2,18 @@
import _imp
-from ._bootstrap import (SOURCE_SUFFIXES, DEBUG_BYTECODE_SUFFIXES,
- OPTIMIZED_BYTECODE_SUFFIXES, BYTECODE_SUFFIXES,
- EXTENSION_SUFFIXES)
from ._bootstrap import ModuleSpec
from ._bootstrap import BuiltinImporter
from ._bootstrap import FrozenImporter
-from ._bootstrap import WindowsRegistryFinder
-from ._bootstrap import PathFinder
-from ._bootstrap import FileFinder
-from ._bootstrap import SourceFileLoader
-from ._bootstrap import SourcelessFileLoader
-from ._bootstrap import ExtensionFileLoader
+from ._bootstrap_external import (SOURCE_SUFFIXES, DEBUG_BYTECODE_SUFFIXES,
+ OPTIMIZED_BYTECODE_SUFFIXES, BYTECODE_SUFFIXES,
+ EXTENSION_SUFFIXES)
+from ._bootstrap_external import WindowsRegistryFinder
+from ._bootstrap_external import PathFinder
+from ._bootstrap_external import FileFinder
+from ._bootstrap_external import SourceFileLoader
+from ._bootstrap_external import SourcelessFileLoader
+from ._bootstrap_external import ExtensionFileLoader
def all_suffixes():
diff --git a/Lib/importlib/util.py b/Lib/importlib/util.py
index 6d73b1d7b6..4525b3f78e 100644
--- a/Lib/importlib/util.py
+++ b/Lib/importlib/util.py
@@ -1,17 +1,19 @@
"""Utility code for constructing importers, etc."""
-
-from ._bootstrap import MAGIC_NUMBER
-from ._bootstrap import cache_from_source
-from ._bootstrap import decode_source
-from ._bootstrap import source_from_cache
-from ._bootstrap import spec_from_loader
-from ._bootstrap import spec_from_file_location
+from . import abc
+from ._bootstrap import module_from_spec
from ._bootstrap import _resolve_name
+from ._bootstrap import spec_from_loader
from ._bootstrap import _find_spec
+from ._bootstrap_external import MAGIC_NUMBER
+from ._bootstrap_external import cache_from_source
+from ._bootstrap_external import decode_source
+from ._bootstrap_external import source_from_cache
+from ._bootstrap_external import spec_from_file_location
from contextlib import contextmanager
import functools
import sys
+import types
import warnings
@@ -54,7 +56,7 @@ def _find_spec_from_path(name, path=None):
try:
spec = module.__spec__
except AttributeError:
- raise ValueError('{}.__spec__ is not set'.format(name))
+ raise ValueError('{}.__spec__ is not set'.format(name)) from None
else:
if spec is None:
raise ValueError('{}.__spec__ is None'.format(name))
@@ -94,7 +96,7 @@ def find_spec(name, package=None):
try:
spec = module.__spec__
except AttributeError:
- raise ValueError('{}.__spec__ is not set'.format(name))
+ raise ValueError('{}.__spec__ is not set'.format(name)) from None
else:
if spec is None:
raise ValueError('{}.__spec__ is None'.format(name))
@@ -200,3 +202,89 @@ def module_for_loader(fxn):
return fxn(self, module, *args, **kwargs)
return module_for_loader_wrapper
+
+
+class _Module(types.ModuleType):
+
+ """A subclass of the module type to allow __class__ manipulation."""
+
+
+class _LazyModule(types.ModuleType):
+
+ """A subclass of the module type which triggers loading upon attribute access."""
+
+ def __getattribute__(self, attr):
+ """Trigger the load of the module and return the attribute."""
+ # All module metadata must be garnered from __spec__ in order to avoid
+ # using mutated values.
+ # Stop triggering this method.
+ self.__class__ = _Module
+ # Get the original name to make sure no object substitution occurred
+ # in sys.modules.
+ original_name = self.__spec__.name
+ # Figure out exactly what attributes were mutated between the creation
+ # of the module and now.
+ attrs_then = self.__spec__.loader_state
+ attrs_now = self.__dict__
+ attrs_updated = {}
+ for key, value in attrs_now.items():
+ # Code that set the attribute may have kept a reference to the
+ # assigned object, making identity more important than equality.
+ if key not in attrs_then:
+ attrs_updated[key] = value
+ elif id(attrs_now[key]) != id(attrs_then[key]):
+ attrs_updated[key] = value
+ self.__spec__.loader.exec_module(self)
+ # If exec_module() was used directly there is no guarantee the module
+ # object was put into sys.modules.
+ if original_name in sys.modules:
+ if id(self) != id(sys.modules[original_name]):
+ msg = ('module object for {!r} substituted in sys.modules '
+ 'during a lazy load')
+ raise ValueError(msg.format(original_name))
+ # Update after loading since that's what would happen in an eager
+ # loading situation.
+ self.__dict__.update(attrs_updated)
+ return getattr(self, attr)
+
+ def __delattr__(self, attr):
+ """Trigger the load and then perform the deletion."""
+ # To trigger the load and raise an exception if the attribute
+ # doesn't exist.
+ self.__getattribute__(attr)
+ delattr(self, attr)
+
+
+class LazyLoader(abc.Loader):
+
+ """A loader that creates a module which defers loading until attribute access."""
+
+ @staticmethod
+ def __check_eager_loader(loader):
+ if not hasattr(loader, 'exec_module'):
+ raise TypeError('loader must define exec_module()')
+
+ @classmethod
+ def factory(cls, loader):
+ """Construct a callable which returns the eager loader made lazy."""
+ cls.__check_eager_loader(loader)
+ return lambda *args, **kwargs: cls(loader(*args, **kwargs))
+
+ def __init__(self, loader):
+ self.__check_eager_loader(loader)
+ self.loader = loader
+
+ def create_module(self, spec):
+ """Create a module which can have its __class__ manipulated."""
+ return _Module(spec.name)
+
+ def exec_module(self, module):
+ """Make the module load lazily."""
+ module.__spec__.loader = self.loader
+ module.__loader__ = self.loader
+ # Don't need to worry about deep-copying as trying to set an attribute
+ # on an object would have triggered the load,
+ # e.g. ``module.__spec__.loader = None`` would trigger a load from
+ # trying to access module.__spec__.
+ module.__spec__.loader_state = module.__dict__.copy()
+ module.__class__ = _LazyModule
diff --git a/Lib/inspect.py b/Lib/inspect.py
index 4298de6b60..e830eb64ca 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -17,7 +17,7 @@ Here are some of the useful functions provided by this module:
getclasstree() - arrange classes so as to represent their hierarchy
getargspec(), getargvalues(), getcallargs() - get info about function arguments
- getfullargspec() - same, with support for Python-3000 features
+ getfullargspec() - same, with support for Python 3 features
formatargspec(), formatargvalues() - format an argument spec
getouterframes(), getinnerframes() - get info about frames
currentframe() - get the current stack frame
@@ -32,6 +32,9 @@ __author__ = ('Ka-Ping Yee <ping@lfw.org>',
'Yury Selivanov <yselivanov@sprymix.com>')
import ast
+import dis
+import collections.abc
+import enum
import importlib.machinery
import itertools
import linecache
@@ -48,18 +51,10 @@ from operator import attrgetter
from collections import namedtuple, OrderedDict
# Create constants for the compiler flags in Include/code.h
-# We try to get them from dis to avoid duplication, but fall
-# back to hard-coding so the dependency is optional
-try:
- from dis import COMPILER_FLAG_NAMES as _flag_names
-except ImportError:
- CO_OPTIMIZED, CO_NEWLOCALS = 0x1, 0x2
- CO_VARARGS, CO_VARKEYWORDS = 0x4, 0x8
- CO_NESTED, CO_GENERATOR, CO_NOFREE = 0x10, 0x20, 0x40
-else:
- mod_dict = globals()
- for k, v in _flag_names.items():
- mod_dict["CO_" + v] = k
+# We try to get them from dis to avoid duplication
+mod_dict = globals()
+for k, v in dis.COMPILER_FLAG_NAMES.items():
+ mod_dict["CO_" + v] = k
# See Include/object.h
TPFLAGS_IS_ABSTRACT = 1 << 20
@@ -182,6 +177,15 @@ def isgeneratorfunction(object):
return bool((isfunction(object) or ismethod(object)) and
object.__code__.co_flags & CO_GENERATOR)
+def iscoroutinefunction(object):
+ """Return true if the object is a coroutine function.
+
+ Coroutine functions are defined with "async def" syntax,
+ or generators decorated with "types.coroutine".
+ """
+ return bool((isfunction(object) or ismethod(object)) and
+ object.__code__.co_flags & CO_COROUTINE)
+
def isgenerator(object):
"""Return true if the object is a generator.
@@ -199,6 +203,17 @@ def isgenerator(object):
throw used to raise an exception inside the generator"""
return isinstance(object, types.GeneratorType)
+def iscoroutine(object):
+ """Return true if the object is a coroutine."""
+ return isinstance(object, types.CoroutineType)
+
+def isawaitable(object):
+ """Return true is object can be passed to an ``await`` expression."""
+ return (isinstance(object, types.CoroutineType) or
+ isinstance(object, types.GeneratorType) and
+ object.gi_code.co_flags & CO_ITERABLE_COROUTINE or
+ isinstance(object, collections.abc.Awaitable))
+
def istraceback(object):
"""Return true if the object is a traceback.
@@ -467,6 +482,75 @@ def indentsize(line):
expline = line.expandtabs()
return len(expline) - len(expline.lstrip())
+def _findclass(func):
+ cls = sys.modules.get(func.__module__)
+ if cls is None:
+ return None
+ for name in func.__qualname__.split('.')[:-1]:
+ cls = getattr(cls, name)
+ if not isclass(cls):
+ return None
+ return cls
+
+def _finddoc(obj):
+ if isclass(obj):
+ for base in obj.__mro__:
+ if base is not object:
+ try:
+ doc = base.__doc__
+ except AttributeError:
+ continue
+ if doc is not None:
+ return doc
+ return None
+
+ if ismethod(obj):
+ name = obj.__func__.__name__
+ self = obj.__self__
+ if (isclass(self) and
+ getattr(getattr(self, name, None), '__func__') is obj.__func__):
+ # classmethod
+ cls = self
+ else:
+ cls = self.__class__
+ elif isfunction(obj):
+ name = obj.__name__
+ cls = _findclass(obj)
+ if cls is None or getattr(cls, name) is not obj:
+ return None
+ elif isbuiltin(obj):
+ name = obj.__name__
+ self = obj.__self__
+ if (isclass(self) and
+ self.__qualname__ + '.' + name == obj.__qualname__):
+ # classmethod
+ cls = self
+ else:
+ cls = self.__class__
+ # Should be tested before isdatadescriptor().
+ elif isinstance(obj, property):
+ func = obj.fget
+ name = func.__name__
+ cls = _findclass(func)
+ if cls is None or getattr(cls, name) is not obj:
+ return None
+ elif ismethoddescriptor(obj) or isdatadescriptor(obj):
+ name = obj.__name__
+ cls = obj.__objclass__
+ if getattr(cls, name) is not obj:
+ return None
+ else:
+ return None
+
+ for base in cls.__mro__:
+ try:
+ doc = getattr(base, name).__doc__
+ except AttributeError:
+ continue
+ if doc is not None:
+ return doc
+ return None
+
def getdoc(object):
"""Get the documentation string for an object.
@@ -477,6 +561,11 @@ def getdoc(object):
doc = object.__doc__
except AttributeError:
return None
+ if doc is None:
+ try:
+ doc = _finddoc(object)
+ except (AttributeError, TypeError):
+ return None
if not isinstance(doc, str):
return None
return cleandoc(doc)
@@ -710,7 +799,7 @@ def findsource(object):
if not hasattr(object, 'co_firstlineno'):
raise OSError('could not find function definition')
lnum = object.co_firstlineno - 1
- pat = re.compile(r'^(\s*def\s)|(.*(?<!\w)lambda(:|\s))|^(\s*@)')
+ pat = re.compile(r'^(\s*def\s)|(\s*async\s+def\s)|(.*(?<!\w)lambda(:|\s))|^(\s*@)')
while lnum > 0:
if pat.match(lines[lnum]): break
lnum = lnum - 1
@@ -771,21 +860,37 @@ class BlockFinder:
self.islambda = False
self.started = False
self.passline = False
+ self.indecorator = False
+ self.decoratorhasargs = False
self.last = 1
def tokeneater(self, type, token, srowcol, erowcol, line):
- if not self.started:
+ if not self.started and not self.indecorator:
+ # skip any decorators
+ if token == "@":
+ self.indecorator = True
# look for the first "def", "class" or "lambda"
- if token in ("def", "class", "lambda"):
+ elif token in ("def", "class", "lambda"):
if token == "lambda":
self.islambda = True
self.started = True
self.passline = True # skip to the end of the line
+ elif token == "(":
+ if self.indecorator:
+ self.decoratorhasargs = True
+ elif token == ")":
+ if self.indecorator:
+ self.indecorator = False
+ self.decoratorhasargs = False
elif type == tokenize.NEWLINE:
self.passline = False # stop skipping when a NEWLINE is seen
self.last = srowcol[0]
if self.islambda: # lambdas always end at the first NEWLINE
raise EndOfBlock
+ # hitting a NEWLINE when in a decorator without args
+ # ends the decorator
+ if self.indecorator and not self.decoratorhasargs:
+ self.indecorator = False
elif self.passline:
pass
elif type == tokenize.INDENT:
@@ -822,10 +927,13 @@ def getsourcelines(object):
corresponding to the object and the line number indicates where in the
original source file the first line of code was found. An OSError is
raised if the source code cannot be retrieved."""
+ object = unwrap(object)
lines, lnum = findsource(object)
- if ismodule(object): return lines, 0
- else: return getblock(lines[lnum:]), lnum + 1
+ if ismodule(object):
+ return lines, 0
+ else:
+ return getblock(lines[lnum:]), lnum + 1
def getsource(object):
"""Return the text of the source code for an object.
@@ -919,17 +1027,18 @@ ArgSpec = namedtuple('ArgSpec', 'args varargs keywords defaults')
def getargspec(func):
"""Get the names and default values of a function's arguments.
- A tuple of four things is returned: (args, varargs, varkw, defaults).
- 'args' is a list of the argument names.
- 'args' will include keyword-only argument names.
- 'varargs' and 'varkw' are the names of the * and ** arguments or None.
+ A tuple of four things is returned: (args, varargs, keywords, defaults).
+ 'args' is a list of the argument names, including keyword-only argument names.
+ 'varargs' and 'keywords' are the names of the * and ** arguments or None.
'defaults' is an n-tuple of the default values of the last n arguments.
- Use the getfullargspec() API for Python-3000 code, as annotations
+ Use the getfullargspec() API for Python 3 code, as annotations
and keyword arguments are supported. getargspec() will raise ValueError
if the func has either annotations or keyword arguments.
"""
-
+ warnings.warn("inspect.getargspec() is deprecated, "
+ "use inspect.signature() instead", DeprecationWarning,
+ stacklevel=2)
args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, ann = \
getfullargspec(func)
if kwonlyargs or ann:
@@ -953,6 +1062,8 @@ def getfullargspec(func):
'annotations' is a dictionary mapping argument names to annotations.
The first four items in the tuple correspond to getargspec().
+
+ This function is deprecated, use inspect.signature() instead.
"""
try:
@@ -972,9 +1083,10 @@ def getfullargspec(func):
# getfullargspec() historically ignored __wrapped__ attributes,
# so we ensure that remains the case in 3.3+
- sig = _signature_internal(func,
- follow_wrapper_chains=False,
- skip_bound_arg=False)
+ sig = _signature_from_callable(func,
+ follow_wrapper_chains=False,
+ skip_bound_arg=False,
+ sigcls=Signature)
except Exception as ex:
# Most of the times 'signature' will raise ValueError.
# But, it can also raise AttributeError, and, maybe something
@@ -1043,8 +1155,8 @@ def getargvalues(frame):
def formatannotation(annotation, base_module=None):
if isinstance(annotation, type):
if annotation.__module__ in ('builtins', base_module):
- return annotation.__name__
- return annotation.__module__+'.'+annotation.__name__
+ return annotation.__qualname__
+ return annotation.__module__+'.'+annotation.__qualname__
return repr(annotation)
def formatannotationrelativeto(object):
@@ -1317,6 +1429,8 @@ def getlineno(frame):
# FrameType.f_lineno is now a descriptor that grovels co_lnotab
return frame.f_lineno
+FrameInfo = namedtuple('FrameInfo', ('frame',) + Traceback._fields)
+
def getouterframes(frame, context=1):
"""Get a list of records for a frame and all higher (calling) frames.
@@ -1324,7 +1438,8 @@ def getouterframes(frame, context=1):
name, a list of lines of context, and index within the context."""
framelist = []
while frame:
- framelist.append((frame,) + getframeinfo(frame, context))
+ frameinfo = (frame,) + getframeinfo(frame, context)
+ framelist.append(FrameInfo(*frameinfo))
frame = frame.f_back
return framelist
@@ -1335,7 +1450,8 @@ def getinnerframes(tb, context=1):
name, a list of lines of context, and index within the context."""
framelist = []
while tb:
- framelist.append((tb.tb_frame,) + getframeinfo(tb, context))
+ frameinfo = (tb.tb_frame,) + getframeinfo(tb, context)
+ framelist.append(FrameInfo(*frameinfo))
tb = tb.tb_next
return framelist
@@ -1485,6 +1601,45 @@ def getgeneratorlocals(generator):
else:
return {}
+
+# ------------------------------------------------ coroutine introspection
+
+CORO_CREATED = 'CORO_CREATED'
+CORO_RUNNING = 'CORO_RUNNING'
+CORO_SUSPENDED = 'CORO_SUSPENDED'
+CORO_CLOSED = 'CORO_CLOSED'
+
+def getcoroutinestate(coroutine):
+ """Get current state of a coroutine object.
+
+ Possible states are:
+ CORO_CREATED: Waiting to start execution.
+ CORO_RUNNING: Currently being executed by the interpreter.
+ CORO_SUSPENDED: Currently suspended at an await expression.
+ CORO_CLOSED: Execution has completed.
+ """
+ if coroutine.cr_running:
+ return CORO_RUNNING
+ if coroutine.cr_frame is None:
+ return CORO_CLOSED
+ if coroutine.cr_frame.f_lasti == -1:
+ return CORO_CREATED
+ return CORO_SUSPENDED
+
+
+def getcoroutinelocals(coroutine):
+ """
+ Get the mapping of coroutine local variables to their current values.
+
+ A dict is returned, with the keys the local variable names and values the
+ bound values."""
+ frame = getattr(coroutine, "cr_frame", None)
+ if frame is not None:
+ return frame.f_locals
+ else:
+ return {}
+
+
###############################################################################
### Function Signature Object (PEP 362)
###############################################################################
@@ -1501,6 +1656,10 @@ _NonUserDefinedCallables = (_WrapperDescriptor,
def _signature_get_user_defined_method(cls, method_name):
+ """Private helper. Checks if ``cls`` has an attribute
+ named ``method_name`` and returns it only if it is a
+ pure python function.
+ """
try:
meth = getattr(cls, method_name)
except AttributeError:
@@ -1513,9 +1672,10 @@ def _signature_get_user_defined_method(cls, method_name):
def _signature_get_partial(wrapped_sig, partial, extra_args=()):
- # Internal helper to calculate how 'wrapped_sig' signature will
- # look like after applying a 'functools.partial' object (or alike)
- # on it.
+ """Private helper to calculate how 'wrapped_sig' signature will
+ look like after applying a 'functools.partial' object (or alike)
+ on it.
+ """
old_params = wrapped_sig.parameters
new_params = OrderedDict(old_params.items())
@@ -1588,8 +1748,9 @@ def _signature_get_partial(wrapped_sig, partial, extra_args=()):
def _signature_bound_method(sig):
- # Internal helper to transform signatures for unbound
- # functions to bound methods
+ """Private helper to transform signatures for unbound
+ functions to bound methods.
+ """
params = tuple(sig.parameters.values())
@@ -1613,8 +1774,9 @@ def _signature_bound_method(sig):
def _signature_is_builtin(obj):
- # Internal helper to test if `obj` is a callable that might
- # support Argument Clinic's __text_signature__ protocol.
+ """Private helper to test if `obj` is a callable that might
+ support Argument Clinic's __text_signature__ protocol.
+ """
return (isbuiltin(obj) or
ismethoddescriptor(obj) or
isinstance(obj, _NonUserDefinedCallables) or
@@ -1624,10 +1786,11 @@ def _signature_is_builtin(obj):
def _signature_is_functionlike(obj):
- # Internal helper to test if `obj` is a duck type of FunctionType.
- # A good example of such objects are functions compiled with
- # Cython, which have all attributes that a pure Python function
- # would have, but have their code statically compiled.
+ """Private helper to test if `obj` is a duck type of FunctionType.
+ A good example of such objects are functions compiled with
+ Cython, which have all attributes that a pure Python function
+ would have, but have their code statically compiled.
+ """
if not callable(obj) or isclass(obj):
# All function-like objects are obviously callables,
@@ -1648,11 +1811,12 @@ def _signature_is_functionlike(obj):
def _signature_get_bound_param(spec):
- # Internal helper to get first parameter name from a
- # __text_signature__ of a builtin method, which should
- # be in the following format: '($param1, ...)'.
- # Assumptions are that the first argument won't have
- # a default value or an annotation.
+ """ Private helper to get first parameter name from a
+ __text_signature__ of a builtin method, which should
+ be in the following format: '($param1, ...)'.
+ Assumptions are that the first argument won't have
+ a default value or an annotation.
+ """
assert spec.startswith('($')
@@ -1671,7 +1835,9 @@ def _signature_get_bound_param(spec):
def _signature_strip_non_python_syntax(signature):
"""
- Takes a signature in Argument Clinic's extended signature format.
+ Private helper function. Takes a signature in Argument Clinic's
+ extended signature format.
+
Returns a tuple of three things:
* that signature re-rendered in standard Python syntax,
* the index of the "self" parameter (generally 0), or None if
@@ -1740,8 +1906,10 @@ def _signature_strip_non_python_syntax(signature):
def _signature_fromstr(cls, obj, s, skip_bound_arg=True):
- # Internal helper to parse content of '__text_signature__'
- # and return a Signature based on it
+ """Private helper to parse content of '__text_signature__'
+ and return a Signature based on it.
+ """
+
Parameter = cls._parameter_cls
clean_signature, self_parameter, last_positional_only = \
@@ -1879,8 +2047,10 @@ def _signature_fromstr(cls, obj, s, skip_bound_arg=True):
def _signature_from_builtin(cls, func, skip_bound_arg=True):
- # Internal helper function to get signature for
- # builtin callables
+ """Private helper function to get signature for
+ builtin callables.
+ """
+
if not _signature_is_builtin(func):
raise TypeError("{!r} is not a Python builtin "
"function".format(func))
@@ -1892,7 +2062,95 @@ def _signature_from_builtin(cls, func, skip_bound_arg=True):
return _signature_fromstr(cls, func, s, skip_bound_arg)
-def _signature_internal(obj, follow_wrapper_chains=True, skip_bound_arg=True):
+def _signature_from_function(cls, func):
+ """Private helper: constructs Signature for the given python function."""
+
+ is_duck_function = False
+ if not isfunction(func):
+ if _signature_is_functionlike(func):
+ is_duck_function = True
+ else:
+ # If it's not a pure Python function, and not a duck type
+ # of pure function:
+ raise TypeError('{!r} is not a Python function'.format(func))
+
+ Parameter = cls._parameter_cls
+
+ # Parameter information.
+ func_code = func.__code__
+ pos_count = func_code.co_argcount
+ arg_names = func_code.co_varnames
+ positional = tuple(arg_names[:pos_count])
+ keyword_only_count = func_code.co_kwonlyargcount
+ keyword_only = arg_names[pos_count:(pos_count + keyword_only_count)]
+ annotations = func.__annotations__
+ defaults = func.__defaults__
+ kwdefaults = func.__kwdefaults__
+
+ if defaults:
+ pos_default_count = len(defaults)
+ else:
+ pos_default_count = 0
+
+ parameters = []
+
+ # Non-keyword-only parameters w/o defaults.
+ non_default_count = pos_count - pos_default_count
+ for name in positional[:non_default_count]:
+ annotation = annotations.get(name, _empty)
+ parameters.append(Parameter(name, annotation=annotation,
+ kind=_POSITIONAL_OR_KEYWORD))
+
+ # ... w/ defaults.
+ for offset, name in enumerate(positional[non_default_count:]):
+ annotation = annotations.get(name, _empty)
+ parameters.append(Parameter(name, annotation=annotation,
+ kind=_POSITIONAL_OR_KEYWORD,
+ default=defaults[offset]))
+
+ # *args
+ if func_code.co_flags & CO_VARARGS:
+ name = arg_names[pos_count + keyword_only_count]
+ annotation = annotations.get(name, _empty)
+ parameters.append(Parameter(name, annotation=annotation,
+ kind=_VAR_POSITIONAL))
+
+ # Keyword-only parameters.
+ for name in keyword_only:
+ default = _empty
+ if kwdefaults is not None:
+ default = kwdefaults.get(name, _empty)
+
+ annotation = annotations.get(name, _empty)
+ parameters.append(Parameter(name, annotation=annotation,
+ kind=_KEYWORD_ONLY,
+ default=default))
+ # **kwargs
+ if func_code.co_flags & CO_VARKEYWORDS:
+ index = pos_count + keyword_only_count
+ if func_code.co_flags & CO_VARARGS:
+ index += 1
+
+ name = arg_names[index]
+ annotation = annotations.get(name, _empty)
+ parameters.append(Parameter(name, annotation=annotation,
+ kind=_VAR_KEYWORD))
+
+ # Is 'func' is a pure Python function - don't validate the
+ # parameters list (for correct order and defaults), it should be OK.
+ return cls(parameters,
+ return_annotation=annotations.get('return', _empty),
+ __validate_parameters__=is_duck_function)
+
+
+def _signature_from_callable(obj, *,
+ follow_wrapper_chains=True,
+ skip_bound_arg=True,
+ sigcls):
+
+ """Private helper function to get signature for arbitrary
+ callable objects.
+ """
if not callable(obj):
raise TypeError('{!r} is not a callable object'.format(obj))
@@ -1900,9 +2158,12 @@ def _signature_internal(obj, follow_wrapper_chains=True, skip_bound_arg=True):
if isinstance(obj, types.MethodType):
# In this case we skip the first parameter of the underlying
# function (usually `self` or `cls`).
- sig = _signature_internal(obj.__func__,
- follow_wrapper_chains,
- skip_bound_arg)
+ sig = _signature_from_callable(
+ obj.__func__,
+ follow_wrapper_chains=follow_wrapper_chains,
+ skip_bound_arg=skip_bound_arg,
+ sigcls=sigcls)
+
if skip_bound_arg:
return _signature_bound_method(sig)
else:
@@ -1915,10 +2176,11 @@ def _signature_internal(obj, follow_wrapper_chains=True, skip_bound_arg=True):
# If the unwrapped object is a *method*, we might want to
# skip its first parameter (self).
# See test_signature_wrapped_bound_method for details.
- return _signature_internal(
+ return _signature_from_callable(
obj,
follow_wrapper_chains=follow_wrapper_chains,
- skip_bound_arg=skip_bound_arg)
+ skip_bound_arg=skip_bound_arg,
+ sigcls=sigcls)
try:
sig = obj.__signature__
@@ -1945,9 +2207,12 @@ def _signature_internal(obj, follow_wrapper_chains=True, skip_bound_arg=True):
# (usually `self`, or `cls`) will not be passed
# automatically (as for boundmethods)
- wrapped_sig = _signature_internal(partialmethod.func,
- follow_wrapper_chains,
- skip_bound_arg)
+ wrapped_sig = _signature_from_callable(
+ partialmethod.func,
+ follow_wrapper_chains=follow_wrapper_chains,
+ skip_bound_arg=skip_bound_arg,
+ sigcls=sigcls)
+
sig = _signature_get_partial(wrapped_sig, partialmethod, (None,))
first_wrapped_param = tuple(wrapped_sig.parameters.values())[0]
@@ -1958,16 +2223,18 @@ def _signature_internal(obj, follow_wrapper_chains=True, skip_bound_arg=True):
if isfunction(obj) or _signature_is_functionlike(obj):
# If it's a pure Python function, or an object that is duck type
# of a Python function (Cython functions, for instance), then:
- return Signature.from_function(obj)
+ return _signature_from_function(sigcls, obj)
if _signature_is_builtin(obj):
- return _signature_from_builtin(Signature, obj,
+ return _signature_from_builtin(sigcls, obj,
skip_bound_arg=skip_bound_arg)
if isinstance(obj, functools.partial):
- wrapped_sig = _signature_internal(obj.func,
- follow_wrapper_chains,
- skip_bound_arg)
+ wrapped_sig = _signature_from_callable(
+ obj.func,
+ follow_wrapper_chains=follow_wrapper_chains,
+ skip_bound_arg=skip_bound_arg,
+ sigcls=sigcls)
return _signature_get_partial(wrapped_sig, obj)
sig = None
@@ -1978,23 +2245,29 @@ def _signature_internal(obj, follow_wrapper_chains=True, skip_bound_arg=True):
# in its metaclass
call = _signature_get_user_defined_method(type(obj), '__call__')
if call is not None:
- sig = _signature_internal(call,
- follow_wrapper_chains,
- skip_bound_arg)
+ sig = _signature_from_callable(
+ call,
+ follow_wrapper_chains=follow_wrapper_chains,
+ skip_bound_arg=skip_bound_arg,
+ sigcls=sigcls)
else:
# Now we check if the 'obj' class has a '__new__' method
new = _signature_get_user_defined_method(obj, '__new__')
if new is not None:
- sig = _signature_internal(new,
- follow_wrapper_chains,
- skip_bound_arg)
+ sig = _signature_from_callable(
+ new,
+ follow_wrapper_chains=follow_wrapper_chains,
+ skip_bound_arg=skip_bound_arg,
+ sigcls=sigcls)
else:
# Finally, we should have at least __init__ implemented
init = _signature_get_user_defined_method(obj, '__init__')
if init is not None:
- sig = _signature_internal(init,
- follow_wrapper_chains,
- skip_bound_arg)
+ sig = _signature_from_callable(
+ init,
+ follow_wrapper_chains=follow_wrapper_chains,
+ skip_bound_arg=skip_bound_arg,
+ sigcls=sigcls)
if sig is None:
# At this point we know, that `obj` is a class, with no user-
@@ -2016,7 +2289,7 @@ def _signature_internal(obj, follow_wrapper_chains=True, skip_bound_arg=True):
if text_sig:
# If 'obj' class has a __text_signature__ attribute:
# return a signature based on it
- return _signature_fromstr(Signature, obj, text_sig)
+ return _signature_fromstr(sigcls, obj, text_sig)
# No '__text_signature__' was found for the 'obj' class.
# Last option is to check if its '__init__' is
@@ -2024,9 +2297,13 @@ def _signature_internal(obj, follow_wrapper_chains=True, skip_bound_arg=True):
if type not in obj.__mro__:
# We have a class (not metaclass), but no user-defined
# __init__ or __new__ for it
- if obj.__init__ is object.__init__:
+ if (obj.__init__ is object.__init__ and
+ obj.__new__ is object.__new__):
# Return a signature of 'object' builtin.
return signature(object)
+ else:
+ raise ValueError(
+ 'no signature found for builtin type {!r}'.format(obj))
elif not isinstance(obj, _NonUserDefinedCallables):
# An object with __call__
@@ -2036,9 +2313,11 @@ def _signature_internal(obj, follow_wrapper_chains=True, skip_bound_arg=True):
call = _signature_get_user_defined_method(type(obj), '__call__')
if call is not None:
try:
- sig = _signature_internal(call,
- follow_wrapper_chains,
- skip_bound_arg)
+ sig = _signature_from_callable(
+ call,
+ follow_wrapper_chains=follow_wrapper_chains,
+ skip_bound_arg=skip_bound_arg,
+ sigcls=sigcls)
except ValueError as ex:
msg = 'no signature found for {!r}'.format(obj)
raise ValueError(msg) from ex
@@ -2058,41 +2337,35 @@ def _signature_internal(obj, follow_wrapper_chains=True, skip_bound_arg=True):
raise ValueError('callable {!r} is not supported by signature'.format(obj))
-def signature(obj):
- '''Get a signature object for the passed callable.'''
- return _signature_internal(obj)
-
class _void:
- '''A private marker - used in Parameter & Signature'''
+ """A private marker - used in Parameter & Signature."""
class _empty:
- pass
+ """Marker object for Signature.empty and Parameter.empty."""
-class _ParameterKind(int):
- def __new__(self, *args, name):
- obj = int.__new__(self, *args)
- obj._name = name
- return obj
+class _ParameterKind(enum.IntEnum):
+ POSITIONAL_ONLY = 0
+ POSITIONAL_OR_KEYWORD = 1
+ VAR_POSITIONAL = 2
+ KEYWORD_ONLY = 3
+ VAR_KEYWORD = 4
def __str__(self):
- return self._name
+ return self._name_
- def __repr__(self):
- return '<_ParameterKind: {!r}>'.format(self._name)
-
-_POSITIONAL_ONLY = _ParameterKind(0, name='POSITIONAL_ONLY')
-_POSITIONAL_OR_KEYWORD = _ParameterKind(1, name='POSITIONAL_OR_KEYWORD')
-_VAR_POSITIONAL = _ParameterKind(2, name='VAR_POSITIONAL')
-_KEYWORD_ONLY = _ParameterKind(3, name='KEYWORD_ONLY')
-_VAR_KEYWORD = _ParameterKind(4, name='VAR_KEYWORD')
+_POSITIONAL_ONLY = _ParameterKind.POSITIONAL_ONLY
+_POSITIONAL_OR_KEYWORD = _ParameterKind.POSITIONAL_OR_KEYWORD
+_VAR_POSITIONAL = _ParameterKind.VAR_POSITIONAL
+_KEYWORD_ONLY = _ParameterKind.KEYWORD_ONLY
+_VAR_KEYWORD = _ParameterKind.VAR_KEYWORD
class Parameter:
- '''Represents a parameter in a function signature.
+ """Represents a parameter in a function signature.
Has the following public attributes:
@@ -2111,7 +2384,7 @@ class Parameter:
Possible values: `Parameter.POSITIONAL_ONLY`,
`Parameter.POSITIONAL_OR_KEYWORD`, `Parameter.VAR_POSITIONAL`,
`Parameter.KEYWORD_ONLY`, `Parameter.VAR_KEYWORD`.
- '''
+ """
__slots__ = ('_name', '_kind', '_default', '_annotation')
@@ -2148,6 +2421,16 @@ class Parameter:
self._name = name
+ def __reduce__(self):
+ return (type(self),
+ (self._name, self._kind),
+ {'_default': self._default,
+ '_annotation': self._annotation})
+
+ def __setstate__(self, state):
+ self._default = state['_default']
+ self._annotation = state['_annotation']
+
@property
def name(self):
return self._name
@@ -2166,7 +2449,7 @@ class Parameter:
def replace(self, *, name=_void, kind=_void,
annotation=_void, default=_void):
- '''Creates a customized copy of the Parameter.'''
+ """Creates a customized copy of the Parameter."""
if name is _void:
name = self._name
@@ -2202,10 +2485,14 @@ class Parameter:
return formatted
def __repr__(self):
- return '<{} at {:#x} {!r}>'.format(self.__class__.__name__,
- id(self), self.name)
+ return '<{} "{}">'.format(self.__class__.__name__, self)
+
+ def __hash__(self):
+ return hash((self.name, self.kind, self.annotation, self.default))
def __eq__(self, other):
+ if self is other:
+ return True
if not isinstance(other, Parameter):
return NotImplemented
return (self._name == other._name and
@@ -2215,7 +2502,7 @@ class Parameter:
class BoundArguments:
- '''Result of `Signature.bind` call. Holds the mapping of arguments
+ """Result of `Signature.bind` call. Holds the mapping of arguments
to the function's parameters.
Has the following public attributes:
@@ -2229,7 +2516,9 @@ class BoundArguments:
Tuple of positional arguments values.
* kwargs : dict
Dict of keyword arguments values.
- '''
+ """
+
+ __slots__ = ('arguments', '_signature', '__weakref__')
def __init__(self, signature, arguments):
self.arguments = arguments
@@ -2292,15 +2581,58 @@ class BoundArguments:
return kwargs
+ def apply_defaults(self):
+ """Set default values for missing arguments.
+
+ For variable-positional arguments (*args) the default is an
+ empty tuple.
+
+ For variable-keyword arguments (**kwargs) the default is an
+ empty dict.
+ """
+ arguments = self.arguments
+ new_arguments = []
+ for name, param in self._signature.parameters.items():
+ try:
+ new_arguments.append((name, arguments[name]))
+ except KeyError:
+ if param.default is not _empty:
+ val = param.default
+ elif param.kind is _VAR_POSITIONAL:
+ val = ()
+ elif param.kind is _VAR_KEYWORD:
+ val = {}
+ else:
+ # This BoundArguments was likely produced by
+ # Signature.bind_partial().
+ continue
+ new_arguments.append((name, val))
+ self.arguments = OrderedDict(new_arguments)
+
def __eq__(self, other):
+ if self is other:
+ return True
if not isinstance(other, BoundArguments):
return NotImplemented
return (self.signature == other.signature and
self.arguments == other.arguments)
+ def __setstate__(self, state):
+ self._signature = state['_signature']
+ self.arguments = state['arguments']
+
+ def __getstate__(self):
+ return {'_signature': self._signature, 'arguments': self.arguments}
+
+ def __repr__(self):
+ args = []
+ for arg, value in self.arguments.items():
+ args.append('{}={!r}'.format(arg, value))
+ return '<{} ({})>'.format(self.__class__.__name__, ', '.join(args))
+
class Signature:
- '''A Signature object represents the overall signature of a function.
+ """A Signature object represents the overall signature of a function.
It stores a Parameter object for each parameter accepted by the
function, as well as information specific to the function itself.
@@ -2320,7 +2652,7 @@ class Signature:
* bind_partial(*args, **kwargs) -> BoundArguments
Creates a partial mapping from positional and keyword arguments
to parameters (simulating 'functools.partial' behavior.)
- '''
+ """
__slots__ = ('_return_annotation', '_parameters')
@@ -2331,9 +2663,9 @@ class Signature:
def __init__(self, parameters=None, *, return_annotation=_empty,
__validate_parameters__=True):
- '''Constructs Signature from the given list of Parameter
+ """Constructs Signature from the given list of Parameter
objects and 'return_annotation'. All arguments are optional.
- '''
+ """
if parameters is None:
params = OrderedDict()
@@ -2382,89 +2714,28 @@ class Signature:
@classmethod
def from_function(cls, func):
- '''Constructs Signature for the given python function'''
-
- is_duck_function = False
- if not isfunction(func):
- if _signature_is_functionlike(func):
- is_duck_function = True
- else:
- # If it's not a pure Python function, and not a duck type
- # of pure function:
- raise TypeError('{!r} is not a Python function'.format(func))
-
- Parameter = cls._parameter_cls
-
- # Parameter information.
- func_code = func.__code__
- pos_count = func_code.co_argcount
- arg_names = func_code.co_varnames
- positional = tuple(arg_names[:pos_count])
- keyword_only_count = func_code.co_kwonlyargcount
- keyword_only = arg_names[pos_count:(pos_count + keyword_only_count)]
- annotations = func.__annotations__
- defaults = func.__defaults__
- kwdefaults = func.__kwdefaults__
-
- if defaults:
- pos_default_count = len(defaults)
- else:
- pos_default_count = 0
-
- parameters = []
-
- # Non-keyword-only parameters w/o defaults.
- non_default_count = pos_count - pos_default_count
- for name in positional[:non_default_count]:
- annotation = annotations.get(name, _empty)
- parameters.append(Parameter(name, annotation=annotation,
- kind=_POSITIONAL_OR_KEYWORD))
+ """Constructs Signature for the given python function."""
- # ... w/ defaults.
- for offset, name in enumerate(positional[non_default_count:]):
- annotation = annotations.get(name, _empty)
- parameters.append(Parameter(name, annotation=annotation,
- kind=_POSITIONAL_OR_KEYWORD,
- default=defaults[offset]))
-
- # *args
- if func_code.co_flags & CO_VARARGS:
- name = arg_names[pos_count + keyword_only_count]
- annotation = annotations.get(name, _empty)
- parameters.append(Parameter(name, annotation=annotation,
- kind=_VAR_POSITIONAL))
-
- # Keyword-only parameters.
- for name in keyword_only:
- default = _empty
- if kwdefaults is not None:
- default = kwdefaults.get(name, _empty)
-
- annotation = annotations.get(name, _empty)
- parameters.append(Parameter(name, annotation=annotation,
- kind=_KEYWORD_ONLY,
- default=default))
- # **kwargs
- if func_code.co_flags & CO_VARKEYWORDS:
- index = pos_count + keyword_only_count
- if func_code.co_flags & CO_VARARGS:
- index += 1
-
- name = arg_names[index]
- annotation = annotations.get(name, _empty)
- parameters.append(Parameter(name, annotation=annotation,
- kind=_VAR_KEYWORD))
-
- # Is 'func' is a pure Python function - don't validate the
- # parameters list (for correct order and defaults), it should be OK.
- return cls(parameters,
- return_annotation=annotations.get('return', _empty),
- __validate_parameters__=is_duck_function)
+ warnings.warn("inspect.Signature.from_function() is deprecated, "
+ "use Signature.from_callable()",
+ DeprecationWarning, stacklevel=2)
+ return _signature_from_function(cls, func)
@classmethod
def from_builtin(cls, func):
+ """Constructs Signature for the given builtin function."""
+
+ warnings.warn("inspect.Signature.from_builtin() is deprecated, "
+ "use Signature.from_callable()",
+ DeprecationWarning, stacklevel=2)
return _signature_from_builtin(cls, func)
+ @classmethod
+ def from_callable(cls, obj, *, follow_wrapped=True):
+ """Constructs Signature for the given callable object."""
+ return _signature_from_callable(obj, sigcls=cls,
+ follow_wrapper_chains=follow_wrapped)
+
@property
def parameters(self):
return self._parameters
@@ -2474,10 +2745,10 @@ class Signature:
return self._return_annotation
def replace(self, *, parameters=_void, return_annotation=_void):
- '''Creates a customized copy of the Signature.
+ """Creates a customized copy of the Signature.
Pass 'parameters' and/or 'return_annotation' arguments
to override them in the new copy.
- '''
+ """
if parameters is _void:
parameters = self.parameters.values()
@@ -2488,39 +2759,29 @@ class Signature:
return type(self)(parameters,
return_annotation=return_annotation)
- def __eq__(self, other):
- if not isinstance(other, Signature):
- return NotImplemented
- if (self.return_annotation != other.return_annotation or
- len(self.parameters) != len(other.parameters)):
- return False
+ def _hash_basis(self):
+ params = tuple(param for param in self.parameters.values()
+ if param.kind != _KEYWORD_ONLY)
- other_positions = {param: idx
- for idx, param in enumerate(other.parameters.keys())}
+ kwo_params = {param.name: param for param in self.parameters.values()
+ if param.kind == _KEYWORD_ONLY}
- for idx, (param_name, param) in enumerate(self.parameters.items()):
- if param.kind == _KEYWORD_ONLY:
- try:
- other_param = other.parameters[param_name]
- except KeyError:
- return False
- else:
- if param != other_param:
- return False
- else:
- try:
- other_idx = other_positions[param_name]
- except KeyError:
- return False
- else:
- if (idx != other_idx or
- param != other.parameters[param_name]):
- return False
+ return params, kwo_params, self.return_annotation
+
+ def __hash__(self):
+ params, kwo_params, return_annotation = self._hash_basis()
+ kwo_params = frozenset(kwo_params.values())
+ return hash((params, kwo_params, return_annotation))
- return True
+ def __eq__(self, other):
+ if self is other:
+ return True
+ if not isinstance(other, Signature):
+ return NotImplemented
+ return self._hash_basis() == other._hash_basis()
def _bind(self, args, kwargs, *, partial=False):
- '''Private method. Don't use directly.'''
+ """Private method. Don't use directly."""
arguments = OrderedDict()
@@ -2568,7 +2829,7 @@ class Signature:
parameters_ex = (param,)
break
else:
- msg = '{arg!r} parameter lacking default value'
+ msg = 'missing a required argument: {arg!r}'
msg = msg.format(arg=param.name)
raise TypeError(msg) from None
else:
@@ -2581,7 +2842,8 @@ class Signature:
if param.kind in (_VAR_KEYWORD, _KEYWORD_ONLY):
# Looks like we have no parameter for this positional
# argument
- raise TypeError('too many positional arguments')
+ raise TypeError(
+ 'too many positional arguments') from None
if param.kind == _VAR_POSITIONAL:
# We have an '*args'-like argument, let's fill it with
@@ -2593,8 +2855,9 @@ class Signature:
break
if param.name in kwargs:
- raise TypeError('multiple values for argument '
- '{arg!r}'.format(arg=param.name))
+ raise TypeError(
+ 'multiple values for argument {arg!r}'.format(
+ arg=param.name)) from None
arguments[param.name] = arg_val
@@ -2623,7 +2886,7 @@ class Signature:
# arguments.
if (not partial and param.kind != _VAR_POSITIONAL and
param.default is _empty):
- raise TypeError('{arg!r} parameter lacking default value'. \
+ raise TypeError('missing a required argument: {arg!r}'. \
format(arg=param_name)) from None
else:
@@ -2642,24 +2905,37 @@ class Signature:
# Process our '**kwargs'-like parameter
arguments[kwargs_param.name] = kwargs
else:
- raise TypeError('too many keyword arguments')
+ raise TypeError(
+ 'got an unexpected keyword argument {arg!r}'.format(
+ arg=next(iter(kwargs))))
return self._bound_arguments_cls(self, arguments)
def bind(*args, **kwargs):
- '''Get a BoundArguments object, that maps the passed `args`
+ """Get a BoundArguments object, that maps the passed `args`
and `kwargs` to the function's signature. Raises `TypeError`
if the passed arguments can not be bound.
- '''
+ """
return args[0]._bind(args[1:], kwargs)
def bind_partial(*args, **kwargs):
- '''Get a BoundArguments object, that partially maps the
+ """Get a BoundArguments object, that partially maps the
passed `args` and `kwargs` to the function's signature.
Raises `TypeError` if the passed arguments can not be bound.
- '''
+ """
return args[0]._bind(args[1:], kwargs, partial=True)
+ def __reduce__(self):
+ return (type(self),
+ (tuple(self._parameters.values()),),
+ {'_return_annotation': self._return_annotation})
+
+ def __setstate__(self, state):
+ self._return_annotation = state['_return_annotation']
+
+ def __repr__(self):
+ return '<{} {}>'.format(self.__class__.__name__, self)
+
def __str__(self):
result = []
render_pos_only_separator = False
@@ -2705,6 +2981,12 @@ class Signature:
return rendered
+
+def signature(obj, *, follow_wrapped=True):
+ """Get a signature object for the passed callable."""
+ return Signature.from_callable(obj, follow_wrapped=follow_wrapped)
+
+
def _main():
""" Logic for inspecting an object given at command line """
import argparse
diff --git a/Lib/ipaddress.py b/Lib/ipaddress.py
index ac03c36ce0..1f90058382 100644
--- a/Lib/ipaddress.py
+++ b/Lib/ipaddress.py
@@ -135,7 +135,7 @@ def v4_int_to_packed(address):
"""
try:
return address.to_bytes(4, 'big')
- except:
+ except OverflowError:
raise ValueError("Address negative or too large for IPv4")
@@ -151,7 +151,7 @@ def v6_int_to_packed(address):
"""
try:
return address.to_bytes(16, 'big')
- except:
+ except OverflowError:
raise ValueError("Address negative or too large for IPv6")
@@ -164,22 +164,23 @@ def _split_optional_netmask(address):
def _find_address_range(addresses):
- """Find a sequence of IPv#Address.
+ """Find a sequence of sorted deduplicated IPv#Address.
Args:
addresses: a list of IPv#Address objects.
- Returns:
+ Yields:
A tuple containing the first and last IP addresses in the sequence.
"""
- first = last = addresses[0]
- for ip in addresses[1:]:
- if ip._ip == last._ip + 1:
- last = ip
- else:
- break
- return (first, last)
+ it = iter(addresses)
+ first = last = next(it)
+ for ip in it:
+ if ip._ip != last._ip + 1:
+ yield first, last
+ first = ip
+ last = ip
+ yield first, last
def _count_righthand_zero_bits(number, bits):
@@ -195,11 +196,7 @@ def _count_righthand_zero_bits(number, bits):
"""
if number == 0:
return bits
- for i in range(bits):
- if (number >> i) & 1:
- return i
- # All bits of interest were zero, even if there are more in the number
- return bits
+ return min(bits, (~number & (number-1)).bit_length())
def summarize_address_range(first, last):
@@ -250,15 +247,14 @@ def summarize_address_range(first, last):
while first_int <= last_int:
nbits = min(_count_righthand_zero_bits(first_int, ip_bits),
(last_int - first_int + 1).bit_length() - 1)
- net = ip('%s/%d' % (first, ip_bits - nbits))
+ net = ip((first_int, ip_bits - nbits))
yield net
first_int += 1 << nbits
if first_int - 1 == ip._ALL_ONES:
break
- first = first.__class__(first_int)
-def _collapse_addresses_recursive(addresses):
+def _collapse_addresses_internal(addresses):
"""Loops through the addresses, collapsing concurrent netblocks.
Example:
@@ -268,7 +264,7 @@ def _collapse_addresses_recursive(addresses):
ip3 = IPv4Network('192.0.2.128/26')
ip4 = IPv4Network('192.0.2.192/26')
- _collapse_addresses_recursive([ip1, ip2, ip3, ip4]) ->
+ _collapse_addresses_internal([ip1, ip2, ip3, ip4]) ->
[IPv4Network('192.0.2.0/24')]
This shouldn't be called directly; it is called via
@@ -282,28 +278,29 @@ def _collapse_addresses_recursive(addresses):
passed.
"""
- while True:
- last_addr = None
- ret_array = []
- optimized = False
-
- for cur_addr in addresses:
- if not ret_array:
- last_addr = cur_addr
- ret_array.append(cur_addr)
- elif (cur_addr.network_address >= last_addr.network_address and
- cur_addr.broadcast_address <= last_addr.broadcast_address):
- optimized = True
- elif cur_addr == list(last_addr.supernet().subnets())[1]:
- ret_array[-1] = last_addr = last_addr.supernet()
- optimized = True
- else:
- last_addr = cur_addr
- ret_array.append(cur_addr)
-
- addresses = ret_array
- if not optimized:
- return addresses
+ # First merge
+ to_merge = list(addresses)
+ subnets = {}
+ while to_merge:
+ net = to_merge.pop()
+ supernet = net.supernet()
+ existing = subnets.get(supernet)
+ if existing is None:
+ subnets[supernet] = net
+ elif existing != net:
+ # Merge consecutive subnets
+ del subnets[supernet]
+ to_merge.append(supernet)
+ # Then iterate over resulting networks, skipping subsumed subnets
+ last = None
+ for net in sorted(subnets.values()):
+ if last is not None:
+ # Since they are sorted, last.network_address <= net.network_address
+ # is a given.
+ if last.broadcast_address >= net.broadcast_address:
+ continue
+ yield net
+ last = net
def collapse_addresses(addresses):
@@ -324,7 +321,6 @@ def collapse_addresses(addresses):
TypeError: If passed a list of mixed version objects.
"""
- i = 0
addrs = []
ips = []
nets = []
@@ -352,15 +348,13 @@ def collapse_addresses(addresses):
# sort and dedup
ips = sorted(set(ips))
- nets = sorted(set(nets))
- while i < len(ips):
- (first, last) = _find_address_range(ips[i:])
- i = ips.index(last) + 1
- addrs.extend(summarize_address_range(first, last))
+ # find consecutive address ranges in the sorted sequence and summarize them
+ if ips:
+ for first, last in _find_address_range(ips):
+ addrs.extend(summarize_address_range(first, last))
- return iter(_collapse_addresses_recursive(sorted(
- addrs + nets, key=_BaseNetwork._get_networks_key)))
+ return _collapse_addresses_internal(addrs + nets)
def get_mixed_type_key(obj):
@@ -392,6 +386,8 @@ class _IPAddressBase:
"""The mother class."""
+ __slots__ = ()
+
@property
def exploded(self):
"""Return the longhand version of the IP address as a string."""
@@ -403,6 +399,17 @@ class _IPAddressBase:
return str(self)
@property
+ def reverse_pointer(self):
+ """The name of the reverse DNS pointer for the IP address, e.g.:
+ >>> ipaddress.ip_address("127.0.0.1").reverse_pointer
+ '1.0.0.127.in-addr.arpa'
+ >>> ipaddress.ip_address("2001:db8::1").reverse_pointer
+ '1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa'
+
+ """
+ return self._reverse_pointer()
+
+ @property
def version(self):
msg = '%200s has no version specified' % (type(self),)
raise NotImplementedError(msg)
@@ -423,7 +430,8 @@ class _IPAddressBase:
raise AddressValueError(msg % (address, address_len,
expected_len, self._version))
- def _ip_int_from_prefix(self, prefixlen):
+ @classmethod
+ def _ip_int_from_prefix(cls, prefixlen):
"""Turn the prefix length into a bitwise netmask
Args:
@@ -433,9 +441,10 @@ class _IPAddressBase:
An integer.
"""
- return self._ALL_ONES ^ (self._ALL_ONES >> prefixlen)
+ return cls._ALL_ONES ^ (cls._ALL_ONES >> prefixlen)
- def _prefix_from_ip_int(self, ip_int):
+ @classmethod
+ def _prefix_from_ip_int(cls, ip_int):
"""Return prefix length from the bitwise netmask.
Args:
@@ -448,22 +457,24 @@ class _IPAddressBase:
ValueError: If the input intermingles zeroes & ones
"""
trailing_zeroes = _count_righthand_zero_bits(ip_int,
- self._max_prefixlen)
- prefixlen = self._max_prefixlen - trailing_zeroes
+ cls._max_prefixlen)
+ prefixlen = cls._max_prefixlen - trailing_zeroes
leading_ones = ip_int >> trailing_zeroes
all_ones = (1 << prefixlen) - 1
if leading_ones != all_ones:
- byteslen = self._max_prefixlen // 8
+ byteslen = cls._max_prefixlen // 8
details = ip_int.to_bytes(byteslen, 'big')
msg = 'Netmask pattern %r mixes zeroes & ones'
raise ValueError(msg % details)
return prefixlen
- def _report_invalid_netmask(self, netmask_str):
+ @classmethod
+ def _report_invalid_netmask(cls, netmask_str):
msg = '%r is not a valid netmask' % netmask_str
raise NetmaskValueError(msg) from None
- def _prefix_from_prefix_string(self, prefixlen_str):
+ @classmethod
+ def _prefix_from_prefix_string(cls, prefixlen_str):
"""Return prefix length from a numeric string
Args:
@@ -478,16 +489,17 @@ class _IPAddressBase:
# int allows a leading +/- as well as surrounding whitespace,
# so we ensure that isn't the case
if not _BaseV4._DECIMAL_DIGITS.issuperset(prefixlen_str):
- self._report_invalid_netmask(prefixlen_str)
+ cls._report_invalid_netmask(prefixlen_str)
try:
prefixlen = int(prefixlen_str)
except ValueError:
- self._report_invalid_netmask(prefixlen_str)
- if not (0 <= prefixlen <= self._max_prefixlen):
- self._report_invalid_netmask(prefixlen_str)
+ cls._report_invalid_netmask(prefixlen_str)
+ if not (0 <= prefixlen <= cls._max_prefixlen):
+ cls._report_invalid_netmask(prefixlen_str)
return prefixlen
- def _prefix_from_ip_string(self, ip_str):
+ @classmethod
+ def _prefix_from_ip_string(cls, ip_str):
"""Turn a netmask/hostmask string into a prefix length
Args:
@@ -501,24 +513,27 @@ class _IPAddressBase:
"""
# Parse the netmask/hostmask like an IP address.
try:
- ip_int = self._ip_int_from_string(ip_str)
+ ip_int = cls._ip_int_from_string(ip_str)
except AddressValueError:
- self._report_invalid_netmask(ip_str)
+ cls._report_invalid_netmask(ip_str)
# Try matching a netmask (this would be /1*0*/ as a bitwise regexp).
# Note that the two ambiguous cases (all-ones and all-zeroes) are
# treated as netmasks.
try:
- return self._prefix_from_ip_int(ip_int)
+ return cls._prefix_from_ip_int(ip_int)
except ValueError:
pass
# Invert the bits, and try matching a /0+1+/ hostmask instead.
- ip_int ^= self._ALL_ONES
+ ip_int ^= cls._ALL_ONES
try:
- return self._prefix_from_ip_int(ip_int)
+ return cls._prefix_from_ip_int(ip_int)
except ValueError:
- self._report_invalid_netmask(ip_str)
+ cls._report_invalid_netmask(ip_str)
+
+ def __reduce__(self):
+ return self.__class__, (str(self),)
@functools.total_ordering
@@ -530,10 +545,7 @@ class _BaseAddress(_IPAddressBase):
used by single IP addresses.
"""
- def __init__(self, address):
- if (not isinstance(address, bytes)
- and '/' in str(address)):
- raise AddressValueError("Unexpected '/' in %r" % address)
+ __slots__ = ()
def __int__(self):
return self._ip
@@ -579,6 +591,9 @@ class _BaseAddress(_IPAddressBase):
def _get_address_key(self):
return (self._version, self)
+ def __reduce__(self):
+ return self.__class__, (self._ip,)
+
@functools.total_ordering
class _BaseNetwork(_IPAddressBase):
@@ -725,21 +740,21 @@ class _BaseNetwork(_IPAddressBase):
addr1 = ip_network('192.0.2.0/28')
addr2 = ip_network('192.0.2.1/32')
- addr1.address_exclude(addr2) =
+ list(addr1.address_exclude(addr2)) =
[IPv4Network('192.0.2.0/32'), IPv4Network('192.0.2.2/31'),
- IPv4Network('192.0.2.4/30'), IPv4Network('192.0.2.8/29')]
+ IPv4Network('192.0.2.4/30'), IPv4Network('192.0.2.8/29')]
or IPv6:
addr1 = ip_network('2001:db8::1/32')
addr2 = ip_network('2001:db8::1/128')
- addr1.address_exclude(addr2) =
+ list(addr1.address_exclude(addr2)) =
[ip_network('2001:db8::1/128'),
- ip_network('2001:db8::2/127'),
- ip_network('2001:db8::4/126'),
- ip_network('2001:db8::8/125'),
- ...
- ip_network('2001:db8:8000::/33')]
+ ip_network('2001:db8::2/127'),
+ ip_network('2001:db8::4/126'),
+ ip_network('2001:db8::8/125'),
+ ...
+ ip_network('2001:db8:8000::/33')]
Args:
other: An IPv4Network or IPv6Network object of the same type.
@@ -765,7 +780,7 @@ class _BaseNetwork(_IPAddressBase):
other.broadcast_address <= self.broadcast_address):
raise ValueError('%s not contained in %s' % (other, self))
if other == self:
- raise StopIteration
+ return
# Make sure we're comparing the network of other.
other = other.__class__('%s/%s' % (other.network_address,
@@ -900,20 +915,11 @@ class _BaseNetwork(_IPAddressBase):
'prefix length diff %d is invalid for netblock %s' % (
new_prefixlen, self))
- first = self.__class__('%s/%s' %
- (self.network_address,
- self._prefixlen + prefixlen_diff))
-
- yield first
- current = first
- while True:
- broadcast = current.broadcast_address
- if broadcast == self.broadcast_address:
- return
- new_addr = self._address_class(int(broadcast) + 1)
- current = self.__class__('%s/%s' % (new_addr,
- new_prefixlen))
-
+ start = int(self.network_address)
+ end = int(self.broadcast_address) + 1
+ step = (int(self.hostmask) + 1) >> prefixlen_diff
+ for new_addr in range(start, end, step):
+ current = self.__class__((new_addr, new_prefixlen))
yield current
def supernet(self, prefixlen_diff=1, new_prefix=None):
@@ -947,15 +953,15 @@ class _BaseNetwork(_IPAddressBase):
raise ValueError('cannot set prefixlen_diff and new_prefix')
prefixlen_diff = self._prefixlen - new_prefix
- if self.prefixlen - prefixlen_diff < 0:
+ new_prefixlen = self.prefixlen - prefixlen_diff
+ if new_prefixlen < 0:
raise ValueError(
'current prefixlen is %d, cannot have a prefixlen_diff of %d' %
(self.prefixlen, prefixlen_diff))
- # TODO (pmoody): optimize this.
- t = self.__class__('%s/%d' % (self.network_address,
- self.prefixlen - prefixlen_diff),
- strict=False)
- return t.__class__('%s/%d' % (t.network_address, t.prefixlen))
+ return self.__class__((
+ int(self.network_address) & (int(self.netmask) << prefixlen_diff),
+ new_prefixlen
+ ))
@property
def is_multicast(self):
@@ -1049,21 +1055,49 @@ class _BaseV4:
"""
+ __slots__ = ()
+ _version = 4
# Equivalent to 255.255.255.255 or 32 bits of 1's.
_ALL_ONES = (2**IPV4LENGTH) - 1
_DECIMAL_DIGITS = frozenset('0123456789')
# the valid octets for host and netmasks. only useful for IPv4.
- _valid_mask_octets = frozenset((255, 254, 252, 248, 240, 224, 192, 128, 0))
+ _valid_mask_octets = frozenset({255, 254, 252, 248, 240, 224, 192, 128, 0})
- def __init__(self, address):
- self._version = 4
- self._max_prefixlen = IPV4LENGTH
+ _max_prefixlen = IPV4LENGTH
+ # There are only a handful of valid v4 netmasks, so we cache them all
+ # when constructed (see _make_netmask()).
+ _netmask_cache = {}
def _explode_shorthand_ip_string(self):
return str(self)
- def _ip_int_from_string(self, ip_str):
+ @classmethod
+ def _make_netmask(cls, arg):
+ """Make a (netmask, prefix_len) tuple from the given argument.
+
+ Argument can be:
+ - an integer (the prefix length)
+ - a string representing the prefix length (e.g. "24")
+ - a string representing the prefix netmask (e.g. "255.255.255.0")
+ """
+ if arg not in cls._netmask_cache:
+ if isinstance(arg, int):
+ prefixlen = arg
+ else:
+ try:
+ # Check for a netmask in prefix length form
+ prefixlen = cls._prefix_from_prefix_string(arg)
+ except NetmaskValueError:
+ # Check for a netmask or hostmask in dotted-quad form.
+ # This may raise NetmaskValueError.
+ prefixlen = cls._prefix_from_ip_string(arg)
+ netmask = IPv4Address(cls._ip_int_from_prefix(prefixlen))
+ cls._netmask_cache[arg] = netmask, prefixlen
+ return cls._netmask_cache[arg]
+
+ @classmethod
+ def _ip_int_from_string(cls, ip_str):
"""Turn the given IP string into an integer for comparison.
Args:
@@ -1084,11 +1118,12 @@ class _BaseV4:
raise AddressValueError("Expected 4 octets in %r" % ip_str)
try:
- return int.from_bytes(map(self._parse_octet, octets), 'big')
+ return int.from_bytes(map(cls._parse_octet, octets), 'big')
except ValueError as exc:
raise AddressValueError("%s in %r" % (exc, ip_str)) from None
- def _parse_octet(self, octet_str):
+ @classmethod
+ def _parse_octet(cls, octet_str):
"""Convert a decimal octet into an integer.
Args:
@@ -1104,7 +1139,7 @@ class _BaseV4:
if not octet_str:
raise ValueError("Empty octet not permitted")
# Whitelist the characters, since int() allows a lot of bizarre stuff.
- if not self._DECIMAL_DIGITS.issuperset(octet_str):
+ if not cls._DECIMAL_DIGITS.issuperset(octet_str):
msg = "Only decimal digits permitted in %r"
raise ValueError(msg % octet_str)
# We do the length check second, since the invalid character error
@@ -1124,7 +1159,8 @@ class _BaseV4:
raise ValueError("Octet %d (> 255) not permitted" % octet_int)
return octet_int
- def _string_from_ip_int(self, ip_int):
+ @classmethod
+ def _string_from_ip_int(cls, ip_int):
"""Turns a 32-bit integer into dotted decimal notation.
Args:
@@ -1188,6 +1224,15 @@ class _BaseV4:
return True
return False
+ def _reverse_pointer(self):
+ """Return the reverse DNS pointer name for the IPv4 address.
+
+ This implements the method described in RFC1035 3.5.
+
+ """
+ reverse_octets = str(self).split('.')[::-1]
+ return '.'.join(reverse_octets) + '.in-addr.arpa'
+
@property
def max_prefixlen(self):
return self._max_prefixlen
@@ -1201,6 +1246,8 @@ class IPv4Address(_BaseV4, _BaseAddress):
"""Represent and manipulate single IPv4 Addresses."""
+ __slots__ = ('_ip', '__weakref__')
+
def __init__(self, address):
"""
@@ -1217,9 +1264,6 @@ class IPv4Address(_BaseV4, _BaseAddress):
AddressValueError: If ipaddress isn't a valid IPv4 address.
"""
- _BaseAddress.__init__(self, address)
- _BaseV4.__init__(self, address)
-
# Efficient constructor from integer.
if isinstance(address, int):
self._check_int_address(address)
@@ -1235,6 +1279,8 @@ class IPv4Address(_BaseV4, _BaseAddress):
# Assume input argument to be string or any object representation
# which converts into a formatted IP string.
addr_str = str(address)
+ if '/' in addr_str:
+ raise AddressValueError("Unexpected '/' in %r" % address)
self._ip = self._ip_int_from_string(addr_str)
@property
@@ -1251,8 +1297,7 @@ class IPv4Address(_BaseV4, _BaseAddress):
reserved IPv4 Network range.
"""
- reserved_network = IPv4Network('240.0.0.0/4')
- return self in reserved_network
+ return self in self._constants._reserved_network
@property
@functools.lru_cache()
@@ -1264,21 +1309,12 @@ class IPv4Address(_BaseV4, _BaseAddress):
iana-ipv4-special-registry.
"""
- return (self in IPv4Network('0.0.0.0/8') or
- self in IPv4Network('10.0.0.0/8') or
- self in IPv4Network('127.0.0.0/8') or
- self in IPv4Network('169.254.0.0/16') or
- self in IPv4Network('172.16.0.0/12') or
- self in IPv4Network('192.0.0.0/29') or
- self in IPv4Network('192.0.0.170/31') or
- self in IPv4Network('192.0.2.0/24') or
- self in IPv4Network('192.168.0.0/16') or
- self in IPv4Network('198.18.0.0/15') or
- self in IPv4Network('198.51.100.0/24') or
- self in IPv4Network('203.0.113.0/24') or
- self in IPv4Network('240.0.0.0/4') or
- self in IPv4Network('255.255.255.255/32'))
+ return any(self in net for net in self._constants._private_networks)
+ @property
+ @functools.lru_cache()
+ def is_global(self):
+ return self not in self._constants._public_network and not self.is_private
@property
def is_multicast(self):
@@ -1289,8 +1325,7 @@ class IPv4Address(_BaseV4, _BaseAddress):
See RFC 3171 for details.
"""
- multicast_network = IPv4Network('224.0.0.0/4')
- return self in multicast_network
+ return self in self._constants._multicast_network
@property
def is_unspecified(self):
@@ -1301,8 +1336,7 @@ class IPv4Address(_BaseV4, _BaseAddress):
RFC 5735 3.
"""
- unspecified_address = IPv4Address('0.0.0.0')
- return self == unspecified_address
+ return self == self._constants._unspecified_address
@property
def is_loopback(self):
@@ -1312,8 +1346,7 @@ class IPv4Address(_BaseV4, _BaseAddress):
A boolean, True if the address is a loopback per RFC 3330.
"""
- loopback_network = IPv4Network('127.0.0.0/8')
- return self in loopback_network
+ return self in self._constants._loopback_network
@property
def is_link_local(self):
@@ -1323,8 +1356,7 @@ class IPv4Address(_BaseV4, _BaseAddress):
A boolean, True if the address is link-local per RFC 3927.
"""
- linklocal_network = IPv4Network('169.254.0.0/16')
- return self in linklocal_network
+ return self in self._constants._linklocal_network
class IPv4Interface(IPv4Address):
@@ -1336,6 +1368,18 @@ class IPv4Interface(IPv4Address):
self._prefixlen = self._max_prefixlen
return
+ if isinstance(address, tuple):
+ IPv4Address.__init__(self, address[0])
+ if len(address) > 1:
+ self._prefixlen = int(address[1])
+ else:
+ self._prefixlen = self._max_prefixlen
+
+ self.network = IPv4Network(address, strict=False)
+ self.netmask = self.network.netmask
+ self.hostmask = self.network.hostmask
+ return
+
addr = _split_optional_netmask(address)
IPv4Address.__init__(self, addr[0])
@@ -1375,6 +1419,8 @@ class IPv4Interface(IPv4Address):
def __hash__(self):
return self._ip ^ self._prefixlen ^ int(self.network.network_address)
+ __reduce__ = _IPAddressBase.__reduce__
+
@property
def ip(self):
return IPv4Address(self._ip)
@@ -1447,24 +1493,30 @@ class IPv4Network(_BaseV4, _BaseNetwork):
supplied.
"""
-
- _BaseV4.__init__(self, address)
_BaseNetwork.__init__(self, address)
- # Constructing from a packed address
- if isinstance(address, bytes):
+ # Constructing from a packed address or integer
+ if isinstance(address, (int, bytes)):
self.network_address = IPv4Address(address)
- self._prefixlen = self._max_prefixlen
- self.netmask = IPv4Address(self._ALL_ONES)
- #fixme: address/network test here
+ self.netmask, self._prefixlen = self._make_netmask(self._max_prefixlen)
+ #fixme: address/network test here.
return
- # Efficient constructor from integer.
- if isinstance(address, int):
- self.network_address = IPv4Address(address)
- self._prefixlen = self._max_prefixlen
- self.netmask = IPv4Address(self._ALL_ONES)
- #fixme: address/network test here.
+ if isinstance(address, tuple):
+ if len(address) > 1:
+ arg = address[1]
+ else:
+ # We weren't given an address[1]
+ arg = self._max_prefixlen
+ self.network_address = IPv4Address(address[0])
+ self.netmask, self._prefixlen = self._make_netmask(arg)
+ packed = int(self.network_address)
+ if packed & int(self.netmask) != packed:
+ if strict:
+ raise ValueError('%s has host bits set' % self)
+ else:
+ self.network_address = IPv4Address(packed &
+ int(self.netmask))
return
# Assume input argument to be string or any object representation
@@ -1473,16 +1525,10 @@ class IPv4Network(_BaseV4, _BaseNetwork):
self.network_address = IPv4Address(self._ip_int_from_string(addr[0]))
if len(addr) == 2:
- try:
- # Check for a netmask in prefix length form
- self._prefixlen = self._prefix_from_prefix_string(addr[1])
- except NetmaskValueError:
- # Check for a netmask or hostmask in dotted-quad form.
- # This may raise NetmaskValueError.
- self._prefixlen = self._prefix_from_ip_string(addr[1])
+ arg = addr[1]
else:
- self._prefixlen = self._max_prefixlen
- self.netmask = IPv4Address(self._ip_int_from_prefix(self._prefixlen))
+ arg = self._max_prefixlen
+ self.netmask, self._prefixlen = self._make_netmask(arg)
if strict:
if (IPv4Address(int(self.network_address) & int(self.netmask)) !=
@@ -1509,6 +1555,39 @@ class IPv4Network(_BaseV4, _BaseNetwork):
not self.is_private)
+class _IPv4Constants:
+ _linklocal_network = IPv4Network('169.254.0.0/16')
+
+ _loopback_network = IPv4Network('127.0.0.0/8')
+
+ _multicast_network = IPv4Network('224.0.0.0/4')
+
+ _public_network = IPv4Network('100.64.0.0/10')
+
+ _private_networks = [
+ IPv4Network('0.0.0.0/8'),
+ IPv4Network('10.0.0.0/8'),
+ IPv4Network('127.0.0.0/8'),
+ IPv4Network('169.254.0.0/16'),
+ IPv4Network('172.16.0.0/12'),
+ IPv4Network('192.0.0.0/29'),
+ IPv4Network('192.0.0.170/31'),
+ IPv4Network('192.0.2.0/24'),
+ IPv4Network('192.168.0.0/16'),
+ IPv4Network('198.18.0.0/15'),
+ IPv4Network('198.51.100.0/24'),
+ IPv4Network('203.0.113.0/24'),
+ IPv4Network('240.0.0.0/4'),
+ IPv4Network('255.255.255.255/32'),
+ ]
+
+ _reserved_network = IPv4Network('240.0.0.0/4')
+
+ _unspecified_address = IPv4Address('0.0.0.0')
+
+
+IPv4Address._constants = _IPv4Constants
+
class _BaseV6:
@@ -1519,15 +1598,37 @@ class _BaseV6:
"""
+ __slots__ = ()
+ _version = 6
_ALL_ONES = (2**IPV6LENGTH) - 1
_HEXTET_COUNT = 8
_HEX_DIGITS = frozenset('0123456789ABCDEFabcdef')
+ _max_prefixlen = IPV6LENGTH
- def __init__(self, address):
- self._version = 6
- self._max_prefixlen = IPV6LENGTH
+ # There are only a bunch of valid v6 netmasks, so we cache them all
+ # when constructed (see _make_netmask()).
+ _netmask_cache = {}
+
+ @classmethod
+ def _make_netmask(cls, arg):
+ """Make a (netmask, prefix_len) tuple from the given argument.
+
+ Argument can be:
+ - an integer (the prefix length)
+ - a string representing the prefix length (e.g. "24")
+ - a string representing the prefix netmask (e.g. "255.255.255.0")
+ """
+ if arg not in cls._netmask_cache:
+ if isinstance(arg, int):
+ prefixlen = arg
+ else:
+ prefixlen = cls._prefix_from_prefix_string(arg)
+ netmask = IPv6Address(cls._ip_int_from_prefix(prefixlen))
+ cls._netmask_cache[arg] = netmask, prefixlen
+ return cls._netmask_cache[arg]
- def _ip_int_from_string(self, ip_str):
+ @classmethod
+ def _ip_int_from_string(cls, ip_str):
"""Turn an IPv6 ip_str into an integer.
Args:
@@ -1563,7 +1664,7 @@ class _BaseV6:
# An IPv6 address can't have more than 8 colons (9 parts).
# The extra colon comes from using the "::" notation for a single
# leading or trailing zero part.
- _max_parts = self._HEXTET_COUNT + 1
+ _max_parts = cls._HEXTET_COUNT + 1
if len(parts) > _max_parts:
msg = "At most %d colons permitted in %r" % (_max_parts-1, ip_str)
raise AddressValueError(msg)
@@ -1595,17 +1696,17 @@ class _BaseV6:
if parts_lo:
msg = "Trailing ':' only permitted as part of '::' in %r"
raise AddressValueError(msg % ip_str) # :$ requires ::$
- parts_skipped = self._HEXTET_COUNT - (parts_hi + parts_lo)
+ parts_skipped = cls._HEXTET_COUNT - (parts_hi + parts_lo)
if parts_skipped < 1:
msg = "Expected at most %d other parts with '::' in %r"
- raise AddressValueError(msg % (self._HEXTET_COUNT-1, ip_str))
+ raise AddressValueError(msg % (cls._HEXTET_COUNT-1, ip_str))
else:
# Otherwise, allocate the entire address to parts_hi. The
# endpoints could still be empty, but _parse_hextet() will check
# for that.
- if len(parts) != self._HEXTET_COUNT:
+ if len(parts) != cls._HEXTET_COUNT:
msg = "Exactly %d parts expected without '::' in %r"
- raise AddressValueError(msg % (self._HEXTET_COUNT, ip_str))
+ raise AddressValueError(msg % (cls._HEXTET_COUNT, ip_str))
if not parts[0]:
msg = "Leading ':' only permitted as part of '::' in %r"
raise AddressValueError(msg % ip_str) # ^: requires ^::
@@ -1621,16 +1722,17 @@ class _BaseV6:
ip_int = 0
for i in range(parts_hi):
ip_int <<= 16
- ip_int |= self._parse_hextet(parts[i])
+ ip_int |= cls._parse_hextet(parts[i])
ip_int <<= 16 * parts_skipped
for i in range(-parts_lo, 0):
ip_int <<= 16
- ip_int |= self._parse_hextet(parts[i])
+ ip_int |= cls._parse_hextet(parts[i])
return ip_int
except ValueError as exc:
raise AddressValueError("%s in %r" % (exc, ip_str)) from None
- def _parse_hextet(self, hextet_str):
+ @classmethod
+ def _parse_hextet(cls, hextet_str):
"""Convert an IPv6 hextet string into an integer.
Args:
@@ -1645,7 +1747,7 @@ class _BaseV6:
"""
# Whitelist the characters, since int() allows a lot of bizarre stuff.
- if not self._HEX_DIGITS.issuperset(hextet_str):
+ if not cls._HEX_DIGITS.issuperset(hextet_str):
raise ValueError("Only hex digits permitted in %r" % hextet_str)
# We do the length check second, since the invalid character error
# is likely to be more informative for the user
@@ -1655,7 +1757,8 @@ class _BaseV6:
# Length check means we can skip checking the integer value
return int(hextet_str, 16)
- def _compress_hextets(self, hextets):
+ @classmethod
+ def _compress_hextets(cls, hextets):
"""Compresses a list of hextets.
Compresses a list of strings, replacing the longest continuous
@@ -1702,7 +1805,8 @@ class _BaseV6:
return hextets
- def _string_from_ip_int(self, ip_int=None):
+ @classmethod
+ def _string_from_ip_int(cls, ip_int=None):
"""Turns a 128-bit integer into hexadecimal notation.
Args:
@@ -1716,15 +1820,15 @@ class _BaseV6:
"""
if ip_int is None:
- ip_int = int(self._ip)
+ ip_int = int(cls._ip)
- if ip_int > self._ALL_ONES:
+ if ip_int > cls._ALL_ONES:
raise ValueError('IPv6 address is too large')
hex_str = '%032x' % ip_int
hextets = ['%x' % int(hex_str[x:x+4], 16) for x in range(0, 32, 4)]
- hextets = self._compress_hextets(hextets)
+ hextets = cls._compress_hextets(hextets)
return ':'.join(hextets)
def _explode_shorthand_ip_string(self):
@@ -1751,6 +1855,15 @@ class _BaseV6:
return '%s/%d' % (':'.join(parts), self._prefixlen)
return ':'.join(parts)
+ def _reverse_pointer(self):
+ """Return the reverse DNS pointer name for the IPv6 address.
+
+ This implements the method described in RFC3596 2.5.
+
+ """
+ reverse_chars = self.exploded[::-1].replace(':', '')
+ return '.'.join(reverse_chars) + '.ip6.arpa'
+
@property
def max_prefixlen(self):
return self._max_prefixlen
@@ -1764,6 +1877,8 @@ class IPv6Address(_BaseV6, _BaseAddress):
"""Represent and manipulate single IPv6 Addresses."""
+ __slots__ = ('_ip', '__weakref__')
+
def __init__(self, address):
"""Instantiate a new IPv6 address object.
@@ -1781,9 +1896,6 @@ class IPv6Address(_BaseV6, _BaseAddress):
AddressValueError: If address isn't a valid IPv6 address.
"""
- _BaseAddress.__init__(self, address)
- _BaseV6.__init__(self, address)
-
# Efficient constructor from integer.
if isinstance(address, int):
self._check_int_address(address)
@@ -1799,6 +1911,8 @@ class IPv6Address(_BaseV6, _BaseAddress):
# Assume input argument to be string or any object representation
# which converts into a formatted IP string.
addr_str = str(address)
+ if '/' in addr_str:
+ raise AddressValueError("Unexpected '/' in %r" % address)
self._ip = self._ip_int_from_string(addr_str)
@property
@@ -1815,8 +1929,7 @@ class IPv6Address(_BaseV6, _BaseAddress):
See RFC 2373 2.7 for details.
"""
- multicast_network = IPv6Network('ff00::/8')
- return self in multicast_network
+ return self in self._constants._multicast_network
@property
def is_reserved(self):
@@ -1827,16 +1940,7 @@ class IPv6Address(_BaseV6, _BaseAddress):
reserved IPv6 Network ranges.
"""
- reserved_networks = [IPv6Network('::/8'), IPv6Network('100::/8'),
- IPv6Network('200::/7'), IPv6Network('400::/6'),
- IPv6Network('800::/5'), IPv6Network('1000::/4'),
- IPv6Network('4000::/3'), IPv6Network('6000::/3'),
- IPv6Network('8000::/3'), IPv6Network('A000::/3'),
- IPv6Network('C000::/3'), IPv6Network('E000::/4'),
- IPv6Network('F000::/5'), IPv6Network('F800::/6'),
- IPv6Network('FE00::/9')]
-
- return any(self in x for x in reserved_networks)
+ return any(self in x for x in self._constants._reserved_networks)
@property
def is_link_local(self):
@@ -1846,8 +1950,7 @@ class IPv6Address(_BaseV6, _BaseAddress):
A boolean, True if the address is reserved per RFC 4291.
"""
- linklocal_network = IPv6Network('fe80::/10')
- return self in linklocal_network
+ return self in self._constants._linklocal_network
@property
def is_site_local(self):
@@ -1861,8 +1964,7 @@ class IPv6Address(_BaseV6, _BaseAddress):
A boolean, True if the address is reserved per RFC 3513 2.5.6.
"""
- sitelocal_network = IPv6Network('fec0::/10')
- return self in sitelocal_network
+ return self in self._constants._sitelocal_network
@property
@functools.lru_cache()
@@ -1874,16 +1976,7 @@ class IPv6Address(_BaseV6, _BaseAddress):
iana-ipv6-special-registry.
"""
- return (self in IPv6Network('::1/128') or
- self in IPv6Network('::/128') or
- self in IPv6Network('::ffff:0:0/96') or
- self in IPv6Network('100::/64') or
- self in IPv6Network('2001::/23') or
- self in IPv6Network('2001:2::/48') or
- self in IPv6Network('2001:db8::/32') or
- self in IPv6Network('2001:10::/28') or
- self in IPv6Network('fc00::/7') or
- self in IPv6Network('fe80::/10'))
+ return any(self in net for net in self._constants._private_networks)
@property
def is_global(self):
@@ -1968,6 +2061,16 @@ class IPv6Interface(IPv6Address):
self.network = IPv6Network(self._ip)
self._prefixlen = self._max_prefixlen
return
+ if isinstance(address, tuple):
+ IPv6Address.__init__(self, address[0])
+ if len(address) > 1:
+ self._prefixlen = int(address[1])
+ else:
+ self._prefixlen = self._max_prefixlen
+ self.network = IPv6Network(address, strict=False)
+ self.netmask = self.network.netmask
+ self.hostmask = self.network.hostmask
+ return
addr = _split_optional_netmask(address)
IPv6Address.__init__(self, addr[0])
@@ -2006,6 +2109,8 @@ class IPv6Interface(IPv6Address):
def __hash__(self):
return self._ip ^ self._prefixlen ^ int(self.network.network_address)
+ __reduce__ = _IPAddressBase.__reduce__
+
@property
def ip(self):
return IPv6Address(self._ip)
@@ -2082,21 +2187,28 @@ class IPv6Network(_BaseV6, _BaseNetwork):
supplied.
"""
- _BaseV6.__init__(self, address)
_BaseNetwork.__init__(self, address)
- # Efficient constructor from integer.
- if isinstance(address, int):
+ # Efficient constructor from integer or packed address
+ if isinstance(address, (bytes, int)):
self.network_address = IPv6Address(address)
- self._prefixlen = self._max_prefixlen
- self.netmask = IPv6Address(self._ALL_ONES)
+ self.netmask, self._prefixlen = self._make_netmask(self._max_prefixlen)
return
- # Constructing from a packed address
- if isinstance(address, bytes):
- self.network_address = IPv6Address(address)
- self._prefixlen = self._max_prefixlen
- self.netmask = IPv6Address(self._ALL_ONES)
+ if isinstance(address, tuple):
+ if len(address) > 1:
+ arg = address[1]
+ else:
+ arg = self._max_prefixlen
+ self.netmask, self._prefixlen = self._make_netmask(arg)
+ self.network_address = IPv6Address(address[0])
+ packed = int(self.network_address)
+ if packed & int(self.netmask) != packed:
+ if strict:
+ raise ValueError('%s has host bits set' % self)
+ else:
+ self.network_address = IPv6Address(packed &
+ int(self.netmask))
return
# Assume input argument to be string or any object representation
@@ -2106,12 +2218,11 @@ class IPv6Network(_BaseV6, _BaseNetwork):
self.network_address = IPv6Address(self._ip_int_from_string(addr[0]))
if len(addr) == 2:
- # This may raise NetmaskValueError
- self._prefixlen = self._prefix_from_prefix_string(addr[1])
+ arg = addr[1]
else:
- self._prefixlen = self._max_prefixlen
+ arg = self._max_prefixlen
+ self.netmask, self._prefixlen = self._make_netmask(arg)
- self.netmask = IPv6Address(self._ip_int_from_prefix(self._prefixlen))
if strict:
if (IPv6Address(int(self.network_address) & int(self.netmask)) !=
self.network_address):
@@ -2148,3 +2259,39 @@ class IPv6Network(_BaseV6, _BaseNetwork):
"""
return (self.network_address.is_site_local and
self.broadcast_address.is_site_local)
+
+
+class _IPv6Constants:
+
+ _linklocal_network = IPv6Network('fe80::/10')
+
+ _multicast_network = IPv6Network('ff00::/8')
+
+ _private_networks = [
+ IPv6Network('::1/128'),
+ IPv6Network('::/128'),
+ IPv6Network('::ffff:0:0/96'),
+ IPv6Network('100::/64'),
+ IPv6Network('2001::/23'),
+ IPv6Network('2001:2::/48'),
+ IPv6Network('2001:db8::/32'),
+ IPv6Network('2001:10::/28'),
+ IPv6Network('fc00::/7'),
+ IPv6Network('fe80::/10'),
+ ]
+
+ _reserved_networks = [
+ IPv6Network('::/8'), IPv6Network('100::/8'),
+ IPv6Network('200::/7'), IPv6Network('400::/6'),
+ IPv6Network('800::/5'), IPv6Network('1000::/4'),
+ IPv6Network('4000::/3'), IPv6Network('6000::/3'),
+ IPv6Network('8000::/3'), IPv6Network('A000::/3'),
+ IPv6Network('C000::/3'), IPv6Network('E000::/4'),
+ IPv6Network('F000::/5'), IPv6Network('F800::/6'),
+ IPv6Network('FE00::/9'),
+ ]
+
+ _sitelocal_network = IPv6Network('fec0::/10')
+
+
+IPv6Address._constants = _IPv6Constants
diff --git a/Lib/json/__init__.py b/Lib/json/__init__.py
index 9398667385..2612657faf 100644
--- a/Lib/json/__init__.py
+++ b/Lib/json/__init__.py
@@ -98,12 +98,12 @@ Using json.tool from the shell to validate and pretty-print::
__version__ = '2.0.9'
__all__ = [
'dump', 'dumps', 'load', 'loads',
- 'JSONDecoder', 'JSONEncoder',
+ 'JSONDecoder', 'JSONDecodeError', 'JSONEncoder',
]
__author__ = 'Bob Ippolito <bob@redivi.com>'
-from .decoder import JSONDecoder
+from .decoder import JSONDecoder, JSONDecodeError
from .encoder import JSONEncoder
_default_encoder = JSONEncoder(
@@ -311,7 +311,8 @@ def loads(s, encoding=None, cls=None, object_hook=None, parse_float=None,
raise TypeError('the JSON object must be str, not {!r}'.format(
s.__class__.__name__))
if s.startswith(u'\ufeff'):
- raise ValueError("Unexpected UTF-8 BOM (decode using utf-8-sig)")
+ raise JSONDecodeError("Unexpected UTF-8 BOM (decode using utf-8-sig)",
+ s, 0)
if (cls is None and object_hook is None and
parse_int is None and parse_float is None and
parse_constant is None and object_pairs_hook is None and not kw):
diff --git a/Lib/json/decoder.py b/Lib/json/decoder.py
index 59e5f41f4d..0f03f20042 100644
--- a/Lib/json/decoder.py
+++ b/Lib/json/decoder.py
@@ -8,7 +8,7 @@ try:
except ImportError:
c_scanstring = None
-__all__ = ['JSONDecoder']
+__all__ = ['JSONDecoder', 'JSONDecodeError']
FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL
@@ -17,32 +17,30 @@ PosInf = float('inf')
NegInf = float('-inf')
-def linecol(doc, pos):
- if isinstance(doc, bytes):
- newline = b'\n'
- else:
- newline = '\n'
- lineno = doc.count(newline, 0, pos) + 1
- if lineno == 1:
- colno = pos + 1
- else:
- colno = pos - doc.rindex(newline, 0, pos)
- return lineno, colno
-
-
-def errmsg(msg, doc, pos, end=None):
- # Note that this function is called from _json
- lineno, colno = linecol(doc, pos)
- if end is None:
- fmt = '{0}: line {1} column {2} (char {3})'
- return fmt.format(msg, lineno, colno, pos)
- #fmt = '%s: line %d column %d (char %d)'
- #return fmt % (msg, lineno, colno, pos)
- endlineno, endcolno = linecol(doc, end)
- fmt = '{0}: line {1} column {2} - line {3} column {4} (char {5} - {6})'
- return fmt.format(msg, lineno, colno, endlineno, endcolno, pos, end)
- #fmt = '%s: line %d column %d - line %d column %d (char %d - %d)'
- #return fmt % (msg, lineno, colno, endlineno, endcolno, pos, end)
+class JSONDecodeError(ValueError):
+ """Subclass of ValueError with the following additional properties:
+
+ msg: The unformatted error message
+ doc: The JSON document being parsed
+ pos: The start index of doc where parsing failed
+ lineno: The line corresponding to pos
+ colno: The column corresponding to pos
+
+ """
+ # Note that this exception is used from _json
+ def __init__(self, msg, doc, pos):
+ lineno = doc.count('\n', 0, pos) + 1
+ colno = pos - doc.rfind('\n', 0, pos)
+ errmsg = '%s: line %d column %d (char %d)' % (msg, lineno, colno, pos)
+ ValueError.__init__(self, errmsg)
+ self.msg = msg
+ self.doc = doc
+ self.pos = pos
+ self.lineno = lineno
+ self.colno = colno
+
+ def __reduce__(self):
+ return self.__class__, (self.msg, self.doc, self.pos)
_CONSTANTS = {
@@ -66,7 +64,7 @@ def _decode_uXXXX(s, pos):
except ValueError:
pass
msg = "Invalid \\uXXXX escape"
- raise ValueError(errmsg(msg, s, pos))
+ raise JSONDecodeError(msg, s, pos)
def py_scanstring(s, end, strict=True,
_b=BACKSLASH, _m=STRINGCHUNK.match):
@@ -84,8 +82,7 @@ def py_scanstring(s, end, strict=True,
while 1:
chunk = _m(s, end)
if chunk is None:
- raise ValueError(
- errmsg("Unterminated string starting at", s, begin))
+ raise JSONDecodeError("Unterminated string starting at", s, begin)
end = chunk.end()
content, terminator = chunk.groups()
# Content is contains zero or more unescaped string characters
@@ -99,22 +96,21 @@ def py_scanstring(s, end, strict=True,
if strict:
#msg = "Invalid control character %r at" % (terminator,)
msg = "Invalid control character {0!r} at".format(terminator)
- raise ValueError(errmsg(msg, s, end))
+ raise JSONDecodeError(msg, s, end)
else:
_append(terminator)
continue
try:
esc = s[end]
except IndexError:
- raise ValueError(
- errmsg("Unterminated string starting at", s, begin))
+ raise JSONDecodeError("Unterminated string starting at", s, begin)
# If not a unicode escape sequence, must be in the lookup table
if esc != 'u':
try:
char = _b[esc]
except KeyError:
msg = "Invalid \\escape: {0!r}".format(esc)
- raise ValueError(errmsg(msg, s, end))
+ raise JSONDecodeError(msg, s, end)
end += 1
else:
uni = _decode_uXXXX(s, end)
@@ -163,8 +159,8 @@ def JSONObject(s_and_end, strict, scan_once, object_hook, object_pairs_hook,
pairs = object_hook(pairs)
return pairs, end + 1
elif nextchar != '"':
- raise ValueError(errmsg(
- "Expecting property name enclosed in double quotes", s, end))
+ raise JSONDecodeError(
+ "Expecting property name enclosed in double quotes", s, end)
end += 1
while True:
key, end = scanstring(s, end, strict)
@@ -174,7 +170,7 @@ def JSONObject(s_and_end, strict, scan_once, object_hook, object_pairs_hook,
if s[end:end + 1] != ':':
end = _w(s, end).end()
if s[end:end + 1] != ':':
- raise ValueError(errmsg("Expecting ':' delimiter", s, end))
+ raise JSONDecodeError("Expecting ':' delimiter", s, end)
end += 1
try:
@@ -188,7 +184,7 @@ def JSONObject(s_and_end, strict, scan_once, object_hook, object_pairs_hook,
try:
value, end = scan_once(s, end)
except StopIteration as err:
- raise ValueError(errmsg("Expecting value", s, err.value)) from None
+ raise JSONDecodeError("Expecting value", s, err.value) from None
pairs_append((key, value))
try:
nextchar = s[end]
@@ -202,13 +198,13 @@ def JSONObject(s_and_end, strict, scan_once, object_hook, object_pairs_hook,
if nextchar == '}':
break
elif nextchar != ',':
- raise ValueError(errmsg("Expecting ',' delimiter", s, end - 1))
+ raise JSONDecodeError("Expecting ',' delimiter", s, end - 1)
end = _w(s, end).end()
nextchar = s[end:end + 1]
end += 1
if nextchar != '"':
- raise ValueError(errmsg(
- "Expecting property name enclosed in double quotes", s, end - 1))
+ raise JSONDecodeError(
+ "Expecting property name enclosed in double quotes", s, end - 1)
if object_pairs_hook is not None:
result = object_pairs_hook(pairs)
return result, end
@@ -232,7 +228,7 @@ def JSONArray(s_and_end, scan_once, _w=WHITESPACE.match, _ws=WHITESPACE_STR):
try:
value, end = scan_once(s, end)
except StopIteration as err:
- raise ValueError(errmsg("Expecting value", s, err.value)) from None
+ raise JSONDecodeError("Expecting value", s, err.value) from None
_append(value)
nextchar = s[end:end + 1]
if nextchar in _ws:
@@ -242,7 +238,7 @@ def JSONArray(s_and_end, scan_once, _w=WHITESPACE.match, _ws=WHITESPACE_STR):
if nextchar == ']':
break
elif nextchar != ',':
- raise ValueError(errmsg("Expecting ',' delimiter", s, end - 1))
+ raise JSONDecodeError("Expecting ',' delimiter", s, end - 1)
try:
if s[end] in _ws:
end += 1
@@ -343,7 +339,7 @@ class JSONDecoder(object):
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
end = _w(s, end).end()
if end != len(s):
- raise ValueError(errmsg("Extra data", s, end, len(s)))
+ raise JSONDecodeError("Extra data", s, end)
return obj
def raw_decode(self, s, idx=0):
@@ -358,5 +354,5 @@ class JSONDecoder(object):
try:
obj, end = self.scan_once(s, idx)
except StopIteration as err:
- raise ValueError(errmsg("Expecting value", s, err.value)) from None
+ raise JSONDecodeError("Expecting value", s, err.value) from None
return obj, end
diff --git a/Lib/json/encoder.py b/Lib/json/encoder.py
index 05138383bc..d596489f42 100644
--- a/Lib/json/encoder.py
+++ b/Lib/json/encoder.py
@@ -7,6 +7,10 @@ try:
except ImportError:
c_encode_basestring_ascii = None
try:
+ from _json import encode_basestring as c_encode_basestring
+except ImportError:
+ c_encode_basestring = None
+try:
from _json import make_encoder as c_make_encoder
except ImportError:
c_make_encoder = None
@@ -28,9 +32,8 @@ for i in range(0x20):
#ESCAPE_DCT.setdefault(chr(i), '\\u%04x' % (i,))
INFINITY = float('inf')
-FLOAT_REPR = repr
-def encode_basestring(s):
+def py_encode_basestring(s):
"""Return a JSON representation of a Python string
"""
@@ -39,6 +42,9 @@ def encode_basestring(s):
return '"' + ESCAPE.sub(replace, s) + '"'
+encode_basestring = (c_encode_basestring or py_encode_basestring)
+
+
def py_encode_basestring_ascii(s):
"""Return an ASCII-only JSON representation of a Python string
@@ -214,7 +220,7 @@ class JSONEncoder(object):
_encoder = encode_basestring
def floatstr(o, allow_nan=self.allow_nan,
- _repr=FLOAT_REPR, _inf=INFINITY, _neginf=-INFINITY):
+ _repr=float.__repr__, _inf=INFINITY, _neginf=-INFINITY):
# Check for specials. Note that this type of test is processor
# and/or platform-specific, so do tests which don't depend on the
# internals.
@@ -261,6 +267,7 @@ def _make_iterencode(markers, _default, _encoder, _indent, _floatstr,
list=list,
str=str,
tuple=tuple,
+ _intstr=int.__str__,
):
if _indent is not None and not isinstance(_indent, str):
@@ -302,10 +309,10 @@ def _make_iterencode(markers, _default, _encoder, _indent, _floatstr,
# Subclasses of int/float may override __str__, but we still
# want to encode them as integers/floats in JSON. One example
# within the standard library is IntEnum.
- yield buf + str(int(value))
+ yield buf + _intstr(value)
elif isinstance(value, float):
# see comment above for int
- yield buf + _floatstr(float(value))
+ yield buf + _floatstr(value)
else:
yield buf
if isinstance(value, (list, tuple)):
@@ -352,7 +359,7 @@ def _make_iterencode(markers, _default, _encoder, _indent, _floatstr,
# also allow them. Many encoders seem to do something like this.
elif isinstance(key, float):
# see comment for int/float in _make_iterencode
- key = _floatstr(float(key))
+ key = _floatstr(key)
elif key is True:
key = 'true'
elif key is False:
@@ -361,7 +368,7 @@ def _make_iterencode(markers, _default, _encoder, _indent, _floatstr,
key = 'null'
elif isinstance(key, int):
# see comment for int/float in _make_iterencode
- key = str(int(key))
+ key = _intstr(key)
elif _skipkeys:
continue
else:
@@ -382,10 +389,10 @@ def _make_iterencode(markers, _default, _encoder, _indent, _floatstr,
yield 'false'
elif isinstance(value, int):
# see comment for int/float in _make_iterencode
- yield str(int(value))
+ yield _intstr(value)
elif isinstance(value, float):
# see comment for int/float in _make_iterencode
- yield _floatstr(float(value))
+ yield _floatstr(value)
else:
if isinstance(value, (list, tuple)):
chunks = _iterencode_list(value, _current_indent_level)
@@ -412,10 +419,10 @@ def _make_iterencode(markers, _default, _encoder, _indent, _floatstr,
yield 'false'
elif isinstance(o, int):
# see comment for int/float in _make_iterencode
- yield str(int(o))
+ yield _intstr(o)
elif isinstance(o, float):
# see comment for int/float in _make_iterencode
- yield _floatstr(float(o))
+ yield _floatstr(o)
elif isinstance(o, (list, tuple)):
yield from _iterencode_list(o, _current_indent_level)
elif isinstance(o, dict):
diff --git a/Lib/json/tool.py b/Lib/json/tool.py
index 7db4528571..4f3182c0c1 100644
--- a/Lib/json/tool.py
+++ b/Lib/json/tool.py
@@ -10,28 +10,39 @@ Usage::
Expecting property name enclosed in double quotes: line 1 column 3 (char 2)
"""
-import sys
+import argparse
+import collections
import json
+import sys
+
def main():
- if len(sys.argv) == 1:
- infile = sys.stdin
- outfile = sys.stdout
- elif len(sys.argv) == 2:
- infile = open(sys.argv[1], 'r')
- outfile = sys.stdout
- elif len(sys.argv) == 3:
- infile = open(sys.argv[1], 'r')
- outfile = open(sys.argv[2], 'w')
- else:
- raise SystemExit(sys.argv[0] + " [infile [outfile]]")
+ prog = 'python -m json.tool'
+ description = ('A simple command line interface for json module '
+ 'to validate and pretty-print JSON objects.')
+ parser = argparse.ArgumentParser(prog=prog, description=description)
+ parser.add_argument('infile', nargs='?', type=argparse.FileType(),
+ help='a JSON file to be validated or pretty-printed')
+ parser.add_argument('outfile', nargs='?', type=argparse.FileType('w'),
+ help='write the output of infile to outfile')
+ parser.add_argument('--sort-keys', action='store_true', default=False,
+ help='sort the output of dictionaries alphabetically by key')
+ options = parser.parse_args()
+
+ infile = options.infile or sys.stdin
+ outfile = options.outfile or sys.stdout
+ sort_keys = options.sort_keys
with infile:
try:
- obj = json.load(infile)
+ if sort_keys:
+ obj = json.load(infile)
+ else:
+ obj = json.load(infile,
+ object_pairs_hook=collections.OrderedDict)
except ValueError as e:
raise SystemExit(e)
with outfile:
- json.dump(obj, outfile, sort_keys=True, indent=4)
+ json.dump(obj, outfile, sort_keys=sort_keys, indent=4)
outfile.write('\n')
diff --git a/Lib/lib2to3/Grammar.txt b/Lib/lib2to3/Grammar.txt
index e667bcde69..c954669e8a 100644
--- a/Lib/lib2to3/Grammar.txt
+++ b/Lib/lib2to3/Grammar.txt
@@ -33,7 +33,8 @@ eval_input: testlist NEWLINE* ENDMARKER
decorator: '@' dotted_name [ '(' [arglist] ')' ] NEWLINE
decorators: decorator+
-decorated: decorators (classdef | funcdef)
+decorated: decorators (classdef | funcdef | async_funcdef)
+async_funcdef: ASYNC funcdef
funcdef: 'def' NAME parameters ['->' test] ':' suite
parameters: '(' [typedargslist] ')'
typedargslist: ((tfpdef ['=' test] ',')*
@@ -82,7 +83,8 @@ global_stmt: ('global' | 'nonlocal') NAME (',' NAME)*
exec_stmt: 'exec' expr ['in' test [',' test]]
assert_stmt: 'assert' test [',' test]
-compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | with_stmt | funcdef | classdef | decorated
+compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt | with_stmt | funcdef | classdef | decorated | async_stmt
+async_stmt: ASYNC (funcdef | with_stmt | for_stmt)
if_stmt: 'if' test ':' suite ('elif' test ':' suite)* ['else' ':' suite]
while_stmt: 'while' test ':' suite ['else' ':' suite]
for_stmt: 'for' exprlist 'in' testlist ':' suite ['else' ':' suite]
@@ -121,7 +123,7 @@ shift_expr: arith_expr (('<<'|'>>') arith_expr)*
arith_expr: term (('+'|'-') term)*
term: factor (('*'|'@'|'/'|'%'|'//') factor)*
factor: ('+'|'-'|'~') factor | power
-power: atom trailer* ['**' factor]
+power: [AWAIT] atom trailer* ['**' factor]
atom: ('(' [yield_expr|testlist_gexp] ')' |
'[' [listmaker] ']' |
'{' [dictsetmaker] '}' |
@@ -142,7 +144,7 @@ dictsetmaker: ( (test ':' test (comp_for | (',' test ':' test)* [','])) |
classdef: 'class' NAME ['(' [arglist] ')'] ':' suite
arglist: (argument ',')* (argument [',']
- |'*' test (',' argument)* [',' '**' test]
+ |'*' test (',' argument)* [',' '**' test]
|'**' test)
argument: test [comp_for] | test '=' test # Really [keyword '='] test
diff --git a/Lib/lib2to3/btm_utils.py b/Lib/lib2to3/btm_utils.py
index 339750edba..ff76ba3404 100644
--- a/Lib/lib2to3/btm_utils.py
+++ b/Lib/lib2to3/btm_utils.py
@@ -215,7 +215,7 @@ def reduce_tree(node, parent=None):
#reduce to None
new_node = None
elif repeater_node.children[0].value == '+':
- #reduce to a single occurence i.e. do nothing
+ #reduce to a single occurrence i.e. do nothing
pass
else:
#TODO: handle {min, max} repeaters
diff --git a/Lib/lib2to3/fixer_base.py b/Lib/lib2to3/fixer_base.py
index b176056199..1ce62fec15 100644
--- a/Lib/lib2to3/fixer_base.py
+++ b/Lib/lib2to3/fixer_base.py
@@ -49,7 +49,7 @@ class BaseFix(object):
"""Initializer. Subclass may override.
Args:
- options: an dict containing the options passed to RefactoringTool
+ options: a dict containing the options passed to RefactoringTool
that could be used to customize the fixer through the command line.
log: a list to append warnings and other messages to.
"""
diff --git a/Lib/lib2to3/fixes/fix_metaclass.py b/Lib/lib2to3/fixes/fix_metaclass.py
index f3f8708570..46c7aaf1e3 100644
--- a/Lib/lib2to3/fixes/fix_metaclass.py
+++ b/Lib/lib2to3/fixes/fix_metaclass.py
@@ -25,7 +25,7 @@ from ..fixer_util import Name, syms, Node, Leaf
def has_metaclass(parent):
""" we have to check the cls_node without changing it.
- There are two possiblities:
+ There are two possibilities:
1) clsdef => suite => simple_stmt => expr_stmt => Leaf('__meta')
2) clsdef => simple_stmt => expr_stmt => Leaf('__meta')
"""
diff --git a/Lib/lib2to3/patcomp.py b/Lib/lib2to3/patcomp.py
index 2012ec4855..06a4b9dd23 100644
--- a/Lib/lib2to3/patcomp.py
+++ b/Lib/lib2to3/patcomp.py
@@ -3,7 +3,7 @@
"""Pattern compiler.
-The grammer is taken from PatternGrammar.txt.
+The grammar is taken from PatternGrammar.txt.
The compiler compiles a pattern to a pytree.*Pattern instance.
"""
diff --git a/Lib/lib2to3/pgen2/token.py b/Lib/lib2to3/pgen2/token.py
index 7599396611..1a679554d2 100755
--- a/Lib/lib2to3/pgen2/token.py
+++ b/Lib/lib2to3/pgen2/token.py
@@ -62,8 +62,10 @@ OP = 52
COMMENT = 53
NL = 54
RARROW = 55
-ERRORTOKEN = 56
-N_TOKENS = 57
+AWAIT = 56
+ASYNC = 57
+ERRORTOKEN = 58
+N_TOKENS = 59
NT_OFFSET = 256
#--end constants--
diff --git a/Lib/lib2to3/pgen2/tokenize.py b/Lib/lib2to3/pgen2/tokenize.py
index 3dd1ee9968..d14db60f7d 100644
--- a/Lib/lib2to3/pgen2/tokenize.py
+++ b/Lib/lib2to3/pgen2/tokenize.py
@@ -220,7 +220,7 @@ class Untokenizer:
for tok in iterable:
toknum, tokval = tok[:2]
- if toknum in (NAME, NUMBER):
+ if toknum in (NAME, NUMBER, ASYNC, AWAIT):
tokval += ' '
if toknum == INDENT:
@@ -236,7 +236,7 @@ class Untokenizer:
startline = False
toks_append(tokval)
-cookie_re = re.compile(r'^[ \t\f]*#.*coding[:=][ \t]*([-\w.]+)', re.ASCII)
+cookie_re = re.compile(r'^[ \t\f]*#.*?coding[:=][ \t]*([-\w.]+)', re.ASCII)
blank_re = re.compile(br'^[ \t\f]*(?:[#\r\n]|$)', re.ASCII)
def _get_normal_name(orig_enc):
@@ -366,6 +366,12 @@ def generate_tokens(readline):
contline = None
indents = [0]
+ # 'stashed' and 'async_*' are used for async/await parsing
+ stashed = None
+ async_def = False
+ async_def_indent = 0
+ async_def_nl = False
+
while 1: # loop over lines in stream
try:
line = readline()
@@ -406,6 +412,10 @@ def generate_tokens(readline):
pos = pos + 1
if pos == max: break
+ if stashed:
+ yield stashed
+ stashed = None
+
if line[pos] in '#\r\n': # skip comments or blank lines
if line[pos] == '#':
comment_token = line[pos:].rstrip('\r\n')
@@ -428,8 +438,19 @@ def generate_tokens(readline):
"unindent does not match any outer indentation level",
("<tokenize>", lnum, pos, line))
indents = indents[:-1]
+
+ if async_def and async_def_indent >= indents[-1]:
+ async_def = False
+ async_def_nl = False
+ async_def_indent = 0
+
yield (DEDENT, '', (lnum, pos), (lnum, pos), line)
+ if async_def and async_def_nl and async_def_indent >= indents[-1]:
+ async_def = False
+ async_def_nl = False
+ async_def_indent = 0
+
else: # continued statement
if not line:
raise TokenError("EOF in multi-line statement", (lnum, 0))
@@ -449,9 +470,18 @@ def generate_tokens(readline):
newline = NEWLINE
if parenlev > 0:
newline = NL
+ elif async_def:
+ async_def_nl = True
+ if stashed:
+ yield stashed
+ stashed = None
yield (newline, token, spos, epos, line)
+
elif initial == '#':
assert not token.endswith("\n")
+ if stashed:
+ yield stashed
+ stashed = None
yield (COMMENT, token, spos, epos, line)
elif token in triple_quoted:
endprog = endprogs[token]
@@ -459,6 +489,9 @@ def generate_tokens(readline):
if endmatch: # all on one line
pos = endmatch.end(0)
token = line[start:pos]
+ if stashed:
+ yield stashed
+ stashed = None
yield (STRING, token, spos, (lnum, pos), line)
else:
strstart = (lnum, start) # multiple lines
@@ -476,22 +509,63 @@ def generate_tokens(readline):
contline = line
break
else: # ordinary string
+ if stashed:
+ yield stashed
+ stashed = None
yield (STRING, token, spos, epos, line)
elif initial in namechars: # ordinary name
- yield (NAME, token, spos, epos, line)
+ if token in ('async', 'await'):
+ if async_def:
+ yield (ASYNC if token == 'async' else AWAIT,
+ token, spos, epos, line)
+ continue
+
+ tok = (NAME, token, spos, epos, line)
+ if token == 'async' and not stashed:
+ stashed = tok
+ continue
+
+ if token == 'def':
+ if (stashed
+ and stashed[0] == NAME
+ and stashed[1] == 'async'):
+
+ async_def = True
+ async_def_indent = indents[-1]
+
+ yield (ASYNC, stashed[1],
+ stashed[2], stashed[3],
+ stashed[4])
+ stashed = None
+
+ if stashed:
+ yield stashed
+ stashed = None
+
+ yield tok
elif initial == '\\': # continued stmt
# This yield is new; needed for better idempotency:
+ if stashed:
+ yield stashed
+ stashed = None
yield (NL, token, spos, (lnum, pos), line)
continued = 1
else:
if initial in '([{': parenlev = parenlev + 1
elif initial in ')]}': parenlev = parenlev - 1
+ if stashed:
+ yield stashed
+ stashed = None
yield (OP, token, spos, epos, line)
else:
yield (ERRORTOKEN, line[pos],
(lnum, pos), (lnum, pos+1), line)
pos = pos + 1
+ if stashed:
+ yield stashed
+ stashed = None
+
for indent in indents[1:]: # pop remaining indent levels
yield (DEDENT, '', (lnum, 0), (lnum, 0), '')
yield (ENDMARKER, '', (lnum, 0), (lnum, 0), '')
diff --git a/Lib/lib2to3/refactor.py b/Lib/lib2to3/refactor.py
index adf999684b..0728083652 100644
--- a/Lib/lib2to3/refactor.py
+++ b/Lib/lib2to3/refactor.py
@@ -184,7 +184,7 @@ class RefactoringTool(object):
Args:
fixer_names: a list of fixers to import
- options: an dict with configuration.
+ options: a dict with configuration.
explicit: a list of fixers to run even if they are explicit.
"""
self.fixers = fixer_names
diff --git a/Lib/lib2to3/tests/pytree_idempotency.py b/Lib/lib2to3/tests/pytree_idempotency.py
index c6359bf18a..2e7e9781d4 100755
--- a/Lib/lib2to3/tests/pytree_idempotency.py
+++ b/Lib/lib2to3/tests/pytree_idempotency.py
@@ -18,8 +18,8 @@ import logging
# Local imports
from .. import pytree
-import pgen2
-from pgen2 import driver
+from .. import pgen2
+from ..pgen2 import driver
logging.basicConfig()
diff --git a/Lib/lib2to3/tests/test_parser.py b/Lib/lib2to3/tests/test_parser.py
index 5bb9d2becb..b533c01e28 100644
--- a/Lib/lib2to3/tests/test_parser.py
+++ b/Lib/lib2to3/tests/test_parser.py
@@ -55,12 +55,64 @@ class TestMatrixMultiplication(GrammarTest):
class TestYieldFrom(GrammarTest):
- def test_matrix_multiplication_operator(self):
+ def test_yield_from(self):
self.validate("yield from x")
self.validate("(yield from x) + y")
self.invalid_syntax("yield from")
+class TestAsyncAwait(GrammarTest):
+ def test_await_expr(self):
+ self.validate("""async def foo():
+ await x
+ """)
+
+ self.validate("""async def foo():
+
+ def foo(): pass
+
+ def foo(): pass
+
+ await x
+ """)
+
+ self.validate("""async def foo(): return await a""")
+
+ self.validate("""def foo():
+ def foo(): pass
+ async def foo(): await x
+ """)
+
+ self.invalid_syntax("await x")
+ self.invalid_syntax("""def foo():
+ await x""")
+
+ self.invalid_syntax("""def foo():
+ def foo(): pass
+ async def foo(): pass
+ await x
+ """)
+
+ def test_async_var(self):
+ self.validate("""async = 1""")
+ self.validate("""await = 1""")
+ self.validate("""def async(): pass""")
+
+ def test_async_with(self):
+ self.validate("""async def foo():
+ async for a in b: pass""")
+
+ self.invalid_syntax("""def foo():
+ async for a in b: pass""")
+
+ def test_async_for(self):
+ self.validate("""async def foo():
+ async with a: pass""")
+
+ self.invalid_syntax("""def foo():
+ async with a: pass""")
+
+
class TestRaiseChanges(GrammarTest):
def test_2x_style_1(self):
self.validate("raise")
diff --git a/Lib/linecache.py b/Lib/linecache.py
index 884cbf493a..3afcce1f0a 100644
--- a/Lib/linecache.py
+++ b/Lib/linecache.py
@@ -5,6 +5,7 @@ is not found, it will look down the module search path for a file by
that name.
"""
+import functools
import sys
import os
import tokenize
@@ -21,7 +22,9 @@ def getline(filename, lineno, module_globals=None):
# The cache
-cache = {} # The cache
+# The cache. Maps filenames to either a thunk which will provide source code,
+# or a tuple (size, mtime, lines, fullname) once loaded.
+cache = {}
def clearcache():
@@ -36,7 +39,9 @@ def getlines(filename, module_globals=None):
Update the cache if it doesn't contain an entry for this file already."""
if filename in cache:
- return cache[filename][2]
+ entry = cache[filename]
+ if len(entry) != 1:
+ return cache[filename][2]
try:
return updatecache(filename, module_globals)
@@ -58,7 +63,11 @@ def checkcache(filename=None):
return
for filename in filenames:
- size, mtime, lines, fullname = cache[filename]
+ entry = cache[filename]
+ if len(entry) == 1:
+ # lazy cache entry, leave it lazy.
+ continue
+ size, mtime, lines, fullname = entry
if mtime is None:
continue # no-op for files loaded via a __loader__
try:
@@ -76,7 +85,8 @@ def updatecache(filename, module_globals=None):
and return an empty list."""
if filename in cache:
- del cache[filename]
+ if len(cache[filename]) != 1:
+ del cache[filename]
if not filename or (filename.startswith('<') and filename.endswith('>')):
return []
@@ -86,27 +96,23 @@ def updatecache(filename, module_globals=None):
except OSError:
basename = filename
- # Try for a __loader__, if available
- if module_globals and '__loader__' in module_globals:
- name = module_globals.get('__name__')
- loader = module_globals['__loader__']
- get_source = getattr(loader, 'get_source', None)
-
- if name and get_source:
- try:
- data = get_source(name)
- except (ImportError, OSError):
- pass
- else:
- if data is None:
- # No luck, the PEP302 loader cannot find the source
- # for this module.
- return []
- cache[filename] = (
- len(data), None,
- [line+'\n' for line in data.splitlines()], fullname
- )
- return cache[filename][2]
+ # Realise a lazy loader based lookup if there is one
+ # otherwise try to lookup right now.
+ if lazycache(filename, module_globals):
+ try:
+ data = cache[filename][0]()
+ except (ImportError, OSError):
+ pass
+ else:
+ if data is None:
+ # No luck, the PEP302 loader cannot find the source
+ # for this module.
+ return []
+ cache[filename] = (
+ len(data), None,
+ [line+'\n' for line in data.splitlines()], fullname
+ )
+ return cache[filename][2]
# Try looking through the module search path, which is only useful
# when handling a relative filename.
@@ -136,3 +142,36 @@ def updatecache(filename, module_globals=None):
size, mtime = stat.st_size, stat.st_mtime
cache[filename] = size, mtime, lines, fullname
return lines
+
+
+def lazycache(filename, module_globals):
+ """Seed the cache for filename with module_globals.
+
+ The module loader will be asked for the source only when getlines is
+ called, not immediately.
+
+ If there is an entry in the cache already, it is not altered.
+
+ :return: True if a lazy load is registered in the cache,
+ otherwise False. To register such a load a module loader with a
+ get_source method must be found, the filename must be a cachable
+ filename, and the filename must not be already cached.
+ """
+ if filename in cache:
+ if len(cache[filename]) == 1:
+ return True
+ else:
+ return False
+ if not filename or (filename.startswith('<') and filename.endswith('>')):
+ return False
+ # Try for a __loader__, if available
+ if module_globals and '__loader__' in module_globals:
+ name = module_globals.get('__name__')
+ loader = module_globals['__loader__']
+ get_source = getattr(loader, 'get_source', None)
+
+ if name and get_source:
+ get_lines = functools.partial(get_source, name)
+ cache[filename] = (get_lines,)
+ return True
+ return False
diff --git a/Lib/locale.py b/Lib/locale.py
index 7ff43561ad..6d59cd8bab 100644
--- a/Lib/locale.py
+++ b/Lib/locale.py
@@ -1,13 +1,12 @@
-""" Locale support.
+"""Locale support module.
- The module provides low-level access to the C lib's locale APIs
- and adds high level number formatting APIs as well as a locale
- aliasing engine to complement these.
+The module provides low-level access to the C lib's locale APIs and adds high
+level number formatting APIs as well as a locale aliasing engine to complement
+these.
- The aliasing engine includes support for many commonly used locale
- names and maps them to values suitable for passing to the C lib's
- setlocale() function. It also includes default encodings for all
- supported locale names.
+The aliasing engine includes support for many commonly used locale names and
+maps them to values suitable for passing to the C lib's setlocale() function. It
+also includes default encodings for all supported locale names.
"""
@@ -298,11 +297,11 @@ def currency(val, symbol=True, grouping=False, international=False):
return s.replace('<', '').replace('>', '')
def str(val):
- """Convert float to integer, taking the locale into account."""
+ """Convert float to string, taking the locale into account."""
return format("%.12g", val)
-def atof(string, func=float):
- "Parses a string as a float according to the locale settings."
+def delocalize(string):
+ "Parses a string as a normalized number according to the locale settings."
#First, get rid of the grouping
ts = localeconv()['thousands_sep']
if ts:
@@ -311,12 +310,15 @@ def atof(string, func=float):
dd = localeconv()['decimal_point']
if dd:
string = string.replace(dd, '.')
- #finally, parse the string
- return func(string)
+ return string
+
+def atof(string, func=float):
+ "Parses a string as a float according to the locale settings."
+ return func(delocalize(string))
-def atoi(str):
+def atoi(string):
"Converts a string to an integer according to the locale settings."
- return atof(str, int)
+ return int(delocalize(string))
def _test():
setlocale(LC_ALL, "")
@@ -696,7 +698,9 @@ locale_encoding_alias = {
'euc_kr': 'eucKR',
'utf_8': 'UTF-8',
'koi8_r': 'KOI8-R',
+ 'koi8_t': 'KOI8-T',
'koi8_u': 'KOI8-U',
+ 'kz1048': 'RK1048',
'cp1251': 'CP1251',
'cp1255': 'CP1255',
'cp1256': 'CP1256',
@@ -1447,7 +1451,7 @@ windows_locale = {
0x1809: "en_IE", # English - Ireland
0x1c09: "en_ZA", # English - South Africa
0x2009: "en_JA", # English - Jamaica
- 0x2409: "en_CB", # English - Carribbean
+ 0x2409: "en_CB", # English - Caribbean
0x2809: "en_BZ", # English - Belize
0x2c09: "en_TT", # English - Trinidad
0x3009: "en_ZW", # English - Zimbabwe
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py
index 67d9d2ed76..a7bd890e3c 100644
--- a/Lib/logging/__init__.py
+++ b/Lib/logging/__init__.py
@@ -1,4 +1,4 @@
-# Copyright 2001-2014 by Vinay Sajip. All Rights Reserved.
+# Copyright 2001-2015 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
@@ -18,7 +18,7 @@
Logging package for Python. Based on PEP 282 and comments thereto in
comp.lang.python.
-Copyright (C) 2001-2014 Vinay Sajip. All Rights Reserved.
+Copyright (C) 2001-2015 Vinay Sajip. All Rights Reserved.
To use, simply 'import logging' and log away!
"""
@@ -316,6 +316,8 @@ class LogRecord(object):
return '<LogRecord: %s, %s, %s, %s, "%s">'%(self.name, self.levelno,
self.pathname, self.lineno, self.msg)
+ __repr__ = __str__
+
def getMessage(self):
"""
Return the message for this LogRecord.
@@ -469,7 +471,7 @@ class Formatter(object):
use one of %-formatting, :meth:`str.format` (``{}``) formatting or
:class:`string.Template` formatting in your format string.
- .. versionchanged: 3.2
+ .. versionchanged:: 3.2
Added the ``style`` parameter.
"""
if style not in _STYLES:
@@ -698,7 +700,7 @@ class Filterer(object):
this and the record is then dropped. Returns a zero value if a record
is to be dropped, else non-zero.
- .. versionchanged: 3.2
+ .. versionchanged:: 3.2
Allow filters to be just callables.
"""
@@ -1091,7 +1093,6 @@ class PlaceHolder(object):
#
# Determine which class to use when instantiating loggers.
#
-_loggerClass = None
def setLoggerClass(klass):
"""
@@ -1110,7 +1111,6 @@ def getLoggerClass():
"""
Return the class to be used when instantiating a logger.
"""
-
return _loggerClass
class Manager(object):
@@ -1307,12 +1307,11 @@ class Logger(Filterer):
if self.isEnabledFor(ERROR):
self._log(ERROR, msg, args, **kwargs)
- def exception(self, msg, *args, **kwargs):
+ def exception(self, msg, *args, exc_info=True, **kwargs):
"""
Convenience method for logging an ERROR with exception information.
"""
- kwargs['exc_info'] = True
- self.error(msg, *args, **kwargs)
+ self.error(msg, *args, exc_info=exc_info, **kwargs)
def critical(self, msg, *args, **kwargs):
"""
@@ -1407,7 +1406,9 @@ class Logger(Filterer):
else: # pragma: no cover
fn, lno, func = "(unknown file)", 0, "(unknown function)"
if exc_info:
- if not isinstance(exc_info, tuple):
+ if isinstance(exc_info, BaseException):
+ exc_info = (type(exc_info), exc_info, exc_info.__traceback__)
+ elif not isinstance(exc_info, tuple):
exc_info = sys.exc_info()
record = self.makeRecord(self.name, level, fn, lno, msg, args,
exc_info, func, extra, sinfo)
@@ -1617,12 +1618,11 @@ class LoggerAdapter(object):
"""
self.log(ERROR, msg, *args, **kwargs)
- def exception(self, msg, *args, **kwargs):
+ def exception(self, msg, *args, exc_info=True, **kwargs):
"""
Delegate an exception call to the underlying logger.
"""
- kwargs["exc_info"] = True
- self.log(ERROR, msg, *args, **kwargs)
+ self.log(ERROR, msg, *args, exc_info=exc_info, **kwargs)
def critical(self, msg, *args, **kwargs):
"""
@@ -1804,14 +1804,13 @@ def error(msg, *args, **kwargs):
basicConfig()
root.error(msg, *args, **kwargs)
-def exception(msg, *args, **kwargs):
+def exception(msg, *args, exc_info=True, **kwargs):
"""
Log a message with severity 'ERROR' on the root logger, with exception
information. If the logger has no handlers, basicConfig() is called to add
a console handler with a pre-defined format.
"""
- kwargs['exc_info'] = True
- error(msg, *args, **kwargs)
+ error(msg, *args, exc_info=exc_info, **kwargs)
def warning(msg, *args, **kwargs):
"""
diff --git a/Lib/logging/config.py b/Lib/logging/config.py
index 895fb263c0..8a99923bf3 100644
--- a/Lib/logging/config.py
+++ b/Lib/logging/config.py
@@ -116,11 +116,12 @@ def _create_formatters(cp):
sectname = "formatter_%s" % form
fs = cp.get(sectname, "format", raw=True, fallback=None)
dfs = cp.get(sectname, "datefmt", raw=True, fallback=None)
+ stl = cp.get(sectname, "style", raw=True, fallback='%')
c = logging.Formatter
class_name = cp[sectname].get("class")
if class_name:
c = _resolve(class_name)
- f = c(fs, dfs)
+ f = c(fs, dfs, stl)
formatters[form] = f
return formatters
@@ -660,7 +661,12 @@ class DictConfigurator(BaseConfigurator):
fmt = config.get('format', None)
dfmt = config.get('datefmt', None)
style = config.get('style', '%')
- result = logging.Formatter(fmt, dfmt, style)
+ cname = config.get('class', None)
+ if not cname:
+ c = logging.Formatter
+ else:
+ c = _resolve(cname)
+ result = c(fmt, dfmt, style)
return result
def configure_filter(self, config):
diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py
index 13a8fb2de1..c9f8217b06 100644
--- a/Lib/logging/handlers.py
+++ b/Lib/logging/handlers.py
@@ -588,6 +588,8 @@ class SocketHandler(logging.Handler):
d['msg'] = record.getMessage()
d['args'] = None
d['exc_info'] = None
+ # Issue #25685: delete 'message' if present: redundant with 'msg'
+ d.pop('message', None)
s = pickle.dumps(d, 1)
slen = struct.pack(">L", len(s))
return slen + s
@@ -1154,8 +1156,8 @@ class HTTPHandler(logging.Handler):
h.putheader("Content-length", str(len(data)))
if self.credentials:
import base64
- s = ('u%s:%s' % self.credentials).encode('utf-8')
- s = 'Basic ' + base64.b64encode(s).strip()
+ s = ('%s:%s' % self.credentials).encode('utf-8')
+ s = 'Basic ' + base64.b64encode(s).strip().decode('ascii')
h.putheader('Authorization', s)
h.endheaders()
if self.method == "POST":
@@ -1357,7 +1359,7 @@ if threading:
"""
_sentinel = None
- def __init__(self, queue, *handlers):
+ def __init__(self, queue, *handlers, respect_handler_level=False):
"""
Initialise an instance with the specified queue and
handlers.
@@ -1366,6 +1368,7 @@ if threading:
self.handlers = handlers
self._stop = threading.Event()
self._thread = None
+ self.respect_handler_level = respect_handler_level
def dequeue(self, block):
"""
@@ -1406,7 +1409,12 @@ if threading:
"""
record = self.prepare(record)
for handler in self.handlers:
- handler.handle(record)
+ if not self.respect_handler_level:
+ process = True
+ else:
+ process = record.levelno >= handler.level
+ if process:
+ handler.handle(record)
def _monitor(self):
"""
diff --git a/Lib/lzma.py b/Lib/lzma.py
index f1d3958179..7dff1c319a 100644
--- a/Lib/lzma.py
+++ b/Lib/lzma.py
@@ -25,17 +25,16 @@ import builtins
import io
from _lzma import *
from _lzma import _encode_filter_properties, _decode_filter_properties
+import _compression
_MODE_CLOSED = 0
_MODE_READ = 1
-_MODE_READ_EOF = 2
+# Value 2 no longer used
_MODE_WRITE = 3
-_BUFFER_SIZE = 8192
-
-class LZMAFile(io.BufferedIOBase):
+class LZMAFile(_compression.BaseStream):
"""A file object providing transparent LZMA (de)compression.
@@ -92,8 +91,6 @@ class LZMAFile(io.BufferedIOBase):
self._fp = None
self._closefp = False
self._mode = _MODE_CLOSED
- self._pos = 0
- self._size = -1
if mode in ("r", "rb"):
if check != -1:
@@ -105,19 +102,13 @@ class LZMAFile(io.BufferedIOBase):
if format is None:
format = FORMAT_AUTO
mode_code = _MODE_READ
- # Save the args to pass to the LZMADecompressor initializer.
- # If the file contains multiple compressed streams, each
- # stream will need a separate decompressor object.
- self._init_args = {"format":format, "filters":filters}
- self._decompressor = LZMADecompressor(**self._init_args)
- self._buffer = b""
- self._buffer_offset = 0
elif mode in ("w", "wb", "a", "ab", "x", "xb"):
if format is None:
format = FORMAT_XZ
mode_code = _MODE_WRITE
self._compressor = LZMACompressor(format=format, check=check,
preset=preset, filters=filters)
+ self._pos = 0
else:
raise ValueError("Invalid mode: {!r}".format(mode))
@@ -133,6 +124,11 @@ class LZMAFile(io.BufferedIOBase):
else:
raise TypeError("filename must be a str or bytes object, or a file")
+ if self._mode == _MODE_READ:
+ raw = _compression.DecompressReader(self._fp, LZMADecompressor,
+ trailing_error=LZMAError, format=format, filters=filters)
+ self._buffer = io.BufferedReader(raw)
+
def close(self):
"""Flush and close the file.
@@ -142,9 +138,9 @@ class LZMAFile(io.BufferedIOBase):
if self._mode == _MODE_CLOSED:
return
try:
- if self._mode in (_MODE_READ, _MODE_READ_EOF):
- self._decompressor = None
- self._buffer = b""
+ if self._mode == _MODE_READ:
+ self._buffer.close()
+ self._buffer = None
elif self._mode == _MODE_WRITE:
self._fp.write(self._compressor.flush())
self._compressor = None
@@ -169,123 +165,18 @@ class LZMAFile(io.BufferedIOBase):
def seekable(self):
"""Return whether the file supports seeking."""
- return self.readable() and self._fp.seekable()
+ return self.readable() and self._buffer.seekable()
def readable(self):
"""Return whether the file was opened for reading."""
self._check_not_closed()
- return self._mode in (_MODE_READ, _MODE_READ_EOF)
+ return self._mode == _MODE_READ
def writable(self):
"""Return whether the file was opened for writing."""
self._check_not_closed()
return self._mode == _MODE_WRITE
- # Mode-checking helper functions.
-
- def _check_not_closed(self):
- if self.closed:
- raise ValueError("I/O operation on closed file")
-
- def _check_can_read(self):
- if self._mode not in (_MODE_READ, _MODE_READ_EOF):
- self._check_not_closed()
- raise io.UnsupportedOperation("File not open for reading")
-
- def _check_can_write(self):
- if self._mode != _MODE_WRITE:
- self._check_not_closed()
- raise io.UnsupportedOperation("File not open for writing")
-
- def _check_can_seek(self):
- if self._mode not in (_MODE_READ, _MODE_READ_EOF):
- self._check_not_closed()
- raise io.UnsupportedOperation("Seeking is only supported "
- "on files open for reading")
- if not self._fp.seekable():
- raise io.UnsupportedOperation("The underlying file object "
- "does not support seeking")
-
- # Fill the readahead buffer if it is empty. Returns False on EOF.
- def _fill_buffer(self):
- if self._mode == _MODE_READ_EOF:
- return False
- # Depending on the input data, our call to the decompressor may not
- # return any data. In this case, try again after reading another block.
- while self._buffer_offset == len(self._buffer):
- rawblock = (self._decompressor.unused_data or
- self._fp.read(_BUFFER_SIZE))
-
- if not rawblock:
- if self._decompressor.eof:
- self._mode = _MODE_READ_EOF
- self._size = self._pos
- return False
- else:
- raise EOFError("Compressed file ended before the "
- "end-of-stream marker was reached")
-
- if self._decompressor.eof:
- # Continue to next stream.
- self._decompressor = LZMADecompressor(**self._init_args)
- try:
- self._buffer = self._decompressor.decompress(rawblock)
- except LZMAError:
- # Trailing data isn't a valid compressed stream; ignore it.
- self._mode = _MODE_READ_EOF
- self._size = self._pos
- return False
- else:
- self._buffer = self._decompressor.decompress(rawblock)
- self._buffer_offset = 0
- return True
-
- # Read data until EOF.
- # If return_data is false, consume the data without returning it.
- def _read_all(self, return_data=True):
- # The loop assumes that _buffer_offset is 0. Ensure that this is true.
- self._buffer = self._buffer[self._buffer_offset:]
- self._buffer_offset = 0
-
- blocks = []
- while self._fill_buffer():
- if return_data:
- blocks.append(self._buffer)
- self._pos += len(self._buffer)
- self._buffer = b""
- if return_data:
- return b"".join(blocks)
-
- # Read a block of up to n bytes.
- # If return_data is false, consume the data without returning it.
- def _read_block(self, n, return_data=True):
- # If we have enough data buffered, return immediately.
- end = self._buffer_offset + n
- if end <= len(self._buffer):
- data = self._buffer[self._buffer_offset : end]
- self._buffer_offset = end
- self._pos += len(data)
- return data if return_data else None
-
- # The loop assumes that _buffer_offset is 0. Ensure that this is true.
- self._buffer = self._buffer[self._buffer_offset:]
- self._buffer_offset = 0
-
- blocks = []
- while n > 0 and self._fill_buffer():
- if n < len(self._buffer):
- data = self._buffer[:n]
- self._buffer_offset = n
- else:
- data = self._buffer
- self._buffer = b""
- if return_data:
- blocks.append(data)
- self._pos += len(data)
- n -= len(data)
- if return_data:
- return b"".join(blocks)
-
def peek(self, size=-1):
"""Return buffered data without advancing the file position.
@@ -293,9 +184,9 @@ class LZMAFile(io.BufferedIOBase):
The exact number of bytes returned is unspecified.
"""
self._check_can_read()
- if not self._fill_buffer():
- return b""
- return self._buffer[self._buffer_offset:]
+ # Relies on the undocumented fact that BufferedReader.peek() always
+ # returns at least one byte (except at EOF)
+ return self._buffer.peek(size)
def read(self, size=-1):
"""Read up to size uncompressed bytes from the file.
@@ -304,38 +195,19 @@ class LZMAFile(io.BufferedIOBase):
Returns b"" if the file is already at EOF.
"""
self._check_can_read()
- if size == 0:
- return b""
- elif size < 0:
- return self._read_all()
- else:
- return self._read_block(size)
+ return self._buffer.read(size)
def read1(self, size=-1):
"""Read up to size uncompressed bytes, while trying to avoid
- making multiple reads from the underlying stream.
+ making multiple reads from the underlying stream. Reads up to a
+ buffer's worth of data if size is negative.
Returns b"" if the file is at EOF.
"""
- # Usually, read1() calls _fp.read() at most once. However, sometimes
- # this does not give enough data for the decompressor to make progress.
- # In this case we make multiple reads, to avoid returning b"".
self._check_can_read()
- if (size == 0 or
- # Only call _fill_buffer() if the buffer is actually empty.
- # This gives a significant speedup if *size* is small.
- (self._buffer_offset == len(self._buffer) and not self._fill_buffer())):
- return b""
- if size > 0:
- data = self._buffer[self._buffer_offset :
- self._buffer_offset + size]
- self._buffer_offset += len(data)
- else:
- data = self._buffer[self._buffer_offset:]
- self._buffer = b""
- self._buffer_offset = 0
- self._pos += len(data)
- return data
+ if size < 0:
+ size = io.DEFAULT_BUFFER_SIZE
+ return self._buffer.read1(size)
def readline(self, size=-1):
"""Read a line of uncompressed bytes from the file.
@@ -345,15 +217,7 @@ class LZMAFile(io.BufferedIOBase):
case the line may be incomplete). Returns b'' if already at EOF.
"""
self._check_can_read()
- # Shortcut for the common case - the whole line is in the buffer.
- if size < 0:
- end = self._buffer.find(b"\n", self._buffer_offset) + 1
- if end > 0:
- line = self._buffer[self._buffer_offset : end]
- self._buffer_offset = end
- self._pos += len(line)
- return line
- return io.BufferedIOBase.readline(self, size)
+ return self._buffer.readline(size)
def write(self, data):
"""Write a bytes object to the file.
@@ -368,16 +232,7 @@ class LZMAFile(io.BufferedIOBase):
self._pos += len(data)
return len(data)
- # Rewind the file to the beginning of the data stream.
- def _rewind(self):
- self._fp.seek(0, 0)
- self._mode = _MODE_READ
- self._pos = 0
- self._decompressor = LZMADecompressor(**self._init_args)
- self._buffer = b""
- self._buffer_offset = 0
-
- def seek(self, offset, whence=0):
+ def seek(self, offset, whence=io.SEEK_SET):
"""Change the file position.
The new position is specified by offset, relative to the
@@ -389,38 +244,17 @@ class LZMAFile(io.BufferedIOBase):
Returns the new file position.
- Note that seeking is emulated, sp depending on the parameters,
+ Note that seeking is emulated, so depending on the parameters,
this operation may be extremely slow.
"""
self._check_can_seek()
-
- # Recalculate offset as an absolute file position.
- if whence == 0:
- pass
- elif whence == 1:
- offset = self._pos + offset
- elif whence == 2:
- # Seeking relative to EOF - we need to know the file's size.
- if self._size < 0:
- self._read_all(return_data=False)
- offset = self._size + offset
- else:
- raise ValueError("Invalid value for whence: {}".format(whence))
-
- # Make it so that offset is the number of bytes to skip forward.
- if offset < self._pos:
- self._rewind()
- else:
- offset -= self._pos
-
- # Read and discard data until we reach the desired position.
- self._read_block(offset, return_data=False)
-
- return self._pos
+ return self._buffer.seek(offset, whence)
def tell(self):
"""Return the current file position."""
self._check_not_closed()
+ if self._mode == _MODE_READ:
+ return self._buffer.tell()
return self._pos
@@ -445,7 +279,7 @@ def open(filename, mode="rb", *,
constructor: LZMAFile(filename, mode, ...). In this case, the
encoding, errors and newline arguments must not be provided.
- For text mode, a LZMAFile object is created, and wrapped in an
+ For text mode, an LZMAFile object is created, and wrapped in an
io.TextIOWrapper instance with the specified encoding, error
handling behavior, and line ending(s).
diff --git a/Lib/macpath.py b/Lib/macpath.py
index 5ca00977c6..a90d1053bc 100644
--- a/Lib/macpath.py
+++ b/Lib/macpath.py
@@ -50,20 +50,26 @@ def isabs(s):
def join(s, *p):
- colon = _get_colon(s)
- path = s
- for t in p:
- if (not path) or isabs(t):
- path = t
- continue
- if t[:1] == colon:
- t = t[1:]
- if colon not in path:
- path = colon + path
- if path[-1:] != colon:
- path = path + colon
- path = path + t
- return path
+ try:
+ colon = _get_colon(s)
+ path = s
+ if not p:
+ path[:0] + colon #23780: Ensure compatible data type even if p is null.
+ for t in p:
+ if (not path) or isabs(t):
+ path = t
+ continue
+ if t[:1] == colon:
+ t = t[1:]
+ if colon not in path:
+ path = colon + path
+ if path[-1:] != colon:
+ path = path + colon
+ path = path + t
+ return path
+ except (TypeError, AttributeError, BytesWarning):
+ genericpath._check_arg_types('join', s, *p)
+ raise
def split(s):
diff --git a/Lib/mailbox.py b/Lib/mailbox.py
index 4e42ad2406..0270e25b00 100644
--- a/Lib/mailbox.py
+++ b/Lib/mailbox.py
@@ -1234,8 +1234,8 @@ class MH(Mailbox):
class Babyl(_singlefileMailbox):
"""An Rmail-style Babyl mailbox."""
- _special_labels = frozenset(('unseen', 'deleted', 'filed', 'answered',
- 'forwarded', 'edited', 'resent'))
+ _special_labels = frozenset({'unseen', 'deleted', 'filed', 'answered',
+ 'forwarded', 'edited', 'resent'})
def __init__(self, path, factory=None, create=True):
"""Initialize a Babyl mailbox."""
@@ -1821,7 +1821,7 @@ class BabylMessage(Message):
_type_specific_attributes = ['_labels', '_visible']
def __init__(self, message=None):
- """Initialize an BabylMessage instance."""
+ """Initialize a BabylMessage instance."""
self._labels = []
self._visible = Message()
Message.__init__(self, message)
@@ -1953,7 +1953,7 @@ class _ProxyFile:
while True:
line = self.readline()
if not line:
- raise StopIteration
+ return
yield line
def tell(self):
@@ -1970,9 +1970,11 @@ class _ProxyFile:
def close(self):
"""Close the file."""
if hasattr(self, '_file'):
- if hasattr(self._file, 'close'):
- self._file.close()
- del self._file
+ try:
+ if hasattr(self._file, 'close'):
+ self._file.close()
+ finally:
+ del self._file
def _read(self, size, read_method):
"""Read size bytes using read_method."""
diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py
index d64726b80f..0be76ad4f7 100644
--- a/Lib/mimetypes.py
+++ b/Lib/mimetypes.py
@@ -416,6 +416,7 @@ def _default_mime_types():
'.cpio' : 'application/x-cpio',
'.csh' : 'application/x-csh',
'.css' : 'text/css',
+ '.csv' : 'text/csv',
'.dll' : 'application/octet-stream',
'.doc' : 'application/msword',
'.dot' : 'application/msword',
@@ -513,6 +514,7 @@ def _default_mime_types():
'.ustar' : 'application/x-ustar',
'.vcf' : 'text/x-vcard',
'.wav' : 'audio/x-wav',
+ '.webm' : 'video/webm',
'.wiz' : 'application/msword',
'.wsdl' : 'application/xml',
'.xbm' : 'image/x-xbitmap',
diff --git a/Lib/modulefinder.py b/Lib/modulefinder.py
index b778e6094d..8103502404 100644
--- a/Lib/modulefinder.py
+++ b/Lib/modulefinder.py
@@ -1,7 +1,7 @@
"""Find modules used by a script, using introspection."""
import dis
-import importlib._bootstrap
+import importlib._bootstrap_external
import importlib.machinery
import marshal
import os
@@ -13,13 +13,12 @@ with warnings.catch_warnings():
warnings.simplefilter('ignore', PendingDeprecationWarning)
import imp
-# XXX Clean up once str8's cstor matches bytes.
-LOAD_CONST = bytes([dis.opname.index('LOAD_CONST')])
-IMPORT_NAME = bytes([dis.opname.index('IMPORT_NAME')])
-STORE_NAME = bytes([dis.opname.index('STORE_NAME')])
-STORE_GLOBAL = bytes([dis.opname.index('STORE_GLOBAL')])
-STORE_OPS = [STORE_NAME, STORE_GLOBAL]
-HAVE_ARGUMENT = bytes([dis.HAVE_ARGUMENT])
+LOAD_CONST = dis.opmap['LOAD_CONST']
+IMPORT_NAME = dis.opmap['IMPORT_NAME']
+STORE_NAME = dis.opmap['STORE_NAME']
+STORE_GLOBAL = dis.opmap['STORE_GLOBAL']
+STORE_OPS = STORE_NAME, STORE_GLOBAL
+EXTENDED_ARG = dis.EXTENDED_ARG
# Modulefinder does a good job at simulating Python's, but it can not
# handle __path__ modifications packages make at runtime. Therefore there
@@ -223,7 +222,7 @@ class ModuleFinder:
if not m.__path__:
return
modules = {}
- # 'suffixes' used to be a list hardcoded to [".py", ".pyc", ".pyo"].
+ # 'suffixes' used to be a list hardcoded to [".py", ".pyc"].
# But we must also collect Python extension modules - although
# we cannot separate normal dlls from Python extensions.
suffixes = []
@@ -289,7 +288,7 @@ class ModuleFinder:
co = compile(fp.read()+'\n', pathname, 'exec')
elif type == imp.PY_COMPILED:
try:
- marshal_data = importlib._bootstrap._validate_bytecode_header(fp.read())
+ marshal_data = importlib._bootstrap_external._validate_bytecode_header(fp.read())
except ImportError as exc:
self.msgout(2, "raise ImportError: " + str(exc), pathname)
raise
@@ -340,31 +339,24 @@ class ModuleFinder:
def scan_opcodes_25(self, co,
unpack = struct.unpack):
# Scan the code, and yield 'interesting' opcode combinations
- # Python 2.5 version (has absolute and relative imports)
code = co.co_code
names = co.co_names
consts = co.co_consts
- LOAD_LOAD_AND_IMPORT = LOAD_CONST + LOAD_CONST + IMPORT_NAME
- while code:
- c = bytes([code[0]])
- if c in STORE_OPS:
- oparg, = unpack('<H', code[1:3])
+ opargs = [(op, arg) for _, op, arg in dis._unpack_opargs(code)
+ if op != EXTENDED_ARG]
+ for i, (op, oparg) in enumerate(opargs):
+ if op in STORE_OPS:
yield "store", (names[oparg],)
- code = code[3:]
continue
- if code[:9:3] == LOAD_LOAD_AND_IMPORT:
- oparg_1, oparg_2, oparg_3 = unpack('<xHxHxH', code[:9])
- level = consts[oparg_1]
+ if (op == IMPORT_NAME and i >= 2
+ and opargs[i-1][0] == opargs[i-2][0] == LOAD_CONST):
+ level = consts[opargs[i-2][1]]
+ fromlist = consts[opargs[i-1][1]]
if level == 0: # absolute import
- yield "absolute_import", (consts[oparg_2], names[oparg_3])
+ yield "absolute_import", (fromlist, names[oparg])
else: # relative import
- yield "relative_import", (level, consts[oparg_2], names[oparg_3])
- code = code[9:]
+ yield "relative_import", (level, fromlist, names[oparg])
continue
- if c >= HAVE_ARGUMENT:
- code = code[3:]
- else:
- code = code[1:]
def scan_code(self, co, m):
code = co.co_code
diff --git a/Lib/msilib/__init__.py b/Lib/msilib/__init__.py
index d29a5937c9..6d0a28f876 100644
--- a/Lib/msilib/__init__.py
+++ b/Lib/msilib/__init__.py
@@ -1,7 +1,11 @@
# Copyright (C) 2005 Martin v. Löwis
# Licensed to PSF under a Contributor Agreement.
from _msi import *
-import os, string, re, sys
+import glob
+import os
+import re
+import string
+import sys
AMD64 = "AMD64" in sys.version
Itanium = "Itanium" in sys.version
@@ -361,7 +365,7 @@ class Directory:
# [(logical, 0, filehash.IntegerData(1),
# filehash.IntegerData(2), filehash.IntegerData(3),
# filehash.IntegerData(4))])
- # Automatically remove .pyc/.pyo files on uninstall (2)
+ # Automatically remove .pyc files on uninstall (2)
# XXX: adding so many RemoveFile entries makes installer unbelievably
# slow. So instead, we have to use wildcard remove entries
if file.endswith(".py"):
@@ -382,10 +386,9 @@ class Directory:
return files
def remove_pyc(self):
- "Remove .pyc/.pyo files on uninstall"
+ "Remove .pyc files on uninstall"
add_data(self.db, "RemoveFile",
- [(self.component+"c", self.component, "*.pyc", self.logical, 2),
- (self.component+"o", self.component, "*.pyo", self.logical, 2)])
+ [(self.component+"c", self.component, "*.pyc", self.logical, 2)])
class Binary:
def __init__(self, fname):
diff --git a/Lib/msilib/schema.py b/Lib/msilib/schema.py
index 70fe138b7c..eeb3ecd27a 100644
--- a/Lib/msilib/schema.py
+++ b/Lib/msilib/schema.py
@@ -731,7 +731,7 @@ _Validation_records = [
('CustomAction','Type','N',1,16383,None, None, None, None, 'The numeric custom action type, consisting of source location, code type, entry, option flags.',),
('CustomAction','Action','N',None, None, None, None, 'Identifier',None, 'Primary key, name of action, normally appears in sequence table unless private use.',),
('CustomAction','Source','Y',None, None, None, None, 'CustomSource',None, 'The table reference of the source of the code.',),
-('CustomAction','Target','Y',None, None, None, None, 'Formatted',None, 'Excecution parameter, depends on the type of custom action',),
+('CustomAction','Target','Y',None, None, None, None, 'Formatted',None, 'Execution parameter, depends on the type of custom action',),
('DrLocator','Signature_','N',None, None, None, None, 'Identifier',None, 'The Signature_ represents a unique file signature and is also the foreign key in the Signature table.',),
('DrLocator','Path','Y',None, None, None, None, 'AnyPath',None, 'The path on the user system. This is either a subpath below the value of the Parent or a full path. The path may contain properties enclosed within [ ] that will be expanded.',),
('DrLocator','Depth','Y',0,32767,None, None, None, None, 'The depth below the path to which the Signature_ is recursively searched. If absent, the depth is assumed to be 0.',),
diff --git a/Lib/multiprocessing/connection.py b/Lib/multiprocessing/connection.py
index 1eb1a8d89b..d0a1b86b13 100644
--- a/Lib/multiprocessing/connection.py
+++ b/Lib/multiprocessing/connection.py
@@ -365,10 +365,7 @@ class Connection(_ConnectionBase):
def _send(self, buf, write=_write):
remaining = len(buf)
while True:
- try:
- n = write(self._handle, buf)
- except InterruptedError:
- continue
+ n = write(self._handle, buf)
remaining -= n
if remaining == 0:
break
@@ -379,10 +376,7 @@ class Connection(_ConnectionBase):
handle = self._handle
remaining = size
while remaining > 0:
- try:
- chunk = read(handle, remaining)
- except InterruptedError:
- continue
+ chunk = read(handle, remaining)
n = len(chunk)
if n == 0:
if remaining == size:
@@ -400,17 +394,14 @@ class Connection(_ConnectionBase):
if n > 16384:
# The payload is large so Nagle's algorithm won't be triggered
# and we'd better avoid the cost of concatenation.
- chunks = [header, buf]
- elif n > 0:
- # Issue # 20540: concatenate before sending, to avoid delays due
- # to Nagle's algorithm on a TCP socket.
- chunks = [header + buf]
+ self._send(header)
+ self._send(buf)
else:
- # This code path is necessary to avoid "broken pipe" errors
- # when sending a 0-length buffer if the other end closed the pipe.
- chunks = [header]
- for chunk in chunks:
- self._send(chunk)
+ # Issue #20540: concatenate before sending, to avoid delays due
+ # to Nagle's algorithm on a TCP socket.
+ # Also note we want to avoid sending a 0-length buffer separately,
+ # to avoid "broken pipe" errors if the other end closed the pipe.
+ self._send(header + buf)
def _recv_bytes(self, maxsize=None):
buf = self._recv(4)
@@ -599,13 +590,7 @@ class SocketListener(object):
self._unlink = None
def accept(self):
- while True:
- try:
- s, self._last_accepted = self._socket.accept()
- except InterruptedError:
- pass
- else:
- break
+ s, self._last_accepted = self._socket.accept()
s.setblocking(True)
return Connection(s.detach())
diff --git a/Lib/multiprocessing/dummy/__init__.py b/Lib/multiprocessing/dummy/__init__.py
index 135db7f77f..1abea64419 100644
--- a/Lib/multiprocessing/dummy/__init__.py
+++ b/Lib/multiprocessing/dummy/__init__.py
@@ -86,7 +86,7 @@ class Namespace(object):
if not name.startswith('_'):
temp.append('%s=%r' % (name, value))
temp.sort()
- return 'Namespace(%s)' % str.join(', ', temp)
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(temp))
dict = dict
list = list
diff --git a/Lib/multiprocessing/dummy/connection.py b/Lib/multiprocessing/dummy/connection.py
index 694ef96215..19843751c0 100644
--- a/Lib/multiprocessing/dummy/connection.py
+++ b/Lib/multiprocessing/dummy/connection.py
@@ -59,9 +59,8 @@ class Connection(object):
return True
if timeout <= 0.0:
return False
- self._in.not_empty.acquire()
- self._in.not_empty.wait(timeout)
- self._in.not_empty.release()
+ with self._in.not_empty:
+ self._in.not_empty.wait(timeout)
return self._in.qsize() > 0
def close(self):
diff --git a/Lib/multiprocessing/forkserver.py b/Lib/multiprocessing/forkserver.py
index 387517ebdc..ad01ede0e0 100644
--- a/Lib/multiprocessing/forkserver.py
+++ b/Lib/multiprocessing/forkserver.py
@@ -107,7 +107,7 @@ class ForkServer(object):
address = connection.arbitrary_address('AF_UNIX')
listener.bind(address)
os.chmod(address, 0o600)
- listener.listen(100)
+ listener.listen()
# all client processes own the write end of the "alive" pipe;
# when they all terminate the read end becomes ready.
@@ -147,13 +147,7 @@ def main(listener_fd, alive_r, preload, main_path=None, sys_path=None):
except ImportError:
pass
- # close sys.stdin
- if sys.stdin is not None:
- try:
- sys.stdin.close()
- sys.stdin = open(os.devnull)
- except (OSError, ValueError):
- pass
+ util._close_stdin()
# ignoring SIGCHLD means no need to reap zombie processes
handler = signal.signal(signal.SIGCHLD, signal.SIG_IGN)
@@ -188,8 +182,6 @@ def main(listener_fd, alive_r, preload, main_path=None, sys_path=None):
finally:
os._exit(code)
- except InterruptedError:
- pass
except OSError as e:
if e.errno != errno.ECONNABORTED:
raise
@@ -230,13 +222,7 @@ def read_unsigned(fd):
data = b''
length = UNSIGNED_STRUCT.size
while len(data) < length:
- while True:
- try:
- s = os.read(fd, length - len(data))
- except InterruptedError:
- pass
- else:
- break
+ s = os.read(fd, length - len(data))
if not s:
raise EOFError('unexpected EOF')
data += s
@@ -245,13 +231,7 @@ def read_unsigned(fd):
def write_unsigned(fd, n):
msg = UNSIGNED_STRUCT.pack(n)
while msg:
- while True:
- try:
- nbytes = os.write(fd, msg)
- except InterruptedError:
- pass
- else:
- break
+ nbytes = os.write(fd, msg)
if nbytes == 0:
raise RuntimeError('should not get here')
msg = msg[nbytes:]
diff --git a/Lib/multiprocessing/heap.py b/Lib/multiprocessing/heap.py
index 344a45f89d..44d9638ff6 100644
--- a/Lib/multiprocessing/heap.py
+++ b/Lib/multiprocessing/heap.py
@@ -54,7 +54,9 @@ if sys.platform == 'win32':
def __setstate__(self, state):
self.size, self.name = self._state = state
self.buffer = mmap.mmap(-1, self.size, tagname=self.name)
- assert _winapi.GetLastError() == _winapi.ERROR_ALREADY_EXISTS
+ # XXX Temporarily preventing buildbot failures while determining
+ # XXX the correct long-term fix. See issue 23060
+ #assert _winapi.GetLastError() == _winapi.ERROR_ALREADY_EXISTS
else:
@@ -69,7 +71,14 @@ else:
os.unlink(name)
util.Finalize(self, os.close, (self.fd,))
with open(self.fd, 'wb', closefd=False) as f:
- f.write(b'\0'*size)
+ bs = 1024 * 1024
+ if size >= bs:
+ zeros = b'\0' * bs
+ for _ in range(size // bs):
+ f.write(zeros)
+ del zeros
+ f.write(b'\0' * (size % bs))
+ assert f.tell() == size
self.buffer = mmap.mmap(self.fd, self.size)
def reduce_arena(a):
@@ -216,9 +225,8 @@ class Heap(object):
assert 0 <= size < sys.maxsize
if os.getpid() != self._lastpid:
self.__init__() # reinitialize after fork
- self._lock.acquire()
- self._free_pending_blocks()
- try:
+ with self._lock:
+ self._free_pending_blocks()
size = self._roundup(max(size,1), self._alignment)
(arena, start, stop) = self._malloc(size)
new_stop = start + size
@@ -227,8 +235,6 @@ class Heap(object):
block = (arena, start, new_stop)
self._allocated_blocks.add(block)
return block
- finally:
- self._lock.release()
#
# Class representing a chunk of an mmap -- can be inherited by child process
diff --git a/Lib/multiprocessing/managers.py b/Lib/multiprocessing/managers.py
index 66d46fcc2a..c559b55a3f 100644
--- a/Lib/multiprocessing/managers.py
+++ b/Lib/multiprocessing/managers.py
@@ -65,8 +65,8 @@ class Token(object):
(self.typeid, self.address, self.id) = state
def __repr__(self):
- return 'Token(typeid=%r, address=%r, id=%r)' % \
- (self.typeid, self.address, self.id)
+ return '%s(typeid=%r, address=%r, id=%r)' % \
+ (self.__class__.__name__, self.typeid, self.address, self.id)
#
# Function for communication with a manager's server process
@@ -306,8 +306,7 @@ class Server(object):
'''
Return some info --- useful to spot problems with refcounting
'''
- self.mutex.acquire()
- try:
+ with self.mutex:
result = []
keys = list(self.id_to_obj.keys())
keys.sort()
@@ -317,8 +316,6 @@ class Server(object):
(ident, self.id_to_refcount[ident],
str(self.id_to_obj[ident][0])[:75]))
return '\n'.join(result)
- finally:
- self.mutex.release()
def number_of_objects(self, c):
'''
@@ -343,8 +340,7 @@ class Server(object):
'''
Create a new shared object and return its id
'''
- self.mutex.acquire()
- try:
+ with self.mutex:
callable, exposed, method_to_typeid, proxytype = \
self.registry[typeid]
@@ -374,8 +370,6 @@ class Server(object):
# has been created.
self.incref(c, ident)
return ident, tuple(exposed)
- finally:
- self.mutex.release()
def get_methods(self, c, token):
'''
@@ -392,22 +386,16 @@ class Server(object):
self.serve_client(c)
def incref(self, c, ident):
- self.mutex.acquire()
- try:
+ with self.mutex:
self.id_to_refcount[ident] += 1
- finally:
- self.mutex.release()
def decref(self, c, ident):
- self.mutex.acquire()
- try:
+ with self.mutex:
assert self.id_to_refcount[ident] >= 1
self.id_to_refcount[ident] -= 1
if self.id_to_refcount[ident] == 0:
del self.id_to_obj[ident], self.id_to_refcount[ident]
util.debug('disposing of obj with id %r', ident)
- finally:
- self.mutex.release()
#
# Class to represent state of a manager
@@ -671,14 +659,11 @@ class BaseProxy(object):
def __init__(self, token, serializer, manager=None,
authkey=None, exposed=None, incref=True):
- BaseProxy._mutex.acquire()
- try:
+ with BaseProxy._mutex:
tls_idset = BaseProxy._address_to_local.get(token.address, None)
if tls_idset is None:
tls_idset = util.ForkAwareLocal(), ProcessLocalSet()
BaseProxy._address_to_local[token.address] = tls_idset
- finally:
- BaseProxy._mutex.release()
# self._tls is used to record the connection used by this
# thread to communicate with the manager at token.address
@@ -818,8 +803,8 @@ class BaseProxy(object):
return self._getvalue()
def __repr__(self):
- return '<%s object, typeid %r at %s>' % \
- (type(self).__name__, self._token.typeid, '0x%x' % id(self))
+ return '<%s object, typeid %r at %#x>' % \
+ (type(self).__name__, self._token.typeid, id(self))
def __str__(self):
'''
@@ -857,7 +842,7 @@ def RebuildProxy(func, token, serializer, kwds):
def MakeProxyType(name, exposed, _cache={}):
'''
- Return an proxy type whose methods are given by `exposed`
+ Return a proxy type whose methods are given by `exposed`
'''
exposed = tuple(exposed)
try:
@@ -916,7 +901,7 @@ class Namespace(object):
if not name.startswith('_'):
temp.append('%s=%r' % (name, value))
temp.sort()
- return 'Namespace(%s)' % str.join(', ', temp)
+ return '%s(%s)' % (self.__class__.__name__, ', '.join(temp))
class Value(object):
def __init__(self, typecode, value, lock=True):
diff --git a/Lib/multiprocessing/pool.py b/Lib/multiprocessing/pool.py
index db6e3e179f..6d25469e16 100644
--- a/Lib/multiprocessing/pool.py
+++ b/Lib/multiprocessing/pool.py
@@ -87,7 +87,7 @@ class MaybeEncodingError(Exception):
self.exc)
def __repr__(self):
- return "<MaybeEncodingError: %s>" % str(self)
+ return "<%s: %s>" % (self.__class__.__name__, self)
def worker(inqueue, outqueue, initializer=None, initargs=(), maxtasks=None,
@@ -675,8 +675,7 @@ class IMapIterator(object):
return self
def next(self, timeout=None):
- self._cond.acquire()
- try:
+ with self._cond:
try:
item = self._items.popleft()
except IndexError:
@@ -689,8 +688,6 @@ class IMapIterator(object):
if self._index == self._length:
raise StopIteration
raise TimeoutError
- finally:
- self._cond.release()
success, value = item
if success:
@@ -700,8 +697,7 @@ class IMapIterator(object):
__next__ = next # XXX
def _set(self, i, obj):
- self._cond.acquire()
- try:
+ with self._cond:
if self._index == i:
self._items.append(obj)
self._index += 1
@@ -715,18 +711,13 @@ class IMapIterator(object):
if self._index == self._length:
del self._cache[self._job]
- finally:
- self._cond.release()
def _set_length(self, length):
- self._cond.acquire()
- try:
+ with self._cond:
self._length = length
if self._index == self._length:
self._cond.notify()
del self._cache[self._job]
- finally:
- self._cond.release()
#
# Class whose instances are returned by `Pool.imap_unordered()`
@@ -735,15 +726,12 @@ class IMapIterator(object):
class IMapUnorderedIterator(IMapIterator):
def _set(self, i, obj):
- self._cond.acquire()
- try:
+ with self._cond:
self._items.append(obj)
self._index += 1
self._cond.notify()
if self._index == self._length:
del self._cache[self._job]
- finally:
- self._cond.release()
#
#
@@ -769,10 +757,7 @@ class ThreadPool(Pool):
@staticmethod
def _help_stuff_finish(inqueue, task_handler, size):
# put sentinels at head of inqueue to make workers finish
- inqueue.not_empty.acquire()
- try:
+ with inqueue.not_empty:
inqueue.queue.clear()
inqueue.queue.extend([None] * size)
inqueue.not_empty.notify_all()
- finally:
- inqueue.not_empty.release()
diff --git a/Lib/multiprocessing/popen_fork.py b/Lib/multiprocessing/popen_fork.py
index 367e72e2b1..d2ebd7cfbe 100644
--- a/Lib/multiprocessing/popen_fork.py
+++ b/Lib/multiprocessing/popen_fork.py
@@ -1,7 +1,6 @@
import os
import sys
import signal
-import errno
from . import util
@@ -29,8 +28,6 @@ class Popen(object):
try:
pid, sts = os.waitpid(self.pid, flag)
except OSError as e:
- if e.errno == errno.EINTR:
- continue
# Child process not yet created. See #1731717
# e.errno == errno.ECHILD == 10
return None
diff --git a/Lib/multiprocessing/process.py b/Lib/multiprocessing/process.py
index 68959bf9f4..bca8b7a004 100644
--- a/Lib/multiprocessing/process.py
+++ b/Lib/multiprocessing/process.py
@@ -234,12 +234,7 @@ class BaseProcess(object):
context._force_start_method(self._start_method)
_process_counter = itertools.count(1)
_children = set()
- if sys.stdin is not None:
- try:
- sys.stdin.close()
- sys.stdin = open(os.devnull)
- except (OSError, ValueError):
- pass
+ util._close_stdin()
old_process = _current_process
_current_process = self
try:
diff --git a/Lib/multiprocessing/queues.py b/Lib/multiprocessing/queues.py
index 293ad7673c..786a303b33 100644
--- a/Lib/multiprocessing/queues.py
+++ b/Lib/multiprocessing/queues.py
@@ -82,14 +82,11 @@ class Queue(object):
if not self._sem.acquire(block, timeout):
raise Full
- self._notempty.acquire()
- try:
+ with self._notempty:
if self._thread is None:
self._start_thread()
self._buffer.append(obj)
self._notempty.notify()
- finally:
- self._notempty.release()
def get(self, block=True, timeout=None):
if block and timeout is None:
@@ -206,12 +203,9 @@ class Queue(object):
@staticmethod
def _finalize_close(buffer, notempty):
debug('telling queue thread to quit')
- notempty.acquire()
- try:
+ with notempty:
buffer.append(_sentinel)
notempty.notify()
- finally:
- notempty.release()
@staticmethod
def _feed(buffer, notempty, send_bytes, writelock, close, ignore_epipe):
@@ -300,35 +294,24 @@ class JoinableQueue(Queue):
if not self._sem.acquire(block, timeout):
raise Full
- self._notempty.acquire()
- self._cond.acquire()
- try:
+ with self._notempty, self._cond:
if self._thread is None:
self._start_thread()
self._buffer.append(obj)
self._unfinished_tasks.release()
self._notempty.notify()
- finally:
- self._cond.release()
- self._notempty.release()
def task_done(self):
- self._cond.acquire()
- try:
+ with self._cond:
if not self._unfinished_tasks.acquire(False):
raise ValueError('task_done() called too many times')
if self._unfinished_tasks._semlock._is_zero():
self._cond.notify_all()
- finally:
- self._cond.release()
def join(self):
- self._cond.acquire()
- try:
+ with self._cond:
if not self._unfinished_tasks._semlock._is_zero():
self._cond.wait()
- finally:
- self._cond.release()
#
# Simplified Queue type -- really just a locked pipe
diff --git a/Lib/multiprocessing/sharedctypes.py b/Lib/multiprocessing/sharedctypes.py
index 0c178252d5..4258f591c4 100644
--- a/Lib/multiprocessing/sharedctypes.py
+++ b/Lib/multiprocessing/sharedctypes.py
@@ -188,6 +188,12 @@ class SynchronizedBase(object):
self.acquire = self._lock.acquire
self.release = self._lock.release
+ def __enter__(self):
+ return self._lock.__enter__()
+
+ def __exit__(self, *args):
+ return self._lock.__exit__(*args)
+
def __reduce__(self):
assert_spawning(self)
return synchronized, (self._obj, self._lock)
@@ -212,32 +218,20 @@ class SynchronizedArray(SynchronizedBase):
return len(self._obj)
def __getitem__(self, i):
- self.acquire()
- try:
+ with self:
return self._obj[i]
- finally:
- self.release()
def __setitem__(self, i, value):
- self.acquire()
- try:
+ with self:
self._obj[i] = value
- finally:
- self.release()
def __getslice__(self, start, stop):
- self.acquire()
- try:
+ with self:
return self._obj[start:stop]
- finally:
- self.release()
def __setslice__(self, start, stop, values):
- self.acquire()
- try:
+ with self:
self._obj[start:stop] = values
- finally:
- self.release()
class SynchronizedString(SynchronizedArray):
diff --git a/Lib/multiprocessing/spawn.py b/Lib/multiprocessing/spawn.py
index 336e47990f..4d769516cd 100644
--- a/Lib/multiprocessing/spawn.py
+++ b/Lib/multiprocessing/spawn.py
@@ -91,7 +91,7 @@ def get_command_line(**kwds):
def spawn_main(pipe_handle, parent_pid=None, tracker_fd=None):
'''
- Run code specifed by data received over pipe
+ Run code specified by data received over pipe
'''
assert is_forking(sys.argv)
if sys.platform == 'win32':
diff --git a/Lib/multiprocessing/synchronize.py b/Lib/multiprocessing/synchronize.py
index dea1cbd7f0..d4bdf0e8b1 100644
--- a/Lib/multiprocessing/synchronize.py
+++ b/Lib/multiprocessing/synchronize.py
@@ -134,7 +134,7 @@ class Semaphore(SemLock):
value = self._semlock._get_value()
except Exception:
value = 'unknown'
- return '<Semaphore(value=%s)>' % value
+ return '<%s(value=%s)>' % (self.__class__.__name__, value)
#
# Bounded semaphore
@@ -150,8 +150,8 @@ class BoundedSemaphore(Semaphore):
value = self._semlock._get_value()
except Exception:
value = 'unknown'
- return '<BoundedSemaphore(value=%s, maxvalue=%s)>' % \
- (value, self._semlock.maxvalue)
+ return '<%s(value=%s, maxvalue=%s)>' % \
+ (self.__class__.__name__, value, self._semlock.maxvalue)
#
# Non-recursive lock
@@ -176,7 +176,7 @@ class Lock(SemLock):
name = 'SomeOtherProcess'
except Exception:
name = 'unknown'
- return '<Lock(owner=%s)>' % name
+ return '<%s(owner=%s)>' % (self.__class__.__name__, name)
#
# Recursive lock
@@ -202,7 +202,7 @@ class RLock(SemLock):
name, count = 'SomeOtherProcess', 'nonzero'
except Exception:
name, count = 'unknown', 'unknown'
- return '<RLock(%s, %s)>' % (name, count)
+ return '<%s(%s, %s)>' % (self.__class__.__name__, name, count)
#
# Condition variable
@@ -243,7 +243,7 @@ class Condition(object):
self._woken_count._semlock._get_value())
except Exception:
num_waiters = 'unknown'
- return '<Condition(%s, %s)>' % (self._lock, num_waiters)
+ return '<%s(%s, %s)>' % (self.__class__.__name__, self._lock, num_waiters)
def wait(self, timeout=None):
assert self._lock._semlock._is_mine(), \
@@ -337,34 +337,24 @@ class Event(object):
self._flag = ctx.Semaphore(0)
def is_set(self):
- self._cond.acquire()
- try:
+ with self._cond:
if self._flag.acquire(False):
self._flag.release()
return True
return False
- finally:
- self._cond.release()
def set(self):
- self._cond.acquire()
- try:
+ with self._cond:
self._flag.acquire(False)
self._flag.release()
self._cond.notify_all()
- finally:
- self._cond.release()
def clear(self):
- self._cond.acquire()
- try:
+ with self._cond:
self._flag.acquire(False)
- finally:
- self._cond.release()
def wait(self, timeout=None):
- self._cond.acquire()
- try:
+ with self._cond:
if self._flag.acquire(False):
self._flag.release()
else:
@@ -374,8 +364,6 @@ class Event(object):
self._flag.release()
return True
return False
- finally:
- self._cond.release()
#
# Barrier
diff --git a/Lib/multiprocessing/util.py b/Lib/multiprocessing/util.py
index 0b695e46e5..1a2c0db40b 100644
--- a/Lib/multiprocessing/util.py
+++ b/Lib/multiprocessing/util.py
@@ -9,6 +9,7 @@
import os
import itertools
+import sys
import weakref
import atexit
import threading # we want threading to install it's
@@ -212,10 +213,11 @@ class Finalize(object):
obj = None
if obj is None:
- return '<Finalize object, dead>'
+ return '<%s object, dead>' % self.__class__.__name__
- x = '<Finalize object, callback=%s' % \
- getattr(self._callback, '__name__', self._callback)
+ x = '<%s object, callback=%s' % (
+ self.__class__.__name__,
+ getattr(self._callback, '__name__', self._callback))
if self._args:
x += ', args=' + str(self._args)
if self._kwargs:
@@ -327,6 +329,13 @@ class ForkAwareThreadLock(object):
self.acquire = self._lock.acquire
self.release = self._lock.release
+ def __enter__(self):
+ return self._lock.__enter__()
+
+ def __exit__(self, *args):
+ return self._lock.__exit__(*args)
+
+
class ForkAwareLocal(threading.local):
def __init__(self):
register_after_fork(self, lambda obj : obj.__dict__.clear())
@@ -348,6 +357,28 @@ def close_all_fds_except(fds):
assert fds[-1] == MAXFD, 'fd too large'
for i in range(len(fds) - 1):
os.closerange(fds[i]+1, fds[i+1])
+#
+# Close sys.stdin and replace stdin with os.devnull
+#
+
+def _close_stdin():
+ if sys.stdin is None:
+ return
+
+ try:
+ sys.stdin.close()
+ except (OSError, ValueError):
+ pass
+
+ try:
+ fd = os.open(os.devnull, os.O_RDONLY)
+ try:
+ sys.stdin = open(fd, closefd=False)
+ except:
+ os.close(fd)
+ raise
+ except (OSError, ValueError):
+ pass
#
# Start a program with only specified fds kept open
diff --git a/Lib/nntplib.py b/Lib/nntplib.py
index a75faade14..28cd0992dd 100644
--- a/Lib/nntplib.py
+++ b/Lib/nntplib.py
@@ -165,7 +165,7 @@ ArticleInfo = collections.namedtuple('ArticleInfo',
# Helper function(s)
def decode_header(header_str):
- """Takes an unicode string representing a munged header value
+ """Takes a unicode string representing a munged header value
and decodes it as a (possibly non-ASCII) readable value."""
parts = []
for v, enc in _email_decode_header(header_str):
@@ -420,7 +420,7 @@ class _NNTPBase:
def _putcmd(self, line):
"""Internal: send one command to the server (through _putline()).
- The `line` must be an unicode string."""
+ The `line` must be a unicode string."""
if self.debugging: print('*cmd*', repr(line))
line = line.encode(self.encoding, self.errors)
self._putline(line)
@@ -445,7 +445,7 @@ class _NNTPBase:
def _getresp(self):
"""Internal: get a response from the server.
Raise various errors if the response indicates an error.
- Returns an unicode string."""
+ Returns a unicode string."""
resp = self._getline()
if self.debugging: print('*resp*', repr(resp))
resp = resp.decode(self.encoding, self.errors)
@@ -462,7 +462,7 @@ class _NNTPBase:
"""Internal: get a response plus following text from the server.
Raise various errors if the response indicates an error.
- Returns a (response, lines) tuple where `response` is an unicode
+ Returns a (response, lines) tuple where `response` is a unicode
string and `lines` is a list of bytes objects.
If `file` is a file-like object, it must be open in binary mode.
"""
diff --git a/Lib/ntpath.py b/Lib/ntpath.py
index 992970ab1d..af6a7091f9 100644
--- a/Lib/ntpath.py
+++ b/Lib/ntpath.py
@@ -17,7 +17,7 @@ __all__ = ["normcase","isabs","join","splitdrive","split","splitext",
"ismount", "expanduser","expandvars","normpath","abspath",
"splitunc","curdir","pardir","sep","pathsep","defpath","altsep",
"extsep","devnull","realpath","supports_unicode_filenames","relpath",
- "samefile", "sameopenfile", "samestat",]
+ "samefile", "sameopenfile", "samestat", "commonpath"]
# strings representing various path-related bits and pieces
# These are primarily for export; internally, they are hardcoded.
@@ -32,48 +32,12 @@ if 'ce' in sys.builtin_module_names:
defpath = '\\Windows'
devnull = 'nul'
-def _get_empty(path):
- if isinstance(path, bytes):
- return b''
- else:
- return ''
-
-def _get_sep(path):
- if isinstance(path, bytes):
- return b'\\'
- else:
- return '\\'
-
-def _get_altsep(path):
- if isinstance(path, bytes):
- return b'/'
- else:
- return '/'
-
def _get_bothseps(path):
if isinstance(path, bytes):
return b'\\/'
else:
return '\\/'
-def _get_dot(path):
- if isinstance(path, bytes):
- return b'.'
- else:
- return '.'
-
-def _get_colon(path):
- if isinstance(path, bytes):
- return b':'
- else:
- return ':'
-
-def _get_special(path):
- if isinstance(path, bytes):
- return (b'\\\\.\\', b'\\\\?\\')
- else:
- return ('\\\\.\\', '\\\\?\\')
-
# Normalize the case of a pathname and map slashes to backslashes.
# Other normalizations (such as optimizing '../' away) are not done
# (this is done by normpath).
@@ -82,10 +46,16 @@ def normcase(s):
"""Normalize case of pathname.
Makes all characters lowercase and all slashes into backslashes."""
- if not isinstance(s, (bytes, str)):
- raise TypeError("normcase() argument must be str or bytes, "
- "not '{}'".format(s.__class__.__name__))
- return s.replace(_get_altsep(s), _get_sep(s)).lower()
+ try:
+ if isinstance(s, bytes):
+ return s.replace(b'/', b'\\').lower()
+ else:
+ return s.replace('/', '\\').lower()
+ except (TypeError, AttributeError):
+ if not isinstance(s, (bytes, str)):
+ raise TypeError("normcase() argument must be str or bytes, "
+ "not %r" % s.__class__.__name__) from None
+ raise
# Return whether a path is absolute.
@@ -97,40 +67,51 @@ def normcase(s):
def isabs(s):
"""Test whether a path is absolute"""
s = splitdrive(s)[1]
- return len(s) > 0 and s[:1] in _get_bothseps(s)
+ return len(s) > 0 and s[0] in _get_bothseps(s)
# Join two (or more) paths.
def join(path, *paths):
- sep = _get_sep(path)
- seps = _get_bothseps(path)
- colon = _get_colon(path)
- result_drive, result_path = splitdrive(path)
- for p in paths:
- p_drive, p_path = splitdrive(p)
- if p_path and p_path[0] in seps:
- # Second path is absolute
- if p_drive or not result_drive:
- result_drive = p_drive
- result_path = p_path
- continue
- elif p_drive and p_drive != result_drive:
- if p_drive.lower() != result_drive.lower():
- # Different drives => ignore the first path entirely
- result_drive = p_drive
+ if isinstance(path, bytes):
+ sep = b'\\'
+ seps = b'\\/'
+ colon = b':'
+ else:
+ sep = '\\'
+ seps = '\\/'
+ colon = ':'
+ try:
+ if not paths:
+ path[:0] + sep #23780: Ensure compatible data type even if p is null.
+ result_drive, result_path = splitdrive(path)
+ for p in paths:
+ p_drive, p_path = splitdrive(p)
+ if p_path and p_path[0] in seps:
+ # Second path is absolute
+ if p_drive or not result_drive:
+ result_drive = p_drive
result_path = p_path
continue
- # Same drive in different case
- result_drive = p_drive
- # Second path is relative to the first
- if result_path and result_path[-1] not in seps:
- result_path = result_path + sep
- result_path = result_path + p_path
- ## add separator between UNC and non-absolute path
- if (result_path and result_path[0] not in seps and
- result_drive and result_drive[-1:] != colon):
- return result_drive + sep + result_path
- return result_drive + result_path
+ elif p_drive and p_drive != result_drive:
+ if p_drive.lower() != result_drive.lower():
+ # Different drives => ignore the first path entirely
+ result_drive = p_drive
+ result_path = p_path
+ continue
+ # Same drive in different case
+ result_drive = p_drive
+ # Second path is relative to the first
+ if result_path and result_path[-1] not in seps:
+ result_path = result_path + sep
+ result_path = result_path + p_path
+ ## add separator between UNC and non-absolute path
+ if (result_path and result_path[0] not in seps and
+ result_drive and result_drive[-1:] != colon):
+ return result_drive + sep + result_path
+ return result_drive + result_path
+ except (TypeError, AttributeError, BytesWarning):
+ genericpath._check_arg_types('join', path, *paths)
+ raise
# Split a path in a drive specification (a drive letter followed by a
@@ -155,10 +136,16 @@ def splitdrive(p):
Paths cannot contain both a drive letter and a UNC path.
"""
- empty = _get_empty(p)
- if len(p) > 1:
- sep = _get_sep(p)
- normp = p.replace(_get_altsep(p), sep)
+ if len(p) >= 2:
+ if isinstance(p, bytes):
+ sep = b'\\'
+ altsep = b'/'
+ colon = b':'
+ else:
+ sep = '\\'
+ altsep = '/'
+ colon = ':'
+ normp = p.replace(altsep, sep)
if (normp[0:2] == sep*2) and (normp[2:3] != sep):
# is a UNC path:
# vvvvvvvvvvvvvvvvvvvv drive letter or UNC path
@@ -166,18 +153,18 @@ def splitdrive(p):
# directory ^^^^^^^^^^^^^^^
index = normp.find(sep, 2)
if index == -1:
- return empty, p
+ return p[:0], p
index2 = normp.find(sep, index + 1)
# a UNC path can't have two slashes in a row
# (after the initial two)
if index2 == index + 1:
- return empty, p
+ return p[:0], p
if index2 == -1:
index2 = len(p)
return p[:index2], p[index2:]
- if normp[1:2] == _get_colon(p):
+ if normp[1:2] == colon:
return p[:2], p[2:]
- return empty, p
+ return p[:0], p
# Parse UNC paths
@@ -190,7 +177,7 @@ def splitunc(p):
Return a 2-tuple (unc, rest); either part may be empty.
If unc is not empty, it has the form '//host/mount' (or similar
using backslashes). unc+rest is always the input path.
- Paths containing drive letters never have an UNC part.
+ Paths containing drive letters never have a UNC part.
"""
import warnings
warnings.warn("ntpath.splitunc is deprecated, use ntpath.splitdrive instead",
@@ -221,10 +208,7 @@ def split(p):
i -= 1
head, tail = p[:i], p[i:] # now tail has no slashes
# remove trailing slashes from head, unless it's all slashes
- head2 = head
- while head2 and head2[-1:] in seps:
- head2 = head2[:-1]
- head = head2 or head
+ head = head.rstrip(seps) or head
return d + head, tail
@@ -234,8 +218,10 @@ def split(p):
# It is always true that root + ext == p.
def splitext(p):
- return genericpath._splitext(p, _get_sep(p), _get_altsep(p),
- _get_dot(p))
+ if isinstance(p, bytes):
+ return genericpath._splitext(p, b'\\', b'/', b'.')
+ else:
+ return genericpath._splitext(p, '\\', '/', '.')
splitext.__doc__ = genericpath._splitext.__doc__
@@ -343,7 +329,7 @@ def expanduser(path):
userhome = join(drive, os.environ['HOMEPATH'])
if isinstance(path, bytes):
- userhome = userhome.encode(sys.getfilesystemencoding())
+ userhome = os.fsencode(userhome)
if i != 1: #~user
userhome = join(dirname(userhome), path[1:i])
@@ -369,13 +355,14 @@ def expandvars(path):
Unknown variables are left unchanged."""
if isinstance(path, bytes):
- if ord('$') not in path and ord('%') not in path:
+ if b'$' not in path and b'%' not in path:
return path
import string
varchars = bytes(string.ascii_letters + string.digits + '_-', 'ascii')
quote = b'\''
percent = b'%'
brace = b'{'
+ rbrace = b'}'
dollar = b'$'
environ = getattr(os, 'environb', None)
else:
@@ -386,6 +373,7 @@ def expandvars(path):
quote = '\''
percent = '%'
brace = '{'
+ rbrace = '}'
dollar = '$'
environ = os.environ
res = path[:0]
@@ -432,15 +420,9 @@ def expandvars(path):
path = path[index+2:]
pathlen = len(path)
try:
- if isinstance(path, bytes):
- index = path.index(b'}')
- else:
- index = path.index('}')
+ index = path.index(rbrace)
except ValueError:
- if isinstance(path, bytes):
- res += b'${' + path
- else:
- res += '${' + path
+ res += dollar + brace + path
index = pathlen - 1
else:
var = path[:index]
@@ -450,10 +432,7 @@ def expandvars(path):
else:
value = environ[var]
except KeyError:
- if isinstance(path, bytes):
- value = b'${' + var + b'}'
- else:
- value = '${' + var + '}'
+ value = dollar + brace + var + rbrace
res += value
else:
var = path[:0]
@@ -485,16 +464,25 @@ def expandvars(path):
def normpath(path):
"""Normalize path, eliminating double slashes, etc."""
- sep = _get_sep(path)
- dotdot = _get_dot(path) * 2
- special_prefixes = _get_special(path)
+ if isinstance(path, bytes):
+ sep = b'\\'
+ altsep = b'/'
+ curdir = b'.'
+ pardir = b'..'
+ special_prefixes = (b'\\\\.\\', b'\\\\?\\')
+ else:
+ sep = '\\'
+ altsep = '/'
+ curdir = '.'
+ pardir = '..'
+ special_prefixes = ('\\\\.\\', '\\\\?\\')
if path.startswith(special_prefixes):
# in the case of paths with these prefixes:
# \\.\ -> device names
# \\?\ -> literal paths
# do not do any normalization, but return the path unchanged
return path
- path = path.replace(_get_altsep(path), sep)
+ path = path.replace(altsep, sep)
prefix, path = splitdrive(path)
# collapse initial backslashes
@@ -505,13 +493,13 @@ def normpath(path):
comps = path.split(sep)
i = 0
while i < len(comps):
- if not comps[i] or comps[i] == _get_dot(path):
+ if not comps[i] or comps[i] == curdir:
del comps[i]
- elif comps[i] == dotdot:
- if i > 0 and comps[i-1] != dotdot:
+ elif comps[i] == pardir:
+ if i > 0 and comps[i-1] != pardir:
del comps[i-1:i+1]
i -= 1
- elif i == 0 and prefix.endswith(_get_sep(path)):
+ elif i == 0 and prefix.endswith(sep):
del comps[i]
else:
i += 1
@@ -519,7 +507,7 @@ def normpath(path):
i += 1
# If the path is now empty, substitute '.'
if not prefix and not comps:
- comps.append(_get_dot(path))
+ comps.append(curdir)
return prefix + sep.join(comps)
@@ -559,42 +547,109 @@ realpath = abspath
supports_unicode_filenames = (hasattr(sys, "getwindowsversion") and
sys.getwindowsversion()[3] >= 2)
-def relpath(path, start=curdir):
+def relpath(path, start=None):
"""Return a relative version of a path"""
- sep = _get_sep(path)
+ if isinstance(path, bytes):
+ sep = b'\\'
+ curdir = b'.'
+ pardir = b'..'
+ else:
+ sep = '\\'
+ curdir = '.'
+ pardir = '..'
- if start is curdir:
- start = _get_dot(path)
+ if start is None:
+ start = curdir
if not path:
raise ValueError("no path specified")
- start_abs = abspath(normpath(start))
- path_abs = abspath(normpath(path))
- start_drive, start_rest = splitdrive(start_abs)
- path_drive, path_rest = splitdrive(path_abs)
- if normcase(start_drive) != normcase(path_drive):
- error = "path is on mount '{0}', start on mount '{1}'".format(
- path_drive, start_drive)
- raise ValueError(error)
-
- start_list = [x for x in start_rest.split(sep) if x]
- path_list = [x for x in path_rest.split(sep) if x]
- # Work out how much of the filepath is shared by start and path.
- i = 0
- for e1, e2 in zip(start_list, path_list):
- if normcase(e1) != normcase(e2):
- break
- i += 1
+ try:
+ start_abs = abspath(normpath(start))
+ path_abs = abspath(normpath(path))
+ start_drive, start_rest = splitdrive(start_abs)
+ path_drive, path_rest = splitdrive(path_abs)
+ if normcase(start_drive) != normcase(path_drive):
+ raise ValueError("path is on mount %r, start on mount %r" % (
+ path_drive, start_drive))
+
+ start_list = [x for x in start_rest.split(sep) if x]
+ path_list = [x for x in path_rest.split(sep) if x]
+ # Work out how much of the filepath is shared by start and path.
+ i = 0
+ for e1, e2 in zip(start_list, path_list):
+ if normcase(e1) != normcase(e2):
+ break
+ i += 1
- if isinstance(path, bytes):
- pardir = b'..'
+ rel_list = [pardir] * (len(start_list)-i) + path_list[i:]
+ if not rel_list:
+ return curdir
+ return join(*rel_list)
+ except (TypeError, ValueError, AttributeError, BytesWarning, DeprecationWarning):
+ genericpath._check_arg_types('relpath', path, start)
+ raise
+
+
+# Return the longest common sub-path of the sequence of paths given as input.
+# The function is case-insensitive and 'separator-insensitive', i.e. if the
+# only difference between two paths is the use of '\' versus '/' as separator,
+# they are deemed to be equal.
+#
+# However, the returned path will have the standard '\' separator (even if the
+# given paths had the alternative '/' separator) and will have the case of the
+# first path given in the sequence. Additionally, any trailing separator is
+# stripped from the returned path.
+
+def commonpath(paths):
+ """Given a sequence of path names, returns the longest common sub-path."""
+
+ if not paths:
+ raise ValueError('commonpath() arg is an empty sequence')
+
+ if isinstance(paths[0], bytes):
+ sep = b'\\'
+ altsep = b'/'
+ curdir = b'.'
else:
- pardir = '..'
- rel_list = [pardir] * (len(start_list)-i) + path_list[i:]
- if not rel_list:
- return _get_dot(path)
- return join(*rel_list)
+ sep = '\\'
+ altsep = '/'
+ curdir = '.'
+
+ try:
+ drivesplits = [splitdrive(p.replace(altsep, sep).lower()) for p in paths]
+ split_paths = [p.split(sep) for d, p in drivesplits]
+
+ try:
+ isabs, = set(p[:1] == sep for d, p in drivesplits)
+ except ValueError:
+ raise ValueError("Can't mix absolute and relative paths") from None
+
+ # Check that all drive letters or UNC paths match. The check is made only
+ # now otherwise type errors for mixing strings and bytes would not be
+ # caught.
+ if len(set(d for d, p in drivesplits)) != 1:
+ raise ValueError("Paths don't have the same drive")
+
+ drive, path = splitdrive(paths[0].replace(altsep, sep))
+ common = path.split(sep)
+ common = [c for c in common if c and c != curdir]
+
+ split_paths = [[c for c in s if c and c != curdir] for s in split_paths]
+ s1 = min(split_paths)
+ s2 = max(split_paths)
+ for i, c in enumerate(s1):
+ if c != s2[i]:
+ common = common[:i]
+ break
+ else:
+ common = common[:len(s1)]
+
+ prefix = drive + sep if isabs else drive
+ return prefix + sep.join(common)
+ except (TypeError, AttributeError):
+ genericpath._check_arg_types('commonpath', *paths)
+ raise
# determine if two files are in fact the same file
diff --git a/Lib/opcode.py b/Lib/opcode.py
index 0bd1ee679c..4c826a7730 100644
--- a/Lib/opcode.py
+++ b/Lib/opcode.py
@@ -70,6 +70,9 @@ def_op('UNARY_NOT', 12)
def_op('UNARY_INVERT', 15)
+def_op('BINARY_MATRIX_MULTIPLY', 16)
+def_op('INPLACE_MATRIX_MULTIPLY', 17)
+
def_op('BINARY_POWER', 19)
def_op('BINARY_MULTIPLY', 20)
@@ -82,7 +85,10 @@ def_op('BINARY_TRUE_DIVIDE', 27)
def_op('INPLACE_FLOOR_DIVIDE', 28)
def_op('INPLACE_TRUE_DIVIDE', 29)
-def_op('STORE_MAP', 54)
+def_op('GET_AITER', 50)
+def_op('GET_ANEXT', 51)
+def_op('BEFORE_ASYNC_WITH', 52)
+
def_op('INPLACE_ADD', 55)
def_op('INPLACE_SUBTRACT', 56)
def_op('INPLACE_MULTIPLY', 57)
@@ -97,10 +103,12 @@ def_op('BINARY_XOR', 65)
def_op('BINARY_OR', 66)
def_op('INPLACE_POWER', 67)
def_op('GET_ITER', 68)
+def_op('GET_YIELD_FROM_ITER', 69)
def_op('PRINT_EXPR', 70)
def_op('LOAD_BUILD_CLASS', 71)
def_op('YIELD_FROM', 72)
+def_op('GET_AWAITABLE', 73)
def_op('INPLACE_LSHIFT', 75)
def_op('INPLACE_RSHIFT', 76)
@@ -108,7 +116,8 @@ def_op('INPLACE_AND', 77)
def_op('INPLACE_XOR', 78)
def_op('INPLACE_OR', 79)
def_op('BREAK_LOOP', 80)
-def_op('WITH_CLEANUP', 81)
+def_op('WITH_CLEANUP_START', 81)
+def_op('WITH_CLEANUP_FINISH', 82)
def_op('RETURN_VALUE', 83)
def_op('IMPORT_STAR', 84)
@@ -194,7 +203,15 @@ def_op('MAP_ADD', 147)
def_op('LOAD_CLASSDEREF', 148)
hasfree.append(148)
+jrel_op('SETUP_ASYNC_WITH', 154)
+
def_op('EXTENDED_ARG', 144)
EXTENDED_ARG = 144
+def_op('BUILD_LIST_UNPACK', 149)
+def_op('BUILD_MAP_UNPACK', 150)
+def_op('BUILD_MAP_UNPACK_WITH_CALL', 151)
+def_op('BUILD_TUPLE_UNPACK', 152)
+def_op('BUILD_SET_UNPACK', 153)
+
del def_op, name_op, jrel_op, jabs_op
diff --git a/Lib/operator.py b/Lib/operator.py
index b60349fe4c..0e2e53efc6 100644
--- a/Lib/operator.py
+++ b/Lib/operator.py
@@ -12,12 +12,12 @@ This is the pure Python implementation of the module.
__all__ = ['abs', 'add', 'and_', 'attrgetter', 'concat', 'contains', 'countOf',
'delitem', 'eq', 'floordiv', 'ge', 'getitem', 'gt', 'iadd', 'iand',
- 'iconcat', 'ifloordiv', 'ilshift', 'imod', 'imul', 'index',
- 'indexOf', 'inv', 'invert', 'ior', 'ipow', 'irshift', 'is_',
- 'is_not', 'isub', 'itemgetter', 'itruediv', 'ixor', 'le',
- 'length_hint', 'lshift', 'lt', 'methodcaller', 'mod', 'mul', 'ne',
- 'neg', 'not_', 'or_', 'pos', 'pow', 'rshift', 'setitem', 'sub',
- 'truediv', 'truth', 'xor']
+ 'iconcat', 'ifloordiv', 'ilshift', 'imatmul', 'imod', 'imul',
+ 'index', 'indexOf', 'inv', 'invert', 'ior', 'ipow', 'irshift',
+ 'is_', 'is_not', 'isub', 'itemgetter', 'itruediv', 'ixor', 'le',
+ 'length_hint', 'lshift', 'lt', 'matmul', 'methodcaller', 'mod',
+ 'mul', 'ne', 'neg', 'not_', 'or_', 'pos', 'pow', 'rshift',
+ 'setitem', 'sub', 'truediv', 'truth', 'xor']
from builtins import abs as _abs
@@ -105,6 +105,10 @@ def mul(a, b):
"Same as a * b."
return a * b
+def matmul(a, b):
+ "Same as a @ b."
+ return a @ b
+
def neg(a):
"Same as -a."
return -a
@@ -227,10 +231,13 @@ class attrgetter:
After h = attrgetter('name.first', 'name.last'), the call h(r) returns
(r.name.first, r.name.last).
"""
+ __slots__ = ('_attrs', '_call')
+
def __init__(self, attr, *attrs):
if not attrs:
if not isinstance(attr, str):
raise TypeError('attribute name must be a string')
+ self._attrs = (attr,)
names = attr.split('.')
def func(obj):
for name in names:
@@ -238,7 +245,8 @@ class attrgetter:
return obj
self._call = func
else:
- getters = tuple(map(attrgetter, (attr,) + attrs))
+ self._attrs = (attr,) + attrs
+ getters = tuple(map(attrgetter, self._attrs))
def func(obj):
return tuple(getter(obj) for getter in getters)
self._call = func
@@ -246,19 +254,30 @@ class attrgetter:
def __call__(self, obj):
return self._call(obj)
+ def __repr__(self):
+ return '%s.%s(%s)' % (self.__class__.__module__,
+ self.__class__.__qualname__,
+ ', '.join(map(repr, self._attrs)))
+
+ def __reduce__(self):
+ return self.__class__, self._attrs
+
class itemgetter:
"""
Return a callable object that fetches the given item(s) from its operand.
After f = itemgetter(2), the call f(r) returns r[2].
After g = itemgetter(2, 5, 3), the call g(r) returns (r[2], r[5], r[3])
"""
+ __slots__ = ('_items', '_call')
+
def __init__(self, item, *items):
if not items:
+ self._items = (item,)
def func(obj):
return obj[item]
self._call = func
else:
- items = (item,) + items
+ self._items = items = (item,) + items
def func(obj):
return tuple(obj[i] for i in items)
self._call = func
@@ -266,6 +285,14 @@ class itemgetter:
def __call__(self, obj):
return self._call(obj)
+ def __repr__(self):
+ return '%s.%s(%s)' % (self.__class__.__module__,
+ self.__class__.__name__,
+ ', '.join(map(repr, self._items)))
+
+ def __reduce__(self):
+ return self.__class__, self._items
+
class methodcaller:
"""
Return a callable object that calls the given method on its operand.
@@ -273,6 +300,7 @@ class methodcaller:
After g = methodcaller('name', 'date', foo=1), the call g(r) returns
r.name('date', foo=1).
"""
+ __slots__ = ('_name', '_args', '_kwargs')
def __init__(*args, **kwargs):
if len(args) < 2:
@@ -280,12 +308,30 @@ class methodcaller:
raise TypeError(msg)
self = args[0]
self._name = args[1]
+ if not isinstance(self._name, str):
+ raise TypeError('method name must be a string')
self._args = args[2:]
self._kwargs = kwargs
def __call__(self, obj):
return getattr(obj, self._name)(*self._args, **self._kwargs)
+ def __repr__(self):
+ args = [repr(self._name)]
+ args.extend(map(repr, self._args))
+ args.extend('%s=%r' % (k, v) for k, v in self._kwargs.items())
+ return '%s.%s(%s)' % (self.__class__.__module__,
+ self.__class__.__name__,
+ ', '.join(args))
+
+ def __reduce__(self):
+ if not self._kwargs:
+ return self.__class__, (self._name,) + self._args
+ else:
+ from functools import partial
+ return partial(self.__class__, self._name, **self._kwargs), self._args
+
+
# In-place Operations *********************************************************#
def iadd(a, b):
@@ -326,6 +372,11 @@ def imul(a, b):
a *= b
return a
+def imatmul(a, b):
+ "Same as a @= b."
+ a @= b
+ return a
+
def ior(a, b):
"Same as a |= b."
a |= b
@@ -383,6 +434,7 @@ __invert__ = invert
__lshift__ = lshift
__mod__ = mod
__mul__ = mul
+__matmul__ = matmul
__neg__ = neg
__or__ = or_
__pos__ = pos
@@ -403,6 +455,7 @@ __ifloordiv__ = ifloordiv
__ilshift__ = ilshift
__imod__ = imod
__imul__ = imul
+__imatmul__ = imatmul
__ior__ = ior
__ipow__ = ipow
__irshift__ = irshift
diff --git a/Lib/optparse.py b/Lib/optparse.py
index 432a2eb9b6..74b3b36995 100644
--- a/Lib/optparse.py
+++ b/Lib/optparse.py
@@ -900,7 +900,7 @@ class OptionContainer:
_short_opt : { string : Option }
dictionary mapping short option strings, eg. "-f" or "-X",
to the Option instances that implement them. If an Option
- has multiple short option strings, it will appears in this
+ has multiple short option strings, it will appear in this
dictionary multiple times. [1]
_long_opt : { string : Option }
dictionary mapping long option strings, eg. "--file" or
@@ -1361,7 +1361,7 @@ class OptionParser (OptionContainer):
sys.argv[1:]). Any errors result in a call to 'error()', which
by default prints the usage message to stderr and calls
sys.exit() with an error message. On success returns a pair
- (values, args) where 'values' is an Values instance (with all
+ (values, args) where 'values' is a Values instance (with all
your option values) and 'args' is the list of arguments left
over after parsing options.
"""
diff --git a/Lib/os.py b/Lib/os.py
index 27b241ae97..b4c651d24d 100644
--- a/Lib/os.py
+++ b/Lib/os.py
@@ -61,6 +61,10 @@ if 'posix' in _names:
except ImportError:
pass
+ import posix
+ __all__.extend(_get_exports_list(posix))
+ del posix
+
elif 'nt' in _names:
name = 'nt'
linesep = '\r\n'
@@ -321,7 +325,7 @@ def walk(top, topdown=True, onerror=None, followlinks=False):
the value of topdown, the list of subdirectories is retrieved before the
tuples for the directory and its subdirectories are generated.
- By default errors from the os.listdir() call are ignored. If
+ By default errors from the os.scandir() call are ignored. If
optional arg 'onerror' is specified, it should be a function; it
will be called with one argument, an OSError instance. It can
report the error to continue with the walk, or raise the exception
@@ -350,7 +354,8 @@ def walk(top, topdown=True, onerror=None, followlinks=False):
"""
- islink, join, isdir = path.islink, path.join, path.isdir
+ dirs = []
+ nondirs = []
# We may not have read permission for top, in which case we can't
# get a list of the files the directory contains. os.walk
@@ -358,30 +363,115 @@ def walk(top, topdown=True, onerror=None, followlinks=False):
# minor reason when (say) a thousand readable directories are still
# left to visit. That logic is copied here.
try:
- # Note that listdir is global in this module due
- # to earlier import-*.
- names = listdir(top)
- except OSError as err:
+ if name == 'nt' and isinstance(top, bytes):
+ scandir_it = _dummy_scandir(top)
+ else:
+ # Note that scandir is global in this module due
+ # to earlier import-*.
+ scandir_it = scandir(top)
+ entries = list(scandir_it)
+ except OSError as error:
if onerror is not None:
- onerror(err)
+ onerror(error)
return
- dirs, nondirs = [], []
- for name in names:
- if isdir(join(top, name)):
- dirs.append(name)
+ for entry in entries:
+ try:
+ is_dir = entry.is_dir()
+ except OSError:
+ # If is_dir() raises an OSError, consider that the entry is not
+ # a directory, same behaviour than os.path.isdir().
+ is_dir = False
+
+ if is_dir:
+ dirs.append(entry.name)
else:
- nondirs.append(name)
+ nondirs.append(entry.name)
+ if not topdown and is_dir:
+ # Bottom-up: recurse into sub-directory, but exclude symlinks to
+ # directories if followlinks is False
+ if followlinks:
+ walk_into = True
+ else:
+ try:
+ is_symlink = entry.is_symlink()
+ except OSError:
+ # If is_symlink() raises an OSError, consider that the
+ # entry is not a symbolic link, same behaviour than
+ # os.path.islink().
+ is_symlink = False
+ walk_into = not is_symlink
+
+ if walk_into:
+ yield from walk(entry.path, topdown, onerror, followlinks)
+
+ # Yield before recursion if going top down
if topdown:
yield top, dirs, nondirs
- for name in dirs:
- new_path = join(top, name)
- if followlinks or not islink(new_path):
- yield from walk(new_path, topdown, onerror, followlinks)
- if not topdown:
+
+ # Recurse into sub-directories
+ islink, join = path.islink, path.join
+ for dirname in dirs:
+ new_path = join(top, dirname)
+ # Issue #23605: os.path.islink() is used instead of caching
+ # entry.is_symlink() result during the loop on os.scandir() because
+ # the caller can replace the directory entry during the "yield"
+ # above.
+ if followlinks or not islink(new_path):
+ yield from walk(new_path, topdown, onerror, followlinks)
+ else:
+ # Yield after recursion if going bottom up
yield top, dirs, nondirs
+class _DummyDirEntry:
+ """Dummy implementation of DirEntry
+
+ Only used internally by os.walk(bytes). Since os.walk() doesn't need the
+ follow_symlinks parameter: don't implement it, always follow symbolic
+ links.
+ """
+
+ def __init__(self, dir, name):
+ self.name = name
+ self.path = path.join(dir, name)
+ # Mimick FindFirstFile/FindNextFile: we should get file attributes
+ # while iterating on a directory
+ self._stat = None
+ self._lstat = None
+ try:
+ self.stat(follow_symlinks=False)
+ except OSError:
+ pass
+
+ def stat(self, *, follow_symlinks=True):
+ if follow_symlinks:
+ if self._stat is None:
+ self._stat = stat(self.path)
+ return self._stat
+ else:
+ if self._lstat is None:
+ self._lstat = stat(self.path, follow_symlinks=False)
+ return self._lstat
+
+ def is_dir(self):
+ if self._lstat is not None and not self.is_symlink():
+ # use the cache lstat
+ stat = self.stat(follow_symlinks=False)
+ return st.S_ISDIR(stat.st_mode)
+
+ stat = self.stat()
+ return st.S_ISDIR(stat.st_mode)
+
+ def is_symlink(self):
+ stat = self.stat(follow_symlinks=False)
+ return st.S_ISLNK(stat.st_mode)
+
+def _dummy_scandir(dir):
+ # listdir-based implementation for bytes patches on Windows
+ for name in listdir(dir):
+ yield _DummyDirEntry(dir, name)
+
__all__.append("walk")
if {open, stat} <= supports_dir_fd and {listdir, stat} <= supports_fd:
@@ -466,7 +556,7 @@ if {open, stat} <= supports_dir_fd and {listdir, stat} <= supports_fd:
except OSError as err:
if onerror is not None:
onerror(err)
- return
+ continue
try:
if follow_symlinks or path.samestat(orig_st, stat(dirfd)):
dirpath = path.join(toppath, name)
diff --git a/Lib/pathlib.py b/Lib/pathlib.py
index 4fa872d620..1480e2fc71 100644
--- a/Lib/pathlib.py
+++ b/Lib/pathlib.py
@@ -225,6 +225,36 @@ class _WindowsFlavour(_Flavour):
# It's a path on a network drive => 'file://host/share/a/b'
return 'file:' + urlquote_from_bytes(path.as_posix().encode('utf-8'))
+ def gethomedir(self, username):
+ if 'HOME' in os.environ:
+ userhome = os.environ['HOME']
+ elif 'USERPROFILE' in os.environ:
+ userhome = os.environ['USERPROFILE']
+ elif 'HOMEPATH' in os.environ:
+ try:
+ drv = os.environ['HOMEDRIVE']
+ except KeyError:
+ drv = ''
+ userhome = drv + os.environ['HOMEPATH']
+ else:
+ raise RuntimeError("Can't determine home directory")
+
+ if username:
+ # Try to guess user home directory. By default all users
+ # directories are located in the same place and are named by
+ # corresponding usernames. If current user home directory points
+ # to nonstandard place, this guess is likely wrong.
+ if os.environ['USERNAME'] != username:
+ drv, root, parts = self.parse_parts((userhome,))
+ if parts[-1] != os.environ['USERNAME']:
+ raise RuntimeError("Can't determine home directory "
+ "for %r" % username)
+ parts[-1] = username
+ if drv or root:
+ userhome = drv + root + self.join(parts[1:])
+ else:
+ userhome = self.join(parts)
+ return userhome
class _PosixFlavour(_Flavour):
sep = '/'
@@ -308,6 +338,21 @@ class _PosixFlavour(_Flavour):
bpath = bytes(path)
return 'file://' + urlquote_from_bytes(bpath)
+ def gethomedir(self, username):
+ if not username:
+ try:
+ return os.environ['HOME']
+ except KeyError:
+ import pwd
+ return pwd.getpwuid(os.getuid()).pw_dir
+ else:
+ import pwd
+ try:
+ return pwd.getpwnam(username).pw_dir
+ except KeyError:
+ raise RuntimeError("Can't determine home directory "
+ "for %r" % username)
+
_windows_flavour = _WindowsFlavour()
_posix_flavour = _PosixFlavour()
@@ -629,7 +674,7 @@ class PurePath(object):
return cls._flavour.join(parts)
def _init(self):
- # Overriden in concrete Path
+ # Overridden in concrete Path
pass
def _make_child(self, args):
@@ -977,6 +1022,24 @@ class Path(PurePath):
"""
return cls(os.getcwd())
+ @classmethod
+ def home(cls):
+ """Return a new path pointing to the user's home directory (as
+ returned by os.path.expanduser('~')).
+ """
+ return cls(cls()._flavour.gethomedir(None))
+
+ def samefile(self, other_path):
+ """Return whether other_path is the same or not as this file
+ (as returned by os.path.samefile()).
+ """
+ st = self.stat()
+ try:
+ other_st = other_path.stat()
+ except AttributeError:
+ other_st = os.stat(other_path)
+ return os.path.samestat(st, other_st)
+
def iterdir(self):
"""Iterate over the files in this directory. Does not yield any
result for the special paths '.' and '..'.
@@ -995,6 +1058,8 @@ class Path(PurePath):
"""Iterate over this subtree and yield all existing files (of any
kind, including directories) matching the given pattern.
"""
+ if not pattern:
+ raise ValueError("Unacceptable pattern: {!r}".format(pattern))
pattern = self._flavour.casefold(pattern)
drv, root, pattern_parts = self._flavour.parse_parts((pattern,))
if drv or root:
@@ -1085,6 +1150,39 @@ class Path(PurePath):
return io.open(str(self), mode, buffering, encoding, errors, newline,
opener=self._opener)
+ def read_bytes(self):
+ """
+ Open the file in bytes mode, read it, and close the file.
+ """
+ with self.open(mode='rb') as f:
+ return f.read()
+
+ def read_text(self, encoding=None, errors=None):
+ """
+ Open the file in text mode, read it, and close the file.
+ """
+ with self.open(mode='r', encoding=encoding, errors=errors) as f:
+ return f.read()
+
+ def write_bytes(self, data):
+ """
+ Open the file in bytes mode, write to it, and close the file.
+ """
+ # type-check for the buffer interface before truncating the file
+ view = memoryview(data)
+ with self.open(mode='wb') as f:
+ return f.write(view)
+
+ def write_text(self, data, encoding=None, errors=None):
+ """
+ Open the file in text mode, write to it, and close the file.
+ """
+ if not isinstance(data, str):
+ raise TypeError('data must be str, not %s' %
+ data.__class__.__name__)
+ with self.open(mode='w', encoding=encoding, errors=errors) as f:
+ return f.write(data)
+
def touch(self, mode=0o666, exist_ok=True):
"""
Create this file with the given access mode, if it doesn't exist.
@@ -1108,14 +1206,21 @@ class Path(PurePath):
fd = self._raw_open(flags, mode)
os.close(fd)
- def mkdir(self, mode=0o777, parents=False):
+ def mkdir(self, mode=0o777, parents=False, exist_ok=False):
if self._closed:
self._raise_closed()
if not parents:
- self._accessor.mkdir(self, mode)
+ try:
+ self._accessor.mkdir(self, mode)
+ except FileExistsError:
+ if not exist_ok or not self.is_dir():
+ raise
else:
try:
self._accessor.mkdir(self, mode)
+ except FileExistsError:
+ if not exist_ok or not self.is_dir():
+ raise
except OSError as e:
if e.errno != ENOENT:
raise
@@ -1296,9 +1401,26 @@ class Path(PurePath):
# (see https://bitbucket.org/pitrou/pathlib/issue/12/)
return False
+ def expanduser(self):
+ """ Return a new path with expanded ~ and ~user constructs
+ (as returned by os.path.expanduser)
+ """
+ if (not (self._drv or self._root) and
+ self._parts and self._parts[0][:1] == '~'):
+ homedir = self._flavour.gethomedir(self._parts[0][1:])
+ return self._from_parts([homedir] + self._parts[1:])
+
+ return self
+
class PosixPath(Path, PurePosixPath):
__slots__ = ()
class WindowsPath(Path, PureWindowsPath):
__slots__ = ()
+
+ def owner(self):
+ raise NotImplementedError("Path.owner() is unsupported on this system")
+
+ def group(self):
+ raise NotImplementedError("Path.group() is unsupported on this system")
diff --git a/Lib/pdb.py b/Lib/pdb.py
index 7d58c2ab43..b11ac0abd1 100755
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -52,7 +52,7 @@ If a file ".pdbrc" exists in your home directory or in the current
directory, it is read in and executed as if it had been typed at the
debugger prompt. This is particularly useful for aliases. If both
files exist, the one in the home directory is read first and aliases
-defined there can be overriden by the local file.
+defined there can be overridden by the local file.
Aside from aliases, the debugger is not directly programmable; but it
is implemented as a class from which you can derive your own debugger
@@ -300,7 +300,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
# An 'Internal StopIteration' exception is an exception debug event
# issued by the interpreter when handling a subgenerator run with
- # 'yield from' or a generator controled by a for loop. No exception has
+ # 'yield from' or a generator controlled by a for loop. No exception has
# actually occurred in this case. The debugger uses this debug event to
# stop when the debuggee is returning from such generators.
prefix = 'Internal ' if (not exc_traceback
@@ -1316,7 +1316,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
return
# Is it a class?
if value.__class__ is type:
- self.message('Class %s.%s' % (value.__module__, value.__name__))
+ self.message('Class %s.%s' % (value.__module__, value.__qualname__))
return
# None of the above...
self.message(type(value))
diff --git a/Lib/pickle.py b/Lib/pickle.py
index 3b139844c4..7760425e76 100644
--- a/Lib/pickle.py
+++ b/Lib/pickle.py
@@ -258,24 +258,20 @@ class _Unframer:
# Tools used for pickling.
-def _getattribute(obj, name, allow_qualname=False):
- dotted_path = name.split(".")
- if not allow_qualname and len(dotted_path) > 1:
- raise AttributeError("Can't get qualified attribute {!r} on {!r}; " +
- "use protocols >= 4 to enable support"
- .format(name, obj))
- for subpath in dotted_path:
+def _getattribute(obj, name):
+ for subpath in name.split('.'):
if subpath == '<locals>':
raise AttributeError("Can't get local attribute {!r} on {!r}"
.format(name, obj))
try:
+ parent = obj
obj = getattr(obj, subpath)
except AttributeError:
raise AttributeError("Can't get attribute {!r} on {!r}"
.format(name, obj))
- return obj
+ return obj, parent
-def whichmodule(obj, name, allow_qualname=False):
+def whichmodule(obj, name):
"""Find the module an object belong to."""
module_name = getattr(obj, '__module__', None)
if module_name is not None:
@@ -286,7 +282,7 @@ def whichmodule(obj, name, allow_qualname=False):
if module_name == '__main__' or module is None:
continue
try:
- if _getattribute(module, name, allow_qualname) is obj:
+ if _getattribute(module, name)[0] is obj:
return module_name
except AttributeError:
pass
@@ -899,16 +895,16 @@ class _Pickler:
write = self.write
memo = self.memo
- if name is None and self.proto >= 4:
+ if name is None:
name = getattr(obj, '__qualname__', None)
if name is None:
name = obj.__name__
- module_name = whichmodule(obj, name, allow_qualname=self.proto >= 4)
+ module_name = whichmodule(obj, name)
try:
__import__(module_name, level=0)
module = sys.modules[module_name]
- obj2 = _getattribute(module, name, allow_qualname=self.proto >= 4)
+ obj2, parent = _getattribute(module, name)
except (ImportError, KeyError, AttributeError):
raise PicklingError(
"Can't pickle %r: it's not found as %s.%s" %
@@ -930,11 +926,16 @@ class _Pickler:
else:
write(EXT4 + pack("<i", code))
return
+ lastname = name.rpartition('.')[2]
+ if parent is module:
+ name = lastname
# Non-ASCII identifiers are supported only with protocols >= 3.
if self.proto >= 4:
self.save(module_name)
self.save(name)
write(STACK_GLOBAL)
+ elif parent is not module:
+ self.save_reduce(getattr, (parent, lastname))
elif self.proto >= 3:
write(GLOBAL + bytes(module_name, "utf-8") + b'\n' +
bytes(name, "utf-8") + b'\n')
@@ -994,7 +995,7 @@ class _Unpickler:
meets this interface.
Optional keyword arguments are *fix_imports*, *encoding* and
- *errors*, which are used to control compatiblity support for
+ *errors*, which are used to control compatibility support for
pickle stream generated by Python 2. If *fix_imports* is True,
pickle will try to map the old Python 2 names to the new names
used in Python 3. The *encoding* and *errors* tell pickle how
@@ -1381,8 +1382,10 @@ class _Unpickler:
elif module in _compat_pickle.IMPORT_MAPPING:
module = _compat_pickle.IMPORT_MAPPING[module]
__import__(module, level=0)
- return _getattribute(sys.modules[module], name,
- allow_qualname=self.proto >= 4)
+ if self.proto >= 4:
+ return _getattribute(sys.modules[module], name)[0]
+ else:
+ return getattr(sys.modules[module], name)
def load_reduce(self):
stack = self.stack
diff --git a/Lib/pickletools.py b/Lib/pickletools.py
index cf5df4158a..16ae7d56b9 100644
--- a/Lib/pickletools.py
+++ b/Lib/pickletools.py
@@ -590,7 +590,7 @@ bytes8 = ArgumentDescriptor(
reader=read_bytes8,
doc="""A counted bytes string.
- The first argument is a 8-byte little-endian unsigned int giving
+ The first argument is an 8-byte little-endian unsigned int giving
the number of bytes, and the second argument is that many bytes.
""")
@@ -734,7 +734,7 @@ unicodestring8 = ArgumentDescriptor(
reader=read_unicodestring8,
doc="""A counted Unicode string.
- The first argument is a 8-byte little-endian signed int
+ The first argument is an 8-byte little-endian signed int
giving the number of bytes in the string, and the second
argument-- the UTF-8 encoding of the Unicode string --
contains that many bytes.
@@ -1330,7 +1330,7 @@ opcodes = [
proto=4,
doc="""Push a Python bytes object.
- There are two arguments: the first is a 8-byte unsigned int giving
+ There are two arguments: the first is an 8-byte unsigned int giving
the number of bytes in the string, and the second is that many bytes,
which are taken literally as the string content.
"""),
@@ -1417,7 +1417,7 @@ opcodes = [
proto=4,
doc="""Push a Python Unicode string object.
- There are two arguments: the first is a 8-byte little-endian signed int
+ There are two arguments: the first is an 8-byte little-endian signed int
giving the number of bytes in the string. The second is that many
bytes, and is the UTF-8 encoding of the Unicode string.
"""),
@@ -2793,7 +2793,7 @@ def _test():
return doctest.testmod()
if __name__ == "__main__":
- import sys, argparse
+ import argparse
parser = argparse.ArgumentParser(
description='disassemble one or more pickle files')
parser.add_argument(
diff --git a/Lib/pkgutil.py b/Lib/pkgutil.py
index a54e9474d5..fc4a074f5b 100644
--- a/Lib/pkgutil.py
+++ b/Lib/pkgutil.py
@@ -616,7 +616,7 @@ def get_data(package, resource):
return None
# XXX needs test
mod = (sys.modules.get(package) or
- importlib._bootstrap._SpecMethods(spec).load())
+ importlib._bootstrap._load(spec))
if mod is None or not hasattr(mod, '__file__'):
return None
diff --git a/Lib/platform.py b/Lib/platform.py
index ad425a16c1..d58494c5d9 100755
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -116,6 +116,8 @@ __version__ = '1.0.7'
import collections
import sys, os, re, subprocess
+import warnings
+
### Globals & Constants
# Determine the platform's /dev/null device
@@ -165,40 +167,39 @@ def libc_ver(executable=sys.executable, lib='', version='',
# here to work around problems with Cygwin not being
# able to open symlinks for reading
executable = os.path.realpath(executable)
- f = open(executable, 'rb')
- binary = f.read(chunksize)
- pos = 0
- while 1:
- if b'libc' in binary or b'GLIBC' in binary:
- m = _libc_search.search(binary, pos)
- else:
- m = None
- if not m:
- binary = f.read(chunksize)
- if not binary:
- break
- pos = 0
- continue
- libcinit, glibc, glibcversion, so, threads, soversion = [
- s.decode('latin1') if s is not None else s
- for s in m.groups()]
- if libcinit and not lib:
- lib = 'libc'
- elif glibc:
- if lib != 'glibc':
- lib = 'glibc'
- version = glibcversion
- elif glibcversion > version:
- version = glibcversion
- elif so:
- if lib != 'glibc':
+ with open(executable, 'rb') as f:
+ binary = f.read(chunksize)
+ pos = 0
+ while 1:
+ if b'libc' in binary or b'GLIBC' in binary:
+ m = _libc_search.search(binary, pos)
+ else:
+ m = None
+ if not m:
+ binary = f.read(chunksize)
+ if not binary:
+ break
+ pos = 0
+ continue
+ libcinit, glibc, glibcversion, so, threads, soversion = [
+ s.decode('latin1') if s is not None else s
+ for s in m.groups()]
+ if libcinit and not lib:
lib = 'libc'
- if soversion and soversion > version:
- version = soversion
- if threads and version[-len(threads):] != threads:
- version = version + threads
- pos = m.end()
- f.close()
+ elif glibc:
+ if lib != 'glibc':
+ lib = 'glibc'
+ version = glibcversion
+ elif glibcversion > version:
+ version = glibcversion
+ elif so:
+ if lib != 'glibc':
+ lib = 'libc'
+ if soversion and soversion > version:
+ version = soversion
+ if threads and version[-len(threads):] != threads:
+ version = version + threads
+ pos = m.end()
return lib, version
def _dist_try_harder(distname, version, id):
@@ -300,6 +301,14 @@ def linux_distribution(distname='', version='', id='',
supported_dists=_supported_dists,
full_distribution_name=1):
+ import warnings
+ warnings.warn("dist() and linux_distribution() functions are deprecated "
+ "in Python 3.5", PendingDeprecationWarning, stacklevel=2)
+ return _linux_distribution(distname, version, id, supported_dists,
+ full_distribution_name)
+
+def _linux_distribution(distname, version, id, supported_dists,
+ full_distribution_name):
""" Tries to determine the name of the Linux OS distribution name.
@@ -366,9 +375,12 @@ def dist(distname='', version='', id='',
args given as parameters.
"""
- return linux_distribution(distname, version, id,
- supported_dists=supported_dists,
- full_distribution_name=0)
+ import warnings
+ warnings.warn("dist() and linux_distribution() functions are deprecated "
+ "in Python 3.5", PendingDeprecationWarning, stacklevel=2)
+ return _linux_distribution(distname, version, id,
+ supported_dists=supported_dists,
+ full_distribution_name=0)
def popen(cmd, mode='r', bufsize=-1):
@@ -428,7 +440,7 @@ def _syscmd_ver(system='', release='', version='',
# Try some common cmd strings
for cmd in ('ver', 'command /c ver', 'cmd /c ver'):
try:
- pipe = popen(cmd)
+ pipe = os.popen(cmd)
info = pipe.read()
if pipe.close():
raise OSError('command failed')
@@ -574,7 +586,7 @@ def win32_ver(release='', version='', csd='', ptype=''):
csd = 'SP' + csd[13:]
# VER_NT_SERVER = 3
- if getattr(winver, 'product_type', None) == 3:
+ if getattr(winver, 'product', None) == 3:
release = (_WIN32_SERVER_RELEASES.get((maj, min)) or
_WIN32_SERVER_RELEASES.get((maj, None)) or
release)
@@ -1134,9 +1146,11 @@ def processor():
### Various APIs for extracting information from sys.version
_sys_version_parser = re.compile(
- r'([\w.+]+)\s*'
- '\(#?([^,]+),\s*([\w ]+),\s*([\w :]+)\)\s*'
- '\[([^\]]+)\]?', re.ASCII)
+ r'([\w.+]+)\s*' # "version<space>"
+ r'\(#?([^,]+)' # "(#buildno"
+ r'(?:,\s*([\w ]*)' # ", builddate"
+ r'(?:,\s*([\w :]*))?)?\)\s*' # ", buildtime)<space>"
+ r'\[([^\]]+)\]?', re.ASCII) # "[compiler]"
_ironpython_sys_version_parser = re.compile(
r'IronPython\s*'
@@ -1215,6 +1229,8 @@ def _sys_version(sys_version=None):
'failed to parse Jython sys.version: %s' %
repr(sys_version))
version, buildno, builddate, buildtime, _ = match.groups()
+ if builddate is None:
+ builddate = ''
compiler = sys.platform
elif "PyPy" in sys_version:
@@ -1237,7 +1253,10 @@ def _sys_version(sys_version=None):
version, buildno, builddate, buildtime, compiler = \
match.groups()
name = 'CPython'
- builddate = builddate + ' ' + buildtime
+ if builddate is None:
+ builddate = ''
+ elif buildtime:
+ builddate = builddate + ' ' + buildtime
if hasattr(sys, '_mercurial'):
_, branch, revision = sys._mercurial
@@ -1381,7 +1400,15 @@ def platform(aliased=0, terse=0):
elif system in ('Linux',):
# Linux based systems
- distname, distversion, distid = dist('')
+ with warnings.catch_warnings():
+ # see issue #1322 for more information
+ warnings.filterwarnings(
+ 'ignore',
+ 'dist\(\) and linux_distribution\(\) '
+ 'functions are deprecated .*',
+ PendingDeprecationWarning,
+ )
+ distname, distversion, distid = dist('')
if distname and not terse:
platform = _platform(system, release, machine, processor,
'with',
diff --git a/Lib/plistlib.py b/Lib/plistlib.py
index b9946fd313..b66639ca9e 100644
--- a/Lib/plistlib.py
+++ b/Lib/plistlib.py
@@ -225,10 +225,10 @@ class Data:
def __eq__(self, other):
if isinstance(other, self.__class__):
return self.data == other.data
- elif isinstance(other, str):
+ elif isinstance(other, bytes):
return self.data == other
else:
- return id(self) == id(other)
+ return NotImplemented
def __repr__(self):
return "%s(%s)" % (self.__class__.__name__, repr(self.data))
@@ -685,7 +685,7 @@ class _BinaryPlistParser:
f = struct.unpack('>d', self._fp.read(8))[0]
# timestamp 0 of binary plists corresponds to 1/1/2001
# (year of Mac OS X 10.0), instead of 1/1/1970.
- return datetime.datetime.utcfromtimestamp(f + (31 * 365 + 8) * 86400)
+ return datetime.datetime(2001, 1, 1) + datetime.timedelta(seconds=f)
elif tokenH == 0x40: # data
s = self._get_size(tokenL)
diff --git a/Lib/poplib.py b/Lib/poplib.py
index 4915628b03..f6723904e8 100644
--- a/Lib/poplib.py
+++ b/Lib/poplib.py
@@ -71,6 +71,7 @@ class POP3:
UIDL [msg] uidl(msg = None)
CAPA capa()
STLS stls()
+ UTF8 utf8()
Raises one exception: 'error_proto'.
@@ -348,6 +349,12 @@ class POP3:
return self._longcmd('UIDL')
+ def utf8(self):
+ """Try to enter UTF-8 mode (see RFC 6856). Returns server response.
+ """
+ return self._shortcmd('UTF8')
+
+
def capa(self):
"""Return server capabilities (RFC 2449) as a dictionary
>>> c=poplib.POP3('localhost')
diff --git a/Lib/posixpath.py b/Lib/posixpath.py
index 0aa53feac2..7bb4d5957b 100644
--- a/Lib/posixpath.py
+++ b/Lib/posixpath.py
@@ -22,7 +22,8 @@ __all__ = ["normcase","isabs","join","splitdrive","split","splitext",
"ismount", "expanduser","expandvars","normpath","abspath",
"samefile","sameopenfile","samestat",
"curdir","pardir","sep","pathsep","defpath","altsep","extsep",
- "devnull","realpath","supports_unicode_filenames","relpath"]
+ "devnull","realpath","supports_unicode_filenames","relpath",
+ "commonpath"]
# Strings representing various path-related bits and pieces.
# These are primarily for export; internally, they are hardcoded.
@@ -75,6 +76,8 @@ def join(a, *p):
sep = _get_sep(a)
path = a
try:
+ if not p:
+ path[:0] + sep #23780: Ensure compatible data type even if p is null.
for b in p:
if b.startswith(sep):
path = b
@@ -82,11 +85,8 @@ def join(a, *p):
path += b
else:
path += sep + b
- except TypeError:
- if all(isinstance(s, (str, bytes)) for s in (a,) + p):
- # Must have a mixture of text and binary data
- raise TypeError("Can't mix strings and bytes in path "
- "components") from None
+ except (TypeError, AttributeError, BytesWarning):
+ genericpath._check_arg_types('join', a, *p)
raise
return path
@@ -372,7 +372,7 @@ symbolic links encountered in the path."""
path, ok = _joinrealpath(filename[:0], filename, {})
return abspath(path)
-# Join two paths, normalizing ang eliminating any symbolic links
+# Join two paths, normalizing and eliminating any symbolic links
# encountered in the second path.
def _joinrealpath(path, rest, seen):
if isinstance(path, bytes):
@@ -445,13 +445,58 @@ def relpath(path, start=None):
if start is None:
start = curdir
- start_list = [x for x in abspath(start).split(sep) if x]
- path_list = [x for x in abspath(path).split(sep) if x]
+ try:
+ start_list = [x for x in abspath(start).split(sep) if x]
+ path_list = [x for x in abspath(path).split(sep) if x]
+ # Work out how much of the filepath is shared by start and path.
+ i = len(commonprefix([start_list, path_list]))
+
+ rel_list = [pardir] * (len(start_list)-i) + path_list[i:]
+ if not rel_list:
+ return curdir
+ return join(*rel_list)
+ except (TypeError, AttributeError, BytesWarning, DeprecationWarning):
+ genericpath._check_arg_types('relpath', path, start)
+ raise
+
+
+# Return the longest common sub-path of the sequence of paths given as input.
+# The paths are not normalized before comparing them (this is the
+# responsibility of the caller). Any trailing separator is stripped from the
+# returned path.
- # Work out how much of the filepath is shared by start and path.
- i = len(commonprefix([start_list, path_list]))
+def commonpath(paths):
+ """Given a sequence of path names, returns the longest common sub-path."""
- rel_list = [pardir] * (len(start_list)-i) + path_list[i:]
- if not rel_list:
- return curdir
- return join(*rel_list)
+ if not paths:
+ raise ValueError('commonpath() arg is an empty sequence')
+
+ if isinstance(paths[0], bytes):
+ sep = b'/'
+ curdir = b'.'
+ else:
+ sep = '/'
+ curdir = '.'
+
+ try:
+ split_paths = [path.split(sep) for path in paths]
+
+ try:
+ isabs, = set(p[:1] == sep for p in paths)
+ except ValueError:
+ raise ValueError("Can't mix absolute and relative paths") from None
+
+ split_paths = [[c for c in s if c and c != curdir] for s in split_paths]
+ s1 = min(split_paths)
+ s2 = max(split_paths)
+ common = s1
+ for i, c in enumerate(s1):
+ if c != s2[i]:
+ common = s1[:i]
+ break
+
+ prefix = sep if isabs else sep[:0]
+ return prefix + sep.join(common)
+ except (TypeError, AttributeError):
+ genericpath._check_arg_types('commonpath', *paths)
+ raise
diff --git a/Lib/pprint.py b/Lib/pprint.py
index 2cbffed5d8..bcf2eedebe 100644
--- a/Lib/pprint.py
+++ b/Lib/pprint.py
@@ -34,9 +34,10 @@ saferepr()
"""
+import collections as _collections
import re
import sys as _sys
-from collections import OrderedDict as _OrderedDict
+import types as _types
from io import StringIO as _StringIO
__all__ = ["pprint","pformat","isreadable","isrecursive","saferepr",
@@ -71,7 +72,7 @@ def isrecursive(object):
class _safe_key:
"""Helper function for key functions when sorting unorderable objects.
- The wrapped-object will fallback to an Py2.x style comparison for
+ The wrapped-object will fallback to a Py2.x style comparison for
unorderable types (sorting first comparing the type name and then by
the obj ids). Does not work recursively, so dict.items() must have
_safe_key applied to both the key and the value.
@@ -85,14 +86,10 @@ class _safe_key:
def __lt__(self, other):
try:
- rv = self.obj.__lt__(other.obj)
+ return self.obj < other.obj
except TypeError:
- rv = NotImplemented
-
- if rv is NotImplemented:
- rv = (str(type(self.obj)), id(self.obj)) < \
- (str(type(other.obj)), id(other.obj))
- return rv
+ return ((str(type(self.obj)), id(self.obj)) < \
+ (str(type(other.obj)), id(other.obj)))
def _safe_tuple(t):
"Helper function for comparing 2-tuples"
@@ -123,9 +120,12 @@ class PrettyPrinter:
"""
indent = int(indent)
width = int(width)
- assert indent >= 0, "indent must be >= 0"
- assert depth is None or depth > 0, "depth must be > 0"
- assert width, "width must be != 0"
+ if indent < 0:
+ raise ValueError('indent must be >= 0')
+ if depth is not None and depth <= 0:
+ raise ValueError('depth must be > 0')
+ if not width:
+ raise ValueError('width must be != 0')
self._depth = depth
self._indent_per_level = indent
self._width = width
@@ -152,133 +152,223 @@ class PrettyPrinter:
return readable and not recursive
def _format(self, object, stream, indent, allowance, context, level):
- level = level + 1
objid = id(object)
if objid in context:
stream.write(_recursion(object))
self._recursive = True
self._readable = False
return
- rep = self._repr(object, context, level - 1)
- typ = type(object)
- max_width = self._width - 1 - indent - allowance
- sepLines = len(rep) > max_width
- write = stream.write
-
- if sepLines:
- r = getattr(typ, "__repr__", None)
- if issubclass(typ, dict):
- write('{')
- if self._indent_per_level > 1:
- write((self._indent_per_level - 1) * ' ')
- length = len(object)
- if length:
- context[objid] = 1
- indent = indent + self._indent_per_level
- if issubclass(typ, _OrderedDict):
- items = list(object.items())
- else:
- items = sorted(object.items(), key=_safe_tuple)
- key, ent = items[0]
- rep = self._repr(key, context, level)
- write(rep)
- write(': ')
- self._format(ent, stream, indent + len(rep) + 2,
- allowance + 1, context, level)
- if length > 1:
- for key, ent in items[1:]:
- rep = self._repr(key, context, level)
- write(',\n%s%s: ' % (' '*indent, rep))
- self._format(ent, stream, indent + len(rep) + 2,
- allowance + 1, context, level)
- indent = indent - self._indent_per_level
- del context[objid]
- write('}')
+ rep = self._repr(object, context, level)
+ max_width = self._width - indent - allowance
+ if len(rep) > max_width:
+ p = self._dispatch.get(type(object).__repr__, None)
+ if p is not None:
+ context[objid] = 1
+ p(self, object, stream, indent, allowance, context, level + 1)
+ del context[objid]
return
-
- if ((issubclass(typ, list) and r is list.__repr__) or
- (issubclass(typ, tuple) and r is tuple.__repr__) or
- (issubclass(typ, set) and r is set.__repr__) or
- (issubclass(typ, frozenset) and r is frozenset.__repr__)
- ):
- length = len(object)
- if issubclass(typ, list):
- write('[')
- endchar = ']'
- elif issubclass(typ, tuple):
- write('(')
- endchar = ')'
- else:
- if not length:
- write(rep)
- return
- if typ is set:
- write('{')
- endchar = '}'
- else:
- write(typ.__name__)
- write('({')
- endchar = '})'
- indent += len(typ.__name__) + 1
- object = sorted(object, key=_safe_key)
- if self._indent_per_level > 1:
- write((self._indent_per_level - 1) * ' ')
- if length:
- context[objid] = 1
- self._format_items(object, stream,
- indent + self._indent_per_level,
- allowance + 1, context, level)
- del context[objid]
- if issubclass(typ, tuple) and length == 1:
- write(',')
- write(endchar)
+ elif isinstance(object, dict):
+ context[objid] = 1
+ self._pprint_dict(object, stream, indent, allowance,
+ context, level + 1)
+ del context[objid]
return
+ stream.write(rep)
- if issubclass(typ, str) and len(object) > 0 and r is str.__repr__:
- chunks = []
- lines = object.splitlines(True)
- if level == 1:
- indent += 1
- max_width -= 2
- for i, line in enumerate(lines):
- rep = repr(line)
- if len(rep) <= max_width:
- chunks.append(rep)
- else:
- # A list of alternating (non-space, space) strings
- parts = re.split(r'(\s+)', line) + ['']
- current = ''
- for i in range(0, len(parts), 2):
- part = parts[i] + parts[i+1]
- candidate = current + part
- if len(repr(candidate)) > max_width:
- if current:
- chunks.append(repr(current))
- current = part
- else:
- current = candidate
+ _dispatch = {}
+
+ def _pprint_dict(self, object, stream, indent, allowance, context, level):
+ write = stream.write
+ write('{')
+ if self._indent_per_level > 1:
+ write((self._indent_per_level - 1) * ' ')
+ length = len(object)
+ if length:
+ items = sorted(object.items(), key=_safe_tuple)
+ self._format_dict_items(items, stream, indent, allowance + 1,
+ context, level)
+ write('}')
+
+ _dispatch[dict.__repr__] = _pprint_dict
+
+ def _pprint_ordered_dict(self, object, stream, indent, allowance, context, level):
+ if not len(object):
+ stream.write(repr(object))
+ return
+ cls = object.__class__
+ stream.write(cls.__name__ + '(')
+ self._format(list(object.items()), stream,
+ indent + len(cls.__name__) + 1, allowance + 1,
+ context, level)
+ stream.write(')')
+
+ _dispatch[_collections.OrderedDict.__repr__] = _pprint_ordered_dict
+
+ def _pprint_list(self, object, stream, indent, allowance, context, level):
+ stream.write('[')
+ self._format_items(object, stream, indent, allowance + 1,
+ context, level)
+ stream.write(']')
+
+ _dispatch[list.__repr__] = _pprint_list
+
+ def _pprint_tuple(self, object, stream, indent, allowance, context, level):
+ stream.write('(')
+ endchar = ',)' if len(object) == 1 else ')'
+ self._format_items(object, stream, indent, allowance + len(endchar),
+ context, level)
+ stream.write(endchar)
+
+ _dispatch[tuple.__repr__] = _pprint_tuple
+
+ def _pprint_set(self, object, stream, indent, allowance, context, level):
+ if not len(object):
+ stream.write(repr(object))
+ return
+ typ = object.__class__
+ if typ is set:
+ stream.write('{')
+ endchar = '}'
+ else:
+ stream.write(typ.__name__ + '({')
+ endchar = '})'
+ indent += len(typ.__name__) + 1
+ object = sorted(object, key=_safe_key)
+ self._format_items(object, stream, indent, allowance + len(endchar),
+ context, level)
+ stream.write(endchar)
+
+ _dispatch[set.__repr__] = _pprint_set
+ _dispatch[frozenset.__repr__] = _pprint_set
+
+ def _pprint_str(self, object, stream, indent, allowance, context, level):
+ write = stream.write
+ if not len(object):
+ write(repr(object))
+ return
+ chunks = []
+ lines = object.splitlines(True)
+ if level == 1:
+ indent += 1
+ allowance += 1
+ max_width1 = max_width = self._width - indent
+ for i, line in enumerate(lines):
+ rep = repr(line)
+ if i == len(lines) - 1:
+ max_width1 -= allowance
+ if len(rep) <= max_width1:
+ chunks.append(rep)
+ else:
+ # A list of alternating (non-space, space) strings
+ parts = re.findall(r'\S*\s*', line)
+ assert parts
+ assert not parts[-1]
+ parts.pop() # drop empty last part
+ max_width2 = max_width
+ current = ''
+ for j, part in enumerate(parts):
+ candidate = current + part
+ if j == len(parts) - 1 and i == len(lines) - 1:
+ max_width2 -= allowance
+ if len(repr(candidate)) > max_width2:
if current:
chunks.append(repr(current))
- if len(chunks) == 1:
- write(rep)
- return
- if level == 1:
- write('(')
- for i, rep in enumerate(chunks):
- if i > 0:
- write('\n' + ' '*indent)
- write(rep)
- if level == 1:
- write(')')
- return
- write(rep)
+ current = part
+ else:
+ current = candidate
+ if current:
+ chunks.append(repr(current))
+ if len(chunks) == 1:
+ write(rep)
+ return
+ if level == 1:
+ write('(')
+ for i, rep in enumerate(chunks):
+ if i > 0:
+ write('\n' + ' '*indent)
+ write(rep)
+ if level == 1:
+ write(')')
+
+ _dispatch[str.__repr__] = _pprint_str
+
+ def _pprint_bytes(self, object, stream, indent, allowance, context, level):
+ write = stream.write
+ if len(object) <= 4:
+ write(repr(object))
+ return
+ parens = level == 1
+ if parens:
+ indent += 1
+ allowance += 1
+ write('(')
+ delim = ''
+ for rep in _wrap_bytes_repr(object, self._width - indent, allowance):
+ write(delim)
+ write(rep)
+ if not delim:
+ delim = '\n' + ' '*indent
+ if parens:
+ write(')')
+
+ _dispatch[bytes.__repr__] = _pprint_bytes
+
+ def _pprint_bytearray(self, object, stream, indent, allowance, context, level):
+ write = stream.write
+ write('bytearray(')
+ self._pprint_bytes(bytes(object), stream, indent + 10,
+ allowance + 1, context, level + 1)
+ write(')')
+
+ _dispatch[bytearray.__repr__] = _pprint_bytearray
+
+ def _pprint_mappingproxy(self, object, stream, indent, allowance, context, level):
+ stream.write('mappingproxy(')
+ self._format(object.copy(), stream, indent + 13, allowance + 1,
+ context, level)
+ stream.write(')')
+
+ _dispatch[_types.MappingProxyType.__repr__] = _pprint_mappingproxy
+
+ def _format_dict_items(self, items, stream, indent, allowance, context,
+ level):
+ write = stream.write
+ indent += self._indent_per_level
+ delimnl = ',\n' + ' ' * indent
+ last_index = len(items) - 1
+ for i, (key, ent) in enumerate(items):
+ last = i == last_index
+ rep = self._repr(key, context, level)
+ write(rep)
+ write(': ')
+ self._format(ent, stream, indent + len(rep) + 2,
+ allowance if last else 1,
+ context, level)
+ if not last:
+ write(delimnl)
def _format_items(self, items, stream, indent, allowance, context, level):
write = stream.write
+ indent += self._indent_per_level
+ if self._indent_per_level > 1:
+ write((self._indent_per_level - 1) * ' ')
delimnl = ',\n' + ' ' * indent
delim = ''
- width = max_width = self._width - indent - allowance + 2
- for ent in items:
+ width = max_width = self._width - indent + 1
+ it = iter(items)
+ try:
+ next_ent = next(it)
+ except StopIteration:
+ return
+ last = False
+ while not last:
+ ent = next_ent
+ try:
+ next_ent = next(it)
+ except StopIteration:
+ last = True
+ max_width -= allowance
+ width -= allowance
if self._compact:
rep = self._repr(ent, context, level)
w = len(rep) + 2
@@ -294,7 +384,9 @@ class PrettyPrinter:
continue
write(delim)
delim = delimnl
- self._format(ent, stream, indent, allowance, context, level)
+ self._format(ent, stream, indent,
+ allowance if last else 1,
+ context, level)
def _repr(self, object, context, level):
repr, readable, recursive = self.format(object, context.copy(),
@@ -312,29 +404,93 @@ class PrettyPrinter:
"""
return _safe_repr(object, context, maxlevels, level)
+ def _pprint_default_dict(self, object, stream, indent, allowance, context, level):
+ if not len(object):
+ stream.write(repr(object))
+ return
+ rdf = self._repr(object.default_factory, context, level)
+ cls = object.__class__
+ indent += len(cls.__name__) + 1
+ stream.write('%s(%s,\n%s' % (cls.__name__, rdf, ' ' * indent))
+ self._pprint_dict(object, stream, indent, allowance + 1, context, level)
+ stream.write(')')
+
+ _dispatch[_collections.defaultdict.__repr__] = _pprint_default_dict
+
+ def _pprint_counter(self, object, stream, indent, allowance, context, level):
+ if not len(object):
+ stream.write(repr(object))
+ return
+ cls = object.__class__
+ stream.write(cls.__name__ + '({')
+ if self._indent_per_level > 1:
+ stream.write((self._indent_per_level - 1) * ' ')
+ items = object.most_common()
+ self._format_dict_items(items, stream,
+ indent + len(cls.__name__) + 1, allowance + 2,
+ context, level)
+ stream.write('})')
+
+ _dispatch[_collections.Counter.__repr__] = _pprint_counter
+
+ def _pprint_chain_map(self, object, stream, indent, allowance, context, level):
+ if not len(object.maps):
+ stream.write(repr(object))
+ return
+ cls = object.__class__
+ stream.write(cls.__name__ + '(')
+ indent += len(cls.__name__) + 1
+ for i, m in enumerate(object.maps):
+ if i == len(object.maps) - 1:
+ self._format(m, stream, indent, allowance + 1, context, level)
+ stream.write(')')
+ else:
+ self._format(m, stream, indent, 1, context, level)
+ stream.write(',\n' + ' ' * indent)
+
+ _dispatch[_collections.ChainMap.__repr__] = _pprint_chain_map
+
+ def _pprint_deque(self, object, stream, indent, allowance, context, level):
+ if not len(object):
+ stream.write(repr(object))
+ return
+ cls = object.__class__
+ stream.write(cls.__name__ + '(')
+ indent += len(cls.__name__) + 1
+ stream.write('[')
+ if object.maxlen is None:
+ self._format_items(object, stream, indent, allowance + 2,
+ context, level)
+ stream.write('])')
+ else:
+ self._format_items(object, stream, indent, 2,
+ context, level)
+ rml = self._repr(object.maxlen, context, level)
+ stream.write('],\n%smaxlen=%s)' % (' ' * indent, rml))
+
+ _dispatch[_collections.deque.__repr__] = _pprint_deque
+
+ def _pprint_user_dict(self, object, stream, indent, allowance, context, level):
+ self._format(object.data, stream, indent, allowance, context, level - 1)
+
+ _dispatch[_collections.UserDict.__repr__] = _pprint_user_dict
+
+ def _pprint_user_list(self, object, stream, indent, allowance, context, level):
+ self._format(object.data, stream, indent, allowance, context, level - 1)
+
+ _dispatch[_collections.UserList.__repr__] = _pprint_user_list
+
+ def _pprint_user_string(self, object, stream, indent, allowance, context, level):
+ self._format(object.data, stream, indent, allowance, context, level - 1)
+
+ _dispatch[_collections.UserString.__repr__] = _pprint_user_string
# Return triple (repr_string, isreadable, isrecursive).
def _safe_repr(object, context, maxlevels, level):
typ = type(object)
- if typ is str:
- if 'locale' not in _sys.modules:
- return repr(object), True, False
- if "'" in object and '"' not in object:
- closure = '"'
- quotes = {'"': '\\"'}
- else:
- closure = "'"
- quotes = {"'": "\\'"}
- qget = quotes.get
- sio = _StringIO()
- write = sio.write
- for char in object:
- if char.isalpha():
- write(char)
- else:
- write(qget(char, repr(char)[1:-1]))
- return ("%s%s%s" % (closure, sio.getvalue(), closure)), True, False
+ if typ in _builtin_scalars:
+ return repr(object), True, False
r = getattr(typ, "__repr__", None)
if issubclass(typ, dict) and r is dict.__repr__:
@@ -399,6 +555,8 @@ def _safe_repr(object, context, maxlevels, level):
rep = repr(object)
return rep, (rep and not rep.startswith('<')), False
+_builtin_scalars = frozenset({str, bytes, bytearray, int, float, complex,
+ bool, type(None)})
def _recursion(object):
return ("<Recursion on %s with id=%s>"
@@ -418,5 +576,22 @@ def _perfcheck(object=None):
print("_safe_repr:", t2 - t1)
print("pformat:", t3 - t2)
+def _wrap_bytes_repr(object, width, allowance):
+ current = b''
+ last = len(object) // 4 * 4
+ for i in range(0, len(object), 4):
+ part = object[i: i+4]
+ candidate = current + part
+ if i == last:
+ width -= allowance
+ if len(repr(candidate)) > width:
+ if current:
+ yield repr(current)
+ current = part
+ else:
+ current = candidate
+ if current:
+ yield repr(current)
+
if __name__ == "__main__":
_perfcheck()
diff --git a/Lib/py_compile.py b/Lib/py_compile.py
index f65eeaf620..11c5b505cc 100644
--- a/Lib/py_compile.py
+++ b/Lib/py_compile.py
@@ -1,9 +1,9 @@
-"""Routine to "compile" a .py file to a .pyc (or .pyo) file.
+"""Routine to "compile" a .py file to a .pyc file.
This module has intimate knowledge of the format of .pyc files.
"""
-import importlib._bootstrap
+import importlib._bootstrap_external
import importlib.machinery
import importlib.util
import os
@@ -67,7 +67,7 @@ def compile(file, cfile=None, dfile=None, doraise=False, optimize=-1):
:param file: The source file name.
:param cfile: The target byte compiled file name. When not given, this
- defaults to the PEP 3147 location.
+ defaults to the PEP 3147/PEP 488 location.
:param dfile: Purported file name, i.e. the file name that shows up in
error messages. Defaults to the source file name.
:param doraise: Flag indicating whether or not an exception should be
@@ -85,12 +85,12 @@ def compile(file, cfile=None, dfile=None, doraise=False, optimize=-1):
Note that it isn't necessary to byte-compile Python modules for
execution efficiency -- Python itself byte-compiles a module when
it is loaded, and if it can, writes out the bytecode to the
- corresponding .pyc (or .pyo) file.
+ corresponding .pyc file.
However, if a Python installation is shared between users, it is a
good idea to byte-compile all modules upon installation, since
other users may not be able to write in the source directories,
- and thus they won't be able to write the .pyc/.pyo file, and then
+ and thus they won't be able to write the .pyc file, and then
they would be byte-compiling every module each time it is loaded.
This can slow down program start-up considerably.
@@ -105,8 +105,9 @@ def compile(file, cfile=None, dfile=None, doraise=False, optimize=-1):
"""
if cfile is None:
if optimize >= 0:
+ optimization = optimize if optimize >= 1 else ''
cfile = importlib.util.cache_from_source(file,
- debug_override=not optimize)
+ optimization=optimization)
else:
cfile = importlib.util.cache_from_source(file)
if os.path.islink(cfile):
@@ -136,10 +137,10 @@ def compile(file, cfile=None, dfile=None, doraise=False, optimize=-1):
except FileExistsError:
pass
source_stats = loader.path_stats(file)
- bytecode = importlib._bootstrap._code_to_bytecode(
+ bytecode = importlib._bootstrap_external._code_to_bytecode(
code, source_stats['mtime'], source_stats['size'])
- mode = importlib._bootstrap._calc_mode(file)
- importlib._bootstrap._write_atomic(cfile, bytecode, mode)
+ mode = importlib._bootstrap_external._calc_mode(file)
+ importlib._bootstrap_external._write_atomic(cfile, bytecode, mode)
return cfile
diff --git a/Lib/pyclbr.py b/Lib/pyclbr.py
index dd58ada0aa..4d40b87f16 100644
--- a/Lib/pyclbr.py
+++ b/Lib/pyclbr.py
@@ -142,10 +142,10 @@ def _readmodule(module, path, inpackage=None):
search_path = path + sys.path
# XXX This will change once issue19944 lands.
spec = importlib.util._find_spec_from_path(fullmodule, search_path)
- fname = spec.loader.get_filename(fullmodule)
_modules[fullmodule] = dict
- if spec.loader.is_package(fullmodule):
- dict['__path__'] = [os.path.dirname(fname)]
+ # is module a package?
+ if spec.submodule_search_locations is not None:
+ dict['__path__'] = spec.submodule_search_locations
try:
source = spec.loader.get_source(fullmodule)
if source is None:
@@ -154,6 +154,8 @@ def _readmodule(module, path, inpackage=None):
# not Python source, can't do anything with this module
return dict
+ fname = spec.loader.get_filename(fullmodule)
+
f = io.StringIO(source)
stack = [] # stack of (class, indent) pairs
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index f42299f712..3ca08c9b58 100755
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -53,6 +53,7 @@ Richard Chamberlain, for the first implementation of textdoc.
import builtins
import importlib._bootstrap
+import importlib._bootstrap_external
import importlib.machinery
import importlib.util
import inspect
@@ -213,7 +214,7 @@ def classify_class_attrs(object):
def ispackage(path):
"""Guess whether a path refers to a package directory."""
if os.path.isdir(path):
- for ext in ('.py', '.pyc', '.pyo'):
+ for ext in ('.py', '.pyc'):
if os.path.isfile(os.path.join(path, '__init__' + ext)):
return True
return False
@@ -264,9 +265,8 @@ def synopsis(filename, cache={}):
# XXX We probably don't need to pass in the loader here.
spec = importlib.util.spec_from_file_location('__temp__', filename,
loader=loader)
- _spec = importlib._bootstrap._SpecMethods(spec)
try:
- module = _spec.load()
+ module = importlib._bootstrap._load(spec)
except:
return None
del sys.modules['__temp__']
@@ -293,14 +293,13 @@ def importfile(path):
filename = os.path.basename(path)
name, ext = os.path.splitext(filename)
if is_bytecode:
- loader = importlib._bootstrap.SourcelessFileLoader(name, path)
+ loader = importlib._bootstrap_external.SourcelessFileLoader(name, path)
else:
- loader = importlib._bootstrap.SourceFileLoader(name, path)
+ loader = importlib._bootstrap_external.SourceFileLoader(name, path)
# XXX We probably don't need to pass in the loader here.
spec = importlib.util.spec_from_file_location(name, path, loader=loader)
- _spec = importlib._bootstrap._SpecMethods(spec)
try:
- return _spec.load()
+ return importlib._bootstrap._load(spec)
except:
raise ErrorDuringImport(path, sys.exc_info())
@@ -355,7 +354,7 @@ def safeimport(path, forceload=0, cache={}):
class Doc:
PYTHONDOCS = os.environ.get("PYTHONDOCS",
- "http://docs.python.org/%d.%d/library"
+ "https://docs.python.org/%d.%d/library"
% sys.version_info[:2])
def document(self, object, name=None, *args):
@@ -384,7 +383,9 @@ class Doc:
docmodule = docclass = docroutine = docother = docproperty = docdata = fail
- def getdocloc(self, object):
+ def getdocloc(self, object,
+ basedir=os.path.join(sys.base_exec_prefix, "lib",
+ "python%d.%d" % sys.version_info[:2])):
"""Return the location of module docs or None"""
try:
@@ -394,8 +395,6 @@ class Doc:
docloc = os.environ.get("PYTHONDOCS", self.PYTHONDOCS)
- basedir = os.path.join(sys.base_exec_prefix, "lib",
- "python%d.%d" % sys.version_info[:2])
if (isinstance(object, type(os)) and
(object.__name__ in ('errno', 'exceptions', 'gc', 'imp',
'marshal', 'posix', 'signal', 'sys',
@@ -404,9 +403,9 @@ class Doc:
not file.startswith(os.path.join(basedir, 'site-packages')))) and
object.__name__ not in ('xml.etree', 'test.pydoc_mod')):
if docloc.startswith("http://"):
- docloc = "%s/%s" % (docloc.rstrip("/"), object.__name__)
+ docloc = "%s/%s" % (docloc.rstrip("/"), object.__name__.lower())
else:
- docloc = os.path.join(docloc, object.__name__ + ".html")
+ docloc = os.path.join(docloc, object.__name__.lower() + ".html")
else:
docloc = None
return docloc
@@ -1591,7 +1590,10 @@ def resolve(thing, forceload=0):
if isinstance(thing, str):
object = locate(thing, forceload)
if object is None:
- raise ImportError('no Python documentation found for %r' % thing)
+ raise ImportError('''\
+No Python documentation found for %r.
+Use help() to get the interactive help utility.
+Use help(str) for help on the str class.''' % thing)
return object, thing
else:
name = getattr(thing, '__name__', None)
@@ -1638,9 +1640,8 @@ def writedoc(thing, forceload=0):
try:
object, name = resolve(thing, forceload)
page = html.page(describe(object), html.document(object, name))
- file = open(name + '.html', 'w', encoding='utf-8')
- file.write(page)
- file.close()
+ with open(name + '.html', 'w', encoding='utf-8') as file:
+ file.write(page)
print('wrote', name + '.html')
except (ImportError, ErrorDuringImport) as value:
print(value)
@@ -1835,7 +1836,8 @@ class Helper:
if inspect.stack()[1][3] == '?':
self()
return ''
- return '<pydoc.Helper instance>'
+ return '<%s.%s instance>' % (self.__class__.__module__,
+ self.__class__.__qualname__)
_GoInteractive = object()
def __call__(self, request=_GoInteractive):
@@ -1861,7 +1863,10 @@ has the same effect as typing a particular string at the help> prompt.
break
request = replace(request, '"', '', "'", '').strip()
if request.lower() in ('q', 'quit'): break
- self.help(request)
+ if request == 'help':
+ self.intro()
+ else:
+ self.help(request)
def getline(self, prompt):
"""Read one line, using input() when appropriate."""
@@ -1875,8 +1880,7 @@ has the same effect as typing a particular string at the help> prompt.
def help(self, request):
if type(request) is type(''):
request = request.strip()
- if request == 'help': self.intro()
- elif request == 'keywords': self.listkeywords()
+ if request == 'keywords': self.listkeywords()
elif request == 'symbols': self.listsymbols()
elif request == 'topics': self.listtopics()
elif request == 'modules': self.listmodules()
@@ -1889,6 +1893,7 @@ has the same effect as typing a particular string at the help> prompt.
elif request in self.keywords: self.showtopic(request)
elif request in self.topics: self.showtopic(request)
elif request: doc(request, 'Help on %s:', output=self._output)
+ else: doc(str, 'Help on %s:', output=self._output)
elif isinstance(request, Helper): self()
else: doc(request, 'Help on %s:', output=self._output)
self.output.write('\n')
@@ -2084,9 +2089,8 @@ class ModuleScanner:
else:
path = None
else:
- _spec = importlib._bootstrap._SpecMethods(spec)
try:
- module = _spec.load()
+ module = importlib._bootstrap._load(spec)
except ImportError:
if onerror:
onerror(modname)
diff --git a/Lib/pydoc_data/topics.py b/Lib/pydoc_data/topics.py
index 8c55777306..250bfd331e 100644
--- a/Lib/pydoc_data/topics.py
+++ b/Lib/pydoc_data/topics.py
@@ -1,13 +1,13 @@
# -*- coding: utf-8 -*-
-# Autogenerated by Sphinx on Sat Dec 19 19:27:32 2015
+# Autogenerated by Sphinx on Sat Dec 5 17:02:49 2015
topics = {'assert': u'\nThe "assert" statement\n**********************\n\nAssert statements are a convenient way to insert debugging assertions\ninto a program:\n\n assert_stmt ::= "assert" expression ["," expression]\n\nThe simple form, "assert expression", is equivalent to\n\n if __debug__:\n if not expression: raise AssertionError\n\nThe extended form, "assert expression1, expression2", is equivalent to\n\n if __debug__:\n if not expression1: raise AssertionError(expression2)\n\nThese equivalences assume that "__debug__" and "AssertionError" refer\nto the built-in variables with those names. In the current\nimplementation, the built-in variable "__debug__" is "True" under\nnormal circumstances, "False" when optimization is requested (command\nline option -O). The current code generator emits no code for an\nassert statement when optimization is requested at compile time. Note\nthat it is unnecessary to include the source code for the expression\nthat failed in the error message; it will be displayed as part of the\nstack trace.\n\nAssignments to "__debug__" are illegal. The value for the built-in\nvariable is determined when the interpreter starts.\n',
- 'assignment': u'\nAssignment statements\n*********************\n\nAssignment statements are used to (re)bind names to values and to\nmodify attributes or items of mutable objects:\n\n assignment_stmt ::= (target_list "=")+ (expression_list | yield_expression)\n target_list ::= target ("," target)* [","]\n target ::= identifier\n | "(" target_list ")"\n | "[" target_list "]"\n | attributeref\n | subscription\n | slicing\n | "*" target\n\n(See section *Primaries* for the syntax definitions for\n*attributeref*, *subscription*, and *slicing*.)\n\nAn assignment statement evaluates the expression list (remember that\nthis can be a single expression or a comma-separated list, the latter\nyielding a tuple) and assigns the single resulting object to each of\nthe target lists, from left to right.\n\nAssignment is defined recursively depending on the form of the target\n(list). When a target is part of a mutable object (an attribute\nreference, subscription or slicing), the mutable object must\nultimately perform the assignment and decide about its validity, and\nmay raise an exception if the assignment is unacceptable. The rules\nobserved by various types and the exceptions raised are given with the\ndefinition of the object types (see section *The standard type\nhierarchy*).\n\nAssignment of an object to a target list, optionally enclosed in\nparentheses or square brackets, is recursively defined as follows.\n\n* If the target list is a single target: The object is assigned to\n that target.\n\n* If the target list is a comma-separated list of targets: The\n object must be an iterable with the same number of items as there\n are targets in the target list, and the items are assigned, from\n left to right, to the corresponding targets.\n\n * If the target list contains one target prefixed with an\n asterisk, called a "starred" target: The object must be a sequence\n with at least as many items as there are targets in the target\n list, minus one. The first items of the sequence are assigned,\n from left to right, to the targets before the starred target. The\n final items of the sequence are assigned to the targets after the\n starred target. A list of the remaining items in the sequence is\n then assigned to the starred target (the list can be empty).\n\n * Else: The object must be a sequence with the same number of\n items as there are targets in the target list, and the items are\n assigned, from left to right, to the corresponding targets.\n\nAssignment of an object to a single target is recursively defined as\nfollows.\n\n* If the target is an identifier (name):\n\n * If the name does not occur in a "global" or "nonlocal" statement\n in the current code block: the name is bound to the object in the\n current local namespace.\n\n * Otherwise: the name is bound to the object in the global\n namespace or the outer namespace determined by "nonlocal",\n respectively.\n\n The name is rebound if it was already bound. This may cause the\n reference count for the object previously bound to the name to reach\n zero, causing the object to be deallocated and its destructor (if it\n has one) to be called.\n\n* If the target is a target list enclosed in parentheses or in\n square brackets: The object must be an iterable with the same number\n of items as there are targets in the target list, and its items are\n assigned, from left to right, to the corresponding targets.\n\n* If the target is an attribute reference: The primary expression in\n the reference is evaluated. It should yield an object with\n assignable attributes; if this is not the case, "TypeError" is\n raised. That object is then asked to assign the assigned object to\n the given attribute; if it cannot perform the assignment, it raises\n an exception (usually but not necessarily "AttributeError").\n\n Note: If the object is a class instance and the attribute reference\n occurs on both sides of the assignment operator, the RHS expression,\n "a.x" can access either an instance attribute or (if no instance\n attribute exists) a class attribute. The LHS target "a.x" is always\n set as an instance attribute, creating it if necessary. Thus, the\n two occurrences of "a.x" do not necessarily refer to the same\n attribute: if the RHS expression refers to a class attribute, the\n LHS creates a new instance attribute as the target of the\n assignment:\n\n class Cls:\n x = 3 # class variable\n inst = Cls()\n inst.x = inst.x + 1 # writes inst.x as 4 leaving Cls.x as 3\n\n This description does not necessarily apply to descriptor\n attributes, such as properties created with "property()".\n\n* If the target is a subscription: The primary expression in the\n reference is evaluated. It should yield either a mutable sequence\n object (such as a list) or a mapping object (such as a dictionary).\n Next, the subscript expression is evaluated.\n\n If the primary is a mutable sequence object (such as a list), the\n subscript must yield an integer. If it is negative, the sequence\'s\n length is added to it. The resulting value must be a nonnegative\n integer less than the sequence\'s length, and the sequence is asked\n to assign the assigned object to its item with that index. If the\n index is out of range, "IndexError" is raised (assignment to a\n subscripted sequence cannot add new items to a list).\n\n If the primary is a mapping object (such as a dictionary), the\n subscript must have a type compatible with the mapping\'s key type,\n and the mapping is then asked to create a key/datum pair which maps\n the subscript to the assigned object. This can either replace an\n existing key/value pair with the same key value, or insert a new\n key/value pair (if no key with the same value existed).\n\n For user-defined objects, the "__setitem__()" method is called with\n appropriate arguments.\n\n* If the target is a slicing: The primary expression in the\n reference is evaluated. It should yield a mutable sequence object\n (such as a list). The assigned object should be a sequence object\n of the same type. Next, the lower and upper bound expressions are\n evaluated, insofar they are present; defaults are zero and the\n sequence\'s length. The bounds should evaluate to integers. If\n either bound is negative, the sequence\'s length is added to it. The\n resulting bounds are clipped to lie between zero and the sequence\'s\n length, inclusive. Finally, the sequence object is asked to replace\n the slice with the items of the assigned sequence. The length of\n the slice may be different from the length of the assigned sequence,\n thus changing the length of the target sequence, if the target\n sequence allows it.\n\n**CPython implementation detail:** In the current implementation, the\nsyntax for targets is taken to be the same as for expressions, and\ninvalid syntax is rejected during the code generation phase, causing\nless detailed error messages.\n\nAlthough the definition of assignment implies that overlaps between\nthe left-hand side and the right-hand side are \'simultanenous\' (for\nexample "a, b = b, a" swaps two variables), overlaps *within* the\ncollection of assigned-to variables occur left-to-right, sometimes\nresulting in confusion. For instance, the following program prints\n"[0, 2]":\n\n x = [0, 1]\n i = 0\n i, x[i] = 1, 2 # i is updated, then x[i] is updated\n print(x)\n\nSee also: **PEP 3132** - Extended Iterable Unpacking\n\n The specification for the "*target" feature.\n\n\nAugmented assignment statements\n===============================\n\nAugmented assignment is the combination, in a single statement, of a\nbinary operation and an assignment statement:\n\n augmented_assignment_stmt ::= augtarget augop (expression_list | yield_expression)\n augtarget ::= identifier | attributeref | subscription | slicing\n augop ::= "+=" | "-=" | "*=" | "/=" | "//=" | "%=" | "**="\n | ">>=" | "<<=" | "&=" | "^=" | "|="\n\n(See section *Primaries* for the syntax definitions of the last three\nsymbols.)\n\nAn augmented assignment evaluates the target (which, unlike normal\nassignment statements, cannot be an unpacking) and the expression\nlist, performs the binary operation specific to the type of assignment\non the two operands, and assigns the result to the original target.\nThe target is only evaluated once.\n\nAn augmented assignment expression like "x += 1" can be rewritten as\n"x = x + 1" to achieve a similar, but not exactly equal effect. In the\naugmented version, "x" is only evaluated once. Also, when possible,\nthe actual operation is performed *in-place*, meaning that rather than\ncreating a new object and assigning that to the target, the old object\nis modified instead.\n\nUnlike normal assignments, augmented assignments evaluate the left-\nhand side *before* evaluating the right-hand side. For example, "a[i]\n+= f(x)" first looks-up "a[i]", then it evaluates "f(x)" and performs\nthe addition, and lastly, it writes the result back to "a[i]".\n\nWith the exception of assigning to tuples and multiple targets in a\nsingle statement, the assignment done by augmented assignment\nstatements is handled the same way as normal assignments. Similarly,\nwith the exception of the possible *in-place* behavior, the binary\noperation performed by augmented assignment is the same as the normal\nbinary operations.\n\nFor targets which are attribute references, the same *caveat about\nclass and instance attributes* applies as for regular assignments.\n',
+ 'assignment': u'\nAssignment statements\n*********************\n\nAssignment statements are used to (re)bind names to values and to\nmodify attributes or items of mutable objects:\n\n assignment_stmt ::= (target_list "=")+ (expression_list | yield_expression)\n target_list ::= target ("," target)* [","]\n target ::= identifier\n | "(" target_list ")"\n | "[" target_list "]"\n | attributeref\n | subscription\n | slicing\n | "*" target\n\n(See section *Primaries* for the syntax definitions for\n*attributeref*, *subscription*, and *slicing*.)\n\nAn assignment statement evaluates the expression list (remember that\nthis can be a single expression or a comma-separated list, the latter\nyielding a tuple) and assigns the single resulting object to each of\nthe target lists, from left to right.\n\nAssignment is defined recursively depending on the form of the target\n(list). When a target is part of a mutable object (an attribute\nreference, subscription or slicing), the mutable object must\nultimately perform the assignment and decide about its validity, and\nmay raise an exception if the assignment is unacceptable. The rules\nobserved by various types and the exceptions raised are given with the\ndefinition of the object types (see section *The standard type\nhierarchy*).\n\nAssignment of an object to a target list, optionally enclosed in\nparentheses or square brackets, is recursively defined as follows.\n\n* If the target list is a single target: The object is assigned to\n that target.\n\n* If the target list is a comma-separated list of targets: The\n object must be an iterable with the same number of items as there\n are targets in the target list, and the items are assigned, from\n left to right, to the corresponding targets.\n\n * If the target list contains one target prefixed with an\n asterisk, called a "starred" target: The object must be a sequence\n with at least as many items as there are targets in the target\n list, minus one. The first items of the sequence are assigned,\n from left to right, to the targets before the starred target. The\n final items of the sequence are assigned to the targets after the\n starred target. A list of the remaining items in the sequence is\n then assigned to the starred target (the list can be empty).\n\n * Else: The object must be a sequence with the same number of\n items as there are targets in the target list, and the items are\n assigned, from left to right, to the corresponding targets.\n\nAssignment of an object to a single target is recursively defined as\nfollows.\n\n* If the target is an identifier (name):\n\n * If the name does not occur in a "global" or "nonlocal" statement\n in the current code block: the name is bound to the object in the\n current local namespace.\n\n * Otherwise: the name is bound to the object in the global\n namespace or the outer namespace determined by "nonlocal",\n respectively.\n\n The name is rebound if it was already bound. This may cause the\n reference count for the object previously bound to the name to reach\n zero, causing the object to be deallocated and its destructor (if it\n has one) to be called.\n\n* If the target is a target list enclosed in parentheses or in\n square brackets: The object must be an iterable with the same number\n of items as there are targets in the target list, and its items are\n assigned, from left to right, to the corresponding targets.\n\n* If the target is an attribute reference: The primary expression in\n the reference is evaluated. It should yield an object with\n assignable attributes; if this is not the case, "TypeError" is\n raised. That object is then asked to assign the assigned object to\n the given attribute; if it cannot perform the assignment, it raises\n an exception (usually but not necessarily "AttributeError").\n\n Note: If the object is a class instance and the attribute reference\n occurs on both sides of the assignment operator, the RHS expression,\n "a.x" can access either an instance attribute or (if no instance\n attribute exists) a class attribute. The LHS target "a.x" is always\n set as an instance attribute, creating it if necessary. Thus, the\n two occurrences of "a.x" do not necessarily refer to the same\n attribute: if the RHS expression refers to a class attribute, the\n LHS creates a new instance attribute as the target of the\n assignment:\n\n class Cls:\n x = 3 # class variable\n inst = Cls()\n inst.x = inst.x + 1 # writes inst.x as 4 leaving Cls.x as 3\n\n This description does not necessarily apply to descriptor\n attributes, such as properties created with "property()".\n\n* If the target is a subscription: The primary expression in the\n reference is evaluated. It should yield either a mutable sequence\n object (such as a list) or a mapping object (such as a dictionary).\n Next, the subscript expression is evaluated.\n\n If the primary is a mutable sequence object (such as a list), the\n subscript must yield an integer. If it is negative, the sequence\'s\n length is added to it. The resulting value must be a nonnegative\n integer less than the sequence\'s length, and the sequence is asked\n to assign the assigned object to its item with that index. If the\n index is out of range, "IndexError" is raised (assignment to a\n subscripted sequence cannot add new items to a list).\n\n If the primary is a mapping object (such as a dictionary), the\n subscript must have a type compatible with the mapping\'s key type,\n and the mapping is then asked to create a key/datum pair which maps\n the subscript to the assigned object. This can either replace an\n existing key/value pair with the same key value, or insert a new\n key/value pair (if no key with the same value existed).\n\n For user-defined objects, the "__setitem__()" method is called with\n appropriate arguments.\n\n* If the target is a slicing: The primary expression in the\n reference is evaluated. It should yield a mutable sequence object\n (such as a list). The assigned object should be a sequence object\n of the same type. Next, the lower and upper bound expressions are\n evaluated, insofar they are present; defaults are zero and the\n sequence\'s length. The bounds should evaluate to integers. If\n either bound is negative, the sequence\'s length is added to it. The\n resulting bounds are clipped to lie between zero and the sequence\'s\n length, inclusive. Finally, the sequence object is asked to replace\n the slice with the items of the assigned sequence. The length of\n the slice may be different from the length of the assigned sequence,\n thus changing the length of the target sequence, if the target\n sequence allows it.\n\n**CPython implementation detail:** In the current implementation, the\nsyntax for targets is taken to be the same as for expressions, and\ninvalid syntax is rejected during the code generation phase, causing\nless detailed error messages.\n\nAlthough the definition of assignment implies that overlaps between\nthe left-hand side and the right-hand side are \'simultanenous\' (for\nexample "a, b = b, a" swaps two variables), overlaps *within* the\ncollection of assigned-to variables occur left-to-right, sometimes\nresulting in confusion. For instance, the following program prints\n"[0, 2]":\n\n x = [0, 1]\n i = 0\n i, x[i] = 1, 2 # i is updated, then x[i] is updated\n print(x)\n\nSee also: **PEP 3132** - Extended Iterable Unpacking\n\n The specification for the "*target" feature.\n\n\nAugmented assignment statements\n===============================\n\nAugmented assignment is the combination, in a single statement, of a\nbinary operation and an assignment statement:\n\n augmented_assignment_stmt ::= augtarget augop (expression_list | yield_expression)\n augtarget ::= identifier | attributeref | subscription | slicing\n augop ::= "+=" | "-=" | "*=" | "@=" | "/=" | "//=" | "%=" | "**="\n | ">>=" | "<<=" | "&=" | "^=" | "|="\n\n(See section *Primaries* for the syntax definitions of the last three\nsymbols.)\n\nAn augmented assignment evaluates the target (which, unlike normal\nassignment statements, cannot be an unpacking) and the expression\nlist, performs the binary operation specific to the type of assignment\non the two operands, and assigns the result to the original target.\nThe target is only evaluated once.\n\nAn augmented assignment expression like "x += 1" can be rewritten as\n"x = x + 1" to achieve a similar, but not exactly equal effect. In the\naugmented version, "x" is only evaluated once. Also, when possible,\nthe actual operation is performed *in-place*, meaning that rather than\ncreating a new object and assigning that to the target, the old object\nis modified instead.\n\nUnlike normal assignments, augmented assignments evaluate the left-\nhand side *before* evaluating the right-hand side. For example, "a[i]\n+= f(x)" first looks-up "a[i]", then it evaluates "f(x)" and performs\nthe addition, and lastly, it writes the result back to "a[i]".\n\nWith the exception of assigning to tuples and multiple targets in a\nsingle statement, the assignment done by augmented assignment\nstatements is handled the same way as normal assignments. Similarly,\nwith the exception of the possible *in-place* behavior, the binary\noperation performed by augmented assignment is the same as the normal\nbinary operations.\n\nFor targets which are attribute references, the same *caveat about\nclass and instance attributes* applies as for regular assignments.\n',
'atom-identifiers': u'\nIdentifiers (Names)\n*******************\n\nAn identifier occurring as an atom is a name. See section\n*Identifiers and keywords* for lexical definition and section *Naming\nand binding* for documentation of naming and binding.\n\nWhen the name is bound to an object, evaluation of the atom yields\nthat object. When a name is not bound, an attempt to evaluate it\nraises a "NameError" exception.\n\n**Private name mangling:** When an identifier that textually occurs in\na class definition begins with two or more underscore characters and\ndoes not end in two or more underscores, it is considered a *private\nname* of that class. Private names are transformed to a longer form\nbefore code is generated for them. The transformation inserts the\nclass name, with leading underscores removed and a single underscore\ninserted, in front of the name. For example, the identifier "__spam"\noccurring in a class named "Ham" will be transformed to "_Ham__spam".\nThis transformation is independent of the syntactical context in which\nthe identifier is used. If the transformed name is extremely long\n(longer than 255 characters), implementation defined truncation may\nhappen. If the class name consists only of underscores, no\ntransformation is done.\n',
'atom-literals': u"\nLiterals\n********\n\nPython supports string and bytes literals and various numeric\nliterals:\n\n literal ::= stringliteral | bytesliteral\n | integer | floatnumber | imagnumber\n\nEvaluation of a literal yields an object of the given type (string,\nbytes, integer, floating point number, complex number) with the given\nvalue. The value may be approximated in the case of floating point\nand imaginary (complex) literals. See section *Literals* for details.\n\nAll literals correspond to immutable data types, and hence the\nobject's identity is less important than its value. Multiple\nevaluations of literals with the same value (either the same\noccurrence in the program text or a different occurrence) may obtain\nthe same object or a different object with the same value.\n",
'attribute-access': u'\nCustomizing attribute access\n****************************\n\nThe following methods can be defined to customize the meaning of\nattribute access (use of, assignment to, or deletion of "x.name") for\nclass instances.\n\nobject.__getattr__(self, name)\n\n Called when an attribute lookup has not found the attribute in the\n usual places (i.e. it is not an instance attribute nor is it found\n in the class tree for "self"). "name" is the attribute name. This\n method should return the (computed) attribute value or raise an\n "AttributeError" exception.\n\n Note that if the attribute is found through the normal mechanism,\n "__getattr__()" is not called. (This is an intentional asymmetry\n between "__getattr__()" and "__setattr__()".) This is done both for\n efficiency reasons and because otherwise "__getattr__()" would have\n no way to access other attributes of the instance. Note that at\n least for instance variables, you can fake total control by not\n inserting any values in the instance attribute dictionary (but\n instead inserting them in another object). See the\n "__getattribute__()" method below for a way to actually get total\n control over attribute access.\n\nobject.__getattribute__(self, name)\n\n Called unconditionally to implement attribute accesses for\n instances of the class. If the class also defines "__getattr__()",\n the latter will not be called unless "__getattribute__()" either\n calls it explicitly or raises an "AttributeError". This method\n should return the (computed) attribute value or raise an\n "AttributeError" exception. In order to avoid infinite recursion in\n this method, its implementation should always call the base class\n method with the same name to access any attributes it needs, for\n example, "object.__getattribute__(self, name)".\n\n Note: This method may still be bypassed when looking up special\n methods as the result of implicit invocation via language syntax\n or built-in functions. See *Special method lookup*.\n\nobject.__setattr__(self, name, value)\n\n Called when an attribute assignment is attempted. This is called\n instead of the normal mechanism (i.e. store the value in the\n instance dictionary). *name* is the attribute name, *value* is the\n value to be assigned to it.\n\n If "__setattr__()" wants to assign to an instance attribute, it\n should call the base class method with the same name, for example,\n "object.__setattr__(self, name, value)".\n\nobject.__delattr__(self, name)\n\n Like "__setattr__()" but for attribute deletion instead of\n assignment. This should only be implemented if "del obj.name" is\n meaningful for the object.\n\nobject.__dir__(self)\n\n Called when "dir()" is called on the object. A sequence must be\n returned. "dir()" converts the returned sequence to a list and\n sorts it.\n\n\nImplementing Descriptors\n========================\n\nThe following methods only apply when an instance of the class\ncontaining the method (a so-called *descriptor* class) appears in an\n*owner* class (the descriptor must be in either the owner\'s class\ndictionary or in the class dictionary for one of its parents). In the\nexamples below, "the attribute" refers to the attribute whose name is\nthe key of the property in the owner class\' "__dict__".\n\nobject.__get__(self, instance, owner)\n\n Called to get the attribute of the owner class (class attribute\n access) or of an instance of that class (instance attribute\n access). *owner* is always the owner class, while *instance* is the\n instance that the attribute was accessed through, or "None" when\n the attribute is accessed through the *owner*. This method should\n return the (computed) attribute value or raise an "AttributeError"\n exception.\n\nobject.__set__(self, instance, value)\n\n Called to set the attribute on an instance *instance* of the owner\n class to a new value, *value*.\n\nobject.__delete__(self, instance)\n\n Called to delete the attribute on an instance *instance* of the\n owner class.\n\nThe attribute "__objclass__" is interpreted by the "inspect" module as\nspecifying the class where this object was defined (setting this\nappropriately can assist in runtime introspection of dynamic class\nattributes). For callables, it may indicate that an instance of the\ngiven type (or a subclass) is expected or required as the first\npositional argument (for example, CPython sets this attribute for\nunbound methods that are implemented in C).\n\n\nInvoking Descriptors\n====================\n\nIn general, a descriptor is an object attribute with "binding\nbehavior", one whose attribute access has been overridden by methods\nin the descriptor protocol: "__get__()", "__set__()", and\n"__delete__()". If any of those methods are defined for an object, it\nis said to be a descriptor.\n\nThe default behavior for attribute access is to get, set, or delete\nthe attribute from an object\'s dictionary. For instance, "a.x" has a\nlookup chain starting with "a.__dict__[\'x\']", then\n"type(a).__dict__[\'x\']", and continuing through the base classes of\n"type(a)" excluding metaclasses.\n\nHowever, if the looked-up value is an object defining one of the\ndescriptor methods, then Python may override the default behavior and\ninvoke the descriptor method instead. Where this occurs in the\nprecedence chain depends on which descriptor methods were defined and\nhow they were called.\n\nThe starting point for descriptor invocation is a binding, "a.x". How\nthe arguments are assembled depends on "a":\n\nDirect Call\n The simplest and least common call is when user code directly\n invokes a descriptor method: "x.__get__(a)".\n\nInstance Binding\n If binding to an object instance, "a.x" is transformed into the\n call: "type(a).__dict__[\'x\'].__get__(a, type(a))".\n\nClass Binding\n If binding to a class, "A.x" is transformed into the call:\n "A.__dict__[\'x\'].__get__(None, A)".\n\nSuper Binding\n If "a" is an instance of "super", then the binding "super(B,\n obj).m()" searches "obj.__class__.__mro__" for the base class "A"\n immediately preceding "B" and then invokes the descriptor with the\n call: "A.__dict__[\'m\'].__get__(obj, obj.__class__)".\n\nFor instance bindings, the precedence of descriptor invocation depends\non the which descriptor methods are defined. A descriptor can define\nany combination of "__get__()", "__set__()" and "__delete__()". If it\ndoes not define "__get__()", then accessing the attribute will return\nthe descriptor object itself unless there is a value in the object\'s\ninstance dictionary. If the descriptor defines "__set__()" and/or\n"__delete__()", it is a data descriptor; if it defines neither, it is\na non-data descriptor. Normally, data descriptors define both\n"__get__()" and "__set__()", while non-data descriptors have just the\n"__get__()" method. Data descriptors with "__set__()" and "__get__()"\ndefined always override a redefinition in an instance dictionary. In\ncontrast, non-data descriptors can be overridden by instances.\n\nPython methods (including "staticmethod()" and "classmethod()") are\nimplemented as non-data descriptors. Accordingly, instances can\nredefine and override methods. This allows individual instances to\nacquire behaviors that differ from other instances of the same class.\n\nThe "property()" function is implemented as a data descriptor.\nAccordingly, instances cannot override the behavior of a property.\n\n\n__slots__\n=========\n\nBy default, instances of classes have a dictionary for attribute\nstorage. This wastes space for objects having very few instance\nvariables. The space consumption can become acute when creating large\nnumbers of instances.\n\nThe default can be overridden by defining *__slots__* in a class\ndefinition. The *__slots__* declaration takes a sequence of instance\nvariables and reserves just enough space in each instance to hold a\nvalue for each variable. Space is saved because *__dict__* is not\ncreated for each instance.\n\nobject.__slots__\n\n This class variable can be assigned a string, iterable, or sequence\n of strings with variable names used by instances. *__slots__*\n reserves space for the declared variables and prevents the\n automatic creation of *__dict__* and *__weakref__* for each\n instance.\n\n\nNotes on using *__slots__*\n--------------------------\n\n* When inheriting from a class without *__slots__*, the *__dict__*\n attribute of that class will always be accessible, so a *__slots__*\n definition in the subclass is meaningless.\n\n* Without a *__dict__* variable, instances cannot be assigned new\n variables not listed in the *__slots__* definition. Attempts to\n assign to an unlisted variable name raises "AttributeError". If\n dynamic assignment of new variables is desired, then add\n "\'__dict__\'" to the sequence of strings in the *__slots__*\n declaration.\n\n* Without a *__weakref__* variable for each instance, classes\n defining *__slots__* do not support weak references to its\n instances. If weak reference support is needed, then add\n "\'__weakref__\'" to the sequence of strings in the *__slots__*\n declaration.\n\n* *__slots__* are implemented at the class level by creating\n descriptors (*Implementing Descriptors*) for each variable name. As\n a result, class attributes cannot be used to set default values for\n instance variables defined by *__slots__*; otherwise, the class\n attribute would overwrite the descriptor assignment.\n\n* The action of a *__slots__* declaration is limited to the class\n where it is defined. As a result, subclasses will have a *__dict__*\n unless they also define *__slots__* (which must only contain names\n of any *additional* slots).\n\n* If a class defines a slot also defined in a base class, the\n instance variable defined by the base class slot is inaccessible\n (except by retrieving its descriptor directly from the base class).\n This renders the meaning of the program undefined. In the future, a\n check may be added to prevent this.\n\n* Nonempty *__slots__* does not work for classes derived from\n "variable-length" built-in types such as "int", "bytes" and "tuple".\n\n* Any non-string iterable may be assigned to *__slots__*. Mappings\n may also be used; however, in the future, special meaning may be\n assigned to the values corresponding to each key.\n\n* *__class__* assignment works only if both classes have the same\n *__slots__*.\n',
'attribute-references': u'\nAttribute references\n********************\n\nAn attribute reference is a primary followed by a period and a name:\n\n attributeref ::= primary "." identifier\n\nThe primary must evaluate to an object of a type that supports\nattribute references, which most objects do. This object is then\nasked to produce the attribute whose name is the identifier. This\nproduction can be customized by overriding the "__getattr__()" method.\nIf this attribute is not available, the exception "AttributeError" is\nraised. Otherwise, the type and value of the object produced is\ndetermined by the object. Multiple evaluations of the same attribute\nreference may yield different objects.\n',
- 'augassign': u'\nAugmented assignment statements\n*******************************\n\nAugmented assignment is the combination, in a single statement, of a\nbinary operation and an assignment statement:\n\n augmented_assignment_stmt ::= augtarget augop (expression_list | yield_expression)\n augtarget ::= identifier | attributeref | subscription | slicing\n augop ::= "+=" | "-=" | "*=" | "/=" | "//=" | "%=" | "**="\n | ">>=" | "<<=" | "&=" | "^=" | "|="\n\n(See section *Primaries* for the syntax definitions of the last three\nsymbols.)\n\nAn augmented assignment evaluates the target (which, unlike normal\nassignment statements, cannot be an unpacking) and the expression\nlist, performs the binary operation specific to the type of assignment\non the two operands, and assigns the result to the original target.\nThe target is only evaluated once.\n\nAn augmented assignment expression like "x += 1" can be rewritten as\n"x = x + 1" to achieve a similar, but not exactly equal effect. In the\naugmented version, "x" is only evaluated once. Also, when possible,\nthe actual operation is performed *in-place*, meaning that rather than\ncreating a new object and assigning that to the target, the old object\nis modified instead.\n\nUnlike normal assignments, augmented assignments evaluate the left-\nhand side *before* evaluating the right-hand side. For example, "a[i]\n+= f(x)" first looks-up "a[i]", then it evaluates "f(x)" and performs\nthe addition, and lastly, it writes the result back to "a[i]".\n\nWith the exception of assigning to tuples and multiple targets in a\nsingle statement, the assignment done by augmented assignment\nstatements is handled the same way as normal assignments. Similarly,\nwith the exception of the possible *in-place* behavior, the binary\noperation performed by augmented assignment is the same as the normal\nbinary operations.\n\nFor targets which are attribute references, the same *caveat about\nclass and instance attributes* applies as for regular assignments.\n',
- 'binary': u'\nBinary arithmetic operations\n****************************\n\nThe binary arithmetic operations have the conventional priority\nlevels. Note that some of these operations also apply to certain non-\nnumeric types. Apart from the power operator, there are only two\nlevels, one for multiplicative operators and one for additive\noperators:\n\n m_expr ::= u_expr | m_expr "*" u_expr | m_expr "//" u_expr | m_expr "/" u_expr\n | m_expr "%" u_expr\n a_expr ::= m_expr | a_expr "+" m_expr | a_expr "-" m_expr\n\nThe "*" (multiplication) operator yields the product of its arguments.\nThe arguments must either both be numbers, or one argument must be an\ninteger and the other must be a sequence. In the former case, the\nnumbers are converted to a common type and then multiplied together.\nIn the latter case, sequence repetition is performed; a negative\nrepetition factor yields an empty sequence.\n\nThe "/" (division) and "//" (floor division) operators yield the\nquotient of their arguments. The numeric arguments are first\nconverted to a common type. Division of integers yields a float, while\nfloor division of integers results in an integer; the result is that\nof mathematical division with the \'floor\' function applied to the\nresult. Division by zero raises the "ZeroDivisionError" exception.\n\nThe "%" (modulo) operator yields the remainder from the division of\nthe first argument by the second. The numeric arguments are first\nconverted to a common type. A zero right argument raises the\n"ZeroDivisionError" exception. The arguments may be floating point\nnumbers, e.g., "3.14%0.7" equals "0.34" (since "3.14" equals "4*0.7 +\n0.34".) The modulo operator always yields a result with the same sign\nas its second operand (or zero); the absolute value of the result is\nstrictly smaller than the absolute value of the second operand [1].\n\nThe floor division and modulo operators are connected by the following\nidentity: "x == (x//y)*y + (x%y)". Floor division and modulo are also\nconnected with the built-in function "divmod()": "divmod(x, y) ==\n(x//y, x%y)". [2].\n\nIn addition to performing the modulo operation on numbers, the "%"\noperator is also overloaded by string objects to perform old-style\nstring formatting (also known as interpolation). The syntax for\nstring formatting is described in the Python Library Reference,\nsection *printf-style String Formatting*.\n\nThe floor division operator, the modulo operator, and the "divmod()"\nfunction are not defined for complex numbers. Instead, convert to a\nfloating point number using the "abs()" function if appropriate.\n\nThe "+" (addition) operator yields the sum of its arguments. The\narguments must either both be numbers or both be sequences of the same\ntype. In the former case, the numbers are converted to a common type\nand then added together. In the latter case, the sequences are\nconcatenated.\n\nThe "-" (subtraction) operator yields the difference of its arguments.\nThe numeric arguments are first converted to a common type.\n',
+ 'augassign': u'\nAugmented assignment statements\n*******************************\n\nAugmented assignment is the combination, in a single statement, of a\nbinary operation and an assignment statement:\n\n augmented_assignment_stmt ::= augtarget augop (expression_list | yield_expression)\n augtarget ::= identifier | attributeref | subscription | slicing\n augop ::= "+=" | "-=" | "*=" | "@=" | "/=" | "//=" | "%=" | "**="\n | ">>=" | "<<=" | "&=" | "^=" | "|="\n\n(See section *Primaries* for the syntax definitions of the last three\nsymbols.)\n\nAn augmented assignment evaluates the target (which, unlike normal\nassignment statements, cannot be an unpacking) and the expression\nlist, performs the binary operation specific to the type of assignment\non the two operands, and assigns the result to the original target.\nThe target is only evaluated once.\n\nAn augmented assignment expression like "x += 1" can be rewritten as\n"x = x + 1" to achieve a similar, but not exactly equal effect. In the\naugmented version, "x" is only evaluated once. Also, when possible,\nthe actual operation is performed *in-place*, meaning that rather than\ncreating a new object and assigning that to the target, the old object\nis modified instead.\n\nUnlike normal assignments, augmented assignments evaluate the left-\nhand side *before* evaluating the right-hand side. For example, "a[i]\n+= f(x)" first looks-up "a[i]", then it evaluates "f(x)" and performs\nthe addition, and lastly, it writes the result back to "a[i]".\n\nWith the exception of assigning to tuples and multiple targets in a\nsingle statement, the assignment done by augmented assignment\nstatements is handled the same way as normal assignments. Similarly,\nwith the exception of the possible *in-place* behavior, the binary\noperation performed by augmented assignment is the same as the normal\nbinary operations.\n\nFor targets which are attribute references, the same *caveat about\nclass and instance attributes* applies as for regular assignments.\n',
+ 'binary': u'\nBinary arithmetic operations\n****************************\n\nThe binary arithmetic operations have the conventional priority\nlevels. Note that some of these operations also apply to certain non-\nnumeric types. Apart from the power operator, there are only two\nlevels, one for multiplicative operators and one for additive\noperators:\n\n m_expr ::= u_expr | m_expr "*" u_expr | m_expr "@" m_expr |\n m_expr "//" u_expr| m_expr "/" u_expr |\n m_expr "%" u_expr\n a_expr ::= m_expr | a_expr "+" m_expr | a_expr "-" m_expr\n\nThe "*" (multiplication) operator yields the product of its arguments.\nThe arguments must either both be numbers, or one argument must be an\ninteger and the other must be a sequence. In the former case, the\nnumbers are converted to a common type and then multiplied together.\nIn the latter case, sequence repetition is performed; a negative\nrepetition factor yields an empty sequence.\n\nThe "@" (at) operator is intended to be used for matrix\nmultiplication. No builtin Python types implement this operator.\n\nNew in version 3.5.\n\nThe "/" (division) and "//" (floor division) operators yield the\nquotient of their arguments. The numeric arguments are first\nconverted to a common type. Division of integers yields a float, while\nfloor division of integers results in an integer; the result is that\nof mathematical division with the \'floor\' function applied to the\nresult. Division by zero raises the "ZeroDivisionError" exception.\n\nThe "%" (modulo) operator yields the remainder from the division of\nthe first argument by the second. The numeric arguments are first\nconverted to a common type. A zero right argument raises the\n"ZeroDivisionError" exception. The arguments may be floating point\nnumbers, e.g., "3.14%0.7" equals "0.34" (since "3.14" equals "4*0.7 +\n0.34".) The modulo operator always yields a result with the same sign\nas its second operand (or zero); the absolute value of the result is\nstrictly smaller than the absolute value of the second operand [1].\n\nThe floor division and modulo operators are connected by the following\nidentity: "x == (x//y)*y + (x%y)". Floor division and modulo are also\nconnected with the built-in function "divmod()": "divmod(x, y) ==\n(x//y, x%y)". [2].\n\nIn addition to performing the modulo operation on numbers, the "%"\noperator is also overloaded by string objects to perform old-style\nstring formatting (also known as interpolation). The syntax for\nstring formatting is described in the Python Library Reference,\nsection *printf-style String Formatting*.\n\nThe floor division operator, the modulo operator, and the "divmod()"\nfunction are not defined for complex numbers. Instead, convert to a\nfloating point number using the "abs()" function if appropriate.\n\nThe "+" (addition) operator yields the sum of its arguments. The\narguments must either both be numbers or both be sequences of the same\ntype. In the former case, the numbers are converted to a common type\nand then added together. In the latter case, the sequences are\nconcatenated.\n\nThe "-" (subtraction) operator yields the difference of its arguments.\nThe numeric arguments are first converted to a common type.\n',
'bitwise': u'\nBinary bitwise operations\n*************************\n\nEach of the three bitwise operations has a different priority level:\n\n and_expr ::= shift_expr | and_expr "&" shift_expr\n xor_expr ::= and_expr | xor_expr "^" and_expr\n or_expr ::= xor_expr | or_expr "|" xor_expr\n\nThe "&" operator yields the bitwise AND of its arguments, which must\nbe integers.\n\nThe "^" operator yields the bitwise XOR (exclusive OR) of its\narguments, which must be integers.\n\nThe "|" operator yields the bitwise (inclusive) OR of its arguments,\nwhich must be integers.\n',
'bltin-code-objects': u'\nCode Objects\n************\n\nCode objects are used by the implementation to represent "pseudo-\ncompiled" executable Python code such as a function body. They differ\nfrom function objects because they don\'t contain a reference to their\nglobal execution environment. Code objects are returned by the built-\nin "compile()" function and can be extracted from function objects\nthrough their "__code__" attribute. See also the "code" module.\n\nA code object can be executed or evaluated by passing it (instead of a\nsource string) to the "exec()" or "eval()" built-in functions.\n\nSee *The standard type hierarchy* for more information.\n',
'bltin-ellipsis-object': u'\nThe Ellipsis Object\n*******************\n\nThis object is commonly used by slicing (see *Slicings*). It supports\nno special operations. There is exactly one ellipsis object, named\n"Ellipsis" (a built-in name). "type(Ellipsis)()" produces the\n"Ellipsis" singleton.\n\nIt is written as "Ellipsis" or "...".\n',
@@ -17,9 +17,9 @@ topics = {'assert': u'\nThe "assert" statement\n**********************\n\nAssert
'break': u'\nThe "break" statement\n*********************\n\n break_stmt ::= "break"\n\n"break" may only occur syntactically nested in a "for" or "while"\nloop, but not nested in a function or class definition within that\nloop.\n\nIt terminates the nearest enclosing loop, skipping the optional "else"\nclause if the loop has one.\n\nIf a "for" loop is terminated by "break", the loop control target\nkeeps its current value.\n\nWhen "break" passes control out of a "try" statement with a "finally"\nclause, that "finally" clause is executed before really leaving the\nloop.\n',
'callable-types': u'\nEmulating callable objects\n**************************\n\nobject.__call__(self[, args...])\n\n Called when the instance is "called" as a function; if this method\n is defined, "x(arg1, arg2, ...)" is a shorthand for\n "x.__call__(arg1, arg2, ...)".\n',
'calls': u'\nCalls\n*****\n\nA call calls a callable object (e.g., a *function*) with a possibly\nempty series of *arguments*:\n\n call ::= primary "(" [argument_list [","] | comprehension] ")"\n argument_list ::= positional_arguments ["," keyword_arguments]\n ["," "*" expression] ["," keyword_arguments]\n ["," "**" expression]\n | keyword_arguments ["," "*" expression]\n ["," keyword_arguments] ["," "**" expression]\n | "*" expression ["," keyword_arguments] ["," "**" expression]\n | "**" expression\n positional_arguments ::= expression ("," expression)*\n keyword_arguments ::= keyword_item ("," keyword_item)*\n keyword_item ::= identifier "=" expression\n\nAn optional trailing comma may be present after the positional and\nkeyword arguments but does not affect the semantics.\n\nThe primary must evaluate to a callable object (user-defined\nfunctions, built-in functions, methods of built-in objects, class\nobjects, methods of class instances, and all objects having a\n"__call__()" method are callable). All argument expressions are\nevaluated before the call is attempted. Please refer to section\n*Function definitions* for the syntax of formal *parameter* lists.\n\nIf keyword arguments are present, they are first converted to\npositional arguments, as follows. First, a list of unfilled slots is\ncreated for the formal parameters. If there are N positional\narguments, they are placed in the first N slots. Next, for each\nkeyword argument, the identifier is used to determine the\ncorresponding slot (if the identifier is the same as the first formal\nparameter name, the first slot is used, and so on). If the slot is\nalready filled, a "TypeError" exception is raised. Otherwise, the\nvalue of the argument is placed in the slot, filling it (even if the\nexpression is "None", it fills the slot). When all arguments have\nbeen processed, the slots that are still unfilled are filled with the\ncorresponding default value from the function definition. (Default\nvalues are calculated, once, when the function is defined; thus, a\nmutable object such as a list or dictionary used as default value will\nbe shared by all calls that don\'t specify an argument value for the\ncorresponding slot; this should usually be avoided.) If there are any\nunfilled slots for which no default value is specified, a "TypeError"\nexception is raised. Otherwise, the list of filled slots is used as\nthe argument list for the call.\n\n**CPython implementation detail:** An implementation may provide\nbuilt-in functions whose positional parameters do not have names, even\nif they are \'named\' for the purpose of documentation, and which\ntherefore cannot be supplied by keyword. In CPython, this is the case\nfor functions implemented in C that use "PyArg_ParseTuple()" to parse\ntheir arguments.\n\nIf there are more positional arguments than there are formal parameter\nslots, a "TypeError" exception is raised, unless a formal parameter\nusing the syntax "*identifier" is present; in this case, that formal\nparameter receives a tuple containing the excess positional arguments\n(or an empty tuple if there were no excess positional arguments).\n\nIf any keyword argument does not correspond to a formal parameter\nname, a "TypeError" exception is raised, unless a formal parameter\nusing the syntax "**identifier" is present; in this case, that formal\nparameter receives a dictionary containing the excess keyword\narguments (using the keywords as keys and the argument values as\ncorresponding values), or a (new) empty dictionary if there were no\nexcess keyword arguments.\n\nIf the syntax "*expression" appears in the function call, "expression"\nmust evaluate to an iterable. Elements from this iterable are treated\nas if they were additional positional arguments; if there are\npositional arguments *x1*, ..., *xN*, and "expression" evaluates to a\nsequence *y1*, ..., *yM*, this is equivalent to a call with M+N\npositional arguments *x1*, ..., *xN*, *y1*, ..., *yM*.\n\nA consequence of this is that although the "*expression" syntax may\nappear *after* some keyword arguments, it is processed *before* the\nkeyword arguments (and the "**expression" argument, if any -- see\nbelow). So:\n\n >>> def f(a, b):\n ... print(a, b)\n ...\n >>> f(b=1, *(2,))\n 2 1\n >>> f(a=1, *(2,))\n Traceback (most recent call last):\n File "<stdin>", line 1, in ?\n TypeError: f() got multiple values for keyword argument \'a\'\n >>> f(1, *(2,))\n 1 2\n\nIt is unusual for both keyword arguments and the "*expression" syntax\nto be used in the same call, so in practice this confusion does not\narise.\n\nIf the syntax "**expression" appears in the function call,\n"expression" must evaluate to a mapping, the contents of which are\ntreated as additional keyword arguments. In the case of a keyword\nappearing in both "expression" and as an explicit keyword argument, a\n"TypeError" exception is raised.\n\nFormal parameters using the syntax "*identifier" or "**identifier"\ncannot be used as positional argument slots or as keyword argument\nnames.\n\nA call always returns some value, possibly "None", unless it raises an\nexception. How this value is computed depends on the type of the\ncallable object.\n\nIf it is---\n\na user-defined function:\n The code block for the function is executed, passing it the\n argument list. The first thing the code block will do is bind the\n formal parameters to the arguments; this is described in section\n *Function definitions*. When the code block executes a "return"\n statement, this specifies the return value of the function call.\n\na built-in function or method:\n The result is up to the interpreter; see *Built-in Functions* for\n the descriptions of built-in functions and methods.\n\na class object:\n A new instance of that class is returned.\n\na class instance method:\n The corresponding user-defined function is called, with an argument\n list that is one longer than the argument list of the call: the\n instance becomes the first argument.\n\na class instance:\n The class must define a "__call__()" method; the effect is then the\n same as if that method was called.\n',
- 'class': u'\nClass definitions\n*****************\n\nA class definition defines a class object (see section *The standard\ntype hierarchy*):\n\n classdef ::= [decorators] "class" classname [inheritance] ":" suite\n inheritance ::= "(" [parameter_list] ")"\n classname ::= identifier\n\nA class definition is an executable statement. The inheritance list\nusually gives a list of base classes (see *Customizing class creation*\nfor more advanced uses), so each item in the list should evaluate to a\nclass object which allows subclassing. Classes without an inheritance\nlist inherit, by default, from the base class "object"; hence,\n\n class Foo:\n pass\n\nis equivalent to\n\n class Foo(object):\n pass\n\nThe class\'s suite is then executed in a new execution frame (see\n*Naming and binding*), using a newly created local namespace and the\noriginal global namespace. (Usually, the suite contains mostly\nfunction definitions.) When the class\'s suite finishes execution, its\nexecution frame is discarded but its local namespace is saved. [4] A\nclass object is then created using the inheritance list for the base\nclasses and the saved local namespace for the attribute dictionary.\nThe class name is bound to this class object in the original local\nnamespace.\n\nClass creation can be customized heavily using *metaclasses*.\n\nClasses can also be decorated: just like when decorating functions,\n\n @f1(arg)\n @f2\n class Foo: pass\n\nis equivalent to\n\n class Foo: pass\n Foo = f1(arg)(f2(Foo))\n\nThe evaluation rules for the decorator expressions are the same as for\nfunction decorators. The result must be a class object, which is then\nbound to the class name.\n\n**Programmer\'s note:** Variables defined in the class definition are\nclass attributes; they are shared by instances. Instance attributes\ncan be set in a method with "self.name = value". Both class and\ninstance attributes are accessible through the notation ""self.name"",\nand an instance attribute hides a class attribute with the same name\nwhen accessed in this way. Class attributes can be used as defaults\nfor instance attributes, but using mutable values there can lead to\nunexpected results. *Descriptors* can be used to create instance\nvariables with different implementation details.\n\nSee also: **PEP 3115** - Metaclasses in Python 3 **PEP 3129** -\n Class Decorators\n\n-[ Footnotes ]-\n\n[1] The exception is propagated to the invocation stack unless\n there is a "finally" clause which happens to raise another\n exception. That new exception causes the old one to be lost.\n\n[2] Currently, control "flows off the end" except in the case of\n an exception or the execution of a "return", "continue", or\n "break" statement.\n\n[3] A string literal appearing as the first statement in the\n function body is transformed into the function\'s "__doc__"\n attribute and therefore the function\'s *docstring*.\n\n[4] A string literal appearing as the first statement in the class\n body is transformed into the namespace\'s "__doc__" item and\n therefore the class\'s *docstring*.\n',
+ 'class': u'\nClass definitions\n*****************\n\nA class definition defines a class object (see section *The standard\ntype hierarchy*):\n\n classdef ::= [decorators] "class" classname [inheritance] ":" suite\n inheritance ::= "(" [parameter_list] ")"\n classname ::= identifier\n\nA class definition is an executable statement. The inheritance list\nusually gives a list of base classes (see *Customizing class creation*\nfor more advanced uses), so each item in the list should evaluate to a\nclass object which allows subclassing. Classes without an inheritance\nlist inherit, by default, from the base class "object"; hence,\n\n class Foo:\n pass\n\nis equivalent to\n\n class Foo(object):\n pass\n\nThe class\'s suite is then executed in a new execution frame (see\n*Naming and binding*), using a newly created local namespace and the\noriginal global namespace. (Usually, the suite contains mostly\nfunction definitions.) When the class\'s suite finishes execution, its\nexecution frame is discarded but its local namespace is saved. [4] A\nclass object is then created using the inheritance list for the base\nclasses and the saved local namespace for the attribute dictionary.\nThe class name is bound to this class object in the original local\nnamespace.\n\nClass creation can be customized heavily using *metaclasses*.\n\nClasses can also be decorated: just like when decorating functions,\n\n @f1(arg)\n @f2\n class Foo: pass\n\nis equivalent to\n\n class Foo: pass\n Foo = f1(arg)(f2(Foo))\n\nThe evaluation rules for the decorator expressions are the same as for\nfunction decorators. The result must be a class object, which is then\nbound to the class name.\n\n**Programmer\'s note:** Variables defined in the class definition are\nclass attributes; they are shared by instances. Instance attributes\ncan be set in a method with "self.name = value". Both class and\ninstance attributes are accessible through the notation ""self.name"",\nand an instance attribute hides a class attribute with the same name\nwhen accessed in this way. Class attributes can be used as defaults\nfor instance attributes, but using mutable values there can lead to\nunexpected results. *Descriptors* can be used to create instance\nvariables with different implementation details.\n\nSee also: **PEP 3115** - Metaclasses in Python 3 **PEP 3129** -\n Class Decorators\n',
'comparisons': u'\nComparisons\n***********\n\nUnlike C, all comparison operations in Python have the same priority,\nwhich is lower than that of any arithmetic, shifting or bitwise\noperation. Also unlike C, expressions like "a < b < c" have the\ninterpretation that is conventional in mathematics:\n\n comparison ::= or_expr ( comp_operator or_expr )*\n comp_operator ::= "<" | ">" | "==" | ">=" | "<=" | "!="\n | "is" ["not"] | ["not"] "in"\n\nComparisons yield boolean values: "True" or "False".\n\nComparisons can be chained arbitrarily, e.g., "x < y <= z" is\nequivalent to "x < y and y <= z", except that "y" is evaluated only\nonce (but in both cases "z" is not evaluated at all when "x < y" is\nfound to be false).\n\nFormally, if *a*, *b*, *c*, ..., *y*, *z* are expressions and *op1*,\n*op2*, ..., *opN* are comparison operators, then "a op1 b op2 c ... y\nopN z" is equivalent to "a op1 b and b op2 c and ... y opN z", except\nthat each expression is evaluated at most once.\n\nNote that "a op1 b op2 c" doesn\'t imply any kind of comparison between\n*a* and *c*, so that, e.g., "x < y > z" is perfectly legal (though\nperhaps not pretty).\n\n\nValue comparisons\n=================\n\nThe operators "<", ">", "==", ">=", "<=", and "!=" compare the values\nof two objects. The objects do not need to have the same type.\n\nChapter *Objects, values and types* states that objects have a value\n(in addition to type and identity). The value of an object is a\nrather abstract notion in Python: For example, there is no canonical\naccess method for an object\'s value. Also, there is no requirement\nthat the value of an object should be constructed in a particular way,\ne.g. comprised of all its data attributes. Comparison operators\nimplement a particular notion of what the value of an object is. One\ncan think of them as defining the value of an object indirectly, by\nmeans of their comparison implementation.\n\nBecause all types are (direct or indirect) subtypes of "object", they\ninherit the default comparison behavior from "object". Types can\ncustomize their comparison behavior by implementing *rich comparison\nmethods* like "__lt__()", described in *Basic customization*.\n\nThe default behavior for equality comparison ("==" and "!=") is based\non the identity of the objects. Hence, equality comparison of\ninstances with the same identity results in equality, and equality\ncomparison of instances with different identities results in\ninequality. A motivation for this default behavior is the desire that\nall objects should be reflexive (i.e. "x is y" implies "x == y").\n\nA default order comparison ("<", ">", "<=", and ">=") is not provided;\nan attempt raises "TypeError". A motivation for this default behavior\nis the lack of a similar invariant as for equality.\n\nThe behavior of the default equality comparison, that instances with\ndifferent identities are always unequal, may be in contrast to what\ntypes will need that have a sensible definition of object value and\nvalue-based equality. Such types will need to customize their\ncomparison behavior, and in fact, a number of built-in types have done\nthat.\n\nThe following list describes the comparison behavior of the most\nimportant built-in types.\n\n* Numbers of built-in numeric types (*Numeric Types --- int, float,\n complex*) and of the standard library types "fractions.Fraction" and\n "decimal.Decimal" can be compared within and across their types,\n with the restriction that complex numbers do not support order\n comparison. Within the limits of the types involved, they compare\n mathematically (algorithmically) correct without loss of precision.\n\n The not-a-number values "float(\'NaN\')" and "Decimal(\'NaN\')" are\n special. They are identical to themselves ("x is x" is true) but\n are not equal to themselves ("x == x" is false). Additionally,\n comparing any number to a not-a-number value will return "False".\n For example, both "3 < float(\'NaN\')" and "float(\'NaN\') < 3" will\n return "False".\n\n* Binary sequences (instances of "bytes" or "bytearray") can be\n compared within and across their types. They compare\n lexicographically using the numeric values of their elements.\n\n* Strings (instances of "str") compare lexicographically using the\n numerical Unicode code points (the result of the built-in function\n "ord()") of their characters. [3]\n\n Strings and binary sequences cannot be directly compared.\n\n* Sequences (instances of "tuple", "list", or "range") can be\n compared only within each of their types, with the restriction that\n ranges do not support order comparison. Equality comparison across\n these types results in unequality, and ordering comparison across\n these types raises "TypeError".\n\n Sequences compare lexicographically using comparison of\n corresponding elements, whereby reflexivity of the elements is\n enforced.\n\n In enforcing reflexivity of elements, the comparison of collections\n assumes that for a collection element "x", "x == x" is always true.\n Based on that assumption, element identity is compared first, and\n element comparison is performed only for distinct elements. This\n approach yields the same result as a strict element comparison\n would, if the compared elements are reflexive. For non-reflexive\n elements, the result is different than for strict element\n comparison, and may be surprising: The non-reflexive not-a-number\n values for example result in the following comparison behavior when\n used in a list:\n\n >>> nan = float(\'NaN\')\n >>> nan is nan\n True\n >>> nan == nan\n False <-- the defined non-reflexive behavior of NaN\n >>> [nan] == [nan]\n True <-- list enforces reflexivity and tests identity first\n\n Lexicographical comparison between built-in collections works as\n follows:\n\n * For two collections to compare equal, they must be of the same\n type, have the same length, and each pair of corresponding\n elements must compare equal (for example, "[1,2] == (1,2)" is\n false because the type is not the same).\n\n * Collections that support order comparison are ordered the same\n as their first unequal elements (for example, "[1,2,x] <= [1,2,y]"\n has the same value as "x <= y"). If a corresponding element does\n not exist, the shorter collection is ordered first (for example,\n "[1,2] < [1,2,3]" is true).\n\n* Mappings (instances of "dict") compare equal if and only if they\n have equal *(key, value)* pairs. Equality comparison of the keys and\n elements enforces reflexivity.\n\n Order comparisons ("<", ">", "<=", and ">=") raise "TypeError".\n\n* Sets (instances of "set" or "frozenset") can be compared within\n and across their types.\n\n They define order comparison operators to mean subset and superset\n tests. Those relations do not define total orderings (for example,\n the two sets "{1,2}" and "{2,3}" are not equal, nor subsets of one\n another, nor supersets of one another). Accordingly, sets are not\n appropriate arguments for functions which depend on total ordering\n (for example, "min()", "max()", and "sorted()" produce undefined\n results given a list of sets as inputs).\n\n Comparison of sets enforces reflexivity of its elements.\n\n* Most other built-in types have no comparison methods implemented,\n so they inherit the default comparison behavior.\n\nUser-defined classes that customize their comparison behavior should\nfollow some consistency rules, if possible:\n\n* Equality comparison should be reflexive. In other words, identical\n objects should compare equal:\n\n "x is y" implies "x == y"\n\n* Comparison should be symmetric. In other words, the following\n expressions should have the same result:\n\n "x == y" and "y == x"\n\n "x != y" and "y != x"\n\n "x < y" and "y > x"\n\n "x <= y" and "y >= x"\n\n* Comparison should be transitive. The following (non-exhaustive)\n examples illustrate that:\n\n "x > y and y > z" implies "x > z"\n\n "x < y and y <= z" implies "x < z"\n\n* Inverse comparison should result in the boolean negation. In other\n words, the following expressions should have the same result:\n\n "x == y" and "not x != y"\n\n "x < y" and "not x >= y" (for total ordering)\n\n "x > y" and "not x <= y" (for total ordering)\n\n The last two expressions apply to totally ordered collections (e.g.\n to sequences, but not to sets or mappings). See also the\n "total_ordering()" decorator.\n\nPython does not enforce these consistency rules. In fact, the\nnot-a-number values are an example for not following these rules.\n\n\nMembership test operations\n==========================\n\nThe operators "in" and "not in" test for membership. "x in s"\nevaluates to true if *x* is a member of *s*, and false otherwise. "x\nnot in s" returns the negation of "x in s". All built-in sequences\nand set types support this as well as dictionary, for which "in" tests\nwhether the dictionary has a given key. For container types such as\nlist, tuple, set, frozenset, dict, or collections.deque, the\nexpression "x in y" is equivalent to "any(x is e or x == e for e in\ny)".\n\nFor the string and bytes types, "x in y" is true if and only if *x* is\na substring of *y*. An equivalent test is "y.find(x) != -1". Empty\nstrings are always considered to be a substring of any other string,\nso """ in "abc"" will return "True".\n\nFor user-defined classes which define the "__contains__()" method, "x\nin y" is true if and only if "y.__contains__(x)" is true.\n\nFor user-defined classes which do not define "__contains__()" but do\ndefine "__iter__()", "x in y" is true if some value "z" with "x == z"\nis produced while iterating over "y". If an exception is raised\nduring the iteration, it is as if "in" raised that exception.\n\nLastly, the old-style iteration protocol is tried: if a class defines\n"__getitem__()", "x in y" is true if and only if there is a non-\nnegative integer index *i* such that "x == y[i]", and all lower\ninteger indices do not raise "IndexError" exception. (If any other\nexception is raised, it is as if "in" raised that exception).\n\nThe operator "not in" is defined to have the inverse true value of\n"in".\n\n\nIdentity comparisons\n====================\n\nThe operators "is" and "is not" test for object identity: "x is y" is\ntrue if and only if *x* and *y* are the same object. "x is not y"\nyields the inverse truth value. [4]\n',
- 'compound': u'\nCompound statements\n*******************\n\nCompound statements contain (groups of) other statements; they affect\nor control the execution of those other statements in some way. In\ngeneral, compound statements span multiple lines, although in simple\nincarnations a whole compound statement may be contained in one line.\n\nThe "if", "while" and "for" statements implement traditional control\nflow constructs. "try" specifies exception handlers and/or cleanup\ncode for a group of statements, while the "with" statement allows the\nexecution of initialization and finalization code around a block of\ncode. Function and class definitions are also syntactically compound\nstatements.\n\nA compound statement consists of one or more \'clauses.\' A clause\nconsists of a header and a \'suite.\' The clause headers of a\nparticular compound statement are all at the same indentation level.\nEach clause header begins with a uniquely identifying keyword and ends\nwith a colon. A suite is a group of statements controlled by a\nclause. A suite can be one or more semicolon-separated simple\nstatements on the same line as the header, following the header\'s\ncolon, or it can be one or more indented statements on subsequent\nlines. Only the latter form of a suite can contain nested compound\nstatements; the following is illegal, mostly because it wouldn\'t be\nclear to which "if" clause a following "else" clause would belong:\n\n if test1: if test2: print(x)\n\nAlso note that the semicolon binds tighter than the colon in this\ncontext, so that in the following example, either all or none of the\n"print()" calls are executed:\n\n if x < y < z: print(x); print(y); print(z)\n\nSummarizing:\n\n compound_stmt ::= if_stmt\n | while_stmt\n | for_stmt\n | try_stmt\n | with_stmt\n | funcdef\n | classdef\n suite ::= stmt_list NEWLINE | NEWLINE INDENT statement+ DEDENT\n statement ::= stmt_list NEWLINE | compound_stmt\n stmt_list ::= simple_stmt (";" simple_stmt)* [";"]\n\nNote that statements always end in a "NEWLINE" possibly followed by a\n"DEDENT". Also note that optional continuation clauses always begin\nwith a keyword that cannot start a statement, thus there are no\nambiguities (the \'dangling "else"\' problem is solved in Python by\nrequiring nested "if" statements to be indented).\n\nThe formatting of the grammar rules in the following sections places\neach clause on a separate line for clarity.\n\n\nThe "if" statement\n==================\n\nThe "if" statement is used for conditional execution:\n\n if_stmt ::= "if" expression ":" suite\n ( "elif" expression ":" suite )*\n ["else" ":" suite]\n\nIt selects exactly one of the suites by evaluating the expressions one\nby one until one is found to be true (see section *Boolean operations*\nfor the definition of true and false); then that suite is executed\n(and no other part of the "if" statement is executed or evaluated).\nIf all expressions are false, the suite of the "else" clause, if\npresent, is executed.\n\n\nThe "while" statement\n=====================\n\nThe "while" statement is used for repeated execution as long as an\nexpression is true:\n\n while_stmt ::= "while" expression ":" suite\n ["else" ":" suite]\n\nThis repeatedly tests the expression and, if it is true, executes the\nfirst suite; if the expression is false (which may be the first time\nit is tested) the suite of the "else" clause, if present, is executed\nand the loop terminates.\n\nA "break" statement executed in the first suite terminates the loop\nwithout executing the "else" clause\'s suite. A "continue" statement\nexecuted in the first suite skips the rest of the suite and goes back\nto testing the expression.\n\n\nThe "for" statement\n===================\n\nThe "for" statement is used to iterate over the elements of a sequence\n(such as a string, tuple or list) or other iterable object:\n\n for_stmt ::= "for" target_list "in" expression_list ":" suite\n ["else" ":" suite]\n\nThe expression list is evaluated once; it should yield an iterable\nobject. An iterator is created for the result of the\n"expression_list". The suite is then executed once for each item\nprovided by the iterator, in the order returned by the iterator. Each\nitem in turn is assigned to the target list using the standard rules\nfor assignments (see *Assignment statements*), and then the suite is\nexecuted. When the items are exhausted (which is immediately when the\nsequence is empty or an iterator raises a "StopIteration" exception),\nthe suite in the "else" clause, if present, is executed, and the loop\nterminates.\n\nA "break" statement executed in the first suite terminates the loop\nwithout executing the "else" clause\'s suite. A "continue" statement\nexecuted in the first suite skips the rest of the suite and continues\nwith the next item, or with the "else" clause if there is no next\nitem.\n\nThe for-loop makes assignments to the variables(s) in the target list.\nThis overwrites all previous assignments to those variables including\nthose made in the suite of the for-loop:\n\n for i in range(10):\n print(i)\n i = 5 # this will not affect the for-loop\n # because i will be overwritten with the next\n # index in the range\n\nNames in the target list are not deleted when the loop is finished,\nbut if the sequence is empty, they will not have been assigned to at\nall by the loop. Hint: the built-in function "range()" returns an\niterator of integers suitable to emulate the effect of Pascal\'s "for i\n:= a to b do"; e.g., "list(range(3))" returns the list "[0, 1, 2]".\n\nNote: There is a subtlety when the sequence is being modified by the\n loop (this can only occur for mutable sequences, i.e. lists). An\n internal counter is used to keep track of which item is used next,\n and this is incremented on each iteration. When this counter has\n reached the length of the sequence the loop terminates. This means\n that if the suite deletes the current (or a previous) item from the\n sequence, the next item will be skipped (since it gets the index of\n the current item which has already been treated). Likewise, if the\n suite inserts an item in the sequence before the current item, the\n current item will be treated again the next time through the loop.\n This can lead to nasty bugs that can be avoided by making a\n temporary copy using a slice of the whole sequence, e.g.,\n\n for x in a[:]:\n if x < 0: a.remove(x)\n\n\nThe "try" statement\n===================\n\nThe "try" statement specifies exception handlers and/or cleanup code\nfor a group of statements:\n\n try_stmt ::= try1_stmt | try2_stmt\n try1_stmt ::= "try" ":" suite\n ("except" [expression ["as" identifier]] ":" suite)+\n ["else" ":" suite]\n ["finally" ":" suite]\n try2_stmt ::= "try" ":" suite\n "finally" ":" suite\n\nThe "except" clause(s) specify one or more exception handlers. When no\nexception occurs in the "try" clause, no exception handler is\nexecuted. When an exception occurs in the "try" suite, a search for an\nexception handler is started. This search inspects the except clauses\nin turn until one is found that matches the exception. An expression-\nless except clause, if present, must be last; it matches any\nexception. For an except clause with an expression, that expression\nis evaluated, and the clause matches the exception if the resulting\nobject is "compatible" with the exception. An object is compatible\nwith an exception if it is the class or a base class of the exception\nobject or a tuple containing an item compatible with the exception.\n\nIf no except clause matches the exception, the search for an exception\nhandler continues in the surrounding code and on the invocation stack.\n[1]\n\nIf the evaluation of an expression in the header of an except clause\nraises an exception, the original search for a handler is canceled and\na search starts for the new exception in the surrounding code and on\nthe call stack (it is treated as if the entire "try" statement raised\nthe exception).\n\nWhen a matching except clause is found, the exception is assigned to\nthe target specified after the "as" keyword in that except clause, if\npresent, and the except clause\'s suite is executed. All except\nclauses must have an executable block. When the end of this block is\nreached, execution continues normally after the entire try statement.\n(This means that if two nested handlers exist for the same exception,\nand the exception occurs in the try clause of the inner handler, the\nouter handler will not handle the exception.)\n\nWhen an exception has been assigned using "as target", it is cleared\nat the end of the except clause. This is as if\n\n except E as N:\n foo\n\nwas translated to\n\n except E as N:\n try:\n foo\n finally:\n del N\n\nThis means the exception must be assigned to a different name to be\nable to refer to it after the except clause. Exceptions are cleared\nbecause with the traceback attached to them, they form a reference\ncycle with the stack frame, keeping all locals in that frame alive\nuntil the next garbage collection occurs.\n\nBefore an except clause\'s suite is executed, details about the\nexception are stored in the "sys" module and can be accessed via\n"sys.exc_info()". "sys.exc_info()" returns a 3-tuple consisting of the\nexception class, the exception instance and a traceback object (see\nsection *The standard type hierarchy*) identifying the point in the\nprogram where the exception occurred. "sys.exc_info()" values are\nrestored to their previous values (before the call) when returning\nfrom a function that handled an exception.\n\nThe optional "else" clause is executed if and when control flows off\nthe end of the "try" clause. [2] Exceptions in the "else" clause are\nnot handled by the preceding "except" clauses.\n\nIf "finally" is present, it specifies a \'cleanup\' handler. The "try"\nclause is executed, including any "except" and "else" clauses. If an\nexception occurs in any of the clauses and is not handled, the\nexception is temporarily saved. The "finally" clause is executed. If\nthere is a saved exception it is re-raised at the end of the "finally"\nclause. If the "finally" clause raises another exception, the saved\nexception is set as the context of the new exception. If the "finally"\nclause executes a "return" or "break" statement, the saved exception\nis discarded:\n\n >>> def f():\n ... try:\n ... 1/0\n ... finally:\n ... return 42\n ...\n >>> f()\n 42\n\nThe exception information is not available to the program during\nexecution of the "finally" clause.\n\nWhen a "return", "break" or "continue" statement is executed in the\n"try" suite of a "try"..."finally" statement, the "finally" clause is\nalso executed \'on the way out.\' A "continue" statement is illegal in\nthe "finally" clause. (The reason is a problem with the current\nimplementation --- this restriction may be lifted in the future).\n\nThe return value of a function is determined by the last "return"\nstatement executed. Since the "finally" clause always executes, a\n"return" statement executed in the "finally" clause will always be the\nlast one executed:\n\n >>> def foo():\n ... try:\n ... return \'try\'\n ... finally:\n ... return \'finally\'\n ...\n >>> foo()\n \'finally\'\n\nAdditional information on exceptions can be found in section\n*Exceptions*, and information on using the "raise" statement to\ngenerate exceptions may be found in section *The raise statement*.\n\n\nThe "with" statement\n====================\n\nThe "with" statement is used to wrap the execution of a block with\nmethods defined by a context manager (see section *With Statement\nContext Managers*). This allows common "try"..."except"..."finally"\nusage patterns to be encapsulated for convenient reuse.\n\n with_stmt ::= "with" with_item ("," with_item)* ":" suite\n with_item ::= expression ["as" target]\n\nThe execution of the "with" statement with one "item" proceeds as\nfollows:\n\n1. The context expression (the expression given in the "with_item")\n is evaluated to obtain a context manager.\n\n2. The context manager\'s "__exit__()" is loaded for later use.\n\n3. The context manager\'s "__enter__()" method is invoked.\n\n4. If a target was included in the "with" statement, the return\n value from "__enter__()" is assigned to it.\n\n Note: The "with" statement guarantees that if the "__enter__()"\n method returns without an error, then "__exit__()" will always be\n called. Thus, if an error occurs during the assignment to the\n target list, it will be treated the same as an error occurring\n within the suite would be. See step 6 below.\n\n5. The suite is executed.\n\n6. The context manager\'s "__exit__()" method is invoked. If an\n exception caused the suite to be exited, its type, value, and\n traceback are passed as arguments to "__exit__()". Otherwise, three\n "None" arguments are supplied.\n\n If the suite was exited due to an exception, and the return value\n from the "__exit__()" method was false, the exception is reraised.\n If the return value was true, the exception is suppressed, and\n execution continues with the statement following the "with"\n statement.\n\n If the suite was exited for any reason other than an exception, the\n return value from "__exit__()" is ignored, and execution proceeds\n at the normal location for the kind of exit that was taken.\n\nWith more than one item, the context managers are processed as if\nmultiple "with" statements were nested:\n\n with A() as a, B() as b:\n suite\n\nis equivalent to\n\n with A() as a:\n with B() as b:\n suite\n\nChanged in version 3.1: Support for multiple context expressions.\n\nSee also: **PEP 0343** - The "with" statement\n\n The specification, background, and examples for the Python "with"\n statement.\n\n\nFunction definitions\n====================\n\nA function definition defines a user-defined function object (see\nsection *The standard type hierarchy*):\n\n funcdef ::= [decorators] "def" funcname "(" [parameter_list] ")" ["->" expression] ":" suite\n decorators ::= decorator+\n decorator ::= "@" dotted_name ["(" [parameter_list [","]] ")"] NEWLINE\n dotted_name ::= identifier ("." identifier)*\n parameter_list ::= (defparameter ",")*\n | "*" [parameter] ("," defparameter)* ["," "**" parameter]\n | "**" parameter\n | defparameter [","] )\n parameter ::= identifier [":" expression]\n defparameter ::= parameter ["=" expression]\n funcname ::= identifier\n\nA function definition is an executable statement. Its execution binds\nthe function name in the current local namespace to a function object\n(a wrapper around the executable code for the function). This\nfunction object contains a reference to the current global namespace\nas the global namespace to be used when the function is called.\n\nThe function definition does not execute the function body; this gets\nexecuted only when the function is called. [3]\n\nA function definition may be wrapped by one or more *decorator*\nexpressions. Decorator expressions are evaluated when the function is\ndefined, in the scope that contains the function definition. The\nresult must be a callable, which is invoked with the function object\nas the only argument. The returned value is bound to the function name\ninstead of the function object. Multiple decorators are applied in\nnested fashion. For example, the following code\n\n @f1(arg)\n @f2\n def func(): pass\n\nis equivalent to\n\n def func(): pass\n func = f1(arg)(f2(func))\n\nWhen one or more *parameters* have the form *parameter* "="\n*expression*, the function is said to have "default parameter values."\nFor a parameter with a default value, the corresponding *argument* may\nbe omitted from a call, in which case the parameter\'s default value is\nsubstituted. If a parameter has a default value, all following\nparameters up until the ""*"" must also have a default value --- this\nis a syntactic restriction that is not expressed by the grammar.\n\n**Default parameter values are evaluated from left to right when the\nfunction definition is executed.** This means that the expression is\nevaluated once, when the function is defined, and that the same "pre-\ncomputed" value is used for each call. This is especially important\nto understand when a default parameter is a mutable object, such as a\nlist or a dictionary: if the function modifies the object (e.g. by\nappending an item to a list), the default value is in effect modified.\nThis is generally not what was intended. A way around this is to use\n"None" as the default, and explicitly test for it in the body of the\nfunction, e.g.:\n\n def whats_on_the_telly(penguin=None):\n if penguin is None:\n penguin = []\n penguin.append("property of the zoo")\n return penguin\n\nFunction call semantics are described in more detail in section\n*Calls*. A function call always assigns values to all parameters\nmentioned in the parameter list, either from position arguments, from\nkeyword arguments, or from default values. If the form\n""*identifier"" is present, it is initialized to a tuple receiving any\nexcess positional parameters, defaulting to the empty tuple. If the\nform ""**identifier"" is present, it is initialized to a new\ndictionary receiving any excess keyword arguments, defaulting to a new\nempty dictionary. Parameters after ""*"" or ""*identifier"" are\nkeyword-only parameters and may only be passed used keyword arguments.\n\nParameters may have annotations of the form "": expression"" following\nthe parameter name. Any parameter may have an annotation even those\nof the form "*identifier" or "**identifier". Functions may have\n"return" annotation of the form ""-> expression"" after the parameter\nlist. These annotations can be any valid Python expression and are\nevaluated when the function definition is executed. Annotations may\nbe evaluated in a different order than they appear in the source code.\nThe presence of annotations does not change the semantics of a\nfunction. The annotation values are available as values of a\ndictionary keyed by the parameters\' names in the "__annotations__"\nattribute of the function object.\n\nIt is also possible to create anonymous functions (functions not bound\nto a name), for immediate use in expressions. This uses lambda\nexpressions, described in section *Lambdas*. Note that the lambda\nexpression is merely a shorthand for a simplified function definition;\na function defined in a ""def"" statement can be passed around or\nassigned to another name just like a function defined by a lambda\nexpression. The ""def"" form is actually more powerful since it\nallows the execution of multiple statements and annotations.\n\n**Programmer\'s note:** Functions are first-class objects. A ""def""\nstatement executed inside a function definition defines a local\nfunction that can be returned or passed around. Free variables used\nin the nested function can access the local variables of the function\ncontaining the def. See section *Naming and binding* for details.\n\nSee also: **PEP 3107** - Function Annotations\n\n The original specification for function annotations.\n\n\nClass definitions\n=================\n\nA class definition defines a class object (see section *The standard\ntype hierarchy*):\n\n classdef ::= [decorators] "class" classname [inheritance] ":" suite\n inheritance ::= "(" [parameter_list] ")"\n classname ::= identifier\n\nA class definition is an executable statement. The inheritance list\nusually gives a list of base classes (see *Customizing class creation*\nfor more advanced uses), so each item in the list should evaluate to a\nclass object which allows subclassing. Classes without an inheritance\nlist inherit, by default, from the base class "object"; hence,\n\n class Foo:\n pass\n\nis equivalent to\n\n class Foo(object):\n pass\n\nThe class\'s suite is then executed in a new execution frame (see\n*Naming and binding*), using a newly created local namespace and the\noriginal global namespace. (Usually, the suite contains mostly\nfunction definitions.) When the class\'s suite finishes execution, its\nexecution frame is discarded but its local namespace is saved. [4] A\nclass object is then created using the inheritance list for the base\nclasses and the saved local namespace for the attribute dictionary.\nThe class name is bound to this class object in the original local\nnamespace.\n\nClass creation can be customized heavily using *metaclasses*.\n\nClasses can also be decorated: just like when decorating functions,\n\n @f1(arg)\n @f2\n class Foo: pass\n\nis equivalent to\n\n class Foo: pass\n Foo = f1(arg)(f2(Foo))\n\nThe evaluation rules for the decorator expressions are the same as for\nfunction decorators. The result must be a class object, which is then\nbound to the class name.\n\n**Programmer\'s note:** Variables defined in the class definition are\nclass attributes; they are shared by instances. Instance attributes\ncan be set in a method with "self.name = value". Both class and\ninstance attributes are accessible through the notation ""self.name"",\nand an instance attribute hides a class attribute with the same name\nwhen accessed in this way. Class attributes can be used as defaults\nfor instance attributes, but using mutable values there can lead to\nunexpected results. *Descriptors* can be used to create instance\nvariables with different implementation details.\n\nSee also: **PEP 3115** - Metaclasses in Python 3 **PEP 3129** -\n Class Decorators\n\n-[ Footnotes ]-\n\n[1] The exception is propagated to the invocation stack unless\n there is a "finally" clause which happens to raise another\n exception. That new exception causes the old one to be lost.\n\n[2] Currently, control "flows off the end" except in the case of\n an exception or the execution of a "return", "continue", or\n "break" statement.\n\n[3] A string literal appearing as the first statement in the\n function body is transformed into the function\'s "__doc__"\n attribute and therefore the function\'s *docstring*.\n\n[4] A string literal appearing as the first statement in the class\n body is transformed into the namespace\'s "__doc__" item and\n therefore the class\'s *docstring*.\n',
+ 'compound': u'\nCompound statements\n*******************\n\nCompound statements contain (groups of) other statements; they affect\nor control the execution of those other statements in some way. In\ngeneral, compound statements span multiple lines, although in simple\nincarnations a whole compound statement may be contained in one line.\n\nThe "if", "while" and "for" statements implement traditional control\nflow constructs. "try" specifies exception handlers and/or cleanup\ncode for a group of statements, while the "with" statement allows the\nexecution of initialization and finalization code around a block of\ncode. Function and class definitions are also syntactically compound\nstatements.\n\nA compound statement consists of one or more \'clauses.\' A clause\nconsists of a header and a \'suite.\' The clause headers of a\nparticular compound statement are all at the same indentation level.\nEach clause header begins with a uniquely identifying keyword and ends\nwith a colon. A suite is a group of statements controlled by a\nclause. A suite can be one or more semicolon-separated simple\nstatements on the same line as the header, following the header\'s\ncolon, or it can be one or more indented statements on subsequent\nlines. Only the latter form of a suite can contain nested compound\nstatements; the following is illegal, mostly because it wouldn\'t be\nclear to which "if" clause a following "else" clause would belong:\n\n if test1: if test2: print(x)\n\nAlso note that the semicolon binds tighter than the colon in this\ncontext, so that in the following example, either all or none of the\n"print()" calls are executed:\n\n if x < y < z: print(x); print(y); print(z)\n\nSummarizing:\n\n compound_stmt ::= if_stmt\n | while_stmt\n | for_stmt\n | try_stmt\n | with_stmt\n | funcdef\n | classdef\n | async_with_stmt\n | async_for_stmt\n | async_funcdef\n suite ::= stmt_list NEWLINE | NEWLINE INDENT statement+ DEDENT\n statement ::= stmt_list NEWLINE | compound_stmt\n stmt_list ::= simple_stmt (";" simple_stmt)* [";"]\n\nNote that statements always end in a "NEWLINE" possibly followed by a\n"DEDENT". Also note that optional continuation clauses always begin\nwith a keyword that cannot start a statement, thus there are no\nambiguities (the \'dangling "else"\' problem is solved in Python by\nrequiring nested "if" statements to be indented).\n\nThe formatting of the grammar rules in the following sections places\neach clause on a separate line for clarity.\n\n\nThe "if" statement\n==================\n\nThe "if" statement is used for conditional execution:\n\n if_stmt ::= "if" expression ":" suite\n ( "elif" expression ":" suite )*\n ["else" ":" suite]\n\nIt selects exactly one of the suites by evaluating the expressions one\nby one until one is found to be true (see section *Boolean operations*\nfor the definition of true and false); then that suite is executed\n(and no other part of the "if" statement is executed or evaluated).\nIf all expressions are false, the suite of the "else" clause, if\npresent, is executed.\n\n\nThe "while" statement\n=====================\n\nThe "while" statement is used for repeated execution as long as an\nexpression is true:\n\n while_stmt ::= "while" expression ":" suite\n ["else" ":" suite]\n\nThis repeatedly tests the expression and, if it is true, executes the\nfirst suite; if the expression is false (which may be the first time\nit is tested) the suite of the "else" clause, if present, is executed\nand the loop terminates.\n\nA "break" statement executed in the first suite terminates the loop\nwithout executing the "else" clause\'s suite. A "continue" statement\nexecuted in the first suite skips the rest of the suite and goes back\nto testing the expression.\n\n\nThe "for" statement\n===================\n\nThe "for" statement is used to iterate over the elements of a sequence\n(such as a string, tuple or list) or other iterable object:\n\n for_stmt ::= "for" target_list "in" expression_list ":" suite\n ["else" ":" suite]\n\nThe expression list is evaluated once; it should yield an iterable\nobject. An iterator is created for the result of the\n"expression_list". The suite is then executed once for each item\nprovided by the iterator, in the order returned by the iterator. Each\nitem in turn is assigned to the target list using the standard rules\nfor assignments (see *Assignment statements*), and then the suite is\nexecuted. When the items are exhausted (which is immediately when the\nsequence is empty or an iterator raises a "StopIteration" exception),\nthe suite in the "else" clause, if present, is executed, and the loop\nterminates.\n\nA "break" statement executed in the first suite terminates the loop\nwithout executing the "else" clause\'s suite. A "continue" statement\nexecuted in the first suite skips the rest of the suite and continues\nwith the next item, or with the "else" clause if there is no next\nitem.\n\nThe for-loop makes assignments to the variables(s) in the target list.\nThis overwrites all previous assignments to those variables including\nthose made in the suite of the for-loop:\n\n for i in range(10):\n print(i)\n i = 5 # this will not affect the for-loop\n # because i will be overwritten with the next\n # index in the range\n\nNames in the target list are not deleted when the loop is finished,\nbut if the sequence is empty, they will not have been assigned to at\nall by the loop. Hint: the built-in function "range()" returns an\niterator of integers suitable to emulate the effect of Pascal\'s "for i\n:= a to b do"; e.g., "list(range(3))" returns the list "[0, 1, 2]".\n\nNote: There is a subtlety when the sequence is being modified by the\n loop (this can only occur for mutable sequences, i.e. lists). An\n internal counter is used to keep track of which item is used next,\n and this is incremented on each iteration. When this counter has\n reached the length of the sequence the loop terminates. This means\n that if the suite deletes the current (or a previous) item from the\n sequence, the next item will be skipped (since it gets the index of\n the current item which has already been treated). Likewise, if the\n suite inserts an item in the sequence before the current item, the\n current item will be treated again the next time through the loop.\n This can lead to nasty bugs that can be avoided by making a\n temporary copy using a slice of the whole sequence, e.g.,\n\n for x in a[:]:\n if x < 0: a.remove(x)\n\n\nThe "try" statement\n===================\n\nThe "try" statement specifies exception handlers and/or cleanup code\nfor a group of statements:\n\n try_stmt ::= try1_stmt | try2_stmt\n try1_stmt ::= "try" ":" suite\n ("except" [expression ["as" identifier]] ":" suite)+\n ["else" ":" suite]\n ["finally" ":" suite]\n try2_stmt ::= "try" ":" suite\n "finally" ":" suite\n\nThe "except" clause(s) specify one or more exception handlers. When no\nexception occurs in the "try" clause, no exception handler is\nexecuted. When an exception occurs in the "try" suite, a search for an\nexception handler is started. This search inspects the except clauses\nin turn until one is found that matches the exception. An expression-\nless except clause, if present, must be last; it matches any\nexception. For an except clause with an expression, that expression\nis evaluated, and the clause matches the exception if the resulting\nobject is "compatible" with the exception. An object is compatible\nwith an exception if it is the class or a base class of the exception\nobject or a tuple containing an item compatible with the exception.\n\nIf no except clause matches the exception, the search for an exception\nhandler continues in the surrounding code and on the invocation stack.\n[1]\n\nIf the evaluation of an expression in the header of an except clause\nraises an exception, the original search for a handler is canceled and\na search starts for the new exception in the surrounding code and on\nthe call stack (it is treated as if the entire "try" statement raised\nthe exception).\n\nWhen a matching except clause is found, the exception is assigned to\nthe target specified after the "as" keyword in that except clause, if\npresent, and the except clause\'s suite is executed. All except\nclauses must have an executable block. When the end of this block is\nreached, execution continues normally after the entire try statement.\n(This means that if two nested handlers exist for the same exception,\nand the exception occurs in the try clause of the inner handler, the\nouter handler will not handle the exception.)\n\nWhen an exception has been assigned using "as target", it is cleared\nat the end of the except clause. This is as if\n\n except E as N:\n foo\n\nwas translated to\n\n except E as N:\n try:\n foo\n finally:\n del N\n\nThis means the exception must be assigned to a different name to be\nable to refer to it after the except clause. Exceptions are cleared\nbecause with the traceback attached to them, they form a reference\ncycle with the stack frame, keeping all locals in that frame alive\nuntil the next garbage collection occurs.\n\nBefore an except clause\'s suite is executed, details about the\nexception are stored in the "sys" module and can be accessed via\n"sys.exc_info()". "sys.exc_info()" returns a 3-tuple consisting of the\nexception class, the exception instance and a traceback object (see\nsection *The standard type hierarchy*) identifying the point in the\nprogram where the exception occurred. "sys.exc_info()" values are\nrestored to their previous values (before the call) when returning\nfrom a function that handled an exception.\n\nThe optional "else" clause is executed if and when control flows off\nthe end of the "try" clause. [2] Exceptions in the "else" clause are\nnot handled by the preceding "except" clauses.\n\nIf "finally" is present, it specifies a \'cleanup\' handler. The "try"\nclause is executed, including any "except" and "else" clauses. If an\nexception occurs in any of the clauses and is not handled, the\nexception is temporarily saved. The "finally" clause is executed. If\nthere is a saved exception it is re-raised at the end of the "finally"\nclause. If the "finally" clause raises another exception, the saved\nexception is set as the context of the new exception. If the "finally"\nclause executes a "return" or "break" statement, the saved exception\nis discarded:\n\n >>> def f():\n ... try:\n ... 1/0\n ... finally:\n ... return 42\n ...\n >>> f()\n 42\n\nThe exception information is not available to the program during\nexecution of the "finally" clause.\n\nWhen a "return", "break" or "continue" statement is executed in the\n"try" suite of a "try"..."finally" statement, the "finally" clause is\nalso executed \'on the way out.\' A "continue" statement is illegal in\nthe "finally" clause. (The reason is a problem with the current\nimplementation --- this restriction may be lifted in the future).\n\nThe return value of a function is determined by the last "return"\nstatement executed. Since the "finally" clause always executes, a\n"return" statement executed in the "finally" clause will always be the\nlast one executed:\n\n >>> def foo():\n ... try:\n ... return \'try\'\n ... finally:\n ... return \'finally\'\n ...\n >>> foo()\n \'finally\'\n\nAdditional information on exceptions can be found in section\n*Exceptions*, and information on using the "raise" statement to\ngenerate exceptions may be found in section *The raise statement*.\n\n\nThe "with" statement\n====================\n\nThe "with" statement is used to wrap the execution of a block with\nmethods defined by a context manager (see section *With Statement\nContext Managers*). This allows common "try"..."except"..."finally"\nusage patterns to be encapsulated for convenient reuse.\n\n with_stmt ::= "with" with_item ("," with_item)* ":" suite\n with_item ::= expression ["as" target]\n\nThe execution of the "with" statement with one "item" proceeds as\nfollows:\n\n1. The context expression (the expression given in the "with_item")\n is evaluated to obtain a context manager.\n\n2. The context manager\'s "__exit__()" is loaded for later use.\n\n3. The context manager\'s "__enter__()" method is invoked.\n\n4. If a target was included in the "with" statement, the return\n value from "__enter__()" is assigned to it.\n\n Note: The "with" statement guarantees that if the "__enter__()"\n method returns without an error, then "__exit__()" will always be\n called. Thus, if an error occurs during the assignment to the\n target list, it will be treated the same as an error occurring\n within the suite would be. See step 6 below.\n\n5. The suite is executed.\n\n6. The context manager\'s "__exit__()" method is invoked. If an\n exception caused the suite to be exited, its type, value, and\n traceback are passed as arguments to "__exit__()". Otherwise, three\n "None" arguments are supplied.\n\n If the suite was exited due to an exception, and the return value\n from the "__exit__()" method was false, the exception is reraised.\n If the return value was true, the exception is suppressed, and\n execution continues with the statement following the "with"\n statement.\n\n If the suite was exited for any reason other than an exception, the\n return value from "__exit__()" is ignored, and execution proceeds\n at the normal location for the kind of exit that was taken.\n\nWith more than one item, the context managers are processed as if\nmultiple "with" statements were nested:\n\n with A() as a, B() as b:\n suite\n\nis equivalent to\n\n with A() as a:\n with B() as b:\n suite\n\nChanged in version 3.1: Support for multiple context expressions.\n\nSee also: **PEP 0343** - The "with" statement\n\n The specification, background, and examples for the Python "with"\n statement.\n\n\nFunction definitions\n====================\n\nA function definition defines a user-defined function object (see\nsection *The standard type hierarchy*):\n\n funcdef ::= [decorators] "def" funcname "(" [parameter_list] ")" ["->" expression] ":" suite\n decorators ::= decorator+\n decorator ::= "@" dotted_name ["(" [parameter_list [","]] ")"] NEWLINE\n dotted_name ::= identifier ("." identifier)*\n parameter_list ::= (defparameter ",")*\n | "*" [parameter] ("," defparameter)* ["," "**" parameter]\n | "**" parameter\n | defparameter [","] )\n parameter ::= identifier [":" expression]\n defparameter ::= parameter ["=" expression]\n funcname ::= identifier\n\nA function definition is an executable statement. Its execution binds\nthe function name in the current local namespace to a function object\n(a wrapper around the executable code for the function). This\nfunction object contains a reference to the current global namespace\nas the global namespace to be used when the function is called.\n\nThe function definition does not execute the function body; this gets\nexecuted only when the function is called. [3]\n\nA function definition may be wrapped by one or more *decorator*\nexpressions. Decorator expressions are evaluated when the function is\ndefined, in the scope that contains the function definition. The\nresult must be a callable, which is invoked with the function object\nas the only argument. The returned value is bound to the function name\ninstead of the function object. Multiple decorators are applied in\nnested fashion. For example, the following code\n\n @f1(arg)\n @f2\n def func(): pass\n\nis equivalent to\n\n def func(): pass\n func = f1(arg)(f2(func))\n\nWhen one or more *parameters* have the form *parameter* "="\n*expression*, the function is said to have "default parameter values."\nFor a parameter with a default value, the corresponding *argument* may\nbe omitted from a call, in which case the parameter\'s default value is\nsubstituted. If a parameter has a default value, all following\nparameters up until the ""*"" must also have a default value --- this\nis a syntactic restriction that is not expressed by the grammar.\n\n**Default parameter values are evaluated from left to right when the\nfunction definition is executed.** This means that the expression is\nevaluated once, when the function is defined, and that the same "pre-\ncomputed" value is used for each call. This is especially important\nto understand when a default parameter is a mutable object, such as a\nlist or a dictionary: if the function modifies the object (e.g. by\nappending an item to a list), the default value is in effect modified.\nThis is generally not what was intended. A way around this is to use\n"None" as the default, and explicitly test for it in the body of the\nfunction, e.g.:\n\n def whats_on_the_telly(penguin=None):\n if penguin is None:\n penguin = []\n penguin.append("property of the zoo")\n return penguin\n\nFunction call semantics are described in more detail in section\n*Calls*. A function call always assigns values to all parameters\nmentioned in the parameter list, either from position arguments, from\nkeyword arguments, or from default values. If the form\n""*identifier"" is present, it is initialized to a tuple receiving any\nexcess positional parameters, defaulting to the empty tuple. If the\nform ""**identifier"" is present, it is initialized to a new\ndictionary receiving any excess keyword arguments, defaulting to a new\nempty dictionary. Parameters after ""*"" or ""*identifier"" are\nkeyword-only parameters and may only be passed used keyword arguments.\n\nParameters may have annotations of the form "": expression"" following\nthe parameter name. Any parameter may have an annotation even those\nof the form "*identifier" or "**identifier". Functions may have\n"return" annotation of the form ""-> expression"" after the parameter\nlist. These annotations can be any valid Python expression and are\nevaluated when the function definition is executed. Annotations may\nbe evaluated in a different order than they appear in the source code.\nThe presence of annotations does not change the semantics of a\nfunction. The annotation values are available as values of a\ndictionary keyed by the parameters\' names in the "__annotations__"\nattribute of the function object.\n\nIt is also possible to create anonymous functions (functions not bound\nto a name), for immediate use in expressions. This uses lambda\nexpressions, described in section *Lambdas*. Note that the lambda\nexpression is merely a shorthand for a simplified function definition;\na function defined in a ""def"" statement can be passed around or\nassigned to another name just like a function defined by a lambda\nexpression. The ""def"" form is actually more powerful since it\nallows the execution of multiple statements and annotations.\n\n**Programmer\'s note:** Functions are first-class objects. A ""def""\nstatement executed inside a function definition defines a local\nfunction that can be returned or passed around. Free variables used\nin the nested function can access the local variables of the function\ncontaining the def. See section *Naming and binding* for details.\n\nSee also: **PEP 3107** - Function Annotations\n\n The original specification for function annotations.\n\n\nClass definitions\n=================\n\nA class definition defines a class object (see section *The standard\ntype hierarchy*):\n\n classdef ::= [decorators] "class" classname [inheritance] ":" suite\n inheritance ::= "(" [parameter_list] ")"\n classname ::= identifier\n\nA class definition is an executable statement. The inheritance list\nusually gives a list of base classes (see *Customizing class creation*\nfor more advanced uses), so each item in the list should evaluate to a\nclass object which allows subclassing. Classes without an inheritance\nlist inherit, by default, from the base class "object"; hence,\n\n class Foo:\n pass\n\nis equivalent to\n\n class Foo(object):\n pass\n\nThe class\'s suite is then executed in a new execution frame (see\n*Naming and binding*), using a newly created local namespace and the\noriginal global namespace. (Usually, the suite contains mostly\nfunction definitions.) When the class\'s suite finishes execution, its\nexecution frame is discarded but its local namespace is saved. [4] A\nclass object is then created using the inheritance list for the base\nclasses and the saved local namespace for the attribute dictionary.\nThe class name is bound to this class object in the original local\nnamespace.\n\nClass creation can be customized heavily using *metaclasses*.\n\nClasses can also be decorated: just like when decorating functions,\n\n @f1(arg)\n @f2\n class Foo: pass\n\nis equivalent to\n\n class Foo: pass\n Foo = f1(arg)(f2(Foo))\n\nThe evaluation rules for the decorator expressions are the same as for\nfunction decorators. The result must be a class object, which is then\nbound to the class name.\n\n**Programmer\'s note:** Variables defined in the class definition are\nclass attributes; they are shared by instances. Instance attributes\ncan be set in a method with "self.name = value". Both class and\ninstance attributes are accessible through the notation ""self.name"",\nand an instance attribute hides a class attribute with the same name\nwhen accessed in this way. Class attributes can be used as defaults\nfor instance attributes, but using mutable values there can lead to\nunexpected results. *Descriptors* can be used to create instance\nvariables with different implementation details.\n\nSee also: **PEP 3115** - Metaclasses in Python 3 **PEP 3129** -\n Class Decorators\n\n\nCoroutines\n==========\n\nNew in version 3.5.\n\n\nCoroutine function definition\n-----------------------------\n\n async_funcdef ::= [decorators] "async" "def" funcname "(" [parameter_list] ")" ["->" expression] ":" suite\n\nExecution of Python coroutines can be suspended and resumed at many\npoints (see *coroutine*). In the body of a coroutine, any "await" and\n"async" identifiers become reserved keywords; "await" expressions,\n"async for" and "async with" can only be used in coroutine bodies.\n\nFunctions defined with "async def" syntax are always coroutine\nfunctions, even if they do not contain "await" or "async" keywords.\n\nIt is a "SyntaxError" to use "yield" expressions in "async def"\ncoroutines.\n\nAn example of a coroutine function:\n\n async def func(param1, param2):\n do_stuff()\n await some_coroutine()\n\n\nThe "async for" statement\n-------------------------\n\n async_for_stmt ::= "async" for_stmt\n\nAn *asynchronous iterable* is able to call asynchronous code in its\n*iter* implementation, and *asynchronous iterator* can call\nasynchronous code in its *next* method.\n\nThe "async for" statement allows convenient iteration over\nasynchronous iterators.\n\nThe following code:\n\n async for TARGET in ITER:\n BLOCK\n else:\n BLOCK2\n\nIs semantically equivalent to:\n\n iter = (ITER)\n iter = await type(iter).__aiter__(iter)\n running = True\n while running:\n try:\n TARGET = await type(iter).__anext__(iter)\n except StopAsyncIteration:\n running = False\n else:\n BLOCK\n else:\n BLOCK2\n\nSee also "__aiter__()" and "__anext__()" for details.\n\nIt is a "SyntaxError" to use "async for" statement outside of an\n"async def" function.\n\n\nThe "async with" statement\n--------------------------\n\n async_with_stmt ::= "async" with_stmt\n\nAn *asynchronous context manager* is a *context manager* that is able\nto suspend execution in its *enter* and *exit* methods.\n\nThe following code:\n\n async with EXPR as VAR:\n BLOCK\n\nIs semantically equivalent to:\n\n mgr = (EXPR)\n aexit = type(mgr).__aexit__\n aenter = type(mgr).__aenter__(mgr)\n exc = True\n\n VAR = await aenter\n try:\n BLOCK\n except:\n if not await aexit(mgr, *sys.exc_info()):\n raise\n else:\n await aexit(mgr, None, None, None)\n\nSee also "__aenter__()" and "__aexit__()" for details.\n\nIt is a "SyntaxError" to use "async with" statement outside of an\n"async def" function.\n\nSee also: **PEP 492** - Coroutines with async and await syntax\n\n-[ Footnotes ]-\n\n[1] The exception is propagated to the invocation stack unless\n there is a "finally" clause which happens to raise another\n exception. That new exception causes the old one to be lost.\n\n[2] Currently, control "flows off the end" except in the case of\n an exception or the execution of a "return", "continue", or\n "break" statement.\n\n[3] A string literal appearing as the first statement in the\n function body is transformed into the function\'s "__doc__"\n attribute and therefore the function\'s *docstring*.\n\n[4] A string literal appearing as the first statement in the class\n body is transformed into the namespace\'s "__doc__" item and\n therefore the class\'s *docstring*.\n',
'context-managers': u'\nWith Statement Context Managers\n*******************************\n\nA *context manager* is an object that defines the runtime context to\nbe established when executing a "with" statement. The context manager\nhandles the entry into, and the exit from, the desired runtime context\nfor the execution of the block of code. Context managers are normally\ninvoked using the "with" statement (described in section *The with\nstatement*), but can also be used by directly invoking their methods.\n\nTypical uses of context managers include saving and restoring various\nkinds of global state, locking and unlocking resources, closing opened\nfiles, etc.\n\nFor more information on context managers, see *Context Manager Types*.\n\nobject.__enter__(self)\n\n Enter the runtime context related to this object. The "with"\n statement will bind this method\'s return value to the target(s)\n specified in the "as" clause of the statement, if any.\n\nobject.__exit__(self, exc_type, exc_value, traceback)\n\n Exit the runtime context related to this object. The parameters\n describe the exception that caused the context to be exited. If the\n context was exited without an exception, all three arguments will\n be "None".\n\n If an exception is supplied, and the method wishes to suppress the\n exception (i.e., prevent it from being propagated), it should\n return a true value. Otherwise, the exception will be processed\n normally upon exit from this method.\n\n Note that "__exit__()" methods should not reraise the passed-in\n exception; this is the caller\'s responsibility.\n\nSee also: **PEP 0343** - The "with" statement\n\n The specification, background, and examples for the Python "with"\n statement.\n',
'continue': u'\nThe "continue" statement\n************************\n\n continue_stmt ::= "continue"\n\n"continue" may only occur syntactically nested in a "for" or "while"\nloop, but not nested in a function or class definition or "finally"\nclause within that loop. It continues with the next cycle of the\nnearest enclosing loop.\n\nWhen "continue" passes control out of a "try" statement with a\n"finally" clause, that "finally" clause is executed before really\nstarting the next loop cycle.\n',
'conversions': u'\nArithmetic conversions\n**********************\n\nWhen a description of an arithmetic operator below uses the phrase\n"the numeric arguments are converted to a common type," this means\nthat the operator implementation for built-in types works as follows:\n\n* If either argument is a complex number, the other is converted to\n complex;\n\n* otherwise, if either argument is a floating point number, the\n other is converted to floating point;\n\n* otherwise, both must be integers and no conversion is necessary.\n\nSome additional rules apply for certain operators (e.g., a string as a\nleft argument to the \'%\' operator). Extensions must define their own\nconversion behavior.\n',
@@ -49,24 +49,24 @@ topics = {'assert': u'\nThe "assert" statement\n**********************\n\nAssert
'naming': u'\nNaming and binding\n******************\n\n\nBinding of names\n================\n\n*Names* refer to objects. Names are introduced by name binding\noperations.\n\nThe following constructs bind names: formal parameters to functions,\n"import" statements, class and function definitions (these bind the\nclass or function name in the defining block), and targets that are\nidentifiers if occurring in an assignment, "for" loop header, or after\n"as" in a "with" statement or "except" clause. The "import" statement\nof the form "from ... import *" binds all names defined in the\nimported module, except those beginning with an underscore. This form\nmay only be used at the module level.\n\nA target occurring in a "del" statement is also considered bound for\nthis purpose (though the actual semantics are to unbind the name).\n\nEach assignment or import statement occurs within a block defined by a\nclass or function definition or at the module level (the top-level\ncode block).\n\nIf a name is bound in a block, it is a local variable of that block,\nunless declared as "nonlocal" or "global". If a name is bound at the\nmodule level, it is a global variable. (The variables of the module\ncode block are local and global.) If a variable is used in a code\nblock but not defined there, it is a *free variable*.\n\nEach occurrence of a name in the program text refers to the *binding*\nof that name established by the following name resolution rules.\n\n\nResolution of names\n===================\n\nA *scope* defines the visibility of a name within a block. If a local\nvariable is defined in a block, its scope includes that block. If the\ndefinition occurs in a function block, the scope extends to any blocks\ncontained within the defining one, unless a contained block introduces\na different binding for the name.\n\nWhen a name is used in a code block, it is resolved using the nearest\nenclosing scope. The set of all such scopes visible to a code block\nis called the block\'s *environment*.\n\nWhen a name is not found at all, a "NameError" exception is raised. If\nthe current scope is a function scope, and the name refers to a local\nvariable that has not yet been bound to a value at the point where the\nname is used, an "UnboundLocalError" exception is raised.\n"UnboundLocalError" is a subclass of "NameError".\n\nIf a name binding operation occurs anywhere within a code block, all\nuses of the name within the block are treated as references to the\ncurrent block. This can lead to errors when a name is used within a\nblock before it is bound. This rule is subtle. Python lacks\ndeclarations and allows name binding operations to occur anywhere\nwithin a code block. The local variables of a code block can be\ndetermined by scanning the entire text of the block for name binding\noperations.\n\nIf the "global" statement occurs within a block, all uses of the name\nspecified in the statement refer to the binding of that name in the\ntop-level namespace. Names are resolved in the top-level namespace by\nsearching the global namespace, i.e. the namespace of the module\ncontaining the code block, and the builtins namespace, the namespace\nof the module "builtins". The global namespace is searched first. If\nthe name is not found there, the builtins namespace is searched. The\n"global" statement must precede all uses of the name.\n\nThe "global" statement has the same scope as a name binding operation\nin the same block. If the nearest enclosing scope for a free variable\ncontains a global statement, the free variable is treated as a global.\n\nThe "nonlocal" statement causes corresponding names to refer to\npreviously bound variables in the nearest enclosing function scope.\n"SyntaxError" is raised at compile time if the given name does not\nexist in any enclosing function scope.\n\nThe namespace for a module is automatically created the first time a\nmodule is imported. The main module for a script is always called\n"__main__".\n\nClass definition blocks and arguments to "exec()" and "eval()" are\nspecial in the context of name resolution. A class definition is an\nexecutable statement that may use and define names. These references\nfollow the normal rules for name resolution with an exception that\nunbound local variables are looked up in the global namespace. The\nnamespace of the class definition becomes the attribute dictionary of\nthe class. The scope of names defined in a class block is limited to\nthe class block; it does not extend to the code blocks of methods --\nthis includes comprehensions and generator expressions since they are\nimplemented using a function scope. This means that the following\nwill fail:\n\n class A:\n a = 42\n b = list(a + i for i in range(10))\n\n\nBuiltins and restricted execution\n=================================\n\nThe builtins namespace associated with the execution of a code block\nis actually found by looking up the name "__builtins__" in its global\nnamespace; this should be a dictionary or a module (in the latter case\nthe module\'s dictionary is used). By default, when in the "__main__"\nmodule, "__builtins__" is the built-in module "builtins"; when in any\nother module, "__builtins__" is an alias for the dictionary of the\n"builtins" module itself. "__builtins__" can be set to a user-created\ndictionary to create a weak form of restricted execution.\n\n**CPython implementation detail:** Users should not touch\n"__builtins__"; it is strictly an implementation detail. Users\nwanting to override values in the builtins namespace should "import"\nthe "builtins" module and modify its attributes appropriately.\n\n\nInteraction with dynamic features\n=================================\n\nName resolution of free variables occurs at runtime, not at compile\ntime. This means that the following code will print 42:\n\n i = 10\n def f():\n print(i)\n i = 42\n f()\n\nThere are several cases where Python statements are illegal when used\nin conjunction with nested scopes that contain free variables.\n\nIf a variable is referenced in an enclosing scope, it is illegal to\ndelete the name. An error will be reported at compile time.\n\nThe "eval()" and "exec()" functions do not have access to the full\nenvironment for resolving names. Names may be resolved in the local\nand global namespaces of the caller. Free variables are not resolved\nin the nearest enclosing namespace, but in the global namespace. [1]\nThe "exec()" and "eval()" functions have optional arguments to\noverride the global and local namespace. If only one namespace is\nspecified, it is used for both.\n',
'nonlocal': u'\nThe "nonlocal" statement\n************************\n\n nonlocal_stmt ::= "nonlocal" identifier ("," identifier)*\n\nThe "nonlocal" statement causes the listed identifiers to refer to\npreviously bound variables in the nearest enclosing scope excluding\nglobals. This is important because the default behavior for binding is\nto search the local namespace first. The statement allows\nencapsulated code to rebind variables outside of the local scope\nbesides the global (module) scope.\n\nNames listed in a "nonlocal" statement, unlike those listed in a\n"global" statement, must refer to pre-existing bindings in an\nenclosing scope (the scope in which a new binding should be created\ncannot be determined unambiguously).\n\nNames listed in a "nonlocal" statement must not collide with pre-\nexisting bindings in the local scope.\n\nSee also: **PEP 3104** - Access to Names in Outer Scopes\n\n The specification for the "nonlocal" statement.\n',
'numbers': u'\nNumeric literals\n****************\n\nThere are three types of numeric literals: integers, floating point\nnumbers, and imaginary numbers. There are no complex literals\n(complex numbers can be formed by adding a real number and an\nimaginary number).\n\nNote that numeric literals do not include a sign; a phrase like "-1"\nis actually an expression composed of the unary operator \'"-"\' and the\nliteral "1".\n',
- 'numeric-types': u'\nEmulating numeric types\n***********************\n\nThe following methods can be defined to emulate numeric objects.\nMethods corresponding to operations that are not supported by the\nparticular kind of number implemented (e.g., bitwise operations for\nnon-integral numbers) should be left undefined.\n\nobject.__add__(self, other)\nobject.__sub__(self, other)\nobject.__mul__(self, other)\nobject.__truediv__(self, other)\nobject.__floordiv__(self, other)\nobject.__mod__(self, other)\nobject.__divmod__(self, other)\nobject.__pow__(self, other[, modulo])\nobject.__lshift__(self, other)\nobject.__rshift__(self, other)\nobject.__and__(self, other)\nobject.__xor__(self, other)\nobject.__or__(self, other)\n\n These methods are called to implement the binary arithmetic\n operations ("+", "-", "*", "/", "//", "%", "divmod()", "pow()",\n "**", "<<", ">>", "&", "^", "|"). For instance, to evaluate the\n expression "x + y", where *x* is an instance of a class that has an\n "__add__()" method, "x.__add__(y)" is called. The "__divmod__()"\n method should be the equivalent to using "__floordiv__()" and\n "__mod__()"; it should not be related to "__truediv__()". Note\n that "__pow__()" should be defined to accept an optional third\n argument if the ternary version of the built-in "pow()" function is\n to be supported.\n\n If one of those methods does not support the operation with the\n supplied arguments, it should return "NotImplemented".\n\nobject.__radd__(self, other)\nobject.__rsub__(self, other)\nobject.__rmul__(self, other)\nobject.__rtruediv__(self, other)\nobject.__rfloordiv__(self, other)\nobject.__rmod__(self, other)\nobject.__rdivmod__(self, other)\nobject.__rpow__(self, other)\nobject.__rlshift__(self, other)\nobject.__rrshift__(self, other)\nobject.__rand__(self, other)\nobject.__rxor__(self, other)\nobject.__ror__(self, other)\n\n These methods are called to implement the binary arithmetic\n operations ("+", "-", "*", "/", "//", "%", "divmod()", "pow()",\n "**", "<<", ">>", "&", "^", "|") with reflected (swapped) operands.\n These functions are only called if the left operand does not\n support the corresponding operation and the operands are of\n different types. [2] For instance, to evaluate the expression "x -\n y", where *y* is an instance of a class that has an "__rsub__()"\n method, "y.__rsub__(x)" is called if "x.__sub__(y)" returns\n *NotImplemented*.\n\n Note that ternary "pow()" will not try calling "__rpow__()" (the\n coercion rules would become too complicated).\n\n Note: If the right operand\'s type is a subclass of the left\n operand\'s type and that subclass provides the reflected method\n for the operation, this method will be called before the left\n operand\'s non-reflected method. This behavior allows subclasses\n to override their ancestors\' operations.\n\nobject.__iadd__(self, other)\nobject.__isub__(self, other)\nobject.__imul__(self, other)\nobject.__itruediv__(self, other)\nobject.__ifloordiv__(self, other)\nobject.__imod__(self, other)\nobject.__ipow__(self, other[, modulo])\nobject.__ilshift__(self, other)\nobject.__irshift__(self, other)\nobject.__iand__(self, other)\nobject.__ixor__(self, other)\nobject.__ior__(self, other)\n\n These methods are called to implement the augmented arithmetic\n assignments ("+=", "-=", "*=", "/=", "//=", "%=", "**=", "<<=",\n ">>=", "&=", "^=", "|="). These methods should attempt to do the\n operation in-place (modifying *self*) and return the result (which\n could be, but does not have to be, *self*). If a specific method\n is not defined, the augmented assignment falls back to the normal\n methods. For instance, if *x* is an instance of a class with an\n "__iadd__()" method, "x += y" is equivalent to "x = x.__iadd__(y)"\n . Otherwise, "x.__add__(y)" and "y.__radd__(x)" are considered, as\n with the evaluation of "x + y". In certain situations, augmented\n assignment can result in unexpected errors (see *Why does\n a_tuple[i] += [\'item\'] raise an exception when the addition\n works?*), but this behavior is in fact part of the data model.\n\nobject.__neg__(self)\nobject.__pos__(self)\nobject.__abs__(self)\nobject.__invert__(self)\n\n Called to implement the unary arithmetic operations ("-", "+",\n "abs()" and "~").\n\nobject.__complex__(self)\nobject.__int__(self)\nobject.__float__(self)\nobject.__round__(self[, n])\n\n Called to implement the built-in functions "complex()", "int()",\n "float()" and "round()". Should return a value of the appropriate\n type.\n\nobject.__index__(self)\n\n Called to implement "operator.index()", and whenever Python needs\n to losslessly convert the numeric object to an integer object (such\n as in slicing, or in the built-in "bin()", "hex()" and "oct()"\n functions). Presence of this method indicates that the numeric\n object is an integer type. Must return an integer.\n\n Note: In order to have a coherent integer type class, when\n "__index__()" is defined "__int__()" should also be defined, and\n both should return the same value.\n',
+ 'numeric-types': u'\nEmulating numeric types\n***********************\n\nThe following methods can be defined to emulate numeric objects.\nMethods corresponding to operations that are not supported by the\nparticular kind of number implemented (e.g., bitwise operations for\nnon-integral numbers) should be left undefined.\n\nobject.__add__(self, other)\nobject.__sub__(self, other)\nobject.__mul__(self, other)\nobject.__matmul__(self, other)\nobject.__truediv__(self, other)\nobject.__floordiv__(self, other)\nobject.__mod__(self, other)\nobject.__divmod__(self, other)\nobject.__pow__(self, other[, modulo])\nobject.__lshift__(self, other)\nobject.__rshift__(self, other)\nobject.__and__(self, other)\nobject.__xor__(self, other)\nobject.__or__(self, other)\n\n These methods are called to implement the binary arithmetic\n operations ("+", "-", "*", "@", "/", "//", "%", "divmod()",\n "pow()", "**", "<<", ">>", "&", "^", "|"). For instance, to\n evaluate the expression "x + y", where *x* is an instance of a\n class that has an "__add__()" method, "x.__add__(y)" is called.\n The "__divmod__()" method should be the equivalent to using\n "__floordiv__()" and "__mod__()"; it should not be related to\n "__truediv__()". Note that "__pow__()" should be defined to accept\n an optional third argument if the ternary version of the built-in\n "pow()" function is to be supported.\n\n If one of those methods does not support the operation with the\n supplied arguments, it should return "NotImplemented".\n\nobject.__radd__(self, other)\nobject.__rsub__(self, other)\nobject.__rmul__(self, other)\nobject.__rmatmul__(self, other)\nobject.__rtruediv__(self, other)\nobject.__rfloordiv__(self, other)\nobject.__rmod__(self, other)\nobject.__rdivmod__(self, other)\nobject.__rpow__(self, other)\nobject.__rlshift__(self, other)\nobject.__rrshift__(self, other)\nobject.__rand__(self, other)\nobject.__rxor__(self, other)\nobject.__ror__(self, other)\n\n These methods are called to implement the binary arithmetic\n operations ("+", "-", "*", "@", "/", "//", "%", "divmod()",\n "pow()", "**", "<<", ">>", "&", "^", "|") with reflected (swapped)\n operands. These functions are only called if the left operand does\n not support the corresponding operation and the operands are of\n different types. [2] For instance, to evaluate the expression "x -\n y", where *y* is an instance of a class that has an "__rsub__()"\n method, "y.__rsub__(x)" is called if "x.__sub__(y)" returns\n *NotImplemented*.\n\n Note that ternary "pow()" will not try calling "__rpow__()" (the\n coercion rules would become too complicated).\n\n Note: If the right operand\'s type is a subclass of the left\n operand\'s type and that subclass provides the reflected method\n for the operation, this method will be called before the left\n operand\'s non-reflected method. This behavior allows subclasses\n to override their ancestors\' operations.\n\nobject.__iadd__(self, other)\nobject.__isub__(self, other)\nobject.__imul__(self, other)\nobject.__imatmul__(self, other)\nobject.__itruediv__(self, other)\nobject.__ifloordiv__(self, other)\nobject.__imod__(self, other)\nobject.__ipow__(self, other[, modulo])\nobject.__ilshift__(self, other)\nobject.__irshift__(self, other)\nobject.__iand__(self, other)\nobject.__ixor__(self, other)\nobject.__ior__(self, other)\n\n These methods are called to implement the augmented arithmetic\n assignments ("+=", "-=", "*=", "@=", "/=", "//=", "%=", "**=",\n "<<=", ">>=", "&=", "^=", "|="). These methods should attempt to\n do the operation in-place (modifying *self*) and return the result\n (which could be, but does not have to be, *self*). If a specific\n method is not defined, the augmented assignment falls back to the\n normal methods. For instance, if *x* is an instance of a class\n with an "__iadd__()" method, "x += y" is equivalent to "x =\n x.__iadd__(y)" . Otherwise, "x.__add__(y)" and "y.__radd__(x)" are\n considered, as with the evaluation of "x + y". In certain\n situations, augmented assignment can result in unexpected errors\n (see *Why does a_tuple[i] += [\'item\'] raise an exception when the\n addition works?*), but this behavior is in fact part of the data\n model.\n\nobject.__neg__(self)\nobject.__pos__(self)\nobject.__abs__(self)\nobject.__invert__(self)\n\n Called to implement the unary arithmetic operations ("-", "+",\n "abs()" and "~").\n\nobject.__complex__(self)\nobject.__int__(self)\nobject.__float__(self)\nobject.__round__(self[, n])\n\n Called to implement the built-in functions "complex()", "int()",\n "float()" and "round()". Should return a value of the appropriate\n type.\n\nobject.__index__(self)\n\n Called to implement "operator.index()", and whenever Python needs\n to losslessly convert the numeric object to an integer object (such\n as in slicing, or in the built-in "bin()", "hex()" and "oct()"\n functions). Presence of this method indicates that the numeric\n object is an integer type. Must return an integer.\n\n Note: In order to have a coherent integer type class, when\n "__index__()" is defined "__int__()" should also be defined, and\n both should return the same value.\n',
'objects': u'\nObjects, values and types\n*************************\n\n*Objects* are Python\'s abstraction for data. All data in a Python\nprogram is represented by objects or by relations between objects. (In\na sense, and in conformance to Von Neumann\'s model of a "stored\nprogram computer," code is also represented by objects.)\n\nEvery object has an identity, a type and a value. An object\'s\n*identity* never changes once it has been created; you may think of it\nas the object\'s address in memory. The \'"is"\' operator compares the\nidentity of two objects; the "id()" function returns an integer\nrepresenting its identity.\n\n**CPython implementation detail:** For CPython, "id(x)" is the memory\naddress where "x" is stored.\n\nAn object\'s type determines the operations that the object supports\n(e.g., "does it have a length?") and also defines the possible values\nfor objects of that type. The "type()" function returns an object\'s\ntype (which is an object itself). Like its identity, an object\'s\n*type* is also unchangeable. [1]\n\nThe *value* of some objects can change. Objects whose value can\nchange are said to be *mutable*; objects whose value is unchangeable\nonce they are created are called *immutable*. (The value of an\nimmutable container object that contains a reference to a mutable\nobject can change when the latter\'s value is changed; however the\ncontainer is still considered immutable, because the collection of\nobjects it contains cannot be changed. So, immutability is not\nstrictly the same as having an unchangeable value, it is more subtle.)\nAn object\'s mutability is determined by its type; for instance,\nnumbers, strings and tuples are immutable, while dictionaries and\nlists are mutable.\n\nObjects are never explicitly destroyed; however, when they become\nunreachable they may be garbage-collected. An implementation is\nallowed to postpone garbage collection or omit it altogether --- it is\na matter of implementation quality how garbage collection is\nimplemented, as long as no objects are collected that are still\nreachable.\n\n**CPython implementation detail:** CPython currently uses a reference-\ncounting scheme with (optional) delayed detection of cyclically linked\ngarbage, which collects most objects as soon as they become\nunreachable, but is not guaranteed to collect garbage containing\ncircular references. See the documentation of the "gc" module for\ninformation on controlling the collection of cyclic garbage. Other\nimplementations act differently and CPython may change. Do not depend\non immediate finalization of objects when they become unreachable (so\nyou should always close files explicitly).\n\nNote that the use of the implementation\'s tracing or debugging\nfacilities may keep objects alive that would normally be collectable.\nAlso note that catching an exception with a \'"try"..."except"\'\nstatement may keep objects alive.\n\nSome objects contain references to "external" resources such as open\nfiles or windows. It is understood that these resources are freed\nwhen the object is garbage-collected, but since garbage collection is\nnot guaranteed to happen, such objects also provide an explicit way to\nrelease the external resource, usually a "close()" method. Programs\nare strongly recommended to explicitly close such objects. The\n\'"try"..."finally"\' statement and the \'"with"\' statement provide\nconvenient ways to do this.\n\nSome objects contain references to other objects; these are called\n*containers*. Examples of containers are tuples, lists and\ndictionaries. The references are part of a container\'s value. In\nmost cases, when we talk about the value of a container, we imply the\nvalues, not the identities of the contained objects; however, when we\ntalk about the mutability of a container, only the identities of the\nimmediately contained objects are implied. So, if an immutable\ncontainer (like a tuple) contains a reference to a mutable object, its\nvalue changes if that mutable object is changed.\n\nTypes affect almost all aspects of object behavior. Even the\nimportance of object identity is affected in some sense: for immutable\ntypes, operations that compute new values may actually return a\nreference to any existing object with the same type and value, while\nfor mutable objects this is not allowed. E.g., after "a = 1; b = 1",\n"a" and "b" may or may not refer to the same object with the value\none, depending on the implementation, but after "c = []; d = []", "c"\nand "d" are guaranteed to refer to two different, unique, newly\ncreated empty lists. (Note that "c = d = []" assigns the same object\nto both "c" and "d".)\n',
- 'operator-summary': u'\nOperator precedence\n*******************\n\nThe following table summarizes the operator precedence in Python, from\nlowest precedence (least binding) to highest precedence (most\nbinding). Operators in the same box have the same precedence. Unless\nthe syntax is explicitly given, operators are binary. Operators in\nthe same box group left to right (except for exponentiation, which\ngroups from right to left).\n\nNote that comparisons, membership tests, and identity tests, all have\nthe same precedence and have a left-to-right chaining feature as\ndescribed in the *Comparisons* section.\n\n+-------------------------------------------------+---------------------------------------+\n| Operator | Description |\n+=================================================+=======================================+\n| "lambda" | Lambda expression |\n+-------------------------------------------------+---------------------------------------+\n| "if" -- "else" | Conditional expression |\n+-------------------------------------------------+---------------------------------------+\n| "or" | Boolean OR |\n+-------------------------------------------------+---------------------------------------+\n| "and" | Boolean AND |\n+-------------------------------------------------+---------------------------------------+\n| "not" "x" | Boolean NOT |\n+-------------------------------------------------+---------------------------------------+\n| "in", "not in", "is", "is not", "<", "<=", ">", | Comparisons, including membership |\n| ">=", "!=", "==" | tests and identity tests |\n+-------------------------------------------------+---------------------------------------+\n| "|" | Bitwise OR |\n+-------------------------------------------------+---------------------------------------+\n| "^" | Bitwise XOR |\n+-------------------------------------------------+---------------------------------------+\n| "&" | Bitwise AND |\n+-------------------------------------------------+---------------------------------------+\n| "<<", ">>" | Shifts |\n+-------------------------------------------------+---------------------------------------+\n| "+", "-" | Addition and subtraction |\n+-------------------------------------------------+---------------------------------------+\n| "*", "/", "//", "%" | Multiplication, division, remainder |\n| | [5] |\n+-------------------------------------------------+---------------------------------------+\n| "+x", "-x", "~x" | Positive, negative, bitwise NOT |\n+-------------------------------------------------+---------------------------------------+\n| "**" | Exponentiation [6] |\n+-------------------------------------------------+---------------------------------------+\n| "x[index]", "x[index:index]", | Subscription, slicing, call, |\n| "x(arguments...)", "x.attribute" | attribute reference |\n+-------------------------------------------------+---------------------------------------+\n| "(expressions...)", "[expressions...]", "{key: | Binding or tuple display, list |\n| value...}", "{expressions...}" | display, dictionary display, set |\n| | display |\n+-------------------------------------------------+---------------------------------------+\n\n-[ Footnotes ]-\n\n[1] While "abs(x%y) < abs(y)" is true mathematically, for floats\n it may not be true numerically due to roundoff. For example, and\n assuming a platform on which a Python float is an IEEE 754 double-\n precision number, in order that "-1e-100 % 1e100" have the same\n sign as "1e100", the computed result is "-1e-100 + 1e100", which\n is numerically exactly equal to "1e100". The function\n "math.fmod()" returns a result whose sign matches the sign of the\n first argument instead, and so returns "-1e-100" in this case.\n Which approach is more appropriate depends on the application.\n\n[2] If x is very close to an exact integer multiple of y, it\'s\n possible for "x//y" to be one larger than "(x-x%y)//y" due to\n rounding. In such cases, Python returns the latter result, in\n order to preserve that "divmod(x,y)[0] * y + x % y" be very close\n to "x".\n\n[3] The Unicode standard distinguishes between *code points* (e.g.\n U+0041) and *abstract characters* (e.g. "LATIN CAPITAL LETTER A").\n While most abstract characters in Unicode are only represented\n using one code point, there is a number of abstract characters\n that can in addition be represented using a sequence of more than\n one code point. For example, the abstract character "LATIN\n CAPITAL LETTER C WITH CEDILLA" can be represented as a single\n *precomposed character* at code position U+00C7, or as a sequence\n of a *base character* at code position U+0043 (LATIN CAPITAL\n LETTER C), followed by a *combining character* at code position\n U+0327 (COMBINING CEDILLA).\n\n The comparison operators on strings compare at the level of\n Unicode code points. This may be counter-intuitive to humans. For\n example, ""\\u00C7" == "\\u0043\\u0327"" is "False", even though both\n strings represent the same abstract character "LATIN CAPITAL\n LETTER C WITH CEDILLA".\n\n To compare strings at the level of abstract characters (that is,\n in a way intuitive to humans), use "unicodedata.normalize()".\n\n[4] Due to automatic garbage-collection, free lists, and the\n dynamic nature of descriptors, you may notice seemingly unusual\n behaviour in certain uses of the "is" operator, like those\n involving comparisons between instance methods, or constants.\n Check their documentation for more info.\n\n[5] The "%" operator is also used for string formatting; the same\n precedence applies.\n\n[6] The power operator "**" binds less tightly than an arithmetic\n or bitwise unary operator on its right, that is, "2**-1" is "0.5".\n',
+ 'operator-summary': u'\nOperator precedence\n*******************\n\nThe following table summarizes the operator precedence in Python, from\nlowest precedence (least binding) to highest precedence (most\nbinding). Operators in the same box have the same precedence. Unless\nthe syntax is explicitly given, operators are binary. Operators in\nthe same box group left to right (except for exponentiation, which\ngroups from right to left).\n\nNote that comparisons, membership tests, and identity tests, all have\nthe same precedence and have a left-to-right chaining feature as\ndescribed in the *Comparisons* section.\n\n+-------------------------------------------------+---------------------------------------+\n| Operator | Description |\n+=================================================+=======================================+\n| "lambda" | Lambda expression |\n+-------------------------------------------------+---------------------------------------+\n| "if" -- "else" | Conditional expression |\n+-------------------------------------------------+---------------------------------------+\n| "or" | Boolean OR |\n+-------------------------------------------------+---------------------------------------+\n| "and" | Boolean AND |\n+-------------------------------------------------+---------------------------------------+\n| "not" "x" | Boolean NOT |\n+-------------------------------------------------+---------------------------------------+\n| "in", "not in", "is", "is not", "<", "<=", ">", | Comparisons, including membership |\n| ">=", "!=", "==" | tests and identity tests |\n+-------------------------------------------------+---------------------------------------+\n| "|" | Bitwise OR |\n+-------------------------------------------------+---------------------------------------+\n| "^" | Bitwise XOR |\n+-------------------------------------------------+---------------------------------------+\n| "&" | Bitwise AND |\n+-------------------------------------------------+---------------------------------------+\n| "<<", ">>" | Shifts |\n+-------------------------------------------------+---------------------------------------+\n| "+", "-" | Addition and subtraction |\n+-------------------------------------------------+---------------------------------------+\n| "*", "@", "/", "//", "%" | Multiplication, matrix multiplication |\n| | division, remainder [5] |\n+-------------------------------------------------+---------------------------------------+\n| "+x", "-x", "~x" | Positive, negative, bitwise NOT |\n+-------------------------------------------------+---------------------------------------+\n| "**" | Exponentiation [6] |\n+-------------------------------------------------+---------------------------------------+\n| "await" "x" | Await expression |\n+-------------------------------------------------+---------------------------------------+\n| "x[index]", "x[index:index]", | Subscription, slicing, call, |\n| "x(arguments...)", "x.attribute" | attribute reference |\n+-------------------------------------------------+---------------------------------------+\n| "(expressions...)", "[expressions...]", "{key: | Binding or tuple display, list |\n| value...}", "{expressions...}" | display, dictionary display, set |\n| | display |\n+-------------------------------------------------+---------------------------------------+\n\n-[ Footnotes ]-\n\n[1] While "abs(x%y) < abs(y)" is true mathematically, for floats\n it may not be true numerically due to roundoff. For example, and\n assuming a platform on which a Python float is an IEEE 754 double-\n precision number, in order that "-1e-100 % 1e100" have the same\n sign as "1e100", the computed result is "-1e-100 + 1e100", which\n is numerically exactly equal to "1e100". The function\n "math.fmod()" returns a result whose sign matches the sign of the\n first argument instead, and so returns "-1e-100" in this case.\n Which approach is more appropriate depends on the application.\n\n[2] If x is very close to an exact integer multiple of y, it\'s\n possible for "x//y" to be one larger than "(x-x%y)//y" due to\n rounding. In such cases, Python returns the latter result, in\n order to preserve that "divmod(x,y)[0] * y + x % y" be very close\n to "x".\n\n[3] The Unicode standard distinguishes between *code points* (e.g.\n U+0041) and *abstract characters* (e.g. "LATIN CAPITAL LETTER A").\n While most abstract characters in Unicode are only represented\n using one code point, there is a number of abstract characters\n that can in addition be represented using a sequence of more than\n one code point. For example, the abstract character "LATIN\n CAPITAL LETTER C WITH CEDILLA" can be represented as a single\n *precomposed character* at code position U+00C7, or as a sequence\n of a *base character* at code position U+0043 (LATIN CAPITAL\n LETTER C), followed by a *combining character* at code position\n U+0327 (COMBINING CEDILLA).\n\n The comparison operators on strings compare at the level of\n Unicode code points. This may be counter-intuitive to humans. For\n example, ""\\u00C7" == "\\u0043\\u0327"" is "False", even though both\n strings represent the same abstract character "LATIN CAPITAL\n LETTER C WITH CEDILLA".\n\n To compare strings at the level of abstract characters (that is,\n in a way intuitive to humans), use "unicodedata.normalize()".\n\n[4] Due to automatic garbage-collection, free lists, and the\n dynamic nature of descriptors, you may notice seemingly unusual\n behaviour in certain uses of the "is" operator, like those\n involving comparisons between instance methods, or constants.\n Check their documentation for more info.\n\n[5] The "%" operator is also used for string formatting; the same\n precedence applies.\n\n[6] The power operator "**" binds less tightly than an arithmetic\n or bitwise unary operator on its right, that is, "2**-1" is "0.5".\n',
'pass': u'\nThe "pass" statement\n********************\n\n pass_stmt ::= "pass"\n\n"pass" is a null operation --- when it is executed, nothing happens.\nIt is useful as a placeholder when a statement is required\nsyntactically, but no code needs to be executed, for example:\n\n def f(arg): pass # a function that does nothing (yet)\n\n class C: pass # a class with no methods (yet)\n',
- 'power': u'\nThe power operator\n******************\n\nThe power operator binds more tightly than unary operators on its\nleft; it binds less tightly than unary operators on its right. The\nsyntax is:\n\n power ::= primary ["**" u_expr]\n\nThus, in an unparenthesized sequence of power and unary operators, the\noperators are evaluated from right to left (this does not constrain\nthe evaluation order for the operands): "-1**2" results in "-1".\n\nThe power operator has the same semantics as the built-in "pow()"\nfunction, when called with two arguments: it yields its left argument\nraised to the power of its right argument. The numeric arguments are\nfirst converted to a common type, and the result is of that type.\n\nFor int operands, the result has the same type as the operands unless\nthe second argument is negative; in that case, all arguments are\nconverted to float and a float result is delivered. For example,\n"10**2" returns "100", but "10**-2" returns "0.01".\n\nRaising "0.0" to a negative power results in a "ZeroDivisionError".\nRaising a negative number to a fractional power results in a "complex"\nnumber. (In earlier versions it raised a "ValueError".)\n',
+ 'power': u'\nThe power operator\n******************\n\nThe power operator binds more tightly than unary operators on its\nleft; it binds less tightly than unary operators on its right. The\nsyntax is:\n\n power ::= await ["**" u_expr]\n\nThus, in an unparenthesized sequence of power and unary operators, the\noperators are evaluated from right to left (this does not constrain\nthe evaluation order for the operands): "-1**2" results in "-1".\n\nThe power operator has the same semantics as the built-in "pow()"\nfunction, when called with two arguments: it yields its left argument\nraised to the power of its right argument. The numeric arguments are\nfirst converted to a common type, and the result is of that type.\n\nFor int operands, the result has the same type as the operands unless\nthe second argument is negative; in that case, all arguments are\nconverted to float and a float result is delivered. For example,\n"10**2" returns "100", but "10**-2" returns "0.01".\n\nRaising "0.0" to a negative power results in a "ZeroDivisionError".\nRaising a negative number to a fractional power results in a "complex"\nnumber. (In earlier versions it raised a "ValueError".)\n',
'raise': u'\nThe "raise" statement\n*********************\n\n raise_stmt ::= "raise" [expression ["from" expression]]\n\nIf no expressions are present, "raise" re-raises the last exception\nthat was active in the current scope. If no exception is active in\nthe current scope, a "RuntimeError" exception is raised indicating\nthat this is an error.\n\nOtherwise, "raise" evaluates the first expression as the exception\nobject. It must be either a subclass or an instance of\n"BaseException". If it is a class, the exception instance will be\nobtained when needed by instantiating the class with no arguments.\n\nThe *type* of the exception is the exception instance\'s class, the\n*value* is the instance itself.\n\nA traceback object is normally created automatically when an exception\nis raised and attached to it as the "__traceback__" attribute, which\nis writable. You can create an exception and set your own traceback in\none step using the "with_traceback()" exception method (which returns\nthe same exception instance, with its traceback set to its argument),\nlike so:\n\n raise Exception("foo occurred").with_traceback(tracebackobj)\n\nThe "from" clause is used for exception chaining: if given, the second\n*expression* must be another exception class or instance, which will\nthen be attached to the raised exception as the "__cause__" attribute\n(which is writable). If the raised exception is not handled, both\nexceptions will be printed:\n\n >>> try:\n ... print(1 / 0)\n ... except Exception as exc:\n ... raise RuntimeError("Something bad happened") from exc\n ...\n Traceback (most recent call last):\n File "<stdin>", line 2, in <module>\n ZeroDivisionError: int division or modulo by zero\n\n The above exception was the direct cause of the following exception:\n\n Traceback (most recent call last):\n File "<stdin>", line 4, in <module>\n RuntimeError: Something bad happened\n\nA similar mechanism works implicitly if an exception is raised inside\nan exception handler or a "finally" clause: the previous exception is\nthen attached as the new exception\'s "__context__" attribute:\n\n >>> try:\n ... print(1 / 0)\n ... except:\n ... raise RuntimeError("Something bad happened")\n ...\n Traceback (most recent call last):\n File "<stdin>", line 2, in <module>\n ZeroDivisionError: int division or modulo by zero\n\n During handling of the above exception, another exception occurred:\n\n Traceback (most recent call last):\n File "<stdin>", line 4, in <module>\n RuntimeError: Something bad happened\n\nAdditional information on exceptions can be found in section\n*Exceptions*, and information about handling exceptions is in section\n*The try statement*.\n',
'return': u'\nThe "return" statement\n**********************\n\n return_stmt ::= "return" [expression_list]\n\n"return" may only occur syntactically nested in a function definition,\nnot within a nested class definition.\n\nIf an expression list is present, it is evaluated, else "None" is\nsubstituted.\n\n"return" leaves the current function call with the expression list (or\n"None") as return value.\n\nWhen "return" passes control out of a "try" statement with a "finally"\nclause, that "finally" clause is executed before really leaving the\nfunction.\n\nIn a generator function, the "return" statement indicates that the\ngenerator is done and will cause "StopIteration" to be raised. The\nreturned value (if any) is used as an argument to construct\n"StopIteration" and becomes the "StopIteration.value" attribute.\n',
'sequence-types': u'\nEmulating container types\n*************************\n\nThe following methods can be defined to implement container objects.\nContainers usually are sequences (such as lists or tuples) or mappings\n(like dictionaries), but can represent other containers as well. The\nfirst set of methods is used either to emulate a sequence or to\nemulate a mapping; the difference is that for a sequence, the\nallowable keys should be the integers *k* for which "0 <= k < N" where\n*N* is the length of the sequence, or slice objects, which define a\nrange of items. It is also recommended that mappings provide the\nmethods "keys()", "values()", "items()", "get()", "clear()",\n"setdefault()", "pop()", "popitem()", "copy()", and "update()"\nbehaving similar to those for Python\'s standard dictionary objects.\nThe "collections" module provides a "MutableMapping" abstract base\nclass to help create those methods from a base set of "__getitem__()",\n"__setitem__()", "__delitem__()", and "keys()". Mutable sequences\nshould provide methods "append()", "count()", "index()", "extend()",\n"insert()", "pop()", "remove()", "reverse()" and "sort()", like Python\nstandard list objects. Finally, sequence types should implement\naddition (meaning concatenation) and multiplication (meaning\nrepetition) by defining the methods "__add__()", "__radd__()",\n"__iadd__()", "__mul__()", "__rmul__()" and "__imul__()" described\nbelow; they should not define other numerical operators. It is\nrecommended that both mappings and sequences implement the\n"__contains__()" method to allow efficient use of the "in" operator;\nfor mappings, "in" should search the mapping\'s keys; for sequences, it\nshould search through the values. It is further recommended that both\nmappings and sequences implement the "__iter__()" method to allow\nefficient iteration through the container; for mappings, "__iter__()"\nshould be the same as "keys()"; for sequences, it should iterate\nthrough the values.\n\nobject.__len__(self)\n\n Called to implement the built-in function "len()". Should return\n the length of the object, an integer ">=" 0. Also, an object that\n doesn\'t define a "__bool__()" method and whose "__len__()" method\n returns zero is considered to be false in a Boolean context.\n\nobject.__length_hint__(self)\n\n Called to implement "operator.length_hint()". Should return an\n estimated length for the object (which may be greater or less than\n the actual length). The length must be an integer ">=" 0. This\n method is purely an optimization and is never required for\n correctness.\n\n New in version 3.4.\n\nNote: Slicing is done exclusively with the following three methods.\n A call like\n\n a[1:2] = b\n\n is translated to\n\n a[slice(1, 2, None)] = b\n\n and so forth. Missing slice items are always filled in with "None".\n\nobject.__getitem__(self, key)\n\n Called to implement evaluation of "self[key]". For sequence types,\n the accepted keys should be integers and slice objects. Note that\n the special interpretation of negative indexes (if the class wishes\n to emulate a sequence type) is up to the "__getitem__()" method. If\n *key* is of an inappropriate type, "TypeError" may be raised; if of\n a value outside the set of indexes for the sequence (after any\n special interpretation of negative values), "IndexError" should be\n raised. For mapping types, if *key* is missing (not in the\n container), "KeyError" should be raised.\n\n Note: "for" loops expect that an "IndexError" will be raised for\n illegal indexes to allow proper detection of the end of the\n sequence.\n\nobject.__missing__(self, key)\n\n Called by "dict"."__getitem__()" to implement "self[key]" for dict\n subclasses when key is not in the dictionary.\n\nobject.__setitem__(self, key, value)\n\n Called to implement assignment to "self[key]". Same note as for\n "__getitem__()". This should only be implemented for mappings if\n the objects support changes to the values for keys, or if new keys\n can be added, or for sequences if elements can be replaced. The\n same exceptions should be raised for improper *key* values as for\n the "__getitem__()" method.\n\nobject.__delitem__(self, key)\n\n Called to implement deletion of "self[key]". Same note as for\n "__getitem__()". This should only be implemented for mappings if\n the objects support removal of keys, or for sequences if elements\n can be removed from the sequence. The same exceptions should be\n raised for improper *key* values as for the "__getitem__()" method.\n\nobject.__iter__(self)\n\n This method is called when an iterator is required for a container.\n This method should return a new iterator object that can iterate\n over all the objects in the container. For mappings, it should\n iterate over the keys of the container.\n\n Iterator objects also need to implement this method; they are\n required to return themselves. For more information on iterator\n objects, see *Iterator Types*.\n\nobject.__reversed__(self)\n\n Called (if present) by the "reversed()" built-in to implement\n reverse iteration. It should return a new iterator object that\n iterates over all the objects in the container in reverse order.\n\n If the "__reversed__()" method is not provided, the "reversed()"\n built-in will fall back to using the sequence protocol ("__len__()"\n and "__getitem__()"). Objects that support the sequence protocol\n should only provide "__reversed__()" if they can provide an\n implementation that is more efficient than the one provided by\n "reversed()".\n\nThe membership test operators ("in" and "not in") are normally\nimplemented as an iteration through a sequence. However, container\nobjects can supply the following special method with a more efficient\nimplementation, which also does not require the object be a sequence.\n\nobject.__contains__(self, item)\n\n Called to implement membership test operators. Should return true\n if *item* is in *self*, false otherwise. For mapping objects, this\n should consider the keys of the mapping rather than the values or\n the key-item pairs.\n\n For objects that don\'t define "__contains__()", the membership test\n first tries iteration via "__iter__()", then the old sequence\n iteration protocol via "__getitem__()", see *this section in the\n language reference*.\n',
'shifting': u'\nShifting operations\n*******************\n\nThe shifting operations have lower priority than the arithmetic\noperations:\n\n shift_expr ::= a_expr | shift_expr ( "<<" | ">>" ) a_expr\n\nThese operators accept integers as arguments. They shift the first\nargument to the left or right by the number of bits given by the\nsecond argument.\n\nA right shift by *n* bits is defined as floor division by "pow(2,n)".\nA left shift by *n* bits is defined as multiplication with "pow(2,n)".\n\nNote: In the current implementation, the right-hand operand is\n required to be at most "sys.maxsize". If the right-hand operand is\n larger than "sys.maxsize" an "OverflowError" exception is raised.\n',
'slicings': u'\nSlicings\n********\n\nA slicing selects a range of items in a sequence object (e.g., a\nstring, tuple or list). Slicings may be used as expressions or as\ntargets in assignment or "del" statements. The syntax for a slicing:\n\n slicing ::= primary "[" slice_list "]"\n slice_list ::= slice_item ("," slice_item)* [","]\n slice_item ::= expression | proper_slice\n proper_slice ::= [lower_bound] ":" [upper_bound] [ ":" [stride] ]\n lower_bound ::= expression\n upper_bound ::= expression\n stride ::= expression\n\nThere is ambiguity in the formal syntax here: anything that looks like\nan expression list also looks like a slice list, so any subscription\ncan be interpreted as a slicing. Rather than further complicating the\nsyntax, this is disambiguated by defining that in this case the\ninterpretation as a subscription takes priority over the\ninterpretation as a slicing (this is the case if the slice list\ncontains no proper slice).\n\nThe semantics for a slicing are as follows. The primary is indexed\n(using the same "__getitem__()" method as normal subscription) with a\nkey that is constructed from the slice list, as follows. If the slice\nlist contains at least one comma, the key is a tuple containing the\nconversion of the slice items; otherwise, the conversion of the lone\nslice item is the key. The conversion of a slice item that is an\nexpression is that expression. The conversion of a proper slice is a\nslice object (see section *The standard type hierarchy*) whose\n"start", "stop" and "step" attributes are the values of the\nexpressions given as lower bound, upper bound and stride,\nrespectively, substituting "None" for missing expressions.\n',
'specialattrs': u'\nSpecial Attributes\n******************\n\nThe implementation adds a few special read-only attributes to several\nobject types, where they are relevant. Some of these are not reported\nby the "dir()" built-in function.\n\nobject.__dict__\n\n A dictionary or other mapping object used to store an object\'s\n (writable) attributes.\n\ninstance.__class__\n\n The class to which a class instance belongs.\n\nclass.__bases__\n\n The tuple of base classes of a class object.\n\nclass.__name__\n\n The name of the class or type.\n\nclass.__qualname__\n\n The *qualified name* of the class or type.\n\n New in version 3.3.\n\nclass.__mro__\n\n This attribute is a tuple of classes that are considered when\n looking for base classes during method resolution.\n\nclass.mro()\n\n This method can be overridden by a metaclass to customize the\n method resolution order for its instances. It is called at class\n instantiation, and its result is stored in "__mro__".\n\nclass.__subclasses__()\n\n Each class keeps a list of weak references to its immediate\n subclasses. This method returns a list of all those references\n still alive. Example:\n\n >>> int.__subclasses__()\n [<class \'bool\'>]\n\n-[ Footnotes ]-\n\n[1] Additional information on these special methods may be found\n in the Python Reference Manual (*Basic customization*).\n\n[2] As a consequence, the list "[1, 2]" is considered equal to\n "[1.0, 2.0]", and similarly for tuples.\n\n[3] They must have since the parser can\'t tell the type of the\n operands.\n\n[4] Cased characters are those with general category property\n being one of "Lu" (Letter, uppercase), "Ll" (Letter, lowercase),\n or "Lt" (Letter, titlecase).\n\n[5] To format only a tuple you should therefore provide a\n singleton tuple whose only element is the tuple to be formatted.\n',
- 'specialnames': u'\nSpecial method names\n********************\n\nA class can implement certain operations that are invoked by special\nsyntax (such as arithmetic operations or subscripting and slicing) by\ndefining methods with special names. This is Python\'s approach to\n*operator overloading*, allowing classes to define their own behavior\nwith respect to language operators. For instance, if a class defines\na method named "__getitem__()", and "x" is an instance of this class,\nthen "x[i]" is roughly equivalent to "type(x).__getitem__(x, i)".\nExcept where mentioned, attempts to execute an operation raise an\nexception when no appropriate method is defined (typically\n"AttributeError" or "TypeError").\n\nWhen implementing a class that emulates any built-in type, it is\nimportant that the emulation only be implemented to the degree that it\nmakes sense for the object being modelled. For example, some\nsequences may work well with retrieval of individual elements, but\nextracting a slice may not make sense. (One example of this is the\n"NodeList" interface in the W3C\'s Document Object Model.)\n\n\nBasic customization\n===================\n\nobject.__new__(cls[, ...])\n\n Called to create a new instance of class *cls*. "__new__()" is a\n static method (special-cased so you need not declare it as such)\n that takes the class of which an instance was requested as its\n first argument. The remaining arguments are those passed to the\n object constructor expression (the call to the class). The return\n value of "__new__()" should be the new object instance (usually an\n instance of *cls*).\n\n Typical implementations create a new instance of the class by\n invoking the superclass\'s "__new__()" method using\n "super(currentclass, cls).__new__(cls[, ...])" with appropriate\n arguments and then modifying the newly-created instance as\n necessary before returning it.\n\n If "__new__()" returns an instance of *cls*, then the new\n instance\'s "__init__()" method will be invoked like\n "__init__(self[, ...])", where *self* is the new instance and the\n remaining arguments are the same as were passed to "__new__()".\n\n If "__new__()" does not return an instance of *cls*, then the new\n instance\'s "__init__()" method will not be invoked.\n\n "__new__()" is intended mainly to allow subclasses of immutable\n types (like int, str, or tuple) to customize instance creation. It\n is also commonly overridden in custom metaclasses in order to\n customize class creation.\n\nobject.__init__(self[, ...])\n\n Called after the instance has been created (by "__new__()"), but\n before it is returned to the caller. The arguments are those\n passed to the class constructor expression. If a base class has an\n "__init__()" method, the derived class\'s "__init__()" method, if\n any, must explicitly call it to ensure proper initialization of the\n base class part of the instance; for example:\n "BaseClass.__init__(self, [args...])".\n\n Because "__new__()" and "__init__()" work together in constructing\n objects ("__new__()" to create it, and "__init__()" to customise\n it), no non-"None" value may be returned by "__init__()"; doing so\n will cause a "TypeError" to be raised at runtime.\n\nobject.__del__(self)\n\n Called when the instance is about to be destroyed. This is also\n called a destructor. If a base class has a "__del__()" method, the\n derived class\'s "__del__()" method, if any, must explicitly call it\n to ensure proper deletion of the base class part of the instance.\n Note that it is possible (though not recommended!) for the\n "__del__()" method to postpone destruction of the instance by\n creating a new reference to it. It may then be called at a later\n time when this new reference is deleted. It is not guaranteed that\n "__del__()" methods are called for objects that still exist when\n the interpreter exits.\n\n Note: "del x" doesn\'t directly call "x.__del__()" --- the former\n decrements the reference count for "x" by one, and the latter is\n only called when "x"\'s reference count reaches zero. Some common\n situations that may prevent the reference count of an object from\n going to zero include: circular references between objects (e.g.,\n a doubly-linked list or a tree data structure with parent and\n child pointers); a reference to the object on the stack frame of\n a function that caught an exception (the traceback stored in\n "sys.exc_info()[2]" keeps the stack frame alive); or a reference\n to the object on the stack frame that raised an unhandled\n exception in interactive mode (the traceback stored in\n "sys.last_traceback" keeps the stack frame alive). The first\n situation can only be remedied by explicitly breaking the cycles;\n the second can be resolved by freeing the reference to the\n traceback object when it is no longer useful, and the third can\n be resolved by storing "None" in "sys.last_traceback". Circular\n references which are garbage are detected and cleaned up when the\n cyclic garbage collector is enabled (it\'s on by default). Refer\n to the documentation for the "gc" module for more information\n about this topic.\n\n Warning: Due to the precarious circumstances under which\n "__del__()" methods are invoked, exceptions that occur during\n their execution are ignored, and a warning is printed to\n "sys.stderr" instead. Also, when "__del__()" is invoked in\n response to a module being deleted (e.g., when execution of the\n program is done), other globals referenced by the "__del__()"\n method may already have been deleted or in the process of being\n torn down (e.g. the import machinery shutting down). For this\n reason, "__del__()" methods should do the absolute minimum needed\n to maintain external invariants. Starting with version 1.5,\n Python guarantees that globals whose name begins with a single\n underscore are deleted from their module before other globals are\n deleted; if no other references to such globals exist, this may\n help in assuring that imported modules are still available at the\n time when the "__del__()" method is called.\n\nobject.__repr__(self)\n\n Called by the "repr()" built-in function to compute the "official"\n string representation of an object. If at all possible, this\n should look like a valid Python expression that could be used to\n recreate an object with the same value (given an appropriate\n environment). If this is not possible, a string of the form\n "<...some useful description...>" should be returned. The return\n value must be a string object. If a class defines "__repr__()" but\n not "__str__()", then "__repr__()" is also used when an "informal"\n string representation of instances of that class is required.\n\n This is typically used for debugging, so it is important that the\n representation is information-rich and unambiguous.\n\nobject.__str__(self)\n\n Called by "str(object)" and the built-in functions "format()" and\n "print()" to compute the "informal" or nicely printable string\n representation of an object. The return value must be a *string*\n object.\n\n This method differs from "object.__repr__()" in that there is no\n expectation that "__str__()" return a valid Python expression: a\n more convenient or concise representation can be used.\n\n The default implementation defined by the built-in type "object"\n calls "object.__repr__()".\n\nobject.__bytes__(self)\n\n Called by "bytes()" to compute a byte-string representation of an\n object. This should return a "bytes" object.\n\nobject.__format__(self, format_spec)\n\n Called by the "format()" built-in function (and by extension, the\n "str.format()" method of class "str") to produce a "formatted"\n string representation of an object. The "format_spec" argument is a\n string that contains a description of the formatting options\n desired. The interpretation of the "format_spec" argument is up to\n the type implementing "__format__()", however most classes will\n either delegate formatting to one of the built-in types, or use a\n similar formatting option syntax.\n\n See *Format Specification Mini-Language* for a description of the\n standard formatting syntax.\n\n The return value must be a string object.\n\n Changed in version 3.4: The __format__ method of "object" itself\n raises a "TypeError" if passed any non-empty string.\n\nobject.__lt__(self, other)\nobject.__le__(self, other)\nobject.__eq__(self, other)\nobject.__ne__(self, other)\nobject.__gt__(self, other)\nobject.__ge__(self, other)\n\n These are the so-called "rich comparison" methods. The\n correspondence between operator symbols and method names is as\n follows: "x<y" calls "x.__lt__(y)", "x<=y" calls "x.__le__(y)",\n "x==y" calls "x.__eq__(y)", "x!=y" calls "x.__ne__(y)", "x>y" calls\n "x.__gt__(y)", and "x>=y" calls "x.__ge__(y)".\n\n A rich comparison method may return the singleton "NotImplemented"\n if it does not implement the operation for a given pair of\n arguments. By convention, "False" and "True" are returned for a\n successful comparison. However, these methods can return any value,\n so if the comparison operator is used in a Boolean context (e.g.,\n in the condition of an "if" statement), Python will call "bool()"\n on the value to determine if the result is true or false.\n\n By default, "__ne__()" delegates to "__eq__()" and inverts the\n result unless it is "NotImplemented". There are no other implied\n relationships among the comparison operators, for example, the\n truth of "(x<y or x==y)" does not imply "x<=y". To automatically\n generate ordering operations from a single root operation, see\n "functools.total_ordering()".\n\n See the paragraph on "__hash__()" for some important notes on\n creating *hashable* objects which support custom comparison\n operations and are usable as dictionary keys.\n\n There are no swapped-argument versions of these methods (to be used\n when the left argument does not support the operation but the right\n argument does); rather, "__lt__()" and "__gt__()" are each other\'s\n reflection, "__le__()" and "__ge__()" are each other\'s reflection,\n and "__eq__()" and "__ne__()" are their own reflection. If the\n operands are of different types, and right operand\'s type is a\n direct or indirect subclass of the left operand\'s type, the\n reflected method of the right operand has priority, otherwise the\n left operand\'s method has priority. Virtual subclassing is not\n considered.\n\nobject.__hash__(self)\n\n Called by built-in function "hash()" and for operations on members\n of hashed collections including "set", "frozenset", and "dict".\n "__hash__()" should return an integer. The only required property\n is that objects which compare equal have the same hash value; it is\n advised to somehow mix together (e.g. using exclusive or) the hash\n values for the components of the object that also play a part in\n comparison of objects.\n\n Note: "hash()" truncates the value returned from an object\'s\n custom "__hash__()" method to the size of a "Py_ssize_t". This\n is typically 8 bytes on 64-bit builds and 4 bytes on 32-bit\n builds. If an object\'s "__hash__()" must interoperate on builds\n of different bit sizes, be sure to check the width on all\n supported builds. An easy way to do this is with "python -c\n "import sys; print(sys.hash_info.width)"".\n\n If a class does not define an "__eq__()" method it should not\n define a "__hash__()" operation either; if it defines "__eq__()"\n but not "__hash__()", its instances will not be usable as items in\n hashable collections. If a class defines mutable objects and\n implements an "__eq__()" method, it should not implement\n "__hash__()", since the implementation of hashable collections\n requires that a key\'s hash value is immutable (if the object\'s hash\n value changes, it will be in the wrong hash bucket).\n\n User-defined classes have "__eq__()" and "__hash__()" methods by\n default; with them, all objects compare unequal (except with\n themselves) and "x.__hash__()" returns an appropriate value such\n that "x == y" implies both that "x is y" and "hash(x) == hash(y)".\n\n A class that overrides "__eq__()" and does not define "__hash__()"\n will have its "__hash__()" implicitly set to "None". When the\n "__hash__()" method of a class is "None", instances of the class\n will raise an appropriate "TypeError" when a program attempts to\n retrieve their hash value, and will also be correctly identified as\n unhashable when checking "isinstance(obj, collections.Hashable)".\n\n If a class that overrides "__eq__()" needs to retain the\n implementation of "__hash__()" from a parent class, the interpreter\n must be told this explicitly by setting "__hash__ =\n <ParentClass>.__hash__".\n\n If a class that does not override "__eq__()" wishes to suppress\n hash support, it should include "__hash__ = None" in the class\n definition. A class which defines its own "__hash__()" that\n explicitly raises a "TypeError" would be incorrectly identified as\n hashable by an "isinstance(obj, collections.Hashable)" call.\n\n Note: By default, the "__hash__()" values of str, bytes and\n datetime objects are "salted" with an unpredictable random value.\n Although they remain constant within an individual Python\n process, they are not predictable between repeated invocations of\n Python.This is intended to provide protection against a denial-\n of-service caused by carefully-chosen inputs that exploit the\n worst case performance of a dict insertion, O(n^2) complexity.\n See http://www.ocert.org/advisories/ocert-2011-003.html for\n details.Changing hash values affects the iteration order of\n dicts, sets and other mappings. Python has never made guarantees\n about this ordering (and it typically varies between 32-bit and\n 64-bit builds).See also "PYTHONHASHSEED".\n\n Changed in version 3.3: Hash randomization is enabled by default.\n\nobject.__bool__(self)\n\n Called to implement truth value testing and the built-in operation\n "bool()"; should return "False" or "True". When this method is not\n defined, "__len__()" is called, if it is defined, and the object is\n considered true if its result is nonzero. If a class defines\n neither "__len__()" nor "__bool__()", all its instances are\n considered true.\n\n\nCustomizing attribute access\n============================\n\nThe following methods can be defined to customize the meaning of\nattribute access (use of, assignment to, or deletion of "x.name") for\nclass instances.\n\nobject.__getattr__(self, name)\n\n Called when an attribute lookup has not found the attribute in the\n usual places (i.e. it is not an instance attribute nor is it found\n in the class tree for "self"). "name" is the attribute name. This\n method should return the (computed) attribute value or raise an\n "AttributeError" exception.\n\n Note that if the attribute is found through the normal mechanism,\n "__getattr__()" is not called. (This is an intentional asymmetry\n between "__getattr__()" and "__setattr__()".) This is done both for\n efficiency reasons and because otherwise "__getattr__()" would have\n no way to access other attributes of the instance. Note that at\n least for instance variables, you can fake total control by not\n inserting any values in the instance attribute dictionary (but\n instead inserting them in another object). See the\n "__getattribute__()" method below for a way to actually get total\n control over attribute access.\n\nobject.__getattribute__(self, name)\n\n Called unconditionally to implement attribute accesses for\n instances of the class. If the class also defines "__getattr__()",\n the latter will not be called unless "__getattribute__()" either\n calls it explicitly or raises an "AttributeError". This method\n should return the (computed) attribute value or raise an\n "AttributeError" exception. In order to avoid infinite recursion in\n this method, its implementation should always call the base class\n method with the same name to access any attributes it needs, for\n example, "object.__getattribute__(self, name)".\n\n Note: This method may still be bypassed when looking up special\n methods as the result of implicit invocation via language syntax\n or built-in functions. See *Special method lookup*.\n\nobject.__setattr__(self, name, value)\n\n Called when an attribute assignment is attempted. This is called\n instead of the normal mechanism (i.e. store the value in the\n instance dictionary). *name* is the attribute name, *value* is the\n value to be assigned to it.\n\n If "__setattr__()" wants to assign to an instance attribute, it\n should call the base class method with the same name, for example,\n "object.__setattr__(self, name, value)".\n\nobject.__delattr__(self, name)\n\n Like "__setattr__()" but for attribute deletion instead of\n assignment. This should only be implemented if "del obj.name" is\n meaningful for the object.\n\nobject.__dir__(self)\n\n Called when "dir()" is called on the object. A sequence must be\n returned. "dir()" converts the returned sequence to a list and\n sorts it.\n\n\nImplementing Descriptors\n------------------------\n\nThe following methods only apply when an instance of the class\ncontaining the method (a so-called *descriptor* class) appears in an\n*owner* class (the descriptor must be in either the owner\'s class\ndictionary or in the class dictionary for one of its parents). In the\nexamples below, "the attribute" refers to the attribute whose name is\nthe key of the property in the owner class\' "__dict__".\n\nobject.__get__(self, instance, owner)\n\n Called to get the attribute of the owner class (class attribute\n access) or of an instance of that class (instance attribute\n access). *owner* is always the owner class, while *instance* is the\n instance that the attribute was accessed through, or "None" when\n the attribute is accessed through the *owner*. This method should\n return the (computed) attribute value or raise an "AttributeError"\n exception.\n\nobject.__set__(self, instance, value)\n\n Called to set the attribute on an instance *instance* of the owner\n class to a new value, *value*.\n\nobject.__delete__(self, instance)\n\n Called to delete the attribute on an instance *instance* of the\n owner class.\n\nThe attribute "__objclass__" is interpreted by the "inspect" module as\nspecifying the class where this object was defined (setting this\nappropriately can assist in runtime introspection of dynamic class\nattributes). For callables, it may indicate that an instance of the\ngiven type (or a subclass) is expected or required as the first\npositional argument (for example, CPython sets this attribute for\nunbound methods that are implemented in C).\n\n\nInvoking Descriptors\n--------------------\n\nIn general, a descriptor is an object attribute with "binding\nbehavior", one whose attribute access has been overridden by methods\nin the descriptor protocol: "__get__()", "__set__()", and\n"__delete__()". If any of those methods are defined for an object, it\nis said to be a descriptor.\n\nThe default behavior for attribute access is to get, set, or delete\nthe attribute from an object\'s dictionary. For instance, "a.x" has a\nlookup chain starting with "a.__dict__[\'x\']", then\n"type(a).__dict__[\'x\']", and continuing through the base classes of\n"type(a)" excluding metaclasses.\n\nHowever, if the looked-up value is an object defining one of the\ndescriptor methods, then Python may override the default behavior and\ninvoke the descriptor method instead. Where this occurs in the\nprecedence chain depends on which descriptor methods were defined and\nhow they were called.\n\nThe starting point for descriptor invocation is a binding, "a.x". How\nthe arguments are assembled depends on "a":\n\nDirect Call\n The simplest and least common call is when user code directly\n invokes a descriptor method: "x.__get__(a)".\n\nInstance Binding\n If binding to an object instance, "a.x" is transformed into the\n call: "type(a).__dict__[\'x\'].__get__(a, type(a))".\n\nClass Binding\n If binding to a class, "A.x" is transformed into the call:\n "A.__dict__[\'x\'].__get__(None, A)".\n\nSuper Binding\n If "a" is an instance of "super", then the binding "super(B,\n obj).m()" searches "obj.__class__.__mro__" for the base class "A"\n immediately preceding "B" and then invokes the descriptor with the\n call: "A.__dict__[\'m\'].__get__(obj, obj.__class__)".\n\nFor instance bindings, the precedence of descriptor invocation depends\non the which descriptor methods are defined. A descriptor can define\nany combination of "__get__()", "__set__()" and "__delete__()". If it\ndoes not define "__get__()", then accessing the attribute will return\nthe descriptor object itself unless there is a value in the object\'s\ninstance dictionary. If the descriptor defines "__set__()" and/or\n"__delete__()", it is a data descriptor; if it defines neither, it is\na non-data descriptor. Normally, data descriptors define both\n"__get__()" and "__set__()", while non-data descriptors have just the\n"__get__()" method. Data descriptors with "__set__()" and "__get__()"\ndefined always override a redefinition in an instance dictionary. In\ncontrast, non-data descriptors can be overridden by instances.\n\nPython methods (including "staticmethod()" and "classmethod()") are\nimplemented as non-data descriptors. Accordingly, instances can\nredefine and override methods. This allows individual instances to\nacquire behaviors that differ from other instances of the same class.\n\nThe "property()" function is implemented as a data descriptor.\nAccordingly, instances cannot override the behavior of a property.\n\n\n__slots__\n---------\n\nBy default, instances of classes have a dictionary for attribute\nstorage. This wastes space for objects having very few instance\nvariables. The space consumption can become acute when creating large\nnumbers of instances.\n\nThe default can be overridden by defining *__slots__* in a class\ndefinition. The *__slots__* declaration takes a sequence of instance\nvariables and reserves just enough space in each instance to hold a\nvalue for each variable. Space is saved because *__dict__* is not\ncreated for each instance.\n\nobject.__slots__\n\n This class variable can be assigned a string, iterable, or sequence\n of strings with variable names used by instances. *__slots__*\n reserves space for the declared variables and prevents the\n automatic creation of *__dict__* and *__weakref__* for each\n instance.\n\n\nNotes on using *__slots__*\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n* When inheriting from a class without *__slots__*, the *__dict__*\n attribute of that class will always be accessible, so a *__slots__*\n definition in the subclass is meaningless.\n\n* Without a *__dict__* variable, instances cannot be assigned new\n variables not listed in the *__slots__* definition. Attempts to\n assign to an unlisted variable name raises "AttributeError". If\n dynamic assignment of new variables is desired, then add\n "\'__dict__\'" to the sequence of strings in the *__slots__*\n declaration.\n\n* Without a *__weakref__* variable for each instance, classes\n defining *__slots__* do not support weak references to its\n instances. If weak reference support is needed, then add\n "\'__weakref__\'" to the sequence of strings in the *__slots__*\n declaration.\n\n* *__slots__* are implemented at the class level by creating\n descriptors (*Implementing Descriptors*) for each variable name. As\n a result, class attributes cannot be used to set default values for\n instance variables defined by *__slots__*; otherwise, the class\n attribute would overwrite the descriptor assignment.\n\n* The action of a *__slots__* declaration is limited to the class\n where it is defined. As a result, subclasses will have a *__dict__*\n unless they also define *__slots__* (which must only contain names\n of any *additional* slots).\n\n* If a class defines a slot also defined in a base class, the\n instance variable defined by the base class slot is inaccessible\n (except by retrieving its descriptor directly from the base class).\n This renders the meaning of the program undefined. In the future, a\n check may be added to prevent this.\n\n* Nonempty *__slots__* does not work for classes derived from\n "variable-length" built-in types such as "int", "bytes" and "tuple".\n\n* Any non-string iterable may be assigned to *__slots__*. Mappings\n may also be used; however, in the future, special meaning may be\n assigned to the values corresponding to each key.\n\n* *__class__* assignment works only if both classes have the same\n *__slots__*.\n\n\nCustomizing class creation\n==========================\n\nBy default, classes are constructed using "type()". The class body is\nexecuted in a new namespace and the class name is bound locally to the\nresult of "type(name, bases, namespace)".\n\nThe class creation process can be customised by passing the\n"metaclass" keyword argument in the class definition line, or by\ninheriting from an existing class that included such an argument. In\nthe following example, both "MyClass" and "MySubclass" are instances\nof "Meta":\n\n class Meta(type):\n pass\n\n class MyClass(metaclass=Meta):\n pass\n\n class MySubclass(MyClass):\n pass\n\nAny other keyword arguments that are specified in the class definition\nare passed through to all metaclass operations described below.\n\nWhen a class definition is executed, the following steps occur:\n\n* the appropriate metaclass is determined\n\n* the class namespace is prepared\n\n* the class body is executed\n\n* the class object is created\n\n\nDetermining the appropriate metaclass\n-------------------------------------\n\nThe appropriate metaclass for a class definition is determined as\nfollows:\n\n* if no bases and no explicit metaclass are given, then "type()" is\n used\n\n* if an explicit metaclass is given and it is *not* an instance of\n "type()", then it is used directly as the metaclass\n\n* if an instance of "type()" is given as the explicit metaclass, or\n bases are defined, then the most derived metaclass is used\n\nThe most derived metaclass is selected from the explicitly specified\nmetaclass (if any) and the metaclasses (i.e. "type(cls)") of all\nspecified base classes. The most derived metaclass is one which is a\nsubtype of *all* of these candidate metaclasses. If none of the\ncandidate metaclasses meets that criterion, then the class definition\nwill fail with "TypeError".\n\n\nPreparing the class namespace\n-----------------------------\n\nOnce the appropriate metaclass has been identified, then the class\nnamespace is prepared. If the metaclass has a "__prepare__" attribute,\nit is called as "namespace = metaclass.__prepare__(name, bases,\n**kwds)" (where the additional keyword arguments, if any, come from\nthe class definition).\n\nIf the metaclass has no "__prepare__" attribute, then the class\nnamespace is initialised as an empty "dict()" instance.\n\nSee also: **PEP 3115** - Metaclasses in Python 3000\n\n Introduced the "__prepare__" namespace hook\n\n\nExecuting the class body\n------------------------\n\nThe class body is executed (approximately) as "exec(body, globals(),\nnamespace)". The key difference from a normal call to "exec()" is that\nlexical scoping allows the class body (including any methods) to\nreference names from the current and outer scopes when the class\ndefinition occurs inside a function.\n\nHowever, even when the class definition occurs inside the function,\nmethods defined inside the class still cannot see names defined at the\nclass scope. Class variables must be accessed through the first\nparameter of instance or class methods, and cannot be accessed at all\nfrom static methods.\n\n\nCreating the class object\n-------------------------\n\nOnce the class namespace has been populated by executing the class\nbody, the class object is created by calling "metaclass(name, bases,\nnamespace, **kwds)" (the additional keywords passed here are the same\nas those passed to "__prepare__").\n\nThis class object is the one that will be referenced by the zero-\nargument form of "super()". "__class__" is an implicit closure\nreference created by the compiler if any methods in a class body refer\nto either "__class__" or "super". This allows the zero argument form\nof "super()" to correctly identify the class being defined based on\nlexical scoping, while the class or instance that was used to make the\ncurrent call is identified based on the first argument passed to the\nmethod.\n\nAfter the class object is created, it is passed to the class\ndecorators included in the class definition (if any) and the resulting\nobject is bound in the local namespace as the defined class.\n\nSee also: **PEP 3135** - New super\n\n Describes the implicit "__class__" closure reference\n\n\nMetaclass example\n-----------------\n\nThe potential uses for metaclasses are boundless. Some ideas that have\nbeen explored include logging, interface checking, automatic\ndelegation, automatic property creation, proxies, frameworks, and\nautomatic resource locking/synchronization.\n\nHere is an example of a metaclass that uses an\n"collections.OrderedDict" to remember the order that class variables\nare defined:\n\n class OrderedClass(type):\n\n @classmethod\n def __prepare__(metacls, name, bases, **kwds):\n return collections.OrderedDict()\n\n def __new__(cls, name, bases, namespace, **kwds):\n result = type.__new__(cls, name, bases, dict(namespace))\n result.members = tuple(namespace)\n return result\n\n class A(metaclass=OrderedClass):\n def one(self): pass\n def two(self): pass\n def three(self): pass\n def four(self): pass\n\n >>> A.members\n (\'__module__\', \'one\', \'two\', \'three\', \'four\')\n\nWhen the class definition for *A* gets executed, the process begins\nwith calling the metaclass\'s "__prepare__()" method which returns an\nempty "collections.OrderedDict". That mapping records the methods and\nattributes of *A* as they are defined within the body of the class\nstatement. Once those definitions are executed, the ordered dictionary\nis fully populated and the metaclass\'s "__new__()" method gets\ninvoked. That method builds the new type and it saves the ordered\ndictionary keys in an attribute called "members".\n\n\nCustomizing instance and subclass checks\n========================================\n\nThe following methods are used to override the default behavior of the\n"isinstance()" and "issubclass()" built-in functions.\n\nIn particular, the metaclass "abc.ABCMeta" implements these methods in\norder to allow the addition of Abstract Base Classes (ABCs) as\n"virtual base classes" to any class or type (including built-in\ntypes), including other ABCs.\n\nclass.__instancecheck__(self, instance)\n\n Return true if *instance* should be considered a (direct or\n indirect) instance of *class*. If defined, called to implement\n "isinstance(instance, class)".\n\nclass.__subclasscheck__(self, subclass)\n\n Return true if *subclass* should be considered a (direct or\n indirect) subclass of *class*. If defined, called to implement\n "issubclass(subclass, class)".\n\nNote that these methods are looked up on the type (metaclass) of a\nclass. They cannot be defined as class methods in the actual class.\nThis is consistent with the lookup of special methods that are called\non instances, only in this case the instance is itself a class.\n\nSee also: **PEP 3119** - Introducing Abstract Base Classes\n\n Includes the specification for customizing "isinstance()" and\n "issubclass()" behavior through "__instancecheck__()" and\n "__subclasscheck__()", with motivation for this functionality in\n the context of adding Abstract Base Classes (see the "abc"\n module) to the language.\n\n\nEmulating callable objects\n==========================\n\nobject.__call__(self[, args...])\n\n Called when the instance is "called" as a function; if this method\n is defined, "x(arg1, arg2, ...)" is a shorthand for\n "x.__call__(arg1, arg2, ...)".\n\n\nEmulating container types\n=========================\n\nThe following methods can be defined to implement container objects.\nContainers usually are sequences (such as lists or tuples) or mappings\n(like dictionaries), but can represent other containers as well. The\nfirst set of methods is used either to emulate a sequence or to\nemulate a mapping; the difference is that for a sequence, the\nallowable keys should be the integers *k* for which "0 <= k < N" where\n*N* is the length of the sequence, or slice objects, which define a\nrange of items. It is also recommended that mappings provide the\nmethods "keys()", "values()", "items()", "get()", "clear()",\n"setdefault()", "pop()", "popitem()", "copy()", and "update()"\nbehaving similar to those for Python\'s standard dictionary objects.\nThe "collections" module provides a "MutableMapping" abstract base\nclass to help create those methods from a base set of "__getitem__()",\n"__setitem__()", "__delitem__()", and "keys()". Mutable sequences\nshould provide methods "append()", "count()", "index()", "extend()",\n"insert()", "pop()", "remove()", "reverse()" and "sort()", like Python\nstandard list objects. Finally, sequence types should implement\naddition (meaning concatenation) and multiplication (meaning\nrepetition) by defining the methods "__add__()", "__radd__()",\n"__iadd__()", "__mul__()", "__rmul__()" and "__imul__()" described\nbelow; they should not define other numerical operators. It is\nrecommended that both mappings and sequences implement the\n"__contains__()" method to allow efficient use of the "in" operator;\nfor mappings, "in" should search the mapping\'s keys; for sequences, it\nshould search through the values. It is further recommended that both\nmappings and sequences implement the "__iter__()" method to allow\nefficient iteration through the container; for mappings, "__iter__()"\nshould be the same as "keys()"; for sequences, it should iterate\nthrough the values.\n\nobject.__len__(self)\n\n Called to implement the built-in function "len()". Should return\n the length of the object, an integer ">=" 0. Also, an object that\n doesn\'t define a "__bool__()" method and whose "__len__()" method\n returns zero is considered to be false in a Boolean context.\n\nobject.__length_hint__(self)\n\n Called to implement "operator.length_hint()". Should return an\n estimated length for the object (which may be greater or less than\n the actual length). The length must be an integer ">=" 0. This\n method is purely an optimization and is never required for\n correctness.\n\n New in version 3.4.\n\nNote: Slicing is done exclusively with the following three methods.\n A call like\n\n a[1:2] = b\n\n is translated to\n\n a[slice(1, 2, None)] = b\n\n and so forth. Missing slice items are always filled in with "None".\n\nobject.__getitem__(self, key)\n\n Called to implement evaluation of "self[key]". For sequence types,\n the accepted keys should be integers and slice objects. Note that\n the special interpretation of negative indexes (if the class wishes\n to emulate a sequence type) is up to the "__getitem__()" method. If\n *key* is of an inappropriate type, "TypeError" may be raised; if of\n a value outside the set of indexes for the sequence (after any\n special interpretation of negative values), "IndexError" should be\n raised. For mapping types, if *key* is missing (not in the\n container), "KeyError" should be raised.\n\n Note: "for" loops expect that an "IndexError" will be raised for\n illegal indexes to allow proper detection of the end of the\n sequence.\n\nobject.__missing__(self, key)\n\n Called by "dict"."__getitem__()" to implement "self[key]" for dict\n subclasses when key is not in the dictionary.\n\nobject.__setitem__(self, key, value)\n\n Called to implement assignment to "self[key]". Same note as for\n "__getitem__()". This should only be implemented for mappings if\n the objects support changes to the values for keys, or if new keys\n can be added, or for sequences if elements can be replaced. The\n same exceptions should be raised for improper *key* values as for\n the "__getitem__()" method.\n\nobject.__delitem__(self, key)\n\n Called to implement deletion of "self[key]". Same note as for\n "__getitem__()". This should only be implemented for mappings if\n the objects support removal of keys, or for sequences if elements\n can be removed from the sequence. The same exceptions should be\n raised for improper *key* values as for the "__getitem__()" method.\n\nobject.__iter__(self)\n\n This method is called when an iterator is required for a container.\n This method should return a new iterator object that can iterate\n over all the objects in the container. For mappings, it should\n iterate over the keys of the container.\n\n Iterator objects also need to implement this method; they are\n required to return themselves. For more information on iterator\n objects, see *Iterator Types*.\n\nobject.__reversed__(self)\n\n Called (if present) by the "reversed()" built-in to implement\n reverse iteration. It should return a new iterator object that\n iterates over all the objects in the container in reverse order.\n\n If the "__reversed__()" method is not provided, the "reversed()"\n built-in will fall back to using the sequence protocol ("__len__()"\n and "__getitem__()"). Objects that support the sequence protocol\n should only provide "__reversed__()" if they can provide an\n implementation that is more efficient than the one provided by\n "reversed()".\n\nThe membership test operators ("in" and "not in") are normally\nimplemented as an iteration through a sequence. However, container\nobjects can supply the following special method with a more efficient\nimplementation, which also does not require the object be a sequence.\n\nobject.__contains__(self, item)\n\n Called to implement membership test operators. Should return true\n if *item* is in *self*, false otherwise. For mapping objects, this\n should consider the keys of the mapping rather than the values or\n the key-item pairs.\n\n For objects that don\'t define "__contains__()", the membership test\n first tries iteration via "__iter__()", then the old sequence\n iteration protocol via "__getitem__()", see *this section in the\n language reference*.\n\n\nEmulating numeric types\n=======================\n\nThe following methods can be defined to emulate numeric objects.\nMethods corresponding to operations that are not supported by the\nparticular kind of number implemented (e.g., bitwise operations for\nnon-integral numbers) should be left undefined.\n\nobject.__add__(self, other)\nobject.__sub__(self, other)\nobject.__mul__(self, other)\nobject.__truediv__(self, other)\nobject.__floordiv__(self, other)\nobject.__mod__(self, other)\nobject.__divmod__(self, other)\nobject.__pow__(self, other[, modulo])\nobject.__lshift__(self, other)\nobject.__rshift__(self, other)\nobject.__and__(self, other)\nobject.__xor__(self, other)\nobject.__or__(self, other)\n\n These methods are called to implement the binary arithmetic\n operations ("+", "-", "*", "/", "//", "%", "divmod()", "pow()",\n "**", "<<", ">>", "&", "^", "|"). For instance, to evaluate the\n expression "x + y", where *x* is an instance of a class that has an\n "__add__()" method, "x.__add__(y)" is called. The "__divmod__()"\n method should be the equivalent to using "__floordiv__()" and\n "__mod__()"; it should not be related to "__truediv__()". Note\n that "__pow__()" should be defined to accept an optional third\n argument if the ternary version of the built-in "pow()" function is\n to be supported.\n\n If one of those methods does not support the operation with the\n supplied arguments, it should return "NotImplemented".\n\nobject.__radd__(self, other)\nobject.__rsub__(self, other)\nobject.__rmul__(self, other)\nobject.__rtruediv__(self, other)\nobject.__rfloordiv__(self, other)\nobject.__rmod__(self, other)\nobject.__rdivmod__(self, other)\nobject.__rpow__(self, other)\nobject.__rlshift__(self, other)\nobject.__rrshift__(self, other)\nobject.__rand__(self, other)\nobject.__rxor__(self, other)\nobject.__ror__(self, other)\n\n These methods are called to implement the binary arithmetic\n operations ("+", "-", "*", "/", "//", "%", "divmod()", "pow()",\n "**", "<<", ">>", "&", "^", "|") with reflected (swapped) operands.\n These functions are only called if the left operand does not\n support the corresponding operation and the operands are of\n different types. [2] For instance, to evaluate the expression "x -\n y", where *y* is an instance of a class that has an "__rsub__()"\n method, "y.__rsub__(x)" is called if "x.__sub__(y)" returns\n *NotImplemented*.\n\n Note that ternary "pow()" will not try calling "__rpow__()" (the\n coercion rules would become too complicated).\n\n Note: If the right operand\'s type is a subclass of the left\n operand\'s type and that subclass provides the reflected method\n for the operation, this method will be called before the left\n operand\'s non-reflected method. This behavior allows subclasses\n to override their ancestors\' operations.\n\nobject.__iadd__(self, other)\nobject.__isub__(self, other)\nobject.__imul__(self, other)\nobject.__itruediv__(self, other)\nobject.__ifloordiv__(self, other)\nobject.__imod__(self, other)\nobject.__ipow__(self, other[, modulo])\nobject.__ilshift__(self, other)\nobject.__irshift__(self, other)\nobject.__iand__(self, other)\nobject.__ixor__(self, other)\nobject.__ior__(self, other)\n\n These methods are called to implement the augmented arithmetic\n assignments ("+=", "-=", "*=", "/=", "//=", "%=", "**=", "<<=",\n ">>=", "&=", "^=", "|="). These methods should attempt to do the\n operation in-place (modifying *self*) and return the result (which\n could be, but does not have to be, *self*). If a specific method\n is not defined, the augmented assignment falls back to the normal\n methods. For instance, if *x* is an instance of a class with an\n "__iadd__()" method, "x += y" is equivalent to "x = x.__iadd__(y)"\n . Otherwise, "x.__add__(y)" and "y.__radd__(x)" are considered, as\n with the evaluation of "x + y". In certain situations, augmented\n assignment can result in unexpected errors (see *Why does\n a_tuple[i] += [\'item\'] raise an exception when the addition\n works?*), but this behavior is in fact part of the data model.\n\nobject.__neg__(self)\nobject.__pos__(self)\nobject.__abs__(self)\nobject.__invert__(self)\n\n Called to implement the unary arithmetic operations ("-", "+",\n "abs()" and "~").\n\nobject.__complex__(self)\nobject.__int__(self)\nobject.__float__(self)\nobject.__round__(self[, n])\n\n Called to implement the built-in functions "complex()", "int()",\n "float()" and "round()". Should return a value of the appropriate\n type.\n\nobject.__index__(self)\n\n Called to implement "operator.index()", and whenever Python needs\n to losslessly convert the numeric object to an integer object (such\n as in slicing, or in the built-in "bin()", "hex()" and "oct()"\n functions). Presence of this method indicates that the numeric\n object is an integer type. Must return an integer.\n\n Note: In order to have a coherent integer type class, when\n "__index__()" is defined "__int__()" should also be defined, and\n both should return the same value.\n\n\nWith Statement Context Managers\n===============================\n\nA *context manager* is an object that defines the runtime context to\nbe established when executing a "with" statement. The context manager\nhandles the entry into, and the exit from, the desired runtime context\nfor the execution of the block of code. Context managers are normally\ninvoked using the "with" statement (described in section *The with\nstatement*), but can also be used by directly invoking their methods.\n\nTypical uses of context managers include saving and restoring various\nkinds of global state, locking and unlocking resources, closing opened\nfiles, etc.\n\nFor more information on context managers, see *Context Manager Types*.\n\nobject.__enter__(self)\n\n Enter the runtime context related to this object. The "with"\n statement will bind this method\'s return value to the target(s)\n specified in the "as" clause of the statement, if any.\n\nobject.__exit__(self, exc_type, exc_value, traceback)\n\n Exit the runtime context related to this object. The parameters\n describe the exception that caused the context to be exited. If the\n context was exited without an exception, all three arguments will\n be "None".\n\n If an exception is supplied, and the method wishes to suppress the\n exception (i.e., prevent it from being propagated), it should\n return a true value. Otherwise, the exception will be processed\n normally upon exit from this method.\n\n Note that "__exit__()" methods should not reraise the passed-in\n exception; this is the caller\'s responsibility.\n\nSee also: **PEP 0343** - The "with" statement\n\n The specification, background, and examples for the Python "with"\n statement.\n\n\nSpecial method lookup\n=====================\n\nFor custom classes, implicit invocations of special methods are only\nguaranteed to work correctly if defined on an object\'s type, not in\nthe object\'s instance dictionary. That behaviour is the reason why\nthe following code raises an exception:\n\n >>> class C:\n ... pass\n ...\n >>> c = C()\n >>> c.__len__ = lambda: 5\n >>> len(c)\n Traceback (most recent call last):\n File "<stdin>", line 1, in <module>\n TypeError: object of type \'C\' has no len()\n\nThe rationale behind this behaviour lies with a number of special\nmethods such as "__hash__()" and "__repr__()" that are implemented by\nall objects, including type objects. If the implicit lookup of these\nmethods used the conventional lookup process, they would fail when\ninvoked on the type object itself:\n\n >>> 1 .__hash__() == hash(1)\n True\n >>> int.__hash__() == hash(int)\n Traceback (most recent call last):\n File "<stdin>", line 1, in <module>\n TypeError: descriptor \'__hash__\' of \'int\' object needs an argument\n\nIncorrectly attempting to invoke an unbound method of a class in this\nway is sometimes referred to as \'metaclass confusion\', and is avoided\nby bypassing the instance when looking up special methods:\n\n >>> type(1).__hash__(1) == hash(1)\n True\n >>> type(int).__hash__(int) == hash(int)\n True\n\nIn addition to bypassing any instance attributes in the interest of\ncorrectness, implicit special method lookup generally also bypasses\nthe "__getattribute__()" method even of the object\'s metaclass:\n\n >>> class Meta(type):\n ... def __getattribute__(*args):\n ... print("Metaclass getattribute invoked")\n ... return type.__getattribute__(*args)\n ...\n >>> class C(object, metaclass=Meta):\n ... def __len__(self):\n ... return 10\n ... def __getattribute__(*args):\n ... print("Class getattribute invoked")\n ... return object.__getattribute__(*args)\n ...\n >>> c = C()\n >>> c.__len__() # Explicit lookup via instance\n Class getattribute invoked\n 10\n >>> type(c).__len__(c) # Explicit lookup via type\n Metaclass getattribute invoked\n 10\n >>> len(c) # Implicit lookup\n 10\n\nBypassing the "__getattribute__()" machinery in this fashion provides\nsignificant scope for speed optimisations within the interpreter, at\nthe cost of some flexibility in the handling of special methods (the\nspecial method *must* be set on the class object itself in order to be\nconsistently invoked by the interpreter).\n\n-[ Footnotes ]-\n\n[1] It *is* possible in some cases to change an object\'s type,\n under certain controlled conditions. It generally isn\'t a good\n idea though, since it can lead to some very strange behaviour if\n it is handled incorrectly.\n\n[2] For operands of the same type, it is assumed that if the non-\n reflected method (such as "__add__()") fails the operation is not\n supported, which is why the reflected method is not called.\n',
- 'string-methods': u'\nString Methods\n**************\n\nStrings implement all of the *common* sequence operations, along with\nthe additional methods described below.\n\nStrings also support two styles of string formatting, one providing a\nlarge degree of flexibility and customization (see "str.format()",\n*Format String Syntax* and *String Formatting*) and the other based on\nC "printf" style formatting that handles a narrower range of types and\nis slightly harder to use correctly, but is often faster for the cases\nit can handle (*printf-style String Formatting*).\n\nThe *Text Processing Services* section of the standard library covers\na number of other modules that provide various text related utilities\n(including regular expression support in the "re" module).\n\nstr.capitalize()\n\n Return a copy of the string with its first character capitalized\n and the rest lowercased.\n\nstr.casefold()\n\n Return a casefolded copy of the string. Casefolded strings may be\n used for caseless matching.\n\n Casefolding is similar to lowercasing but more aggressive because\n it is intended to remove all case distinctions in a string. For\n example, the German lowercase letter "\'\xdf\'" is equivalent to ""ss"".\n Since it is already lowercase, "lower()" would do nothing to "\'\xdf\'";\n "casefold()" converts it to ""ss"".\n\n The casefolding algorithm is described in section 3.13 of the\n Unicode Standard.\n\n New in version 3.3.\n\nstr.center(width[, fillchar])\n\n Return centered in a string of length *width*. Padding is done\n using the specified *fillchar* (default is an ASCII space). The\n original string is returned if *width* is less than or equal to\n "len(s)".\n\nstr.count(sub[, start[, end]])\n\n Return the number of non-overlapping occurrences of substring *sub*\n in the range [*start*, *end*]. Optional arguments *start* and\n *end* are interpreted as in slice notation.\n\nstr.encode(encoding="utf-8", errors="strict")\n\n Return an encoded version of the string as a bytes object. Default\n encoding is "\'utf-8\'". *errors* may be given to set a different\n error handling scheme. The default for *errors* is "\'strict\'",\n meaning that encoding errors raise a "UnicodeError". Other possible\n values are "\'ignore\'", "\'replace\'", "\'xmlcharrefreplace\'",\n "\'backslashreplace\'" and any other name registered via\n "codecs.register_error()", see section *Error Handlers*. For a list\n of possible encodings, see section *Standard Encodings*.\n\n Changed in version 3.1: Support for keyword arguments added.\n\nstr.endswith(suffix[, start[, end]])\n\n Return "True" if the string ends with the specified *suffix*,\n otherwise return "False". *suffix* can also be a tuple of suffixes\n to look for. With optional *start*, test beginning at that\n position. With optional *end*, stop comparing at that position.\n\nstr.expandtabs(tabsize=8)\n\n Return a copy of the string where all tab characters are replaced\n by one or more spaces, depending on the current column and the\n given tab size. Tab positions occur every *tabsize* characters\n (default is 8, giving tab positions at columns 0, 8, 16 and so on).\n To expand the string, the current column is set to zero and the\n string is examined character by character. If the character is a\n tab ("\\t"), one or more space characters are inserted in the result\n until the current column is equal to the next tab position. (The\n tab character itself is not copied.) If the character is a newline\n ("\\n") or return ("\\r"), it is copied and the current column is\n reset to zero. Any other character is copied unchanged and the\n current column is incremented by one regardless of how the\n character is represented when printed.\n\n >>> \'01\\t012\\t0123\\t01234\'.expandtabs()\n \'01 012 0123 01234\'\n >>> \'01\\t012\\t0123\\t01234\'.expandtabs(4)\n \'01 012 0123 01234\'\n\nstr.find(sub[, start[, end]])\n\n Return the lowest index in the string where substring *sub* is\n found, such that *sub* is contained in the slice "s[start:end]".\n Optional arguments *start* and *end* are interpreted as in slice\n notation. Return "-1" if *sub* is not found.\n\n Note: The "find()" method should be used only if you need to know\n the position of *sub*. To check if *sub* is a substring or not,\n use the "in" operator:\n\n >>> \'Py\' in \'Python\'\n True\n\nstr.format(*args, **kwargs)\n\n Perform a string formatting operation. The string on which this\n method is called can contain literal text or replacement fields\n delimited by braces "{}". Each replacement field contains either\n the numeric index of a positional argument, or the name of a\n keyword argument. Returns a copy of the string where each\n replacement field is replaced with the string value of the\n corresponding argument.\n\n >>> "The sum of 1 + 2 is {0}".format(1+2)\n \'The sum of 1 + 2 is 3\'\n\n See *Format String Syntax* for a description of the various\n formatting options that can be specified in format strings.\n\nstr.format_map(mapping)\n\n Similar to "str.format(**mapping)", except that "mapping" is used\n directly and not copied to a "dict". This is useful if for example\n "mapping" is a dict subclass:\n\n >>> class Default(dict):\n ... def __missing__(self, key):\n ... return key\n ...\n >>> \'{name} was born in {country}\'.format_map(Default(name=\'Guido\'))\n \'Guido was born in country\'\n\n New in version 3.2.\n\nstr.index(sub[, start[, end]])\n\n Like "find()", but raise "ValueError" when the substring is not\n found.\n\nstr.isalnum()\n\n Return true if all characters in the string are alphanumeric and\n there is at least one character, false otherwise. A character "c"\n is alphanumeric if one of the following returns "True":\n "c.isalpha()", "c.isdecimal()", "c.isdigit()", or "c.isnumeric()".\n\nstr.isalpha()\n\n Return true if all characters in the string are alphabetic and\n there is at least one character, false otherwise. Alphabetic\n characters are those characters defined in the Unicode character\n database as "Letter", i.e., those with general category property\n being one of "Lm", "Lt", "Lu", "Ll", or "Lo". Note that this is\n different from the "Alphabetic" property defined in the Unicode\n Standard.\n\nstr.isdecimal()\n\n Return true if all characters in the string are decimal characters\n and there is at least one character, false otherwise. Decimal\n characters are those from general category "Nd". This category\n includes digit characters, and all characters that can be used to\n form decimal-radix numbers, e.g. U+0660, ARABIC-INDIC DIGIT ZERO.\n\nstr.isdigit()\n\n Return true if all characters in the string are digits and there is\n at least one character, false otherwise. Digits include decimal\n characters and digits that need special handling, such as the\n compatibility superscript digits. Formally, a digit is a character\n that has the property value Numeric_Type=Digit or\n Numeric_Type=Decimal.\n\nstr.isidentifier()\n\n Return true if the string is a valid identifier according to the\n language definition, section *Identifiers and keywords*.\n\n Use "keyword.iskeyword()" to test for reserved identifiers such as\n "def" and "class".\n\nstr.islower()\n\n Return true if all cased characters [4] in the string are lowercase\n and there is at least one cased character, false otherwise.\n\nstr.isnumeric()\n\n Return true if all characters in the string are numeric characters,\n and there is at least one character, false otherwise. Numeric\n characters include digit characters, and all characters that have\n the Unicode numeric value property, e.g. U+2155, VULGAR FRACTION\n ONE FIFTH. Formally, numeric characters are those with the\n property value Numeric_Type=Digit, Numeric_Type=Decimal or\n Numeric_Type=Numeric.\n\nstr.isprintable()\n\n Return true if all characters in the string are printable or the\n string is empty, false otherwise. Nonprintable characters are\n those characters defined in the Unicode character database as\n "Other" or "Separator", excepting the ASCII space (0x20) which is\n considered printable. (Note that printable characters in this\n context are those which should not be escaped when "repr()" is\n invoked on a string. It has no bearing on the handling of strings\n written to "sys.stdout" or "sys.stderr".)\n\nstr.isspace()\n\n Return true if there are only whitespace characters in the string\n and there is at least one character, false otherwise. Whitespace\n characters are those characters defined in the Unicode character\n database as "Other" or "Separator" and those with bidirectional\n property being one of "WS", "B", or "S".\n\nstr.istitle()\n\n Return true if the string is a titlecased string and there is at\n least one character, for example uppercase characters may only\n follow uncased characters and lowercase characters only cased ones.\n Return false otherwise.\n\nstr.isupper()\n\n Return true if all cased characters [4] in the string are uppercase\n and there is at least one cased character, false otherwise.\n\nstr.join(iterable)\n\n Return a string which is the concatenation of the strings in the\n *iterable* *iterable*. A "TypeError" will be raised if there are\n any non-string values in *iterable*, including "bytes" objects.\n The separator between elements is the string providing this method.\n\nstr.ljust(width[, fillchar])\n\n Return the string left justified in a string of length *width*.\n Padding is done using the specified *fillchar* (default is an ASCII\n space). The original string is returned if *width* is less than or\n equal to "len(s)".\n\nstr.lower()\n\n Return a copy of the string with all the cased characters [4]\n converted to lowercase.\n\n The lowercasing algorithm used is described in section 3.13 of the\n Unicode Standard.\n\nstr.lstrip([chars])\n\n Return a copy of the string with leading characters removed. The\n *chars* argument is a string specifying the set of characters to be\n removed. If omitted or "None", the *chars* argument defaults to\n removing whitespace. The *chars* argument is not a prefix; rather,\n all combinations of its values are stripped:\n\n >>> \' spacious \'.lstrip()\n \'spacious \'\n >>> \'www.example.com\'.lstrip(\'cmowz.\')\n \'example.com\'\n\nstatic str.maketrans(x[, y[, z]])\n\n This static method returns a translation table usable for\n "str.translate()".\n\n If there is only one argument, it must be a dictionary mapping\n Unicode ordinals (integers) or characters (strings of length 1) to\n Unicode ordinals, strings (of arbitrary lengths) or None.\n Character keys will then be converted to ordinals.\n\n If there are two arguments, they must be strings of equal length,\n and in the resulting dictionary, each character in x will be mapped\n to the character at the same position in y. If there is a third\n argument, it must be a string, whose characters will be mapped to\n None in the result.\n\nstr.partition(sep)\n\n Split the string at the first occurrence of *sep*, and return a\n 3-tuple containing the part before the separator, the separator\n itself, and the part after the separator. If the separator is not\n found, return a 3-tuple containing the string itself, followed by\n two empty strings.\n\nstr.replace(old, new[, count])\n\n Return a copy of the string with all occurrences of substring *old*\n replaced by *new*. If the optional argument *count* is given, only\n the first *count* occurrences are replaced.\n\nstr.rfind(sub[, start[, end]])\n\n Return the highest index in the string where substring *sub* is\n found, such that *sub* is contained within "s[start:end]".\n Optional arguments *start* and *end* are interpreted as in slice\n notation. Return "-1" on failure.\n\nstr.rindex(sub[, start[, end]])\n\n Like "rfind()" but raises "ValueError" when the substring *sub* is\n not found.\n\nstr.rjust(width[, fillchar])\n\n Return the string right justified in a string of length *width*.\n Padding is done using the specified *fillchar* (default is an ASCII\n space). The original string is returned if *width* is less than or\n equal to "len(s)".\n\nstr.rpartition(sep)\n\n Split the string at the last occurrence of *sep*, and return a\n 3-tuple containing the part before the separator, the separator\n itself, and the part after the separator. If the separator is not\n found, return a 3-tuple containing two empty strings, followed by\n the string itself.\n\nstr.rsplit(sep=None, maxsplit=-1)\n\n Return a list of the words in the string, using *sep* as the\n delimiter string. If *maxsplit* is given, at most *maxsplit* splits\n are done, the *rightmost* ones. If *sep* is not specified or\n "None", any whitespace string is a separator. Except for splitting\n from the right, "rsplit()" behaves like "split()" which is\n described in detail below.\n\nstr.rstrip([chars])\n\n Return a copy of the string with trailing characters removed. The\n *chars* argument is a string specifying the set of characters to be\n removed. If omitted or "None", the *chars* argument defaults to\n removing whitespace. The *chars* argument is not a suffix; rather,\n all combinations of its values are stripped:\n\n >>> \' spacious \'.rstrip()\n \' spacious\'\n >>> \'mississippi\'.rstrip(\'ipz\')\n \'mississ\'\n\nstr.split(sep=None, maxsplit=-1)\n\n Return a list of the words in the string, using *sep* as the\n delimiter string. If *maxsplit* is given, at most *maxsplit*\n splits are done (thus, the list will have at most "maxsplit+1"\n elements). If *maxsplit* is not specified or "-1", then there is\n no limit on the number of splits (all possible splits are made).\n\n If *sep* is given, consecutive delimiters are not grouped together\n and are deemed to delimit empty strings (for example,\n "\'1,,2\'.split(\',\')" returns "[\'1\', \'\', \'2\']"). The *sep* argument\n may consist of multiple characters (for example,\n "\'1<>2<>3\'.split(\'<>\')" returns "[\'1\', \'2\', \'3\']"). Splitting an\n empty string with a specified separator returns "[\'\']".\n\n For example:\n\n >>> \'1,2,3\'.split(\',\')\n [\'1\', \'2\', \'3\']\n >>> \'1,2,3\'.split(\',\', maxsplit=1)\n [\'1\', \'2,3\']\n >>> \'1,2,,3,\'.split(\',\')\n [\'1\', \'2\', \'\', \'3\', \'\']\n\n If *sep* is not specified or is "None", a different splitting\n algorithm is applied: runs of consecutive whitespace are regarded\n as a single separator, and the result will contain no empty strings\n at the start or end if the string has leading or trailing\n whitespace. Consequently, splitting an empty string or a string\n consisting of just whitespace with a "None" separator returns "[]".\n\n For example:\n\n >>> \'1 2 3\'.split()\n [\'1\', \'2\', \'3\']\n >>> \'1 2 3\'.split(maxsplit=1)\n [\'1\', \'2 3\']\n >>> \' 1 2 3 \'.split()\n [\'1\', \'2\', \'3\']\n\nstr.splitlines([keepends])\n\n Return a list of the lines in the string, breaking at line\n boundaries. Line breaks are not included in the resulting list\n unless *keepends* is given and true.\n\n This method splits on the following line boundaries. In\n particular, the boundaries are a superset of *universal newlines*.\n\n +-------------------------+-------------------------------+\n | Representation | Description |\n +=========================+===============================+\n | "\\n" | Line Feed |\n +-------------------------+-------------------------------+\n | "\\r" | Carriage Return |\n +-------------------------+-------------------------------+\n | "\\r\\n" | Carriage Return + Line Feed |\n +-------------------------+-------------------------------+\n | "\\v" or "\\x0b" | Line Tabulation |\n +-------------------------+-------------------------------+\n | "\\f" or "\\x0c" | Form Feed |\n +-------------------------+-------------------------------+\n | "\\x1c" | File Separator |\n +-------------------------+-------------------------------+\n | "\\x1d" | Group Separator |\n +-------------------------+-------------------------------+\n | "\\x1e" | Record Separator |\n +-------------------------+-------------------------------+\n | "\\x85" | Next Line (C1 Control Code) |\n +-------------------------+-------------------------------+\n | "\\u2028" | Line Separator |\n +-------------------------+-------------------------------+\n | "\\u2029" | Paragraph Separator |\n +-------------------------+-------------------------------+\n\n Changed in version 3.2: "\\v" and "\\f" added to list of line\n boundaries.\n\n For example:\n\n >>> \'ab c\\n\\nde fg\\rkl\\r\\n\'.splitlines()\n [\'ab c\', \'\', \'de fg\', \'kl\']\n >>> \'ab c\\n\\nde fg\\rkl\\r\\n\'.splitlines(keepends=True)\n [\'ab c\\n\', \'\\n\', \'de fg\\r\', \'kl\\r\\n\']\n\n Unlike "split()" when a delimiter string *sep* is given, this\n method returns an empty list for the empty string, and a terminal\n line break does not result in an extra line:\n\n >>> "".splitlines()\n []\n >>> "One line\\n".splitlines()\n [\'One line\']\n\n For comparison, "split(\'\\n\')" gives:\n\n >>> \'\'.split(\'\\n\')\n [\'\']\n >>> \'Two lines\\n\'.split(\'\\n\')\n [\'Two lines\', \'\']\n\nstr.startswith(prefix[, start[, end]])\n\n Return "True" if string starts with the *prefix*, otherwise return\n "False". *prefix* can also be a tuple of prefixes to look for.\n With optional *start*, test string beginning at that position.\n With optional *end*, stop comparing string at that position.\n\nstr.strip([chars])\n\n Return a copy of the string with the leading and trailing\n characters removed. The *chars* argument is a string specifying the\n set of characters to be removed. If omitted or "None", the *chars*\n argument defaults to removing whitespace. The *chars* argument is\n not a prefix or suffix; rather, all combinations of its values are\n stripped:\n\n >>> \' spacious \'.strip()\n \'spacious\'\n >>> \'www.example.com\'.strip(\'cmowz.\')\n \'example\'\n\nstr.swapcase()\n\n Return a copy of the string with uppercase characters converted to\n lowercase and vice versa. Note that it is not necessarily true that\n "s.swapcase().swapcase() == s".\n\nstr.title()\n\n Return a titlecased version of the string where words start with an\n uppercase character and the remaining characters are lowercase.\n\n For example:\n\n >>> \'Hello world\'.title()\n \'Hello World\'\n\n The algorithm uses a simple language-independent definition of a\n word as groups of consecutive letters. The definition works in\n many contexts but it means that apostrophes in contractions and\n possessives form word boundaries, which may not be the desired\n result:\n\n >>> "they\'re bill\'s friends from the UK".title()\n "They\'Re Bill\'S Friends From The Uk"\n\n A workaround for apostrophes can be constructed using regular\n expressions:\n\n >>> import re\n >>> def titlecase(s):\n ... return re.sub(r"[A-Za-z]+(\'[A-Za-z]+)?",\n ... lambda mo: mo.group(0)[0].upper() +\n ... mo.group(0)[1:].lower(),\n ... s)\n ...\n >>> titlecase("they\'re bill\'s friends.")\n "They\'re Bill\'s Friends."\n\nstr.translate(table)\n\n Return a copy of the string in which each character has been mapped\n through the given translation table. The table must be an object\n that implements indexing via "__getitem__()", typically a *mapping*\n or *sequence*. When indexed by a Unicode ordinal (an integer), the\n table object can do any of the following: return a Unicode ordinal\n or a string, to map the character to one or more other characters;\n return "None", to delete the character from the return string; or\n raise a "LookupError" exception, to map the character to itself.\n\n You can use "str.maketrans()" to create a translation map from\n character-to-character mappings in different formats.\n\n See also the "codecs" module for a more flexible approach to custom\n character mappings.\n\nstr.upper()\n\n Return a copy of the string with all the cased characters [4]\n converted to uppercase. Note that "str.upper().isupper()" might be\n "False" if "s" contains uncased characters or if the Unicode\n category of the resulting character(s) is not "Lu" (Letter,\n uppercase), but e.g. "Lt" (Letter, titlecase).\n\n The uppercasing algorithm used is described in section 3.13 of the\n Unicode Standard.\n\nstr.zfill(width)\n\n Return a copy of the string left filled with ASCII "\'0\'" digits to\n make a string of length *width*. A leading sign prefix\n ("\'+\'"/"\'-\'") is handled by inserting the padding *after* the sign\n character rather than before. The original string is returned if\n *width* is less than or equal to "len(s)".\n\n For example:\n\n >>> "42".zfill(5)\n \'00042\'\n >>> "-42".zfill(5)\n \'-0042\'\n',
+ 'specialnames': u'\nSpecial method names\n********************\n\nA class can implement certain operations that are invoked by special\nsyntax (such as arithmetic operations or subscripting and slicing) by\ndefining methods with special names. This is Python\'s approach to\n*operator overloading*, allowing classes to define their own behavior\nwith respect to language operators. For instance, if a class defines\na method named "__getitem__()", and "x" is an instance of this class,\nthen "x[i]" is roughly equivalent to "type(x).__getitem__(x, i)".\nExcept where mentioned, attempts to execute an operation raise an\nexception when no appropriate method is defined (typically\n"AttributeError" or "TypeError").\n\nWhen implementing a class that emulates any built-in type, it is\nimportant that the emulation only be implemented to the degree that it\nmakes sense for the object being modelled. For example, some\nsequences may work well with retrieval of individual elements, but\nextracting a slice may not make sense. (One example of this is the\n"NodeList" interface in the W3C\'s Document Object Model.)\n\n\nBasic customization\n===================\n\nobject.__new__(cls[, ...])\n\n Called to create a new instance of class *cls*. "__new__()" is a\n static method (special-cased so you need not declare it as such)\n that takes the class of which an instance was requested as its\n first argument. The remaining arguments are those passed to the\n object constructor expression (the call to the class). The return\n value of "__new__()" should be the new object instance (usually an\n instance of *cls*).\n\n Typical implementations create a new instance of the class by\n invoking the superclass\'s "__new__()" method using\n "super(currentclass, cls).__new__(cls[, ...])" with appropriate\n arguments and then modifying the newly-created instance as\n necessary before returning it.\n\n If "__new__()" returns an instance of *cls*, then the new\n instance\'s "__init__()" method will be invoked like\n "__init__(self[, ...])", where *self* is the new instance and the\n remaining arguments are the same as were passed to "__new__()".\n\n If "__new__()" does not return an instance of *cls*, then the new\n instance\'s "__init__()" method will not be invoked.\n\n "__new__()" is intended mainly to allow subclasses of immutable\n types (like int, str, or tuple) to customize instance creation. It\n is also commonly overridden in custom metaclasses in order to\n customize class creation.\n\nobject.__init__(self[, ...])\n\n Called after the instance has been created (by "__new__()"), but\n before it is returned to the caller. The arguments are those\n passed to the class constructor expression. If a base class has an\n "__init__()" method, the derived class\'s "__init__()" method, if\n any, must explicitly call it to ensure proper initialization of the\n base class part of the instance; for example:\n "BaseClass.__init__(self, [args...])".\n\n Because "__new__()" and "__init__()" work together in constructing\n objects ("__new__()" to create it, and "__init__()" to customise\n it), no non-"None" value may be returned by "__init__()"; doing so\n will cause a "TypeError" to be raised at runtime.\n\nobject.__del__(self)\n\n Called when the instance is about to be destroyed. This is also\n called a destructor. If a base class has a "__del__()" method, the\n derived class\'s "__del__()" method, if any, must explicitly call it\n to ensure proper deletion of the base class part of the instance.\n Note that it is possible (though not recommended!) for the\n "__del__()" method to postpone destruction of the instance by\n creating a new reference to it. It may then be called at a later\n time when this new reference is deleted. It is not guaranteed that\n "__del__()" methods are called for objects that still exist when\n the interpreter exits.\n\n Note: "del x" doesn\'t directly call "x.__del__()" --- the former\n decrements the reference count for "x" by one, and the latter is\n only called when "x"\'s reference count reaches zero. Some common\n situations that may prevent the reference count of an object from\n going to zero include: circular references between objects (e.g.,\n a doubly-linked list or a tree data structure with parent and\n child pointers); a reference to the object on the stack frame of\n a function that caught an exception (the traceback stored in\n "sys.exc_info()[2]" keeps the stack frame alive); or a reference\n to the object on the stack frame that raised an unhandled\n exception in interactive mode (the traceback stored in\n "sys.last_traceback" keeps the stack frame alive). The first\n situation can only be remedied by explicitly breaking the cycles;\n the second can be resolved by freeing the reference to the\n traceback object when it is no longer useful, and the third can\n be resolved by storing "None" in "sys.last_traceback". Circular\n references which are garbage are detected and cleaned up when the\n cyclic garbage collector is enabled (it\'s on by default). Refer\n to the documentation for the "gc" module for more information\n about this topic.\n\n Warning: Due to the precarious circumstances under which\n "__del__()" methods are invoked, exceptions that occur during\n their execution are ignored, and a warning is printed to\n "sys.stderr" instead. Also, when "__del__()" is invoked in\n response to a module being deleted (e.g., when execution of the\n program is done), other globals referenced by the "__del__()"\n method may already have been deleted or in the process of being\n torn down (e.g. the import machinery shutting down). For this\n reason, "__del__()" methods should do the absolute minimum needed\n to maintain external invariants. Starting with version 1.5,\n Python guarantees that globals whose name begins with a single\n underscore are deleted from their module before other globals are\n deleted; if no other references to such globals exist, this may\n help in assuring that imported modules are still available at the\n time when the "__del__()" method is called.\n\nobject.__repr__(self)\n\n Called by the "repr()" built-in function to compute the "official"\n string representation of an object. If at all possible, this\n should look like a valid Python expression that could be used to\n recreate an object with the same value (given an appropriate\n environment). If this is not possible, a string of the form\n "<...some useful description...>" should be returned. The return\n value must be a string object. If a class defines "__repr__()" but\n not "__str__()", then "__repr__()" is also used when an "informal"\n string representation of instances of that class is required.\n\n This is typically used for debugging, so it is important that the\n representation is information-rich and unambiguous.\n\nobject.__str__(self)\n\n Called by "str(object)" and the built-in functions "format()" and\n "print()" to compute the "informal" or nicely printable string\n representation of an object. The return value must be a *string*\n object.\n\n This method differs from "object.__repr__()" in that there is no\n expectation that "__str__()" return a valid Python expression: a\n more convenient or concise representation can be used.\n\n The default implementation defined by the built-in type "object"\n calls "object.__repr__()".\n\nobject.__bytes__(self)\n\n Called by "bytes()" to compute a byte-string representation of an\n object. This should return a "bytes" object.\n\nobject.__format__(self, format_spec)\n\n Called by the "format()" built-in function (and by extension, the\n "str.format()" method of class "str") to produce a "formatted"\n string representation of an object. The "format_spec" argument is a\n string that contains a description of the formatting options\n desired. The interpretation of the "format_spec" argument is up to\n the type implementing "__format__()", however most classes will\n either delegate formatting to one of the built-in types, or use a\n similar formatting option syntax.\n\n See *Format Specification Mini-Language* for a description of the\n standard formatting syntax.\n\n The return value must be a string object.\n\n Changed in version 3.4: The __format__ method of "object" itself\n raises a "TypeError" if passed any non-empty string.\n\nobject.__lt__(self, other)\nobject.__le__(self, other)\nobject.__eq__(self, other)\nobject.__ne__(self, other)\nobject.__gt__(self, other)\nobject.__ge__(self, other)\n\n These are the so-called "rich comparison" methods. The\n correspondence between operator symbols and method names is as\n follows: "x<y" calls "x.__lt__(y)", "x<=y" calls "x.__le__(y)",\n "x==y" calls "x.__eq__(y)", "x!=y" calls "x.__ne__(y)", "x>y" calls\n "x.__gt__(y)", and "x>=y" calls "x.__ge__(y)".\n\n A rich comparison method may return the singleton "NotImplemented"\n if it does not implement the operation for a given pair of\n arguments. By convention, "False" and "True" are returned for a\n successful comparison. However, these methods can return any value,\n so if the comparison operator is used in a Boolean context (e.g.,\n in the condition of an "if" statement), Python will call "bool()"\n on the value to determine if the result is true or false.\n\n By default, "__ne__()" delegates to "__eq__()" and inverts the\n result unless it is "NotImplemented". There are no other implied\n relationships among the comparison operators, for example, the\n truth of "(x<y or x==y)" does not imply "x<=y". To automatically\n generate ordering operations from a single root operation, see\n "functools.total_ordering()".\n\n See the paragraph on "__hash__()" for some important notes on\n creating *hashable* objects which support custom comparison\n operations and are usable as dictionary keys.\n\n There are no swapped-argument versions of these methods (to be used\n when the left argument does not support the operation but the right\n argument does); rather, "__lt__()" and "__gt__()" are each other\'s\n reflection, "__le__()" and "__ge__()" are each other\'s reflection,\n and "__eq__()" and "__ne__()" are their own reflection. If the\n operands are of different types, and right operand\'s type is a\n direct or indirect subclass of the left operand\'s type, the\n reflected method of the right operand has priority, otherwise the\n left operand\'s method has priority. Virtual subclassing is not\n considered.\n\nobject.__hash__(self)\n\n Called by built-in function "hash()" and for operations on members\n of hashed collections including "set", "frozenset", and "dict".\n "__hash__()" should return an integer. The only required property\n is that objects which compare equal have the same hash value; it is\n advised to somehow mix together (e.g. using exclusive or) the hash\n values for the components of the object that also play a part in\n comparison of objects.\n\n Note: "hash()" truncates the value returned from an object\'s\n custom "__hash__()" method to the size of a "Py_ssize_t". This\n is typically 8 bytes on 64-bit builds and 4 bytes on 32-bit\n builds. If an object\'s "__hash__()" must interoperate on builds\n of different bit sizes, be sure to check the width on all\n supported builds. An easy way to do this is with "python -c\n "import sys; print(sys.hash_info.width)"".\n\n If a class does not define an "__eq__()" method it should not\n define a "__hash__()" operation either; if it defines "__eq__()"\n but not "__hash__()", its instances will not be usable as items in\n hashable collections. If a class defines mutable objects and\n implements an "__eq__()" method, it should not implement\n "__hash__()", since the implementation of hashable collections\n requires that a key\'s hash value is immutable (if the object\'s hash\n value changes, it will be in the wrong hash bucket).\n\n User-defined classes have "__eq__()" and "__hash__()" methods by\n default; with them, all objects compare unequal (except with\n themselves) and "x.__hash__()" returns an appropriate value such\n that "x == y" implies both that "x is y" and "hash(x) == hash(y)".\n\n A class that overrides "__eq__()" and does not define "__hash__()"\n will have its "__hash__()" implicitly set to "None". When the\n "__hash__()" method of a class is "None", instances of the class\n will raise an appropriate "TypeError" when a program attempts to\n retrieve their hash value, and will also be correctly identified as\n unhashable when checking "isinstance(obj, collections.Hashable)".\n\n If a class that overrides "__eq__()" needs to retain the\n implementation of "__hash__()" from a parent class, the interpreter\n must be told this explicitly by setting "__hash__ =\n <ParentClass>.__hash__".\n\n If a class that does not override "__eq__()" wishes to suppress\n hash support, it should include "__hash__ = None" in the class\n definition. A class which defines its own "__hash__()" that\n explicitly raises a "TypeError" would be incorrectly identified as\n hashable by an "isinstance(obj, collections.Hashable)" call.\n\n Note: By default, the "__hash__()" values of str, bytes and\n datetime objects are "salted" with an unpredictable random value.\n Although they remain constant within an individual Python\n process, they are not predictable between repeated invocations of\n Python.This is intended to provide protection against a denial-\n of-service caused by carefully-chosen inputs that exploit the\n worst case performance of a dict insertion, O(n^2) complexity.\n See http://www.ocert.org/advisories/ocert-2011-003.html for\n details.Changing hash values affects the iteration order of\n dicts, sets and other mappings. Python has never made guarantees\n about this ordering (and it typically varies between 32-bit and\n 64-bit builds).See also "PYTHONHASHSEED".\n\n Changed in version 3.3: Hash randomization is enabled by default.\n\nobject.__bool__(self)\n\n Called to implement truth value testing and the built-in operation\n "bool()"; should return "False" or "True". When this method is not\n defined, "__len__()" is called, if it is defined, and the object is\n considered true if its result is nonzero. If a class defines\n neither "__len__()" nor "__bool__()", all its instances are\n considered true.\n\n\nCustomizing attribute access\n============================\n\nThe following methods can be defined to customize the meaning of\nattribute access (use of, assignment to, or deletion of "x.name") for\nclass instances.\n\nobject.__getattr__(self, name)\n\n Called when an attribute lookup has not found the attribute in the\n usual places (i.e. it is not an instance attribute nor is it found\n in the class tree for "self"). "name" is the attribute name. This\n method should return the (computed) attribute value or raise an\n "AttributeError" exception.\n\n Note that if the attribute is found through the normal mechanism,\n "__getattr__()" is not called. (This is an intentional asymmetry\n between "__getattr__()" and "__setattr__()".) This is done both for\n efficiency reasons and because otherwise "__getattr__()" would have\n no way to access other attributes of the instance. Note that at\n least for instance variables, you can fake total control by not\n inserting any values in the instance attribute dictionary (but\n instead inserting them in another object). See the\n "__getattribute__()" method below for a way to actually get total\n control over attribute access.\n\nobject.__getattribute__(self, name)\n\n Called unconditionally to implement attribute accesses for\n instances of the class. If the class also defines "__getattr__()",\n the latter will not be called unless "__getattribute__()" either\n calls it explicitly or raises an "AttributeError". This method\n should return the (computed) attribute value or raise an\n "AttributeError" exception. In order to avoid infinite recursion in\n this method, its implementation should always call the base class\n method with the same name to access any attributes it needs, for\n example, "object.__getattribute__(self, name)".\n\n Note: This method may still be bypassed when looking up special\n methods as the result of implicit invocation via language syntax\n or built-in functions. See *Special method lookup*.\n\nobject.__setattr__(self, name, value)\n\n Called when an attribute assignment is attempted. This is called\n instead of the normal mechanism (i.e. store the value in the\n instance dictionary). *name* is the attribute name, *value* is the\n value to be assigned to it.\n\n If "__setattr__()" wants to assign to an instance attribute, it\n should call the base class method with the same name, for example,\n "object.__setattr__(self, name, value)".\n\nobject.__delattr__(self, name)\n\n Like "__setattr__()" but for attribute deletion instead of\n assignment. This should only be implemented if "del obj.name" is\n meaningful for the object.\n\nobject.__dir__(self)\n\n Called when "dir()" is called on the object. A sequence must be\n returned. "dir()" converts the returned sequence to a list and\n sorts it.\n\n\nImplementing Descriptors\n------------------------\n\nThe following methods only apply when an instance of the class\ncontaining the method (a so-called *descriptor* class) appears in an\n*owner* class (the descriptor must be in either the owner\'s class\ndictionary or in the class dictionary for one of its parents). In the\nexamples below, "the attribute" refers to the attribute whose name is\nthe key of the property in the owner class\' "__dict__".\n\nobject.__get__(self, instance, owner)\n\n Called to get the attribute of the owner class (class attribute\n access) or of an instance of that class (instance attribute\n access). *owner* is always the owner class, while *instance* is the\n instance that the attribute was accessed through, or "None" when\n the attribute is accessed through the *owner*. This method should\n return the (computed) attribute value or raise an "AttributeError"\n exception.\n\nobject.__set__(self, instance, value)\n\n Called to set the attribute on an instance *instance* of the owner\n class to a new value, *value*.\n\nobject.__delete__(self, instance)\n\n Called to delete the attribute on an instance *instance* of the\n owner class.\n\nThe attribute "__objclass__" is interpreted by the "inspect" module as\nspecifying the class where this object was defined (setting this\nappropriately can assist in runtime introspection of dynamic class\nattributes). For callables, it may indicate that an instance of the\ngiven type (or a subclass) is expected or required as the first\npositional argument (for example, CPython sets this attribute for\nunbound methods that are implemented in C).\n\n\nInvoking Descriptors\n--------------------\n\nIn general, a descriptor is an object attribute with "binding\nbehavior", one whose attribute access has been overridden by methods\nin the descriptor protocol: "__get__()", "__set__()", and\n"__delete__()". If any of those methods are defined for an object, it\nis said to be a descriptor.\n\nThe default behavior for attribute access is to get, set, or delete\nthe attribute from an object\'s dictionary. For instance, "a.x" has a\nlookup chain starting with "a.__dict__[\'x\']", then\n"type(a).__dict__[\'x\']", and continuing through the base classes of\n"type(a)" excluding metaclasses.\n\nHowever, if the looked-up value is an object defining one of the\ndescriptor methods, then Python may override the default behavior and\ninvoke the descriptor method instead. Where this occurs in the\nprecedence chain depends on which descriptor methods were defined and\nhow they were called.\n\nThe starting point for descriptor invocation is a binding, "a.x". How\nthe arguments are assembled depends on "a":\n\nDirect Call\n The simplest and least common call is when user code directly\n invokes a descriptor method: "x.__get__(a)".\n\nInstance Binding\n If binding to an object instance, "a.x" is transformed into the\n call: "type(a).__dict__[\'x\'].__get__(a, type(a))".\n\nClass Binding\n If binding to a class, "A.x" is transformed into the call:\n "A.__dict__[\'x\'].__get__(None, A)".\n\nSuper Binding\n If "a" is an instance of "super", then the binding "super(B,\n obj).m()" searches "obj.__class__.__mro__" for the base class "A"\n immediately preceding "B" and then invokes the descriptor with the\n call: "A.__dict__[\'m\'].__get__(obj, obj.__class__)".\n\nFor instance bindings, the precedence of descriptor invocation depends\non the which descriptor methods are defined. A descriptor can define\nany combination of "__get__()", "__set__()" and "__delete__()". If it\ndoes not define "__get__()", then accessing the attribute will return\nthe descriptor object itself unless there is a value in the object\'s\ninstance dictionary. If the descriptor defines "__set__()" and/or\n"__delete__()", it is a data descriptor; if it defines neither, it is\na non-data descriptor. Normally, data descriptors define both\n"__get__()" and "__set__()", while non-data descriptors have just the\n"__get__()" method. Data descriptors with "__set__()" and "__get__()"\ndefined always override a redefinition in an instance dictionary. In\ncontrast, non-data descriptors can be overridden by instances.\n\nPython methods (including "staticmethod()" and "classmethod()") are\nimplemented as non-data descriptors. Accordingly, instances can\nredefine and override methods. This allows individual instances to\nacquire behaviors that differ from other instances of the same class.\n\nThe "property()" function is implemented as a data descriptor.\nAccordingly, instances cannot override the behavior of a property.\n\n\n__slots__\n---------\n\nBy default, instances of classes have a dictionary for attribute\nstorage. This wastes space for objects having very few instance\nvariables. The space consumption can become acute when creating large\nnumbers of instances.\n\nThe default can be overridden by defining *__slots__* in a class\ndefinition. The *__slots__* declaration takes a sequence of instance\nvariables and reserves just enough space in each instance to hold a\nvalue for each variable. Space is saved because *__dict__* is not\ncreated for each instance.\n\nobject.__slots__\n\n This class variable can be assigned a string, iterable, or sequence\n of strings with variable names used by instances. *__slots__*\n reserves space for the declared variables and prevents the\n automatic creation of *__dict__* and *__weakref__* for each\n instance.\n\n\nNotes on using *__slots__*\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n* When inheriting from a class without *__slots__*, the *__dict__*\n attribute of that class will always be accessible, so a *__slots__*\n definition in the subclass is meaningless.\n\n* Without a *__dict__* variable, instances cannot be assigned new\n variables not listed in the *__slots__* definition. Attempts to\n assign to an unlisted variable name raises "AttributeError". If\n dynamic assignment of new variables is desired, then add\n "\'__dict__\'" to the sequence of strings in the *__slots__*\n declaration.\n\n* Without a *__weakref__* variable for each instance, classes\n defining *__slots__* do not support weak references to its\n instances. If weak reference support is needed, then add\n "\'__weakref__\'" to the sequence of strings in the *__slots__*\n declaration.\n\n* *__slots__* are implemented at the class level by creating\n descriptors (*Implementing Descriptors*) for each variable name. As\n a result, class attributes cannot be used to set default values for\n instance variables defined by *__slots__*; otherwise, the class\n attribute would overwrite the descriptor assignment.\n\n* The action of a *__slots__* declaration is limited to the class\n where it is defined. As a result, subclasses will have a *__dict__*\n unless they also define *__slots__* (which must only contain names\n of any *additional* slots).\n\n* If a class defines a slot also defined in a base class, the\n instance variable defined by the base class slot is inaccessible\n (except by retrieving its descriptor directly from the base class).\n This renders the meaning of the program undefined. In the future, a\n check may be added to prevent this.\n\n* Nonempty *__slots__* does not work for classes derived from\n "variable-length" built-in types such as "int", "bytes" and "tuple".\n\n* Any non-string iterable may be assigned to *__slots__*. Mappings\n may also be used; however, in the future, special meaning may be\n assigned to the values corresponding to each key.\n\n* *__class__* assignment works only if both classes have the same\n *__slots__*.\n\n\nCustomizing class creation\n==========================\n\nBy default, classes are constructed using "type()". The class body is\nexecuted in a new namespace and the class name is bound locally to the\nresult of "type(name, bases, namespace)".\n\nThe class creation process can be customised by passing the\n"metaclass" keyword argument in the class definition line, or by\ninheriting from an existing class that included such an argument. In\nthe following example, both "MyClass" and "MySubclass" are instances\nof "Meta":\n\n class Meta(type):\n pass\n\n class MyClass(metaclass=Meta):\n pass\n\n class MySubclass(MyClass):\n pass\n\nAny other keyword arguments that are specified in the class definition\nare passed through to all metaclass operations described below.\n\nWhen a class definition is executed, the following steps occur:\n\n* the appropriate metaclass is determined\n\n* the class namespace is prepared\n\n* the class body is executed\n\n* the class object is created\n\n\nDetermining the appropriate metaclass\n-------------------------------------\n\nThe appropriate metaclass for a class definition is determined as\nfollows:\n\n* if no bases and no explicit metaclass are given, then "type()" is\n used\n\n* if an explicit metaclass is given and it is *not* an instance of\n "type()", then it is used directly as the metaclass\n\n* if an instance of "type()" is given as the explicit metaclass, or\n bases are defined, then the most derived metaclass is used\n\nThe most derived metaclass is selected from the explicitly specified\nmetaclass (if any) and the metaclasses (i.e. "type(cls)") of all\nspecified base classes. The most derived metaclass is one which is a\nsubtype of *all* of these candidate metaclasses. If none of the\ncandidate metaclasses meets that criterion, then the class definition\nwill fail with "TypeError".\n\n\nPreparing the class namespace\n-----------------------------\n\nOnce the appropriate metaclass has been identified, then the class\nnamespace is prepared. If the metaclass has a "__prepare__" attribute,\nit is called as "namespace = metaclass.__prepare__(name, bases,\n**kwds)" (where the additional keyword arguments, if any, come from\nthe class definition).\n\nIf the metaclass has no "__prepare__" attribute, then the class\nnamespace is initialised as an empty "dict()" instance.\n\nSee also: **PEP 3115** - Metaclasses in Python 3000\n\n Introduced the "__prepare__" namespace hook\n\n\nExecuting the class body\n------------------------\n\nThe class body is executed (approximately) as "exec(body, globals(),\nnamespace)". The key difference from a normal call to "exec()" is that\nlexical scoping allows the class body (including any methods) to\nreference names from the current and outer scopes when the class\ndefinition occurs inside a function.\n\nHowever, even when the class definition occurs inside the function,\nmethods defined inside the class still cannot see names defined at the\nclass scope. Class variables must be accessed through the first\nparameter of instance or class methods, and cannot be accessed at all\nfrom static methods.\n\n\nCreating the class object\n-------------------------\n\nOnce the class namespace has been populated by executing the class\nbody, the class object is created by calling "metaclass(name, bases,\nnamespace, **kwds)" (the additional keywords passed here are the same\nas those passed to "__prepare__").\n\nThis class object is the one that will be referenced by the zero-\nargument form of "super()". "__class__" is an implicit closure\nreference created by the compiler if any methods in a class body refer\nto either "__class__" or "super". This allows the zero argument form\nof "super()" to correctly identify the class being defined based on\nlexical scoping, while the class or instance that was used to make the\ncurrent call is identified based on the first argument passed to the\nmethod.\n\nAfter the class object is created, it is passed to the class\ndecorators included in the class definition (if any) and the resulting\nobject is bound in the local namespace as the defined class.\n\nSee also: **PEP 3135** - New super\n\n Describes the implicit "__class__" closure reference\n\n\nMetaclass example\n-----------------\n\nThe potential uses for metaclasses are boundless. Some ideas that have\nbeen explored include logging, interface checking, automatic\ndelegation, automatic property creation, proxies, frameworks, and\nautomatic resource locking/synchronization.\n\nHere is an example of a metaclass that uses an\n"collections.OrderedDict" to remember the order that class variables\nare defined:\n\n class OrderedClass(type):\n\n @classmethod\n def __prepare__(metacls, name, bases, **kwds):\n return collections.OrderedDict()\n\n def __new__(cls, name, bases, namespace, **kwds):\n result = type.__new__(cls, name, bases, dict(namespace))\n result.members = tuple(namespace)\n return result\n\n class A(metaclass=OrderedClass):\n def one(self): pass\n def two(self): pass\n def three(self): pass\n def four(self): pass\n\n >>> A.members\n (\'__module__\', \'one\', \'two\', \'three\', \'four\')\n\nWhen the class definition for *A* gets executed, the process begins\nwith calling the metaclass\'s "__prepare__()" method which returns an\nempty "collections.OrderedDict". That mapping records the methods and\nattributes of *A* as they are defined within the body of the class\nstatement. Once those definitions are executed, the ordered dictionary\nis fully populated and the metaclass\'s "__new__()" method gets\ninvoked. That method builds the new type and it saves the ordered\ndictionary keys in an attribute called "members".\n\n\nCustomizing instance and subclass checks\n========================================\n\nThe following methods are used to override the default behavior of the\n"isinstance()" and "issubclass()" built-in functions.\n\nIn particular, the metaclass "abc.ABCMeta" implements these methods in\norder to allow the addition of Abstract Base Classes (ABCs) as\n"virtual base classes" to any class or type (including built-in\ntypes), including other ABCs.\n\nclass.__instancecheck__(self, instance)\n\n Return true if *instance* should be considered a (direct or\n indirect) instance of *class*. If defined, called to implement\n "isinstance(instance, class)".\n\nclass.__subclasscheck__(self, subclass)\n\n Return true if *subclass* should be considered a (direct or\n indirect) subclass of *class*. If defined, called to implement\n "issubclass(subclass, class)".\n\nNote that these methods are looked up on the type (metaclass) of a\nclass. They cannot be defined as class methods in the actual class.\nThis is consistent with the lookup of special methods that are called\non instances, only in this case the instance is itself a class.\n\nSee also: **PEP 3119** - Introducing Abstract Base Classes\n\n Includes the specification for customizing "isinstance()" and\n "issubclass()" behavior through "__instancecheck__()" and\n "__subclasscheck__()", with motivation for this functionality in\n the context of adding Abstract Base Classes (see the "abc"\n module) to the language.\n\n\nEmulating callable objects\n==========================\n\nobject.__call__(self[, args...])\n\n Called when the instance is "called" as a function; if this method\n is defined, "x(arg1, arg2, ...)" is a shorthand for\n "x.__call__(arg1, arg2, ...)".\n\n\nEmulating container types\n=========================\n\nThe following methods can be defined to implement container objects.\nContainers usually are sequences (such as lists or tuples) or mappings\n(like dictionaries), but can represent other containers as well. The\nfirst set of methods is used either to emulate a sequence or to\nemulate a mapping; the difference is that for a sequence, the\nallowable keys should be the integers *k* for which "0 <= k < N" where\n*N* is the length of the sequence, or slice objects, which define a\nrange of items. It is also recommended that mappings provide the\nmethods "keys()", "values()", "items()", "get()", "clear()",\n"setdefault()", "pop()", "popitem()", "copy()", and "update()"\nbehaving similar to those for Python\'s standard dictionary objects.\nThe "collections" module provides a "MutableMapping" abstract base\nclass to help create those methods from a base set of "__getitem__()",\n"__setitem__()", "__delitem__()", and "keys()". Mutable sequences\nshould provide methods "append()", "count()", "index()", "extend()",\n"insert()", "pop()", "remove()", "reverse()" and "sort()", like Python\nstandard list objects. Finally, sequence types should implement\naddition (meaning concatenation) and multiplication (meaning\nrepetition) by defining the methods "__add__()", "__radd__()",\n"__iadd__()", "__mul__()", "__rmul__()" and "__imul__()" described\nbelow; they should not define other numerical operators. It is\nrecommended that both mappings and sequences implement the\n"__contains__()" method to allow efficient use of the "in" operator;\nfor mappings, "in" should search the mapping\'s keys; for sequences, it\nshould search through the values. It is further recommended that both\nmappings and sequences implement the "__iter__()" method to allow\nefficient iteration through the container; for mappings, "__iter__()"\nshould be the same as "keys()"; for sequences, it should iterate\nthrough the values.\n\nobject.__len__(self)\n\n Called to implement the built-in function "len()". Should return\n the length of the object, an integer ">=" 0. Also, an object that\n doesn\'t define a "__bool__()" method and whose "__len__()" method\n returns zero is considered to be false in a Boolean context.\n\nobject.__length_hint__(self)\n\n Called to implement "operator.length_hint()". Should return an\n estimated length for the object (which may be greater or less than\n the actual length). The length must be an integer ">=" 0. This\n method is purely an optimization and is never required for\n correctness.\n\n New in version 3.4.\n\nNote: Slicing is done exclusively with the following three methods.\n A call like\n\n a[1:2] = b\n\n is translated to\n\n a[slice(1, 2, None)] = b\n\n and so forth. Missing slice items are always filled in with "None".\n\nobject.__getitem__(self, key)\n\n Called to implement evaluation of "self[key]". For sequence types,\n the accepted keys should be integers and slice objects. Note that\n the special interpretation of negative indexes (if the class wishes\n to emulate a sequence type) is up to the "__getitem__()" method. If\n *key* is of an inappropriate type, "TypeError" may be raised; if of\n a value outside the set of indexes for the sequence (after any\n special interpretation of negative values), "IndexError" should be\n raised. For mapping types, if *key* is missing (not in the\n container), "KeyError" should be raised.\n\n Note: "for" loops expect that an "IndexError" will be raised for\n illegal indexes to allow proper detection of the end of the\n sequence.\n\nobject.__missing__(self, key)\n\n Called by "dict"."__getitem__()" to implement "self[key]" for dict\n subclasses when key is not in the dictionary.\n\nobject.__setitem__(self, key, value)\n\n Called to implement assignment to "self[key]". Same note as for\n "__getitem__()". This should only be implemented for mappings if\n the objects support changes to the values for keys, or if new keys\n can be added, or for sequences if elements can be replaced. The\n same exceptions should be raised for improper *key* values as for\n the "__getitem__()" method.\n\nobject.__delitem__(self, key)\n\n Called to implement deletion of "self[key]". Same note as for\n "__getitem__()". This should only be implemented for mappings if\n the objects support removal of keys, or for sequences if elements\n can be removed from the sequence. The same exceptions should be\n raised for improper *key* values as for the "__getitem__()" method.\n\nobject.__iter__(self)\n\n This method is called when an iterator is required for a container.\n This method should return a new iterator object that can iterate\n over all the objects in the container. For mappings, it should\n iterate over the keys of the container.\n\n Iterator objects also need to implement this method; they are\n required to return themselves. For more information on iterator\n objects, see *Iterator Types*.\n\nobject.__reversed__(self)\n\n Called (if present) by the "reversed()" built-in to implement\n reverse iteration. It should return a new iterator object that\n iterates over all the objects in the container in reverse order.\n\n If the "__reversed__()" method is not provided, the "reversed()"\n built-in will fall back to using the sequence protocol ("__len__()"\n and "__getitem__()"). Objects that support the sequence protocol\n should only provide "__reversed__()" if they can provide an\n implementation that is more efficient than the one provided by\n "reversed()".\n\nThe membership test operators ("in" and "not in") are normally\nimplemented as an iteration through a sequence. However, container\nobjects can supply the following special method with a more efficient\nimplementation, which also does not require the object be a sequence.\n\nobject.__contains__(self, item)\n\n Called to implement membership test operators. Should return true\n if *item* is in *self*, false otherwise. For mapping objects, this\n should consider the keys of the mapping rather than the values or\n the key-item pairs.\n\n For objects that don\'t define "__contains__()", the membership test\n first tries iteration via "__iter__()", then the old sequence\n iteration protocol via "__getitem__()", see *this section in the\n language reference*.\n\n\nEmulating numeric types\n=======================\n\nThe following methods can be defined to emulate numeric objects.\nMethods corresponding to operations that are not supported by the\nparticular kind of number implemented (e.g., bitwise operations for\nnon-integral numbers) should be left undefined.\n\nobject.__add__(self, other)\nobject.__sub__(self, other)\nobject.__mul__(self, other)\nobject.__matmul__(self, other)\nobject.__truediv__(self, other)\nobject.__floordiv__(self, other)\nobject.__mod__(self, other)\nobject.__divmod__(self, other)\nobject.__pow__(self, other[, modulo])\nobject.__lshift__(self, other)\nobject.__rshift__(self, other)\nobject.__and__(self, other)\nobject.__xor__(self, other)\nobject.__or__(self, other)\n\n These methods are called to implement the binary arithmetic\n operations ("+", "-", "*", "@", "/", "//", "%", "divmod()",\n "pow()", "**", "<<", ">>", "&", "^", "|"). For instance, to\n evaluate the expression "x + y", where *x* is an instance of a\n class that has an "__add__()" method, "x.__add__(y)" is called.\n The "__divmod__()" method should be the equivalent to using\n "__floordiv__()" and "__mod__()"; it should not be related to\n "__truediv__()". Note that "__pow__()" should be defined to accept\n an optional third argument if the ternary version of the built-in\n "pow()" function is to be supported.\n\n If one of those methods does not support the operation with the\n supplied arguments, it should return "NotImplemented".\n\nobject.__radd__(self, other)\nobject.__rsub__(self, other)\nobject.__rmul__(self, other)\nobject.__rmatmul__(self, other)\nobject.__rtruediv__(self, other)\nobject.__rfloordiv__(self, other)\nobject.__rmod__(self, other)\nobject.__rdivmod__(self, other)\nobject.__rpow__(self, other)\nobject.__rlshift__(self, other)\nobject.__rrshift__(self, other)\nobject.__rand__(self, other)\nobject.__rxor__(self, other)\nobject.__ror__(self, other)\n\n These methods are called to implement the binary arithmetic\n operations ("+", "-", "*", "@", "/", "//", "%", "divmod()",\n "pow()", "**", "<<", ">>", "&", "^", "|") with reflected (swapped)\n operands. These functions are only called if the left operand does\n not support the corresponding operation and the operands are of\n different types. [2] For instance, to evaluate the expression "x -\n y", where *y* is an instance of a class that has an "__rsub__()"\n method, "y.__rsub__(x)" is called if "x.__sub__(y)" returns\n *NotImplemented*.\n\n Note that ternary "pow()" will not try calling "__rpow__()" (the\n coercion rules would become too complicated).\n\n Note: If the right operand\'s type is a subclass of the left\n operand\'s type and that subclass provides the reflected method\n for the operation, this method will be called before the left\n operand\'s non-reflected method. This behavior allows subclasses\n to override their ancestors\' operations.\n\nobject.__iadd__(self, other)\nobject.__isub__(self, other)\nobject.__imul__(self, other)\nobject.__imatmul__(self, other)\nobject.__itruediv__(self, other)\nobject.__ifloordiv__(self, other)\nobject.__imod__(self, other)\nobject.__ipow__(self, other[, modulo])\nobject.__ilshift__(self, other)\nobject.__irshift__(self, other)\nobject.__iand__(self, other)\nobject.__ixor__(self, other)\nobject.__ior__(self, other)\n\n These methods are called to implement the augmented arithmetic\n assignments ("+=", "-=", "*=", "@=", "/=", "//=", "%=", "**=",\n "<<=", ">>=", "&=", "^=", "|="). These methods should attempt to\n do the operation in-place (modifying *self*) and return the result\n (which could be, but does not have to be, *self*). If a specific\n method is not defined, the augmented assignment falls back to the\n normal methods. For instance, if *x* is an instance of a class\n with an "__iadd__()" method, "x += y" is equivalent to "x =\n x.__iadd__(y)" . Otherwise, "x.__add__(y)" and "y.__radd__(x)" are\n considered, as with the evaluation of "x + y". In certain\n situations, augmented assignment can result in unexpected errors\n (see *Why does a_tuple[i] += [\'item\'] raise an exception when the\n addition works?*), but this behavior is in fact part of the data\n model.\n\nobject.__neg__(self)\nobject.__pos__(self)\nobject.__abs__(self)\nobject.__invert__(self)\n\n Called to implement the unary arithmetic operations ("-", "+",\n "abs()" and "~").\n\nobject.__complex__(self)\nobject.__int__(self)\nobject.__float__(self)\nobject.__round__(self[, n])\n\n Called to implement the built-in functions "complex()", "int()",\n "float()" and "round()". Should return a value of the appropriate\n type.\n\nobject.__index__(self)\n\n Called to implement "operator.index()", and whenever Python needs\n to losslessly convert the numeric object to an integer object (such\n as in slicing, or in the built-in "bin()", "hex()" and "oct()"\n functions). Presence of this method indicates that the numeric\n object is an integer type. Must return an integer.\n\n Note: In order to have a coherent integer type class, when\n "__index__()" is defined "__int__()" should also be defined, and\n both should return the same value.\n\n\nWith Statement Context Managers\n===============================\n\nA *context manager* is an object that defines the runtime context to\nbe established when executing a "with" statement. The context manager\nhandles the entry into, and the exit from, the desired runtime context\nfor the execution of the block of code. Context managers are normally\ninvoked using the "with" statement (described in section *The with\nstatement*), but can also be used by directly invoking their methods.\n\nTypical uses of context managers include saving and restoring various\nkinds of global state, locking and unlocking resources, closing opened\nfiles, etc.\n\nFor more information on context managers, see *Context Manager Types*.\n\nobject.__enter__(self)\n\n Enter the runtime context related to this object. The "with"\n statement will bind this method\'s return value to the target(s)\n specified in the "as" clause of the statement, if any.\n\nobject.__exit__(self, exc_type, exc_value, traceback)\n\n Exit the runtime context related to this object. The parameters\n describe the exception that caused the context to be exited. If the\n context was exited without an exception, all three arguments will\n be "None".\n\n If an exception is supplied, and the method wishes to suppress the\n exception (i.e., prevent it from being propagated), it should\n return a true value. Otherwise, the exception will be processed\n normally upon exit from this method.\n\n Note that "__exit__()" methods should not reraise the passed-in\n exception; this is the caller\'s responsibility.\n\nSee also: **PEP 0343** - The "with" statement\n\n The specification, background, and examples for the Python "with"\n statement.\n\n\nSpecial method lookup\n=====================\n\nFor custom classes, implicit invocations of special methods are only\nguaranteed to work correctly if defined on an object\'s type, not in\nthe object\'s instance dictionary. That behaviour is the reason why\nthe following code raises an exception:\n\n >>> class C:\n ... pass\n ...\n >>> c = C()\n >>> c.__len__ = lambda: 5\n >>> len(c)\n Traceback (most recent call last):\n File "<stdin>", line 1, in <module>\n TypeError: object of type \'C\' has no len()\n\nThe rationale behind this behaviour lies with a number of special\nmethods such as "__hash__()" and "__repr__()" that are implemented by\nall objects, including type objects. If the implicit lookup of these\nmethods used the conventional lookup process, they would fail when\ninvoked on the type object itself:\n\n >>> 1 .__hash__() == hash(1)\n True\n >>> int.__hash__() == hash(int)\n Traceback (most recent call last):\n File "<stdin>", line 1, in <module>\n TypeError: descriptor \'__hash__\' of \'int\' object needs an argument\n\nIncorrectly attempting to invoke an unbound method of a class in this\nway is sometimes referred to as \'metaclass confusion\', and is avoided\nby bypassing the instance when looking up special methods:\n\n >>> type(1).__hash__(1) == hash(1)\n True\n >>> type(int).__hash__(int) == hash(int)\n True\n\nIn addition to bypassing any instance attributes in the interest of\ncorrectness, implicit special method lookup generally also bypasses\nthe "__getattribute__()" method even of the object\'s metaclass:\n\n >>> class Meta(type):\n ... def __getattribute__(*args):\n ... print("Metaclass getattribute invoked")\n ... return type.__getattribute__(*args)\n ...\n >>> class C(object, metaclass=Meta):\n ... def __len__(self):\n ... return 10\n ... def __getattribute__(*args):\n ... print("Class getattribute invoked")\n ... return object.__getattribute__(*args)\n ...\n >>> c = C()\n >>> c.__len__() # Explicit lookup via instance\n Class getattribute invoked\n 10\n >>> type(c).__len__(c) # Explicit lookup via type\n Metaclass getattribute invoked\n 10\n >>> len(c) # Implicit lookup\n 10\n\nBypassing the "__getattribute__()" machinery in this fashion provides\nsignificant scope for speed optimisations within the interpreter, at\nthe cost of some flexibility in the handling of special methods (the\nspecial method *must* be set on the class object itself in order to be\nconsistently invoked by the interpreter).\n',
+ 'string-methods': u'\nString Methods\n**************\n\nStrings implement all of the *common* sequence operations, along with\nthe additional methods described below.\n\nStrings also support two styles of string formatting, one providing a\nlarge degree of flexibility and customization (see "str.format()",\n*Format String Syntax* and *String Formatting*) and the other based on\nC "printf" style formatting that handles a narrower range of types and\nis slightly harder to use correctly, but is often faster for the cases\nit can handle (*printf-style String Formatting*).\n\nThe *Text Processing Services* section of the standard library covers\na number of other modules that provide various text related utilities\n(including regular expression support in the "re" module).\n\nstr.capitalize()\n\n Return a copy of the string with its first character capitalized\n and the rest lowercased.\n\nstr.casefold()\n\n Return a casefolded copy of the string. Casefolded strings may be\n used for caseless matching.\n\n Casefolding is similar to lowercasing but more aggressive because\n it is intended to remove all case distinctions in a string. For\n example, the German lowercase letter "\'\xdf\'" is equivalent to ""ss"".\n Since it is already lowercase, "lower()" would do nothing to "\'\xdf\'";\n "casefold()" converts it to ""ss"".\n\n The casefolding algorithm is described in section 3.13 of the\n Unicode Standard.\n\n New in version 3.3.\n\nstr.center(width[, fillchar])\n\n Return centered in a string of length *width*. Padding is done\n using the specified *fillchar* (default is an ASCII space). The\n original string is returned if *width* is less than or equal to\n "len(s)".\n\nstr.count(sub[, start[, end]])\n\n Return the number of non-overlapping occurrences of substring *sub*\n in the range [*start*, *end*]. Optional arguments *start* and\n *end* are interpreted as in slice notation.\n\nstr.encode(encoding="utf-8", errors="strict")\n\n Return an encoded version of the string as a bytes object. Default\n encoding is "\'utf-8\'". *errors* may be given to set a different\n error handling scheme. The default for *errors* is "\'strict\'",\n meaning that encoding errors raise a "UnicodeError". Other possible\n values are "\'ignore\'", "\'replace\'", "\'xmlcharrefreplace\'",\n "\'backslashreplace\'" and any other name registered via\n "codecs.register_error()", see section *Error Handlers*. For a list\n of possible encodings, see section *Standard Encodings*.\n\n Changed in version 3.1: Support for keyword arguments added.\n\nstr.endswith(suffix[, start[, end]])\n\n Return "True" if the string ends with the specified *suffix*,\n otherwise return "False". *suffix* can also be a tuple of suffixes\n to look for. With optional *start*, test beginning at that\n position. With optional *end*, stop comparing at that position.\n\nstr.expandtabs(tabsize=8)\n\n Return a copy of the string where all tab characters are replaced\n by one or more spaces, depending on the current column and the\n given tab size. Tab positions occur every *tabsize* characters\n (default is 8, giving tab positions at columns 0, 8, 16 and so on).\n To expand the string, the current column is set to zero and the\n string is examined character by character. If the character is a\n tab ("\\t"), one or more space characters are inserted in the result\n until the current column is equal to the next tab position. (The\n tab character itself is not copied.) If the character is a newline\n ("\\n") or return ("\\r"), it is copied and the current column is\n reset to zero. Any other character is copied unchanged and the\n current column is incremented by one regardless of how the\n character is represented when printed.\n\n >>> \'01\\t012\\t0123\\t01234\'.expandtabs()\n \'01 012 0123 01234\'\n >>> \'01\\t012\\t0123\\t01234\'.expandtabs(4)\n \'01 012 0123 01234\'\n\nstr.find(sub[, start[, end]])\n\n Return the lowest index in the string where substring *sub* is\n found, such that *sub* is contained in the slice "s[start:end]".\n Optional arguments *start* and *end* are interpreted as in slice\n notation. Return "-1" if *sub* is not found.\n\n Note: The "find()" method should be used only if you need to know\n the position of *sub*. To check if *sub* is a substring or not,\n use the "in" operator:\n\n >>> \'Py\' in \'Python\'\n True\n\nstr.format(*args, **kwargs)\n\n Perform a string formatting operation. The string on which this\n method is called can contain literal text or replacement fields\n delimited by braces "{}". Each replacement field contains either\n the numeric index of a positional argument, or the name of a\n keyword argument. Returns a copy of the string where each\n replacement field is replaced with the string value of the\n corresponding argument.\n\n >>> "The sum of 1 + 2 is {0}".format(1+2)\n \'The sum of 1 + 2 is 3\'\n\n See *Format String Syntax* for a description of the various\n formatting options that can be specified in format strings.\n\nstr.format_map(mapping)\n\n Similar to "str.format(**mapping)", except that "mapping" is used\n directly and not copied to a "dict". This is useful if for example\n "mapping" is a dict subclass:\n\n >>> class Default(dict):\n ... def __missing__(self, key):\n ... return key\n ...\n >>> \'{name} was born in {country}\'.format_map(Default(name=\'Guido\'))\n \'Guido was born in country\'\n\n New in version 3.2.\n\nstr.index(sub[, start[, end]])\n\n Like "find()", but raise "ValueError" when the substring is not\n found.\n\nstr.isalnum()\n\n Return true if all characters in the string are alphanumeric and\n there is at least one character, false otherwise. A character "c"\n is alphanumeric if one of the following returns "True":\n "c.isalpha()", "c.isdecimal()", "c.isdigit()", or "c.isnumeric()".\n\nstr.isalpha()\n\n Return true if all characters in the string are alphabetic and\n there is at least one character, false otherwise. Alphabetic\n characters are those characters defined in the Unicode character\n database as "Letter", i.e., those with general category property\n being one of "Lm", "Lt", "Lu", "Ll", or "Lo". Note that this is\n different from the "Alphabetic" property defined in the Unicode\n Standard.\n\nstr.isdecimal()\n\n Return true if all characters in the string are decimal characters\n and there is at least one character, false otherwise. Decimal\n characters are those from general category "Nd". This category\n includes digit characters, and all characters that can be used to\n form decimal-radix numbers, e.g. U+0660, ARABIC-INDIC DIGIT ZERO.\n\nstr.isdigit()\n\n Return true if all characters in the string are digits and there is\n at least one character, false otherwise. Digits include decimal\n characters and digits that need special handling, such as the\n compatibility superscript digits. Formally, a digit is a character\n that has the property value Numeric_Type=Digit or\n Numeric_Type=Decimal.\n\nstr.isidentifier()\n\n Return true if the string is a valid identifier according to the\n language definition, section *Identifiers and keywords*.\n\n Use "keyword.iskeyword()" to test for reserved identifiers such as\n "def" and "class".\n\nstr.islower()\n\n Return true if all cased characters [4] in the string are lowercase\n and there is at least one cased character, false otherwise.\n\nstr.isnumeric()\n\n Return true if all characters in the string are numeric characters,\n and there is at least one character, false otherwise. Numeric\n characters include digit characters, and all characters that have\n the Unicode numeric value property, e.g. U+2155, VULGAR FRACTION\n ONE FIFTH. Formally, numeric characters are those with the\n property value Numeric_Type=Digit, Numeric_Type=Decimal or\n Numeric_Type=Numeric.\n\nstr.isprintable()\n\n Return true if all characters in the string are printable or the\n string is empty, false otherwise. Nonprintable characters are\n those characters defined in the Unicode character database as\n "Other" or "Separator", excepting the ASCII space (0x20) which is\n considered printable. (Note that printable characters in this\n context are those which should not be escaped when "repr()" is\n invoked on a string. It has no bearing on the handling of strings\n written to "sys.stdout" or "sys.stderr".)\n\nstr.isspace()\n\n Return true if there are only whitespace characters in the string\n and there is at least one character, false otherwise. Whitespace\n characters are those characters defined in the Unicode character\n database as "Other" or "Separator" and those with bidirectional\n property being one of "WS", "B", or "S".\n\nstr.istitle()\n\n Return true if the string is a titlecased string and there is at\n least one character, for example uppercase characters may only\n follow uncased characters and lowercase characters only cased ones.\n Return false otherwise.\n\nstr.isupper()\n\n Return true if all cased characters [4] in the string are uppercase\n and there is at least one cased character, false otherwise.\n\nstr.join(iterable)\n\n Return a string which is the concatenation of the strings in the\n *iterable* *iterable*. A "TypeError" will be raised if there are\n any non-string values in *iterable*, including "bytes" objects.\n The separator between elements is the string providing this method.\n\nstr.ljust(width[, fillchar])\n\n Return the string left justified in a string of length *width*.\n Padding is done using the specified *fillchar* (default is an ASCII\n space). The original string is returned if *width* is less than or\n equal to "len(s)".\n\nstr.lower()\n\n Return a copy of the string with all the cased characters [4]\n converted to lowercase.\n\n The lowercasing algorithm used is described in section 3.13 of the\n Unicode Standard.\n\nstr.lstrip([chars])\n\n Return a copy of the string with leading characters removed. The\n *chars* argument is a string specifying the set of characters to be\n removed. If omitted or "None", the *chars* argument defaults to\n removing whitespace. The *chars* argument is not a prefix; rather,\n all combinations of its values are stripped:\n\n >>> \' spacious \'.lstrip()\n \'spacious \'\n >>> \'www.example.com\'.lstrip(\'cmowz.\')\n \'example.com\'\n\nstatic str.maketrans(x[, y[, z]])\n\n This static method returns a translation table usable for\n "str.translate()".\n\n If there is only one argument, it must be a dictionary mapping\n Unicode ordinals (integers) or characters (strings of length 1) to\n Unicode ordinals, strings (of arbitrary lengths) or None.\n Character keys will then be converted to ordinals.\n\n If there are two arguments, they must be strings of equal length,\n and in the resulting dictionary, each character in x will be mapped\n to the character at the same position in y. If there is a third\n argument, it must be a string, whose characters will be mapped to\n None in the result.\n\nstr.partition(sep)\n\n Split the string at the first occurrence of *sep*, and return a\n 3-tuple containing the part before the separator, the separator\n itself, and the part after the separator. If the separator is not\n found, return a 3-tuple containing the string itself, followed by\n two empty strings.\n\nstr.replace(old, new[, count])\n\n Return a copy of the string with all occurrences of substring *old*\n replaced by *new*. If the optional argument *count* is given, only\n the first *count* occurrences are replaced.\n\nstr.rfind(sub[, start[, end]])\n\n Return the highest index in the string where substring *sub* is\n found, such that *sub* is contained within "s[start:end]".\n Optional arguments *start* and *end* are interpreted as in slice\n notation. Return "-1" on failure.\n\nstr.rindex(sub[, start[, end]])\n\n Like "rfind()" but raises "ValueError" when the substring *sub* is\n not found.\n\nstr.rjust(width[, fillchar])\n\n Return the string right justified in a string of length *width*.\n Padding is done using the specified *fillchar* (default is an ASCII\n space). The original string is returned if *width* is less than or\n equal to "len(s)".\n\nstr.rpartition(sep)\n\n Split the string at the last occurrence of *sep*, and return a\n 3-tuple containing the part before the separator, the separator\n itself, and the part after the separator. If the separator is not\n found, return a 3-tuple containing two empty strings, followed by\n the string itself.\n\nstr.rsplit(sep=None, maxsplit=-1)\n\n Return a list of the words in the string, using *sep* as the\n delimiter string. If *maxsplit* is given, at most *maxsplit* splits\n are done, the *rightmost* ones. If *sep* is not specified or\n "None", any whitespace string is a separator. Except for splitting\n from the right, "rsplit()" behaves like "split()" which is\n described in detail below.\n\nstr.rstrip([chars])\n\n Return a copy of the string with trailing characters removed. The\n *chars* argument is a string specifying the set of characters to be\n removed. If omitted or "None", the *chars* argument defaults to\n removing whitespace. The *chars* argument is not a suffix; rather,\n all combinations of its values are stripped:\n\n >>> \' spacious \'.rstrip()\n \' spacious\'\n >>> \'mississippi\'.rstrip(\'ipz\')\n \'mississ\'\n\nstr.split(sep=None, maxsplit=-1)\n\n Return a list of the words in the string, using *sep* as the\n delimiter string. If *maxsplit* is given, at most *maxsplit*\n splits are done (thus, the list will have at most "maxsplit+1"\n elements). If *maxsplit* is not specified or "-1", then there is\n no limit on the number of splits (all possible splits are made).\n\n If *sep* is given, consecutive delimiters are not grouped together\n and are deemed to delimit empty strings (for example,\n "\'1,,2\'.split(\',\')" returns "[\'1\', \'\', \'2\']"). The *sep* argument\n may consist of multiple characters (for example,\n "\'1<>2<>3\'.split(\'<>\')" returns "[\'1\', \'2\', \'3\']"). Splitting an\n empty string with a specified separator returns "[\'\']".\n\n For example:\n\n >>> \'1,2,3\'.split(\',\')\n [\'1\', \'2\', \'3\']\n >>> \'1,2,3\'.split(\',\', maxsplit=1)\n [\'1\', \'2,3\']\n >>> \'1,2,,3,\'.split(\',\')\n [\'1\', \'2\', \'\', \'3\', \'\']\n\n If *sep* is not specified or is "None", a different splitting\n algorithm is applied: runs of consecutive whitespace are regarded\n as a single separator, and the result will contain no empty strings\n at the start or end if the string has leading or trailing\n whitespace. Consequently, splitting an empty string or a string\n consisting of just whitespace with a "None" separator returns "[]".\n\n For example:\n\n >>> \'1 2 3\'.split()\n [\'1\', \'2\', \'3\']\n >>> \'1 2 3\'.split(maxsplit=1)\n [\'1\', \'2 3\']\n >>> \' 1 2 3 \'.split()\n [\'1\', \'2\', \'3\']\n\nstr.splitlines([keepends])\n\n Return a list of the lines in the string, breaking at line\n boundaries. Line breaks are not included in the resulting list\n unless *keepends* is given and true.\n\n This method splits on the following line boundaries. In\n particular, the boundaries are a superset of *universal newlines*.\n\n +-------------------------+-------------------------------+\n | Representation | Description |\n +=========================+===============================+\n | "\\n" | Line Feed |\n +-------------------------+-------------------------------+\n | "\\r" | Carriage Return |\n +-------------------------+-------------------------------+\n | "\\r\\n" | Carriage Return + Line Feed |\n +-------------------------+-------------------------------+\n | "\\v" or "\\x0b" | Line Tabulation |\n +-------------------------+-------------------------------+\n | "\\f" or "\\x0c" | Form Feed |\n +-------------------------+-------------------------------+\n | "\\x1c" | File Separator |\n +-------------------------+-------------------------------+\n | "\\x1d" | Group Separator |\n +-------------------------+-------------------------------+\n | "\\x1e" | Record Separator |\n +-------------------------+-------------------------------+\n | "\\x85" | Next Line (C1 Control Code) |\n +-------------------------+-------------------------------+\n | "\\u2028" | Line Separator |\n +-------------------------+-------------------------------+\n | "\\u2029" | Paragraph Separator |\n +-------------------------+-------------------------------+\n\n Changed in version 3.2: "\\v" and "\\f" added to list of line\n boundaries.\n\n For example:\n\n >>> \'ab c\\n\\nde fg\\rkl\\r\\n\'.splitlines()\n [\'ab c\', \'\', \'de fg\', \'kl\']\n >>> \'ab c\\n\\nde fg\\rkl\\r\\n\'.splitlines(keepends=True)\n [\'ab c\\n\', \'\\n\', \'de fg\\r\', \'kl\\r\\n\']\n\n Unlike "split()" when a delimiter string *sep* is given, this\n method returns an empty list for the empty string, and a terminal\n line break does not result in an extra line:\n\n >>> "".splitlines()\n []\n >>> "One line\\n".splitlines()\n [\'One line\']\n\n For comparison, "split(\'\\n\')" gives:\n\n >>> \'\'.split(\'\\n\')\n [\'\']\n >>> \'Two lines\\n\'.split(\'\\n\')\n [\'Two lines\', \'\']\n\nstr.startswith(prefix[, start[, end]])\n\n Return "True" if string starts with the *prefix*, otherwise return\n "False". *prefix* can also be a tuple of prefixes to look for.\n With optional *start*, test string beginning at that position.\n With optional *end*, stop comparing string at that position.\n\nstr.strip([chars])\n\n Return a copy of the string with the leading and trailing\n characters removed. The *chars* argument is a string specifying the\n set of characters to be removed. If omitted or "None", the *chars*\n argument defaults to removing whitespace. The *chars* argument is\n not a prefix or suffix; rather, all combinations of its values are\n stripped:\n\n >>> \' spacious \'.strip()\n \'spacious\'\n >>> \'www.example.com\'.strip(\'cmowz.\')\n \'example\'\n\n The outermost leading and trailing *chars* argument values are\n stripped from the string. Characters are removed from the leading\n end until reaching a string character that is not contained in the\n set of characters in *chars*. A similar action takes place on the\n trailing end. For example:\n\n >>> comment_string = \'#....... Section 3.2.1 Issue #32 .......\'\n >>> comment_string.strip(\'.#! \')\n \'Section 3.2.1 Issue #32\'\n\nstr.swapcase()\n\n Return a copy of the string with uppercase characters converted to\n lowercase and vice versa. Note that it is not necessarily true that\n "s.swapcase().swapcase() == s".\n\nstr.title()\n\n Return a titlecased version of the string where words start with an\n uppercase character and the remaining characters are lowercase.\n\n For example:\n\n >>> \'Hello world\'.title()\n \'Hello World\'\n\n The algorithm uses a simple language-independent definition of a\n word as groups of consecutive letters. The definition works in\n many contexts but it means that apostrophes in contractions and\n possessives form word boundaries, which may not be the desired\n result:\n\n >>> "they\'re bill\'s friends from the UK".title()\n "They\'Re Bill\'S Friends From The Uk"\n\n A workaround for apostrophes can be constructed using regular\n expressions:\n\n >>> import re\n >>> def titlecase(s):\n ... return re.sub(r"[A-Za-z]+(\'[A-Za-z]+)?",\n ... lambda mo: mo.group(0)[0].upper() +\n ... mo.group(0)[1:].lower(),\n ... s)\n ...\n >>> titlecase("they\'re bill\'s friends.")\n "They\'re Bill\'s Friends."\n\nstr.translate(table)\n\n Return a copy of the string in which each character has been mapped\n through the given translation table. The table must be an object\n that implements indexing via "__getitem__()", typically a *mapping*\n or *sequence*. When indexed by a Unicode ordinal (an integer), the\n table object can do any of the following: return a Unicode ordinal\n or a string, to map the character to one or more other characters;\n return "None", to delete the character from the return string; or\n raise a "LookupError" exception, to map the character to itself.\n\n You can use "str.maketrans()" to create a translation map from\n character-to-character mappings in different formats.\n\n See also the "codecs" module for a more flexible approach to custom\n character mappings.\n\nstr.upper()\n\n Return a copy of the string with all the cased characters [4]\n converted to uppercase. Note that "str.upper().isupper()" might be\n "False" if "s" contains uncased characters or if the Unicode\n category of the resulting character(s) is not "Lu" (Letter,\n uppercase), but e.g. "Lt" (Letter, titlecase).\n\n The uppercasing algorithm used is described in section 3.13 of the\n Unicode Standard.\n\nstr.zfill(width)\n\n Return a copy of the string left filled with ASCII "\'0\'" digits to\n make a string of length *width*. A leading sign prefix\n ("\'+\'"/"\'-\'") is handled by inserting the padding *after* the sign\n character rather than before. The original string is returned if\n *width* is less than or equal to "len(s)".\n\n For example:\n\n >>> "42".zfill(5)\n \'00042\'\n >>> "-42".zfill(5)\n \'-0042\'\n',
'strings': u'\nString and Bytes literals\n*************************\n\nString literals are described by the following lexical definitions:\n\n stringliteral ::= [stringprefix](shortstring | longstring)\n stringprefix ::= "r" | "u" | "R" | "U"\n shortstring ::= "\'" shortstringitem* "\'" | \'"\' shortstringitem* \'"\'\n longstring ::= "\'\'\'" longstringitem* "\'\'\'" | \'"""\' longstringitem* \'"""\'\n shortstringitem ::= shortstringchar | stringescapeseq\n longstringitem ::= longstringchar | stringescapeseq\n shortstringchar ::= <any source character except "\\" or newline or the quote>\n longstringchar ::= <any source character except "\\">\n stringescapeseq ::= "\\" <any source character>\n\n bytesliteral ::= bytesprefix(shortbytes | longbytes)\n bytesprefix ::= "b" | "B" | "br" | "Br" | "bR" | "BR" | "rb" | "rB" | "Rb" | "RB"\n shortbytes ::= "\'" shortbytesitem* "\'" | \'"\' shortbytesitem* \'"\'\n longbytes ::= "\'\'\'" longbytesitem* "\'\'\'" | \'"""\' longbytesitem* \'"""\'\n shortbytesitem ::= shortbyteschar | bytesescapeseq\n longbytesitem ::= longbyteschar | bytesescapeseq\n shortbyteschar ::= <any ASCII character except "\\" or newline or the quote>\n longbyteschar ::= <any ASCII character except "\\">\n bytesescapeseq ::= "\\" <any ASCII character>\n\nOne syntactic restriction not indicated by these productions is that\nwhitespace is not allowed between the "stringprefix" or "bytesprefix"\nand the rest of the literal. The source character set is defined by\nthe encoding declaration; it is UTF-8 if no encoding declaration is\ngiven in the source file; see section *Encoding declarations*.\n\nIn plain English: Both types of literals can be enclosed in matching\nsingle quotes ("\'") or double quotes ("""). They can also be enclosed\nin matching groups of three single or double quotes (these are\ngenerally referred to as *triple-quoted strings*). The backslash\n("\\") character is used to escape characters that otherwise have a\nspecial meaning, such as newline, backslash itself, or the quote\ncharacter.\n\nBytes literals are always prefixed with "\'b\'" or "\'B\'"; they produce\nan instance of the "bytes" type instead of the "str" type. They may\nonly contain ASCII characters; bytes with a numeric value of 128 or\ngreater must be expressed with escapes.\n\nAs of Python 3.3 it is possible again to prefix string literals with a\n"u" prefix to simplify maintenance of dual 2.x and 3.x codebases.\n\nBoth string and bytes literals may optionally be prefixed with a\nletter "\'r\'" or "\'R\'"; such strings are called *raw strings* and treat\nbackslashes as literal characters. As a result, in string literals,\n"\'\\U\'" and "\'\\u\'" escapes in raw strings are not treated specially.\nGiven that Python 2.x\'s raw unicode literals behave differently than\nPython 3.x\'s the "\'ur\'" syntax is not supported.\n\nNew in version 3.3: The "\'rb\'" prefix of raw bytes literals has been\nadded as a synonym of "\'br\'".\n\nNew in version 3.3: Support for the unicode legacy literal\n("u\'value\'") was reintroduced to simplify the maintenance of dual\nPython 2.x and 3.x codebases. See **PEP 414** for more information.\n\nIn triple-quoted literals, unescaped newlines and quotes are allowed\n(and are retained), except that three unescaped quotes in a row\nterminate the literal. (A "quote" is the character used to open the\nliteral, i.e. either "\'" or """.)\n\nUnless an "\'r\'" or "\'R\'" prefix is present, escape sequences in string\nand bytes literals are interpreted according to rules similar to those\nused by Standard C. The recognized escape sequences are:\n\n+-------------------+-----------------------------------+---------+\n| Escape Sequence | Meaning | Notes |\n+===================+===================================+=========+\n| "\\newline" | Backslash and newline ignored | |\n+-------------------+-----------------------------------+---------+\n| "\\\\" | Backslash ("\\") | |\n+-------------------+-----------------------------------+---------+\n| "\\\'" | Single quote ("\'") | |\n+-------------------+-----------------------------------+---------+\n| "\\"" | Double quote (""") | |\n+-------------------+-----------------------------------+---------+\n| "\\a" | ASCII Bell (BEL) | |\n+-------------------+-----------------------------------+---------+\n| "\\b" | ASCII Backspace (BS) | |\n+-------------------+-----------------------------------+---------+\n| "\\f" | ASCII Formfeed (FF) | |\n+-------------------+-----------------------------------+---------+\n| "\\n" | ASCII Linefeed (LF) | |\n+-------------------+-----------------------------------+---------+\n| "\\r" | ASCII Carriage Return (CR) | |\n+-------------------+-----------------------------------+---------+\n| "\\t" | ASCII Horizontal Tab (TAB) | |\n+-------------------+-----------------------------------+---------+\n| "\\v" | ASCII Vertical Tab (VT) | |\n+-------------------+-----------------------------------+---------+\n| "\\ooo" | Character with octal value *ooo* | (1,3) |\n+-------------------+-----------------------------------+---------+\n| "\\xhh" | Character with hex value *hh* | (2,3) |\n+-------------------+-----------------------------------+---------+\n\nEscape sequences only recognized in string literals are:\n\n+-------------------+-----------------------------------+---------+\n| Escape Sequence | Meaning | Notes |\n+===================+===================================+=========+\n| "\\N{name}" | Character named *name* in the | (4) |\n| | Unicode database | |\n+-------------------+-----------------------------------+---------+\n| "\\uxxxx" | Character with 16-bit hex value | (5) |\n| | *xxxx* | |\n+-------------------+-----------------------------------+---------+\n| "\\Uxxxxxxxx" | Character with 32-bit hex value | (6) |\n| | *xxxxxxxx* | |\n+-------------------+-----------------------------------+---------+\n\nNotes:\n\n1. As in Standard C, up to three octal digits are accepted.\n\n2. Unlike in Standard C, exactly two hex digits are required.\n\n3. In a bytes literal, hexadecimal and octal escapes denote the\n byte with the given value. In a string literal, these escapes\n denote a Unicode character with the given value.\n\n4. Changed in version 3.3: Support for name aliases [1] has been\n added.\n\n5. Individual code units which form parts of a surrogate pair can\n be encoded using this escape sequence. Exactly four hex digits are\n required.\n\n6. Any Unicode character can be encoded this way. Exactly eight\n hex digits are required.\n\nUnlike Standard C, all unrecognized escape sequences are left in the\nstring unchanged, i.e., *the backslash is left in the result*. (This\nbehavior is useful when debugging: if an escape sequence is mistyped,\nthe resulting output is more easily recognized as broken.) It is also\nimportant to note that the escape sequences only recognized in string\nliterals fall into the category of unrecognized escapes for bytes\nliterals.\n\nEven in a raw literal, quotes can be escaped with a backslash, but the\nbackslash remains in the result; for example, "r"\\""" is a valid\nstring literal consisting of two characters: a backslash and a double\nquote; "r"\\"" is not a valid string literal (even a raw string cannot\nend in an odd number of backslashes). Specifically, *a raw literal\ncannot end in a single backslash* (since the backslash would escape\nthe following quote character). Note also that a single backslash\nfollowed by a newline is interpreted as those two characters as part\nof the literal, *not* as a line continuation.\n',
'subscriptions': u'\nSubscriptions\n*************\n\nA subscription selects an item of a sequence (string, tuple or list)\nor mapping (dictionary) object:\n\n subscription ::= primary "[" expression_list "]"\n\nThe primary must evaluate to an object that supports subscription\n(lists or dictionaries for example). User-defined objects can support\nsubscription by defining a "__getitem__()" method.\n\nFor built-in objects, there are two types of objects that support\nsubscription:\n\nIf the primary is a mapping, the expression list must evaluate to an\nobject whose value is one of the keys of the mapping, and the\nsubscription selects the value in the mapping that corresponds to that\nkey. (The expression list is a tuple except if it has exactly one\nitem.)\n\nIf the primary is a sequence, the expression (list) must evaluate to\nan integer or a slice (as discussed in the following section).\n\nThe formal syntax makes no special provision for negative indices in\nsequences; however, built-in sequences all provide a "__getitem__()"\nmethod that interprets negative indices by adding the length of the\nsequence to the index (so that "x[-1]" selects the last item of "x").\nThe resulting value must be a nonnegative integer less than the number\nof items in the sequence, and the subscription selects the item whose\nindex is that value (counting from zero). Since the support for\nnegative indices and slicing occurs in the object\'s "__getitem__()"\nmethod, subclasses overriding this method will need to explicitly add\nthat support.\n\nA string\'s items are characters. A character is not a separate data\ntype but a string of exactly one character.\n',
'truth': u'\nTruth Value Testing\n*******************\n\nAny object can be tested for truth value, for use in an "if" or\n"while" condition or as operand of the Boolean operations below. The\nfollowing values are considered false:\n\n* "None"\n\n* "False"\n\n* zero of any numeric type, for example, "0", "0.0", "0j".\n\n* any empty sequence, for example, "\'\'", "()", "[]".\n\n* any empty mapping, for example, "{}".\n\n* instances of user-defined classes, if the class defines a\n "__bool__()" or "__len__()" method, when that method returns the\n integer zero or "bool" value "False". [1]\n\nAll other values are considered true --- so objects of many types are\nalways true.\n\nOperations and built-in functions that have a Boolean result always\nreturn "0" or "False" for false and "1" or "True" for true, unless\notherwise stated. (Important exception: the Boolean operations "or"\nand "and" always return one of their operands.)\n',
'try': u'\nThe "try" statement\n*******************\n\nThe "try" statement specifies exception handlers and/or cleanup code\nfor a group of statements:\n\n try_stmt ::= try1_stmt | try2_stmt\n try1_stmt ::= "try" ":" suite\n ("except" [expression ["as" identifier]] ":" suite)+\n ["else" ":" suite]\n ["finally" ":" suite]\n try2_stmt ::= "try" ":" suite\n "finally" ":" suite\n\nThe "except" clause(s) specify one or more exception handlers. When no\nexception occurs in the "try" clause, no exception handler is\nexecuted. When an exception occurs in the "try" suite, a search for an\nexception handler is started. This search inspects the except clauses\nin turn until one is found that matches the exception. An expression-\nless except clause, if present, must be last; it matches any\nexception. For an except clause with an expression, that expression\nis evaluated, and the clause matches the exception if the resulting\nobject is "compatible" with the exception. An object is compatible\nwith an exception if it is the class or a base class of the exception\nobject or a tuple containing an item compatible with the exception.\n\nIf no except clause matches the exception, the search for an exception\nhandler continues in the surrounding code and on the invocation stack.\n[1]\n\nIf the evaluation of an expression in the header of an except clause\nraises an exception, the original search for a handler is canceled and\na search starts for the new exception in the surrounding code and on\nthe call stack (it is treated as if the entire "try" statement raised\nthe exception).\n\nWhen a matching except clause is found, the exception is assigned to\nthe target specified after the "as" keyword in that except clause, if\npresent, and the except clause\'s suite is executed. All except\nclauses must have an executable block. When the end of this block is\nreached, execution continues normally after the entire try statement.\n(This means that if two nested handlers exist for the same exception,\nand the exception occurs in the try clause of the inner handler, the\nouter handler will not handle the exception.)\n\nWhen an exception has been assigned using "as target", it is cleared\nat the end of the except clause. This is as if\n\n except E as N:\n foo\n\nwas translated to\n\n except E as N:\n try:\n foo\n finally:\n del N\n\nThis means the exception must be assigned to a different name to be\nable to refer to it after the except clause. Exceptions are cleared\nbecause with the traceback attached to them, they form a reference\ncycle with the stack frame, keeping all locals in that frame alive\nuntil the next garbage collection occurs.\n\nBefore an except clause\'s suite is executed, details about the\nexception are stored in the "sys" module and can be accessed via\n"sys.exc_info()". "sys.exc_info()" returns a 3-tuple consisting of the\nexception class, the exception instance and a traceback object (see\nsection *The standard type hierarchy*) identifying the point in the\nprogram where the exception occurred. "sys.exc_info()" values are\nrestored to their previous values (before the call) when returning\nfrom a function that handled an exception.\n\nThe optional "else" clause is executed if and when control flows off\nthe end of the "try" clause. [2] Exceptions in the "else" clause are\nnot handled by the preceding "except" clauses.\n\nIf "finally" is present, it specifies a \'cleanup\' handler. The "try"\nclause is executed, including any "except" and "else" clauses. If an\nexception occurs in any of the clauses and is not handled, the\nexception is temporarily saved. The "finally" clause is executed. If\nthere is a saved exception it is re-raised at the end of the "finally"\nclause. If the "finally" clause raises another exception, the saved\nexception is set as the context of the new exception. If the "finally"\nclause executes a "return" or "break" statement, the saved exception\nis discarded:\n\n >>> def f():\n ... try:\n ... 1/0\n ... finally:\n ... return 42\n ...\n >>> f()\n 42\n\nThe exception information is not available to the program during\nexecution of the "finally" clause.\n\nWhen a "return", "break" or "continue" statement is executed in the\n"try" suite of a "try"..."finally" statement, the "finally" clause is\nalso executed \'on the way out.\' A "continue" statement is illegal in\nthe "finally" clause. (The reason is a problem with the current\nimplementation --- this restriction may be lifted in the future).\n\nThe return value of a function is determined by the last "return"\nstatement executed. Since the "finally" clause always executes, a\n"return" statement executed in the "finally" clause will always be the\nlast one executed:\n\n >>> def foo():\n ... try:\n ... return \'try\'\n ... finally:\n ... return \'finally\'\n ...\n >>> foo()\n \'finally\'\n\nAdditional information on exceptions can be found in section\n*Exceptions*, and information on using the "raise" statement to\ngenerate exceptions may be found in section *The raise statement*.\n',
- 'types': u'\nThe standard type hierarchy\n***************************\n\nBelow is a list of the types that are built into Python. Extension\nmodules (written in C, Java, or other languages, depending on the\nimplementation) can define additional types. Future versions of\nPython may add types to the type hierarchy (e.g., rational numbers,\nefficiently stored arrays of integers, etc.), although such additions\nwill often be provided via the standard library instead.\n\nSome of the type descriptions below contain a paragraph listing\n\'special attributes.\' These are attributes that provide access to the\nimplementation and are not intended for general use. Their definition\nmay change in the future.\n\nNone\n This type has a single value. There is a single object with this\n value. This object is accessed through the built-in name "None". It\n is used to signify the absence of a value in many situations, e.g.,\n it is returned from functions that don\'t explicitly return\n anything. Its truth value is false.\n\nNotImplemented\n This type has a single value. There is a single object with this\n value. This object is accessed through the built-in name\n "NotImplemented". Numeric methods and rich comparison methods\n should return this value if they do not implement the operation for\n the operands provided. (The interpreter will then try the\n reflected operation, or some other fallback, depending on the\n operator.) Its truth value is true.\n\n See *Implementing the arithmetic operations* for more details.\n\nEllipsis\n This type has a single value. There is a single object with this\n value. This object is accessed through the literal "..." or the\n built-in name "Ellipsis". Its truth value is true.\n\n"numbers.Number"\n These are created by numeric literals and returned as results by\n arithmetic operators and arithmetic built-in functions. Numeric\n objects are immutable; once created their value never changes.\n Python numbers are of course strongly related to mathematical\n numbers, but subject to the limitations of numerical representation\n in computers.\n\n Python distinguishes between integers, floating point numbers, and\n complex numbers:\n\n "numbers.Integral"\n These represent elements from the mathematical set of integers\n (positive and negative).\n\n There are two types of integers:\n\n Integers ("int")\n\n These represent numbers in an unlimited range, subject to\n available (virtual) memory only. For the purpose of shift\n and mask operations, a binary representation is assumed, and\n negative numbers are represented in a variant of 2\'s\n complement which gives the illusion of an infinite string of\n sign bits extending to the left.\n\n Booleans ("bool")\n These represent the truth values False and True. The two\n objects representing the values "False" and "True" are the\n only Boolean objects. The Boolean type is a subtype of the\n integer type, and Boolean values behave like the values 0 and\n 1, respectively, in almost all contexts, the exception being\n that when converted to a string, the strings ""False"" or\n ""True"" are returned, respectively.\n\n The rules for integer representation are intended to give the\n most meaningful interpretation of shift and mask operations\n involving negative integers.\n\n "numbers.Real" ("float")\n These represent machine-level double precision floating point\n numbers. You are at the mercy of the underlying machine\n architecture (and C or Java implementation) for the accepted\n range and handling of overflow. Python does not support single-\n precision floating point numbers; the savings in processor and\n memory usage that are usually the reason for using these are\n dwarfed by the overhead of using objects in Python, so there is\n no reason to complicate the language with two kinds of floating\n point numbers.\n\n "numbers.Complex" ("complex")\n These represent complex numbers as a pair of machine-level\n double precision floating point numbers. The same caveats apply\n as for floating point numbers. The real and imaginary parts of a\n complex number "z" can be retrieved through the read-only\n attributes "z.real" and "z.imag".\n\nSequences\n These represent finite ordered sets indexed by non-negative\n numbers. The built-in function "len()" returns the number of items\n of a sequence. When the length of a sequence is *n*, the index set\n contains the numbers 0, 1, ..., *n*-1. Item *i* of sequence *a* is\n selected by "a[i]".\n\n Sequences also support slicing: "a[i:j]" selects all items with\n index *k* such that *i* "<=" *k* "<" *j*. When used as an\n expression, a slice is a sequence of the same type. This implies\n that the index set is renumbered so that it starts at 0.\n\n Some sequences also support "extended slicing" with a third "step"\n parameter: "a[i:j:k]" selects all items of *a* with index *x* where\n "x = i + n*k", *n* ">=" "0" and *i* "<=" *x* "<" *j*.\n\n Sequences are distinguished according to their mutability:\n\n Immutable sequences\n An object of an immutable sequence type cannot change once it is\n created. (If the object contains references to other objects,\n these other objects may be mutable and may be changed; however,\n the collection of objects directly referenced by an immutable\n object cannot change.)\n\n The following types are immutable sequences:\n\n Strings\n A string is a sequence of values that represent Unicode code\n points. All the code points in the range "U+0000 - U+10FFFF"\n can be represented in a string. Python doesn\'t have a "char"\n type; instead, every code point in the string is represented\n as a string object with length "1". The built-in function\n "ord()" converts a code point from its string form to an\n integer in the range "0 - 10FFFF"; "chr()" converts an\n integer in the range "0 - 10FFFF" to the corresponding length\n "1" string object. "str.encode()" can be used to convert a\n "str" to "bytes" using the given text encoding, and\n "bytes.decode()" can be used to achieve the opposite.\n\n Tuples\n The items of a tuple are arbitrary Python objects. Tuples of\n two or more items are formed by comma-separated lists of\n expressions. A tuple of one item (a \'singleton\') can be\n formed by affixing a comma to an expression (an expression by\n itself does not create a tuple, since parentheses must be\n usable for grouping of expressions). An empty tuple can be\n formed by an empty pair of parentheses.\n\n Bytes\n A bytes object is an immutable array. The items are 8-bit\n bytes, represented by integers in the range 0 <= x < 256.\n Bytes literals (like "b\'abc\'") and the built-in function\n "bytes()" can be used to construct bytes objects. Also,\n bytes objects can be decoded to strings via the "decode()"\n method.\n\n Mutable sequences\n Mutable sequences can be changed after they are created. The\n subscription and slicing notations can be used as the target of\n assignment and "del" (delete) statements.\n\n There are currently two intrinsic mutable sequence types:\n\n Lists\n The items of a list are arbitrary Python objects. Lists are\n formed by placing a comma-separated list of expressions in\n square brackets. (Note that there are no special cases needed\n to form lists of length 0 or 1.)\n\n Byte Arrays\n A bytearray object is a mutable array. They are created by\n the built-in "bytearray()" constructor. Aside from being\n mutable (and hence unhashable), byte arrays otherwise provide\n the same interface and functionality as immutable bytes\n objects.\n\n The extension module "array" provides an additional example of a\n mutable sequence type, as does the "collections" module.\n\nSet types\n These represent unordered, finite sets of unique, immutable\n objects. As such, they cannot be indexed by any subscript. However,\n they can be iterated over, and the built-in function "len()"\n returns the number of items in a set. Common uses for sets are fast\n membership testing, removing duplicates from a sequence, and\n computing mathematical operations such as intersection, union,\n difference, and symmetric difference.\n\n For set elements, the same immutability rules apply as for\n dictionary keys. Note that numeric types obey the normal rules for\n numeric comparison: if two numbers compare equal (e.g., "1" and\n "1.0"), only one of them can be contained in a set.\n\n There are currently two intrinsic set types:\n\n Sets\n These represent a mutable set. They are created by the built-in\n "set()" constructor and can be modified afterwards by several\n methods, such as "add()".\n\n Frozen sets\n These represent an immutable set. They are created by the\n built-in "frozenset()" constructor. As a frozenset is immutable\n and *hashable*, it can be used again as an element of another\n set, or as a dictionary key.\n\nMappings\n These represent finite sets of objects indexed by arbitrary index\n sets. The subscript notation "a[k]" selects the item indexed by "k"\n from the mapping "a"; this can be used in expressions and as the\n target of assignments or "del" statements. The built-in function\n "len()" returns the number of items in a mapping.\n\n There is currently a single intrinsic mapping type:\n\n Dictionaries\n These represent finite sets of objects indexed by nearly\n arbitrary values. The only types of values not acceptable as\n keys are values containing lists or dictionaries or other\n mutable types that are compared by value rather than by object\n identity, the reason being that the efficient implementation of\n dictionaries requires a key\'s hash value to remain constant.\n Numeric types used for keys obey the normal rules for numeric\n comparison: if two numbers compare equal (e.g., "1" and "1.0")\n then they can be used interchangeably to index the same\n dictionary entry.\n\n Dictionaries are mutable; they can be created by the "{...}"\n notation (see section *Dictionary displays*).\n\n The extension modules "dbm.ndbm" and "dbm.gnu" provide\n additional examples of mapping types, as does the "collections"\n module.\n\nCallable types\n These are the types to which the function call operation (see\n section *Calls*) can be applied:\n\n User-defined functions\n A user-defined function object is created by a function\n definition (see section *Function definitions*). It should be\n called with an argument list containing the same number of items\n as the function\'s formal parameter list.\n\n Special attributes:\n\n +---------------------------+---------------------------------+-------------+\n | Attribute | Meaning | |\n +===========================+=================================+=============+\n | "__doc__" | The function\'s documentation | Writable |\n | | string, or "None" if | |\n | | unavailable; not inherited by | |\n | | subclasses | |\n +---------------------------+---------------------------------+-------------+\n | "__name__" | The function\'s name | Writable |\n +---------------------------+---------------------------------+-------------+\n | "__qualname__" | The function\'s *qualified name* | Writable |\n | | New in version 3.3. | |\n +---------------------------+---------------------------------+-------------+\n | "__module__" | The name of the module the | Writable |\n | | function was defined in, or | |\n | | "None" if unavailable. | |\n +---------------------------+---------------------------------+-------------+\n | "__defaults__" | A tuple containing default | Writable |\n | | argument values for those | |\n | | arguments that have defaults, | |\n | | or "None" if no arguments have | |\n | | a default value | |\n +---------------------------+---------------------------------+-------------+\n | "__code__" | The code object representing | Writable |\n | | the compiled function body. | |\n +---------------------------+---------------------------------+-------------+\n | "__globals__" | A reference to the dictionary | Read-only |\n | | that holds the function\'s | |\n | | global variables --- the global | |\n | | namespace of the module in | |\n | | which the function was defined. | |\n +---------------------------+---------------------------------+-------------+\n | "__dict__" | The namespace supporting | Writable |\n | | arbitrary function attributes. | |\n +---------------------------+---------------------------------+-------------+\n | "__closure__" | "None" or a tuple of cells that | Read-only |\n | | contain bindings for the | |\n | | function\'s free variables. | |\n +---------------------------+---------------------------------+-------------+\n | "__annotations__" | A dict containing annotations | Writable |\n | | of parameters. The keys of the | |\n | | dict are the parameter names, | |\n | | and "\'return\'" for the return | |\n | | annotation, if provided. | |\n +---------------------------+---------------------------------+-------------+\n | "__kwdefaults__" | A dict containing defaults for | Writable |\n | | keyword-only parameters. | |\n +---------------------------+---------------------------------+-------------+\n\n Most of the attributes labelled "Writable" check the type of the\n assigned value.\n\n Function objects also support getting and setting arbitrary\n attributes, which can be used, for example, to attach metadata\n to functions. Regular attribute dot-notation is used to get and\n set such attributes. *Note that the current implementation only\n supports function attributes on user-defined functions. Function\n attributes on built-in functions may be supported in the\n future.*\n\n Additional information about a function\'s definition can be\n retrieved from its code object; see the description of internal\n types below.\n\n Instance methods\n An instance method object combines a class, a class instance and\n any callable object (normally a user-defined function).\n\n Special read-only attributes: "__self__" is the class instance\n object, "__func__" is the function object; "__doc__" is the\n method\'s documentation (same as "__func__.__doc__"); "__name__"\n is the method name (same as "__func__.__name__"); "__module__"\n is the name of the module the method was defined in, or "None"\n if unavailable.\n\n Methods also support accessing (but not setting) the arbitrary\n function attributes on the underlying function object.\n\n User-defined method objects may be created when getting an\n attribute of a class (perhaps via an instance of that class), if\n that attribute is a user-defined function object or a class\n method object.\n\n When an instance method object is created by retrieving a user-\n defined function object from a class via one of its instances,\n its "__self__" attribute is the instance, and the method object\n is said to be bound. The new method\'s "__func__" attribute is\n the original function object.\n\n When a user-defined method object is created by retrieving\n another method object from a class or instance, the behaviour is\n the same as for a function object, except that the "__func__"\n attribute of the new instance is not the original method object\n but its "__func__" attribute.\n\n When an instance method object is created by retrieving a class\n method object from a class or instance, its "__self__" attribute\n is the class itself, and its "__func__" attribute is the\n function object underlying the class method.\n\n When an instance method object is called, the underlying\n function ("__func__") is called, inserting the class instance\n ("__self__") in front of the argument list. For instance, when\n "C" is a class which contains a definition for a function "f()",\n and "x" is an instance of "C", calling "x.f(1)" is equivalent to\n calling "C.f(x, 1)".\n\n When an instance method object is derived from a class method\n object, the "class instance" stored in "__self__" will actually\n be the class itself, so that calling either "x.f(1)" or "C.f(1)"\n is equivalent to calling "f(C,1)" where "f" is the underlying\n function.\n\n Note that the transformation from function object to instance\n method object happens each time the attribute is retrieved from\n the instance. In some cases, a fruitful optimization is to\n assign the attribute to a local variable and call that local\n variable. Also notice that this transformation only happens for\n user-defined functions; other callable objects (and all non-\n callable objects) are retrieved without transformation. It is\n also important to note that user-defined functions which are\n attributes of a class instance are not converted to bound\n methods; this *only* happens when the function is an attribute\n of the class.\n\n Generator functions\n A function or method which uses the "yield" statement (see\n section *The yield statement*) is called a *generator function*.\n Such a function, when called, always returns an iterator object\n which can be used to execute the body of the function: calling\n the iterator\'s "iterator.__next__()" method will cause the\n function to execute until it provides a value using the "yield"\n statement. When the function executes a "return" statement or\n falls off the end, a "StopIteration" exception is raised and the\n iterator will have reached the end of the set of values to be\n returned.\n\n Built-in functions\n A built-in function object is a wrapper around a C function.\n Examples of built-in functions are "len()" and "math.sin()"\n ("math" is a standard built-in module). The number and type of\n the arguments are determined by the C function. Special read-\n only attributes: "__doc__" is the function\'s documentation\n string, or "None" if unavailable; "__name__" is the function\'s\n name; "__self__" is set to "None" (but see the next item);\n "__module__" is the name of the module the function was defined\n in or "None" if unavailable.\n\n Built-in methods\n This is really a different disguise of a built-in function, this\n time containing an object passed to the C function as an\n implicit extra argument. An example of a built-in method is\n "alist.append()", assuming *alist* is a list object. In this\n case, the special read-only attribute "__self__" is set to the\n object denoted by *alist*.\n\n Classes\n Classes are callable. These objects normally act as factories\n for new instances of themselves, but variations are possible for\n class types that override "__new__()". The arguments of the\n call are passed to "__new__()" and, in the typical case, to\n "__init__()" to initialize the new instance.\n\n Class Instances\n Instances of arbitrary classes can be made callable by defining\n a "__call__()" method in their class.\n\nModules\n Modules are a basic organizational unit of Python code, and are\n created by the *import system* as invoked either by the "import"\n statement (see "import"), or by calling functions such as\n "importlib.import_module()" and built-in "__import__()". A module\n object has a namespace implemented by a dictionary object (this is\n the dictionary referenced by the "__globals__" attribute of\n functions defined in the module). Attribute references are\n translated to lookups in this dictionary, e.g., "m.x" is equivalent\n to "m.__dict__["x"]". A module object does not contain the code\n object used to initialize the module (since it isn\'t needed once\n the initialization is done).\n\n Attribute assignment updates the module\'s namespace dictionary,\n e.g., "m.x = 1" is equivalent to "m.__dict__["x"] = 1".\n\n Special read-only attribute: "__dict__" is the module\'s namespace\n as a dictionary object.\n\n **CPython implementation detail:** Because of the way CPython\n clears module dictionaries, the module dictionary will be cleared\n when the module falls out of scope even if the dictionary still has\n live references. To avoid this, copy the dictionary or keep the\n module around while using its dictionary directly.\n\n Predefined (writable) attributes: "__name__" is the module\'s name;\n "__doc__" is the module\'s documentation string, or "None" if\n unavailable; "__file__" is the pathname of the file from which the\n module was loaded, if it was loaded from a file. The "__file__"\n attribute may be missing for certain types of modules, such as C\n modules that are statically linked into the interpreter; for\n extension modules loaded dynamically from a shared library, it is\n the pathname of the shared library file.\n\nCustom classes\n Custom class types are typically created by class definitions (see\n section *Class definitions*). A class has a namespace implemented\n by a dictionary object. Class attribute references are translated\n to lookups in this dictionary, e.g., "C.x" is translated to\n "C.__dict__["x"]" (although there are a number of hooks which allow\n for other means of locating attributes). When the attribute name is\n not found there, the attribute search continues in the base\n classes. This search of the base classes uses the C3 method\n resolution order which behaves correctly even in the presence of\n \'diamond\' inheritance structures where there are multiple\n inheritance paths leading back to a common ancestor. Additional\n details on the C3 MRO used by Python can be found in the\n documentation accompanying the 2.3 release at\n https://www.python.org/download/releases/2.3/mro/.\n\n When a class attribute reference (for class "C", say) would yield a\n class method object, it is transformed into an instance method\n object whose "__self__" attributes is "C". When it would yield a\n static method object, it is transformed into the object wrapped by\n the static method object. See section *Implementing Descriptors*\n for another way in which attributes retrieved from a class may\n differ from those actually contained in its "__dict__".\n\n Class attribute assignments update the class\'s dictionary, never\n the dictionary of a base class.\n\n A class object can be called (see above) to yield a class instance\n (see below).\n\n Special attributes: "__name__" is the class name; "__module__" is\n the module name in which the class was defined; "__dict__" is the\n dictionary containing the class\'s namespace; "__bases__" is a tuple\n (possibly empty or a singleton) containing the base classes, in the\n order of their occurrence in the base class list; "__doc__" is the\n class\'s documentation string, or None if undefined.\n\nClass instances\n A class instance is created by calling a class object (see above).\n A class instance has a namespace implemented as a dictionary which\n is the first place in which attribute references are searched.\n When an attribute is not found there, and the instance\'s class has\n an attribute by that name, the search continues with the class\n attributes. If a class attribute is found that is a user-defined\n function object, it is transformed into an instance method object\n whose "__self__" attribute is the instance. Static method and\n class method objects are also transformed; see above under\n "Classes". See section *Implementing Descriptors* for another way\n in which attributes of a class retrieved via its instances may\n differ from the objects actually stored in the class\'s "__dict__".\n If no class attribute is found, and the object\'s class has a\n "__getattr__()" method, that is called to satisfy the lookup.\n\n Attribute assignments and deletions update the instance\'s\n dictionary, never a class\'s dictionary. If the class has a\n "__setattr__()" or "__delattr__()" method, this is called instead\n of updating the instance dictionary directly.\n\n Class instances can pretend to be numbers, sequences, or mappings\n if they have methods with certain special names. See section\n *Special method names*.\n\n Special attributes: "__dict__" is the attribute dictionary;\n "__class__" is the instance\'s class.\n\nI/O objects (also known as file objects)\n A *file object* represents an open file. Various shortcuts are\n available to create file objects: the "open()" built-in function,\n and also "os.popen()", "os.fdopen()", and the "makefile()" method\n of socket objects (and perhaps by other functions or methods\n provided by extension modules).\n\n The objects "sys.stdin", "sys.stdout" and "sys.stderr" are\n initialized to file objects corresponding to the interpreter\'s\n standard input, output and error streams; they are all open in text\n mode and therefore follow the interface defined by the\n "io.TextIOBase" abstract class.\n\nInternal types\n A few types used internally by the interpreter are exposed to the\n user. Their definitions may change with future versions of the\n interpreter, but they are mentioned here for completeness.\n\n Code objects\n Code objects represent *byte-compiled* executable Python code,\n or *bytecode*. The difference between a code object and a\n function object is that the function object contains an explicit\n reference to the function\'s globals (the module in which it was\n defined), while a code object contains no context; also the\n default argument values are stored in the function object, not\n in the code object (because they represent values calculated at\n run-time). Unlike function objects, code objects are immutable\n and contain no references (directly or indirectly) to mutable\n objects.\n\n Special read-only attributes: "co_name" gives the function name;\n "co_argcount" is the number of positional arguments (including\n arguments with default values); "co_nlocals" is the number of\n local variables used by the function (including arguments);\n "co_varnames" is a tuple containing the names of the local\n variables (starting with the argument names); "co_cellvars" is a\n tuple containing the names of local variables that are\n referenced by nested functions; "co_freevars" is a tuple\n containing the names of free variables; "co_code" is a string\n representing the sequence of bytecode instructions; "co_consts"\n is a tuple containing the literals used by the bytecode;\n "co_names" is a tuple containing the names used by the bytecode;\n "co_filename" is the filename from which the code was compiled;\n "co_firstlineno" is the first line number of the function;\n "co_lnotab" is a string encoding the mapping from bytecode\n offsets to line numbers (for details see the source code of the\n interpreter); "co_stacksize" is the required stack size\n (including local variables); "co_flags" is an integer encoding a\n number of flags for the interpreter.\n\n The following flag bits are defined for "co_flags": bit "0x04"\n is set if the function uses the "*arguments" syntax to accept an\n arbitrary number of positional arguments; bit "0x08" is set if\n the function uses the "**keywords" syntax to accept arbitrary\n keyword arguments; bit "0x20" is set if the function is a\n generator.\n\n Future feature declarations ("from __future__ import division")\n also use bits in "co_flags" to indicate whether a code object\n was compiled with a particular feature enabled: bit "0x2000" is\n set if the function was compiled with future division enabled;\n bits "0x10" and "0x1000" were used in earlier versions of\n Python.\n\n Other bits in "co_flags" are reserved for internal use.\n\n If a code object represents a function, the first item in\n "co_consts" is the documentation string of the function, or\n "None" if undefined.\n\n Frame objects\n Frame objects represent execution frames. They may occur in\n traceback objects (see below).\n\n Special read-only attributes: "f_back" is to the previous stack\n frame (towards the caller), or "None" if this is the bottom\n stack frame; "f_code" is the code object being executed in this\n frame; "f_locals" is the dictionary used to look up local\n variables; "f_globals" is used for global variables;\n "f_builtins" is used for built-in (intrinsic) names; "f_lasti"\n gives the precise instruction (this is an index into the\n bytecode string of the code object).\n\n Special writable attributes: "f_trace", if not "None", is a\n function called at the start of each source code line (this is\n used by the debugger); "f_lineno" is the current line number of\n the frame --- writing to this from within a trace function jumps\n to the given line (only for the bottom-most frame). A debugger\n can implement a Jump command (aka Set Next Statement) by writing\n to f_lineno.\n\n Frame objects support one method:\n\n frame.clear()\n\n This method clears all references to local variables held by\n the frame. Also, if the frame belonged to a generator, the\n generator is finalized. This helps break reference cycles\n involving frame objects (for example when catching an\n exception and storing its traceback for later use).\n\n "RuntimeError" is raised if the frame is currently executing.\n\n New in version 3.4.\n\n Traceback objects\n Traceback objects represent a stack trace of an exception. A\n traceback object is created when an exception occurs. When the\n search for an exception handler unwinds the execution stack, at\n each unwound level a traceback object is inserted in front of\n the current traceback. When an exception handler is entered,\n the stack trace is made available to the program. (See section\n *The try statement*.) It is accessible as the third item of the\n tuple returned by "sys.exc_info()". When the program contains no\n suitable handler, the stack trace is written (nicely formatted)\n to the standard error stream; if the interpreter is interactive,\n it is also made available to the user as "sys.last_traceback".\n\n Special read-only attributes: "tb_next" is the next level in the\n stack trace (towards the frame where the exception occurred), or\n "None" if there is no next level; "tb_frame" points to the\n execution frame of the current level; "tb_lineno" gives the line\n number where the exception occurred; "tb_lasti" indicates the\n precise instruction. The line number and last instruction in\n the traceback may differ from the line number of its frame\n object if the exception occurred in a "try" statement with no\n matching except clause or with a finally clause.\n\n Slice objects\n Slice objects are used to represent slices for "__getitem__()"\n methods. They are also created by the built-in "slice()"\n function.\n\n Special read-only attributes: "start" is the lower bound; "stop"\n is the upper bound; "step" is the step value; each is "None" if\n omitted. These attributes can have any type.\n\n Slice objects support one method:\n\n slice.indices(self, length)\n\n This method takes a single integer argument *length* and\n computes information about the slice that the slice object\n would describe if applied to a sequence of *length* items.\n It returns a tuple of three integers; respectively these are\n the *start* and *stop* indices and the *step* or stride\n length of the slice. Missing or out-of-bounds indices are\n handled in a manner consistent with regular slices.\n\n Static method objects\n Static method objects provide a way of defeating the\n transformation of function objects to method objects described\n above. A static method object is a wrapper around any other\n object, usually a user-defined method object. When a static\n method object is retrieved from a class or a class instance, the\n object actually returned is the wrapped object, which is not\n subject to any further transformation. Static method objects are\n not themselves callable, although the objects they wrap usually\n are. Static method objects are created by the built-in\n "staticmethod()" constructor.\n\n Class method objects\n A class method object, like a static method object, is a wrapper\n around another object that alters the way in which that object\n is retrieved from classes and class instances. The behaviour of\n class method objects upon such retrieval is described above,\n under "User-defined methods". Class method objects are created\n by the built-in "classmethod()" constructor.\n',
+ 'types': u'\nThe standard type hierarchy\n***************************\n\nBelow is a list of the types that are built into Python. Extension\nmodules (written in C, Java, or other languages, depending on the\nimplementation) can define additional types. Future versions of\nPython may add types to the type hierarchy (e.g., rational numbers,\nefficiently stored arrays of integers, etc.), although such additions\nwill often be provided via the standard library instead.\n\nSome of the type descriptions below contain a paragraph listing\n\'special attributes.\' These are attributes that provide access to the\nimplementation and are not intended for general use. Their definition\nmay change in the future.\n\nNone\n This type has a single value. There is a single object with this\n value. This object is accessed through the built-in name "None". It\n is used to signify the absence of a value in many situations, e.g.,\n it is returned from functions that don\'t explicitly return\n anything. Its truth value is false.\n\nNotImplemented\n This type has a single value. There is a single object with this\n value. This object is accessed through the built-in name\n "NotImplemented". Numeric methods and rich comparison methods\n should return this value if they do not implement the operation for\n the operands provided. (The interpreter will then try the\n reflected operation, or some other fallback, depending on the\n operator.) Its truth value is true.\n\n See *Implementing the arithmetic operations* for more details.\n\nEllipsis\n This type has a single value. There is a single object with this\n value. This object is accessed through the literal "..." or the\n built-in name "Ellipsis". Its truth value is true.\n\n"numbers.Number"\n These are created by numeric literals and returned as results by\n arithmetic operators and arithmetic built-in functions. Numeric\n objects are immutable; once created their value never changes.\n Python numbers are of course strongly related to mathematical\n numbers, but subject to the limitations of numerical representation\n in computers.\n\n Python distinguishes between integers, floating point numbers, and\n complex numbers:\n\n "numbers.Integral"\n These represent elements from the mathematical set of integers\n (positive and negative).\n\n There are two types of integers:\n\n Integers ("int")\n\n These represent numbers in an unlimited range, subject to\n available (virtual) memory only. For the purpose of shift\n and mask operations, a binary representation is assumed, and\n negative numbers are represented in a variant of 2\'s\n complement which gives the illusion of an infinite string of\n sign bits extending to the left.\n\n Booleans ("bool")\n These represent the truth values False and True. The two\n objects representing the values "False" and "True" are the\n only Boolean objects. The Boolean type is a subtype of the\n integer type, and Boolean values behave like the values 0 and\n 1, respectively, in almost all contexts, the exception being\n that when converted to a string, the strings ""False"" or\n ""True"" are returned, respectively.\n\n The rules for integer representation are intended to give the\n most meaningful interpretation of shift and mask operations\n involving negative integers.\n\n "numbers.Real" ("float")\n These represent machine-level double precision floating point\n numbers. You are at the mercy of the underlying machine\n architecture (and C or Java implementation) for the accepted\n range and handling of overflow. Python does not support single-\n precision floating point numbers; the savings in processor and\n memory usage that are usually the reason for using these are\n dwarfed by the overhead of using objects in Python, so there is\n no reason to complicate the language with two kinds of floating\n point numbers.\n\n "numbers.Complex" ("complex")\n These represent complex numbers as a pair of machine-level\n double precision floating point numbers. The same caveats apply\n as for floating point numbers. The real and imaginary parts of a\n complex number "z" can be retrieved through the read-only\n attributes "z.real" and "z.imag".\n\nSequences\n These represent finite ordered sets indexed by non-negative\n numbers. The built-in function "len()" returns the number of items\n of a sequence. When the length of a sequence is *n*, the index set\n contains the numbers 0, 1, ..., *n*-1. Item *i* of sequence *a* is\n selected by "a[i]".\n\n Sequences also support slicing: "a[i:j]" selects all items with\n index *k* such that *i* "<=" *k* "<" *j*. When used as an\n expression, a slice is a sequence of the same type. This implies\n that the index set is renumbered so that it starts at 0.\n\n Some sequences also support "extended slicing" with a third "step"\n parameter: "a[i:j:k]" selects all items of *a* with index *x* where\n "x = i + n*k", *n* ">=" "0" and *i* "<=" *x* "<" *j*.\n\n Sequences are distinguished according to their mutability:\n\n Immutable sequences\n An object of an immutable sequence type cannot change once it is\n created. (If the object contains references to other objects,\n these other objects may be mutable and may be changed; however,\n the collection of objects directly referenced by an immutable\n object cannot change.)\n\n The following types are immutable sequences:\n\n Strings\n A string is a sequence of values that represent Unicode code\n points. All the code points in the range "U+0000 - U+10FFFF"\n can be represented in a string. Python doesn\'t have a "char"\n type; instead, every code point in the string is represented\n as a string object with length "1". The built-in function\n "ord()" converts a code point from its string form to an\n integer in the range "0 - 10FFFF"; "chr()" converts an\n integer in the range "0 - 10FFFF" to the corresponding length\n "1" string object. "str.encode()" can be used to convert a\n "str" to "bytes" using the given text encoding, and\n "bytes.decode()" can be used to achieve the opposite.\n\n Tuples\n The items of a tuple are arbitrary Python objects. Tuples of\n two or more items are formed by comma-separated lists of\n expressions. A tuple of one item (a \'singleton\') can be\n formed by affixing a comma to an expression (an expression by\n itself does not create a tuple, since parentheses must be\n usable for grouping of expressions). An empty tuple can be\n formed by an empty pair of parentheses.\n\n Bytes\n A bytes object is an immutable array. The items are 8-bit\n bytes, represented by integers in the range 0 <= x < 256.\n Bytes literals (like "b\'abc\'") and the built-in function\n "bytes()" can be used to construct bytes objects. Also,\n bytes objects can be decoded to strings via the "decode()"\n method.\n\n Mutable sequences\n Mutable sequences can be changed after they are created. The\n subscription and slicing notations can be used as the target of\n assignment and "del" (delete) statements.\n\n There are currently two intrinsic mutable sequence types:\n\n Lists\n The items of a list are arbitrary Python objects. Lists are\n formed by placing a comma-separated list of expressions in\n square brackets. (Note that there are no special cases needed\n to form lists of length 0 or 1.)\n\n Byte Arrays\n A bytearray object is a mutable array. They are created by\n the built-in "bytearray()" constructor. Aside from being\n mutable (and hence unhashable), byte arrays otherwise provide\n the same interface and functionality as immutable bytes\n objects.\n\n The extension module "array" provides an additional example of a\n mutable sequence type, as does the "collections" module.\n\nSet types\n These represent unordered, finite sets of unique, immutable\n objects. As such, they cannot be indexed by any subscript. However,\n they can be iterated over, and the built-in function "len()"\n returns the number of items in a set. Common uses for sets are fast\n membership testing, removing duplicates from a sequence, and\n computing mathematical operations such as intersection, union,\n difference, and symmetric difference.\n\n For set elements, the same immutability rules apply as for\n dictionary keys. Note that numeric types obey the normal rules for\n numeric comparison: if two numbers compare equal (e.g., "1" and\n "1.0"), only one of them can be contained in a set.\n\n There are currently two intrinsic set types:\n\n Sets\n These represent a mutable set. They are created by the built-in\n "set()" constructor and can be modified afterwards by several\n methods, such as "add()".\n\n Frozen sets\n These represent an immutable set. They are created by the\n built-in "frozenset()" constructor. As a frozenset is immutable\n and *hashable*, it can be used again as an element of another\n set, or as a dictionary key.\n\nMappings\n These represent finite sets of objects indexed by arbitrary index\n sets. The subscript notation "a[k]" selects the item indexed by "k"\n from the mapping "a"; this can be used in expressions and as the\n target of assignments or "del" statements. The built-in function\n "len()" returns the number of items in a mapping.\n\n There is currently a single intrinsic mapping type:\n\n Dictionaries\n These represent finite sets of objects indexed by nearly\n arbitrary values. The only types of values not acceptable as\n keys are values containing lists or dictionaries or other\n mutable types that are compared by value rather than by object\n identity, the reason being that the efficient implementation of\n dictionaries requires a key\'s hash value to remain constant.\n Numeric types used for keys obey the normal rules for numeric\n comparison: if two numbers compare equal (e.g., "1" and "1.0")\n then they can be used interchangeably to index the same\n dictionary entry.\n\n Dictionaries are mutable; they can be created by the "{...}"\n notation (see section *Dictionary displays*).\n\n The extension modules "dbm.ndbm" and "dbm.gnu" provide\n additional examples of mapping types, as does the "collections"\n module.\n\nCallable types\n These are the types to which the function call operation (see\n section *Calls*) can be applied:\n\n User-defined functions\n A user-defined function object is created by a function\n definition (see section *Function definitions*). It should be\n called with an argument list containing the same number of items\n as the function\'s formal parameter list.\n\n Special attributes:\n\n +---------------------------+---------------------------------+-------------+\n | Attribute | Meaning | |\n +===========================+=================================+=============+\n | "__doc__" | The function\'s documentation | Writable |\n | | string, or "None" if | |\n | | unavailable; not inherited by | |\n | | subclasses | |\n +---------------------------+---------------------------------+-------------+\n | "__name__" | The function\'s name | Writable |\n +---------------------------+---------------------------------+-------------+\n | "__qualname__" | The function\'s *qualified name* | Writable |\n | | New in version 3.3. | |\n +---------------------------+---------------------------------+-------------+\n | "__module__" | The name of the module the | Writable |\n | | function was defined in, or | |\n | | "None" if unavailable. | |\n +---------------------------+---------------------------------+-------------+\n | "__defaults__" | A tuple containing default | Writable |\n | | argument values for those | |\n | | arguments that have defaults, | |\n | | or "None" if no arguments have | |\n | | a default value | |\n +---------------------------+---------------------------------+-------------+\n | "__code__" | The code object representing | Writable |\n | | the compiled function body. | |\n +---------------------------+---------------------------------+-------------+\n | "__globals__" | A reference to the dictionary | Read-only |\n | | that holds the function\'s | |\n | | global variables --- the global | |\n | | namespace of the module in | |\n | | which the function was defined. | |\n +---------------------------+---------------------------------+-------------+\n | "__dict__" | The namespace supporting | Writable |\n | | arbitrary function attributes. | |\n +---------------------------+---------------------------------+-------------+\n | "__closure__" | "None" or a tuple of cells that | Read-only |\n | | contain bindings for the | |\n | | function\'s free variables. | |\n +---------------------------+---------------------------------+-------------+\n | "__annotations__" | A dict containing annotations | Writable |\n | | of parameters. The keys of the | |\n | | dict are the parameter names, | |\n | | and "\'return\'" for the return | |\n | | annotation, if provided. | |\n +---------------------------+---------------------------------+-------------+\n | "__kwdefaults__" | A dict containing defaults for | Writable |\n | | keyword-only parameters. | |\n +---------------------------+---------------------------------+-------------+\n\n Most of the attributes labelled "Writable" check the type of the\n assigned value.\n\n Function objects also support getting and setting arbitrary\n attributes, which can be used, for example, to attach metadata\n to functions. Regular attribute dot-notation is used to get and\n set such attributes. *Note that the current implementation only\n supports function attributes on user-defined functions. Function\n attributes on built-in functions may be supported in the\n future.*\n\n Additional information about a function\'s definition can be\n retrieved from its code object; see the description of internal\n types below.\n\n Instance methods\n An instance method object combines a class, a class instance and\n any callable object (normally a user-defined function).\n\n Special read-only attributes: "__self__" is the class instance\n object, "__func__" is the function object; "__doc__" is the\n method\'s documentation (same as "__func__.__doc__"); "__name__"\n is the method name (same as "__func__.__name__"); "__module__"\n is the name of the module the method was defined in, or "None"\n if unavailable.\n\n Methods also support accessing (but not setting) the arbitrary\n function attributes on the underlying function object.\n\n User-defined method objects may be created when getting an\n attribute of a class (perhaps via an instance of that class), if\n that attribute is a user-defined function object or a class\n method object.\n\n When an instance method object is created by retrieving a user-\n defined function object from a class via one of its instances,\n its "__self__" attribute is the instance, and the method object\n is said to be bound. The new method\'s "__func__" attribute is\n the original function object.\n\n When a user-defined method object is created by retrieving\n another method object from a class or instance, the behaviour is\n the same as for a function object, except that the "__func__"\n attribute of the new instance is not the original method object\n but its "__func__" attribute.\n\n When an instance method object is created by retrieving a class\n method object from a class or instance, its "__self__" attribute\n is the class itself, and its "__func__" attribute is the\n function object underlying the class method.\n\n When an instance method object is called, the underlying\n function ("__func__") is called, inserting the class instance\n ("__self__") in front of the argument list. For instance, when\n "C" is a class which contains a definition for a function "f()",\n and "x" is an instance of "C", calling "x.f(1)" is equivalent to\n calling "C.f(x, 1)".\n\n When an instance method object is derived from a class method\n object, the "class instance" stored in "__self__" will actually\n be the class itself, so that calling either "x.f(1)" or "C.f(1)"\n is equivalent to calling "f(C,1)" where "f" is the underlying\n function.\n\n Note that the transformation from function object to instance\n method object happens each time the attribute is retrieved from\n the instance. In some cases, a fruitful optimization is to\n assign the attribute to a local variable and call that local\n variable. Also notice that this transformation only happens for\n user-defined functions; other callable objects (and all non-\n callable objects) are retrieved without transformation. It is\n also important to note that user-defined functions which are\n attributes of a class instance are not converted to bound\n methods; this *only* happens when the function is an attribute\n of the class.\n\n Generator functions\n A function or method which uses the "yield" statement (see\n section *The yield statement*) is called a *generator function*.\n Such a function, when called, always returns an iterator object\n which can be used to execute the body of the function: calling\n the iterator\'s "iterator.__next__()" method will cause the\n function to execute until it provides a value using the "yield"\n statement. When the function executes a "return" statement or\n falls off the end, a "StopIteration" exception is raised and the\n iterator will have reached the end of the set of values to be\n returned.\n\n Coroutine functions\n A function or method which is defined using "async def" is\n called a *coroutine function*. Such a function, when called,\n returns a *coroutine* object. It may contain "await"\n expressions, as well as "async with" and "async for" statements.\n See also the *Coroutine Objects* section.\n\n Built-in functions\n A built-in function object is a wrapper around a C function.\n Examples of built-in functions are "len()" and "math.sin()"\n ("math" is a standard built-in module). The number and type of\n the arguments are determined by the C function. Special read-\n only attributes: "__doc__" is the function\'s documentation\n string, or "None" if unavailable; "__name__" is the function\'s\n name; "__self__" is set to "None" (but see the next item);\n "__module__" is the name of the module the function was defined\n in or "None" if unavailable.\n\n Built-in methods\n This is really a different disguise of a built-in function, this\n time containing an object passed to the C function as an\n implicit extra argument. An example of a built-in method is\n "alist.append()", assuming *alist* is a list object. In this\n case, the special read-only attribute "__self__" is set to the\n object denoted by *alist*.\n\n Classes\n Classes are callable. These objects normally act as factories\n for new instances of themselves, but variations are possible for\n class types that override "__new__()". The arguments of the\n call are passed to "__new__()" and, in the typical case, to\n "__init__()" to initialize the new instance.\n\n Class Instances\n Instances of arbitrary classes can be made callable by defining\n a "__call__()" method in their class.\n\nModules\n Modules are a basic organizational unit of Python code, and are\n created by the *import system* as invoked either by the "import"\n statement (see "import"), or by calling functions such as\n "importlib.import_module()" and built-in "__import__()". A module\n object has a namespace implemented by a dictionary object (this is\n the dictionary referenced by the "__globals__" attribute of\n functions defined in the module). Attribute references are\n translated to lookups in this dictionary, e.g., "m.x" is equivalent\n to "m.__dict__["x"]". A module object does not contain the code\n object used to initialize the module (since it isn\'t needed once\n the initialization is done).\n\n Attribute assignment updates the module\'s namespace dictionary,\n e.g., "m.x = 1" is equivalent to "m.__dict__["x"] = 1".\n\n Special read-only attribute: "__dict__" is the module\'s namespace\n as a dictionary object.\n\n **CPython implementation detail:** Because of the way CPython\n clears module dictionaries, the module dictionary will be cleared\n when the module falls out of scope even if the dictionary still has\n live references. To avoid this, copy the dictionary or keep the\n module around while using its dictionary directly.\n\n Predefined (writable) attributes: "__name__" is the module\'s name;\n "__doc__" is the module\'s documentation string, or "None" if\n unavailable; "__file__" is the pathname of the file from which the\n module was loaded, if it was loaded from a file. The "__file__"\n attribute may be missing for certain types of modules, such as C\n modules that are statically linked into the interpreter; for\n extension modules loaded dynamically from a shared library, it is\n the pathname of the shared library file.\n\nCustom classes\n Custom class types are typically created by class definitions (see\n section *Class definitions*). A class has a namespace implemented\n by a dictionary object. Class attribute references are translated\n to lookups in this dictionary, e.g., "C.x" is translated to\n "C.__dict__["x"]" (although there are a number of hooks which allow\n for other means of locating attributes). When the attribute name is\n not found there, the attribute search continues in the base\n classes. This search of the base classes uses the C3 method\n resolution order which behaves correctly even in the presence of\n \'diamond\' inheritance structures where there are multiple\n inheritance paths leading back to a common ancestor. Additional\n details on the C3 MRO used by Python can be found in the\n documentation accompanying the 2.3 release at\n https://www.python.org/download/releases/2.3/mro/.\n\n When a class attribute reference (for class "C", say) would yield a\n class method object, it is transformed into an instance method\n object whose "__self__" attributes is "C". When it would yield a\n static method object, it is transformed into the object wrapped by\n the static method object. See section *Implementing Descriptors*\n for another way in which attributes retrieved from a class may\n differ from those actually contained in its "__dict__".\n\n Class attribute assignments update the class\'s dictionary, never\n the dictionary of a base class.\n\n A class object can be called (see above) to yield a class instance\n (see below).\n\n Special attributes: "__name__" is the class name; "__module__" is\n the module name in which the class was defined; "__dict__" is the\n dictionary containing the class\'s namespace; "__bases__" is a tuple\n (possibly empty or a singleton) containing the base classes, in the\n order of their occurrence in the base class list; "__doc__" is the\n class\'s documentation string, or None if undefined.\n\nClass instances\n A class instance is created by calling a class object (see above).\n A class instance has a namespace implemented as a dictionary which\n is the first place in which attribute references are searched.\n When an attribute is not found there, and the instance\'s class has\n an attribute by that name, the search continues with the class\n attributes. If a class attribute is found that is a user-defined\n function object, it is transformed into an instance method object\n whose "__self__" attribute is the instance. Static method and\n class method objects are also transformed; see above under\n "Classes". See section *Implementing Descriptors* for another way\n in which attributes of a class retrieved via its instances may\n differ from the objects actually stored in the class\'s "__dict__".\n If no class attribute is found, and the object\'s class has a\n "__getattr__()" method, that is called to satisfy the lookup.\n\n Attribute assignments and deletions update the instance\'s\n dictionary, never a class\'s dictionary. If the class has a\n "__setattr__()" or "__delattr__()" method, this is called instead\n of updating the instance dictionary directly.\n\n Class instances can pretend to be numbers, sequences, or mappings\n if they have methods with certain special names. See section\n *Special method names*.\n\n Special attributes: "__dict__" is the attribute dictionary;\n "__class__" is the instance\'s class.\n\nI/O objects (also known as file objects)\n A *file object* represents an open file. Various shortcuts are\n available to create file objects: the "open()" built-in function,\n and also "os.popen()", "os.fdopen()", and the "makefile()" method\n of socket objects (and perhaps by other functions or methods\n provided by extension modules).\n\n The objects "sys.stdin", "sys.stdout" and "sys.stderr" are\n initialized to file objects corresponding to the interpreter\'s\n standard input, output and error streams; they are all open in text\n mode and therefore follow the interface defined by the\n "io.TextIOBase" abstract class.\n\nInternal types\n A few types used internally by the interpreter are exposed to the\n user. Their definitions may change with future versions of the\n interpreter, but they are mentioned here for completeness.\n\n Code objects\n Code objects represent *byte-compiled* executable Python code,\n or *bytecode*. The difference between a code object and a\n function object is that the function object contains an explicit\n reference to the function\'s globals (the module in which it was\n defined), while a code object contains no context; also the\n default argument values are stored in the function object, not\n in the code object (because they represent values calculated at\n run-time). Unlike function objects, code objects are immutable\n and contain no references (directly or indirectly) to mutable\n objects.\n\n Special read-only attributes: "co_name" gives the function name;\n "co_argcount" is the number of positional arguments (including\n arguments with default values); "co_nlocals" is the number of\n local variables used by the function (including arguments);\n "co_varnames" is a tuple containing the names of the local\n variables (starting with the argument names); "co_cellvars" is a\n tuple containing the names of local variables that are\n referenced by nested functions; "co_freevars" is a tuple\n containing the names of free variables; "co_code" is a string\n representing the sequence of bytecode instructions; "co_consts"\n is a tuple containing the literals used by the bytecode;\n "co_names" is a tuple containing the names used by the bytecode;\n "co_filename" is the filename from which the code was compiled;\n "co_firstlineno" is the first line number of the function;\n "co_lnotab" is a string encoding the mapping from bytecode\n offsets to line numbers (for details see the source code of the\n interpreter); "co_stacksize" is the required stack size\n (including local variables); "co_flags" is an integer encoding a\n number of flags for the interpreter.\n\n The following flag bits are defined for "co_flags": bit "0x04"\n is set if the function uses the "*arguments" syntax to accept an\n arbitrary number of positional arguments; bit "0x08" is set if\n the function uses the "**keywords" syntax to accept arbitrary\n keyword arguments; bit "0x20" is set if the function is a\n generator.\n\n Future feature declarations ("from __future__ import division")\n also use bits in "co_flags" to indicate whether a code object\n was compiled with a particular feature enabled: bit "0x2000" is\n set if the function was compiled with future division enabled;\n bits "0x10" and "0x1000" were used in earlier versions of\n Python.\n\n Other bits in "co_flags" are reserved for internal use.\n\n If a code object represents a function, the first item in\n "co_consts" is the documentation string of the function, or\n "None" if undefined.\n\n Frame objects\n Frame objects represent execution frames. They may occur in\n traceback objects (see below).\n\n Special read-only attributes: "f_back" is to the previous stack\n frame (towards the caller), or "None" if this is the bottom\n stack frame; "f_code" is the code object being executed in this\n frame; "f_locals" is the dictionary used to look up local\n variables; "f_globals" is used for global variables;\n "f_builtins" is used for built-in (intrinsic) names; "f_lasti"\n gives the precise instruction (this is an index into the\n bytecode string of the code object).\n\n Special writable attributes: "f_trace", if not "None", is a\n function called at the start of each source code line (this is\n used by the debugger); "f_lineno" is the current line number of\n the frame --- writing to this from within a trace function jumps\n to the given line (only for the bottom-most frame). A debugger\n can implement a Jump command (aka Set Next Statement) by writing\n to f_lineno.\n\n Frame objects support one method:\n\n frame.clear()\n\n This method clears all references to local variables held by\n the frame. Also, if the frame belonged to a generator, the\n generator is finalized. This helps break reference cycles\n involving frame objects (for example when catching an\n exception and storing its traceback for later use).\n\n "RuntimeError" is raised if the frame is currently executing.\n\n New in version 3.4.\n\n Traceback objects\n Traceback objects represent a stack trace of an exception. A\n traceback object is created when an exception occurs. When the\n search for an exception handler unwinds the execution stack, at\n each unwound level a traceback object is inserted in front of\n the current traceback. When an exception handler is entered,\n the stack trace is made available to the program. (See section\n *The try statement*.) It is accessible as the third item of the\n tuple returned by "sys.exc_info()". When the program contains no\n suitable handler, the stack trace is written (nicely formatted)\n to the standard error stream; if the interpreter is interactive,\n it is also made available to the user as "sys.last_traceback".\n\n Special read-only attributes: "tb_next" is the next level in the\n stack trace (towards the frame where the exception occurred), or\n "None" if there is no next level; "tb_frame" points to the\n execution frame of the current level; "tb_lineno" gives the line\n number where the exception occurred; "tb_lasti" indicates the\n precise instruction. The line number and last instruction in\n the traceback may differ from the line number of its frame\n object if the exception occurred in a "try" statement with no\n matching except clause or with a finally clause.\n\n Slice objects\n Slice objects are used to represent slices for "__getitem__()"\n methods. They are also created by the built-in "slice()"\n function.\n\n Special read-only attributes: "start" is the lower bound; "stop"\n is the upper bound; "step" is the step value; each is "None" if\n omitted. These attributes can have any type.\n\n Slice objects support one method:\n\n slice.indices(self, length)\n\n This method takes a single integer argument *length* and\n computes information about the slice that the slice object\n would describe if applied to a sequence of *length* items.\n It returns a tuple of three integers; respectively these are\n the *start* and *stop* indices and the *step* or stride\n length of the slice. Missing or out-of-bounds indices are\n handled in a manner consistent with regular slices.\n\n Static method objects\n Static method objects provide a way of defeating the\n transformation of function objects to method objects described\n above. A static method object is a wrapper around any other\n object, usually a user-defined method object. When a static\n method object is retrieved from a class or a class instance, the\n object actually returned is the wrapped object, which is not\n subject to any further transformation. Static method objects are\n not themselves callable, although the objects they wrap usually\n are. Static method objects are created by the built-in\n "staticmethod()" constructor.\n\n Class method objects\n A class method object, like a static method object, is a wrapper\n around another object that alters the way in which that object\n is retrieved from classes and class instances. The behaviour of\n class method objects upon such retrieval is described above,\n under "User-defined methods". Class method objects are created\n by the built-in "classmethod()" constructor.\n',
'typesfunctions': u'\nFunctions\n*********\n\nFunction objects are created by function definitions. The only\noperation on a function object is to call it: "func(argument-list)".\n\nThere are really two flavors of function objects: built-in functions\nand user-defined functions. Both support the same operation (to call\nthe function), but the implementation is different, hence the\ndifferent object types.\n\nSee *Function definitions* for more information.\n',
'typesmapping': u'\nMapping Types --- "dict"\n************************\n\nA *mapping* object maps *hashable* values to arbitrary objects.\nMappings are mutable objects. There is currently only one standard\nmapping type, the *dictionary*. (For other containers see the built-\nin "list", "set", and "tuple" classes, and the "collections" module.)\n\nA dictionary\'s keys are *almost* arbitrary values. Values that are\nnot *hashable*, that is, values containing lists, dictionaries or\nother mutable types (that are compared by value rather than by object\nidentity) may not be used as keys. Numeric types used for keys obey\nthe normal rules for numeric comparison: if two numbers compare equal\n(such as "1" and "1.0") then they can be used interchangeably to index\nthe same dictionary entry. (Note however, that since computers store\nfloating-point numbers as approximations it is usually unwise to use\nthem as dictionary keys.)\n\nDictionaries can be created by placing a comma-separated list of "key:\nvalue" pairs within braces, for example: "{\'jack\': 4098, \'sjoerd\':\n4127}" or "{4098: \'jack\', 4127: \'sjoerd\'}", or by the "dict"\nconstructor.\n\nclass class dict(**kwarg)\nclass class dict(mapping, **kwarg)\nclass class dict(iterable, **kwarg)\n\n Return a new dictionary initialized from an optional positional\n argument and a possibly empty set of keyword arguments.\n\n If no positional argument is given, an empty dictionary is created.\n If a positional argument is given and it is a mapping object, a\n dictionary is created with the same key-value pairs as the mapping\n object. Otherwise, the positional argument must be an *iterable*\n object. Each item in the iterable must itself be an iterable with\n exactly two objects. The first object of each item becomes a key\n in the new dictionary, and the second object the corresponding\n value. If a key occurs more than once, the last value for that key\n becomes the corresponding value in the new dictionary.\n\n If keyword arguments are given, the keyword arguments and their\n values are added to the dictionary created from the positional\n argument. If a key being added is already present, the value from\n the keyword argument replaces the value from the positional\n argument.\n\n To illustrate, the following examples all return a dictionary equal\n to "{"one": 1, "two": 2, "three": 3}":\n\n >>> a = dict(one=1, two=2, three=3)\n >>> b = {\'one\': 1, \'two\': 2, \'three\': 3}\n >>> c = dict(zip([\'one\', \'two\', \'three\'], [1, 2, 3]))\n >>> d = dict([(\'two\', 2), (\'one\', 1), (\'three\', 3)])\n >>> e = dict({\'three\': 3, \'one\': 1, \'two\': 2})\n >>> a == b == c == d == e\n True\n\n Providing keyword arguments as in the first example only works for\n keys that are valid Python identifiers. Otherwise, any valid keys\n can be used.\n\n These are the operations that dictionaries support (and therefore,\n custom mapping types should support too):\n\n len(d)\n\n Return the number of items in the dictionary *d*.\n\n d[key]\n\n Return the item of *d* with key *key*. Raises a "KeyError" if\n *key* is not in the map.\n\n If a subclass of dict defines a method "__missing__()" and *key*\n is not present, the "d[key]" operation calls that method with\n the key *key* as argument. The "d[key]" operation then returns\n or raises whatever is returned or raised by the\n "__missing__(key)" call. No other operations or methods invoke\n "__missing__()". If "__missing__()" is not defined, "KeyError"\n is raised. "__missing__()" must be a method; it cannot be an\n instance variable:\n\n >>> class Counter(dict):\n ... def __missing__(self, key):\n ... return 0\n >>> c = Counter()\n >>> c[\'red\']\n 0\n >>> c[\'red\'] += 1\n >>> c[\'red\']\n 1\n\n The example above shows part of the implementation of\n "collections.Counter". A different "__missing__" method is used\n by "collections.defaultdict".\n\n d[key] = value\n\n Set "d[key]" to *value*.\n\n del d[key]\n\n Remove "d[key]" from *d*. Raises a "KeyError" if *key* is not\n in the map.\n\n key in d\n\n Return "True" if *d* has a key *key*, else "False".\n\n key not in d\n\n Equivalent to "not key in d".\n\n iter(d)\n\n Return an iterator over the keys of the dictionary. This is a\n shortcut for "iter(d.keys())".\n\n clear()\n\n Remove all items from the dictionary.\n\n copy()\n\n Return a shallow copy of the dictionary.\n\n classmethod fromkeys(seq[, value])\n\n Create a new dictionary with keys from *seq* and values set to\n *value*.\n\n "fromkeys()" is a class method that returns a new dictionary.\n *value* defaults to "None".\n\n get(key[, default])\n\n Return the value for *key* if *key* is in the dictionary, else\n *default*. If *default* is not given, it defaults to "None", so\n that this method never raises a "KeyError".\n\n items()\n\n Return a new view of the dictionary\'s items ("(key, value)"\n pairs). See the *documentation of view objects*.\n\n keys()\n\n Return a new view of the dictionary\'s keys. See the\n *documentation of view objects*.\n\n pop(key[, default])\n\n If *key* is in the dictionary, remove it and return its value,\n else return *default*. If *default* is not given and *key* is\n not in the dictionary, a "KeyError" is raised.\n\n popitem()\n\n Remove and return an arbitrary "(key, value)" pair from the\n dictionary.\n\n "popitem()" is useful to destructively iterate over a\n dictionary, as often used in set algorithms. If the dictionary\n is empty, calling "popitem()" raises a "KeyError".\n\n setdefault(key[, default])\n\n If *key* is in the dictionary, return its value. If not, insert\n *key* with a value of *default* and return *default*. *default*\n defaults to "None".\n\n update([other])\n\n Update the dictionary with the key/value pairs from *other*,\n overwriting existing keys. Return "None".\n\n "update()" accepts either another dictionary object or an\n iterable of key/value pairs (as tuples or other iterables of\n length two). If keyword arguments are specified, the dictionary\n is then updated with those key/value pairs: "d.update(red=1,\n blue=2)".\n\n values()\n\n Return a new view of the dictionary\'s values. See the\n *documentation of view objects*.\n\n Dictionaries compare equal if and only if they have the same "(key,\n value)" pairs. Order comparisons (\'<\', \'<=\', \'>=\', \'>\') raise\n "TypeError".\n\nSee also: "types.MappingProxyType" can be used to create a read-only\n view of a "dict".\n\n\nDictionary view objects\n=======================\n\nThe objects returned by "dict.keys()", "dict.values()" and\n"dict.items()" are *view objects*. They provide a dynamic view on the\ndictionary\'s entries, which means that when the dictionary changes,\nthe view reflects these changes.\n\nDictionary views can be iterated over to yield their respective data,\nand support membership tests:\n\nlen(dictview)\n\n Return the number of entries in the dictionary.\n\niter(dictview)\n\n Return an iterator over the keys, values or items (represented as\n tuples of "(key, value)") in the dictionary.\n\n Keys and values are iterated over in an arbitrary order which is\n non-random, varies across Python implementations, and depends on\n the dictionary\'s history of insertions and deletions. If keys,\n values and items views are iterated over with no intervening\n modifications to the dictionary, the order of items will directly\n correspond. This allows the creation of "(value, key)" pairs using\n "zip()": "pairs = zip(d.values(), d.keys())". Another way to\n create the same list is "pairs = [(v, k) for (k, v) in d.items()]".\n\n Iterating views while adding or deleting entries in the dictionary\n may raise a "RuntimeError" or fail to iterate over all entries.\n\nx in dictview\n\n Return "True" if *x* is in the underlying dictionary\'s keys, values\n or items (in the latter case, *x* should be a "(key, value)"\n tuple).\n\nKeys views are set-like since their entries are unique and hashable.\nIf all values are hashable, so that "(key, value)" pairs are unique\nand hashable, then the items view is also set-like. (Values views are\nnot treated as set-like since the entries are generally not unique.)\nFor set-like views, all of the operations defined for the abstract\nbase class "collections.abc.Set" are available (for example, "==",\n"<", or "^").\n\nAn example of dictionary view usage:\n\n >>> dishes = {\'eggs\': 2, \'sausage\': 1, \'bacon\': 1, \'spam\': 500}\n >>> keys = dishes.keys()\n >>> values = dishes.values()\n\n >>> # iteration\n >>> n = 0\n >>> for val in values:\n ... n += val\n >>> print(n)\n 504\n\n >>> # keys and values are iterated over in the same order\n >>> list(keys)\n [\'eggs\', \'bacon\', \'sausage\', \'spam\']\n >>> list(values)\n [2, 1, 1, 500]\n\n >>> # view objects are dynamic and reflect dict changes\n >>> del dishes[\'eggs\']\n >>> del dishes[\'sausage\']\n >>> list(keys)\n [\'spam\', \'bacon\']\n\n >>> # set operations\n >>> keys & {\'eggs\', \'bacon\', \'salad\'}\n {\'bacon\'}\n >>> keys ^ {\'sausage\', \'juice\'}\n {\'juice\', \'sausage\', \'bacon\', \'spam\'}\n',
'typesmethods': u'\nMethods\n*******\n\nMethods are functions that are called using the attribute notation.\nThere are two flavors: built-in methods (such as "append()" on lists)\nand class instance methods. Built-in methods are described with the\ntypes that support them.\n\nIf you access a method (a function defined in a class namespace)\nthrough an instance, you get a special object: a *bound method* (also\ncalled *instance method*) object. When called, it will add the "self"\nargument to the argument list. Bound methods have two special read-\nonly attributes: "m.__self__" is the object on which the method\noperates, and "m.__func__" is the function implementing the method.\nCalling "m(arg-1, arg-2, ..., arg-n)" is completely equivalent to\ncalling "m.__func__(m.__self__, arg-1, arg-2, ..., arg-n)".\n\nLike function objects, bound method objects support getting arbitrary\nattributes. However, since method attributes are actually stored on\nthe underlying function object ("meth.__func__"), setting method\nattributes on bound methods is disallowed. Attempting to set an\nattribute on a method results in an "AttributeError" being raised. In\norder to set a method attribute, you need to explicitly set it on the\nunderlying function object:\n\n >>> class C:\n ... def method(self):\n ... pass\n ...\n >>> c = C()\n >>> c.method.whoami = \'my name is method\' # can\'t set on the method\n Traceback (most recent call last):\n File "<stdin>", line 1, in <module>\n AttributeError: \'method\' object has no attribute \'whoami\'\n >>> c.method.__func__.whoami = \'my name is method\'\n >>> c.method.whoami\n \'my name is method\'\n\nSee *The standard type hierarchy* for more information.\n',
diff --git a/Lib/queue.py b/Lib/queue.py
index 3cee36b896..572425e844 100644
--- a/Lib/queue.py
+++ b/Lib/queue.py
@@ -6,10 +6,7 @@ except ImportError:
import dummy_threading as threading
from collections import deque
from heapq import heappush, heappop
-try:
- from time import monotonic as time
-except ImportError:
- from time import time
+from time import monotonic as time
__all__ = ['Empty', 'Full', 'Queue', 'PriorityQueue', 'LifoQueue']
diff --git a/Lib/random.py b/Lib/random.py
index 464292876b..5950735e3e 100644
--- a/Lib/random.py
+++ b/Lib/random.py
@@ -231,7 +231,7 @@ class Random(_random.Random):
while r >= n:
r = getrandbits(k)
return r
- # There's an overriden random() method but no new getrandbits() method,
+ # There's an overridden random() method but no new getrandbits() method,
# so we can only use random() from here.
if n >= maxsize:
_warn("Underlying random() generator does not supply \n"
@@ -687,7 +687,7 @@ def _test_generator(n, func, args):
print(round(t1-t0, 3), 'sec,', end=' ')
avg = total/n
stddev = _sqrt(sqsum/n - avg*avg)
- print('avg %g, stddev %g, min %g, max %g' % \
+ print('avg %g, stddev %g, min %g, max %g\n' % \
(avg, stddev, smallest, largest))
diff --git a/Lib/re.py b/Lib/re.py
index 199afee4b9..dde8901c62 100644
--- a/Lib/re.py
+++ b/Lib/re.py
@@ -128,10 +128,13 @@ except ImportError:
_locale = None
# public symbols
-__all__ = [ "match", "fullmatch", "search", "sub", "subn", "split", "findall",
- "compile", "purge", "template", "escape", "A", "I", "L", "M", "S", "X",
- "U", "ASCII", "IGNORECASE", "LOCALE", "MULTILINE", "DOTALL", "VERBOSE",
- "UNICODE", "error" ]
+__all__ = [
+ "match", "fullmatch", "search", "sub", "subn", "split",
+ "findall", "finditer", "compile", "purge", "template", "escape",
+ "error", "A", "I", "L", "M", "S", "X", "U",
+ "ASCII", "IGNORECASE", "LOCALE", "MULTILINE", "DOTALL", "VERBOSE",
+ "UNICODE",
+]
__version__ = "2.2.1"
@@ -209,14 +212,12 @@ def findall(pattern, string, flags=0):
Empty matches are included in the result."""
return _compile(pattern, flags).findall(string)
-if sys.hexversion >= 0x02020000:
- __all__.append("finditer")
- def finditer(pattern, string, flags=0):
- """Return an iterator over all non-overlapping matches in the
- string. For each match, the iterator returns a match object.
+def finditer(pattern, string, flags=0):
+ """Return an iterator over all non-overlapping matches in the
+ string. For each match, the iterator returns a match object.
- Empty matches are included in the result."""
- return _compile(pattern, flags).finditer(string)
+ Empty matches are included in the result."""
+ return _compile(pattern, flags).finditer(string)
def compile(pattern, flags=0):
"Compile a regular expression pattern, returning a pattern object."
@@ -276,23 +277,21 @@ _pattern_type = type(sre_compile.compile("", 0))
_MAXCACHE = 512
def _compile(pattern, flags):
# internal: compile pattern
- bypass_cache = flags & DEBUG
- if not bypass_cache:
- try:
- p, loc = _cache[type(pattern), pattern, flags]
- if loc is None or loc == _locale.setlocale(_locale.LC_CTYPE):
- return p
- except KeyError:
- pass
+ try:
+ p, loc = _cache[type(pattern), pattern, flags]
+ if loc is None or loc == _locale.setlocale(_locale.LC_CTYPE):
+ return p
+ except KeyError:
+ pass
if isinstance(pattern, _pattern_type):
if flags:
raise ValueError(
- "Cannot process flags argument with a compiled pattern")
+ "cannot process flags argument with a compiled pattern")
return pattern
if not sre_compile.isstring(pattern):
raise TypeError("first argument must be string or compiled pattern")
p = sre_compile.compile(pattern, flags)
- if not bypass_cache:
+ if not (flags & DEBUG):
if len(_cache) >= _MAXCACHE:
_cache.clear()
if p.flags & LOCALE:
@@ -352,10 +351,11 @@ class Scanner:
s = sre_parse.Pattern()
s.flags = flags
for phrase, action in lexicon:
+ gid = s.opengroup()
p.append(sre_parse.SubPattern(s, [
- (SUBPATTERN, (len(p)+1, sre_parse.parse(phrase, flags))),
+ (SUBPATTERN, (gid, sre_parse.parse(phrase, flags))),
]))
- s.groups = len(p)+1
+ s.closegroup(gid, p[-1])
p = sre_parse.SubPattern(s, [(BRANCH, (None, p))])
self.scanner = sre_compile.compile(p)
def scan(self, string):
@@ -363,7 +363,7 @@ class Scanner:
append = result.append
match = self.scanner.scanner(string).match
i = 0
- while 1:
+ while True:
m = match()
if not m:
break
diff --git a/Lib/reprlib.py b/Lib/reprlib.py
index f8033604da..40d991fa36 100644
--- a/Lib/reprlib.py
+++ b/Lib/reprlib.py
@@ -30,6 +30,7 @@ def recursive_repr(fillvalue='...'):
wrapper.__module__ = getattr(user_function, '__module__')
wrapper.__doc__ = getattr(user_function, '__doc__')
wrapper.__name__ = getattr(user_function, '__name__')
+ wrapper.__qualname__ = getattr(user_function, '__qualname__')
wrapper.__annotations__ = getattr(user_function, '__annotations__', {})
return wrapper
@@ -83,16 +84,22 @@ class Repr:
return self._repr_iterable(x, level, '[', ']', self.maxlist)
def repr_array(self, x, level):
+ if not x:
+ return "array('%s')" % x.typecode
header = "array('%s', [" % x.typecode
return self._repr_iterable(x, level, header, '])', self.maxarray)
def repr_set(self, x, level):
+ if not x:
+ return 'set()'
x = _possibly_sorted(x)
- return self._repr_iterable(x, level, 'set([', '])', self.maxset)
+ return self._repr_iterable(x, level, '{', '}', self.maxset)
def repr_frozenset(self, x, level):
+ if not x:
+ return 'frozenset()'
x = _possibly_sorted(x)
- return self._repr_iterable(x, level, 'frozenset([', '])',
+ return self._repr_iterable(x, level, 'frozenset({', '})',
self.maxfrozenset)
def repr_deque(self, x, level):
@@ -136,7 +143,7 @@ class Repr:
# Bugs in x.__repr__() can cause arbitrary
# exceptions -- then make up something
except Exception:
- return '<%s instance at %x>' % (x.__class__.__name__, id(x))
+ return '<%s instance at %#x>' % (x.__class__.__name__, id(x))
if len(s) > self.maxother:
i = max(0, (self.maxother-3)//2)
j = max(0, self.maxother-3-i)
diff --git a/Lib/rlcompleter.py b/Lib/rlcompleter.py
index 378f5aa647..401a626179 100644
--- a/Lib/rlcompleter.py
+++ b/Lib/rlcompleter.py
@@ -75,7 +75,12 @@ class Completer:
if not text.strip():
if state == 0:
- return '\t'
+ if _readline_available:
+ readline.insert_text('\t')
+ readline.redisplay()
+ return ''
+ else:
+ return '\t'
else:
return None
@@ -168,10 +173,11 @@ def get_class_members(klass):
try:
import readline
except ImportError:
- pass
+ _readline_available = False
else:
readline.set_completer(Completer().complete)
# Release references early at shutdown (the readline module's
# contents are quasi-immortal, and the completer function holds a
# reference to globals).
atexit.register(lambda: readline.set_completer(None))
+ _readline_available = True
diff --git a/Lib/runpy.py b/Lib/runpy.py
index 0bb57d76ce..af6205db49 100644
--- a/Lib/runpy.py
+++ b/Lib/runpy.py
@@ -58,7 +58,7 @@ class _ModifiedArgv0(object):
self.value = self._sentinel
sys.argv[0] = self._saved_value
-# TODO: Replace these helpers with importlib._bootstrap._SpecMethods
+# TODO: Replace these helpers with importlib._bootstrap_external functions.
def _run_code(code, run_globals, init_globals=None,
mod_name=None, mod_spec=None,
pkg_name=None, script_name=None):
@@ -99,7 +99,22 @@ def _run_module_code(code, init_globals=None,
return mod_globals.copy()
# Helper to get the loader, code and filename for a module
-def _get_module_details(mod_name):
+def _get_module_details(mod_name, error=ImportError):
+ if mod_name.startswith("."):
+ raise error("Relative module names not supported")
+ pkg_name, _, _ = mod_name.rpartition(".")
+ if pkg_name:
+ # Try importing the parent to avoid catching initialization errors
+ try:
+ __import__(pkg_name)
+ except ImportError as e:
+ # If the parent or higher ancestor package is missing, let the
+ # error be raised by find_spec() below and then be caught. But do
+ # not allow other errors to be caught.
+ if e.name is None or (e.name != pkg_name and
+ not pkg_name.startswith(e.name + ".")):
+ raise
+
try:
spec = importlib.util.find_spec(mod_name)
except (ImportError, AttributeError, TypeError, ValueError) as ex:
@@ -107,27 +122,35 @@ def _get_module_details(mod_name):
# importlib, where the latter raises other errors for cases where
# pkgutil previously raised ImportError
msg = "Error while finding spec for {!r} ({}: {})"
- raise ImportError(msg.format(mod_name, type(ex), ex)) from ex
+ raise error(msg.format(mod_name, type(ex).__name__, ex)) from ex
if spec is None:
- raise ImportError("No module named %s" % mod_name)
+ raise error("No module named %s" % mod_name)
if spec.submodule_search_locations is not None:
if mod_name == "__main__" or mod_name.endswith(".__main__"):
- raise ImportError("Cannot use package as __main__ module")
+ raise error("Cannot use package as __main__ module")
try:
pkg_main_name = mod_name + ".__main__"
- return _get_module_details(pkg_main_name)
- except ImportError as e:
- raise ImportError(("%s; %r is a package and cannot " +
+ return _get_module_details(pkg_main_name, error)
+ except error as e:
+ if mod_name not in sys.modules:
+ raise # No module loaded; being a package is irrelevant
+ raise error(("%s; %r is a package and cannot " +
"be directly executed") %(e, mod_name))
loader = spec.loader
if loader is None:
- raise ImportError("%r is a namespace package and cannot be executed"
+ raise error("%r is a namespace package and cannot be executed"
% mod_name)
- code = loader.get_code(mod_name)
+ try:
+ code = loader.get_code(mod_name)
+ except ImportError as e:
+ raise error(format(e)) from e
if code is None:
- raise ImportError("No code object available for %s" % mod_name)
+ raise error("No code object available for %s" % mod_name)
return mod_name, spec, code
+class _Error(Exception):
+ """Error that _run_module_as_main() should report without a traceback"""
+
# XXX ncoghlan: Should this be documented and made public?
# (Current thoughts: don't repeat the mistake that lead to its
# creation when run_module() no longer met the needs of
@@ -148,20 +171,11 @@ def _run_module_as_main(mod_name, alter_argv=True):
"""
try:
if alter_argv or mod_name != "__main__": # i.e. -m switch
- mod_name, mod_spec, code = _get_module_details(mod_name)
+ mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
else: # i.e. directory or zipfile execution
- mod_name, mod_spec, code = _get_main_module_details()
- except ImportError as exc:
- # Try to provide a good error message
- # for directories, zip files and the -m switch
- if alter_argv:
- # For -m switch, just display the exception
- info = str(exc)
- else:
- # For directories/zipfiles, let the user
- # know what the code was looking for
- info = "can't find '__main__' module in %r" % sys.argv[0]
- msg = "%s: %s" % (sys.executable, info)
+ mod_name, mod_spec, code = _get_main_module_details(_Error)
+ except _Error as exc:
+ msg = "%s: %s" % (sys.executable, exc)
sys.exit(msg)
main_globals = sys.modules["__main__"].__dict__
if alter_argv:
@@ -184,7 +198,7 @@ def run_module(mod_name, init_globals=None,
# Leave the sys module alone
return _run_code(code, {}, init_globals, run_name, mod_spec)
-def _get_main_module_details():
+def _get_main_module_details(error=ImportError):
# Helper that gives a nicer error message when attempting to
# execute a zipfile or directory by invoking __main__.py
# Also moves the standard __main__ out of the way so that the
@@ -196,7 +210,7 @@ def _get_main_module_details():
return _get_module_details(main_name)
except ImportError as exc:
if main_name in str(exc):
- raise ImportError("can't find %r module in %r" %
+ raise error("can't find %r module in %r" %
(main_name, sys.path[0])) from exc
raise
finally:
diff --git a/Lib/sched.py b/Lib/sched.py
index 2e6b00a2a2..b47648d973 100644
--- a/Lib/sched.py
+++ b/Lib/sched.py
@@ -35,16 +35,12 @@ try:
import threading
except ImportError:
import dummy_threading as threading
-try:
- from time import monotonic as _time
-except ImportError:
- from time import time as _time
+from time import monotonic as _time
__all__ = ["scheduler"]
class Event(namedtuple('Event', 'time, priority, action, argument, kwargs')):
def __eq__(s, o): return (s.time, s.priority) == (o.time, o.priority)
- def __ne__(s, o): return (s.time, s.priority) != (o.time, o.priority)
def __lt__(s, o): return (s.time, s.priority) < (o.time, o.priority)
def __le__(s, o): return (s.time, s.priority) <= (o.time, o.priority)
def __gt__(s, o): return (s.time, s.priority) > (o.time, o.priority)
diff --git a/Lib/selectors.py b/Lib/selectors.py
index 7b6da29863..d8769e3541 100644
--- a/Lib/selectors.py
+++ b/Lib/selectors.py
@@ -43,9 +43,18 @@ def _fileobj_to_fd(fileobj):
SelectorKey = namedtuple('SelectorKey', ['fileobj', 'fd', 'events', 'data'])
-"""Object used to associate a file object to its backing file descriptor,
-selected event mask and attached data."""
+SelectorKey.__doc__ = """SelectorKey(fileobj, fd, events, data)
+
+ Object used to associate a file object to its backing
+ file descriptor, selected event mask, and attached data.
+"""
+if sys.version_info >= (3, 5):
+ SelectorKey.fileobj.__doc__ = 'File object registered.'
+ SelectorKey.fd.__doc__ = 'Underlying file descriptor.'
+ SelectorKey.events.__doc__ = 'Events that must be waited for on this file object.'
+ SelectorKey.data.__doc__ = ('''Optional opaque data associated to this file object.
+ For example, this could be used to store a per-client session ID.''')
class _SelectorMapping(Mapping):
"""Mapping of file objects to selector keys."""
@@ -174,9 +183,9 @@ class BaseSelector(metaclass=ABCMeta):
SelectorKey for this file object
"""
mapping = self.get_map()
+ if mapping is None:
+ raise RuntimeError('Selector is closed')
try:
- if mapping is None:
- raise KeyError
return mapping[fileobj]
except KeyError:
raise KeyError("{!r} is not registered".format(fileobj)) from None
@@ -445,10 +454,66 @@ if hasattr(select, 'epoll'):
return ready
def close(self):
+ self._epoll.close()
+ super().close()
+
+
+if hasattr(select, 'devpoll'):
+
+ class DevpollSelector(_BaseSelectorImpl):
+ """Solaris /dev/poll selector."""
+
+ def __init__(self):
+ super().__init__()
+ self._devpoll = select.devpoll()
+
+ def fileno(self):
+ return self._devpoll.fileno()
+
+ def register(self, fileobj, events, data=None):
+ key = super().register(fileobj, events, data)
+ poll_events = 0
+ if events & EVENT_READ:
+ poll_events |= select.POLLIN
+ if events & EVENT_WRITE:
+ poll_events |= select.POLLOUT
+ self._devpoll.register(key.fd, poll_events)
+ return key
+
+ def unregister(self, fileobj):
+ key = super().unregister(fileobj)
+ self._devpoll.unregister(key.fd)
+ return key
+
+ def select(self, timeout=None):
+ if timeout is None:
+ timeout = None
+ elif timeout <= 0:
+ timeout = 0
+ else:
+ # devpoll() has a resolution of 1 millisecond, round away from
+ # zero to wait *at least* timeout seconds.
+ timeout = math.ceil(timeout * 1e3)
+ ready = []
try:
- self._epoll.close()
- finally:
- super().close()
+ fd_event_list = self._devpoll.poll(timeout)
+ except InterruptedError:
+ return ready
+ for fd, event in fd_event_list:
+ events = 0
+ if event & ~select.POLLIN:
+ events |= EVENT_WRITE
+ if event & ~select.POLLOUT:
+ events |= EVENT_READ
+
+ key = self._key_from_fd(fd)
+ if key:
+ ready.append((key, events & key.events))
+ return ready
+
+ def close(self):
+ self._devpoll.close()
+ super().close()
if hasattr(select, 'kqueue'):
@@ -519,18 +584,19 @@ if hasattr(select, 'kqueue'):
return ready
def close(self):
- try:
- self._kqueue.close()
- finally:
- super().close()
+ self._kqueue.close()
+ super().close()
-# Choose the best implementation: roughly, epoll|kqueue > poll > select.
+# Choose the best implementation, roughly:
+# epoll|kqueue|devpoll > poll > select.
# select() also can't accept a FD > FD_SETSIZE (usually around 1024)
if 'KqueueSelector' in globals():
DefaultSelector = KqueueSelector
elif 'EpollSelector' in globals():
DefaultSelector = EpollSelector
+elif 'DevpollSelector' in globals():
+ DefaultSelector = DevpollSelector
elif 'PollSelector' in globals():
DefaultSelector = PollSelector
else:
diff --git a/Lib/shlex.py b/Lib/shlex.py
index 4672553f1c..f08391800b 100644
--- a/Lib/shlex.py
+++ b/Lib/shlex.py
@@ -49,9 +49,6 @@ class shlex:
self.token = ''
self.filestack = deque()
self.source = None
- if self.debug:
- print('shlex: reading from %s, line %d' \
- % (self.instream, self.lineno))
def push_token(self, tok):
"Push a token onto the stack popped by the get_token method"
diff --git a/Lib/shutil.py b/Lib/shutil.py
index d767a0c945..37124a0c98 100644
--- a/Lib/shutil.py
+++ b/Lib/shutil.py
@@ -7,7 +7,6 @@ XXX The functions here don't copy the resource fork or other metadata on Mac.
import os
import sys
import stat
-from os.path import abspath
import fnmatch
import collections
import errno
@@ -21,6 +20,13 @@ except ImportError:
_BZ2_SUPPORTED = False
try:
+ import lzma
+ del lzma
+ _LZMA_SUPPORTED = True
+except ImportError:
+ _LZMA_SUPPORTED = False
+
+try:
from pwd import getpwnam
except ImportError:
getpwnam = None
@@ -491,7 +497,7 @@ def _basename(path):
sep = os.path.sep + (os.path.altsep or '')
return os.path.basename(path.rstrip(sep))
-def move(src, dst):
+def move(src, dst, copy_function=copy2):
"""Recursively move a file or directory to another location. This is
similar to the Unix "mv" command. Return the file or directory's
destination.
@@ -508,6 +514,11 @@ def move(src, dst):
recreated under the new name if os.rename() fails because of cross
filesystem renames.
+ The optional `copy_function` argument is a callable that will be used
+ to copy the source or it will be delegated to `copytree`.
+ By default, copy2() is used, but any function that supports the same
+ signature (like copy()) can be used.
+
A lot more could be done here... A look at a mv.c shows a lot of
the issues this implementation glosses over.
@@ -532,17 +543,19 @@ def move(src, dst):
os.unlink(src)
elif os.path.isdir(src):
if _destinsrc(src, dst):
- raise Error("Cannot move a directory '%s' into itself '%s'." % (src, dst))
- copytree(src, real_dst, symlinks=True)
+ raise Error("Cannot move a directory '%s' into itself"
+ " '%s'." % (src, dst))
+ copytree(src, real_dst, copy_function=copy_function,
+ symlinks=True)
rmtree(src)
else:
- copy2(src, real_dst)
+ copy_function(src, real_dst)
os.unlink(src)
return real_dst
def _destinsrc(src, dst):
- src = abspath(src)
- dst = abspath(dst)
+ src = os.path.abspath(src)
+ dst = os.path.abspath(dst)
if not src.endswith(os.path.sep):
src += os.path.sep
if not dst.endswith(os.path.sep):
@@ -578,14 +591,14 @@ def _make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0,
"""Create a (possibly compressed) tar file from all the files under
'base_dir'.
- 'compress' must be "gzip" (the default), "bzip2", or None.
+ 'compress' must be "gzip" (the default), "bzip2", "xz", or None.
'owner' and 'group' can be used to define an owner and a group for the
archive that is being built. If not provided, the current owner and group
will be used.
The output tar file will be named 'base_name' + ".tar", possibly plus
- the appropriate compression extension (".gz", or ".bz2").
+ the appropriate compression extension (".gz", ".bz2", or ".xz").
Returns the output filename.
"""
@@ -596,6 +609,10 @@ def _make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0,
tar_compression['bzip2'] = 'bz2'
compress_ext['bzip2'] = '.bz2'
+ if _LZMA_SUPPORTED:
+ tar_compression['xz'] = 'xz'
+ compress_ext['xz'] = '.xz'
+
# flags for compression program, each element of list will be an argument
if compress is not None and compress not in compress_ext:
raise ValueError("bad value for 'compress', or compression format not "
@@ -635,23 +652,6 @@ def _make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0,
return archive_name
-def _call_external_zip(base_dir, zip_filename, verbose=False, dry_run=False):
- # XXX see if we want to keep an external call here
- if verbose:
- zipoptions = "-r"
- else:
- zipoptions = "-rq"
- from distutils.errors import DistutilsExecError
- from distutils.spawn import spawn
- try:
- spawn(["zip", zipoptions, zip_filename, base_dir], dry_run=dry_run)
- except DistutilsExecError:
- # XXX really should distinguish between "couldn't find
- # external 'zip' command" and "zip failed".
- raise ExecError("unable to create zip file '%s': "
- "could neither import the 'zipfile' module nor "
- "find a standalone zip utility") % zip_filename
-
def _make_zipfile(base_name, base_dir, verbose=0, dry_run=0, logger=None):
"""Create a zip file from all the files under 'base_dir'.
@@ -661,6 +661,8 @@ def _make_zipfile(base_name, base_dir, verbose=0, dry_run=0, logger=None):
available, raises ExecError. Returns the name of the output zip
file.
"""
+ import zipfile
+
zip_filename = base_name + ".zip"
archive_dir = os.path.dirname(base_name)
@@ -670,39 +672,29 @@ def _make_zipfile(base_name, base_dir, verbose=0, dry_run=0, logger=None):
if not dry_run:
os.makedirs(archive_dir)
- # If zipfile module is not available, try spawning an external 'zip'
- # command.
- try:
- import zipfile
- except ImportError:
- zipfile = None
-
- if zipfile is None:
- _call_external_zip(base_dir, zip_filename, verbose, dry_run)
- else:
- if logger is not None:
- logger.info("creating '%s' and adding '%s' to it",
- zip_filename, base_dir)
+ if logger is not None:
+ logger.info("creating '%s' and adding '%s' to it",
+ zip_filename, base_dir)
- if not dry_run:
- with zipfile.ZipFile(zip_filename, "w",
- compression=zipfile.ZIP_DEFLATED) as zf:
- path = os.path.normpath(base_dir)
- zf.write(path, path)
- if logger is not None:
- logger.info("adding '%s'", path)
- for dirpath, dirnames, filenames in os.walk(base_dir):
- for name in sorted(dirnames):
- path = os.path.normpath(os.path.join(dirpath, name))
+ if not dry_run:
+ with zipfile.ZipFile(zip_filename, "w",
+ compression=zipfile.ZIP_DEFLATED) as zf:
+ path = os.path.normpath(base_dir)
+ zf.write(path, path)
+ if logger is not None:
+ logger.info("adding '%s'", path)
+ for dirpath, dirnames, filenames in os.walk(base_dir):
+ for name in sorted(dirnames):
+ path = os.path.normpath(os.path.join(dirpath, name))
+ zf.write(path, path)
+ if logger is not None:
+ logger.info("adding '%s'", path)
+ for name in filenames:
+ path = os.path.normpath(os.path.join(dirpath, name))
+ if os.path.isfile(path):
zf.write(path, path)
if logger is not None:
logger.info("adding '%s'", path)
- for name in filenames:
- path = os.path.normpath(os.path.join(dirpath, name))
- if os.path.isfile(path):
- zf.write(path, path)
- if logger is not None:
- logger.info("adding '%s'", path)
return zip_filename
@@ -716,6 +708,10 @@ if _BZ2_SUPPORTED:
_ARCHIVE_FORMATS['bztar'] = (_make_tarball, [('compress', 'bzip2')],
"bzip2'ed tar-file")
+if _LZMA_SUPPORTED:
+ _ARCHIVE_FORMATS['xztar'] = (_make_tarball, [('compress', 'xz')],
+ "xz'ed tar-file")
+
def get_archive_formats():
"""Returns a list of supported formats for archiving and unarchiving.
@@ -904,7 +900,7 @@ def _unpack_zipfile(filename, extract_dir):
zip.close()
def _unpack_tarfile(filename, extract_dir):
- """Unpack tar/tar.gz/tar.bz2 `filename` to `extract_dir`
+ """Unpack tar/tar.gz/tar.bz2/tar.xz `filename` to `extract_dir`
"""
try:
tarobj = tarfile.open(filename)
@@ -923,9 +919,13 @@ _UNPACK_FORMATS = {
}
if _BZ2_SUPPORTED:
- _UNPACK_FORMATS['bztar'] = (['.bz2'], _unpack_tarfile, [],
+ _UNPACK_FORMATS['bztar'] = (['.tar.bz2', '.tbz2'], _unpack_tarfile, [],
"bzip2'ed tar-file")
+if _LZMA_SUPPORTED:
+ _UNPACK_FORMATS['xztar'] = (['.tar.xz', '.txz'], _unpack_tarfile, [],
+ "xz'ed tar-file")
+
def _find_unpack_format(filename):
for name, info in _UNPACK_FORMATS.items():
for extension in info[0]:
@@ -1069,7 +1069,9 @@ def get_terminal_size(fallback=(80, 24)):
if columns <= 0 or lines <= 0:
try:
size = os.get_terminal_size(sys.__stdout__.fileno())
- except (NameError, OSError):
+ except (AttributeError, ValueError, OSError):
+ # stdout is None, closed, detached, or not a terminal, or
+ # os.get_terminal_size() is unsupported
size = os.terminal_size(fallback)
if columns <= 0:
columns = size.columns
diff --git a/Lib/signal.py b/Lib/signal.py
new file mode 100644
index 0000000000..9f05c9198d
--- /dev/null
+++ b/Lib/signal.py
@@ -0,0 +1,79 @@
+import _signal
+from _signal import *
+from functools import wraps as _wraps
+from enum import IntEnum as _IntEnum
+
+_globals = globals()
+
+_IntEnum._convert(
+ 'Signals', __name__,
+ lambda name:
+ name.isupper()
+ and (name.startswith('SIG') and not name.startswith('SIG_'))
+ or name.startswith('CTRL_'))
+
+_IntEnum._convert(
+ 'Handlers', __name__,
+ lambda name: name in ('SIG_DFL', 'SIG_IGN'))
+
+if 'pthread_sigmask' in _globals:
+ _IntEnum._convert(
+ 'Sigmasks', __name__,
+ lambda name: name in ('SIG_BLOCK', 'SIG_UNBLOCK', 'SIG_SETMASK'))
+
+
+def _int_to_enum(value, enum_klass):
+ """Convert a numeric value to an IntEnum member.
+ If it's not a known member, return the numeric value itself.
+ """
+ try:
+ return enum_klass(value)
+ except ValueError:
+ return value
+
+
+def _enum_to_int(value):
+ """Convert an IntEnum member to a numeric value.
+ If it's not an IntEnum member return the value itself.
+ """
+ try:
+ return int(value)
+ except (ValueError, TypeError):
+ return value
+
+
+@_wraps(_signal.signal)
+def signal(signalnum, handler):
+ handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
+ return _int_to_enum(handler, Handlers)
+
+
+@_wraps(_signal.getsignal)
+def getsignal(signalnum):
+ handler = _signal.getsignal(signalnum)
+ return _int_to_enum(handler, Handlers)
+
+
+if 'pthread_sigmask' in _globals:
+ @_wraps(_signal.pthread_sigmask)
+ def pthread_sigmask(how, mask):
+ sigs_set = _signal.pthread_sigmask(how, mask)
+ return set(_int_to_enum(x, Signals) for x in sigs_set)
+ pthread_sigmask.__doc__ = _signal.pthread_sigmask.__doc__
+
+
+if 'sigpending' in _globals:
+ @_wraps(_signal.sigpending)
+ def sigpending():
+ sigs = _signal.sigpending()
+ return set(_int_to_enum(x, Signals) for x in sigs)
+
+
+if 'sigwait' in _globals:
+ @_wraps(_signal.sigwait)
+ def sigwait(sigset):
+ retsig = _signal.sigwait(sigset)
+ return _int_to_enum(retsig, Signals)
+ sigwait.__doc__ = _signal.sigwait
+
+del _globals, _wraps
diff --git a/Lib/site.py b/Lib/site.py
index 3c8584b12a..3f78ef5b88 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -7,7 +7,7 @@
This will append site-specific paths to the module search path. On
Unix (including Mac OSX), it starts with sys.prefix and
sys.exec_prefix (if different) and appends
-lib/python<version>/site-packages as well as lib/site-python.
+lib/python<version>/site-packages.
On other platforms (such as Windows), it tries each of the
prefixes directly, as well as with lib/site-packages appended. The
resulting directories, if they exist, are appended to sys.path, and
@@ -15,7 +15,7 @@ also inspected for path configuration files.
If a file named "pyvenv.cfg" exists one directory above sys.executable,
sys.prefix and sys.exec_prefix are set to that directory and
-it is also checked for site-packages and site-python (sys.base_prefix and
+it is also checked for site-packages (sys.base_prefix and
sys.base_exec_prefix will always be the "real" prefixes of the Python
installation). If "pyvenv.cfg" (a bootstrap configuration file) contains
the key "include-system-site-packages" set to anything other than "false"
@@ -59,7 +59,7 @@ because bar.pth comes alphabetically before foo.pth; and spam is
omitted because it is not mentioned in either path configuration file.
The readline module is also automatically configured to enable
-completion for systems that support it. This can be overriden in
+completion for systems that support it. This can be overridden in
sitecustomize, usercustomize or PYTHONSTARTUP.
After these operations, an attempt is made to import a module
@@ -98,8 +98,8 @@ def makepath(*paths):
def abs_paths():
"""Set all module __file__ and __cached__ attributes to an absolute path"""
for m in set(sys.modules.values()):
- if (getattr(getattr(m, '__loader__', None), '__module__', None) !=
- '_frozen_importlib'):
+ if (getattr(getattr(m, '__loader__', None), '__module__', None) not in
+ ('_frozen_importlib', '_frozen_importlib_external')):
continue # don't mess with a PEP 302-supplied __file__
try:
m.__file__ = os.path.abspath(m.__file__)
@@ -285,8 +285,7 @@ def addusersitepackages(known_paths):
return known_paths
def getsitepackages(prefixes=None):
- """Returns a list containing all global site-packages directories
- (and possibly site-python).
+ """Returns a list containing all global site-packages directories.
For each directory present in ``prefixes`` (or the global ``PREFIXES``),
this function will find its `site-packages` subdirectory depending on the
@@ -307,7 +306,6 @@ def getsitepackages(prefixes=None):
sitepackages.append(os.path.join(prefix, "lib",
"python" + sys.version[:3],
"site-packages"))
- sitepackages.append(os.path.join(prefix, "lib", "site-python"))
else:
sitepackages.append(prefix)
sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
@@ -323,14 +321,9 @@ def getsitepackages(prefixes=None):
return sitepackages
def addsitepackages(known_paths, prefixes=None):
- """Add site-packages (and possibly site-python) to sys.path"""
+ """Add site-packages to sys.path"""
for sitedir in getsitepackages(prefixes):
if os.path.isdir(sitedir):
- if "site-python" in sitedir:
- import warnings
- warnings.warn('"site-python" directories will not be '
- 'supported in 3.5 anymore',
- DeprecationWarning)
addsitedir(sitedir, known_paths)
return known_paths
@@ -386,7 +379,7 @@ def enablerlcompleter():
If the readline module can be imported, the hook will set the Tab key
as completion key and register ~/.python_history as history file.
- This can be overriden in the sitecustomize or usercustomize module,
+ This can be overridden in the sitecustomize or usercustomize module,
or in a PYTHONSTARTUP file.
"""
def register_readline():
@@ -485,6 +478,12 @@ def venv(known_paths):
system_site = value.lower()
elif key == 'home':
sys._home = value
+ elif key == 'applocal' and value.lower() == 'true':
+ # App-local installs use the exe_dir as prefix,
+ # not one level higher, and do not use system
+ # site packages.
+ site_prefix = exe_dir
+ system_site = 'false'
sys.prefix = sys.exec_prefix = site_prefix
diff --git a/Lib/smtpd.py b/Lib/smtpd.py
index db7c8675e8..732066ef9a 100755
--- a/Lib/smtpd.py
+++ b/Lib/smtpd.py
@@ -1,5 +1,5 @@
#! /usr/bin/env python3
-"""An RFC 5321 smtp proxy.
+"""An RFC 5321 smtp proxy with optional RFC 1870 and RFC 6531 extensions.
Usage: %(program)s [options] [localhost:localport [remotehost:remoteport]]
@@ -25,6 +25,10 @@ Options:
Restrict the total size of the incoming message to "limit" number of
bytes via the RFC 1870 SIZE extension. Defaults to 33554432 bytes.
+ --smtputf8
+ -u
+ Enable the SMTPUTF8 extension and behave as an RFC 6531 smtp proxy.
+
--debug
-d
Turn on debugging prints.
@@ -98,7 +102,6 @@ class Devnull:
DEBUGSTREAM = Devnull()
NEWLINE = '\n'
-EMPTYSTRING = ''
COMMASPACE = ', '
DATA_SIZE_DEFAULT = 33554432
@@ -116,26 +119,48 @@ class SMTPChannel(asynchat.async_chat):
command_size_limit = 512
command_size_limits = collections.defaultdict(lambda x=command_size_limit: x)
- command_size_limits.update({
- 'MAIL': command_size_limit + 26,
- })
- max_command_size_limit = max(command_size_limits.values())
+
+ @property
+ def max_command_size_limit(self):
+ try:
+ return max(self.command_size_limits.values())
+ except ValueError:
+ return self.command_size_limit
def __init__(self, server, conn, addr, data_size_limit=DATA_SIZE_DEFAULT,
- map=None):
+ map=None, enable_SMTPUTF8=False, decode_data=None):
asynchat.async_chat.__init__(self, conn, map=map)
self.smtp_server = server
self.conn = conn
self.addr = addr
self.data_size_limit = data_size_limit
- self.received_lines = []
- self.smtp_state = self.COMMAND
+ self.enable_SMTPUTF8 = enable_SMTPUTF8
+ if enable_SMTPUTF8:
+ if decode_data:
+ raise ValueError("decode_data and enable_SMTPUTF8 cannot"
+ " be set to True at the same time")
+ decode_data = False
+ if decode_data is None:
+ warn("The decode_data default of True will change to False in 3.6;"
+ " specify an explicit value for this keyword",
+ DeprecationWarning, 2)
+ decode_data = True
+ self._decode_data = decode_data
+ if decode_data:
+ self._emptystring = ''
+ self._linesep = '\r\n'
+ self._dotsep = '.'
+ self._newline = NEWLINE
+ else:
+ self._emptystring = b''
+ self._linesep = b'\r\n'
+ self._dotsep = ord(b'.')
+ self._newline = b'\n'
+ self._set_rset_state()
self.seen_greeting = ''
- self.mailfrom = None
- self.rcpttos = []
- self.received_data = ''
+ self.extended_smtp = False
+ self.command_size_limits.clear()
self.fqdn = socket.getfqdn()
- self.num_bytes = 0
try:
self.peer = conn.getpeername()
except OSError as err:
@@ -147,8 +172,22 @@ class SMTPChannel(asynchat.async_chat):
return
print('Peer:', repr(self.peer), file=DEBUGSTREAM)
self.push('220 %s %s' % (self.fqdn, __version__))
+
+ def _set_post_data_state(self):
+ """Reset state variables to their post-DATA state."""
+ self.smtp_state = self.COMMAND
+ self.mailfrom = None
+ self.rcpttos = []
+ self.require_SMTPUTF8 = False
+ self.num_bytes = 0
self.set_terminator(b'\r\n')
- self.extended_smtp = False
+
+ def _set_rset_state(self):
+ """Reset all state variables except the greeting."""
+ self._set_post_data_state()
+ self.received_data = ''
+ self.received_lines = []
+
# properties for backwards-compatibility
@property
@@ -272,9 +311,10 @@ class SMTPChannel(asynchat.async_chat):
"set 'addr' instead", DeprecationWarning, 2)
self.addr = value
- # Overrides base class for convenience
+ # Overrides base class for convenience.
def push(self, msg):
- asynchat.async_chat.push(self, bytes(msg + '\r\n', 'ascii'))
+ asynchat.async_chat.push(self, bytes(
+ msg + '\r\n', 'utf-8' if self.require_SMTPUTF8 else 'ascii'))
# Implementation of base class abstract method
def collect_incoming_data(self, data):
@@ -287,11 +327,14 @@ class SMTPChannel(asynchat.async_chat):
return
elif limit:
self.num_bytes += len(data)
- self.received_lines.append(str(data, "utf-8"))
+ if self._decode_data:
+ self.received_lines.append(str(data, 'utf-8'))
+ else:
+ self.received_lines.append(data)
# Implementation of base class abstract method
def found_terminator(self):
- line = EMPTYSTRING.join(self.received_lines)
+ line = self._emptystring.join(self.received_lines)
print('Data:', repr(line), file=DEBUGSTREAM)
self.received_lines = []
if self.smtp_state == self.COMMAND:
@@ -299,7 +342,8 @@ class SMTPChannel(asynchat.async_chat):
if not line:
self.push('500 Error: bad syntax')
return
- method = None
+ if not self._decode_data:
+ line = str(line, 'utf-8')
i = line.find(' ')
if i < 0:
command = line.upper()
@@ -330,21 +374,21 @@ class SMTPChannel(asynchat.async_chat):
# Remove extraneous carriage returns and de-transparency according
# to RFC 5321, Section 4.5.2.
data = []
- for text in line.split('\r\n'):
- if text and text[0] == '.':
+ for text in line.split(self._linesep):
+ if text and text[0] == self._dotsep:
data.append(text[1:])
else:
data.append(text)
- self.received_data = NEWLINE.join(data)
- status = self.smtp_server.process_message(self.peer,
- self.mailfrom,
- self.rcpttos,
- self.received_data)
- self.rcpttos = []
- self.mailfrom = None
- self.smtp_state = self.COMMAND
- self.num_bytes = 0
- self.set_terminator(b'\r\n')
+ self.received_data = self._newline.join(data)
+ args = (self.peer, self.mailfrom, self.rcpttos, self.received_data)
+ kwargs = {}
+ if not self._decode_data:
+ kwargs = {
+ 'mail_options': self.mail_options,
+ 'rcpt_options': self.rcpt_options,
+ }
+ status = self.smtp_server.process_message(*args, **kwargs)
+ self._set_post_data_state()
if not status:
self.push('250 OK')
else:
@@ -355,26 +399,35 @@ class SMTPChannel(asynchat.async_chat):
if not arg:
self.push('501 Syntax: HELO hostname')
return
+ # See issue #21783 for a discussion of this behavior.
if self.seen_greeting:
self.push('503 Duplicate HELO/EHLO')
- else:
- self.seen_greeting = arg
- self.extended_smtp = False
- self.push('250 %s' % self.fqdn)
+ return
+ self._set_rset_state()
+ self.seen_greeting = arg
+ self.push('250 %s' % self.fqdn)
def smtp_EHLO(self, arg):
if not arg:
self.push('501 Syntax: EHLO hostname')
return
+ # See issue #21783 for a discussion of this behavior.
if self.seen_greeting:
self.push('503 Duplicate HELO/EHLO')
- else:
- self.seen_greeting = arg
- self.extended_smtp = True
- self.push('250-%s' % self.fqdn)
- if self.data_size_limit:
- self.push('250-SIZE %s' % self.data_size_limit)
- self.push('250 HELP')
+ return
+ self._set_rset_state()
+ self.seen_greeting = arg
+ self.extended_smtp = True
+ self.push('250-%s' % self.fqdn)
+ if self.data_size_limit:
+ self.push('250-SIZE %s' % self.data_size_limit)
+ self.command_size_limits['MAIL'] += 26
+ if not self._decode_data:
+ self.push('250-8BITMIME')
+ if self.enable_SMTPUTF8:
+ self.push('250-SMTPUTF8')
+ self.command_size_limits['MAIL'] += 10
+ self.push('250 HELP')
def smtp_NOOP(self, arg):
if arg:
@@ -405,11 +458,15 @@ class SMTPChannel(asynchat.async_chat):
return address.addr_spec, rest
def _getparams(self, params):
- # Return any parameters that appear to be syntactically valid according
- # to RFC 1869, ignore all others. (Postel rule: accept what we can.)
- params = [param.split('=', 1) for param in params.split()
- if '=' in param]
- return {k: v for k, v in params if k.isalnum()}
+ # Return params as dictionary. Return None if not all parameters
+ # appear to be syntactically valid according to RFC 1869.
+ result = {}
+ for param in params:
+ param, eq, value = param.partition('=')
+ if not param.isalnum() or eq and not value:
+ return None
+ result[param] = value if eq else True
+ return result
def smtp_HELP(self, arg):
if arg:
@@ -459,7 +516,7 @@ class SMTPChannel(asynchat.async_chat):
def smtp_MAIL(self, arg):
if not self.seen_greeting:
- self.push('503 Error: send HELO first');
+ self.push('503 Error: send HELO first')
return
print('===> MAIL', arg, file=DEBUGSTREAM)
syntaxerr = '501 Syntax: MAIL FROM: <address>'
@@ -479,10 +536,23 @@ class SMTPChannel(asynchat.async_chat):
if self.mailfrom:
self.push('503 Error: nested MAIL command')
return
- params = self._getparams(params.upper())
+ self.mail_options = params.upper().split()
+ params = self._getparams(self.mail_options)
if params is None:
self.push(syntaxerr)
return
+ if not self._decode_data:
+ body = params.pop('BODY', '7BIT')
+ if body not in ['7BIT', '8BITMIME']:
+ self.push('501 Error: BODY can only be one of 7BIT, 8BITMIME')
+ return
+ if self.enable_SMTPUTF8:
+ smtputf8 = params.pop('SMTPUTF8', False)
+ if smtputf8 is True:
+ self.require_SMTPUTF8 = True
+ elif smtputf8 is not False:
+ self.push('501 Error: SMTPUTF8 takes no arguments')
+ return
size = params.pop('SIZE', None)
if size:
if not size.isdigit():
@@ -517,16 +587,16 @@ class SMTPChannel(asynchat.async_chat):
if not address:
self.push(syntaxerr)
return
- if params:
- if self.extended_smtp:
- params = self._getparams(params.upper())
- if params is None:
- self.push(syntaxerr)
- return
- else:
- self.push(syntaxerr)
- return
- if params and len(params.keys()) > 0:
+ if not self.extended_smtp and params:
+ self.push(syntaxerr)
+ return
+ self.rcpt_options = params.upper().split()
+ params = self._getparams(self.rcpt_options)
+ if params is None:
+ self.push(syntaxerr)
+ return
+ # XXX currently there are no options we recognize.
+ if len(params.keys()) > 0:
self.push('555 RCPT TO parameters not recognized or not implemented')
return
self.rcpttos.append(address)
@@ -537,11 +607,7 @@ class SMTPChannel(asynchat.async_chat):
if arg:
self.push('501 Syntax: RSET')
return
- # Resets the sender, recipients, and data, but not the greeting
- self.mailfrom = None
- self.rcpttos = []
- self.received_data = ''
- self.smtp_state = self.COMMAND
+ self._set_rset_state()
self.push('250 OK')
def smtp_DATA(self, arg):
@@ -568,13 +634,29 @@ class SMTPServer(asyncore.dispatcher):
channel_class = SMTPChannel
def __init__(self, localaddr, remoteaddr,
- data_size_limit=DATA_SIZE_DEFAULT, map=None):
+ data_size_limit=DATA_SIZE_DEFAULT, map=None,
+ enable_SMTPUTF8=False, decode_data=None):
self._localaddr = localaddr
self._remoteaddr = remoteaddr
self.data_size_limit = data_size_limit
+ self.enable_SMTPUTF8 = enable_SMTPUTF8
+ if enable_SMTPUTF8:
+ if decode_data:
+ raise ValueError("The decode_data and enable_SMTPUTF8"
+ " parameters cannot be set to True at the"
+ " same time.")
+ decode_data = False
+ if decode_data is None:
+ warn("The decode_data default of True will change to False in 3.6;"
+ " specify an explicit value for this keyword",
+ DeprecationWarning, 2)
+ decode_data = True
+ self._decode_data = decode_data
asyncore.dispatcher.__init__(self, map=map)
try:
- self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
+ gai_results = socket.getaddrinfo(*localaddr,
+ type=socket.SOCK_STREAM)
+ self.create_socket(gai_results[0][0], gai_results[0][1])
# try to re-use a server port if possible
self.set_reuse_addr()
self.bind(localaddr)
@@ -589,11 +671,16 @@ class SMTPServer(asyncore.dispatcher):
def handle_accepted(self, conn, addr):
print('Incoming connection from %s' % repr(addr), file=DEBUGSTREAM)
- channel = self.channel_class(self, conn, addr, self.data_size_limit,
- self._map)
+ channel = self.channel_class(self,
+ conn,
+ addr,
+ self.data_size_limit,
+ self._map,
+ self.enable_SMTPUTF8,
+ self._decode_data)
# API for "doing something useful with the message"
- def process_message(self, peer, mailfrom, rcpttos, data):
+ def process_message(self, peer, mailfrom, rcpttos, data, **kwargs):
"""Override this abstract method to handle messages from the client.
peer is a tuple containing (ipaddr, port) of the client that made the
@@ -611,29 +698,58 @@ class SMTPServer(asyncore.dispatcher):
containing a `.' followed by other text has had the leading dot
removed.
- This function should return None, for a normal `250 Ok' response;
- otherwise it returns the desired response string in RFC 821 format.
+ kwargs is a dictionary containing additional information. It is empty
+ unless decode_data=False or enable_SMTPUTF8=True was given as init
+ parameter, in which case ut will contain the following keys:
+ 'mail_options': list of parameters to the mail command. All
+ elements are uppercase strings. Example:
+ ['BODY=8BITMIME', 'SMTPUTF8'].
+ 'rcpt_options': same, for the rcpt command.
+
+ This function should return None for a normal `250 Ok' response;
+ otherwise, it should return the desired response string in RFC 821
+ format.
"""
raise NotImplementedError
class DebuggingServer(SMTPServer):
- # Do something with the gathered message
- def process_message(self, peer, mailfrom, rcpttos, data):
+
+ def _print_message_content(self, peer, data):
inheaders = 1
- lines = data.split('\n')
- print('---------- MESSAGE FOLLOWS ----------')
+ lines = data.splitlines()
for line in lines:
# headers first
if inheaders and not line:
- print('X-Peer:', peer[0])
+ peerheader = 'X-Peer: ' + peer[0]
+ if not isinstance(data, str):
+ # decoded_data=false; make header match other binary output
+ peerheader = repr(peerheader.encode('utf-8'))
+ print(peerheader)
inheaders = 0
+ if not isinstance(data, str):
+ # Avoid spurious 'str on bytes instance' warning.
+ line = repr(line)
print(line)
+
+ def process_message(self, peer, mailfrom, rcpttos, data, **kwargs):
+ print('---------- MESSAGE FOLLOWS ----------')
+ if kwargs:
+ if kwargs.get('mail_options'):
+ print('mail options: %s' % kwargs['mail_options'])
+ if kwargs.get('rcpt_options'):
+ print('rcpt options: %s\n' % kwargs['rcpt_options'])
+ self._print_message_content(peer, data)
print('------------ END MESSAGE ------------')
class PureProxy(SMTPServer):
+ def __init__(self, *args, **kwargs):
+ if 'enable_SMTPUTF8' in kwargs and kwargs['enable_SMTPUTF8']:
+ raise ValueError("PureProxy does not support SMTPUTF8.")
+ super(PureProxy, self).__init__(*args, **kwargs)
+
def process_message(self, peer, mailfrom, rcpttos, data):
lines = data.split('\n')
# Look for the last header
@@ -674,6 +790,11 @@ class PureProxy(SMTPServer):
class MailmanProxy(PureProxy):
+ def __init__(self, *args, **kwargs):
+ if 'enable_SMTPUTF8' in kwargs and kwargs['enable_SMTPUTF8']:
+ raise ValueError("MailmanProxy does not support SMTPUTF8.")
+ super(PureProxy, self).__init__(*args, **kwargs)
+
def process_message(self, peer, mailfrom, rcpttos, data):
from io import StringIO
from Mailman import Utils
@@ -752,17 +873,19 @@ class MailmanProxy(PureProxy):
class Options:
- setuid = 1
+ setuid = True
classname = 'PureProxy'
size_limit = None
+ enable_SMTPUTF8 = False
def parseargs():
global DEBUGSTREAM
try:
opts, args = getopt.getopt(
- sys.argv[1:], 'nVhc:s:d',
- ['class=', 'nosetuid', 'version', 'help', 'size=', 'debug'])
+ sys.argv[1:], 'nVhc:s:du',
+ ['class=', 'nosetuid', 'version', 'help', 'size=', 'debug',
+ 'smtputf8'])
except getopt.error as e:
usage(1, e)
@@ -774,11 +897,13 @@ def parseargs():
print(__version__)
sys.exit(0)
elif opt in ('-n', '--nosetuid'):
- options.setuid = 0
+ options.setuid = False
elif opt in ('-c', '--class'):
options.classname = arg
elif opt in ('-d', '--debug'):
DEBUGSTREAM = sys.stderr
+ elif opt in ('-u', '--smtputf8'):
+ options.enable_SMTPUTF8 = True
elif opt in ('-s', '--size'):
try:
int_size = int(arg)
@@ -833,7 +958,7 @@ if __name__ == '__main__':
class_ = getattr(mod, classname)
proxy = class_((options.localhost, options.localport),
(options.remotehost, options.remoteport),
- options.size_limit)
+ options.size_limit, enable_SMTPUTF8=options.enable_SMTPUTF8)
if options.setuid:
try:
import pwd
diff --git a/Lib/smtplib.py b/Lib/smtplib.py
index ac1f593789..dfbf5f9324 100755
--- a/Lib/smtplib.py
+++ b/Lib/smtplib.py
@@ -50,8 +50,9 @@ import email.generator
import base64
import hmac
import copy
+import datetime
+import sys
from email.base64mime import body_encode as encode_base64
-from sys import stderr
__all__ = ["SMTPException", "SMTPServerDisconnected", "SMTPResponseException",
"SMTPSenderRefused", "SMTPRecipientsRefused", "SMTPDataError",
@@ -70,6 +71,13 @@ OLDSTYLE_AUTH = re.compile(r"auth=(.*)", re.I)
class SMTPException(OSError):
"""Base class for all exceptions raised by this module."""
+class SMTPNotSupportedError(SMTPException):
+ """The command or option is not supported by the SMTP server.
+
+ This exception is raised when an attempt is made to run a command or a
+ command with an option which is not supported by the server.
+ """
+
class SMTPServerDisconnected(SMTPException):
"""Not connected to any SMTP server.
@@ -236,6 +244,7 @@ class SMTP:
self._host = host
self.timeout = timeout
self.esmtp_features = {}
+ self.command_encoding = 'ascii'
self.source_address = source_address
if host:
@@ -282,12 +291,17 @@ class SMTP:
"""
self.debuglevel = debuglevel
+ def _print_debug(self, *args):
+ if self.debuglevel > 1:
+ print(datetime.datetime.now().time(), *args, file=sys.stderr)
+ else:
+ print(*args, file=sys.stderr)
+
def _get_socket(self, host, port, timeout):
# This makes it simpler for SMTP_SSL to use the SMTP connect code
# and just alter the socket connection bit.
if self.debuglevel > 0:
- print('connect: to', (host, port), self.source_address,
- file=stderr)
+ self._print_debug('connect: to', (host, port), self.source_address)
return socket.create_connection((host, port), timeout,
self.source_address)
@@ -317,21 +331,24 @@ class SMTP:
if not port:
port = self.default_port
if self.debuglevel > 0:
- print('connect:', (host, port), file=stderr)
+ self._print_debug('connect:', (host, port))
self.sock = self._get_socket(host, port, self.timeout)
self.file = None
(code, msg) = self.getreply()
if self.debuglevel > 0:
- print("connect:", msg, file=stderr)
+ self._print_debug('connect:', repr(msg))
return (code, msg)
def send(self, s):
"""Send `s' to the server."""
if self.debuglevel > 0:
- print('send:', repr(s), file=stderr)
+ self._print_debug('send:', repr(s))
if hasattr(self, 'sock') and self.sock:
if isinstance(s, str):
- s = s.encode("ascii")
+ # send is used by the 'data' command, where command_encoding
+ # should not be used, but 'data' needs to convert the string to
+ # binary itself anyway, so that's not a problem.
+ s = s.encode(self.command_encoding)
try:
self.sock.sendall(s)
except OSError:
@@ -375,7 +392,7 @@ class SMTP:
self.close()
raise SMTPServerDisconnected("Connection unexpectedly closed")
if self.debuglevel > 0:
- print('reply:', repr(line), file=stderr)
+ self._print_debug('reply:', repr(line))
if len(line) > _MAXLINE:
self.close()
raise SMTPResponseException(500, "Line too long.")
@@ -394,8 +411,7 @@ class SMTP:
errmsg = b"\n".join(resp)
if self.debuglevel > 0:
- print('reply: retcode (%s); Msg: %s' % (errcode, errmsg),
- file=stderr)
+ self._print_debug('reply: retcode (%s); Msg: %a' % (errcode, errmsg))
return errcode, errmsg
def docmd(self, cmd, args=""):
@@ -477,6 +493,7 @@ class SMTP:
def rset(self):
"""SMTP 'rset' command -- resets session."""
+ self.command_encoding = 'ascii'
return self.docmd("rset")
def _rset(self):
@@ -496,9 +513,22 @@ class SMTP:
return self.docmd("noop")
def mail(self, sender, options=[]):
- """SMTP 'mail' command -- begins mail xfer session."""
+ """SMTP 'mail' command -- begins mail xfer session.
+
+ This method may raise the following exceptions:
+
+ SMTPNotSupportedError The options parameter includes 'SMTPUTF8'
+ but the SMTPUTF8 extension is not supported by
+ the server.
+ """
optionlist = ''
if options and self.does_esmtp:
+ if any(x.lower()=='smtputf8' for x in options):
+ if self.has_extn('smtputf8'):
+ self.command_encoding = 'utf-8'
+ else:
+ raise SMTPNotSupportedError(
+ 'SMTPUTF8 not supported by server')
optionlist = ' ' + ' '.join(options)
self.putcmd("mail", "FROM:%s%s" % (quoteaddr(sender), optionlist))
return self.getreply()
@@ -524,7 +554,7 @@ class SMTP:
self.putcmd("data")
(code, repl) = self.getreply()
if self.debuglevel > 0:
- print("data:", (code, repl), file=stderr)
+ self._print_debug('data:', (code, repl))
if code != 354:
raise SMTPDataError(code, repl)
else:
@@ -537,7 +567,7 @@ class SMTP:
self.send(q)
(code, msg) = self.getreply()
if self.debuglevel > 0:
- print("data:", (code, msg), file=stderr)
+ self._print_debug('data:', (code, msg))
return (code, msg)
def verify(self, address):
@@ -571,12 +601,77 @@ class SMTP:
if not (200 <= code <= 299):
raise SMTPHeloError(code, resp)
- def login(self, user, password):
+ def auth(self, mechanism, authobject, *, initial_response_ok=True):
+ """Authentication command - requires response processing.
+
+ 'mechanism' specifies which authentication mechanism is to
+ be used - the valid values are those listed in the 'auth'
+ element of 'esmtp_features'.
+
+ 'authobject' must be a callable object taking a single argument:
+
+ data = authobject(challenge)
+
+ It will be called to process the server's challenge response; the
+ challenge argument it is passed will be a bytes. It should return
+ bytes data that will be base64 encoded and sent to the server.
+
+ Keyword arguments:
+ - initial_response_ok: Allow sending the RFC 4954 initial-response
+ to the AUTH command, if the authentication methods supports it.
+ """
+ # RFC 4954 allows auth methods to provide an initial response. Not all
+ # methods support it. By definition, if they return something other
+ # than None when challenge is None, then they do. See issue #15014.
+ mechanism = mechanism.upper()
+ initial_response = (authobject() if initial_response_ok else None)
+ if initial_response is not None:
+ response = encode_base64(initial_response.encode('ascii'), eol='')
+ (code, resp) = self.docmd("AUTH", mechanism + " " + response)
+ else:
+ (code, resp) = self.docmd("AUTH", mechanism)
+ # If server responds with a challenge, send the response.
+ if code == 334:
+ challenge = base64.decodebytes(resp)
+ response = encode_base64(
+ authobject(challenge).encode('ascii'), eol='')
+ (code, resp) = self.docmd(response)
+ if code in (235, 503):
+ return (code, resp)
+ raise SMTPAuthenticationError(code, resp)
+
+ def auth_cram_md5(self, challenge=None):
+ """ Authobject to use with CRAM-MD5 authentication. Requires self.user
+ and self.password to be set."""
+ # CRAM-MD5 does not support initial-response.
+ if challenge is None:
+ return None
+ return self.user + " " + hmac.HMAC(
+ self.password.encode('ascii'), challenge, 'md5').hexdigest()
+
+ def auth_plain(self, challenge=None):
+ """ Authobject to use with PLAIN authentication. Requires self.user and
+ self.password to be set."""
+ return "\0%s\0%s" % (self.user, self.password)
+
+ def auth_login(self, challenge=None):
+ """ Authobject to use with LOGIN authentication. Requires self.user and
+ self.password to be set."""
+ if challenge is None:
+ return self.user
+ else:
+ return self.password
+
+ def login(self, user, password, *, initial_response_ok=True):
"""Log in on an SMTP server that requires authentication.
The arguments are:
- - user: The user name to authenticate with.
- - password: The password for the authentication.
+ - user: The user name to authenticate with.
+ - password: The password for the authentication.
+
+ Keyword arguments:
+ - initial_response_ok: Allow sending the RFC 4954 initial-response
+ to the AUTH command, if the authentication methods supports it.
If there has been no previous EHLO or HELO command this session, this
method tries ESMTP EHLO first.
@@ -589,67 +684,49 @@ class SMTP:
the helo greeting.
SMTPAuthenticationError The server didn't accept the username/
password combination.
+ SMTPNotSupportedError The AUTH command is not supported by the
+ server.
SMTPException No suitable authentication method was
found.
"""
- def encode_cram_md5(challenge, user, password):
- challenge = base64.decodebytes(challenge)
- response = user + " " + hmac.HMAC(password.encode('ascii'),
- challenge, 'md5').hexdigest()
- return encode_base64(response.encode('ascii'), eol='')
-
- def encode_plain(user, password):
- s = "\0%s\0%s" % (user, password)
- return encode_base64(s.encode('ascii'), eol='')
-
- AUTH_PLAIN = "PLAIN"
- AUTH_CRAM_MD5 = "CRAM-MD5"
- AUTH_LOGIN = "LOGIN"
-
self.ehlo_or_helo_if_needed()
-
if not self.has_extn("auth"):
- raise SMTPException("SMTP AUTH extension not supported by server.")
+ raise SMTPNotSupportedError(
+ "SMTP AUTH extension not supported by server.")
# Authentication methods the server claims to support
advertised_authlist = self.esmtp_features["auth"].split()
- # List of authentication methods we support: from preferred to
- # less preferred methods. Except for the purpose of testing the weaker
- # ones, we prefer stronger methods like CRAM-MD5:
- preferred_auths = [AUTH_CRAM_MD5, AUTH_PLAIN, AUTH_LOGIN]
+ # Authentication methods we can handle in our preferred order:
+ preferred_auths = ['CRAM-MD5', 'PLAIN', 'LOGIN']
- # We try the authentication methods the server advertises, but only the
- # ones *we* support. And in our preferred order.
- authlist = [auth for auth in preferred_auths if auth in advertised_authlist]
+ # We try the supported authentications in our preferred order, if
+ # the server supports them.
+ authlist = [auth for auth in preferred_auths
+ if auth in advertised_authlist]
if not authlist:
raise SMTPException("No suitable authentication method found.")
# Some servers advertise authentication methods they don't really
# support, so if authentication fails, we continue until we've tried
# all methods.
+ self.user, self.password = user, password
for authmethod in authlist:
- if authmethod == AUTH_CRAM_MD5:
- (code, resp) = self.docmd("AUTH", AUTH_CRAM_MD5)
- if code == 334:
- (code, resp) = self.docmd(encode_cram_md5(resp, user, password))
- elif authmethod == AUTH_PLAIN:
- (code, resp) = self.docmd("AUTH",
- AUTH_PLAIN + " " + encode_plain(user, password))
- elif authmethod == AUTH_LOGIN:
- (code, resp) = self.docmd("AUTH",
- "%s %s" % (AUTH_LOGIN, encode_base64(user.encode('ascii'), eol='')))
- if code == 334:
- (code, resp) = self.docmd(encode_base64(password.encode('ascii'), eol=''))
-
- # 235 == 'Authentication successful'
- # 503 == 'Error: already authenticated'
- if code in (235, 503):
- return (code, resp)
-
- # We could not login sucessfully. Return result of last attempt.
- raise SMTPAuthenticationError(code, resp)
+ method_name = 'auth_' + authmethod.lower().replace('-', '_')
+ try:
+ (code, resp) = self.auth(
+ authmethod, getattr(self, method_name),
+ initial_response_ok=initial_response_ok)
+ # 235 == 'Authentication successful'
+ # 503 == 'Error: already authenticated'
+ if code in (235, 503):
+ return (code, resp)
+ except SMTPAuthenticationError as e:
+ last_exception = e
+
+ # We could not login successfully. Return result of last attempt.
+ raise last_exception
def starttls(self, keyfile=None, certfile=None, context=None):
"""Puts the connection to the SMTP server into TLS mode.
@@ -670,7 +747,8 @@ class SMTP:
"""
self.ehlo_or_helo_if_needed()
if not self.has_extn("starttls"):
- raise SMTPException("STARTTLS extension not supported by server.")
+ raise SMTPNotSupportedError(
+ "STARTTLS extension not supported by server.")
(resp, reply) = self.docmd("STARTTLS")
if resp == 220:
if not _have_ssl:
@@ -740,6 +818,9 @@ class SMTP:
SMTPDataError The server replied with an unexpected
error code (other than a refusal of
a recipient).
+ SMTPNotSupportedError The mail_options parameter includes 'SMTPUTF8'
+ but the SMTPUTF8 extension is not supported by
+ the server.
Note: the connection will be open even after an exception is raised.
@@ -768,8 +849,6 @@ class SMTP:
if isinstance(msg, str):
msg = _fix_eols(msg).encode('ascii')
if self.does_esmtp:
- # Hmmm? what's this? -ddm
- # self.esmtp_features['7bit']=""
if self.has_extn('size'):
esmtp_opts.append("size=%d" % len(msg))
for option in mail_options:
@@ -817,7 +896,13 @@ class SMTP:
to_addr, any Bcc field (or Resent-Bcc field, when the Message is a
resent) of the Message object won't be transmitted. The Message
object is then serialized using email.generator.BytesGenerator and
- sendmail is called to transmit the message.
+ sendmail is called to transmit the message. If the sender or any of
+ the recipient addresses contain non-ASCII and the server advertises the
+ SMTPUTF8 capability, the policy is cloned with utf8 set to True for the
+ serialization, and SMTPUTF8 and BODY=8BITMIME are asserted on the send.
+ If the server does not support SMTPUTF8, an SMPTNotSupported error is
+ raised. Otherwise the generator is called without modifying the
+ policy.
"""
# 'Resent-Date' is a mandatory field if the Message is resent (RFC 2822
@@ -830,6 +915,7 @@ class SMTP:
# option allowing the user to enable the heuristics. (It should be
# possible to guess correctly almost all of the time.)
+ self.ehlo_or_helo_if_needed()
resent = msg.get_all('Resent-Date')
if resent is None:
header_prefix = ''
@@ -845,14 +931,30 @@ class SMTP:
if to_addrs is None:
addr_fields = [f for f in (msg[header_prefix + 'To'],
msg[header_prefix + 'Bcc'],
- msg[header_prefix + 'Cc']) if f is not None]
+ msg[header_prefix + 'Cc'])
+ if f is not None]
to_addrs = [a[1] for a in email.utils.getaddresses(addr_fields)]
# Make a local copy so we can delete the bcc headers.
msg_copy = copy.copy(msg)
del msg_copy['Bcc']
del msg_copy['Resent-Bcc']
+ international = False
+ try:
+ ''.join([from_addr, *to_addrs]).encode('ascii')
+ except UnicodeEncodeError:
+ if not self.has_extn('smtputf8'):
+ raise SMTPNotSupportedError(
+ "One or more source or delivery addresses require"
+ " internationalized email support, but the server"
+ " does not advertise the required SMTPUTF8 capability")
+ international = True
with io.BytesIO() as bytesmsg:
- g = email.generator.BytesGenerator(bytesmsg)
+ if international:
+ g = email.generator.BytesGenerator(
+ bytesmsg, policy=msg.policy.clone(utf8=True))
+ mail_options += ['SMTPUTF8', 'BODY=8BITMIME']
+ else:
+ g = email.generator.BytesGenerator(bytesmsg)
g.flatten(msg_copy, linesep='\r\n')
flatmsg = bytesmsg.getvalue()
return self.sendmail(from_addr, to_addrs, flatmsg, mail_options,
@@ -920,7 +1022,7 @@ if _have_ssl:
def _get_socket(self, host, port, timeout):
if self.debuglevel > 0:
- print('connect:', (host, port), file=stderr)
+ self._print_debug('connect:', (host, port))
new_socket = socket.create_connection((host, port), timeout,
self.source_address)
new_socket = self.context.wrap_socket(new_socket,
@@ -968,22 +1070,20 @@ class LMTP(SMTP):
self.sock.connect(host)
except OSError:
if self.debuglevel > 0:
- print('connect fail:', host, file=stderr)
+ self._print_debug('connect fail:', host)
if self.sock:
self.sock.close()
self.sock = None
raise
(code, msg) = self.getreply()
if self.debuglevel > 0:
- print('connect:', msg, file=stderr)
+ self._print_debug('connect:', msg)
return (code, msg)
# Test the sendmail method, which tests most of the others.
# Note: This always sends to localhost.
if __name__ == '__main__':
- import sys
-
def prompt(prompt):
sys.stdout.write(prompt + ": ")
sys.stdout.flush()
diff --git a/Lib/sndhdr.py b/Lib/sndhdr.py
index 240e5072f8..e5901ec583 100644
--- a/Lib/sndhdr.py
+++ b/Lib/sndhdr.py
@@ -32,6 +32,11 @@ explicitly given directories.
__all__ = ['what', 'whathdr']
+from collections import namedtuple
+
+SndHeaders = namedtuple('SndHeaders',
+ 'filetype framerate nchannels nframes sampwidth')
+
def what(filename):
"""Guess the type of a sound file."""
res = whathdr(filename)
@@ -45,7 +50,7 @@ def whathdr(filename):
for tf in tests:
res = tf(h, f)
if res:
- return res
+ return SndHeaders(*res)
return None
diff --git a/Lib/socket.py b/Lib/socket.py
index ff2f087678..ac2e3dd0fa 100644
--- a/Lib/socket.py
+++ b/Lib/socket.py
@@ -49,7 +49,7 @@ the setsockopt() and getsockopt() methods.
import _socket
from _socket import *
-import os, sys, io
+import os, sys, io, selectors
from enum import IntEnum
try:
@@ -69,6 +69,7 @@ __all__.extend(os._get_exports_list(_socket))
# Note that _socket only knows about the integer values. The public interface
# in this module understands the enums and translates them back from integers
# where needed (e.g. .family property of a socket object).
+
IntEnum._convert(
'AddressFamily',
__name__,
@@ -79,6 +80,10 @@ IntEnum._convert(
__name__,
lambda C: C.isupper() and C.startswith('SOCK_'))
+_LOCALHOST = '127.0.0.1'
+_LOCALHOST_V6 = '::1'
+
+
def _intenum_converter(value, enum_klass):
"""Convert a numeric family value to an IntEnum member.
@@ -112,6 +117,9 @@ if sys.platform.lower().startswith("win"):
__all__.append("errorTab")
+class _GiveupOnSendfile(Exception): pass
+
+
class socket(_socket.socket):
"""A subclass of _socket.socket adding the makefile() method."""
@@ -141,7 +149,7 @@ class socket(_socket.socket):
closed = getattr(self, '_closed', False)
s = "<%s.%s%s fd=%i, family=%s, type=%s, proto=%i" \
% (self.__class__.__module__,
- self.__class__.__name__,
+ self.__class__.__qualname__,
" [closed]" if closed else "",
self.fileno(),
self.family,
@@ -201,10 +209,10 @@ class socket(_socket.socket):
encoding=None, errors=None, newline=None):
"""makefile(...) -> an I/O stream connected to the socket
- The arguments are as for io.open() after the filename,
- except the only mode characters supported are 'r', 'w' and 'b'.
- The semantics are similar too. (XXX refactor to share code?)
+ The arguments are as for io.open() after the filename, except the only
+ supported mode values are 'r' (default), 'w' and 'b'.
"""
+ # XXX refactor to share code?
if not set(mode) <= {"r", "w", "b"}:
raise ValueError("invalid mode %r (only r, w, b allowed)" % (mode,))
writing = "w" in mode
@@ -239,6 +247,149 @@ class socket(_socket.socket):
text.mode = mode
return text
+ if hasattr(os, 'sendfile'):
+
+ def _sendfile_use_sendfile(self, file, offset=0, count=None):
+ self._check_sendfile_params(file, offset, count)
+ sockno = self.fileno()
+ try:
+ fileno = file.fileno()
+ except (AttributeError, io.UnsupportedOperation) as err:
+ raise _GiveupOnSendfile(err) # not a regular file
+ try:
+ fsize = os.fstat(fileno).st_size
+ except OSError:
+ raise _GiveupOnSendfile(err) # not a regular file
+ if not fsize:
+ return 0 # empty file
+ blocksize = fsize if not count else count
+
+ timeout = self.gettimeout()
+ if timeout == 0:
+ raise ValueError("non-blocking sockets are not supported")
+ # poll/select have the advantage of not requiring any
+ # extra file descriptor, contrarily to epoll/kqueue
+ # (also, they require a single syscall).
+ if hasattr(selectors, 'PollSelector'):
+ selector = selectors.PollSelector()
+ else:
+ selector = selectors.SelectSelector()
+ selector.register(sockno, selectors.EVENT_WRITE)
+
+ total_sent = 0
+ # localize variable access to minimize overhead
+ selector_select = selector.select
+ os_sendfile = os.sendfile
+ try:
+ while True:
+ if timeout and not selector_select(timeout):
+ raise _socket.timeout('timed out')
+ if count:
+ blocksize = count - total_sent
+ if blocksize <= 0:
+ break
+ try:
+ sent = os_sendfile(sockno, fileno, offset, blocksize)
+ except BlockingIOError:
+ if not timeout:
+ # Block until the socket is ready to send some
+ # data; avoids hogging CPU resources.
+ selector_select()
+ continue
+ except OSError as err:
+ if total_sent == 0:
+ # We can get here for different reasons, the main
+ # one being 'file' is not a regular mmap(2)-like
+ # file, in which case we'll fall back on using
+ # plain send().
+ raise _GiveupOnSendfile(err)
+ raise err from None
+ else:
+ if sent == 0:
+ break # EOF
+ offset += sent
+ total_sent += sent
+ return total_sent
+ finally:
+ if total_sent > 0 and hasattr(file, 'seek'):
+ file.seek(offset)
+ else:
+ def _sendfile_use_sendfile(self, file, offset=0, count=None):
+ raise _GiveupOnSendfile(
+ "os.sendfile() not available on this platform")
+
+ def _sendfile_use_send(self, file, offset=0, count=None):
+ self._check_sendfile_params(file, offset, count)
+ if self.gettimeout() == 0:
+ raise ValueError("non-blocking sockets are not supported")
+ if offset:
+ file.seek(offset)
+ blocksize = min(count, 8192) if count else 8192
+ total_sent = 0
+ # localize variable access to minimize overhead
+ file_read = file.read
+ sock_send = self.send
+ try:
+ while True:
+ if count:
+ blocksize = min(count - total_sent, blocksize)
+ if blocksize <= 0:
+ break
+ data = memoryview(file_read(blocksize))
+ if not data:
+ break # EOF
+ while True:
+ try:
+ sent = sock_send(data)
+ except BlockingIOError:
+ continue
+ else:
+ total_sent += sent
+ if sent < len(data):
+ data = data[sent:]
+ else:
+ break
+ return total_sent
+ finally:
+ if total_sent > 0 and hasattr(file, 'seek'):
+ file.seek(offset + total_sent)
+
+ def _check_sendfile_params(self, file, offset, count):
+ if 'b' not in getattr(file, 'mode', 'b'):
+ raise ValueError("file should be opened in binary mode")
+ if not self.type & SOCK_STREAM:
+ raise ValueError("only SOCK_STREAM type sockets are supported")
+ if count is not None:
+ if not isinstance(count, int):
+ raise TypeError(
+ "count must be a positive integer (got {!r})".format(count))
+ if count <= 0:
+ raise ValueError(
+ "count must be a positive integer (got {!r})".format(count))
+
+ def sendfile(self, file, offset=0, count=None):
+ """sendfile(file[, offset[, count]]) -> sent
+
+ Send a file until EOF is reached by using high-performance
+ os.sendfile() and return the total number of bytes which
+ were sent.
+ *file* must be a regular file object opened in binary mode.
+ If os.sendfile() is not available (e.g. Windows) or file is
+ not a regular file socket.send() will be used instead.
+ *offset* tells from where to start reading the file.
+ If specified, *count* is the total number of bytes to transmit
+ as opposed to sending the file until EOF is reached.
+ File position is updated on return or also in case of error in
+ which case file.tell() can be used to figure out the number of
+ bytes which were sent.
+ The socket must be of SOCK_STREAM type.
+ Non-blocking sockets are not supported.
+ """
+ try:
+ return self._sendfile_use_sendfile(file, offset, count)
+ except _GiveupOnSendfile:
+ return self._sendfile_use_send(file, offset, count)
+
def _decref_socketios(self):
if self._io_refs > 0:
self._io_refs -= 1
@@ -329,6 +480,52 @@ if hasattr(_socket, "socketpair"):
b = socket(family, type, proto, b.detach())
return a, b
+else:
+
+ # Origin: https://gist.github.com/4325783, by Geert Jansen. Public domain.
+ def socketpair(family=AF_INET, type=SOCK_STREAM, proto=0):
+ if family == AF_INET:
+ host = _LOCALHOST
+ elif family == AF_INET6:
+ host = _LOCALHOST_V6
+ else:
+ raise ValueError("Only AF_INET and AF_INET6 socket address families "
+ "are supported")
+ if type != SOCK_STREAM:
+ raise ValueError("Only SOCK_STREAM socket type is supported")
+ if proto != 0:
+ raise ValueError("Only protocol zero is supported")
+
+ # We create a connected TCP socket. Note the trick with
+ # setblocking(False) that prevents us from having to create a thread.
+ lsock = socket(family, type, proto)
+ try:
+ lsock.bind((host, 0))
+ lsock.listen()
+ # On IPv6, ignore flow_info and scope_id
+ addr, port = lsock.getsockname()[:2]
+ csock = socket(family, type, proto)
+ try:
+ csock.setblocking(False)
+ try:
+ csock.connect((addr, port))
+ except (BlockingIOError, InterruptedError):
+ pass
+ csock.setblocking(True)
+ ssock, _ = lsock.accept()
+ except:
+ csock.close()
+ raise
+ finally:
+ lsock.close()
+ return (ssock, csock)
+
+socketpair.__doc__ = """socketpair([family[, type[, proto]]]) -> (socket object, socket object)
+Create a pair of socket objects from the sockets returned by the platform
+socketpair() function.
+The arguments are the same as for socket() except the default family is AF_UNIX
+if defined on the platform; otherwise, the default is AF_INET.
+"""
_blocking_errnos = { EAGAIN, EWOULDBLOCK }
@@ -379,8 +576,6 @@ class SocketIO(io.RawIOBase):
except timeout:
self._timeout_occurred = True
raise
- except InterruptedError:
- continue
except error as e:
if e.args[0] in _blocking_errnos:
return None
@@ -490,7 +685,7 @@ def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT,
global default timeout setting returned by :func:`getdefaulttimeout`
is used. If *source_address* is set it must be a tuple of (host, port)
for the socket to bind as a source address before making the connection.
- An host of '' or port 0 tells the OS to use the default.
+ A host of '' or port 0 tells the OS to use the default.
"""
host, port = address
diff --git a/Lib/socketserver.py b/Lib/socketserver.py
index 5cb89bea19..88088130ee 100644
--- a/Lib/socketserver.py
+++ b/Lib/socketserver.py
@@ -94,7 +94,7 @@ handle() method.
Another approach to handling multiple simultaneous requests in an
environment that supports neither threads nor fork (or where these are
too expensive or inappropriate for the service) is to maintain an
-explicit table of partially finished requests and to use select() to
+explicit table of partially finished requests and to use a selector to
decide which request to work on next (or whether to handle a new
incoming request). This is particularly important for stream services
where each client can potentially be connected for a long time (if
@@ -104,7 +104,6 @@ Future work:
- Standard classes for Sun RPC (which uses either UDP or TCP)
- Standard mix-in classes to implement various authentication
and encryption schemes
-- Standard framework for select-based multiplexing
XXX Open problems:
- What to do with out-of-band data?
@@ -121,22 +120,18 @@ BaseServer:
# Author of the BaseServer patch: Luke Kenneth Casson Leighton
-# XXX Warning!
-# There is a test suite for this module, but it cannot be run by the
-# standard regression test.
-# To run it manually, run Lib/test/test_socketserver.py.
-
__version__ = "0.4"
import socket
-import select
+import selectors
import os
import errno
try:
import threading
except ImportError:
import dummy_threading as threading
+from time import monotonic as time
__all__ = ["BaseServer", "TCPServer", "UDPServer", "ForkingUDPServer",
"ForkingTCPServer", "ThreadingUDPServer", "ThreadingTCPServer",
@@ -147,14 +142,13 @@ if hasattr(socket, "AF_UNIX"):
"ThreadingUnixStreamServer",
"ThreadingUnixDatagramServer"])
-def _eintr_retry(func, *args):
- """restart a system call interrupted by EINTR"""
- while True:
- try:
- return func(*args)
- except OSError as e:
- if e.errno != errno.EINTR:
- raise
+# poll/select have the advantage of not requiring any extra file descriptor,
+# contrarily to epoll/kqueue (also, they require a single syscall).
+if hasattr(selectors, 'PollSelector'):
+ _ServerSelector = selectors.PollSelector
+else:
+ _ServerSelector = selectors.SelectSelector
+
class BaseServer:
@@ -166,7 +160,7 @@ class BaseServer:
- serve_forever(poll_interval=0.5)
- shutdown()
- handle_request() # if you do not use serve_forever()
- - fileno() -> int # for select()
+ - fileno() -> int # for selector
Methods that may be overridden:
@@ -227,17 +221,19 @@ class BaseServer:
"""
self.__is_shut_down.clear()
try:
- while not self.__shutdown_request:
- # XXX: Consider using another file descriptor or
- # connecting to the socket to wake this up instead of
- # polling. Polling reduces our responsiveness to a
- # shutdown request and wastes cpu at all other times.
- r, w, e = _eintr_retry(select.select, [self], [], [],
- poll_interval)
- if self in r:
- self._handle_request_noblock()
-
- self.service_actions()
+ # XXX: Consider using another file descriptor or connecting to the
+ # socket to wake this up instead of polling. Polling reduces our
+ # responsiveness to a shutdown request and wastes cpu at all other
+ # times.
+ with _ServerSelector() as selector:
+ selector.register(self, selectors.EVENT_READ)
+
+ while not self.__shutdown_request:
+ ready = selector.select(poll_interval)
+ if ready:
+ self._handle_request_noblock()
+
+ self.service_actions()
finally:
self.__shutdown_request = False
self.__is_shut_down.set()
@@ -260,16 +256,16 @@ class BaseServer:
"""
pass
- # The distinction between handling, getting, processing and
- # finishing a request is fairly arbitrary. Remember:
+ # The distinction between handling, getting, processing and finishing a
+ # request is fairly arbitrary. Remember:
#
- # - handle_request() is the top-level call. It calls
- # select, get_request(), verify_request() and process_request()
+ # - handle_request() is the top-level call. It calls selector.select(),
+ # get_request(), verify_request() and process_request()
# - get_request() is different for stream or datagram sockets
- # - process_request() is the place that may fork a new process
- # or create a new thread to finish the request
- # - finish_request() instantiates the request handler class;
- # this constructor will handle the request all by itself
+ # - process_request() is the place that may fork a new process or create a
+ # new thread to finish the request
+ # - finish_request() instantiates the request handler class; this
+ # constructor will handle the request all by itself
def handle_request(self):
"""Handle one request, possibly blocking.
@@ -283,18 +279,30 @@ class BaseServer:
timeout = self.timeout
elif self.timeout is not None:
timeout = min(timeout, self.timeout)
- fd_sets = _eintr_retry(select.select, [self], [], [], timeout)
- if not fd_sets[0]:
- self.handle_timeout()
- return
- self._handle_request_noblock()
+ if timeout is not None:
+ deadline = time() + timeout
+
+ # Wait until a request arrives or the timeout expires - the loop is
+ # necessary to accommodate early wakeups due to EINTR.
+ with _ServerSelector() as selector:
+ selector.register(self, selectors.EVENT_READ)
+
+ while True:
+ ready = selector.select(timeout)
+ if ready:
+ return self._handle_request_noblock()
+ else:
+ if timeout is not None:
+ timeout = deadline - time()
+ if timeout < 0:
+ return self.handle_timeout()
def _handle_request_noblock(self):
"""Handle one request, without blocking.
- I assume that select.select has returned that the socket is
- readable before this function was called, so there should be
- no risk of blocking in get_request().
+ I assume that selector.select() has returned that the socket is
+ readable before this function was called, so there should be no risk of
+ blocking in get_request().
"""
try:
request, client_address = self.get_request()
@@ -306,6 +314,8 @@ class BaseServer:
except:
self.handle_error(request, client_address)
self.shutdown_request(request)
+ else:
+ self.shutdown_request(request)
def handle_timeout(self):
"""Called if no new request arrives within self.timeout.
@@ -377,7 +387,7 @@ class TCPServer(BaseServer):
- serve_forever(poll_interval=0.5)
- shutdown()
- handle_request() # if you don't use serve_forever()
- - fileno() -> int # for select()
+ - fileno() -> int # for selector
Methods that may be overridden:
@@ -463,7 +473,7 @@ class TCPServer(BaseServer):
def fileno(self):
"""Return socket file number.
- Interface required by select().
+ Interface required by selector.
"""
return self.socket.fileno()
@@ -540,8 +550,6 @@ class ForkingMixIn:
try:
pid, _ = os.waitpid(-1, 0)
self.active_children.discard(pid)
- except InterruptedError:
- pass
except ChildProcessError:
# we don't have any children, we're done
self.active_children.clear()
@@ -660,7 +668,7 @@ class BaseRequestHandler:
client address as self.client_address, and the server (in case it
needs access to per-server information) as self.server. Since a
separate instance is created for each request, the handle() method
- can define arbitrary other instance variariables.
+ can define other arbitrary instance variables.
"""
@@ -728,7 +736,7 @@ class StreamRequestHandler(BaseRequestHandler):
try:
self.wfile.flush()
except socket.error:
- # An final socket error may have occurred here, such as
+ # A final socket error may have occurred here, such as
# the local error ECONNABORTED.
pass
self.wfile.close()
@@ -737,9 +745,6 @@ class StreamRequestHandler(BaseRequestHandler):
class DatagramRequestHandler(BaseRequestHandler):
- # XXX Regrettably, I cannot get this working on Linux;
- # s.recvfrom() doesn't return a meaningful client address.
-
"""Define self.rfile and self.wfile for datagram sockets."""
def setup(self):
diff --git a/Lib/sqlite3/test/factory.py b/Lib/sqlite3/test/factory.py
index a8348b4626..f587596f64 100644
--- a/Lib/sqlite3/test/factory.py
+++ b/Lib/sqlite3/test/factory.py
@@ -111,6 +111,24 @@ class RowFactoryTests(unittest.TestCase):
with self.assertRaises(IndexError):
row[2**1000]
+ def CheckSqliteRowSlice(self):
+ # A sqlite.Row can be sliced like a list.
+ self.con.row_factory = sqlite.Row
+ row = self.con.execute("select 1, 2, 3, 4").fetchone()
+ self.assertEqual(row[0:0], ())
+ self.assertEqual(row[0:1], (1,))
+ self.assertEqual(row[1:3], (2, 3))
+ self.assertEqual(row[3:1], ())
+ # Explicit bounds are optional.
+ self.assertEqual(row[1:], (2, 3, 4))
+ self.assertEqual(row[:3], (1, 2, 3))
+ # Slices can use negative indices.
+ self.assertEqual(row[-2:-1], (3,))
+ self.assertEqual(row[-2:], (3, 4))
+ # Slicing supports steps.
+ self.assertEqual(row[0:4:2], (1, 3))
+ self.assertEqual(row[3:0:-2], (4, 2))
+
def CheckSqliteRowIter(self):
"""Checks if the row object is iterable"""
self.con.row_factory = sqlite.Row
diff --git a/Lib/sqlite3/test/regression.py b/Lib/sqlite3/test/regression.py
index eaaaa2c528..11adb300d8 100644
--- a/Lib/sqlite3/test/regression.py
+++ b/Lib/sqlite3/test/regression.py
@@ -73,7 +73,7 @@ class RegressionTests(unittest.TestCase):
def CheckStatementFinalizationOnCloseDb(self):
# pysqlite versions <= 2.3.3 only finalized statements in the statement
# cache when closing the database. statements that were still
- # referenced in cursors weren't closed an could provoke "
+ # referenced in cursors weren't closed and could provoke "
# "OperationalError: Unable to close due to unfinalised statements".
con = sqlite.connect(":memory:")
cursors = []
diff --git a/Lib/sqlite3/test/userfunctions.py b/Lib/sqlite3/test/userfunctions.py
index 69e2ec2991..8a4bbab85c 100644
--- a/Lib/sqlite3/test/userfunctions.py
+++ b/Lib/sqlite3/test/userfunctions.py
@@ -55,6 +55,9 @@ def func_isblob(v):
def func_islonglong(v):
return isinstance(v, int) and v >= 1<<31
+def func(*args):
+ return len(args)
+
class AggrNoStep:
def __init__(self):
pass
@@ -111,6 +114,19 @@ class AggrCheckType:
def finalize(self):
return self.val
+class AggrCheckTypes:
+ def __init__(self):
+ self.val = 0
+
+ def step(self, whichType, *vals):
+ theType = {"str": str, "int": int, "float": float, "None": type(None),
+ "blob": bytes}
+ for val in vals:
+ self.val += int(theType[whichType] is type(val))
+
+ def finalize(self):
+ return self.val
+
class AggrSum:
def __init__(self):
self.val = 0.0
@@ -140,6 +156,7 @@ class FunctionTests(unittest.TestCase):
self.con.create_function("isnone", 1, func_isnone)
self.con.create_function("isblob", 1, func_isblob)
self.con.create_function("islonglong", 1, func_islonglong)
+ self.con.create_function("spam", -1, func)
def tearDown(self):
self.con.close()
@@ -257,6 +274,13 @@ class FunctionTests(unittest.TestCase):
val = cur.fetchone()[0]
self.assertEqual(val, 1)
+ def CheckAnyArguments(self):
+ cur = self.con.cursor()
+ cur.execute("select spam(?, ?)", (1, 2))
+ val = cur.fetchone()[0]
+ self.assertEqual(val, 2)
+
+
class AggregateTests(unittest.TestCase):
def setUp(self):
self.con = sqlite.connect(":memory:")
@@ -279,6 +303,7 @@ class AggregateTests(unittest.TestCase):
self.con.create_aggregate("excStep", 1, AggrExceptionInStep)
self.con.create_aggregate("excFinalize", 1, AggrExceptionInFinalize)
self.con.create_aggregate("checkType", 2, AggrCheckType)
+ self.con.create_aggregate("checkTypes", -1, AggrCheckTypes)
self.con.create_aggregate("mysum", 1, AggrSum)
def tearDown(self):
@@ -349,6 +374,12 @@ class AggregateTests(unittest.TestCase):
val = cur.fetchone()[0]
self.assertEqual(val, 1)
+ def CheckAggrCheckParamsInt(self):
+ cur = self.con.cursor()
+ cur.execute("select checkTypes('int', ?, ?)", (42, 24))
+ val = cur.fetchone()[0]
+ self.assertEqual(val, 2)
+
def CheckAggrCheckParamFloat(self):
cur = self.con.cursor()
cur.execute("select checkType('float', ?)", (3.14,))
diff --git a/Lib/sre_compile.py b/Lib/sre_compile.py
index 550ea158af..502b0616c6 100644
--- a/Lib/sre_compile.py
+++ b/Lib/sre_compile.py
@@ -13,19 +13,13 @@
import _sre
import sre_parse
from sre_constants import *
-from _sre import MAXREPEAT
assert _sre.MAGIC == MAGIC, "SRE module mismatch"
-if _sre.CODESIZE == 2:
- MAXCODE = 65535
-else:
- MAXCODE = 0xFFFFFFFF
-
-_LITERAL_CODES = set([LITERAL, NOT_LITERAL])
-_REPEATING_CODES = set([REPEAT, MIN_REPEAT, MAX_REPEAT])
-_SUCCESS_CODES = set([SUCCESS, FAILURE])
-_ASSERT_CODES = set([ASSERT, ASSERT_NOT])
+_LITERAL_CODES = {LITERAL, NOT_LITERAL}
+_REPEATING_CODES = {REPEAT, MIN_REPEAT, MAX_REPEAT}
+_SUCCESS_CODES = {SUCCESS, FAILURE}
+_ASSERT_CODES = {ASSERT, ASSERT_NOT}
# Sets of lowercase characters which have the same uppercase.
_equivalences = (
@@ -86,75 +80,75 @@ def _compile(code, pattern, flags):
if flags & SRE_FLAG_IGNORECASE:
lo = _sre.getlower(av, flags)
if fixes and lo in fixes:
- emit(OPCODES[IN_IGNORE])
+ emit(IN_IGNORE)
skip = _len(code); emit(0)
if op is NOT_LITERAL:
- emit(OPCODES[NEGATE])
+ emit(NEGATE)
for k in (lo,) + fixes[lo]:
- emit(OPCODES[LITERAL])
+ emit(LITERAL)
emit(k)
- emit(OPCODES[FAILURE])
+ emit(FAILURE)
code[skip] = _len(code) - skip
else:
- emit(OPCODES[OP_IGNORE[op]])
+ emit(OP_IGNORE[op])
emit(lo)
else:
- emit(OPCODES[op])
+ emit(op)
emit(av)
elif op is IN:
if flags & SRE_FLAG_IGNORECASE:
- emit(OPCODES[OP_IGNORE[op]])
+ emit(OP_IGNORE[op])
def fixup(literal, flags=flags):
return _sre.getlower(literal, flags)
else:
- emit(OPCODES[op])
+ emit(op)
fixup = None
skip = _len(code); emit(0)
_compile_charset(av, flags, code, fixup, fixes)
code[skip] = _len(code) - skip
elif op is ANY:
if flags & SRE_FLAG_DOTALL:
- emit(OPCODES[ANY_ALL])
+ emit(ANY_ALL)
else:
- emit(OPCODES[ANY])
+ emit(ANY)
elif op in REPEATING_CODES:
if flags & SRE_FLAG_TEMPLATE:
- raise error("internal: unsupported template operator")
+ raise error("internal: unsupported template operator %r" % (op,))
elif _simple(av) and op is not REPEAT:
if op is MAX_REPEAT:
- emit(OPCODES[REPEAT_ONE])
+ emit(REPEAT_ONE)
else:
- emit(OPCODES[MIN_REPEAT_ONE])
+ emit(MIN_REPEAT_ONE)
skip = _len(code); emit(0)
emit(av[0])
emit(av[1])
_compile(code, av[2], flags)
- emit(OPCODES[SUCCESS])
+ emit(SUCCESS)
code[skip] = _len(code) - skip
else:
- emit(OPCODES[REPEAT])
+ emit(REPEAT)
skip = _len(code); emit(0)
emit(av[0])
emit(av[1])
_compile(code, av[2], flags)
code[skip] = _len(code) - skip
if op is MAX_REPEAT:
- emit(OPCODES[MAX_UNTIL])
+ emit(MAX_UNTIL)
else:
- emit(OPCODES[MIN_UNTIL])
+ emit(MIN_UNTIL)
elif op is SUBPATTERN:
if av[0]:
- emit(OPCODES[MARK])
+ emit(MARK)
emit((av[0]-1)*2)
# _compile_info(code, av[1], flags)
_compile(code, av[1], flags)
if av[0]:
- emit(OPCODES[MARK])
+ emit(MARK)
emit((av[0]-1)*2+1)
elif op in SUCCESS_CODES:
- emit(OPCODES[op])
+ emit(op)
elif op in ASSERT_CODES:
- emit(OPCODES[op])
+ emit(op)
skip = _len(code); emit(0)
if av[0] >= 0:
emit(0) # look ahead
@@ -164,57 +158,57 @@ def _compile(code, pattern, flags):
raise error("look-behind requires fixed-width pattern")
emit(lo) # look behind
_compile(code, av[1], flags)
- emit(OPCODES[SUCCESS])
+ emit(SUCCESS)
code[skip] = _len(code) - skip
elif op is CALL:
- emit(OPCODES[op])
+ emit(op)
skip = _len(code); emit(0)
_compile(code, av, flags)
- emit(OPCODES[SUCCESS])
+ emit(SUCCESS)
code[skip] = _len(code) - skip
elif op is AT:
- emit(OPCODES[op])
+ emit(op)
if flags & SRE_FLAG_MULTILINE:
av = AT_MULTILINE.get(av, av)
if flags & SRE_FLAG_LOCALE:
av = AT_LOCALE.get(av, av)
elif flags & SRE_FLAG_UNICODE:
av = AT_UNICODE.get(av, av)
- emit(ATCODES[av])
+ emit(av)
elif op is BRANCH:
- emit(OPCODES[op])
+ emit(op)
tail = []
tailappend = tail.append
for av in av[1]:
skip = _len(code); emit(0)
# _compile_info(code, av, flags)
_compile(code, av, flags)
- emit(OPCODES[JUMP])
+ emit(JUMP)
tailappend(_len(code)); emit(0)
code[skip] = _len(code) - skip
- emit(0) # end of branch
+ emit(FAILURE) # end of branch
for tail in tail:
code[tail] = _len(code) - tail
elif op is CATEGORY:
- emit(OPCODES[op])
+ emit(op)
if flags & SRE_FLAG_LOCALE:
av = CH_LOCALE[av]
elif flags & SRE_FLAG_UNICODE:
av = CH_UNICODE[av]
- emit(CHCODES[av])
+ emit(av)
elif op is GROUPREF:
if flags & SRE_FLAG_IGNORECASE:
- emit(OPCODES[OP_IGNORE[op]])
+ emit(OP_IGNORE[op])
else:
- emit(OPCODES[op])
+ emit(op)
emit(av-1)
elif op is GROUPREF_EXISTS:
- emit(OPCODES[op])
+ emit(op)
emit(av[0]-1)
skipyes = _len(code); emit(0)
_compile(code, av[1], flags)
if av[2]:
- emit(OPCODES[JUMP])
+ emit(JUMP)
skipno = _len(code); emit(0)
code[skipyes] = _len(code) - skipyes + 1
_compile(code, av[2], flags)
@@ -222,19 +216,18 @@ def _compile(code, pattern, flags):
else:
code[skipyes] = _len(code) - skipyes + 1
else:
- raise ValueError("unsupported operand type", op)
+ raise error("internal: unsupported operand type %r" % (op,))
def _compile_charset(charset, flags, code, fixup=None, fixes=None):
# compile charset subprogram
emit = code.append
- for op, av in _optimize_charset(charset, fixup, fixes,
- flags & SRE_FLAG_UNICODE):
- emit(OPCODES[op])
+ for op, av in _optimize_charset(charset, fixup, fixes):
+ emit(op)
if op is NEGATE:
pass
elif op is LITERAL:
emit(av)
- elif op is RANGE:
+ elif op is RANGE or op is RANGE_IGNORE:
emit(av[0])
emit(av[1])
elif op is CHARSET:
@@ -243,16 +236,16 @@ def _compile_charset(charset, flags, code, fixup=None, fixes=None):
code.extend(av)
elif op is CATEGORY:
if flags & SRE_FLAG_LOCALE:
- emit(CHCODES[CH_LOCALE[av]])
+ emit(CH_LOCALE[av])
elif flags & SRE_FLAG_UNICODE:
- emit(CHCODES[CH_UNICODE[av]])
+ emit(CH_UNICODE[av])
else:
- emit(CHCODES[av])
+ emit(av)
else:
- raise error("internal: unsupported set operator")
- emit(OPCODES[FAILURE])
+ raise error("internal: unsupported set operator %r" % (op,))
+ emit(FAILURE)
-def _optimize_charset(charset, fixup, fixes, isunicode):
+def _optimize_charset(charset, fixup, fixes):
# internal: optimize character set
out = []
tail = []
@@ -262,10 +255,10 @@ def _optimize_charset(charset, fixup, fixes, isunicode):
try:
if op is LITERAL:
if fixup:
- i = fixup(av)
- charmap[i] = 1
- if fixes and i in fixes:
- for k in fixes[i]:
+ lo = fixup(av)
+ charmap[lo] = 1
+ if fixes and lo in fixes:
+ for k in fixes[lo]:
charmap[k] = 1
else:
charmap[av] = 1
@@ -291,21 +284,13 @@ def _optimize_charset(charset, fixup, fixes, isunicode):
# character set contains non-UCS1 character codes
charmap += b'\0' * 0xff00
continue
- # character set contains non-BMP character codes
- if fixup and isunicode and op is RANGE:
- lo, hi = av
- ranges = [av]
- # There are only two ranges of cased astral characters:
- # 10400-1044F (Deseret) and 118A0-118DF (Warang Citi).
- _fixup_range(max(0x10000, lo), min(0x11fff, hi),
- ranges, fixup)
- for lo, hi in ranges:
- if lo == hi:
- tail.append((LITERAL, hi))
- else:
- tail.append((RANGE, (lo, hi)))
- else:
- tail.append((op, av))
+ # Character set contains non-BMP character codes.
+ # There are only two ranges of cased non-BMP characters:
+ # 10400-1044F (Deseret) and 118A0-118DF (Warang Citi),
+ # and for both ranges RANGE_IGNORE works.
+ if fixup and op is RANGE:
+ op = RANGE_IGNORE
+ tail.append((op, av))
break
# compress character map
@@ -383,25 +368,8 @@ def _optimize_charset(charset, fixup, fixes, isunicode):
out += tail
return out
-def _fixup_range(lo, hi, ranges, fixup):
- for i in map(fixup, range(lo, hi+1)):
- for k, (lo, hi) in enumerate(ranges):
- if i < lo:
- if l == lo - 1:
- ranges[k] = (i, hi)
- else:
- ranges.insert(k, (i, i))
- break
- elif i > hi:
- if i == hi + 1:
- ranges[k] = (lo, i)
- break
- else:
- break
- else:
- ranges.append((i, i))
-
_CODEBITS = _sre.CODESIZE * 8
+MAXCODE = (1 << _CODEBITS) - 1
_BITS_TRANS = b'0' + b'1' * 255
def _mk_bitmap(bits, _CODEBITS=_CODEBITS, _int=int):
s = bits.translate(_BITS_TRANS)[::-1]
@@ -446,8 +414,11 @@ def _compile_info(code, pattern, flags):
# this contains min/max pattern width, and an optional literal
# prefix or a character map
lo, hi = pattern.getwidth()
+ if hi > MAXCODE:
+ hi = MAXCODE
if lo == 0:
- return # not worth it
+ code.extend([INFO, 4, 0, lo, hi])
+ return
# look for a literal prefix
prefix = []
prefixappend = prefix.append
@@ -505,21 +476,21 @@ def _compile_info(code, pattern, flags):
elif op is IN:
charset = av
## if prefix:
-## print "*** PREFIX", prefix, prefix_skip
+## print("*** PREFIX", prefix, prefix_skip)
## if charset:
-## print "*** CHARSET", charset
+## print("*** CHARSET", charset)
# add an info block
emit = code.append
- emit(OPCODES[INFO])
+ emit(INFO)
skip = len(code); emit(0)
# literal flag
mask = 0
if prefix:
mask = SRE_INFO_PREFIX
if len(prefix) == prefix_skip == len(pattern.data):
- mask = mask + SRE_INFO_LITERAL
+ mask = mask | SRE_INFO_LITERAL
elif charset:
- mask = mask + SRE_INFO_CHARSET
+ mask = mask | SRE_INFO_CHARSET
emit(mask)
# pattern length
if lo < MAXCODE:
@@ -527,10 +498,7 @@ def _compile_info(code, pattern, flags):
else:
emit(MAXCODE)
prefix = prefix[:MAXCODE]
- if hi < MAXCODE:
- emit(hi)
- else:
- emit(0)
+ emit(min(hi, MAXCODE))
# add literal prefix
if prefix:
emit(len(prefix)) # length
@@ -556,7 +524,7 @@ def _code(p, flags):
# compile the pattern
_compile(code, p.data, flags)
- code.append(OPCODES[SUCCESS])
+ code.append(SUCCESS)
return code
@@ -571,13 +539,7 @@ def compile(p, flags=0):
code = _code(p, flags)
- # print code
-
- # XXX: <fl> get rid of this limitation!
- if p.pattern.groups > 100:
- raise AssertionError(
- "sorry, but this version only supports 100 named groups"
- )
+ # print(code)
# map in either direction
groupindex = p.pattern.groupdict
diff --git a/Lib/sre_constants.py b/Lib/sre_constants.py
index 23e3516006..fc684ae96f 100644
--- a/Lib/sre_constants.py
+++ b/Lib/sre_constants.py
@@ -13,153 +13,115 @@
# update when constants are added or removed
-MAGIC = 20031017
+MAGIC = 20140917
-from _sre import MAXREPEAT
+from _sre import MAXREPEAT, MAXGROUPS
# SRE standard exception (access as sre.error)
# should this really be here?
class error(Exception):
- pass
+ def __init__(self, msg, pattern=None, pos=None):
+ self.msg = msg
+ self.pattern = pattern
+ self.pos = pos
+ if pattern is not None and pos is not None:
+ msg = '%s at position %d' % (msg, pos)
+ if isinstance(pattern, str):
+ newline = '\n'
+ else:
+ newline = b'\n'
+ self.lineno = pattern.count(newline, 0, pos) + 1
+ self.colno = pos - pattern.rfind(newline, 0, pos)
+ if newline in pattern:
+ msg = '%s (line %d, column %d)' % (msg, self.lineno, self.colno)
+ else:
+ self.lineno = self.colno = None
+ super().__init__(msg)
+
+
+class _NamedIntConstant(int):
+ def __new__(cls, value, name):
+ self = super(_NamedIntConstant, cls).__new__(cls, value)
+ self.name = name
+ return self
+
+ def __str__(self):
+ return self.name
+
+ __repr__ = __str__
+
+MAXREPEAT = _NamedIntConstant(MAXREPEAT, 'MAXREPEAT')
+
+def _makecodes(names):
+ names = names.strip().split()
+ items = [_NamedIntConstant(i, name) for i, name in enumerate(names)]
+ globals().update({item.name: item for item in items})
+ return items
# operators
+# failure=0 success=1 (just because it looks better that way :-)
+OPCODES = _makecodes("""
+ FAILURE SUCCESS
+
+ ANY ANY_ALL
+ ASSERT ASSERT_NOT
+ AT
+ BRANCH
+ CALL
+ CATEGORY
+ CHARSET BIGCHARSET
+ GROUPREF GROUPREF_EXISTS GROUPREF_IGNORE
+ IN IN_IGNORE
+ INFO
+ JUMP
+ LITERAL LITERAL_IGNORE
+ MARK
+ MAX_UNTIL
+ MIN_UNTIL
+ NOT_LITERAL NOT_LITERAL_IGNORE
+ NEGATE
+ RANGE
+ REPEAT
+ REPEAT_ONE
+ SUBPATTERN
+ MIN_REPEAT_ONE
+ RANGE_IGNORE
-FAILURE = "failure"
-SUCCESS = "success"
-
-ANY = "any"
-ANY_ALL = "any_all"
-ASSERT = "assert"
-ASSERT_NOT = "assert_not"
-AT = "at"
-BIGCHARSET = "bigcharset"
-BRANCH = "branch"
-CALL = "call"
-CATEGORY = "category"
-CHARSET = "charset"
-GROUPREF = "groupref"
-GROUPREF_IGNORE = "groupref_ignore"
-GROUPREF_EXISTS = "groupref_exists"
-IN = "in"
-IN_IGNORE = "in_ignore"
-INFO = "info"
-JUMP = "jump"
-LITERAL = "literal"
-LITERAL_IGNORE = "literal_ignore"
-MARK = "mark"
-MAX_REPEAT = "max_repeat"
-MAX_UNTIL = "max_until"
-MIN_REPEAT = "min_repeat"
-MIN_UNTIL = "min_until"
-NEGATE = "negate"
-NOT_LITERAL = "not_literal"
-NOT_LITERAL_IGNORE = "not_literal_ignore"
-RANGE = "range"
-REPEAT = "repeat"
-REPEAT_ONE = "repeat_one"
-SUBPATTERN = "subpattern"
-MIN_REPEAT_ONE = "min_repeat_one"
+ MIN_REPEAT MAX_REPEAT
+""")
+del OPCODES[-2:] # remove MIN_REPEAT and MAX_REPEAT
# positions
-AT_BEGINNING = "at_beginning"
-AT_BEGINNING_LINE = "at_beginning_line"
-AT_BEGINNING_STRING = "at_beginning_string"
-AT_BOUNDARY = "at_boundary"
-AT_NON_BOUNDARY = "at_non_boundary"
-AT_END = "at_end"
-AT_END_LINE = "at_end_line"
-AT_END_STRING = "at_end_string"
-AT_LOC_BOUNDARY = "at_loc_boundary"
-AT_LOC_NON_BOUNDARY = "at_loc_non_boundary"
-AT_UNI_BOUNDARY = "at_uni_boundary"
-AT_UNI_NON_BOUNDARY = "at_uni_non_boundary"
+ATCODES = _makecodes("""
+ AT_BEGINNING AT_BEGINNING_LINE AT_BEGINNING_STRING
+ AT_BOUNDARY AT_NON_BOUNDARY
+ AT_END AT_END_LINE AT_END_STRING
+ AT_LOC_BOUNDARY AT_LOC_NON_BOUNDARY
+ AT_UNI_BOUNDARY AT_UNI_NON_BOUNDARY
+""")
# categories
-CATEGORY_DIGIT = "category_digit"
-CATEGORY_NOT_DIGIT = "category_not_digit"
-CATEGORY_SPACE = "category_space"
-CATEGORY_NOT_SPACE = "category_not_space"
-CATEGORY_WORD = "category_word"
-CATEGORY_NOT_WORD = "category_not_word"
-CATEGORY_LINEBREAK = "category_linebreak"
-CATEGORY_NOT_LINEBREAK = "category_not_linebreak"
-CATEGORY_LOC_WORD = "category_loc_word"
-CATEGORY_LOC_NOT_WORD = "category_loc_not_word"
-CATEGORY_UNI_DIGIT = "category_uni_digit"
-CATEGORY_UNI_NOT_DIGIT = "category_uni_not_digit"
-CATEGORY_UNI_SPACE = "category_uni_space"
-CATEGORY_UNI_NOT_SPACE = "category_uni_not_space"
-CATEGORY_UNI_WORD = "category_uni_word"
-CATEGORY_UNI_NOT_WORD = "category_uni_not_word"
-CATEGORY_UNI_LINEBREAK = "category_uni_linebreak"
-CATEGORY_UNI_NOT_LINEBREAK = "category_uni_not_linebreak"
-
-OPCODES = [
-
- # failure=0 success=1 (just because it looks better that way :-)
- FAILURE, SUCCESS,
-
- ANY, ANY_ALL,
- ASSERT, ASSERT_NOT,
- AT,
- BRANCH,
- CALL,
- CATEGORY,
- CHARSET, BIGCHARSET,
- GROUPREF, GROUPREF_EXISTS, GROUPREF_IGNORE,
- IN, IN_IGNORE,
- INFO,
- JUMP,
- LITERAL, LITERAL_IGNORE,
- MARK,
- MAX_UNTIL,
- MIN_UNTIL,
- NOT_LITERAL, NOT_LITERAL_IGNORE,
- NEGATE,
- RANGE,
- REPEAT,
- REPEAT_ONE,
- SUBPATTERN,
- MIN_REPEAT_ONE
+CHCODES = _makecodes("""
+ CATEGORY_DIGIT CATEGORY_NOT_DIGIT
+ CATEGORY_SPACE CATEGORY_NOT_SPACE
+ CATEGORY_WORD CATEGORY_NOT_WORD
+ CATEGORY_LINEBREAK CATEGORY_NOT_LINEBREAK
+ CATEGORY_LOC_WORD CATEGORY_LOC_NOT_WORD
+ CATEGORY_UNI_DIGIT CATEGORY_UNI_NOT_DIGIT
+ CATEGORY_UNI_SPACE CATEGORY_UNI_NOT_SPACE
+ CATEGORY_UNI_WORD CATEGORY_UNI_NOT_WORD
+ CATEGORY_UNI_LINEBREAK CATEGORY_UNI_NOT_LINEBREAK
+""")
-]
-
-ATCODES = [
- AT_BEGINNING, AT_BEGINNING_LINE, AT_BEGINNING_STRING, AT_BOUNDARY,
- AT_NON_BOUNDARY, AT_END, AT_END_LINE, AT_END_STRING,
- AT_LOC_BOUNDARY, AT_LOC_NON_BOUNDARY, AT_UNI_BOUNDARY,
- AT_UNI_NON_BOUNDARY
-]
-
-CHCODES = [
- CATEGORY_DIGIT, CATEGORY_NOT_DIGIT, CATEGORY_SPACE,
- CATEGORY_NOT_SPACE, CATEGORY_WORD, CATEGORY_NOT_WORD,
- CATEGORY_LINEBREAK, CATEGORY_NOT_LINEBREAK, CATEGORY_LOC_WORD,
- CATEGORY_LOC_NOT_WORD, CATEGORY_UNI_DIGIT, CATEGORY_UNI_NOT_DIGIT,
- CATEGORY_UNI_SPACE, CATEGORY_UNI_NOT_SPACE, CATEGORY_UNI_WORD,
- CATEGORY_UNI_NOT_WORD, CATEGORY_UNI_LINEBREAK,
- CATEGORY_UNI_NOT_LINEBREAK
-]
-
-def makedict(list):
- d = {}
- i = 0
- for item in list:
- d[item] = i
- i = i + 1
- return d
-
-OPCODES = makedict(OPCODES)
-ATCODES = makedict(ATCODES)
-CHCODES = makedict(CHCODES)
# replacement operations for "ignore case" mode
OP_IGNORE = {
GROUPREF: GROUPREF_IGNORE,
IN: IN_IGNORE,
LITERAL: LITERAL_IGNORE,
- NOT_LITERAL: NOT_LITERAL_IGNORE
+ NOT_LITERAL: NOT_LITERAL_IGNORE,
+ RANGE: RANGE_IGNORE,
}
AT_MULTILINE = {
@@ -217,11 +179,11 @@ SRE_INFO_CHARSET = 4 # pattern starts with character from given set
if __name__ == "__main__":
def dump(f, d, prefix):
- items = sorted(d.items(), key=lambda a: a[1])
- for k, v in items:
- f.write("#define %s_%s %s\n" % (prefix, k.upper(), v))
- f = open("sre_constants.h", "w")
- f.write("""\
+ items = sorted(d)
+ for item in items:
+ f.write("#define %s_%s %d\n" % (prefix, item, item))
+ with open("sre_constants.h", "w") as f:
+ f.write("""\
/*
* Secret Labs' Regular Expression Engine
*
@@ -237,25 +199,24 @@ if __name__ == "__main__":
""")
- f.write("#define SRE_MAGIC %d\n" % MAGIC)
+ f.write("#define SRE_MAGIC %d\n" % MAGIC)
- dump(f, OPCODES, "SRE_OP")
- dump(f, ATCODES, "SRE")
- dump(f, CHCODES, "SRE")
+ dump(f, OPCODES, "SRE_OP")
+ dump(f, ATCODES, "SRE")
+ dump(f, CHCODES, "SRE")
- f.write("#define SRE_FLAG_TEMPLATE %d\n" % SRE_FLAG_TEMPLATE)
- f.write("#define SRE_FLAG_IGNORECASE %d\n" % SRE_FLAG_IGNORECASE)
- f.write("#define SRE_FLAG_LOCALE %d\n" % SRE_FLAG_LOCALE)
- f.write("#define SRE_FLAG_MULTILINE %d\n" % SRE_FLAG_MULTILINE)
- f.write("#define SRE_FLAG_DOTALL %d\n" % SRE_FLAG_DOTALL)
- f.write("#define SRE_FLAG_UNICODE %d\n" % SRE_FLAG_UNICODE)
- f.write("#define SRE_FLAG_VERBOSE %d\n" % SRE_FLAG_VERBOSE)
- f.write("#define SRE_FLAG_DEBUG %d\n" % SRE_FLAG_DEBUG)
- f.write("#define SRE_FLAG_ASCII %d\n" % SRE_FLAG_ASCII)
+ f.write("#define SRE_FLAG_TEMPLATE %d\n" % SRE_FLAG_TEMPLATE)
+ f.write("#define SRE_FLAG_IGNORECASE %d\n" % SRE_FLAG_IGNORECASE)
+ f.write("#define SRE_FLAG_LOCALE %d\n" % SRE_FLAG_LOCALE)
+ f.write("#define SRE_FLAG_MULTILINE %d\n" % SRE_FLAG_MULTILINE)
+ f.write("#define SRE_FLAG_DOTALL %d\n" % SRE_FLAG_DOTALL)
+ f.write("#define SRE_FLAG_UNICODE %d\n" % SRE_FLAG_UNICODE)
+ f.write("#define SRE_FLAG_VERBOSE %d\n" % SRE_FLAG_VERBOSE)
+ f.write("#define SRE_FLAG_DEBUG %d\n" % SRE_FLAG_DEBUG)
+ f.write("#define SRE_FLAG_ASCII %d\n" % SRE_FLAG_ASCII)
- f.write("#define SRE_INFO_PREFIX %d\n" % SRE_INFO_PREFIX)
- f.write("#define SRE_INFO_LITERAL %d\n" % SRE_INFO_LITERAL)
- f.write("#define SRE_INFO_CHARSET %d\n" % SRE_INFO_CHARSET)
+ f.write("#define SRE_INFO_PREFIX %d\n" % SRE_INFO_PREFIX)
+ f.write("#define SRE_INFO_LITERAL %d\n" % SRE_INFO_LITERAL)
+ f.write("#define SRE_INFO_CHARSET %d\n" % SRE_INFO_CHARSET)
- f.close()
print("done")
diff --git a/Lib/sre_parse.py b/Lib/sre_parse.py
index df1e6437c7..4ff50d1006 100644
--- a/Lib/sre_parse.py
+++ b/Lib/sre_parse.py
@@ -13,17 +13,20 @@
# XXX: show string offset and offending character for all errors
from sre_constants import *
-from _sre import MAXREPEAT
SPECIAL_CHARS = ".\\[{()*+?^$|"
REPEAT_CHARS = "*+?{"
-DIGITS = set("0123456789")
+DIGITS = frozenset("0123456789")
-OCTDIGITS = set("01234567")
-HEXDIGITS = set("0123456789abcdefABCDEF")
+OCTDIGITS = frozenset("01234567")
+HEXDIGITS = frozenset("0123456789abcdefABCDEF")
+ASCIILETTERS = frozenset("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
-WHITESPACE = set(" \t\n\r\v\f")
+WHITESPACE = frozenset(" \t\n\r\v\f")
+
+_REPEATCODES = frozenset({MIN_REPEAT, MAX_REPEAT})
+_UNITCODES = frozenset({ANY, RANGE, IN, LITERAL, NOT_LITERAL, CATEGORY})
ESCAPES = {
r"\a": (LITERAL, ord("\a")),
@@ -66,26 +69,36 @@ class Pattern:
# master pattern object. keeps track of global attributes
def __init__(self):
self.flags = 0
- self.open = []
- self.groups = 1
self.groupdict = {}
- self.lookbehind = 0
-
+ self.groupwidths = [None] # group 0
+ self.lookbehindgroups = None
+ @property
+ def groups(self):
+ return len(self.groupwidths)
def opengroup(self, name=None):
gid = self.groups
- self.groups = gid + 1
+ self.groupwidths.append(None)
+ if self.groups > MAXGROUPS:
+ raise error("too many groups")
if name is not None:
ogid = self.groupdict.get(name, None)
if ogid is not None:
- raise error("redefinition of group name %s as group %d; "
- "was group %d" % (repr(name), gid, ogid))
+ raise error("redefinition of group name %r as group %d; "
+ "was group %d" % (name, gid, ogid))
self.groupdict[name] = gid
- self.open.append(gid)
return gid
- def closegroup(self, gid):
- self.open.remove(gid)
+ def closegroup(self, gid, p):
+ self.groupwidths[gid] = p.getwidth()
def checkgroup(self, gid):
- return gid < self.groups and gid not in self.open
+ return gid < self.groups and self.groupwidths[gid] is not None
+
+ def checklookbehindgroup(self, gid, source):
+ if self.lookbehindgroups is not None:
+ if not self.checkgroup(gid):
+ raise source.error('cannot refer to an open group')
+ if gid >= self.lookbehindgroups:
+ raise source.error('cannot refer to group defined in the same '
+ 'lookbehind subpattern')
class SubPattern:
# a subpattern, in intermediate form
@@ -99,24 +112,24 @@ class SubPattern:
nl = True
seqtypes = (tuple, list)
for op, av in self.data:
- print(level*" " + op, end='')
- if op == IN:
+ print(level*" " + str(op), end='')
+ if op is IN:
# member sublanguage
print()
for op, a in av:
- print((level+1)*" " + op, a)
- elif op == BRANCH:
+ print((level+1)*" " + str(op), a)
+ elif op is BRANCH:
print()
for i, a in enumerate(av[1]):
if i:
- print(level*" " + "or")
+ print(level*" " + "OR")
a.dump(level+1)
- elif op == GROUPREF_EXISTS:
+ elif op is GROUPREF_EXISTS:
condgroup, item_yes, item_no = av
print('', condgroup)
item_yes.dump(level+1)
if item_no:
- print(level*" " + "else")
+ print(level*" " + "ELSE")
item_no.dump(level+1)
elif isinstance(av, seqtypes):
nl = False
@@ -153,11 +166,9 @@ class SubPattern:
self.data.append(code)
def getwidth(self):
# determine the width (min, max) for this subpattern
- if self.width:
+ if self.width is not None:
return self.width
lo = hi = 0
- UNITCODES = (ANY, RANGE, IN, LITERAL, NOT_LITERAL, CATEGORY)
- REPEATCODES = (MIN_REPEAT, MAX_REPEAT)
for op, av in self.data:
if op is BRANCH:
i = MAXREPEAT - 1
@@ -176,14 +187,28 @@ class SubPattern:
i, j = av[1].getwidth()
lo = lo + i
hi = hi + j
- elif op in REPEATCODES:
+ elif op in _REPEATCODES:
i, j = av[2].getwidth()
lo = lo + i * av[0]
hi = hi + j * av[1]
- elif op in UNITCODES:
+ elif op in _UNITCODES:
lo = lo + 1
hi = hi + 1
- elif op == SUCCESS:
+ elif op is GROUPREF:
+ i, j = self.pattern.groupwidths[av]
+ lo = lo + i
+ hi = hi + j
+ elif op is GROUPREF_EXISTS:
+ i, j = av[1].getwidth()
+ if av[2] is not None:
+ l, h = av[2].getwidth()
+ i = min(i, l)
+ j = max(j, h)
+ else:
+ i = 0
+ lo = lo + i
+ hi = hi + j
+ elif op is SUCCESS:
break
self.width = min(lo, MAXREPEAT - 1), min(hi, MAXREPEAT)
return self.width
@@ -192,33 +217,33 @@ class Tokenizer:
def __init__(self, string):
self.istext = isinstance(string, str)
self.string = string
+ if not self.istext:
+ string = str(string, 'latin1')
+ self.decoded_string = string
self.index = 0
+ self.next = None
self.__next()
def __next(self):
- if self.index >= len(self.string):
+ index = self.index
+ try:
+ char = self.decoded_string[index]
+ except IndexError:
self.next = None
return
- char = self.string[self.index:self.index+1]
- # Special case for the str8, since indexing returns a integer
- # XXX This is only needed for test_bug_926075 in test_re.py
- if char and not self.istext:
- char = chr(char[0])
if char == "\\":
+ index += 1
try:
- c = self.string[self.index + 1]
+ char += self.decoded_string[index]
except IndexError:
- raise error("bogus escape (end of line)")
- if not self.istext:
- c = chr(c)
- char = char + c
- self.index = self.index + len(char)
+ raise error("bad escape (end of pattern)",
+ self.string, len(self.string) - 1) from None
+ self.index = index + 1
self.next = char
- def match(self, char, skip=1):
+ def match(self, char):
if char == self.next:
- if skip:
- self.__next()
- return 1
- return 0
+ self.__next()
+ return True
+ return False
def get(self):
this = self.next
self.__next()
@@ -232,10 +257,30 @@ class Tokenizer:
result += c
self.__next()
return result
+ def getuntil(self, terminator):
+ result = ''
+ while True:
+ c = self.next
+ self.__next()
+ if c is None:
+ if not result:
+ raise self.error("missing group name")
+ raise self.error("missing %s, unterminated name" % terminator,
+ len(result))
+ if c == terminator:
+ if not result:
+ raise self.error("missing group name", 1)
+ break
+ result += c
+ return result
def tell(self):
- return self.index, self.next
+ return self.index - len(self.next or '')
def seek(self, index):
- self.index, self.next = index
+ self.index = index
+ self.__next()
+
+ def error(self, msg, offset=0):
+ return error(msg, self.string, self.tell() - offset)
# The following three functions are not used in this module anymore, but we keep
# them here (with DeprecationWarnings) for backwards compatibility.
@@ -270,7 +315,7 @@ def _class_escape(source, escape):
if code:
return code
code = CATEGORIES.get(escape)
- if code and code[0] == IN:
+ if code and code[0] is IN:
return code
try:
c = escape[1:2]
@@ -278,33 +323,41 @@ def _class_escape(source, escape):
# hexadecimal escape (exactly two digits)
escape += source.getwhile(2, HEXDIGITS)
if len(escape) != 4:
- raise ValueError
- return LITERAL, int(escape[2:], 16) & 0xff
+ raise source.error("incomplete escape %s" % escape, len(escape))
+ return LITERAL, int(escape[2:], 16)
elif c == "u" and source.istext:
# unicode escape (exactly four digits)
escape += source.getwhile(4, HEXDIGITS)
if len(escape) != 6:
- raise ValueError
+ raise source.error("incomplete escape %s" % escape, len(escape))
return LITERAL, int(escape[2:], 16)
elif c == "U" and source.istext:
# unicode escape (exactly eight digits)
escape += source.getwhile(8, HEXDIGITS)
if len(escape) != 10:
- raise ValueError
+ raise source.error("incomplete escape %s" % escape, len(escape))
c = int(escape[2:], 16)
chr(c) # raise ValueError for invalid code
return LITERAL, c
elif c in OCTDIGITS:
# octal escape (up to three digits)
escape += source.getwhile(2, OCTDIGITS)
- return LITERAL, int(escape[1:], 8) & 0xff
+ c = int(escape[1:], 8)
+ if c > 0o377:
+ raise source.error('octal escape value %s outside of '
+ 'range 0-0o377' % escape, len(escape))
+ return LITERAL, c
elif c in DIGITS:
raise ValueError
if len(escape) == 2:
+ if c in ASCIILETTERS:
+ import warnings
+ warnings.warn('bad escape %s' % escape,
+ DeprecationWarning, stacklevel=8)
return LITERAL, ord(escape[1])
except ValueError:
pass
- raise error("bogus escape: %s" % repr(escape))
+ raise source.error("bad escape %s" % escape, len(escape))
def _escape(source, escape, state):
# handle escape code in expression
@@ -320,69 +373,70 @@ def _escape(source, escape, state):
# hexadecimal escape
escape += source.getwhile(2, HEXDIGITS)
if len(escape) != 4:
- raise ValueError
- return LITERAL, int(escape[2:], 16) & 0xff
+ raise source.error("incomplete escape %s" % escape, len(escape))
+ return LITERAL, int(escape[2:], 16)
elif c == "u" and source.istext:
# unicode escape (exactly four digits)
escape += source.getwhile(4, HEXDIGITS)
if len(escape) != 6:
- raise ValueError
+ raise source.error("incomplete escape %s" % escape, len(escape))
return LITERAL, int(escape[2:], 16)
elif c == "U" and source.istext:
# unicode escape (exactly eight digits)
escape += source.getwhile(8, HEXDIGITS)
if len(escape) != 10:
- raise ValueError
+ raise source.error("incomplete escape %s" % escape, len(escape))
c = int(escape[2:], 16)
chr(c) # raise ValueError for invalid code
return LITERAL, c
elif c == "0":
# octal escape
escape += source.getwhile(2, OCTDIGITS)
- return LITERAL, int(escape[1:], 8) & 0xff
+ return LITERAL, int(escape[1:], 8)
elif c in DIGITS:
# octal escape *or* decimal group reference (sigh)
if source.next in DIGITS:
- escape = escape + source.get()
+ escape += source.get()
if (escape[1] in OCTDIGITS and escape[2] in OCTDIGITS and
source.next in OCTDIGITS):
# got three octal digits; this is an octal escape
- escape = escape + source.get()
- return LITERAL, int(escape[1:], 8) & 0xff
+ escape += source.get()
+ c = int(escape[1:], 8)
+ if c > 0o377:
+ raise source.error('octal escape value %s outside of '
+ 'range 0-0o377' % escape,
+ len(escape))
+ return LITERAL, c
# not an octal escape, so this is a group reference
group = int(escape[1:])
if group < state.groups:
if not state.checkgroup(group):
- raise error("cannot refer to open group")
- if state.lookbehind:
- import warnings
- warnings.warn('group references in lookbehind '
- 'assertions are not supported',
- RuntimeWarning)
+ raise source.error("cannot refer to an open group",
+ len(escape))
+ state.checklookbehindgroup(group, source)
return GROUPREF, group
- raise ValueError
+ raise source.error("invalid group reference", len(escape))
if len(escape) == 2:
+ if c in ASCIILETTERS:
+ import warnings
+ warnings.warn('bad escape %s' % escape,
+ DeprecationWarning, stacklevel=8)
return LITERAL, ord(escape[1])
except ValueError:
pass
- raise error("bogus escape: %s" % repr(escape))
+ raise source.error("bad escape %s" % escape, len(escape))
-def _parse_sub(source, state, nested=1):
+def _parse_sub(source, state, nested=True):
# parse an alternation: a|b|c
items = []
itemsappend = items.append
sourcematch = source.match
- while 1:
+ start = source.tell()
+ while True:
itemsappend(_parse(source, state))
- if sourcematch("|"):
- continue
- if not nested:
- break
- if not source.next or sourcematch(")", 0):
+ if not sourcematch("|"):
break
- else:
- raise error("pattern not properly closed")
if len(items) == 1:
return items[0]
@@ -391,7 +445,7 @@ def _parse_sub(source, state, nested=1):
subpatternappend = subpattern.append
# check if all items share a common prefix
- while 1:
+ while True:
prefix = None
for item in items:
if not item:
@@ -411,16 +465,12 @@ def _parse_sub(source, state, nested=1):
# check if the branch can be replaced by a character set
for item in items:
- if len(item) != 1 or item[0][0] != LITERAL:
+ if len(item) != 1 or item[0][0] is not LITERAL:
break
else:
# we can store this as a character set instead of a
# branch (the compiler may optimize this even more)
- set = []
- setappend = set.append
- for item in items:
- setappend(item[0])
- subpatternappend((IN, set))
+ subpatternappend((IN, [item[0] for item in items]))
return subpattern
subpattern.append((BRANCH, (None, items)))
@@ -430,21 +480,14 @@ def _parse_sub_cond(source, state, condgroup):
item_yes = _parse(source, state)
if source.match("|"):
item_no = _parse(source, state)
- if source.match("|"):
- raise error("conditional backref with more than two branches")
+ if source.next == "|":
+ raise source.error("conditional backref with more than two branches")
else:
item_no = None
- if source.next and not source.match(")", 0):
- raise error("pattern not properly closed")
subpattern = SubPattern(state)
subpattern.append((GROUPREF_EXISTS, (condgroup, item_yes, item_no)))
return subpattern
-_PATTERNENDERS = set("|)")
-_ASSERTCHARS = set("=!<")
-_LOOKBEHINDASSERTCHARS = set("=!")
-_REPEATCODES = set([MIN_REPEAT, MAX_REPEAT])
-
def _parse(source, state):
# parse a simple pattern
subpattern = SubPattern(state)
@@ -454,34 +497,38 @@ def _parse(source, state):
sourceget = source.get
sourcematch = source.match
_len = len
- PATTERNENDERS = _PATTERNENDERS
- ASSERTCHARS = _ASSERTCHARS
- LOOKBEHINDASSERTCHARS = _LOOKBEHINDASSERTCHARS
- REPEATCODES = _REPEATCODES
+ _ord = ord
+ verbose = state.flags & SRE_FLAG_VERBOSE
- while 1:
+ while True:
- if source.next in PATTERNENDERS:
- break # end of subpattern
- this = sourceget()
+ this = source.next
if this is None:
break # end of pattern
+ if this in "|)":
+ break # end of subpattern
+ sourceget()
- if state.flags & SRE_FLAG_VERBOSE:
+ if verbose:
# skip whitespace and comments
if this in WHITESPACE:
continue
if this == "#":
- while 1:
+ while True:
this = sourceget()
- if this in (None, "\n"):
+ if this is None or this == "\n":
break
continue
- if this and this[0] not in SPECIAL_CHARS:
- subpatternappend((LITERAL, ord(this)))
+ if this[0] == "\\":
+ code = _escape(source, this, state)
+ subpatternappend(code)
+
+ elif this not in SPECIAL_CHARS:
+ subpatternappend((LITERAL, _ord(this)))
elif this == "[":
+ here = source.tell() - 1
# character set
set = []
setappend = set.append
@@ -491,39 +538,42 @@ def _parse(source, state):
setappend((NEGATE, None))
# check remaining characters
start = set[:]
- while 1:
+ while True:
this = sourceget()
+ if this is None:
+ raise source.error("unterminated character set",
+ source.tell() - here)
if this == "]" and set != start:
break
- elif this and this[0] == "\\":
+ elif this[0] == "\\":
code1 = _class_escape(source, this)
- elif this:
- code1 = LITERAL, ord(this)
else:
- raise error("unexpected end of regular expression")
+ code1 = LITERAL, _ord(this)
if sourcematch("-"):
# potential range
- this = sourceget()
- if this == "]":
+ that = sourceget()
+ if that is None:
+ raise source.error("unterminated character set",
+ source.tell() - here)
+ if that == "]":
if code1[0] is IN:
code1 = code1[1][0]
setappend(code1)
- setappend((LITERAL, ord("-")))
+ setappend((LITERAL, _ord("-")))
break
- elif this:
- if this[0] == "\\":
- code2 = _class_escape(source, this)
- else:
- code2 = LITERAL, ord(this)
- if code1[0] != LITERAL or code2[0] != LITERAL:
- raise error("bad character range")
- lo = code1[1]
- hi = code2[1]
- if hi < lo:
- raise error("bad character range")
- setappend((RANGE, (lo, hi)))
+ if that[0] == "\\":
+ code2 = _class_escape(source, that)
else:
- raise error("unexpected end of regular expression")
+ code2 = LITERAL, _ord(that)
+ if code1[0] != LITERAL or code2[0] != LITERAL:
+ msg = "bad character range %s-%s" % (this, that)
+ raise source.error(msg, len(this) + 1 + len(that))
+ lo = code1[1]
+ hi = code2[1]
+ if hi < lo:
+ msg = "bad character range %s-%s" % (this, that)
+ raise source.error(msg, len(this) + 1 + len(that))
+ setappend((RANGE, (lo, hi)))
else:
if code1[0] is IN:
code1 = code1[1][0]
@@ -538,8 +588,9 @@ def _parse(source, state):
# XXX: <fl> should add charmap optimization here
subpatternappend((IN, set))
- elif this and this[0] in REPEAT_CHARS:
+ elif this in REPEAT_CHARS:
# repeat previous item
+ here = source.tell()
if this == "?":
min, max = 0, 1
elif this == "*":
@@ -549,20 +600,19 @@ def _parse(source, state):
min, max = 1, MAXREPEAT
elif this == "{":
if source.next == "}":
- subpatternappend((LITERAL, ord(this)))
+ subpatternappend((LITERAL, _ord(this)))
continue
- here = source.tell()
min, max = 0, MAXREPEAT
lo = hi = ""
while source.next in DIGITS:
- lo = lo + source.get()
+ lo += sourceget()
if sourcematch(","):
while source.next in DIGITS:
- hi = hi + sourceget()
+ hi += sourceget()
else:
hi = lo
if not sourcematch("}"):
- subpatternappend((LITERAL, ord(this)))
+ subpatternappend((LITERAL, _ord(this)))
source.seek(here)
continue
if lo:
@@ -574,18 +624,21 @@ def _parse(source, state):
if max >= MAXREPEAT:
raise OverflowError("the repetition number is too large")
if max < min:
- raise error("bad repeat interval")
+ raise source.error("min repeat greater than max repeat",
+ source.tell() - here)
else:
- raise error("not supported")
+ raise AssertionError("unsupported quantifier %r" % (char,))
# figure out which item to repeat
if subpattern:
item = subpattern[-1:]
else:
item = None
- if not item or (_len(item) == 1 and item[0][0] == AT):
- raise error("nothing to repeat")
- if item[0][0] in REPEATCODES:
- raise error("multiple repeat")
+ if not item or (_len(item) == 1 and item[0][0] is AT):
+ raise source.error("nothing to repeat",
+ source.tell() - here + len(this))
+ if item[0][0] in _REPEATCODES:
+ raise source.error("multiple repeat",
+ source.tell() - here + len(this))
if sourcematch("?"):
subpattern[-1] = (MIN_REPEAT, (min, max, item))
else:
@@ -595,150 +648,140 @@ def _parse(source, state):
subpatternappend((ANY, None))
elif this == "(":
- group = 1
+ start = source.tell() - 1
+ group = True
name = None
condgroup = None
if sourcematch("?"):
- group = 0
# options
- if sourcematch("P"):
+ char = sourceget()
+ if char is None:
+ raise source.error("unexpected end of pattern")
+ if char == "P":
# python extensions
if sourcematch("<"):
# named group: skip forward to end of name
- name = ""
- while 1:
- char = sourceget()
- if char is None:
- raise error("unterminated name")
- if char == ">":
- break
- name = name + char
- group = 1
- if not name:
- raise error("missing group name")
+ name = source.getuntil(">")
if not name.isidentifier():
- raise error("bad character in group name %r" % name)
+ msg = "bad character in group name %r" % name
+ raise source.error(msg, len(name) + 1)
elif sourcematch("="):
# named backreference
- name = ""
- while 1:
- char = sourceget()
- if char is None:
- raise error("unterminated name")
- if char == ")":
- break
- name = name + char
- if not name:
- raise error("missing group name")
+ name = source.getuntil(")")
if not name.isidentifier():
- raise error("bad character in backref group name "
- "%r" % name)
+ msg = "bad character in group name %r" % name
+ raise source.error(msg, len(name) + 1)
gid = state.groupdict.get(name)
if gid is None:
- msg = "unknown group name: {0!r}".format(name)
- raise error(msg)
- if state.lookbehind:
- import warnings
- warnings.warn('group references in lookbehind '
- 'assertions are not supported',
- RuntimeWarning)
+ msg = "unknown group name %r" % name
+ raise source.error(msg, len(name) + 1)
+ if not state.checkgroup(gid):
+ raise source.error("cannot refer to an open group",
+ len(name) + 1)
+ state.checklookbehindgroup(gid, source)
subpatternappend((GROUPREF, gid))
continue
else:
char = sourceget()
if char is None:
- raise error("unexpected end of pattern")
- raise error("unknown specifier: ?P%s" % char)
- elif sourcematch(":"):
+ raise source.error("unexpected end of pattern")
+ raise source.error("unknown extension ?P" + char,
+ len(char) + 2)
+ elif char == ":":
# non-capturing group
- group = 2
- elif sourcematch("#"):
+ group = None
+ elif char == "#":
# comment
- while 1:
- if source.next is None or source.next == ")":
+ while True:
+ if source.next is None:
+ raise source.error("missing ), unterminated comment",
+ source.tell() - start)
+ if sourceget() == ")":
break
- sourceget()
- if not sourcematch(")"):
- raise error("unbalanced parenthesis")
continue
- elif source.next in ASSERTCHARS:
+ elif char in "=!<":
# lookahead assertions
- char = sourceget()
dir = 1
if char == "<":
- if source.next not in LOOKBEHINDASSERTCHARS:
- raise error("syntax error")
- dir = -1 # lookbehind
char = sourceget()
- state.lookbehind += 1
+ if char is None:
+ raise source.error("unexpected end of pattern")
+ if char not in "=!":
+ raise source.error("unknown extension ?<" + char,
+ len(char) + 2)
+ dir = -1 # lookbehind
+ lookbehindgroups = state.lookbehindgroups
+ if lookbehindgroups is None:
+ state.lookbehindgroups = state.groups
p = _parse_sub(source, state)
if dir < 0:
- state.lookbehind -= 1
+ if lookbehindgroups is None:
+ state.lookbehindgroups = None
if not sourcematch(")"):
- raise error("unbalanced parenthesis")
+ raise source.error("missing ), unterminated subpattern",
+ source.tell() - start)
if char == "=":
subpatternappend((ASSERT, (dir, p)))
else:
subpatternappend((ASSERT_NOT, (dir, p)))
continue
- elif sourcematch("("):
+ elif char == "(":
# conditional backreference group
- condname = ""
- while 1:
- char = sourceget()
- if char is None:
- raise error("unterminated name")
- if char == ")":
- break
- condname = condname + char
- group = 2
- if not condname:
- raise error("missing group name")
+ condname = source.getuntil(")")
+ group = None
if condname.isidentifier():
condgroup = state.groupdict.get(condname)
if condgroup is None:
- msg = "unknown group name: {0!r}".format(condname)
- raise error(msg)
+ msg = "unknown group name %r" % condname
+ raise source.error(msg, len(condname) + 1)
else:
try:
condgroup = int(condname)
+ if condgroup < 0:
+ raise ValueError
except ValueError:
- raise error("bad character in group name")
- if state.lookbehind:
- import warnings
- warnings.warn('group references in lookbehind '
- 'assertions are not supported',
- RuntimeWarning)
- else:
+ msg = "bad character in group name %r" % condname
+ raise source.error(msg, len(condname) + 1) from None
+ if not condgroup:
+ raise source.error("bad group number",
+ len(condname) + 1)
+ if condgroup >= MAXGROUPS:
+ raise source.error("invalid group reference",
+ len(condname) + 1)
+ state.checklookbehindgroup(condgroup, source)
+ elif char in FLAGS:
# flags
- if not source.next in FLAGS:
- raise error("unexpected end of pattern")
- while source.next in FLAGS:
- state.flags = state.flags | FLAGS[sourceget()]
- if group:
- # parse group contents
- if group == 2:
- # anonymous group
- group = None
+ while True:
+ state.flags |= FLAGS[char]
+ char = sourceget()
+ if char is None:
+ raise source.error("missing )")
+ if char == ")":
+ break
+ if char not in FLAGS:
+ raise source.error("unknown flag", len(char))
+ verbose = state.flags & SRE_FLAG_VERBOSE
+ continue
else:
+ raise source.error("unknown extension ?" + char,
+ len(char) + 1)
+
+ # parse group contents
+ if group is not None:
+ try:
group = state.opengroup(name)
- if condgroup:
- p = _parse_sub_cond(source, state, condgroup)
- else:
- p = _parse_sub(source, state)
- if not sourcematch(")"):
- raise error("unbalanced parenthesis")
- if group is not None:
- state.closegroup(group)
- subpatternappend((SUBPATTERN, (group, p)))
+ except error as err:
+ raise source.error(err.msg, len(name) + 1) from None
+ if condgroup:
+ p = _parse_sub_cond(source, state, condgroup)
else:
- while 1:
- char = sourceget()
- if char is None:
- raise error("unexpected end of pattern")
- if char == ")":
- break
- raise error("unknown extension")
+ p = _parse_sub(source, state)
+ if not source.match(")"):
+ raise source.error("missing ), unterminated subpattern",
+ source.tell() - start)
+ if group is not None:
+ state.closegroup(group, p)
+ subpatternappend((SUBPATTERN, (group, p)))
elif this == "^":
subpatternappend((AT, AT_BEGINNING))
@@ -746,25 +789,31 @@ def _parse(source, state):
elif this == "$":
subpattern.append((AT, AT_END))
- elif this and this[0] == "\\":
- code = _escape(source, this, state)
- subpatternappend(code)
-
else:
- raise error("parser error")
+ raise AssertionError("unsupported special character %r" % (char,))
return subpattern
def fix_flags(src, flags):
# Check and fix flags according to the type of pattern (str or bytes)
if isinstance(src, str):
+ if flags & SRE_FLAG_LOCALE:
+ import warnings
+ warnings.warn("LOCALE flag with a str pattern is deprecated. "
+ "Will be an error in 3.6",
+ DeprecationWarning, stacklevel=6)
if not flags & SRE_FLAG_ASCII:
flags |= SRE_FLAG_UNICODE
elif flags & SRE_FLAG_UNICODE:
raise ValueError("ASCII and UNICODE flags are incompatible")
else:
if flags & SRE_FLAG_UNICODE:
- raise ValueError("can't use UNICODE flag with a bytes pattern")
+ raise ValueError("cannot use UNICODE flag with a bytes pattern")
+ if flags & SRE_FLAG_LOCALE and flags & SRE_FLAG_ASCII:
+ import warnings
+ warnings.warn("ASCII and LOCALE flags are incompatible. "
+ "Will be an error in 3.6",
+ DeprecationWarning, stacklevel=6)
return flags
def parse(str, flags=0, pattern=None):
@@ -780,20 +829,18 @@ def parse(str, flags=0, pattern=None):
p = _parse_sub(source, pattern, 0)
p.pattern.flags = fix_flags(str, p.pattern.flags)
- tail = source.get()
- if tail == ")":
- raise error("unbalanced parenthesis")
- elif tail:
- raise error("bogus characters at end of regular expression")
-
- if flags & SRE_FLAG_DEBUG:
- p.dump()
+ if source.next is not None:
+ assert source.next == ")"
+ raise source.error("unbalanced parenthesis")
if not (flags & SRE_FLAG_VERBOSE) and p.pattern.flags & SRE_FLAG_VERBOSE:
# the VERBOSE flag was switched on inside the pattern. to be
# on the safe side, we'll parse the whole thing again...
return parse(str, p.pattern.flags)
+ if flags & SRE_FLAG_DEBUG:
+ p.dump()
+
return p
def parse_template(source, pattern):
@@ -811,6 +858,7 @@ def parse_template(source, pattern):
del literal[:]
groups.append((len(literals), index))
literals.append(None)
+ groupindex = pattern.groupindex
while True:
this = sget()
if this is None:
@@ -820,28 +868,25 @@ def parse_template(source, pattern):
c = this[1]
if c == "g":
name = ""
- if s.match("<"):
- while True:
- char = sget()
- if char is None:
- raise error("unterminated group name")
- if char == ">":
- break
- name += char
- if not name:
- raise error("missing group name")
- try:
- index = int(name)
- if index < 0:
- raise error("negative group number")
- except ValueError:
- if not name.isidentifier():
- raise error("bad character in group name")
+ if not s.match("<"):
+ raise s.error("missing <")
+ name = s.getuntil(">")
+ if name.isidentifier():
try:
- index = pattern.groupindex[name]
+ index = groupindex[name]
except KeyError:
- msg = "unknown group name: {0!r}".format(name)
- raise IndexError(msg)
+ raise IndexError("unknown group name %r" % name)
+ else:
+ try:
+ index = int(name)
+ if index < 0:
+ raise ValueError
+ except ValueError:
+ raise s.error("bad character in group name %r" % name,
+ len(name) + 1) from None
+ if index >= MAXGROUPS:
+ raise s.error("invalid group reference",
+ len(name) + 1)
addgroup(index)
elif c == "0":
if s.next in OCTDIGITS:
@@ -857,14 +902,21 @@ def parse_template(source, pattern):
s.next in OCTDIGITS):
this += sget()
isoctal = True
- lappend(chr(int(this[1:], 8) & 0xff))
+ c = int(this[1:], 8)
+ if c > 0o377:
+ raise s.error('octal escape value %s outside of '
+ 'range 0-0o377' % this, len(this))
+ lappend(chr(c))
if not isoctal:
addgroup(int(this[1:]))
else:
try:
this = chr(ESCAPES[this][1])
except KeyError:
- pass
+ if c in ASCIILETTERS:
+ import warnings
+ warnings.warn('bad escape %s' % this,
+ DeprecationWarning, stacklevel=4)
lappend(this)
else:
lappend(this)
@@ -878,14 +930,12 @@ def parse_template(source, pattern):
def expand_template(template, match):
g = match.group
- sep = match.string[:0]
+ empty = match.string[:0]
groups, literals = template
literals = literals[:]
try:
for index, group in groups:
- literals[index] = s = g(group)
- if s is None:
- raise error("unmatched group")
+ literals[index] = g(group) or empty
except IndexError:
raise error("invalid group reference")
- return sep.join(literals)
+ return empty.join(literals)
diff --git a/Lib/ssl.py b/Lib/ssl.py
index ec42e38d08..3f5c3c4d07 100644
--- a/Lib/ssl.py
+++ b/Lib/ssl.py
@@ -87,17 +87,18 @@ ALERT_DESCRIPTION_BAD_CERTIFICATE_HASH_VALUE
ALERT_DESCRIPTION_UNKNOWN_PSK_IDENTITY
"""
+import ipaddress
import textwrap
import re
import sys
import os
from collections import namedtuple
-from enum import Enum as _Enum
+from enum import Enum as _Enum, IntEnum as _IntEnum
import _ssl # if we can't import it, let the error propagate
from _ssl import OPENSSL_VERSION_NUMBER, OPENSSL_VERSION_INFO, OPENSSL_VERSION
-from _ssl import _SSLContext
+from _ssl import _SSLContext, MemoryBIO
from _ssl import (
SSLError, SSLZeroReturnError, SSLWantReadError, SSLWantWriteError,
SSLSyscallError, SSLEOFError,
@@ -119,30 +120,23 @@ def _import_symbols(prefix):
_import_symbols('OP_')
_import_symbols('ALERT_DESCRIPTION_')
_import_symbols('SSL_ERROR_')
-_import_symbols('PROTOCOL_')
_import_symbols('VERIFY_')
-from _ssl import HAS_SNI, HAS_ECDH, HAS_NPN
+from _ssl import HAS_SNI, HAS_ECDH, HAS_NPN, HAS_ALPN
from _ssl import _OPENSSL_API_VERSION
+_IntEnum._convert(
+ '_SSLMethod', __name__,
+ lambda name: name.startswith('PROTOCOL_'),
+ source=_ssl)
+
+_PROTOCOL_NAMES = {value: name for name, value in _SSLMethod.__members__.items()}
-_PROTOCOL_NAMES = {value: name for name, value in globals().items() if name.startswith('PROTOCOL_')}
try:
- from _ssl import PROTOCOL_SSLv2
_SSLv2_IF_EXISTS = PROTOCOL_SSLv2
-except ImportError:
+except NameError:
_SSLv2_IF_EXISTS = None
-else:
- _PROTOCOL_NAMES[PROTOCOL_SSLv2] = "SSLv2"
-
-try:
- from _ssl import PROTOCOL_TLSv1_1, PROTOCOL_TLSv1_2
-except ImportError:
- pass
-else:
- _PROTOCOL_NAMES[PROTOCOL_TLSv1_1] = "TLSv1.1"
- _PROTOCOL_NAMES[PROTOCOL_TLSv1_2] = "TLSv1.2"
if sys.platform == "win32":
from _ssl import enum_certificates, enum_crls
@@ -151,6 +145,7 @@ from socket import socket, AF_INET, SOCK_STREAM, create_connection
from socket import SOL_SOCKET, SO_TYPE
import base64 # for DER-to-PEM translation
import errno
+import warnings
socket_error = OSError # keep that public name in module namespace
@@ -246,6 +241,17 @@ def _dnsname_match(dn, hostname, max_wildcards=1):
return pat.match(hostname)
+def _ipaddress_match(ipname, host_ip):
+ """Exact matching of IP addresses.
+
+ RFC 6125 explicitly doesn't define an algorithm for this
+ (section 1.7.2 - "Out of Scope").
+ """
+ # OpenSSL may add a trailing newline to a subjectAltName's IP address
+ ip = ipaddress.ip_address(ipname.rstrip())
+ return ip == host_ip
+
+
def match_hostname(cert, hostname):
"""Verify that *cert* (in decoded format as returned by
SSLSocket.getpeercert()) matches the *hostname*. RFC 2818 and RFC 6125
@@ -258,11 +264,20 @@ def match_hostname(cert, hostname):
raise ValueError("empty or no certificate, match_hostname needs a "
"SSL socket or SSL context with either "
"CERT_OPTIONAL or CERT_REQUIRED")
+ try:
+ host_ip = ipaddress.ip_address(hostname)
+ except ValueError:
+ # Not an IP address (common case)
+ host_ip = None
dnsnames = []
san = cert.get('subjectAltName', ())
for key, value in san:
if key == 'DNS':
- if _dnsname_match(value, hostname):
+ if host_ip is None and _dnsname_match(value, hostname):
+ return
+ dnsnames.append(value)
+ elif key == 'IP Address':
+ if host_ip is not None and _ipaddress_match(value, host_ip):
return
dnsnames.append(value)
if not dnsnames:
@@ -361,6 +376,12 @@ class SSLContext(_SSLContext):
server_hostname=server_hostname,
_context=self)
+ def wrap_bio(self, incoming, outgoing, server_side=False,
+ server_hostname=None):
+ sslobj = self._wrap_bio(incoming, outgoing, server_side=server_side,
+ server_hostname=server_hostname)
+ return SSLObject(sslobj)
+
def set_npn_protocols(self, npn_protocols):
protos = bytearray()
for protocol in npn_protocols:
@@ -372,14 +393,29 @@ class SSLContext(_SSLContext):
self._set_npn_protocols(protos)
+ def set_alpn_protocols(self, alpn_protocols):
+ protos = bytearray()
+ for protocol in alpn_protocols:
+ b = bytes(protocol, 'ascii')
+ if len(b) == 0 or len(b) > 255:
+ raise SSLError('ALPN protocols must be 1 to 255 in length')
+ protos.append(len(b))
+ protos.extend(b)
+
+ self._set_alpn_protocols(protos)
+
def _load_windows_store_certs(self, storename, purpose):
certs = bytearray()
- for cert, encoding, trust in enum_certificates(storename):
- # CA certs are never PKCS#7 encoded
- if encoding == "x509_asn":
- if trust is True or purpose.oid in trust:
- certs.extend(cert)
- self.load_verify_locations(cadata=certs)
+ try:
+ for cert, encoding, trust in enum_certificates(storename):
+ # CA certs are never PKCS#7 encoded
+ if encoding == "x509_asn":
+ if trust is True or purpose.oid in trust:
+ certs.extend(cert)
+ except PermissionError:
+ warnings.warn("unable to enumerate Windows certificate store")
+ if certs:
+ self.load_verify_locations(cadata=certs)
return certs
def load_default_certs(self, purpose=Purpose.SERVER_AUTH):
@@ -488,6 +524,141 @@ _create_default_https_context = create_default_context
_create_stdlib_context = _create_unverified_context
+class SSLObject:
+ """This class implements an interface on top of a low-level SSL object as
+ implemented by OpenSSL. This object captures the state of an SSL connection
+ but does not provide any network IO itself. IO needs to be performed
+ through separate "BIO" objects which are OpenSSL's IO abstraction layer.
+
+ This class does not have a public constructor. Instances are returned by
+ ``SSLContext.wrap_bio``. This class is typically used by framework authors
+ that want to implement asynchronous IO for SSL through memory buffers.
+
+ When compared to ``SSLSocket``, this object lacks the following features:
+
+ * Any form of network IO incluging methods such as ``recv`` and ``send``.
+ * The ``do_handshake_on_connect`` and ``suppress_ragged_eofs`` machinery.
+ """
+
+ def __init__(self, sslobj, owner=None):
+ self._sslobj = sslobj
+ # Note: _sslobj takes a weak reference to owner
+ self._sslobj.owner = owner or self
+
+ @property
+ def context(self):
+ """The SSLContext that is currently in use."""
+ return self._sslobj.context
+
+ @context.setter
+ def context(self, ctx):
+ self._sslobj.context = ctx
+
+ @property
+ def server_side(self):
+ """Whether this is a server-side socket."""
+ return self._sslobj.server_side
+
+ @property
+ def server_hostname(self):
+ """The currently set server hostname (for SNI), or ``None`` if no
+ server hostame is set."""
+ return self._sslobj.server_hostname
+
+ def read(self, len=1024, buffer=None):
+ """Read up to 'len' bytes from the SSL object and return them.
+
+ If 'buffer' is provided, read into this buffer and return the number of
+ bytes read.
+ """
+ if buffer is not None:
+ v = self._sslobj.read(len, buffer)
+ else:
+ v = self._sslobj.read(len)
+ return v
+
+ def write(self, data):
+ """Write 'data' to the SSL object and return the number of bytes
+ written.
+
+ The 'data' argument must support the buffer interface.
+ """
+ return self._sslobj.write(data)
+
+ def getpeercert(self, binary_form=False):
+ """Returns a formatted version of the data in the certificate provided
+ by the other end of the SSL channel.
+
+ Return None if no certificate was provided, {} if a certificate was
+ provided, but not validated.
+ """
+ return self._sslobj.peer_certificate(binary_form)
+
+ def selected_npn_protocol(self):
+ """Return the currently selected NPN protocol as a string, or ``None``
+ if a next protocol was not negotiated or if NPN is not supported by one
+ of the peers."""
+ if _ssl.HAS_NPN:
+ return self._sslobj.selected_npn_protocol()
+
+ def selected_alpn_protocol(self):
+ """Return the currently selected ALPN protocol as a string, or ``None``
+ if a next protocol was not negotiated or if ALPN is not supported by one
+ of the peers."""
+ if _ssl.HAS_ALPN:
+ return self._sslobj.selected_alpn_protocol()
+
+ def cipher(self):
+ """Return the currently selected cipher as a 3-tuple ``(name,
+ ssl_version, secret_bits)``."""
+ return self._sslobj.cipher()
+
+ def shared_ciphers(self):
+ """Return a list of ciphers shared by the client during the handshake or
+ None if this is not a valid server connection.
+ """
+ return self._sslobj.shared_ciphers()
+
+ def compression(self):
+ """Return the current compression algorithm in use, or ``None`` if
+ compression was not negotiated or not supported by one of the peers."""
+ return self._sslobj.compression()
+
+ def pending(self):
+ """Return the number of bytes that can be read immediately."""
+ return self._sslobj.pending()
+
+ def do_handshake(self):
+ """Start the SSL/TLS handshake."""
+ self._sslobj.do_handshake()
+ if self.context.check_hostname:
+ if not self.server_hostname:
+ raise ValueError("check_hostname needs server_hostname "
+ "argument")
+ match_hostname(self.getpeercert(), self.server_hostname)
+
+ def unwrap(self):
+ """Start the SSL shutdown handshake."""
+ return self._sslobj.shutdown()
+
+ def get_channel_binding(self, cb_type="tls-unique"):
+ """Get channel binding data for current connection. Raise ValueError
+ if the requested `cb_type` is not supported. Return bytes of the data
+ or None if the data is not available (e.g. before the handshake)."""
+ if cb_type not in CHANNEL_BINDING_TYPES:
+ raise ValueError("Unsupported channel binding type")
+ if cb_type != "tls-unique":
+ raise NotImplementedError(
+ "{0} channel binding type not implemented"
+ .format(cb_type))
+ return self._sslobj.tls_unique_cb()
+
+ def version(self):
+ """Return a string identifying the protocol version used by the
+ current SSL channel. """
+ return self._sslobj.version()
+
+
class SSLSocket(socket):
"""This class implements a subtype of socket.socket that wraps
the underlying OS socket in an SSL context when necessary, and
@@ -570,8 +741,9 @@ class SSLSocket(socket):
if connected:
# create the SSL object
try:
- self._sslobj = self._context._wrap_socket(self, server_side,
- server_hostname)
+ sslobj = self._context._wrap_socket(self, server_side,
+ server_hostname)
+ self._sslobj = SSLObject(sslobj, owner=self)
if do_handshake_on_connect:
timeout = self.gettimeout()
if timeout == 0.0:
@@ -608,7 +780,7 @@ class SSLSocket(socket):
# EAGAIN.
self.getpeername()
- def read(self, len=0, buffer=None):
+ def read(self, len=1024, buffer=None):
"""Read up to LEN bytes and return them.
Return zero-length string on EOF."""
@@ -616,11 +788,7 @@ class SSLSocket(socket):
if not self._sslobj:
raise ValueError("Read on closed or unwrapped SSL socket.")
try:
- if buffer is not None:
- v = self._sslobj.read(len, buffer)
- else:
- v = self._sslobj.read(len or 1024)
- return v
+ return self._sslobj.read(len, buffer)
except SSLError as x:
if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs:
if buffer is not None:
@@ -647,7 +815,7 @@ class SSLSocket(socket):
self._checkClosed()
self._check_connected()
- return self._sslobj.peer_certificate(binary_form)
+ return self._sslobj.getpeercert(binary_form)
def selected_npn_protocol(self):
self._checkClosed()
@@ -656,6 +824,13 @@ class SSLSocket(socket):
else:
return self._sslobj.selected_npn_protocol()
+ def selected_alpn_protocol(self):
+ self._checkClosed()
+ if not self._sslobj or not _ssl.HAS_ALPN:
+ return None
+ else:
+ return self._sslobj.selected_alpn_protocol()
+
def cipher(self):
self._checkClosed()
if not self._sslobj:
@@ -663,6 +838,12 @@ class SSLSocket(socket):
else:
return self._sslobj.cipher()
+ def shared_ciphers(self):
+ self._checkClosed()
+ if not self._sslobj:
+ return None
+ return self._sslobj.shared_ciphers()
+
def compression(self):
self._checkClosed()
if not self._sslobj:
@@ -677,17 +858,7 @@ class SSLSocket(socket):
raise ValueError(
"non-zero flags not allowed in calls to send() on %s" %
self.__class__)
- try:
- v = self._sslobj.write(data)
- except SSLError as x:
- if x.args[0] == SSL_ERROR_WANT_READ:
- return 0
- elif x.args[0] == SSL_ERROR_WANT_WRITE:
- return 0
- else:
- raise
- else:
- return v
+ return self._sslobj.write(data)
else:
return socket.send(self, data, flags)
@@ -723,6 +894,16 @@ class SSLSocket(socket):
else:
return socket.sendall(self, data, flags)
+ def sendfile(self, file, offset=0, count=None):
+ """Send a file, possibly by using os.sendfile() if this is a
+ clear-text socket. Return the total number of bytes sent.
+ """
+ if self._sslobj is None:
+ # os.sendfile() works with plain sockets only
+ return super().sendfile(file, offset, count)
+ else:
+ return self._sendfile_use_send(file, offset, count)
+
def recv(self, buflen=1024, flags=0):
self._checkClosed()
if self._sslobj:
@@ -787,7 +968,7 @@ class SSLSocket(socket):
def unwrap(self):
if self._sslobj:
- s = self._sslobj.shutdown()
+ s = self._sslobj.unwrap()
self._sslobj = None
return s
else:
@@ -808,12 +989,6 @@ class SSLSocket(socket):
finally:
self.settimeout(timeout)
- if self.context.check_hostname:
- if not self.server_hostname:
- raise ValueError("check_hostname needs server_hostname "
- "argument")
- match_hostname(self.getpeercert(), self.server_hostname)
-
def _real_connect(self, addr, connect_ex):
if self.server_side:
raise ValueError("can't connect in server-side mode")
@@ -821,7 +996,8 @@ class SSLSocket(socket):
# connected at the time of the call. We connect it, then wrap it.
if self._connected:
raise ValueError("attempt to connect already-connected SSLSocket!")
- self._sslobj = self.context._wrap_socket(self, False, self.server_hostname)
+ sslobj = self.context._wrap_socket(self, False, self.server_hostname)
+ self._sslobj = SSLObject(sslobj, owner=self)
try:
if connect_ex:
rc = socket.connect_ex(self, addr)
@@ -864,15 +1040,18 @@ class SSLSocket(socket):
if the requested `cb_type` is not supported. Return bytes of the data
or None if the data is not available (e.g. before the handshake).
"""
- if cb_type not in CHANNEL_BINDING_TYPES:
- raise ValueError("Unsupported channel binding type")
- if cb_type != "tls-unique":
- raise NotImplementedError(
- "{0} channel binding type not implemented"
- .format(cb_type))
if self._sslobj is None:
return None
- return self._sslobj.tls_unique_cb()
+ return self._sslobj.get_channel_binding(cb_type)
+
+ def version(self):
+ """
+ Return a string identifying the protocol version used by the
+ current SSL channel, or None if there is no established channel.
+ """
+ if self._sslobj is None:
+ return None
+ return self._sslobj.version()
def wrap_socket(sock, keyfile=None, certfile=None,
@@ -892,12 +1071,34 @@ def wrap_socket(sock, keyfile=None, certfile=None,
# some utility functions
def cert_time_to_seconds(cert_time):
- """Takes a date-time string in standard ASN1_print form
- ("MON DAY 24HOUR:MINUTE:SEC YEAR TIMEZONE") and return
- a Python time value in seconds past the epoch."""
+ """Return the time in seconds since the Epoch, given the timestring
+ representing the "notBefore" or "notAfter" date from a certificate
+ in ``"%b %d %H:%M:%S %Y %Z"`` strptime format (C locale).
+
+ "notBefore" or "notAfter" dates must use UTC (RFC 5280).
- import time
- return time.mktime(time.strptime(cert_time, "%b %d %H:%M:%S %Y GMT"))
+ Month is one of: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
+ UTC should be specified as GMT (see ASN1_TIME_print())
+ """
+ from time import strptime
+ from calendar import timegm
+
+ months = (
+ "Jan","Feb","Mar","Apr","May","Jun",
+ "Jul","Aug","Sep","Oct","Nov","Dec"
+ )
+ time_format = ' %d %H:%M:%S %Y GMT' # NOTE: no month, fixed GMT
+ try:
+ month_number = months.index(cert_time[:3].title()) + 1
+ except ValueError:
+ raise ValueError('time data %r does not match '
+ 'format "%%b%s"' % (cert_time, time_format))
+ else:
+ # found valid month
+ tt = strptime(cert_time[3:], time_format)
+ # return an integer, the previous mktime()-based implementation
+ # returned a float (fractional seconds are always zero here).
+ return timegm((tt[0], month_number) + tt[2:6])
PEM_HEADER = "-----BEGIN CERTIFICATE-----"
PEM_FOOTER = "-----END CERTIFICATE-----"
diff --git a/Lib/stat.py b/Lib/stat.py
index 3eecc3e0d3..46837c06da 100644
--- a/Lib/stat.py
+++ b/Lib/stat.py
@@ -148,6 +148,29 @@ def filemode(mode):
perm.append("-")
return "".join(perm)
+
+# Windows FILE_ATTRIBUTE constants for interpreting os.stat()'s
+# "st_file_attributes" member
+
+FILE_ATTRIBUTE_ARCHIVE = 32
+FILE_ATTRIBUTE_COMPRESSED = 2048
+FILE_ATTRIBUTE_DEVICE = 64
+FILE_ATTRIBUTE_DIRECTORY = 16
+FILE_ATTRIBUTE_ENCRYPTED = 16384
+FILE_ATTRIBUTE_HIDDEN = 2
+FILE_ATTRIBUTE_INTEGRITY_STREAM = 32768
+FILE_ATTRIBUTE_NORMAL = 128
+FILE_ATTRIBUTE_NOT_CONTENT_INDEXED = 8192
+FILE_ATTRIBUTE_NO_SCRUB_DATA = 131072
+FILE_ATTRIBUTE_OFFLINE = 4096
+FILE_ATTRIBUTE_READONLY = 1
+FILE_ATTRIBUTE_REPARSE_POINT = 1024
+FILE_ATTRIBUTE_SPARSE_FILE = 512
+FILE_ATTRIBUTE_SYSTEM = 4
+FILE_ATTRIBUTE_TEMPORARY = 256
+FILE_ATTRIBUTE_VIRTUAL = 65536
+
+
# If available, use C implementation
try:
from _stat import *
diff --git a/Lib/statistics.py b/Lib/statistics.py
index 518f546544..4f5c1c164a 100644
--- a/Lib/statistics.py
+++ b/Lib/statistics.py
@@ -601,7 +601,6 @@ def pvariance(data, mu=None):
n = len(data)
if n < 1:
raise StatisticsError('pvariance requires at least one data point')
- ss = _ss(data, mu)
T, ss = _ss(data, mu)
return _convert(ss/n, T)
diff --git a/Lib/string.py b/Lib/string.py
index ef0787f52b..89287c4c0a 100644
--- a/Lib/string.py
+++ b/Lib/string.py
@@ -14,6 +14,10 @@ printable -- a string containing all ASCII characters considered printable
"""
+__all__ = ["ascii_letters", "ascii_lowercase", "ascii_uppercase", "capwords",
+ "digits", "hexdigits", "octdigits", "printable", "punctuation",
+ "whitespace", "Formatter", "Template"]
+
import _string
# Some strings for ctype-style character classification
@@ -46,7 +50,7 @@ def capwords(s, sep=None):
####################################################################
import re as _re
-from collections import ChainMap
+from collections import ChainMap as _ChainMap
class _TemplateMetaclass(type):
pattern = r"""
@@ -104,7 +108,7 @@ class Template(metaclass=_TemplateMetaclass):
if not args:
mapping = kws
elif kws:
- mapping = ChainMap(kws, args[0])
+ mapping = _ChainMap(kws, args[0])
else:
mapping = args[0]
# Helper function for .sub()
@@ -134,7 +138,7 @@ class Template(metaclass=_TemplateMetaclass):
if not args:
mapping = kws
elif kws:
- mapping = ChainMap(kws, args[0])
+ mapping = _ChainMap(kws, args[0])
else:
mapping = args[0]
# Helper function for .sub()
@@ -178,6 +182,9 @@ class Formatter:
except ValueError:
if 'format_string' in kwargs:
format_string = kwargs.pop('format_string')
+ import warnings
+ warnings.warn("Passing 'format_string' as keyword argument is "
+ "deprecated", DeprecationWarning, stacklevel=2)
else:
raise TypeError("format() missing 1 required positional "
"argument: 'format_string'") from None
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index 04cfb44de3..d8d6ab2274 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -104,17 +104,21 @@ in the child process prior to executing the command.
If env is not None, it defines the environment variables for the new
process.
-If universal_newlines is false, the file objects stdin, stdout and stderr
+If universal_newlines is False, the file objects stdin, stdout and stderr
are opened as binary files, and no line ending conversion is done.
-If universal_newlines is true, the file objects stdout and stderr are
-opened as a text files, but lines may be terminated by any of '\n',
+If universal_newlines is True, the file objects stdout and stderr are
+opened as a text file, but lines may be terminated by any of '\n',
the Unix end-of-line convention, '\r', the old Macintosh convention or
'\r\n', the Windows convention. All of these external representations
are seen as '\n' by the Python program. Also, the newlines attribute
of the file objects stdout, stdin and stderr are not updated by the
communicate() method.
+In either case, the process being communicated with should start up
+expecting to receive bytes on its standard input and decode them with
+the same encoding they are sent in.
+
The startupinfo and creationflags, if given, will be passed to the
underlying CreateProcess() function. They can specify things such as
appearance of the main window and priority for the new process.
@@ -184,6 +188,9 @@ check_output(*popenargs, **kwargs):
pass a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument.
+ If universal_newlines is set to True, the "input" argument must
+ be a string rather than bytes, and the return value will be a string.
+
Exceptions
----------
Exceptions raised in the child process, before the new program has
@@ -225,9 +232,13 @@ wait()
communicate(input=None)
Interact with process: Send data to stdin. Read data from stdout
and stderr, until end-of-file is reached. Wait for process to
- terminate. The optional input argument should be a string to be
+ terminate. The optional input argument should be data to be
sent to the child process, or None, if no data should be sent to
- the child.
+ the child. If the Popen instance was constructed with universal_newlines
+ set to True, the input argument should be a string and will be encoded
+ using the preferred system encoding (see locale.getpreferredencoding);
+ if universal_newlines is False, the input argument should be a
+ byte string.
communicate() returns a tuple (stdout, stderr).
@@ -345,7 +356,7 @@ Popen(["/bin/mycmd", "myarg"], env={"PATH": "/usr/bin"})
"""
import sys
-mswindows = (sys.platform == "win32")
+_mswindows = (sys.platform == "win32")
import io
import os
@@ -354,10 +365,7 @@ import signal
import builtins
import warnings
import errno
-try:
- from time import monotonic as _time
-except ImportError:
- from time import time as _time
+from time import monotonic as _time
# Exception classes used by this module.
class SubprocessError(Exception): pass
@@ -369,29 +377,53 @@ class CalledProcessError(SubprocessError):
The exit status will be stored in the returncode attribute;
check_output() will also store the output in the output attribute.
"""
- def __init__(self, returncode, cmd, output=None):
+ def __init__(self, returncode, cmd, output=None, stderr=None):
self.returncode = returncode
self.cmd = cmd
self.output = output
+ self.stderr = stderr
+
def __str__(self):
return "Command '%s' returned non-zero exit status %d" % (self.cmd, self.returncode)
+ @property
+ def stdout(self):
+ """Alias for output attribute, to match stderr"""
+ return self.output
+
+ @stdout.setter
+ def stdout(self, value):
+ # There's no obvious reason to set this, but allow it anyway so
+ # .stdout is a transparent alias for .output
+ self.output = value
+
class TimeoutExpired(SubprocessError):
"""This exception is raised when the timeout expires while waiting for a
child process.
"""
- def __init__(self, cmd, timeout, output=None):
+ def __init__(self, cmd, timeout, output=None, stderr=None):
self.cmd = cmd
self.timeout = timeout
self.output = output
+ self.stderr = stderr
def __str__(self):
return ("Command '%s' timed out after %s seconds" %
(self.cmd, self.timeout))
+ @property
+ def stdout(self):
+ return self.output
+
+ @stdout.setter
+ def stdout(self, value):
+ # There's no obvious reason to set this, but allow it anyway so
+ # .stdout is a transparent alias for .output
+ self.output = value
+
-if mswindows:
+if _mswindows:
import threading
import msvcrt
import _winapi
@@ -425,9 +457,12 @@ else:
__all__ = ["Popen", "PIPE", "STDOUT", "call", "check_call", "getstatusoutput",
- "getoutput", "check_output", "CalledProcessError", "DEVNULL"]
+ "getoutput", "check_output", "run", "CalledProcessError", "DEVNULL",
+ "SubprocessError", "TimeoutExpired", "CompletedProcess"]
+ # NOTE: We intentionally exclude list2cmdline as it is
+ # considered an internal implementation detail. issue10838.
-if mswindows:
+if _mswindows:
from _winapi import (CREATE_NEW_CONSOLE, CREATE_NEW_PROCESS_GROUP,
STD_INPUT_HANDLE, STD_OUTPUT_HANDLE,
STD_ERROR_HANDLE, SW_HIDE,
@@ -453,15 +488,11 @@ if mswindows:
raise ValueError("already closed")
def __repr__(self):
- return "Handle(%d)" % int(self)
+ return "%s(%d)" % (self.__class__.__name__, int(self))
__del__ = Close
__str__ = __repr__
-try:
- MAXFD = os.sysconf("SC_OPEN_MAX")
-except:
- MAXFD = 256
# This lists holds Popen instances for which the underlying process had not
# exited at the time its __del__ method got called: those processes are wait()ed
@@ -485,14 +516,6 @@ STDOUT = -2
DEVNULL = -3
-def _eintr_retry_call(func, *args):
- while True:
- try:
- return func(*args)
- except InterruptedError:
- continue
-
-
# XXX This function is only used by multiprocessing and the test suite,
# but it's here so that it can be imported when Python is compiled without
# threads.
@@ -588,34 +611,102 @@ def check_output(*popenargs, timeout=None, **kwargs):
... input=b"when in the course of fooman events\n")
b'when in the course of barman events\n'
- If universal_newlines=True is passed, the return value will be a
- string rather than bytes.
+ If universal_newlines=True is passed, the "input" argument must be a
+ string and the return value will be a string rather than bytes.
"""
if 'stdout' in kwargs:
raise ValueError('stdout argument not allowed, it will be overridden.')
- if 'input' in kwargs:
+
+ if 'input' in kwargs and kwargs['input'] is None:
+ # Explicitly passing input=None was previously equivalent to passing an
+ # empty string. That is maintained here for backwards compatibility.
+ kwargs['input'] = '' if kwargs.get('universal_newlines', False) else b''
+
+ return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
+ **kwargs).stdout
+
+
+class CompletedProcess(object):
+ """A process that has finished running.
+
+ This is returned by run().
+
+ Attributes:
+ args: The list or str args passed to run().
+ returncode: The exit code of the process, negative for signals.
+ stdout: The standard output (None if not captured).
+ stderr: The standard error (None if not captured).
+ """
+ def __init__(self, args, returncode, stdout=None, stderr=None):
+ self.args = args
+ self.returncode = returncode
+ self.stdout = stdout
+ self.stderr = stderr
+
+ def __repr__(self):
+ args = ['args={!r}'.format(self.args),
+ 'returncode={!r}'.format(self.returncode)]
+ if self.stdout is not None:
+ args.append('stdout={!r}'.format(self.stdout))
+ if self.stderr is not None:
+ args.append('stderr={!r}'.format(self.stderr))
+ return "{}({})".format(type(self).__name__, ', '.join(args))
+
+ def check_returncode(self):
+ """Raise CalledProcessError if the exit code is non-zero."""
+ if self.returncode:
+ raise CalledProcessError(self.returncode, self.args, self.stdout,
+ self.stderr)
+
+
+def run(*popenargs, input=None, timeout=None, check=False, **kwargs):
+ """Run command with arguments and return a CompletedProcess instance.
+
+ The returned instance will have attributes args, returncode, stdout and
+ stderr. By default, stdout and stderr are not captured, and those attributes
+ will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them.
+
+ If check is True and the exit code was non-zero, it raises a
+ CalledProcessError. The CalledProcessError object will have the return code
+ in the returncode attribute, and output & stderr attributes if those streams
+ were captured.
+
+ If timeout is given, and the process takes too long, a TimeoutExpired
+ exception will be raised.
+
+ There is an optional argument "input", allowing you to
+ pass a string to the subprocess's stdin. If you use this argument
+ you may not also use the Popen constructor's "stdin" argument, as
+ it will be used internally.
+
+ The other arguments are the same as for the Popen constructor.
+
+ If universal_newlines=True is passed, the "input" argument must be a
+ string and stdout/stderr in the returned object will be strings rather than
+ bytes.
+ """
+ if input is not None:
if 'stdin' in kwargs:
raise ValueError('stdin and input arguments may not both be used.')
- inputdata = kwargs['input']
- del kwargs['input']
kwargs['stdin'] = PIPE
- else:
- inputdata = None
- with Popen(*popenargs, stdout=PIPE, **kwargs) as process:
+
+ with Popen(*popenargs, **kwargs) as process:
try:
- output, unused_err = process.communicate(inputdata, timeout=timeout)
+ stdout, stderr = process.communicate(input, timeout=timeout)
except TimeoutExpired:
process.kill()
- output, unused_err = process.communicate()
- raise TimeoutExpired(process.args, timeout, output=output)
+ stdout, stderr = process.communicate()
+ raise TimeoutExpired(process.args, timeout, output=stdout,
+ stderr=stderr)
except:
process.kill()
process.wait()
raise
retcode = process.poll()
- if retcode:
- raise CalledProcessError(retcode, process.args, output=output)
- return output
+ if check and retcode:
+ raise CalledProcessError(retcode, process.args,
+ output=stdout, stderr=stderr)
+ return CompletedProcess(process.args, retcode, stdout, stderr)
def list2cmdline(seq):
@@ -763,7 +854,7 @@ class Popen(object):
if not isinstance(bufsize, int):
raise TypeError("bufsize must be an integer")
- if mswindows:
+ if _mswindows:
if preexec_fn is not None:
raise ValueError("preexec_fn is not supported on Windows "
"platforms")
@@ -823,7 +914,7 @@ class Popen(object):
# quickly terminating child could make our fds unwrappable
# (see #8458).
- if mswindows:
+ if _mswindows:
if p2cwrite != -1:
p2cwrite = msvcrt.open_osfhandle(p2cwrite.Detach(), 0)
if c2pread != -1:
@@ -915,14 +1006,42 @@ class Popen(object):
self._devnull = os.open(os.devnull, os.O_RDWR)
return self._devnull
+ def _stdin_write(self, input):
+ if input:
+ try:
+ self.stdin.write(input)
+ except BrokenPipeError:
+ pass # communicate() must ignore broken pipe errors.
+ except OSError as e:
+ if e.errno == errno.EINVAL and self.poll() is not None:
+ # Issue #19612: On Windows, stdin.write() fails with EINVAL
+ # if the process already exited before the write
+ pass
+ else:
+ raise
+ try:
+ self.stdin.close()
+ except BrokenPipeError:
+ pass # communicate() must ignore broken pipe errors.
+ except OSError as e:
+ if e.errno == errno.EINVAL and self.poll() is not None:
+ pass
+ else:
+ raise
+
def communicate(self, input=None, timeout=None):
"""Interact with process: Send data to stdin. Read data from
stdout and stderr, until end-of-file is reached. Wait for
- process to terminate. The optional input argument should be
- bytes to be sent to the child process, or None, if no data
- should be sent to the child.
+ process to terminate.
+
+ The optional "input" argument should be data to be sent to the
+ child process (if self.universal_newlines is True, this should
+ be a string; if it is False, "input" should be bytes), or
+ None, if no data should be sent to the child.
- communicate() returns a tuple (stdout, stderr)."""
+ communicate() returns a tuple (stdout, stderr). These will be
+ bytes or, if self.universal_newlines was True, a string.
+ """
if self._communication_started and input:
raise ValueError("Cannot send input after starting communication")
@@ -935,18 +1054,12 @@ class Popen(object):
stdout = None
stderr = None
if self.stdin:
- if input:
- try:
- self.stdin.write(input)
- except OSError as e:
- if e.errno != errno.EPIPE and e.errno != errno.EINVAL:
- raise
- self.stdin.close()
+ self._stdin_write(input)
elif self.stdout:
- stdout = _eintr_retry_call(self.stdout.read)
+ stdout = self.stdout.read()
self.stdout.close()
elif self.stderr:
- stderr = _eintr_retry_call(self.stderr.read)
+ stderr = self.stderr.read()
self.stderr.close()
self.wait()
else:
@@ -985,7 +1098,7 @@ class Popen(object):
raise TimeoutExpired(self.args, orig_timeout)
- if mswindows:
+ if _mswindows:
#
# Windows methods
#
@@ -1190,21 +1303,7 @@ class Popen(object):
self.stderr_thread.start()
if self.stdin:
- if input is not None:
- try:
- self.stdin.write(input)
- except OSError as e:
- if e.errno == errno.EPIPE:
- # communicate() should ignore pipe full error
- pass
- elif (e.errno == errno.EINVAL
- and self.poll() is not None):
- # Issue #19612: stdin.write() fails with EINVAL
- # if the process already exited before the write
- pass
- else:
- raise
- self.stdin.close()
+ self._stdin_write(input)
# Wait for the reader threads, or time out. If we time out, the
# threads remain reading and the fds left open in case the user
@@ -1309,7 +1408,10 @@ class Popen(object):
elif stderr == PIPE:
errread, errwrite = os.pipe()
elif stderr == STDOUT:
- errwrite = c2pwrite
+ if c2pwrite != -1:
+ errwrite = c2pwrite
+ else: # child's stdout is not set, use parent's stdout
+ errwrite = sys.__stdout__.fileno()
elif stderr == DEVNULL:
errwrite = self._get_devnull()
elif isinstance(stderr, int):
@@ -1323,16 +1425,6 @@ class Popen(object):
errread, errwrite)
- def _close_fds(self, fds_to_keep):
- start_fd = 3
- for fd in sorted(fds_to_keep):
- if fd >= start_fd:
- os.closerange(start_fd, fd)
- start_fd = fd + 1
- if start_fd <= MAXFD:
- os.closerange(start_fd, MAXFD)
-
-
def _execute_child(self, args, executable, preexec_fn, close_fds,
pass_fds, cwd, env,
startupinfo, creationflags, shell,
@@ -1418,7 +1510,7 @@ class Popen(object):
# exception (limited in size)
errpipe_data = bytearray()
while True:
- part = _eintr_retry_call(os.read, errpipe_read, 50000)
+ part = os.read(errpipe_read, 50000)
errpipe_data += part
if not part or len(errpipe_data) > 50000:
break
@@ -1428,10 +1520,9 @@ class Popen(object):
if errpipe_data:
try:
- _eintr_retry_call(os.waitpid, self.pid, 0)
- except OSError as e:
- if e.errno != errno.ECHILD:
- raise
+ os.waitpid(self.pid, 0)
+ except ChildProcessError:
+ pass
try:
exception_name, hex_errno, err_msg = (
errpipe_data.split(b':', 2))
@@ -1514,10 +1605,8 @@ class Popen(object):
def _try_wait(self, wait_flags):
"""All callers to this function MUST hold self._waitpid_lock."""
try:
- (pid, sts) = _eintr_retry_call(os.waitpid, self.pid, wait_flags)
- except OSError as e:
- if e.errno != errno.ECHILD:
- raise
+ (pid, sts) = os.waitpid(self.pid, wait_flags)
+ except ChildProcessError:
# This happens if SIGCLD is set to be ignored or waiting
# for child processes has otherwise been disabled for our
# process. This child is dead, we can't get the status.
@@ -1579,9 +1668,15 @@ class Popen(object):
if self.stdin and not self._communication_started:
# Flush stdio buffer. This might block, if the user has
# been writing to .stdin in an uncontrolled fashion.
- self.stdin.flush()
+ try:
+ self.stdin.flush()
+ except BrokenPipeError:
+ pass # communicate() must ignore BrokenPipeError.
if not input:
- self.stdin.close()
+ try:
+ self.stdin.close()
+ except BrokenPipeError:
+ pass # communicate() must ignore BrokenPipeError.
stdout = None
stderr = None
@@ -1629,12 +1724,9 @@ class Popen(object):
self._input_offset + _PIPE_BUF]
try:
self._input_offset += os.write(key.fd, chunk)
- except OSError as e:
- if e.errno == errno.EPIPE:
- selector.unregister(key.fileobj)
- key.fileobj.close()
- else:
- raise
+ except BrokenPipeError:
+ selector.unregister(key.fileobj)
+ key.fileobj.close()
else:
if self._input_offset >= len(self._input):
selector.unregister(key.fileobj)
diff --git a/Lib/symbol.py b/Lib/symbol.py
index 5cf4a65f22..7541497163 100755
--- a/Lib/symbol.py
+++ b/Lib/symbol.py
@@ -16,82 +16,85 @@ eval_input = 258
decorator = 259
decorators = 260
decorated = 261
-funcdef = 262
-parameters = 263
-typedargslist = 264
-tfpdef = 265
-varargslist = 266
-vfpdef = 267
-stmt = 268
-simple_stmt = 269
-small_stmt = 270
-expr_stmt = 271
-testlist_star_expr = 272
-augassign = 273
-del_stmt = 274
-pass_stmt = 275
-flow_stmt = 276
-break_stmt = 277
-continue_stmt = 278
-return_stmt = 279
-yield_stmt = 280
-raise_stmt = 281
-import_stmt = 282
-import_name = 283
-import_from = 284
-import_as_name = 285
-dotted_as_name = 286
-import_as_names = 287
-dotted_as_names = 288
-dotted_name = 289
-global_stmt = 290
-nonlocal_stmt = 291
-assert_stmt = 292
-compound_stmt = 293
-if_stmt = 294
-while_stmt = 295
-for_stmt = 296
-try_stmt = 297
-with_stmt = 298
-with_item = 299
-except_clause = 300
-suite = 301
-test = 302
-test_nocond = 303
-lambdef = 304
-lambdef_nocond = 305
-or_test = 306
-and_test = 307
-not_test = 308
-comparison = 309
-comp_op = 310
-star_expr = 311
-expr = 312
-xor_expr = 313
-and_expr = 314
-shift_expr = 315
-arith_expr = 316
-term = 317
-factor = 318
-power = 319
-atom = 320
-testlist_comp = 321
-trailer = 322
-subscriptlist = 323
-subscript = 324
-sliceop = 325
-exprlist = 326
-testlist = 327
-dictorsetmaker = 328
-classdef = 329
-arglist = 330
-argument = 331
-comp_iter = 332
-comp_for = 333
-comp_if = 334
-encoding_decl = 335
-yield_expr = 336
-yield_arg = 337
+async_funcdef = 262
+funcdef = 263
+parameters = 264
+typedargslist = 265
+tfpdef = 266
+varargslist = 267
+vfpdef = 268
+stmt = 269
+simple_stmt = 270
+small_stmt = 271
+expr_stmt = 272
+testlist_star_expr = 273
+augassign = 274
+del_stmt = 275
+pass_stmt = 276
+flow_stmt = 277
+break_stmt = 278
+continue_stmt = 279
+return_stmt = 280
+yield_stmt = 281
+raise_stmt = 282
+import_stmt = 283
+import_name = 284
+import_from = 285
+import_as_name = 286
+dotted_as_name = 287
+import_as_names = 288
+dotted_as_names = 289
+dotted_name = 290
+global_stmt = 291
+nonlocal_stmt = 292
+assert_stmt = 293
+compound_stmt = 294
+async_stmt = 295
+if_stmt = 296
+while_stmt = 297
+for_stmt = 298
+try_stmt = 299
+with_stmt = 300
+with_item = 301
+except_clause = 302
+suite = 303
+test = 304
+test_nocond = 305
+lambdef = 306
+lambdef_nocond = 307
+or_test = 308
+and_test = 309
+not_test = 310
+comparison = 311
+comp_op = 312
+star_expr = 313
+expr = 314
+xor_expr = 315
+and_expr = 316
+shift_expr = 317
+arith_expr = 318
+term = 319
+factor = 320
+power = 321
+atom_expr = 322
+atom = 323
+testlist_comp = 324
+trailer = 325
+subscriptlist = 326
+subscript = 327
+sliceop = 328
+exprlist = 329
+testlist = 330
+dictorsetmaker = 331
+classdef = 332
+arglist = 333
+argument = 334
+comp_iter = 335
+comp_for = 336
+comp_if = 337
+encoding_decl = 338
+yield_expr = 339
+yield_arg = 340
#--end constants--
sym_name = {}
diff --git a/Lib/symtable.py b/Lib/symtable.py
index e23313b031..84fec4aa66 100644
--- a/Lib/symtable.py
+++ b/Lib/symtable.py
@@ -2,7 +2,7 @@
import _symtable
from _symtable import (USE, DEF_GLOBAL, DEF_LOCAL, DEF_PARAM,
- DEF_IMPORT, DEF_BOUND, OPT_IMPORT_STAR, SCOPE_OFF, SCOPE_MASK, FREE,
+ DEF_IMPORT, DEF_BOUND, SCOPE_OFF, SCOPE_MASK, FREE,
LOCAL, GLOBAL_IMPLICIT, GLOBAL_EXPLICIT, CELL)
import weakref
@@ -74,8 +74,7 @@ class SymbolTable(object):
return self._table.lineno
def is_optimized(self):
- return bool(self._table.type == _symtable.TYPE_FUNCTION
- and not self._table.optimized)
+ return bool(self._table.type == _symtable.TYPE_FUNCTION)
def is_nested(self):
return bool(self._table.nested)
@@ -87,10 +86,6 @@ class SymbolTable(object):
"""Return true if the scope uses exec. Deprecated method."""
return False
- def has_import_star(self):
- """Return true if the scope uses import *"""
- return bool(self._table.optimized & OPT_IMPORT_STAR)
-
def get_identifiers(self):
return self._table.symbols.keys()
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
index dbf7767205..9c34be0a07 100644
--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
@@ -57,7 +57,7 @@ _INSTALL_SCHEMES = {
'purelib': '{userbase}/Python{py_version_nodot}/site-packages',
'platlib': '{userbase}/Python{py_version_nodot}/site-packages',
'include': '{userbase}/Python{py_version_nodot}/Include',
- 'scripts': '{userbase}/Scripts',
+ 'scripts': '{userbase}/Python{py_version_nodot}/Scripts',
'data': '{userbase}',
},
'posix_user': {
@@ -109,13 +109,8 @@ else:
# unable to retrieve the real program name
_PROJECT_BASE = _safe_realpath(os.getcwd())
-if os.name == "nt" and "pcbuild" in _PROJECT_BASE[-8:].lower():
- _PROJECT_BASE = _safe_realpath(os.path.join(_PROJECT_BASE, pardir))
-# PC/VS7.1
-if os.name == "nt" and "\\pc\\v" in _PROJECT_BASE[-10:].lower():
- _PROJECT_BASE = _safe_realpath(os.path.join(_PROJECT_BASE, pardir, pardir))
-# PC/AMD64
-if os.name == "nt" and "\\pcbuild\\amd64" in _PROJECT_BASE[-14:].lower():
+if (os.name == 'nt' and
+ _PROJECT_BASE.lower().endswith(('\\pcbuild\\win32', '\\pcbuild\\amd64'))):
_PROJECT_BASE = _safe_realpath(os.path.join(_PROJECT_BASE, pardir, pardir))
# set for cross builds
@@ -129,11 +124,9 @@ def _is_python_source_dir(d):
return False
_sys_home = getattr(sys, '_home', None)
-if _sys_home and os.name == 'nt' and \
- _sys_home.lower().endswith(('pcbuild', 'pcbuild\\amd64')):
- _sys_home = os.path.dirname(_sys_home)
- if _sys_home.endswith('pcbuild'): # must be amd64
- _sys_home = os.path.dirname(_sys_home)
+if (_sys_home and os.name == 'nt' and
+ _sys_home.lower().endswith(('\\pcbuild\\win32', '\\pcbuild\\amd64'))):
+ _sys_home = os.path.dirname(os.path.dirname(_sys_home))
def is_python_build(check_home=False):
if check_home and _sys_home:
return _is_python_source_dir(_sys_home)
@@ -267,7 +260,12 @@ def _parse_makefile(filename, vars=None):
while len(variables) > 0:
for name in tuple(variables):
value = notdone[name]
- m = _findvar1_rx.search(value) or _findvar2_rx.search(value)
+ m1 = _findvar1_rx.search(value)
+ m2 = _findvar2_rx.search(value)
+ if m1 and m2:
+ m = m1 if m1.start() < m2.start() else m2
+ else:
+ m = m1 if m1 else m2
if m is not None:
n = m.group(1)
found = True
diff --git a/Lib/tarfile.py b/Lib/tarfile.py
index 5f1a979ad0..86e1cf9b89 100755
--- a/Lib/tarfile.py
+++ b/Lib/tarfile.py
@@ -459,13 +459,7 @@ class _Stream:
self.fileobj.write(self.buf)
self.buf = b""
if self.comptype == "gz":
- # The native zlib crc is an unsigned 32-bit integer, but
- # the Python wrapper implicitly casts that to a signed C
- # long. So, on a 32-bit box self.crc may "look negative",
- # while the same crc on a 64-bit box may "look positive".
- # To avoid irksome warnings from the `struct` module, force
- # it to look positive on all boxes.
- self.fileobj.write(struct.pack("<L", self.crc & 0xffffffff))
+ self.fileobj.write(struct.pack("<L", self.crc))
self.fileobj.write(struct.pack("<L", self.pos & 0xffffFFFF))
finally:
if not self._extfileobj:
@@ -818,11 +812,11 @@ class TarInfo(object):
"""
info["magic"] = POSIX_MAGIC
- if len(info["linkname"]) > LENGTH_LINK:
+ if len(info["linkname"].encode(encoding, errors)) > LENGTH_LINK:
raise ValueError("linkname is too long")
- if len(info["name"]) > LENGTH_NAME:
- info["prefix"], info["name"] = self._posix_split_name(info["name"])
+ if len(info["name"].encode(encoding, errors)) > LENGTH_NAME:
+ info["prefix"], info["name"] = self._posix_split_name(info["name"], encoding, errors)
return self._create_header(info, USTAR_FORMAT, encoding, errors)
@@ -832,10 +826,10 @@ class TarInfo(object):
info["magic"] = GNU_MAGIC
buf = b""
- if len(info["linkname"]) > LENGTH_LINK:
+ if len(info["linkname"].encode(encoding, errors)) > LENGTH_LINK:
buf += self._create_gnu_long_header(info["linkname"], GNUTYPE_LONGLINK, encoding, errors)
- if len(info["name"]) > LENGTH_NAME:
+ if len(info["name"].encode(encoding, errors)) > LENGTH_NAME:
buf += self._create_gnu_long_header(info["name"], GNUTYPE_LONGNAME, encoding, errors)
return buf + self._create_header(info, GNU_FORMAT, encoding, errors)
@@ -895,19 +889,20 @@ class TarInfo(object):
"""
return cls._create_pax_generic_header(pax_headers, XGLTYPE, "utf-8")
- def _posix_split_name(self, name):
+ def _posix_split_name(self, name, encoding, errors):
"""Split a name longer than 100 chars into a prefix
and a name part.
"""
- prefix = name[:LENGTH_PREFIX + 1]
- while prefix and prefix[-1] != "/":
- prefix = prefix[:-1]
-
- name = name[len(prefix):]
- prefix = prefix[:-1]
-
- if not prefix or len(name) > LENGTH_NAME:
+ components = name.split("/")
+ for i in range(1, len(components)):
+ prefix = "/".join(components[:i])
+ name = "/".join(components[i:])
+ if len(prefix.encode(encoding, errors)) <= LENGTH_PREFIX and \
+ len(name.encode(encoding, errors)) <= LENGTH_NAME:
+ break
+ else:
raise ValueError("name is too long")
+
return prefix, name
@staticmethod
@@ -1414,9 +1409,9 @@ class TarFile(object):
can be determined, `mode' is overridden by `fileobj's mode.
`fileobj' is not closed, when TarFile is closed.
"""
- modes = {"r": "rb", "a": "r+b", "w": "wb"}
+ modes = {"r": "rb", "a": "r+b", "w": "wb", "x": "xb"}
if mode not in modes:
- raise ValueError("mode must be 'r', 'a' or 'w'")
+ raise ValueError("mode must be 'r', 'a', 'w' or 'x'")
self.mode = mode
self._mode = modes[mode]
@@ -1488,7 +1483,7 @@ class TarFile(object):
except HeaderError as e:
raise ReadError(str(e))
- if self.mode in "aw":
+ if self.mode in ("a", "w", "x"):
self._loaded = True
if self.pax_headers:
@@ -1529,6 +1524,15 @@ class TarFile(object):
'w:bz2' open for writing with bzip2 compression
'w:xz' open for writing with lzma compression
+ 'x' or 'x:' create a tarfile exclusively without compression, raise
+ an exception if the file is already created
+ 'x:gz' create a gzip compressed tarfile, raise an exception
+ if the file is already created
+ 'x:bz2' create a bzip2 compressed tarfile, raise an exception
+ if the file is already created
+ 'x:xz' create an lzma compressed tarfile, raise an exception
+ if the file is already created
+
'r|*' open a stream of tar blocks with transparent compression
'r|' open an uncompressed stream of tar blocks for reading
'r|gz' open a gzip compressed stream of tar blocks
@@ -1587,7 +1591,7 @@ class TarFile(object):
t._extfileobj = False
return t
- elif mode in ("a", "w"):
+ elif mode in ("a", "w", "x"):
return cls.taropen(name, mode, fileobj, **kwargs)
raise ValueError("undiscernible mode")
@@ -1596,8 +1600,8 @@ class TarFile(object):
def taropen(cls, name, mode="r", fileobj=None, **kwargs):
"""Open uncompressed tar archive name for reading or writing.
"""
- if mode not in ("r", "a", "w"):
- raise ValueError("mode must be 'r', 'a' or 'w'")
+ if mode not in ("r", "a", "w", "x"):
+ raise ValueError("mode must be 'r', 'a', 'w' or 'x'")
return cls(name, mode, fileobj, **kwargs)
@classmethod
@@ -1605,8 +1609,8 @@ class TarFile(object):
"""Open gzip compressed tar archive name for reading or writing.
Appending is not allowed.
"""
- if mode not in ("r", "w"):
- raise ValueError("mode must be 'r' or 'w'")
+ if mode not in ("r", "w", "x"):
+ raise ValueError("mode must be 'r', 'w' or 'x'")
try:
import gzip
@@ -1639,8 +1643,8 @@ class TarFile(object):
"""Open bzip2 compressed tar archive name for reading or writing.
Appending is not allowed.
"""
- if mode not in ("r", "w"):
- raise ValueError("mode must be 'r' or 'w'.")
+ if mode not in ("r", "w", "x"):
+ raise ValueError("mode must be 'r', 'w' or 'x'")
try:
import bz2
@@ -1668,8 +1672,8 @@ class TarFile(object):
"""Open lzma compressed tar archive name for reading or writing.
Appending is not allowed.
"""
- if mode not in ("r", "w"):
- raise ValueError("mode must be 'r' or 'w'")
+ if mode not in ("r", "w", "x"):
+ raise ValueError("mode must be 'r', 'w' or 'x'")
try:
import lzma
@@ -1711,7 +1715,7 @@ class TarFile(object):
self.closed = True
try:
- if self.mode in "aw":
+ if self.mode in ("a", "w", "x"):
self.fileobj.write(NUL * (BLOCKSIZE * 2))
self.offset += (BLOCKSIZE * 2)
# fill up the end with zero-blocks
@@ -1751,13 +1755,15 @@ class TarFile(object):
return [tarinfo.name for tarinfo in self.getmembers()]
def gettarinfo(self, name=None, arcname=None, fileobj=None):
- """Create a TarInfo object for either the file `name' or the file
- object `fileobj' (using os.fstat on its file descriptor). You can
- modify some of the TarInfo's attributes before you add it using
- addfile(). If given, `arcname' specifies an alternative name for the
- file in the archive.
+ """Create a TarInfo object from the result of os.stat or equivalent
+ on an existing file. The file is either named by `name', or
+ specified as a file object `fileobj' with a file descriptor. If
+ given, `arcname' specifies an alternative name for the file in the
+ archive, otherwise, the name is taken from the 'name' attribute of
+ 'fileobj', or the 'name' argument. The name should be a text
+ string.
"""
- self._check("aw")
+ self._check("awx")
# When fileobj is given, replace name by
# fileobj's real name.
@@ -1776,7 +1782,7 @@ class TarFile(object):
# Now, fill the TarInfo object with
# information specific for the file.
tarinfo = self.tarinfo()
- tarinfo.tarfile = self
+ tarinfo.tarfile = self # Not needed
# Use os.stat or os.lstat, depending on platform
# and if symlinks shall be resolved.
@@ -1848,14 +1854,17 @@ class TarFile(object):
tarinfo.devminor = os.minor(statres.st_rdev)
return tarinfo
- def list(self, verbose=True):
+ def list(self, verbose=True, *, members=None):
"""Print a table of contents to sys.stdout. If `verbose' is False, only
the names of the members are printed. If it is True, an `ls -l'-like
- output is produced.
+ output is produced. `members' is optional and must be a subset of the
+ list returned by getmembers().
"""
self._check()
- for tarinfo in self:
+ if members is None:
+ members = self
+ for tarinfo in members:
if verbose:
_safe_print(stat.filemode(tarinfo.mode))
_safe_print("%s/%s" % (tarinfo.uname or tarinfo.uid,
@@ -1888,7 +1897,7 @@ class TarFile(object):
TarInfo object, if it returns None the TarInfo object will be
excluded from the archive.
"""
- self._check("aw")
+ self._check("awx")
if arcname is None:
arcname = name
@@ -1940,12 +1949,11 @@ class TarFile(object):
def addfile(self, tarinfo, fileobj=None):
"""Add the TarInfo object `tarinfo' to the archive. If `fileobj' is
- given, tarinfo.size bytes are read from it and added to the archive.
- You can create TarInfo objects using gettarinfo().
- On Windows platforms, `fileobj' should always be opened with mode
- 'rb' to avoid irritation about the file size.
+ given, it should be a binary file, and tarinfo.size bytes are read
+ from it and added to the archive. You can create TarInfo objects
+ directly, or by using gettarinfo().
"""
- self._check("aw")
+ self._check("awx")
tarinfo = copy.copy(tarinfo)
@@ -1964,12 +1972,13 @@ class TarFile(object):
self.members.append(tarinfo)
- def extractall(self, path=".", members=None):
+ def extractall(self, path=".", members=None, *, numeric_owner=False):
"""Extract all members from the archive to the current working
directory and set owner, modification time and permissions on
directories afterwards. `path' specifies a different directory
to extract to. `members' is optional and must be a subset of the
- list returned by getmembers().
+ list returned by getmembers(). If `numeric_owner` is True, only
+ the numbers for user/group names are used and not the names.
"""
directories = []
@@ -1983,7 +1992,8 @@ class TarFile(object):
tarinfo = copy.copy(tarinfo)
tarinfo.mode = 0o700
# Do not set_attrs directories, as we will do that further down
- self.extract(tarinfo, path, set_attrs=not tarinfo.isdir())
+ self.extract(tarinfo, path, set_attrs=not tarinfo.isdir(),
+ numeric_owner=numeric_owner)
# Reverse sort directories.
directories.sort(key=lambda a: a.name)
@@ -1993,7 +2003,7 @@ class TarFile(object):
for tarinfo in directories:
dirpath = os.path.join(path, tarinfo.name)
try:
- self.chown(tarinfo, dirpath)
+ self.chown(tarinfo, dirpath, numeric_owner=numeric_owner)
self.utime(tarinfo, dirpath)
self.chmod(tarinfo, dirpath)
except ExtractError as e:
@@ -2002,12 +2012,14 @@ class TarFile(object):
else:
self._dbg(1, "tarfile: %s" % e)
- def extract(self, member, path="", set_attrs=True):
+ def extract(self, member, path="", set_attrs=True, *, numeric_owner=False):
"""Extract a member from the archive to the current working directory,
using its full name. Its file information is extracted as accurately
as possible. `member' may be a filename or a TarInfo object. You can
specify a different directory using `path'. File attributes (owner,
- mtime, mode) are set unless `set_attrs' is False.
+ mtime, mode) are set unless `set_attrs' is False. If `numeric_owner`
+ is True, only the numbers for user/group names are used and not
+ the names.
"""
self._check("r")
@@ -2022,7 +2034,8 @@ class TarFile(object):
try:
self._extract_member(tarinfo, os.path.join(path, tarinfo.name),
- set_attrs=set_attrs)
+ set_attrs=set_attrs,
+ numeric_owner=numeric_owner)
except OSError as e:
if self.errorlevel > 0:
raise
@@ -2068,7 +2081,8 @@ class TarFile(object):
# blkdev, etc.), return None instead of a file object.
return None
- def _extract_member(self, tarinfo, targetpath, set_attrs=True):
+ def _extract_member(self, tarinfo, targetpath, set_attrs=True,
+ numeric_owner=False):
"""Extract the TarInfo object tarinfo to a physical
file called targetpath.
"""
@@ -2106,7 +2120,7 @@ class TarFile(object):
self.makefile(tarinfo, targetpath)
if set_attrs:
- self.chown(tarinfo, targetpath)
+ self.chown(tarinfo, targetpath, numeric_owner)
if not tarinfo.issym():
self.chmod(tarinfo, targetpath)
self.utime(tarinfo, targetpath)
@@ -2195,19 +2209,24 @@ class TarFile(object):
except KeyError:
raise ExtractError("unable to resolve link inside archive")
- def chown(self, tarinfo, targetpath):
- """Set owner of targetpath according to tarinfo.
+ def chown(self, tarinfo, targetpath, numeric_owner):
+ """Set owner of targetpath according to tarinfo. If numeric_owner
+ is True, use .gid/.uid instead of .gname/.uname.
"""
if pwd and hasattr(os, "geteuid") and os.geteuid() == 0:
# We have to be root to do so.
- try:
- g = grp.getgrnam(tarinfo.gname)[2]
- except KeyError:
+ if numeric_owner:
g = tarinfo.gid
- try:
- u = pwd.getpwnam(tarinfo.uname)[2]
- except KeyError:
u = tarinfo.uid
+ else:
+ try:
+ g = grp.getgrnam(tarinfo.gname)[2]
+ except KeyError:
+ g = tarinfo.gid
+ try:
+ u = pwd.getpwnam(tarinfo.uname)[2]
+ except KeyError:
+ u = tarinfo.uid
try:
if tarinfo.issym() and hasattr(os, "lchown"):
os.lchown(targetpath, u, g)
diff --git a/Lib/telnetlib.py b/Lib/telnetlib.py
index 51738f0d12..72dabc76e0 100644
--- a/Lib/telnetlib.py
+++ b/Lib/telnetlib.py
@@ -36,10 +36,7 @@ To do:
import sys
import socket
import selectors
-try:
- from time import monotonic as _time
-except ImportError:
- from time import time as _time
+from time import monotonic as _time
__all__ = ["Telnet"]
@@ -265,8 +262,8 @@ class Telnet:
def close(self):
"""Close the connection."""
sock = self.sock
- self.sock = 0
- self.eof = 1
+ self.sock = None
+ self.eof = True
self.iacseq = b''
self.sb = 0
if sock:
diff --git a/Lib/tempfile.py b/Lib/tempfile.py
index 0537228ba5..ad687b9a03 100644
--- a/Lib/tempfile.py
+++ b/Lib/tempfile.py
@@ -6,6 +6,14 @@ provided by this module can be used without fear of race conditions
except for 'mktemp'. 'mktemp' is subject to race conditions and
should not be used; it is provided for backward compatibility only.
+The default path names are returned as str. If you supply bytes as
+input, all return values will be in bytes. Ex:
+
+ >>> tempfile.mkstemp()
+ (4, '/tmp/tmptpu9nin8')
+ >>> tempfile.mkdtemp(suffix=b'')
+ b'/tmp/tmppbi8f0hy'
+
This module also provides some data items to the user:
TMP_MAX - maximum number of names that will be tried before
@@ -21,7 +29,8 @@ __all__ = [
"mkstemp", "mkdtemp", # low level safe interfaces
"mktemp", # deprecated unsafe interface
"TMP_MAX", "gettempprefix", # constants
- "tempdir", "gettempdir"
+ "tempdir", "gettempdir",
+ "gettempprefixb", "gettempdirb",
]
@@ -55,8 +64,10 @@ if hasattr(_os, 'TMP_MAX'):
else:
TMP_MAX = 10000
-# Although it does not have an underscore for historical reasons, this
-# variable is an internal implementation detail (see issue 10354).
+# This variable _was_ unused for legacy reasons, see issue 10354.
+# But as of 3.5 we actually use it at runtime so changing it would
+# have a possibly desirable side effect... But we do not want to support
+# that as an API. It is undocumented on purpose. Do not depend on this.
template = "tmp"
# Internal routines.
@@ -82,6 +93,46 @@ def _exists(fn):
else:
return True
+
+def _infer_return_type(*args):
+ """Look at the type of all args and divine their implied return type."""
+ return_type = None
+ for arg in args:
+ if arg is None:
+ continue
+ if isinstance(arg, bytes):
+ if return_type is str:
+ raise TypeError("Can't mix bytes and non-bytes in "
+ "path components.")
+ return_type = bytes
+ else:
+ if return_type is bytes:
+ raise TypeError("Can't mix bytes and non-bytes in "
+ "path components.")
+ return_type = str
+ if return_type is None:
+ return str # tempfile APIs return a str by default.
+ return return_type
+
+
+def _sanitize_params(prefix, suffix, dir):
+ """Common parameter processing for most APIs in this module."""
+ output_type = _infer_return_type(prefix, suffix, dir)
+ if suffix is None:
+ suffix = output_type()
+ if prefix is None:
+ if output_type is str:
+ prefix = template
+ else:
+ prefix = _os.fsencode(template)
+ if dir is None:
+ if output_type is str:
+ dir = gettempdir()
+ else:
+ dir = gettempdirb()
+ return prefix, suffix, dir, output_type
+
+
class _RandomNameSequence:
"""An instance of _RandomNameSequence generates an endless
sequence of unpredictable strings which can safely be incorporated
@@ -195,17 +246,18 @@ def _get_candidate_names():
return _name_sequence
-def _mkstemp_inner(dir, pre, suf, flags):
+def _mkstemp_inner(dir, pre, suf, flags, output_type):
"""Code common to mkstemp, TemporaryFile, and NamedTemporaryFile."""
names = _get_candidate_names()
+ if output_type is bytes:
+ names = map(_os.fsencode, names)
for seq in range(TMP_MAX):
name = next(names)
file = _os.path.join(dir, pre + name + suf)
try:
fd = _os.open(file, flags, 0o600)
- return (fd, _os.path.abspath(file))
except FileExistsError:
continue # try again
except PermissionError:
@@ -216,6 +268,7 @@ def _mkstemp_inner(dir, pre, suf, flags):
continue
else:
raise
+ return (fd, _os.path.abspath(file))
raise FileExistsError(_errno.EEXIST,
"No usable temporary file name found")
@@ -224,9 +277,13 @@ def _mkstemp_inner(dir, pre, suf, flags):
# User visible interfaces.
def gettempprefix():
- """Accessor for tempdir.template."""
+ """The default prefix for temporary directories."""
return template
+def gettempprefixb():
+ """The default prefix for temporary directories as bytes."""
+ return _os.fsencode(gettempprefix())
+
tempdir = None
def gettempdir():
@@ -241,24 +298,32 @@ def gettempdir():
_once_lock.release()
return tempdir
-def mkstemp(suffix="", prefix=template, dir=None, text=False):
+def gettempdirb():
+ """A bytes version of tempfile.gettempdir()."""
+ return _os.fsencode(gettempdir())
+
+def mkstemp(suffix=None, prefix=None, dir=None, text=False):
"""User-callable function to create and return a unique temporary
file. The return value is a pair (fd, name) where fd is the
file descriptor returned by os.open, and name is the filename.
- If 'suffix' is specified, the file name will end with that suffix,
+ If 'suffix' is not None, the file name will end with that suffix,
otherwise there will be no suffix.
- If 'prefix' is specified, the file name will begin with that prefix,
+ If 'prefix' is not None, the file name will begin with that prefix,
otherwise a default prefix is used.
- If 'dir' is specified, the file will be created in that directory,
+ If 'dir' is not None, the file will be created in that directory,
otherwise a default directory is used.
If 'text' is specified and true, the file is opened in text
mode. Else (the default) the file is opened in binary mode. On
some operating systems, this makes no difference.
+ If any of 'suffix', 'prefix' and 'dir' are not None, they must be the
+ same type. If they are bytes, the returned name will be bytes; str
+ otherwise.
+
The file is readable and writable only by the creating user ID.
If the operating system uses permission bits to indicate whether a
file is executable, the file is executable by no one. The file
@@ -267,18 +332,17 @@ def mkstemp(suffix="", prefix=template, dir=None, text=False):
Caller is responsible for deleting the file when done with it.
"""
- if dir is None:
- dir = gettempdir()
+ prefix, suffix, dir, output_type = _sanitize_params(prefix, suffix, dir)
if text:
flags = _text_openflags
else:
flags = _bin_openflags
- return _mkstemp_inner(dir, prefix, suffix, flags)
+ return _mkstemp_inner(dir, prefix, suffix, flags, output_type)
-def mkdtemp(suffix="", prefix=template, dir=None):
+def mkdtemp(suffix=None, prefix=None, dir=None):
"""User-callable function to create and return a unique temporary
directory. The return value is the pathname of the directory.
@@ -291,17 +355,17 @@ def mkdtemp(suffix="", prefix=template, dir=None):
Caller is responsible for deleting the directory when done with it.
"""
- if dir is None:
- dir = gettempdir()
+ prefix, suffix, dir, output_type = _sanitize_params(prefix, suffix, dir)
names = _get_candidate_names()
+ if output_type is bytes:
+ names = map(_os.fsencode, names)
for seq in range(TMP_MAX):
name = next(names)
file = _os.path.join(dir, prefix + name + suffix)
try:
_os.mkdir(file, 0o700)
- return file
except FileExistsError:
continue # try again
except PermissionError:
@@ -312,6 +376,7 @@ def mkdtemp(suffix="", prefix=template, dir=None):
continue
else:
raise
+ return file
raise FileExistsError(_errno.EEXIST,
"No usable temporary directory name found")
@@ -320,11 +385,12 @@ def mktemp(suffix="", prefix=template, dir=None):
"""User-callable function to return a unique temporary file name. The
file is not created.
- Arguments are as for mkstemp, except that the 'text' argument is
- not accepted.
+ Arguments are similar to mkstemp, except that the 'text' argument is
+ not accepted, and suffix=None, prefix=None and bytes file names are not
+ supported.
- This function is unsafe and should not be used. The file name
- refers to a file that did not exist at some point, but by the time
+ THIS FUNCTION IS UNSAFE AND SHOULD NOT BE USED. The file name may
+ refer to a file that did not exist at some point, but by the time
you get around to creating it, someone else may have beaten you to
the punch.
"""
@@ -454,7 +520,7 @@ class _TemporaryFileWrapper:
def NamedTemporaryFile(mode='w+b', buffering=-1, encoding=None,
- newline=None, suffix="", prefix=template,
+ newline=None, suffix=None, prefix=None,
dir=None, delete=True):
"""Create and return a temporary file.
Arguments:
@@ -467,12 +533,11 @@ def NamedTemporaryFile(mode='w+b', buffering=-1, encoding=None,
The file is created as mkstemp() would do it.
Returns an object with a file-like interface; the name of the file
- is accessible as file.name. The file will be automatically deleted
- when it is closed unless the 'delete' argument is set to False.
+ is accessible as its 'name' attribute. The file will be automatically
+ deleted when it is closed unless the 'delete' argument is set to False.
"""
- if dir is None:
- dir = gettempdir()
+ prefix, suffix, dir, output_type = _sanitize_params(prefix, suffix, dir)
flags = _bin_openflags
@@ -481,13 +546,14 @@ def NamedTemporaryFile(mode='w+b', buffering=-1, encoding=None,
if _os.name == 'nt' and delete:
flags |= _os.O_TEMPORARY
- (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags)
+ (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags, output_type)
try:
file = _io.open(fd, mode, buffering=buffering,
newline=newline, encoding=encoding)
return _TemporaryFileWrapper(file, name, delete)
- except Exception:
+ except BaseException:
+ _os.unlink(name)
_os.close(fd)
raise
@@ -497,8 +563,13 @@ if _os.name != 'posix' or _os.sys.platform == 'cygwin':
TemporaryFile = NamedTemporaryFile
else:
+ # Is the O_TMPFILE flag available and does it work?
+ # The flag is set to False if os.open(dir, os.O_TMPFILE) raises an
+ # IsADirectoryError exception
+ _O_TMPFILE_WORKS = hasattr(_os, 'O_TMPFILE')
+
def TemporaryFile(mode='w+b', buffering=-1, encoding=None,
- newline=None, suffix="", prefix=template,
+ newline=None, suffix=None, prefix=None,
dir=None):
"""Create and return a temporary file.
Arguments:
@@ -512,13 +583,41 @@ else:
Returns an object with a file-like interface. The file has no
name, and will cease to exist when it is closed.
"""
+ global _O_TMPFILE_WORKS
- if dir is None:
- dir = gettempdir()
+ prefix, suffix, dir, output_type = _sanitize_params(prefix, suffix, dir)
flags = _bin_openflags
-
- (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags)
+ if _O_TMPFILE_WORKS:
+ try:
+ flags2 = (flags | _os.O_TMPFILE) & ~_os.O_CREAT
+ fd = _os.open(dir, flags2, 0o600)
+ except IsADirectoryError:
+ # Linux kernel older than 3.11 ignores the O_TMPFILE flag:
+ # O_TMPFILE is read as O_DIRECTORY. Trying to open a directory
+ # with O_RDWR|O_DIRECTORY fails with IsADirectoryError, a
+ # directory cannot be open to write. Set flag to False to not
+ # try again.
+ _O_TMPFILE_WORKS = False
+ except OSError:
+ # The filesystem of the directory does not support O_TMPFILE.
+ # For example, OSError(95, 'Operation not supported').
+ #
+ # On Linux kernel older than 3.11, trying to open a regular
+ # file (or a symbolic link to a regular file) with O_TMPFILE
+ # fails with NotADirectoryError, because O_TMPFILE is read as
+ # O_DIRECTORY.
+ pass
+ else:
+ try:
+ return _io.open(fd, mode, buffering=buffering,
+ newline=newline, encoding=encoding)
+ except:
+ _os.close(fd)
+ raise
+ # Fallback to _mkstemp_inner().
+
+ (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags, output_type)
try:
_os.unlink(name)
return _io.open(fd, mode, buffering=buffering,
@@ -536,7 +635,7 @@ class SpooledTemporaryFile:
def __init__(self, max_size=0, mode='w+b', buffering=-1,
encoding=None, newline=None,
- suffix="", prefix=template, dir=None):
+ suffix=None, prefix=None, dir=None):
if 'b' in mode:
self._file = _io.BytesIO()
else:
@@ -687,7 +786,7 @@ class TemporaryDirectory(object):
in it are removed.
"""
- def __init__(self, suffix="", prefix=template, dir=None):
+ def __init__(self, suffix=None, prefix=None, dir=None):
self.name = mkdtemp(suffix, prefix, dir)
self._finalizer = _weakref.finalize(
self, self._cleanup, self.name,
diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
index 204d894ec6..11a6310a76 100644
--- a/Lib/test/_test_multiprocessing.py
+++ b/Lib/test/_test_multiprocessing.py
@@ -19,7 +19,7 @@ import logging
import struct
import operator
import test.support
-import test.script_helper
+import test.support.script_helper
# Skip tests if _multiprocessing wasn't built.
@@ -455,13 +455,15 @@ class _TestSubclassingProcess(BaseTestCase):
@classmethod
def _test_stderr_flush(cls, testfn):
- sys.stderr = open(testfn, 'w')
+ fd = os.open(testfn, os.O_WRONLY | os.O_CREAT | os.O_EXCL)
+ sys.stderr = open(fd, 'w', closefd=False)
1/0 # MARKER
@classmethod
def _test_sys_exit(cls, reason, testfn):
- sys.stderr = open(testfn, 'w')
+ fd = os.open(testfn, os.O_WRONLY | os.O_CREAT | os.O_EXCL)
+ sys.stderr = open(fd, 'w', closefd=False)
sys.exit(reason)
def test_sys_exit(self):
@@ -472,15 +474,21 @@ class _TestSubclassingProcess(BaseTestCase):
testfn = test.support.TESTFN
self.addCleanup(test.support.unlink, testfn)
- for reason, code in (([1, 2, 3], 1), ('ignore this', 1)):
+ for reason in (
+ [1, 2, 3],
+ 'ignore this',
+ ):
p = self.Process(target=self._test_sys_exit, args=(reason, testfn))
p.daemon = True
p.start()
p.join(5)
- self.assertEqual(p.exitcode, code)
+ self.assertEqual(p.exitcode, 1)
with open(testfn, 'r') as f:
- self.assertEqual(f.read().rstrip(), str(reason))
+ content = f.read()
+ self.assertEqual(content.rstrip(), str(reason))
+
+ os.unlink(testfn)
for reason in (True, False, 8):
p = self.Process(target=sys.exit, args=(reason,))
@@ -1818,13 +1826,19 @@ class _TestPool(BaseTestCase):
expected_values.remove(value)
def test_make_pool(self):
- self.assertRaises(ValueError, multiprocessing.Pool, -1)
- self.assertRaises(ValueError, multiprocessing.Pool, 0)
+ expected_error = (RemoteError if self.TYPE == 'manager'
+ else ValueError)
- p = multiprocessing.Pool(3)
- self.assertEqual(3, len(p._pool))
- p.close()
- p.join()
+ self.assertRaises(expected_error, self.Pool, -1)
+ self.assertRaises(expected_error, self.Pool, 0)
+
+ if self.TYPE != 'manager':
+ p = self.Pool(3)
+ try:
+ self.assertEqual(3, len(p._pool))
+ finally:
+ p.close()
+ p.join()
def test_terminate(self):
result = self.pool.map_async(
@@ -1833,7 +1847,8 @@ class _TestPool(BaseTestCase):
self.pool.terminate()
join = TimingWrapper(self.pool.join)
join()
- self.assertLess(join.elapsed, 0.5)
+ # Sanity check the pool didn't wait for all tasks to finish
+ self.assertLess(join.elapsed, 2.0)
def test_empty_iterable(self):
# See Issue 12157
@@ -1851,7 +1866,7 @@ class _TestPool(BaseTestCase):
if self.TYPE == 'processes':
L = list(range(10))
expected = [sqr(i) for i in L]
- with multiprocessing.Pool(2) as p:
+ with self.Pool(2) as p:
r = p.map_async(sqr, L)
self.assertEqual(r.get(), expected)
self.assertRaises(ValueError, p.map_async, sqr, L)
@@ -2624,7 +2639,7 @@ class _TestPicklingConnections(BaseTestCase):
l = socket.socket()
l.bind((test.support.HOST, 0))
- l.listen(1)
+ l.listen()
conn.send(l.getsockname())
new_conn, addr = l.accept()
conn.send(new_conn)
@@ -3271,7 +3286,7 @@ class TestWait(unittest.TestCase):
from multiprocessing.connection import wait
l = socket.socket()
l.bind((test.support.HOST, 0))
- l.listen(4)
+ l.listen()
addr = l.getsockname()
readers = []
procs = []
@@ -3483,11 +3498,11 @@ class TestNoForkBomb(unittest.TestCase):
sm = multiprocessing.get_start_method()
name = os.path.join(os.path.dirname(__file__), 'mp_fork_bomb.py')
if sm != 'fork':
- rc, out, err = test.script_helper.assert_python_failure(name, sm)
+ rc, out, err = test.support.script_helper.assert_python_failure(name, sm)
self.assertEqual(out, b'')
self.assertIn(b'RuntimeError', err)
else:
- rc, out, err = test.script_helper.assert_python_ok(name, sm)
+ rc, out, err = test.support.script_helper.assert_python_ok(name, sm)
self.assertEqual(out.rstrip(), b'123')
self.assertEqual(err, b'')
@@ -3834,7 +3849,7 @@ class ThreadsMixin(object):
connection = multiprocessing.dummy.connection
current_process = staticmethod(multiprocessing.dummy.current_process)
active_children = staticmethod(multiprocessing.dummy.active_children)
- Pool = staticmethod(multiprocessing.Pool)
+ Pool = staticmethod(multiprocessing.dummy.Pool)
Pipe = staticmethod(multiprocessing.dummy.Pipe)
Queue = staticmethod(multiprocessing.dummy.Queue)
JoinableQueue = staticmethod(multiprocessing.dummy.JoinableQueue)
diff --git a/Lib/test/badsyntax_async1.py b/Lib/test/badsyntax_async1.py
new file mode 100644
index 0000000000..fb85e29052
--- /dev/null
+++ b/Lib/test/badsyntax_async1.py
@@ -0,0 +1,2 @@
+async def foo(a=await something()):
+ pass
diff --git a/Lib/test/badsyntax_async2.py b/Lib/test/badsyntax_async2.py
new file mode 100644
index 0000000000..fb85e29052
--- /dev/null
+++ b/Lib/test/badsyntax_async2.py
@@ -0,0 +1,2 @@
+async def foo(a=await something()):
+ pass
diff --git a/Lib/test/badsyntax_async3.py b/Lib/test/badsyntax_async3.py
new file mode 100644
index 0000000000..dde1bc5955
--- /dev/null
+++ b/Lib/test/badsyntax_async3.py
@@ -0,0 +1,2 @@
+async def foo():
+ [i async for i in els]
diff --git a/Lib/test/badsyntax_async4.py b/Lib/test/badsyntax_async4.py
new file mode 100644
index 0000000000..d033b28114
--- /dev/null
+++ b/Lib/test/badsyntax_async4.py
@@ -0,0 +1,2 @@
+async def foo():
+ await
diff --git a/Lib/test/badsyntax_async5.py b/Lib/test/badsyntax_async5.py
new file mode 100644
index 0000000000..9d19af6109
--- /dev/null
+++ b/Lib/test/badsyntax_async5.py
@@ -0,0 +1,2 @@
+def foo():
+ await something()
diff --git a/Lib/test/badsyntax_async6.py b/Lib/test/badsyntax_async6.py
new file mode 100644
index 0000000000..cb0a23d5f0
--- /dev/null
+++ b/Lib/test/badsyntax_async6.py
@@ -0,0 +1,2 @@
+async def foo():
+ yield
diff --git a/Lib/test/badsyntax_async7.py b/Lib/test/badsyntax_async7.py
new file mode 100644
index 0000000000..51e4bf9b5b
--- /dev/null
+++ b/Lib/test/badsyntax_async7.py
@@ -0,0 +1,2 @@
+async def foo():
+ yield from []
diff --git a/Lib/test/badsyntax_async8.py b/Lib/test/badsyntax_async8.py
new file mode 100644
index 0000000000..3c636f9ac4
--- /dev/null
+++ b/Lib/test/badsyntax_async8.py
@@ -0,0 +1,2 @@
+async def foo():
+ await await fut
diff --git a/Lib/test/buffer_tests.py b/Lib/test/buffer_tests.py
deleted file mode 100644
index 0a629400fd..0000000000
--- a/Lib/test/buffer_tests.py
+++ /dev/null
@@ -1,218 +0,0 @@
-# Tests that work for both bytes and buffer objects.
-# See PEP 3137.
-
-import struct
-import sys
-
-class MixinBytesBufferCommonTests(object):
- """Tests that work for both bytes and buffer objects.
- See PEP 3137.
- """
-
- def marshal(self, x):
- """Convert x into the appropriate type for these tests."""
- raise RuntimeError('test class must provide a marshal method')
-
- def test_islower(self):
- self.assertFalse(self.marshal(b'').islower())
- self.assertTrue(self.marshal(b'a').islower())
- self.assertFalse(self.marshal(b'A').islower())
- self.assertFalse(self.marshal(b'\n').islower())
- self.assertTrue(self.marshal(b'abc').islower())
- self.assertFalse(self.marshal(b'aBc').islower())
- self.assertTrue(self.marshal(b'abc\n').islower())
- self.assertRaises(TypeError, self.marshal(b'abc').islower, 42)
-
- def test_isupper(self):
- self.assertFalse(self.marshal(b'').isupper())
- self.assertFalse(self.marshal(b'a').isupper())
- self.assertTrue(self.marshal(b'A').isupper())
- self.assertFalse(self.marshal(b'\n').isupper())
- self.assertTrue(self.marshal(b'ABC').isupper())
- self.assertFalse(self.marshal(b'AbC').isupper())
- self.assertTrue(self.marshal(b'ABC\n').isupper())
- self.assertRaises(TypeError, self.marshal(b'abc').isupper, 42)
-
- def test_istitle(self):
- self.assertFalse(self.marshal(b'').istitle())
- self.assertFalse(self.marshal(b'a').istitle())
- self.assertTrue(self.marshal(b'A').istitle())
- self.assertFalse(self.marshal(b'\n').istitle())
- self.assertTrue(self.marshal(b'A Titlecased Line').istitle())
- self.assertTrue(self.marshal(b'A\nTitlecased Line').istitle())
- self.assertTrue(self.marshal(b'A Titlecased, Line').istitle())
- self.assertFalse(self.marshal(b'Not a capitalized String').istitle())
- self.assertFalse(self.marshal(b'Not\ta Titlecase String').istitle())
- self.assertFalse(self.marshal(b'Not--a Titlecase String').istitle())
- self.assertFalse(self.marshal(b'NOT').istitle())
- self.assertRaises(TypeError, self.marshal(b'abc').istitle, 42)
-
- def test_isspace(self):
- self.assertFalse(self.marshal(b'').isspace())
- self.assertFalse(self.marshal(b'a').isspace())
- self.assertTrue(self.marshal(b' ').isspace())
- self.assertTrue(self.marshal(b'\t').isspace())
- self.assertTrue(self.marshal(b'\r').isspace())
- self.assertTrue(self.marshal(b'\n').isspace())
- self.assertTrue(self.marshal(b' \t\r\n').isspace())
- self.assertFalse(self.marshal(b' \t\r\na').isspace())
- self.assertRaises(TypeError, self.marshal(b'abc').isspace, 42)
-
- def test_isalpha(self):
- self.assertFalse(self.marshal(b'').isalpha())
- self.assertTrue(self.marshal(b'a').isalpha())
- self.assertTrue(self.marshal(b'A').isalpha())
- self.assertFalse(self.marshal(b'\n').isalpha())
- self.assertTrue(self.marshal(b'abc').isalpha())
- self.assertFalse(self.marshal(b'aBc123').isalpha())
- self.assertFalse(self.marshal(b'abc\n').isalpha())
- self.assertRaises(TypeError, self.marshal(b'abc').isalpha, 42)
-
- def test_isalnum(self):
- self.assertFalse(self.marshal(b'').isalnum())
- self.assertTrue(self.marshal(b'a').isalnum())
- self.assertTrue(self.marshal(b'A').isalnum())
- self.assertFalse(self.marshal(b'\n').isalnum())
- self.assertTrue(self.marshal(b'123abc456').isalnum())
- self.assertTrue(self.marshal(b'a1b3c').isalnum())
- self.assertFalse(self.marshal(b'aBc000 ').isalnum())
- self.assertFalse(self.marshal(b'abc\n').isalnum())
- self.assertRaises(TypeError, self.marshal(b'abc').isalnum, 42)
-
- def test_isdigit(self):
- self.assertFalse(self.marshal(b'').isdigit())
- self.assertFalse(self.marshal(b'a').isdigit())
- self.assertTrue(self.marshal(b'0').isdigit())
- self.assertTrue(self.marshal(b'0123456789').isdigit())
- self.assertFalse(self.marshal(b'0123456789a').isdigit())
-
- self.assertRaises(TypeError, self.marshal(b'abc').isdigit, 42)
-
- def test_lower(self):
- self.assertEqual(b'hello', self.marshal(b'HeLLo').lower())
- self.assertEqual(b'hello', self.marshal(b'hello').lower())
- self.assertRaises(TypeError, self.marshal(b'hello').lower, 42)
-
- def test_upper(self):
- self.assertEqual(b'HELLO', self.marshal(b'HeLLo').upper())
- self.assertEqual(b'HELLO', self.marshal(b'HELLO').upper())
- self.assertRaises(TypeError, self.marshal(b'hello').upper, 42)
-
- def test_capitalize(self):
- self.assertEqual(b' hello ', self.marshal(b' hello ').capitalize())
- self.assertEqual(b'Hello ', self.marshal(b'Hello ').capitalize())
- self.assertEqual(b'Hello ', self.marshal(b'hello ').capitalize())
- self.assertEqual(b'Aaaa', self.marshal(b'aaaa').capitalize())
- self.assertEqual(b'Aaaa', self.marshal(b'AaAa').capitalize())
-
- self.assertRaises(TypeError, self.marshal(b'hello').capitalize, 42)
-
- def test_ljust(self):
- self.assertEqual(b'abc ', self.marshal(b'abc').ljust(10))
- self.assertEqual(b'abc ', self.marshal(b'abc').ljust(6))
- self.assertEqual(b'abc', self.marshal(b'abc').ljust(3))
- self.assertEqual(b'abc', self.marshal(b'abc').ljust(2))
- self.assertEqual(b'abc*******', self.marshal(b'abc').ljust(10, b'*'))
- self.assertRaises(TypeError, self.marshal(b'abc').ljust)
-
- def test_rjust(self):
- self.assertEqual(b' abc', self.marshal(b'abc').rjust(10))
- self.assertEqual(b' abc', self.marshal(b'abc').rjust(6))
- self.assertEqual(b'abc', self.marshal(b'abc').rjust(3))
- self.assertEqual(b'abc', self.marshal(b'abc').rjust(2))
- self.assertEqual(b'*******abc', self.marshal(b'abc').rjust(10, b'*'))
- self.assertRaises(TypeError, self.marshal(b'abc').rjust)
-
- def test_center(self):
- self.assertEqual(b' abc ', self.marshal(b'abc').center(10))
- self.assertEqual(b' abc ', self.marshal(b'abc').center(6))
- self.assertEqual(b'abc', self.marshal(b'abc').center(3))
- self.assertEqual(b'abc', self.marshal(b'abc').center(2))
- self.assertEqual(b'***abc****', self.marshal(b'abc').center(10, b'*'))
- self.assertRaises(TypeError, self.marshal(b'abc').center)
-
- def test_swapcase(self):
- self.assertEqual(b'hEllO CoMPuTErS',
- self.marshal(b'HeLLo cOmpUteRs').swapcase())
-
- self.assertRaises(TypeError, self.marshal(b'hello').swapcase, 42)
-
- def test_zfill(self):
- self.assertEqual(b'123', self.marshal(b'123').zfill(2))
- self.assertEqual(b'123', self.marshal(b'123').zfill(3))
- self.assertEqual(b'0123', self.marshal(b'123').zfill(4))
- self.assertEqual(b'+123', self.marshal(b'+123').zfill(3))
- self.assertEqual(b'+123', self.marshal(b'+123').zfill(4))
- self.assertEqual(b'+0123', self.marshal(b'+123').zfill(5))
- self.assertEqual(b'-123', self.marshal(b'-123').zfill(3))
- self.assertEqual(b'-123', self.marshal(b'-123').zfill(4))
- self.assertEqual(b'-0123', self.marshal(b'-123').zfill(5))
- self.assertEqual(b'000', self.marshal(b'').zfill(3))
- self.assertEqual(b'34', self.marshal(b'34').zfill(1))
- self.assertEqual(b'0034', self.marshal(b'34').zfill(4))
-
- self.assertRaises(TypeError, self.marshal(b'123').zfill)
-
- def test_expandtabs(self):
- self.assertEqual(b'abc\rab def\ng hi',
- self.marshal(b'abc\rab\tdef\ng\thi').expandtabs())
- self.assertEqual(b'abc\rab def\ng hi',
- self.marshal(b'abc\rab\tdef\ng\thi').expandtabs(8))
- self.assertEqual(b'abc\rab def\ng hi',
- self.marshal(b'abc\rab\tdef\ng\thi').expandtabs(4))
- self.assertEqual(b'abc\r\nab def\ng hi',
- self.marshal(b'abc\r\nab\tdef\ng\thi').expandtabs())
- self.assertEqual(b'abc\r\nab def\ng hi',
- self.marshal(b'abc\r\nab\tdef\ng\thi').expandtabs(8))
- self.assertEqual(b'abc\r\nab def\ng hi',
- self.marshal(b'abc\r\nab\tdef\ng\thi').expandtabs(4))
- self.assertEqual(b'abc\r\nab\r\ndef\ng\r\nhi',
- self.marshal(b'abc\r\nab\r\ndef\ng\r\nhi').expandtabs(4))
- # check keyword args
- self.assertEqual(b'abc\rab def\ng hi',
- self.marshal(b'abc\rab\tdef\ng\thi').expandtabs(tabsize=8))
- self.assertEqual(b'abc\rab def\ng hi',
- self.marshal(b'abc\rab\tdef\ng\thi').expandtabs(tabsize=4))
-
- self.assertEqual(b' a\n b', self.marshal(b' \ta\n\tb').expandtabs(1))
-
- self.assertRaises(TypeError, self.marshal(b'hello').expandtabs, 42, 42)
- # This test is only valid when sizeof(int) == sizeof(void*) == 4.
- if sys.maxsize < (1 << 32) and struct.calcsize('P') == 4:
- self.assertRaises(OverflowError,
- self.marshal(b'\ta\n\tb').expandtabs, sys.maxsize)
-
- def test_title(self):
- self.assertEqual(b' Hello ', self.marshal(b' hello ').title())
- self.assertEqual(b'Hello ', self.marshal(b'hello ').title())
- self.assertEqual(b'Hello ', self.marshal(b'Hello ').title())
- self.assertEqual(b'Format This As Title String',
- self.marshal(b'fOrMaT thIs aS titLe String').title())
- self.assertEqual(b'Format,This-As*Title;String',
- self.marshal(b'fOrMaT,thIs-aS*titLe;String').title())
- self.assertEqual(b'Getint', self.marshal(b'getInt').title())
- self.assertRaises(TypeError, self.marshal(b'hello').title, 42)
-
- def test_splitlines(self):
- self.assertEqual([b'abc', b'def', b'', b'ghi'],
- self.marshal(b'abc\ndef\n\rghi').splitlines())
- self.assertEqual([b'abc', b'def', b'', b'ghi'],
- self.marshal(b'abc\ndef\n\r\nghi').splitlines())
- self.assertEqual([b'abc', b'def', b'ghi'],
- self.marshal(b'abc\ndef\r\nghi').splitlines())
- self.assertEqual([b'abc', b'def', b'ghi'],
- self.marshal(b'abc\ndef\r\nghi\n').splitlines())
- self.assertEqual([b'abc', b'def', b'ghi', b''],
- self.marshal(b'abc\ndef\r\nghi\n\r').splitlines())
- self.assertEqual([b'', b'abc', b'def', b'ghi', b''],
- self.marshal(b'\nabc\ndef\r\nghi\n\r').splitlines())
- self.assertEqual([b'', b'abc', b'def', b'ghi', b''],
- self.marshal(b'\nabc\ndef\r\nghi\n\r').splitlines(False))
- self.assertEqual([b'\n', b'abc\n', b'def\r\n', b'ghi\n', b'\r'],
- self.marshal(b'\nabc\ndef\r\nghi\n\r').splitlines(True))
- self.assertEqual([b'', b'abc', b'def', b'ghi', b''],
- self.marshal(b'\nabc\ndef\r\nghi\n\r').splitlines(keepends=False))
- self.assertEqual([b'\n', b'abc\n', b'def\r\n', b'ghi\n', b'\r'],
- self.marshal(b'\nabc\ndef\r\nghi\n\r').splitlines(keepends=True))
-
- self.assertRaises(TypeError, self.marshal(b'abc').splitlines, 42, 42)
diff --git a/Lib/test/bytecode_helper.py b/Lib/test/bytecode_helper.py
index 58b4209f55..347d60337d 100644
--- a/Lib/test/bytecode_helper.py
+++ b/Lib/test/bytecode_helper.py
@@ -32,8 +32,8 @@ class BytecodeTestCase(unittest.TestCase):
"""Throws AssertionError if op is found"""
for instr in dis.get_instructions(x):
if instr.opname == opname:
- disassembly = self.get_disassembly_as_string(co)
- if opargval is _UNSPECIFIED:
+ disassembly = self.get_disassembly_as_string(x)
+ if argval is _UNSPECIFIED:
msg = '%s occurs in bytecode:\n%s' % (opname, disassembly)
elif instr.argval == argval:
msg = '(%s,%r) occurs in bytecode:\n%s'
diff --git a/Lib/test/cfgparser.2 b/Lib/test/cfgparser.2
index 19a420a9a5..1646de8e65 100644
--- a/Lib/test/cfgparser.2
+++ b/Lib/test/cfgparser.2
@@ -282,7 +282,7 @@
# either /etc/hosts OR DNS or NIS depending on the settings of
# /etc/host.config, /etc/nsswitch.conf
# and the /etc/resolv.conf file. "host" therefore is system
-# configuration dependant. This parameter is most often of use to
+# configuration dependent. This parameter is most often of use to
# prevent DNS lookups
# in order to resolve NetBIOS names to IP Addresses. Use with care!
# The example below excludes use of name resolution for machines that
diff --git a/Lib/test/datetimetester.py b/Lib/test/datetimetester.py
index 289b0ca182..f5222c7e48 100644
--- a/Lib/test/datetimetester.py
+++ b/Lib/test/datetimetester.py
@@ -4,6 +4,7 @@ See http://www.zope.org/Members/fdrake/DateTimeWiki/TestCases
"""
import copy
+import decimal
import sys
import pickle
import random
@@ -51,6 +52,17 @@ class TestModule(unittest.TestCase):
self.assertEqual(datetime.MINYEAR, 1)
self.assertEqual(datetime.MAXYEAR, 9999)
+ def test_name_cleanup(self):
+ if '_Fast' not in str(self):
+ return
+ datetime = datetime_module
+ names = set(name for name in dir(datetime)
+ if not name.startswith('__') and not name.endswith('__'))
+ allowed = set(['MAXYEAR', 'MINYEAR', 'date', 'datetime',
+ 'datetime_CAPI', 'time', 'timedelta', 'timezone',
+ 'tzinfo'])
+ self.assertEqual(names - allowed, set([]))
+
def test_divide_and_round(self):
if '_Fast' in str(self):
return
@@ -105,6 +117,9 @@ class PicklableFixedOffset(FixedOffset):
def __init__(self, offset=None, name=None, dstoffset=None):
FixedOffset.__init__(self, offset, name, dstoffset)
+ def __getstate__(self):
+ return self.__dict__
+
class _TZInfo(tzinfo):
def utcoffset(self, datetime_module):
return random.random()
@@ -1212,7 +1227,7 @@ class TestDate(HarmlessMixedComparison, unittest.TestCase):
#self.assertRaises(ValueError, t.strftime, "%#")
#oh well, some systems just ignore those invalid ones.
- #at least, excercise them to make sure that no crashes
+ #at least, exercise them to make sure that no crashes
#are generated
for f in ["%e", "%", "%#"]:
try:
@@ -1223,11 +1238,13 @@ class TestDate(HarmlessMixedComparison, unittest.TestCase):
#check that this standard extension works
t.strftime("%f")
-
def test_format(self):
dt = self.theclass(2007, 9, 10)
self.assertEqual(dt.__format__(''), str(dt))
+ with self.assertRaisesRegex(TypeError, 'must be str, not int'):
+ dt.__format__(123)
+
# check that a derived class's __str__() gets called
class A(self.theclass):
def __str__(self):
@@ -1379,8 +1396,6 @@ class TestDate(HarmlessMixedComparison, unittest.TestCase):
return isinstance(other, LargerThanAnything)
def __eq__(self, other):
return isinstance(other, LargerThanAnything)
- def __ne__(self, other):
- return not isinstance(other, LargerThanAnything)
def __gt__(self, other):
return not isinstance(other, LargerThanAnything)
def __ge__(self, other):
@@ -1483,9 +1498,10 @@ class TestDate(HarmlessMixedComparison, unittest.TestCase):
for month_byte in b'9', b'\0', b'\r', b'\xff':
self.assertRaises(TypeError, self.theclass,
base[:2] + month_byte + base[3:])
- # Good bytes, but bad tzinfo:
- self.assertRaises(TypeError, self.theclass,
- bytes([1] * len(base)), 'EST')
+ if issubclass(self.theclass, datetime):
+ # Good bytes, but bad tzinfo:
+ with self.assertRaisesRegex(TypeError, '^bad tzinfo state arg$'):
+ self.theclass(bytes([1] * len(base)), 'EST')
for ord_byte in range(1, 13):
# This shouldn't blow up because of the month byte alone. If
@@ -1561,6 +1577,9 @@ class TestDateTime(TestDate):
dt = self.theclass(2007, 9, 10, 4, 5, 1, 123)
self.assertEqual(dt.__format__(''), str(dt))
+ with self.assertRaisesRegex(TypeError, 'must be str, not int'):
+ dt.__format__(123)
+
# check that a derived class's __str__() gets called
class A(self.theclass):
def __str__(self):
@@ -1940,6 +1959,7 @@ class TestDateTime(TestDate):
for insane in -1e200, 1e200:
self.assertRaises(OverflowError, self.theclass.utcfromtimestamp,
insane)
+
@unittest.skipIf(sys.platform == "win32", "Windows doesn't accept negative timestamps")
def test_negative_float_fromtimestamp(self):
# The result is tz-dependent; at least test that this doesn't
@@ -2319,6 +2339,9 @@ class TestTime(HarmlessMixedComparison, unittest.TestCase):
t = self.theclass(1, 2, 3, 4)
self.assertEqual(t.__format__(''), str(t))
+ with self.assertRaisesRegex(TypeError, 'must be str, not int'):
+ t.__format__(123)
+
# check that a derived class's __str__() gets called
class A(self.theclass):
def __str__(self):
@@ -2382,13 +2405,14 @@ class TestTime(HarmlessMixedComparison, unittest.TestCase):
self.assertEqual(orig, derived)
def test_bool(self):
+ # time is always True.
cls = self.theclass
self.assertTrue(cls(1))
self.assertTrue(cls(0, 1))
self.assertTrue(cls(0, 0, 1))
self.assertTrue(cls(0, 0, 0, 1))
- self.assertFalse(cls(0))
- self.assertFalse(cls())
+ self.assertTrue(cls(0))
+ self.assertTrue(cls())
def test_replace(self):
cls = self.theclass
@@ -2447,9 +2471,12 @@ class TestTime(HarmlessMixedComparison, unittest.TestCase):
for hour_byte in ' ', '9', chr(24), '\xff':
self.assertRaises(TypeError, self.theclass,
hour_byte + base[1:])
+ # Good bytes, but bad tzinfo:
+ with self.assertRaisesRegex(TypeError, '^bad tzinfo state arg$'):
+ self.theclass(bytes([1] * len(base)), 'EST')
# A mixin for classes with a tzinfo= argument. Subclasses must define
-# theclass as a class atribute, and theclass(1, 1, 1, tzinfo=whatever)
+# theclass as a class attribute, and theclass(1, 1, 1, tzinfo=whatever)
# must be legit (which is true for time and datetime).
class TZInfoBase:
@@ -2706,7 +2733,7 @@ class TestTimeTZ(TestTime, TZInfoBase, unittest.TestCase):
self.assertRaises(TypeError, t.strftime, "%Z")
# Issue #6697:
- if '_Fast' in str(type(self)):
+ if '_Fast' in str(self):
Badtzname.tz = '\ud800'
self.assertRaises(ValueError, t.strftime, "%Z")
@@ -2741,7 +2768,7 @@ class TestTimeTZ(TestTime, TZInfoBase, unittest.TestCase):
self.assertEqual(derived.tzname(), 'cookie')
def test_more_bool(self):
- # Test cases with non-None tzinfo.
+ # time is always True.
cls = self.theclass
t = cls(0, tzinfo=FixedOffset(-300, ""))
@@ -2751,23 +2778,11 @@ class TestTimeTZ(TestTime, TZInfoBase, unittest.TestCase):
self.assertTrue(t)
t = cls(5, tzinfo=FixedOffset(300, ""))
- self.assertFalse(t)
+ self.assertTrue(t)
t = cls(23, 59, tzinfo=FixedOffset(23*60 + 59, ""))
- self.assertFalse(t)
-
- # Mostly ensuring this doesn't overflow internally.
- t = cls(0, tzinfo=FixedOffset(23*60 + 59, ""))
self.assertTrue(t)
- # But this should yield a value error -- the utcoffset is bogus.
- t = cls(0, tzinfo=FixedOffset(24*60, ""))
- self.assertRaises(ValueError, lambda: bool(t))
-
- # Likewise.
- t = cls(0, tzinfo=FixedOffset(-24*60, ""))
- self.assertRaises(ValueError, lambda: bool(t))
-
def test_replace(self):
cls = self.theclass
z100 = FixedOffset(100, "+100")
@@ -3411,6 +3426,14 @@ class TestDateTimeTZ(TestDateTime, TZInfoBase, unittest.TestCase):
self.assertEqual(dt, local)
self.assertEqual(local.strftime("%z %Z"), "-0400 EDT")
+ @support.run_with_tz('EST+05EDT,M3.2.0,M11.1.0')
+ def test_astimezone_default_near_fold(self):
+ # Issue #26616.
+ u = datetime(2015, 11, 1, 5, tzinfo=timezone.utc)
+ t = u.astimezone()
+ s = t.astimezone()
+ self.assertEqual(t.tzinfo, s.tzinfo)
+
def test_aware_subtract(self):
cls = self.theclass
@@ -3880,8 +3903,59 @@ class Oddballs(unittest.TestCase):
self.assertEqual(as_datetime, datetime_sc)
self.assertEqual(datetime_sc, as_datetime)
-def test_main():
- support.run_unittest(__name__)
+ def test_extra_attributes(self):
+ for x in [date.today(),
+ time(),
+ datetime.utcnow(),
+ timedelta(),
+ tzinfo(),
+ timezone(timedelta())]:
+ with self.assertRaises(AttributeError):
+ x.abc = 1
+
+ def test_check_arg_types(self):
+ class Number:
+ def __init__(self, value):
+ self.value = value
+ def __int__(self):
+ return self.value
+
+ for xx in [decimal.Decimal(10),
+ decimal.Decimal('10.9'),
+ Number(10)]:
+ self.assertEqual(datetime(10, 10, 10, 10, 10, 10, 10),
+ datetime(xx, xx, xx, xx, xx, xx, xx))
+
+ with self.assertRaisesRegex(TypeError, '^an integer is required '
+ '\(got type str\)$'):
+ datetime(10, 10, '10')
+
+ f10 = Number(10.9)
+ with self.assertRaisesRegex(TypeError, '^__int__ returned non-int '
+ '\(type float\)$'):
+ datetime(10, 10, f10)
+
+ class Float(float):
+ pass
+ s10 = Float(10.9)
+ with self.assertRaisesRegex(TypeError, '^integer argument expected, '
+ 'got float$'):
+ datetime(10, 10, s10)
+
+ with self.assertRaises(TypeError):
+ datetime(10., 10, 10)
+ with self.assertRaises(TypeError):
+ datetime(10, 10., 10)
+ with self.assertRaises(TypeError):
+ datetime(10, 10, 10.)
+ with self.assertRaises(TypeError):
+ datetime(10, 10, 10, 10.)
+ with self.assertRaises(TypeError):
+ datetime(10, 10, 10, 10, 10.)
+ with self.assertRaises(TypeError):
+ datetime(10, 10, 10, 10, 10, 10.)
+ with self.assertRaises(TypeError):
+ datetime(10, 10, 10, 10, 10, 10, 10.)
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/eintrdata/eintr_tester.py b/Lib/test/eintrdata/eintr_tester.py
new file mode 100644
index 0000000000..9931a5515b
--- /dev/null
+++ b/Lib/test/eintrdata/eintr_tester.py
@@ -0,0 +1,481 @@
+"""
+This test suite exercises some system calls subject to interruption with EINTR,
+to check that it is actually handled transparently.
+It is intended to be run by the main test suite within a child process, to
+ensure there is no background thread running (so that signals are delivered to
+the correct thread).
+Signals are generated in-process using setitimer(ITIMER_REAL), which allows
+sub-second periodicity (contrarily to signal()).
+"""
+
+import contextlib
+import io
+import os
+import select
+import signal
+import socket
+import subprocess
+import sys
+import time
+import unittest
+
+from test import support
+
+@contextlib.contextmanager
+def kill_on_error(proc):
+ """Context manager killing the subprocess if a Python exception is raised."""
+ with proc:
+ try:
+ yield proc
+ except:
+ proc.kill()
+ raise
+
+
+@unittest.skipUnless(hasattr(signal, "setitimer"), "requires setitimer()")
+class EINTRBaseTest(unittest.TestCase):
+ """ Base class for EINTR tests. """
+
+ # delay for initial signal delivery
+ signal_delay = 0.1
+ # signal delivery periodicity
+ signal_period = 0.1
+ # default sleep time for tests - should obviously have:
+ # sleep_time > signal_period
+ sleep_time = 0.2
+
+ @classmethod
+ def setUpClass(cls):
+ cls.orig_handler = signal.signal(signal.SIGALRM, lambda *args: None)
+ signal.setitimer(signal.ITIMER_REAL, cls.signal_delay,
+ cls.signal_period)
+
+ @classmethod
+ def stop_alarm(cls):
+ signal.setitimer(signal.ITIMER_REAL, 0, 0)
+
+ @classmethod
+ def tearDownClass(cls):
+ cls.stop_alarm()
+ signal.signal(signal.SIGALRM, cls.orig_handler)
+
+ def subprocess(self, *args, **kw):
+ cmd_args = (sys.executable, '-c') + args
+ return subprocess.Popen(cmd_args, **kw)
+
+
+@unittest.skipUnless(hasattr(signal, "setitimer"), "requires setitimer()")
+class OSEINTRTest(EINTRBaseTest):
+ """ EINTR tests for the os module. """
+
+ def new_sleep_process(self):
+ code = 'import time; time.sleep(%r)' % self.sleep_time
+ return self.subprocess(code)
+
+ def _test_wait_multiple(self, wait_func):
+ num = 3
+ processes = [self.new_sleep_process() for _ in range(num)]
+ for _ in range(num):
+ wait_func()
+
+ def test_wait(self):
+ self._test_wait_multiple(os.wait)
+
+ @unittest.skipUnless(hasattr(os, 'wait3'), 'requires wait3()')
+ def test_wait3(self):
+ self._test_wait_multiple(lambda: os.wait3(0))
+
+ def _test_wait_single(self, wait_func):
+ proc = self.new_sleep_process()
+ wait_func(proc.pid)
+
+ def test_waitpid(self):
+ self._test_wait_single(lambda pid: os.waitpid(pid, 0))
+
+ @unittest.skipUnless(hasattr(os, 'wait4'), 'requires wait4()')
+ def test_wait4(self):
+ self._test_wait_single(lambda pid: os.wait4(pid, 0))
+
+ def test_read(self):
+ rd, wr = os.pipe()
+ self.addCleanup(os.close, rd)
+ # wr closed explicitly by parent
+
+ # the payload below are smaller than PIPE_BUF, hence the writes will be
+ # atomic
+ datas = [b"hello", b"world", b"spam"]
+
+ code = '\n'.join((
+ 'import os, sys, time',
+ '',
+ 'wr = int(sys.argv[1])',
+ 'datas = %r' % datas,
+ 'sleep_time = %r' % self.sleep_time,
+ '',
+ 'for data in datas:',
+ ' # let the parent block on read()',
+ ' time.sleep(sleep_time)',
+ ' os.write(wr, data)',
+ ))
+
+ proc = self.subprocess(code, str(wr), pass_fds=[wr])
+ with kill_on_error(proc):
+ os.close(wr)
+ for data in datas:
+ self.assertEqual(data, os.read(rd, len(data)))
+ self.assertEqual(proc.wait(), 0)
+
+ def test_write(self):
+ rd, wr = os.pipe()
+ self.addCleanup(os.close, wr)
+ # rd closed explicitly by parent
+
+ # we must write enough data for the write() to block
+ data = b"x" * support.PIPE_MAX_SIZE
+
+ code = '\n'.join((
+ 'import io, os, sys, time',
+ '',
+ 'rd = int(sys.argv[1])',
+ 'sleep_time = %r' % self.sleep_time,
+ 'data = b"x" * %s' % support.PIPE_MAX_SIZE,
+ 'data_len = len(data)',
+ '',
+ '# let the parent block on write()',
+ 'time.sleep(sleep_time)',
+ '',
+ 'read_data = io.BytesIO()',
+ 'while len(read_data.getvalue()) < data_len:',
+ ' chunk = os.read(rd, 2 * data_len)',
+ ' read_data.write(chunk)',
+ '',
+ 'value = read_data.getvalue()',
+ 'if value != data:',
+ ' raise Exception("read error: %s vs %s bytes"',
+ ' % (len(value), data_len))',
+ ))
+
+ proc = self.subprocess(code, str(rd), pass_fds=[rd])
+ with kill_on_error(proc):
+ os.close(rd)
+ written = 0
+ while written < len(data):
+ written += os.write(wr, memoryview(data)[written:])
+ self.assertEqual(proc.wait(), 0)
+
+
+@unittest.skipUnless(hasattr(signal, "setitimer"), "requires setitimer()")
+class SocketEINTRTest(EINTRBaseTest):
+ """ EINTR tests for the socket module. """
+
+ @unittest.skipUnless(hasattr(socket, 'socketpair'), 'needs socketpair()')
+ def _test_recv(self, recv_func):
+ rd, wr = socket.socketpair()
+ self.addCleanup(rd.close)
+ # wr closed explicitly by parent
+
+ # single-byte payload guard us against partial recv
+ datas = [b"x", b"y", b"z"]
+
+ code = '\n'.join((
+ 'import os, socket, sys, time',
+ '',
+ 'fd = int(sys.argv[1])',
+ 'family = %s' % int(wr.family),
+ 'sock_type = %s' % int(wr.type),
+ 'datas = %r' % datas,
+ 'sleep_time = %r' % self.sleep_time,
+ '',
+ 'wr = socket.fromfd(fd, family, sock_type)',
+ 'os.close(fd)',
+ '',
+ 'with wr:',
+ ' for data in datas:',
+ ' # let the parent block on recv()',
+ ' time.sleep(sleep_time)',
+ ' wr.sendall(data)',
+ ))
+
+ fd = wr.fileno()
+ proc = self.subprocess(code, str(fd), pass_fds=[fd])
+ with kill_on_error(proc):
+ wr.close()
+ for data in datas:
+ self.assertEqual(data, recv_func(rd, len(data)))
+ self.assertEqual(proc.wait(), 0)
+
+ def test_recv(self):
+ self._test_recv(socket.socket.recv)
+
+ @unittest.skipUnless(hasattr(socket.socket, 'recvmsg'), 'needs recvmsg()')
+ def test_recvmsg(self):
+ self._test_recv(lambda sock, data: sock.recvmsg(data)[0])
+
+ def _test_send(self, send_func):
+ rd, wr = socket.socketpair()
+ self.addCleanup(wr.close)
+ # rd closed explicitly by parent
+
+ # we must send enough data for the send() to block
+ data = b"xyz" * (support.SOCK_MAX_SIZE // 3)
+
+ code = '\n'.join((
+ 'import os, socket, sys, time',
+ '',
+ 'fd = int(sys.argv[1])',
+ 'family = %s' % int(rd.family),
+ 'sock_type = %s' % int(rd.type),
+ 'sleep_time = %r' % self.sleep_time,
+ 'data = b"xyz" * %s' % (support.SOCK_MAX_SIZE // 3),
+ 'data_len = len(data)',
+ '',
+ 'rd = socket.fromfd(fd, family, sock_type)',
+ 'os.close(fd)',
+ '',
+ 'with rd:',
+ ' # let the parent block on send()',
+ ' time.sleep(sleep_time)',
+ '',
+ ' received_data = bytearray(data_len)',
+ ' n = 0',
+ ' while n < data_len:',
+ ' n += rd.recv_into(memoryview(received_data)[n:])',
+ '',
+ 'if received_data != data:',
+ ' raise Exception("recv error: %s vs %s bytes"',
+ ' % (len(received_data), data_len))',
+ ))
+
+ fd = rd.fileno()
+ proc = self.subprocess(code, str(fd), pass_fds=[fd])
+ with kill_on_error(proc):
+ rd.close()
+ written = 0
+ while written < len(data):
+ sent = send_func(wr, memoryview(data)[written:])
+ # sendall() returns None
+ written += len(data) if sent is None else sent
+ self.assertEqual(proc.wait(), 0)
+
+ def test_send(self):
+ self._test_send(socket.socket.send)
+
+ def test_sendall(self):
+ self._test_send(socket.socket.sendall)
+
+ @unittest.skipUnless(hasattr(socket.socket, 'sendmsg'), 'needs sendmsg()')
+ def test_sendmsg(self):
+ self._test_send(lambda sock, data: sock.sendmsg([data]))
+
+ def test_accept(self):
+ sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ self.addCleanup(sock.close)
+
+ sock.bind((support.HOST, 0))
+ port = sock.getsockname()[1]
+ sock.listen()
+
+ code = '\n'.join((
+ 'import socket, time',
+ '',
+ 'host = %r' % support.HOST,
+ 'port = %s' % port,
+ 'sleep_time = %r' % self.sleep_time,
+ '',
+ '# let parent block on accept()',
+ 'time.sleep(sleep_time)',
+ 'with socket.create_connection((host, port)):',
+ ' time.sleep(sleep_time)',
+ ))
+
+ proc = self.subprocess(code)
+ with kill_on_error(proc):
+ client_sock, _ = sock.accept()
+ client_sock.close()
+ self.assertEqual(proc.wait(), 0)
+
+ # Issue #25122: There is a race condition in the FreeBSD kernel on
+ # handling signals in the FIFO device. Skip the test until the bug is
+ # fixed in the kernel.
+ # https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203162
+ @support.requires_freebsd_version(10, 3)
+ @unittest.skipUnless(hasattr(os, 'mkfifo'), 'needs mkfifo()')
+ def _test_open(self, do_open_close_reader, do_open_close_writer):
+ filename = support.TESTFN
+
+ # Use a fifo: until the child opens it for reading, the parent will
+ # block when trying to open it for writing.
+ support.unlink(filename)
+ os.mkfifo(filename)
+ self.addCleanup(support.unlink, filename)
+
+ code = '\n'.join((
+ 'import os, time',
+ '',
+ 'path = %a' % filename,
+ 'sleep_time = %r' % self.sleep_time,
+ '',
+ '# let the parent block',
+ 'time.sleep(sleep_time)',
+ '',
+ do_open_close_reader,
+ ))
+
+ proc = self.subprocess(code)
+ with kill_on_error(proc):
+ do_open_close_writer(filename)
+ self.assertEqual(proc.wait(), 0)
+
+ def python_open(self, path):
+ fp = open(path, 'w')
+ fp.close()
+
+ def test_open(self):
+ self._test_open("fp = open(path, 'r')\nfp.close()",
+ self.python_open)
+
+ @unittest.skipIf(sys.platform == 'darwin', "hangs under OS X; see issue #25234")
+ def os_open(self, path):
+ fd = os.open(path, os.O_WRONLY)
+ os.close(fd)
+
+ @unittest.skipIf(sys.platform == "darwin", "hangs under OS X; see issue #25234")
+ def test_os_open(self):
+ self._test_open("fd = os.open(path, os.O_RDONLY)\nos.close(fd)",
+ self.os_open)
+
+
+@unittest.skipUnless(hasattr(signal, "setitimer"), "requires setitimer()")
+class TimeEINTRTest(EINTRBaseTest):
+ """ EINTR tests for the time module. """
+
+ def test_sleep(self):
+ t0 = time.monotonic()
+ time.sleep(self.sleep_time)
+ self.stop_alarm()
+ dt = time.monotonic() - t0
+ self.assertGreaterEqual(dt, self.sleep_time)
+
+
+@unittest.skipUnless(hasattr(signal, "setitimer"), "requires setitimer()")
+class SignalEINTRTest(EINTRBaseTest):
+ """ EINTR tests for the signal module. """
+
+ @unittest.skipUnless(hasattr(signal, 'sigtimedwait'),
+ 'need signal.sigtimedwait()')
+ def test_sigtimedwait(self):
+ t0 = time.monotonic()
+ signal.sigtimedwait([signal.SIGUSR1], self.sleep_time)
+ dt = time.monotonic() - t0
+ self.assertGreaterEqual(dt, self.sleep_time)
+
+ @unittest.skipUnless(hasattr(signal, 'sigwaitinfo'),
+ 'need signal.sigwaitinfo()')
+ def test_sigwaitinfo(self):
+ # Issue #25277, #25868: give a few miliseconds to the parent process
+ # between os.write() and signal.sigwaitinfo() to works around a race
+ # condition
+ self.sleep_time = 0.100
+
+ signum = signal.SIGUSR1
+ pid = os.getpid()
+
+ old_handler = signal.signal(signum, lambda *args: None)
+ self.addCleanup(signal.signal, signum, old_handler)
+
+ rpipe, wpipe = os.pipe()
+
+ code = '\n'.join((
+ 'import os, time',
+ 'pid = %s' % os.getpid(),
+ 'signum = %s' % int(signum),
+ 'sleep_time = %r' % self.sleep_time,
+ 'rpipe = %r' % rpipe,
+ 'os.read(rpipe, 1)',
+ 'os.close(rpipe)',
+ 'time.sleep(sleep_time)',
+ 'os.kill(pid, signum)',
+ ))
+
+ t0 = time.monotonic()
+ proc = self.subprocess(code, pass_fds=(rpipe,))
+ os.close(rpipe)
+ with kill_on_error(proc):
+ # sync child-parent
+ os.write(wpipe, b'x')
+ os.close(wpipe)
+
+ # parent
+ signal.sigwaitinfo([signum])
+ dt = time.monotonic() - t0
+ self.assertEqual(proc.wait(), 0)
+
+ self.assertGreaterEqual(dt, self.sleep_time)
+
+
+@unittest.skipUnless(hasattr(signal, "setitimer"), "requires setitimer()")
+class SelectEINTRTest(EINTRBaseTest):
+ """ EINTR tests for the select module. """
+
+ def test_select(self):
+ t0 = time.monotonic()
+ select.select([], [], [], self.sleep_time)
+ dt = time.monotonic() - t0
+ self.stop_alarm()
+ self.assertGreaterEqual(dt, self.sleep_time)
+
+ @unittest.skipUnless(hasattr(select, 'poll'), 'need select.poll')
+ def test_poll(self):
+ poller = select.poll()
+
+ t0 = time.monotonic()
+ poller.poll(self.sleep_time * 1e3)
+ dt = time.monotonic() - t0
+ self.stop_alarm()
+ self.assertGreaterEqual(dt, self.sleep_time)
+
+ @unittest.skipUnless(hasattr(select, 'epoll'), 'need select.epoll')
+ def test_epoll(self):
+ poller = select.epoll()
+ self.addCleanup(poller.close)
+
+ t0 = time.monotonic()
+ poller.poll(self.sleep_time)
+ dt = time.monotonic() - t0
+ self.stop_alarm()
+ self.assertGreaterEqual(dt, self.sleep_time)
+
+ @unittest.skipUnless(hasattr(select, 'kqueue'), 'need select.kqueue')
+ def test_kqueue(self):
+ kqueue = select.kqueue()
+ self.addCleanup(kqueue.close)
+
+ t0 = time.monotonic()
+ kqueue.control(None, 1, self.sleep_time)
+ dt = time.monotonic() - t0
+ self.stop_alarm()
+ self.assertGreaterEqual(dt, self.sleep_time)
+
+ @unittest.skipUnless(hasattr(select, 'devpoll'), 'need select.devpoll')
+ def test_devpoll(self):
+ poller = select.devpoll()
+ self.addCleanup(poller.close)
+
+ t0 = time.monotonic()
+ poller.poll(self.sleep_time * 1e3)
+ dt = time.monotonic() - t0
+ self.stop_alarm()
+ self.assertGreaterEqual(dt, self.sleep_time)
+
+
+def test_main():
+ support.run_unittest(
+ OSEINTRTest,
+ SocketEINTRTest,
+ TimeEINTRTest,
+ SignalEINTRTest,
+ SelectEINTRTest)
+
+
+if __name__ == "__main__":
+ test_main()
diff --git a/Lib/test/exception_hierarchy.txt b/Lib/test/exception_hierarchy.txt
index 1c1f69f36b..05137654de 100644
--- a/Lib/test/exception_hierarchy.txt
+++ b/Lib/test/exception_hierarchy.txt
@@ -4,6 +4,7 @@ BaseException
+-- GeneratorExit
+-- Exception
+-- StopIteration
+ +-- StopAsyncIteration
+-- ArithmeticError
| +-- FloatingPointError
| +-- OverflowError
@@ -38,6 +39,7 @@ BaseException
+-- ReferenceError
+-- RuntimeError
| +-- NotImplementedError
+ | +-- RecursionError
+-- SyntaxError
| +-- IndentationError
| +-- TabError
diff --git a/Lib/test/fork_wait.py b/Lib/test/fork_wait.py
index 19b54ec736..713039dd82 100644
--- a/Lib/test/fork_wait.py
+++ b/Lib/test/fork_wait.py
@@ -48,7 +48,12 @@ class ForkWait(unittest.TestCase):
for i in range(NUM_THREADS):
_thread.start_new(self.f, (i,))
- time.sleep(LONGSLEEP)
+ # busy-loop to wait for threads
+ deadline = time.monotonic() + 10.0
+ while len(self.alive) < NUM_THREADS:
+ time.sleep(0.1)
+ if deadline < time.monotonic():
+ break
a = sorted(self.alive.keys())
self.assertEqual(a, list(range(NUM_THREADS)))
diff --git a/Lib/test/imghdrdata/python.exr b/Lib/test/imghdrdata/python.exr
new file mode 100644
index 0000000000..773c81ee1f
--- /dev/null
+++ b/Lib/test/imghdrdata/python.exr
Binary files differ
diff --git a/Lib/test/imghdrdata/python.webp b/Lib/test/imghdrdata/python.webp
new file mode 100644
index 0000000000..e824ec7fb1
--- /dev/null
+++ b/Lib/test/imghdrdata/python.webp
Binary files differ
diff --git a/Lib/test/imp_dummy.py b/Lib/test/imp_dummy.py
new file mode 100644
index 0000000000..2a4deb4954
--- /dev/null
+++ b/Lib/test/imp_dummy.py
@@ -0,0 +1,3 @@
+# Fodder for test of issue24748 in test_imp
+
+dummy_name = True
diff --git a/Lib/test/inspect_fodder.py b/Lib/test/inspect_fodder.py
index 0c1d8103e9..711badad84 100644
--- a/Lib/test/inspect_fodder.py
+++ b/Lib/test/inspect_fodder.py
@@ -45,9 +45,19 @@ class StupidGit:
self.ex = sys.exc_info()
self.tr = inspect.trace()
-# line 48
+ @property
+ def contradiction(self):
+ 'The automatic gainsaying.'
+ pass
+
+# line 53
class MalodorousPervert(StupidGit):
- pass
+ def abuse(self, a, b, c):
+ pass
+
+ @property
+ def contradiction(self):
+ pass
Tit = MalodorousPervert
@@ -55,4 +65,12 @@ class ParrotDroppings:
pass
class FesteringGob(MalodorousPervert, ParrotDroppings):
+ def abuse(self, a, b, c):
+ pass
+
+ @property
+ def contradiction(self):
+ pass
+
+async def lobbest(grenade):
pass
diff --git a/Lib/test/inspect_fodder2.py b/Lib/test/inspect_fodder2.py
index bd7106fea8..c6987ea2c9 100644
--- a/Lib/test/inspect_fodder2.py
+++ b/Lib/test/inspect_fodder2.py
@@ -109,3 +109,31 @@ def annotated(arg1: list):
#line 109
def keyword_only_arg(*, arg):
pass
+
+@wrap(lambda: None)
+def func114():
+ return 115
+
+class ClassWithMethod:
+ def method(self):
+ pass
+
+from functools import wraps
+
+def decorator(func):
+ @wraps(func)
+ def fake():
+ return 42
+ return fake
+
+#line 129
+@decorator
+def real():
+ return 20
+
+#line 134
+class cls135:
+ def func136():
+ def func137():
+ never_reached1
+ never_reached2
diff --git a/Lib/test/list_tests.py b/Lib/test/list_tests.py
index 42e118ba8f..f20fdc0a5f 100644
--- a/Lib/test/list_tests.py
+++ b/Lib/test/list_tests.py
@@ -30,6 +30,12 @@ class CommonTest(seq_tests.CommonTest):
self.assertNotEqual(id(a), id(b))
self.assertEqual(a, b)
+ def test_getitem_error(self):
+ msg = "list indices must be integers or slices"
+ with self.assertRaisesRegex(TypeError, msg):
+ a = []
+ a['a'] = "python"
+
def test_repr(self):
l0 = []
l2 = [0, 1, 2]
@@ -50,7 +56,7 @@ class CommonTest(seq_tests.CommonTest):
l0 = []
for i in range(sys.getrecursionlimit() + 100):
l0 = [l0]
- self.assertRaises(RuntimeError, repr, l0)
+ self.assertRaises(RecursionError, repr, l0)
def test_print(self):
d = self.type2test(range(200))
@@ -120,6 +126,10 @@ class CommonTest(seq_tests.CommonTest):
a[-1] = 9
self.assertEqual(a, self.type2test([5,6,7,8,9]))
+ msg = "list indices must be integers or slices"
+ with self.assertRaisesRegex(TypeError, msg):
+ a['a'] = "python"
+
def test_delitem(self):
a = self.type2test([0, 1])
del a[1]
@@ -583,3 +593,14 @@ class CommonTest(seq_tests.CommonTest):
def __iter__(self):
raise KeyboardInterrupt
self.assertRaises(KeyboardInterrupt, list, F())
+
+ def test_exhausted_iterator(self):
+ a = self.type2test([1, 2, 3])
+ exhit = iter(a)
+ empit = iter(a)
+ for x in exhit: # exhaust the iterator
+ next(empit) # not exhausted
+ a.append(9)
+ self.assertEqual(list(exhit), [])
+ self.assertEqual(list(empit), [9])
+ self.assertEqual(a, self.type2test([1, 2, 3, 9]))
diff --git a/Lib/test/lock_tests.py b/Lib/test/lock_tests.py
index 462ecefb36..a64aa18cd3 100644
--- a/Lib/test/lock_tests.py
+++ b/Lib/test/lock_tests.py
@@ -86,7 +86,13 @@ class BaseLockTests(BaseTestCase):
def test_repr(self):
lock = self.locktype()
- repr(lock)
+ self.assertRegex(repr(lock), "<unlocked .* object (.*)?at .*>")
+ del lock
+
+ def test_locked_repr(self):
+ lock = self.locktype()
+ lock.acquire()
+ self.assertRegex(repr(lock), "<locked .* object (.*)?at .*>")
del lock
def test_acquire_destroy(self):
@@ -389,12 +395,13 @@ class EventTests(BaseTestCase):
self.assertEqual(results, [True] * N)
def test_reset_internal_locks(self):
+ # ensure that condition is still using a Lock after reset
evt = self.eventtype()
- old_lock = evt._cond._lock
+ with evt._cond:
+ self.assertFalse(evt._cond.acquire(False))
evt._reset_internal_locks()
- new_lock = evt._cond._lock
- self.assertIsNot(new_lock, old_lock)
- self.assertIs(type(new_lock), type(old_lock))
+ with evt._cond:
+ self.assertFalse(evt._cond.acquire(False))
class ConditionTests(BaseTestCase):
diff --git a/Lib/test/mock_socket.py b/Lib/test/mock_socket.py
index e36724f54b..b28c4732cc 100644
--- a/Lib/test/mock_socket.py
+++ b/Lib/test/mock_socket.py
@@ -35,8 +35,9 @@ class MockFile:
class MockSocket:
"""Mock socket object used by smtpd and smtplib tests.
"""
- def __init__(self):
+ def __init__(self, family=None):
global _reply_data
+ self.family = family
self.output = []
self.lines = []
if _reply_data:
@@ -101,15 +102,14 @@ class MockSocket:
return len(data)
def getpeername(self):
- return 'peer'
+ return ('peer-address', 'peer-port')
def close(self):
pass
def socket(family=None, type=None, proto=None):
- return MockSocket()
-
+ return MockSocket(family)
def create_connection(address, timeout=socket_module._GLOBAL_DEFAULT_TIMEOUT,
source_address=None):
@@ -144,13 +144,16 @@ def gethostname():
def gethostbyname(name):
return ""
+def getaddrinfo(*args, **kw):
+ return socket_module.getaddrinfo(*args, **kw)
gaierror = socket_module.gaierror
error = socket_module.error
# Constants
-AF_INET = None
-SOCK_STREAM = None
+AF_INET = socket_module.AF_INET
+AF_INET6 = socket_module.AF_INET6
+SOCK_STREAM = socket_module.SOCK_STREAM
SOL_SOCKET = None
SO_REUSEADDR = None
diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py
index b948c55407..f252a0a10f 100644
--- a/Lib/test/pickletester.py
+++ b/Lib/test/pickletester.py
@@ -1815,16 +1815,62 @@ class AbstractPickleTests(unittest.TestCase):
self.assertGreaterEqual(num_additems, 2)
def test_simple_newobj(self):
- x = object.__new__(SimpleNewObj) # avoid __init__
+ x = SimpleNewObj.__new__(SimpleNewObj, 0xface) # avoid __init__
x.abc = 666
for proto in protocols:
- s = self.dumps(x, proto)
- self.assertEqual(opcode_in_pickle(pickle.NEWOBJ, s),
- 2 <= proto < 4)
- self.assertEqual(opcode_in_pickle(pickle.NEWOBJ_EX, s),
- proto >= 4)
- y = self.loads(s) # will raise TypeError if __init__ called
- self.assert_is_copy(x, y)
+ with self.subTest(proto=proto):
+ s = self.dumps(x, proto)
+ if proto < 1:
+ self.assertIn(b'\nL64206', s) # LONG
+ else:
+ self.assertIn(b'M\xce\xfa', s) # BININT2
+ self.assertEqual(opcode_in_pickle(pickle.NEWOBJ, s),
+ 2 <= proto)
+ self.assertFalse(opcode_in_pickle(pickle.NEWOBJ_EX, s))
+ y = self.loads(s) # will raise TypeError if __init__ called
+ self.assert_is_copy(x, y)
+
+ def test_complex_newobj(self):
+ x = ComplexNewObj.__new__(ComplexNewObj, 0xface) # avoid __init__
+ x.abc = 666
+ for proto in protocols:
+ with self.subTest(proto=proto):
+ s = self.dumps(x, proto)
+ if proto < 1:
+ self.assertIn(b'\nL64206', s) # LONG
+ elif proto < 2:
+ self.assertIn(b'M\xce\xfa', s) # BININT2
+ elif proto < 4:
+ self.assertIn(b'X\x04\x00\x00\x00FACE', s) # BINUNICODE
+ else:
+ self.assertIn(b'\x8c\x04FACE', s) # SHORT_BINUNICODE
+ self.assertEqual(opcode_in_pickle(pickle.NEWOBJ, s),
+ 2 <= proto)
+ self.assertFalse(opcode_in_pickle(pickle.NEWOBJ_EX, s))
+ y = self.loads(s) # will raise TypeError if __init__ called
+ self.assert_is_copy(x, y)
+
+ def test_complex_newobj_ex(self):
+ x = ComplexNewObjEx.__new__(ComplexNewObjEx, 0xface) # avoid __init__
+ x.abc = 666
+ for proto in protocols:
+ with self.subTest(proto=proto):
+ if 2 <= proto < 4:
+ self.assertRaises(ValueError, self.dumps, x, proto)
+ continue
+ s = self.dumps(x, proto)
+ if proto < 1:
+ self.assertIn(b'\nL64206', s) # LONG
+ elif proto < 2:
+ self.assertIn(b'M\xce\xfa', s) # BININT2
+ else:
+ assert proto >= 4
+ self.assertIn(b'\x8c\x04FACE', s) # SHORT_BINUNICODE
+ self.assertFalse(opcode_in_pickle(pickle.NEWOBJ, s))
+ self.assertEqual(opcode_in_pickle(pickle.NEWOBJ_EX, s),
+ 4 <= proto)
+ y = self.loads(s) # will raise TypeError if __init__ called
+ self.assert_is_copy(x, y)
def test_newobj_list_slots(self):
x = SlotList([1, 2, 3])
@@ -1898,15 +1944,15 @@ class AbstractPickleTests(unittest.TestCase):
# 5th item is not an iterator
return dict, (), None, None, []
- # Protocol 0 is less strict and also accept iterables.
+ # Python implementation is less strict and also accepts iterables.
for proto in protocols:
try:
self.dumps(C(), proto)
- except (pickle.PickleError):
+ except pickle.PicklingError:
pass
try:
self.dumps(D(), proto)
- except (pickle.PickleError):
+ except pickle.PicklingError:
pass
def test_many_puts_and_gets(self):
@@ -2088,13 +2134,24 @@ class AbstractPickleTests(unittest.TestCase):
class B:
class C:
pass
-
- for proto in range(4, pickle.HIGHEST_PROTOCOL + 1):
+ for proto in range(pickle.HIGHEST_PROTOCOL + 1):
for obj in [Nested.A, Nested.A.B, Nested.A.B.C]:
with self.subTest(proto=proto, obj=obj):
unpickled = self.loads(self.dumps(obj, proto))
self.assertIs(obj, unpickled)
+ def test_recursive_nested_names(self):
+ global Recursive
+ class Recursive:
+ pass
+ Recursive.mod = sys.modules[Recursive.__module__]
+ Recursive.__qualname__ = 'Recursive.mod.Recursive'
+ for proto in range(pickle.HIGHEST_PROTOCOL + 1):
+ with self.subTest(proto=proto):
+ unpickled = self.loads(self.dumps(Recursive, proto))
+ self.assertIs(unpickled, Recursive)
+ del Recursive.mod # break reference loop
+
def test_py_methods(self):
global PyMethodsTest
class PyMethodsTest:
@@ -2133,7 +2190,7 @@ class AbstractPickleTests(unittest.TestCase):
(PyMethodsTest.biscuits, PyMethodsTest),
(PyMethodsTest.Nested.pie, PyMethodsTest.Nested)
)
- for proto in range(4, pickle.HIGHEST_PROTOCOL + 1):
+ for proto in range(pickle.HIGHEST_PROTOCOL + 1):
for method in py_methods:
with self.subTest(proto=proto, method=method):
unpickled = self.loads(self.dumps(method, proto))
@@ -2173,7 +2230,7 @@ class AbstractPickleTests(unittest.TestCase):
(Subclass.Nested("sweet").count, ("e",)),
(Subclass.Nested.count, (Subclass.Nested("sweet"), "e")),
)
- for proto in range(4, pickle.HIGHEST_PROTOCOL + 1):
+ for proto in range(pickle.HIGHEST_PROTOCOL + 1):
for method, args in c_methods:
with self.subTest(proto=proto, method=method):
unpickled = self.loads(self.dumps(method, proto))
@@ -2197,6 +2254,27 @@ class AbstractPickleTests(unittest.TestCase):
self.assertIn(('c%s\n%s' % (mod, name)).encode(), pickled)
self.assertIs(type(self.loads(pickled)), type(val))
+ def test_local_lookup_error(self):
+ # Test that whichmodule() errors out cleanly when looking up
+ # an assumed globally-reachable object fails.
+ def f():
+ pass
+ # Since the function is local, lookup will fail
+ for proto in range(0, pickle.HIGHEST_PROTOCOL + 1):
+ with self.assertRaises((AttributeError, pickle.PicklingError)):
+ pickletools.dis(self.dumps(f, proto))
+ # Same without a __module__ attribute (exercises a different path
+ # in _pickle.c).
+ del f.__module__
+ for proto in range(0, pickle.HIGHEST_PROTOCOL + 1):
+ with self.assertRaises((AttributeError, pickle.PicklingError)):
+ pickletools.dis(self.dumps(f, proto))
+ # Yet a different path.
+ f.__name__ = f.__qualname__
+ for proto in range(0, pickle.HIGHEST_PROTOCOL + 1):
+ with self.assertRaises((AttributeError, pickle.PicklingError)):
+ pickletools.dis(self.dumps(f, proto))
+
class BigmemPickleTests(unittest.TestCase):
@@ -2370,7 +2448,7 @@ class REX_six(object):
def __init__(self, items=None):
self.items = items if items is not None else []
def __eq__(self, other):
- return type(self) is type(other) and self.items == self.items
+ return type(self) is type(other) and self.items == other.items
def append(self, item):
self.items.append(item)
def __reduce__(self):
@@ -2383,7 +2461,7 @@ class REX_seven(object):
def __init__(self, table=None):
self.table = table if table is not None else {}
def __eq__(self, other):
- return type(self) is type(other) and self.table == self.table
+ return type(self) is type(other) and self.table == other.table
def __setitem__(self, key, value):
self.table[key] = value
def __reduce__(self):
@@ -2431,12 +2509,20 @@ myclasses = [MyInt, MyFloat,
class SlotList(MyList):
__slots__ = ["foo"]
-class SimpleNewObj(object):
- def __init__(self, a, b, c):
+class SimpleNewObj(int):
+ def __init__(self, *args, **kwargs):
# raise an error, to make sure this isn't called
raise TypeError("SimpleNewObj.__init__() didn't expect to get called")
def __eq__(self, other):
- return self.__dict__ == other.__dict__
+ return int(self) == int(other) and self.__dict__ == other.__dict__
+
+class ComplexNewObj(SimpleNewObj):
+ def __getnewargs__(self):
+ return ('%X' % self, 16)
+
+class ComplexNewObjEx(SimpleNewObj):
+ def __getnewargs_ex__(self):
+ return ('%X' % self,), {'base': 16}
class BadGetattr:
def __getattr__(self, key):
diff --git a/Lib/test/pystone.py b/Lib/test/pystone.py
index 59dd99b1bf..cf1692ec2d 100755
--- a/Lib/test/pystone.py
+++ b/Lib/test/pystone.py
@@ -41,7 +41,7 @@ Version History:
LOOPS = 50000
-from time import clock
+from time import time
__version__ = "1.2"
@@ -93,10 +93,10 @@ def Proc0(loops=LOOPS):
global PtrGlb
global PtrGlbNext
- starttime = clock()
+ starttime = time()
for i in range(loops):
pass
- nulltime = clock() - starttime
+ nulltime = time() - starttime
PtrGlbNext = Record()
PtrGlb = Record()
@@ -108,7 +108,7 @@ def Proc0(loops=LOOPS):
String1Loc = "DHRYSTONE PROGRAM, 1'ST STRING"
Array2Glob[8][7] = 10
- starttime = clock()
+ starttime = time()
for i in range(loops):
Proc5()
@@ -134,7 +134,7 @@ def Proc0(loops=LOOPS):
IntLoc2 = 7 * (IntLoc3 - IntLoc2) - IntLoc1
IntLoc1 = Proc2(IntLoc1)
- benchtime = clock() - starttime - nulltime
+ benchtime = time() - starttime - nulltime
if benchtime == 0.0:
loopsPerBenchtime = 0.0
else:
diff --git a/Lib/test/re_tests.py b/Lib/test/re_tests.py
index 7f8075ec14..8c158f883b 100755
--- a/Lib/test/re_tests.py
+++ b/Lib/test/re_tests.py
@@ -87,7 +87,7 @@ tests = [
(r'[\a][\b][\f][\n][\r][\t][\v]', '\a\b\f\n\r\t\v', SUCCEED, 'found', '\a\b\f\n\r\t\v'),
# NOTE: not an error under PCRE/PRE:
(r'\u', '', SYNTAX_ERROR), # A Perl escape
- (r'\c\e\g\h\i\j\k\m\o\p\q\y\z', 'ceghijkmopqyz', SUCCEED, 'found', 'ceghijkmopqyz'),
+ # (r'\c\e\g\h\i\j\k\m\o\p\q\y\z', 'ceghijkmopqyz', SUCCEED, 'found', 'ceghijkmopqyz'),
(r'\xff', '\377', SUCCEED, 'found', chr(255)),
# new \x semantics
(r'\x00ffffffffffffff', '\377', FAIL, 'found', chr(255)),
@@ -607,8 +607,8 @@ xyzabc
# new \x semantics
(r'\x00ff', '\377', FAIL),
# (r'\x00ff', '\377', SUCCEED, 'found', chr(255)),
- (r'\t\n\v\r\f\a\g', '\t\n\v\r\f\ag', SUCCEED, 'found', '\t\n\v\r\f\ag'),
- ('\t\n\v\r\f\a\g', '\t\n\v\r\f\ag', SUCCEED, 'found', '\t\n\v\r\f\ag'),
+ (r'\t\n\v\r\f\a', '\t\n\v\r\f\a', SUCCEED, 'found', '\t\n\v\r\f\a'),
+ ('\t\n\v\r\f\a', '\t\n\v\r\f\a', SUCCEED, 'found', '\t\n\v\r\f\a'),
(r'\t\n\v\r\f\a', '\t\n\v\r\f\a', SUCCEED, 'found', chr(9)+chr(10)+chr(11)+chr(13)+chr(12)+chr(7)),
(r'[\t][\n][\v][\r][\f][\b]', '\t\n\v\r\f\b', SUCCEED, 'found', '\t\n\v\r\f\b'),
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index ebdcdad611..fecfd0967a 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -322,6 +322,8 @@ def _create_parser():
group.add_argument('-F', '--forever', action='store_true',
help='run the specified tests in a loop, until an '
'error happens')
+ group.add_argument('-P', '--pgo', dest='pgo', action='store_true',
+ help='enable Profile Guided Optimization training')
parser.add_argument('args', nargs=argparse.REMAINDER,
help=argparse.SUPPRESS)
@@ -361,7 +363,7 @@ def _parse_args(args, **kwargs):
findleaks=False, use_resources=None, trace=False, coverdir='coverage',
runleaks=False, huntrleaks=False, verbose2=False, print_slow=False,
random_seed=None, use_mp=None, verbose3=False, forever=False,
- header=False, failfast=False, match_tests=None)
+ header=False, failfast=False, match_tests=None, pgo=False)
for k, v in kwargs.items():
if not hasattr(ns, k):
raise TypeError('%r is an invalid keyword argument '
@@ -435,14 +437,16 @@ def run_test_in_subprocess(testname, ns):
from subprocess import Popen, PIPE
base_cmd = ([sys.executable] + support.args_from_interpreter_flags() +
['-X', 'faulthandler', '-m', 'test.regrtest'])
-
+ # required to spawn a new process with PGO flag on/off
+ if ns.pgo:
+ base_cmd = base_cmd + ['--pgo']
slaveargs = (
(testname, ns.verbose, ns.quiet),
dict(huntrleaks=ns.huntrleaks,
use_resources=ns.use_resources,
output_on_failure=ns.verbose3,
timeout=ns.timeout, failfast=ns.failfast,
- match_tests=ns.match_tests))
+ match_tests=ns.match_tests, pgo=ns.pgo))
# Running the child from the same working directory as regrtest's original
# invocation ensures that TEMPDIR for the child is the same when
# sysconfig.is_python_build() is true. See issue 15300.
@@ -507,7 +511,13 @@ def main(tests=None, **kwargs):
import gc
gc.set_threshold(ns.threshold)
if ns.nowindows:
+ print('The --nowindows (-n) option is deprecated. '
+ 'Use -vv to display assertions in stderr.')
+ try:
import msvcrt
+ except ImportError:
+ pass
+ else:
msvcrt.SetErrorMode(msvcrt.SEM_FAILCRITICALERRORS|
msvcrt.SEM_NOALIGNMENTFAULTEXCEPT|
msvcrt.SEM_NOGPFAULTERRORBOX|
@@ -519,8 +529,11 @@ def main(tests=None, **kwargs):
pass
else:
for m in [msvcrt.CRT_WARN, msvcrt.CRT_ERROR, msvcrt.CRT_ASSERT]:
- msvcrt.CrtSetReportMode(m, msvcrt.CRTDBG_MODE_FILE)
- msvcrt.CrtSetReportFile(m, msvcrt.CRTDBG_FILE_STDERR)
+ if ns.verbose and ns.verbose >= 2:
+ msvcrt.CrtSetReportMode(m, msvcrt.CRTDBG_MODE_FILE)
+ msvcrt.CrtSetReportFile(m, msvcrt.CRTDBG_FILE_STDERR)
+ else:
+ msvcrt.CrtSetReportMode(m, 0)
if ns.wait:
input("Press any key to continue...")
@@ -596,13 +609,14 @@ def main(tests=None, **kwargs):
ns.args = []
# For a partial run, we do not need to clutter the output.
- if ns.verbose or ns.header or not (ns.quiet or ns.single or tests or ns.args):
+ if (ns.verbose or ns.header or
+ not (ns.pgo or ns.quiet or ns.single or tests or ns.args)):
# Print basic platform information
print("==", platform.python_implementation(), *sys.version.split())
print("== ", platform.platform(aliased=True),
- "%s-endian" % sys.byteorder)
+ "%s-endian" % sys.byteorder)
print("== ", "hash algorithm:", sys.hash_info.algorithm,
- "64bit" if sys.maxsize > 2**32 else "32bit")
+ "64bit" if sys.maxsize > 2**32 else "32bit")
print("== ", os.getcwd())
print("Testing with flags:", sys.flags)
@@ -645,7 +659,8 @@ def main(tests=None, **kwargs):
def accumulate_result(test, result):
ok, test_time = result
- test_times.append((test_time, test))
+ if ok not in (CHILD_ERROR, INTERRUPTED):
+ test_times.append((test_time, test))
if ok == PASSED:
good.append(test)
elif ok == FAILED:
@@ -722,13 +737,16 @@ def main(tests=None, **kwargs):
continue
accumulate_result(test, result)
if not ns.quiet:
- fmt = "[{1:{0}}{2}/{3}] {4}" if bad else "[{1:{0}}{2}] {4}"
+ if bad and not ns.pgo:
+ fmt = "[{1:{0}}{2}/{3}] {4}"
+ else:
+ fmt = "[{1:{0}}{2}] {4}"
print(fmt.format(
test_count_width, test_index, test_count,
len(bad), test))
if stdout:
print(stdout)
- if stderr:
+ if stderr and not ns.pgo:
print(stderr, file=sys.stderr)
sys.stdout.flush()
sys.stderr.flush()
@@ -745,7 +763,10 @@ def main(tests=None, **kwargs):
else:
for test_index, test in enumerate(tests, 1):
if not ns.quiet:
- fmt = "[{1:{0}}{2}/{3}] {4}" if bad else "[{1:{0}}{2}] {4}"
+ if bad and not ns.pgo:
+ fmt = "[{1:{0}}{2}/{3}] {4}"
+ else:
+ fmt = "[{1:{0}}{2}] {4}"
print(fmt.format(
test_count_width, test_index, test_count, len(bad), test))
sys.stdout.flush()
@@ -760,13 +781,11 @@ def main(tests=None, **kwargs):
ns.huntrleaks,
output_on_failure=ns.verbose3,
timeout=ns.timeout, failfast=ns.failfast,
- match_tests=ns.match_tests)
+ match_tests=ns.match_tests, pgo=ns.pgo)
accumulate_result(test, result)
except KeyboardInterrupt:
interrupted = True
break
- except:
- raise
if ns.findleaks:
gc.collect()
if gc.garbage:
@@ -781,14 +800,14 @@ def main(tests=None, **kwargs):
if module not in save_modules and module.startswith("test."):
support.unload(module)
- if interrupted:
+ if interrupted and not ns.pgo:
# print a newline after ^C
print()
print("Test suite interrupted by signal SIGINT.")
omitted = set(selected) - set(good) - set(bad) - set(skipped)
print(count(len(omitted), "test"), "omitted:")
printlist(omitted)
- if good and not ns.quiet:
+ if good and not ns.quiet and not ns.pgo:
if not bad and not skipped and not interrupted and len(good) > 1:
print("All", end=' ')
print(count(len(good), "test"), "OK.")
@@ -797,26 +816,27 @@ def main(tests=None, **kwargs):
print("10 slowest tests:")
for time, test in test_times[:10]:
print("%s: %.1fs" % (test, time))
- if bad:
+ if bad and not ns.pgo:
print(count(len(bad), "test"), "failed:")
printlist(bad)
- if environment_changed:
+ if environment_changed and not ns.pgo:
print("{} altered the execution environment:".format(
count(len(environment_changed), "test")))
printlist(environment_changed)
- if skipped and not ns.quiet:
+ if skipped and not ns.quiet and not ns.pgo:
print(count(len(skipped), "test"), "skipped:")
printlist(skipped)
if ns.verbose2 and bad:
print("Re-running failed tests in verbose mode")
for test in bad[:]:
- print("Re-running test %r in verbose mode" % test)
+ if not ns.pgo:
+ print("Re-running test %r in verbose mode" % test)
sys.stdout.flush()
try:
ns.verbose = True
ok = runtest(test, True, ns.quiet, ns.huntrleaks,
- timeout=ns.timeout)
+ timeout=ns.timeout, pgo=ns.pgo)
except KeyboardInterrupt:
# print a newline separate from the ^C
print()
@@ -915,7 +935,7 @@ def replace_stdout():
def runtest(test, verbose, quiet,
huntrleaks=False, use_resources=None,
output_on_failure=False, failfast=False, match_tests=None,
- timeout=None):
+ timeout=None, *, pgo=False):
"""Run a single test.
test -- the name of the test
@@ -928,6 +948,8 @@ def runtest(test, verbose, quiet,
timeout -- dump the traceback and exit if a test takes more than
timeout seconds
failfast, match_tests -- See regrtest command-line flags for these.
+ pgo -- if true, do not print unnecessary info when running the test
+ for Profile Guided Optimization build
Returns the tuple result, test_time, where result is one of the constants:
INTERRUPTED KeyboardInterrupt when run under -j
@@ -937,7 +959,6 @@ def runtest(test, verbose, quiet,
FAILED test failed
PASSED test passed
"""
-
if use_resources is not None:
support.use_resources = use_resources
use_timeout = (timeout is not None)
@@ -967,8 +988,8 @@ def runtest(test, verbose, quiet,
sys.stdout = stream
sys.stderr = stream
result = runtest_inner(test, verbose, quiet, huntrleaks,
- display_failure=False)
- if result[0] == FAILED:
+ display_failure=False, pgo=pgo)
+ if result[0] == FAILED and not pgo:
output = stream.getvalue()
orig_stderr.write(output)
orig_stderr.flush()
@@ -978,7 +999,7 @@ def runtest(test, verbose, quiet,
else:
support.verbose = verbose # Tell tests to be moderately quiet
result = runtest_inner(test, verbose, quiet, huntrleaks,
- display_failure=not verbose)
+ display_failure=not verbose, pgo=pgo)
return result
finally:
if use_timeout:
@@ -1010,10 +1031,11 @@ class saved_test_environment:
changed = False
- def __init__(self, testname, verbose=0, quiet=False):
+ def __init__(self, testname, verbose=0, quiet=False, *, pgo=False):
self.testname = testname
self.verbose = verbose
self.quiet = quiet
+ self.pgo = pgo
# To add things to save and restore, add a name XXX to the resources list
# and add corresponding get_XXX/restore_XXX functions. get_XXX should
@@ -1035,6 +1057,7 @@ class saved_test_environment:
'multiprocessing.process._dangling', 'threading._dangling',
'sysconfig._CONFIG_VARS', 'sysconfig._INSTALL_SCHEMES',
'files', 'locale', 'warnings.showwarning',
+ 'shutil_archive_formats', 'shutil_unpack_formats',
)
def get_sys_argv(self):
@@ -1242,11 +1265,11 @@ class saved_test_environment:
if current != original:
self.changed = True
restore(original)
- if not self.quiet:
+ if not self.quiet and not self.pgo:
print("Warning -- {} was modified by {}".format(
name, self.testname),
file=sys.stderr)
- if self.verbose > 1:
+ if self.verbose > 1 and not self.pgo:
print(" Before: {}\n After: {} ".format(
original, current),
file=sys.stderr)
@@ -1254,7 +1277,7 @@ class saved_test_environment:
def runtest_inner(test, verbose, quiet,
- huntrleaks=False, display_failure=True):
+ huntrleaks=False, display_failure=True, pgo=False):
support.unload(test)
test_time = 0.0
@@ -1265,7 +1288,7 @@ def runtest_inner(test, verbose, quiet,
else:
# Always import it from the test package
abstest = 'test.' + test
- with saved_test_environment(test, verbose, quiet) as environment:
+ with saved_test_environment(test, verbose, quiet, pgo=pgo) as environment:
start_time = time.time()
the_module = importlib.import_module(abstest)
# If the test has a test_main, that will run the appropriate
@@ -1275,33 +1298,39 @@ def runtest_inner(test, verbose, quiet,
def test_runner():
loader = unittest.TestLoader()
tests = loader.loadTestsFromModule(the_module)
+ for error in loader.errors:
+ print(error, file=sys.stderr)
+ if loader.errors:
+ raise Exception("errors while loading tests")
support.run_unittest(tests)
test_runner()
if huntrleaks:
refleak = dash_R(the_module, test, test_runner, huntrleaks)
test_time = time.time() - start_time
except support.ResourceDenied as msg:
- if not quiet:
+ if not quiet and not pgo:
print(test, "skipped --", msg)
sys.stdout.flush()
return RESOURCE_DENIED, test_time
except unittest.SkipTest as msg:
- if not quiet:
+ if not quiet and not pgo:
print(test, "skipped --", msg)
sys.stdout.flush()
return SKIPPED, test_time
except KeyboardInterrupt:
raise
except support.TestFailed as msg:
- if display_failure:
- print("test", test, "failed --", msg, file=sys.stderr)
- else:
- print("test", test, "failed", file=sys.stderr)
+ if not pgo:
+ if display_failure:
+ print("test", test, "failed --", msg, file=sys.stderr)
+ else:
+ print("test", test, "failed", file=sys.stderr)
sys.stderr.flush()
return FAILED, test_time
except:
msg = traceback.format_exc()
- print("test", test, "crashed --", msg, file=sys.stderr)
+ if not pgo:
+ print("test", test, "crashed --", msg, file=sys.stderr)
sys.stderr.flush()
return FAILED, test_time
else:
diff --git a/Lib/test/seq_tests.py b/Lib/test/seq_tests.py
index 24162494dd..72f4845a97 100644
--- a/Lib/test/seq_tests.py
+++ b/Lib/test/seq_tests.py
@@ -5,6 +5,7 @@ Tests common to tuple, list and UserList.UserList
import unittest
import sys
import pickle
+from test import support
# Various iterables
# This is used for checking the constructor (here and in test_deque.py)
@@ -408,3 +409,7 @@ class CommonTest(unittest.TestCase):
lst2 = pickle.loads(pickle.dumps(lst, proto))
self.assertEqual(lst2, lst)
self.assertNotEqual(id(lst2), id(lst))
+
+ def test_free_after_iterating(self):
+ support.check_free_after_iterating(self, iter, self.type2test)
+ support.check_free_after_iterating(self, reversed, self.type2test)
diff --git a/Lib/test/ssl_servers.py b/Lib/test/ssl_servers.py
index 759b3f487e..f9d30cf0bd 100644
--- a/Lib/test/ssl_servers.py
+++ b/Lib/test/ssl_servers.py
@@ -150,7 +150,7 @@ class HTTPSServerThread(threading.Thread):
def make_https_server(case, *, context=None, certfile=CERTFILE,
host=HOST, handler_class=None):
if context is None:
- context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
+ context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
# We assume the certfile contains both private key and certificate
context.load_cert_chain(certfile)
server = HTTPSServerThread(context, host, handler_class)
@@ -182,6 +182,8 @@ if __name__ == "__main__":
parser.add_argument('--curve-name', dest='curve_name', type=str,
action='store',
help='curve name for EC-based Diffie-Hellman')
+ parser.add_argument('--ciphers', dest='ciphers', type=str,
+ help='allowed cipher list')
parser.add_argument('--dh', dest='dh_file', type=str, action='store',
help='PEM file containing DH parameters')
args = parser.parse_args()
@@ -192,12 +194,14 @@ if __name__ == "__main__":
else:
handler_class = RootedHTTPRequestHandler
handler_class.root = os.getcwd()
- context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
+ context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
context.load_cert_chain(CERTFILE)
if args.curve_name:
context.set_ecdh_curve(args.curve_name)
if args.dh_file:
context.load_dh_params(args.dh_file)
+ if args.ciphers:
+ context.set_ciphers(args.ciphers)
server = HTTPSServer(("", args.port), handler_class, context)
if args.verbose:
diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py
index 242a931ec6..cd3ee48a92 100644
--- a/Lib/test/string_tests.py
+++ b/Lib/test/string_tests.py
@@ -1,5 +1,5 @@
"""
-Common tests shared by test_unicode, test_userstring and test_string.
+Common tests shared by test_unicode, test_userstring and test_bytes.
"""
import unittest, string, sys, struct
@@ -51,6 +51,9 @@ class BaseTest:
else:
return obj
+ def test_fixtype(self):
+ self.assertIs(type(self.fixtype("123")), self.type2test)
+
# check that obj.method(*args) returns result
def checkequal(self, result, obj, methodname, *args, **kwargs):
result = self.fixtype(result)
@@ -365,6 +368,8 @@ class BaseTest:
sys.maxsize-2)
self.checkequal(['a|b|c|d'], 'a|b|c|d', 'split', '|', 0)
self.checkequal(['a', '', 'b||c||d'], 'a||b||c||d', 'split', '|', 2)
+ self.checkequal(['abcd'], 'abcd', 'split', '|')
+ self.checkequal([''], '', 'split', '|')
self.checkequal(['endcase ', ''], 'endcase |', 'split', '|')
self.checkequal(['', ' startcase'], '| startcase', 'split', '|')
self.checkequal(['', 'bothcase', ''], '|bothcase|', 'split', '|')
@@ -432,6 +437,8 @@ class BaseTest:
sys.maxsize-100)
self.checkequal(['a|b|c|d'], 'a|b|c|d', 'rsplit', '|', 0)
self.checkequal(['a||b||c', '', 'd'], 'a||b||c||d', 'rsplit', '|', 2)
+ self.checkequal(['abcd'], 'abcd', 'rsplit', '|')
+ self.checkequal([''], '', 'rsplit', '|')
self.checkequal(['', ' begincase'], '| begincase', 'rsplit', '|')
self.checkequal(['endcase ', ''], 'endcase |', 'rsplit', '|')
self.checkequal(['', 'bothcase', ''], '|bothcase|', 'rsplit', '|')
@@ -638,14 +645,6 @@ class BaseTest:
EQ("bobobXbobob", "bobobobXbobobob", "replace", "bobob", "bob")
EQ("BOBOBOB", "BOBOBOB", "replace", "bob", "bobby")
- # XXX Commented out. Is there any reason to support buffer objects
- # as arguments for str.replace()? GvR
-## ba = bytearray('a')
-## bb = bytearray('b')
-## EQ("bbc", "abc", "replace", ba, bb)
-## EQ("aac", "abc", "replace", bb, ba)
-
- #
self.checkequal('one@two!three!', 'one!two!three!', 'replace', '!', '@', 1)
self.checkequal('onetwothree', 'one!two!three!', 'replace', '!', '')
self.checkequal('one@two@three!', 'one!two!three!', 'replace', '!', '@', 2)
@@ -682,22 +681,6 @@ class BaseTest:
self.checkraises(OverflowError, A2_16, "replace", "A", A2_16)
self.checkraises(OverflowError, A2_16, "replace", "AA", A2_16+A2_16)
-
-
-class CommonTest(BaseTest):
- # This testcase contains test that can be used in all
- # stringlike classes. Currently this is str, unicode
- # UserString and the string module.
-
- def test_hash(self):
- # SF bug 1054139: += optimization was not invalidating cached hash value
- a = self.type2test('DNSSEC')
- b = self.type2test('')
- for c in a:
- b += c
- hash(b)
- self.assertEqual(hash(a), hash(b))
-
def test_capitalize(self):
self.checkequal(' hello ', ' hello ', 'capitalize')
self.checkequal('Hello ', 'Hello ','capitalize')
@@ -705,23 +688,6 @@ class CommonTest(BaseTest):
self.checkequal('Aaaa', 'aaaa', 'capitalize')
self.checkequal('Aaaa', 'AaAa', 'capitalize')
- # check that titlecased chars are lowered correctly
- # \u1ffc is the titlecased char
- self.checkequal('\u03a9\u0399\u1ff3\u1ff3\u1ff3',
- '\u1ff3\u1ff3\u1ffc\u1ffc', 'capitalize')
- # check with cased non-letter chars
- self.checkequal('\u24c5\u24e8\u24e3\u24d7\u24de\u24dd',
- '\u24c5\u24ce\u24c9\u24bd\u24c4\u24c3', 'capitalize')
- self.checkequal('\u24c5\u24e8\u24e3\u24d7\u24de\u24dd',
- '\u24df\u24e8\u24e3\u24d7\u24de\u24dd', 'capitalize')
- self.checkequal('\u2160\u2171\u2172',
- '\u2160\u2161\u2162', 'capitalize')
- self.checkequal('\u2160\u2171\u2172',
- '\u2170\u2171\u2172', 'capitalize')
- # check with Ll chars with no upper - nothing changes here
- self.checkequal('\u019b\u1d00\u1d86\u0221\u1fb7',
- '\u019b\u1d00\u1d86\u0221\u1fb7', 'capitalize')
-
self.checkraises(TypeError, 'hello', 'capitalize', 42)
def test_additional_split(self):
@@ -744,16 +710,21 @@ class CommonTest(BaseTest):
self.checkequal(['a'], ' a ', 'split')
self.checkequal(['a', 'b'], ' a b ', 'split')
self.checkequal(['a', 'b '], ' a b ', 'split', None, 1)
+ self.checkequal(['a b c '], ' a b c ', 'split', None, 0)
self.checkequal(['a', 'b c '], ' a b c ', 'split', None, 1)
self.checkequal(['a', 'b', 'c '], ' a b c ', 'split', None, 2)
+ self.checkequal(['a', 'b', 'c'], ' a b c ', 'split', None, 3)
self.checkequal(['a', 'b'], '\n\ta \t\r b \v ', 'split')
aaa = ' a '*20
self.checkequal(['a']*20, aaa, 'split')
self.checkequal(['a'] + [aaa[4:]], aaa, 'split', None, 1)
self.checkequal(['a']*19 + ['a '], aaa, 'split', None, 19)
- # mixed use of str and unicode
- self.checkequal(['a', 'b', 'c d'], 'a b c d', 'split', ' ', 2)
+ for b in ('arf\tbarf', 'arf\nbarf', 'arf\rbarf',
+ 'arf\fbarf', 'arf\vbarf'):
+ self.checkequal(['arf', 'barf'], b, 'split')
+ self.checkequal(['arf', 'barf'], b, 'split', None)
+ self.checkequal(['arf', 'barf'], b, 'split', None, 2)
def test_additional_rsplit(self):
self.checkequal(['this', 'is', 'the', 'rsplit', 'function'],
@@ -775,36 +746,53 @@ class CommonTest(BaseTest):
self.checkequal(['a'], ' a ', 'rsplit')
self.checkequal(['a', 'b'], ' a b ', 'rsplit')
self.checkequal([' a', 'b'], ' a b ', 'rsplit', None, 1)
+ self.checkequal([' a b c'], ' a b c ', 'rsplit',
+ None, 0)
self.checkequal([' a b','c'], ' a b c ', 'rsplit',
None, 1)
self.checkequal([' a', 'b', 'c'], ' a b c ', 'rsplit',
None, 2)
+ self.checkequal(['a', 'b', 'c'], ' a b c ', 'rsplit',
+ None, 3)
self.checkequal(['a', 'b'], '\n\ta \t\r b \v ', 'rsplit', None, 88)
aaa = ' a '*20
self.checkequal(['a']*20, aaa, 'rsplit')
self.checkequal([aaa[:-4]] + ['a'], aaa, 'rsplit', None, 1)
self.checkequal([' a a'] + ['a']*18, aaa, 'rsplit', None, 18)
- # mixed use of str and unicode
- self.checkequal(['a b', 'c', 'd'], 'a b c d', 'rsplit', ' ', 2)
+ for b in ('arf\tbarf', 'arf\nbarf', 'arf\rbarf',
+ 'arf\fbarf', 'arf\vbarf'):
+ self.checkequal(['arf', 'barf'], b, 'rsplit')
+ self.checkequal(['arf', 'barf'], b, 'rsplit', None)
+ self.checkequal(['arf', 'barf'], b, 'rsplit', None, 2)
- def test_strip(self):
+ def test_strip_whitespace(self):
self.checkequal('hello', ' hello ', 'strip')
self.checkequal('hello ', ' hello ', 'lstrip')
self.checkequal(' hello', ' hello ', 'rstrip')
self.checkequal('hello', 'hello', 'strip')
+ b = ' \t\n\r\f\vabc \t\n\r\f\v'
+ self.checkequal('abc', b, 'strip')
+ self.checkequal('abc \t\n\r\f\v', b, 'lstrip')
+ self.checkequal(' \t\n\r\f\vabc', b, 'rstrip')
+
# strip/lstrip/rstrip with None arg
self.checkequal('hello', ' hello ', 'strip', None)
self.checkequal('hello ', ' hello ', 'lstrip', None)
self.checkequal(' hello', ' hello ', 'rstrip', None)
self.checkequal('hello', 'hello', 'strip', None)
+ def test_strip(self):
# strip/lstrip/rstrip with str arg
self.checkequal('hello', 'xyzzyhelloxyzzy', 'strip', 'xyz')
self.checkequal('helloxyzzy', 'xyzzyhelloxyzzy', 'lstrip', 'xyz')
self.checkequal('xyzzyhello', 'xyzzyhelloxyzzy', 'rstrip', 'xyz')
self.checkequal('hello', 'hello', 'strip', 'xyz')
+ self.checkequal('', 'mississippi', 'strip', 'mississippi')
+
+ # only trim the start and end; does not strip internal characters
+ self.checkequal('mississipp', 'mississippi', 'strip', 'i')
self.checkraises(TypeError, 'hello', 'strip', 42, 42)
self.checkraises(TypeError, 'hello', 'lstrip', 42, 42)
@@ -855,11 +843,6 @@ class CommonTest(BaseTest):
self.checkraises(TypeError, '123', 'zfill')
-class MixinStrUnicodeUserStringTest:
- # additional tests that only work for
- # stringlike objects, i.e. str, unicode, UserString
- # (but not the string module)
-
def test_islower(self):
self.checkequal(False, '', 'islower')
self.checkequal(True, 'a', 'islower')
@@ -962,6 +945,43 @@ class MixinStrUnicodeUserStringTest:
self.checkraises(TypeError, 'abc', 'splitlines', 42, 42)
+
+class CommonTest(BaseTest):
+ # This testcase contains tests that can be used in all
+ # stringlike classes. Currently this is str and UserString.
+
+ def test_hash(self):
+ # SF bug 1054139: += optimization was not invalidating cached hash value
+ a = self.type2test('DNSSEC')
+ b = self.type2test('')
+ for c in a:
+ b += c
+ hash(b)
+ self.assertEqual(hash(a), hash(b))
+
+ def test_capitalize_nonascii(self):
+ # check that titlecased chars are lowered correctly
+ # \u1ffc is the titlecased char
+ self.checkequal('\u03a9\u0399\u1ff3\u1ff3\u1ff3',
+ '\u1ff3\u1ff3\u1ffc\u1ffc', 'capitalize')
+ # check with cased non-letter chars
+ self.checkequal('\u24c5\u24e8\u24e3\u24d7\u24de\u24dd',
+ '\u24c5\u24ce\u24c9\u24bd\u24c4\u24c3', 'capitalize')
+ self.checkequal('\u24c5\u24e8\u24e3\u24d7\u24de\u24dd',
+ '\u24df\u24e8\u24e3\u24d7\u24de\u24dd', 'capitalize')
+ self.checkequal('\u2160\u2171\u2172',
+ '\u2160\u2161\u2162', 'capitalize')
+ self.checkequal('\u2160\u2171\u2172',
+ '\u2170\u2171\u2172', 'capitalize')
+ # check with Ll chars with no upper - nothing changes here
+ self.checkequal('\u019b\u1d00\u1d86\u0221\u1fb7',
+ '\u019b\u1d00\u1d86\u0221\u1fb7', 'capitalize')
+
+
+class MixinStrUnicodeUserStringTest:
+ # additional tests that only work for
+ # stringlike objects, i.e. str, UserString
+
def test_startswith(self):
self.checkequal(True, 'hello', 'startswith', 'he')
self.checkequal(True, 'hello', 'startswith', 'hello')
@@ -976,6 +996,9 @@ class MixinStrUnicodeUserStringTest:
self.checkequal(True, 'helloworld', 'startswith', 'lowo', 3)
self.checkequal(True, 'helloworld', 'startswith', 'lowo', 3, 7)
self.checkequal(False, 'helloworld', 'startswith', 'lowo', 3, 6)
+ self.checkequal(True, '', 'startswith', '', 0, 1)
+ self.checkequal(True, '', 'startswith', '', 0, 0)
+ self.checkequal(False, '', 'startswith', '', 1, 0)
# test negative indices
self.checkequal(True, 'hello', 'startswith', 'he', 0, -1)
@@ -1022,6 +1045,9 @@ class MixinStrUnicodeUserStringTest:
self.checkequal(False, 'helloworld', 'endswith', 'lowo', 3, 8)
self.checkequal(False, 'ab', 'endswith', 'ab', 0, 1)
self.checkequal(False, 'ab', 'endswith', 'ab', 0, 0)
+ self.checkequal(True, '', 'endswith', '', 0, 1)
+ self.checkequal(True, '', 'endswith', '', 0, 0)
+ self.checkequal(False, '', 'endswith', '', 1, 0)
# test negative indices
self.checkequal(True, 'hello', 'endswith', 'lo', -2)
@@ -1176,8 +1202,7 @@ class MixinStrUnicodeUserStringTest:
self.checkraises(TypeError, 'abc', '__mod__')
self.checkraises(TypeError, '%(foo)s', '__mod__', 42)
self.checkraises(TypeError, '%s%s', '__mod__', (42,))
- with self.assertWarns(DeprecationWarning):
- self.checkraises(TypeError, '%c', '__mod__', (None,))
+ self.checkraises(TypeError, '%c', '__mod__', (None,))
self.checkraises(ValueError, '%(foo', '__mod__', {})
self.checkraises(TypeError, '%(foo)s %(bar)s', '__mod__', ('foo', 42))
self.checkraises(TypeError, '%d', '__mod__', "42") # not numeric
@@ -1338,7 +1363,7 @@ class MixinStrUnicodeUserStringTest:
class MixinStrUnicodeTest:
- # Additional tests that only work with str and unicode.
+ # Additional tests that only work with str.
def test_bug1001011(self):
# Make sure join returns a NEW object for single item sequences
@@ -1356,28 +1381,3 @@ class MixinStrUnicodeTest:
s1 = t("abcd")
s2 = t().join([s1])
self.assertIs(s1, s2)
-
- # Should also test mixed-type join.
- if t is str:
- s1 = subclass("abcd")
- s2 = "".join([s1])
- self.assertIsNot(s1, s2)
- self.assertIs(type(s2), t)
-
- s1 = t("abcd")
- s2 = "".join([s1])
- self.assertIs(s1, s2)
-
-## elif t is str8:
-## s1 = subclass("abcd")
-## s2 = "".join([s1])
-## self.assertIsNot(s1, s2)
-## self.assertIs(type(s2), str) # promotes!
-
-## s1 = t("abcd")
-## s2 = "".join([s1])
-## self.assertIsNot(s1, s2)
-## self.assertIs(type(s2), str) # promotes!
-
- else:
- self.fail("unexpected type for MixinStrUnicodeTest %r" % t)
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index cdf86e75bc..e124fab610 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -88,7 +88,7 @@ __all__ = [
"skip_unless_symlink", "requires_gzip", "requires_bz2", "requires_lzma",
"bigmemtest", "bigaddrspacetest", "cpython_only", "get_attribute",
"requires_IEEE_754", "skip_unless_xattr", "requires_zlib",
- "anticipate_failure", "load_package_tests",
+ "anticipate_failure", "load_package_tests", "detect_api_mismatch",
# sys
"is_jython", "check_impl_detail",
# network
@@ -100,7 +100,8 @@ __all__ = [
# threads
"threading_setup", "threading_cleanup", "reap_threads", "start_threads",
# miscellaneous
- "check_warnings", "EnvironmentVarGuard", "run_with_locale", "swap_item",
+ "check_warnings", "check_no_resource_warning", "EnvironmentVarGuard",
+ "run_with_locale", "swap_item",
"swap_attr", "Matcher", "set_memlimit", "SuppressCrashReport", "sortdict",
"run_with_tz",
]
@@ -376,36 +377,32 @@ def rmtree(path):
pass
def make_legacy_pyc(source):
- """Move a PEP 3147 pyc/pyo file to its legacy pyc/pyo location.
-
- The choice of .pyc or .pyo extension is done based on the __debug__ flag
- value.
+ """Move a PEP 3147/488 pyc file to its legacy pyc location.
:param source: The file system path to the source file. The source file
- does not need to exist, however the PEP 3147 pyc file must exist.
+ does not need to exist, however the PEP 3147/488 pyc file must exist.
:return: The file system path to the legacy pyc file.
"""
pyc_file = importlib.util.cache_from_source(source)
up_one = os.path.dirname(os.path.abspath(source))
- legacy_pyc = os.path.join(up_one, source + ('c' if __debug__ else 'o'))
+ legacy_pyc = os.path.join(up_one, source + 'c')
os.rename(pyc_file, legacy_pyc)
return legacy_pyc
def forget(modname):
"""'Forget' a module was ever imported.
- This removes the module from sys.modules and deletes any PEP 3147 or
- legacy .pyc and .pyo files.
+ This removes the module from sys.modules and deletes any PEP 3147/488 or
+ legacy .pyc files.
"""
unload(modname)
for dirname in sys.path:
source = os.path.join(dirname, modname + '.py')
# It doesn't matter if they exist or not, unlink all possible
- # combinations of PEP 3147 and legacy pyc and pyo files.
+ # combinations of PEP 3147/488 and legacy pyc files.
unlink(source + 'c')
- unlink(source + 'o')
- unlink(importlib.util.cache_from_source(source, debug_override=True))
- unlink(importlib.util.cache_from_source(source, debug_override=False))
+ for opt in ('', 1, 2):
+ unlink(importlib.util.cache_from_source(source, optimization=opt))
# Check whether a gui is actually available
def _is_gui_available():
@@ -1042,7 +1039,8 @@ def open_urlresource(url, *args, **kw):
# Verify the requirement before downloading the file
requires('urlfetch')
- print('\tfetching %s ...' % url, file=get_original_stdout())
+ if verbose:
+ print('\tfetching %s ...' % url, file=get_original_stdout())
opener = urllib.request.build_opener()
if gzip:
opener.addheaders.append(('Accept-Encoding', 'gzip'))
@@ -1150,6 +1148,27 @@ def check_warnings(*filters, **kwargs):
return _filterwarnings(filters, quiet)
+@contextlib.contextmanager
+def check_no_resource_warning(testcase):
+ """Context manager to check that no ResourceWarning is emitted.
+
+ Usage:
+
+ with check_no_resource_warning(self):
+ f = open(...)
+ ...
+ del f
+
+ You must remove the object which may emit ResourceWarning before
+ the end of the context manager.
+ """
+ with warnings.catch_warnings(record=True) as warns:
+ warnings.filterwarnings('always', category=ResourceWarning)
+ yield
+ gc_collect()
+ testcase.assertEqual(warns, [])
+
+
class CleanImport(object):
"""Context manager to force import to return a new module reference.
@@ -1611,12 +1630,15 @@ class _MemoryWatchdog:
def bigmemtest(size, memuse, dry_run=True):
"""Decorator for bigmem tests.
- 'minsize' is the minimum useful size for the test (in arbitrary,
- test-interpreted units.) 'memuse' is the number of 'bytes per size' for
- the test, or a good estimate of it.
+ 'size' is a requested size for the test (in arbitrary, test-interpreted
+ units.) 'memuse' is the number of bytes per unit for the test, or a good
+ estimate of it. For example, a test that needs two byte buffers, of 4 GiB
+ each, could be decorated with @bigmemtest(size=_4G, memuse=2).
- if 'dry_run' is False, it means the test doesn't support dummy runs
- when -M is not specified.
+ The 'size' argument is normally passed to the decorated test method as an
+ extra argument. If 'dry_run' is true, the value passed to the test method
+ may be less than the requested value. If 'dry_run' is false, it means the
+ test doesn't support dummy runs when -M is not specified.
"""
def decorator(f):
def wrapper(self):
@@ -2187,6 +2209,21 @@ def fs_is_case_insensitive(directory):
return False
+def detect_api_mismatch(ref_api, other_api, *, ignore=()):
+ """Returns the set of items in ref_api not in other_api, except for a
+ defined list of items to be ignored in this check.
+
+ By default this skips private attributes beginning with '_' but
+ includes all magic methods, i.e. those starting and ending in '__'.
+ """
+ missing_items = set(dir(ref_api)) - set(dir(other_api))
+ if ignore:
+ missing_items -= set(ignore)
+ missing_items = set(m for m in missing_items
+ if not m.startswith('_') or m.endswith('__'))
+ return missing_items
+
+
class SuppressCrashReport:
"""Try to prevent a crash report from popping up.
@@ -2194,6 +2231,7 @@ class SuppressCrashReport:
disable the creation of coredump file.
"""
old_value = None
+ old_modes = None
def __enter__(self):
"""On Windows, disable Windows Error Reporting dialogs using
@@ -2211,6 +2249,26 @@ class SuppressCrashReport:
SEM_NOGPFAULTERRORBOX = 0x02
self.old_value = self._k32.SetErrorMode(SEM_NOGPFAULTERRORBOX)
self._k32.SetErrorMode(self.old_value | SEM_NOGPFAULTERRORBOX)
+
+ # Suppress assert dialogs in debug builds
+ # (see http://bugs.python.org/issue23314)
+ try:
+ import msvcrt
+ msvcrt.CrtSetReportMode
+ except (AttributeError, ImportError):
+ # no msvcrt or a release build
+ pass
+ else:
+ self.old_modes = {}
+ for report_type in [msvcrt.CRT_WARN,
+ msvcrt.CRT_ERROR,
+ msvcrt.CRT_ASSERT]:
+ old_mode = msvcrt.CrtSetReportMode(report_type,
+ msvcrt.CRTDBG_MODE_FILE)
+ old_file = msvcrt.CrtSetReportFile(report_type,
+ msvcrt.CRTDBG_FILE_STDERR)
+ self.old_modes[report_type] = old_mode, old_file
+
else:
if resource is not None:
try:
@@ -2242,6 +2300,12 @@ class SuppressCrashReport:
if sys.platform.startswith('win'):
self._k32.SetErrorMode(self.old_value)
+
+ if self.old_modes:
+ import msvcrt
+ for report_type, (old_mode, old_file) in self.old_modes.items():
+ msvcrt.CrtSetReportMode(report_type, old_mode)
+ msvcrt.CrtSetReportFile(report_type, old_file)
else:
if resource is not None:
try:
@@ -2302,3 +2366,22 @@ def run_in_subinterp(code):
"memory allocations")
import _testcapi
return _testcapi.run_in_subinterp(code)
+
+
+def check_free_after_iterating(test, iter, cls, args=()):
+ class A(cls):
+ def __del__(self):
+ nonlocal done
+ done = True
+ try:
+ next(it)
+ except StopIteration:
+ pass
+
+ done = False
+ it = iter(A(*args))
+ # Issue 26494: Shouldn't crash
+ test.assertRaises(StopIteration, next, it)
+ # The sequence should be deallocated just after the end of iterating
+ gc_collect()
+ test.assertTrue(done)
diff --git a/Lib/test/script_helper.py b/Lib/test/support/script_helper.py
index d27496bcd0..9c2e9ebdfb 100644
--- a/Lib/test/script_helper.py
+++ b/Lib/test/support/script_helper.py
@@ -14,13 +14,13 @@ import shutil
import zipfile
from importlib.util import source_from_cache
-from test.support import make_legacy_pyc, strip_python_stderr, temp_dir
+from test.support import make_legacy_pyc, strip_python_stderr
# Cached result of the expensive test performed in the function below.
__cached_interp_requires_environment = None
-def _interpreter_requires_environment():
+def interpreter_requires_environment():
"""
Returns True if our sys.executable interpreter requires environment
variables in order to be able to run at all.
@@ -57,7 +57,7 @@ _PythonRunResult = collections.namedtuple("_PythonRunResult",
# Executing the interpreter in a subprocess
def run_python_until_end(*args, **env_vars):
- env_required = _interpreter_requires_environment()
+ env_required = interpreter_requires_environment()
if '__isolated' in env_vars:
isolated = env_vars.pop('__isolated')
else:
@@ -95,10 +95,30 @@ def run_python_until_end(*args, **env_vars):
def _assert_python(expected_success, *args, **env_vars):
res, cmd_line = run_python_until_end(*args, **env_vars)
if (res.rc and expected_success) or (not res.rc and not expected_success):
- raise AssertionError(
- "Process return code is %d, command line was: %r, "
- "stderr follows:\n%s" % (res.rc, cmd_line,
- res.err.decode('ascii', 'ignore')))
+ # Limit to 80 lines to ASCII characters
+ maxlen = 80 * 100
+ out, err = res.out, res.err
+ if len(out) > maxlen:
+ out = b'(... truncated stdout ...)' + out[-maxlen:]
+ if len(err) > maxlen:
+ err = b'(... truncated stderr ...)' + err[-maxlen:]
+ out = out.decode('ascii', 'replace').rstrip()
+ err = err.decode('ascii', 'replace').rstrip()
+ raise AssertionError("Process return code is %d\n"
+ "command line: %r\n"
+ "\n"
+ "stdout:\n"
+ "---\n"
+ "%s\n"
+ "---\n"
+ "\n"
+ "stderr:\n"
+ "---\n"
+ "%s\n"
+ "---"
+ % (res.rc, cmd_line,
+ out,
+ err))
return res
def assert_python_ok(*args, **env_vars):
diff --git a/Lib/test/test___future__.py b/Lib/test/test___future__.py
index 6f73c7fddf..559a1873ad 100644
--- a/Lib/test/test___future__.py
+++ b/Lib/test/test___future__.py
@@ -1,5 +1,4 @@
import unittest
-from test import support
import __future__
GOOD_SERIALS = ("alpha", "beta", "candidate", "final")
@@ -58,8 +57,5 @@ class FutureTest(unittest.TestCase):
".compiler_flag isn't int")
-def test_main():
- support.run_unittest(FutureTest)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test__opcode.py b/Lib/test/test__opcode.py
index 0152e9d94d..1075decc27 100644
--- a/Lib/test/test__opcode.py
+++ b/Lib/test/test__opcode.py
@@ -1,5 +1,5 @@
import dis
-from test.support import run_unittest, import_module
+from test.support import import_module
import unittest
_opcode = import_module("_opcode")
@@ -16,8 +16,5 @@ class OpcodeTests(unittest.TestCase):
self.assertRaises(ValueError, _opcode.stack_effect, dis.opmap['BUILD_SLICE'])
self.assertRaises(ValueError, _opcode.stack_effect, dis.opmap['POP_TOP'], 0)
-def test_main():
- run_unittest(OpcodeTests)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test__osx_support.py b/Lib/test/test__osx_support.py
index 5dcadf7a40..ac6325a751 100644
--- a/Lib/test/test__osx_support.py
+++ b/Lib/test/test__osx_support.py
@@ -273,9 +273,5 @@ class Test_OSXSupport(unittest.TestCase):
result = _osx_support.get_platform_osx(config_vars, ' ', ' ', ' ')
self.assertEqual(('macosx', '10.6', 'fat'), result)
-def test_main():
- if sys.platform == 'darwin':
- test.support.run_unittest(Test_OSXSupport)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_argparse.py b/Lib/test/test_argparse.py
index 5efdb67334..f9ee398899 100644
--- a/Lib/test/test_argparse.py
+++ b/Lib/test/test_argparse.py
@@ -20,15 +20,6 @@ class StdIOBuffer(StringIO):
class TestCase(unittest.TestCase):
- def assertEqual(self, obj1, obj2):
- if obj1 != obj2:
- print('')
- print(repr(obj1))
- print(repr(obj2))
- print(obj1)
- print(obj2)
- super(TestCase, self).assertEqual(obj1, obj2)
-
def setUp(self):
# The tests assume that line wrapping occurs at 80 columns, but this
# behaviour can be overridden by setting the COLUMNS environment
@@ -78,9 +69,6 @@ class NS(object):
def __eq__(self, other):
return vars(self) == vars(other)
- def __ne__(self, other):
- return not (self == other)
-
class ArgumentParserError(Exception):
@@ -546,7 +534,7 @@ class TestOptionalsNargsDefault(ParserTestCase):
class TestOptionalsNargs1(ParserTestCase):
- """Tests specifying the 1 arg for an Optional"""
+ """Tests specifying 1 arg for an Optional"""
argument_signatures = [Sig('-x', nargs=1)]
failures = ['a', '-x']
@@ -557,7 +545,7 @@ class TestOptionalsNargs1(ParserTestCase):
class TestOptionalsNargs3(ParserTestCase):
- """Tests specifying the 3 args for an Optional"""
+ """Tests specifying 3 args for an Optional"""
argument_signatures = [Sig('-x', nargs=3)]
failures = ['a', '-x', '-x a', '-x a b', 'a -x', 'a -x b']
@@ -591,7 +579,7 @@ class TestOptionalsNargsOptional(ParserTestCase):
class TestOptionalsNargsZeroOrMore(ParserTestCase):
- """Tests specifying an args for an Optional that accepts zero or more"""
+ """Tests specifying args for an Optional that accepts zero or more"""
argument_signatures = [
Sig('-x', nargs='*'),
@@ -610,7 +598,7 @@ class TestOptionalsNargsZeroOrMore(ParserTestCase):
class TestOptionalsNargsOneOrMore(ParserTestCase):
- """Tests specifying an args for an Optional that accepts one or more"""
+ """Tests specifying args for an Optional that accepts one or more"""
argument_signatures = [
Sig('-x', nargs='+'),
@@ -765,6 +753,39 @@ class TestOptionalsActionCount(ParserTestCase):
]
+class TestOptionalsAllowLongAbbreviation(ParserTestCase):
+ """Allow long options to be abbreviated unambiguously"""
+
+ argument_signatures = [
+ Sig('--foo'),
+ Sig('--foobaz'),
+ Sig('--fooble', action='store_true'),
+ ]
+ failures = ['--foob 5', '--foob']
+ successes = [
+ ('', NS(foo=None, foobaz=None, fooble=False)),
+ ('--foo 7', NS(foo='7', foobaz=None, fooble=False)),
+ ('--fooba a', NS(foo=None, foobaz='a', fooble=False)),
+ ('--foobl --foo g', NS(foo='g', foobaz=None, fooble=True)),
+ ]
+
+
+class TestOptionalsDisallowLongAbbreviation(ParserTestCase):
+ """Do not allow abbreviations of long options at all"""
+
+ parser_signature = Sig(allow_abbrev=False)
+ argument_signatures = [
+ Sig('--foo'),
+ Sig('--foodle', action='store_true'),
+ Sig('--foonly'),
+ ]
+ failures = ['-foon 3', '--foon 3', '--food', '--food --foo 2']
+ successes = [
+ ('', NS(foo=None, foodle=False, foonly=None)),
+ ('--foo 3', NS(foo='3', foodle=False, foonly=None)),
+ ('--foonly 7 --foodle --foo 2', NS(foo='2', foodle=True, foonly='7')),
+ ]
+
# ================
# Positional tests
# ================
@@ -1230,7 +1251,7 @@ class TestPrefixCharacterOnlyArguments(ParserTestCase):
class TestNargsZeroOrMore(ParserTestCase):
- """Tests specifying an args for an Optional that accepts zero or more"""
+ """Tests specifying args for an Optional that accepts zero or more"""
argument_signatures = [Sig('-x', nargs='*'), Sig('y', nargs='*')]
failures = []
@@ -1993,14 +2014,9 @@ class TestAddSubparsers(TestCase):
'''))
def _test_subparser_help(self, args_str, expected_help):
- try:
+ with self.assertRaises(ArgumentParserError) as cm:
self.parser.parse_args(args_str.split())
- except ArgumentParserError:
- err = sys.exc_info()[1]
- if err.stdout != expected_help:
- print(repr(expected_help))
- print(repr(err.stdout))
- self.assertEqual(err.stdout, expected_help)
+ self.assertEqual(expected_help, cm.exception.stdout)
def test_subparser1_help(self):
self._test_subparser_help('5.0 1 -h', textwrap.dedent('''\
@@ -2846,15 +2862,15 @@ class TestGetDefault(TestCase):
def test_get_default(self):
parser = ErrorRaisingArgumentParser()
- self.assertEqual(None, parser.get_default("foo"))
- self.assertEqual(None, parser.get_default("bar"))
+ self.assertIsNone(parser.get_default("foo"))
+ self.assertIsNone(parser.get_default("bar"))
parser.add_argument("--foo")
- self.assertEqual(None, parser.get_default("foo"))
- self.assertEqual(None, parser.get_default("bar"))
+ self.assertIsNone(parser.get_default("foo"))
+ self.assertIsNone(parser.get_default("bar"))
parser.add_argument("--bar", type=int, default=42)
- self.assertEqual(None, parser.get_default("foo"))
+ self.assertIsNone(parser.get_default("foo"))
self.assertEqual(42, parser.get_default("bar"))
parser.set_defaults(foo="badger")
@@ -2869,18 +2885,16 @@ class TestNamespaceContainsSimple(TestCase):
def test_empty(self):
ns = argparse.Namespace()
- self.assertEqual('' in ns, False)
- self.assertEqual('' not in ns, True)
- self.assertEqual('x' in ns, False)
+ self.assertNotIn('', ns)
+ self.assertNotIn('x', ns)
def test_non_empty(self):
ns = argparse.Namespace(x=1, y=2)
- self.assertEqual('x' in ns, True)
- self.assertEqual('x' not in ns, False)
- self.assertEqual('y' in ns, True)
- self.assertEqual('' in ns, False)
- self.assertEqual('xx' in ns, False)
- self.assertEqual('z' in ns, False)
+ self.assertNotIn('', ns)
+ self.assertIn('x', ns)
+ self.assertIn('y', ns)
+ self.assertNotIn('xx', ns)
+ self.assertNotIn('z', ns)
# =====================
# Help formatting tests
@@ -2936,13 +2950,6 @@ class TestHelpFormattingMetaclass(type):
def _test(self, tester, parser_text):
expected_text = getattr(tester, self.func_suffix)
expected_text = textwrap.dedent(expected_text)
- if expected_text != parser_text:
- print(repr(expected_text))
- print(repr(parser_text))
- for char1, char2 in zip(expected_text, parser_text):
- if char1 != char2:
- print('first diff: %r %r' % (char1, char2))
- break
tester.assertEqual(expected_text, parser_text)
def test_format(self, tester):
@@ -4221,24 +4228,17 @@ class TestInvalidArgumentConstructors(TestCase):
self.assertValueError('foo', action='baz')
self.assertValueError('--foo', action=('store', 'append'))
parser = argparse.ArgumentParser()
- try:
+ with self.assertRaises(ValueError) as cm:
parser.add_argument("--foo", action="store-true")
- except ValueError:
- e = sys.exc_info()[1]
- expected = 'unknown action'
- msg = 'expected %r, found %r' % (expected, e)
- self.assertTrue(expected in str(e), msg)
+ self.assertIn('unknown action', str(cm.exception))
def test_multiple_dest(self):
parser = argparse.ArgumentParser()
parser.add_argument(dest='foo')
- try:
+ with self.assertRaises(ValueError) as cm:
parser.add_argument('bar', dest='baz')
- except ValueError:
- e = sys.exc_info()[1]
- expected = 'dest supplied twice for positional argument'
- msg = 'expected %r, found %r' % (expected, e)
- self.assertTrue(expected in str(e), msg)
+ self.assertIn('dest supplied twice for positional argument',
+ str(cm.exception))
def test_no_argument_actions(self):
for action in ['store_const', 'store_true', 'store_false',
@@ -4395,18 +4395,10 @@ class TestConflictHandling(TestCase):
class TestOptionalsHelpVersionActions(TestCase):
"""Test the help and version actions"""
- def _get_error(self, func, *args, **kwargs):
- try:
- func(*args, **kwargs)
- except ArgumentParserError:
- return sys.exc_info()[1]
- else:
- self.assertRaises(ArgumentParserError, func, *args, **kwargs)
-
def assertPrintHelpExit(self, parser, args_str):
- self.assertEqual(
- parser.format_help(),
- self._get_error(parser.parse_args, args_str.split()).stdout)
+ with self.assertRaises(ArgumentParserError) as cm:
+ parser.parse_args(args_str.split())
+ self.assertEqual(parser.format_help(), cm.exception.stdout)
def assertArgumentParserError(self, parser, *args):
self.assertRaises(ArgumentParserError, parser.parse_args, args)
@@ -4421,8 +4413,9 @@ class TestOptionalsHelpVersionActions(TestCase):
def test_version_format(self):
parser = ErrorRaisingArgumentParser(prog='PPP')
parser.add_argument('-v', '--version', action='version', version='%(prog)s 3.5')
- msg = self._get_error(parser.parse_args, ['-v']).stdout
- self.assertEqual('PPP 3.5\n', msg)
+ with self.assertRaises(ArgumentParserError) as cm:
+ parser.parse_args(['-v'])
+ self.assertEqual('PPP 3.5\n', cm.exception.stdout)
def test_version_no_help(self):
parser = ErrorRaisingArgumentParser(add_help=False)
@@ -4434,8 +4427,9 @@ class TestOptionalsHelpVersionActions(TestCase):
def test_version_action(self):
parser = ErrorRaisingArgumentParser(prog='XXX')
parser.add_argument('-V', action='version', version='%(prog)s 3.7')
- msg = self._get_error(parser.parse_args, ['-V']).stdout
- self.assertEqual('XXX 3.7\n', msg)
+ with self.assertRaises(ArgumentParserError) as cm:
+ parser.parse_args(['-V'])
+ self.assertEqual('XXX 3.7\n', cm.exception.stdout)
def test_no_help(self):
parser = ErrorRaisingArgumentParser(add_help=False)
@@ -4605,14 +4599,10 @@ class TestArgumentTypeError(TestCase):
parser = ErrorRaisingArgumentParser(prog='PROG', add_help=False)
parser.add_argument('x', type=spam)
- try:
+ with self.assertRaises(ArgumentParserError) as cm:
parser.parse_args(['XXX'])
- except ArgumentParserError:
- expected = 'usage: PROG x\nPROG: error: argument x: spam!\n'
- msg = sys.exc_info()[1].stderr
- self.assertEqual(expected, msg)
- else:
- self.fail()
+ self.assertEqual('usage: PROG x\nPROG: error: argument x: spam!\n',
+ cm.exception.stderr)
# =========================
# MessageContentError tests
diff --git a/Lib/test/test_array.py b/Lib/test/test_array.py
index 07c9bf999b..482526eec1 100644
--- a/Lib/test/test_array.py
+++ b/Lib/test/test_array.py
@@ -284,19 +284,42 @@ class BaseTest:
self.assertEqual(type(a), type(b))
def test_iterator_pickle(self):
- data = array.array(self.typecode, self.example)
+ orig = array.array(self.typecode, self.example)
+ data = list(orig)
+ data2 = data[::-1]
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
- orgit = iter(data)
- d = pickle.dumps(orgit, proto)
- it = pickle.loads(d)
- self.assertEqual(type(orgit), type(it))
- self.assertEqual(list(it), list(data))
-
- if len(data):
- it = pickle.loads(d)
- next(it)
- d = pickle.dumps(it, proto)
- self.assertEqual(list(it), list(data)[1:])
+ # initial iterator
+ itorig = iter(orig)
+ d = pickle.dumps((itorig, orig), proto)
+ it, a = pickle.loads(d)
+ a.fromlist(data2)
+ self.assertEqual(type(it), type(itorig))
+ self.assertEqual(list(it), data + data2)
+
+ # running iterator
+ next(itorig)
+ d = pickle.dumps((itorig, orig), proto)
+ it, a = pickle.loads(d)
+ a.fromlist(data2)
+ self.assertEqual(type(it), type(itorig))
+ self.assertEqual(list(it), data[1:] + data2)
+
+ # empty iterator
+ for i in range(1, len(data)):
+ next(itorig)
+ d = pickle.dumps((itorig, orig), proto)
+ it, a = pickle.loads(d)
+ a.fromlist(data2)
+ self.assertEqual(type(it), type(itorig))
+ self.assertEqual(list(it), data2)
+
+ # exhausted iterator
+ self.assertRaises(StopIteration, next, itorig)
+ d = pickle.dumps((itorig, orig), proto)
+ it, a = pickle.loads(d)
+ a.fromlist(data2)
+ self.assertEqual(type(it), type(itorig))
+ self.assertEqual(list(it), data2)
def test_insert(self):
a = array.array(self.typecode, self.example)
@@ -394,7 +417,9 @@ class BaseTest:
self.assertEqual(a, b)
def test_tofromstring(self):
- nb_warnings = 4
+ # Warnings not raised when arguments are incorrect as Argument Clinic
+ # handles that before the warning can be raised.
+ nb_warnings = 2
with warnings.catch_warnings(record=True) as r:
warnings.filterwarnings("always",
message=r"(to|from)string\(\) is deprecated",
@@ -1039,6 +1064,11 @@ class BaseTest:
a = array.array(self.typecode, "foo")
a = array.array(self.typecode, array.array('u', 'foo'))
+ @support.cpython_only
+ def test_obsolete_write_lock(self):
+ from _testcapi import getbuffer_with_null_view
+ a = array.array('B', b"")
+ self.assertRaises(BufferError, getbuffer_with_null_view, a)
class StringTest(BaseTest):
diff --git a/Lib/test/test_asdl_parser.py b/Lib/test/test_asdl_parser.py
new file mode 100644
index 0000000000..15bc684904
--- /dev/null
+++ b/Lib/test/test_asdl_parser.py
@@ -0,0 +1,122 @@
+"""Tests for the asdl parser in Parser/asdl.py"""
+
+import importlib.machinery
+import os
+from os.path import dirname
+import sys
+import sysconfig
+import unittest
+
+
+# This test is only relevant for from-source builds of Python.
+if not sysconfig.is_python_build():
+ raise unittest.SkipTest('test irrelevant for an installed Python')
+
+src_base = dirname(dirname(dirname(__file__)))
+parser_dir = os.path.join(src_base, 'Parser')
+
+
+class TestAsdlParser(unittest.TestCase):
+ @classmethod
+ def setUpClass(cls):
+ # Loads the asdl module dynamically, since it's not in a real importable
+ # package.
+ # Parses Python.asdl into an ast.Module and run the check on it.
+ # There's no need to do this for each test method, hence setUpClass.
+ sys.path.insert(0, parser_dir)
+ loader = importlib.machinery.SourceFileLoader(
+ 'asdl', os.path.join(parser_dir, 'asdl.py'))
+ cls.asdl = loader.load_module()
+ cls.mod = cls.asdl.parse(os.path.join(parser_dir, 'Python.asdl'))
+ cls.assertTrue(cls.asdl.check(cls.mod), 'Module validation failed')
+
+ @classmethod
+ def tearDownClass(cls):
+ del sys.path[0]
+
+ def setUp(self):
+ # alias stuff from the class, for convenience
+ self.asdl = TestAsdlParser.asdl
+ self.mod = TestAsdlParser.mod
+ self.types = self.mod.types
+
+ def test_module(self):
+ self.assertEqual(self.mod.name, 'Python')
+ self.assertIn('stmt', self.types)
+ self.assertIn('expr', self.types)
+ self.assertIn('mod', self.types)
+
+ def test_definitions(self):
+ defs = self.mod.dfns
+ self.assertIsInstance(defs[0], self.asdl.Type)
+ self.assertIsInstance(defs[0].value, self.asdl.Sum)
+
+ self.assertIsInstance(self.types['withitem'], self.asdl.Product)
+ self.assertIsInstance(self.types['alias'], self.asdl.Product)
+
+ def test_product(self):
+ alias = self.types['alias']
+ self.assertEqual(
+ str(alias),
+ 'Product([Field(identifier, name), Field(identifier, asname, opt=True)])')
+
+ def test_attributes(self):
+ stmt = self.types['stmt']
+ self.assertEqual(len(stmt.attributes), 2)
+ self.assertEqual(str(stmt.attributes[0]), 'Field(int, lineno)')
+ self.assertEqual(str(stmt.attributes[1]), 'Field(int, col_offset)')
+
+ def test_constructor_fields(self):
+ ehandler = self.types['excepthandler']
+ self.assertEqual(len(ehandler.types), 1)
+ self.assertEqual(len(ehandler.attributes), 2)
+
+ cons = ehandler.types[0]
+ self.assertIsInstance(cons, self.asdl.Constructor)
+ self.assertEqual(len(cons.fields), 3)
+
+ f0 = cons.fields[0]
+ self.assertEqual(f0.type, 'expr')
+ self.assertEqual(f0.name, 'type')
+ self.assertTrue(f0.opt)
+
+ f1 = cons.fields[1]
+ self.assertEqual(f1.type, 'identifier')
+ self.assertEqual(f1.name, 'name')
+ self.assertTrue(f1.opt)
+
+ f2 = cons.fields[2]
+ self.assertEqual(f2.type, 'stmt')
+ self.assertEqual(f2.name, 'body')
+ self.assertFalse(f2.opt)
+ self.assertTrue(f2.seq)
+
+ def test_visitor(self):
+ class CustomVisitor(self.asdl.VisitorBase):
+ def __init__(self):
+ super().__init__()
+ self.names_with_seq = []
+
+ def visitModule(self, mod):
+ for dfn in mod.dfns:
+ self.visit(dfn)
+
+ def visitType(self, type):
+ self.visit(type.value)
+
+ def visitSum(self, sum):
+ for t in sum.types:
+ self.visit(t)
+
+ def visitConstructor(self, cons):
+ for f in cons.fields:
+ if f.seq:
+ self.names_with_seq.append(cons.name)
+
+ v = CustomVisitor()
+ v.visit(self.types['mod'])
+ self.assertEqual(v.names_with_seq, ['Module', 'Interactive', 'Suite'])
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/Lib/test/test_ast.py b/Lib/test/test_ast.py
index a533f8693b..d3e6d35943 100644
--- a/Lib/test/test_ast.py
+++ b/Lib/test/test_ast.py
@@ -78,9 +78,9 @@ exec_tests = [
# Pass,
"pass",
# Break
- "break",
+ "for v in v:break",
# Continue
- "continue",
+ "for v in v:continue",
# for statements with naked tuples (see http://bugs.python.org/issue6704)
"for a,b in c: pass",
"[(a,b) for a,b in c]",
@@ -106,6 +106,15 @@ exec_tests = [
"{r for l in x if g}",
# setcomp with naked tuple
"{r for l,m in x}",
+ # AsyncFunctionDef
+ "async def f():\n await something()",
+ # AsyncFor
+ "async def f():\n async for e in i: 1\n else: 2",
+ # AsyncWith
+ "async def f():\n async with a as b: 1",
+ # PEP 448: Additional Unpacking Generalizations
+ "{**{1:2}, 2:3}",
+ "{*{1, 2}, 3}",
]
# These are compiled through "single"
@@ -225,9 +234,12 @@ class AST_Tests(unittest.TestCase):
(single_tests, single_results, "single"),
(eval_tests, eval_results, "eval")):
for i, o in zip(input, output):
- ast_tree = compile(i, "?", kind, ast.PyCF_ONLY_AST)
- self.assertEqual(to_tuple(ast_tree), o)
- self._assertTrueorder(ast_tree, (0, 0))
+ with self.subTest(action="parsing", input=i):
+ ast_tree = compile(i, "?", kind, ast.PyCF_ONLY_AST)
+ self.assertEqual(to_tuple(ast_tree), o)
+ self._assertTrueorder(ast_tree, (0, 0))
+ with self.subTest(action="compiling", input=i):
+ compile(ast_tree, "?", kind)
def test_slice(self):
slc = ast.parse("x[::]").body[0].value.slice
@@ -427,17 +439,17 @@ class ASTHelpers_Test(unittest.TestCase):
self.assertEqual(ast.dump(node),
"Module(body=[Expr(value=Call(func=Name(id='spam', ctx=Load()), "
"args=[Name(id='eggs', ctx=Load()), Str(s='and cheese')], "
- "keywords=[], starargs=None, kwargs=None))])"
+ "keywords=[]))])"
)
self.assertEqual(ast.dump(node, annotate_fields=False),
"Module([Expr(Call(Name('spam', Load()), [Name('eggs', Load()), "
- "Str('and cheese')], [], None, None))])"
+ "Str('and cheese')], []))])"
)
self.assertEqual(ast.dump(node, include_attributes=True),
"Module(body=[Expr(value=Call(func=Name(id='spam', ctx=Load(), "
"lineno=1, col_offset=0), args=[Name(id='eggs', ctx=Load(), "
"lineno=1, col_offset=5), Str(s='and cheese', lineno=1, "
- "col_offset=11)], keywords=[], starargs=None, kwargs=None, "
+ "col_offset=11)], keywords=[], "
"lineno=1, col_offset=0), lineno=1, col_offset=0)])"
)
@@ -453,16 +465,16 @@ class ASTHelpers_Test(unittest.TestCase):
def test_fix_missing_locations(self):
src = ast.parse('write("spam")')
src.body.append(ast.Expr(ast.Call(ast.Name('spam', ast.Load()),
- [ast.Str('eggs')], [], None, None)))
+ [ast.Str('eggs')], [])))
self.assertEqual(src, ast.fix_missing_locations(src))
self.assertEqual(ast.dump(src, include_attributes=True),
"Module(body=[Expr(value=Call(func=Name(id='write', ctx=Load(), "
"lineno=1, col_offset=0), args=[Str(s='spam', lineno=1, "
- "col_offset=6)], keywords=[], starargs=None, kwargs=None, "
+ "col_offset=6)], keywords=[], "
"lineno=1, col_offset=0), lineno=1, col_offset=0), "
"Expr(value=Call(func=Name(id='spam', ctx=Load(), lineno=1, "
"col_offset=0), args=[Str(s='eggs', lineno=1, col_offset=0)], "
- "keywords=[], starargs=None, kwargs=None, lineno=1, "
+ "keywords=[], lineno=1, "
"col_offset=0), lineno=1, col_offset=0)])"
)
@@ -487,8 +499,7 @@ class ASTHelpers_Test(unittest.TestCase):
node = ast.parse('foo()', mode='eval')
d = dict(ast.iter_fields(node.body))
self.assertEqual(d.pop('func').id, 'foo')
- self.assertEqual(d, {'keywords': [], 'kwargs': None,
- 'args': [], 'starargs': None})
+ self.assertEqual(d, {'keywords': [], 'args': []})
def test_iter_child_nodes(self):
node = ast.parse("spam(23, 42, eggs='leek')", mode='eval')
@@ -506,6 +517,9 @@ class ASTHelpers_Test(unittest.TestCase):
self.assertEqual(ast.get_docstring(node.body[0]),
'line one\nline two')
+ node = ast.parse('async def foo():\n """spam\n ham"""')
+ self.assertEqual(ast.get_docstring(node.body[0]), 'spam\nham')
+
def test_literal_eval(self):
self.assertEqual(ast.literal_eval('[1, 2, 3]'), [1, 2, 3])
self.assertEqual(ast.literal_eval('{"foo": 42}'), {"foo": 42})
@@ -604,8 +618,7 @@ class ASTValidatorTests(unittest.TestCase):
self._check_arguments(fac, self.stmt)
def test_classdef(self):
- def cls(bases=None, keywords=None, starargs=None, kwargs=None,
- body=None, decorator_list=None):
+ def cls(bases=None, keywords=None, body=None, decorator_list=None):
if bases is None:
bases = []
if keywords is None:
@@ -614,16 +627,12 @@ class ASTValidatorTests(unittest.TestCase):
body = [ast.Pass()]
if decorator_list is None:
decorator_list = []
- return ast.ClassDef("myclass", bases, keywords, starargs,
- kwargs, body, decorator_list)
+ return ast.ClassDef("myclass", bases, keywords,
+ body, decorator_list)
self.stmt(cls(bases=[ast.Name("x", ast.Store())]),
"must have Load context")
self.stmt(cls(keywords=[ast.keyword("x", ast.Name("x", ast.Store()))]),
"must have Load context")
- self.stmt(cls(starargs=ast.Name("x", ast.Store())),
- "must have Load context")
- self.stmt(cls(kwargs=ast.Name("x", ast.Store())),
- "must have Load context")
self.stmt(cls(body=[]), "empty body on ClassDef")
self.stmt(cls(body=[None]), "None disallowed")
self.stmt(cls(decorator_list=[ast.Name("x", ast.Store())]),
@@ -777,8 +786,6 @@ class ASTValidatorTests(unittest.TestCase):
def test_dict(self):
d = ast.Dict([], [ast.Name("x", ast.Load())])
self.expr(d, "same number of keys as values")
- d = ast.Dict([None], [ast.Name("x", ast.Load())])
- self.expr(d, "None disallowed")
d = ast.Dict([ast.Name("x", ast.Load())], [None])
self.expr(d, "None disallowed")
@@ -854,20 +861,12 @@ class ASTValidatorTests(unittest.TestCase):
func = ast.Name("x", ast.Load())
args = [ast.Name("y", ast.Load())]
keywords = [ast.keyword("w", ast.Name("z", ast.Load()))]
- stararg = ast.Name("p", ast.Load())
- kwarg = ast.Name("q", ast.Load())
- call = ast.Call(ast.Name("x", ast.Store()), args, keywords, stararg,
- kwarg)
+ call = ast.Call(ast.Name("x", ast.Store()), args, keywords)
self.expr(call, "must have Load context")
- call = ast.Call(func, [None], keywords, stararg, kwarg)
+ call = ast.Call(func, [None], keywords)
self.expr(call, "None disallowed")
bad_keywords = [ast.keyword("w", ast.Name("z", ast.Store()))]
- call = ast.Call(func, args, bad_keywords, stararg, kwarg)
- self.expr(call, "must have Load context")
- call = ast.Call(func, args, keywords, ast.Name("z", ast.Store()), kwarg)
- self.expr(call, "must have Load context")
- call = ast.Call(func, args, keywords, stararg,
- ast.Name("w", ast.Store()))
+ call = ast.Call(func, args, bad_keywords)
self.expr(call, "must have Load context")
def test_num(self):
@@ -957,8 +956,8 @@ exec_results = [
('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [], ('arg', (1, 7), 'args', None), [], [], None, []), [('Pass', (1, 14))], [], None)]),
('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [], None, [], [], ('arg', (1, 8), 'kwargs', None), []), [('Pass', (1, 17))], [], None)]),
('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [('arg', (1, 6), 'a', None), ('arg', (1, 9), 'b', None), ('arg', (1, 14), 'c', None), ('arg', (1, 22), 'd', None), ('arg', (1, 28), 'e', None)], ('arg', (1, 35), 'args', None), [('arg', (1, 41), 'f', None)], [('Num', (1, 43), 42)], ('arg', (1, 49), 'kwargs', None), [('Num', (1, 11), 1), ('NameConstant', (1, 16), None), ('List', (1, 24), [], ('Load',)), ('Dict', (1, 30), [], [])]), [('Pass', (1, 58))], [], None)]),
-('Module', [('ClassDef', (1, 0), 'C', [], [], None, None, [('Pass', (1, 8))], [])]),
-('Module', [('ClassDef', (1, 0), 'C', [('Name', (1, 8), 'object', ('Load',))], [], None, None, [('Pass', (1, 17))], [])]),
+('Module', [('ClassDef', (1, 0), 'C', [], [], [('Pass', (1, 8))], [])]),
+('Module', [('ClassDef', (1, 0), 'C', [('Name', (1, 8), 'object', ('Load',))], [], [('Pass', (1, 17))], [])]),
('Module', [('FunctionDef', (1, 0), 'f', ('arguments', [], None, [], [], None, []), [('Return', (1, 8), ('Num', (1, 15), 1))], [], None)]),
('Module', [('Delete', (1, 0), [('Name', (1, 4), 'v', ('Del',))])]),
('Module', [('Assign', (1, 0), [('Name', (1, 0), 'v', ('Store',))], ('Num', (1, 4), 1))]),
@@ -968,7 +967,7 @@ exec_results = [
('Module', [('If', (1, 0), ('Name', (1, 3), 'v', ('Load',)), [('Pass', (1, 5))], [])]),
('Module', [('With', (1, 0), [('withitem', ('Name', (1, 5), 'x', ('Load',)), ('Name', (1, 10), 'y', ('Store',)))], [('Pass', (1, 13))])]),
('Module', [('With', (1, 0), [('withitem', ('Name', (1, 5), 'x', ('Load',)), ('Name', (1, 10), 'y', ('Store',))), ('withitem', ('Name', (1, 13), 'z', ('Load',)), ('Name', (1, 18), 'q', ('Store',)))], [('Pass', (1, 21))])]),
-('Module', [('Raise', (1, 0), ('Call', (1, 6), ('Name', (1, 6), 'Exception', ('Load',)), [('Str', (1, 16), 'string')], [], None, None), None)]),
+('Module', [('Raise', (1, 0), ('Call', (1, 6), ('Name', (1, 6), 'Exception', ('Load',)), [('Str', (1, 16), 'string')], []), None)]),
('Module', [('Try', (1, 0), [('Pass', (2, 2))], [('ExceptHandler', (3, 0), ('Name', (3, 7), 'Exception', ('Load',)), None, [('Pass', (4, 2))])], [], [])]),
('Module', [('Try', (1, 0), [('Pass', (2, 2))], [], [], [('Pass', (4, 2))])]),
('Module', [('Assert', (1, 0), ('Name', (1, 7), 'v', ('Load',)), None)]),
@@ -977,17 +976,22 @@ exec_results = [
('Module', [('Global', (1, 0), ['v'])]),
('Module', [('Expr', (1, 0), ('Num', (1, 0), 1))]),
('Module', [('Pass', (1, 0))]),
-('Module', [('Break', (1, 0))]),
-('Module', [('Continue', (1, 0))]),
+('Module', [('For', (1, 0), ('Name', (1, 4), 'v', ('Store',)), ('Name', (1, 9), 'v', ('Load',)), [('Break', (1, 11))], [])]),
+('Module', [('For', (1, 0), ('Name', (1, 4), 'v', ('Store',)), ('Name', (1, 9), 'v', ('Load',)), [('Continue', (1, 11))], [])]),
('Module', [('For', (1, 0), ('Tuple', (1, 4), [('Name', (1, 4), 'a', ('Store',)), ('Name', (1, 6), 'b', ('Store',))], ('Store',)), ('Name', (1, 11), 'c', ('Load',)), [('Pass', (1, 14))], [])]),
('Module', [('Expr', (1, 0), ('ListComp', (1, 1), ('Tuple', (1, 2), [('Name', (1, 2), 'a', ('Load',)), ('Name', (1, 4), 'b', ('Load',))], ('Load',)), [('comprehension', ('Tuple', (1, 11), [('Name', (1, 11), 'a', ('Store',)), ('Name', (1, 13), 'b', ('Store',))], ('Store',)), ('Name', (1, 18), 'c', ('Load',)), [])]))]),
('Module', [('Expr', (1, 0), ('GeneratorExp', (1, 1), ('Tuple', (1, 2), [('Name', (1, 2), 'a', ('Load',)), ('Name', (1, 4), 'b', ('Load',))], ('Load',)), [('comprehension', ('Tuple', (1, 11), [('Name', (1, 11), 'a', ('Store',)), ('Name', (1, 13), 'b', ('Store',))], ('Store',)), ('Name', (1, 18), 'c', ('Load',)), [])]))]),
('Module', [('Expr', (1, 0), ('GeneratorExp', (1, 1), ('Tuple', (1, 2), [('Name', (1, 2), 'a', ('Load',)), ('Name', (1, 4), 'b', ('Load',))], ('Load',)), [('comprehension', ('Tuple', (1, 12), [('Name', (1, 12), 'a', ('Store',)), ('Name', (1, 14), 'b', ('Store',))], ('Store',)), ('Name', (1, 20), 'c', ('Load',)), [])]))]),
('Module', [('Expr', (1, 0), ('GeneratorExp', (2, 4), ('Tuple', (3, 4), [('Name', (3, 4), 'Aa', ('Load',)), ('Name', (5, 7), 'Bb', ('Load',))], ('Load',)), [('comprehension', ('Tuple', (8, 4), [('Name', (8, 4), 'Aa', ('Store',)), ('Name', (10, 4), 'Bb', ('Store',))], ('Store',)), ('Name', (10, 10), 'Cc', ('Load',)), [])]))]),
-('Module', [('Expr', (1, 0), ('DictComp', (1, 1), ('Name', (1, 1), 'a', ('Load',)), ('Name', (1, 5), 'b', ('Load',)), [('comprehension', ('Name', (1, 11), 'w', ('Store',)), ('Name', (1, 16), 'x', ('Load',)), []), ('comprehension', ('Name', (1, 22), 'm', ('Store',)), ('Name', (1, 27), 'p', ('Load',)), [('Name', (1, 32), 'g', ('Load',))])]))]),
-('Module', [('Expr', (1, 0), ('DictComp', (1, 1), ('Name', (1, 1), 'a', ('Load',)), ('Name', (1, 5), 'b', ('Load',)), [('comprehension', ('Tuple', (1, 11), [('Name', (1, 11), 'v', ('Store',)), ('Name', (1, 13), 'w', ('Store',))], ('Store',)), ('Name', (1, 18), 'x', ('Load',)), [])]))]),
-('Module', [('Expr', (1, 0), ('SetComp', (1, 1), ('Name', (1, 1), 'r', ('Load',)), [('comprehension', ('Name', (1, 7), 'l', ('Store',)), ('Name', (1, 12), 'x', ('Load',)), [('Name', (1, 17), 'g', ('Load',))])]))]),
-('Module', [('Expr', (1, 0), ('SetComp', (1, 1), ('Name', (1, 1), 'r', ('Load',)), [('comprehension', ('Tuple', (1, 7), [('Name', (1, 7), 'l', ('Store',)), ('Name', (1, 9), 'm', ('Store',))], ('Store',)), ('Name', (1, 14), 'x', ('Load',)), [])]))]),
+('Module', [('Expr', (1, 0), ('DictComp', (1, 0), ('Name', (1, 1), 'a', ('Load',)), ('Name', (1, 5), 'b', ('Load',)), [('comprehension', ('Name', (1, 11), 'w', ('Store',)), ('Name', (1, 16), 'x', ('Load',)), []), ('comprehension', ('Name', (1, 22), 'm', ('Store',)), ('Name', (1, 27), 'p', ('Load',)), [('Name', (1, 32), 'g', ('Load',))])]))]),
+('Module', [('Expr', (1, 0), ('DictComp', (1, 0), ('Name', (1, 1), 'a', ('Load',)), ('Name', (1, 5), 'b', ('Load',)), [('comprehension', ('Tuple', (1, 11), [('Name', (1, 11), 'v', ('Store',)), ('Name', (1, 13), 'w', ('Store',))], ('Store',)), ('Name', (1, 18), 'x', ('Load',)), [])]))]),
+('Module', [('Expr', (1, 0), ('SetComp', (1, 0), ('Name', (1, 1), 'r', ('Load',)), [('comprehension', ('Name', (1, 7), 'l', ('Store',)), ('Name', (1, 12), 'x', ('Load',)), [('Name', (1, 17), 'g', ('Load',))])]))]),
+('Module', [('Expr', (1, 0), ('SetComp', (1, 0), ('Name', (1, 1), 'r', ('Load',)), [('comprehension', ('Tuple', (1, 7), [('Name', (1, 7), 'l', ('Store',)), ('Name', (1, 9), 'm', ('Store',))], ('Store',)), ('Name', (1, 14), 'x', ('Load',)), [])]))]),
+('Module', [('AsyncFunctionDef', (1, 6), 'f', ('arguments', [], None, [], [], None, []), [('Expr', (2, 1), ('Await', (2, 1), ('Call', (2, 7), ('Name', (2, 7), 'something', ('Load',)), [], [])))], [], None)]),
+('Module', [('AsyncFunctionDef', (1, 6), 'f', ('arguments', [], None, [], [], None, []), [('AsyncFor', (2, 7), ('Name', (2, 11), 'e', ('Store',)), ('Name', (2, 16), 'i', ('Load',)), [('Expr', (2, 19), ('Num', (2, 19), 1))], [('Expr', (3, 7), ('Num', (3, 7), 2))])], [], None)]),
+('Module', [('AsyncFunctionDef', (1, 6), 'f', ('arguments', [], None, [], [], None, []), [('AsyncWith', (2, 7), [('withitem', ('Name', (2, 12), 'a', ('Load',)), ('Name', (2, 17), 'b', ('Store',)))], [('Expr', (2, 20), ('Num', (2, 20), 1))])], [], None)]),
+('Module', [('Expr', (1, 0), ('Dict', (1, 0), [None, ('Num', (1, 10), 2)], [('Dict', (1, 3), [('Num', (1, 4), 1)], [('Num', (1, 6), 2)]), ('Num', (1, 12), 3)]))]),
+('Module', [('Expr', (1, 0), ('Set', (1, 0), [('Starred', (1, 1), ('Set', (1, 2), [('Num', (1, 3), 1), ('Num', (1, 6), 2)]), ('Load',)), ('Num', (1, 10), 3)]))]),
]
single_results = [
('Interactive', [('Expr', (1, 0), ('BinOp', (1, 0), ('Num', (1, 0), 1), ('Add',), ('Num', (1, 2), 2)))]),
@@ -1005,7 +1009,7 @@ eval_results = [
('Expression', ('ListComp', (1, 1), ('Name', (1, 1), 'a', ('Load',)), [('comprehension', ('Name', (1, 7), 'b', ('Store',)), ('Name', (1, 12), 'c', ('Load',)), [('Name', (1, 17), 'd', ('Load',))])])),
('Expression', ('GeneratorExp', (1, 1), ('Name', (1, 1), 'a', ('Load',)), [('comprehension', ('Name', (1, 7), 'b', ('Store',)), ('Name', (1, 12), 'c', ('Load',)), [('Name', (1, 17), 'd', ('Load',))])])),
('Expression', ('Compare', (1, 0), ('Num', (1, 0), 1), [('Lt',), ('Lt',)], [('Num', (1, 4), 2), ('Num', (1, 8), 3)])),
-('Expression', ('Call', (1, 0), ('Name', (1, 0), 'f', ('Load',)), [('Num', (1, 2), 1), ('Num', (1, 4), 2)], [('keyword', 'c', ('Num', (1, 8), 3))], ('Name', (1, 11), 'd', ('Load',)), ('Name', (1, 15), 'e', ('Load',)))),
+('Expression', ('Call', (1, 0), ('Name', (1, 0), 'f', ('Load',)), [('Num', (1, 2), 1), ('Num', (1, 4), 2), ('Starred', (1, 10), ('Name', (1, 11), 'd', ('Load',)), ('Load',))], [('keyword', 'c', ('Num', (1, 8), 3)), ('keyword', None, ('Name', (1, 15), 'e', ('Load',)))])),
('Expression', ('Num', (1, 0), 10)),
('Expression', ('Str', (1, 0), 'string')),
('Expression', ('Attribute', (1, 0), ('Name', (1, 0), 'a', ('Load',)), 'b', ('Load',))),
@@ -1016,6 +1020,6 @@ eval_results = [
('Expression', ('Tuple', (1, 0), [('Num', (1, 0), 1), ('Num', (1, 2), 2), ('Num', (1, 4), 3)], ('Load',))),
('Expression', ('Tuple', (1, 1), [('Num', (1, 1), 1), ('Num', (1, 3), 2), ('Num', (1, 5), 3)], ('Load',))),
('Expression', ('Tuple', (1, 0), [], ('Load',))),
-('Expression', ('Call', (1, 0), ('Attribute', (1, 0), ('Attribute', (1, 0), ('Attribute', (1, 0), ('Name', (1, 0), 'a', ('Load',)), 'b', ('Load',)), 'c', ('Load',)), 'd', ('Load',)), [('Subscript', (1, 8), ('Attribute', (1, 8), ('Name', (1, 8), 'a', ('Load',)), 'b', ('Load',)), ('Slice', ('Num', (1, 12), 1), ('Num', (1, 14), 2), None), ('Load',))], [], None, None)),
+('Expression', ('Call', (1, 0), ('Attribute', (1, 0), ('Attribute', (1, 0), ('Attribute', (1, 0), ('Name', (1, 0), 'a', ('Load',)), 'b', ('Load',)), 'c', ('Load',)), 'd', ('Load',)), [('Subscript', (1, 8), ('Attribute', (1, 8), ('Name', (1, 8), 'a', ('Load',)), 'b', ('Load',)), ('Slice', ('Num', (1, 12), 1), ('Num', (1, 14), 2), None), ('Load',))], [])),
]
main()
diff --git a/Lib/test/test_asynchat.py b/Lib/test/test_asynchat.py
index 2dc9d0c17a..3a33fc8b2d 100644
--- a/Lib/test/test_asynchat.py
+++ b/Lib/test/test_asynchat.py
@@ -12,6 +12,7 @@ import socket
import sys
import time
import unittest
+import warnings
import unittest.mock
try:
import threading
@@ -38,7 +39,7 @@ if threading:
self.start_resend_event = None
def run(self):
- self.sock.listen(1)
+ self.sock.listen()
self.event.set()
conn, client = self.sock.accept()
self.buffer = b""
@@ -298,7 +299,10 @@ class TestHelperFunctions(unittest.TestCase):
class TestFifo(unittest.TestCase):
def test_basic(self):
- f = asynchat.fifo()
+ with self.assertWarns(DeprecationWarning) as cm:
+ f = asynchat.fifo()
+ self.assertEqual(str(cm.warning),
+ "fifo class will be removed in Python 3.6")
f.push(7)
f.push(b'a')
self.assertEqual(len(f), 2)
@@ -313,7 +317,10 @@ class TestFifo(unittest.TestCase):
self.assertEqual(f.pop(), (0, None))
def test_given_list(self):
- f = asynchat.fifo([b'x', 17, 3])
+ with self.assertWarns(DeprecationWarning) as cm:
+ f = asynchat.fifo([b'x', 17, 3])
+ self.assertEqual(str(cm.warning),
+ "fifo class will be removed in Python 3.6")
self.assertEqual(len(f), 3)
self.assertEqual(f.pop(), (1, b'x'))
self.assertEqual(f.pop(), (1, 17))
diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py
index d660717916..0807dfbf4c 100644
--- a/Lib/test/test_asyncio/test_base_events.py
+++ b/Lib/test/test_asyncio/test_base_events.py
@@ -45,6 +45,7 @@ def mock_socket_module():
m_socket.socket = mock.MagicMock()
m_socket.socket.return_value = test_utils.mock_nonblocking_socket()
+ m_socket.getaddrinfo._is_coroutine = False
return m_socket
@@ -56,14 +57,6 @@ def patch_socket(f):
class BaseEventTests(test_utils.TestCase):
- def setUp(self):
- super().setUp()
- base_events._ipaddr_info.cache_clear()
-
- def tearDown(self):
- base_events._ipaddr_info.cache_clear()
- super().tearDown()
-
def test_ipaddr_info(self):
UNSPEC = socket.AF_UNSPEC
INET = socket.AF_INET
@@ -79,6 +72,10 @@ class BaseEventTests(test_utils.TestCase):
self.assertEqual(
(INET, STREAM, TCP, '', ('1.2.3.4', 1)),
+ base_events._ipaddr_info(b'1.2.3.4', 1, INET, STREAM, TCP))
+
+ self.assertEqual(
+ (INET, STREAM, TCP, '', ('1.2.3.4', 1)),
base_events._ipaddr_info('1.2.3.4', 1, UNSPEC, STREAM, TCP))
self.assertEqual(
@@ -116,38 +113,62 @@ class BaseEventTests(test_utils.TestCase):
base_events._ipaddr_info('::3', 1, INET, STREAM, TCP))
# IPv6 address with zone index.
- self.assertEqual(
- (INET6, STREAM, TCP, '', ('::3%lo0', 1)),
+ self.assertIsNone(
base_events._ipaddr_info('::3%lo0', 1, INET6, STREAM, TCP))
- @patch_socket
- def test_ipaddr_info_no_inet_pton(self, m_socket):
- del m_socket.inet_pton
- self.test_ipaddr_info()
+ def test_port_parameter_types(self):
+ # Test obscure kinds of arguments for "port".
+ INET = socket.AF_INET
+ STREAM = socket.SOCK_STREAM
+ TCP = socket.IPPROTO_TCP
+
+ self.assertEqual(
+ (INET, STREAM, TCP, '', ('1.2.3.4', 0)),
+ base_events._ipaddr_info('1.2.3.4', None, INET, STREAM, TCP))
+
+ self.assertEqual(
+ (INET, STREAM, TCP, '', ('1.2.3.4', 0)),
+ base_events._ipaddr_info('1.2.3.4', b'', INET, STREAM, TCP))
+
+ self.assertEqual(
+ (INET, STREAM, TCP, '', ('1.2.3.4', 0)),
+ base_events._ipaddr_info('1.2.3.4', '', INET, STREAM, TCP))
+
+ self.assertEqual(
+ (INET, STREAM, TCP, '', ('1.2.3.4', 1)),
+ base_events._ipaddr_info('1.2.3.4', '1', INET, STREAM, TCP))
+
+ self.assertEqual(
+ (INET, STREAM, TCP, '', ('1.2.3.4', 1)),
+ base_events._ipaddr_info('1.2.3.4', b'1', INET, STREAM, TCP))
- def test_check_resolved_address(self):
- sock = socket.socket(socket.AF_INET)
- with sock:
- base_events._check_resolved_address(sock, ('1.2.3.4', 1))
+ def test_getaddrinfo_servname(self):
+ INET = socket.AF_INET
+ STREAM = socket.SOCK_STREAM
+ TCP = socket.IPPROTO_TCP
- sock = socket.socket(socket.AF_INET6)
- with sock:
- base_events._check_resolved_address(sock, ('::3', 1))
- base_events._check_resolved_address(sock, ('::3%lo0', 1))
- with self.assertRaises(ValueError):
- base_events._check_resolved_address(sock, ('foo', 1))
+ self.assertEqual(
+ (INET, STREAM, TCP, '', ('1.2.3.4', 80)),
+ base_events._ipaddr_info('1.2.3.4', 'http', INET, STREAM, TCP))
- def test_check_resolved_sock_type(self):
- # Ensure we ignore extra flags in sock.type.
- if hasattr(socket, 'SOCK_NONBLOCK'):
- sock = socket.socket(type=socket.SOCK_STREAM | socket.SOCK_NONBLOCK)
- with sock:
- base_events._check_resolved_address(sock, ('1.2.3.4', 1))
+ self.assertEqual(
+ (INET, STREAM, TCP, '', ('1.2.3.4', 80)),
+ base_events._ipaddr_info('1.2.3.4', b'http', INET, STREAM, TCP))
- if hasattr(socket, 'SOCK_CLOEXEC'):
- sock = socket.socket(type=socket.SOCK_STREAM | socket.SOCK_CLOEXEC)
- with sock:
- base_events._check_resolved_address(sock, ('1.2.3.4', 1))
+ # Raises "service/proto not found".
+ with self.assertRaises(OSError):
+ base_events._ipaddr_info('1.2.3.4', 'nonsense', INET, STREAM, TCP)
+
+ with self.assertRaises(OSError):
+ base_events._ipaddr_info('1.2.3.4', 'nonsense', INET, STREAM, TCP)
+
+ @patch_socket
+ def test_ipaddr_info_no_inet_pton(self, m_socket):
+ del m_socket.inet_pton
+ self.assertIsNone(base_events._ipaddr_info('1.2.3.4', 1,
+ socket.AF_INET,
+ socket.SOCK_STREAM,
+ socket.IPPROTO_TCP))
class BaseEventLoopTests(test_utils.TestCase):
@@ -628,6 +649,7 @@ class BaseEventLoopTests(test_utils.TestCase):
fut.add_done_callback(lambda *args: self.loop.stop())
self.loop.run_forever()
fut = None # Trigger Future.__del__ or futures._TracebackLogger
+ support.gc_collect()
if PY34:
# Future.__del__ in Python 3.4 logs error with
# an actual exception context
@@ -657,8 +679,10 @@ class BaseEventLoopTests(test_utils.TestCase):
self.loop.set_debug(True)
self.loop._process_events = mock.Mock()
+ self.assertIsNone(self.loop.get_exception_handler())
mock_handler = mock.Mock()
self.loop.set_exception_handler(mock_handler)
+ self.assertIs(self.loop.get_exception_handler(), mock_handler)
handle = run_loop()
mock_handler.assert_called_with(self.loop, {
'exception': MOCK_ANY,
@@ -993,11 +1017,6 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase):
self.loop = asyncio.new_event_loop()
self.set_event_loop(self.loop)
- def tearDown(self):
- # Clear mocked constants like AF_INET from the cache.
- base_events._ipaddr_info.cache_clear()
- super().tearDown()
-
@patch_socket
def test_create_connection_multiple_errors(self, m_socket):
@@ -1146,10 +1165,7 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase):
if not allow_inet_pton:
del m_socket.inet_pton
- def getaddrinfo(*args, **kw):
- self.fail('should not have called getaddrinfo')
-
- m_socket.getaddrinfo = getaddrinfo
+ m_socket.getaddrinfo = socket.getaddrinfo
sock = m_socket.socket.return_value
self.loop.add_reader = mock.Mock()
@@ -1161,9 +1177,9 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase):
t, p = self.loop.run_until_complete(coro)
try:
sock.connect.assert_called_with(('1.2.3.4', 80))
- m_socket.socket.assert_called_with(family=m_socket.AF_INET,
- proto=m_socket.IPPROTO_TCP,
- type=m_socket.SOCK_STREAM)
+ _, kwargs = m_socket.socket.call_args
+ self.assertEqual(kwargs['family'], m_socket.AF_INET)
+ self.assertEqual(kwargs['type'], m_socket.SOCK_STREAM)
finally:
t.close()
test_utils.run_briefly(self.loop) # allow transport to close
@@ -1172,10 +1188,15 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase):
coro = self.loop.create_connection(asyncio.Protocol, '::2', 80)
t, p = self.loop.run_until_complete(coro)
try:
- sock.connect.assert_called_with(('::2', 80))
- m_socket.socket.assert_called_with(family=m_socket.AF_INET6,
- proto=m_socket.IPPROTO_TCP,
- type=m_socket.SOCK_STREAM)
+ # Without inet_pton we use getaddrinfo, which transforms ('::2', 80)
+ # to ('::0.0.0.2', 80, 0, 0). The last 0s are flow info, scope id.
+ [address] = sock.connect.call_args[0]
+ host, port = address[:2]
+ self.assertRegex(host, r'::(0\.)*2')
+ self.assertEqual(port, 80)
+ _, kwargs = m_socket.socket.call_args
+ self.assertEqual(kwargs['family'], m_socket.AF_INET6)
+ self.assertEqual(kwargs['type'], m_socket.SOCK_STREAM)
finally:
t.close()
test_utils.run_briefly(self.loop) # allow transport to close
@@ -1207,6 +1228,21 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase):
self.assertRaises(
OSError, self.loop.run_until_complete, coro)
+ @patch_socket
+ def test_create_connection_bluetooth(self, m_socket):
+ # See http://bugs.python.org/issue27136, fallback to getaddrinfo when
+ # we can't recognize an address is resolved, e.g. a Bluetooth address.
+ addr = ('00:01:02:03:04:05', 1)
+
+ def getaddrinfo(host, port, *args, **kw):
+ assert (host, port) == addr
+ return [(999, 1, 999, '', (addr, 1))]
+
+ m_socket.getaddrinfo = getaddrinfo
+ sock = m_socket.socket()
+ coro = self.loop.sock_connect(sock, addr)
+ self.loop.run_until_complete(coro)
+
def test_create_connection_ssl_server_hostname_default(self):
self.loop.getaddrinfo = mock.Mock()
@@ -1320,7 +1356,7 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase):
getaddrinfo = self.loop.getaddrinfo = mock.Mock()
getaddrinfo.return_value = []
- f = self.loop.create_server(MyProto, '0.0.0.0', 0)
+ f = self.loop.create_server(MyProto, 'python.org', 0)
self.assertRaises(OSError, self.loop.run_until_complete, f)
@patch_socket
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py
index e72b86e77c..d0777758a7 100644
--- a/Lib/test/test_asyncio/test_events.py
+++ b/Lib/test/test_asyncio/test_events.py
@@ -749,34 +749,37 @@ class EventLoopTestsMixin:
@asyncio.coroutine
def getaddrinfo(host, port, *args, **kw):
if family == socket.AF_INET:
- return [[family, socket.SOCK_STREAM, 6, '', (host, port)]]
+ return [(family, socket.SOCK_STREAM, 6, '', (host, port))]
else:
- return [[family, socket.SOCK_STREAM, 6, '', (host, port, 0, 0)]]
+ return [(family, socket.SOCK_STREAM, 6, '', (host, port, 0, 0))]
def getaddrinfo_task(*args, **kwds):
return asyncio.Task(getaddrinfo(*args, **kwds), loop=self.loop)
+ unique_hosts = set(hosts)
+
if family == socket.AF_INET:
- mock_sock.socket().getsockbyname.side_effect = [(host, 80)
- for host in hosts]
+ mock_sock.socket().getsockbyname.side_effect = [
+ (host, 80) for host in unique_hosts]
else:
- mock_sock.socket().getsockbyname.side_effect = [(host, 80, 0, 0)
- for host in hosts]
+ mock_sock.socket().getsockbyname.side_effect = [
+ (host, 80, 0, 0) for host in unique_hosts]
self.loop.getaddrinfo = getaddrinfo_task
self.loop._start_serving = mock.Mock()
self.loop._stop_serving = mock.Mock()
f = self.loop.create_server(lambda: MyProto(self.loop), hosts, 80)
server = self.loop.run_until_complete(f)
self.addCleanup(server.close)
- server_hosts = [sock.getsockbyname()[0] for sock in server.sockets]
- self.assertEqual(server_hosts, hosts)
+ server_hosts = {sock.getsockbyname()[0] for sock in server.sockets}
+ self.assertEqual(server_hosts, unique_hosts)
def test_create_server_multiple_hosts_ipv4(self):
self.create_server_multiple_hosts(socket.AF_INET,
- ['1.2.3.4', '5.6.7.8'])
+ ['1.2.3.4', '5.6.7.8', '1.2.3.4'])
def test_create_server_multiple_hosts_ipv6(self):
- self.create_server_multiple_hosts(socket.AF_INET6, ['::1', '::2'])
+ self.create_server_multiple_hosts(socket.AF_INET6,
+ ['::1', '::2', '::1'])
def test_create_server(self):
proto = MyProto(self.loop)
@@ -999,7 +1002,7 @@ class EventLoopTestsMixin:
with mock.patch.object(self.loop, 'call_exception_handler'):
with test_utils.disable_logger():
with self.assertRaisesRegex(ssl.SSLError,
- '(?i)certificate.verify.failed '):
+ '(?i)certificate.verify.failed'):
self.loop.run_until_complete(f_c)
# execute the loop to log the connection error
@@ -1033,7 +1036,7 @@ class EventLoopTestsMixin:
with mock.patch.object(self.loop, 'call_exception_handler'):
with test_utils.disable_logger():
with self.assertRaisesRegex(ssl.SSLError,
- '(?i)certificate.verify.failed '):
+ '(?i)certificate.verify.failed'):
self.loop.run_until_complete(f_c)
# execute the loop to log the connection error
@@ -1365,6 +1368,41 @@ class EventLoopTestsMixin:
@unittest.skipUnless(sys.platform != 'win32',
"Don't support pipes for Windows")
+ def test_unclosed_pipe_transport(self):
+ # This test reproduces the issue #314 on GitHub
+ loop = self.create_event_loop()
+ read_proto = MyReadPipeProto(loop=loop)
+ write_proto = MyWritePipeProto(loop=loop)
+
+ rpipe, wpipe = os.pipe()
+ rpipeobj = io.open(rpipe, 'rb', 1024)
+ wpipeobj = io.open(wpipe, 'w', 1024)
+
+ @asyncio.coroutine
+ def connect():
+ read_transport, _ = yield from loop.connect_read_pipe(
+ lambda: read_proto, rpipeobj)
+ write_transport, _ = yield from loop.connect_write_pipe(
+ lambda: write_proto, wpipeobj)
+ return read_transport, write_transport
+
+ # Run and close the loop without closing the transports
+ read_transport, write_transport = loop.run_until_complete(connect())
+ loop.close()
+
+ # These 'repr' calls used to raise an AttributeError
+ # See Issue #314 on GitHub
+ self.assertIn('open', repr(read_transport))
+ self.assertIn('open', repr(write_transport))
+
+ # Clean up (avoid ResourceWarning)
+ rpipeobj.close()
+ wpipeobj.close()
+ read_transport._pipe = None
+ write_transport._pipe = None
+
+ @unittest.skipUnless(sys.platform != 'win32',
+ "Don't support pipes for Windows")
# select, poll and kqueue don't support character devices (PTY) on Mac OS X
# older than 10.6 (Snow Leopard)
@support.requires_mac_ver(10, 6)
@@ -1572,25 +1610,6 @@ class EventLoopTestsMixin:
{'clock_resolution': self.loop._clock_resolution,
'selector': self.loop._selector.__class__.__name__})
- def test_sock_connect_address(self):
- addresses = [(socket.AF_INET, ('www.python.org', 80))]
- if support.IPV6_ENABLED:
- addresses.extend((
- (socket.AF_INET6, ('www.python.org', 80)),
- (socket.AF_INET6, ('www.python.org', 80, 0, 0)),
- ))
-
- for family, address in addresses:
- for sock_type in (socket.SOCK_STREAM, socket.SOCK_DGRAM):
- sock = socket.socket(family, sock_type)
- with sock:
- sock.setblocking(False)
- connect = self.loop.sock_connect(sock, address)
- with self.assertRaises(ValueError) as cm:
- self.loop.run_until_complete(connect)
- self.assertIn('address must be resolved',
- str(cm.exception))
-
def test_remove_fds_after_closing(self):
loop = self.create_event_loop()
callback = lambda: None
diff --git a/Lib/test/test_asyncio/test_futures.py b/Lib/test/test_asyncio/test_futures.py
index 55fdff3f8d..c38c1f29e7 100644
--- a/Lib/test/test_asyncio/test_futures.py
+++ b/Lib/test/test_asyncio/test_futures.py
@@ -76,6 +76,10 @@ class FutureTests(test_utils.TestCase):
f = asyncio.Future(loop=self.loop)
self.assertRaises(asyncio.InvalidStateError, f.exception)
+ # StopIteration cannot be raised into a Future - CPython issue26221
+ self.assertRaisesRegex(TypeError, "StopIteration .* cannot be raised",
+ f.set_exception, StopIteration)
+
f.set_exception(exc)
self.assertFalse(f.cancelled())
self.assertTrue(f.done())
@@ -238,6 +242,7 @@ class FutureTests(test_utils.TestCase):
fut.set_exception(RuntimeError('boom'))
del fut
test_utils.run_briefly(self.loop)
+ support.gc_collect()
self.assertTrue(m_log.error.called)
@mock.patch('asyncio.base_events.logger')
@@ -273,14 +278,15 @@ class FutureTests(test_utils.TestCase):
f2 = asyncio.wrap_future(f1)
self.assertIs(f1, f2)
- @mock.patch('asyncio.futures.events')
- def test_wrap_future_use_global_loop(self, m_events):
- def run(arg):
- return (arg, threading.get_ident())
- ex = concurrent.futures.ThreadPoolExecutor(1)
- f1 = ex.submit(run, 'oi')
- f2 = asyncio.wrap_future(f1)
- self.assertIs(m_events.get_event_loop.return_value, f2._loop)
+ def test_wrap_future_use_global_loop(self):
+ with mock.patch('asyncio.futures.events') as events:
+ events.get_event_loop = lambda: self.loop
+ def run(arg):
+ return (arg, threading.get_ident())
+ ex = concurrent.futures.ThreadPoolExecutor(1)
+ f1 = ex.submit(run, 'oi')
+ f2 = asyncio.wrap_future(f1)
+ self.assertIs(self.loop, f2._loop)
def test_wrap_future_cancel(self):
f1 = concurrent.futures.Future()
diff --git a/Lib/test/test_asyncio/test_locks.py b/Lib/test/test_asyncio/test_locks.py
index cdf5d9d3b6..d3bdc51385 100644
--- a/Lib/test/test_asyncio/test_locks.py
+++ b/Lib/test/test_asyncio/test_locks.py
@@ -457,6 +457,31 @@ class ConditionTests(test_utils.TestCase):
self.assertFalse(cond._waiters)
self.assertTrue(cond.locked())
+ def test_wait_cancel_contested(self):
+ cond = asyncio.Condition(loop=self.loop)
+
+ self.loop.run_until_complete(cond.acquire())
+ self.assertTrue(cond.locked())
+
+ wait_task = asyncio.Task(cond.wait(), loop=self.loop)
+ test_utils.run_briefly(self.loop)
+ self.assertFalse(cond.locked())
+
+ # Notify, but contest the lock before cancelling
+ self.loop.run_until_complete(cond.acquire())
+ self.assertTrue(cond.locked())
+ cond.notify()
+ self.loop.call_soon(wait_task.cancel)
+ self.loop.call_soon(cond.release)
+
+ try:
+ self.loop.run_until_complete(wait_task)
+ except asyncio.CancelledError:
+ # Should not happen, since no cancellation points
+ pass
+
+ self.assertTrue(cond.locked())
+
def test_wait_unacquired(self):
cond = asyncio.Condition(loop=self.loop)
self.assertRaises(
diff --git a/Lib/test/test_asyncio/test_pep492.py b/Lib/test/test_asyncio/test_pep492.py
new file mode 100644
index 0000000000..29aba817ec
--- /dev/null
+++ b/Lib/test/test_asyncio/test_pep492.py
@@ -0,0 +1,231 @@
+"""Tests support for new syntax introduced by PEP 492."""
+
+import collections.abc
+import types
+import unittest
+
+try:
+ from test import support
+except ImportError:
+ from asyncio import test_support as support
+from unittest import mock
+
+import asyncio
+from asyncio import test_utils
+
+
+class BaseTest(test_utils.TestCase):
+
+ def setUp(self):
+ self.loop = asyncio.BaseEventLoop()
+ self.loop._process_events = mock.Mock()
+ self.loop._selector = mock.Mock()
+ self.loop._selector.select.return_value = ()
+ self.set_event_loop(self.loop)
+
+
+class LockTests(BaseTest):
+
+ def test_context_manager_async_with(self):
+ primitives = [
+ asyncio.Lock(loop=self.loop),
+ asyncio.Condition(loop=self.loop),
+ asyncio.Semaphore(loop=self.loop),
+ asyncio.BoundedSemaphore(loop=self.loop),
+ ]
+
+ async def test(lock):
+ await asyncio.sleep(0.01, loop=self.loop)
+ self.assertFalse(lock.locked())
+ async with lock as _lock:
+ self.assertIs(_lock, None)
+ self.assertTrue(lock.locked())
+ await asyncio.sleep(0.01, loop=self.loop)
+ self.assertTrue(lock.locked())
+ self.assertFalse(lock.locked())
+
+ for primitive in primitives:
+ self.loop.run_until_complete(test(primitive))
+ self.assertFalse(primitive.locked())
+
+ def test_context_manager_with_await(self):
+ primitives = [
+ asyncio.Lock(loop=self.loop),
+ asyncio.Condition(loop=self.loop),
+ asyncio.Semaphore(loop=self.loop),
+ asyncio.BoundedSemaphore(loop=self.loop),
+ ]
+
+ async def test(lock):
+ await asyncio.sleep(0.01, loop=self.loop)
+ self.assertFalse(lock.locked())
+ with await lock as _lock:
+ self.assertIs(_lock, None)
+ self.assertTrue(lock.locked())
+ await asyncio.sleep(0.01, loop=self.loop)
+ self.assertTrue(lock.locked())
+ self.assertFalse(lock.locked())
+
+ for primitive in primitives:
+ self.loop.run_until_complete(test(primitive))
+ self.assertFalse(primitive.locked())
+
+
+class StreamReaderTests(BaseTest):
+
+ def test_readline(self):
+ DATA = b'line1\nline2\nline3'
+
+ stream = asyncio.StreamReader(loop=self.loop)
+ stream.feed_data(DATA)
+ stream.feed_eof()
+
+ async def reader():
+ data = []
+ async for line in stream:
+ data.append(line)
+ return data
+
+ data = self.loop.run_until_complete(reader())
+ self.assertEqual(data, [b'line1\n', b'line2\n', b'line3'])
+
+
+class CoroutineTests(BaseTest):
+
+ def test_iscoroutine(self):
+ async def foo(): pass
+
+ f = foo()
+ try:
+ self.assertTrue(asyncio.iscoroutine(f))
+ finally:
+ f.close() # silence warning
+
+ # Test that asyncio.iscoroutine() uses collections.abc.Coroutine
+ class FakeCoro:
+ def send(self, value): pass
+ def throw(self, typ, val=None, tb=None): pass
+ def close(self): pass
+ def __await__(self): yield
+
+ self.assertTrue(asyncio.iscoroutine(FakeCoro()))
+
+ def test_iscoroutinefunction(self):
+ async def foo(): pass
+ self.assertTrue(asyncio.iscoroutinefunction(foo))
+
+ def test_function_returning_awaitable(self):
+ class Awaitable:
+ def __await__(self):
+ return ('spam',)
+
+ @asyncio.coroutine
+ def func():
+ return Awaitable()
+
+ coro = func()
+ self.assertEqual(coro.send(None), 'spam')
+ coro.close()
+
+ def test_async_def_coroutines(self):
+ async def bar():
+ return 'spam'
+ async def foo():
+ return await bar()
+
+ # production mode
+ data = self.loop.run_until_complete(foo())
+ self.assertEqual(data, 'spam')
+
+ # debug mode
+ self.loop.set_debug(True)
+ data = self.loop.run_until_complete(foo())
+ self.assertEqual(data, 'spam')
+
+ @mock.patch('asyncio.coroutines.logger')
+ def test_async_def_wrapped(self, m_log):
+ async def foo():
+ pass
+ async def start():
+ foo_coro = foo()
+ self.assertRegex(
+ repr(foo_coro),
+ r'<CoroWrapper .*\.foo\(\) running at .*pep492.*>')
+
+ with support.check_warnings((r'.*foo.*was never',
+ RuntimeWarning)):
+ foo_coro = None
+ support.gc_collect()
+ self.assertTrue(m_log.error.called)
+ message = m_log.error.call_args[0][0]
+ self.assertRegex(message,
+ r'CoroWrapper.*foo.*was never')
+
+ self.loop.set_debug(True)
+ self.loop.run_until_complete(start())
+
+ async def start():
+ foo_coro = foo()
+ task = asyncio.ensure_future(foo_coro, loop=self.loop)
+ self.assertRegex(repr(task), r'Task.*foo.*running')
+
+ self.loop.run_until_complete(start())
+
+
+ def test_types_coroutine(self):
+ def gen():
+ yield from ()
+ return 'spam'
+
+ @types.coroutine
+ def func():
+ return gen()
+
+ async def coro():
+ wrapper = func()
+ self.assertIsInstance(wrapper, types._GeneratorWrapper)
+ return await wrapper
+
+ data = self.loop.run_until_complete(coro())
+ self.assertEqual(data, 'spam')
+
+ def test_task_print_stack(self):
+ T = None
+
+ async def foo():
+ f = T.get_stack(limit=1)
+ try:
+ self.assertEqual(f[0].f_code.co_name, 'foo')
+ finally:
+ f = None
+
+ async def runner():
+ nonlocal T
+ T = asyncio.ensure_future(foo(), loop=self.loop)
+ await T
+
+ self.loop.run_until_complete(runner())
+
+ def test_double_await(self):
+ async def afunc():
+ await asyncio.sleep(0.1, loop=self.loop)
+
+ async def runner():
+ coro = afunc()
+ t = asyncio.Task(coro, loop=self.loop)
+ try:
+ await asyncio.sleep(0, loop=self.loop)
+ await coro
+ finally:
+ t.cancel()
+
+ self.loop.set_debug(True)
+ with self.assertRaisesRegex(
+ RuntimeError,
+ r'Cannot await.*test_double_await.*\bafunc\b.*while.*\bsleep\b'):
+
+ self.loop.run_until_complete(runner())
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/Lib/test/test_asyncio/test_selector_events.py b/Lib/test/test_asyncio/test_selector_events.py
index 135b5abf10..5dc6ff8e66 100644
--- a/Lib/test/test_asyncio/test_selector_events.py
+++ b/Lib/test/test_asyncio/test_selector_events.py
@@ -343,9 +343,11 @@ class BaseSelectorEventLoopTests(test_utils.TestCase):
f = self.loop.sock_connect(sock, ('127.0.0.1', 8080))
self.assertIsInstance(f, asyncio.Future)
- self.assertEqual(
- (f, sock, ('127.0.0.1', 8080)),
- self.loop._sock_connect.call_args[0])
+ self.loop._run_once()
+ future_in, sock_in, address_in = self.loop._sock_connect.call_args[0]
+ self.assertEqual(future_in, f)
+ self.assertEqual(sock_in, sock)
+ self.assertEqual(address_in, ('127.0.0.1', 8080))
def test_sock_connect_timeout(self):
# asyncio issue #205: sock_connect() must unregister the socket on
@@ -359,6 +361,7 @@ class BaseSelectorEventLoopTests(test_utils.TestCase):
# first call to sock_connect() registers the socket
fut = self.loop.sock_connect(sock, ('127.0.0.1', 80))
+ self.loop._run_once()
self.assertTrue(sock.connect.called)
self.assertTrue(self.loop.add_writer.called)
self.assertEqual(len(fut._callbacks), 1)
@@ -376,7 +379,10 @@ class BaseSelectorEventLoopTests(test_utils.TestCase):
sock = mock.Mock()
sock.fileno.return_value = 10
- self.loop._sock_connect(f, sock, ('127.0.0.1', 8080))
+ resolved = self.loop.create_future()
+ resolved.set_result([(socket.AF_INET, socket.SOCK_STREAM,
+ socket.IPPROTO_TCP, '', ('127.0.0.1', 8080))])
+ self.loop._sock_connect(f, sock, resolved)
self.assertTrue(f.done())
self.assertIsNone(f.result())
self.assertTrue(sock.connect.called)
@@ -402,9 +408,13 @@ class BaseSelectorEventLoopTests(test_utils.TestCase):
sock.connect.side_effect = BlockingIOError
sock.getsockopt.return_value = 0
address = ('127.0.0.1', 8080)
+ resolved = self.loop.create_future()
+ resolved.set_result([(socket.AF_INET, socket.SOCK_STREAM,
+ socket.IPPROTO_TCP, '', address)])
f = asyncio.Future(loop=self.loop)
- self.loop._sock_connect(f, sock, address)
+ self.loop._sock_connect(f, sock, resolved)
+ self.loop._run_once()
self.assertTrue(self.loop.add_writer.called)
self.assertEqual(10, self.loop.add_writer.call_args[0][0])
@@ -1077,17 +1087,6 @@ class SelectorSocketTransportTests(test_utils.TestCase):
err,
'Fatal write error on socket transport')
- @mock.patch('asyncio.base_events.logger')
- def test_write_ready_exception_and_close(self, m_log):
- self.sock.send.side_effect = OSError()
- remove_writer = self.loop.remove_writer = mock.Mock()
-
- transport = self.socket_transport()
- transport.close()
- transport._buffer.extend(b'data')
- transport._write_ready()
- remove_writer.assert_called_with(self.sock_fd)
-
def test_write_eof(self):
tr = self.socket_transport()
self.assertTrue(tr.can_write_eof())
@@ -1111,6 +1110,14 @@ class SelectorSocketTransportTests(test_utils.TestCase):
self.sock.shutdown.assert_called_with(socket.SHUT_WR)
tr.close()
+ @mock.patch('asyncio.base_events.logger')
+ def test_transport_close_remove_writer(self, m_log):
+ remove_writer = self.loop.remove_writer = mock.Mock()
+
+ transport = self.socket_transport()
+ transport.close()
+ remove_writer.assert_called_with(self.sock_fd)
+
@unittest.skipIf(ssl is None, 'No ssl module')
class SelectorSslTransportTests(test_utils.TestCase):
@@ -1165,7 +1172,7 @@ class SelectorSslTransportTests(test_utils.TestCase):
self.sslsock.do_handshake.side_effect = exc
with test_utils.disable_logger():
waiter = asyncio.Future(loop=self.loop)
- transport = self.ssl_transport(waiter=waiter)
+ self.ssl_transport(waiter=waiter)
self.assertTrue(waiter.done())
self.assertIs(exc, waiter.exception())
self.assertTrue(self.sslsock.close.called)
@@ -1182,7 +1189,7 @@ class SelectorSslTransportTests(test_utils.TestCase):
self.assertIs(exc, waiter.exception())
def test_cancel_handshake(self):
- # Python issue #23197: cancelling an handshake must not raise an
+ # Python issue #23197: cancelling a handshake must not raise an
# exception or log an error, even if the handshake failed
waiter = asyncio.Future(loop=self.loop)
transport = self.ssl_transport(waiter=waiter)
@@ -1364,20 +1371,19 @@ class SelectorSslTransportTests(test_utils.TestCase):
def test_write_ready_send_closing(self):
self.sslsock.send.return_value = 4
transport = self._make_one()
- transport.close()
transport._buffer = list_to_buffer([b'data'])
+ transport.close()
transport._write_ready()
- self.assertFalse(self.loop.writers)
self.protocol.connection_lost.assert_called_with(None)
def test_write_ready_send_closing_empty_buffer(self):
self.sslsock.send.return_value = 4
+ call_soon = self.loop.call_soon = mock.Mock()
transport = self._make_one()
- transport.close()
transport._buffer = list_to_buffer()
+ transport.close()
transport._write_ready()
- self.assertFalse(self.loop.writers)
- self.protocol.connection_lost.assert_called_with(None)
+ call_soon.assert_called_with(transport._call_connection_lost, None)
def test_write_ready_send_retry(self):
transport = self._make_one()
diff --git a/Lib/test/test_asyncio/test_sslproto.py b/Lib/test/test_asyncio/test_sslproto.py
index a72967ea07..e4121a0184 100644
--- a/Lib/test/test_asyncio/test_sslproto.py
+++ b/Lib/test/test_asyncio/test_sslproto.py
@@ -40,7 +40,7 @@ class SslProtoHandshakeTests(test_utils.TestCase):
ssl_proto.connection_made(transport)
def test_cancel_handshake(self):
- # Python issue #23197: cancelling an handshake must not raise an
+ # Python issue #23197: cancelling a handshake must not raise an
# exception or log an error, even if the handshake failed
waiter = asyncio.Future(loop=self.loop)
ssl_proto = self.ssl_protocol(waiter)
diff --git a/Lib/test/test_asyncio/test_subprocess.py b/Lib/test/test_asyncio/test_subprocess.py
index e90f17dda6..58f7253b4f 100644
--- a/Lib/test/test_asyncio/test_subprocess.py
+++ b/Lib/test/test_asyncio/test_subprocess.py
@@ -287,6 +287,25 @@ class SubprocessMixin:
self.assertEqual(output.rstrip(), b'3')
self.assertEqual(exitcode, 0)
+ def test_empty_input(self):
+ @asyncio.coroutine
+ def empty_input():
+ code = 'import sys; data = sys.stdin.read(); print(len(data))'
+ proc = yield from asyncio.create_subprocess_exec(
+ sys.executable, '-c', code,
+ stdin=asyncio.subprocess.PIPE,
+ stdout=asyncio.subprocess.PIPE,
+ stderr=asyncio.subprocess.PIPE,
+ close_fds=False,
+ loop=self.loop)
+ stdout, stderr = yield from proc.communicate(b'')
+ exitcode = yield from proc.wait()
+ return (stdout, exitcode)
+
+ output, exitcode = self.loop.run_until_complete(empty_input())
+ self.assertEqual(output.rstrip(), b'0')
+ self.assertEqual(exitcode, 0)
+
def test_cancel_process_wait(self):
# Issue #23140: cancel Process.wait()
@@ -388,7 +407,7 @@ class SubprocessMixin:
transport, protocol = yield from create
proc = transport.get_extra_info('subprocess')
- # kill the process (but asyncio is not notified immediatly)
+ # kill the process (but asyncio is not notified immediately)
proc.kill()
proc.wait()
diff --git a/Lib/test/test_asyncio/test_tasks.py b/Lib/test/test_asyncio/test_tasks.py
index c9d49f047c..e7fb774fca 100644
--- a/Lib/test/test_asyncio/test_tasks.py
+++ b/Lib/test/test_asyncio/test_tasks.py
@@ -1794,6 +1794,30 @@ class TaskTests(test_utils.TestCase):
self.assertRegex(message, re.compile(regex, re.DOTALL))
+ def test_return_coroutine_from_coroutine(self):
+ """Return of @asyncio.coroutine()-wrapped function generator object
+ from @asyncio.coroutine()-wrapped function should have same effect as
+ returning generator object or Future."""
+ def check():
+ @asyncio.coroutine
+ def outer_coro():
+ @asyncio.coroutine
+ def inner_coro():
+ return 1
+
+ return inner_coro()
+
+ result = self.loop.run_until_complete(outer_coro())
+ self.assertEqual(result, 1)
+
+ # Test with debug flag cleared.
+ with set_coroutine_debug(False):
+ check()
+
+ # Test with debug flag set.
+ with set_coroutine_debug(True):
+ check()
+
def test_task_source_traceback(self):
self.loop.set_debug(True)
@@ -2236,174 +2260,5 @@ class SleepTests(test_utils.TestCase):
self.assertEqual(result, 11)
-class TimeoutTests(test_utils.TestCase):
- def setUp(self):
- self.loop = asyncio.new_event_loop()
- asyncio.set_event_loop(None)
-
- def tearDown(self):
- self.loop.close()
- self.loop = None
-
- def test_timeout(self):
- canceled_raised = [False]
-
- @asyncio.coroutine
- def long_running_task():
- try:
- yield from asyncio.sleep(10, loop=self.loop)
- except asyncio.CancelledError:
- canceled_raised[0] = True
- raise
-
- @asyncio.coroutine
- def go():
- with self.assertRaises(asyncio.TimeoutError):
- with asyncio.timeout(0.01, loop=self.loop) as t:
- yield from long_running_task()
- self.assertIs(t._loop, self.loop)
-
- self.loop.run_until_complete(go())
- self.assertTrue(canceled_raised[0], 'CancelledError was not raised')
-
- def test_timeout_finish_in_time(self):
- @asyncio.coroutine
- def long_running_task():
- yield from asyncio.sleep(0.01, loop=self.loop)
- return 'done'
-
- @asyncio.coroutine
- def go():
- with asyncio.timeout(0.1, loop=self.loop):
- resp = yield from long_running_task()
- self.assertEqual(resp, 'done')
-
- self.loop.run_until_complete(go())
-
- def test_timeout_gloabal_loop(self):
- asyncio.set_event_loop(self.loop)
-
- @asyncio.coroutine
- def run():
- with asyncio.timeout(0.1) as t:
- yield from asyncio.sleep(0.01)
- self.assertIs(t._loop, self.loop)
-
- self.loop.run_until_complete(run())
-
- def test_timeout_not_relevant_exception(self):
- @asyncio.coroutine
- def go():
- yield from asyncio.sleep(0, loop=self.loop)
- with self.assertRaises(KeyError):
- with asyncio.timeout(0.1, loop=self.loop):
- raise KeyError
-
- self.loop.run_until_complete(go())
-
- def test_timeout_canceled_error_is_converted_to_timeout(self):
- @asyncio.coroutine
- def go():
- yield from asyncio.sleep(0, loop=self.loop)
- with self.assertRaises(asyncio.CancelledError):
- with asyncio.timeout(0.001, loop=self.loop):
- raise asyncio.CancelledError
-
- self.loop.run_until_complete(go())
-
- def test_timeout_blocking_loop(self):
- @asyncio.coroutine
- def long_running_task():
- time.sleep(0.05)
- return 'done'
-
- @asyncio.coroutine
- def go():
- with asyncio.timeout(0.01, loop=self.loop):
- result = yield from long_running_task()
- self.assertEqual(result, 'done')
-
- self.loop.run_until_complete(go())
-
- def test_for_race_conditions(self):
- fut = asyncio.Future(loop=self.loop)
- self.loop.call_later(0.1, fut.set_result('done'))
-
- @asyncio.coroutine
- def go():
- with asyncio.timeout(0.2, loop=self.loop):
- resp = yield from fut
- self.assertEqual(resp, 'done')
-
- self.loop.run_until_complete(go())
-
- def test_timeout_time(self):
- @asyncio.coroutine
- def go():
- foo_running = None
-
- start = self.loop.time()
- with self.assertRaises(asyncio.TimeoutError):
- with asyncio.timeout(0.1, loop=self.loop):
- foo_running = True
- try:
- yield from asyncio.sleep(0.2, loop=self.loop)
- finally:
- foo_running = False
-
- dt = self.loop.time() - start
- # tolerate a small delta for slow delta or unstable clocks
- self.assertTrue(0.09 < dt < 0.12, dt)
- self.assertFalse(foo_running)
-
- self.loop.run_until_complete(go())
-
- def test_raise_runtimeerror_if_no_task(self):
- with self.assertRaises(RuntimeError):
- with asyncio.timeout(0.1, loop=self.loop):
- pass
-
- def test_outer_coro_is_not_cancelled(self):
-
- has_timeout = [False]
-
- @asyncio.coroutine
- def outer():
- try:
- with asyncio.timeout(0.001, loop=self.loop):
- yield from asyncio.sleep(1, loop=self.loop)
- except asyncio.TimeoutError:
- has_timeout[0] = True
-
- @asyncio.coroutine
- def go():
- task = asyncio.ensure_future(outer(), loop=self.loop)
- yield from task
- self.assertTrue(has_timeout[0])
- self.assertFalse(task.cancelled())
- self.assertTrue(task.done())
-
- self.loop.run_until_complete(go())
-
- def test_cancel_outer_coro(self):
- fut = asyncio.Future(loop=self.loop)
-
- @asyncio.coroutine
- def outer():
- fut.set_result(None)
- yield from asyncio.sleep(1, loop=self.loop)
-
- @asyncio.coroutine
- def go():
- task = asyncio.ensure_future(outer(), loop=self.loop)
- yield from fut
- task.cancel()
- with self.assertRaises(asyncio.CancelledError):
- yield from task
- self.assertTrue(task.cancelled())
- self.assertTrue(task.done())
-
- self.loop.run_until_complete(go())
-
if __name__ == '__main__':
unittest.main()
diff --git a/Lib/test/test_asyncore.py b/Lib/test/test_asyncore.py
index d44726d11f..38579168cf 100644
--- a/Lib/test/test_asyncore.py
+++ b/Lib/test/test_asyncore.py
@@ -7,7 +7,6 @@ import sys
import time
import errno
import struct
-import warnings
from test import support
from io import BytesIO
@@ -65,7 +64,7 @@ class crashingdummy:
# used when testing senders; just collects what it gets until newline is sent
def capture_server(evt, buf, serv):
try:
- serv.listen(5)
+ serv.listen()
conn, addr = serv.accept()
except socket.timeout:
pass
@@ -298,23 +297,6 @@ class DispatcherTests(unittest.TestCase):
'warning: unhandled connect event']
self.assertEqual(lines, expected)
- def test_issue_8594(self):
- # XXX - this test is supposed to be removed in next major Python
- # version
- d = asyncore.dispatcher(socket.socket())
- # make sure the error message no longer refers to the socket
- # object but the dispatcher instance instead
- self.assertRaisesRegex(AttributeError, 'dispatcher instance',
- getattr, d, 'foo')
- # cheap inheritance with the underlying socket is supposed
- # to still work but a DeprecationWarning is expected
- with warnings.catch_warnings(record=True) as w:
- warnings.simplefilter("always")
- family = d.family
- self.assertEqual(family, socket.AF_INET)
- self.assertEqual(len(w), 1)
- self.assertTrue(issubclass(w[0].category, DeprecationWarning))
-
def test_strerror(self):
# refers to bug #8573
err = asyncore._strerror(errno.EPERM)
@@ -331,9 +313,8 @@ class dispatcherwithsend_noread(asyncore.dispatcher_with_send):
def handle_connect(self):
pass
-class DispatcherWithSendTests(unittest.TestCase):
- usepoll = False
+class DispatcherWithSendTests(unittest.TestCase):
def setUp(self):
pass
@@ -383,10 +364,6 @@ class DispatcherWithSendTests(unittest.TestCase):
self.fail("join() timed out")
-
-class DispatcherWithSendTests_UsePoll(DispatcherWithSendTests):
- usepoll = True
-
@unittest.skipUnless(hasattr(asyncore, 'file_wrapper'),
'asyncore.file_wrapper required')
class FileWrapperTest(unittest.TestCase):
diff --git a/Lib/test/test_atexit.py b/Lib/test/test_atexit.py
index 70d2f1cf54..172bd25419 100644
--- a/Lib/test/test_atexit.py
+++ b/Lib/test/test_atexit.py
@@ -177,9 +177,5 @@ class SubinterpreterTest(unittest.TestCase):
self.assertEqual(atexit._ncallbacks(), n)
-def test_main():
- support.run_unittest(__name__)
-
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_augassign.py b/Lib/test/test_augassign.py
index 0e75c6bd32..5093e9d0f3 100644
--- a/Lib/test/test_augassign.py
+++ b/Lib/test/test_augassign.py
@@ -1,6 +1,5 @@
# Augmented assignment test.
-from test.support import run_unittest
import unittest
@@ -136,6 +135,14 @@ class AugAssignTest(unittest.TestCase):
output.append("__imul__ called")
return self
+ def __matmul__(self, val):
+ output.append("__matmul__ called")
+ def __rmatmul__(self, val):
+ output.append("__rmatmul__ called")
+ def __imatmul__(self, val):
+ output.append("__imatmul__ called")
+ return self
+
def __floordiv__(self, val):
output.append("__floordiv__ called")
return self
@@ -225,6 +232,10 @@ class AugAssignTest(unittest.TestCase):
1 * x
x *= 1
+ x @ 1
+ 1 @ x
+ x @= 1
+
x / 1
1 / x
x /= 1
@@ -271,6 +282,9 @@ __isub__ called
__mul__ called
__rmul__ called
__imul__ called
+__matmul__ called
+__rmatmul__ called
+__imatmul__ called
__truediv__ called
__rtruediv__ called
__itruediv__ called
@@ -300,8 +314,5 @@ __rlshift__ called
__ilshift__ called
'''.splitlines())
-def test_main():
- run_unittest(AugAssignTest)
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_base64.py b/Lib/test/test_base64.py
index b9738ddaf5..4f86aaa0c0 100644
--- a/Lib/test/test_base64.py
+++ b/Lib/test/test_base64.py
@@ -3,10 +3,8 @@ from test import support
import base64
import binascii
import os
-import sys
-import subprocess
-import struct
from array import array
+from test.support import script_helper
class LegacyBase64TestCase(unittest.TestCase):
@@ -245,14 +243,26 @@ class BaseXYTestCase(unittest.TestCase):
(b'@@', b''),
(b'!', b''),
(b'YWJj\nYWI=', b'abcab'))
+ funcs = (
+ base64.b64decode,
+ base64.standard_b64decode,
+ base64.urlsafe_b64decode,
+ )
for bstr, res in tests:
- self.assertEqual(base64.b64decode(bstr), res)
- self.assertEqual(base64.b64decode(bstr.decode('ascii')), res)
+ for func in funcs:
+ with self.subTest(bstr=bstr, func=func):
+ self.assertEqual(func(bstr), res)
+ self.assertEqual(func(bstr.decode('ascii')), res)
with self.assertRaises(binascii.Error):
base64.b64decode(bstr, validate=True)
with self.assertRaises(binascii.Error):
base64.b64decode(bstr.decode('ascii'), validate=True)
+ # Normal alphabet characters not discarded when alternative given
+ res = b'\xFB\xEF\xBE\xFF\xFF\xFF'
+ self.assertEqual(base64.b64decode(b'++[[//]]', b'[]'), res)
+ self.assertEqual(base64.urlsafe_b64decode(b'++--//__'), res)
+
def test_b32encode(self):
eq = self.assertEqual
eq(base64.b32encode(b''), b'')
@@ -362,6 +372,10 @@ class BaseXYTestCase(unittest.TestCase):
b'\x01\x02\xab\xcd\xef')
eq(base64.b16decode(array('B', b"0102abcdef"), True),
b'\x01\x02\xab\xcd\xef')
+ # Non-alphabet characters
+ self.assertRaises(binascii.Error, base64.b16decode, '0102AG')
+ # Incorrect "padding"
+ self.assertRaises(binascii.Error, base64.b16decode, '010')
def test_a85encode(self):
eq = self.assertEqual
@@ -480,6 +494,7 @@ class BaseXYTestCase(unittest.TestCase):
eq(base64.a85decode(data, adobe=False), res, data)
eq(base64.a85decode(data.decode("ascii"), adobe=False), res, data)
eq(base64.a85decode(b'<~' + data + b'~>', adobe=True), res, data)
+ eq(base64.a85decode(data + b'~>', adobe=True), res, data)
eq(base64.a85decode('<~%s~>' % data.decode("ascii"), adobe=True),
res, data)
@@ -570,8 +585,6 @@ class BaseXYTestCase(unittest.TestCase):
b"malformed", adobe=True)
self.assertRaises(ValueError, base64.a85decode,
b"<~still malformed", adobe=True)
- self.assertRaises(ValueError, base64.a85decode,
- b"also malformed~>", adobe=True)
# With adobe=False (the default), Adobe framing markers are disallowed
self.assertRaises(ValueError, base64.a85decode,
@@ -622,15 +635,13 @@ class BaseXYTestCase(unittest.TestCase):
self.assertTrue(issubclass(binascii.Error, ValueError))
-
class TestMain(unittest.TestCase):
def tearDown(self):
if os.path.exists(support.TESTFN):
os.unlink(support.TESTFN)
- def get_output(self, *args, **options):
- args = (sys.executable, '-m', 'base64') + args
- return subprocess.check_output(args, **options)
+ def get_output(self, *args):
+ return script_helper.assert_python_ok('-m', 'base64', *args).out
def test_encode_decode(self):
output = self.get_output('-t')
@@ -643,13 +654,14 @@ class TestMain(unittest.TestCase):
def test_encode_file(self):
with open(support.TESTFN, 'wb') as fp:
fp.write(b'a\xffb\n')
-
output = self.get_output('-e', support.TESTFN)
self.assertEqual(output.rstrip(), b'Yf9iCg==')
- with open(support.TESTFN, 'rb') as fp:
- output = self.get_output('-e', stdin=fp)
- self.assertEqual(output.rstrip(), b'Yf9iCg==')
+ def test_encode_from_stdin(self):
+ with script_helper.spawn_python('-m', 'base64', '-e') as proc:
+ out, err = proc.communicate(b'a\xffb\n')
+ self.assertEqual(out.rstrip(), b'Yf9iCg==')
+ self.assertIsNone(err)
def test_decode(self):
with open(support.TESTFN, 'wb') as fp:
@@ -657,10 +669,5 @@ class TestMain(unittest.TestCase):
output = self.get_output('-d', support.TESTFN)
self.assertEqual(output.rstrip(), b'a\xffb')
-
-
-def test_main():
- support.run_unittest(__name__)
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_bigmem.py b/Lib/test/test_bigmem.py
index 0e545950ee..40ac9bff2f 100644
--- a/Lib/test/test_bigmem.py
+++ b/Lib/test/test_bigmem.py
@@ -737,7 +737,7 @@ class StrTest(unittest.TestCase, BaseStrTest):
finally:
r = s = None
- # The original test_translate is overriden here, so as to get the
+ # The original test_translate is overridden here, so as to get the
# correct size estimate: str.translate() uses an intermediate Py_UCS4
# representation.
diff --git a/Lib/test/test_binascii.py b/Lib/test/test_binascii.py
index 389daa0153..8367afe083 100644
--- a/Lib/test/test_binascii.py
+++ b/Lib/test/test_binascii.py
@@ -1,6 +1,5 @@
"""Test the binascii C module."""
-from test import support
import unittest
import binascii
import array
@@ -277,11 +276,5 @@ class MemoryviewBinASCIITest(BinASCIITest):
type2test = memoryview
-def test_main():
- support.run_unittest(BinASCIITest,
- ArrayBinASCIITest,
- BytearrayBinASCIITest,
- MemoryviewBinASCIITest)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_binop.py b/Lib/test/test_binop.py
index 963aa01b6c..e9dbddcd93 100644
--- a/Lib/test/test_binop.py
+++ b/Lib/test/test_binop.py
@@ -58,7 +58,7 @@ class Rat(object):
den = property(_get_den, None)
def __repr__(self):
- """Convert a Rat to an string resembling a Rat constructor call."""
+ """Convert a Rat to a string resembling a Rat constructor call."""
return "Rat(%d, %d)" % (self.__num, self.__den)
def __str__(self):
@@ -389,9 +389,5 @@ class OperationOrderTests(unittest.TestCase):
self.assertEqual(op_sequence(le, B, V), ['B.__le__', 'V.__ge__'])
-def test_main():
- support.run_unittest(RatTestCase, OperationOrderTests)
-
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_bool.py b/Lib/test/test_bool.py
index 250743949b..d30a3b9c0f 100644
--- a/Lib/test/test_bool.py
+++ b/Lib/test/test_bool.py
@@ -314,6 +314,10 @@ class BoolTest(unittest.TestCase):
return -1
self.assertRaises(ValueError, bool, Eggs())
+ def test_from_bytes(self):
+ self.assertIs(bool.from_bytes(b'\x00'*8, 'big'), False)
+ self.assertIs(bool.from_bytes(b'abcd', 'little'), True)
+
def test_sane_len(self):
# this test just tests our assumptions about __len__
# this will start failing if __len__ changes assertions
diff --git a/Lib/test/test_buffer.py b/Lib/test/test_buffer.py
index aa153779ae..2eef9fc685 100644
--- a/Lib/test/test_buffer.py
+++ b/Lib/test/test_buffer.py
@@ -11,6 +11,7 @@
# memoryview tests is now in this module.
#
+import contextlib
import unittest
from test import support
from itertools import permutations, product
@@ -216,7 +217,7 @@ def iter_format(nitems, testobj='ndarray'):
for t in iter_mode(nitems, testobj):
yield t
if testobj != 'ndarray':
- raise StopIteration
+ return
yield struct_items(nitems, testobj)
@@ -840,6 +841,11 @@ class TestBufferProtocol(unittest.TestCase):
# test tobytes()
self.assertEqual(result.tobytes(), b)
+ # test hex()
+ m = memoryview(result)
+ h = "".join("%02x" % c for c in b)
+ self.assertEqual(m.hex(), h)
+
# lst := expected multi-dimensional logical representation
# flatten(lst) := elements in C-order
ff = fmt if fmt else 'B'
@@ -1007,6 +1013,7 @@ class TestBufferProtocol(unittest.TestCase):
# shape, strides, offset
structure = (
([], [], 0),
+ ([1,3,1], [], 0),
([12], [], 0),
([12], [-1], 11),
([6], [2], 0),
@@ -1078,6 +1085,18 @@ class TestBufferProtocol(unittest.TestCase):
self.assertRaises(BufferError, ndarray, ex, getbuf=PyBUF_ANY_CONTIGUOUS)
nd = ndarray(ex, getbuf=PyBUF_SIMPLE)
+ # Issue #22445: New precise contiguity definition.
+ for shape in [1,12,1], [7,0,7]:
+ for order in 0, ND_FORTRAN:
+ ex = ndarray(items, shape=shape, flags=order|ND_WRITABLE)
+ self.assertTrue(is_contiguous(ex, 'F'))
+ self.assertTrue(is_contiguous(ex, 'C'))
+
+ for flags in requests:
+ nd = ndarray(ex, getbuf=flags)
+ self.assertTrue(is_contiguous(nd, 'F'))
+ self.assertTrue(is_contiguous(nd, 'C'))
+
def test_ndarray_exceptions(self):
nd = ndarray([9], [1])
ndm = ndarray([9], [1], flags=ND_VAREXPORT)
@@ -2454,7 +2473,7 @@ class TestBufferProtocol(unittest.TestCase):
def test_memoryview_sizeof(self):
check = self.check_sizeof
vsize = support.calcvobjsize
- base_struct = 'Pnin 2P2n2i5P 3cP'
+ base_struct = 'Pnin 2P2n2i5P P'
per_dim = '3n'
items = list(range(8))
@@ -2545,8 +2564,7 @@ class TestBufferProtocol(unittest.TestCase):
ex = ndarray(sitems, shape=[1], format=sfmt)
msrc = memoryview(ex)
for dfmt, _, _ in iter_format(1):
- if (not is_memoryview_format(sfmt) or
- not is_memoryview_format(dfmt)):
+ if not is_memoryview_format(dfmt):
self.assertRaises(ValueError, msrc.cast, dfmt,
[32//dsize])
else:
@@ -2759,6 +2777,32 @@ class TestBufferProtocol(unittest.TestCase):
ndim=ndim, shape=shape, strides=strides,
lst=lst, cast=True)
+ if ctypes:
+ # format: "T{>l:x:>d:y:}"
+ class BEPoint(ctypes.BigEndianStructure):
+ _fields_ = [("x", ctypes.c_long), ("y", ctypes.c_double)]
+ point = BEPoint(100, 200.1)
+ m1 = memoryview(point)
+ m2 = m1.cast('B')
+ self.assertEqual(m2.obj, point)
+ self.assertEqual(m2.itemsize, 1)
+ self.assertEqual(m2.readonly, 0)
+ self.assertEqual(m2.ndim, 1)
+ self.assertEqual(m2.shape, (m2.nbytes,))
+ self.assertEqual(m2.strides, (1,))
+ self.assertEqual(m2.suboffsets, ())
+
+ x = ctypes.c_double(1.2)
+ m1 = memoryview(x)
+ m2 = m1.cast('c')
+ self.assertEqual(m2.obj, x)
+ self.assertEqual(m2.itemsize, 1)
+ self.assertEqual(m2.readonly, 0)
+ self.assertEqual(m2.ndim, 1)
+ self.assertEqual(m2.shape, (m2.nbytes,))
+ self.assertEqual(m2.strides, (1,))
+ self.assertEqual(m2.suboffsets, ())
+
def test_memoryview_tolist(self):
# Most tolist() tests are in self.verify() etc.
@@ -2812,6 +2856,13 @@ class TestBufferProtocol(unittest.TestCase):
m = memoryview(ex)
self.assertRaises(TypeError, eval, "9.0 in m", locals())
+ @contextlib.contextmanager
+ def assert_out_of_bounds_error(self, dim):
+ with self.assertRaises(IndexError) as cm:
+ yield
+ self.assertEqual(str(cm.exception),
+ "index out of bounds on dimension %d" % (dim,))
+
def test_memoryview_index(self):
# ndim = 0
@@ -2838,12 +2889,31 @@ class TestBufferProtocol(unittest.TestCase):
self.assertRaises(IndexError, m.__getitem__, -8)
self.assertRaises(IndexError, m.__getitem__, 8)
- # Not implemented: multidimensional sub-views
+ # multi-dimensional
ex = ndarray(list(range(12)), shape=[3,4], flags=ND_WRITABLE)
m = memoryview(ex)
- self.assertRaises(NotImplementedError, m.__getitem__, 0)
- self.assertRaises(NotImplementedError, m.__setitem__, 0, 9)
+ self.assertEqual(m[0, 0], 0)
+ self.assertEqual(m[2, 0], 8)
+ self.assertEqual(m[2, 3], 11)
+ self.assertEqual(m[-1, -1], 11)
+ self.assertEqual(m[-3, -4], 0)
+
+ # out of bounds
+ for index in (3, -4):
+ with self.assert_out_of_bounds_error(dim=1):
+ m[index, 0]
+ for index in (4, -5):
+ with self.assert_out_of_bounds_error(dim=2):
+ m[0, index]
+ self.assertRaises(IndexError, m.__getitem__, (2**64, 0))
+ self.assertRaises(IndexError, m.__getitem__, (0, 2**64))
+
+ self.assertRaises(TypeError, m.__getitem__, (0, 0, 0))
+ self.assertRaises(TypeError, m.__getitem__, (0.0, 0.0))
+
+ # Not implemented: multidimensional sub-views
+ self.assertRaises(NotImplementedError, m.__getitem__, ())
self.assertRaises(NotImplementedError, m.__getitem__, 0)
def test_memoryview_assign(self):
@@ -2932,10 +3002,27 @@ class TestBufferProtocol(unittest.TestCase):
m = memoryview(ex)
self.assertRaises(NotImplementedError, m.__setitem__, 0, 1)
- # Not implemented: multidimensional sub-views
+ # multi-dimensional
ex = ndarray(list(range(12)), shape=[3,4], flags=ND_WRITABLE)
m = memoryview(ex)
+ m[0,1] = 42
+ self.assertEqual(ex[0][1], 42)
+ m[-1,-1] = 43
+ self.assertEqual(ex[2][3], 43)
+ # errors
+ for index in (3, -4):
+ with self.assert_out_of_bounds_error(dim=1):
+ m[index, 0] = 0
+ for index in (4, -5):
+ with self.assert_out_of_bounds_error(dim=2):
+ m[0, index] = 0
+ self.assertRaises(IndexError, m.__setitem__, (2**64, 0), 0)
+ self.assertRaises(IndexError, m.__setitem__, (0, 2**64), 0)
+
+ self.assertRaises(TypeError, m.__setitem__, (0, 0, 0), 0)
+ self.assertRaises(TypeError, m.__setitem__, (0.0, 0.0), 0)
+ # Not implemented: multidimensional sub-views
self.assertRaises(NotImplementedError, m.__setitem__, 0, [2, 3])
def test_memoryview_slice(self):
@@ -2948,8 +3035,8 @@ class TestBufferProtocol(unittest.TestCase):
self.assertRaises(ValueError, m.__setitem__, slice(0,2,0),
bytearray([1,2]))
- # invalid slice key
- self.assertRaises(TypeError, m.__getitem__, ())
+ # 0-dim slicing (identity function)
+ self.assertRaises(NotImplementedError, m.__getitem__, ())
# multidimensional slices
ex = ndarray(list(range(12)), shape=[12], flags=ND_WRITABLE)
diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py
index d00d0b77cb..8cc1b0074b 100644
--- a/Lib/test/test_builtin.py
+++ b/Lib/test/test_builtin.py
@@ -16,7 +16,7 @@ import unittest
import warnings
from operator import neg
from test.support import TESTFN, unlink, run_unittest, check_warnings
-from test.script_helper import assert_python_ok
+from test.support.script_helper import assert_python_ok
try:
import pty, signal
except ImportError:
@@ -312,11 +312,11 @@ class BuiltinTest(unittest.TestCase):
self.assertRaises(TypeError, compile)
self.assertRaises(ValueError, compile, 'print(42)\n', '<string>', 'badmode')
self.assertRaises(ValueError, compile, 'print(42)\n', '<string>', 'single', 0xff)
- self.assertRaises(TypeError, compile, chr(0), 'f', 'exec')
+ self.assertRaises(ValueError, compile, chr(0), 'f', 'exec')
self.assertRaises(TypeError, compile, 'pass', '?', 'exec',
mode='eval', source='0', filename='tmp')
compile('print("\xe5")\n', '', 'exec')
- self.assertRaises(TypeError, compile, chr(0), 'f', 'exec')
+ self.assertRaises(ValueError, compile, chr(0), 'f', 'exec')
self.assertRaises(ValueError, compile, str('a = 1'), 'f', 'bad')
# test the optimize argument
@@ -1094,7 +1094,7 @@ class BuiltinTest(unittest.TestCase):
self.assertAlmostEqual(pow(-1, 0.5), 1j)
self.assertAlmostEqual(pow(-1, 1/3), 0.5 + 0.8660254037844386j)
- self.assertRaises(TypeError, pow, -1, -2, 3)
+ self.assertRaises(ValueError, pow, -1, -2, 3)
self.assertRaises(ValueError, pow, 1, 2, 0)
self.assertRaises(TypeError, pow)
@@ -1668,6 +1668,161 @@ class ShutdownTest(unittest.TestCase):
self.assertEqual(["before", "after"], out.decode().splitlines())
+class TestType(unittest.TestCase):
+ def test_new_type(self):
+ A = type('A', (), {})
+ self.assertEqual(A.__name__, 'A')
+ self.assertEqual(A.__qualname__, 'A')
+ self.assertEqual(A.__module__, __name__)
+ self.assertEqual(A.__bases__, (object,))
+ self.assertIs(A.__base__, object)
+ x = A()
+ self.assertIs(type(x), A)
+ self.assertIs(x.__class__, A)
+
+ class B:
+ def ham(self):
+ return 'ham%d' % self
+ C = type('C', (B, int), {'spam': lambda self: 'spam%s' % self})
+ self.assertEqual(C.__name__, 'C')
+ self.assertEqual(C.__qualname__, 'C')
+ self.assertEqual(C.__module__, __name__)
+ self.assertEqual(C.__bases__, (B, int))
+ self.assertIs(C.__base__, int)
+ self.assertIn('spam', C.__dict__)
+ self.assertNotIn('ham', C.__dict__)
+ x = C(42)
+ self.assertEqual(x, 42)
+ self.assertIs(type(x), C)
+ self.assertIs(x.__class__, C)
+ self.assertEqual(x.ham(), 'ham42')
+ self.assertEqual(x.spam(), 'spam42')
+ self.assertEqual(x.to_bytes(2, 'little'), b'\x2a\x00')
+
+ def test_type_new_keywords(self):
+ class B:
+ def ham(self):
+ return 'ham%d' % self
+ C = type.__new__(type,
+ name='C',
+ bases=(B, int),
+ dict={'spam': lambda self: 'spam%s' % self})
+ self.assertEqual(C.__name__, 'C')
+ self.assertEqual(C.__qualname__, 'C')
+ self.assertEqual(C.__module__, __name__)
+ self.assertEqual(C.__bases__, (B, int))
+ self.assertIs(C.__base__, int)
+ self.assertIn('spam', C.__dict__)
+ self.assertNotIn('ham', C.__dict__)
+
+ def test_type_name(self):
+ for name in 'A', '\xc4', '\U0001f40d', 'B.A', '42', '':
+ with self.subTest(name=name):
+ A = type(name, (), {})
+ self.assertEqual(A.__name__, name)
+ self.assertEqual(A.__qualname__, name)
+ self.assertEqual(A.__module__, __name__)
+ with self.assertRaises(ValueError):
+ type('A\x00B', (), {})
+ with self.assertRaises(ValueError):
+ type('A\udcdcB', (), {})
+ with self.assertRaises(TypeError):
+ type(b'A', (), {})
+
+ C = type('C', (), {})
+ for name in 'A', '\xc4', '\U0001f40d', 'B.A', '42', '':
+ with self.subTest(name=name):
+ C.__name__ = name
+ self.assertEqual(C.__name__, name)
+ self.assertEqual(C.__qualname__, 'C')
+ self.assertEqual(C.__module__, __name__)
+
+ A = type('C', (), {})
+ with self.assertRaises(ValueError):
+ A.__name__ = 'A\x00B'
+ self.assertEqual(A.__name__, 'C')
+ with self.assertRaises(ValueError):
+ A.__name__ = 'A\udcdcB'
+ self.assertEqual(A.__name__, 'C')
+ with self.assertRaises(TypeError):
+ A.__name__ = b'A'
+ self.assertEqual(A.__name__, 'C')
+
+ def test_type_qualname(self):
+ A = type('A', (), {'__qualname__': 'B.C'})
+ self.assertEqual(A.__name__, 'A')
+ self.assertEqual(A.__qualname__, 'B.C')
+ self.assertEqual(A.__module__, __name__)
+ with self.assertRaises(TypeError):
+ type('A', (), {'__qualname__': b'B'})
+ self.assertEqual(A.__qualname__, 'B.C')
+
+ A.__qualname__ = 'D.E'
+ self.assertEqual(A.__name__, 'A')
+ self.assertEqual(A.__qualname__, 'D.E')
+ with self.assertRaises(TypeError):
+ A.__qualname__ = b'B'
+ self.assertEqual(A.__qualname__, 'D.E')
+
+ def test_type_doc(self):
+ for doc in 'x', '\xc4', '\U0001f40d', 'x\x00y', b'x', 42, None:
+ A = type('A', (), {'__doc__': doc})
+ self.assertEqual(A.__doc__, doc)
+ with self.assertRaises(UnicodeEncodeError):
+ type('A', (), {'__doc__': 'x\udcdcy'})
+
+ A = type('A', (), {})
+ self.assertEqual(A.__doc__, None)
+ for doc in 'x', '\xc4', '\U0001f40d', 'x\x00y', 'x\udcdcy', b'x', 42, None:
+ A.__doc__ = doc
+ self.assertEqual(A.__doc__, doc)
+
+ def test_bad_args(self):
+ with self.assertRaises(TypeError):
+ type()
+ with self.assertRaises(TypeError):
+ type('A', ())
+ with self.assertRaises(TypeError):
+ type('A', (), {}, ())
+ with self.assertRaises(TypeError):
+ type('A', (), dict={})
+ with self.assertRaises(TypeError):
+ type('A', [], {})
+ with self.assertRaises(TypeError):
+ type('A', (), types.MappingProxyType({}))
+ with self.assertRaises(TypeError):
+ type('A', (None,), {})
+ with self.assertRaises(TypeError):
+ type('A', (bool,), {})
+ with self.assertRaises(TypeError):
+ type('A', (int, str), {})
+
+ def test_bad_slots(self):
+ with self.assertRaises(TypeError):
+ type('A', (), {'__slots__': b'x'})
+ with self.assertRaises(TypeError):
+ type('A', (int,), {'__slots__': 'x'})
+ with self.assertRaises(TypeError):
+ type('A', (), {'__slots__': ''})
+ with self.assertRaises(TypeError):
+ type('A', (), {'__slots__': '42'})
+ with self.assertRaises(TypeError):
+ type('A', (), {'__slots__': 'x\x00y'})
+ with self.assertRaises(ValueError):
+ type('A', (), {'__slots__': 'x', 'x': 0})
+ with self.assertRaises(TypeError):
+ type('A', (), {'__slots__': ('__dict__', '__dict__')})
+ with self.assertRaises(TypeError):
+ type('A', (), {'__slots__': ('__weakref__', '__weakref__')})
+
+ class B:
+ pass
+ with self.assertRaises(TypeError):
+ type('A', (B,), {'__slots__': '__dict__'})
+ with self.assertRaises(TypeError):
+ type('A', (B,), {'__slots__': '__weakref__'})
+
+
def load_tests(loader, tests, pattern):
from doctest import DocTestSuite
tests.addTest(DocTestSuite(builtins))
diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py
index 0a73fcbb91..65c00d7a5f 100644
--- a/Lib/test/test_bytes.py
+++ b/Lib/test/test_bytes.py
@@ -1,8 +1,7 @@
"""Unit tests for the bytes and bytearray types.
-XXX This is a mess. Common tests should be moved to buffer_tests.py,
-which itself ought to be unified with string_tests.py (and the latter
-should be modernized).
+XXX This is a mess. Common tests should be unified with string_tests.py (and
+the latter should be modernized).
"""
import os
@@ -16,7 +15,7 @@ import unittest
import test.support
import test.string_tests
-import test.buffer_tests
+import test.list_tests
from test.support import bigaddrspacetest, MAX_Py_ssize_t
@@ -301,6 +300,14 @@ class BaseBytesTest:
self.assertRaises(ValueError, self.type2test.fromhex, '\x00')
self.assertRaises(ValueError, self.type2test.fromhex, '12 \x00 34')
+ def test_hex(self):
+ self.assertRaises(TypeError, self.type2test.hex)
+ self.assertRaises(TypeError, self.type2test.hex, 1)
+ self.assertEqual(self.type2test(b"").hex(), "")
+ self.assertEqual(bytearray([0x1a, 0x2b, 0x30]).hex(), '1a2b30')
+ self.assertEqual(self.type2test(b"\x1a\x2b\x30").hex(), '1a2b30')
+ self.assertEqual(memoryview(b"\x1a\x2b\x30").hex(), '1a2b30')
+
def test_join(self):
self.assertEqual(self.type2test(b"").join([]), b"")
self.assertEqual(self.type2test(b"").join([b""]), b"")
@@ -461,73 +468,50 @@ class BaseBytesTest:
self.assertEqual(b.rindex(i, 3, 9), 7)
self.assertRaises(ValueError, b.rindex, w, 1, 3)
+ def test_mod(self):
+ b = self.type2test(b'hello, %b!')
+ orig = b
+ b = b % b'world'
+ self.assertEqual(b, b'hello, world!')
+ self.assertEqual(orig, b'hello, %b!')
+ self.assertFalse(b is orig)
+ b = self.type2test(b'%s / 100 = %d%%')
+ a = b % (b'seventy-nine', 79)
+ self.assertEqual(a, b'seventy-nine / 100 = 79%')
+ self.assertIs(type(a), self.type2test)
+
+ def test_imod(self):
+ b = self.type2test(b'hello, %b!')
+ orig = b
+ b %= b'world'
+ self.assertEqual(b, b'hello, world!')
+ self.assertEqual(orig, b'hello, %b!')
+ self.assertFalse(b is orig)
+ b = self.type2test(b'%s / 100 = %d%%')
+ b %= (b'seventy-nine', 79)
+ self.assertEqual(b, b'seventy-nine / 100 = 79%')
+ self.assertIs(type(b), self.type2test)
+
+ def test_rmod(self):
+ with self.assertRaises(TypeError):
+ object() % self.type2test(b'abc')
+ self.assertIs(self.type2test(b'abc').__rmod__('%r'), NotImplemented)
+
def test_replace(self):
b = self.type2test(b'mississippi')
self.assertEqual(b.replace(b'i', b'a'), b'massassappa')
self.assertEqual(b.replace(b'ss', b'x'), b'mixixippi')
- def test_split(self):
- b = self.type2test(b'mississippi')
- self.assertEqual(b.split(b'i'), [b'm', b'ss', b'ss', b'pp', b''])
- self.assertEqual(b.split(b'ss'), [b'mi', b'i', b'ippi'])
- self.assertEqual(b.split(b'w'), [b])
- # with keyword args
- b = self.type2test(b'a|b|c|d')
- self.assertEqual(b.split(sep=b'|'), [b'a', b'b', b'c', b'd'])
- self.assertEqual(b.split(b'|', maxsplit=1), [b'a', b'b|c|d'])
- self.assertEqual(b.split(sep=b'|', maxsplit=1), [b'a', b'b|c|d'])
- self.assertEqual(b.split(maxsplit=1, sep=b'|'), [b'a', b'b|c|d'])
- b = self.type2test(b'a b c d')
- self.assertEqual(b.split(maxsplit=1), [b'a', b'b c d'])
-
- def test_split_whitespace(self):
- for b in (b' arf barf ', b'arf\tbarf', b'arf\nbarf', b'arf\rbarf',
- b'arf\fbarf', b'arf\vbarf'):
- b = self.type2test(b)
- self.assertEqual(b.split(), [b'arf', b'barf'])
- self.assertEqual(b.split(None), [b'arf', b'barf'])
- self.assertEqual(b.split(None, 2), [b'arf', b'barf'])
- for b in (b'a\x1Cb', b'a\x1Db', b'a\x1Eb', b'a\x1Fb'):
- b = self.type2test(b)
- self.assertEqual(b.split(), [b])
- self.assertEqual(self.type2test(b' a bb c ').split(None, 0), [b'a bb c '])
- self.assertEqual(self.type2test(b' a bb c ').split(None, 1), [b'a', b'bb c '])
- self.assertEqual(self.type2test(b' a bb c ').split(None, 2), [b'a', b'bb', b'c '])
- self.assertEqual(self.type2test(b' a bb c ').split(None, 3), [b'a', b'bb', b'c'])
-
def test_split_string_error(self):
self.assertRaises(TypeError, self.type2test(b'a b').split, ' ')
def test_split_unicodewhitespace(self):
+ for b in (b'a\x1Cb', b'a\x1Db', b'a\x1Eb', b'a\x1Fb'):
+ b = self.type2test(b)
+ self.assertEqual(b.split(), [b])
b = self.type2test(b"\x09\x0A\x0B\x0C\x0D\x1C\x1D\x1E\x1F")
self.assertEqual(b.split(), [b'\x1c\x1d\x1e\x1f'])
- def test_rsplit(self):
- b = self.type2test(b'mississippi')
- self.assertEqual(b.rsplit(b'i'), [b'm', b'ss', b'ss', b'pp', b''])
- self.assertEqual(b.rsplit(b'ss'), [b'mi', b'i', b'ippi'])
- self.assertEqual(b.rsplit(b'w'), [b])
- # with keyword args
- b = self.type2test(b'a|b|c|d')
- self.assertEqual(b.rsplit(sep=b'|'), [b'a', b'b', b'c', b'd'])
- self.assertEqual(b.rsplit(b'|', maxsplit=1), [b'a|b|c', b'd'])
- self.assertEqual(b.rsplit(sep=b'|', maxsplit=1), [b'a|b|c', b'd'])
- self.assertEqual(b.rsplit(maxsplit=1, sep=b'|'), [b'a|b|c', b'd'])
- b = self.type2test(b'a b c d')
- self.assertEqual(b.rsplit(maxsplit=1), [b'a b c', b'd'])
-
- def test_rsplit_whitespace(self):
- for b in (b' arf barf ', b'arf\tbarf', b'arf\nbarf', b'arf\rbarf',
- b'arf\fbarf', b'arf\vbarf'):
- b = self.type2test(b)
- self.assertEqual(b.rsplit(), [b'arf', b'barf'])
- self.assertEqual(b.rsplit(None), [b'arf', b'barf'])
- self.assertEqual(b.rsplit(None, 2), [b'arf', b'barf'])
- self.assertEqual(self.type2test(b' a bb c ').rsplit(None, 0), [b' a bb c'])
- self.assertEqual(self.type2test(b' a bb c ').rsplit(None, 1), [b' a bb', b'c'])
- self.assertEqual(self.type2test(b' a bb c ').rsplit(None, 2), [b' a', b'bb', b'c'])
- self.assertEqual(self.type2test(b' a bb c ').rsplit(None, 3), [b'a', b'bb', b'c'])
-
def test_rsplit_string_error(self):
self.assertRaises(TypeError, self.type2test(b'a b').rsplit, ' ')
@@ -565,45 +549,13 @@ class BaseBytesTest:
self.assertEqual(list(it), data)
it = pickle.loads(d)
- try:
- next(it)
- except StopIteration:
+ if not b:
continue
+ next(it)
d = pickle.dumps(it, proto)
it = pickle.loads(d)
self.assertEqual(list(it), data[1:])
- def test_strip(self):
- b = self.type2test(b'mississippi')
- self.assertEqual(b.strip(b'i'), b'mississipp')
- self.assertEqual(b.strip(b'm'), b'ississippi')
- self.assertEqual(b.strip(b'pi'), b'mississ')
- self.assertEqual(b.strip(b'im'), b'ssissipp')
- self.assertEqual(b.strip(b'pim'), b'ssiss')
- self.assertEqual(b.strip(b), b'')
-
- def test_lstrip(self):
- b = self.type2test(b'mississippi')
- self.assertEqual(b.lstrip(b'i'), b'mississippi')
- self.assertEqual(b.lstrip(b'm'), b'ississippi')
- self.assertEqual(b.lstrip(b'pi'), b'mississippi')
- self.assertEqual(b.lstrip(b'im'), b'ssissippi')
- self.assertEqual(b.lstrip(b'pim'), b'ssissippi')
-
- def test_rstrip(self):
- b = self.type2test(b'mississippi')
- self.assertEqual(b.rstrip(b'i'), b'mississipp')
- self.assertEqual(b.rstrip(b'm'), b'mississippi')
- self.assertEqual(b.rstrip(b'pi'), b'mississ')
- self.assertEqual(b.rstrip(b'im'), b'mississipp')
- self.assertEqual(b.rstrip(b'pim'), b'mississ')
-
- def test_strip_whitespace(self):
- b = self.type2test(b' \t\n\r\f\vabc \t\n\r\f\v')
- self.assertEqual(b.strip(), b'abc')
- self.assertEqual(b.lstrip(), b'abc \t\n\r\f\v')
- self.assertEqual(b.rstrip(), b' \t\n\r\f\vabc')
-
def test_strip_bytearray(self):
self.assertEqual(self.type2test(b'abc').strip(memoryview(b'ac')), b'b')
self.assertEqual(self.type2test(b'abc').lstrip(memoryview(b'ac')), b'bc')
@@ -718,10 +670,19 @@ class BaseBytesTest:
self.assertRaisesRegex(TypeError, r'\bendswith\b', b.endswith,
x, None, None, None)
+ def test_free_after_iterating(self):
+ test.support.check_free_after_iterating(self, iter, self.type2test)
+ test.support.check_free_after_iterating(self, reversed, self.type2test)
+
class BytesTest(BaseBytesTest, unittest.TestCase):
type2test = bytes
+ def test_getitem_error(self):
+ msg = "byte indices must be integers or slices"
+ with self.assertRaisesRegex(TypeError, msg):
+ b'python'['a']
+
def test_buffer_is_readonly(self):
fd = os.open(__file__, os.O_RDONLY)
with open(fd, "rb", buffering=0) as f:
@@ -744,6 +705,12 @@ class BytesTest(BaseBytesTest, unittest.TestCase):
def __index__(self):
return 42
self.assertEqual(bytes(A()), b'a')
+ # Issue #25766
+ class A(str):
+ def __bytes__(self):
+ return b'abc'
+ self.assertEqual(bytes(A('\u20ac')), b'abc')
+ self.assertEqual(bytes(A('\u20ac'), 'iso8859-15'), b'\xa4')
# Issue #24731
class A:
def __bytes__(self):
@@ -784,6 +751,17 @@ class BytesTest(BaseBytesTest, unittest.TestCase):
class ByteArrayTest(BaseBytesTest, unittest.TestCase):
type2test = bytearray
+ def test_getitem_error(self):
+ msg = "bytearray indices must be integers or slices"
+ with self.assertRaisesRegex(TypeError, msg):
+ bytearray(b'python')['a']
+
+ def test_setitem_error(self):
+ msg = "bytearray indices must be integers or slices"
+ with self.assertRaisesRegex(TypeError, msg):
+ b = bytearray(b'python')
+ b['a'] = "python"
+
def test_nohash(self):
self.assertRaises(TypeError, hash, bytearray())
@@ -1104,6 +1082,13 @@ class ByteArrayTest(BaseBytesTest, unittest.TestCase):
b.remove(Indexable(ord('e')))
self.assertEqual(b, b'')
+ # test values outside of the ascii range: (0, 127)
+ c = bytearray([126, 127, 128, 129])
+ c.remove(127)
+ self.assertEqual(c, bytes([126, 128, 129]))
+ c.remove(129)
+ self.assertEqual(c, bytes([126, 128]))
+
def test_pop(self):
b = bytearray(b'world')
self.assertEqual(b.pop(), ord('d'))
@@ -1205,6 +1190,48 @@ class ByteArrayTest(BaseBytesTest, unittest.TestCase):
self.assertRaises(BufferError, delslice)
self.assertEqual(b, orig)
+ @test.support.cpython_only
+ def test_obsolete_write_lock(self):
+ from _testcapi import getbuffer_with_null_view
+ self.assertRaises(BufferError, getbuffer_with_null_view, bytearray())
+
+ def test_iterator_pickling2(self):
+ orig = bytearray(b'abc')
+ data = list(b'qwerty')
+ for proto in range(pickle.HIGHEST_PROTOCOL + 1):
+ # initial iterator
+ itorig = iter(orig)
+ d = pickle.dumps((itorig, orig), proto)
+ it, b = pickle.loads(d)
+ b[:] = data
+ self.assertEqual(type(it), type(itorig))
+ self.assertEqual(list(it), data)
+
+ # running iterator
+ next(itorig)
+ d = pickle.dumps((itorig, orig), proto)
+ it, b = pickle.loads(d)
+ b[:] = data
+ self.assertEqual(type(it), type(itorig))
+ self.assertEqual(list(it), data[1:])
+
+ # empty iterator
+ for i in range(1, len(orig)):
+ next(itorig)
+ d = pickle.dumps((itorig, orig), proto)
+ it, b = pickle.loads(d)
+ b[:] = data
+ self.assertEqual(type(it), type(itorig))
+ self.assertEqual(list(it), data[len(orig):])
+
+ # exhausted iterator
+ self.assertRaises(StopIteration, next, itorig)
+ d = pickle.dumps((itorig, orig), proto)
+ it, b = pickle.loads(d)
+ b[:] = data
+ self.assertEqual(list(it), [])
+
+ test_exhausted_iterator = test.list_tests.CommonTest.test_exhausted_iterator
class AssortedBytesTest(unittest.TestCase):
#
@@ -1315,20 +1342,35 @@ class AssortedBytesTest(unittest.TestCase):
b = bytearray()
self.assertFalse(b.replace(b'', b'') is b)
+ @unittest.skipUnless(sys.flags.bytes_warning,
+ "BytesWarning is needed for this test: use -bb option")
def test_compare(self):
- if sys.flags.bytes_warning:
- def bytes_warning():
- return test.support.check_warnings(('', BytesWarning))
- with bytes_warning():
- b'' == ''
- with bytes_warning():
- b'' != ''
- with bytes_warning():
- bytearray(b'') == ''
- with bytes_warning():
- bytearray(b'') != ''
- else:
- self.skipTest("BytesWarning is needed for this test: use -bb option")
+ def bytes_warning():
+ return test.support.check_warnings(('', BytesWarning))
+ with bytes_warning():
+ b'' == ''
+ with bytes_warning():
+ '' == b''
+ with bytes_warning():
+ b'' != ''
+ with bytes_warning():
+ '' != b''
+ with bytes_warning():
+ bytearray(b'') == ''
+ with bytes_warning():
+ '' == bytearray(b'')
+ with bytes_warning():
+ bytearray(b'') != ''
+ with bytes_warning():
+ '' != bytearray(b'')
+ with bytes_warning():
+ b'\0' == 0
+ with bytes_warning():
+ 0 == b'\0'
+ with bytes_warning():
+ b'\0' != 0
+ with bytes_warning():
+ 0 != b'\0'
# Optimizations:
# __iter__? (optimization)
@@ -1337,7 +1379,7 @@ class AssortedBytesTest(unittest.TestCase):
# XXX More string methods? (Those that don't use character properties)
# There are tests in string_tests.py that are more
- # comprehensive for things like split, partition, etc.
+ # comprehensive for things like partition, etc.
# Unfortunately they are all bundled with tests that
# are not appropriate for bytes
@@ -1345,8 +1387,7 @@ class AssortedBytesTest(unittest.TestCase):
# the rest that make sense (the code can be cleaned up to use modern
# unittest methods at the same time).
-class BytearrayPEP3137Test(unittest.TestCase,
- test.buffer_tests.MixinBytesBufferCommonTests):
+class BytearrayPEP3137Test(unittest.TestCase):
def marshal(self, x):
return bytearray(x)
@@ -1374,41 +1415,28 @@ class BytearrayPEP3137Test(unittest.TestCase,
class FixedStringTest(test.string_tests.BaseTest):
-
def fixtype(self, obj):
if isinstance(obj, str):
- return obj.encode("utf-8")
+ return self.type2test(obj.encode("utf-8"))
return super().fixtype(obj)
- # Currently the bytes containment testing uses a single integer
- # value. This may not be the final design, but until then the
- # bytes section with in a bytes containment not valid
- def test_contains(self):
- pass
- def test_expandtabs(self):
- pass
- def test_upper(self):
- pass
- def test_lower(self):
- pass
+ contains_bytes = True
class ByteArrayAsStringTest(FixedStringTest, unittest.TestCase):
type2test = bytearray
- contains_bytes = True
class BytesAsStringTest(FixedStringTest, unittest.TestCase):
type2test = bytes
- contains_bytes = True
class SubclassTest:
def test_basic(self):
- self.assertTrue(issubclass(self.subclass2test, self.type2test))
- self.assertIsInstance(self.subclass2test(), self.type2test)
+ self.assertTrue(issubclass(self.type2test, self.basetype))
+ self.assertIsInstance(self.type2test(), self.basetype)
a, b = b"abcd", b"efgh"
- _a, _b = self.subclass2test(a), self.subclass2test(b)
+ _a, _b = self.type2test(a), self.type2test(b)
# test comparison operators with subclass instances
self.assertTrue(_a == _a)
@@ -1431,19 +1459,19 @@ class SubclassTest:
# Make sure join returns a NEW object for single item sequences
# involving a subclass.
# Make sure that it is of the appropriate type.
- s1 = self.subclass2test(b"abcd")
- s2 = self.type2test().join([s1])
+ s1 = self.type2test(b"abcd")
+ s2 = self.basetype().join([s1])
self.assertTrue(s1 is not s2)
- self.assertTrue(type(s2) is self.type2test, type(s2))
+ self.assertTrue(type(s2) is self.basetype, type(s2))
# Test reverse, calling join on subclass
s3 = s1.join([b"abcd"])
- self.assertTrue(type(s3) is self.type2test)
+ self.assertTrue(type(s3) is self.basetype)
def test_pickle(self):
- a = self.subclass2test(b"abcd")
+ a = self.type2test(b"abcd")
a.x = 10
- a.y = self.subclass2test(b"efgh")
+ a.y = self.type2test(b"efgh")
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
b = pickle.loads(pickle.dumps(a, proto))
self.assertNotEqual(id(a), id(b))
@@ -1454,9 +1482,9 @@ class SubclassTest:
self.assertEqual(type(a.y), type(b.y))
def test_copy(self):
- a = self.subclass2test(b"abcd")
+ a = self.type2test(b"abcd")
a.x = 10
- a.y = self.subclass2test(b"efgh")
+ a.y = self.type2test(b"efgh")
for copy_method in (copy.copy, copy.deepcopy):
b = copy_method(a)
self.assertNotEqual(id(a), id(b))
@@ -1466,6 +1494,8 @@ class SubclassTest:
self.assertEqual(type(a), type(b))
self.assertEqual(type(a.y), type(b.y))
+ test_fromhex = BaseBytesTest.test_fromhex
+
class ByteArraySubclass(bytearray):
pass
@@ -1477,8 +1507,8 @@ class OtherBytesSubclass(bytes):
pass
class ByteArraySubclassTest(SubclassTest, unittest.TestCase):
- type2test = bytearray
- subclass2test = ByteArraySubclass
+ basetype = bytearray
+ type2test = ByteArraySubclass
def test_init_override(self):
class subclass(bytearray):
@@ -1492,8 +1522,8 @@ class ByteArraySubclassTest(SubclassTest, unittest.TestCase):
class BytesSubclassTest(SubclassTest, unittest.TestCase):
- type2test = bytes
- subclass2test = BytesSubclass
+ basetype = bytes
+ type2test = BytesSubclass
if __name__ == "__main__":
diff --git a/Lib/test/test_bz2.py b/Lib/test/test_bz2.py
index beef275930..a1e4b8d8e2 100644
--- a/Lib/test/test_bz2.py
+++ b/Lib/test/test_bz2.py
@@ -2,13 +2,15 @@ from test import support
from test.support import bigmemtest, _4G
import unittest
-from io import BytesIO
+from io import BytesIO, DEFAULT_BUFFER_SIZE
import os
import pickle
+import glob
import random
import subprocess
import sys
from test.support import unlink
+import _compression
try:
import threading
@@ -51,6 +53,19 @@ class BaseTest(unittest.TestCase):
EMPTY_DATA = b'BZh9\x17rE8P\x90\x00\x00\x00\x00'
BAD_DATA = b'this is not a valid bzip2 file'
+ # Some tests need more than one block of uncompressed data. Since one block
+ # is at least 100 kB, we gather some data dynamically and compress it.
+ # Note that this assumes that compression works correctly, so we cannot
+ # simply use the bigger test data for all tests.
+ test_size = 0
+ BIG_TEXT = bytearray(128*1024)
+ for fname in glob.glob(os.path.join(os.path.dirname(__file__), '*.py')):
+ with open(fname, 'rb') as fh:
+ test_size += fh.readinto(memoryview(BIG_TEXT)[test_size:])
+ if test_size > 128*1024:
+ break
+ BIG_DATA = bz2.compress(BIG_TEXT, compresslevel=1)
+
def setUp(self):
self.filename = support.TESTFN
@@ -96,7 +111,7 @@ class BZ2FileTest(BaseTest):
def testRead(self):
self.createTempFile()
with BZ2File(self.filename) as bz2f:
- self.assertRaises(TypeError, bz2f.read, None)
+ self.assertRaises(TypeError, bz2f.read, float())
self.assertEqual(bz2f.read(), self.TEXT)
def testReadBadFile(self):
@@ -107,21 +122,21 @@ class BZ2FileTest(BaseTest):
def testReadMultiStream(self):
self.createTempFile(streams=5)
with BZ2File(self.filename) as bz2f:
- self.assertRaises(TypeError, bz2f.read, None)
+ self.assertRaises(TypeError, bz2f.read, float())
self.assertEqual(bz2f.read(), self.TEXT * 5)
def testReadMonkeyMultiStream(self):
# Test BZ2File.read() on a multi-stream archive where a stream
# boundary coincides with the end of the raw read buffer.
- buffer_size = bz2._BUFFER_SIZE
- bz2._BUFFER_SIZE = len(self.DATA)
+ buffer_size = _compression.BUFFER_SIZE
+ _compression.BUFFER_SIZE = len(self.DATA)
try:
self.createTempFile(streams=5)
with BZ2File(self.filename) as bz2f:
- self.assertRaises(TypeError, bz2f.read, None)
+ self.assertRaises(TypeError, bz2f.read, float())
self.assertEqual(bz2f.read(), self.TEXT * 5)
finally:
- bz2._BUFFER_SIZE = buffer_size
+ _compression.BUFFER_SIZE = buffer_size
def testReadTrailingJunk(self):
self.createTempFile(suffix=self.BAD_DATA)
@@ -136,7 +151,7 @@ class BZ2FileTest(BaseTest):
def testRead0(self):
self.createTempFile()
with BZ2File(self.filename) as bz2f:
- self.assertRaises(TypeError, bz2f.read, None)
+ self.assertRaises(TypeError, bz2f.read, float())
self.assertEqual(bz2f.read(0), b"")
def testReadChunk10(self):
@@ -545,13 +560,24 @@ class BZ2FileTest(BaseTest):
with BZ2File(str_filename, "rb") as f:
self.assertEqual(f.read(), self.DATA)
+ def testDecompressLimited(self):
+ """Decompressed data buffering should be limited"""
+ bomb = bz2.compress(bytes(int(2e6)), compresslevel=9)
+ self.assertLess(len(bomb), _compression.BUFFER_SIZE)
+
+ decomp = BZ2File(BytesIO(bomb))
+ self.assertEqual(bytes(1), decomp.read(1))
+ max_decomp = 1 + DEFAULT_BUFFER_SIZE
+ self.assertLessEqual(decomp._buffer.raw.tell(), max_decomp,
+ "Excessive amount of data was decompressed")
+
# Tests for a BZ2File wrapping another file object:
def testReadBytesIO(self):
with BytesIO(self.DATA) as bio:
with BZ2File(bio) as bz2f:
- self.assertRaises(TypeError, bz2f.read, None)
+ self.assertRaises(TypeError, bz2f.read, float())
self.assertEqual(bz2f.read(), self.TEXT)
self.assertFalse(bio.closed)
@@ -705,6 +731,95 @@ class BZ2DecompressorTest(BaseTest):
with self.assertRaises(TypeError):
pickle.dumps(BZ2Decompressor(), proto)
+ def testDecompressorChunksMaxsize(self):
+ bzd = BZ2Decompressor()
+ max_length = 100
+ out = []
+
+ # Feed some input
+ len_ = len(self.BIG_DATA) - 64
+ out.append(bzd.decompress(self.BIG_DATA[:len_],
+ max_length=max_length))
+ self.assertFalse(bzd.needs_input)
+ self.assertEqual(len(out[-1]), max_length)
+
+ # Retrieve more data without providing more input
+ out.append(bzd.decompress(b'', max_length=max_length))
+ self.assertFalse(bzd.needs_input)
+ self.assertEqual(len(out[-1]), max_length)
+
+ # Retrieve more data while providing more input
+ out.append(bzd.decompress(self.BIG_DATA[len_:],
+ max_length=max_length))
+ self.assertLessEqual(len(out[-1]), max_length)
+
+ # Retrieve remaining uncompressed data
+ while not bzd.eof:
+ out.append(bzd.decompress(b'', max_length=max_length))
+ self.assertLessEqual(len(out[-1]), max_length)
+
+ out = b"".join(out)
+ self.assertEqual(out, self.BIG_TEXT)
+ self.assertEqual(bzd.unused_data, b"")
+
+ def test_decompressor_inputbuf_1(self):
+ # Test reusing input buffer after moving existing
+ # contents to beginning
+ bzd = BZ2Decompressor()
+ out = []
+
+ # Create input buffer and fill it
+ self.assertEqual(bzd.decompress(self.DATA[:100],
+ max_length=0), b'')
+
+ # Retrieve some results, freeing capacity at beginning
+ # of input buffer
+ out.append(bzd.decompress(b'', 2))
+
+ # Add more data that fits into input buffer after
+ # moving existing data to beginning
+ out.append(bzd.decompress(self.DATA[100:105], 15))
+
+ # Decompress rest of data
+ out.append(bzd.decompress(self.DATA[105:]))
+ self.assertEqual(b''.join(out), self.TEXT)
+
+ def test_decompressor_inputbuf_2(self):
+ # Test reusing input buffer by appending data at the
+ # end right away
+ bzd = BZ2Decompressor()
+ out = []
+
+ # Create input buffer and empty it
+ self.assertEqual(bzd.decompress(self.DATA[:200],
+ max_length=0), b'')
+ out.append(bzd.decompress(b''))
+
+ # Fill buffer with new data
+ out.append(bzd.decompress(self.DATA[200:280], 2))
+
+ # Append some more data, not enough to require resize
+ out.append(bzd.decompress(self.DATA[280:300], 2))
+
+ # Decompress rest of data
+ out.append(bzd.decompress(self.DATA[300:]))
+ self.assertEqual(b''.join(out), self.TEXT)
+
+ def test_decompressor_inputbuf_3(self):
+ # Test reusing input buffer after extending it
+
+ bzd = BZ2Decompressor()
+ out = []
+
+ # Create almost full input buffer
+ out.append(bzd.decompress(self.DATA[:200], 5))
+
+ # Add even more data to it, requiring resize
+ out.append(bzd.decompress(self.DATA[200:300], 5))
+
+ # Decompress rest of data
+ out.append(bzd.decompress(self.DATA[300:]))
+ self.assertEqual(b''.join(out), self.TEXT)
class CompressDecompressTest(BaseTest):
def testCompress(self):
diff --git a/Lib/test/test_calendar.py b/Lib/test/test_calendar.py
index 9193857197..80ed632588 100644
--- a/Lib/test/test_calendar.py
+++ b/Lib/test/test_calendar.py
@@ -2,7 +2,7 @@ import calendar
import unittest
from test import support
-from test.script_helper import assert_python_ok, assert_python_failure
+from test.support.script_helper import assert_python_ok, assert_python_failure
import time
import locale
import sys
diff --git a/Lib/test/test_call.py b/Lib/test/test_call.py
index c00ccbac85..e2b8e0fd12 100644
--- a/Lib/test/test_call.py
+++ b/Lib/test/test_call.py
@@ -1,5 +1,4 @@
import unittest
-from test import support
# The test cases here cover several paths through the function calling
# code. They depend on the METH_XXX flag that is used to define a C
@@ -123,9 +122,5 @@ class CFunctionCalls(unittest.TestCase):
self.assertRaises(TypeError, [].count, x=2, y=2)
-def test_main():
- support.run_unittest(CFunctionCalls)
-
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py
index a0c1e79b35..1eadd2249e 100644
--- a/Lib/test/test_capi.py
+++ b/Lib/test/test_capi.py
@@ -6,10 +6,12 @@ import pickle
import random
import subprocess
import sys
+import textwrap
import time
import unittest
from test import support
from test.support import MISSING_C_DOCSTRINGS
+from test.support.script_helper import assert_python_failure
try:
import _posixsubprocess
except ImportError:
@@ -21,6 +23,9 @@ except ImportError:
# Skip this test if the _testcapi module isn't available.
_testcapi = support.import_module('_testcapi')
+# Were we compiled --with-pydebug or with #define Py_DEBUG?
+Py_DEBUG = hasattr(sys, 'gettotalrefcount')
+
def testfunction(self):
"""some doc"""
@@ -118,7 +123,7 @@ class CAPITest(unittest.TestCase):
self.assertEqual(_testcapi.no_docstring.__doc__, None)
self.assertEqual(_testcapi.no_docstring.__text_signature__, None)
- self.assertEqual(_testcapi.docstring_empty.__doc__, "")
+ self.assertEqual(_testcapi.docstring_empty.__doc__, None)
self.assertEqual(_testcapi.docstring_empty.__text_signature__, None)
self.assertEqual(_testcapi.docstring_no_signature.__doc__,
@@ -145,11 +150,95 @@ class CAPITest(unittest.TestCase):
"This docstring has a valid signature.")
self.assertEqual(_testcapi.docstring_with_signature.__text_signature__, "($module, /, sig)")
+ self.assertEqual(_testcapi.docstring_with_signature_but_no_doc.__doc__, None)
+ self.assertEqual(_testcapi.docstring_with_signature_but_no_doc.__text_signature__,
+ "($module, /, sig)")
+
self.assertEqual(_testcapi.docstring_with_signature_and_extra_newlines.__doc__,
"\nThis docstring has a valid signature and some extra newlines.")
self.assertEqual(_testcapi.docstring_with_signature_and_extra_newlines.__text_signature__,
"($module, /, parameter)")
+ def test_c_type_with_matrix_multiplication(self):
+ M = _testcapi.matmulType
+ m1 = M()
+ m2 = M()
+ self.assertEqual(m1 @ m2, ("matmul", m1, m2))
+ self.assertEqual(m1 @ 42, ("matmul", m1, 42))
+ self.assertEqual(42 @ m1, ("matmul", 42, m1))
+ o = m1
+ o @= m2
+ self.assertEqual(o, ("imatmul", m1, m2))
+ o = m1
+ o @= 42
+ self.assertEqual(o, ("imatmul", m1, 42))
+ o = 42
+ o @= m1
+ self.assertEqual(o, ("matmul", 42, m1))
+
+ def test_return_null_without_error(self):
+ # Issue #23571: A function must not return NULL without setting an
+ # error
+ if Py_DEBUG:
+ code = textwrap.dedent("""
+ import _testcapi
+ from test import support
+
+ with support.SuppressCrashReport():
+ _testcapi.return_null_without_error()
+ """)
+ rc, out, err = assert_python_failure('-c', code)
+ self.assertRegex(err.replace(b'\r', b''),
+ br'Fatal Python error: a function returned NULL '
+ br'without setting an error\n'
+ br'SystemError: <built-in function '
+ br'return_null_without_error> returned NULL '
+ br'without setting an error\n'
+ br'\n'
+ br'Current thread.*:\n'
+ br' File .*", line 6 in <module>')
+ else:
+ with self.assertRaises(SystemError) as cm:
+ _testcapi.return_null_without_error()
+ self.assertRegex(str(cm.exception),
+ 'return_null_without_error.* '
+ 'returned NULL without setting an error')
+
+ def test_return_result_with_error(self):
+ # Issue #23571: A function must not return a result with an error set
+ if Py_DEBUG:
+ code = textwrap.dedent("""
+ import _testcapi
+ from test import support
+
+ with support.SuppressCrashReport():
+ _testcapi.return_result_with_error()
+ """)
+ rc, out, err = assert_python_failure('-c', code)
+ self.assertRegex(err.replace(b'\r', b''),
+ br'Fatal Python error: a function returned a '
+ br'result with an error set\n'
+ br'ValueError\n'
+ br'\n'
+ br'During handling of the above exception, '
+ br'another exception occurred:\n'
+ br'\n'
+ br'SystemError: <built-in '
+ br'function return_result_with_error> '
+ br'returned a result with an error set\n'
+ br'\n'
+ br'Current thread.*:\n'
+ br' File .*, line 6 in <module>')
+ else:
+ with self.assertRaises(SystemError) as cm:
+ _testcapi.return_result_with_error()
+ self.assertRegex(str(cm.exception),
+ 'return_result_with_error.* '
+ 'returned a result with an error set')
+
+ def test_buildvalue_N(self):
+ _testcapi.test_buildvalue_N()
+
@unittest.skipUnless(threading, 'Threading required for this test.')
class TestPendingCalls(unittest.TestCase):
@@ -265,7 +354,7 @@ class EmbeddingTests(unittest.TestCase):
exename += ext
exepath = os.path.dirname(sys.executable)
else:
- exepath = os.path.join(basepath, "Modules")
+ exepath = os.path.join(basepath, "Programs")
self.test_exe = exe = os.path.join(exepath, exename)
if not os.path.exists(exe):
self.skipTest("%r doesn't exist" % exe)
@@ -284,12 +373,13 @@ class EmbeddingTests(unittest.TestCase):
cmd.extend(args)
p = subprocess.Popen(cmd,
stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
+ stderr=subprocess.PIPE,
+ universal_newlines=True)
(out, err) = p.communicate()
self.assertEqual(p.returncode, 0,
"bad returncode %d, stderr is %r" %
(p.returncode, err))
- return out.decode("latin1"), err.decode("latin1")
+ return out, err
def test_subinterps(self):
# This is just a "don't crash" test
@@ -316,34 +406,38 @@ class EmbeddingTests(unittest.TestCase):
print()
print(out)
print(err)
+ expected_errors = sys.__stdout__.errors
expected_stdin_encoding = sys.__stdin__.encoding
expected_pipe_encoding = self._get_default_pipe_encoding()
- expected_output = os.linesep.join([
+ expected_output = '\n'.join([
"--- Use defaults ---",
"Expected encoding: default",
"Expected errors: default",
- "stdin: {0}:strict",
- "stdout: {1}:strict",
- "stderr: {1}:backslashreplace",
+ "stdin: {in_encoding}:{errors}",
+ "stdout: {out_encoding}:{errors}",
+ "stderr: {out_encoding}:backslashreplace",
"--- Set errors only ---",
"Expected encoding: default",
- "Expected errors: surrogateescape",
- "stdin: {0}:surrogateescape",
- "stdout: {1}:surrogateescape",
- "stderr: {1}:backslashreplace",
+ "Expected errors: ignore",
+ "stdin: {in_encoding}:ignore",
+ "stdout: {out_encoding}:ignore",
+ "stderr: {out_encoding}:backslashreplace",
"--- Set encoding only ---",
"Expected encoding: latin-1",
"Expected errors: default",
- "stdin: latin-1:strict",
- "stdout: latin-1:strict",
+ "stdin: latin-1:{errors}",
+ "stdout: latin-1:{errors}",
"stderr: latin-1:backslashreplace",
"--- Set encoding and errors ---",
"Expected encoding: latin-1",
- "Expected errors: surrogateescape",
- "stdin: latin-1:surrogateescape",
- "stdout: latin-1:surrogateescape",
- "stderr: latin-1:backslashreplace"]).format(expected_stdin_encoding,
- expected_pipe_encoding)
+ "Expected errors: replace",
+ "stdin: latin-1:replace",
+ "stdout: latin-1:replace",
+ "stderr: latin-1:backslashreplace"])
+ expected_output = expected_output.format(
+ in_encoding=expected_stdin_encoding,
+ out_encoding=expected_pipe_encoding,
+ errors=expected_errors)
# This is useful if we ever trip over odd platform behaviour
self.maxDiff = None
self.assertEqual(out.strip(), expected_output)
@@ -367,7 +461,7 @@ class SkipitemTest(unittest.TestCase):
test and not for the other, there's a mismatch, and the test fails.
** Some format units have special funny semantics and it would
- be difficult to accomodate them here. Since these are all
+ be difficult to accommodate them here. Since these are all
well-established and properly skipped in skipitem() we can
get away with not testing them--this test is really intended
to catch *new* format units.
@@ -398,7 +492,7 @@ class SkipitemTest(unittest.TestCase):
format.encode("ascii"), keywords)
when_not_skipped = False
except TypeError as e:
- s = "argument 1 must be impossible<bad format char>, not int"
+ s = "argument 1 (impossible<bad format char>)"
when_not_skipped = (str(e) == s)
except RuntimeError as e:
when_not_skipped = False
diff --git a/Lib/test/test_cgi.py b/Lib/test/test_cgi.py
index 6b28106bd3..ab9f6ab6a5 100644
--- a/Lib/test/test_cgi.py
+++ b/Lib/test/test_cgi.py
@@ -1,4 +1,4 @@
-from test.support import run_unittest, check_warnings
+from test.support import check_warnings
import cgi
import os
import sys
@@ -344,6 +344,16 @@ Larry
self.assertEqual(fs.list[0].name, 'submit-name')
self.assertEqual(fs.list[0].value, 'Larry')
+ def test_fieldstorage_as_context_manager(self):
+ fp = BytesIO(b'x' * 10)
+ env = {'REQUEST_METHOD': 'PUT'}
+ with cgi.FieldStorage(fp=fp, environ=env) as fs:
+ content = fs.file.read()
+ self.assertFalse(fs.file.closed)
+ self.assertTrue(fs.file.closed)
+ self.assertEqual(content, 'x' * 10)
+ with self.assertRaisesRegex(ValueError, 'I/O operation on closed file'):
+ fs.file.read()
_qs_result = {
'key1': 'value1',
@@ -519,9 +529,5 @@ Content-Transfer-Encoding: binary
--AaB03x--
"""
-
-def test_main():
- run_unittest(CgiTests)
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_cgitb.py b/Lib/test/test_cgitb.py
index 2e072a9f2a..a87a4224f9 100644
--- a/Lib/test/test_cgitb.py
+++ b/Lib/test/test_cgitb.py
@@ -1,5 +1,5 @@
-from test.support import run_unittest
-from test.script_helper import assert_python_failure, temp_dir
+from test.support import temp_dir
+from test.support.script_helper import assert_python_failure
import unittest
import sys
import cgitb
@@ -63,8 +63,5 @@ class TestCgitb(unittest.TestCase):
self.assertNotIn('</p>', out)
-def test_main():
- run_unittest(TestCgitb)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_charmapcodec.py b/Lib/test/test_charmapcodec.py
index 6226587267..4064aef935 100644
--- a/Lib/test/test_charmapcodec.py
+++ b/Lib/test/test_charmapcodec.py
@@ -49,8 +49,5 @@ class CharmapCodecTest(unittest.TestCase):
def test_maptoundefined(self):
self.assertRaises(UnicodeError, str, b'abc\001', codecname)
-def test_main():
- test.support.run_unittest(CharmapCodecTest)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_class.py b/Lib/test/test_class.py
index e3883d67b7..4d554a397b 100644
--- a/Lib/test/test_class.py
+++ b/Lib/test/test_class.py
@@ -2,7 +2,6 @@
import unittest
-from test import support
testmeths = [
@@ -13,6 +12,8 @@ testmeths = [
"rsub",
"mul",
"rmul",
+ "matmul",
+ "rmatmul",
"truediv",
"rtruediv",
"floordiv",
@@ -177,6 +178,14 @@ class ClassTests(unittest.TestCase):
self.assertCallStack([("__rmul__", (testme, 1))])
callLst[:] = []
+ testme @ 1
+ self.assertCallStack([("__matmul__", (testme, 1))])
+
+ callLst[:] = []
+ 1 @ testme
+ self.assertCallStack([("__rmatmul__", (testme, 1))])
+
+ callLst[:] = []
testme / 1
self.assertCallStack([("__truediv__", (testme, 1))])
@@ -491,10 +500,10 @@ class ClassTests(unittest.TestCase):
try:
a() # This should not segfault
- except RuntimeError:
+ except RecursionError:
pass
else:
- self.fail("Failed to raise RuntimeError")
+ self.fail("Failed to raise RecursionError")
def testForExceptionsRaisedInInstanceGetattr2(self):
# Tests for exceptions raised in instance_getattr2().
@@ -559,8 +568,5 @@ class ClassTests(unittest.TestCase):
a = A(hash(A.f)^(-1))
hash(a.f)
-def test_main():
- support.run_unittest(ClassTests)
-
-if __name__=='__main__':
- test_main()
+if __name__ == '__main__':
+ unittest.main()
diff --git a/Lib/test/test_cmath.py b/Lib/test/test_cmath.py
index 68bf16e51a..1f884e52a2 100644
--- a/Lib/test/test_cmath.py
+++ b/Lib/test/test_cmath.py
@@ -1,5 +1,6 @@
-from test.support import run_unittest, requires_IEEE_754, cpython_only
+from test.support import requires_IEEE_754, cpython_only
from test.test_math import parse_testfile, test_file
+import test.test_math as test_math
import unittest
import cmath, math
from cmath import phase, polar, rect, pi
@@ -560,8 +561,46 @@ class CMathTests(unittest.TestCase):
self.assertComplexIdentical(cmath.atanh(z), z)
-def test_main():
- run_unittest(CMathTests)
+class IsCloseTests(test_math.IsCloseTests):
+ isclose = cmath.isclose
+
+ def test_reject_complex_tolerances(self):
+ with self.assertRaises(TypeError):
+ self.isclose(1j, 1j, rel_tol=1j)
+
+ with self.assertRaises(TypeError):
+ self.isclose(1j, 1j, abs_tol=1j)
+
+ with self.assertRaises(TypeError):
+ self.isclose(1j, 1j, rel_tol=1j, abs_tol=1j)
+
+ def test_complex_values(self):
+ # test complex values that are close to within 12 decimal places
+ complex_examples = [(1.0+1.0j, 1.000000000001+1.0j),
+ (1.0+1.0j, 1.0+1.000000000001j),
+ (-1.0+1.0j, -1.000000000001+1.0j),
+ (1.0-1.0j, 1.0-0.999999999999j),
+ ]
+
+ self.assertAllClose(complex_examples, rel_tol=1e-12)
+ self.assertAllNotClose(complex_examples, rel_tol=1e-13)
+
+ def test_complex_near_zero(self):
+ # test values near zero that are near to within three decimal places
+ near_zero_examples = [(0.001j, 0),
+ (0.001, 0),
+ (0.001+0.001j, 0),
+ (-0.001+0.001j, 0),
+ (0.001-0.001j, 0),
+ (-0.001-0.001j, 0),
+ ]
+
+ self.assertAllClose(near_zero_examples, abs_tol=1.5e-03)
+ self.assertAllNotClose(near_zero_examples, abs_tol=0.5e-03)
+
+ self.assertIsClose(0.001-0.001j, 0.001+0.001j, abs_tol=2e-03)
+ self.assertIsNotClose(0.001-0.001j, 0.001+0.001j, abs_tol=1e-03)
+
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_cmd_line.py b/Lib/test/test_cmd_line.py
index 5cad3eca62..dce418b65c 100644
--- a/Lib/test/test_cmd_line.py
+++ b/Lib/test/test_cmd_line.py
@@ -8,8 +8,8 @@ import shutil
import sys
import subprocess
import tempfile
-from test import script_helper
-from test.script_helper import (spawn_python, kill_python, assert_python_ok,
+from test.support import script_helper
+from test.support.script_helper import (spawn_python, kill_python, assert_python_ok,
assert_python_failure)
@@ -59,7 +59,7 @@ class CmdLineTest(unittest.TestCase):
def test_xoptions(self):
def get_xoptions(*args):
- # use subprocess module directly because test.script_helper adds
+ # use subprocess module directly because test.support.script_helper adds
# "-X faulthandler" to the command line
args = (sys.executable, '-E') + args
args += ('-c', 'import sys; print(sys._xoptions)')
@@ -344,7 +344,8 @@ class CmdLineTest(unittest.TestCase):
# Issue #5319: if stdout.flush() fails at shutdown, an error should
# be printed out.
code = """if 1:
- import os, sys
+ import os, sys, test.support
+ test.support.SuppressCrashReport().__enter__()
sys.stdout.write('x')
os.close(sys.stdout.fileno())"""
rc, out, err = assert_python_ok('-c', code)
@@ -456,7 +457,7 @@ class CmdLineTest(unittest.TestCase):
self.assertEqual(err.splitlines().count(b'Unknown option: -a'), 1)
self.assertEqual(b'', out)
- @unittest.skipIf(script_helper._interpreter_requires_environment(),
+ @unittest.skipIf(script_helper.interpreter_requires_environment(),
'Cannot run -I tests when PYTHON env vars are required.')
def test_isolatedmode(self):
self.verify_valid_flag('-I')
diff --git a/Lib/test/test_cmd_line_script.py b/Lib/test/test_cmd_line_script.py
index 7350164885..b2be9b1b70 100644
--- a/Lib/test/test_cmd_line_script.py
+++ b/Lib/test/test_cmd_line_script.py
@@ -13,10 +13,9 @@ import subprocess
import textwrap
from test import support
-from test.script_helper import (
+from test.support.script_helper import (
make_pkg, make_script, make_zip_pkg, make_zip_script,
- assert_python_ok, assert_python_failure, temp_dir,
- spawn_python, kill_python)
+ assert_python_ok, assert_python_failure, spawn_python, kill_python)
verbose = support.verbose
@@ -223,14 +222,14 @@ class CmdLineTest(unittest.TestCase):
self.check_repl_stderr_flush(True)
def test_basic_script(self):
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
script_name = _make_test_script(script_dir, 'script')
self._check_script(script_name, script_name, script_name,
script_dir, None,
importlib.machinery.SourceFileLoader)
def test_script_compiled(self):
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
script_name = _make_test_script(script_dir, 'script')
py_compile.compile(script_name, doraise=True)
os.remove(script_name)
@@ -240,14 +239,14 @@ class CmdLineTest(unittest.TestCase):
importlib.machinery.SourcelessFileLoader)
def test_directory(self):
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
script_name = _make_test_script(script_dir, '__main__')
self._check_script(script_dir, script_name, script_dir,
script_dir, '',
importlib.machinery.SourceFileLoader)
def test_directory_compiled(self):
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
script_name = _make_test_script(script_dir, '__main__')
py_compile.compile(script_name, doraise=True)
os.remove(script_name)
@@ -257,19 +256,19 @@ class CmdLineTest(unittest.TestCase):
importlib.machinery.SourcelessFileLoader)
def test_directory_error(self):
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
msg = "can't find '__main__' module in %r" % script_dir
self._check_import_error(script_dir, msg)
def test_zipfile(self):
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
script_name = _make_test_script(script_dir, '__main__')
zip_name, run_name = make_zip_script(script_dir, 'test_zip', script_name)
self._check_script(zip_name, run_name, zip_name, zip_name, '',
zipimport.zipimporter)
def test_zipfile_compiled(self):
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
script_name = _make_test_script(script_dir, '__main__')
compiled_name = py_compile.compile(script_name, doraise=True)
zip_name, run_name = make_zip_script(script_dir, 'test_zip', compiled_name)
@@ -277,14 +276,14 @@ class CmdLineTest(unittest.TestCase):
zipimport.zipimporter)
def test_zipfile_error(self):
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
script_name = _make_test_script(script_dir, 'not_main')
zip_name, run_name = make_zip_script(script_dir, 'test_zip', script_name)
msg = "can't find '__main__' module in %r" % zip_name
self._check_import_error(zip_name, msg)
def test_module_in_package(self):
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
pkg_dir = os.path.join(script_dir, 'test_pkg')
make_pkg(pkg_dir)
script_name = _make_test_script(pkg_dir, 'script')
@@ -294,14 +293,14 @@ class CmdLineTest(unittest.TestCase):
importlib.machinery.SourceFileLoader)
def test_module_in_package_in_zipfile(self):
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
zip_name, run_name = _make_test_zip_pkg(script_dir, 'test_zip', 'test_pkg', 'script')
launch_name = _make_launch_script(script_dir, 'launch', 'test_pkg.script', zip_name)
self._check_script(launch_name, run_name, run_name,
zip_name, 'test_pkg', zipimport.zipimporter)
def test_module_in_subpackage_in_zipfile(self):
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
zip_name, run_name = _make_test_zip_pkg(script_dir, 'test_zip', 'test_pkg', 'script', depth=2)
launch_name = _make_launch_script(script_dir, 'launch', 'test_pkg.test_pkg.script', zip_name)
self._check_script(launch_name, run_name, run_name,
@@ -309,7 +308,7 @@ class CmdLineTest(unittest.TestCase):
zipimport.zipimporter)
def test_package(self):
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
pkg_dir = os.path.join(script_dir, 'test_pkg')
make_pkg(pkg_dir)
script_name = _make_test_script(pkg_dir, '__main__')
@@ -319,7 +318,7 @@ class CmdLineTest(unittest.TestCase):
importlib.machinery.SourceFileLoader)
def test_package_compiled(self):
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
pkg_dir = os.path.join(script_dir, 'test_pkg')
make_pkg(pkg_dir)
script_name = _make_test_script(pkg_dir, '__main__')
@@ -332,7 +331,7 @@ class CmdLineTest(unittest.TestCase):
importlib.machinery.SourcelessFileLoader)
def test_package_error(self):
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
pkg_dir = os.path.join(script_dir, 'test_pkg')
make_pkg(pkg_dir)
msg = ("'test_pkg' is a package and cannot "
@@ -341,7 +340,7 @@ class CmdLineTest(unittest.TestCase):
self._check_import_error(launch_name, msg)
def test_package_recursion(self):
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
pkg_dir = os.path.join(script_dir, 'test_pkg')
make_pkg(pkg_dir)
main_dir = os.path.join(pkg_dir, '__main__')
@@ -355,7 +354,7 @@ class CmdLineTest(unittest.TestCase):
def test_issue8202(self):
# Make sure package __init__ modules see "-m" in sys.argv0 while
# searching for the module to execute
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
with support.change_cwd(path=script_dir):
pkg_dir = os.path.join(script_dir, 'test_pkg')
make_pkg(pkg_dir, "import sys; print('init_argv0==%r' % sys.argv[0])")
@@ -372,7 +371,7 @@ class CmdLineTest(unittest.TestCase):
def test_issue8202_dash_c_file_ignored(self):
# Make sure a "-c" file in the current directory
# does not alter the value of sys.path[0]
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
with support.change_cwd(path=script_dir):
with open("-c", "w") as f:
f.write("data")
@@ -387,7 +386,7 @@ class CmdLineTest(unittest.TestCase):
def test_issue8202_dash_m_file_ignored(self):
# Make sure a "-m" file in the current directory
# does not alter the value of sys.path[0]
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
script_name = _make_test_script(script_dir, 'other')
with support.change_cwd(path=script_dir):
with open("-m", "w") as f:
@@ -398,20 +397,87 @@ class CmdLineTest(unittest.TestCase):
script_name, script_name, '', '',
importlib.machinery.SourceFileLoader)
+ @contextlib.contextmanager
+ def setup_test_pkg(self, *args):
+ with support.temp_dir() as script_dir, \
+ support.change_cwd(path=script_dir):
+ pkg_dir = os.path.join(script_dir, 'test_pkg')
+ make_pkg(pkg_dir, *args)
+ yield pkg_dir
+
+ def check_dash_m_failure(self, *args):
+ rc, out, err = assert_python_failure('-m', *args, __isolated=False)
+ if verbose > 1:
+ print(repr(out))
+ self.assertEqual(rc, 1)
+ return err
+
def test_dash_m_error_code_is_one(self):
# If a module is invoked with the -m command line flag
# and results in an error that the return code to the
# shell is '1'
- with temp_dir() as script_dir:
- with support.change_cwd(path=script_dir):
- pkg_dir = os.path.join(script_dir, 'test_pkg')
- make_pkg(pkg_dir)
- script_name = _make_test_script(pkg_dir, 'other',
- "if __name__ == '__main__': raise ValueError")
- rc, out, err = assert_python_failure('-m', 'test_pkg.other', *example_args)
- if verbose > 1:
- print(repr(out))
+ with self.setup_test_pkg() as pkg_dir:
+ script_name = _make_test_script(pkg_dir, 'other',
+ "if __name__ == '__main__': raise ValueError")
+ err = self.check_dash_m_failure('test_pkg.other', *example_args)
+ self.assertIn(b'ValueError', err)
+
+ def test_dash_m_errors(self):
+ # Exercise error reporting for various invalid package executions
+ tests = (
+ ('builtins', br'No code object available'),
+ ('builtins.x', br'Error while finding spec.*AttributeError'),
+ ('builtins.x.y', br'Error while finding spec.*'
+ br'ImportError.*No module named.*not a package'),
+ ('os.path', br'loader.*cannot handle'),
+ ('importlib', br'No module named.*'
+ br'is a package and cannot be directly executed'),
+ ('importlib.nonexistant', br'No module named'),
+ ('.unittest', br'Relative module names not supported'),
+ )
+ for name, regex in tests:
+ with self.subTest(name):
+ rc, _, err = assert_python_failure('-m', name)
self.assertEqual(rc, 1)
+ self.assertRegex(err, regex)
+ self.assertNotIn(b'Traceback', err)
+
+ def test_dash_m_bad_pyc(self):
+ with support.temp_dir() as script_dir, \
+ support.change_cwd(path=script_dir):
+ os.mkdir('test_pkg')
+ # Create invalid *.pyc as empty file
+ with open('test_pkg/__init__.pyc', 'wb'):
+ pass
+ err = self.check_dash_m_failure('test_pkg')
+ self.assertRegex(err, br'Error while finding spec.*'
+ br'ImportError.*bad magic number')
+ self.assertNotIn(b'is a package', err)
+ self.assertNotIn(b'Traceback', err)
+
+ def test_dash_m_init_traceback(self):
+ # These were wrapped in an ImportError and tracebacks were
+ # suppressed; see Issue 14285
+ exceptions = (ImportError, AttributeError, TypeError, ValueError)
+ for exception in exceptions:
+ exception = exception.__name__
+ init = "raise {0}('Exception in __init__.py')".format(exception)
+ with self.subTest(exception), \
+ self.setup_test_pkg(init) as pkg_dir:
+ err = self.check_dash_m_failure('test_pkg')
+ self.assertIn(exception.encode('ascii'), err)
+ self.assertIn(b'Exception in __init__.py', err)
+ self.assertIn(b'Traceback', err)
+
+ def test_dash_m_main_traceback(self):
+ # Ensure that an ImportError's traceback is reported
+ with self.setup_test_pkg() as pkg_dir:
+ main = "raise ImportError('Exception in __main__ module')"
+ _make_test_script(pkg_dir, '__main__', main)
+ err = self.check_dash_m_failure('test_pkg')
+ self.assertIn(b'ImportError', err)
+ self.assertIn(b'Exception in __main__ module', err)
+ self.assertIn(b'Traceback', err)
def test_pep_409_verbiage(self):
# Make sure PEP 409 syntax properly suppresses
@@ -422,7 +488,7 @@ class CmdLineTest(unittest.TestCase):
except:
raise NameError from None
""")
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
script_name = _make_test_script(script_dir, 'script', script)
exitcode, stdout, stderr = assert_python_failure(script_name)
text = stderr.decode('ascii').split('\n')
@@ -433,7 +499,7 @@ class CmdLineTest(unittest.TestCase):
def test_non_ascii(self):
# Mac OS X denies the creation of a file with an invalid UTF-8 name.
- # Windows allows to create a name with an arbitrary bytes name, but
+ # Windows allows creating a name with an arbitrary bytes name, but
# Python cannot a undecodable bytes argument to a subprocess.
if (support.TESTFN_UNDECODABLE
and sys.platform not in ('win32', 'darwin')):
@@ -466,7 +532,7 @@ class CmdLineTest(unittest.TestCase):
if error:
sys.exit(error)
""")
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
script_name = _make_test_script(script_dir, 'script', script)
exitcode, stdout, stderr = assert_python_failure(script_name)
text = stderr.decode('ascii')
diff --git a/Lib/test/test_code_module.py b/Lib/test/test_code_module.py
index 7a80a808b1..3394b39e01 100644
--- a/Lib/test/test_code_module.py
+++ b/Lib/test/test_code_module.py
@@ -1,6 +1,7 @@
"Test InteractiveConsole and InteractiveInterpreter from code module"
import sys
import unittest
+from textwrap import dedent
from contextlib import ExitStack
from unittest import mock
from test import support
@@ -78,9 +79,40 @@ class TestInteractiveConsole(unittest.TestCase):
self.console.interact(banner='')
self.assertEqual(len(self.stderr.method_calls), 1)
+ def test_cause_tb(self):
+ self.infunc.side_effect = ["raise ValueError('') from AttributeError",
+ EOFError('Finished')]
+ self.console.interact()
+ output = ''.join(''.join(call[1]) for call in self.stderr.method_calls)
+ expected = dedent("""
+ AttributeError
+
+ The above exception was the direct cause of the following exception:
+
+ Traceback (most recent call last):
+ File "<console>", line 1, in <module>
+ ValueError
+ """)
+ self.assertIn(expected, output)
+
+ def test_context_tb(self):
+ self.infunc.side_effect = ["try: ham\nexcept: eggs\n",
+ EOFError('Finished')]
+ self.console.interact()
+ output = ''.join(''.join(call[1]) for call in self.stderr.method_calls)
+ expected = dedent("""
+ Traceback (most recent call last):
+ File "<console>", line 1, in <module>
+ NameError: name 'ham' is not defined
+
+ During handling of the above exception, another exception occurred:
+
+ Traceback (most recent call last):
+ File "<console>", line 2, in <module>
+ NameError: name 'eggs' is not defined
+ """)
+ self.assertIn(expected, output)
-def test_main():
- support.run_unittest(TestInteractiveConsole)
if __name__ == "__main__":
unittest.main()
diff --git a/Lib/test/test_codeccallbacks.py b/Lib/test/test_codeccallbacks.py
index 1327f112a2..ee1e28a763 100644
--- a/Lib/test/test_codeccallbacks.py
+++ b/Lib/test/test_codeccallbacks.py
@@ -150,6 +150,22 @@ class CodecCallbackTest(unittest.TestCase):
sout = b"a\xac\\u1234\xa4\\u8000\\U0010ffff"
self.assertEqual(sin.encode("iso-8859-15", "backslashreplace"), sout)
+ def test_nameescape(self):
+ # Does the same as backslashescape, but prefers ``\N{...}`` escape
+ # sequences.
+ sin = "a\xac\u1234\u20ac\u8000\U0010ffff"
+ sout = (b'a\\N{NOT SIGN}\\N{ETHIOPIC SYLLABLE SEE}\\N{EURO SIGN}'
+ b'\\N{CJK UNIFIED IDEOGRAPH-8000}\\U0010ffff')
+ self.assertEqual(sin.encode("ascii", "namereplace"), sout)
+
+ sout = (b'a\xac\\N{ETHIOPIC SYLLABLE SEE}\\N{EURO SIGN}'
+ b'\\N{CJK UNIFIED IDEOGRAPH-8000}\\U0010ffff')
+ self.assertEqual(sin.encode("latin-1", "namereplace"), sout)
+
+ sout = (b'a\xac\\N{ETHIOPIC SYLLABLE SEE}\xa4'
+ b'\\N{CJK UNIFIED IDEOGRAPH-8000}\\U0010ffff')
+ self.assertEqual(sin.encode("iso-8859-15", "namereplace"), sout)
+
def test_decoding_callbacks(self):
# This is a test for a decoding callback handler
# that allows the decoding of the invalid sequence
@@ -220,6 +236,11 @@ class CodecCallbackTest(unittest.TestCase):
"\u0000\ufffd"
)
+ self.assertEqual(
+ b"\x00\x00\x00\x00\x00".decode("unicode-internal", "backslashreplace"),
+ "\u0000\\x00"
+ )
+
codecs.register_error("test.hui", handler_unicodeinternal)
self.assertEqual(
@@ -287,7 +308,7 @@ class CodecCallbackTest(unittest.TestCase):
def test_longstrings(self):
# test long strings to check for memory overflow problems
errors = [ "strict", "ignore", "replace", "xmlcharrefreplace",
- "backslashreplace"]
+ "backslashreplace", "namereplace"]
# register the handlers under different names,
# to prevent the codec from recognizing the name
for err in errors:
@@ -550,17 +571,6 @@ class CodecCallbackTest(unittest.TestCase):
codecs.backslashreplace_errors,
UnicodeError("ouch")
)
- # "backslashreplace" can only be used for encoding
- self.assertRaises(
- TypeError,
- codecs.backslashreplace_errors,
- UnicodeDecodeError("ascii", bytearray(b"\xff"), 0, 1, "ouch")
- )
- self.assertRaises(
- TypeError,
- codecs.backslashreplace_errors,
- UnicodeTranslateError("\u3042", 0, 1, "ouch")
- )
# Use the correct exception
tests = [
("\u3042", "\\u3042"),
@@ -585,6 +595,72 @@ class CodecCallbackTest(unittest.TestCase):
1, 1 + len(s), "ouch")),
(r, 1 + len(s))
)
+ self.assertEqual(
+ codecs.backslashreplace_errors(
+ UnicodeTranslateError("a" + s + "b",
+ 1, 1 + len(s), "ouch")),
+ (r, 1 + len(s))
+ )
+ tests = [
+ (b"a", "\\x61"),
+ (b"\n", "\\x0a"),
+ (b"\x00", "\\x00"),
+ (b"\xff", "\\xff"),
+ ]
+ for b, r in tests:
+ with self.subTest(bytes=b):
+ self.assertEqual(
+ codecs.backslashreplace_errors(
+ UnicodeDecodeError("ascii", bytearray(b"a" + b + b"b"),
+ 1, 2, "ouch")),
+ (r, 2)
+ )
+
+ def test_badandgoodnamereplaceexceptions(self):
+ # "namereplace" complains about a non-exception passed in
+ self.assertRaises(
+ TypeError,
+ codecs.namereplace_errors,
+ 42
+ )
+ # "namereplace" complains about the wrong exception types
+ self.assertRaises(
+ TypeError,
+ codecs.namereplace_errors,
+ UnicodeError("ouch")
+ )
+ # "namereplace" can only be used for encoding
+ self.assertRaises(
+ TypeError,
+ codecs.namereplace_errors,
+ UnicodeDecodeError("ascii", bytearray(b"\xff"), 0, 1, "ouch")
+ )
+ self.assertRaises(
+ TypeError,
+ codecs.namereplace_errors,
+ UnicodeTranslateError("\u3042", 0, 1, "ouch")
+ )
+ # Use the correct exception
+ tests = [
+ ("\u3042", "\\N{HIRAGANA LETTER A}"),
+ ("\x00", "\\x00"),
+ ("\ufbf9", "\\N{ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH "
+ "HAMZA ABOVE WITH ALEF MAKSURA ISOLATED FORM}"),
+ ("\U000e007f", "\\N{CANCEL TAG}"),
+ ("\U0010ffff", "\\U0010ffff"),
+ # Lone surrogates
+ ("\ud800", "\\ud800"),
+ ("\udfff", "\\udfff"),
+ ("\ud800\udfff", "\\ud800\\udfff"),
+ ]
+ for s, r in tests:
+ with self.subTest(str=s):
+ self.assertEqual(
+ codecs.namereplace_errors(
+ UnicodeEncodeError("ascii", "a" + s + "b",
+ 1, 1 + len(s), "ouch")),
+ (r, 1 + len(s))
+ )
def test_badandgoodsurrogateescapeexceptions(self):
surrogateescape_errors = codecs.lookup_error('surrogateescape')
@@ -663,20 +739,24 @@ class CodecCallbackTest(unittest.TestCase):
surrogatepass_errors,
UnicodeDecodeError(enc, "a".encode(enc), 0, 1, "ouch")
)
+ for s in ("\ud800", "\udfff", "\ud800\udfff"):
+ with self.subTest(str=s):
+ self.assertRaises(
+ UnicodeEncodeError,
+ surrogatepass_errors,
+ UnicodeEncodeError("ascii", s, 0, len(s), "ouch")
+ )
tests = [
- ("ascii", "\ud800", b'\xed\xa0\x80', 3),
("utf-8", "\ud800", b'\xed\xa0\x80', 3),
("utf-16le", "\ud800", b'\x00\xd8', 2),
("utf-16be", "\ud800", b'\xd8\x00', 2),
("utf-32le", "\ud800", b'\x00\xd8\x00\x00', 4),
("utf-32be", "\ud800", b'\x00\x00\xd8\x00', 4),
- ("ascii", "\udfff", b'\xed\xbf\xbf', 3),
("utf-8", "\udfff", b'\xed\xbf\xbf', 3),
("utf-16le", "\udfff", b'\xff\xdf', 2),
("utf-16be", "\udfff", b'\xdf\xff', 2),
("utf-32le", "\udfff", b'\xff\xdf\x00\x00', 4),
("utf-32be", "\udfff", b'\x00\x00\xdf\xff', 4),
- ("ascii", "\ud800\udfff", b'\xed\xa0\x80\xed\xbf\xbf', 3),
("utf-8", "\ud800\udfff", b'\xed\xa0\x80\xed\xbf\xbf', 3),
("utf-16le", "\ud800\udfff", b'\x00\xd8\xff\xdf', 2),
("utf-16be", "\ud800\udfff", b'\xd8\x00\xdf\xff', 2),
@@ -694,7 +774,7 @@ class CodecCallbackTest(unittest.TestCase):
self.assertEqual(
surrogatepass_errors(
UnicodeDecodeError(enc, bytearray(b"a" + b[:n] + b"b"),
- 1, n, "ouch")),
+ 1, 1 + n, "ouch")),
(s[:1], 1 + n)
)
@@ -738,6 +818,10 @@ class CodecCallbackTest(unittest.TestCase):
codecs.backslashreplace_errors,
codecs.lookup_error("backslashreplace")
)
+ self.assertEqual(
+ codecs.namereplace_errors,
+ codecs.lookup_error("namereplace")
+ )
def test_unencodablereplacement(self):
def unencrepl(exc):
@@ -890,7 +974,8 @@ class CodecCallbackTest(unittest.TestCase):
class D(dict):
def __getitem__(self, key):
raise ValueError
- for err in ("strict", "replace", "xmlcharrefreplace", "backslashreplace", "test.posreturn"):
+ for err in ("strict", "replace", "xmlcharrefreplace",
+ "backslashreplace", "namereplace", "test.posreturn"):
self.assertRaises(UnicodeError, codecs.charmap_encode, "\xff", err, {0xff: None})
self.assertRaises(ValueError, codecs.charmap_encode, "\xff", err, D())
self.assertRaises(TypeError, codecs.charmap_encode, "\xff", err, {0xff: 300})
@@ -905,7 +990,7 @@ class CodecCallbackTest(unittest.TestCase):
def __getitem__(self, key):
raise ValueError
#self.assertRaises(ValueError, "\xff".translate, D())
- self.assertRaises(TypeError, "\xff".translate, {0xff: sys.maxunicode+1})
+ self.assertRaises(ValueError, "\xff".translate, {0xff: sys.maxunicode+1})
self.assertRaises(TypeError, "\xff".translate, {0xff: ()})
def test_bug828737(self):
@@ -967,6 +1052,7 @@ class CodecCallbackTest(unittest.TestCase):
codecs.ignore_errors,
codecs.replace_errors,
codecs.backslashreplace_errors,
+ codecs.namereplace_errors,
codecs.xmlcharrefreplace_errors,
codecs.lookup_error('surrogateescape'),
codecs.lookup_error('surrogatepass'),
diff --git a/Lib/test/test_codecencodings_cn.py b/Lib/test/test_codecencodings_cn.py
index 60e69eb762..d0e3a15d16 100644
--- a/Lib/test/test_codecencodings_cn.py
+++ b/Lib/test/test_codecencodings_cn.py
@@ -83,8 +83,5 @@ class Test_HZ(multibytecodec_support.TestBase, unittest.TestCase):
(b"ab~{\x79\x79\x41\x44~}cd", "replace", "ab\ufffd\ufffd\u804acd"),
)
-def test_main():
- support.run_unittest(__name__)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_codecencodings_hk.py b/Lib/test/test_codecencodings_hk.py
index 25c05b6048..bb9be11184 100644
--- a/Lib/test/test_codecencodings_hk.py
+++ b/Lib/test/test_codecencodings_hk.py
@@ -19,8 +19,5 @@ class Test_Big5HKSCS(multibytecodec_support.TestBase, unittest.TestCase):
(b"abc\x80\x80\xc1\xc4", "ignore", "abc\u8b10"),
)
-def test_main():
- support.run_unittest(__name__)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_codecencodings_iso2022.py b/Lib/test/test_codecencodings_iso2022.py
index 87768646fe..8a3ca70de6 100644
--- a/Lib/test/test_codecencodings_iso2022.py
+++ b/Lib/test/test_codecencodings_iso2022.py
@@ -38,8 +38,5 @@ class Test_ISO2022_KR(multibytecodec_support.TestBase, unittest.TestCase):
def test_chunkcoding(self):
pass
-def test_main():
- support.run_unittest(__name__)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_codecencodings_jp.py b/Lib/test/test_codecencodings_jp.py
index 4091948b9b..44b63a00c8 100644
--- a/Lib/test/test_codecencodings_jp.py
+++ b/Lib/test/test_codecencodings_jp.py
@@ -123,8 +123,5 @@ class Test_SJISX0213(multibytecodec_support.TestBase, unittest.TestCase):
b"\x85G&real;\x85Q = &lang;&#4660;&rang;"
)
-def test_main():
- support.run_unittest(__name__)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_codecencodings_kr.py b/Lib/test/test_codecencodings_kr.py
index cd7696acaa..b6a74fbd5b 100644
--- a/Lib/test/test_codecencodings_kr.py
+++ b/Lib/test/test_codecencodings_kr.py
@@ -66,8 +66,5 @@ class Test_JOHAB(multibytecodec_support.TestBase, unittest.TestCase):
(b"\x8CBxy", "replace", "\uFFFDBxy"),
)
-def test_main():
- support.run_unittest(__name__)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_codecencodings_tw.py b/Lib/test/test_codecencodings_tw.py
index ea6e1c1623..9174296726 100644
--- a/Lib/test/test_codecencodings_tw.py
+++ b/Lib/test/test_codecencodings_tw.py
@@ -19,8 +19,5 @@ class Test_Big5(multibytecodec_support.TestBase, unittest.TestCase):
(b"abc\x80\x80\xc1\xc4", "ignore", "abc\u8b10"),
)
-def test_main():
- support.run_unittest(__name__)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py
index 8fe21fb920..0479542745 100644
--- a/Lib/test/test_codecs.py
+++ b/Lib/test/test_codecs.py
@@ -349,6 +349,8 @@ class ReadTest(MixInCheckStateHandling):
self.assertRaises(UnicodeEncodeError, "\ud800".encode, self.encoding)
self.assertEqual("[\uDC80]".encode(self.encoding, "backslashreplace"),
"[\\udc80]".encode(self.encoding))
+ self.assertEqual("[\uDC80]".encode(self.encoding, "namereplace"),
+ "[\\udc80]".encode(self.encoding))
self.assertEqual("[\uDC80]".encode(self.encoding, "xmlcharrefreplace"),
"[&#56448;]".encode(self.encoding))
self.assertEqual("[\uDC80]".encode(self.encoding, "ignore"),
@@ -376,6 +378,10 @@ class ReadTest(MixInCheckStateHandling):
before + after)
self.assertEqual(test_sequence.decode(self.encoding, "replace"),
before + self.ill_formed_sequence_replace + after)
+ backslashreplace = ''.join('\\x%02x' % b
+ for b in self.ill_formed_sequence)
+ self.assertEqual(test_sequence.decode(self.encoding, "backslashreplace"),
+ before + backslashreplace + after)
class UTF32Test(ReadTest, unittest.TestCase):
encoding = "utf-32"
@@ -808,6 +814,7 @@ class CP65001Test(ReadTest, unittest.TestCase):
('\udc80', 'ignore', b''),
('\udc80', 'replace', b'?'),
('\udc80', 'backslashreplace', b'\\udc80'),
+ ('\udc80', 'namereplace', b'\\udc80'),
('\udc80', 'surrogatepass', b'\xed\xb2\x80'),
))
else:
@@ -869,6 +876,8 @@ class CP65001Test(ReadTest, unittest.TestCase):
self.assertRaises(UnicodeDecodeError, b"\xed\xa0\x80".decode, "cp65001")
self.assertEqual("[\uDC80]".encode("cp65001", "backslashreplace"),
b'[\\udc80]')
+ self.assertEqual("[\uDC80]".encode("cp65001", "namereplace"),
+ b'[\\udc80]')
self.assertEqual("[\uDC80]".encode("cp65001", "xmlcharrefreplace"),
b'[&#56448;]')
self.assertEqual("[\uDC80]".encode("cp65001", "surrogateescape"),
@@ -890,10 +899,6 @@ class CP65001Test(ReadTest, unittest.TestCase):
"\U00010fff\uD800")
self.assertTrue(codecs.lookup_error("surrogatepass"))
- def test_readline(self):
- self.skipTest("issue #20571: code page 65001 codec does not "
- "support partial decoder yet")
-
class UTF7Test(ReadTest, unittest.TestCase):
encoding = "utf-7"
@@ -1139,6 +1144,7 @@ class UTF8SigTest(UTF8Test, unittest.TestCase):
class EscapeDecodeTest(unittest.TestCase):
def test_empty(self):
self.assertEqual(codecs.escape_decode(b""), (b"", 0))
+ self.assertEqual(codecs.escape_decode(bytearray()), (b"", 0))
def test_raw(self):
decode = codecs.escape_decode
@@ -1357,14 +1363,19 @@ class UnicodeInternalTest(unittest.TestCase):
"unicode_internal")
if sys.byteorder == "little":
invalid = b"\x00\x00\x11\x00"
+ invalid_backslashreplace = r"\x00\x00\x11\x00"
else:
invalid = b"\x00\x11\x00\x00"
+ invalid_backslashreplace = r"\x00\x11\x00\x00"
with support.check_warnings():
self.assertRaises(UnicodeDecodeError,
invalid.decode, "unicode_internal")
with support.check_warnings():
self.assertEqual(invalid.decode("unicode_internal", "replace"),
'\ufffd')
+ with support.check_warnings():
+ self.assertEqual(invalid.decode("unicode_internal", "backslashreplace"),
+ invalid_backslashreplace)
@unittest.skipUnless(SIZEOF_WCHAR_T == 4, 'specific to 32-bit wchar_t')
def test_decode_error_attributes(self):
@@ -1670,6 +1681,12 @@ class CodecsModuleTest(unittest.TestCase):
self.assertEqual(codecs.decode(b'abc'), 'abc')
self.assertRaises(UnicodeDecodeError, codecs.decode, b'\xff', 'ascii')
+ # test keywords
+ self.assertEqual(codecs.decode(obj=b'\xe4\xf6\xfc', encoding='latin-1'),
+ '\xe4\xf6\xfc')
+ self.assertEqual(codecs.decode(b'[\xff]', 'ascii', errors='ignore'),
+ '[]')
+
def test_encode(self):
self.assertEqual(codecs.encode('\xe4\xf6\xfc', 'latin-1'),
b'\xe4\xf6\xfc')
@@ -1678,6 +1695,12 @@ class CodecsModuleTest(unittest.TestCase):
self.assertEqual(codecs.encode('abc'), b'abc')
self.assertRaises(UnicodeEncodeError, codecs.encode, '\xffff', 'ascii')
+ # test keywords
+ self.assertEqual(codecs.encode(obj='\xe4\xf6\xfc', encoding='latin-1'),
+ b'\xe4\xf6\xfc')
+ self.assertEqual(codecs.encode('[\xff]', 'ascii', errors='ignore'),
+ b'[]')
+
def test_register(self):
self.assertRaises(TypeError, codecs.register)
self.assertRaises(TypeError, codecs.register, 42)
@@ -1726,6 +1749,7 @@ class CodecsModuleTest(unittest.TestCase):
"register_error", "lookup_error",
"strict_errors", "replace_errors", "ignore_errors",
"xmlcharrefreplace_errors", "backslashreplace_errors",
+ "namereplace_errors",
"open", "EncodedFile",
"iterencode", "iterdecode",
"BOM", "BOM_BE", "BOM_LE",
@@ -1856,7 +1880,9 @@ all_unicode_encodings = [
"iso8859_9",
"johab",
"koi8_r",
+ "koi8_t",
"koi8_u",
+ "kz1048",
"latin_1",
"mac_cyrillic",
"mac_greek",
@@ -2087,6 +2113,16 @@ class CharmapTest(unittest.TestCase):
)
self.assertEqual(
+ codecs.charmap_decode(b"\x00\x01\x02", "backslashreplace", "ab"),
+ ("ab\\x02", 3)
+ )
+
+ self.assertEqual(
+ codecs.charmap_decode(b"\x00\x01\x02", "backslashreplace", "ab\ufffe"),
+ ("ab\\x02", 3)
+ )
+
+ self.assertEqual(
codecs.charmap_decode(b"\x00\x01\x02", "ignore", "ab"),
("ab", 3)
)
@@ -2163,6 +2199,25 @@ class CharmapTest(unittest.TestCase):
)
self.assertEqual(
+ codecs.charmap_decode(b"\x00\x01\x02", "backslashreplace",
+ {0: 'a', 1: 'b'}),
+ ("ab\\x02", 3)
+ )
+
+ self.assertEqual(
+ codecs.charmap_decode(b"\x00\x01\x02", "backslashreplace",
+ {0: 'a', 1: 'b', 2: None}),
+ ("ab\\x02", 3)
+ )
+
+ # Issue #14850
+ self.assertEqual(
+ codecs.charmap_decode(b"\x00\x01\x02", "backslashreplace",
+ {0: 'a', 1: 'b', 2: '\ufffe'}),
+ ("ab\\x02", 3)
+ )
+
+ self.assertEqual(
codecs.charmap_decode(b"\x00\x01\x02", "ignore",
{0: 'a', 1: 'b'}),
("ab", 3)
@@ -2239,6 +2294,18 @@ class CharmapTest(unittest.TestCase):
)
self.assertEqual(
+ codecs.charmap_decode(b"\x00\x01\x02", "backslashreplace",
+ {0: a, 1: b}),
+ ("ab\\x02", 3)
+ )
+
+ self.assertEqual(
+ codecs.charmap_decode(b"\x00\x01\x02", "backslashreplace",
+ {0: a, 1: b, 2: 0xFFFE}),
+ ("ab\\x02", 3)
+ )
+
+ self.assertEqual(
codecs.charmap_decode(b"\x00\x01\x02", "ignore",
{0: a, 1: b}),
("ab", 3)
@@ -2288,7 +2355,7 @@ class TypesTest(unittest.TestCase):
self.assertRaises(TypeError, decoder, "xxx")
def test_unicode_escape(self):
- # Escape-decoding an unicode string is supported ang gives the same
+ # Escape-decoding a unicode string is supported and gives the same
# result as decoding the equivalent ASCII bytes string.
self.assertEqual(codecs.unicode_escape_decode(r"\u1234"), ("\u1234", 6))
self.assertEqual(codecs.unicode_escape_decode(br"\u1234"), ("\u1234", 6))
@@ -2297,9 +2364,13 @@ class TypesTest(unittest.TestCase):
self.assertRaises(UnicodeDecodeError, codecs.unicode_escape_decode, br"\U00110000")
self.assertEqual(codecs.unicode_escape_decode(r"\U00110000", "replace"), ("\ufffd", 10))
+ self.assertEqual(codecs.unicode_escape_decode(r"\U00110000", "backslashreplace"),
+ (r"\x5c\x55\x30\x30\x31\x31\x30\x30\x30\x30", 10))
self.assertRaises(UnicodeDecodeError, codecs.raw_unicode_escape_decode, br"\U00110000")
self.assertEqual(codecs.raw_unicode_escape_decode(r"\U00110000", "replace"), ("\ufffd", 10))
+ self.assertEqual(codecs.raw_unicode_escape_decode(r"\U00110000", "backslashreplace"),
+ (r"\x5c\x55\x30\x30\x31\x31\x30\x30\x30\x30", 10))
class UnicodeEscapeTest(unittest.TestCase):
@@ -2691,7 +2762,7 @@ class TransformCodecTest(unittest.TestCase):
# type and a single str argument.
# Use a local codec registry to avoid appearing to leak objects when
-# registering multiple seach functions
+# registering multiple search functions
_TEST_CODECS = {}
def _get_test_codec(codec_name):
@@ -2884,15 +2955,15 @@ class CodePageTest(unittest.TestCase):
self.assertRaisesRegex(UnicodeEncodeError, 'cp932',
codecs.code_page_encode, 932, '\xff')
self.assertRaisesRegex(UnicodeDecodeError, 'cp932',
- codecs.code_page_decode, 932, b'\x81\x00')
+ codecs.code_page_decode, 932, b'\x81\x00', 'strict', True)
self.assertRaisesRegex(UnicodeDecodeError, 'CP_UTF8',
- codecs.code_page_decode, self.CP_UTF8, b'\xff')
+ codecs.code_page_decode, self.CP_UTF8, b'\xff', 'strict', True)
def check_decode(self, cp, tests):
for raw, errors, expected in tests:
if expected is not None:
try:
- decoded = codecs.code_page_decode(cp, raw, errors)
+ decoded = codecs.code_page_decode(cp, raw, errors, True)
except UnicodeDecodeError as err:
self.fail('Unable to decode %a from "cp%s" with '
'errors=%r: %s' % (raw, cp, errors, err))
@@ -2904,7 +2975,7 @@ class CodePageTest(unittest.TestCase):
self.assertLessEqual(decoded[1], len(raw))
else:
self.assertRaises(UnicodeDecodeError,
- codecs.code_page_decode, cp, raw, errors)
+ codecs.code_page_decode, cp, raw, errors, True)
def check_encode(self, cp, tests):
for text, errors, expected in tests:
@@ -2932,7 +3003,12 @@ class CodePageTest(unittest.TestCase):
('[\xff]', 'replace', b'[y]'),
('[\u20ac]', 'replace', b'[?]'),
('[\xff]', 'backslashreplace', b'[\\xff]'),
+ ('[\xff]', 'namereplace',
+ b'[\\N{LATIN SMALL LETTER Y WITH DIAERESIS}]'),
('[\xff]', 'xmlcharrefreplace', b'[&#255;]'),
+ ('\udcff', 'strict', None),
+ ('[\udcff]', 'surrogateescape', b'[\xff]'),
+ ('[\udcff]', 'surrogatepass', None),
))
self.check_decode(932, (
(b'abc', 'strict', 'abc'),
@@ -2941,10 +3017,13 @@ class CodePageTest(unittest.TestCase):
(b'[\xff]', 'strict', None),
(b'[\xff]', 'ignore', '[]'),
(b'[\xff]', 'replace', '[\ufffd]'),
+ (b'[\xff]', 'backslashreplace', '[\\xff]'),
(b'[\xff]', 'surrogateescape', '[\udcff]'),
+ (b'[\xff]', 'surrogatepass', None),
(b'\x81\x00abc', 'strict', None),
(b'\x81\x00abc', 'ignore', '\x00abc'),
(b'\x81\x00abc', 'replace', '\ufffd\x00abc'),
+ (b'\x81\x00abc', 'backslashreplace', '\\x81\x00abc'),
))
def test_cp1252(self):
@@ -2952,9 +3031,12 @@ class CodePageTest(unittest.TestCase):
('abc', 'strict', b'abc'),
('\xe9\u20ac', 'strict', b'\xe9\x80'),
('\xff', 'strict', b'\xff'),
+ # test error handlers
('\u0141', 'strict', None),
('\u0141', 'ignore', b''),
('\u0141', 'replace', b'L'),
+ ('\udc98', 'surrogateescape', b'\x98'),
+ ('\udc98', 'surrogatepass', None),
))
self.check_decode(1252, (
(b'abc', 'strict', 'abc'),
diff --git a/Lib/test/test_codeop.py b/Lib/test/test_codeop.py
index b65423b34c..509bf5dfd2 100644
--- a/Lib/test/test_codeop.py
+++ b/Lib/test/test_codeop.py
@@ -3,7 +3,7 @@
Nick Mathewson
"""
import unittest
-from test.support import run_unittest, is_jython
+from test.support import is_jython
from codeop import compile_command, PyCF_DONT_IMPLY_DEDENT
import io
@@ -296,9 +296,5 @@ class CodeopTests(unittest.TestCase):
compile("a = 1\n", "def", 'single').co_filename)
-def test_main():
- run_unittest(CodeopTests)
-
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py
index 0882bac9fc..4c32e094f9 100644
--- a/Lib/test/test_collections.py
+++ b/Lib/test/test_collections.py
@@ -3,6 +3,7 @@
import collections
import copy
import doctest
+import inspect
import keyword
import operator
import pickle
@@ -11,12 +12,15 @@ import re
import string
import sys
from test import support
+import types
import unittest
from collections import namedtuple, Counter, OrderedDict, _count_elements
-from collections import UserDict
+from collections import UserDict, UserString, UserList
from collections import ChainMap
-from collections.abc import Hashable, Iterable, Iterator
+from collections import deque
+from collections.abc import Awaitable, Coroutine, AsyncIterator, AsyncIterable
+from collections.abc import Hashable, Iterable, Iterator, Generator
from collections.abc import Sized, Container, Callable
from collections.abc import Set, MutableSet
from collections.abc import Mapping, MutableMapping, KeysView, ItemsView
@@ -24,6 +28,26 @@ from collections.abc import Sequence, MutableSequence
from collections.abc import ByteString
+class TestUserObjects(unittest.TestCase):
+ def _superset_test(self, a, b):
+ self.assertGreaterEqual(
+ set(dir(a)),
+ set(dir(b)),
+ '{a} should have all the methods of {b}'.format(
+ a=a.__name__,
+ b=b.__name__,
+ ),
+ )
+ def test_str_protocol(self):
+ self._superset_test(UserString, str)
+
+ def test_list_protocol(self):
+ self._superset_test(UserList, list)
+
+ def test_dict_protocol(self):
+ self._superset_test(UserDict, dict)
+
+
################################################################################
### ChainMap (helper class for configparser and the string module)
################################################################################
@@ -199,6 +223,14 @@ class TestNamedTuple(unittest.TestCase):
Point = namedtuple('Point', 'x y')
self.assertEqual(Point.__doc__, 'Point(x, y)')
+ @unittest.skipIf(sys.flags.optimize >= 2,
+ "Docstrings are omitted with -O2 and above")
+ def test_doc_writable(self):
+ Point = namedtuple('Point', 'x y')
+ self.assertEqual(Point.x.__doc__, 'Alias for field number 0')
+ Point.x.__doc__ = 'docstring for Point.x'
+ self.assertEqual(Point.x.__doc__, 'docstring for Point.x')
+
def test_name_fixer(self):
for spec, renamed in [
[('efg', 'g%hi'), ('efg', '_1')], # field with non-alpha char
@@ -457,6 +489,121 @@ class ABCTestCase(unittest.TestCase):
class TestOneTrickPonyABCs(ABCTestCase):
+ def test_Awaitable(self):
+ def gen():
+ yield
+
+ @types.coroutine
+ def coro():
+ yield
+
+ async def new_coro():
+ pass
+
+ class Bar:
+ def __await__(self):
+ yield
+
+ class MinimalCoro(Coroutine):
+ def send(self, value):
+ return value
+ def throw(self, typ, val=None, tb=None):
+ super().throw(typ, val, tb)
+ def __await__(self):
+ yield
+
+ non_samples = [None, int(), gen(), object()]
+ for x in non_samples:
+ self.assertNotIsInstance(x, Awaitable)
+ self.assertFalse(issubclass(type(x), Awaitable), repr(type(x)))
+
+ samples = [Bar(), MinimalCoro()]
+ for x in samples:
+ self.assertIsInstance(x, Awaitable)
+ self.assertTrue(issubclass(type(x), Awaitable))
+
+ c = coro()
+ # Iterable coroutines (generators with CO_ITERABLE_COROUTINE
+ # flag don't have '__await__' method, hence can't be instances
+ # of Awaitable. Use inspect.isawaitable to detect them.
+ self.assertNotIsInstance(c, Awaitable)
+
+ c = new_coro()
+ self.assertIsInstance(c, Awaitable)
+ c.close() # awoid RuntimeWarning that coro() was not awaited
+
+ class CoroLike: pass
+ Coroutine.register(CoroLike)
+ self.assertTrue(isinstance(CoroLike(), Awaitable))
+ self.assertTrue(issubclass(CoroLike, Awaitable))
+ CoroLike = None
+ support.gc_collect() # Kill CoroLike to clean-up ABCMeta cache
+
+ def test_Coroutine(self):
+ def gen():
+ yield
+
+ @types.coroutine
+ def coro():
+ yield
+
+ async def new_coro():
+ pass
+
+ class Bar:
+ def __await__(self):
+ yield
+
+ class MinimalCoro(Coroutine):
+ def send(self, value):
+ return value
+ def throw(self, typ, val=None, tb=None):
+ super().throw(typ, val, tb)
+ def __await__(self):
+ yield
+
+ non_samples = [None, int(), gen(), object(), Bar()]
+ for x in non_samples:
+ self.assertNotIsInstance(x, Coroutine)
+ self.assertFalse(issubclass(type(x), Coroutine), repr(type(x)))
+
+ samples = [MinimalCoro()]
+ for x in samples:
+ self.assertIsInstance(x, Awaitable)
+ self.assertTrue(issubclass(type(x), Awaitable))
+
+ c = coro()
+ # Iterable coroutines (generators with CO_ITERABLE_COROUTINE
+ # flag don't have '__await__' method, hence can't be instances
+ # of Coroutine. Use inspect.isawaitable to detect them.
+ self.assertNotIsInstance(c, Coroutine)
+
+ c = new_coro()
+ self.assertIsInstance(c, Coroutine)
+ c.close() # awoid RuntimeWarning that coro() was not awaited
+
+ class CoroLike:
+ def send(self, value):
+ pass
+ def throw(self, typ, val=None, tb=None):
+ pass
+ def close(self):
+ pass
+ def __await__(self):
+ pass
+ self.assertTrue(isinstance(CoroLike(), Coroutine))
+ self.assertTrue(issubclass(CoroLike, Coroutine))
+
+ class CoroLike:
+ def send(self, value):
+ pass
+ def close(self):
+ pass
+ def __await__(self):
+ pass
+ self.assertFalse(isinstance(CoroLike(), Coroutine))
+ self.assertFalse(issubclass(CoroLike, Coroutine))
+
def test_Hashable(self):
# Check some non-hashables
non_samples = [bytearray(), list(), set(), dict()]
@@ -483,6 +630,40 @@ class TestOneTrickPonyABCs(ABCTestCase):
self.validate_abstract_methods(Hashable, '__hash__')
self.validate_isinstance(Hashable, '__hash__')
+ def test_AsyncIterable(self):
+ class AI:
+ async def __aiter__(self):
+ return self
+ self.assertTrue(isinstance(AI(), AsyncIterable))
+ self.assertTrue(issubclass(AI, AsyncIterable))
+ # Check some non-iterables
+ non_samples = [None, object, []]
+ for x in non_samples:
+ self.assertNotIsInstance(x, AsyncIterable)
+ self.assertFalse(issubclass(type(x), AsyncIterable), repr(type(x)))
+ self.validate_abstract_methods(AsyncIterable, '__aiter__')
+ self.validate_isinstance(AsyncIterable, '__aiter__')
+
+ def test_AsyncIterator(self):
+ class AI:
+ async def __aiter__(self):
+ return self
+ async def __anext__(self):
+ raise StopAsyncIteration
+ self.assertTrue(isinstance(AI(), AsyncIterator))
+ self.assertTrue(issubclass(AI, AsyncIterator))
+ non_samples = [None, object, []]
+ # Check some non-iterables
+ for x in non_samples:
+ self.assertNotIsInstance(x, AsyncIterator)
+ self.assertFalse(issubclass(type(x), AsyncIterator), repr(type(x)))
+ # Similarly to regular iterators (see issue 10565)
+ class AnextOnly:
+ async def __anext__(self):
+ raise StopAsyncIteration
+ self.assertNotIsInstance(AnextOnly(), AsyncIterator)
+ self.validate_abstract_methods(AsyncIterator, '__anext__', '__aiter__')
+
def test_Iterable(self):
# Check some non-iterables
non_samples = [None, 42, 3.14, 1j]
@@ -530,9 +711,80 @@ class TestOneTrickPonyABCs(ABCTestCase):
class NextOnly:
def __next__(self):
yield 1
- raise StopIteration
+ return
self.assertNotIsInstance(NextOnly(), Iterator)
+ def test_Generator(self):
+ class NonGen1:
+ def __iter__(self): return self
+ def __next__(self): return None
+ def close(self): pass
+ def throw(self, typ, val=None, tb=None): pass
+
+ class NonGen2:
+ def __iter__(self): return self
+ def __next__(self): return None
+ def close(self): pass
+ def send(self, value): return value
+
+ class NonGen3:
+ def close(self): pass
+ def send(self, value): return value
+ def throw(self, typ, val=None, tb=None): pass
+
+ non_samples = [
+ None, 42, 3.14, 1j, b"", "", (), [], {}, set(),
+ iter(()), iter([]), NonGen1(), NonGen2(), NonGen3()]
+ for x in non_samples:
+ self.assertNotIsInstance(x, Generator)
+ self.assertFalse(issubclass(type(x), Generator), repr(type(x)))
+
+ class Gen:
+ def __iter__(self): return self
+ def __next__(self): return None
+ def close(self): pass
+ def send(self, value): return value
+ def throw(self, typ, val=None, tb=None): pass
+
+ class MinimalGen(Generator):
+ def send(self, value):
+ return value
+ def throw(self, typ, val=None, tb=None):
+ super().throw(typ, val, tb)
+
+ def gen():
+ yield 1
+
+ samples = [gen(), (lambda: (yield))(), Gen(), MinimalGen()]
+ for x in samples:
+ self.assertIsInstance(x, Iterator)
+ self.assertIsInstance(x, Generator)
+ self.assertTrue(issubclass(type(x), Generator), repr(type(x)))
+ self.validate_abstract_methods(Generator, 'send', 'throw')
+
+ # mixin tests
+ mgen = MinimalGen()
+ self.assertIs(mgen, iter(mgen))
+ self.assertIs(mgen.send(None), next(mgen))
+ self.assertEqual(2, mgen.send(2))
+ self.assertIsNone(mgen.close())
+ self.assertRaises(ValueError, mgen.throw, ValueError)
+ self.assertRaisesRegex(ValueError, "^huhu$",
+ mgen.throw, ValueError, ValueError("huhu"))
+ self.assertRaises(StopIteration, mgen.throw, StopIteration())
+
+ class FailOnClose(Generator):
+ def send(self, value): return value
+ def throw(self, *args): raise ValueError
+
+ self.assertRaises(ValueError, FailOnClose().close)
+
+ class IgnoreGeneratorExit(Generator):
+ def send(self, value): return value
+ def throw(self, *args): pass
+
+ self.assertRaises(RuntimeError, IgnoreGeneratorExit().close)
+
def test_Sized(self):
non_samples = [None, 42, 3.14, 1j,
(lambda: (yield))(),
@@ -659,6 +911,59 @@ class TestCollectionABCs(ABCTestCase):
a, b = OneTwoThreeSet(), OneTwoThreeSet()
self.assertTrue(hash(a) == hash(b))
+ def test_isdisjoint_Set(self):
+ class MySet(Set):
+ def __init__(self, itr):
+ self.contents = itr
+ def __contains__(self, x):
+ return x in self.contents
+ def __iter__(self):
+ return iter(self.contents)
+ def __len__(self):
+ return len([x for x in self.contents])
+ s1 = MySet((1, 2, 3))
+ s2 = MySet((4, 5, 6))
+ s3 = MySet((1, 5, 6))
+ self.assertTrue(s1.isdisjoint(s2))
+ self.assertFalse(s1.isdisjoint(s3))
+
+ def test_equality_Set(self):
+ class MySet(Set):
+ def __init__(self, itr):
+ self.contents = itr
+ def __contains__(self, x):
+ return x in self.contents
+ def __iter__(self):
+ return iter(self.contents)
+ def __len__(self):
+ return len([x for x in self.contents])
+ s1 = MySet((1,))
+ s2 = MySet((1, 2))
+ s3 = MySet((3, 4))
+ s4 = MySet((3, 4))
+ self.assertTrue(s2 > s1)
+ self.assertTrue(s1 < s2)
+ self.assertFalse(s2 <= s1)
+ self.assertFalse(s2 <= s3)
+ self.assertFalse(s1 >= s2)
+ self.assertEqual(s3, s4)
+ self.assertNotEqual(s2, s3)
+
+ def test_arithmetic_Set(self):
+ class MySet(Set):
+ def __init__(self, itr):
+ self.contents = itr
+ def __contains__(self, x):
+ return x in self.contents
+ def __iter__(self):
+ return iter(self.contents)
+ def __len__(self):
+ return len([x for x in self.contents])
+ s1 = MySet((1, 2, 3))
+ s2 = MySet((3, 4, 5))
+ s3 = s1 & s2
+ self.assertEqual(s3, MySet((3,)))
+
def test_MutableSet(self):
self.assertIsInstance(set(), MutableSet)
self.assertTrue(issubclass(set, MutableSet))
@@ -959,6 +1264,41 @@ class TestCollectionABCs(ABCTestCase):
self.validate_abstract_methods(Sequence, '__contains__', '__iter__', '__len__',
'__getitem__')
+ def test_Sequence_mixins(self):
+ class SequenceSubclass(Sequence):
+ def __init__(self, seq=()):
+ self.seq = seq
+
+ def __getitem__(self, index):
+ return self.seq[index]
+
+ def __len__(self):
+ return len(self.seq)
+
+ # Compare Sequence.index() behavior to (list|str).index() behavior
+ def assert_index_same(seq1, seq2, index_args):
+ try:
+ expected = seq1.index(*index_args)
+ except ValueError:
+ with self.assertRaises(ValueError):
+ seq2.index(*index_args)
+ else:
+ actual = seq2.index(*index_args)
+ self.assertEqual(
+ actual, expected, '%r.index%s' % (seq1, index_args))
+
+ for ty in list, str:
+ nativeseq = ty('abracadabra')
+ indexes = [-10000, -9999] + list(range(-3, len(nativeseq) + 3))
+ seqseq = SequenceSubclass(nativeseq)
+ for letter in set(nativeseq) | {'z'}:
+ assert_index_same(nativeseq, seqseq, (letter,))
+ for start in range(-3, len(nativeseq) + 3):
+ assert_index_same(nativeseq, seqseq, (letter, start))
+ for stop in range(-3, len(nativeseq) + 3):
+ assert_index_same(
+ nativeseq, seqseq, (letter, start, stop))
+
def test_ByteString(self):
for sample in [bytes, bytearray]:
self.assertIsInstance(sample(), ByteString)
@@ -973,7 +1313,7 @@ class TestCollectionABCs(ABCTestCase):
for sample in [tuple, str, bytes]:
self.assertNotIsInstance(sample(), MutableSequence)
self.assertFalse(issubclass(sample, MutableSequence))
- for sample in [list, bytearray]:
+ for sample in [list, bytearray, deque]:
self.assertIsInstance(sample(), MutableSequence)
self.assertTrue(issubclass(sample, MutableSequence))
self.assertFalse(issubclass(str, MutableSequence))
@@ -1289,7 +1629,9 @@ class TestCounter(unittest.TestCase):
def test_main(verbose=None):
NamedTupleDocs = doctest.DocTestSuite(module=collections)
test_classes = [TestNamedTuple, NamedTupleDocs, TestOneTrickPonyABCs,
- TestCollectionABCs, TestCounter, TestChainMap]
+ TestCollectionABCs, TestCounter, TestChainMap,
+ TestUserObjects,
+ ]
support.run_unittest(*test_classes)
support.run_doctest(collections, verbose)
diff --git a/Lib/test/test_compare.py b/Lib/test/test_compare.py
index a663832b3d..471c8dae76 100644
--- a/Lib/test/test_compare.py
+++ b/Lib/test/test_compare.py
@@ -1,5 +1,4 @@
import unittest
-from test import support
class Empty:
def __repr__(self):
@@ -121,8 +120,5 @@ class ComparisonTest(unittest.TestCase):
self.assertEqual(Anything(), y)
-def test_main():
- support.run_unittest(ComparisonTest)
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py
index ee28ca939d..e0fdee3349 100644
--- a/Lib/test/test_compile.py
+++ b/Lib/test/test_compile.py
@@ -5,7 +5,8 @@ import sys
import _ast
import tempfile
import types
-from test import support, script_helper
+from test import support
+from test.support import script_helper
class TestSpecifics(unittest.TestCase):
@@ -427,7 +428,7 @@ if 1:
def test_compile_ast(self):
fname = __file__
- if fname.lower().endswith(('pyc', 'pyo')):
+ if fname.lower().endswith('pyc'):
fname = fname[:-1]
with open(fname, 'r') as f:
fcontents = f.read()
@@ -460,6 +461,17 @@ if 1:
ast.body = [_ast.BoolOp()]
self.assertRaises(TypeError, compile, ast, '<ast>', 'exec')
+ def test_dict_evaluation_order(self):
+ i = 0
+
+ def f():
+ nonlocal i
+ i += 1
+ return i
+
+ d = {f(): f(), f(): f()}
+ self.assertEqual(d, {1: 2, 3: 4})
+
@support.cpython_only
def test_same_filename_used(self):
s = """def f(): pass\ndef g(): pass"""
@@ -532,7 +544,7 @@ if 1:
broken = prefix + repeated * fail_depth
details = "Compiling ({!r} + {!r} * {})".format(
prefix, repeated, fail_depth)
- with self.assertRaises(RuntimeError, msg=details):
+ with self.assertRaises(RecursionError, msg=details):
self.compile_single(broken)
check_limit("a", "()")
@@ -543,10 +555,9 @@ if 1:
def test_null_terminated(self):
# The source code is null-terminated internally, but bytes-like
# objects are accepted, which could be not terminated.
- # Exception changed from TypeError to ValueError in 3.5
- with self.assertRaisesRegex(Exception, "cannot contain null"):
+ with self.assertRaisesRegex(ValueError, "cannot contain null"):
compile("123\x00", "<dummy>", "eval")
- with self.assertRaisesRegex(Exception, "cannot contain null"):
+ with self.assertRaisesRegex(ValueError, "cannot contain null"):
compile(memoryview(b"123\x00"), "<dummy>", "eval")
code = compile(memoryview(b"123\x00")[1:-1], "<dummy>", "eval")
self.assertEqual(eval(code), 23)
@@ -561,6 +572,88 @@ if 1:
exec(memoryview(b"ax = 123")[1:-1], namespace)
self.assertEqual(namespace['x'], 12)
+ def check_constant(self, func, expected):
+ for const in func.__code__.co_consts:
+ if repr(const) == repr(expected):
+ break
+ else:
+ self.fail("unable to find constant %r in %r"
+ % (expected, func.__code__.co_consts))
+
+ # Merging equal constants is not a strict requirement for the Python
+ # semantics, it's a more an implementation detail.
+ @support.cpython_only
+ def test_merge_constants(self):
+ # Issue #25843: compile() must merge constants which are equal
+ # and have the same type.
+
+ def check_same_constant(const):
+ ns = {}
+ code = "f1, f2 = lambda: %r, lambda: %r" % (const, const)
+ exec(code, ns)
+ f1 = ns['f1']
+ f2 = ns['f2']
+ self.assertIs(f1.__code__, f2.__code__)
+ self.check_constant(f1, const)
+ self.assertEqual(repr(f1()), repr(const))
+
+ check_same_constant(None)
+ check_same_constant(0)
+ check_same_constant(0.0)
+ check_same_constant(b'abc')
+ check_same_constant('abc')
+
+ # Note: "lambda: ..." emits "LOAD_CONST Ellipsis",
+ # whereas "lambda: Ellipsis" emits "LOAD_GLOBAL Ellipsis"
+ f1, f2 = lambda: ..., lambda: ...
+ self.assertIs(f1.__code__, f2.__code__)
+ self.check_constant(f1, Ellipsis)
+ self.assertEqual(repr(f1()), repr(Ellipsis))
+
+ # {0} is converted to a constant frozenset({0}) by the peephole
+ # optimizer
+ f1, f2 = lambda x: x in {0}, lambda x: x in {0}
+ self.assertIs(f1.__code__, f2.__code__)
+ self.check_constant(f1, frozenset({0}))
+ self.assertTrue(f1(0))
+
+ def test_dont_merge_constants(self):
+ # Issue #25843: compile() must not merge constants which are equal
+ # but have a different type.
+
+ def check_different_constants(const1, const2):
+ ns = {}
+ exec("f1, f2 = lambda: %r, lambda: %r" % (const1, const2), ns)
+ f1 = ns['f1']
+ f2 = ns['f2']
+ self.assertIsNot(f1.__code__, f2.__code__)
+ self.check_constant(f1, const1)
+ self.check_constant(f2, const2)
+ self.assertEqual(repr(f1()), repr(const1))
+ self.assertEqual(repr(f2()), repr(const2))
+
+ check_different_constants(0, 0.0)
+ check_different_constants(+0.0, -0.0)
+ check_different_constants((0,), (0.0,))
+
+ # check_different_constants() cannot be used because repr(-0j) is
+ # '(-0-0j)', but when '(-0-0j)' is evaluated to 0j: we loose the sign.
+ f1, f2 = lambda: +0.0j, lambda: -0.0j
+ self.assertIsNot(f1.__code__, f2.__code__)
+ self.check_constant(f1, +0.0j)
+ self.check_constant(f2, -0.0j)
+ self.assertEqual(repr(f1()), repr(+0.0j))
+ self.assertEqual(repr(f2()), repr(-0.0j))
+
+ # {0} is converted to a constant frozenset({0}) by the peephole
+ # optimizer
+ f1, f2 = lambda x: x in {0}, lambda x: x in {0.0}
+ self.assertIsNot(f1.__code__, f2.__code__)
+ self.check_constant(f1, frozenset({0}))
+ self.check_constant(f2, frozenset({0.0}))
+ self.assertTrue(f1(0))
+ self.assertTrue(f2(0.0))
+
class TestStackSize(unittest.TestCase):
# These tests check that the computed stack size for a code object
diff --git a/Lib/test/test_compileall.py b/Lib/test/test_compileall.py
index 7c61fa3250..2ce8a61e39 100644
--- a/Lib/test/test_compileall.py
+++ b/Lib/test/test_compileall.py
@@ -11,7 +11,15 @@ import time
import unittest
import io
-from test import support, script_helper
+from unittest import mock, skipUnless
+try:
+ from concurrent.futures import ProcessPoolExecutor
+ _have_multiprocessing = True
+except ImportError:
+ _have_multiprocessing = False
+
+from test import support
+from test.support import script_helper
class CompileallTests(unittest.TestCase):
@@ -95,18 +103,45 @@ class CompileallTests(unittest.TestCase):
def test_optimize(self):
# make sure compiling with different optimization settings than the
# interpreter's creates the correct file names
- optimize = 1 if __debug__ else 0
+ optimize, opt = (1, 1) if __debug__ else (0, '')
compileall.compile_dir(self.directory, quiet=True, optimize=optimize)
cached = importlib.util.cache_from_source(self.source_path,
- debug_override=not optimize)
+ optimization=opt)
self.assertTrue(os.path.isfile(cached))
cached2 = importlib.util.cache_from_source(self.source_path2,
- debug_override=not optimize)
+ optimization=opt)
self.assertTrue(os.path.isfile(cached2))
cached3 = importlib.util.cache_from_source(self.source_path3,
- debug_override=not optimize)
+ optimization=opt)
self.assertTrue(os.path.isfile(cached3))
+ @mock.patch('compileall.ProcessPoolExecutor')
+ def test_compile_pool_called(self, pool_mock):
+ compileall.compile_dir(self.directory, quiet=True, workers=5)
+ self.assertTrue(pool_mock.called)
+
+ def test_compile_workers_non_positive(self):
+ with self.assertRaisesRegex(ValueError,
+ "workers must be greater or equal to 0"):
+ compileall.compile_dir(self.directory, workers=-1)
+
+ @mock.patch('compileall.ProcessPoolExecutor')
+ def test_compile_workers_cpu_count(self, pool_mock):
+ compileall.compile_dir(self.directory, quiet=True, workers=0)
+ self.assertEqual(pool_mock.call_args[1]['max_workers'], None)
+
+ @mock.patch('compileall.ProcessPoolExecutor')
+ @mock.patch('compileall.compile_file')
+ def test_compile_one_worker(self, compile_file_mock, pool_mock):
+ compileall.compile_dir(self.directory, quiet=True)
+ self.assertFalse(pool_mock.called)
+ self.assertTrue(compile_file_mock.called)
+
+ @mock.patch('compileall.ProcessPoolExecutor', new=None)
+ @mock.patch('compileall.compile_file')
+ def test_compile_missing_multiprocessing(self, compile_file_mock):
+ compileall.compile_dir(self.directory, quiet=True, workers=5)
+ self.assertTrue(compile_file_mock.called)
class EncodingTest(unittest.TestCase):
"""Issue 6716: compileall should escape source code when printing errors
@@ -231,11 +266,11 @@ class CommandLineTests(unittest.TestCase):
self.assertNotIn(b'Listing ', quiet)
# Ensure that the default behavior of compileall's CLI is to create
- # PEP 3147 pyc/pyo files.
+ # PEP 3147/PEP 488 pyc files.
for name, ext, switch in [
('normal', 'pyc', []),
- ('optimize', 'pyo', ['-O']),
- ('doubleoptimize', 'pyo', ['-OO']),
+ ('optimize', 'opt-1.pyc', ['-O']),
+ ('doubleoptimize', 'opt-2.pyc', ['-OO']),
]:
def f(self, ext=ext, switch=switch):
script_helper.assert_python_ok(*(switch +
@@ -252,13 +287,12 @@ class CommandLineTests(unittest.TestCase):
def test_legacy_paths(self):
# Ensure that with the proper switch, compileall leaves legacy
- # pyc/pyo files, and no __pycache__ directory.
+ # pyc files, and no __pycache__ directory.
self.assertRunOK('-b', '-q', self.pkgdir)
# Verify the __pycache__ directory contents.
self.assertFalse(os.path.exists(self.pkgdir_cachedir))
- opt = 'c' if __debug__ else 'o'
- expected = sorted(['__init__.py', '__init__.py' + opt, 'bar.py',
- 'bar.py' + opt])
+ expected = sorted(['__init__.py', '__init__.pyc', 'bar.py',
+ 'bar.pyc'])
self.assertEqual(sorted(os.listdir(self.pkgdir)), expected)
def test_multiple_runs(self):
@@ -301,12 +335,53 @@ class CommandLineTests(unittest.TestCase):
self.assertCompiled(subinitfn)
self.assertCompiled(hamfn)
+ def test_recursion_limit(self):
+ subpackage = os.path.join(self.pkgdir, 'spam')
+ subpackage2 = os.path.join(subpackage, 'ham')
+ subpackage3 = os.path.join(subpackage2, 'eggs')
+ for pkg in (subpackage, subpackage2, subpackage3):
+ script_helper.make_pkg(pkg)
+
+ subinitfn = os.path.join(subpackage, '__init__.py')
+ hamfn = script_helper.make_script(subpackage, 'ham', '')
+ spamfn = script_helper.make_script(subpackage2, 'spam', '')
+ eggfn = script_helper.make_script(subpackage3, 'egg', '')
+
+ self.assertRunOK('-q', '-r 0', self.pkgdir)
+ self.assertNotCompiled(subinitfn)
+ self.assertFalse(
+ os.path.exists(os.path.join(subpackage, '__pycache__')))
+
+ self.assertRunOK('-q', '-r 1', self.pkgdir)
+ self.assertCompiled(subinitfn)
+ self.assertCompiled(hamfn)
+ self.assertNotCompiled(spamfn)
+
+ self.assertRunOK('-q', '-r 2', self.pkgdir)
+ self.assertCompiled(subinitfn)
+ self.assertCompiled(hamfn)
+ self.assertCompiled(spamfn)
+ self.assertNotCompiled(eggfn)
+
+ self.assertRunOK('-q', '-r 5', self.pkgdir)
+ self.assertCompiled(subinitfn)
+ self.assertCompiled(hamfn)
+ self.assertCompiled(spamfn)
+ self.assertCompiled(eggfn)
+
def test_quiet(self):
noisy = self.assertRunOK(self.pkgdir)
quiet = self.assertRunOK('-q', self.pkgdir)
self.assertNotEqual(b'', noisy)
self.assertEqual(b'', quiet)
+ def test_silent(self):
+ script_helper.make_script(self.pkgdir, 'crunchyfrog', 'bad(syntax')
+ _, quiet, _ = self.assertRunNotOK('-q', self.pkgdir)
+ _, silent, _ = self.assertRunNotOK('-qq', self.pkgdir)
+ self.assertNotEqual(b'', quiet)
+ self.assertEqual(b'', silent)
+
def test_regexp(self):
self.assertRunOK('-q', '-x', r'ba[^\\/]*$', self.pkgdir)
self.assertNotCompiled(self.barfn)
@@ -399,6 +474,29 @@ class CommandLineTests(unittest.TestCase):
out = self.assertRunOK('badfilename')
self.assertRegex(out, b"Can't list 'badfilename'")
+ @skipUnless(_have_multiprocessing, "requires multiprocessing")
+ def test_workers(self):
+ bar2fn = script_helper.make_script(self.directory, 'bar2', '')
+ files = []
+ for suffix in range(5):
+ pkgdir = os.path.join(self.directory, 'foo{}'.format(suffix))
+ os.mkdir(pkgdir)
+ fn = script_helper.make_script(pkgdir, '__init__', '')
+ files.append(script_helper.make_script(pkgdir, 'bar2', ''))
+
+ self.assertRunOK(self.directory, '-j', '0')
+ self.assertCompiled(bar2fn)
+ for file in files:
+ self.assertCompiled(file)
+
+ @mock.patch('compileall.compile_dir')
+ def test_workers_available_cores(self, compile_dir):
+ with mock.patch("sys.argv",
+ new=[sys.executable, self.directory, "-j0"]):
+ compileall.main()
+ self.assertTrue(compile_dir.called)
+ self.assertEqual(compile_dir.call_args[-1]['workers'], None)
+
if __name__ == "__main__":
unittest.main()
diff --git a/Lib/test/test_concurrent_futures.py b/Lib/test/test_concurrent_futures.py
index c74b2ca6ed..cdb93088a2 100644
--- a/Lib/test/test_concurrent_futures.py
+++ b/Lib/test/test_concurrent_futures.py
@@ -9,8 +9,9 @@ test.support.import_module('multiprocessing.synchronize')
# without thread support.
test.support.import_module('threading')
-from test.script_helper import assert_python_ok
+from test.support.script_helper import assert_python_ok
+import os
import sys
import threading
import time
@@ -425,6 +426,13 @@ class ExecutorTest:
self.assertTrue(collected,
"Stale reference not collected within timeout.")
+ def test_max_workers_negative(self):
+ for number in (0, -1):
+ with self.assertRaisesRegex(ValueError,
+ "max_workers must be greater "
+ "than 0"):
+ self.executor_type(max_workers=number)
+
class ThreadPoolExecutorTest(ThreadPoolMixin, ExecutorTest, unittest.TestCase):
def test_map_submits_without_iteration(self):
@@ -437,6 +445,11 @@ class ThreadPoolExecutorTest(ThreadPoolMixin, ExecutorTest, unittest.TestCase):
self.executor.shutdown(wait=True)
self.assertCountEqual(finished, range(10))
+ def test_default_workers(self):
+ executor = self.executor_type()
+ self.assertEqual(executor._max_workers,
+ (os.cpu_count() or 1) * 5)
+
class ProcessPoolExecutorTest(ProcessPoolMixin, ExecutorTest, unittest.TestCase):
def test_killed_child(self):
@@ -451,6 +464,48 @@ class ProcessPoolExecutorTest(ProcessPoolMixin, ExecutorTest, unittest.TestCase)
# Submitting other jobs fails as well.
self.assertRaises(BrokenProcessPool, self.executor.submit, pow, 2, 8)
+ def test_map_chunksize(self):
+ def bad_map():
+ list(self.executor.map(pow, range(40), range(40), chunksize=-1))
+
+ ref = list(map(pow, range(40), range(40)))
+ self.assertEqual(
+ list(self.executor.map(pow, range(40), range(40), chunksize=6)),
+ ref)
+ self.assertEqual(
+ list(self.executor.map(pow, range(40), range(40), chunksize=50)),
+ ref)
+ self.assertEqual(
+ list(self.executor.map(pow, range(40), range(40), chunksize=40)),
+ ref)
+ self.assertRaises(ValueError, bad_map)
+
+ @classmethod
+ def _test_traceback(cls):
+ raise RuntimeError(123) # some comment
+
+ def test_traceback(self):
+ # We want ensure that the traceback from the child process is
+ # contained in the traceback raised in the main process.
+ future = self.executor.submit(self._test_traceback)
+ with self.assertRaises(Exception) as cm:
+ future.result()
+
+ exc = cm.exception
+ self.assertIs(type(exc), RuntimeError)
+ self.assertEqual(exc.args, (123,))
+ cause = exc.__cause__
+ self.assertIs(type(cause), futures.process._RemoteTraceback)
+ self.assertIn('raise RuntimeError(123) # some comment', cause.tb)
+
+ with test.support.captured_stderr() as f1:
+ try:
+ raise exc
+ except RuntimeError:
+ sys.excepthook(*sys.exc_info())
+ self.assertIn('raise RuntimeError(123) # some comment',
+ f1.getvalue())
+
class FutureTests(unittest.TestCase):
def test_done_callback_with_result(self):
@@ -621,7 +676,7 @@ class FutureTests(unittest.TestCase):
self.assertEqual(SUCCESSFUL_FUTURE.result(timeout=0), 42)
def test_result_with_success(self):
- # TODO(brian@sweetapp.com): This test is timing dependant.
+ # TODO(brian@sweetapp.com): This test is timing dependent.
def notification():
# Wait until the main thread is waiting for the result.
time.sleep(1)
@@ -634,7 +689,7 @@ class FutureTests(unittest.TestCase):
self.assertEqual(f1.result(timeout=5), 42)
def test_result_with_cancel(self):
- # TODO(brian@sweetapp.com): This test is timing dependant.
+ # TODO(brian@sweetapp.com): This test is timing dependent.
def notification():
# Wait until the main thread is waiting for the result.
time.sleep(1)
diff --git a/Lib/test/test_configparser.py b/Lib/test/test_configparser.py
index 3b035004cd..71a8f3f8d9 100644
--- a/Lib/test/test_configparser.py
+++ b/Lib/test/test_configparser.py
@@ -579,7 +579,7 @@ boolean {0[0]} NO
return e
else:
self.fail("expected exception type %s.%s"
- % (exc.__module__, exc.__name__))
+ % (exc.__module__, exc.__qualname__))
def test_boolean(self):
cf = self.fromstring(
@@ -1585,6 +1585,34 @@ class CoverageOneHundredTestCase(unittest.TestCase):
""")
self.assertEqual(repr(parser['section']), '<Section: section>')
+ def test_inconsistent_converters_state(self):
+ parser = configparser.ConfigParser()
+ import decimal
+ parser.converters['decimal'] = decimal.Decimal
+ parser.read_string("""
+ [s1]
+ one = 1
+ [s2]
+ two = 2
+ """)
+ self.assertIn('decimal', parser.converters)
+ self.assertEqual(parser.getdecimal('s1', 'one'), 1)
+ self.assertEqual(parser.getdecimal('s2', 'two'), 2)
+ self.assertEqual(parser['s1'].getdecimal('one'), 1)
+ self.assertEqual(parser['s2'].getdecimal('two'), 2)
+ del parser.getdecimal
+ with self.assertRaises(AttributeError):
+ parser.getdecimal('s1', 'one')
+ self.assertIn('decimal', parser.converters)
+ del parser.converters['decimal']
+ self.assertNotIn('decimal', parser.converters)
+ with self.assertRaises(AttributeError):
+ parser.getdecimal('s1', 'one')
+ with self.assertRaises(AttributeError):
+ parser['s1'].getdecimal('one')
+ with self.assertRaises(AttributeError):
+ parser['s2'].getdecimal('two')
+
class ExceptionPicklingTestCase(unittest.TestCase):
"""Tests for issue #13760: ConfigParser exceptions are not picklable."""
@@ -1777,5 +1805,252 @@ class InlineCommentStrippingTestCase(unittest.TestCase):
self.assertEqual(s['k3'], 'v3;#//still v3# and still v3')
+class ExceptionContextTestCase(unittest.TestCase):
+ """ Test that implementation details doesn't leak
+ through raising exceptions. """
+
+ def test_get_basic_interpolation(self):
+ parser = configparser.ConfigParser()
+ parser.read_string("""
+ [Paths]
+ home_dir: /Users
+ my_dir: %(home_dir1)s/lumberjack
+ my_pictures: %(my_dir)s/Pictures
+ """)
+ cm = self.assertRaises(configparser.InterpolationMissingOptionError)
+ with cm:
+ parser.get('Paths', 'my_dir')
+ self.assertIs(cm.exception.__suppress_context__, True)
+
+ def test_get_extended_interpolation(self):
+ parser = configparser.ConfigParser(
+ interpolation=configparser.ExtendedInterpolation())
+ parser.read_string("""
+ [Paths]
+ home_dir: /Users
+ my_dir: ${home_dir1}/lumberjack
+ my_pictures: ${my_dir}/Pictures
+ """)
+ cm = self.assertRaises(configparser.InterpolationMissingOptionError)
+ with cm:
+ parser.get('Paths', 'my_dir')
+ self.assertIs(cm.exception.__suppress_context__, True)
+
+ def test_missing_options(self):
+ parser = configparser.ConfigParser()
+ parser.read_string("""
+ [Paths]
+ home_dir: /Users
+ """)
+ with self.assertRaises(configparser.NoSectionError) as cm:
+ parser.options('test')
+ self.assertIs(cm.exception.__suppress_context__, True)
+
+ def test_missing_section(self):
+ config = configparser.ConfigParser()
+ with self.assertRaises(configparser.NoSectionError) as cm:
+ config.set('Section1', 'an_int', '15')
+ self.assertIs(cm.exception.__suppress_context__, True)
+
+ def test_remove_option(self):
+ config = configparser.ConfigParser()
+ with self.assertRaises(configparser.NoSectionError) as cm:
+ config.remove_option('Section1', 'an_int')
+ self.assertIs(cm.exception.__suppress_context__, True)
+
+
+class ConvertersTestCase(BasicTestCase, unittest.TestCase):
+ """Introduced in 3.5, issue #18159."""
+
+ config_class = configparser.ConfigParser
+
+ def newconfig(self, defaults=None):
+ instance = super().newconfig(defaults=defaults)
+ instance.converters['list'] = lambda v: [e.strip() for e in v.split()
+ if e.strip()]
+ return instance
+
+ def test_converters(self):
+ cfg = self.newconfig()
+ self.assertIn('boolean', cfg.converters)
+ self.assertIn('list', cfg.converters)
+ self.assertIsNone(cfg.converters['int'])
+ self.assertIsNone(cfg.converters['float'])
+ self.assertIsNone(cfg.converters['boolean'])
+ self.assertIsNotNone(cfg.converters['list'])
+ self.assertEqual(len(cfg.converters), 4)
+ with self.assertRaises(ValueError):
+ cfg.converters[''] = lambda v: v
+ with self.assertRaises(ValueError):
+ cfg.converters[None] = lambda v: v
+ cfg.read_string("""
+ [s]
+ str = string
+ int = 1
+ float = 0.5
+ list = a b c d e f g
+ bool = yes
+ """)
+ s = cfg['s']
+ self.assertEqual(s['str'], 'string')
+ self.assertEqual(s['int'], '1')
+ self.assertEqual(s['float'], '0.5')
+ self.assertEqual(s['list'], 'a b c d e f g')
+ self.assertEqual(s['bool'], 'yes')
+ self.assertEqual(cfg.get('s', 'str'), 'string')
+ self.assertEqual(cfg.get('s', 'int'), '1')
+ self.assertEqual(cfg.get('s', 'float'), '0.5')
+ self.assertEqual(cfg.get('s', 'list'), 'a b c d e f g')
+ self.assertEqual(cfg.get('s', 'bool'), 'yes')
+ self.assertEqual(cfg.get('s', 'str'), 'string')
+ self.assertEqual(cfg.getint('s', 'int'), 1)
+ self.assertEqual(cfg.getfloat('s', 'float'), 0.5)
+ self.assertEqual(cfg.getlist('s', 'list'), ['a', 'b', 'c', 'd',
+ 'e', 'f', 'g'])
+ self.assertEqual(cfg.getboolean('s', 'bool'), True)
+ self.assertEqual(s.get('str'), 'string')
+ self.assertEqual(s.getint('int'), 1)
+ self.assertEqual(s.getfloat('float'), 0.5)
+ self.assertEqual(s.getlist('list'), ['a', 'b', 'c', 'd',
+ 'e', 'f', 'g'])
+ self.assertEqual(s.getboolean('bool'), True)
+ with self.assertRaises(AttributeError):
+ cfg.getdecimal('s', 'float')
+ with self.assertRaises(AttributeError):
+ s.getdecimal('float')
+ import decimal
+ cfg.converters['decimal'] = decimal.Decimal
+ self.assertIn('decimal', cfg.converters)
+ self.assertIsNotNone(cfg.converters['decimal'])
+ self.assertEqual(len(cfg.converters), 5)
+ dec0_5 = decimal.Decimal('0.5')
+ self.assertEqual(cfg.getdecimal('s', 'float'), dec0_5)
+ self.assertEqual(s.getdecimal('float'), dec0_5)
+ del cfg.converters['decimal']
+ self.assertNotIn('decimal', cfg.converters)
+ self.assertEqual(len(cfg.converters), 4)
+ with self.assertRaises(AttributeError):
+ cfg.getdecimal('s', 'float')
+ with self.assertRaises(AttributeError):
+ s.getdecimal('float')
+ with self.assertRaises(KeyError):
+ del cfg.converters['decimal']
+ with self.assertRaises(KeyError):
+ del cfg.converters['']
+ with self.assertRaises(KeyError):
+ del cfg.converters[None]
+
+
+class BlatantOverrideConvertersTestCase(unittest.TestCase):
+ """What if somebody overrode a getboolean()? We want to make sure that in
+ this case the automatic converters do not kick in."""
+
+ config = """
+ [one]
+ one = false
+ two = false
+ three = long story short
+
+ [two]
+ one = false
+ two = false
+ three = four
+ """
+
+ def test_converters_at_init(self):
+ cfg = configparser.ConfigParser(converters={'len': len})
+ cfg.read_string(self.config)
+ self._test_len(cfg)
+ self.assertIsNotNone(cfg.converters['len'])
+
+ def test_inheritance(self):
+ class StrangeConfigParser(configparser.ConfigParser):
+ gettysburg = 'a historic borough in south central Pennsylvania'
+
+ def getboolean(self, section, option, *, raw=False, vars=None,
+ fallback=configparser._UNSET):
+ if section == option:
+ return True
+ return super().getboolean(section, option, raw=raw, vars=vars,
+ fallback=fallback)
+ def getlen(self, section, option, *, raw=False, vars=None,
+ fallback=configparser._UNSET):
+ return self._get_conv(section, option, len, raw=raw, vars=vars,
+ fallback=fallback)
+
+ cfg = StrangeConfigParser()
+ cfg.read_string(self.config)
+ self._test_len(cfg)
+ self.assertIsNone(cfg.converters['len'])
+ self.assertTrue(cfg.getboolean('one', 'one'))
+ self.assertTrue(cfg.getboolean('two', 'two'))
+ self.assertFalse(cfg.getboolean('one', 'two'))
+ self.assertFalse(cfg.getboolean('two', 'one'))
+ cfg.converters['boolean'] = cfg._convert_to_boolean
+ self.assertFalse(cfg.getboolean('one', 'one'))
+ self.assertFalse(cfg.getboolean('two', 'two'))
+ self.assertFalse(cfg.getboolean('one', 'two'))
+ self.assertFalse(cfg.getboolean('two', 'one'))
+
+ def _test_len(self, cfg):
+ self.assertEqual(len(cfg.converters), 4)
+ self.assertIn('boolean', cfg.converters)
+ self.assertIn('len', cfg.converters)
+ self.assertNotIn('tysburg', cfg.converters)
+ self.assertIsNone(cfg.converters['int'])
+ self.assertIsNone(cfg.converters['float'])
+ self.assertIsNone(cfg.converters['boolean'])
+ self.assertEqual(cfg.getlen('one', 'one'), 5)
+ self.assertEqual(cfg.getlen('one', 'two'), 5)
+ self.assertEqual(cfg.getlen('one', 'three'), 16)
+ self.assertEqual(cfg.getlen('two', 'one'), 5)
+ self.assertEqual(cfg.getlen('two', 'two'), 5)
+ self.assertEqual(cfg.getlen('two', 'three'), 4)
+ self.assertEqual(cfg.getlen('two', 'four', fallback=0), 0)
+ with self.assertRaises(configparser.NoOptionError):
+ cfg.getlen('two', 'four')
+ self.assertEqual(cfg['one'].getlen('one'), 5)
+ self.assertEqual(cfg['one'].getlen('two'), 5)
+ self.assertEqual(cfg['one'].getlen('three'), 16)
+ self.assertEqual(cfg['two'].getlen('one'), 5)
+ self.assertEqual(cfg['two'].getlen('two'), 5)
+ self.assertEqual(cfg['two'].getlen('three'), 4)
+ self.assertEqual(cfg['two'].getlen('four', 0), 0)
+ self.assertEqual(cfg['two'].getlen('four'), None)
+
+ def test_instance_assignment(self):
+ cfg = configparser.ConfigParser()
+ cfg.getboolean = lambda section, option: True
+ cfg.getlen = lambda section, option: len(cfg[section][option])
+ cfg.read_string(self.config)
+ self.assertEqual(len(cfg.converters), 3)
+ self.assertIn('boolean', cfg.converters)
+ self.assertNotIn('len', cfg.converters)
+ self.assertIsNone(cfg.converters['int'])
+ self.assertIsNone(cfg.converters['float'])
+ self.assertIsNone(cfg.converters['boolean'])
+ self.assertTrue(cfg.getboolean('one', 'one'))
+ self.assertTrue(cfg.getboolean('two', 'two'))
+ self.assertTrue(cfg.getboolean('one', 'two'))
+ self.assertTrue(cfg.getboolean('two', 'one'))
+ cfg.converters['boolean'] = cfg._convert_to_boolean
+ self.assertFalse(cfg.getboolean('one', 'one'))
+ self.assertFalse(cfg.getboolean('two', 'two'))
+ self.assertFalse(cfg.getboolean('one', 'two'))
+ self.assertFalse(cfg.getboolean('two', 'one'))
+ self.assertEqual(cfg.getlen('one', 'one'), 5)
+ self.assertEqual(cfg.getlen('one', 'two'), 5)
+ self.assertEqual(cfg.getlen('one', 'three'), 16)
+ self.assertEqual(cfg.getlen('two', 'one'), 5)
+ self.assertEqual(cfg.getlen('two', 'two'), 5)
+ self.assertEqual(cfg.getlen('two', 'three'), 4)
+ # If a getter impl is assigned straight to the instance, it won't
+ # be available on the section proxies.
+ with self.assertRaises(AttributeError):
+ self.assertEqual(cfg['one'].getlen('one'), 5)
+ with self.assertRaises(AttributeError):
+ self.assertEqual(cfg['two'].getlen('one'), 5)
+
+
if __name__ == '__main__':
unittest.main()
diff --git a/Lib/test/test_contains.py b/Lib/test/test_contains.py
index a667a16d8c..3c6bdeffda 100644
--- a/Lib/test/test_contains.py
+++ b/Lib/test/test_contains.py
@@ -1,5 +1,4 @@
from collections import deque
-from test.support import run_unittest
import unittest
@@ -86,8 +85,5 @@ class TestContains(unittest.TestCase):
self.assertTrue(container == container)
-def test_main():
- run_unittest(TestContains)
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_contextlib.py b/Lib/test/test_contextlib.py
index 2669651fba..30a6377bed 100644
--- a/Lib/test/test_contextlib.py
+++ b/Lib/test/test_contextlib.py
@@ -83,6 +83,42 @@ class ContextManagerTestCase(unittest.TestCase):
raise ZeroDivisionError(999)
self.assertEqual(state, [1, 42, 999])
+ def test_contextmanager_except_stopiter(self):
+ stop_exc = StopIteration('spam')
+ @contextmanager
+ def woohoo():
+ yield
+ try:
+ with self.assertWarnsRegex(PendingDeprecationWarning,
+ "StopIteration"):
+ with woohoo():
+ raise stop_exc
+ except Exception as ex:
+ self.assertIs(ex, stop_exc)
+ else:
+ self.fail('StopIteration was suppressed')
+
+ def test_contextmanager_except_pep479(self):
+ code = """\
+from __future__ import generator_stop
+from contextlib import contextmanager
+@contextmanager
+def woohoo():
+ yield
+"""
+ locals = {}
+ exec(code, locals, locals)
+ woohoo = locals['woohoo']
+
+ stop_exc = StopIteration('spam')
+ try:
+ with woohoo():
+ raise stop_exc
+ except Exception as ex:
+ self.assertIs(ex, stop_exc)
+ else:
+ self.fail('StopIteration was suppressed')
+
def _create_contextmanager_attribs(self):
def attribs(**kw):
def decorate(func):
@@ -726,60 +762,76 @@ class TestExitStack(unittest.TestCase):
stack.push(cm)
self.assertIs(stack._exit_callbacks[-1], cm)
-class TestRedirectStdout(unittest.TestCase):
+
+class TestRedirectStream:
+
+ redirect_stream = None
+ orig_stream = None
@support.requires_docstrings
def test_instance_docs(self):
# Issue 19330: ensure context manager instances have good docstrings
- cm_docstring = redirect_stdout.__doc__
- obj = redirect_stdout(None)
+ cm_docstring = self.redirect_stream.__doc__
+ obj = self.redirect_stream(None)
self.assertEqual(obj.__doc__, cm_docstring)
def test_no_redirect_in_init(self):
- orig_stdout = sys.stdout
- redirect_stdout(None)
- self.assertIs(sys.stdout, orig_stdout)
+ orig_stdout = getattr(sys, self.orig_stream)
+ self.redirect_stream(None)
+ self.assertIs(getattr(sys, self.orig_stream), orig_stdout)
def test_redirect_to_string_io(self):
f = io.StringIO()
msg = "Consider an API like help(), which prints directly to stdout"
- orig_stdout = sys.stdout
- with redirect_stdout(f):
- print(msg)
- self.assertIs(sys.stdout, orig_stdout)
+ orig_stdout = getattr(sys, self.orig_stream)
+ with self.redirect_stream(f):
+ print(msg, file=getattr(sys, self.orig_stream))
+ self.assertIs(getattr(sys, self.orig_stream), orig_stdout)
s = f.getvalue().strip()
self.assertEqual(s, msg)
def test_enter_result_is_target(self):
f = io.StringIO()
- with redirect_stdout(f) as enter_result:
+ with self.redirect_stream(f) as enter_result:
self.assertIs(enter_result, f)
def test_cm_is_reusable(self):
f = io.StringIO()
- write_to_f = redirect_stdout(f)
- orig_stdout = sys.stdout
+ write_to_f = self.redirect_stream(f)
+ orig_stdout = getattr(sys, self.orig_stream)
with write_to_f:
- print("Hello", end=" ")
+ print("Hello", end=" ", file=getattr(sys, self.orig_stream))
with write_to_f:
- print("World!")
- self.assertIs(sys.stdout, orig_stdout)
+ print("World!", file=getattr(sys, self.orig_stream))
+ self.assertIs(getattr(sys, self.orig_stream), orig_stdout)
s = f.getvalue()
self.assertEqual(s, "Hello World!\n")
def test_cm_is_reentrant(self):
f = io.StringIO()
- write_to_f = redirect_stdout(f)
- orig_stdout = sys.stdout
+ write_to_f = self.redirect_stream(f)
+ orig_stdout = getattr(sys, self.orig_stream)
with write_to_f:
- print("Hello", end=" ")
+ print("Hello", end=" ", file=getattr(sys, self.orig_stream))
with write_to_f:
- print("World!")
- self.assertIs(sys.stdout, orig_stdout)
+ print("World!", file=getattr(sys, self.orig_stream))
+ self.assertIs(getattr(sys, self.orig_stream), orig_stdout)
s = f.getvalue()
self.assertEqual(s, "Hello World!\n")
+class TestRedirectStdout(TestRedirectStream, unittest.TestCase):
+
+ redirect_stream = redirect_stdout
+ orig_stream = "stdout"
+
+
+class TestRedirectStderr(TestRedirectStream, unittest.TestCase):
+
+ redirect_stream = redirect_stderr
+ orig_stream = "stderr"
+
+
class TestSuppress(unittest.TestCase):
@support.requires_docstrings
diff --git a/Lib/test/test_copy.py b/Lib/test/test_copy.py
index 0c5354c65c..0e1f670bf0 100644
--- a/Lib/test/test_copy.py
+++ b/Lib/test/test_copy.py
@@ -7,7 +7,6 @@ import abc
from operator import le, lt, ge, gt, eq, ne
import unittest
-from test import support
order_comparisons = le, lt, ge, gt
equality_comparisons = eq, ne
@@ -96,24 +95,67 @@ class TestCopy(unittest.TestCase):
pass
class WithMetaclass(metaclass=abc.ABCMeta):
pass
- tests = [None, 42, 2**100, 3.14, True, False, 1j,
+ tests = [None, ..., NotImplemented,
+ 42, 2**100, 3.14, True, False, 1j,
"hello", "hello\u1234", f.__code__,
- b"world", bytes(range(256)),
- NewStyle, range(10), Classic, max, WithMetaclass]
+ b"world", bytes(range(256)), range(10),
+ NewStyle, Classic, max, WithMetaclass]
for x in tests:
self.assertIs(copy.copy(x), x)
def test_copy_list(self):
x = [1, 2, 3]
- self.assertEqual(copy.copy(x), x)
+ y = copy.copy(x)
+ self.assertEqual(y, x)
+ self.assertIsNot(y, x)
+ x = []
+ y = copy.copy(x)
+ self.assertEqual(y, x)
+ self.assertIsNot(y, x)
def test_copy_tuple(self):
x = (1, 2, 3)
- self.assertEqual(copy.copy(x), x)
+ self.assertIs(copy.copy(x), x)
+ x = ()
+ self.assertIs(copy.copy(x), x)
+ x = (1, 2, 3, [])
+ self.assertIs(copy.copy(x), x)
def test_copy_dict(self):
x = {"foo": 1, "bar": 2}
- self.assertEqual(copy.copy(x), x)
+ y = copy.copy(x)
+ self.assertEqual(y, x)
+ self.assertIsNot(y, x)
+ x = {}
+ y = copy.copy(x)
+ self.assertEqual(y, x)
+ self.assertIsNot(y, x)
+
+ def test_copy_set(self):
+ x = {1, 2, 3}
+ y = copy.copy(x)
+ self.assertEqual(y, x)
+ self.assertIsNot(y, x)
+ x = set()
+ y = copy.copy(x)
+ self.assertEqual(y, x)
+ self.assertIsNot(y, x)
+
+ def test_copy_frozenset(self):
+ x = frozenset({1, 2, 3})
+ self.assertIs(copy.copy(x), x)
+ x = frozenset()
+ self.assertIs(copy.copy(x), x)
+
+ def test_copy_bytearray(self):
+ x = bytearray(b'abc')
+ y = copy.copy(x)
+ self.assertEqual(y, x)
+ self.assertIsNot(y, x)
+ x = bytearray()
+ y = copy.copy(x)
+ self.assertEqual(y, x)
+ self.assertIsNot(y, x)
def test_copy_inst_vanilla(self):
class C:
@@ -146,6 +188,40 @@ class TestCopy(unittest.TestCase):
x = C(42)
self.assertEqual(copy.copy(x), x)
+ def test_copy_inst_getnewargs(self):
+ class C(int):
+ def __new__(cls, foo):
+ self = int.__new__(cls)
+ self.foo = foo
+ return self
+ def __getnewargs__(self):
+ return self.foo,
+ def __eq__(self, other):
+ return self.foo == other.foo
+ x = C(42)
+ y = copy.copy(x)
+ self.assertIsInstance(y, C)
+ self.assertEqual(y, x)
+ self.assertIsNot(y, x)
+ self.assertEqual(y.foo, x.foo)
+
+ def test_copy_inst_getnewargs_ex(self):
+ class C(int):
+ def __new__(cls, *, foo):
+ self = int.__new__(cls)
+ self.foo = foo
+ return self
+ def __getnewargs_ex__(self):
+ return (), {'foo': self.foo}
+ def __eq__(self, other):
+ return self.foo == other.foo
+ x = C(foo=42)
+ y = copy.copy(x)
+ self.assertIsInstance(y, C)
+ self.assertEqual(y, x)
+ self.assertIsNot(y, x)
+ self.assertEqual(y.foo, x.foo)
+
def test_copy_inst_getstate(self):
class C:
def __init__(self, foo):
@@ -281,7 +357,7 @@ class TestCopy(unittest.TestCase):
pass
tests = [None, 42, 2**100, 3.14, True, False, 1j,
"hello", "hello\u1234", f.__code__,
- NewStyle, range(10), Classic, max]
+ NewStyle, Classic, max]
for x in tests:
self.assertIs(copy.deepcopy(x), x)
@@ -297,7 +373,7 @@ class TestCopy(unittest.TestCase):
x.append(x)
y = copy.deepcopy(x)
for op in comparisons:
- self.assertRaises(RuntimeError, op, y, x)
+ self.assertRaises(RecursionError, op, y, x)
self.assertIsNot(y, x)
self.assertIs(y[0], y)
self.assertEqual(len(y), 1)
@@ -324,7 +400,7 @@ class TestCopy(unittest.TestCase):
x[0].append(x)
y = copy.deepcopy(x)
for op in comparisons:
- self.assertRaises(RuntimeError, op, y, x)
+ self.assertRaises(RecursionError, op, y, x)
self.assertIsNot(y, x)
self.assertIsNot(y[0], x[0])
self.assertIs(y[0][0], y)
@@ -343,7 +419,7 @@ class TestCopy(unittest.TestCase):
for op in order_comparisons:
self.assertRaises(TypeError, op, y, x)
for op in equality_comparisons:
- self.assertRaises(RuntimeError, op, y, x)
+ self.assertRaises(RecursionError, op, y, x)
self.assertIsNot(y, x)
self.assertIs(y['foo'], y)
self.assertEqual(len(y), 1)
@@ -408,6 +484,42 @@ class TestCopy(unittest.TestCase):
self.assertIsNot(y, x)
self.assertIsNot(y.foo, x.foo)
+ def test_deepcopy_inst_getnewargs(self):
+ class C(int):
+ def __new__(cls, foo):
+ self = int.__new__(cls)
+ self.foo = foo
+ return self
+ def __getnewargs__(self):
+ return self.foo,
+ def __eq__(self, other):
+ return self.foo == other.foo
+ x = C([42])
+ y = copy.deepcopy(x)
+ self.assertIsInstance(y, C)
+ self.assertEqual(y, x)
+ self.assertIsNot(y, x)
+ self.assertEqual(y.foo, x.foo)
+ self.assertIsNot(y.foo, x.foo)
+
+ def test_deepcopy_inst_getnewargs_ex(self):
+ class C(int):
+ def __new__(cls, *, foo):
+ self = int.__new__(cls)
+ self.foo = foo
+ return self
+ def __getnewargs_ex__(self):
+ return (), {'foo': self.foo}
+ def __eq__(self, other):
+ return self.foo == other.foo
+ x = C(foo=[42])
+ y = copy.deepcopy(x)
+ self.assertIsInstance(y, C)
+ self.assertEqual(y, x)
+ self.assertIsNot(y, x)
+ self.assertEqual(y.foo, x.foo)
+ self.assertIsNot(y.foo, x.foo)
+
def test_deepcopy_inst_getstate(self):
class C:
def __init__(self, foo):
@@ -467,6 +579,17 @@ class TestCopy(unittest.TestCase):
self.assertIsNot(y, x)
self.assertIs(y.foo, y)
+ def test_deepcopy_range(self):
+ class I(int):
+ pass
+ x = range(I(10))
+ y = copy.deepcopy(x)
+ self.assertIsNot(y, x)
+ self.assertEqual(y, x)
+ self.assertIsNot(y.stop, x.stop)
+ self.assertEqual(y.stop, x.stop)
+ self.assertIsInstance(y.stop, I)
+
# _reconstruct()
def test_reconstruct_string(self):
@@ -761,8 +884,5 @@ class TestCopy(unittest.TestCase):
def global_foo(x, y): return x+y
-def test_main():
- support.run_unittest(TestCopy)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_copyreg.py b/Lib/test/test_copyreg.py
index abe0748f85..52e887cb36 100644
--- a/Lib/test/test_copyreg.py
+++ b/Lib/test/test_copyreg.py
@@ -1,7 +1,6 @@
import copyreg
import unittest
-from test import support
from test.pickletester import ExtensionSaver
class C:
@@ -113,9 +112,5 @@ class CopyRegTestCase(unittest.TestCase):
self.assertEqual(result, expected)
-def test_main():
- support.run_unittest(CopyRegTestCase)
-
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_coroutines.py b/Lib/test/test_coroutines.py
new file mode 100644
index 0000000000..4f725aeab2
--- /dev/null
+++ b/Lib/test/test_coroutines.py
@@ -0,0 +1,1720 @@
+import contextlib
+import copy
+import inspect
+import pickle
+import sys
+import types
+import unittest
+import warnings
+from test import support
+
+
+class AsyncYieldFrom:
+ def __init__(self, obj):
+ self.obj = obj
+
+ def __await__(self):
+ yield from self.obj
+
+
+class AsyncYield:
+ def __init__(self, value):
+ self.value = value
+
+ def __await__(self):
+ yield self.value
+
+
+def run_async(coro):
+ assert coro.__class__ in {types.GeneratorType, types.CoroutineType}
+
+ buffer = []
+ result = None
+ while True:
+ try:
+ buffer.append(coro.send(None))
+ except StopIteration as ex:
+ result = ex.args[0] if ex.args else None
+ break
+ return buffer, result
+
+
+def run_async__await__(coro):
+ assert coro.__class__ is types.CoroutineType
+ aw = coro.__await__()
+ buffer = []
+ result = None
+ i = 0
+ while True:
+ try:
+ if i % 2:
+ buffer.append(next(aw))
+ else:
+ buffer.append(aw.send(None))
+ i += 1
+ except StopIteration as ex:
+ result = ex.args[0] if ex.args else None
+ break
+ return buffer, result
+
+
+@contextlib.contextmanager
+def silence_coro_gc():
+ with warnings.catch_warnings():
+ warnings.simplefilter("ignore")
+ yield
+ support.gc_collect()
+
+
+class AsyncBadSyntaxTest(unittest.TestCase):
+
+ def test_badsyntax_1(self):
+ with self.assertRaisesRegex(SyntaxError, "'await' outside"):
+ import test.badsyntax_async1
+
+ def test_badsyntax_2(self):
+ with self.assertRaisesRegex(SyntaxError, "'await' outside"):
+ import test.badsyntax_async2
+
+ def test_badsyntax_3(self):
+ with self.assertRaisesRegex(SyntaxError, 'invalid syntax'):
+ import test.badsyntax_async3
+
+ def test_badsyntax_4(self):
+ with self.assertRaisesRegex(SyntaxError, 'invalid syntax'):
+ import test.badsyntax_async4
+
+ def test_badsyntax_5(self):
+ with self.assertRaisesRegex(SyntaxError, 'invalid syntax'):
+ import test.badsyntax_async5
+
+ def test_badsyntax_6(self):
+ with self.assertRaisesRegex(
+ SyntaxError, "'yield' inside async function"):
+
+ import test.badsyntax_async6
+
+ def test_badsyntax_7(self):
+ with self.assertRaisesRegex(
+ SyntaxError, "'yield from' inside async function"):
+
+ import test.badsyntax_async7
+
+ def test_badsyntax_8(self):
+ with self.assertRaisesRegex(SyntaxError, 'invalid syntax'):
+ import test.badsyntax_async8
+
+ def test_badsyntax_9(self):
+ ns = {}
+ for comp in {'(await a for a in b)',
+ '[await a for a in b]',
+ '{await a for a in b}',
+ '{await a: c for a in b}'}:
+
+ with self.assertRaisesRegex(SyntaxError, 'await.*in comprehen'):
+ exec('async def f():\n\t{}'.format(comp), ns, ns)
+
+ def test_badsyntax_10(self):
+ # Tests for issue 24619
+
+ samples = [
+ """async def foo():
+ def bar(): pass
+ await = 1
+ """,
+
+ """async def foo():
+
+ def bar(): pass
+ await = 1
+ """,
+
+ """async def foo():
+ def bar(): pass
+ if 1:
+ await = 1
+ """,
+
+ """def foo():
+ async def bar(): pass
+ if 1:
+ await a
+ """,
+
+ """def foo():
+ async def bar(): pass
+ await a
+ """,
+
+ """def foo():
+ def baz(): pass
+ async def bar(): pass
+ await a
+ """,
+
+ """def foo():
+ def baz(): pass
+ # 456
+ async def bar(): pass
+ # 123
+ await a
+ """,
+
+ """async def foo():
+ def baz(): pass
+ # 456
+ async def bar(): pass
+ # 123
+ await = 2
+ """,
+
+ """def foo():
+
+ def baz(): pass
+
+ async def bar(): pass
+
+ await a
+ """,
+
+ """async def foo():
+
+ def baz(): pass
+
+ async def bar(): pass
+
+ await = 2
+ """,
+
+ """async def foo():
+ def async(): pass
+ """,
+
+ """async def foo():
+ def await(): pass
+ """,
+
+ """async def foo():
+ def bar():
+ await
+ """,
+
+ """async def foo():
+ return lambda async: await
+ """,
+
+ """async def foo():
+ return lambda a: await
+ """,
+
+ """await a()""",
+
+ """async def foo(a=await b):
+ pass
+ """,
+
+ """async def foo(a:await b):
+ pass
+ """,
+
+ """def baz():
+ async def foo(a=await b):
+ pass
+ """,
+
+ """async def foo(async):
+ pass
+ """,
+
+ """async def foo():
+ def bar():
+ def baz():
+ async = 1
+ """,
+
+ """async def foo():
+ def bar():
+ def baz():
+ pass
+ async = 1
+ """,
+
+ """def foo():
+ async def bar():
+
+ async def baz():
+ pass
+
+ def baz():
+ 42
+
+ async = 1
+ """,
+
+ """async def foo():
+ def bar():
+ def baz():
+ pass\nawait foo()
+ """,
+
+ """def foo():
+ def bar():
+ async def baz():
+ pass\nawait foo()
+ """,
+
+ """async def foo(await):
+ pass
+ """,
+
+ """def foo():
+
+ async def bar(): pass
+
+ await a
+ """,
+
+ """def foo():
+ async def bar():
+ pass\nawait a
+ """]
+
+ for code in samples:
+ with self.subTest(code=code), self.assertRaises(SyntaxError):
+ compile(code, "<test>", "exec")
+
+ def test_goodsyntax_1(self):
+ # Tests for issue 24619
+
+ def foo(await):
+ async def foo(): pass
+ async def foo():
+ pass
+ return await + 1
+ self.assertEqual(foo(10), 11)
+
+ def foo(await):
+ async def foo(): pass
+ async def foo(): pass
+ return await + 2
+ self.assertEqual(foo(20), 22)
+
+ def foo(await):
+
+ async def foo(): pass
+
+ async def foo(): pass
+
+ return await + 2
+ self.assertEqual(foo(20), 22)
+
+ def foo(await):
+ """spam"""
+ async def foo(): \
+ pass
+ # 123
+ async def foo(): pass
+ # 456
+ return await + 2
+ self.assertEqual(foo(20), 22)
+
+ def foo(await):
+ def foo(): pass
+ def foo(): pass
+ async def bar(): return await_
+ await_ = await
+ try:
+ bar().send(None)
+ except StopIteration as ex:
+ return ex.args[0]
+ self.assertEqual(foo(42), 42)
+
+ async def f():
+ async def g(): pass
+ await z
+ await = 1
+ self.assertTrue(inspect.iscoroutinefunction(f))
+
+
+class TokenizerRegrTest(unittest.TestCase):
+
+ def test_oneline_defs(self):
+ buf = []
+ for i in range(500):
+ buf.append('def i{i}(): return {i}'.format(i=i))
+ buf = '\n'.join(buf)
+
+ # Test that 500 consequent, one-line defs is OK
+ ns = {}
+ exec(buf, ns, ns)
+ self.assertEqual(ns['i499'](), 499)
+
+ # Test that 500 consequent, one-line defs *and*
+ # one 'async def' following them is OK
+ buf += '\nasync def foo():\n return'
+ ns = {}
+ exec(buf, ns, ns)
+ self.assertEqual(ns['i499'](), 499)
+ self.assertTrue(inspect.iscoroutinefunction(ns['foo']))
+
+
+class CoroutineTest(unittest.TestCase):
+
+ def test_gen_1(self):
+ def gen(): yield
+ self.assertFalse(hasattr(gen, '__await__'))
+
+ def test_func_1(self):
+ async def foo():
+ return 10
+
+ f = foo()
+ self.assertIsInstance(f, types.CoroutineType)
+ self.assertTrue(bool(foo.__code__.co_flags & inspect.CO_COROUTINE))
+ self.assertFalse(bool(foo.__code__.co_flags & inspect.CO_GENERATOR))
+ self.assertTrue(bool(f.cr_code.co_flags & inspect.CO_COROUTINE))
+ self.assertFalse(bool(f.cr_code.co_flags & inspect.CO_GENERATOR))
+ self.assertEqual(run_async(f), ([], 10))
+
+ self.assertEqual(run_async__await__(foo()), ([], 10))
+
+ def bar(): pass
+ self.assertFalse(bool(bar.__code__.co_flags & inspect.CO_COROUTINE))
+
+ def test_func_2(self):
+ async def foo():
+ raise StopIteration
+
+ with self.assertRaisesRegex(
+ RuntimeError, "coroutine raised StopIteration"):
+
+ run_async(foo())
+
+ def test_func_3(self):
+ async def foo():
+ raise StopIteration
+
+ with silence_coro_gc():
+ self.assertRegex(repr(foo()), '^<coroutine object.* at 0x.*>$')
+
+ def test_func_4(self):
+ async def foo():
+ raise StopIteration
+
+ check = lambda: self.assertRaisesRegex(
+ TypeError, "'coroutine' object is not iterable")
+
+ with check():
+ list(foo())
+
+ with check():
+ tuple(foo())
+
+ with check():
+ sum(foo())
+
+ with check():
+ iter(foo())
+
+ with silence_coro_gc(), check():
+ for i in foo():
+ pass
+
+ with silence_coro_gc(), check():
+ [i for i in foo()]
+
+ def test_func_5(self):
+ @types.coroutine
+ def bar():
+ yield 1
+
+ async def foo():
+ await bar()
+
+ check = lambda: self.assertRaisesRegex(
+ TypeError, "'coroutine' object is not iterable")
+
+ with check():
+ for el in foo(): pass
+
+ # the following should pass without an error
+ for el in bar():
+ self.assertEqual(el, 1)
+ self.assertEqual([el for el in bar()], [1])
+ self.assertEqual(tuple(bar()), (1,))
+ self.assertEqual(next(iter(bar())), 1)
+
+ def test_func_6(self):
+ @types.coroutine
+ def bar():
+ yield 1
+ yield 2
+
+ async def foo():
+ await bar()
+
+ f = foo()
+ self.assertEqual(f.send(None), 1)
+ self.assertEqual(f.send(None), 2)
+ with self.assertRaises(StopIteration):
+ f.send(None)
+
+ def test_func_7(self):
+ async def bar():
+ return 10
+
+ def foo():
+ yield from bar()
+
+ with silence_coro_gc(), self.assertRaisesRegex(
+ TypeError,
+ "cannot 'yield from' a coroutine object in a non-coroutine generator"):
+
+ list(foo())
+
+ def test_func_8(self):
+ @types.coroutine
+ def bar():
+ return (yield from foo())
+
+ async def foo():
+ return 'spam'
+
+ self.assertEqual(run_async(bar()), ([], 'spam') )
+
+ def test_func_9(self):
+ async def foo(): pass
+
+ with self.assertWarnsRegex(
+ RuntimeWarning, "coroutine '.*test_func_9.*foo' was never awaited"):
+
+ foo()
+ support.gc_collect()
+
+ def test_func_10(self):
+ N = 0
+
+ @types.coroutine
+ def gen():
+ nonlocal N
+ try:
+ a = yield
+ yield (a ** 2)
+ except ZeroDivisionError:
+ N += 100
+ raise
+ finally:
+ N += 1
+
+ async def foo():
+ await gen()
+
+ coro = foo()
+ aw = coro.__await__()
+ self.assertIs(aw, iter(aw))
+ next(aw)
+ self.assertEqual(aw.send(10), 100)
+
+ self.assertEqual(N, 0)
+ aw.close()
+ self.assertEqual(N, 1)
+
+ coro = foo()
+ aw = coro.__await__()
+ next(aw)
+ with self.assertRaises(ZeroDivisionError):
+ aw.throw(ZeroDivisionError, None, None)
+ self.assertEqual(N, 102)
+
+ def test_func_11(self):
+ async def func(): pass
+ coro = func()
+ # Test that PyCoro_Type and _PyCoroWrapper_Type types were properly
+ # initialized
+ self.assertIn('__await__', dir(coro))
+ self.assertIn('__iter__', dir(coro.__await__()))
+ self.assertIn('coroutine_wrapper', repr(coro.__await__()))
+ coro.close() # avoid RuntimeWarning
+
+ def test_func_12(self):
+ async def g():
+ i = me.send(None)
+ await foo
+ me = g()
+ with self.assertRaisesRegex(ValueError,
+ "coroutine already executing"):
+ me.send(None)
+
+ def test_func_13(self):
+ async def g():
+ pass
+ with self.assertRaisesRegex(
+ TypeError,
+ "can't send non-None value to a just-started coroutine"):
+
+ g().send('spam')
+
+ def test_func_14(self):
+ @types.coroutine
+ def gen():
+ yield
+ async def coro():
+ try:
+ await gen()
+ except GeneratorExit:
+ await gen()
+ c = coro()
+ c.send(None)
+ with self.assertRaisesRegex(RuntimeError,
+ "coroutine ignored GeneratorExit"):
+ c.close()
+
+ def test_func_15(self):
+ # See http://bugs.python.org/issue25887 for details
+
+ async def spammer():
+ return 'spam'
+ async def reader(coro):
+ return await coro
+
+ spammer_coro = spammer()
+
+ with self.assertRaisesRegex(StopIteration, 'spam'):
+ reader(spammer_coro).send(None)
+
+ with self.assertRaisesRegex(RuntimeError,
+ 'cannot reuse already awaited coroutine'):
+ reader(spammer_coro).send(None)
+
+ def test_func_16(self):
+ # See http://bugs.python.org/issue25887 for details
+
+ @types.coroutine
+ def nop():
+ yield
+ async def send():
+ await nop()
+ return 'spam'
+ async def read(coro):
+ await nop()
+ return await coro
+
+ spammer = send()
+
+ reader = read(spammer)
+ reader.send(None)
+ reader.send(None)
+ with self.assertRaisesRegex(Exception, 'ham'):
+ reader.throw(Exception('ham'))
+
+ reader = read(spammer)
+ reader.send(None)
+ with self.assertRaisesRegex(RuntimeError,
+ 'cannot reuse already awaited coroutine'):
+ reader.send(None)
+
+ with self.assertRaisesRegex(RuntimeError,
+ 'cannot reuse already awaited coroutine'):
+ reader.throw(Exception('wat'))
+
+ def test_func_17(self):
+ # See http://bugs.python.org/issue25887 for details
+
+ async def coroutine():
+ return 'spam'
+
+ coro = coroutine()
+ with self.assertRaisesRegex(StopIteration, 'spam'):
+ coro.send(None)
+
+ with self.assertRaisesRegex(RuntimeError,
+ 'cannot reuse already awaited coroutine'):
+ coro.send(None)
+
+ with self.assertRaisesRegex(RuntimeError,
+ 'cannot reuse already awaited coroutine'):
+ coro.throw(Exception('wat'))
+
+ # Closing a coroutine shouldn't raise any exception even if it's
+ # already closed/exhausted (similar to generators)
+ coro.close()
+ coro.close()
+
+ def test_func_18(self):
+ # See http://bugs.python.org/issue25887 for details
+
+ async def coroutine():
+ return 'spam'
+
+ coro = coroutine()
+ await_iter = coro.__await__()
+ it = iter(await_iter)
+
+ with self.assertRaisesRegex(StopIteration, 'spam'):
+ it.send(None)
+
+ with self.assertRaisesRegex(RuntimeError,
+ 'cannot reuse already awaited coroutine'):
+ it.send(None)
+
+ with self.assertRaisesRegex(RuntimeError,
+ 'cannot reuse already awaited coroutine'):
+ # Although the iterator protocol requires iterators to
+ # raise another StopIteration here, we don't want to do
+ # that. In this particular case, the iterator will raise
+ # a RuntimeError, so that 'yield from' and 'await'
+ # expressions will trigger the error, instead of silently
+ # ignoring the call.
+ next(it)
+
+ with self.assertRaisesRegex(RuntimeError,
+ 'cannot reuse already awaited coroutine'):
+ it.throw(Exception('wat'))
+
+ with self.assertRaisesRegex(RuntimeError,
+ 'cannot reuse already awaited coroutine'):
+ it.throw(Exception('wat'))
+
+ # Closing a coroutine shouldn't raise any exception even if it's
+ # already closed/exhausted (similar to generators)
+ it.close()
+ it.close()
+
+ def test_func_19(self):
+ CHK = 0
+
+ @types.coroutine
+ def foo():
+ nonlocal CHK
+ yield
+ try:
+ yield
+ except GeneratorExit:
+ CHK += 1
+
+ async def coroutine():
+ await foo()
+
+ coro = coroutine()
+
+ coro.send(None)
+ coro.send(None)
+
+ self.assertEqual(CHK, 0)
+ coro.close()
+ self.assertEqual(CHK, 1)
+
+ for _ in range(3):
+ # Closing a coroutine shouldn't raise any exception even if it's
+ # already closed/exhausted (similar to generators)
+ coro.close()
+ self.assertEqual(CHK, 1)
+
+ def test_cr_await(self):
+ @types.coroutine
+ def a():
+ self.assertEqual(inspect.getcoroutinestate(coro_b), inspect.CORO_RUNNING)
+ self.assertIsNone(coro_b.cr_await)
+ yield
+ self.assertEqual(inspect.getcoroutinestate(coro_b), inspect.CORO_RUNNING)
+ self.assertIsNone(coro_b.cr_await)
+
+ async def c():
+ await a()
+
+ async def b():
+ self.assertIsNone(coro_b.cr_await)
+ await c()
+ self.assertIsNone(coro_b.cr_await)
+
+ coro_b = b()
+ self.assertEqual(inspect.getcoroutinestate(coro_b), inspect.CORO_CREATED)
+ self.assertIsNone(coro_b.cr_await)
+
+ coro_b.send(None)
+ self.assertEqual(inspect.getcoroutinestate(coro_b), inspect.CORO_SUSPENDED)
+ self.assertEqual(coro_b.cr_await.cr_await.gi_code.co_name, 'a')
+
+ with self.assertRaises(StopIteration):
+ coro_b.send(None) # complete coroutine
+ self.assertEqual(inspect.getcoroutinestate(coro_b), inspect.CORO_CLOSED)
+ self.assertIsNone(coro_b.cr_await)
+
+ def test_corotype_1(self):
+ ct = types.CoroutineType
+ self.assertIn('into coroutine', ct.send.__doc__)
+ self.assertIn('inside coroutine', ct.close.__doc__)
+ self.assertIn('in coroutine', ct.throw.__doc__)
+ self.assertIn('of the coroutine', ct.__dict__['__name__'].__doc__)
+ self.assertIn('of the coroutine', ct.__dict__['__qualname__'].__doc__)
+ self.assertEqual(ct.__name__, 'coroutine')
+
+ async def f(): pass
+ c = f()
+ self.assertIn('coroutine object', repr(c))
+ c.close()
+
+ def test_await_1(self):
+
+ async def foo():
+ await 1
+ with self.assertRaisesRegex(TypeError, "object int can.t.*await"):
+ run_async(foo())
+
+ def test_await_2(self):
+ async def foo():
+ await []
+ with self.assertRaisesRegex(TypeError, "object list can.t.*await"):
+ run_async(foo())
+
+ def test_await_3(self):
+ async def foo():
+ await AsyncYieldFrom([1, 2, 3])
+
+ self.assertEqual(run_async(foo()), ([1, 2, 3], None))
+ self.assertEqual(run_async__await__(foo()), ([1, 2, 3], None))
+
+ def test_await_4(self):
+ async def bar():
+ return 42
+
+ async def foo():
+ return await bar()
+
+ self.assertEqual(run_async(foo()), ([], 42))
+
+ def test_await_5(self):
+ class Awaitable:
+ def __await__(self):
+ return
+
+ async def foo():
+ return (await Awaitable())
+
+ with self.assertRaisesRegex(
+ TypeError, "__await__.*returned non-iterator of type"):
+
+ run_async(foo())
+
+ def test_await_6(self):
+ class Awaitable:
+ def __await__(self):
+ return iter([52])
+
+ async def foo():
+ return (await Awaitable())
+
+ self.assertEqual(run_async(foo()), ([52], None))
+
+ def test_await_7(self):
+ class Awaitable:
+ def __await__(self):
+ yield 42
+ return 100
+
+ async def foo():
+ return (await Awaitable())
+
+ self.assertEqual(run_async(foo()), ([42], 100))
+
+ def test_await_8(self):
+ class Awaitable:
+ pass
+
+ async def foo(): return await Awaitable()
+
+ with self.assertRaisesRegex(
+ TypeError, "object Awaitable can't be used in 'await' expression"):
+
+ run_async(foo())
+
+ def test_await_9(self):
+ def wrap():
+ return bar
+
+ async def bar():
+ return 42
+
+ async def foo():
+ b = bar()
+
+ db = {'b': lambda: wrap}
+
+ class DB:
+ b = wrap
+
+ return (await bar() + await wrap()() + await db['b']()()() +
+ await bar() * 1000 + await DB.b()())
+
+ async def foo2():
+ return -await bar()
+
+ self.assertEqual(run_async(foo()), ([], 42168))
+ self.assertEqual(run_async(foo2()), ([], -42))
+
+ def test_await_10(self):
+ async def baz():
+ return 42
+
+ async def bar():
+ return baz()
+
+ async def foo():
+ return await (await bar())
+
+ self.assertEqual(run_async(foo()), ([], 42))
+
+ def test_await_11(self):
+ def ident(val):
+ return val
+
+ async def bar():
+ return 'spam'
+
+ async def foo():
+ return ident(val=await bar())
+
+ async def foo2():
+ return await bar(), 'ham'
+
+ self.assertEqual(run_async(foo2()), ([], ('spam', 'ham')))
+
+ def test_await_12(self):
+ async def coro():
+ return 'spam'
+
+ class Awaitable:
+ def __await__(self):
+ return coro()
+
+ async def foo():
+ return await Awaitable()
+
+ with self.assertRaisesRegex(
+ TypeError, "__await__\(\) returned a coroutine"):
+
+ run_async(foo())
+
+ def test_await_13(self):
+ class Awaitable:
+ def __await__(self):
+ return self
+
+ async def foo():
+ return await Awaitable()
+
+ with self.assertRaisesRegex(
+ TypeError, "__await__.*returned non-iterator of type"):
+
+ run_async(foo())
+
+ def test_await_14(self):
+ class Wrapper:
+ # Forces the interpreter to use CoroutineType.__await__
+ def __init__(self, coro):
+ assert coro.__class__ is types.CoroutineType
+ self.coro = coro
+ def __await__(self):
+ return self.coro.__await__()
+
+ class FutureLike:
+ def __await__(self):
+ return (yield)
+
+ class Marker(Exception):
+ pass
+
+ async def coro1():
+ try:
+ return await FutureLike()
+ except ZeroDivisionError:
+ raise Marker
+ async def coro2():
+ return await Wrapper(coro1())
+
+ c = coro2()
+ c.send(None)
+ with self.assertRaisesRegex(StopIteration, 'spam'):
+ c.send('spam')
+
+ c = coro2()
+ c.send(None)
+ with self.assertRaises(Marker):
+ c.throw(ZeroDivisionError)
+
+ def test_await_15(self):
+ @types.coroutine
+ def nop():
+ yield
+
+ async def coroutine():
+ await nop()
+
+ async def waiter(coro):
+ await coro
+
+ coro = coroutine()
+ coro.send(None)
+
+ with self.assertRaisesRegex(RuntimeError,
+ "coroutine is being awaited already"):
+ waiter(coro).send(None)
+
+ def test_with_1(self):
+ class Manager:
+ def __init__(self, name):
+ self.name = name
+
+ async def __aenter__(self):
+ await AsyncYieldFrom(['enter-1-' + self.name,
+ 'enter-2-' + self.name])
+ return self
+
+ async def __aexit__(self, *args):
+ await AsyncYieldFrom(['exit-1-' + self.name,
+ 'exit-2-' + self.name])
+
+ if self.name == 'B':
+ return True
+
+
+ async def foo():
+ async with Manager("A") as a, Manager("B") as b:
+ await AsyncYieldFrom([('managers', a.name, b.name)])
+ 1/0
+
+ f = foo()
+ result, _ = run_async(f)
+
+ self.assertEqual(
+ result, ['enter-1-A', 'enter-2-A', 'enter-1-B', 'enter-2-B',
+ ('managers', 'A', 'B'),
+ 'exit-1-B', 'exit-2-B', 'exit-1-A', 'exit-2-A']
+ )
+
+ async def foo():
+ async with Manager("A") as a, Manager("C") as c:
+ await AsyncYieldFrom([('managers', a.name, c.name)])
+ 1/0
+
+ with self.assertRaises(ZeroDivisionError):
+ run_async(foo())
+
+ def test_with_2(self):
+ class CM:
+ def __aenter__(self):
+ pass
+
+ async def foo():
+ async with CM():
+ pass
+
+ with self.assertRaisesRegex(AttributeError, '__aexit__'):
+ run_async(foo())
+
+ def test_with_3(self):
+ class CM:
+ def __aexit__(self):
+ pass
+
+ async def foo():
+ async with CM():
+ pass
+
+ with self.assertRaisesRegex(AttributeError, '__aenter__'):
+ run_async(foo())
+
+ def test_with_4(self):
+ class CM:
+ def __enter__(self):
+ pass
+
+ def __exit__(self):
+ pass
+
+ async def foo():
+ async with CM():
+ pass
+
+ with self.assertRaisesRegex(AttributeError, '__aexit__'):
+ run_async(foo())
+
+ def test_with_5(self):
+ # While this test doesn't make a lot of sense,
+ # it's a regression test for an early bug with opcodes
+ # generation
+
+ class CM:
+ async def __aenter__(self):
+ return self
+
+ async def __aexit__(self, *exc):
+ pass
+
+ async def func():
+ async with CM():
+ assert (1, ) == 1
+
+ with self.assertRaises(AssertionError):
+ run_async(func())
+
+ def test_with_6(self):
+ class CM:
+ def __aenter__(self):
+ return 123
+
+ def __aexit__(self, *e):
+ return 456
+
+ async def foo():
+ async with CM():
+ pass
+
+ with self.assertRaisesRegex(
+ TypeError, "object int can't be used in 'await' expression"):
+ # it's important that __aexit__ wasn't called
+ run_async(foo())
+
+ def test_with_7(self):
+ class CM:
+ async def __aenter__(self):
+ return self
+
+ def __aexit__(self, *e):
+ return 444
+
+ async def foo():
+ async with CM():
+ 1/0
+
+ try:
+ run_async(foo())
+ except TypeError as exc:
+ self.assertRegex(
+ exc.args[0], "object int can't be used in 'await' expression")
+ self.assertTrue(exc.__context__ is not None)
+ self.assertTrue(isinstance(exc.__context__, ZeroDivisionError))
+ else:
+ self.fail('invalid asynchronous context manager did not fail')
+
+
+ def test_with_8(self):
+ CNT = 0
+
+ class CM:
+ async def __aenter__(self):
+ return self
+
+ def __aexit__(self, *e):
+ return 456
+
+ async def foo():
+ nonlocal CNT
+ async with CM():
+ CNT += 1
+
+
+ with self.assertRaisesRegex(
+ TypeError, "object int can't be used in 'await' expression"):
+
+ run_async(foo())
+
+ self.assertEqual(CNT, 1)
+
+
+ def test_with_9(self):
+ CNT = 0
+
+ class CM:
+ async def __aenter__(self):
+ return self
+
+ async def __aexit__(self, *e):
+ 1/0
+
+ async def foo():
+ nonlocal CNT
+ async with CM():
+ CNT += 1
+
+ with self.assertRaises(ZeroDivisionError):
+ run_async(foo())
+
+ self.assertEqual(CNT, 1)
+
+ def test_with_10(self):
+ CNT = 0
+
+ class CM:
+ async def __aenter__(self):
+ return self
+
+ async def __aexit__(self, *e):
+ 1/0
+
+ async def foo():
+ nonlocal CNT
+ async with CM():
+ async with CM():
+ raise RuntimeError
+
+ try:
+ run_async(foo())
+ except ZeroDivisionError as exc:
+ self.assertTrue(exc.__context__ is not None)
+ self.assertTrue(isinstance(exc.__context__, ZeroDivisionError))
+ self.assertTrue(isinstance(exc.__context__.__context__,
+ RuntimeError))
+ else:
+ self.fail('exception from __aexit__ did not propagate')
+
+ def test_with_11(self):
+ CNT = 0
+
+ class CM:
+ async def __aenter__(self):
+ raise NotImplementedError
+
+ async def __aexit__(self, *e):
+ 1/0
+
+ async def foo():
+ nonlocal CNT
+ async with CM():
+ raise RuntimeError
+
+ try:
+ run_async(foo())
+ except NotImplementedError as exc:
+ self.assertTrue(exc.__context__ is None)
+ else:
+ self.fail('exception from __aenter__ did not propagate')
+
+ def test_with_12(self):
+ CNT = 0
+
+ class CM:
+ async def __aenter__(self):
+ return self
+
+ async def __aexit__(self, *e):
+ return True
+
+ async def foo():
+ nonlocal CNT
+ async with CM() as cm:
+ self.assertIs(cm.__class__, CM)
+ raise RuntimeError
+
+ run_async(foo())
+
+ def test_with_13(self):
+ CNT = 0
+
+ class CM:
+ async def __aenter__(self):
+ 1/0
+
+ async def __aexit__(self, *e):
+ return True
+
+ async def foo():
+ nonlocal CNT
+ CNT += 1
+ async with CM():
+ CNT += 1000
+ CNT += 10000
+
+ with self.assertRaises(ZeroDivisionError):
+ run_async(foo())
+ self.assertEqual(CNT, 1)
+
+ def test_for_1(self):
+ aiter_calls = 0
+
+ class AsyncIter:
+ def __init__(self):
+ self.i = 0
+
+ async def __aiter__(self):
+ nonlocal aiter_calls
+ aiter_calls += 1
+ return self
+
+ async def __anext__(self):
+ self.i += 1
+
+ if not (self.i % 10):
+ await AsyncYield(self.i * 10)
+
+ if self.i > 100:
+ raise StopAsyncIteration
+
+ return self.i, self.i
+
+
+ buffer = []
+ async def test1():
+ with self.assertWarnsRegex(PendingDeprecationWarning, "legacy"):
+ async for i1, i2 in AsyncIter():
+ buffer.append(i1 + i2)
+
+ yielded, _ = run_async(test1())
+ # Make sure that __aiter__ was called only once
+ self.assertEqual(aiter_calls, 1)
+ self.assertEqual(yielded, [i * 100 for i in range(1, 11)])
+ self.assertEqual(buffer, [i*2 for i in range(1, 101)])
+
+
+ buffer = []
+ async def test2():
+ nonlocal buffer
+ with self.assertWarnsRegex(PendingDeprecationWarning, "legacy"):
+ async for i in AsyncIter():
+ buffer.append(i[0])
+ if i[0] == 20:
+ break
+ else:
+ buffer.append('what?')
+ buffer.append('end')
+
+ yielded, _ = run_async(test2())
+ # Make sure that __aiter__ was called only once
+ self.assertEqual(aiter_calls, 2)
+ self.assertEqual(yielded, [100, 200])
+ self.assertEqual(buffer, [i for i in range(1, 21)] + ['end'])
+
+
+ buffer = []
+ async def test3():
+ nonlocal buffer
+ with self.assertWarnsRegex(PendingDeprecationWarning, "legacy"):
+ async for i in AsyncIter():
+ if i[0] > 20:
+ continue
+ buffer.append(i[0])
+ else:
+ buffer.append('what?')
+ buffer.append('end')
+
+ yielded, _ = run_async(test3())
+ # Make sure that __aiter__ was called only once
+ self.assertEqual(aiter_calls, 3)
+ self.assertEqual(yielded, [i * 100 for i in range(1, 11)])
+ self.assertEqual(buffer, [i for i in range(1, 21)] +
+ ['what?', 'end'])
+
+ def test_for_2(self):
+ tup = (1, 2, 3)
+ refs_before = sys.getrefcount(tup)
+
+ async def foo():
+ async for i in tup:
+ print('never going to happen')
+
+ with self.assertRaisesRegex(
+ TypeError, "async for' requires an object.*__aiter__.*tuple"):
+
+ run_async(foo())
+
+ self.assertEqual(sys.getrefcount(tup), refs_before)
+
+ def test_for_3(self):
+ class I:
+ def __aiter__(self):
+ return self
+
+ aiter = I()
+ refs_before = sys.getrefcount(aiter)
+
+ async def foo():
+ async for i in aiter:
+ print('never going to happen')
+
+ with self.assertRaisesRegex(
+ TypeError,
+ "async for' received an invalid object.*__aiter.*\: I"):
+
+ run_async(foo())
+
+ self.assertEqual(sys.getrefcount(aiter), refs_before)
+
+ def test_for_4(self):
+ class I:
+ def __aiter__(self):
+ return self
+
+ def __anext__(self):
+ return ()
+
+ aiter = I()
+ refs_before = sys.getrefcount(aiter)
+
+ async def foo():
+ async for i in aiter:
+ print('never going to happen')
+
+ with self.assertRaisesRegex(
+ TypeError,
+ "async for' received an invalid object.*__anext__.*tuple"):
+
+ run_async(foo())
+
+ self.assertEqual(sys.getrefcount(aiter), refs_before)
+
+ def test_for_5(self):
+ class I:
+ async def __aiter__(self):
+ return self
+
+ def __anext__(self):
+ return 123
+
+ async def foo():
+ with self.assertWarnsRegex(PendingDeprecationWarning, "legacy"):
+ async for i in I():
+ print('never going to happen')
+
+ with self.assertRaisesRegex(
+ TypeError,
+ "async for' received an invalid object.*__anext.*int"):
+
+ run_async(foo())
+
+ def test_for_6(self):
+ I = 0
+
+ class Manager:
+ async def __aenter__(self):
+ nonlocal I
+ I += 10000
+
+ async def __aexit__(self, *args):
+ nonlocal I
+ I += 100000
+
+ class Iterable:
+ def __init__(self):
+ self.i = 0
+
+ def __aiter__(self):
+ return self
+
+ async def __anext__(self):
+ if self.i > 10:
+ raise StopAsyncIteration
+ self.i += 1
+ return self.i
+
+ ##############
+
+ manager = Manager()
+ iterable = Iterable()
+ mrefs_before = sys.getrefcount(manager)
+ irefs_before = sys.getrefcount(iterable)
+
+ async def main():
+ nonlocal I
+
+ async with manager:
+ async for i in iterable:
+ I += 1
+ I += 1000
+
+ with warnings.catch_warnings():
+ warnings.simplefilter("error")
+ # Test that __aiter__ that returns an asyncronous iterator
+ # directly does not throw any warnings.
+ run_async(main())
+ self.assertEqual(I, 111011)
+
+ self.assertEqual(sys.getrefcount(manager), mrefs_before)
+ self.assertEqual(sys.getrefcount(iterable), irefs_before)
+
+ ##############
+
+ async def main():
+ nonlocal I
+
+ async with Manager():
+ async for i in Iterable():
+ I += 1
+ I += 1000
+
+ async with Manager():
+ async for i in Iterable():
+ I += 1
+ I += 1000
+
+ run_async(main())
+ self.assertEqual(I, 333033)
+
+ ##############
+
+ async def main():
+ nonlocal I
+
+ async with Manager():
+ I += 100
+ async for i in Iterable():
+ I += 1
+ else:
+ I += 10000000
+ I += 1000
+
+ async with Manager():
+ I += 100
+ async for i in Iterable():
+ I += 1
+ else:
+ I += 10000000
+ I += 1000
+
+ run_async(main())
+ self.assertEqual(I, 20555255)
+
+ def test_for_7(self):
+ CNT = 0
+ class AI:
+ async def __aiter__(self):
+ 1/0
+ async def foo():
+ nonlocal CNT
+ with self.assertWarnsRegex(PendingDeprecationWarning, "legacy"):
+ async for i in AI():
+ CNT += 1
+ CNT += 10
+ with self.assertRaises(ZeroDivisionError):
+ run_async(foo())
+ self.assertEqual(CNT, 0)
+
+ def test_for_8(self):
+ CNT = 0
+ class AI:
+ def __aiter__(self):
+ 1/0
+ async def foo():
+ nonlocal CNT
+ async for i in AI():
+ CNT += 1
+ CNT += 10
+ with self.assertRaises(ZeroDivisionError):
+ with warnings.catch_warnings():
+ warnings.simplefilter("error")
+ # Test that if __aiter__ raises an exception it propagates
+ # without any kind of warning.
+ run_async(foo())
+ self.assertEqual(CNT, 0)
+
+ def test_for_9(self):
+ # Test that PendingDeprecationWarning can safely be converted into
+ # an exception (__aiter__ should not have a chance to raise
+ # a ZeroDivisionError.)
+ class AI:
+ async def __aiter__(self):
+ 1/0
+ async def foo():
+ async for i in AI():
+ pass
+
+ with self.assertRaises(PendingDeprecationWarning):
+ with warnings.catch_warnings():
+ warnings.simplefilter("error")
+ run_async(foo())
+
+ def test_for_10(self):
+ # Test that PendingDeprecationWarning can safely be converted into
+ # an exception.
+ class AI:
+ async def __aiter__(self):
+ pass
+ async def foo():
+ async for i in AI():
+ pass
+
+ with self.assertRaises(PendingDeprecationWarning):
+ with warnings.catch_warnings():
+ warnings.simplefilter("error")
+ run_async(foo())
+
+ def test_copy(self):
+ async def func(): pass
+ coro = func()
+ with self.assertRaises(TypeError):
+ copy.copy(coro)
+
+ aw = coro.__await__()
+ try:
+ with self.assertRaises(TypeError):
+ copy.copy(aw)
+ finally:
+ aw.close()
+
+ def test_pickle(self):
+ async def func(): pass
+ coro = func()
+ for proto in range(pickle.HIGHEST_PROTOCOL + 1):
+ with self.assertRaises((TypeError, pickle.PicklingError)):
+ pickle.dumps(coro, proto)
+
+ aw = coro.__await__()
+ try:
+ for proto in range(pickle.HIGHEST_PROTOCOL + 1):
+ with self.assertRaises((TypeError, pickle.PicklingError)):
+ pickle.dumps(aw, proto)
+ finally:
+ aw.close()
+
+
+class CoroAsyncIOCompatTest(unittest.TestCase):
+
+ def test_asyncio_1(self):
+ # asyncio cannot be imported when Python is compiled without thread
+ # support
+ asyncio = support.import_module('asyncio')
+
+ class MyException(Exception):
+ pass
+
+ buffer = []
+
+ class CM:
+ async def __aenter__(self):
+ buffer.append(1)
+ await asyncio.sleep(0.01)
+ buffer.append(2)
+ return self
+
+ async def __aexit__(self, exc_type, exc_val, exc_tb):
+ await asyncio.sleep(0.01)
+ buffer.append(exc_type.__name__)
+
+ async def f():
+ async with CM() as c:
+ await asyncio.sleep(0.01)
+ raise MyException
+ buffer.append('unreachable')
+
+ loop = asyncio.new_event_loop()
+ asyncio.set_event_loop(loop)
+ try:
+ loop.run_until_complete(f())
+ except MyException:
+ pass
+ finally:
+ loop.close()
+ asyncio.set_event_loop(None)
+
+ self.assertEqual(buffer, [1, 2, 'MyException'])
+
+
+class SysSetCoroWrapperTest(unittest.TestCase):
+
+ def test_set_wrapper_1(self):
+ async def foo():
+ return 'spam'
+
+ wrapped = None
+ def wrap(gen):
+ nonlocal wrapped
+ wrapped = gen
+ return gen
+
+ self.assertIsNone(sys.get_coroutine_wrapper())
+
+ sys.set_coroutine_wrapper(wrap)
+ self.assertIs(sys.get_coroutine_wrapper(), wrap)
+ try:
+ f = foo()
+ self.assertTrue(wrapped)
+
+ self.assertEqual(run_async(f), ([], 'spam'))
+ finally:
+ sys.set_coroutine_wrapper(None)
+
+ self.assertIsNone(sys.get_coroutine_wrapper())
+
+ wrapped = None
+ with silence_coro_gc():
+ foo()
+ self.assertFalse(wrapped)
+
+ def test_set_wrapper_2(self):
+ self.assertIsNone(sys.get_coroutine_wrapper())
+ with self.assertRaisesRegex(TypeError, "callable expected, got int"):
+ sys.set_coroutine_wrapper(1)
+ self.assertIsNone(sys.get_coroutine_wrapper())
+
+ def test_set_wrapper_3(self):
+ async def foo():
+ return 'spam'
+
+ def wrapper(coro):
+ async def wrap(coro):
+ return await coro
+ return wrap(coro)
+
+ sys.set_coroutine_wrapper(wrapper)
+ try:
+ with silence_coro_gc(), self.assertRaisesRegex(
+ RuntimeError,
+ "coroutine wrapper.*\.wrapper at 0x.*attempted to "
+ "recursively wrap .* wrap .*"):
+
+ foo()
+ finally:
+ sys.set_coroutine_wrapper(None)
+
+ def test_set_wrapper_4(self):
+ @types.coroutine
+ def foo():
+ return 'spam'
+
+ wrapped = None
+ def wrap(gen):
+ nonlocal wrapped
+ wrapped = gen
+ return gen
+
+ sys.set_coroutine_wrapper(wrap)
+ try:
+ foo()
+ self.assertIs(
+ wrapped, None,
+ "generator-based coroutine was wrapped via "
+ "sys.set_coroutine_wrapper")
+ finally:
+ sys.set_coroutine_wrapper(None)
+
+
+class CAPITest(unittest.TestCase):
+
+ def test_tp_await_1(self):
+ from _testcapi import awaitType as at
+
+ async def foo():
+ future = at(iter([1]))
+ return (await future)
+
+ self.assertEqual(foo().send(None), 1)
+
+ def test_tp_await_2(self):
+ # Test tp_await to __await__ mapping
+ from _testcapi import awaitType as at
+ future = at(iter([1]))
+ self.assertEqual(next(future.__await__()), 1)
+
+ def test_tp_await_3(self):
+ from _testcapi import awaitType as at
+
+ async def foo():
+ future = at(1)
+ return (await future)
+
+ with self.assertRaisesRegex(
+ TypeError, "__await__.*returned non-iterator of type 'int'"):
+ self.assertEqual(foo().send(None), 1)
+
+
+if __name__=="__main__":
+ unittest.main()
diff --git a/Lib/test/test_cprofile.py b/Lib/test/test_cprofile.py
index ce5d27edd6..f18983fbb2 100644
--- a/Lib/test/test_cprofile.py
+++ b/Lib/test/test_cprofile.py
@@ -11,7 +11,7 @@ from test.profilee import testfunc
class CProfileTest(ProfileTest):
profilerclass = cProfile.Profile
profilermodule = cProfile
- expected_max_output = "{built-in method max}"
+ expected_max_output = "{built-in method builtins.max}"
def get_expected_output(self):
return _ProfileOutput
@@ -72,9 +72,9 @@ profilee.py:84(helper2_indirect) <- 2 0.000 0.140
profilee.py:88(helper2) <- 6 0.234 0.300 profilee.py:55(helper)
2 0.078 0.100 profilee.py:84(helper2_indirect)
profilee.py:98(subhelper) <- 8 0.064 0.080 profilee.py:88(helper2)
-{built-in method exc_info} <- 4 0.000 0.000 profilee.py:73(helper1)
-{built-in method hasattr} <- 4 0.000 0.004 profilee.py:73(helper1)
+{built-in method builtins.hasattr} <- 4 0.000 0.004 profilee.py:73(helper1)
8 0.000 0.008 profilee.py:88(helper2)
+{built-in method sys.exc_info} <- 4 0.000 0.000 profilee.py:73(helper1)
{method 'append' of 'list' objects} <- 4 0.000 0.000 profilee.py:73(helper1)"""
_ProfileOutput['print_callees'] = """\
<string>:1(<module>) -> 1 0.270 1.000 profilee.py:25(testfunc)
@@ -87,12 +87,12 @@ profilee.py:48(mul) ->
profilee.py:55(helper) -> 4 0.116 0.120 profilee.py:73(helper1)
2 0.000 0.140 profilee.py:84(helper2_indirect)
6 0.234 0.300 profilee.py:88(helper2)
-profilee.py:73(helper1) -> 4 0.000 0.000 {built-in method exc_info}
+profilee.py:73(helper1) -> 4 0.000 0.004 {built-in method builtins.hasattr}
profilee.py:84(helper2_indirect) -> 2 0.006 0.040 profilee.py:35(factorial)
2 0.078 0.100 profilee.py:88(helper2)
profilee.py:88(helper2) -> 8 0.064 0.080 profilee.py:98(subhelper)
profilee.py:98(subhelper) -> 16 0.016 0.016 profilee.py:110(__getattr__)
-{built-in method hasattr} -> 12 0.012 0.012 profilee.py:110(__getattr__)"""
+{built-in method builtins.hasattr} -> 12 0.012 0.012 profilee.py:110(__getattr__)"""
if __name__ == "__main__":
main()
diff --git a/Lib/test/test_crashers.py b/Lib/test/test_crashers.py
index 336ccbeaff..58dfd001da 100644
--- a/Lib/test/test_crashers.py
+++ b/Lib/test/test_crashers.py
@@ -8,7 +8,7 @@ import unittest
import glob
import os.path
import test.support
-from test.script_helper import assert_python_failure
+from test.support.script_helper import assert_python_failure
CRASHER_DIR = os.path.join(os.path.dirname(__file__), "crashers")
CRASHER_FILES = os.path.join(CRASHER_DIR, "*.py")
@@ -30,9 +30,8 @@ class CrasherTest(unittest.TestCase):
assert_python_failure(fname)
-def test_main():
- test.support.run_unittest(CrasherTest)
+def tearDownModule():
test.support.reap_children()
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_crypt.py b/Lib/test/test_crypt.py
index 624d702f99..e4f58979c1 100644
--- a/Lib/test/test_crypt.py
+++ b/Lib/test/test_crypt.py
@@ -25,7 +25,7 @@ class CryptTestCase(unittest.TestCase):
self.assertEqual(len(pw), method.total_size)
def test_methods(self):
- # Gurantee that METHOD_CRYPT is the last method in crypt.methods.
+ # Guarantee that METHOD_CRYPT is the last method in crypt.methods.
self.assertTrue(len(crypt.methods) >= 1)
self.assertEqual(crypt.METHOD_CRYPT, crypt.methods[-1])
diff --git a/Lib/test/test_csv.py b/Lib/test/test_csv.py
index 65449aebe4..77c315edb1 100644
--- a/Lib/test/test_csv.py
+++ b/Lib/test/test_csv.py
@@ -1,6 +1,7 @@
# Copyright (C) 2001,2002 Python Software Foundation
# csv package unit tests
+import copy
import io
import sys
import os
@@ -9,6 +10,7 @@ from io import StringIO
from tempfile import TemporaryFile
import csv
import gc
+import pickle
from test import support
class Test_Csv(unittest.TestCase):
@@ -186,6 +188,14 @@ class Test_Csv(unittest.TestCase):
self._write_test(['a',1,'p,q'], 'a,1,p\\,q',
escapechar='\\', quoting = csv.QUOTE_NONE)
+ def test_write_iterable(self):
+ self._write_test(iter(['a', 1, 'p,q']), 'a,1,"p,q"')
+ self._write_test(iter(['a', 1, None]), 'a,1,')
+ self._write_test(iter([]), '')
+ self._write_test(iter([None]), '""')
+ self._write_error_test(csv.Error, iter([None]), quoting=csv.QUOTE_NONE)
+ self._write_test(iter([None, None]), ',')
+
def test_writerows(self):
class BrokenFile:
def write(self, buf):
@@ -416,6 +426,18 @@ class TestDialectRegistry(unittest.TestCase):
self.assertRaises(TypeError, csv.reader, [], quoting = -1)
self.assertRaises(TypeError, csv.reader, [], quoting = 100)
+ # See issue #22995
+ ## def test_copy(self):
+ ## for name in csv.list_dialects():
+ ## dialect = csv.get_dialect(name)
+ ## self.assertRaises(TypeError, copy.copy, dialect)
+
+ ## def test_pickle(self):
+ ## for name in csv.list_dialects():
+ ## dialect = csv.get_dialect(name)
+ ## for proto in range(pickle.HIGHEST_PROTOCOL + 1):
+ ## self.assertRaises(TypeError, pickle.dumps, dialect, proto)
+
class TestCsvBase(unittest.TestCase):
def readerAssertEqual(self, input, expected_result):
with TemporaryFile("w+", newline='') as fileobj:
@@ -578,6 +600,16 @@ class TestDictFields(unittest.TestCase):
fileobj.readline() # header
self.assertEqual(fileobj.read(), "10,,abc\r\n")
+ def test_write_multiple_dict_rows(self):
+ fileobj = StringIO()
+ writer = csv.DictWriter(fileobj, fieldnames=["f1", "f2", "f3"])
+ writer.writeheader()
+ self.assertEqual(fileobj.getvalue(), "f1,f2,f3\r\n")
+ writer.writerows([{"f1": 1, "f2": "abc", "f3": "f"},
+ {"f1": 2, "f2": 5, "f3": "xyz"}])
+ self.assertEqual(fileobj.getvalue(),
+ "f1,f2,f3\r\n1,abc,f\r\n2,5,xyz\r\n")
+
def test_write_no_fields(self):
fileobj = StringIO()
self.assertRaises(TypeError, csv.DictWriter, fileobj)
@@ -776,7 +808,7 @@ class TestDialectValidity(unittest.TestCase):
with self.assertRaises(csv.Error) as cm:
mydialect()
self.assertEqual(str(cm.exception),
- '"quotechar" must be an 1-character string')
+ '"quotechar" must be a 1-character string')
mydialect.quotechar = 4
with self.assertRaises(csv.Error) as cm:
@@ -799,13 +831,13 @@ class TestDialectValidity(unittest.TestCase):
with self.assertRaises(csv.Error) as cm:
mydialect()
self.assertEqual(str(cm.exception),
- '"delimiter" must be an 1-character string')
+ '"delimiter" must be a 1-character string')
mydialect.delimiter = ""
with self.assertRaises(csv.Error) as cm:
mydialect()
self.assertEqual(str(cm.exception),
- '"delimiter" must be an 1-character string')
+ '"delimiter" must be a 1-character string')
mydialect.delimiter = b","
with self.assertRaises(csv.Error) as cm:
@@ -1066,11 +1098,5 @@ class TestUnicode(unittest.TestCase):
self.assertEqual(fileobj.read(), expected)
-def test_main():
- mod = sys.modules[__name__]
- support.run_unittest(
- *[getattr(mod, name) for name in dir(mod) if name.startswith('Test')]
- )
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py
index bd7d4fca8b..8411cdb0f2 100644
--- a/Lib/test/test_curses.py
+++ b/Lib/test/test_curses.py
@@ -24,19 +24,41 @@ requires('curses')
# If either of these don't exist, skip the tests.
curses = import_module('curses')
-curses.panel = import_module('curses.panel')
+import_module('curses.panel')
+import_module('curses.ascii')
-term = os.environ.get('TERM', 'unknown')
+def requires_curses_func(name):
+ return unittest.skipUnless(hasattr(curses, name),
+ 'requires curses.%s' % name)
-@unittest.skipUnless(sys.__stdout__.isatty(), 'sys.__stdout__ is not a tty')
-@unittest.skipIf(term == 'unknown',
+term = os.environ.get('TERM')
+
+# If newterm was supported we could use it instead of initscr and not exit
+@unittest.skipIf(not term or term == 'unknown',
"$TERM=%r, calling initscr() may cause exit" % term)
@unittest.skipIf(sys.platform == "cygwin",
"cygwin's curses mostly just hangs")
class TestCurses(unittest.TestCase):
+
@classmethod
def setUpClass(cls):
- curses.setupterm(fd=sys.__stdout__.fileno())
+ if not sys.__stdout__.isatty():
+ # Temporary skip tests on non-tty
+ raise unittest.SkipTest('sys.__stdout__ is not a tty')
+ cls.tmp = tempfile.TemporaryFile()
+ fd = cls.tmp.fileno()
+ else:
+ cls.tmp = None
+ fd = sys.__stdout__.fileno()
+ # testing setupterm() inside initscr/endwin
+ # causes terminal breakage
+ curses.setupterm(fd=fd)
+
+ @classmethod
+ def tearDownClass(cls):
+ if cls.tmp:
+ cls.tmp.close()
+ del cls.tmp
def setUp(self):
if verbose:
@@ -59,7 +81,8 @@ class TestCurses(unittest.TestCase):
for meth in [stdscr.addch, stdscr.addstr]:
for args in [('a'), ('a', curses.A_BOLD),
(4,4, 'a'), (5,5, 'a', curses.A_BOLD)]:
- meth(*args)
+ with self.subTest(meth=meth.__qualname__, args=args):
+ meth(*args)
for meth in [stdscr.box, stdscr.clear, stdscr.clrtobot,
stdscr.clrtoeol, stdscr.cursyncup, stdscr.delch,
@@ -70,7 +93,8 @@ class TestCurses(unittest.TestCase):
win.noutrefresh, stdscr.redrawwin, stdscr.refresh,
stdscr.standout, stdscr.standend, stdscr.syncdown,
stdscr.syncup, stdscr.touchwin, stdscr.untouchwin]:
- meth()
+ with self.subTest(meth=meth.__qualname__):
+ meth()
stdscr.addnstr('1234', 3)
stdscr.addnstr('1234', 3, curses.A_BOLD)
@@ -166,7 +190,6 @@ class TestCurses(unittest.TestCase):
def test_module_funcs(self):
"Test module-level functions"
- stdscr = self.stdscr
for func in [curses.baudrate, curses.beep, curses.can_change_color,
curses.cbreak, curses.def_prog_mode, curses.doupdate,
curses.filter, curses.flash, curses.flushinp,
@@ -176,7 +199,8 @@ class TestCurses(unittest.TestCase):
curses.noqiflush, curses.noraw,
curses.reset_prog_mode, curses.termattrs,
curses.termname, curses.erasechar, curses.getsyx]:
- func()
+ with self.subTest(func=func.__qualname__):
+ func()
# Functions that actually need arguments
if curses.tigetstr("cnorm"):
@@ -184,11 +208,10 @@ class TestCurses(unittest.TestCase):
curses.delay_output(1)
curses.echo() ; curses.echo(1)
- f = tempfile.TemporaryFile()
- stdscr.putwin(f)
- f.seek(0)
- curses.getwin(f)
- f.close()
+ with tempfile.TemporaryFile() as f:
+ self.stdscr.putwin(f)
+ f.seek(0)
+ curses.getwin(f)
curses.halfdelay(1)
curses.intrflush(1)
@@ -211,51 +234,37 @@ class TestCurses(unittest.TestCase):
curses.ungetch('a')
curses.use_env(1)
- # Functions only available on a few platforms
- if curses.has_colors():
- curses.start_color()
- curses.init_pair(2, 1,1)
- curses.color_content(1)
- curses.color_pair(2)
- curses.pair_content(curses.COLOR_PAIRS - 1)
- curses.pair_number(0)
-
- if hasattr(curses, 'use_default_colors'):
- curses.use_default_colors()
-
- if hasattr(curses, 'keyname'):
- curses.keyname(13)
-
- if hasattr(curses, 'has_key'):
- curses.has_key(13)
-
- if hasattr(curses, 'getmouse'):
- (availmask, oldmask) = curses.mousemask(curses.BUTTON1_PRESSED)
- # availmask indicates that mouse stuff not available.
- if availmask != 0:
- curses.mouseinterval(10)
- # just verify these don't cause errors
- curses.ungetmouse(0, 0, 0, 0, curses.BUTTON1_PRESSED)
- m = curses.getmouse()
-
- if hasattr(curses, 'is_term_resized'):
- curses.is_term_resized(*stdscr.getmaxyx())
- if hasattr(curses, 'resizeterm'):
- curses.resizeterm(*stdscr.getmaxyx())
- if hasattr(curses, 'resize_term'):
- curses.resize_term(*stdscr.getmaxyx())
-
- def test_unctrl(self):
- from curses import ascii
- for ch, expected in [('a', 'a'), ('A', 'A'),
- (';', ';'), (' ', ' '),
- ('\x7f', '^?'), ('\n', '^J'), ('\0', '^@'),
- # Meta-bit characters
- ('\x8a', '!^J'), ('\xc1', '!A'),
- ]:
- self.assertEqual(ascii.unctrl(ch), expected,
- 'curses.unctrl fails on character %r' % ch)
-
+ # Functions only available on a few platforms
+ def test_colors_funcs(self):
+ if not curses.has_colors():
+ self.skip('requires colors support')
+ curses.start_color()
+ curses.init_pair(2, 1,1)
+ curses.color_content(1)
+ curses.color_pair(2)
+ curses.pair_content(curses.COLOR_PAIRS - 1)
+ curses.pair_number(0)
+
+ if hasattr(curses, 'use_default_colors'):
+ curses.use_default_colors()
+
+ @requires_curses_func('keyname')
+ def test_keyname(self):
+ curses.keyname(13)
+
+ @requires_curses_func('has_key')
+ def test_has_key(self):
+ curses.has_key(13)
+
+ @requires_curses_func('getmouse')
+ def test_getmouse(self):
+ (availmask, oldmask) = curses.mousemask(curses.BUTTON1_PRESSED)
+ if availmask == 0:
+ self.skip('mouse stuff not available')
+ curses.mouseinterval(10)
+ # just verify these don't cause errors
+ curses.ungetmouse(0, 0, 0, 0, curses.BUTTON1_PRESSED)
+ m = curses.getmouse()
def test_userptr_without_set(self):
w = curses.newwin(10, 10)
@@ -285,9 +294,21 @@ class TestCurses(unittest.TestCase):
panel.set_userptr(A())
panel.set_userptr(None)
- @unittest.skipUnless(hasattr(curses, 'resizeterm'),
- 'resizeterm not available')
+ def test_new_curses_panel(self):
+ panel = curses.panel.new_panel(self.stdscr)
+ self.assertRaises(TypeError, type(panel))
+
+ @requires_curses_func('is_term_resized')
+ def test_is_term_resized(self):
+ curses.is_term_resized(*self.stdscr.getmaxyx())
+
+ @requires_curses_func('resize_term')
def test_resize_term(self):
+ curses.resize_term(*self.stdscr.getmaxyx())
+
+ @requires_curses_func('resizeterm')
+ def test_resizeterm(self):
+ stdscr = self.stdscr
lines, cols = curses.LINES, curses.COLS
new_lines = lines - 1
new_cols = cols + 1
@@ -300,8 +321,7 @@ class TestCurses(unittest.TestCase):
curses.ungetch(1025)
self.stdscr.getkey()
- @unittest.skipUnless(hasattr(curses, 'unget_wch'),
- 'unget_wch not available')
+ @requires_curses_func('unget_wch')
def test_unget_wch(self):
stdscr = self.stdscr
encoding = stdscr.encoding
@@ -326,17 +346,14 @@ class TestCurses(unittest.TestCase):
def test_issue10570(self):
b = curses.tparm(curses.tigetstr("cup"), 5, 3)
self.assertIs(type(b), bytes)
- curses.putp(b)
def test_encoding(self):
stdscr = self.stdscr
import codecs
encoding = stdscr.encoding
codecs.lookup(encoding)
-
with self.assertRaises(TypeError):
stdscr.encoding = 10
-
stdscr.encoding = encoding
with self.assertRaises(TypeError):
del stdscr.encoding
@@ -367,8 +384,33 @@ class TestCurses(unittest.TestCase):
# be reasonably certain the generated parsing code will be
# correct too.
human_readable_signature = stdscr.addch.__doc__.split("\n")[0]
- offset = human_readable_signature.find("[y, x,]")
- assert offset >= 0, ""
+ self.assertIn("[y, x,]", human_readable_signature)
+
+
+class MiscTests(unittest.TestCase):
+
+ def test_update_lines_cols(self):
+ # this doesn't actually test that LINES and COLS are updated,
+ # because we can't automate changing them. See Issue #4254 for
+ # a manual test script. We can only test that the function
+ # can be called.
+ curses.update_lines_cols()
+
+
+class TestAscii(unittest.TestCase):
+
+ def test_unctrl(self):
+ unctrl = curses.ascii.unctrl
+ self.assertEqual(unctrl('a'), 'a')
+ self.assertEqual(unctrl('A'), 'A')
+ self.assertEqual(unctrl(';'), ';')
+ self.assertEqual(unctrl(' '), ' ')
+ self.assertEqual(unctrl('\x7f'), '^?')
+ self.assertEqual(unctrl('\n'), '^J')
+ self.assertEqual(unctrl('\0'), '^@')
+ # Meta-bit characters
+ self.assertEqual(unctrl('\x8a'), '!^J')
+ self.assertEqual(unctrl('\xc1'), '!A')
if __name__ == '__main__':
diff --git a/Lib/test/test_datetime.py b/Lib/test/test_datetime.py
index d9ddb32363..2d4eb52c62 100644
--- a/Lib/test/test_datetime.py
+++ b/Lib/test/test_datetime.py
@@ -1,20 +1,20 @@
import unittest
import sys
+
from test.support import import_fresh_module, run_unittest
TESTS = 'test.datetimetester'
-# XXX: import_fresh_module() is supposed to leave sys.module cache untouched,
-# XXX: but it does not, so we have to save and restore it ourselves.
-save_sys_modules = sys.modules.copy()
try:
pure_tests = import_fresh_module(TESTS, fresh=['datetime', '_strptime'],
blocked=['_datetime'])
fast_tests = import_fresh_module(TESTS, fresh=['datetime',
'_datetime', '_strptime'])
finally:
- sys.modules.clear()
- sys.modules.update(save_sys_modules)
+ # XXX: import_fresh_module() is supposed to leave sys.module cache untouched,
+ # XXX: but it does not, so we have to cleanup ourselves.
+ for modname in ['datetime', '_datetime', '_strptime']:
+ sys.modules.pop(modname, None)
test_modules = [pure_tests, fast_tests]
test_suffixes = ["_Pure", "_Fast"]
# XXX(gb) First run all the _Pure tests, then all the _Fast tests. You might
diff --git a/Lib/test/test_dbm_dumb.py b/Lib/test/test_dbm_dumb.py
index dc88ca64dc..ff63c88c0b 100644
--- a/Lib/test/test_dbm_dumb.py
+++ b/Lib/test/test_dbm_dumb.py
@@ -217,6 +217,14 @@ class DumbDBMTestCase(unittest.TestCase):
self.assertEqual(str(cm.exception),
"DBM object has already been closed")
+ def test_create_new(self):
+ with dumbdbm.open(_fname, 'n') as f:
+ for k in self._dict:
+ f[k] = self._dict[k]
+
+ with dumbdbm.open(_fname, 'n') as f:
+ self.assertEqual(f.keys(), [])
+
def test_eval(self):
with open(_fname + '.dir', 'w') as stream:
stream.write("str(print('Hacked!')), 0\n")
diff --git a/Lib/test/test_decimal.py b/Lib/test/test_decimal.py
index a178f6f3cc..c0d21b1c80 100644
--- a/Lib/test/test_decimal.py
+++ b/Lib/test/test_decimal.py
@@ -33,12 +33,13 @@ import unittest
import numbers
import locale
from test.support import (run_unittest, run_doctest, is_resource_enabled,
- requires_IEEE_754)
+ requires_IEEE_754, requires_docstrings)
from test.support import (check_warnings, import_fresh_module, TestFailed,
run_with_locale, cpython_only)
import random
import time
import warnings
+import inspect
try:
import threading
except ImportError:
@@ -4172,11 +4173,8 @@ class CheckAttributes(unittest.TestCase):
self.assertTrue(P.HAVE_THREADS is True or P.HAVE_THREADS is False)
self.assertEqual(C.__version__, P.__version__)
- self.assertEqual(C.__libmpdec_version__, P.__libmpdec_version__)
- x = dir(C)
- y = [s for s in dir(P) if '__' in s or not s.startswith('_')]
- self.assertEqual(set(x) - set(y), set())
+ self.assertEqual(dir(C), dir(P))
def test_context_attributes(self):
@@ -4455,18 +4453,6 @@ class PyCoverage(Coverage):
class PyFunctionality(unittest.TestCase):
"""Extra functionality in decimal.py"""
- def test_py_quantize_watchexp(self):
- # watchexp functionality
- Decimal = P.Decimal
- localcontext = P.localcontext
-
- with localcontext() as c:
- c.prec = 1
- c.Emax = 1
- c.Emin = -1
- x = Decimal(99999).quantize(Decimal("1e3"), watchexp=False)
- self.assertEqual(x, Decimal('1.00E+5'))
-
def test_py_alternate_formatting(self):
# triples giving a format, a Decimal, and the expected result
Decimal = P.Decimal
@@ -5409,6 +5395,143 @@ class CWhitebox(unittest.TestCase):
y = Decimal(10**(9*25)).__sizeof__()
self.assertEqual(y, x+4)
+@requires_docstrings
+@unittest.skipUnless(C, "test requires C version")
+class SignatureTest(unittest.TestCase):
+ """Function signatures"""
+
+ def test_inspect_module(self):
+ for attr in dir(P):
+ if attr.startswith('_'):
+ continue
+ p_func = getattr(P, attr)
+ c_func = getattr(C, attr)
+ if (attr == 'Decimal' or attr == 'Context' or
+ inspect.isfunction(p_func)):
+ p_sig = inspect.signature(p_func)
+ c_sig = inspect.signature(c_func)
+
+ # parameter names:
+ c_names = list(c_sig.parameters.keys())
+ p_names = [x for x in p_sig.parameters.keys() if not
+ x.startswith('_')]
+
+ self.assertEqual(c_names, p_names,
+ msg="parameter name mismatch in %s" % p_func)
+
+ c_kind = [x.kind for x in c_sig.parameters.values()]
+ p_kind = [x[1].kind for x in p_sig.parameters.items() if not
+ x[0].startswith('_')]
+
+ # parameters:
+ if attr != 'setcontext':
+ self.assertEqual(c_kind, p_kind,
+ msg="parameter kind mismatch in %s" % p_func)
+
+ def test_inspect_types(self):
+
+ POS = inspect._ParameterKind.POSITIONAL_ONLY
+ POS_KWD = inspect._ParameterKind.POSITIONAL_OR_KEYWORD
+
+ # Type heuristic (type annotations would help!):
+ pdict = {C: {'other': C.Decimal(1),
+ 'third': C.Decimal(1),
+ 'x': C.Decimal(1),
+ 'y': C.Decimal(1),
+ 'z': C.Decimal(1),
+ 'a': C.Decimal(1),
+ 'b': C.Decimal(1),
+ 'c': C.Decimal(1),
+ 'exp': C.Decimal(1),
+ 'modulo': C.Decimal(1),
+ 'num': "1",
+ 'f': 1.0,
+ 'rounding': C.ROUND_HALF_UP,
+ 'context': C.getcontext()},
+ P: {'other': P.Decimal(1),
+ 'third': P.Decimal(1),
+ 'a': P.Decimal(1),
+ 'b': P.Decimal(1),
+ 'c': P.Decimal(1),
+ 'exp': P.Decimal(1),
+ 'modulo': P.Decimal(1),
+ 'num': "1",
+ 'f': 1.0,
+ 'rounding': P.ROUND_HALF_UP,
+ 'context': P.getcontext()}}
+
+ def mkargs(module, sig):
+ args = []
+ kwargs = {}
+ for name, param in sig.parameters.items():
+ if name == 'self': continue
+ if param.kind == POS:
+ args.append(pdict[module][name])
+ elif param.kind == POS_KWD:
+ kwargs[name] = pdict[module][name]
+ else:
+ raise TestFailed("unexpected parameter kind")
+ return args, kwargs
+
+ def tr(s):
+ """The C Context docstrings use 'x' in order to prevent confusion
+ with the article 'a' in the descriptions."""
+ if s == 'x': return 'a'
+ if s == 'y': return 'b'
+ if s == 'z': return 'c'
+ return s
+
+ def doit(ty):
+ p_type = getattr(P, ty)
+ c_type = getattr(C, ty)
+ for attr in dir(p_type):
+ if attr.startswith('_'):
+ continue
+ p_func = getattr(p_type, attr)
+ c_func = getattr(c_type, attr)
+ if inspect.isfunction(p_func):
+ p_sig = inspect.signature(p_func)
+ c_sig = inspect.signature(c_func)
+
+ # parameter names:
+ p_names = list(p_sig.parameters.keys())
+ c_names = [tr(x) for x in c_sig.parameters.keys()]
+
+ self.assertEqual(c_names, p_names,
+ msg="parameter name mismatch in %s" % p_func)
+
+ p_kind = [x.kind for x in p_sig.parameters.values()]
+ c_kind = [x.kind for x in c_sig.parameters.values()]
+
+ # 'self' parameter:
+ self.assertIs(p_kind[0], POS_KWD)
+ self.assertIs(c_kind[0], POS)
+
+ # remaining parameters:
+ if ty == 'Decimal':
+ self.assertEqual(c_kind[1:], p_kind[1:],
+ msg="parameter kind mismatch in %s" % p_func)
+ else: # Context methods are positional only in the C version.
+ self.assertEqual(len(c_kind), len(p_kind),
+ msg="parameter kind mismatch in %s" % p_func)
+
+ # Run the function:
+ args, kwds = mkargs(C, c_sig)
+ try:
+ getattr(c_type(9), attr)(*args, **kwds)
+ except Exception as err:
+ raise TestFailed("invalid signature for %s: %s %s" % (c_func, args, kwds))
+
+ args, kwds = mkargs(P, p_sig)
+ try:
+ getattr(p_type(9), attr)(*args, **kwds)
+ except Exception as err:
+ raise TestFailed("invalid signature for %s: %s %s" % (p_func, args, kwds))
+
+ doit('Decimal')
+ doit('Context')
+
+
all_tests = [
CExplicitConstructionTest, PyExplicitConstructionTest,
CImplicitConstructionTest, PyImplicitConstructionTest,
@@ -5434,6 +5557,7 @@ if not C:
all_tests = all_tests[1::2]
else:
all_tests.insert(0, CheckAttributes)
+ all_tests.insert(1, SignatureTest)
def test_main(arith=None, verbose=None, todo_tests=None, debug=None):
diff --git a/Lib/test/test_decorators.py b/Lib/test/test_decorators.py
index 53c9469112..d0a2ec9fdd 100644
--- a/Lib/test/test_decorators.py
+++ b/Lib/test/test_decorators.py
@@ -1,5 +1,4 @@
import unittest
-from test import support
def funcattrs(**kwds):
def decorate(func):
@@ -301,9 +300,5 @@ class TestClassDecorators(unittest.TestCase):
class C(object): pass
self.assertEqual(C.extra, 'second')
-def test_main():
- support.run_unittest(TestDecorators)
- support.run_unittest(TestClassDecorators)
-
-if __name__=="__main__":
- test_main()
+if __name__ == "__main__":
+ unittest.main()
diff --git a/Lib/test/test_defaultdict.py b/Lib/test/test_defaultdict.py
index 532d535981..a90bc2b488 100644
--- a/Lib/test/test_defaultdict.py
+++ b/Lib/test/test_defaultdict.py
@@ -5,7 +5,6 @@ import copy
import pickle
import tempfile
import unittest
-from test import support
from collections import defaultdict
@@ -157,8 +156,9 @@ class TestDefaultDict(unittest.TestCase):
def _factory(self):
return []
d = sub()
- self.assertTrue(repr(d).startswith(
- "defaultdict(<bound method sub._factory of defaultdict(..."))
+ self.assertRegex(repr(d),
+ r"defaultdict\(<bound method .*sub\._factory "
+ r"of defaultdict\(\.\.\., \{\}\)>, \{\}\)")
# NOTE: printing a subclass of a builtin type does not call its
# tp_print slot. So this part is essentially the same test as above.
@@ -183,8 +183,5 @@ class TestDefaultDict(unittest.TestCase):
o = pickle.loads(s)
self.assertEqual(d, o)
-def test_main():
- support.run_unittest(TestDefaultDict)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_deque.py b/Lib/test/test_deque.py
index 5ecbc73c99..f525429a17 100644
--- a/Lib/test/test_deque.py
+++ b/Lib/test/test_deque.py
@@ -164,6 +164,26 @@ class TestBasic(unittest.TestCase):
self.assertEqual(x > y, list(x) > list(y), (x,y))
self.assertEqual(x >= y, list(x) >= list(y), (x,y))
+ def test_contains(self):
+ n = 200
+
+ d = deque(range(n))
+ for i in range(n):
+ self.assertTrue(i in d)
+ self.assertTrue((n+1) not in d)
+
+ # Test detection of mutation during iteration
+ d = deque(range(n))
+ d[n//2] = MutateCmp(d, False)
+ with self.assertRaises(RuntimeError):
+ n in d
+
+ # Test detection of comparison exceptions
+ d = deque(range(n))
+ d[n//2] = BadCmp()
+ with self.assertRaises(RuntimeError):
+ n in d
+
def test_extend(self):
d = deque('a')
self.assertRaises(TypeError, d.extend, 1)
@@ -172,6 +192,26 @@ class TestBasic(unittest.TestCase):
d.extend(d)
self.assertEqual(list(d), list('abcdabcd'))
+ def test_add(self):
+ d = deque()
+ e = deque('abc')
+ f = deque('def')
+ self.assertEqual(d + d, deque())
+ self.assertEqual(e + f, deque('abcdef'))
+ self.assertEqual(e + e, deque('abcabc'))
+ self.assertEqual(e + d, deque('abc'))
+ self.assertEqual(d + e, deque('abc'))
+ self.assertIsNot(d + d, deque())
+ self.assertIsNot(e + d, deque('abc'))
+ self.assertIsNot(d + e, deque('abc'))
+
+ g = deque('abcdef', maxlen=4)
+ h = deque('gh')
+ self.assertEqual(g + h, deque('efgh'))
+
+ with self.assertRaises(TypeError):
+ deque('abc') + 'def'
+
def test_iadd(self):
d = deque('a')
d += 'bcd'
@@ -211,6 +251,131 @@ class TestBasic(unittest.TestCase):
self.assertRaises(IndexError, d.__getitem__, 0)
self.assertRaises(IndexError, d.__getitem__, -1)
+ def test_index(self):
+ for n in 1, 2, 30, 40, 200:
+
+ d = deque(range(n))
+ for i in range(n):
+ self.assertEqual(d.index(i), i)
+
+ with self.assertRaises(ValueError):
+ d.index(n+1)
+
+ # Test detection of mutation during iteration
+ d = deque(range(n))
+ d[n//2] = MutateCmp(d, False)
+ with self.assertRaises(RuntimeError):
+ d.index(n)
+
+ # Test detection of comparison exceptions
+ d = deque(range(n))
+ d[n//2] = BadCmp()
+ with self.assertRaises(RuntimeError):
+ d.index(n)
+
+ # Test start and stop arguments behavior matches list.index()
+ elements = 'ABCDEFGHI'
+ nonelement = 'Z'
+ d = deque(elements * 2)
+ s = list(elements * 2)
+ for start in range(-5 - len(s)*2, 5 + len(s) * 2):
+ for stop in range(-5 - len(s)*2, 5 + len(s) * 2):
+ for element in elements + 'Z':
+ try:
+ target = s.index(element, start, stop)
+ except ValueError:
+ with self.assertRaises(ValueError):
+ d.index(element, start, stop)
+ else:
+ self.assertEqual(d.index(element, start, stop), target)
+
+ def test_insert_bug_24913(self):
+ d = deque('A' * 3)
+ with self.assertRaises(ValueError):
+ i = d.index("Hello world", 0, 4)
+
+ def test_insert(self):
+ # Test to make sure insert behaves like lists
+ elements = 'ABCDEFGHI'
+ for i in range(-5 - len(elements)*2, 5 + len(elements) * 2):
+ d = deque('ABCDEFGHI')
+ s = list('ABCDEFGHI')
+ d.insert(i, 'Z')
+ s.insert(i, 'Z')
+ self.assertEqual(list(d), s)
+
+ def test_insert_bug_26194(self):
+ data = 'ABC'
+ d = deque(data, maxlen=len(data))
+ with self.assertRaises(IndexError):
+ d.insert(2, None)
+
+ elements = 'ABCDEFGHI'
+ for i in range(-len(elements), len(elements)):
+ d = deque(elements, maxlen=len(elements)+1)
+ d.insert(i, 'Z')
+ if i >= 0:
+ self.assertEqual(d[i], 'Z')
+ else:
+ self.assertEqual(d[i-1], 'Z')
+
+ def test_imul(self):
+ for n in (-10, -1, 0, 1, 2, 10, 1000):
+ d = deque()
+ d *= n
+ self.assertEqual(d, deque())
+ self.assertIsNone(d.maxlen)
+
+ for n in (-10, -1, 0, 1, 2, 10, 1000):
+ d = deque('a')
+ d *= n
+ self.assertEqual(d, deque('a' * n))
+ self.assertIsNone(d.maxlen)
+
+ for n in (-10, -1, 0, 1, 2, 10, 499, 500, 501, 1000):
+ d = deque('a', 500)
+ d *= n
+ self.assertEqual(d, deque('a' * min(n, 500)))
+ self.assertEqual(d.maxlen, 500)
+
+ for n in (-10, -1, 0, 1, 2, 10, 1000):
+ d = deque('abcdef')
+ d *= n
+ self.assertEqual(d, deque('abcdef' * n))
+ self.assertIsNone(d.maxlen)
+
+ for n in (-10, -1, 0, 1, 2, 10, 499, 500, 501, 1000):
+ d = deque('abcdef', 500)
+ d *= n
+ self.assertEqual(d, deque(('abcdef' * n)[-500:]))
+ self.assertEqual(d.maxlen, 500)
+
+ def test_mul(self):
+ d = deque('abc')
+ self.assertEqual(d * -5, deque())
+ self.assertEqual(d * 0, deque())
+ self.assertEqual(d * 1, deque('abc'))
+ self.assertEqual(d * 2, deque('abcabc'))
+ self.assertEqual(d * 3, deque('abcabcabc'))
+ self.assertIsNot(d * 1, d)
+
+ self.assertEqual(deque() * 0, deque())
+ self.assertEqual(deque() * 1, deque())
+ self.assertEqual(deque() * 5, deque())
+
+ self.assertEqual(-5 * d, deque())
+ self.assertEqual(0 * d, deque())
+ self.assertEqual(1 * d, deque('abc'))
+ self.assertEqual(2 * d, deque('abcabc'))
+ self.assertEqual(3 * d, deque('abcabcabc'))
+
+ d = deque('abc', maxlen=5)
+ self.assertEqual(d * -5, deque())
+ self.assertEqual(d * 0, deque())
+ self.assertEqual(d * 1, deque('abc'))
+ self.assertEqual(d * 2, deque('bcabc'))
+ self.assertEqual(d * 30, deque('bcabc'))
+
def test_setitem(self):
n = 200
d = deque(range(n))
@@ -473,18 +638,45 @@ class TestBasic(unittest.TestCase):
## self.assertEqual(id(e), id(e[-1]))
def test_iterator_pickle(self):
- data = deque(range(200))
+ orig = deque(range(200))
+ data = [i*1.01 for i in orig]
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
- it = itorg = iter(data)
- d = pickle.dumps(it, proto)
- it = pickle.loads(d)
- self.assertEqual(type(itorg), type(it))
- self.assertEqual(list(it), list(data))
-
- it = pickle.loads(d)
- next(it)
- d = pickle.dumps(it, proto)
- self.assertEqual(list(it), list(data)[1:])
+ # initial iterator
+ itorg = iter(orig)
+ dump = pickle.dumps((itorg, orig), proto)
+ it, d = pickle.loads(dump)
+ for i, x in enumerate(data):
+ d[i] = x
+ self.assertEqual(type(it), type(itorg))
+ self.assertEqual(list(it), data)
+
+ # running iterator
+ next(itorg)
+ dump = pickle.dumps((itorg, orig), proto)
+ it, d = pickle.loads(dump)
+ for i, x in enumerate(data):
+ d[i] = x
+ self.assertEqual(type(it), type(itorg))
+ self.assertEqual(list(it), data[1:])
+
+ # empty iterator
+ for i in range(1, len(data)):
+ next(itorg)
+ dump = pickle.dumps((itorg, orig), proto)
+ it, d = pickle.loads(dump)
+ for i, x in enumerate(data):
+ d[i] = x
+ self.assertEqual(type(it), type(itorg))
+ self.assertEqual(list(it), [])
+
+ # exhausted iterator
+ self.assertRaises(StopIteration, next, itorg)
+ dump = pickle.dumps((itorg, orig), proto)
+ it, d = pickle.loads(dump)
+ for i, x in enumerate(data):
+ d[i] = x
+ self.assertEqual(type(it), type(itorg))
+ self.assertEqual(list(it), [])
def test_deepcopy(self):
mut = [10]
@@ -504,10 +696,24 @@ class TestBasic(unittest.TestCase):
self.assertNotEqual(id(d), id(e))
self.assertEqual(list(d), list(e))
+ def test_copy_method(self):
+ mut = [10]
+ d = deque([mut])
+ e = d.copy()
+ self.assertEqual(list(d), list(e))
+ mut[0] = 11
+ self.assertNotEqual(id(d), id(e))
+ self.assertEqual(list(d), list(e))
+
def test_reversed(self):
for s in ('abcd', range(2000)):
self.assertEqual(list(reversed(deque(s))), list(reversed(s)))
+ def test_reversed_new(self):
+ klass = type(reversed(deque()))
+ for s in ('abcd', range(2000)):
+ self.assertEqual(list(klass(deque(s))), list(reversed(s)))
+
def test_gc_doesnt_blowup(self):
import gc
# This used to assert-fail in deque_traverse() under a debug
@@ -537,9 +743,9 @@ class TestBasic(unittest.TestCase):
@support.cpython_only
def test_sizeof(self):
- BLOCKLEN = 62
- basesize = support.calcobjsize('2P4nlP')
- blocksize = struct.calcsize('2P%dP' % BLOCKLEN)
+ BLOCKLEN = 64
+ basesize = support.calcvobjsize('2P4nP')
+ blocksize = struct.calcsize('P%dPP' % BLOCKLEN)
self.assertEqual(object.__sizeof__(deque()), basesize)
check = self.check_sizeof
check(deque(), basesize + blocksize)
@@ -684,6 +890,25 @@ class TestSubclassWithKwargs(unittest.TestCase):
# SF bug #1486663 -- this used to erroneously raise a TypeError
SubclassWithKwargs(newarg=1)
+class TestSequence(seq_tests.CommonTest):
+ type2test = deque
+
+ def test_getitem(self):
+ # For now, bypass tests that require slicing
+ pass
+
+ def test_getslice(self):
+ # For now, bypass tests that require slicing
+ pass
+
+ def test_subscript(self):
+ # For now, bypass tests that require slicing
+ pass
+
+ def test_free_after_iterating(self):
+ # For now, bypass tests that require slicing
+ self.skipTest("Exhausted deque iterator doesn't free a deque")
+
#==============================================================================
libreftest = """
@@ -798,6 +1023,7 @@ def test_main(verbose=None):
TestVariousIteratorArgs,
TestSubclass,
TestSubclassWithKwargs,
+ TestSequence,
)
support.run_unittest(*test_classes)
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index 64a4a364f7..a130cecb89 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -21,6 +21,7 @@ class OperatorsTest(unittest.TestCase):
'add': '+',
'sub': '-',
'mul': '*',
+ 'matmul': '@',
'truediv': '/',
'floordiv': '//',
'divmod': 'divmod',
@@ -1019,6 +1020,67 @@ order (MRO) for bases """
self.assertEqual(x.foo, 1)
self.assertEqual(x.__dict__, {'foo': 1})
+ def test_object_class_assignment_between_heaptypes_and_nonheaptypes(self):
+ class SubType(types.ModuleType):
+ a = 1
+
+ m = types.ModuleType("m")
+ self.assertTrue(m.__class__ is types.ModuleType)
+ self.assertFalse(hasattr(m, "a"))
+
+ m.__class__ = SubType
+ self.assertTrue(m.__class__ is SubType)
+ self.assertTrue(hasattr(m, "a"))
+
+ m.__class__ = types.ModuleType
+ self.assertTrue(m.__class__ is types.ModuleType)
+ self.assertFalse(hasattr(m, "a"))
+
+ # Make sure that builtin immutable objects don't support __class__
+ # assignment, because the object instances may be interned.
+ # We set __slots__ = () to ensure that the subclasses are
+ # memory-layout compatible, and thus otherwise reasonable candidates
+ # for __class__ assignment.
+
+ # The following types have immutable instances, but are not
+ # subclassable and thus don't need to be checked:
+ # NoneType, bool
+
+ class MyInt(int):
+ __slots__ = ()
+ with self.assertRaises(TypeError):
+ (1).__class__ = MyInt
+
+ class MyFloat(float):
+ __slots__ = ()
+ with self.assertRaises(TypeError):
+ (1.0).__class__ = MyFloat
+
+ class MyComplex(complex):
+ __slots__ = ()
+ with self.assertRaises(TypeError):
+ (1 + 2j).__class__ = MyComplex
+
+ class MyStr(str):
+ __slots__ = ()
+ with self.assertRaises(TypeError):
+ "a".__class__ = MyStr
+
+ class MyBytes(bytes):
+ __slots__ = ()
+ with self.assertRaises(TypeError):
+ b"a".__class__ = MyBytes
+
+ class MyTuple(tuple):
+ __slots__ = ()
+ with self.assertRaises(TypeError):
+ ().__class__ = MyTuple
+
+ class MyFrozenSet(frozenset):
+ __slots__ = ()
+ with self.assertRaises(TypeError):
+ frozenset().__class__ = MyFrozenSet
+
def test_slots(self):
# Testing __slots__...
class C0(object):
@@ -2005,7 +2067,7 @@ order (MRO) for bases """
self.assertIs(raw.fset, C.__dict__['setx'])
self.assertIs(raw.fdel, C.__dict__['delx'])
- for attr in "__doc__", "fget", "fset", "fdel":
+ for attr in "fget", "fset", "fdel":
try:
setattr(raw, attr, 42)
except AttributeError as msg:
@@ -2016,6 +2078,9 @@ order (MRO) for bases """
self.fail("expected AttributeError from trying to set readonly %r "
"attr on a property" % attr)
+ raw.__doc__ = 42
+ self.assertEqual(raw.__doc__, 42)
+
class D(object):
__getitem__ = property(lambda s: 1/0)
@@ -3003,8 +3068,6 @@ order (MRO) for bases """
cant(object(), list)
cant(list(), object)
class Int(int): __slots__ = []
- cant(2, Int)
- cant(Int(), int)
cant(True, int)
cant(2, bool)
o = object()
@@ -3324,7 +3387,7 @@ order (MRO) for bases """
A.__call__ = A()
try:
A()()
- except RuntimeError:
+ except RecursionError:
pass
else:
self.fail("Recursion limit should have been reached for __call__()")
@@ -3426,7 +3489,7 @@ order (MRO) for bases """
b.a = a
z = deepcopy(a) # This blew up before
- def test_unintialized_modules(self):
+ def test_uninitialized_modules(self):
# Testing uninitialized module objects...
from types import ModuleType as M
m = M.__new__(M)
@@ -4184,6 +4247,7 @@ order (MRO) for bases """
('__add__', 'x + y', 'x += y'),
('__sub__', 'x - y', 'x -= y'),
('__mul__', 'x * y', 'x *= y'),
+ ('__matmul__', 'x @ y', 'x @= y'),
('__truediv__', 'x / y', 'x /= y'),
('__floordiv__', 'x // y', 'x //= y'),
('__mod__', 'x % y', 'x %= y'),
@@ -4329,8 +4393,8 @@ order (MRO) for bases """
pass
Foo.__repr__ = Foo.__str__
foo = Foo()
- self.assertRaises(RuntimeError, str, foo)
- self.assertRaises(RuntimeError, repr, foo)
+ self.assertRaises(RecursionError, str, foo)
+ self.assertRaises(RecursionError, repr, foo)
def test_mixing_slot_wrappers(self):
class X(dict):
@@ -4445,6 +4509,61 @@ order (MRO) for bases """
self.assertIn("__dict__", Base.__dict__)
self.assertNotIn("__dict__", Sub.__dict__)
+ def test_bound_method_repr(self):
+ class Foo:
+ def method(self):
+ pass
+ self.assertRegex(repr(Foo().method),
+ r"<bound method .*Foo\.method of <.*Foo object at .*>>")
+
+
+ class Base:
+ def method(self):
+ pass
+ class Derived1(Base):
+ pass
+ class Derived2(Base):
+ def method(self):
+ pass
+ base = Base()
+ derived1 = Derived1()
+ derived2 = Derived2()
+ super_d2 = super(Derived2, derived2)
+ self.assertRegex(repr(base.method),
+ r"<bound method .*Base\.method of <.*Base object at .*>>")
+ self.assertRegex(repr(derived1.method),
+ r"<bound method .*Base\.method of <.*Derived1 object at .*>>")
+ self.assertRegex(repr(derived2.method),
+ r"<bound method .*Derived2\.method of <.*Derived2 object at .*>>")
+ self.assertRegex(repr(super_d2.method),
+ r"<bound method .*Base\.method of <.*Derived2 object at .*>>")
+
+ class Foo:
+ @classmethod
+ def method(cls):
+ pass
+ foo = Foo()
+ self.assertRegex(repr(foo.method), # access via instance
+ r"<bound method .*Foo\.method of <class '.*Foo'>>")
+ self.assertRegex(repr(Foo.method), # access via the class
+ r"<bound method .*Foo\.method of <class '.*Foo'>>")
+
+
+ class MyCallable:
+ def __call__(self, arg):
+ pass
+ func = MyCallable() # func has no __name__ or __qualname__ attributes
+ instance = object()
+ method = types.MethodType(func, instance)
+ self.assertRegex(repr(method),
+ r"<bound method \? of <object object at .*>>")
+ func.__name__ = "name"
+ self.assertRegex(repr(method),
+ r"<bound method name of <object object at .*>>")
+ func.__qualname__ = "qualname"
+ self.assertRegex(repr(method),
+ r"<bound method qualname of <object object at .*>>")
+
class DictProxyTests(unittest.TestCase):
def setUp(self):
@@ -4559,26 +4678,15 @@ class PicklingTests(unittest.TestCase):
def _check_reduce(self, proto, obj, args=(), kwargs={}, state=None,
listitems=None, dictitems=None):
- if proto >= 4:
+ if proto >= 2:
reduce_value = obj.__reduce_ex__(proto)
- self.assertEqual(reduce_value[:3],
- (copyreg.__newobj_ex__,
- (type(obj), args, kwargs),
- state))
- if listitems is not None:
- self.assertListEqual(list(reduce_value[3]), listitems)
- else:
- self.assertIsNone(reduce_value[3])
- if dictitems is not None:
- self.assertDictEqual(dict(reduce_value[4]), dictitems)
+ if kwargs:
+ self.assertEqual(reduce_value[0], copyreg.__newobj_ex__)
+ self.assertEqual(reduce_value[1], (type(obj), args, kwargs))
else:
- self.assertIsNone(reduce_value[4])
- elif proto >= 2:
- reduce_value = obj.__reduce_ex__(proto)
- self.assertEqual(reduce_value[:3],
- (copyreg.__newobj__,
- (type(obj),) + args,
- state))
+ self.assertEqual(reduce_value[0], copyreg.__newobj__)
+ self.assertEqual(reduce_value[1], (type(obj),) + args)
+ self.assertEqual(reduce_value[2], state)
if listitems is not None:
self.assertListEqual(list(reduce_value[3]), listitems)
else:
@@ -4973,10 +5081,6 @@ class PicklingTests(unittest.TestCase):
with self.subTest(cls=cls):
kwargs = getattr(cls, 'KWARGS', {})
obj = cls(*cls.ARGS, **kwargs)
- # XXX: We need to modify the copy module to support PEP 3154's
- # reduce protocol 4.
- if hasattr(cls, '__getnewargs_ex__'):
- continue
objcopy = deepcopy(obj)
self._assert_is_copy(obj, objcopy)
# For test classes that supports this, make sure we didn't go
diff --git a/Lib/test/test_dict.py b/Lib/test/test_dict.py
index 80feb903a9..6d68e761c6 100644
--- a/Lib/test/test_dict.py
+++ b/Lib/test/test_dict.py
@@ -861,7 +861,7 @@ class DictTest(unittest.TestCase):
itorg = iter(data.items())
d = pickle.dumps(itorg, proto)
it = pickle.loads(d)
- # note that the type of type of the unpickled iterator
+ # note that the type of the unpickled iterator
# is not necessarily the same as the original. It is
# merely an object supporting the iterator protocol, yielding
# the same objects as the original one.
@@ -952,6 +952,12 @@ class DictTest(unittest.TestCase):
d = {X(): 0, 1: 1}
self.assertRaises(RuntimeError, d.update, other)
+ def test_free_after_iterating(self):
+ support.check_free_after_iterating(self, iter, dict)
+ support.check_free_after_iterating(self, lambda d: iter(d.keys()), dict)
+ support.check_free_after_iterating(self, lambda d: iter(d.values()), dict)
+ support.check_free_after_iterating(self, lambda d: iter(d.items()), dict)
+
from test import mapping_tests
class GeneralMappingTests(mapping_tests.BasicTestMappingProtocol):
@@ -963,12 +969,5 @@ class Dict(dict):
class SubclassMappingTests(mapping_tests.BasicTestMappingProtocol):
type2test = Dict
-def test_main():
- support.run_unittest(
- DictTest,
- GeneralMappingTests,
- SubclassMappingTests,
- )
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_dictviews.py b/Lib/test/test_dictviews.py
index 5f2144a029..ab23ca1cf7 100644
--- a/Lib/test/test_dictviews.py
+++ b/Lib/test/test_dictviews.py
@@ -1,7 +1,6 @@
import copy
import pickle
import unittest
-from test import support
class DictSetTest(unittest.TestCase):
@@ -202,7 +201,7 @@ class DictSetTest(unittest.TestCase):
def test_recursive_repr(self):
d = {}
d[42] = d.values()
- self.assertRaises(RuntimeError, repr, d)
+ self.assertRaises(RecursionError, repr, d)
def test_copy(self):
d = {1: 10, "a": "ABC"}
@@ -221,8 +220,5 @@ class DictSetTest(unittest.TestCase):
pickle.dumps, d.items(), proto)
-def test_main():
- support.run_unittest(DictSetTest)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_difflib.py b/Lib/test/test_difflib.py
index 0ba8f0e05b..ab9debf8e2 100644
--- a/Lib/test/test_difflib.py
+++ b/Lib/test/test_difflib.py
@@ -107,6 +107,20 @@ patch914575_to1 = """
5. Flat is better than nested.
"""
+patch914575_nonascii_from1 = """
+ 1. Beautiful is beTTer than ugly.
+ 2. Explicit is better than ımplıcıt.
+ 3. Simple is better than complex.
+ 4. Complex is better than complicated.
+"""
+
+patch914575_nonascii_to1 = """
+ 1. Beautiful is better than ügly.
+ 3. Sımple is better than complex.
+ 4. Complicated is better than cömplex.
+ 5. Flat is better than nested.
+"""
+
patch914575_from2 = """
\t\tLine 1: preceeded by from:[tt] to:[ssss]
\t\tLine 2: preceeded by from:[sstt] to:[sssst]
@@ -223,6 +237,27 @@ class TestSFpatches(unittest.TestCase):
new = [(i%2 and "K:%d" or "V:B:%d") % i for i in range(limit*2)]
difflib.SequenceMatcher(None, old, new).get_opcodes()
+ def test_make_file_default_charset(self):
+ html_diff = difflib.HtmlDiff()
+ output = html_diff.make_file(patch914575_from1.splitlines(),
+ patch914575_to1.splitlines())
+ self.assertIn('content="text/html; charset=utf-8"', output)
+
+ def test_make_file_iso88591_charset(self):
+ html_diff = difflib.HtmlDiff()
+ output = html_diff.make_file(patch914575_from1.splitlines(),
+ patch914575_to1.splitlines(),
+ charset='iso-8859-1')
+ self.assertIn('content="text/html; charset=iso-8859-1"', output)
+
+ def test_make_file_usascii_charset_with_nonascii_input(self):
+ html_diff = difflib.HtmlDiff()
+ output = html_diff.make_file(patch914575_nonascii_from1.splitlines(),
+ patch914575_nonascii_to1.splitlines(),
+ charset='us-ascii')
+ self.assertIn('content="text/html; charset=us-ascii"', output)
+ self.assertIn('&#305;mpl&#305;c&#305;t', output)
+
class TestOutputFormat(unittest.TestCase):
def test_tab_delimiter(self):
@@ -287,12 +322,157 @@ class TestOutputFormat(unittest.TestCase):
self.assertEqual(fmt(0,0), '0')
+class TestBytes(unittest.TestCase):
+ # don't really care about the content of the output, just the fact
+ # that it's bytes and we don't crash
+ def check(self, diff):
+ diff = list(diff) # trigger exceptions first
+ for line in diff:
+ self.assertIsInstance(
+ line, bytes,
+ "all lines of diff should be bytes, but got: %r" % line)
+
+ def test_byte_content(self):
+ # if we receive byte strings, we return byte strings
+ a = [b'hello', b'andr\xe9'] # iso-8859-1 bytes
+ b = [b'hello', b'andr\xc3\xa9'] # utf-8 bytes
+
+ unified = difflib.unified_diff
+ context = difflib.context_diff
+
+ check = self.check
+ check(difflib.diff_bytes(unified, a, a))
+ check(difflib.diff_bytes(unified, a, b))
+
+ # now with filenames (content and filenames are all bytes!)
+ check(difflib.diff_bytes(unified, a, a, b'a', b'a'))
+ check(difflib.diff_bytes(unified, a, b, b'a', b'b'))
+
+ # and with filenames and dates
+ check(difflib.diff_bytes(unified, a, a, b'a', b'a', b'2005', b'2013'))
+ check(difflib.diff_bytes(unified, a, b, b'a', b'b', b'2005', b'2013'))
+
+ # same all over again, with context diff
+ check(difflib.diff_bytes(context, a, a))
+ check(difflib.diff_bytes(context, a, b))
+ check(difflib.diff_bytes(context, a, a, b'a', b'a'))
+ check(difflib.diff_bytes(context, a, b, b'a', b'b'))
+ check(difflib.diff_bytes(context, a, a, b'a', b'a', b'2005', b'2013'))
+ check(difflib.diff_bytes(context, a, b, b'a', b'b', b'2005', b'2013'))
+
+ def test_byte_filenames(self):
+ # somebody renamed a file from ISO-8859-2 to UTF-8
+ fna = b'\xb3odz.txt' # "Å‚odz.txt"
+ fnb = b'\xc5\x82odz.txt'
+
+ # they transcoded the content at the same time
+ a = [b'\xa3odz is a city in Poland.']
+ b = [b'\xc5\x81odz is a city in Poland.']
+
+ check = self.check
+ unified = difflib.unified_diff
+ context = difflib.context_diff
+ check(difflib.diff_bytes(unified, a, b, fna, fnb))
+ check(difflib.diff_bytes(context, a, b, fna, fnb))
+
+ def assertDiff(expect, actual):
+ # do not compare expect and equal as lists, because unittest
+ # uses difflib to report difference between lists
+ actual = list(actual)
+ self.assertEqual(len(expect), len(actual))
+ for e, a in zip(expect, actual):
+ self.assertEqual(e, a)
+
+ expect = [
+ b'--- \xb3odz.txt',
+ b'+++ \xc5\x82odz.txt',
+ b'@@ -1 +1 @@',
+ b'-\xa3odz is a city in Poland.',
+ b'+\xc5\x81odz is a city in Poland.',
+ ]
+ actual = difflib.diff_bytes(unified, a, b, fna, fnb, lineterm=b'')
+ assertDiff(expect, actual)
+
+ # with dates (plain ASCII)
+ datea = b'2005-03-18'
+ dateb = b'2005-03-19'
+ check(difflib.diff_bytes(unified, a, b, fna, fnb, datea, dateb))
+ check(difflib.diff_bytes(context, a, b, fna, fnb, datea, dateb))
+
+ expect = [
+ # note the mixed encodings here: this is deeply wrong by every
+ # tenet of Unicode, but it doesn't crash, it's parseable by
+ # patch, and it's how UNIX(tm) diff behaves
+ b'--- \xb3odz.txt\t2005-03-18',
+ b'+++ \xc5\x82odz.txt\t2005-03-19',
+ b'@@ -1 +1 @@',
+ b'-\xa3odz is a city in Poland.',
+ b'+\xc5\x81odz is a city in Poland.',
+ ]
+ actual = difflib.diff_bytes(unified, a, b, fna, fnb, datea, dateb,
+ lineterm=b'')
+ assertDiff(expect, actual)
+
+ def test_mixed_types_content(self):
+ # type of input content must be consistent: all str or all bytes
+ a = [b'hello']
+ b = ['hello']
+
+ unified = difflib.unified_diff
+ context = difflib.context_diff
+
+ expect = "lines to compare must be str, not bytes (b'hello')"
+ self._assert_type_error(expect, unified, a, b)
+ self._assert_type_error(expect, unified, b, a)
+ self._assert_type_error(expect, context, a, b)
+ self._assert_type_error(expect, context, b, a)
+
+ expect = "all arguments must be bytes, not str ('hello')"
+ self._assert_type_error(expect, difflib.diff_bytes, unified, a, b)
+ self._assert_type_error(expect, difflib.diff_bytes, unified, b, a)
+ self._assert_type_error(expect, difflib.diff_bytes, context, a, b)
+ self._assert_type_error(expect, difflib.diff_bytes, context, b, a)
+
+ def test_mixed_types_filenames(self):
+ # cannot pass filenames as bytes if content is str (this may not be
+ # the right behaviour, but at least the test demonstrates how
+ # things work)
+ a = ['hello\n']
+ b = ['ohell\n']
+ fna = b'ol\xe9.txt' # filename transcoded from ISO-8859-1
+ fnb = b'ol\xc3a9.txt' # to UTF-8
+ self._assert_type_error(
+ "all arguments must be str, not: b'ol\\xe9.txt'",
+ difflib.unified_diff, a, b, fna, fnb)
+
+ def test_mixed_types_dates(self):
+ # type of dates must be consistent with type of contents
+ a = [b'foo\n']
+ b = [b'bar\n']
+ datea = '1 fév'
+ dateb = '3 fév'
+ self._assert_type_error(
+ "all arguments must be bytes, not str ('1 fév')",
+ difflib.diff_bytes, difflib.unified_diff,
+ a, b, b'a', b'b', datea, dateb)
+
+ # if input is str, non-ASCII dates are fine
+ a = ['foo\n']
+ b = ['bar\n']
+ list(difflib.unified_diff(a, b, 'a', 'b', datea, dateb))
+
+ def _assert_type_error(self, msg, generator, *args):
+ with self.assertRaises(TypeError) as ctx:
+ list(generator(*args))
+ self.assertEqual(msg, str(ctx.exception))
+
+
def test_main():
difflib.HtmlDiff._default_prefix = 0
Doctests = doctest.DocTestSuite(difflib)
run_unittest(
TestWithAscii, TestAutojunk, TestSFpatches, TestSFbugs,
- TestOutputFormat, Doctests)
+ TestOutputFormat, TestBytes, Doctests)
if __name__ == '__main__':
test_main()
diff --git a/Lib/test/test_difflib_expect.html b/Lib/test/test_difflib_expect.html
index 71b6d7a862..ea7a24ef4b 100644
--- a/Lib/test/test_difflib_expect.html
+++ b/Lib/test/test_difflib_expect.html
@@ -6,7 +6,7 @@
<head>
<meta http-equiv="Content-Type"
- content="text/html; charset=ISO-8859-1" />
+ content="text/html; charset=utf-8" />
<title></title>
<style type="text/css">
table.diff {font-family:Courier; border:medium;}
diff --git a/Lib/test/test_dis.py b/Lib/test/test_dis.py
index b8daff725c..0fd1348027 100644
--- a/Lib/test/test_dis.py
+++ b/Lib/test/test_dis.py
@@ -1,6 +1,6 @@
# Minimal tests for dis module
-from test.support import run_unittest, captured_stdout
+from test.support import captured_stdout
from test.bytecode_helper import BytecodeTestCase
import difflib
import unittest
@@ -30,8 +30,16 @@ class _C:
def __init__(self, x):
self.x = x == 1
+ @staticmethod
+ def sm(x):
+ x = x == 1
+
+ @classmethod
+ def cm(cls, x):
+ cls.x = x == 1
+
dis_c_instance_method = """\
- %-4d 0 LOAD_FAST 1 (x)
+%3d 0 LOAD_FAST 1 (x)
3 LOAD_CONST 1 (1)
6 COMPARE_OP 2 (==)
9 LOAD_FAST 0 (self)
@@ -50,17 +58,48 @@ dis_c_instance_method_bytes = """\
18 RETURN_VALUE
"""
+dis_c_class_method = """\
+%3d 0 LOAD_FAST 1 (x)
+ 3 LOAD_CONST 1 (1)
+ 6 COMPARE_OP 2 (==)
+ 9 LOAD_FAST 0 (cls)
+ 12 STORE_ATTR 0 (x)
+ 15 LOAD_CONST 0 (None)
+ 18 RETURN_VALUE
+""" % (_C.cm.__code__.co_firstlineno + 2,)
+
+dis_c_static_method = """\
+%3d 0 LOAD_FAST 0 (x)
+ 3 LOAD_CONST 1 (1)
+ 6 COMPARE_OP 2 (==)
+ 9 STORE_FAST 0 (x)
+ 12 LOAD_CONST 0 (None)
+ 15 RETURN_VALUE
+""" % (_C.sm.__code__.co_firstlineno + 2,)
+
+# Class disassembling info has an extra newline at end.
+dis_c = """\
+Disassembly of %s:
+%s
+Disassembly of %s:
+%s
+Disassembly of %s:
+%s
+""" % (_C.__init__.__name__, dis_c_instance_method,
+ _C.cm.__name__, dis_c_class_method,
+ _C.sm.__name__, dis_c_static_method)
+
def _f(a):
print(a)
return 1
dis_f = """\
- %-4d 0 LOAD_GLOBAL 0 (print)
+%3d 0 LOAD_GLOBAL 0 (print)
3 LOAD_FAST 0 (a)
6 CALL_FUNCTION 1 (1 positional, 0 keyword pair)
9 POP_TOP
- %-4d 10 LOAD_CONST 1 (1)
+%3d 10 LOAD_CONST 1 (1)
13 RETURN_VALUE
""" % (_f.__code__.co_firstlineno + 1,
_f.__code__.co_firstlineno + 2)
@@ -82,17 +121,17 @@ def bug708901():
pass
dis_bug708901 = """\
- %-4d 0 SETUP_LOOP 23 (to 26)
+%3d 0 SETUP_LOOP 23 (to 26)
3 LOAD_GLOBAL 0 (range)
6 LOAD_CONST 1 (1)
- %-4d 9 LOAD_CONST 2 (10)
+%3d 9 LOAD_CONST 2 (10)
12 CALL_FUNCTION 2 (2 positional, 0 keyword pair)
15 GET_ITER
>> 16 FOR_ITER 6 (to 25)
19 STORE_FAST 0 (res)
- %-4d 22 JUMP_ABSOLUTE 16
+%3d 22 JUMP_ABSOLUTE 16
>> 25 POP_BLOCK
>> 26 LOAD_CONST 0 (None)
29 RETURN_VALUE
@@ -191,16 +230,16 @@ dis_compound_stmt_str = """\
"""
dis_traceback = """\
- %-4d 0 SETUP_EXCEPT 12 (to 15)
+%3d 0 SETUP_EXCEPT 12 (to 15)
- %-4d 3 LOAD_CONST 1 (1)
+%3d 3 LOAD_CONST 1 (1)
6 LOAD_CONST 2 (0)
--> 9 BINARY_TRUE_DIVIDE
10 POP_TOP
11 POP_BLOCK
12 JUMP_FORWARD 46 (to 61)
- %-4d >> 15 DUP_TOP
+%3d >> 15 DUP_TOP
16 LOAD_GLOBAL 0 (Exception)
19 COMPARE_OP 10 (exception match)
22 POP_JUMP_IF_FALSE 60
@@ -209,7 +248,7 @@ dis_traceback = """\
29 POP_TOP
30 SETUP_FINALLY 14 (to 47)
- %-4d 33 LOAD_FAST 0 (e)
+%3d 33 LOAD_FAST 0 (e)
36 LOAD_ATTR 1 (__traceback__)
39 STORE_FAST 1 (tb)
42 POP_BLOCK
@@ -222,7 +261,7 @@ dis_traceback = """\
57 JUMP_FORWARD 1 (to 61)
>> 60 END_FINALLY
- %-4d >> 61 LOAD_FAST 1 (tb)
+%3d >> 61 LOAD_FAST 1 (tb)
64 RETURN_VALUE
""" % (TRACEBACK_CODE.co_firstlineno + 1,
TRACEBACK_CODE.co_firstlineno + 2,
@@ -230,6 +269,9 @@ dis_traceback = """\
TRACEBACK_CODE.co_firstlineno + 4,
TRACEBACK_CODE.co_firstlineno + 5)
+def _g(x):
+ yield x
+
class DisTests(unittest.TestCase):
def get_disassembly(self, func, lasti=-1, wrapper=True):
@@ -308,13 +350,27 @@ class DisTests(unittest.TestCase):
def test_disassemble_bytes(self):
self.do_disassembly_test(_f.__code__.co_code, dis_f_co_code)
- def test_disassemble_method(self):
+ def test_disassemble_class(self):
+ self.do_disassembly_test(_C, dis_c)
+
+ def test_disassemble_instance_method(self):
self.do_disassembly_test(_C(1).__init__, dis_c_instance_method)
- def test_disassemble_method_bytes(self):
+ def test_disassemble_instance_method_bytes(self):
method_bytecode = _C(1).__init__.__code__.co_code
self.do_disassembly_test(method_bytecode, dis_c_instance_method_bytes)
+ def test_disassemble_static_method(self):
+ self.do_disassembly_test(_C.sm, dis_c_static_method)
+
+ def test_disassemble_class_method(self):
+ self.do_disassembly_test(_C.cm, dis_c_class_method)
+
+ def test_disassemble_generator(self):
+ gen_func_disas = self.get_disassembly(_g) # Disassemble generator function
+ gen_disas = self.get_disassembly(_g(1)) # Disassemble generator itself
+ self.assertEqual(gen_disas, gen_func_disas)
+
def test_dis_none(self):
try:
del sys.last_traceback
@@ -472,6 +528,24 @@ Constants:
Names:
0: x"""
+
+async def async_def():
+ await 1
+ async for a in b: pass
+ async with c as d: pass
+
+code_info_async_def = """\
+Name: async_def
+Filename: (.*)
+Argument count: 0
+Kw-only arguments: 0
+Number of locals: 2
+Stack size: 17
+Flags: OPTIMIZED, NEWLOCALS, GENERATOR, NOFREE, COROUTINE
+Constants:
+ 0: None
+ 1: 1"""
+
class CodeInfoTests(unittest.TestCase):
test_pairs = [
(dis.code_info, code_info_code_info),
@@ -480,6 +554,7 @@ class CodeInfoTests(unittest.TestCase):
(expr_str, code_info_expr_str),
(simple_stmt_str, code_info_simple_stmt_str),
(compound_stmt_str, code_info_compound_stmt_str),
+ (async_def, code_info_async_def)
]
def test_code_info(self):
@@ -561,10 +636,10 @@ expected_jumpy_line = 1
#_instructions = dis.get_instructions(outer, first_line=expected_outer_line)
#print('expected_opinfo_outer = [\n ',
#',\n '.join(map(str, _instructions)), ',\n]', sep='')
-#_instructions = dis.get_instructions(outer(), first_line=expected_outer_line)
+#_instructions = dis.get_instructions(outer(), first_line=expected_f_line)
#print('expected_opinfo_f = [\n ',
#',\n '.join(map(str, _instructions)), ',\n]', sep='')
-#_instructions = dis.get_instructions(outer()(), first_line=expected_outer_line)
+#_instructions = dis.get_instructions(outer()(), first_line=expected_inner_line)
#print('expected_opinfo_inner = [\n ',
#',\n '.join(map(str, _instructions)), ',\n]', sep='')
#_instructions = dis.get_instructions(jumpy, first_line=expected_jumpy_line)
@@ -635,12 +710,12 @@ expected_opinfo_inner = [
]
expected_opinfo_jumpy = [
- Instruction(opname='SETUP_LOOP', opcode=120, arg=74, argval=77, argrepr='to 77', offset=0, starts_line=3, is_jump_target=False),
+ Instruction(opname='SETUP_LOOP', opcode=120, arg=68, argval=71, argrepr='to 71', offset=0, starts_line=3, is_jump_target=False),
Instruction(opname='LOAD_GLOBAL', opcode=116, arg=0, argval='range', argrepr='range', offset=3, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_CONST', opcode=100, arg=1, argval=10, argrepr='10', offset=6, starts_line=None, is_jump_target=False),
Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='1 positional, 0 keyword pair', offset=9, starts_line=None, is_jump_target=False),
Instruction(opname='GET_ITER', opcode=68, arg=None, argval=None, argrepr='', offset=12, starts_line=None, is_jump_target=False),
- Instruction(opname='FOR_ITER', opcode=93, arg=50, argval=66, argrepr='to 66', offset=13, starts_line=None, is_jump_target=True),
+ Instruction(opname='FOR_ITER', opcode=93, arg=44, argval=60, argrepr='to 60', offset=13, starts_line=None, is_jump_target=True),
Instruction(opname='STORE_FAST', opcode=125, arg=0, argval='i', argrepr='i', offset=16, starts_line=None, is_jump_target=False),
Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=19, starts_line=4, is_jump_target=False),
Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=22, starts_line=None, is_jump_target=False),
@@ -649,92 +724,89 @@ expected_opinfo_jumpy = [
Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=29, starts_line=5, is_jump_target=False),
Instruction(opname='LOAD_CONST', opcode=100, arg=2, argval=4, argrepr='4', offset=32, starts_line=None, is_jump_target=False),
Instruction(opname='COMPARE_OP', opcode=107, arg=0, argval='<', argrepr='<', offset=35, starts_line=None, is_jump_target=False),
- Instruction(opname='POP_JUMP_IF_FALSE', opcode=114, arg=47, argval=47, argrepr='', offset=38, starts_line=None, is_jump_target=False),
+ Instruction(opname='POP_JUMP_IF_FALSE', opcode=114, arg=44, argval=44, argrepr='', offset=38, starts_line=None, is_jump_target=False),
Instruction(opname='JUMP_ABSOLUTE', opcode=113, arg=13, argval=13, argrepr='', offset=41, starts_line=6, is_jump_target=False),
- Instruction(opname='JUMP_FORWARD', opcode=110, arg=0, argval=47, argrepr='to 47', offset=44, starts_line=None, is_jump_target=False),
- Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=47, starts_line=7, is_jump_target=True),
- Instruction(opname='LOAD_CONST', opcode=100, arg=3, argval=6, argrepr='6', offset=50, starts_line=None, is_jump_target=False),
- Instruction(opname='COMPARE_OP', opcode=107, arg=4, argval='>', argrepr='>', offset=53, starts_line=None, is_jump_target=False),
- Instruction(opname='POP_JUMP_IF_FALSE', opcode=114, arg=13, argval=13, argrepr='', offset=56, starts_line=None, is_jump_target=False),
- Instruction(opname='BREAK_LOOP', opcode=80, arg=None, argval=None, argrepr='', offset=59, starts_line=8, is_jump_target=False),
- Instruction(opname='JUMP_ABSOLUTE', opcode=113, arg=13, argval=13, argrepr='', offset=60, starts_line=None, is_jump_target=False),
- Instruction(opname='JUMP_ABSOLUTE', opcode=113, arg=13, argval=13, argrepr='', offset=63, starts_line=None, is_jump_target=False),
- Instruction(opname='POP_BLOCK', opcode=87, arg=None, argval=None, argrepr='', offset=66, starts_line=None, is_jump_target=True),
- Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=67, starts_line=10, is_jump_target=False),
- Instruction(opname='LOAD_CONST', opcode=100, arg=4, argval='I can haz else clause?', argrepr="'I can haz else clause?'", offset=70, starts_line=None, is_jump_target=False),
- Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='1 positional, 0 keyword pair', offset=73, starts_line=None, is_jump_target=False),
- Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=76, starts_line=None, is_jump_target=False),
- Instruction(opname='SETUP_LOOP', opcode=120, arg=74, argval=154, argrepr='to 154', offset=77, starts_line=11, is_jump_target=True),
- Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=80, starts_line=None, is_jump_target=True),
- Instruction(opname='POP_JUMP_IF_FALSE', opcode=114, arg=143, argval=143, argrepr='', offset=83, starts_line=None, is_jump_target=False),
- Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=86, starts_line=12, is_jump_target=False),
- Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=89, starts_line=None, is_jump_target=False),
- Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='1 positional, 0 keyword pair', offset=92, starts_line=None, is_jump_target=False),
- Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=95, starts_line=None, is_jump_target=False),
- Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=96, starts_line=13, is_jump_target=False),
- Instruction(opname='LOAD_CONST', opcode=100, arg=5, argval=1, argrepr='1', offset=99, starts_line=None, is_jump_target=False),
- Instruction(opname='INPLACE_SUBTRACT', opcode=56, arg=None, argval=None, argrepr='', offset=102, starts_line=None, is_jump_target=False),
- Instruction(opname='STORE_FAST', opcode=125, arg=0, argval='i', argrepr='i', offset=103, starts_line=None, is_jump_target=False),
- Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=106, starts_line=14, is_jump_target=False),
- Instruction(opname='LOAD_CONST', opcode=100, arg=3, argval=6, argrepr='6', offset=109, starts_line=None, is_jump_target=False),
- Instruction(opname='COMPARE_OP', opcode=107, arg=4, argval='>', argrepr='>', offset=112, starts_line=None, is_jump_target=False),
- Instruction(opname='POP_JUMP_IF_FALSE', opcode=114, arg=124, argval=124, argrepr='', offset=115, starts_line=None, is_jump_target=False),
- Instruction(opname='JUMP_ABSOLUTE', opcode=113, arg=80, argval=80, argrepr='', offset=118, starts_line=15, is_jump_target=False),
- Instruction(opname='JUMP_FORWARD', opcode=110, arg=0, argval=124, argrepr='to 124', offset=121, starts_line=None, is_jump_target=False),
- Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=124, starts_line=16, is_jump_target=True),
- Instruction(opname='LOAD_CONST', opcode=100, arg=2, argval=4, argrepr='4', offset=127, starts_line=None, is_jump_target=False),
- Instruction(opname='COMPARE_OP', opcode=107, arg=0, argval='<', argrepr='<', offset=130, starts_line=None, is_jump_target=False),
- Instruction(opname='POP_JUMP_IF_FALSE', opcode=114, arg=80, argval=80, argrepr='', offset=133, starts_line=None, is_jump_target=False),
- Instruction(opname='BREAK_LOOP', opcode=80, arg=None, argval=None, argrepr='', offset=136, starts_line=17, is_jump_target=False),
- Instruction(opname='JUMP_ABSOLUTE', opcode=113, arg=80, argval=80, argrepr='', offset=137, starts_line=None, is_jump_target=False),
- Instruction(opname='JUMP_ABSOLUTE', opcode=113, arg=80, argval=80, argrepr='', offset=140, starts_line=None, is_jump_target=False),
- Instruction(opname='POP_BLOCK', opcode=87, arg=None, argval=None, argrepr='', offset=143, starts_line=None, is_jump_target=True),
- Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=144, starts_line=19, is_jump_target=False),
- Instruction(opname='LOAD_CONST', opcode=100, arg=6, argval='Who let lolcatz into this test suite?', argrepr="'Who let lolcatz into this test suite?'", offset=147, starts_line=None, is_jump_target=False),
- Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='1 positional, 0 keyword pair', offset=150, starts_line=None, is_jump_target=False),
- Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=153, starts_line=None, is_jump_target=False),
- Instruction(opname='SETUP_FINALLY', opcode=122, arg=72, argval=229, argrepr='to 229', offset=154, starts_line=20, is_jump_target=True),
- Instruction(opname='SETUP_EXCEPT', opcode=121, arg=12, argval=172, argrepr='to 172', offset=157, starts_line=None, is_jump_target=False),
- Instruction(opname='LOAD_CONST', opcode=100, arg=5, argval=1, argrepr='1', offset=160, starts_line=21, is_jump_target=False),
- Instruction(opname='LOAD_CONST', opcode=100, arg=7, argval=0, argrepr='0', offset=163, starts_line=None, is_jump_target=False),
- Instruction(opname='BINARY_TRUE_DIVIDE', opcode=27, arg=None, argval=None, argrepr='', offset=166, starts_line=None, is_jump_target=False),
- Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=167, starts_line=None, is_jump_target=False),
- Instruction(opname='POP_BLOCK', opcode=87, arg=None, argval=None, argrepr='', offset=168, starts_line=None, is_jump_target=False),
- Instruction(opname='JUMP_FORWARD', opcode=110, arg=28, argval=200, argrepr='to 200', offset=169, starts_line=None, is_jump_target=False),
- Instruction(opname='DUP_TOP', opcode=4, arg=None, argval=None, argrepr='', offset=172, starts_line=22, is_jump_target=True),
- Instruction(opname='LOAD_GLOBAL', opcode=116, arg=2, argval='ZeroDivisionError', argrepr='ZeroDivisionError', offset=173, starts_line=None, is_jump_target=False),
- Instruction(opname='COMPARE_OP', opcode=107, arg=10, argval='exception match', argrepr='exception match', offset=176, starts_line=None, is_jump_target=False),
- Instruction(opname='POP_JUMP_IF_FALSE', opcode=114, arg=199, argval=199, argrepr='', offset=179, starts_line=None, is_jump_target=False),
+ Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=44, starts_line=7, is_jump_target=True),
+ Instruction(opname='LOAD_CONST', opcode=100, arg=3, argval=6, argrepr='6', offset=47, starts_line=None, is_jump_target=False),
+ Instruction(opname='COMPARE_OP', opcode=107, arg=4, argval='>', argrepr='>', offset=50, starts_line=None, is_jump_target=False),
+ Instruction(opname='POP_JUMP_IF_FALSE', opcode=114, arg=13, argval=13, argrepr='', offset=53, starts_line=None, is_jump_target=False),
+ Instruction(opname='BREAK_LOOP', opcode=80, arg=None, argval=None, argrepr='', offset=56, starts_line=8, is_jump_target=False),
+ Instruction(opname='JUMP_ABSOLUTE', opcode=113, arg=13, argval=13, argrepr='', offset=57, starts_line=None, is_jump_target=False),
+ Instruction(opname='POP_BLOCK', opcode=87, arg=None, argval=None, argrepr='', offset=60, starts_line=None, is_jump_target=True),
+ Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=61, starts_line=10, is_jump_target=False),
+ Instruction(opname='LOAD_CONST', opcode=100, arg=4, argval='I can haz else clause?', argrepr="'I can haz else clause?'", offset=64, starts_line=None, is_jump_target=False),
+ Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='1 positional, 0 keyword pair', offset=67, starts_line=None, is_jump_target=False),
+ Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=70, starts_line=None, is_jump_target=False),
+ Instruction(opname='SETUP_LOOP', opcode=120, arg=68, argval=142, argrepr='to 142', offset=71, starts_line=11, is_jump_target=True),
+ Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=74, starts_line=None, is_jump_target=True),
+ Instruction(opname='POP_JUMP_IF_FALSE', opcode=114, arg=131, argval=131, argrepr='', offset=77, starts_line=None, is_jump_target=False),
+ Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=80, starts_line=12, is_jump_target=False),
+ Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=83, starts_line=None, is_jump_target=False),
+ Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='1 positional, 0 keyword pair', offset=86, starts_line=None, is_jump_target=False),
+ Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=89, starts_line=None, is_jump_target=False),
+ Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=90, starts_line=13, is_jump_target=False),
+ Instruction(opname='LOAD_CONST', opcode=100, arg=5, argval=1, argrepr='1', offset=93, starts_line=None, is_jump_target=False),
+ Instruction(opname='INPLACE_SUBTRACT', opcode=56, arg=None, argval=None, argrepr='', offset=96, starts_line=None, is_jump_target=False),
+ Instruction(opname='STORE_FAST', opcode=125, arg=0, argval='i', argrepr='i', offset=97, starts_line=None, is_jump_target=False),
+ Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=100, starts_line=14, is_jump_target=False),
+ Instruction(opname='LOAD_CONST', opcode=100, arg=3, argval=6, argrepr='6', offset=103, starts_line=None, is_jump_target=False),
+ Instruction(opname='COMPARE_OP', opcode=107, arg=4, argval='>', argrepr='>', offset=106, starts_line=None, is_jump_target=False),
+ Instruction(opname='POP_JUMP_IF_FALSE', opcode=114, arg=115, argval=115, argrepr='', offset=109, starts_line=None, is_jump_target=False),
+ Instruction(opname='JUMP_ABSOLUTE', opcode=113, arg=74, argval=74, argrepr='', offset=112, starts_line=15, is_jump_target=False),
+ Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=115, starts_line=16, is_jump_target=True),
+ Instruction(opname='LOAD_CONST', opcode=100, arg=2, argval=4, argrepr='4', offset=118, starts_line=None, is_jump_target=False),
+ Instruction(opname='COMPARE_OP', opcode=107, arg=0, argval='<', argrepr='<', offset=121, starts_line=None, is_jump_target=False),
+ Instruction(opname='POP_JUMP_IF_FALSE', opcode=114, arg=74, argval=74, argrepr='', offset=124, starts_line=None, is_jump_target=False),
+ Instruction(opname='BREAK_LOOP', opcode=80, arg=None, argval=None, argrepr='', offset=127, starts_line=17, is_jump_target=False),
+ Instruction(opname='JUMP_ABSOLUTE', opcode=113, arg=74, argval=74, argrepr='', offset=128, starts_line=None, is_jump_target=False),
+ Instruction(opname='POP_BLOCK', opcode=87, arg=None, argval=None, argrepr='', offset=131, starts_line=None, is_jump_target=True),
+ Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=132, starts_line=19, is_jump_target=False),
+ Instruction(opname='LOAD_CONST', opcode=100, arg=6, argval='Who let lolcatz into this test suite?', argrepr="'Who let lolcatz into this test suite?'", offset=135, starts_line=None, is_jump_target=False),
+ Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='1 positional, 0 keyword pair', offset=138, starts_line=None, is_jump_target=False),
+ Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=141, starts_line=None, is_jump_target=False),
+ Instruction(opname='SETUP_FINALLY', opcode=122, arg=73, argval=218, argrepr='to 218', offset=142, starts_line=20, is_jump_target=True),
+ Instruction(opname='SETUP_EXCEPT', opcode=121, arg=12, argval=160, argrepr='to 160', offset=145, starts_line=None, is_jump_target=False),
+ Instruction(opname='LOAD_CONST', opcode=100, arg=5, argval=1, argrepr='1', offset=148, starts_line=21, is_jump_target=False),
+ Instruction(opname='LOAD_CONST', opcode=100, arg=7, argval=0, argrepr='0', offset=151, starts_line=None, is_jump_target=False),
+ Instruction(opname='BINARY_TRUE_DIVIDE', opcode=27, arg=None, argval=None, argrepr='', offset=154, starts_line=None, is_jump_target=False),
+ Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=155, starts_line=None, is_jump_target=False),
+ Instruction(opname='POP_BLOCK', opcode=87, arg=None, argval=None, argrepr='', offset=156, starts_line=None, is_jump_target=False),
+ Instruction(opname='JUMP_FORWARD', opcode=110, arg=28, argval=188, argrepr='to 188', offset=157, starts_line=None, is_jump_target=False),
+ Instruction(opname='DUP_TOP', opcode=4, arg=None, argval=None, argrepr='', offset=160, starts_line=22, is_jump_target=True),
+ Instruction(opname='LOAD_GLOBAL', opcode=116, arg=2, argval='ZeroDivisionError', argrepr='ZeroDivisionError', offset=161, starts_line=None, is_jump_target=False),
+ Instruction(opname='COMPARE_OP', opcode=107, arg=10, argval='exception match', argrepr='exception match', offset=164, starts_line=None, is_jump_target=False),
+ Instruction(opname='POP_JUMP_IF_FALSE', opcode=114, arg=187, argval=187, argrepr='', offset=167, starts_line=None, is_jump_target=False),
+ Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=170, starts_line=None, is_jump_target=False),
+ Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=171, starts_line=None, is_jump_target=False),
+ Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=172, starts_line=None, is_jump_target=False),
+ Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=173, starts_line=23, is_jump_target=False),
+ Instruction(opname='LOAD_CONST', opcode=100, arg=8, argval='Here we go, here we go, here we go...', argrepr="'Here we go, here we go, here we go...'", offset=176, starts_line=None, is_jump_target=False),
+ Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='1 positional, 0 keyword pair', offset=179, starts_line=None, is_jump_target=False),
Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=182, starts_line=None, is_jump_target=False),
- Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=183, starts_line=None, is_jump_target=False),
- Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=184, starts_line=None, is_jump_target=False),
- Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=185, starts_line=23, is_jump_target=False),
- Instruction(opname='LOAD_CONST', opcode=100, arg=8, argval='Here we go, here we go, here we go...', argrepr="'Here we go, here we go, here we go...'", offset=188, starts_line=None, is_jump_target=False),
- Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='1 positional, 0 keyword pair', offset=191, starts_line=None, is_jump_target=False),
- Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=194, starts_line=None, is_jump_target=False),
- Instruction(opname='POP_EXCEPT', opcode=89, arg=None, argval=None, argrepr='', offset=195, starts_line=None, is_jump_target=False),
- Instruction(opname='JUMP_FORWARD', opcode=110, arg=26, argval=225, argrepr='to 225', offset=196, starts_line=None, is_jump_target=False),
- Instruction(opname='END_FINALLY', opcode=88, arg=None, argval=None, argrepr='', offset=199, starts_line=None, is_jump_target=True),
- Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=200, starts_line=25, is_jump_target=True),
- Instruction(opname='SETUP_WITH', opcode=143, arg=17, argval=223, argrepr='to 223', offset=203, starts_line=None, is_jump_target=False),
- Instruction(opname='STORE_FAST', opcode=125, arg=1, argval='dodgy', argrepr='dodgy', offset=206, starts_line=None, is_jump_target=False),
- Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=209, starts_line=26, is_jump_target=False),
- Instruction(opname='LOAD_CONST', opcode=100, arg=9, argval='Never reach this', argrepr="'Never reach this'", offset=212, starts_line=None, is_jump_target=False),
- Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='1 positional, 0 keyword pair', offset=215, starts_line=None, is_jump_target=False),
- Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=218, starts_line=None, is_jump_target=False),
- Instruction(opname='POP_BLOCK', opcode=87, arg=None, argval=None, argrepr='', offset=219, starts_line=None, is_jump_target=False),
- Instruction(opname='LOAD_CONST', opcode=100, arg=0, argval=None, argrepr='None', offset=220, starts_line=None, is_jump_target=False),
- Instruction(opname='WITH_CLEANUP', opcode=81, arg=None, argval=None, argrepr='', offset=223, starts_line=None, is_jump_target=True),
- Instruction(opname='END_FINALLY', opcode=88, arg=None, argval=None, argrepr='', offset=224, starts_line=None, is_jump_target=False),
- Instruction(opname='POP_BLOCK', opcode=87, arg=None, argval=None, argrepr='', offset=225, starts_line=None, is_jump_target=True),
- Instruction(opname='LOAD_CONST', opcode=100, arg=0, argval=None, argrepr='None', offset=226, starts_line=None, is_jump_target=False),
- Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=229, starts_line=28, is_jump_target=True),
- Instruction(opname='LOAD_CONST', opcode=100, arg=10, argval="OK, now we're done", argrepr='"OK, now we\'re done"', offset=232, starts_line=None, is_jump_target=False),
- Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='1 positional, 0 keyword pair', offset=235, starts_line=None, is_jump_target=False),
- Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=238, starts_line=None, is_jump_target=False),
- Instruction(opname='END_FINALLY', opcode=88, arg=None, argval=None, argrepr='', offset=239, starts_line=None, is_jump_target=False),
- Instruction(opname='LOAD_CONST', opcode=100, arg=0, argval=None, argrepr='None', offset=240, starts_line=None, is_jump_target=False),
- Instruction(opname='RETURN_VALUE', opcode=83, arg=None, argval=None, argrepr='', offset=243, starts_line=None, is_jump_target=False),
+ Instruction(opname='POP_EXCEPT', opcode=89, arg=None, argval=None, argrepr='', offset=183, starts_line=None, is_jump_target=False),
+ Instruction(opname='JUMP_FORWARD', opcode=110, arg=27, argval=214, argrepr='to 214', offset=184, starts_line=None, is_jump_target=False),
+ Instruction(opname='END_FINALLY', opcode=88, arg=None, argval=None, argrepr='', offset=187, starts_line=None, is_jump_target=True),
+ Instruction(opname='LOAD_FAST', opcode=124, arg=0, argval='i', argrepr='i', offset=188, starts_line=25, is_jump_target=True),
+ Instruction(opname='SETUP_WITH', opcode=143, arg=17, argval=211, argrepr='to 211', offset=191, starts_line=None, is_jump_target=False),
+ Instruction(opname='STORE_FAST', opcode=125, arg=1, argval='dodgy', argrepr='dodgy', offset=194, starts_line=None, is_jump_target=False),
+ Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=197, starts_line=26, is_jump_target=False),
+ Instruction(opname='LOAD_CONST', opcode=100, arg=9, argval='Never reach this', argrepr="'Never reach this'", offset=200, starts_line=None, is_jump_target=False),
+ Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='1 positional, 0 keyword pair', offset=203, starts_line=None, is_jump_target=False),
+ Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=206, starts_line=None, is_jump_target=False),
+ Instruction(opname='POP_BLOCK', opcode=87, arg=None, argval=None, argrepr='', offset=207, starts_line=None, is_jump_target=False),
+ Instruction(opname='LOAD_CONST', opcode=100, arg=0, argval=None, argrepr='None', offset=208, starts_line=None, is_jump_target=False),
+ Instruction(opname='WITH_CLEANUP_START', opcode=81, arg=None, argval=None, argrepr='', offset=211, starts_line=None, is_jump_target=True),
+ Instruction(opname='WITH_CLEANUP_FINISH', opcode=82, arg=None, argval=None, argrepr='', offset=212, starts_line=None, is_jump_target=False),
+ Instruction(opname='END_FINALLY', opcode=88, arg=None, argval=None, argrepr='', offset=213, starts_line=None, is_jump_target=False),
+ Instruction(opname='POP_BLOCK', opcode=87, arg=None, argval=None, argrepr='', offset=214, starts_line=None, is_jump_target=True),
+ Instruction(opname='LOAD_CONST', opcode=100, arg=0, argval=None, argrepr='None', offset=215, starts_line=None, is_jump_target=False),
+ Instruction(opname='LOAD_GLOBAL', opcode=116, arg=1, argval='print', argrepr='print', offset=218, starts_line=28, is_jump_target=True),
+ Instruction(opname='LOAD_CONST', opcode=100, arg=10, argval="OK, now we're done", argrepr='"OK, now we\'re done"', offset=221, starts_line=None, is_jump_target=False),
+ Instruction(opname='CALL_FUNCTION', opcode=131, arg=1, argval=1, argrepr='1 positional, 0 keyword pair', offset=224, starts_line=None, is_jump_target=False),
+ Instruction(opname='POP_TOP', opcode=1, arg=None, argval=None, argrepr='', offset=227, starts_line=None, is_jump_target=False),
+ Instruction(opname='END_FINALLY', opcode=88, arg=None, argval=None, argrepr='', offset=228, starts_line=None, is_jump_target=False),
+ Instruction(opname='LOAD_CONST', opcode=100, arg=0, argval=None, argrepr='None', offset=229, starts_line=None, is_jump_target=False),
+ Instruction(opname='RETURN_VALUE', opcode=83, arg=None, argval=None, argrepr='', offset=232, starts_line=None, is_jump_target=False),
]
# One last piece of inspect fodder to check the default line number handling
diff --git a/Lib/test/test_doctest.py b/Lib/test/test_doctest.py
index 9292d92278..29426a3185 100644
--- a/Lib/test/test_doctest.py
+++ b/Lib/test/test_doctest.py
@@ -4,6 +4,7 @@ Test script for doctest.
from test import support
import doctest
+import functools
import os
import sys
@@ -323,7 +324,7 @@ containing test:
>>> test.lineno + e2.lineno
26
-If the docstring contains inconsistant leading whitespace in the
+If the docstring contains inconsistent leading whitespace in the
expected output of an example, then `DocTest` will raise a ValueError:
>>> docstring = r'''
@@ -434,7 +435,7 @@ We'll simulate a __file__ attr that ends in pyc:
>>> tests = finder.find(sample_func)
>>> print(tests) # doctest: +ELLIPSIS
- [<DocTest sample_func from ...:18 (1 example)>]
+ [<DocTest sample_func from ...:19 (1 example)>]
The exact name depends on how test_doctest was invoked, so allow for
leading path components.
@@ -658,7 +659,7 @@ plain ol' Python and is guaranteed to be available.
>>> import builtins
>>> tests = doctest.DocTestFinder().find(builtins)
- >>> 790 < len(tests) < 800 # approximate number of objects with docstrings
+ >>> 790 < len(tests) < 810 # approximate number of objects with docstrings
True
>>> real_tests = [t for t in tests if len(t.examples) > 0]
>>> len(real_tests) # objects that actually have doctests
@@ -2096,22 +2097,9 @@ def test_DocTestSuite():
>>> suite.run(unittest.TestResult())
<unittest.result.TestResult run=0 errors=0 failures=0>
- However, if DocTestSuite finds no docstrings, it raises an error:
+ The module need not contain any docstrings either:
- >>> try:
- ... doctest.DocTestSuite('test.sample_doctest_no_docstrings')
- ... except ValueError as e:
- ... error = e
-
- >>> print(error.args[1])
- has no docstrings
-
- You can prevent this error by passing a DocTestFinder instance with
- the `exclude_empty` keyword argument set to False:
-
- >>> finder = doctest.DocTestFinder(exclude_empty=False)
- >>> suite = doctest.DocTestSuite('test.sample_doctest_no_docstrings',
- ... test_finder=finder)
+ >>> suite = doctest.DocTestSuite('test.sample_doctest_no_docstrings')
>>> suite.run(unittest.TestResult())
<unittest.result.TestResult run=0 errors=0 failures=0>
@@ -2121,6 +2109,22 @@ def test_DocTestSuite():
>>> suite.run(unittest.TestResult())
<unittest.result.TestResult run=9 errors=0 failures=4>
+ We can also provide a DocTestFinder:
+
+ >>> finder = doctest.DocTestFinder()
+ >>> suite = doctest.DocTestSuite('test.sample_doctest',
+ ... test_finder=finder)
+ >>> suite.run(unittest.TestResult())
+ <unittest.result.TestResult run=9 errors=0 failures=4>
+
+ The DocTestFinder need not return any tests:
+
+ >>> finder = doctest.DocTestFinder()
+ >>> suite = doctest.DocTestSuite('test.sample_doctest_no_docstrings',
+ ... test_finder=finder)
+ >>> suite.run(unittest.TestResult())
+ <unittest.result.TestResult run=0 errors=0 failures=0>
+
We can supply global variables. If we pass globs, they will be
used instead of the module globals. Here we'll pass an empty
globals, triggering an extra error:
@@ -2168,7 +2172,7 @@ def test_DocTestSuite():
>>> test.test_doctest.sillySetup
Traceback (most recent call last):
...
- AttributeError: 'module' object has no attribute 'sillySetup'
+ AttributeError: module 'test.test_doctest' has no attribute 'sillySetup'
The setUp and tearDown functions are passed test objects. Here
we'll use the setUp function to supply the missing variable y:
@@ -2314,7 +2318,7 @@ def test_DocFileSuite():
>>> test.test_doctest.sillySetup
Traceback (most recent call last):
...
- AttributeError: 'module' object has no attribute 'sillySetup'
+ AttributeError: module 'test.test_doctest' has no attribute 'sillySetup'
The setUp and tearDown functions are passed test objects.
Here, we'll use a setUp function to set the favorite color in
@@ -2361,6 +2365,22 @@ def test_trailing_space_in_test():
foo \n
"""
+class Wrapper:
+ def __init__(self, func):
+ self.func = func
+ functools.update_wrapper(self, func)
+
+ def __call__(self, *args, **kwargs):
+ self.func(*args, **kwargs)
+
+@Wrapper
+def test_look_in_unwrapped():
+ """
+ Docstrings in wrapped functions must be detected as well.
+
+ >>> 'one other test'
+ 'one other test'
+ """
def test_unittest_reportflags():
"""Default unittest reporting flags can be set to control reporting
@@ -2627,7 +2647,7 @@ Windows line endings first:
>>> with open(fn, 'wb') as f:
... f.write(b'Test:\r\n\r\n >>> x = 1 + 1\r\n\r\nDone.\r\n')
35
- >>> doctest.testfile(fn, False)
+ >>> doctest.testfile(fn, module_relative=False, verbose=False)
TestResults(failed=0, attempted=1)
>>> os.remove(fn)
@@ -2637,7 +2657,7 @@ And now *nix line endings:
>>> with open(fn, 'wb') as f:
... f.write(b'Test:\n\n >>> x = 1 + 1\n\nDone.\n')
30
- >>> doctest.testfile(fn, False)
+ >>> doctest.testfile(fn, module_relative=False, verbose=False)
TestResults(failed=0, attempted=1)
>>> os.remove(fn)
@@ -2709,8 +2729,8 @@ With those preliminaries out of the way, we'll start with a file with two
simple tests and no errors. We'll run both the unadorned doctest command, and
the verbose version, and then check the output:
- >>> from test import script_helper
- >>> with script_helper.temp_dir() as tmpdir:
+ >>> from test.support import script_helper, temp_dir
+ >>> with temp_dir() as tmpdir:
... fn = os.path.join(tmpdir, 'myfile.doc')
... with open(fn, 'w') as f:
... _ = f.write('This is a very simple test file.\n')
@@ -2755,13 +2775,13 @@ Now we'll write a couple files, one with three tests, the other a python module
with two tests, both of the files having "errors" in the tests that can be made
non-errors by applying the appropriate doctest options to the run (ELLIPSIS in
the first file, NORMALIZE_WHITESPACE in the second). This combination will
-allow to thoroughly test the -f and -o flags, as well as the doctest command's
+allow thoroughly testing the -f and -o flags, as well as the doctest command's
ability to process more than one file on the command line and, since the second
file ends in '.py', its handling of python module files (as opposed to straight
text files).
- >>> from test import script_helper
- >>> with script_helper.temp_dir() as tmpdir:
+ >>> from test.support import script_helper, temp_dir
+ >>> with temp_dir() as tmpdir:
... fn = os.path.join(tmpdir, 'myfile.doc')
... with open(fn, 'w') as f:
... _ = f.write('This is another simple test file.\n')
@@ -2927,7 +2947,7 @@ Invalid doctest option:
def test_main():
# Check the doctest cases in doctest itself:
- support.run_doctest(doctest, verbosity=True)
+ ret = support.run_doctest(doctest, verbosity=True)
# Check the doctest cases defined here:
from test import test_doctest
support.run_doctest(test_doctest, verbosity=True)
diff --git a/Lib/test/test_docxmlrpc.py b/Lib/test/test_docxmlrpc.py
index 06161f23dd..e6ca96117d 100644
--- a/Lib/test/test_docxmlrpc.py
+++ b/Lib/test/test_docxmlrpc.py
@@ -87,10 +87,11 @@ class DocXMLRPCHTTPGETServer(unittest.TestCase):
threading.Thread(target=server, args=(self.evt, 1)).start()
# wait for port to be assigned
- n = 1000
- while n > 0 and PORT is None:
- time.sleep(0.001)
- n -= 1
+ deadline = time.monotonic() + 10.0
+ while PORT is None:
+ time.sleep(0.010)
+ if time.monotonic() > deadline:
+ break
self.client = http.client.HTTPConnection("localhost:%d" % PORT)
@@ -212,8 +213,5 @@ class DocXMLRPCHTTPGETServer(unittest.TestCase):
response.read())
-def test_main():
- support.run_unittest(DocXMLRPCHTTPGETServer)
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_dummy_thread.py b/Lib/test/test_dummy_thread.py
index 2fafe1df85..a6a2856511 100644
--- a/Lib/test/test_dummy_thread.py
+++ b/Lib/test/test_dummy_thread.py
@@ -24,14 +24,14 @@ class LockTests(unittest.TestCase):
def test_initlock(self):
#Make sure locks start locked
- self.assertTrue(not self.lock.locked(),
+ self.assertFalse(self.lock.locked(),
"Lock object is not initialized unlocked.")
def test_release(self):
# Test self.lock.release()
self.lock.acquire()
self.lock.release()
- self.assertTrue(not self.lock.locked(),
+ self.assertFalse(self.lock.locked(),
"Lock object did not release properly.")
def test_improper_release(self):
@@ -46,7 +46,7 @@ class LockTests(unittest.TestCase):
def test_cond_acquire_fail(self):
#Test acquiring locked lock returns False
self.lock.acquire(0)
- self.assertTrue(not self.lock.acquire(0),
+ self.assertFalse(self.lock.acquire(0),
"Conditional acquiring of a locked lock incorrectly "
"succeeded.")
@@ -58,9 +58,9 @@ class LockTests(unittest.TestCase):
def test_uncond_acquire_return_val(self):
#Make sure that an unconditional locking returns True.
- self.assertTrue(self.lock.acquire(1) is True,
+ self.assertIs(self.lock.acquire(1), True,
"Unconditional locking did not return True.")
- self.assertTrue(self.lock.acquire() is True)
+ self.assertIs(self.lock.acquire(), True)
def test_uncond_acquire_blocking(self):
#Make sure that unconditional acquiring of a locked lock blocks.
@@ -80,7 +80,7 @@ class LockTests(unittest.TestCase):
end_time = int(time.time())
if support.verbose:
print("done")
- self.assertTrue((end_time - start_time) >= DELAY,
+ self.assertGreaterEqual(end_time - start_time, DELAY,
"Blocking by unconditional acquiring failed.")
class MiscTests(unittest.TestCase):
@@ -94,7 +94,7 @@ class MiscTests(unittest.TestCase):
#Test sanity of _thread.get_ident()
self.assertIsInstance(_thread.get_ident(), int,
"_thread.get_ident() returned a non-integer")
- self.assertTrue(_thread.get_ident() != 0,
+ self.assertNotEqual(_thread.get_ident(), 0,
"_thread.get_ident() returned 0")
def test_LockType(self):
@@ -164,7 +164,7 @@ class ThreadTests(unittest.TestCase):
time.sleep(DELAY)
if support.verbose:
print('done')
- self.assertTrue(testing_queue.qsize() == thread_count,
+ self.assertEqual(testing_queue.qsize(), thread_count,
"Not all %s threads executed properly after %s sec." %
(thread_count, DELAY))
diff --git a/Lib/test/test_dummy_threading.py b/Lib/test/test_dummy_threading.py
index 6ec5da3835..a0c2972a60 100644
--- a/Lib/test/test_dummy_threading.py
+++ b/Lib/test/test_dummy_threading.py
@@ -56,9 +56,5 @@ class DummyThreadingTestCase(unittest.TestCase):
if support.verbose:
print('all tasks done')
-def test_main():
- support.run_unittest(DummyThreadingTestCase)
-
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_dynamic.py b/Lib/test/test_dynamic.py
index beb7b1cdf1..5080ec9f79 100644
--- a/Lib/test/test_dynamic.py
+++ b/Lib/test/test_dynamic.py
@@ -4,7 +4,7 @@ import builtins
import contextlib
import unittest
-from test.support import run_unittest, swap_item, swap_attr
+from test.support import swap_item, swap_attr
class RebindBuiltinsTests(unittest.TestCase):
@@ -135,9 +135,5 @@ class RebindBuiltinsTests(unittest.TestCase):
self.assertEqual(foo(), 7)
-def test_main():
- run_unittest(RebindBuiltinsTests)
-
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_dynamicclassattribute.py b/Lib/test/test_dynamicclassattribute.py
index bc6a39bb37..9f694d9eb4 100644
--- a/Lib/test/test_dynamicclassattribute.py
+++ b/Lib/test/test_dynamicclassattribute.py
@@ -4,7 +4,6 @@
import abc
import sys
import unittest
-from test.support import run_unittest
from types import DynamicClassAttribute
class PropertyBase(Exception):
@@ -297,8 +296,5 @@ class PropertySubclassTests(unittest.TestCase):
-def test_main():
- run_unittest(PropertyTests, PropertySubclassTests)
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_eintr.py b/Lib/test/test_eintr.py
new file mode 100644
index 0000000000..aabad835a0
--- /dev/null
+++ b/Lib/test/test_eintr.py
@@ -0,0 +1,30 @@
+import os
+import signal
+import subprocess
+import sys
+import unittest
+
+from test import support
+from test.support import script_helper
+
+
+@unittest.skipUnless(os.name == "posix", "only supported on Unix")
+class EINTRTests(unittest.TestCase):
+
+ @unittest.skipUnless(hasattr(signal, "setitimer"), "requires setitimer()")
+ def test_all(self):
+ # Run the tester in a sub-process, to make sure there is only one
+ # thread (for reliable signal delivery).
+ tester = support.findfile("eintr_tester.py", subdir="eintrdata")
+
+ if support.verbose:
+ args = [sys.executable, tester]
+ with subprocess.Popen(args) as proc:
+ exitcode = proc.wait()
+ self.assertEqual(exitcode, 0)
+ else:
+ script_helper.assert_python_ok(tester)
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/Lib/test/test_email/test__header_value_parser.py b/Lib/test/test_email/test__header_value_parser.py
index d028f7440b..f7ac0e3ded 100644
--- a/Lib/test/test_email/test__header_value_parser.py
+++ b/Lib/test/test_email/test__header_value_parser.py
@@ -2498,7 +2498,7 @@ class Test_parse_mime_parameters(TestParserMixin, TestEmailBase):
# Note that it is undefined what we should do for error recovery when
# there are duplicate parameter names or duplicate parts in a split
# part. We choose to ignore all duplicate parameters after the first
- # and to take duplicate or missing rfc 2231 parts in apperance order.
+ # and to take duplicate or missing rfc 2231 parts in appearance order.
# This is backward compatible with get_param's behavior, but the
# decisions are arbitrary.
diff --git a/Lib/test/test_email/test_asian_codecs.py b/Lib/test/test_email/test_asian_codecs.py
index 089269f544..f9cd7d9b4e 100644
--- a/Lib/test/test_email/test_asian_codecs.py
+++ b/Lib/test/test_email/test_asian_codecs.py
@@ -5,7 +5,7 @@
import unittest
from test.support import run_unittest
-from test.test_email.test_email import TestEmailBase
+from test.test_email import TestEmailBase
from email.charset import Charset
from email.header import Header, decode_header
from email.message import Message
@@ -18,7 +18,7 @@ except LookupError:
raise unittest.SkipTest
-
+
class TestEmailAsianCodecs(TestEmailBase):
def test_japanese_codecs(self):
eq = self.ndiffAssertEqual
@@ -77,6 +77,6 @@ Hello World! =?iso-2022-jp?b?GyRCJU8lbSE8JW8hPCVrJUkhKhsoQg==?=
self.assertEqual(jhello, ustr)
-
+
if __name__ == '__main__':
unittest.main()
diff --git a/Lib/test/test_email/test_contentmanager.py b/Lib/test/test_email/test_contentmanager.py
index cdb04e45ed..169058eac8 100644
--- a/Lib/test/test_email/test_contentmanager.py
+++ b/Lib/test/test_email/test_contentmanager.py
@@ -621,7 +621,7 @@ class TestRawDataManager(TestEmailBase):
self.assertEqual(m.get_content(), content)
def test_set_application_octet_stream_with_8bit_cte(self):
- # In 8bit mode, univeral line end logic applies. It is up to the
+ # In 8bit mode, universal line end logic applies. It is up to the
# application to make sure the lines are short enough; we don't check.
m = self._make_message()
content = b'b\xFFgus\tcon\nt\rent\n' + b'z'*60 + b'\n'
diff --git a/Lib/test/test_email/test_email.py b/Lib/test/test_email/test_email.py
index 84f4e383f9..894b8003cd 100644
--- a/Lib/test/test_email/test_email.py
+++ b/Lib/test/test_email/test_email.py
@@ -590,6 +590,17 @@ class TestMessageAPI(TestEmailBase):
eq(msg.values(), ['One Hundred', 'Twenty', 'Three', 'Eleven'])
self.assertRaises(KeyError, msg.replace_header, 'Fourth', 'Missing')
+ def test_get_content_disposition(self):
+ msg = Message()
+ self.assertIsNone(msg.get_content_disposition())
+ msg.add_header('Content-Disposition', 'attachment',
+ filename='random.avi')
+ self.assertEqual(msg.get_content_disposition(), 'attachment')
+ msg.replace_header('Content-Disposition', 'inline')
+ self.assertEqual(msg.get_content_disposition(), 'inline')
+ msg.replace_header('Content-Disposition', 'InlinE')
+ self.assertEqual(msg.get_content_disposition(), 'inline')
+
# test_defect_handling:test_invalid_chars_in_base64_payload
def test_broken_base64_payload(self):
x = 'AwDp0P7//y6LwKEAcPa/6Q=9'
@@ -1640,6 +1651,10 @@ class TestMIMEText(unittest.TestCase):
msg = MIMEText('hello there', _charset='us-ascii')
eq(msg.get_charset().input_charset, 'us-ascii')
eq(msg['content-type'], 'text/plain; charset="us-ascii"')
+ # Also accept a Charset instance
+ msg = MIMEText('hello there', _charset=Charset('utf-8'))
+ eq(msg.get_charset().input_charset, 'utf-8')
+ eq(msg['content-type'], 'text/plain; charset="utf-8"')
def test_7bit_input(self):
eq = self.assertEqual
@@ -3164,10 +3179,7 @@ Foo
self.msgids = []
append = self.msgids.append
make_msgid = utils.make_msgid
- try:
- clock = time.monotonic
- except AttributeError:
- clock = time.time
+ clock = time.monotonic
tfin = clock() + 3.0
while clock() < tfin:
append(make_msgid(domain='testdomain-string'))
diff --git a/Lib/test/test_email/test_generator.py b/Lib/test/test_email/test_generator.py
index 8917408171..b1cbce26d5 100644
--- a/Lib/test/test_email/test_generator.py
+++ b/Lib/test/test_email/test_generator.py
@@ -2,6 +2,7 @@ import io
import textwrap
import unittest
from email import message_from_string, message_from_bytes
+from email.message import EmailMessage
from email.generator import Generator, BytesGenerator
from email import policy
from test.test_email import TestEmailBase, parameterize
@@ -139,6 +140,28 @@ class TestGeneratorBase:
g.flatten(msg, linesep='\n')
self.assertEqual(s.getvalue(), self.typ(expected))
+ def test_set_mangle_from_via_policy(self):
+ source = textwrap.dedent("""\
+ Subject: test that
+ from is mangeld in the body!
+
+ From time to time I write a rhyme.
+ """)
+ variants = (
+ (None, True),
+ (policy.compat32, True),
+ (policy.default, False),
+ (policy.default.clone(mangle_from_=True), True),
+ )
+ for p, mangle in variants:
+ expected = source.replace('From ', '>From ') if mangle else source
+ with self.subTest(policy=p, mangle_from_=mangle):
+ msg = self.msgmaker(self.typ(source))
+ s = self.ioclass()
+ g = self.genclass(s, policy=p)
+ g.flatten(msg)
+ self.assertEqual(s.getvalue(), self.typ(expected))
+
class TestGenerator(TestGeneratorBase, TestEmailBase):
@@ -194,6 +217,27 @@ class TestBytesGenerator(TestGeneratorBase, TestEmailBase):
g.flatten(msg)
self.assertEqual(s.getvalue(), expected)
+ def test_smtputf8_policy(self):
+ msg = EmailMessage()
+ msg['From'] = "Páolo <főo@bar.com>"
+ msg['To'] = 'Dinsdale'
+ msg['Subject'] = 'Nudge nudge, wink, wink \u1F609'
+ msg.set_content("oh là là, know what I mean, know what I mean?")
+ expected = textwrap.dedent("""\
+ From: Páolo <főo@bar.com>
+ To: Dinsdale
+ Subject: Nudge nudge, wink, wink \u1F609
+ Content-Type: text/plain; charset="utf-8"
+ Content-Transfer-Encoding: 8bit
+ MIME-Version: 1.0
+
+ oh là là, know what I mean, know what I mean?
+ """).encode('utf-8').replace(b'\n', b'\r\n')
+ s = io.BytesIO()
+ g = BytesGenerator(s, policy=policy.SMTPUTF8)
+ g.flatten(msg)
+ self.assertEqual(s.getvalue(), expected)
+
if __name__ == '__main__':
unittest.main()
diff --git a/Lib/test/test_email/test_message.py b/Lib/test/test_email/test_message.py
index 50e1a632c2..d78049e315 100644
--- a/Lib/test/test_email/test_message.py
+++ b/Lib/test/test_email/test_message.py
@@ -723,24 +723,14 @@ class TestEmailMessageBase:
def test_is_attachment(self):
m = self._make_message()
self.assertFalse(m.is_attachment())
- with self.assertWarns(DeprecationWarning):
- self.assertFalse(m.is_attachment)
m['Content-Disposition'] = 'inline'
self.assertFalse(m.is_attachment())
- with self.assertWarns(DeprecationWarning):
- self.assertFalse(m.is_attachment)
m.replace_header('Content-Disposition', 'attachment')
self.assertTrue(m.is_attachment())
- with self.assertWarns(DeprecationWarning):
- self.assertTrue(m.is_attachment)
m.replace_header('Content-Disposition', 'AtTachMent')
self.assertTrue(m.is_attachment())
- with self.assertWarns(DeprecationWarning):
- self.assertTrue(m.is_attachment)
m.set_param('filename', 'abc.png', 'Content-Disposition')
self.assertTrue(m.is_attachment())
- with self.assertWarns(DeprecationWarning):
- self.assertTrue(m.is_attachment)
class TestEmailMessage(TestEmailMessageBase, TestEmailBase):
diff --git a/Lib/test/test_email/test_policy.py b/Lib/test/test_email/test_policy.py
index e797f36b72..70ac4db8b0 100644
--- a/Lib/test/test_email/test_policy.py
+++ b/Lib/test/test_email/test_policy.py
@@ -22,15 +22,18 @@ class PolicyAPITests(unittest.TestCase):
'linesep': '\n',
'cte_type': '8bit',
'raise_on_defect': False,
+ 'mangle_from_': True,
}
# These default values are the ones set on email.policy.default.
# If any of these defaults change, the docs must be updated.
policy_defaults = compat32_defaults.copy()
policy_defaults.update({
+ 'utf8': False,
'raise_on_defect': False,
'header_factory': email.policy.EmailPolicy.header_factory,
'refold_source': 'long',
'content_manager': email.policy.EmailPolicy.content_manager,
+ 'mangle_from_': False,
})
# For each policy under test, we give here what we expect the defaults to
@@ -42,6 +45,9 @@ class PolicyAPITests(unittest.TestCase):
email.policy.default: make_defaults(policy_defaults, {}),
email.policy.SMTP: make_defaults(policy_defaults,
{'linesep': '\r\n'}),
+ email.policy.SMTPUTF8: make_defaults(policy_defaults,
+ {'linesep': '\r\n',
+ 'utf8': True}),
email.policy.HTTP: make_defaults(policy_defaults,
{'linesep': '\r\n',
'max_line_length': None}),
@@ -171,7 +177,7 @@ class PolicyAPITests(unittest.TestCase):
with self.assertRaisesRegex(self.MyDefect, "the telly is broken"):
self.MyPolicy(raise_on_defect=True).handle_defect(foo, defect)
- def test_overriden_register_defect_works(self):
+ def test_overridden_register_defect_works(self):
foo = self.MyObj()
defect1 = self.MyDefect("one")
my_policy = self.MyPolicy()
diff --git a/Lib/test/test_email/torture_test.py b/Lib/test/test_email/torture_test.py
index 19cf64f0c7..e72a146eca 100644
--- a/Lib/test/test_email/torture_test.py
+++ b/Lib/test/test_email/torture_test.py
@@ -10,10 +10,9 @@ import sys
import os
import unittest
from io import StringIO
-from types import ListType
-from email.test.test_email import TestEmailBase
-from test.support import TestSkipped, run_unittest
+from test.test_email import TestEmailBase
+from test.support import run_unittest
import email
from email import __file__ as testfile
@@ -28,10 +27,10 @@ def openfile(filename):
try:
openfile('crispin-torture.txt')
except OSError:
- raise TestSkipped
+ raise unittest.SkipTest
+
-
class TortureBase(TestEmailBase):
def _msgobj(self, filename):
fp = openfile(filename)
@@ -42,7 +41,7 @@ class TortureBase(TestEmailBase):
return msg
-
+
class TestCrispinTorture(TortureBase):
# Mark Crispin's torture test from the SquirrelMail project
def test_mondo_message(self):
@@ -50,7 +49,7 @@ class TestCrispinTorture(TortureBase):
neq = self.ndiffAssertEqual
msg = self._msgobj('crispin-torture.txt')
payload = msg.get_payload()
- eq(type(payload), ListType)
+ eq(type(payload), list)
eq(len(payload), 12)
eq(msg.preamble, None)
eq(msg.epilogue, '\n')
@@ -113,7 +112,6 @@ multipart/mixed
audio/x-sun
""")
-
def _testclasses():
mod = sys.modules[__name__]
return [getattr(mod, name) for name in dir(mod) if name.startswith('Test')]
@@ -131,6 +129,5 @@ def test_main():
run_unittest(testclass)
-
if __name__ == '__main__':
unittest.main(defaultTest='suite')
diff --git a/Lib/test/test_ensurepip.py b/Lib/test/test_ensurepip.py
index 6dc764b02d..a78ca14886 100644
--- a/Lib/test/test_ensurepip.py
+++ b/Lib/test/test_ensurepip.py
@@ -357,4 +357,4 @@ class TestUninstallationMainFunction(EnsurepipMixin, unittest.TestCase):
if __name__ == "__main__":
- test.support.run_unittest(__name__)
+ unittest.main()
diff --git a/Lib/test/test_enum.py b/Lib/test/test_enum.py
index 94336380e0..e970a264d7 100644
--- a/Lib/test/test_enum.py
+++ b/Lib/test/test_enum.py
@@ -66,18 +66,14 @@ try:
except Exception:
pass
-def test_pickle_dump_load(assertion, source, target=None,
- *, protocol=(0, HIGHEST_PROTOCOL)):
- start, stop = protocol
+def test_pickle_dump_load(assertion, source, target=None):
if target is None:
target = source
- for protocol in range(start, stop+1):
+ for protocol in range(HIGHEST_PROTOCOL + 1):
assertion(loads(dumps(source, protocol=protocol)), target)
-def test_pickle_exception(assertion, exception, obj,
- *, protocol=(0, HIGHEST_PROTOCOL)):
- start, stop = protocol
- for protocol in range(start, stop+1):
+def test_pickle_exception(assertion, exception, obj):
+ for protocol in range(HIGHEST_PROTOCOL + 1):
with assertion(exception):
dumps(obj, protocol=protocol)
@@ -545,6 +541,18 @@ class TestEnum(unittest.TestCase):
self.assertEqual([k for k,v in WeekDay.__members__.items()
if v.name != k], ['TEUSDAY', ])
+ def test_intenum_from_bytes(self):
+ self.assertIs(IntStooges.from_bytes(b'\x00\x03', 'big'), IntStooges.MOE)
+ with self.assertRaises(ValueError):
+ IntStooges.from_bytes(b'\x00\x05', 'big')
+
+ def test_floatenum_fromhex(self):
+ h = float.hex(FloatStooges.MOE.value)
+ self.assertIs(FloatStooges.fromhex(h), FloatStooges.MOE)
+ h = float.hex(FloatStooges.MOE.value + 0.01)
+ with self.assertRaises(ValueError):
+ FloatStooges.fromhex(h)
+
def test_pickle_enum(self):
if isinstance(Stooges, Exception):
raise Stooges
@@ -588,11 +596,7 @@ class TestEnum(unittest.TestCase):
self.__class__.NestedEnum = NestedEnum
self.NestedEnum.__qualname__ = '%s.NestedEnum' % self.__class__.__name__
- test_pickle_exception(
- self.assertRaises, PicklingError, self.NestedEnum.twigs,
- protocol=(0, 3))
- test_pickle_dump_load(self.assertIs, self.NestedEnum.twigs,
- protocol=(4, HIGHEST_PROTOCOL))
+ test_pickle_dump_load(self.assertIs, self.NestedEnum.twigs)
def test_pickle_by_name(self):
class ReplaceGlobalInt(IntEnum):
@@ -667,6 +671,23 @@ class TestEnum(unittest.TestCase):
self.assertIn(e, SummerMonth)
self.assertIs(type(e), SummerMonth)
+ def test_programatic_function_string_with_start(self):
+ SummerMonth = Enum('SummerMonth', 'june july august', start=10)
+ lst = list(SummerMonth)
+ self.assertEqual(len(lst), len(SummerMonth))
+ self.assertEqual(len(SummerMonth), 3, SummerMonth)
+ self.assertEqual(
+ [SummerMonth.june, SummerMonth.july, SummerMonth.august],
+ lst,
+ )
+ for i, month in enumerate('june july august'.split(), 10):
+ e = SummerMonth(i)
+ self.assertEqual(int(e.value), i)
+ self.assertNotEqual(e, i)
+ self.assertEqual(e.name, month)
+ self.assertIn(e, SummerMonth)
+ self.assertIs(type(e), SummerMonth)
+
def test_programatic_function_string_list(self):
SummerMonth = Enum('SummerMonth', ['june', 'july', 'august'])
lst = list(SummerMonth)
@@ -684,6 +705,23 @@ class TestEnum(unittest.TestCase):
self.assertIn(e, SummerMonth)
self.assertIs(type(e), SummerMonth)
+ def test_programatic_function_string_list_with_start(self):
+ SummerMonth = Enum('SummerMonth', ['june', 'july', 'august'], start=20)
+ lst = list(SummerMonth)
+ self.assertEqual(len(lst), len(SummerMonth))
+ self.assertEqual(len(SummerMonth), 3, SummerMonth)
+ self.assertEqual(
+ [SummerMonth.june, SummerMonth.july, SummerMonth.august],
+ lst,
+ )
+ for i, month in enumerate('june july august'.split(), 20):
+ e = SummerMonth(i)
+ self.assertEqual(int(e.value), i)
+ self.assertNotEqual(e, i)
+ self.assertEqual(e.name, month)
+ self.assertIn(e, SummerMonth)
+ self.assertIs(type(e), SummerMonth)
+
def test_programatic_function_iterable(self):
SummerMonth = Enum(
'SummerMonth',
@@ -740,6 +778,22 @@ class TestEnum(unittest.TestCase):
self.assertIn(e, SummerMonth)
self.assertIs(type(e), SummerMonth)
+ def test_programatic_function_type_with_start(self):
+ SummerMonth = Enum('SummerMonth', 'june july august', type=int, start=30)
+ lst = list(SummerMonth)
+ self.assertEqual(len(lst), len(SummerMonth))
+ self.assertEqual(len(SummerMonth), 3, SummerMonth)
+ self.assertEqual(
+ [SummerMonth.june, SummerMonth.july, SummerMonth.august],
+ lst,
+ )
+ for i, month in enumerate('june july august'.split(), 30):
+ e = SummerMonth(i)
+ self.assertEqual(e, i)
+ self.assertEqual(e.name, month)
+ self.assertIn(e, SummerMonth)
+ self.assertIs(type(e), SummerMonth)
+
def test_programatic_function_type_from_subclass(self):
SummerMonth = IntEnum('SummerMonth', 'june july august')
lst = list(SummerMonth)
@@ -756,6 +810,22 @@ class TestEnum(unittest.TestCase):
self.assertIn(e, SummerMonth)
self.assertIs(type(e), SummerMonth)
+ def test_programatic_function_type_from_subclass_with_start(self):
+ SummerMonth = IntEnum('SummerMonth', 'june july august', start=40)
+ lst = list(SummerMonth)
+ self.assertEqual(len(lst), len(SummerMonth))
+ self.assertEqual(len(SummerMonth), 3, SummerMonth)
+ self.assertEqual(
+ [SummerMonth.june, SummerMonth.july, SummerMonth.august],
+ lst,
+ )
+ for i, month in enumerate('june july august'.split(), 40):
+ e = SummerMonth(i)
+ self.assertEqual(e, i)
+ self.assertEqual(e.name, month)
+ self.assertIn(e, SummerMonth)
+ self.assertIs(type(e), SummerMonth)
+
def test_subclassing(self):
if isinstance(Name, Exception):
raise Name
@@ -1043,9 +1113,9 @@ class TestEnum(unittest.TestCase):
globals()['NEI'] = NEI
NI5 = NamedInt('test', 5)
self.assertEqual(NI5, 5)
- test_pickle_dump_load(self.assertEqual, NI5, 5, protocol=(4, 4))
+ test_pickle_dump_load(self.assertEqual, NI5, 5)
self.assertEqual(NEI.y.value, 2)
- test_pickle_dump_load(self.assertIs, NEI.y, protocol=(4, 4))
+ test_pickle_dump_load(self.assertIs, NEI.y)
test_pickle_dump_load(self.assertIs, NEI)
def test_subclasses_with_reduce(self):
@@ -1510,11 +1580,26 @@ class TestUnique(unittest.TestCase):
triple = 3
turkey = 3
+ def test_unique_with_name(self):
+ @unique
+ class Silly(Enum):
+ one = 1
+ two = 'dos'
+ name = 3
+ @unique
+ class Sillier(IntEnum):
+ single = 1
+ name = 2
+ triple = 3
+ value = 4
-expected_help_output = """
+
+expected_help_output_with_docs = """\
Help on class Color in module %s:
class Color(enum.Enum)
+ | An enumeration.
+ |\x20\x20
| Method resolution order:
| Color
| enum.Enum
@@ -1544,11 +1629,41 @@ class Color(enum.Enum)
| Returns a mapping of member name->value.
|\x20\x20\x20\x20\x20\x20
| This mapping lists all enum members, including aliases. Note that this
- | is a read-only view of the internal mapping.
-""".strip()
+ | is a read-only view of the internal mapping."""
+
+expected_help_output_without_docs = """\
+Help on class Color in module %s:
+
+class Color(enum.Enum)
+ | Method resolution order:
+ | Color
+ | enum.Enum
+ | builtins.object
+ |\x20\x20
+ | Data and other attributes defined here:
+ |\x20\x20
+ | blue = <Color.blue: 3>
+ |\x20\x20
+ | green = <Color.green: 2>
+ |\x20\x20
+ | red = <Color.red: 1>
+ |\x20\x20
+ | ----------------------------------------------------------------------
+ | Data descriptors inherited from enum.Enum:
+ |\x20\x20
+ | name
+ |\x20\x20
+ | value
+ |\x20\x20
+ | ----------------------------------------------------------------------
+ | Data descriptors inherited from enum.EnumMeta:
+ |\x20\x20
+ | __members__"""
class TestStdLib(unittest.TestCase):
+ maxDiff = None
+
class Color(Enum):
red = 1
green = 2
@@ -1556,7 +1671,10 @@ class TestStdLib(unittest.TestCase):
def test_pydoc(self):
# indirectly test __objclass__
- expected_text = expected_help_output % __name__
+ if StrEnum.__doc__ is None:
+ expected_text = expected_help_output_without_docs % __name__
+ else:
+ expected_text = expected_help_output_with_docs % __name__
output = StringIO()
helper = pydoc.Helper(output=output)
helper(self.Color)
@@ -1566,7 +1684,7 @@ class TestStdLib(unittest.TestCase):
def test_inspect_getmembers(self):
values = dict((
('__class__', EnumMeta),
- ('__doc__', None),
+ ('__doc__', 'An enumeration.'),
('__members__', self.Color.__members__),
('__module__', __name__),
('blue', self.Color.blue),
@@ -1594,7 +1712,7 @@ class TestStdLib(unittest.TestCase):
Attribute(name='__class__', kind='data',
defining_class=object, object=EnumMeta),
Attribute(name='__doc__', kind='data',
- defining_class=self.Color, object=None),
+ defining_class=self.Color, object='An enumeration.'),
Attribute(name='__members__', kind='property',
defining_class=EnumMeta, object=EnumMeta.__members__),
Attribute(name='__module__', kind='data',
diff --git a/Lib/test/test_enumerate.py b/Lib/test/test_enumerate.py
index e85254c1de..2630cf2d50 100644
--- a/Lib/test/test_enumerate.py
+++ b/Lib/test/test_enumerate.py
@@ -258,16 +258,5 @@ class TestLongStart(EnumerateStartTestCase):
(sys.maxsize+3,'c')]
-def test_main(verbose=None):
- support.run_unittest(__name__)
-
- # verify reference counting
- if verbose and hasattr(sys, "gettotalrefcount"):
- counts = [None] * 5
- for i in range(len(counts)):
- support.run_unittest(__name__)
- counts[i] = sys.gettotalrefcount()
- print(counts)
-
if __name__ == "__main__":
- test_main(verbose=True)
+ unittest.main()
diff --git a/Lib/test/test_eof.py b/Lib/test/test_eof.py
index 52e7932c1a..7baa7ae57c 100644
--- a/Lib/test/test_eof.py
+++ b/Lib/test/test_eof.py
@@ -24,8 +24,5 @@ class EOFTestCase(unittest.TestCase):
else:
raise support.TestFailed
-def test_main():
- support.run_unittest(EOFTestCase)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_epoll.py b/Lib/test/test_epoll.py
index b37f033bf8..a7359e9c29 100644
--- a/Lib/test/test_epoll.py
+++ b/Lib/test/test_epoll.py
@@ -44,7 +44,7 @@ class TestEPoll(unittest.TestCase):
def setUp(self):
self.serverSocket = socket.socket()
self.serverSocket.bind(('127.0.0.1', 0))
- self.serverSocket.listen(1)
+ self.serverSocket.listen()
self.connections = [self.serverSocket]
def tearDown(self):
@@ -252,8 +252,5 @@ class TestEPoll(unittest.TestCase):
self.assertEqual(os.get_inheritable(epoll.fileno()), False)
-def test_main():
- support.run_unittest(TestEPoll)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_errno.py b/Lib/test/test_errno.py
index 058dcb9a23..5c437e9cce 100644
--- a/Lib/test/test_errno.py
+++ b/Lib/test/test_errno.py
@@ -3,7 +3,6 @@
"""
import errno
-from test import support
import unittest
std_c_errors = frozenset(['EDOM', 'ERANGE'])
@@ -32,9 +31,5 @@ class ErrorcodeTests(unittest.TestCase):
'no %s attr in errno.errorcode' % attribute)
-def test_main():
- support.run_unittest(ErrnoAttributeTests, ErrorcodeTests)
-
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_exception_variations.py b/Lib/test/test_exception_variations.py
index 11f5e5c84e..d874b0e3d1 100644
--- a/Lib/test/test_exception_variations.py
+++ b/Lib/test/test_exception_variations.py
@@ -1,5 +1,4 @@
-from test.support import run_unittest
import unittest
class ExceptionTestCase(unittest.TestCase):
@@ -173,8 +172,5 @@ class ExceptionTestCase(unittest.TestCase):
self.assertTrue(hit_finally)
self.assertTrue(hit_except)
-def test_main():
- run_unittest(ExceptionTestCase)
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py
index d9543028bb..458ddc1ed8 100644
--- a/Lib/test/test_exceptions.py
+++ b/Lib/test/test_exceptions.py
@@ -7,7 +7,7 @@ import pickle
import weakref
import errno
-from test.support import (TESTFN, captured_output, check_impl_detail,
+from test.support import (TESTFN, captured_stderr, check_impl_detail,
check_warnings, cpython_only, gc_collect, run_unittest,
no_tracing, unlink, import_module)
@@ -20,6 +20,10 @@ class SlottedNaiveException(Exception):
def __init__(self, x):
self.x = x
+class BrokenStrException(Exception):
+ def __str__(self):
+ raise Exception("str() is broken")
+
# XXX This is not really enough, each *operation* should be tested!
class ExceptionTests(unittest.TestCase):
@@ -84,6 +88,7 @@ class ExceptionTests(unittest.TestCase):
x += x # this simply shouldn't blow up
self.raise_catch(RuntimeError, "RuntimeError")
+ self.raise_catch(RecursionError, "RecursionError")
self.raise_catch(SyntaxError, "SyntaxError")
try: exec('/\n')
@@ -117,6 +122,8 @@ class ExceptionTests(unittest.TestCase):
try: x = 1/0
except Exception as e: pass
+ self.raise_catch(StopAsyncIteration, "StopAsyncIteration")
+
def testSyntaxErrorMessage(self):
# make sure the right exception message is raised for each of
# these code fragments
@@ -481,14 +488,14 @@ class ExceptionTests(unittest.TestCase):
def testInfiniteRecursion(self):
def f():
return f()
- self.assertRaises(RuntimeError, f)
+ self.assertRaises(RecursionError, f)
def g():
try:
return g()
except ValueError:
return -1
- self.assertRaises(RuntimeError, g)
+ self.assertRaises(RecursionError, g)
def test_str(self):
# Make sure both instances and classes have a str representation.
@@ -879,7 +886,7 @@ class ExceptionTests(unittest.TestCase):
class MyException(Exception, metaclass=Meta):
pass
- with captured_output("stderr") as stderr:
+ with captured_stderr() as stderr:
try:
raise KeyError()
except MyException as e:
@@ -894,10 +901,10 @@ class ExceptionTests(unittest.TestCase):
def g():
try:
return g()
- except RuntimeError:
+ except RecursionError:
return sys.exc_info()
e, v, tb = g()
- self.assertTrue(isinstance(v, RuntimeError), type(v))
+ self.assertTrue(isinstance(v, RecursionError), type(v))
self.assertIn("maximum recursion depth exceeded", str(v))
@@ -996,10 +1003,10 @@ class ExceptionTests(unittest.TestCase):
# We cannot use assertRaises since it manually deletes the traceback
try:
inner()
- except RuntimeError as e:
+ except RecursionError as e:
self.assertNotEqual(wr(), None)
else:
- self.fail("RuntimeError not raised")
+ self.fail("RecursionError not raised")
self.assertEqual(wr(), None)
def test_errno_ENOTDIR(self):
@@ -1008,6 +1015,66 @@ class ExceptionTests(unittest.TestCase):
os.listdir(__file__)
self.assertEqual(cm.exception.errno, errno.ENOTDIR, cm.exception)
+ def test_unraisable(self):
+ # Issue #22836: PyErr_WriteUnraisable() should give sensible reports
+ class BrokenDel:
+ def __del__(self):
+ exc = ValueError("del is broken")
+ # The following line is included in the traceback report:
+ raise exc
+
+ class BrokenRepr(BrokenDel):
+ def __repr__(self):
+ raise AttributeError("repr() is broken")
+
+ class BrokenExceptionDel:
+ def __del__(self):
+ exc = BrokenStrException()
+ # The following line is included in the traceback report:
+ raise exc
+
+ for test_class in (BrokenDel, BrokenRepr, BrokenExceptionDel):
+ with self.subTest(test_class):
+ obj = test_class()
+ with captured_stderr() as stderr:
+ del obj
+ report = stderr.getvalue()
+ self.assertIn("Exception ignored", report)
+ if test_class is BrokenRepr:
+ self.assertIn("<object repr() failed>", report)
+ else:
+ self.assertIn(test_class.__del__.__qualname__, report)
+ self.assertIn("test_exceptions.py", report)
+ self.assertIn("raise exc", report)
+ if test_class is BrokenExceptionDel:
+ self.assertIn("BrokenStrException", report)
+ self.assertIn("<exception str() failed>", report)
+ else:
+ self.assertIn("ValueError", report)
+ self.assertIn("del is broken", report)
+ self.assertTrue(report.endswith("\n"))
+
+ def test_unhandled(self):
+ # Check for sensible reporting of unhandled exceptions
+ for exc_type in (ValueError, BrokenStrException):
+ with self.subTest(exc_type):
+ try:
+ exc = exc_type("test message")
+ # The following line is included in the traceback report:
+ raise exc
+ except exc_type:
+ with captured_stderr() as stderr:
+ sys.__excepthook__(*sys.exc_info())
+ report = stderr.getvalue()
+ self.assertIn("test_exceptions.py", report)
+ self.assertIn("raise exc", report)
+ self.assertIn(exc_type.__name__, report)
+ if exc_type is BrokenStrException:
+ self.assertIn("<exception str() failed>", report)
+ else:
+ self.assertIn("test message", report)
+ self.assertTrue(report.endswith("\n"))
+
class ImportErrorTests(unittest.TestCase):
diff --git a/Lib/test/test_extcall.py b/Lib/test/test_extcall.py
index 6b6c12de2e..d526b5f192 100644
--- a/Lib/test/test_extcall.py
+++ b/Lib/test/test_extcall.py
@@ -34,17 +34,37 @@ Argument list examples
(1, 2, 3, 4, 5) {}
>>> f(1, 2, 3, *[4, 5])
(1, 2, 3, 4, 5) {}
+ >>> f(*[1, 2, 3], 4, 5)
+ (1, 2, 3, 4, 5) {}
>>> f(1, 2, 3, *UserList([4, 5]))
(1, 2, 3, 4, 5) {}
+ >>> f(1, 2, 3, *[4, 5], *[6, 7])
+ (1, 2, 3, 4, 5, 6, 7) {}
+ >>> f(1, *[2, 3], 4, *[5, 6], 7)
+ (1, 2, 3, 4, 5, 6, 7) {}
+ >>> f(*UserList([1, 2]), *UserList([3, 4]), 5, *UserList([6, 7]))
+ (1, 2, 3, 4, 5, 6, 7) {}
Here we add keyword arguments
>>> f(1, 2, 3, **{'a':4, 'b':5})
(1, 2, 3) {'a': 4, 'b': 5}
+ >>> f(1, 2, **{'a': -1, 'b': 5}, **{'a': 4, 'c': 6})
+ Traceback (most recent call last):
+ ...
+ TypeError: f() got multiple values for keyword argument 'a'
+ >>> f(1, 2, **{'a': -1, 'b': 5}, a=4, c=6)
+ Traceback (most recent call last):
+ ...
+ TypeError: f() got multiple values for keyword argument 'a'
>>> f(1, 2, 3, *[4, 5], **{'a':6, 'b':7})
(1, 2, 3, 4, 5) {'a': 6, 'b': 7}
>>> f(1, 2, 3, x=4, y=5, *(6, 7), **{'a':8, 'b': 9})
(1, 2, 3, 6, 7) {'a': 8, 'b': 9, 'x': 4, 'y': 5}
+ >>> f(1, 2, 3, *[4, 5], **{'c': 8}, **{'a':6, 'b':7})
+ (1, 2, 3, 4, 5) {'a': 6, 'b': 7, 'c': 8}
+ >>> f(1, 2, 3, *(4, 5), x=6, y=7, **{'a':8, 'b': 9})
+ (1, 2, 3, 4, 5) {'a': 8, 'b': 9, 'x': 6, 'y': 7}
>>> f(1, 2, 3, **UserDict(a=4, b=5))
(1, 2, 3) {'a': 4, 'b': 5}
@@ -52,6 +72,8 @@ Here we add keyword arguments
(1, 2, 3, 4, 5) {'a': 6, 'b': 7}
>>> f(1, 2, 3, x=4, y=5, *(6, 7), **UserDict(a=8, b=9))
(1, 2, 3, 6, 7) {'a': 8, 'b': 9, 'x': 4, 'y': 5}
+ >>> f(1, 2, 3, *(4, 5), x=6, y=7, **UserDict(a=8, b=9))
+ (1, 2, 3, 4, 5) {'a': 8, 'b': 9, 'x': 6, 'y': 7}
Examples with invalid arguments (TypeErrors). We're also testing the function
names in the exception messages.
@@ -92,7 +114,7 @@ Verify clearing of SF bug #733667
>>> g(*Nothing())
Traceback (most recent call last):
...
- TypeError: g() argument after * must be a sequence, not Nothing
+ TypeError: g() argument after * must be an iterable, not Nothing
>>> class Nothing:
... def __len__(self): return 5
@@ -101,7 +123,7 @@ Verify clearing of SF bug #733667
>>> g(*Nothing())
Traceback (most recent call last):
...
- TypeError: g() argument after * must be a sequence, not Nothing
+ TypeError: g() argument after * must be an iterable, not Nothing
>>> class Nothing():
... def __len__(self): return 5
@@ -127,6 +149,45 @@ Verify clearing of SF bug #733667
>>> g(*Nothing())
0 (1, 2, 3) {}
+Check for issue #4806: Does a TypeError in a generator get propagated with the
+right error message? (Also check with other iterables.)
+
+ >>> def broken(): raise TypeError("myerror")
+ ...
+
+ >>> g(*(broken() for i in range(1)))
+ Traceback (most recent call last):
+ ...
+ TypeError: myerror
+
+ >>> class BrokenIterable1:
+ ... def __iter__(self):
+ ... raise TypeError('myerror')
+ ...
+ >>> g(*BrokenIterable1())
+ Traceback (most recent call last):
+ ...
+ TypeError: myerror
+
+ >>> class BrokenIterable2:
+ ... def __iter__(self):
+ ... yield 0
+ ... raise TypeError('myerror')
+ ...
+ >>> g(*BrokenIterable2())
+ Traceback (most recent call last):
+ ...
+ TypeError: myerror
+
+ >>> class BrokenSequence:
+ ... def __getitem__(self, idx):
+ ... raise TypeError('myerror')
+ ...
+ >>> g(*BrokenSequence())
+ Traceback (most recent call last):
+ ...
+ TypeError: myerror
+
Make sure that the function doesn't stomp the dictionary
>>> d = {'a': 1, 'b': 2, 'c': 3}
@@ -166,17 +227,17 @@ What about willful misconduct?
>>> h(*h)
Traceback (most recent call last):
...
- TypeError: h() argument after * must be a sequence, not function
+ TypeError: h() argument after * must be an iterable, not function
>>> dir(*h)
Traceback (most recent call last):
...
- TypeError: dir() argument after * must be a sequence, not function
+ TypeError: dir() argument after * must be an iterable, not function
>>> None(*h)
Traceback (most recent call last):
...
- TypeError: NoneType object argument after * must be a sequence, \
+ TypeError: NoneType object argument after * must be an iterable, \
not function
>>> h(**h)
diff --git a/Lib/test/test_faulthandler.py b/Lib/test/test_faulthandler.py
index e68a09e181..1562eecbd6 100644
--- a/Lib/test/test_faulthandler.py
+++ b/Lib/test/test_faulthandler.py
@@ -6,8 +6,8 @@ import re
import signal
import subprocess
import sys
-from test import support, script_helper
-from test.script_helper import assert_python_ok
+from test import support
+from test.support import script_helper
import tempfile
import unittest
from textwrap import dedent
@@ -17,6 +17,10 @@ try:
HAVE_THREADS = True
except ImportError:
HAVE_THREADS = False
+try:
+ import _testcapi
+except ImportError:
+ _testcapi = None
TIMEOUT = 0.5
@@ -38,7 +42,7 @@ def temporary_filename():
support.unlink(filename)
class FaultHandlerTests(unittest.TestCase):
- def get_output(self, code, filename=None):
+ def get_output(self, code, filename=None, fd=None):
"""
Run the specified code in Python (in a new child process) and read the
output from the standard error or from a file (if filename is set).
@@ -49,8 +53,11 @@ class FaultHandlerTests(unittest.TestCase):
thread XXX".
"""
code = dedent(code).strip()
+ pass_fds = []
+ if fd is not None:
+ pass_fds.append(fd)
with support.SuppressCrashReport():
- process = script_helper.spawn_python('-c', code)
+ process = script_helper.spawn_python('-c', code, pass_fds=pass_fds)
stdout, stderr = process.communicate()
exitcode = process.wait()
output = support.strip_python_stderr(stdout)
@@ -60,13 +67,20 @@ class FaultHandlerTests(unittest.TestCase):
with open(filename, "rb") as fp:
output = fp.read()
output = output.decode('ascii', 'backslashreplace')
+ elif fd is not None:
+ self.assertEqual(output, '')
+ os.lseek(fd, os.SEEK_SET, 0)
+ with open(fd, "rb", closefd=False) as fp:
+ output = fp.read()
+ output = output.decode('ascii', 'backslashreplace')
output = re.sub('Current thread 0x[0-9a-f]+',
'Current thread XXX',
output)
return output.splitlines(), exitcode
def check_fatal_error(self, code, line_number, name_regex,
- filename=None, all_threads=True, other_regex=None):
+ filename=None, all_threads=True, other_regex=None,
+ fd=None):
"""
Check that the fault handler for fatal errors is enabled and check the
traceback from the child process output.
@@ -89,7 +103,7 @@ class FaultHandlerTests(unittest.TestCase):
header=re.escape(header))).strip()
if other_regex:
regex += '|' + other_regex
- output, exitcode = self.get_output(code, filename)
+ output, exitcode = self.get_output(code, filename=filename, fd=fd)
output = '\n'.join(output)
self.assertRegex(output, regex)
self.assertNotEqual(exitcode, 0)
@@ -135,26 +149,32 @@ class FaultHandlerTests(unittest.TestCase):
3,
'Floating point exception')
- @unittest.skipIf(not hasattr(faulthandler, '_sigbus'),
- "need faulthandler._sigbus()")
+ @unittest.skipIf(_testcapi is None, 'need _testcapi')
+ @unittest.skipUnless(hasattr(signal, 'SIGBUS'), 'need signal.SIGBUS')
def test_sigbus(self):
self.check_fatal_error("""
+ import _testcapi
import faulthandler
+ import signal
+
faulthandler.enable()
- faulthandler._sigbus()
+ _testcapi.raise_signal(signal.SIGBUS)
""",
- 3,
+ 6,
'Bus error')
- @unittest.skipIf(not hasattr(faulthandler, '_sigill'),
- "need faulthandler._sigill()")
+ @unittest.skipIf(_testcapi is None, 'need _testcapi')
+ @unittest.skipUnless(hasattr(signal, 'SIGILL'), 'need signal.SIGILL')
def test_sigill(self):
self.check_fatal_error("""
+ import _testcapi
import faulthandler
+ import signal
+
faulthandler.enable()
- faulthandler._sigill()
+ _testcapi.raise_signal(signal.SIGILL)
""",
- 3,
+ 6,
'Illegal instruction')
def test_fatal_error(self):
@@ -165,6 +185,14 @@ class FaultHandlerTests(unittest.TestCase):
2,
'xyz')
+ def test_fatal_error_without_gil(self):
+ self.check_fatal_error("""
+ import faulthandler
+ faulthandler._fatal_error(b'xyz', True)
+ """,
+ 2,
+ 'xyz')
+
@unittest.skipIf(sys.platform.startswith('openbsd') and HAVE_THREADS,
"Issue #12868: sigaltstack() doesn't work on "
"OpenBSD if Python is compiled with pthread")
@@ -201,6 +229,21 @@ class FaultHandlerTests(unittest.TestCase):
'Segmentation fault',
filename=filename)
+ @unittest.skipIf(sys.platform == "win32",
+ "subprocess doesn't support pass_fds on Windows")
+ def test_enable_fd(self):
+ with tempfile.TemporaryFile('wb+') as fp:
+ fd = fp.fileno()
+ self.check_fatal_error("""
+ import faulthandler
+ import sys
+ faulthandler.enable(%s)
+ faulthandler._sigsegv()
+ """ % fd,
+ 4,
+ 'Segmentation fault',
+ fd=fd)
+
def test_enable_single_thread(self):
self.check_fatal_error("""
import faulthandler
@@ -287,7 +330,7 @@ class FaultHandlerTests(unittest.TestCase):
output = subprocess.check_output(args, env=env)
self.assertEqual(output.rstrip(), b"True")
- def check_dump_traceback(self, filename):
+ def check_dump_traceback(self, *, filename=None, fd=None):
"""
Explicitly call dump_traceback() function and check its output.
Raise an error if the output doesn't match the expected format.
@@ -295,10 +338,16 @@ class FaultHandlerTests(unittest.TestCase):
code = """
import faulthandler
+ filename = {filename!r}
+ fd = {fd}
+
def funcB():
- if {has_filename}:
- with open({filename}, "wb") as fp:
+ if filename:
+ with open(filename, "wb") as fp:
faulthandler.dump_traceback(fp, all_threads=False)
+ elif fd is not None:
+ faulthandler.dump_traceback(fd,
+ all_threads=False)
else:
faulthandler.dump_traceback(all_threads=False)
@@ -308,29 +357,37 @@ class FaultHandlerTests(unittest.TestCase):
funcA()
"""
code = code.format(
- filename=repr(filename),
- has_filename=bool(filename),
+ filename=filename,
+ fd=fd,
)
if filename:
- lineno = 6
+ lineno = 9
+ elif fd is not None:
+ lineno = 12
else:
- lineno = 8
+ lineno = 14
expected = [
'Stack (most recent call first):',
' File "<string>", line %s in funcB' % lineno,
- ' File "<string>", line 11 in funcA',
- ' File "<string>", line 13 in <module>'
+ ' File "<string>", line 17 in funcA',
+ ' File "<string>", line 19 in <module>'
]
- trace, exitcode = self.get_output(code, filename)
+ trace, exitcode = self.get_output(code, filename, fd)
self.assertEqual(trace, expected)
self.assertEqual(exitcode, 0)
def test_dump_traceback(self):
- self.check_dump_traceback(None)
+ self.check_dump_traceback()
def test_dump_traceback_file(self):
with temporary_filename() as filename:
- self.check_dump_traceback(filename)
+ self.check_dump_traceback(filename=filename)
+
+ @unittest.skipIf(sys.platform == "win32",
+ "subprocess doesn't support pass_fds on Windows")
+ def test_dump_traceback_fd(self):
+ with tempfile.TemporaryFile('wb+') as fp:
+ self.check_dump_traceback(fd=fp.fileno())
def test_truncate(self):
maxlen = 500
@@ -423,7 +480,10 @@ class FaultHandlerTests(unittest.TestCase):
with temporary_filename() as filename:
self.check_dump_traceback_threads(filename)
- def _check_dump_traceback_later(self, repeat, cancel, filename, loops):
+ @unittest.skipIf(not hasattr(faulthandler, 'dump_traceback_later'),
+ 'need faulthandler.dump_traceback_later()')
+ def check_dump_traceback_later(self, repeat=False, cancel=False, loops=1,
+ *, filename=None, fd=None):
"""
Check how many times the traceback is written in timeout x 2.5 seconds,
or timeout x 3.5 seconds if cancel is True: 1, 2 or 3 times depending
@@ -435,6 +495,14 @@ class FaultHandlerTests(unittest.TestCase):
code = """
import faulthandler
import time
+ import sys
+
+ timeout = {timeout}
+ repeat = {repeat}
+ cancel = {cancel}
+ loops = {loops}
+ filename = {filename!r}
+ fd = {fd}
def func(timeout, repeat, cancel, file, loops):
for loop in range(loops):
@@ -444,16 +512,14 @@ class FaultHandlerTests(unittest.TestCase):
time.sleep(timeout * 5)
faulthandler.cancel_dump_traceback_later()
- timeout = {timeout}
- repeat = {repeat}
- cancel = {cancel}
- loops = {loops}
- if {has_filename}:
- file = open({filename}, "wb")
+ if filename:
+ file = open(filename, "wb")
+ elif fd is not None:
+ file = sys.stderr.fileno()
else:
file = None
func(timeout, repeat, cancel, file, loops)
- if file is not None:
+ if filename:
file.close()
"""
code = code.format(
@@ -461,8 +527,8 @@ class FaultHandlerTests(unittest.TestCase):
repeat=repeat,
cancel=cancel,
loops=loops,
- has_filename=bool(filename),
- filename=repr(filename),
+ filename=filename,
+ fd=fd,
)
trace, exitcode = self.get_output(code, filename)
trace = '\n'.join(trace)
@@ -472,27 +538,12 @@ class FaultHandlerTests(unittest.TestCase):
if repeat:
count *= 2
header = r'Timeout \(%s\)!\nThread 0x[0-9a-f]+ \(most recent call first\):\n' % timeout_str
- regex = expected_traceback(9, 20, header, min_count=count)
+ regex = expected_traceback(17, 26, header, min_count=count)
self.assertRegex(trace, regex)
else:
self.assertEqual(trace, '')
self.assertEqual(exitcode, 0)
- @unittest.skipIf(not hasattr(faulthandler, 'dump_traceback_later'),
- 'need faulthandler.dump_traceback_later()')
- def check_dump_traceback_later(self, repeat=False, cancel=False,
- file=False, twice=False):
- if twice:
- loops = 2
- else:
- loops = 1
- if file:
- with temporary_filename() as filename:
- self._check_dump_traceback_later(repeat, cancel,
- filename, loops)
- else:
- self._check_dump_traceback_later(repeat, cancel, None, loops)
-
def test_dump_traceback_later(self):
self.check_dump_traceback_later()
@@ -503,15 +554,22 @@ class FaultHandlerTests(unittest.TestCase):
self.check_dump_traceback_later(cancel=True)
def test_dump_traceback_later_file(self):
- self.check_dump_traceback_later(file=True)
+ with temporary_filename() as filename:
+ self.check_dump_traceback_later(filename=filename)
+
+ @unittest.skipIf(sys.platform == "win32",
+ "subprocess doesn't support pass_fds on Windows")
+ def test_dump_traceback_later_fd(self):
+ with tempfile.TemporaryFile('wb+') as fp:
+ self.check_dump_traceback_later(fd=fp.fileno())
def test_dump_traceback_later_twice(self):
- self.check_dump_traceback_later(twice=True)
+ self.check_dump_traceback_later(loops=2)
@unittest.skipIf(not hasattr(faulthandler, "register"),
"need faulthandler.register")
def check_register(self, filename=False, all_threads=False,
- unregister=False, chain=False):
+ unregister=False, chain=False, fd=None):
"""
Register a handler displaying the traceback on a user signal. Raise the
signal and check the written traceback.
@@ -527,6 +585,13 @@ class FaultHandlerTests(unittest.TestCase):
import signal
import sys
+ all_threads = {all_threads}
+ signum = {signum}
+ unregister = {unregister}
+ chain = {chain}
+ filename = {filename!r}
+ fd = {fd}
+
def func(signum):
os.kill(os.getpid(), signum)
@@ -534,19 +599,16 @@ class FaultHandlerTests(unittest.TestCase):
handler.called = True
handler.called = False
- exitcode = 0
- signum = {signum}
- unregister = {unregister}
- chain = {chain}
-
- if {has_filename}:
- file = open({filename}, "wb")
+ if filename:
+ file = open(filename, "wb")
+ elif fd is not None:
+ file = sys.stderr.fileno()
else:
file = None
if chain:
signal.signal(signum, handler)
faulthandler.register(signum, file=file,
- all_threads={all_threads}, chain={chain})
+ all_threads=all_threads, chain={chain})
if unregister:
faulthandler.unregister(signum)
func(signum)
@@ -557,17 +619,19 @@ class FaultHandlerTests(unittest.TestCase):
output = sys.stderr
print("Error: signal handler not called!", file=output)
exitcode = 1
- if file is not None:
+ else:
+ exitcode = 0
+ if filename:
file.close()
sys.exit(exitcode)
"""
code = code.format(
- filename=repr(filename),
- has_filename=bool(filename),
all_threads=all_threads,
signum=signum,
unregister=unregister,
chain=chain,
+ filename=filename,
+ fd=fd,
)
trace, exitcode = self.get_output(code, filename)
trace = '\n'.join(trace)
@@ -576,7 +640,7 @@ class FaultHandlerTests(unittest.TestCase):
regex = 'Current thread XXX \(most recent call first\):\n'
else:
regex = 'Stack \(most recent call first\):\n'
- regex = expected_traceback(7, 28, regex)
+ regex = expected_traceback(14, 32, regex)
self.assertRegex(trace, regex)
else:
self.assertEqual(trace, '')
@@ -595,6 +659,12 @@ class FaultHandlerTests(unittest.TestCase):
with temporary_filename() as filename:
self.check_register(filename=filename)
+ @unittest.skipIf(sys.platform == "win32",
+ "subprocess doesn't support pass_fds on Windows")
+ def test_register_fd(self):
+ with tempfile.TemporaryFile('wb+') as fp:
+ self.check_register(fd=fp.fileno())
+
def test_register_threads(self):
self.check_register(all_threads=True)
@@ -613,7 +683,7 @@ class FaultHandlerTests(unittest.TestCase):
sys.stderr = stderr
def test_stderr_None(self):
- # Issue #21497: provide an helpful error if sys.stderr is None,
+ # Issue #21497: provide a helpful error if sys.stderr is None,
# instead of just an attribute error: "None has no attribute fileno".
with self.check_stderr_none():
faulthandler.enable()
diff --git a/Lib/test/test_file_eintr.py b/Lib/test/test_file_eintr.py
index b4e18ce17d..f1efd266ff 100644
--- a/Lib/test/test_file_eintr.py
+++ b/Lib/test/test_file_eintr.py
@@ -13,16 +13,16 @@ import select
import signal
import subprocess
import sys
-from test.support import run_unittest
import time
import unittest
# Test import all of the things we're about to try testing up front.
-from _io import FileIO
+import _io
+import _pyio
@unittest.skipUnless(os.name == 'posix', 'tests requires a posix system.')
-class TestFileIOSignalInterrupt(unittest.TestCase):
+class TestFileIOSignalInterrupt:
def setUp(self):
self._process = None
@@ -38,8 +38,9 @@ class TestFileIOSignalInterrupt(unittest.TestCase):
subclasseses should override this to test different IO objects.
"""
- return ('import _io ;'
- 'infile = _io.FileIO(sys.stdin.fileno(), "rb")')
+ return ('import %s as io ;'
+ 'infile = io.FileIO(sys.stdin.fileno(), "rb")' %
+ self.modname)
def fail_with_process_info(self, why, stdout=b'', stderr=b'',
communicate=True):
@@ -179,11 +180,19 @@ class TestFileIOSignalInterrupt(unittest.TestCase):
expected=b'hello\nworld!\n'))
+class CTestFileIOSignalInterrupt(TestFileIOSignalInterrupt, unittest.TestCase):
+ modname = '_io'
+
+class PyTestFileIOSignalInterrupt(TestFileIOSignalInterrupt, unittest.TestCase):
+ modname = '_pyio'
+
+
class TestBufferedIOSignalInterrupt(TestFileIOSignalInterrupt):
def _generate_infile_setup_code(self):
"""Returns the infile = ... line of code to make a BufferedReader."""
- return ('infile = open(sys.stdin.fileno(), "rb") ;'
- 'import _io ;assert isinstance(infile, _io.BufferedReader)')
+ return ('import %s as io ;infile = io.open(sys.stdin.fileno(), "rb") ;'
+ 'assert isinstance(infile, io.BufferedReader)' %
+ self.modname)
def test_readall(self):
"""BufferedReader.read() must handle signals and not lose data."""
@@ -193,12 +202,20 @@ class TestBufferedIOSignalInterrupt(TestFileIOSignalInterrupt):
read_method_name='read',
expected=b'hello\nworld!\n'))
+class CTestBufferedIOSignalInterrupt(TestBufferedIOSignalInterrupt, unittest.TestCase):
+ modname = '_io'
+
+class PyTestBufferedIOSignalInterrupt(TestBufferedIOSignalInterrupt, unittest.TestCase):
+ modname = '_pyio'
+
class TestTextIOSignalInterrupt(TestFileIOSignalInterrupt):
def _generate_infile_setup_code(self):
"""Returns the infile = ... line of code to make a TextIOWrapper."""
- return ('infile = open(sys.stdin.fileno(), "rt", newline=None) ;'
- 'import _io ;assert isinstance(infile, _io.TextIOWrapper)')
+ return ('import %s as io ;'
+ 'infile = io.open(sys.stdin.fileno(), "rt", newline=None) ;'
+ 'assert isinstance(infile, io.TextIOWrapper)' %
+ self.modname)
def test_readline(self):
"""readline() must handle signals and not lose data."""
@@ -224,13 +241,12 @@ class TestTextIOSignalInterrupt(TestFileIOSignalInterrupt):
read_method_name='read',
expected="hello\nworld!\n"))
+class CTestTextIOSignalInterrupt(TestTextIOSignalInterrupt, unittest.TestCase):
+ modname = '_io'
-def test_main():
- test_cases = [
- tc for tc in globals().values()
- if isinstance(tc, type) and issubclass(tc, unittest.TestCase)]
- run_unittest(*test_cases)
+class PyTestTextIOSignalInterrupt(TestTextIOSignalInterrupt, unittest.TestCase):
+ modname = '_pyio'
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_fileinput.py b/Lib/test/test_fileinput.py
index 4765a056f6..784bc92d23 100644
--- a/Lib/test/test_fileinput.py
+++ b/Lib/test/test_fileinput.py
@@ -46,6 +46,42 @@ def remove_tempfiles(*names):
if name:
safe_unlink(name)
+class LineReader:
+
+ def __init__(self):
+ self._linesread = []
+
+ @property
+ def linesread(self):
+ try:
+ return self._linesread[:]
+ finally:
+ self._linesread = []
+
+ def openhook(self, filename, mode):
+ self.it = iter(filename.splitlines(True))
+ return self
+
+ def readline(self, size=None):
+ line = next(self.it, '')
+ self._linesread.append(line)
+ return line
+
+ def readlines(self, hint=-1):
+ lines = []
+ size = 0
+ while True:
+ line = self.readline()
+ if not line:
+ return lines
+ lines.append(line)
+ size += len(line)
+ if size >= hint:
+ return lines
+
+ def close(self):
+ pass
+
class BufferSizesTests(unittest.TestCase):
def test_buffer_sizes(self):
# First, run the tests with default and teeny buffer size.
@@ -240,6 +276,17 @@ class FileInputTests(unittest.TestCase):
lines = list(fi)
self.assertEqual(lines, [b'spam, bacon, sausage, and spam'])
+ def test_detached_stdin_binary_mode(self):
+ orig_stdin = sys.stdin
+ try:
+ sys.stdin = BytesIO(b'spam, bacon, sausage, and spam')
+ self.assertFalse(hasattr(sys.stdin, 'buffer'))
+ fi = FileInput(files=['-'], mode='rb')
+ lines = list(fi)
+ self.assertEqual(lines, [b'spam, bacon, sausage, and spam'])
+ finally:
+ sys.stdin = orig_stdin
+
def test_file_opening_hook(self):
try:
# cannot use openhook and inplace mode
@@ -278,7 +325,7 @@ class FileInputTests(unittest.TestCase):
self.addCleanup(safe_unlink, TESTFN)
with FileInput(files=TESTFN,
- openhook=hook_encoded('ascii'), bufsize=8) as fi:
+ openhook=hook_encoded('ascii')) as fi:
try:
self.assertEqual(fi.readline(), 'A\n')
self.assertEqual(fi.readline(), 'B\n')
@@ -446,6 +493,38 @@ class FileInputTests(unittest.TestCase):
self.assertEqual(result, -1, "fileno() should return -1")
+ def test_readline_buffering(self):
+ src = LineReader()
+ with FileInput(files=['line1\nline2', 'line3\n'],
+ openhook=src.openhook) as fi:
+ self.assertEqual(src.linesread, [])
+ self.assertEqual(fi.readline(), 'line1\n')
+ self.assertEqual(src.linesread, ['line1\n'])
+ self.assertEqual(fi.readline(), 'line2')
+ self.assertEqual(src.linesread, ['line2'])
+ self.assertEqual(fi.readline(), 'line3\n')
+ self.assertEqual(src.linesread, ['', 'line3\n'])
+ self.assertEqual(fi.readline(), '')
+ self.assertEqual(src.linesread, [''])
+ self.assertEqual(fi.readline(), '')
+ self.assertEqual(src.linesread, [])
+
+ def test_iteration_buffering(self):
+ src = LineReader()
+ with FileInput(files=['line1\nline2', 'line3\n'],
+ openhook=src.openhook) as fi:
+ self.assertEqual(src.linesread, [])
+ self.assertEqual(next(fi), 'line1\n')
+ self.assertEqual(src.linesread, ['line1\n'])
+ self.assertEqual(next(fi), 'line2')
+ self.assertEqual(src.linesread, ['line2'])
+ self.assertEqual(next(fi), 'line3\n')
+ self.assertEqual(src.linesread, ['', 'line3\n'])
+ self.assertRaises(StopIteration, next, fi)
+ self.assertEqual(src.linesread, [''])
+ self.assertRaises(StopIteration, next, fi)
+ self.assertEqual(src.linesread, [])
+
class MockFileInput:
"""A class that mocks out fileinput.FileInput for use during unit tests"""
diff --git a/Lib/test/test_fileio.py b/Lib/test/test_fileio.py
index a4fd20dcf2..59cc38f6ca 100644
--- a/Lib/test/test_fileio.py
+++ b/Lib/test/test_fileio.py
@@ -12,13 +12,15 @@ from functools import wraps
from test.support import TESTFN, check_warnings, run_unittest, make_bad_fd, cpython_only
from collections import UserList
-from _io import FileIO as _FileIO
+import _io # C implementation of io
+import _pyio # Python implementation of io
-class AutoFileTests(unittest.TestCase):
+
+class AutoFileTests:
# file tests for which a test file is automatically set up
def setUp(self):
- self.f = _FileIO(TESTFN, 'w')
+ self.f = self.FileIO(TESTFN, 'w')
def tearDown(self):
if self.f:
@@ -60,20 +62,69 @@ class AutoFileTests(unittest.TestCase):
self.assertRaises((AttributeError, TypeError),
setattr, f, attr, 'oops')
- def testReadinto(self):
- # verify readinto
- self.f.write(bytes([1, 2]))
+ def testBlksize(self):
+ # test private _blksize attribute
+ blksize = io.DEFAULT_BUFFER_SIZE
+ # try to get preferred blksize from stat.st_blksize, if available
+ if hasattr(os, 'fstat'):
+ fst = os.fstat(self.f.fileno())
+ blksize = getattr(fst, 'st_blksize', blksize)
+ self.assertEqual(self.f._blksize, blksize)
+
+ # verify readinto
+ def testReadintoByteArray(self):
+ self.f.write(bytes([1, 2, 0, 255]))
self.f.close()
- a = array('b', b'x'*10)
- self.f = _FileIO(TESTFN, 'r')
- n = self.f.readinto(a)
- self.assertEqual(array('b', [1, 2]), a[:n])
+
+ ba = bytearray(b'abcdefgh')
+ with self.FileIO(TESTFN, 'r') as f:
+ n = f.readinto(ba)
+ self.assertEqual(ba, b'\x01\x02\x00\xffefgh')
+ self.assertEqual(n, 4)
+
+ def _testReadintoMemoryview(self):
+ self.f.write(bytes([1, 2, 0, 255]))
+ self.f.close()
+
+ m = memoryview(bytearray(b'abcdefgh'))
+ with self.FileIO(TESTFN, 'r') as f:
+ n = f.readinto(m)
+ self.assertEqual(m, b'\x01\x02\x00\xffefgh')
+ self.assertEqual(n, 4)
+
+ m = memoryview(bytearray(b'abcdefgh')).cast('H', shape=[2, 2])
+ with self.FileIO(TESTFN, 'r') as f:
+ n = f.readinto(m)
+ self.assertEqual(bytes(m), b'\x01\x02\x00\xffefgh')
+ self.assertEqual(n, 4)
+
+ def _testReadintoArray(self):
+ self.f.write(bytes([1, 2, 0, 255]))
+ self.f.close()
+
+ a = array('B', b'abcdefgh')
+ with self.FileIO(TESTFN, 'r') as f:
+ n = f.readinto(a)
+ self.assertEqual(a, array('B', [1, 2, 0, 255, 101, 102, 103, 104]))
+ self.assertEqual(n, 4)
+
+ a = array('b', b'abcdefgh')
+ with self.FileIO(TESTFN, 'r') as f:
+ n = f.readinto(a)
+ self.assertEqual(a, array('b', [1, 2, 0, -1, 101, 102, 103, 104]))
+ self.assertEqual(n, 4)
+
+ a = array('I', b'abcdefgh')
+ with self.FileIO(TESTFN, 'r') as f:
+ n = f.readinto(a)
+ self.assertEqual(a, array('I', b'\x01\x02\x00\xffefgh'))
+ self.assertEqual(n, 4)
def testWritelinesList(self):
l = [b'123', b'456']
self.f.writelines(l)
self.f.close()
- self.f = _FileIO(TESTFN, 'rb')
+ self.f = self.FileIO(TESTFN, 'rb')
buf = self.f.read()
self.assertEqual(buf, b'123456')
@@ -81,7 +132,7 @@ class AutoFileTests(unittest.TestCase):
l = UserList([b'123', b'456'])
self.f.writelines(l)
self.f.close()
- self.f = _FileIO(TESTFN, 'rb')
+ self.f = self.FileIO(TESTFN, 'rb')
buf = self.f.read()
self.assertEqual(buf, b'123456')
@@ -93,7 +144,7 @@ class AutoFileTests(unittest.TestCase):
def test_none_args(self):
self.f.write(b"hi\nbye\nabc")
self.f.close()
- self.f = _FileIO(TESTFN, 'r')
+ self.f = self.FileIO(TESTFN, 'r')
self.assertEqual(self.f.read(None), b"hi\nbye\nabc")
self.f.seek(0)
self.assertEqual(self.f.readline(None), b"hi\n")
@@ -103,13 +154,26 @@ class AutoFileTests(unittest.TestCase):
self.assertRaises(TypeError, self.f.write, "Hello!")
def testRepr(self):
- self.assertEqual(repr(self.f), "<_io.FileIO name=%r mode=%r>"
- % (self.f.name, self.f.mode))
+ self.assertEqual(repr(self.f),
+ "<%s.FileIO name=%r mode=%r closefd=True>" %
+ (self.modulename, self.f.name, self.f.mode))
del self.f.name
- self.assertEqual(repr(self.f), "<_io.FileIO fd=%r mode=%r>"
- % (self.f.fileno(), self.f.mode))
+ self.assertEqual(repr(self.f),
+ "<%s.FileIO fd=%r mode=%r closefd=True>" %
+ (self.modulename, self.f.fileno(), self.f.mode))
self.f.close()
- self.assertEqual(repr(self.f), "<_io.FileIO [closed]>")
+ self.assertEqual(repr(self.f),
+ "<%s.FileIO [closed]>" % (self.modulename,))
+
+ def testReprNoCloseFD(self):
+ fd = os.open(TESTFN, os.O_RDONLY)
+ try:
+ with self.FileIO(fd, 'r', closefd=False) as f:
+ self.assertEqual(repr(f),
+ "<%s.FileIO name=%r mode=%r closefd=False>" %
+ (self.modulename, f.name, f.mode))
+ finally:
+ os.close(fd)
def testErrors(self):
f = self.f
@@ -119,7 +183,7 @@ class AutoFileTests(unittest.TestCase):
self.assertRaises(ValueError, f.read, 10) # Open for reading
f.close()
self.assertTrue(f.closed)
- f = _FileIO(TESTFN, 'r')
+ f = self.FileIO(TESTFN, 'r')
self.assertRaises(TypeError, f.readinto, "")
self.assertFalse(f.closed)
f.close()
@@ -138,11 +202,11 @@ class AutoFileTests(unittest.TestCase):
# should raise on closed file
self.assertRaises(ValueError, method)
- self.assertRaises(ValueError, self.f.readinto) # XXX should be TypeError?
+ self.assertRaises(TypeError, self.f.readinto)
self.assertRaises(ValueError, self.f.readinto, bytearray(1))
- self.assertRaises(ValueError, self.f.seek)
+ self.assertRaises(TypeError, self.f.seek)
self.assertRaises(ValueError, self.f.seek, 0)
- self.assertRaises(ValueError, self.f.write)
+ self.assertRaises(TypeError, self.f.write)
self.assertRaises(ValueError, self.f.write, b'')
self.assertRaises(TypeError, self.f.writelines)
self.assertRaises(ValueError, self.f.writelines, b'')
@@ -150,9 +214,9 @@ class AutoFileTests(unittest.TestCase):
def testOpendir(self):
# Issue 3703: opening a directory should fill the errno
# Windows always returns "[Errno 13]: Permission denied
- # Unix calls dircheck() and returns "[Errno 21]: Is a directory"
+ # Unix uses fstat and returns "[Errno 21]: Is a directory"
try:
- _FileIO('.', 'r')
+ self.FileIO('.', 'r')
except OSError as e:
self.assertNotEqual(e.errno, 0)
self.assertEqual(e.filename, ".")
@@ -163,7 +227,7 @@ class AutoFileTests(unittest.TestCase):
def testOpenDirFD(self):
fd = os.open('.', os.O_RDONLY)
with self.assertRaises(OSError) as cm:
- _FileIO(fd, 'r')
+ self.FileIO(fd, 'r')
os.close(fd)
self.assertEqual(cm.exception.errno, errno.EISDIR)
@@ -248,7 +312,7 @@ class AutoFileTests(unittest.TestCase):
self.f.close()
except OSError:
pass
- self.f = _FileIO(TESTFN, 'r')
+ self.f = self.FileIO(TESTFN, 'r')
os.close(self.f.fileno())
return self.f
@@ -268,23 +332,32 @@ class AutoFileTests(unittest.TestCase):
a = array('b', b'x'*10)
f.readinto(a)
-class OtherFileTests(unittest.TestCase):
+class CAutoFileTests(AutoFileTests, unittest.TestCase):
+ FileIO = _io.FileIO
+ modulename = '_io'
+
+class PyAutoFileTests(AutoFileTests, unittest.TestCase):
+ FileIO = _pyio.FileIO
+ modulename = '_pyio'
+
+
+class OtherFileTests:
def testAbles(self):
try:
- f = _FileIO(TESTFN, "w")
+ f = self.FileIO(TESTFN, "w")
self.assertEqual(f.readable(), False)
self.assertEqual(f.writable(), True)
self.assertEqual(f.seekable(), True)
f.close()
- f = _FileIO(TESTFN, "r")
+ f = self.FileIO(TESTFN, "r")
self.assertEqual(f.readable(), True)
self.assertEqual(f.writable(), False)
self.assertEqual(f.seekable(), True)
f.close()
- f = _FileIO(TESTFN, "a+")
+ f = self.FileIO(TESTFN, "a+")
self.assertEqual(f.readable(), True)
self.assertEqual(f.writable(), True)
self.assertEqual(f.seekable(), True)
@@ -293,7 +366,7 @@ class OtherFileTests(unittest.TestCase):
if sys.platform != "win32":
try:
- f = _FileIO("/dev/tty", "a")
+ f = self.FileIO("/dev/tty", "a")
except OSError:
# When run in a cron job there just aren't any
# ttys, so skip the test. This also handles other
@@ -316,7 +389,7 @@ class OtherFileTests(unittest.TestCase):
# check invalid mode strings
for mode in ("", "aU", "wU+", "rw", "rt"):
try:
- f = _FileIO(TESTFN, mode)
+ f = self.FileIO(TESTFN, mode)
except ValueError:
pass
else:
@@ -332,7 +405,7 @@ class OtherFileTests(unittest.TestCase):
('ab+', 'ab+'), ('a+b', 'ab+'), ('r', 'rb'),
('rb', 'rb'), ('rb+', 'rb+'), ('r+b', 'rb+')]:
# read modes are last so that TESTFN will exist first
- with _FileIO(TESTFN, modes[0]) as f:
+ with self.FileIO(TESTFN, modes[0]) as f:
self.assertEqual(f.mode, modes[1])
finally:
if os.path.exists(TESTFN):
@@ -340,7 +413,7 @@ class OtherFileTests(unittest.TestCase):
def testUnicodeOpen(self):
# verify repr works for unicode too
- f = _FileIO(str(TESTFN), "w")
+ f = self.FileIO(str(TESTFN), "w")
f.close()
os.unlink(TESTFN)
@@ -350,7 +423,7 @@ class OtherFileTests(unittest.TestCase):
fn = TESTFN.encode("ascii")
except UnicodeEncodeError:
self.skipTest('could not encode %r to ascii' % TESTFN)
- f = _FileIO(fn, "w")
+ f = self.FileIO(fn, "w")
try:
f.write(b"abc")
f.close()
@@ -361,28 +434,21 @@ class OtherFileTests(unittest.TestCase):
def testConstructorHandlesNULChars(self):
fn_with_NUL = 'foo\0bar'
- self.assertRaises(TypeError, _FileIO, fn_with_NUL, 'w')
- self.assertRaises(TypeError, _FileIO, bytes(fn_with_NUL, 'ascii'), 'w')
+ self.assertRaises(ValueError, self.FileIO, fn_with_NUL, 'w')
+ self.assertRaises(ValueError, self.FileIO, bytes(fn_with_NUL, 'ascii'), 'w')
def testInvalidFd(self):
- self.assertRaises(ValueError, _FileIO, -10)
- self.assertRaises(OSError, _FileIO, make_bad_fd())
+ self.assertRaises(ValueError, self.FileIO, -10)
+ self.assertRaises(OSError, self.FileIO, make_bad_fd())
if sys.platform == 'win32':
import msvcrt
self.assertRaises(OSError, msvcrt.get_osfhandle, make_bad_fd())
- @cpython_only
- def testInvalidFd_overflow(self):
- # Issue 15989
- import _testcapi
- self.assertRaises(TypeError, _FileIO, _testcapi.INT_MAX + 1)
- self.assertRaises(TypeError, _FileIO, _testcapi.INT_MIN - 1)
-
def testBadModeArgument(self):
# verify that we get a sensible error message for bad mode argument
bad_mode = "qwerty"
try:
- f = _FileIO(TESTFN, bad_mode)
+ f = self.FileIO(TESTFN, bad_mode)
except ValueError as msg:
if msg.args[0] != 0:
s = str(msg)
@@ -395,7 +461,7 @@ class OtherFileTests(unittest.TestCase):
self.fail("no error for invalid mode: %s" % bad_mode)
def testTruncate(self):
- f = _FileIO(TESTFN, 'w')
+ f = self.FileIO(TESTFN, 'w')
f.write(bytes(bytearray(range(10))))
self.assertEqual(f.tell(), 10)
f.truncate(5)
@@ -410,11 +476,11 @@ class OtherFileTests(unittest.TestCase):
def bug801631():
# SF bug <http://www.python.org/sf/801631>
# "file.truncate fault on windows"
- f = _FileIO(TESTFN, 'w')
+ f = self.FileIO(TESTFN, 'w')
f.write(bytes(range(11)))
f.close()
- f = _FileIO(TESTFN,'r+')
+ f = self.FileIO(TESTFN,'r+')
data = f.read(5)
if data != bytes(range(5)):
self.fail("Read on file opened for update failed %r" % data)
@@ -454,19 +520,19 @@ class OtherFileTests(unittest.TestCase):
pass
def testInvalidInit(self):
- self.assertRaises(TypeError, _FileIO, "1", 0, 0)
+ self.assertRaises(TypeError, self.FileIO, "1", 0, 0)
def testWarnings(self):
with check_warnings(quiet=True) as w:
self.assertEqual(w.warnings, [])
- self.assertRaises(TypeError, _FileIO, [])
+ self.assertRaises(TypeError, self.FileIO, [])
self.assertEqual(w.warnings, [])
- self.assertRaises(ValueError, _FileIO, "/some/invalid/name", "rt")
+ self.assertRaises(ValueError, self.FileIO, "/some/invalid/name", "rt")
self.assertEqual(w.warnings, [])
def testUnclosedFDOnException(self):
class MyException(Exception): pass
- class MyFileIO(_FileIO):
+ class MyFileIO(self.FileIO):
def __setattr__(self, name, value):
if name == "name":
raise MyException("blocked setting name")
@@ -475,12 +541,28 @@ class OtherFileTests(unittest.TestCase):
self.assertRaises(MyException, MyFileIO, fd)
os.close(fd) # should not raise OSError(EBADF)
+class COtherFileTests(OtherFileTests, unittest.TestCase):
+ FileIO = _io.FileIO
+ modulename = '_io'
+
+ @cpython_only
+ def testInvalidFd_overflow(self):
+ # Issue 15989
+ import _testcapi
+ self.assertRaises(TypeError, self.FileIO, _testcapi.INT_MAX + 1)
+ self.assertRaises(TypeError, self.FileIO, _testcapi.INT_MIN - 1)
+
+class PyOtherFileTests(OtherFileTests, unittest.TestCase):
+ FileIO = _pyio.FileIO
+ modulename = '_pyio'
+
def test_main():
# Historically, these tests have been sloppy about removing TESTFN.
# So get rid of it no matter what.
try:
- run_unittest(AutoFileTests, OtherFileTests)
+ run_unittest(CAutoFileTests, PyAutoFileTests,
+ COtherFileTests, PyOtherFileTests)
finally:
if os.path.exists(TESTFN):
os.unlink(TESTFN)
diff --git a/Lib/test/test_finalization.py b/Lib/test/test_finalization.py
index 03ac1aa274..35d7913e5b 100644
--- a/Lib/test/test_finalization.py
+++ b/Lib/test/test_finalization.py
@@ -515,8 +515,5 @@ class LegacyFinalizationTest(TestBase, unittest.TestCase):
self.assertIs(wr(), None)
-def test_main():
- support.run_unittest(__name__)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_float.py b/Lib/test/test_float.py
index 24fe128a61..cb1f6db8fc 100644
--- a/Lib/test/test_float.py
+++ b/Lib/test/test_float.py
@@ -822,6 +822,14 @@ class RoundTestCase(unittest.TestCase):
test(sfmt, NAN, ' nan')
test(sfmt, -NAN, ' nan')
+ def test_None_ndigits(self):
+ for x in round(1.23), round(1.23, None), round(1.23, ndigits=None):
+ self.assertEqual(x, 1)
+ self.assertIsInstance(x, int)
+ for x in round(1.78), round(1.78, None), round(1.78, ndigits=None):
+ self.assertEqual(x, 2)
+ self.assertIsInstance(x, int)
+
# Beginning with Python 2.6 float has cross platform compatible
# ways to create and represent inf and nan
@@ -1347,19 +1355,24 @@ class HexFloatTestCase(unittest.TestCase):
else:
self.identical(x, fromHex(toHex(x)))
+ def test_subclass(self):
+ class F(float):
+ def __new__(cls, value):
+ return float.__new__(cls, value + 1)
+
+ f = F.fromhex((1.5).hex())
+ self.assertIs(type(f), F)
+ self.assertEqual(f, 2.5)
+
+ class F2(float):
+ def __init__(self, value):
+ self.foo = 'bar'
+
+ f = F2.fromhex((1.5).hex())
+ self.assertIs(type(f), F2)
+ self.assertEqual(f, 1.5)
+ self.assertEqual(getattr(f, 'foo', 'none'), 'bar')
-def test_main():
- support.run_unittest(
- GeneralFloatCases,
- FormatFunctionsTestCase,
- UnknownFormatTestCase,
- IEEEFormatTestCase,
- FormatTestCase,
- ReprTestCase,
- RoundTestCase,
- InfNanTest,
- HexFloatTestCase,
- )
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_flufl.py b/Lib/test/test_flufl.py
index 5a709bc5f5..98b5bd6fd1 100644
--- a/Lib/test/test_flufl.py
+++ b/Lib/test/test_flufl.py
@@ -18,10 +18,5 @@ class FLUFLTests(unittest.TestCase):
'<FLUFL test>', 'exec')
-def test_main():
- from test.support import run_unittest
- run_unittest(FLUFLTests)
-
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_fnmatch.py b/Lib/test/test_fnmatch.py
index 482835d42e..fa37f90c27 100644
--- a/Lib/test/test_fnmatch.py
+++ b/Lib/test/test_fnmatch.py
@@ -1,6 +1,5 @@
"""Test cases for the fnmatch module."""
-from test import support
import unittest
from fnmatch import fnmatch, fnmatchcase, translate, filter
@@ -79,11 +78,5 @@ class FilterTestCase(unittest.TestCase):
self.assertEqual(filter(['a', 'b'], 'a'), ['a'])
-def test_main():
- support.run_unittest(FnmatchTestCase,
- TranslateTestCase,
- FilterTestCase)
-
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_fork1.py b/Lib/test/test_fork1.py
index e0626dffdc..da46fe565d 100644
--- a/Lib/test/test_fork1.py
+++ b/Lib/test/test_fork1.py
@@ -6,9 +6,10 @@ import os
import signal
import sys
import time
+import unittest
from test.fork_wait import ForkWait
-from test.support import (run_unittest, reap_children, get_attribute,
+from test.support import (reap_children, get_attribute,
import_module, verbose)
threading = import_module('threading')
@@ -18,13 +19,14 @@ get_attribute(os, 'fork')
class ForkTest(ForkWait):
def wait_impl(self, cpid):
- for i in range(10):
+ deadline = time.monotonic() + 10.0
+ while time.monotonic() <= deadline:
# waitpid() shouldn't hang, but some of the buildbots seem to hang
# in the forking tests. This is an attempt to fix the problem.
spid, status = os.waitpid(cpid, os.WNOHANG)
if spid == cpid:
break
- time.sleep(1.0)
+ time.sleep(0.1)
self.assertEqual(spid, cpid)
self.assertEqual(status, 0, "cause = %d, exit = %d" % (status&0xff, status>>8))
@@ -103,9 +105,8 @@ class ForkTest(ForkWait):
fork_with_import_lock(level)
-def test_main():
- run_unittest(ForkTest)
+def tearDownModule():
reap_children()
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_format.py b/Lib/test/test_format.py
index fc71e4818e..9b13632591 100644
--- a/Lib/test/test_format.py
+++ b/Lib/test/test_format.py
@@ -9,7 +9,7 @@ maxsize = support.MAX_Py_ssize_t
# test string formatting operator (I am not sure if this is being tested
# elsewhere but, surely, some of the given cases are *not* tested because
# they crash python)
-# test on unicode strings as well
+# test on bytes object as well
def testformat(formatstr, args, output=None, limit=None, overflowok=False):
if verbose:
@@ -46,191 +46,209 @@ def testformat(formatstr, args, output=None, limit=None, overflowok=False):
if verbose:
print('yes')
+def testcommon(formatstr, args, output=None, limit=None, overflowok=False):
+ # if formatstr is a str, test str, bytes, and bytearray;
+ # otherwise, test bytes and bytearry
+ if isinstance(formatstr, str):
+ testformat(formatstr, args, output, limit, overflowok)
+ b_format = formatstr.encode('ascii')
+ else:
+ b_format = formatstr
+ ba_format = bytearray(b_format)
+ b_args = []
+ if not isinstance(args, tuple):
+ args = (args, )
+ b_args = tuple(args)
+ if output is None:
+ b_output = ba_output = None
+ else:
+ if isinstance(output, str):
+ b_output = output.encode('ascii')
+ else:
+ b_output = output
+ ba_output = bytearray(b_output)
+ testformat(b_format, b_args, b_output, limit, overflowok)
+ testformat(ba_format, b_args, ba_output, limit, overflowok)
+
class FormatTest(unittest.TestCase):
- def test_format(self):
- testformat("%.1d", (1,), "1")
- testformat("%.*d", (sys.maxsize,1), overflowok=True) # expect overflow
- testformat("%.100d", (1,), '00000000000000000000000000000000000000'
+
+ def test_common_format(self):
+ # test the format identifiers that work the same across
+ # str, bytes, and bytearrays (integer, float, oct, hex)
+ testcommon("%.1d", (1,), "1")
+ testcommon("%.*d", (sys.maxsize,1), overflowok=True) # expect overflow
+ testcommon("%.100d", (1,), '00000000000000000000000000000000000000'
'000000000000000000000000000000000000000000000000000000'
'00000001', overflowok=True)
- testformat("%#.117x", (1,), '0x00000000000000000000000000000000000'
+ testcommon("%#.117x", (1,), '0x00000000000000000000000000000000000'
'000000000000000000000000000000000000000000000000000000'
'0000000000000000000000000001',
overflowok=True)
- testformat("%#.118x", (1,), '0x00000000000000000000000000000000000'
+ testcommon("%#.118x", (1,), '0x00000000000000000000000000000000000'
'000000000000000000000000000000000000000000000000000000'
'00000000000000000000000000001',
overflowok=True)
- testformat("%f", (1.0,), "1.000000")
+ testcommon("%f", (1.0,), "1.000000")
# these are trying to test the limits of the internal magic-number-length
# formatting buffer, if that number changes then these tests are less
# effective
- testformat("%#.*g", (109, -1.e+49/3.))
- testformat("%#.*g", (110, -1.e+49/3.))
- testformat("%#.*g", (110, -1.e+100/3.))
+ testcommon("%#.*g", (109, -1.e+49/3.))
+ testcommon("%#.*g", (110, -1.e+49/3.))
+ testcommon("%#.*g", (110, -1.e+100/3.))
# test some ridiculously large precision, expect overflow
- testformat('%12.*f', (123456, 1.0))
+ testcommon('%12.*f', (123456, 1.0))
# check for internal overflow validation on length of precision
# these tests should no longer cause overflow in Python
# 2.7/3.1 and later.
- testformat("%#.*g", (110, -1.e+100/3.))
- testformat("%#.*G", (110, -1.e+100/3.))
- testformat("%#.*f", (110, -1.e+100/3.))
- testformat("%#.*F", (110, -1.e+100/3.))
+ testcommon("%#.*g", (110, -1.e+100/3.))
+ testcommon("%#.*G", (110, -1.e+100/3.))
+ testcommon("%#.*f", (110, -1.e+100/3.))
+ testcommon("%#.*F", (110, -1.e+100/3.))
# Formatting of integers. Overflow is not ok
- testformat("%x", 10, "a")
- testformat("%x", 100000000000, "174876e800")
- testformat("%o", 10, "12")
- testformat("%o", 100000000000, "1351035564000")
- testformat("%d", 10, "10")
- testformat("%d", 100000000000, "100000000000")
+ testcommon("%x", 10, "a")
+ testcommon("%x", 100000000000, "174876e800")
+ testcommon("%o", 10, "12")
+ testcommon("%o", 100000000000, "1351035564000")
+ testcommon("%d", 10, "10")
+ testcommon("%d", 100000000000, "100000000000")
big = 123456789012345678901234567890
- testformat("%d", big, "123456789012345678901234567890")
- testformat("%d", -big, "-123456789012345678901234567890")
- testformat("%5d", -big, "-123456789012345678901234567890")
- testformat("%31d", -big, "-123456789012345678901234567890")
- testformat("%32d", -big, " -123456789012345678901234567890")
- testformat("%-32d", -big, "-123456789012345678901234567890 ")
- testformat("%032d", -big, "-0123456789012345678901234567890")
- testformat("%-032d", -big, "-123456789012345678901234567890 ")
- testformat("%034d", -big, "-000123456789012345678901234567890")
- testformat("%034d", big, "0000123456789012345678901234567890")
- testformat("%0+34d", big, "+000123456789012345678901234567890")
- testformat("%+34d", big, " +123456789012345678901234567890")
- testformat("%34d", big, " 123456789012345678901234567890")
- testformat("%.2d", big, "123456789012345678901234567890")
- testformat("%.30d", big, "123456789012345678901234567890")
- testformat("%.31d", big, "0123456789012345678901234567890")
- testformat("%32.31d", big, " 0123456789012345678901234567890")
- testformat("%d", float(big), "123456________________________", 6)
+ testcommon("%d", big, "123456789012345678901234567890")
+ testcommon("%d", -big, "-123456789012345678901234567890")
+ testcommon("%5d", -big, "-123456789012345678901234567890")
+ testcommon("%31d", -big, "-123456789012345678901234567890")
+ testcommon("%32d", -big, " -123456789012345678901234567890")
+ testcommon("%-32d", -big, "-123456789012345678901234567890 ")
+ testcommon("%032d", -big, "-0123456789012345678901234567890")
+ testcommon("%-032d", -big, "-123456789012345678901234567890 ")
+ testcommon("%034d", -big, "-000123456789012345678901234567890")
+ testcommon("%034d", big, "0000123456789012345678901234567890")
+ testcommon("%0+34d", big, "+000123456789012345678901234567890")
+ testcommon("%+34d", big, " +123456789012345678901234567890")
+ testcommon("%34d", big, " 123456789012345678901234567890")
+ testcommon("%.2d", big, "123456789012345678901234567890")
+ testcommon("%.30d", big, "123456789012345678901234567890")
+ testcommon("%.31d", big, "0123456789012345678901234567890")
+ testcommon("%32.31d", big, " 0123456789012345678901234567890")
+ testcommon("%d", float(big), "123456________________________", 6)
big = 0x1234567890abcdef12345 # 21 hex digits
- testformat("%x", big, "1234567890abcdef12345")
- testformat("%x", -big, "-1234567890abcdef12345")
- testformat("%5x", -big, "-1234567890abcdef12345")
- testformat("%22x", -big, "-1234567890abcdef12345")
- testformat("%23x", -big, " -1234567890abcdef12345")
- testformat("%-23x", -big, "-1234567890abcdef12345 ")
- testformat("%023x", -big, "-01234567890abcdef12345")
- testformat("%-023x", -big, "-1234567890abcdef12345 ")
- testformat("%025x", -big, "-0001234567890abcdef12345")
- testformat("%025x", big, "00001234567890abcdef12345")
- testformat("%0+25x", big, "+0001234567890abcdef12345")
- testformat("%+25x", big, " +1234567890abcdef12345")
- testformat("%25x", big, " 1234567890abcdef12345")
- testformat("%.2x", big, "1234567890abcdef12345")
- testformat("%.21x", big, "1234567890abcdef12345")
- testformat("%.22x", big, "01234567890abcdef12345")
- testformat("%23.22x", big, " 01234567890abcdef12345")
- testformat("%-23.22x", big, "01234567890abcdef12345 ")
- testformat("%X", big, "1234567890ABCDEF12345")
- testformat("%#X", big, "0X1234567890ABCDEF12345")
- testformat("%#x", big, "0x1234567890abcdef12345")
- testformat("%#x", -big, "-0x1234567890abcdef12345")
- testformat("%#.23x", -big, "-0x001234567890abcdef12345")
- testformat("%#+.23x", big, "+0x001234567890abcdef12345")
- testformat("%# .23x", big, " 0x001234567890abcdef12345")
- testformat("%#+.23X", big, "+0X001234567890ABCDEF12345")
- testformat("%#-+.23X", big, "+0X001234567890ABCDEF12345")
- testformat("%#-+26.23X", big, "+0X001234567890ABCDEF12345")
- testformat("%#-+27.23X", big, "+0X001234567890ABCDEF12345 ")
- testformat("%#+27.23X", big, " +0X001234567890ABCDEF12345")
+ testcommon("%x", big, "1234567890abcdef12345")
+ testcommon("%x", -big, "-1234567890abcdef12345")
+ testcommon("%5x", -big, "-1234567890abcdef12345")
+ testcommon("%22x", -big, "-1234567890abcdef12345")
+ testcommon("%23x", -big, " -1234567890abcdef12345")
+ testcommon("%-23x", -big, "-1234567890abcdef12345 ")
+ testcommon("%023x", -big, "-01234567890abcdef12345")
+ testcommon("%-023x", -big, "-1234567890abcdef12345 ")
+ testcommon("%025x", -big, "-0001234567890abcdef12345")
+ testcommon("%025x", big, "00001234567890abcdef12345")
+ testcommon("%0+25x", big, "+0001234567890abcdef12345")
+ testcommon("%+25x", big, " +1234567890abcdef12345")
+ testcommon("%25x", big, " 1234567890abcdef12345")
+ testcommon("%.2x", big, "1234567890abcdef12345")
+ testcommon("%.21x", big, "1234567890abcdef12345")
+ testcommon("%.22x", big, "01234567890abcdef12345")
+ testcommon("%23.22x", big, " 01234567890abcdef12345")
+ testcommon("%-23.22x", big, "01234567890abcdef12345 ")
+ testcommon("%X", big, "1234567890ABCDEF12345")
+ testcommon("%#X", big, "0X1234567890ABCDEF12345")
+ testcommon("%#x", big, "0x1234567890abcdef12345")
+ testcommon("%#x", -big, "-0x1234567890abcdef12345")
+ testcommon("%#.23x", -big, "-0x001234567890abcdef12345")
+ testcommon("%#+.23x", big, "+0x001234567890abcdef12345")
+ testcommon("%# .23x", big, " 0x001234567890abcdef12345")
+ testcommon("%#+.23X", big, "+0X001234567890ABCDEF12345")
+ testcommon("%#-+.23X", big, "+0X001234567890ABCDEF12345")
+ testcommon("%#-+26.23X", big, "+0X001234567890ABCDEF12345")
+ testcommon("%#-+27.23X", big, "+0X001234567890ABCDEF12345 ")
+ testcommon("%#+27.23X", big, " +0X001234567890ABCDEF12345")
# next one gets two leading zeroes from precision, and another from the
# 0 flag and the width
- testformat("%#+027.23X", big, "+0X0001234567890ABCDEF12345")
+ testcommon("%#+027.23X", big, "+0X0001234567890ABCDEF12345")
# same, except no 0 flag
- testformat("%#+27.23X", big, " +0X001234567890ABCDEF12345")
- with self.assertWarns(DeprecationWarning):
- testformat("%x", float(big), "123456_______________", 6)
+ testcommon("%#+27.23X", big, " +0X001234567890ABCDEF12345")
big = 0o12345670123456701234567012345670 # 32 octal digits
- testformat("%o", big, "12345670123456701234567012345670")
- testformat("%o", -big, "-12345670123456701234567012345670")
- testformat("%5o", -big, "-12345670123456701234567012345670")
- testformat("%33o", -big, "-12345670123456701234567012345670")
- testformat("%34o", -big, " -12345670123456701234567012345670")
- testformat("%-34o", -big, "-12345670123456701234567012345670 ")
- testformat("%034o", -big, "-012345670123456701234567012345670")
- testformat("%-034o", -big, "-12345670123456701234567012345670 ")
- testformat("%036o", -big, "-00012345670123456701234567012345670")
- testformat("%036o", big, "000012345670123456701234567012345670")
- testformat("%0+36o", big, "+00012345670123456701234567012345670")
- testformat("%+36o", big, " +12345670123456701234567012345670")
- testformat("%36o", big, " 12345670123456701234567012345670")
- testformat("%.2o", big, "12345670123456701234567012345670")
- testformat("%.32o", big, "12345670123456701234567012345670")
- testformat("%.33o", big, "012345670123456701234567012345670")
- testformat("%34.33o", big, " 012345670123456701234567012345670")
- testformat("%-34.33o", big, "012345670123456701234567012345670 ")
- testformat("%o", big, "12345670123456701234567012345670")
- testformat("%#o", big, "0o12345670123456701234567012345670")
- testformat("%#o", -big, "-0o12345670123456701234567012345670")
- testformat("%#.34o", -big, "-0o0012345670123456701234567012345670")
- testformat("%#+.34o", big, "+0o0012345670123456701234567012345670")
- testformat("%# .34o", big, " 0o0012345670123456701234567012345670")
- testformat("%#+.34o", big, "+0o0012345670123456701234567012345670")
- testformat("%#-+.34o", big, "+0o0012345670123456701234567012345670")
- testformat("%#-+37.34o", big, "+0o0012345670123456701234567012345670")
- testformat("%#+37.34o", big, "+0o0012345670123456701234567012345670")
+ testcommon("%o", big, "12345670123456701234567012345670")
+ testcommon("%o", -big, "-12345670123456701234567012345670")
+ testcommon("%5o", -big, "-12345670123456701234567012345670")
+ testcommon("%33o", -big, "-12345670123456701234567012345670")
+ testcommon("%34o", -big, " -12345670123456701234567012345670")
+ testcommon("%-34o", -big, "-12345670123456701234567012345670 ")
+ testcommon("%034o", -big, "-012345670123456701234567012345670")
+ testcommon("%-034o", -big, "-12345670123456701234567012345670 ")
+ testcommon("%036o", -big, "-00012345670123456701234567012345670")
+ testcommon("%036o", big, "000012345670123456701234567012345670")
+ testcommon("%0+36o", big, "+00012345670123456701234567012345670")
+ testcommon("%+36o", big, " +12345670123456701234567012345670")
+ testcommon("%36o", big, " 12345670123456701234567012345670")
+ testcommon("%.2o", big, "12345670123456701234567012345670")
+ testcommon("%.32o", big, "12345670123456701234567012345670")
+ testcommon("%.33o", big, "012345670123456701234567012345670")
+ testcommon("%34.33o", big, " 012345670123456701234567012345670")
+ testcommon("%-34.33o", big, "012345670123456701234567012345670 ")
+ testcommon("%o", big, "12345670123456701234567012345670")
+ testcommon("%#o", big, "0o12345670123456701234567012345670")
+ testcommon("%#o", -big, "-0o12345670123456701234567012345670")
+ testcommon("%#.34o", -big, "-0o0012345670123456701234567012345670")
+ testcommon("%#+.34o", big, "+0o0012345670123456701234567012345670")
+ testcommon("%# .34o", big, " 0o0012345670123456701234567012345670")
+ testcommon("%#+.34o", big, "+0o0012345670123456701234567012345670")
+ testcommon("%#-+.34o", big, "+0o0012345670123456701234567012345670")
+ testcommon("%#-+37.34o", big, "+0o0012345670123456701234567012345670")
+ testcommon("%#+37.34o", big, "+0o0012345670123456701234567012345670")
# next one gets one leading zero from precision
- testformat("%.33o", big, "012345670123456701234567012345670")
+ testcommon("%.33o", big, "012345670123456701234567012345670")
# base marker shouldn't change that, since "0" is redundant
- testformat("%#.33o", big, "0o012345670123456701234567012345670")
+ testcommon("%#.33o", big, "0o012345670123456701234567012345670")
# but reduce precision, and base marker should add a zero
- testformat("%#.32o", big, "0o12345670123456701234567012345670")
+ testcommon("%#.32o", big, "0o12345670123456701234567012345670")
# one leading zero from precision, and another from "0" flag & width
- testformat("%034.33o", big, "0012345670123456701234567012345670")
+ testcommon("%034.33o", big, "0012345670123456701234567012345670")
# base marker shouldn't change that
- testformat("%0#34.33o", big, "0o012345670123456701234567012345670")
- with self.assertWarns(DeprecationWarning):
- testformat("%o", float(big), "123456__________________________", 6)
+ testcommon("%0#34.33o", big, "0o012345670123456701234567012345670")
# Some small ints, in both Python int and flavors).
- testformat("%d", 42, "42")
- testformat("%d", -42, "-42")
- testformat("%d", 42, "42")
- testformat("%d", -42, "-42")
- testformat("%d", 42.0, "42")
- testformat("%#x", 1, "0x1")
- testformat("%#x", 1, "0x1")
- testformat("%#X", 1, "0X1")
- testformat("%#X", 1, "0X1")
- with self.assertWarns(DeprecationWarning):
- testformat("%#x", 1.0, "0x1")
- testformat("%#o", 1, "0o1")
- testformat("%#o", 1, "0o1")
- testformat("%#o", 0, "0o0")
- testformat("%#o", 0, "0o0")
- testformat("%o", 0, "0")
- testformat("%o", 0, "0")
- testformat("%d", 0, "0")
- testformat("%d", 0, "0")
- testformat("%#x", 0, "0x0")
- testformat("%#x", 0, "0x0")
- testformat("%#X", 0, "0X0")
- testformat("%#X", 0, "0X0")
- testformat("%x", 0x42, "42")
- testformat("%x", -0x42, "-42")
- testformat("%x", 0x42, "42")
- testformat("%x", -0x42, "-42")
- with self.assertWarns(DeprecationWarning):
- testformat("%x", float(0x42), "42")
- testformat("%o", 0o42, "42")
- testformat("%o", -0o42, "-42")
- testformat("%o", 0o42, "42")
- testformat("%o", -0o42, "-42")
- with self.assertWarns(DeprecationWarning):
- testformat("%o", float(0o42), "42")
+ testcommon("%d", 42, "42")
+ testcommon("%d", -42, "-42")
+ testcommon("%d", 42, "42")
+ testcommon("%d", -42, "-42")
+ testcommon("%d", 42.0, "42")
+ testcommon("%#x", 1, "0x1")
+ testcommon("%#x", 1, "0x1")
+ testcommon("%#X", 1, "0X1")
+ testcommon("%#X", 1, "0X1")
+ testcommon("%#o", 1, "0o1")
+ testcommon("%#o", 1, "0o1")
+ testcommon("%#o", 0, "0o0")
+ testcommon("%#o", 0, "0o0")
+ testcommon("%o", 0, "0")
+ testcommon("%o", 0, "0")
+ testcommon("%d", 0, "0")
+ testcommon("%d", 0, "0")
+ testcommon("%#x", 0, "0x0")
+ testcommon("%#x", 0, "0x0")
+ testcommon("%#X", 0, "0X0")
+ testcommon("%#X", 0, "0X0")
+ testcommon("%x", 0x42, "42")
+ testcommon("%x", -0x42, "-42")
+ testcommon("%x", 0x42, "42")
+ testcommon("%x", -0x42, "-42")
+ testcommon("%o", 0o42, "42")
+ testcommon("%o", -0o42, "-42")
+ testcommon("%o", 0o42, "42")
+ testcommon("%o", -0o42, "-42")
+ # alternate float formatting
+ testcommon('%g', 1.1, '1.1')
+ testcommon('%#g', 1.1, '1.10000')
+
+ def test_str_format(self):
testformat("%r", "\u0378", "'\\u0378'") # non printable
testformat("%a", "\u0378", "'\\u0378'") # non printable
testformat("%r", "\u0374", "'\u0374'") # printable
testformat("%a", "\u0374", "'\\u0374'") # printable
- # alternate float formatting
- testformat('%g', 1.1, '1.1')
- testformat('%#g', 1.1, '1.10000')
-
- # Test exception for unknown format characters
+ # Test exception for unknown format characters, etc.
if verbose:
print('Testing exceptions')
def test_exc(formatstr, args, exception, excmsg):
@@ -254,11 +272,108 @@ class FormatTest(unittest.TestCase):
#test_exc(unicode('abc %\u3000','raw-unicode-escape'), 1, ValueError,
# "unsupported format character '?' (0x3000) at index 5")
test_exc('%d', '1', TypeError, "%d format: a number is required, not str")
+ test_exc('%x', '1', TypeError, "%x format: an integer is required, not str")
+ test_exc('%x', 3.14, TypeError, "%x format: an integer is required, not float")
test_exc('%g', '1', TypeError, "a float is required")
test_exc('no format', '1', TypeError,
"not all arguments converted during string formatting")
- test_exc('no format', '1', TypeError,
- "not all arguments converted during string formatting")
+ test_exc('%c', -1, OverflowError, "%c arg not in range(0x110000)")
+ test_exc('%c', sys.maxunicode+1, OverflowError,
+ "%c arg not in range(0x110000)")
+ #test_exc('%c', 2**128, OverflowError, "%c arg not in range(0x110000)")
+ test_exc('%c', 3.14, TypeError, "%c requires int or char")
+ test_exc('%c', 'ab', TypeError, "%c requires int or char")
+ test_exc('%c', b'x', TypeError, "%c requires int or char")
+
+ if maxsize == 2**31-1:
+ # crashes 2.2.1 and earlier:
+ try:
+ "%*d"%(maxsize, -127)
+ except MemoryError:
+ pass
+ else:
+ raise TestFailed('"%*d"%(maxsize, -127) should fail')
+
+ def test_bytes_and_bytearray_format(self):
+ # %c will insert a single byte, either from an int in range(256), or
+ # from a bytes argument of length 1, not from a str.
+ testcommon(b"%c", 7, b"\x07")
+ testcommon(b"%c", b"Z", b"Z")
+ testcommon(b"%c", bytearray(b"Z"), b"Z")
+ # %b will insert a series of bytes, either from a type that supports
+ # the Py_buffer protocol, or something that has a __bytes__ method
+ class FakeBytes(object):
+ def __bytes__(self):
+ return b'123'
+ fb = FakeBytes()
+ testcommon(b"%b", b"abc", b"abc")
+ testcommon(b"%b", bytearray(b"def"), b"def")
+ testcommon(b"%b", fb, b"123")
+ # # %s is an alias for %b -- should only be used for Py2/3 code
+ testcommon(b"%s", b"abc", b"abc")
+ testcommon(b"%s", bytearray(b"def"), b"def")
+ testcommon(b"%s", fb, b"123")
+ # %a will give the equivalent of
+ # repr(some_obj).encode('ascii', 'backslashreplace')
+ testcommon(b"%a", 3.14, b"3.14")
+ testcommon(b"%a", b"ghi", b"b'ghi'")
+ testcommon(b"%a", "jkl", b"'jkl'")
+ testcommon(b"%a", "\u0544", b"'\\u0544'")
+ # %r is an alias for %a
+ testcommon(b"%r", 3.14, b"3.14")
+ testcommon(b"%r", b"ghi", b"b'ghi'")
+ testcommon(b"%r", "jkl", b"'jkl'")
+ testcommon(b"%r", "\u0544", b"'\\u0544'")
+
+ # Test exception for unknown format characters, etc.
+ if verbose:
+ print('Testing exceptions')
+ def test_exc(formatstr, args, exception, excmsg):
+ try:
+ testformat(formatstr, args)
+ except exception as exc:
+ if str(exc) == excmsg:
+ if verbose:
+ print("yes")
+ else:
+ if verbose: print('no')
+ print('Unexpected ', exception, ':', repr(str(exc)))
+ except:
+ if verbose: print('no')
+ print('Unexpected exception')
+ raise
+ else:
+ raise TestFailed('did not get expected exception: %s' % excmsg)
+ test_exc(b'%d', '1', TypeError,
+ "%d format: a number is required, not str")
+ test_exc(b'%d', b'1', TypeError,
+ "%d format: a number is required, not bytes")
+ test_exc(b'%x', 3.14, TypeError,
+ "%x format: an integer is required, not float")
+ test_exc(b'%g', '1', TypeError, "float argument required, not str")
+ test_exc(b'%g', b'1', TypeError, "float argument required, not bytes")
+ test_exc(b'no format', 7, TypeError,
+ "not all arguments converted during bytes formatting")
+ test_exc(b'no format', b'1', TypeError,
+ "not all arguments converted during bytes formatting")
+ test_exc(b'no format', bytearray(b'1'), TypeError,
+ "not all arguments converted during bytes formatting")
+ test_exc(b"%c", -1, OverflowError,
+ "%c arg not in range(256)")
+ test_exc(b"%c", 256, OverflowError,
+ "%c arg not in range(256)")
+ test_exc(b"%c", 2**128, OverflowError,
+ "%c arg not in range(256)")
+ test_exc(b"%c", b"Za", TypeError,
+ "%c requires an integer in range(256) or a single byte")
+ test_exc(b"%c", "Y", TypeError,
+ "%c requires an integer in range(256) or a single byte")
+ test_exc(b"%c", 3.14, TypeError,
+ "%c requires an integer in range(256) or a single byte")
+ test_exc(b"%b", "Xc", TypeError,
+ "%b requires bytes, or an object that implements __bytes__, not 'str'")
+ test_exc(b"%s", "Wd", TypeError,
+ "%b requires bytes, or an object that implements __bytes__, not 'str'")
if maxsize == 2**31-1:
# crashes 2.2.1 and earlier:
diff --git a/Lib/test/test_fractions.py b/Lib/test/test_fractions.py
index 33365322b9..1699852216 100644
--- a/Lib/test/test_fractions.py
+++ b/Lib/test/test_fractions.py
@@ -1,13 +1,14 @@
"""Tests for Lib/fractions.py."""
from decimal import Decimal
-from test.support import run_unittest, requires_IEEE_754
+from test.support import requires_IEEE_754
import math
import numbers
import operator
import fractions
import sys
import unittest
+import warnings
from copy import copy, deepcopy
from pickle import dumps, loads
F = fractions.Fraction
@@ -49,7 +50,7 @@ class DummyRational(object):
"""Test comparison of Fraction with a naive rational implementation."""
def __init__(self, num, den):
- g = gcd(num, den)
+ g = math.gcd(num, den)
self.num = num // g
self.den = den // g
@@ -83,16 +84,26 @@ class DummyFraction(fractions.Fraction):
class GcdTest(unittest.TestCase):
def testMisc(self):
- self.assertEqual(0, gcd(0, 0))
- self.assertEqual(1, gcd(1, 0))
- self.assertEqual(-1, gcd(-1, 0))
- self.assertEqual(1, gcd(0, 1))
- self.assertEqual(-1, gcd(0, -1))
- self.assertEqual(1, gcd(7, 1))
- self.assertEqual(-1, gcd(7, -1))
- self.assertEqual(1, gcd(-23, 15))
- self.assertEqual(12, gcd(120, 84))
- self.assertEqual(-12, gcd(84, -120))
+ # fractions.gcd() is deprecated
+ with self.assertWarnsRegex(DeprecationWarning, r'fractions\.gcd'):
+ gcd(1, 1)
+ with warnings.catch_warnings():
+ warnings.filterwarnings('ignore', r'fractions\.gcd',
+ DeprecationWarning)
+ self.assertEqual(0, gcd(0, 0))
+ self.assertEqual(1, gcd(1, 0))
+ self.assertEqual(-1, gcd(-1, 0))
+ self.assertEqual(1, gcd(0, 1))
+ self.assertEqual(-1, gcd(0, -1))
+ self.assertEqual(1, gcd(7, 1))
+ self.assertEqual(-1, gcd(7, -1))
+ self.assertEqual(1, gcd(-23, 15))
+ self.assertEqual(12, gcd(120, 84))
+ self.assertEqual(-12, gcd(84, -120))
+ self.assertEqual(gcd(120.0, 84), 12.0)
+ self.assertEqual(gcd(120, 84.0), 12.0)
+ self.assertEqual(gcd(F(120), F(84)), F(12))
+ self.assertEqual(gcd(F(120, 77), F(84, 55)), F(12, 385))
def _components(r):
@@ -330,7 +341,6 @@ class FractionTest(unittest.TestCase):
self.assertTypedEquals(F(-2, 10), round(F(-15, 100), 1))
self.assertTypedEquals(F(-2, 10), round(F(-25, 100), 1))
-
def testArithmetic(self):
self.assertEqual(F(1, 2), F(1, 10) + F(2, 5))
self.assertEqual(F(-3, 10), F(1, 10) - F(2, 5))
@@ -402,6 +412,8 @@ class FractionTest(unittest.TestCase):
self.assertTypedEquals(2.0 , 4 ** F(1, 2))
self.assertTypedEquals(0.25, 2.0 ** F(-2, 1))
self.assertTypedEquals(1.0 + 0j, (1.0 + 0j) ** F(1, 10))
+ self.assertRaises(ZeroDivisionError, operator.pow,
+ F(0, 1), -2)
def testMixingWithDecimal(self):
# Decimal refuses mixed arithmetic (but not mixed comparisons)
@@ -605,8 +617,5 @@ class FractionTest(unittest.TestCase):
r = F(13, 7)
self.assertRaises(AttributeError, setattr, r, 'a', 10)
-def test_main():
- run_unittest(FractionTest, GcdTest)
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_frame.py b/Lib/test/test_frame.py
index c402ec394e..189fca90fe 100644
--- a/Lib/test/test_frame.py
+++ b/Lib/test/test_frame.py
@@ -161,8 +161,5 @@ class FrameLocalsTest(unittest.TestCase):
self.assertEqual(inner.f_locals, {})
-def test_main():
- support.run_unittest(__name__)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_ftplib.py b/Lib/test/test_ftplib.py
index d3be7d6d00..aef66da98a 100644
--- a/Lib/test/test_ftplib.py
+++ b/Lib/test/test_ftplib.py
@@ -73,7 +73,7 @@ class DummyDTPHandler(asynchat.async_chat):
super(DummyDTPHandler, self).push(what.encode('ascii'))
def handle_error(self):
- raise
+ raise Exception
class DummyFTPHandler(asynchat.async_chat):
@@ -118,7 +118,7 @@ class DummyFTPHandler(asynchat.async_chat):
self.push('550 command "%s" not understood.' %cmd)
def handle_error(self):
- raise
+ raise Exception
def push(self, data):
asynchat.async_chat.push(self, data.encode('ascii') + b'\r\n')
@@ -134,7 +134,7 @@ class DummyFTPHandler(asynchat.async_chat):
def cmd_pasv(self, arg):
with socket.socket() as sock:
sock.bind((self.socket.getsockname()[0], 0))
- sock.listen(5)
+ sock.listen()
sock.settimeout(TIMEOUT)
ip, port = sock.getsockname()[:2]
ip = ip.replace('.', ','); p1 = port / 256; p2 = port % 256
@@ -152,7 +152,7 @@ class DummyFTPHandler(asynchat.async_chat):
def cmd_epsv(self, arg):
with socket.socket(socket.AF_INET6) as sock:
sock.bind((self.socket.getsockname()[0], 0))
- sock.listen(5)
+ sock.listen()
sock.settimeout(TIMEOUT)
port = sock.getsockname()[1]
self.push('229 entering extended passive mode (|||%d|)' %port)
@@ -296,7 +296,7 @@ class DummyFTPServer(asyncore.dispatcher, threading.Thread):
return 0
def handle_error(self):
- raise
+ raise Exception
if ssl is not None:
@@ -394,7 +394,7 @@ if ssl is not None:
raise
def handle_error(self):
- raise
+ raise Exception
def close(self):
if (isinstance(self.socket, ssl.SSLSocket) and
@@ -670,7 +670,7 @@ class TestFTPClass(TestCase):
self.assertRaises(StopIteration, next, self.client.mlsd())
set_data('')
for x in self.client.mlsd():
- self.fail("unexpected data %s" % data)
+ self.fail("unexpected data %s" % x)
def test_makeport(self):
with self.client.makeport():
@@ -979,7 +979,7 @@ class TestTimeouts(TestCase):
# 1) when the connection is ready to be accepted.
# 2) when it is safe for the caller to close the connection
# 3) when we have closed the socket
- self.sock.listen(5)
+ self.sock.listen()
# (1) Signal the caller that we are ready to accept the connection.
self.evt.set()
try:
@@ -1049,19 +1049,8 @@ class TestTimeouts(TestCase):
ftp.close()
-class TestNetrcDeprecation(TestCase):
-
- def test_deprecation(self):
- with support.temp_cwd(), support.EnvironmentVarGuard() as env:
- env['HOME'] = os.getcwd()
- open('.netrc', 'w').close()
- with self.assertWarns(DeprecationWarning):
- ftplib.Netrc()
-
-
-
def test_main():
- tests = [TestFTPClass, TestTimeouts, TestNetrcDeprecation,
+ tests = [TestFTPClass, TestTimeouts,
TestIPv6Environment,
TestTLS_FTPClassMixin, TestTLS_FTPClass]
diff --git a/Lib/test/test_funcattrs.py b/Lib/test/test_funcattrs.py
index 5094f7ba1f..8f481bb64e 100644
--- a/Lib/test/test_funcattrs.py
+++ b/Lib/test/test_funcattrs.py
@@ -1,4 +1,3 @@
-from test import support
import types
import unittest
@@ -374,12 +373,5 @@ class BuiltinFunctionPropertiesTest(unittest.TestCase):
self.assertEqual({'foo': 'bar'}.pop.__qualname__, 'dict.pop')
-def test_main():
- support.run_unittest(FunctionPropertiesTest, InstancemethodAttrTest,
- ArbitraryFunctionAttrTest, FunctionDictsTest,
- FunctionDocstringTest, CellTest,
- StaticMethodAttrsTest,
- BuiltinFunctionPropertiesTest)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py
index c0d24d8c3e..9abe984330 100644
--- a/Lib/test/test_functools.py
+++ b/Lib/test/test_functools.py
@@ -1,5 +1,6 @@
import abc
import collections
+import copy
from itertools import permutations
import pickle
from random import choice
@@ -7,6 +8,10 @@ import sys
from test import support
import unittest
from weakref import proxy
+try:
+ import threading
+except ImportError:
+ threading = None
import functools
@@ -25,6 +30,16 @@ def signature(part):
""" return the signature of a partial object """
return (part.func, part.args, part.keywords, part.__dict__)
+class MyTuple(tuple):
+ pass
+
+class BadTuple(tuple):
+ def __add__(self, other):
+ return list(self) + list(other)
+
+class MyDict(dict):
+ pass
+
class TestPartial:
@@ -133,6 +148,25 @@ class TestPartial:
join = self.partial(''.join)
self.assertEqual(join(data), '0123456789')
+ def test_nested_optimization(self):
+ partial = self.partial
+ inner = partial(signature, 'asdf')
+ nested = partial(inner, bar=True)
+ flat = partial(signature, 'asdf', bar=True)
+ self.assertEqual(signature(nested), signature(flat))
+
+ def test_nested_partial_with_attribute(self):
+ # see issue 25137
+ partial = self.partial
+
+ def foo(bar):
+ return bar
+
+ p = partial(foo, 'first')
+ p2 = partial(p, 'second')
+ p2.new_attr = 'spam'
+ self.assertEqual(p2.new_attr, 'spam')
+
@unittest.skipUnless(c_functools, 'requires the C _functools module')
class TestPartialC(TestPartial, unittest.TestCase):
@@ -184,11 +218,84 @@ class TestPartialC(TestPartial, unittest.TestCase):
for kwargs_repr in kwargs_reprs])
def test_pickle(self):
- f = self.partial(signature, 'asdf', bar=True)
- f.add_something_to__dict__ = True
+ f = self.partial(signature, ['asdf'], bar=[True])
+ f.attr = []
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
f_copy = pickle.loads(pickle.dumps(f, proto))
- self.assertEqual(signature(f), signature(f_copy))
+ self.assertEqual(signature(f_copy), signature(f))
+
+ def test_copy(self):
+ f = self.partial(signature, ['asdf'], bar=[True])
+ f.attr = []
+ f_copy = copy.copy(f)
+ self.assertEqual(signature(f_copy), signature(f))
+ self.assertIs(f_copy.attr, f.attr)
+ self.assertIs(f_copy.args, f.args)
+ self.assertIs(f_copy.keywords, f.keywords)
+
+ def test_deepcopy(self):
+ f = self.partial(signature, ['asdf'], bar=[True])
+ f.attr = []
+ f_copy = copy.deepcopy(f)
+ self.assertEqual(signature(f_copy), signature(f))
+ self.assertIsNot(f_copy.attr, f.attr)
+ self.assertIsNot(f_copy.args, f.args)
+ self.assertIsNot(f_copy.args[0], f.args[0])
+ self.assertIsNot(f_copy.keywords, f.keywords)
+ self.assertIsNot(f_copy.keywords['bar'], f.keywords['bar'])
+
+ def test_setstate(self):
+ f = self.partial(signature)
+ f.__setstate__((capture, (1,), dict(a=10), dict(attr=[])))
+ self.assertEqual(signature(f),
+ (capture, (1,), dict(a=10), dict(attr=[])))
+ self.assertEqual(f(2, b=20), ((1, 2), {'a': 10, 'b': 20}))
+
+ f.__setstate__((capture, (1,), dict(a=10), None))
+ self.assertEqual(signature(f), (capture, (1,), dict(a=10), {}))
+ self.assertEqual(f(2, b=20), ((1, 2), {'a': 10, 'b': 20}))
+
+ f.__setstate__((capture, (1,), None, None))
+ #self.assertEqual(signature(f), (capture, (1,), {}, {}))
+ self.assertEqual(f(2, b=20), ((1, 2), {'b': 20}))
+ self.assertEqual(f(2), ((1, 2), {}))
+ self.assertEqual(f(), ((1,), {}))
+
+ f.__setstate__((capture, (), {}, None))
+ self.assertEqual(signature(f), (capture, (), {}, {}))
+ self.assertEqual(f(2, b=20), ((2,), {'b': 20}))
+ self.assertEqual(f(2), ((2,), {}))
+ self.assertEqual(f(), ((), {}))
+
+ def test_setstate_errors(self):
+ f = self.partial(signature)
+ self.assertRaises(TypeError, f.__setstate__, (capture, (), {}))
+ self.assertRaises(TypeError, f.__setstate__, (capture, (), {}, {}, None))
+ self.assertRaises(TypeError, f.__setstate__, [capture, (), {}, None])
+ self.assertRaises(TypeError, f.__setstate__, (None, (), {}, None))
+ self.assertRaises(TypeError, f.__setstate__, (capture, None, {}, None))
+ self.assertRaises(TypeError, f.__setstate__, (capture, [], {}, None))
+ self.assertRaises(TypeError, f.__setstate__, (capture, (), [], None))
+
+ def test_setstate_subclasses(self):
+ f = self.partial(signature)
+ f.__setstate__((capture, MyTuple((1,)), MyDict(a=10), None))
+ s = signature(f)
+ self.assertEqual(s, (capture, (1,), dict(a=10), {}))
+ self.assertIs(type(s[1]), tuple)
+ self.assertIs(type(s[2]), dict)
+ r = f()
+ self.assertEqual(r, ((1,), {'a': 10}))
+ self.assertIs(type(r[0]), tuple)
+ self.assertIs(type(r[1]), dict)
+
+ f.__setstate__((capture, BadTuple((1,)), {}, None))
+ s = signature(f)
+ self.assertEqual(s, (capture, (1,), {}, {}))
+ self.assertIs(type(s[1]), tuple)
+ r = f(2)
+ self.assertEqual(r, ((1, 2), {}))
+ self.assertIs(type(r[0]), tuple)
# Issue 6083: Reference counting bug
def test_setstate_refcount(self):
@@ -205,9 +312,7 @@ class TestPartialC(TestPartial, unittest.TestCase):
raise IndexError
f = self.partial(object)
- self.assertRaisesRegex(SystemError,
- "new style getargs format but argument is not a tuple",
- f.__setstate__, BadSequence())
+ self.assertRaises(TypeError, f.__setstate__, BadSequence())
class TestPartialPy(TestPartial, unittest.TestCase):
@@ -224,6 +329,9 @@ class TestPartialCSubclass(TestPartialC):
if c_functools:
partial = PartialSubclass
+ # partial subclasses are not optimized for nested calls
+ test_nested_optimization = None
+
class TestPartialMethod(unittest.TestCase):
@@ -884,12 +992,30 @@ class TestTotalOrdering(unittest.TestCase):
with self.assertRaises(TypeError):
a <= b
-class TestLRU(unittest.TestCase):
+ def test_pickle(self):
+ for proto in range(4, pickle.HIGHEST_PROTOCOL + 1):
+ for name in '__lt__', '__gt__', '__le__', '__ge__':
+ with self.subTest(method=name, proto=proto):
+ method = getattr(Orderable_LT, name)
+ method_copy = pickle.loads(pickle.dumps(method, proto))
+ self.assertIs(method_copy, method)
+
+@functools.total_ordering
+class Orderable_LT:
+ def __init__(self, value):
+ self.value = value
+ def __lt__(self, other):
+ return self.value < other.value
+ def __eq__(self, other):
+ return self.value == other.value
+
+
+class TestLRU:
def test_lru(self):
def orig(x, y):
return 3 * x + y
- f = functools.lru_cache(maxsize=20)(orig)
+ f = self.module.lru_cache(maxsize=20)(orig)
hits, misses, maxsize, currsize = f.cache_info()
self.assertEqual(maxsize, 20)
self.assertEqual(currsize, 0)
@@ -927,7 +1053,7 @@ class TestLRU(unittest.TestCase):
self.assertEqual(currsize, 1)
# test size zero (which means "never-cache")
- @functools.lru_cache(0)
+ @self.module.lru_cache(0)
def f():
nonlocal f_cnt
f_cnt += 1
@@ -943,7 +1069,7 @@ class TestLRU(unittest.TestCase):
self.assertEqual(currsize, 0)
# test size one
- @functools.lru_cache(1)
+ @self.module.lru_cache(1)
def f():
nonlocal f_cnt
f_cnt += 1
@@ -959,7 +1085,7 @@ class TestLRU(unittest.TestCase):
self.assertEqual(currsize, 1)
# test size two
- @functools.lru_cache(2)
+ @self.module.lru_cache(2)
def f(x):
nonlocal f_cnt
f_cnt += 1
@@ -976,7 +1102,7 @@ class TestLRU(unittest.TestCase):
self.assertEqual(currsize, 2)
def test_lru_with_maxsize_none(self):
- @functools.lru_cache(maxsize=None)
+ @self.module.lru_cache(maxsize=None)
def fib(n):
if n < 2:
return n
@@ -984,17 +1110,26 @@ class TestLRU(unittest.TestCase):
self.assertEqual([fib(n) for n in range(16)],
[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610])
self.assertEqual(fib.cache_info(),
- functools._CacheInfo(hits=28, misses=16, maxsize=None, currsize=16))
+ self.module._CacheInfo(hits=28, misses=16, maxsize=None, currsize=16))
fib.cache_clear()
self.assertEqual(fib.cache_info(),
- functools._CacheInfo(hits=0, misses=0, maxsize=None, currsize=0))
+ self.module._CacheInfo(hits=0, misses=0, maxsize=None, currsize=0))
+
+ def test_lru_with_maxsize_negative(self):
+ @self.module.lru_cache(maxsize=-10)
+ def eq(n):
+ return n
+ for i in (0, 1):
+ self.assertEqual([eq(n) for n in range(150)], list(range(150)))
+ self.assertEqual(eq.cache_info(),
+ self.module._CacheInfo(hits=0, misses=300, maxsize=-10, currsize=1))
def test_lru_with_exceptions(self):
# Verify that user_function exceptions get passed through without
# creating a hard-to-read chained exception.
# http://bugs.python.org/issue13177
for maxsize in (None, 128):
- @functools.lru_cache(maxsize)
+ @self.module.lru_cache(maxsize)
def func(i):
return 'abc'[i]
self.assertEqual(func(0), 'a')
@@ -1007,7 +1142,7 @@ class TestLRU(unittest.TestCase):
def test_lru_with_types(self):
for maxsize in (None, 128):
- @functools.lru_cache(maxsize=maxsize, typed=True)
+ @self.module.lru_cache(maxsize=maxsize, typed=True)
def square(x):
return x * x
self.assertEqual(square(3), 9)
@@ -1022,7 +1157,7 @@ class TestLRU(unittest.TestCase):
self.assertEqual(square.cache_info().misses, 4)
def test_lru_with_keyword_args(self):
- @functools.lru_cache()
+ @self.module.lru_cache()
def fib(n):
if n < 2:
return n
@@ -1032,13 +1167,13 @@ class TestLRU(unittest.TestCase):
[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610]
)
self.assertEqual(fib.cache_info(),
- functools._CacheInfo(hits=28, misses=16, maxsize=128, currsize=16))
+ self.module._CacheInfo(hits=28, misses=16, maxsize=128, currsize=16))
fib.cache_clear()
self.assertEqual(fib.cache_info(),
- functools._CacheInfo(hits=0, misses=0, maxsize=128, currsize=0))
+ self.module._CacheInfo(hits=0, misses=0, maxsize=128, currsize=0))
def test_lru_with_keyword_args_maxsize_none(self):
- @functools.lru_cache(maxsize=None)
+ @self.module.lru_cache(maxsize=None)
def fib(n):
if n < 2:
return n
@@ -1046,15 +1181,100 @@ class TestLRU(unittest.TestCase):
self.assertEqual([fib(n=number) for number in range(16)],
[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610])
self.assertEqual(fib.cache_info(),
- functools._CacheInfo(hits=28, misses=16, maxsize=None, currsize=16))
+ self.module._CacheInfo(hits=28, misses=16, maxsize=None, currsize=16))
fib.cache_clear()
self.assertEqual(fib.cache_info(),
- functools._CacheInfo(hits=0, misses=0, maxsize=None, currsize=0))
+ self.module._CacheInfo(hits=0, misses=0, maxsize=None, currsize=0))
+
+ def test_lru_cache_decoration(self):
+ def f(zomg: 'zomg_annotation'):
+ """f doc string"""
+ return 42
+ g = self.module.lru_cache()(f)
+ for attr in self.module.WRAPPER_ASSIGNMENTS:
+ self.assertEqual(getattr(g, attr), getattr(f, attr))
+
+ @unittest.skipUnless(threading, 'This test requires threading.')
+ def test_lru_cache_threaded(self):
+ n, m = 5, 11
+ def orig(x, y):
+ return 3 * x + y
+ f = self.module.lru_cache(maxsize=n*m)(orig)
+ hits, misses, maxsize, currsize = f.cache_info()
+ self.assertEqual(currsize, 0)
+
+ start = threading.Event()
+ def full(k):
+ start.wait(10)
+ for _ in range(m):
+ self.assertEqual(f(k, 0), orig(k, 0))
+
+ def clear():
+ start.wait(10)
+ for _ in range(2*m):
+ f.cache_clear()
+
+ orig_si = sys.getswitchinterval()
+ sys.setswitchinterval(1e-6)
+ try:
+ # create n threads in order to fill cache
+ threads = [threading.Thread(target=full, args=[k])
+ for k in range(n)]
+ with support.start_threads(threads):
+ start.set()
+
+ hits, misses, maxsize, currsize = f.cache_info()
+ if self.module is py_functools:
+ # XXX: Why can be not equal?
+ self.assertLessEqual(misses, n)
+ self.assertLessEqual(hits, m*n - misses)
+ else:
+ self.assertEqual(misses, n)
+ self.assertEqual(hits, m*n - misses)
+ self.assertEqual(currsize, n)
+
+ # create n threads in order to fill cache and 1 to clear it
+ threads = [threading.Thread(target=clear)]
+ threads += [threading.Thread(target=full, args=[k])
+ for k in range(n)]
+ start.clear()
+ with support.start_threads(threads):
+ start.set()
+ finally:
+ sys.setswitchinterval(orig_si)
+
+ @unittest.skipUnless(threading, 'This test requires threading.')
+ def test_lru_cache_threaded2(self):
+ # Simultaneous call with the same arguments
+ n, m = 5, 7
+ start = threading.Barrier(n+1)
+ pause = threading.Barrier(n+1)
+ stop = threading.Barrier(n+1)
+ @self.module.lru_cache(maxsize=m*n)
+ def f(x):
+ pause.wait(10)
+ return 3 * x
+ self.assertEqual(f.cache_info(), (0, 0, m*n, 0))
+ def test():
+ for i in range(m):
+ start.wait(10)
+ self.assertEqual(f(i), 3 * i)
+ stop.wait(10)
+ threads = [threading.Thread(target=test) for k in range(n)]
+ with support.start_threads(threads):
+ for i in range(m):
+ start.wait(10)
+ stop.reset()
+ pause.wait(10)
+ start.reset()
+ stop.wait(10)
+ pause.reset()
+ self.assertEqual(f.cache_info(), (0, (i+1)*n, m*n, i+1))
def test_need_for_rlock(self):
# This will deadlock on an LRU cache that uses a regular lock
- @functools.lru_cache(maxsize=10)
+ @self.module.lru_cache(maxsize=10)
def test_func(x):
'Used to demonstrate a reentrant lru_cache call within a single thread'
return x
@@ -1082,6 +1302,106 @@ class TestLRU(unittest.TestCase):
def f():
pass
+ def test_lru_method(self):
+ class X(int):
+ f_cnt = 0
+ @self.module.lru_cache(2)
+ def f(self, x):
+ self.f_cnt += 1
+ return x*10+self
+ a = X(5)
+ b = X(5)
+ c = X(7)
+ self.assertEqual(X.f.cache_info(), (0, 0, 2, 0))
+
+ for x in 1, 2, 2, 3, 1, 1, 1, 2, 3, 3:
+ self.assertEqual(a.f(x), x*10 + 5)
+ self.assertEqual((a.f_cnt, b.f_cnt, c.f_cnt), (6, 0, 0))
+ self.assertEqual(X.f.cache_info(), (4, 6, 2, 2))
+
+ for x in 1, 2, 1, 1, 1, 1, 3, 2, 2, 2:
+ self.assertEqual(b.f(x), x*10 + 5)
+ self.assertEqual((a.f_cnt, b.f_cnt, c.f_cnt), (6, 4, 0))
+ self.assertEqual(X.f.cache_info(), (10, 10, 2, 2))
+
+ for x in 2, 1, 1, 1, 1, 2, 1, 3, 2, 1:
+ self.assertEqual(c.f(x), x*10 + 7)
+ self.assertEqual((a.f_cnt, b.f_cnt, c.f_cnt), (6, 4, 5))
+ self.assertEqual(X.f.cache_info(), (15, 15, 2, 2))
+
+ self.assertEqual(a.f.cache_info(), X.f.cache_info())
+ self.assertEqual(b.f.cache_info(), X.f.cache_info())
+ self.assertEqual(c.f.cache_info(), X.f.cache_info())
+
+ def test_pickle(self):
+ cls = self.__class__
+ for f in cls.cached_func[0], cls.cached_meth, cls.cached_staticmeth:
+ for proto in range(pickle.HIGHEST_PROTOCOL + 1):
+ with self.subTest(proto=proto, func=f):
+ f_copy = pickle.loads(pickle.dumps(f, proto))
+ self.assertIs(f_copy, f)
+
+ def test_copy(self):
+ cls = self.__class__
+ def orig(x, y):
+ return 3 * x + y
+ part = self.module.partial(orig, 2)
+ funcs = (cls.cached_func[0], cls.cached_meth, cls.cached_staticmeth,
+ self.module.lru_cache(2)(part))
+ for f in funcs:
+ with self.subTest(func=f):
+ f_copy = copy.copy(f)
+ self.assertIs(f_copy, f)
+
+ def test_deepcopy(self):
+ cls = self.__class__
+ def orig(x, y):
+ return 3 * x + y
+ part = self.module.partial(orig, 2)
+ funcs = (cls.cached_func[0], cls.cached_meth, cls.cached_staticmeth,
+ self.module.lru_cache(2)(part))
+ for f in funcs:
+ with self.subTest(func=f):
+ f_copy = copy.deepcopy(f)
+ self.assertIs(f_copy, f)
+
+
+@py_functools.lru_cache()
+def py_cached_func(x, y):
+ return 3 * x + y
+
+@c_functools.lru_cache()
+def c_cached_func(x, y):
+ return 3 * x + y
+
+
+class TestLRUPy(TestLRU, unittest.TestCase):
+ module = py_functools
+ cached_func = py_cached_func,
+
+ @module.lru_cache()
+ def cached_meth(self, x, y):
+ return 3 * x + y
+
+ @staticmethod
+ @module.lru_cache()
+ def cached_staticmeth(x, y):
+ return 3 * x + y
+
+
+class TestLRUC(TestLRU, unittest.TestCase):
+ module = c_functools
+ cached_func = c_cached_func,
+
+ @module.lru_cache()
+ def cached_meth(self, x, y):
+ return 3 * x + y
+
+ @staticmethod
+ @module.lru_cache()
+ def cached_staticmeth(x, y):
+ return 3 * x + y
+
class TestSingleDispatch(unittest.TestCase):
def test_simple_overloads(self):
@@ -1186,7 +1506,7 @@ class TestSingleDispatch(unittest.TestCase):
object])
# MutableSequence below is registered directly on D. In other words, it
- # preceeds MutableMapping which means single dispatch will always
+ # precedes MutableMapping which means single dispatch will always
# choose MutableSequence here.
class D(c.defaultdict):
pass
@@ -1576,32 +1896,5 @@ class TestSingleDispatch(unittest.TestCase):
functools.WeakKeyDictionary = _orig_wkd
-def test_main(verbose=None):
- test_classes = (
- TestPartialC,
- TestPartialPy,
- TestPartialCSubclass,
- TestPartialMethod,
- TestUpdateWrapper,
- TestTotalOrdering,
- TestCmpToKeyC,
- TestCmpToKeyPy,
- TestWraps,
- TestReduce,
- TestLRU,
- TestSingleDispatch,
- )
- support.run_unittest(*test_classes)
-
- # verify reference counting
- if verbose and hasattr(sys, "gettotalrefcount"):
- import gc
- counts = [None] * 5
- for i in range(len(counts)):
- support.run_unittest(*test_classes)
- gc.collect()
- counts[i] = sys.gettotalrefcount()
- print(counts)
-
if __name__ == '__main__':
- test_main(verbose=True)
+ unittest.main()
diff --git a/Lib/test/test_gc.py b/Lib/test/test_gc.py
index 2ac1d4bb64..1f0867d379 100644
--- a/Lib/test/test_gc.py
+++ b/Lib/test/test_gc.py
@@ -1,7 +1,8 @@
import unittest
from test.support import (verbose, refcount_test, run_unittest,
- strip_python_stderr, cpython_only, start_threads)
-from test.script_helper import assert_python_ok, make_script, temp_dir
+ strip_python_stderr, cpython_only, start_threads,
+ temp_dir)
+from test.support.script_helper import assert_python_ok, make_script
import sys
import time
@@ -546,11 +547,31 @@ class GCTests(unittest.TestCase):
class UserClass:
pass
+
+ class UserInt(int):
+ pass
+
+ # Base class is object; no extra fields.
+ class UserClassSlots:
+ __slots__ = ()
+
+ # Base class is fixed size larger than object; no extra fields.
+ class UserFloatSlots(float):
+ __slots__ = ()
+
+ # Base class is variable size; no extra fields.
+ class UserIntSlots(int):
+ __slots__ = ()
+
self.assertTrue(gc.is_tracked(gc))
self.assertTrue(gc.is_tracked(UserClass))
self.assertTrue(gc.is_tracked(UserClass()))
+ self.assertTrue(gc.is_tracked(UserInt()))
self.assertTrue(gc.is_tracked([]))
self.assertTrue(gc.is_tracked(set()))
+ self.assertFalse(gc.is_tracked(UserClassSlots()))
+ self.assertFalse(gc.is_tracked(UserFloatSlots()))
+ self.assertFalse(gc.is_tracked(UserIntSlots()))
def test_bug1055820b(self):
# Corresponds to temp2b.py in the bug report.
diff --git a/Lib/test/test_gdb.py b/Lib/test/test_gdb.py
index b5017b9a01..cd7d2925f4 100644
--- a/Lib/test/test_gdb.py
+++ b/Lib/test/test_gdb.py
@@ -75,6 +75,9 @@ def run_gdb(*args, **env_vars):
if (gdb_major_version, gdb_minor_version) >= (7, 4):
base_cmd += ('-iex', 'add-auto-load-safe-path ' + checkout_hook_path)
proc = subprocess.Popen(base_cmd + args,
+ # Redirect stdin to prevent GDB from messing with
+ # the terminal settings
+ stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
env=env)
@@ -89,7 +92,6 @@ if not gdbpy_version:
# Verify that "gdb" can load our custom hooks, as OS security settings may
# disallow this without a customised .gdbinit.
-cmd = ['--args', sys.executable]
_, gdbpy_errors = run_gdb('--args', sys.executable)
if "auto-loading has been declined" in gdbpy_errors:
msg = "gdb security settings prevent use of custom hooks: "
@@ -171,8 +173,7 @@ class DebuggerTests(unittest.TestCase):
# print commands
# Use "commands" to generate the arguments with which to invoke "gdb":
- args = ["gdb", "--batch", "-nx"]
- args += ['--eval-command=%s' % cmd for cmd in commands]
+ args = ['--eval-command=%s' % cmd for cmd in commands]
args += ["--args",
sys.executable]
@@ -197,27 +198,17 @@ class DebuggerTests(unittest.TestCase):
# Ignore some benign messages on stderr.
ignore_patterns = (
'Function "%s" not defined.' % breakpoint,
- "warning: no loadable sections found in added symbol-file"
- " system-supplied DSO",
- "warning: Unable to find libthread_db matching"
- " inferior's thread library, thread debugging will"
- " not be available.",
- "warning: Cannot initialize thread debugging"
- " library: Debugger service failed",
- 'warning: Could not load shared library symbols for '
- 'linux-vdso.so',
- 'warning: Could not load shared library symbols for '
- 'linux-gate.so',
- 'warning: Could not load shared library symbols for '
- 'linux-vdso64.so',
'Do you need "set solib-search-path" or '
'"set sysroot"?',
- 'warning: Source file is more recent than executable.',
- # Issue #19753: missing symbols on System Z
- 'Missing separate debuginfo for ',
- 'Try: zypper install -C ',
+ # BFD: /usr/lib/debug/(...): unable to initialize decompress
+ # status for section .debug_aranges
+ 'BFD: ',
+ # ignore all warnings
+ 'warning: ',
)
for line in errlines:
+ if not line:
+ continue
if not line.startswith(ignore_patterns):
unexpected_errlines.append(line)
@@ -820,25 +811,27 @@ id(42)
"Python was compiled without thread support")
def test_pycfunction(self):
'Verify that "py-bt" displays invocations of PyCFunction instances'
- cmd = ('from time import sleep\n'
+ # Tested function must not be defined with METH_NOARGS or METH_O,
+ # otherwise call_function() doesn't call PyCFunction_Call()
+ cmd = ('from time import gmtime\n'
'def foo():\n'
- ' sleep(1)\n'
+ ' gmtime(1)\n'
'def bar():\n'
' foo()\n'
'bar()\n')
# Verify with "py-bt":
gdb_output = self.get_stack_trace(cmd,
- breakpoint='time_sleep',
+ breakpoint='time_gmtime',
cmds_after_breakpoint=['bt', 'py-bt'],
)
- self.assertIn('<built-in method sleep', gdb_output)
+ self.assertIn('<built-in method gmtime', gdb_output)
# Verify with "py-bt-full":
gdb_output = self.get_stack_trace(cmd,
- breakpoint='time_sleep',
+ breakpoint='time_gmtime',
cmds_after_breakpoint=['py-bt-full'],
)
- self.assertIn('#0 <built-in method sleep', gdb_output)
+ self.assertIn('#0 <built-in method gmtime', gdb_output)
class PyPrintTests(DebuggerTests):
diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py
index 604e12d92e..3f82462478 100644
--- a/Lib/test/test_generators.py
+++ b/Lib/test/test_generators.py
@@ -3,7 +3,10 @@ import gc
import pickle
import sys
import unittest
+import warnings
import weakref
+import inspect
+import types
from test import support
@@ -74,6 +77,42 @@ class FinalizationTest(unittest.TestCase):
class GeneratorTest(unittest.TestCase):
+ def test_name(self):
+ def func():
+ yield 1
+
+ # check generator names
+ gen = func()
+ self.assertEqual(gen.__name__, "func")
+ self.assertEqual(gen.__qualname__,
+ "GeneratorTest.test_name.<locals>.func")
+
+ # modify generator names
+ gen.__name__ = "name"
+ gen.__qualname__ = "qualname"
+ self.assertEqual(gen.__name__, "name")
+ self.assertEqual(gen.__qualname__, "qualname")
+
+ # generator names must be a string and cannot be deleted
+ self.assertRaises(TypeError, setattr, gen, '__name__', 123)
+ self.assertRaises(TypeError, setattr, gen, '__qualname__', 123)
+ self.assertRaises(TypeError, delattr, gen, '__name__')
+ self.assertRaises(TypeError, delattr, gen, '__qualname__')
+
+ # modify names of the function creating the generator
+ func.__qualname__ = "func_qualname"
+ func.__name__ = "func_name"
+ gen = func()
+ self.assertEqual(gen.__name__, "func_name")
+ self.assertEqual(gen.__qualname__, "func_qualname")
+
+ # unnamed generator
+ gen = (x for x in range(10))
+ self.assertEqual(gen.__name__,
+ "<genexpr>")
+ self.assertEqual(gen.__qualname__,
+ "GeneratorTest.test_name.<locals>.<genexpr>")
+
def test_copy(self):
def f():
yield 1
@@ -198,6 +237,79 @@ class ExceptionTest(unittest.TestCase):
self.assertEqual(next(g), "done")
self.assertEqual(sys.exc_info(), (None, None, None))
+ def test_stopiteration_warning(self):
+ # See also PEP 479.
+
+ def gen():
+ raise StopIteration
+ yield
+
+ with self.assertRaises(StopIteration), \
+ self.assertWarnsRegex(PendingDeprecationWarning, "StopIteration"):
+
+ next(gen())
+
+ with self.assertRaisesRegex(PendingDeprecationWarning,
+ "generator .* raised StopIteration"), \
+ warnings.catch_warnings():
+
+ warnings.simplefilter('error')
+ next(gen())
+
+
+ def test_tutorial_stopiteration(self):
+ # Raise StopIteration" stops the generator too:
+
+ def f():
+ yield 1
+ raise StopIteration
+ yield 2 # never reached
+
+ g = f()
+ self.assertEqual(next(g), 1)
+
+ with self.assertWarnsRegex(PendingDeprecationWarning, "StopIteration"):
+ with self.assertRaises(StopIteration):
+ next(g)
+
+ with self.assertRaises(StopIteration):
+ # This time StopIteration isn't raised from the generator's body,
+ # hence no warning.
+ next(g)
+
+
+class YieldFromTests(unittest.TestCase):
+ def test_generator_gi_yieldfrom(self):
+ def a():
+ self.assertEqual(inspect.getgeneratorstate(gen_b), inspect.GEN_RUNNING)
+ self.assertIsNone(gen_b.gi_yieldfrom)
+ yield
+ self.assertEqual(inspect.getgeneratorstate(gen_b), inspect.GEN_RUNNING)
+ self.assertIsNone(gen_b.gi_yieldfrom)
+
+ def b():
+ self.assertIsNone(gen_b.gi_yieldfrom)
+ yield from a()
+ self.assertIsNone(gen_b.gi_yieldfrom)
+ yield
+ self.assertIsNone(gen_b.gi_yieldfrom)
+
+ gen_b = b()
+ self.assertEqual(inspect.getgeneratorstate(gen_b), inspect.GEN_CREATED)
+ self.assertIsNone(gen_b.gi_yieldfrom)
+
+ gen_b.send(None)
+ self.assertEqual(inspect.getgeneratorstate(gen_b), inspect.GEN_SUSPENDED)
+ self.assertEqual(gen_b.gi_yieldfrom.gi_code.co_name, 'a')
+
+ gen_b.send(None)
+ self.assertEqual(inspect.getgeneratorstate(gen_b), inspect.GEN_SUSPENDED)
+ self.assertIsNone(gen_b.gi_yieldfrom)
+
+ [] = gen_b # Exhaust generator
+ self.assertEqual(inspect.getgeneratorstate(gen_b), inspect.GEN_CLOSED)
+ self.assertIsNone(gen_b.gi_yieldfrom)
+
tutorial_tests = """
Let's try a simple generator:
@@ -244,26 +356,7 @@ Let's try a simple generator:
File "<stdin>", line 1, in ?
StopIteration
-"raise StopIteration" stops the generator too:
-
- >>> def f():
- ... yield 1
- ... raise StopIteration
- ... yield 2 # never reached
- ...
- >>> g = f()
- >>> next(g)
- 1
- >>> next(g)
- Traceback (most recent call last):
- File "<stdin>", line 1, in ?
- StopIteration
- >>> next(g)
- Traceback (most recent call last):
- File "<stdin>", line 1, in ?
- StopIteration
-
-However, they are not exactly equivalent:
+However, "return" and StopIteration are not exactly equivalent:
>>> def g1():
... try:
@@ -583,7 +676,7 @@ From the Iterators list, about the types of these things.
>>> type(i)
<class 'generator'>
>>> [s for s in dir(i) if not s.startswith('_')]
-['close', 'gi_code', 'gi_frame', 'gi_running', 'send', 'throw']
+['close', 'gi_code', 'gi_frame', 'gi_running', 'gi_yieldfrom', 'send', 'throw']
>>> from test.support import HAVE_DOCSTRINGS
>>> print(i.__next__.__doc__ if HAVE_DOCSTRINGS else 'Implement next(self).')
Implement next(self).
@@ -1258,7 +1351,7 @@ class Queens:
# For each square, compute a bit vector of the columns and
# diagonals it covers, and for each row compute a function that
- # generates the possiblities for the columns in that row.
+ # generates the possibilities for the columns in that row.
self.rowgenerators = []
for i in rangen:
rowuses = [(1 << j) | # column ordinal
diff --git a/Lib/test/test_genericpath.py b/Lib/test/test_genericpath.py
index e59ed4d21c..86fc2de753 100644
--- a/Lib/test/test_genericpath.py
+++ b/Lib/test/test_genericpath.py
@@ -419,7 +419,7 @@ class CommonTest(GenericTest):
def test_nonascii_abspath(self):
if (support.TESTFN_UNDECODABLE
# Mac OS X denies the creation of a directory with an invalid
- # UTF-8 name. Windows allows to create a directory with an
+ # UTF-8 name. Windows allows creating a directory with an
# arbitrary bytes name, but fails to enter this directory
# (when the bytes name is used).
and sys.platform not in ('win32', 'darwin')):
@@ -434,6 +434,44 @@ class CommonTest(GenericTest):
with support.temp_cwd(name):
self.test_abspath()
+ def test_join_errors(self):
+ # Check join() raises friendly TypeErrors.
+ with support.check_warnings(('', BytesWarning), quiet=True):
+ errmsg = "Can't mix strings and bytes in path components"
+ with self.assertRaisesRegex(TypeError, errmsg):
+ self.pathmodule.join(b'bytes', 'str')
+ with self.assertRaisesRegex(TypeError, errmsg):
+ self.pathmodule.join('str', b'bytes')
+ # regression, see #15377
+ errmsg = r'join\(\) argument must be str or bytes, not %r'
+ with self.assertRaisesRegex(TypeError, errmsg % 'int'):
+ self.pathmodule.join(42, 'str')
+ with self.assertRaisesRegex(TypeError, errmsg % 'int'):
+ self.pathmodule.join('str', 42)
+ with self.assertRaisesRegex(TypeError, errmsg % 'int'):
+ self.pathmodule.join(42)
+ with self.assertRaisesRegex(TypeError, errmsg % 'list'):
+ self.pathmodule.join([])
+ with self.assertRaisesRegex(TypeError, errmsg % 'bytearray'):
+ self.pathmodule.join(bytearray(b'foo'), bytearray(b'bar'))
+
+ def test_relpath_errors(self):
+ # Check relpath() raises friendly TypeErrors.
+ with support.check_warnings(('', (BytesWarning, DeprecationWarning)),
+ quiet=True):
+ errmsg = "Can't mix strings and bytes in path components"
+ with self.assertRaisesRegex(TypeError, errmsg):
+ self.pathmodule.relpath(b'bytes', 'str')
+ with self.assertRaisesRegex(TypeError, errmsg):
+ self.pathmodule.relpath('str', b'bytes')
+ errmsg = r'relpath\(\) argument must be str or bytes, not %r'
+ with self.assertRaisesRegex(TypeError, errmsg % 'int'):
+ self.pathmodule.relpath(42, 'str')
+ with self.assertRaisesRegex(TypeError, errmsg % 'int'):
+ self.pathmodule.relpath('str', 42)
+ with self.assertRaisesRegex(TypeError, errmsg % 'bytearray'):
+ self.pathmodule.relpath(bytearray(b'foo'), bytearray(b'bar'))
+
if __name__=="__main__":
unittest.main()
diff --git a/Lib/test/test_getargs2.py b/Lib/test/test_getargs2.py
index 1853a2dbed..984aac7d91 100644
--- a/Lib/test/test_getargs2.py
+++ b/Lib/test/test_getargs2.py
@@ -1,4 +1,6 @@
import unittest
+import math
+import sys
from test import support
# Skip this test if the _testcapi module isn't available.
support.import_module('_testcapi')
@@ -34,8 +36,8 @@ except ImportError:
# > ** Changed from previous "range-and-a-half" to "none"; the
# > range-and-a-half checking wasn't particularly useful.
#
-# Plus a C API or two, e.g. PyInt_AsLongMask() ->
-# unsigned long and PyInt_AsLongLongMask() -> unsigned
+# Plus a C API or two, e.g. PyLong_AsUnsignedLongMask() ->
+# unsigned long and PyLong_AsUnsignedLongLongMask() -> unsigned
# long long (if that exists).
LARGE = 0x7FFFFFFF
@@ -43,7 +45,11 @@ VERY_LARGE = 0xFF0000121212121212121242
from _testcapi import UCHAR_MAX, USHRT_MAX, UINT_MAX, ULONG_MAX, INT_MAX, \
INT_MIN, LONG_MIN, LONG_MAX, PY_SSIZE_T_MIN, PY_SSIZE_T_MAX, \
- SHRT_MIN, SHRT_MAX
+ SHRT_MIN, SHRT_MAX, FLT_MIN, FLT_MAX, DBL_MIN, DBL_MAX
+
+DBL_MAX_EXP = sys.float_info.max_exp
+INF = float('inf')
+NAN = float('nan')
# fake, they are not defined in Python's header files
LLONG_MAX = 2**63-1
@@ -71,6 +77,61 @@ class BadInt3(int):
return True
+class Float:
+ def __float__(self):
+ return 4.25
+
+class FloatSubclass(float):
+ pass
+
+class FloatSubclass2(float):
+ def __float__(self):
+ return 4.25
+
+class BadFloat:
+ def __float__(self):
+ return 687
+
+class BadFloat2:
+ def __float__(self):
+ return FloatSubclass(4.25)
+
+class BadFloat3(float):
+ def __float__(self):
+ return FloatSubclass(4.25)
+
+
+class Complex:
+ def __complex__(self):
+ return 4.25+0.5j
+
+class ComplexSubclass(complex):
+ pass
+
+class ComplexSubclass2(complex):
+ def __complex__(self):
+ return 4.25+0.5j
+
+class BadComplex:
+ def __complex__(self):
+ return 1.25
+
+class BadComplex2:
+ def __complex__(self):
+ return ComplexSubclass(4.25+0.5j)
+
+class BadComplex3(complex):
+ def __complex__(self):
+ return ComplexSubclass(4.25+0.5j)
+
+
+class TupleSubclass(tuple):
+ pass
+
+class DictSubclass(dict):
+ pass
+
+
class Unsigned_TestCase(unittest.TestCase):
def test_b(self):
from _testcapi import getargs_b
@@ -289,6 +350,81 @@ class LongLong_TestCase(unittest.TestCase):
self.assertEqual(VERY_LARGE & ULLONG_MAX, getargs_K(VERY_LARGE))
+
+class Float_TestCase(unittest.TestCase):
+ def assertEqualWithSign(self, actual, expected):
+ self.assertEqual(actual, expected)
+ self.assertEqual(math.copysign(1, actual), math.copysign(1, expected))
+
+ def test_f(self):
+ from _testcapi import getargs_f
+ self.assertEqual(getargs_f(4.25), 4.25)
+ self.assertEqual(getargs_f(4), 4.0)
+ self.assertRaises(TypeError, getargs_f, 4.25+0j)
+ self.assertEqual(getargs_f(Float()), 4.25)
+ self.assertEqual(getargs_f(FloatSubclass(7.5)), 7.5)
+ self.assertEqual(getargs_f(FloatSubclass2(7.5)), 7.5)
+ self.assertRaises(TypeError, getargs_f, BadFloat())
+ self.assertEqual(getargs_f(BadFloat2()), 4.25)
+ self.assertEqual(getargs_f(BadFloat3(7.5)), 7.5)
+
+ for x in (FLT_MIN, -FLT_MIN, FLT_MAX, -FLT_MAX, INF, -INF):
+ self.assertEqual(getargs_f(x), x)
+ if FLT_MAX < DBL_MAX:
+ self.assertEqual(getargs_f(DBL_MAX), INF)
+ self.assertEqual(getargs_f(-DBL_MAX), -INF)
+ if FLT_MIN > DBL_MIN:
+ self.assertEqualWithSign(getargs_f(DBL_MIN), 0.0)
+ self.assertEqualWithSign(getargs_f(-DBL_MIN), -0.0)
+ self.assertEqualWithSign(getargs_f(0.0), 0.0)
+ self.assertEqualWithSign(getargs_f(-0.0), -0.0)
+ r = getargs_f(NAN)
+ self.assertNotEqual(r, r)
+
+ def test_d(self):
+ from _testcapi import getargs_d
+ self.assertEqual(getargs_d(4.25), 4.25)
+ self.assertEqual(getargs_d(4), 4.0)
+ self.assertRaises(TypeError, getargs_d, 4.25+0j)
+ self.assertEqual(getargs_d(Float()), 4.25)
+ self.assertEqual(getargs_d(FloatSubclass(7.5)), 7.5)
+ self.assertEqual(getargs_d(FloatSubclass2(7.5)), 7.5)
+ self.assertRaises(TypeError, getargs_d, BadFloat())
+ self.assertEqual(getargs_d(BadFloat2()), 4.25)
+ self.assertEqual(getargs_d(BadFloat3(7.5)), 7.5)
+
+ for x in (DBL_MIN, -DBL_MIN, DBL_MAX, -DBL_MAX, INF, -INF):
+ self.assertEqual(getargs_d(x), x)
+ self.assertRaises(OverflowError, getargs_d, 1<<DBL_MAX_EXP)
+ self.assertRaises(OverflowError, getargs_d, -1<<DBL_MAX_EXP)
+ self.assertEqualWithSign(getargs_d(0.0), 0.0)
+ self.assertEqualWithSign(getargs_d(-0.0), -0.0)
+ r = getargs_d(NAN)
+ self.assertNotEqual(r, r)
+
+ def test_D(self):
+ from _testcapi import getargs_D
+ self.assertEqual(getargs_D(4.25+0.5j), 4.25+0.5j)
+ self.assertEqual(getargs_D(4.25), 4.25+0j)
+ self.assertEqual(getargs_D(4), 4.0+0j)
+ self.assertEqual(getargs_D(Complex()), 4.25+0.5j)
+ self.assertEqual(getargs_D(ComplexSubclass(7.5+0.25j)), 7.5+0.25j)
+ self.assertEqual(getargs_D(ComplexSubclass2(7.5+0.25j)), 7.5+0.25j)
+ self.assertRaises(TypeError, getargs_D, BadComplex())
+ self.assertEqual(getargs_D(BadComplex2()), 4.25+0.5j)
+ self.assertEqual(getargs_D(BadComplex3(7.5+0.25j)), 7.5+0.25j)
+
+ for x in (DBL_MIN, -DBL_MIN, DBL_MAX, -DBL_MAX, INF, -INF):
+ c = complex(x, 1.0)
+ self.assertEqual(getargs_D(c), c)
+ c = complex(1.0, x)
+ self.assertEqual(getargs_D(c), c)
+ self.assertEqualWithSign(getargs_D(complex(0.0, 1.0)).real, 0.0)
+ self.assertEqualWithSign(getargs_D(complex(-0.0, 1.0)).real, -0.0)
+ self.assertEqualWithSign(getargs_D(complex(1.0, 0.0)).imag, 0.0)
+ self.assertEqualWithSign(getargs_D(complex(1.0, -0.0)).imag, -0.0)
+
+
class Paradox:
"This statement is false."
def __bool__(self):
@@ -321,6 +457,33 @@ class Boolean_TestCase(unittest.TestCase):
class Tuple_TestCase(unittest.TestCase):
+ def test_args(self):
+ from _testcapi import get_args
+
+ ret = get_args(1, 2)
+ self.assertEqual(ret, (1, 2))
+ self.assertIs(type(ret), tuple)
+
+ ret = get_args(1, *(2, 3))
+ self.assertEqual(ret, (1, 2, 3))
+ self.assertIs(type(ret), tuple)
+
+ ret = get_args(*[1, 2])
+ self.assertEqual(ret, (1, 2))
+ self.assertIs(type(ret), tuple)
+
+ ret = get_args(*TupleSubclass([1, 2]))
+ self.assertEqual(ret, (1, 2))
+ self.assertIsInstance(ret, tuple)
+
+ ret = get_args()
+ self.assertIn(ret, ((), None))
+ self.assertIn(type(ret), (tuple, type(None)))
+
+ ret = get_args(*())
+ self.assertIn(ret, ((), None))
+ self.assertIn(type(ret), (tuple, type(None)))
+
def test_tuple(self):
from _testcapi import getargs_tuple
@@ -336,6 +499,29 @@ class Tuple_TestCase(unittest.TestCase):
self.assertRaises(TypeError, getargs_tuple, 1, seq())
class Keywords_TestCase(unittest.TestCase):
+ def test_kwargs(self):
+ from _testcapi import get_kwargs
+
+ ret = get_kwargs(a=1, b=2)
+ self.assertEqual(ret, {'a': 1, 'b': 2})
+ self.assertIs(type(ret), dict)
+
+ ret = get_kwargs(a=1, **{'b': 2, 'c': 3})
+ self.assertEqual(ret, {'a': 1, 'b': 2, 'c': 3})
+ self.assertIs(type(ret), dict)
+
+ ret = get_kwargs(**DictSubclass({'a': 1, 'b': 2}))
+ self.assertEqual(ret, {'a': 1, 'b': 2})
+ self.assertIsInstance(ret, dict)
+
+ ret = get_kwargs()
+ self.assertIn(ret, ({}, None))
+ self.assertIn(type(ret), (dict, type(None)))
+
+ ret = get_kwargs(**{})
+ self.assertIn(ret, ({}, None))
+ self.assertIn(type(ret), (dict, type(None)))
+
def test_positional_args(self):
# using all positional args
self.assertEqual(
@@ -469,20 +655,78 @@ class KeywordOnly_TestCase(unittest.TestCase):
"'\udc80' is an invalid keyword argument for this function"):
getargs_keyword_only(1, 2, **{'\uDC80': 10})
+
class Bytes_TestCase(unittest.TestCase):
def test_c(self):
from _testcapi import getargs_c
self.assertRaises(TypeError, getargs_c, b'abc') # len > 1
- self.assertEqual(getargs_c(b'a'), b'a')
- self.assertEqual(getargs_c(bytearray(b'a')), b'a')
+ self.assertEqual(getargs_c(b'a'), 97)
+ self.assertEqual(getargs_c(bytearray(b'a')), 97)
self.assertRaises(TypeError, getargs_c, memoryview(b'a'))
self.assertRaises(TypeError, getargs_c, 's')
+ self.assertRaises(TypeError, getargs_c, 97)
self.assertRaises(TypeError, getargs_c, None)
+ def test_y(self):
+ from _testcapi import getargs_y
+ self.assertRaises(TypeError, getargs_y, 'abc\xe9')
+ self.assertEqual(getargs_y(b'bytes'), b'bytes')
+ self.assertRaises(ValueError, getargs_y, b'nul:\0')
+ self.assertRaises(TypeError, getargs_y, bytearray(b'bytearray'))
+ self.assertRaises(TypeError, getargs_y, memoryview(b'memoryview'))
+ self.assertRaises(TypeError, getargs_y, None)
+
+ def test_y_star(self):
+ from _testcapi import getargs_y_star
+ self.assertRaises(TypeError, getargs_y_star, 'abc\xe9')
+ self.assertEqual(getargs_y_star(b'bytes'), b'bytes')
+ self.assertEqual(getargs_y_star(b'nul:\0'), b'nul:\0')
+ self.assertEqual(getargs_y_star(bytearray(b'bytearray')), b'bytearray')
+ self.assertEqual(getargs_y_star(memoryview(b'memoryview')), b'memoryview')
+ self.assertRaises(TypeError, getargs_y_star, None)
+
+ def test_y_hash(self):
+ from _testcapi import getargs_y_hash
+ self.assertRaises(TypeError, getargs_y_hash, 'abc\xe9')
+ self.assertEqual(getargs_y_hash(b'bytes'), b'bytes')
+ self.assertEqual(getargs_y_hash(b'nul:\0'), b'nul:\0')
+ self.assertRaises(TypeError, getargs_y_hash, bytearray(b'bytearray'))
+ self.assertRaises(TypeError, getargs_y_hash, memoryview(b'memoryview'))
+ self.assertRaises(TypeError, getargs_y_hash, None)
+
+ def test_w_star(self):
+ # getargs_w_star() modifies first and last byte
+ from _testcapi import getargs_w_star
+ self.assertRaises(TypeError, getargs_w_star, 'abc\xe9')
+ self.assertRaises(TypeError, getargs_w_star, b'bytes')
+ self.assertRaises(TypeError, getargs_w_star, b'nul:\0')
+ self.assertRaises(TypeError, getargs_w_star, memoryview(b'bytes'))
+ buf = bytearray(b'bytearray')
+ self.assertEqual(getargs_w_star(buf), b'[ytearra]')
+ self.assertEqual(buf, bytearray(b'[ytearra]'))
+ buf = bytearray(b'memoryview')
+ self.assertEqual(getargs_w_star(memoryview(buf)), b'[emoryvie]')
+ self.assertEqual(buf, bytearray(b'[emoryvie]'))
+ self.assertRaises(TypeError, getargs_w_star, None)
+
+
+class String_TestCase(unittest.TestCase):
+ def test_C(self):
+ from _testcapi import getargs_C
+ self.assertRaises(TypeError, getargs_C, 'abc') # len > 1
+ self.assertEqual(getargs_C('a'), 97)
+ self.assertEqual(getargs_C('\u20ac'), 0x20ac)
+ self.assertEqual(getargs_C('\U0001f40d'), 0x1f40d)
+ self.assertRaises(TypeError, getargs_C, b'a')
+ self.assertRaises(TypeError, getargs_C, bytearray(b'a'))
+ self.assertRaises(TypeError, getargs_C, memoryview(b'a'))
+ self.assertRaises(TypeError, getargs_C, 97)
+ self.assertRaises(TypeError, getargs_C, None)
+
def test_s(self):
from _testcapi import getargs_s
self.assertEqual(getargs_s('abc\xe9'), b'abc\xc3\xa9')
- self.assertRaises(TypeError, getargs_s, 'nul:\0')
+ self.assertRaises(ValueError, getargs_s, 'nul:\0')
self.assertRaises(TypeError, getargs_s, b'bytes')
self.assertRaises(TypeError, getargs_s, bytearray(b'bytearray'))
self.assertRaises(TypeError, getargs_s, memoryview(b'memoryview'))
@@ -509,7 +753,7 @@ class Bytes_TestCase(unittest.TestCase):
def test_z(self):
from _testcapi import getargs_z
self.assertEqual(getargs_z('abc\xe9'), b'abc\xc3\xa9')
- self.assertRaises(TypeError, getargs_z, 'nul:\0')
+ self.assertRaises(ValueError, getargs_z, 'nul:\0')
self.assertRaises(TypeError, getargs_z, b'bytes')
self.assertRaises(TypeError, getargs_z, bytearray(b'bytearray'))
self.assertRaises(TypeError, getargs_z, memoryview(b'memoryview'))
@@ -533,51 +777,86 @@ class Bytes_TestCase(unittest.TestCase):
self.assertRaises(TypeError, getargs_z_hash, memoryview(b'memoryview'))
self.assertIsNone(getargs_z_hash(None))
- def test_y(self):
- from _testcapi import getargs_y
- self.assertRaises(TypeError, getargs_y, 'abc\xe9')
- self.assertEqual(getargs_y(b'bytes'), b'bytes')
- self.assertRaises(TypeError, getargs_y, b'nul:\0')
- self.assertRaises(TypeError, getargs_y, bytearray(b'bytearray'))
- self.assertRaises(TypeError, getargs_y, memoryview(b'memoryview'))
- self.assertRaises(TypeError, getargs_y, None)
-
- def test_y_star(self):
- from _testcapi import getargs_y_star
- self.assertRaises(TypeError, getargs_y_star, 'abc\xe9')
- self.assertEqual(getargs_y_star(b'bytes'), b'bytes')
- self.assertEqual(getargs_y_star(b'nul:\0'), b'nul:\0')
- self.assertEqual(getargs_y_star(bytearray(b'bytearray')), b'bytearray')
- self.assertEqual(getargs_y_star(memoryview(b'memoryview')), b'memoryview')
- self.assertRaises(TypeError, getargs_y_star, None)
-
- def test_y_hash(self):
- from _testcapi import getargs_y_hash
- self.assertRaises(TypeError, getargs_y_hash, 'abc\xe9')
- self.assertEqual(getargs_y_hash(b'bytes'), b'bytes')
- self.assertEqual(getargs_y_hash(b'nul:\0'), b'nul:\0')
- self.assertRaises(TypeError, getargs_y_hash, bytearray(b'bytearray'))
- self.assertRaises(TypeError, getargs_y_hash, memoryview(b'memoryview'))
- self.assertRaises(TypeError, getargs_y_hash, None)
+ def test_es(self):
+ from _testcapi import getargs_es
+ self.assertEqual(getargs_es('abc\xe9'), b'abc\xc3\xa9')
+ self.assertEqual(getargs_es('abc\xe9', 'latin1'), b'abc\xe9')
+ self.assertRaises(UnicodeEncodeError, getargs_es, 'abc\xe9', 'ascii')
+ self.assertRaises(LookupError, getargs_es, 'abc\xe9', 'spam')
+ self.assertRaises(TypeError, getargs_es, b'bytes', 'latin1')
+ self.assertRaises(TypeError, getargs_es, bytearray(b'bytearray'), 'latin1')
+ self.assertRaises(TypeError, getargs_es, memoryview(b'memoryview'), 'latin1')
+ self.assertRaises(TypeError, getargs_es, None, 'latin1')
+ self.assertRaises(TypeError, getargs_es, 'nul:\0', 'latin1')
+
+ def test_et(self):
+ from _testcapi import getargs_et
+ self.assertEqual(getargs_et('abc\xe9'), b'abc\xc3\xa9')
+ self.assertEqual(getargs_et('abc\xe9', 'latin1'), b'abc\xe9')
+ self.assertRaises(UnicodeEncodeError, getargs_et, 'abc\xe9', 'ascii')
+ self.assertRaises(LookupError, getargs_et, 'abc\xe9', 'spam')
+ self.assertEqual(getargs_et(b'bytes', 'latin1'), b'bytes')
+ self.assertEqual(getargs_et(bytearray(b'bytearray'), 'latin1'), b'bytearray')
+ self.assertRaises(TypeError, getargs_et, memoryview(b'memoryview'), 'latin1')
+ self.assertRaises(TypeError, getargs_et, None, 'latin1')
+ self.assertRaises(TypeError, getargs_et, 'nul:\0', 'latin1')
+ self.assertRaises(TypeError, getargs_et, b'nul:\0', 'latin1')
+ self.assertRaises(TypeError, getargs_et, bytearray(b'nul:\0'), 'latin1')
+
+ def test_es_hash(self):
+ from _testcapi import getargs_es_hash
+ self.assertEqual(getargs_es_hash('abc\xe9'), b'abc\xc3\xa9')
+ self.assertEqual(getargs_es_hash('abc\xe9', 'latin1'), b'abc\xe9')
+ self.assertRaises(UnicodeEncodeError, getargs_es_hash, 'abc\xe9', 'ascii')
+ self.assertRaises(LookupError, getargs_es_hash, 'abc\xe9', 'spam')
+ self.assertRaises(TypeError, getargs_es_hash, b'bytes', 'latin1')
+ self.assertRaises(TypeError, getargs_es_hash, bytearray(b'bytearray'), 'latin1')
+ self.assertRaises(TypeError, getargs_es_hash, memoryview(b'memoryview'), 'latin1')
+ self.assertRaises(TypeError, getargs_es_hash, None, 'latin1')
+ self.assertEqual(getargs_es_hash('nul:\0', 'latin1'), b'nul:\0')
+
+ buf = bytearray(b'x'*8)
+ self.assertEqual(getargs_es_hash('abc\xe9', 'latin1', buf), b'abc\xe9')
+ self.assertEqual(buf, bytearray(b'abc\xe9\x00xxx'))
+ buf = bytearray(b'x'*5)
+ self.assertEqual(getargs_es_hash('abc\xe9', 'latin1', buf), b'abc\xe9')
+ self.assertEqual(buf, bytearray(b'abc\xe9\x00'))
+ buf = bytearray(b'x'*4)
+ self.assertRaises(TypeError, getargs_es_hash, 'abc\xe9', 'latin1', buf)
+ self.assertEqual(buf, bytearray(b'x'*4))
+ buf = bytearray()
+ self.assertRaises(TypeError, getargs_es_hash, 'abc\xe9', 'latin1', buf)
+
+ def test_et_hash(self):
+ from _testcapi import getargs_et_hash
+ self.assertEqual(getargs_et_hash('abc\xe9'), b'abc\xc3\xa9')
+ self.assertEqual(getargs_et_hash('abc\xe9', 'latin1'), b'abc\xe9')
+ self.assertRaises(UnicodeEncodeError, getargs_et_hash, 'abc\xe9', 'ascii')
+ self.assertRaises(LookupError, getargs_et_hash, 'abc\xe9', 'spam')
+ self.assertEqual(getargs_et_hash(b'bytes', 'latin1'), b'bytes')
+ self.assertEqual(getargs_et_hash(bytearray(b'bytearray'), 'latin1'), b'bytearray')
+ self.assertRaises(TypeError, getargs_et_hash, memoryview(b'memoryview'), 'latin1')
+ self.assertRaises(TypeError, getargs_et_hash, None, 'latin1')
+ self.assertEqual(getargs_et_hash('nul:\0', 'latin1'), b'nul:\0')
+ self.assertEqual(getargs_et_hash(b'nul:\0', 'latin1'), b'nul:\0')
+ self.assertEqual(getargs_et_hash(bytearray(b'nul:\0'), 'latin1'), b'nul:\0')
+
+ buf = bytearray(b'x'*8)
+ self.assertEqual(getargs_et_hash('abc\xe9', 'latin1', buf), b'abc\xe9')
+ self.assertEqual(buf, bytearray(b'abc\xe9\x00xxx'))
+ buf = bytearray(b'x'*5)
+ self.assertEqual(getargs_et_hash('abc\xe9', 'latin1', buf), b'abc\xe9')
+ self.assertEqual(buf, bytearray(b'abc\xe9\x00'))
+ buf = bytearray(b'x'*4)
+ self.assertRaises(TypeError, getargs_et_hash, 'abc\xe9', 'latin1', buf)
+ self.assertEqual(buf, bytearray(b'x'*4))
+ buf = bytearray()
+ self.assertRaises(TypeError, getargs_et_hash, 'abc\xe9', 'latin1', buf)
- def test_w_star(self):
- # getargs_w_star() modifies first and last byte
- from _testcapi import getargs_w_star
- self.assertRaises(TypeError, getargs_w_star, 'abc\xe9')
- self.assertRaises(TypeError, getargs_w_star, b'bytes')
- self.assertRaises(TypeError, getargs_w_star, b'nul:\0')
- self.assertRaises(TypeError, getargs_w_star, memoryview(b'bytes'))
- self.assertEqual(getargs_w_star(bytearray(b'bytearray')), b'[ytearra]')
- self.assertEqual(getargs_w_star(memoryview(bytearray(b'memoryview'))),
- b'[emoryvie]')
- self.assertRaises(TypeError, getargs_w_star, None)
-
-
-class Unicode_TestCase(unittest.TestCase):
def test_u(self):
from _testcapi import getargs_u
self.assertEqual(getargs_u('abc\xe9'), 'abc\xe9')
- self.assertRaises(TypeError, getargs_u, 'nul:\0')
+ self.assertRaises(ValueError, getargs_u, 'nul:\0')
self.assertRaises(TypeError, getargs_u, b'bytes')
self.assertRaises(TypeError, getargs_u, bytearray(b'bytearray'))
self.assertRaises(TypeError, getargs_u, memoryview(b'memoryview'))
@@ -595,7 +874,7 @@ class Unicode_TestCase(unittest.TestCase):
def test_Z(self):
from _testcapi import getargs_Z
self.assertEqual(getargs_Z('abc\xe9'), 'abc\xe9')
- self.assertRaises(TypeError, getargs_Z, 'nul:\0')
+ self.assertRaises(ValueError, getargs_Z, 'nul:\0')
self.assertRaises(TypeError, getargs_Z, b'bytes')
self.assertRaises(TypeError, getargs_Z, bytearray(b'bytearray'))
self.assertRaises(TypeError, getargs_Z, memoryview(b'memoryview'))
@@ -611,5 +890,33 @@ class Unicode_TestCase(unittest.TestCase):
self.assertIsNone(getargs_Z_hash(None))
+class Object_TestCase(unittest.TestCase):
+ def test_S(self):
+ from _testcapi import getargs_S
+ obj = b'bytes'
+ self.assertIs(getargs_S(obj), obj)
+ self.assertRaises(TypeError, getargs_S, bytearray(b'bytearray'))
+ self.assertRaises(TypeError, getargs_S, 'str')
+ self.assertRaises(TypeError, getargs_S, None)
+ self.assertRaises(TypeError, getargs_S, memoryview(obj))
+
+ def test_Y(self):
+ from _testcapi import getargs_Y
+ obj = bytearray(b'bytearray')
+ self.assertIs(getargs_Y(obj), obj)
+ self.assertRaises(TypeError, getargs_Y, b'bytes')
+ self.assertRaises(TypeError, getargs_Y, 'str')
+ self.assertRaises(TypeError, getargs_Y, None)
+ self.assertRaises(TypeError, getargs_Y, memoryview(obj))
+
+ def test_U(self):
+ from _testcapi import getargs_U
+ obj = 'str'
+ self.assertIs(getargs_U(obj), obj)
+ self.assertRaises(TypeError, getargs_U, b'bytes')
+ self.assertRaises(TypeError, getargs_U, bytearray(b'bytearray'))
+ self.assertRaises(TypeError, getargs_U, None)
+
+
if __name__ == "__main__":
unittest.main()
diff --git a/Lib/test/test_getopt.py b/Lib/test/test_getopt.py
index fa5701f310..9275dc4c5b 100644
--- a/Lib/test/test_getopt.py
+++ b/Lib/test/test_getopt.py
@@ -1,7 +1,7 @@
# test_getopt.py
# David Goodger <dgoodger@bigfoot.com> 2000-08-19
-from test.support import verbose, run_doctest, run_unittest, EnvironmentVarGuard
+from test.support import verbose, run_doctest, EnvironmentVarGuard
import unittest
import getopt
@@ -180,8 +180,5 @@ class GetoptTests(unittest.TestCase):
self.assertEqual(longopts, [('--help', 'x')])
self.assertRaises(getopt.GetoptError, getopt.getopt, ['--help='], '', ['help'])
-def test_main():
- run_unittest(GetoptTests)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_gettext.py b/Lib/test/test_gettext.py
index 2737e81367..de610c752a 100644
--- a/Lib/test/test_gettext.py
+++ b/Lib/test/test_gettext.py
@@ -33,6 +33,55 @@ IHNiZSBsYmhlIENsZ3ViYSBjZWJ0ZW56ZiBvbCBjZWJpdnF2YXQgbmEgdmFncmVzbnByIGdiIGd1
ciBUQUgKdHJnZ3JrZyB6cmZmbnRyIHBuZ255YnQgeXZvZW5lbC4AYmFjb24Ad2luayB3aW5rAA==
'''
+# This data contains an invalid major version number (5)
+# An unexpected major version number should be treated as an error when
+# parsing a .mo file
+
+GNU_MO_DATA_BAD_MAJOR_VERSION = b'''\
+3hIElQAABQAGAAAAHAAAAEwAAAALAAAAfAAAAAAAAACoAAAAFQAAAKkAAAAjAAAAvwAAAKEAAADj
+AAAABwAAAIUBAAALAAAAjQEAAEUBAACZAQAAFgAAAN8CAAAeAAAA9gIAAKEAAAAVAwAABQAAALcD
+AAAJAAAAvQMAAAEAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABQAAAAYAAAACAAAAAFJh
+eW1vbmQgTHV4dXJ5IFlhY2gtdABUaGVyZSBpcyAlcyBmaWxlAFRoZXJlIGFyZSAlcyBmaWxlcwBU
+aGlzIG1vZHVsZSBwcm92aWRlcyBpbnRlcm5hdGlvbmFsaXphdGlvbiBhbmQgbG9jYWxpemF0aW9u
+CnN1cHBvcnQgZm9yIHlvdXIgUHl0aG9uIHByb2dyYW1zIGJ5IHByb3ZpZGluZyBhbiBpbnRlcmZh
+Y2UgdG8gdGhlIEdOVQpnZXR0ZXh0IG1lc3NhZ2UgY2F0YWxvZyBsaWJyYXJ5LgBtdWxsdXNrAG51
+ZGdlIG51ZGdlAFByb2plY3QtSWQtVmVyc2lvbjogMi4wClBPLVJldmlzaW9uLURhdGU6IDIwMDAt
+MDgtMjkgMTI6MTktMDQ6MDAKTGFzdC1UcmFuc2xhdG9yOiBKLiBEYXZpZCBJYsOhw7FleiA8ai1k
+YXZpZEBub29zLmZyPgpMYW5ndWFnZS1UZWFtOiBYWCA8cHl0aG9uLWRldkBweXRob24ub3JnPgpN
+SU1FLVZlcnNpb246IDEuMApDb250ZW50LVR5cGU6IHRleHQvcGxhaW47IGNoYXJzZXQ9aXNvLTg4
+NTktMQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBub25lCkdlbmVyYXRlZC1CeTogcHlnZXR0
+ZXh0LnB5IDEuMQpQbHVyYWwtRm9ybXM6IG5wbHVyYWxzPTI7IHBsdXJhbD1uIT0xOwoAVGhyb2F0
+d29iYmxlciBNYW5ncm92ZQBIYXkgJXMgZmljaGVybwBIYXkgJXMgZmljaGVyb3MAR3V2ZiB6YnFo
+eXIgY2ViaXZxcmYgdmFncmVhbmd2YmFueXZtbmd2YmEgbmFxIHlicG55dm1uZ3ZiYQpmaGNjYmVn
+IHNiZSBsYmhlIENsZ3ViYSBjZWJ0ZW56ZiBvbCBjZWJpdnF2YXQgbmEgdmFncmVzbnByIGdiIGd1
+ciBUQUgKdHJnZ3JrZyB6cmZmbnRyIHBuZ255YnQgeXZvZW5lbC4AYmFjb24Ad2luayB3aW5rAA==
+'''
+
+# This data contains an invalid minor version number (7)
+# An unexpected minor version number only indicates that some of the file's
+# contents may not be able to be read. It does not indicate an error.
+
+GNU_MO_DATA_BAD_MINOR_VERSION = b'''\
+3hIElQcAAAAGAAAAHAAAAEwAAAALAAAAfAAAAAAAAACoAAAAFQAAAKkAAAAjAAAAvwAAAKEAAADj
+AAAABwAAAIUBAAALAAAAjQEAAEUBAACZAQAAFgAAAN8CAAAeAAAA9gIAAKEAAAAVAwAABQAAALcD
+AAAJAAAAvQMAAAEAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABQAAAAYAAAACAAAAAFJh
+eW1vbmQgTHV4dXJ5IFlhY2gtdABUaGVyZSBpcyAlcyBmaWxlAFRoZXJlIGFyZSAlcyBmaWxlcwBU
+aGlzIG1vZHVsZSBwcm92aWRlcyBpbnRlcm5hdGlvbmFsaXphdGlvbiBhbmQgbG9jYWxpemF0aW9u
+CnN1cHBvcnQgZm9yIHlvdXIgUHl0aG9uIHByb2dyYW1zIGJ5IHByb3ZpZGluZyBhbiBpbnRlcmZh
+Y2UgdG8gdGhlIEdOVQpnZXR0ZXh0IG1lc3NhZ2UgY2F0YWxvZyBsaWJyYXJ5LgBtdWxsdXNrAG51
+ZGdlIG51ZGdlAFByb2plY3QtSWQtVmVyc2lvbjogMi4wClBPLVJldmlzaW9uLURhdGU6IDIwMDAt
+MDgtMjkgMTI6MTktMDQ6MDAKTGFzdC1UcmFuc2xhdG9yOiBKLiBEYXZpZCBJYsOhw7FleiA8ai1k
+YXZpZEBub29zLmZyPgpMYW5ndWFnZS1UZWFtOiBYWCA8cHl0aG9uLWRldkBweXRob24ub3JnPgpN
+SU1FLVZlcnNpb246IDEuMApDb250ZW50LVR5cGU6IHRleHQvcGxhaW47IGNoYXJzZXQ9aXNvLTg4
+NTktMQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBub25lCkdlbmVyYXRlZC1CeTogcHlnZXR0
+ZXh0LnB5IDEuMQpQbHVyYWwtRm9ybXM6IG5wbHVyYWxzPTI7IHBsdXJhbD1uIT0xOwoAVGhyb2F0
+d29iYmxlciBNYW5ncm92ZQBIYXkgJXMgZmljaGVybwBIYXkgJXMgZmljaGVyb3MAR3V2ZiB6YnFo
+eXIgY2ViaXZxcmYgdmFncmVhbmd2YmFueXZtbmd2YmEgbmFxIHlicG55dm1uZ3ZiYQpmaGNjYmVn
+IHNiZSBsYmhlIENsZ3ViYSBjZWJ0ZW56ZiBvbCBjZWJpdnF2YXQgbmEgdmFncmVzbnByIGdiIGd1
+ciBUQUgKdHJnZ3JrZyB6cmZmbnRyIHBuZ255YnQgeXZvZW5lbC4AYmFjb24Ad2luayB3aW5rAA==
+'''
+
+
UMO_DATA = b'''\
3hIElQAAAAACAAAAHAAAACwAAAAFAAAAPAAAAAAAAABQAAAABAAAAFEAAAAPAQAAVgAAAAQAAABm
AQAAAQAAAAIAAAAAAAAAAAAAAAAAAAAAYWLDngBQcm9qZWN0LUlkLVZlcnNpb246IDIuMApQTy1S
@@ -56,6 +105,8 @@ bGUKR2VuZXJhdGVkLUJ5OiBweWdldHRleHQucHkgMS4zCgA=
LOCALEDIR = os.path.join('xx', 'LC_MESSAGES')
MOFILE = os.path.join(LOCALEDIR, 'gettext.mo')
+MOFILE_BAD_MAJOR_VERSION = os.path.join(LOCALEDIR, 'gettext_bad_major_version.mo')
+MOFILE_BAD_MINOR_VERSION = os.path.join(LOCALEDIR, 'gettext_bad_minor_version.mo')
UMOFILE = os.path.join(LOCALEDIR, 'ugettext.mo')
MMOFILE = os.path.join(LOCALEDIR, 'metadata.mo')
@@ -66,6 +117,10 @@ class GettextBaseTest(unittest.TestCase):
os.makedirs(LOCALEDIR)
with open(MOFILE, 'wb') as fp:
fp.write(base64.decodebytes(GNU_MO_DATA))
+ with open(MOFILE_BAD_MAJOR_VERSION, 'wb') as fp:
+ fp.write(base64.decodebytes(GNU_MO_DATA_BAD_MAJOR_VERSION))
+ with open(MOFILE_BAD_MINOR_VERSION, 'wb') as fp:
+ fp.write(base64.decodebytes(GNU_MO_DATA_BAD_MINOR_VERSION))
with open(UMOFILE, 'wb') as fp:
fp.write(base64.decodebytes(UMO_DATA))
with open(MMOFILE, 'wb') as fp:
@@ -172,6 +227,21 @@ class GettextTestCase2(GettextBaseTest):
def test_textdomain(self):
self.assertEqual(gettext.textdomain(), 'gettext')
+ def test_bad_major_version(self):
+ with open(MOFILE_BAD_MAJOR_VERSION, 'rb') as fp:
+ with self.assertRaises(OSError) as cm:
+ gettext.GNUTranslations(fp)
+
+ exception = cm.exception
+ self.assertEqual(exception.errno, 0)
+ self.assertEqual(exception.strerror, "Bad version number 5")
+ self.assertEqual(exception.filename, MOFILE_BAD_MAJOR_VERSION)
+
+ def test_bad_minor_version(self):
+ with open(MOFILE_BAD_MINOR_VERSION, 'rb') as fp:
+ # Check that no error is thrown with a bad minor version number
+ gettext.GNUTranslations(fp)
+
def test_some_translations(self):
eq = self.assertEqual
# test some translations
diff --git a/Lib/test/test_glob.py b/Lib/test/test_glob.py
index a5ab8d6c3e..dce64f9fcb 100644
--- a/Lib/test/test_glob.py
+++ b/Lib/test/test_glob.py
@@ -4,8 +4,8 @@ import shutil
import sys
import unittest
-from test.support import (run_unittest, TESTFN, skip_unless_symlink,
- can_symlink, create_empty_file)
+from test.support import (TESTFN, skip_unless_symlink,
+ can_symlink, create_empty_file, change_cwd)
class GlobTests(unittest.TestCase):
@@ -13,6 +13,9 @@ class GlobTests(unittest.TestCase):
def norm(self, *parts):
return os.path.normpath(os.path.join(self.tempdir, *parts))
+ def joins(self, *tuples):
+ return [os.path.join(self.tempdir, *parts) for parts in tuples]
+
def mktemp(self, *parts):
filename = self.norm(*parts)
base, file = os.path.split(filename)
@@ -28,6 +31,7 @@ class GlobTests(unittest.TestCase):
self.mktemp('.bb', 'H')
self.mktemp('aaa', 'zzzF')
self.mktemp('ZZZ')
+ self.mktemp('EF')
self.mktemp('a', 'bcd', 'EF')
self.mktemp('a', 'bcd', 'efg', 'ha')
if can_symlink():
@@ -38,17 +42,17 @@ class GlobTests(unittest.TestCase):
def tearDown(self):
shutil.rmtree(self.tempdir)
- def glob(self, *parts):
+ def glob(self, *parts, **kwargs):
if len(parts) == 1:
pattern = parts[0]
else:
pattern = os.path.join(*parts)
p = os.path.join(self.tempdir, pattern)
- res = glob.glob(p)
- self.assertEqual(list(glob.iglob(p)), res)
+ res = glob.glob(p, **kwargs)
+ self.assertEqual(list(glob.iglob(p, **kwargs)), res)
bres = [os.fsencode(x) for x in res]
- self.assertEqual(glob.glob(os.fsencode(p)), bres)
- self.assertEqual(list(glob.iglob(os.fsencode(p))), bres)
+ self.assertEqual(glob.glob(os.fsencode(p), **kwargs), bres)
+ self.assertEqual(list(glob.iglob(os.fsencode(p), **kwargs)), bres)
return res
def assertSequencesEqual_noorder(self, l1, l2):
@@ -192,9 +196,122 @@ class GlobTests(unittest.TestCase):
check('//?/c:/?', '//?/c:/[?]')
check('//*/*/*', '//*/*/[*]')
-def test_main():
- run_unittest(GlobTests)
+ def rglob(self, *parts, **kwargs):
+ return self.glob(*parts, recursive=True, **kwargs)
+
+ def test_recursive_glob(self):
+ eq = self.assertSequencesEqual_noorder
+ full = [('EF',), ('ZZZ',),
+ ('a',), ('a', 'D'),
+ ('a', 'bcd'),
+ ('a', 'bcd', 'EF'),
+ ('a', 'bcd', 'efg'),
+ ('a', 'bcd', 'efg', 'ha'),
+ ('aaa',), ('aaa', 'zzzF'),
+ ('aab',), ('aab', 'F'),
+ ]
+ if can_symlink():
+ full += [('sym1',), ('sym2',),
+ ('sym3',),
+ ('sym3', 'EF'),
+ ('sym3', 'efg'),
+ ('sym3', 'efg', 'ha'),
+ ]
+ eq(self.rglob('**'), self.joins(('',), *full))
+ eq(self.rglob(os.curdir, '**'),
+ self.joins((os.curdir, ''), *((os.curdir,) + i for i in full)))
+ dirs = [('a', ''), ('a', 'bcd', ''), ('a', 'bcd', 'efg', ''),
+ ('aaa', ''), ('aab', '')]
+ if can_symlink():
+ dirs += [('sym3', ''), ('sym3', 'efg', '')]
+ eq(self.rglob('**', ''), self.joins(('',), *dirs))
+
+ eq(self.rglob('a', '**'), self.joins(
+ ('a', ''), ('a', 'D'), ('a', 'bcd'), ('a', 'bcd', 'EF'),
+ ('a', 'bcd', 'efg'), ('a', 'bcd', 'efg', 'ha')))
+ eq(self.rglob('a**'), self.joins(('a',), ('aaa',), ('aab',)))
+ expect = [('a', 'bcd', 'EF'), ('EF',)]
+ if can_symlink():
+ expect += [('sym3', 'EF')]
+ eq(self.rglob('**', 'EF'), self.joins(*expect))
+ expect = [('a', 'bcd', 'EF'), ('aaa', 'zzzF'), ('aab', 'F'), ('EF',)]
+ if can_symlink():
+ expect += [('sym3', 'EF')]
+ eq(self.rglob('**', '*F'), self.joins(*expect))
+ eq(self.rglob('**', '*F', ''), [])
+ eq(self.rglob('**', 'bcd', '*'), self.joins(
+ ('a', 'bcd', 'EF'), ('a', 'bcd', 'efg')))
+ eq(self.rglob('a', '**', 'bcd'), self.joins(('a', 'bcd')))
+
+ with change_cwd(self.tempdir):
+ join = os.path.join
+ eq(glob.glob('**', recursive=True), [join(*i) for i in full])
+ eq(glob.glob(join('**', ''), recursive=True),
+ [join(*i) for i in dirs])
+ eq(glob.glob(join('**', '*'), recursive=True),
+ [join(*i) for i in full])
+ eq(glob.glob(join(os.curdir, '**'), recursive=True),
+ [join(os.curdir, '')] + [join(os.curdir, *i) for i in full])
+ eq(glob.glob(join(os.curdir, '**', ''), recursive=True),
+ [join(os.curdir, '')] + [join(os.curdir, *i) for i in dirs])
+ eq(glob.glob(join(os.curdir, '**', '*'), recursive=True),
+ [join(os.curdir, *i) for i in full])
+ eq(glob.glob(join('**','zz*F'), recursive=True),
+ [join('aaa', 'zzzF')])
+ eq(glob.glob('**zz*F', recursive=True), [])
+ expect = [join('a', 'bcd', 'EF'), 'EF']
+ if can_symlink():
+ expect += [join('sym3', 'EF')]
+ eq(glob.glob(join('**', 'EF'), recursive=True), expect)
+
+
+@skip_unless_symlink
+class SymlinkLoopGlobTests(unittest.TestCase):
+
+ def test_selflink(self):
+ tempdir = TESTFN + "_dir"
+ os.makedirs(tempdir)
+ self.addCleanup(shutil.rmtree, tempdir)
+ with change_cwd(tempdir):
+ os.makedirs('dir')
+ create_empty_file(os.path.join('dir', 'file'))
+ os.symlink(os.curdir, os.path.join('dir', 'link'))
+
+ results = glob.glob('**', recursive=True)
+ self.assertEqual(len(results), len(set(results)))
+ results = set(results)
+ depth = 0
+ while results:
+ path = os.path.join(*(['dir'] + ['link'] * depth))
+ self.assertIn(path, results)
+ results.remove(path)
+ if not results:
+ break
+ path = os.path.join(path, 'file')
+ self.assertIn(path, results)
+ results.remove(path)
+ depth += 1
+
+ results = glob.glob(os.path.join('**', 'file'), recursive=True)
+ self.assertEqual(len(results), len(set(results)))
+ results = set(results)
+ depth = 0
+ while results:
+ path = os.path.join(*(['dir'] + ['link'] * depth + ['file']))
+ self.assertIn(path, results)
+ results.remove(path)
+ depth += 1
+
+ results = glob.glob(os.path.join('**', ''), recursive=True)
+ self.assertEqual(len(results), len(set(results)))
+ results = set(results)
+ depth = 0
+ while results:
+ path = os.path.join(*(['dir'] + ['link'] * depth + ['']))
+ self.assertIn(path, results)
+ results.remove(path)
+ depth += 1
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py
index 250452322c..154e3b608c 100644
--- a/Lib/test/test_grammar.py
+++ b/Lib/test/test_grammar.py
@@ -1,7 +1,8 @@
# Python test set -- part 1, grammar.
# This just tests whether the parser accepts them all.
-from test.support import run_unittest, check_syntax_error
+from test.support import check_syntax_error
+import inspect
import unittest
import sys
# testing import *
@@ -205,6 +206,7 @@ class GrammarTests(unittest.TestCase):
d01(1)
d01(*(1,))
d01(*[] or [2])
+ d01(*() or (), *{} and (), **() or {})
d01(**{'a':2})
d01(**{'a':2} or {})
def d11(a, b=1): pass
@@ -298,8 +300,12 @@ class GrammarTests(unittest.TestCase):
return args, kwargs
self.assertEqual(f(1, x=2, *[3, 4], y=5), ((1, 3, 4),
{'x':2, 'y':5}))
- self.assertRaises(SyntaxError, eval, "f(1, *(2,3), 4)")
+ self.assertEqual(f(1, *(2,3), 4), ((1, 2, 3, 4), {}))
self.assertRaises(SyntaxError, eval, "f(1, x=2, *(3,4), x=5)")
+ self.assertEqual(f(**{'eggs':'scrambled', 'spam':'fried'}),
+ ((), {'eggs':'scrambled', 'spam':'fried'}))
+ self.assertEqual(f(spam='fried', **{'eggs':'scrambled'}),
+ ((), {'eggs':'scrambled', 'spam':'fried'}))
# argument annotation tests
def f(x) -> list: pass
@@ -530,7 +536,8 @@ class GrammarTests(unittest.TestCase):
# Not allowed at class scope
check_syntax_error(self, "class foo:yield 1")
check_syntax_error(self, "class foo:yield from ()")
-
+ # Check annotation refleak on SyntaxError
+ check_syntax_error(self, "def g(a:(yield)): pass")
def test_raise(self):
# 'raise' test [',' test]
@@ -987,7 +994,7 @@ class GrammarTests(unittest.TestCase):
# Test ifelse expressions in various cases
def _checkeval(msg, ret):
"helper to check that evaluation of expressions is done correctly"
- print(x)
+ print(msg)
return ret
# the next line is not allowed anymore
@@ -1018,9 +1025,103 @@ class GrammarTests(unittest.TestCase):
self.assertFalse((False is 2) is 3)
self.assertFalse(False is 2 is 3)
+ def test_matrix_mul(self):
+ # This is not intended to be a comprehensive test, rather just to be few
+ # samples of the @ operator in test_grammar.py.
+ class M:
+ def __matmul__(self, o):
+ return 4
+ def __imatmul__(self, o):
+ self.other = o
+ return self
+ m = M()
+ self.assertEqual(m @ m, 4)
+ m @= 42
+ self.assertEqual(m.other, 42)
+
+ def test_async_await(self):
+ async = 1
+ await = 2
+ self.assertEqual(async, 1)
+
+ def async():
+ nonlocal await
+ await = 10
+ async()
+ self.assertEqual(await, 10)
+
+ self.assertFalse(bool(async.__code__.co_flags & inspect.CO_COROUTINE))
+
+ async def test():
+ def sum():
+ pass
+ if 1:
+ await someobj()
+
+ self.assertEqual(test.__name__, 'test')
+ self.assertTrue(bool(test.__code__.co_flags & inspect.CO_COROUTINE))
+
+ def decorator(func):
+ setattr(func, '_marked', True)
+ return func
+
+ @decorator
+ async def test2():
+ return 22
+ self.assertTrue(test2._marked)
+ self.assertEqual(test2.__name__, 'test2')
+ self.assertTrue(bool(test2.__code__.co_flags & inspect.CO_COROUTINE))
+
+ def test_async_for(self):
+ class Done(Exception): pass
+
+ class AIter:
+ def __aiter__(self):
+ return self
+ async def __anext__(self):
+ raise StopAsyncIteration
+
+ async def foo():
+ async for i in AIter():
+ pass
+ async for i, j in AIter():
+ pass
+ async for i in AIter():
+ pass
+ else:
+ pass
+ raise Done
+
+ with self.assertRaises(Done):
+ foo().send(None)
+
+ def test_async_with(self):
+ class Done(Exception): pass
+
+ class manager:
+ async def __aenter__(self):
+ return (1, 2)
+ async def __aexit__(self, *exc):
+ return False
+
+ async def foo():
+ async with manager():
+ pass
+ async with manager() as x:
+ pass
+ async with manager() as (x, y):
+ pass
+ async with manager(), manager():
+ pass
+ async with manager() as x, manager() as y:
+ pass
+ async with manager() as x, manager():
+ pass
+ raise Done
+
+ with self.assertRaises(Done):
+ foo().send(None)
-def test_main():
- run_unittest(TokenTests, GrammarTests)
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_grp.py b/Lib/test/test_grp.py
index 749041c281..272b08615d 100644
--- a/Lib/test/test_grp.py
+++ b/Lib/test/test_grp.py
@@ -92,8 +92,5 @@ class GroupDatabaseTestCase(unittest.TestCase):
self.assertRaises(KeyError, grp.getgrgid, fakegid)
-def test_main():
- support.run_unittest(GroupDatabaseTestCase)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_gzip.py b/Lib/test/test_gzip.py
index b417044bcb..3c51673a92 100644
--- a/Lib/test/test_gzip.py
+++ b/Lib/test/test_gzip.py
@@ -3,9 +3,11 @@
import unittest
from test import support
+from test.support import bigmemtest, _4G
import os
import io
import struct
+import array
gzip = support.import_module('gzip')
data1 = b""" int length=DEFAULTALLOC, err = Z_OK;
@@ -77,15 +79,18 @@ class TestGzip(BaseTest):
def test_write_bytearray(self):
self.write_and_read_back(bytearray(data1 * 50))
+ def test_write_array(self):
+ self.write_and_read_back(array.array('I', data1 * 40))
+
def test_write_incompatible_type(self):
# Test that non-bytes-like types raise TypeError.
# Issue #21560: attempts to write incompatible types
# should not affect the state of the fileobject
with gzip.GzipFile(self.filename, 'wb') as f:
with self.assertRaises(TypeError):
- f.write('a')
+ f.write('')
with self.assertRaises(TypeError):
- f.write([1])
+ f.write([])
f.write(data1)
with gzip.GzipFile(self.filename, 'rb') as f:
self.assertEqual(f.read(), data1)
@@ -112,6 +117,14 @@ class TestGzip(BaseTest):
self.assertEqual(f.tell(), nread)
self.assertEqual(b''.join(blocks), data1 * 50)
+ @bigmemtest(size=_4G, memuse=1)
+ def test_read_large(self, size):
+ # Read chunk size over UINT_MAX should be supported, despite zlib's
+ # limitation per low-level call
+ compressed = gzip.compress(data1, compresslevel=1)
+ f = gzip.GzipFile(fileobj=io.BytesIO(compressed), mode='rb')
+ self.assertEqual(f.read(size), data1)
+
def test_io_on_closed_object(self):
# Test that I/O operations on closed GzipFile objects raise a
# ValueError, just like the corresponding functions on file objects.
@@ -119,7 +132,10 @@ class TestGzip(BaseTest):
# Write to a file, open it for reading, then close it.
self.test_write()
f = gzip.GzipFile(self.filename, 'r')
+ fileobj = f.fileobj
+ self.assertFalse(fileobj.closed)
f.close()
+ self.assertTrue(fileobj.closed)
with self.assertRaises(ValueError):
f.read(1)
with self.assertRaises(ValueError):
@@ -128,7 +144,10 @@ class TestGzip(BaseTest):
f.tell()
# Open the file for writing, then close it.
f = gzip.GzipFile(self.filename, 'w')
+ fileobj = f.fileobj
+ self.assertFalse(fileobj.closed)
f.close()
+ self.assertTrue(fileobj.closed)
with self.assertRaises(ValueError):
f.write(b'')
with self.assertRaises(ValueError):
@@ -267,9 +286,10 @@ class TestGzip(BaseTest):
with gzip.GzipFile(self.filename, 'w', mtime = mtime) as fWrite:
fWrite.write(data1)
with gzip.GzipFile(self.filename) as fRead:
+ self.assertTrue(hasattr(fRead, 'mtime'))
+ self.assertIsNone(fRead.mtime)
dataRead = fRead.read()
self.assertEqual(dataRead, data1)
- self.assertTrue(hasattr(fRead, 'mtime'))
self.assertEqual(fRead.mtime, mtime)
def test_metadata(self):
@@ -412,6 +432,18 @@ class TestGzip(BaseTest):
with gzip.GzipFile(str_filename, "rb") as f:
self.assertEqual(f.read(), data1 * 50)
+ def test_decompress_limited(self):
+ """Decompressed data buffering should be limited"""
+ bomb = gzip.compress(bytes(int(2e6)), compresslevel=9)
+ self.assertLess(len(bomb), io.DEFAULT_BUFFER_SIZE)
+
+ bomb = io.BytesIO(bomb)
+ decomp = gzip.GzipFile(fileobj=bomb)
+ self.assertEqual(bytes(1), decomp.read(1))
+ max_decomp = 1 + io.DEFAULT_BUFFER_SIZE
+ self.assertLessEqual(decomp._buffer.raw.tell(), max_decomp,
+ "Excessive amount of data was decompressed")
+
# Testing compress/decompress shortcut functions
def test_compress(self):
@@ -459,7 +491,7 @@ class TestGzip(BaseTest):
with gzip.open(self.filename, "wb") as f:
f.write(data1)
with gzip.open(self.filename, "rb") as f:
- f.fileobj.prepend()
+ f._buffer.raw._fp.prepend()
class TestOpen(BaseTest):
def test_binary_modes(self):
diff --git a/Lib/test/test_hash.py b/Lib/test/test_hash.py
index f647c6f7d2..aa4efbfd85 100644
--- a/Lib/test/test_hash.py
+++ b/Lib/test/test_hash.py
@@ -7,7 +7,7 @@ import datetime
import os
import sys
import unittest
-from test.script_helper import assert_python_ok
+from test.support.script_helper import assert_python_ok
from collections import Hashable
IS_64BIT = sys.maxsize > 2**32
diff --git a/Lib/test/test_hashlib.py b/Lib/test/test_hashlib.py
index 85ec2f96db..c9b113e6ef 100644
--- a/Lib/test/test_hashlib.py
+++ b/Lib/test/test_hashlib.py
@@ -449,7 +449,7 @@ class KDFTests(unittest.TestCase):
pbkdf2_results = {
"sha1": [
- # offical test vectors from RFC 6070
+ # official test vectors from RFC 6070
(bytes.fromhex('0c60c80f961f0e71f3a9b524af6012062fe037a6'), None),
(bytes.fromhex('ea6c014dc72d6f8ccd1ed92ace1d41f0d8de8957'), None),
(bytes.fromhex('4b007901b765489abead49d926f721d065a429c1'), None),
@@ -513,6 +513,9 @@ class KDFTests(unittest.TestCase):
self.assertRaises(ValueError, pbkdf2, 'sha1', b'pass', b'salt', 1, -1)
with self.assertRaisesRegex(ValueError, 'unsupported hash type'):
pbkdf2('unknown', b'pass', b'salt', 1)
+ out = pbkdf2(hash_name='sha1', password=b'password', salt=b'salt',
+ iterations=1, dklen=None)
+ self.assertEqual(out, self.pbkdf2_results['sha1'][0][0])
def test_pbkdf2_hmac_py(self):
self._test_pbkdf2_hmac(py_hashlib.pbkdf2_hmac)
diff --git a/Lib/test/test_heapq.py b/Lib/test/test_heapq.py
index b5a2fd803a..b7e8259f8d 100644
--- a/Lib/test/test_heapq.py
+++ b/Lib/test/test_heapq.py
@@ -6,14 +6,15 @@ import unittest
from test import support
from unittest import TestCase, skipUnless
+from operator import itemgetter
py_heapq = support.import_fresh_module('heapq', blocked=['_heapq'])
c_heapq = support.import_fresh_module('heapq', fresh=['_heapq'])
# _heapq.nlargest/nsmallest are saved in heapq._nlargest/_smallest when
# _heapq is imported, so check them there
-func_names = ['heapify', 'heappop', 'heappush', 'heappushpop',
- 'heapreplace', '_nlargest', '_nsmallest']
+func_names = ['heapify', 'heappop', 'heappush', 'heappushpop', 'heapreplace',
+ '_heappop_max', '_heapreplace_max', '_heapify_max']
class TestModules(TestCase):
def test_py_functions(self):
@@ -64,7 +65,7 @@ class TestHeap:
self.assertTrue(heap[parentpos] <= item)
def test_heapify(self):
- for size in range(30):
+ for size in list(range(30)) + [20000]:
heap = [random.random() for dummy in range(size)]
self.module.heapify(heap)
self.check_invariant(heap)
@@ -152,11 +153,21 @@ class TestHeap:
def test_merge(self):
inputs = []
- for i in range(random.randrange(5)):
- row = sorted(random.randrange(1000) for j in range(random.randrange(10)))
+ for i in range(random.randrange(25)):
+ row = []
+ for j in range(random.randrange(100)):
+ tup = random.choice('ABC'), random.randrange(-500, 500)
+ row.append(tup)
inputs.append(row)
- self.assertEqual(sorted(chain(*inputs)), list(self.module.merge(*inputs)))
- self.assertEqual(list(self.module.merge()), [])
+
+ for key in [None, itemgetter(0), itemgetter(1), itemgetter(1, 0)]:
+ for reverse in [False, True]:
+ seqs = []
+ for seq in inputs:
+ seqs.append(sorted(seq, key=key, reverse=reverse))
+ self.assertEqual(sorted(chain(*inputs), key=key, reverse=reverse),
+ list(self.module.merge(*seqs, key=key, reverse=reverse)))
+ self.assertEqual(list(self.module.merge()), [])
def test_merge_does_not_suppress_index_error(self):
# Issue 19018: Heapq.merge suppresses IndexError from user generator
diff --git a/Lib/test/test_hmac.py b/Lib/test/test_hmac.py
index cde56fd76f..98826b5a60 100644
--- a/Lib/test/test_hmac.py
+++ b/Lib/test/test_hmac.py
@@ -493,14 +493,5 @@ class CompareDigestTestCase(unittest.TestCase):
self.assertFalse(hmac.compare_digest(a, b))
-def test_main():
- support.run_unittest(
- TestVectorsTestCase,
- ConstructorTestCase,
- SanityTestCase,
- CopyTestCase,
- CompareDigestTestCase
- )
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_html.py b/Lib/test/test_html.py
index d6f0ae857d..839e0a47a8 100644
--- a/Lib/test/test_html.py
+++ b/Lib/test/test_html.py
@@ -4,7 +4,6 @@ Tests for the html module functions.
import html
import unittest
-from test.support import run_unittest
class HtmlTests(unittest.TestCase):
diff --git a/Lib/test/test_htmlparser.py b/Lib/test/test_htmlparser.py
index 144f820af2..11420b2c84 100644
--- a/Lib/test/test_htmlparser.py
+++ b/Lib/test/test_htmlparser.py
@@ -82,7 +82,7 @@ class EventCollectorCharrefs(EventCollector):
class TestCaseBase(unittest.TestCase):
def get_collector(self):
- raise NotImplementedError
+ return EventCollector(convert_charrefs=False)
def _run_check(self, source, expected_events, collector=None):
if collector is None:
@@ -102,21 +102,8 @@ class TestCaseBase(unittest.TestCase):
self._run_check(source, events,
EventCollectorExtra(convert_charrefs=False))
- def _parse_error(self, source):
- def parse(source=source):
- parser = self.get_collector()
- parser.feed(source)
- parser.close()
- with self.assertRaises(html.parser.HTMLParseError):
- with self.assertWarns(DeprecationWarning):
- parse()
-
-class HTMLParserStrictTestCase(TestCaseBase):
-
- def get_collector(self):
- with support.check_warnings(("", DeprecationWarning), quite=False):
- return EventCollector(strict=True, convert_charrefs=False)
+class HTMLParserTestCase(TestCaseBase):
def test_processing_instruction_only(self):
self._run_check("<?processing instruction>", [
@@ -198,9 +185,6 @@ text
("data", "this < text > contains < bare>pointy< brackets"),
])
- def test_illegal_declarations(self):
- self._parse_error('<!spacer type="block" height="25">')
-
def test_starttag_end_boundary(self):
self._run_check("""<a b='<'>""", [("starttag", "a", [("b", "<")])])
self._run_check("""<a b='>'>""", [("starttag", "a", [("b", ">")])])
@@ -235,25 +219,6 @@ text
self._run_check(["<!--abc--", ">"], output)
self._run_check(["<!--abc-->", ""], output)
- def test_starttag_junk_chars(self):
- self._parse_error("</>")
- self._parse_error("</$>")
- self._parse_error("</")
- self._parse_error("</a")
- self._parse_error("<a<a>")
- self._parse_error("</a<a>")
- self._parse_error("<!")
- self._parse_error("<a")
- self._parse_error("<a foo='bar'")
- self._parse_error("<a foo='bar")
- self._parse_error("<a foo='>'")
- self._parse_error("<a foo='>")
- self._parse_error("<a$>")
- self._parse_error("<a$b>")
- self._parse_error("<a$b/>")
- self._parse_error("<a$b >")
- self._parse_error("<a$b />")
-
def test_valid_doctypes(self):
# from http://www.w3.org/QA/2002/04/valid-dtd-list.html
dtds = ['HTML', # HTML5 doctype
@@ -278,9 +243,6 @@ text
self._run_check("<!DOCTYPE %s>" % dtd,
[('decl', 'DOCTYPE ' + dtd)])
- def test_declaration_junk_chars(self):
- self._parse_error("<!DOCTYPE foo $ >")
-
def test_startendtag(self):
self._run_check("<p/>", [
("startendtag", "p", []),
@@ -381,7 +343,8 @@ text
self._run_check(html, expected)
def test_convert_charrefs(self):
- collector = lambda: EventCollectorCharrefs(convert_charrefs=True)
+ # default value for convert_charrefs is now True
+ collector = lambda: EventCollectorCharrefs()
self.assertTrue(collector().convert_charrefs)
charrefs = ['&quot;', '&#34;', '&#x22;', '&quot', '&#34', '&#x22']
# check charrefs in the middle of the text/attributes
@@ -418,23 +381,8 @@ text
self._run_check('no charrefs here', [('data', 'no charrefs here')],
collector=collector())
-
-class HTMLParserTolerantTestCase(HTMLParserStrictTestCase):
-
- def get_collector(self):
- return EventCollector(convert_charrefs=False)
-
- def test_deprecation_warnings(self):
- with self.assertWarns(DeprecationWarning):
- EventCollector() # convert_charrefs not passed explicitly
- with self.assertWarns(DeprecationWarning):
- EventCollector(strict=True)
- with self.assertWarns(DeprecationWarning):
- EventCollector(strict=False)
- with self.assertRaises(html.parser.HTMLParseError):
- with self.assertWarns(DeprecationWarning):
- EventCollector().error('test')
-
+ # the remaining tests were for the "tolerant" parser (which is now
+ # the default), and check various kind of broken markup
def test_tolerant_parsing(self):
self._run_check('<html <html>te>>xt&a<<bc</a></html>\n'
'<img src="URL><//img></html</html>', [
@@ -695,11 +643,7 @@ class HTMLParserTolerantTestCase(HTMLParserStrictTestCase):
)
-class AttributesStrictTestCase(TestCaseBase):
-
- def get_collector(self):
- with support.check_warnings(("", DeprecationWarning), quite=False):
- return EventCollector(strict=True, convert_charrefs=False)
+class AttributesTestCase(TestCaseBase):
def test_attr_syntax(self):
output = [
@@ -756,12 +700,6 @@ class AttributesStrictTestCase(TestCaseBase):
[("starttag", "html", [("foo", "\u20AC&aa&unsupported;")])])
-
-class AttributesTolerantTestCase(AttributesStrictTestCase):
-
- def get_collector(self):
- return EventCollector(convert_charrefs=False)
-
def test_attr_funky_names2(self):
self._run_check(
"<a $><b $=%><c \=/>",
diff --git a/Lib/test/test_http_cookiejar.py b/Lib/test/test_http_cookiejar.py
index 50260ffe5c..585838bd6c 100644
--- a/Lib/test/test_http_cookiejar.py
+++ b/Lib/test/test_http_cookiejar.py
@@ -91,6 +91,10 @@ class DateTimeTests(unittest.TestCase):
'01-01-1980 25:00:00',
'01-01-1980 00:61:00',
'01-01-1980 00:00:62',
+ '08-Oct-3697739',
+ '08-01-3697739',
+ '09 Feb 19942632 22:23:32 GMT',
+ 'Wed, 09 Feb 1994834 22:23:32 GMT',
]:
self.assertIsNone(http2time(test),
"http2time(%s) is not None\n"
@@ -1725,7 +1729,7 @@ class LWPCookieTests(unittest.TestCase):
key = "%s_after" % cookie.value
counter[key] = counter[key] + 1
- # a permanent cookie got lost accidently
+ # a permanent cookie got lost accidentally
self.assertEqual(counter["perm_after"], counter["perm_before"])
# a session cookie hasn't been cleared
self.assertEqual(counter["session_after"], 0)
diff --git a/Lib/test/test_http_cookies.py b/Lib/test/test_http_cookies.py
index c7b680b10f..2432e0bf53 100644
--- a/Lib/test/test_http_cookies.py
+++ b/Lib/test/test_http_cookies.py
@@ -1,5 +1,6 @@
# Simple test suite for http/cookies.py
+import copy
from test.support import run_unittest, run_doctest, check_warnings
import unittest
from http import cookies
@@ -154,13 +155,6 @@ class CookieTests(unittest.TestCase):
self.assertEqual(C['eggs']['httponly'], 'foo')
self.assertEqual(C['eggs']['secure'], 'bar')
- def test_bad_attrs(self):
- # issue 16611: make sure we don't break backward compatibility.
- C = cookies.SimpleCookie()
- C.load('cookie=with; invalid; version; second=cookie;')
- self.assertEqual(C.output(),
- 'Set-Cookie: cookie=with\r\nSet-Cookie: second=cookie')
-
def test_extra_spaces(self):
C = cookies.SimpleCookie()
C.load('eggs = scrambled ; secure ; path = bar ; foo=foo ')
@@ -195,7 +189,10 @@ class CookieTests(unittest.TestCase):
def test_invalid_cookies(self):
# Accepting these could be a security issue
C = cookies.SimpleCookie()
- for s in (']foo=x', '[foo=x', 'blah]foo=x', 'blah[foo=x'):
+ for s in (']foo=x', '[foo=x', 'blah]foo=x', 'blah[foo=x',
+ 'Set-Cookie: foo=bar', 'Set-Cookie: foo',
+ 'foo=bar; baz', 'baz; foo=bar',
+ 'secure;foo=bar', 'Version=1;foo=bar'):
C.load(s)
self.assertEqual(dict(C), {})
self.assertEqual(C.output(), '')
@@ -213,10 +210,25 @@ class CookieTests(unittest.TestCase):
C1 = pickle.loads(pickle.dumps(C, protocol=proto))
self.assertEqual(C1.output(), expected_output)
+ def test_illegal_chars(self):
+ rawdata = "a=b; c,d=e"
+ C = cookies.SimpleCookie()
+ with self.assertRaises(cookies.CookieError):
+ C.load(rawdata)
+
class MorselTests(unittest.TestCase):
"""Tests for the Morsel object."""
+ def test_defaults(self):
+ morsel = cookies.Morsel()
+ self.assertIsNone(morsel.key)
+ self.assertIsNone(morsel.value)
+ self.assertIsNone(morsel.coded_value)
+ self.assertEqual(morsel.keys(), cookies.Morsel._reserved.keys())
+ for key, val in morsel.items():
+ self.assertEqual(val, '', key)
+
def test_reserved_keys(self):
M = cookies.Morsel()
# tests valid and invalid reserved keys for Morsels
@@ -260,6 +272,197 @@ class MorselTests(unittest.TestCase):
self.assertRaises(cookies.CookieError,
M.set, i, '%s_value' % i, '%s_value' % i)
+ def test_deprecation(self):
+ morsel = cookies.Morsel()
+ with self.assertWarnsRegex(DeprecationWarning, r'\bkey\b'):
+ morsel.key = ''
+ with self.assertWarnsRegex(DeprecationWarning, r'\bvalue\b'):
+ morsel.value = ''
+ with self.assertWarnsRegex(DeprecationWarning, r'\bcoded_value\b'):
+ morsel.coded_value = ''
+ with self.assertWarnsRegex(DeprecationWarning, r'\bLegalChars\b'):
+ morsel.set('key', 'value', 'coded_value', LegalChars='.*')
+
+ def test_eq(self):
+ base_case = ('key', 'value', '"value"')
+ attribs = {
+ 'path': '/',
+ 'comment': 'foo',
+ 'domain': 'example.com',
+ 'version': 2,
+ }
+ morsel_a = cookies.Morsel()
+ morsel_a.update(attribs)
+ morsel_a.set(*base_case)
+ morsel_b = cookies.Morsel()
+ morsel_b.update(attribs)
+ morsel_b.set(*base_case)
+ self.assertTrue(morsel_a == morsel_b)
+ self.assertFalse(morsel_a != morsel_b)
+ cases = (
+ ('key', 'value', 'mismatch'),
+ ('key', 'mismatch', '"value"'),
+ ('mismatch', 'value', '"value"'),
+ )
+ for case_b in cases:
+ with self.subTest(case_b):
+ morsel_b = cookies.Morsel()
+ morsel_b.update(attribs)
+ morsel_b.set(*case_b)
+ self.assertFalse(morsel_a == morsel_b)
+ self.assertTrue(morsel_a != morsel_b)
+
+ morsel_b = cookies.Morsel()
+ morsel_b.update(attribs)
+ morsel_b.set(*base_case)
+ morsel_b['comment'] = 'bar'
+ self.assertFalse(morsel_a == morsel_b)
+ self.assertTrue(morsel_a != morsel_b)
+
+ # test mismatched types
+ self.assertFalse(cookies.Morsel() == 1)
+ self.assertTrue(cookies.Morsel() != 1)
+ self.assertFalse(cookies.Morsel() == '')
+ self.assertTrue(cookies.Morsel() != '')
+ items = list(cookies.Morsel().items())
+ self.assertFalse(cookies.Morsel() == items)
+ self.assertTrue(cookies.Morsel() != items)
+
+ # morsel/dict
+ morsel = cookies.Morsel()
+ morsel.set(*base_case)
+ morsel.update(attribs)
+ self.assertTrue(morsel == dict(morsel))
+ self.assertFalse(morsel != dict(morsel))
+
+ def test_copy(self):
+ morsel_a = cookies.Morsel()
+ morsel_a.set('foo', 'bar', 'baz')
+ morsel_a.update({
+ 'version': 2,
+ 'comment': 'foo',
+ })
+ morsel_b = morsel_a.copy()
+ self.assertIsInstance(morsel_b, cookies.Morsel)
+ self.assertIsNot(morsel_a, morsel_b)
+ self.assertEqual(morsel_a, morsel_b)
+
+ morsel_b = copy.copy(morsel_a)
+ self.assertIsInstance(morsel_b, cookies.Morsel)
+ self.assertIsNot(morsel_a, morsel_b)
+ self.assertEqual(morsel_a, morsel_b)
+
+ def test_setitem(self):
+ morsel = cookies.Morsel()
+ morsel['expires'] = 0
+ self.assertEqual(morsel['expires'], 0)
+ morsel['Version'] = 2
+ self.assertEqual(morsel['version'], 2)
+ morsel['DOMAIN'] = 'example.com'
+ self.assertEqual(morsel['domain'], 'example.com')
+
+ with self.assertRaises(cookies.CookieError):
+ morsel['invalid'] = 'value'
+ self.assertNotIn('invalid', morsel)
+
+ def test_setdefault(self):
+ morsel = cookies.Morsel()
+ morsel.update({
+ 'domain': 'example.com',
+ 'version': 2,
+ })
+ # this shouldn't override the default value
+ self.assertEqual(morsel.setdefault('expires', 'value'), '')
+ self.assertEqual(morsel['expires'], '')
+ self.assertEqual(morsel.setdefault('Version', 1), 2)
+ self.assertEqual(morsel['version'], 2)
+ self.assertEqual(morsel.setdefault('DOMAIN', 'value'), 'example.com')
+ self.assertEqual(morsel['domain'], 'example.com')
+
+ with self.assertRaises(cookies.CookieError):
+ morsel.setdefault('invalid', 'value')
+ self.assertNotIn('invalid', morsel)
+
+ def test_update(self):
+ attribs = {'expires': 1, 'Version': 2, 'DOMAIN': 'example.com'}
+ # test dict update
+ morsel = cookies.Morsel()
+ morsel.update(attribs)
+ self.assertEqual(morsel['expires'], 1)
+ self.assertEqual(morsel['version'], 2)
+ self.assertEqual(morsel['domain'], 'example.com')
+ # test iterable update
+ morsel = cookies.Morsel()
+ morsel.update(list(attribs.items()))
+ self.assertEqual(morsel['expires'], 1)
+ self.assertEqual(morsel['version'], 2)
+ self.assertEqual(morsel['domain'], 'example.com')
+ # test iterator update
+ morsel = cookies.Morsel()
+ morsel.update((k, v) for k, v in attribs.items())
+ self.assertEqual(morsel['expires'], 1)
+ self.assertEqual(morsel['version'], 2)
+ self.assertEqual(morsel['domain'], 'example.com')
+
+ with self.assertRaises(cookies.CookieError):
+ morsel.update({'invalid': 'value'})
+ self.assertNotIn('invalid', morsel)
+ self.assertRaises(TypeError, morsel.update)
+ self.assertRaises(TypeError, morsel.update, 0)
+
+ def test_pickle(self):
+ morsel_a = cookies.Morsel()
+ morsel_a.set('foo', 'bar', 'baz')
+ morsel_a.update({
+ 'version': 2,
+ 'comment': 'foo',
+ })
+ for proto in range(pickle.HIGHEST_PROTOCOL + 1):
+ with self.subTest(proto=proto):
+ morsel_b = pickle.loads(pickle.dumps(morsel_a, proto))
+ self.assertIsInstance(morsel_b, cookies.Morsel)
+ self.assertEqual(morsel_b, morsel_a)
+ self.assertEqual(str(morsel_b), str(morsel_a))
+
+ def test_repr(self):
+ morsel = cookies.Morsel()
+ self.assertEqual(repr(morsel), '<Morsel: None=None>')
+ self.assertEqual(str(morsel), 'Set-Cookie: None=None')
+ morsel.set('key', 'val', 'coded_val')
+ self.assertEqual(repr(morsel), '<Morsel: key=coded_val>')
+ self.assertEqual(str(morsel), 'Set-Cookie: key=coded_val')
+ morsel.update({
+ 'path': '/',
+ 'comment': 'foo',
+ 'domain': 'example.com',
+ 'max-age': 0,
+ 'secure': 0,
+ 'version': 1,
+ })
+ self.assertEqual(repr(morsel),
+ '<Morsel: key=coded_val; Comment=foo; Domain=example.com; '
+ 'Max-Age=0; Path=/; Version=1>')
+ self.assertEqual(str(morsel),
+ 'Set-Cookie: key=coded_val; Comment=foo; Domain=example.com; '
+ 'Max-Age=0; Path=/; Version=1')
+ morsel['secure'] = True
+ morsel['httponly'] = 1
+ self.assertEqual(repr(morsel),
+ '<Morsel: key=coded_val; Comment=foo; Domain=example.com; '
+ 'HttpOnly; Max-Age=0; Path=/; Secure; Version=1>')
+ self.assertEqual(str(morsel),
+ 'Set-Cookie: key=coded_val; Comment=foo; Domain=example.com; '
+ 'HttpOnly; Max-Age=0; Path=/; Secure; Version=1')
+
+ morsel = cookies.Morsel()
+ morsel.set('key', 'val', 'coded_val')
+ morsel['expires'] = 0
+ self.assertRegex(repr(morsel),
+ r'<Morsel: key=coded_val; '
+ r'expires=\w+, \d+ \w+ \d+ \d+:\d+:\d+ \w+>')
+ self.assertRegex(str(morsel),
+ r'Set-Cookie: key=coded_val; '
+ r'expires=\w+, \d+ \w+ \d+ \d+:\d+:\d+ \w+')
def test_main():
run_unittest(CookieTests, MorselTests)
diff --git a/Lib/test/test_httplib.py b/Lib/test/test_httplib.py
index df9a9e3cbd..329f0685fc 100644
--- a/Lib/test/test_httplib.py
+++ b/Lib/test/test_httplib.py
@@ -19,6 +19,26 @@ CERT_fakehostname = os.path.join(here, 'keycert2.pem')
# Self-signed cert file for self-signed.pythontest.net
CERT_selfsigned_pythontestdotnet = os.path.join(here, 'selfsigned_pythontestdotnet.pem')
+# constants for testing chunked encoding
+chunked_start = (
+ 'HTTP/1.1 200 OK\r\n'
+ 'Transfer-Encoding: chunked\r\n\r\n'
+ 'a\r\n'
+ 'hello worl\r\n'
+ '3\r\n'
+ 'd! \r\n'
+ '8\r\n'
+ 'and now \r\n'
+ '22\r\n'
+ 'for something completely different\r\n'
+)
+chunked_expected = b'hello world! and now for something completely different'
+chunk_extension = ";foo=bar"
+last_chunk = "0\r\n"
+last_chunk_extended = "0" + chunk_extension + "\r\n"
+trailers = "X-Dummy: foo\r\nX-Dumm2: bar\r\n"
+chunked_end = "\r\n"
+
HOST = support.HOST
class FakeSocket:
@@ -51,6 +71,9 @@ class FakeSocket:
def close(self):
pass
+ def setsockopt(self, level, optname, value):
+ pass
+
class EPipeSocket(FakeSocket):
def __init__(self, text, pipe_trigger):
@@ -84,6 +107,23 @@ class NoEOFBytesIO(io.BytesIO):
raise AssertionError('caller tried to read past EOF')
return data
+class FakeSocketHTTPConnection(client.HTTPConnection):
+ """HTTPConnection subclass using FakeSocket; counts connect() calls"""
+
+ def __init__(self, *args):
+ self.connections = 0
+ super().__init__('example.com')
+ self.fake_socket_args = args
+ self._create_connection = self.create_connection
+
+ def connect(self):
+ """Count the number of times connect() is invoked"""
+ self.connections += 1
+ return super().connect()
+
+ def create_connection(self, *pos, **kw):
+ return FakeSocket(*self.fake_socket_args)
+
class HeaderTests(TestCase):
def test_auto_headers(self):
# Some headers are added automatically, but should not be added by
@@ -215,8 +255,8 @@ class HeaderTests(TestCase):
self.assertIn(b'\xa0NonbreakSpace: value', conn._buffer)
def test_ipv6host_header(self):
- # Default host header on IPv6 transaction should wrapped by [] if
- # its actual IPv6 address
+ # Default host header on IPv6 transaction should be wrapped by [] if
+ # it is an IPv6 address
expected = b'GET /foo HTTP/1.1\r\nHost: [2001::]:81\r\n' \
b'Accept-Encoding: identity\r\n\r\n'
conn = client.HTTPConnection('[2001::]:81')
@@ -301,8 +341,8 @@ class BasicTest(TestCase):
self.assertEqual(repr(exc), '''BadStatusLine("\'\'",)''')
def test_partial_reads(self):
- # if we have a length, the system knows when to close itself
- # same behaviour than when we read the whole thing with read()
+ # if we have Content-Length, HTTPResponse knows when to close itself,
+ # the same behaviour as when we read the whole thing with read()
body = "HTTP/1.1 200 Ok\r\nContent-Length: 4\r\n\r\nText"
sock = FakeSocket(body)
resp = client.HTTPResponse(sock)
@@ -315,9 +355,24 @@ class BasicTest(TestCase):
resp.close()
self.assertTrue(resp.closed)
+ def test_mixed_reads(self):
+ # readline() should update the remaining length, so that read() knows
+ # how much data is left and does not raise IncompleteRead
+ body = "HTTP/1.1 200 Ok\r\nContent-Length: 13\r\n\r\nText\r\nAnother"
+ sock = FakeSocket(body)
+ resp = client.HTTPResponse(sock)
+ resp.begin()
+ self.assertEqual(resp.readline(), b'Text\r\n')
+ self.assertFalse(resp.isclosed())
+ self.assertEqual(resp.read(), b'Another')
+ self.assertTrue(resp.isclosed())
+ self.assertFalse(resp.closed)
+ resp.close()
+ self.assertTrue(resp.closed)
+
def test_partial_readintos(self):
- # if we have a length, the system knows when to close itself
- # same behaviour than when we read the whole thing with read()
+ # if we have Content-Length, HTTPResponse knows when to close itself,
+ # the same behaviour as when we read the whole thing with read()
body = "HTTP/1.1 200 Ok\r\nContent-Length: 4\r\n\r\nText"
sock = FakeSocket(body)
resp = client.HTTPResponse(sock)
@@ -548,20 +603,8 @@ class BasicTest(TestCase):
conn.request('POST', 'test', conn)
def test_chunked(self):
- chunked_start = (
- 'HTTP/1.1 200 OK\r\n'
- 'Transfer-Encoding: chunked\r\n\r\n'
- 'a\r\n'
- 'hello worl\r\n'
- '3\r\n'
- 'd! \r\n'
- '8\r\n'
- 'and now \r\n'
- '22\r\n'
- 'for something completely different\r\n'
- )
- expected = b'hello world! and now for something completely different'
- sock = FakeSocket(chunked_start + '0\r\n')
+ expected = chunked_expected
+ sock = FakeSocket(chunked_start + last_chunk + chunked_end)
resp = client.HTTPResponse(sock, method="GET")
resp.begin()
self.assertEqual(resp.read(), expected)
@@ -569,7 +612,7 @@ class BasicTest(TestCase):
# Various read sizes
for n in range(1, 12):
- sock = FakeSocket(chunked_start + '0\r\n')
+ sock = FakeSocket(chunked_start + last_chunk + chunked_end)
resp = client.HTTPResponse(sock, method="GET")
resp.begin()
self.assertEqual(resp.read(n) + resp.read(n) + resp.read(), expected)
@@ -592,23 +635,12 @@ class BasicTest(TestCase):
resp.close()
def test_readinto_chunked(self):
- chunked_start = (
- 'HTTP/1.1 200 OK\r\n'
- 'Transfer-Encoding: chunked\r\n\r\n'
- 'a\r\n'
- 'hello worl\r\n'
- '3\r\n'
- 'd! \r\n'
- '8\r\n'
- 'and now \r\n'
- '22\r\n'
- 'for something completely different\r\n'
- )
- expected = b'hello world! and now for something completely different'
+
+ expected = chunked_expected
nexpected = len(expected)
b = bytearray(128)
- sock = FakeSocket(chunked_start + '0\r\n')
+ sock = FakeSocket(chunked_start + last_chunk + chunked_end)
resp = client.HTTPResponse(sock, method="GET")
resp.begin()
n = resp.readinto(b)
@@ -618,7 +650,7 @@ class BasicTest(TestCase):
# Various read sizes
for n in range(1, 12):
- sock = FakeSocket(chunked_start + '0\r\n')
+ sock = FakeSocket(chunked_start + last_chunk + chunked_end)
resp = client.HTTPResponse(sock, method="GET")
resp.begin()
m = memoryview(b)
@@ -654,7 +686,7 @@ class BasicTest(TestCase):
'1\r\n'
'd\r\n'
)
- sock = FakeSocket(chunked_start + '0\r\n')
+ sock = FakeSocket(chunked_start + last_chunk + chunked_end)
resp = client.HTTPResponse(sock, method="HEAD")
resp.begin()
self.assertEqual(resp.read(), b'')
@@ -674,7 +706,7 @@ class BasicTest(TestCase):
'1\r\n'
'd\r\n'
)
- sock = FakeSocket(chunked_start + '0\r\n')
+ sock = FakeSocket(chunked_start + last_chunk + chunked_end)
resp = client.HTTPResponse(sock, method="HEAD")
resp.begin()
b = bytearray(5)
@@ -749,6 +781,7 @@ class BasicTest(TestCase):
+ '0' * 65536 + 'a\r\n'
'hello world\r\n'
'0\r\n'
+ '\r\n'
)
resp = client.HTTPResponse(FakeSocket(body))
resp.begin()
@@ -766,28 +799,6 @@ class BasicTest(TestCase):
resp.close()
self.assertTrue(resp.closed)
- def test_delayed_ack_opt(self):
- # Test that Nagle/delayed_ack optimistaion works correctly.
-
- # For small payloads, it should coalesce the body with
- # headers, resulting in a single sendall() call
- conn = client.HTTPConnection('example.com')
- sock = FakeSocket(None)
- conn.sock = sock
- body = b'x' * (conn.mss - 1)
- conn.request('POST', '/', body)
- self.assertEqual(sock.sendall_calls, 1)
-
- # For large payloads, it should send the headers and
- # then the body, resulting in more than one sendall()
- # call
- conn = client.HTTPConnection('example.com')
- sock = FakeSocket(None)
- conn.sock = sock
- body = b'x' * conn.mss
- conn.request('POST', '/', body)
- self.assertGreater(sock.sendall_calls, 1)
-
def test_error_leak(self):
# Test that the socket is not leaked if getresponse() fails
conn = client.HTTPConnection('example.com')
@@ -798,12 +809,332 @@ class BasicTest(TestCase):
response = self # Avoid garbage collector closing the socket
client.HTTPResponse.__init__(self, *pos, **kw)
conn.response_class = Response
- conn.sock = FakeSocket('') # Emulate server dropping connection
+ conn.sock = FakeSocket('Invalid status line')
conn.request('GET', '/')
self.assertRaises(client.BadStatusLine, conn.getresponse)
self.assertTrue(response.closed)
self.assertTrue(conn.sock.file_closed)
+ def test_chunked_extension(self):
+ extra = '3;foo=bar\r\n' + 'abc\r\n'
+ expected = chunked_expected + b'abc'
+
+ sock = FakeSocket(chunked_start + extra + last_chunk_extended + chunked_end)
+ resp = client.HTTPResponse(sock, method="GET")
+ resp.begin()
+ self.assertEqual(resp.read(), expected)
+ resp.close()
+
+ def test_chunked_missing_end(self):
+ """some servers may serve up a short chunked encoding stream"""
+ expected = chunked_expected
+ sock = FakeSocket(chunked_start + last_chunk) #no terminating crlf
+ resp = client.HTTPResponse(sock, method="GET")
+ resp.begin()
+ self.assertEqual(resp.read(), expected)
+ resp.close()
+
+ def test_chunked_trailers(self):
+ """See that trailers are read and ignored"""
+ expected = chunked_expected
+ sock = FakeSocket(chunked_start + last_chunk + trailers + chunked_end)
+ resp = client.HTTPResponse(sock, method="GET")
+ resp.begin()
+ self.assertEqual(resp.read(), expected)
+ # we should have reached the end of the file
+ self.assertEqual(sock.file.read(), b"") #we read to the end
+ resp.close()
+
+ def test_chunked_sync(self):
+ """Check that we don't read past the end of the chunked-encoding stream"""
+ expected = chunked_expected
+ extradata = "extradata"
+ sock = FakeSocket(chunked_start + last_chunk + trailers + chunked_end + extradata)
+ resp = client.HTTPResponse(sock, method="GET")
+ resp.begin()
+ self.assertEqual(resp.read(), expected)
+ # the file should now have our extradata ready to be read
+ self.assertEqual(sock.file.read(), extradata.encode("ascii")) #we read to the end
+ resp.close()
+
+ def test_content_length_sync(self):
+ """Check that we don't read past the end of the Content-Length stream"""
+ extradata = b"extradata"
+ expected = b"Hello123\r\n"
+ sock = FakeSocket(b'HTTP/1.1 200 OK\r\nContent-Length: 10\r\n\r\n' + expected + extradata)
+ resp = client.HTTPResponse(sock, method="GET")
+ resp.begin()
+ self.assertEqual(resp.read(), expected)
+ # the file should now have our extradata ready to be read
+ self.assertEqual(sock.file.read(), extradata) #we read to the end
+ resp.close()
+
+ def test_readlines_content_length(self):
+ extradata = b"extradata"
+ expected = b"Hello123\r\n"
+ sock = FakeSocket(b'HTTP/1.1 200 OK\r\nContent-Length: 10\r\n\r\n' + expected + extradata)
+ resp = client.HTTPResponse(sock, method="GET")
+ resp.begin()
+ self.assertEqual(resp.readlines(2000), [expected])
+ # the file should now have our extradata ready to be read
+ self.assertEqual(sock.file.read(), extradata) #we read to the end
+ resp.close()
+
+ def test_read1_content_length(self):
+ extradata = b"extradata"
+ expected = b"Hello123\r\n"
+ sock = FakeSocket(b'HTTP/1.1 200 OK\r\nContent-Length: 10\r\n\r\n' + expected + extradata)
+ resp = client.HTTPResponse(sock, method="GET")
+ resp.begin()
+ self.assertEqual(resp.read1(2000), expected)
+ # the file should now have our extradata ready to be read
+ self.assertEqual(sock.file.read(), extradata) #we read to the end
+ resp.close()
+
+ def test_readline_bound_content_length(self):
+ extradata = b"extradata"
+ expected = b"Hello123\r\n"
+ sock = FakeSocket(b'HTTP/1.1 200 OK\r\nContent-Length: 10\r\n\r\n' + expected + extradata)
+ resp = client.HTTPResponse(sock, method="GET")
+ resp.begin()
+ self.assertEqual(resp.readline(10), expected)
+ self.assertEqual(resp.readline(10), b"")
+ # the file should now have our extradata ready to be read
+ self.assertEqual(sock.file.read(), extradata) #we read to the end
+ resp.close()
+
+ def test_read1_bound_content_length(self):
+ extradata = b"extradata"
+ expected = b"Hello123\r\n"
+ sock = FakeSocket(b'HTTP/1.1 200 OK\r\nContent-Length: 30\r\n\r\n' + expected*3 + extradata)
+ resp = client.HTTPResponse(sock, method="GET")
+ resp.begin()
+ self.assertEqual(resp.read1(20), expected*2)
+ self.assertEqual(resp.read(), expected)
+ # the file should now have our extradata ready to be read
+ self.assertEqual(sock.file.read(), extradata) #we read to the end
+ resp.close()
+
+ def test_response_fileno(self):
+ # Make sure fd returned by fileno is valid.
+ threading = support.import_module("threading")
+
+ serv = socket.socket(
+ socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP)
+ self.addCleanup(serv.close)
+ serv.bind((HOST, 0))
+ serv.listen()
+
+ result = None
+ def run_server():
+ [conn, address] = serv.accept()
+ with conn, conn.makefile("rb") as reader:
+ # Read the request header until a blank line
+ while True:
+ line = reader.readline()
+ if not line.rstrip(b"\r\n"):
+ break
+ conn.sendall(b"HTTP/1.1 200 Connection established\r\n\r\n")
+ nonlocal result
+ result = reader.read()
+
+ thread = threading.Thread(target=run_server)
+ thread.start()
+ conn = client.HTTPConnection(*serv.getsockname())
+ conn.request("CONNECT", "dummy:1234")
+ response = conn.getresponse()
+ try:
+ self.assertEqual(response.status, client.OK)
+ s = socket.socket(fileno=response.fileno())
+ try:
+ s.sendall(b"proxied data\n")
+ finally:
+ s.detach()
+ finally:
+ response.close()
+ conn.close()
+ thread.join()
+ self.assertEqual(result, b"proxied data\n")
+
+class ExtendedReadTest(TestCase):
+ """
+ Test peek(), read1(), readline()
+ """
+ lines = (
+ 'HTTP/1.1 200 OK\r\n'
+ '\r\n'
+ 'hello world!\n'
+ 'and now \n'
+ 'for something completely different\n'
+ 'foo'
+ )
+ lines_expected = lines[lines.find('hello'):].encode("ascii")
+ lines_chunked = (
+ 'HTTP/1.1 200 OK\r\n'
+ 'Transfer-Encoding: chunked\r\n\r\n'
+ 'a\r\n'
+ 'hello worl\r\n'
+ '3\r\n'
+ 'd!\n\r\n'
+ '9\r\n'
+ 'and now \n\r\n'
+ '23\r\n'
+ 'for something completely different\n\r\n'
+ '3\r\n'
+ 'foo\r\n'
+ '0\r\n' # terminating chunk
+ '\r\n' # end of trailers
+ )
+
+ def setUp(self):
+ sock = FakeSocket(self.lines)
+ resp = client.HTTPResponse(sock, method="GET")
+ resp.begin()
+ resp.fp = io.BufferedReader(resp.fp)
+ self.resp = resp
+
+
+
+ def test_peek(self):
+ resp = self.resp
+ # patch up the buffered peek so that it returns not too much stuff
+ oldpeek = resp.fp.peek
+ def mypeek(n=-1):
+ p = oldpeek(n)
+ if n >= 0:
+ return p[:n]
+ return p[:10]
+ resp.fp.peek = mypeek
+
+ all = []
+ while True:
+ # try a short peek
+ p = resp.peek(3)
+ if p:
+ self.assertGreater(len(p), 0)
+ # then unbounded peek
+ p2 = resp.peek()
+ self.assertGreaterEqual(len(p2), len(p))
+ self.assertTrue(p2.startswith(p))
+ next = resp.read(len(p2))
+ self.assertEqual(next, p2)
+ else:
+ next = resp.read()
+ self.assertFalse(next)
+ all.append(next)
+ if not next:
+ break
+ self.assertEqual(b"".join(all), self.lines_expected)
+
+ def test_readline(self):
+ resp = self.resp
+ self._verify_readline(self.resp.readline, self.lines_expected)
+
+ def _verify_readline(self, readline, expected):
+ all = []
+ while True:
+ # short readlines
+ line = readline(5)
+ if line and line != b"foo":
+ if len(line) < 5:
+ self.assertTrue(line.endswith(b"\n"))
+ all.append(line)
+ if not line:
+ break
+ self.assertEqual(b"".join(all), expected)
+
+ def test_read1(self):
+ resp = self.resp
+ def r():
+ res = resp.read1(4)
+ self.assertLessEqual(len(res), 4)
+ return res
+ readliner = Readliner(r)
+ self._verify_readline(readliner.readline, self.lines_expected)
+
+ def test_read1_unbounded(self):
+ resp = self.resp
+ all = []
+ while True:
+ data = resp.read1()
+ if not data:
+ break
+ all.append(data)
+ self.assertEqual(b"".join(all), self.lines_expected)
+
+ def test_read1_bounded(self):
+ resp = self.resp
+ all = []
+ while True:
+ data = resp.read1(10)
+ if not data:
+ break
+ self.assertLessEqual(len(data), 10)
+ all.append(data)
+ self.assertEqual(b"".join(all), self.lines_expected)
+
+ def test_read1_0(self):
+ self.assertEqual(self.resp.read1(0), b"")
+
+ def test_peek_0(self):
+ p = self.resp.peek(0)
+ self.assertLessEqual(0, len(p))
+
+class ExtendedReadTestChunked(ExtendedReadTest):
+ """
+ Test peek(), read1(), readline() in chunked mode
+ """
+ lines = (
+ 'HTTP/1.1 200 OK\r\n'
+ 'Transfer-Encoding: chunked\r\n\r\n'
+ 'a\r\n'
+ 'hello worl\r\n'
+ '3\r\n'
+ 'd!\n\r\n'
+ '9\r\n'
+ 'and now \n\r\n'
+ '23\r\n'
+ 'for something completely different\n\r\n'
+ '3\r\n'
+ 'foo\r\n'
+ '0\r\n' # terminating chunk
+ '\r\n' # end of trailers
+ )
+
+
+class Readliner:
+ """
+ a simple readline class that uses an arbitrary read function and buffering
+ """
+ def __init__(self, readfunc):
+ self.readfunc = readfunc
+ self.remainder = b""
+
+ def readline(self, limit):
+ data = []
+ datalen = 0
+ read = self.remainder
+ try:
+ while True:
+ idx = read.find(b'\n')
+ if idx != -1:
+ break
+ if datalen + len(read) >= limit:
+ idx = limit - datalen - 1
+ # read more data
+ data.append(read)
+ read = self.readfunc()
+ if not read:
+ idx = 0 #eof condition
+ break
+ idx += 1
+ data.append(read[:idx])
+ self.remainder = read[idx:]
+ return b"".join(data)
+ except:
+ self.remainder = b"".join(data)
+ raise
+
class OfflineTest(TestCase):
def test_all(self):
@@ -813,7 +1144,7 @@ class OfflineTest(TestCase):
# intentionally omitted for simplicity
blacklist = {"HTTPMessage", "parse_headers"}
for name in dir(client):
- if name in blacklist:
+ if name.startswith("_") or name in blacklist:
continue
module_object = getattr(client, name)
if getattr(module_object, "__module__", None) == "http.client":
@@ -823,13 +1154,74 @@ class OfflineTest(TestCase):
def test_responses(self):
self.assertEqual(client.responses[client.NOT_FOUND], "Not Found")
+ def test_client_constants(self):
+ # Make sure we don't break backward compatibility with 3.4
+ expected = [
+ 'CONTINUE',
+ 'SWITCHING_PROTOCOLS',
+ 'PROCESSING',
+ 'OK',
+ 'CREATED',
+ 'ACCEPTED',
+ 'NON_AUTHORITATIVE_INFORMATION',
+ 'NO_CONTENT',
+ 'RESET_CONTENT',
+ 'PARTIAL_CONTENT',
+ 'MULTI_STATUS',
+ 'IM_USED',
+ 'MULTIPLE_CHOICES',
+ 'MOVED_PERMANENTLY',
+ 'FOUND',
+ 'SEE_OTHER',
+ 'NOT_MODIFIED',
+ 'USE_PROXY',
+ 'TEMPORARY_REDIRECT',
+ 'BAD_REQUEST',
+ 'UNAUTHORIZED',
+ 'PAYMENT_REQUIRED',
+ 'FORBIDDEN',
+ 'NOT_FOUND',
+ 'METHOD_NOT_ALLOWED',
+ 'NOT_ACCEPTABLE',
+ 'PROXY_AUTHENTICATION_REQUIRED',
+ 'REQUEST_TIMEOUT',
+ 'CONFLICT',
+ 'GONE',
+ 'LENGTH_REQUIRED',
+ 'PRECONDITION_FAILED',
+ 'REQUEST_ENTITY_TOO_LARGE',
+ 'REQUEST_URI_TOO_LONG',
+ 'UNSUPPORTED_MEDIA_TYPE',
+ 'REQUESTED_RANGE_NOT_SATISFIABLE',
+ 'EXPECTATION_FAILED',
+ 'UNPROCESSABLE_ENTITY',
+ 'LOCKED',
+ 'FAILED_DEPENDENCY',
+ 'UPGRADE_REQUIRED',
+ 'PRECONDITION_REQUIRED',
+ 'TOO_MANY_REQUESTS',
+ 'REQUEST_HEADER_FIELDS_TOO_LARGE',
+ 'INTERNAL_SERVER_ERROR',
+ 'NOT_IMPLEMENTED',
+ 'BAD_GATEWAY',
+ 'SERVICE_UNAVAILABLE',
+ 'GATEWAY_TIMEOUT',
+ 'HTTP_VERSION_NOT_SUPPORTED',
+ 'INSUFFICIENT_STORAGE',
+ 'NOT_EXTENDED',
+ 'NETWORK_AUTHENTICATION_REQUIRED',
+ ]
+ for const in expected:
+ with self.subTest(constant=const):
+ self.assertTrue(hasattr(client, const))
+
class SourceAddressTest(TestCase):
def setUp(self):
self.serv = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.port = support.bind_port(self.serv)
self.source_port = support.find_unused_port()
- self.serv.listen(5)
+ self.serv.listen()
self.conn = None
def tearDown(self):
@@ -861,7 +1253,7 @@ class TimeoutTest(TestCase):
def setUp(self):
self.serv = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
TimeoutTest.PORT = support.bind_port(self.serv)
- self.serv.listen(5)
+ self.serv.listen()
def tearDown(self):
self.serv.close()
@@ -901,6 +1293,78 @@ class TimeoutTest(TestCase):
httpConn.close()
+class PersistenceTest(TestCase):
+
+ def test_reuse_reconnect(self):
+ # Should reuse or reconnect depending on header from server
+ tests = (
+ ('1.0', '', False),
+ ('1.0', 'Connection: keep-alive\r\n', True),
+ ('1.1', '', True),
+ ('1.1', 'Connection: close\r\n', False),
+ ('1.0', 'Connection: keep-ALIVE\r\n', True),
+ ('1.1', 'Connection: cloSE\r\n', False),
+ )
+ for version, header, reuse in tests:
+ with self.subTest(version=version, header=header):
+ msg = (
+ 'HTTP/{} 200 OK\r\n'
+ '{}'
+ 'Content-Length: 12\r\n'
+ '\r\n'
+ 'Dummy body\r\n'
+ ).format(version, header)
+ conn = FakeSocketHTTPConnection(msg)
+ self.assertIsNone(conn.sock)
+ conn.request('GET', '/open-connection')
+ with conn.getresponse() as response:
+ self.assertEqual(conn.sock is None, not reuse)
+ response.read()
+ self.assertEqual(conn.sock is None, not reuse)
+ self.assertEqual(conn.connections, 1)
+ conn.request('GET', '/subsequent-request')
+ self.assertEqual(conn.connections, 1 if reuse else 2)
+
+ def test_disconnected(self):
+
+ def make_reset_reader(text):
+ """Return BufferedReader that raises ECONNRESET at EOF"""
+ stream = io.BytesIO(text)
+ def readinto(buffer):
+ size = io.BytesIO.readinto(stream, buffer)
+ if size == 0:
+ raise ConnectionResetError()
+ return size
+ stream.readinto = readinto
+ return io.BufferedReader(stream)
+
+ tests = (
+ (io.BytesIO, client.RemoteDisconnected),
+ (make_reset_reader, ConnectionResetError),
+ )
+ for stream_factory, exception in tests:
+ with self.subTest(exception=exception):
+ conn = FakeSocketHTTPConnection(b'', stream_factory)
+ conn.request('GET', '/eof-response')
+ self.assertRaises(exception, conn.getresponse)
+ self.assertIsNone(conn.sock)
+ # HTTPConnection.connect() should be automatically invoked
+ conn.request('GET', '/reconnect')
+ self.assertEqual(conn.connections, 2)
+
+ def test_100_close(self):
+ conn = FakeSocketHTTPConnection(
+ b'HTTP/1.1 100 Continue\r\n'
+ b'\r\n'
+ # Missing final response
+ )
+ conn.request('GET', '/', headers={'Expect': '100-continue'})
+ self.assertRaises(client.RemoteDisconnected, conn.getresponse)
+ self.assertIsNone(conn.sock)
+ conn.request('GET', '/reconnect')
+ self.assertEqual(conn.connections, 2)
+
+
class HTTPSTest(TestCase):
def setUp(self):
@@ -1171,17 +1635,18 @@ class TunnelTests(TestCase):
'HTTP/1.1 200 OK\r\n' # Reply to HEAD
'Content-Length: 42\r\n\r\n'
)
-
- def create_connection(address, timeout=None, source_address=None):
- return FakeSocket(response_text, host=address[0], port=address[1])
-
self.host = 'proxy.com'
self.conn = client.HTTPConnection(self.host)
- self.conn._create_connection = create_connection
+ self.conn._create_connection = self._create_connection(response_text)
def tearDown(self):
self.conn.close()
+ def _create_connection(self, response_text):
+ def create_connection(address, timeout=None, source_address=None):
+ return FakeSocket(response_text, host=address[0], port=address[1])
+ return create_connection
+
def test_set_tunnel_host_port_headers(self):
tunnel_host = 'destination.com'
tunnel_port = 8888
@@ -1222,13 +1687,27 @@ class TunnelTests(TestCase):
self.assertIn(b'CONNECT destination.com', self.conn.sock.data)
self.assertIn(b'Host: destination.com', self.conn.sock.data)
+ def test_tunnel_debuglog(self):
+ expected_header = 'X-Dummy: 1'
+ response_text = 'HTTP/1.0 200 OK\r\n{}\r\n\r\n'.format(expected_header)
+
+ self.conn.set_debuglevel(1)
+ self.conn._create_connection = self._create_connection(response_text)
+ self.conn.set_tunnel('destination.com')
+
+ with support.captured_stdout() as output:
+ self.conn.request('PUT', '/', '')
+ lines = output.getvalue().splitlines()
+ self.assertIn('header: {}'.format(expected_header), lines)
@support.reap_threads
def test_main(verbose=None):
support.run_unittest(HeaderTests, OfflineTest, BasicTest, TimeoutTest,
+ PersistenceTest,
HTTPSTest, RequestBodyTest, SourceAddressTest,
- HTTPResponseTest, TunnelTests)
+ HTTPResponseTest, ExtendedReadTest,
+ ExtendedReadTestChunked, TunnelTests)
if __name__ == '__main__':
test_main()
diff --git a/Lib/test/test_httpservers.py b/Lib/test/test_httpservers.py
index 6e5f2db7fd..72e6e08880 100644
--- a/Lib/test/test_httpservers.py
+++ b/Lib/test/test_httpservers.py
@@ -6,12 +6,13 @@ Josip Dzolonga, and Michael Otteneder for the 2007/08 GHOP contest.
from http.server import BaseHTTPRequestHandler, HTTPServer, \
SimpleHTTPRequestHandler, CGIHTTPRequestHandler
-from http import server
+from http import server, HTTPStatus
import os
import sys
import re
import base64
+import ntpath
import shutil
import urllib.parse
import html
@@ -79,13 +80,13 @@ class BaseHTTPServerTestCase(BaseTestCase):
default_request_version = 'HTTP/1.1'
def do_TEST(self):
- self.send_response(204)
+ self.send_response(HTTPStatus.NO_CONTENT)
self.send_header('Content-Type', 'text/html')
self.send_header('Connection', 'close')
self.end_headers()
def do_KEEP(self):
- self.send_response(204)
+ self.send_response(HTTPStatus.NO_CONTENT)
self.send_header('Content-Type', 'text/html')
self.send_header('Connection', 'keep-alive')
self.end_headers()
@@ -94,11 +95,11 @@ class BaseHTTPServerTestCase(BaseTestCase):
self.send_error(999)
def do_NOTFOUND(self):
- self.send_error(404)
+ self.send_error(HTTPStatus.NOT_FOUND)
def do_EXPLAINERROR(self):
self.send_error(999, "Short Message",
- "This is a long \n explaination")
+ "This is a long \n explanation")
def do_CUSTOM(self):
self.send_response(999)
@@ -114,6 +115,12 @@ class BaseHTTPServerTestCase(BaseTestCase):
body = self.headers['x-special-incoming'].encode('utf-8')
self.wfile.write(body)
+ def do_SEND_ERROR(self):
+ self.send_error(int(self.path[1:]))
+
+ def do_HEAD(self):
+ self.send_error(int(self.path[1:]))
+
def setUp(self):
BaseTestCase.setUp(self)
self.con = http.client.HTTPConnection(self.HOST, self.PORT)
@@ -122,35 +129,35 @@ class BaseHTTPServerTestCase(BaseTestCase):
def test_command(self):
self.con.request('GET', '/')
res = self.con.getresponse()
- self.assertEqual(res.status, 501)
+ self.assertEqual(res.status, HTTPStatus.NOT_IMPLEMENTED)
def test_request_line_trimming(self):
self.con._http_vsn_str = 'HTTP/1.1\n'
self.con.putrequest('XYZBOGUS', '/')
self.con.endheaders()
res = self.con.getresponse()
- self.assertEqual(res.status, 501)
+ self.assertEqual(res.status, HTTPStatus.NOT_IMPLEMENTED)
def test_version_bogus(self):
self.con._http_vsn_str = 'FUBAR'
self.con.putrequest('GET', '/')
self.con.endheaders()
res = self.con.getresponse()
- self.assertEqual(res.status, 400)
+ self.assertEqual(res.status, HTTPStatus.BAD_REQUEST)
def test_version_digits(self):
self.con._http_vsn_str = 'HTTP/9.9.9'
self.con.putrequest('GET', '/')
self.con.endheaders()
res = self.con.getresponse()
- self.assertEqual(res.status, 400)
+ self.assertEqual(res.status, HTTPStatus.BAD_REQUEST)
def test_version_none_get(self):
self.con._http_vsn_str = ''
self.con.putrequest('GET', '/')
self.con.endheaders()
res = self.con.getresponse()
- self.assertEqual(res.status, 501)
+ self.assertEqual(res.status, HTTPStatus.NOT_IMPLEMENTED)
def test_version_none(self):
# Test that a valid method is rejected when not HTTP/1.x
@@ -158,7 +165,7 @@ class BaseHTTPServerTestCase(BaseTestCase):
self.con.putrequest('CUSTOM', '/')
self.con.endheaders()
res = self.con.getresponse()
- self.assertEqual(res.status, 400)
+ self.assertEqual(res.status, HTTPStatus.BAD_REQUEST)
def test_version_invalid(self):
self.con._http_vsn = 99
@@ -166,21 +173,21 @@ class BaseHTTPServerTestCase(BaseTestCase):
self.con.putrequest('GET', '/')
self.con.endheaders()
res = self.con.getresponse()
- self.assertEqual(res.status, 505)
+ self.assertEqual(res.status, HTTPStatus.HTTP_VERSION_NOT_SUPPORTED)
def test_send_blank(self):
self.con._http_vsn_str = ''
self.con.putrequest('', '')
self.con.endheaders()
res = self.con.getresponse()
- self.assertEqual(res.status, 400)
+ self.assertEqual(res.status, HTTPStatus.BAD_REQUEST)
def test_header_close(self):
self.con.putrequest('GET', '/')
self.con.putheader('Connection', 'close')
self.con.endheaders()
res = self.con.getresponse()
- self.assertEqual(res.status, 501)
+ self.assertEqual(res.status, HTTPStatus.NOT_IMPLEMENTED)
def test_head_keep_alive(self):
self.con._http_vsn_str = 'HTTP/1.1'
@@ -188,12 +195,12 @@ class BaseHTTPServerTestCase(BaseTestCase):
self.con.putheader('Connection', 'keep-alive')
self.con.endheaders()
res = self.con.getresponse()
- self.assertEqual(res.status, 501)
+ self.assertEqual(res.status, HTTPStatus.NOT_IMPLEMENTED)
def test_handler(self):
self.con.request('TEST', '/')
res = self.con.getresponse()
- self.assertEqual(res.status, 204)
+ self.assertEqual(res.status, HTTPStatus.NO_CONTENT)
def test_return_header_keep_alive(self):
self.con.request('KEEP', '/')
@@ -230,10 +237,85 @@ class BaseHTTPServerTestCase(BaseTestCase):
# Issue #16088: standard error responses should have a content-length
self.con.request('NOTFOUND', '/')
res = self.con.getresponse()
- self.assertEqual(res.status, 404)
+ self.assertEqual(res.status, HTTPStatus.NOT_FOUND)
+
data = res.read()
self.assertEqual(int(res.getheader('Content-Length')), len(data))
+ def test_send_error(self):
+ allow_transfer_encoding_codes = (HTTPStatus.NOT_MODIFIED,
+ HTTPStatus.RESET_CONTENT)
+ for code in (HTTPStatus.NO_CONTENT, HTTPStatus.NOT_MODIFIED,
+ HTTPStatus.PROCESSING, HTTPStatus.RESET_CONTENT,
+ HTTPStatus.SWITCHING_PROTOCOLS):
+ self.con.request('SEND_ERROR', '/{}'.format(code))
+ res = self.con.getresponse()
+ self.assertEqual(code, res.status)
+ self.assertEqual(None, res.getheader('Content-Length'))
+ self.assertEqual(None, res.getheader('Content-Type'))
+ if code not in allow_transfer_encoding_codes:
+ self.assertEqual(None, res.getheader('Transfer-Encoding'))
+
+ data = res.read()
+ self.assertEqual(b'', data)
+
+ def test_head_via_send_error(self):
+ allow_transfer_encoding_codes = (HTTPStatus.NOT_MODIFIED,
+ HTTPStatus.RESET_CONTENT)
+ for code in (HTTPStatus.OK, HTTPStatus.NO_CONTENT,
+ HTTPStatus.NOT_MODIFIED, HTTPStatus.RESET_CONTENT,
+ HTTPStatus.SWITCHING_PROTOCOLS):
+ self.con.request('HEAD', '/{}'.format(code))
+ res = self.con.getresponse()
+ self.assertEqual(code, res.status)
+ if code == HTTPStatus.OK:
+ self.assertTrue(int(res.getheader('Content-Length')) > 0)
+ self.assertIn('text/html', res.getheader('Content-Type'))
+ else:
+ self.assertEqual(None, res.getheader('Content-Length'))
+ self.assertEqual(None, res.getheader('Content-Type'))
+ if code not in allow_transfer_encoding_codes:
+ self.assertEqual(None, res.getheader('Transfer-Encoding'))
+
+ data = res.read()
+ self.assertEqual(b'', data)
+
+
+class RequestHandlerLoggingTestCase(BaseTestCase):
+ class request_handler(BaseHTTPRequestHandler):
+ protocol_version = 'HTTP/1.1'
+ default_request_version = 'HTTP/1.1'
+
+ def do_GET(self):
+ self.send_response(HTTPStatus.OK)
+ self.end_headers()
+
+ def do_ERROR(self):
+ self.send_error(HTTPStatus.NOT_FOUND, 'File not found')
+
+ def test_get(self):
+ self.con = http.client.HTTPConnection(self.HOST, self.PORT)
+ self.con.connect()
+
+ with support.captured_stderr() as err:
+ self.con.request('GET', '/')
+ self.con.getresponse()
+
+ self.assertTrue(
+ err.getvalue().endswith('"GET / HTTP/1.1" 200 -\n'))
+
+ def test_err(self):
+ self.con = http.client.HTTPConnection(self.HOST, self.PORT)
+ self.con.connect()
+
+ with support.captured_stderr() as err:
+ self.con.request('ERROR', '/')
+ self.con.getresponse()
+
+ lines = err.getvalue().split('\n')
+ self.assertTrue(lines[0].endswith('code 404, message File not found'))
+ self.assertTrue(lines[1].endswith('"ERROR / HTTP/1.1" 404 -'))
+
class SimpleHTTPServerTestCase(BaseTestCase):
class request_handler(NoLogRequestHandler, SimpleHTTPRequestHandler):
@@ -247,6 +329,7 @@ class SimpleHTTPServerTestCase(BaseTestCase):
self.data = b'We are the knights who say Ni!'
self.tempdir = tempfile.mkdtemp(dir=basetempdir)
self.tempdir_name = os.path.basename(self.tempdir)
+ self.base_url = '/' + self.tempdir_name
with open(os.path.join(self.tempdir, 'test'), 'wb') as temp:
temp.write(self.data)
@@ -261,12 +344,28 @@ class SimpleHTTPServerTestCase(BaseTestCase):
BaseTestCase.tearDown(self)
def check_status_and_reason(self, response, status, data=None):
+ def close_conn():
+ """Don't close reader yet so we can check if there was leftover
+ buffered input"""
+ nonlocal reader
+ reader = response.fp
+ response.fp = None
+ reader = None
+ response._close_conn = close_conn
+
body = response.read()
self.assertTrue(response)
self.assertEqual(response.status, status)
self.assertIsNotNone(response.reason)
if data:
self.assertEqual(data, body)
+ # Ensure the server has not set up a persistent connection, and has
+ # not sent any extra data
+ self.assertEqual(response.version, 10)
+ self.assertEqual(response.msg.get("Connection", "close"), "close")
+ self.assertEqual(reader.read(30), b'', 'Connection should be closed')
+
+ reader.close()
return body
@support.requires_mac_ver(10, 5)
@@ -277,7 +376,7 @@ class SimpleHTTPServerTestCase(BaseTestCase):
filename = os.fsdecode(support.TESTFN_UNDECODABLE) + '.txt'
with open(os.path.join(self.tempdir, filename), 'wb') as f:
f.write(support.TESTFN_UNDECODABLE)
- response = self.request(self.tempdir_name + '/')
+ response = self.request(self.base_url + '/')
if sys.platform == 'darwin':
# On Mac OS the HFS+ filesystem replaces bytes that aren't valid
# UTF-8 into a percent-encoded value.
@@ -285,52 +384,58 @@ class SimpleHTTPServerTestCase(BaseTestCase):
if name != 'test': # Ignore a filename created in setUp().
filename = name
break
- body = self.check_status_and_reason(response, 200)
+ body = self.check_status_and_reason(response, HTTPStatus.OK)
quotedname = urllib.parse.quote(filename, errors='surrogatepass')
self.assertIn(('href="%s"' % quotedname)
.encode(enc, 'surrogateescape'), body)
self.assertIn(('>%s<' % html.escape(filename))
.encode(enc, 'surrogateescape'), body)
- response = self.request(self.tempdir_name + '/' + quotedname)
- self.check_status_and_reason(response, 200,
+ response = self.request(self.base_url + '/' + quotedname)
+ self.check_status_and_reason(response, HTTPStatus.OK,
data=support.TESTFN_UNDECODABLE)
def test_get(self):
#constructs the path relative to the root directory of the HTTPServer
- response = self.request(self.tempdir_name + '/test')
- self.check_status_and_reason(response, 200, data=self.data)
+ response = self.request(self.base_url + '/test')
+ self.check_status_and_reason(response, HTTPStatus.OK, data=self.data)
# check for trailing "/" which should return 404. See Issue17324
- response = self.request(self.tempdir_name + '/test/')
- self.check_status_and_reason(response, 404)
- response = self.request(self.tempdir_name + '/')
- self.check_status_and_reason(response, 200)
- response = self.request(self.tempdir_name)
- self.check_status_and_reason(response, 301)
- response = self.request(self.tempdir_name + '/?hi=2')
- self.check_status_and_reason(response, 200)
- response = self.request(self.tempdir_name + '?hi=1')
- self.check_status_and_reason(response, 301)
+ response = self.request(self.base_url + '/test/')
+ self.check_status_and_reason(response, HTTPStatus.NOT_FOUND)
+ response = self.request(self.base_url + '/')
+ self.check_status_and_reason(response, HTTPStatus.OK)
+ response = self.request(self.base_url)
+ self.check_status_and_reason(response, HTTPStatus.MOVED_PERMANENTLY)
+ response = self.request(self.base_url + '/?hi=2')
+ self.check_status_and_reason(response, HTTPStatus.OK)
+ response = self.request(self.base_url + '?hi=1')
+ self.check_status_and_reason(response, HTTPStatus.MOVED_PERMANENTLY)
self.assertEqual(response.getheader("Location"),
- self.tempdir_name + "/?hi=1")
+ self.base_url + "/?hi=1")
response = self.request('/ThisDoesNotExist')
- self.check_status_and_reason(response, 404)
+ self.check_status_and_reason(response, HTTPStatus.NOT_FOUND)
response = self.request('/' + 'ThisDoesNotExist' + '/')
- self.check_status_and_reason(response, 404)
- with open(os.path.join(self.tempdir_name, 'index.html'), 'w') as f:
- response = self.request('/' + self.tempdir_name + '/')
- self.check_status_and_reason(response, 200)
- # chmod() doesn't work as expected on Windows, and filesystem
- # permissions are ignored by root on Unix.
- if os.name == 'posix' and os.geteuid() != 0:
- os.chmod(self.tempdir, 0)
- response = self.request(self.tempdir_name + '/')
- self.check_status_and_reason(response, 404)
+ self.check_status_and_reason(response, HTTPStatus.NOT_FOUND)
+
+ data = b"Dummy index file\r\n"
+ with open(os.path.join(self.tempdir_name, 'index.html'), 'wb') as f:
+ f.write(data)
+ response = self.request(self.base_url + '/')
+ self.check_status_and_reason(response, HTTPStatus.OK, data)
+
+ # chmod() doesn't work as expected on Windows, and filesystem
+ # permissions are ignored by root on Unix.
+ if os.name == 'posix' and os.geteuid() != 0:
+ os.chmod(self.tempdir, 0)
+ try:
+ response = self.request(self.base_url + '/')
+ self.check_status_and_reason(response, HTTPStatus.NOT_FOUND)
+ finally:
os.chmod(self.tempdir, 0o755)
def test_head(self):
response = self.request(
- self.tempdir_name + '/test', method='HEAD')
- self.check_status_and_reason(response, 200)
+ self.base_url + '/test', method='HEAD')
+ self.check_status_and_reason(response, HTTPStatus.OK)
self.assertEqual(response.getheader('content-length'),
str(len(self.data)))
self.assertEqual(response.getheader('content-type'),
@@ -338,12 +443,28 @@ class SimpleHTTPServerTestCase(BaseTestCase):
def test_invalid_requests(self):
response = self.request('/', method='FOO')
- self.check_status_and_reason(response, 501)
+ self.check_status_and_reason(response, HTTPStatus.NOT_IMPLEMENTED)
# requests must be case sensitive,so this should fail too
response = self.request('/', method='custom')
- self.check_status_and_reason(response, 501)
+ self.check_status_and_reason(response, HTTPStatus.NOT_IMPLEMENTED)
response = self.request('/', method='GETs')
- self.check_status_and_reason(response, 501)
+ self.check_status_and_reason(response, HTTPStatus.NOT_IMPLEMENTED)
+
+ def test_path_without_leading_slash(self):
+ response = self.request(self.tempdir_name + '/test')
+ self.check_status_and_reason(response, HTTPStatus.OK, data=self.data)
+ response = self.request(self.tempdir_name + '/test/')
+ self.check_status_and_reason(response, HTTPStatus.NOT_FOUND)
+ response = self.request(self.tempdir_name + '/')
+ self.check_status_and_reason(response, HTTPStatus.OK)
+ response = self.request(self.tempdir_name)
+ self.check_status_and_reason(response, HTTPStatus.MOVED_PERMANENTLY)
+ response = self.request(self.tempdir_name + '/?hi=2')
+ self.check_status_and_reason(response, HTTPStatus.OK)
+ response = self.request(self.tempdir_name + '?hi=1')
+ self.check_status_and_reason(response, HTTPStatus.MOVED_PERMANENTLY)
+ self.assertEqual(response.getheader("Location"),
+ self.tempdir_name + "/?hi=1")
cgi_file1 = """\
@@ -508,12 +629,13 @@ class CGIHTTPServerTestCase(BaseTestCase):
def test_headers_and_content(self):
res = self.request('/cgi-bin/file1.py')
- self.assertEqual((b'Hello World' + self.linesep, 'text/html', 200),
- (res.read(), res.getheader('Content-type'), res.status))
+ self.assertEqual(
+ (res.read(), res.getheader('Content-type'), res.status),
+ (b'Hello World' + self.linesep, 'text/html', HTTPStatus.OK))
def test_issue19435(self):
res = self.request('///////////nocgi.py/../cgi-bin/nothere.sh')
- self.assertEqual(res.status, 404)
+ self.assertEqual(res.status, HTTPStatus.NOT_FOUND)
def test_post(self):
params = urllib.parse.urlencode(
@@ -526,50 +648,55 @@ class CGIHTTPServerTestCase(BaseTestCase):
def test_invaliduri(self):
res = self.request('/cgi-bin/invalid')
res.read()
- self.assertEqual(res.status, 404)
+ self.assertEqual(res.status, HTTPStatus.NOT_FOUND)
def test_authorization(self):
headers = {b'Authorization' : b'Basic ' +
base64.b64encode(b'username:pass')}
res = self.request('/cgi-bin/file1.py', 'GET', headers=headers)
- self.assertEqual((b'Hello World' + self.linesep, 'text/html', 200),
- (res.read(), res.getheader('Content-type'), res.status))
+ self.assertEqual(
+ (b'Hello World' + self.linesep, 'text/html', HTTPStatus.OK),
+ (res.read(), res.getheader('Content-type'), res.status))
def test_no_leading_slash(self):
# http://bugs.python.org/issue2254
res = self.request('cgi-bin/file1.py')
- self.assertEqual((b'Hello World' + self.linesep, 'text/html', 200),
- (res.read(), res.getheader('Content-type'), res.status))
+ self.assertEqual(
+ (b'Hello World' + self.linesep, 'text/html', HTTPStatus.OK),
+ (res.read(), res.getheader('Content-type'), res.status))
def test_os_environ_is_not_altered(self):
signature = "Test CGI Server"
os.environ['SERVER_SOFTWARE'] = signature
res = self.request('/cgi-bin/file1.py')
- self.assertEqual((b'Hello World' + self.linesep, 'text/html', 200),
- (res.read(), res.getheader('Content-type'), res.status))
+ self.assertEqual(
+ (b'Hello World' + self.linesep, 'text/html', HTTPStatus.OK),
+ (res.read(), res.getheader('Content-type'), res.status))
self.assertEqual(os.environ['SERVER_SOFTWARE'], signature)
def test_urlquote_decoding_in_cgi_check(self):
res = self.request('/cgi-bin%2ffile1.py')
- self.assertEqual((b'Hello World' + self.linesep, 'text/html', 200),
- (res.read(), res.getheader('Content-type'), res.status))
+ self.assertEqual(
+ (b'Hello World' + self.linesep, 'text/html', HTTPStatus.OK),
+ (res.read(), res.getheader('Content-type'), res.status))
def test_nested_cgi_path_issue21323(self):
res = self.request('/cgi-bin/child-dir/file3.py')
- self.assertEqual((b'Hello World' + self.linesep, 'text/html', 200),
- (res.read(), res.getheader('Content-type'), res.status))
+ self.assertEqual(
+ (b'Hello World' + self.linesep, 'text/html', HTTPStatus.OK),
+ (res.read(), res.getheader('Content-type'), res.status))
def test_query_with_multiple_question_mark(self):
res = self.request('/cgi-bin/file4.py?a=b?c=d')
self.assertEqual(
- (b'a=b?c=d' + self.linesep, 'text/html', 200),
+ (b'a=b?c=d' + self.linesep, 'text/html', HTTPStatus.OK),
(res.read(), res.getheader('Content-type'), res.status))
def test_query_with_continuous_slashes(self):
res = self.request('/cgi-bin/file4.py?k=aa%2F%2Fbb&//q//p//=//a//b//')
self.assertEqual(
(b'k=aa%2F%2Fbb&//q//p//=//a//b//' + self.linesep,
- 'text/html', 200),
+ 'text/html', HTTPStatus.OK),
(res.read(), res.getheader('Content-type'), res.status))
@@ -580,7 +707,7 @@ class SocketlessRequestHandler(SimpleHTTPRequestHandler):
def do_GET(self):
self.get_called = True
- self.send_response(200)
+ self.send_response(HTTPStatus.OK)
self.send_header('Content-Type', 'text/html')
self.end_headers()
self.wfile.write(b'<html><body>Data</body></html>\r\n')
@@ -590,7 +717,7 @@ class SocketlessRequestHandler(SimpleHTTPRequestHandler):
class RejectingSocketlessRequestHandler(SocketlessRequestHandler):
def handle_expect_100(self):
- self.send_error(417)
+ self.send_error(HTTPStatus.EXPECTATION_FAILED)
return False
@@ -793,6 +920,13 @@ class BaseHTTPRequestHandlerTestCase(unittest.TestCase):
self.assertFalse(self.handler.get_called)
self.assertEqual(self.handler.requestline, 'GET / HTTP/1.1')
+ def test_too_many_headers(self):
+ result = self.send_typical_request(
+ b'GET / HTTP/1.1\r\n' + b'X-Foo: bar\r\n' * 101 + b'\r\n')
+ self.assertEqual(result[0], b'HTTP/1.1 431 Too many headers\r\n')
+ self.assertFalse(self.handler.get_called)
+ self.assertEqual(self.handler.requestline, 'GET / HTTP/1.1')
+
def test_close_connection(self):
# handle_one_request() should be repeatedly called until
# it sets close_connection
@@ -829,6 +963,24 @@ class SimpleHTTPRequestHandlerTestCase(unittest.TestCase):
path = self.handler.translate_path('//filename?foo=bar')
self.assertEqual(path, self.translated)
+ def test_windows_colon(self):
+ with support.swap_attr(server.os, 'path', ntpath):
+ path = self.handler.translate_path('c:c:c:foo/filename')
+ path = path.replace(ntpath.sep, os.sep)
+ self.assertEqual(path, self.translated)
+
+ path = self.handler.translate_path('\\c:../filename')
+ path = path.replace(ntpath.sep, os.sep)
+ self.assertEqual(path, self.translated)
+
+ path = self.handler.translate_path('c:\\c:..\\foo/filename')
+ path = path.replace(ntpath.sep, os.sep)
+ self.assertEqual(path, self.translated)
+
+ path = self.handler.translate_path('c:c:foo\\c:c:bar/filename')
+ path = path.replace(ntpath.sep, os.sep)
+ self.assertEqual(path, self.translated)
+
class MiscTestCase(unittest.TestCase):
def test_all(self):
@@ -847,6 +999,7 @@ def test_main(verbose=None):
cwd = os.getcwd()
try:
support.run_unittest(
+ RequestHandlerLoggingTestCase,
BaseHTTPRequestHandlerTestCase,
BaseHTTPServerTestCase,
SimpleHTTPServerTestCase,
diff --git a/Lib/test/test_idle.py b/Lib/test/test_idle.py
index 132657b58e..141e89e493 100644
--- a/Lib/test/test_idle.py
+++ b/Lib/test/test_idle.py
@@ -1,13 +1,11 @@
import unittest
-from test.support import import_module, import_fresh_module
+from test import support
+from test.support import import_module
# Skip test if _thread or _tkinter wasn't built or idlelib was deleted.
import_module('threading') # imported by PyShell, imports _thread
tk = import_module('tkinter') # imports _tkinter
idletest = import_module('idlelib.idle_test')
-# Make sure TCL_LIBRARY is set properly on Windows. Note that this will
-# cause a warning about test_idle modifying the environment
-import_fresh_module('tkinter._fix')
# Without test_main present, regrtest.runtest_inner (line1219) calls
# unittest.TestLoader().loadTestsFromModule(this_module) which calls
diff --git a/Lib/test/test_imaplib.py b/Lib/test/test_imaplib.py
index 838411e76f..07157f52d6 100644
--- a/Lib/test/test_imaplib.py
+++ b/Lib/test/test_imaplib.py
@@ -11,7 +11,8 @@ import socketserver
import time
import calendar
-from test.support import reap_threads, verbose, transient_internet, run_with_tz, run_with_locale
+from test.support import (reap_threads, verbose, transient_internet,
+ run_with_tz, run_with_locale)
import unittest
from datetime import datetime, timezone, timedelta
try:
@@ -19,8 +20,8 @@ try:
except ImportError:
ssl = None
-CERTFILE = None
-CAFILE = None
+CERTFILE = os.path.join(os.path.dirname(__file__) or os.curdir, "keycert3.pem")
+CAFILE = os.path.join(os.path.dirname(__file__) or os.curdir, "pycacert.pem")
class TestImaplib(unittest.TestCase):
@@ -41,17 +42,15 @@ class TestImaplib(unittest.TestCase):
def test_Internaldate2tuple_issue10941(self):
self.assertNotEqual(imaplib.Internaldate2tuple(
b'25 (INTERNALDATE "02-Apr-2000 02:30:00 +0000")'),
- imaplib.Internaldate2tuple(
- b'25 (INTERNALDATE "02-Apr-2000 03:30:00 +0000")'))
-
-
+ imaplib.Internaldate2tuple(
+ b'25 (INTERNALDATE "02-Apr-2000 03:30:00 +0000")'))
def timevalues(self):
return [2000000000, 2000000000.0, time.localtime(2000000000),
(2033, 5, 18, 5, 33, 20, -1, -1, -1),
(2033, 5, 18, 5, 33, 20, -1, -1, 1),
datetime.fromtimestamp(2000000000,
- timezone(timedelta(0, 2*60*60))),
+ timezone(timedelta(0, 2 * 60 * 60))),
'"18-May-2033 05:33:20 +0200"']
@run_with_locale('LC_ALL', 'de_DE', 'fr_FR')
@@ -74,7 +73,6 @@ class TestImaplib(unittest.TestCase):
if ssl:
-
class SecureTCPServer(socketserver.TCPServer):
def get_request(self):
@@ -95,13 +93,17 @@ else:
class SimpleIMAPHandler(socketserver.StreamRequestHandler):
-
timeout = 1
continuation = None
capabilities = ''
+ def setup(self):
+ super().setup()
+ self.server.logged = None
+
def _send(self, message):
- if verbose: print("SENT: %r" % message.strip())
+ if verbose:
+ print("SENT: %r" % message.strip())
self.wfile.write(message)
def _send_line(self, message):
@@ -134,7 +136,8 @@ class SimpleIMAPHandler(socketserver.StreamRequestHandler):
if line.endswith(b'\r\n'):
break
- if verbose: print('GOT: %r' % line.strip())
+ if verbose:
+ print('GOT: %r' % line.strip())
if self.continuation:
try:
self.continuation.send(line)
@@ -146,8 +149,8 @@ class SimpleIMAPHandler(socketserver.StreamRequestHandler):
cmd = splitline[1]
args = splitline[2:]
- if hasattr(self, 'cmd_'+cmd):
- continuation = getattr(self, 'cmd_'+cmd)(tag, args)
+ if hasattr(self, 'cmd_' + cmd):
+ continuation = getattr(self, 'cmd_' + cmd)(tag, args)
if continuation:
self.continuation = continuation
next(continuation)
@@ -155,16 +158,25 @@ class SimpleIMAPHandler(socketserver.StreamRequestHandler):
self._send_tagged(tag, 'BAD', cmd + ' unknown')
def cmd_CAPABILITY(self, tag, args):
- caps = 'IMAP4rev1 ' + self.capabilities if self.capabilities else 'IMAP4rev1'
+ caps = ('IMAP4rev1 ' + self.capabilities
+ if self.capabilities
+ else 'IMAP4rev1')
self._send_textline('* CAPABILITY ' + caps)
self._send_tagged(tag, 'OK', 'CAPABILITY completed')
def cmd_LOGOUT(self, tag, args):
+ self.server.logged = None
self._send_textline('* BYE IMAP4ref1 Server logging out')
self._send_tagged(tag, 'OK', 'LOGOUT completed')
+ def cmd_LOGIN(self, tag, args):
+ self.server.logged = args[0]
+ self._send_tagged(tag, 'OK', 'LOGIN completed')
-class BaseThreadedNetworkedTests(unittest.TestCase):
+
+class ThreadedNetworkedTests(unittest.TestCase):
+ server_class = socketserver.TCPServer
+ imap_class = imaplib.IMAP4
def make_server(self, addr, hdlr):
@@ -174,7 +186,8 @@ class BaseThreadedNetworkedTests(unittest.TestCase):
self.server_close()
raise
- if verbose: print("creating server")
+ if verbose:
+ print("creating server")
server = MyServer(addr, hdlr)
self.assertEqual(server.server_address, server.socket.getsockname())
@@ -190,18 +203,21 @@ class BaseThreadedNetworkedTests(unittest.TestCase):
# Short poll interval to make the test finish quickly.
# Time between requests is short enough that we won't wake
# up spuriously too many times.
- kwargs={'poll_interval':0.01})
+ kwargs={'poll_interval': 0.01})
t.daemon = True # In case this function raises.
t.start()
- if verbose: print("server running")
+ if verbose:
+ print("server running")
return server, t
def reap_server(self, server, thread):
- if verbose: print("waiting for server")
+ if verbose:
+ print("waiting for server")
server.shutdown()
server.server_close()
thread.join()
- if verbose: print("done")
+ if verbose:
+ print("done")
@contextmanager
def reaped_server(self, hdlr):
@@ -251,6 +267,84 @@ class BaseThreadedNetworkedTests(unittest.TestCase):
self.assertRaises(imaplib.IMAP4.abort,
self.imap_class, *server.server_address)
+ class UTF8Server(SimpleIMAPHandler):
+ capabilities = 'AUTH ENABLE UTF8=ACCEPT'
+
+ def cmd_ENABLE(self, tag, args):
+ self._send_tagged(tag, 'OK', 'ENABLE successful')
+
+ def cmd_AUTHENTICATE(self, tag, args):
+ self._send_textline('+')
+ self.server.response = yield
+ self._send_tagged(tag, 'OK', 'FAKEAUTH successful')
+
+ @reap_threads
+ def test_enable_raises_error_if_not_AUTH(self):
+ with self.reaped_pair(self.UTF8Server) as (server, client):
+ self.assertFalse(client.utf8_enabled)
+ self.assertRaises(imaplib.IMAP4.error, client.enable, 'foo')
+ self.assertFalse(client.utf8_enabled)
+
+ # XXX Also need a test that enable after SELECT raises an error.
+
+ @reap_threads
+ def test_enable_raises_error_if_no_capability(self):
+ class NoEnableServer(self.UTF8Server):
+ capabilities = 'AUTH'
+ with self.reaped_pair(NoEnableServer) as (server, client):
+ self.assertRaises(imaplib.IMAP4.error, client.enable, 'foo')
+
+ @reap_threads
+ def test_enable_UTF8_raises_error_if_not_supported(self):
+ class NonUTF8Server(SimpleIMAPHandler):
+ pass
+ with self.assertRaises(imaplib.IMAP4.error):
+ with self.reaped_pair(NonUTF8Server) as (server, client):
+ typ, data = client.login('user', 'pass')
+ self.assertEqual(typ, 'OK')
+ client.enable('UTF8=ACCEPT')
+ pass
+
+ @reap_threads
+ def test_enable_UTF8_True_append(self):
+
+ class UTF8AppendServer(self.UTF8Server):
+ def cmd_APPEND(self, tag, args):
+ self._send_textline('+')
+ self.server.response = yield
+ self._send_tagged(tag, 'OK', 'okay')
+
+ with self.reaped_pair(UTF8AppendServer) as (server, client):
+ self.assertEqual(client._encoding, 'ascii')
+ code, _ = client.authenticate('MYAUTH', lambda x: b'fake')
+ self.assertEqual(code, 'OK')
+ self.assertEqual(server.response,
+ b'ZmFrZQ==\r\n') # b64 encoded 'fake'
+ code, _ = client.enable('UTF8=ACCEPT')
+ self.assertEqual(code, 'OK')
+ self.assertEqual(client._encoding, 'utf-8')
+ msg_string = 'Subject: üñí©öðé'
+ typ, data = client.append(
+ None, None, None, msg_string.encode('utf-8'))
+ self.assertEqual(typ, 'OK')
+ self.assertEqual(
+ server.response,
+ ('UTF8 (%s)\r\n' % msg_string).encode('utf-8')
+ )
+
+ # XXX also need a test that makes sure that the Literal and Untagged_status
+ # regexes uses unicode in UTF8 mode instead of the default ASCII.
+
+ @reap_threads
+ def test_search_disallows_charset_in_utf8_mode(self):
+ with self.reaped_pair(self.UTF8Server) as (server, client):
+ typ, _ = client.authenticate('MYAUTH', lambda x: b'fake')
+ self.assertEqual(typ, 'OK')
+ typ, _ = client.enable('UTF8=ACCEPT')
+ self.assertEqual(typ, 'OK')
+ self.assertTrue(client.utf8_enabled)
+ self.assertRaises(imaplib.IMAP4.error, client.search, 'foo', 'bar')
+
@reap_threads
def test_bad_auth_name(self):
@@ -258,7 +352,7 @@ class BaseThreadedNetworkedTests(unittest.TestCase):
def cmd_AUTHENTICATE(self, tag, args):
self._send_tagged(tag, 'NO', 'unrecognized authentication '
- 'type {}'.format(args[0]))
+ 'type {}'.format(args[0]))
with self.reaped_pair(MyServer) as (server, client):
with self.assertRaises(imaplib.IMAP4.error):
@@ -292,13 +386,13 @@ class BaseThreadedNetworkedTests(unittest.TestCase):
code, data = client.authenticate('MYAUTH', lambda x: b'fake')
self.assertEqual(code, 'OK')
self.assertEqual(server.response,
- b'ZmFrZQ==\r\n') #b64 encoded 'fake'
+ b'ZmFrZQ==\r\n') # b64 encoded 'fake'
with self.reaped_pair(MyServer) as (server, client):
code, data = client.authenticate('MYAUTH', lambda x: 'fake')
self.assertEqual(code, 'OK')
self.assertEqual(server.response,
- b'ZmFrZQ==\r\n') #b64 encoded 'fake'
+ b'ZmFrZQ==\r\n') # b64 encoded 'fake'
@reap_threads
def test_login_cram_md5(self):
@@ -309,9 +403,10 @@ class BaseThreadedNetworkedTests(unittest.TestCase):
def cmd_AUTHENTICATE(self, tag, args):
self._send_textline('+ PDE4OTYuNjk3MTcwOTUyQHBvc3RvZmZpY2Uucm'
- 'VzdG9uLm1jaS5uZXQ=')
+ 'VzdG9uLm1jaS5uZXQ=')
r = yield
- if r == b'dGltIGYxY2E2YmU0NjRiOWVmYTFjY2E2ZmZkNmNmMmQ5ZjMy\r\n':
+ if (r == b'dGltIGYxY2E2YmU0NjRiOWVmYT'
+ b'FjY2E2ZmZkNmNmMmQ5ZjMy\r\n'):
self._send_tagged(tag, 'OK', 'CRAM-MD5 successful')
else:
self._send_tagged(tag, 'NO', 'No access')
@@ -327,7 +422,6 @@ class BaseThreadedNetworkedTests(unittest.TestCase):
self.assertEqual(ret, "OK")
-
@reap_threads
def test_aborted_authentication(self):
@@ -346,26 +440,46 @@ class BaseThreadedNetworkedTests(unittest.TestCase):
with self.assertRaises(imaplib.IMAP4.error):
code, data = client.authenticate('MYAUTH', lambda x: None)
+
def test_linetoolong(self):
class TooLongHandler(SimpleIMAPHandler):
def handle(self):
# Send a very long response line
- self.wfile.write(b'* OK ' + imaplib._MAXLINE*b'x' + b'\r\n')
+ self.wfile.write(b'* OK ' + imaplib._MAXLINE * b'x' + b'\r\n')
with self.reaped_server(TooLongHandler) as server:
self.assertRaises(imaplib.IMAP4.error,
self.imap_class, *server.server_address)
+ @reap_threads
+ def test_simple_with_statement(self):
+ # simplest call
+ with self.reaped_server(SimpleIMAPHandler) as server:
+ with self.imap_class(*server.server_address):
+ pass
-class ThreadedNetworkedTests(BaseThreadedNetworkedTests):
+ @reap_threads
+ def test_with_statement(self):
+ with self.reaped_server(SimpleIMAPHandler) as server:
+ with self.imap_class(*server.server_address) as imap:
+ imap.login('user', 'pass')
+ self.assertEqual(server.logged, 'user')
+ self.assertIsNone(server.logged)
- server_class = socketserver.TCPServer
- imap_class = imaplib.IMAP4
+ @reap_threads
+ def test_with_statement_logout(self):
+ # what happens if already logout in the block?
+ with self.reaped_server(SimpleIMAPHandler) as server:
+ with self.imap_class(*server.server_address) as imap:
+ imap.login('user', 'pass')
+ self.assertEqual(server.logged, 'user')
+ imap.logout()
+ self.assertIsNone(server.logged)
+ self.assertIsNone(server.logged)
@unittest.skipUnless(ssl, "SSL not available")
-class ThreadedNetworkedTestsSSL(BaseThreadedNetworkedTests):
-
+class ThreadedNetworkedTestsSSL(ThreadedNetworkedTests):
server_class = SecureTCPServer
imap_class = IMAP4_SSL
@@ -376,8 +490,9 @@ class ThreadedNetworkedTestsSSL(BaseThreadedNetworkedTests):
ssl_context.check_hostname = True
ssl_context.load_verify_locations(CAFILE)
- with self.assertRaisesRegex(ssl.CertificateError,
- "hostname '127.0.0.1' doesn't match 'localhost'"):
+ with self.assertRaisesRegex(
+ ssl.CertificateError,
+ "hostname '127.0.0.1' doesn't match 'localhost'"):
with self.reaped_server(SimpleIMAPHandler) as server:
client = self.imap_class(*server.server_address,
ssl_context=ssl_context)
@@ -389,6 +504,8 @@ class ThreadedNetworkedTestsSSL(BaseThreadedNetworkedTests):
client.shutdown()
+@unittest.skipUnless(
+ support.is_resource_enabled('network'), 'network resource disabled')
class RemoteIMAPTest(unittest.TestCase):
host = 'cyrus.andrew.cmu.edu'
port = 143
@@ -422,6 +539,8 @@ class RemoteIMAPTest(unittest.TestCase):
@unittest.skipUnless(ssl, "SSL not available")
+@unittest.skipUnless(
+ support.is_resource_enabled('network'), 'network resource disabled')
class RemoteIMAP_STARTTLSTest(RemoteIMAPTest):
def setUp(self):
@@ -475,7 +594,8 @@ class RemoteIMAP_SSLTest(RemoteIMAPTest):
def test_logincapa_with_client_ssl_context(self):
with transient_internet(self.host):
- _server = self.imap_class(self.host, self.port, ssl_context=self.create_ssl_context())
+ _server = self.imap_class(
+ self.host, self.port, ssl_context=self.create_ssl_context())
self.check_logincapa(_server)
def test_logout(self):
@@ -486,35 +606,15 @@ class RemoteIMAP_SSLTest(RemoteIMAPTest):
def test_ssl_context_certfile_exclusive(self):
with transient_internet(self.host):
- self.assertRaises(ValueError, self.imap_class, self.host, self.port,
- certfile=CERTFILE, ssl_context=self.create_ssl_context())
+ self.assertRaises(
+ ValueError, self.imap_class, self.host, self.port,
+ certfile=CERTFILE, ssl_context=self.create_ssl_context())
def test_ssl_context_keyfile_exclusive(self):
with transient_internet(self.host):
- self.assertRaises(ValueError, self.imap_class, self.host, self.port,
- keyfile=CERTFILE, ssl_context=self.create_ssl_context())
-
-
-def load_tests(*args):
- tests = [TestImaplib]
-
- if support.is_resource_enabled('network'):
- if ssl:
- global CERTFILE, CAFILE
- CERTFILE = os.path.join(os.path.dirname(__file__) or os.curdir,
- "keycert3.pem")
- if not os.path.exists(CERTFILE):
- raise support.TestFailed("Can't read certificate files!")
- CAFILE = os.path.join(os.path.dirname(__file__) or os.curdir,
- "pycacert.pem")
- if not os.path.exists(CAFILE):
- raise support.TestFailed("Can't read CA file!")
- tests.extend([
- ThreadedNetworkedTests, ThreadedNetworkedTestsSSL,
- RemoteIMAPTest, RemoteIMAP_SSLTest, RemoteIMAP_STARTTLSTest,
- ])
-
- return unittest.TestSuite([unittest.makeSuite(test) for test in tests])
+ self.assertRaises(
+ ValueError, self.imap_class, self.host, self.port,
+ keyfile=CERTFILE, ssl_context=self.create_ssl_context())
if __name__ == "__main__":
diff --git a/Lib/test/test_imghdr.py b/Lib/test/test_imghdr.py
index 0ad4343f52..b54daf8e2c 100644
--- a/Lib/test/test_imghdr.py
+++ b/Lib/test/test_imghdr.py
@@ -16,7 +16,9 @@ TEST_FILES = (
('python.ras', 'rast'),
('python.sgi', 'rgb'),
('python.tiff', 'tiff'),
- ('python.xbm', 'xbm')
+ ('python.xbm', 'xbm'),
+ ('python.webp', 'webp'),
+ ('python.exr', 'exr'),
)
class UnseekableIO(io.FileIO):
diff --git a/Lib/test/test_imp.py b/Lib/test/test_imp.py
index 80b9ec38c5..ee9ee1ad8c 100644
--- a/Lib/test/test_imp.py
+++ b/Lib/test/test_imp.py
@@ -3,6 +3,7 @@ try:
except ImportError:
_thread = None
import importlib
+import importlib.util
import os
import os.path
import shutil
@@ -111,7 +112,6 @@ class ImportTests(unittest.TestCase):
del sys.path[0]
support.unlink(temp_mod_name + '.py')
support.unlink(temp_mod_name + '.pyc')
- support.unlink(temp_mod_name + '.pyo')
def test_issue5604(self):
# Test cannot cover imp.load_compiled function.
@@ -194,7 +194,7 @@ class ImportTests(unittest.TestCase):
self.assertEqual(package.b, 2)
finally:
del sys.path[0]
- for ext in ('.py', '.pyc', '.pyo'):
+ for ext in ('.py', '.pyc'):
support.unlink(temp_mod_name + ext)
support.unlink(init_file_name + ext)
support.rmtree(test_package_name)
@@ -276,6 +276,29 @@ class ImportTests(unittest.TestCase):
self.skipTest("found module doesn't appear to be a C extension")
imp.load_module(name, None, *found[1:])
+ @requires_load_dynamic
+ def test_issue24748_load_module_skips_sys_modules_check(self):
+ name = 'test.imp_dummy'
+ try:
+ del sys.modules[name]
+ except KeyError:
+ pass
+ try:
+ module = importlib.import_module(name)
+ spec = importlib.util.find_spec('_testmultiphase')
+ module = imp.load_dynamic(name, spec.origin)
+ self.assertEqual(module.__name__, name)
+ self.assertEqual(module.__spec__.name, name)
+ self.assertEqual(module.__spec__.origin, spec.origin)
+ self.assertRaises(AttributeError, getattr, module, 'dummy_name')
+ self.assertEqual(module.int_const, 1969)
+ self.assertIs(sys.modules[name], module)
+ finally:
+ try:
+ del sys.modules[name]
+ except KeyError:
+ pass
+
@unittest.skipIf(sys.dont_write_bytecode,
"test meaningful only when writing bytecode")
def test_bug7732(self):
@@ -346,56 +369,6 @@ class PEP3147Tests(unittest.TestCase):
'qux.{}.pyc'.format(self.tag))
self.assertEqual(imp.cache_from_source(path, True), expect)
- def test_cache_from_source_no_cache_tag(self):
- # Non cache tag means NotImplementedError.
- with support.swap_attr(sys.implementation, 'cache_tag', None):
- with self.assertRaises(NotImplementedError):
- imp.cache_from_source('whatever.py')
-
- def test_cache_from_source_no_dot(self):
- # Directory with a dot, filename without dot.
- path = os.path.join('foo.bar', 'file')
- expect = os.path.join('foo.bar', '__pycache__',
- 'file{}.pyc'.format(self.tag))
- self.assertEqual(imp.cache_from_source(path, True), expect)
-
- def test_cache_from_source_optimized(self):
- # Given the path to a .py file, return the path to its PEP 3147
- # defined .pyo file (i.e. under __pycache__).
- path = os.path.join('foo', 'bar', 'baz', 'qux.py')
- expect = os.path.join('foo', 'bar', 'baz', '__pycache__',
- 'qux.{}.pyo'.format(self.tag))
- self.assertEqual(imp.cache_from_source(path, False), expect)
-
- def test_cache_from_source_cwd(self):
- path = 'foo.py'
- expect = os.path.join('__pycache__', 'foo.{}.pyc'.format(self.tag))
- self.assertEqual(imp.cache_from_source(path, True), expect)
-
- def test_cache_from_source_override(self):
- # When debug_override is not None, it can be any true-ish or false-ish
- # value.
- path = os.path.join('foo', 'bar', 'baz.py')
- partial_expect = os.path.join('foo', 'bar', '__pycache__',
- 'baz.{}.py'.format(self.tag))
- self.assertEqual(imp.cache_from_source(path, []), partial_expect + 'o')
- self.assertEqual(imp.cache_from_source(path, [17]),
- partial_expect + 'c')
- # However if the bool-ishness can't be determined, the exception
- # propagates.
- class Bearish:
- def __bool__(self): raise RuntimeError
- with self.assertRaises(RuntimeError):
- imp.cache_from_source('/foo/bar/baz.py', Bearish())
-
- @unittest.skipUnless(os.sep == '\\' and os.altsep == '/',
- 'test meaningful only where os.altsep is defined')
- def test_sep_altsep_and_sep_cache_from_source(self):
- # Windows path and PEP 3147 where sep is right of altsep.
- self.assertEqual(
- imp.cache_from_source('\\foo\\bar\\baz/qux.py', True),
- '\\foo\\bar\\baz\\__pycache__\\qux.{}.pyc'.format(self.tag))
-
@unittest.skipUnless(sys.implementation.cache_tag is not None,
'requires sys.implementation.cache_tag to not be '
'None')
@@ -407,68 +380,6 @@ class PEP3147Tests(unittest.TestCase):
expect = os.path.join('foo', 'bar', 'baz', 'qux.py')
self.assertEqual(imp.source_from_cache(path), expect)
- def test_source_from_cache_no_cache_tag(self):
- # If sys.implementation.cache_tag is None, raise NotImplementedError.
- path = os.path.join('blah', '__pycache__', 'whatever.pyc')
- with support.swap_attr(sys.implementation, 'cache_tag', None):
- with self.assertRaises(NotImplementedError):
- imp.source_from_cache(path)
-
- def test_source_from_cache_bad_path(self):
- # When the path to a pyc file is not in PEP 3147 format, a ValueError
- # is raised.
- self.assertRaises(
- ValueError, imp.source_from_cache, '/foo/bar/bazqux.pyc')
-
- def test_source_from_cache_no_slash(self):
- # No slashes at all in path -> ValueError
- self.assertRaises(
- ValueError, imp.source_from_cache, 'foo.cpython-32.pyc')
-
- def test_source_from_cache_too_few_dots(self):
- # Too few dots in final path component -> ValueError
- self.assertRaises(
- ValueError, imp.source_from_cache, '__pycache__/foo.pyc')
-
- def test_source_from_cache_too_many_dots(self):
- # Too many dots in final path component -> ValueError
- self.assertRaises(
- ValueError, imp.source_from_cache,
- '__pycache__/foo.cpython-32.foo.pyc')
-
- def test_source_from_cache_no__pycache__(self):
- # Another problem with the path -> ValueError
- self.assertRaises(
- ValueError, imp.source_from_cache,
- '/foo/bar/foo.cpython-32.foo.pyc')
-
- def test_package___file__(self):
- try:
- m = __import__('pep3147')
- except ImportError:
- pass
- else:
- self.fail("pep3147 module already exists: %r" % (m,))
- # Test that a package's __file__ points to the right source directory.
- os.mkdir('pep3147')
- sys.path.insert(0, os.curdir)
- def cleanup():
- if sys.path[0] == os.curdir:
- del sys.path[0]
- shutil.rmtree('pep3147')
- self.addCleanup(cleanup)
- # Touch the __init__.py file.
- support.create_empty_file('pep3147/__init__.py')
- importlib.invalidate_caches()
- expected___file__ = os.sep.join(('.', 'pep3147', '__init__.py'))
- m = __import__('pep3147')
- self.assertEqual(m.__file__, expected___file__, (m.__file__, m.__path__, sys.path, sys.path_importer_cache))
- # Ensure we load the pyc file.
- support.unload('pep3147')
- m = __import__('pep3147')
- support.unload('pep3147')
- self.assertEqual(m.__file__, expected___file__, (m.__file__, m.__path__, sys.path, sys.path_importer_cache))
-
class NullImporterTests(unittest.TestCase):
@unittest.skipIf(support.TESTFN_UNENCODABLE is None,
diff --git a/Lib/test/test_import.py b/Lib/test/test_import/__init__.py
index b4842c54b5..1e33274b87 100644
--- a/Lib/test/test_import.py
+++ b/Lib/test/test_import/__init__.py
@@ -1,7 +1,7 @@
# We import importlib *ASAP* in order to test #15386
import importlib
import importlib.util
-from importlib._bootstrap import _get_sourcefile
+from importlib._bootstrap_external import _get_sourcefile
import builtins
import marshal
import os
@@ -21,8 +21,9 @@ import test.support
from test.support import (
EnvironmentVarGuard, TESTFN, check_warnings, forget, is_jython,
make_legacy_pyc, rmtree, run_unittest, swap_attr, swap_item, temp_umask,
- unlink, unload, create_empty_file, cpython_only, TESTFN_UNENCODABLE)
-from test import script_helper
+ unlink, unload, create_empty_file, cpython_only, TESTFN_UNENCODABLE,
+ temp_dir)
+from test.support import script_helper
skip_if_dont_write_bytecode = unittest.skipIf(
@@ -32,7 +33,6 @@ skip_if_dont_write_bytecode = unittest.skipIf(
def remove_files(name):
for f in (name + ".py",
name + ".pyc",
- name + ".pyo",
name + ".pyw",
name + "$py.class"):
unlink(f)
@@ -46,7 +46,7 @@ def _ready_to_import(name=None, source=""):
# temporarily clears the module from sys.modules (if any)
# reverts or removes the module when cleaning up
name = name or "spam"
- with script_helper.temp_dir() as tempdir:
+ with temp_dir() as tempdir:
path = script_helper.make_script(tempdir, name, source)
old_module = sys.modules.pop(name, None)
try:
@@ -84,7 +84,6 @@ class ImportTests(unittest.TestCase):
def test_with_extension(ext):
# The extension is normally ".py", perhaps ".pyw".
source = TESTFN + ext
- pyo = TESTFN + ".pyo"
if is_jython:
pyc = TESTFN + "$py.class"
else:
@@ -115,7 +114,6 @@ class ImportTests(unittest.TestCase):
forget(TESTFN)
unlink(source)
unlink(pyc)
- unlink(pyo)
sys.path.insert(0, os.curdir)
try:
@@ -138,7 +136,7 @@ class ImportTests(unittest.TestCase):
f.write(']')
try:
- # Compile & remove .py file; we only need .pyc (or .pyo).
+ # Compile & remove .py file; we only need .pyc.
# Bytecode must be relocated from the PEP 3147 bytecode-only location.
py_compile.compile(filename)
finally:
@@ -252,7 +250,7 @@ class ImportTests(unittest.TestCase):
importlib.invalidate_caches()
mod = __import__(TESTFN)
base, ext = os.path.splitext(mod.__file__)
- self.assertIn(ext, ('.pyc', '.pyo'))
+ self.assertEqual(ext, '.pyc')
finally:
del sys.path[0]
remove_files(TESTFN)
@@ -280,6 +278,7 @@ class ImportTests(unittest.TestCase):
"""))
script_helper.assert_python_ok(testfn)
+ @skip_if_dont_write_bytecode
def test_timestamp_overflow(self):
# A modification timestamp larger than 2**32 should not be a problem
# when importing a module (issue #11235).
@@ -294,7 +293,8 @@ class ImportTests(unittest.TestCase):
except OverflowError:
self.skipTest("cannot set modification time to large integer")
except OSError as e:
- if e.errno != getattr(errno, 'EOVERFLOW', None):
+ if e.errno not in (getattr(errno, 'EOVERFLOW', None),
+ getattr(errno, 'EINVAL', None)):
raise
self.skipTest("cannot set modification time to large integer ({})".format(e))
__import__(TESTFN)
@@ -325,10 +325,23 @@ class ImportTests(unittest.TestCase):
with self.assertRaisesRegex(ImportError, "^cannot import name 'bogus'"):
from re import bogus
+ def test_from_import_AttributeError(self):
+ # Issue #24492: trying to import an attribute that raises an
+ # AttributeError should lead to an ImportError.
+ class AlwaysAttributeError:
+ def __getattr__(self, _):
+ raise AttributeError
+
+ module_name = 'test_from_import_AttributeError'
+ self.addCleanup(unload, module_name)
+ sys.modules[module_name] = AlwaysAttributeError()
+ with self.assertRaises(ImportError):
+ from test_from_import_AttributeError import does_not_exist
+
@skip_if_dont_write_bytecode
class FilePermissionTests(unittest.TestCase):
- # tests for file mode on cached .pyc/.pyo files
+ # tests for file mode on cached .pyc files
@unittest.skipUnless(os.name == 'posix',
"test meaningful only on posix systems")
@@ -339,7 +352,7 @@ class FilePermissionTests(unittest.TestCase):
module = __import__(name)
if not os.path.exists(cached_path):
self.fail("__import__ did not result in creation of "
- "either a .pyc or .pyo file")
+ "a .pyc file")
stat_info = os.stat(cached_path)
# Check that the umask is respected, and the executable bits
@@ -358,7 +371,7 @@ class FilePermissionTests(unittest.TestCase):
__import__(name)
if not os.path.exists(cached_path):
self.fail("__import__ did not result in creation of "
- "either a .pyc or .pyo file")
+ "a .pyc file")
stat_info = os.stat(cached_path)
self.assertEqual(oct(stat.S_IMODE(stat_info.st_mode)), oct(mode))
@@ -373,7 +386,7 @@ class FilePermissionTests(unittest.TestCase):
__import__(name)
if not os.path.exists(cached_path):
self.fail("__import__ did not result in creation of "
- "either a .pyc or .pyo file")
+ "a .pyc file")
stat_info = os.stat(cached_path)
expected = mode | 0o200 # Account for fix for issue #6074
@@ -404,10 +417,7 @@ class FilePermissionTests(unittest.TestCase):
unlink(path)
unload(name)
importlib.invalidate_caches()
- if __debug__:
- bytecode_only = path + "c"
- else:
- bytecode_only = path + "o"
+ bytecode_only = path + "c"
os.rename(importlib.util.cache_from_source(path), bytecode_only)
m = __import__(name)
self.assertEqual(m.x, 'rewritten')
@@ -568,7 +578,7 @@ class RelativeImportTests(unittest.TestCase):
def test_relimport_star(self):
# This will import * from .test_import.
- from . import relimport
+ from .. import relimport
self.assertTrue(hasattr(relimport, "RelativeImportTests"))
def test_issue3221(self):
@@ -631,9 +641,7 @@ class OverridingImportBuiltinTests(unittest.TestCase):
class PycacheTests(unittest.TestCase):
- # Test the various PEP 3147 related behaviors.
-
- tag = sys.implementation.cache_tag
+ # Test the various PEP 3147/488-related behaviors.
def _clean(self):
forget(TESTFN)
@@ -658,9 +666,10 @@ class PycacheTests(unittest.TestCase):
self.assertFalse(os.path.exists('__pycache__'))
__import__(TESTFN)
self.assertTrue(os.path.exists('__pycache__'))
- self.assertTrue(os.path.exists(os.path.join(
- '__pycache__', '{}.{}.py{}'.format(
- TESTFN, self.tag, 'c' if __debug__ else 'o'))))
+ pyc_path = importlib.util.cache_from_source(self.source)
+ self.assertTrue(os.path.exists(pyc_path),
+ 'bytecode file {!r} for {!r} does not '
+ 'exist'.format(pyc_path, TESTFN))
@unittest.skipUnless(os.name == 'posix',
"test meaningful only on posix systems")
@@ -673,8 +682,10 @@ class PycacheTests(unittest.TestCase):
with temp_umask(0o222):
__import__(TESTFN)
self.assertTrue(os.path.exists('__pycache__'))
- self.assertFalse(os.path.exists(os.path.join(
- '__pycache__', '{}.{}.pyc'.format(TESTFN, self.tag))))
+ pyc_path = importlib.util.cache_from_source(self.source)
+ self.assertFalse(os.path.exists(pyc_path),
+ 'bytecode file {!r} for {!r} '
+ 'exists'.format(pyc_path, TESTFN))
@skip_if_dont_write_bytecode
def test_missing_source(self):
@@ -849,19 +860,27 @@ class ImportlibBootstrapTests(unittest.TestCase):
self.assertEqual(mod.__package__, 'importlib')
self.assertTrue(mod.__file__.endswith('_bootstrap.py'), mod.__file__)
+ def test_frozen_importlib_external_is_bootstrap_external(self):
+ from importlib import _bootstrap_external
+ mod = sys.modules['_frozen_importlib_external']
+ self.assertIs(mod, _bootstrap_external)
+ self.assertEqual(mod.__name__, 'importlib._bootstrap_external')
+ self.assertEqual(mod.__package__, 'importlib')
+ self.assertTrue(mod.__file__.endswith('_bootstrap_external.py'), mod.__file__)
+
def test_there_can_be_only_one(self):
# Issue #15386 revealed a tricky loophole in the bootstrapping
# This test is technically redundant, since the bug caused importing
# this test module to crash completely, but it helps prove the point
from importlib import machinery
mod = sys.modules['_frozen_importlib']
- self.assertIs(machinery.FileFinder, mod.FileFinder)
+ self.assertIs(machinery.ModuleSpec, mod.ModuleSpec)
@cpython_only
class GetSourcefileTests(unittest.TestCase):
- """Test importlib._bootstrap._get_sourcefile() as used by the C API.
+ """Test importlib._bootstrap_external._get_sourcefile() as used by the C API.
Because of the peculiarities of the need of this function, the tests are
knowingly whitebox tests.
@@ -871,7 +890,7 @@ class GetSourcefileTests(unittest.TestCase):
def test_get_sourcefile(self):
# Given a valid bytecode path, return the path to the corresponding
# source file if it exists.
- with mock.patch('importlib._bootstrap._path_isfile') as _path_isfile:
+ with mock.patch('importlib._bootstrap_external._path_isfile') as _path_isfile:
_path_isfile.return_value = True;
path = TESTFN + '.pyc'
expect = TESTFN + '.py'
@@ -880,7 +899,7 @@ class GetSourcefileTests(unittest.TestCase):
def test_get_sourcefile_no_source(self):
# Given a valid bytecode path without a corresponding source path,
# return the original bytecode path.
- with mock.patch('importlib._bootstrap._path_isfile') as _path_isfile:
+ with mock.patch('importlib._bootstrap_external._path_isfile') as _path_isfile:
_path_isfile.return_value = False;
path = TESTFN + '.pyc'
self.assertEqual(_get_sourcefile(path), path)
@@ -1035,7 +1054,7 @@ class ImportTracebackTests(unittest.TestCase):
# We simulate a bug in importlib and check that it's not stripped
# away from the traceback.
self.create_module("foo", "")
- importlib = sys.modules['_frozen_importlib']
+ importlib = sys.modules['_frozen_importlib_external']
if 'load_module' in vars(importlib.SourceLoader):
old_exec_module = importlib.SourceLoader.exec_module
else:
@@ -1068,6 +1087,46 @@ class ImportTracebackTests(unittest.TestCase):
__isolated=False)
+class CircularImportTests(unittest.TestCase):
+
+ """See the docstrings of the modules being imported for the purpose of the
+ test."""
+
+ def tearDown(self):
+ """Make sure no modules pre-exist in sys.modules which are being used to
+ test."""
+ for key in list(sys.modules.keys()):
+ if key.startswith('test.test_import.data.circular_imports'):
+ del sys.modules[key]
+
+ def test_direct(self):
+ try:
+ import test.test_import.data.circular_imports.basic
+ except ImportError:
+ self.fail('circular import through relative imports failed')
+
+ def test_indirect(self):
+ try:
+ import test.test_import.data.circular_imports.indirect
+ except ImportError:
+ self.fail('relative import in module contributing to circular '
+ 'import failed')
+
+ def test_subpackage(self):
+ try:
+ import test.test_import.data.circular_imports.subpackage
+ except ImportError:
+ self.fail('circular import involving a subpackage failed')
+
+ def test_rebinding(self):
+ try:
+ import test.test_import.data.circular_imports.rebinding as rebinding
+ except ImportError:
+ self.fail('circular import with rebinding of module attribute failed')
+ from test.test_import.data.circular_imports.subpkg import util
+ self.assertIs(util.util, rebinding.util)
+
+
if __name__ == '__main__':
# Test needs to be a package, so we can do relative imports.
unittest.main()
diff --git a/Lib/test/test_import/__main__.py b/Lib/test/test_import/__main__.py
new file mode 100644
index 0000000000..24f02a171a
--- /dev/null
+++ b/Lib/test/test_import/__main__.py
@@ -0,0 +1,3 @@
+import unittest
+
+unittest.main('test.test_import')
diff --git a/Lib/test/test_import/data/circular_imports/basic.py b/Lib/test/test_import/data/circular_imports/basic.py
new file mode 100644
index 0000000000..3e41e395db
--- /dev/null
+++ b/Lib/test/test_import/data/circular_imports/basic.py
@@ -0,0 +1,2 @@
+"""Circular imports through direct, relative imports."""
+from . import basic2
diff --git a/Lib/test/test_import/data/circular_imports/basic2.py b/Lib/test/test_import/data/circular_imports/basic2.py
new file mode 100644
index 0000000000..00bd2f29f3
--- /dev/null
+++ b/Lib/test/test_import/data/circular_imports/basic2.py
@@ -0,0 +1 @@
+from . import basic
diff --git a/Lib/test/test_import/data/circular_imports/indirect.py b/Lib/test/test_import/data/circular_imports/indirect.py
new file mode 100644
index 0000000000..6925788d60
--- /dev/null
+++ b/Lib/test/test_import/data/circular_imports/indirect.py
@@ -0,0 +1 @@
+from . import basic, basic2
diff --git a/Lib/test/test_import/data/circular_imports/rebinding.py b/Lib/test/test_import/data/circular_imports/rebinding.py
new file mode 100644
index 0000000000..2b77375559
--- /dev/null
+++ b/Lib/test/test_import/data/circular_imports/rebinding.py
@@ -0,0 +1,3 @@
+"""Test the binding of names when a circular import shares the same name as an
+attribute."""
+from .rebinding2 import util
diff --git a/Lib/test/test_import/data/circular_imports/rebinding2.py b/Lib/test/test_import/data/circular_imports/rebinding2.py
new file mode 100644
index 0000000000..57a9e6945d
--- /dev/null
+++ b/Lib/test/test_import/data/circular_imports/rebinding2.py
@@ -0,0 +1,3 @@
+from .subpkg import util
+from . import rebinding
+util = util.util
diff --git a/Lib/test/test_import/data/circular_imports/subpackage.py b/Lib/test/test_import/data/circular_imports/subpackage.py
new file mode 100644
index 0000000000..7b412f76fc
--- /dev/null
+++ b/Lib/test/test_import/data/circular_imports/subpackage.py
@@ -0,0 +1,2 @@
+"""Circular import involving a sub-package."""
+from .subpkg import subpackage2
diff --git a/Lib/test/test_import/data/circular_imports/subpkg/subpackage2.py b/Lib/test/test_import/data/circular_imports/subpkg/subpackage2.py
new file mode 100644
index 0000000000..17b893a1a2
--- /dev/null
+++ b/Lib/test/test_import/data/circular_imports/subpkg/subpackage2.py
@@ -0,0 +1,2 @@
+#from .util import util
+from .. import subpackage
diff --git a/Lib/test/test_import/data/circular_imports/subpkg/util.py b/Lib/test/test_import/data/circular_imports/subpkg/util.py
new file mode 100644
index 0000000000..343bd843b2
--- /dev/null
+++ b/Lib/test/test_import/data/circular_imports/subpkg/util.py
@@ -0,0 +1,2 @@
+def util():
+ pass
diff --git a/Lib/test/test_import/data/circular_imports/util.py b/Lib/test/test_import/data/circular_imports/util.py
new file mode 100644
index 0000000000..343bd843b2
--- /dev/null
+++ b/Lib/test/test_import/data/circular_imports/util.py
@@ -0,0 +1,2 @@
+def util():
+ pass
diff --git a/Lib/test/test_importlib/builtin/test_finder.py b/Lib/test/test_importlib/builtin/test_finder.py
index 934562feb6..a2e6e1edc3 100644
--- a/Lib/test/test_importlib/builtin/test_finder.py
+++ b/Lib/test/test_importlib/builtin/test_finder.py
@@ -1,21 +1,21 @@
from .. import abc
from .. import util
-from . import util as builtin_util
-frozen_machinery, source_machinery = util.import_importlib('importlib.machinery')
+machinery = util.import_importlib('importlib.machinery')
import sys
import unittest
+@unittest.skipIf(util.BUILTINS.good_name is None, 'no reasonable builtin module')
class FindSpecTests(abc.FinderTests):
"""Test find_spec() for built-in modules."""
def test_module(self):
# Common case.
- with util.uncache(builtin_util.NAME):
- found = self.machinery.BuiltinImporter.find_spec(builtin_util.NAME)
+ with util.uncache(util.BUILTINS.good_name):
+ found = self.machinery.BuiltinImporter.find_spec(util.BUILTINS.good_name)
self.assertTrue(found)
self.assertEqual(found.origin, 'built-in')
@@ -39,23 +39,26 @@ class FindSpecTests(abc.FinderTests):
def test_ignore_path(self):
# The value for 'path' should always trigger a failed import.
- with util.uncache(builtin_util.NAME):
- spec = self.machinery.BuiltinImporter.find_spec(builtin_util.NAME,
+ with util.uncache(util.BUILTINS.good_name):
+ spec = self.machinery.BuiltinImporter.find_spec(util.BUILTINS.good_name,
['pkg'])
self.assertIsNone(spec)
-Frozen_FindSpecTests, Source_FindSpecTests = util.test_both(FindSpecTests,
- machinery=[frozen_machinery, source_machinery])
+(Frozen_FindSpecTests,
+ Source_FindSpecTests
+ ) = util.test_both(FindSpecTests, machinery=machinery)
+
+@unittest.skipIf(util.BUILTINS.good_name is None, 'no reasonable builtin module')
class FinderTests(abc.FinderTests):
"""Test find_module() for built-in modules."""
def test_module(self):
# Common case.
- with util.uncache(builtin_util.NAME):
- found = self.machinery.BuiltinImporter.find_module(builtin_util.NAME)
+ with util.uncache(util.BUILTINS.good_name):
+ found = self.machinery.BuiltinImporter.find_module(util.BUILTINS.good_name)
self.assertTrue(found)
self.assertTrue(hasattr(found, 'load_module'))
@@ -72,13 +75,15 @@ class FinderTests(abc.FinderTests):
def test_ignore_path(self):
# The value for 'path' should always trigger a failed import.
- with util.uncache(builtin_util.NAME):
- loader = self.machinery.BuiltinImporter.find_module(builtin_util.NAME,
+ with util.uncache(util.BUILTINS.good_name):
+ loader = self.machinery.BuiltinImporter.find_module(util.BUILTINS.good_name,
['pkg'])
self.assertIsNone(loader)
-Frozen_FinderTests, Source_FinderTests = util.test_both(FinderTests,
- machinery=[frozen_machinery, source_machinery])
+
+(Frozen_FinderTests,
+ Source_FinderTests
+ ) = util.test_both(FinderTests, machinery=machinery)
if __name__ == '__main__':
diff --git a/Lib/test/test_importlib/builtin/test_loader.py b/Lib/test/test_importlib/builtin/test_loader.py
index 1f8357402f..b1349ec5da 100644
--- a/Lib/test/test_importlib/builtin/test_loader.py
+++ b/Lib/test/test_importlib/builtin/test_loader.py
@@ -1,14 +1,13 @@
from .. import abc
from .. import util
-from . import util as builtin_util
-frozen_machinery, source_machinery = util.import_importlib('importlib.machinery')
+machinery = util.import_importlib('importlib.machinery')
import sys
import types
import unittest
-
+@unittest.skipIf(util.BUILTINS.good_name is None, 'no reasonable builtin module')
class LoaderTests(abc.LoaderTests):
"""Test load_module() for built-in modules."""
@@ -29,8 +28,8 @@ class LoaderTests(abc.LoaderTests):
def test_module(self):
# Common case.
- with util.uncache(builtin_util.NAME):
- module = self.load_module(builtin_util.NAME)
+ with util.uncache(util.BUILTINS.good_name):
+ module = self.load_module(util.BUILTINS.good_name)
self.verify(module)
# Built-in modules cannot be a package.
@@ -41,9 +40,9 @@ class LoaderTests(abc.LoaderTests):
def test_module_reuse(self):
# Test that the same module is used in a reload.
- with util.uncache(builtin_util.NAME):
- module1 = self.load_module(builtin_util.NAME)
- module2 = self.load_module(builtin_util.NAME)
+ with util.uncache(util.BUILTINS.good_name):
+ module1 = self.load_module(util.BUILTINS.good_name)
+ module2 = self.load_module(util.BUILTINS.good_name)
self.assertIs(module1, module2)
def test_unloadable(self):
@@ -66,40 +65,43 @@ class LoaderTests(abc.LoaderTests):
self.assertEqual(cm.exception.name, module_name)
-Frozen_LoaderTests, Source_LoaderTests = util.test_both(LoaderTests,
- machinery=[frozen_machinery, source_machinery])
+(Frozen_LoaderTests,
+ Source_LoaderTests
+ ) = util.test_both(LoaderTests, machinery=machinery)
+@unittest.skipIf(util.BUILTINS.good_name is None, 'no reasonable builtin module')
class InspectLoaderTests:
"""Tests for InspectLoader methods for BuiltinImporter."""
def test_get_code(self):
# There is no code object.
- result = self.machinery.BuiltinImporter.get_code(builtin_util.NAME)
+ result = self.machinery.BuiltinImporter.get_code(util.BUILTINS.good_name)
self.assertIsNone(result)
def test_get_source(self):
# There is no source.
- result = self.machinery.BuiltinImporter.get_source(builtin_util.NAME)
+ result = self.machinery.BuiltinImporter.get_source(util.BUILTINS.good_name)
self.assertIsNone(result)
def test_is_package(self):
# Cannot be a package.
- result = self.machinery.BuiltinImporter.is_package(builtin_util.NAME)
+ result = self.machinery.BuiltinImporter.is_package(util.BUILTINS.good_name)
self.assertFalse(result)
+ @unittest.skipIf(util.BUILTINS.bad_name is None, 'all modules are built in')
def test_not_builtin(self):
# Modules not built-in should raise ImportError.
for meth_name in ('get_code', 'get_source', 'is_package'):
method = getattr(self.machinery.BuiltinImporter, meth_name)
with self.assertRaises(ImportError) as cm:
- method(builtin_util.BAD_NAME)
- self.assertRaises(builtin_util.BAD_NAME)
+ method(util.BUILTINS.bad_name)
+
-Frozen_InspectLoaderTests, Source_InspectLoaderTests = util.test_both(
- InspectLoaderTests,
- machinery=[frozen_machinery, source_machinery])
+(Frozen_InspectLoaderTests,
+ Source_InspectLoaderTests
+ ) = util.test_both(InspectLoaderTests, machinery=machinery)
if __name__ == '__main__':
diff --git a/Lib/test/test_importlib/builtin/util.py b/Lib/test/test_importlib/builtin/util.py
deleted file mode 100644
index 5704699ee2..0000000000
--- a/Lib/test/test_importlib/builtin/util.py
+++ /dev/null
@@ -1,7 +0,0 @@
-import sys
-
-assert 'errno' in sys.builtin_module_names
-NAME = 'errno'
-
-assert 'importlib' not in sys.builtin_module_names
-BAD_NAME = 'importlib'
diff --git a/Lib/test/test_importlib/extension/test_case_sensitivity.py b/Lib/test/test_importlib/extension/test_case_sensitivity.py
index bb2528e626..706c3e4b87 100644
--- a/Lib/test/test_importlib/extension/test_case_sensitivity.py
+++ b/Lib/test/test_importlib/extension/test_case_sensitivity.py
@@ -1,25 +1,24 @@
-from importlib import _bootstrap
+from importlib import _bootstrap_external
import sys
from test import support
import unittest
from .. import util
-from . import util as ext_util
-frozen_machinery, source_machinery = util.import_importlib('importlib.machinery')
+machinery = util.import_importlib('importlib.machinery')
# XXX find_spec tests
-@unittest.skipIf(ext_util.FILENAME is None, '_testcapi not available')
+@unittest.skipIf(util.EXTENSIONS.filename is None, '_testcapi not available')
@util.case_insensitive_tests
class ExtensionModuleCaseSensitivityTest:
def find_module(self):
- good_name = ext_util.NAME
+ good_name = util.EXTENSIONS.name
bad_name = good_name.upper()
assert good_name != bad_name
- finder = self.machinery.FileFinder(ext_util.PATH,
+ finder = self.machinery.FileFinder(util.EXTENSIONS.path,
(self.machinery.ExtensionFileLoader,
self.machinery.EXTENSION_SUFFIXES))
return finder.find_module(bad_name)
@@ -27,7 +26,7 @@ class ExtensionModuleCaseSensitivityTest:
def test_case_sensitive(self):
with support.EnvironmentVarGuard() as env:
env.unset('PYTHONCASEOK')
- if b'PYTHONCASEOK' in _bootstrap._os.environ:
+ if b'PYTHONCASEOK' in _bootstrap_external._os.environ:
self.skipTest('os.environ changes not reflected in '
'_os.environ')
loader = self.find_module()
@@ -36,15 +35,16 @@ class ExtensionModuleCaseSensitivityTest:
def test_case_insensitivity(self):
with support.EnvironmentVarGuard() as env:
env.set('PYTHONCASEOK', '1')
- if b'PYTHONCASEOK' not in _bootstrap._os.environ:
+ if b'PYTHONCASEOK' not in _bootstrap_external._os.environ:
self.skipTest('os.environ changes not reflected in '
'_os.environ')
loader = self.find_module()
self.assertTrue(hasattr(loader, 'load_module'))
-Frozen_ExtensionCaseSensitivity, Source_ExtensionCaseSensitivity = util.test_both(
- ExtensionModuleCaseSensitivityTest,
- machinery=[frozen_machinery, source_machinery])
+
+(Frozen_ExtensionCaseSensitivity,
+ Source_ExtensionCaseSensitivity
+ ) = util.test_both(ExtensionModuleCaseSensitivityTest, machinery=machinery)
if __name__ == '__main__':
diff --git a/Lib/test/test_importlib/extension/test_finder.py b/Lib/test/test_importlib/extension/test_finder.py
index 990f29c4e5..71bf67febd 100644
--- a/Lib/test/test_importlib/extension/test_finder.py
+++ b/Lib/test/test_importlib/extension/test_finder.py
@@ -1,8 +1,7 @@
from .. import abc
-from .. import util as test_util
-from . import util
+from .. import util
-machinery = test_util.import_importlib('importlib.machinery')
+machinery = util.import_importlib('importlib.machinery')
import unittest
import warnings
@@ -14,7 +13,7 @@ class FinderTests(abc.FinderTests):
"""Test the finder for extension modules."""
def find_module(self, fullname):
- importer = self.machinery.FileFinder(util.PATH,
+ importer = self.machinery.FileFinder(util.EXTENSIONS.path,
(self.machinery.ExtensionFileLoader,
self.machinery.EXTENSION_SUFFIXES))
with warnings.catch_warnings():
@@ -22,7 +21,7 @@ class FinderTests(abc.FinderTests):
return importer.find_module(fullname)
def test_module(self):
- self.assertTrue(self.find_module(util.NAME))
+ self.assertTrue(self.find_module(util.EXTENSIONS.name))
# No extension module as an __init__ available for testing.
test_package = test_package_in_package = None
@@ -36,8 +35,10 @@ class FinderTests(abc.FinderTests):
def test_failure(self):
self.assertIsNone(self.find_module('asdfjkl;'))
-Frozen_FinderTests, Source_FinderTests = test_util.test_both(
- FinderTests, machinery=machinery)
+
+(Frozen_FinderTests,
+ Source_FinderTests
+ ) = util.test_both(FinderTests, machinery=machinery)
if __name__ == '__main__':
diff --git a/Lib/test/test_importlib/extension/test_loader.py b/Lib/test/test_importlib/extension/test_loader.py
index fd9abf269b..154a793ae8 100644
--- a/Lib/test/test_importlib/extension/test_loader.py
+++ b/Lib/test/test_importlib/extension/test_loader.py
@@ -1,4 +1,3 @@
-from . import util as ext_util
from .. import abc
from .. import util
@@ -8,6 +7,8 @@ import os.path
import sys
import types
import unittest
+import importlib.util
+import importlib
class LoaderTests(abc.LoaderTests):
@@ -15,8 +16,8 @@ class LoaderTests(abc.LoaderTests):
"""Test load_module() for extension modules."""
def setUp(self):
- self.loader = self.machinery.ExtensionFileLoader(ext_util.NAME,
- ext_util.FILEPATH)
+ self.loader = self.machinery.ExtensionFileLoader(util.EXTENSIONS.name,
+ util.EXTENSIONS.file_path)
def load_module(self, fullname):
return self.loader.load_module(fullname)
@@ -29,23 +30,23 @@ class LoaderTests(abc.LoaderTests):
self.load_module('XXX')
def test_equality(self):
- other = self.machinery.ExtensionFileLoader(ext_util.NAME,
- ext_util.FILEPATH)
+ other = self.machinery.ExtensionFileLoader(util.EXTENSIONS.name,
+ util.EXTENSIONS.file_path)
self.assertEqual(self.loader, other)
def test_inequality(self):
- other = self.machinery.ExtensionFileLoader('_' + ext_util.NAME,
- ext_util.FILEPATH)
+ other = self.machinery.ExtensionFileLoader('_' + util.EXTENSIONS.name,
+ util.EXTENSIONS.file_path)
self.assertNotEqual(self.loader, other)
def test_module(self):
- with util.uncache(ext_util.NAME):
- module = self.load_module(ext_util.NAME)
- for attr, value in [('__name__', ext_util.NAME),
- ('__file__', ext_util.FILEPATH),
+ with util.uncache(util.EXTENSIONS.name):
+ module = self.load_module(util.EXTENSIONS.name)
+ for attr, value in [('__name__', util.EXTENSIONS.name),
+ ('__file__', util.EXTENSIONS.file_path),
('__package__', '')]:
self.assertEqual(getattr(module, attr), value)
- self.assertIn(ext_util.NAME, sys.modules)
+ self.assertIn(util.EXTENSIONS.name, sys.modules)
self.assertIsInstance(module.__loader__,
self.machinery.ExtensionFileLoader)
@@ -56,9 +57,9 @@ class LoaderTests(abc.LoaderTests):
test_lacking_parent = None
def test_module_reuse(self):
- with util.uncache(ext_util.NAME):
- module1 = self.load_module(ext_util.NAME)
- module2 = self.load_module(ext_util.NAME)
+ with util.uncache(util.EXTENSIONS.name):
+ module1 = self.load_module(util.EXTENSIONS.name)
+ module2 = self.load_module(util.EXTENSIONS.name)
self.assertIs(module1, module2)
# No easy way to trigger a failure after a successful import.
@@ -71,15 +72,196 @@ class LoaderTests(abc.LoaderTests):
self.assertEqual(cm.exception.name, name)
def test_is_package(self):
- self.assertFalse(self.loader.is_package(ext_util.NAME))
+ self.assertFalse(self.loader.is_package(util.EXTENSIONS.name))
for suffix in self.machinery.EXTENSION_SUFFIXES:
path = os.path.join('some', 'path', 'pkg', '__init__' + suffix)
loader = self.machinery.ExtensionFileLoader('pkg', path)
self.assertTrue(loader.is_package('pkg'))
-Frozen_LoaderTests, Source_LoaderTests = util.test_both(
- LoaderTests, machinery=machinery)
+(Frozen_LoaderTests,
+ Source_LoaderTests
+ ) = util.test_both(LoaderTests, machinery=machinery)
+class MultiPhaseExtensionModuleTests(abc.LoaderTests):
+ """Test loading extension modules with multi-phase initialization (PEP 489)
+ """
+
+ def setUp(self):
+ self.name = '_testmultiphase'
+ finder = self.machinery.FileFinder(None)
+ self.spec = importlib.util.find_spec(self.name)
+ assert self.spec
+ self.loader = self.machinery.ExtensionFileLoader(
+ self.name, self.spec.origin)
+
+ # No extension module as __init__ available for testing.
+ test_package = None
+
+ # No extension module in a package available for testing.
+ test_lacking_parent = None
+
+ # Handling failure on reload is the up to the module.
+ test_state_after_failure = None
+
+ def test_module(self):
+ '''Test loading an extension module'''
+ with util.uncache(self.name):
+ module = self.load_module()
+ for attr, value in [('__name__', self.name),
+ ('__file__', self.spec.origin),
+ ('__package__', '')]:
+ self.assertEqual(getattr(module, attr), value)
+ with self.assertRaises(AttributeError):
+ module.__path__
+ self.assertIs(module, sys.modules[self.name])
+ self.assertIsInstance(module.__loader__,
+ self.machinery.ExtensionFileLoader)
+
+ def test_functionality(self):
+ '''Test basic functionality of stuff defined in an extension module'''
+ with util.uncache(self.name):
+ module = self.load_module()
+ self.assertIsInstance(module, types.ModuleType)
+ ex = module.Example()
+ self.assertEqual(ex.demo('abcd'), 'abcd')
+ self.assertEqual(ex.demo(), None)
+ with self.assertRaises(AttributeError):
+ ex.abc
+ ex.abc = 0
+ self.assertEqual(ex.abc, 0)
+ self.assertEqual(module.foo(9, 9), 18)
+ self.assertIsInstance(module.Str(), str)
+ self.assertEqual(module.Str(1) + '23', '123')
+ with self.assertRaises(module.error):
+ raise module.error()
+ self.assertEqual(module.int_const, 1969)
+ self.assertEqual(module.str_const, 'something different')
+
+ def test_reload(self):
+ '''Test that reload didn't re-set the module's attributes'''
+ with util.uncache(self.name):
+ module = self.load_module()
+ ex_class = module.Example
+ importlib.reload(module)
+ self.assertIs(ex_class, module.Example)
+
+ def test_try_registration(self):
+ '''Assert that the PyState_{Find,Add,Remove}Module C API doesn't work'''
+ module = self.load_module()
+ with self.subTest('PyState_FindModule'):
+ self.assertEqual(module.call_state_registration_func(0), None)
+ with self.subTest('PyState_AddModule'):
+ with self.assertRaises(SystemError):
+ module.call_state_registration_func(1)
+ with self.subTest('PyState_RemoveModule'):
+ with self.assertRaises(SystemError):
+ module.call_state_registration_func(2)
+
+ def load_module(self):
+ '''Load the module from the test extension'''
+ return self.loader.load_module(self.name)
+
+ def load_module_by_name(self, fullname):
+ '''Load a module from the test extension by name'''
+ origin = self.spec.origin
+ loader = self.machinery.ExtensionFileLoader(fullname, origin)
+ spec = importlib.util.spec_from_loader(fullname, loader)
+ module = importlib.util.module_from_spec(spec)
+ loader.exec_module(module)
+ return module
+
+ def test_load_submodule(self):
+ '''Test loading a simulated submodule'''
+ module = self.load_module_by_name('pkg.' + self.name)
+ self.assertIsInstance(module, types.ModuleType)
+ self.assertEqual(module.__name__, 'pkg.' + self.name)
+ self.assertEqual(module.str_const, 'something different')
+
+ def test_load_short_name(self):
+ '''Test loading module with a one-character name'''
+ module = self.load_module_by_name('x')
+ self.assertIsInstance(module, types.ModuleType)
+ self.assertEqual(module.__name__, 'x')
+ self.assertEqual(module.str_const, 'something different')
+ self.assertNotIn('x', sys.modules)
+
+ def test_load_twice(self):
+ '''Test that 2 loads result in 2 module objects'''
+ module1 = self.load_module_by_name(self.name)
+ module2 = self.load_module_by_name(self.name)
+ self.assertIsNot(module1, module2)
+
+ def test_unloadable(self):
+ '''Test nonexistent module'''
+ name = 'asdfjkl;'
+ with self.assertRaises(ImportError) as cm:
+ self.load_module_by_name(name)
+ self.assertEqual(cm.exception.name, name)
+
+ def test_unloadable_nonascii(self):
+ '''Test behavior with nonexistent module with non-ASCII name'''
+ name = 'fo\xf3'
+ with self.assertRaises(ImportError) as cm:
+ self.load_module_by_name(name)
+ self.assertEqual(cm.exception.name, name)
+
+ def test_nonmodule(self):
+ '''Test returning a non-module object from create works'''
+ name = self.name + '_nonmodule'
+ mod = self.load_module_by_name(name)
+ self.assertNotEqual(type(mod), type(unittest))
+ self.assertEqual(mod.three, 3)
+
+ def test_null_slots(self):
+ '''Test that NULL slots aren't a problem'''
+ name = self.name + '_null_slots'
+ module = self.load_module_by_name(name)
+ self.assertIsInstance(module, types.ModuleType)
+ self.assertEqual(module.__name__, name)
+
+ def test_bad_modules(self):
+ '''Test SystemError is raised for misbehaving extensions'''
+ for name_base in [
+ 'bad_slot_large',
+ 'bad_slot_negative',
+ 'create_int_with_state',
+ 'negative_size',
+ 'export_null',
+ 'export_uninitialized',
+ 'export_raise',
+ 'export_unreported_exception',
+ 'create_null',
+ 'create_raise',
+ 'create_unreported_exception',
+ 'nonmodule_with_exec_slots',
+ 'exec_err',
+ 'exec_raise',
+ 'exec_unreported_exception',
+ ]:
+ with self.subTest(name_base):
+ name = self.name + '_' + name_base
+ with self.assertRaises(SystemError):
+ self.load_module_by_name(name)
+
+ def test_nonascii(self):
+ '''Test that modules with non-ASCII names can be loaded'''
+ # punycode behaves slightly differently in some-ASCII and no-ASCII
+ # cases, so test both
+ cases = [
+ (self.name + '_zkou\u0161ka_na\u010dten\xed', 'Czech'),
+ ('\uff3f\u30a4\u30f3\u30dd\u30fc\u30c8\u30c6\u30b9\u30c8',
+ 'Japanese'),
+ ]
+ for name, lang in cases:
+ with self.subTest(name):
+ module = self.load_module_by_name(name)
+ self.assertEqual(module.__name__, name)
+ self.assertEqual(module.__doc__, "Module named in %s" % lang)
+
+
+(Frozen_MultiPhaseExtensionModuleTests,
+ Source_MultiPhaseExtensionModuleTests
+ ) = util.test_both(MultiPhaseExtensionModuleTests, machinery=machinery)
if __name__ == '__main__':
diff --git a/Lib/test/test_importlib/extension/test_path_hook.py b/Lib/test/test_importlib/extension/test_path_hook.py
index 49d6734711..8f4b8bb161 100644
--- a/Lib/test/test_importlib/extension/test_path_hook.py
+++ b/Lib/test/test_importlib/extension/test_path_hook.py
@@ -1,7 +1,6 @@
-from .. import util as test_util
-from . import util
+from .. import util
-machinery = test_util.import_importlib('importlib.machinery')
+machinery = util.import_importlib('importlib.machinery')
import collections
import sys
@@ -22,10 +21,12 @@ class PathHookTests:
def test_success(self):
# Path hook should handle a directory where a known extension module
# exists.
- self.assertTrue(hasattr(self.hook(util.PATH), 'find_module'))
+ self.assertTrue(hasattr(self.hook(util.EXTENSIONS.path), 'find_module'))
-Frozen_PathHooksTests, Source_PathHooksTests = test_util.test_both(
- PathHookTests, machinery=machinery)
+
+(Frozen_PathHooksTests,
+ Source_PathHooksTests
+ ) = util.test_both(PathHookTests, machinery=machinery)
if __name__ == '__main__':
diff --git a/Lib/test/test_importlib/extension/util.py b/Lib/test/test_importlib/extension/util.py
deleted file mode 100644
index 8d089f0d7c..0000000000
--- a/Lib/test/test_importlib/extension/util.py
+++ /dev/null
@@ -1,19 +0,0 @@
-from importlib import machinery
-import os
-import sys
-
-PATH = None
-EXT = None
-FILENAME = None
-NAME = '_testcapi'
-try:
- for PATH in sys.path:
- for EXT in machinery.EXTENSION_SUFFIXES:
- FILENAME = NAME + EXT
- FILEPATH = os.path.join(PATH, FILENAME)
- if os.path.exists(os.path.join(PATH, FILENAME)):
- raise StopIteration
- else:
- PATH = EXT = FILENAME = FILEPATH = None
-except StopIteration:
- pass
diff --git a/Lib/test/test_importlib/frozen/test_finder.py b/Lib/test/test_importlib/frozen/test_finder.py
index f9f97f3851..519aa027d6 100644
--- a/Lib/test/test_importlib/frozen/test_finder.py
+++ b/Lib/test/test_importlib/frozen/test_finder.py
@@ -37,8 +37,10 @@ class FindSpecTests(abc.FinderTests):
spec = self.find('<not real>')
self.assertIsNone(spec)
-Frozen_FindSpecTests, Source_FindSpecTests = util.test_both(FindSpecTests,
- machinery=machinery)
+
+(Frozen_FindSpecTests,
+ Source_FindSpecTests
+ ) = util.test_both(FindSpecTests, machinery=machinery)
class FinderTests(abc.FinderTests):
@@ -72,8 +74,10 @@ class FinderTests(abc.FinderTests):
loader = self.find('<not real>')
self.assertIsNone(loader)
-Frozen_FinderTests, Source_FinderTests = util.test_both(FinderTests,
- machinery=machinery)
+
+(Frozen_FinderTests,
+ Source_FinderTests
+ ) = util.test_both(FinderTests, machinery=machinery)
if __name__ == '__main__':
diff --git a/Lib/test/test_importlib/frozen/test_loader.py b/Lib/test/test_importlib/frozen/test_loader.py
index 7c0146456d..603c7d7b19 100644
--- a/Lib/test/test_importlib/frozen/test_loader.py
+++ b/Lib/test/test_importlib/frozen/test_loader.py
@@ -85,8 +85,10 @@ class ExecModuleTests(abc.LoaderTests):
self.exec_module('_not_real')
self.assertEqual(cm.exception.name, '_not_real')
-Frozen_ExecModuleTests, Source_ExecModuleTests = util.test_both(ExecModuleTests,
- machinery=machinery)
+
+(Frozen_ExecModuleTests,
+ Source_ExecModuleTests
+ ) = util.test_both(ExecModuleTests, machinery=machinery)
class LoaderTests(abc.LoaderTests):
@@ -175,8 +177,10 @@ class LoaderTests(abc.LoaderTests):
self.machinery.FrozenImporter.load_module('_not_real')
self.assertEqual(cm.exception.name, '_not_real')
-Frozen_LoaderTests, Source_LoaderTests = util.test_both(LoaderTests,
- machinery=machinery)
+
+(Frozen_LoaderTests,
+ Source_LoaderTests
+ ) = util.test_both(LoaderTests, machinery=machinery)
class InspectLoaderTests:
@@ -214,8 +218,9 @@ class InspectLoaderTests:
method('importlib')
self.assertEqual(cm.exception.name, 'importlib')
-Frozen_ILTests, Source_ILTests = util.test_both(InspectLoaderTests,
- machinery=machinery)
+(Frozen_ILTests,
+ Source_ILTests
+ ) = util.test_both(InspectLoaderTests, machinery=machinery)
if __name__ == '__main__':
diff --git a/Lib/test/test_importlib/import_/test___loader__.py b/Lib/test/test_importlib/import_/test___loader__.py
index 6df80101fa..4b18093cf9 100644
--- a/Lib/test/test_importlib/import_/test___loader__.py
+++ b/Lib/test/test_importlib/import_/test___loader__.py
@@ -4,7 +4,6 @@ import types
import unittest
from .. import util
-from . import util as import_util
class SpecLoaderMock:
@@ -12,6 +11,9 @@ class SpecLoaderMock:
def find_spec(self, fullname, path=None, target=None):
return machinery.ModuleSpec(fullname, self)
+ def create_module(self, spec):
+ return None
+
def exec_module(self, module):
pass
@@ -24,8 +26,10 @@ class SpecLoaderAttributeTests:
module = self.__import__('blah')
self.assertEqual(loader, module.__loader__)
-Frozen_SpecTests, Source_SpecTests = util.test_both(
- SpecLoaderAttributeTests, __import__=import_util.__import__)
+
+(Frozen_SpecTests,
+ Source_SpecTests
+ ) = util.test_both(SpecLoaderAttributeTests, __import__=util.__import__)
class LoaderMock:
@@ -62,8 +66,9 @@ class LoaderAttributeTests:
self.assertEqual(loader, module.__loader__)
-Frozen_Tests, Source_Tests = util.test_both(LoaderAttributeTests,
- __import__=import_util.__import__)
+(Frozen_Tests,
+ Source_Tests
+ ) = util.test_both(LoaderAttributeTests, __import__=util.__import__)
if __name__ == '__main__':
diff --git a/Lib/test/test_importlib/import_/test___package__.py b/Lib/test/test_importlib/import_/test___package__.py
index 2e19725680..c7d3a2a204 100644
--- a/Lib/test/test_importlib/import_/test___package__.py
+++ b/Lib/test/test_importlib/import_/test___package__.py
@@ -6,7 +6,6 @@ of using the typical __path__/__name__ test).
"""
import unittest
from .. import util
-from . import util as import_util
class Using__package__:
@@ -70,17 +69,23 @@ class Using__package__:
with self.assertRaises(TypeError):
self.__import__('', globals, {}, ['relimport'], 1)
+
class Using__package__PEP302(Using__package__):
mock_modules = util.mock_modules
-Frozen_UsingPackagePEP302, Source_UsingPackagePEP302 = util.test_both(
- Using__package__PEP302, __import__=import_util.__import__)
-class Using__package__PEP302(Using__package__):
+(Frozen_UsingPackagePEP302,
+ Source_UsingPackagePEP302
+ ) = util.test_both(Using__package__PEP302, __import__=util.__import__)
+
+
+class Using__package__PEP451(Using__package__):
mock_modules = util.mock_spec
-Frozen_UsingPackagePEP451, Source_UsingPackagePEP451 = util.test_both(
- Using__package__PEP302, __import__=import_util.__import__)
+
+(Frozen_UsingPackagePEP451,
+ Source_UsingPackagePEP451
+ ) = util.test_both(Using__package__PEP451, __import__=util.__import__)
class Setting__package__:
@@ -95,7 +100,7 @@ class Setting__package__:
"""
- __import__ = import_util.__import__[1]
+ __import__ = util.__import__['Source']
# [top-level]
def test_top_level(self):
diff --git a/Lib/test/test_importlib/import_/test_api.py b/Lib/test/test_importlib/import_/test_api.py
index 439c105e9b..7069d9e58d 100644
--- a/Lib/test/test_importlib/import_/test_api.py
+++ b/Lib/test/test_importlib/import_/test_api.py
@@ -1,5 +1,4 @@
from .. import util
-from . import util as import_util
from importlib import machinery
import sys
@@ -18,6 +17,10 @@ class BadSpecFinderLoader:
return spec
@staticmethod
+ def create_module(spec):
+ return None
+
+ @staticmethod
def exec_module(module):
if module.__name__ == SUBMOD_NAME:
raise ImportError('I cannot be loaded!')
@@ -79,15 +82,19 @@ class APITest:
class OldAPITests(APITest):
bad_finder_loader = BadLoaderFinder
-Frozen_OldAPITests, Source_OldAPITests = util.test_both(
- OldAPITests, __import__=import_util.__import__)
+
+(Frozen_OldAPITests,
+ Source_OldAPITests
+ ) = util.test_both(OldAPITests, __import__=util.__import__)
class SpecAPITests(APITest):
bad_finder_loader = BadSpecFinderLoader
-Frozen_SpecAPITests, Source_SpecAPITests = util.test_both(
- SpecAPITests, __import__=import_util.__import__)
+
+(Frozen_SpecAPITests,
+ Source_SpecAPITests
+ ) = util.test_both(SpecAPITests, __import__=util.__import__)
if __name__ == '__main__':
diff --git a/Lib/test/test_importlib/import_/test_caching.py b/Lib/test/test_importlib/import_/test_caching.py
index c292ee4ac2..8079add5b2 100644
--- a/Lib/test/test_importlib/import_/test_caching.py
+++ b/Lib/test/test_importlib/import_/test_caching.py
@@ -1,6 +1,5 @@
"""Test that sys.modules is used properly by import."""
from .. import util
-from . import util as import_util
import sys
from types import MethodType
import unittest
@@ -39,15 +38,17 @@ class UseCache:
self.__import__(name)
self.assertEqual(cm.exception.name, name)
-Frozen_UseCache, Source_UseCache = util.test_both(
- UseCache, __import__=import_util.__import__)
+
+(Frozen_UseCache,
+ Source_UseCache
+ ) = util.test_both(UseCache, __import__=util.__import__)
class ImportlibUseCache(UseCache, unittest.TestCase):
# Pertinent only to PEP 302; exec_module() doesn't return a module.
- __import__ = import_util.__import__[1]
+ __import__ = util.__import__['Source']
def create_mock(self, *names, return_=None):
mock = util.mock_modules(*names)
diff --git a/Lib/test/test_importlib/import_/test_fromlist.py b/Lib/test/test_importlib/import_/test_fromlist.py
index a755b75a73..80454655ad 100644
--- a/Lib/test/test_importlib/import_/test_fromlist.py
+++ b/Lib/test/test_importlib/import_/test_fromlist.py
@@ -1,6 +1,5 @@
"""Test that the semantics relating to the 'fromlist' argument are correct."""
from .. import util
-from . import util as import_util
import unittest
@@ -29,8 +28,10 @@ class ReturnValue:
module = self.__import__('pkg.module', fromlist=['attr'])
self.assertEqual(module.__name__, 'pkg.module')
-Frozen_ReturnValue, Source_ReturnValue = util.test_both(
- ReturnValue, __import__=import_util.__import__)
+
+(Frozen_ReturnValue,
+ Source_ReturnValue
+ ) = util.test_both(ReturnValue, __import__=util.__import__)
class HandlingFromlist:
@@ -121,8 +122,10 @@ class HandlingFromlist:
self.assertEqual(module.module1.__name__, 'pkg.module1')
self.assertEqual(module.module2.__name__, 'pkg.module2')
-Frozen_FromList, Source_FromList = util.test_both(
- HandlingFromlist, __import__=import_util.__import__)
+
+(Frozen_FromList,
+ Source_FromList
+ ) = util.test_both(HandlingFromlist, __import__=util.__import__)
if __name__ == '__main__':
diff --git a/Lib/test/test_importlib/import_/test_meta_path.py b/Lib/test/test_importlib/import_/test_meta_path.py
index 5eeb1458d3..c452cdd063 100644
--- a/Lib/test/test_importlib/import_/test_meta_path.py
+++ b/Lib/test/test_importlib/import_/test_meta_path.py
@@ -1,5 +1,4 @@
from .. import util
-from . import util as import_util
import importlib._bootstrap
import sys
from types import MethodType
@@ -46,8 +45,10 @@ class CallingOrder:
self.assertEqual(len(w), 1)
self.assertTrue(issubclass(w[-1].category, ImportWarning))
-Frozen_CallingOrder, Source_CallingOrder = util.test_both(
- CallingOrder, __import__=import_util.__import__)
+
+(Frozen_CallingOrder,
+ Source_CallingOrder
+ ) = util.test_both(CallingOrder, __import__=util.__import__)
class CallSignature:
@@ -100,19 +101,25 @@ class CallSignature:
self.assertEqual(args[0], mod_name)
self.assertIs(args[1], path)
+
class CallSignaturePEP302(CallSignature):
mock_modules = util.mock_modules
finder_name = 'find_module'
-Frozen_CallSignaturePEP302, Source_CallSignaturePEP302 = util.test_both(
- CallSignaturePEP302, __import__=import_util.__import__)
+
+(Frozen_CallSignaturePEP302,
+ Source_CallSignaturePEP302
+ ) = util.test_both(CallSignaturePEP302, __import__=util.__import__)
+
class CallSignaturePEP451(CallSignature):
mock_modules = util.mock_spec
finder_name = 'find_spec'
-Frozen_CallSignaturePEP451, Source_CallSignaturePEP451 = util.test_both(
- CallSignaturePEP451, __import__=import_util.__import__)
+
+(Frozen_CallSignaturePEP451,
+ Source_CallSignaturePEP451
+ ) = util.test_both(CallSignaturePEP451, __import__=util.__import__)
if __name__ == '__main__':
diff --git a/Lib/test/test_importlib/import_/test_packages.py b/Lib/test/test_importlib/import_/test_packages.py
index 55a5d14985..3755b84a1a 100644
--- a/Lib/test/test_importlib/import_/test_packages.py
+++ b/Lib/test/test_importlib/import_/test_packages.py
@@ -1,5 +1,4 @@
from .. import util
-from . import util as import_util
import sys
import unittest
import importlib
@@ -102,8 +101,10 @@ class ParentModuleTests:
finally:
support.unload(subname)
-Frozen_ParentTests, Source_ParentTests = util.test_both(
- ParentModuleTests, __import__=import_util.__import__)
+
+(Frozen_ParentTests,
+ Source_ParentTests
+ ) = util.test_both(ParentModuleTests, __import__=util.__import__)
if __name__ == '__main__':
diff --git a/Lib/test/test_importlib/import_/test_path.py b/Lib/test/test_importlib/import_/test_path.py
index 1274f8cb9e..b32a876f89 100644
--- a/Lib/test/test_importlib/import_/test_path.py
+++ b/Lib/test/test_importlib/import_/test_path.py
@@ -1,11 +1,11 @@
from .. import util
-from . import util as import_util
importlib = util.import_importlib('importlib')
machinery = util.import_importlib('importlib.machinery')
import os
import sys
+import tempfile
from types import ModuleType
import unittest
import warnings
@@ -58,7 +58,7 @@ class FinderTests:
module = '<test module>'
path = '<test path>'
importer = util.mock_spec(module)
- hook = import_util.mock_path_hook(path, importer=importer)
+ hook = util.mock_path_hook(path, importer=importer)
with util.import_state(path_hooks=[hook]):
loader = self.machinery.PathFinder.find_module(module, [path])
self.assertIs(loader, importer)
@@ -83,7 +83,7 @@ class FinderTests:
path = ''
module = '<test module>'
importer = util.mock_spec(module)
- hook = import_util.mock_path_hook(os.getcwd(), importer=importer)
+ hook = util.mock_path_hook(os.getcwd(), importer=importer)
with util.import_state(path=[path], path_hooks=[hook]):
loader = self.machinery.PathFinder.find_module(module)
self.assertIs(loader, importer)
@@ -98,7 +98,7 @@ class FinderTests:
new_path_importer_cache.pop(None, None)
new_path_hooks = [zipimport.zipimporter,
self.machinery.FileFinder.path_hook(
- *self.importlib._bootstrap._get_supported_file_loaders())]
+ *self.importlib._bootstrap_external._get_supported_file_loaders())]
missing = object()
email = sys.modules.pop('email', missing)
try:
@@ -112,8 +112,81 @@ class FinderTests:
if email is not missing:
sys.modules['email'] = email
-Frozen_FinderTests, Source_FinderTests = util.test_both(
- FinderTests, importlib=importlib, machinery=machinery)
+ def test_finder_with_find_module(self):
+ class TestFinder:
+ def find_module(self, fullname):
+ return self.to_return
+ failing_finder = TestFinder()
+ failing_finder.to_return = None
+ path = 'testing path'
+ with util.import_state(path_importer_cache={path: failing_finder}):
+ self.assertIsNone(
+ self.machinery.PathFinder.find_spec('whatever', [path]))
+ success_finder = TestFinder()
+ success_finder.to_return = __loader__
+ with util.import_state(path_importer_cache={path: success_finder}):
+ spec = self.machinery.PathFinder.find_spec('whatever', [path])
+ self.assertEqual(spec.loader, __loader__)
+
+ def test_finder_with_find_loader(self):
+ class TestFinder:
+ loader = None
+ portions = []
+ def find_loader(self, fullname):
+ return self.loader, self.portions
+ path = 'testing path'
+ with util.import_state(path_importer_cache={path: TestFinder()}):
+ self.assertIsNone(
+ self.machinery.PathFinder.find_spec('whatever', [path]))
+ success_finder = TestFinder()
+ success_finder.loader = __loader__
+ with util.import_state(path_importer_cache={path: success_finder}):
+ spec = self.machinery.PathFinder.find_spec('whatever', [path])
+ self.assertEqual(spec.loader, __loader__)
+
+ def test_finder_with_find_spec(self):
+ class TestFinder:
+ spec = None
+ def find_spec(self, fullname, target=None):
+ return self.spec
+ path = 'testing path'
+ with util.import_state(path_importer_cache={path: TestFinder()}):
+ self.assertIsNone(
+ self.machinery.PathFinder.find_spec('whatever', [path]))
+ success_finder = TestFinder()
+ success_finder.spec = self.machinery.ModuleSpec('whatever', __loader__)
+ with util.import_state(path_importer_cache={path: success_finder}):
+ got = self.machinery.PathFinder.find_spec('whatever', [path])
+ self.assertEqual(got, success_finder.spec)
+
+ def test_deleted_cwd(self):
+ # Issue #22834
+ old_dir = os.getcwd()
+ self.addCleanup(os.chdir, old_dir)
+ new_dir = tempfile.mkdtemp()
+ try:
+ os.chdir(new_dir)
+ try:
+ os.rmdir(new_dir)
+ except OSError:
+ # EINVAL on Solaris, EBUSY on AIX, ENOTEMPTY on Windows
+ self.skipTest("platform does not allow "
+ "the deletion of the cwd")
+ except:
+ os.chdir(old_dir)
+ os.rmdir(new_dir)
+ raise
+
+ with util.import_state(path=['']):
+ # Do not want FileNotFoundError raised.
+ self.assertIsNone(self.machinery.PathFinder.find_spec('whatever'))
+
+
+
+
+(Frozen_FinderTests,
+ Source_FinderTests
+ ) = util.test_both(FinderTests, importlib=importlib, machinery=machinery)
class PathEntryFinderTests:
@@ -136,8 +209,10 @@ class PathEntryFinderTests:
path_hooks=[Finder]):
self.machinery.PathFinder.find_spec('importlib')
-Frozen_PEFTests, Source_PEFTests = util.test_both(
- PathEntryFinderTests, machinery=machinery)
+
+(Frozen_PEFTests,
+ Source_PEFTests
+ ) = util.test_both(PathEntryFinderTests, machinery=machinery)
if __name__ == '__main__':
diff --git a/Lib/test/test_importlib/import_/test_relative_imports.py b/Lib/test/test_importlib/import_/test_relative_imports.py
index b216e9cc13..3bb819f906 100644
--- a/Lib/test/test_importlib/import_/test_relative_imports.py
+++ b/Lib/test/test_importlib/import_/test_relative_imports.py
@@ -1,6 +1,5 @@
"""Test relative imports (PEP 328)."""
from .. import util
-from . import util as import_util
import sys
import unittest
@@ -208,8 +207,15 @@ class RelativeImports:
with self.assertRaises(KeyError):
self.__import__('sys', level=1)
-Frozen_RelativeImports, Source_RelativeImports = util.test_both(
- RelativeImports, __import__=import_util.__import__)
+ def test_relative_import_no_package_exists_absolute(self):
+ with self.assertRaises(SystemError):
+ self.__import__('sys', {'__package__': '', '__spec__': None},
+ level=1)
+
+
+(Frozen_RelativeImports,
+ Source_RelativeImports
+ ) = util.test_both(RelativeImports, __import__=util.__import__)
if __name__ == '__main__':
diff --git a/Lib/test/test_importlib/import_/util.py b/Lib/test/test_importlib/import_/util.py
deleted file mode 100644
index dcb490f967..0000000000
--- a/Lib/test/test_importlib/import_/util.py
+++ /dev/null
@@ -1,20 +0,0 @@
-from .. import util
-
-frozen_importlib, source_importlib = util.import_importlib('importlib')
-
-import builtins
-import functools
-import importlib
-import unittest
-
-
-__import__ = staticmethod(builtins.__import__), staticmethod(source_importlib.__import__)
-
-
-def mock_path_hook(*entries, importer):
- """A mock sys.path_hooks entry."""
- def hook(entry):
- if entry not in entries:
- raise ImportError
- return importer
- return hook
diff --git a/Lib/test/test_importlib/source/test_case_sensitivity.py b/Lib/test/test_importlib/source/test_case_sensitivity.py
index efd3146d90..c274b3823f 100644
--- a/Lib/test/test_importlib/source/test_case_sensitivity.py
+++ b/Lib/test/test_importlib/source/test_case_sensitivity.py
@@ -1,6 +1,5 @@
"""Test case-sensitivity (PEP 235)."""
from .. import util
-from . import util as source_util
importlib = util.import_importlib('importlib')
machinery = util.import_importlib('importlib.machinery')
@@ -32,7 +31,7 @@ class CaseSensitivityTest:
"""Look for a module with matching and non-matching sensitivity."""
sensitive_pkg = 'sensitive.{0}'.format(self.name)
insensitive_pkg = 'insensitive.{0}'.format(self.name.lower())
- context = source_util.create_modules(insensitive_pkg, sensitive_pkg)
+ context = util.create_modules(insensitive_pkg, sensitive_pkg)
with context as mapping:
sensitive_path = os.path.join(mapping['.root'], 'sensitive')
insensitive_path = os.path.join(mapping['.root'], 'insensitive')
@@ -43,7 +42,7 @@ class CaseSensitivityTest:
def test_sensitive(self):
with test_support.EnvironmentVarGuard() as env:
env.unset('PYTHONCASEOK')
- if b'PYTHONCASEOK' in self.importlib._bootstrap._os.environ:
+ if b'PYTHONCASEOK' in self.importlib._bootstrap_external._os.environ:
self.skipTest('os.environ changes not reflected in '
'_os.environ')
sensitive, insensitive = self.sensitivity_test()
@@ -54,7 +53,7 @@ class CaseSensitivityTest:
def test_insensitive(self):
with test_support.EnvironmentVarGuard() as env:
env.set('PYTHONCASEOK', '1')
- if b'PYTHONCASEOK' not in self.importlib._bootstrap._os.environ:
+ if b'PYTHONCASEOK' not in self.importlib._bootstrap_external._os.environ:
self.skipTest('os.environ changes not reflected in '
'_os.environ')
sensitive, insensitive = self.sensitivity_test()
@@ -63,20 +62,28 @@ class CaseSensitivityTest:
self.assertIsNotNone(insensitive)
self.assertIn(self.name, insensitive.get_filename(self.name))
+
class CaseSensitivityTestPEP302(CaseSensitivityTest):
def find(self, finder):
return finder.find_module(self.name)
-Frozen_CaseSensitivityTestPEP302, Source_CaseSensitivityTestPEP302 = util.test_both(
- CaseSensitivityTestPEP302, importlib=importlib, machinery=machinery)
+
+(Frozen_CaseSensitivityTestPEP302,
+ Source_CaseSensitivityTestPEP302
+ ) = util.test_both(CaseSensitivityTestPEP302, importlib=importlib,
+ machinery=machinery)
+
class CaseSensitivityTestPEP451(CaseSensitivityTest):
def find(self, finder):
found = finder.find_spec(self.name)
return found.loader if found is not None else found
-Frozen_CaseSensitivityTestPEP451, Source_CaseSensitivityTestPEP451 = util.test_both(
- CaseSensitivityTestPEP451, importlib=importlib, machinery=machinery)
+
+(Frozen_CaseSensitivityTestPEP451,
+ Source_CaseSensitivityTestPEP451
+ ) = util.test_both(CaseSensitivityTestPEP451, importlib=importlib,
+ machinery=machinery)
if __name__ == '__main__':
diff --git a/Lib/test/test_importlib/source/test_file_loader.py b/Lib/test/test_importlib/source/test_file_loader.py
index 2d415f985d..73f4c62070 100644
--- a/Lib/test/test_importlib/source/test_file_loader.py
+++ b/Lib/test/test_importlib/source/test_file_loader.py
@@ -1,6 +1,5 @@
from .. import abc
from .. import util
-from . import util as source_util
importlib = util.import_importlib('importlib')
importlib_abc = util.import_importlib('importlib.abc')
@@ -71,7 +70,7 @@ class SimpleTest(abc.LoaderTests):
# [basic]
def test_module(self):
- with source_util.create_modules('_temp') as mapping:
+ with util.create_modules('_temp') as mapping:
loader = self.machinery.SourceFileLoader('_temp', mapping['_temp'])
with warnings.catch_warnings():
warnings.simplefilter('ignore', DeprecationWarning)
@@ -83,7 +82,7 @@ class SimpleTest(abc.LoaderTests):
self.assertEqual(getattr(module, attr), value)
def test_package(self):
- with source_util.create_modules('_pkg.__init__') as mapping:
+ with util.create_modules('_pkg.__init__') as mapping:
loader = self.machinery.SourceFileLoader('_pkg',
mapping['_pkg.__init__'])
with warnings.catch_warnings():
@@ -98,7 +97,7 @@ class SimpleTest(abc.LoaderTests):
def test_lacking_parent(self):
- with source_util.create_modules('_pkg.__init__', '_pkg.mod')as mapping:
+ with util.create_modules('_pkg.__init__', '_pkg.mod')as mapping:
loader = self.machinery.SourceFileLoader('_pkg.mod',
mapping['_pkg.mod'])
with warnings.catch_warnings():
@@ -115,7 +114,7 @@ class SimpleTest(abc.LoaderTests):
return lambda name: fxn(name) + 1
def test_module_reuse(self):
- with source_util.create_modules('_temp') as mapping:
+ with util.create_modules('_temp') as mapping:
loader = self.machinery.SourceFileLoader('_temp', mapping['_temp'])
with warnings.catch_warnings():
warnings.simplefilter('ignore', DeprecationWarning)
@@ -139,7 +138,7 @@ class SimpleTest(abc.LoaderTests):
attributes = ('__file__', '__path__', '__package__')
value = '<test>'
name = '_temp'
- with source_util.create_modules(name) as mapping:
+ with util.create_modules(name) as mapping:
orig_module = types.ModuleType(name)
for attr in attributes:
setattr(orig_module, attr, value)
@@ -159,7 +158,7 @@ class SimpleTest(abc.LoaderTests):
# [syntax error]
def test_bad_syntax(self):
- with source_util.create_modules('_temp') as mapping:
+ with util.create_modules('_temp') as mapping:
with open(mapping['_temp'], 'w') as file:
file.write('=')
loader = self.machinery.SourceFileLoader('_temp', mapping['_temp'])
@@ -190,11 +189,11 @@ class SimpleTest(abc.LoaderTests):
if os.path.exists(pycache):
shutil.rmtree(pycache)
- @source_util.writes_bytecode_files
+ @util.writes_bytecode_files
def test_timestamp_overflow(self):
# When a modification timestamp is larger than 2**32, it should be
# truncated rather than raise an OverflowError.
- with source_util.create_modules('_temp') as mapping:
+ with util.create_modules('_temp') as mapping:
source = mapping['_temp']
compiled = self.util.cache_from_source(source)
with open(source, 'w') as f:
@@ -236,9 +235,11 @@ class SimpleTest(abc.LoaderTests):
warnings.simplefilter('ignore', DeprecationWarning)
loader.load_module('bad name')
-Frozen_SimpleTest, Source_SimpleTest = util.test_both(
- SimpleTest, importlib=importlib, machinery=machinery, abc=importlib_abc,
- util=importlib_util)
+
+(Frozen_SimpleTest,
+ Source_SimpleTest
+ ) = util.test_both(SimpleTest, importlib=importlib, machinery=machinery,
+ abc=importlib_abc, util=importlib_util)
class BadBytecodeTest:
@@ -275,45 +276,45 @@ class BadBytecodeTest:
return bytecode_path
def _test_empty_file(self, test, *, del_source=False):
- with source_util.create_modules('_temp') as mapping:
+ with util.create_modules('_temp') as mapping:
bc_path = self.manipulate_bytecode('_temp', mapping,
lambda bc: b'',
del_source=del_source)
test('_temp', mapping, bc_path)
- @source_util.writes_bytecode_files
+ @util.writes_bytecode_files
def _test_partial_magic(self, test, *, del_source=False):
# When their are less than 4 bytes to a .pyc, regenerate it if
# possible, else raise ImportError.
- with source_util.create_modules('_temp') as mapping:
+ with util.create_modules('_temp') as mapping:
bc_path = self.manipulate_bytecode('_temp', mapping,
lambda bc: bc[:3],
del_source=del_source)
test('_temp', mapping, bc_path)
def _test_magic_only(self, test, *, del_source=False):
- with source_util.create_modules('_temp') as mapping:
+ with util.create_modules('_temp') as mapping:
bc_path = self.manipulate_bytecode('_temp', mapping,
lambda bc: bc[:4],
del_source=del_source)
test('_temp', mapping, bc_path)
def _test_partial_timestamp(self, test, *, del_source=False):
- with source_util.create_modules('_temp') as mapping:
+ with util.create_modules('_temp') as mapping:
bc_path = self.manipulate_bytecode('_temp', mapping,
lambda bc: bc[:7],
del_source=del_source)
test('_temp', mapping, bc_path)
def _test_partial_size(self, test, *, del_source=False):
- with source_util.create_modules('_temp') as mapping:
+ with util.create_modules('_temp') as mapping:
bc_path = self.manipulate_bytecode('_temp', mapping,
lambda bc: bc[:11],
del_source=del_source)
test('_temp', mapping, bc_path)
def _test_no_marshal(self, *, del_source=False):
- with source_util.create_modules('_temp') as mapping:
+ with util.create_modules('_temp') as mapping:
bc_path = self.manipulate_bytecode('_temp', mapping,
lambda bc: bc[:12],
del_source=del_source)
@@ -322,7 +323,7 @@ class BadBytecodeTest:
self.import_(file_path, '_temp')
def _test_non_code_marshal(self, *, del_source=False):
- with source_util.create_modules('_temp') as mapping:
+ with util.create_modules('_temp') as mapping:
bytecode_path = self.manipulate_bytecode('_temp', mapping,
lambda bc: bc[:12] + marshal.dumps(b'abcd'),
del_source=del_source)
@@ -333,7 +334,7 @@ class BadBytecodeTest:
self.assertEqual(cm.exception.path, bytecode_path)
def _test_bad_marshal(self, *, del_source=False):
- with source_util.create_modules('_temp') as mapping:
+ with util.create_modules('_temp') as mapping:
bytecode_path = self.manipulate_bytecode('_temp', mapping,
lambda bc: bc[:12] + b'<test>',
del_source=del_source)
@@ -342,11 +343,12 @@ class BadBytecodeTest:
self.import_(file_path, '_temp')
def _test_bad_magic(self, test, *, del_source=False):
- with source_util.create_modules('_temp') as mapping:
+ with util.create_modules('_temp') as mapping:
bc_path = self.manipulate_bytecode('_temp', mapping,
lambda bc: b'\x00\x00\x00\x00' + bc[4:])
test('_temp', mapping, bc_path)
+
class BadBytecodeTestPEP451(BadBytecodeTest):
def import_(self, file, module_name):
@@ -355,6 +357,7 @@ class BadBytecodeTestPEP451(BadBytecodeTest):
module.__spec__ = self.util.spec_from_loader(module_name, loader)
loader.exec_module(module)
+
class BadBytecodeTestPEP302(BadBytecodeTest):
def import_(self, file, module_name):
@@ -371,7 +374,7 @@ class SourceLoaderBadBytecodeTest:
def setUpClass(cls):
cls.loader = cls.machinery.SourceFileLoader
- @source_util.writes_bytecode_files
+ @util.writes_bytecode_files
def test_empty_file(self):
# When a .pyc is empty, regenerate it if possible, else raise
# ImportError.
@@ -390,7 +393,7 @@ class SourceLoaderBadBytecodeTest:
self._test_partial_magic(test)
- @source_util.writes_bytecode_files
+ @util.writes_bytecode_files
def test_magic_only(self):
# When there is only the magic number, regenerate the .pyc if possible,
# else raise EOFError.
@@ -401,7 +404,7 @@ class SourceLoaderBadBytecodeTest:
self._test_magic_only(test)
- @source_util.writes_bytecode_files
+ @util.writes_bytecode_files
def test_bad_magic(self):
# When the magic number is different, the bytecode should be
# regenerated.
@@ -413,7 +416,7 @@ class SourceLoaderBadBytecodeTest:
self._test_bad_magic(test)
- @source_util.writes_bytecode_files
+ @util.writes_bytecode_files
def test_partial_timestamp(self):
# When the timestamp is partial, regenerate the .pyc, else
# raise EOFError.
@@ -424,7 +427,7 @@ class SourceLoaderBadBytecodeTest:
self._test_partial_timestamp(test)
- @source_util.writes_bytecode_files
+ @util.writes_bytecode_files
def test_partial_size(self):
# When the size is partial, regenerate the .pyc, else
# raise EOFError.
@@ -435,29 +438,29 @@ class SourceLoaderBadBytecodeTest:
self._test_partial_size(test)
- @source_util.writes_bytecode_files
+ @util.writes_bytecode_files
def test_no_marshal(self):
# When there is only the magic number and timestamp, raise EOFError.
self._test_no_marshal()
- @source_util.writes_bytecode_files
+ @util.writes_bytecode_files
def test_non_code_marshal(self):
self._test_non_code_marshal()
# XXX ImportError when sourceless
# [bad marshal]
- @source_util.writes_bytecode_files
+ @util.writes_bytecode_files
def test_bad_marshal(self):
# Bad marshal data should raise a ValueError.
self._test_bad_marshal()
# [bad timestamp]
- @source_util.writes_bytecode_files
+ @util.writes_bytecode_files
def test_old_timestamp(self):
# When the timestamp is older than the source, bytecode should be
# regenerated.
zeros = b'\x00\x00\x00\x00'
- with source_util.create_modules('_temp') as mapping:
+ with util.create_modules('_temp') as mapping:
py_compile.compile(mapping['_temp'])
bytecode_path = self.util.cache_from_source(mapping['_temp'])
with open(bytecode_path, 'r+b') as bytecode_file:
@@ -471,10 +474,10 @@ class SourceLoaderBadBytecodeTest:
self.assertEqual(bytecode_file.read(4), source_timestamp)
# [bytecode read-only]
- @source_util.writes_bytecode_files
+ @util.writes_bytecode_files
def test_read_only_bytecode(self):
# When bytecode is read-only but should be rewritten, fail silently.
- with source_util.create_modules('_temp') as mapping:
+ with util.create_modules('_temp') as mapping:
# Create bytecode that will need to be re-created.
py_compile.compile(mapping['_temp'])
bytecode_path = self.util.cache_from_source(mapping['_temp'])
@@ -491,21 +494,29 @@ class SourceLoaderBadBytecodeTest:
# Make writable for eventual clean-up.
os.chmod(bytecode_path, stat.S_IWUSR)
+
class SourceLoaderBadBytecodeTestPEP451(
SourceLoaderBadBytecodeTest, BadBytecodeTestPEP451):
pass
-Frozen_SourceBadBytecodePEP451, Source_SourceBadBytecodePEP451 = util.test_both(
- SourceLoaderBadBytecodeTestPEP451, importlib=importlib, machinery=machinery,
- abc=importlib_abc, util=importlib_util)
+
+(Frozen_SourceBadBytecodePEP451,
+ Source_SourceBadBytecodePEP451
+ ) = util.test_both(SourceLoaderBadBytecodeTestPEP451, importlib=importlib,
+ machinery=machinery, abc=importlib_abc,
+ util=importlib_util)
+
class SourceLoaderBadBytecodeTestPEP302(
SourceLoaderBadBytecodeTest, BadBytecodeTestPEP302):
pass
-Frozen_SourceBadBytecodePEP302, Source_SourceBadBytecodePEP302 = util.test_both(
- SourceLoaderBadBytecodeTestPEP302, importlib=importlib, machinery=machinery,
- abc=importlib_abc, util=importlib_util)
+
+(Frozen_SourceBadBytecodePEP302,
+ Source_SourceBadBytecodePEP302
+ ) = util.test_both(SourceLoaderBadBytecodeTestPEP302, importlib=importlib,
+ machinery=machinery, abc=importlib_abc,
+ util=importlib_util)
class SourcelessLoaderBadBytecodeTest:
@@ -567,21 +578,29 @@ class SourcelessLoaderBadBytecodeTest:
def test_non_code_marshal(self):
self._test_non_code_marshal(del_source=True)
+
class SourcelessLoaderBadBytecodeTestPEP451(SourcelessLoaderBadBytecodeTest,
BadBytecodeTestPEP451):
pass
-Frozen_SourcelessBadBytecodePEP451, Source_SourcelessBadBytecodePEP451 = util.test_both(
- SourcelessLoaderBadBytecodeTestPEP451, importlib=importlib,
- machinery=machinery, abc=importlib_abc, util=importlib_util)
+
+(Frozen_SourcelessBadBytecodePEP451,
+ Source_SourcelessBadBytecodePEP451
+ ) = util.test_both(SourcelessLoaderBadBytecodeTestPEP451, importlib=importlib,
+ machinery=machinery, abc=importlib_abc,
+ util=importlib_util)
+
class SourcelessLoaderBadBytecodeTestPEP302(SourcelessLoaderBadBytecodeTest,
BadBytecodeTestPEP302):
pass
-Frozen_SourcelessBadBytecodePEP302, Source_SourcelessBadBytecodePEP302 = util.test_both(
- SourcelessLoaderBadBytecodeTestPEP302, importlib=importlib,
- machinery=machinery, abc=importlib_abc, util=importlib_util)
+
+(Frozen_SourcelessBadBytecodePEP302,
+ Source_SourcelessBadBytecodePEP302
+ ) = util.test_both(SourcelessLoaderBadBytecodeTestPEP302, importlib=importlib,
+ machinery=machinery, abc=importlib_abc,
+ util=importlib_util)
if __name__ == '__main__':
diff --git a/Lib/test/test_importlib/source/test_finder.py b/Lib/test/test_importlib/source/test_finder.py
index 473297bdc8..f372b850dc 100644
--- a/Lib/test/test_importlib/source/test_finder.py
+++ b/Lib/test/test_importlib/source/test_finder.py
@@ -1,6 +1,5 @@
from .. import abc
from .. import util
-from . import util as source_util
machinery = util.import_importlib('importlib.machinery')
@@ -60,7 +59,7 @@ class FinderTests(abc.FinderTests):
"""
if create is None:
create = {test}
- with source_util.create_modules(*create) as mapping:
+ with util.create_modules(*create) as mapping:
if compile_:
for name in compile_:
py_compile.compile(mapping[name])
@@ -100,14 +99,14 @@ class FinderTests(abc.FinderTests):
# [sub module]
def test_module_in_package(self):
- with source_util.create_modules('pkg.__init__', 'pkg.sub') as mapping:
+ with util.create_modules('pkg.__init__', 'pkg.sub') as mapping:
pkg_dir = os.path.dirname(mapping['pkg.__init__'])
loader = self.import_(pkg_dir, 'pkg.sub')
self.assertTrue(hasattr(loader, 'load_module'))
# [sub package]
def test_package_in_package(self):
- context = source_util.create_modules('pkg.__init__', 'pkg.sub.__init__')
+ context = util.create_modules('pkg.__init__', 'pkg.sub.__init__')
with context as mapping:
pkg_dir = os.path.dirname(mapping['pkg.__init__'])
loader = self.import_(pkg_dir, 'pkg.sub')
@@ -120,7 +119,7 @@ class FinderTests(abc.FinderTests):
self.assertIn('__init__', loader.get_filename(name))
def test_failure(self):
- with source_util.create_modules('blah') as mapping:
+ with util.create_modules('blah') as mapping:
nothing = self.import_(mapping['.root'], 'sdfsadsadf')
self.assertIsNone(nothing)
@@ -147,7 +146,7 @@ class FinderTests(abc.FinderTests):
# Regression test for http://bugs.python.org/issue14846
def test_dir_removal_handling(self):
mod = 'mod'
- with source_util.create_modules(mod) as mapping:
+ with util.create_modules(mod) as mapping:
finder = self.get_finder(mapping['.root'])
found = self._find(finder, 'mod', loader_only=True)
self.assertIsNotNone(found)
@@ -196,8 +195,10 @@ class FinderTestsPEP451(FinderTests):
spec = finder.find_spec(name)
return spec.loader if spec is not None else spec
-Frozen_FinderTestsPEP451, Source_FinderTestsPEP451 = util.test_both(
- FinderTestsPEP451, machinery=machinery)
+
+(Frozen_FinderTestsPEP451,
+ Source_FinderTestsPEP451
+ ) = util.test_both(FinderTestsPEP451, machinery=machinery)
class FinderTestsPEP420(FinderTests):
@@ -210,8 +211,10 @@ class FinderTestsPEP420(FinderTests):
loader_portions = finder.find_loader(name)
return loader_portions[0] if loader_only else loader_portions
-Frozen_FinderTestsPEP420, Source_FinderTestsPEP420 = util.test_both(
- FinderTestsPEP420, machinery=machinery)
+
+(Frozen_FinderTestsPEP420,
+ Source_FinderTestsPEP420
+ ) = util.test_both(FinderTestsPEP420, machinery=machinery)
class FinderTestsPEP302(FinderTests):
@@ -223,9 +226,10 @@ class FinderTestsPEP302(FinderTests):
warnings.simplefilter("ignore", DeprecationWarning)
return finder.find_module(name)
-Frozen_FinderTestsPEP302, Source_FinderTestsPEP302 = util.test_both(
- FinderTestsPEP302, machinery=machinery)
+(Frozen_FinderTestsPEP302,
+ Source_FinderTestsPEP302
+ ) = util.test_both(FinderTestsPEP302, machinery=machinery)
if __name__ == '__main__':
diff --git a/Lib/test/test_importlib/source/test_path_hook.py b/Lib/test/test_importlib/source/test_path_hook.py
index 92da77265b..e6a2415bda 100644
--- a/Lib/test/test_importlib/source/test_path_hook.py
+++ b/Lib/test/test_importlib/source/test_path_hook.py
@@ -1,5 +1,4 @@
from .. import util
-from . import util as source_util
machinery = util.import_importlib('importlib.machinery')
@@ -15,7 +14,7 @@ class PathHookTest:
self.machinery.SOURCE_SUFFIXES))
def test_success(self):
- with source_util.create_modules('dummy') as mapping:
+ with util.create_modules('dummy') as mapping:
self.assertTrue(hasattr(self.path_hook()(mapping['.root']),
'find_module'))
@@ -23,7 +22,10 @@ class PathHookTest:
# The empty string represents the cwd.
self.assertTrue(hasattr(self.path_hook()(''), 'find_module'))
-Frozen_PathHookTest, Source_PathHooktest = util.test_both(PathHookTest, machinery=machinery)
+
+(Frozen_PathHookTest,
+ Source_PathHooktest
+ ) = util.test_both(PathHookTest, machinery=machinery)
if __name__ == '__main__':
diff --git a/Lib/test/test_importlib/source/test_source_encoding.py b/Lib/test/test_importlib/source/test_source_encoding.py
index c62dfa108d..1e0771b19d 100644
--- a/Lib/test/test_importlib/source/test_source_encoding.py
+++ b/Lib/test/test_importlib/source/test_source_encoding.py
@@ -1,5 +1,4 @@
from .. import util
-from . import util as source_util
machinery = util.import_importlib('importlib.machinery')
@@ -15,7 +14,7 @@ import unittest
import warnings
-CODING_RE = re.compile(r'^[ \t\f]*#.*coding[:=][ \t]*([-\w.]+)', re.ASCII)
+CODING_RE = re.compile(r'^[ \t\f]*#.*?coding[:=][ \t]*([-\w.]+)', re.ASCII)
class EncodingTest:
@@ -37,7 +36,7 @@ class EncodingTest:
module_name = '_temp'
def run_test(self, source):
- with source_util.create_modules(self.module_name) as mapping:
+ with util.create_modules(self.module_name) as mapping:
with open(mapping[self.module_name], 'wb') as file:
file.write(source)
loader = self.machinery.SourceFileLoader(self.module_name,
@@ -89,6 +88,7 @@ class EncodingTest:
with self.assertRaises(SyntaxError):
self.run_test(source)
+
class EncodingTestPEP451(EncodingTest):
def load(self, loader):
@@ -97,8 +97,11 @@ class EncodingTestPEP451(EncodingTest):
loader.exec_module(module)
return module
-Frozen_EncodingTestPEP451, Source_EncodingTestPEP451 = util.test_both(
- EncodingTestPEP451, machinery=machinery)
+
+(Frozen_EncodingTestPEP451,
+ Source_EncodingTestPEP451
+ ) = util.test_both(EncodingTestPEP451, machinery=machinery)
+
class EncodingTestPEP302(EncodingTest):
@@ -107,8 +110,10 @@ class EncodingTestPEP302(EncodingTest):
warnings.simplefilter('ignore', DeprecationWarning)
return loader.load_module(self.module_name)
-Frozen_EncodingTestPEP302, Source_EncodingTestPEP302 = util.test_both(
- EncodingTestPEP302, machinery=machinery)
+
+(Frozen_EncodingTestPEP302,
+ Source_EncodingTestPEP302
+ ) = util.test_both(EncodingTestPEP302, machinery=machinery)
class LineEndingTest:
@@ -120,7 +125,7 @@ class LineEndingTest:
module_name = '_temp'
source_lines = [b"a = 42", b"b = -13", b'']
source = line_ending.join(source_lines)
- with source_util.create_modules(module_name) as mapping:
+ with util.create_modules(module_name) as mapping:
with open(mapping[module_name], 'wb') as file:
file.write(source)
loader = self.machinery.SourceFileLoader(module_name,
@@ -139,6 +144,7 @@ class LineEndingTest:
def test_lf(self):
self.run_test(b'\n')
+
class LineEndingTestPEP451(LineEndingTest):
def load(self, loader, module_name):
@@ -147,8 +153,11 @@ class LineEndingTestPEP451(LineEndingTest):
loader.exec_module(module)
return module
-Frozen_LineEndingTestPEP451, Source_LineEndingTestPEP451 = util.test_both(
- LineEndingTestPEP451, machinery=machinery)
+
+(Frozen_LineEndingTestPEP451,
+ Source_LineEndingTestPEP451
+ ) = util.test_both(LineEndingTestPEP451, machinery=machinery)
+
class LineEndingTestPEP302(LineEndingTest):
@@ -157,8 +166,10 @@ class LineEndingTestPEP302(LineEndingTest):
warnings.simplefilter('ignore', DeprecationWarning)
return loader.load_module(module_name)
-Frozen_LineEndingTestPEP302, Source_LineEndingTestPEP302 = util.test_both(
- LineEndingTestPEP302, machinery=machinery)
+
+(Frozen_LineEndingTestPEP302,
+ Source_LineEndingTestPEP302
+ ) = util.test_both(LineEndingTestPEP302, machinery=machinery)
if __name__ == '__main__':
diff --git a/Lib/test/test_importlib/source/util.py b/Lib/test/test_importlib/source/util.py
deleted file mode 100644
index 63cd25adc4..0000000000
--- a/Lib/test/test_importlib/source/util.py
+++ /dev/null
@@ -1,96 +0,0 @@
-from .. import util
-import contextlib
-import errno
-import functools
-import os
-import os.path
-import sys
-import tempfile
-from test import support
-
-
-def writes_bytecode_files(fxn):
- """Decorator to protect sys.dont_write_bytecode from mutation and to skip
- tests that require it to be set to False."""
- if sys.dont_write_bytecode:
- return lambda *args, **kwargs: None
- @functools.wraps(fxn)
- def wrapper(*args, **kwargs):
- original = sys.dont_write_bytecode
- sys.dont_write_bytecode = False
- try:
- to_return = fxn(*args, **kwargs)
- finally:
- sys.dont_write_bytecode = original
- return to_return
- return wrapper
-
-
-def ensure_bytecode_path(bytecode_path):
- """Ensure that the __pycache__ directory for PEP 3147 pyc file exists.
-
- :param bytecode_path: File system path to PEP 3147 pyc file.
- """
- try:
- os.mkdir(os.path.dirname(bytecode_path))
- except OSError as error:
- if error.errno != errno.EEXIST:
- raise
-
-
-@contextlib.contextmanager
-def create_modules(*names):
- """Temporarily create each named module with an attribute (named 'attr')
- that contains the name passed into the context manager that caused the
- creation of the module.
-
- All files are created in a temporary directory returned by
- tempfile.mkdtemp(). This directory is inserted at the beginning of
- sys.path. When the context manager exits all created files (source and
- bytecode) are explicitly deleted.
-
- No magic is performed when creating packages! This means that if you create
- a module within a package you must also create the package's __init__ as
- well.
-
- """
- source = 'attr = {0!r}'
- created_paths = []
- mapping = {}
- state_manager = None
- uncache_manager = None
- try:
- temp_dir = tempfile.mkdtemp()
- mapping['.root'] = temp_dir
- import_names = set()
- for name in names:
- if not name.endswith('__init__'):
- import_name = name
- else:
- import_name = name[:-len('.__init__')]
- import_names.add(import_name)
- if import_name in sys.modules:
- del sys.modules[import_name]
- name_parts = name.split('.')
- file_path = temp_dir
- for directory in name_parts[:-1]:
- file_path = os.path.join(file_path, directory)
- if not os.path.exists(file_path):
- os.mkdir(file_path)
- created_paths.append(file_path)
- file_path = os.path.join(file_path, name_parts[-1] + '.py')
- with open(file_path, 'w') as file:
- file.write(source.format(name))
- created_paths.append(file_path)
- mapping[name] = file_path
- uncache_manager = util.uncache(*import_names)
- uncache_manager.__enter__()
- state_manager = util.import_state(path=[temp_dir])
- state_manager.__enter__()
- yield mapping
- finally:
- if state_manager is not None:
- state_manager.__exit__(None, None, None)
- if uncache_manager is not None:
- uncache_manager.__exit__(None, None, None)
- support.rmtree(temp_dir)
diff --git a/Lib/test/test_importlib/test_abc.py b/Lib/test/test_importlib/test_abc.py
index a1f8e76302..d4bf9153e9 100644
--- a/Lib/test/test_importlib/test_abc.py
+++ b/Lib/test/test_importlib/test_abc.py
@@ -10,12 +10,13 @@ import unittest
from unittest import mock
import warnings
-from . import util
+from . import util as test_util
+
+init = test_util.import_importlib('importlib')
+abc = test_util.import_importlib('importlib.abc')
+machinery = test_util.import_importlib('importlib.machinery')
+util = test_util.import_importlib('importlib.util')
-frozen_init, source_init = util.import_importlib('importlib')
-frozen_abc, source_abc = util.import_importlib('importlib.abc')
-machinery = util.import_importlib('importlib.machinery')
-frozen_util, source_util = util.import_importlib('importlib.util')
##### Inheritance ##############################################################
class InheritanceTests:
@@ -26,8 +27,7 @@ class InheritanceTests:
subclasses = []
superclasses = []
- def __init__(self, *args, **kwargs):
- super().__init__(*args, **kwargs)
+ def setUp(self):
self.superclasses = [getattr(self.abc, class_name)
for class_name in self.superclass_names]
if hasattr(self, 'subclass_names'):
@@ -36,11 +36,11 @@ class InheritanceTests:
# checking across module boundaries (i.e. the _bootstrap in abc is
# not the same as the one in machinery). That means stealing one of
# the modules from the other to make sure the same instance is used.
- self.subclasses = [getattr(self.abc.machinery, class_name)
- for class_name in self.subclass_names]
+ machinery = self.abc.machinery
+ self.subclasses = [getattr(machinery, class_name)
+ for class_name in self.subclass_names]
assert self.subclasses or self.superclasses, self.__class__
- testing = self.__class__.__name__.partition('_')[2]
- self.__test = getattr(self.abc, testing)
+ self.__test = getattr(self.abc, self._NAME)
def test_subclasses(self):
# Test that the expected subclasses inherit.
@@ -54,94 +54,97 @@ class InheritanceTests:
self.assertTrue(issubclass(self.__test, superclass),
"{0} is not a superclass of {1}".format(superclass, self.__test))
-def create_inheritance_tests(base_class):
- def set_frozen(ns):
- ns['abc'] = frozen_abc
- def set_source(ns):
- ns['abc'] = source_abc
-
- classes = []
- for prefix, ns_set in [('Frozen', set_frozen), ('Source', set_source)]:
- classes.append(types.new_class('_'.join([prefix, base_class.__name__]),
- (base_class, unittest.TestCase),
- exec_body=ns_set))
- return classes
-
class MetaPathFinder(InheritanceTests):
superclass_names = ['Finder']
subclass_names = ['BuiltinImporter', 'FrozenImporter', 'PathFinder',
'WindowsRegistryFinder']
-tests = create_inheritance_tests(MetaPathFinder)
-Frozen_MetaPathFinderInheritanceTests, Source_MetaPathFinderInheritanceTests = tests
+
+(Frozen_MetaPathFinderInheritanceTests,
+ Source_MetaPathFinderInheritanceTests
+ ) = test_util.test_both(MetaPathFinder, abc=abc)
class PathEntryFinder(InheritanceTests):
superclass_names = ['Finder']
subclass_names = ['FileFinder']
-tests = create_inheritance_tests(PathEntryFinder)
-Frozen_PathEntryFinderInheritanceTests, Source_PathEntryFinderInheritanceTests = tests
+
+(Frozen_PathEntryFinderInheritanceTests,
+ Source_PathEntryFinderInheritanceTests
+ ) = test_util.test_both(PathEntryFinder, abc=abc)
class ResourceLoader(InheritanceTests):
superclass_names = ['Loader']
-tests = create_inheritance_tests(ResourceLoader)
-Frozen_ResourceLoaderInheritanceTests, Source_ResourceLoaderInheritanceTests = tests
+
+(Frozen_ResourceLoaderInheritanceTests,
+ Source_ResourceLoaderInheritanceTests
+ ) = test_util.test_both(ResourceLoader, abc=abc)
class InspectLoader(InheritanceTests):
superclass_names = ['Loader']
subclass_names = ['BuiltinImporter', 'FrozenImporter', 'ExtensionFileLoader']
-tests = create_inheritance_tests(InspectLoader)
-Frozen_InspectLoaderInheritanceTests, Source_InspectLoaderInheritanceTests = tests
+
+(Frozen_InspectLoaderInheritanceTests,
+ Source_InspectLoaderInheritanceTests
+ ) = test_util.test_both(InspectLoader, abc=abc)
class ExecutionLoader(InheritanceTests):
superclass_names = ['InspectLoader']
subclass_names = ['ExtensionFileLoader']
-tests = create_inheritance_tests(ExecutionLoader)
-Frozen_ExecutionLoaderInheritanceTests, Source_ExecutionLoaderInheritanceTests = tests
+
+(Frozen_ExecutionLoaderInheritanceTests,
+ Source_ExecutionLoaderInheritanceTests
+ ) = test_util.test_both(ExecutionLoader, abc=abc)
class FileLoader(InheritanceTests):
superclass_names = ['ResourceLoader', 'ExecutionLoader']
subclass_names = ['SourceFileLoader', 'SourcelessFileLoader']
-tests = create_inheritance_tests(FileLoader)
-Frozen_FileLoaderInheritanceTests, Source_FileLoaderInheritanceTests = tests
+
+(Frozen_FileLoaderInheritanceTests,
+ Source_FileLoaderInheritanceTests
+ ) = test_util.test_both(FileLoader, abc=abc)
class SourceLoader(InheritanceTests):
superclass_names = ['ResourceLoader', 'ExecutionLoader']
subclass_names = ['SourceFileLoader']
-tests = create_inheritance_tests(SourceLoader)
-Frozen_SourceLoaderInheritanceTests, Source_SourceLoaderInheritanceTests = tests
+
+(Frozen_SourceLoaderInheritanceTests,
+ Source_SourceLoaderInheritanceTests
+ ) = test_util.test_both(SourceLoader, abc=abc)
+
##### Default return values ####################################################
-def make_abc_subclasses(base_class):
- classes = []
- for kind, abc in [('Frozen', frozen_abc), ('Source', source_abc)]:
- name = '_'.join([kind, base_class.__name__])
- base_classes = base_class, getattr(abc, base_class.__name__)
- classes.append(types.new_class(name, base_classes))
- return classes
-
-def make_return_value_tests(base_class, test_class):
- frozen_class, source_class = make_abc_subclasses(base_class)
- tests = []
- for prefix, class_in_test in [('Frozen', frozen_class), ('Source', source_class)]:
- def set_ns(ns):
- ns['ins'] = class_in_test()
- tests.append(types.new_class('_'.join([prefix, test_class.__name__]),
- (test_class, unittest.TestCase),
- exec_body=set_ns))
- return tests
+
+def make_abc_subclasses(base_class, name=None, inst=False, **kwargs):
+ if name is None:
+ name = base_class.__name__
+ base = {kind: getattr(splitabc, name)
+ for kind, splitabc in abc.items()}
+ return {cls._KIND: cls() if inst else cls
+ for cls in test_util.split_frozen(base_class, base, **kwargs)}
+
+
+class ABCTestHarness:
+
+ @property
+ def ins(self):
+ # Lazily set ins on the class.
+ cls = self.SPLIT[self._KIND]
+ ins = cls()
+ self.__class__.ins = ins
+ return ins
class MetaPathFinder:
@@ -149,10 +152,10 @@ class MetaPathFinder:
def find_module(self, fullname, path):
return super().find_module(fullname, path)
-Frozen_MPF, Source_MPF = make_abc_subclasses(MetaPathFinder)
+class MetaPathFinderDefaultsTests(ABCTestHarness):
-class MetaPathFinderDefaultsTests:
+ SPLIT = make_abc_subclasses(MetaPathFinder)
def test_find_module(self):
# Default should return None.
@@ -163,8 +166,9 @@ class MetaPathFinderDefaultsTests:
self.ins.invalidate_caches()
-tests = make_return_value_tests(MetaPathFinder, MetaPathFinderDefaultsTests)
-Frozen_MPFDefaultTests, Source_MPFDefaultTests = tests
+(Frozen_MPFDefaultTests,
+ Source_MPFDefaultTests
+ ) = test_util.test_both(MetaPathFinderDefaultsTests)
class PathEntryFinder:
@@ -172,10 +176,10 @@ class PathEntryFinder:
def find_loader(self, fullname):
return super().find_loader(fullname)
-Frozen_PEF, Source_PEF = make_abc_subclasses(PathEntryFinder)
+class PathEntryFinderDefaultsTests(ABCTestHarness):
-class PathEntryFinderDefaultsTests:
+ SPLIT = make_abc_subclasses(PathEntryFinder)
def test_find_loader(self):
self.assertEqual((None, []), self.ins.find_loader('something'))
@@ -188,8 +192,9 @@ class PathEntryFinderDefaultsTests:
self.ins.invalidate_caches()
-tests = make_return_value_tests(PathEntryFinder, PathEntryFinderDefaultsTests)
-Frozen_PEFDefaultTests, Source_PEFDefaultTests = tests
+(Frozen_PEFDefaultTests,
+ Source_PEFDefaultTests
+ ) = test_util.test_both(PathEntryFinderDefaultsTests)
class Loader:
@@ -198,10 +203,9 @@ class Loader:
return super().load_module(fullname)
-Frozen_L, Source_L = make_abc_subclasses(Loader)
+class LoaderDefaultsTests(ABCTestHarness):
-
-class LoaderDefaultsTests:
+ SPLIT = make_abc_subclasses(Loader)
def test_load_module(self):
with self.assertRaises(ImportError):
@@ -217,8 +221,9 @@ class LoaderDefaultsTests:
self.assertTrue(repr(mod))
-tests = make_return_value_tests(Loader, LoaderDefaultsTests)
-Frozen_LDefaultTests, SourceLDefaultTests = tests
+(Frozen_LDefaultTests,
+ SourceLDefaultTests
+ ) = test_util.test_both(LoaderDefaultsTests)
class ResourceLoader(Loader):
@@ -227,18 +232,18 @@ class ResourceLoader(Loader):
return super().get_data(path)
-Frozen_RL, Source_RL = make_abc_subclasses(ResourceLoader)
-
+class ResourceLoaderDefaultsTests(ABCTestHarness):
-class ResourceLoaderDefaultsTests:
+ SPLIT = make_abc_subclasses(ResourceLoader)
def test_get_data(self):
with self.assertRaises(IOError):
self.ins.get_data('/some/path')
-tests = make_return_value_tests(ResourceLoader, ResourceLoaderDefaultsTests)
-Frozen_RLDefaultTests, Source_RLDefaultTests = tests
+(Frozen_RLDefaultTests,
+ Source_RLDefaultTests
+ ) = test_util.test_both(ResourceLoaderDefaultsTests)
class InspectLoader(Loader):
@@ -250,10 +255,12 @@ class InspectLoader(Loader):
return super().get_source(fullname)
-Frozen_IL, Source_IL = make_abc_subclasses(InspectLoader)
+SPLIT_IL = make_abc_subclasses(InspectLoader)
-class InspectLoaderDefaultsTests:
+class InspectLoaderDefaultsTests(ABCTestHarness):
+
+ SPLIT = SPLIT_IL
def test_is_package(self):
with self.assertRaises(ImportError):
@@ -264,8 +271,9 @@ class InspectLoaderDefaultsTests:
self.ins.get_source('blah')
-tests = make_return_value_tests(InspectLoader, InspectLoaderDefaultsTests)
-Frozen_ILDefaultTests, Source_ILDefaultTests = tests
+(Frozen_ILDefaultTests,
+ Source_ILDefaultTests
+ ) = test_util.test_both(InspectLoaderDefaultsTests)
class ExecutionLoader(InspectLoader):
@@ -273,21 +281,25 @@ class ExecutionLoader(InspectLoader):
def get_filename(self, fullname):
return super().get_filename(fullname)
-Frozen_EL, Source_EL = make_abc_subclasses(ExecutionLoader)
+
+SPLIT_EL = make_abc_subclasses(ExecutionLoader)
-class ExecutionLoaderDefaultsTests:
+class ExecutionLoaderDefaultsTests(ABCTestHarness):
+
+ SPLIT = SPLIT_EL
def test_get_filename(self):
with self.assertRaises(ImportError):
self.ins.get_filename('blah')
-tests = make_return_value_tests(ExecutionLoader, InspectLoaderDefaultsTests)
-Frozen_ELDefaultTests, Source_ELDefaultsTests = tests
+(Frozen_ELDefaultTests,
+ Source_ELDefaultsTests
+ ) = test_util.test_both(InspectLoaderDefaultsTests)
-##### MetaPathFinder concrete methods ##########################################
+##### MetaPathFinder concrete methods ##########################################
class MetaPathFinderFindModuleTests:
@classmethod
@@ -317,13 +329,12 @@ class MetaPathFinderFindModuleTests:
self.assertIs(found, spec.loader)
-Frozen_MPFFindModuleTests, Source_MPFFindModuleTests = util.test_both(
- MetaPathFinderFindModuleTests,
- abc=(frozen_abc, source_abc),
- util=(frozen_util, source_util))
+(Frozen_MPFFindModuleTests,
+ Source_MPFFindModuleTests
+ ) = test_util.test_both(MetaPathFinderFindModuleTests, abc=abc, util=util)
-##### PathEntryFinder concrete methods #########################################
+##### PathEntryFinder concrete methods #########################################
class PathEntryFinderFindLoaderTests:
@classmethod
@@ -361,11 +372,10 @@ class PathEntryFinderFindLoaderTests:
self.assertEqual(paths, found[1])
-Frozen_PEFFindLoaderTests, Source_PEFFindLoaderTests = util.test_both(
- PathEntryFinderFindLoaderTests,
- abc=(frozen_abc, source_abc),
- machinery=machinery,
- util=(frozen_util, source_util))
+(Frozen_PEFFindLoaderTests,
+ Source_PEFFindLoaderTests
+ ) = test_util.test_both(PathEntryFinderFindLoaderTests, abc=abc, util=util,
+ machinery=machinery)
##### Loader concrete methods ##################################################
@@ -386,7 +396,7 @@ class LoaderLoadModuleTests:
def test_fresh(self):
loader = self.loader()
name = 'blah'
- with util.uncache(name):
+ with test_util.uncache(name):
loader.load_module(name)
module = loader.found
self.assertIs(sys.modules[name], module)
@@ -404,7 +414,7 @@ class LoaderLoadModuleTests:
module = types.ModuleType(name)
module.__spec__ = self.util.spec_from_loader(name, loader)
module.__loader__ = loader
- with util.uncache(name):
+ with test_util.uncache(name):
sys.modules[name] = module
loader.load_module(name)
found = loader.found
@@ -412,10 +422,9 @@ class LoaderLoadModuleTests:
self.assertIs(module, sys.modules[name])
-Frozen_LoaderLoadModuleTests, Source_LoaderLoadModuleTests = util.test_both(
- LoaderLoadModuleTests,
- abc=(frozen_abc, source_abc),
- util=(frozen_util, source_util))
+(Frozen_LoaderLoadModuleTests,
+ Source_LoaderLoadModuleTests
+ ) = test_util.test_both(LoaderLoadModuleTests, abc=abc, util=util)
##### InspectLoader concrete methods ###########################################
@@ -461,11 +470,10 @@ class InspectLoaderSourceToCodeTests:
self.assertEqual(code.co_filename, '<string>')
-class Frozen_ILSourceToCodeTests(InspectLoaderSourceToCodeTests, unittest.TestCase):
- InspectLoaderSubclass = Frozen_IL
-
-class Source_ILSourceToCodeTests(InspectLoaderSourceToCodeTests, unittest.TestCase):
- InspectLoaderSubclass = Source_IL
+(Frozen_ILSourceToCodeTests,
+ Source_ILSourceToCodeTests
+ ) = test_util.test_both(InspectLoaderSourceToCodeTests,
+ InspectLoaderSubclass=SPLIT_IL)
class InspectLoaderGetCodeTests:
@@ -495,11 +503,10 @@ class InspectLoaderGetCodeTests:
loader.get_code('blah')
-class Frozen_ILGetCodeTests(InspectLoaderGetCodeTests, unittest.TestCase):
- InspectLoaderSubclass = Frozen_IL
-
-class Source_ILGetCodeTests(InspectLoaderGetCodeTests, unittest.TestCase):
- InspectLoaderSubclass = Source_IL
+(Frozen_ILGetCodeTests,
+ Source_ILGetCodeTests
+ ) = test_util.test_both(InspectLoaderGetCodeTests,
+ InspectLoaderSubclass=SPLIT_IL)
class InspectLoaderLoadModuleTests:
@@ -543,11 +550,10 @@ class InspectLoaderLoadModuleTests:
self.assertEqual(module, sys.modules[self.module_name])
-class Frozen_ILLoadModuleTests(InspectLoaderLoadModuleTests, unittest.TestCase):
- InspectLoaderSubclass = Frozen_IL
-
-class Source_ILLoadModuleTests(InspectLoaderLoadModuleTests, unittest.TestCase):
- InspectLoaderSubclass = Source_IL
+(Frozen_ILLoadModuleTests,
+ Source_ILLoadModuleTests
+ ) = test_util.test_both(InspectLoaderLoadModuleTests,
+ InspectLoaderSubclass=SPLIT_IL)
##### ExecutionLoader concrete methods #########################################
@@ -608,15 +614,14 @@ class ExecutionLoaderGetCodeTests:
self.assertEqual(module.attr, 42)
-class Frozen_ELGetCodeTests(ExecutionLoaderGetCodeTests, unittest.TestCase):
- ExecutionLoaderSubclass = Frozen_EL
-
-class Source_ELGetCodeTests(ExecutionLoaderGetCodeTests, unittest.TestCase):
- ExecutionLoaderSubclass = Source_EL
+(Frozen_ELGetCodeTests,
+ Source_ELGetCodeTests
+ ) = test_util.test_both(ExecutionLoaderGetCodeTests,
+ ExecutionLoaderSubclass=SPLIT_EL)
##### SourceLoader concrete methods ############################################
-class SourceLoader:
+class SourceOnlyLoader:
# Globals that should be defined for all modules.
source = (b"_ = '::'.join([__name__, __file__, __cached__, __package__, "
@@ -637,10 +642,10 @@ class SourceLoader:
return '<module>'
-Frozen_SourceOnlyL, Source_SourceOnlyL = make_abc_subclasses(SourceLoader)
+SPLIT_SOL = make_abc_subclasses(SourceOnlyLoader, 'SourceLoader')
-class SourceLoader(SourceLoader):
+class SourceLoader(SourceOnlyLoader):
source_mtime = 1
@@ -677,11 +682,7 @@ class SourceLoader(SourceLoader):
return path == self.bytecode_path
-Frozen_SL, Source_SL = make_abc_subclasses(SourceLoader)
-Frozen_SL.util = frozen_util
-Source_SL.util = source_util
-Frozen_SL.init = frozen_init
-Source_SL.init = source_init
+SPLIT_SL = make_abc_subclasses(SourceLoader, util=util, init=init)
class SourceLoaderTestHarness:
@@ -765,7 +766,7 @@ class SourceOnlyLoaderTests(SourceLoaderTestHarness):
# Loading a module should set __name__, __loader__, __package__,
# __path__ (for packages), __file__, and __cached__.
# The module should also be put into sys.modules.
- with util.uncache(self.name):
+ with test_util.uncache(self.name):
with warnings.catch_warnings():
warnings.simplefilter('ignore', DeprecationWarning)
module = self.loader.load_module(self.name)
@@ -778,7 +779,7 @@ class SourceOnlyLoaderTests(SourceLoaderTestHarness):
# is a package.
# Testing the values for a package are covered by test_load_module.
self.setUp(is_package=False)
- with util.uncache(self.name):
+ with test_util.uncache(self.name):
with warnings.catch_warnings():
warnings.simplefilter('ignore', DeprecationWarning)
module = self.loader.load_module(self.name)
@@ -798,13 +799,10 @@ class SourceOnlyLoaderTests(SourceLoaderTestHarness):
self.assertEqual(returned_source, source)
-class Frozen_SourceOnlyLTests(SourceOnlyLoaderTests, unittest.TestCase):
- loader_mock = Frozen_SourceOnlyL
- util = frozen_util
-
-class Source_SourceOnlyLTests(SourceOnlyLoaderTests, unittest.TestCase):
- loader_mock = Source_SourceOnlyL
- util = source_util
+(Frozen_SourceOnlyLoaderTests,
+ Source_SourceOnlyLoaderTests
+ ) = test_util.test_both(SourceOnlyLoaderTests, util=util,
+ loader_mock=SPLIT_SOL)
@unittest.skipIf(sys.dont_write_bytecode, "sys.dont_write_bytecode is true")
@@ -896,15 +894,10 @@ class SourceLoaderBytecodeTests(SourceLoaderTestHarness):
self.verify_code(code_object)
-class Frozen_SLBytecodeTests(SourceLoaderBytecodeTests, unittest.TestCase):
- loader_mock = Frozen_SL
- init = frozen_init
- util = frozen_util
-
-class SourceSLBytecodeTests(SourceLoaderBytecodeTests, unittest.TestCase):
- loader_mock = Source_SL
- init = source_init
- util = source_util
+(Frozen_SLBytecodeTests,
+ SourceSLBytecodeTests
+ ) = test_util.test_both(SourceLoaderBytecodeTests, init=init, util=util,
+ loader_mock=SPLIT_SL)
class SourceLoaderGetSourceTests:
@@ -940,11 +933,10 @@ class SourceLoaderGetSourceTests:
self.assertEqual(mock.get_source(name), expect)
-class Frozen_SourceOnlyLGetSourceTests(SourceLoaderGetSourceTests, unittest.TestCase):
- SourceOnlyLoaderMock = Frozen_SourceOnlyL
-
-class Source_SourceOnlyLGetSourceTests(SourceLoaderGetSourceTests, unittest.TestCase):
- SourceOnlyLoaderMock = Source_SourceOnlyL
+(Frozen_SourceOnlyLoaderGetSourceTests,
+ Source_SourceOnlyLoaderGetSourceTests
+ ) = test_util.test_both(SourceLoaderGetSourceTests,
+ SourceOnlyLoaderMock=SPLIT_SOL)
if __name__ == '__main__':
diff --git a/Lib/test/test_importlib/test_api.py b/Lib/test/test_importlib/test_api.py
index 2a2d42bbfe..6bc3c564a5 100644
--- a/Lib/test/test_importlib/test_api.py
+++ b/Lib/test/test_importlib/test_api.py
@@ -1,8 +1,8 @@
-from . import util
+from . import util as test_util
-frozen_init, source_init = util.import_importlib('importlib')
-frozen_util, source_util = util.import_importlib('importlib.util')
-frozen_machinery, source_machinery = util.import_importlib('importlib.machinery')
+init = test_util.import_importlib('importlib')
+util = test_util.import_importlib('importlib.util')
+machinery = test_util.import_importlib('importlib.machinery')
import os.path
import sys
@@ -18,8 +18,8 @@ class ImportModuleTests:
def test_module_import(self):
# Test importing a top-level module.
- with util.mock_modules('top_level') as mock:
- with util.import_state(meta_path=[mock]):
+ with test_util.mock_modules('top_level') as mock:
+ with test_util.import_state(meta_path=[mock]):
module = self.init.import_module('top_level')
self.assertEqual(module.__name__, 'top_level')
@@ -28,8 +28,8 @@ class ImportModuleTests:
pkg_name = 'pkg'
pkg_long_name = '{0}.__init__'.format(pkg_name)
name = '{0}.mod'.format(pkg_name)
- with util.mock_modules(pkg_long_name, name) as mock:
- with util.import_state(meta_path=[mock]):
+ with test_util.mock_modules(pkg_long_name, name) as mock:
+ with test_util.import_state(meta_path=[mock]):
module = self.init.import_module(name)
self.assertEqual(module.__name__, name)
@@ -40,16 +40,16 @@ class ImportModuleTests:
module_name = 'mod'
absolute_name = '{0}.{1}'.format(pkg_name, module_name)
relative_name = '.{0}'.format(module_name)
- with util.mock_modules(pkg_long_name, absolute_name) as mock:
- with util.import_state(meta_path=[mock]):
+ with test_util.mock_modules(pkg_long_name, absolute_name) as mock:
+ with test_util.import_state(meta_path=[mock]):
self.init.import_module(pkg_name)
module = self.init.import_module(relative_name, pkg_name)
self.assertEqual(module.__name__, absolute_name)
def test_deep_relative_package_import(self):
modules = ['a.__init__', 'a.b.__init__', 'a.c']
- with util.mock_modules(*modules) as mock:
- with util.import_state(meta_path=[mock]):
+ with test_util.mock_modules(*modules) as mock:
+ with test_util.import_state(meta_path=[mock]):
self.init.import_module('a')
self.init.import_module('a.b')
module = self.init.import_module('..c', 'a.b')
@@ -61,8 +61,8 @@ class ImportModuleTests:
pkg_name = 'pkg'
pkg_long_name = '{0}.__init__'.format(pkg_name)
name = '{0}.mod'.format(pkg_name)
- with util.mock_modules(pkg_long_name, name) as mock:
- with util.import_state(meta_path=[mock]):
+ with test_util.mock_modules(pkg_long_name, name) as mock:
+ with test_util.import_state(meta_path=[mock]):
self.init.import_module(pkg_name)
module = self.init.import_module(name, pkg_name)
self.assertEqual(module.__name__, name)
@@ -86,16 +86,15 @@ class ImportModuleTests:
b_load_count += 1
code = {'a': load_a, 'a.b': load_b}
modules = ['a.__init__', 'a.b']
- with util.mock_modules(*modules, module_code=code) as mock:
- with util.import_state(meta_path=[mock]):
+ with test_util.mock_modules(*modules, module_code=code) as mock:
+ with test_util.import_state(meta_path=[mock]):
self.init.import_module('a.b')
self.assertEqual(b_load_count, 1)
-class Frozen_ImportModuleTests(ImportModuleTests, unittest.TestCase):
- init = frozen_init
-class Source_ImportModuleTests(ImportModuleTests, unittest.TestCase):
- init = source_init
+(Frozen_ImportModuleTests,
+ Source_ImportModuleTests
+ ) = test_util.test_both(ImportModuleTests, init=init)
class FindLoaderTests:
@@ -107,7 +106,7 @@ class FindLoaderTests:
def test_sys_modules(self):
# If a module with __loader__ is in sys.modules, then return it.
name = 'some_mod'
- with util.uncache(name):
+ with test_util.uncache(name):
module = types.ModuleType(name)
loader = 'a loader!'
module.__loader__ = loader
@@ -120,7 +119,7 @@ class FindLoaderTests:
def test_sys_modules_loader_is_None(self):
# If sys.modules[name].__loader__ is None, raise ValueError.
name = 'some_mod'
- with util.uncache(name):
+ with test_util.uncache(name):
module = types.ModuleType(name)
module.__loader__ = None
sys.modules[name] = module
@@ -133,7 +132,7 @@ class FindLoaderTests:
# Should raise ValueError
# Issue #17099
name = 'some_mod'
- with util.uncache(name):
+ with test_util.uncache(name):
module = types.ModuleType(name)
try:
del module.__loader__
@@ -148,8 +147,8 @@ class FindLoaderTests:
def test_success(self):
# Return the loader found on sys.meta_path.
name = 'some_mod'
- with util.uncache(name):
- with util.import_state(meta_path=[self.FakeMetaFinder]):
+ with test_util.uncache(name):
+ with test_util.import_state(meta_path=[self.FakeMetaFinder]):
with warnings.catch_warnings():
warnings.simplefilter('ignore', DeprecationWarning)
self.assertEqual((name, None), self.init.find_loader(name))
@@ -158,8 +157,8 @@ class FindLoaderTests:
# Searching on a path should work.
name = 'some_mod'
path = 'path to some place'
- with util.uncache(name):
- with util.import_state(meta_path=[self.FakeMetaFinder]):
+ with test_util.uncache(name):
+ with test_util.import_state(meta_path=[self.FakeMetaFinder]):
with warnings.catch_warnings():
warnings.simplefilter('ignore', DeprecationWarning)
self.assertEqual((name, path),
@@ -171,11 +170,10 @@ class FindLoaderTests:
warnings.simplefilter('ignore', DeprecationWarning)
self.assertIsNone(self.init.find_loader('nevergoingtofindthismodule'))
-class Frozen_FindLoaderTests(FindLoaderTests, unittest.TestCase):
- init = frozen_init
-class Source_FindLoaderTests(FindLoaderTests, unittest.TestCase):
- init = source_init
+(Frozen_FindLoaderTests,
+ Source_FindLoaderTests
+ ) = test_util.test_both(FindLoaderTests, init=init)
class ReloadTests:
@@ -195,10 +193,10 @@ class ReloadTests:
module = type(sys)('top_level')
module.spam = 3
sys.modules['top_level'] = module
- mock = util.mock_modules('top_level',
- module_code={'top_level': code})
+ mock = test_util.mock_modules('top_level',
+ module_code={'top_level': code})
with mock:
- with util.import_state(meta_path=[mock]):
+ with test_util.import_state(meta_path=[mock]):
module = self.init.import_module('top_level')
reloaded = self.init.reload(module)
actual = sys.modules['top_level']
@@ -230,7 +228,7 @@ class ReloadTests:
def test_reload_location_changed(self):
name = 'spam'
with support.temp_cwd(None) as cwd:
- with util.uncache('spam'):
+ with test_util.uncache('spam'):
with support.DirsOnSysPath(cwd):
# Start as a plain module.
self.init.invalidate_caches()
@@ -281,7 +279,7 @@ class ReloadTests:
def test_reload_namespace_changed(self):
name = 'spam'
with support.temp_cwd(None) as cwd:
- with util.uncache('spam'):
+ with test_util.uncache('spam'):
with support.DirsOnSysPath(cwd):
# Start as a namespace package.
self.init.invalidate_caches()
@@ -338,20 +336,16 @@ class ReloadTests:
# See #19851.
name = 'spam'
subname = 'ham'
- with util.temp_module(name, pkg=True) as pkg_dir:
- fullname, _ = util.submodule(name, subname, pkg_dir)
+ with test_util.temp_module(name, pkg=True) as pkg_dir:
+ fullname, _ = test_util.submodule(name, subname, pkg_dir)
ham = self.init.import_module(fullname)
reloaded = self.init.reload(ham)
self.assertIs(reloaded, ham)
-class Frozen_ReloadTests(ReloadTests, unittest.TestCase):
- init = frozen_init
- util = frozen_util
-
-class Source_ReloadTests(ReloadTests, unittest.TestCase):
- init = source_init
- util = source_util
+(Frozen_ReloadTests,
+ Source_ReloadTests
+ ) = test_util.test_both(ReloadTests, init=init, util=util)
class InvalidateCacheTests:
@@ -384,11 +378,10 @@ class InvalidateCacheTests:
self.addCleanup(lambda: sys.path_importer_cache.__delitem__(key))
self.init.invalidate_caches() # Shouldn't trigger an exception.
-class Frozen_InvalidateCacheTests(InvalidateCacheTests, unittest.TestCase):
- init = frozen_init
-class Source_InvalidateCacheTests(InvalidateCacheTests, unittest.TestCase):
- init = source_init
+(Frozen_InvalidateCacheTests,
+ Source_InvalidateCacheTests
+ ) = test_util.test_both(InvalidateCacheTests, init=init)
class FrozenImportlibTests(unittest.TestCase):
@@ -398,6 +391,7 @@ class FrozenImportlibTests(unittest.TestCase):
# Can't do an isinstance() check since separate copies of importlib
# may have been used for import, so just check the name is not for the
# frozen loader.
+ source_init = init['Source']
self.assertNotEqual(source_init.__loader__.__class__.__name__,
'FrozenImporter')
@@ -426,11 +420,10 @@ class StartupTests:
elif self.machinery.FrozenImporter.find_module(name):
self.assertIsNot(module.__spec__, None)
-class Frozen_StartupTests(StartupTests, unittest.TestCase):
- machinery = frozen_machinery
-class Source_StartupTests(StartupTests, unittest.TestCase):
- machinery = source_machinery
+(Frozen_StartupTests,
+ Source_StartupTests
+ ) = test_util.test_both(StartupTests, machinery=machinery)
if __name__ == '__main__':
diff --git a/Lib/test/test_importlib/test_lazy.py b/Lib/test/test_importlib/test_lazy.py
new file mode 100644
index 0000000000..774b7a4564
--- /dev/null
+++ b/Lib/test/test_importlib/test_lazy.py
@@ -0,0 +1,133 @@
+import importlib
+from importlib import abc
+from importlib import util
+import unittest
+
+from . import util as test_util
+
+
+class CollectInit:
+
+ def __init__(self, *args, **kwargs):
+ self.args = args
+ self.kwargs = kwargs
+
+ def exec_module(self, module):
+ return self
+
+
+class LazyLoaderFactoryTests(unittest.TestCase):
+
+ def test_init(self):
+ factory = util.LazyLoader.factory(CollectInit)
+ # E.g. what importlib.machinery.FileFinder instantiates loaders with
+ # plus keyword arguments.
+ lazy_loader = factory('module name', 'module path', kw='kw')
+ loader = lazy_loader.loader
+ self.assertEqual(('module name', 'module path'), loader.args)
+ self.assertEqual({'kw': 'kw'}, loader.kwargs)
+
+ def test_validation(self):
+ # No exec_module(), no lazy loading.
+ with self.assertRaises(TypeError):
+ util.LazyLoader.factory(object)
+
+
+class TestingImporter(abc.MetaPathFinder, abc.Loader):
+
+ module_name = 'lazy_loader_test'
+ mutated_name = 'changed'
+ loaded = None
+ source_code = 'attr = 42; __name__ = {!r}'.format(mutated_name)
+
+ def find_spec(self, name, path, target=None):
+ if name != self.module_name:
+ return None
+ return util.spec_from_loader(name, util.LazyLoader(self))
+
+ def exec_module(self, module):
+ exec(self.source_code, module.__dict__)
+ self.loaded = module
+
+
+class LazyLoaderTests(unittest.TestCase):
+
+ def test_init(self):
+ with self.assertRaises(TypeError):
+ # Classes that dono't define exec_module() trigger TypeError.
+ util.LazyLoader(object)
+
+ def new_module(self, source_code=None):
+ loader = TestingImporter()
+ if source_code is not None:
+ loader.source_code = source_code
+ spec = util.spec_from_loader(TestingImporter.module_name,
+ util.LazyLoader(loader))
+ module = spec.loader.create_module(spec)
+ module.__spec__ = spec
+ module.__loader__ = spec.loader
+ spec.loader.exec_module(module)
+ # Module is now lazy.
+ self.assertIsNone(loader.loaded)
+ return module
+
+ def test_e2e(self):
+ # End-to-end test to verify the load is in fact lazy.
+ importer = TestingImporter()
+ assert importer.loaded is None
+ with test_util.uncache(importer.module_name):
+ with test_util.import_state(meta_path=[importer]):
+ module = importlib.import_module(importer.module_name)
+ self.assertIsNone(importer.loaded)
+ # Trigger load.
+ self.assertEqual(module.__loader__, importer)
+ self.assertIsNotNone(importer.loaded)
+ self.assertEqual(module, importer.loaded)
+
+ def test_attr_unchanged(self):
+ # An attribute only mutated as a side-effect of import should not be
+ # changed needlessly.
+ module = self.new_module()
+ self.assertEqual(TestingImporter.mutated_name, module.__name__)
+
+ def test_new_attr(self):
+ # A new attribute should persist.
+ module = self.new_module()
+ module.new_attr = 42
+ self.assertEqual(42, module.new_attr)
+
+ def test_mutated_preexisting_attr(self):
+ # Changing an attribute that already existed on the module --
+ # e.g. __name__ -- should persist.
+ module = self.new_module()
+ module.__name__ = 'bogus'
+ self.assertEqual('bogus', module.__name__)
+
+ def test_mutated_attr(self):
+ # Changing an attribute that comes into existence after an import
+ # should persist.
+ module = self.new_module()
+ module.attr = 6
+ self.assertEqual(6, module.attr)
+
+ def test_delete_eventual_attr(self):
+ # Deleting an attribute should stay deleted.
+ module = self.new_module()
+ del module.attr
+ self.assertFalse(hasattr(module, 'attr'))
+
+ def test_delete_preexisting_attr(self):
+ module = self.new_module()
+ del module.__name__
+ self.assertFalse(hasattr(module, '__name__'))
+
+ def test_module_substitution_error(self):
+ source_code = 'import sys; sys.modules[__name__] = 42'
+ module = self.new_module(source_code)
+ with test_util.uncache(TestingImporter.module_name):
+ with self.assertRaises(ValueError):
+ module.__name__
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/Lib/test/test_importlib/test_locks.py b/Lib/test/test_importlib/test_locks.py
index dc97ba1567..df0af12d38 100644
--- a/Lib/test/test_importlib/test_locks.py
+++ b/Lib/test/test_importlib/test_locks.py
@@ -1,7 +1,6 @@
-from . import util
-frozen_init, source_init = util.import_importlib('importlib')
-frozen_bootstrap = frozen_init._bootstrap
-source_bootstrap = source_init._bootstrap
+from . import util as test_util
+
+init = test_util.import_importlib('importlib')
import sys
import time
@@ -32,14 +31,20 @@ if threading is not None:
test_timeout = None
# _release_save() unsupported
test_release_save_unacquired = None
+ # lock status in repr unsupported
+ test_repr = None
+ test_locked_repr = None
- class Frozen_ModuleLockAsRLockTests(ModuleLockAsRLockTests, lock_tests.RLockTests):
- LockType = frozen_bootstrap._ModuleLock
-
- class Source_ModuleLockAsRLockTests(ModuleLockAsRLockTests, lock_tests.RLockTests):
- LockType = source_bootstrap._ModuleLock
+ LOCK_TYPES = {kind: splitinit._bootstrap._ModuleLock
+ for kind, splitinit in init.items()}
+ (Frozen_ModuleLockAsRLockTests,
+ Source_ModuleLockAsRLockTests
+ ) = test_util.test_both(ModuleLockAsRLockTests, lock_tests.RLockTests,
+ LockType=LOCK_TYPES)
else:
+ LOCK_TYPES = {}
+
class Frozen_ModuleLockAsRLockTests(unittest.TestCase):
pass
@@ -47,78 +52,94 @@ else:
pass
-class DeadlockAvoidanceTests:
-
- def setUp(self):
- try:
- self.old_switchinterval = sys.getswitchinterval()
- sys.setswitchinterval(0.000001)
- except AttributeError:
- self.old_switchinterval = None
-
- def tearDown(self):
- if self.old_switchinterval is not None:
- sys.setswitchinterval(self.old_switchinterval)
-
- def run_deadlock_avoidance_test(self, create_deadlock):
- NLOCKS = 10
- locks = [self.LockType(str(i)) for i in range(NLOCKS)]
- pairs = [(locks[i], locks[(i+1)%NLOCKS]) for i in range(NLOCKS)]
- if create_deadlock:
- NTHREADS = NLOCKS
- else:
- NTHREADS = NLOCKS - 1
- barrier = threading.Barrier(NTHREADS)
- results = []
- def _acquire(lock):
- """Try to acquire the lock. Return True on success, False on deadlock."""
+if threading is not None:
+ class DeadlockAvoidanceTests:
+
+ def setUp(self):
try:
- lock.acquire()
- except self.DeadlockError:
- return False
+ self.old_switchinterval = sys.getswitchinterval()
+ sys.setswitchinterval(0.000001)
+ except AttributeError:
+ self.old_switchinterval = None
+
+ def tearDown(self):
+ if self.old_switchinterval is not None:
+ sys.setswitchinterval(self.old_switchinterval)
+
+ def run_deadlock_avoidance_test(self, create_deadlock):
+ NLOCKS = 10
+ locks = [self.LockType(str(i)) for i in range(NLOCKS)]
+ pairs = [(locks[i], locks[(i+1)%NLOCKS]) for i in range(NLOCKS)]
+ if create_deadlock:
+ NTHREADS = NLOCKS
else:
- return True
- def f():
- a, b = pairs.pop()
- ra = _acquire(a)
- barrier.wait()
- rb = _acquire(b)
- results.append((ra, rb))
- if rb:
- b.release()
- if ra:
- a.release()
- lock_tests.Bunch(f, NTHREADS).wait_for_finished()
- self.assertEqual(len(results), NTHREADS)
- return results
-
- def test_deadlock(self):
- results = self.run_deadlock_avoidance_test(True)
- # At least one of the threads detected a potential deadlock on its
- # second acquire() call. It may be several of them, because the
- # deadlock avoidance mechanism is conservative.
- nb_deadlocks = results.count((True, False))
- self.assertGreaterEqual(nb_deadlocks, 1)
- self.assertEqual(results.count((True, True)), len(results) - nb_deadlocks)
-
- def test_no_deadlock(self):
- results = self.run_deadlock_avoidance_test(False)
- self.assertEqual(results.count((True, False)), 0)
- self.assertEqual(results.count((True, True)), len(results))
-
-@unittest.skipUnless(threading, "threads needed for this test")
-class Frozen_DeadlockAvoidanceTests(DeadlockAvoidanceTests, unittest.TestCase):
- LockType = frozen_bootstrap._ModuleLock
- DeadlockError = frozen_bootstrap._DeadlockError
-
-@unittest.skipUnless(threading, "threads needed for this test")
-class Source_DeadlockAvoidanceTests(DeadlockAvoidanceTests, unittest.TestCase):
- LockType = source_bootstrap._ModuleLock
- DeadlockError = source_bootstrap._DeadlockError
+ NTHREADS = NLOCKS - 1
+ barrier = threading.Barrier(NTHREADS)
+ results = []
+
+ def _acquire(lock):
+ """Try to acquire the lock. Return True on success,
+ False on deadlock."""
+ try:
+ lock.acquire()
+ except self.DeadlockError:
+ return False
+ else:
+ return True
+
+ def f():
+ a, b = pairs.pop()
+ ra = _acquire(a)
+ barrier.wait()
+ rb = _acquire(b)
+ results.append((ra, rb))
+ if rb:
+ b.release()
+ if ra:
+ a.release()
+ lock_tests.Bunch(f, NTHREADS).wait_for_finished()
+ self.assertEqual(len(results), NTHREADS)
+ return results
+
+ def test_deadlock(self):
+ results = self.run_deadlock_avoidance_test(True)
+ # At least one of the threads detected a potential deadlock on its
+ # second acquire() call. It may be several of them, because the
+ # deadlock avoidance mechanism is conservative.
+ nb_deadlocks = results.count((True, False))
+ self.assertGreaterEqual(nb_deadlocks, 1)
+ self.assertEqual(results.count((True, True)), len(results) - nb_deadlocks)
+
+ def test_no_deadlock(self):
+ results = self.run_deadlock_avoidance_test(False)
+ self.assertEqual(results.count((True, False)), 0)
+ self.assertEqual(results.count((True, True)), len(results))
+
+
+ DEADLOCK_ERRORS = {kind: splitinit._bootstrap._DeadlockError
+ for kind, splitinit in init.items()}
+
+ (Frozen_DeadlockAvoidanceTests,
+ Source_DeadlockAvoidanceTests
+ ) = test_util.test_both(DeadlockAvoidanceTests,
+ LockType=LOCK_TYPES,
+ DeadlockError=DEADLOCK_ERRORS)
+else:
+ DEADLOCK_ERRORS = {}
+
+ class Frozen_DeadlockAvoidanceTests(unittest.TestCase):
+ pass
+
+ class Source_DeadlockAvoidanceTests(unittest.TestCase):
+ pass
class LifetimeTests:
+ @property
+ def bootstrap(self):
+ return self.init._bootstrap
+
def test_lock_lifetime(self):
name = "xyzzy"
self.assertNotIn(name, self.bootstrap._module_locks)
@@ -135,11 +156,10 @@ class LifetimeTests:
self.assertEqual(0, len(self.bootstrap._module_locks),
self.bootstrap._module_locks)
-class Frozen_LifetimeTests(LifetimeTests, unittest.TestCase):
- bootstrap = frozen_bootstrap
-class Source_LifetimeTests(LifetimeTests, unittest.TestCase):
- bootstrap = source_bootstrap
+(Frozen_LifetimeTests,
+ Source_LifetimeTests
+ ) = test_util.test_both(LifetimeTests, init=init)
@support.reap_threads
diff --git a/Lib/test/test_importlib/test_spec.py b/Lib/test/test_importlib/test_spec.py
index 71541f692e..8b333e8c2f 100644
--- a/Lib/test/test_importlib/test_spec.py
+++ b/Lib/test/test_importlib/test_spec.py
@@ -1,10 +1,8 @@
-from . import util
+from . import util as test_util
-frozen_init, source_init = util.import_importlib('importlib')
-frozen_bootstrap = frozen_init._bootstrap
-source_bootstrap = source_init._bootstrap
-frozen_machinery, source_machinery = util.import_importlib('importlib.machinery')
-frozen_util, source_util = util.import_importlib('importlib.util')
+init = test_util.import_importlib('importlib')
+machinery = test_util.import_importlib('importlib.machinery')
+util = test_util.import_importlib('importlib.util')
import os.path
from test.support import CleanImport
@@ -36,6 +34,9 @@ class TestLoader:
def _is_package(self, name):
return self.package
+ def create_module(self, spec):
+ return None
+
class NewLoader(TestLoader):
@@ -52,6 +53,8 @@ class LegacyLoader(TestLoader):
with warnings.catch_warnings():
warnings.simplefilter("ignore", DeprecationWarning)
+ frozen_util = util['Frozen']
+
@frozen_util.module_for_loader
def load_module(self, module):
module.ham = self.HAM
@@ -221,18 +224,17 @@ class ModuleSpecTests:
self.assertEqual(self.loc_spec.cached, 'spam.pyc')
-class Frozen_ModuleSpecTests(ModuleSpecTests, unittest.TestCase):
- util = frozen_util
- machinery = frozen_machinery
-
-
-class Source_ModuleSpecTests(ModuleSpecTests, unittest.TestCase):
- util = source_util
- machinery = source_machinery
+(Frozen_ModuleSpecTests,
+ Source_ModuleSpecTests
+ ) = test_util.test_both(ModuleSpecTests, util=util, machinery=machinery)
class ModuleSpecMethodsTests:
+ @property
+ def bootstrap(self):
+ return self.init._bootstrap
+
def setUp(self):
self.name = 'spam'
self.path = 'spam.py'
@@ -243,152 +245,14 @@ class ModuleSpecMethodsTests:
origin=self.path)
self.loc_spec._set_fileattr = True
- # init_module_attrs
-
- def test_init_module_attrs(self):
- module = type(sys)(self.name)
- spec = self.machinery.ModuleSpec(self.name, self.loader)
- self.bootstrap._SpecMethods(spec).init_module_attrs(module)
-
- self.assertEqual(module.__name__, spec.name)
- self.assertIs(module.__loader__, spec.loader)
- self.assertEqual(module.__package__, spec.parent)
- self.assertIs(module.__spec__, spec)
- self.assertFalse(hasattr(module, '__path__'))
- self.assertFalse(hasattr(module, '__file__'))
- self.assertFalse(hasattr(module, '__cached__'))
-
- def test_init_module_attrs_package(self):
- module = type(sys)(self.name)
- spec = self.machinery.ModuleSpec(self.name, self.loader)
- spec.submodule_search_locations = ['spam', 'ham']
- self.bootstrap._SpecMethods(spec).init_module_attrs(module)
-
- self.assertEqual(module.__name__, spec.name)
- self.assertIs(module.__loader__, spec.loader)
- self.assertEqual(module.__package__, spec.parent)
- self.assertIs(module.__spec__, spec)
- self.assertIs(module.__path__, spec.submodule_search_locations)
- self.assertFalse(hasattr(module, '__file__'))
- self.assertFalse(hasattr(module, '__cached__'))
-
- def test_init_module_attrs_location(self):
- module = type(sys)(self.name)
- spec = self.loc_spec
- self.bootstrap._SpecMethods(spec).init_module_attrs(module)
-
- self.assertEqual(module.__name__, spec.name)
- self.assertIs(module.__loader__, spec.loader)
- self.assertEqual(module.__package__, spec.parent)
- self.assertIs(module.__spec__, spec)
- self.assertFalse(hasattr(module, '__path__'))
- self.assertEqual(module.__file__, spec.origin)
- self.assertEqual(module.__cached__,
- self.util.cache_from_source(spec.origin))
-
- def test_init_module_attrs_different_name(self):
- module = type(sys)('eggs')
- spec = self.machinery.ModuleSpec(self.name, self.loader)
- self.bootstrap._SpecMethods(spec).init_module_attrs(module)
-
- self.assertEqual(module.__name__, spec.name)
-
- def test_init_module_attrs_different_spec(self):
- module = type(sys)(self.name)
- module.__spec__ = self.machinery.ModuleSpec('eggs', object())
- spec = self.machinery.ModuleSpec(self.name, self.loader)
- self.bootstrap._SpecMethods(spec).init_module_attrs(module)
-
- self.assertEqual(module.__name__, spec.name)
- self.assertIs(module.__loader__, spec.loader)
- self.assertEqual(module.__package__, spec.parent)
- self.assertIs(module.__spec__, spec)
-
- def test_init_module_attrs_already_set(self):
- module = type(sys)('ham.eggs')
- module.__loader__ = object()
- module.__package__ = 'ham'
- module.__path__ = ['eggs']
- module.__file__ = 'ham/eggs/__init__.py'
- module.__cached__ = self.util.cache_from_source(module.__file__)
- original = vars(module).copy()
- spec = self.loc_spec
- spec.submodule_search_locations = ['']
- self.bootstrap._SpecMethods(spec).init_module_attrs(module)
-
- self.assertIs(module.__loader__, original['__loader__'])
- self.assertEqual(module.__package__, original['__package__'])
- self.assertIs(module.__path__, original['__path__'])
- self.assertEqual(module.__file__, original['__file__'])
- self.assertEqual(module.__cached__, original['__cached__'])
-
- def test_init_module_attrs_immutable(self):
- module = object()
- spec = self.loc_spec
- spec.submodule_search_locations = ['']
- self.bootstrap._SpecMethods(spec).init_module_attrs(module)
-
- self.assertFalse(hasattr(module, '__name__'))
- self.assertFalse(hasattr(module, '__loader__'))
- self.assertFalse(hasattr(module, '__package__'))
- self.assertFalse(hasattr(module, '__spec__'))
- self.assertFalse(hasattr(module, '__path__'))
- self.assertFalse(hasattr(module, '__file__'))
- self.assertFalse(hasattr(module, '__cached__'))
-
- # create()
-
- def test_create(self):
- created = self.bootstrap._SpecMethods(self.spec).create()
-
- self.assertEqual(created.__name__, self.spec.name)
- self.assertIs(created.__loader__, self.spec.loader)
- self.assertEqual(created.__package__, self.spec.parent)
- self.assertIs(created.__spec__, self.spec)
- self.assertFalse(hasattr(created, '__path__'))
- self.assertFalse(hasattr(created, '__file__'))
- self.assertFalse(hasattr(created, '__cached__'))
-
- def test_create_from_loader(self):
- module = type(sys.implementation)()
- class CreatingLoader(TestLoader):
- def create_module(self, spec):
- return module
- self.spec.loader = CreatingLoader()
- created = self.bootstrap._SpecMethods(self.spec).create()
-
- self.assertIs(created, module)
- self.assertEqual(created.__name__, self.spec.name)
- self.assertIs(created.__loader__, self.spec.loader)
- self.assertEqual(created.__package__, self.spec.parent)
- self.assertIs(created.__spec__, self.spec)
- self.assertFalse(hasattr(created, '__path__'))
- self.assertFalse(hasattr(created, '__file__'))
- self.assertFalse(hasattr(created, '__cached__'))
-
- def test_create_from_loader_not_handled(self):
- class CreatingLoader(TestLoader):
- def create_module(self, spec):
- return None
- self.spec.loader = CreatingLoader()
- created = self.bootstrap._SpecMethods(self.spec).create()
-
- self.assertEqual(created.__name__, self.spec.name)
- self.assertIs(created.__loader__, self.spec.loader)
- self.assertEqual(created.__package__, self.spec.parent)
- self.assertIs(created.__spec__, self.spec)
- self.assertFalse(hasattr(created, '__path__'))
- self.assertFalse(hasattr(created, '__file__'))
- self.assertFalse(hasattr(created, '__cached__'))
-
# exec()
def test_exec(self):
self.spec.loader = NewLoader()
- module = self.bootstrap._SpecMethods(self.spec).create()
+ module = self.util.module_from_spec(self.spec)
sys.modules[self.name] = module
self.assertFalse(hasattr(module, 'eggs'))
- self.bootstrap._SpecMethods(self.spec).exec(module)
+ self.bootstrap._exec(self.spec, module)
self.assertEqual(module.eggs, 1)
@@ -397,7 +261,7 @@ class ModuleSpecMethodsTests:
def test_load(self):
self.spec.loader = NewLoader()
with CleanImport(self.spec.name):
- loaded = self.bootstrap._SpecMethods(self.spec).load()
+ loaded = self.bootstrap._load(self.spec)
installed = sys.modules[self.spec.name]
self.assertEqual(loaded.eggs, 1)
@@ -410,7 +274,7 @@ class ModuleSpecMethodsTests:
sys.modules[module.__name__] = replacement
self.spec.loader = ReplacingLoader()
with CleanImport(self.spec.name):
- loaded = self.bootstrap._SpecMethods(self.spec).load()
+ loaded = self.bootstrap._load(self.spec)
installed = sys.modules[self.spec.name]
self.assertIs(loaded, replacement)
@@ -423,7 +287,7 @@ class ModuleSpecMethodsTests:
self.spec.loader = FailedLoader()
with CleanImport(self.spec.name):
with self.assertRaises(RuntimeError):
- loaded = self.bootstrap._SpecMethods(self.spec).load()
+ loaded = self.bootstrap._load(self.spec)
self.assertNotIn(self.spec.name, sys.modules)
def test_load_failed_removed(self):
@@ -434,20 +298,20 @@ class ModuleSpecMethodsTests:
self.spec.loader = FailedLoader()
with CleanImport(self.spec.name):
with self.assertRaises(RuntimeError):
- loaded = self.bootstrap._SpecMethods(self.spec).load()
+ loaded = self.bootstrap._load(self.spec)
self.assertNotIn(self.spec.name, sys.modules)
def test_load_legacy(self):
self.spec.loader = LegacyLoader()
with CleanImport(self.spec.name):
- loaded = self.bootstrap._SpecMethods(self.spec).load()
+ loaded = self.bootstrap._load(self.spec)
self.assertEqual(loaded.ham, -1)
def test_load_legacy_attributes(self):
self.spec.loader = LegacyLoader()
with CleanImport(self.spec.name):
- loaded = self.bootstrap._SpecMethods(self.spec).load()
+ loaded = self.bootstrap._load(self.spec)
self.assertIs(loaded.__loader__, self.spec.loader)
self.assertEqual(loaded.__package__, self.spec.parent)
@@ -461,7 +325,7 @@ class ModuleSpecMethodsTests:
return module
self.spec.loader = ImmutableLoader()
with CleanImport(self.spec.name):
- loaded = self.bootstrap._SpecMethods(self.spec).load()
+ loaded = self.bootstrap._load(self.spec)
self.assertIs(sys.modules[self.spec.name], module)
@@ -470,8 +334,8 @@ class ModuleSpecMethodsTests:
def test_reload(self):
self.spec.loader = NewLoader()
with CleanImport(self.spec.name):
- loaded = self.bootstrap._SpecMethods(self.spec).load()
- reloaded = self.bootstrap._SpecMethods(self.spec).exec(loaded)
+ loaded = self.bootstrap._load(self.spec)
+ reloaded = self.bootstrap._exec(self.spec, loaded)
installed = sys.modules[self.spec.name]
self.assertEqual(loaded.eggs, 1)
@@ -481,9 +345,9 @@ class ModuleSpecMethodsTests:
def test_reload_modified(self):
self.spec.loader = NewLoader()
with CleanImport(self.spec.name):
- loaded = self.bootstrap._SpecMethods(self.spec).load()
+ loaded = self.bootstrap._load(self.spec)
loaded.eggs = 2
- reloaded = self.bootstrap._SpecMethods(self.spec).exec(loaded)
+ reloaded = self.bootstrap._exec(self.spec, loaded)
self.assertEqual(loaded.eggs, 1)
self.assertIs(reloaded, loaded)
@@ -491,9 +355,9 @@ class ModuleSpecMethodsTests:
def test_reload_extra_attributes(self):
self.spec.loader = NewLoader()
with CleanImport(self.spec.name):
- loaded = self.bootstrap._SpecMethods(self.spec).load()
+ loaded = self.bootstrap._load(self.spec)
loaded.available = False
- reloaded = self.bootstrap._SpecMethods(self.spec).exec(loaded)
+ reloaded = self.bootstrap._exec(self.spec, loaded)
self.assertFalse(loaded.available)
self.assertIs(reloaded, loaded)
@@ -501,12 +365,12 @@ class ModuleSpecMethodsTests:
def test_reload_init_module_attrs(self):
self.spec.loader = NewLoader()
with CleanImport(self.spec.name):
- loaded = self.bootstrap._SpecMethods(self.spec).load()
+ loaded = self.bootstrap._load(self.spec)
loaded.__name__ = 'ham'
del loaded.__loader__
del loaded.__package__
del loaded.__spec__
- self.bootstrap._SpecMethods(self.spec).exec(loaded)
+ self.bootstrap._exec(self.spec, loaded)
self.assertEqual(loaded.__name__, self.spec.name)
self.assertIs(loaded.__loader__, self.spec.loader)
@@ -519,8 +383,8 @@ class ModuleSpecMethodsTests:
def test_reload_legacy(self):
self.spec.loader = LegacyLoader()
with CleanImport(self.spec.name):
- loaded = self.bootstrap._SpecMethods(self.spec).load()
- reloaded = self.bootstrap._SpecMethods(self.spec).exec(loaded)
+ loaded = self.bootstrap._load(self.spec)
+ reloaded = self.bootstrap._exec(self.spec, loaded)
installed = sys.modules[self.spec.name]
self.assertEqual(loaded.ham, -1)
@@ -528,20 +392,18 @@ class ModuleSpecMethodsTests:
self.assertIs(installed, loaded)
-class Frozen_ModuleSpecMethodsTests(ModuleSpecMethodsTests, unittest.TestCase):
- bootstrap = frozen_bootstrap
- machinery = frozen_machinery
- util = frozen_util
-
-
-class Source_ModuleSpecMethodsTests(ModuleSpecMethodsTests, unittest.TestCase):
- bootstrap = source_bootstrap
- machinery = source_machinery
- util = source_util
+(Frozen_ModuleSpecMethodsTests,
+ Source_ModuleSpecMethodsTests
+ ) = test_util.test_both(ModuleSpecMethodsTests, init=init, util=util,
+ machinery=machinery)
class ModuleReprTests:
+ @property
+ def bootstrap(self):
+ return self.init._bootstrap
+
def setUp(self):
self.module = type(os)('spam')
self.spec = self.machinery.ModuleSpec('spam', TestLoader())
@@ -625,16 +487,10 @@ class ModuleReprTests:
self.assertEqual(modrepr, '<module {!r}>'.format('spam'))
-class Frozen_ModuleReprTests(ModuleReprTests, unittest.TestCase):
- bootstrap = frozen_bootstrap
- machinery = frozen_machinery
- util = frozen_util
-
-
-class Source_ModuleReprTests(ModuleReprTests, unittest.TestCase):
- bootstrap = source_bootstrap
- machinery = source_machinery
- util = source_util
+(Frozen_ModuleReprTests,
+ Source_ModuleReprTests
+ ) = test_util.test_both(ModuleReprTests, init=init, util=util,
+ machinery=machinery)
class FactoryTests:
@@ -787,13 +643,14 @@ class FactoryTests:
# spec_from_file_location()
def test_spec_from_file_location_default(self):
- if self.machinery is source_machinery:
- raise unittest.SkipTest('not sure why this is breaking...')
spec = self.util.spec_from_file_location(self.name, self.path)
self.assertEqual(spec.name, self.name)
+ # Need to use a circuitous route to get at importlib.machinery to make
+ # sure the same class object is used in the isinstance() check as
+ # would have been used to create the loader.
self.assertIsInstance(spec.loader,
- self.machinery.SourceFileLoader)
+ self.util.abc.machinery.SourceFileLoader)
self.assertEqual(spec.loader.name, self.name)
self.assertEqual(spec.loader.path, self.path)
self.assertEqual(spec.origin, self.path)
@@ -947,11 +804,10 @@ class FactoryTests:
self.assertTrue(spec.has_location)
-class Frozen_FactoryTests(FactoryTests, unittest.TestCase):
- util = frozen_util
- machinery = frozen_machinery
+(Frozen_FactoryTests,
+ Source_FactoryTests
+ ) = test_util.test_both(FactoryTests, util=util, machinery=machinery)
-class Source_FactoryTests(FactoryTests, unittest.TestCase):
- util = source_util
- machinery = source_machinery
+if __name__ == '__main__':
+ unittest.main()
diff --git a/Lib/test/test_importlib/test_util.py b/Lib/test/test_importlib/test_util.py
index b2823c6a78..69466b2e77 100644
--- a/Lib/test/test_importlib/test_util.py
+++ b/Lib/test/test_importlib/test_util.py
@@ -1,10 +1,11 @@
-from importlib import util
-from . import util as test_util
-frozen_init, source_init = test_util.import_importlib('importlib')
-frozen_machinery, source_machinery = test_util.import_importlib('importlib.machinery')
-frozen_util, source_util = test_util.import_importlib('importlib.util')
+from . import util
+abc = util.import_importlib('importlib.abc')
+init = util.import_importlib('importlib')
+machinery = util.import_importlib('importlib.machinery')
+importlib_util = util.import_importlib('importlib.util')
import os
+import string
import sys
from test import support
import types
@@ -32,8 +33,94 @@ class DecodeSourceBytesTests:
self.assertEqual(self.util.decode_source(source_bytes),
'\n'.join([self.source, self.source]))
-Frozen_DecodeSourceBytesTests, Source_DecodeSourceBytesTests = test_util.test_both(
- DecodeSourceBytesTests, util=[frozen_util, source_util])
+
+(Frozen_DecodeSourceBytesTests,
+ Source_DecodeSourceBytesTests
+ ) = util.test_both(DecodeSourceBytesTests, util=importlib_util)
+
+
+class ModuleFromSpecTests:
+
+ def test_no_create_module(self):
+ class Loader:
+ def exec_module(self, module):
+ pass
+ spec = self.machinery.ModuleSpec('test', Loader())
+ with warnings.catch_warnings(record=True) as w:
+ warnings.simplefilter('always')
+ module = self.util.module_from_spec(spec)
+ self.assertEqual(1, len(w))
+ self.assertTrue(issubclass(w[0].category, DeprecationWarning))
+ self.assertIn('create_module', str(w[0].message))
+ self.assertIsInstance(module, types.ModuleType)
+ self.assertEqual(module.__name__, spec.name)
+
+ def test_create_module_returns_None(self):
+ class Loader(self.abc.Loader):
+ def create_module(self, spec):
+ return None
+ spec = self.machinery.ModuleSpec('test', Loader())
+ module = self.util.module_from_spec(spec)
+ self.assertIsInstance(module, types.ModuleType)
+ self.assertEqual(module.__name__, spec.name)
+
+ def test_create_module(self):
+ name = 'already set'
+ class CustomModule(types.ModuleType):
+ pass
+ class Loader(self.abc.Loader):
+ def create_module(self, spec):
+ module = CustomModule(spec.name)
+ module.__name__ = name
+ return module
+ spec = self.machinery.ModuleSpec('test', Loader())
+ module = self.util.module_from_spec(spec)
+ self.assertIsInstance(module, CustomModule)
+ self.assertEqual(module.__name__, name)
+
+ def test___name__(self):
+ spec = self.machinery.ModuleSpec('test', object())
+ module = self.util.module_from_spec(spec)
+ self.assertEqual(module.__name__, spec.name)
+
+ def test___spec__(self):
+ spec = self.machinery.ModuleSpec('test', object())
+ module = self.util.module_from_spec(spec)
+ self.assertEqual(module.__spec__, spec)
+
+ def test___loader__(self):
+ loader = object()
+ spec = self.machinery.ModuleSpec('test', loader)
+ module = self.util.module_from_spec(spec)
+ self.assertIs(module.__loader__, loader)
+
+ def test___package__(self):
+ spec = self.machinery.ModuleSpec('test.pkg', object())
+ module = self.util.module_from_spec(spec)
+ self.assertEqual(module.__package__, spec.parent)
+
+ def test___path__(self):
+ spec = self.machinery.ModuleSpec('test', object(), is_package=True)
+ module = self.util.module_from_spec(spec)
+ self.assertEqual(module.__path__, spec.submodule_search_locations)
+
+ def test___file__(self):
+ spec = self.machinery.ModuleSpec('test', object(), origin='some/path')
+ spec.has_location = True
+ module = self.util.module_from_spec(spec)
+ self.assertEqual(module.__file__, spec.origin)
+
+ def test___cached__(self):
+ spec = self.machinery.ModuleSpec('test', object())
+ spec.cached = 'some/path'
+ spec.has_location = True
+ module = self.util.module_from_spec(spec)
+ self.assertEqual(module.__cached__, spec.cached)
+
+(Frozen_ModuleFromSpecTests,
+ Source_ModuleFromSpecTests
+) = util.test_both(ModuleFromSpecTests, abc=abc, machinery=machinery,
+ util=importlib_util)
class ModuleForLoaderTests:
@@ -70,7 +157,7 @@ class ModuleForLoaderTests:
# Test that when no module exists in sys.modules a new module is
# created.
module_name = 'a.b.c'
- with test_util.uncache(module_name):
+ with util.uncache(module_name):
module = self.return_module(module_name)
self.assertIn(module_name, sys.modules)
self.assertIsInstance(module, types.ModuleType)
@@ -88,7 +175,7 @@ class ModuleForLoaderTests:
module = types.ModuleType('a.b.c')
module.__loader__ = 42
module.__package__ = 42
- with test_util.uncache(name):
+ with util.uncache(name):
sys.modules[name] = module
loader = FakeLoader()
returned_module = loader.load_module(name)
@@ -100,7 +187,7 @@ class ModuleForLoaderTests:
# Test that a module is removed from sys.modules if added but an
# exception is raised.
name = 'a.b.c'
- with test_util.uncache(name):
+ with util.uncache(name):
self.raise_exception(name)
self.assertNotIn(name, sys.modules)
@@ -108,7 +195,7 @@ class ModuleForLoaderTests:
# Test that a failure on reload leaves the module in-place.
name = 'a.b.c'
module = types.ModuleType(name)
- with test_util.uncache(name):
+ with util.uncache(name):
sys.modules[name] = module
self.raise_exception(name)
self.assertIs(module, sys.modules[name])
@@ -127,7 +214,7 @@ class ModuleForLoaderTests:
name = 'mod'
module = FalseModule(name)
- with test_util.uncache(name):
+ with util.uncache(name):
self.assertFalse(module)
sys.modules[name] = module
given = self.return_module(name)
@@ -146,7 +233,7 @@ class ModuleForLoaderTests:
return module
name = 'pkg.mod'
- with test_util.uncache(name):
+ with util.uncache(name):
loader = FakeLoader(False)
module = loader.load_module(name)
self.assertEqual(module.__name__, name)
@@ -154,15 +241,17 @@ class ModuleForLoaderTests:
self.assertEqual(module.__package__, 'pkg')
name = 'pkg.sub'
- with test_util.uncache(name):
+ with util.uncache(name):
loader = FakeLoader(True)
module = loader.load_module(name)
self.assertEqual(module.__name__, name)
self.assertIs(module.__loader__, loader)
self.assertEqual(module.__package__, name)
-Frozen_ModuleForLoaderTests, Source_ModuleForLoaderTests = test_util.test_both(
- ModuleForLoaderTests, util=[frozen_util, source_util])
+
+(Frozen_ModuleForLoaderTests,
+ Source_ModuleForLoaderTests
+ ) = util.test_both(ModuleForLoaderTests, util=importlib_util)
class SetPackageTests:
@@ -222,18 +311,25 @@ class SetPackageTests:
self.assertEqual(wrapped.__name__, fxn.__name__)
self.assertEqual(wrapped.__qualname__, fxn.__qualname__)
-Frozen_SetPackageTests, Source_SetPackageTests = test_util.test_both(
- SetPackageTests, util=[frozen_util, source_util])
+
+(Frozen_SetPackageTests,
+ Source_SetPackageTests
+ ) = util.test_both(SetPackageTests, util=importlib_util)
class SetLoaderTests:
"""Tests importlib.util.set_loader()."""
- class DummyLoader:
- @util.set_loader
- def load_module(self, module):
- return self.module
+ @property
+ def DummyLoader(self):
+ # Set DummyLoader on the class lazily.
+ class DummyLoader:
+ @self.util.set_loader
+ def load_module(self, module):
+ return self.module
+ self.__class__.DummyLoader = DummyLoader
+ return DummyLoader
def test_no_attribute(self):
loader = self.DummyLoader()
@@ -262,17 +358,10 @@ class SetLoaderTests:
warnings.simplefilter('ignore', DeprecationWarning)
self.assertEqual(42, loader.load_module('blah').__loader__)
-class Frozen_SetLoaderTests(SetLoaderTests, unittest.TestCase):
- class DummyLoader:
- @frozen_util.set_loader
- def load_module(self, module):
- return self.module
-class Source_SetLoaderTests(SetLoaderTests, unittest.TestCase):
- class DummyLoader:
- @source_util.set_loader
- def load_module(self, module):
- return self.module
+(Frozen_SetLoaderTests,
+ Source_SetLoaderTests
+ ) = util.test_both(SetLoaderTests, util=importlib_util)
class ResolveNameTests:
@@ -307,9 +396,10 @@ class ResolveNameTests:
with self.assertRaises(ValueError):
self.util.resolve_name('..bacon', 'spam')
-Frozen_ResolveNameTests, Source_ResolveNameTests = test_util.test_both(
- ResolveNameTests,
- util=[frozen_util, source_util])
+
+(Frozen_ResolveNameTests,
+ Source_ResolveNameTests
+ ) = util.test_both(ResolveNameTests, util=importlib_util)
class FindSpecTests:
@@ -320,7 +410,7 @@ class FindSpecTests:
def test_sys_modules(self):
name = 'some_mod'
- with test_util.uncache(name):
+ with util.uncache(name):
module = types.ModuleType(name)
loader = 'a loader!'
spec = self.machinery.ModuleSpec(name, loader)
@@ -332,7 +422,7 @@ class FindSpecTests:
def test_sys_modules_without___loader__(self):
name = 'some_mod'
- with test_util.uncache(name):
+ with util.uncache(name):
module = types.ModuleType(name)
del module.__loader__
loader = 'a loader!'
@@ -344,7 +434,7 @@ class FindSpecTests:
def test_sys_modules_spec_is_None(self):
name = 'some_mod'
- with test_util.uncache(name):
+ with util.uncache(name):
module = types.ModuleType(name)
module.__spec__ = None
sys.modules[name] = module
@@ -353,7 +443,7 @@ class FindSpecTests:
def test_sys_modules_loader_is_None(self):
name = 'some_mod'
- with test_util.uncache(name):
+ with util.uncache(name):
module = types.ModuleType(name)
spec = self.machinery.ModuleSpec(name, None)
module.__spec__ = spec
@@ -363,7 +453,7 @@ class FindSpecTests:
def test_sys_modules_spec_is_not_set(self):
name = 'some_mod'
- with test_util.uncache(name):
+ with util.uncache(name):
module = types.ModuleType(name)
try:
del module.__spec__
@@ -375,20 +465,11 @@ class FindSpecTests:
def test_success(self):
name = 'some_mod'
- with test_util.uncache(name):
- with test_util.import_state(meta_path=[self.FakeMetaFinder]):
+ with util.uncache(name):
+ with util.import_state(meta_path=[self.FakeMetaFinder]):
self.assertEqual((name, None, None),
self.util.find_spec(name))
-# def test_success_path(self):
-# # Searching on a path should work.
-# name = 'some_mod'
-# path = 'path to some place'
-# with test_util.uncache(name):
-# with test_util.import_state(meta_path=[self.FakeMetaFinder]):
-# self.assertEqual((name, path, None),
-# self.util.find_spec(name, path))
-
def test_nothing(self):
# None is returned upon failure to find a loader.
self.assertIsNone(self.util.find_spec('nevergoingtofindthismodule'))
@@ -396,8 +477,8 @@ class FindSpecTests:
def test_find_submodule(self):
name = 'spam'
subname = 'ham'
- with test_util.temp_module(name, pkg=True) as pkg_dir:
- fullname, _ = test_util.submodule(name, subname, pkg_dir)
+ with util.temp_module(name, pkg=True) as pkg_dir:
+ fullname, _ = util.submodule(name, subname, pkg_dir)
spec = self.util.find_spec(fullname)
self.assertIsNot(spec, None)
self.assertIn(name, sorted(sys.modules))
@@ -409,9 +490,9 @@ class FindSpecTests:
def test_find_submodule_parent_already_imported(self):
name = 'spam'
subname = 'ham'
- with test_util.temp_module(name, pkg=True) as pkg_dir:
+ with util.temp_module(name, pkg=True) as pkg_dir:
self.init.import_module(name)
- fullname, _ = test_util.submodule(name, subname, pkg_dir)
+ fullname, _ = util.submodule(name, subname, pkg_dir)
spec = self.util.find_spec(fullname)
self.assertIsNot(spec, None)
self.assertIn(name, sorted(sys.modules))
@@ -423,8 +504,8 @@ class FindSpecTests:
def test_find_relative_module(self):
name = 'spam'
subname = 'ham'
- with test_util.temp_module(name, pkg=True) as pkg_dir:
- fullname, _ = test_util.submodule(name, subname, pkg_dir)
+ with util.temp_module(name, pkg=True) as pkg_dir:
+ fullname, _ = util.submodule(name, subname, pkg_dir)
relname = '.' + subname
spec = self.util.find_spec(relname, name)
self.assertIsNot(spec, None)
@@ -437,8 +518,8 @@ class FindSpecTests:
def test_find_relative_module_missing_package(self):
name = 'spam'
subname = 'ham'
- with test_util.temp_module(name, pkg=True) as pkg_dir:
- fullname, _ = test_util.submodule(name, subname, pkg_dir)
+ with util.temp_module(name, pkg=True) as pkg_dir:
+ fullname, _ = util.submodule(name, subname, pkg_dir)
relname = '.' + subname
with self.assertRaises(ValueError):
self.util.find_spec(relname)
@@ -446,15 +527,10 @@ class FindSpecTests:
self.assertNotIn(fullname, sorted(sys.modules))
-class Frozen_FindSpecTests(FindSpecTests, unittest.TestCase):
- init = frozen_init
- machinery = frozen_machinery
- util = frozen_util
-
-class Source_FindSpecTests(FindSpecTests, unittest.TestCase):
- init = source_init
- machinery = source_machinery
- util = source_util
+(Frozen_FindSpecTests,
+ Source_FindSpecTests
+ ) = util.test_both(FindSpecTests, init=init, util=importlib_util,
+ machinery=machinery)
class MagicNumberTests:
@@ -467,8 +543,10 @@ class MagicNumberTests:
# The magic number uses \r\n to come out wrong when splitting on lines.
self.assertTrue(self.util.MAGIC_NUMBER.endswith(b'\r\n'))
-Frozen_MagicNumberTests, Source_MagicNumberTests = test_util.test_both(
- MagicNumberTests, util=[frozen_util, source_util])
+
+(Frozen_MagicNumberTests,
+ Source_MagicNumberTests
+ ) = util.test_both(MagicNumberTests, util=importlib_util)
class PEP3147Tests:
@@ -485,7 +563,8 @@ class PEP3147Tests:
path = os.path.join('foo', 'bar', 'baz', 'qux.py')
expect = os.path.join('foo', 'bar', 'baz', '__pycache__',
'qux.{}.pyc'.format(self.tag))
- self.assertEqual(self.util.cache_from_source(path, True), expect)
+ self.assertEqual(self.util.cache_from_source(path, optimization=''),
+ expect)
def test_cache_from_source_no_cache_tag(self):
# No cache tag means NotImplementedError.
@@ -498,43 +577,103 @@ class PEP3147Tests:
path = os.path.join('foo.bar', 'file')
expect = os.path.join('foo.bar', '__pycache__',
'file{}.pyc'.format(self.tag))
- self.assertEqual(self.util.cache_from_source(path, True), expect)
+ self.assertEqual(self.util.cache_from_source(path, optimization=''),
+ expect)
- def test_cache_from_source_optimized(self):
- # Given the path to a .py file, return the path to its PEP 3147
- # defined .pyo file (i.e. under __pycache__).
+ def test_cache_from_source_debug_override(self):
+ # Given the path to a .py file, return the path to its PEP 3147/PEP 488
+ # defined .pyc file (i.e. under __pycache__).
path = os.path.join('foo', 'bar', 'baz', 'qux.py')
- expect = os.path.join('foo', 'bar', 'baz', '__pycache__',
- 'qux.{}.pyo'.format(self.tag))
- self.assertEqual(self.util.cache_from_source(path, False), expect)
+ with warnings.catch_warnings():
+ warnings.simplefilter('ignore')
+ self.assertEqual(self.util.cache_from_source(path, False),
+ self.util.cache_from_source(path, optimization=1))
+ self.assertEqual(self.util.cache_from_source(path, True),
+ self.util.cache_from_source(path, optimization=''))
+ with warnings.catch_warnings():
+ warnings.simplefilter('error')
+ with self.assertRaises(DeprecationWarning):
+ self.util.cache_from_source(path, False)
+ with self.assertRaises(DeprecationWarning):
+ self.util.cache_from_source(path, True)
def test_cache_from_source_cwd(self):
path = 'foo.py'
expect = os.path.join('__pycache__', 'foo.{}.pyc'.format(self.tag))
- self.assertEqual(self.util.cache_from_source(path, True), expect)
+ self.assertEqual(self.util.cache_from_source(path, optimization=''),
+ expect)
def test_cache_from_source_override(self):
# When debug_override is not None, it can be any true-ish or false-ish
# value.
path = os.path.join('foo', 'bar', 'baz.py')
- partial_expect = os.path.join('foo', 'bar', '__pycache__',
- 'baz.{}.py'.format(self.tag))
- self.assertEqual(self.util.cache_from_source(path, []), partial_expect + 'o')
- self.assertEqual(self.util.cache_from_source(path, [17]),
- partial_expect + 'c')
# However if the bool-ishness can't be determined, the exception
# propagates.
class Bearish:
def __bool__(self): raise RuntimeError
- with self.assertRaises(RuntimeError):
- self.util.cache_from_source('/foo/bar/baz.py', Bearish())
+ with warnings.catch_warnings():
+ warnings.simplefilter('ignore')
+ self.assertEqual(self.util.cache_from_source(path, []),
+ self.util.cache_from_source(path, optimization=1))
+ self.assertEqual(self.util.cache_from_source(path, [17]),
+ self.util.cache_from_source(path, optimization=''))
+ with self.assertRaises(RuntimeError):
+ self.util.cache_from_source('/foo/bar/baz.py', Bearish())
+
+
+ def test_cache_from_source_optimization_empty_string(self):
+ # Setting 'optimization' to '' leads to no optimization tag (PEP 488).
+ path = 'foo.py'
+ expect = os.path.join('__pycache__', 'foo.{}.pyc'.format(self.tag))
+ self.assertEqual(self.util.cache_from_source(path, optimization=''),
+ expect)
+
+ def test_cache_from_source_optimization_None(self):
+ # Setting 'optimization' to None uses the interpreter's optimization.
+ # (PEP 488)
+ path = 'foo.py'
+ optimization_level = sys.flags.optimize
+ almost_expect = os.path.join('__pycache__', 'foo.{}'.format(self.tag))
+ if optimization_level == 0:
+ expect = almost_expect + '.pyc'
+ elif optimization_level <= 2:
+ expect = almost_expect + '.opt-{}.pyc'.format(optimization_level)
+ else:
+ msg = '{!r} is a non-standard optimization level'.format(optimization_level)
+ self.skipTest(msg)
+ self.assertEqual(self.util.cache_from_source(path, optimization=None),
+ expect)
+
+ def test_cache_from_source_optimization_set(self):
+ # The 'optimization' parameter accepts anything that has a string repr
+ # that passes str.alnum().
+ path = 'foo.py'
+ valid_characters = string.ascii_letters + string.digits
+ almost_expect = os.path.join('__pycache__', 'foo.{}'.format(self.tag))
+ got = self.util.cache_from_source(path, optimization=valid_characters)
+ # Test all valid characters are accepted.
+ self.assertEqual(got,
+ almost_expect + '.opt-{}.pyc'.format(valid_characters))
+ # str() should be called on argument.
+ self.assertEqual(self.util.cache_from_source(path, optimization=42),
+ almost_expect + '.opt-42.pyc')
+ # Invalid characters raise ValueError.
+ with self.assertRaises(ValueError):
+ self.util.cache_from_source(path, optimization='path/is/bad')
+
+ def test_cache_from_source_debug_override_optimization_both_set(self):
+ # Can only set one of the optimization-related parameters.
+ with warnings.catch_warnings():
+ warnings.simplefilter('ignore')
+ with self.assertRaises(TypeError):
+ self.util.cache_from_source('foo.py', False, optimization='')
@unittest.skipUnless(os.sep == '\\' and os.altsep == '/',
'test meaningful only where os.altsep is defined')
def test_sep_altsep_and_sep_cache_from_source(self):
# Windows path and PEP 3147 where sep is right of altsep.
self.assertEqual(
- self.util.cache_from_source('\\foo\\bar\\baz/qux.py', True),
+ self.util.cache_from_source('\\foo\\bar\\baz/qux.py', optimization=''),
'\\foo\\bar\\baz\\__pycache__\\qux.{}.pyc'.format(self.tag))
@unittest.skipUnless(sys.implementation.cache_tag is not None,
@@ -572,7 +711,12 @@ class PEP3147Tests:
ValueError, self.util.source_from_cache, '__pycache__/foo.pyc')
def test_source_from_cache_too_many_dots(self):
- # Too many dots in final path component -> ValueError
+ with self.assertRaises(ValueError):
+ self.util.source_from_cache(
+ '__pycache__/foo.cpython-32.opt-1.foo.pyc')
+
+ def test_source_from_cache_not_opt(self):
+ # Non-`opt-` path component -> ValueError
self.assertRaises(
ValueError, self.util.source_from_cache,
'__pycache__/foo.cpython-32.foo.pyc')
@@ -583,9 +727,21 @@ class PEP3147Tests:
ValueError, self.util.source_from_cache,
'/foo/bar/foo.cpython-32.foo.pyc')
-Frozen_PEP3147Tests, Source_PEP3147Tests = test_util.test_both(
- PEP3147Tests,
- util=[frozen_util, source_util])
+ def test_source_from_cache_optimized_bytecode(self):
+ # Optimized bytecode is not an issue.
+ path = os.path.join('__pycache__', 'foo.{}.opt-1.pyc'.format(self.tag))
+ self.assertEqual(self.util.source_from_cache(path), 'foo.py')
+
+ def test_source_from_cache_missing_optimization(self):
+ # An empty optimization level is a no-no.
+ path = os.path.join('__pycache__', 'foo.{}.opt-.pyc'.format(self.tag))
+ with self.assertRaises(ValueError):
+ self.util.source_from_cache(path)
+
+
+(Frozen_PEP3147Tests,
+ Source_PEP3147Tests
+ ) = util.test_both(PEP3147Tests, util=importlib_util)
if __name__ == '__main__':
diff --git a/Lib/test/test_importlib/test_windows.py b/Lib/test/test_importlib/test_windows.py
index 96b4adcd05..c893bcf565 100644
--- a/Lib/test/test_importlib/test_windows.py
+++ b/Lib/test/test_importlib/test_windows.py
@@ -1,14 +1,64 @@
-from . import util
-frozen_machinery, source_machinery = util.import_importlib('importlib.machinery')
+from . import util as test_util
+machinery = test_util.import_importlib('importlib.machinery')
+import os
+import re
import sys
import unittest
+from test import support
+from distutils.util import get_platform
+from contextlib import contextmanager
+from .util import temp_module
+
+support.import_module('winreg', required_on=['win'])
+from winreg import (
+ CreateKey, HKEY_CURRENT_USER,
+ SetValue, REG_SZ, KEY_ALL_ACCESS,
+ EnumKey, CloseKey, DeleteKey, OpenKey
+)
+
+def delete_registry_tree(root, subkey):
+ try:
+ hkey = OpenKey(root, subkey, access=KEY_ALL_ACCESS)
+ except OSError:
+ # subkey does not exist
+ return
+ while True:
+ try:
+ subsubkey = EnumKey(hkey, 0)
+ except OSError:
+ # no more subkeys
+ break
+ delete_registry_tree(hkey, subsubkey)
+ CloseKey(hkey)
+ DeleteKey(root, subkey)
+
+@contextmanager
+def setup_module(machinery, name, path=None):
+ if machinery.WindowsRegistryFinder.DEBUG_BUILD:
+ root = machinery.WindowsRegistryFinder.REGISTRY_KEY_DEBUG
+ else:
+ root = machinery.WindowsRegistryFinder.REGISTRY_KEY
+ key = root.format(fullname=name,
+ sys_version=sys.version[:3])
+ try:
+ with temp_module(name, "a = 1") as location:
+ subkey = CreateKey(HKEY_CURRENT_USER, key)
+ if path is None:
+ path = location + ".py"
+ SetValue(subkey, "", REG_SZ, path)
+ yield
+ finally:
+ if machinery.WindowsRegistryFinder.DEBUG_BUILD:
+ key = os.path.dirname(key)
+ delete_registry_tree(HKEY_CURRENT_USER, key)
@unittest.skipUnless(sys.platform.startswith('win'), 'requires Windows')
class WindowsRegistryFinderTests:
-
- # XXX Need a test that finds the spec via the registry.
+ # The module name is process-specific, allowing for
+ # simultaneous runs of the same test on a single machine.
+ test_module = "spamham{}".format(os.getpid())
def test_find_spec_missing(self):
spec = self.machinery.WindowsRegistryFinder.find_spec('spam')
@@ -18,12 +68,42 @@ class WindowsRegistryFinderTests:
loader = self.machinery.WindowsRegistryFinder.find_module('spam')
self.assertIs(loader, None)
+ def test_module_found(self):
+ with setup_module(self.machinery, self.test_module):
+ loader = self.machinery.WindowsRegistryFinder.find_module(self.test_module)
+ spec = self.machinery.WindowsRegistryFinder.find_spec(self.test_module)
+ self.assertIsNot(loader, None)
+ self.assertIsNot(spec, None)
+
+ def test_module_not_found(self):
+ with setup_module(self.machinery, self.test_module, path="."):
+ loader = self.machinery.WindowsRegistryFinder.find_module(self.test_module)
+ spec = self.machinery.WindowsRegistryFinder.find_spec(self.test_module)
+ self.assertIsNone(loader)
+ self.assertIsNone(spec)
+
+(Frozen_WindowsRegistryFinderTests,
+ Source_WindowsRegistryFinderTests
+ ) = test_util.test_both(WindowsRegistryFinderTests, machinery=machinery)
+
+@unittest.skipUnless(sys.platform.startswith('win'), 'requires Windows')
+class WindowsExtensionSuffixTests:
+ def test_tagged_suffix(self):
+ suffixes = self.machinery.EXTENSION_SUFFIXES
+ expected_tag = ".cp{0.major}{0.minor}-{1}.pyd".format(sys.version_info,
+ re.sub('[^a-zA-Z0-9]', '_', get_platform()))
+ try:
+ untagged_i = suffixes.index(".pyd")
+ except ValueError:
+ untagged_i = suffixes.index("_d.pyd")
+ expected_tag = "_d" + expected_tag
-class Frozen_WindowsRegistryFinderTests(WindowsRegistryFinderTests,
- unittest.TestCase):
- machinery = frozen_machinery
+ self.assertIn(expected_tag, suffixes)
+ # Ensure the tags are in the correct order
+ tagged_i = suffixes.index(expected_tag)
+ self.assertLess(tagged_i, untagged_i)
-class Source_WindowsRegistryFinderTests(WindowsRegistryFinderTests,
- unittest.TestCase):
- machinery = source_machinery
+(Frozen_WindowsExtensionSuffixTests,
+ Source_WindowsExtensionSuffixTests
+ ) = test_util.test_both(WindowsExtensionSuffixTests, machinery=machinery)
diff --git a/Lib/test/test_importlib/util.py b/Lib/test/test_importlib/util.py
index 885cec3b29..ce20377f8c 100644
--- a/Lib/test/test_importlib/util.py
+++ b/Lib/test/test_importlib/util.py
@@ -1,31 +1,85 @@
-from contextlib import contextmanager
-from importlib import util, invalidate_caches
+import builtins
+import contextlib
+import errno
+import functools
+import importlib
+from importlib import machinery, util, invalidate_caches
+import os
import os.path
from test import support
import unittest
import sys
+import tempfile
import types
+BUILTINS = types.SimpleNamespace()
+BUILTINS.good_name = None
+BUILTINS.bad_name = None
+if 'errno' in sys.builtin_module_names:
+ BUILTINS.good_name = 'errno'
+if 'importlib' not in sys.builtin_module_names:
+ BUILTINS.bad_name = 'importlib'
+
+EXTENSIONS = types.SimpleNamespace()
+EXTENSIONS.path = None
+EXTENSIONS.ext = None
+EXTENSIONS.filename = None
+EXTENSIONS.file_path = None
+EXTENSIONS.name = '_testcapi'
+
+def _extension_details():
+ global EXTENSIONS
+ for path in sys.path:
+ for ext in machinery.EXTENSION_SUFFIXES:
+ filename = EXTENSIONS.name + ext
+ file_path = os.path.join(path, filename)
+ if os.path.exists(file_path):
+ EXTENSIONS.path = path
+ EXTENSIONS.ext = ext
+ EXTENSIONS.filename = filename
+ EXTENSIONS.file_path = file_path
+ return
+
+_extension_details()
+
+
def import_importlib(module_name):
"""Import a module from importlib both w/ and w/o _frozen_importlib."""
fresh = ('importlib',) if '.' in module_name else ()
frozen = support.import_fresh_module(module_name)
source = support.import_fresh_module(module_name, fresh=fresh,
- blocked=('_frozen_importlib',))
+ blocked=('_frozen_importlib', '_frozen_importlib_external'))
+ return {'Frozen': frozen, 'Source': source}
+
+
+def specialize_class(cls, kind, base=None, **kwargs):
+ # XXX Support passing in submodule names--load (and cache) them?
+ # That would clean up the test modules a bit more.
+ if base is None:
+ base = unittest.TestCase
+ elif not isinstance(base, type):
+ base = base[kind]
+ name = '{}_{}'.format(kind, cls.__name__)
+ bases = (cls, base)
+ specialized = types.new_class(name, bases)
+ specialized.__module__ = cls.__module__
+ specialized._NAME = cls.__name__
+ specialized._KIND = kind
+ for attr, values in kwargs.items():
+ value = values[kind]
+ setattr(specialized, attr, value)
+ return specialized
+
+
+def split_frozen(cls, base=None, **kwargs):
+ frozen = specialize_class(cls, 'Frozen', base, **kwargs)
+ source = specialize_class(cls, 'Source', base, **kwargs)
return frozen, source
-def test_both(test_class, **kwargs):
- frozen_tests = types.new_class('Frozen_'+test_class.__name__,
- (test_class, unittest.TestCase))
- source_tests = types.new_class('Source_'+test_class.__name__,
- (test_class, unittest.TestCase))
- frozen_tests.__module__ = source_tests.__module__ = test_class.__module__
- for attr, (frozen_value, source_value) in kwargs.items():
- setattr(frozen_tests, attr, frozen_value)
- setattr(source_tests, attr, source_value)
- return frozen_tests, source_tests
+def test_both(test_class, base=None, **kwargs):
+ return split_frozen(test_class, base, **kwargs)
CASE_INSENSITIVE_FS = True
@@ -38,6 +92,10 @@ if sys.platform not in ('win32', 'cygwin'):
if not os.path.exists(changed_name):
CASE_INSENSITIVE_FS = False
+source_importlib = import_importlib('importlib')['Source']
+__import__ = {'Frozen': staticmethod(builtins.__import__),
+ 'Source': staticmethod(source_importlib.__import__)}
+
def case_insensitive_tests(test):
"""Class decorator that nullifies tests requiring a case-insensitive
@@ -53,7 +111,7 @@ def submodule(parent, name, pkg_dir, content=''):
return '{}.{}'.format(parent, name), path
-@contextmanager
+@contextlib.contextmanager
def uncache(*names):
"""Uncache a module from sys.modules.
@@ -79,7 +137,7 @@ def uncache(*names):
pass
-@contextmanager
+@contextlib.contextmanager
def temp_module(name, content='', *, pkg=False):
conflicts = [n for n in sys.modules if n.partition('.')[0] == name]
with support.temp_cwd(None) as cwd:
@@ -103,7 +161,7 @@ def temp_module(name, content='', *, pkg=False):
yield location
-@contextmanager
+@contextlib.contextmanager
def import_state(**kwargs):
"""Context manager to manage the various importers and stored state in the
sys module.
@@ -198,6 +256,7 @@ class mock_modules(_ImporterMock):
raise
return self.modules[fullname]
+
class mock_spec(_ImporterMock):
"""Importer mock using PEP 451 APIs."""
@@ -223,3 +282,99 @@ class mock_spec(_ImporterMock):
self.module_code[module.__spec__.name]()
except KeyError:
pass
+
+
+def writes_bytecode_files(fxn):
+ """Decorator to protect sys.dont_write_bytecode from mutation and to skip
+ tests that require it to be set to False."""
+ if sys.dont_write_bytecode:
+ return lambda *args, **kwargs: None
+ @functools.wraps(fxn)
+ def wrapper(*args, **kwargs):
+ original = sys.dont_write_bytecode
+ sys.dont_write_bytecode = False
+ try:
+ to_return = fxn(*args, **kwargs)
+ finally:
+ sys.dont_write_bytecode = original
+ return to_return
+ return wrapper
+
+
+def ensure_bytecode_path(bytecode_path):
+ """Ensure that the __pycache__ directory for PEP 3147 pyc file exists.
+
+ :param bytecode_path: File system path to PEP 3147 pyc file.
+ """
+ try:
+ os.mkdir(os.path.dirname(bytecode_path))
+ except OSError as error:
+ if error.errno != errno.EEXIST:
+ raise
+
+
+@contextlib.contextmanager
+def create_modules(*names):
+ """Temporarily create each named module with an attribute (named 'attr')
+ that contains the name passed into the context manager that caused the
+ creation of the module.
+
+ All files are created in a temporary directory returned by
+ tempfile.mkdtemp(). This directory is inserted at the beginning of
+ sys.path. When the context manager exits all created files (source and
+ bytecode) are explicitly deleted.
+
+ No magic is performed when creating packages! This means that if you create
+ a module within a package you must also create the package's __init__ as
+ well.
+
+ """
+ source = 'attr = {0!r}'
+ created_paths = []
+ mapping = {}
+ state_manager = None
+ uncache_manager = None
+ try:
+ temp_dir = tempfile.mkdtemp()
+ mapping['.root'] = temp_dir
+ import_names = set()
+ for name in names:
+ if not name.endswith('__init__'):
+ import_name = name
+ else:
+ import_name = name[:-len('.__init__')]
+ import_names.add(import_name)
+ if import_name in sys.modules:
+ del sys.modules[import_name]
+ name_parts = name.split('.')
+ file_path = temp_dir
+ for directory in name_parts[:-1]:
+ file_path = os.path.join(file_path, directory)
+ if not os.path.exists(file_path):
+ os.mkdir(file_path)
+ created_paths.append(file_path)
+ file_path = os.path.join(file_path, name_parts[-1] + '.py')
+ with open(file_path, 'w') as file:
+ file.write(source.format(name))
+ created_paths.append(file_path)
+ mapping[name] = file_path
+ uncache_manager = uncache(*import_names)
+ uncache_manager.__enter__()
+ state_manager = import_state(path=[temp_dir])
+ state_manager.__enter__()
+ yield mapping
+ finally:
+ if state_manager is not None:
+ state_manager.__exit__(None, None, None)
+ if uncache_manager is not None:
+ uncache_manager.__exit__(None, None, None)
+ support.rmtree(temp_dir)
+
+
+def mock_path_hook(*entries, importer):
+ """A mock sys.path_hooks entry."""
+ def hook(entry):
+ if entry not in entries:
+ raise ImportError
+ return importer
+ return hook
diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py
index 1a124b5db2..671e05a7b5 100644
--- a/Lib/test/test_inspect.py
+++ b/Lib/test/test_inspect.py
@@ -1,3 +1,4 @@
+import builtins
import collections
import datetime
import functools
@@ -8,6 +9,7 @@ import linecache
import os
from os.path import normcase
import _pickle
+import pickle
import re
import shutil
import sys
@@ -16,6 +18,7 @@ import textwrap
import unicodedata
import unittest
import unittest.mock
+import warnings
try:
from concurrent.futures import ThreadPoolExecutor
@@ -23,8 +26,8 @@ except ImportError:
ThreadPoolExecutor = None
from test.support import run_unittest, TESTFN, DirsOnSysPath, cpython_only
-from test.support import MISSING_C_DOCSTRINGS
-from test.script_helper import assert_python_ok, assert_python_failure
+from test.support import MISSING_C_DOCSTRINGS, cpython_only
+from test.support.script_helper import assert_python_ok, assert_python_failure
from test import inspect_fodder as mod
from test import inspect_fodder2 as mod2
@@ -60,14 +63,16 @@ class IsTestBase(unittest.TestCase):
predicates = set([inspect.isbuiltin, inspect.isclass, inspect.iscode,
inspect.isframe, inspect.isfunction, inspect.ismethod,
inspect.ismodule, inspect.istraceback,
- inspect.isgenerator, inspect.isgeneratorfunction])
+ inspect.isgenerator, inspect.isgeneratorfunction,
+ inspect.iscoroutine, inspect.iscoroutinefunction])
def istest(self, predicate, exp):
obj = eval(exp)
self.assertTrue(predicate(obj), '%s(%s)' % (predicate.__name__, exp))
for other in self.predicates - set([predicate]):
- if predicate == inspect.isgeneratorfunction and\
+ if (predicate == inspect.isgeneratorfunction or \
+ predicate == inspect.iscoroutinefunction) and \
other == inspect.isfunction:
continue
self.assertFalse(other(obj), 'not %s(%s)' % (other.__name__, exp))
@@ -76,19 +81,19 @@ def generator_function_example(self):
for i in range(2):
yield i
+async def coroutine_function_example(self):
+ return 'spam'
+
+@types.coroutine
+def gen_coroutine_function_example(self):
+ yield
+ return 'spam'
+
class EqualsToAll:
def __eq__(self, other):
return True
class TestPredicates(IsTestBase):
- def test_sixteen(self):
- count = len([x for x in dir(inspect) if x.startswith('is')])
- # This test is here for remember you to update Doc/library/inspect.rst
- # which claims there are 16 such functions
- expected = 16
- err_msg = "There are %d (not %d) is* functions" % (count, expected)
- self.assertEqual(count, expected, err_msg)
-
def test_excluding_predicates(self):
global tb
@@ -116,11 +121,62 @@ class TestPredicates(IsTestBase):
self.istest(inspect.isdatadescriptor, 'collections.defaultdict.default_factory')
self.istest(inspect.isgenerator, '(x for x in range(2))')
self.istest(inspect.isgeneratorfunction, 'generator_function_example')
+
+ with warnings.catch_warnings():
+ warnings.simplefilter("ignore")
+ self.istest(inspect.iscoroutine, 'coroutine_function_example(1)')
+ self.istest(inspect.iscoroutinefunction, 'coroutine_function_example')
+
if hasattr(types, 'MemberDescriptorType'):
self.istest(inspect.ismemberdescriptor, 'datetime.timedelta.days')
else:
self.assertFalse(inspect.ismemberdescriptor(datetime.timedelta.days))
+ def test_iscoroutine(self):
+ gen_coro = gen_coroutine_function_example(1)
+ coro = coroutine_function_example(1)
+
+ self.assertFalse(
+ inspect.iscoroutinefunction(gen_coroutine_function_example))
+ self.assertFalse(inspect.iscoroutine(gen_coro))
+
+ self.assertTrue(
+ inspect.isgeneratorfunction(gen_coroutine_function_example))
+ self.assertTrue(inspect.isgenerator(gen_coro))
+
+ self.assertTrue(
+ inspect.iscoroutinefunction(coroutine_function_example))
+ self.assertTrue(inspect.iscoroutine(coro))
+
+ self.assertFalse(
+ inspect.isgeneratorfunction(coroutine_function_example))
+ self.assertFalse(inspect.isgenerator(coro))
+
+ coro.close(); gen_coro.close() # silence warnings
+
+ def test_isawaitable(self):
+ def gen(): yield
+ self.assertFalse(inspect.isawaitable(gen()))
+
+ coro = coroutine_function_example(1)
+ gen_coro = gen_coroutine_function_example(1)
+
+ self.assertTrue(inspect.isawaitable(coro))
+ self.assertTrue(inspect.isawaitable(gen_coro))
+
+ class Future:
+ def __await__():
+ pass
+ self.assertTrue(inspect.isawaitable(Future()))
+ self.assertFalse(inspect.isawaitable(Future))
+
+ class NotFuture: pass
+ not_fut = NotFuture()
+ not_fut.__await__ = lambda: None
+ self.assertFalse(inspect.isawaitable(not_fut))
+
+ coro.close(); gen_coro.close() # silence warnings
+
def test_isroutine(self):
self.assertTrue(inspect.isroutine(mod.spam))
self.assertTrue(inspect.isroutine([].count))
@@ -186,6 +242,14 @@ class TestInterpreterStack(IsTestBase):
(modfile, 43, 'argue', [' spam(a, b, c)\n'], 0))
self.assertEqual(revise(*mod.st[3][1:]),
(modfile, 39, 'abuse', [' self.argue(a, b, c)\n'], 0))
+ # Test named tuple fields
+ record = mod.st[0]
+ self.assertIs(record.frame, mod.fr)
+ self.assertEqual(record.lineno, 16)
+ self.assertEqual(record.filename, mod.__file__)
+ self.assertEqual(record.function, 'eggs')
+ self.assertIn('inspect.stack()', record.code_context[0])
+ self.assertEqual(record.index, 0)
def test_trace(self):
self.assertEqual(len(git.tr), 3)
@@ -217,9 +281,7 @@ class GetSourceBase(unittest.TestCase):
# Subclasses must override.
fodderModule = None
- def __init__(self, *args, **kwargs):
- unittest.TestCase.__init__(self, *args, **kwargs)
-
+ def setUp(self):
with open(inspect.getsourcefile(self.fodderModule)) as fp:
self.source = fp.read()
@@ -274,6 +336,7 @@ class TestRetrievingSourceCode(GetSourceBase):
def test_getfunctions(self):
functions = inspect.getmembers(mod, inspect.isfunction)
self.assertEqual(functions, [('eggs', mod.eggs),
+ ('lobbest', mod.lobbest),
('spam', mod.spam)])
@unittest.skipIf(sys.flags.optimize >= 2,
@@ -285,6 +348,27 @@ class TestRetrievingSourceCode(GetSourceBase):
self.assertEqual(inspect.getdoc(git.abuse),
'Another\n\ndocstring\n\ncontaining\n\ntabs')
+ @unittest.skipIf(sys.flags.optimize >= 2,
+ "Docstrings are omitted with -O2 and above")
+ def test_getdoc_inherited(self):
+ self.assertEqual(inspect.getdoc(mod.FesteringGob),
+ 'A longer,\n\nindented\n\ndocstring.')
+ self.assertEqual(inspect.getdoc(mod.FesteringGob.abuse),
+ 'Another\n\ndocstring\n\ncontaining\n\ntabs')
+ self.assertEqual(inspect.getdoc(mod.FesteringGob().abuse),
+ 'Another\n\ndocstring\n\ncontaining\n\ntabs')
+ self.assertEqual(inspect.getdoc(mod.FesteringGob.contradiction),
+ 'The automatic gainsaying.')
+
+ @unittest.skipIf(MISSING_C_DOCSTRINGS, "test requires docstrings")
+ def test_finddoc(self):
+ finddoc = inspect._finddoc
+ self.assertEqual(finddoc(int), int.__doc__)
+ self.assertEqual(finddoc(int.to_bytes), int.to_bytes.__doc__)
+ self.assertEqual(finddoc(int().to_bytes), int.to_bytes.__doc__)
+ self.assertEqual(finddoc(int.from_bytes), int.from_bytes.__doc__)
+ self.assertEqual(finddoc(int.real), int.real.__doc__)
+
def test_cleandoc(self):
self.assertEqual(inspect.cleandoc('An\n indented\n docstring.'),
'An\nindented\ndocstring.')
@@ -309,7 +393,8 @@ class TestRetrievingSourceCode(GetSourceBase):
def test_getsource(self):
self.assertSourceEqual(git.abuse, 29, 39)
- self.assertSourceEqual(mod.StupidGit, 21, 46)
+ self.assertSourceEqual(mod.StupidGit, 21, 51)
+ self.assertSourceEqual(mod.lobbest, 75, 76)
def test_getsourcefile(self):
self.assertEqual(normcase(inspect.getsourcefile(mod.spam)), modfile)
@@ -364,6 +449,9 @@ class TestRetrievingSourceCode(GetSourceBase):
finally:
linecache.getlines = getlines
+ def test_getsource_on_code_object(self):
+ self.assertSourceEqual(mod.eggs.__code__, 12, 18)
+
class TestDecorators(GetSourceBase):
fodderModule = mod2
@@ -373,6 +461,12 @@ class TestDecorators(GetSourceBase):
def test_replacing_decorator(self):
self.assertSourceEqual(mod2.gone, 9, 10)
+ def test_getsource_unwrap(self):
+ self.assertSourceEqual(mod2.real, 130, 132)
+
+ def test_decorator_with_lambda(self):
+ self.assertSourceEqual(mod2.func114, 113, 115)
+
class TestOneliners(GetSourceBase):
fodderModule = mod2
def test_oneline_lambda(self):
@@ -466,8 +560,15 @@ class TestBuggyCases(GetSourceBase):
self.assertRaises(IOError, inspect.findsource, co)
self.assertRaises(IOError, inspect.getsource, co)
+ def test_getsource_on_method(self):
+ self.assertSourceEqual(mod2.ClassWithMethod.method, 118, 119)
+
+ def test_nested_func(self):
+ self.assertSourceEqual(mod2.cls135.func136, 136, 139)
+
+
class TestNoEOL(GetSourceBase):
- def __init__(self, *args, **kwargs):
+ def setUp(self):
self.tempdir = TESTFN + '_dir'
os.mkdir(self.tempdir)
with open(os.path.join(self.tempdir,
@@ -476,7 +577,7 @@ class TestNoEOL(GetSourceBase):
with DirsOnSysPath(self.tempdir):
import inspect_fodder3 as mod3
self.fodderModule = mod3
- GetSourceBase.__init__(self, *args, **kwargs)
+ super().setUp()
def tearDown(self):
shutil.rmtree(self.tempdir)
@@ -529,7 +630,8 @@ class TestClassesAndFunctions(unittest.TestCase):
def assertArgSpecEquals(self, routine, args_e, varargs_e=None,
varkw_e=None, defaults_e=None, formatted=None):
- args, varargs, varkw, defaults = inspect.getargspec(routine)
+ with self.assertWarns(DeprecationWarning):
+ args, varargs, varkw, defaults = inspect.getargspec(routine)
self.assertEqual(args, args_e)
self.assertEqual(varargs, varargs_e)
self.assertEqual(varkw, varkw_e)
@@ -1634,10 +1736,86 @@ class TestGetGeneratorState(unittest.TestCase):
self.assertRaises(TypeError, inspect.getgeneratorlocals, (2,3))
+class TestGetCoroutineState(unittest.TestCase):
+
+ def setUp(self):
+ @types.coroutine
+ def number_coroutine():
+ for number in range(5):
+ yield number
+ async def coroutine():
+ await number_coroutine()
+ self.coroutine = coroutine()
+
+ def tearDown(self):
+ self.coroutine.close()
+
+ def _coroutinestate(self):
+ return inspect.getcoroutinestate(self.coroutine)
+
+ def test_created(self):
+ self.assertEqual(self._coroutinestate(), inspect.CORO_CREATED)
+
+ def test_suspended(self):
+ self.coroutine.send(None)
+ self.assertEqual(self._coroutinestate(), inspect.CORO_SUSPENDED)
+
+ def test_closed_after_exhaustion(self):
+ while True:
+ try:
+ self.coroutine.send(None)
+ except StopIteration:
+ break
+
+ self.assertEqual(self._coroutinestate(), inspect.CORO_CLOSED)
+
+ def test_closed_after_immediate_exception(self):
+ with self.assertRaises(RuntimeError):
+ self.coroutine.throw(RuntimeError)
+ self.assertEqual(self._coroutinestate(), inspect.CORO_CLOSED)
+
+ def test_easy_debugging(self):
+ # repr() and str() of a coroutine state should contain the state name
+ names = 'CORO_CREATED CORO_RUNNING CORO_SUSPENDED CORO_CLOSED'.split()
+ for name in names:
+ state = getattr(inspect, name)
+ self.assertIn(name, repr(state))
+ self.assertIn(name, str(state))
+
+ def test_getcoroutinelocals(self):
+ @types.coroutine
+ def gencoro():
+ yield
+
+ gencoro = gencoro()
+ async def func(a=None):
+ b = 'spam'
+ await gencoro
+
+ coro = func()
+ self.assertEqual(inspect.getcoroutinelocals(coro),
+ {'a': None, 'gencoro': gencoro})
+ coro.send(None)
+ self.assertEqual(inspect.getcoroutinelocals(coro),
+ {'a': None, 'gencoro': gencoro, 'b': 'spam'})
+
+
+class MySignature(inspect.Signature):
+ # Top-level to make it picklable;
+ # used in test_signature_object_pickle
+ pass
+
+class MyParameter(inspect.Parameter):
+ # Top-level to make it picklable;
+ # used in test_signature_object_pickle
+ pass
+
+
+
class TestSignatureObject(unittest.TestCase):
@staticmethod
- def signature(func):
- sig = inspect.signature(func)
+ def signature(func, **kw):
+ sig = inspect.signature(func, **kw)
return (tuple((param.name,
(... if param.default is param.empty else param.default),
(... if param.annotation is param.empty
@@ -1691,6 +1869,37 @@ class TestSignatureObject(unittest.TestCase):
with self.assertRaisesRegex(ValueError, 'follows default argument'):
S((pkd, pk))
+ self.assertTrue(repr(sig).startswith('<Signature'))
+ self.assertTrue('(po, pk' in repr(sig))
+
+ def test_signature_object_pickle(self):
+ def foo(a, b, *, c:1={}, **kw) -> {42:'ham'}: pass
+ foo_partial = functools.partial(foo, a=1)
+
+ sig = inspect.signature(foo_partial)
+
+ for ver in range(pickle.HIGHEST_PROTOCOL + 1):
+ with self.subTest(pickle_ver=ver, subclass=False):
+ sig_pickled = pickle.loads(pickle.dumps(sig, ver))
+ self.assertEqual(sig, sig_pickled)
+
+ # Test that basic sub-classing works
+ sig = inspect.signature(foo)
+ myparam = MyParameter(name='z', kind=inspect.Parameter.POSITIONAL_ONLY)
+ myparams = collections.OrderedDict(sig.parameters, a=myparam)
+ mysig = MySignature().replace(parameters=myparams.values(),
+ return_annotation=sig.return_annotation)
+ self.assertTrue(isinstance(mysig, MySignature))
+ self.assertTrue(isinstance(mysig.parameters['z'], MyParameter))
+
+ for ver in range(pickle.HIGHEST_PROTOCOL + 1):
+ with self.subTest(pickle_ver=ver, subclass=True):
+ sig_pickled = pickle.loads(pickle.dumps(mysig, ver))
+ self.assertEqual(mysig, sig_pickled)
+ self.assertTrue(isinstance(sig_pickled, MySignature))
+ self.assertTrue(isinstance(sig_pickled.parameters['z'],
+ MyParameter))
+
def test_signature_immutability(self):
def test(a):
pass
@@ -1805,6 +2014,8 @@ class TestSignatureObject(unittest.TestCase):
test_unbound_method(dict.__delitem__)
test_unbound_method(property.__delete__)
+ # Regression test for issue #20586
+ test_callable(_testcapi.docstring_with_signature_but_no_doc)
@cpython_only
@unittest.skipIf(MISSING_C_DOCSTRINGS,
@@ -1824,23 +2035,26 @@ class TestSignatureObject(unittest.TestCase):
self.assertEqual(inspect.signature(func),
inspect.signature(decorated_func))
+ def wrapper_like(*args, **kwargs) -> int: pass
+ self.assertEqual(inspect.signature(decorated_func,
+ follow_wrapped=False),
+ inspect.signature(wrapper_like))
+
@cpython_only
def test_signature_on_builtins_no_signature(self):
import _testcapi
- with self.assertRaisesRegex(ValueError, 'no signature found for builtin'):
+ with self.assertRaisesRegex(ValueError,
+ 'no signature found for builtin'):
inspect.signature(_testcapi.docstring_no_signature)
+ with self.assertRaisesRegex(ValueError,
+ 'no signature found for builtin'):
+ inspect.signature(str)
+
def test_signature_on_non_function(self):
with self.assertRaisesRegex(TypeError, 'is not a callable object'):
inspect.signature(42)
- with self.assertRaisesRegex(TypeError, 'is not a Python function'):
- inspect.Signature.from_function(42)
-
- def test_signature_from_builtin_errors(self):
- with self.assertRaisesRegex(TypeError, 'is not a Python builtin'):
- inspect.Signature.from_builtin(42)
-
def test_signature_from_functionlike_object(self):
def func(a,b, *args, kwonly=True, kwonlyreq, **kwargs):
pass
@@ -1861,9 +2075,9 @@ class TestSignatureObject(unittest.TestCase):
def __call__(self, *args, **kwargs):
return self.func(*args, **kwargs)
- sig_func = inspect.Signature.from_function(func)
+ sig_func = inspect.Signature.from_callable(func)
- sig_funclike = inspect.Signature.from_function(funclike(func))
+ sig_funclike = inspect.Signature.from_callable(funclike(func))
self.assertEqual(sig_funclike, sig_func)
sig_funclike = inspect.signature(funclike(func))
@@ -1911,9 +2125,6 @@ class TestSignatureObject(unittest.TestCase):
__defaults__ = func.__defaults__
__kwdefaults__ = func.__kwdefaults__
- with self.assertRaisesRegex(TypeError, 'is not a Python function'):
- inspect.Signature.from_function(funclike)
-
self.assertEqual(str(inspect.signature(funclike)), '(marker)')
def test_signature_on_method(self):
@@ -2265,6 +2476,13 @@ class TestSignatureObject(unittest.TestCase):
('b', ..., ..., "positional_or_keyword")),
...))
+ self.assertEqual(self.signature(Foo.bar, follow_wrapped=False),
+ ((('args', ..., ..., "var_positional"),
+ ('kwargs', ..., ..., "var_keyword")),
+ ...)) # functools.wraps will copy __annotations__
+ # from "func" to "wrapper", hence no
+ # return_annotation
+
# Test that we handle method wrappers correctly
def decorator(func):
@functools.wraps(func)
@@ -2471,60 +2689,102 @@ class TestSignatureObject(unittest.TestCase):
def bar(a, *, b:int) -> float: pass
self.assertTrue(inspect.signature(foo) == inspect.signature(bar))
self.assertFalse(inspect.signature(foo) != inspect.signature(bar))
+ self.assertEqual(
+ hash(inspect.signature(foo)), hash(inspect.signature(bar)))
def bar(a, *, b:int) -> int: pass
self.assertFalse(inspect.signature(foo) == inspect.signature(bar))
self.assertTrue(inspect.signature(foo) != inspect.signature(bar))
+ self.assertNotEqual(
+ hash(inspect.signature(foo)), hash(inspect.signature(bar)))
def bar(a, *, b:int): pass
self.assertFalse(inspect.signature(foo) == inspect.signature(bar))
self.assertTrue(inspect.signature(foo) != inspect.signature(bar))
+ self.assertNotEqual(
+ hash(inspect.signature(foo)), hash(inspect.signature(bar)))
def bar(a, *, b:int=42) -> float: pass
self.assertFalse(inspect.signature(foo) == inspect.signature(bar))
self.assertTrue(inspect.signature(foo) != inspect.signature(bar))
+ self.assertNotEqual(
+ hash(inspect.signature(foo)), hash(inspect.signature(bar)))
def bar(a, *, c) -> float: pass
self.assertFalse(inspect.signature(foo) == inspect.signature(bar))
self.assertTrue(inspect.signature(foo) != inspect.signature(bar))
+ self.assertNotEqual(
+ hash(inspect.signature(foo)), hash(inspect.signature(bar)))
def bar(a, b:int) -> float: pass
self.assertFalse(inspect.signature(foo) == inspect.signature(bar))
self.assertTrue(inspect.signature(foo) != inspect.signature(bar))
+ self.assertNotEqual(
+ hash(inspect.signature(foo)), hash(inspect.signature(bar)))
def spam(b:int, a) -> float: pass
self.assertFalse(inspect.signature(spam) == inspect.signature(bar))
self.assertTrue(inspect.signature(spam) != inspect.signature(bar))
+ self.assertNotEqual(
+ hash(inspect.signature(spam)), hash(inspect.signature(bar)))
def foo(*, a, b, c): pass
def bar(*, c, b, a): pass
self.assertTrue(inspect.signature(foo) == inspect.signature(bar))
self.assertFalse(inspect.signature(foo) != inspect.signature(bar))
+ self.assertEqual(
+ hash(inspect.signature(foo)), hash(inspect.signature(bar)))
def foo(*, a=1, b, c): pass
def bar(*, c, b, a=1): pass
self.assertTrue(inspect.signature(foo) == inspect.signature(bar))
self.assertFalse(inspect.signature(foo) != inspect.signature(bar))
+ self.assertEqual(
+ hash(inspect.signature(foo)), hash(inspect.signature(bar)))
def foo(pos, *, a=1, b, c): pass
def bar(pos, *, c, b, a=1): pass
self.assertTrue(inspect.signature(foo) == inspect.signature(bar))
self.assertFalse(inspect.signature(foo) != inspect.signature(bar))
+ self.assertEqual(
+ hash(inspect.signature(foo)), hash(inspect.signature(bar)))
def foo(pos, *, a, b, c): pass
def bar(pos, *, c, b, a=1): pass
self.assertFalse(inspect.signature(foo) == inspect.signature(bar))
self.assertTrue(inspect.signature(foo) != inspect.signature(bar))
+ self.assertNotEqual(
+ hash(inspect.signature(foo)), hash(inspect.signature(bar)))
def foo(pos, *args, a=42, b, c, **kwargs:int): pass
def bar(pos, *args, c, b, a=42, **kwargs:int): pass
self.assertTrue(inspect.signature(foo) == inspect.signature(bar))
self.assertFalse(inspect.signature(foo) != inspect.signature(bar))
+ self.assertEqual(
+ hash(inspect.signature(foo)), hash(inspect.signature(bar)))
+
+ def test_signature_hashable(self):
+ S = inspect.Signature
+ P = inspect.Parameter
- def test_signature_unhashable(self):
def foo(a): pass
- sig = inspect.signature(foo)
+ foo_sig = inspect.signature(foo)
+
+ manual_sig = S(parameters=[P('a', P.POSITIONAL_OR_KEYWORD)])
+
+ self.assertEqual(hash(foo_sig), hash(manual_sig))
+ self.assertNotEqual(hash(foo_sig),
+ hash(manual_sig.replace(return_annotation='spam')))
+
+ def bar(a) -> 1: pass
+ self.assertNotEqual(hash(foo_sig), hash(inspect.signature(bar)))
+
+ def foo(a={}): pass
+ with self.assertRaisesRegex(TypeError, 'unhashable type'):
+ hash(inspect.signature(foo))
+
+ def foo(a) -> {}: pass
with self.assertRaisesRegex(TypeError, 'unhashable type'):
- hash(sig)
+ hash(inspect.signature(foo))
def test_signature_str(self):
def foo(a:int=1, *, b, c=None, **kwargs) -> 42:
@@ -2598,6 +2858,19 @@ class TestSignatureObject(unittest.TestCase):
self.assertEqual(self.signature(Spam.foo),
self.signature(Ham.foo))
+ def test_signature_from_callable_python_obj(self):
+ class MySignature(inspect.Signature): pass
+ def foo(a, *, b:1): pass
+ foo_sig = MySignature.from_callable(foo)
+ self.assertTrue(isinstance(foo_sig, MySignature))
+
+ @unittest.skipIf(MISSING_C_DOCSTRINGS,
+ "Signature information for builtins requires docstrings")
+ def test_signature_from_callable_builtin_obj(self):
+ class MySignature(inspect.Signature): pass
+ sig = MySignature.from_callable(_pickle.Pickler)
+ self.assertTrue(isinstance(sig, MySignature))
+
class TestParameterObject(unittest.TestCase):
def test_signature_parameter_kinds(self):
@@ -2643,6 +2916,16 @@ class TestParameterObject(unittest.TestCase):
p.replace(kind=inspect.Parameter.VAR_POSITIONAL)
self.assertTrue(repr(p).startswith('<Parameter'))
+ self.assertTrue('"a=42"' in repr(p))
+
+ def test_signature_parameter_hashable(self):
+ P = inspect.Parameter
+ foo = P('foo', kind=P.POSITIONAL_ONLY)
+ self.assertEqual(hash(foo), hash(P('foo', kind=P.POSITIONAL_ONLY)))
+ self.assertNotEqual(hash(foo), hash(P('foo', kind=P.POSITIONAL_ONLY,
+ default=42)))
+ self.assertNotEqual(hash(foo),
+ hash(foo.replace(kind=P.VAR_POSITIONAL)))
def test_signature_parameter_equality(self):
P = inspect.Parameter
@@ -2660,13 +2943,6 @@ class TestParameterObject(unittest.TestCase):
self.assertFalse(p != P('foo', default=42,
kind=inspect.Parameter.KEYWORD_ONLY))
- def test_signature_parameter_unhashable(self):
- p = inspect.Parameter('foo', default=42,
- kind=inspect.Parameter.KEYWORD_ONLY)
-
- with self.assertRaisesRegex(TypeError, 'unhashable type'):
- hash(p)
-
def test_signature_parameter_replace(self):
p = inspect.Parameter('foo', default=42,
kind=inspect.Parameter.KEYWORD_ONLY)
@@ -2735,7 +3011,9 @@ class TestSignatureBind(unittest.TestCase):
self.call(test, 1)
with self.assertRaisesRegex(TypeError, 'too many positional arguments'):
self.call(test, 1, spam=10)
- with self.assertRaisesRegex(TypeError, 'too many keyword arguments'):
+ with self.assertRaisesRegex(
+ TypeError, "got an unexpected keyword argument 'spam'"):
+
self.call(test, spam=1)
def test_signature_bind_var(self):
@@ -2760,10 +3038,12 @@ class TestSignatureBind(unittest.TestCase):
with self.assertRaisesRegex(TypeError, 'too many positional arguments'):
self.call(test, 1, 2, 3, 4)
- with self.assertRaisesRegex(TypeError, "'b' parameter lacking default"):
+ with self.assertRaisesRegex(TypeError,
+ "missing a required argument: 'b'"):
self.call(test, 1)
- with self.assertRaisesRegex(TypeError, "'a' parameter lacking default"):
+ with self.assertRaisesRegex(TypeError,
+ "missing a required argument: 'a'"):
self.call(test)
def test(a, b, c=10):
@@ -2836,7 +3116,7 @@ class TestSignatureBind(unittest.TestCase):
def test(a, *, foo=1, bar):
return foo
with self.assertRaisesRegex(TypeError,
- "'bar' parameter lacking default value"):
+ "missing a required argument: 'bar'"):
self.call(test, 1)
def test(foo, *, bar):
@@ -2844,8 +3124,9 @@ class TestSignatureBind(unittest.TestCase):
self.assertEqual(self.call(test, 1, bar=2), (1, 2))
self.assertEqual(self.call(test, bar=2, foo=1), (1, 2))
- with self.assertRaisesRegex(TypeError,
- 'too many keyword arguments'):
+ with self.assertRaisesRegex(
+ TypeError, "got an unexpected keyword argument 'spam'"):
+
self.call(test, bar=2, foo=1, spam=10)
with self.assertRaisesRegex(TypeError,
@@ -2856,12 +3137,13 @@ class TestSignatureBind(unittest.TestCase):
'too many positional arguments'):
self.call(test, 1, 2, bar=2)
- with self.assertRaisesRegex(TypeError,
- 'too many keyword arguments'):
+ with self.assertRaisesRegex(
+ TypeError, "got an unexpected keyword argument 'spam'"):
+
self.call(test, 1, bar=2, spam='ham')
with self.assertRaisesRegex(TypeError,
- "'bar' parameter lacking default value"):
+ "missing a required argument: 'bar'"):
self.call(test, 1)
def test(foo, *, bar, **bin):
@@ -2873,7 +3155,7 @@ class TestSignatureBind(unittest.TestCase):
self.assertEqual(self.call(test, spam='ham', foo=1, bar=2),
(1, 2, {'spam': 'ham'}))
with self.assertRaisesRegex(TypeError,
- "'foo' parameter lacking default value"):
+ "missing a required argument: 'foo'"):
self.call(test, spam='ham', bar=2)
self.assertEqual(self.call(test, 1, bar=2, bin=1, spam=10),
(1, 2, {'bin': 1, 'spam': 10}))
@@ -2938,7 +3220,9 @@ class TestSignatureBind(unittest.TestCase):
return a, args
sig = inspect.signature(test)
- with self.assertRaisesRegex(TypeError, "too many keyword arguments"):
+ with self.assertRaisesRegex(
+ TypeError, "got an unexpected keyword argument 'args'"):
+
sig.bind(a=0, args=1)
def test(*args, **kwargs):
@@ -2982,6 +3266,71 @@ class TestBoundArguments(unittest.TestCase):
self.assertFalse(ba == ba4)
self.assertTrue(ba != ba4)
+ def foo(*, a, b): pass
+ sig = inspect.signature(foo)
+ ba1 = sig.bind(a=1, b=2)
+ ba2 = sig.bind(b=2, a=1)
+ self.assertTrue(ba1 == ba2)
+ self.assertFalse(ba1 != ba2)
+
+ def test_signature_bound_arguments_pickle(self):
+ def foo(a, b, *, c:1={}, **kw) -> {42:'ham'}: pass
+ sig = inspect.signature(foo)
+ ba = sig.bind(20, 30, z={})
+
+ for ver in range(pickle.HIGHEST_PROTOCOL + 1):
+ with self.subTest(pickle_ver=ver):
+ ba_pickled = pickle.loads(pickle.dumps(ba, ver))
+ self.assertEqual(ba, ba_pickled)
+
+ def test_signature_bound_arguments_repr(self):
+ def foo(a, b, *, c:1={}, **kw) -> {42:'ham'}: pass
+ sig = inspect.signature(foo)
+ ba = sig.bind(20, 30, z={})
+ self.assertRegex(repr(ba), r'<BoundArguments \(a=20,.*\}\}\)>')
+
+ def test_signature_bound_arguments_apply_defaults(self):
+ def foo(a, b=1, *args, c:1={}, **kw): pass
+ sig = inspect.signature(foo)
+
+ ba = sig.bind(20)
+ ba.apply_defaults()
+ self.assertEqual(
+ list(ba.arguments.items()),
+ [('a', 20), ('b', 1), ('args', ()), ('c', {}), ('kw', {})])
+
+ # Make sure that we preserve the order:
+ # i.e. 'c' should be *before* 'kw'.
+ ba = sig.bind(10, 20, 30, d=1)
+ ba.apply_defaults()
+ self.assertEqual(
+ list(ba.arguments.items()),
+ [('a', 10), ('b', 20), ('args', (30,)), ('c', {}), ('kw', {'d':1})])
+
+ # Make sure that BoundArguments produced by bind_partial()
+ # are supported.
+ def foo(a, b): pass
+ sig = inspect.signature(foo)
+ ba = sig.bind_partial(20)
+ ba.apply_defaults()
+ self.assertEqual(
+ list(ba.arguments.items()),
+ [('a', 20)])
+
+ # Test no args
+ def foo(): pass
+ sig = inspect.signature(foo)
+ ba = sig.bind()
+ ba.apply_defaults()
+ self.assertEqual(list(ba.arguments.items()), [])
+
+ # Make sure a no-args binding still acquires proper defaults.
+ def foo(a='spam'): pass
+ sig = inspect.signature(foo)
+ ba = sig.bind()
+ ba.apply_defaults()
+ self.assertEqual(list(ba.arguments.items()), [('a', 'spam')])
+
class TestSignaturePrivateHelpers(unittest.TestCase):
def test_signature_get_bound_param(self):
@@ -3046,6 +3395,61 @@ class TestSignaturePrivateHelpers(unittest.TestCase):
None,
None)
+class TestSignatureDefinitions(unittest.TestCase):
+ # This test case provides a home for checking that particular APIs
+ # have signatures available for introspection
+
+ @cpython_only
+ @unittest.skipIf(MISSING_C_DOCSTRINGS,
+ "Signature information for builtins requires docstrings")
+ def test_builtins_have_signatures(self):
+ # This checks all builtin callables in CPython have signatures
+ # A few have signatures Signature can't yet handle, so we skip those
+ # since they will have to wait until PEP 457 adds the required
+ # introspection support to the inspect module
+ # Some others also haven't been converted yet for various other
+ # reasons, so we also skip those for the time being, but design
+ # the test to fail in order to indicate when it needs to be
+ # updated.
+ no_signature = set()
+ # These need PEP 457 groups
+ needs_groups = {"range", "slice", "dir", "getattr",
+ "next", "iter", "vars"}
+ no_signature |= needs_groups
+ # These need PEP 457 groups or a signature change to accept None
+ needs_semantic_update = {"round"}
+ no_signature |= needs_semantic_update
+ # These need *args support in Argument Clinic
+ needs_varargs = {"min", "max", "print", "__build_class__"}
+ no_signature |= needs_varargs
+ # These simply weren't covered in the initial AC conversion
+ # for builtin callables
+ not_converted_yet = {"open", "__import__"}
+ no_signature |= not_converted_yet
+ # These builtin types are expected to provide introspection info
+ types_with_signatures = set()
+ # Check the signatures we expect to be there
+ ns = vars(builtins)
+ for name, obj in sorted(ns.items()):
+ if not callable(obj):
+ continue
+ # The builtin types haven't been converted to AC yet
+ if isinstance(obj, type) and (name not in types_with_signatures):
+ # Note that this also skips all the exception types
+ no_signature.add(name)
+ if (name in no_signature):
+ # Not yet converted
+ continue
+ with self.subTest(builtin=name):
+ self.assertIsNotNone(inspect.signature(obj))
+ # Check callables that haven't been converted don't claim a signature
+ # This ensures this test will start failing as more signatures are
+ # added, so the affected items can be moved into the scope of the
+ # regression test above
+ for name in no_signature:
+ with self.subTest(builtin=name):
+ self.assertIsNone(obj.__text_signature__)
+
class TestUnwrap(unittest.TestCase):
@@ -3187,8 +3591,10 @@ def test_main():
TestGetcallargsFunctions, TestGetcallargsMethods,
TestGetcallargsUnboundMethods, TestGetattrStatic, TestGetGeneratorState,
TestNoEOL, TestSignatureObject, TestSignatureBind, TestParameterObject,
- TestBoundArguments, TestSignaturePrivateHelpers, TestGetClosureVars,
- TestUnwrap, TestMain, TestReload
+ TestBoundArguments, TestSignaturePrivateHelpers,
+ TestSignatureDefinitions,
+ TestGetClosureVars, TestUnwrap, TestMain, TestReload,
+ TestGetCoroutineState
)
if __name__ == "__main__":
diff --git a/Lib/test/test_int.py b/Lib/test/test_int.py
index 4906e46123..b66c5d6709 100644
--- a/Lib/test/test_int.py
+++ b/Lib/test/test_int.py
@@ -482,8 +482,5 @@ class IntTestCases(unittest.TestCase):
check('123\ud800')
check('123\ud800', 10)
-def test_main():
- support.run_unittest(IntTestCases)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_int_literal.py b/Lib/test/test_int_literal.py
index 1d578a7d71..bf725710d5 100644
--- a/Lib/test/test_int_literal.py
+++ b/Lib/test/test_int_literal.py
@@ -4,7 +4,6 @@ This is complex because of changes due to PEP 237.
"""
import unittest
-from test import support
class TestHexOctBin(unittest.TestCase):
@@ -140,8 +139,5 @@ class TestHexOctBin(unittest.TestCase):
self.assertEqual(-0b1000000000000000000000000000000000000000000000000000000000000000, -9223372036854775808)
self.assertEqual(-0b1111111111111111111111111111111111111111111111111111111111111111, -18446744073709551615)
-def test_main():
- support.run_unittest(TestHexOctBin)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py
index 86cf8e1442..000b525003 100644
--- a/Lib/test/test_io.py
+++ b/Lib/test/test_io.py
@@ -35,7 +35,7 @@ import weakref
from collections import deque, UserList
from itertools import cycle, count
from test import support
-from test.script_helper import assert_python_ok, run_python_until_end
+from test.support.script_helper import assert_python_ok, run_python_until_end
import codecs
import io # C implementation of io
@@ -44,10 +44,22 @@ try:
import threading
except ImportError:
threading = None
+
try:
- import fcntl
+ import ctypes
except ImportError:
- fcntl = None
+ def byteslike(*pos, **kw):
+ return array.array("b", bytes(*pos, **kw))
+else:
+ def byteslike(*pos, **kw):
+ """Create a bytes-like object having no string or sequence methods"""
+ data = bytes(*pos, **kw)
+ obj = EmptyStruct()
+ ctypes.resize(obj, len(data))
+ memoryview(obj).cast("B")[:] = data
+ return obj
+ class EmptyStruct(ctypes.Structure):
+ pass
def _default_chunk_size():
"""Get the default TextIOWrapper chunk size"""
@@ -207,6 +219,9 @@ class MockUnseekableIO:
def tell(self, *args):
raise self.UnsupportedOperation("not seekable")
+ def truncate(self, *args):
+ raise self.UnsupportedOperation("not seekable")
+
class CMockUnseekableIO(MockUnseekableIO, io.BytesIO):
UnsupportedOperation = io.UnsupportedOperation
@@ -285,7 +300,9 @@ class IOTest(unittest.TestCase):
self.assertEqual(f.tell(), 6)
self.assertEqual(f.seek(-1, 1), 5)
self.assertEqual(f.tell(), 5)
- self.assertEqual(f.write(bytearray(b" world\n\n\n")), 9)
+ buffer = bytearray(b" world\n\n\n")
+ self.assertEqual(f.write(buffer), 9)
+ buffer[:] = b"*" * 9 # Overwrite our copy of the data
self.assertEqual(f.seek(0), 0)
self.assertEqual(f.write(b"h"), 1)
self.assertEqual(f.seek(-1, 2), 13)
@@ -298,20 +315,21 @@ class IOTest(unittest.TestCase):
def read_ops(self, f, buffered=False):
data = f.read(5)
self.assertEqual(data, b"hello")
- data = bytearray(data)
+ data = byteslike(data)
self.assertEqual(f.readinto(data), 5)
- self.assertEqual(data, b" worl")
+ self.assertEqual(bytes(data), b" worl")
+ data = bytearray(5)
self.assertEqual(f.readinto(data), 2)
self.assertEqual(len(data), 5)
self.assertEqual(data[:2], b"d\n")
self.assertEqual(f.seek(0), 0)
self.assertEqual(f.read(20), b"hello world\n")
self.assertEqual(f.read(1), b"")
- self.assertEqual(f.readinto(bytearray(b"x")), 0)
+ self.assertEqual(f.readinto(byteslike(b"x")), 0)
self.assertEqual(f.seek(-6, 2), 6)
self.assertEqual(f.read(5), b"world")
self.assertEqual(f.read(0), b"")
- self.assertEqual(f.readinto(bytearray()), 0)
+ self.assertEqual(f.readinto(byteslike()), 0)
self.assertEqual(f.seek(-6, 1), 5)
self.assertEqual(f.read(5), b" worl")
self.assertEqual(f.tell(), 10)
@@ -322,6 +340,10 @@ class IOTest(unittest.TestCase):
f.seek(6)
self.assertEqual(f.read(), b"world\n")
self.assertEqual(f.read(), b"")
+ f.seek(0)
+ data = byteslike(5)
+ self.assertEqual(f.readinto1(data), 5)
+ self.assertEqual(bytes(data), b"hello")
LARGE = 2**31
@@ -365,10 +387,116 @@ class IOTest(unittest.TestCase):
self.assertRaises(exc, fp.seek, 1, self.SEEK_CUR)
self.assertRaises(exc, fp.seek, -1, self.SEEK_END)
+ def test_optional_abilities(self):
+ # Test for OSError when optional APIs are not supported
+ # The purpose of this test is to try fileno(), reading, writing and
+ # seeking operations with various objects that indicate they do not
+ # support these operations.
+
+ def pipe_reader():
+ [r, w] = os.pipe()
+ os.close(w) # So that read() is harmless
+ return self.FileIO(r, "r")
+
+ def pipe_writer():
+ [r, w] = os.pipe()
+ self.addCleanup(os.close, r)
+ # Guarantee that we can write into the pipe without blocking
+ thread = threading.Thread(target=os.read, args=(r, 100))
+ thread.start()
+ self.addCleanup(thread.join)
+ return self.FileIO(w, "w")
+
+ def buffered_reader():
+ return self.BufferedReader(self.MockUnseekableIO())
+
+ def buffered_writer():
+ return self.BufferedWriter(self.MockUnseekableIO())
+
+ def buffered_random():
+ return self.BufferedRandom(self.BytesIO())
+
+ def buffered_rw_pair():
+ return self.BufferedRWPair(self.MockUnseekableIO(),
+ self.MockUnseekableIO())
+
+ def text_reader():
+ class UnseekableReader(self.MockUnseekableIO):
+ writable = self.BufferedIOBase.writable
+ write = self.BufferedIOBase.write
+ return self.TextIOWrapper(UnseekableReader(), "ascii")
+
+ def text_writer():
+ class UnseekableWriter(self.MockUnseekableIO):
+ readable = self.BufferedIOBase.readable
+ read = self.BufferedIOBase.read
+ return self.TextIOWrapper(UnseekableWriter(), "ascii")
+
+ tests = (
+ (pipe_reader, "fr"), (pipe_writer, "fw"),
+ (buffered_reader, "r"), (buffered_writer, "w"),
+ (buffered_random, "rws"), (buffered_rw_pair, "rw"),
+ (text_reader, "r"), (text_writer, "w"),
+ (self.BytesIO, "rws"), (self.StringIO, "rws"),
+ )
+ for [test, abilities] in tests:
+ if test is pipe_writer and not threading:
+ continue # Skip subtest that uses a background thread
+ with self.subTest(test), test() as obj:
+ readable = "r" in abilities
+ self.assertEqual(obj.readable(), readable)
+ writable = "w" in abilities
+ self.assertEqual(obj.writable(), writable)
+
+ if isinstance(obj, self.TextIOBase):
+ data = "3"
+ elif isinstance(obj, (self.BufferedIOBase, self.RawIOBase)):
+ data = b"3"
+ else:
+ self.fail("Unknown base class")
+
+ if "f" in abilities:
+ obj.fileno()
+ else:
+ self.assertRaises(OSError, obj.fileno)
+
+ if readable:
+ obj.read(1)
+ obj.read()
+ else:
+ self.assertRaises(OSError, obj.read, 1)
+ self.assertRaises(OSError, obj.read)
+
+ if writable:
+ obj.write(data)
+ else:
+ self.assertRaises(OSError, obj.write, data)
+
+ if sys.platform.startswith("win") and test in (
+ pipe_reader, pipe_writer):
+ # Pipes seem to appear as seekable on Windows
+ continue
+ seekable = "s" in abilities
+ self.assertEqual(obj.seekable(), seekable)
+
+ if seekable:
+ obj.tell()
+ obj.seek(0)
+ else:
+ self.assertRaises(OSError, obj.tell)
+ self.assertRaises(OSError, obj.seek, 0)
+
+ if writable and seekable:
+ obj.truncate()
+ obj.truncate(0)
+ else:
+ self.assertRaises(OSError, obj.truncate)
+ self.assertRaises(OSError, obj.truncate, 0)
+
def test_open_handles_NUL_chars(self):
fn_with_NUL = 'foo\0bar'
- self.assertRaises(TypeError, self.open, fn_with_NUL, 'w')
- self.assertRaises(TypeError, self.open, bytes(fn_with_NUL, 'ascii'), 'w')
+ self.assertRaises(ValueError, self.open, fn_with_NUL, 'w')
+ self.assertRaises(ValueError, self.open, bytes(fn_with_NUL, 'ascii'), 'w')
def test_raw_file_io(self):
with self.open(support.TESTFN, "wb", buffering=0) as f:
@@ -532,10 +660,15 @@ class IOTest(unittest.TestCase):
def test_array_writes(self):
a = array.array('i', range(10))
n = len(a.tobytes())
- with self.open(support.TESTFN, "wb", 0) as f:
- self.assertEqual(f.write(a), n)
- with self.open(support.TESTFN, "wb") as f:
- self.assertEqual(f.write(a), n)
+ def check(f):
+ with f:
+ self.assertEqual(f.write(a), n)
+ f.writelines((a,))
+ check(self.BytesIO())
+ check(self.FileIO(support.TESTFN, "w"))
+ check(self.BufferedWriter(self.MockRawIO()))
+ check(self.BufferedRandom(self.MockRawIO()))
+ check(self.BufferedRWPair(self.MockRawIO(), self.MockRawIO()))
def test_closefd(self):
self.assertRaises(ValueError, self.open, support.TESTFN, 'w',
@@ -672,6 +805,22 @@ class IOTest(unittest.TestCase):
with self.open("non-existent", "r", opener=opener) as f:
self.assertEqual(f.read(), "egg\n")
+ def test_bad_opener_negative_1(self):
+ # Issue #27066.
+ def badopener(fname, flags):
+ return -1
+ with self.assertRaises(ValueError) as cm:
+ open('non-existent', 'r', opener=badopener)
+ self.assertEqual(str(cm.exception), 'opener returned -1')
+
+ def test_bad_opener_other_negative(self):
+ # Issue #27066.
+ def badopener(fname, flags):
+ return -2
+ with self.assertRaises(ValueError) as cm:
+ open('non-existent', 'r', opener=badopener)
+ self.assertEqual(str(cm.exception), 'opener returned -2')
+
def test_fileio_closefd(self):
# Issue #4841
with self.open(__file__, 'rb') as f1, \
@@ -685,18 +834,27 @@ class IOTest(unittest.TestCase):
f2.readline()
def test_nonbuffered_textio(self):
- with warnings.catch_warnings(record=True) as recorded:
+ with support.check_no_resource_warning(self):
with self.assertRaises(ValueError):
self.open(support.TESTFN, 'w', buffering=0)
- support.gc_collect()
- self.assertEqual(recorded, [])
def test_invalid_newline(self):
- with warnings.catch_warnings(record=True) as recorded:
+ with support.check_no_resource_warning(self):
with self.assertRaises(ValueError):
self.open(support.TESTFN, 'w', newline='invalid')
- support.gc_collect()
- self.assertEqual(recorded, [])
+
+ def test_buffered_readinto_mixin(self):
+ # Test the implementation provided by BufferedIOBase
+ class Stream(self.BufferedIOBase):
+ def read(self, size):
+ return b"12345"
+ read1 = read
+ stream = Stream()
+ for method in ("readinto", "readinto1"):
+ with self.subTest(method):
+ buffer = byteslike(5)
+ self.assertEqual(getattr(stream, method)(buffer), 5)
+ self.assertEqual(bytes(buffer), b"12345")
class CIOTest(IOTest):
@@ -723,6 +881,21 @@ class PyIOTest(IOTest):
pass
+@support.cpython_only
+class APIMismatchTest(unittest.TestCase):
+
+ def test_RawIOBase_io_in_pyio_match(self):
+ """Test that pyio RawIOBase class has all c RawIOBase methods"""
+ mismatch = support.detect_api_mismatch(pyio.RawIOBase, io.RawIOBase,
+ ignore=('__weakref__',))
+ self.assertEqual(mismatch, set(), msg='Python RawIOBase does not have all C RawIOBase methods')
+
+ def test_RawIOBase_pyio_in_io_match(self):
+ """Test that c RawIOBase class has all pyio RawIOBase methods"""
+ mismatch = support.detect_api_mismatch(io.RawIOBase, pyio.RawIOBase)
+ self.assertEqual(mismatch, set(), msg='C RawIOBase does not have all Python RawIOBase methods')
+
+
class CommonBufferedTests:
# Tests common to BufferedReader, BufferedWriter and BufferedRandom
@@ -740,12 +913,6 @@ class CommonBufferedTests:
self.assertEqual(42, bufio.fileno())
- @unittest.skip('test having existential crisis')
- def test_no_fileno(self):
- # XXX will we always have fileno() function? If so, kill
- # this test. Else, write it.
- pass
-
def test_invalid_args(self):
rawio = self.MockRawIO()
bufio = self.tp(rawio)
@@ -773,13 +940,9 @@ class CommonBufferedTests:
super().flush()
rawio = self.MockRawIO()
bufio = MyBufferedIO(rawio)
- writable = bufio.writable()
del bufio
support.gc_collect()
- if writable:
- self.assertEqual(record, [1, 2, 3])
- else:
- self.assertEqual(record, [1, 2])
+ self.assertEqual(record, [1, 2, 3])
def test_context_manager(self):
# Test usability as a context manager
@@ -811,7 +974,7 @@ class CommonBufferedTests:
def test_repr(self):
raw = self.MockRawIO()
b = self.tp(raw)
- clsname = "%s.%s" % (self.tp.__module__, self.tp.__name__)
+ clsname = "%s.%s" % (self.tp.__module__, self.tp.__qualname__)
self.assertEqual(repr(b), "<%s>" % clsname)
raw.name = "dummy"
self.assertEqual(repr(b), "<%s name='dummy'>" % clsname)
@@ -985,6 +1148,71 @@ class BufferedReaderTest(unittest.TestCase, CommonBufferedTests):
self.assertEqual(bufio.readinto(b), 1)
self.assertEqual(b, b"cb")
+ def test_readinto1(self):
+ buffer_size = 10
+ rawio = self.MockRawIO((b"abc", b"de", b"fgh", b"jkl"))
+ bufio = self.tp(rawio, buffer_size=buffer_size)
+ b = bytearray(2)
+ self.assertEqual(bufio.peek(3), b'abc')
+ self.assertEqual(rawio._reads, 1)
+ self.assertEqual(bufio.readinto1(b), 2)
+ self.assertEqual(b, b"ab")
+ self.assertEqual(rawio._reads, 1)
+ self.assertEqual(bufio.readinto1(b), 1)
+ self.assertEqual(b[:1], b"c")
+ self.assertEqual(rawio._reads, 1)
+ self.assertEqual(bufio.readinto1(b), 2)
+ self.assertEqual(b, b"de")
+ self.assertEqual(rawio._reads, 2)
+ b = bytearray(2*buffer_size)
+ self.assertEqual(bufio.peek(3), b'fgh')
+ self.assertEqual(rawio._reads, 3)
+ self.assertEqual(bufio.readinto1(b), 6)
+ self.assertEqual(b[:6], b"fghjkl")
+ self.assertEqual(rawio._reads, 4)
+
+ def test_readinto_array(self):
+ buffer_size = 60
+ data = b"a" * 26
+ rawio = self.MockRawIO((data,))
+ bufio = self.tp(rawio, buffer_size=buffer_size)
+
+ # Create an array with element size > 1 byte
+ b = array.array('i', b'x' * 32)
+ assert len(b) != 16
+
+ # Read into it. We should get as many *bytes* as we can fit into b
+ # (which is more than the number of elements)
+ n = bufio.readinto(b)
+ self.assertGreater(n, len(b))
+
+ # Check that old contents of b are preserved
+ bm = memoryview(b).cast('B')
+ self.assertLess(n, len(bm))
+ self.assertEqual(bm[:n], data[:n])
+ self.assertEqual(bm[n:], b'x' * (len(bm[n:])))
+
+ def test_readinto1_array(self):
+ buffer_size = 60
+ data = b"a" * 26
+ rawio = self.MockRawIO((data,))
+ bufio = self.tp(rawio, buffer_size=buffer_size)
+
+ # Create an array with element size > 1 byte
+ b = array.array('i', b'x' * 32)
+ assert len(b) != 16
+
+ # Read into it. We should get as many *bytes* as we can fit into b
+ # (which is more than the number of elements)
+ n = bufio.readinto1(b)
+ self.assertGreater(n, len(b))
+
+ # Check that old contents of b are preserved
+ bm = memoryview(b).cast('B')
+ self.assertLess(n, len(bm))
+ self.assertEqual(bm[:n], data[:n])
+ self.assertEqual(bm[n:], b'x' * (len(bm[n:])))
+
def test_readlines(self):
def bufio():
rawio = self.MockRawIO((b"abc\n", b"d\n", b"ef"))
@@ -1219,6 +1447,11 @@ class BufferedWriterTest(unittest.TestCase, CommonBufferedTests):
bufio = self.tp(writer, 8)
bufio.write(b"abc")
self.assertFalse(writer._write_stack)
+ buffer = bytearray(b"def")
+ bufio.write(buffer)
+ buffer[:] = b"***" # Overwrite our copy of the data
+ bufio.flush()
+ self.assertEqual(b"".join(writer._write_stack), b"abcdef")
def test_write_overflow(self):
writer = self.MockRawIO()
@@ -1545,11 +1778,13 @@ class BufferedRWPairTest(unittest.TestCase):
self.assertEqual(pair.read1(3), b"abc")
def test_readinto(self):
- pair = self.tp(self.BytesIO(b"abcdef"), self.MockRawIO())
+ for method in ("readinto", "readinto1"):
+ with self.subTest(method):
+ pair = self.tp(self.BytesIO(b"abcdef"), self.MockRawIO())
- data = bytearray(5)
- self.assertEqual(pair.readinto(data), 5)
- self.assertEqual(data, b"abcde")
+ data = byteslike(5)
+ self.assertEqual(getattr(pair, method)(data), 5)
+ self.assertEqual(bytes(data), b"abcde")
def test_write(self):
w = self.MockRawIO()
@@ -1557,7 +1792,9 @@ class BufferedRWPairTest(unittest.TestCase):
pair.write(b"abc")
pair.flush()
- pair.write(b"def")
+ buffer = bytearray(b"def")
+ pair.write(buffer)
+ buffer[:] = b"***" # Overwrite our copy of the data
pair.flush()
self.assertEqual(w._write_stack, [b"abc", b"def"])
@@ -2913,6 +3150,17 @@ class TextIOWrapperTest(unittest.TestCase):
self.assertFalse(err)
self.assertEqual("ok", out.decode().strip())
+ def test_read_byteslike(self):
+ r = MemviewBytesIO(b'Just some random string\n')
+ t = self.TextIOWrapper(r, 'utf-8')
+
+ # TextIOwrapper will not read the full string, because
+ # we truncate it to a multiple of the native int size
+ # so that we can construct a more complex memoryview.
+ bytes_val = _to_memoryview(r.getvalue()).tobytes()
+
+ self.assertEqual(t.read(200), bytes_val.decode('utf-8'))
+
def test_issue22849(self):
class F(object):
def readable(self): return True
@@ -2929,6 +3177,25 @@ class TextIOWrapperTest(unittest.TestCase):
t = self.TextIOWrapper(F(), encoding='utf-8')
+class MemviewBytesIO(io.BytesIO):
+ '''A BytesIO object whose read method returns memoryviews
+ rather than bytes'''
+
+ def read1(self, len_):
+ return _to_memoryview(super().read1(len_))
+
+ def read(self, len_):
+ return _to_memoryview(super().read(len_))
+
+def _to_memoryview(buf):
+ '''Convert bytes-object *buf* to a non-trivial memoryview'''
+
+ arr = array.array('i')
+ idx = len(buf) - len(buf) % arr.itemsize
+ arr.frombytes(buf[:idx])
+ return memoryview(arr)
+
+
class CTextIOWrapperTest(TextIOWrapperTest):
io = io
shutdown_error = "RuntimeError: could not find io module state"
@@ -2937,8 +3204,6 @@ class CTextIOWrapperTest(TextIOWrapperTest):
r = self.BytesIO(b"\xc3\xa9\n\n")
b = self.BufferedReader(r, 1000)
t = self.TextIOWrapper(b)
- self.assertRaises(TypeError, t.__init__, b, newline=42)
- self.assertRaises(ValueError, t.read)
self.assertRaises(ValueError, t.__init__, b, newline='xyzzy')
self.assertRaises(ValueError, t.read)
@@ -3175,6 +3440,8 @@ class MiscIOTest(unittest.TestCase):
self.assertRaises(ValueError, f.readall)
if hasattr(f, "readinto"):
self.assertRaises(ValueError, f.readinto, bytearray(1024))
+ if hasattr(f, "readinto1"):
+ self.assertRaises(ValueError, f.readinto1, bytearray(1024))
self.assertRaises(ValueError, f.readline)
self.assertRaises(ValueError, f.readlines)
self.assertRaises(ValueError, f.seek, 0)
@@ -3260,10 +3527,8 @@ class MiscIOTest(unittest.TestCase):
# When using closefd=False, there's no warning
r, w = os.pipe()
fds += r, w
- with warnings.catch_warnings(record=True) as recorded:
+ with support.check_no_resource_warning(self):
open(r, *args, closefd=False, **kwargs)
- support.gc_collect()
- self.assertEqual(recorded, [])
def test_warn_on_dealloc_fd(self):
self._check_warn_on_dealloc_fd("rb", buffering=0)
@@ -3288,26 +3553,20 @@ class MiscIOTest(unittest.TestCase):
with self.open(support.TESTFN, **kwargs) as f:
self.assertRaises(TypeError, pickle.dumps, f, protocol)
- @unittest.skipUnless(fcntl, 'fcntl required for this test')
def test_nonblock_pipe_write_bigbuf(self):
self._test_nonblock_pipe_write(16*1024)
- @unittest.skipUnless(fcntl, 'fcntl required for this test')
def test_nonblock_pipe_write_smallbuf(self):
self._test_nonblock_pipe_write(1024)
- def _set_non_blocking(self, fd):
- flags = fcntl.fcntl(fd, fcntl.F_GETFL)
- self.assertNotEqual(flags, -1)
- res = fcntl.fcntl(fd, fcntl.F_SETFL, flags | os.O_NONBLOCK)
- self.assertEqual(res, 0)
-
+ @unittest.skipUnless(hasattr(os, 'set_blocking'),
+ 'os.set_blocking() required for this test')
def _test_nonblock_pipe_write(self, bufsize):
sent = []
received = []
r, w = os.pipe()
- self._set_non_blocking(r)
- self._set_non_blocking(w)
+ os.set_blocking(r, False)
+ os.set_blocking(w, False)
# To exercise all code paths in the C implementation we need
# to play with buffer sizes. For instance, if we choose a
@@ -3456,6 +3715,7 @@ class SignalsTest(unittest.TestCase):
t.daemon = True
r, w = os.pipe()
fdopen_kwargs["closefd"] = False
+ large_data = item * (support.PIPE_MAX_SIZE // len(item) + 1)
try:
wio = self.io.open(w, **fdopen_kwargs)
t.start()
@@ -3467,8 +3727,7 @@ class SignalsTest(unittest.TestCase):
# handlers, which in this case will invoke alarm_interrupt().
signal.alarm(1)
try:
- with self.assertRaises(ZeroDivisionError):
- wio.write(item * (support.PIPE_MAX_SIZE // len(item) + 1))
+ self.assertRaises(ZeroDivisionError, wio.write, large_data)
finally:
signal.alarm(0)
t.join()
@@ -3569,11 +3828,13 @@ class SignalsTest(unittest.TestCase):
returning a partial result or EINTR), properly invokes the signal
handler and retries if the latter returned successfully."""
select = support.import_module("select")
+
# A quantity that exceeds the buffer size of an anonymous pipe's
# write end.
N = support.PIPE_MAX_SIZE
r, w = os.pipe()
fdopen_kwargs["closefd"] = False
+
# We need a separate thread to read from the pipe and allow the
# write() to finish. This thread is started after the SIGALRM is
# received (forcing a first EINTR in write()).
@@ -3596,6 +3857,8 @@ class SignalsTest(unittest.TestCase):
signal.alarm(1)
def alarm2(sig, frame):
t.start()
+
+ large_data = item * N
signal.signal(signal.SIGALRM, alarm1)
try:
wio = self.io.open(w, **fdopen_kwargs)
@@ -3605,7 +3868,9 @@ class SignalsTest(unittest.TestCase):
# and the first alarm)
# - second raw write() returns EINTR (because of the second alarm)
# - subsequent write()s are successful (either partial or complete)
- self.assertEqual(N, wio.write(item * N))
+ written = wio.write(large_data)
+ self.assertEqual(N, written)
+
wio.flush()
write_finished = True
t.join()
@@ -3645,7 +3910,7 @@ class PySignalsTest(SignalsTest):
def load_tests(*args):
- tests = (CIOTest, PyIOTest,
+ tests = (CIOTest, PyIOTest, APIMismatchTest,
CBufferedReaderTest, PyBufferedReaderTest,
CBufferedWriterTest, PyBufferedWriterTest,
CBufferedRWPairTest, PyBufferedRWPairTest,
diff --git a/Lib/test/test_ioctl.py b/Lib/test/test_ioctl.py
index efe9f516cc..b82b65135a 100644
--- a/Lib/test/test_ioctl.py
+++ b/Lib/test/test_ioctl.py
@@ -1,6 +1,6 @@
import array
import unittest
-from test.support import run_unittest, import_module, get_attribute
+from test.support import import_module, get_attribute
import os, struct
fcntl = import_module('fcntl')
termios = import_module('termios')
diff --git a/Lib/test/test_ipaddress.py b/Lib/test/test_ipaddress.py
index 95e3f04166..be62fadf0d 100644
--- a/Lib/test/test_ipaddress.py
+++ b/Lib/test/test_ipaddress.py
@@ -9,7 +9,9 @@ import re
import contextlib
import functools
import operator
+import pickle
import ipaddress
+import weakref
class BaseTestCase(unittest.TestCase):
@@ -83,6 +85,13 @@ class CommonTestMixin:
self.assertRaises(TypeError, hex, self.factory(1))
self.assertRaises(TypeError, bytes, self.factory(1))
+ def pickle_test(self, addr):
+ for proto in range(pickle.HIGHEST_PROTOCOL + 1):
+ with self.subTest(proto=proto):
+ x = self.factory(addr)
+ y = pickle.loads(pickle.dumps(x, proto))
+ self.assertEqual(y, x)
+
class CommonTestMixin_v4(CommonTestMixin):
@@ -248,6 +257,12 @@ class AddressTestCase_v4(BaseTestCase, CommonTestMixin_v4):
assertBadOctet("257.0.0.0", 257)
assertBadOctet("192.168.0.999", 999)
+ def test_pickle(self):
+ self.pickle_test('192.0.2.1')
+
+ def test_weakref(self):
+ weakref.ref(self.factory('192.0.2.1'))
+
class AddressTestCase_v6(BaseTestCase, CommonTestMixin_v6):
factory = ipaddress.IPv6Address
@@ -380,6 +395,12 @@ class AddressTestCase_v6(BaseTestCase, CommonTestMixin_v6):
assertBadPart("02001:db8::", "02001")
assertBadPart('2001:888888::1', "888888")
+ def test_pickle(self):
+ self.pickle_test('2001:db8::')
+
+ def test_weakref(self):
+ weakref.ref(self.factory('2001:db8::'))
+
class NetmaskTestMixin_v4(CommonTestMixin_v4):
"""Input validation on interfaces and networks is very similar"""
@@ -443,6 +464,11 @@ class NetmaskTestMixin_v4(CommonTestMixin_v4):
assertBadNetmask("1.1.1.1", "pudding")
assertBadNetmask("1.1.1.1", "::")
+ def test_pickle(self):
+ self.pickle_test('192.0.2.0/27')
+ self.pickle_test('192.0.2.0/31') # IPV4LENGTH - 1
+ self.pickle_test('192.0.2.0') # IPV4LENGTH
+
class InterfaceTestCase_v4(BaseTestCase, NetmaskTestMixin_v4):
factory = ipaddress.IPv4Interface
@@ -501,6 +527,11 @@ class NetmaskTestMixin_v6(CommonTestMixin_v6):
assertBadNetmask("::1", "pudding")
assertBadNetmask("::", "::")
+ def test_pickle(self):
+ self.pickle_test('2001:db8::1000/124')
+ self.pickle_test('2001:db8::1000/127') # IPV6LENGTH - 1
+ self.pickle_test('2001:db8::1000') # IPV6LENGTH
+
class InterfaceTestCase_v6(BaseTestCase, NetmaskTestMixin_v6):
factory = ipaddress.IPv6Interface
@@ -556,8 +587,16 @@ class ComparisonTests(unittest.TestCase):
v4_objects = v4_addresses + [v4net]
v6_addresses = [v6addr, v6intf]
v6_objects = v6_addresses + [v6net]
+
objects = v4_objects + v6_objects
+ v4addr2 = ipaddress.IPv4Address(2)
+ v4net2 = ipaddress.IPv4Network(2)
+ v4intf2 = ipaddress.IPv4Interface(2)
+ v6addr2 = ipaddress.IPv6Address(2)
+ v6net2 = ipaddress.IPv6Network(2)
+ v6intf2 = ipaddress.IPv6Interface(2)
+
def test_foreign_type_equality(self):
# __eq__ should never raise TypeError directly
other = object()
@@ -576,6 +615,31 @@ class ComparisonTests(unittest.TestCase):
continue
self.assertNotEqual(lhs, rhs)
+ def test_same_type_equality(self):
+ for obj in self.objects:
+ self.assertEqual(obj, obj)
+ self.assertLessEqual(obj, obj)
+ self.assertGreaterEqual(obj, obj)
+
+ def test_same_type_ordering(self):
+ for lhs, rhs in (
+ (self.v4addr, self.v4addr2),
+ (self.v4net, self.v4net2),
+ (self.v4intf, self.v4intf2),
+ (self.v6addr, self.v6addr2),
+ (self.v6net, self.v6net2),
+ (self.v6intf, self.v6intf2),
+ ):
+ self.assertNotEqual(lhs, rhs)
+ self.assertLess(lhs, rhs)
+ self.assertLessEqual(lhs, rhs)
+ self.assertGreater(rhs, lhs)
+ self.assertGreaterEqual(rhs, lhs)
+ self.assertFalse(lhs > rhs)
+ self.assertFalse(rhs < lhs)
+ self.assertFalse(lhs >= rhs)
+ self.assertFalse(rhs <= lhs)
+
def test_containment(self):
for obj in self.v4_addresses:
self.assertIn(obj, self.v4net)
@@ -670,6 +734,119 @@ class IpaddrUnitTest(unittest.TestCase):
self.assertEqual("IPv6Interface('::1/128')",
repr(ipaddress.IPv6Interface('::1')))
+ # issue #16531: constructing IPv4Network from a (address, mask) tuple
+ def testIPv4Tuple(self):
+ # /32
+ ip = ipaddress.IPv4Address('192.0.2.1')
+ net = ipaddress.IPv4Network('192.0.2.1/32')
+ self.assertEqual(ipaddress.IPv4Network(('192.0.2.1', 32)), net)
+ self.assertEqual(ipaddress.IPv4Network((ip, 32)), net)
+ self.assertEqual(ipaddress.IPv4Network((3221225985, 32)), net)
+ self.assertEqual(ipaddress.IPv4Network(('192.0.2.1',
+ '255.255.255.255')), net)
+ self.assertEqual(ipaddress.IPv4Network((ip,
+ '255.255.255.255')), net)
+ self.assertEqual(ipaddress.IPv4Network((3221225985,
+ '255.255.255.255')), net)
+ # strict=True and host bits set
+ with self.assertRaises(ValueError):
+ ipaddress.IPv4Network(('192.0.2.1', 24))
+ with self.assertRaises(ValueError):
+ ipaddress.IPv4Network((ip, 24))
+ with self.assertRaises(ValueError):
+ ipaddress.IPv4Network((3221225985, 24))
+ with self.assertRaises(ValueError):
+ ipaddress.IPv4Network(('192.0.2.1', '255.255.255.0'))
+ with self.assertRaises(ValueError):
+ ipaddress.IPv4Network((ip, '255.255.255.0'))
+ with self.assertRaises(ValueError):
+ ipaddress.IPv4Network((3221225985, '255.255.255.0'))
+ # strict=False and host bits set
+ net = ipaddress.IPv4Network('192.0.2.0/24')
+ self.assertEqual(ipaddress.IPv4Network(('192.0.2.1', 24),
+ strict=False), net)
+ self.assertEqual(ipaddress.IPv4Network((ip, 24),
+ strict=False), net)
+ self.assertEqual(ipaddress.IPv4Network((3221225985, 24),
+ strict=False), net)
+ self.assertEqual(ipaddress.IPv4Network(('192.0.2.1',
+ '255.255.255.0'),
+ strict=False), net)
+ self.assertEqual(ipaddress.IPv4Network((ip,
+ '255.255.255.0'),
+ strict=False), net)
+ self.assertEqual(ipaddress.IPv4Network((3221225985,
+ '255.255.255.0'),
+ strict=False), net)
+
+ # /24
+ ip = ipaddress.IPv4Address('192.0.2.0')
+ net = ipaddress.IPv4Network('192.0.2.0/24')
+ self.assertEqual(ipaddress.IPv4Network(('192.0.2.0',
+ '255.255.255.0')), net)
+ self.assertEqual(ipaddress.IPv4Network((ip,
+ '255.255.255.0')), net)
+ self.assertEqual(ipaddress.IPv4Network((3221225984,
+ '255.255.255.0')), net)
+ self.assertEqual(ipaddress.IPv4Network(('192.0.2.0', 24)), net)
+ self.assertEqual(ipaddress.IPv4Network((ip, 24)), net)
+ self.assertEqual(ipaddress.IPv4Network((3221225984, 24)), net)
+
+ self.assertEqual(ipaddress.IPv4Interface(('192.0.2.1', 24)),
+ ipaddress.IPv4Interface('192.0.2.1/24'))
+ self.assertEqual(ipaddress.IPv4Interface((3221225985, 24)),
+ ipaddress.IPv4Interface('192.0.2.1/24'))
+
+ # issue #16531: constructing IPv6Network from a (address, mask) tuple
+ def testIPv6Tuple(self):
+ # /128
+ ip = ipaddress.IPv6Address('2001:db8::')
+ net = ipaddress.IPv6Network('2001:db8::/128')
+ self.assertEqual(ipaddress.IPv6Network(('2001:db8::', '128')),
+ net)
+ self.assertEqual(ipaddress.IPv6Network(
+ (42540766411282592856903984951653826560, 128)),
+ net)
+ self.assertEqual(ipaddress.IPv6Network((ip, '128')),
+ net)
+ ip = ipaddress.IPv6Address('2001:db8::')
+ net = ipaddress.IPv6Network('2001:db8::/96')
+ self.assertEqual(ipaddress.IPv6Network(('2001:db8::', '96')),
+ net)
+ self.assertEqual(ipaddress.IPv6Network(
+ (42540766411282592856903984951653826560, 96)),
+ net)
+ self.assertEqual(ipaddress.IPv6Network((ip, '96')),
+ net)
+
+ # strict=True and host bits set
+ ip = ipaddress.IPv6Address('2001:db8::1')
+ with self.assertRaises(ValueError):
+ ipaddress.IPv6Network(('2001:db8::1', 96))
+ with self.assertRaises(ValueError):
+ ipaddress.IPv6Network((
+ 42540766411282592856903984951653826561, 96))
+ with self.assertRaises(ValueError):
+ ipaddress.IPv6Network((ip, 96))
+ # strict=False and host bits set
+ net = ipaddress.IPv6Network('2001:db8::/96')
+ self.assertEqual(ipaddress.IPv6Network(('2001:db8::1', 96),
+ strict=False),
+ net)
+ self.assertEqual(ipaddress.IPv6Network(
+ (42540766411282592856903984951653826561, 96),
+ strict=False),
+ net)
+ self.assertEqual(ipaddress.IPv6Network((ip, 96), strict=False),
+ net)
+
+ # /96
+ self.assertEqual(ipaddress.IPv6Interface(('2001:db8::1', '96')),
+ ipaddress.IPv6Interface('2001:db8::1/96'))
+ self.assertEqual(ipaddress.IPv6Interface(
+ (42540766411282592856903984951653826561, '96')),
+ ipaddress.IPv6Interface('2001:db8::1/96'))
+
# issue57
def testAddressIntMath(self):
self.assertEqual(ipaddress.IPv4Address('1.1.1.1') + 255,
@@ -690,20 +867,18 @@ class IpaddrUnitTest(unittest.TestCase):
2 ** ipaddress.IPV6LENGTH)
def testInternals(self):
- first, last = ipaddress._find_address_range([
- ipaddress.IPv4Address('10.10.10.10'),
- ipaddress.IPv4Address('10.10.10.12')])
- self.assertEqual(first, last)
+ ip1 = ipaddress.IPv4Address('10.10.10.10')
+ ip2 = ipaddress.IPv4Address('10.10.10.11')
+ ip3 = ipaddress.IPv4Address('10.10.10.12')
+ self.assertEqual(list(ipaddress._find_address_range([ip1])),
+ [(ip1, ip1)])
+ self.assertEqual(list(ipaddress._find_address_range([ip1, ip3])),
+ [(ip1, ip1), (ip3, ip3)])
+ self.assertEqual(list(ipaddress._find_address_range([ip1, ip2, ip3])),
+ [(ip1, ip3)])
self.assertEqual(128, ipaddress._count_righthand_zero_bits(0, 128))
self.assertEqual("IPv4Network('1.2.3.0/24')", repr(self.ipv4_network))
- def testMissingAddressVersion(self):
- class Broken(ipaddress._BaseAddress):
- pass
- broken = Broken('127.0.0.1')
- with self.assertRaisesRegex(NotImplementedError, "Broken.*version"):
- broken.version
-
def testMissingNetworkVersion(self):
class Broken(ipaddress._BaseNetwork):
pass
@@ -924,6 +1099,26 @@ class IpaddrUnitTest(unittest.TestCase):
'2001:658:22a:cafe:8000::/66',
'2001:658:22a:cafe:c000::/66'])
+ def testGetSubnets3(self):
+ subnets = [str(x) for x in self.ipv4_network.subnets(8)]
+ self.assertEqual(subnets[:3],
+ ['1.2.3.0/32', '1.2.3.1/32', '1.2.3.2/32'])
+ self.assertEqual(subnets[-3:],
+ ['1.2.3.253/32', '1.2.3.254/32', '1.2.3.255/32'])
+ self.assertEqual(len(subnets), 256)
+
+ ipv6_network = ipaddress.IPv6Network('2001:658:22a:cafe::/120')
+ subnets = [str(x) for x in ipv6_network.subnets(8)]
+ self.assertEqual(subnets[:3],
+ ['2001:658:22a:cafe::/128',
+ '2001:658:22a:cafe::1/128',
+ '2001:658:22a:cafe::2/128'])
+ self.assertEqual(subnets[-3:],
+ ['2001:658:22a:cafe::fd/128',
+ '2001:658:22a:cafe::fe/128',
+ '2001:658:22a:cafe::ff/128'])
+ self.assertEqual(len(subnets), 256)
+
def testSubnetFailsForLargeCidrDiff(self):
self.assertRaises(ValueError, list,
self.ipv4_interface.network.subnets(9))
@@ -1431,6 +1626,9 @@ class IpaddrUnitTest(unittest.TestCase):
self.assertEqual(False,
ipaddress.ip_address('169.255.100.200').is_link_local)
+ self.assertTrue(ipaddress.ip_address('192.0.7.1').is_global)
+ self.assertFalse(ipaddress.ip_address('203.0.113.1').is_global)
+
self.assertEqual(True,
ipaddress.ip_address('127.100.200.254').is_loopback)
self.assertEqual(True, ipaddress.ip_address('127.42.0.0').is_loopback)
@@ -1528,6 +1726,7 @@ class IpaddrUnitTest(unittest.TestCase):
addr3 = ipaddress.ip_network('10.2.1.0/24')
addr4 = ipaddress.ip_address('10.1.1.0')
addr5 = ipaddress.ip_network('2001:db8::0/32')
+ addr6 = ipaddress.ip_network('10.1.1.5/32')
self.assertEqual(sorted(list(addr1.address_exclude(addr2))),
[ipaddress.ip_network('10.1.1.64/26'),
ipaddress.ip_network('10.1.1.128/25')])
@@ -1535,6 +1734,15 @@ class IpaddrUnitTest(unittest.TestCase):
self.assertRaises(TypeError, list, addr1.address_exclude(addr4))
self.assertRaises(TypeError, list, addr1.address_exclude(addr5))
self.assertEqual(list(addr1.address_exclude(addr1)), [])
+ self.assertEqual(sorted(list(addr1.address_exclude(addr6))),
+ [ipaddress.ip_network('10.1.1.0/30'),
+ ipaddress.ip_network('10.1.1.4/32'),
+ ipaddress.ip_network('10.1.1.6/31'),
+ ipaddress.ip_network('10.1.1.8/29'),
+ ipaddress.ip_network('10.1.1.16/28'),
+ ipaddress.ip_network('10.1.1.32/27'),
+ ipaddress.ip_network('10.1.1.64/26'),
+ ipaddress.ip_network('10.1.1.128/25')])
def testHash(self):
self.assertEqual(hash(ipaddress.ip_interface('10.1.1.0/24')),
@@ -1598,7 +1806,6 @@ class IpaddrUnitTest(unittest.TestCase):
'2001:0:0:4:0:0:0:8': '2001:0:0:4::8/128',
'2001:0:0:4:5:6:7:8': '2001::4:5:6:7:8/128',
'2001:0:3:4:5:6:7:8': '2001:0:3:4:5:6:7:8/128',
- '2001:0:3:4:5:6:7:8': '2001:0:3:4:5:6:7:8/128',
'0:0:3:0:0:0:0:ffff': '0:0:3::ffff/128',
'0:0:0:4:0:0:0:ffff': '::4:0:0:0:ffff/128',
'0:0:0:0:5:0:0:ffff': '::5:0:0:ffff/128',
@@ -1635,6 +1842,14 @@ class IpaddrUnitTest(unittest.TestCase):
addr3.exploded)
self.assertEqual('192.168.178.1', addr4.exploded)
+ def testReversePointer(self):
+ addr1 = ipaddress.IPv4Address('127.0.0.1')
+ addr2 = ipaddress.IPv6Address('2001:db8::1')
+ self.assertEqual('1.0.0.127.in-addr.arpa', addr1.reverse_pointer)
+ self.assertEqual('1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.' +
+ 'b.d.0.1.0.0.2.ip6.arpa',
+ addr2.reverse_pointer)
+
def testIntRepresentation(self):
self.assertEqual(16909060, int(self.ipv4_address))
self.assertEqual(42540616829182469433547762482097946625,
diff --git a/Lib/test/test_isinstance.py b/Lib/test/test_isinstance.py
index 7a6730e3a8..e63d59b346 100644
--- a/Lib/test/test_isinstance.py
+++ b/Lib/test/test_isinstance.py
@@ -3,7 +3,6 @@
# testing of error conditions uncovered when using extension types.
import unittest
-from test import support
import sys
@@ -259,31 +258,23 @@ class TestIsInstanceIsSubclass(unittest.TestCase):
self.assertEqual(True, issubclass(str, (str, (Child, NewChild, str))))
def test_subclass_recursion_limit(self):
- # make sure that issubclass raises RuntimeError before the C stack is
+ # make sure that issubclass raises RecursionError before the C stack is
# blown
- self.assertRaises(RuntimeError, blowstack, issubclass, str, str)
+ self.assertRaises(RecursionError, blowstack, issubclass, str, str)
def test_isinstance_recursion_limit(self):
- # make sure that issubclass raises RuntimeError before the C stack is
+ # make sure that issubclass raises RecursionError before the C stack is
# blown
- self.assertRaises(RuntimeError, blowstack, isinstance, '', str)
+ self.assertRaises(RecursionError, blowstack, isinstance, '', str)
def blowstack(fxn, arg, compare_to):
# Make sure that calling isinstance with a deeply nested tuple for its
- # argument will raise RuntimeError eventually.
+ # argument will raise RecursionError eventually.
tuple_arg = (compare_to,)
for cnt in range(sys.getrecursionlimit()+5):
tuple_arg = (tuple_arg,)
fxn(arg, tuple_arg)
-def test_main():
- support.run_unittest(
- TestIsInstanceExceptions,
- TestIsSubclassExceptions,
- TestIsInstanceIsSubclass
- )
-
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_iter.py b/Lib/test/test_iter.py
index abc408f869..a91670b4a1 100644
--- a/Lib/test/test_iter.py
+++ b/Lib/test/test_iter.py
@@ -3,6 +3,7 @@
import sys
import unittest
from test.support import run_unittest, TESTFN, unlink, cpython_only
+from test.support import check_free_after_iterating
import pickle
import collections.abc
@@ -153,6 +154,53 @@ class TestCase(unittest.TestCase):
def test_seq_class_iter(self):
self.check_iterator(iter(SequenceClass(10)), list(range(10)))
+ def test_mutating_seq_class_iter_pickle(self):
+ orig = SequenceClass(5)
+ for proto in range(pickle.HIGHEST_PROTOCOL + 1):
+ # initial iterator
+ itorig = iter(orig)
+ d = pickle.dumps((itorig, orig), proto)
+ it, seq = pickle.loads(d)
+ seq.n = 7
+ self.assertIs(type(it), type(itorig))
+ self.assertEqual(list(it), list(range(7)))
+
+ # running iterator
+ next(itorig)
+ d = pickle.dumps((itorig, orig), proto)
+ it, seq = pickle.loads(d)
+ seq.n = 7
+ self.assertIs(type(it), type(itorig))
+ self.assertEqual(list(it), list(range(1, 7)))
+
+ # empty iterator
+ for i in range(1, 5):
+ next(itorig)
+ d = pickle.dumps((itorig, orig), proto)
+ it, seq = pickle.loads(d)
+ seq.n = 7
+ self.assertIs(type(it), type(itorig))
+ self.assertEqual(list(it), list(range(5, 7)))
+
+ # exhausted iterator
+ self.assertRaises(StopIteration, next, itorig)
+ d = pickle.dumps((itorig, orig), proto)
+ it, seq = pickle.loads(d)
+ seq.n = 7
+ self.assertTrue(isinstance(it, collections.abc.Iterator))
+ self.assertEqual(list(it), [])
+
+ def test_mutating_seq_class_exhausted_iter(self):
+ a = SequenceClass(5)
+ exhit = iter(a)
+ empit = iter(a)
+ for x in exhit: # exhaust the iterator
+ next(empit) # not exhausted
+ a.n = 7
+ self.assertEqual(list(exhit), [])
+ self.assertEqual(list(empit), [5, 6])
+ self.assertEqual(list(a), [0, 1, 2, 3, 4, 5, 6])
+
# Test a new_style class with __iter__ but no next() method
def test_new_style_iter_class(self):
class IterClass(object):
@@ -944,6 +992,9 @@ class TestCase(unittest.TestCase):
self.assertEqual(next(it), 0)
self.assertEqual(next(it), 1)
+ def test_free_after_iterating(self):
+ check_free_after_iterating(self, iter, SequenceClass, (0,))
+
def test_main():
run_unittest(TestCase)
diff --git a/Lib/test/test_itertools.py b/Lib/test/test_itertools.py
index 993438c9ce..f940852ce1 100644
--- a/Lib/test/test_itertools.py
+++ b/Lib/test/test_itertools.py
@@ -1398,6 +1398,16 @@ class TestExamples(unittest.TestCase):
self.assertEqual(list(copy.deepcopy(it)), accumulated[1:])
self.assertEqual(list(copy.copy(it)), accumulated[1:])
+ def test_accumulate_reducible_none(self):
+ # Issue #25718: total is None
+ it = accumulate([None, None, None], operator.is_)
+ self.assertEqual(next(it), None)
+ for proto in range(pickle.HIGHEST_PROTOCOL + 1):
+ it_copy = pickle.loads(pickle.dumps(it, proto))
+ self.assertEqual(list(it_copy), [True, False])
+ self.assertEqual(list(copy.deepcopy(it)), [True, False])
+ self.assertEqual(list(copy.copy(it)), [True, False])
+
def test_chain(self):
self.assertEqual(''.join(chain('ABC', 'DEF')), 'ABCDEF')
@@ -1870,8 +1880,6 @@ class RegressionTests(unittest.TestCase):
hist.append(3)
yield 2
hist.append(4)
- if x:
- raise StopIteration
hist = []
self.assertRaises(AssertionError, list, chain(gen1(), gen2(False)))
@@ -2006,6 +2014,11 @@ Samuele
... "Returns the nth item or a default value"
... return next(islice(iterable, n, None), default)
+>>> def all_equal(iterable):
+... "Returns True if all the elements are equal to each other"
+... g = groupby(iterable)
+... return next(g, True) and not next(g, False)
+
>>> def quantify(iterable, pred=bool):
... "Count how many times the predicate is true"
... return sum(map(pred, iterable))
@@ -2119,6 +2132,9 @@ perform as purported.
>>> nth('abcde', 9) is None
True
+>>> [all_equal(s) for s in ('', 'A', 'AAAA', 'AAAB', 'AAABA')]
+[True, True, True, False, False]
+
>>> quantify(range(99), lambda x: x%2==0)
50
diff --git a/Lib/test/test_json/__init__.py b/Lib/test/test_json/__init__.py
index 2cf1032f35..0807e6fb4f 100644
--- a/Lib/test/test_json/__init__.py
+++ b/Lib/test/test_json/__init__.py
@@ -9,12 +9,15 @@ from test import support
# import json with and without accelerations
cjson = support.import_fresh_module('json', fresh=['_json'])
pyjson = support.import_fresh_module('json', blocked=['_json'])
+# JSONDecodeError is cached inside the _json module
+cjson.JSONDecodeError = cjson.decoder.JSONDecodeError = json.JSONDecodeError
# create two base classes that will be used by the other tests
class PyTest(unittest.TestCase):
json = pyjson
loads = staticmethod(pyjson.loads)
dumps = staticmethod(pyjson.dumps)
+ JSONDecodeError = staticmethod(pyjson.JSONDecodeError)
@unittest.skipUnless(cjson, 'requires _json')
class CTest(unittest.TestCase):
@@ -22,6 +25,7 @@ class CTest(unittest.TestCase):
json = cjson
loads = staticmethod(cjson.loads)
dumps = staticmethod(cjson.dumps)
+ JSONDecodeError = staticmethod(cjson.JSONDecodeError)
# test PyTest and CTest checking if the functions come from the right module
class TestPyTest(PyTest):
diff --git a/Lib/test/test_json/test_decode.py b/Lib/test/test_json/test_decode.py
index 591b2e253d..cc83b45e8b 100644
--- a/Lib/test/test_json/test_decode.py
+++ b/Lib/test/test_json/test_decode.py
@@ -63,12 +63,12 @@ class TestDecode:
def test_extra_data(self):
s = '[1, 2, 3]5'
msg = 'Extra data'
- self.assertRaisesRegex(ValueError, msg, self.loads, s)
+ self.assertRaisesRegex(self.JSONDecodeError, msg, self.loads, s)
def test_invalid_escape(self):
s = '["abc\\y"]'
msg = 'escape'
- self.assertRaisesRegex(ValueError, msg, self.loads, s)
+ self.assertRaisesRegex(self.JSONDecodeError, msg, self.loads, s)
def test_invalid_input_type(self):
msg = 'the JSON object must be str'
@@ -80,10 +80,10 @@ class TestDecode:
def test_string_with_utf8_bom(self):
# see #18958
bom_json = "[1,2,3]".encode('utf-8-sig').decode('utf-8')
- with self.assertRaises(ValueError) as cm:
+ with self.assertRaises(self.JSONDecodeError) as cm:
self.loads(bom_json)
self.assertIn('BOM', str(cm.exception))
- with self.assertRaises(ValueError) as cm:
+ with self.assertRaises(self.JSONDecodeError) as cm:
self.json.load(StringIO(bom_json))
self.assertIn('BOM', str(cm.exception))
# make sure that the BOM is not detected in the middle of a string
diff --git a/Lib/test/test_json/test_encode_basestring_ascii.py b/Lib/test/test_json/test_encode_basestring_ascii.py
index 2122da17fd..4bbc6c7148 100644
--- a/Lib/test/test_json/test_encode_basestring_ascii.py
+++ b/Lib/test/test_json/test_encode_basestring_ascii.py
@@ -12,9 +12,6 @@ CASES = [
(' s p a c e d ', '" s p a c e d "'),
('\U0001d120', '"\\ud834\\udd20"'),
('\u03b1\u03a9', '"\\u03b1\\u03a9"'),
- ('\u03b1\u03a9', '"\\u03b1\\u03a9"'),
- ('\u03b1\u03a9', '"\\u03b1\\u03a9"'),
- ('\u03b1\u03a9', '"\\u03b1\\u03a9"'),
("`1~!@#$%^&*()_+-={':[,]}|;.</>?", '"`1~!@#$%^&*()_+-={\':[,]}|;.</>?"'),
('\x08\x0c\n\r\t', '"\\b\\f\\n\\r\\t"'),
('\u0123\u4567\u89ab\ucdef\uabcd\uef4a', '"\\u0123\\u4567\\u89ab\\ucdef\\uabcd\\uef4a"'),
diff --git a/Lib/test/test_json/test_fail.py b/Lib/test/test_json/test_fail.py
index 7caafdbddd..95ff5b8d1e 100644
--- a/Lib/test/test_json/test_fail.py
+++ b/Lib/test/test_json/test_fail.py
@@ -87,7 +87,7 @@ class TestFail:
continue
try:
self.loads(doc)
- except ValueError:
+ except self.JSONDecodeError:
pass
else:
self.fail("Expected failure for fail{0}.json: {1!r}".format(idx, doc))
@@ -124,10 +124,16 @@ class TestFail:
('"spam', 'Unterminated string starting at', 0),
]
for data, msg, idx in test_cases:
- self.assertRaisesRegex(ValueError,
- r'^{0}: line 1 column {1} \(char {2}\)'.format(
- re.escape(msg), idx + 1, idx),
- self.loads, data)
+ with self.assertRaises(self.JSONDecodeError) as cm:
+ self.loads(data)
+ err = cm.exception
+ self.assertEqual(err.msg, msg)
+ self.assertEqual(err.pos, idx)
+ self.assertEqual(err.lineno, 1)
+ self.assertEqual(err.colno, idx + 1)
+ self.assertEqual(str(err),
+ '%s: line 1 column %d (char %d)' %
+ (msg, idx + 1, idx))
def test_unexpected_data(self):
test_cases = [
@@ -154,10 +160,16 @@ class TestFail:
('{"spam":42,}', 'Expecting property name enclosed in double quotes', 11),
]
for data, msg, idx in test_cases:
- self.assertRaisesRegex(ValueError,
- r'^{0}: line 1 column {1} \(char {2}\)'.format(
- re.escape(msg), idx + 1, idx),
- self.loads, data)
+ with self.assertRaises(self.JSONDecodeError) as cm:
+ self.loads(data)
+ err = cm.exception
+ self.assertEqual(err.msg, msg)
+ self.assertEqual(err.pos, idx)
+ self.assertEqual(err.lineno, 1)
+ self.assertEqual(err.colno, idx + 1)
+ self.assertEqual(str(err),
+ '%s: line 1 column %d (char %d)' %
+ (msg, idx + 1, idx))
def test_extra_data(self):
test_cases = [
@@ -171,11 +183,16 @@ class TestFail:
('"spam",42', 'Extra data', 6),
]
for data, msg, idx in test_cases:
- self.assertRaisesRegex(ValueError,
- r'^{0}: line 1 column {1} - line 1 column {2}'
- r' \(char {3} - {4}\)'.format(
- re.escape(msg), idx + 1, len(data) + 1, idx, len(data)),
- self.loads, data)
+ with self.assertRaises(self.JSONDecodeError) as cm:
+ self.loads(data)
+ err = cm.exception
+ self.assertEqual(err.msg, msg)
+ self.assertEqual(err.pos, idx)
+ self.assertEqual(err.lineno, 1)
+ self.assertEqual(err.colno, idx + 1)
+ self.assertEqual(str(err),
+ '%s: line 1 column %d (char %d)' %
+ (msg, idx + 1, idx))
def test_linecol(self):
test_cases = [
@@ -185,10 +202,16 @@ class TestFail:
('\n \n\n !', 4, 6, 10),
]
for data, line, col, idx in test_cases:
- self.assertRaisesRegex(ValueError,
- r'^Expecting value: line {0} column {1}'
- r' \(char {2}\)$'.format(line, col, idx),
- self.loads, data)
+ with self.assertRaises(self.JSONDecodeError) as cm:
+ self.loads(data)
+ err = cm.exception
+ self.assertEqual(err.msg, 'Expecting value')
+ self.assertEqual(err.pos, idx)
+ self.assertEqual(err.lineno, line)
+ self.assertEqual(err.colno, col)
+ self.assertEqual(str(err),
+ 'Expecting value: line %s column %d (char %d)' %
+ (line, col, idx))
class TestPyFail(TestFail, PyTest): pass
class TestCFail(TestFail, CTest): pass
diff --git a/Lib/test/test_json/test_recursion.py b/Lib/test/test_json/test_recursion.py
index 1a76254d01..877dc448b1 100644
--- a/Lib/test/test_json/test_recursion.py
+++ b/Lib/test/test_json/test_recursion.py
@@ -68,11 +68,11 @@ class TestRecursion:
def test_highly_nested_objects_decoding(self):
# test that loading highly-nested objects doesn't segfault when C
# accelerations are used. See #12017
- with self.assertRaises(RuntimeError):
+ with self.assertRaises(RecursionError):
self.loads('{"a":' * 100000 + '1' + '}' * 100000)
- with self.assertRaises(RuntimeError):
+ with self.assertRaises(RecursionError):
self.loads('{"a":' * 100000 + '[1]' + '}' * 100000)
- with self.assertRaises(RuntimeError):
+ with self.assertRaises(RecursionError):
self.loads('[' * 100000 + '1' + ']' * 100000)
def test_highly_nested_objects_encoding(self):
@@ -80,9 +80,9 @@ class TestRecursion:
l, d = [], {}
for x in range(100000):
l, d = [l], {'k':d}
- with self.assertRaises(RuntimeError):
+ with self.assertRaises(RecursionError):
self.dumps(l)
- with self.assertRaises(RuntimeError):
+ with self.assertRaises(RecursionError):
self.dumps(d)
def test_endless_recursion(self):
@@ -92,7 +92,7 @@ class TestRecursion:
"""If check_circular is False, this will keep adding another list."""
return [o]
- with self.assertRaises(RuntimeError):
+ with self.assertRaises(RecursionError):
EndlessJSONEncoder(check_circular=False).encode(5j)
diff --git a/Lib/test/test_json/test_scanstring.py b/Lib/test/test_json/test_scanstring.py
index 07f4358100..2d3ee8a8bf 100644
--- a/Lib/test/test_json/test_scanstring.py
+++ b/Lib/test/test_json/test_scanstring.py
@@ -129,7 +129,7 @@ class TestScanstring:
'"\\ud834\\u0X20"',
]
for s in bad_escapes:
- with self.assertRaises(ValueError, msg=s):
+ with self.assertRaises(self.JSONDecodeError, msg=s):
scanstring(s, 1, True)
def test_overflow(self):
diff --git a/Lib/test/test_json/test_tool.py b/Lib/test/test_json/test_tool.py
index 0c39e56837..15f373664e 100644
--- a/Lib/test/test_json/test_tool.py
+++ b/Lib/test/test_json/test_tool.py
@@ -4,7 +4,8 @@ import textwrap
import unittest
import subprocess
from test import support
-from test.script_helper import assert_python_ok
+from test.support.script_helper import assert_python_ok
+
class TestTool(unittest.TestCase):
data = """
@@ -15,7 +16,7 @@ class TestTool(unittest.TestCase):
:"yes"} ]
"""
- expect = textwrap.dedent("""\
+ expect_without_sort_keys = textwrap.dedent("""\
[
[
"blorpie"
@@ -37,6 +38,28 @@ class TestTool(unittest.TestCase):
]
""")
+ expect = textwrap.dedent("""\
+ [
+ [
+ "blorpie"
+ ],
+ [
+ "whoops"
+ ],
+ [],
+ "d-shtaeou",
+ "d-nthiouh",
+ "i-vhbjkhnth",
+ {
+ "nifty": 87
+ },
+ {
+ "morefield": false,
+ "field": "yes"
+ }
+ ]
+ """)
+
def test_stdin_stdout(self):
with subprocess.Popen(
(sys.executable, '-m', 'json.tool'),
@@ -55,6 +78,7 @@ class TestTool(unittest.TestCase):
def test_infile_stdout(self):
infile = self._create_infile()
rc, out, err = assert_python_ok('-m', 'json.tool', infile)
+ self.assertEqual(rc, 0)
self.assertEqual(out.splitlines(), self.expect.encode().splitlines())
self.assertEqual(err, b'')
@@ -65,5 +89,20 @@ class TestTool(unittest.TestCase):
self.addCleanup(os.remove, outfile)
with open(outfile, "r") as fp:
self.assertEqual(fp.read(), self.expect)
+ self.assertEqual(rc, 0)
self.assertEqual(out, b'')
self.assertEqual(err, b'')
+
+ def test_help_flag(self):
+ rc, out, err = assert_python_ok('-m', 'json.tool', '-h')
+ self.assertEqual(rc, 0)
+ self.assertTrue(out.startswith(b'usage: '))
+ self.assertEqual(err, b'')
+
+ def test_sort_keys_flag(self):
+ infile = self._create_infile()
+ rc, out, err = assert_python_ok('-m', 'json.tool', '--sort-keys', infile)
+ self.assertEqual(rc, 0)
+ self.assertEqual(out.splitlines(),
+ self.expect_without_sort_keys.encode().splitlines())
+ self.assertEqual(err, b'')
diff --git a/Lib/test/test_keywordonlyarg.py b/Lib/test/test_keywordonlyarg.py
index 7f315d4cb4..d82e33d973 100644
--- a/Lib/test/test_keywordonlyarg.py
+++ b/Lib/test/test_keywordonlyarg.py
@@ -4,7 +4,6 @@ __author__ = "Jiwon Seo"
__email__ = "seojiwon at gmail dot com"
import unittest
-from test.support import run_unittest
def posonly_sum(pos_arg1, *arg, **kwarg):
return pos_arg1 + sum(arg) + sum(kwarg.values())
@@ -186,8 +185,5 @@ class KeywordOnlyArgTestCase(unittest.TestCase):
self.assertEqual(str(err.exception), "name 'b' is not defined")
-def test_main():
- run_unittest(KeywordOnlyArgTestCase)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_kqueue.py b/Lib/test/test_kqueue.py
index f79bd8978c..f822024aa0 100644
--- a/Lib/test/test_kqueue.py
+++ b/Lib/test/test_kqueue.py
@@ -9,7 +9,6 @@ import sys
import time
import unittest
-from test import support
if not hasattr(select, "kqueue"):
raise unittest.SkipTest("test works only on BSD")
@@ -114,7 +113,7 @@ class TestKQueue(unittest.TestCase):
def test_queue_event(self):
serverSocket = socket.socket()
serverSocket.bind(('127.0.0.1', 0))
- serverSocket.listen(1)
+ serverSocket.listen()
client = socket.socket()
client.setblocking(False)
try:
@@ -237,8 +236,5 @@ class TestKQueue(unittest.TestCase):
self.assertEqual(os.get_inheritable(kqueue.fileno()), False)
-def test_main():
- support.run_unittest(TestKQueue)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_linecache.py b/Lib/test/test_linecache.py
index 79157de43f..47e2eddfb1 100644
--- a/Lib/test/test_linecache.py
+++ b/Lib/test/test_linecache.py
@@ -7,6 +7,7 @@ from test import support
FILENAME = linecache.__file__
+NONEXISTENT_FILENAME = FILENAME + '.missing'
INVALID_NAME = '!@$)(!@#_1'
EMPTY = ''
TESTS = 'inspect_fodder inspect_fodder2 mapping_tests'
@@ -126,6 +127,48 @@ class LineCacheTests(unittest.TestCase):
self.assertEqual(line, getline(source_name, index + 1))
source_list.append(line)
+ def test_lazycache_no_globals(self):
+ lines = linecache.getlines(FILENAME)
+ linecache.clearcache()
+ self.assertEqual(False, linecache.lazycache(FILENAME, None))
+ self.assertEqual(lines, linecache.getlines(FILENAME))
+
+ def test_lazycache_smoke(self):
+ lines = linecache.getlines(NONEXISTENT_FILENAME, globals())
+ linecache.clearcache()
+ self.assertEqual(
+ True, linecache.lazycache(NONEXISTENT_FILENAME, globals()))
+ self.assertEqual(1, len(linecache.cache[NONEXISTENT_FILENAME]))
+ # Note here that we're looking up a nonexistent filename with no
+ # globals: this would error if the lazy value wasn't resolved.
+ self.assertEqual(lines, linecache.getlines(NONEXISTENT_FILENAME))
+
+ def test_lazycache_provide_after_failed_lookup(self):
+ linecache.clearcache()
+ lines = linecache.getlines(NONEXISTENT_FILENAME, globals())
+ linecache.clearcache()
+ linecache.getlines(NONEXISTENT_FILENAME)
+ linecache.lazycache(NONEXISTENT_FILENAME, globals())
+ self.assertEqual(lines, linecache.updatecache(NONEXISTENT_FILENAME))
+
+ def test_lazycache_check(self):
+ linecache.clearcache()
+ linecache.lazycache(NONEXISTENT_FILENAME, globals())
+ linecache.checkcache()
+
+ def test_lazycache_bad_filename(self):
+ linecache.clearcache()
+ self.assertEqual(False, linecache.lazycache('', globals()))
+ self.assertEqual(False, linecache.lazycache('<foo>', globals()))
+
+ def test_lazycache_already_cached(self):
+ linecache.clearcache()
+ lines = linecache.getlines(NONEXISTENT_FILENAME, globals())
+ self.assertEqual(
+ False,
+ linecache.lazycache(NONEXISTENT_FILENAME, globals()))
+ self.assertEqual(4, len(linecache.cache[NONEXISTENT_FILENAME]))
+
def test_memoryerror(self):
lines = linecache.getlines(FILENAME)
self.assertTrue(lines)
diff --git a/Lib/test/test_list.py b/Lib/test/test_list.py
index 3b94700bb9..8f82ab5297 100644
--- a/Lib/test/test_list.py
+++ b/Lib/test/test_list.py
@@ -1,6 +1,7 @@
import sys
from test import support, list_tests
import pickle
+import unittest
class ListTest(list_tests.CommonTest):
type2test = list
@@ -71,34 +72,76 @@ class ListTest(list_tests.CommonTest):
check(1000000)
def test_iterator_pickle(self):
- # Userlist iterators don't support pickling yet since
- # they are based on generators.
- data = self.type2test([4, 5, 6, 7])
+ orig = self.type2test([4, 5, 6, 7])
+ data = [10, 11, 12, 13, 14, 15]
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
- it = itorg = iter(data)
- d = pickle.dumps(it, proto)
- it = pickle.loads(d)
- self.assertEqual(type(itorg), type(it))
- self.assertEqual(self.type2test(it), self.type2test(data))
-
- it = pickle.loads(d)
- next(it)
- d = pickle.dumps(it, proto)
- self.assertEqual(self.type2test(it), self.type2test(data)[1:])
+ # initial iterator
+ itorig = iter(orig)
+ d = pickle.dumps((itorig, orig), proto)
+ it, a = pickle.loads(d)
+ a[:] = data
+ self.assertEqual(type(it), type(itorig))
+ self.assertEqual(list(it), data)
+
+ # running iterator
+ next(itorig)
+ d = pickle.dumps((itorig, orig), proto)
+ it, a = pickle.loads(d)
+ a[:] = data
+ self.assertEqual(type(it), type(itorig))
+ self.assertEqual(list(it), data[1:])
+
+ # empty iterator
+ for i in range(1, len(orig)):
+ next(itorig)
+ d = pickle.dumps((itorig, orig), proto)
+ it, a = pickle.loads(d)
+ a[:] = data
+ self.assertEqual(type(it), type(itorig))
+ self.assertEqual(list(it), data[len(orig):])
+
+ # exhausted iterator
+ self.assertRaises(StopIteration, next, itorig)
+ d = pickle.dumps((itorig, orig), proto)
+ it, a = pickle.loads(d)
+ a[:] = data
+ self.assertEqual(list(it), [])
def test_reversed_pickle(self):
- data = self.type2test([4, 5, 6, 7])
+ orig = self.type2test([4, 5, 6, 7])
+ data = [10, 11, 12, 13, 14, 15]
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
- it = itorg = reversed(data)
- d = pickle.dumps(it, proto)
- it = pickle.loads(d)
- self.assertEqual(type(itorg), type(it))
- self.assertEqual(self.type2test(it), self.type2test(reversed(data)))
-
- it = pickle.loads(d)
- next(it)
- d = pickle.dumps(it, proto)
- self.assertEqual(self.type2test(it), self.type2test(reversed(data))[1:])
+ # initial iterator
+ itorig = reversed(orig)
+ d = pickle.dumps((itorig, orig), proto)
+ it, a = pickle.loads(d)
+ a[:] = data
+ self.assertEqual(type(it), type(itorig))
+ self.assertEqual(list(it), data[len(orig)-1::-1])
+
+ # running iterator
+ next(itorig)
+ d = pickle.dumps((itorig, orig), proto)
+ it, a = pickle.loads(d)
+ a[:] = data
+ self.assertEqual(type(it), type(itorig))
+ self.assertEqual(list(it), data[len(orig)-2::-1])
+
+ # empty iterator
+ for i in range(1, len(orig)):
+ next(itorig)
+ d = pickle.dumps((itorig, orig), proto)
+ it, a = pickle.loads(d)
+ a[:] = data
+ self.assertEqual(type(it), type(itorig))
+ self.assertEqual(list(it), [])
+
+ # exhausted iterator
+ self.assertRaises(StopIteration, next, itorig)
+ d = pickle.dumps((itorig, orig), proto)
+ it, a = pickle.loads(d)
+ a[:] = data
+ self.assertEqual(list(it), [])
def test_no_comdat_folding(self):
# Issue 8847: In the PGO build, the MSVC linker's COMDAT folding
@@ -108,20 +151,5 @@ class ListTest(list_tests.CommonTest):
with self.assertRaises(TypeError):
(3,) + L([1,2])
-def test_main(verbose=None):
- support.run_unittest(ListTest)
-
- # verify reference counting
- import sys
- if verbose and hasattr(sys, "gettotalrefcount"):
- import gc
- counts = [None] * 5
- for i in range(len(counts)):
- support.run_unittest(ListTest)
- gc.collect()
- counts[i] = sys.gettotalrefcount()
- print(counts)
-
-
if __name__ == "__main__":
- test_main(verbose=True)
+ unittest.main()
diff --git a/Lib/test/test_locale.py b/Lib/test/test_locale.py
index 9369a2531e..fae2c3dabb 100644
--- a/Lib/test/test_locale.py
+++ b/Lib/test/test_locale.py
@@ -524,5 +524,59 @@ class TestMiscellaneous(unittest.TestCase):
locale.setlocale(locale.LC_ALL, (b'not', b'valid'))
+class BaseDelocalizeTest(BaseLocalizedTest):
+
+ def _test_delocalize(self, value, out):
+ self.assertEqual(locale.delocalize(value), out)
+
+ def _test_atof(self, value, out):
+ self.assertEqual(locale.atof(value), out)
+
+ def _test_atoi(self, value, out):
+ self.assertEqual(locale.atoi(value), out)
+
+
+class TestEnUSDelocalize(EnUSCookedTest, BaseDelocalizeTest):
+
+ def test_delocalize(self):
+ self._test_delocalize('50000.00', '50000.00')
+ self._test_delocalize('50,000.00', '50000.00')
+
+ def test_atof(self):
+ self._test_atof('50000.00', 50000.)
+ self._test_atof('50,000.00', 50000.)
+
+ def test_atoi(self):
+ self._test_atoi('50000', 50000)
+ self._test_atoi('50,000', 50000)
+
+
+class TestCDelocalizeTest(CCookedTest, BaseDelocalizeTest):
+
+ def test_delocalize(self):
+ self._test_delocalize('50000.00', '50000.00')
+
+ def test_atof(self):
+ self._test_atof('50000.00', 50000.)
+
+ def test_atoi(self):
+ self._test_atoi('50000', 50000)
+
+
+class TestfrFRDelocalizeTest(FrFRCookedTest, BaseDelocalizeTest):
+
+ def test_delocalize(self):
+ self._test_delocalize('50000,00', '50000.00')
+ self._test_delocalize('50 000,00', '50000.00')
+
+ def test_atof(self):
+ self._test_atof('50000,00', 50000.)
+ self._test_atof('50 000,00', 50000.)
+
+ def test_atoi(self):
+ self._test_atoi('50000', 50000)
+ self._test_atoi('50 000', 50000)
+
+
if __name__ == '__main__':
unittest.main()
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index b17f5e5f54..84fd8b57c7 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -1,4 +1,4 @@
-# Copyright 2001-2013 by Vinay Sajip. All Rights Reserved.
+# Copyright 2001-2014 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
@@ -16,7 +16,7 @@
"""Test harness for the logging module. Run all tests.
-Copyright (C) 2001-2013 Vinay Sajip. All Rights Reserved.
+Copyright (C) 2001-2014 Vinay Sajip. All Rights Reserved.
"""
import logging
@@ -34,15 +34,12 @@ import os
import queue
import random
import re
-import select
import socket
import struct
import sys
import tempfile
-from test.script_helper import assert_python_ok
-from test.support import (captured_stdout, run_with_locale, run_unittest,
- patch, requires_zlib, TestHandler, Matcher, HOST,
- swap_attr)
+from test.support.script_helper import assert_python_ok
+from test import support
import textwrap
import time
import unittest
@@ -52,16 +49,12 @@ try:
import threading
# The following imports are needed only for tests which
# require threading
- import asynchat
import asyncore
- import errno
from http.server import HTTPServer, BaseHTTPRequestHandler
import smtpd
from urllib.parse import urlparse, parse_qs
from socketserver import (ThreadingUDPServer, DatagramRequestHandler,
- ThreadingTCPServer, StreamRequestHandler,
- ThreadingUnixStreamServer,
- ThreadingUnixDatagramServer)
+ ThreadingTCPServer, StreamRequestHandler)
except ImportError:
threading = None
try:
@@ -642,22 +635,23 @@ class StreamHandlerTest(BaseTest):
h = TestStreamHandler(BadStream())
r = logging.makeLogRecord({})
old_raise = logging.raiseExceptions
- old_stderr = sys.stderr
+
try:
h.handle(r)
self.assertIs(h.error_record, r)
+
h = logging.StreamHandler(BadStream())
- sys.stderr = sio = io.StringIO()
- h.handle(r)
- self.assertIn('\nRuntimeError: deliberate mistake\n',
- sio.getvalue())
+ with support.captured_stderr() as stderr:
+ h.handle(r)
+ msg = '\nRuntimeError: deliberate mistake\n'
+ self.assertIn(msg, stderr.getvalue())
+
logging.raiseExceptions = False
- sys.stderr = sio = io.StringIO()
- h.handle(r)
- self.assertEqual('', sio.getvalue())
+ with support.captured_stderr() as stderr:
+ h.handle(r)
+ self.assertEqual('', stderr.getvalue())
finally:
logging.raiseExceptions = old_raise
- sys.stderr = old_stderr
# -- The following section could be moved into a server_helper.py module
# -- if it proves to be of wider utility than just test_logging
@@ -685,7 +679,8 @@ if threading:
"""
def __init__(self, addr, handler, poll_interval, sockmap):
- smtpd.SMTPServer.__init__(self, addr, None, map=sockmap)
+ smtpd.SMTPServer.__init__(self, addr, None, map=sockmap,
+ decode_data=True)
self.port = self.socket.getsockname()[1]
self._handler = handler
self._thread = None
@@ -927,10 +922,10 @@ class SMTPHandlerTest(BaseTest):
TIMEOUT = 8.0
def test_basic(self):
sockmap = {}
- server = TestSMTPServer((HOST, 0), self.process_message, 0.001,
+ server = TestSMTPServer((support.HOST, 0), self.process_message, 0.001,
sockmap)
server.start()
- addr = (HOST, server.port)
+ addr = (support.HOST, server.port)
h = logging.handlers.SMTPHandler(addr, 'me', 'you', 'Log',
timeout=self.TIMEOUT)
self.assertEqual(h.toaddrs, ['you'])
@@ -1246,7 +1241,7 @@ class ConfigFileTest(BaseTest):
def test_config0_ok(self):
# A simple config file which overrides the default settings.
- with captured_stdout() as output:
+ with support.captured_stdout() as output:
self.apply_config(self.config0)
logger = logging.getLogger()
# Won't output anything
@@ -1261,7 +1256,7 @@ class ConfigFileTest(BaseTest):
def test_config0_using_cp_ok(self):
# A simple config file which overrides the default settings.
- with captured_stdout() as output:
+ with support.captured_stdout() as output:
file = io.StringIO(textwrap.dedent(self.config0))
cp = configparser.ConfigParser()
cp.read_file(file)
@@ -1279,7 +1274,7 @@ class ConfigFileTest(BaseTest):
def test_config1_ok(self, config=config1):
# A config file defining a sub-parser as well.
- with captured_stdout() as output:
+ with support.captured_stdout() as output:
self.apply_config(config)
logger = logging.getLogger("compiler.parser")
# Both will output a message
@@ -1302,7 +1297,7 @@ class ConfigFileTest(BaseTest):
def test_config4_ok(self):
# A config file specifying a custom formatter class.
- with captured_stdout() as output:
+ with support.captured_stdout() as output:
self.apply_config(self.config4)
logger = logging.getLogger()
try:
@@ -1322,7 +1317,7 @@ class ConfigFileTest(BaseTest):
self.test_config1_ok(config=self.config6)
def test_config7_ok(self):
- with captured_stdout() as output:
+ with support.captured_stdout() as output:
self.apply_config(self.config1a)
logger = logging.getLogger("compiler.parser")
# See issue #11424. compiler-hyphenated sorts
@@ -1342,7 +1337,7 @@ class ConfigFileTest(BaseTest):
], stream=output)
# Original logger output is empty.
self.assert_log_lines([])
- with captured_stdout() as output:
+ with support.captured_stdout() as output:
self.apply_config(self.config7)
logger = logging.getLogger("compiler.parser")
self.assertFalse(logger.disabled)
@@ -1677,7 +1672,8 @@ class HTTPHandlerTest(BaseTest):
secure_client = secure and sslctx
self.h_hdlr = logging.handlers.HTTPHandler(host, '/frob',
secure=secure_client,
- context=context)
+ context=context,
+ credentials=('foo', 'bar'))
self.log_data = None
root_logger.addHandler(self.h_hdlr)
@@ -2489,7 +2485,7 @@ class ConfigDictTest(BaseTest):
def test_config0_ok(self):
# A simple config which overrides the default settings.
- with captured_stdout() as output:
+ with support.captured_stdout() as output:
self.apply_config(self.config0)
logger = logging.getLogger()
# Won't output anything
@@ -2504,7 +2500,7 @@ class ConfigDictTest(BaseTest):
def test_config1_ok(self, config=config1):
# A config defining a sub-parser as well.
- with captured_stdout() as output:
+ with support.captured_stdout() as output:
self.apply_config(config)
logger = logging.getLogger("compiler.parser")
# Both will output a message
@@ -2535,7 +2531,7 @@ class ConfigDictTest(BaseTest):
def test_config4_ok(self):
# A config specifying a custom formatter class.
- with captured_stdout() as output:
+ with support.captured_stdout() as output:
self.apply_config(self.config4)
#logger = logging.getLogger()
try:
@@ -2550,7 +2546,7 @@ class ConfigDictTest(BaseTest):
def test_config4a_ok(self):
# A config specifying a custom formatter class.
- with captured_stdout() as output:
+ with support.captured_stdout() as output:
self.apply_config(self.config4a)
#logger = logging.getLogger()
try:
@@ -2570,7 +2566,7 @@ class ConfigDictTest(BaseTest):
self.assertRaises(Exception, self.apply_config, self.config6)
def test_config7_ok(self):
- with captured_stdout() as output:
+ with support.captured_stdout() as output:
self.apply_config(self.config1)
logger = logging.getLogger("compiler.parser")
# Both will output a message
@@ -2582,7 +2578,7 @@ class ConfigDictTest(BaseTest):
], stream=output)
# Original logger output is empty.
self.assert_log_lines([])
- with captured_stdout() as output:
+ with support.captured_stdout() as output:
self.apply_config(self.config7)
logger = logging.getLogger("compiler.parser")
self.assertTrue(logger.disabled)
@@ -2599,7 +2595,7 @@ class ConfigDictTest(BaseTest):
#Same as test_config_7_ok but don't disable old loggers.
def test_config_8_ok(self):
- with captured_stdout() as output:
+ with support.captured_stdout() as output:
self.apply_config(self.config1)
logger = logging.getLogger("compiler.parser")
# All will output a message
@@ -2611,7 +2607,7 @@ class ConfigDictTest(BaseTest):
], stream=output)
# Original logger output is empty.
self.assert_log_lines([])
- with captured_stdout() as output:
+ with support.captured_stdout() as output:
self.apply_config(self.config8)
logger = logging.getLogger("compiler.parser")
self.assertFalse(logger.disabled)
@@ -2632,7 +2628,7 @@ class ConfigDictTest(BaseTest):
self.assert_log_lines([])
def test_config_8a_ok(self):
- with captured_stdout() as output:
+ with support.captured_stdout() as output:
self.apply_config(self.config1a)
logger = logging.getLogger("compiler.parser")
# See issue #11424. compiler-hyphenated sorts
@@ -2652,7 +2648,7 @@ class ConfigDictTest(BaseTest):
], stream=output)
# Original logger output is empty.
self.assert_log_lines([])
- with captured_stdout() as output:
+ with support.captured_stdout() as output:
self.apply_config(self.config8a)
logger = logging.getLogger("compiler.parser")
self.assertFalse(logger.disabled)
@@ -2675,7 +2671,7 @@ class ConfigDictTest(BaseTest):
self.assert_log_lines([])
def test_config_9_ok(self):
- with captured_stdout() as output:
+ with support.captured_stdout() as output:
self.apply_config(self.config9)
logger = logging.getLogger("compiler.parser")
#Nothing will be output since both handler and logger are set to WARNING
@@ -2693,7 +2689,7 @@ class ConfigDictTest(BaseTest):
], stream=output)
def test_config_10_ok(self):
- with captured_stdout() as output:
+ with support.captured_stdout() as output:
self.apply_config(self.config10)
logger = logging.getLogger("compiler.parser")
logger.warning(self.next_message())
@@ -2721,7 +2717,7 @@ class ConfigDictTest(BaseTest):
self.assertRaises(Exception, self.apply_config, self.config13)
def test_config14_ok(self):
- with captured_stdout() as output:
+ with support.captured_stdout() as output:
self.apply_config(self.config14)
h = logging._handlers['hand1']
self.assertEqual(h.foo, 'bar')
@@ -2760,7 +2756,7 @@ class ConfigDictTest(BaseTest):
@unittest.skipUnless(threading, 'Threading required for this test.')
def test_listen_config_10_ok(self):
- with captured_stdout() as output:
+ with support.captured_stdout() as output:
self.setup_via_listener(json.dumps(self.config10))
logger = logging.getLogger("compiler.parser")
logger.warning(self.next_message())
@@ -2780,7 +2776,7 @@ class ConfigDictTest(BaseTest):
@unittest.skipUnless(threading, 'Threading required for this test.')
def test_listen_config_1_ok(self):
- with captured_stdout() as output:
+ with support.captured_stdout() as output:
self.setup_via_listener(textwrap.dedent(ConfigFileTest.config1))
logger = logging.getLogger("compiler.parser")
# Both will output a message
@@ -2807,7 +2803,7 @@ class ConfigDictTest(BaseTest):
# First, specify a verification function that will fail.
# We expect to see no output, since our configuration
# never took effect.
- with captured_stdout() as output:
+ with support.captured_stdout() as output:
self.setup_via_listener(to_send, verify_fail)
# Both will output a message
logger.info(self.next_message())
@@ -2822,7 +2818,7 @@ class ConfigDictTest(BaseTest):
# Now, perform no verification. Our configuration
# should take effect.
- with captured_stdout() as output:
+ with support.captured_stdout() as output:
self.setup_via_listener(to_send) # no verify callable specified
logger = logging.getLogger("compiler.parser")
# Both will output a message
@@ -2840,7 +2836,7 @@ class ConfigDictTest(BaseTest):
# Now, perform verification which transforms the bytes.
- with captured_stdout() as output:
+ with support.captured_stdout() as output:
self.setup_via_listener(to_send[::-1], verify_reverse)
logger = logging.getLogger("compiler.parser")
# Both will output a message
@@ -2995,7 +2991,7 @@ class QueueHandlerTest(BaseTest):
@unittest.skipUnless(hasattr(logging.handlers, 'QueueListener'),
'logging.handlers.QueueListener required for this test')
def test_queue_listener(self):
- handler = TestHandler(Matcher())
+ handler = support.TestHandler(support.Matcher())
listener = logging.handlers.QueueListener(self.queue, handler)
listener.start()
try:
@@ -3007,6 +3003,25 @@ class QueueHandlerTest(BaseTest):
self.assertTrue(handler.matches(levelno=logging.WARNING, message='1'))
self.assertTrue(handler.matches(levelno=logging.ERROR, message='2'))
self.assertTrue(handler.matches(levelno=logging.CRITICAL, message='3'))
+ handler.close()
+
+ # Now test with respect_handler_level set
+
+ handler = support.TestHandler(support.Matcher())
+ handler.setLevel(logging.CRITICAL)
+ listener = logging.handlers.QueueListener(self.queue, handler,
+ respect_handler_level=True)
+ listener.start()
+ try:
+ self.que_logger.warning(self.next_message())
+ self.que_logger.error(self.next_message())
+ self.que_logger.critical(self.next_message())
+ finally:
+ listener.stop()
+ self.assertFalse(handler.matches(levelno=logging.WARNING, message='4'))
+ self.assertFalse(handler.matches(levelno=logging.ERROR, message='5'))
+ self.assertTrue(handler.matches(levelno=logging.CRITICAL, message='6'))
+
ZERO = datetime.timedelta(0)
@@ -3163,32 +3178,35 @@ class LastResortTest(BaseTest):
# Test the last resort handler
root = self.root_logger
root.removeHandler(self.root_hdlr)
- old_stderr = sys.stderr
old_lastresort = logging.lastResort
old_raise_exceptions = logging.raiseExceptions
+
try:
- sys.stderr = sio = io.StringIO()
- root.debug('This should not appear')
- self.assertEqual(sio.getvalue(), '')
- root.warning('This is your final chance!')
- self.assertEqual(sio.getvalue(), 'This is your final chance!\n')
- #No handlers and no last resort, so 'No handlers' message
+ with support.captured_stderr() as stderr:
+ root.debug('This should not appear')
+ self.assertEqual(stderr.getvalue(), '')
+ root.warning('Final chance!')
+ self.assertEqual(stderr.getvalue(), 'Final chance!\n')
+
+ # No handlers and no last resort, so 'No handlers' message
logging.lastResort = None
- sys.stderr = sio = io.StringIO()
- root.warning('This is your final chance!')
- self.assertEqual(sio.getvalue(), 'No handlers could be found for logger "root"\n')
+ with support.captured_stderr() as stderr:
+ root.warning('Final chance!')
+ msg = 'No handlers could be found for logger "root"\n'
+ self.assertEqual(stderr.getvalue(), msg)
+
# 'No handlers' message only printed once
- sys.stderr = sio = io.StringIO()
- root.warning('This is your final chance!')
- self.assertEqual(sio.getvalue(), '')
+ with support.captured_stderr() as stderr:
+ root.warning('Final chance!')
+ self.assertEqual(stderr.getvalue(), '')
+
+ # If raiseExceptions is False, no message is printed
root.manager.emittedNoHandlerWarning = False
- #If raiseExceptions is False, no message is printed
logging.raiseExceptions = False
- sys.stderr = sio = io.StringIO()
- root.warning('This is your final chance!')
- self.assertEqual(sio.getvalue(), '')
+ with support.captured_stderr() as stderr:
+ root.warning('Final chance!')
+ self.assertEqual(stderr.getvalue(), '')
finally:
- sys.stderr = old_stderr
root.addHandler(self.root_hdlr)
logging.lastResort = old_lastresort
logging.raiseExceptions = old_raise_exceptions
@@ -3319,8 +3337,8 @@ class ModuleLevelMiscTest(BaseTest):
def _test_log(self, method, level=None):
called = []
- patch(self, logging, 'basicConfig',
- lambda *a, **kw: called.append((a, kw)))
+ support.patch(self, logging, 'basicConfig',
+ lambda *a, **kw: called.append((a, kw)))
recording = RecordingHandler()
logging.root.addHandler(recording)
@@ -3491,7 +3509,7 @@ class BasicConfigTest(unittest.TestCase):
self.assertEqual(logging.root.level, self.original_logging_level)
def test_strformatstyle(self):
- with captured_stdout() as output:
+ with support.captured_stdout() as output:
logging.basicConfig(stream=sys.stdout, style="{")
logging.error("Log an error")
sys.stdout.seek(0)
@@ -3499,7 +3517,7 @@ class BasicConfigTest(unittest.TestCase):
"ERROR:root:Log an error")
def test_stringtemplatestyle(self):
- with captured_stdout() as output:
+ with support.captured_stdout() as output:
logging.basicConfig(stream=sys.stdout, style="$")
logging.error("Log an error")
sys.stdout.seek(0)
@@ -3620,7 +3638,7 @@ class BasicConfigTest(unittest.TestCase):
self.addCleanup(logging.root.setLevel, old_level)
called.append((a, kw))
- patch(self, logging, 'basicConfig', my_basic_config)
+ support.patch(self, logging, 'basicConfig', my_basic_config)
log_method = getattr(logging, method)
if level is not None:
@@ -3686,6 +3704,19 @@ class LoggerAdapterTest(unittest.TestCase):
self.assertEqual(record.exc_info,
(exc.__class__, exc, exc.__traceback__))
+ def test_exception_excinfo(self):
+ try:
+ 1 / 0
+ except ZeroDivisionError as e:
+ exc = e
+
+ self.adapter.exception('exc_info test', exc_info=exc)
+
+ self.assertEqual(len(self.recording.records), 1)
+ record = self.recording.records[0]
+ self.assertEqual(record.exc_info,
+ (exc.__class__, exc, exc.__traceback__))
+
def test_critical(self):
msg = 'critical test! %r'
self.adapter.critical(msg, self.recording)
@@ -3745,17 +3776,17 @@ class LoggerTest(BaseTest):
(exc.__class__, exc, exc.__traceback__))
def test_log_invalid_level_with_raise(self):
- with swap_attr(logging, 'raiseExceptions', True):
+ with support.swap_attr(logging, 'raiseExceptions', True):
self.assertRaises(TypeError, self.logger.log, '10', 'test message')
def test_log_invalid_level_no_raise(self):
- with swap_attr(logging, 'raiseExceptions', False):
+ with support.swap_attr(logging, 'raiseExceptions', False):
self.logger.log('10', 'test message') # no exception happens
def test_find_caller_with_stack_info(self):
called = []
- patch(self, logging.traceback, 'print_stack',
- lambda f, file: called.append(file.getvalue()))
+ support.patch(self, logging.traceback, 'print_stack',
+ lambda f, file: called.append(file.getvalue()))
self.logger.findCaller(stack_info=True)
@@ -3892,7 +3923,7 @@ class RotatingFileHandlerTest(BaseFileTest):
self.assertFalse(os.path.exists(namer(self.fn + ".3")))
rh.close()
- @requires_zlib
+ @support.requires_zlib
def test_rotator(self):
def namer(name):
return name + ".gz"
@@ -4132,22 +4163,20 @@ class NTEventLogHandlerTest(BaseTest):
# Set the locale to the platform-dependent default. I have no idea
# why the test does this, but in any case we save the current locale
# first and restore it at the end.
-@run_with_locale('LC_ALL', '')
+@support.run_with_locale('LC_ALL', '')
def test_main():
- run_unittest(BuiltinLevelsTest, BasicFilterTest,
- CustomLevelsAndFiltersTest, HandlerTest, MemoryHandlerTest,
- ConfigFileTest, SocketHandlerTest, DatagramHandlerTest,
- MemoryTest, EncodingTest, WarningsTest, ConfigDictTest,
- ManagerTest, FormatterTest, BufferingFormatterTest,
- StreamHandlerTest, LogRecordFactoryTest, ChildLoggerTest,
- QueueHandlerTest, ShutdownTest, ModuleLevelMiscTest,
- BasicConfigTest, LoggerAdapterTest, LoggerTest,
- SMTPHandlerTest, FileHandlerTest, RotatingFileHandlerTest,
- LastResortTest, LogRecordTest, ExceptionTest,
- SysLogHandlerTest, HTTPHandlerTest, NTEventLogHandlerTest,
- TimedRotatingFileHandlerTest, UnixSocketHandlerTest,
- UnixDatagramHandlerTest, UnixSysLogHandlerTest
- )
+ support.run_unittest(
+ BuiltinLevelsTest, BasicFilterTest, CustomLevelsAndFiltersTest,
+ HandlerTest, MemoryHandlerTest, ConfigFileTest, SocketHandlerTest,
+ DatagramHandlerTest, MemoryTest, EncodingTest, WarningsTest,
+ ConfigDictTest, ManagerTest, FormatterTest, BufferingFormatterTest,
+ StreamHandlerTest, LogRecordFactoryTest, ChildLoggerTest,
+ QueueHandlerTest, ShutdownTest, ModuleLevelMiscTest, BasicConfigTest,
+ LoggerAdapterTest, LoggerTest, SMTPHandlerTest, FileHandlerTest,
+ RotatingFileHandlerTest, LastResortTest, LogRecordTest,
+ ExceptionTest, SysLogHandlerTest, HTTPHandlerTest,
+ NTEventLogHandlerTest, TimedRotatingFileHandlerTest,
+ UnixSocketHandlerTest, UnixDatagramHandlerTest, UnixSysLogHandlerTest)
if __name__ == "__main__":
test_main()
diff --git a/Lib/test/test_long.py b/Lib/test/test_long.py
index 5b9e37aa8d..b2d008b101 100644
--- a/Lib/test/test_long.py
+++ b/Lib/test/test_long.py
@@ -582,8 +582,6 @@ class LongTest(unittest.TestCase):
return (x > y) - (x < y)
def __eq__(self, other):
return self._cmp__(other) == 0
- def __ne__(self, other):
- return self._cmp__(other) != 0
def __ge__(self, other):
return self._cmp__(other) >= 0
def __gt__(self, other):
@@ -1205,6 +1203,23 @@ class LongTest(unittest.TestCase):
self.assertRaises(TypeError, myint.from_bytes, 0, 'big')
self.assertRaises(TypeError, int.from_bytes, 0, 'big', True)
+ class myint2(int):
+ def __new__(cls, value):
+ return int.__new__(cls, value + 1)
+
+ i = myint2.from_bytes(b'\x01', 'big')
+ self.assertIs(type(i), myint2)
+ self.assertEqual(i, 2)
+
+ class myint3(int):
+ def __init__(self, value):
+ self.foo = 'bar'
+
+ i = myint3.from_bytes(b'\x01', 'big')
+ self.assertIs(type(i), myint3)
+ self.assertEqual(i, 1)
+ self.assertEqual(getattr(i, 'foo', 'none'), 'bar')
+
def test_access_to_nonexistent_digit_0(self):
# http://bugs.python.org/issue14630: A bug in _PyLong_Copy meant that
# ob_digit[0] was being incorrectly accessed for instances of a
@@ -1227,8 +1242,5 @@ class LongTest(unittest.TestCase):
self.assertEqual(type(value >> shift), int)
-def test_main():
- support.run_unittest(LongTest)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_longexp.py b/Lib/test/test_longexp.py
index 1b40d02983..f4c463aece 100644
--- a/Lib/test/test_longexp.py
+++ b/Lib/test/test_longexp.py
@@ -1,5 +1,4 @@
import unittest
-from test import support
class LongExpText(unittest.TestCase):
def test_longexp(self):
@@ -7,8 +6,5 @@ class LongExpText(unittest.TestCase):
l = eval("[" + "2," * REPS + "]")
self.assertEqual(len(l), REPS)
-def test_main():
- support.run_unittest(LongExpText)
-
-if __name__=="__main__":
- test_main()
+if __name__ == "__main__":
+ unittest.main()
diff --git a/Lib/test/test_lzma.py b/Lib/test/test_lzma.py
index 07fadbde11..6c698e2f0e 100644
--- a/Lib/test/test_lzma.py
+++ b/Lib/test/test_lzma.py
@@ -1,4 +1,5 @@
-from io import BytesIO, UnsupportedOperation
+import _compression
+from io import BytesIO, UnsupportedOperation, DEFAULT_BUFFER_SIZE
import os
import pickle
import random
@@ -135,6 +136,97 @@ class CompressorDecompressorTestCase(unittest.TestCase):
self.assertTrue(lzd.eof)
self.assertEqual(lzd.unused_data, b"")
+ def test_decompressor_chunks_maxsize(self):
+ lzd = LZMADecompressor()
+ max_length = 100
+ out = []
+
+ # Feed first half the input
+ len_ = len(COMPRESSED_XZ) // 2
+ out.append(lzd.decompress(COMPRESSED_XZ[:len_],
+ max_length=max_length))
+ self.assertFalse(lzd.needs_input)
+ self.assertEqual(len(out[-1]), max_length)
+
+ # Retrieve more data without providing more input
+ out.append(lzd.decompress(b'', max_length=max_length))
+ self.assertFalse(lzd.needs_input)
+ self.assertEqual(len(out[-1]), max_length)
+
+ # Retrieve more data while providing more input
+ out.append(lzd.decompress(COMPRESSED_XZ[len_:],
+ max_length=max_length))
+ self.assertLessEqual(len(out[-1]), max_length)
+
+ # Retrieve remaining uncompressed data
+ while not lzd.eof:
+ out.append(lzd.decompress(b'', max_length=max_length))
+ self.assertLessEqual(len(out[-1]), max_length)
+
+ out = b"".join(out)
+ self.assertEqual(out, INPUT)
+ self.assertEqual(lzd.check, lzma.CHECK_CRC64)
+ self.assertEqual(lzd.unused_data, b"")
+
+ def test_decompressor_inputbuf_1(self):
+ # Test reusing input buffer after moving existing
+ # contents to beginning
+ lzd = LZMADecompressor()
+ out = []
+
+ # Create input buffer and fill it
+ self.assertEqual(lzd.decompress(COMPRESSED_XZ[:100],
+ max_length=0), b'')
+
+ # Retrieve some results, freeing capacity at beginning
+ # of input buffer
+ out.append(lzd.decompress(b'', 2))
+
+ # Add more data that fits into input buffer after
+ # moving existing data to beginning
+ out.append(lzd.decompress(COMPRESSED_XZ[100:105], 15))
+
+ # Decompress rest of data
+ out.append(lzd.decompress(COMPRESSED_XZ[105:]))
+ self.assertEqual(b''.join(out), INPUT)
+
+ def test_decompressor_inputbuf_2(self):
+ # Test reusing input buffer by appending data at the
+ # end right away
+ lzd = LZMADecompressor()
+ out = []
+
+ # Create input buffer and empty it
+ self.assertEqual(lzd.decompress(COMPRESSED_XZ[:200],
+ max_length=0), b'')
+ out.append(lzd.decompress(b''))
+
+ # Fill buffer with new data
+ out.append(lzd.decompress(COMPRESSED_XZ[200:280], 2))
+
+ # Append some more data, not enough to require resize
+ out.append(lzd.decompress(COMPRESSED_XZ[280:300], 2))
+
+ # Decompress rest of data
+ out.append(lzd.decompress(COMPRESSED_XZ[300:]))
+ self.assertEqual(b''.join(out), INPUT)
+
+ def test_decompressor_inputbuf_3(self):
+ # Test reusing input buffer after extending it
+
+ lzd = LZMADecompressor()
+ out = []
+
+ # Create almost full input buffer
+ out.append(lzd.decompress(COMPRESSED_XZ[:200], 5))
+
+ # Add even more data to it, requiring resize
+ out.append(lzd.decompress(COMPRESSED_XZ[200:300], 5))
+
+ # Decompress rest of data
+ out.append(lzd.decompress(COMPRESSED_XZ[300:]))
+ self.assertEqual(b''.join(out), INPUT)
+
def test_decompressor_unused_data(self):
lzd = LZMADecompressor()
extra = b"fooblibar"
@@ -681,13 +773,13 @@ class FileTestCase(unittest.TestCase):
def test_read_multistream_buffer_size_aligned(self):
# Test the case where a stream boundary coincides with the end
# of the raw read buffer.
- saved_buffer_size = lzma._BUFFER_SIZE
- lzma._BUFFER_SIZE = len(COMPRESSED_XZ)
+ saved_buffer_size = _compression.BUFFER_SIZE
+ _compression.BUFFER_SIZE = len(COMPRESSED_XZ)
try:
with LZMAFile(BytesIO(COMPRESSED_XZ * 5)) as f:
self.assertEqual(f.read(), INPUT * 5)
finally:
- lzma._BUFFER_SIZE = saved_buffer_size
+ _compression.BUFFER_SIZE = saved_buffer_size
def test_read_trailing_junk(self):
with LZMAFile(BytesIO(COMPRESSED_XZ + COMPRESSED_BOGUS)) as f:
@@ -738,7 +830,7 @@ class FileTestCase(unittest.TestCase):
with LZMAFile(BytesIO(), "w") as f:
self.assertRaises(ValueError, f.read)
with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:
- self.assertRaises(TypeError, f.read, None)
+ self.assertRaises(TypeError, f.read, float())
def test_read_bad_data(self):
with LZMAFile(BytesIO(COMPRESSED_BOGUS)) as f:
@@ -834,6 +926,17 @@ class FileTestCase(unittest.TestCase):
with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:
self.assertListEqual(f.readlines(), lines)
+ def test_decompress_limited(self):
+ """Decompressed data buffering should be limited"""
+ bomb = lzma.compress(bytes(int(2e6)), preset=6)
+ self.assertLess(len(bomb), _compression.BUFFER_SIZE)
+
+ decomp = LZMAFile(BytesIO(bomb))
+ self.assertEqual(bytes(1), decomp.read(1))
+ max_decomp = 1 + DEFAULT_BUFFER_SIZE
+ self.assertLessEqual(decomp._buffer.raw.tell(), max_decomp,
+ "Excessive amount of data was decompressed")
+
def test_write(self):
with BytesIO() as dst:
with LZMAFile(dst, "w") as f:
@@ -999,7 +1102,8 @@ class FileTestCase(unittest.TestCase):
self.assertRaises(ValueError, f.seek, 0)
with LZMAFile(BytesIO(COMPRESSED_XZ)) as f:
self.assertRaises(ValueError, f.seek, 0, 3)
- self.assertRaises(ValueError, f.seek, 9, ())
+ # io.BufferedReader raises TypeError instead of ValueError
+ self.assertRaises((TypeError, ValueError), f.seek, 9, ())
self.assertRaises(TypeError, f.seek, None)
self.assertRaises(TypeError, f.seek, b"derp")
@@ -1107,7 +1211,7 @@ class OpenTestCase(unittest.TestCase):
self.assertEqual(f.read(), uncompressed)
def test_encoding_error_handler(self):
- # Test wih non-default encoding error handler.
+ # Test with non-default encoding error handler.
with BytesIO(lzma.compress(b"foo\xffbar")) as bio:
with lzma.open(bio, "rt", encoding="ascii", errors="ignore") as f:
self.assertEqual(f.read(), "foobar")
diff --git a/Lib/test/test_macpath.py b/Lib/test/test_macpath.py
index 22f84919bb..80bec7a799 100644
--- a/Lib/test/test_macpath.py
+++ b/Lib/test/test_macpath.py
@@ -142,6 +142,8 @@ class MacPathTestCase(unittest.TestCase):
class MacCommonTest(test_genericpath.CommonTest, unittest.TestCase):
pathmodule = macpath
+ test_relpath_errors = None
+
if __name__ == "__main__":
unittest.main()
diff --git a/Lib/test/test_mailcap.py b/Lib/test/test_mailcap.py
index a4cd09c706..22b2fcc4a7 100644
--- a/Lib/test/test_mailcap.py
+++ b/Lib/test/test_mailcap.py
@@ -213,9 +213,5 @@ class FindmatchTest(unittest.TestCase):
self.assertEqual(mailcap.findmatch(*c[0], **c[1]), c[2])
-def test_main():
- test.support.run_unittest(HelperFunctionTest, GetcapsTest, FindmatchTest)
-
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_marshal.py b/Lib/test/test_marshal.py
index 903e12c8c4..c7def9a599 100644
--- a/Lib/test/test_marshal.py
+++ b/Lib/test/test_marshal.py
@@ -193,7 +193,7 @@ class BugsTestCase(unittest.TestCase):
head = last = []
# The max stack depth should match the value in Python/marshal.c.
if os.name == 'nt' and hasattr(sys, 'gettotalrefcount'):
- MAX_MARSHAL_STACK_DEPTH = 1500
+ MAX_MARSHAL_STACK_DEPTH = 1000
else:
MAX_MARSHAL_STACK_DEPTH = 2000
for i in range(MAX_MARSHAL_STACK_DEPTH - 2):
diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py
index 48f84ba732..6c7b99d2d2 100644
--- a/Lib/test/test_math.py
+++ b/Lib/test/test_math.py
@@ -175,6 +175,14 @@ def parse_testfile(fname):
flags
)
+# Class providing an __index__ method.
+class MyIndexable(object):
+ def __init__(self, value):
+ self.value = value
+
+ def __index__(self):
+ return self.value
+
class MathTests(unittest.TestCase):
def ftest(self, name, value, expected):
@@ -422,9 +430,17 @@ class MathTests(unittest.TestCase):
self.assertEqual(math.factorial(i), py_factorial(i))
self.assertRaises(ValueError, math.factorial, -1)
self.assertRaises(ValueError, math.factorial, -1.0)
+ self.assertRaises(ValueError, math.factorial, -10**100)
+ self.assertRaises(ValueError, math.factorial, -1e100)
self.assertRaises(ValueError, math.factorial, math.pi)
- self.assertRaises(OverflowError, math.factorial, sys.maxsize+1)
- self.assertRaises(OverflowError, math.factorial, 10e100)
+
+ # Other implementations may place different upper bounds.
+ @support.cpython_only
+ def testFactorialHugeInputs(self):
+ # Currently raises ValueError for inputs that are too large
+ # to fit into a C long.
+ self.assertRaises(OverflowError, math.factorial, 10**100)
+ self.assertRaises(OverflowError, math.factorial, 1e100)
def testFloor(self):
self.assertRaises(TypeError, math.floor)
@@ -587,6 +603,49 @@ class MathTests(unittest.TestCase):
s = msum(vals)
self.assertEqual(msum(vals), math.fsum(vals))
+ def testGcd(self):
+ gcd = math.gcd
+ self.assertEqual(gcd(0, 0), 0)
+ self.assertEqual(gcd(1, 0), 1)
+ self.assertEqual(gcd(-1, 0), 1)
+ self.assertEqual(gcd(0, 1), 1)
+ self.assertEqual(gcd(0, -1), 1)
+ self.assertEqual(gcd(7, 1), 1)
+ self.assertEqual(gcd(7, -1), 1)
+ self.assertEqual(gcd(-23, 15), 1)
+ self.assertEqual(gcd(120, 84), 12)
+ self.assertEqual(gcd(84, -120), 12)
+ self.assertEqual(gcd(1216342683557601535506311712,
+ 436522681849110124616458784), 32)
+ c = 652560
+ x = 434610456570399902378880679233098819019853229470286994367836600566
+ y = 1064502245825115327754847244914921553977
+ a = x * c
+ b = y * c
+ self.assertEqual(gcd(a, b), c)
+ self.assertEqual(gcd(b, a), c)
+ self.assertEqual(gcd(-a, b), c)
+ self.assertEqual(gcd(b, -a), c)
+ self.assertEqual(gcd(a, -b), c)
+ self.assertEqual(gcd(-b, a), c)
+ self.assertEqual(gcd(-a, -b), c)
+ self.assertEqual(gcd(-b, -a), c)
+ c = 576559230871654959816130551884856912003141446781646602790216406874
+ a = x * c
+ b = y * c
+ self.assertEqual(gcd(a, b), c)
+ self.assertEqual(gcd(b, a), c)
+ self.assertEqual(gcd(-a, b), c)
+ self.assertEqual(gcd(b, -a), c)
+ self.assertEqual(gcd(a, -b), c)
+ self.assertEqual(gcd(-b, a), c)
+ self.assertEqual(gcd(-a, -b), c)
+ self.assertEqual(gcd(-b, -a), c)
+
+ self.assertRaises(TypeError, gcd, 120.0, 84)
+ self.assertRaises(TypeError, gcd, 120, 84.0)
+ self.assertEqual(gcd(MyIndexable(120), MyIndexable(84)), 12)
+
def testHypot(self):
self.assertRaises(TypeError, math.hypot)
self.ftest('hypot(0,0)', math.hypot(0,0), 0)
@@ -975,6 +1034,17 @@ class MathTests(unittest.TestCase):
self.assertFalse(math.isinf(0.))
self.assertFalse(math.isinf(1.))
+ @requires_IEEE_754
+ def test_nan_constant(self):
+ self.assertTrue(math.isnan(math.nan))
+
+ @requires_IEEE_754
+ def test_inf_constant(self):
+ self.assertTrue(math.isinf(math.inf))
+ self.assertGreater(math.inf, 0.0)
+ self.assertEqual(math.inf, float("inf"))
+ self.assertEqual(-math.inf, float("-inf"))
+
# RED_FLAG 16-Oct-2000 Tim
# While 2.0 is more consistent about exceptions than previous releases, it
# still fails this part of the test on some platforms. For now, we only
@@ -1096,10 +1166,131 @@ class MathTests(unittest.TestCase):
'\n '.join(failures))
+class IsCloseTests(unittest.TestCase):
+ isclose = math.isclose # sublcasses should override this
+
+ def assertIsClose(self, a, b, *args, **kwargs):
+ self.assertTrue(self.isclose(a, b, *args, **kwargs),
+ msg="%s and %s should be close!" % (a, b))
+
+ def assertIsNotClose(self, a, b, *args, **kwargs):
+ self.assertFalse(self.isclose(a, b, *args, **kwargs),
+ msg="%s and %s should not be close!" % (a, b))
+
+ def assertAllClose(self, examples, *args, **kwargs):
+ for a, b in examples:
+ self.assertIsClose(a, b, *args, **kwargs)
+
+ def assertAllNotClose(self, examples, *args, **kwargs):
+ for a, b in examples:
+ self.assertIsNotClose(a, b, *args, **kwargs)
+
+ def test_negative_tolerances(self):
+ # ValueError should be raised if either tolerance is less than zero
+ with self.assertRaises(ValueError):
+ self.assertIsClose(1, 1, rel_tol=-1e-100)
+ with self.assertRaises(ValueError):
+ self.assertIsClose(1, 1, rel_tol=1e-100, abs_tol=-1e10)
+
+ def test_identical(self):
+ # identical values must test as close
+ identical_examples = [(2.0, 2.0),
+ (0.1e200, 0.1e200),
+ (1.123e-300, 1.123e-300),
+ (12345, 12345.0),
+ (0.0, -0.0),
+ (345678, 345678)]
+ self.assertAllClose(identical_examples, rel_tol=0.0, abs_tol=0.0)
+
+ def test_eight_decimal_places(self):
+ # examples that are close to 1e-8, but not 1e-9
+ eight_decimal_places_examples = [(1e8, 1e8 + 1),
+ (-1e-8, -1.000000009e-8),
+ (1.12345678, 1.12345679)]
+ self.assertAllClose(eight_decimal_places_examples, rel_tol=1e-8)
+ self.assertAllNotClose(eight_decimal_places_examples, rel_tol=1e-9)
+
+ def test_near_zero(self):
+ # values close to zero
+ near_zero_examples = [(1e-9, 0.0),
+ (-1e-9, 0.0),
+ (-1e-150, 0.0)]
+ # these should not be close to any rel_tol
+ self.assertAllNotClose(near_zero_examples, rel_tol=0.9)
+ # these should be close to abs_tol=1e-8
+ self.assertAllClose(near_zero_examples, abs_tol=1e-8)
+
+ def test_identical_infinite(self):
+ # these are close regardless of tolerance -- i.e. they are equal
+ self.assertIsClose(INF, INF)
+ self.assertIsClose(INF, INF, abs_tol=0.0)
+ self.assertIsClose(NINF, NINF)
+ self.assertIsClose(NINF, NINF, abs_tol=0.0)
+
+ def test_inf_ninf_nan(self):
+ # these should never be close (following IEEE 754 rules for equality)
+ not_close_examples = [(NAN, NAN),
+ (NAN, 1e-100),
+ (1e-100, NAN),
+ (INF, NAN),
+ (NAN, INF),
+ (INF, NINF),
+ (INF, 1.0),
+ (1.0, INF),
+ (INF, 1e308),
+ (1e308, INF)]
+ # use largest reasonable tolerance
+ self.assertAllNotClose(not_close_examples, abs_tol=0.999999999999999)
+
+ def test_zero_tolerance(self):
+ # test with zero tolerance
+ zero_tolerance_close_examples = [(1.0, 1.0),
+ (-3.4, -3.4),
+ (-1e-300, -1e-300)]
+ self.assertAllClose(zero_tolerance_close_examples, rel_tol=0.0)
+
+ zero_tolerance_not_close_examples = [(1.0, 1.000000000000001),
+ (0.99999999999999, 1.0),
+ (1.0e200, .999999999999999e200)]
+ self.assertAllNotClose(zero_tolerance_not_close_examples, rel_tol=0.0)
+
+ def test_assymetry(self):
+ # test the assymetry example from PEP 485
+ self.assertAllClose([(9, 10), (10, 9)], rel_tol=0.1)
+
+ def test_integers(self):
+ # test with integer values
+ integer_examples = [(100000001, 100000000),
+ (123456789, 123456788)]
+
+ self.assertAllClose(integer_examples, rel_tol=1e-8)
+ self.assertAllNotClose(integer_examples, rel_tol=1e-9)
+
+ def test_decimals(self):
+ # test with Decimal values
+ from decimal import Decimal
+
+ decimal_examples = [(Decimal('1.00000001'), Decimal('1.0')),
+ (Decimal('1.00000001e-20'), Decimal('1.0e-20')),
+ (Decimal('1.00000001e-100'), Decimal('1.0e-100'))]
+ self.assertAllClose(decimal_examples, rel_tol=1e-8)
+ self.assertAllNotClose(decimal_examples, rel_tol=1e-9)
+
+ def test_fractions(self):
+ # test with Fraction values
+ from fractions import Fraction
+
+ # could use some more examples here!
+ fraction_examples = [(Fraction(1, 100000000) + 1, Fraction(1))]
+ self.assertAllClose(fraction_examples, rel_tol=1e-8)
+ self.assertAllNotClose(fraction_examples, rel_tol=1e-9)
+
+
def test_main():
from doctest import DocFileSuite
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(MathTests))
+ suite.addTest(unittest.makeSuite(IsCloseTests))
suite.addTest(DocFileSuite("ieee754.txt"))
run_unittest(suite)
diff --git a/Lib/test/test_memoryio.py b/Lib/test/test_memoryio.py
index 7ce95b9dd8..55b693e564 100644
--- a/Lib/test/test_memoryio.py
+++ b/Lib/test/test_memoryio.py
@@ -9,6 +9,7 @@ from test import support
import io
import _pyio as pyio
import pickle
+import sys
class MemorySeekTestMixin:
@@ -165,6 +166,10 @@ class MemoryTestMixin:
memio.seek(0)
self.assertEqual(memio.read(None), buf)
self.assertRaises(TypeError, memio.read, '')
+ memio.seek(len(buf) + 1)
+ self.assertEqual(memio.read(1), self.EOF)
+ memio.seek(len(buf) + 1)
+ self.assertEqual(memio.read(), self.EOF)
memio.close()
self.assertRaises(ValueError, memio.read)
@@ -184,6 +189,9 @@ class MemoryTestMixin:
self.assertEqual(memio.readline(-1), buf)
memio.seek(0)
self.assertEqual(memio.readline(0), self.EOF)
+ # Issue #24989: Buffer overread
+ memio.seek(len(buf) * 2 + 1)
+ self.assertEqual(memio.readline(), self.EOF)
buf = self.buftype("1234567890\n")
memio = self.ioclass((buf * 3)[:-1])
@@ -216,6 +224,9 @@ class MemoryTestMixin:
memio.seek(0)
self.assertEqual(memio.readlines(None), [buf] * 10)
self.assertRaises(TypeError, memio.readlines, '')
+ # Issue #24989: Buffer overread
+ memio.seek(len(buf) * 10 + 1)
+ self.assertEqual(memio.readlines(), [])
memio.close()
self.assertRaises(ValueError, memio.readlines)
@@ -237,6 +248,9 @@ class MemoryTestMixin:
self.assertEqual(line, buf)
i += 1
self.assertEqual(i, 10)
+ # Issue #24989: Buffer overread
+ memio.seek(len(buf) * 10 + 1)
+ self.assertEqual(list(memio), [])
memio = self.ioclass(buf * 2)
memio.close()
self.assertRaises(ValueError, memio.__next__)
@@ -362,7 +376,7 @@ class MemoryTestMixin:
# Pickle expects the class to be on the module level. Here we use a
# little hack to allow the PickleTestMemIO class to derive from
- # self.ioclass without having to define all combinations explictly on
+ # self.ioclass without having to define all combinations explicitly on
# the module-level.
import __main__
PickleTestMemIO.__module__ = '__main__'
@@ -385,7 +399,16 @@ class MemoryTestMixin:
del __main__.PickleTestMemIO
-class BytesIOMixin:
+class PyBytesIOTest(MemoryTestMixin, MemorySeekTestMixin, unittest.TestCase):
+ # Test _pyio.BytesIO; class also inherited for testing C implementation
+
+ UnsupportedOperation = pyio.UnsupportedOperation
+
+ @staticmethod
+ def buftype(s):
+ return s.encode("ascii")
+ ioclass = pyio.BytesIO
+ EOF = b""
def test_getbuffer(self):
memio = self.ioclass(b"1234567890")
@@ -412,18 +435,6 @@ class BytesIOMixin:
memio.close()
self.assertRaises(ValueError, memio.getbuffer)
-
-class PyBytesIOTest(MemoryTestMixin, MemorySeekTestMixin,
- BytesIOMixin, unittest.TestCase):
-
- UnsupportedOperation = pyio.UnsupportedOperation
-
- @staticmethod
- def buftype(s):
- return s.encode("ascii")
- ioclass = pyio.BytesIO
- EOF = b""
-
def test_read1(self):
buf = self.buftype("1234567890")
memio = self.ioclass(buf)
@@ -718,12 +729,56 @@ class CBytesIOTest(PyBytesIOTest):
@support.cpython_only
def test_sizeof(self):
- basesize = support.calcobjsize('P2nN2Pn')
+ basesize = support.calcobjsize('P2n2Pn')
check = self.check_sizeof
self.assertEqual(object.__sizeof__(io.BytesIO()), basesize)
check(io.BytesIO(), basesize )
- check(io.BytesIO(b'a'), basesize + 1 + 1 )
- check(io.BytesIO(b'a' * 1000), basesize + 1000 + 1 )
+ check(io.BytesIO(b'a' * 1000), basesize + sys.getsizeof(b'a' * 1000))
+
+ # Various tests of copy-on-write behaviour for BytesIO.
+
+ def _test_cow_mutation(self, mutation):
+ # Common code for all BytesIO copy-on-write mutation tests.
+ imm = b' ' * 1024
+ old_rc = sys.getrefcount(imm)
+ memio = self.ioclass(imm)
+ self.assertEqual(sys.getrefcount(imm), old_rc + 1)
+ mutation(memio)
+ self.assertEqual(sys.getrefcount(imm), old_rc)
+
+ @support.cpython_only
+ def test_cow_truncate(self):
+ # Ensure truncate causes a copy.
+ def mutation(memio):
+ memio.truncate(1)
+ self._test_cow_mutation(mutation)
+
+ @support.cpython_only
+ def test_cow_write(self):
+ # Ensure write that would not cause a resize still results in a copy.
+ def mutation(memio):
+ memio.seek(0)
+ memio.write(b'foo')
+ self._test_cow_mutation(mutation)
+
+ @support.cpython_only
+ def test_cow_setstate(self):
+ # __setstate__ should cause buffer to be released.
+ memio = self.ioclass(b'foooooo')
+ state = memio.__getstate__()
+ def mutation(memio):
+ memio.__setstate__(state)
+ self._test_cow_mutation(mutation)
+
+ @support.cpython_only
+ def test_cow_mutable(self):
+ # BytesIO should accept only Bytes for copy-on-write sharing, since
+ # arbitrary buffer-exporting objects like bytearray() aren't guaranteed
+ # to be immutable.
+ ba = bytearray(1024)
+ old_rc = sys.getrefcount(ba)
+ memio = self.ioclass(ba)
+ self.assertEqual(sys.getrefcount(ba), old_rc)
class CStringIOTest(PyStringIOTest):
ioclass = io.StringIO
@@ -783,10 +838,5 @@ class CStringIOPickleTest(PyStringIOPickleTest):
pass
-def test_main():
- tests = [PyBytesIOTest, PyStringIOTest, CBytesIOTest, CStringIOTest,
- PyStringIOPickleTest, CStringIOPickleTest]
- support.run_unittest(*tests)
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_memoryview.py b/Lib/test/test_memoryview.py
index 4bc31330b7..ddd5b9a8e2 100644
--- a/Lib/test/test_memoryview.py
+++ b/Lib/test/test_memoryview.py
@@ -11,6 +11,8 @@ import gc
import weakref
import array
import io
+import copy
+import pickle
class AbstractMemoryTests:
@@ -369,12 +371,12 @@ class AbstractMemoryTests:
d = memoryview(b)
del b
-
+
self.assertEqual(c[0], 256)
self.assertEqual(d[0], 256)
self.assertEqual(c.format, "H")
self.assertEqual(d.format, "H")
-
+
_ = m.cast('I')
self.assertEqual(c[0], 256)
self.assertEqual(d[0], 256)
@@ -492,8 +494,44 @@ class ArrayMemorySliceSliceTest(unittest.TestCase,
pass
-def test_main():
- test.support.run_unittest(__name__)
+class OtherTest(unittest.TestCase):
+ def test_ctypes_cast(self):
+ # Issue 15944: Allow all source formats when casting to bytes.
+ ctypes = test.support.import_module("ctypes")
+ p6 = bytes(ctypes.c_double(0.6))
+
+ d = ctypes.c_double()
+ m = memoryview(d).cast("B")
+ m[:2] = p6[:2]
+ m[2:] = p6[2:]
+ self.assertEqual(d.value, 0.6)
+
+ for format in "Bbc":
+ with self.subTest(format):
+ d = ctypes.c_double()
+ m = memoryview(d).cast(format)
+ m[:2] = memoryview(p6).cast(format)[:2]
+ m[2:] = memoryview(p6).cast(format)[2:]
+ self.assertEqual(d.value, 0.6)
+
+ def test_memoryview_hex(self):
+ # Issue #9951: memoryview.hex() segfaults with non-contiguous buffers.
+ x = b'0' * 200000
+ m1 = memoryview(x)
+ m2 = m1[::-1]
+ self.assertEqual(m2.hex(), '30' * 200000)
+
+ def test_copy(self):
+ m = memoryview(b'abc')
+ with self.assertRaises(TypeError):
+ copy.copy(m)
+
+ def test_pickle(self):
+ m = memoryview(b'abc')
+ for proto in range(pickle.HIGHEST_PROTOCOL + 1):
+ with self.assertRaises(TypeError):
+ pickle.dumps(m, proto)
+
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_mimetypes.py b/Lib/test/test_mimetypes.py
index 0b53032d39..68565930a4 100644
--- a/Lib/test/test_mimetypes.py
+++ b/Lib/test/test_mimetypes.py
@@ -101,11 +101,5 @@ class Win32MimeTypesTestCase(unittest.TestCase):
eq(self.db.guess_type("image.jpg"), ("image/jpeg", None))
eq(self.db.guess_type("image.png"), ("image/png", None))
-def test_main():
- support.run_unittest(MimeTypesTestCase,
- Win32MimeTypesTestCase
- )
-
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_minidom.py b/Lib/test/test_minidom.py
index f64f43803e..ee8c04160a 100644
--- a/Lib/test/test_minidom.py
+++ b/Lib/test/test_minidom.py
@@ -2,7 +2,7 @@
import copy
import pickle
-from test.support import run_unittest, findfile
+from test.support import findfile
import unittest
import xml.dom.minidom
@@ -57,6 +57,21 @@ class MinidomTest(unittest.TestCase):
t = node.wholeText
self.confirm(t == s, "looking for %r, found %r" % (s, t))
+ def testDocumentAsyncAttr(self):
+ doc = Document()
+ self.assertFalse(doc.async_)
+ with self.assertWarns(DeprecationWarning):
+ self.assertFalse(getattr(doc, 'async', True))
+ with self.assertWarns(DeprecationWarning):
+ setattr(doc, 'async', True)
+ with self.assertWarns(DeprecationWarning):
+ self.assertTrue(getattr(doc, 'async', False))
+ self.assertTrue(doc.async_)
+
+ self.assertFalse(Document.async_)
+ with self.assertWarns(DeprecationWarning):
+ self.assertFalse(getattr(Document, 'async', True))
+
def testParseFromBinaryFile(self):
with open(tstfile, 'rb') as file:
dom = parse(file)
@@ -1555,8 +1570,5 @@ class MinidomTest(unittest.TestCase):
pi = doc.createProcessingInstruction("y", "z")
pi.nodeValue = "crash"
-def test_main():
- run_unittest(MinidomTest)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_mmap.py b/Lib/test/test_mmap.py
index ad93a59383..b365d84865 100644
--- a/Lib/test/test_mmap.py
+++ b/Lib/test/test_mmap.py
@@ -282,6 +282,7 @@ class MmapTests(unittest.TestCase):
self.assertEqual(m.find(b'one', 1), 8)
self.assertEqual(m.find(b'one', 1, -1), 8)
self.assertEqual(m.find(b'one', 1, -2), -1)
+ self.assertEqual(m.find(bytearray(b'one')), 0)
def test_rfind(self):
@@ -300,6 +301,7 @@ class MmapTests(unittest.TestCase):
self.assertEqual(m.rfind(b'one', 0, -2), 0)
self.assertEqual(m.rfind(b'one', 1, -1), 8)
self.assertEqual(m.rfind(b'one', 1, -2), -1)
+ self.assertEqual(m.rfind(bytearray(b'one')), 8)
def test_double_close(self):
@@ -601,8 +603,10 @@ class MmapTests(unittest.TestCase):
m.write(b"bar")
self.assertEqual(m.tell(), 6)
self.assertEqual(m[:], b"012bar6789")
- m.seek(8)
- self.assertRaises(ValueError, m.write, b"bar")
+ m.write(bytearray(b"baz"))
+ self.assertEqual(m.tell(), 9)
+ self.assertEqual(m[:], b"012barbaz9")
+ self.assertRaises(ValueError, m.write, b"ba")
def test_non_ascii_byte(self):
for b in (129, 200, 255): # > 128
@@ -726,7 +730,7 @@ class LargeMmapTests(unittest.TestCase):
f.seek(num_zeroes)
f.write(tail)
f.flush()
- except (OSError, OverflowError):
+ except (OSError, OverflowError, ValueError):
try:
f.close()
except (OSError, OverflowError):
diff --git a/Lib/test/test_module.py b/Lib/test/test_module.py
index 1230293670..ea6e89733b 100644
--- a/Lib/test/test_module.py
+++ b/Lib/test/test_module.py
@@ -1,8 +1,8 @@
# Test the module type
import unittest
import weakref
-from test.support import run_unittest, gc_collect
-from test.script_helper import assert_python_ok
+from test.support import gc_collect
+from test.support.script_helper import assert_python_ok
import sys
ModuleType = type(sys)
@@ -30,6 +30,22 @@ class ModuleTests(unittest.TestCase):
pass
self.assertEqual(foo.__doc__, ModuleType.__doc__)
+ def test_uninitialized_missing_getattr(self):
+ # Issue 8297
+ # test the text in the AttributeError of an uninitialized module
+ foo = ModuleType.__new__(ModuleType)
+ self.assertRaisesRegex(
+ AttributeError, "module has no attribute 'not_here'",
+ getattr, foo, "not_here")
+
+ def test_missing_getattr(self):
+ # Issue 8297
+ # test the text in the AttributeError
+ foo = ModuleType("foo")
+ self.assertRaisesRegex(
+ AttributeError, "module 'foo' has no attribute 'not_here'",
+ getattr, foo, "not_here")
+
def test_no_docstring(self):
# Regularly initialized module, no docstring
foo = ModuleType("foo")
@@ -211,12 +227,16 @@ a = A(destroyed)"""
b"len = len",
b"shutil.rmtree = rmtree"})
- # frozen and namespace module reprs are tested in importlib.
-
+ def test_descriptor_errors_propagate(self):
+ class Descr:
+ def __get__(self, o, t):
+ raise RuntimeError
+ class M(ModuleType):
+ melon = Descr()
+ self.assertRaises(RuntimeError, getattr, M("mymod"), "melon")
-def test_main():
- run_unittest(ModuleTests)
+ # frozen and namespace module reprs are tested in importlib.
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_modulefinder.py b/Lib/test/test_modulefinder.py
index 4c49e9aeaf..e4df2a90d4 100644
--- a/Lib/test/test_modulefinder.py
+++ b/Lib/test/test_modulefinder.py
@@ -319,6 +319,19 @@ class ModuleFinderTest(unittest.TestCase):
expected = "co_filename %r changed to %r" % (old_path, new_path)
self.assertIn(expected, output)
+ def test_extended_opargs(self):
+ extended_opargs_test = [
+ "a",
+ ["a", "b"],
+ [], [],
+ """\
+a.py
+ %r
+ import b
+b.py
+""" % list(range(2**16))] # 2**16 constants
+ self._do_test(extended_opargs_test)
+
if __name__ == "__main__":
unittest.main()
diff --git a/Lib/test/test_msilib.py b/Lib/test/test_msilib.py
index ccdaec76ed..8ef334fdb3 100644
--- a/Lib/test/test_msilib.py
+++ b/Lib/test/test_msilib.py
@@ -1,7 +1,7 @@
""" Test suite for the code in msilib """
import unittest
import os
-from test.support import run_unittest, import_module
+from test.support import import_module
msilib = import_module('msilib')
class Test_make_id(unittest.TestCase):
@@ -39,8 +39,5 @@ class Test_make_id(unittest.TestCase):
msilib.make_id(".s\x82o?*+rt"), "_.s_o___rt")
-def test_main():
- run_unittest(__name__)
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_multibytecodec.py b/Lib/test/test_multibytecodec.py
index 2929f988a8..8d7a213c16 100644
--- a/Lib/test/test_multibytecodec.py
+++ b/Lib/test/test_multibytecodec.py
@@ -67,7 +67,7 @@ class Test_MultibyteCodec(unittest.TestCase):
_multibytecodec.MultibyteStreamWriter, None)
def test_decode_unicode(self):
- # Trying to decode an unicode string should raise a TypeError
+ # Trying to decode a unicode string should raise a TypeError
for enc in ALL_CJKENCODINGS:
self.assertRaises(TypeError, codecs.getdecoder(enc), "")
@@ -160,7 +160,7 @@ class Test_IncrementalDecoder(unittest.TestCase):
self.assertEqual(decoder.decode(b'B@$'), '\u4e16')
def test_decode_unicode(self):
- # Trying to decode an unicode string should raise a TypeError
+ # Trying to decode a unicode string should raise a TypeError
for enc in ALL_CJKENCODINGS:
decoder = codecs.getincrementaldecoder(enc)()
self.assertRaises(TypeError, decoder.decode, "")
diff --git a/Lib/test/test_multiprocessing_main_handling.py b/Lib/test/test_multiprocessing_main_handling.py
index de5f782ee4..52273ea22d 100644
--- a/Lib/test/test_multiprocessing_main_handling.py
+++ b/Lib/test/test_multiprocessing_main_handling.py
@@ -13,10 +13,9 @@ import os
import os.path
import py_compile
-from test.script_helper import (
+from test.support.script_helper import (
make_pkg, make_script, make_zip_pkg, make_zip_script,
- assert_python_ok, assert_python_failure, temp_dir,
- spawn_python, kill_python)
+ assert_python_ok, assert_python_failure, spawn_python, kill_python)
# Look up which start methods are available to test
import multiprocessing
@@ -157,12 +156,12 @@ class MultiProcessingCmdLineMixin():
self._check_output(script_name, rc, out, err)
def test_basic_script(self):
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
script_name = _make_test_script(script_dir, 'script')
self._check_script(script_name)
def test_basic_script_no_suffix(self):
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
script_name = _make_test_script(script_dir, 'script',
omit_suffix=True)
self._check_script(script_name)
@@ -173,7 +172,7 @@ class MultiProcessingCmdLineMixin():
# a workaround for that case
# See https://github.com/ipython/ipython/issues/4698
source = test_source_main_skipped_in_children
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
script_name = _make_test_script(script_dir, 'ipython',
source=source)
self._check_script(script_name)
@@ -183,7 +182,7 @@ class MultiProcessingCmdLineMixin():
self._check_script(script_no_suffix)
def test_script_compiled(self):
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
script_name = _make_test_script(script_dir, 'script')
py_compile.compile(script_name, doraise=True)
os.remove(script_name)
@@ -192,14 +191,14 @@ class MultiProcessingCmdLineMixin():
def test_directory(self):
source = self.main_in_children_source
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
script_name = _make_test_script(script_dir, '__main__',
source=source)
self._check_script(script_dir)
def test_directory_compiled(self):
source = self.main_in_children_source
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
script_name = _make_test_script(script_dir, '__main__',
source=source)
py_compile.compile(script_name, doraise=True)
@@ -209,7 +208,7 @@ class MultiProcessingCmdLineMixin():
def test_zipfile(self):
source = self.main_in_children_source
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
script_name = _make_test_script(script_dir, '__main__',
source=source)
zip_name, run_name = make_zip_script(script_dir, 'test_zip', script_name)
@@ -217,7 +216,7 @@ class MultiProcessingCmdLineMixin():
def test_zipfile_compiled(self):
source = self.main_in_children_source
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
script_name = _make_test_script(script_dir, '__main__',
source=source)
compiled_name = py_compile.compile(script_name, doraise=True)
@@ -225,7 +224,7 @@ class MultiProcessingCmdLineMixin():
self._check_script(zip_name)
def test_module_in_package(self):
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
pkg_dir = os.path.join(script_dir, 'test_pkg')
make_pkg(pkg_dir)
script_name = _make_test_script(pkg_dir, 'check_sibling')
@@ -234,20 +233,20 @@ class MultiProcessingCmdLineMixin():
self._check_script(launch_name)
def test_module_in_package_in_zipfile(self):
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
zip_name, run_name = _make_test_zip_pkg(script_dir, 'test_zip', 'test_pkg', 'script')
launch_name = _make_launch_script(script_dir, 'launch', 'test_pkg.script', zip_name)
self._check_script(launch_name)
def test_module_in_subpackage_in_zipfile(self):
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
zip_name, run_name = _make_test_zip_pkg(script_dir, 'test_zip', 'test_pkg', 'script', depth=2)
launch_name = _make_launch_script(script_dir, 'launch', 'test_pkg.test_pkg.script', zip_name)
self._check_script(launch_name)
def test_package(self):
source = self.main_in_children_source
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
pkg_dir = os.path.join(script_dir, 'test_pkg')
make_pkg(pkg_dir)
script_name = _make_test_script(pkg_dir, '__main__',
@@ -257,7 +256,7 @@ class MultiProcessingCmdLineMixin():
def test_package_compiled(self):
source = self.main_in_children_source
- with temp_dir() as script_dir:
+ with support.temp_dir() as script_dir:
pkg_dir = os.path.join(script_dir, 'test_pkg')
make_pkg(pkg_dir)
script_name = _make_test_script(pkg_dir, '__main__',
diff --git a/Lib/test/test_nis.py b/Lib/test/test_nis.py
index a3a3c260e3..387a4e7856 100644
--- a/Lib/test/test_nis.py
+++ b/Lib/test/test_nis.py
@@ -36,8 +36,5 @@ class NisTests(unittest.TestCase):
if done:
break
-def test_main():
- support.run_unittest(NisTests)
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_nntplib.py b/Lib/test/test_nntplib.py
index ae3618ffbc..994532b61e 100644
--- a/Lib/test/test_nntplib.py
+++ b/Lib/test/test_nntplib.py
@@ -5,6 +5,7 @@ import textwrap
import unittest
import functools
import contextlib
+import os.path
from test import support
from nntplib import NNTP, GroupInfo
import nntplib
@@ -13,8 +14,13 @@ try:
import ssl
except ImportError:
ssl = None
+try:
+ import threading
+except ImportError:
+ threading = None
TIMEOUT = 30
+certfile = os.path.join(os.path.dirname(__file__), 'keycert3.pem')
# TODO:
# - test the `file` arg to more commands
@@ -202,24 +208,6 @@ class NetworkedNNTPTestsMixin:
resp, caps = self.server.capabilities()
_check_caps(caps)
- @unittest.skipUnless(ssl, 'requires SSL support')
- def test_starttls(self):
- file = self.server.file
- sock = self.server.sock
- try:
- self.server.starttls()
- except nntplib.NNTPPermanentError:
- self.skipTest("STARTTLS not supported by server.")
- else:
- # Check that the socket and internal pseudo-file really were
- # changed.
- self.assertNotEqual(file, self.server.file)
- self.assertNotEqual(sock, self.server.sock)
- # Check that the new socket really is an SSL one
- self.assertIsInstance(self.server.sock, ssl.SSLSocket)
- # Check that trying starttls when it's already active fails.
- self.assertRaises(ValueError, self.server.starttls)
-
def test_zlogin(self):
# This test must be the penultimate because further commands will be
# refused.
@@ -621,7 +609,7 @@ class NNTPv1Handler:
"\t\t6683\t16"
"\t"
"\n"
- # An UTF-8 overview line from fr.comp.lang.python
+ # A UTF-8 overview line from fr.comp.lang.python
"59\tRe: Message d'erreur incompréhensible (par moi)"
"\tEric Brunel <eric.brunel@pragmadev.nospam.com>"
"\tWed, 15 Sep 2010 18:09:15 +0200"
@@ -1520,6 +1508,64 @@ class MockSslTests(MockSocketTests):
def nntp_class(*pos, **kw):
return nntplib.NNTP_SSL(*pos, ssl_context=bypass_context, **kw)
+@unittest.skipUnless(threading, 'requires multithreading')
+class LocalServerTests(unittest.TestCase):
+ def setUp(self):
+ sock = socket.socket()
+ port = support.bind_port(sock)
+ sock.listen()
+ self.background = threading.Thread(
+ target=self.run_server, args=(sock,))
+ self.background.start()
+ self.addCleanup(self.background.join)
+
+ self.nntp = NNTP(support.HOST, port, usenetrc=False).__enter__()
+ self.addCleanup(self.nntp.__exit__, None, None, None)
+
+ def run_server(self, sock):
+ # Could be generalized to handle more commands in separate methods
+ with sock:
+ [client, _] = sock.accept()
+ with contextlib.ExitStack() as cleanup:
+ cleanup.enter_context(client)
+ reader = cleanup.enter_context(client.makefile('rb'))
+ client.sendall(b'200 Server ready\r\n')
+ while True:
+ cmd = reader.readline()
+ if cmd == b'CAPABILITIES\r\n':
+ client.sendall(
+ b'101 Capability list:\r\n'
+ b'VERSION 2\r\n'
+ b'STARTTLS\r\n'
+ b'.\r\n'
+ )
+ elif cmd == b'STARTTLS\r\n':
+ reader.close()
+ client.sendall(b'382 Begin TLS negotiation now\r\n')
+ client = ssl.wrap_socket(
+ client, server_side=True, certfile=certfile)
+ cleanup.enter_context(client)
+ reader = cleanup.enter_context(client.makefile('rb'))
+ elif cmd == b'QUIT\r\n':
+ client.sendall(b'205 Bye!\r\n')
+ break
+ else:
+ raise ValueError('Unexpected command {!r}'.format(cmd))
+
+ @unittest.skipUnless(ssl, 'requires SSL support')
+ def test_starttls(self):
+ file = self.nntp.file
+ sock = self.nntp.sock
+ self.nntp.starttls()
+ # Check that the socket and internal pseudo-file really were
+ # changed.
+ self.assertNotEqual(file, self.nntp.file)
+ self.assertNotEqual(sock, self.nntp.sock)
+ # Check that the new socket really is an SSL one
+ self.assertIsInstance(self.nntp.sock, ssl.SSLSocket)
+ # Check that trying starttls when it's already active fails.
+ self.assertRaises(ValueError, self.nntp.starttls)
+
if __name__ == "__main__":
unittest.main()
diff --git a/Lib/test/test_normalization.py b/Lib/test/test_normalization.py
index 5dac5db37e..30fa612645 100644
--- a/Lib/test/test_normalization.py
+++ b/Lib/test/test_normalization.py
@@ -1,4 +1,4 @@
-from test.support import run_unittest, open_urlresource
+from test.support import open_urlresource
import unittest
from http.client import HTTPException
@@ -97,8 +97,5 @@ class NormalizationTest(unittest.TestCase):
normalize('NFC', '\ud55c\uae00')
-def test_main():
- run_unittest(NormalizationTest)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_ntpath.py b/Lib/test/test_ntpath.py
index dacddded3d..580f2030a3 100644
--- a/Lib/test/test_ntpath.py
+++ b/Lib/test/test_ntpath.py
@@ -330,6 +330,75 @@ class TestNtpath(unittest.TestCase):
tester('ntpath.relpath("/a/b", "/a/b")', '.')
tester('ntpath.relpath("c:/foo", "C:/FOO")', '.')
+ def test_commonpath(self):
+ def check(paths, expected):
+ tester(('ntpath.commonpath(%r)' % paths).replace('\\\\', '\\'),
+ expected)
+ def check_error(exc, paths):
+ self.assertRaises(exc, ntpath.commonpath, paths)
+ self.assertRaises(exc, ntpath.commonpath,
+ [os.fsencode(p) for p in paths])
+
+ self.assertRaises(ValueError, ntpath.commonpath, [])
+ check_error(ValueError, ['C:\\Program Files', 'Program Files'])
+ check_error(ValueError, ['C:\\Program Files', 'C:Program Files'])
+ check_error(ValueError, ['\\Program Files', 'Program Files'])
+ check_error(ValueError, ['Program Files', 'C:\\Program Files'])
+ check(['C:\\Program Files'], 'C:\\Program Files')
+ check(['C:\\Program Files', 'C:\\Program Files'], 'C:\\Program Files')
+ check(['C:\\Program Files\\', 'C:\\Program Files'],
+ 'C:\\Program Files')
+ check(['C:\\Program Files\\', 'C:\\Program Files\\'],
+ 'C:\\Program Files')
+ check(['C:\\\\Program Files', 'C:\\Program Files\\\\'],
+ 'C:\\Program Files')
+ check(['C:\\.\\Program Files', 'C:\\Program Files\\.'],
+ 'C:\\Program Files')
+ check(['C:\\', 'C:\\bin'], 'C:\\')
+ check(['C:\\Program Files', 'C:\\bin'], 'C:\\')
+ check(['C:\\Program Files', 'C:\\Program Files\\Bar'],
+ 'C:\\Program Files')
+ check(['C:\\Program Files\\Foo', 'C:\\Program Files\\Bar'],
+ 'C:\\Program Files')
+ check(['C:\\Program Files', 'C:\\Projects'], 'C:\\')
+ check(['C:\\Program Files\\', 'C:\\Projects'], 'C:\\')
+
+ check(['C:\\Program Files\\Foo', 'C:/Program Files/Bar'],
+ 'C:\\Program Files')
+ check(['C:\\Program Files\\Foo', 'c:/program files/bar'],
+ 'C:\\Program Files')
+ check(['c:/program files/bar', 'C:\\Program Files\\Foo'],
+ 'c:\\program files')
+
+ check_error(ValueError, ['C:\\Program Files', 'D:\\Program Files'])
+
+ check(['spam'], 'spam')
+ check(['spam', 'spam'], 'spam')
+ check(['spam', 'alot'], '')
+ check(['and\\jam', 'and\\spam'], 'and')
+ check(['and\\\\jam', 'and\\spam\\\\'], 'and')
+ check(['and\\.\\jam', '.\\and\\spam'], 'and')
+ check(['and\\jam', 'and\\spam', 'alot'], '')
+ check(['and\\jam', 'and\\spam', 'and'], 'and')
+ check(['C:and\\jam', 'C:and\\spam'], 'C:and')
+
+ check([''], '')
+ check(['', 'spam\\alot'], '')
+ check_error(ValueError, ['', '\\spam\\alot'])
+
+ self.assertRaises(TypeError, ntpath.commonpath,
+ [b'C:\\Program Files', 'C:\\Program Files\\Foo'])
+ self.assertRaises(TypeError, ntpath.commonpath,
+ [b'C:\\Program Files', 'Program Files\\Foo'])
+ self.assertRaises(TypeError, ntpath.commonpath,
+ [b'Program Files', 'C:\\Program Files\\Foo'])
+ self.assertRaises(TypeError, ntpath.commonpath,
+ ['C:\\Program Files', b'C:\\Program Files\\Foo'])
+ self.assertRaises(TypeError, ntpath.commonpath,
+ ['C:\\Program Files', b'Program Files\\Foo'])
+ self.assertRaises(TypeError, ntpath.commonpath,
+ ['Program Files', b'C:\\Program Files\\Foo'])
+
def test_sameopenfile(self):
with TemporaryFile() as tf1, TemporaryFile() as tf2:
# Make sure the same file is really the same
diff --git a/Lib/test/test_numeric_tower.py b/Lib/test/test_numeric_tower.py
index 3423d4e526..c54dedb8b7 100644
--- a/Lib/test/test_numeric_tower.py
+++ b/Lib/test/test_numeric_tower.py
@@ -5,7 +5,6 @@ import random
import math
import sys
import operator
-from test.support import run_unittest
from decimal import Decimal as D
from fractions import Fraction as F
@@ -199,8 +198,5 @@ class ComparisonTest(unittest.TestCase):
self.assertRaises(TypeError, op, v, z)
-def test_main():
- run_unittest(HashTest, ComparisonTest)
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_opcodes.py b/Lib/test/test_opcodes.py
index f510bac9f0..6ef93d9500 100644
--- a/Lib/test/test_opcodes.py
+++ b/Lib/test/test_opcodes.py
@@ -1,6 +1,5 @@
# Python test set -- part 2, opcodes
-from test.support import run_unittest
import unittest
class OpcodeTest(unittest.TestCase):
@@ -105,8 +104,5 @@ class OpcodeTest(unittest.TestCase):
self.assertEqual(MyString() % 3, 42)
-def test_main():
- run_unittest(OpcodeTest)
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_openpty.py b/Lib/test/test_openpty.py
index 47851072c1..3f46a60402 100644
--- a/Lib/test/test_openpty.py
+++ b/Lib/test/test_openpty.py
@@ -1,7 +1,6 @@
# Test to see if openpty works. (But don't worry if it isn't available.)
import os, unittest
-from test.support import run_unittest
if not hasattr(os, "openpty"):
raise unittest.SkipTest("os.openpty() not available.")
@@ -18,8 +17,5 @@ class OpenptyTest(unittest.TestCase):
os.write(slave, b'Ping!')
self.assertEqual(os.read(master, 1024), b'Ping!')
-def test_main():
- run_unittest(OpenptyTest)
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_operator.py b/Lib/test/test_operator.py
index ab58a98365..b5ba97625f 100644
--- a/Lib/test/test_operator.py
+++ b/Lib/test/test_operator.py
@@ -1,4 +1,6 @@
import unittest
+import pickle
+import sys
from test import support
@@ -203,6 +205,15 @@ class OperatorTestCase:
self.assertRaises(TypeError, operator.mul, None, None)
self.assertTrue(operator.mul(5, 2) == 10)
+ def test_matmul(self):
+ operator = self.module
+ self.assertRaises(TypeError, operator.matmul)
+ self.assertRaises(TypeError, operator.matmul, 42, 42)
+ class M:
+ def __matmul__(self, other):
+ return other - 1
+ self.assertEqual(M() @ 42, 41)
+
def test_neg(self):
operator = self.module
self.assertRaises(TypeError, operator.neg)
@@ -307,6 +318,9 @@ class OperatorTestCase:
a.name = 'arthur'
f = operator.attrgetter('name')
self.assertEqual(f(a), 'arthur')
+ self.assertRaises(TypeError, f)
+ self.assertRaises(TypeError, f, a, 'dent')
+ self.assertRaises(TypeError, f, a, surname='dent')
f = operator.attrgetter('rank')
self.assertRaises(AttributeError, f, a)
self.assertRaises(TypeError, operator.attrgetter, 2)
@@ -354,6 +368,9 @@ class OperatorTestCase:
a = 'ABCDE'
f = operator.itemgetter(2)
self.assertEqual(f(a), 'C')
+ self.assertRaises(TypeError, f)
+ self.assertRaises(TypeError, f, a, 3)
+ self.assertRaises(TypeError, f, a, size=3)
f = operator.itemgetter(10)
self.assertRaises(IndexError, f, a)
@@ -387,6 +404,7 @@ class OperatorTestCase:
def test_methodcaller(self):
operator = self.module
self.assertRaises(TypeError, operator.methodcaller)
+ self.assertRaises(TypeError, operator.methodcaller, 12)
class A:
def foo(self, *args, **kwds):
return args[0] + args[1]
@@ -399,6 +417,9 @@ class OperatorTestCase:
self.assertRaises(IndexError, f, a)
f = operator.methodcaller('foo', 1, 2)
self.assertEqual(f(a), 3)
+ self.assertRaises(TypeError, f)
+ self.assertRaises(TypeError, f, a, 3)
+ self.assertRaises(TypeError, f, a, spam=3)
f = operator.methodcaller('bar')
self.assertEqual(f(a), 42)
self.assertRaises(TypeError, f, a, a)
@@ -416,6 +437,7 @@ class OperatorTestCase:
def __ilshift__ (self, other): return "ilshift"
def __imod__ (self, other): return "imod"
def __imul__ (self, other): return "imul"
+ def __imatmul__ (self, other): return "imatmul"
def __ior__ (self, other): return "ior"
def __ipow__ (self, other): return "ipow"
def __irshift__ (self, other): return "irshift"
@@ -430,6 +452,7 @@ class OperatorTestCase:
self.assertEqual(operator.ilshift (c, 5), "ilshift")
self.assertEqual(operator.imod (c, 5), "imod")
self.assertEqual(operator.imul (c, 5), "imul")
+ self.assertEqual(operator.imatmul (c, 5), "imatmul")
self.assertEqual(operator.ior (c, 5), "ior")
self.assertEqual(operator.ipow (c, 5), "ipow")
self.assertEqual(operator.irshift (c, 5), "irshift")
@@ -480,5 +503,107 @@ class PyOperatorTestCase(OperatorTestCase, unittest.TestCase):
class COperatorTestCase(OperatorTestCase, unittest.TestCase):
module = c_operator
+
+class OperatorPickleTestCase:
+ def copy(self, obj, proto):
+ with support.swap_item(sys.modules, 'operator', self.module):
+ pickled = pickle.dumps(obj, proto)
+ with support.swap_item(sys.modules, 'operator', self.module2):
+ return pickle.loads(pickled)
+
+ def test_attrgetter(self):
+ attrgetter = self.module.attrgetter
+ class A:
+ pass
+ a = A()
+ a.x = 'X'
+ a.y = 'Y'
+ a.z = 'Z'
+ a.t = A()
+ a.t.u = A()
+ a.t.u.v = 'V'
+ for proto in range(pickle.HIGHEST_PROTOCOL + 1):
+ with self.subTest(proto=proto):
+ f = attrgetter('x')
+ f2 = self.copy(f, proto)
+ self.assertEqual(repr(f2), repr(f))
+ self.assertEqual(f2(a), f(a))
+ # multiple gets
+ f = attrgetter('x', 'y', 'z')
+ f2 = self.copy(f, proto)
+ self.assertEqual(repr(f2), repr(f))
+ self.assertEqual(f2(a), f(a))
+ # recursive gets
+ f = attrgetter('t.u.v')
+ f2 = self.copy(f, proto)
+ self.assertEqual(repr(f2), repr(f))
+ self.assertEqual(f2(a), f(a))
+
+ def test_itemgetter(self):
+ itemgetter = self.module.itemgetter
+ a = 'ABCDE'
+ for proto in range(pickle.HIGHEST_PROTOCOL + 1):
+ with self.subTest(proto=proto):
+ f = itemgetter(2)
+ f2 = self.copy(f, proto)
+ self.assertEqual(repr(f2), repr(f))
+ self.assertEqual(f2(a), f(a))
+ # multiple gets
+ f = itemgetter(2, 0, 4)
+ f2 = self.copy(f, proto)
+ self.assertEqual(repr(f2), repr(f))
+ self.assertEqual(f2(a), f(a))
+
+ def test_methodcaller(self):
+ methodcaller = self.module.methodcaller
+ class A:
+ def foo(self, *args, **kwds):
+ return args[0] + args[1]
+ def bar(self, f=42):
+ return f
+ def baz(*args, **kwds):
+ return kwds['name'], kwds['self']
+ a = A()
+ for proto in range(pickle.HIGHEST_PROTOCOL + 1):
+ with self.subTest(proto=proto):
+ f = methodcaller('bar')
+ f2 = self.copy(f, proto)
+ self.assertEqual(repr(f2), repr(f))
+ self.assertEqual(f2(a), f(a))
+ # positional args
+ f = methodcaller('foo', 1, 2)
+ f2 = self.copy(f, proto)
+ self.assertEqual(repr(f2), repr(f))
+ self.assertEqual(f2(a), f(a))
+ # keyword args
+ f = methodcaller('bar', f=5)
+ f2 = self.copy(f, proto)
+ self.assertEqual(repr(f2), repr(f))
+ self.assertEqual(f2(a), f(a))
+ f = methodcaller('baz', self='eggs', name='spam')
+ f2 = self.copy(f, proto)
+ # Can't test repr consistently with multiple keyword args
+ self.assertEqual(f2(a), f(a))
+
+class PyPyOperatorPickleTestCase(OperatorPickleTestCase, unittest.TestCase):
+ module = py_operator
+ module2 = py_operator
+
+@unittest.skipUnless(c_operator, 'requires _operator')
+class PyCOperatorPickleTestCase(OperatorPickleTestCase, unittest.TestCase):
+ module = py_operator
+ module2 = c_operator
+
+@unittest.skipUnless(c_operator, 'requires _operator')
+class CPyOperatorPickleTestCase(OperatorPickleTestCase, unittest.TestCase):
+ module = c_operator
+ module2 = py_operator
+
+@unittest.skipUnless(c_operator, 'requires _operator')
+class CCOperatorPickleTestCase(OperatorPickleTestCase, unittest.TestCase):
+ module = c_operator
+ module2 = c_operator
+
+
if __name__ == "__main__":
unittest.main()
diff --git a/Lib/test/test_ordered_dict.py b/Lib/test/test_ordered_dict.py
index 6d3e309284..901d4b2ad2 100644
--- a/Lib/test/test_ordered_dict.py
+++ b/Lib/test/test_ordered_dict.py
@@ -1,17 +1,34 @@
import contextlib
import copy
+import gc
import pickle
-from random import shuffle
+from random import randrange, shuffle
+import struct
import sys
import unittest
-from collections import OrderedDict
+import weakref
from collections.abc import MutableMapping
from test import mapping_tests, support
-class TestOrderedDict(unittest.TestCase):
+py_coll = support.import_fresh_module('collections', blocked=['_collections'])
+c_coll = support.import_fresh_module('collections', fresh=['_collections'])
+
+
+@contextlib.contextmanager
+def replaced_module(name, replacement):
+ original_module = sys.modules[name]
+ sys.modules[name] = replacement
+ try:
+ yield
+ finally:
+ sys.modules[name] = original_module
+
+
+class OrderedDictTests:
def test_init(self):
+ OrderedDict = self.OrderedDict
with self.assertRaises(TypeError):
OrderedDict([('a', 1), ('b', 2)], None) # too many args
pairs = [('a', 1), ('b', 2), ('c', 3), ('d', 4), ('e', 5)]
@@ -35,6 +52,7 @@ class TestOrderedDict(unittest.TestCase):
[('a', 1), ('b', 2), ('c', 3), ('d', 4), ('e', 5), ('f', 6), ('g', 7)])
def test_update(self):
+ OrderedDict = self.OrderedDict
with self.assertRaises(TypeError):
OrderedDict().update([('a', 1), ('b', 2)], None) # too many args
pairs = [('a', 1), ('b', 2), ('c', 3), ('d', 4), ('e', 5)]
@@ -75,11 +93,26 @@ class TestOrderedDict(unittest.TestCase):
self.assertRaises(TypeError, OrderedDict().update, (), ())
self.assertRaises(TypeError, OrderedDict.update)
+ self.assertRaises(TypeError, OrderedDict().update, 42)
+ self.assertRaises(TypeError, OrderedDict().update, (), ())
+ self.assertRaises(TypeError, OrderedDict.update)
+
+ def test_fromkeys(self):
+ OrderedDict = self.OrderedDict
+ od = OrderedDict.fromkeys('abc')
+ self.assertEqual(list(od.items()), [(c, None) for c in 'abc'])
+ od = OrderedDict.fromkeys('abc', value=None)
+ self.assertEqual(list(od.items()), [(c, None) for c in 'abc'])
+ od = OrderedDict.fromkeys('abc', value=0)
+ self.assertEqual(list(od.items()), [(c, 0) for c in 'abc'])
+
def test_abc(self):
+ OrderedDict = self.OrderedDict
self.assertIsInstance(OrderedDict(), MutableMapping)
self.assertTrue(issubclass(OrderedDict, MutableMapping))
def test_clear(self):
+ OrderedDict = self.OrderedDict
pairs = [('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)]
shuffle(pairs)
od = OrderedDict(pairs)
@@ -88,6 +121,7 @@ class TestOrderedDict(unittest.TestCase):
self.assertEqual(len(od), 0)
def test_delitem(self):
+ OrderedDict = self.OrderedDict
pairs = [('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)]
od = OrderedDict(pairs)
del od['a']
@@ -97,6 +131,7 @@ class TestOrderedDict(unittest.TestCase):
self.assertEqual(list(od.items()), pairs[:2] + pairs[3:])
def test_setitem(self):
+ OrderedDict = self.OrderedDict
od = OrderedDict([('d', 1), ('b', 2), ('c', 3), ('a', 4), ('e', 5)])
od['c'] = 10 # existing element
od['f'] = 20 # new element
@@ -104,6 +139,7 @@ class TestOrderedDict(unittest.TestCase):
[('d', 1), ('b', 2), ('c', 10), ('a', 4), ('e', 5), ('f', 20)])
def test_iterators(self):
+ OrderedDict = self.OrderedDict
pairs = [('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)]
shuffle(pairs)
od = OrderedDict(pairs)
@@ -113,8 +149,51 @@ class TestOrderedDict(unittest.TestCase):
self.assertEqual(list(od.items()), pairs)
self.assertEqual(list(reversed(od)),
[t[0] for t in reversed(pairs)])
+ self.assertEqual(list(reversed(od.keys())),
+ [t[0] for t in reversed(pairs)])
+ self.assertEqual(list(reversed(od.values())),
+ [t[1] for t in reversed(pairs)])
+ self.assertEqual(list(reversed(od.items())), list(reversed(pairs)))
+
+ def test_detect_deletion_during_iteration(self):
+ OrderedDict = self.OrderedDict
+ od = OrderedDict.fromkeys('abc')
+ it = iter(od)
+ key = next(it)
+ del od[key]
+ with self.assertRaises(Exception):
+ # Note, the exact exception raised is not guaranteed
+ # The only guarantee that the next() will not succeed
+ next(it)
+
+ def test_sorted_iterators(self):
+ OrderedDict = self.OrderedDict
+ with self.assertRaises(TypeError):
+ OrderedDict([('a', 1), ('b', 2)], None)
+ pairs = [('a', 1), ('b', 2), ('c', 3), ('d', 4), ('e', 5)]
+ od = OrderedDict(pairs)
+ self.assertEqual(sorted(od), [t[0] for t in pairs])
+ self.assertEqual(sorted(od.keys()), [t[0] for t in pairs])
+ self.assertEqual(sorted(od.values()), [t[1] for t in pairs])
+ self.assertEqual(sorted(od.items()), pairs)
+ self.assertEqual(sorted(reversed(od)),
+ sorted([t[0] for t in reversed(pairs)]))
+
+ def test_iterators_empty(self):
+ OrderedDict = self.OrderedDict
+ od = OrderedDict()
+ empty = []
+ self.assertEqual(list(od), empty)
+ self.assertEqual(list(od.keys()), empty)
+ self.assertEqual(list(od.values()), empty)
+ self.assertEqual(list(od.items()), empty)
+ self.assertEqual(list(reversed(od)), empty)
+ self.assertEqual(list(reversed(od.keys())), empty)
+ self.assertEqual(list(reversed(od.values())), empty)
+ self.assertEqual(list(reversed(od.items())), empty)
def test_popitem(self):
+ OrderedDict = self.OrderedDict
pairs = [('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)]
shuffle(pairs)
od = OrderedDict(pairs)
@@ -124,7 +203,19 @@ class TestOrderedDict(unittest.TestCase):
od.popitem()
self.assertEqual(len(od), 0)
+ def test_popitem_last(self):
+ OrderedDict = self.OrderedDict
+ pairs = [(i, i) for i in range(30)]
+
+ obj = OrderedDict(pairs)
+ for i in range(8):
+ obj.popitem(True)
+ obj.popitem(True)
+ obj.popitem(last=True)
+ self.assertEqual(len(obj), 20)
+
def test_pop(self):
+ OrderedDict = self.OrderedDict
pairs = [('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)]
shuffle(pairs)
od = OrderedDict(pairs)
@@ -145,10 +236,12 @@ class TestOrderedDict(unittest.TestCase):
self.assertEqual(m.pop('b', 5), 5)
self.assertEqual(m.pop('a', 6), 1)
self.assertEqual(m.pop('a', 6), 6)
+ self.assertEqual(m.pop('a', default=6), 6)
with self.assertRaises(KeyError):
m.pop('a')
def test_equality(self):
+ OrderedDict = self.OrderedDict
pairs = [('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)]
shuffle(pairs)
od1 = OrderedDict(pairs)
@@ -164,6 +257,7 @@ class TestOrderedDict(unittest.TestCase):
self.assertNotEqual(od1, OrderedDict(pairs[:-1]))
def test_copying(self):
+ OrderedDict = self.OrderedDict
# Check that ordered dicts are copyable, deepcopyable, picklable,
# and have a repr/eval round-trip
pairs = [('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)]
@@ -172,12 +266,17 @@ class TestOrderedDict(unittest.TestCase):
msg = "\ncopy: %s\nod: %s" % (dup, od)
self.assertIsNot(dup, od, msg)
self.assertEqual(dup, od)
+ self.assertEqual(list(dup.items()), list(od.items()))
+ self.assertEqual(len(dup), len(od))
+ self.assertEqual(type(dup), type(od))
check(od.copy())
check(copy.copy(od))
check(copy.deepcopy(od))
- for proto in range(pickle.HIGHEST_PROTOCOL + 1):
- with self.subTest(proto=proto):
- check(pickle.loads(pickle.dumps(od, proto)))
+ # pickle directly pulls the module, so we have to fake it
+ with replaced_module('collections', self.module):
+ for proto in range(pickle.HIGHEST_PROTOCOL + 1):
+ with self.subTest(proto=proto):
+ check(pickle.loads(pickle.dumps(od, proto)))
check(eval(repr(od)))
update_test = OrderedDict()
update_test.update(od)
@@ -185,6 +284,7 @@ class TestOrderedDict(unittest.TestCase):
check(OrderedDict(od))
def test_yaml_linkage(self):
+ OrderedDict = self.OrderedDict
# Verify that __reduce__ is setup in a way that supports PyYAML's dump() feature.
# In yaml, lists are native but tuples are not.
pairs = [('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)]
@@ -194,6 +294,7 @@ class TestOrderedDict(unittest.TestCase):
self.assertTrue(all(type(pair)==list for pair in od.__reduce__()[1]))
def test_reduce_not_too_fat(self):
+ OrderedDict = self.OrderedDict
# do not save instance dictionary if not needed
pairs = [('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)]
od = OrderedDict(pairs)
@@ -202,15 +303,20 @@ class TestOrderedDict(unittest.TestCase):
self.assertIsNotNone(od.__reduce__()[2])
def test_pickle_recursive(self):
+ OrderedDict = self.OrderedDict
od = OrderedDict()
od[1] = od
- for proto in range(-1, pickle.HIGHEST_PROTOCOL + 1):
- dup = pickle.loads(pickle.dumps(od, proto))
- self.assertIsNot(dup, od)
- self.assertEqual(list(dup.keys()), [1])
- self.assertIs(dup[1], dup)
+
+ # pickle directly pulls the module, so we have to fake it
+ with replaced_module('collections', self.module):
+ for proto in range(-1, pickle.HIGHEST_PROTOCOL + 1):
+ dup = pickle.loads(pickle.dumps(od, proto))
+ self.assertIsNot(dup, od)
+ self.assertEqual(list(dup.keys()), [1])
+ self.assertIs(dup[1], dup)
def test_repr(self):
+ OrderedDict = self.OrderedDict
od = OrderedDict([('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)])
self.assertEqual(repr(od),
"OrderedDict([('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)])")
@@ -218,6 +324,7 @@ class TestOrderedDict(unittest.TestCase):
self.assertEqual(repr(OrderedDict()), "OrderedDict()")
def test_repr_recursive(self):
+ OrderedDict = self.OrderedDict
# See issue #9826
od = OrderedDict.fromkeys('abc')
od['x'] = od
@@ -225,6 +332,7 @@ class TestOrderedDict(unittest.TestCase):
"OrderedDict([('a', None), ('b', None), ('c', None), ('x', ...)])")
def test_setdefault(self):
+ OrderedDict = self.OrderedDict
pairs = [('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)]
shuffle(pairs)
od = OrderedDict(pairs)
@@ -235,6 +343,7 @@ class TestOrderedDict(unittest.TestCase):
self.assertEqual(od.setdefault('x', 10), 10)
# make sure 'x' is added to the end
self.assertEqual(list(od.items())[-1], ('x', 10))
+ self.assertEqual(od.setdefault('g', default=9), 9)
# make sure setdefault still works when __missing__ is defined
class Missing(OrderedDict):
@@ -243,16 +352,19 @@ class TestOrderedDict(unittest.TestCase):
self.assertEqual(Missing().setdefault(5, 9), 9)
def test_reinsert(self):
+ OrderedDict = self.OrderedDict
# Given insert a, insert b, delete a, re-insert a,
# verify that a is now later than b.
od = OrderedDict()
od['a'] = 1
od['b'] = 2
del od['a']
+ self.assertEqual(list(od.items()), [('b', 2)])
od['a'] = 1
self.assertEqual(list(od.items()), [('b', 2), ('a', 1)])
def test_move_to_end(self):
+ OrderedDict = self.OrderedDict
od = OrderedDict.fromkeys('abcde')
self.assertEqual(list(od), list('abcde'))
od.move_to_end('c')
@@ -263,16 +375,36 @@ class TestOrderedDict(unittest.TestCase):
self.assertEqual(list(od), list('cabde'))
od.move_to_end('e')
self.assertEqual(list(od), list('cabde'))
+ od.move_to_end('b', last=False)
+ self.assertEqual(list(od), list('bcade'))
with self.assertRaises(KeyError):
od.move_to_end('x')
+ with self.assertRaises(KeyError):
+ od.move_to_end('x', 0)
+
+ def test_move_to_end_issue25406(self):
+ OrderedDict = self.OrderedDict
+ od = OrderedDict.fromkeys('abc')
+ od.move_to_end('c', last=False)
+ self.assertEqual(list(od), list('cab'))
+ od.move_to_end('a', last=False)
+ self.assertEqual(list(od), list('acb'))
+
+ od = OrderedDict.fromkeys('abc')
+ od.move_to_end('a')
+ self.assertEqual(list(od), list('bca'))
+ od.move_to_end('c')
+ self.assertEqual(list(od), list('bac'))
def test_sizeof(self):
+ OrderedDict = self.OrderedDict
# Wimpy test: Just verify the reported size is larger than a regular dict
d = dict(a=1)
od = OrderedDict(**d)
self.assertGreater(sys.getsizeof(od), sys.getsizeof(d))
def test_override_update(self):
+ OrderedDict = self.OrderedDict
# Verify that subclasses can override update() without breaking __init__()
class MyOD(OrderedDict):
def update(self, *args, **kwds):
@@ -280,18 +412,318 @@ class TestOrderedDict(unittest.TestCase):
items = [('a', 1), ('c', 3), ('b', 2)]
self.assertEqual(list(MyOD(items).items()), items)
-class GeneralMappingTests(mapping_tests.BasicTestMappingProtocol):
- type2test = OrderedDict
+ def test_highly_nested(self):
+ # Issue 25395: crashes during garbage collection
+ OrderedDict = self.OrderedDict
+ obj = None
+ for _ in range(1000):
+ obj = OrderedDict([(None, obj)])
+ del obj
+ support.gc_collect()
+
+ def test_highly_nested_subclass(self):
+ # Issue 25395: crashes during garbage collection
+ OrderedDict = self.OrderedDict
+ deleted = []
+ class MyOD(OrderedDict):
+ def __del__(self):
+ deleted.append(self.i)
+ obj = None
+ for i in range(100):
+ obj = MyOD([(None, obj)])
+ obj.i = i
+ del obj
+ support.gc_collect()
+ self.assertEqual(deleted, list(reversed(range(100))))
+
+ def test_delitem_hash_collision(self):
+ OrderedDict = self.OrderedDict
+
+ class Key:
+ def __init__(self, hash):
+ self._hash = hash
+ self.value = str(id(self))
+ def __hash__(self):
+ return self._hash
+ def __eq__(self, other):
+ try:
+ return self.value == other.value
+ except AttributeError:
+ return False
+ def __repr__(self):
+ return self.value
+
+ def blocking_hash(hash):
+ # See the collision-handling in lookdict (in Objects/dictobject.c).
+ MINSIZE = 8
+ i = (hash & MINSIZE-1)
+ return (i << 2) + i + hash + 1
+
+ COLLIDING = 1
+
+ key = Key(COLLIDING)
+ colliding = Key(COLLIDING)
+ blocking = Key(blocking_hash(COLLIDING))
+
+ od = OrderedDict()
+ od[key] = ...
+ od[blocking] = ...
+ od[colliding] = ...
+ od['after'] = ...
+
+ del od[blocking]
+ del od[colliding]
+ self.assertEqual(list(od.items()), [(key, ...), ('after', ...)])
+
+ def test_issue24347(self):
+ OrderedDict = self.OrderedDict
+
+ class Key:
+ def __hash__(self):
+ return randrange(100000)
+
+ od = OrderedDict()
+ for i in range(100):
+ key = Key()
+ od[key] = i
+
+ # These should not crash.
+ with self.assertRaises(KeyError):
+ list(od.values())
+ with self.assertRaises(KeyError):
+ list(od.items())
+ with self.assertRaises(KeyError):
+ repr(od)
+ with self.assertRaises(KeyError):
+ od.copy()
+
+ def test_issue24348(self):
+ OrderedDict = self.OrderedDict
+
+ class Key:
+ def __hash__(self):
+ return 1
+
+ od = OrderedDict()
+ od[Key()] = 0
+ # This should not crash.
+ od.popitem()
+
+ def test_issue24667(self):
+ """
+ dict resizes after a certain number of insertion operations,
+ whether or not there were deletions that freed up slots in the
+ hash table. During fast node lookup, OrderedDict must correctly
+ respond to all resizes, even if the current "size" is the same
+ as the old one. We verify that here by forcing a dict resize
+ on a sparse odict and then perform an operation that should
+ trigger an odict resize (e.g. popitem). One key aspect here is
+ that we will keep the size of the odict the same at each popitem
+ call. This verifies that we handled the dict resize properly.
+ """
+ OrderedDict = self.OrderedDict
+
+ od = OrderedDict()
+ for c0 in '0123456789ABCDEF':
+ for c1 in '0123456789ABCDEF':
+ if len(od) == 4:
+ # This should not raise a KeyError.
+ od.popitem(last=False)
+ key = c0 + c1
+ od[key] = key
+
+ # Direct use of dict methods
+
+ def test_dict_setitem(self):
+ OrderedDict = self.OrderedDict
+ od = OrderedDict()
+ dict.__setitem__(od, 'spam', 1)
+ self.assertNotIn('NULL', repr(od))
+
+ def test_dict_delitem(self):
+ OrderedDict = self.OrderedDict
+ od = OrderedDict()
+ od['spam'] = 1
+ od['ham'] = 2
+ dict.__delitem__(od, 'spam')
+ with self.assertRaises(KeyError):
+ repr(od)
+
+ def test_dict_clear(self):
+ OrderedDict = self.OrderedDict
+ od = OrderedDict()
+ od['spam'] = 1
+ od['ham'] = 2
+ dict.clear(od)
+ self.assertNotIn('NULL', repr(od))
+
+ def test_dict_pop(self):
+ OrderedDict = self.OrderedDict
+ od = OrderedDict()
+ od['spam'] = 1
+ od['ham'] = 2
+ dict.pop(od, 'spam')
+ with self.assertRaises(KeyError):
+ repr(od)
+
+ def test_dict_popitem(self):
+ OrderedDict = self.OrderedDict
+ od = OrderedDict()
+ od['spam'] = 1
+ od['ham'] = 2
+ dict.popitem(od)
+ with self.assertRaises(KeyError):
+ repr(od)
+
+ def test_dict_setdefault(self):
+ OrderedDict = self.OrderedDict
+ od = OrderedDict()
+ dict.setdefault(od, 'spam', 1)
+ self.assertNotIn('NULL', repr(od))
+
+ def test_dict_update(self):
+ OrderedDict = self.OrderedDict
+ od = OrderedDict()
+ dict.update(od, [('spam', 1)])
+ self.assertNotIn('NULL', repr(od))
+
+ def test_reference_loop(self):
+ # Issue 25935
+ OrderedDict = self.OrderedDict
+ class A:
+ od = OrderedDict()
+ A.od[A] = None
+ r = weakref.ref(A)
+ del A
+ gc.collect()
+ self.assertIsNone(r())
+
+ def test_free_after_iterating(self):
+ support.check_free_after_iterating(self, iter, self.OrderedDict)
+ support.check_free_after_iterating(self, lambda d: iter(d.keys()), self.OrderedDict)
+ support.check_free_after_iterating(self, lambda d: iter(d.values()), self.OrderedDict)
+ support.check_free_after_iterating(self, lambda d: iter(d.items()), self.OrderedDict)
+
+
+class PurePythonOrderedDictTests(OrderedDictTests, unittest.TestCase):
+
+ module = py_coll
+ OrderedDict = py_coll.OrderedDict
+
+
+@unittest.skipUnless(c_coll, 'requires the C version of the collections module')
+class CPythonOrderedDictTests(OrderedDictTests, unittest.TestCase):
+
+ module = c_coll
+ OrderedDict = c_coll.OrderedDict
+ check_sizeof = support.check_sizeof
+
+ @support.cpython_only
+ def test_sizeof_exact(self):
+ OrderedDict = self.OrderedDict
+ calcsize = struct.calcsize
+ size = support.calcobjsize
+ check = self.check_sizeof
+
+ basicsize = size('n2P' + '3PnPn2P') + calcsize('2nPn')
+ entrysize = calcsize('n2P') + calcsize('P')
+ nodesize = calcsize('Pn2P')
+
+ od = OrderedDict()
+ check(od, basicsize + 8*entrysize)
+ od.x = 1
+ check(od, basicsize + 8*entrysize)
+ od.update([(i, i) for i in range(3)])
+ check(od, basicsize + 8*entrysize + 3*nodesize)
+ od.update([(i, i) for i in range(3, 10)])
+ check(od, basicsize + 16*entrysize + 10*nodesize)
+
+ check(od.keys(), size('P'))
+ check(od.items(), size('P'))
+ check(od.values(), size('P'))
+
+ itersize = size('iP2n2P')
+ check(iter(od), itersize)
+ check(iter(od.keys()), itersize)
+ check(iter(od.items()), itersize)
+ check(iter(od.values()), itersize)
+
+ def test_key_change_during_iteration(self):
+ OrderedDict = self.OrderedDict
+
+ od = OrderedDict.fromkeys('abcde')
+ self.assertEqual(list(od), list('abcde'))
+ with self.assertRaises(RuntimeError):
+ for i, k in enumerate(od):
+ od.move_to_end(k)
+ self.assertLess(i, 5)
+ with self.assertRaises(RuntimeError):
+ for k in od:
+ od['f'] = None
+ with self.assertRaises(RuntimeError):
+ for k in od:
+ del od['c']
+ self.assertEqual(list(od), list('bdeaf'))
+
+
+class PurePythonOrderedDictSubclassTests(PurePythonOrderedDictTests):
+
+ module = py_coll
+ class OrderedDict(py_coll.OrderedDict):
+ pass
+
+
+class CPythonOrderedDictSubclassTests(CPythonOrderedDictTests):
+
+ module = c_coll
+ class OrderedDict(c_coll.OrderedDict):
+ pass
+
+
+class PurePythonGeneralMappingTests(mapping_tests.BasicTestMappingProtocol):
+
+ @classmethod
+ def setUpClass(cls):
+ cls.type2test = py_coll.OrderedDict
def test_popitem(self):
d = self._empty_mapping()
self.assertRaises(KeyError, d.popitem)
-class MyOrderedDict(OrderedDict):
- pass
-class SubclassMappingTests(mapping_tests.BasicTestMappingProtocol):
- type2test = MyOrderedDict
+@unittest.skipUnless(c_coll, 'requires the C version of the collections module')
+class CPythonGeneralMappingTests(mapping_tests.BasicTestMappingProtocol):
+
+ @classmethod
+ def setUpClass(cls):
+ cls.type2test = c_coll.OrderedDict
+
+ def test_popitem(self):
+ d = self._empty_mapping()
+ self.assertRaises(KeyError, d.popitem)
+
+
+class PurePythonSubclassMappingTests(mapping_tests.BasicTestMappingProtocol):
+
+ @classmethod
+ def setUpClass(cls):
+ class MyOrderedDict(py_coll.OrderedDict):
+ pass
+ cls.type2test = MyOrderedDict
+
+ def test_popitem(self):
+ d = self._empty_mapping()
+ self.assertRaises(KeyError, d.popitem)
+
+
+@unittest.skipUnless(c_coll, 'requires the C version of the collections module')
+class CPythonSubclassMappingTests(mapping_tests.BasicTestMappingProtocol):
+
+ @classmethod
+ def setUpClass(cls):
+ class MyOrderedDict(c_coll.OrderedDict):
+ pass
+ cls.type2test = MyOrderedDict
def test_popitem(self):
d = self._empty_mapping()
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index e29b0d585c..874f9e4c90 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -9,6 +9,7 @@ import contextlib
import decimal
import errno
import fractions
+import getpass
import itertools
import locale
import mmap
@@ -40,8 +41,34 @@ try:
import fcntl
except ImportError:
fcntl = None
+try:
+ import _winapi
+except ImportError:
+ _winapi = None
+try:
+ import grp
+ groups = [g.gr_gid for g in grp.getgrall() if getpass.getuser() in g.gr_mem]
+ if hasattr(os, 'getgid'):
+ process_gid = os.getgid()
+ if process_gid not in groups:
+ groups.append(process_gid)
+except ImportError:
+ groups = []
+try:
+ import pwd
+ all_users = [u.pw_uid for u in pwd.getpwall()]
+except ImportError:
+ all_users = []
+try:
+ from _testcapi import INT_MAX, PY_SSIZE_T_MAX
+except ImportError:
+ INT_MAX = PY_SSIZE_T_MAX = sys.maxsize
+
+from test.support.script_helper import assert_python_ok
-from test.script_helper import assert_python_ok
+root_in_posix = False
+if hasattr(os, 'geteuid'):
+ root_in_posix = (os.geteuid() == 0)
# Detect whether we're on a Linux system that uses the (now outdated
# and unmaintained) linuxthreads threading library. There's an issue
@@ -106,6 +133,26 @@ class FileTests(unittest.TestCase):
self.assertEqual(type(s), bytes)
self.assertEqual(s, b"spam")
+ @support.cpython_only
+ # Skip the test on 32-bit platforms: the number of bytes must fit in a
+ # Py_ssize_t type
+ @unittest.skipUnless(INT_MAX < PY_SSIZE_T_MAX,
+ "needs INT_MAX < PY_SSIZE_T_MAX")
+ @support.bigmemtest(size=INT_MAX + 10, memuse=1, dry_run=False)
+ def test_large_read(self, size):
+ with open(support.TESTFN, "wb") as fp:
+ fp.write(b'test')
+ self.addCleanup(support.unlink, support.TESTFN)
+
+ # Issue #21932: Make sure that os.read() does not raise an
+ # OverflowError for size larger than INT_MAX
+ with open(support.TESTFN, "rb") as fp:
+ data = os.read(fp.fileno(), size)
+
+ # The test does not try to read more than 2 GB at once because the
+ # operating system is free to return less bytes than requested.
+ self.assertEqual(data, b'test')
+
def test_write(self):
# os.write() accepts bytes- and buffer-like objects but not strings
fd = os.open(support.TESTFN, os.O_CREAT | os.O_WRONLY)
@@ -363,6 +410,28 @@ class StatAttributeTests(unittest.TestCase):
os.stat(r)
self.assertEqual(ctx.exception.errno, errno.EBADF)
+ def check_file_attributes(self, result):
+ self.assertTrue(hasattr(result, 'st_file_attributes'))
+ self.assertTrue(isinstance(result.st_file_attributes, int))
+ self.assertTrue(0 <= result.st_file_attributes <= 0xFFFFFFFF)
+
+ @unittest.skipUnless(sys.platform == "win32",
+ "st_file_attributes is Win32 specific")
+ def test_file_attributes(self):
+ # test file st_file_attributes (FILE_ATTRIBUTE_DIRECTORY not set)
+ result = os.stat(self.fname)
+ self.check_file_attributes(result)
+ self.assertEqual(
+ result.st_file_attributes & stat.FILE_ATTRIBUTE_DIRECTORY,
+ 0)
+
+ # test directory st_file_attributes (FILE_ATTRIBUTE_DIRECTORY set)
+ result = os.stat(support.TESTFN)
+ self.check_file_attributes(result)
+ self.assertEqual(
+ result.st_file_attributes & stat.FILE_ATTRIBUTE_DIRECTORY,
+ stat.FILE_ATTRIBUTE_DIRECTORY)
+
class UtimeTests(unittest.TestCase):
def setUp(self):
@@ -722,12 +791,10 @@ class WalkTests(unittest.TestCase):
# Wrapper to hide minor differences between os.walk and os.fwalk
# to tests both functions with the same code base
- def walk(self, directory, topdown=True, follow_symlinks=False):
- walk_it = os.walk(directory,
- topdown=topdown,
- followlinks=follow_symlinks)
- for root, dirs, files in walk_it:
- yield (root, dirs, files)
+ def walk(self, top, **kwargs):
+ if 'follow_symlinks' in kwargs:
+ kwargs['followlinks'] = kwargs.pop('follow_symlinks')
+ return os.walk(top, **kwargs)
def setUp(self):
join = os.path.join
@@ -776,7 +843,7 @@ class WalkTests(unittest.TestCase):
def test_walk_topdown(self):
# Walk top-down.
- all = list(os.walk(self.walk_path))
+ all = list(self.walk(self.walk_path))
self.assertEqual(len(all), 4)
# We can't know which order SUB1 and SUB2 will appear in.
@@ -857,19 +924,31 @@ class WalkTests(unittest.TestCase):
os.remove(dirname)
os.rmdir(support.TESTFN)
+ def test_walk_bad_dir(self):
+ # Walk top-down.
+ errors = []
+ walk_it = self.walk(self.walk_path, onerror=errors.append)
+ root, dirs, files = next(walk_it)
+ self.assertFalse(errors)
+ dir1 = dirs[0]
+ dir1new = dir1 + '.new'
+ os.rename(os.path.join(root, dir1), os.path.join(root, dir1new))
+ roots = [r for r, d, f in walk_it]
+ self.assertTrue(errors)
+ self.assertNotIn(os.path.join(root, dir1), roots)
+ self.assertNotIn(os.path.join(root, dir1new), roots)
+ for dir2 in dirs[1:]:
+ self.assertIn(os.path.join(root, dir2), roots)
+
@unittest.skipUnless(hasattr(os, 'fwalk'), "Test needs os.fwalk()")
class FwalkTests(WalkTests):
"""Tests for os.fwalk()."""
- def walk(self, directory, topdown=True, follow_symlinks=False):
- walk_it = os.fwalk(directory,
- topdown=topdown,
- follow_symlinks=follow_symlinks)
- for root, dirs, files, root_fd in walk_it:
+ def walk(self, top, **kwargs):
+ for root, dirs, files, root_fd in os.fwalk(top, **kwargs):
yield (root, dirs, files)
-
def _compare_to_walk(self, walk_kwargs, fwalk_kwargs):
"""
compare with walk() results.
@@ -940,6 +1019,30 @@ class FwalkTests(WalkTests):
os.unlink(name, dir_fd=rootfd)
os.rmdir(support.TESTFN)
+class BytesWalkTests(WalkTests):
+ """Tests for os.walk() with bytes."""
+ def setUp(self):
+ super().setUp()
+ self.stack = contextlib.ExitStack()
+ if os.name == 'nt':
+ self.stack.enter_context(warnings.catch_warnings())
+ warnings.simplefilter("ignore", DeprecationWarning)
+
+ def tearDown(self):
+ self.stack.close()
+ super().tearDown()
+
+ def walk(self, top, **kwargs):
+ if 'follow_symlinks' in kwargs:
+ kwargs['followlinks'] = kwargs.pop('follow_symlinks')
+ for broot, bdirs, bfiles in os.walk(os.fsencode(top), **kwargs):
+ root = os.fsdecode(broot)
+ dirs = list(map(os.fsdecode, bdirs))
+ files = list(map(os.fsdecode, bfiles))
+ yield (root, dirs, files)
+ bdirs[:] = list(map(os.fsencode, dirs))
+ bfiles[:] = list(map(os.fsencode, files))
+
class MakedirTests(unittest.TestCase):
def setUp(self):
@@ -974,17 +1077,6 @@ class MakedirTests(unittest.TestCase):
# Issue #25583: A drive root could raise PermissionError on Windows
os.makedirs(os.path.abspath('/'), exist_ok=True)
- @unittest.skipUnless(hasattr(os, 'chown'), 'test needs os.chown')
- def test_chown_uid_gid_arguments_must_be_index(self):
- stat = os.stat(support.TESTFN)
- uid = stat.st_uid
- gid = stat.st_gid
- for value in (-1.0, -1j, decimal.Decimal(-1), fractions.Fraction(-2, 2)):
- self.assertRaises(TypeError, os.chown, support.TESTFN, value, gid)
- self.assertRaises(TypeError, os.chown, support.TESTFN, uid, value)
- self.assertIsNone(os.chown(support.TESTFN, uid, gid))
- self.assertIsNone(os.chown(support.TESTFN, -1, -1))
-
def test_exist_ok_s_isgid_directory(self):
path = os.path.join(support.TESTFN, 'dir1')
S_ISGID = stat.S_ISGID
@@ -1035,6 +1127,60 @@ class MakedirTests(unittest.TestCase):
os.removedirs(path)
+@unittest.skipUnless(hasattr(os, 'chown'), "Test needs chown")
+class ChownFileTests(unittest.TestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ os.mkdir(support.TESTFN)
+
+ def test_chown_uid_gid_arguments_must_be_index(self):
+ stat = os.stat(support.TESTFN)
+ uid = stat.st_uid
+ gid = stat.st_gid
+ for value in (-1.0, -1j, decimal.Decimal(-1), fractions.Fraction(-2, 2)):
+ self.assertRaises(TypeError, os.chown, support.TESTFN, value, gid)
+ self.assertRaises(TypeError, os.chown, support.TESTFN, uid, value)
+ self.assertIsNone(os.chown(support.TESTFN, uid, gid))
+ self.assertIsNone(os.chown(support.TESTFN, -1, -1))
+
+ @unittest.skipUnless(len(groups) > 1, "test needs more than one group")
+ def test_chown(self):
+ gid_1, gid_2 = groups[:2]
+ uid = os.stat(support.TESTFN).st_uid
+ os.chown(support.TESTFN, uid, gid_1)
+ gid = os.stat(support.TESTFN).st_gid
+ self.assertEqual(gid, gid_1)
+ os.chown(support.TESTFN, uid, gid_2)
+ gid = os.stat(support.TESTFN).st_gid
+ self.assertEqual(gid, gid_2)
+
+ @unittest.skipUnless(root_in_posix and len(all_users) > 1,
+ "test needs root privilege and more than one user")
+ def test_chown_with_root(self):
+ uid_1, uid_2 = all_users[:2]
+ gid = os.stat(support.TESTFN).st_gid
+ os.chown(support.TESTFN, uid_1, gid)
+ uid = os.stat(support.TESTFN).st_uid
+ self.assertEqual(uid, uid_1)
+ os.chown(support.TESTFN, uid_2, gid)
+ uid = os.stat(support.TESTFN).st_uid
+ self.assertEqual(uid, uid_2)
+
+ @unittest.skipUnless(not root_in_posix and len(all_users) > 1,
+ "test needs non-root account and more than one user")
+ def test_chown_without_permission(self):
+ uid_1, uid_2 = all_users[:2]
+ gid = os.stat(support.TESTFN).st_gid
+ with self.assertRaises(PermissionError):
+ os.chown(support.TESTFN, uid_1, gid)
+ os.chown(support.TESTFN, uid_2, gid)
+
+ @classmethod
+ def tearDownClass(cls):
+ os.rmdir(support.TESTFN)
+
+
class RemoveDirsTests(unittest.TestCase):
def setUp(self):
os.makedirs(support.TESTFN)
@@ -1117,10 +1263,15 @@ class URandomTests(unittest.TestCase):
self.assertNotEqual(data1, data2)
-HAVE_GETENTROPY = (sysconfig.get_config_var('HAVE_GETENTROPY') == 1)
+# os.urandom() doesn't use a file descriptor when it is implemented with the
+# getentropy() function, the getrandom() function or the getrandom() syscall
+OS_URANDOM_DONT_USE_FD = (
+ sysconfig.get_config_var('HAVE_GETENTROPY') == 1
+ or sysconfig.get_config_var('HAVE_GETRANDOM') == 1
+ or sysconfig.get_config_var('HAVE_GETRANDOM_SYSCALL') == 1)
-@unittest.skipIf(HAVE_GETENTROPY,
- "getentropy() does not use a file descriptor")
+@unittest.skipIf(OS_URANDOM_DONT_USE_FD ,
+ "os.random() does not use a file descriptor")
class URandomFDTests(unittest.TestCase):
@unittest.skipUnless(resource, "test requires the resource module")
def test_urandom_failure(self):
@@ -1151,8 +1302,10 @@ class URandomFDTests(unittest.TestCase):
code = """if 1:
import os
import sys
+ import test.support
os.urandom(4)
- os.closerange(3, 256)
+ with test.support.SuppressCrashReport():
+ os.closerange(3, 256)
sys.stdout.buffer.write(os.urandom(4))
"""
rc, out, err = assert_python_ok('-Sc', code)
@@ -1166,16 +1319,18 @@ class URandomFDTests(unittest.TestCase):
code = """if 1:
import os
import sys
+ import test.support
os.urandom(4)
- for fd in range(3, 256):
- try:
- os.close(fd)
- except OSError:
- pass
- else:
- # Found the urandom fd (XXX hopefully)
- break
- os.closerange(3, 256)
+ with test.support.SuppressCrashReport():
+ for fd in range(3, 256):
+ try:
+ os.close(fd)
+ except OSError:
+ pass
+ else:
+ # Found the urandom fd (XXX hopefully)
+ break
+ os.closerange(3, 256)
with open({TESTFN!r}, 'rb') as f:
os.dup2(f.fileno(), fd)
sys.stdout.buffer.write(os.urandom(4))
@@ -1401,6 +1556,16 @@ class TestInvalidFD(unittest.TestCase):
def test_writev(self):
self.check(os.writev, [b'abc'])
+ def test_inheritable(self):
+ self.check(os.get_inheritable)
+ self.check(os.set_inheritable, True)
+
+ @unittest.skipUnless(hasattr(os, 'get_blocking'),
+ 'needs os.get_blocking() and os.set_blocking()')
+ def test_blocking(self):
+ self.check(os.get_blocking)
+ self.check(os.set_blocking, True)
+
class LinkTests(unittest.TestCase):
def setUp(self):
@@ -1848,6 +2013,37 @@ class Win32SymlinkTests(unittest.TestCase):
shutil.rmtree(level1)
+@unittest.skipUnless(sys.platform == "win32", "Win32 specific tests")
+class Win32JunctionTests(unittest.TestCase):
+ junction = 'junctiontest'
+ junction_target = os.path.dirname(os.path.abspath(__file__))
+
+ def setUp(self):
+ assert os.path.exists(self.junction_target)
+ assert not os.path.exists(self.junction)
+
+ def tearDown(self):
+ if os.path.exists(self.junction):
+ # os.rmdir delegates to Windows' RemoveDirectoryW,
+ # which removes junction points safely.
+ os.rmdir(self.junction)
+
+ def test_create_junction(self):
+ _winapi.CreateJunction(self.junction_target, self.junction)
+ self.assertTrue(os.path.exists(self.junction))
+ self.assertTrue(os.path.isdir(self.junction))
+
+ # Junctions are not recognized as links.
+ self.assertFalse(os.path.islink(self.junction))
+
+ def test_unlink_removes_junction(self):
+ _winapi.CreateJunction(self.junction_target, self.junction)
+ self.assertTrue(os.path.exists(self.junction))
+
+ os.unlink(self.junction)
+ self.assertFalse(os.path.exists(self.junction))
+
+
@support.skip_unless_symlink
class NonLocalSymlinkTests(unittest.TestCase):
@@ -1921,6 +2117,12 @@ class PidTests(unittest.TestCase):
# We are the parent of our subprocess
self.assertEqual(int(stdout), os.getpid())
+ def test_waitpid(self):
+ args = [sys.executable, '-c', 'pass']
+ pid = os.spawnv(os.P_NOWAIT, args[0], args)
+ status = os.waitpid(pid, 0)
+ self.assertEqual(status, (pid, 0))
+
# The introduction of this TestCase caused at least two different errors on
# *nix buildbots. Temporarily skip this to let the buildbots move along.
@@ -2054,11 +2256,13 @@ class TestSendfile(unittest.TestCase):
@classmethod
def setUpClass(cls):
+ cls.key = support.threading_setup()
with open(support.TESTFN, "wb") as f:
f.write(cls.DATA)
@classmethod
def tearDownClass(cls):
+ support.threading_cleanup(*cls.key)
support.unlink(support.TESTFN)
def setUp(self):
@@ -2593,43 +2797,251 @@ class FDInheritanceTests(unittest.TestCase):
self.assertEqual(os.get_inheritable(slave_fd), False)
-@support.reap_threads
-def test_main():
- support.run_unittest(
- FileTests,
- StatAttributeTests,
- UtimeTests,
- EnvironTests,
- WalkTests,
- FwalkTests,
- MakedirTests,
- DevNullTests,
- URandomTests,
- URandomFDTests,
- ExecTests,
- Win32ErrorTests,
- TestInvalidFD,
- PosixUidGidTests,
- Pep383Tests,
- Win32KillTests,
- Win32ListdirTests,
- Win32SymlinkTests,
- NonLocalSymlinkTests,
- FSEncodingTests,
- DeviceEncodingTests,
- PidTests,
- LoginTests,
- LinkTests,
- TestSendfile,
- ProgramPriorityTests,
- ExtendedAttributeTests,
- Win32DeprecatedBytesAPI,
- TermsizeTests,
- OSErrorTests,
- RemoveDirsTests,
- CPUCountTests,
- FDInheritanceTests,
- )
+@unittest.skipUnless(hasattr(os, 'get_blocking'),
+ 'needs os.get_blocking() and os.set_blocking()')
+class BlockingTests(unittest.TestCase):
+ def test_blocking(self):
+ fd = os.open(__file__, os.O_RDONLY)
+ self.addCleanup(os.close, fd)
+ self.assertEqual(os.get_blocking(fd), True)
+
+ os.set_blocking(fd, False)
+ self.assertEqual(os.get_blocking(fd), False)
+
+ os.set_blocking(fd, True)
+ self.assertEqual(os.get_blocking(fd), True)
+
+
+
+class ExportsTests(unittest.TestCase):
+ def test_os_all(self):
+ self.assertIn('open', os.__all__)
+ self.assertIn('walk', os.__all__)
+
+
+class TestScandir(unittest.TestCase):
+ def setUp(self):
+ self.path = os.path.realpath(support.TESTFN)
+ self.addCleanup(support.rmtree, self.path)
+ os.mkdir(self.path)
+
+ def create_file(self, name="file.txt"):
+ filename = os.path.join(self.path, name)
+ with open(filename, "wb") as fp:
+ fp.write(b'python')
+ return filename
+
+ def get_entries(self, names):
+ entries = dict((entry.name, entry)
+ for entry in os.scandir(self.path))
+ self.assertEqual(sorted(entries.keys()), names)
+ return entries
+
+ def assert_stat_equal(self, stat1, stat2, skip_fields):
+ if skip_fields:
+ for attr in dir(stat1):
+ if not attr.startswith("st_"):
+ continue
+ if attr in ("st_dev", "st_ino", "st_nlink"):
+ continue
+ self.assertEqual(getattr(stat1, attr),
+ getattr(stat2, attr),
+ (stat1, stat2, attr))
+ else:
+ self.assertEqual(stat1, stat2)
+
+ def check_entry(self, entry, name, is_dir, is_file, is_symlink):
+ self.assertEqual(entry.name, name)
+ self.assertEqual(entry.path, os.path.join(self.path, name))
+ self.assertEqual(entry.inode(),
+ os.stat(entry.path, follow_symlinks=False).st_ino)
+
+ entry_stat = os.stat(entry.path)
+ self.assertEqual(entry.is_dir(),
+ stat.S_ISDIR(entry_stat.st_mode))
+ self.assertEqual(entry.is_file(),
+ stat.S_ISREG(entry_stat.st_mode))
+ self.assertEqual(entry.is_symlink(),
+ os.path.islink(entry.path))
+
+ entry_lstat = os.stat(entry.path, follow_symlinks=False)
+ self.assertEqual(entry.is_dir(follow_symlinks=False),
+ stat.S_ISDIR(entry_lstat.st_mode))
+ self.assertEqual(entry.is_file(follow_symlinks=False),
+ stat.S_ISREG(entry_lstat.st_mode))
+
+ self.assert_stat_equal(entry.stat(),
+ entry_stat,
+ os.name == 'nt' and not is_symlink)
+ self.assert_stat_equal(entry.stat(follow_symlinks=False),
+ entry_lstat,
+ os.name == 'nt')
+
+ def test_attributes(self):
+ link = hasattr(os, 'link')
+ symlink = support.can_symlink()
+
+ dirname = os.path.join(self.path, "dir")
+ os.mkdir(dirname)
+ filename = self.create_file("file.txt")
+ if link:
+ os.link(filename, os.path.join(self.path, "link_file.txt"))
+ if symlink:
+ os.symlink(dirname, os.path.join(self.path, "symlink_dir"),
+ target_is_directory=True)
+ os.symlink(filename, os.path.join(self.path, "symlink_file.txt"))
+
+ names = ['dir', 'file.txt']
+ if link:
+ names.append('link_file.txt')
+ if symlink:
+ names.extend(('symlink_dir', 'symlink_file.txt'))
+ entries = self.get_entries(names)
+
+ entry = entries['dir']
+ self.check_entry(entry, 'dir', True, False, False)
+
+ entry = entries['file.txt']
+ self.check_entry(entry, 'file.txt', False, True, False)
+
+ if link:
+ entry = entries['link_file.txt']
+ self.check_entry(entry, 'link_file.txt', False, True, False)
+
+ if symlink:
+ entry = entries['symlink_dir']
+ self.check_entry(entry, 'symlink_dir', True, False, True)
+
+ entry = entries['symlink_file.txt']
+ self.check_entry(entry, 'symlink_file.txt', False, True, True)
+
+ def get_entry(self, name):
+ entries = list(os.scandir(self.path))
+ self.assertEqual(len(entries), 1)
+
+ entry = entries[0]
+ self.assertEqual(entry.name, name)
+ return entry
+
+ def create_file_entry(self):
+ filename = self.create_file()
+ return self.get_entry(os.path.basename(filename))
+
+ def test_current_directory(self):
+ filename = self.create_file()
+ old_dir = os.getcwd()
+ try:
+ os.chdir(self.path)
+
+ # call scandir() without parameter: it must list the content
+ # of the current directory
+ entries = dict((entry.name, entry) for entry in os.scandir())
+ self.assertEqual(sorted(entries.keys()),
+ [os.path.basename(filename)])
+ finally:
+ os.chdir(old_dir)
+
+ def test_repr(self):
+ entry = self.create_file_entry()
+ self.assertEqual(repr(entry), "<DirEntry 'file.txt'>")
+
+ def test_removed_dir(self):
+ path = os.path.join(self.path, 'dir')
+
+ os.mkdir(path)
+ entry = self.get_entry('dir')
+ os.rmdir(path)
+
+ # On POSIX, is_dir() result depends if scandir() filled d_type or not
+ if os.name == 'nt':
+ self.assertTrue(entry.is_dir())
+ self.assertFalse(entry.is_file())
+ self.assertFalse(entry.is_symlink())
+ if os.name == 'nt':
+ self.assertRaises(FileNotFoundError, entry.inode)
+ # don't fail
+ entry.stat()
+ entry.stat(follow_symlinks=False)
+ else:
+ self.assertGreater(entry.inode(), 0)
+ self.assertRaises(FileNotFoundError, entry.stat)
+ self.assertRaises(FileNotFoundError, entry.stat, follow_symlinks=False)
+
+ def test_removed_file(self):
+ entry = self.create_file_entry()
+ os.unlink(entry.path)
+
+ self.assertFalse(entry.is_dir())
+ # On POSIX, is_dir() result depends if scandir() filled d_type or not
+ if os.name == 'nt':
+ self.assertTrue(entry.is_file())
+ self.assertFalse(entry.is_symlink())
+ if os.name == 'nt':
+ self.assertRaises(FileNotFoundError, entry.inode)
+ # don't fail
+ entry.stat()
+ entry.stat(follow_symlinks=False)
+ else:
+ self.assertGreater(entry.inode(), 0)
+ self.assertRaises(FileNotFoundError, entry.stat)
+ self.assertRaises(FileNotFoundError, entry.stat, follow_symlinks=False)
+
+ def test_broken_symlink(self):
+ if not support.can_symlink():
+ return self.skipTest('cannot create symbolic link')
+
+ filename = self.create_file("file.txt")
+ os.symlink(filename,
+ os.path.join(self.path, "symlink.txt"))
+ entries = self.get_entries(['file.txt', 'symlink.txt'])
+ entry = entries['symlink.txt']
+ os.unlink(filename)
+
+ self.assertGreater(entry.inode(), 0)
+ self.assertFalse(entry.is_dir())
+ self.assertFalse(entry.is_file()) # broken symlink returns False
+ self.assertFalse(entry.is_dir(follow_symlinks=False))
+ self.assertFalse(entry.is_file(follow_symlinks=False))
+ self.assertTrue(entry.is_symlink())
+ self.assertRaises(FileNotFoundError, entry.stat)
+ # don't fail
+ entry.stat(follow_symlinks=False)
+
+ def test_bytes(self):
+ if os.name == "nt":
+ # On Windows, os.scandir(bytes) must raise an exception
+ self.assertRaises(TypeError, os.scandir, b'.')
+ return
+
+ self.create_file("file.txt")
+
+ path_bytes = os.fsencode(self.path)
+ entries = list(os.scandir(path_bytes))
+ self.assertEqual(len(entries), 1, entries)
+ entry = entries[0]
+
+ self.assertEqual(entry.name, b'file.txt')
+ self.assertEqual(entry.path,
+ os.fsencode(os.path.join(self.path, 'file.txt')))
+
+ def test_empty_path(self):
+ self.assertRaises(FileNotFoundError, os.scandir, '')
+
+ def test_consume_iterator_twice(self):
+ self.create_file("file.txt")
+ iterator = os.scandir(self.path)
+
+ entries = list(iterator)
+ self.assertEqual(len(entries), 1, entries)
+
+ # check than consuming the iterator twice doesn't raise exception
+ entries2 = list(iterator)
+ self.assertEqual(len(entries2), 0, entries2)
+
+ def test_bad_path_type(self):
+ for obj in [1234, 1.234, {}, []]:
+ self.assertRaises(TypeError, os.scandir, obj)
+
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_osx_env.py b/Lib/test/test_osx_env.py
index d8eb981b64..8a3bc5a46e 100644
--- a/Lib/test/test_osx_env.py
+++ b/Lib/test/test_osx_env.py
@@ -2,7 +2,7 @@
Test suite for OS X interpreter environment variables.
"""
-from test.support import EnvironmentVarGuard, run_unittest
+from test.support import EnvironmentVarGuard
import subprocess
import sys
import sysconfig
diff --git a/Lib/test/test_parser.py b/Lib/test/test_parser.py
index e7968cc3b3..3d301b4924 100644
--- a/Lib/test/test_parser.py
+++ b/Lib/test/test_parser.py
@@ -4,7 +4,7 @@ import sys
import operator
import struct
from test import support
-from test.script_helper import assert_python_failure
+from test.support.script_helper import assert_python_failure
#
# First, we test that we can generate trees from valid source fragments,
@@ -63,6 +63,22 @@ class RoundtripLegalSyntaxTestCase(unittest.TestCase):
" if (yield):\n"
" yield x\n")
+ def test_await_statement(self):
+ self.check_suite("async def f():\n await smth()")
+ self.check_suite("async def f():\n foo = await smth()")
+ self.check_suite("async def f():\n foo, bar = await smth()")
+ self.check_suite("async def f():\n (await smth())")
+ self.check_suite("async def f():\n foo((await smth()))")
+ self.check_suite("async def f():\n await foo(); return 42")
+
+ def test_async_with_statement(self):
+ self.check_suite("async def f():\n async with 1: pass")
+ self.check_suite("async def f():\n async with a as b, c as d: pass")
+
+ def test_async_for_statement(self):
+ self.check_suite("async def f():\n async for i in (): pass")
+ self.check_suite("async def f():\n async for i, b in (): pass")
+
def test_nonlocal_statement(self):
self.check_suite("def f():\n"
" x = 0\n"
@@ -313,7 +329,12 @@ class RoundtripLegalSyntaxTestCase(unittest.TestCase):
"except Exception as e:\n"
" raise ValueError from e\n")
+ def test_list_displays(self):
+ self.check_expr('[]')
+ self.check_expr('[*{2}, 3, *[4]]')
+
def test_set_displays(self):
+ self.check_expr('{*{2}, 3, *[4]}')
self.check_expr('{2}')
self.check_expr('{2,}')
self.check_expr('{2, 3}')
@@ -325,6 +346,15 @@ class RoundtripLegalSyntaxTestCase(unittest.TestCase):
self.check_expr('{a:b,}')
self.check_expr('{a:b, c:d}')
self.check_expr('{a:b, c:d,}')
+ self.check_expr('{**{}}')
+ self.check_expr('{**{}, 3:4, **{5:6, 7:8}}')
+
+ def test_argument_unpacking(self):
+ self.check_expr("f(*a, **b)")
+ self.check_expr('f(a, *b, *c, *d)')
+ self.check_expr('f(**a, **b)')
+ self.check_expr('f(2, *a, *b, **b, **c, **d)')
+ self.check_expr("f(*b, *() or () and (), **{} and {}, **() or {})")
def test_set_comprehensions(self):
self.check_expr('{x for x in seq}')
@@ -730,16 +760,5 @@ class OtherParserCase(unittest.TestCase):
with self.assertRaises(TypeError):
parser.expr("a", "b")
-def test_main():
- support.run_unittest(
- RoundtripLegalSyntaxTestCase,
- IllegalSyntaxTestCase,
- CompileTestCase,
- ParserStackLimitTestCase,
- STObjectTestCase,
- OtherParserCase,
- )
-
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_pathlib.py b/Lib/test/test_pathlib.py
index 0d98f24868..fa96d9f882 100644
--- a/Lib/test/test_pathlib.py
+++ b/Lib/test/test_pathlib.py
@@ -4,13 +4,10 @@ import os
import errno
import pathlib
import pickle
-import shutil
import socket
import stat
-import sys
import tempfile
import unittest
-from contextlib import contextmanager
from test import support
TESTFN = support.TESTFN
@@ -203,7 +200,7 @@ class _BasePurePathTest(object):
def _check_str_subclass(self, *args):
# Issue #21127: it should be possible to construct a PurePath object
- # from an str subclass instance, and it then gets converted to
+ # from a str subclass instance, and it then gets converted to
# a pure str object.
class StrSubclass(str):
pass
@@ -747,7 +744,6 @@ class PureWindowsPathTest(_BasePurePathTest, unittest.TestCase):
self.assertEqual(P('//Some/SHARE/a/B'), P('//somE/share/A/b'))
def test_as_uri(self):
- from urllib.parse import quote_from_bytes
P = self.cls
with self.assertRaises(ValueError):
P('/a/b').as_uri()
@@ -1133,7 +1129,6 @@ class PureWindowsPathTest(_BasePurePathTest, unittest.TestCase):
# UNC paths are never reserved
self.assertIs(False, P('//my/share/nul/con/aux').is_reserved())
-
class PurePathTest(_BasePurePathTest, unittest.TestCase):
cls = pathlib.PurePath
@@ -1197,6 +1192,16 @@ class PosixPathAsPureTest(PurePosixPathTest):
class WindowsPathAsPureTest(PureWindowsPathTest):
cls = pathlib.WindowsPath
+ def test_owner(self):
+ P = self.cls
+ with self.assertRaises(NotImplementedError):
+ P('c:/').owner()
+
+ def test_group(self):
+ P = self.cls
+ with self.assertRaises(NotImplementedError):
+ P('c:/').group()
+
class _BasePathTest(object):
"""Tests for the FS-accessing functionalities of the Path classes."""
@@ -1277,11 +1282,55 @@ class _BasePathTest(object):
p = self.cls.cwd()
self._test_cwd(p)
+ def _test_home(self, p):
+ q = self.cls(os.path.expanduser('~'))
+ self.assertEqual(p, q)
+ self.assertEqual(str(p), str(q))
+ self.assertIs(type(p), type(q))
+ self.assertTrue(p.is_absolute())
+
+ def test_home(self):
+ p = self.cls.home()
+ self._test_home(p)
+
+ def test_samefile(self):
+ fileA_path = os.path.join(BASE, 'fileA')
+ fileB_path = os.path.join(BASE, 'dirB', 'fileB')
+ p = self.cls(fileA_path)
+ pp = self.cls(fileA_path)
+ q = self.cls(fileB_path)
+ self.assertTrue(p.samefile(fileA_path))
+ self.assertTrue(p.samefile(pp))
+ self.assertFalse(p.samefile(fileB_path))
+ self.assertFalse(p.samefile(q))
+ # Test the non-existent file case
+ non_existent = os.path.join(BASE, 'foo')
+ r = self.cls(non_existent)
+ self.assertRaises(FileNotFoundError, p.samefile, r)
+ self.assertRaises(FileNotFoundError, p.samefile, non_existent)
+ self.assertRaises(FileNotFoundError, r.samefile, p)
+ self.assertRaises(FileNotFoundError, r.samefile, non_existent)
+ self.assertRaises(FileNotFoundError, r.samefile, r)
+ self.assertRaises(FileNotFoundError, r.samefile, non_existent)
+
def test_empty_path(self):
# The empty path points to '.'
p = self.cls('')
self.assertEqual(p.stat(), os.stat('.'))
+ def test_expanduser_common(self):
+ P = self.cls
+ p = P('~')
+ self.assertEqual(p.expanduser(), P(os.path.expanduser('~')))
+ p = P('foo')
+ self.assertEqual(p.expanduser(), p)
+ p = P('/~')
+ self.assertEqual(p.expanduser(), p)
+ p = P('../~')
+ self.assertEqual(p.expanduser(), p)
+ p = P(P('').absolute().anchor) / '~'
+ self.assertEqual(p.expanduser(), p)
+
def test_exists(self):
P = self.cls
p = P(BASE)
@@ -1309,6 +1358,23 @@ class _BasePathTest(object):
self.assertIsInstance(f, io.RawIOBase)
self.assertEqual(f.read().strip(), b"this is file A")
+ def test_read_write_bytes(self):
+ p = self.cls(BASE)
+ (p / 'fileA').write_bytes(b'abcdefg')
+ self.assertEqual((p / 'fileA').read_bytes(), b'abcdefg')
+ # check that trying to write str does not truncate the file
+ self.assertRaises(TypeError, (p / 'fileA').write_bytes, 'somestr')
+ self.assertEqual((p / 'fileA').read_bytes(), b'abcdefg')
+
+ def test_read_write_text(self):
+ p = self.cls(BASE)
+ (p / 'fileA').write_text('äbcdefg', encoding='latin-1')
+ self.assertEqual((p / 'fileA').read_text(
+ encoding='utf-8', errors='ignore'), 'bcdefg')
+ # check that trying to write bytes does not truncate the file
+ self.assertRaises(TypeError, (p / 'fileA').write_text, b'somebytes')
+ self.assertEqual((p / 'fileA').read_text(encoding='latin-1'), 'äbcdefg')
+
def test_iterdir(self):
P = self.cls
p = P(BASE)
@@ -1632,6 +1698,59 @@ class _BasePathTest(object):
# the parent's permissions follow the default process settings
self.assertEqual(stat.S_IMODE(p.parent.stat().st_mode), mode)
+ def test_mkdir_exist_ok(self):
+ p = self.cls(BASE, 'dirB')
+ st_ctime_first = p.stat().st_ctime
+ self.assertTrue(p.exists())
+ self.assertTrue(p.is_dir())
+ with self.assertRaises(FileExistsError) as cm:
+ p.mkdir()
+ self.assertEqual(cm.exception.errno, errno.EEXIST)
+ p.mkdir(exist_ok=True)
+ self.assertTrue(p.exists())
+ self.assertEqual(p.stat().st_ctime, st_ctime_first)
+
+ def test_mkdir_exist_ok_with_parent(self):
+ p = self.cls(BASE, 'dirC')
+ self.assertTrue(p.exists())
+ with self.assertRaises(FileExistsError) as cm:
+ p.mkdir()
+ self.assertEqual(cm.exception.errno, errno.EEXIST)
+ p = p / 'newdirC'
+ p.mkdir(parents=True)
+ st_ctime_first = p.stat().st_ctime
+ self.assertTrue(p.exists())
+ with self.assertRaises(FileExistsError) as cm:
+ p.mkdir(parents=True)
+ self.assertEqual(cm.exception.errno, errno.EEXIST)
+ p.mkdir(parents=True, exist_ok=True)
+ self.assertTrue(p.exists())
+ self.assertEqual(p.stat().st_ctime, st_ctime_first)
+
+ def test_mkdir_with_child_file(self):
+ p = self.cls(BASE, 'dirB', 'fileB')
+ self.assertTrue(p.exists())
+ # An exception is raised when the last path component is an existing
+ # regular file, regardless of whether exist_ok is true or not.
+ with self.assertRaises(FileExistsError) as cm:
+ p.mkdir(parents=True)
+ self.assertEqual(cm.exception.errno, errno.EEXIST)
+ with self.assertRaises(FileExistsError) as cm:
+ p.mkdir(parents=True, exist_ok=True)
+ self.assertEqual(cm.exception.errno, errno.EEXIST)
+
+ def test_mkdir_no_parents_file(self):
+ p = self.cls(BASE, 'fileA')
+ self.assertTrue(p.exists())
+ # An exception is raised when the last path component is an existing
+ # regular file, regardless of whether exist_ok is true or not.
+ with self.assertRaises(FileExistsError) as cm:
+ p.mkdir()
+ self.assertEqual(cm.exception.errno, errno.EEXIST)
+ with self.assertRaises(FileExistsError) as cm:
+ p.mkdir(exist_ok=True)
+ self.assertEqual(cm.exception.errno, errno.EEXIST)
+
@with_symlinks
def test_symlink_to(self):
P = self.cls(BASE)
@@ -1832,6 +1951,11 @@ class PathTest(_BasePathTest, unittest.TestCase):
else:
self.assertRaises(NotImplementedError, pathlib.WindowsPath)
+ def test_glob_empty_pattern(self):
+ p = self.cls()
+ with self.assertRaisesRegex(ValueError, 'Unacceptable pattern'):
+ list(p.glob(''))
+
@only_posix
class PosixPathTest(_BasePathTest, unittest.TestCase):
@@ -1874,7 +1998,6 @@ class PosixPathTest(_BasePathTest, unittest.TestCase):
@with_symlinks
def test_resolve_loop(self):
# Loop detection for broken symlinks under POSIX
- P = self.cls
# Loops with relative symlinks
os.symlink('linkX/inside', join('linkX'))
self._check_symlink_loop(BASE, 'linkX')
@@ -1906,6 +2029,48 @@ class PosixPathTest(_BasePathTest, unittest.TestCase):
self.assertEqual(given, expect)
self.assertEqual(set(p.rglob("FILEd*")), set())
+ def test_expanduser(self):
+ P = self.cls
+ support.import_module('pwd')
+ import pwd
+ pwdent = pwd.getpwuid(os.getuid())
+ username = pwdent.pw_name
+ userhome = pwdent.pw_dir.rstrip('/') or '/'
+ # find arbitrary different user (if exists)
+ for pwdent in pwd.getpwall():
+ othername = pwdent.pw_name
+ otherhome = pwdent.pw_dir.rstrip('/')
+ if othername != username and otherhome:
+ break
+
+ p1 = P('~/Documents')
+ p2 = P('~' + username + '/Documents')
+ p3 = P('~' + othername + '/Documents')
+ p4 = P('../~' + username + '/Documents')
+ p5 = P('/~' + username + '/Documents')
+ p6 = P('')
+ p7 = P('~fakeuser/Documents')
+
+ with support.EnvironmentVarGuard() as env:
+ env.pop('HOME', None)
+
+ self.assertEqual(p1.expanduser(), P(userhome) / 'Documents')
+ self.assertEqual(p2.expanduser(), P(userhome) / 'Documents')
+ self.assertEqual(p3.expanduser(), P(otherhome) / 'Documents')
+ self.assertEqual(p4.expanduser(), p4)
+ self.assertEqual(p5.expanduser(), p5)
+ self.assertEqual(p6.expanduser(), p6)
+ self.assertRaises(RuntimeError, p7.expanduser)
+
+ env['HOME'] = '/tmp'
+ self.assertEqual(p1.expanduser(), P('/tmp/Documents'))
+ self.assertEqual(p2.expanduser(), P(userhome) / 'Documents')
+ self.assertEqual(p3.expanduser(), P(otherhome) / 'Documents')
+ self.assertEqual(p4.expanduser(), p4)
+ self.assertEqual(p5.expanduser(), p5)
+ self.assertEqual(p6.expanduser(), p6)
+ self.assertRaises(RuntimeError, p7.expanduser)
+
@only_nt
class WindowsPathTest(_BasePathTest, unittest.TestCase):
@@ -1921,6 +2086,61 @@ class WindowsPathTest(_BasePathTest, unittest.TestCase):
p = P(BASE, "dirC")
self.assertEqual(set(p.rglob("FILEd")), { P(BASE, "dirC/dirD/fileD") })
+ def test_expanduser(self):
+ P = self.cls
+ with support.EnvironmentVarGuard() as env:
+ env.pop('HOME', None)
+ env.pop('USERPROFILE', None)
+ env.pop('HOMEPATH', None)
+ env.pop('HOMEDRIVE', None)
+ env['USERNAME'] = 'alice'
+
+ # test that the path returns unchanged
+ p1 = P('~/My Documents')
+ p2 = P('~alice/My Documents')
+ p3 = P('~bob/My Documents')
+ p4 = P('/~/My Documents')
+ p5 = P('d:~/My Documents')
+ p6 = P('')
+ self.assertRaises(RuntimeError, p1.expanduser)
+ self.assertRaises(RuntimeError, p2.expanduser)
+ self.assertRaises(RuntimeError, p3.expanduser)
+ self.assertEqual(p4.expanduser(), p4)
+ self.assertEqual(p5.expanduser(), p5)
+ self.assertEqual(p6.expanduser(), p6)
+
+ def check():
+ env.pop('USERNAME', None)
+ self.assertEqual(p1.expanduser(),
+ P('C:/Users/alice/My Documents'))
+ self.assertRaises(KeyError, p2.expanduser)
+ env['USERNAME'] = 'alice'
+ self.assertEqual(p2.expanduser(),
+ P('C:/Users/alice/My Documents'))
+ self.assertEqual(p3.expanduser(),
+ P('C:/Users/bob/My Documents'))
+ self.assertEqual(p4.expanduser(), p4)
+ self.assertEqual(p5.expanduser(), p5)
+ self.assertEqual(p6.expanduser(), p6)
+
+ # test the first lookup key in the env vars
+ env['HOME'] = 'C:\\Users\\alice'
+ check()
+
+ # test that HOMEPATH is available instead
+ env.pop('HOME', None)
+ env['HOMEPATH'] = 'C:\\Users\\alice'
+ check()
+
+ env['HOMEDRIVE'] = 'C:\\'
+ env['HOMEPATH'] = 'Users\\alice'
+ check()
+
+ env.pop('HOMEDRIVE', None)
+ env.pop('HOMEPATH', None)
+ env['USERPROFILE'] = 'C:\\Users\\alice'
+ check()
+
if __name__ == "__main__":
unittest.main()
diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py
index 35044ad2a1..45ba5a9685 100644
--- a/Lib/test/test_pdb.py
+++ b/Lib/test/test_pdb.py
@@ -824,7 +824,7 @@ def test_pdb_until_command_for_generator():
"""
def test_pdb_next_command_in_generator_for_loop():
- """The next command on returning from a generator controled by a for loop.
+ """The next command on returning from a generator controlled by a for loop.
>>> def test_gen():
... yield 0
diff --git a/Lib/test/test_peepholer.py b/Lib/test/test_peepholer.py
index 50257923fe..41e5091fab 100644
--- a/Lib/test/test_peepholer.py
+++ b/Lib/test/test_peepholer.py
@@ -319,21 +319,5 @@ class TestBuglets(unittest.TestCase):
f()
-def test_main(verbose=None):
- import sys
- from test import support
- test_classes = (TestTranforms, TestBuglets)
- support.run_unittest(*test_classes)
-
- # verify reference counting
- if verbose and hasattr(sys, 'gettotalrefcount'):
- import gc
- counts = [None] * 5
- for i in range(len(counts)):
- support.run_unittest(*test_classes)
- gc.collect()
- counts[i] = sys.gettotalrefcount()
- print(counts)
-
if __name__ == "__main__":
- test_main(verbose=True)
+ unittest.main()
diff --git a/Lib/test/test_pep247.py b/Lib/test/test_pep247.py
index b85a26ad65..ab5f41894b 100644
--- a/Lib/test/test_pep247.py
+++ b/Lib/test/test_pep247.py
@@ -6,7 +6,6 @@ for hashing algorithms
import hmac
import unittest
from hashlib import md5, sha1, sha224, sha256, sha384, sha512
-from test import support
class Pep247Test(unittest.TestCase):
@@ -63,8 +62,5 @@ class Pep247Test(unittest.TestCase):
def test_hmac(self):
self.check_module(hmac, key=b'abc')
-def test_main():
- support.run_unittest(Pep247Test)
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_pep292.py b/Lib/test/test_pep292.py
deleted file mode 100644
index fd5256c774..0000000000
--- a/Lib/test/test_pep292.py
+++ /dev/null
@@ -1,254 +0,0 @@
-# Copyright (C) 2004 Python Software Foundation
-# Author: barry@python.org (Barry Warsaw)
-# License: http://www.opensource.org/licenses/PythonSoftFoundation.php
-
-import unittest
-from string import Template
-
-
-class Bag:
- pass
-
-class Mapping:
- def __getitem__(self, name):
- obj = self
- for part in name.split('.'):
- try:
- obj = getattr(obj, part)
- except AttributeError:
- raise KeyError(name)
- return obj
-
-
-class TestTemplate(unittest.TestCase):
- def test_regular_templates(self):
- s = Template('$who likes to eat a bag of $what worth $$100')
- self.assertEqual(s.substitute(dict(who='tim', what='ham')),
- 'tim likes to eat a bag of ham worth $100')
- self.assertRaises(KeyError, s.substitute, dict(who='tim'))
- self.assertRaises(TypeError, Template.substitute)
-
- def test_regular_templates_with_braces(self):
- s = Template('$who likes ${what} for ${meal}')
- d = dict(who='tim', what='ham', meal='dinner')
- self.assertEqual(s.substitute(d), 'tim likes ham for dinner')
- self.assertRaises(KeyError, s.substitute,
- dict(who='tim', what='ham'))
-
- def test_escapes(self):
- eq = self.assertEqual
- s = Template('$who likes to eat a bag of $$what worth $$100')
- eq(s.substitute(dict(who='tim', what='ham')),
- 'tim likes to eat a bag of $what worth $100')
- s = Template('$who likes $$')
- eq(s.substitute(dict(who='tim', what='ham')), 'tim likes $')
-
- def test_percents(self):
- eq = self.assertEqual
- s = Template('%(foo)s $foo ${foo}')
- d = dict(foo='baz')
- eq(s.substitute(d), '%(foo)s baz baz')
- eq(s.safe_substitute(d), '%(foo)s baz baz')
-
- def test_stringification(self):
- eq = self.assertEqual
- s = Template('tim has eaten $count bags of ham today')
- d = dict(count=7)
- eq(s.substitute(d), 'tim has eaten 7 bags of ham today')
- eq(s.safe_substitute(d), 'tim has eaten 7 bags of ham today')
- s = Template('tim has eaten ${count} bags of ham today')
- eq(s.substitute(d), 'tim has eaten 7 bags of ham today')
-
- def test_tupleargs(self):
- eq = self.assertEqual
- s = Template('$who ate ${meal}')
- d = dict(who=('tim', 'fred'), meal=('ham', 'kung pao'))
- eq(s.substitute(d), "('tim', 'fred') ate ('ham', 'kung pao')")
- eq(s.safe_substitute(d), "('tim', 'fred') ate ('ham', 'kung pao')")
-
- def test_SafeTemplate(self):
- eq = self.assertEqual
- s = Template('$who likes ${what} for ${meal}')
- eq(s.safe_substitute(dict(who='tim')), 'tim likes ${what} for ${meal}')
- eq(s.safe_substitute(dict(what='ham')), '$who likes ham for ${meal}')
- eq(s.safe_substitute(dict(what='ham', meal='dinner')),
- '$who likes ham for dinner')
- eq(s.safe_substitute(dict(who='tim', what='ham')),
- 'tim likes ham for ${meal}')
- eq(s.safe_substitute(dict(who='tim', what='ham', meal='dinner')),
- 'tim likes ham for dinner')
-
- def test_invalid_placeholders(self):
- raises = self.assertRaises
- s = Template('$who likes $')
- raises(ValueError, s.substitute, dict(who='tim'))
- s = Template('$who likes ${what)')
- raises(ValueError, s.substitute, dict(who='tim'))
- s = Template('$who likes $100')
- raises(ValueError, s.substitute, dict(who='tim'))
-
- def test_idpattern_override(self):
- class PathPattern(Template):
- idpattern = r'[_a-z][._a-z0-9]*'
- m = Mapping()
- m.bag = Bag()
- m.bag.foo = Bag()
- m.bag.foo.who = 'tim'
- m.bag.what = 'ham'
- s = PathPattern('$bag.foo.who likes to eat a bag of $bag.what')
- self.assertEqual(s.substitute(m), 'tim likes to eat a bag of ham')
-
- def test_pattern_override(self):
- class MyPattern(Template):
- pattern = r"""
- (?P<escaped>@{2}) |
- @(?P<named>[_a-z][._a-z0-9]*) |
- @{(?P<braced>[_a-z][._a-z0-9]*)} |
- (?P<invalid>@)
- """
- m = Mapping()
- m.bag = Bag()
- m.bag.foo = Bag()
- m.bag.foo.who = 'tim'
- m.bag.what = 'ham'
- s = MyPattern('@bag.foo.who likes to eat a bag of @bag.what')
- self.assertEqual(s.substitute(m), 'tim likes to eat a bag of ham')
-
- class BadPattern(Template):
- pattern = r"""
- (?P<badname>.*) |
- (?P<escaped>@{2}) |
- @(?P<named>[_a-z][._a-z0-9]*) |
- @{(?P<braced>[_a-z][._a-z0-9]*)} |
- (?P<invalid>@) |
- """
- s = BadPattern('@bag.foo.who likes to eat a bag of @bag.what')
- self.assertRaises(ValueError, s.substitute, {})
- self.assertRaises(ValueError, s.safe_substitute, {})
-
- def test_braced_override(self):
- class MyTemplate(Template):
- pattern = r"""
- \$(?:
- (?P<escaped>$) |
- (?P<named>[_a-z][_a-z0-9]*) |
- @@(?P<braced>[_a-z][_a-z0-9]*)@@ |
- (?P<invalid>) |
- )
- """
-
- tmpl = 'PyCon in $@@location@@'
- t = MyTemplate(tmpl)
- self.assertRaises(KeyError, t.substitute, {})
- val = t.substitute({'location': 'Cleveland'})
- self.assertEqual(val, 'PyCon in Cleveland')
-
- def test_braced_override_safe(self):
- class MyTemplate(Template):
- pattern = r"""
- \$(?:
- (?P<escaped>$) |
- (?P<named>[_a-z][_a-z0-9]*) |
- @@(?P<braced>[_a-z][_a-z0-9]*)@@ |
- (?P<invalid>) |
- )
- """
-
- tmpl = 'PyCon in $@@location@@'
- t = MyTemplate(tmpl)
- self.assertEqual(t.safe_substitute(), tmpl)
- val = t.safe_substitute({'location': 'Cleveland'})
- self.assertEqual(val, 'PyCon in Cleveland')
-
- def test_invalid_with_no_lines(self):
- # The error formatting for invalid templates
- # has a special case for no data that the default
- # pattern can't trigger (always has at least '$')
- # So we craft a pattern that is always invalid
- # with no leading data.
- class MyTemplate(Template):
- pattern = r"""
- (?P<invalid>) |
- unreachable(
- (?P<named>) |
- (?P<braced>) |
- (?P<escaped>)
- )
- """
- s = MyTemplate('')
- with self.assertRaises(ValueError) as err:
- s.substitute({})
- self.assertIn('line 1, col 1', str(err.exception))
-
- def test_unicode_values(self):
- s = Template('$who likes $what')
- d = dict(who='t\xffm', what='f\xfe\fed')
- self.assertEqual(s.substitute(d), 't\xffm likes f\xfe\x0ced')
-
- def test_keyword_arguments(self):
- eq = self.assertEqual
- s = Template('$who likes $what')
- eq(s.substitute(who='tim', what='ham'), 'tim likes ham')
- eq(s.substitute(dict(who='tim'), what='ham'), 'tim likes ham')
- eq(s.substitute(dict(who='fred', what='kung pao'),
- who='tim', what='ham'),
- 'tim likes ham')
- s = Template('the mapping is $mapping')
- eq(s.substitute(dict(foo='none'), mapping='bozo'),
- 'the mapping is bozo')
- eq(s.substitute(dict(mapping='one'), mapping='two'),
- 'the mapping is two')
-
- s = Template('the self is $self')
- eq(s.substitute(self='bozo'), 'the self is bozo')
-
- def test_keyword_arguments_safe(self):
- eq = self.assertEqual
- raises = self.assertRaises
- s = Template('$who likes $what')
- eq(s.safe_substitute(who='tim', what='ham'), 'tim likes ham')
- eq(s.safe_substitute(dict(who='tim'), what='ham'), 'tim likes ham')
- eq(s.safe_substitute(dict(who='fred', what='kung pao'),
- who='tim', what='ham'),
- 'tim likes ham')
- s = Template('the mapping is $mapping')
- eq(s.safe_substitute(dict(foo='none'), mapping='bozo'),
- 'the mapping is bozo')
- eq(s.safe_substitute(dict(mapping='one'), mapping='two'),
- 'the mapping is two')
- d = dict(mapping='one')
- raises(TypeError, s.substitute, d, {})
- raises(TypeError, s.safe_substitute, d, {})
-
- s = Template('the self is $self')
- eq(s.safe_substitute(self='bozo'), 'the self is bozo')
-
- def test_delimiter_override(self):
- eq = self.assertEqual
- raises = self.assertRaises
- class AmpersandTemplate(Template):
- delimiter = '&'
- s = AmpersandTemplate('this &gift is for &{who} &&')
- eq(s.substitute(gift='bud', who='you'), 'this bud is for you &')
- raises(KeyError, s.substitute)
- eq(s.safe_substitute(gift='bud', who='you'), 'this bud is for you &')
- eq(s.safe_substitute(), 'this &gift is for &{who} &')
- s = AmpersandTemplate('this &gift is for &{who} &')
- raises(ValueError, s.substitute, dict(gift='bud', who='you'))
- eq(s.safe_substitute(), 'this &gift is for &{who} &')
-
- class PieDelims(Template):
- delimiter = '@'
- s = PieDelims('@who likes to eat a bag of @{what} worth $100')
- self.assertEqual(s.substitute(dict(who='tim', what='ham')),
- 'tim likes to eat a bag of ham worth $100')
-
-
-def test_main():
- from test import support
- test_classes = [TestTemplate,]
- support.run_unittest(*test_classes)
-
-
-if __name__ == '__main__':
- test_main()
diff --git a/Lib/test/test_pep3120.py b/Lib/test/test_pep3120.py
index 5b63998cf5..97dced8a62 100644
--- a/Lib/test/test_pep3120.py
+++ b/Lib/test/test_pep3120.py
@@ -1,7 +1,6 @@
# This file is marked as binary in the CVS, to prevent MacCVS from recoding it.
import unittest
-from test import support
class PEP3120Test(unittest.TestCase):
@@ -40,8 +39,5 @@ class BuiltinCompileTests(unittest.TestCase):
self.assertEqual('Ç', ns['u'])
-def test_main():
- support.run_unittest(PEP3120Test, BuiltinCompileTests)
-
-if __name__=="__main__":
- test_main()
+if __name__ == "__main__":
+ unittest.main()
diff --git a/Lib/test/test_pep3131.py b/Lib/test/test_pep3131.py
index 2e6b90a35c..0679845238 100644
--- a/Lib/test/test_pep3131.py
+++ b/Lib/test/test_pep3131.py
@@ -1,6 +1,5 @@
import unittest
import sys
-from test import support
class PEP3131Test(unittest.TestCase):
@@ -28,8 +27,5 @@ class PEP3131Test(unittest.TestCase):
else:
self.fail("expected exception didn't occur")
-def test_main():
- support.run_unittest(PEP3131Test)
-
-if __name__=="__main__":
- test_main()
+if __name__ == "__main__":
+ unittest.main()
diff --git a/Lib/test/test_pep3151.py b/Lib/test/test_pep3151.py
index 7d4a5d8446..7b0d465425 100644
--- a/Lib/test/test_pep3151.py
+++ b/Lib/test/test_pep3151.py
@@ -7,7 +7,6 @@ import unittest
import errno
from errno import EEXIST
-from test import support
class SubOSError(OSError):
pass
@@ -165,7 +164,7 @@ class ExplicitSubclassingTest(unittest.TestCase):
e = SubOSError(EEXIST, "Bad file descriptor")
self.assertIs(type(e), SubOSError)
- def test_init_overriden(self):
+ def test_init_overridden(self):
e = SubOSErrorWithInit("some message", "baz")
self.assertEqual(e.bar, "baz")
self.assertEqual(e.args, ("some message",))
@@ -175,7 +174,7 @@ class ExplicitSubclassingTest(unittest.TestCase):
self.assertEqual(e.bar, "baz")
self.assertEqual(e.args, ("some message",))
- def test_new_overriden(self):
+ def test_new_overridden(self):
e = SubOSErrorWithNew("some message", "baz")
self.assertEqual(e.baz, "baz")
self.assertEqual(e.args, ("some message",))
@@ -185,7 +184,7 @@ class ExplicitSubclassingTest(unittest.TestCase):
self.assertEqual(e.baz, "baz")
self.assertEqual(e.args, ("some message",))
- def test_init_new_overriden(self):
+ def test_init_new_overridden(self):
e = SubOSErrorCombinedInitFirst("some message", "baz")
self.assertEqual(e.bar, "baz")
self.assertEqual(e.baz, "baz")
@@ -202,8 +201,5 @@ class ExplicitSubclassingTest(unittest.TestCase):
self.assertEqual(str(e), '')
-def test_main():
- support.run_unittest(__name__)
-
-if __name__=="__main__":
- test_main()
+if __name__ == "__main__":
+ unittest.main()
diff --git a/Lib/test/test_pep380.py b/Lib/test/test_pep380.py
index 69194df9e7..23ffbed447 100644
--- a/Lib/test/test_pep380.py
+++ b/Lib/test/test_pep380.py
@@ -1013,11 +1013,5 @@ class TestPEP380Operation(unittest.TestCase):
self.assertEqual(v, (1, 2, 3, 4))
-def test_main():
- from test import support
- test_classes = [TestPEP380Operation]
- support.run_unittest(*test_classes)
-
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_pep479.py b/Lib/test/test_pep479.py
new file mode 100644
index 0000000000..bc235ceb00
--- /dev/null
+++ b/Lib/test/test_pep479.py
@@ -0,0 +1,34 @@
+from __future__ import generator_stop
+
+import unittest
+
+
+class TestPEP479(unittest.TestCase):
+ def test_stopiteration_wrapping(self):
+ def f():
+ raise StopIteration
+ def g():
+ yield f()
+ with self.assertRaisesRegex(RuntimeError,
+ "generator raised StopIteration"):
+ next(g())
+
+ def test_stopiteration_wrapping_context(self):
+ def f():
+ raise StopIteration
+ def g():
+ yield f()
+
+ try:
+ next(g())
+ except RuntimeError as exc:
+ self.assertIs(type(exc.__cause__), StopIteration)
+ self.assertIs(type(exc.__context__), StopIteration)
+ self.assertTrue(exc.__suppress_context__)
+ else:
+ self.fail('__cause__, __context__, or __suppress_context__ '
+ 'were not properly set')
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/Lib/test/test_pickle.py b/Lib/test/test_pickle.py
index f6d9cc0e5f..ee7a667d06 100644
--- a/Lib/test/test_pickle.py
+++ b/Lib/test/test_pickle.py
@@ -244,6 +244,8 @@ if has_c_implementation:
ALT_IMPORT_MAPPING = {
('_elementtree', 'xml.etree.ElementTree'),
('cPickle', 'pickle'),
+ ('StringIO', 'io'),
+ ('cStringIO', 'io'),
}
ALT_NAME_MAPPING = {
@@ -382,7 +384,10 @@ class CompatPickleTests(unittest.TestCase):
for name, exc in get_exceptions(builtins):
with self.subTest(name):
- if exc in (BlockingIOError, ResourceWarning):
+ if exc in (BlockingIOError,
+ ResourceWarning,
+ StopAsyncIteration,
+ RecursionError):
continue
if exc is not OSError and issubclass(exc, OSError):
self.assertEqual(reverse_mapping('builtins', name),
diff --git a/Lib/test/test_pkg.py b/Lib/test/test_pkg.py
index 9883000945..532e8fe6d0 100644
--- a/Lib/test/test_pkg.py
+++ b/Lib/test/test_pkg.py
@@ -291,9 +291,5 @@ class TestPkg(unittest.TestCase):
import t8
self.assertEqual(t8.__doc__, "doc for t8")
-def test_main():
- support.run_unittest(__name__)
-
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_pkgimport.py b/Lib/test/test_pkgimport.py
index 370b2aae28..5d9a451119 100644
--- a/Lib/test/test_pkgimport.py
+++ b/Lib/test/test_pkgimport.py
@@ -7,7 +7,7 @@ import tempfile
import unittest
from importlib.util import cache_from_source
-from test.support import run_unittest, create_empty_file
+from test.support import create_empty_file
class TestImport(unittest.TestCase):
@@ -76,9 +76,5 @@ class TestImport(unittest.TestCase):
self.assertEqual(getattr(module, var), 1)
-def test_main():
- run_unittest(TestImport)
-
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_pkgutil.py b/Lib/test/test_pkgutil.py
index e0c8635de1..57ebf1fd7f 100644
--- a/Lib/test/test_pkgutil.py
+++ b/Lib/test/test_pkgutil.py
@@ -104,6 +104,9 @@ class PkgutilTests(unittest.TestCase):
class PkgutilPEP302Tests(unittest.TestCase):
class MyTestLoader(object):
+ def create_module(self, spec):
+ return None
+
def exec_module(self, mod):
# Count how many times the module is reloaded
mod.__dict__['loads'] = mod.__dict__.get('loads', 0) + 1
diff --git a/Lib/test/test_platform.py b/Lib/test/test_platform.py
index b3de43b7ab..ed18773326 100644
--- a/Lib/test/test_platform.py
+++ b/Lib/test/test_platform.py
@@ -76,6 +76,22 @@ class PlatformTest(unittest.TestCase):
('IronPython', '1.0.60816', '', '', '', '', '.NET 2.0.50727.42')),
('IronPython 1.0 (1.0.61005.1977) on .NET 2.0.50727.42',
('IronPython', '1.0.0', '', '', '', '', '.NET 2.0.50727.42')),
+ ('2.4.3 (truncation, date, t) \n[GCC]',
+ ('CPython', '2.4.3', '', '', 'truncation', 'date t', 'GCC')),
+ ('2.4.3 (truncation, date, ) \n[GCC]',
+ ('CPython', '2.4.3', '', '', 'truncation', 'date', 'GCC')),
+ ('2.4.3 (truncation, date,) \n[GCC]',
+ ('CPython', '2.4.3', '', '', 'truncation', 'date', 'GCC')),
+ ('2.4.3 (truncation, date) \n[GCC]',
+ ('CPython', '2.4.3', '', '', 'truncation', 'date', 'GCC')),
+ ('2.4.3 (truncation, d) \n[GCC]',
+ ('CPython', '2.4.3', '', '', 'truncation', 'd', 'GCC')),
+ ('2.4.3 (truncation, ) \n[GCC]',
+ ('CPython', '2.4.3', '', '', 'truncation', '', 'GCC')),
+ ('2.4.3 (truncation,) \n[GCC]',
+ ('CPython', '2.4.3', '', '', 'truncation', '', 'GCC')),
+ ('2.4.3 (truncation) \n[GCC]',
+ ('CPython', '2.4.3', '', '', 'truncation', '', 'GCC')),
):
# branch and revision are not "parsed", but fetched
# from sys._mercurial. Ignore them
@@ -236,7 +252,14 @@ class PlatformTest(unittest.TestCase):
self.assertEqual(sts, 0)
def test_dist(self):
- res = platform.dist()
+ with warnings.catch_warnings():
+ warnings.filterwarnings(
+ 'ignore',
+ 'dist\(\) and linux_distribution\(\) '
+ 'functions are deprecated .*',
+ PendingDeprecationWarning,
+ )
+ res = platform.dist()
def test_libc_ver(self):
import os
@@ -305,16 +328,35 @@ class PlatformTest(unittest.TestCase):
f.write('Fedora release 19 (Schr\xf6dinger\u2019s Cat)\n')
with mock.patch('platform._UNIXCONFDIR', tempdir):
- distname, version, distid = platform.linux_distribution()
-
- self.assertEqual(distname, 'Fedora')
+ with warnings.catch_warnings():
+ warnings.filterwarnings(
+ 'ignore',
+ 'dist\(\) and linux_distribution\(\) '
+ 'functions are deprecated .*',
+ PendingDeprecationWarning,
+ )
+ distname, version, distid = platform.linux_distribution()
+
+ self.assertEqual(distname, 'Fedora')
self.assertEqual(version, '19')
self.assertEqual(distid, 'Schr\xf6dinger\u2019s Cat')
-def test_main():
- support.run_unittest(
- PlatformTest
- )
+
+class DeprecationTest(unittest.TestCase):
+
+ def test_dist_deprecation(self):
+ with self.assertWarns(PendingDeprecationWarning) as cm:
+ platform.dist()
+ self.assertEqual(str(cm.warning),
+ 'dist() and linux_distribution() functions are '
+ 'deprecated in Python 3.5')
+
+ def test_linux_distribution_deprecation(self):
+ with self.assertWarns(PendingDeprecationWarning) as cm:
+ platform.linux_distribution()
+ self.assertEqual(str(cm.warning),
+ 'dist() and linux_distribution() functions are '
+ 'deprecated in Python 3.5')
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_plistlib.py b/Lib/test/test_plistlib.py
index fef9f39972..16114f9f6f 100644
--- a/Lib/test/test_plistlib.py
+++ b/Lib/test/test_plistlib.py
@@ -428,6 +428,15 @@ class TestPlistlib(unittest.TestCase):
b'\x00\x00\x00\x00\x00\x00\x00\x13')
self.assertEqual(plistlib.loads(data), {'a': 'b'})
+ def test_large_timestamp(self):
+ # Issue #26709: 32-bit timestamp out of range
+ for ts in -2**31-1, 2**31:
+ with self.subTest(ts=ts):
+ d = (datetime.datetime.utcfromtimestamp(0) +
+ datetime.timedelta(seconds=ts))
+ data = plistlib.dumps(d, fmt=plistlib.FMT_BINARY)
+ self.assertEqual(plistlib.loads(data), d)
+
class TestPlistlibDeprecated(unittest.TestCase):
def test_io_deprecated(self):
@@ -506,15 +515,15 @@ class TestPlistlibDeprecated(unittest.TestCase):
cur = plistlib.loads(buf)
self.assertEqual(cur, out_data)
- self.assertNotEqual(cur, in_data)
+ self.assertEqual(cur, in_data)
cur = plistlib.loads(buf, use_builtin_types=False)
- self.assertNotEqual(cur, out_data)
+ self.assertEqual(cur, out_data)
self.assertEqual(cur, in_data)
with self.assertWarns(DeprecationWarning):
cur = plistlib.readPlistFromBytes(buf)
- self.assertNotEqual(cur, out_data)
+ self.assertEqual(cur, out_data)
self.assertEqual(cur, in_data)
diff --git a/Lib/test/test_popen.py b/Lib/test/test_popen.py
index 116b3dd596..da01a878fa 100644
--- a/Lib/test/test_popen.py
+++ b/Lib/test/test_popen.py
@@ -61,8 +61,5 @@ class PopenTest(unittest.TestCase):
with os.popen(cmd="exit 0", mode="w", buffering=-1):
pass
-def test_main():
- support.run_unittest(PopenTest)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_poplib.py b/Lib/test/test_poplib.py
index 8a3c9f42fa..bceeb93ad1 100644
--- a/Lib/test/test_poplib.py
+++ b/Lib/test/test_poplib.py
@@ -44,6 +44,7 @@ line3\r\n\
class DummyPOP3Handler(asynchat.async_chat):
CAPAS = {'UIDL': [], 'IMPLEMENTATION': ['python-testlib-pop-server']}
+ enable_UTF8 = False
def __init__(self, conn):
asynchat.async_chat.__init__(self, conn)
@@ -142,6 +143,11 @@ class DummyPOP3Handler(asynchat.async_chat):
self.push(' '.join(_ln))
self.push('.')
+ def cmd_utf8(self, arg):
+ self.push('+OK I know RFC6856'
+ if self.enable_UTF8
+ else '-ERR What is UTF8?!')
+
if SUPPORTS_SSL:
def cmd_stls(self, arg):
@@ -309,6 +315,16 @@ class TestPOP3Class(TestCase):
self.client.uidl()
self.client.uidl('foo')
+ def test_utf8_raises_if_unsupported(self):
+ self.server.handler.enable_UTF8 = False
+ self.assertRaises(poplib.error_proto, self.client.utf8)
+
+ def test_utf8(self):
+ self.server.handler.enable_UTF8 = True
+ expected = b'+OK I know RFC6856'
+ result = self.client.utf8()
+ self.assertEqual(result, expected)
+
def test_capa(self):
capa = self.client.capa()
self.assertTrue('IMPLEMENTATION' in capa.keys())
@@ -345,23 +361,18 @@ class TestPOP3Class(TestCase):
if SUPPORTS_SSL:
+ from test.test_ftplib import SSLConnection
- class DummyPOP3_SSLHandler(DummyPOP3Handler):
+ class DummyPOP3_SSLHandler(SSLConnection, DummyPOP3Handler):
def __init__(self, conn):
asynchat.async_chat.__init__(self, conn)
- ssl_socket = ssl.wrap_socket(self.socket, certfile=CERTFILE,
- server_side=True,
- do_handshake_on_connect=False)
- self.del_channel()
- self.set_socket(ssl_socket)
- # Must try handshake before calling push()
- self.tls_active = True
- self.tls_starting = True
- self._do_tls_handshake()
+ self.secure_connection()
self.set_terminator(b"\r\n")
self.in_buffer = []
self.push('+OK dummy pop3 server ready. <timestamp>')
+ self.tls_active = True
+ self.tls_starting = False
@requires_ssl
@@ -452,7 +463,7 @@ class TestTimeouts(TestCase):
del self.thread # Clear out any dangling Thread objects.
def server(self, evt, serv):
- serv.listen(5)
+ serv.listen()
evt.set()
try:
conn, addr = serv.accept()
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py
index d7679896ce..2a59c38174 100644
--- a/Lib/test/test_posix.py
+++ b/Lib/test/test_posix.py
@@ -9,7 +9,6 @@ import errno
import sys
import time
import os
-import fcntl
import platform
import pwd
import shutil
@@ -355,7 +354,7 @@ class PosixTester(unittest.TestCase):
def test_oscloexec(self):
fd = os.open(support.TESTFN, os.O_RDONLY|os.O_CLOEXEC)
self.addCleanup(os.close, fd)
- self.assertTrue(fcntl.fcntl(fd, fcntl.F_GETFD) & fcntl.FD_CLOEXEC)
+ self.assertFalse(os.get_inheritable(fd))
@unittest.skipUnless(hasattr(posix, 'O_EXLOCK'),
'test needs posix.O_EXLOCK')
@@ -643,8 +642,8 @@ class PosixTester(unittest.TestCase):
self.addCleanup(os.close, w)
self.assertFalse(os.get_inheritable(r))
self.assertFalse(os.get_inheritable(w))
- self.assertTrue(fcntl.fcntl(r, fcntl.F_GETFL) & os.O_NONBLOCK)
- self.assertTrue(fcntl.fcntl(w, fcntl.F_GETFL) & os.O_NONBLOCK)
+ self.assertFalse(os.get_blocking(r))
+ self.assertFalse(os.get_blocking(w))
# try reading from an empty pipe: this should fail, not block
self.assertRaises(OSError, os.read, r, 1)
# try a write big enough to fill-up the pipe: this should either
@@ -1184,16 +1183,16 @@ class PosixTester(unittest.TestCase):
support.unlink(fn)
fd = None
try:
- with self.assertRaises(TypeError):
+ with self.assertRaises(ValueError):
fd = os.open(fn_with_NUL, os.O_WRONLY | os.O_CREAT) # raises
finally:
if fd is not None:
os.close(fd)
self.assertFalse(os.path.exists(fn))
- self.assertRaises(TypeError, os.mkdir, fn_with_NUL)
+ self.assertRaises(ValueError, os.mkdir, fn_with_NUL)
self.assertFalse(os.path.exists(fn))
open(fn, 'wb').close()
- self.assertRaises(TypeError, os.stat, fn_with_NUL)
+ self.assertRaises(ValueError, os.stat, fn_with_NUL)
def test_path_with_null_byte(self):
fn = os.fsencode(support.TESTFN)
diff --git a/Lib/test/test_posixpath.py b/Lib/test/test_posixpath.py
index 1d4596e7b1..acf110204c 100644
--- a/Lib/test/test_posixpath.py
+++ b/Lib/test/test_posixpath.py
@@ -57,18 +57,6 @@ class PosixPathTest(unittest.TestCase):
self.assertEqual(posixpath.join(b"/foo/", b"bar/", b"baz/"),
b"/foo/bar/baz/")
- def test_join_errors(self):
- # Check posixpath.join raises friendly TypeErrors.
- errmsg = "Can't mix strings and bytes in path components"
- with self.assertRaisesRegex(TypeError, errmsg):
- posixpath.join(b'bytes', 'str')
- with self.assertRaisesRegex(TypeError, errmsg):
- posixpath.join('str', b'bytes')
- # regression, see #15377
- with self.assertRaises(TypeError) as cm:
- posixpath.join(None, 'str')
- self.assertNotEqual(cm.exception.args[0], errmsg)
-
def test_split(self):
self.assertEqual(posixpath.split("/foo/bar"), ("/foo", "bar"))
self.assertEqual(posixpath.split("/"), ("/", ""))
@@ -228,6 +216,13 @@ class PosixPathTest(unittest.TestCase):
def test_expanduser(self):
self.assertEqual(posixpath.expanduser("foo"), "foo")
self.assertEqual(posixpath.expanduser(b"foo"), b"foo")
+ with support.EnvironmentVarGuard() as env:
+ for home in '/', '', '//', '///':
+ with self.subTest(home=home):
+ env['HOME'] = home
+ self.assertEqual(posixpath.expanduser("~"), "/")
+ self.assertEqual(posixpath.expanduser("~/"), "/")
+ self.assertEqual(posixpath.expanduser("~/foo"), "/foo")
try:
import pwd
except ImportError:
@@ -251,14 +246,12 @@ class PosixPathTest(unittest.TestCase):
self.assertIsInstance(posixpath.expanduser(b"~foo/"), bytes)
with support.EnvironmentVarGuard() as env:
- env['HOME'] = '/'
- self.assertEqual(posixpath.expanduser("~"), "/")
- self.assertEqual(posixpath.expanduser("~/foo"), "/foo")
# expanduser should fall back to using the password database
del env['HOME']
home = pwd.getpwuid(os.getuid()).pw_dir
# $HOME can end with a trailing /, so strip it (see #17809)
- self.assertEqual(posixpath.expanduser("~"), home.rstrip("/"))
+ home = home.rstrip("/") or '/'
+ self.assertEqual(posixpath.expanduser("~"), home)
def test_normpath(self):
self.assertEqual(posixpath.normpath(""), ".")
@@ -523,6 +516,60 @@ class PosixPathTest(unittest.TestCase):
finally:
os.getcwdb = real_getcwdb
+ def test_commonpath(self):
+ def check(paths, expected):
+ self.assertEqual(posixpath.commonpath(paths), expected)
+ self.assertEqual(posixpath.commonpath([os.fsencode(p) for p in paths]),
+ os.fsencode(expected))
+ def check_error(exc, paths):
+ self.assertRaises(exc, posixpath.commonpath, paths)
+ self.assertRaises(exc, posixpath.commonpath,
+ [os.fsencode(p) for p in paths])
+
+ self.assertRaises(ValueError, posixpath.commonpath, [])
+ check_error(ValueError, ['/usr', 'usr'])
+ check_error(ValueError, ['usr', '/usr'])
+
+ check(['/usr/local'], '/usr/local')
+ check(['/usr/local', '/usr/local'], '/usr/local')
+ check(['/usr/local/', '/usr/local'], '/usr/local')
+ check(['/usr/local/', '/usr/local/'], '/usr/local')
+ check(['/usr//local', '//usr/local'], '/usr/local')
+ check(['/usr/./local', '/./usr/local'], '/usr/local')
+ check(['/', '/dev'], '/')
+ check(['/usr', '/dev'], '/')
+ check(['/usr/lib/', '/usr/lib/python3'], '/usr/lib')
+ check(['/usr/lib/', '/usr/lib64/'], '/usr')
+
+ check(['/usr/lib', '/usr/lib64'], '/usr')
+ check(['/usr/lib/', '/usr/lib64'], '/usr')
+
+ check(['spam'], 'spam')
+ check(['spam', 'spam'], 'spam')
+ check(['spam', 'alot'], '')
+ check(['and/jam', 'and/spam'], 'and')
+ check(['and//jam', 'and/spam//'], 'and')
+ check(['and/./jam', './and/spam'], 'and')
+ check(['and/jam', 'and/spam', 'alot'], '')
+ check(['and/jam', 'and/spam', 'and'], 'and')
+
+ check([''], '')
+ check(['', 'spam/alot'], '')
+ check_error(ValueError, ['', '/spam/alot'])
+
+ self.assertRaises(TypeError, posixpath.commonpath,
+ [b'/usr/lib/', '/usr/lib/python3'])
+ self.assertRaises(TypeError, posixpath.commonpath,
+ [b'/usr/lib/', 'usr/lib/python3'])
+ self.assertRaises(TypeError, posixpath.commonpath,
+ [b'usr/lib/', '/usr/lib/python3'])
+ self.assertRaises(TypeError, posixpath.commonpath,
+ ['/usr/lib/', b'/usr/lib/python3'])
+ self.assertRaises(TypeError, posixpath.commonpath,
+ ['/usr/lib/', b'usr/lib/python3'])
+ self.assertRaises(TypeError, posixpath.commonpath,
+ ['usr/lib/', b'/usr/lib/python3'])
+
class PosixCommonTest(test_genericpath.CommonTest, unittest.TestCase):
pathmodule = posixpath
diff --git a/Lib/test/test_pow.py b/Lib/test/test_pow.py
index 20b10663a2..6feac409bd 100644
--- a/Lib/test/test_pow.py
+++ b/Lib/test/test_pow.py
@@ -122,8 +122,5 @@ class PowTest(unittest.TestCase):
eq(pow(a, -fiveto), expected)
eq(expected, 1.0) # else we didn't push fiveto to evenness
-def test_main():
- test.support.run_unittest(PowTest)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_pprint.py b/Lib/test/test_pprint.py
index 180ddb0f82..7ebc298337 100644
--- a/Lib/test/test_pprint.py
+++ b/Lib/test/test_pprint.py
@@ -1,12 +1,14 @@
# -*- coding: utf-8 -*-
+import collections
+import io
+import itertools
import pprint
+import random
import test.support
-import unittest
import test.test_set
-import random
-import collections
-import itertools
+import types
+import unittest
# list, tuple and dict subclasses that do or don't overwrite __repr__
class list2(list):
@@ -48,6 +50,25 @@ class Unorderable:
def __repr__(self):
return str(id(self))
+# Class Orderable is orderable with any type
+class Orderable:
+ def __init__(self, hash):
+ self._hash = hash
+ def __lt__(self, other):
+ return False
+ def __gt__(self, other):
+ return self != other
+ def __le__(self, other):
+ return self == other
+ def __ge__(self, other):
+ return True
+ def __eq__(self, other):
+ return self is other
+ def __ne__(self, other):
+ return self is not other
+ def __hash__(self):
+ return self._hash
+
class QueryTestCase(unittest.TestCase):
def setUp(self):
@@ -55,6 +76,18 @@ class QueryTestCase(unittest.TestCase):
self.b = list(range(200))
self.a[-12] = self.b
+ def test_init(self):
+ pp = pprint.PrettyPrinter()
+ pp = pprint.PrettyPrinter(indent=4, width=40, depth=5,
+ stream=io.StringIO(), compact=True)
+ pp = pprint.PrettyPrinter(4, 40, 5, io.StringIO())
+ with self.assertRaises(TypeError):
+ pp = pprint.PrettyPrinter(4, 40, 5, io.StringIO(), True)
+ self.assertRaises(ValueError, pprint.PrettyPrinter, indent=-1)
+ self.assertRaises(ValueError, pprint.PrettyPrinter, depth=0)
+ self.assertRaises(ValueError, pprint.PrettyPrinter, depth=-1)
+ self.assertRaises(ValueError, pprint.PrettyPrinter, width=0)
+
def test_basic(self):
# Verify .isrecursive() and .isreadable() w/o recursion
pp = pprint.PrettyPrinter()
@@ -195,10 +228,52 @@ class QueryTestCase(unittest.TestCase):
o = [o1, o2]
expected = """\
[ [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
+ {'first': 1, 'second': 2, 'third': 3}]"""
+ self.assertEqual(pprint.pformat(o, indent=4, width=42), expected)
+ expected = """\
+[ [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
{ 'first': 1,
'second': 2,
'third': 3}]"""
- self.assertEqual(pprint.pformat(o, indent=4, width=42), expected)
+ self.assertEqual(pprint.pformat(o, indent=4, width=41), expected)
+
+ def test_width(self):
+ expected = """\
+[[[[[[1, 2, 3],
+ '1 2']]]],
+ {1: [1, 2, 3],
+ 2: [12, 34]},
+ 'abc def ghi',
+ ('ab cd ef',),
+ set2({1, 23}),
+ [[[[[1, 2, 3],
+ '1 2']]]]]"""
+ o = eval(expected)
+ self.assertEqual(pprint.pformat(o, width=15), expected)
+ self.assertEqual(pprint.pformat(o, width=16), expected)
+ self.assertEqual(pprint.pformat(o, width=25), expected)
+ self.assertEqual(pprint.pformat(o, width=14), """\
+[[[[[[1,
+ 2,
+ 3],
+ '1 '
+ '2']]]],
+ {1: [1,
+ 2,
+ 3],
+ 2: [12,
+ 34]},
+ 'abc def '
+ 'ghi',
+ ('ab cd '
+ 'ef',),
+ set2({1,
+ 23}),
+ [[[[[1,
+ 2,
+ 3],
+ '1 '
+ '2']]]]]""")
def test_sorted_dict(self):
# Starting in Python 2.5, pprint sorts dict displays by key regardless
@@ -219,19 +294,51 @@ class QueryTestCase(unittest.TestCase):
r"{5: [[]], 'xy\tab\n': (3,), (): {}}")
def test_ordered_dict(self):
+ d = collections.OrderedDict()
+ self.assertEqual(pprint.pformat(d, width=1), 'OrderedDict()')
+ d = collections.OrderedDict([])
+ self.assertEqual(pprint.pformat(d, width=1), 'OrderedDict()')
words = 'the quick brown fox jumped over a lazy dog'.split()
d = collections.OrderedDict(zip(words, itertools.count()))
self.assertEqual(pprint.pformat(d),
"""\
-{'the': 0,
- 'quick': 1,
- 'brown': 2,
- 'fox': 3,
- 'jumped': 4,
- 'over': 5,
- 'a': 6,
- 'lazy': 7,
- 'dog': 8}""")
+OrderedDict([('the', 0),
+ ('quick', 1),
+ ('brown', 2),
+ ('fox', 3),
+ ('jumped', 4),
+ ('over', 5),
+ ('a', 6),
+ ('lazy', 7),
+ ('dog', 8)])""")
+
+ def test_mapping_proxy(self):
+ words = 'the quick brown fox jumped over a lazy dog'.split()
+ d = dict(zip(words, itertools.count()))
+ m = types.MappingProxyType(d)
+ self.assertEqual(pprint.pformat(m), """\
+mappingproxy({'a': 6,
+ 'brown': 2,
+ 'dog': 8,
+ 'fox': 3,
+ 'jumped': 4,
+ 'lazy': 7,
+ 'over': 5,
+ 'quick': 1,
+ 'the': 0})""")
+ d = collections.OrderedDict(zip(words, itertools.count()))
+ m = types.MappingProxyType(d)
+ self.assertEqual(pprint.pformat(m), """\
+mappingproxy(OrderedDict([('the', 0),
+ ('quick', 1),
+ ('brown', 2),
+ ('fox', 3),
+ ('jumped', 4),
+ ('over', 5),
+ ('a', 6),
+ ('lazy', 7),
+ ('dog', 8)]))""")
+
def test_subclassing(self):
o = {'names with spaces': 'should be presented using repr()',
'others.should.not.be': 'like.this'}
@@ -535,16 +642,35 @@ frozenset2({0,
self.assertEqual(pprint.pformat(dict.fromkeys(keys, 0)),
'{%r: 0, %r: 0}' % tuple(sorted(keys, key=id)))
+ def test_sort_orderable_and_unorderable_values(self):
+ # Issue 22721: sorted pprints is not stable
+ a = Unorderable()
+ b = Orderable(hash(a)) # should have the same hash value
+ # self-test
+ self.assertLess(a, b)
+ self.assertLess(str(type(b)), str(type(a)))
+ self.assertEqual(sorted([b, a]), [a, b])
+ self.assertEqual(sorted([a, b]), [a, b])
+ # set
+ self.assertEqual(pprint.pformat(set([b, a]), width=1),
+ '{%r,\n %r}' % (a, b))
+ self.assertEqual(pprint.pformat(set([a, b]), width=1),
+ '{%r,\n %r}' % (a, b))
+ # dict
+ self.assertEqual(pprint.pformat(dict.fromkeys([b, a]), width=1),
+ '{%r: None,\n %r: None}' % (a, b))
+ self.assertEqual(pprint.pformat(dict.fromkeys([a, b]), width=1),
+ '{%r: None,\n %r: None}' % (a, b))
+
def test_str_wrap(self):
# pprint tries to wrap strings intelligently
fox = 'the quick brown fox jumped over a lazy dog'
- self.assertEqual(pprint.pformat(fox, width=20), """\
-('the quick '
- 'brown fox '
- 'jumped over a '
- 'lazy dog')""")
+ self.assertEqual(pprint.pformat(fox, width=19), """\
+('the quick brown '
+ 'fox jumped over '
+ 'a lazy dog')""")
self.assertEqual(pprint.pformat({'a': 1, 'b': fox, 'c': 2},
- width=26), """\
+ width=25), """\
{'a': 1,
'b': 'the quick brown '
'fox jumped over '
@@ -556,12 +682,34 @@ frozenset2({0,
# - non-ASCII is allowed
# - an apostrophe doesn't disrupt the pprint
special = "Portons dix bons \"whiskys\"\nà l'avocat goujat\t qui fumait au zoo"
- self.assertEqual(pprint.pformat(special, width=21), """\
-('Portons dix '
- 'bons "whiskys"\\n'
+ self.assertEqual(pprint.pformat(special, width=68), repr(special))
+ self.assertEqual(pprint.pformat(special, width=31), """\
+('Portons dix bons "whiskys"\\n'
+ "à l'avocat goujat\\t qui "
+ 'fumait au zoo')""")
+ self.assertEqual(pprint.pformat(special, width=20), """\
+('Portons dix bons '
+ '"whiskys"\\n'
"à l'avocat "
'goujat\\t qui '
'fumait au zoo')""")
+ self.assertEqual(pprint.pformat([[[[[special]]]]], width=35), """\
+[[[[['Portons dix bons "whiskys"\\n'
+ "à l'avocat goujat\\t qui "
+ 'fumait au zoo']]]]]""")
+ self.assertEqual(pprint.pformat([[[[[special]]]]], width=25), """\
+[[[[['Portons dix bons '
+ '"whiskys"\\n'
+ "à l'avocat "
+ 'goujat\\t qui '
+ 'fumait au zoo']]]]]""")
+ self.assertEqual(pprint.pformat([[[[[special]]]]], width=23), """\
+[[[[['Portons dix '
+ 'bons "whiskys"\\n'
+ "à l'avocat "
+ 'goujat\\t qui '
+ 'fumait au '
+ 'zoo']]]]]""")
# An unwrappable string is formatted as its repr
unwrappable = "x" * 100
self.assertEqual(pprint.pformat(unwrappable, width=80), repr(unwrappable))
@@ -584,7 +732,267 @@ frozenset2({0,
14, 15],
[], [0], [0, 1], [0, 1, 2], [0, 1, 2, 3],
[0, 1, 2, 3, 4]]"""
- self.assertEqual(pprint.pformat(o, width=48, compact=True), expected)
+ self.assertEqual(pprint.pformat(o, width=47, compact=True), expected)
+
+ def test_compact_width(self):
+ levels = 20
+ number = 10
+ o = [0] * number
+ for i in range(levels - 1):
+ o = [o]
+ for w in range(levels * 2 + 1, levels + 3 * number - 1):
+ lines = pprint.pformat(o, width=w, compact=True).splitlines()
+ maxwidth = max(map(len, lines))
+ self.assertLessEqual(maxwidth, w)
+ self.assertGreater(maxwidth, w - 3)
+
+ def test_bytes_wrap(self):
+ self.assertEqual(pprint.pformat(b'', width=1), "b''")
+ self.assertEqual(pprint.pformat(b'abcd', width=1), "b'abcd'")
+ letters = b'abcdefghijklmnopqrstuvwxyz'
+ self.assertEqual(pprint.pformat(letters, width=29), repr(letters))
+ self.assertEqual(pprint.pformat(letters, width=19), """\
+(b'abcdefghijkl'
+ b'mnopqrstuvwxyz')""")
+ self.assertEqual(pprint.pformat(letters, width=18), """\
+(b'abcdefghijkl'
+ b'mnopqrstuvwx'
+ b'yz')""")
+ self.assertEqual(pprint.pformat(letters, width=16), """\
+(b'abcdefghijkl'
+ b'mnopqrstuvwx'
+ b'yz')""")
+ special = bytes(range(16))
+ self.assertEqual(pprint.pformat(special, width=61), repr(special))
+ self.assertEqual(pprint.pformat(special, width=48), """\
+(b'\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b'
+ b'\\x0c\\r\\x0e\\x0f')""")
+ self.assertEqual(pprint.pformat(special, width=32), """\
+(b'\\x00\\x01\\x02\\x03'
+ b'\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b'
+ b'\\x0c\\r\\x0e\\x0f')""")
+ self.assertEqual(pprint.pformat(special, width=1), """\
+(b'\\x00\\x01\\x02\\x03'
+ b'\\x04\\x05\\x06\\x07'
+ b'\\x08\\t\\n\\x0b'
+ b'\\x0c\\r\\x0e\\x0f')""")
+ self.assertEqual(pprint.pformat({'a': 1, 'b': letters, 'c': 2},
+ width=21), """\
+{'a': 1,
+ 'b': b'abcdefghijkl'
+ b'mnopqrstuvwx'
+ b'yz',
+ 'c': 2}""")
+ self.assertEqual(pprint.pformat({'a': 1, 'b': letters, 'c': 2},
+ width=20), """\
+{'a': 1,
+ 'b': b'abcdefgh'
+ b'ijklmnop'
+ b'qrstuvwxyz',
+ 'c': 2}""")
+ self.assertEqual(pprint.pformat([[[[[[letters]]]]]], width=25), """\
+[[[[[[b'abcdefghijklmnop'
+ b'qrstuvwxyz']]]]]]""")
+ self.assertEqual(pprint.pformat([[[[[[special]]]]]], width=41), """\
+[[[[[[b'\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07'
+ b'\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f']]]]]]""")
+ # Check that the pprint is a usable repr
+ for width in range(1, 64):
+ formatted = pprint.pformat(special, width=width)
+ self.assertEqual(eval(formatted), special)
+ formatted = pprint.pformat([special] * 2, width=width)
+ self.assertEqual(eval(formatted), [special] * 2)
+
+ def test_bytearray_wrap(self):
+ self.assertEqual(pprint.pformat(bytearray(), width=1), "bytearray(b'')")
+ letters = bytearray(b'abcdefghijklmnopqrstuvwxyz')
+ self.assertEqual(pprint.pformat(letters, width=40), repr(letters))
+ self.assertEqual(pprint.pformat(letters, width=28), """\
+bytearray(b'abcdefghijkl'
+ b'mnopqrstuvwxyz')""")
+ self.assertEqual(pprint.pformat(letters, width=27), """\
+bytearray(b'abcdefghijkl'
+ b'mnopqrstuvwx'
+ b'yz')""")
+ self.assertEqual(pprint.pformat(letters, width=25), """\
+bytearray(b'abcdefghijkl'
+ b'mnopqrstuvwx'
+ b'yz')""")
+ special = bytearray(range(16))
+ self.assertEqual(pprint.pformat(special, width=72), repr(special))
+ self.assertEqual(pprint.pformat(special, width=57), """\
+bytearray(b'\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b'
+ b'\\x0c\\r\\x0e\\x0f')""")
+ self.assertEqual(pprint.pformat(special, width=41), """\
+bytearray(b'\\x00\\x01\\x02\\x03'
+ b'\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b'
+ b'\\x0c\\r\\x0e\\x0f')""")
+ self.assertEqual(pprint.pformat(special, width=1), """\
+bytearray(b'\\x00\\x01\\x02\\x03'
+ b'\\x04\\x05\\x06\\x07'
+ b'\\x08\\t\\n\\x0b'
+ b'\\x0c\\r\\x0e\\x0f')""")
+ self.assertEqual(pprint.pformat({'a': 1, 'b': letters, 'c': 2},
+ width=31), """\
+{'a': 1,
+ 'b': bytearray(b'abcdefghijkl'
+ b'mnopqrstuvwx'
+ b'yz'),
+ 'c': 2}""")
+ self.assertEqual(pprint.pformat([[[[[letters]]]]], width=37), """\
+[[[[[bytearray(b'abcdefghijklmnop'
+ b'qrstuvwxyz')]]]]]""")
+ self.assertEqual(pprint.pformat([[[[[special]]]]], width=50), """\
+[[[[[bytearray(b'\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07'
+ b'\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f')]]]]]""")
+
+ def test_default_dict(self):
+ d = collections.defaultdict(int)
+ self.assertEqual(pprint.pformat(d, width=1), "defaultdict(<class 'int'>, {})")
+ words = 'the quick brown fox jumped over a lazy dog'.split()
+ d = collections.defaultdict(int, zip(words, itertools.count()))
+ self.assertEqual(pprint.pformat(d),
+"""\
+defaultdict(<class 'int'>,
+ {'a': 6,
+ 'brown': 2,
+ 'dog': 8,
+ 'fox': 3,
+ 'jumped': 4,
+ 'lazy': 7,
+ 'over': 5,
+ 'quick': 1,
+ 'the': 0})""")
+
+ def test_counter(self):
+ d = collections.Counter()
+ self.assertEqual(pprint.pformat(d, width=1), "Counter()")
+ d = collections.Counter('senselessness')
+ self.assertEqual(pprint.pformat(d, width=40),
+"""\
+Counter({'s': 6,
+ 'e': 4,
+ 'n': 2,
+ 'l': 1})""")
+
+ def test_chainmap(self):
+ d = collections.ChainMap()
+ self.assertEqual(pprint.pformat(d, width=1), "ChainMap({})")
+ words = 'the quick brown fox jumped over a lazy dog'.split()
+ items = list(zip(words, itertools.count()))
+ d = collections.ChainMap(dict(items))
+ self.assertEqual(pprint.pformat(d),
+"""\
+ChainMap({'a': 6,
+ 'brown': 2,
+ 'dog': 8,
+ 'fox': 3,
+ 'jumped': 4,
+ 'lazy': 7,
+ 'over': 5,
+ 'quick': 1,
+ 'the': 0})""")
+ d = collections.ChainMap(dict(items), collections.OrderedDict(items))
+ self.assertEqual(pprint.pformat(d),
+"""\
+ChainMap({'a': 6,
+ 'brown': 2,
+ 'dog': 8,
+ 'fox': 3,
+ 'jumped': 4,
+ 'lazy': 7,
+ 'over': 5,
+ 'quick': 1,
+ 'the': 0},
+ OrderedDict([('the', 0),
+ ('quick', 1),
+ ('brown', 2),
+ ('fox', 3),
+ ('jumped', 4),
+ ('over', 5),
+ ('a', 6),
+ ('lazy', 7),
+ ('dog', 8)]))""")
+
+ def test_deque(self):
+ d = collections.deque()
+ self.assertEqual(pprint.pformat(d, width=1), "deque([])")
+ d = collections.deque(maxlen=7)
+ self.assertEqual(pprint.pformat(d, width=1), "deque([], maxlen=7)")
+ words = 'the quick brown fox jumped over a lazy dog'.split()
+ d = collections.deque(zip(words, itertools.count()))
+ self.assertEqual(pprint.pformat(d),
+"""\
+deque([('the', 0),
+ ('quick', 1),
+ ('brown', 2),
+ ('fox', 3),
+ ('jumped', 4),
+ ('over', 5),
+ ('a', 6),
+ ('lazy', 7),
+ ('dog', 8)])""")
+ d = collections.deque(zip(words, itertools.count()), maxlen=7)
+ self.assertEqual(pprint.pformat(d),
+"""\
+deque([('brown', 2),
+ ('fox', 3),
+ ('jumped', 4),
+ ('over', 5),
+ ('a', 6),
+ ('lazy', 7),
+ ('dog', 8)],
+ maxlen=7)""")
+
+ def test_user_dict(self):
+ d = collections.UserDict()
+ self.assertEqual(pprint.pformat(d, width=1), "{}")
+ words = 'the quick brown fox jumped over a lazy dog'.split()
+ d = collections.UserDict(zip(words, itertools.count()))
+ self.assertEqual(pprint.pformat(d),
+"""\
+{'a': 6,
+ 'brown': 2,
+ 'dog': 8,
+ 'fox': 3,
+ 'jumped': 4,
+ 'lazy': 7,
+ 'over': 5,
+ 'quick': 1,
+ 'the': 0}""")
+
+ def test_user_list(self):
+ d = collections.UserList()
+ self.assertEqual(pprint.pformat(d, width=1), "[]")
+ words = 'the quick brown fox jumped over a lazy dog'.split()
+ d = collections.UserList(zip(words, itertools.count()))
+ self.assertEqual(pprint.pformat(d),
+"""\
+[('the', 0),
+ ('quick', 1),
+ ('brown', 2),
+ ('fox', 3),
+ ('jumped', 4),
+ ('over', 5),
+ ('a', 6),
+ ('lazy', 7),
+ ('dog', 8)]""")
+
+ def test_user_string(self):
+ d = collections.UserString('')
+ self.assertEqual(pprint.pformat(d, width=1), "''")
+ d = collections.UserString('the quick brown fox jumped over a lazy dog')
+ self.assertEqual(pprint.pformat(d, width=20),
+"""\
+('the quick brown '
+ 'fox jumped over '
+ 'a lazy dog')""")
+ self.assertEqual(pprint.pformat({1: d}, width=20),
+"""\
+{1: 'the quick '
+ 'brown fox '
+ 'jumped over a '
+ 'lazy dog'}""")
class DottedPrettyPrinter(pprint.PrettyPrinter):
diff --git a/Lib/test/test_property.py b/Lib/test/test_property.py
index cee7203d15..26b7d5283a 100644
--- a/Lib/test/test_property.py
+++ b/Lib/test/test_property.py
@@ -3,7 +3,6 @@
import sys
import unittest
-from test.support import run_unittest
class PropertyBase(Exception):
pass
@@ -151,6 +150,28 @@ class PropertyTests(unittest.TestCase):
foo = property(foo)
C.foo.__isabstractmethod__
+ @unittest.skipIf(sys.flags.optimize >= 2,
+ "Docstrings are omitted with -O2 and above")
+ def test_property_builtin_doc_writable(self):
+ p = property(doc='basic')
+ self.assertEqual(p.__doc__, 'basic')
+ p.__doc__ = 'extended'
+ self.assertEqual(p.__doc__, 'extended')
+
+ @unittest.skipIf(sys.flags.optimize >= 2,
+ "Docstrings are omitted with -O2 and above")
+ def test_property_decorator_doc_writable(self):
+ class PropertyWritableDoc(object):
+
+ @property
+ def spam(self):
+ """Eggs"""
+ return "eggs"
+
+ sub = PropertyWritableDoc()
+ self.assertEqual(sub.__class__.spam.__doc__, 'Eggs')
+ sub.__class__.spam.__doc__ = 'Spam'
+ self.assertEqual(sub.__class__.spam.__doc__, 'Spam')
# Issue 5890: subclasses of property do not preserve method __doc__ strings
class PropertySub(property):
@@ -247,8 +268,5 @@ class PropertySubclassTests(unittest.TestCase):
-def test_main():
- run_unittest(PropertyTests, PropertySubclassTests)
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_pstats.py b/Lib/test/test_pstats.py
index 9ebeebbfee..566b3eab77 100644
--- a/Lib/test/test_pstats.py
+++ b/Lib/test/test_pstats.py
@@ -34,12 +34,5 @@ class StatsTestCase(unittest.TestCase):
stats.add(self.stats, self.stats)
-def test_main():
- support.run_unittest(
- AddCallersTestCase,
- StatsTestCase,
- )
-
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_pty.py b/Lib/test/test_pty.py
index 8916861f5b..ef5e99ee26 100644
--- a/Lib/test/test_pty.py
+++ b/Lib/test/test_pty.py
@@ -1,7 +1,6 @@
-from test.support import verbose, run_unittest, import_module, reap_children
+from test.support import verbose, import_module, reap_children
-#Skip these tests if either fcntl or termios is not available
-fcntl = import_module('fcntl')
+# Skip these tests if termios is not available
import_module('termios')
import errno
@@ -84,16 +83,18 @@ class PtyTest(unittest.TestCase):
# in master_open(), we need to read the EOF.
# Ensure the fd is non-blocking in case there's nothing to read.
- orig_flags = fcntl.fcntl(master_fd, fcntl.F_GETFL)
- fcntl.fcntl(master_fd, fcntl.F_SETFL, orig_flags | os.O_NONBLOCK)
+ blocking = os.get_blocking(master_fd)
try:
- s1 = os.read(master_fd, 1024)
- self.assertEqual(b'', s1)
- except OSError as e:
- if e.errno != errno.EAGAIN:
- raise
- # Restore the original flags.
- fcntl.fcntl(master_fd, fcntl.F_SETFL, orig_flags)
+ os.set_blocking(master_fd, False)
+ try:
+ s1 = os.read(master_fd, 1024)
+ self.assertEqual(b'', s1)
+ except OSError as e:
+ if e.errno != errno.EAGAIN:
+ raise
+ finally:
+ # Restore the original flags.
+ os.set_blocking(master_fd, blocking)
debug("Writing to slave_fd")
os.write(slave_fd, TEST_STRING_1)
@@ -292,11 +293,8 @@ class SmallPtyTests(unittest.TestCase):
pty._copy(masters[0])
-def test_main(verbose=None):
- try:
- run_unittest(SmallPtyTests, PtyTest)
- finally:
- reap_children()
+def tearDownModule():
+ reap_children()
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_pulldom.py b/Lib/test/test_pulldom.py
index b81a595f69..1932c6bb99 100644
--- a/Lib/test/test_pulldom.py
+++ b/Lib/test/test_pulldom.py
@@ -6,7 +6,7 @@ import xml.sax
from xml.sax.xmlreader import AttributesImpl
from xml.dom import pulldom
-from test.support import run_unittest, findfile
+from test.support import findfile
tstfile = findfile("test.xml", subdir="xmltestdata")
@@ -339,9 +339,5 @@ class SAX2DOMTestCase(unittest.TestCase):
doc.unlink()
-def test_main():
- run_unittest(PullDOMTestCase, ThoroughTestCase, SAX2DOMTestCase)
-
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_pwd.py b/Lib/test/test_pwd.py
index 37a1bcb28b..b7b1a4a5f6 100644
--- a/Lib/test/test_pwd.py
+++ b/Lib/test/test_pwd.py
@@ -107,8 +107,5 @@ class PwdTest(unittest.TestCase):
self.assertRaises(KeyError, pwd.getpwuid, 2**128)
self.assertRaises(KeyError, pwd.getpwuid, -2**128)
-def test_main():
- support.run_unittest(PwdTest)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_py_compile.py b/Lib/test/test_py_compile.py
index c1fd4f60da..4a6caa5718 100644
--- a/Lib/test/test_py_compile.py
+++ b/Lib/test/test_py_compile.py
@@ -98,6 +98,7 @@ class PyCompileTests(unittest.TestCase):
self.assertFalse(os.path.exists(
importlib.util.cache_from_source(bad_coding)))
+ @unittest.skipIf(sys.flags.optimize > 0, 'test does not work with -O')
def test_double_dot_no_clobber(self):
# http://bugs.python.org/issue22966
# py_compile foo.bar.py -> __pycache__/foo.cpython-34.pyc
@@ -117,6 +118,10 @@ class PyCompileTests(unittest.TestCase):
self.assertTrue(os.path.exists(cache_path))
self.assertFalse(os.path.exists(pyc_path))
+ def test_optimization_path(self):
+ # Specifying optimized bytecode should lead to a path reflecting that.
+ self.assertIn('opt-2', py_compile.compile(self.source_path, optimize=2))
+
if __name__ == "__main__":
unittest.main()
diff --git a/Lib/test/test_pyclbr.py b/Lib/test/test_pyclbr.py
index 39eb65f10d..6ffbbbda27 100644
--- a/Lib/test/test_pyclbr.py
+++ b/Lib/test/test_pyclbr.py
@@ -2,11 +2,10 @@
Test cases for pyclbr.py
Nick Mathewson
'''
-from test.support import run_unittest
import sys
from types import FunctionType, MethodType, BuiltinFunctionType
import pyclbr
-from unittest import TestCase
+from unittest import TestCase, main as unittest_main
StaticMethodType = type(staticmethod(lambda: None))
ClassMethodType = type(classmethod(lambda c: None))
@@ -173,9 +172,5 @@ class PyclbrTest(TestCase):
self.assertRaises(ImportError, pyclbr.readmodule_ex, 'asyncore.foo')
-def test_main():
- run_unittest(PyclbrTest)
-
-
if __name__ == "__main__":
- test_main()
+ unittest_main()
diff --git a/Lib/test/test_pydoc.py b/Lib/test/test_pydoc.py
index 343dd21ddf..59aa7151ee 100644
--- a/Lib/test/test_pydoc.py
+++ b/Lib/test/test_pydoc.py
@@ -2,7 +2,6 @@ import os
import sys
import builtins
import contextlib
-import difflib
import importlib.util
import inspect
import pydoc
@@ -19,10 +18,11 @@ import types
import unittest
import urllib.parse
import xml.etree
+import xml.etree.ElementTree
import textwrap
from io import StringIO
from collections import namedtuple
-from test.script_helper import assert_python_ok
+from test.support.script_helper import assert_python_ok
from test.support import (
TESTFN, rmtree,
reap_children, reap_threads, captured_output, captured_stdout,
@@ -257,7 +257,10 @@ expected_html_data_docstrings = tuple(s.replace(' ', '&nbsp;')
for s in expected_data_docstrings)
# output pattern for missing module
-missing_pattern = "no Python documentation found for '%s'"
+missing_pattern = '''\
+No Python documentation found for %r.
+Use help() to get the interactive help utility.
+Use help(str) for help on the str class.'''.replace('\n', os.linesep)
# output pattern for module with bad imports
badimport_pattern = "problem in %s - ImportError: No module named %r"
@@ -350,6 +353,14 @@ def get_pydoc_html(module):
loc = "<br><a href=\"" + loc + "\">Module Docs</a>"
return output.strip(), loc
+def get_pydoc_link(module):
+ "Returns a documentation web link of a module"
+ dirname = os.path.dirname
+ basedir = os.path.join(dirname(dirname(__file__)))
+ doc = pydoc.TextDoc()
+ loc = doc.getdocloc(module, basedir=basedir)
+ return loc
+
def get_pydoc_text(module):
"Returns pydoc generated output as text"
doc = pydoc.TextDoc()
@@ -364,15 +375,6 @@ def get_pydoc_text(module):
output = patt.sub('', output)
return output.strip(), loc
-def print_diffs(text1, text2):
- "Prints unified diffs for two texts"
- # XXX now obsolete, use unittest built-in support
- lines1 = text1.splitlines(keepends=True)
- lines2 = text2.splitlines(keepends=True)
- diffs = difflib.unified_diff(lines1, lines2, n=0, fromfile='expected',
- tofile='got')
- print('\n' + ''.join(diffs))
-
def get_html_title(text):
# Bit of hack, but good enough for test purposes
header, _, _ = text.partition("</head>")
@@ -425,9 +427,7 @@ class PydocDocTest(unittest.TestCase):
expected_html = expected_html_pattern % (
(mod_url, mod_file, doc_loc) +
expected_html_data_docstrings)
- if result != expected_html:
- print_diffs(expected_html, result)
- self.fail("outputs are not equal, see diff above")
+ self.assertEqual(result, expected_html)
@unittest.skipIf(sys.flags.optimize >= 2,
"Docstrings are omitted with -O2 and above")
@@ -440,9 +440,7 @@ class PydocDocTest(unittest.TestCase):
(doc_loc,) +
expected_text_data_docstrings +
(inspect.getabsfile(pydoc_mod),))
- if result != expected_text:
- print_diffs(expected_text, result)
- self.fail("outputs are not equal, see diff above")
+ self.assertEqual(expected_text, result)
def test_text_enum_member_with_value_zero(self):
# Test issue #20654 to ensure enum member with value 0 can be
@@ -454,6 +452,11 @@ class PydocDocTest(unittest.TestCase):
doc = pydoc.render_doc(BinaryInteger)
self.assertIn('<BinaryInteger.zero: 0>', doc)
+ def test_mixed_case_module_names_are_lower_cased(self):
+ # issue16484
+ doc_link = get_pydoc_link(xml.etree.ElementTree)
+ self.assertIn('xml.etree.elementtree', doc_link)
+
def test_issue8225(self):
# Test issue8225 to ensure no doc link appears for xml.etree
result, doc_loc = get_pydoc_text(xml.etree)
@@ -745,7 +748,7 @@ class PydocImportTest(PydocBaseTest):
finally:
sys.path[:] = saved_paths
- @unittest.skip('causes undesireable side-effects (#20128)')
+ @unittest.skip('causes undesirable side-effects (#20128)')
def test_modules(self):
# See Helper.listmodules().
num_header_lines = 2
@@ -761,7 +764,7 @@ class PydocImportTest(PydocBaseTest):
self.assertGreaterEqual(num_lines, expected)
- @unittest.skip('causes undesireable side-effects (#20128)')
+ @unittest.skip('causes undesirable side-effects (#20128)')
def test_modules_search(self):
# See Helper.listmodules().
expected = 'pydoc - '
@@ -957,9 +960,7 @@ class PydocWithMetaClasses(unittest.TestCase):
expected_text = expected_dynamicattribute_pattern % (
(__name__,) + expected_text_data_docstrings[:2])
result = output.getvalue().strip()
- if result != expected_text:
- print_diffs(expected_text, result)
- self.fail("outputs are not equal, see diff above")
+ self.assertEqual(expected_text, result)
@unittest.skipIf(sys.flags.optimize >= 2,
"Docstrings are omitted with -O2 and above")
@@ -980,9 +981,7 @@ class PydocWithMetaClasses(unittest.TestCase):
helper(Class)
expected_text = expected_virtualattribute_pattern1 % __name__
result = output.getvalue().strip()
- if result != expected_text:
- print_diffs(expected_text, result)
- self.fail("outputs are not equal, see diff above")
+ self.assertEqual(expected_text, result)
@unittest.skipIf(sys.flags.optimize >= 2,
"Docstrings are omitted with -O2 and above")
@@ -1022,19 +1021,13 @@ class PydocWithMetaClasses(unittest.TestCase):
helper(Class1)
expected_text1 = expected_virtualattribute_pattern2 % __name__
result1 = output.getvalue().strip()
- if result1 != expected_text1:
- print_diffs(expected_text1, result1)
- fail1 = True
+ self.assertEqual(expected_text1, result1)
output = StringIO()
helper = pydoc.Helper(output=output)
helper(Class2)
expected_text2 = expected_virtualattribute_pattern3 % __name__
result2 = output.getvalue().strip()
- if result2 != expected_text2:
- print_diffs(expected_text2, result2)
- fail2 = True
- if fail1 or fail2:
- self.fail("outputs are not equal, see diff above")
+ self.assertEqual(expected_text2, result2)
@unittest.skipIf(sys.flags.optimize >= 2,
"Docstrings are omitted with -O2 and above")
@@ -1051,9 +1044,7 @@ class PydocWithMetaClasses(unittest.TestCase):
helper(C)
expected_text = expected_missingattribute_pattern % __name__
result = output.getvalue().strip()
- if result != expected_text:
- print_diffs(expected_text, result)
- self.fail("outputs are not equal, see diff above")
+ self.assertEqual(expected_text, result)
def test_resolve_false(self):
# Issue #23008: pydoc enum.{,Int}Enum failed
diff --git a/Lib/test/test_pyexpat.py b/Lib/test/test_pyexpat.py
index 216a46b903..0b68bfa6fe 100644
--- a/Lib/test/test_pyexpat.py
+++ b/Lib/test/test_pyexpat.py
@@ -11,7 +11,7 @@ import traceback
from xml.parsers import expat
from xml.parsers.expat import errors
-from test.support import sortdict, run_unittest
+from test.support import sortdict
class SetAttributeTest(unittest.TestCase):
@@ -42,12 +42,6 @@ class SetAttributeTest(unittest.TestCase):
self.parser.specified_attributes = x
self.assertIs(self.parser.specified_attributes, bool(x))
- def test_specified_attributes(self):
- self.assertIs(self.parser.specified_attributes, False)
- for x in 0, 1, 2, 0:
- self.parser.specified_attributes = x
- self.assertIs(self.parser.specified_attributes, bool(x))
-
def test_invalid_attributes(self):
with self.assertRaises(AttributeError):
self.parser.returns_unicode = 1
@@ -737,19 +731,5 @@ class ForeignDTDTests(unittest.TestCase):
self.assertEqual(handler_call_args, [("bar", "baz")])
-def test_main():
- run_unittest(SetAttributeTest,
- ParseTest,
- NamespaceSeparatorTest,
- InterningTest,
- BufferTextTest,
- HandlerExceptionTest,
- PositionTest,
- sf1296433Test,
- ChardataBufferTest,
- MalformedInputTest,
- ErrorMessageTest,
- ForeignDTDTests)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_queue.py b/Lib/test/test_queue.py
index 2cdfee4008..4ccaa39adf 100644
--- a/Lib/test/test_queue.py
+++ b/Lib/test/test_queue.py
@@ -354,10 +354,5 @@ class FailingQueueTest(BlockingTestMixin, unittest.TestCase):
self.failing_queue_test(q)
-def test_main():
- support.run_unittest(QueueTest, LifoQueueTest, PriorityQueueTest,
- FailingQueueTest)
-
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_quopri.py b/Lib/test/test_quopri.py
index 92511fac90..7cac013446 100644
--- a/Lib/test/test_quopri.py
+++ b/Lib/test/test_quopri.py
@@ -1,4 +1,3 @@
-from test import support
import unittest
import sys, os, io, subprocess
@@ -207,9 +206,5 @@ zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz''')
p = p.decode('latin-1')
self.assertEqual(cout.splitlines(), p.splitlines())
-def test_main():
- support.run_unittest(QuopriTestCase)
-
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_raise.py b/Lib/test/test_raise.py
index be5c1c6cc8..a41b353778 100644
--- a/Lib/test/test_raise.py
+++ b/Lib/test/test_raise.py
@@ -415,8 +415,5 @@ class TestRemovedFunctionality(unittest.TestCase):
self.fail("No exception raised")
-def test_main():
- support.run_unittest(__name__)
-
if __name__ == "__main__":
unittest.main()
diff --git a/Lib/test/test_random.py b/Lib/test/test_random.py
index 4b5232fe21..5393431ff6 100644
--- a/Lib/test/test_random.py
+++ b/Lib/test/test_random.py
@@ -494,7 +494,7 @@ class MersenneTwister_TestBasicOps(TestBasicOps, unittest.TestCase):
self.assertTrue(2**k > n > 2**(k-1)) # note the stronger assertion
@unittest.mock.patch('random.Random.random')
- def test_randbelow_overriden_random(self, random_mock):
+ def test_randbelow_overridden_random(self, random_mock):
# Random._randbelow() can only use random() when the built-in one
# has been overridden but no new getrandbits() method was supplied.
random_mock.side_effect = random.SystemRandom().random
diff --git a/Lib/test/test_range.py b/Lib/test/test_range.py
index 2dbcebcc04..106c732dd9 100644
--- a/Lib/test/test_range.py
+++ b/Lib/test/test_range.py
@@ -647,8 +647,5 @@ class RangeTest(unittest.TestCase):
with self.assertRaises(AttributeError):
del rangeobj.step
-def test_main():
- test.support.run_unittest(RangeTest)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py
index 7348af3f1a..7a741416b4 100644
--- a/Lib/test/test_re.py
+++ b/Lib/test/test_re.py
@@ -38,6 +38,24 @@ class ReTests(unittest.TestCase):
self.assertIs(type(actual), type(expect), msg)
recurse(actual, expect)
+ def checkPatternError(self, pattern, errmsg, pos=None):
+ with self.assertRaises(re.error) as cm:
+ re.compile(pattern)
+ with self.subTest(pattern=pattern):
+ err = cm.exception
+ self.assertEqual(err.msg, errmsg)
+ if pos is not None:
+ self.assertEqual(err.pos, pos)
+
+ def checkTemplateError(self, pattern, repl, string, errmsg, pos=None):
+ with self.assertRaises(re.error) as cm:
+ re.sub(pattern, repl, string)
+ with self.subTest(pattern=pattern, repl=repl):
+ err = cm.exception
+ self.assertEqual(err.msg, errmsg)
+ if pos is not None:
+ self.assertEqual(err.pos, pos)
+
def test_keep_buffer(self):
# See bug 14212
b = bytearray(b'x')
@@ -84,7 +102,7 @@ class ReTests(unittest.TestCase):
self.assertEqual(re.sub("(?i)b+", "x", "bbbb BBBB"), 'x x')
self.assertEqual(re.sub(r'\d+', self.bump_num, '08.2 -2 23x99y'),
'9.3 -3 24x100y')
- self.assertEqual(re.sub(r'\d+', self.bump_num, '08.2 -2 23x99y', 3),
+ self.assertEqual(re.sub(r'\d+', self.bump_num, '08.2 -2 23x99y', count=3),
'9.3 -3 23x99y')
self.assertEqual(re.sub('.', lambda m: r"\n", 'x'), '\\n')
@@ -100,11 +118,14 @@ class ReTests(unittest.TestCase):
self.assertEqual(re.sub('(?P<unk>x)', '\g<unk>\g<unk>', 'xx'), 'xxxx')
self.assertEqual(re.sub('(?P<unk>x)', '\g<1>\g<1>', 'xx'), 'xxxx')
- self.assertEqual(re.sub('a',r'\t\n\v\r\f\a\b\B\Z\a\A\w\W\s\S\d\D','a'),
- '\t\n\v\r\f\a\b\\B\\Z\a\\A\\w\\W\\s\\S\\d\\D')
- self.assertEqual(re.sub('a', '\t\n\v\r\f\a', 'a'), '\t\n\v\r\f\a')
- self.assertEqual(re.sub('a', '\t\n\v\r\f\a', 'a'),
- (chr(9)+chr(10)+chr(11)+chr(13)+chr(12)+chr(7)))
+ self.assertEqual(re.sub('a', r'\t\n\v\r\f\a\b', 'a'), '\t\n\v\r\f\a\b')
+ self.assertEqual(re.sub('a', '\t\n\v\r\f\a\b', 'a'), '\t\n\v\r\f\a\b')
+ self.assertEqual(re.sub('a', '\t\n\v\r\f\a\b', 'a'),
+ (chr(9)+chr(10)+chr(11)+chr(13)+chr(12)+chr(7)+chr(8)))
+ for c in 'cdehijklmopqsuwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ':
+ with self.subTest(c):
+ with self.assertWarns(DeprecationWarning):
+ self.assertEqual(re.sub('a', '\\' + c, 'a'), '\\' + c)
self.assertEqual(re.sub('^\s*', 'X', 'test'), 'Xtest')
@@ -145,6 +166,7 @@ class ReTests(unittest.TestCase):
self.assertEqual(re.sub('x', r'\009', 'x'), '\0' + '9')
self.assertEqual(re.sub('x', r'\111', 'x'), '\111')
self.assertEqual(re.sub('x', r'\117', 'x'), '\117')
+ self.assertEqual(re.sub('x', r'\377', 'x'), '\377')
self.assertEqual(re.sub('x', r'\1111', 'x'), '\1111')
self.assertEqual(re.sub('x', r'\1111', 'x'), '\111' + '1')
@@ -155,21 +177,25 @@ class ReTests(unittest.TestCase):
self.assertEqual(re.sub('x', r'\09', 'x'), '\0' + '9')
self.assertEqual(re.sub('x', r'\0a', 'x'), '\0' + 'a')
- self.assertEqual(re.sub('x', r'\400', 'x'), '\0')
- self.assertEqual(re.sub('x', r'\777', 'x'), '\377')
-
- self.assertRaises(re.error, re.sub, 'x', r'\1', 'x')
- self.assertRaises(re.error, re.sub, 'x', r'\8', 'x')
- self.assertRaises(re.error, re.sub, 'x', r'\9', 'x')
- self.assertRaises(re.error, re.sub, 'x', r'\11', 'x')
- self.assertRaises(re.error, re.sub, 'x', r'\18', 'x')
- self.assertRaises(re.error, re.sub, 'x', r'\1a', 'x')
- self.assertRaises(re.error, re.sub, 'x', r'\90', 'x')
- self.assertRaises(re.error, re.sub, 'x', r'\99', 'x')
- self.assertRaises(re.error, re.sub, 'x', r'\118', 'x') # r'\11' + '8'
- self.assertRaises(re.error, re.sub, 'x', r'\11a', 'x')
- self.assertRaises(re.error, re.sub, 'x', r'\181', 'x') # r'\18' + '1'
- self.assertRaises(re.error, re.sub, 'x', r'\800', 'x') # r'\80' + '0'
+ self.checkTemplateError('x', r'\400', 'x',
+ r'octal escape value \400 outside of '
+ r'range 0-0o377', 0)
+ self.checkTemplateError('x', r'\777', 'x',
+ r'octal escape value \777 outside of '
+ r'range 0-0o377', 0)
+
+ self.checkTemplateError('x', r'\1', 'x', 'invalid group reference')
+ self.checkTemplateError('x', r'\8', 'x', 'invalid group reference')
+ self.checkTemplateError('x', r'\9', 'x', 'invalid group reference')
+ self.checkTemplateError('x', r'\11', 'x', 'invalid group reference')
+ self.checkTemplateError('x', r'\18', 'x', 'invalid group reference')
+ self.checkTemplateError('x', r'\1a', 'x', 'invalid group reference')
+ self.checkTemplateError('x', r'\90', 'x', 'invalid group reference')
+ self.checkTemplateError('x', r'\99', 'x', 'invalid group reference')
+ self.checkTemplateError('x', r'\118', 'x', 'invalid group reference') # r'\11' + '8'
+ self.checkTemplateError('x', r'\11a', 'x', 'invalid group reference')
+ self.checkTemplateError('x', r'\181', 'x', 'invalid group reference') # r'\18' + '1'
+ self.checkTemplateError('x', r'\800', 'x', 'invalid group reference') # r'\80' + '0'
# in python2.3 (etc), these loop endlessly in sre_parser.py
self.assertEqual(re.sub('(((((((((((x)))))))))))', r'\11', 'x'), 'x')
@@ -180,7 +206,7 @@ class ReTests(unittest.TestCase):
def test_qualified_re_sub(self):
self.assertEqual(re.sub('a', 'b', 'aaaaa'), 'bbbbb')
- self.assertEqual(re.sub('a', 'b', 'aaaaa', 1), 'baaaa')
+ self.assertEqual(re.sub('a', 'b', 'aaaaa', count=1), 'baaaa')
def test_bug_114660(self):
self.assertEqual(re.sub(r'(\S)\s+(\S)', r'\1 \2', 'hello there'),
@@ -194,75 +220,105 @@ class ReTests(unittest.TestCase):
def test_symbolic_groups(self):
re.compile('(?P<a>x)(?P=a)(?(a)y)')
re.compile('(?P<a1>x)(?P=a1)(?(a1)y)')
- self.assertRaises(re.error, re.compile, '(?P<a>)(?P<a>)')
- self.assertRaises(re.error, re.compile, '(?Px)')
- self.assertRaises(re.error, re.compile, '(?P=)')
- self.assertRaises(re.error, re.compile, '(?P=1)')
- self.assertRaises(re.error, re.compile, '(?P=a)')
- self.assertRaises(re.error, re.compile, '(?P=a1)')
- self.assertRaises(re.error, re.compile, '(?P=a.)')
- self.assertRaises(re.error, re.compile, '(?P<)')
- self.assertRaises(re.error, re.compile, '(?P<>)')
- self.assertRaises(re.error, re.compile, '(?P<1>)')
- self.assertRaises(re.error, re.compile, '(?P<a.>)')
- self.assertRaises(re.error, re.compile, '(?())')
- self.assertRaises(re.error, re.compile, '(?(a))')
- self.assertRaises(re.error, re.compile, '(?(1a))')
- self.assertRaises(re.error, re.compile, '(?(a.))')
+ re.compile('(?P<a1>x)\1(?(1)y)')
+ self.checkPatternError('(?P<a>)(?P<a>)',
+ "redefinition of group name 'a' as group 2; "
+ "was group 1")
+ self.checkPatternError('(?P<a>(?P=a))',
+ "cannot refer to an open group", 10)
+ self.checkPatternError('(?Pxy)', 'unknown extension ?Px')
+ self.checkPatternError('(?P<a>)(?P=a', 'missing ), unterminated name', 11)
+ self.checkPatternError('(?P=', 'missing group name', 4)
+ self.checkPatternError('(?P=)', 'missing group name', 4)
+ self.checkPatternError('(?P=1)', "bad character in group name '1'", 4)
+ self.checkPatternError('(?P=a)', "unknown group name 'a'")
+ self.checkPatternError('(?P=a1)', "unknown group name 'a1'")
+ self.checkPatternError('(?P=a.)', "bad character in group name 'a.'", 4)
+ self.checkPatternError('(?P<)', 'missing >, unterminated name', 4)
+ self.checkPatternError('(?P<a', 'missing >, unterminated name', 4)
+ self.checkPatternError('(?P<', 'missing group name', 4)
+ self.checkPatternError('(?P<>)', 'missing group name', 4)
+ self.checkPatternError(r'(?P<1>)', "bad character in group name '1'", 4)
+ self.checkPatternError(r'(?P<a.>)', "bad character in group name 'a.'", 4)
+ self.checkPatternError(r'(?(', 'missing group name', 3)
+ self.checkPatternError(r'(?())', 'missing group name', 3)
+ self.checkPatternError(r'(?(a))', "unknown group name 'a'", 3)
+ self.checkPatternError(r'(?(-1))', "bad character in group name '-1'", 3)
+ self.checkPatternError(r'(?(1a))', "bad character in group name '1a'", 3)
+ self.checkPatternError(r'(?(a.))', "bad character in group name 'a.'", 3)
# New valid/invalid identifiers in Python 3
re.compile('(?P<µ>x)(?P=µ)(?(µ)y)')
re.compile('(?P<ð”˜ð”«ð”¦ð” ð”¬ð”¡ð”¢>x)(?P=ð”˜ð”«ð”¦ð” ð”¬ð”¡ð”¢)(?(ð”˜ð”«ð”¦ð” ð”¬ð”¡ð”¢)y)')
- self.assertRaises(re.error, re.compile, '(?P<©>x)')
+ self.checkPatternError('(?P<©>x)', "bad character in group name '©'", 4)
+ # Support > 100 groups.
+ pat = '|'.join('x(?P<a%d>%x)y' % (i, i) for i in range(1, 200 + 1))
+ pat = '(?:%s)(?(200)z|t)' % pat
+ self.assertEqual(re.match(pat, 'xc8yz').span(), (0, 5))
def test_symbolic_refs(self):
- self.assertRaises(re.error, re.sub, '(?P<a>x)', '\g<a', 'xx')
- self.assertRaises(re.error, re.sub, '(?P<a>x)', '\g<', 'xx')
- self.assertRaises(re.error, re.sub, '(?P<a>x)', '\g', 'xx')
- self.assertRaises(re.error, re.sub, '(?P<a>x)', '\g<a a>', 'xx')
- self.assertRaises(re.error, re.sub, '(?P<a>x)', '\g<>', 'xx')
- self.assertRaises(re.error, re.sub, '(?P<a>x)', '\g<1a1>', 'xx')
- self.assertRaises(IndexError, re.sub, '(?P<a>x)', '\g<ab>', 'xx')
- self.assertRaises(re.error, re.sub, '(?P<a>x)|(?P<b>y)', '\g<b>', 'xx')
- self.assertRaises(re.error, re.sub, '(?P<a>x)|(?P<b>y)', '\\2', 'xx')
- self.assertRaises(re.error, re.sub, '(?P<a>x)', '\g<-1>', 'xx')
+ self.checkTemplateError('(?P<a>x)', '\g<a', 'xx',
+ 'missing >, unterminated name', 3)
+ self.checkTemplateError('(?P<a>x)', '\g<', 'xx',
+ 'missing group name', 3)
+ self.checkTemplateError('(?P<a>x)', '\g', 'xx', 'missing <', 2)
+ self.checkTemplateError('(?P<a>x)', '\g<a a>', 'xx',
+ "bad character in group name 'a a'", 3)
+ self.checkTemplateError('(?P<a>x)', '\g<>', 'xx',
+ 'missing group name', 3)
+ self.checkTemplateError('(?P<a>x)', '\g<1a1>', 'xx',
+ "bad character in group name '1a1'", 3)
+ self.checkTemplateError('(?P<a>x)', r'\g<2>', 'xx',
+ 'invalid group reference')
+ self.checkTemplateError('(?P<a>x)', r'\2', 'xx',
+ 'invalid group reference')
+ with self.assertRaisesRegex(IndexError, "unknown group name 'ab'"):
+ re.sub('(?P<a>x)', '\g<ab>', 'xx')
+ self.assertEqual(re.sub('(?P<a>x)|(?P<b>y)', r'\g<b>', 'xx'), '')
+ self.assertEqual(re.sub('(?P<a>x)|(?P<b>y)', r'\2', 'xx'), '')
+ self.checkTemplateError('(?P<a>x)', '\g<-1>', 'xx',
+ "bad character in group name '-1'", 3)
# New valid/invalid identifiers in Python 3
self.assertEqual(re.sub('(?P<µ>x)', r'\g<µ>', 'xx'), 'xx')
self.assertEqual(re.sub('(?P<ð”˜ð”«ð”¦ð” ð”¬ð”¡ð”¢>x)', r'\g<ð”˜ð”«ð”¦ð” ð”¬ð”¡ð”¢>', 'xx'), 'xx')
- self.assertRaises(re.error, re.sub, '(?P<a>x)', r'\g<©>', 'xx')
+ self.checkTemplateError('(?P<a>x)', '\g<©>', 'xx',
+ "bad character in group name '©'", 3)
+ # Support > 100 groups.
+ pat = '|'.join('x(?P<a%d>%x)y' % (i, i) for i in range(1, 200 + 1))
+ self.assertEqual(re.sub(pat, '\g<200>', 'xc8yzxc8y'), 'c8zc8')
def test_re_subn(self):
self.assertEqual(re.subn("(?i)b+", "x", "bbbb BBBB"), ('x x', 2))
self.assertEqual(re.subn("b+", "x", "bbbb BBBB"), ('x BBBB', 1))
self.assertEqual(re.subn("b+", "x", "xyz"), ('xyz', 0))
self.assertEqual(re.subn("b*", "x", "xyz"), ('xxxyxzx', 4))
- self.assertEqual(re.subn("b*", "x", "xyz", 2), ('xxxyz', 2))
+ self.assertEqual(re.subn("b*", "x", "xyz", count=2), ('xxxyz', 2))
def test_re_split(self):
for string in ":a:b::c", S(":a:b::c"):
self.assertTypedEqual(re.split(":", string),
['', 'a', 'b', '', 'c'])
- self.assertTypedEqual(re.split(":*", string),
+ self.assertTypedEqual(re.split(":+", string),
['', 'a', 'b', 'c'])
- self.assertTypedEqual(re.split("(:*)", string),
+ self.assertTypedEqual(re.split("(:+)", string),
['', ':', 'a', ':', 'b', '::', 'c'])
for string in (b":a:b::c", B(b":a:b::c"), bytearray(b":a:b::c"),
memoryview(b":a:b::c")):
self.assertTypedEqual(re.split(b":", string),
[b'', b'a', b'b', b'', b'c'])
- self.assertTypedEqual(re.split(b":*", string),
+ self.assertTypedEqual(re.split(b":+", string),
[b'', b'a', b'b', b'c'])
- self.assertTypedEqual(re.split(b"(:*)", string),
+ self.assertTypedEqual(re.split(b"(:+)", string),
[b'', b':', b'a', b':', b'b', b'::', b'c'])
for a, b, c in ("\xe0\xdf\xe7", "\u0430\u0431\u0432",
"\U0001d49c\U0001d49e\U0001d4b5"):
string = ":%s:%s::%s" % (a, b, c)
self.assertEqual(re.split(":", string), ['', a, b, '', c])
- self.assertEqual(re.split(":*", string), ['', a, b, c])
- self.assertEqual(re.split("(:*)", string),
+ self.assertEqual(re.split(":+", string), ['', a, b, c])
+ self.assertEqual(re.split("(:+)", string),
['', ':', a, ':', b, '::', c])
- self.assertEqual(re.split("(?::*)", ":a:b::c"), ['', 'a', 'b', 'c'])
- self.assertEqual(re.split("(:)*", ":a:b::c"),
+ self.assertEqual(re.split("(?::+)", ":a:b::c"), ['', 'a', 'b', 'c'])
+ self.assertEqual(re.split("(:)+", ":a:b::c"),
['', ':', 'a', ':', 'b', ':', 'c'])
self.assertEqual(re.split("([b:]+)", ":a:b::c"),
['', ':', 'a', ':b::', 'c'])
@@ -272,13 +328,34 @@ class ReTests(unittest.TestCase):
self.assertEqual(re.split("(?:b)|(?::+)", ":a:b::c"),
['', 'a', '', '', 'c'])
+ for sep, expected in [
+ (':*', ['', 'a', 'b', 'c']),
+ ('(?::*)', ['', 'a', 'b', 'c']),
+ ('(:*)', ['', ':', 'a', ':', 'b', '::', 'c']),
+ ('(:)*', ['', ':', 'a', ':', 'b', ':', 'c']),
+ ]:
+ with self.subTest(sep=sep), self.assertWarns(FutureWarning):
+ self.assertTypedEqual(re.split(sep, ':a:b::c'), expected)
+
+ for sep, expected in [
+ ('', [':a:b::c']),
+ (r'\b', [':a:b::c']),
+ (r'(?=:)', [':a:b::c']),
+ (r'(?<=:)', [':a:b::c']),
+ ]:
+ with self.subTest(sep=sep), self.assertRaises(ValueError):
+ self.assertTypedEqual(re.split(sep, ':a:b::c'), expected)
+
def test_qualified_re_split(self):
- self.assertEqual(re.split(":", ":a:b::c", 2), ['', 'a', 'b::c'])
- self.assertEqual(re.split(':', 'a:b:c:d', 2), ['a', 'b', 'c:d'])
- self.assertEqual(re.split("(:)", ":a:b::c", 2),
+ self.assertEqual(re.split(":", ":a:b::c", maxsplit=2), ['', 'a', 'b::c'])
+ self.assertEqual(re.split(':', 'a:b:c:d', maxsplit=2), ['a', 'b', 'c:d'])
+ self.assertEqual(re.split("(:)", ":a:b::c", maxsplit=2),
['', ':', 'a', ':', 'b::c'])
- self.assertEqual(re.split("(:*)", ":a:b::c", 2),
+ self.assertEqual(re.split("(:+)", ":a:b::c", maxsplit=2),
['', ':', 'a', ':', 'b::c'])
+ with self.assertWarns(FutureWarning):
+ self.assertEqual(re.split("(:*)", ":a:b::c", maxsplit=2),
+ ['', ':', 'a', ':', 'b::c'])
def test_re_findall(self):
self.assertEqual(re.findall(":+", "abc"), [])
@@ -405,6 +482,23 @@ class ReTests(unittest.TestCase):
self.assertIsNone(p.match('abd'))
self.assertIsNone(p.match('ac'))
+ # Support > 100 groups.
+ pat = '|'.join('x(?P<a%d>%x)y' % (i, i) for i in range(1, 200 + 1))
+ pat = '(?:%s)(?(200)z)' % pat
+ self.assertEqual(re.match(pat, 'xc8yz').span(), (0, 5))
+
+ self.checkPatternError(r'(?P<a>)(?(0))', 'bad group number', 10)
+ self.checkPatternError(r'()(?(1)a|b',
+ 'missing ), unterminated subpattern', 2)
+ self.checkPatternError(r'()(?(1)a|b|c)',
+ 'conditional backref with more than '
+ 'two branches', 10)
+
+ def test_re_groupref_overflow(self):
+ self.checkTemplateError('()', '\g<%s>' % sre_constants.MAXGROUPS, 'xx',
+ 'invalid group reference', 3)
+ self.checkPatternError(r'(?P<a>)(?(%d))' % sre_constants.MAXGROUPS,
+ 'invalid group reference', 10)
def test_re_groupref(self):
self.assertEqual(re.match(r'^(\|)?([^()]+)\1$', '|a|').groups(),
@@ -418,6 +512,8 @@ class ReTests(unittest.TestCase):
self.assertEqual(re.match(r'^(?:(a)|c)(\1)?$', 'c').groups(),
(None, None))
+ self.checkPatternError(r'(abc\1)', 'cannot refer to an open group', 4)
+
def test_groupdict(self):
self.assertEqual(re.match('(?P<first>first) (?P<second>second)',
'first second').groupdict(),
@@ -428,6 +524,10 @@ class ReTests(unittest.TestCase):
"first second")
.expand(r"\2 \1 \g<second> \g<first>"),
"second first second first")
+ self.assertEqual(re.match("(?P<first>first)|(?P<second>second)",
+ "first")
+ .expand(r"\2 \g<second>"),
+ " ")
def test_repeat_minmax(self):
self.assertIsNone(re.match("^(\w){1}$", "abc"))
@@ -451,6 +551,7 @@ class ReTests(unittest.TestCase):
self.assertTrue(re.match("^x{3}$", "xxx"))
self.assertTrue(re.match("^x{1,3}$", "xxx"))
+ self.assertTrue(re.match("^x{3,3}$", "xxx"))
self.assertTrue(re.match("^x{1,4}$", "xxx"))
self.assertTrue(re.match("^x{3,4}?$", "xxx"))
self.assertTrue(re.match("^x{3}?$", "xxx"))
@@ -461,6 +562,9 @@ class ReTests(unittest.TestCase):
self.assertIsNone(re.match("^x{}$", "xxx"))
self.assertTrue(re.match("^x{}$", "x{}"))
+ self.checkPatternError(r'x{2,1}',
+ 'min repeat greater than max repeat', 2)
+
def test_getattr(self):
self.assertEqual(re.compile("(?i)(a)(b)").pattern, "(?i)(a)(b)")
self.assertEqual(re.compile("(?i)(a)(b)").flags, re.I | re.U)
@@ -475,6 +579,14 @@ class ReTests(unittest.TestCase):
self.assertEqual(re.match("(a)", "a").regs, ((0, 1), (0, 1)))
self.assertTrue(re.match("(a)", "a").re)
+ # Issue 14260. groupindex should be non-modifiable mapping.
+ p = re.compile(r'(?i)(?P<first>a)(?P<other>b)')
+ self.assertEqual(sorted(p.groupindex), ['first', 'other'])
+ self.assertEqual(p.groupindex['other'], 2)
+ with self.assertRaises(TypeError):
+ p.groupindex['other'] = 0
+ self.assertEqual(p.groupindex['other'], 2)
+
def test_special_escapes(self):
self.assertEqual(re.search(r"\b(b.)\b",
"abcd abc bcd bx").group(1), "bx")
@@ -484,10 +596,6 @@ class ReTests(unittest.TestCase):
"abcd abc bcd bx", re.ASCII).group(1), "bx")
self.assertEqual(re.search(r"\B(b.)\B",
"abc bcd bc abxd", re.ASCII).group(1), "bx")
- self.assertEqual(re.search(r"\b(b.)\b",
- "abcd abc bcd bx", re.LOCALE).group(1), "bx")
- self.assertEqual(re.search(r"\B(b.)\B",
- "abc bcd bc abxd", re.LOCALE).group(1), "bx")
self.assertEqual(re.search(r"^abc$", "\nabc\n", re.M).group(0), "abc")
self.assertEqual(re.search(r"^\Aabc\Z$", "abc", re.M).group(0), "abc")
self.assertIsNone(re.search(r"^\Aabc\Z$", "\nabc\n", re.M))
@@ -508,11 +616,32 @@ class ReTests(unittest.TestCase):
b"1aa! a").group(0), b"1aa! a")
self.assertEqual(re.search(r"\d\D\w\W\s\S",
"1aa! a", re.ASCII).group(0), "1aa! a")
- self.assertEqual(re.search(r"\d\D\w\W\s\S",
- "1aa! a", re.LOCALE).group(0), "1aa! a")
self.assertEqual(re.search(br"\d\D\w\W\s\S",
b"1aa! a", re.LOCALE).group(0), b"1aa! a")
+ def test_other_escapes(self):
+ self.checkPatternError("\\", 'bad escape (end of pattern)', 0)
+ self.assertEqual(re.match(r"\(", '(').group(), '(')
+ self.assertIsNone(re.match(r"\(", ')'))
+ self.assertEqual(re.match(r"\\", '\\').group(), '\\')
+ self.assertEqual(re.match(r"[\]]", ']').group(), ']')
+ self.assertIsNone(re.match(r"[\]]", '['))
+ self.assertEqual(re.match(r"[a\-c]", '-').group(), '-')
+ self.assertIsNone(re.match(r"[a\-c]", 'b'))
+ self.assertEqual(re.match(r"[\^a]+", 'a^').group(), 'a^')
+ self.assertIsNone(re.match(r"[\^a]+", 'b'))
+ re.purge() # for warnings
+ for c in 'ceghijklmopqyzCEFGHIJKLMNOPQRTVXY':
+ with self.subTest(c):
+ with self.assertWarns(DeprecationWarning):
+ self.assertEqual(re.fullmatch('\\%c' % c, c).group(), c)
+ self.assertIsNone(re.match('\\%c' % c, 'a'))
+ for c in 'ceghijklmopqyzABCEFGHIJKLMNOPQRTVXYZ':
+ with self.subTest(c):
+ with self.assertWarns(DeprecationWarning):
+ self.assertEqual(re.fullmatch('[\\%c]' % c, c).group(), c)
+ self.assertIsNone(re.match('[\\%c]' % c, 'a'))
+
def test_string_boundaries(self):
# See http://bugs.python.org/issue10713
self.assertEqual(re.search(r"\b(abc)\b", "abc").group(1),
@@ -574,9 +703,6 @@ class ReTests(unittest.TestCase):
# Group reference.
self.assertTrue(re.match(r'(a)b(?=\1)a', 'aba'))
self.assertIsNone(re.match(r'(a)b(?=\1)c', 'abac'))
- # Named group reference.
- self.assertTrue(re.match(r'(?P<g>a)b(?=(?P=g))a', 'aba'))
- self.assertIsNone(re.match(r'(?P<g>a)b(?=(?P=g))c', 'abac'))
# Conditional group reference.
self.assertTrue(re.match(r'(?:(a)|(x))b(?=(?(2)x|c))c', 'abc'))
self.assertIsNone(re.match(r'(?:(a)|(x))b(?=(?(2)c|x))c', 'abc'))
@@ -594,13 +720,25 @@ class ReTests(unittest.TestCase):
self.assertIsNone(re.match(r'ab(?<!b)c', 'abc'))
self.assertTrue(re.match(r'ab(?<!c)c', 'abc'))
# Group reference.
- self.assertWarns(RuntimeWarning, re.compile, r'(a)a(?<=\1)c')
- # Named group reference.
- self.assertWarns(RuntimeWarning, re.compile, r'(?P<g>a)a(?<=(?P=g))c')
+ self.assertTrue(re.match(r'(a)a(?<=\1)c', 'aac'))
+ self.assertIsNone(re.match(r'(a)b(?<=\1)a', 'abaa'))
+ self.assertIsNone(re.match(r'(a)a(?<!\1)c', 'aac'))
+ self.assertTrue(re.match(r'(a)b(?<!\1)a', 'abaa'))
# Conditional group reference.
- self.assertWarns(RuntimeWarning, re.compile, r'(a)b(?<=(?(1)b|x))c')
+ self.assertIsNone(re.match(r'(?:(a)|(x))b(?<=(?(2)x|c))c', 'abc'))
+ self.assertIsNone(re.match(r'(?:(a)|(x))b(?<=(?(2)b|x))c', 'abc'))
+ self.assertTrue(re.match(r'(?:(a)|(x))b(?<=(?(2)x|b))c', 'abc'))
+ self.assertIsNone(re.match(r'(?:(a)|(x))b(?<=(?(1)c|x))c', 'abc'))
+ self.assertTrue(re.match(r'(?:(a)|(x))b(?<=(?(1)b|x))c', 'abc'))
# Group used before defined.
- self.assertWarns(RuntimeWarning, re.compile, r'(a)b(?<=(?(2)b|x))(c)')
+ self.assertRaises(re.error, re.compile, r'(a)b(?<=(?(2)b|x))(c)')
+ self.assertIsNone(re.match(r'(a)b(?<=(?(1)c|x))(c)', 'abc'))
+ self.assertTrue(re.match(r'(a)b(?<=(?(1)b|x))(c)', 'abc'))
+ # Group defined in the same lookbehind pattern
+ self.assertRaises(re.error, re.compile, r'(a)b(?<=(.)\2)(c)')
+ self.assertRaises(re.error, re.compile, r'(a)b(?<=(?P<a>.)(?P=a))(c)')
+ self.assertRaises(re.error, re.compile, r'(a)b(?<=(a)(?(2)b|x))(c)')
+ self.assertRaises(re.error, re.compile, r'(a)b(?<=(.)(?<=\2))(c)')
def test_ignore_case(self):
self.assertEqual(re.match("abc", "ABC", re.I).group(0), "ABC")
@@ -692,9 +830,12 @@ class ReTests(unittest.TestCase):
self.assertEqual(_sre.getlower(ord('A'), 0), ord('a'))
self.assertEqual(_sre.getlower(ord('A'), re.LOCALE), ord('a'))
self.assertEqual(_sre.getlower(ord('A'), re.UNICODE), ord('a'))
+ self.assertEqual(_sre.getlower(ord('A'), re.ASCII), ord('a'))
self.assertEqual(re.match("abc", "ABC", re.I).group(0), "ABC")
self.assertEqual(re.match(b"abc", b"ABC", re.I).group(0), b"ABC")
+ self.assertEqual(re.match("abc", "ABC", re.I|re.A).group(0), "ABC")
+ self.assertEqual(re.match(b"abc", b"ABC", re.I|re.L).group(0), b"ABC")
def test_not_literal(self):
self.assertEqual(re.search("\s([^a])", " b").group(1), "b")
@@ -779,8 +920,10 @@ class ReTests(unittest.TestCase):
self.assertEqual(re.X, re.VERBOSE)
def test_flags(self):
- for flag in [re.I, re.M, re.X, re.S, re.L]:
+ for flag in [re.I, re.M, re.X, re.S, re.A, re.U]:
self.assertTrue(re.compile('^pattern$', flag))
+ for flag in [re.I, re.M, re.X, re.S, re.A, re.L]:
+ self.assertTrue(re.compile(b'^pattern$', flag))
def test_sre_character_literals(self):
for i in [0, 8, 16, 32, 64, 127, 128, 255, 256, 0xFFFF, 0x10000, 0x10FFFF]:
@@ -802,15 +945,17 @@ class ReTests(unittest.TestCase):
self.assertTrue(re.match(r"\08", "\0008"))
self.assertTrue(re.match(r"\01", "\001"))
self.assertTrue(re.match(r"\018", "\0018"))
- self.assertTrue(re.match(r"\567", chr(0o167)))
- self.assertRaises(re.error, re.match, r"\911", "")
- self.assertRaises(re.error, re.match, r"\x1", "")
- self.assertRaises(re.error, re.match, r"\x1z", "")
- self.assertRaises(re.error, re.match, r"\u123", "")
- self.assertRaises(re.error, re.match, r"\u123z", "")
- self.assertRaises(re.error, re.match, r"\U0001234", "")
- self.assertRaises(re.error, re.match, r"\U0001234z", "")
- self.assertRaises(re.error, re.match, r"\U00110000", "")
+ self.checkPatternError(r"\567",
+ r'octal escape value \567 outside of '
+ r'range 0-0o377', 0)
+ self.checkPatternError(r"\911", 'invalid group reference', 0)
+ self.checkPatternError(r"\x1", r'incomplete escape \x1', 0)
+ self.checkPatternError(r"\x1z", r'incomplete escape \x1', 0)
+ self.checkPatternError(r"\u123", r'incomplete escape \u123', 0)
+ self.checkPatternError(r"\u123z", r'incomplete escape \u123', 0)
+ self.checkPatternError(r"\U0001234", r'incomplete escape \U0001234', 0)
+ self.checkPatternError(r"\U0001234z", r'incomplete escape \U0001234', 0)
+ self.checkPatternError(r"\U00110000", r'bad escape \U00110000', 0)
def test_sre_character_class_literals(self):
for i in [0, 8, 16, 32, 64, 127, 128, 255, 256, 0xFFFF, 0x10000, 0x10FFFF]:
@@ -830,12 +975,15 @@ class ReTests(unittest.TestCase):
self.assertTrue(re.match(r"[\U%08x]" % i, chr(i)))
self.assertTrue(re.match(r"[\U%08x0]" % i, chr(i)+"0"))
self.assertTrue(re.match(r"[\U%08xz]" % i, chr(i)+"z"))
+ self.checkPatternError(r"[\567]",
+ r'octal escape value \567 outside of '
+ r'range 0-0o377', 1)
+ self.checkPatternError(r"[\911]", r'bad escape \9', 1)
+ self.checkPatternError(r"[\x1z]", r'incomplete escape \x1', 1)
+ self.checkPatternError(r"[\u123z]", r'incomplete escape \u123', 1)
+ self.checkPatternError(r"[\U0001234z]", r'incomplete escape \U0001234', 1)
+ self.checkPatternError(r"[\U00110000]", r'bad escape \U00110000', 1)
self.assertTrue(re.match(r"[\U0001d49c-\U0001d4b5]", "\U0001d49e"))
- self.assertRaises(re.error, re.match, r"[\911]", "")
- self.assertRaises(re.error, re.match, r"[\x1z]", "")
- self.assertRaises(re.error, re.match, r"[\u123z]", "")
- self.assertRaises(re.error, re.match, r"[\U0001234z]", "")
- self.assertRaises(re.error, re.match, r"[\U00110000]", "")
def test_sre_byte_literals(self):
for i in [0, 8, 16, 32, 64, 127, 128, 255]:
@@ -845,16 +993,20 @@ class ReTests(unittest.TestCase):
self.assertTrue(re.match((r"\x%02x" % i).encode(), bytes([i])))
self.assertTrue(re.match((r"\x%02x0" % i).encode(), bytes([i])+b"0"))
self.assertTrue(re.match((r"\x%02xz" % i).encode(), bytes([i])+b"z"))
- self.assertTrue(re.match(br"\u", b'u'))
- self.assertTrue(re.match(br"\U", b'U'))
+ with self.assertWarns(DeprecationWarning):
+ self.assertTrue(re.match(br"\u1234", b'u1234'))
+ with self.assertWarns(DeprecationWarning):
+ self.assertTrue(re.match(br"\U00012345", b'U00012345'))
self.assertTrue(re.match(br"\0", b"\000"))
self.assertTrue(re.match(br"\08", b"\0008"))
self.assertTrue(re.match(br"\01", b"\001"))
self.assertTrue(re.match(br"\018", b"\0018"))
- self.assertTrue(re.match(br"\567", bytes([0o167])))
- self.assertRaises(re.error, re.match, br"\911", b"")
- self.assertRaises(re.error, re.match, br"\x1", b"")
- self.assertRaises(re.error, re.match, br"\x1z", b"")
+ self.checkPatternError(br"\567",
+ r'octal escape value \567 outside of '
+ r'range 0-0o377', 0)
+ self.checkPatternError(br"\911", 'invalid group reference', 0)
+ self.checkPatternError(br"\x1", r'incomplete escape \x1', 0)
+ self.checkPatternError(br"\x1z", r'incomplete escape \x1', 0)
def test_sre_byte_class_literals(self):
for i in [0, 8, 16, 32, 64, 127, 128, 255]:
@@ -866,10 +1018,26 @@ class ReTests(unittest.TestCase):
self.assertTrue(re.match((r"[\x%02x]" % i).encode(), bytes([i])))
self.assertTrue(re.match((r"[\x%02x0]" % i).encode(), bytes([i])))
self.assertTrue(re.match((r"[\x%02xz]" % i).encode(), bytes([i])))
- self.assertTrue(re.match(br"[\u]", b'u'))
- self.assertTrue(re.match(br"[\U]", b'U'))
- self.assertRaises(re.error, re.match, br"[\911]", b"")
- self.assertRaises(re.error, re.match, br"[\x1z]", b"")
+ with self.assertWarns(DeprecationWarning):
+ self.assertTrue(re.match(br"[\u1234]", b'u'))
+ with self.assertWarns(DeprecationWarning):
+ self.assertTrue(re.match(br"[\U00012345]", b'U'))
+ self.checkPatternError(br"[\567]",
+ r'octal escape value \567 outside of '
+ r'range 0-0o377', 1)
+ self.checkPatternError(br"[\911]", r'bad escape \9', 1)
+ self.checkPatternError(br"[\x1z]", r'incomplete escape \x1', 1)
+
+ def test_character_set_errors(self):
+ self.checkPatternError(r'[', 'unterminated character set', 0)
+ self.checkPatternError(r'[^', 'unterminated character set', 0)
+ self.checkPatternError(r'[a', 'unterminated character set', 0)
+ # bug 545855 -- This pattern failed to cause a compile error as it
+ # should, instead provoking a TypeError.
+ self.checkPatternError(r"[a-", 'unterminated character set', 0)
+ self.checkPatternError(r"[\w-b]", r'bad character range \w-b', 1)
+ self.checkPatternError(r"[a-\w]", r'bad character range a-\w', 1)
+ self.checkPatternError(r"[b-a]", 'bad character range b-a', 1)
def test_bug_113254(self):
self.assertEqual(re.match(r'(a)|(b)', 'b').start(1), -1)
@@ -884,11 +1052,6 @@ class ReTests(unittest.TestCase):
self.assertEqual(re.match("(?P<a>a(b))", "ab").lastgroup, 'a')
self.assertEqual(re.match("((a))", "a").lastindex, 1)
- def test_bug_545855(self):
- # bug 545855 -- This pattern failed to cause a compile error as it
- # should, instead provoking a TypeError.
- self.assertRaises(re.error, re.compile, 'foo[a-')
-
def test_bug_418626(self):
# bugs 418626 at al. -- Testing Greg Chapman's addition of op code
# SRE_OP_MIN_REPEAT_ONE for eliminating recursion on simple uses of
@@ -912,6 +1075,24 @@ class ReTests(unittest.TestCase):
self.assertEqual(re.match('(x)*y', 50000*'x'+'y').group(1), 'x')
self.assertEqual(re.match('(x)*?y', 50000*'x'+'y').group(1), 'x')
+ def test_nothing_to_repeat(self):
+ for reps in '*', '+', '?', '{1,2}':
+ for mod in '', '?':
+ self.checkPatternError('%s%s' % (reps, mod),
+ 'nothing to repeat', 0)
+ self.checkPatternError('(?:%s%s)' % (reps, mod),
+ 'nothing to repeat', 3)
+
+ def test_multiple_repeat(self):
+ for outer_reps in '*', '+', '{1,2}':
+ for outer_mod in '', '?':
+ outer_op = outer_reps + outer_mod
+ for inner_reps in '*', '+', '?', '{1,2}':
+ for inner_mod in '', '?':
+ inner_op = inner_reps + inner_mod
+ self.checkPatternError(r'x%s%s' % (inner_op, outer_op),
+ 'multiple repeat', 1 + len(inner_op))
+
def test_unlimited_zero_width_repeat(self):
# Issue #9669
self.assertIsNone(re.match(r'(?:a?)*y', 'z'))
@@ -1062,8 +1243,8 @@ class ReTests(unittest.TestCase):
def test_inline_flags(self):
# Bug #1700
- upper_char = chr(0x1ea0) # Latin Capital Letter A with Dot Bellow
- lower_char = chr(0x1ea1) # Latin Small Letter A with Dot Bellow
+ upper_char = '\u1ea0' # Latin Capital Letter A with Dot Below
+ lower_char = '\u1ea1' # Latin Small Letter A with Dot Below
p = re.compile(upper_char, re.I | re.U)
q = p.match(lower_char)
@@ -1143,6 +1324,52 @@ class ReTests(unittest.TestCase):
self.assertRaises(ValueError, re.compile, '(?a)\w', re.UNICODE)
self.assertRaises(ValueError, re.compile, '(?au)\w')
+ def test_locale_flag(self):
+ import locale
+ _, enc = locale.getlocale(locale.LC_CTYPE)
+ # Search non-ASCII letter
+ for i in range(128, 256):
+ try:
+ c = bytes([i]).decode(enc)
+ sletter = c.lower()
+ if sletter == c: continue
+ bletter = sletter.encode(enc)
+ if len(bletter) != 1: continue
+ if bletter.decode(enc) != sletter: continue
+ bpat = re.escape(bytes([i]))
+ break
+ except (UnicodeError, TypeError):
+ pass
+ else:
+ bletter = None
+ bpat = b'A'
+ # Bytes patterns
+ pat = re.compile(bpat, re.LOCALE | re.IGNORECASE)
+ if bletter:
+ self.assertTrue(pat.match(bletter))
+ pat = re.compile(b'(?L)' + bpat, re.IGNORECASE)
+ if bletter:
+ self.assertTrue(pat.match(bletter))
+ pat = re.compile(bpat, re.IGNORECASE)
+ if bletter:
+ self.assertIsNone(pat.match(bletter))
+ pat = re.compile(b'\w', re.LOCALE)
+ if bletter:
+ self.assertTrue(pat.match(bletter))
+ pat = re.compile(b'(?L)\w')
+ if bletter:
+ self.assertTrue(pat.match(bletter))
+ pat = re.compile(b'\w')
+ if bletter:
+ self.assertIsNone(pat.match(bletter))
+ # Incompatibilities
+ self.assertWarns(DeprecationWarning, re.compile, '', re.LOCALE)
+ self.assertWarns(DeprecationWarning, re.compile, '(?L)')
+ self.assertWarns(DeprecationWarning, re.compile, b'', re.LOCALE | re.ASCII)
+ self.assertWarns(DeprecationWarning, re.compile, b'(?L)', re.ASCII)
+ self.assertWarns(DeprecationWarning, re.compile, b'(?a)', re.LOCALE)
+ self.assertWarns(DeprecationWarning, re.compile, b'(?aL)')
+
def test_bug_6509(self):
# Replacement strings of both types must parse properly.
# all strings
@@ -1170,8 +1397,10 @@ class ReTests(unittest.TestCase):
# a RuntimeError is raised instead of OverflowError.
long_overflow = 2**128
self.assertRaises(TypeError, re.finditer, "a", {})
- self.assertRaises(OverflowError, _sre.compile, "abc", 0, [long_overflow])
- self.assertRaises(TypeError, _sre.compile, {}, 0, [])
+ with self.assertRaises(OverflowError):
+ _sre.compile("abc", 0, [long_overflow], 0, [], [])
+ with self.assertRaises(TypeError):
+ _sre.compile({}, 0, [], 0, [], [])
def test_search_dot_unicode(self):
self.assertTrue(re.search("123.*-", '123abc-'))
@@ -1193,8 +1422,9 @@ class ReTests(unittest.TestCase):
def test_bug_13899(self):
# Issue #13899: re pattern r"[\A]" should work like "A" but matches
# nothing. Ditto B and Z.
- self.assertEqual(re.findall(r'[\A\B\b\C\Z]', 'AB\bCZ'),
- ['A', 'B', '\b', 'C', 'Z'])
+ with self.assertWarns(DeprecationWarning):
+ self.assertEqual(re.findall(r'[\A\B\b\C\Z]', 'AB\bCZ'),
+ ['A', 'B', '\b', 'C', 'Z'])
@bigmemtest(size=_2G, memuse=1)
def test_large_search(self, size):
@@ -1253,13 +1483,13 @@ class ReTests(unittest.TestCase):
def test_backref_group_name_in_exception(self):
# Issue 17341: Poor error message when compiling invalid regex
- with self.assertRaisesRegex(sre_constants.error, '<foo>'):
- re.compile('(?P=<foo>)')
+ self.checkPatternError('(?P=<foo>)',
+ "bad character in group name '<foo>'", 4)
def test_group_name_in_exception(self):
# Issue 17341: Poor error message when compiling invalid regex
- with self.assertRaisesRegex(sre_constants.error, '\?foo'):
- re.compile('(?P<?foo>)')
+ self.checkPatternError('(?P<?foo>)',
+ "bad character in group name '?foo'", 4)
def test_issue17998(self):
for reps in '*', '+', '?', '{1}':
@@ -1309,22 +1539,22 @@ class ReTests(unittest.TestCase):
with captured_stdout() as out:
re.compile(pat, re.DEBUG)
dump = '''\
-subpattern 1
- literal 46
-subpattern None
- branch
- in
- literal 99
- literal 104
- or
- literal 112
- literal 121
-subpattern None
- groupref_exists 1
- at at_end
- else
- literal 58
- literal 32
+SUBPATTERN 1
+ LITERAL 46
+SUBPATTERN None
+ BRANCH
+ IN
+ LITERAL 99
+ LITERAL 104
+ OR
+ LITERAL 112
+ LITERAL 121
+SUBPATTERN None
+ GROUPREF_EXISTS 1
+ AT AT_END
+ ELSE
+ LITERAL 58
+ LITERAL 32
'''
self.assertEqual(out.getvalue(), dump)
# Debug output is output again even a second time (bypassing
@@ -1392,6 +1622,55 @@ subpattern None
self.assertIsNone(re.match(b'(?Li)\xc5', b'\xe5'))
self.assertIsNone(re.match(b'(?Li)\xe5', b'\xc5'))
+ def test_error(self):
+ with self.assertRaises(re.error) as cm:
+ re.compile('(\u20ac))')
+ err = cm.exception
+ self.assertIsInstance(err.pattern, str)
+ self.assertEqual(err.pattern, '(\u20ac))')
+ self.assertEqual(err.pos, 3)
+ self.assertEqual(err.lineno, 1)
+ self.assertEqual(err.colno, 4)
+ self.assertIn(err.msg, str(err))
+ self.assertIn(' at position 3', str(err))
+ self.assertNotIn(' at position 3', err.msg)
+ # Bytes pattern
+ with self.assertRaises(re.error) as cm:
+ re.compile(b'(\xa4))')
+ err = cm.exception
+ self.assertIsInstance(err.pattern, bytes)
+ self.assertEqual(err.pattern, b'(\xa4))')
+ self.assertEqual(err.pos, 3)
+ # Multiline pattern
+ with self.assertRaises(re.error) as cm:
+ re.compile("""
+ (
+ abc
+ )
+ )
+ (
+ """, re.VERBOSE)
+ err = cm.exception
+ self.assertEqual(err.pos, 77)
+ self.assertEqual(err.lineno, 5)
+ self.assertEqual(err.colno, 17)
+ self.assertIn(err.msg, str(err))
+ self.assertIn(' at position 77', str(err))
+ self.assertIn('(line 5, column 17)', str(err))
+
+ def test_misc_errors(self):
+ self.checkPatternError(r'(', 'missing ), unterminated subpattern', 0)
+ self.checkPatternError(r'((a|b)', 'missing ), unterminated subpattern', 0)
+ self.checkPatternError(r'(a|b))', 'unbalanced parenthesis', 5)
+ self.checkPatternError(r'(?P', 'unexpected end of pattern', 3)
+ self.checkPatternError(r'(?z)', 'unknown extension ?z', 1)
+ self.checkPatternError(r'(?iz)', 'unknown flag', 3)
+ self.checkPatternError(r'(?i', 'missing )', 3)
+ self.checkPatternError(r'(?#abc', 'missing ), unterminated comment', 0)
+ self.checkPatternError(r'(?<', 'unexpected end of pattern', 3)
+ self.checkPatternError(r'(?<>)', 'unknown extension ?<>', 1)
+ self.checkPatternError(r'(?', 'unexpected end of pattern', 2)
+
class PatternReprTests(unittest.TestCase):
def check(self, pattern, expected):
@@ -1436,6 +1715,10 @@ class PatternReprTests(unittest.TestCase):
self.check_flags(b'bytes pattern', re.A,
"re.compile(b'bytes pattern', re.ASCII)")
+ def test_locale(self):
+ self.check_flags(b'bytes pattern', re.L,
+ "re.compile(b'bytes pattern', re.LOCALE)")
+
def test_quotes(self):
self.check('random "double quoted" pattern',
'''re.compile('random "double quoted" pattern')''')
@@ -1549,8 +1832,16 @@ class ExternalTests(unittest.TestCase):
pass
else:
with self.subTest('bytes pattern match'):
- bpat = re.compile(bpat)
- self.assertTrue(bpat.search(bs))
+ obj = re.compile(bpat)
+ self.assertTrue(obj.search(bs))
+
+ # Try the match with LOCALE enabled, and check that it
+ # still succeeds.
+ with self.subTest('locale-sensitive match'):
+ obj = re.compile(bpat, re.LOCALE)
+ result = obj.search(bs)
+ if result is None:
+ print('=== Fails on locale-sensitive match', t)
# Try the match with the search area limited to the extent
# of the match and see if it still succeeds. \B will
@@ -1568,13 +1859,6 @@ class ExternalTests(unittest.TestCase):
obj = re.compile(pattern, re.IGNORECASE)
self.assertTrue(obj.search(s))
- # Try the match with LOCALE enabled, and check that it
- # still succeeds.
- if '(?u)' not in pattern:
- with self.subTest('locale-sensitive match'):
- obj = re.compile(pattern, re.LOCALE)
- self.assertTrue(obj.search(s))
-
# Try the match with UNICODE locale enabled, and check
# that it still succeeds.
with self.subTest('unicode-sensitive match'):
diff --git a/Lib/test/test_readline.py b/Lib/test/test_readline.py
index 0b2b0a5c2f..35330ab076 100644
--- a/Lib/test/test_readline.py
+++ b/Lib/test/test_readline.py
@@ -2,9 +2,10 @@
Very minimal unittests for parts of the readline module.
"""
import os
+import tempfile
import unittest
-from test.support import run_unittest, import_module
-from test.script_helper import assert_python_ok
+from test.support import import_module, unlink
+from test.support.script_helper import assert_python_ok
# Skip tests if there is no readline module
readline = import_module('readline')
@@ -42,6 +43,45 @@ class TestHistoryManipulation (unittest.TestCase):
self.assertEqual(readline.get_current_history_length(), 1)
+ @unittest.skipUnless(hasattr(readline, "append_history_file"),
+ "append_history not available")
+ def test_write_read_append(self):
+ hfile = tempfile.NamedTemporaryFile(delete=False)
+ hfile.close()
+ hfilename = hfile.name
+ self.addCleanup(unlink, hfilename)
+
+ # test write-clear-read == nop
+ readline.clear_history()
+ readline.add_history("first line")
+ readline.add_history("second line")
+ readline.write_history_file(hfilename)
+
+ readline.clear_history()
+ self.assertEqual(readline.get_current_history_length(), 0)
+
+ readline.read_history_file(hfilename)
+ self.assertEqual(readline.get_current_history_length(), 2)
+ self.assertEqual(readline.get_history_item(1), "first line")
+ self.assertEqual(readline.get_history_item(2), "second line")
+
+ # test append
+ readline.append_history_file(1, hfilename)
+ readline.clear_history()
+ readline.read_history_file(hfilename)
+ self.assertEqual(readline.get_current_history_length(), 3)
+ self.assertEqual(readline.get_history_item(1), "first line")
+ self.assertEqual(readline.get_history_item(2), "second line")
+ self.assertEqual(readline.get_history_item(3), "second line")
+
+ # test 'no such file' behaviour
+ os.unlink(hfilename)
+ with self.assertRaises(FileNotFoundError):
+ readline.append_history_file(1, hfilename)
+
+ # write_history_file can create the target
+ readline.write_history_file(hfilename)
+
class TestReadline(unittest.TestCase):
@@ -57,8 +97,5 @@ class TestReadline(unittest.TestCase):
self.assertEqual(stdout, b'')
-def test_main():
- run_unittest(TestHistoryManipulation, TestReadline)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_reprlib.py b/Lib/test/test_reprlib.py
index ae67f06bc4..4bf91945ea 100644
--- a/Lib/test/test_reprlib.py
+++ b/Lib/test/test_reprlib.py
@@ -10,7 +10,7 @@ import importlib
import importlib.util
import unittest
-from test.support import run_unittest, create_empty_file, verbose
+from test.support import create_empty_file, verbose
from reprlib import repr as r # Don't shadow builtin repr
from reprlib import Repr
from reprlib import recursive_repr
@@ -70,18 +70,18 @@ class ReprTests(unittest.TestCase):
eq(r([1, 2, 3, 4, 5, 6, 7]), "[1, 2, 3, 4, 5, 6, ...]")
# Sets give up after 6 as well
- eq(r(set([])), "set([])")
- eq(r(set([1])), "set([1])")
- eq(r(set([1, 2, 3])), "set([1, 2, 3])")
- eq(r(set([1, 2, 3, 4, 5, 6])), "set([1, 2, 3, 4, 5, 6])")
- eq(r(set([1, 2, 3, 4, 5, 6, 7])), "set([1, 2, 3, 4, 5, 6, ...])")
+ eq(r(set([])), "set()")
+ eq(r(set([1])), "{1}")
+ eq(r(set([1, 2, 3])), "{1, 2, 3}")
+ eq(r(set([1, 2, 3, 4, 5, 6])), "{1, 2, 3, 4, 5, 6}")
+ eq(r(set([1, 2, 3, 4, 5, 6, 7])), "{1, 2, 3, 4, 5, 6, ...}")
# Frozensets give up after 6 as well
- eq(r(frozenset([])), "frozenset([])")
- eq(r(frozenset([1])), "frozenset([1])")
- eq(r(frozenset([1, 2, 3])), "frozenset([1, 2, 3])")
- eq(r(frozenset([1, 2, 3, 4, 5, 6])), "frozenset([1, 2, 3, 4, 5, 6])")
- eq(r(frozenset([1, 2, 3, 4, 5, 6, 7])), "frozenset([1, 2, 3, 4, 5, 6, ...])")
+ eq(r(frozenset([])), "frozenset()")
+ eq(r(frozenset([1])), "frozenset({1})")
+ eq(r(frozenset([1, 2, 3])), "frozenset({1, 2, 3})")
+ eq(r(frozenset([1, 2, 3, 4, 5, 6])), "frozenset({1, 2, 3, 4, 5, 6})")
+ eq(r(frozenset([1, 2, 3, 4, 5, 6, 7])), "frozenset({1, 2, 3, 4, 5, 6, ...})")
# collections.deque after 6
eq(r(deque([1, 2, 3, 4, 5, 6, 7])), "deque([1, 2, 3, 4, 5, 6, ...])")
@@ -94,7 +94,7 @@ class ReprTests(unittest.TestCase):
eq(r(d), "{'alice': 1, 'arthur': 1, 'bob': 2, 'charles': 3, ...}")
# array.array after 5.
- eq(r(array('i')), "array('i', [])")
+ eq(r(array('i')), "array('i')")
eq(r(array('i', [1])), "array('i', [1])")
eq(r(array('i', [1, 2])), "array('i', [1, 2])")
eq(r(array('i', [1, 2, 3])), "array('i', [1, 2, 3])")
@@ -103,6 +103,20 @@ class ReprTests(unittest.TestCase):
eq(r(array('i', [1, 2, 3, 4, 5, 6])),
"array('i', [1, 2, 3, 4, 5, ...])")
+ def test_set_literal(self):
+ eq = self.assertEqual
+ eq(r({1}), "{1}")
+ eq(r({1, 2, 3}), "{1, 2, 3}")
+ eq(r({1, 2, 3, 4, 5, 6}), "{1, 2, 3, 4, 5, 6}")
+ eq(r({1, 2, 3, 4, 5, 6, 7}), "{1, 2, 3, 4, 5, 6, ...}")
+
+ def test_frozenset(self):
+ eq = self.assertEqual
+ eq(r(frozenset({1})), "frozenset({1})")
+ eq(r(frozenset({1, 2, 3})), "frozenset({1, 2, 3})")
+ eq(r(frozenset({1, 2, 3, 4, 5, 6})), "frozenset({1, 2, 3, 4, 5, 6})")
+ eq(r(frozenset({1, 2, 3, 4, 5, 6, 7})), "frozenset({1, 2, 3, 4, 5, 6, ...})")
+
def test_numbers(self):
eq = self.assertEqual
eq(r(123), repr(123))
@@ -123,7 +137,7 @@ class ReprTests(unittest.TestCase):
eq(r(i2), expected)
i3 = ClassWithFailingRepr()
- eq(r(i3), ("<ClassWithFailingRepr instance at %x>"%id(i3)))
+ eq(r(i3), ("<ClassWithFailingRepr instance at %#x>"%id(i3)))
s = r(ClassWithFailingRepr)
self.assertTrue(s.startswith("<class "))
@@ -360,6 +374,13 @@ class MyContainer2(MyContainer):
def __repr__(self):
return '<' + ', '.join(map(str, self.values)) + '>'
+class MyContainer3:
+ def __repr__(self):
+ 'Test document content'
+ pass
+ wrapped = __repr__
+ wrapper = recursive_repr()(wrapped)
+
class TestRecursiveRepr(unittest.TestCase):
def test_recursive_repr(self):
m = MyContainer(list('abcde'))
@@ -373,11 +394,12 @@ class TestRecursiveRepr(unittest.TestCase):
m.append(m)
self.assertEqual(repr(m), '<a, b, c, d, e, +++, x, +++>')
-def test_main():
- run_unittest(ReprTests)
- run_unittest(LongReprTest)
- run_unittest(TestRecursiveRepr)
-
+ def test_assigned_attributes(self):
+ from functools import WRAPPER_ASSIGNMENTS as assigned
+ wrapped = MyContainer3.wrapped
+ wrapper = MyContainer3.wrapper
+ for name in assigned:
+ self.assertIs(getattr(wrapper, name), getattr(wrapped, name))
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_richcmp.py b/Lib/test/test_richcmp.py
index 0b629dc5bc..1582caad97 100644
--- a/Lib/test/test_richcmp.py
+++ b/Lib/test/test_richcmp.py
@@ -228,25 +228,25 @@ class MiscTest(unittest.TestCase):
b = UserList()
a.append(b)
b.append(a)
- self.assertRaises(RuntimeError, operator.eq, a, b)
- self.assertRaises(RuntimeError, operator.ne, a, b)
- self.assertRaises(RuntimeError, operator.lt, a, b)
- self.assertRaises(RuntimeError, operator.le, a, b)
- self.assertRaises(RuntimeError, operator.gt, a, b)
- self.assertRaises(RuntimeError, operator.ge, a, b)
+ self.assertRaises(RecursionError, operator.eq, a, b)
+ self.assertRaises(RecursionError, operator.ne, a, b)
+ self.assertRaises(RecursionError, operator.lt, a, b)
+ self.assertRaises(RecursionError, operator.le, a, b)
+ self.assertRaises(RecursionError, operator.gt, a, b)
+ self.assertRaises(RecursionError, operator.ge, a, b)
b.append(17)
# Even recursive lists of different lengths are different,
# but they cannot be ordered
self.assertTrue(not (a == b))
self.assertTrue(a != b)
- self.assertRaises(RuntimeError, operator.lt, a, b)
- self.assertRaises(RuntimeError, operator.le, a, b)
- self.assertRaises(RuntimeError, operator.gt, a, b)
- self.assertRaises(RuntimeError, operator.ge, a, b)
+ self.assertRaises(RecursionError, operator.lt, a, b)
+ self.assertRaises(RecursionError, operator.le, a, b)
+ self.assertRaises(RecursionError, operator.gt, a, b)
+ self.assertRaises(RecursionError, operator.ge, a, b)
a.append(17)
- self.assertRaises(RuntimeError, operator.eq, a, b)
- self.assertRaises(RuntimeError, operator.ne, a, b)
+ self.assertRaises(RecursionError, operator.eq, a, b)
+ self.assertRaises(RecursionError, operator.ne, a, b)
a.insert(0, 11)
b.insert(0, 12)
self.assertTrue(not (a == b))
@@ -326,8 +326,5 @@ class ListTest(unittest.TestCase):
self.assertIs(op(x, y), True)
-def test_main():
- support.run_unittest(VectorTest, NumberTest, MiscTest, DictTest, ListTest)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_rlcompleter.py b/Lib/test/test_rlcompleter.py
index 0b3918b1bd..853e77330a 100644
--- a/Lib/test/test_rlcompleter.py
+++ b/Lib/test/test_rlcompleter.py
@@ -1,4 +1,5 @@
import unittest
+import unittest.mock
import builtins
import rlcompleter
@@ -77,6 +78,7 @@ class TestRlcompleter(unittest.TestCase):
self.assertEqual(completer.complete('f.b', 0), 'f.bar')
self.assertEqual(f.calls, 1)
+ @unittest.mock.patch('rlcompleter._readline_available', False)
def test_complete(self):
completer = rlcompleter.Completer()
self.assertEqual(completer.complete('', 0), '\t')
@@ -106,6 +108,5 @@ class TestRlcompleter(unittest.TestCase):
self.assertEqual(completer.complete('Ellipsis', 0), 'Ellipsis(')
self.assertIsNone(completer.complete('Ellipsis', 1))
-
if __name__ == '__main__':
unittest.main()
diff --git a/Lib/test/test_runpy.py b/Lib/test/test_runpy.py
index 786b813b32..87c83ecfae 100644
--- a/Lib/test/test_runpy.py
+++ b/Lib/test/test_runpy.py
@@ -8,10 +8,10 @@ import tempfile
import importlib, importlib.machinery, importlib.util
import py_compile
from test.support import (
- forget, make_legacy_pyc, run_unittest, unload, verbose, no_tracing,
- create_empty_file)
-from test.script_helper import (
- make_pkg, make_script, make_zip_pkg, make_zip_script, temp_dir)
+ forget, make_legacy_pyc, unload, verbose, no_tracing,
+ create_empty_file, temp_dir)
+from test.support.script_helper import (
+ make_pkg, make_script, make_zip_pkg, make_zip_script)
import runpy
@@ -197,8 +197,11 @@ class RunModuleTestCase(unittest.TestCase, CodeExecutionMixin):
self.expect_import_error("sys.imp.eric")
self.expect_import_error("os.path.half")
self.expect_import_error("a.bee")
+ # Relative names not allowed
self.expect_import_error(".howard")
self.expect_import_error("..eaten")
+ self.expect_import_error(".test_runpy")
+ self.expect_import_error(".unittest")
# Package without __main__.py
self.expect_import_error("multiprocessing")
@@ -269,7 +272,7 @@ class RunModuleTestCase(unittest.TestCase, CodeExecutionMixin):
if verbose > 1: print(ex) # Persist with cleaning up
def _fix_ns_for_legacy_pyc(self, ns, alter_sys):
- char_to_add = "c" if __debug__ else "o"
+ char_to_add = "c"
ns["__file__"] += char_to_add
ns["__cached__"] = ns["__file__"]
spec = ns["__spec__"]
@@ -439,6 +442,34 @@ from ..uncle.cousin import nephew
if verbose > 1: print("Testing package depth:", depth)
self._check_package(depth)
+ def test_run_package_init_exceptions(self):
+ # These were previously wrapped in an ImportError; see Issue 14285
+ result = self._make_pkg("", 1, "__main__")
+ pkg_dir, _, mod_name, _ = result
+ mod_name = mod_name.replace(".__main__", "")
+ self.addCleanup(self._del_pkg, pkg_dir, 1, mod_name)
+ init = os.path.join(pkg_dir, "__runpy_pkg__", "__init__.py")
+
+ exceptions = (ImportError, AttributeError, TypeError, ValueError)
+ for exception in exceptions:
+ name = exception.__name__
+ with self.subTest(name):
+ source = "raise {0}('{0} in __init__.py.')".format(name)
+ with open(init, "wt", encoding="ascii") as mod_file:
+ mod_file.write(source)
+ try:
+ run_module(mod_name)
+ except exception as err:
+ self.assertNotIn("finding spec", format(err))
+ else:
+ self.fail("Nothing raised; expected {}".format(name))
+ try:
+ run_module(mod_name + ".submodule")
+ except exception as err:
+ self.assertNotIn("finding spec", format(err))
+ else:
+ self.fail("Nothing raised; expected {}".format(name))
+
def test_run_package_in_namespace_package(self):
for depth in range(1, 4):
if verbose > 1: print("Testing package depth:", depth)
@@ -673,7 +704,7 @@ class RunPathTestCase(unittest.TestCase, CodeExecutionMixin):
script_name = self._make_test_script(script_dir, mod_name, source)
zip_name, fname = make_zip_script(script_dir, 'test_zip', script_name)
msg = "recursion depth exceeded"
- self.assertRaisesRegex(RuntimeError, msg, run_path, zip_name)
+ self.assertRaisesRegex(RecursionError, msg, run_path, zip_name)
def test_encoding(self):
with temp_dir() as script_dir:
diff --git a/Lib/test/test_sax.py b/Lib/test/test_sax.py
index 90f301614c..2411895d9d 100644
--- a/Lib/test/test_sax.py
+++ b/Lib/test/test_sax.py
@@ -200,6 +200,13 @@ class ParseTest(unittest.TestCase):
parseString(s, XMLGenerator(result, 'utf-8'))
self.assertEqual(result.getvalue(), xml_str(self.data, 'utf-8'))
+ def test_parseString_text(self):
+ encodings = ('us-ascii', 'iso-8859-1', 'utf-8',
+ 'utf-16', 'utf-16le', 'utf-16be')
+ for encoding in encodings:
+ self.check_parseString(xml_str(self.data, encoding))
+ self.check_parseString(self.data)
+
def test_parseString_bytes(self):
# UTF-8 is default encoding, US-ASCII is compatible with UTF-8,
# UTF-16 is autodetected
@@ -306,12 +313,24 @@ class PrepareInputSourceTest(unittest.TestCase):
def make_byte_stream(self):
return BytesIO(b"This is a byte stream.")
+ def make_character_stream(self):
+ return StringIO("This is a character stream.")
+
def checkContent(self, stream, content):
self.assertIsNotNone(stream)
self.assertEqual(stream.read(), content)
stream.close()
+ def test_character_stream(self):
+ # If the source is an InputSource with a character stream, use it.
+ src = InputSource(self.file)
+ src.setCharacterStream(self.make_character_stream())
+ prep = prepare_input_source(src)
+ self.assertIsNone(prep.getByteStream())
+ self.checkContent(prep.getCharacterStream(),
+ "This is a character stream.")
+
def test_byte_stream(self):
# If the source is an InputSource that does not have a character
# stream but does have a byte stream, use the byte stream.
@@ -346,6 +365,14 @@ class PrepareInputSourceTest(unittest.TestCase):
self.checkContent(prep.getByteStream(),
b"This is a byte stream.")
+ def test_text_file(self):
+ # If the source is a text file-like object, use it as a character
+ # stream.
+ prep = prepare_input_source(self.make_character_stream())
+ self.assertIsNone(prep.getByteStream())
+ self.checkContent(prep.getCharacterStream(),
+ "This is a character stream.")
+
# ===== XMLGenerator
@@ -1025,6 +1052,19 @@ class ExpatReaderTest(XmlTestBase):
self.assertEqual(result.getvalue(), xml_test_out)
+ def test_expat_inpsource_character_stream(self):
+ parser = create_parser()
+ result = BytesIO()
+ xmlgen = XMLGenerator(result)
+
+ parser.setContentHandler(xmlgen)
+ inpsrc = InputSource()
+ with open(TEST_XMLFILE, 'rt', encoding='iso-8859-1') as f:
+ inpsrc.setCharacterStream(f)
+ parser.parse(inpsrc)
+
+ self.assertEqual(result.getvalue(), xml_test_out)
+
# ===== IncrementalParser support
def test_expat_incremental(self):
diff --git a/Lib/test/test_scope.py b/Lib/test/test_scope.py
index b325545f32..4239b26408 100644
--- a/Lib/test/test_scope.py
+++ b/Lib/test/test_scope.py
@@ -1,7 +1,7 @@
import unittest
import weakref
-from test.support import check_syntax_error, cpython_only, run_unittest
+from test.support import check_syntax_error, cpython_only
class ScopeTests(unittest.TestCase):
@@ -757,8 +757,5 @@ class ScopeTests(unittest.TestCase):
self.assertIsNone(ref())
-def test_main():
- run_unittest(ScopeTests)
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_script_helper.py b/Lib/test/test_script_helper.py
index 372d6a79ae..a7680f886a 100644
--- a/Lib/test/test_script_helper.py
+++ b/Lib/test/test_script_helper.py
@@ -1,8 +1,8 @@
-"""Unittests for test.script_helper. Who tests the test helper?"""
+"""Unittests for test.support.script_helper. Who tests the test helper?"""
import subprocess
import sys
-from test import script_helper
+from test.support import script_helper
import unittest
from unittest import mock
@@ -23,21 +23,21 @@ class TestScriptHelper(unittest.TestCase):
with self.assertRaises(AssertionError) as error_context:
script_helper.assert_python_ok('-c', 'sys.exit(0)')
error_msg = str(error_context.exception)
- self.assertIn('command line was:', error_msg)
+ self.assertIn('command line:', error_msg)
self.assertIn('sys.exit(0)', error_msg, msg='unexpected command line')
def test_assert_python_failure_raises(self):
with self.assertRaises(AssertionError) as error_context:
script_helper.assert_python_failure('-c', 'import sys; sys.exit(0)')
error_msg = str(error_context.exception)
- self.assertIn('Process return code is 0,', error_msg)
+ self.assertIn('Process return code is 0\n', error_msg)
self.assertIn('import sys; sys.exit(0)', error_msg,
msg='unexpected command line.')
@mock.patch('subprocess.Popen')
def test_assert_python_isolated_when_env_not_required(self, mock_popen):
with mock.patch.object(script_helper,
- '_interpreter_requires_environment',
+ 'interpreter_requires_environment',
return_value=False) as mock_ire_func:
mock_popen.side_effect = RuntimeError('bail out of unittest')
try:
@@ -56,7 +56,7 @@ class TestScriptHelper(unittest.TestCase):
def test_assert_python_not_isolated_when_env_is_required(self, mock_popen):
"""Ensure that -I is not passed when the environment is required."""
with mock.patch.object(script_helper,
- '_interpreter_requires_environment',
+ 'interpreter_requires_environment',
return_value=True) as mock_ire_func:
mock_popen.side_effect = RuntimeError('bail out of unittest')
try:
@@ -69,7 +69,7 @@ class TestScriptHelper(unittest.TestCase):
class TestScriptHelperEnvironment(unittest.TestCase):
- """Code coverage for _interpreter_requires_environment()."""
+ """Code coverage for interpreter_requires_environment()."""
def setUp(self):
self.assertTrue(
@@ -84,22 +84,22 @@ class TestScriptHelperEnvironment(unittest.TestCase):
@mock.patch('subprocess.check_call')
def test_interpreter_requires_environment_true(self, mock_check_call):
mock_check_call.side_effect = subprocess.CalledProcessError('', '')
- self.assertTrue(script_helper._interpreter_requires_environment())
- self.assertTrue(script_helper._interpreter_requires_environment())
+ self.assertTrue(script_helper.interpreter_requires_environment())
+ self.assertTrue(script_helper.interpreter_requires_environment())
self.assertEqual(1, mock_check_call.call_count)
@mock.patch('subprocess.check_call')
def test_interpreter_requires_environment_false(self, mock_check_call):
# The mocked subprocess.check_call fakes a no-error process.
- script_helper._interpreter_requires_environment()
- self.assertFalse(script_helper._interpreter_requires_environment())
+ script_helper.interpreter_requires_environment()
+ self.assertFalse(script_helper.interpreter_requires_environment())
self.assertEqual(1, mock_check_call.call_count)
@mock.patch('subprocess.check_call')
def test_interpreter_requires_environment_details(self, mock_check_call):
- script_helper._interpreter_requires_environment()
- self.assertFalse(script_helper._interpreter_requires_environment())
- self.assertFalse(script_helper._interpreter_requires_environment())
+ script_helper.interpreter_requires_environment()
+ self.assertFalse(script_helper.interpreter_requires_environment())
+ self.assertFalse(script_helper.interpreter_requires_environment())
self.assertEqual(1, mock_check_call.call_count)
check_call_command = mock_check_call.call_args[0][0]
self.assertEqual(sys.executable, check_call_command[0])
diff --git a/Lib/test/test_select.py b/Lib/test/test_select.py
index 8f9a1c9d88..a973f3f48d 100644
--- a/Lib/test/test_select.py
+++ b/Lib/test/test_select.py
@@ -75,9 +75,8 @@ class SelectTestCase(unittest.TestCase):
a[:] = [F()] * 10
self.assertEqual(select.select([], a, []), ([], a[:5], []))
-def test_main():
- support.run_unittest(SelectTestCase)
+def tearDownModule():
support.reap_children()
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_selectors.py b/Lib/test/test_selectors.py
index 952fda6c69..454c17be99 100644
--- a/Lib/test/test_selectors.py
+++ b/Lib/test/test_selectors.py
@@ -9,10 +9,7 @@ from test import support
from time import sleep
import unittest
import unittest.mock
-try:
- from time import monotonic as time
-except ImportError:
- from time import time as time
+from time import monotonic as time
try:
import resource
except ImportError:
@@ -25,7 +22,7 @@ else:
def socketpair(family=socket.AF_INET, type=socket.SOCK_STREAM, proto=0):
with socket.socket(family, type, proto) as l:
l.bind((support.HOST, 0))
- l.listen(3)
+ l.listen()
c = socket.socket(family, type, proto)
try:
c.connect(l.getsockname())
@@ -188,8 +185,8 @@ class BaseSelectorTestCase(unittest.TestCase):
s.register(wr, selectors.EVENT_WRITE)
s.close()
- self.assertRaises(KeyError, s.get_key, rd)
- self.assertRaises(KeyError, s.get_key, wr)
+ self.assertRaises(RuntimeError, s.get_key, rd)
+ self.assertRaises(RuntimeError, s.get_key, wr)
self.assertRaises(KeyError, mapping.__getitem__, rd)
self.assertRaises(KeyError, mapping.__getitem__, wr)
@@ -258,8 +255,8 @@ class BaseSelectorTestCase(unittest.TestCase):
sel.register(rd, selectors.EVENT_READ)
sel.register(wr, selectors.EVENT_WRITE)
- self.assertRaises(KeyError, s.get_key, rd)
- self.assertRaises(KeyError, s.get_key, wr)
+ self.assertRaises(RuntimeError, s.get_key, rd)
+ self.assertRaises(RuntimeError, s.get_key, wr)
def test_fileno(self):
s = self.SELECTOR()
@@ -360,7 +357,35 @@ class BaseSelectorTestCase(unittest.TestCase):
@unittest.skipUnless(hasattr(signal, "alarm"),
"signal.alarm() required for this test")
- def test_select_interrupt(self):
+ def test_select_interrupt_exc(self):
+ s = self.SELECTOR()
+ self.addCleanup(s.close)
+
+ rd, wr = self.make_socketpair()
+
+ class InterruptSelect(Exception):
+ pass
+
+ def handler(*args):
+ raise InterruptSelect
+
+ orig_alrm_handler = signal.signal(signal.SIGALRM, handler)
+ self.addCleanup(signal.signal, signal.SIGALRM, orig_alrm_handler)
+ self.addCleanup(signal.alarm, 0)
+
+ signal.alarm(1)
+
+ s.register(rd, selectors.EVENT_READ)
+ t = time()
+ # select() is interrupted by a signal which raises an exception
+ with self.assertRaises(InterruptSelect):
+ s.select(30)
+ # select() was interrupted before the timeout of 30 seconds
+ self.assertLess(time() - t, 5.0)
+
+ @unittest.skipUnless(hasattr(signal, "alarm"),
+ "signal.alarm() required for this test")
+ def test_select_interrupt_noraise(self):
s = self.SELECTOR()
self.addCleanup(s.close)
@@ -374,8 +399,11 @@ class BaseSelectorTestCase(unittest.TestCase):
s.register(rd, selectors.EVENT_READ)
t = time()
- self.assertFalse(s.select(2))
- self.assertLess(time() - t, 2.5)
+ # select() is interrupted by a signal, but the signal handler doesn't
+ # raise an exception, so select() should by retries with a recomputed
+ # timeout
+ self.assertFalse(s.select(1.5))
+ self.assertGreaterEqual(time() - t, 1.0)
class ScalableSelectorMixIn:
@@ -455,10 +483,18 @@ class KqueueSelectorTestCase(BaseSelectorTestCase, ScalableSelectorMixIn):
SELECTOR = getattr(selectors, 'KqueueSelector', None)
+@unittest.skipUnless(hasattr(selectors, 'DevpollSelector'),
+ "Test needs selectors.DevpollSelector")
+class DevpollSelectorTestCase(BaseSelectorTestCase, ScalableSelectorMixIn):
+
+ SELECTOR = getattr(selectors, 'DevpollSelector', None)
+
+
+
def test_main():
tests = [DefaultSelectorTestCase, SelectSelectorTestCase,
PollSelectorTestCase, EpollSelectorTestCase,
- KqueueSelectorTestCase]
+ KqueueSelectorTestCase, DevpollSelectorTestCase]
support.run_unittest(*tests)
support.reap_children()
diff --git a/Lib/test/test_set.py b/Lib/test/test_set.py
index f084ebeadd..1a49edf231 100644
--- a/Lib/test/test_set.py
+++ b/Lib/test/test_set.py
@@ -362,6 +362,9 @@ class TestJointOps:
gc.collect()
self.assertTrue(ref() is None, "Cycle was not collected")
+ def test_free_after_iterating(self):
+ support.check_free_after_iterating(self, iter, self.thetype)
+
class TestSet(TestJointOps, unittest.TestCase):
thetype = set
basetype = set
@@ -931,7 +934,7 @@ class TestBasicOpsString(TestBasicOps, unittest.TestCase):
class TestBasicOpsBytes(TestBasicOps, unittest.TestCase):
def setUp(self):
- self.case = "string set"
+ self.case = "bytes set"
self.values = [b"a", b"b", b"c"]
self.set = set(self.values)
self.dup = set(self.values)
@@ -1742,6 +1745,19 @@ class TestWeirdBugs(unittest.TestCase):
s.update(range(100))
list(si)
+ def test_merge_and_mutate(self):
+ class X:
+ def __hash__(self):
+ return hash(0)
+ def __eq__(self, o):
+ other.clear()
+ return False
+
+ other = set()
+ other = {X() for i in range(10)}
+ s = {0}
+ s.update(other)
+
# Application tests (based on David Eppstein's graph recipes ====================================
def powerset(U):
@@ -1820,7 +1836,7 @@ class TestGraphs(unittest.TestCase):
# http://en.wikipedia.org/wiki/Cuboctahedron
# 8 triangular faces and 6 square faces
- # 12 indentical vertices each connecting a triangle and square
+ # 12 identical vertices each connecting a triangle and square
g = cube(3)
cuboctahedron = linegraph(g) # V( --> {V1, V2, V3, V4}
diff --git a/Lib/test/test_shlex.py b/Lib/test/test_shlex.py
index d2809aede2..4fafdd4f2e 100644
--- a/Lib/test/test_shlex.py
+++ b/Lib/test/test_shlex.py
@@ -3,7 +3,6 @@ import shlex
import string
import unittest
-from test import support
# The original test data set was from shellwords, by Hartmut Goebel.
@@ -195,8 +194,5 @@ if not getattr(shlex, "split", None):
if methname.startswith("test") and methname != "testCompat":
delattr(ShlexTest, methname)
-def test_main():
- support.run_unittest(ShlexTest)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py
index d2d4d0308f..13b30b90cd 100644
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
@@ -30,6 +30,12 @@ try:
except ImportError:
BZ2_SUPPORTED = False
+try:
+ import lzma
+ LZMA_SUPPORTED = True
+except ImportError:
+ LZMA_SUPPORTED = False
+
TESTFN2 = TESTFN + "2"
try:
@@ -1229,6 +1235,8 @@ class TestShutil(unittest.TestCase):
formats = ['tar', 'gztar', 'zip']
if BZ2_SUPPORTED:
formats.append('bztar')
+ if LZMA_SUPPORTED:
+ formats.append('xztar')
root_dir, base_dir = self._create_files()
expected = rlistdir(root_dir)
@@ -1665,6 +1673,24 @@ class TestMove(unittest.TestCase):
rv = shutil.move(self.src_file, os.path.join(self.dst_dir, 'bar'))
self.assertEqual(rv, os.path.join(self.dst_dir, 'bar'))
+ @mock_rename
+ def test_move_file_special_function(self):
+ moved = []
+ def _copy(src, dst):
+ moved.append((src, dst))
+ shutil.move(self.src_file, self.dst_dir, copy_function=_copy)
+ self.assertEqual(len(moved), 1)
+
+ @mock_rename
+ def test_move_dir_special_function(self):
+ moved = []
+ def _copy(src, dst):
+ moved.append((src, dst))
+ support.create_empty_file(os.path.join(self.src_dir, 'child'))
+ support.create_empty_file(os.path.join(self.src_dir, 'child1'))
+ shutil.move(self.src_dir, self.dst_dir, copy_function=_copy)
+ self.assertEqual(len(moved), 3)
+
class TestCopyFile(unittest.TestCase):
@@ -1802,15 +1828,27 @@ class TermsizeTests(unittest.TestCase):
with support.EnvironmentVarGuard() as env:
env['COLUMNS'] = '777'
+ del env['LINES']
size = shutil.get_terminal_size()
self.assertEqual(size.columns, 777)
with support.EnvironmentVarGuard() as env:
+ del env['COLUMNS']
env['LINES'] = '888'
size = shutil.get_terminal_size()
self.assertEqual(size.lines, 888)
+ def test_bad_environ(self):
+ with support.EnvironmentVarGuard() as env:
+ env['COLUMNS'] = 'xxx'
+ env['LINES'] = 'yyy'
+ size = shutil.get_terminal_size()
+ self.assertGreaterEqual(size.columns, 0)
+ self.assertGreaterEqual(size.lines, 0)
+
@unittest.skipUnless(os.isatty(sys.__stdout__.fileno()), "not on tty")
+ @unittest.skipUnless(hasattr(os, 'get_terminal_size'),
+ 'need os.get_terminal_size()')
def test_stty_match(self):
"""Check if stty returns the same results ignoring env
@@ -1831,6 +1869,25 @@ class TermsizeTests(unittest.TestCase):
self.assertEqual(expected, actual)
+ def test_fallback(self):
+ with support.EnvironmentVarGuard() as env:
+ del env['LINES']
+ del env['COLUMNS']
+
+ # sys.__stdout__ has no fileno()
+ with support.swap_attr(sys, '__stdout__', None):
+ size = shutil.get_terminal_size(fallback=(10, 20))
+ self.assertEqual(size.columns, 10)
+ self.assertEqual(size.lines, 20)
+
+ # sys.__stdout__ is not a terminal on Unix
+ # or fileno() not in (0, 1, 2) on Windows
+ with open(os.devnull, 'w') as f, \
+ support.swap_attr(sys, '__stdout__', f):
+ size = shutil.get_terminal_size(fallback=(30, 40))
+ self.assertEqual(size.columns, 30)
+ self.assertEqual(size.lines, 40)
+
class PublicAPITests(unittest.TestCase):
"""Ensures that the correct values are exposed in the public API."""
diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py
index 74f74af0b4..1b80ff0963 100644
--- a/Lib/test/test_signal.py
+++ b/Lib/test/test_signal.py
@@ -1,19 +1,25 @@
import unittest
from test import support
from contextlib import closing
+import enum
import gc
import pickle
import select
import signal
+import socket
import struct
import subprocess
import traceback
import sys, os, time, errno
-from test.script_helper import assert_python_ok, spawn_python
+from test.support.script_helper import assert_python_ok, spawn_python
try:
import threading
except ImportError:
threading = None
+try:
+ import _testcapi
+except ImportError:
+ _testcapi = None
class HandlerBCalled(Exception):
@@ -39,6 +45,23 @@ def ignoring_eintr(__func, *args, **kwargs):
return None
+class GenericTests(unittest.TestCase):
+
+ @unittest.skipIf(threading is None, "test needs threading module")
+ def test_enums(self):
+ for name in dir(signal):
+ sig = getattr(signal, name)
+ if name in {'SIG_DFL', 'SIG_IGN'}:
+ self.assertIsInstance(sig, signal.Handlers)
+ elif name in {'SIG_BLOCK', 'SIG_UNBLOCK', 'SIG_SETMASK'}:
+ self.assertIsInstance(sig, signal.Sigmasks)
+ elif name.startswith('SIG') and not name.startswith('SIG_'):
+ self.assertIsInstance(sig, signal.Signals)
+ elif name.startswith('CTRL_'):
+ self.assertIsInstance(sig, signal.Signals)
+ self.assertEqual(sys.platform, "win32")
+
+
@unittest.skipIf(sys.platform == "win32", "Not valid on Windows")
class InterProcessSignalTests(unittest.TestCase):
MAX_DURATION = 20 # Entire test should last at most 20 sec.
@@ -195,6 +218,7 @@ class PosixTests(unittest.TestCase):
def test_getsignal(self):
hup = signal.signal(signal.SIGHUP, self.trivial_signal_handler)
+ self.assertIsInstance(hup, signal.Handlers)
self.assertEqual(signal.getsignal(signal.SIGHUP),
self.trivial_signal_handler)
signal.signal(signal.SIGHUP, hup)
@@ -229,15 +253,77 @@ class WakeupFDTests(unittest.TestCase):
def test_invalid_fd(self):
fd = support.make_bad_fd()
- self.assertRaises(ValueError, signal.set_wakeup_fd, fd)
+ self.assertRaises((ValueError, OSError),
+ signal.set_wakeup_fd, fd)
+
+ def test_invalid_socket(self):
+ sock = socket.socket()
+ fd = sock.fileno()
+ sock.close()
+ self.assertRaises((ValueError, OSError),
+ signal.set_wakeup_fd, fd)
+
+ def test_set_wakeup_fd_result(self):
+ r1, w1 = os.pipe()
+ self.addCleanup(os.close, r1)
+ self.addCleanup(os.close, w1)
+ r2, w2 = os.pipe()
+ self.addCleanup(os.close, r2)
+ self.addCleanup(os.close, w2)
+
+ if hasattr(os, 'set_blocking'):
+ os.set_blocking(w1, False)
+ os.set_blocking(w2, False)
+
+ signal.set_wakeup_fd(w1)
+ self.assertEqual(signal.set_wakeup_fd(w2), w1)
+ self.assertEqual(signal.set_wakeup_fd(-1), w2)
+ self.assertEqual(signal.set_wakeup_fd(-1), -1)
+
+ def test_set_wakeup_fd_socket_result(self):
+ sock1 = socket.socket()
+ self.addCleanup(sock1.close)
+ sock1.setblocking(False)
+ fd1 = sock1.fileno()
+
+ sock2 = socket.socket()
+ self.addCleanup(sock2.close)
+ sock2.setblocking(False)
+ fd2 = sock2.fileno()
+
+ signal.set_wakeup_fd(fd1)
+ self.assertEqual(signal.set_wakeup_fd(fd2), fd1)
+ self.assertEqual(signal.set_wakeup_fd(-1), fd2)
+ self.assertEqual(signal.set_wakeup_fd(-1), -1)
+
+ # On Windows, files are always blocking and Windows does not provide a
+ # function to test if a socket is in non-blocking mode.
+ @unittest.skipIf(sys.platform == "win32", "tests specific to POSIX")
+ def test_set_wakeup_fd_blocking(self):
+ rfd, wfd = os.pipe()
+ self.addCleanup(os.close, rfd)
+ self.addCleanup(os.close, wfd)
+
+ # fd must be non-blocking
+ os.set_blocking(wfd, True)
+ with self.assertRaises(ValueError) as cm:
+ signal.set_wakeup_fd(wfd)
+ self.assertEqual(str(cm.exception),
+ "the fd %s must be in non-blocking mode" % wfd)
+
+ # non-blocking is ok
+ os.set_blocking(wfd, False)
+ signal.set_wakeup_fd(wfd)
+ signal.set_wakeup_fd(-1)
@unittest.skipIf(sys.platform == "win32", "Not valid on Windows")
class WakeupSignalTests(unittest.TestCase):
+ @unittest.skipIf(_testcapi is None, 'need _testcapi')
def check_wakeup(self, test_body, *signals, ordered=True):
# use a subprocess to have only one thread
code = """if 1:
- import fcntl
+ import _testcapi
import os
import signal
import struct
@@ -260,10 +346,7 @@ class WakeupSignalTests(unittest.TestCase):
signal.signal(signal.SIGALRM, handler)
read, write = os.pipe()
- for fd in (read, write):
- flags = fcntl.fcntl(fd, fcntl.F_GETFL, 0)
- flags = flags | os.O_NONBLOCK
- fcntl.fcntl(fd, fcntl.F_SETFL, flags)
+ os.set_blocking(write, False)
signal.set_wakeup_fd(write)
test()
@@ -271,21 +354,21 @@ class WakeupSignalTests(unittest.TestCase):
os.close(read)
os.close(write)
- """.format(signals, ordered, test_body)
+ """.format(tuple(map(int, signals)), ordered, test_body)
assert_python_ok('-c', code)
+ @unittest.skipIf(_testcapi is None, 'need _testcapi')
def test_wakeup_write_error(self):
# Issue #16105: write() errors in the C signal handler should not
# pass silently.
# Use a subprocess to have only one thread.
code = """if 1:
+ import _testcapi
import errno
- import fcntl
import os
import signal
import sys
- import time
from test.support import captured_stderr
def handler(signum, frame):
@@ -293,15 +376,13 @@ class WakeupSignalTests(unittest.TestCase):
signal.signal(signal.SIGALRM, handler)
r, w = os.pipe()
- flags = fcntl.fcntl(r, fcntl.F_GETFL, 0)
- fcntl.fcntl(r, fcntl.F_SETFL, flags | os.O_NONBLOCK)
+ os.set_blocking(r, False)
# Set wakeup_fd a read-only file descriptor to trigger the error
signal.set_wakeup_fd(r)
try:
with captured_stderr() as err:
- signal.alarm(1)
- time.sleep(5.0)
+ _testcapi.raise_signal(signal.SIGALRM)
except ZeroDivisionError:
# An ignored exception should have been printed out on stderr
err = err.getvalue()
@@ -312,6 +393,9 @@ class WakeupSignalTests(unittest.TestCase):
raise AssertionError(err)
else:
raise AssertionError("ZeroDivisionError not raised")
+
+ os.close(r)
+ os.close(w)
"""
r, w = os.pipe()
try:
@@ -334,18 +418,28 @@ class WakeupSignalTests(unittest.TestCase):
TIMEOUT_FULL = 10
TIMEOUT_HALF = 5
+ class InterruptSelect(Exception):
+ pass
+
+ def handler(signum, frame):
+ raise InterruptSelect
+ signal.signal(signal.SIGALRM, handler)
+
signal.alarm(1)
- before_time = time.time()
+
# We attempt to get a signal during the sleep,
# before select is called
- time.sleep(TIMEOUT_FULL)
- mid_time = time.time()
- dt = mid_time - before_time
- if dt >= TIMEOUT_HALF:
- raise Exception("%s >= %s" % (dt, TIMEOUT_HALF))
+ try:
+ select.select([], [], [], TIMEOUT_FULL)
+ except InterruptSelect:
+ pass
+ else:
+ raise Exception("select() was not interrupted")
+
+ before_time = time.monotonic()
select.select([read], [], [], TIMEOUT_FULL)
- after_time = time.time()
- dt = after_time - mid_time
+ after_time = time.monotonic()
+ dt = after_time - before_time
if dt >= TIMEOUT_HALF:
raise Exception("%s >= %s" % (dt, TIMEOUT_HALF))
""", signal.SIGALRM)
@@ -358,16 +452,23 @@ class WakeupSignalTests(unittest.TestCase):
TIMEOUT_FULL = 10
TIMEOUT_HALF = 5
+ class InterruptSelect(Exception):
+ pass
+
+ def handler(signum, frame):
+ raise InterruptSelect
+ signal.signal(signal.SIGALRM, handler)
+
signal.alarm(1)
- before_time = time.time()
+ before_time = time.monotonic()
# We attempt to get a signal during the select call
try:
select.select([read], [], [], TIMEOUT_FULL)
- except OSError:
+ except InterruptSelect:
pass
else:
- raise Exception("OSError not raised")
- after_time = time.time()
+ raise Exception("select() was not interrupted")
+ after_time = time.monotonic()
dt = after_time - before_time
if dt >= TIMEOUT_HALF:
raise Exception("%s >= %s" % (dt, TIMEOUT_HALF))
@@ -375,9 +476,10 @@ class WakeupSignalTests(unittest.TestCase):
def test_signum(self):
self.check_wakeup("""def test():
+ import _testcapi
signal.signal(signal.SIGUSR1, handler)
- os.kill(os.getpid(), signal.SIGUSR1)
- os.kill(os.getpid(), signal.SIGALRM)
+ _testcapi.raise_signal(signal.SIGUSR1)
+ _testcapi.raise_signal(signal.SIGALRM)
""", signal.SIGUSR1, signal.SIGALRM)
@unittest.skipUnless(hasattr(signal, 'pthread_sigmask'),
@@ -391,13 +493,97 @@ class WakeupSignalTests(unittest.TestCase):
signal.signal(signum2, handler)
signal.pthread_sigmask(signal.SIG_BLOCK, (signum1, signum2))
- os.kill(os.getpid(), signum1)
- os.kill(os.getpid(), signum2)
+ _testcapi.raise_signal(signum1)
+ _testcapi.raise_signal(signum2)
# Unblocking the 2 signals calls the C signal handler twice
signal.pthread_sigmask(signal.SIG_UNBLOCK, (signum1, signum2))
""", signal.SIGUSR1, signal.SIGUSR2, ordered=False)
+@unittest.skipUnless(hasattr(socket, 'socketpair'), 'need socket.socketpair')
+class WakeupSocketSignalTests(unittest.TestCase):
+
+ @unittest.skipIf(_testcapi is None, 'need _testcapi')
+ def test_socket(self):
+ # use a subprocess to have only one thread
+ code = """if 1:
+ import signal
+ import socket
+ import struct
+ import _testcapi
+
+ signum = signal.SIGINT
+ signals = (signum,)
+
+ def handler(signum, frame):
+ pass
+
+ signal.signal(signum, handler)
+
+ read, write = socket.socketpair()
+ read.setblocking(False)
+ write.setblocking(False)
+ signal.set_wakeup_fd(write.fileno())
+
+ _testcapi.raise_signal(signum)
+
+ data = read.recv(1)
+ if not data:
+ raise Exception("no signum written")
+ raised = struct.unpack('B', data)
+ if raised != signals:
+ raise Exception("%r != %r" % (raised, signals))
+
+ read.close()
+ write.close()
+ """
+
+ assert_python_ok('-c', code)
+
+ @unittest.skipIf(_testcapi is None, 'need _testcapi')
+ def test_send_error(self):
+ # Use a subprocess to have only one thread.
+ if os.name == 'nt':
+ action = 'send'
+ else:
+ action = 'write'
+ code = """if 1:
+ import errno
+ import signal
+ import socket
+ import sys
+ import time
+ import _testcapi
+ from test.support import captured_stderr
+
+ signum = signal.SIGINT
+
+ def handler(signum, frame):
+ pass
+
+ signal.signal(signum, handler)
+
+ read, write = socket.socketpair()
+ read.setblocking(False)
+ write.setblocking(False)
+
+ signal.set_wakeup_fd(write.fileno())
+
+ # Close sockets: send() will fail
+ read.close()
+ write.close()
+
+ with captured_stderr() as err:
+ _testcapi.raise_signal(signum)
+
+ err = err.getvalue()
+ if ('Exception ignored when trying to {action} to the signal wakeup fd'
+ not in err):
+ raise AssertionError(err)
+ """.format(action=action)
+ assert_python_ok('-c', code)
+
+
@unittest.skipIf(sys.platform == "win32", "Not valid on Windows")
class SiginterruptTest(unittest.TestCase):
@@ -418,7 +604,7 @@ class SiginterruptTest(unittest.TestCase):
r, w = os.pipe()
def handler(signum, frame):
- pass
+ 1 / 0
signal.signal(signal.SIGALRM, handler)
if interrupt is not None:
@@ -428,18 +614,21 @@ class SiginterruptTest(unittest.TestCase):
sys.stdout.flush()
# run the test twice
- for loop in range(2):
- # send a SIGALRM in a second (during the read)
- signal.alarm(1)
- try:
- # blocking call: read from a pipe without data
- os.read(r, 1)
- except OSError as err:
- if err.errno != errno.EINTR:
- raise
- else:
- sys.exit(2)
- sys.exit(3)
+ try:
+ for loop in range(2):
+ # send a SIGALRM in a second (during the read)
+ signal.alarm(1)
+ try:
+ # blocking call: read from a pipe without data
+ os.read(r, 1)
+ except ZeroDivisionError:
+ pass
+ else:
+ sys.exit(2)
+ sys.exit(3)
+ finally:
+ os.close(r)
+ os.close(w)
""" % (interrupt,)
with spawn_python('-c', code) as process:
try:
@@ -537,8 +726,8 @@ class ItimerTest(unittest.TestCase):
signal.signal(signal.SIGVTALRM, self.sig_vtalrm)
signal.setitimer(self.itimer, 0.3, 0.2)
- start_time = time.time()
- while time.time() - start_time < 60.0:
+ start_time = time.monotonic()
+ while time.monotonic() - start_time < 60.0:
# use up some virtual time by doing real work
_ = pow(12345, 67890, 10000019)
if signal.getitimer(self.itimer) == (0.0, 0.0):
@@ -560,8 +749,8 @@ class ItimerTest(unittest.TestCase):
signal.signal(signal.SIGPROF, self.sig_prof)
signal.setitimer(self.itimer, 0.2, 0.2)
- start_time = time.time()
- while time.time() - start_time < 60.0:
+ start_time = time.monotonic()
+ while time.monotonic() - start_time < 60.0:
# do some work
_ = pow(12345, 67890, 10000019)
if signal.getitimer(self.itimer) == (0.0, 0.0):
@@ -604,6 +793,8 @@ class PendingSignalsTests(unittest.TestCase):
signal.pthread_sigmask(signal.SIG_BLOCK, [signum])
os.kill(os.getpid(), signum)
pending = signal.sigpending()
+ for sig in pending:
+ assert isinstance(sig, signal.Signals), repr(pending)
if pending != {signum}:
raise Exception('%s != {%s}' % (pending, signum))
try:
@@ -660,6 +851,7 @@ class PendingSignalsTests(unittest.TestCase):
code = '''if 1:
import signal
import sys
+ from signal import Signals
def handler(signum, frame):
1/0
@@ -702,6 +894,7 @@ class PendingSignalsTests(unittest.TestCase):
def test(signum):
signal.alarm(1)
received = signal.sigwait([signum])
+ assert isinstance(received, signal.Signals), received
if received != signum:
raise Exception('received %s, not %s' % (received, signum))
''')
@@ -757,35 +950,6 @@ class PendingSignalsTests(unittest.TestCase):
signum = signal.SIGALRM
self.assertRaises(ValueError, signal.sigtimedwait, [signum], -1.0)
- @unittest.skipUnless(hasattr(signal, 'sigwaitinfo'),
- 'need signal.sigwaitinfo()')
- # Issue #18238: sigwaitinfo() can be interrupted on Linux (raises
- # InterruptedError), but not on AIX
- @unittest.skipIf(sys.platform.startswith("aix"),
- 'signal.sigwaitinfo() cannot be interrupted on AIX')
- def test_sigwaitinfo_interrupted(self):
- self.wait_helper(signal.SIGUSR1, '''
- def test(signum):
- import errno
-
- hndl_called = True
- def alarm_handler(signum, frame):
- hndl_called = False
-
- signal.signal(signal.SIGALRM, alarm_handler)
- signal.alarm(1)
- try:
- signal.sigwaitinfo([signal.SIGUSR1])
- except OSError as e:
- if e.errno == errno.EINTR:
- if not hndl_called:
- raise Exception("SIGALRM handler not called")
- else:
- raise Exception("Expected EINTR to be raised by sigwaitinfo")
- else:
- raise Exception("Expected EINTR to be raised by sigwaitinfo")
- ''')
-
@unittest.skipUnless(hasattr(signal, 'sigwait'),
'need signal.sigwait()')
@unittest.skipUnless(hasattr(signal, 'pthread_sigmask'),
@@ -842,8 +1006,14 @@ class PendingSignalsTests(unittest.TestCase):
def kill(signum):
os.kill(os.getpid(), signum)
+ def check_mask(mask):
+ for sig in mask:
+ assert isinstance(sig, signal.Signals), repr(sig)
+
def read_sigmask():
- return signal.pthread_sigmask(signal.SIG_BLOCK, [])
+ sigmask = signal.pthread_sigmask(signal.SIG_BLOCK, [])
+ check_mask(sigmask)
+ return sigmask
signum = signal.SIGUSR1
@@ -852,6 +1022,7 @@ class PendingSignalsTests(unittest.TestCase):
# Unblock SIGUSR1 (and copy the old mask) to test our signal handler
old_mask = signal.pthread_sigmask(signal.SIG_UNBLOCK, [signum])
+ check_mask(old_mask)
try:
kill(signum)
except ZeroDivisionError:
@@ -861,11 +1032,13 @@ class PendingSignalsTests(unittest.TestCase):
# Block and then raise SIGUSR1. The signal is blocked: the signal
# handler is not called, and the signal is now pending
- signal.pthread_sigmask(signal.SIG_BLOCK, [signum])
+ mask = signal.pthread_sigmask(signal.SIG_BLOCK, [signum])
+ check_mask(mask)
kill(signum)
# Check the new mask
blocked = read_sigmask()
+ check_mask(blocked)
if signum not in blocked:
raise Exception("%s not in %s" % (signum, blocked))
if old_mask ^ blocked != {signum}:
@@ -926,15 +1099,8 @@ class PendingSignalsTests(unittest.TestCase):
(exitcode, stdout))
-def test_main():
- try:
- support.run_unittest(PosixTests, InterProcessSignalTests,
- WakeupFDTests, WakeupSignalTests,
- SiginterruptTest, ItimerTest, WindowsSignalTests,
- PendingSignalsTests)
- finally:
- support.reap_children()
-
+def tearDownModule():
+ support.reap_children()
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py
index f71cf73330..da20a3d21a 100644
--- a/Lib/test/test_site.py
+++ b/Lib/test/test_site.py
@@ -28,8 +28,13 @@ import site
if site.ENABLE_USER_SITE and not os.path.isdir(site.USER_SITE):
# need to add user site directory for tests
- os.makedirs(site.USER_SITE)
- site.addsitedir(site.USER_SITE)
+ try:
+ os.makedirs(site.USER_SITE)
+ site.addsitedir(site.USER_SITE)
+ except PermissionError as exc:
+ raise unittest.SkipTest('unable to create user site directory (%r): %s'
+ % (site.USER_SITE, exc))
+
class HelperFunctionsTests(unittest.TestCase):
"""Tests for helper functions.
@@ -147,7 +152,7 @@ class HelperFunctionsTests(unittest.TestCase):
re.escape(os.path.join(pth_dir, pth_fn)))
# XXX: ditto previous XXX comment.
self.assertRegex(err_out.getvalue(), 'Traceback')
- self.assertRegex(err_out.getvalue(), 'TypeError')
+ self.assertRegex(err_out.getvalue(), 'ValueError')
def test_addsitedir(self):
# Same tests for test_addpackage since addsitedir() essentially just
@@ -235,20 +240,18 @@ class HelperFunctionsTests(unittest.TestCase):
# OS X framework builds
site.PREFIXES = ['Python.framework']
dirs = site.getsitepackages()
- self.assertEqual(len(dirs), 3)
+ self.assertEqual(len(dirs), 2)
wanted = os.path.join('/Library',
sysconfig.get_config_var("PYTHONFRAMEWORK"),
sys.version[:3],
'site-packages')
- self.assertEqual(dirs[2], wanted)
+ self.assertEqual(dirs[1], wanted)
elif os.sep == '/':
# OS X non-framwework builds, Linux, FreeBSD, etc
- self.assertEqual(len(dirs), 2)
+ self.assertEqual(len(dirs), 1)
wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
'site-packages')
self.assertEqual(dirs[0], wanted)
- wanted = os.path.join('xoxo', 'lib', 'site-python')
- self.assertEqual(dirs[1], wanted)
else:
# other platforms
self.assertEqual(len(dirs), 2)
@@ -357,8 +360,12 @@ class ImportSideEffectTests(unittest.TestCase):
stdout, stderr = proc.communicate()
self.assertEqual(proc.returncode, 0)
os__file__, os__cached__ = stdout.splitlines()[:2]
- self.assertTrue(os.path.isabs(os__file__))
- self.assertTrue(os.path.isabs(os__cached__))
+ self.assertTrue(os.path.isabs(os__file__),
+ "expected absolute path, got {}"
+ .format(os__file__.decode('ascii')))
+ self.assertTrue(os.path.isabs(os__cached__),
+ "expected absolute path, got {}"
+ .format(os__cached__.decode('ascii')))
def test_no_duplicate_paths(self):
# No duplicate paths should exist in sys.path
diff --git a/Lib/test/test_slice.py b/Lib/test/test_slice.py
index 1ed71f9575..4ae4142c60 100644
--- a/Lib/test/test_slice.py
+++ b/Lib/test/test_slice.py
@@ -1,12 +1,13 @@
# tests for slice objects; in particular the indices method.
-import unittest
-from test import support
-from pickle import loads, dumps
-
import itertools
import operator
import sys
+import unittest
+import weakref
+
+from pickle import loads, dumps
+from test import support
def evaluate_slice_index(arg):
@@ -241,8 +242,14 @@ class SliceTest(unittest.TestCase):
self.assertEqual(s.indices(15), t.indices(15))
self.assertNotEqual(id(s), id(t))
-def test_main():
- support.run_unittest(SliceTest)
+ def test_cycle(self):
+ class myobj(): pass
+ o = myobj()
+ o.s = slice(o)
+ w = weakref.ref(o)
+ o = None
+ support.gc_collect()
+ self.assertIsNone(w())
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_smtpd.py b/Lib/test/test_smtpd.py
index 93f14c4562..88dbfdf6f0 100644
--- a/Lib/test/test_smtpd.py
+++ b/Lib/test/test_smtpd.py
@@ -1,4 +1,5 @@
import unittest
+import textwrap
from test import support, mock_socket
import socket
import io
@@ -7,14 +8,20 @@ import asyncore
class DummyServer(smtpd.SMTPServer):
- def __init__(self, localaddr, remoteaddr):
- smtpd.SMTPServer.__init__(self, localaddr, remoteaddr)
+ def __init__(self, *args, **kwargs):
+ smtpd.SMTPServer.__init__(self, *args, **kwargs)
self.messages = []
+ if self._decode_data:
+ self.return_status = 'return status'
+ else:
+ self.return_status = b'return status'
- def process_message(self, peer, mailfrom, rcpttos, data):
+ def process_message(self, peer, mailfrom, rcpttos, data, **kw):
self.messages.append((peer, mailfrom, rcpttos, data))
- if data == 'return status':
+ if data == self.return_status:
return '250 Okish'
+ if 'mail_options' in kw and 'SMTPUTF8' in kw['mail_options']:
+ return '250 SMTPUTF8 message okish'
class DummyDispatcherBroken(Exception):
@@ -31,9 +38,10 @@ class SMTPDServerTest(unittest.TestCase):
smtpd.socket = asyncore.socket = mock_socket
def test_process_message_unimplemented(self):
- server = smtpd.SMTPServer('a', 'b')
+ server = smtpd.SMTPServer((support.HOST, 0), ('b', 0),
+ decode_data=True)
conn, addr = server.accept()
- channel = smtpd.SMTPChannel(server, conn, addr)
+ channel = smtpd.SMTPChannel(server, conn, addr, decode_data=True)
def write_line(line):
channel.socket.queue_recv(line)
@@ -45,19 +53,251 @@ class SMTPDServerTest(unittest.TestCase):
write_line(b'DATA')
self.assertRaises(NotImplementedError, write_line, b'spam\r\n.\r\n')
+ def test_decode_data_default_warns(self):
+ with self.assertWarns(DeprecationWarning):
+ smtpd.SMTPServer((support.HOST, 0), ('b', 0))
+
+ def test_decode_data_and_enable_SMTPUTF8_raises(self):
+ self.assertRaises(
+ ValueError,
+ smtpd.SMTPServer,
+ (support.HOST, 0),
+ ('b', 0),
+ enable_SMTPUTF8=True,
+ decode_data=True)
+
+ def tearDown(self):
+ asyncore.close_all()
+ asyncore.socket = smtpd.socket = socket
+
+
+class DebuggingServerTest(unittest.TestCase):
+
+ def setUp(self):
+ smtpd.socket = asyncore.socket = mock_socket
+
+ def send_data(self, channel, data, enable_SMTPUTF8=False):
+ def write_line(line):
+ channel.socket.queue_recv(line)
+ channel.handle_read()
+ write_line(b'EHLO example')
+ if enable_SMTPUTF8:
+ write_line(b'MAIL From:eggs@example BODY=8BITMIME SMTPUTF8')
+ else:
+ write_line(b'MAIL From:eggs@example')
+ write_line(b'RCPT To:spam@example')
+ write_line(b'DATA')
+ write_line(data)
+ write_line(b'.')
+
+ def test_process_message_with_decode_data_true(self):
+ server = smtpd.DebuggingServer((support.HOST, 0), ('b', 0),
+ decode_data=True)
+ conn, addr = server.accept()
+ channel = smtpd.SMTPChannel(server, conn, addr, decode_data=True)
+ with support.captured_stdout() as s:
+ self.send_data(channel, b'From: test\n\nhello\n')
+ stdout = s.getvalue()
+ self.assertEqual(stdout, textwrap.dedent("""\
+ ---------- MESSAGE FOLLOWS ----------
+ From: test
+ X-Peer: peer-address
+
+ hello
+ ------------ END MESSAGE ------------
+ """))
+
+ def test_process_message_with_decode_data_false(self):
+ server = smtpd.DebuggingServer((support.HOST, 0), ('b', 0),
+ decode_data=False)
+ conn, addr = server.accept()
+ channel = smtpd.SMTPChannel(server, conn, addr, decode_data=False)
+ with support.captured_stdout() as s:
+ self.send_data(channel, b'From: test\n\nh\xc3\xa9llo\xff\n')
+ stdout = s.getvalue()
+ self.assertEqual(stdout, textwrap.dedent("""\
+ ---------- MESSAGE FOLLOWS ----------
+ b'From: test'
+ b'X-Peer: peer-address'
+ b''
+ b'h\\xc3\\xa9llo\\xff'
+ ------------ END MESSAGE ------------
+ """))
+
+ def test_process_message_with_enable_SMTPUTF8_true(self):
+ server = smtpd.DebuggingServer((support.HOST, 0), ('b', 0),
+ enable_SMTPUTF8=True)
+ conn, addr = server.accept()
+ channel = smtpd.SMTPChannel(server, conn, addr, enable_SMTPUTF8=True)
+ with support.captured_stdout() as s:
+ self.send_data(channel, b'From: test\n\nh\xc3\xa9llo\xff\n')
+ stdout = s.getvalue()
+ self.assertEqual(stdout, textwrap.dedent("""\
+ ---------- MESSAGE FOLLOWS ----------
+ b'From: test'
+ b'X-Peer: peer-address'
+ b''
+ b'h\\xc3\\xa9llo\\xff'
+ ------------ END MESSAGE ------------
+ """))
+
+ def test_process_SMTPUTF8_message_with_enable_SMTPUTF8_true(self):
+ server = smtpd.DebuggingServer((support.HOST, 0), ('b', 0),
+ enable_SMTPUTF8=True)
+ conn, addr = server.accept()
+ channel = smtpd.SMTPChannel(server, conn, addr, enable_SMTPUTF8=True)
+ with support.captured_stdout() as s:
+ self.send_data(channel, b'From: test\n\nh\xc3\xa9llo\xff\n',
+ enable_SMTPUTF8=True)
+ stdout = s.getvalue()
+ self.assertEqual(stdout, textwrap.dedent("""\
+ ---------- MESSAGE FOLLOWS ----------
+ mail options: ['BODY=8BITMIME', 'SMTPUTF8']
+ b'From: test'
+ b'X-Peer: peer-address'
+ b''
+ b'h\\xc3\\xa9llo\\xff'
+ ------------ END MESSAGE ------------
+ """))
+
+ def tearDown(self):
+ asyncore.close_all()
+ asyncore.socket = smtpd.socket = socket
+
+
+class TestFamilyDetection(unittest.TestCase):
+ def setUp(self):
+ smtpd.socket = asyncore.socket = mock_socket
+
def tearDown(self):
asyncore.close_all()
asyncore.socket = smtpd.socket = socket
+ @unittest.skipUnless(support.IPV6_ENABLED, "IPv6 not enabled")
+ def test_socket_uses_IPv6(self):
+ server = smtpd.SMTPServer((support.HOSTv6, 0), (support.HOST, 0),
+ decode_data=False)
+ self.assertEqual(server.socket.family, socket.AF_INET6)
+
+ def test_socket_uses_IPv4(self):
+ server = smtpd.SMTPServer((support.HOST, 0), (support.HOSTv6, 0),
+ decode_data=False)
+ self.assertEqual(server.socket.family, socket.AF_INET)
+
+
+class TestRcptOptionParsing(unittest.TestCase):
+ error_response = (b'555 RCPT TO parameters not recognized or not '
+ b'implemented\r\n')
+
+ def setUp(self):
+ smtpd.socket = asyncore.socket = mock_socket
+ self.old_debugstream = smtpd.DEBUGSTREAM
+ self.debug = smtpd.DEBUGSTREAM = io.StringIO()
+
+ def tearDown(self):
+ asyncore.close_all()
+ asyncore.socket = smtpd.socket = socket
+ smtpd.DEBUGSTREAM = self.old_debugstream
+
+ def write_line(self, channel, line):
+ channel.socket.queue_recv(line)
+ channel.handle_read()
+
+ def test_params_rejected(self):
+ server = DummyServer((support.HOST, 0), ('b', 0), decode_data=False)
+ conn, addr = server.accept()
+ channel = smtpd.SMTPChannel(server, conn, addr, decode_data=False)
+ self.write_line(channel, b'EHLO example')
+ self.write_line(channel, b'MAIL from: <foo@example.com> size=20')
+ self.write_line(channel, b'RCPT to: <foo@example.com> foo=bar')
+ self.assertEqual(channel.socket.last, self.error_response)
+
+ def test_nothing_accepted(self):
+ server = DummyServer((support.HOST, 0), ('b', 0), decode_data=False)
+ conn, addr = server.accept()
+ channel = smtpd.SMTPChannel(server, conn, addr, decode_data=False)
+ self.write_line(channel, b'EHLO example')
+ self.write_line(channel, b'MAIL from: <foo@example.com> size=20')
+ self.write_line(channel, b'RCPT to: <foo@example.com>')
+ self.assertEqual(channel.socket.last, b'250 OK\r\n')
+
+
+class TestMailOptionParsing(unittest.TestCase):
+ error_response = (b'555 MAIL FROM parameters not recognized or not '
+ b'implemented\r\n')
+
+ def setUp(self):
+ smtpd.socket = asyncore.socket = mock_socket
+ self.old_debugstream = smtpd.DEBUGSTREAM
+ self.debug = smtpd.DEBUGSTREAM = io.StringIO()
+
+ def tearDown(self):
+ asyncore.close_all()
+ asyncore.socket = smtpd.socket = socket
+ smtpd.DEBUGSTREAM = self.old_debugstream
+
+ def write_line(self, channel, line):
+ channel.socket.queue_recv(line)
+ channel.handle_read()
+
+ def test_with_decode_data_true(self):
+ server = DummyServer((support.HOST, 0), ('b', 0), decode_data=True)
+ conn, addr = server.accept()
+ channel = smtpd.SMTPChannel(server, conn, addr, decode_data=True)
+ self.write_line(channel, b'EHLO example')
+ for line in [
+ b'MAIL from: <foo@example.com> size=20 SMTPUTF8',
+ b'MAIL from: <foo@example.com> size=20 SMTPUTF8 BODY=8BITMIME',
+ b'MAIL from: <foo@example.com> size=20 BODY=UNKNOWN',
+ b'MAIL from: <foo@example.com> size=20 body=8bitmime',
+ ]:
+ self.write_line(channel, line)
+ self.assertEqual(channel.socket.last, self.error_response)
+ self.write_line(channel, b'MAIL from: <foo@example.com> size=20')
+ self.assertEqual(channel.socket.last, b'250 OK\r\n')
+
+ def test_with_decode_data_false(self):
+ server = DummyServer((support.HOST, 0), ('b', 0), decode_data=False)
+ conn, addr = server.accept()
+ channel = smtpd.SMTPChannel(server, conn, addr, decode_data=False)
+ self.write_line(channel, b'EHLO example')
+ for line in [
+ b'MAIL from: <foo@example.com> size=20 SMTPUTF8',
+ b'MAIL from: <foo@example.com> size=20 SMTPUTF8 BODY=8BITMIME',
+ ]:
+ self.write_line(channel, line)
+ self.assertEqual(channel.socket.last, self.error_response)
+ self.write_line(
+ channel,
+ b'MAIL from: <foo@example.com> size=20 SMTPUTF8 BODY=UNKNOWN')
+ self.assertEqual(
+ channel.socket.last,
+ b'501 Error: BODY can only be one of 7BIT, 8BITMIME\r\n')
+ self.write_line(
+ channel, b'MAIL from: <foo@example.com> size=20 body=8bitmime')
+ self.assertEqual(channel.socket.last, b'250 OK\r\n')
+
+ def test_with_enable_smtputf8_true(self):
+ server = DummyServer((support.HOST, 0), ('b', 0), enable_SMTPUTF8=True)
+ conn, addr = server.accept()
+ channel = smtpd.SMTPChannel(server, conn, addr, enable_SMTPUTF8=True)
+ self.write_line(channel, b'EHLO example')
+ self.write_line(
+ channel,
+ b'MAIL from: <foo@example.com> size=20 body=8bitmime smtputf8')
+ self.assertEqual(channel.socket.last, b'250 OK\r\n')
+
class SMTPDChannelTest(unittest.TestCase):
def setUp(self):
smtpd.socket = asyncore.socket = mock_socket
self.old_debugstream = smtpd.DEBUGSTREAM
self.debug = smtpd.DEBUGSTREAM = io.StringIO()
- self.server = DummyServer('a', 'b')
+ self.server = DummyServer((support.HOST, 0), ('b', 0),
+ decode_data=True)
conn, addr = self.server.accept()
- self.channel = smtpd.SMTPChannel(self.server, conn, addr)
+ self.channel = smtpd.SMTPChannel(self.server, conn, addr,
+ decode_data=True)
def tearDown(self):
asyncore.close_all()
@@ -69,7 +309,15 @@ class SMTPDChannelTest(unittest.TestCase):
self.channel.handle_read()
def test_broken_connect(self):
- self.assertRaises(DummyDispatcherBroken, BrokenDummyServer, 'a', 'b')
+ self.assertRaises(
+ DummyDispatcherBroken, BrokenDummyServer,
+ (support.HOST, 0), ('b', 0), decode_data=True)
+
+ def test_decode_data_and_enable_SMTPUTF8_raises(self):
+ self.assertRaises(
+ ValueError, smtpd.SMTPChannel,
+ self.server, self.channel.conn, self.channel.addr,
+ enable_SMTPUTF8=True, decode_data=True)
def test_server_accept(self):
self.server.handle_accept()
@@ -214,6 +462,12 @@ class SMTPDChannelTest(unittest.TestCase):
self.assertEqual(self.channel.socket.last,
b'500 Error: line too long\r\n')
+ def test_MAIL_command_rejects_SMTPUTF8_by_default(self):
+ self.write_line(b'EHLO example')
+ self.write_line(
+ b'MAIL from: <naive@example.com> BODY=8BITMIME SMTPUTF8')
+ self.assertEqual(self.channel.socket.last[0:1], b'5')
+
def test_data_longer_than_default_data_size_limit(self):
# Hack the default so we don't have to generate so much data.
self.channel.data_size_limit = 1048
@@ -387,7 +641,10 @@ class SMTPDChannelTest(unittest.TestCase):
self.write_line(b'data\r\nmore\r\n.')
self.assertEqual(self.channel.socket.last, b'250 OK\r\n')
self.assertEqual(self.server.messages,
- [('peer', 'eggs@example', ['spam@example'], 'data\nmore')])
+ [(('peer-address', 'peer-port'),
+ 'eggs@example',
+ ['spam@example'],
+ 'data\nmore')])
def test_DATA_syntax(self):
self.write_line(b'HELO example')
@@ -417,7 +674,10 @@ class SMTPDChannelTest(unittest.TestCase):
self.write_line(b'DATA')
self.write_line(b'data\r\n.')
self.assertEqual(self.server.messages,
- [('peer', 'eggs@example', ['spam@example','ham@example'], 'data')])
+ [(('peer-address', 'peer-port'),
+ 'eggs@example',
+ ['spam@example','ham@example'],
+ 'data')])
def test_manual_status(self):
# checks that the Channel is able to return a custom status message
@@ -439,7 +699,10 @@ class SMTPDChannelTest(unittest.TestCase):
self.write_line(b'DATA')
self.write_line(b'data\r\n.')
self.assertEqual(self.server.messages,
- [('peer', 'foo@example', ['eggs@example'], 'data')])
+ [(('peer-address', 'peer-port'),
+ 'foo@example',
+ ['eggs@example'],
+ 'data')])
def test_HELO_RSET(self):
self.write_line(b'HELO example')
@@ -502,6 +765,24 @@ class SMTPDChannelTest(unittest.TestCase):
with support.check_warnings(('', DeprecationWarning)):
self.channel._SMTPChannel__addr = 'spam'
+ def test_decode_data_default_warning(self):
+ with self.assertWarns(DeprecationWarning):
+ server = DummyServer((support.HOST, 0), ('b', 0))
+ conn, addr = self.server.accept()
+ with self.assertWarns(DeprecationWarning):
+ smtpd.SMTPChannel(server, conn, addr)
+
+@unittest.skipUnless(support.IPV6_ENABLED, "IPv6 not enabled")
+class SMTPDChannelIPv6Test(SMTPDChannelTest):
+ def setUp(self):
+ smtpd.socket = asyncore.socket = mock_socket
+ self.old_debugstream = smtpd.DEBUGSTREAM
+ self.debug = smtpd.DEBUGSTREAM = io.StringIO()
+ self.server = DummyServer((support.HOSTv6, 0), ('b', 0),
+ decode_data=True)
+ conn, addr = self.server.accept()
+ self.channel = smtpd.SMTPChannel(self.server, conn, addr,
+ decode_data=True)
class SMTPDChannelWithDataSizeLimitTest(unittest.TestCase):
@@ -509,10 +790,12 @@ class SMTPDChannelWithDataSizeLimitTest(unittest.TestCase):
smtpd.socket = asyncore.socket = mock_socket
self.old_debugstream = smtpd.DEBUGSTREAM
self.debug = smtpd.DEBUGSTREAM = io.StringIO()
- self.server = DummyServer('a', 'b')
+ self.server = DummyServer((support.HOST, 0), ('b', 0),
+ decode_data=True)
conn, addr = self.server.accept()
# Set DATA size limit to 32 bytes for easy testing
- self.channel = smtpd.SMTPChannel(self.server, conn, addr, 32)
+ self.channel = smtpd.SMTPChannel(self.server, conn, addr, 32,
+ decode_data=True)
def tearDown(self):
asyncore.close_all()
@@ -536,7 +819,10 @@ class SMTPDChannelWithDataSizeLimitTest(unittest.TestCase):
self.write_line(b'data\r\nmore\r\n.')
self.assertEqual(self.channel.socket.last, b'250 OK\r\n')
self.assertEqual(self.server.messages,
- [('peer', 'eggs@example', ['spam@example'], 'data\nmore')])
+ [(('peer-address', 'peer-port'),
+ 'eggs@example',
+ ['spam@example'],
+ 'data\nmore')])
def test_data_limit_dialog_too_much_data(self):
self.write_line(b'HELO example')
@@ -553,5 +839,181 @@ class SMTPDChannelWithDataSizeLimitTest(unittest.TestCase):
b'552 Error: Too much mail data\r\n')
+class SMTPDChannelWithDecodeDataFalse(unittest.TestCase):
+
+ def setUp(self):
+ smtpd.socket = asyncore.socket = mock_socket
+ self.old_debugstream = smtpd.DEBUGSTREAM
+ self.debug = smtpd.DEBUGSTREAM = io.StringIO()
+ self.server = DummyServer((support.HOST, 0), ('b', 0),
+ decode_data=False)
+ conn, addr = self.server.accept()
+ # Set decode_data to False
+ self.channel = smtpd.SMTPChannel(self.server, conn, addr,
+ decode_data=False)
+
+ def tearDown(self):
+ asyncore.close_all()
+ asyncore.socket = smtpd.socket = socket
+ smtpd.DEBUGSTREAM = self.old_debugstream
+
+ def write_line(self, line):
+ self.channel.socket.queue_recv(line)
+ self.channel.handle_read()
+
+ def test_ascii_data(self):
+ self.write_line(b'HELO example')
+ self.write_line(b'MAIL From:eggs@example')
+ self.write_line(b'RCPT To:spam@example')
+ self.write_line(b'DATA')
+ self.write_line(b'plain ascii text')
+ self.write_line(b'.')
+ self.assertEqual(self.channel.received_data, b'plain ascii text')
+
+ def test_utf8_data(self):
+ self.write_line(b'HELO example')
+ self.write_line(b'MAIL From:eggs@example')
+ self.write_line(b'RCPT To:spam@example')
+ self.write_line(b'DATA')
+ self.write_line(b'utf8 enriched text: \xc5\xbc\xc5\xba\xc4\x87')
+ self.write_line(b'and some plain ascii')
+ self.write_line(b'.')
+ self.assertEqual(
+ self.channel.received_data,
+ b'utf8 enriched text: \xc5\xbc\xc5\xba\xc4\x87\n'
+ b'and some plain ascii')
+
+
+class SMTPDChannelWithDecodeDataTrue(unittest.TestCase):
+
+ def setUp(self):
+ smtpd.socket = asyncore.socket = mock_socket
+ self.old_debugstream = smtpd.DEBUGSTREAM
+ self.debug = smtpd.DEBUGSTREAM = io.StringIO()
+ self.server = DummyServer((support.HOST, 0), ('b', 0),
+ decode_data=True)
+ conn, addr = self.server.accept()
+ # Set decode_data to True
+ self.channel = smtpd.SMTPChannel(self.server, conn, addr,
+ decode_data=True)
+
+ def tearDown(self):
+ asyncore.close_all()
+ asyncore.socket = smtpd.socket = socket
+ smtpd.DEBUGSTREAM = self.old_debugstream
+
+ def write_line(self, line):
+ self.channel.socket.queue_recv(line)
+ self.channel.handle_read()
+
+ def test_ascii_data(self):
+ self.write_line(b'HELO example')
+ self.write_line(b'MAIL From:eggs@example')
+ self.write_line(b'RCPT To:spam@example')
+ self.write_line(b'DATA')
+ self.write_line(b'plain ascii text')
+ self.write_line(b'.')
+ self.assertEqual(self.channel.received_data, 'plain ascii text')
+
+ def test_utf8_data(self):
+ self.write_line(b'HELO example')
+ self.write_line(b'MAIL From:eggs@example')
+ self.write_line(b'RCPT To:spam@example')
+ self.write_line(b'DATA')
+ self.write_line(b'utf8 enriched text: \xc5\xbc\xc5\xba\xc4\x87')
+ self.write_line(b'and some plain ascii')
+ self.write_line(b'.')
+ self.assertEqual(
+ self.channel.received_data,
+ 'utf8 enriched text: żźć\nand some plain ascii')
+
+
+class SMTPDChannelTestWithEnableSMTPUTF8True(unittest.TestCase):
+ def setUp(self):
+ smtpd.socket = asyncore.socket = mock_socket
+ self.old_debugstream = smtpd.DEBUGSTREAM
+ self.debug = smtpd.DEBUGSTREAM = io.StringIO()
+ self.server = DummyServer((support.HOST, 0), ('b', 0),
+ enable_SMTPUTF8=True)
+ conn, addr = self.server.accept()
+ self.channel = smtpd.SMTPChannel(self.server, conn, addr,
+ enable_SMTPUTF8=True)
+
+ def tearDown(self):
+ asyncore.close_all()
+ asyncore.socket = smtpd.socket = socket
+ smtpd.DEBUGSTREAM = self.old_debugstream
+
+ def write_line(self, line):
+ self.channel.socket.queue_recv(line)
+ self.channel.handle_read()
+
+ def test_MAIL_command_accepts_SMTPUTF8_when_announced(self):
+ self.write_line(b'EHLO example')
+ self.write_line(
+ 'MAIL from: <naïve@example.com> BODY=8BITMIME SMTPUTF8'.encode(
+ 'utf-8')
+ )
+ self.assertEqual(self.channel.socket.last, b'250 OK\r\n')
+
+ def test_process_smtputf8_message(self):
+ self.write_line(b'EHLO example')
+ for mail_parameters in [b'', b'BODY=8BITMIME SMTPUTF8']:
+ self.write_line(b'MAIL from: <a@example> ' + mail_parameters)
+ self.assertEqual(self.channel.socket.last[0:3], b'250')
+ self.write_line(b'rcpt to:<b@example.com>')
+ self.assertEqual(self.channel.socket.last[0:3], b'250')
+ self.write_line(b'data')
+ self.assertEqual(self.channel.socket.last[0:3], b'354')
+ self.write_line(b'c\r\n.')
+ if mail_parameters == b'':
+ self.assertEqual(self.channel.socket.last, b'250 OK\r\n')
+ else:
+ self.assertEqual(self.channel.socket.last,
+ b'250 SMTPUTF8 message okish\r\n')
+
+ def test_utf8_data(self):
+ self.write_line(b'EHLO example')
+ self.write_line(
+ 'MAIL From: naïve@examplé BODY=8BITMIME SMTPUTF8'.encode('utf-8'))
+ self.assertEqual(self.channel.socket.last[0:3], b'250')
+ self.write_line('RCPT To:späm@examplé'.encode('utf-8'))
+ self.assertEqual(self.channel.socket.last[0:3], b'250')
+ self.write_line(b'DATA')
+ self.assertEqual(self.channel.socket.last[0:3], b'354')
+ self.write_line(b'utf8 enriched text: \xc5\xbc\xc5\xba\xc4\x87')
+ self.write_line(b'.')
+ self.assertEqual(
+ self.channel.received_data,
+ b'utf8 enriched text: \xc5\xbc\xc5\xba\xc4\x87')
+
+ def test_MAIL_command_limit_extended_with_SIZE_and_SMTPUTF8(self):
+ self.write_line(b'ehlo example')
+ fill_len = (512 + 26 + 10) - len('mail from:<@example>')
+ self.write_line(b'MAIL from:<' +
+ b'a' * (fill_len + 1) +
+ b'@example>')
+ self.assertEqual(self.channel.socket.last,
+ b'500 Error: line too long\r\n')
+ self.write_line(b'MAIL from:<' +
+ b'a' * fill_len +
+ b'@example>')
+ self.assertEqual(self.channel.socket.last, b'250 OK\r\n')
+
+ def test_multiple_emails_with_extended_command_length(self):
+ self.write_line(b'ehlo example')
+ fill_len = (512 + 26 + 10) - len('mail from:<@example>')
+ for char in [b'a', b'b', b'c']:
+ self.write_line(b'MAIL from:<' + char * fill_len + b'a@example>')
+ self.assertEqual(self.channel.socket.last[0:3], b'500')
+ self.write_line(b'MAIL from:<' + char * fill_len + b'@example>')
+ self.assertEqual(self.channel.socket.last[0:3], b'250')
+ self.write_line(b'rcpt to:<hans@example.com>')
+ self.assertEqual(self.channel.socket.last[0:3], b'250')
+ self.write_line(b'data')
+ self.assertEqual(self.channel.socket.last[0:3], b'354')
+ self.write_line(b'test\r\n.')
+ self.assertEqual(self.channel.socket.last[0:3], b'250')
+
if __name__ == "__main__":
unittest.main()
diff --git a/Lib/test/test_smtplib.py b/Lib/test/test_smtplib.py
index 95a9dbe912..28539f360f 100644
--- a/Lib/test/test_smtplib.py
+++ b/Lib/test/test_smtplib.py
@@ -1,6 +1,10 @@
import asyncore
+import base64
import email.mime.text
+from email.message import EmailMessage
+from email.base64mime import body_encode as encode_base64
import email.utils
+import hmac
import socket
import smtpd
import smtplib
@@ -10,6 +14,7 @@ import sys
import time
import select
import errno
+import textwrap
import unittest
from test import support, mock_socket
@@ -30,7 +35,7 @@ if sys.platform == 'darwin':
def server(evt, buf, serv):
- serv.listen(5)
+ serv.listen()
evt.set()
try:
conn, addr = serv.accept()
@@ -123,6 +128,27 @@ class GeneralTests(unittest.TestCase):
self.assertEqual(smtp.sock.gettimeout(), 30)
smtp.close()
+ def test_debuglevel(self):
+ mock_socket.reply_with(b"220 Hello world")
+ smtp = smtplib.SMTP()
+ smtp.set_debuglevel(1)
+ with support.captured_stderr() as stderr:
+ smtp.connect(HOST, self.port)
+ smtp.close()
+ expected = re.compile(r"^connect:", re.MULTILINE)
+ self.assertRegex(stderr.getvalue(), expected)
+
+ def test_debuglevel_2(self):
+ mock_socket.reply_with(b"220 Hello world")
+ smtp = smtplib.SMTP()
+ smtp.set_debuglevel(2)
+ with support.captured_stderr() as stderr:
+ smtp.connect(HOST, self.port)
+ smtp.close()
+ expected = re.compile(r"^\d{2}:\d{2}:\d{2}\.\d{6} connect: ",
+ re.MULTILINE)
+ self.assertRegex(stderr.getvalue(), expected)
+
# Test server thread using the specified SMTP server class
def debugging_server(serv, serv_evt, client_evt):
@@ -184,7 +210,8 @@ class DebuggingServerTests(unittest.TestCase):
self.old_DEBUGSTREAM = smtpd.DEBUGSTREAM
smtpd.DEBUGSTREAM = io.StringIO()
# Pick a random unused port by passing 0 for the port number
- self.serv = smtpd.DebuggingServer((HOST, 0), ('nowhere', -1))
+ self.serv = smtpd.DebuggingServer((HOST, 0), ('nowhere', -1),
+ decode_data=True)
# Keep a note of what port was assigned
self.port = self.serv.socket.getsockname()[1]
serv_args = (self.serv, self.serv_evt, self.client_evt)
@@ -598,19 +625,12 @@ sim_users = {'Mr.A@somewhere.com':'John A',
sim_auth = ('Mr.A@somewhere.com', 'somepassword')
sim_cram_md5_challenge = ('PENCeUxFREJoU0NnbmhNWitOMjNGNn'
'dAZWx3b29kLmlubm9zb2Z0LmNvbT4=')
-sim_auth_credentials = {
- 'login': 'TXIuQUBzb21ld2hlcmUuY29t',
- 'plain': 'AE1yLkFAc29tZXdoZXJlLmNvbQBzb21lcGFzc3dvcmQ=',
- 'cram-md5': ('TXIUQUBZB21LD2HLCMUUY29TIDG4OWQ0MJ'
- 'KWZGQ4ODNMNDA4NTGXMDRLZWMYZJDMODG1'),
- }
-sim_auth_login_password = 'C29TZXBHC3N3B3JK'
-
sim_lists = {'list-1':['Mr.A@somewhere.com','Mrs.C@somewhereesle.com'],
'list-2':['Ms.B@xn--fo-fka.com',],
}
# Simulated SMTP channel & server
+class ResponseException(Exception): pass
class SimSMTPChannel(smtpd.SMTPChannel):
quit_response = None
@@ -620,12 +640,109 @@ class SimSMTPChannel(smtpd.SMTPChannel):
rcpt_count = 0
rset_count = 0
disconnect = 0
+ AUTH = 99 # Add protocol state to enable auth testing.
+ authenticated_user = None
def __init__(self, extra_features, *args, **kw):
self._extrafeatures = ''.join(
[ "250-{0}\r\n".format(x) for x in extra_features ])
super(SimSMTPChannel, self).__init__(*args, **kw)
+ # AUTH related stuff. It would be nice if support for this were in smtpd.
+ def found_terminator(self):
+ if self.smtp_state == self.AUTH:
+ line = self._emptystring.join(self.received_lines)
+ print('Data:', repr(line), file=smtpd.DEBUGSTREAM)
+ self.received_lines = []
+ try:
+ self.auth_object(line)
+ except ResponseException as e:
+ self.smtp_state = self.COMMAND
+ self.push('%s %s' % (e.smtp_code, e.smtp_error))
+ return
+ super().found_terminator()
+
+
+ def smtp_AUTH(self, arg):
+ if not self.seen_greeting:
+ self.push('503 Error: send EHLO first')
+ return
+ if not self.extended_smtp or 'AUTH' not in self._extrafeatures:
+ self.push('500 Error: command "AUTH" not recognized')
+ return
+ if self.authenticated_user is not None:
+ self.push(
+ '503 Bad sequence of commands: already authenticated')
+ return
+ args = arg.split()
+ if len(args) not in [1, 2]:
+ self.push('501 Syntax: AUTH <mechanism> [initial-response]')
+ return
+ auth_object_name = '_auth_%s' % args[0].lower().replace('-', '_')
+ try:
+ self.auth_object = getattr(self, auth_object_name)
+ except AttributeError:
+ self.push('504 Command parameter not implemented: unsupported '
+ ' authentication mechanism {!r}'.format(auth_object_name))
+ return
+ self.smtp_state = self.AUTH
+ self.auth_object(args[1] if len(args) == 2 else None)
+
+ def _authenticated(self, user, valid):
+ if valid:
+ self.authenticated_user = user
+ self.push('235 Authentication Succeeded')
+ else:
+ self.push('535 Authentication credentials invalid')
+ self.smtp_state = self.COMMAND
+
+ def _decode_base64(self, string):
+ return base64.decodebytes(string.encode('ascii')).decode('utf-8')
+
+ def _auth_plain(self, arg=None):
+ if arg is None:
+ self.push('334 ')
+ else:
+ logpass = self._decode_base64(arg)
+ try:
+ *_, user, password = logpass.split('\0')
+ except ValueError as e:
+ self.push('535 Splitting response {!r} into user and password'
+ ' failed: {}'.format(logpass, e))
+ return
+ self._authenticated(user, password == sim_auth[1])
+
+ def _auth_login(self, arg=None):
+ if arg is None:
+ # base64 encoded 'Username:'
+ self.push('334 VXNlcm5hbWU6')
+ elif not hasattr(self, '_auth_login_user'):
+ self._auth_login_user = self._decode_base64(arg)
+ # base64 encoded 'Password:'
+ self.push('334 UGFzc3dvcmQ6')
+ else:
+ password = self._decode_base64(arg)
+ self._authenticated(self._auth_login_user, password == sim_auth[1])
+ del self._auth_login_user
+
+ def _auth_cram_md5(self, arg=None):
+ if arg is None:
+ self.push('334 {}'.format(sim_cram_md5_challenge))
+ else:
+ logpass = self._decode_base64(arg)
+ try:
+ user, hashed_pass = logpass.split()
+ except ValueError as e:
+ self.push('535 Splitting response {!r} into user and password'
+ 'failed: {}'.format(logpass, e))
+ return False
+ valid_hashed_pass = hmac.HMAC(
+ sim_auth[1].encode('ascii'),
+ self._decode_base64(sim_cram_md5_challenge).encode('ascii'),
+ 'md5').hexdigest()
+ self._authenticated(user, hashed_pass == valid_hashed_pass)
+ # end AUTH related stuff.
+
def smtp_EHLO(self, arg):
resp = ('250-testhost\r\n'
'250-EXPN\r\n'
@@ -657,22 +774,6 @@ class SimSMTPChannel(smtpd.SMTPChannel):
else:
self.push('550 No access for you!')
- def smtp_AUTH(self, arg):
- if arg.strip().lower()=='cram-md5':
- self.push('334 {}'.format(sim_cram_md5_challenge))
- return
- mech, auth = arg.split()
- mech = mech.lower()
- if mech not in sim_auth_credentials:
- self.push('504 auth type unimplemented')
- return
- if mech == 'plain' and auth==sim_auth_credentials['plain']:
- self.push('235 plain auth ok')
- elif mech=='login' and auth==sim_auth_credentials['login']:
- self.push('334 Password:')
- else:
- self.push('550 No access for you!')
-
def smtp_QUIT(self, arg):
if self.quit_response is None:
super(SimSMTPChannel, self).smtp_QUIT(arg)
@@ -719,7 +820,8 @@ class SimSMTPServer(smtpd.SMTPServer):
def handle_accepted(self, conn, addr):
self._SMTPchannel = self.channel_class(
- self._extra_features, self, conn, addr)
+ self._extra_features, self, conn, addr,
+ decode_data=self._decode_data)
def process_message(self, peer, mailfrom, rcpttos, data):
pass
@@ -742,7 +844,7 @@ class SMTPSimTests(unittest.TestCase):
self.serv_evt = threading.Event()
self.client_evt = threading.Event()
# Pick a random unused port by passing 0 for the port number
- self.serv = SimSMTPServer((HOST, 0), ('nowhere', -1))
+ self.serv = SimSMTPServer((HOST, 0), ('nowhere', -1), decode_data=True)
# Keep a note of what port was assigned
self.port = self.serv.socket.getsockname()[1]
serv_args = (self.serv, self.serv_evt, self.client_evt)
@@ -790,11 +892,11 @@ class SMTPSimTests(unittest.TestCase):
def testVRFY(self):
smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=15)
- for email, name in sim_users.items():
+ for addr_spec, name in sim_users.items():
expected_known = (250, bytes('%s %s' %
- (name, smtplib.quoteaddr(email)),
+ (name, smtplib.quoteaddr(addr_spec)),
"ascii"))
- self.assertEqual(smtp.vrfy(email), expected_known)
+ self.assertEqual(smtp.vrfy(addr_spec), expected_known)
u = 'nobody@nowhere.com'
expected_unknown = (550, ('No such user: %s' % u).encode('ascii'))
@@ -819,45 +921,47 @@ class SMTPSimTests(unittest.TestCase):
def testAUTH_PLAIN(self):
self.serv.add_feature("AUTH PLAIN")
smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=15)
-
- expected_auth_ok = (235, b'plain auth ok')
- self.assertEqual(smtp.login(sim_auth[0], sim_auth[1]), expected_auth_ok)
+ resp = smtp.login(sim_auth[0], sim_auth[1])
+ self.assertEqual(resp, (235, b'Authentication Succeeded'))
smtp.close()
- # SimSMTPChannel doesn't fully support LOGIN or CRAM-MD5 auth because they
- # require a synchronous read to obtain the credentials...so instead smtpd
- # sees the credential sent by smtplib's login method as an unknown command,
- # which results in smtplib raising an auth error. Fortunately the error
- # message contains the encoded credential, so we can partially check that it
- # was generated correctly (partially, because the 'word' is uppercased in
- # the error message).
-
def testAUTH_LOGIN(self):
self.serv.add_feature("AUTH LOGIN")
smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=15)
- try: smtp.login(sim_auth[0], sim_auth[1])
- except smtplib.SMTPAuthenticationError as err:
- self.assertIn(sim_auth_login_password, str(err))
+ resp = smtp.login(sim_auth[0], sim_auth[1])
+ self.assertEqual(resp, (235, b'Authentication Succeeded'))
smtp.close()
def testAUTH_CRAM_MD5(self):
self.serv.add_feature("AUTH CRAM-MD5")
smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=15)
-
- try: smtp.login(sim_auth[0], sim_auth[1])
- except smtplib.SMTPAuthenticationError as err:
- self.assertIn(sim_auth_credentials['cram-md5'], str(err))
+ resp = smtp.login(sim_auth[0], sim_auth[1])
+ self.assertEqual(resp, (235, b'Authentication Succeeded'))
smtp.close()
def testAUTH_multiple(self):
# Test that multiple authentication methods are tried.
self.serv.add_feature("AUTH BOGUS PLAIN LOGIN CRAM-MD5")
smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=15)
- try: smtp.login(sim_auth[0], sim_auth[1])
- except smtplib.SMTPAuthenticationError as err:
- self.assertIn(sim_auth_login_password, str(err))
+ resp = smtp.login(sim_auth[0], sim_auth[1])
+ self.assertEqual(resp, (235, b'Authentication Succeeded'))
smtp.close()
+ def test_auth_function(self):
+ supported = {'CRAM-MD5', 'PLAIN', 'LOGIN'}
+ for mechanism in supported:
+ self.serv.add_feature("AUTH {}".format(mechanism))
+ for mechanism in supported:
+ with self.subTest(mechanism=mechanism):
+ smtp = smtplib.SMTP(HOST, self.port,
+ local_hostname='localhost', timeout=15)
+ smtp.ehlo('foo')
+ smtp.user, smtp.password = sim_auth[0], sim_auth[1]
+ method = 'auth_' + mechanism.lower().replace('-', '_')
+ resp = smtp.auth(mechanism, getattr(smtp, method))
+ self.assertEqual(resp, (235, b'Authentication Succeeded'))
+ smtp.close()
+
def test_quit_resets_greeting(self):
smtp = smtplib.SMTP(HOST, self.port,
local_hostname='localhost',
@@ -938,13 +1042,249 @@ class SMTPSimTests(unittest.TestCase):
self.assertIsNone(smtp.sock)
self.assertEqual(self.serv._SMTPchannel.rcpt_count, 0)
+ def test_smtputf8_NotSupportedError_if_no_server_support(self):
+ smtp = smtplib.SMTP(
+ HOST, self.port, local_hostname='localhost', timeout=3)
+ self.addCleanup(smtp.close)
+ smtp.ehlo()
+ self.assertTrue(smtp.does_esmtp)
+ self.assertFalse(smtp.has_extn('smtputf8'))
+ self.assertRaises(
+ smtplib.SMTPNotSupportedError,
+ smtp.sendmail,
+ 'John', 'Sally', '', mail_options=['BODY=8BITMIME', 'SMTPUTF8'])
+ self.assertRaises(
+ smtplib.SMTPNotSupportedError,
+ smtp.mail, 'John', options=['BODY=8BITMIME', 'SMTPUTF8'])
+
+ def test_send_unicode_without_SMTPUTF8(self):
+ smtp = smtplib.SMTP(
+ HOST, self.port, local_hostname='localhost', timeout=3)
+ self.addCleanup(smtp.close)
+ self.assertRaises(UnicodeEncodeError, smtp.sendmail, 'Alice', 'Böb', '')
+ self.assertRaises(UnicodeEncodeError, smtp.mail, 'Älice')
+
+
+class SimSMTPUTF8Server(SimSMTPServer):
+
+ def __init__(self, *args, **kw):
+ # The base SMTP server turns these on automatically, but our test
+ # server is set up to munge the EHLO response, so we need to provide
+ # them as well. And yes, the call is to SMTPServer not SimSMTPServer.
+ self._extra_features = ['SMTPUTF8', '8BITMIME']
+ smtpd.SMTPServer.__init__(self, *args, **kw)
+
+ def handle_accepted(self, conn, addr):
+ self._SMTPchannel = self.channel_class(
+ self._extra_features, self, conn, addr,
+ decode_data=self._decode_data,
+ enable_SMTPUTF8=self.enable_SMTPUTF8,
+ )
+
+ def process_message(self, peer, mailfrom, rcpttos, data, mail_options=None,
+ rcpt_options=None):
+ self.last_peer = peer
+ self.last_mailfrom = mailfrom
+ self.last_rcpttos = rcpttos
+ self.last_message = data
+ self.last_mail_options = mail_options
+ self.last_rcpt_options = rcpt_options
+
+
+@unittest.skipUnless(threading, 'Threading required for this test.')
+class SMTPUTF8SimTests(unittest.TestCase):
+
+ maxDiff = None
+
+ def setUp(self):
+ self.real_getfqdn = socket.getfqdn
+ socket.getfqdn = mock_socket.getfqdn
+ self.serv_evt = threading.Event()
+ self.client_evt = threading.Event()
+ # Pick a random unused port by passing 0 for the port number
+ self.serv = SimSMTPUTF8Server((HOST, 0), ('nowhere', -1),
+ decode_data=False,
+ enable_SMTPUTF8=True)
+ # Keep a note of what port was assigned
+ self.port = self.serv.socket.getsockname()[1]
+ serv_args = (self.serv, self.serv_evt, self.client_evt)
+ self.thread = threading.Thread(target=debugging_server, args=serv_args)
+ self.thread.start()
+
+ # wait until server thread has assigned a port number
+ self.serv_evt.wait()
+ self.serv_evt.clear()
+
+ def tearDown(self):
+ socket.getfqdn = self.real_getfqdn
+ # indicate that the client is finished
+ self.client_evt.set()
+ # wait for the server thread to terminate
+ self.serv_evt.wait()
+ self.thread.join()
+
+ def test_test_server_supports_extensions(self):
+ smtp = smtplib.SMTP(
+ HOST, self.port, local_hostname='localhost', timeout=3)
+ self.addCleanup(smtp.close)
+ smtp.ehlo()
+ self.assertTrue(smtp.does_esmtp)
+ self.assertTrue(smtp.has_extn('smtputf8'))
+
+ def test_send_unicode_with_SMTPUTF8_via_sendmail(self):
+ m = '¡a test message containing unicode!'.encode('utf-8')
+ smtp = smtplib.SMTP(
+ HOST, self.port, local_hostname='localhost', timeout=3)
+ self.addCleanup(smtp.close)
+ smtp.sendmail('Jőhn', 'Sálly', m,
+ mail_options=['BODY=8BITMIME', 'SMTPUTF8'])
+ self.assertEqual(self.serv.last_mailfrom, 'JÅ‘hn')
+ self.assertEqual(self.serv.last_rcpttos, ['Sálly'])
+ self.assertEqual(self.serv.last_message, m)
+ self.assertIn('BODY=8BITMIME', self.serv.last_mail_options)
+ self.assertIn('SMTPUTF8', self.serv.last_mail_options)
+ self.assertEqual(self.serv.last_rcpt_options, [])
+
+ def test_send_unicode_with_SMTPUTF8_via_low_level_API(self):
+ m = '¡a test message containing unicode!'.encode('utf-8')
+ smtp = smtplib.SMTP(
+ HOST, self.port, local_hostname='localhost', timeout=3)
+ self.addCleanup(smtp.close)
+ smtp.ehlo()
+ self.assertEqual(
+ smtp.mail('JÅ‘', options=['BODY=8BITMIME', 'SMTPUTF8']),
+ (250, b'OK'))
+ self.assertEqual(smtp.rcpt('János'), (250, b'OK'))
+ self.assertEqual(smtp.data(m), (250, b'OK'))
+ self.assertEqual(self.serv.last_mailfrom, 'JÅ‘')
+ self.assertEqual(self.serv.last_rcpttos, ['János'])
+ self.assertEqual(self.serv.last_message, m)
+ self.assertIn('BODY=8BITMIME', self.serv.last_mail_options)
+ self.assertIn('SMTPUTF8', self.serv.last_mail_options)
+ self.assertEqual(self.serv.last_rcpt_options, [])
+
+ def test_send_message_uses_smtputf8_if_addrs_non_ascii(self):
+ msg = EmailMessage()
+ msg['From'] = "Páolo <főo@bar.com>"
+ msg['To'] = 'Dinsdale'
+ msg['Subject'] = 'Nudge nudge, wink, wink \u1F609'
+ # XXX I don't know why I need two \n's here, but this is an existing
+ # bug (if it is one) and not a problem with the new functionality.
+ msg.set_content("oh là là, know what I mean, know what I mean?\n\n")
+ # XXX smtpd converts received /r/n to /n, so we can't easily test that
+ # we are successfully sending /r/n :(.
+ expected = textwrap.dedent("""\
+ From: Páolo <főo@bar.com>
+ To: Dinsdale
+ Subject: Nudge nudge, wink, wink \u1F609
+ Content-Type: text/plain; charset="utf-8"
+ Content-Transfer-Encoding: 8bit
+ MIME-Version: 1.0
+
+ oh là là, know what I mean, know what I mean?
+ """)
+ smtp = smtplib.SMTP(
+ HOST, self.port, local_hostname='localhost', timeout=3)
+ self.addCleanup(smtp.close)
+ self.assertEqual(smtp.send_message(msg), {})
+ self.assertEqual(self.serv.last_mailfrom, 'főo@bar.com')
+ self.assertEqual(self.serv.last_rcpttos, ['Dinsdale'])
+ self.assertEqual(self.serv.last_message.decode(), expected)
+ self.assertIn('BODY=8BITMIME', self.serv.last_mail_options)
+ self.assertIn('SMTPUTF8', self.serv.last_mail_options)
+ self.assertEqual(self.serv.last_rcpt_options, [])
+
+ def test_send_message_error_on_non_ascii_addrs_if_no_smtputf8(self):
+ msg = EmailMessage()
+ msg['From'] = "Páolo <főo@bar.com>"
+ msg['To'] = 'Dinsdale'
+ msg['Subject'] = 'Nudge nudge, wink, wink \u1F609'
+ smtp = smtplib.SMTP(
+ HOST, self.port, local_hostname='localhost', timeout=3)
+ self.addCleanup(smtp.close)
+ self.assertRaises(smtplib.SMTPNotSupportedError,
+ smtp.send_message(msg))
+
+
+EXPECTED_RESPONSE = encode_base64(b'\0psu\0doesnotexist', eol='')
+
+class SimSMTPAUTHInitialResponseChannel(SimSMTPChannel):
+ def smtp_AUTH(self, arg):
+ # RFC 4954's AUTH command allows for an optional initial-response.
+ # Not all AUTH methods support this; some require a challenge. AUTH
+ # PLAIN does those, so test that here. See issue #15014.
+ args = arg.split()
+ if args[0].lower() == 'plain':
+ if len(args) == 2:
+ # AUTH PLAIN <initial-response> with the response base 64
+ # encoded. Hard code the expected response for the test.
+ if args[1] == EXPECTED_RESPONSE:
+ self.push('235 Ok')
+ return
+ self.push('571 Bad authentication')
+
+class SimSMTPAUTHInitialResponseServer(SimSMTPServer):
+ channel_class = SimSMTPAUTHInitialResponseChannel
+
+
+@unittest.skipUnless(threading, 'Threading required for this test.')
+class SMTPAUTHInitialResponseSimTests(unittest.TestCase):
+ def setUp(self):
+ self.real_getfqdn = socket.getfqdn
+ socket.getfqdn = mock_socket.getfqdn
+ self.serv_evt = threading.Event()
+ self.client_evt = threading.Event()
+ # Pick a random unused port by passing 0 for the port number
+ self.serv = SimSMTPAUTHInitialResponseServer(
+ (HOST, 0), ('nowhere', -1), decode_data=True)
+ # Keep a note of what port was assigned
+ self.port = self.serv.socket.getsockname()[1]
+ serv_args = (self.serv, self.serv_evt, self.client_evt)
+ self.thread = threading.Thread(target=debugging_server, args=serv_args)
+ self.thread.start()
+
+ # wait until server thread has assigned a port number
+ self.serv_evt.wait()
+ self.serv_evt.clear()
+
+ def tearDown(self):
+ socket.getfqdn = self.real_getfqdn
+ # indicate that the client is finished
+ self.client_evt.set()
+ # wait for the server thread to terminate
+ self.serv_evt.wait()
+ self.thread.join()
+
+ def testAUTH_PLAIN_initial_response_login(self):
+ self.serv.add_feature('AUTH PLAIN')
+ smtp = smtplib.SMTP(HOST, self.port,
+ local_hostname='localhost', timeout=15)
+ smtp.login('psu', 'doesnotexist')
+ smtp.close()
+
+ def testAUTH_PLAIN_initial_response_auth(self):
+ self.serv.add_feature('AUTH PLAIN')
+ smtp = smtplib.SMTP(HOST, self.port,
+ local_hostname='localhost', timeout=15)
+ smtp.user = 'psu'
+ smtp.password = 'doesnotexist'
+ code, response = smtp.auth('plain', smtp.auth_plain)
+ smtp.close()
+ self.assertEqual(code, 235)
+
@support.reap_threads
def test_main(verbose=None):
- support.run_unittest(GeneralTests, DebuggingServerTests,
- NonConnectingTests,
- BadHELOServerTests, SMTPSimTests,
- TooLongLineTests)
+ support.run_unittest(
+ BadHELOServerTests,
+ DebuggingServerTests,
+ GeneralTests,
+ NonConnectingTests,
+ SMTPAUTHInitialResponseSimTests,
+ SMTPSimTests,
+ TooLongLineTests,
+ )
+
if __name__ == '__main__':
test_main()
diff --git a/Lib/test/test_smtpnet.py b/Lib/test/test_smtpnet.py
index 15654f28df..cc9bab43f4 100644
--- a/Lib/test/test_smtpnet.py
+++ b/Lib/test/test_smtpnet.py
@@ -79,8 +79,5 @@ class SmtpSSLTest(unittest.TestCase):
server.quit()
-def test_main():
- support.run_unittest(SmtpTest, SmtpSSLTest)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_sndhdr.py b/Lib/test/test_sndhdr.py
index 5e0abe0b36..426417c038 100644
--- a/Lib/test/test_sndhdr.py
+++ b/Lib/test/test_sndhdr.py
@@ -1,4 +1,5 @@
import sndhdr
+import pickle
import unittest
from test.support import findfile
@@ -18,6 +19,19 @@ class TestFormats(unittest.TestCase):
what = sndhdr.what(filename)
self.assertNotEqual(what, None, filename)
self.assertSequenceEqual(what, expected)
+ self.assertEqual(what.filetype, expected[0])
+ self.assertEqual(what.framerate, expected[1])
+ self.assertEqual(what.nchannels, expected[2])
+ self.assertEqual(what.nframes, expected[3])
+ self.assertEqual(what.sampwidth, expected[4])
+
+ def test_pickleable(self):
+ filename = findfile('sndhdr.aifc', subdir="sndhdrdata")
+ what = sndhdr.what(filename)
+ for proto in range(pickle.HIGHEST_PROTOCOL + 1):
+ dump = pickle.dumps(what, proto)
+ self.assertEqual(pickle.loads(dump), what)
+
if __name__ == '__main__':
unittest.main()
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 140b4be285..c151a50dcb 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -20,6 +20,8 @@ import signal
import math
import pickle
import struct
+import random
+import string
try:
import multiprocessing
except ImportError:
@@ -76,7 +78,7 @@ class SocketTCPTest(unittest.TestCase):
def setUp(self):
self.serv = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.port = support.bind_port(self.serv)
- self.serv.listen(1)
+ self.serv.listen()
def tearDown(self):
self.serv.close()
@@ -197,7 +199,7 @@ class ThreadableTest:
clientTearDown ()
Any new test functions within the class must then define
- tests in pairs, where the test name is preceeded with a
+ tests in pairs, where the test name is preceded with a
'_' to indicate the client portion of the test. Ex:
def testFoo(self):
@@ -445,7 +447,7 @@ class SocketListeningTestMixin(SocketTestBase):
def setUp(self):
super().setUp()
- self.serv.listen(1)
+ self.serv.listen()
class ThreadedSocketTestMixin(ThreadSafeCleanupTestCase, SocketTestBase,
@@ -716,11 +718,11 @@ class GeneralModuleTests(unittest.TestCase):
with self.assertRaises(TypeError) as cm:
s.sendto('\u2620', sockname)
self.assertEqual(str(cm.exception),
- "'str' does not support the buffer interface")
+ "a bytes-like object is required, not 'str'")
with self.assertRaises(TypeError) as cm:
s.sendto(5j, sockname)
self.assertEqual(str(cm.exception),
- "'complex' does not support the buffer interface")
+ "a bytes-like object is required, not 'complex'")
with self.assertRaises(TypeError) as cm:
s.sendto(b'foo', None)
self.assertIn('not NoneType',str(cm.exception))
@@ -728,11 +730,11 @@ class GeneralModuleTests(unittest.TestCase):
with self.assertRaises(TypeError) as cm:
s.sendto('\u2620', 0, sockname)
self.assertEqual(str(cm.exception),
- "'str' does not support the buffer interface")
+ "a bytes-like object is required, not 'str'")
with self.assertRaises(TypeError) as cm:
s.sendto(5j, 0, sockname)
self.assertEqual(str(cm.exception),
- "'complex' does not support the buffer interface")
+ "a bytes-like object is required, not 'complex'")
with self.assertRaises(TypeError) as cm:
s.sendto(b'foo', 0, None)
self.assertIn('not NoneType', str(cm.exception))
@@ -1072,6 +1074,7 @@ class GeneralModuleTests(unittest.TestCase):
assertInvalid(f, b'\x00' * 3)
assertInvalid(f, b'\x00' * 5)
assertInvalid(f, b'\x00' * 16)
+ self.assertEqual('170.85.170.85', f(bytearray(b'\xaa\x55\xaa\x55')))
self.assertEqual('1.0.1.0', g(b'\x01\x00\x01\x00'))
self.assertEqual('170.85.170.85', g(b'\xaa\x55\xaa\x55'))
@@ -1079,6 +1082,7 @@ class GeneralModuleTests(unittest.TestCase):
assertInvalid(g, b'\x00' * 3)
assertInvalid(g, b'\x00' * 5)
assertInvalid(g, b'\x00' * 16)
+ self.assertEqual('170.85.170.85', g(bytearray(b'\xaa\x55\xaa\x55')))
@unittest.skipUnless(hasattr(socket, 'inet_ntop'),
'test needs socket.inet_ntop()')
@@ -1108,6 +1112,7 @@ class GeneralModuleTests(unittest.TestCase):
'aef:b01:506:1001:ffff:9997:55:170',
f(b'\x0a\xef\x0b\x01\x05\x06\x10\x01\xff\xff\x99\x97\x00\x55\x01\x70')
)
+ self.assertEqual('::1', f(bytearray(b'\x00' * 15 + b'\x01')))
assertInvalid(b'\x12' * 15)
assertInvalid(b'\x12' * 17)
@@ -1299,7 +1304,7 @@ class GeneralModuleTests(unittest.TestCase):
# socket.gethostbyaddr('иÑпытание.python.org')
def check_sendall_interrupted(self, with_timeout):
- # socketpair() is not stricly required, but it makes things easier.
+ # socketpair() is not strictly required, but it makes things easier.
if not hasattr(signal, 'alarm') or not hasattr(socket, 'socketpair'):
self.skipTest("signal.alarm and socket.socketpair required for this test")
# Our signal handlers clobber the C errno by calling a math function
@@ -1369,6 +1374,20 @@ class GeneralModuleTests(unittest.TestCase):
self.assertRaises(ValueError, fp.writable)
self.assertRaises(ValueError, fp.seekable)
+ def test_makefile_mode(self):
+ for mode in 'r', 'rb', 'rw', 'w', 'wb':
+ with self.subTest(mode=mode):
+ with socket.socket() as sock:
+ with sock.makefile(mode) as fp:
+ self.assertEqual(fp.mode, mode)
+
+ def test_makefile_invalid_mode(self):
+ for mode in 'rt', 'x', '+', 'a':
+ with self.subTest(mode=mode):
+ with socket.socket() as sock:
+ with self.assertRaisesRegex(ValueError, 'invalid mode'):
+ sock.makefile(mode)
+
def test_pickle(self):
sock = socket.socket()
with sock:
@@ -1382,10 +1401,13 @@ class GeneralModuleTests(unittest.TestCase):
def test_listen_backlog(self):
for backlog in 0, -1:
- srv = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as srv:
+ srv.bind((HOST, 0))
+ srv.listen(backlog)
+
+ with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as srv:
srv.bind((HOST, 0))
- srv.listen(backlog)
- srv.close()
+ srv.listen()
@support.cpython_only
def test_listen_backlog_overflow(self):
@@ -1491,6 +1513,7 @@ class BasicCANTest(unittest.TestCase):
s.setsockopt(socket.SOL_CAN_RAW, socket.CAN_RAW_FILTER, can_filter)
self.assertEqual(can_filter,
s.getsockopt(socket.SOL_CAN_RAW, socket.CAN_RAW_FILTER, 8))
+ s.setsockopt(socket.SOL_CAN_RAW, socket.CAN_RAW_FILTER, bytearray(can_filter))
@unittest.skipUnless(HAVE_SOCKET_CAN, 'SocketCan required for this test.')
@@ -3593,7 +3616,7 @@ class InterruptedTimeoutBase(unittest.TestCase):
def setUp(self):
super().setUp()
orig_alrm_handler = signal.signal(signal.SIGALRM,
- lambda signum, frame: None)
+ lambda signum, frame: 1 / 0)
self.addCleanup(signal.signal, signal.SIGALRM, orig_alrm_handler)
self.addCleanup(self.setAlarm, 0)
@@ -3630,13 +3653,11 @@ class InterruptedRecvTimeoutTest(InterruptedTimeoutBase, UDPTestBase):
self.serv.settimeout(self.timeout)
def checkInterruptedRecv(self, func, *args, **kwargs):
- # Check that func(*args, **kwargs) raises OSError with an
+ # Check that func(*args, **kwargs) raises
# errno of EINTR when interrupted by a signal.
self.setAlarm(self.alarm_time)
- with self.assertRaises(OSError) as cm:
+ with self.assertRaises(ZeroDivisionError) as cm:
func(*args, **kwargs)
- self.assertNotIsInstance(cm.exception, socket.timeout)
- self.assertEqual(cm.exception.errno, errno.EINTR)
def testInterruptedRecvTimeout(self):
self.checkInterruptedRecv(self.serv.recv, 1024)
@@ -3692,12 +3713,10 @@ class InterruptedSendTimeoutTest(InterruptedTimeoutBase,
# Check that func(*args, **kwargs), run in a loop, raises
# OSError with an errno of EINTR when interrupted by a
# signal.
- with self.assertRaises(OSError) as cm:
+ with self.assertRaises(ZeroDivisionError) as cm:
while True:
self.setAlarm(self.alarm_time)
func(*args, **kwargs)
- self.assertNotIsInstance(cm.exception, socket.timeout)
- self.assertEqual(cm.exception.errno, errno.EINTR)
# Issue #12958: The following tests have problems on OS X prior to 10.7
@support.requires_mac_ver(10, 7)
@@ -3739,8 +3758,6 @@ class TCPCloserTest(ThreadedTCPSocketTest):
self.cli.connect((HOST, self.port))
time.sleep(1.0)
-@unittest.skipUnless(hasattr(socket, 'socketpair'),
- 'test needs socket.socketpair()')
@unittest.skipUnless(thread, 'Threading required for this test.')
class BasicSocketPairTest(SocketPairTest):
@@ -3821,7 +3838,7 @@ class NonBlockingTCPTests(ThreadedTCPSocketTest):
self.serv = socket.socket(socket.AF_INET, socket.SOCK_STREAM |
socket.SOCK_NONBLOCK)
self.port = support.bind_port(self.serv)
- self.serv.listen(1)
+ self.serv.listen()
# actual testing
start = time.time()
try:
@@ -4068,117 +4085,6 @@ class FileObjectClassTestCase(SocketConnectedTest):
pass
-class FileObjectInterruptedTestCase(unittest.TestCase):
- """Test that the file object correctly handles EINTR internally."""
-
- class MockSocket(object):
- def __init__(self, recv_funcs=()):
- # A generator that returns callables that we'll call for each
- # call to recv().
- self._recv_step = iter(recv_funcs)
-
- def recv_into(self, buffer):
- data = next(self._recv_step)()
- assert len(buffer) >= len(data)
- buffer[:len(data)] = data
- return len(data)
-
- def _decref_socketios(self):
- pass
-
- def _textiowrap_for_test(self, buffering=-1):
- raw = socket.SocketIO(self, "r")
- if buffering < 0:
- buffering = io.DEFAULT_BUFFER_SIZE
- if buffering == 0:
- return raw
- buffer = io.BufferedReader(raw, buffering)
- text = io.TextIOWrapper(buffer, None, None)
- text.mode = "rb"
- return text
-
- @staticmethod
- def _raise_eintr():
- raise OSError(errno.EINTR, "interrupted")
-
- def _textiowrap_mock_socket(self, mock, buffering=-1):
- raw = socket.SocketIO(mock, "r")
- if buffering < 0:
- buffering = io.DEFAULT_BUFFER_SIZE
- if buffering == 0:
- return raw
- buffer = io.BufferedReader(raw, buffering)
- text = io.TextIOWrapper(buffer, None, None)
- text.mode = "rb"
- return text
-
- def _test_readline(self, size=-1, buffering=-1):
- mock_sock = self.MockSocket(recv_funcs=[
- lambda : b"This is the first line\nAnd the sec",
- self._raise_eintr,
- lambda : b"ond line is here\n",
- lambda : b"",
- lambda : b"", # XXX(gps): io library does an extra EOF read
- ])
- fo = mock_sock._textiowrap_for_test(buffering=buffering)
- self.assertEqual(fo.readline(size), "This is the first line\n")
- self.assertEqual(fo.readline(size), "And the second line is here\n")
-
- def _test_read(self, size=-1, buffering=-1):
- mock_sock = self.MockSocket(recv_funcs=[
- lambda : b"This is the first line\nAnd the sec",
- self._raise_eintr,
- lambda : b"ond line is here\n",
- lambda : b"",
- lambda : b"", # XXX(gps): io library does an extra EOF read
- ])
- expecting = (b"This is the first line\n"
- b"And the second line is here\n")
- fo = mock_sock._textiowrap_for_test(buffering=buffering)
- if buffering == 0:
- data = b''
- else:
- data = ''
- expecting = expecting.decode('utf-8')
- while len(data) != len(expecting):
- part = fo.read(size)
- if not part:
- break
- data += part
- self.assertEqual(data, expecting)
-
- def test_default(self):
- self._test_readline()
- self._test_readline(size=100)
- self._test_read()
- self._test_read(size=100)
-
- def test_with_1k_buffer(self):
- self._test_readline(buffering=1024)
- self._test_readline(size=100, buffering=1024)
- self._test_read(buffering=1024)
- self._test_read(size=100, buffering=1024)
-
- def _test_readline_no_buffer(self, size=-1):
- mock_sock = self.MockSocket(recv_funcs=[
- lambda : b"a",
- lambda : b"\n",
- lambda : b"B",
- self._raise_eintr,
- lambda : b"b",
- lambda : b"",
- ])
- fo = mock_sock._textiowrap_for_test(buffering=0)
- self.assertEqual(fo.readline(size), b"a\n")
- self.assertEqual(fo.readline(size), b"Bb")
-
- def test_no_buffer(self):
- self._test_readline_no_buffer()
- self._test_readline_no_buffer(size=4)
- self._test_read(buffering=0)
- self._test_read(size=100, buffering=0)
-
-
class UnbufferedFileObjectClassTestCase(FileObjectClassTestCase):
"""Repeat the tests from FileObjectClassTestCase with bufsize==0.
@@ -4597,7 +4503,7 @@ class TestLinuxAbstractNamespace(unittest.TestCase):
address = b"\x00python-test-hello\x00\xff"
with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as s1:
s1.bind(address)
- s1.listen(1)
+ s1.listen()
with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as s2:
s2.connect(s1.getsockname())
with s1.accept()[0] as s3:
@@ -4624,6 +4530,12 @@ class TestLinuxAbstractNamespace(unittest.TestCase):
finally:
s.close()
+ def testBytearrayName(self):
+ # Check that an abstract name can be passed as a bytearray.
+ with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as s:
+ s.bind(bytearray(b"\x00python\x00test\x00"))
+ self.assertEqual(s.getsockname(), b"\x00python\x00test\x00")
+
@unittest.skipUnless(hasattr(socket, 'AF_UNIX'), 'test needs socket.AF_UNIX')
class TestUnixDomain(unittest.TestCase):
@@ -4829,13 +4741,13 @@ class TIPCThreadableTest(unittest.TestCase, ThreadableTest):
srvaddr = (socket.TIPC_ADDR_NAMESEQ, TIPC_STYPE,
TIPC_LOWER, TIPC_UPPER)
self.srv.bind(srvaddr)
- self.srv.listen(5)
+ self.srv.listen()
self.serverExplicitReady()
self.conn, self.connaddr = self.srv.accept()
self.addCleanup(self.conn.close)
def clientSetUp(self):
- # The is a hittable race between serverExplicitReady() and the
+ # There is a hittable race between serverExplicitReady() and the
# accept() call; sleep a little while to avoid it, otherwise
# we could get an exception
time.sleep(0.1)
@@ -5076,7 +4988,7 @@ class TestSocketSharing(SocketTCPTest):
def compareSockets(self, org, other):
# socket sharing is expected to work only for blocking socket
- # since the internal python timout value isn't transfered.
+ # since the internal python timeout value isn't transferred.
self.assertEqual(org.gettimeout(), None)
self.assertEqual(org.gettimeout(), other.gettimeout())
@@ -5118,6 +5030,275 @@ class TestSocketSharing(SocketTCPTest):
source.close()
+@unittest.skipUnless(thread, 'Threading required for this test.')
+class SendfileUsingSendTest(ThreadedTCPSocketTest):
+ """
+ Test the send() implementation of socket.sendfile().
+ """
+
+ FILESIZE = (10 * 1024 * 1024) # 10MB
+ BUFSIZE = 8192
+ FILEDATA = b""
+ TIMEOUT = 2
+
+ @classmethod
+ def setUpClass(cls):
+ def chunks(total, step):
+ assert total >= step
+ while total > step:
+ yield step
+ total -= step
+ if total:
+ yield total
+
+ chunk = b"".join([random.choice(string.ascii_letters).encode()
+ for i in range(cls.BUFSIZE)])
+ with open(support.TESTFN, 'wb') as f:
+ for csize in chunks(cls.FILESIZE, cls.BUFSIZE):
+ f.write(chunk)
+ with open(support.TESTFN, 'rb') as f:
+ cls.FILEDATA = f.read()
+ assert len(cls.FILEDATA) == cls.FILESIZE
+
+ @classmethod
+ def tearDownClass(cls):
+ support.unlink(support.TESTFN)
+
+ def accept_conn(self):
+ self.serv.settimeout(self.TIMEOUT)
+ conn, addr = self.serv.accept()
+ conn.settimeout(self.TIMEOUT)
+ self.addCleanup(conn.close)
+ return conn
+
+ def recv_data(self, conn):
+ received = []
+ while True:
+ chunk = conn.recv(self.BUFSIZE)
+ if not chunk:
+ break
+ received.append(chunk)
+ return b''.join(received)
+
+ def meth_from_sock(self, sock):
+ # Depending on the mixin class being run return either send()
+ # or sendfile() method implementation.
+ return getattr(sock, "_sendfile_use_send")
+
+ # regular file
+
+ def _testRegularFile(self):
+ address = self.serv.getsockname()
+ file = open(support.TESTFN, 'rb')
+ with socket.create_connection(address) as sock, file as file:
+ meth = self.meth_from_sock(sock)
+ sent = meth(file)
+ self.assertEqual(sent, self.FILESIZE)
+ self.assertEqual(file.tell(), self.FILESIZE)
+
+ def testRegularFile(self):
+ conn = self.accept_conn()
+ data = self.recv_data(conn)
+ self.assertEqual(len(data), self.FILESIZE)
+ self.assertEqual(data, self.FILEDATA)
+
+ # non regular file
+
+ def _testNonRegularFile(self):
+ address = self.serv.getsockname()
+ file = io.BytesIO(self.FILEDATA)
+ with socket.create_connection(address) as sock, file as file:
+ sent = sock.sendfile(file)
+ self.assertEqual(sent, self.FILESIZE)
+ self.assertEqual(file.tell(), self.FILESIZE)
+ self.assertRaises(socket._GiveupOnSendfile,
+ sock._sendfile_use_sendfile, file)
+
+ def testNonRegularFile(self):
+ conn = self.accept_conn()
+ data = self.recv_data(conn)
+ self.assertEqual(len(data), self.FILESIZE)
+ self.assertEqual(data, self.FILEDATA)
+
+ # empty file
+
+ def _testEmptyFileSend(self):
+ address = self.serv.getsockname()
+ filename = support.TESTFN + "2"
+ with open(filename, 'wb'):
+ self.addCleanup(support.unlink, filename)
+ file = open(filename, 'rb')
+ with socket.create_connection(address) as sock, file as file:
+ meth = self.meth_from_sock(sock)
+ sent = meth(file)
+ self.assertEqual(sent, 0)
+ self.assertEqual(file.tell(), 0)
+
+ def testEmptyFileSend(self):
+ conn = self.accept_conn()
+ data = self.recv_data(conn)
+ self.assertEqual(data, b"")
+
+ # offset
+
+ def _testOffset(self):
+ address = self.serv.getsockname()
+ file = open(support.TESTFN, 'rb')
+ with socket.create_connection(address) as sock, file as file:
+ meth = self.meth_from_sock(sock)
+ sent = meth(file, offset=5000)
+ self.assertEqual(sent, self.FILESIZE - 5000)
+ self.assertEqual(file.tell(), self.FILESIZE)
+
+ def testOffset(self):
+ conn = self.accept_conn()
+ data = self.recv_data(conn)
+ self.assertEqual(len(data), self.FILESIZE - 5000)
+ self.assertEqual(data, self.FILEDATA[5000:])
+
+ # count
+
+ def _testCount(self):
+ address = self.serv.getsockname()
+ file = open(support.TESTFN, 'rb')
+ with socket.create_connection(address, timeout=2) as sock, file as file:
+ count = 5000007
+ meth = self.meth_from_sock(sock)
+ sent = meth(file, count=count)
+ self.assertEqual(sent, count)
+ self.assertEqual(file.tell(), count)
+
+ def testCount(self):
+ count = 5000007
+ conn = self.accept_conn()
+ data = self.recv_data(conn)
+ self.assertEqual(len(data), count)
+ self.assertEqual(data, self.FILEDATA[:count])
+
+ # count small
+
+ def _testCountSmall(self):
+ address = self.serv.getsockname()
+ file = open(support.TESTFN, 'rb')
+ with socket.create_connection(address, timeout=2) as sock, file as file:
+ count = 1
+ meth = self.meth_from_sock(sock)
+ sent = meth(file, count=count)
+ self.assertEqual(sent, count)
+ self.assertEqual(file.tell(), count)
+
+ def testCountSmall(self):
+ count = 1
+ conn = self.accept_conn()
+ data = self.recv_data(conn)
+ self.assertEqual(len(data), count)
+ self.assertEqual(data, self.FILEDATA[:count])
+
+ # count + offset
+
+ def _testCountWithOffset(self):
+ address = self.serv.getsockname()
+ file = open(support.TESTFN, 'rb')
+ with socket.create_connection(address, timeout=2) as sock, file as file:
+ count = 100007
+ meth = self.meth_from_sock(sock)
+ sent = meth(file, offset=2007, count=count)
+ self.assertEqual(sent, count)
+ self.assertEqual(file.tell(), count + 2007)
+
+ def testCountWithOffset(self):
+ count = 100007
+ conn = self.accept_conn()
+ data = self.recv_data(conn)
+ self.assertEqual(len(data), count)
+ self.assertEqual(data, self.FILEDATA[2007:count+2007])
+
+ # non blocking sockets are not supposed to work
+
+ def _testNonBlocking(self):
+ address = self.serv.getsockname()
+ file = open(support.TESTFN, 'rb')
+ with socket.create_connection(address) as sock, file as file:
+ sock.setblocking(False)
+ meth = self.meth_from_sock(sock)
+ self.assertRaises(ValueError, meth, file)
+ self.assertRaises(ValueError, sock.sendfile, file)
+
+ def testNonBlocking(self):
+ conn = self.accept_conn()
+ if conn.recv(8192):
+ self.fail('was not supposed to receive any data')
+
+ # timeout (non-triggered)
+
+ def _testWithTimeout(self):
+ address = self.serv.getsockname()
+ file = open(support.TESTFN, 'rb')
+ with socket.create_connection(address, timeout=2) as sock, file as file:
+ meth = self.meth_from_sock(sock)
+ sent = meth(file)
+ self.assertEqual(sent, self.FILESIZE)
+
+ def testWithTimeout(self):
+ conn = self.accept_conn()
+ data = self.recv_data(conn)
+ self.assertEqual(len(data), self.FILESIZE)
+ self.assertEqual(data, self.FILEDATA)
+
+ # timeout (triggered)
+
+ def _testWithTimeoutTriggeredSend(self):
+ address = self.serv.getsockname()
+ file = open(support.TESTFN, 'rb')
+ with socket.create_connection(address, timeout=0.01) as sock, \
+ file as file:
+ meth = self.meth_from_sock(sock)
+ self.assertRaises(socket.timeout, meth, file)
+
+ def testWithTimeoutTriggeredSend(self):
+ conn = self.accept_conn()
+ conn.recv(88192)
+
+ # errors
+
+ def _test_errors(self):
+ pass
+
+ def test_errors(self):
+ with open(support.TESTFN, 'rb') as file:
+ with socket.socket(type=socket.SOCK_DGRAM) as s:
+ meth = self.meth_from_sock(s)
+ self.assertRaisesRegex(
+ ValueError, "SOCK_STREAM", meth, file)
+ with open(support.TESTFN, 'rt') as file:
+ with socket.socket() as s:
+ meth = self.meth_from_sock(s)
+ self.assertRaisesRegex(
+ ValueError, "binary mode", meth, file)
+ with open(support.TESTFN, 'rb') as file:
+ with socket.socket() as s:
+ meth = self.meth_from_sock(s)
+ self.assertRaisesRegex(TypeError, "positive integer",
+ meth, file, count='2')
+ self.assertRaisesRegex(TypeError, "positive integer",
+ meth, file, count=0.1)
+ self.assertRaisesRegex(ValueError, "positive integer",
+ meth, file, count=0)
+ self.assertRaisesRegex(ValueError, "positive integer",
+ meth, file, count=-1)
+
+
+@unittest.skipUnless(thread, 'Threading required for this test.')
+@unittest.skipUnless(hasattr(os, "sendfile"),
+ 'os.sendfile() required for this test.')
+class SendfileUsingSendfileTest(SendfileUsingSendTest):
+ """
+ Test the sendfile() implementation of socket.sendfile().
+ """
+ def meth_from_sock(self, sock):
+ return getattr(sock, "_sendfile_use_sendfile")
+
+
def test_main():
tests = [GeneralModuleTests, BasicTCPTest, TCPCloserTest, TCPTimeoutTest,
TestExceptions, BufferIOTest, BasicTCPTest2, BasicUDPTest, UDPTimeoutTest ]
@@ -5125,7 +5306,6 @@ def test_main():
tests.extend([
NonBlockingTCPTests,
FileObjectClassTestCase,
- FileObjectInterruptedTestCase,
UnbufferedFileObjectClassTestCase,
LineBufferedFileObjectClassTestCase,
SmallBufferedFileObjectClassTestCase,
@@ -5170,6 +5350,8 @@ def test_main():
InterruptedRecvTimeoutTest,
InterruptedSendTimeoutTest,
TestSocketSharing,
+ SendfileUsingSendTest,
+ SendfileUsingSendfileTest,
])
thread_info = support.threading_setup()
diff --git a/Lib/test/test_socketserver.py b/Lib/test/test_socketserver.py
index 325d4856f9..0d0f86fca4 100644
--- a/Lib/test/test_socketserver.py
+++ b/Lib/test/test_socketserver.py
@@ -160,6 +160,8 @@ class SocketServerTest(unittest.TestCase):
def dgram_examine(self, proto, addr):
s = socket.socket(proto, socket.SOCK_DGRAM)
+ if HAVE_UNIX_SOCKETS and proto == socket.AF_UNIX:
+ s.bind(self.pickaddr(proto))
s.sendto(TEST_STR, addr)
buf = data = receive(s, 100)
while data and b'\n' not in buf:
@@ -222,59 +224,24 @@ class SocketServerTest(unittest.TestCase):
socketserver.DatagramRequestHandler,
self.dgram_examine)
- @contextlib.contextmanager
- def mocked_select_module(self):
- """Mocks the select.select() call to raise EINTR for first call"""
- old_select = select.select
-
- class MockSelect:
- def __init__(self):
- self.called = 0
-
- def __call__(self, *args):
- self.called += 1
- if self.called == 1:
- # raise the exception on first call
- raise OSError(errno.EINTR, os.strerror(errno.EINTR))
- else:
- # Return real select value for consecutive calls
- return old_select(*args)
-
- select.select = MockSelect()
- try:
- yield select.select
- finally:
- select.select = old_select
-
- def test_InterruptServerSelectCall(self):
- with self.mocked_select_module() as mock_select:
- pid = self.run_server(socketserver.TCPServer,
- socketserver.StreamRequestHandler,
- self.stream_examine)
- # Make sure select was called again:
- self.assertGreater(mock_select.called, 1)
-
- # Alas, on Linux (at least) recvfrom() doesn't return a meaningful
- # client address so this cannot work:
-
- # @requires_unix_sockets
- # def test_UnixDatagramServer(self):
- # self.run_server(socketserver.UnixDatagramServer,
- # socketserver.DatagramRequestHandler,
- # self.dgram_examine)
- #
- # @requires_unix_sockets
- # def test_ThreadingUnixDatagramServer(self):
- # self.run_server(socketserver.ThreadingUnixDatagramServer,
- # socketserver.DatagramRequestHandler,
- # self.dgram_examine)
- #
- # @requires_unix_sockets
- # @requires_forking
- # def test_ForkingUnixDatagramServer(self):
- # self.run_server(socketserver.ForkingUnixDatagramServer,
- # socketserver.DatagramRequestHandler,
- # self.dgram_examine)
+ @requires_unix_sockets
+ def test_UnixDatagramServer(self):
+ self.run_server(socketserver.UnixDatagramServer,
+ socketserver.DatagramRequestHandler,
+ self.dgram_examine)
+
+ @requires_unix_sockets
+ def test_ThreadingUnixDatagramServer(self):
+ self.run_server(socketserver.ThreadingUnixDatagramServer,
+ socketserver.DatagramRequestHandler,
+ self.dgram_examine)
+
+ @requires_unix_sockets
+ @requires_forking
+ def test_ForkingUnixDatagramServer(self):
+ self.run_server(ForkingUnixDatagramServer,
+ socketserver.DatagramRequestHandler,
+ self.dgram_examine)
@reap_threads
def test_shutdown(self):
@@ -325,6 +292,27 @@ class MiscTestCase(unittest.TestCase):
expected.append(name)
self.assertCountEqual(socketserver.__all__, expected)
+ def test_shutdown_request_called_if_verify_request_false(self):
+ # Issue #26309: BaseServer should call shutdown_request even if
+ # verify_request is False
+
+ class MyServer(socketserver.TCPServer):
+ def verify_request(self, request, client_address):
+ return False
+
+ shutdown_called = 0
+ def shutdown_request(self, request):
+ self.shutdown_called += 1
+ socketserver.TCPServer.shutdown_request(self, request)
+
+ server = MyServer((HOST, 0), socketserver.StreamRequestHandler)
+ s = socket.socket(server.address_family, socket.SOCK_STREAM)
+ s.connect(server.server_address)
+ s.close()
+ server.handle_request()
+ self.assertEqual(server.shutdown_called, 1)
+ server.server_close()
+
if __name__ == "__main__":
unittest.main()
diff --git a/Lib/test/test_sort.py b/Lib/test/test_sort.py
index 8f6af64470..a5d0ebfd5a 100644
--- a/Lib/test/test_sort.py
+++ b/Lib/test/test_sort.py
@@ -262,24 +262,5 @@ class TestDecorateSortUndecorate(unittest.TestCase):
#==============================================================================
-def test_main(verbose=None):
- test_classes = (
- TestBase,
- TestDecorateSortUndecorate,
- TestBugs,
- )
-
- support.run_unittest(*test_classes)
-
- # verify reference counting
- if verbose and hasattr(sys, "gettotalrefcount"):
- import gc
- counts = [None] * 5
- for i in range(len(counts)):
- support.run_unittest(*test_classes)
- gc.collect()
- counts[i] = sys.gettotalrefcount()
- print(counts)
-
if __name__ == "__main__":
- test_main(verbose=True)
+ unittest.main()
diff --git a/Lib/test/test_source_encoding.py b/Lib/test/test_source_encoding.py
index 39a7c56019..38734009c0 100644
--- a/Lib/test/test_source_encoding.py
+++ b/Lib/test/test_source_encoding.py
@@ -1,13 +1,14 @@
# -*- coding: koi8-r -*-
import unittest
-from test.support import TESTFN, unlink, unload, rmtree
+from test.support import TESTFN, unlink, unload, rmtree, script_helper, captured_stdout
import importlib
import os
import sys
import subprocess
+import tempfile
-class SourceEncodingTest(unittest.TestCase):
+class MiscSourceEncodingTest(unittest.TestCase):
def test_pep263(self):
self.assertEqual(
@@ -142,5 +143,83 @@ class SourceEncodingTest(unittest.TestCase):
msg=c.exception.args[0])
+class AbstractSourceEncodingTest:
+
+ def test_default_coding(self):
+ src = (b'print(ascii("\xc3\xa4"))\n')
+ self.check_script_output(src, br"'\xe4'")
+
+ def test_first_coding_line(self):
+ src = (b'#coding:iso8859-15\n'
+ b'print(ascii("\xc3\xa4"))\n')
+ self.check_script_output(src, br"'\xc3\u20ac'")
+
+ def test_second_coding_line(self):
+ src = (b'#\n'
+ b'#coding:iso8859-15\n'
+ b'print(ascii("\xc3\xa4"))\n')
+ self.check_script_output(src, br"'\xc3\u20ac'")
+
+ def test_third_coding_line(self):
+ # Only first two lines are tested for a magic comment.
+ src = (b'#\n'
+ b'#\n'
+ b'#coding:iso8859-15\n'
+ b'print(ascii("\xc3\xa4"))\n')
+ self.check_script_output(src, br"'\xe4'")
+
+ def test_double_coding_line(self):
+ # If the first line matches the second line is ignored.
+ src = (b'#coding:iso8859-15\n'
+ b'#coding:latin1\n'
+ b'print(ascii("\xc3\xa4"))\n')
+ self.check_script_output(src, br"'\xc3\u20ac'")
+
+ def test_double_coding_same_line(self):
+ src = (b'#coding:iso8859-15 coding:latin1\n'
+ b'print(ascii("\xc3\xa4"))\n')
+ self.check_script_output(src, br"'\xc3\u20ac'")
+
+ def test_first_non_utf8_coding_line(self):
+ src = (b'#coding:iso-8859-15 \xa4\n'
+ b'print(ascii("\xc3\xa4"))\n')
+ self.check_script_output(src, br"'\xc3\u20ac'")
+
+ def test_second_non_utf8_coding_line(self):
+ src = (b'\n'
+ b'#coding:iso-8859-15 \xa4\n'
+ b'print(ascii("\xc3\xa4"))\n')
+ self.check_script_output(src, br"'\xc3\u20ac'")
+
+ def test_utf8_bom(self):
+ src = (b'\xef\xbb\xbfprint(ascii("\xc3\xa4"))\n')
+ self.check_script_output(src, br"'\xe4'")
+
+ def test_utf8_bom_and_utf8_coding_line(self):
+ src = (b'\xef\xbb\xbf#coding:utf-8\n'
+ b'print(ascii("\xc3\xa4"))\n')
+ self.check_script_output(src, br"'\xe4'")
+
+
+class BytesSourceEncodingTest(AbstractSourceEncodingTest, unittest.TestCase):
+
+ def check_script_output(self, src, expected):
+ with captured_stdout() as stdout:
+ exec(src)
+ out = stdout.getvalue().encode('latin1')
+ self.assertEqual(out.rstrip(), expected)
+
+
+class FileSourceEncodingTest(AbstractSourceEncodingTest, unittest.TestCase):
+
+ def check_script_output(self, src, expected):
+ with tempfile.TemporaryDirectory() as tmpd:
+ fn = os.path.join(tmpd, 'test.py')
+ with open(fn, 'wb') as fp:
+ fp.write(src)
+ res = script_helper.assert_python_ok(fn)
+ self.assertEqual(res.out.rstrip(), expected)
+
+
if __name__ == "__main__":
unittest.main()
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index c1939b5d3a..645ec8d100 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -60,7 +60,7 @@ REMOTE_ROOT_CERT = data_file("selfsigned_pythontestdotnet.pem")
EMPTYCERT = data_file("nullcert.pem")
BADCERT = data_file("badcert.pem")
-WRONGCERT = data_file("XXXnonexisting.pem")
+NONEXISTINGCERT = data_file("XXXnonexisting.pem")
BADKEY = data_file("badkey.pem")
NOKIACERT = data_file("nokia.pem")
NULLBYTECERT = data_file("nullbytecert.pem")
@@ -86,6 +86,12 @@ def have_verify_flags():
# 0.9.8 or higher
return ssl.OPENSSL_VERSION_INFO >= (0, 9, 8, 0, 15)
+def utc_offset(): #NOTE: ignore issues like #1647654
+ # local time = utc time + utc offset
+ if time.daylight and time.localtime().tm_isdst > 0:
+ return -time.altzone # seconds
+ return -time.timezone
+
def asn1time(cert_time):
# Some versions of OpenSSL ignore seconds, see #18207
# 0.9.8.i
@@ -134,6 +140,14 @@ class BasicSocketTests(unittest.TestCase):
self.assertIn(ssl.HAS_SNI, {True, False})
self.assertIn(ssl.HAS_ECDH, {True, False})
+ def test_str_for_enums(self):
+ # Make sure that the PROTOCOL_* constants have enum-like string
+ # reprs.
+ proto = ssl.PROTOCOL_SSLv23
+ self.assertEqual(str(proto), '_SSLMethod.PROTOCOL_SSLv23')
+ ctx = ssl.SSLContext(proto)
+ self.assertIs(ctx.protocol, proto)
+
def test_random(self):
v = ssl.RAND_status()
if support.verbose:
@@ -158,6 +172,8 @@ class BasicSocketTests(unittest.TestCase):
self.assertRaises(TypeError, ssl.RAND_egd, 1)
self.assertRaises(TypeError, ssl.RAND_egd, 'foo', 1)
ssl.RAND_add("this is a random string", 75.0)
+ ssl.RAND_add(b"this is a random bytes object", 75.0)
+ ssl.RAND_add(bytearray(b"this is a random bytearray object"), 75.0)
@unittest.skipUnless(os.name == 'posix', 'requires posix')
def test_random_fork(self):
@@ -298,10 +314,10 @@ class BasicSocketTests(unittest.TestCase):
# Version string as returned by {Open,Libre}SSL, the format might change
if "LibreSSL" in s:
self.assertTrue(s.startswith("LibreSSL {:d}.{:d}".format(major, minor)),
- (s, t))
+ (s, t, hex(n)))
else:
self.assertTrue(s.startswith("OpenSSL {:d}.{:d}.{:d}".format(major, minor, fix)),
- (s, t))
+ (s, t, hex(n)))
@support.cpython_only
def test_refcycle(self):
@@ -351,17 +367,42 @@ class BasicSocketTests(unittest.TestCase):
s.connect, (HOST, 8080))
with self.assertRaises(OSError) as cm:
with socket.socket() as sock:
- ssl.wrap_socket(sock, certfile=WRONGCERT)
+ ssl.wrap_socket(sock, certfile=NONEXISTINGCERT)
self.assertEqual(cm.exception.errno, errno.ENOENT)
with self.assertRaises(OSError) as cm:
with socket.socket() as sock:
- ssl.wrap_socket(sock, certfile=CERTFILE, keyfile=WRONGCERT)
+ ssl.wrap_socket(sock,
+ certfile=CERTFILE, keyfile=NONEXISTINGCERT)
self.assertEqual(cm.exception.errno, errno.ENOENT)
with self.assertRaises(OSError) as cm:
with socket.socket() as sock:
- ssl.wrap_socket(sock, certfile=WRONGCERT, keyfile=WRONGCERT)
+ ssl.wrap_socket(sock,
+ certfile=NONEXISTINGCERT, keyfile=NONEXISTINGCERT)
self.assertEqual(cm.exception.errno, errno.ENOENT)
+ def bad_cert_test(self, certfile):
+ """Check that trying to use the given client certificate fails"""
+ certfile = os.path.join(os.path.dirname(__file__) or os.curdir,
+ certfile)
+ sock = socket.socket()
+ self.addCleanup(sock.close)
+ with self.assertRaises(ssl.SSLError):
+ ssl.wrap_socket(sock,
+ certfile=certfile,
+ ssl_version=ssl.PROTOCOL_TLSv1)
+
+ def test_empty_cert(self):
+ """Wrapping with an empty cert file"""
+ self.bad_cert_test("nullcert.pem")
+
+ def test_malformed_cert(self):
+ """Wrapping with a badly formatted certificate (syntax error)"""
+ self.bad_cert_test("badcert.pem")
+
+ def test_malformed_key(self):
+ """Wrapping with a badly formatted key (syntax error)"""
+ self.bad_cert_test("badkey.pem")
+
def test_match_hostname(self):
def ok(cert, hostname):
ssl.match_hostname(cert, hostname)
@@ -369,6 +410,8 @@ class BasicSocketTests(unittest.TestCase):
self.assertRaises(ssl.CertificateError,
ssl.match_hostname, cert, hostname)
+ # -- Hostname matching --
+
cert = {'subject': ((('commonName', 'example.com'),),)}
ok(cert, 'example.com')
ok(cert, 'ExAmple.cOm')
@@ -454,6 +497,28 @@ class BasicSocketTests(unittest.TestCase):
# Only commonName is considered
fail(cert, 'California')
+ # -- IPv4 matching --
+ cert = {'subject': ((('commonName', 'example.com'),),),
+ 'subjectAltName': (('DNS', 'example.com'),
+ ('IP Address', '10.11.12.13'),
+ ('IP Address', '14.15.16.17'))}
+ ok(cert, '10.11.12.13')
+ ok(cert, '14.15.16.17')
+ fail(cert, '14.15.16.18')
+ fail(cert, 'example.net')
+
+ # -- IPv6 matching --
+ cert = {'subject': ((('commonName', 'example.com'),),),
+ 'subjectAltName': (('DNS', 'example.com'),
+ ('IP Address', '2001:0:0:0:0:0:0:CAFE\n'),
+ ('IP Address', '2003:0:0:0:0:0:0:BABA\n'))}
+ ok(cert, '2001::cafe')
+ ok(cert, '2003::baba')
+ fail(cert, '2003::bebe')
+ fail(cert, 'example.net')
+
+ # -- Miscellaneous --
+
# Neither commonName nor subjectAltName
cert = {'notAfter': 'Dec 18 23:59:59 2011 GMT',
'subject': ((('countryName', 'US'),),
@@ -505,9 +570,14 @@ class BasicSocketTests(unittest.TestCase):
def test_unknown_channel_binding(self):
# should raise ValueError for unknown type
s = socket.socket(socket.AF_INET)
- with ssl.wrap_socket(s) as ss:
+ s.bind(('127.0.0.1', 0))
+ s.listen()
+ c = socket.socket(socket.AF_INET)
+ c.connect(s.getsockname())
+ with ssl.wrap_socket(c, do_handshake_on_connect=False) as ss:
with self.assertRaises(ValueError):
ss.get_channel_binding("unknown-type")
+ s.close()
@unittest.skipUnless("tls-unique" in ssl.CHANNEL_BINDING_TYPES,
"'tls-unique' channel binding not available")
@@ -648,6 +718,71 @@ class BasicSocketTests(unittest.TestCase):
ctx.wrap_socket(s)
self.assertEqual(str(cx.exception), "only stream sockets are supported")
+ def cert_time_ok(self, timestring, timestamp):
+ self.assertEqual(ssl.cert_time_to_seconds(timestring), timestamp)
+
+ def cert_time_fail(self, timestring):
+ with self.assertRaises(ValueError):
+ ssl.cert_time_to_seconds(timestring)
+
+ @unittest.skipUnless(utc_offset(),
+ 'local time needs to be different from UTC')
+ def test_cert_time_to_seconds_timezone(self):
+ # Issue #19940: ssl.cert_time_to_seconds() returns wrong
+ # results if local timezone is not UTC
+ self.cert_time_ok("May 9 00:00:00 2007 GMT", 1178668800.0)
+ self.cert_time_ok("Jan 5 09:34:43 2018 GMT", 1515144883.0)
+
+ def test_cert_time_to_seconds(self):
+ timestring = "Jan 5 09:34:43 2018 GMT"
+ ts = 1515144883.0
+ self.cert_time_ok(timestring, ts)
+ # accept keyword parameter, assert its name
+ self.assertEqual(ssl.cert_time_to_seconds(cert_time=timestring), ts)
+ # accept both %e and %d (space or zero generated by strftime)
+ self.cert_time_ok("Jan 05 09:34:43 2018 GMT", ts)
+ # case-insensitive
+ self.cert_time_ok("JaN 5 09:34:43 2018 GmT", ts)
+ self.cert_time_fail("Jan 5 09:34 2018 GMT") # no seconds
+ self.cert_time_fail("Jan 5 09:34:43 2018") # no GMT
+ self.cert_time_fail("Jan 5 09:34:43 2018 UTC") # not GMT timezone
+ self.cert_time_fail("Jan 35 09:34:43 2018 GMT") # invalid day
+ self.cert_time_fail("Jon 5 09:34:43 2018 GMT") # invalid month
+ self.cert_time_fail("Jan 5 24:00:00 2018 GMT") # invalid hour
+ self.cert_time_fail("Jan 5 09:60:43 2018 GMT") # invalid minute
+
+ newyear_ts = 1230768000.0
+ # leap seconds
+ self.cert_time_ok("Dec 31 23:59:60 2008 GMT", newyear_ts)
+ # same timestamp
+ self.cert_time_ok("Jan 1 00:00:00 2009 GMT", newyear_ts)
+
+ self.cert_time_ok("Jan 5 09:34:59 2018 GMT", 1515144899)
+ # allow 60th second (even if it is not a leap second)
+ self.cert_time_ok("Jan 5 09:34:60 2018 GMT", 1515144900)
+ # allow 2nd leap second for compatibility with time.strptime()
+ self.cert_time_ok("Jan 5 09:34:61 2018 GMT", 1515144901)
+ self.cert_time_fail("Jan 5 09:34:62 2018 GMT") # invalid seconds
+
+ # no special treatement for the special value:
+ # 99991231235959Z (rfc 5280)
+ self.cert_time_ok("Dec 31 23:59:59 9999 GMT", 253402300799.0)
+
+ @support.run_with_locale('LC_ALL', '')
+ def test_cert_time_to_seconds_locale(self):
+ # `cert_time_to_seconds()` should be locale independent
+
+ def local_february_name():
+ return time.strftime('%b', (1, 2, 3, 4, 5, 6, 0, 0, 0))
+
+ if local_february_name().lower() == 'feb':
+ self.skipTest("locale-specific month name needs to be "
+ "different from C locale")
+
+ # locale-independent
+ self.cert_time_ok("Feb 9 00:00:00 2007 GMT", 1170979200.0)
+ self.cert_time_fail(local_february_name() + " 9 00:00:00 2007 GMT")
+
class ContextTests(unittest.TestCase):
@@ -733,7 +868,7 @@ class ContextTests(unittest.TestCase):
ctx.load_cert_chain(CERTFILE, keyfile=CERTFILE)
self.assertRaises(TypeError, ctx.load_cert_chain, keyfile=CERTFILE)
with self.assertRaises(OSError) as cm:
- ctx.load_cert_chain(WRONGCERT)
+ ctx.load_cert_chain(NONEXISTINGCERT)
self.assertEqual(cm.exception.errno, errno.ENOENT)
with self.assertRaisesRegex(ssl.SSLError, "PEM lib"):
ctx.load_cert_chain(BADCERT)
@@ -818,7 +953,7 @@ class ContextTests(unittest.TestCase):
self.assertRaises(TypeError, ctx.load_verify_locations)
self.assertRaises(TypeError, ctx.load_verify_locations, None, None, None)
with self.assertRaises(OSError) as cm:
- ctx.load_verify_locations(WRONGCERT)
+ ctx.load_verify_locations(NONEXISTINGCERT)
self.assertEqual(cm.exception.errno, errno.ENOENT)
with self.assertRaisesRegex(ssl.SSLError, "PEM lib"):
ctx.load_verify_locations(BADCERT)
@@ -894,7 +1029,7 @@ class ContextTests(unittest.TestCase):
self.assertRaises(TypeError, ctx.load_dh_params)
self.assertRaises(TypeError, ctx.load_dh_params, None)
with self.assertRaises(FileNotFoundError) as cm:
- ctx.load_dh_params(WRONGCERT)
+ ctx.load_dh_params(NONEXISTINGCERT)
self.assertEqual(cm.exception.errno, errno.ENOENT)
with self.assertRaises(ssl.SSLError) as cm:
ctx.load_dh_params(CERTFILE)
@@ -1157,7 +1292,7 @@ class SSLErrorTests(unittest.TestCase):
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
with socket.socket() as s:
s.bind(("127.0.0.1", 0))
- s.listen(5)
+ s.listen()
c = socket.socket()
c.connect(s.getsockname())
c.setblocking(False)
@@ -1170,6 +1305,69 @@ class SSLErrorTests(unittest.TestCase):
self.assertEqual(cm.exception.errno, ssl.SSL_ERROR_WANT_READ)
+class MemoryBIOTests(unittest.TestCase):
+
+ def test_read_write(self):
+ bio = ssl.MemoryBIO()
+ bio.write(b'foo')
+ self.assertEqual(bio.read(), b'foo')
+ self.assertEqual(bio.read(), b'')
+ bio.write(b'foo')
+ bio.write(b'bar')
+ self.assertEqual(bio.read(), b'foobar')
+ self.assertEqual(bio.read(), b'')
+ bio.write(b'baz')
+ self.assertEqual(bio.read(2), b'ba')
+ self.assertEqual(bio.read(1), b'z')
+ self.assertEqual(bio.read(1), b'')
+
+ def test_eof(self):
+ bio = ssl.MemoryBIO()
+ self.assertFalse(bio.eof)
+ self.assertEqual(bio.read(), b'')
+ self.assertFalse(bio.eof)
+ bio.write(b'foo')
+ self.assertFalse(bio.eof)
+ bio.write_eof()
+ self.assertFalse(bio.eof)
+ self.assertEqual(bio.read(2), b'fo')
+ self.assertFalse(bio.eof)
+ self.assertEqual(bio.read(1), b'o')
+ self.assertTrue(bio.eof)
+ self.assertEqual(bio.read(), b'')
+ self.assertTrue(bio.eof)
+
+ def test_pending(self):
+ bio = ssl.MemoryBIO()
+ self.assertEqual(bio.pending, 0)
+ bio.write(b'foo')
+ self.assertEqual(bio.pending, 3)
+ for i in range(3):
+ bio.read(1)
+ self.assertEqual(bio.pending, 3-i-1)
+ for i in range(3):
+ bio.write(b'x')
+ self.assertEqual(bio.pending, i+1)
+ bio.read()
+ self.assertEqual(bio.pending, 0)
+
+ def test_buffer_types(self):
+ bio = ssl.MemoryBIO()
+ bio.write(b'foo')
+ self.assertEqual(bio.read(), b'foo')
+ bio.write(bytearray(b'bar'))
+ self.assertEqual(bio.read(), b'bar')
+ bio.write(memoryview(b'baz'))
+ self.assertEqual(bio.read(), b'baz')
+
+ def test_error_types(self):
+ bio = ssl.MemoryBIO()
+ self.assertRaises(TypeError, bio.write, 'foo')
+ self.assertRaises(TypeError, bio.write, None)
+ self.assertRaises(TypeError, bio.write, True)
+ self.assertRaises(TypeError, bio.write, 1)
+
+
class NetworkedTests(unittest.TestCase):
def test_connect(self):
@@ -1401,14 +1599,12 @@ class NetworkedTests(unittest.TestCase):
def test_get_server_certificate(self):
def _test_get_server_certificate(host, port, cert=None):
with support.transient_internet(host):
- pem = ssl.get_server_certificate((host, port),
- ssl.PROTOCOL_SSLv23)
+ pem = ssl.get_server_certificate((host, port))
if not pem:
self.fail("No server certificate on %s:%s!" % (host, port))
try:
pem = ssl.get_server_certificate((host, port),
- ssl.PROTOCOL_SSLv23,
ca_certs=CERTFILE)
except ssl.SSLError as x:
#should fail
@@ -1418,7 +1614,6 @@ class NetworkedTests(unittest.TestCase):
self.fail("Got server certificate %s for %s:%s!" % (pem, host, port))
pem = ssl.get_server_certificate((host, port),
- ssl.PROTOCOL_SSLv23,
ca_certs=cert)
if not pem:
self.fail("No server certificate on %s:%s!" % (host, port))
@@ -1504,6 +1699,94 @@ class NetworkedTests(unittest.TestCase):
self.assertIs(ss.context, ctx2)
self.assertIs(ss._sslobj.context, ctx2)
+
+class NetworkedBIOTests(unittest.TestCase):
+
+ def ssl_io_loop(self, sock, incoming, outgoing, func, *args, **kwargs):
+ # A simple IO loop. Call func(*args) depending on the error we get
+ # (WANT_READ or WANT_WRITE) move data between the socket and the BIOs.
+ timeout = kwargs.get('timeout', 10)
+ count = 0
+ while True:
+ errno = None
+ count += 1
+ try:
+ ret = func(*args)
+ except ssl.SSLError as e:
+ if e.errno not in (ssl.SSL_ERROR_WANT_READ,
+ ssl.SSL_ERROR_WANT_WRITE):
+ raise
+ errno = e.errno
+ # Get any data from the outgoing BIO irrespective of any error, and
+ # send it to the socket.
+ buf = outgoing.read()
+ sock.sendall(buf)
+ # If there's no error, we're done. For WANT_READ, we need to get
+ # data from the socket and put it in the incoming BIO.
+ if errno is None:
+ break
+ elif errno == ssl.SSL_ERROR_WANT_READ:
+ buf = sock.recv(32768)
+ if buf:
+ incoming.write(buf)
+ else:
+ incoming.write_eof()
+ if support.verbose:
+ sys.stdout.write("Needed %d calls to complete %s().\n"
+ % (count, func.__name__))
+ return ret
+
+ def test_handshake(self):
+ with support.transient_internet(REMOTE_HOST):
+ sock = socket.socket(socket.AF_INET)
+ sock.connect((REMOTE_HOST, 443))
+ incoming = ssl.MemoryBIO()
+ outgoing = ssl.MemoryBIO()
+ ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
+ ctx.verify_mode = ssl.CERT_REQUIRED
+ ctx.load_verify_locations(REMOTE_ROOT_CERT)
+ ctx.check_hostname = True
+ sslobj = ctx.wrap_bio(incoming, outgoing, False, REMOTE_HOST)
+ self.assertIs(sslobj._sslobj.owner, sslobj)
+ self.assertIsNone(sslobj.cipher())
+ self.assertIsNone(sslobj.shared_ciphers())
+ self.assertRaises(ValueError, sslobj.getpeercert)
+ if 'tls-unique' in ssl.CHANNEL_BINDING_TYPES:
+ self.assertIsNone(sslobj.get_channel_binding('tls-unique'))
+ self.ssl_io_loop(sock, incoming, outgoing, sslobj.do_handshake)
+ self.assertTrue(sslobj.cipher())
+ self.assertIsNone(sslobj.shared_ciphers())
+ self.assertTrue(sslobj.getpeercert())
+ if 'tls-unique' in ssl.CHANNEL_BINDING_TYPES:
+ self.assertTrue(sslobj.get_channel_binding('tls-unique'))
+ try:
+ self.ssl_io_loop(sock, incoming, outgoing, sslobj.unwrap)
+ except ssl.SSLSyscallError:
+ # self-signed.pythontest.net probably shuts down the TCP
+ # connection without sending a secure shutdown message, and
+ # this is reported as SSL_ERROR_SYSCALL
+ pass
+ self.assertRaises(ssl.SSLError, sslobj.write, b'foo')
+ sock.close()
+
+ def test_read_write_data(self):
+ with support.transient_internet(REMOTE_HOST):
+ sock = socket.socket(socket.AF_INET)
+ sock.connect((REMOTE_HOST, 443))
+ incoming = ssl.MemoryBIO()
+ outgoing = ssl.MemoryBIO()
+ ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
+ ctx.verify_mode = ssl.CERT_NONE
+ sslobj = ctx.wrap_bio(incoming, outgoing, False)
+ self.ssl_io_loop(sock, incoming, outgoing, sslobj.do_handshake)
+ req = b'GET / HTTP/1.0\r\n\r\n'
+ self.ssl_io_loop(sock, incoming, outgoing, sslobj.write, req)
+ buf = self.ssl_io_loop(sock, incoming, outgoing, sslobj.read, 1024)
+ self.assertEqual(buf[:5], b'HTTP/')
+ self.ssl_io_loop(sock, incoming, outgoing, sslobj.unwrap)
+ sock.close()
+
+
try:
import threading
except ImportError:
@@ -1535,7 +1818,8 @@ else:
try:
self.sslconn = self.server.context.wrap_socket(
self.sock, server_side=True)
- self.server.selected_protocols.append(self.sslconn.selected_npn_protocol())
+ self.server.selected_npn_protocols.append(self.sslconn.selected_npn_protocol())
+ self.server.selected_alpn_protocols.append(self.sslconn.selected_alpn_protocol())
except (ssl.SSLError, ConnectionResetError) as e:
# We treat ConnectionResetError as though it were an
# SSLError - OpenSSL on Ubuntu abruptly closes the
@@ -1552,6 +1836,7 @@ else:
self.close()
return False
else:
+ self.server.shared_ciphers.append(self.sslconn.shared_ciphers())
if self.server.context.verify_mode == ssl.CERT_REQUIRED:
cert = self.sslconn.getpeercert()
if support.verbose and self.server.chatty:
@@ -1642,7 +1927,8 @@ else:
def __init__(self, certificate=None, ssl_version=None,
certreqs=None, cacerts=None,
chatty=True, connectionchatty=False, starttls_server=False,
- npn_protocols=None, ciphers=None, context=None):
+ npn_protocols=None, alpn_protocols=None,
+ ciphers=None, context=None):
if context:
self.context = context
else:
@@ -1657,6 +1943,8 @@ else:
self.context.load_cert_chain(certificate)
if npn_protocols:
self.context.set_npn_protocols(npn_protocols)
+ if alpn_protocols:
+ self.context.set_alpn_protocols(alpn_protocols)
if ciphers:
self.context.set_ciphers(ciphers)
self.chatty = chatty
@@ -1666,7 +1954,9 @@ else:
self.port = support.bind_port(self.sock)
self.flag = None
self.active = False
- self.selected_protocols = []
+ self.selected_npn_protocols = []
+ self.selected_alpn_protocols = []
+ self.shared_ciphers = []
self.conn_errors = []
threading.Thread.__init__(self)
self.daemon = True
@@ -1686,7 +1976,7 @@ else:
def run(self):
self.sock.settimeout(0.05)
- self.sock.listen(5)
+ self.sock.listen()
self.active = True
if self.flag:
# signal an event
@@ -1825,36 +2115,6 @@ else:
self.active = False
self.server.close()
- def bad_cert_test(certfile):
- """
- Launch a server with CERT_REQUIRED, and check that trying to
- connect to it with the given client certificate fails.
- """
- server = ThreadedEchoServer(CERTFILE,
- certreqs=ssl.CERT_REQUIRED,
- cacerts=CERTFILE, chatty=False,
- connectionchatty=False)
- with server:
- try:
- with socket.socket() as sock:
- s = ssl.wrap_socket(sock,
- certfile=certfile,
- ssl_version=ssl.PROTOCOL_TLSv1)
- s.connect((HOST, server.port))
- except ssl.SSLError as x:
- if support.verbose:
- sys.stdout.write("\nSSLError is %s\n" % x.args[1])
- except OSError as x:
- if support.verbose:
- sys.stdout.write("\nOSError is %s\n" % x.args[1])
- except OSError as x:
- if x.errno != errno.ENOENT:
- raise
- if support.verbose:
- sys.stdout.write("\OSError is %s\n" % str(x))
- else:
- raise AssertionError("Use of invalid cert should have failed!")
-
def server_params_test(client_context, server_context, indata=b"FOO\n",
chatty=True, connectionchatty=False, sni_name=None):
"""
@@ -1892,14 +2152,25 @@ else:
'compression': s.compression(),
'cipher': s.cipher(),
'peercert': s.getpeercert(),
- 'client_npn_protocol': s.selected_npn_protocol()
+ 'client_alpn_protocol': s.selected_alpn_protocol(),
+ 'client_npn_protocol': s.selected_npn_protocol(),
+ 'version': s.version(),
})
s.close()
- stats['server_npn_protocols'] = server.selected_protocols
+ stats['server_alpn_protocols'] = server.selected_alpn_protocols
+ stats['server_npn_protocols'] = server.selected_npn_protocols
+ stats['server_shared_ciphers'] = server.shared_ciphers
return stats
def try_protocol_combo(server_protocol, client_protocol, expect_success,
certsreqs=None, server_options=0, client_options=0):
+ """
+ Try to SSL-connect using *client_protocol* to *server_protocol*.
+ If *expect_success* is true, assert that the connection succeeds,
+ if it's false, assert that the connection fails.
+ Also, if *expect_success* is a string, assert that it is the protocol
+ version actually used by the connection.
+ """
if certsreqs is None:
certsreqs = ssl.CERT_NONE
certtype = {
@@ -1929,8 +2200,8 @@ else:
ctx.load_cert_chain(CERTFILE)
ctx.load_verify_locations(CERTFILE)
try:
- server_params_test(client_context, server_context,
- chatty=False, connectionchatty=False)
+ stats = server_params_test(client_context, server_context,
+ chatty=False, connectionchatty=False)
# Protocol mismatch can result in either an SSLError, or a
# "Connection reset by peer" error.
except ssl.SSLError:
@@ -1945,6 +2216,10 @@ else:
"Client protocol %s succeeded with server protocol %s!"
% (ssl.get_protocol_name(client_protocol),
ssl.get_protocol_name(server_protocol)))
+ elif (expect_success is not True
+ and expect_success != stats['version']):
+ raise AssertionError("version mismatch: expected %r, got %r"
+ % (expect_success, stats['version']))
class ThreadedTests(unittest.TestCase):
@@ -2080,22 +2355,38 @@ else:
"check_hostname requires server_hostname"):
context.wrap_socket(s)
- def test_empty_cert(self):
- """Connecting with an empty cert file"""
- bad_cert_test(os.path.join(os.path.dirname(__file__) or os.curdir,
- "nullcert.pem"))
- def test_malformed_cert(self):
- """Connecting with a badly formatted certificate (syntax error)"""
- bad_cert_test(os.path.join(os.path.dirname(__file__) or os.curdir,
- "badcert.pem"))
- def test_nonexisting_cert(self):
- """Connecting with a non-existing cert file"""
- bad_cert_test(os.path.join(os.path.dirname(__file__) or os.curdir,
- "wrongcert.pem"))
- def test_malformed_key(self):
- """Connecting with a badly formatted key (syntax error)"""
- bad_cert_test(os.path.join(os.path.dirname(__file__) or os.curdir,
- "badkey.pem"))
+ def test_wrong_cert(self):
+ """Connecting when the server rejects the client's certificate
+
+ Launch a server with CERT_REQUIRED, and check that trying to
+ connect to it with a wrong client certificate fails.
+ """
+ certfile = os.path.join(os.path.dirname(__file__) or os.curdir,
+ "wrongcert.pem")
+ server = ThreadedEchoServer(CERTFILE,
+ certreqs=ssl.CERT_REQUIRED,
+ cacerts=CERTFILE, chatty=False,
+ connectionchatty=False)
+ with server, \
+ socket.socket() as sock, \
+ ssl.wrap_socket(sock,
+ certfile=certfile,
+ ssl_version=ssl.PROTOCOL_TLSv1) as s:
+ try:
+ # Expect either an SSL error about the server rejecting
+ # the connection, or a low-level connection reset (which
+ # sometimes happens on Windows)
+ s.connect((HOST, server.port))
+ except ssl.SSLError as e:
+ if support.verbose:
+ sys.stdout.write("\nSSLError is %r\n" % e)
+ except OSError as e:
+ if e.errno != errno.ECONNRESET:
+ raise
+ if support.verbose:
+ sys.stdout.write("\nsocket.error is %r\n" % e)
+ else:
+ self.fail("Use of invalid cert should have failed!")
def test_rude_shutdown(self):
"""A brutal shutdown of an SSL server should raise an OSError
@@ -2112,7 +2403,7 @@ else:
# and sets Event `listener_gone` to let the main thread know
# the socket is gone.
def listener():
- s.listen(5)
+ s.listen()
listener_ready.set()
newsock, addr = s.accept()
newsock.close()
@@ -2179,17 +2470,17 @@ else:
if hasattr(ssl, 'PROTOCOL_SSLv3'):
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, False)
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv23, True)
- try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, True)
+ try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, 'TLSv1')
if hasattr(ssl, 'PROTOCOL_SSLv3'):
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, False, ssl.CERT_OPTIONAL)
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv23, True, ssl.CERT_OPTIONAL)
- try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, True, ssl.CERT_OPTIONAL)
+ try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, 'TLSv1', ssl.CERT_OPTIONAL)
if hasattr(ssl, 'PROTOCOL_SSLv3'):
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv3, False, ssl.CERT_REQUIRED)
try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv23, True, ssl.CERT_REQUIRED)
- try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, True, ssl.CERT_REQUIRED)
+ try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1, 'TLSv1', ssl.CERT_REQUIRED)
# Server with specific SSL options
if hasattr(ssl, 'PROTOCOL_SSLv3'):
@@ -2209,9 +2500,9 @@ else:
"""Connecting to an SSLv3 server with various client options"""
if support.verbose:
sys.stdout.write("\n")
- try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv3, True)
- try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv3, True, ssl.CERT_OPTIONAL)
- try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv3, True, ssl.CERT_REQUIRED)
+ try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv3, 'SSLv3')
+ try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv3, 'SSLv3', ssl.CERT_OPTIONAL)
+ try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv3, 'SSLv3', ssl.CERT_REQUIRED)
if hasattr(ssl, 'PROTOCOL_SSLv2'):
try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv2, False)
try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv23, False,
@@ -2227,9 +2518,9 @@ else:
"""Connecting to a TLSv1 server with various client options"""
if support.verbose:
sys.stdout.write("\n")
- try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1, True)
- try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1, True, ssl.CERT_OPTIONAL)
- try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1, True, ssl.CERT_REQUIRED)
+ try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1, 'TLSv1')
+ try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1, 'TLSv1', ssl.CERT_OPTIONAL)
+ try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1, 'TLSv1', ssl.CERT_REQUIRED)
if hasattr(ssl, 'PROTOCOL_SSLv2'):
try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_SSLv2, False)
if hasattr(ssl, 'PROTOCOL_SSLv3'):
@@ -2245,7 +2536,7 @@ else:
Testing against older TLS versions."""
if support.verbose:
sys.stdout.write("\n")
- try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_TLSv1_1, True)
+ try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_TLSv1_1, 'TLSv1.1')
if hasattr(ssl, 'PROTOCOL_SSLv2'):
try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_SSLv2, False)
if hasattr(ssl, 'PROTOCOL_SSLv3'):
@@ -2253,7 +2544,7 @@ else:
try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_SSLv23, False,
client_options=ssl.OP_NO_TLSv1_1)
- try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1_1, True)
+ try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1_1, 'TLSv1.1')
try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_TLSv1, False)
try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1_1, False)
@@ -2266,7 +2557,7 @@ else:
Testing against older TLS versions."""
if support.verbose:
sys.stdout.write("\n")
- try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1_2, True,
+ try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1_2, 'TLSv1.2',
server_options=ssl.OP_NO_SSLv3|ssl.OP_NO_SSLv2,
client_options=ssl.OP_NO_SSLv3|ssl.OP_NO_SSLv2,)
if hasattr(ssl, 'PROTOCOL_SSLv2'):
@@ -2276,7 +2567,7 @@ else:
try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_SSLv23, False,
client_options=ssl.OP_NO_TLSv1_2)
- try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1_2, True)
+ try_protocol_combo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_TLSv1_2, 'TLSv1.2')
try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1, False)
try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1_2, False)
try_protocol_combo(ssl.PROTOCOL_TLSv1_2, ssl.PROTOCOL_TLSv1_1, False)
@@ -2501,6 +2792,20 @@ else:
# consume data
s.read()
+ data = b"data"
+
+ # read(-1, buffer) is supported, even though read(-1) is not
+ s.send(data)
+ buffer = bytearray(len(data))
+ self.assertEqual(s.read(-1, buffer), len(data))
+ self.assertEqual(buffer, data)
+
+ # recv/read(0) should return no data
+ s.send(data)
+ self.assertEqual(s.recv(0), b"")
+ self.assertEqual(s.read(0), b"")
+ self.assertEqual(s.read(), data)
+
# Make sure sendmsg et al are disallowed to avoid
# inadvertent disclosure of data and/or corruption
# of the encrypted data stream
@@ -2510,6 +2815,40 @@ else:
s.recvmsg_into, bytearray(100))
s.write(b"over\n")
+
+ self.assertRaises(ValueError, s.recv, -1)
+ self.assertRaises(ValueError, s.read, -1)
+
+ s.close()
+
+ def test_nonblocking_send(self):
+ server = ThreadedEchoServer(CERTFILE,
+ certreqs=ssl.CERT_NONE,
+ ssl_version=ssl.PROTOCOL_TLSv1,
+ cacerts=CERTFILE,
+ chatty=True,
+ connectionchatty=False)
+ with server:
+ s = ssl.wrap_socket(socket.socket(),
+ server_side=False,
+ certfile=CERTFILE,
+ ca_certs=CERTFILE,
+ cert_reqs=ssl.CERT_NONE,
+ ssl_version=ssl.PROTOCOL_TLSv1)
+ s.connect((HOST, server.port))
+ s.setblocking(False)
+
+ # If we keep sending data, at some point the buffers
+ # will be full and the call will block
+ buf = bytearray(8192)
+ def fill_buffer():
+ while True:
+ s.send(buf)
+ self.assertRaises((ssl.SSLWantWriteError,
+ ssl.SSLWantReadError), fill_buffer)
+
+ # Now read all the output and discard it
+ s.setblocking(True)
s.close()
def test_handshake_timeout(self):
@@ -2521,7 +2860,7 @@ else:
finish = False
def serve():
- server.listen(5)
+ server.listen()
started.set()
conns = []
while not finish:
@@ -2578,7 +2917,7 @@ else:
peer = None
def serve():
nonlocal remote, peer
- server.listen(5)
+ server.listen()
# Block on the accept and wait on the connection to close.
evt.set()
remote, peer = server.accept()
@@ -2628,6 +2967,21 @@ else:
s.connect((HOST, server.port))
self.assertIn("no shared cipher", str(server.conn_errors[0]))
+ def test_version_basic(self):
+ """
+ Basic tests for SSLSocket.version().
+ More tests are done in the test_protocol_*() methods.
+ """
+ context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
+ with ThreadedEchoServer(CERTFILE,
+ ssl_version=ssl.PROTOCOL_TLSv1,
+ chatty=False) as server:
+ with context.wrap_socket(socket.socket()) as s:
+ self.assertIs(s.version(), None)
+ s.connect((HOST, server.port))
+ self.assertEqual(s.version(), "TLSv1")
+ self.assertIs(s.version(), None)
+
@unittest.skipUnless(ssl.HAS_ECDH, "test requires ECDH-enabled OpenSSL")
def test_default_ecdh_curve(self):
# Issue #21015: elliptic curve-based Diffie Hellman key exchange
@@ -2737,6 +3091,55 @@ else:
if "ADH" not in parts and "EDH" not in parts and "DHE" not in parts:
self.fail("Non-DH cipher: " + cipher[0])
+ def test_selected_alpn_protocol(self):
+ # selected_alpn_protocol() is None unless ALPN is used.
+ context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
+ context.load_cert_chain(CERTFILE)
+ stats = server_params_test(context, context,
+ chatty=True, connectionchatty=True)
+ self.assertIs(stats['client_alpn_protocol'], None)
+
+ @unittest.skipUnless(ssl.HAS_ALPN, "ALPN support required")
+ def test_selected_alpn_protocol_if_server_uses_alpn(self):
+ # selected_alpn_protocol() is None unless ALPN is used by the client.
+ client_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
+ client_context.load_verify_locations(CERTFILE)
+ server_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
+ server_context.load_cert_chain(CERTFILE)
+ server_context.set_alpn_protocols(['foo', 'bar'])
+ stats = server_params_test(client_context, server_context,
+ chatty=True, connectionchatty=True)
+ self.assertIs(stats['client_alpn_protocol'], None)
+
+ @unittest.skipUnless(ssl.HAS_ALPN, "ALPN support needed for this test")
+ def test_alpn_protocols(self):
+ server_protocols = ['foo', 'bar', 'milkshake']
+ protocol_tests = [
+ (['foo', 'bar'], 'foo'),
+ (['bar', 'foo'], 'foo'),
+ (['milkshake'], 'milkshake'),
+ (['http/3.0', 'http/4.0'], None)
+ ]
+ for client_protocols, expected in protocol_tests:
+ server_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
+ server_context.load_cert_chain(CERTFILE)
+ server_context.set_alpn_protocols(server_protocols)
+ client_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
+ client_context.load_cert_chain(CERTFILE)
+ client_context.set_alpn_protocols(client_protocols)
+ stats = server_params_test(client_context, server_context,
+ chatty=True, connectionchatty=True)
+
+ msg = "failed trying %s (s) and %s (c).\n" \
+ "was expecting %s, but got %%s from the %%s" \
+ % (str(server_protocols), str(client_protocols),
+ str(expected))
+ client_result = stats['client_alpn_protocol']
+ self.assertEqual(client_result, expected, msg % (client_result, "client"))
+ server_result = stats['server_alpn_protocols'][-1] \
+ if len(stats['server_alpn_protocols']) else 'nothing'
+ self.assertEqual(server_result, expected, msg % (server_result, "server"))
+
def test_selected_npn_protocol(self):
# selected_npn_protocol() is None unless NPN is used
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
@@ -2877,6 +3280,20 @@ else:
self.assertEqual(cm.exception.reason, 'TLSV1_ALERT_INTERNAL_ERROR')
self.assertIn("TypeError", stderr.getvalue())
+ def test_shared_ciphers(self):
+ server_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
+ server_context.load_cert_chain(SIGNED_CERTFILE)
+ client_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
+ client_context.verify_mode = ssl.CERT_REQUIRED
+ client_context.load_verify_locations(SIGNING_CA)
+ client_context.set_ciphers("RC4")
+ server_context.set_ciphers("AES:RC4")
+ stats = server_params_test(client_context, server_context)
+ ciphers = stats['server_shared_ciphers'][0]
+ self.assertGreater(len(ciphers), 0)
+ for name, tls_version, bits in ciphers:
+ self.assertIn("RC4", name.split("-"))
+
def test_read_write_after_close_raises_valuerror(self):
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
context.verify_mode = ssl.CERT_REQUIRED
@@ -2892,21 +3309,46 @@ else:
self.assertRaises(ValueError, s.read, 1024)
self.assertRaises(ValueError, s.write, b'hello')
+ def test_sendfile(self):
+ TEST_DATA = b"x" * 512
+ with open(support.TESTFN, 'wb') as f:
+ f.write(TEST_DATA)
+ self.addCleanup(support.unlink, support.TESTFN)
+ context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
+ context.verify_mode = ssl.CERT_REQUIRED
+ context.load_verify_locations(CERTFILE)
+ context.load_cert_chain(CERTFILE)
+ server = ThreadedEchoServer(context=context, chatty=False)
+ with server:
+ with context.wrap_socket(socket.socket()) as s:
+ s.connect((HOST, server.port))
+ with open(support.TESTFN, 'rb') as file:
+ s.sendfile(file)
+ self.assertEqual(s.recv(1024), TEST_DATA)
+
def test_main(verbose=False):
if support.verbose:
+ import warnings
plats = {
'Linux': platform.linux_distribution,
'Mac': platform.mac_ver,
'Windows': platform.win32_ver,
}
- for name, func in plats.items():
- plat = func()
- if plat and plat[0]:
- plat = '%s %r' % (name, plat)
- break
- else:
- plat = repr(platform.platform())
+ with warnings.catch_warnings():
+ warnings.filterwarnings(
+ 'ignore',
+ 'dist\(\) and linux_distribution\(\) '
+ 'functions are deprecated .*',
+ PendingDeprecationWarning,
+ )
+ for name, func in plats.items():
+ plat = func()
+ if plat and plat[0]:
+ plat = '%s %r' % (name, plat)
+ break
+ else:
+ plat = repr(platform.platform())
print("test_ssl: testing with %r %r" %
(ssl.OPENSSL_VERSION, ssl.OPENSSL_VERSION_INFO))
print(" under %s" % plat)
@@ -2925,10 +3367,11 @@ def test_main(verbose=False):
if not os.path.exists(filename):
raise support.TestFailed("Can't read certificate file %r" % filename)
- tests = [ContextTests, BasicSocketTests, SSLErrorTests]
+ tests = [ContextTests, BasicSocketTests, SSLErrorTests, MemoryBIOTests]
if support.is_resource_enabled('network'):
tests.append(NetworkedTests)
+ tests.append(NetworkedBIOTests)
if _have_threads:
thread_info = support.threading_setup()
diff --git a/Lib/test/test_startfile.py b/Lib/test/test_startfile.py
index 43abf9b7e1..f59252e97a 100644
--- a/Lib/test/test_startfile.py
+++ b/Lib/test/test_startfile.py
@@ -30,8 +30,5 @@ class TestCase(unittest.TestCase):
startfile(empty)
startfile(empty, "open")
-def test_main():
- support.run_unittest(TestCase)
-
-if __name__=="__main__":
- test_main()
+if __name__ == "__main__":
+ unittest.main()
diff --git a/Lib/test/test_stat.py b/Lib/test/test_stat.py
index af6ced4204..f1a5938a39 100644
--- a/Lib/test/test_stat.py
+++ b/Lib/test/test_stat.py
@@ -1,5 +1,6 @@
import unittest
import os
+import sys
from test.support import TESTFN, import_fresh_module
c_stat = import_fresh_module('stat', fresh=['_stat'])
@@ -52,6 +53,26 @@ class TestFilemode:
'S_IWOTH': 0o002,
'S_IXOTH': 0o001}
+ # defined by the Windows API documentation
+ file_attributes = {
+ 'FILE_ATTRIBUTE_ARCHIVE': 32,
+ 'FILE_ATTRIBUTE_COMPRESSED': 2048,
+ 'FILE_ATTRIBUTE_DEVICE': 64,
+ 'FILE_ATTRIBUTE_DIRECTORY': 16,
+ 'FILE_ATTRIBUTE_ENCRYPTED': 16384,
+ 'FILE_ATTRIBUTE_HIDDEN': 2,
+ 'FILE_ATTRIBUTE_INTEGRITY_STREAM': 32768,
+ 'FILE_ATTRIBUTE_NORMAL': 128,
+ 'FILE_ATTRIBUTE_NOT_CONTENT_INDEXED': 8192,
+ 'FILE_ATTRIBUTE_NO_SCRUB_DATA': 131072,
+ 'FILE_ATTRIBUTE_OFFLINE': 4096,
+ 'FILE_ATTRIBUTE_READONLY': 1,
+ 'FILE_ATTRIBUTE_REPARSE_POINT': 1024,
+ 'FILE_ATTRIBUTE_SPARSE_FILE': 512,
+ 'FILE_ATTRIBUTE_SYSTEM': 4,
+ 'FILE_ATTRIBUTE_TEMPORARY': 256,
+ 'FILE_ATTRIBUTE_VIRTUAL': 65536}
+
def setUp(self):
try:
os.remove(TESTFN)
@@ -185,6 +206,14 @@ class TestFilemode:
self.assertTrue(callable(func))
self.assertEqual(func(0), 0)
+ @unittest.skipUnless(sys.platform == "win32",
+ "FILE_ATTRIBUTE_* constants are Win32 specific")
+ def test_file_attribute_constants(self):
+ for key, value in sorted(self.file_attributes.items()):
+ self.assertTrue(hasattr(self.statmod, key), key)
+ modvalue = getattr(self.statmod, key)
+ self.assertEqual(value, modvalue, key)
+
class TestFilemodeCStat(TestFilemode, unittest.TestCase):
statmod = c_stat
diff --git a/Lib/test/test_string.py b/Lib/test/test_string.py
index 57963bfc69..70439f85c8 100644
--- a/Lib/test/test_string.py
+++ b/Lib/test/test_string.py
@@ -1,19 +1,24 @@
-import unittest, string
-from test import support
+import unittest
+import string
+from string import Template
class ModuleTest(unittest.TestCase):
def test_attrs(self):
- string.whitespace
- string.ascii_lowercase
- string.ascii_uppercase
- string.ascii_letters
- string.digits
- string.hexdigits
- string.octdigits
- string.punctuation
- string.printable
+ # While the exact order of the items in these attributes is not
+ # technically part of the "language spec", in practice there is almost
+ # certainly user code that depends on the order, so de-facto it *is*
+ # part of the spec.
+ self.assertEqual(string.whitespace, ' \t\n\r\x0b\x0c')
+ self.assertEqual(string.ascii_lowercase, 'abcdefghijklmnopqrstuvwxyz')
+ self.assertEqual(string.ascii_uppercase, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')
+ self.assertEqual(string.ascii_letters, string.ascii_lowercase + string.ascii_uppercase)
+ self.assertEqual(string.digits, '0123456789')
+ self.assertEqual(string.hexdigits, string.digits + 'abcdefABCDEF')
+ self.assertEqual(string.octdigits, '01234567')
+ self.assertEqual(string.punctuation, '!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~')
+ self.assertEqual(string.printable, string.digits + string.ascii_lowercase + string.ascii_uppercase + string.punctuation + string.whitespace)
def test_capwords(self):
self.assertEqual(string.capwords('abc def ghi'), 'Abc Def Ghi')
@@ -43,8 +48,9 @@ class ModuleTest(unittest.TestCase):
self.assertEqual(fmt.format("-{format_string}-", format_string='test'),
'-test-')
self.assertRaises(KeyError, fmt.format, "-{format_string}-")
- self.assertEqual(fmt.format(arg='test', format_string="-{arg}-"),
- '-test-')
+ with self.assertWarnsRegex(DeprecationWarning, "format_string"):
+ self.assertEqual(fmt.format(arg='test', format_string="-{arg}-"),
+ '-test-')
def test_auto_numbering(self):
fmt = string.Formatter()
@@ -183,8 +189,245 @@ class ModuleTest(unittest.TestCase):
self.assertIn("recursion", str(err.exception))
-def test_main():
- support.run_unittest(ModuleTest)
-
-if __name__ == "__main__":
- test_main()
+# Template tests (formerly housed in test_pep292.py)
+
+class Bag:
+ pass
+
+class Mapping:
+ def __getitem__(self, name):
+ obj = self
+ for part in name.split('.'):
+ try:
+ obj = getattr(obj, part)
+ except AttributeError:
+ raise KeyError(name)
+ return obj
+
+
+class TestTemplate(unittest.TestCase):
+ def test_regular_templates(self):
+ s = Template('$who likes to eat a bag of $what worth $$100')
+ self.assertEqual(s.substitute(dict(who='tim', what='ham')),
+ 'tim likes to eat a bag of ham worth $100')
+ self.assertRaises(KeyError, s.substitute, dict(who='tim'))
+ self.assertRaises(TypeError, Template.substitute)
+
+ def test_regular_templates_with_braces(self):
+ s = Template('$who likes ${what} for ${meal}')
+ d = dict(who='tim', what='ham', meal='dinner')
+ self.assertEqual(s.substitute(d), 'tim likes ham for dinner')
+ self.assertRaises(KeyError, s.substitute,
+ dict(who='tim', what='ham'))
+
+ def test_escapes(self):
+ eq = self.assertEqual
+ s = Template('$who likes to eat a bag of $$what worth $$100')
+ eq(s.substitute(dict(who='tim', what='ham')),
+ 'tim likes to eat a bag of $what worth $100')
+ s = Template('$who likes $$')
+ eq(s.substitute(dict(who='tim', what='ham')), 'tim likes $')
+
+ def test_percents(self):
+ eq = self.assertEqual
+ s = Template('%(foo)s $foo ${foo}')
+ d = dict(foo='baz')
+ eq(s.substitute(d), '%(foo)s baz baz')
+ eq(s.safe_substitute(d), '%(foo)s baz baz')
+
+ def test_stringification(self):
+ eq = self.assertEqual
+ s = Template('tim has eaten $count bags of ham today')
+ d = dict(count=7)
+ eq(s.substitute(d), 'tim has eaten 7 bags of ham today')
+ eq(s.safe_substitute(d), 'tim has eaten 7 bags of ham today')
+ s = Template('tim has eaten ${count} bags of ham today')
+ eq(s.substitute(d), 'tim has eaten 7 bags of ham today')
+
+ def test_tupleargs(self):
+ eq = self.assertEqual
+ s = Template('$who ate ${meal}')
+ d = dict(who=('tim', 'fred'), meal=('ham', 'kung pao'))
+ eq(s.substitute(d), "('tim', 'fred') ate ('ham', 'kung pao')")
+ eq(s.safe_substitute(d), "('tim', 'fred') ate ('ham', 'kung pao')")
+
+ def test_SafeTemplate(self):
+ eq = self.assertEqual
+ s = Template('$who likes ${what} for ${meal}')
+ eq(s.safe_substitute(dict(who='tim')), 'tim likes ${what} for ${meal}')
+ eq(s.safe_substitute(dict(what='ham')), '$who likes ham for ${meal}')
+ eq(s.safe_substitute(dict(what='ham', meal='dinner')),
+ '$who likes ham for dinner')
+ eq(s.safe_substitute(dict(who='tim', what='ham')),
+ 'tim likes ham for ${meal}')
+ eq(s.safe_substitute(dict(who='tim', what='ham', meal='dinner')),
+ 'tim likes ham for dinner')
+
+ def test_invalid_placeholders(self):
+ raises = self.assertRaises
+ s = Template('$who likes $')
+ raises(ValueError, s.substitute, dict(who='tim'))
+ s = Template('$who likes ${what)')
+ raises(ValueError, s.substitute, dict(who='tim'))
+ s = Template('$who likes $100')
+ raises(ValueError, s.substitute, dict(who='tim'))
+
+ def test_idpattern_override(self):
+ class PathPattern(Template):
+ idpattern = r'[_a-z][._a-z0-9]*'
+ m = Mapping()
+ m.bag = Bag()
+ m.bag.foo = Bag()
+ m.bag.foo.who = 'tim'
+ m.bag.what = 'ham'
+ s = PathPattern('$bag.foo.who likes to eat a bag of $bag.what')
+ self.assertEqual(s.substitute(m), 'tim likes to eat a bag of ham')
+
+ def test_pattern_override(self):
+ class MyPattern(Template):
+ pattern = r"""
+ (?P<escaped>@{2}) |
+ @(?P<named>[_a-z][._a-z0-9]*) |
+ @{(?P<braced>[_a-z][._a-z0-9]*)} |
+ (?P<invalid>@)
+ """
+ m = Mapping()
+ m.bag = Bag()
+ m.bag.foo = Bag()
+ m.bag.foo.who = 'tim'
+ m.bag.what = 'ham'
+ s = MyPattern('@bag.foo.who likes to eat a bag of @bag.what')
+ self.assertEqual(s.substitute(m), 'tim likes to eat a bag of ham')
+
+ class BadPattern(Template):
+ pattern = r"""
+ (?P<badname>.*) |
+ (?P<escaped>@{2}) |
+ @(?P<named>[_a-z][._a-z0-9]*) |
+ @{(?P<braced>[_a-z][._a-z0-9]*)} |
+ (?P<invalid>@) |
+ """
+ s = BadPattern('@bag.foo.who likes to eat a bag of @bag.what')
+ self.assertRaises(ValueError, s.substitute, {})
+ self.assertRaises(ValueError, s.safe_substitute, {})
+
+ def test_braced_override(self):
+ class MyTemplate(Template):
+ pattern = r"""
+ \$(?:
+ (?P<escaped>$) |
+ (?P<named>[_a-z][_a-z0-9]*) |
+ @@(?P<braced>[_a-z][_a-z0-9]*)@@ |
+ (?P<invalid>) |
+ )
+ """
+
+ tmpl = 'PyCon in $@@location@@'
+ t = MyTemplate(tmpl)
+ self.assertRaises(KeyError, t.substitute, {})
+ val = t.substitute({'location': 'Cleveland'})
+ self.assertEqual(val, 'PyCon in Cleveland')
+
+ def test_braced_override_safe(self):
+ class MyTemplate(Template):
+ pattern = r"""
+ \$(?:
+ (?P<escaped>$) |
+ (?P<named>[_a-z][_a-z0-9]*) |
+ @@(?P<braced>[_a-z][_a-z0-9]*)@@ |
+ (?P<invalid>) |
+ )
+ """
+
+ tmpl = 'PyCon in $@@location@@'
+ t = MyTemplate(tmpl)
+ self.assertEqual(t.safe_substitute(), tmpl)
+ val = t.safe_substitute({'location': 'Cleveland'})
+ self.assertEqual(val, 'PyCon in Cleveland')
+
+ def test_invalid_with_no_lines(self):
+ # The error formatting for invalid templates
+ # has a special case for no data that the default
+ # pattern can't trigger (always has at least '$')
+ # So we craft a pattern that is always invalid
+ # with no leading data.
+ class MyTemplate(Template):
+ pattern = r"""
+ (?P<invalid>) |
+ unreachable(
+ (?P<named>) |
+ (?P<braced>) |
+ (?P<escaped>)
+ )
+ """
+ s = MyTemplate('')
+ with self.assertRaises(ValueError) as err:
+ s.substitute({})
+ self.assertIn('line 1, col 1', str(err.exception))
+
+ def test_unicode_values(self):
+ s = Template('$who likes $what')
+ d = dict(who='t\xffm', what='f\xfe\fed')
+ self.assertEqual(s.substitute(d), 't\xffm likes f\xfe\x0ced')
+
+ def test_keyword_arguments(self):
+ eq = self.assertEqual
+ s = Template('$who likes $what')
+ eq(s.substitute(who='tim', what='ham'), 'tim likes ham')
+ eq(s.substitute(dict(who='tim'), what='ham'), 'tim likes ham')
+ eq(s.substitute(dict(who='fred', what='kung pao'),
+ who='tim', what='ham'),
+ 'tim likes ham')
+ s = Template('the mapping is $mapping')
+ eq(s.substitute(dict(foo='none'), mapping='bozo'),
+ 'the mapping is bozo')
+ eq(s.substitute(dict(mapping='one'), mapping='two'),
+ 'the mapping is two')
+
+ s = Template('the self is $self')
+ eq(s.substitute(self='bozo'), 'the self is bozo')
+
+ def test_keyword_arguments_safe(self):
+ eq = self.assertEqual
+ raises = self.assertRaises
+ s = Template('$who likes $what')
+ eq(s.safe_substitute(who='tim', what='ham'), 'tim likes ham')
+ eq(s.safe_substitute(dict(who='tim'), what='ham'), 'tim likes ham')
+ eq(s.safe_substitute(dict(who='fred', what='kung pao'),
+ who='tim', what='ham'),
+ 'tim likes ham')
+ s = Template('the mapping is $mapping')
+ eq(s.safe_substitute(dict(foo='none'), mapping='bozo'),
+ 'the mapping is bozo')
+ eq(s.safe_substitute(dict(mapping='one'), mapping='two'),
+ 'the mapping is two')
+ d = dict(mapping='one')
+ raises(TypeError, s.substitute, d, {})
+ raises(TypeError, s.safe_substitute, d, {})
+
+ s = Template('the self is $self')
+ eq(s.safe_substitute(self='bozo'), 'the self is bozo')
+
+ def test_delimiter_override(self):
+ eq = self.assertEqual
+ raises = self.assertRaises
+ class AmpersandTemplate(Template):
+ delimiter = '&'
+ s = AmpersandTemplate('this &gift is for &{who} &&')
+ eq(s.substitute(gift='bud', who='you'), 'this bud is for you &')
+ raises(KeyError, s.substitute)
+ eq(s.safe_substitute(gift='bud', who='you'), 'this bud is for you &')
+ eq(s.safe_substitute(), 'this &gift is for &{who} &')
+ s = AmpersandTemplate('this &gift is for &{who} &')
+ raises(ValueError, s.substitute, dict(gift='bud', who='you'))
+ eq(s.safe_substitute(), 'this &gift is for &{who} &')
+
+ class PieDelims(Template):
+ delimiter = '@'
+ s = PieDelims('@who likes to eat a bag of @{what} worth $100')
+ self.assertEqual(s.substitute(dict(who='tim', what='ham')),
+ 'tim likes to eat a bag of ham worth $100')
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/Lib/test/test_stringprep.py b/Lib/test/test_stringprep.py
index e763635efe..d4b4a13d0d 100644
--- a/Lib/test/test_stringprep.py
+++ b/Lib/test/test_stringprep.py
@@ -2,7 +2,6 @@
# Since we don't have them, this test checks only a few code points.
import unittest
-from test import support
from stringprep import *
@@ -89,8 +88,5 @@ class StringprepTests(unittest.TestCase):
# h.update(data)
# print p, h.hexdigest()
-def test_main():
- support.run_unittest(StringprepTests)
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_strlit.py b/Lib/test/test_strlit.py
index d01322faa6..87cffe843a 100644
--- a/Lib/test/test_strlit.py
+++ b/Lib/test/test_strlit.py
@@ -32,7 +32,6 @@ import sys
import shutil
import tempfile
import unittest
-import test.support
TEMPLATE = r"""# coding: %s
@@ -199,8 +198,5 @@ class TestLiterals(unittest.TestCase):
self.check_encoding("latin9")
-def test_main():
- test.support.run_unittest(__name__)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_strptime.py b/Lib/test/test_strptime.py
index c1dd195478..85126e6e53 100644
--- a/Lib/test/test_strptime.py
+++ b/Lib/test/test_strptime.py
@@ -190,7 +190,7 @@ class TimeRETests(unittest.TestCase):
def test_whitespace_substitution(self):
# When pattern contains whitespace, make sure it is taken into account
- # so as to not allow to subpatterns to end up next to each other and
+ # so as to not allow subpatterns to end up next to each other and
# "steal" characters from each other.
pattern = self.time_re.pattern('%j %H')
self.assertFalse(re.match(pattern, "180"))
@@ -496,14 +496,14 @@ class CalculationTests(unittest.TestCase):
def test_week_0(self):
def check(value, format, *expected):
self.assertEqual(_strptime._strptime_time(value, format)[:-1], expected)
- check('2015 0 0', '%Y %U %w', 2014, 12, 28, 0, 0, 0, 6, -3)
+ check('2015 0 0', '%Y %U %w', 2014, 12, 28, 0, 0, 0, 6, 362)
check('2015 0 0', '%Y %W %w', 2015, 1, 4, 0, 0, 0, 6, 4)
- check('2015 0 1', '%Y %U %w', 2014, 12, 29, 0, 0, 0, 0, -2)
- check('2015 0 1', '%Y %W %w', 2014, 12, 29, 0, 0, 0, 0, -2)
- check('2015 0 2', '%Y %U %w', 2014, 12, 30, 0, 0, 0, 1, -1)
- check('2015 0 2', '%Y %W %w', 2014, 12, 30, 0, 0, 0, 1, -1)
- check('2015 0 3', '%Y %U %w', 2014, 12, 31, 0, 0, 0, 2, 0)
- check('2015 0 3', '%Y %W %w', 2014, 12, 31, 0, 0, 0, 2, 0)
+ check('2015 0 1', '%Y %U %w', 2014, 12, 29, 0, 0, 0, 0, 363)
+ check('2015 0 1', '%Y %W %w', 2014, 12, 29, 0, 0, 0, 0, 363)
+ check('2015 0 2', '%Y %U %w', 2014, 12, 30, 0, 0, 0, 1, 364)
+ check('2015 0 2', '%Y %W %w', 2014, 12, 30, 0, 0, 0, 1, 364)
+ check('2015 0 3', '%Y %U %w', 2014, 12, 31, 0, 0, 0, 2, 365)
+ check('2015 0 3', '%Y %W %w', 2014, 12, 31, 0, 0, 0, 2, 365)
check('2015 0 4', '%Y %U %w', 2015, 1, 1, 0, 0, 0, 3, 1)
check('2015 0 4', '%Y %W %w', 2015, 1, 1, 0, 0, 0, 3, 1)
check('2015 0 5', '%Y %U %w', 2015, 1, 2, 0, 0, 0, 4, 2)
@@ -511,6 +511,20 @@ class CalculationTests(unittest.TestCase):
check('2015 0 6', '%Y %U %w', 2015, 1, 3, 0, 0, 0, 5, 3)
check('2015 0 6', '%Y %W %w', 2015, 1, 3, 0, 0, 0, 5, 3)
+ check('2009 0 0', '%Y %U %w', 2008, 12, 28, 0, 0, 0, 6, 363)
+ check('2009 0 0', '%Y %W %w', 2009, 1, 4, 0, 0, 0, 6, 4)
+ check('2009 0 1', '%Y %U %w', 2008, 12, 29, 0, 0, 0, 0, 364)
+ check('2009 0 1', '%Y %W %w', 2008, 12, 29, 0, 0, 0, 0, 364)
+ check('2009 0 2', '%Y %U %w', 2008, 12, 30, 0, 0, 0, 1, 365)
+ check('2009 0 2', '%Y %W %w', 2008, 12, 30, 0, 0, 0, 1, 365)
+ check('2009 0 3', '%Y %U %w', 2008, 12, 31, 0, 0, 0, 2, 366)
+ check('2009 0 3', '%Y %W %w', 2008, 12, 31, 0, 0, 0, 2, 366)
+ check('2009 0 4', '%Y %U %w', 2009, 1, 1, 0, 0, 0, 3, 1)
+ check('2009 0 4', '%Y %W %w', 2009, 1, 1, 0, 0, 0, 3, 1)
+ check('2009 0 5', '%Y %U %w', 2009, 1, 2, 0, 0, 0, 4, 2)
+ check('2009 0 5', '%Y %W %w', 2009, 1, 2, 0, 0, 0, 4, 2)
+ check('2009 0 6', '%Y %U %w', 2009, 1, 3, 0, 0, 0, 5, 3)
+ check('2009 0 6', '%Y %W %w', 2009, 1, 3, 0, 0, 0, 5, 3)
class CacheTests(unittest.TestCase):
"""Test that caching works properly."""
@@ -604,18 +618,5 @@ class CacheTests(unittest.TestCase):
_strptime._strptime_time(oldtzname[1], '%Z')
-def test_main():
- support.run_unittest(
- getlang_Tests,
- LocaleTime_Tests,
- TimeRETests,
- StrptimeTests,
- Strptime12AMPMTests,
- JulianTests,
- CalculationTests,
- CacheTests
- )
-
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_strtod.py b/Lib/test/test_strtod.py
index 41b6e5f833..2727514fad 100644
--- a/Lib/test/test_strtod.py
+++ b/Lib/test/test_strtod.py
@@ -429,8 +429,5 @@ class StrtodTests(unittest.TestCase):
for s in test_strings:
self.check_strtod(s)
-def test_main():
- test.support.run_unittest(StrtodTests)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_struct.py b/Lib/test/test_struct.py
index 0107eebca6..efbdbfcc58 100644
--- a/Lib/test/test_struct.py
+++ b/Lib/test/test_struct.py
@@ -660,8 +660,5 @@ class UnpackIteratorTest(unittest.TestCase):
self.assertRaises(StopIteration, next, it)
-def test_main():
- support.run_unittest(__name__)
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_structmembers.py b/Lib/test/test_structmembers.py
index 1c931ae778..57ec45f3f9 100644
--- a/Lib/test/test_structmembers.py
+++ b/Lib/test/test_structmembers.py
@@ -140,8 +140,5 @@ class TestWarnings(unittest.TestCase):
ts.T_USHORT = USHRT_MAX+1
-def test_main(verbose=None):
- support.run_unittest(__name__)
-
if __name__ == "__main__":
- test_main(verbose=True)
+ unittest.main()
diff --git a/Lib/test/test_structseq.py b/Lib/test/test_structseq.py
index 353d0eadcc..3ecb27dd09 100644
--- a/Lib/test/test_structseq.py
+++ b/Lib/test/test_structseq.py
@@ -1,7 +1,6 @@
import os
import time
import unittest
-from test import support
class StructSeqTest(unittest.TestCase):
@@ -123,8 +122,5 @@ class StructSeqTest(unittest.TestCase):
self.assertEqual(list(t[start:stop:step]),
L[start:stop:step])
-def test_main():
- support.run_unittest(StructSeqTest)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index 4719cc0165..4704d49062 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -1,5 +1,6 @@
import unittest
-from test import script_helper
+from unittest import mock
+from test.support import script_helper
from test import support
import subprocess
import sys
@@ -381,7 +382,7 @@ class ProcessTestCase(BaseTestCase):
python_dir, python_base = self._split_python_path()
abs_python = os.path.join(python_dir, python_base)
rel_python = os.path.join(os.curdir, python_base)
- with script_helper.temp_dir() as wrong_dir:
+ with support.temp_dir() as wrong_dir:
# Before calling with an absolute path, confirm that using a
# relative path fails.
self.assertRaises(FileNotFoundError, subprocess.Popen,
@@ -504,6 +505,27 @@ class ProcessTestCase(BaseTestCase):
tf.seek(0)
self.assertStderrEqual(tf.read(), b"strawberry")
+ def test_stderr_redirect_with_no_stdout_redirect(self):
+ # test stderr=STDOUT while stdout=None (not set)
+
+ # - grandchild prints to stderr
+ # - child redirects grandchild's stderr to its stdout
+ # - the parent should get grandchild's stderr in child's stdout
+ p = subprocess.Popen([sys.executable, "-c",
+ 'import sys, subprocess;'
+ 'rc = subprocess.call([sys.executable, "-c",'
+ ' "import sys;"'
+ ' "sys.stderr.write(\'42\')"],'
+ ' stderr=subprocess.STDOUT);'
+ 'sys.exit(rc)'],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
+ stdout, stderr = p.communicate()
+ #NOTE: stdout should get stderr from grandchild
+ self.assertStderrEqual(stdout, b'42')
+ self.assertStderrEqual(stderr, b'') # should be empty
+ self.assertEqual(p.returncode, 0)
+
def test_stdout_stderr_pipe(self):
# capture stdout and stderr to the same pipe
p = subprocess.Popen([sys.executable, "-c",
@@ -1219,6 +1241,102 @@ class ProcessTestCase(BaseTestCase):
fds_after_exception = os.listdir(fd_directory)
self.assertEqual(fds_before_popen, fds_after_exception)
+
+class RunFuncTestCase(BaseTestCase):
+ def run_python(self, code, **kwargs):
+ """Run Python code in a subprocess using subprocess.run"""
+ argv = [sys.executable, "-c", code]
+ return subprocess.run(argv, **kwargs)
+
+ def test_returncode(self):
+ # call() function with sequence argument
+ cp = self.run_python("import sys; sys.exit(47)")
+ self.assertEqual(cp.returncode, 47)
+ with self.assertRaises(subprocess.CalledProcessError):
+ cp.check_returncode()
+
+ def test_check(self):
+ with self.assertRaises(subprocess.CalledProcessError) as c:
+ self.run_python("import sys; sys.exit(47)", check=True)
+ self.assertEqual(c.exception.returncode, 47)
+
+ def test_check_zero(self):
+ # check_returncode shouldn't raise when returncode is zero
+ cp = self.run_python("import sys; sys.exit(0)", check=True)
+ self.assertEqual(cp.returncode, 0)
+
+ def test_timeout(self):
+ # run() function with timeout argument; we want to test that the child
+ # process gets killed when the timeout expires. If the child isn't
+ # killed, this call will deadlock since subprocess.run waits for the
+ # child.
+ with self.assertRaises(subprocess.TimeoutExpired):
+ self.run_python("while True: pass", timeout=0.0001)
+
+ def test_capture_stdout(self):
+ # capture stdout with zero return code
+ cp = self.run_python("print('BDFL')", stdout=subprocess.PIPE)
+ self.assertIn(b'BDFL', cp.stdout)
+
+ def test_capture_stderr(self):
+ cp = self.run_python("import sys; sys.stderr.write('BDFL')",
+ stderr=subprocess.PIPE)
+ self.assertIn(b'BDFL', cp.stderr)
+
+ def test_check_output_stdin_arg(self):
+ # run() can be called with stdin set to a file
+ tf = tempfile.TemporaryFile()
+ self.addCleanup(tf.close)
+ tf.write(b'pear')
+ tf.seek(0)
+ cp = self.run_python(
+ "import sys; sys.stdout.write(sys.stdin.read().upper())",
+ stdin=tf, stdout=subprocess.PIPE)
+ self.assertIn(b'PEAR', cp.stdout)
+
+ def test_check_output_input_arg(self):
+ # check_output() can be called with input set to a string
+ cp = self.run_python(
+ "import sys; sys.stdout.write(sys.stdin.read().upper())",
+ input=b'pear', stdout=subprocess.PIPE)
+ self.assertIn(b'PEAR', cp.stdout)
+
+ def test_check_output_stdin_with_input_arg(self):
+ # run() refuses to accept 'stdin' with 'input'
+ tf = tempfile.TemporaryFile()
+ self.addCleanup(tf.close)
+ tf.write(b'pear')
+ tf.seek(0)
+ with self.assertRaises(ValueError,
+ msg="Expected ValueError when stdin and input args supplied.") as c:
+ output = self.run_python("print('will not be run')",
+ stdin=tf, input=b'hare')
+ self.assertIn('stdin', c.exception.args[0])
+ self.assertIn('input', c.exception.args[0])
+
+ def test_check_output_timeout(self):
+ with self.assertRaises(subprocess.TimeoutExpired) as c:
+ cp = self.run_python((
+ "import sys, time\n"
+ "sys.stdout.write('BDFL')\n"
+ "sys.stdout.flush()\n"
+ "time.sleep(3600)"),
+ # Some heavily loaded buildbots (sparc Debian 3.x) require
+ # this much time to start and print.
+ timeout=3, stdout=subprocess.PIPE)
+ self.assertEqual(c.exception.output, b'BDFL')
+ # output is aliased to stdout
+ self.assertEqual(c.exception.stdout, b'BDFL')
+
+ def test_run_kwargs(self):
+ newenv = os.environ.copy()
+ newenv["FRUIT"] = "banana"
+ cp = self.run_python(('import sys, os;'
+ 'sys.exit(33 if os.getenv("FRUIT")=="banana" else 31)'),
+ env=newenv)
+ self.assertEqual(cp.returncode, 33)
+
+
@unittest.skipIf(mswindows, "POSIX specific tests")
class POSIXProcessTestCase(BaseTestCase):
@@ -1429,10 +1547,14 @@ class POSIXProcessTestCase(BaseTestCase):
[_, hard] = limits
setrlimit(RLIMIT_NPROC, (0, hard))
self.addCleanup(setrlimit, RLIMIT_NPROC, limits)
- # Forking should raise EAGAIN, translated to BlockingIOError
- with self.assertRaises(BlockingIOError):
+ try:
subprocess.call([sys.executable, '-c', ''],
preexec_fn=lambda: None)
+ except BlockingIOError:
+ # Forking should raise EAGAIN, translated to BlockingIOError
+ pass
+ else:
+ self.skipTest('RLIMIT_NPROC had no effect; probably superuser')
def test_args_string(self):
# args is a string
@@ -2234,8 +2356,6 @@ class POSIXProcessTestCase(BaseTestCase):
func = lambda: None
gc.enable()
- executable_list = "exec" # error: must be a sequence
-
for args, exe_list, cwd, env_list in (
(123, [b"exe"], None, [b"env"]),
([b"arg"], 123, None, [b"env"]),
@@ -2253,6 +2373,80 @@ class POSIXProcessTestCase(BaseTestCase):
if not gc_enabled:
gc.disable()
+ @support.cpython_only
+ def test_fork_exec_sorted_fd_sanity_check(self):
+ # Issue #23564: sanity check the fork_exec() fds_to_keep sanity check.
+ import _posixsubprocess
+ gc_enabled = gc.isenabled()
+ try:
+ gc.enable()
+
+ for fds_to_keep in (
+ (-1, 2, 3, 4, 5), # Negative number.
+ ('str', 4), # Not an int.
+ (18, 23, 42, 2**63), # Out of range.
+ (5, 4), # Not sorted.
+ (6, 7, 7, 8), # Duplicate.
+ ):
+ with self.assertRaises(
+ ValueError,
+ msg='fds_to_keep={}'.format(fds_to_keep)) as c:
+ _posixsubprocess.fork_exec(
+ [b"false"], [b"false"],
+ True, fds_to_keep, None, [b"env"],
+ -1, -1, -1, -1,
+ 1, 2, 3, 4,
+ True, True, None)
+ self.assertIn('fds_to_keep', str(c.exception))
+ finally:
+ if not gc_enabled:
+ gc.disable()
+
+ def test_communicate_BrokenPipeError_stdin_close(self):
+ # By not setting stdout or stderr or a timeout we force the fast path
+ # that just calls _stdin_write() internally due to our mock.
+ proc = subprocess.Popen([sys.executable, '-c', 'pass'])
+ with proc, mock.patch.object(proc, 'stdin') as mock_proc_stdin:
+ mock_proc_stdin.close.side_effect = BrokenPipeError
+ proc.communicate() # Should swallow BrokenPipeError from close.
+ mock_proc_stdin.close.assert_called_with()
+
+ def test_communicate_BrokenPipeError_stdin_write(self):
+ # By not setting stdout or stderr or a timeout we force the fast path
+ # that just calls _stdin_write() internally due to our mock.
+ proc = subprocess.Popen([sys.executable, '-c', 'pass'])
+ with proc, mock.patch.object(proc, 'stdin') as mock_proc_stdin:
+ mock_proc_stdin.write.side_effect = BrokenPipeError
+ proc.communicate(b'stuff') # Should swallow the BrokenPipeError.
+ mock_proc_stdin.write.assert_called_once_with(b'stuff')
+ mock_proc_stdin.close.assert_called_once_with()
+
+ def test_communicate_BrokenPipeError_stdin_flush(self):
+ # Setting stdin and stdout forces the ._communicate() code path.
+ # python -h exits faster than python -c pass (but spams stdout).
+ proc = subprocess.Popen([sys.executable, '-h'],
+ stdin=subprocess.PIPE,
+ stdout=subprocess.PIPE)
+ with proc, mock.patch.object(proc, 'stdin') as mock_proc_stdin, \
+ open(os.devnull, 'wb') as dev_null:
+ mock_proc_stdin.flush.side_effect = BrokenPipeError
+ # because _communicate registers a selector using proc.stdin...
+ mock_proc_stdin.fileno.return_value = dev_null.fileno()
+ # _communicate() should swallow BrokenPipeError from flush.
+ proc.communicate(b'stuff')
+ mock_proc_stdin.flush.assert_called_once_with()
+
+ def test_communicate_BrokenPipeError_stdin_close_with_timeout(self):
+ # Setting stdin and stdout forces the ._communicate() code path.
+ # python -h exits faster than python -c pass (but spams stdout).
+ proc = subprocess.Popen([sys.executable, '-h'],
+ stdin=subprocess.PIPE,
+ stdout=subprocess.PIPE)
+ with proc, mock.patch.object(proc, 'stdin') as mock_proc_stdin:
+ mock_proc_stdin.close.side_effect = BrokenPipeError
+ # _communicate() should swallow BrokenPipeError from close.
+ proc.communicate(timeout=999)
+ mock_proc_stdin.close.assert_called_once_with()
@unittest.skipUnless(mswindows, "Windows specific tests")
@@ -2392,7 +2586,7 @@ class Win32ProcessTestCase(BaseTestCase):
def test_terminate_dead(self):
self._kill_dead_process('terminate')
-class CommandTests(unittest.TestCase):
+class MiscTests(unittest.TestCase):
def test_getoutput(self):
self.assertEqual(subprocess.getoutput('echo xyzzy'), 'xyzzy')
self.assertEqual(subprocess.getstatusoutput('echo xyzzy'),
@@ -2412,6 +2606,21 @@ class CommandTests(unittest.TestCase):
if dir is not None:
os.rmdir(dir)
+ def test__all__(self):
+ """Ensure that __all__ is populated properly."""
+ # STARTUPINFO added to __all__ in 3.6
+ intentionally_excluded = {"list2cmdline", "STARTUPINFO", "Handle"}
+ exported = set(subprocess.__all__)
+ possible_exports = set()
+ import types
+ for name, value in subprocess.__dict__.items():
+ if name.startswith('_'):
+ continue
+ if isinstance(value, (types.ModuleType,)):
+ continue
+ possible_exports.add(name)
+ self.assertEqual(exported, possible_exports - intentionally_excluded)
+
@unittest.skipUnless(hasattr(selectors, 'PollSelector'),
"Test needs selectors.PollSelector")
@@ -2426,25 +2635,6 @@ class ProcessTestCaseNoPoll(ProcessTestCase):
ProcessTestCase.tearDown(self)
-class HelperFunctionTests(unittest.TestCase):
- @unittest.skipIf(mswindows, "errno and EINTR make no sense on windows")
- def test_eintr_retry_call(self):
- record_calls = []
- def fake_os_func(*args):
- record_calls.append(args)
- if len(record_calls) == 2:
- raise OSError(errno.EINTR, "fake interrupted system call")
- return tuple(reversed(args))
-
- self.assertEqual((999, 256),
- subprocess._eintr_retry_call(fake_os_func, 256, 999))
- self.assertEqual([(256, 999)], record_calls)
- # This time there will be an EINTR so it will loop once.
- self.assertEqual((666,),
- subprocess._eintr_retry_call(fake_os_func, 666))
- self.assertEqual([(256, 999), (666,), (666,)], record_calls)
-
-
@unittest.skipUnless(mswindows, "Windows-specific tests")
class CommandsWithSpaces (BaseTestCase):
@@ -2547,11 +2737,11 @@ def test_main():
unit_tests = (ProcessTestCase,
POSIXProcessTestCase,
Win32ProcessTestCase,
- CommandTests,
+ MiscTests,
ProcessTestCaseNoPoll,
- HelperFunctionTests,
CommandsWithSpaces,
ContextManagerTests,
+ RunFuncTestCase,
)
support.run_unittest(*unit_tests)
diff --git a/Lib/test/test_sundry.py b/Lib/test/test_sundry.py
index e99ca9ed37..1fb9964698 100644
--- a/Lib/test/test_sundry.py
+++ b/Lib/test/test_sundry.py
@@ -22,8 +22,6 @@ class TestUntestedModules(unittest.TestCase):
import distutils.ccompiler
import distutils.cygwinccompiler
import distutils.filelist
- if sys.platform.startswith('win'):
- import distutils.msvccompiler
import distutils.text_file
import distutils.unixccompiler
diff --git a/Lib/test/test_super.py b/Lib/test/test_super.py
index 37fc2d9134..b84863fe53 100644
--- a/Lib/test/test_super.py
+++ b/Lib/test/test_super.py
@@ -2,7 +2,6 @@
import sys
import unittest
-from test import support
class A:
@@ -172,9 +171,14 @@ class TestSuper(unittest.TestCase):
c = f().__closure__[0]
self.assertRaises(TypeError, X.meth, c)
-
-def test_main():
- support.run_unittest(TestSuper)
+ def test_super_init_leaks(self):
+ # Issue #26718: super.__init__ leaked memory if called multiple times.
+ # This will be caught by regrtest.py -R if this leak.
+ # NOTE: Despite the use in the test a direct call of super.__init__
+ # is not endorsed.
+ sp = super(float, 1.0)
+ for i in range(1000):
+ super.__init__(sp, int, i)
if __name__ == "__main__":
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py
index 03ce9d1931..2c00417414 100644
--- a/Lib/test/test_support.py
+++ b/Lib/test/test_support.py
@@ -85,7 +85,7 @@ class TestSupport(unittest.TestCase):
def test_bind_port(self):
s = socket.socket()
support.bind_port(s)
- s.listen(1)
+ s.listen()
s.close()
# Tests for temp_dir()
@@ -280,6 +280,38 @@ class TestSupport(unittest.TestCase):
self.assertEqual(D["item"], 5)
self.assertEqual(D["item"], 1)
+ class RefClass:
+ attribute1 = None
+ attribute2 = None
+ _hidden_attribute1 = None
+ __magic_1__ = None
+
+ class OtherClass:
+ attribute2 = None
+ attribute3 = None
+ __magic_1__ = None
+ __magic_2__ = None
+
+ def test_detect_api_mismatch(self):
+ missing_items = support.detect_api_mismatch(self.RefClass,
+ self.OtherClass)
+ self.assertEqual({'attribute1'}, missing_items)
+
+ missing_items = support.detect_api_mismatch(self.OtherClass,
+ self.RefClass)
+ self.assertEqual({'attribute3', '__magic_2__'}, missing_items)
+
+ def test_detect_api_mismatch__ignore(self):
+ ignore = ['attribute1', 'attribute3', '__magic_2__', 'not_in_either']
+
+ missing_items = support.detect_api_mismatch(
+ self.RefClass, self.OtherClass, ignore=ignore)
+ self.assertEqual(set(), missing_items)
+
+ missing_items = support.detect_api_mismatch(
+ self.OtherClass, self.RefClass, ignore=ignore)
+ self.assertEqual(set(), missing_items)
+
# XXX -follows a list of untested API
# make_legacy_pyc
# is_resource_enabled
diff --git a/Lib/test/test_symtable.py b/Lib/test/test_symtable.py
index 335b4dc15f..e5e7b83d21 100644
--- a/Lib/test/test_symtable.py
+++ b/Lib/test/test_symtable.py
@@ -4,7 +4,6 @@ Test the API of the symtable module.
import symtable
import unittest
-from test import support
TEST_CODE = """
@@ -169,8 +168,5 @@ class SymtableTest(unittest.TestCase):
symbols = symtable.symtable("def f(x): return x", "?", "exec")
-def test_main():
- support.run_unittest(SymtableTest)
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py
index a9d3628819..057441c83c 100644
--- a/Lib/test/test_syntax.py
+++ b/Lib/test/test_syntax.py
@@ -141,6 +141,9 @@ From ast_for_call():
>>> f(x for x in L, 1)
Traceback (most recent call last):
SyntaxError: Generator expression must be parenthesized if not sole argument
+>>> f(x for x in L, y for y in L)
+Traceback (most recent call last):
+SyntaxError: Generator expression must be parenthesized if not sole argument
>>> f((x for x in L), 1)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
@@ -413,6 +416,14 @@ TODO(jhylton): Figure out how to test SyntaxWarning with doctest.
## ...
## SyntaxWarning: name 'x' is assigned to before nonlocal declaration
+ From https://bugs.python.org/issue25973
+ >>> class A:
+ ... def f(self):
+ ... nonlocal __x
+ Traceback (most recent call last):
+ ...
+ SyntaxError: no binding for nonlocal '_A__x' found
+
This tests assignment-context; there was a bug in Python 2.5 where compiling
a complex 'if' (one with 'elif') would fail to notice an invalid suite,
@@ -582,7 +593,18 @@ class SyntaxTestCase(unittest.TestCase):
subclass=IndentationError)
def test_kwargs_last(self):
- self._check_error("int(base=10, '2')", "non-keyword arg")
+ self._check_error("int(base=10, '2')",
+ "positional argument follows keyword argument")
+
+ def test_kwargs_last2(self):
+ self._check_error("int(**{base: 10}, '2')",
+ "positional argument follows "
+ "keyword argument unpacking")
+
+ def test_kwargs_last3(self):
+ self._check_error("int(**{base: 10}, *['2'])",
+ "iterable argument unpacking follows "
+ "keyword argument unpacking")
def test_main():
support.run_unittest(SyntaxTestCase)
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
index b7ddbe95cb..a531879552 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -1,5 +1,5 @@
import unittest, test.support
-from test.script_helper import assert_python_ok, assert_python_failure
+from test.support.script_helper import assert_python_ok, assert_python_failure
import sys, io, os
import struct
import subprocess
@@ -201,19 +201,57 @@ class SysModuleTest(unittest.TestCase):
if hasattr(sys, 'gettrace') and sys.gettrace():
self.skipTest('fatal error if run with a trace function')
- # NOTE: this test is slightly fragile in that it depends on the current
- # recursion count when executing the test being low enough so as to
- # trigger the recursion recovery detection in the _Py_MakeEndRecCheck
- # macro (see ceval.h).
oldlimit = sys.getrecursionlimit()
def f():
f()
try:
- for i in (50, 1000):
- # Issue #5392: stack overflow after hitting recursion limit twice
- sys.setrecursionlimit(i)
- self.assertRaises(RuntimeError, f)
- self.assertRaises(RuntimeError, f)
+ for depth in (10, 25, 50, 75, 100, 250, 1000):
+ try:
+ sys.setrecursionlimit(depth)
+ except RecursionError:
+ # Issue #25274: The recursion limit is too low at the
+ # current recursion depth
+ continue
+
+ # Issue #5392: test stack overflow after hitting recursion
+ # limit twice
+ self.assertRaises(RecursionError, f)
+ self.assertRaises(RecursionError, f)
+ finally:
+ sys.setrecursionlimit(oldlimit)
+
+ @test.support.cpython_only
+ def test_setrecursionlimit_recursion_depth(self):
+ # Issue #25274: Setting a low recursion limit must be blocked if the
+ # current recursion depth is already higher than the "lower-water
+ # mark". Otherwise, it may not be possible anymore to
+ # reset the overflowed flag to 0.
+
+ from _testcapi import get_recursion_depth
+
+ def set_recursion_limit_at_depth(depth, limit):
+ recursion_depth = get_recursion_depth()
+ if recursion_depth >= depth:
+ with self.assertRaises(RecursionError) as cm:
+ sys.setrecursionlimit(limit)
+ self.assertRegex(str(cm.exception),
+ "cannot set the recursion limit to [0-9]+ "
+ "at the recursion depth [0-9]+: "
+ "the limit is too low")
+ else:
+ set_recursion_limit_at_depth(depth, limit)
+
+ oldlimit = sys.getrecursionlimit()
+ try:
+ sys.setrecursionlimit(1000)
+
+ for limit in (10, 25, 50, 75, 100, 150, 200):
+ # formula extracted from _Py_RecursionLimitLowerWaterMark()
+ if limit > 200:
+ depth = limit - 50
+ else:
+ depth = limit * 3 // 4
+ set_recursion_limit_at_depth(depth, limit)
finally:
sys.setrecursionlimit(oldlimit)
@@ -226,7 +264,7 @@ class SysModuleTest(unittest.TestCase):
def f():
try:
f()
- except RuntimeError:
+ except RecursionError:
f()
sys.setrecursionlimit(%d)
@@ -606,7 +644,7 @@ class SysModuleTest(unittest.TestCase):
self.assertEqual(os.path.abspath(sys.executable), sys.executable)
# Issue #7774: Ensure that sys.executable is an empty string if argv[0]
- # has been set to an non existent program name and Python is unable to
+ # has been set to a non existent program name and Python is unable to
# retrieve the real program name
# For a normal installation, it should work without 'cwd'
@@ -637,6 +675,72 @@ class SysModuleTest(unittest.TestCase):
expected = None
self.check_fsencoding(fs_encoding, expected)
+ def c_locale_get_error_handler(self, isolated=False, encoding=None):
+ # Force the POSIX locale
+ env = os.environ.copy()
+ env["LC_ALL"] = "C"
+ code = '\n'.join((
+ 'import sys',
+ 'def dump(name):',
+ ' std = getattr(sys, name)',
+ ' print("%s: %s" % (name, std.errors))',
+ 'dump("stdin")',
+ 'dump("stdout")',
+ 'dump("stderr")',
+ ))
+ args = [sys.executable, "-c", code]
+ if isolated:
+ args.append("-I")
+ if encoding is not None:
+ env['PYTHONIOENCODING'] = encoding
+ else:
+ env.pop('PYTHONIOENCODING', None)
+ p = subprocess.Popen(args,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT,
+ env=env,
+ universal_newlines=True)
+ stdout, stderr = p.communicate()
+ return stdout
+
+ def test_c_locale_surrogateescape(self):
+ out = self.c_locale_get_error_handler(isolated=True)
+ self.assertEqual(out,
+ 'stdin: surrogateescape\n'
+ 'stdout: surrogateescape\n'
+ 'stderr: backslashreplace\n')
+
+ # replace the default error handler
+ out = self.c_locale_get_error_handler(encoding=':ignore')
+ self.assertEqual(out,
+ 'stdin: ignore\n'
+ 'stdout: ignore\n'
+ 'stderr: backslashreplace\n')
+
+ # force the encoding
+ out = self.c_locale_get_error_handler(encoding='iso8859-1')
+ self.assertEqual(out,
+ 'stdin: strict\n'
+ 'stdout: strict\n'
+ 'stderr: backslashreplace\n')
+ out = self.c_locale_get_error_handler(encoding='iso8859-1:')
+ self.assertEqual(out,
+ 'stdin: strict\n'
+ 'stdout: strict\n'
+ 'stderr: backslashreplace\n')
+
+ # have no any effect
+ out = self.c_locale_get_error_handler(encoding=':')
+ self.assertEqual(out,
+ 'stdin: surrogateescape\n'
+ 'stdout: surrogateescape\n'
+ 'stderr: backslashreplace\n')
+ out = self.c_locale_get_error_handler(encoding='')
+ self.assertEqual(out,
+ 'stdin: surrogateescape\n'
+ 'stdout: surrogateescape\n'
+ 'stderr: backslashreplace\n')
+
def test_implementation(self):
# This test applies to all implementations equally.
@@ -662,7 +766,7 @@ class SysModuleTest(unittest.TestCase):
@test.support.cpython_only
def test_debugmallocstats(self):
# Test sys._debugmallocstats()
- from test.script_helper import assert_python_ok
+ from test.support.script_helper import assert_python_ok
args = ['-c', 'import sys; sys._debugmallocstats()']
ret, out, err = assert_python_ok(*args)
self.assertIn(b"free PyDictObjects", err)
@@ -699,6 +803,27 @@ class SysModuleTest(unittest.TestCase):
c = sys.getallocatedblocks()
self.assertIn(c, range(b - 50, b + 50))
+ def test_is_finalizing(self):
+ self.assertIs(sys.is_finalizing(), False)
+ # Don't use the atexit module because _Py_Finalizing is only set
+ # after calling atexit callbacks
+ code = """if 1:
+ import sys
+
+ class AtExit:
+ is_finalizing = sys.is_finalizing
+ print = print
+
+ def __del__(self):
+ self.print(self.is_finalizing(), flush=True)
+
+ # Keep a reference in the __main__ module namespace, so the
+ # AtExit destructor will be called at Python exit
+ ref = AtExit()
+ """
+ rc, stdout, stderr = assert_python_ok('-c', code)
+ self.assertEqual(stdout.rstrip(), b'True')
+
@test.support.cpython_only
class SizeofTest(unittest.TestCase):
@@ -708,11 +833,6 @@ class SizeofTest(unittest.TestCase):
self.longdigit = sys.int_info.sizeof_digit
import _testcapi
self.gc_headsize = _testcapi.SIZEOF_PYGC_HEAD
- self.file = open(test.support.TESTFN, 'wb')
-
- def tearDown(self):
- self.file.close()
- test.support.unlink(test.support.TESTFN)
check_sizeof = test.support.check_sizeof
@@ -763,6 +883,7 @@ class SizeofTest(unittest.TestCase):
def test_objecttypes(self):
# check all types defined in Objects/
+ calcsize = struct.calcsize
size = test.support.calcobjsize
vsize = test.support.calcvobjsize
check = self.check_sizeof
@@ -771,7 +892,7 @@ class SizeofTest(unittest.TestCase):
# buffer
# XXX
# builtin_function_or_method
- check(len, size('3P')) # XXX check layout
+ check(len, size('4P')) # XXX check layout
# bytearray
samples = [b'', b'u'*100000]
for sample in samples:
@@ -814,17 +935,23 @@ class SizeofTest(unittest.TestCase):
# method-wrapper (descriptor object)
check({}.__iter__, size('2P'))
# dict
- check({}, size('n2P' + '2nPn' + 8*'n2P'))
+ check({}, size('n2P') + calcsize('2nPn') + 8*calcsize('n2P'))
longdict = {1:1, 2:2, 3:3, 4:4, 5:5, 6:6, 7:7, 8:8}
- check(longdict, size('n2P' + '2nPn') + 16*struct.calcsize('n2P'))
- # dictionary-keyiterator
+ check(longdict, size('n2P') + calcsize('2nPn') + 16*calcsize('n2P'))
+ # dictionary-keyview
check({}.keys(), size('P'))
- # dictionary-valueiterator
+ # dictionary-valueview
check({}.values(), size('P'))
- # dictionary-itemiterator
+ # dictionary-itemview
check({}.items(), size('P'))
# dictionary iterator
check(iter({}), size('P2nPn'))
+ # dictionary-keyiterator
+ check(iter({}.keys()), size('P2nPn'))
+ # dictionary-valueiterator
+ check(iter({}.values()), size('P2nPn'))
+ # dictionary-itemiterator
+ check(iter({}.items()), size('P2nPn'))
# dictproxy
class C(object): pass
check(C.__dict__, size('P'))
@@ -875,7 +1002,7 @@ class SizeofTest(unittest.TestCase):
check(bar, size('PP'))
# generator
def get_gen(): yield 1
- check(get_gen(), size('Pb2P'))
+ check(get_gen(), size('Pb2PPP'))
# iterator
check(iter('abc'), size('lP'))
# callable-iterator
@@ -929,7 +1056,7 @@ class SizeofTest(unittest.TestCase):
# frozenset
PySet_MINSIZE = 8
samples = [[], range(10), range(50)]
- s = size('3n2P' + PySet_MINSIZE*'nP' + 'nP')
+ s = size('3nP' + PySet_MINSIZE*'nP' + '2nP')
for sample in samples:
minused = len(sample)
if minused == 0: tmp = 1
@@ -943,8 +1070,8 @@ class SizeofTest(unittest.TestCase):
check(set(sample), s)
check(frozenset(sample), s)
else:
- check(set(sample), s + newsize*struct.calcsize('nP'))
- check(frozenset(sample), s + newsize*struct.calcsize('nP'))
+ check(set(sample), s + newsize*calcsize('nP'))
+ check(frozenset(sample), s + newsize*calcsize('nP'))
# setiterator
check(iter(set()), size('P3n'))
# slice
@@ -958,11 +1085,15 @@ class SizeofTest(unittest.TestCase):
# static type: PyTypeObject
s = vsize('P2n15Pl4Pn9Pn11PIP')
check(int, s)
- # (PyTypeObject + PyNumberMethods + PyMappingMethods +
- # PySequenceMethods + PyBufferProcs + 4P)
- s = vsize('P2n15Pl4Pn9Pn11PIP') + struct.calcsize('34P 3P 10P 2P 4P')
+ s = vsize('P2n15Pl4Pn9Pn11PIP' # PyTypeObject
+ '3P' # PyAsyncMethods
+ '36P' # PyNumberMethods
+ '3P' # PyMappingMethods
+ '10P' # PySequenceMethods
+ '2P' # PyBufferProcs
+ '4P')
# Separate block for PyDictKeysObject with 4 entries
- s += struct.calcsize("2nPn") + 4*struct.calcsize("n2P")
+ s += calcsize("2nPn") + 4*calcsize("n2P")
# class
class newstyleclass(object): pass
check(newstyleclass, s)
@@ -1006,6 +1137,36 @@ class SizeofTest(unittest.TestCase):
# weakcallableproxy
check(weakref.proxy(int), size('2Pn2P'))
+ def check_slots(self, obj, base, extra):
+ expected = sys.getsizeof(base) + struct.calcsize(extra)
+ if gc.is_tracked(obj) and not gc.is_tracked(base):
+ expected += self.gc_headsize
+ self.assertEqual(sys.getsizeof(obj), expected)
+
+ def test_slots(self):
+ # check all subclassable types defined in Objects/ that allow
+ # non-empty __slots__
+ check = self.check_slots
+ class BA(bytearray):
+ __slots__ = 'a', 'b', 'c'
+ check(BA(), bytearray(), '3P')
+ class D(dict):
+ __slots__ = 'a', 'b', 'c'
+ check(D(x=[]), {'x': []}, '3P')
+ class L(list):
+ __slots__ = 'a', 'b', 'c'
+ check(L(), [], '3P')
+ class S(set):
+ __slots__ = 'a', 'b', 'c'
+ check(S(), set(), '3P')
+ class FS(frozenset):
+ __slots__ = 'a', 'b', 'c'
+ check(FS(), frozenset(), '3P')
+ from collections import OrderedDict
+ class OD(OrderedDict):
+ __slots__ = 'a', 'b', 'c'
+ check(OD(x=[]), OrderedDict(x=[]), '3P')
+
def test_pythontypes(self):
# check all types defined in Python/
size = test.support.calcobjsize
diff --git a/Lib/test/test_sys_setprofile.py b/Lib/test/test_sys_setprofile.py
index 9816e3ed64..a3e1d31fbe 100644
--- a/Lib/test/test_sys_setprofile.py
+++ b/Lib/test/test_sys_setprofile.py
@@ -3,7 +3,6 @@ import pprint
import sys
import unittest
-from test import support
class TestGetProfile(unittest.TestCase):
def setUp(self):
@@ -165,7 +164,7 @@ class ProfileHookTestCase(TestCaseBase):
(1, 'return', g_ident),
])
- def test_exception_propogation(self):
+ def test_exception_propagation(self):
def f(p):
1/0
def g(p):
@@ -260,7 +259,6 @@ class ProfileHookTestCase(TestCaseBase):
def f():
for i in range(2):
yield i
- raise StopIteration
def g(p):
for i in f():
pass
@@ -374,13 +372,5 @@ def show_events(callable):
pprint.pprint(capture_events(callable))
-def test_main():
- support.run_unittest(
- TestGetProfile,
- ProfileHookTestCase,
- ProfileSimulatorTestCase
- )
-
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_sys_settrace.py b/Lib/test/test_sys_settrace.py
index ae8f845ee1..509bc3e505 100644
--- a/Lib/test/test_sys_settrace.py
+++ b/Lib/test/test_sys_settrace.py
@@ -388,6 +388,15 @@ class TraceTestCase(unittest.TestCase):
(257, 'line'),
(257, 'return')])
+ def test_17_none_f_trace(self):
+ # Issue 20041: fix TypeError when f_trace is set to None.
+ def func():
+ sys._getframe().f_trace = None
+ lineno = 2
+ self.run_and_compare(func,
+ [(0, 'call'),
+ (1, 'line')])
+
class RaisingTraceFuncTestCase(unittest.TestCase):
def setUp(self):
diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py
index 8ed729a2b5..a23bf06af8 100644
--- a/Lib/test/test_sysconfig.py
+++ b/Lib/test/test_sysconfig.py
@@ -385,6 +385,25 @@ class TestSysConfig(unittest.TestCase):
self.assertIsNotNone(vars['SO'])
self.assertEqual(vars['SO'], vars['EXT_SUFFIX'])
+ @unittest.skipUnless(sys.platform == 'linux', 'Linux-specific test')
+ def test_triplet_in_ext_suffix(self):
+ import ctypes, platform, re
+ machine = platform.machine()
+ suffix = sysconfig.get_config_var('EXT_SUFFIX')
+ if re.match('(aarch64|arm|mips|ppc|powerpc|s390|sparc)', machine):
+ self.assertTrue('linux' in suffix, suffix)
+ if re.match('(i[3-6]86|x86_64)$', machine):
+ if ctypes.sizeof(ctypes.c_char_p()) == 4:
+ self.assertTrue(suffix.endswith('i386-linux-gnu.so') \
+ or suffix.endswith('x86_64-linux-gnux32.so'),
+ suffix)
+ else: # 8 byte pointer size
+ self.assertTrue(suffix.endswith('x86_64-linux-gnu.so'), suffix)
+
+ @unittest.skipUnless(sys.platform == 'darwin', 'OS X-specific test')
+ def test_osx_ext_suffix(self):
+ suffix = sysconfig.get_config_var('EXT_SUFFIX')
+ self.assertTrue(suffix.endswith('-darwin.so'), suffix)
class MakefileTests(unittest.TestCase):
@@ -402,6 +421,8 @@ class MakefileTests(unittest.TestCase):
print("var3=42", file=makefile)
print("var4=$/invalid", file=makefile)
print("var5=dollar$$5", file=makefile)
+ print("var6=${var3}/lib/python3.5/config-$(VAR2)$(var5)"
+ "-x86_64-linux-gnu", file=makefile)
vars = sysconfig._parse_makefile(TESTFN)
self.assertEqual(vars, {
'var1': 'ab42',
@@ -409,6 +430,7 @@ class MakefileTests(unittest.TestCase):
'var3': 42,
'var4': '$/invalid',
'var5': 'dollar$5',
+ 'var6': '42/lib/python3.5/config-b42dollar$5-x86_64-linux-gnu',
})
diff --git a/Lib/test/test_syslog.py b/Lib/test/test_syslog.py
index b7fd2bdabb..6f902f1049 100644
--- a/Lib/test/test_syslog.py
+++ b/Lib/test/test_syslog.py
@@ -36,8 +36,5 @@ class Test(unittest.TestCase):
syslog.openlog()
syslog.syslog('test message from python test_syslog')
-def test_main():
- support.run_unittest(__name__)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py
index 3091ce77cb..abfb34dfb8 100644
--- a/Lib/test/test_tarfile.py
+++ b/Lib/test/test_tarfile.py
@@ -2,11 +2,14 @@ import sys
import os
import io
from hashlib import md5
+from contextlib import contextmanager
import unittest
+import unittest.mock
import tarfile
-from test import support, script_helper
+from test import support
+from test.support import script_helper
# Check for our compression modules.
try:
@@ -285,6 +288,18 @@ class ListTest(ReadTest, unittest.TestCase):
self.assertIn(b'pax' + (b'/123' * 125) + b'/longlink link to pax' +
(b'/123' * 125) + b'/longname', out)
+ def test_list_members(self):
+ tio = io.TextIOWrapper(io.BytesIO(), 'ascii', newline='\n')
+ def members(tar):
+ for tarinfo in tar.getmembers():
+ if 'reg' in tarinfo.name:
+ yield tarinfo
+ with support.swap_attr(sys, 'stdout', tio):
+ self.tar.list(verbose=False, members=members(self.tar))
+ out = tio.detach().getvalue()
+ self.assertIn(b'ustar/regtype', out)
+ self.assertNotIn(b'ustar/conttype', out)
+
class GzipListTest(GzipTest, ListTest):
pass
@@ -990,6 +1005,19 @@ class WriteTestBase(TarTest):
self.assertFalse(fobj.closed)
self.assertEqual(data, fobj.getvalue())
+ def test_eof_marker(self):
+ # Make sure an end of archive marker is written (two zero blocks).
+ # tarfile insists on aligning archives to a 20 * 512 byte recordsize.
+ # So, we create an archive that has exactly 10240 bytes without the
+ # marker, and has 20480 bytes once the marker is written.
+ with tarfile.open(tmpname, self.mode) as tar:
+ t = tarfile.TarInfo("foo")
+ t.size = tarfile.RECORDSIZE - tarfile.BLOCKSIZE
+ tar.addfile(t, io.BytesIO(b"a" * t.size))
+
+ with self.open(tmpname, "rb") as fobj:
+ self.assertEqual(len(fobj.read()), tarfile.RECORDSIZE * 2)
+
class WriteTest(WriteTestBase, unittest.TestCase):
@@ -1433,6 +1461,88 @@ class GNUWriteTest(unittest.TestCase):
("longlnk/" * 127) + "longlink_")
+class CreateTest(WriteTestBase, unittest.TestCase):
+
+ prefix = "x:"
+
+ file_path = os.path.join(TEMPDIR, "spameggs42")
+
+ def setUp(self):
+ support.unlink(tmpname)
+
+ @classmethod
+ def setUpClass(cls):
+ with open(cls.file_path, "wb") as fobj:
+ fobj.write(b"aaa")
+
+ @classmethod
+ def tearDownClass(cls):
+ support.unlink(cls.file_path)
+
+ def test_create(self):
+ with tarfile.open(tmpname, self.mode) as tobj:
+ tobj.add(self.file_path)
+
+ with self.taropen(tmpname) as tobj:
+ names = tobj.getnames()
+ self.assertEqual(len(names), 1)
+ self.assertIn('spameggs42', names[0])
+
+ def test_create_existing(self):
+ with tarfile.open(tmpname, self.mode) as tobj:
+ tobj.add(self.file_path)
+
+ with self.assertRaises(FileExistsError):
+ tobj = tarfile.open(tmpname, self.mode)
+
+ with self.taropen(tmpname) as tobj:
+ names = tobj.getnames()
+ self.assertEqual(len(names), 1)
+ self.assertIn('spameggs42', names[0])
+
+ def test_create_taropen(self):
+ with self.taropen(tmpname, "x") as tobj:
+ tobj.add(self.file_path)
+
+ with self.taropen(tmpname) as tobj:
+ names = tobj.getnames()
+ self.assertEqual(len(names), 1)
+ self.assertIn('spameggs42', names[0])
+
+ def test_create_existing_taropen(self):
+ with self.taropen(tmpname, "x") as tobj:
+ tobj.add(self.file_path)
+
+ with self.assertRaises(FileExistsError):
+ with self.taropen(tmpname, "x"):
+ pass
+
+ with self.taropen(tmpname) as tobj:
+ names = tobj.getnames()
+ self.assertEqual(len(names), 1)
+ self.assertIn("spameggs42", names[0])
+
+
+class GzipCreateTest(GzipTest, CreateTest):
+ pass
+
+
+class Bz2CreateTest(Bz2Test, CreateTest):
+ pass
+
+
+class LzmaCreateTest(LzmaTest, CreateTest):
+ pass
+
+
+class CreateWithXModeTest(CreateTest):
+
+ prefix = "x"
+
+ test_create_taropen = None
+ test_create_existing_taropen = None
+
+
@unittest.skipUnless(hasattr(os, "link"), "Missing hardlink implementation")
class HardlinkTest(unittest.TestCase):
# Test the creation of LNKTYPE (hardlink) members in an archive.
@@ -1557,9 +1667,7 @@ class PaxWriteTest(GNUWriteTest):
tar.close()
-class UstarUnicodeTest(unittest.TestCase):
-
- format = tarfile.USTAR_FORMAT
+class UnicodeTest:
def test_iso8859_1_filename(self):
self._test_unicode_filename("iso8859-1")
@@ -1640,7 +1748,86 @@ class UstarUnicodeTest(unittest.TestCase):
tar.close()
-class GNUUnicodeTest(UstarUnicodeTest):
+class UstarUnicodeTest(UnicodeTest, unittest.TestCase):
+
+ format = tarfile.USTAR_FORMAT
+
+ # Test whether the utf-8 encoded version of a filename exceeds the 100
+ # bytes name field limit (every occurrence of '\xff' will be expanded to 2
+ # bytes).
+ def test_unicode_name1(self):
+ self._test_ustar_name("0123456789" * 10)
+ self._test_ustar_name("0123456789" * 10 + "0", ValueError)
+ self._test_ustar_name("0123456789" * 9 + "01234567\xff")
+ self._test_ustar_name("0123456789" * 9 + "012345678\xff", ValueError)
+
+ def test_unicode_name2(self):
+ self._test_ustar_name("0123456789" * 9 + "012345\xff\xff")
+ self._test_ustar_name("0123456789" * 9 + "0123456\xff\xff", ValueError)
+
+ # Test whether the utf-8 encoded version of a filename exceeds the 155
+ # bytes prefix + '/' + 100 bytes name limit.
+ def test_unicode_longname1(self):
+ self._test_ustar_name("0123456789" * 15 + "01234/" + "0123456789" * 10)
+ self._test_ustar_name("0123456789" * 15 + "0123/4" + "0123456789" * 10, ValueError)
+ self._test_ustar_name("0123456789" * 15 + "012\xff/" + "0123456789" * 10)
+ self._test_ustar_name("0123456789" * 15 + "0123\xff/" + "0123456789" * 10, ValueError)
+
+ def test_unicode_longname2(self):
+ self._test_ustar_name("0123456789" * 15 + "01\xff/2" + "0123456789" * 10, ValueError)
+ self._test_ustar_name("0123456789" * 15 + "01\xff\xff/" + "0123456789" * 10, ValueError)
+
+ def test_unicode_longname3(self):
+ self._test_ustar_name("0123456789" * 15 + "01\xff\xff/2" + "0123456789" * 10, ValueError)
+ self._test_ustar_name("0123456789" * 15 + "01234/" + "0123456789" * 9 + "01234567\xff")
+ self._test_ustar_name("0123456789" * 15 + "01234/" + "0123456789" * 9 + "012345678\xff", ValueError)
+
+ def test_unicode_longname4(self):
+ self._test_ustar_name("0123456789" * 15 + "01234/" + "0123456789" * 9 + "012345\xff\xff")
+ self._test_ustar_name("0123456789" * 15 + "01234/" + "0123456789" * 9 + "0123456\xff\xff", ValueError)
+
+ def _test_ustar_name(self, name, exc=None):
+ with tarfile.open(tmpname, "w", format=self.format, encoding="utf-8") as tar:
+ t = tarfile.TarInfo(name)
+ if exc is None:
+ tar.addfile(t)
+ else:
+ self.assertRaises(exc, tar.addfile, t)
+
+ if exc is None:
+ with tarfile.open(tmpname, "r", encoding="utf-8") as tar:
+ for t in tar:
+ self.assertEqual(name, t.name)
+ break
+
+ # Test the same as above for the 100 bytes link field.
+ def test_unicode_link1(self):
+ self._test_ustar_link("0123456789" * 10)
+ self._test_ustar_link("0123456789" * 10 + "0", ValueError)
+ self._test_ustar_link("0123456789" * 9 + "01234567\xff")
+ self._test_ustar_link("0123456789" * 9 + "012345678\xff", ValueError)
+
+ def test_unicode_link2(self):
+ self._test_ustar_link("0123456789" * 9 + "012345\xff\xff")
+ self._test_ustar_link("0123456789" * 9 + "0123456\xff\xff", ValueError)
+
+ def _test_ustar_link(self, name, exc=None):
+ with tarfile.open(tmpname, "w", format=self.format, encoding="utf-8") as tar:
+ t = tarfile.TarInfo("foo")
+ t.linkname = name
+ if exc is None:
+ tar.addfile(t)
+ else:
+ self.assertRaises(exc, tar.addfile, t)
+
+ if exc is None:
+ with tarfile.open(tmpname, "r", encoding="utf-8") as tar:
+ for t in tar:
+ self.assertEqual(name, t.linkname)
+ break
+
+
+class GNUUnicodeTest(UnicodeTest, unittest.TestCase):
format = tarfile.GNU_FORMAT
@@ -1658,7 +1845,7 @@ class GNUUnicodeTest(UstarUnicodeTest):
self.fail("unable to read bad GNU tar pax header")
-class PAXUnicodeTest(UstarUnicodeTest):
+class PAXUnicodeTest(UnicodeTest, unittest.TestCase):
format = tarfile.PAX_FORMAT
@@ -2191,6 +2378,138 @@ class Bz2PartialReadTest(Bz2Test, unittest.TestCase):
self._test_partial_input("r:bz2")
+def root_is_uid_gid_0():
+ try:
+ import pwd, grp
+ except ImportError:
+ return False
+ if pwd.getpwuid(0)[0] != 'root':
+ return False
+ if grp.getgrgid(0)[0] != 'root':
+ return False
+ return True
+
+
+@unittest.skipUnless(hasattr(os, 'chown'), "missing os.chown")
+@unittest.skipUnless(hasattr(os, 'geteuid'), "missing os.geteuid")
+class NumericOwnerTest(unittest.TestCase):
+ # mock the following:
+ # os.chown: so we can test what's being called
+ # os.chmod: so the modes are not actually changed. if they are, we can't
+ # delete the files/directories
+ # os.geteuid: so we can lie and say we're root (uid = 0)
+
+ @staticmethod
+ def _make_test_archive(filename_1, dirname_1, filename_2):
+ # the file contents to write
+ fobj = io.BytesIO(b"content")
+
+ # create a tar file with a file, a directory, and a file within that
+ # directory. Assign various .uid/.gid values to them
+ items = [(filename_1, 99, 98, tarfile.REGTYPE, fobj),
+ (dirname_1, 77, 76, tarfile.DIRTYPE, None),
+ (filename_2, 88, 87, tarfile.REGTYPE, fobj),
+ ]
+ with tarfile.open(tmpname, 'w') as tarfl:
+ for name, uid, gid, typ, contents in items:
+ t = tarfile.TarInfo(name)
+ t.uid = uid
+ t.gid = gid
+ t.uname = 'root'
+ t.gname = 'root'
+ t.type = typ
+ tarfl.addfile(t, contents)
+
+ # return the full pathname to the tar file
+ return tmpname
+
+ @staticmethod
+ @contextmanager
+ def _setup_test(mock_geteuid):
+ mock_geteuid.return_value = 0 # lie and say we're root
+ fname = 'numeric-owner-testfile'
+ dirname = 'dir'
+
+ # the names we want stored in the tarfile
+ filename_1 = fname
+ dirname_1 = dirname
+ filename_2 = os.path.join(dirname, fname)
+
+ # create the tarfile with the contents we're after
+ tar_filename = NumericOwnerTest._make_test_archive(filename_1,
+ dirname_1,
+ filename_2)
+
+ # open the tarfile for reading. yield it and the names of the items
+ # we stored into the file
+ with tarfile.open(tar_filename) as tarfl:
+ yield tarfl, filename_1, dirname_1, filename_2
+
+ @unittest.mock.patch('os.chown')
+ @unittest.mock.patch('os.chmod')
+ @unittest.mock.patch('os.geteuid')
+ def test_extract_with_numeric_owner(self, mock_geteuid, mock_chmod,
+ mock_chown):
+ with self._setup_test(mock_geteuid) as (tarfl, filename_1, _,
+ filename_2):
+ tarfl.extract(filename_1, TEMPDIR, numeric_owner=True)
+ tarfl.extract(filename_2 , TEMPDIR, numeric_owner=True)
+
+ # convert to filesystem paths
+ f_filename_1 = os.path.join(TEMPDIR, filename_1)
+ f_filename_2 = os.path.join(TEMPDIR, filename_2)
+
+ mock_chown.assert_has_calls([unittest.mock.call(f_filename_1, 99, 98),
+ unittest.mock.call(f_filename_2, 88, 87),
+ ],
+ any_order=True)
+
+ @unittest.mock.patch('os.chown')
+ @unittest.mock.patch('os.chmod')
+ @unittest.mock.patch('os.geteuid')
+ def test_extractall_with_numeric_owner(self, mock_geteuid, mock_chmod,
+ mock_chown):
+ with self._setup_test(mock_geteuid) as (tarfl, filename_1, dirname_1,
+ filename_2):
+ tarfl.extractall(TEMPDIR, numeric_owner=True)
+
+ # convert to filesystem paths
+ f_filename_1 = os.path.join(TEMPDIR, filename_1)
+ f_dirname_1 = os.path.join(TEMPDIR, dirname_1)
+ f_filename_2 = os.path.join(TEMPDIR, filename_2)
+
+ mock_chown.assert_has_calls([unittest.mock.call(f_filename_1, 99, 98),
+ unittest.mock.call(f_dirname_1, 77, 76),
+ unittest.mock.call(f_filename_2, 88, 87),
+ ],
+ any_order=True)
+
+ # this test requires that uid=0 and gid=0 really be named 'root'. that's
+ # because the uname and gname in the test file are 'root', and extract()
+ # will look them up using pwd and grp to find their uid and gid, which we
+ # test here to be 0.
+ @unittest.skipUnless(root_is_uid_gid_0(),
+ 'uid=0,gid=0 must be named "root"')
+ @unittest.mock.patch('os.chown')
+ @unittest.mock.patch('os.chmod')
+ @unittest.mock.patch('os.geteuid')
+ def test_extract_without_numeric_owner(self, mock_geteuid, mock_chmod,
+ mock_chown):
+ with self._setup_test(mock_geteuid) as (tarfl, filename_1, _, _):
+ tarfl.extract(filename_1, TEMPDIR, numeric_owner=False)
+
+ # convert to filesystem paths
+ f_filename_1 = os.path.join(TEMPDIR, filename_1)
+
+ mock_chown.assert_called_with(f_filename_1, 0, 0)
+
+ @unittest.mock.patch('os.geteuid')
+ def test_keyword_only(self, mock_geteuid):
+ with self._setup_test(mock_geteuid) as (tarfl, filename_1, _, _):
+ self.assertRaises(TypeError,
+ tarfl.extract, filename_1, TEMPDIR, False, True)
+
+
def setUpModule():
support.unlink(TEMPDIR)
os.makedirs(TEMPDIR)
diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py
index b6565631b7..8ffd185314 100644
--- a/Lib/test/test_tcl.py
+++ b/Lib/test/test_tcl.py
@@ -8,9 +8,7 @@ from test import support
# Skip this test if the _tkinter module wasn't built.
_tkinter = support.import_module('_tkinter')
-# Make sure tkinter._fix runs to set up the environment
-tkinter = support.import_fresh_module('tkinter')
-
+import tkinter
from tkinter import Tcl
from _tkinter import TclError
@@ -131,9 +129,7 @@ class TclTest(unittest.TestCase):
self.assertRaises(TclError,tcl.unsetvar,'a')
def get_integers(self):
- integers = (0, 1, -1, 2**31-1, -2**31)
- if tcl_version >= (8, 4): # wideInt was added in Tcl 8.4
- integers += (2**31, -2**31-1, 2**63-1, -2**63)
+ integers = (0, 1, -1, 2**31-1, -2**31, 2**31, -2**31-1, 2**63-1, -2**63)
# bignum was added in Tcl 8.5, but its support is able only since 8.5.8
if (get_tk_patchlevel() >= (8, 6, 0, 'final') or
(8, 5, 8) <= get_tk_patchlevel() < (8, 6)):
@@ -166,10 +162,10 @@ class TclTest(unittest.TestCase):
self.assertEqual(tcl.getdouble(' 42 '), 42.0)
self.assertEqual(tcl.getdouble(' 42.5 '), 42.5)
self.assertEqual(tcl.getdouble(42.5), 42.5)
+ self.assertEqual(tcl.getdouble(42), 42.0)
self.assertRaises(TypeError, tcl.getdouble)
self.assertRaises(TypeError, tcl.getdouble, '42.5', '10')
self.assertRaises(TypeError, tcl.getdouble, b'42.5')
- self.assertRaises(TypeError, tcl.getdouble, 42)
self.assertRaises(TclError, tcl.getdouble, 'a')
self.assertRaises((TypeError, ValueError, TclError),
tcl.getdouble, '42.5\0')
@@ -464,6 +460,8 @@ class TclTest(unittest.TestCase):
# XXX NaN representation can be not parsable by float()
self.assertEqual(passValue((1, '2', (3.4,))),
(1, '2', (3.4,)) if self.wantobjects else '1 2 3.4')
+ self.assertEqual(passValue(['a', ['b', 'c']]),
+ ('a', ('b', 'c')) if self.wantobjects else 'a {b c}')
def test_user_command(self):
result = None
@@ -517,6 +515,7 @@ class TclTest(unittest.TestCase):
# XXX NaN representation can be not parsable by float()
check((), '')
check((1, (2,), (3, 4), '5 6', ()), '1 2 {3 4} {5 6} {}')
+ check([1, [2,], [3, 4], '5 6', []], '1 2 {3 4} {5 6} {}')
def test_splitlist(self):
splitlist = self.interp.tk.splitlist
@@ -542,12 +541,15 @@ class TclTest(unittest.TestCase):
('a 3.4', ('a', '3.4')),
(('a', 3.4), ('a', 3.4)),
((), ()),
+ ([], ()),
+ (['a', ['b', 'c']], ('a', ['b', 'c'])),
(call('list', 1, '2', (3.4,)),
(1, '2', (3.4,)) if self.wantobjects else
('1', '2', '3.4')),
]
+ tk_patchlevel = get_tk_patchlevel()
if tcl_version >= (8, 5):
- if not self.wantobjects or get_tk_patchlevel() < (8, 5, 5):
+ if not self.wantobjects or tk_patchlevel < (8, 5, 5):
# Before 8.5.5 dicts were converted to lists through string
expected = ('12', '\u20ac', '\xe2\x82\xac', '3.4')
else:
@@ -556,8 +558,11 @@ class TclTest(unittest.TestCase):
(call('dict', 'create', 12, '\u20ac', b'\xe2\x82\xac', (3.4,)),
expected),
]
+ dbg_info = ('want objects? %s, Tcl version: %s, Tk patchlevel: %s'
+ % (self.wantobjects, tcl_version, tk_patchlevel))
for arg, res in testcases:
- self.assertEqual(splitlist(arg), res, msg=arg)
+ self.assertEqual(splitlist(arg), res,
+ 'arg=%a, %s' % (arg, dbg_info))
self.assertRaises(TclError, splitlist, '{')
def test_split(self):
@@ -589,6 +594,9 @@ class TclTest(unittest.TestCase):
(('a', 3.4), ('a', 3.4)),
(('a', (2, 3.4)), ('a', (2, 3.4))),
((), ()),
+ ([], ()),
+ (['a', 'b c'], ('a', ('b', 'c'))),
+ (['a', ['b', 'c']], ('a', ('b', 'c'))),
(call('list', 1, '2', (3.4,)),
(1, '2', (3.4,)) if self.wantobjects else
('1', '2', '3.4')),
@@ -641,6 +649,8 @@ class TclTest(unittest.TestCase):
expected = {'a': (1, 2, 3), 'something': 'foo', 'status': ''}
self.assertEqual(splitdict(tcl, arg), expected)
+ def test_new_tcl_obj(self):
+ self.assertRaises(TypeError, _tkinter.Tcl_Obj)
class BigmemTclTest(unittest.TestCase):
diff --git a/Lib/test/test_telnetlib.py b/Lib/test/test_telnetlib.py
index ee1c35705b..8e219f4217 100644
--- a/Lib/test/test_telnetlib.py
+++ b/Lib/test/test_telnetlib.py
@@ -4,14 +4,14 @@ import telnetlib
import time
import contextlib
-from unittest import TestCase
from test import support
+import unittest
threading = support.import_module('threading')
HOST = support.HOST
def server(evt, serv):
- serv.listen(5)
+ serv.listen()
evt.set()
try:
conn, addr = serv.accept()
@@ -21,7 +21,7 @@ def server(evt, serv):
finally:
serv.close()
-class GeneralTests(TestCase):
+class GeneralTests(unittest.TestCase):
def setUp(self):
self.evt = threading.Event()
@@ -165,7 +165,7 @@ def test_telnet(reads=(), cls=TelnetAlike):
telnet._messages = '' # debuglevel output
return telnet
-class ExpectAndReadTestCase(TestCase):
+class ExpectAndReadTestCase(unittest.TestCase):
def setUp(self):
self.old_selector = telnetlib._TelnetSelector
telnetlib._TelnetSelector = MockSelector
@@ -237,8 +237,8 @@ class ReadTests(ExpectAndReadTestCase):
self.assertEqual(data, want)
def test_read_eager(self):
- # read_eager and read_very_eager make the same gaurantees
- # (they behave differently but we only test the gaurantees)
+ # read_eager and read_very_eager make the same guarantees
+ # (they behave differently but we only test the guarantees)
self._read_eager('read_eager')
self._read_eager('read_very_eager')
# NB -- we need to test the IAC block which is mentioned in the
@@ -284,7 +284,7 @@ class nego_collector(object):
tl = telnetlib
-class WriteTests(TestCase):
+class WriteTests(unittest.TestCase):
'''The only thing that write does is replace each tl.IAC for
tl.IAC+tl.IAC'''
@@ -300,7 +300,7 @@ class WriteTests(TestCase):
written = b''.join(telnet.sock.writes)
self.assertEqual(data.replace(tl.IAC,tl.IAC+tl.IAC), written)
-class OptionTests(TestCase):
+class OptionTests(unittest.TestCase):
# RFC 854 commands
cmds = [tl.AO, tl.AYT, tl.BRK, tl.EC, tl.EL, tl.GA, tl.IP, tl.NOP]
@@ -393,9 +393,5 @@ class ExpectTests(ExpectAndReadTestCase):
self.assertEqual(data, b''.join(want[:-1]))
-def test_main(verbose=None):
- support.run_unittest(GeneralTests, ReadTests, WriteTests, OptionTests,
- ExpectTests)
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_tempfile.py b/Lib/test/test_tempfile.py
index 66412980f6..51df1ecd7d 100644
--- a/Lib/test/test_tempfile.py
+++ b/Lib/test/test_tempfile.py
@@ -12,7 +12,8 @@ import weakref
from unittest import mock
import unittest
-from test import support, script_helper
+from test import support
+from test.support import script_helper
if hasattr(os, 'stat'):
@@ -35,10 +36,38 @@ else:
# in order of their appearance in the file. Testing which requires
# threads is not done here.
+class TestLowLevelInternals(unittest.TestCase):
+ def test_infer_return_type_singles(self):
+ self.assertIs(str, tempfile._infer_return_type(''))
+ self.assertIs(bytes, tempfile._infer_return_type(b''))
+ self.assertIs(str, tempfile._infer_return_type(None))
+
+ def test_infer_return_type_multiples(self):
+ self.assertIs(str, tempfile._infer_return_type('', ''))
+ self.assertIs(bytes, tempfile._infer_return_type(b'', b''))
+ with self.assertRaises(TypeError):
+ tempfile._infer_return_type('', b'')
+ with self.assertRaises(TypeError):
+ tempfile._infer_return_type(b'', '')
+
+ def test_infer_return_type_multiples_and_none(self):
+ self.assertIs(str, tempfile._infer_return_type(None, ''))
+ self.assertIs(str, tempfile._infer_return_type('', None))
+ self.assertIs(str, tempfile._infer_return_type(None, None))
+ self.assertIs(bytes, tempfile._infer_return_type(b'', None))
+ self.assertIs(bytes, tempfile._infer_return_type(None, b''))
+ with self.assertRaises(TypeError):
+ tempfile._infer_return_type('', None, b'')
+ with self.assertRaises(TypeError):
+ tempfile._infer_return_type(b'', None, '')
+
+
# Common functionality.
+
class BaseTestCase(unittest.TestCase):
str_check = re.compile(r"^[a-z0-9_-]{8}$")
+ b_check = re.compile(br"^[a-z0-9_-]{8}$")
def setUp(self):
self._warnings_manager = support.check_warnings()
@@ -55,18 +84,31 @@ class BaseTestCase(unittest.TestCase):
npre = nbase[:len(pre)]
nsuf = nbase[len(nbase)-len(suf):]
+ if dir is not None:
+ self.assertIs(type(name), str if type(dir) is str else bytes,
+ "unexpected return type")
+ if pre is not None:
+ self.assertIs(type(name), str if type(pre) is str else bytes,
+ "unexpected return type")
+ if suf is not None:
+ self.assertIs(type(name), str if type(suf) is str else bytes,
+ "unexpected return type")
+ if (dir, pre, suf) == (None, None, None):
+ self.assertIs(type(name), str, "default return type must be str")
+
# check for equality of the absolute paths!
self.assertEqual(os.path.abspath(ndir), os.path.abspath(dir),
- "file '%s' not in directory '%s'" % (name, dir))
+ "file %r not in directory %r" % (name, dir))
self.assertEqual(npre, pre,
- "file '%s' does not begin with '%s'" % (nbase, pre))
+ "file %r does not begin with %r" % (nbase, pre))
self.assertEqual(nsuf, suf,
- "file '%s' does not end with '%s'" % (nbase, suf))
+ "file %r does not end with %r" % (nbase, suf))
nbase = nbase[len(pre):len(nbase)-len(suf)]
- self.assertTrue(self.str_check.match(nbase),
- "random string '%s' does not match ^[a-z0-9_-]{8}$"
- % nbase)
+ check = self.str_check if isinstance(nbase, str) else self.b_check
+ self.assertTrue(check.match(nbase),
+ "random characters %r do not match %r"
+ % (nbase, check.pattern))
class TestExports(BaseTestCase):
@@ -82,7 +124,9 @@ class TestExports(BaseTestCase):
"mktemp" : 1,
"TMP_MAX" : 1,
"gettempprefix" : 1,
+ "gettempprefixb" : 1,
"gettempdir" : 1,
+ "gettempdirb" : 1,
"tempdir" : 1,
"template" : 1,
"SpooledTemporaryFile" : 1,
@@ -319,7 +363,8 @@ class TestMkstempInner(TestBadTempdir, BaseTestCase):
if bin: flags = self._bflags
else: flags = self._tflags
- (self.fd, self.name) = tempfile._mkstemp_inner(dir, pre, suf, flags)
+ output_type = tempfile._infer_return_type(dir, pre, suf)
+ (self.fd, self.name) = tempfile._mkstemp_inner(dir, pre, suf, flags, output_type)
def write(self, str):
os.write(self.fd, str)
@@ -328,9 +373,17 @@ class TestMkstempInner(TestBadTempdir, BaseTestCase):
self._close(self.fd)
self._unlink(self.name)
- def do_create(self, dir=None, pre="", suf="", bin=1):
+ def do_create(self, dir=None, pre=None, suf=None, bin=1):
+ output_type = tempfile._infer_return_type(dir, pre, suf)
if dir is None:
- dir = tempfile.gettempdir()
+ if output_type is str:
+ dir = tempfile.gettempdir()
+ else:
+ dir = tempfile.gettempdirb()
+ if pre is None:
+ pre = output_type()
+ if suf is None:
+ suf = output_type()
file = self.mkstemped(dir, pre, suf, bin)
self.nameCheck(file.name, dir, pre, suf)
@@ -344,6 +397,23 @@ class TestMkstempInner(TestBadTempdir, BaseTestCase):
self.do_create(pre="a", suf="b").write(b"blat")
self.do_create(pre="aa", suf=".txt").write(b"blat")
+ def test_basic_with_bytes_names(self):
+ # _mkstemp_inner can create files when given name parts all
+ # specified as bytes.
+ dir_b = tempfile.gettempdirb()
+ self.do_create(dir=dir_b, suf=b"").write(b"blat")
+ self.do_create(dir=dir_b, pre=b"a").write(b"blat")
+ self.do_create(dir=dir_b, suf=b"b").write(b"blat")
+ self.do_create(dir=dir_b, pre=b"a", suf=b"b").write(b"blat")
+ self.do_create(dir=dir_b, pre=b"aa", suf=b".txt").write(b"blat")
+ # Can't mix str & binary types in the args.
+ with self.assertRaises(TypeError):
+ self.do_create(dir="", suf=b"").write(b"blat")
+ with self.assertRaises(TypeError):
+ self.do_create(dir=dir_b, pre="").write(b"blat")
+ with self.assertRaises(TypeError):
+ self.do_create(dir=dir_b, pre=b"", suf="").write(b"blat")
+
def test_basic_many(self):
# _mkstemp_inner can create many files (stochastic)
extant = list(range(TEST_FILES))
@@ -423,9 +493,10 @@ class TestMkstempInner(TestBadTempdir, BaseTestCase):
def make_temp(self):
return tempfile._mkstemp_inner(tempfile.gettempdir(),
- tempfile.template,
+ tempfile.gettempprefix(),
'',
- tempfile._bin_openflags)
+ tempfile._bin_openflags,
+ str)
def test_collision_with_existing_file(self):
# _mkstemp_inner tries another name when a file with
@@ -461,7 +532,12 @@ class TestGetTempPrefix(BaseTestCase):
p = tempfile.gettempprefix()
self.assertIsInstance(p, str)
- self.assertTrue(len(p) > 0)
+ self.assertGreater(len(p), 0)
+
+ pb = tempfile.gettempprefixb()
+
+ self.assertIsInstance(pb, bytes)
+ self.assertGreater(len(pb), 0)
def test_usable_template(self):
# gettempprefix returns a usable prefix string
@@ -486,11 +562,11 @@ class TestGetTempDir(BaseTestCase):
def test_directory_exists(self):
# gettempdir returns a directory which exists
- dir = tempfile.gettempdir()
- self.assertTrue(os.path.isabs(dir) or dir == os.curdir,
- "%s is not an absolute path" % dir)
- self.assertTrue(os.path.isdir(dir),
- "%s is not a directory" % dir)
+ for d in (tempfile.gettempdir(), tempfile.gettempdirb()):
+ self.assertTrue(os.path.isabs(d) or d == os.curdir,
+ "%r is not an absolute path" % d)
+ self.assertTrue(os.path.isdir(d),
+ "%r is not a directory" % d)
def test_directory_writable(self):
# gettempdir returns a directory writable by the user
@@ -506,8 +582,11 @@ class TestGetTempDir(BaseTestCase):
# gettempdir always returns the same object
a = tempfile.gettempdir()
b = tempfile.gettempdir()
+ c = tempfile.gettempdirb()
self.assertTrue(a is b)
+ self.assertNotEqual(type(a), type(c))
+ self.assertEqual(a, os.fsdecode(c))
def test_case_sensitive(self):
# gettempdir should not flatten its case
@@ -527,9 +606,17 @@ class TestGetTempDir(BaseTestCase):
class TestMkstemp(BaseTestCase):
"""Test mkstemp()."""
- def do_create(self, dir=None, pre="", suf=""):
+ def do_create(self, dir=None, pre=None, suf=None):
+ output_type = tempfile._infer_return_type(dir, pre, suf)
if dir is None:
- dir = tempfile.gettempdir()
+ if output_type is str:
+ dir = tempfile.gettempdir()
+ else:
+ dir = tempfile.gettempdirb()
+ if pre is None:
+ pre = output_type()
+ if suf is None:
+ suf = output_type()
(fd, name) = tempfile.mkstemp(dir=dir, prefix=pre, suffix=suf)
(ndir, nbase) = os.path.split(name)
adir = os.path.abspath(dir)
@@ -551,6 +638,24 @@ class TestMkstemp(BaseTestCase):
self.do_create(pre="aa", suf=".txt")
self.do_create(dir=".")
+ def test_basic_with_bytes_names(self):
+ # mkstemp can create files when given name parts all
+ # specified as bytes.
+ d = tempfile.gettempdirb()
+ self.do_create(dir=d, suf=b"")
+ self.do_create(dir=d, pre=b"a")
+ self.do_create(dir=d, suf=b"b")
+ self.do_create(dir=d, pre=b"a", suf=b"b")
+ self.do_create(dir=d, pre=b"aa", suf=b".txt")
+ self.do_create(dir=b".")
+ with self.assertRaises(TypeError):
+ self.do_create(dir=".", pre=b"aa", suf=b".txt")
+ with self.assertRaises(TypeError):
+ self.do_create(dir=b".", pre="aa", suf=b".txt")
+ with self.assertRaises(TypeError):
+ self.do_create(dir=b".", pre=b"aa", suf=".txt")
+
+
def test_choose_directory(self):
# mkstemp can create directories in a user-selected directory
dir = tempfile.mkdtemp()
@@ -566,9 +671,17 @@ class TestMkdtemp(TestBadTempdir, BaseTestCase):
def make_temp(self):
return tempfile.mkdtemp()
- def do_create(self, dir=None, pre="", suf=""):
+ def do_create(self, dir=None, pre=None, suf=None):
+ output_type = tempfile._infer_return_type(dir, pre, suf)
if dir is None:
- dir = tempfile.gettempdir()
+ if output_type is str:
+ dir = tempfile.gettempdir()
+ else:
+ dir = tempfile.gettempdirb()
+ if pre is None:
+ pre = output_type()
+ if suf is None:
+ suf = output_type()
name = tempfile.mkdtemp(dir=dir, prefix=pre, suffix=suf)
try:
@@ -586,6 +699,21 @@ class TestMkdtemp(TestBadTempdir, BaseTestCase):
os.rmdir(self.do_create(pre="a", suf="b"))
os.rmdir(self.do_create(pre="aa", suf=".txt"))
+ def test_basic_with_bytes_names(self):
+ # mkdtemp can create directories when given all binary parts
+ d = tempfile.gettempdirb()
+ os.rmdir(self.do_create(dir=d))
+ os.rmdir(self.do_create(dir=d, pre=b"a"))
+ os.rmdir(self.do_create(dir=d, suf=b"b"))
+ os.rmdir(self.do_create(dir=d, pre=b"a", suf=b"b"))
+ os.rmdir(self.do_create(dir=d, pre=b"aa", suf=b".txt"))
+ with self.assertRaises(TypeError):
+ os.rmdir(self.do_create(dir=d, pre="aa", suf=b".txt"))
+ with self.assertRaises(TypeError):
+ os.rmdir(self.do_create(dir=d, pre=b"aa", suf=".txt"))
+ with self.assertRaises(TypeError):
+ os.rmdir(self.do_create(dir="", pre=b"aa", suf=b".txt"))
+
def test_basic_many(self):
# mkdtemp can create many directories (stochastic)
extant = list(range(TEST_FILES))
@@ -820,8 +948,16 @@ class TestNamedTemporaryFile(BaseTestCase):
self.assertRaises(ValueError, tempfile.NamedTemporaryFile)
self.assertEqual(len(closed), 1)
- # How to test the mode and bufsize parameters?
+ def test_bad_mode(self):
+ dir = tempfile.mkdtemp()
+ self.addCleanup(support.rmtree, dir)
+ with self.assertRaises(ValueError):
+ tempfile.NamedTemporaryFile(mode='wr', dir=dir)
+ with self.assertRaises(TypeError):
+ tempfile.NamedTemporaryFile(mode=2, dir=dir)
+ self.assertEqual(os.listdir(dir), [])
+ # How to test the mode and bufsize parameters?
class TestSpooledTemporaryFile(BaseTestCase):
"""Test SpooledTemporaryFile()."""
@@ -1313,8 +1449,5 @@ class TestTemporaryDirectory(BaseTestCase):
self.assertFalse(os.path.exists(name))
-def test_main():
- support.run_unittest(__name__)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_textwrap.py b/Lib/test/test_textwrap.py
index ea7c0895c1..a44184fbc7 100644
--- a/Lib/test/test_textwrap.py
+++ b/Lib/test/test_textwrap.py
@@ -184,6 +184,16 @@ What a mess!
self.check_wrap(text, 42,
["this-is-a-useful-feature-for-reformatting-",
"posts-from-tim-peters'ly"])
+ # The test tests current behavior but is not testing parts of the API.
+ expect = ("this-|is-|a-|useful-|feature-|for-|"
+ "reformatting-|posts-|from-|tim-|peters'ly").split('|')
+ self.check_wrap(text, 1, expect, break_long_words=False)
+ self.check_split(text, expect)
+
+ self.check_split('e-mail', ['e-mail'])
+ self.check_split('Jelly-O', ['Jelly-O'])
+ # The test tests current behavior but is not testing parts of the API.
+ self.check_split('half-a-crown', 'half-|a-|crown'.split('|'))
def test_hyphenated_numbers(self):
# Test that hyphenated numbers (eg. dates) are not broken like words.
@@ -195,6 +205,7 @@ What a mess!
'released on 1994-02-15.'])
self.check_wrap(text, 40, ['Python 1.0.0 was released on 1994-01-26.',
'Python 1.0.1 was released on 1994-02-15.'])
+ self.check_wrap(text, 1, text.split(), break_long_words=False)
text = "I do all my shopping at 7-11."
self.check_wrap(text, 25, ["I do all my shopping at",
@@ -202,6 +213,7 @@ What a mess!
self.check_wrap(text, 27, ["I do all my shopping at",
"7-11."])
self.check_wrap(text, 29, ["I do all my shopping at 7-11."])
+ self.check_wrap(text, 1, text.split(), break_long_words=False)
def test_em_dash(self):
# Test text with em-dashes
@@ -326,6 +338,10 @@ What a mess!
self.check_split("the ['wibble-wobble'] widget",
['the', ' ', "['wibble-", "wobble']", ' ', 'widget'])
+ # The test tests current behavior but is not testing parts of the API.
+ self.check_split("what-d'you-call-it.",
+ "what-d'you-|call-|it.".split('|'))
+
def test_funky_parens (self):
# Second part of SF bug #596434: long option strings inside
# parentheses.
diff --git a/Lib/test/test_thread.py b/Lib/test/test_thread.py
index 614490199a..ef3059b686 100644
--- a/Lib/test/test_thread.py
+++ b/Lib/test/test_thread.py
@@ -252,9 +252,5 @@ class TestForkInThread(unittest.TestCase):
pass
-def test_main():
- support.run_unittest(ThreadRunningTests, BarrierTest, LockTests,
- TestForkInThread)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_threaded_import.py b/Lib/test/test_threaded_import.py
index 4be615a5a8..9b2d9a6f19 100644
--- a/Lib/test/test_threaded_import.py
+++ b/Lib/test/test_threaded_import.py
@@ -115,12 +115,18 @@ class ThreadedImportTests(unittest.TestCase):
errors = []
done_tasks = []
done.clear()
+ t0 = time.monotonic()
with start_threads(threading.Thread(target=task,
args=(N, done, done_tasks, errors,))
for i in range(N)):
pass
- self.assertTrue(done.wait(60))
- self.assertFalse(errors)
+ completed = done.wait(10 * 60)
+ dt = time.monotonic() - t0
+ if verbose:
+ print("%.1f ms" % (dt*1e3), flush=True, end=" ")
+ dbg_info = 'done: %s/%s' % (len(done_tasks), N)
+ self.assertFalse(errors, dbg_info)
+ self.assertTrue(completed, dbg_info)
if verbose:
print("OK.")
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py
index 4b75ea6778..b49a9615f0 100644
--- a/Lib/test/test_threading.py
+++ b/Lib/test/test_threading.py
@@ -4,7 +4,7 @@ Tests for the threading module.
import test.support
from test.support import verbose, strip_python_stderr, import_module, cpython_only
-from test.script_helper import assert_python_ok, assert_python_failure
+from test.support.script_helper import assert_python_ok, assert_python_failure
import random
import re
@@ -58,7 +58,7 @@ class TestThread(threading.Thread):
self.nrunning.inc()
if verbose:
print(self.nrunning.get(), 'tasks are running')
- self.testcase.assertTrue(self.nrunning.get() <= 3)
+ self.testcase.assertLessEqual(self.nrunning.get(), 3)
time.sleep(delay)
if verbose:
@@ -66,7 +66,7 @@ class TestThread(threading.Thread):
with self.mutex:
self.nrunning.dec()
- self.testcase.assertTrue(self.nrunning.get() >= 0)
+ self.testcase.assertGreaterEqual(self.nrunning.get(), 0)
if verbose:
print('%s is finished. %d tasks are running' %
(self.name, self.nrunning.get()))
@@ -100,26 +100,25 @@ class ThreadTests(BaseTestCase):
for i in range(NUMTASKS):
t = TestThread("<thread %d>"%i, self, sema, mutex, numrunning)
threads.append(t)
- self.assertEqual(t.ident, None)
- self.assertTrue(re.match('<TestThread\(.*, initial\)>', repr(t)))
+ self.assertIsNone(t.ident)
+ self.assertRegex(repr(t), r'^<TestThread\(.*, initial\)>$')
t.start()
if verbose:
print('waiting for all tasks to complete')
for t in threads:
t.join()
- self.assertTrue(not t.is_alive())
+ self.assertFalse(t.is_alive())
self.assertNotEqual(t.ident, 0)
- self.assertFalse(t.ident is None)
- self.assertTrue(re.match('<TestThread\(.*, stopped -?\d+\)>',
- repr(t)))
+ self.assertIsNotNone(t.ident)
+ self.assertRegex(repr(t), r'^<TestThread\(.*, stopped -?\d+\)>$')
if verbose:
print('all tasks done')
self.assertEqual(numrunning.get(), 0)
def test_ident_of_no_threading_threads(self):
# The ident still must work for the main thread and dummy threads.
- self.assertFalse(threading.currentThread().ident is None)
+ self.assertIsNotNone(threading.currentThread().ident)
def f():
ident.append(threading.currentThread().ident)
done.set()
@@ -127,7 +126,7 @@ class ThreadTests(BaseTestCase):
ident = []
_thread.start_new_thread(f, ())
done.wait()
- self.assertFalse(ident[0] is None)
+ self.assertIsNotNone(ident[0])
# Kill the "immortal" _DummyThread
del threading._active[ident[0]]
@@ -244,7 +243,7 @@ class ThreadTests(BaseTestCase):
self.assertTrue(ret)
if verbose:
print(" verifying worker hasn't exited")
- self.assertTrue(not t.finished)
+ self.assertFalse(t.finished)
if verbose:
print(" attempting to raise asynch exception in worker")
result = set_async_exc(ctypes.c_long(t.id), exception)
@@ -415,9 +414,9 @@ class ThreadTests(BaseTestCase):
def test_repr_daemon(self):
t = threading.Thread()
- self.assertFalse('daemon' in repr(t))
+ self.assertNotIn('daemon', repr(t))
t.daemon = True
- self.assertTrue('daemon' in repr(t))
+ self.assertIn('daemon', repr(t))
def test_deamon_param(self):
t = threading.Thread()
@@ -569,7 +568,7 @@ class ThreadTests(BaseTestCase):
tstate_lock.release()
self.assertFalse(t.is_alive())
# And verify the thread disposed of _tstate_lock.
- self.assertTrue(t._tstate_lock is None)
+ self.assertIsNone(t._tstate_lock)
def test_repr_stopped(self):
# Verify that "stopped" shows up in repr(Thread) appropriately.
@@ -945,7 +944,7 @@ class ThreadingExceptionTests(BaseTestCase):
def outer():
try:
recurse()
- except RuntimeError:
+ except RecursionError:
pass
w = threading.Thread(target=outer)
@@ -1083,7 +1082,7 @@ class EventTests(lock_tests.EventTests):
eventtype = staticmethod(threading.Event)
class ConditionAsRLockTests(lock_tests.RLockTests):
- # An Condition uses an RLock by default and exports its API.
+ # Condition uses an RLock by default and exports its API.
locktype = staticmethod(threading.Condition)
class ConditionTests(lock_tests.ConditionTests):
diff --git a/Lib/test/test_threading_local.py b/Lib/test/test_threading_local.py
index c7f394cf60..4092cf33d3 100644
--- a/Lib/test/test_threading_local.py
+++ b/Lib/test/test_threading_local.py
@@ -189,7 +189,7 @@ class BaseLocalTest:
wr = weakref.ref(x)
del x
gc.collect()
- self.assertIs(wr(), None)
+ self.assertIsNone(wr())
class ThreadLocalTest(unittest.TestCase, BaseLocalTest):
diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py
index be7ddcc34d..76b894eece 100644
--- a/Lib/test/test_time.py
+++ b/Lib/test/test_time.py
@@ -1,21 +1,37 @@
from test import support
-import time
-import unittest
+import enum
import locale
-import sysconfig
-import sys
import platform
+import sys
+import sysconfig
+import time
+import unittest
try:
import threading
except ImportError:
threading = None
+try:
+ import _testcapi
+except ImportError:
+ _testcapi = None
+
# Max year is only limited by the size of C int.
SIZEOF_INT = sysconfig.get_config_var('SIZEOF_INT') or 4
TIME_MAXYEAR = (1 << 8 * SIZEOF_INT - 1) - 1
TIME_MINYEAR = -TIME_MAXYEAR - 1
-_PyTime_ROUND_DOWN = 0
-_PyTime_ROUND_UP = 1
+
+US_TO_NS = 10 ** 3
+MS_TO_NS = 10 ** 6
+SEC_TO_NS = 10 ** 9
+
+class _PyTime(enum.IntEnum):
+ # Round towards minus infinity (-inf)
+ ROUND_FLOOR = 0
+ # Round towards infinity (+inf)
+ ROUND_CEILING = 1
+
+ALL_ROUNDING_METHODS = (_PyTime.ROUND_FLOOR, _PyTime.ROUND_CEILING)
class TimeTestCase(unittest.TestCase):
@@ -98,13 +114,6 @@ class TimeTestCase(unittest.TestCase):
except ValueError:
self.fail('conversion specifier: %r failed.' % format)
- # Issue #10762: Guard against invalid/non-supported format string
- # so that Python don't crash (Windows crashes when the format string
- # input to [w]strftime is not kosher.
- if sys.platform.startswith('win'):
- with self.assertRaises(ValueError):
- time.strftime('%f')
-
def _bounds_checking(self, func):
# Make sure that strftime() checks the bounds of the various parts
# of the time tuple (0 is valid for *all* values).
@@ -165,6 +174,19 @@ class TimeTestCase(unittest.TestCase):
def test_strftime_bounding_check(self):
self._bounds_checking(lambda tup: time.strftime('', tup))
+ def test_strftime_format_check(self):
+ # Test that strftime does not crash on invalid format strings
+ # that may trigger a buffer overread. When not triggered,
+ # strftime may succeed or raise ValueError depending on
+ # the platform.
+ for x in [ '', 'A', '%A', '%AA' ]:
+ for y in range(0x0, 0x10):
+ for z in [ '%', 'A%', 'AA%', '%A%', 'A%A%', '%#' ]:
+ try:
+ time.strftime(x * y + z)
+ except ValueError:
+ pass
+
def test_default_values_for_zero(self):
# Make sure that using all zeros uses the proper default
# values. No test for daylight savings since strftime() does
@@ -595,112 +617,65 @@ class TestPytime(unittest.TestCase):
def test_time_t(self):
from _testcapi import pytime_object_to_time_t
for obj, time_t, rnd in (
- # Round towards zero
- (0, 0, _PyTime_ROUND_DOWN),
- (-1, -1, _PyTime_ROUND_DOWN),
- (-1.0, -1, _PyTime_ROUND_DOWN),
- (-1.9, -1, _PyTime_ROUND_DOWN),
- (1.0, 1, _PyTime_ROUND_DOWN),
- (1.9, 1, _PyTime_ROUND_DOWN),
- # Round away from zero
- (0, 0, _PyTime_ROUND_UP),
- (-1, -1, _PyTime_ROUND_UP),
- (-1.0, -1, _PyTime_ROUND_UP),
- (-1.9, -2, _PyTime_ROUND_UP),
- (1.0, 1, _PyTime_ROUND_UP),
- (1.9, 2, _PyTime_ROUND_UP),
+ # Round towards minus infinity (-inf)
+ (0, 0, _PyTime.ROUND_FLOOR),
+ (-1, -1, _PyTime.ROUND_FLOOR),
+ (-1.0, -1, _PyTime.ROUND_FLOOR),
+ (-1.9, -2, _PyTime.ROUND_FLOOR),
+ (1.0, 1, _PyTime.ROUND_FLOOR),
+ (1.9, 1, _PyTime.ROUND_FLOOR),
+ # Round towards infinity (+inf)
+ (0, 0, _PyTime.ROUND_CEILING),
+ (-1, -1, _PyTime.ROUND_CEILING),
+ (-1.0, -1, _PyTime.ROUND_CEILING),
+ (-1.9, -1, _PyTime.ROUND_CEILING),
+ (1.0, 1, _PyTime.ROUND_CEILING),
+ (1.9, 2, _PyTime.ROUND_CEILING),
):
self.assertEqual(pytime_object_to_time_t(obj, rnd), time_t)
- rnd = _PyTime_ROUND_DOWN
+ rnd = _PyTime.ROUND_FLOOR
for invalid in self.invalid_values:
self.assertRaises(OverflowError,
pytime_object_to_time_t, invalid, rnd)
@support.cpython_only
- def test_timeval(self):
- from _testcapi import pytime_object_to_timeval
- for obj, timeval, rnd in (
- # Round towards zero
- (0, (0, 0), _PyTime_ROUND_DOWN),
- (-1, (-1, 0), _PyTime_ROUND_DOWN),
- (-1.0, (-1, 0), _PyTime_ROUND_DOWN),
- (1e-6, (0, 1), _PyTime_ROUND_DOWN),
- (1e-7, (0, 0), _PyTime_ROUND_DOWN),
- (-1e-6, (-1, 999999), _PyTime_ROUND_DOWN),
- (-1e-7, (-1, 999999), _PyTime_ROUND_DOWN),
- (-1.2, (-2, 800000), _PyTime_ROUND_DOWN),
- (0.9999999, (0, 999999), _PyTime_ROUND_DOWN),
- (0.0000041, (0, 4), _PyTime_ROUND_DOWN),
- (1.1234560, (1, 123456), _PyTime_ROUND_DOWN),
- (1.1234569, (1, 123456), _PyTime_ROUND_DOWN),
- (-0.0000040, (-1, 999996), _PyTime_ROUND_DOWN),
- (-0.0000041, (-1, 999995), _PyTime_ROUND_DOWN),
- (-1.1234560, (-2, 876544), _PyTime_ROUND_DOWN),
- (-1.1234561, (-2, 876543), _PyTime_ROUND_DOWN),
- # Round away from zero
- (0, (0, 0), _PyTime_ROUND_UP),
- (-1, (-1, 0), _PyTime_ROUND_UP),
- (-1.0, (-1, 0), _PyTime_ROUND_UP),
- (1e-6, (0, 1), _PyTime_ROUND_UP),
- (1e-7, (0, 1), _PyTime_ROUND_UP),
- (-1e-6, (-1, 999999), _PyTime_ROUND_UP),
- (-1e-7, (-1, 999999), _PyTime_ROUND_UP),
- (-1.2, (-2, 800000), _PyTime_ROUND_UP),
- (0.9999999, (1, 0), _PyTime_ROUND_UP),
- (0.0000041, (0, 5), _PyTime_ROUND_UP),
- (1.1234560, (1, 123457), _PyTime_ROUND_UP),
- (1.1234569, (1, 123457), _PyTime_ROUND_UP),
- (-0.0000040, (-1, 999996), _PyTime_ROUND_UP),
- (-0.0000041, (-1, 999995), _PyTime_ROUND_UP),
- (-1.1234560, (-2, 876544), _PyTime_ROUND_UP),
- (-1.1234561, (-2, 876543), _PyTime_ROUND_UP),
- ):
- with self.subTest(obj=obj, round=rnd, timeval=timeval):
- self.assertEqual(pytime_object_to_timeval(obj, rnd), timeval)
-
- rnd = _PyTime_ROUND_DOWN
- for invalid in self.invalid_values:
- self.assertRaises(OverflowError,
- pytime_object_to_timeval, invalid, rnd)
-
- @support.cpython_only
def test_timespec(self):
from _testcapi import pytime_object_to_timespec
for obj, timespec, rnd in (
- # Round towards zero
- (0, (0, 0), _PyTime_ROUND_DOWN),
- (-1, (-1, 0), _PyTime_ROUND_DOWN),
- (-1.0, (-1, 0), _PyTime_ROUND_DOWN),
- (1e-9, (0, 1), _PyTime_ROUND_DOWN),
- (1e-10, (0, 0), _PyTime_ROUND_DOWN),
- (-1e-9, (-1, 999999999), _PyTime_ROUND_DOWN),
- (-1e-10, (-1, 999999999), _PyTime_ROUND_DOWN),
- (-1.2, (-2, 800000000), _PyTime_ROUND_DOWN),
- (0.9999999999, (0, 999999999), _PyTime_ROUND_DOWN),
- (1.1234567890, (1, 123456789), _PyTime_ROUND_DOWN),
- (1.1234567899, (1, 123456789), _PyTime_ROUND_DOWN),
- (-1.1234567890, (-2, 876543211), _PyTime_ROUND_DOWN),
- (-1.1234567891, (-2, 876543210), _PyTime_ROUND_DOWN),
- # Round away from zero
- (0, (0, 0), _PyTime_ROUND_UP),
- (-1, (-1, 0), _PyTime_ROUND_UP),
- (-1.0, (-1, 0), _PyTime_ROUND_UP),
- (1e-9, (0, 1), _PyTime_ROUND_UP),
- (1e-10, (0, 1), _PyTime_ROUND_UP),
- (-1e-9, (-1, 999999999), _PyTime_ROUND_UP),
- (-1e-10, (-1, 999999999), _PyTime_ROUND_UP),
- (-1.2, (-2, 800000000), _PyTime_ROUND_UP),
- (0.9999999999, (1, 0), _PyTime_ROUND_UP),
- (1.1234567890, (1, 123456790), _PyTime_ROUND_UP),
- (1.1234567899, (1, 123456790), _PyTime_ROUND_UP),
- (-1.1234567890, (-2, 876543211), _PyTime_ROUND_UP),
- (-1.1234567891, (-2, 876543210), _PyTime_ROUND_UP),
+ # Round towards minus infinity (-inf)
+ (0, (0, 0), _PyTime.ROUND_FLOOR),
+ (-1, (-1, 0), _PyTime.ROUND_FLOOR),
+ (-1.0, (-1, 0), _PyTime.ROUND_FLOOR),
+ (1e-9, (0, 1), _PyTime.ROUND_FLOOR),
+ (1e-10, (0, 0), _PyTime.ROUND_FLOOR),
+ (-1e-9, (-1, 999999999), _PyTime.ROUND_FLOOR),
+ (-1e-10, (-1, 999999999), _PyTime.ROUND_FLOOR),
+ (-1.2, (-2, 800000000), _PyTime.ROUND_FLOOR),
+ (0.9999999999, (0, 999999999), _PyTime.ROUND_FLOOR),
+ (1.1234567890, (1, 123456789), _PyTime.ROUND_FLOOR),
+ (1.1234567899, (1, 123456789), _PyTime.ROUND_FLOOR),
+ (-1.1234567890, (-2, 876543211), _PyTime.ROUND_FLOOR),
+ (-1.1234567891, (-2, 876543210), _PyTime.ROUND_FLOOR),
+ # Round towards infinity (+inf)
+ (0, (0, 0), _PyTime.ROUND_CEILING),
+ (-1, (-1, 0), _PyTime.ROUND_CEILING),
+ (-1.0, (-1, 0), _PyTime.ROUND_CEILING),
+ (1e-9, (0, 1), _PyTime.ROUND_CEILING),
+ (1e-10, (0, 1), _PyTime.ROUND_CEILING),
+ (-1e-9, (-1, 999999999), _PyTime.ROUND_CEILING),
+ (-1e-10, (0, 0), _PyTime.ROUND_CEILING),
+ (-1.2, (-2, 800000000), _PyTime.ROUND_CEILING),
+ (0.9999999999, (1, 0), _PyTime.ROUND_CEILING),
+ (1.1234567890, (1, 123456790), _PyTime.ROUND_CEILING),
+ (1.1234567899, (1, 123456790), _PyTime.ROUND_CEILING),
+ (-1.1234567890, (-2, 876543211), _PyTime.ROUND_CEILING),
+ (-1.1234567891, (-2, 876543211), _PyTime.ROUND_CEILING),
):
with self.subTest(obj=obj, round=rnd, timespec=timespec):
self.assertEqual(pytime_object_to_timespec(obj, rnd), timespec)
- rnd = _PyTime_ROUND_DOWN
+ rnd = _PyTime.ROUND_FLOOR
for invalid in self.invalid_values:
self.assertRaises(OverflowError,
pytime_object_to_timespec, invalid, rnd)
@@ -759,5 +734,267 @@ class TestPytime(unittest.TestCase):
self.assertIs(lt.tm_zone, None)
+@unittest.skipUnless(_testcapi is not None,
+ 'need the _testcapi module')
+class TestPyTime_t(unittest.TestCase):
+ def test_FromSeconds(self):
+ from _testcapi import PyTime_FromSeconds
+ for seconds in (0, 3, -456, _testcapi.INT_MAX, _testcapi.INT_MIN):
+ with self.subTest(seconds=seconds):
+ self.assertEqual(PyTime_FromSeconds(seconds),
+ seconds * SEC_TO_NS)
+
+ def test_FromSecondsObject(self):
+ from _testcapi import PyTime_FromSecondsObject
+
+ # Conversion giving the same result for all rounding methods
+ for rnd in ALL_ROUNDING_METHODS:
+ for obj, ts in (
+ # integers
+ (0, 0),
+ (1, SEC_TO_NS),
+ (-3, -3 * SEC_TO_NS),
+
+ # float: subseconds
+ (0.0, 0),
+ (1e-9, 1),
+ (1e-6, 10 ** 3),
+ (1e-3, 10 ** 6),
+
+ # float: seconds
+ (2.0, 2 * SEC_TO_NS),
+ (123.0, 123 * SEC_TO_NS),
+ (-7.0, -7 * SEC_TO_NS),
+
+ # nanosecond are kept for value <= 2^23 seconds
+ (2**22 - 1e-9, 4194303999999999),
+ (2**22, 4194304000000000),
+ (2**22 + 1e-9, 4194304000000001),
+ (2**23 - 1e-9, 8388607999999999),
+ (2**23, 8388608000000000),
+
+ # start losing precision for value > 2^23 seconds
+ (2**23 + 1e-9, 8388608000000002),
+
+ # nanoseconds are lost for value > 2^23 seconds
+ (2**24 - 1e-9, 16777215999999998),
+ (2**24, 16777216000000000),
+ (2**24 + 1e-9, 16777216000000000),
+ (2**25 - 1e-9, 33554432000000000),
+ (2**25 , 33554432000000000),
+ (2**25 + 1e-9, 33554432000000000),
+
+ # close to 2^63 nanoseconds (_PyTime_t limit)
+ (9223372036, 9223372036 * SEC_TO_NS),
+ (9223372036.0, 9223372036 * SEC_TO_NS),
+ (-9223372036, -9223372036 * SEC_TO_NS),
+ (-9223372036.0, -9223372036 * SEC_TO_NS),
+ ):
+ with self.subTest(obj=obj, round=rnd, timestamp=ts):
+ self.assertEqual(PyTime_FromSecondsObject(obj, rnd), ts)
+
+ with self.subTest(round=rnd):
+ with self.assertRaises(OverflowError):
+ PyTime_FromSecondsObject(9223372037, rnd)
+ PyTime_FromSecondsObject(9223372037.0, rnd)
+ PyTime_FromSecondsObject(-9223372037, rnd)
+ PyTime_FromSecondsObject(-9223372037.0, rnd)
+
+ # Conversion giving different results depending on the rounding method
+ FLOOR = _PyTime.ROUND_FLOOR
+ CEILING = _PyTime.ROUND_CEILING
+ for obj, ts, rnd in (
+ # close to zero
+ ( 1e-10, 0, FLOOR),
+ ( 1e-10, 1, CEILING),
+ (-1e-10, -1, FLOOR),
+ (-1e-10, 0, CEILING),
+
+ # test rounding of the last nanosecond
+ ( 1.1234567899, 1123456789, FLOOR),
+ ( 1.1234567899, 1123456790, CEILING),
+ (-1.1234567899, -1123456790, FLOOR),
+ (-1.1234567899, -1123456789, CEILING),
+
+ # close to 1 second
+ ( 0.9999999999, 999999999, FLOOR),
+ ( 0.9999999999, 1000000000, CEILING),
+ (-0.9999999999, -1000000000, FLOOR),
+ (-0.9999999999, -999999999, CEILING),
+ ):
+ with self.subTest(obj=obj, round=rnd, timestamp=ts):
+ self.assertEqual(PyTime_FromSecondsObject(obj, rnd), ts)
+
+ def test_AsSecondsDouble(self):
+ from _testcapi import PyTime_AsSecondsDouble
+
+ for nanoseconds, seconds in (
+ # near 1 nanosecond
+ ( 0, 0.0),
+ ( 1, 1e-9),
+ (-1, -1e-9),
+
+ # near 1 second
+ (SEC_TO_NS + 1, 1.0 + 1e-9),
+ (SEC_TO_NS, 1.0),
+ (SEC_TO_NS - 1, 1.0 - 1e-9),
+
+ # a few seconds
+ (123 * SEC_TO_NS, 123.0),
+ (-567 * SEC_TO_NS, -567.0),
+
+ # nanosecond are kept for value <= 2^23 seconds
+ (4194303999999999, 2**22 - 1e-9),
+ (4194304000000000, 2**22),
+ (4194304000000001, 2**22 + 1e-9),
+
+ # start losing precision for value > 2^23 seconds
+ (8388608000000002, 2**23 + 1e-9),
+
+ # nanoseconds are lost for value > 2^23 seconds
+ (16777215999999998, 2**24 - 1e-9),
+ (16777215999999999, 2**24 - 1e-9),
+ (16777216000000000, 2**24 ),
+ (16777216000000001, 2**24 ),
+ (16777216000000002, 2**24 + 2e-9),
+
+ (33554432000000000, 2**25 ),
+ (33554432000000002, 2**25 ),
+ (33554432000000004, 2**25 + 4e-9),
+
+ # close to 2^63 nanoseconds (_PyTime_t limit)
+ (9223372036 * SEC_TO_NS, 9223372036.0),
+ (-9223372036 * SEC_TO_NS, -9223372036.0),
+ ):
+ with self.subTest(nanoseconds=nanoseconds, seconds=seconds):
+ self.assertEqual(PyTime_AsSecondsDouble(nanoseconds),
+ seconds)
+
+ def test_timeval(self):
+ from _testcapi import PyTime_AsTimeval
+ for rnd in ALL_ROUNDING_METHODS:
+ for ns, tv in (
+ # microseconds
+ (0, (0, 0)),
+ (1000, (0, 1)),
+ (-1000, (-1, 999999)),
+
+ # seconds
+ (2 * SEC_TO_NS, (2, 0)),
+ (-3 * SEC_TO_NS, (-3, 0)),
+ ):
+ with self.subTest(nanoseconds=ns, timeval=tv, round=rnd):
+ self.assertEqual(PyTime_AsTimeval(ns, rnd), tv)
+
+ FLOOR = _PyTime.ROUND_FLOOR
+ CEILING = _PyTime.ROUND_CEILING
+ for ns, tv, rnd in (
+ # nanoseconds
+ (1, (0, 0), FLOOR),
+ (1, (0, 1), CEILING),
+ (-1, (-1, 999999), FLOOR),
+ (-1, (0, 0), CEILING),
+
+ # seconds + nanoseconds
+ (1234567001, (1, 234567), FLOOR),
+ (1234567001, (1, 234568), CEILING),
+ (-1234567001, (-2, 765432), FLOOR),
+ (-1234567001, (-2, 765433), CEILING),
+ ):
+ with self.subTest(nanoseconds=ns, timeval=tv, round=rnd):
+ self.assertEqual(PyTime_AsTimeval(ns, rnd), tv)
+
+ @unittest.skipUnless(hasattr(_testcapi, 'PyTime_AsTimespec'),
+ 'need _testcapi.PyTime_AsTimespec')
+ def test_timespec(self):
+ from _testcapi import PyTime_AsTimespec
+ for ns, ts in (
+ # nanoseconds
+ (0, (0, 0)),
+ (1, (0, 1)),
+ (-1, (-1, 999999999)),
+
+ # seconds
+ (2 * SEC_TO_NS, (2, 0)),
+ (-3 * SEC_TO_NS, (-3, 0)),
+
+ # seconds + nanoseconds
+ (1234567890, (1, 234567890)),
+ (-1234567890, (-2, 765432110)),
+ ):
+ with self.subTest(nanoseconds=ns, timespec=ts):
+ self.assertEqual(PyTime_AsTimespec(ns), ts)
+
+ def test_milliseconds(self):
+ from _testcapi import PyTime_AsMilliseconds
+ for rnd in ALL_ROUNDING_METHODS:
+ for ns, tv in (
+ # milliseconds
+ (1 * MS_TO_NS, 1),
+ (-2 * MS_TO_NS, -2),
+
+ # seconds
+ (2 * SEC_TO_NS, 2000),
+ (-3 * SEC_TO_NS, -3000),
+ ):
+ with self.subTest(nanoseconds=ns, timeval=tv, round=rnd):
+ self.assertEqual(PyTime_AsMilliseconds(ns, rnd), tv)
+
+ FLOOR = _PyTime.ROUND_FLOOR
+ CEILING = _PyTime.ROUND_CEILING
+ for ns, ms, rnd in (
+ # nanoseconds
+ (1, 0, FLOOR),
+ (1, 1, CEILING),
+ (-1, -1, FLOOR),
+ (-1, 0, CEILING),
+
+ # seconds + nanoseconds
+ (1234 * MS_TO_NS + 1, 1234, FLOOR),
+ (1234 * MS_TO_NS + 1, 1235, CEILING),
+ (-1234 * MS_TO_NS - 1, -1235, FLOOR),
+ (-1234 * MS_TO_NS - 1, -1234, CEILING),
+ ):
+ with self.subTest(nanoseconds=ns, milliseconds=ms, round=rnd):
+ self.assertEqual(PyTime_AsMilliseconds(ns, rnd), ms)
+
+ def test_microseconds(self):
+ from _testcapi import PyTime_AsMicroseconds
+ for rnd in ALL_ROUNDING_METHODS:
+ for ns, tv in (
+ # microseconds
+ (1 * US_TO_NS, 1),
+ (-2 * US_TO_NS, -2),
+
+ # milliseconds
+ (1 * MS_TO_NS, 1000),
+ (-2 * MS_TO_NS, -2000),
+
+ # seconds
+ (2 * SEC_TO_NS, 2000000),
+ (-3 * SEC_TO_NS, -3000000),
+ ):
+ with self.subTest(nanoseconds=ns, timeval=tv, round=rnd):
+ self.assertEqual(PyTime_AsMicroseconds(ns, rnd), tv)
+
+ FLOOR = _PyTime.ROUND_FLOOR
+ CEILING = _PyTime.ROUND_CEILING
+ for ns, ms, rnd in (
+ # nanoseconds
+ (1, 0, FLOOR),
+ (1, 1, CEILING),
+ (-1, -1, FLOOR),
+ (-1, 0, CEILING),
+
+ # seconds + nanoseconds
+ (1234 * US_TO_NS + 1, 1234, FLOOR),
+ (1234 * US_TO_NS + 1, 1235, CEILING),
+ (-1234 * US_TO_NS - 1, -1235, FLOOR),
+ (-1234 * US_TO_NS - 1, -1234, CEILING),
+ ):
+ with self.subTest(nanoseconds=ns, milliseconds=ms, round=rnd):
+ self.assertEqual(PyTime_AsMicroseconds(ns, rnd), ms)
+
+
if __name__ == "__main__":
unittest.main()
diff --git a/Lib/test/test_timeit.py b/Lib/test/test_timeit.py
index 918a294c10..2db3c1bed2 100644
--- a/Lib/test/test_timeit.py
+++ b/Lib/test/test_timeit.py
@@ -5,7 +5,6 @@ import io
import time
from textwrap import dedent
-from test.support import run_unittest
from test.support import captured_stdout
from test.support import captured_stderr
@@ -89,8 +88,8 @@ class TestTimeit(unittest.TestCase):
self.assertRaises(SyntaxError, timeit.Timer, setup='continue')
self.assertRaises(SyntaxError, timeit.Timer, setup='from timeit import *')
- fake_setup = "import timeit; timeit._fake_timer.setup()"
- fake_stmt = "import timeit; timeit._fake_timer.inc()"
+ fake_setup = "import timeit\ntimeit._fake_timer.setup()"
+ fake_stmt = "import timeit\ntimeit._fake_timer.inc()"
def fake_callable_setup(self):
self.fake_timer.setup()
@@ -98,9 +97,10 @@ class TestTimeit(unittest.TestCase):
def fake_callable_stmt(self):
self.fake_timer.inc()
- def timeit(self, stmt, setup, number=None):
+ def timeit(self, stmt, setup, number=None, globals=None):
self.fake_timer = FakeTimer()
- t = timeit.Timer(stmt=stmt, setup=setup, timer=self.fake_timer)
+ t = timeit.Timer(stmt=stmt, setup=setup, timer=self.fake_timer,
+ globals=globals)
kwargs = {}
if number is None:
number = DEFAULT_NUMBER
@@ -142,6 +142,17 @@ class TestTimeit(unittest.TestCase):
timer=FakeTimer())
self.assertEqual(delta_time, 0)
+ def test_timeit_globals_args(self):
+ global _global_timer
+ _global_timer = FakeTimer()
+ t = timeit.Timer(stmt='_global_timer.inc()', timer=_global_timer)
+ self.assertRaises(NameError, t.timeit, number=3)
+ timeit.timeit(stmt='_global_timer.inc()', timer=_global_timer,
+ globals=globals(), number=3)
+ local_timer = FakeTimer()
+ timeit.timeit(stmt='local_timer.inc()', timer=local_timer,
+ globals=locals(), number=3)
+
def repeat(self, stmt, setup, repeat=None, number=None):
self.fake_timer = FakeTimer()
t = timeit.Timer(stmt=stmt, setup=setup, timer=self.fake_timer)
@@ -261,6 +272,12 @@ class TestTimeit(unittest.TestCase):
self.assertEqual(s, "CustomSetup\n" * 3 +
"35 loops, best of 3: 2 sec per loop\n")
+ def test_main_multiple_setups(self):
+ s = self.run_main(seconds_per_increment=2.0,
+ switches=['-n35', '-s', 'a = "CustomSetup"', '-s', 'print(a)'])
+ self.assertEqual(s, "CustomSetup\n" * 3 +
+ "35 loops, best of 3: 2 sec per loop\n")
+
def test_main_fixed_reps(self):
s = self.run_main(seconds_per_increment=60.0, switches=['-r9'])
self.assertEqual(s, "10 loops, best of 9: 60 sec per loop\n")
@@ -307,6 +324,26 @@ class TestTimeit(unittest.TestCase):
10000 loops, best of 3: 50 usec per loop
"""))
+ def test_main_with_time_unit(self):
+ unit_sec = self.run_main(seconds_per_increment=0.002,
+ switches=['-u', 'sec'])
+ self.assertEqual(unit_sec,
+ "1000 loops, best of 3: 0.002 sec per loop\n")
+ unit_msec = self.run_main(seconds_per_increment=0.002,
+ switches=['-u', 'msec'])
+ self.assertEqual(unit_msec,
+ "1000 loops, best of 3: 2 msec per loop\n")
+ unit_usec = self.run_main(seconds_per_increment=0.002,
+ switches=['-u', 'usec'])
+ self.assertEqual(unit_usec,
+ "1000 loops, best of 3: 2e+03 usec per loop\n")
+ # Test invalid unit input
+ with captured_stderr() as error_stringio:
+ invalid = self.run_main(seconds_per_increment=0.002,
+ switches=['-u', 'parsec'])
+ self.assertEqual(error_stringio.getvalue(),
+ "Unrecognized unit. Please select usec, msec, or sec.\n")
+
def test_main_exception(self):
with captured_stderr() as error_stringio:
s = self.run_main(switches=['1/0'])
@@ -318,8 +355,5 @@ class TestTimeit(unittest.TestCase):
self.assert_exc_string(error_stringio.getvalue(), 'ZeroDivisionError')
-def test_main():
- run_unittest(TestTimeit)
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_timeout.py b/Lib/test/test_timeout.py
index 703c43ab2b..3c75dcc6f9 100644
--- a/Lib/test/test_timeout.py
+++ b/Lib/test/test_timeout.py
@@ -243,14 +243,14 @@ class TCPTimeoutTestCase(TimeoutTestCase):
def testAcceptTimeout(self):
# Test accept() timeout
support.bind_port(self.sock, self.localhost)
- self.sock.listen(5)
+ self.sock.listen()
self._sock_operation(1, 1.5, 'accept')
def testSend(self):
# Test send() timeout
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as serv:
support.bind_port(serv, self.localhost)
- serv.listen(5)
+ serv.listen()
self.sock.connect(serv.getsockname())
# Send a lot of data in order to bypass buffering in the TCP stack.
self._sock_operation(100, 1.5, 'send', b"X" * 200000)
@@ -259,7 +259,7 @@ class TCPTimeoutTestCase(TimeoutTestCase):
# Test sendto() timeout
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as serv:
support.bind_port(serv, self.localhost)
- serv.listen(5)
+ serv.listen()
self.sock.connect(serv.getsockname())
# The address argument is ignored since we already connected.
self._sock_operation(100, 1.5, 'sendto', b"X" * 200000,
@@ -269,7 +269,7 @@ class TCPTimeoutTestCase(TimeoutTestCase):
# Test sendall() timeout
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as serv:
support.bind_port(serv, self.localhost)
- serv.listen(5)
+ serv.listen()
self.sock.connect(serv.getsockname())
# Send a lot of data in order to bypass buffering in the TCP stack.
self._sock_operation(100, 1.5, 'sendall', b"X" * 200000)
diff --git a/Lib/test/test_tix.py b/Lib/test/test_tix.py
new file mode 100644
index 0000000000..e6ea3d0744
--- /dev/null
+++ b/Lib/test/test_tix.py
@@ -0,0 +1,32 @@
+import unittest
+from test import support
+import sys
+
+# Skip this test if the _tkinter module wasn't built.
+_tkinter = support.import_module('_tkinter')
+
+# Skip test if tk cannot be initialized.
+support.requires('gui')
+
+from tkinter import tix, TclError
+
+
+class TestTix(unittest.TestCase):
+
+ def setUp(self):
+ try:
+ self.root = tix.Tk()
+ except TclError:
+ if sys.platform.startswith('win'):
+ self.fail('Tix should always be available on Windows')
+ self.skipTest('Tix not available')
+ else:
+ self.addCleanup(self.root.destroy)
+
+ def test_tix_available(self):
+ # this test is just here to make setUp run
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/Lib/test/test_tk.py b/Lib/test/test_tk.py
index 62729f0f32..48cefd92e1 100644
--- a/Lib/test/test_tk.py
+++ b/Lib/test/test_tk.py
@@ -2,9 +2,6 @@ from test import support
# Skip test if _tkinter wasn't built.
support.import_module('_tkinter')
-# Make sure tkinter._fix runs to set up the environment
-support.import_fresh_module('tkinter')
-
# Skip test if tk cannot be initialized.
support.requires('gui')
diff --git a/Lib/test/test_tokenize.py b/Lib/test/test_tokenize.py
index 40b0c90dde..3b17ca6329 100644
--- a/Lib/test/test_tokenize.py
+++ b/Lib/test/test_tokenize.py
@@ -424,7 +424,7 @@ def k(x):
def test_multiplicative(self):
# Multiplicative
- self.check_tokenize("x = 1//1*1/5*12%0x12", """\
+ self.check_tokenize("x = 1//1*1/5*12%0x12@42", """\
NAME 'x' (1, 0) (1, 1)
OP '=' (1, 2) (1, 3)
NUMBER '1' (1, 4) (1, 5)
@@ -438,6 +438,8 @@ def k(x):
NUMBER '12' (1, 13) (1, 15)
OP '%' (1, 15) (1, 16)
NUMBER '0x12' (1, 16) (1, 20)
+ OP '@' (1, 20) (1, 21)
+ NUMBER '42' (1, 21) (1, 23)
""")
def test_unary(self):
@@ -561,6 +563,280 @@ def k(x):
STRING "U'green'" (2, 7) (2, 15)
""")
+ def test_async(self):
+ # Async/await extension:
+ self.check_tokenize("async = 1", """\
+ NAME 'async' (1, 0) (1, 5)
+ OP '=' (1, 6) (1, 7)
+ NUMBER '1' (1, 8) (1, 9)
+ """)
+
+ self.check_tokenize("a = (async = 1)", """\
+ NAME 'a' (1, 0) (1, 1)
+ OP '=' (1, 2) (1, 3)
+ OP '(' (1, 4) (1, 5)
+ NAME 'async' (1, 5) (1, 10)
+ OP '=' (1, 11) (1, 12)
+ NUMBER '1' (1, 13) (1, 14)
+ OP ')' (1, 14) (1, 15)
+ """)
+
+ self.check_tokenize("async()", """\
+ NAME 'async' (1, 0) (1, 5)
+ OP '(' (1, 5) (1, 6)
+ OP ')' (1, 6) (1, 7)
+ """)
+
+ self.check_tokenize("class async(Bar):pass", """\
+ NAME 'class' (1, 0) (1, 5)
+ NAME 'async' (1, 6) (1, 11)
+ OP '(' (1, 11) (1, 12)
+ NAME 'Bar' (1, 12) (1, 15)
+ OP ')' (1, 15) (1, 16)
+ OP ':' (1, 16) (1, 17)
+ NAME 'pass' (1, 17) (1, 21)
+ """)
+
+ self.check_tokenize("class async:pass", """\
+ NAME 'class' (1, 0) (1, 5)
+ NAME 'async' (1, 6) (1, 11)
+ OP ':' (1, 11) (1, 12)
+ NAME 'pass' (1, 12) (1, 16)
+ """)
+
+ self.check_tokenize("await = 1", """\
+ NAME 'await' (1, 0) (1, 5)
+ OP '=' (1, 6) (1, 7)
+ NUMBER '1' (1, 8) (1, 9)
+ """)
+
+ self.check_tokenize("foo.async", """\
+ NAME 'foo' (1, 0) (1, 3)
+ OP '.' (1, 3) (1, 4)
+ NAME 'async' (1, 4) (1, 9)
+ """)
+
+ self.check_tokenize("async for a in b: pass", """\
+ NAME 'async' (1, 0) (1, 5)
+ NAME 'for' (1, 6) (1, 9)
+ NAME 'a' (1, 10) (1, 11)
+ NAME 'in' (1, 12) (1, 14)
+ NAME 'b' (1, 15) (1, 16)
+ OP ':' (1, 16) (1, 17)
+ NAME 'pass' (1, 18) (1, 22)
+ """)
+
+ self.check_tokenize("async with a as b: pass", """\
+ NAME 'async' (1, 0) (1, 5)
+ NAME 'with' (1, 6) (1, 10)
+ NAME 'a' (1, 11) (1, 12)
+ NAME 'as' (1, 13) (1, 15)
+ NAME 'b' (1, 16) (1, 17)
+ OP ':' (1, 17) (1, 18)
+ NAME 'pass' (1, 19) (1, 23)
+ """)
+
+ self.check_tokenize("async.foo", """\
+ NAME 'async' (1, 0) (1, 5)
+ OP '.' (1, 5) (1, 6)
+ NAME 'foo' (1, 6) (1, 9)
+ """)
+
+ self.check_tokenize("async", """\
+ NAME 'async' (1, 0) (1, 5)
+ """)
+
+ self.check_tokenize("async\n#comment\nawait", """\
+ NAME 'async' (1, 0) (1, 5)
+ NEWLINE '\\n' (1, 5) (1, 6)
+ COMMENT '#comment' (2, 0) (2, 8)
+ NL '\\n' (2, 8) (2, 9)
+ NAME 'await' (3, 0) (3, 5)
+ """)
+
+ self.check_tokenize("async\n...\nawait", """\
+ NAME 'async' (1, 0) (1, 5)
+ NEWLINE '\\n' (1, 5) (1, 6)
+ OP '...' (2, 0) (2, 3)
+ NEWLINE '\\n' (2, 3) (2, 4)
+ NAME 'await' (3, 0) (3, 5)
+ """)
+
+ self.check_tokenize("async\nawait", """\
+ NAME 'async' (1, 0) (1, 5)
+ NEWLINE '\\n' (1, 5) (1, 6)
+ NAME 'await' (2, 0) (2, 5)
+ """)
+
+ self.check_tokenize("foo.async + 1", """\
+ NAME 'foo' (1, 0) (1, 3)
+ OP '.' (1, 3) (1, 4)
+ NAME 'async' (1, 4) (1, 9)
+ OP '+' (1, 10) (1, 11)
+ NUMBER '1' (1, 12) (1, 13)
+ """)
+
+ self.check_tokenize("async def foo(): pass", """\
+ ASYNC 'async' (1, 0) (1, 5)
+ NAME 'def' (1, 6) (1, 9)
+ NAME 'foo' (1, 10) (1, 13)
+ OP '(' (1, 13) (1, 14)
+ OP ')' (1, 14) (1, 15)
+ OP ':' (1, 15) (1, 16)
+ NAME 'pass' (1, 17) (1, 21)
+ """)
+
+ self.check_tokenize('''\
+async def foo():
+ def foo(await):
+ await = 1
+ if 1:
+ await
+async += 1
+''', """\
+ ASYNC 'async' (1, 0) (1, 5)
+ NAME 'def' (1, 6) (1, 9)
+ NAME 'foo' (1, 10) (1, 13)
+ OP '(' (1, 13) (1, 14)
+ OP ')' (1, 14) (1, 15)
+ OP ':' (1, 15) (1, 16)
+ NEWLINE '\\n' (1, 16) (1, 17)
+ INDENT ' ' (2, 0) (2, 2)
+ NAME 'def' (2, 2) (2, 5)
+ NAME 'foo' (2, 6) (2, 9)
+ OP '(' (2, 9) (2, 10)
+ AWAIT 'await' (2, 10) (2, 15)
+ OP ')' (2, 15) (2, 16)
+ OP ':' (2, 16) (2, 17)
+ NEWLINE '\\n' (2, 17) (2, 18)
+ INDENT ' ' (3, 0) (3, 4)
+ AWAIT 'await' (3, 4) (3, 9)
+ OP '=' (3, 10) (3, 11)
+ NUMBER '1' (3, 12) (3, 13)
+ NEWLINE '\\n' (3, 13) (3, 14)
+ DEDENT '' (4, 2) (4, 2)
+ NAME 'if' (4, 2) (4, 4)
+ NUMBER '1' (4, 5) (4, 6)
+ OP ':' (4, 6) (4, 7)
+ NEWLINE '\\n' (4, 7) (4, 8)
+ INDENT ' ' (5, 0) (5, 4)
+ AWAIT 'await' (5, 4) (5, 9)
+ NEWLINE '\\n' (5, 9) (5, 10)
+ DEDENT '' (6, 0) (6, 0)
+ DEDENT '' (6, 0) (6, 0)
+ NAME 'async' (6, 0) (6, 5)
+ OP '+=' (6, 6) (6, 8)
+ NUMBER '1' (6, 9) (6, 10)
+ NEWLINE '\\n' (6, 10) (6, 11)
+ """)
+
+ self.check_tokenize('''\
+async def foo():
+ async for i in 1: pass''', """\
+ ASYNC 'async' (1, 0) (1, 5)
+ NAME 'def' (1, 6) (1, 9)
+ NAME 'foo' (1, 10) (1, 13)
+ OP '(' (1, 13) (1, 14)
+ OP ')' (1, 14) (1, 15)
+ OP ':' (1, 15) (1, 16)
+ NEWLINE '\\n' (1, 16) (1, 17)
+ INDENT ' ' (2, 0) (2, 2)
+ ASYNC 'async' (2, 2) (2, 7)
+ NAME 'for' (2, 8) (2, 11)
+ NAME 'i' (2, 12) (2, 13)
+ NAME 'in' (2, 14) (2, 16)
+ NUMBER '1' (2, 17) (2, 18)
+ OP ':' (2, 18) (2, 19)
+ NAME 'pass' (2, 20) (2, 24)
+ DEDENT '' (3, 0) (3, 0)
+ """)
+
+ self.check_tokenize('''async def foo(async): await''', """\
+ ASYNC 'async' (1, 0) (1, 5)
+ NAME 'def' (1, 6) (1, 9)
+ NAME 'foo' (1, 10) (1, 13)
+ OP '(' (1, 13) (1, 14)
+ ASYNC 'async' (1, 14) (1, 19)
+ OP ')' (1, 19) (1, 20)
+ OP ':' (1, 20) (1, 21)
+ AWAIT 'await' (1, 22) (1, 27)
+ """)
+
+ self.check_tokenize('''\
+def f():
+
+ def baz(): pass
+ async def bar(): pass
+
+ await = 2''', """\
+ NAME 'def' (1, 0) (1, 3)
+ NAME 'f' (1, 4) (1, 5)
+ OP '(' (1, 5) (1, 6)
+ OP ')' (1, 6) (1, 7)
+ OP ':' (1, 7) (1, 8)
+ NEWLINE '\\n' (1, 8) (1, 9)
+ NL '\\n' (2, 0) (2, 1)
+ INDENT ' ' (3, 0) (3, 2)
+ NAME 'def' (3, 2) (3, 5)
+ NAME 'baz' (3, 6) (3, 9)
+ OP '(' (3, 9) (3, 10)
+ OP ')' (3, 10) (3, 11)
+ OP ':' (3, 11) (3, 12)
+ NAME 'pass' (3, 13) (3, 17)
+ NEWLINE '\\n' (3, 17) (3, 18)
+ ASYNC 'async' (4, 2) (4, 7)
+ NAME 'def' (4, 8) (4, 11)
+ NAME 'bar' (4, 12) (4, 15)
+ OP '(' (4, 15) (4, 16)
+ OP ')' (4, 16) (4, 17)
+ OP ':' (4, 17) (4, 18)
+ NAME 'pass' (4, 19) (4, 23)
+ NEWLINE '\\n' (4, 23) (4, 24)
+ NL '\\n' (5, 0) (5, 1)
+ NAME 'await' (6, 2) (6, 7)
+ OP '=' (6, 8) (6, 9)
+ NUMBER '2' (6, 10) (6, 11)
+ DEDENT '' (7, 0) (7, 0)
+ """)
+
+ self.check_tokenize('''\
+async def f():
+
+ def baz(): pass
+ async def bar(): pass
+
+ await = 2''', """\
+ ASYNC 'async' (1, 0) (1, 5)
+ NAME 'def' (1, 6) (1, 9)
+ NAME 'f' (1, 10) (1, 11)
+ OP '(' (1, 11) (1, 12)
+ OP ')' (1, 12) (1, 13)
+ OP ':' (1, 13) (1, 14)
+ NEWLINE '\\n' (1, 14) (1, 15)
+ NL '\\n' (2, 0) (2, 1)
+ INDENT ' ' (3, 0) (3, 2)
+ NAME 'def' (3, 2) (3, 5)
+ NAME 'baz' (3, 6) (3, 9)
+ OP '(' (3, 9) (3, 10)
+ OP ')' (3, 10) (3, 11)
+ OP ':' (3, 11) (3, 12)
+ NAME 'pass' (3, 13) (3, 17)
+ NEWLINE '\\n' (3, 17) (3, 18)
+ ASYNC 'async' (4, 2) (4, 7)
+ NAME 'def' (4, 8) (4, 11)
+ NAME 'bar' (4, 12) (4, 15)
+ OP '(' (4, 15) (4, 16)
+ OP ')' (4, 16) (4, 17)
+ OP ':' (4, 17) (4, 18)
+ NAME 'pass' (4, 19) (4, 23)
+ NEWLINE '\\n' (4, 23) (4, 24)
+ NL '\\n' (5, 0) (5, 1)
+ AWAIT 'await' (6, 2) (6, 7)
+ OP '=' (6, 8) (6, 9)
+ NUMBER '2' (6, 10) (6, 11)
+ DEDENT '' (7, 0) (7, 0)
+ """)
+
def decistmt(s):
result = []
@@ -971,6 +1247,17 @@ class TestTokenize(TestCase):
self.assertTrue(encoding_used, encoding)
+ def test_oneline_defs(self):
+ buf = []
+ for i in range(500):
+ buf.append('def i{i}(): return {i}'.format(i=i))
+ buf.append('OK')
+ buf = '\n'.join(buf)
+
+ # Test that 500 consequent, one-line defs is OK
+ toks = list(tokenize(BytesIO(buf.encode('utf-8')).readline))
+ self.assertEqual(toks[-2].string, 'OK') # [-1] is always ENDMARKER
+
def assertExactTypeEqual(self, opstr, *optypes):
tokens = list(tokenize(BytesIO(opstr.encode('utf-8')).readline))
num_optypes = len(optypes)
@@ -1025,6 +1312,7 @@ class TestTokenize(TestCase):
self.assertExactTypeEqual('//', token.DOUBLESLASH)
self.assertExactTypeEqual('//=', token.DOUBLESLASHEQUAL)
self.assertExactTypeEqual('@', token.AT)
+ self.assertExactTypeEqual('@=', token.ATEQUAL)
self.assertExactTypeEqual('a**2+b**2==c**2',
NAME, token.DOUBLESTAR, NUMBER,
diff --git a/Lib/test/test_tools/test_gprof2html.py b/Lib/test/test_tools/test_gprof2html.py
index 845a2a8cfa..0c294ec0c4 100644
--- a/Lib/test/test_tools/test_gprof2html.py
+++ b/Lib/test/test_tools/test_gprof2html.py
@@ -22,7 +22,7 @@ class Gprof2htmlTests(unittest.TestCase):
sys.argv = []
def test_gprof(self):
- # Issue #14508: this used to fail with an NameError.
+ # Issue #14508: this used to fail with a NameError.
with mock.patch.object(self.gprof, 'webbrowser') as wmock, \
tempfile.TemporaryDirectory() as tmpdir:
fn = os.path.join(tmpdir, 'abc')
diff --git a/Lib/test/test_tools/test_i18n.py b/Lib/test/test_tools/test_i18n.py
new file mode 100644
index 0000000000..6eaa8ddcc6
--- /dev/null
+++ b/Lib/test/test_tools/test_i18n.py
@@ -0,0 +1,68 @@
+"""Tests to cover the Tools/i18n package"""
+
+import os
+import unittest
+
+from test.support.script_helper import assert_python_ok
+from test.test_tools import toolsdir
+from test.support import temp_cwd
+
+class Test_pygettext(unittest.TestCase):
+ """Tests for the pygettext.py tool"""
+
+ script = os.path.join(toolsdir,'i18n', 'pygettext.py')
+
+ def get_header(self, data):
+ """ utility: return the header of a .po file as a dictionary """
+ headers = {}
+ for line in data.split('\n'):
+ if not line or line.startswith(('#', 'msgid','msgstr')):
+ continue
+ line = line.strip('"')
+ key, val = line.split(':',1)
+ headers[key] = val.strip()
+ return headers
+
+ def test_header(self):
+ """Make sure the required fields are in the header, according to:
+ http://www.gnu.org/software/gettext/manual/gettext.html#Header-Entry
+ """
+ with temp_cwd(None) as cwd:
+ assert_python_ok(self.script)
+ with open('messages.pot') as fp:
+ data = fp.read()
+ header = self.get_header(data)
+
+ self.assertIn("Project-Id-Version", header)
+ self.assertIn("POT-Creation-Date", header)
+ self.assertIn("PO-Revision-Date", header)
+ self.assertIn("Last-Translator", header)
+ self.assertIn("Language-Team", header)
+ self.assertIn("MIME-Version", header)
+ self.assertIn("Content-Type", header)
+ self.assertIn("Content-Transfer-Encoding", header)
+ self.assertIn("Generated-By", header)
+
+ # not clear if these should be required in POT (template) files
+ #self.assertIn("Report-Msgid-Bugs-To", header)
+ #self.assertIn("Language", header)
+
+ #"Plural-Forms" is optional
+
+
+ def test_POT_Creation_Date(self):
+ """ Match the date format from xgettext for POT-Creation-Date """
+ from datetime import datetime
+ with temp_cwd(None) as cwd:
+ assert_python_ok(self.script)
+ with open('messages.pot') as fp:
+ data = fp.read()
+ header = self.get_header(data)
+ creationDate = header['POT-Creation-Date']
+
+ # peel off the escaped newline at the end of string
+ if creationDate.endswith('\\n'):
+ creationDate = creationDate[:-len('\\n')]
+
+ # This will raise if the date format does not exactly match.
+ datetime.strptime(creationDate, '%Y-%m-%d %H:%M%z')
diff --git a/Lib/test/test_tools/test_md5sum.py b/Lib/test/test_tools/test_md5sum.py
index 59ea149238..1305295ef1 100644
--- a/Lib/test/test_tools/test_md5sum.py
+++ b/Lib/test/test_tools/test_md5sum.py
@@ -4,7 +4,7 @@ import os
import sys
import unittest
from test import support
-from test.script_helper import assert_python_ok, assert_python_failure
+from test.support.script_helper import assert_python_ok, assert_python_failure
from test.test_tools import scriptsdir, import_tool, skip_if_missing
diff --git a/Lib/test/test_tools/test_pindent.py b/Lib/test/test_tools/test_pindent.py
index 14a0aa270f..e293bc872c 100644
--- a/Lib/test/test_tools/test_pindent.py
+++ b/Lib/test/test_tools/test_pindent.py
@@ -6,7 +6,7 @@ import unittest
import subprocess
import textwrap
from test import support
-from test.script_helper import assert_python_ok
+from test.support.script_helper import assert_python_ok
from test.test_tools import scriptsdir, skip_if_missing
diff --git a/Lib/test/test_tools/test_reindent.py b/Lib/test/test_tools/test_reindent.py
index 45cebf7288..d7c20e1e5c 100644
--- a/Lib/test/test_tools/test_reindent.py
+++ b/Lib/test/test_tools/test_reindent.py
@@ -6,7 +6,7 @@ Tools directory of a Python checkout or tarball, such as reindent.py.
import os
import unittest
-from test.script_helper import assert_python_ok
+from test.support.script_helper import assert_python_ok
from test.test_tools import scriptsdir, skip_if_missing
diff --git a/Lib/test/test_tools/test_unparse.py b/Lib/test/test_tools/test_unparse.py
index 976a6c59ae..734bbc215a 100644
--- a/Lib/test/test_tools/test_unparse.py
+++ b/Lib/test/test_tools/test_unparse.py
@@ -250,6 +250,11 @@ class UnparseTestCase(ASTTestCase):
def test_with_two_items(self):
self.check_roundtrip(with_two_items)
+ def test_dict_unpacking_in_dict(self):
+ # See issue 26489
+ self.check_roundtrip(r"""{**{'y': 2}, 'x': 1}""")
+ self.check_roundtrip(r"""{**{'y': 2}, **{'x': 1}}""")
+
class DirectoryTestCase(ASTTestCase):
"""Test roundtrip behaviour on all files in Lib and Lib/test."""
diff --git a/Lib/test/test_trace.py b/Lib/test/test_trace.py
index ee3398621b..03dff8432d 100644
--- a/Lib/test/test_trace.py
+++ b/Lib/test/test_trace.py
@@ -9,12 +9,11 @@ from trace import CoverageResults, Trace
from test.tracedmodules import testmod
-
#------------------------------- Utilities -----------------------------------#
def fix_ext_py(filename):
- """Given a .pyc/.pyo filename converts it to the appropriate .py"""
- if filename.endswith(('.pyc', '.pyo')):
+ """Given a .pyc filename converts it to the appropriate .py"""
+ if filename.endswith('.pyc'):
filename = filename[:-1]
return filename
@@ -223,6 +222,11 @@ class TestFuncs(unittest.TestCase):
self.addCleanup(sys.settrace, sys.gettrace())
self.tracer = Trace(count=0, trace=0, countfuncs=1)
self.filemod = my_file_and_modname()
+ self._saved_tracefunc = sys.gettrace()
+
+ def tearDown(self):
+ if self._saved_tracefunc is not None:
+ sys.settrace(self._saved_tracefunc)
def test_simple_caller(self):
self.tracer.runfunc(traced_func_simple_caller, 1)
diff --git a/Lib/test/test_traceback.py b/Lib/test/test_traceback.py
index d6c9df2474..b7695d6eb4 100644
--- a/Lib/test/test_traceback.py
+++ b/Lib/test/test_traceback.py
@@ -1,15 +1,24 @@
"""Test cases for traceback module"""
+from collections import namedtuple
from io import StringIO
+import linecache
import sys
import unittest
import re
-from test.support import run_unittest, Error, captured_output
-from test.support import TESTFN, unlink, cpython_only
+from test import support
+from test.support import TESTFN, Error, captured_output, unlink, cpython_only
+from test.support.script_helper import assert_python_ok
+import textwrap
import traceback
+test_code = namedtuple('code', ['co_filename', 'co_name'])
+test_frame = namedtuple('frame', ['f_code', 'f_globals', 'f_locals'])
+test_tb = namedtuple('tb', ['tb_frame', 'tb_lineno', 'tb_next'])
+
+
class SyntaxTracebackCases(unittest.TestCase):
# For now, a very minimal set of tests. I want to be sure that
# formatting of SyntaxErrors works based on changes for 2.1.
@@ -92,9 +101,9 @@ class SyntaxTracebackCases(unittest.TestCase):
self.assertEqual(len(err), 1)
str_value = '<unprintable %s object>' % X.__name__
if X.__module__ in ('__main__', 'builtins'):
- str_name = X.__name__
+ str_name = X.__qualname__
else:
- str_name = '.'.join([X.__module__, X.__name__])
+ str_name = '.'.join([X.__module__, X.__qualname__])
self.assertEqual(err[0], "%s: %s\n" % (str_name, str_value))
def test_without_exception(self):
@@ -169,6 +178,44 @@ class SyntaxTracebackCases(unittest.TestCase):
# Issue #18960: coding spec should has no effect
do_test("0\n# coding: GBK\n", "h\xe9 ho", 'utf-8', 5)
+ def test_print_traceback_at_exit(self):
+ # Issue #22599: Ensure that it is possible to use the traceback module
+ # to display an exception at Python exit
+ code = textwrap.dedent("""
+ import sys
+ import traceback
+
+ class PrintExceptionAtExit(object):
+ def __init__(self):
+ try:
+ x = 1 / 0
+ except Exception:
+ self.exc_info = sys.exc_info()
+ # self.exc_info[1] (traceback) contains frames:
+ # explicitly clear the reference to self in the current
+ # frame to break a reference cycle
+ self = None
+
+ def __del__(self):
+ traceback.print_exception(*self.exc_info)
+
+ # Keep a reference in the module namespace to call the destructor
+ # when the module is unloaded
+ obj = PrintExceptionAtExit()
+ """)
+ rc, stdout, stderr = assert_python_ok('-c', code)
+ expected = [b'Traceback (most recent call last):',
+ b' File "<string>", line 8, in __init__',
+ b'ZeroDivisionError: division by zero']
+ self.assertEqual(stderr.splitlines(), expected)
+
+ def test_print_exception(self):
+ output = StringIO()
+ traceback.print_exception(
+ Exception, Exception("projector"), None, file=output
+ )
+ self.assertEqual(output.getvalue(), "Exception: projector\n")
+
class TracebackFormatTests(unittest.TestCase):
@@ -439,6 +486,126 @@ class CExcReportingTests(BaseExceptionReportingTests, unittest.TestCase):
return s.getvalue()
+class LimitTests(unittest.TestCase):
+
+ ''' Tests for limit argument.
+ It's enough to test extact_tb, extract_stack and format_exception '''
+
+ def last_raises1(self):
+ raise Exception('Last raised')
+
+ def last_raises2(self):
+ self.last_raises1()
+
+ def last_raises3(self):
+ self.last_raises2()
+
+ def last_raises4(self):
+ self.last_raises3()
+
+ def last_raises5(self):
+ self.last_raises4()
+
+ def last_returns_frame1(self):
+ return sys._getframe()
+
+ def last_returns_frame2(self):
+ return self.last_returns_frame1()
+
+ def last_returns_frame3(self):
+ return self.last_returns_frame2()
+
+ def last_returns_frame4(self):
+ return self.last_returns_frame3()
+
+ def last_returns_frame5(self):
+ return self.last_returns_frame4()
+
+ def test_extract_stack(self):
+ frame = self.last_returns_frame5()
+ def extract(**kwargs):
+ return traceback.extract_stack(frame, **kwargs)
+ def assertEqualExcept(actual, expected, ignore):
+ self.assertEqual(actual[:ignore], expected[:ignore])
+ self.assertEqual(actual[ignore+1:], expected[ignore+1:])
+ self.assertEqual(len(actual), len(expected))
+
+ with support.swap_attr(sys, 'tracebacklimit', 1000):
+ nolim = extract()
+ self.assertGreater(len(nolim), 5)
+ self.assertEqual(extract(limit=2), nolim[-2:])
+ assertEqualExcept(extract(limit=100), nolim[-100:], -5-1)
+ self.assertEqual(extract(limit=-2), nolim[:2])
+ assertEqualExcept(extract(limit=-100), nolim[:100], len(nolim)-5-1)
+ self.assertEqual(extract(limit=0), [])
+ del sys.tracebacklimit
+ assertEqualExcept(extract(), nolim, -5-1)
+ sys.tracebacklimit = 2
+ self.assertEqual(extract(), nolim[-2:])
+ self.assertEqual(extract(limit=3), nolim[-3:])
+ self.assertEqual(extract(limit=-3), nolim[:3])
+ sys.tracebacklimit = 0
+ self.assertEqual(extract(), [])
+ sys.tracebacklimit = -1
+ self.assertEqual(extract(), [])
+
+ def test_extract_tb(self):
+ try:
+ self.last_raises5()
+ except Exception:
+ exc_type, exc_value, tb = sys.exc_info()
+ def extract(**kwargs):
+ return traceback.extract_tb(tb, **kwargs)
+
+ with support.swap_attr(sys, 'tracebacklimit', 1000):
+ nolim = extract()
+ self.assertEqual(len(nolim), 5+1)
+ self.assertEqual(extract(limit=2), nolim[:2])
+ self.assertEqual(extract(limit=10), nolim)
+ self.assertEqual(extract(limit=-2), nolim[-2:])
+ self.assertEqual(extract(limit=-10), nolim)
+ self.assertEqual(extract(limit=0), [])
+ del sys.tracebacklimit
+ self.assertEqual(extract(), nolim)
+ sys.tracebacklimit = 2
+ self.assertEqual(extract(), nolim[:2])
+ self.assertEqual(extract(limit=3), nolim[:3])
+ self.assertEqual(extract(limit=-3), nolim[-3:])
+ sys.tracebacklimit = 0
+ self.assertEqual(extract(), [])
+ sys.tracebacklimit = -1
+ self.assertEqual(extract(), [])
+
+ def test_format_exception(self):
+ try:
+ self.last_raises5()
+ except Exception:
+ exc_type, exc_value, tb = sys.exc_info()
+ # [1:-1] to exclude "Traceback (...)" header and
+ # exception type and value
+ def extract(**kwargs):
+ return traceback.format_exception(exc_type, exc_value, tb, **kwargs)[1:-1]
+
+ with support.swap_attr(sys, 'tracebacklimit', 1000):
+ nolim = extract()
+ self.assertEqual(len(nolim), 5+1)
+ self.assertEqual(extract(limit=2), nolim[:2])
+ self.assertEqual(extract(limit=10), nolim)
+ self.assertEqual(extract(limit=-2), nolim[-2:])
+ self.assertEqual(extract(limit=-10), nolim)
+ self.assertEqual(extract(limit=0), [])
+ del sys.tracebacklimit
+ self.assertEqual(extract(), nolim)
+ sys.tracebacklimit = 2
+ self.assertEqual(extract(), nolim[:2])
+ self.assertEqual(extract(limit=3), nolim[:3])
+ self.assertEqual(extract(limit=-3), nolim[-3:])
+ sys.tracebacklimit = 0
+ self.assertEqual(extract(), [])
+ sys.tracebacklimit = -1
+ self.assertEqual(extract(), [])
+
+
class MiscTracebackCases(unittest.TestCase):
#
# Check non-printing functions in traceback module
@@ -476,11 +643,279 @@ class MiscTracebackCases(unittest.TestCase):
self.assertEqual(result[-2:], [
(__file__, lineno+2, 'test_extract_stack', 'result = extract()'),
(__file__, lineno+1, 'extract', 'return traceback.extract_stack()'),
- ])
+ ])
+
+
+class TestFrame(unittest.TestCase):
+
+ def test_basics(self):
+ linecache.clearcache()
+ linecache.lazycache("f", globals())
+ f = traceback.FrameSummary("f", 1, "dummy")
+ self.assertEqual(f,
+ ("f", 1, "dummy", '"""Test cases for traceback module"""'))
+ self.assertEqual(tuple(f),
+ ("f", 1, "dummy", '"""Test cases for traceback module"""'))
+ self.assertEqual(f, traceback.FrameSummary("f", 1, "dummy"))
+ self.assertEqual(f, tuple(f))
+ # Since tuple.__eq__ doesn't support FrameSummary, the equality
+ # operator fallbacks to FrameSummary.__eq__.
+ self.assertEqual(tuple(f), f)
+ self.assertIsNone(f.locals)
+
+ def test_lazy_lines(self):
+ linecache.clearcache()
+ f = traceback.FrameSummary("f", 1, "dummy", lookup_line=False)
+ self.assertEqual(None, f._line)
+ linecache.lazycache("f", globals())
+ self.assertEqual(
+ '"""Test cases for traceback module"""',
+ f.line)
+
+ def test_explicit_line(self):
+ f = traceback.FrameSummary("f", 1, "dummy", line="line")
+ self.assertEqual("line", f.line)
+
+
+class TestStack(unittest.TestCase):
+
+ def test_walk_stack(self):
+ s = list(traceback.walk_stack(None))
+ self.assertGreater(len(s), 10)
+
+ def test_walk_tb(self):
+ try:
+ 1/0
+ except Exception:
+ _, _, tb = sys.exc_info()
+ s = list(traceback.walk_tb(tb))
+ self.assertEqual(len(s), 1)
+
+ def test_extract_stack(self):
+ s = traceback.StackSummary.extract(traceback.walk_stack(None))
+ self.assertIsInstance(s, traceback.StackSummary)
+
+ def test_extract_stack_limit(self):
+ s = traceback.StackSummary.extract(traceback.walk_stack(None), limit=5)
+ self.assertEqual(len(s), 5)
+
+ def test_extract_stack_lookup_lines(self):
+ linecache.clearcache()
+ linecache.updatecache('/foo.py', globals())
+ c = test_code('/foo.py', 'method')
+ f = test_frame(c, None, None)
+ s = traceback.StackSummary.extract(iter([(f, 6)]), lookup_lines=True)
+ linecache.clearcache()
+ self.assertEqual(s[0].line, "import sys")
+
+ def test_extract_stackup_deferred_lookup_lines(self):
+ linecache.clearcache()
+ c = test_code('/foo.py', 'method')
+ f = test_frame(c, None, None)
+ s = traceback.StackSummary.extract(iter([(f, 6)]), lookup_lines=False)
+ self.assertEqual({}, linecache.cache)
+ linecache.updatecache('/foo.py', globals())
+ self.assertEqual(s[0].line, "import sys")
+
+ def test_from_list(self):
+ s = traceback.StackSummary.from_list([('foo.py', 1, 'fred', 'line')])
+ self.assertEqual(
+ [' File "foo.py", line 1, in fred\n line\n'],
+ s.format())
+
+ def test_from_list_edited_stack(self):
+ s = traceback.StackSummary.from_list([('foo.py', 1, 'fred', 'line')])
+ s[0] = ('foo.py', 2, 'fred', 'line')
+ s2 = traceback.StackSummary.from_list(s)
+ self.assertEqual(
+ [' File "foo.py", line 2, in fred\n line\n'],
+ s2.format())
+
+ def test_format_smoke(self):
+ # For detailed tests see the format_list tests, which consume the same
+ # code.
+ s = traceback.StackSummary.from_list([('foo.py', 1, 'fred', 'line')])
+ self.assertEqual(
+ [' File "foo.py", line 1, in fred\n line\n'],
+ s.format())
+
+ def test_locals(self):
+ linecache.updatecache('/foo.py', globals())
+ c = test_code('/foo.py', 'method')
+ f = test_frame(c, globals(), {'something': 1})
+ s = traceback.StackSummary.extract(iter([(f, 6)]), capture_locals=True)
+ self.assertEqual(s[0].locals, {'something': '1'})
+
+ def test_no_locals(self):
+ linecache.updatecache('/foo.py', globals())
+ c = test_code('/foo.py', 'method')
+ f = test_frame(c, globals(), {'something': 1})
+ s = traceback.StackSummary.extract(iter([(f, 6)]))
+ self.assertEqual(s[0].locals, None)
+
+ def test_format_locals(self):
+ def some_inner(k, v):
+ a = 1
+ b = 2
+ return traceback.StackSummary.extract(
+ traceback.walk_stack(None), capture_locals=True, limit=1)
+ s = some_inner(3, 4)
+ self.assertEqual(
+ [' File "%s", line %d, in some_inner\n'
+ ' traceback.walk_stack(None), capture_locals=True, limit=1)\n'
+ ' a = 1\n'
+ ' b = 2\n'
+ ' k = 3\n'
+ ' v = 4\n' % (__file__, some_inner.__code__.co_firstlineno + 4)
+ ], s.format())
+
+class TestTracebackException(unittest.TestCase):
+
+ def test_smoke(self):
+ try:
+ 1/0
+ except Exception:
+ exc_info = sys.exc_info()
+ exc = traceback.TracebackException(*exc_info)
+ expected_stack = traceback.StackSummary.extract(
+ traceback.walk_tb(exc_info[2]))
+ self.assertEqual(None, exc.__cause__)
+ self.assertEqual(None, exc.__context__)
+ self.assertEqual(False, exc.__suppress_context__)
+ self.assertEqual(expected_stack, exc.stack)
+ self.assertEqual(exc_info[0], exc.exc_type)
+ self.assertEqual(str(exc_info[1]), str(exc))
+
+ def test_from_exception(self):
+ # Check all the parameters are accepted.
+ def foo():
+ 1/0
+ try:
+ foo()
+ except Exception as e:
+ exc_info = sys.exc_info()
+ self.expected_stack = traceback.StackSummary.extract(
+ traceback.walk_tb(exc_info[2]), limit=1, lookup_lines=False,
+ capture_locals=True)
+ self.exc = traceback.TracebackException.from_exception(
+ e, limit=1, lookup_lines=False, capture_locals=True)
+ expected_stack = self.expected_stack
+ exc = self.exc
+ self.assertEqual(None, exc.__cause__)
+ self.assertEqual(None, exc.__context__)
+ self.assertEqual(False, exc.__suppress_context__)
+ self.assertEqual(expected_stack, exc.stack)
+ self.assertEqual(exc_info[0], exc.exc_type)
+ self.assertEqual(str(exc_info[1]), str(exc))
+
+ def test_cause(self):
+ try:
+ try:
+ 1/0
+ finally:
+ exc_info_context = sys.exc_info()
+ exc_context = traceback.TracebackException(*exc_info_context)
+ cause = Exception("cause")
+ raise Exception("uh oh") from cause
+ except Exception:
+ exc_info = sys.exc_info()
+ exc = traceback.TracebackException(*exc_info)
+ expected_stack = traceback.StackSummary.extract(
+ traceback.walk_tb(exc_info[2]))
+ exc_cause = traceback.TracebackException(Exception, cause, None)
+ self.assertEqual(exc_cause, exc.__cause__)
+ self.assertEqual(exc_context, exc.__context__)
+ self.assertEqual(True, exc.__suppress_context__)
+ self.assertEqual(expected_stack, exc.stack)
+ self.assertEqual(exc_info[0], exc.exc_type)
+ self.assertEqual(str(exc_info[1]), str(exc))
+ def test_context(self):
+ try:
+ try:
+ 1/0
+ finally:
+ exc_info_context = sys.exc_info()
+ exc_context = traceback.TracebackException(*exc_info_context)
+ raise Exception("uh oh")
+ except Exception:
+ exc_info = sys.exc_info()
+ exc = traceback.TracebackException(*exc_info)
+ expected_stack = traceback.StackSummary.extract(
+ traceback.walk_tb(exc_info[2]))
+ self.assertEqual(None, exc.__cause__)
+ self.assertEqual(exc_context, exc.__context__)
+ self.assertEqual(False, exc.__suppress_context__)
+ self.assertEqual(expected_stack, exc.stack)
+ self.assertEqual(exc_info[0], exc.exc_type)
+ self.assertEqual(str(exc_info[1]), str(exc))
+
+ def test_limit(self):
+ def recurse(n):
+ if n:
+ recurse(n-1)
+ else:
+ 1/0
+ try:
+ recurse(10)
+ except Exception:
+ exc_info = sys.exc_info()
+ exc = traceback.TracebackException(*exc_info, limit=5)
+ expected_stack = traceback.StackSummary.extract(
+ traceback.walk_tb(exc_info[2]), limit=5)
+ self.assertEqual(expected_stack, exc.stack)
+
+ def test_lookup_lines(self):
+ linecache.clearcache()
+ e = Exception("uh oh")
+ c = test_code('/foo.py', 'method')
+ f = test_frame(c, None, None)
+ tb = test_tb(f, 6, None)
+ exc = traceback.TracebackException(Exception, e, tb, lookup_lines=False)
+ self.assertEqual({}, linecache.cache)
+ linecache.updatecache('/foo.py', globals())
+ self.assertEqual(exc.stack[0].line, "import sys")
+
+ def test_locals(self):
+ linecache.updatecache('/foo.py', globals())
+ e = Exception("uh oh")
+ c = test_code('/foo.py', 'method')
+ f = test_frame(c, globals(), {'something': 1, 'other': 'string'})
+ tb = test_tb(f, 6, None)
+ exc = traceback.TracebackException(
+ Exception, e, tb, capture_locals=True)
+ self.assertEqual(
+ exc.stack[0].locals, {'something': '1', 'other': "'string'"})
+
+ def test_no_locals(self):
+ linecache.updatecache('/foo.py', globals())
+ e = Exception("uh oh")
+ c = test_code('/foo.py', 'method')
+ f = test_frame(c, globals(), {'something': 1})
+ tb = test_tb(f, 6, None)
+ exc = traceback.TracebackException(Exception, e, tb)
+ self.assertEqual(exc.stack[0].locals, None)
+
+ def test_traceback_header(self):
+ # do not print a traceback header if exc_traceback is None
+ # see issue #24695
+ exc = traceback.TracebackException(Exception, Exception("haven"), None)
+ self.assertEqual(list(exc.format()), ["Exception: haven\n"])
+
+
+class MiscTest(unittest.TestCase):
+
+ def test_all(self):
+ expected = set()
+ blacklist = {'print_list'}
+ for name in dir(traceback):
+ if name.startswith('_') or name in blacklist:
+ continue
+ module_object = getattr(traceback, name)
+ if getattr(module_object, '__module__', None) == 'traceback':
+ expected.add(name)
+ self.assertCountEqual(traceback.__all__, expected)
-def test_main():
- run_unittest(__name__)
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_tracemalloc.py b/Lib/test/test_tracemalloc.py
index 48ccab28b8..da89a9a871 100644
--- a/Lib/test/test_tracemalloc.py
+++ b/Lib/test/test_tracemalloc.py
@@ -4,8 +4,9 @@ import sys
import tracemalloc
import unittest
from unittest.mock import patch
-from test.script_helper import assert_python_ok, assert_python_failure
-from test import script_helper, support
+from test.support.script_helper import (assert_python_ok, assert_python_failure,
+ interpreter_requires_environment)
+from test import support
try:
import threading
except ImportError:
@@ -252,7 +253,7 @@ class TestTracemallocEnabled(unittest.TestCase):
snapshot.dump(support.TESTFN)
self.addCleanup(support.unlink, support.TESTFN)
- # load() should recreates the attribute
+ # load() should recreate the attribute
snapshot2 = tracemalloc.Snapshot.load(support.TESTFN)
self.assertEqual(snapshot2.test_attr, "new")
@@ -660,11 +661,9 @@ class TestFilters(unittest.TestCase):
self.assertFalse(fnmatch('abcdd', 'a*c*e'))
self.assertFalse(fnmatch('abcbdefef', 'a*bd*eg'))
- # replace .pyc and .pyo suffix with .py
+ # replace .pyc suffix with .py
self.assertTrue(fnmatch('a.pyc', 'a.py'))
- self.assertTrue(fnmatch('a.pyo', 'a.py'))
self.assertTrue(fnmatch('a.py', 'a.pyc'))
- self.assertTrue(fnmatch('a.py', 'a.pyo'))
if os.name == 'nt':
# case insensitive
@@ -672,18 +671,14 @@ class TestFilters(unittest.TestCase):
self.assertTrue(fnmatch('aBcDe', 'Ab*dE'))
self.assertTrue(fnmatch('a.pyc', 'a.PY'))
- self.assertTrue(fnmatch('a.PYO', 'a.py'))
self.assertTrue(fnmatch('a.py', 'a.PYC'))
- self.assertTrue(fnmatch('a.PY', 'a.pyo'))
else:
# case sensitive
self.assertFalse(fnmatch('aBC', 'ABc'))
self.assertFalse(fnmatch('aBcDe', 'Ab*dE'))
self.assertFalse(fnmatch('a.pyc', 'a.PY'))
- self.assertFalse(fnmatch('a.PYO', 'a.py'))
self.assertFalse(fnmatch('a.py', 'a.PYC'))
- self.assertFalse(fnmatch('a.PY', 'a.pyo'))
if os.name == 'nt':
# normalize alternate separator "/" to the standard separator "\"
@@ -698,6 +693,9 @@ class TestFilters(unittest.TestCase):
self.assertFalse(fnmatch(r'a/b\c', r'a\b/c'))
self.assertFalse(fnmatch(r'a/b/c', r'a\b\c'))
+ # as of 3.5, .pyo is no longer munged to .py
+ self.assertFalse(fnmatch('a.pyo', 'a.py'))
+
def test_filter_match_trace(self):
t1 = (("a.py", 2), ("b.py", 3))
t2 = (("b.py", 4), ("b.py", 5))
@@ -755,7 +753,7 @@ class TestCommandLine(unittest.TestCase):
stdout = stdout.rstrip()
self.assertEqual(stdout, b'False')
- @unittest.skipIf(script_helper._interpreter_requires_environment(),
+ @unittest.skipIf(interpreter_requires_environment(),
'Cannot run -E tests when PYTHON env vars are required.')
def test_env_var_ignored_with_E(self):
"""PYTHON* environment variables must be ignored when -E is present."""
diff --git a/Lib/test/test_ttk_guionly.py b/Lib/test/test_ttk_guionly.py
index fcdedac34d..490e72337f 100644
--- a/Lib/test/test_ttk_guionly.py
+++ b/Lib/test/test_ttk_guionly.py
@@ -5,12 +5,10 @@ from test import support
# Skip this test if _tkinter wasn't built.
support.import_module('_tkinter')
-# Make sure tkinter._fix runs to set up the environment
-tkinter = support.import_fresh_module('tkinter')
-
# Skip test if tk cannot be initialized.
support.requires('gui')
+import tkinter
from _tkinter import TclError
from tkinter import ttk
from tkinter.test import runtktests
diff --git a/Lib/test/test_ttk_textonly.py b/Lib/test/test_ttk_textonly.py
index 1cfeb15d2a..566fc9d09a 100644
--- a/Lib/test/test_ttk_textonly.py
+++ b/Lib/test/test_ttk_textonly.py
@@ -4,9 +4,6 @@ from test import support
# Skip this test if _tkinter does not exist.
support.import_module('_tkinter')
-# Make sure tkinter._fix runs to set up the environment
-support.import_fresh_module('tkinter')
-
from tkinter.test import runtktests
def test_main():
diff --git a/Lib/test/test_tuple.py b/Lib/test/test_tuple.py
index 51875a1cbd..5d1fcf68a8 100644
--- a/Lib/test/test_tuple.py
+++ b/Lib/test/test_tuple.py
@@ -1,4 +1,5 @@
from test import support, seq_tests
+import unittest
import gc
import pickle
@@ -6,6 +7,11 @@ import pickle
class TupleTest(seq_tests.CommonTest):
type2test = tuple
+ def test_getitem_error(self):
+ msg = "tuple indices must be integers or slices"
+ with self.assertRaisesRegex(TypeError, msg):
+ ()['a']
+
def test_constructors(self):
super().test_constructors()
# calling built-in types without argument must return empty
@@ -203,8 +209,13 @@ class TupleTest(seq_tests.CommonTest):
with self.assertRaises(TypeError):
[3,] + T((1,2))
-def test_main():
- support.run_unittest(TupleTest)
+ def test_lexicographic_ordering(self):
+ # Issue 21100
+ a = self.type2test([1, 2])
+ b = self.type2test([1, 2, 0])
+ c = self.type2test([1, 3])
+ self.assertLess(a, b)
+ self.assertLess(b, c)
-if __name__=="__main__":
- test_main()
+if __name__ == "__main__":
+ unittest.main()
diff --git a/Lib/test/test_turtle.py b/Lib/test/test_turtle.py
new file mode 100644
index 0000000000..2fd10ccd50
--- /dev/null
+++ b/Lib/test/test_turtle.py
@@ -0,0 +1,436 @@
+import pickle
+import unittest
+from test import support
+
+turtle = support.import_module('turtle')
+Vec2D = turtle.Vec2D
+
+test_config = """\
+width = 0.75
+height = 0.8
+canvwidth = 500
+canvheight = 200
+leftright = 100
+topbottom = 100
+mode = world
+colormode = 255
+delay = 100
+undobuffersize = 10000
+shape = circle
+pencolor = red
+fillcolor = blue
+resizemode = auto
+visible = None
+language = english
+exampleturtle = turtle
+examplescreen = screen
+title = Python Turtle Graphics
+using_IDLE = ''
+"""
+
+test_config_two = """\
+# Comments!
+# Testing comments!
+pencolor = red
+fillcolor = blue
+visible = False
+language = english
+# Some more
+# comments
+using_IDLE = False
+"""
+
+invalid_test_config = """
+pencolor = red
+fillcolor: blue
+visible = False
+"""
+
+
+class TurtleConfigTest(unittest.TestCase):
+
+ def get_cfg_file(self, cfg_str):
+ self.addCleanup(support.unlink, support.TESTFN)
+ with open(support.TESTFN, 'w') as f:
+ f.write(cfg_str)
+ return support.TESTFN
+
+ def test_config_dict(self):
+
+ cfg_name = self.get_cfg_file(test_config)
+ parsed_cfg = turtle.config_dict(cfg_name)
+
+ expected = {
+ 'width' : 0.75,
+ 'height' : 0.8,
+ 'canvwidth' : 500,
+ 'canvheight': 200,
+ 'leftright': 100,
+ 'topbottom': 100,
+ 'mode': 'world',
+ 'colormode': 255,
+ 'delay': 100,
+ 'undobuffersize': 10000,
+ 'shape': 'circle',
+ 'pencolor' : 'red',
+ 'fillcolor' : 'blue',
+ 'resizemode' : 'auto',
+ 'visible' : None,
+ 'language': 'english',
+ 'exampleturtle': 'turtle',
+ 'examplescreen': 'screen',
+ 'title': 'Python Turtle Graphics',
+ 'using_IDLE': '',
+ }
+
+ self.assertEqual(parsed_cfg, expected)
+
+ def test_partial_config_dict_with_commments(self):
+
+ cfg_name = self.get_cfg_file(test_config_two)
+ parsed_cfg = turtle.config_dict(cfg_name)
+
+ expected = {
+ 'pencolor': 'red',
+ 'fillcolor': 'blue',
+ 'visible': False,
+ 'language': 'english',
+ 'using_IDLE': False,
+ }
+
+ self.assertEqual(parsed_cfg, expected)
+
+ def test_config_dict_invalid(self):
+
+ cfg_name = self.get_cfg_file(invalid_test_config)
+
+ with support.captured_stdout() as stdout:
+ parsed_cfg = turtle.config_dict(cfg_name)
+
+ err_msg = stdout.getvalue()
+
+ self.assertIn('Bad line in config-file ', err_msg)
+ self.assertIn('fillcolor: blue', err_msg)
+
+ self.assertEqual(parsed_cfg, {
+ 'pencolor': 'red',
+ 'visible': False,
+ })
+
+
+class VectorComparisonMixin:
+
+ def assertVectorsAlmostEqual(self, vec1, vec2):
+ if len(vec1) != len(vec2):
+ self.fail("Tuples are not of equal size")
+ for idx, (i, j) in enumerate(zip(vec1, vec2)):
+ self.assertAlmostEqual(
+ i, j, msg='values at index {} do not match'.format(idx))
+
+
+class TestVec2D(VectorComparisonMixin, unittest.TestCase):
+
+ def test_constructor(self):
+ vec = Vec2D(0.5, 2)
+ self.assertEqual(vec[0], 0.5)
+ self.assertEqual(vec[1], 2)
+ self.assertIsInstance(vec, Vec2D)
+
+ self.assertRaises(TypeError, Vec2D)
+ self.assertRaises(TypeError, Vec2D, 0)
+ self.assertRaises(TypeError, Vec2D, (0, 1))
+ self.assertRaises(TypeError, Vec2D, vec)
+ self.assertRaises(TypeError, Vec2D, 0, 1, 2)
+
+ def test_repr(self):
+ vec = Vec2D(0.567, 1.234)
+ self.assertEqual(repr(vec), '(0.57,1.23)')
+
+ def test_equality(self):
+ vec1 = Vec2D(0, 1)
+ vec2 = Vec2D(0.0, 1)
+ vec3 = Vec2D(42, 1)
+ self.assertEqual(vec1, vec2)
+ self.assertEqual(vec1, tuple(vec1))
+ self.assertEqual(tuple(vec1), vec1)
+ self.assertNotEqual(vec1, vec3)
+ self.assertNotEqual(vec2, vec3)
+
+ def test_pickling(self):
+ vec = Vec2D(0.5, 2)
+ for proto in range(pickle.HIGHEST_PROTOCOL + 1):
+ with self.subTest(proto=proto):
+ pickled = pickle.dumps(vec, protocol=proto)
+ unpickled = pickle.loads(pickled)
+ self.assertEqual(unpickled, vec)
+ self.assertIsInstance(unpickled, Vec2D)
+
+ def _assert_arithmetic_cases(self, test_cases, lambda_operator):
+ for test_case in test_cases:
+ with self.subTest(case=test_case):
+
+ ((first, second), expected) = test_case
+
+ op1 = Vec2D(*first)
+ op2 = Vec2D(*second)
+
+ result = lambda_operator(op1, op2)
+
+ expected = Vec2D(*expected)
+
+ self.assertVectorsAlmostEqual(result, expected)
+
+ def test_vector_addition(self):
+
+ test_cases = [
+ (((0, 0), (1, 1)), (1.0, 1.0)),
+ (((-1, 0), (2, 2)), (1, 2)),
+ (((1.5, 0), (1, 1)), (2.5, 1)),
+ ]
+
+ self._assert_arithmetic_cases(test_cases, lambda x, y: x + y)
+
+ def test_vector_subtraction(self):
+
+ test_cases = [
+ (((0, 0), (1, 1)), (-1, -1)),
+ (((10.625, 0.125), (10, 0)), (0.625, 0.125)),
+ ]
+
+ self._assert_arithmetic_cases(test_cases, lambda x, y: x - y)
+
+ def test_vector_multiply(self):
+
+ vec1 = Vec2D(10, 10)
+ vec2 = Vec2D(0.5, 3)
+ answer = vec1 * vec2
+ expected = 35
+ self.assertAlmostEqual(answer, expected)
+
+ vec = Vec2D(0.5, 3)
+ answer = vec * 10
+ expected = Vec2D(5, 30)
+ self.assertVectorsAlmostEqual(answer, expected)
+
+ def test_vector_negative(self):
+ vec = Vec2D(10, -10)
+ expected = (-10, 10)
+ self.assertVectorsAlmostEqual(-vec, expected)
+
+ def test_distance(self):
+ vec = Vec2D(6, 8)
+ expected = 10
+ self.assertEqual(abs(vec), expected)
+
+ vec = Vec2D(0, 0)
+ expected = 0
+ self.assertEqual(abs(vec), expected)
+
+ vec = Vec2D(2.5, 6)
+ expected = 6.5
+ self.assertEqual(abs(vec), expected)
+
+ def test_rotate(self):
+
+ cases = [
+ (((0, 0), 0), (0, 0)),
+ (((0, 1), 90), (-1, 0)),
+ (((0, 1), -90), (1, 0)),
+ (((1, 0), 180), (-1, 0)),
+ (((1, 0), 360), (1, 0)),
+ ]
+
+ for case in cases:
+ with self.subTest(case=case):
+ (vec, rot), expected = case
+ vec = Vec2D(*vec)
+ got = vec.rotate(rot)
+ self.assertVectorsAlmostEqual(got, expected)
+
+
+class TestTNavigator(VectorComparisonMixin, unittest.TestCase):
+
+ def setUp(self):
+ self.nav = turtle.TNavigator()
+
+ def test_goto(self):
+ self.nav.goto(100, -100)
+ self.assertAlmostEqual(self.nav.xcor(), 100)
+ self.assertAlmostEqual(self.nav.ycor(), -100)
+
+ def test_pos(self):
+ self.assertEqual(self.nav.pos(), self.nav._position)
+ self.nav.goto(100, -100)
+ self.assertEqual(self.nav.pos(), self.nav._position)
+
+ def test_left(self):
+ self.assertEqual(self.nav._orient, (1.0, 0))
+ self.nav.left(90)
+ self.assertVectorsAlmostEqual(self.nav._orient, (0.0, 1.0))
+
+ def test_right(self):
+ self.assertEqual(self.nav._orient, (1.0, 0))
+ self.nav.right(90)
+ self.assertVectorsAlmostEqual(self.nav._orient, (0, -1.0))
+
+ def test_reset(self):
+ self.nav.goto(100, -100)
+ self.assertAlmostEqual(self.nav.xcor(), 100)
+ self.assertAlmostEqual(self.nav.ycor(), -100)
+ self.nav.reset()
+ self.assertAlmostEqual(self.nav.xcor(), 0)
+ self.assertAlmostEqual(self.nav.ycor(), 0)
+
+ def test_forward(self):
+ self.nav.forward(150)
+ expected = Vec2D(150, 0)
+ self.assertVectorsAlmostEqual(self.nav.position(), expected)
+
+ self.nav.reset()
+ self.nav.left(90)
+ self.nav.forward(150)
+ expected = Vec2D(0, 150)
+ self.assertVectorsAlmostEqual(self.nav.position(), expected)
+
+ self.assertRaises(TypeError, self.nav.forward, 'skldjfldsk')
+
+ def test_backwards(self):
+ self.nav.back(200)
+ expected = Vec2D(-200, 0)
+ self.assertVectorsAlmostEqual(self.nav.position(), expected)
+
+ self.nav.reset()
+ self.nav.right(90)
+ self.nav.back(200)
+ expected = Vec2D(0, 200)
+ self.assertVectorsAlmostEqual(self.nav.position(), expected)
+
+ def test_distance(self):
+ self.nav.forward(100)
+ expected = 100
+ self.assertAlmostEqual(self.nav.distance(Vec2D(0,0)), expected)
+
+ def test_radians_and_degrees(self):
+ self.nav.left(90)
+ self.assertAlmostEqual(self.nav.heading(), 90)
+ self.nav.radians()
+ self.assertAlmostEqual(self.nav.heading(), 1.57079633)
+ self.nav.degrees()
+ self.assertAlmostEqual(self.nav.heading(), 90)
+
+ def test_towards(self):
+
+ coordinates = [
+ # coordinates, expected
+ ((100, 0), 0.0),
+ ((100, 100), 45.0),
+ ((0, 100), 90.0),
+ ((-100, 100), 135.0),
+ ((-100, 0), 180.0),
+ ((-100, -100), 225.0),
+ ((0, -100), 270.0),
+ ((100, -100), 315.0),
+ ]
+
+ for (x, y), expected in coordinates:
+ self.assertEqual(self.nav.towards(x, y), expected)
+ self.assertEqual(self.nav.towards((x, y)), expected)
+ self.assertEqual(self.nav.towards(Vec2D(x, y)), expected)
+
+ def test_heading(self):
+
+ self.nav.left(90)
+ self.assertAlmostEqual(self.nav.heading(), 90)
+ self.nav.left(45)
+ self.assertAlmostEqual(self.nav.heading(), 135)
+ self.nav.right(1.6)
+ self.assertAlmostEqual(self.nav.heading(), 133.4)
+ self.assertRaises(TypeError, self.nav.right, 'sdkfjdsf')
+ self.nav.reset()
+
+ rotations = [10, 20, 170, 300]
+ result = sum(rotations) % 360
+ for num in rotations:
+ self.nav.left(num)
+ self.assertEqual(self.nav.heading(), result)
+ self.nav.reset()
+
+ result = (360-sum(rotations)) % 360
+ for num in rotations:
+ self.nav.right(num)
+ self.assertEqual(self.nav.heading(), result)
+ self.nav.reset()
+
+ rotations = [10, 20, -170, 300, -210, 34.3, -50.2, -10, -29.98, 500]
+ sum_so_far = 0
+ for num in rotations:
+ if num < 0:
+ self.nav.right(abs(num))
+ else:
+ self.nav.left(num)
+ sum_so_far += num
+ self.assertAlmostEqual(self.nav.heading(), sum_so_far % 360)
+
+ def test_setheading(self):
+ self.nav.setheading(102.32)
+ self.assertAlmostEqual(self.nav.heading(), 102.32)
+ self.nav.setheading(-123.23)
+ self.assertAlmostEqual(self.nav.heading(), (-123.23) % 360)
+ self.nav.setheading(-1000.34)
+ self.assertAlmostEqual(self.nav.heading(), (-1000.34) % 360)
+ self.nav.setheading(300000)
+ self.assertAlmostEqual(self.nav.heading(), 300000%360)
+
+ def test_positions(self):
+ self.nav.forward(100)
+ self.nav.left(90)
+ self.nav.forward(-200)
+ self.assertVectorsAlmostEqual(self.nav.pos(), (100.0, -200.0))
+
+ def test_setx_and_sety(self):
+ self.nav.setx(-1023.2334)
+ self.nav.sety(193323.234)
+ self.assertVectorsAlmostEqual(self.nav.pos(), (-1023.2334, 193323.234))
+
+ def test_home(self):
+ self.nav.left(30)
+ self.nav.forward(-100000)
+ self.nav.home()
+ self.assertVectorsAlmostEqual(self.nav.pos(), (0,0))
+ self.assertAlmostEqual(self.nav.heading(), 0)
+
+ def test_distance_method(self):
+ self.assertAlmostEqual(self.nav.distance(30, 40), 50)
+ vec = Vec2D(0.22, .001)
+ self.assertAlmostEqual(self.nav.distance(vec), 0.22000227271553355)
+ another_turtle = turtle.TNavigator()
+ another_turtle.left(90)
+ another_turtle.forward(10000)
+ self.assertAlmostEqual(self.nav.distance(another_turtle), 10000)
+
+
+class TestTPen(unittest.TestCase):
+
+ def test_pendown_and_penup(self):
+
+ tpen = turtle.TPen()
+
+ self.assertTrue(tpen.isdown())
+ tpen.penup()
+ self.assertFalse(tpen.isdown())
+ tpen.pendown()
+ self.assertTrue(tpen.isdown())
+
+ def test_showturtle_hideturtle_and_isvisible(self):
+
+ tpen = turtle.TPen()
+
+ self.assertTrue(tpen.isvisible())
+ tpen.hideturtle()
+ self.assertFalse(tpen.isvisible())
+ tpen.showturtle()
+ self.assertTrue(tpen.isvisible())
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/Lib/test/test_typechecks.py b/Lib/test/test_typechecks.py
index 17cd5d32ed..a0e617b06f 100644
--- a/Lib/test/test_typechecks.py
+++ b/Lib/test/test_typechecks.py
@@ -1,7 +1,6 @@
"""Unit tests for __instancecheck__ and __subclasscheck__."""
import unittest
-from test import support
class ABC(type):
@@ -68,9 +67,5 @@ class TypeChecksTest(unittest.TestCase):
self.assertEqual(isinstance(42, (SubInt,)), False)
-def test_main():
- support.run_unittest(TypeChecksTest)
-
-
if __name__ == "__main__":
unittest.main()
diff --git a/Lib/test/test_types.py b/Lib/test/test_types.py
index 849cba9649..5e741153f4 100644
--- a/Lib/test/test_types.py
+++ b/Lib/test/test_types.py
@@ -1,12 +1,14 @@
# Python test set -- part 6, built-in types
-from test.support import run_unittest, run_with_locale
-import collections
+from test.support import run_with_locale
+import collections.abc
+import inspect
import pickle
import locale
import sys
import types
-import unittest
+import unittest.mock
+import weakref
class TypesTests(unittest.TestCase):
@@ -343,6 +345,8 @@ class TypesTests(unittest.TestCase):
self.assertRaises(ValueError, 3 .__format__, ",n")
# can't have ',' with 'c'
self.assertRaises(ValueError, 3 .__format__, ",c")
+ # can't have '#' with 'c'
+ self.assertRaises(ValueError, 3 .__format__, "#c")
# ensure that only int and float type specifiers work
for format_spec in ([chr(x) for x in range(ord('a'), ord('z')+1)] +
@@ -1186,9 +1190,318 @@ class SimpleNamespaceTests(unittest.TestCase):
types.SimpleNamespace() >= FakeSimpleNamespace()
-def test_main():
- run_unittest(TypesTests, MappingProxyTests, ClassCreationTests,
- SimpleNamespaceTests)
+class CoroutineTests(unittest.TestCase):
+ def test_wrong_args(self):
+ samples = [None, 1, object()]
+ for sample in samples:
+ with self.assertRaisesRegex(TypeError,
+ 'types.coroutine.*expects a callable'):
+ types.coroutine(sample)
+
+ def test_non_gen_values(self):
+ @types.coroutine
+ def foo():
+ return 'spam'
+ self.assertEqual(foo(), 'spam')
+
+ class Awaitable:
+ def __await__(self):
+ return ()
+ aw = Awaitable()
+ @types.coroutine
+ def foo():
+ return aw
+ self.assertIs(aw, foo())
+
+ # decorate foo second time
+ foo = types.coroutine(foo)
+ self.assertIs(aw, foo())
+
+ def test_async_def(self):
+ # Test that types.coroutine passes 'async def' coroutines
+ # without modification
+
+ async def foo(): pass
+ foo_code = foo.__code__
+ foo_flags = foo.__code__.co_flags
+ decorated_foo = types.coroutine(foo)
+ self.assertIs(foo, decorated_foo)
+ self.assertEqual(foo.__code__.co_flags, foo_flags)
+ self.assertIs(decorated_foo.__code__, foo_code)
+
+ foo_coro = foo()
+ def bar(): return foo_coro
+ for _ in range(2):
+ bar = types.coroutine(bar)
+ coro = bar()
+ self.assertIs(foo_coro, coro)
+ self.assertEqual(coro.cr_code.co_flags, foo_flags)
+ coro.close()
+
+ def test_duck_coro(self):
+ class CoroLike:
+ def send(self): pass
+ def throw(self): pass
+ def close(self): pass
+ def __await__(self): return self
+
+ coro = CoroLike()
+ @types.coroutine
+ def foo():
+ return coro
+ self.assertIs(foo(), coro)
+ self.assertIs(foo().__await__(), coro)
+
+ def test_duck_corogen(self):
+ class CoroGenLike:
+ def send(self): pass
+ def throw(self): pass
+ def close(self): pass
+ def __await__(self): return self
+ def __iter__(self): return self
+ def __next__(self): pass
+
+ coro = CoroGenLike()
+ @types.coroutine
+ def foo():
+ return coro
+ self.assertIs(foo(), coro)
+ self.assertIs(foo().__await__(), coro)
+
+ def test_duck_gen(self):
+ class GenLike:
+ def send(self): pass
+ def throw(self): pass
+ def close(self): pass
+ def __iter__(self): pass
+ def __next__(self): pass
+
+ # Setup generator mock object
+ gen = unittest.mock.MagicMock(GenLike)
+ gen.__iter__ = lambda gen: gen
+ gen.__name__ = 'gen'
+ gen.__qualname__ = 'test.gen'
+ self.assertIsInstance(gen, collections.abc.Generator)
+ self.assertIs(gen, iter(gen))
+
+ @types.coroutine
+ def foo(): return gen
+
+ wrapper = foo()
+ self.assertIsInstance(wrapper, types._GeneratorWrapper)
+ self.assertIs(wrapper.__await__(), wrapper)
+ # Wrapper proxies duck generators completely:
+ self.assertIs(iter(wrapper), wrapper)
+
+ self.assertIsInstance(wrapper, collections.abc.Coroutine)
+ self.assertIsInstance(wrapper, collections.abc.Awaitable)
+
+ self.assertIs(wrapper.__qualname__, gen.__qualname__)
+ self.assertIs(wrapper.__name__, gen.__name__)
+
+ # Test AttributeErrors
+ for name in {'gi_running', 'gi_frame', 'gi_code', 'gi_yieldfrom',
+ 'cr_running', 'cr_frame', 'cr_code', 'cr_await'}:
+ with self.assertRaises(AttributeError):
+ getattr(wrapper, name)
+
+ # Test attributes pass-through
+ gen.gi_running = object()
+ gen.gi_frame = object()
+ gen.gi_code = object()
+ gen.gi_yieldfrom = object()
+ self.assertIs(wrapper.gi_running, gen.gi_running)
+ self.assertIs(wrapper.gi_frame, gen.gi_frame)
+ self.assertIs(wrapper.gi_code, gen.gi_code)
+ self.assertIs(wrapper.gi_yieldfrom, gen.gi_yieldfrom)
+ self.assertIs(wrapper.cr_running, gen.gi_running)
+ self.assertIs(wrapper.cr_frame, gen.gi_frame)
+ self.assertIs(wrapper.cr_code, gen.gi_code)
+ self.assertIs(wrapper.cr_await, gen.gi_yieldfrom)
+
+ wrapper.close()
+ gen.close.assert_called_once_with()
+
+ wrapper.send(1)
+ gen.send.assert_called_once_with(1)
+ gen.reset_mock()
+
+ next(wrapper)
+ gen.__next__.assert_called_once_with()
+ gen.reset_mock()
+
+ wrapper.throw(1, 2, 3)
+ gen.throw.assert_called_once_with(1, 2, 3)
+ gen.reset_mock()
+
+ wrapper.throw(1, 2)
+ gen.throw.assert_called_once_with(1, 2)
+ gen.reset_mock()
+
+ wrapper.throw(1)
+ gen.throw.assert_called_once_with(1)
+ gen.reset_mock()
+
+ # Test exceptions propagation
+ error = Exception()
+ gen.throw.side_effect = error
+ try:
+ wrapper.throw(1)
+ except Exception as ex:
+ self.assertIs(ex, error)
+ else:
+ self.fail('wrapper did not propagate an exception')
+
+ # Test invalid args
+ gen.reset_mock()
+ with self.assertRaises(TypeError):
+ wrapper.throw()
+ self.assertFalse(gen.throw.called)
+ with self.assertRaises(TypeError):
+ wrapper.close(1)
+ self.assertFalse(gen.close.called)
+ with self.assertRaises(TypeError):
+ wrapper.send()
+ self.assertFalse(gen.send.called)
+
+ # Test that we do not double wrap
+ @types.coroutine
+ def bar(): return wrapper
+ self.assertIs(wrapper, bar())
+
+ # Test weakrefs support
+ ref = weakref.ref(wrapper)
+ self.assertIs(ref(), wrapper)
+
+ def test_duck_functional_gen(self):
+ class Generator:
+ """Emulates the following generator (very clumsy):
+
+ def gen(fut):
+ result = yield fut
+ return result * 2
+ """
+ def __init__(self, fut):
+ self._i = 0
+ self._fut = fut
+ def __iter__(self):
+ return self
+ def __next__(self):
+ return self.send(None)
+ def send(self, v):
+ try:
+ if self._i == 0:
+ assert v is None
+ return self._fut
+ if self._i == 1:
+ raise StopIteration(v * 2)
+ if self._i > 1:
+ raise StopIteration
+ finally:
+ self._i += 1
+ def throw(self, tp, *exc):
+ self._i = 100
+ if tp is not GeneratorExit:
+ raise tp
+ def close(self):
+ self.throw(GeneratorExit)
+
+ @types.coroutine
+ def foo(): return Generator('spam')
+
+ wrapper = foo()
+ self.assertIsInstance(wrapper, types._GeneratorWrapper)
+
+ async def corofunc():
+ return await foo() + 100
+ coro = corofunc()
+
+ self.assertEqual(coro.send(None), 'spam')
+ try:
+ coro.send(20)
+ except StopIteration as ex:
+ self.assertEqual(ex.args[0], 140)
+ else:
+ self.fail('StopIteration was expected')
+
+ def test_gen(self):
+ def gen_func():
+ yield 1
+ return (yield 2)
+ gen = gen_func()
+ @types.coroutine
+ def foo(): return gen
+ wrapper = foo()
+ self.assertIsInstance(wrapper, types._GeneratorWrapper)
+ self.assertIs(wrapper.__await__(), gen)
+
+ for name in ('__name__', '__qualname__', 'gi_code',
+ 'gi_running', 'gi_frame'):
+ self.assertIs(getattr(foo(), name),
+ getattr(gen, name))
+ self.assertIs(foo().cr_code, gen.gi_code)
+
+ self.assertEqual(next(wrapper), 1)
+ self.assertEqual(wrapper.send(None), 2)
+ with self.assertRaisesRegex(StopIteration, 'spam'):
+ wrapper.send('spam')
+
+ gen = gen_func()
+ wrapper = foo()
+ wrapper.send(None)
+ with self.assertRaisesRegex(Exception, 'ham'):
+ wrapper.throw(Exception, Exception('ham'))
+
+ # decorate foo second time
+ foo = types.coroutine(foo)
+ self.assertIs(foo().__await__(), gen)
+
+ def test_returning_itercoro(self):
+ @types.coroutine
+ def gen():
+ yield
+
+ gencoro = gen()
+
+ @types.coroutine
+ def foo():
+ return gencoro
+
+ self.assertIs(foo(), gencoro)
+
+ # decorate foo second time
+ foo = types.coroutine(foo)
+ self.assertIs(foo(), gencoro)
+
+ def test_genfunc(self):
+ def gen(): yield
+ self.assertIs(types.coroutine(gen), gen)
+ self.assertIs(types.coroutine(types.coroutine(gen)), gen)
+
+ self.assertTrue(gen.__code__.co_flags & inspect.CO_ITERABLE_COROUTINE)
+ self.assertFalse(gen.__code__.co_flags & inspect.CO_COROUTINE)
+
+ g = gen()
+ self.assertTrue(g.gi_code.co_flags & inspect.CO_ITERABLE_COROUTINE)
+ self.assertFalse(g.gi_code.co_flags & inspect.CO_COROUTINE)
+
+ self.assertIs(types.coroutine(gen), gen)
+
+ def test_wrapper_object(self):
+ def gen():
+ yield
+ @types.coroutine
+ def coro():
+ return gen()
+
+ wrapper = coro()
+ self.assertIn('GeneratorWrapper', repr(wrapper))
+ self.assertEqual(repr(wrapper), str(wrapper))
+ self.assertTrue(set(dir(wrapper)).issuperset({
+ '__await__', '__iter__', '__next__', 'cr_code', 'cr_running',
+ 'cr_frame', 'gi_code', 'gi_frame', 'gi_running', 'send',
+ 'close', 'throw'}))
+
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py
new file mode 100644
index 0000000000..a7f8dd5006
--- /dev/null
+++ b/Lib/test/test_typing.py
@@ -0,0 +1,1590 @@
+import contextlib
+import collections
+import pickle
+import re
+import sys
+from unittest import TestCase, main, skipUnless, SkipTest
+
+from typing import Any
+from typing import TypeVar, AnyStr
+from typing import T, KT, VT # Not in __all__.
+from typing import Union, Optional
+from typing import Tuple
+from typing import Callable
+from typing import Generic
+from typing import cast
+from typing import get_type_hints
+from typing import no_type_check, no_type_check_decorator
+from typing import Type
+from typing import NewType
+from typing import NamedTuple
+from typing import IO, TextIO, BinaryIO
+from typing import Pattern, Match
+import typing
+
+
+class BaseTestCase(TestCase):
+
+ def assertIsSubclass(self, cls, class_or_tuple, msg=None):
+ if not issubclass(cls, class_or_tuple):
+ message = '%r is not a subclass of %r' % (cls, class_or_tuple)
+ if msg is not None:
+ message += ' : %s' % msg
+ raise self.failureException(message)
+
+ def assertNotIsSubclass(self, cls, class_or_tuple, msg=None):
+ if issubclass(cls, class_or_tuple):
+ message = '%r is a subclass of %r' % (cls, class_or_tuple)
+ if msg is not None:
+ message += ' : %s' % msg
+ raise self.failureException(message)
+
+
+class Employee:
+ pass
+
+
+class Manager(Employee):
+ pass
+
+
+class Founder(Employee):
+ pass
+
+
+class ManagingFounder(Manager, Founder):
+ pass
+
+
+class AnyTests(BaseTestCase):
+
+ def test_any_instance_type_error(self):
+ with self.assertRaises(TypeError):
+ isinstance(42, Any)
+
+ def test_any_subclass(self):
+ self.assertTrue(issubclass(Employee, Any))
+ self.assertTrue(issubclass(int, Any))
+ self.assertTrue(issubclass(type(None), Any))
+ self.assertTrue(issubclass(object, Any))
+
+ def test_others_any(self):
+ self.assertFalse(issubclass(Any, Employee))
+ self.assertFalse(issubclass(Any, int))
+ self.assertFalse(issubclass(Any, type(None)))
+ # However, Any is a subclass of object (this can't be helped).
+ self.assertTrue(issubclass(Any, object))
+
+ def test_repr(self):
+ self.assertEqual(repr(Any), 'typing.Any')
+
+ def test_errors(self):
+ with self.assertRaises(TypeError):
+ issubclass(42, Any)
+ with self.assertRaises(TypeError):
+ Any[int] # Any is not a generic type.
+
+ def test_cannot_subclass(self):
+ with self.assertRaises(TypeError):
+ class A(Any):
+ pass
+
+ def test_cannot_instantiate(self):
+ with self.assertRaises(TypeError):
+ Any()
+
+ def test_cannot_subscript(self):
+ with self.assertRaises(TypeError):
+ Any[int]
+
+ def test_any_is_subclass(self):
+ # Any should be considered a subclass of everything.
+ self.assertIsSubclass(Any, Any)
+ self.assertIsSubclass(Any, typing.List)
+ self.assertIsSubclass(Any, typing.List[int])
+ self.assertIsSubclass(Any, typing.List[T])
+ self.assertIsSubclass(Any, typing.Mapping)
+ self.assertIsSubclass(Any, typing.Mapping[str, int])
+ self.assertIsSubclass(Any, typing.Mapping[KT, VT])
+ self.assertIsSubclass(Any, Generic)
+ self.assertIsSubclass(Any, Generic[T])
+ self.assertIsSubclass(Any, Generic[KT, VT])
+ self.assertIsSubclass(Any, AnyStr)
+ self.assertIsSubclass(Any, Union)
+ self.assertIsSubclass(Any, Union[int, str])
+ self.assertIsSubclass(Any, typing.Match)
+ self.assertIsSubclass(Any, typing.Match[str])
+ # These expressions must simply not fail.
+ typing.Match[Any]
+ typing.Pattern[Any]
+ typing.IO[Any]
+
+
+class TypeVarTests(BaseTestCase):
+
+ def test_basic_plain(self):
+ T = TypeVar('T')
+ # Every class is a subclass of T.
+ self.assertIsSubclass(int, T)
+ self.assertIsSubclass(str, T)
+ # T equals itself.
+ self.assertEqual(T, T)
+ # T is a subclass of itself.
+ self.assertIsSubclass(T, T)
+ # T is an instance of TypeVar
+ self.assertIsInstance(T, TypeVar)
+
+ def test_typevar_instance_type_error(self):
+ T = TypeVar('T')
+ with self.assertRaises(TypeError):
+ isinstance(42, T)
+
+ def test_basic_constrained(self):
+ A = TypeVar('A', str, bytes)
+ # Only str and bytes are subclasses of A.
+ self.assertIsSubclass(str, A)
+ self.assertIsSubclass(bytes, A)
+ self.assertNotIsSubclass(int, A)
+ # A equals itself.
+ self.assertEqual(A, A)
+ # A is a subclass of itself.
+ self.assertIsSubclass(A, A)
+
+ def test_constrained_error(self):
+ with self.assertRaises(TypeError):
+ X = TypeVar('X', int)
+ X
+
+ def test_union_unique(self):
+ X = TypeVar('X')
+ Y = TypeVar('Y')
+ self.assertNotEqual(X, Y)
+ self.assertEqual(Union[X], X)
+ self.assertNotEqual(Union[X], Union[X, Y])
+ self.assertEqual(Union[X, X], X)
+ self.assertNotEqual(Union[X, int], Union[X])
+ self.assertNotEqual(Union[X, int], Union[int])
+ self.assertEqual(Union[X, int].__union_params__, (X, int))
+ self.assertEqual(Union[X, int].__union_set_params__, {X, int})
+
+ def test_union_constrained(self):
+ A = TypeVar('A', str, bytes)
+ self.assertNotEqual(Union[A, str], Union[A])
+
+ def test_repr(self):
+ self.assertEqual(repr(T), '~T')
+ self.assertEqual(repr(KT), '~KT')
+ self.assertEqual(repr(VT), '~VT')
+ self.assertEqual(repr(AnyStr), '~AnyStr')
+ T_co = TypeVar('T_co', covariant=True)
+ self.assertEqual(repr(T_co), '+T_co')
+ T_contra = TypeVar('T_contra', contravariant=True)
+ self.assertEqual(repr(T_contra), '-T_contra')
+
+ def test_no_redefinition(self):
+ self.assertNotEqual(TypeVar('T'), TypeVar('T'))
+ self.assertNotEqual(TypeVar('T', int, str), TypeVar('T', int, str))
+
+ def test_subclass_as_unions(self):
+ # None of these are true -- each type var is its own world.
+ self.assertFalse(issubclass(TypeVar('T', int, str),
+ TypeVar('T', int, str)))
+ self.assertFalse(issubclass(TypeVar('T', int, float),
+ TypeVar('T', int, float, str)))
+ self.assertFalse(issubclass(TypeVar('T', int, str),
+ TypeVar('T', str, int)))
+ A = TypeVar('A', int, str)
+ B = TypeVar('B', int, str, float)
+ self.assertFalse(issubclass(A, B))
+ self.assertFalse(issubclass(B, A))
+
+ def test_cannot_subclass_vars(self):
+ with self.assertRaises(TypeError):
+ class V(TypeVar('T')):
+ pass
+
+ def test_cannot_subclass_var_itself(self):
+ with self.assertRaises(TypeError):
+ class V(TypeVar):
+ pass
+
+ def test_cannot_instantiate_vars(self):
+ with self.assertRaises(TypeError):
+ TypeVar('A')()
+
+ def test_bound(self):
+ X = TypeVar('X', bound=Employee)
+ self.assertIsSubclass(Employee, X)
+ self.assertIsSubclass(Manager, X)
+ self.assertNotIsSubclass(int, X)
+
+ def test_bound_errors(self):
+ with self.assertRaises(TypeError):
+ TypeVar('X', bound=42)
+ with self.assertRaises(TypeError):
+ TypeVar('X', str, float, bound=Employee)
+
+
+class UnionTests(BaseTestCase):
+
+ def test_basics(self):
+ u = Union[int, float]
+ self.assertNotEqual(u, Union)
+ self.assertTrue(issubclass(int, u))
+ self.assertTrue(issubclass(float, u))
+
+ def test_union_any(self):
+ u = Union[Any]
+ self.assertEqual(u, Any)
+ u = Union[int, Any]
+ self.assertEqual(u, Any)
+ u = Union[Any, int]
+ self.assertEqual(u, Any)
+
+ def test_union_object(self):
+ u = Union[object]
+ self.assertEqual(u, object)
+ u = Union[int, object]
+ self.assertEqual(u, object)
+ u = Union[object, int]
+ self.assertEqual(u, object)
+
+ def test_union_any_object(self):
+ u = Union[object, Any]
+ self.assertEqual(u, Any)
+ u = Union[Any, object]
+ self.assertEqual(u, Any)
+
+ def test_unordered(self):
+ u1 = Union[int, float]
+ u2 = Union[float, int]
+ self.assertEqual(u1, u2)
+
+ def test_subclass(self):
+ u = Union[int, Employee]
+ self.assertTrue(issubclass(Manager, u))
+
+ def test_self_subclass(self):
+ self.assertTrue(issubclass(Union[KT, VT], Union))
+ self.assertFalse(issubclass(Union, Union[KT, VT]))
+
+ def test_multiple_inheritance(self):
+ u = Union[int, Employee]
+ self.assertTrue(issubclass(ManagingFounder, u))
+
+ def test_single_class_disappears(self):
+ t = Union[Employee]
+ self.assertIs(t, Employee)
+
+ def test_base_class_disappears(self):
+ u = Union[Employee, Manager, int]
+ self.assertEqual(u, Union[int, Employee])
+ u = Union[Manager, int, Employee]
+ self.assertEqual(u, Union[int, Employee])
+ u = Union[Employee, Manager]
+ self.assertIs(u, Employee)
+
+ def test_weird_subclasses(self):
+ u = Union[Employee, int, float]
+ v = Union[int, float]
+ self.assertTrue(issubclass(v, u))
+ w = Union[int, Manager]
+ self.assertTrue(issubclass(w, u))
+
+ def test_union_union(self):
+ u = Union[int, float]
+ v = Union[u, Employee]
+ self.assertEqual(v, Union[int, float, Employee])
+
+ def test_repr(self):
+ self.assertEqual(repr(Union), 'typing.Union')
+ u = Union[Employee, int]
+ self.assertEqual(repr(u), 'typing.Union[%s.Employee, int]' % __name__)
+ u = Union[int, Employee]
+ self.assertEqual(repr(u), 'typing.Union[int, %s.Employee]' % __name__)
+
+ def test_cannot_subclass(self):
+ with self.assertRaises(TypeError):
+ class C(Union):
+ pass
+ with self.assertRaises(TypeError):
+ class C(Union[int, str]):
+ pass
+
+ def test_cannot_instantiate(self):
+ with self.assertRaises(TypeError):
+ Union()
+ u = Union[int, float]
+ with self.assertRaises(TypeError):
+ u()
+
+ def test_optional(self):
+ o = Optional[int]
+ u = Union[int, None]
+ self.assertEqual(o, u)
+
+ def test_empty(self):
+ with self.assertRaises(TypeError):
+ Union[()]
+
+ def test_issubclass_union(self):
+ self.assertIsSubclass(Union[int, str], Union)
+ self.assertNotIsSubclass(int, Union)
+
+ def test_union_instance_type_error(self):
+ with self.assertRaises(TypeError):
+ isinstance(42, Union[int, str])
+
+ def test_union_str_pattern(self):
+ # Shouldn't crash; see http://bugs.python.org/issue25390
+ A = Union[str, Pattern]
+ A
+
+ def test_etree(self):
+ # See https://github.com/python/typing/issues/229
+ # (Only relevant for Python 2.)
+ try:
+ from xml.etree.cElementTree import Element
+ except ImportError:
+ raise SkipTest("cElementTree not found")
+ Union[Element, str] # Shouldn't crash
+
+ def Elem(*args):
+ return Element(*args)
+
+ Union[Elem, str] # Nor should this
+
+
+class TypeVarUnionTests(BaseTestCase):
+
+ def test_simpler(self):
+ A = TypeVar('A', int, str, float)
+ B = TypeVar('B', int, str)
+ self.assertIsSubclass(A, A)
+ self.assertIsSubclass(B, B)
+ self.assertNotIsSubclass(B, A)
+ self.assertIsSubclass(A, Union[int, str, float])
+ self.assertNotIsSubclass(Union[int, str, float], A)
+ self.assertNotIsSubclass(Union[int, str], B)
+ self.assertIsSubclass(B, Union[int, str])
+ self.assertNotIsSubclass(A, B)
+ self.assertNotIsSubclass(Union[int, str, float], B)
+ self.assertNotIsSubclass(A, Union[int, str])
+
+ def test_var_union_subclass(self):
+ self.assertTrue(issubclass(T, Union[int, T]))
+ self.assertTrue(issubclass(KT, Union[KT, VT]))
+
+ def test_var_union(self):
+ TU = TypeVar('TU', Union[int, float], None)
+ self.assertIsSubclass(int, TU)
+ self.assertIsSubclass(float, TU)
+
+
+class TupleTests(BaseTestCase):
+
+ def test_basics(self):
+ self.assertTrue(issubclass(Tuple[int, str], Tuple))
+ self.assertTrue(issubclass(Tuple[int, str], Tuple[int, str]))
+ self.assertFalse(issubclass(int, Tuple))
+ self.assertFalse(issubclass(Tuple[float, str], Tuple[int, str]))
+ self.assertFalse(issubclass(Tuple[int, str, int], Tuple[int, str]))
+ self.assertFalse(issubclass(Tuple[int, str], Tuple[int, str, int]))
+ self.assertTrue(issubclass(tuple, Tuple))
+ self.assertFalse(issubclass(Tuple, tuple)) # Can't have it both ways.
+
+ def test_equality(self):
+ self.assertEqual(Tuple[int], Tuple[int])
+ self.assertEqual(Tuple[int, ...], Tuple[int, ...])
+ self.assertNotEqual(Tuple[int], Tuple[int, int])
+ self.assertNotEqual(Tuple[int], Tuple[int, ...])
+
+ def test_tuple_subclass(self):
+ class MyTuple(tuple):
+ pass
+ self.assertTrue(issubclass(MyTuple, Tuple))
+
+ def test_tuple_instance_type_error(self):
+ with self.assertRaises(TypeError):
+ isinstance((0, 0), Tuple[int, int])
+ with self.assertRaises(TypeError):
+ isinstance((0, 0), Tuple)
+
+ def test_tuple_ellipsis_subclass(self):
+
+ class B:
+ pass
+
+ class C(B):
+ pass
+
+ self.assertNotIsSubclass(Tuple[B], Tuple[B, ...])
+ self.assertIsSubclass(Tuple[C, ...], Tuple[B, ...])
+ self.assertNotIsSubclass(Tuple[C, ...], Tuple[B])
+ self.assertNotIsSubclass(Tuple[C], Tuple[B, ...])
+
+ def test_repr(self):
+ self.assertEqual(repr(Tuple), 'typing.Tuple')
+ self.assertEqual(repr(Tuple[()]), 'typing.Tuple[()]')
+ self.assertEqual(repr(Tuple[int, float]), 'typing.Tuple[int, float]')
+ self.assertEqual(repr(Tuple[int, ...]), 'typing.Tuple[int, ...]')
+
+ def test_errors(self):
+ with self.assertRaises(TypeError):
+ issubclass(42, Tuple)
+ with self.assertRaises(TypeError):
+ issubclass(42, Tuple[int])
+
+
+class CallableTests(BaseTestCase):
+
+ def test_self_subclass(self):
+ self.assertTrue(issubclass(Callable[[int], int], Callable))
+ self.assertFalse(issubclass(Callable, Callable[[int], int]))
+ self.assertTrue(issubclass(Callable[[int], int], Callable[[int], int]))
+ self.assertFalse(issubclass(Callable[[Employee], int],
+ Callable[[Manager], int]))
+ self.assertFalse(issubclass(Callable[[Manager], int],
+ Callable[[Employee], int]))
+ self.assertFalse(issubclass(Callable[[int], Employee],
+ Callable[[int], Manager]))
+ self.assertFalse(issubclass(Callable[[int], Manager],
+ Callable[[int], Employee]))
+
+ def test_eq_hash(self):
+ self.assertEqual(Callable[[int], int], Callable[[int], int])
+ self.assertEqual(len({Callable[[int], int], Callable[[int], int]}), 1)
+ self.assertNotEqual(Callable[[int], int], Callable[[int], str])
+ self.assertNotEqual(Callable[[int], int], Callable[[str], int])
+ self.assertNotEqual(Callable[[int], int], Callable[[int, int], int])
+ self.assertNotEqual(Callable[[int], int], Callable[[], int])
+ self.assertNotEqual(Callable[[int], int], Callable)
+
+ def test_cannot_subclass(self):
+ with self.assertRaises(TypeError):
+
+ class C(Callable):
+ pass
+
+ with self.assertRaises(TypeError):
+
+ class C(Callable[[int], int]):
+ pass
+
+ def test_cannot_instantiate(self):
+ with self.assertRaises(TypeError):
+ Callable()
+ c = Callable[[int], str]
+ with self.assertRaises(TypeError):
+ c()
+
+ def test_callable_instance_works(self):
+ def f():
+ pass
+ self.assertIsInstance(f, Callable)
+ self.assertNotIsInstance(None, Callable)
+
+ def test_callable_instance_type_error(self):
+ def f():
+ pass
+ with self.assertRaises(TypeError):
+ self.assertIsInstance(f, Callable[[], None])
+ with self.assertRaises(TypeError):
+ self.assertIsInstance(f, Callable[[], Any])
+ with self.assertRaises(TypeError):
+ self.assertNotIsInstance(None, Callable[[], None])
+ with self.assertRaises(TypeError):
+ self.assertNotIsInstance(None, Callable[[], Any])
+
+ def test_repr(self):
+ ct0 = Callable[[], bool]
+ self.assertEqual(repr(ct0), 'typing.Callable[[], bool]')
+ ct2 = Callable[[str, float], int]
+ self.assertEqual(repr(ct2), 'typing.Callable[[str, float], int]')
+ ctv = Callable[..., str]
+ self.assertEqual(repr(ctv), 'typing.Callable[..., str]')
+
+ def test_callable_with_ellipsis(self):
+
+ def foo(a: Callable[..., T]):
+ pass
+
+ self.assertEqual(get_type_hints(foo, globals(), locals()),
+ {'a': Callable[..., T]})
+
+
+XK = TypeVar('XK', str, bytes)
+XV = TypeVar('XV')
+
+
+class SimpleMapping(Generic[XK, XV]):
+
+ def __getitem__(self, key: XK) -> XV:
+ ...
+
+ def __setitem__(self, key: XK, value: XV):
+ ...
+
+ def get(self, key: XK, default: XV = None) -> XV:
+ ...
+
+
+class MySimpleMapping(SimpleMapping[XK, XV]):
+
+ def __init__(self):
+ self.store = {}
+
+ def __getitem__(self, key: str):
+ return self.store[key]
+
+ def __setitem__(self, key: str, value):
+ self.store[key] = value
+
+ def get(self, key: str, default=None):
+ try:
+ return self.store[key]
+ except KeyError:
+ return default
+
+
+class ProtocolTests(BaseTestCase):
+
+ def test_supports_int(self):
+ self.assertIsSubclass(int, typing.SupportsInt)
+ self.assertNotIsSubclass(str, typing.SupportsInt)
+
+ def test_supports_float(self):
+ self.assertIsSubclass(float, typing.SupportsFloat)
+ self.assertNotIsSubclass(str, typing.SupportsFloat)
+
+ def test_supports_complex(self):
+
+ # Note: complex itself doesn't have __complex__.
+ class C:
+ def __complex__(self):
+ return 0j
+
+ self.assertIsSubclass(C, typing.SupportsComplex)
+ self.assertNotIsSubclass(str, typing.SupportsComplex)
+
+ def test_supports_bytes(self):
+
+ # Note: bytes itself doesn't have __bytes__.
+ class B:
+ def __bytes__(self):
+ return b''
+
+ self.assertIsSubclass(B, typing.SupportsBytes)
+ self.assertNotIsSubclass(str, typing.SupportsBytes)
+
+ def test_supports_abs(self):
+ self.assertIsSubclass(float, typing.SupportsAbs)
+ self.assertIsSubclass(int, typing.SupportsAbs)
+ self.assertNotIsSubclass(str, typing.SupportsAbs)
+
+ def test_supports_round(self):
+ issubclass(float, typing.SupportsRound)
+ self.assertIsSubclass(float, typing.SupportsRound)
+ self.assertIsSubclass(int, typing.SupportsRound)
+ self.assertNotIsSubclass(str, typing.SupportsRound)
+
+ def test_reversible(self):
+ self.assertIsSubclass(list, typing.Reversible)
+ self.assertNotIsSubclass(int, typing.Reversible)
+
+ def test_protocol_instance_type_error(self):
+ with self.assertRaises(TypeError):
+ isinstance(0, typing.SupportsAbs)
+
+
+class GenericTests(BaseTestCase):
+
+ def test_basics(self):
+ X = SimpleMapping[str, Any]
+ self.assertEqual(X.__parameters__, ())
+ with self.assertRaises(TypeError):
+ X[str]
+ with self.assertRaises(TypeError):
+ X[str, str]
+ Y = SimpleMapping[XK, str]
+ self.assertEqual(Y.__parameters__, (XK,))
+ Y[str]
+ with self.assertRaises(TypeError):
+ Y[str, str]
+
+ def test_init(self):
+ T = TypeVar('T')
+ S = TypeVar('S')
+ with self.assertRaises(TypeError):
+ Generic[T, T]
+ with self.assertRaises(TypeError):
+ Generic[T, S, T]
+
+ def test_repr(self):
+ self.assertEqual(repr(SimpleMapping),
+ __name__ + '.' + 'SimpleMapping<~XK, ~XV>')
+ self.assertEqual(repr(MySimpleMapping),
+ __name__ + '.' + 'MySimpleMapping<~XK, ~XV>')
+
+ def test_chain_repr(self):
+ T = TypeVar('T')
+ S = TypeVar('S')
+
+ class C(Generic[T]):
+ pass
+
+ X = C[Tuple[S, T]]
+ self.assertEqual(X, C[Tuple[S, T]])
+ self.assertNotEqual(X, C[Tuple[T, S]])
+
+ Y = X[T, int]
+ self.assertEqual(Y, X[T, int])
+ self.assertNotEqual(Y, X[S, int])
+ self.assertNotEqual(Y, X[T, str])
+
+ Z = Y[str]
+ self.assertEqual(Z, Y[str])
+ self.assertNotEqual(Z, Y[int])
+ self.assertNotEqual(Z, Y[T])
+
+ self.assertTrue(str(Z).endswith(
+ '.C<~T>[typing.Tuple[~S, ~T]]<~S, ~T>[~T, int]<~T>[str]'))
+
+ def test_dict(self):
+ T = TypeVar('T')
+
+ class B(Generic[T]):
+ pass
+
+ b = B()
+ b.foo = 42
+ self.assertEqual(b.__dict__, {'foo': 42})
+
+ class C(B[int]):
+ pass
+
+ c = C()
+ c.bar = 'abc'
+ self.assertEqual(c.__dict__, {'bar': 'abc'})
+
+ def test_pickle(self):
+ global C # pickle wants to reference the class by name
+ T = TypeVar('T')
+
+ class B(Generic[T]):
+ pass
+
+ class C(B[int]):
+ pass
+
+ c = C()
+ c.foo = 42
+ c.bar = 'abc'
+ for proto in range(pickle.HIGHEST_PROTOCOL + 1):
+ z = pickle.dumps(c, proto)
+ x = pickle.loads(z)
+ self.assertEqual(x.foo, 42)
+ self.assertEqual(x.bar, 'abc')
+ self.assertEqual(x.__dict__, {'foo': 42, 'bar': 'abc'})
+
+ def test_errors(self):
+ with self.assertRaises(TypeError):
+ B = SimpleMapping[XK, Any]
+
+ class C(Generic[B]):
+ pass
+
+ def test_repr_2(self):
+ PY32 = sys.version_info[:2] < (3, 3)
+
+ class C(Generic[T]):
+ pass
+
+ self.assertEqual(C.__module__, __name__)
+ if not PY32:
+ self.assertEqual(C.__qualname__,
+ 'GenericTests.test_repr_2.<locals>.C')
+ self.assertEqual(repr(C).split('.')[-1], 'C<~T>')
+ X = C[int]
+ self.assertEqual(X.__module__, __name__)
+ if not PY32:
+ self.assertEqual(X.__qualname__, 'C')
+ self.assertEqual(repr(X).split('.')[-1], 'C<~T>[int]')
+
+ class Y(C[int]):
+ pass
+
+ self.assertEqual(Y.__module__, __name__)
+ if not PY32:
+ self.assertEqual(Y.__qualname__,
+ 'GenericTests.test_repr_2.<locals>.Y')
+ self.assertEqual(repr(Y).split('.')[-1], 'Y')
+
+ def test_eq_1(self):
+ self.assertEqual(Generic, Generic)
+ self.assertEqual(Generic[T], Generic[T])
+ self.assertNotEqual(Generic[KT], Generic[VT])
+
+ def test_eq_2(self):
+
+ class A(Generic[T]):
+ pass
+
+ class B(Generic[T]):
+ pass
+
+ self.assertEqual(A, A)
+ self.assertNotEqual(A, B)
+ self.assertEqual(A[T], A[T])
+ self.assertNotEqual(A[T], B[T])
+
+ def test_multiple_inheritance(self):
+
+ class A(Generic[T, VT]):
+ pass
+
+ class B(Generic[KT, T]):
+ pass
+
+ class C(A[T, VT], Generic[VT, T, KT], B[KT, T]):
+ pass
+
+ self.assertEqual(C.__parameters__, (VT, T, KT))
+
+ def test_nested(self):
+
+ G = Generic
+
+ class Visitor(G[T]):
+
+ a = None
+
+ def set(self, a: T):
+ self.a = a
+
+ def get(self):
+ return self.a
+
+ def visit(self) -> T:
+ return self.a
+
+ V = Visitor[typing.List[int]]
+
+ class IntListVisitor(V):
+
+ def append(self, x: int):
+ self.a.append(x)
+
+ a = IntListVisitor()
+ a.set([])
+ a.append(1)
+ a.append(42)
+ self.assertEqual(a.get(), [1, 42])
+
+ def test_type_erasure(self):
+ T = TypeVar('T')
+
+ class Node(Generic[T]):
+ def __init__(self, label: T,
+ left: 'Node[T]' = None,
+ right: 'Node[T]' = None):
+ self.label = label # type: T
+ self.left = left # type: Optional[Node[T]]
+ self.right = right # type: Optional[Node[T]]
+
+ def foo(x: T):
+ a = Node(x)
+ b = Node[T](x)
+ c = Node[Any](x)
+ self.assertIs(type(a), Node)
+ self.assertIs(type(b), Node)
+ self.assertIs(type(c), Node)
+ self.assertEqual(a.label, x)
+ self.assertEqual(b.label, x)
+ self.assertEqual(c.label, x)
+
+ foo(42)
+
+ def test_implicit_any(self):
+ T = TypeVar('T')
+
+ class C(Generic[T]):
+ pass
+
+ class D(C):
+ pass
+
+ self.assertEqual(D.__parameters__, ())
+
+ with self.assertRaises(Exception):
+ D[int]
+ with self.assertRaises(Exception):
+ D[Any]
+ with self.assertRaises(Exception):
+ D[T]
+
+
+class VarianceTests(BaseTestCase):
+
+ def test_invariance(self):
+ # Because of invariance, List[subclass of X] is not a subclass
+ # of List[X], and ditto for MutableSequence.
+ self.assertNotIsSubclass(typing.List[Manager], typing.List[Employee])
+ self.assertNotIsSubclass(typing.MutableSequence[Manager],
+ typing.MutableSequence[Employee])
+ # It's still reflexive.
+ self.assertIsSubclass(typing.List[Employee], typing.List[Employee])
+ self.assertIsSubclass(typing.MutableSequence[Employee],
+ typing.MutableSequence[Employee])
+
+ def test_covariance_tuple(self):
+ # Check covariace for Tuple (which are really special cases).
+ self.assertIsSubclass(Tuple[Manager], Tuple[Employee])
+ self.assertNotIsSubclass(Tuple[Employee], Tuple[Manager])
+ # And pairwise.
+ self.assertIsSubclass(Tuple[Manager, Manager],
+ Tuple[Employee, Employee])
+ self.assertNotIsSubclass(Tuple[Employee, Employee],
+ Tuple[Manager, Employee])
+ # And using ellipsis.
+ self.assertIsSubclass(Tuple[Manager, ...], Tuple[Employee, ...])
+ self.assertNotIsSubclass(Tuple[Employee, ...], Tuple[Manager, ...])
+
+ def test_covariance_sequence(self):
+ # Check covariance for Sequence (which is just a generic class
+ # for this purpose, but using a covariant type variable).
+ self.assertIsSubclass(typing.Sequence[Manager],
+ typing.Sequence[Employee])
+ self.assertNotIsSubclass(typing.Sequence[Employee],
+ typing.Sequence[Manager])
+
+ def test_covariance_mapping(self):
+ # Ditto for Mapping (covariant in the value, invariant in the key).
+ self.assertIsSubclass(typing.Mapping[Employee, Manager],
+ typing.Mapping[Employee, Employee])
+ self.assertNotIsSubclass(typing.Mapping[Manager, Employee],
+ typing.Mapping[Employee, Employee])
+ self.assertNotIsSubclass(typing.Mapping[Employee, Manager],
+ typing.Mapping[Manager, Manager])
+ self.assertNotIsSubclass(typing.Mapping[Manager, Employee],
+ typing.Mapping[Manager, Manager])
+
+
+class CastTests(BaseTestCase):
+
+ def test_basics(self):
+ self.assertEqual(cast(int, 42), 42)
+ self.assertEqual(cast(float, 42), 42)
+ self.assertIs(type(cast(float, 42)), int)
+ self.assertEqual(cast(Any, 42), 42)
+ self.assertEqual(cast(list, 42), 42)
+ self.assertEqual(cast(Union[str, float], 42), 42)
+ self.assertEqual(cast(AnyStr, 42), 42)
+ self.assertEqual(cast(None, 42), 42)
+
+ def test_errors(self):
+ # Bogus calls are not expected to fail.
+ cast(42, 42)
+ cast('hello', 42)
+
+
+class ForwardRefTests(BaseTestCase):
+
+ def test_basics(self):
+
+ class Node(Generic[T]):
+
+ def __init__(self, label: T):
+ self.label = label
+ self.left = self.right = None
+
+ def add_both(self,
+ left: 'Optional[Node[T]]',
+ right: 'Node[T]' = None,
+ stuff: int = None,
+ blah=None):
+ self.left = left
+ self.right = right
+
+ def add_left(self, node: Optional['Node[T]']):
+ self.add_both(node, None)
+
+ def add_right(self, node: 'Node[T]' = None):
+ self.add_both(None, node)
+
+ t = Node[int]
+ both_hints = get_type_hints(t.add_both, globals(), locals())
+ self.assertEqual(both_hints['left'], Optional[Node[T]])
+ self.assertEqual(both_hints['right'], Optional[Node[T]])
+ self.assertEqual(both_hints['left'], both_hints['right'])
+ self.assertEqual(both_hints['stuff'], Optional[int])
+ self.assertNotIn('blah', both_hints)
+
+ left_hints = get_type_hints(t.add_left, globals(), locals())
+ self.assertEqual(left_hints['node'], Optional[Node[T]])
+
+ right_hints = get_type_hints(t.add_right, globals(), locals())
+ self.assertEqual(right_hints['node'], Optional[Node[T]])
+
+ def test_forwardref_instance_type_error(self):
+ fr = typing._ForwardRef('int')
+ with self.assertRaises(TypeError):
+ isinstance(42, fr)
+
+ def test_union_forward(self):
+
+ def foo(a: Union['T']):
+ pass
+
+ self.assertEqual(get_type_hints(foo, globals(), locals()),
+ {'a': Union[T]})
+
+ def test_tuple_forward(self):
+
+ def foo(a: Tuple['T']):
+ pass
+
+ self.assertEqual(get_type_hints(foo, globals(), locals()),
+ {'a': Tuple[T]})
+
+ def test_callable_forward(self):
+
+ def foo(a: Callable[['T'], 'T']):
+ pass
+
+ self.assertEqual(get_type_hints(foo, globals(), locals()),
+ {'a': Callable[[T], T]})
+
+ def test_callable_with_ellipsis_forward(self):
+
+ def foo(a: 'Callable[..., T]'):
+ pass
+
+ self.assertEqual(get_type_hints(foo, globals(), locals()),
+ {'a': Callable[..., T]})
+
+ def test_syntax_error(self):
+
+ with self.assertRaises(SyntaxError):
+ Generic['/T']
+
+ def test_delayed_syntax_error(self):
+
+ def foo(a: 'Node[T'):
+ pass
+
+ with self.assertRaises(SyntaxError):
+ get_type_hints(foo)
+
+ def test_type_error(self):
+
+ def foo(a: Tuple['42']):
+ pass
+
+ with self.assertRaises(TypeError):
+ get_type_hints(foo)
+
+ def test_name_error(self):
+
+ def foo(a: 'Noode[T]'):
+ pass
+
+ with self.assertRaises(NameError):
+ get_type_hints(foo, locals())
+
+ def test_no_type_check(self):
+
+ @no_type_check
+ def foo(a: 'whatevers') -> {}:
+ pass
+
+ th = get_type_hints(foo)
+ self.assertEqual(th, {})
+
+ def test_no_type_check_class(self):
+
+ @no_type_check
+ class C:
+ def foo(a: 'whatevers') -> {}:
+ pass
+
+ cth = get_type_hints(C.foo)
+ self.assertEqual(cth, {})
+ ith = get_type_hints(C().foo)
+ self.assertEqual(ith, {})
+
+ def test_meta_no_type_check(self):
+
+ @no_type_check_decorator
+ def magic_decorator(deco):
+ return deco
+
+ self.assertEqual(magic_decorator.__name__, 'magic_decorator')
+
+ @magic_decorator
+ def foo(a: 'whatevers') -> {}:
+ pass
+
+ @magic_decorator
+ class C:
+ def foo(a: 'whatevers') -> {}:
+ pass
+
+ self.assertEqual(foo.__name__, 'foo')
+ th = get_type_hints(foo)
+ self.assertEqual(th, {})
+ cth = get_type_hints(C.foo)
+ self.assertEqual(cth, {})
+ ith = get_type_hints(C().foo)
+ self.assertEqual(ith, {})
+
+ def test_default_globals(self):
+ code = ("class C:\n"
+ " def foo(self, a: 'C') -> 'D': pass\n"
+ "class D:\n"
+ " def bar(self, b: 'D') -> C: pass\n"
+ )
+ ns = {}
+ exec(code, ns)
+ hints = get_type_hints(ns['C'].foo)
+ self.assertEqual(hints, {'a': ns['C'], 'return': ns['D']})
+
+
+class OverloadTests(BaseTestCase):
+
+ def test_overload_exists(self):
+ from typing import overload
+
+ def test_overload_fails(self):
+ from typing import overload
+
+ with self.assertRaises(RuntimeError):
+
+ @overload
+ def blah():
+ pass
+
+ blah()
+
+ def test_overload_succeeds(self):
+ from typing import overload
+
+ @overload
+ def blah():
+ pass
+
+ def blah():
+ pass
+
+ blah()
+
+
+PY35 = sys.version_info[:2] >= (3, 5)
+
+PY35_TESTS = """
+import asyncio
+
+T_a = TypeVar('T')
+
+class AwaitableWrapper(typing.Awaitable[T_a]):
+
+ def __init__(self, value):
+ self.value = value
+
+ def __await__(self) -> typing.Iterator[T_a]:
+ yield
+ return self.value
+
+class AsyncIteratorWrapper(typing.AsyncIterator[T_a]):
+
+ def __init__(self, value: typing.Iterable[T_a]):
+ self.value = value
+
+ def __aiter__(self) -> typing.AsyncIterator[T_a]:
+ return self
+
+ @asyncio.coroutine
+ def __anext__(self) -> T_a:
+ data = yield from self.value
+ if data:
+ return data
+ else:
+ raise StopAsyncIteration
+"""
+
+if PY35:
+ exec(PY35_TESTS)
+
+
+class CollectionsAbcTests(BaseTestCase):
+
+ def test_hashable(self):
+ self.assertIsInstance(42, typing.Hashable)
+ self.assertNotIsInstance([], typing.Hashable)
+
+ def test_iterable(self):
+ self.assertIsInstance([], typing.Iterable)
+ # Due to ABC caching, the second time takes a separate code
+ # path and could fail. So call this a few times.
+ self.assertIsInstance([], typing.Iterable)
+ self.assertIsInstance([], typing.Iterable)
+ self.assertIsInstance([], typing.Iterable[int])
+ self.assertNotIsInstance(42, typing.Iterable)
+ # Just in case, also test issubclass() a few times.
+ self.assertIsSubclass(list, typing.Iterable)
+ self.assertIsSubclass(list, typing.Iterable)
+
+ def test_iterator(self):
+ it = iter([])
+ self.assertIsInstance(it, typing.Iterator)
+ self.assertIsInstance(it, typing.Iterator[int])
+ self.assertNotIsInstance(42, typing.Iterator)
+
+ @skipUnless(PY35, 'Python 3.5 required')
+ def test_awaitable(self):
+ ns = {}
+ exec(
+ "async def foo() -> typing.Awaitable[int]:\n"
+ " return await AwaitableWrapper(42)\n",
+ globals(), ns)
+ foo = ns['foo']
+ g = foo()
+ self.assertIsSubclass(type(g), typing.Awaitable[int])
+ self.assertIsInstance(g, typing.Awaitable)
+ self.assertNotIsInstance(foo, typing.Awaitable)
+ self.assertIsSubclass(typing.Awaitable[Manager],
+ typing.Awaitable[Employee])
+ self.assertNotIsSubclass(typing.Awaitable[Employee],
+ typing.Awaitable[Manager])
+ g.send(None) # Run foo() till completion, to avoid warning.
+
+ @skipUnless(PY35, 'Python 3.5 required')
+ def test_async_iterable(self):
+ base_it = range(10) # type: Iterator[int]
+ it = AsyncIteratorWrapper(base_it)
+ self.assertIsInstance(it, typing.AsyncIterable)
+ self.assertIsInstance(it, typing.AsyncIterable)
+ self.assertIsSubclass(typing.AsyncIterable[Manager],
+ typing.AsyncIterable[Employee])
+ self.assertNotIsInstance(42, typing.AsyncIterable)
+
+ @skipUnless(PY35, 'Python 3.5 required')
+ def test_async_iterator(self):
+ base_it = range(10) # type: Iterator[int]
+ it = AsyncIteratorWrapper(base_it)
+ self.assertIsInstance(it, typing.AsyncIterator)
+ self.assertIsSubclass(typing.AsyncIterator[Manager],
+ typing.AsyncIterator[Employee])
+ self.assertNotIsInstance(42, typing.AsyncIterator)
+
+ def test_sized(self):
+ self.assertIsInstance([], typing.Sized)
+ self.assertNotIsInstance(42, typing.Sized)
+
+ def test_container(self):
+ self.assertIsInstance([], typing.Container)
+ self.assertNotIsInstance(42, typing.Container)
+
+ def test_abstractset(self):
+ self.assertIsInstance(set(), typing.AbstractSet)
+ self.assertNotIsInstance(42, typing.AbstractSet)
+
+ def test_mutableset(self):
+ self.assertIsInstance(set(), typing.MutableSet)
+ self.assertNotIsInstance(frozenset(), typing.MutableSet)
+
+ def test_mapping(self):
+ self.assertIsInstance({}, typing.Mapping)
+ self.assertNotIsInstance(42, typing.Mapping)
+
+ def test_mutablemapping(self):
+ self.assertIsInstance({}, typing.MutableMapping)
+ self.assertNotIsInstance(42, typing.MutableMapping)
+
+ def test_sequence(self):
+ self.assertIsInstance([], typing.Sequence)
+ self.assertNotIsInstance(42, typing.Sequence)
+
+ def test_mutablesequence(self):
+ self.assertIsInstance([], typing.MutableSequence)
+ self.assertNotIsInstance((), typing.MutableSequence)
+
+ def test_bytestring(self):
+ self.assertIsInstance(b'', typing.ByteString)
+ self.assertIsInstance(bytearray(b''), typing.ByteString)
+
+ def test_list(self):
+ self.assertIsSubclass(list, typing.List)
+
+ def test_set(self):
+ self.assertIsSubclass(set, typing.Set)
+ self.assertNotIsSubclass(frozenset, typing.Set)
+
+ def test_frozenset(self):
+ self.assertIsSubclass(frozenset, typing.FrozenSet)
+ self.assertNotIsSubclass(set, typing.FrozenSet)
+
+ def test_dict(self):
+ self.assertIsSubclass(dict, typing.Dict)
+
+ def test_no_list_instantiation(self):
+ with self.assertRaises(TypeError):
+ typing.List()
+ with self.assertRaises(TypeError):
+ typing.List[T]()
+ with self.assertRaises(TypeError):
+ typing.List[int]()
+
+ def test_list_subclass(self):
+
+ class MyList(typing.List[int]):
+ pass
+
+ a = MyList()
+ self.assertIsInstance(a, MyList)
+ self.assertIsInstance(a, typing.Sequence)
+
+ self.assertIsSubclass(MyList, list)
+ self.assertNotIsSubclass(list, MyList)
+
+ def test_no_dict_instantiation(self):
+ with self.assertRaises(TypeError):
+ typing.Dict()
+ with self.assertRaises(TypeError):
+ typing.Dict[KT, VT]()
+ with self.assertRaises(TypeError):
+ typing.Dict[str, int]()
+
+ def test_dict_subclass(self):
+
+ class MyDict(typing.Dict[str, int]):
+ pass
+
+ d = MyDict()
+ self.assertIsInstance(d, MyDict)
+ self.assertIsInstance(d, typing.MutableMapping)
+
+ self.assertIsSubclass(MyDict, dict)
+ self.assertNotIsSubclass(dict, MyDict)
+
+ def test_no_defaultdict_instantiation(self):
+ with self.assertRaises(TypeError):
+ typing.DefaultDict()
+ with self.assertRaises(TypeError):
+ typing.DefaultDict[KT, VT]()
+ with self.assertRaises(TypeError):
+ typing.DefaultDict[str, int]()
+
+ def test_defaultdict_subclass(self):
+
+ class MyDefDict(typing.DefaultDict[str, int]):
+ pass
+
+ dd = MyDefDict()
+ self.assertIsInstance(dd, MyDefDict)
+
+ self.assertIsSubclass(MyDefDict, collections.defaultdict)
+ self.assertNotIsSubclass(collections.defaultdict, MyDefDict)
+
+ def test_no_set_instantiation(self):
+ with self.assertRaises(TypeError):
+ typing.Set()
+ with self.assertRaises(TypeError):
+ typing.Set[T]()
+ with self.assertRaises(TypeError):
+ typing.Set[int]()
+
+ def test_set_subclass_instantiation(self):
+
+ class MySet(typing.Set[int]):
+ pass
+
+ d = MySet()
+ self.assertIsInstance(d, MySet)
+
+ def test_no_frozenset_instantiation(self):
+ with self.assertRaises(TypeError):
+ typing.FrozenSet()
+ with self.assertRaises(TypeError):
+ typing.FrozenSet[T]()
+ with self.assertRaises(TypeError):
+ typing.FrozenSet[int]()
+
+ def test_frozenset_subclass_instantiation(self):
+
+ class MyFrozenSet(typing.FrozenSet[int]):
+ pass
+
+ d = MyFrozenSet()
+ self.assertIsInstance(d, MyFrozenSet)
+
+ def test_no_tuple_instantiation(self):
+ with self.assertRaises(TypeError):
+ Tuple()
+ with self.assertRaises(TypeError):
+ Tuple[T]()
+ with self.assertRaises(TypeError):
+ Tuple[int]()
+
+ def test_generator(self):
+ def foo():
+ yield 42
+ g = foo()
+ self.assertIsSubclass(type(g), typing.Generator)
+ self.assertIsSubclass(typing.Generator[Manager, Employee, Manager],
+ typing.Generator[Employee, Manager, Employee])
+ self.assertNotIsSubclass(typing.Generator[Manager, Manager, Manager],
+ typing.Generator[Employee, Employee, Employee])
+
+ def test_no_generator_instantiation(self):
+ with self.assertRaises(TypeError):
+ typing.Generator()
+ with self.assertRaises(TypeError):
+ typing.Generator[T, T, T]()
+ with self.assertRaises(TypeError):
+ typing.Generator[int, int, int]()
+
+ def test_subclassing(self):
+
+ class MMA(typing.MutableMapping):
+ pass
+
+ with self.assertRaises(TypeError): # It's abstract
+ MMA()
+
+ class MMC(MMA):
+ def __len__(self):
+ return 0
+
+ self.assertEqual(len(MMC()), 0)
+
+ class MMB(typing.MutableMapping[KT, VT]):
+ def __len__(self):
+ return 0
+
+ self.assertEqual(len(MMB()), 0)
+ self.assertEqual(len(MMB[str, str]()), 0)
+ self.assertEqual(len(MMB[KT, VT]()), 0)
+
+ self.assertNotIsSubclass(dict, MMA)
+ self.assertNotIsSubclass(dict, MMB)
+
+ self.assertIsSubclass(MMA, typing.Mapping)
+ self.assertIsSubclass(MMB, typing.Mapping)
+ self.assertIsSubclass(MMC, typing.Mapping)
+
+
+class OtherABCTests(BaseTestCase):
+
+ @skipUnless(hasattr(typing, 'ContextManager'),
+ 'requires typing.ContextManager')
+ def test_contextmanager(self):
+ @contextlib.contextmanager
+ def manager():
+ yield 42
+
+ cm = manager()
+ self.assertIsInstance(cm, typing.ContextManager)
+ self.assertIsInstance(cm, typing.ContextManager[int])
+ self.assertNotIsInstance(42, typing.ContextManager)
+
+
+class TypeTests(BaseTestCase):
+
+ def test_type_basic(self):
+
+ class User: pass
+ class BasicUser(User): pass
+ class ProUser(User): pass
+
+ def new_user(user_class: Type[User]) -> User:
+ return user_class()
+
+ joe = new_user(BasicUser)
+
+ def test_type_typevar(self):
+
+ class User: pass
+ class BasicUser(User): pass
+ class ProUser(User): pass
+
+ U = TypeVar('U', bound=User)
+
+ def new_user(user_class: Type[U]) -> U:
+ return user_class()
+
+ joe = new_user(BasicUser)
+
+
+class NewTypeTests(BaseTestCase):
+
+ def test_basic(self):
+ UserId = NewType('UserId', int)
+ UserName = NewType('UserName', str)
+ self.assertIsInstance(UserId(5), int)
+ self.assertIsInstance(UserName('Joe'), str)
+ self.assertEqual(UserId(5) + 1, 6)
+
+ def test_errors(self):
+ UserId = NewType('UserId', int)
+ UserName = NewType('UserName', str)
+ with self.assertRaises(TypeError):
+ issubclass(UserId, int)
+ with self.assertRaises(TypeError):
+ class D(UserName):
+ pass
+
+
+class NamedTupleTests(BaseTestCase):
+
+ def test_basics(self):
+ Emp = NamedTuple('Emp', [('name', str), ('id', int)])
+ self.assertIsSubclass(Emp, tuple)
+ joe = Emp('Joe', 42)
+ jim = Emp(name='Jim', id=1)
+ self.assertIsInstance(joe, Emp)
+ self.assertIsInstance(joe, tuple)
+ self.assertEqual(joe.name, 'Joe')
+ self.assertEqual(joe.id, 42)
+ self.assertEqual(jim.name, 'Jim')
+ self.assertEqual(jim.id, 1)
+ self.assertEqual(Emp.__name__, 'Emp')
+ self.assertEqual(Emp._fields, ('name', 'id'))
+ self.assertEqual(Emp._field_types, dict(name=str, id=int))
+
+ def test_pickle(self):
+ global Emp # pickle wants to reference the class by name
+ Emp = NamedTuple('Emp', [('name', str), ('id', int)])
+ jane = Emp('jane', 37)
+ for proto in range(pickle.HIGHEST_PROTOCOL + 1):
+ z = pickle.dumps(jane, proto)
+ jane2 = pickle.loads(z)
+ self.assertEqual(jane2, jane)
+
+
+class IOTests(BaseTestCase):
+
+ def test_io(self):
+
+ def stuff(a: IO) -> AnyStr:
+ return a.readline()
+
+ a = stuff.__annotations__['a']
+ self.assertEqual(a.__parameters__, (AnyStr,))
+
+ def test_textio(self):
+
+ def stuff(a: TextIO) -> str:
+ return a.readline()
+
+ a = stuff.__annotations__['a']
+ self.assertEqual(a.__parameters__, ())
+
+ def test_binaryio(self):
+
+ def stuff(a: BinaryIO) -> bytes:
+ return a.readline()
+
+ a = stuff.__annotations__['a']
+ self.assertEqual(a.__parameters__, ())
+
+ def test_io_submodule(self):
+ from typing.io import IO, TextIO, BinaryIO, __all__, __name__
+ self.assertIs(IO, typing.IO)
+ self.assertIs(TextIO, typing.TextIO)
+ self.assertIs(BinaryIO, typing.BinaryIO)
+ self.assertEqual(set(__all__), set(['IO', 'TextIO', 'BinaryIO']))
+ self.assertEqual(__name__, 'typing.io')
+
+
+class RETests(BaseTestCase):
+ # Much of this is really testing _TypeAlias.
+
+ def test_basics(self):
+ pat = re.compile('[a-z]+', re.I)
+ self.assertIsSubclass(pat.__class__, Pattern)
+ self.assertIsSubclass(type(pat), Pattern)
+ self.assertIsSubclass(type(pat), Pattern[str])
+
+ mat = pat.search('12345abcde.....')
+ self.assertIsSubclass(mat.__class__, Match)
+ self.assertIsSubclass(mat.__class__, Match[str])
+ self.assertIsSubclass(mat.__class__, Match[bytes]) # Sad but true.
+ self.assertIsSubclass(type(mat), Match)
+ self.assertIsSubclass(type(mat), Match[str])
+
+ p = Pattern[Union[str, bytes]]
+ self.assertIsSubclass(Pattern[str], Pattern)
+ self.assertIsSubclass(Pattern[str], p)
+
+ m = Match[Union[bytes, str]]
+ self.assertIsSubclass(Match[bytes], Match)
+ self.assertIsSubclass(Match[bytes], m)
+
+ def test_errors(self):
+ with self.assertRaises(TypeError):
+ # Doesn't fit AnyStr.
+ Pattern[int]
+ with self.assertRaises(TypeError):
+ # Can't change type vars?
+ Match[T]
+ m = Match[Union[str, bytes]]
+ with self.assertRaises(TypeError):
+ # Too complicated?
+ m[str]
+ with self.assertRaises(TypeError):
+ # We don't support isinstance().
+ isinstance(42, Pattern)
+ with self.assertRaises(TypeError):
+ # We don't support isinstance().
+ isinstance(42, Pattern[str])
+
+ def test_repr(self):
+ self.assertEqual(repr(Pattern), 'Pattern[~AnyStr]')
+ self.assertEqual(repr(Pattern[str]), 'Pattern[str]')
+ self.assertEqual(repr(Pattern[bytes]), 'Pattern[bytes]')
+ self.assertEqual(repr(Match), 'Match[~AnyStr]')
+ self.assertEqual(repr(Match[str]), 'Match[str]')
+ self.assertEqual(repr(Match[bytes]), 'Match[bytes]')
+
+ def test_re_submodule(self):
+ from typing.re import Match, Pattern, __all__, __name__
+ self.assertIs(Match, typing.Match)
+ self.assertIs(Pattern, typing.Pattern)
+ self.assertEqual(set(__all__), set(['Match', 'Pattern']))
+ self.assertEqual(__name__, 'typing.re')
+
+ def test_cannot_subclass(self):
+ with self.assertRaises(TypeError) as ex:
+
+ class A(typing.Match):
+ pass
+
+ self.assertEqual(str(ex.exception),
+ "A type alias cannot be subclassed")
+
+
+class AllTests(BaseTestCase):
+ """Tests for __all__."""
+
+ def test_all(self):
+ from typing import __all__ as a
+ # Just spot-check the first and last of every category.
+ self.assertIn('AbstractSet', a)
+ self.assertIn('ValuesView', a)
+ self.assertIn('cast', a)
+ self.assertIn('overload', a)
+ if hasattr(contextlib, 'AbstractContextManager'):
+ self.assertIn('ContextManager', a)
+ # Check that io and re are not exported.
+ self.assertNotIn('io', a)
+ self.assertNotIn('re', a)
+ # Spot-check that stdlib modules aren't exported.
+ self.assertNotIn('os', a)
+ self.assertNotIn('sys', a)
+ # Check that Text is defined.
+ self.assertIn('Text', a)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/Lib/test/test_ucn.py b/Lib/test/test_ucn.py
index 1e07f6629f..8febf0af86 100644
--- a/Lib/test/test_ucn.py
+++ b/Lib/test/test_ucn.py
@@ -233,8 +233,5 @@ class UnicodeNamesTest(unittest.TestCase):
)
-def test_main():
- support.run_unittest(UnicodeNamesTest)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_unary.py b/Lib/test/test_unary.py
index b8355647fd..c3c17cc9f6 100644
--- a/Lib/test/test_unary.py
+++ b/Lib/test/test_unary.py
@@ -1,7 +1,6 @@
"""Test compiler changes for unary ops (+, -, ~) introduced in Python 2.2"""
import unittest
-from test.support import run_unittest
class UnaryOpTestCase(unittest.TestCase):
@@ -50,9 +49,5 @@ class UnaryOpTestCase(unittest.TestCase):
self.assertRaises(TypeError, eval, "~2.0")
-def test_main():
- run_unittest(UnaryOpTestCase)
-
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
index f046938b36..a38e7b1610 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -8,6 +8,7 @@ Written by Marc-Andre Lemburg (mal@lemburg.com).
import _string
import codecs
import itertools
+import operator
import struct
import sys
import unittest
@@ -318,6 +319,7 @@ class UnicodeTest(string_tests.CommonTest,
{ord('a'): None, ord('b'): ''})
self.checkequalnofix('xyyx', 'xzx', 'translate',
{ord('z'): 'yy'})
+
# this needs maketrans()
self.checkequalnofix('abababc', 'abababc', 'translate',
{'b': '<i>'})
@@ -327,6 +329,43 @@ class UnicodeTest(string_tests.CommonTest,
tbl = self.type2test.maketrans('abc', 'xyz', 'd')
self.checkequalnofix('xyzzy', 'abdcdcbdddd', 'translate', tbl)
+ # various tests switching from ASCII to latin1 or the opposite;
+ # same length, remove a letter, or replace with a longer string.
+ self.assertEqual("[a]".translate(str.maketrans('a', 'X')),
+ "[X]")
+ self.assertEqual("[a]".translate(str.maketrans({'a': 'X'})),
+ "[X]")
+ self.assertEqual("[a]".translate(str.maketrans({'a': None})),
+ "[]")
+ self.assertEqual("[a]".translate(str.maketrans({'a': 'XXX'})),
+ "[XXX]")
+ self.assertEqual("[a]".translate(str.maketrans({'a': '\xe9'})),
+ "[\xe9]")
+ self.assertEqual('axb'.translate(str.maketrans({'a': None, 'b': '123'})),
+ "x123")
+ self.assertEqual('axb'.translate(str.maketrans({'a': None, 'b': '\xe9'})),
+ "x\xe9")
+
+ # test non-ASCII (don't take the fast-path)
+ self.assertEqual("[a]".translate(str.maketrans({'a': '<\xe9>'})),
+ "[<\xe9>]")
+ self.assertEqual("[\xe9]".translate(str.maketrans({'\xe9': 'a'})),
+ "[a]")
+ self.assertEqual("[\xe9]".translate(str.maketrans({'\xe9': None})),
+ "[]")
+ self.assertEqual("[\xe9]".translate(str.maketrans({'\xe9': '123'})),
+ "[123]")
+ self.assertEqual("[a\xe9]".translate(str.maketrans({'a': '<\u20ac>'})),
+ "[<\u20ac>\xe9]")
+
+ # invalid Unicode characters
+ invalid_char = 0x10ffff+1
+ for before in "a\xe9\u20ac\U0010ffff":
+ mapping = str.maketrans({before: invalid_char})
+ text = "[%s]" % before
+ self.assertRaises(ValueError, text.translate, mapping)
+
+ # errors
self.assertRaises(TypeError, self.type2test.maketrans)
self.assertRaises(ValueError, self.type2test.maketrans, 'abc', 'defg')
self.assertRaises(TypeError, self.type2test.maketrans, 2, 'def')
@@ -341,10 +380,6 @@ class UnicodeTest(string_tests.CommonTest,
def test_split(self):
string_tests.CommonTest.test_split(self)
- # Mixed arguments
- self.checkequalnofix(['a', 'b', 'c', 'd'], 'a//b//c//d', 'split', '//')
- self.checkequalnofix(['a', 'b', 'c', 'd'], 'a//b//c//d', 'split', '//')
- self.checkequalnofix(['endcase ', ''], 'endcase test', 'split', 'test')
# test mixed kinds
for left, right in ('ba', '\u0101\u0100', '\U00010301\U00010300'):
left *= 9
@@ -526,7 +561,7 @@ class UnicodeTest(string_tests.CommonTest,
self.assertTrue('\ud800\udc02' < '\ud84d\udc56')
def test_islower(self):
- string_tests.MixinStrUnicodeUserStringTest.test_islower(self)
+ super().test_islower()
self.checkequalnofix(False, '\u1FFc', 'islower')
self.assertFalse('\u2167'.islower())
self.assertTrue('\u2177'.islower())
@@ -541,7 +576,7 @@ class UnicodeTest(string_tests.CommonTest,
self.assertFalse('\U0001F46F'.islower())
def test_isupper(self):
- string_tests.MixinStrUnicodeUserStringTest.test_isupper(self)
+ super().test_isupper()
if not sys.platform.startswith('java'):
self.checkequalnofix(False, '\u1FFc', 'isupper')
self.assertTrue('\u2167'.isupper())
@@ -557,7 +592,7 @@ class UnicodeTest(string_tests.CommonTest,
self.assertFalse('\U0001F46F'.isupper())
def test_istitle(self):
- string_tests.MixinStrUnicodeUserStringTest.test_istitle(self)
+ super().test_istitle()
self.checkequalnofix(True, '\u1FFc', 'istitle')
self.checkequalnofix(True, 'Greek \u1FFcitlecases ...', 'istitle')
@@ -569,7 +604,7 @@ class UnicodeTest(string_tests.CommonTest,
self.assertFalse(ch.istitle(), '{!a} is not title'.format(ch))
def test_isspace(self):
- string_tests.MixinStrUnicodeUserStringTest.test_isspace(self)
+ super().test_isspace()
self.checkequalnofix(True, '\u2000', 'isspace')
self.checkequalnofix(True, '\u200a', 'isspace')
self.checkequalnofix(False, '\u2014', 'isspace')
@@ -579,13 +614,13 @@ class UnicodeTest(string_tests.CommonTest,
self.assertFalse(ch.isspace(), '{!a} is not space.'.format(ch))
def test_isalnum(self):
- string_tests.MixinStrUnicodeUserStringTest.test_isalnum(self)
+ super().test_isalnum()
for ch in ['\U00010401', '\U00010427', '\U00010429', '\U0001044E',
'\U0001D7F6', '\U00011066', '\U000104A0', '\U0001F107']:
self.assertTrue(ch.isalnum(), '{!a} is alnum.'.format(ch))
def test_isalpha(self):
- string_tests.MixinStrUnicodeUserStringTest.test_isalpha(self)
+ super().test_isalpha()
self.checkequalnofix(True, '\u1FFc', 'isalpha')
# non-BMP, cased
self.assertTrue('\U00010401'.isalpha())
@@ -615,7 +650,7 @@ class UnicodeTest(string_tests.CommonTest,
self.assertTrue(ch.isdecimal(), '{!a} is decimal.'.format(ch))
def test_isdigit(self):
- string_tests.MixinStrUnicodeUserStringTest.test_isdigit(self)
+ super().test_isdigit()
self.checkequalnofix(True, '\u2460', 'isdigit')
self.checkequalnofix(False, '\xbc', 'isdigit')
self.checkequalnofix(True, '\u0660', 'isdigit')
@@ -768,7 +803,7 @@ class UnicodeTest(string_tests.CommonTest,
self.assertEqual('A\u0345\u03a3'.capitalize(), 'A\u0345\u03c2')
def test_title(self):
- string_tests.MixinStrUnicodeUserStringTest.test_title(self)
+ super().test_title()
self.assertEqual('\U0001044F'.title(), '\U00010427')
self.assertEqual('\U0001044F\U0001044F'.title(),
'\U00010427\U0001044F')
@@ -1317,20 +1352,20 @@ class UnicodeTest(string_tests.CommonTest,
self.assertEqual('%.2s' % "a\xe9\u20ac", 'a\xe9')
#issue 19995
- class PsuedoInt:
+ class PseudoInt:
def __init__(self, value):
self.value = int(value)
def __int__(self):
return self.value
def __index__(self):
return self.value
- class PsuedoFloat:
+ class PseudoFloat:
def __init__(self, value):
self.value = float(value)
def __int__(self):
return int(self.value)
- pi = PsuedoFloat(3.1415)
- letter_m = PsuedoInt(109)
+ pi = PseudoFloat(3.1415)
+ letter_m = PseudoInt(109)
self.assertEqual('%x' % 42, '2a')
self.assertEqual('%X' % 15, 'F')
self.assertEqual('%o' % 9, '11')
@@ -1339,11 +1374,11 @@ class UnicodeTest(string_tests.CommonTest,
self.assertEqual('%X' % letter_m, '6D')
self.assertEqual('%o' % letter_m, '155')
self.assertEqual('%c' % letter_m, 'm')
- self.assertWarns(DeprecationWarning, '%x'.__mod__, pi),
- self.assertWarns(DeprecationWarning, '%x'.__mod__, 3.14),
- self.assertWarns(DeprecationWarning, '%X'.__mod__, 2.11),
- self.assertWarns(DeprecationWarning, '%o'.__mod__, 1.79),
- self.assertWarns(DeprecationWarning, '%c'.__mod__, pi),
+ self.assertRaisesRegex(TypeError, '%x format: an integer is required, not float', operator.mod, '%x', 3.14),
+ self.assertRaisesRegex(TypeError, '%X format: an integer is required, not float', operator.mod, '%X', 2.11),
+ self.assertRaisesRegex(TypeError, '%o format: an integer is required, not float', operator.mod, '%o', 1.79),
+ self.assertRaisesRegex(TypeError, '%x format: an integer is required, not PseudoFloat', operator.mod, '%x', pi),
+ self.assertRaises(TypeError, operator.mod, '%c', pi),
def test_formatting_with_enum(self):
# issue18780
@@ -1739,7 +1774,7 @@ class UnicodeTest(string_tests.CommonTest,
def assertCorrectUTF8Decoding(self, seq, res, err):
"""
- Check that an invalid UTF-8 sequence raises an UnicodeDecodeError when
+ Check that an invalid UTF-8 sequence raises a UnicodeDecodeError when
'strict' is used, returns res when 'replace' is used, and that doesn't
return anything when 'ignore' is used.
"""
@@ -2061,7 +2096,8 @@ class UnicodeTest(string_tests.CommonTest,
'cp863', 'cp865', 'cp866', 'cp1125',
'iso8859_10', 'iso8859_13', 'iso8859_14', 'iso8859_15',
'iso8859_2', 'iso8859_3', 'iso8859_4', 'iso8859_5', 'iso8859_6',
- 'iso8859_7', 'iso8859_9', 'koi8_r', 'latin_1',
+ 'iso8859_7', 'iso8859_9',
+ 'koi8_r', 'koi8_t', 'koi8_u', 'kz1048', 'latin_1',
'mac_cyrillic', 'mac_latin2',
'cp1250', 'cp1251', 'cp1252', 'cp1253', 'cp1254', 'cp1255',
@@ -2089,14 +2125,14 @@ class UnicodeTest(string_tests.CommonTest,
'cp863', 'cp865', 'cp866', 'cp1125',
'iso8859_10', 'iso8859_13', 'iso8859_14', 'iso8859_15',
'iso8859_2', 'iso8859_4', 'iso8859_5',
- 'iso8859_9', 'koi8_r', 'latin_1',
+ 'iso8859_9', 'koi8_r', 'koi8_u', 'latin_1',
'mac_cyrillic', 'mac_latin2',
### These have undefined mappings:
#'cp1250', 'cp1251', 'cp1252', 'cp1253', 'cp1254', 'cp1255',
#'cp1256', 'cp1257', 'cp1258',
#'cp424', 'cp856', 'cp857', 'cp864', 'cp869', 'cp874',
- #'iso8859_3', 'iso8859_6', 'iso8859_7',
+ #'iso8859_3', 'iso8859_6', 'iso8859_7', 'koi8_t', 'kz1048',
#'mac_greek', 'mac_iceland','mac_roman', 'mac_turkish',
### These fail the round-trip:
@@ -2689,6 +2725,10 @@ class UnicodeTest(string_tests.CommonTest,
# Check that the second call returns the same result
self.assertEqual(getargs_s_hash(s), chr(k).encode() * (i + 1))
+ def test_free_after_iterating(self):
+ support.check_free_after_iterating(self, iter, str)
+ support.check_free_after_iterating(self, reversed, str)
+
class StringModuleTest(unittest.TestCase):
def test_formatter_parser(self):
diff --git a/Lib/test/test_unicodedata.py b/Lib/test/test_unicodedata.py
index 707b30e50c..6ecc91362d 100644
--- a/Lib/test/test_unicodedata.py
+++ b/Lib/test/test_unicodedata.py
@@ -9,8 +9,7 @@
import sys
import unittest
import hashlib
-import subprocess
-import test.support
+from test.support import script_helper
encoding = 'utf-8'
errors = 'surrogatepass'
@@ -21,7 +20,7 @@ errors = 'surrogatepass'
class UnicodeMethodsTest(unittest.TestCase):
# update this, if the database changes
- expectedchecksum = 'e74e878de71b6e780ffac271785c3cb58f6251f3'
+ expectedchecksum = '5971760872b2f98bb9c701e6c0db3273d756b3ec'
def test_method_checksum(self):
h = hashlib.sha1()
@@ -79,8 +78,9 @@ class UnicodeDatabaseTest(unittest.TestCase):
class UnicodeFunctionsTest(UnicodeDatabaseTest):
- # update this, if the database changes
- expectedchecksum = 'f0b74d26776331cc7bdc3a4698f037d73f2cee2b'
+ # Update this if the database changes. Make sure to do a full rebuild
+ # (e.g. 'make distclean && make') to get the correct checksum.
+ expectedchecksum = '5e74827cd07f9e546a30f34b7bcf6cc2eac38c8c'
def test_function_checksum(self):
data = []
h = hashlib.sha1()
@@ -233,16 +233,12 @@ class UnicodeMiscTest(UnicodeDatabaseTest):
code = "import sys;" \
"sys.modules['unicodedata'] = None;" \
"""eval("'\\\\N{SOFT HYPHEN}'")"""
- args = [sys.executable, "-c", code]
- # We use a subprocess because the unicodedata module may already have
- # been loaded in this process.
- popen = subprocess.Popen(args, stderr=subprocess.PIPE)
- popen.wait()
- self.assertEqual(popen.returncode, 1)
+ # We use a separate process because the unicodedata module may already
+ # have been loaded in this process.
+ result = script_helper.assert_python_failure("-c", code)
error = "SyntaxError: (unicode error) \\N escapes not supported " \
"(can't load unicodedata module)"
- self.assertIn(error, popen.stderr.read().decode("ascii"))
- popen.stderr.close()
+ self.assertIn(error, result.err.decode("ascii"))
def test_decimal_numeric_consistent(self):
# Test that decimal and numeric are consistent,
@@ -312,12 +308,5 @@ class UnicodeMiscTest(UnicodeDatabaseTest):
self.assertEqual(len(lines), 1,
r"\u%.4x should not be a linebreak" % i)
-def test_main():
- test.support.run_unittest(
- UnicodeMiscTest,
- UnicodeMethodsTest,
- UnicodeFunctionsTest
- )
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_unpack.py b/Lib/test/test_unpack.py
index b1c483d4d5..d1ccb38937 100644
--- a/Lib/test/test_unpack.py
+++ b/Lib/test/test_unpack.py
@@ -76,7 +76,7 @@ Unpacking sequence too short
>>> a, b, c, d = Seq()
Traceback (most recent call last):
...
- ValueError: need more than 3 values to unpack
+ ValueError: not enough values to unpack (expected 4, got 3)
Unpacking sequence too long
diff --git a/Lib/test/test_unpack_ex.py b/Lib/test/test_unpack_ex.py
index ae2dcbd985..d27eef0397 100644
--- a/Lib/test/test_unpack_ex.py
+++ b/Lib/test/test_unpack_ex.py
@@ -71,8 +71,188 @@ Multiple targets
>>> a == 0 and b == [1, 2, 3] and c == 4 and d == [0, 1, 2, 3] and e == 4
True
+Assignment unpacking
+
+ >>> a, b, *c = range(5)
+ >>> a, b, c
+ (0, 1, [2, 3, 4])
+ >>> *a, b, c = a, b, *c
+ >>> a, b, c
+ ([0, 1, 2], 3, 4)
+
+Set display element unpacking
+
+ >>> a = [1, 2, 3]
+ >>> sorted({1, *a, 0, 4})
+ [0, 1, 2, 3, 4]
+
+ >>> {1, *1, 0, 4}
+ Traceback (most recent call last):
+ ...
+ TypeError: 'int' object is not iterable
+
+Dict display element unpacking
+
+ >>> kwds = {'z': 0, 'w': 12}
+ >>> sorted({'x': 1, 'y': 2, **kwds}.items())
+ [('w', 12), ('x', 1), ('y', 2), ('z', 0)]
+
+ >>> sorted({**{'x': 1}, 'y': 2, **{'z': 3}}.items())
+ [('x', 1), ('y', 2), ('z', 3)]
+
+ >>> sorted({**{'x': 1}, 'y': 2, **{'x': 3}}.items())
+ [('x', 3), ('y', 2)]
+
+ >>> sorted({**{'x': 1}, **{'x': 3}, 'x': 4}.items())
+ [('x', 4)]
+
+ >>> {**{}}
+ {}
+
+ >>> a = {}
+ >>> {**a}[0] = 1
+ >>> a
+ {}
+
+ >>> {**1}
+ Traceback (most recent call last):
+ ...
+ TypeError: 'int' object is not a mapping
+
+ >>> {**[]}
+ Traceback (most recent call last):
+ ...
+ TypeError: 'list' object is not a mapping
+
+ >>> len(eval("{" + ", ".join("**{{{}: {}}}".format(i, i)
+ ... for i in range(1000)) + "}"))
+ 1000
+
+ >>> {0:1, **{0:2}, 0:3, 0:4}
+ {0: 4}
+
+List comprehension element unpacking
+
+ >>> a, b, c = [0, 1, 2], 3, 4
+ >>> [*a, b, c]
+ [0, 1, 2, 3, 4]
+
+ >>> l = [a, (3, 4), {5}, {6: None}, (i for i in range(7, 10))]
+ >>> [*item for item in l]
+ Traceback (most recent call last):
+ ...
+ SyntaxError: iterable unpacking cannot be used in comprehension
+
+ >>> [*[0, 1] for i in range(10)]
+ Traceback (most recent call last):
+ ...
+ SyntaxError: iterable unpacking cannot be used in comprehension
+
+ >>> [*'a' for i in range(10)]
+ Traceback (most recent call last):
+ ...
+ SyntaxError: iterable unpacking cannot be used in comprehension
+
+ >>> [*[] for i in range(10)]
+ Traceback (most recent call last):
+ ...
+ SyntaxError: iterable unpacking cannot be used in comprehension
+
+Generator expression in function arguments
+
+ >>> list(*x for x in (range(5) for i in range(3)))
+ Traceback (most recent call last):
+ ...
+ list(*x for x in (range(5) for i in range(3)))
+ ^
+ SyntaxError: invalid syntax
+
+ >>> dict(**x for x in [{1:2}])
+ Traceback (most recent call last):
+ ...
+ dict(**x for x in [{1:2}])
+ ^
+ SyntaxError: invalid syntax
+
+Iterable argument unpacking
+
+ >>> print(*[1], *[2], 3)
+ 1 2 3
+
+Make sure that they don't corrupt the passed-in dicts.
+
+ >>> def f(x, y):
+ ... print(x, y)
+ ...
+ >>> original_dict = {'x': 1}
+ >>> f(**original_dict, y=2)
+ 1 2
+ >>> original_dict
+ {'x': 1}
+
Now for some failures
+Make sure the raised errors are right for keyword argument unpackings
+
+ >>> from collections.abc import MutableMapping
+ >>> class CrazyDict(MutableMapping):
+ ... def __init__(self):
+ ... self.d = {}
+ ...
+ ... def __iter__(self):
+ ... for x in self.d.__iter__():
+ ... if x == 'c':
+ ... self.d['z'] = 10
+ ... yield x
+ ...
+ ... def __getitem__(self, k):
+ ... return self.d[k]
+ ...
+ ... def __len__(self):
+ ... return len(self.d)
+ ...
+ ... def __setitem__(self, k, v):
+ ... self.d[k] = v
+ ...
+ ... def __delitem__(self, k):
+ ... del self.d[k]
+ ...
+ >>> d = CrazyDict()
+ >>> d.d = {chr(ord('a') + x): x for x in range(5)}
+ >>> e = {**d}
+ Traceback (most recent call last):
+ ...
+ RuntimeError: dictionary changed size during iteration
+
+ >>> d.d = {chr(ord('a') + x): x for x in range(5)}
+ >>> def f(**kwargs): print(kwargs)
+ >>> f(**d)
+ Traceback (most recent call last):
+ ...
+ RuntimeError: dictionary changed size during iteration
+
+Overridden parameters
+
+ >>> f(x=5, **{'x': 3}, y=2)
+ Traceback (most recent call last):
+ ...
+ TypeError: f() got multiple values for keyword argument 'x'
+
+ >>> f(**{'x': 3}, x=5, y=2)
+ Traceback (most recent call last):
+ ...
+ TypeError: f() got multiple values for keyword argument 'x'
+
+ >>> f(**{'x': 3}, **{'x': 5}, y=2)
+ Traceback (most recent call last):
+ ...
+ TypeError: f() got multiple values for keyword argument 'x'
+
+ >>> f(**{1: 3}, **{1: 5})
+ Traceback (most recent call last):
+ ...
+ TypeError: f() keywords must be strings
+
Unpacking non-sequence
>>> a, *b = 7
@@ -85,7 +265,14 @@ Unpacking sequence too short
>>> a, *b, c, d, e = Seq()
Traceback (most recent call last):
...
- ValueError: need more than 3 values to unpack
+ ValueError: not enough values to unpack (expected at least 4, got 3)
+
+Unpacking sequence too short and target appears last
+
+ >>> a, b, c, d, *e = Seq()
+ Traceback (most recent call last):
+ ...
+ ValueError: not enough values to unpack (expected at least 4, got 3)
Unpacking a sequence where the test for too long raises a different kind of
error
@@ -131,17 +318,17 @@ Now some general starred expressions (all fail).
>>> *a # doctest:+ELLIPSIS
Traceback (most recent call last):
...
- SyntaxError: can use starred expression only as assignment target
+ SyntaxError: can't use starred expression here
>>> *1 # doctest:+ELLIPSIS
Traceback (most recent call last):
...
- SyntaxError: can use starred expression only as assignment target
+ SyntaxError: can't use starred expression here
>>> x = *a # doctest:+ELLIPSIS
Traceback (most recent call last):
...
- SyntaxError: can use starred expression only as assignment target
+ SyntaxError: can't use starred expression here
Some size constraints (all fail.)
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
index e100039649..5d05f8d7d2 100644
--- a/Lib/test/test_urllib.py
+++ b/Lib/test/test_urllib.py
@@ -1,4 +1,4 @@
-"""Regresssion tests for urllib"""
+"""Regresssion tests for what was in Python 2's "urllib" module"""
import urllib.parse
import urllib.request
@@ -10,7 +10,10 @@ import unittest
from unittest.mock import patch
from test import support
import os
-import ssl
+try:
+ import ssl
+except ImportError:
+ ssl = None
import sys
import tempfile
from nturl2path import url2pathname, pathname2url
@@ -36,10 +39,7 @@ def urlopen(url, data=None, proxies=None):
if proxies is not None:
opener = urllib.request.FancyURLopener(proxies=proxies)
elif not _urlopener:
- with support.check_warnings(
- ('FancyURLopener style of invoking requests is deprecated.',
- DeprecationWarning)):
- opener = urllib.request.FancyURLopener()
+ opener = FancyURLopener()
_urlopener = opener
else:
opener = _urlopener
@@ -49,6 +49,13 @@ def urlopen(url, data=None, proxies=None):
return opener.open(url, data)
+def FancyURLopener():
+ with support.check_warnings(
+ ('FancyURLopener style of invoking requests is deprecated.',
+ DeprecationWarning)):
+ return urllib.request.FancyURLopener()
+
+
def fakehttp(fakedata):
class FakeSocket(io.BytesIO):
io_refs = 1
@@ -79,10 +86,11 @@ def fakehttp(fakedata):
# buffer to store data for verification in urlopen tests.
buf = None
- fakesock = FakeSocket(fakedata)
def connect(self):
- self.sock = self.fakesock
+ self.sock = FakeSocket(self.fakedata)
+ type(self).fakesock = self.sock
+ FakeHTTPConnection.fakedata = fakedata
return FakeHTTPConnection
@@ -219,8 +227,59 @@ class ProxyTests(unittest.TestCase):
# getproxies_environment use lowered case truncated (no '_proxy') keys
self.assertEqual('localhost', proxies['no'])
# List of no_proxies with space.
- self.env.set('NO_PROXY', 'localhost, anotherdomain.com, newdomain.com')
+ self.env.set('NO_PROXY', 'localhost, anotherdomain.com, newdomain.com:1234')
self.assertTrue(urllib.request.proxy_bypass_environment('anotherdomain.com'))
+ self.assertTrue(urllib.request.proxy_bypass_environment('anotherdomain.com:8888'))
+ self.assertTrue(urllib.request.proxy_bypass_environment('newdomain.com:1234'))
+
+ def test_proxy_bypass_environment_host_match(self):
+ bypass = urllib.request.proxy_bypass_environment
+ self.env.set('NO_PROXY',
+ 'localhost, anotherdomain.com, newdomain.com:1234')
+ self.assertTrue(bypass('localhost'))
+ self.assertTrue(bypass('LocalHost')) # MixedCase
+ self.assertTrue(bypass('LOCALHOST')) # UPPERCASE
+ self.assertTrue(bypass('newdomain.com:1234'))
+ self.assertTrue(bypass('anotherdomain.com:8888'))
+ self.assertTrue(bypass('www.newdomain.com:1234'))
+ self.assertFalse(bypass('prelocalhost'))
+ self.assertFalse(bypass('newdomain.com')) # no port
+ self.assertFalse(bypass('newdomain.com:1235')) # wrong port
+
+class ProxyTests_withOrderedEnv(unittest.TestCase):
+
+ def setUp(self):
+ # We need to test conditions, where variable order _is_ significant
+ self._saved_env = os.environ
+ # Monkey patch os.environ, start with empty fake environment
+ os.environ = collections.OrderedDict()
+
+ def tearDown(self):
+ os.environ = self._saved_env
+
+ def test_getproxies_environment_prefer_lowercase(self):
+ # Test lowercase preference with removal
+ os.environ['no_proxy'] = ''
+ os.environ['No_Proxy'] = 'localhost'
+ self.assertFalse(urllib.request.proxy_bypass_environment('localhost'))
+ self.assertFalse(urllib.request.proxy_bypass_environment('arbitrary'))
+ os.environ['http_proxy'] = ''
+ os.environ['HTTP_PROXY'] = 'http://somewhere:3128'
+ proxies = urllib.request.getproxies_environment()
+ self.assertEqual({}, proxies)
+ # Test lowercase preference of proxy bypass and correct matching including ports
+ os.environ['no_proxy'] = 'localhost, noproxy.com, my.proxy:1234'
+ os.environ['No_Proxy'] = 'xyz.com'
+ self.assertTrue(urllib.request.proxy_bypass_environment('localhost'))
+ self.assertTrue(urllib.request.proxy_bypass_environment('noproxy.com:5678'))
+ self.assertTrue(urllib.request.proxy_bypass_environment('my.proxy:1234'))
+ self.assertFalse(urllib.request.proxy_bypass_environment('my.proxy'))
+ self.assertFalse(urllib.request.proxy_bypass_environment('arbitrary'))
+ # Test lowercase preference with replacement
+ os.environ['http_proxy'] = 'http://somewhere:3128'
+ os.environ['Http_Proxy'] = 'http://somewhereelse:3128'
+ proxies = urllib.request.getproxies_environment()
+ self.assertEqual('http://somewhere:3128', proxies['http'])
class urlopen_HttpTests(unittest.TestCase, FakeHTTPMixin, FakeFTPMixin):
"""Test urlopen() opening a fake http connection."""
@@ -288,11 +347,26 @@ Connection: close
Content-Type: text/html; charset=iso-8859-1
''')
try:
- self.assertRaises(urllib.error.HTTPError, urlopen,
- "http://python.org/")
+ msg = "Redirection to url 'file:"
+ with self.assertRaisesRegex(urllib.error.HTTPError, msg):
+ urlopen("http://python.org/")
finally:
self.unfakehttp()
+ def test_redirect_limit_independent(self):
+ # Ticket #12923: make sure independent requests each use their
+ # own retry limit.
+ for i in range(FancyURLopener().maxtries):
+ self.fakehttp(b'''HTTP/1.1 302 Found
+Location: file://guidocomputer.athome.com:/python/license
+Connection: close
+''')
+ try:
+ self.assertRaises(urllib.error.HTTPError, urlopen,
+ "http://something")
+ finally:
+ self.unfakehttp()
+
def test_empty_socket(self):
# urlopen() raises OSError if the underlying socket does not send any
# data. (#1680230)
@@ -380,6 +454,7 @@ Content-Type: text/html; charset=iso-8859-1
with support.check_warnings(('',DeprecationWarning)):
urllib.request.URLopener()
+ @unittest.skipUnless(ssl, "ssl module required")
def test_cafile_and_context(self):
context = ssl.create_default_context()
with self.assertRaises(ValueError):
@@ -1331,7 +1406,7 @@ class URLopener_Tests(unittest.TestCase):
# serv.settimeout(3)
# serv.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
# serv.bind(("", 9093))
-# serv.listen(5)
+# serv.listen()
# try:
# conn, addr = serv.accept()
# conn.send("1 Hola mundo\n")
diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py
index 7d41ea1106..eda7cccc60 100644
--- a/Lib/test/test_urllib2.py
+++ b/Lib/test/test_urllib2.py
@@ -11,7 +11,10 @@ import sys
import urllib.request
# The proxy bypass method imported below has logic specific to the OSX
# proxy config data structure but is testable on all platforms.
-from urllib.request import Request, OpenerDirector, _parse_proxy, _proxy_bypass_macosx_sysconf
+from urllib.request import (Request, OpenerDirector, HTTPBasicAuthHandler,
+ HTTPPasswordMgrWithPriorAuth, _parse_proxy,
+ _proxy_bypass_macosx_sysconf,
+ AbstractDigestAuthHandler)
from urllib.parse import urlparse
import urllib.error
import http.client
@@ -21,6 +24,7 @@ import http.client
# CacheFTPHandler (hard to write)
# parse_keqv_list, parse_http_list, HTTPDigestAuthHandler
+
class TrivialTests(unittest.TestCase):
def test___all__(self):
@@ -71,6 +75,7 @@ class TrivialTests(unittest.TestCase):
err = urllib.error.URLError('reason')
self.assertIn(err.reason, str(err))
+
class RequestHdrsTests(unittest.TestCase):
def test_request_headers_dict(self):
@@ -130,7 +135,6 @@ class RequestHdrsTests(unittest.TestCase):
req.remove_header("Unredirected-spam")
self.assertFalse(req.has_header("Unredirected-spam"))
-
def test_password_manager(self):
mgr = urllib.request.HTTPPasswordMgr()
add = mgr.add_password
@@ -234,43 +238,60 @@ class RequestHdrsTests(unittest.TestCase):
class MockOpener:
addheaders = []
+
def open(self, req, data=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT):
self.req, self.data, self.timeout = req, data, timeout
+
def error(self, proto, *args):
self.proto, self.args = proto, args
+
class MockFile:
- def read(self, count=None): pass
- def readline(self, count=None): pass
- def close(self): pass
+ def read(self, count=None):
+ pass
+
+ def readline(self, count=None):
+ pass
+
+ def close(self):
+ pass
+
class MockHeaders(dict):
def getheaders(self, name):
return list(self.values())
+
class MockResponse(io.StringIO):
def __init__(self, code, msg, headers, data, url=None):
io.StringIO.__init__(self, data)
self.code, self.msg, self.headers, self.url = code, msg, headers, url
+
def info(self):
return self.headers
+
def geturl(self):
return self.url
+
class MockCookieJar:
def add_cookie_header(self, request):
self.ach_req = request
+
def extract_cookies(self, response, request):
self.ec_req, self.ec_r = request, response
+
class FakeMethod:
def __init__(self, meth_name, action, handle):
self.meth_name = meth_name
self.handle = handle
self.action = action
+
def __call__(self, *args):
return self.handle(self.meth_name, self.action, *args)
+
class MockHTTPResponse(io.IOBase):
def __init__(self, fp, msg, status, reason):
self.fp = fp
@@ -324,24 +345,31 @@ class MockHTTPClass:
self.data = body
if self.raise_on_endheaders:
raise OSError()
+
def getresponse(self):
return MockHTTPResponse(MockFile(), {}, 200, "OK")
def close(self):
pass
+
class MockHandler:
# useful for testing handler machinery
# see add_ordered_mock_handlers() docstring
handler_order = 500
+
def __init__(self, methods):
self._define_methods(methods)
+
def _define_methods(self, methods):
for spec in methods:
- if len(spec) == 2: name, action = spec
- else: name, action = spec, None
+ if len(spec) == 2:
+ name, action = spec
+ else:
+ name, action = spec, None
meth = FakeMethod(name, action, self.handle)
setattr(self.__class__, name, meth)
+
def handle(self, fn_name, action, *args, **kwds):
self.parent.calls.append((self, fn_name, args, kwds))
if action is None:
@@ -364,16 +392,21 @@ class MockHandler:
elif action == "raise":
raise urllib.error.URLError("blah")
assert False
- def close(self): pass
+
+ def close(self):
+ pass
+
def add_parent(self, parent):
self.parent = parent
self.parent.calls = []
+
def __lt__(self, other):
if not hasattr(other, "handler_order"):
# No handler_order, leave in original order. Yuck.
return True
return self.handler_order < other.handler_order
+
def add_ordered_mock_handlers(opener, meth_spec):
"""Create MockHandlers and add them to an OpenerDirector.
@@ -396,7 +429,9 @@ def add_ordered_mock_handlers(opener, meth_spec):
handlers = []
count = 0
for meths in meth_spec:
- class MockHandlerSubclass(MockHandler): pass
+ class MockHandlerSubclass(MockHandler):
+ pass
+
h = MockHandlerSubclass(meths)
h.handler_order += count
h.add_parent(opener)
@@ -405,12 +440,14 @@ def add_ordered_mock_handlers(opener, meth_spec):
opener.add_handler(h)
return handlers
+
def build_test_opener(*handler_instances):
opener = OpenerDirector()
for h in handler_instances:
opener.add_handler(h)
return opener
+
class MockHTTPHandler(urllib.request.BaseHandler):
# useful for testing redirections and auth
# sends supplied headers and code as first response
@@ -419,11 +456,13 @@ class MockHTTPHandler(urllib.request.BaseHandler):
self.code = code
self.headers = headers
self.reset()
+
def reset(self):
self._count = 0
self.requests = []
+
def http_open(self, req):
- import email, http.client, copy
+ import email, copy
self.requests.append(copy.deepcopy(req))
if self._count == 0:
self._count = self._count + 1
@@ -436,23 +475,45 @@ class MockHTTPHandler(urllib.request.BaseHandler):
msg = email.message_from_string("\r\n\r\n")
return MockResponse(200, "OK", msg, "", req.get_full_url())
+
class MockHTTPSHandler(urllib.request.AbstractHTTPHandler):
# Useful for testing the Proxy-Authorization request by verifying the
# properties of httpcon
- def __init__(self):
- urllib.request.AbstractHTTPHandler.__init__(self)
+ def __init__(self, debuglevel=0):
+ urllib.request.AbstractHTTPHandler.__init__(self, debuglevel=debuglevel)
self.httpconn = MockHTTPClass()
def https_open(self, req):
return self.do_open(self.httpconn, req)
+
+class MockHTTPHandlerCheckAuth(urllib.request.BaseHandler):
+ # useful for testing auth
+ # sends supplied code response
+ # checks if auth header is specified in request
+ def __init__(self, code):
+ self.code = code
+ self.has_auth_header = False
+
+ def reset(self):
+ self.has_auth_header = False
+
+ def http_open(self, req):
+ if req.has_header('Authorization'):
+ self.has_auth_header = True
+ name = http.client.responses[self.code]
+ return MockResponse(self.code, name, MockFile(), "", req.get_full_url())
+
+
+
class MockPasswordManager:
def add_password(self, realm, uri, user, password):
self.realm = realm
self.url = uri
self.user = user
self.password = password
+
def find_user_password(self, realm, authuri):
self.target_realm = realm
self.target_url = authuri
@@ -517,11 +578,11 @@ class OpenerDirectorTests(unittest.TestCase):
def test_handler_order(self):
o = OpenerDirector()
handlers = []
- for meths, handler_order in [
- ([("http_open", "return self")], 500),
- (["http_open"], 0),
- ]:
- class MockHandlerSubclass(MockHandler): pass
+ for meths, handler_order in [([("http_open", "return self")], 500),
+ (["http_open"], 0)]:
+ class MockHandlerSubclass(MockHandler):
+ pass
+
h = MockHandlerSubclass(meths)
h.handler_order = handler_order
handlers.append(h)
@@ -559,7 +620,8 @@ class OpenerDirectorTests(unittest.TestCase):
handlers = add_ordered_mock_handlers(o, meth_spec)
class Unknown:
- def __eq__(self, other): return True
+ def __eq__(self, other):
+ return True
req = Request("http://example.com/")
o.open(req)
@@ -572,7 +634,6 @@ class OpenerDirectorTests(unittest.TestCase):
self.assertEqual((handler, method_name), got[:2])
self.assertEqual(args, got[2])
-
def test_processors(self):
# *_request / *_response methods get called appropriately
o = OpenerDirector()
@@ -608,6 +669,7 @@ class OpenerDirectorTests(unittest.TestCase):
if args[1] is not None:
self.assertIsInstance(args[1], MockResponse)
+
def sanepathname2url(path):
try:
path.encode("utf-8")
@@ -619,18 +681,25 @@ def sanepathname2url(path):
# XXX don't ask me about the mac...
return urlpath
+
class HandlerTests(unittest.TestCase):
def test_ftp(self):
class MockFTPWrapper:
- def __init__(self, data): self.data = data
+ def __init__(self, data):
+ self.data = data
+
def retrfile(self, filename, filetype):
self.filename, self.filetype = filename, filetype
return io.StringIO(self.data), len(self.data)
- def close(self): pass
+
+ def close(self):
+ pass
class NullFTPHandler(urllib.request.FTPHandler):
- def __init__(self, data): self.data = data
+ def __init__(self, data):
+ self.data = data
+
def connect_ftp(self, user, passwd, host, port, dirs,
timeout=socket._GLOBAL_DEFAULT_TIMEOUT):
self.user, self.passwd = user, passwd
@@ -868,7 +937,7 @@ class HandlerTests(unittest.TestCase):
self.assertRaises(ValueError, h.do_request_, req)
else:
newreq = h.do_request_(req)
- self.assertEqual(int(newreq.get_header('Content-length')),30)
+ self.assertEqual(int(newreq.get_header('Content-length')), 30)
file_obj.close()
@@ -881,6 +950,13 @@ class HandlerTests(unittest.TestCase):
newreq = h.do_request_(req)
self.assertEqual(int(newreq.get_header('Content-length')),16)
+ def test_http_handler_debuglevel(self):
+ o = OpenerDirector()
+ h = MockHTTPSHandler(debuglevel=1)
+ o.add_handler(h)
+ o.open("https://www.example.com")
+ self.assertEqual(h._debuglevel, 1)
+
def test_http_doubleslash(self):
# Checks the presence of any unnecessary double slash in url does not
# break anything. Previously, a double slash directly after the host
@@ -901,12 +977,12 @@ class HandlerTests(unittest.TestCase):
# Check whether host is determined correctly if there is no proxy
np_ds_req = h.do_request_(ds_req)
- self.assertEqual(np_ds_req.unredirected_hdrs["Host"],"example.com")
+ self.assertEqual(np_ds_req.unredirected_hdrs["Host"], "example.com")
# Check whether host is determined correctly if there is a proxy
- ds_req.set_proxy("someproxy:3128",None)
+ ds_req.set_proxy("someproxy:3128", None)
p_ds_req = h.do_request_(ds_req)
- self.assertEqual(p_ds_req.unredirected_hdrs["Host"],"example.com")
+ self.assertEqual(p_ds_req.unredirected_hdrs["Host"], "example.com")
def test_full_url_setter(self):
# Checks to ensure that components are set correctly after setting the
@@ -948,15 +1024,14 @@ class HandlerTests(unittest.TestCase):
weird_url = 'http://www.python.org?getspam'
req = Request(weird_url)
newreq = h.do_request_(req)
- self.assertEqual(newreq.host,'www.python.org')
- self.assertEqual(newreq.selector,'/?getspam')
+ self.assertEqual(newreq.host, 'www.python.org')
+ self.assertEqual(newreq.selector, '/?getspam')
url_without_path = 'http://www.python.org'
req = Request(url_without_path)
newreq = h.do_request_(req)
- self.assertEqual(newreq.host,'www.python.org')
- self.assertEqual(newreq.selector,'')
-
+ self.assertEqual(newreq.host, 'www.python.org')
+ self.assertEqual(newreq.selector, '')
def test_errors(self):
h = urllib.request.HTTPErrorProcessor()
@@ -1043,6 +1118,7 @@ class HandlerTests(unittest.TestCase):
# loop detection
req = Request(from_url)
req.timeout = socket._GLOBAL_DEFAULT_TIMEOUT
+
def redirect(h, req, url=to_url):
h.http_error_302(req, MockFile(), 302, "Blah",
MockHeaders({"location": url}))
@@ -1073,7 +1149,6 @@ class HandlerTests(unittest.TestCase):
self.assertEqual(count,
urllib.request.HTTPRedirectHandler.max_redirections)
-
def test_invalid_redirect(self):
from_url = "http://example.com/a.html"
valid_schemes = ['http','https','ftp']
@@ -1133,6 +1208,57 @@ class HandlerTests(unittest.TestCase):
fp = o.open('http://www.example.com')
self.assertEqual(fp.geturl(), redirected_url.strip())
+ def test_redirect_no_path(self):
+ # Issue 14132: Relative redirect strips original path
+ real_class = http.client.HTTPConnection
+ response1 = b"HTTP/1.1 302 Found\r\nLocation: ?query\r\n\r\n"
+ http.client.HTTPConnection = test_urllib.fakehttp(response1)
+ self.addCleanup(setattr, http.client, "HTTPConnection", real_class)
+ urls = iter(("/path", "/path?query"))
+ def request(conn, method, url, *pos, **kw):
+ self.assertEqual(url, next(urls))
+ real_class.request(conn, method, url, *pos, **kw)
+ # Change response for subsequent connection
+ conn.__class__.fakedata = b"HTTP/1.1 200 OK\r\n\r\nHello!"
+ http.client.HTTPConnection.request = request
+ fp = urllib.request.urlopen("http://python.org/path")
+ self.assertEqual(fp.geturl(), "http://python.org/path?query")
+
+ def test_redirect_encoding(self):
+ # Some characters in the redirect target may need special handling,
+ # but most ASCII characters should be treated as already encoded
+ class Handler(urllib.request.HTTPHandler):
+ def http_open(self, req):
+ result = self.do_open(self.connection, req)
+ self.last_buf = self.connection.buf
+ # Set up a normal response for the next request
+ self.connection = test_urllib.fakehttp(
+ b'HTTP/1.1 200 OK\r\n'
+ b'Content-Length: 3\r\n'
+ b'\r\n'
+ b'123'
+ )
+ return result
+ handler = Handler()
+ opener = urllib.request.build_opener(handler)
+ tests = (
+ (b'/p\xC3\xA5-dansk/', b'/p%C3%A5-dansk/'),
+ (b'/spaced%20path/', b'/spaced%20path/'),
+ (b'/spaced path/', b'/spaced%20path/'),
+ (b'/?p\xC3\xA5-dansk', b'/?p%C3%A5-dansk'),
+ )
+ for [location, result] in tests:
+ with self.subTest(repr(location)):
+ handler.connection = test_urllib.fakehttp(
+ b'HTTP/1.1 302 Redirect\r\n'
+ b'Location: ' + location + b'\r\n'
+ b'\r\n'
+ )
+ response = opener.open('http://example.com/')
+ expected = b'GET ' + result + b' '
+ request = handler.last_buf
+ self.assertTrue(request.startswith(expected), repr(request))
+
def test_proxy(self):
o = OpenerDirector()
ph = urllib.request.ProxyHandler(dict(http="proxy.example.com:3128"))
@@ -1176,7 +1302,6 @@ class HandlerTests(unittest.TestCase):
self.assertEqual(req.host, "www.python.org")
del os.environ['no_proxy']
-
def test_proxy_https(self):
o = OpenerDirector()
ph = urllib.request.ProxyHandler(dict(https="proxy.example.com:3128"))
@@ -1200,21 +1325,21 @@ class HandlerTests(unittest.TestCase):
https_handler = MockHTTPSHandler()
o.add_handler(https_handler)
req = Request("https://www.example.com/")
- req.add_header("Proxy-Authorization","FooBar")
- req.add_header("User-Agent","Grail")
+ req.add_header("Proxy-Authorization", "FooBar")
+ req.add_header("User-Agent", "Grail")
self.assertEqual(req.host, "www.example.com")
self.assertIsNone(req._tunnel_host)
o.open(req)
# Verify Proxy-Authorization gets tunneled to request.
# httpsconn req_headers do not have the Proxy-Authorization header but
# the req will have.
- self.assertNotIn(("Proxy-Authorization","FooBar"),
+ self.assertNotIn(("Proxy-Authorization", "FooBar"),
https_handler.httpconn.req_headers)
- self.assertIn(("User-Agent","Grail"),
+ self.assertIn(("User-Agent", "Grail"),
https_handler.httpconn.req_headers)
self.assertIsNotNone(req._tunnel_host)
self.assertEqual(req.host, "proxy.example.com:3128")
- self.assertEqual(req.get_header("Proxy-authorization"),"FooBar")
+ self.assertEqual(req.get_header("Proxy-authorization"), "FooBar")
# TODO: This should be only for OSX
@unittest.skipUnless(sys.platform == 'darwin', "only relevant for OSX")
@@ -1246,7 +1371,7 @@ class HandlerTests(unittest.TestCase):
realm = "ACME Widget Store"
http_handler = MockHTTPHandler(
401, 'WWW-Authenticate: Basic realm=%s%s%s\r\n\r\n' %
- (quote_char, realm, quote_char) )
+ (quote_char, realm, quote_char))
opener.add_handler(auth_handler)
opener.add_handler(http_handler)
self._test_basic_auth(opener, auth_handler, "Authorization",
@@ -1304,13 +1429,16 @@ class HandlerTests(unittest.TestCase):
def __init__(self):
OpenerDirector.__init__(self)
self.recorded = []
+
def record(self, info):
self.recorded.append(info)
+
class TestDigestAuthHandler(urllib.request.HTTPDigestAuthHandler):
def http_error_401(self, *args, **kwds):
self.parent.record("digest")
urllib.request.HTTPDigestAuthHandler.http_error_401(self,
*args, **kwds)
+
class TestBasicAuthHandler(urllib.request.HTTPBasicAuthHandler):
def http_error_401(self, *args, **kwds):
self.parent.record("basic")
@@ -1346,7 +1474,7 @@ class HandlerTests(unittest.TestCase):
401, 'WWW-Authenticate: Kerberos\r\n\r\n')
opener.add_handler(digest_auth_handler)
opener.add_handler(http_handler)
- self.assertRaises(ValueError,opener.open,"http://www.example.com")
+ self.assertRaises(ValueError, opener.open, "http://www.example.com")
def test_unsupported_auth_basic_handler(self):
# While using BasicAuthHandler
@@ -1356,7 +1484,7 @@ class HandlerTests(unittest.TestCase):
401, 'WWW-Authenticate: NTLM\r\n\r\n')
opener.add_handler(basic_auth_handler)
opener.add_handler(http_handler)
- self.assertRaises(ValueError,opener.open,"http://www.example.com")
+ self.assertRaises(ValueError, opener.open, "http://www.example.com")
def _test_basic_auth(self, opener, auth_handler, auth_header,
realm, http_handler, password_manager,
@@ -1395,6 +1523,72 @@ class HandlerTests(unittest.TestCase):
self.assertEqual(len(http_handler.requests), 1)
self.assertFalse(http_handler.requests[0].has_header(auth_header))
+ def test_basic_prior_auth_auto_send(self):
+ # Assume already authenticated if is_authenticated=True
+ # for APIs like Github that don't return 401
+
+ user, password = "wile", "coyote"
+ request_url = "http://acme.example.com/protected"
+
+ http_handler = MockHTTPHandlerCheckAuth(200)
+
+ pwd_manager = HTTPPasswordMgrWithPriorAuth()
+ auth_prior_handler = HTTPBasicAuthHandler(pwd_manager)
+ auth_prior_handler.add_password(
+ None, request_url, user, password, is_authenticated=True)
+
+ is_auth = pwd_manager.is_authenticated(request_url)
+ self.assertTrue(is_auth)
+
+ opener = OpenerDirector()
+ opener.add_handler(auth_prior_handler)
+ opener.add_handler(http_handler)
+
+ opener.open(request_url)
+
+ # expect request to be sent with auth header
+ self.assertTrue(http_handler.has_auth_header)
+
+ def test_basic_prior_auth_send_after_first_success(self):
+ # Auto send auth header after authentication is successful once
+
+ user, password = 'wile', 'coyote'
+ request_url = 'http://acme.example.com/protected'
+ realm = 'ACME'
+
+ pwd_manager = HTTPPasswordMgrWithPriorAuth()
+ auth_prior_handler = HTTPBasicAuthHandler(pwd_manager)
+ auth_prior_handler.add_password(realm, request_url, user, password)
+
+ is_auth = pwd_manager.is_authenticated(request_url)
+ self.assertFalse(is_auth)
+
+ opener = OpenerDirector()
+ opener.add_handler(auth_prior_handler)
+
+ http_handler = MockHTTPHandler(
+ 401, 'WWW-Authenticate: Basic realm="%s"\r\n\r\n' % None)
+ opener.add_handler(http_handler)
+
+ opener.open(request_url)
+
+ is_auth = pwd_manager.is_authenticated(request_url)
+ self.assertTrue(is_auth)
+
+ http_handler = MockHTTPHandlerCheckAuth(200)
+ self.assertFalse(http_handler.has_auth_header)
+
+ opener = OpenerDirector()
+ opener.add_handler(auth_prior_handler)
+ opener.add_handler(http_handler)
+
+ # After getting 200 from MockHTTPHandler
+ # Next request sends header in the first request
+ opener.open(request_url)
+
+ # expect request to be sent with auth header
+ self.assertTrue(http_handler.has_auth_header)
+
def test_http_closed(self):
"""Test the connection is cleaned up when the response is closed"""
for (transfer, data) in (
@@ -1423,6 +1617,7 @@ class HandlerTests(unittest.TestCase):
self.assertTrue(conn.fakesock.closed, "Connection not closed")
+
class MiscTests(unittest.TestCase):
def opener_has_handler(self, opener, handler_class):
@@ -1430,11 +1625,16 @@ class MiscTests(unittest.TestCase):
for h in opener.handlers))
def test_build_opener(self):
- class MyHTTPHandler(urllib.request.HTTPHandler): pass
+ class MyHTTPHandler(urllib.request.HTTPHandler):
+ pass
+
class FooHandler(urllib.request.BaseHandler):
- def foo_open(self): pass
+ def foo_open(self):
+ pass
+
class BarHandler(urllib.request.BaseHandler):
- def bar_open(self): pass
+ def bar_open(self):
+ pass
build_opener = urllib.request.build_opener
@@ -1461,7 +1661,9 @@ class MiscTests(unittest.TestCase):
self.opener_has_handler(o, urllib.request.HTTPHandler)
# Issue2670: multiple handlers sharing the same base class
- class MyOtherHTTPHandler(urllib.request.HTTPHandler): pass
+ class MyOtherHTTPHandler(urllib.request.HTTPHandler):
+ pass
+
o = build_opener(MyHTTPHandler, MyOtherHTTPHandler)
self.opener_has_handler(o, MyHTTPHandler)
self.opener_has_handler(o, MyOtherHTTPHandler)
@@ -1497,6 +1699,8 @@ class MiscTests(unittest.TestCase):
self.assertEqual(err.headers, 'Content-Length: 42')
expected_errmsg = 'HTTP Error %s: %s' % (err.code, err.msg)
self.assertEqual(str(err), expected_errmsg)
+ expected_errmsg = '<HTTPError %s: %r>' % (err.code, err.msg)
+ self.assertEqual(repr(err), expected_errmsg)
def test_parse_proxy(self):
parse_proxy_test_cases = [
@@ -1535,9 +1739,19 @@ class MiscTests(unittest.TestCase):
self.assertRaises(ValueError, _parse_proxy, 'file:/ftp.example.com'),
+ def test_unsupported_algorithm(self):
+ handler = AbstractDigestAuthHandler()
+ with self.assertRaises(ValueError) as exc:
+ handler.get_algorithm_impls('invalid')
+ self.assertEqual(
+ str(exc.exception),
+ "Unsupported digest authentication algorithm 'invalid'"
+ )
+
+
class RequestTests(unittest.TestCase):
class PutRequest(Request):
- method='PUT'
+ method = 'PUT'
def setUp(self):
self.get = Request("http://www.python.org/~jeremy/")
@@ -1626,7 +1840,7 @@ class RequestTests(unittest.TestCase):
def test_url_fullurl_get_full_url(self):
urls = ['http://docs.python.org',
'http://docs.python.org/library/urllib2.html#OK',
- 'http://www.python.org/?qs=query#fragment=true' ]
+ 'http://www.python.org/?qs=query#fragment=true']
for url in urls:
req = Request(url)
self.assertEqual(req.get_full_url(), req.full_url)
diff --git a/Lib/test/test_urllib2_localnet.py b/Lib/test/test_urllib2_localnet.py
index 0650aa2744..c8b37eecea 100644
--- a/Lib/test/test_urllib2_localnet.py
+++ b/Lib/test/test_urllib2_localnet.py
@@ -626,35 +626,6 @@ class TestUrlopen(unittest.TestCase):
url = open_url.geturl()
self.assertEqual(url, "http://localhost:%s" % handler.port)
- def test_bad_address(self):
- # Make sure proper exception is raised when connecting to a bogus
- # address.
-
- # as indicated by the comment below, this might fail with some ISP,
- # so we run the test only when -unetwork/-uall is specified to
- # mitigate the problem a bit (see #17564)
- support.requires('network')
- self.assertRaises(OSError,
- # Given that both VeriSign and various ISPs have in
- # the past or are presently hijacking various invalid
- # domain name requests in an attempt to boost traffic
- # to their own sites, finding a domain name to use
- # for this test is difficult. RFC2606 leads one to
- # believe that '.invalid' should work, but experience
- # seemed to indicate otherwise. Single character
- # TLDs are likely to remain invalid, so this seems to
- # be the best choice. The trailing '.' prevents a
- # related problem: The normal DNS resolver appends
- # the domain names from the search path if there is
- # no '.' the end and, and if one of those domains
- # implements a '*' rule a result is returned.
- # However, none of this will prevent the test from
- # failing if the ISP hijacks all invalid domain
- # requests. The real solution would be to be able to
- # parameterize the framework with a mock resolver.
- urllib.request.urlopen,
- "http://sadflkjsasf.i.nvali.d./")
-
def test_iteration(self):
expected_response = b"pycon 2008..."
handler = self.start_server([(200, [], expected_response)])
diff --git a/Lib/test/test_urllib2net.py b/Lib/test/test_urllib2net.py
index 17f9d1bdee..cad83fd5aa 100644
--- a/Lib/test/test_urllib2net.py
+++ b/Lib/test/test_urllib2net.py
@@ -20,8 +20,6 @@ def _retry_thrice(func, exc, *args, **kwargs):
except exc as e:
last_exc = e
continue
- except:
- raise
raise last_exc
def _wrap_with_retry_thrice(func, exc):
diff --git a/Lib/test/test_urllibnet.py b/Lib/test/test_urllibnet.py
index 42ebb6e60b..b811930bbc 100644
--- a/Lib/test/test_urllibnet.py
+++ b/Lib/test/test_urllibnet.py
@@ -38,12 +38,14 @@ class urlopenNetworkTests(unittest.TestCase):
for transparent redirection have been written.
setUp is not used for always constructing a connection to
- http://www.example.com/ since there a few tests that don't use that address
+ http://www.pythontest.net/ since there a few tests that don't use that address
and making a connection is expensive enough to warrant minimizing unneeded
connections.
"""
+ url = 'http://www.pythontest.net/'
+
@contextlib.contextmanager
def urlopen(self, *args, **kwargs):
resource = args[0]
@@ -56,7 +58,7 @@ class urlopenNetworkTests(unittest.TestCase):
def test_basic(self):
# Simple test expected to pass.
- with self.urlopen("http://www.example.com/") as open_url:
+ with self.urlopen(self.url) as open_url:
for attr in ("read", "readline", "readlines", "fileno", "close",
"info", "geturl"):
self.assertTrue(hasattr(open_url, attr), "object returned from "
@@ -65,7 +67,7 @@ class urlopenNetworkTests(unittest.TestCase):
def test_readlines(self):
# Test both readline and readlines.
- with self.urlopen("http://www.example.com/") as open_url:
+ with self.urlopen(self.url) as open_url:
self.assertIsInstance(open_url.readline(), bytes,
"readline did not return a string")
self.assertIsInstance(open_url.readlines(), list,
@@ -73,7 +75,7 @@ class urlopenNetworkTests(unittest.TestCase):
def test_info(self):
# Test 'info'.
- with self.urlopen("http://www.example.com/") as open_url:
+ with self.urlopen(self.url) as open_url:
info_obj = open_url.info()
self.assertIsInstance(info_obj, email.message.Message,
"object returned by 'info' is not an "
@@ -82,14 +84,13 @@ class urlopenNetworkTests(unittest.TestCase):
def test_geturl(self):
# Make sure same URL as opened is returned by geturl.
- URL = "http://www.example.com/"
- with self.urlopen(URL) as open_url:
+ with self.urlopen(self.url) as open_url:
gotten_url = open_url.geturl()
- self.assertEqual(gotten_url, URL)
+ self.assertEqual(gotten_url, self.url)
def test_getcode(self):
# test getcode() with the fancy opener to get 404 error codes
- URL = "http://www.example.com/XXXinvalidXXX"
+ URL = self.url + "XXXinvalidXXX"
with support.transient_internet(URL):
with self.assertWarns(DeprecationWarning):
open_url = urllib.request.FancyURLopener().open(URL)
@@ -99,21 +100,28 @@ class urlopenNetworkTests(unittest.TestCase):
open_url.close()
self.assertEqual(code, 404)
- # On Windows, socket handles are not file descriptors; this
- # test can't pass on Windows.
- @unittest.skipIf(sys.platform in ('win32',), 'not appropriate for Windows')
- def test_fileno(self):
- # Make sure fd returned by fileno is valid.
- with self.urlopen("http://www.google.com/", timeout=None) as open_url:
- fd = open_url.fileno()
- with os.fdopen(fd, 'rb') as f:
- self.assertTrue(f.read(), "reading from file created using fd "
- "returned by fileno failed")
-
def test_bad_address(self):
# Make sure proper exception is raised when connecting to a bogus
# address.
- bogus_domain = "sadflkjsasf.i.nvali.d"
+
+ # Given that both VeriSign and various ISPs have in
+ # the past or are presently hijacking various invalid
+ # domain name requests in an attempt to boost traffic
+ # to their own sites, finding a domain name to use
+ # for this test is difficult. RFC2606 leads one to
+ # believe that '.invalid' should work, but experience
+ # seemed to indicate otherwise. Single character
+ # TLDs are likely to remain invalid, so this seems to
+ # be the best choice. The trailing '.' prevents a
+ # related problem: The normal DNS resolver appends
+ # the domain names from the search path if there is
+ # no '.' the end and, and if one of those domains
+ # implements a '*' rule a result is returned.
+ # However, none of this will prevent the test from
+ # failing if the ISP hijacks all invalid domain
+ # requests. The real solution would be to be able to
+ # parameterize the framework with a mock resolver.
+ bogus_domain = "sadflkjsasf.i.nvali.d."
try:
socket.gethostbyname(bogus_domain)
except OSError:
@@ -128,11 +136,7 @@ class urlopenNetworkTests(unittest.TestCase):
'can be caused by a broken DNS server '
'(e.g. returns 404 or hijacks page)')
with self.assertRaises(OSError, msg=failure_explanation):
- # SF patch 809915: In Sep 2003, VeriSign started highjacking
- # invalid .com and .net addresses to boost traffic to their own
- # site. This test started failing then. One hopes the .invalid
- # domain will be spared to serve its defined purpose.
- urllib.request.urlopen("http://sadflkjsasf.i.nvali.d/")
+ urllib.request.urlopen("http://{}/".format(bogus_domain))
class urlretrieveNetworkTests(unittest.TestCase):
@@ -150,7 +154,7 @@ class urlretrieveNetworkTests(unittest.TestCase):
def test_basic(self):
# Test basic functionality.
- with self.urlretrieve("http://www.example.com/") as (file_location, info):
+ with self.urlretrieve(self.logo) as (file_location, info):
self.assertTrue(os.path.exists(file_location), "file location returned by"
" urlretrieve is not a valid path")
with open(file_location, 'rb') as f:
@@ -159,7 +163,7 @@ class urlretrieveNetworkTests(unittest.TestCase):
def test_specified_path(self):
# Make sure that specifying the location of the file to write to works.
- with self.urlretrieve("http://www.example.com/",
+ with self.urlretrieve(self.logo,
support.TESTFN) as (file_location, info):
self.assertEqual(file_location, support.TESTFN)
self.assertTrue(os.path.exists(file_location))
@@ -168,11 +172,11 @@ class urlretrieveNetworkTests(unittest.TestCase):
def test_header(self):
# Make sure header returned as 2nd value from urlretrieve is good.
- with self.urlretrieve("http://www.example.com/") as (file_location, info):
+ with self.urlretrieve(self.logo) as (file_location, info):
self.assertIsInstance(info, email.message.Message,
"info is not an instance of email.message.Message")
- logo = "http://www.example.com/"
+ logo = "http://www.pythontest.net/"
def test_data_header(self):
with self.urlretrieve(self.logo) as (file_location, fileheaders):
@@ -181,7 +185,7 @@ class urlretrieveNetworkTests(unittest.TestCase):
try:
time.strptime(datevalue, dateformat)
except ValueError:
- self.fail('Date value not in %r format', dateformat)
+ self.fail('Date value not in %r format' % dateformat)
def test_reporthook(self):
records = []
diff --git a/Lib/test/test_urlparse.py b/Lib/test/test_urlparse.py
index 1775ef3353..829997fd6a 100644
--- a/Lib/test/test_urlparse.py
+++ b/Lib/test/test_urlparse.py
@@ -17,7 +17,6 @@ parse_qsl_test_cases = [
("=a", [('', 'a')]),
("a", [('a', '')]),
("a=", [('a', '')]),
- ("a=", [('a', '')]),
("&a=b", [('a', 'b')]),
("a=a+b&b=b+c", [('a', 'a b'), ('b', 'b c')]),
("a=1&a=2", [('a', '1'), ('a', '2')]),
@@ -28,10 +27,52 @@ parse_qsl_test_cases = [
(b"=a", [(b'', b'a')]),
(b"a", [(b'a', b'')]),
(b"a=", [(b'a', b'')]),
- (b"a=", [(b'a', b'')]),
(b"&a=b", [(b'a', b'b')]),
(b"a=a+b&b=b+c", [(b'a', b'a b'), (b'b', b'b c')]),
(b"a=1&a=2", [(b'a', b'1'), (b'a', b'2')]),
+ (";", []),
+ (";;", []),
+ (";a=b", [('a', 'b')]),
+ ("a=a+b;b=b+c", [('a', 'a b'), ('b', 'b c')]),
+ ("a=1;a=2", [('a', '1'), ('a', '2')]),
+ (b";", []),
+ (b";;", []),
+ (b";a=b", [(b'a', b'b')]),
+ (b"a=a+b;b=b+c", [(b'a', b'a b'), (b'b', b'b c')]),
+ (b"a=1;a=2", [(b'a', b'1'), (b'a', b'2')]),
+]
+
+parse_qs_test_cases = [
+ ("", {}),
+ ("&", {}),
+ ("&&", {}),
+ ("=", {'': ['']}),
+ ("=a", {'': ['a']}),
+ ("a", {'a': ['']}),
+ ("a=", {'a': ['']}),
+ ("&a=b", {'a': ['b']}),
+ ("a=a+b&b=b+c", {'a': ['a b'], 'b': ['b c']}),
+ ("a=1&a=2", {'a': ['1', '2']}),
+ (b"", {}),
+ (b"&", {}),
+ (b"&&", {}),
+ (b"=", {b'': [b'']}),
+ (b"=a", {b'': [b'a']}),
+ (b"a", {b'a': [b'']}),
+ (b"a=", {b'a': [b'']}),
+ (b"&a=b", {b'a': [b'b']}),
+ (b"a=a+b&b=b+c", {b'a': [b'a b'], b'b': [b'b c']}),
+ (b"a=1&a=2", {b'a': [b'1', b'2']}),
+ (";", {}),
+ (";;", {}),
+ (";a=b", {'a': ['b']}),
+ ("a=a+b;b=b+c", {'a': ['a b'], 'b': ['b c']}),
+ ("a=1;a=2", {'a': ['1', '2']}),
+ (b";", {}),
+ (b";;", {}),
+ (b";a=b", {b'a': [b'b']}),
+ (b"a=a+b;b=b+c", {b'a': [b'a b'], b'b': [b'b c']}),
+ (b"a=1;a=2", {b'a': [b'1', b'2']}),
]
class UrlParseTestCase(unittest.TestCase):
@@ -96,6 +137,16 @@ class UrlParseTestCase(unittest.TestCase):
self.assertEqual(result, expect_without_blanks,
"Error parsing %r" % orig)
+ def test_qs(self):
+ for orig, expect in parse_qs_test_cases:
+ result = urllib.parse.parse_qs(orig, keep_blank_values=True)
+ self.assertEqual(result, expect, "Error parsing %r" % orig)
+ expect_without_blanks = {v: expect[v]
+ for v in expect if len(expect[v][0])}
+ result = urllib.parse.parse_qs(orig, keep_blank_values=False)
+ self.assertEqual(result, expect_without_blanks,
+ "Error parsing %r" % orig)
+
def test_roundtrips(self):
str_cases = [
('file:///tmp/junk.txt',
@@ -210,10 +261,6 @@ class UrlParseTestCase(unittest.TestCase):
# "abnormal" cases from RFC 1808:
self.checkJoin(RFC1808_BASE, '', 'http://a/b/c/d;p?q#f')
- self.checkJoin(RFC1808_BASE, '../../../g', 'http://a/../g')
- self.checkJoin(RFC1808_BASE, '../../../../g', 'http://a/../../g')
- self.checkJoin(RFC1808_BASE, '/./g', 'http://a/./g')
- self.checkJoin(RFC1808_BASE, '/../g', 'http://a/../g')
self.checkJoin(RFC1808_BASE, 'g.', 'http://a/b/c/g.')
self.checkJoin(RFC1808_BASE, '.g', 'http://a/b/c/.g')
self.checkJoin(RFC1808_BASE, 'g..', 'http://a/b/c/g..')
@@ -228,6 +275,13 @@ class UrlParseTestCase(unittest.TestCase):
#self.checkJoin(RFC1808_BASE, 'http:g', 'http:g')
#self.checkJoin(RFC1808_BASE, 'http:', 'http:')
+ # XXX: The following tests are no longer compatible with RFC3986
+ # self.checkJoin(RFC1808_BASE, '../../../g', 'http://a/../g')
+ # self.checkJoin(RFC1808_BASE, '../../../../g', 'http://a/../../g')
+ # self.checkJoin(RFC1808_BASE, '/./g', 'http://a/./g')
+ # self.checkJoin(RFC1808_BASE, '/../g', 'http://a/../g')
+
+
def test_RFC2368(self):
# Issue 11467: path that starts with a number is not parsed correctly
self.assertEqual(urllib.parse.urlparse('mailto:1337@example.org'),
@@ -258,10 +312,6 @@ class UrlParseTestCase(unittest.TestCase):
self.checkJoin(RFC2396_BASE, '../../', 'http://a/')
self.checkJoin(RFC2396_BASE, '../../g', 'http://a/g')
self.checkJoin(RFC2396_BASE, '', RFC2396_BASE)
- self.checkJoin(RFC2396_BASE, '../../../g', 'http://a/../g')
- self.checkJoin(RFC2396_BASE, '../../../../g', 'http://a/../../g')
- self.checkJoin(RFC2396_BASE, '/./g', 'http://a/./g')
- self.checkJoin(RFC2396_BASE, '/../g', 'http://a/../g')
self.checkJoin(RFC2396_BASE, 'g.', 'http://a/b/c/g.')
self.checkJoin(RFC2396_BASE, '.g', 'http://a/b/c/.g')
self.checkJoin(RFC2396_BASE, 'g..', 'http://a/b/c/g..')
@@ -277,10 +327,17 @@ class UrlParseTestCase(unittest.TestCase):
self.checkJoin(RFC2396_BASE, 'g#s/./x', 'http://a/b/c/g#s/./x')
self.checkJoin(RFC2396_BASE, 'g#s/../x', 'http://a/b/c/g#s/../x')
+ # XXX: The following tests are no longer compatible with RFC3986
+ # self.checkJoin(RFC2396_BASE, '../../../g', 'http://a/../g')
+ # self.checkJoin(RFC2396_BASE, '../../../../g', 'http://a/../../g')
+ # self.checkJoin(RFC2396_BASE, '/./g', 'http://a/./g')
+ # self.checkJoin(RFC2396_BASE, '/../g', 'http://a/../g')
+
+
def test_RFC3986(self):
# Test cases from RFC3986
self.checkJoin(RFC3986_BASE, '?y','http://a/b/c/d;p?y')
- self.checkJoin(RFC2396_BASE, ';x', 'http://a/b/c/;x')
+ self.checkJoin(RFC3986_BASE, ';x', 'http://a/b/c/;x')
self.checkJoin(RFC3986_BASE, 'g:h','g:h')
self.checkJoin(RFC3986_BASE, 'g','http://a/b/c/g')
self.checkJoin(RFC3986_BASE, './g','http://a/b/c/g')
@@ -304,17 +361,17 @@ class UrlParseTestCase(unittest.TestCase):
self.checkJoin(RFC3986_BASE, '../..','http://a/')
self.checkJoin(RFC3986_BASE, '../../','http://a/')
self.checkJoin(RFC3986_BASE, '../../g','http://a/g')
+ self.checkJoin(RFC3986_BASE, '../../../g', 'http://a/g')
#Abnormal Examples
# The 'abnormal scenarios' are incompatible with RFC2986 parsing
# Tests are here for reference.
- #self.checkJoin(RFC3986_BASE, '../../../g','http://a/g')
- #self.checkJoin(RFC3986_BASE, '../../../../g','http://a/g')
- #self.checkJoin(RFC3986_BASE, '/./g','http://a/g')
- #self.checkJoin(RFC3986_BASE, '/../g','http://a/g')
-
+ self.checkJoin(RFC3986_BASE, '../../../g','http://a/g')
+ self.checkJoin(RFC3986_BASE, '../../../../g','http://a/g')
+ self.checkJoin(RFC3986_BASE, '/./g','http://a/g')
+ self.checkJoin(RFC3986_BASE, '/../g','http://a/g')
self.checkJoin(RFC3986_BASE, 'g.','http://a/b/c/g.')
self.checkJoin(RFC3986_BASE, '.g','http://a/b/c/.g')
self.checkJoin(RFC3986_BASE, 'g..','http://a/b/c/g..')
@@ -354,10 +411,8 @@ class UrlParseTestCase(unittest.TestCase):
self.checkJoin(SIMPLE_BASE, '../g','http://a/b/g')
self.checkJoin(SIMPLE_BASE, '../..','http://a/')
self.checkJoin(SIMPLE_BASE, '../../g','http://a/g')
- self.checkJoin(SIMPLE_BASE, '../../../g','http://a/../g')
self.checkJoin(SIMPLE_BASE, './../g','http://a/b/g')
self.checkJoin(SIMPLE_BASE, './g/.','http://a/b/c/g/')
- self.checkJoin(SIMPLE_BASE, '/./g','http://a/./g')
self.checkJoin(SIMPLE_BASE, 'g/./h','http://a/b/c/g/h')
self.checkJoin(SIMPLE_BASE, 'g/../h','http://a/b/c/h')
self.checkJoin(SIMPLE_BASE, 'http:g','http://a/b/c/g')
@@ -371,6 +426,25 @@ class UrlParseTestCase(unittest.TestCase):
self.checkJoin('svn://pathtorepo/dir1', 'dir2', 'svn://pathtorepo/dir2')
self.checkJoin('svn+ssh://pathtorepo/dir1', 'dir2', 'svn+ssh://pathtorepo/dir2')
+ # XXX: The following tests are no longer compatible with RFC3986
+ # self.checkJoin(SIMPLE_BASE, '../../../g','http://a/../g')
+ # self.checkJoin(SIMPLE_BASE, '/./g','http://a/./g')
+
+ # test for issue22118 duplicate slashes
+ self.checkJoin(SIMPLE_BASE + '/', 'foo', SIMPLE_BASE + '/foo')
+
+ # Non-RFC-defined tests, covering variations of base and trailing
+ # slashes
+ self.checkJoin('http://a/b/c/d/e/', '../../f/g/', 'http://a/b/c/f/g/')
+ self.checkJoin('http://a/b/c/d/e', '../../f/g/', 'http://a/b/f/g/')
+ self.checkJoin('http://a/b/c/d/e/', '/../../f/g/', 'http://a/f/g/')
+ self.checkJoin('http://a/b/c/d/e', '/../../f/g/', 'http://a/f/g/')
+ self.checkJoin('http://a/b/c/d/e/', '../../f/g', 'http://a/b/c/f/g')
+ self.checkJoin('http://a/b/', '../../f/g/', 'http://a/f/g/')
+
+ # issue 23703: don't duplicate filename
+ self.checkJoin('a', 'b', 'b')
+
def test_RFC2732(self):
str_cases = [
('http://Test.python.org:5432/foo/', 'test.python.org', 5432),
@@ -803,6 +877,16 @@ class UrlParseTestCase(unittest.TestCase):
result = urllib.parse.urlencode({'a': Trivial()}, True)
self.assertEqual(result, 'a=trivial')
+ def test_urlencode_quote_via(self):
+ result = urllib.parse.urlencode({'a': 'some value'})
+ self.assertEqual(result, "a=some+value")
+ result = urllib.parse.urlencode({'a': 'some value/another'},
+ quote_via=urllib.parse.quote)
+ self.assertEqual(result, "a=some%20value%2Fanother")
+ result = urllib.parse.urlencode({'a': 'some value/another'},
+ safe='/', quote_via=urllib.parse.quote)
+ self.assertEqual(result, "a=some%20value/another")
+
def test_quote_from_bytes(self):
self.assertRaises(TypeError, urllib.parse.quote_from_bytes, 'foo')
result = urllib.parse.quote_from_bytes(b'archaeological arcana')
@@ -861,6 +945,22 @@ class UrlParseTestCase(unittest.TestCase):
quoter = urllib.parse.Quoter(urllib.parse._ALWAYS_SAFE)
self.assertIn('Quoter', repr(quoter))
+ def test_all(self):
+ expected = []
+ undocumented = {
+ 'splitattr', 'splithost', 'splitnport', 'splitpasswd',
+ 'splitport', 'splitquery', 'splittag', 'splittype', 'splituser',
+ 'splitvalue',
+ 'Quoter', 'ResultBase', 'clear_cache', 'to_bytes', 'unwrap',
+ }
+ for name in dir(urllib.parse):
+ if name.startswith('_') or name in undocumented:
+ continue
+ object = getattr(urllib.parse, name)
+ if getattr(object, '__module__', None) == 'urllib.parse':
+ expected.append(name)
+ self.assertCountEqual(urllib.parse.__all__, expected)
+
class Utility_Tests(unittest.TestCase):
"""Testcase to test the various utility functions in the urllib."""
diff --git a/Lib/test/test_userdict.py b/Lib/test/test_userdict.py
index 3eb8801a7d..8357f8bcd1 100644
--- a/Lib/test/test_userdict.py
+++ b/Lib/test/test_userdict.py
@@ -1,6 +1,7 @@
# Check every path through every method of UserDict
from test import support, mapping_tests
+import unittest
import collections
d0 = {}
@@ -215,10 +216,5 @@ class UserDictTest(mapping_tests.TestHashMappingProtocol):
-def test_main():
- support.run_unittest(
- UserDictTest,
- )
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_userlist.py b/Lib/test/test_userlist.py
index 6381070f56..f92e4d385e 100644
--- a/Lib/test/test_userlist.py
+++ b/Lib/test/test_userlist.py
@@ -2,6 +2,7 @@
from collections import UserList
from test import support, list_tests
+import unittest
class UserListTest(list_tests.CommonTest):
type2test = UserList
@@ -58,8 +59,5 @@ class UserListTest(list_tests.CommonTest):
self.assertEqual(u, v)
self.assertEqual(type(u), type(v))
-def test_main():
- support.run_unittest(UserListTest)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_uuid.py b/Lib/test/test_uuid.py
index 1e8cba30bd..e34d8e6257 100644
--- a/Lib/test/test_uuid.py
+++ b/Lib/test/test_uuid.py
@@ -1,9 +1,10 @@
-import unittest
+import unittest.mock
from test import support
import builtins
import io
import os
import shutil
+import subprocess
import uuid
def importable(name):
@@ -353,7 +354,6 @@ class TestUUID(unittest.TestCase):
equal(u, uuid.UUID(v))
equal(str(u), v)
- @unittest.skipUnless(importable('ctypes'), 'requires ctypes')
def test_uuid4(self):
equal = self.assertEqual
@@ -412,28 +412,27 @@ class TestUUID(unittest.TestCase):
class TestInternals(unittest.TestCase):
@unittest.skipUnless(os.name == 'posix', 'requires Posix')
def test_find_mac(self):
- data = '''\
-
+ data = '''
fake hwaddr
cscotun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
eth0 Link encap:Ethernet HWaddr 12:34:56:78:90:ab
'''
- def mock_popen(cmd):
- return io.StringIO(data)
-
- if shutil.which('ifconfig') is None:
- path = os.pathsep.join(('/sbin', '/usr/sbin'))
- if shutil.which('ifconfig', path=path) is None:
- self.skipTest('requires ifconfig')
-
- with support.swap_attr(os, 'popen', mock_popen):
- mac = uuid._find_mac(
- command='ifconfig',
- args='',
- hw_identifiers=['hwaddr'],
- get_index=lambda x: x + 1,
- )
- self.assertEqual(mac, 0x1234567890ab)
+
+ popen = unittest.mock.MagicMock()
+ popen.stdout = io.BytesIO(data.encode())
+
+ with unittest.mock.patch.object(shutil, 'which',
+ return_value='/sbin/ifconfig'):
+ with unittest.mock.patch.object(subprocess, 'Popen',
+ return_value=popen):
+ mac = uuid._find_mac(
+ command='ifconfig',
+ args='',
+ hw_identifiers=[b'hwaddr'],
+ get_index=lambda x: x + 1,
+ )
+
+ self.assertEqual(mac, 0x1234567890ab)
def check_node(self, node, requires=None, network=False):
if requires and node is None:
@@ -454,6 +453,11 @@ eth0 Link encap:Ethernet HWaddr 12:34:56:78:90:ab
self.check_node(node, 'ifconfig', True)
@unittest.skipUnless(os.name == 'posix', 'requires Posix')
+ def test_ip_getnode(self):
+ node = uuid._ip_getnode()
+ self.check_node(node, 'ip', True)
+
+ @unittest.skipUnless(os.name == 'posix', 'requires Posix')
def test_arp_getnode(self):
node = uuid._arp_getnode()
self.check_node(node, 'arp', True)
diff --git a/Lib/test/test_venv.py b/Lib/test/test_venv.py
index b462588e34..d2c986e71e 100644
--- a/Lib/test/test_venv.py
+++ b/Lib/test/test_venv.py
@@ -8,11 +8,12 @@ Licensed to the PSF under a contributor agreement.
import ensurepip
import os
import os.path
+import re
import struct
import subprocess
import sys
import tempfile
-from test.support import (captured_stdout, captured_stderr, run_unittest,
+from test.support import (captured_stdout, captured_stderr,
can_symlink, EnvironmentVarGuard, rmtree)
import textwrap
import unittest
@@ -25,6 +26,11 @@ try:
except ImportError:
ssl = None
+try:
+ import threading
+except ImportError:
+ threading = None
+
skipInVenv = unittest.skipIf(sys.prefix != sys.base_prefix,
'Test not appropriate in a venv')
@@ -319,6 +325,8 @@ class EnsurePipTest(BaseTest):
# Requesting pip fails without SSL (http://bugs.python.org/issue19744)
@unittest.skipIf(ssl is None, ensurepip._MISSING_SSL_MESSAGE)
+ @unittest.skipUnless(threading, 'some dependencies of pip import threading'
+ ' module unconditionally')
def test_with_pip(self):
rmtree(self.env_dir)
with EnvironmentVarGuard() as envvars:
@@ -387,7 +395,15 @@ class EnsurePipTest(BaseTest):
# We force everything to text, so unittest gives the detailed diff
# if we get unexpected results
err = err.decode("latin-1") # Force to text, prevent decoding errors
- self.assertEqual(err, "")
+ # Ignore the warning:
+ # "The directory '$HOME/.cache/pip/http' or its parent directory
+ # is not owned by the current user and the cache has been disabled.
+ # Please check the permissions and owner of that directory. If
+ # executing pip with sudo, you may want sudo's -H flag."
+ # where $HOME is replaced by the HOME environment variable.
+ err = re.sub("^The directory .* or its parent directory is not owned "
+ "by the current user .*$", "", err, flags=re.MULTILINE)
+ self.assertEqual(err.rstrip(), "")
# Being fairly specific regarding the expected behaviour for the
# initial bundling phase in Python 3.4. If the output changes in
# future pip versions, this test can likely be relaxed further.
@@ -398,8 +414,5 @@ class EnsurePipTest(BaseTest):
self.assert_pip_not_installed()
-def test_main():
- run_unittest(BasicTest, EnsurePipTest)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_wait3.py b/Lib/test/test_wait3.py
index f6a065d850..eb51b2c03b 100644
--- a/Lib/test/test_wait3.py
+++ b/Lib/test/test_wait3.py
@@ -5,7 +5,7 @@ import os
import time
import unittest
from test.fork_wait import ForkWait
-from test.support import run_unittest, reap_children
+from test.support import reap_children
if not hasattr(os, 'fork'):
raise unittest.SkipTest("os.fork not defined")
@@ -18,7 +18,8 @@ class Wait3Test(ForkWait):
# This many iterations can be required, since some previously run
# tests (e.g. test_ctypes) could have spawned a lot of children
# very quickly.
- for i in range(30):
+ deadline = time.monotonic() + 10.0
+ while time.monotonic() <= deadline:
# wait3() shouldn't hang, but some of the buildbots seem to hang
# in the forking tests. This is an attempt to fix the problem.
spid, status, rusage = os.wait3(os.WNOHANG)
@@ -30,9 +31,8 @@ class Wait3Test(ForkWait):
self.assertEqual(status, 0, "cause = %d, exit = %d" % (status&0xff, status>>8))
self.assertTrue(rusage)
-def test_main():
- run_unittest(Wait3Test)
+def tearDownModule():
reap_children()
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_wait4.py b/Lib/test/test_wait4.py
index 352c11aade..3e6a79df46 100644
--- a/Lib/test/test_wait4.py
+++ b/Lib/test/test_wait4.py
@@ -4,8 +4,9 @@
import os
import time
import sys
+import unittest
from test.fork_wait import ForkWait
-from test.support import run_unittest, reap_children, get_attribute
+from test.support import reap_children, get_attribute
# If either of these do not exist, skip this test.
get_attribute(os, 'fork')
@@ -19,20 +20,20 @@ class Wait4Test(ForkWait):
# Issue #11185: wait4 is broken on AIX and will always return 0
# with WNOHANG.
option = 0
- for i in range(10):
+ deadline = time.monotonic() + 10.0
+ while time.monotonic() <= deadline:
# wait4() shouldn't hang, but some of the buildbots seem to hang
# in the forking tests. This is an attempt to fix the problem.
spid, status, rusage = os.wait4(cpid, option)
if spid == cpid:
break
- time.sleep(1.0)
+ time.sleep(0.1)
self.assertEqual(spid, cpid)
self.assertEqual(status, 0, "cause = %d, exit = %d" % (status&0xff, status>>8))
self.assertTrue(rusage)
-def test_main():
- run_unittest(Wait4Test)
+def tearDownModule():
reap_children()
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_warnings.py b/Lib/test/test_warnings/__init__.py
index b519f0a623..72fcc73661 100644
--- a/Lib/test/test_warnings.py
+++ b/Lib/test/test_warnings/__init__.py
@@ -5,9 +5,9 @@ from io import StringIO
import sys
import unittest
from test import support
-from test.script_helper import assert_python_ok
+from test.support.script_helper import assert_python_ok, assert_python_failure
-from test import warning_tests
+from test.test_warnings.data import stacklevel as warning_tests
import warnings as original_warnings
@@ -104,7 +104,15 @@ class FilterTests(BaseTest):
message = "FilterTests.test_ignore_after_default"
def f():
self.module.warn(message, UserWarning)
- f()
+
+ with support.captured_stderr() as stderr:
+ f()
+ stderr = stderr.getvalue()
+ self.assertIn("UserWarning: FilterTests.test_ignore_after_default",
+ stderr)
+ self.assertIn("self.module.warn(message, UserWarning)",
+ stderr)
+
self.module.filterwarnings("error", category=UserWarning)
self.assertRaises(UserWarning, f)
@@ -194,11 +202,11 @@ class FilterTests(BaseTest):
self.module.resetwarnings()
self.module.filterwarnings("once", category=UserWarning)
message = UserWarning("FilterTests.test_once")
- self.module.warn_explicit(message, UserWarning, "test_warnings.py",
+ self.module.warn_explicit(message, UserWarning, "__init__.py",
42)
self.assertEqual(w[-1].message, message)
del w[:]
- self.module.warn_explicit(message, UserWarning, "test_warnings.py",
+ self.module.warn_explicit(message, UserWarning, "__init__.py",
13)
self.assertEqual(len(w), 0)
self.module.warn_explicit(message, UserWarning, "test_warnings2.py",
@@ -265,6 +273,53 @@ class FilterTests(BaseTest):
self.module.warn_explicit(UserWarning("b"), None, "f.py", 42)
self.assertEqual(str(w[-1].message), "b")
+ def test_filterwarnings_duplicate_filters(self):
+ with original_warnings.catch_warnings(module=self.module):
+ self.module.resetwarnings()
+ self.module.filterwarnings("error", category=UserWarning)
+ self.assertEqual(len(self.module.filters), 1)
+ self.module.filterwarnings("ignore", category=UserWarning)
+ self.module.filterwarnings("error", category=UserWarning)
+ self.assertEqual(
+ len(self.module.filters), 2,
+ "filterwarnings inserted duplicate filter"
+ )
+ self.assertEqual(
+ self.module.filters[0][0], "error",
+ "filterwarnings did not promote filter to "
+ "the beginning of list"
+ )
+
+ def test_simplefilter_duplicate_filters(self):
+ with original_warnings.catch_warnings(module=self.module):
+ self.module.resetwarnings()
+ self.module.simplefilter("error", category=UserWarning)
+ self.assertEqual(len(self.module.filters), 1)
+ self.module.simplefilter("ignore", category=UserWarning)
+ self.module.simplefilter("error", category=UserWarning)
+ self.assertEqual(
+ len(self.module.filters), 2,
+ "simplefilter inserted duplicate filter"
+ )
+ self.assertEqual(
+ self.module.filters[0][0], "error",
+ "simplefilter did not promote filter to the beginning of list"
+ )
+ def test_append_duplicate(self):
+ with original_warnings.catch_warnings(module=self.module,
+ record=True) as w:
+ self.module.resetwarnings()
+ self.module.simplefilter("ignore")
+ self.module.simplefilter("error", append=True)
+ self.module.simplefilter("ignore", append=True)
+ self.module.warn("test_append_duplicate", category=UserWarning)
+ self.assertEqual(len(self.module.filters), 2,
+ "simplefilter inserted duplicate filter"
+ )
+ self.assertEqual(len(w), 0,
+ "appended duplicate changed order of filters"
+ )
+
class CFilterTests(FilterTests, unittest.TestCase):
module = c_warnings
@@ -304,10 +359,10 @@ class WarnTests(BaseTest):
module=self.module) as w:
warning_tests.inner("spam1")
self.assertEqual(os.path.basename(w[-1].filename),
- "warning_tests.py")
+ "stacklevel.py")
warning_tests.outer("spam2")
self.assertEqual(os.path.basename(w[-1].filename),
- "warning_tests.py")
+ "stacklevel.py")
def test_stacklevel(self):
# Test stacklevel argument
@@ -317,25 +372,36 @@ class WarnTests(BaseTest):
module=self.module) as w:
warning_tests.inner("spam3", stacklevel=1)
self.assertEqual(os.path.basename(w[-1].filename),
- "warning_tests.py")
+ "stacklevel.py")
warning_tests.outer("spam4", stacklevel=1)
self.assertEqual(os.path.basename(w[-1].filename),
- "warning_tests.py")
+ "stacklevel.py")
warning_tests.inner("spam5", stacklevel=2)
self.assertEqual(os.path.basename(w[-1].filename),
- "test_warnings.py")
+ "__init__.py")
warning_tests.outer("spam6", stacklevel=2)
self.assertEqual(os.path.basename(w[-1].filename),
- "warning_tests.py")
+ "stacklevel.py")
warning_tests.outer("spam6.5", stacklevel=3)
self.assertEqual(os.path.basename(w[-1].filename),
- "test_warnings.py")
+ "__init__.py")
warning_tests.inner("spam7", stacklevel=9999)
self.assertEqual(os.path.basename(w[-1].filename),
"sys")
+ def test_stacklevel_import(self):
+ # Issue #24305: With stacklevel=2, module-level warnings should work.
+ support.unload('test.test_warnings.data.import_warning')
+ with warnings_state(self.module):
+ with original_warnings.catch_warnings(record=True,
+ module=self.module) as w:
+ self.module.simplefilter('always')
+ import test.test_warnings.data.import_warning
+ self.assertEqual(len(w), 1)
+ self.assertEqual(w[0].filename, __file__)
+
def test_missing_filename_not_main(self):
# If __file__ is not specified and __main__ is not the module name,
# then __file__ should be set to the module name.
@@ -450,6 +516,44 @@ class WarnTests(BaseTest):
with self.assertRaises(ValueError):
self.module.warn(BadStrWarning())
+ def test_warning_classes(self):
+ class MyWarningClass(Warning):
+ pass
+
+ class NonWarningSubclass:
+ pass
+
+ # passing a non-subclass of Warning should raise a TypeError
+ with self.assertRaises(TypeError) as cm:
+ self.module.warn('bad warning category', '')
+ self.assertIn('category must be a Warning subclass, not ',
+ str(cm.exception))
+
+ with self.assertRaises(TypeError) as cm:
+ self.module.warn('bad warning category', NonWarningSubclass)
+ self.assertIn('category must be a Warning subclass, not ',
+ str(cm.exception))
+
+ # check that warning instances also raise a TypeError
+ with self.assertRaises(TypeError) as cm:
+ self.module.warn('bad warning category', MyWarningClass())
+ self.assertIn('category must be a Warning subclass, not ',
+ str(cm.exception))
+
+ with original_warnings.catch_warnings(module=self.module):
+ self.module.resetwarnings()
+ self.module.filterwarnings('default')
+ with self.assertWarns(MyWarningClass) as cm:
+ self.module.warn('good warning category', MyWarningClass)
+ self.assertEqual('good warning category', str(cm.warning))
+
+ with self.assertWarns(UserWarning) as cm:
+ self.module.warn('good warning category', None)
+ self.assertEqual('good warning category', str(cm.warning))
+
+ with self.assertWarns(MyWarningClass) as cm:
+ self.module.warn('good warning category', MyWarningClass)
+ self.assertIsInstance(cm.warning, Warning)
class CWarnTests(WarnTests, unittest.TestCase):
module = c_warnings
@@ -485,6 +589,14 @@ class WCmdLineTests(BaseTest):
self.module._setoption('error::Warning::0')
self.assertRaises(UserWarning, self.module.warn, 'convert to error')
+
+class CWCmdLineTests(WCmdLineTests, unittest.TestCase):
+ module = c_warnings
+
+
+class PyWCmdLineTests(WCmdLineTests, unittest.TestCase):
+ module = py_warnings
+
def test_improper_option(self):
# Same as above, but check that the message is printed out when
# the interpreter is executed. This also checks that options are
@@ -501,12 +613,6 @@ class WCmdLineTests(BaseTest):
self.assertFalse(out.strip())
self.assertNotIn(b'RuntimeWarning', err)
-class CWCmdLineTests(WCmdLineTests, unittest.TestCase):
- module = c_warnings
-
-class PyWCmdLineTests(WCmdLineTests, unittest.TestCase):
- module = py_warnings
-
class _WarningsTests(BaseTest, unittest.TestCase):
@@ -839,7 +945,19 @@ class EnvironmentVariableTests(BaseTest):
"import sys; sys.stdout.write(str(sys.warnoptions))",
PYTHONWARNINGS="ignore::DeprecationWarning")
self.assertEqual(stdout,
- b"['ignore::UnicodeWarning', 'ignore::DeprecationWarning']")
+ b"['ignore::DeprecationWarning', 'ignore::UnicodeWarning']")
+
+ def test_conflicting_envvar_and_command_line(self):
+ rc, stdout, stderr = assert_python_failure("-Werror::DeprecationWarning", "-c",
+ "import sys, warnings; sys.stdout.write(str(sys.warnoptions)); "
+ "warnings.warn('Message', DeprecationWarning)",
+ PYTHONWARNINGS="default::DeprecationWarning")
+ self.assertEqual(stdout,
+ b"['default::DeprecationWarning', 'error::DeprecationWarning']")
+ self.assertEqual(stderr.splitlines(),
+ [b"Traceback (most recent call last):",
+ b" File \"<string>\", line 1, in <module>",
+ b"DeprecationWarning: Message"])
@unittest.skipUnless(sys.getfilesystemencoding() != 'ascii',
'requires non-ascii filesystemencoding')
@@ -870,6 +988,7 @@ class BootstrapTest(unittest.TestCase):
# Use -W to load warnings module at startup
assert_python_ok('-c', 'pass', '-W', 'always', PYTHONPATH=cwd)
+
class FinalizationTest(unittest.TestCase):
def test_finalization(self):
# Issue #19421: warnings.warn() should not crash
@@ -889,6 +1008,23 @@ a=A()
# of the script
self.assertEqual(err, b'__main__:7: UserWarning: test')
+ def test_late_resource_warning(self):
+ # Issue #21925: Emitting a ResourceWarning late during the Python
+ # shutdown must be logged.
+
+ expected = b"sys:1: ResourceWarning: unclosed file "
+
+ # don't import the warnings module
+ # (_warnings will try to import it)
+ code = "f = open(%a)" % __file__
+ rc, out, err = assert_python_ok("-Wd", "-c", code)
+ self.assertTrue(err.startswith(expected), ascii(err))
+
+ # import the warnings module
+ code = "import warnings; f = open(%a)" % __file__
+ rc, out, err = assert_python_ok("-Wd", "-c", code)
+ self.assertTrue(err.startswith(expected), ascii(err))
+
def setUpModule():
py_warnings.onceregistry.clear()
diff --git a/Lib/test/test_warnings/__main__.py b/Lib/test/test_warnings/__main__.py
new file mode 100644
index 0000000000..44e52ec070
--- /dev/null
+++ b/Lib/test/test_warnings/__main__.py
@@ -0,0 +1,3 @@
+import unittest
+
+unittest.main('test.test_warnings')
diff --git a/Lib/test/test_warnings/data/import_warning.py b/Lib/test/test_warnings/data/import_warning.py
new file mode 100644
index 0000000000..32daec1140
--- /dev/null
+++ b/Lib/test/test_warnings/data/import_warning.py
@@ -0,0 +1,3 @@
+import warnings
+
+warnings.warn('module-level warning', DeprecationWarning, stacklevel=2)
diff --git a/Lib/test/warning_tests.py b/Lib/test/test_warnings/data/stacklevel.py
index d0519effdc..d0519effdc 100644
--- a/Lib/test/warning_tests.py
+++ b/Lib/test/test_warnings/data/stacklevel.py
diff --git a/Lib/test/test_weakref.py b/Lib/test/test_weakref.py
index 4313c1d5c8..f49cb7e591 100644
--- a/Lib/test/test_weakref.py
+++ b/Lib/test/test_weakref.py
@@ -7,7 +7,8 @@ import operator
import contextlib
import copy
-from test import support, script_helper
+from test import support
+from test.support import script_helper
# Used in ReferencesTestCase.test_ref_created_during_del() .
ref_from_del = None
@@ -92,6 +93,18 @@ class ReferencesTestCase(TestBase):
self.check_basic_callback(create_function)
self.check_basic_callback(create_bound_method)
+ @support.cpython_only
+ def test_cfunction(self):
+ import _testcapi
+ create_cfunction = _testcapi.create_cfunction
+ f = create_cfunction()
+ wr = weakref.ref(f)
+ self.assertIs(wr(), f)
+ del f
+ self.assertIsNone(wr())
+ self.check_basic_ref(create_cfunction)
+ self.check_basic_callback(create_cfunction)
+
def test_multiple_callbacks(self):
o = C()
ref1 = weakref.ref(o, self.callback)
@@ -120,6 +133,10 @@ class ReferencesTestCase(TestBase):
ref1 = weakref.ref(c, callback)
del c
+ def test_constructor_kwargs(self):
+ c = C()
+ self.assertRaises(TypeError, weakref.ref, c, callback=None)
+
def test_proxy_ref(self):
o = C()
o.bar = 1
@@ -1599,6 +1616,14 @@ class MappingTestCase(TestBase):
self.assertEqual(len(d), 0)
self.assertEqual(count, 2)
+ def test_make_weak_valued_dict_repr(self):
+ dict = weakref.WeakValueDictionary()
+ self.assertRegex(repr(dict), '<WeakValueDictionary at 0x.*>')
+
+ def test_make_weak_keyed_dict_repr(self):
+ dict = weakref.WeakKeyDictionary()
+ self.assertRegex(repr(dict), '<WeakKeyDictionary at 0x.*>')
+
from test import mapping_tests
class WeakValueDictionaryTestCase(mapping_tests.BasicTestMappingProtocol):
diff --git a/Lib/test/test_weakset.py b/Lib/test/test_weakset.py
index fb22879dfa..9ce672b815 100644
--- a/Lib/test/test_weakset.py
+++ b/Lib/test/test_weakset.py
@@ -1,5 +1,4 @@
import unittest
-from test import support
from weakref import proxy, ref, WeakSet
import operator
import copy
@@ -443,8 +442,5 @@ class TestWeakSet(unittest.TestCase):
self.assertLessEqual(n2, n1)
-def test_main(verbose=None):
- support.run_unittest(TestWeakSet)
-
if __name__ == "__main__":
- test_main(verbose=True)
+ unittest.main()
diff --git a/Lib/test/test_winsound.py b/Lib/test/test_winsound.py
index 83618b6a44..2a78388b2f 100644
--- a/Lib/test/test_winsound.py
+++ b/Lib/test/test_winsound.py
@@ -158,7 +158,7 @@ class PlaySoundTest(unittest.TestCase):
)
def test_alias_fallback(self):
- # In the absense of the ability to tell if a sound was actually
+ # In the absence of the ability to tell if a sound was actually
# played, this test has two acceptable outcomes: success (no error,
# sound was theoretically played; although as issue #19987 shows
# a box without a soundcard can "succeed") or RuntimeError. Any
@@ -246,8 +246,5 @@ def _have_soundcard():
return __have_soundcard_cache
-def test_main():
- support.run_unittest(BeepTest, MessageBeepTest, PlaySoundTest)
-
-if __name__=="__main__":
- test_main()
+if __name__ == "__main__":
+ unittest.main()
diff --git a/Lib/test/test_with.py b/Lib/test/test_with.py
index cbaafcf923..e8d789bc2c 100644
--- a/Lib/test/test_with.py
+++ b/Lib/test/test_with.py
@@ -8,7 +8,6 @@ import sys
import unittest
from collections import deque
from contextlib import _GeneratorContextManager, contextmanager
-from test.support import run_unittest
class MockContextManager(_GeneratorContextManager):
@@ -455,7 +454,8 @@ class ExceptionalTestCase(ContextmanagerAssertionMixin, unittest.TestCase):
with cm():
raise StopIteration("from with")
- self.assertRaises(StopIteration, shouldThrow)
+ with self.assertWarnsRegex(PendingDeprecationWarning, "StopIteration"):
+ self.assertRaises(StopIteration, shouldThrow)
def testRaisedStopIteration2(self):
# From bug 1462485
@@ -482,7 +482,8 @@ class ExceptionalTestCase(ContextmanagerAssertionMixin, unittest.TestCase):
with cm():
raise next(iter([]))
- self.assertRaises(StopIteration, shouldThrow)
+ with self.assertWarnsRegex(PendingDeprecationWarning, "StopIteration"):
+ self.assertRaises(StopIteration, shouldThrow)
def testRaisedGeneratorExit1(self):
# From bug 1462485
@@ -737,14 +738,5 @@ class NestedWith(unittest.TestCase):
self.assertEqual(10, b1)
self.assertEqual(20, b2)
-def test_main():
- run_unittest(FailureTestCase, NonexceptionalTestCase,
- NestedNonexceptionalTestCase, ExceptionalTestCase,
- NonLocalFlowControlTestCase,
- AssignmentTargetTestCase,
- ExitSwallowsExceptionTestCase,
- NestedWith)
-
-
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_wsgiref.py b/Lib/test/test_wsgiref.py
index 4076b6862b..61a750c622 100644
--- a/Lib/test/test_wsgiref.py
+++ b/Lib/test/test_wsgiref.py
@@ -1,22 +1,25 @@
+from unittest import mock
+from test import support
+from test.test_httpservers import NoLogRequestHandler
from unittest import TestCase
from wsgiref.util import setup_testing_defaults
from wsgiref.headers import Headers
-from wsgiref.handlers import BaseHandler, BaseCGIHandler
+from wsgiref.handlers import BaseHandler, BaseCGIHandler, SimpleHandler
from wsgiref import util
from wsgiref.validate import validator
from wsgiref.simple_server import WSGIServer, WSGIRequestHandler
from wsgiref.simple_server import make_server
+from http.client import HTTPConnection
from io import StringIO, BytesIO, BufferedReader
from socketserver import BaseServer
from platform import python_implementation
import os
import re
+import signal
import sys
import unittest
-from test import support
-
class MockServer(WSGIServer):
"""Non-socket HTTP server"""
@@ -168,6 +171,27 @@ class IntegrationTests(TestCase):
" be of type list: <class 'tuple'>"
)
+ def test_status_validation_errors(self):
+ def create_bad_app(status):
+ def bad_app(environ, start_response):
+ start_response(status, [("Content-Type", "text/plain; charset=utf-8")])
+ return [b"Hello, world!"]
+ return bad_app
+
+ tests = [
+ ('200', 'AssertionError: Status must be at least 4 characters'),
+ ('20X OK', 'AssertionError: Status message must begin w/3-digit code'),
+ ('200OK', 'AssertionError: Status message must have a space after code'),
+ ]
+
+ for status, exc_message in tests:
+ with self.subTest(status=status):
+ out, err = run_amock(create_bad_app(status))
+ self.assertTrue(out.endswith(
+ b"A server error occurred. Please contact the administrator."
+ ))
+ self.assertEqual(err.splitlines()[-2], exc_message)
+
def test_wsgi_input(self):
def bad_app(e,s):
e["wsgi.input"].read()
@@ -202,6 +226,79 @@ class IntegrationTests(TestCase):
b"data",
out)
+ def test_cp1252_url(self):
+ def app(e, s):
+ s("200 OK", [
+ ("Content-Type", "text/plain"),
+ ("Date", "Wed, 24 Dec 2008 13:29:32 GMT"),
+ ])
+ # PEP3333 says environ variables are decoded as latin1.
+ # Encode as latin1 to get original bytes
+ return [e["PATH_INFO"].encode("latin1")]
+
+ out, err = run_amock(
+ validator(app), data=b"GET /\x80%80 HTTP/1.0")
+ self.assertEqual(
+ [
+ b"HTTP/1.0 200 OK",
+ mock.ANY,
+ b"Content-Type: text/plain",
+ b"Date: Wed, 24 Dec 2008 13:29:32 GMT",
+ b"",
+ b"/\x80\x80",
+ ],
+ out.splitlines())
+
+ def test_interrupted_write(self):
+ # BaseHandler._write() and _flush() have to write all data, even if
+ # it takes multiple send() calls. Test this by interrupting a send()
+ # call with a Unix signal.
+ threading = support.import_module("threading")
+ pthread_kill = support.get_attribute(signal, "pthread_kill")
+
+ def app(environ, start_response):
+ start_response("200 OK", [])
+ return [bytes(support.SOCK_MAX_SIZE)]
+
+ class WsgiHandler(NoLogRequestHandler, WSGIRequestHandler):
+ pass
+
+ server = make_server(support.HOST, 0, app, handler_class=WsgiHandler)
+ self.addCleanup(server.server_close)
+ interrupted = threading.Event()
+
+ def signal_handler(signum, frame):
+ interrupted.set()
+
+ original = signal.signal(signal.SIGUSR1, signal_handler)
+ self.addCleanup(signal.signal, signal.SIGUSR1, original)
+ received = None
+ main_thread = threading.get_ident()
+
+ def run_client():
+ http = HTTPConnection(*server.server_address)
+ http.request("GET", "/")
+ with http.getresponse() as response:
+ response.read(100)
+ # The main thread should now be blocking in a send() system
+ # call. But in theory, it could get interrupted by other
+ # signals, and then retried. So keep sending the signal in a
+ # loop, in case an earlier signal happens to be delivered at
+ # an inconvenient moment.
+ while True:
+ pthread_kill(main_thread, signal.SIGUSR1)
+ if interrupted.wait(timeout=float(1)):
+ break
+ nonlocal received
+ received = len(response.read())
+ http.close()
+
+ background = threading.Thread(target=run_client)
+ background.start()
+ server.handle_request()
+ background.join()
+ self.assertEqual(received, support.SOCK_MAX_SIZE - 100)
+
class UtilityTests(TestCase):
@@ -369,6 +466,7 @@ class HeaderTests(TestCase):
def testMappingInterface(self):
test = [('x','y')]
+ self.assertEqual(len(Headers()), 0)
self.assertEqual(len(Headers([])),0)
self.assertEqual(len(Headers(test[:])),1)
self.assertEqual(Headers(test[:]).keys(), ['x'])
@@ -376,7 +474,7 @@ class HeaderTests(TestCase):
self.assertEqual(Headers(test[:]).items(), test)
self.assertIsNot(Headers(test).items(), test) # must be copy!
- h=Headers([])
+ h = Headers()
del h['foo'] # should not raise an error
h['Foo'] = 'bar'
@@ -401,9 +499,8 @@ class HeaderTests(TestCase):
def testRequireList(self):
self.assertRaises(TypeError, Headers, "foo")
-
def testExtras(self):
- h = Headers([])
+ h = Headers()
self.assertEqual(str(h),'\r\n')
h.add_header('foo','bar',baz="spam")
@@ -658,9 +755,31 @@ class HandlerTests(TestCase):
h.run(error_app)
self.assertEqual(side_effects['close_called'], True)
+ def testPartialWrite(self):
+ written = bytearray()
+
+ class PartialWriter:
+ def write(self, b):
+ partial = b[:7]
+ written.extend(partial)
+ return len(partial)
+
+ def flush(self):
+ pass
+
+ environ = {"SERVER_PROTOCOL": "HTTP/1.0"}
+ h = SimpleHandler(BytesIO(), PartialWriter(), sys.stderr, environ)
+ msg = "should not do partial writes"
+ with self.assertWarnsRegex(DeprecationWarning, msg):
+ h.run(hello_app)
+ self.assertEqual(b"HTTP/1.0 200 OK\r\n"
+ b"Content-Type: text/plain\r\n"
+ b"Date: Mon, 05 Jun 2006 18:49:54 GMT\r\n"
+ b"Content-Length: 13\r\n"
+ b"\r\n"
+ b"Hello, world!",
+ written)
-def test_main():
- support.run_unittest(__name__)
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_xdrlib.py b/Lib/test/test_xdrlib.py
index 70496d63b4..3df5f264ce 100644
--- a/Lib/test/test_xdrlib.py
+++ b/Lib/test/test_xdrlib.py
@@ -1,4 +1,3 @@
-from test import support
import unittest
import xdrlib
@@ -74,9 +73,5 @@ class ConversionErrorTest(unittest.TestCase):
def test_uhyper(self):
self.assertRaisesConversion(self.packer.pack_uhyper, 'string')
-def test_main():
- support.run_unittest(XDRTest)
- support.run_unittest(ConversionErrorTest)
-
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py
index 5c2a2aff40..44e3142dc9 100644
--- a/Lib/test/test_xml_etree.py
+++ b/Lib/test/test_xml_etree.py
@@ -567,14 +567,11 @@ class ElementTreeTest(unittest.TestCase):
self.assertFalse(f.closed)
self.assertEqual(str(cm.exception), "unknown event 'bogus'")
- with warnings.catch_warnings(record=True) as w:
- warnings.filterwarnings("always", category=ResourceWarning)
+ with support.check_no_resource_warning(self):
with self.assertRaises(ValueError) as cm:
iterparse(SIMPLE_XMLFILE, events)
self.assertEqual(str(cm.exception), "unknown event 'bogus'")
del cm
- support.gc_collect()
- self.assertEqual(w, [])
source = io.BytesIO(
b"<?xml version='1.0' encoding='iso-8859-1'?>\n"
@@ -601,15 +598,12 @@ class ElementTreeTest(unittest.TestCase):
it = iterparse(TESTFN)
action, elem = next(it)
self.assertEqual((action, elem.tag), ('end', 'document'))
- with warnings.catch_warnings(record=True) as w:
- warnings.filterwarnings("always", category=ResourceWarning)
+ with support.check_no_resource_warning(self):
with self.assertRaises(ET.ParseError) as cm:
next(it)
self.assertEqual(str(cm.exception),
'junk after document element: line 1, column 12')
del cm, it
- support.gc_collect()
- self.assertEqual(w, [])
def test_writefile(self):
elem = ET.Element("tag")
@@ -758,7 +752,7 @@ class ElementTreeTest(unittest.TestCase):
'mac-roman', 'mac-turkish',
'iso2022-jp', 'iso2022-jp-1', 'iso2022-jp-2', 'iso2022-jp-2004',
'iso2022-jp-3', 'iso2022-jp-ext',
- 'koi8-r', 'koi8-u',
+ 'koi8-r', 'koi8-t', 'koi8-u', 'kz1048',
'hz', 'ptcp154',
]
for encoding in supported_encodings:
@@ -1666,6 +1660,57 @@ class BugsTest(unittest.TestCase):
ET.register_namespace('test10777', 'http://myuri/')
ET.register_namespace('test10777', 'http://myuri/')
+ def test_lost_text(self):
+ # Issue #25902: Borrowed text can disappear
+ class Text:
+ def __bool__(self):
+ e.text = 'changed'
+ return True
+
+ e = ET.Element('tag')
+ e.text = Text()
+ i = e.itertext()
+ t = next(i)
+ self.assertIsInstance(t, Text)
+ self.assertIsInstance(e.text, str)
+ self.assertEqual(e.text, 'changed')
+
+ def test_lost_tail(self):
+ # Issue #25902: Borrowed tail can disappear
+ class Text:
+ def __bool__(self):
+ e[0].tail = 'changed'
+ return True
+
+ e = ET.Element('root')
+ e.append(ET.Element('tag'))
+ e[0].tail = Text()
+ i = e.itertext()
+ t = next(i)
+ self.assertIsInstance(t, Text)
+ self.assertIsInstance(e[0].tail, str)
+ self.assertEqual(e[0].tail, 'changed')
+
+ def test_lost_elem(self):
+ # Issue #25902: Borrowed element can disappear
+ class Tag:
+ def __eq__(self, other):
+ e[0] = ET.Element('changed')
+ next(i)
+ return True
+
+ e = ET.Element('root')
+ e.append(ET.Element(Tag()))
+ e.append(ET.Element('tag'))
+ i = e.iter('tag')
+ try:
+ t = next(i)
+ except ValueError:
+ self.skipTest('generators are not reentrant')
+ self.assertIsInstance(t.tag, Tag)
+ self.assertIsInstance(e[0].tag, str)
+ self.assertEqual(e[0].tag, 'changed')
+
# --------------------------------------------------------------------
diff --git a/Lib/test/test_xml_etree_c.py b/Lib/test/test_xml_etree_c.py
index 409ec6ab1b..96b446e32e 100644
--- a/Lib/test/test_xml_etree_c.py
+++ b/Lib/test/test_xml_etree_c.py
@@ -87,7 +87,7 @@ class SizeofTest(unittest.TestCase):
def setUp(self):
self.elementsize = support.calcobjsize('5P')
# extra
- self.extra = struct.calcsize('PiiP4P')
+ self.extra = struct.calcsize('PnnP4P')
check_sizeof = support.check_sizeof
diff --git a/Lib/test/test_xmlrpc.py b/Lib/test/test_xmlrpc.py
index 7ae0dce1ad..02d9f5c650 100644
--- a/Lib/test/test_xmlrpc.py
+++ b/Lib/test/test_xmlrpc.py
@@ -7,6 +7,7 @@ from unittest import mock
import xmlrpc.client as xmlrpclib
import xmlrpc.server
import http.client
+import http, http.server
import socket
import os
import re
@@ -183,6 +184,27 @@ class XMLRPCTestCase(unittest.TestCase):
xmlrpclib.loads(strg)[0][0])
self.assertRaises(TypeError, xmlrpclib.dumps, (arg1,))
+ def test_dump_encoding(self):
+ value = {'key\u20ac\xa4':
+ 'value\u20ac\xa4'}
+ strg = xmlrpclib.dumps((value,), encoding='iso-8859-15')
+ strg = "<?xml version='1.0' encoding='iso-8859-15'?>" + strg
+ self.assertEqual(xmlrpclib.loads(strg)[0][0], value)
+ strg = strg.encode('iso-8859-15', 'xmlcharrefreplace')
+ self.assertEqual(xmlrpclib.loads(strg)[0][0], value)
+
+ strg = xmlrpclib.dumps((value,), encoding='iso-8859-15',
+ methodresponse=True)
+ self.assertEqual(xmlrpclib.loads(strg)[0][0], value)
+ strg = strg.encode('iso-8859-15', 'xmlcharrefreplace')
+ self.assertEqual(xmlrpclib.loads(strg)[0][0], value)
+
+ methodname = 'method\u20ac\xa4'
+ strg = xmlrpclib.dumps((value,), encoding='iso-8859-15',
+ methodname=methodname)
+ self.assertEqual(xmlrpclib.loads(strg)[0][0], value)
+ self.assertEqual(xmlrpclib.loads(strg)[1], methodname)
+
def test_dump_bytes(self):
sample = b"my dog has fleas"
self.assertEqual(sample, xmlrpclib.Binary(sample))
@@ -202,6 +224,20 @@ class XMLRPCTestCase(unittest.TestCase):
self.assertIs(type(newvalue), xmlrpclib.Binary)
self.assertIsNone(m)
+ def test_loads_unsupported(self):
+ ResponseError = xmlrpclib.ResponseError
+ data = '<params><param><value><spam/></value></param></params>'
+ self.assertRaises(ResponseError, xmlrpclib.loads, data)
+ data = ('<params><param><value><array>'
+ '<value><spam/></value>'
+ '</array></value></param></params>')
+ self.assertRaises(ResponseError, xmlrpclib.loads, data)
+ data = ('<params><param><value><struct>'
+ '<member><name>a</name><value><spam/></value></member>'
+ '<member><name>b</name><value><spam/></value></member>'
+ '</struct></value></param></params>')
+ self.assertRaises(ResponseError, xmlrpclib.loads, data)
+
def test_get_host_info(self):
# see bug #3613, this raised a TypeError
transp = xmlrpc.client.Transport()
@@ -223,6 +259,42 @@ class XMLRPCTestCase(unittest.TestCase):
except OSError:
self.assertTrue(has_ssl)
+ @unittest.skipUnless(threading, "Threading required for this test.")
+ def test_keepalive_disconnect(self):
+ class RequestHandler(http.server.BaseHTTPRequestHandler):
+ protocol_version = "HTTP/1.1"
+ handled = False
+
+ def do_POST(self):
+ length = int(self.headers.get("Content-Length"))
+ self.rfile.read(length)
+ if self.handled:
+ self.close_connection = True
+ return
+ response = xmlrpclib.dumps((5,), methodresponse=True)
+ response = response.encode()
+ self.send_response(http.HTTPStatus.OK)
+ self.send_header("Content-Length", len(response))
+ self.end_headers()
+ self.wfile.write(response)
+ self.handled = True
+ self.close_connection = False
+
+ def run_server():
+ server.socket.settimeout(float(1)) # Don't hang if client fails
+ server.handle_request() # First request and attempt at second
+ server.handle_request() # Retried second request
+
+ server = http.server.HTTPServer((support.HOST, 0), RequestHandler)
+ self.addCleanup(server.server_close)
+ thread = threading.Thread(target=run_server)
+ thread.start()
+ self.addCleanup(thread.join)
+ url = "http://{}:{}/".format(*server.server_address)
+ with xmlrpclib.ServerProxy(url) as p:
+ self.assertEqual(p.method(), 5)
+ self.assertEqual(p.method(), 5)
+
class HelperTestCase(unittest.TestCase):
def test_escape(self):
self.assertEqual(xmlrpclib.escape("a&b"), "a&amp;b")
@@ -287,7 +359,7 @@ class DateTimeTestCase(unittest.TestCase):
def test_repr(self):
d = datetime.datetime(2007,1,2,3,4,5)
t = xmlrpclib.DateTime(d)
- val ="<DateTime '20070102T03:04:05' at %x>" % id(t)
+ val ="<DateTime '20070102T03:04:05' at %#x>" % id(t)
self.assertEqual(repr(t), val)
def test_decode(self):
@@ -371,7 +443,7 @@ ADDR = PORT = URL = None
# The evt is set twice. First when the server is ready to serve.
# Second when the server has been shutdown. The user must clear
# the event after it has been set the first time to catch the second set.
-def http_server(evt, numrequests, requestHandler=None):
+def http_server(evt, numrequests, requestHandler=None, encoding=None):
class TestInstanceClass:
def div(self, x, y):
return x // y
@@ -400,6 +472,7 @@ def http_server(evt, numrequests, requestHandler=None):
if not requestHandler:
requestHandler = xmlrpc.server.SimpleXMLRPCRequestHandler
serv = MyXMLRPCServer(("localhost", 0), requestHandler,
+ encoding=encoding,
logRequests=False, bind_and_activate=False)
try:
serv.server_bind()
@@ -415,6 +488,7 @@ def http_server(evt, numrequests, requestHandler=None):
serv.register_multicall_functions()
serv.register_function(pow)
serv.register_function(lambda x,y: x+y, 'add')
+ serv.register_function(lambda x: x, 'têšt')
serv.register_function(my_function)
testInstance = TestInstanceClass()
serv.register_instance(testInstance, allow_dotted_names=True)
@@ -582,6 +656,30 @@ class SimpleServerTestCase(BaseServerTestCase):
# protocol error; provide additional information in test output
self.fail("%s\n%s" % (e, getattr(e, "headers", "")))
+ def test_client_encoding(self):
+ start_string = '\u20ac'
+ end_string = '\xa4'
+
+ try:
+ p = xmlrpclib.ServerProxy(URL, encoding='iso-8859-15')
+ self.assertEqual(p.add(start_string, end_string),
+ start_string + end_string)
+ except (xmlrpclib.ProtocolError, socket.error) as e:
+ # ignore failures due to non-blocking socket unavailable errors.
+ if not is_unavailable_exception(e):
+ # protocol error; provide additional information in test output
+ self.fail("%s\n%s" % (e, getattr(e, "headers", "")))
+
+ def test_nonascii_methodname(self):
+ try:
+ p = xmlrpclib.ServerProxy(URL, encoding='ascii')
+ self.assertEqual(p.têšt(42), 42)
+ except (xmlrpclib.ProtocolError, socket.error) as e:
+ # ignore failures due to non-blocking socket unavailable errors.
+ if not is_unavailable_exception(e):
+ # protocol error; provide additional information in test output
+ self.fail("%s\n%s" % (e, getattr(e, "headers", "")))
+
# [ch] The test 404 is causing lots of false alarms.
def XXXtest_404(self):
# send POST with http.client, it should return 404 header and
@@ -595,7 +693,7 @@ class SimpleServerTestCase(BaseServerTestCase):
self.assertEqual(response.reason, 'Not Found')
def test_introspection1(self):
- expected_methods = set(['pow', 'div', 'my_function', 'add',
+ expected_methods = set(['pow', 'div', 'my_function', 'add', 'têšt',
'system.listMethods', 'system.methodHelp',
'system.methodSignature', 'system.multicall',
'Fixture'])
@@ -713,6 +811,43 @@ class SimpleServerTestCase(BaseServerTestCase):
conn.request('POST', '/RPC2 HTTP/1.0\r\nContent-Length: 100\r\n\r\nbye')
conn.close()
+ def test_context_manager(self):
+ with xmlrpclib.ServerProxy(URL) as server:
+ server.add(2, 3)
+ self.assertNotEqual(server('transport')._connection,
+ (None, None))
+ self.assertEqual(server('transport')._connection,
+ (None, None))
+
+ def test_context_manager_method_error(self):
+ try:
+ with xmlrpclib.ServerProxy(URL) as server:
+ server.add(2, "a")
+ except xmlrpclib.Fault:
+ pass
+ self.assertEqual(server('transport')._connection,
+ (None, None))
+
+
+class SimpleServerEncodingTestCase(BaseServerTestCase):
+ @staticmethod
+ def threadFunc(evt, numrequests, requestHandler=None, encoding=None):
+ http_server(evt, numrequests, requestHandler, 'iso-8859-15')
+
+ def test_server_encoding(self):
+ start_string = '\u20ac'
+ end_string = '\xa4'
+
+ try:
+ p = xmlrpclib.ServerProxy(URL)
+ self.assertEqual(p.add(start_string, end_string),
+ start_string + end_string)
+ except (xmlrpclib.ProtocolError, socket.error) as e:
+ # ignore failures due to non-blocking socket unavailable errors.
+ if not is_unavailable_exception(e):
+ # protocol error; provide additional information in test output
+ self.fail("%s\n%s" % (e, getattr(e, "headers", "")))
+
class MultiPathServerTestCase(BaseServerTestCase):
threadFunc = staticmethod(http_multi_server)
@@ -919,6 +1054,7 @@ class ServerProxyTestCase(unittest.TestCase):
p = xmlrpclib.ServerProxy(self.url, transport=t)
self.assertEqual(p('transport'), t)
+
# This is a contrived way to make a failure occur on the server side
# in order to test the _send_traceback_header flag on the server
class FailingMessageClass(http.client.HTTPMessage):
@@ -1125,8 +1261,9 @@ class UseBuiltinTypesTestCase(unittest.TestCase):
def test_main():
support.run_unittest(XMLRPCTestCase, HelperTestCase, DateTimeTestCase,
BinaryTestCase, FaultTestCase, UseBuiltinTypesTestCase,
- SimpleServerTestCase, KeepaliveServerTestCase1,
- KeepaliveServerTestCase2, GzipServerTestCase, GzipUtilTestCase,
+ SimpleServerTestCase, SimpleServerEncodingTestCase,
+ KeepaliveServerTestCase1, KeepaliveServerTestCase2,
+ GzipServerTestCase, GzipUtilTestCase,
MultiPathServerTestCase, ServerProxyTestCase, FailingServerTestCase,
CGIHandlerTestCase)
diff --git a/Lib/test/test_zipapp.py b/Lib/test/test_zipapp.py
new file mode 100644
index 0000000000..d8d44375bd
--- /dev/null
+++ b/Lib/test/test_zipapp.py
@@ -0,0 +1,349 @@
+"""Test harness for the zipapp module."""
+
+import io
+import pathlib
+import stat
+import sys
+import tempfile
+import unittest
+import zipapp
+import zipfile
+
+from unittest.mock import patch
+
+class ZipAppTest(unittest.TestCase):
+
+ """Test zipapp module functionality."""
+
+ def setUp(self):
+ tmpdir = tempfile.TemporaryDirectory()
+ self.addCleanup(tmpdir.cleanup)
+ self.tmpdir = pathlib.Path(tmpdir.name)
+
+ def test_create_archive(self):
+ # Test packing a directory.
+ source = self.tmpdir / 'source'
+ source.mkdir()
+ (source / '__main__.py').touch()
+ target = self.tmpdir / 'source.pyz'
+ zipapp.create_archive(str(source), str(target))
+ self.assertTrue(target.is_file())
+
+ def test_create_archive_with_pathlib(self):
+ # Test packing a directory using Path objects for source and target.
+ source = self.tmpdir / 'source'
+ source.mkdir()
+ (source / '__main__.py').touch()
+ target = self.tmpdir / 'source.pyz'
+ zipapp.create_archive(source, target)
+ self.assertTrue(target.is_file())
+
+ def test_create_archive_with_subdirs(self):
+ # Test packing a directory includes entries for subdirectories.
+ source = self.tmpdir / 'source'
+ source.mkdir()
+ (source / '__main__.py').touch()
+ (source / 'foo').mkdir()
+ (source / 'bar').mkdir()
+ (source / 'foo' / '__init__.py').touch()
+ target = io.BytesIO()
+ zipapp.create_archive(str(source), target)
+ target.seek(0)
+ with zipfile.ZipFile(target, 'r') as z:
+ self.assertIn('foo/', z.namelist())
+ self.assertIn('bar/', z.namelist())
+
+ def test_create_archive_default_target(self):
+ # Test packing a directory to the default name.
+ source = self.tmpdir / 'source'
+ source.mkdir()
+ (source / '__main__.py').touch()
+ zipapp.create_archive(str(source))
+ expected_target = self.tmpdir / 'source.pyz'
+ self.assertTrue(expected_target.is_file())
+
+ def test_no_main(self):
+ # Test that packing a directory with no __main__.py fails.
+ source = self.tmpdir / 'source'
+ source.mkdir()
+ (source / 'foo.py').touch()
+ target = self.tmpdir / 'source.pyz'
+ with self.assertRaises(zipapp.ZipAppError):
+ zipapp.create_archive(str(source), str(target))
+
+ def test_main_and_main_py(self):
+ # Test that supplying a main argument with __main__.py fails.
+ source = self.tmpdir / 'source'
+ source.mkdir()
+ (source / '__main__.py').touch()
+ target = self.tmpdir / 'source.pyz'
+ with self.assertRaises(zipapp.ZipAppError):
+ zipapp.create_archive(str(source), str(target), main='pkg.mod:fn')
+
+ def test_main_written(self):
+ # Test that the __main__.py is written correctly.
+ source = self.tmpdir / 'source'
+ source.mkdir()
+ (source / 'foo.py').touch()
+ target = self.tmpdir / 'source.pyz'
+ zipapp.create_archive(str(source), str(target), main='pkg.mod:fn')
+ with zipfile.ZipFile(str(target), 'r') as z:
+ self.assertIn('__main__.py', z.namelist())
+ self.assertIn(b'pkg.mod.fn()', z.read('__main__.py'))
+
+ def test_main_only_written_once(self):
+ # Test that we don't write multiple __main__.py files.
+ # The initial implementation had this bug; zip files allow
+ # multiple entries with the same name
+ source = self.tmpdir / 'source'
+ source.mkdir()
+ # Write 2 files, as the original bug wrote __main__.py
+ # once for each file written :-(
+ # See http://bugs.python.org/review/23491/diff/13982/Lib/zipapp.py#newcode67Lib/zipapp.py:67
+ # (line 67)
+ (source / 'foo.py').touch()
+ (source / 'bar.py').touch()
+ target = self.tmpdir / 'source.pyz'
+ zipapp.create_archive(str(source), str(target), main='pkg.mod:fn')
+ with zipfile.ZipFile(str(target), 'r') as z:
+ self.assertEqual(1, z.namelist().count('__main__.py'))
+
+ def test_main_validation(self):
+ # Test that invalid values for main are rejected.
+ source = self.tmpdir / 'source'
+ source.mkdir()
+ target = self.tmpdir / 'source.pyz'
+ problems = [
+ '', 'foo', 'foo:', ':bar', '12:bar', 'a.b.c.:d',
+ '.a:b', 'a:b.', 'a:.b', 'a:silly name'
+ ]
+ for main in problems:
+ with self.subTest(main=main):
+ with self.assertRaises(zipapp.ZipAppError):
+ zipapp.create_archive(str(source), str(target), main=main)
+
+ def test_default_no_shebang(self):
+ # Test that no shebang line is written to the target by default.
+ source = self.tmpdir / 'source'
+ source.mkdir()
+ (source / '__main__.py').touch()
+ target = self.tmpdir / 'source.pyz'
+ zipapp.create_archive(str(source), str(target))
+ with target.open('rb') as f:
+ self.assertNotEqual(f.read(2), b'#!')
+
+ def test_custom_interpreter(self):
+ # Test that a shebang line with a custom interpreter is written
+ # correctly.
+ source = self.tmpdir / 'source'
+ source.mkdir()
+ (source / '__main__.py').touch()
+ target = self.tmpdir / 'source.pyz'
+ zipapp.create_archive(str(source), str(target), interpreter='python')
+ with target.open('rb') as f:
+ self.assertEqual(f.read(2), b'#!')
+ self.assertEqual(b'python\n', f.readline())
+
+ def test_pack_to_fileobj(self):
+ # Test that we can pack to a file object.
+ source = self.tmpdir / 'source'
+ source.mkdir()
+ (source / '__main__.py').touch()
+ target = io.BytesIO()
+ zipapp.create_archive(str(source), target, interpreter='python')
+ self.assertTrue(target.getvalue().startswith(b'#!python\n'))
+
+ def test_read_shebang(self):
+ # Test that we can read the shebang line correctly.
+ source = self.tmpdir / 'source'
+ source.mkdir()
+ (source / '__main__.py').touch()
+ target = self.tmpdir / 'source.pyz'
+ zipapp.create_archive(str(source), str(target), interpreter='python')
+ self.assertEqual(zipapp.get_interpreter(str(target)), 'python')
+
+ def test_read_missing_shebang(self):
+ # Test that reading the shebang line of a file without one returns None.
+ source = self.tmpdir / 'source'
+ source.mkdir()
+ (source / '__main__.py').touch()
+ target = self.tmpdir / 'source.pyz'
+ zipapp.create_archive(str(source), str(target))
+ self.assertEqual(zipapp.get_interpreter(str(target)), None)
+
+ def test_modify_shebang(self):
+ # Test that we can change the shebang of a file.
+ source = self.tmpdir / 'source'
+ source.mkdir()
+ (source / '__main__.py').touch()
+ target = self.tmpdir / 'source.pyz'
+ zipapp.create_archive(str(source), str(target), interpreter='python')
+ new_target = self.tmpdir / 'changed.pyz'
+ zipapp.create_archive(str(target), str(new_target), interpreter='python2.7')
+ self.assertEqual(zipapp.get_interpreter(str(new_target)), 'python2.7')
+
+ def test_write_shebang_to_fileobj(self):
+ # Test that we can change the shebang of a file, writing the result to a
+ # file object.
+ source = self.tmpdir / 'source'
+ source.mkdir()
+ (source / '__main__.py').touch()
+ target = self.tmpdir / 'source.pyz'
+ zipapp.create_archive(str(source), str(target), interpreter='python')
+ new_target = io.BytesIO()
+ zipapp.create_archive(str(target), new_target, interpreter='python2.7')
+ self.assertTrue(new_target.getvalue().startswith(b'#!python2.7\n'))
+
+ def test_read_from_pathobj(self):
+ # Test that we can copy an archive using a pathlib.Path object
+ # for the source.
+ source = self.tmpdir / 'source'
+ source.mkdir()
+ (source / '__main__.py').touch()
+ target1 = self.tmpdir / 'target1.pyz'
+ target2 = self.tmpdir / 'target2.pyz'
+ zipapp.create_archive(source, target1, interpreter='python')
+ zipapp.create_archive(target1, target2, interpreter='python2.7')
+ self.assertEqual(zipapp.get_interpreter(target2), 'python2.7')
+
+ def test_read_from_fileobj(self):
+ # Test that we can copy an archive using an open file object.
+ source = self.tmpdir / 'source'
+ source.mkdir()
+ (source / '__main__.py').touch()
+ target = self.tmpdir / 'source.pyz'
+ temp_archive = io.BytesIO()
+ zipapp.create_archive(str(source), temp_archive, interpreter='python')
+ new_target = io.BytesIO()
+ temp_archive.seek(0)
+ zipapp.create_archive(temp_archive, new_target, interpreter='python2.7')
+ self.assertTrue(new_target.getvalue().startswith(b'#!python2.7\n'))
+
+ def test_remove_shebang(self):
+ # Test that we can remove the shebang from a file.
+ source = self.tmpdir / 'source'
+ source.mkdir()
+ (source / '__main__.py').touch()
+ target = self.tmpdir / 'source.pyz'
+ zipapp.create_archive(str(source), str(target), interpreter='python')
+ new_target = self.tmpdir / 'changed.pyz'
+ zipapp.create_archive(str(target), str(new_target), interpreter=None)
+ self.assertEqual(zipapp.get_interpreter(str(new_target)), None)
+
+ def test_content_of_copied_archive(self):
+ # Test that copying an archive doesn't corrupt it.
+ source = self.tmpdir / 'source'
+ source.mkdir()
+ (source / '__main__.py').touch()
+ target = io.BytesIO()
+ zipapp.create_archive(str(source), target, interpreter='python')
+ new_target = io.BytesIO()
+ target.seek(0)
+ zipapp.create_archive(target, new_target, interpreter=None)
+ new_target.seek(0)
+ with zipfile.ZipFile(new_target, 'r') as z:
+ self.assertEqual(set(z.namelist()), {'__main__.py'})
+
+ # (Unix only) tests that archives with shebang lines are made executable
+ @unittest.skipIf(sys.platform == 'win32',
+ 'Windows does not support an executable bit')
+ def test_shebang_is_executable(self):
+ # Test that an archive with a shebang line is made executable.
+ source = self.tmpdir / 'source'
+ source.mkdir()
+ (source / '__main__.py').touch()
+ target = self.tmpdir / 'source.pyz'
+ zipapp.create_archive(str(source), str(target), interpreter='python')
+ self.assertTrue(target.stat().st_mode & stat.S_IEXEC)
+
+ @unittest.skipIf(sys.platform == 'win32',
+ 'Windows does not support an executable bit')
+ def test_no_shebang_is_not_executable(self):
+ # Test that an archive with no shebang line is not made executable.
+ source = self.tmpdir / 'source'
+ source.mkdir()
+ (source / '__main__.py').touch()
+ target = self.tmpdir / 'source.pyz'
+ zipapp.create_archive(str(source), str(target), interpreter=None)
+ self.assertFalse(target.stat().st_mode & stat.S_IEXEC)
+
+
+class ZipAppCmdlineTest(unittest.TestCase):
+
+ """Test zipapp module command line API."""
+
+ def setUp(self):
+ tmpdir = tempfile.TemporaryDirectory()
+ self.addCleanup(tmpdir.cleanup)
+ self.tmpdir = pathlib.Path(tmpdir.name)
+
+ def make_archive(self):
+ # Test that an archive with no shebang line is not made executable.
+ source = self.tmpdir / 'source'
+ source.mkdir()
+ (source / '__main__.py').touch()
+ target = self.tmpdir / 'source.pyz'
+ zipapp.create_archive(source, target)
+ return target
+
+ def test_cmdline_create(self):
+ # Test the basic command line API.
+ source = self.tmpdir / 'source'
+ source.mkdir()
+ (source / '__main__.py').touch()
+ args = [str(source)]
+ zipapp.main(args)
+ target = source.with_suffix('.pyz')
+ self.assertTrue(target.is_file())
+
+ def test_cmdline_copy(self):
+ # Test copying an archive.
+ original = self.make_archive()
+ target = self.tmpdir / 'target.pyz'
+ args = [str(original), '-o', str(target)]
+ zipapp.main(args)
+ self.assertTrue(target.is_file())
+
+ def test_cmdline_copy_inplace(self):
+ # Test copying an archive in place fails.
+ original = self.make_archive()
+ target = self.tmpdir / 'target.pyz'
+ args = [str(original), '-o', str(original)]
+ with self.assertRaises(SystemExit) as cm:
+ zipapp.main(args)
+ # Program should exit with a non-zero returm code.
+ self.assertTrue(cm.exception.code)
+
+ def test_cmdline_copy_change_main(self):
+ # Test copying an archive doesn't allow changing __main__.py.
+ original = self.make_archive()
+ target = self.tmpdir / 'target.pyz'
+ args = [str(original), '-o', str(target), '-m', 'foo:bar']
+ with self.assertRaises(SystemExit) as cm:
+ zipapp.main(args)
+ # Program should exit with a non-zero returm code.
+ self.assertTrue(cm.exception.code)
+
+ @patch('sys.stdout', new_callable=io.StringIO)
+ def test_info_command(self, mock_stdout):
+ # Test the output of the info command.
+ target = self.make_archive()
+ args = [str(target), '--info']
+ with self.assertRaises(SystemExit) as cm:
+ zipapp.main(args)
+ # Program should exit with a zero returm code.
+ self.assertEqual(cm.exception.code, 0)
+ self.assertEqual(mock_stdout.getvalue(), "Interpreter: <none>\n")
+
+ def test_info_error(self):
+ # Test the info command fails when the archive does not exist.
+ target = self.tmpdir / 'dummy.pyz'
+ args = [str(target), '--info']
+ with self.assertRaises(SystemExit) as cm:
+ zipapp.main(args)
+ # Program should exit with a non-zero returm code.
+ self.assertTrue(cm.exception.code)
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/Lib/test/test_zipfile.py b/Lib/test/test_zipfile.py
index 4bdf7d4f7e..d278e06a45 100644
--- a/Lib/test/test_zipfile.py
+++ b/Lib/test/test_zipfile.py
@@ -330,6 +330,37 @@ class AbstractTestsWithSourceFile:
while zipopen.read1(100):
pass
+ def test_repr(self):
+ fname = 'file.name'
+ for f in get_files(self):
+ with zipfile.ZipFile(f, 'w', self.compression) as zipfp:
+ zipfp.write(TESTFN, fname)
+ r = repr(zipfp)
+ self.assertIn("mode='w'", r)
+
+ with zipfile.ZipFile(f, 'r') as zipfp:
+ r = repr(zipfp)
+ if isinstance(f, str):
+ self.assertIn('filename=%r' % f, r)
+ else:
+ self.assertIn('file=%r' % f, r)
+ self.assertIn("mode='r'", r)
+ r = repr(zipfp.getinfo(fname))
+ self.assertIn('filename=%r' % fname, r)
+ self.assertIn('filemode=', r)
+ self.assertIn('file_size=', r)
+ if self.compression != zipfile.ZIP_STORED:
+ self.assertIn('compress_type=', r)
+ self.assertIn('compress_size=', r)
+ with zipfp.open(fname) as zipopen:
+ r = repr(zipopen)
+ self.assertIn('name=%r' % fname, r)
+ self.assertIn("mode='r'", r)
+ if self.compression != zipfile.ZIP_STORED:
+ self.assertIn('compress_type=', r)
+ self.assertIn('[closed]', repr(zipopen))
+ self.assertIn('[closed]', repr(zipfp))
+
def tearDown(self):
unlink(TESTFN)
unlink(TESTFN2)
@@ -665,7 +696,7 @@ class PyZipFileTests(unittest.TestCase):
self.requiresWriteAccess(os.path.dirname(__file__))
with TemporaryFile() as t, zipfile.PyZipFile(t, "w") as zipfp:
fn = __file__
- if fn.endswith('.pyc') or fn.endswith('.pyo'):
+ if fn.endswith('.pyc'):
path_split = fn.split(os.sep)
if os.altsep is not None:
path_split.extend(fn.split(os.altsep))
@@ -682,7 +713,7 @@ class PyZipFileTests(unittest.TestCase):
with TemporaryFile() as t, zipfile.PyZipFile(t, "w") as zipfp:
fn = __file__
- if fn.endswith(('.pyc', '.pyo')):
+ if fn.endswith('.pyc'):
fn = fn[:-1]
zipfp.writepy(fn, "testpackage")
@@ -739,10 +770,8 @@ class PyZipFileTests(unittest.TestCase):
import email
packagedir = os.path.dirname(email.__file__)
self.requiresWriteAccess(packagedir)
- # use .pyc if running test in optimization mode,
- # use .pyo if running test in debug mode
optlevel = 1 if __debug__ else 0
- ext = '.pyo' if optlevel == 1 else '.pyc'
+ ext = '.pyc'
with TemporaryFile() as t, \
zipfile.PyZipFile(t, "w", optimize=optlevel) as zipfp:
@@ -816,11 +845,10 @@ class PyZipFileTests(unittest.TestCase):
self.assertIn("SyntaxError", s.getvalue())
# as it will not have compiled the python file, it will
- # include the .py file not .pyc or .pyo
+ # include the .py file not .pyc
names = zipfp.namelist()
self.assertIn('mod1.py', names)
self.assertNotIn('mod1.pyc', names)
- self.assertNotIn('mod1.pyo', names)
finally:
rmtree(TESTFN2)
@@ -1081,6 +1109,19 @@ class OtherTests(unittest.TestCase):
self.assertEqual(zf.filelist[0].filename, "foo.txt")
self.assertEqual(zf.filelist[1].filename, "\xf6.txt")
+ def test_exclusive_create_zip_file(self):
+ """Test exclusive creating a new zipfile."""
+ unlink(TESTFN2)
+ filename = 'testfile.txt'
+ content = b'hello, world. this is some content.'
+ with zipfile.ZipFile(TESTFN2, "x", zipfile.ZIP_STORED) as zipfp:
+ zipfp.writestr(filename, content)
+ with self.assertRaises(FileExistsError):
+ zipfile.ZipFile(TESTFN2, "x", zipfile.ZIP_STORED)
+ with zipfile.ZipFile(TESTFN2, "r") as zipfp:
+ self.assertEqual(zipfp.namelist(), [filename])
+ self.assertEqual(zipfp.read(filename), content)
+
def test_create_non_existent_file_for_append(self):
if os.path.exists(TESTFN):
os.unlink(TESTFN)
@@ -1655,6 +1696,72 @@ class LzmaTestsWithRandomBinaryFiles(AbstractTestsWithRandomBinaryFiles,
compression = zipfile.ZIP_LZMA
+# Privide the tell() method but not seek()
+class Tellable:
+ def __init__(self, fp):
+ self.fp = fp
+ self.offset = 0
+
+ def write(self, data):
+ n = self.fp.write(data)
+ self.offset += n
+ return n
+
+ def tell(self):
+ return self.offset
+
+ def flush(self):
+ self.fp.flush()
+
+class Unseekable:
+ def __init__(self, fp):
+ self.fp = fp
+
+ def write(self, data):
+ return self.fp.write(data)
+
+ def flush(self):
+ self.fp.flush()
+
+class UnseekableTests(unittest.TestCase):
+ def test_writestr(self):
+ for wrapper in (lambda f: f), Tellable, Unseekable:
+ with self.subTest(wrapper=wrapper):
+ f = io.BytesIO()
+ f.write(b'abc')
+ bf = io.BufferedWriter(f)
+ with zipfile.ZipFile(wrapper(bf), 'w', zipfile.ZIP_STORED) as zipfp:
+ zipfp.writestr('ones', b'111')
+ zipfp.writestr('twos', b'222')
+ self.assertEqual(f.getvalue()[:5], b'abcPK')
+ with zipfile.ZipFile(f, mode='r') as zipf:
+ with zipf.open('ones') as zopen:
+ self.assertEqual(zopen.read(), b'111')
+ with zipf.open('twos') as zopen:
+ self.assertEqual(zopen.read(), b'222')
+
+ def test_write(self):
+ for wrapper in (lambda f: f), Tellable, Unseekable:
+ with self.subTest(wrapper=wrapper):
+ f = io.BytesIO()
+ f.write(b'abc')
+ bf = io.BufferedWriter(f)
+ with zipfile.ZipFile(wrapper(bf), 'w', zipfile.ZIP_STORED) as zipfp:
+ self.addCleanup(unlink, TESTFN)
+ with open(TESTFN, 'wb') as f2:
+ f2.write(b'111')
+ zipfp.write(TESTFN, 'ones')
+ with open(TESTFN, 'wb') as f2:
+ f2.write(b'222')
+ zipfp.write(TESTFN, 'twos')
+ self.assertEqual(f.getvalue()[:5], b'abcPK')
+ with zipfile.ZipFile(f, mode='r') as zipf:
+ with zipf.open('ones') as zopen:
+ self.assertEqual(zopen.read(), b'111')
+ with zipf.open('twos') as zopen:
+ self.assertEqual(zopen.read(), b'222')
+
+
@requires_zlib
class TestsWithMultipleOpens(unittest.TestCase):
@classmethod
@@ -1671,35 +1778,53 @@ class TestsWithMultipleOpens(unittest.TestCase):
def test_same_file(self):
# Verify that (when the ZipFile is in control of creating file objects)
# multiple open() calls can be made without interfering with each other.
- self.make_test_archive(TESTFN2)
- with zipfile.ZipFile(TESTFN2, mode="r") as zipf:
- with zipf.open('ones') as zopen1, zipf.open('ones') as zopen2:
- data1 = zopen1.read(500)
- data2 = zopen2.read(500)
- data1 += zopen1.read()
- data2 += zopen2.read()
- self.assertEqual(data1, data2)
- self.assertEqual(data1, self.data1)
+ for f in get_files(self):
+ self.make_test_archive(f)
+ with zipfile.ZipFile(f, mode="r") as zipf:
+ with zipf.open('ones') as zopen1, zipf.open('ones') as zopen2:
+ data1 = zopen1.read(500)
+ data2 = zopen2.read(500)
+ data1 += zopen1.read()
+ data2 += zopen2.read()
+ self.assertEqual(data1, data2)
+ self.assertEqual(data1, self.data1)
def test_different_file(self):
# Verify that (when the ZipFile is in control of creating file objects)
# multiple open() calls can be made without interfering with each other.
- self.make_test_archive(TESTFN2)
- with zipfile.ZipFile(TESTFN2, mode="r") as zipf:
- with zipf.open('ones') as zopen1, zipf.open('twos') as zopen2:
- data1 = zopen1.read(500)
- data2 = zopen2.read(500)
- data1 += zopen1.read()
- data2 += zopen2.read()
- self.assertEqual(data1, self.data1)
- self.assertEqual(data2, self.data2)
+ for f in get_files(self):
+ self.make_test_archive(f)
+ with zipfile.ZipFile(f, mode="r") as zipf:
+ with zipf.open('ones') as zopen1, zipf.open('twos') as zopen2:
+ data1 = zopen1.read(500)
+ data2 = zopen2.read(500)
+ data1 += zopen1.read()
+ data2 += zopen2.read()
+ self.assertEqual(data1, self.data1)
+ self.assertEqual(data2, self.data2)
def test_interleaved(self):
# Verify that (when the ZipFile is in control of creating file objects)
# multiple open() calls can be made without interfering with each other.
- self.make_test_archive(TESTFN2)
- with zipfile.ZipFile(TESTFN2, mode="r") as zipf:
- with zipf.open('ones') as zopen1, zipf.open('twos') as zopen2:
+ for f in get_files(self):
+ self.make_test_archive(f)
+ with zipfile.ZipFile(f, mode="r") as zipf:
+ with zipf.open('ones') as zopen1:
+ data1 = zopen1.read(500)
+ with zipf.open('twos') as zopen2:
+ data2 = zopen2.read(500)
+ data1 += zopen1.read()
+ data2 += zopen2.read()
+ self.assertEqual(data1, self.data1)
+ self.assertEqual(data2, self.data2)
+
+ def test_read_after_close(self):
+ for f in get_files(self):
+ self.make_test_archive(f)
+ with contextlib.ExitStack() as stack:
+ with zipfile.ZipFile(f, 'r') as zipf:
+ zopen1 = stack.enter_context(zipf.open('ones'))
+ zopen2 = stack.enter_context(zipf.open('twos'))
data1 = zopen1.read(500)
data2 = zopen2.read(500)
data1 += zopen1.read()
@@ -1707,43 +1832,32 @@ class TestsWithMultipleOpens(unittest.TestCase):
self.assertEqual(data1, self.data1)
self.assertEqual(data2, self.data2)
- def test_read_after_close(self):
- self.make_test_archive(TESTFN2)
- with contextlib.ExitStack() as stack:
- with zipfile.ZipFile(TESTFN2, 'r') as zipf:
- zopen1 = stack.enter_context(zipf.open('ones'))
- zopen2 = stack.enter_context(zipf.open('twos'))
- data1 = zopen1.read(500)
- data2 = zopen2.read(500)
- data1 += zopen1.read()
- data2 += zopen2.read()
- self.assertEqual(data1, self.data1)
- self.assertEqual(data2, self.data2)
-
def test_read_after_write(self):
- with zipfile.ZipFile(TESTFN2, 'w', zipfile.ZIP_DEFLATED) as zipf:
- zipf.writestr('ones', self.data1)
- zipf.writestr('twos', self.data2)
- with zipf.open('ones') as zopen1:
- data1 = zopen1.read(500)
- self.assertEqual(data1, self.data1[:500])
- with zipfile.ZipFile(TESTFN2, 'r') as zipf:
- data1 = zipf.read('ones')
- data2 = zipf.read('twos')
- self.assertEqual(data1, self.data1)
- self.assertEqual(data2, self.data2)
+ for f in get_files(self):
+ with zipfile.ZipFile(f, 'w', zipfile.ZIP_DEFLATED) as zipf:
+ zipf.writestr('ones', self.data1)
+ zipf.writestr('twos', self.data2)
+ with zipf.open('ones') as zopen1:
+ data1 = zopen1.read(500)
+ self.assertEqual(data1, self.data1[:500])
+ with zipfile.ZipFile(f, 'r') as zipf:
+ data1 = zipf.read('ones')
+ data2 = zipf.read('twos')
+ self.assertEqual(data1, self.data1)
+ self.assertEqual(data2, self.data2)
def test_write_after_read(self):
- with zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_DEFLATED) as zipf:
- zipf.writestr('ones', self.data1)
- with zipf.open('ones') as zopen1:
- zopen1.read(500)
- zipf.writestr('twos', self.data2)
- with zipfile.ZipFile(TESTFN2, 'r') as zipf:
- data1 = zipf.read('ones')
- data2 = zipf.read('twos')
- self.assertEqual(data1, self.data1)
- self.assertEqual(data2, self.data2)
+ for f in get_files(self):
+ with zipfile.ZipFile(f, "w", zipfile.ZIP_DEFLATED) as zipf:
+ zipf.writestr('ones', self.data1)
+ with zipf.open('ones') as zopen1:
+ zopen1.read(500)
+ zipf.writestr('twos', self.data2)
+ with zipfile.ZipFile(f, 'r') as zipf:
+ data1 = zipf.read('ones')
+ data2 = zipf.read('twos')
+ self.assertEqual(data1, self.data1)
+ self.assertEqual(data2, self.data2)
def test_many_opens(self):
# Verify that read() and open() promptly close the file descriptor,
diff --git a/Lib/test/test_zipfile64.py b/Lib/test/test_zipfile64.py
index 7dea8a3212..c29bd8d2ec 100644
--- a/Lib/test/test_zipfile64.py
+++ b/Lib/test/test_zipfile64.py
@@ -3,7 +3,7 @@
# from test_zipfile
from test import support
-# XXX(nnorwitz): disable this test by looking for extra largfile resource
+# XXX(nnorwitz): disable this test by looking for extralargefile resource,
# which doesn't exist. This test takes over 30 minutes to run in general
# and requires more disk space than most of the buildbots.
support.requires(
@@ -72,15 +72,19 @@ class TestsWithSourceFile(unittest.TestCase):
def testStored(self):
# Try the temp file first. If we do TESTFN2 first, then it hogs
# gigabytes of disk space for the duration of the test.
- for f in TemporaryFile(), TESTFN2:
+ with TemporaryFile() as f:
self.zipTest(f, zipfile.ZIP_STORED)
+ self.assertFalse(f.closed)
+ self.zipTest(TESTFN2, zipfile.ZIP_STORED)
@requires_zlib
def testDeflated(self):
# Try the temp file first. If we do TESTFN2 first, then it hogs
# gigabytes of disk space for the duration of the test.
- for f in TemporaryFile(), TESTFN2:
+ with TemporaryFile() as f:
self.zipTest(f, zipfile.ZIP_DEFLATED)
+ self.assertFalse(f.closed)
+ self.zipTest(TESTFN2, zipfile.ZIP_DEFLATED)
def tearDown(self):
for fname in TESTFN, TESTFN2:
diff --git a/Lib/test/test_zipimport.py b/Lib/test/test_zipimport.py
index 1e351c8c8a..0da5906f28 100644
--- a/Lib/test/test_zipimport.py
+++ b/Lib/test/test_zipimport.py
@@ -1,6 +1,7 @@
import sys
import os
import marshal
+import importlib
import importlib.util
import struct
import time
@@ -48,10 +49,11 @@ test_pyc = make_pyc(test_co, NOW, len(test_src))
TESTMOD = "ziptestmodule"
TESTPACK = "ziptestpackage"
TESTPACK2 = "ziptestpackage2"
+TEMP_DIR = os.path.abspath("junk95142")
TEMP_ZIP = os.path.abspath("junk95142.zip")
pyc_file = importlib.util.cache_from_source(TESTMOD + '.py')
-pyc_ext = ('.pyc' if __debug__ else '.pyo')
+pyc_ext = '.pyc'
class ImportHooksBaseTestCase(unittest.TestCase):
@@ -77,45 +79,64 @@ class UncompressedZipImportTestCase(ImportHooksBaseTestCase):
def setUp(self):
# We're reusing the zip archive path, so we must clear the
- # cached directory info and linecache
+ # cached directory info and linecache.
linecache.clearcache()
zipimport._zip_directory_cache.clear()
ImportHooksBaseTestCase.setUp(self)
- def doTest(self, expected_ext, files, *modules, **kw):
- z = ZipFile(TEMP_ZIP, "w")
- try:
+ def makeTree(self, files, dirName=TEMP_DIR):
+ # Create a filesystem based set of modules/packages
+ # defined by files under the directory dirName.
+ self.addCleanup(support.rmtree, dirName)
+
+ for name, (mtime, data) in files.items():
+ path = os.path.join(dirName, name)
+ if path[-1] == os.sep:
+ if not os.path.isdir(path):
+ os.makedirs(path)
+ else:
+ dname = os.path.dirname(path)
+ if not os.path.isdir(dname):
+ os.makedirs(dname)
+ with open(path, 'wb') as fp:
+ fp.write(data)
+
+ def makeZip(self, files, zipName=TEMP_ZIP, **kw):
+ # Create a zip archive based set of modules/packages
+ # defined by files in the zip file zipName. If the
+ # key 'stuff' exists in kw it is prepended to the archive.
+ self.addCleanup(support.unlink, zipName)
+
+ with ZipFile(zipName, "w") as z:
for name, (mtime, data) in files.items():
zinfo = ZipInfo(name, time.localtime(mtime))
zinfo.compress_type = self.compression
z.writestr(zinfo, data)
- z.close()
- stuff = kw.get("stuff", None)
- if stuff is not None:
- # Prepend 'stuff' to the start of the zipfile
- with open(TEMP_ZIP, "rb") as f:
- data = f.read()
- with open(TEMP_ZIP, "wb") as f:
- f.write(stuff)
- f.write(data)
+ stuff = kw.get("stuff", None)
+ if stuff is not None:
+ # Prepend 'stuff' to the start of the zipfile
+ with open(zipName, "rb") as f:
+ data = f.read()
+ with open(zipName, "wb") as f:
+ f.write(stuff)
+ f.write(data)
+
+ def doTest(self, expected_ext, files, *modules, **kw):
+ self.makeZip(files, **kw)
- sys.path.insert(0, TEMP_ZIP)
+ sys.path.insert(0, TEMP_ZIP)
- mod = __import__(".".join(modules), globals(), locals(),
- ["__dummy__"])
+ mod = importlib.import_module(".".join(modules))
- call = kw.get('call')
- if call is not None:
- call(mod)
+ call = kw.get('call')
+ if call is not None:
+ call(mod)
- if expected_ext:
- file = mod.get_file()
- self.assertEqual(file, os.path.join(TEMP_ZIP,
+ if expected_ext:
+ file = mod.get_file()
+ self.assertEqual(file, os.path.join(TEMP_ZIP,
*modules) + expected_ext)
- finally:
- z.close()
- os.remove(TEMP_ZIP)
def testAFakeZlib(self):
#
@@ -201,7 +222,9 @@ class UncompressedZipImportTestCase(ImportHooksBaseTestCase):
packdir + TESTMOD + pyc_ext: (NOW, test_pyc)}
self.doTest(pyc_ext, files, TESTPACK, TESTMOD)
- def testDeepPackage(self):
+ def testSubPackage(self):
+ # Test that subpackages function when loaded from zip
+ # archives.
packdir = TESTPACK + os.sep
packdir2 = packdir + TESTPACK2 + os.sep
files = {packdir + "__init__" + pyc_ext: (NOW, test_pyc),
@@ -209,6 +232,167 @@ class UncompressedZipImportTestCase(ImportHooksBaseTestCase):
packdir2 + TESTMOD + pyc_ext: (NOW, test_pyc)}
self.doTest(pyc_ext, files, TESTPACK, TESTPACK2, TESTMOD)
+ def testSubNamespacePackage(self):
+ # Test that implicit namespace subpackages function
+ # when loaded from zip archives.
+ packdir = TESTPACK + os.sep
+ packdir2 = packdir + TESTPACK2 + os.sep
+ # The first two files are just directory entries (so have no data).
+ files = {packdir: (NOW, ""),
+ packdir2: (NOW, ""),
+ packdir2 + TESTMOD + pyc_ext: (NOW, test_pyc)}
+ self.doTest(pyc_ext, files, TESTPACK, TESTPACK2, TESTMOD)
+
+ def testMixedNamespacePackage(self):
+ # Test implicit namespace packages spread between a
+ # real filesystem and a zip archive.
+ packdir = TESTPACK + os.sep
+ packdir2 = packdir + TESTPACK2 + os.sep
+ packdir3 = packdir2 + TESTPACK + '3' + os.sep
+ files1 = {packdir: (NOW, ""),
+ packdir + TESTMOD + pyc_ext: (NOW, test_pyc),
+ packdir2: (NOW, ""),
+ packdir3: (NOW, ""),
+ packdir3 + TESTMOD + pyc_ext: (NOW, test_pyc),
+ packdir2 + TESTMOD + '3' + pyc_ext: (NOW, test_pyc),
+ packdir2 + TESTMOD + pyc_ext: (NOW, test_pyc)}
+ files2 = {packdir: (NOW, ""),
+ packdir + TESTMOD + '2' + pyc_ext: (NOW, test_pyc),
+ packdir2: (NOW, ""),
+ packdir2 + TESTMOD + '2' + pyc_ext: (NOW, test_pyc),
+ packdir2 + TESTMOD + pyc_ext: (NOW, test_pyc)}
+
+ zip1 = os.path.abspath("path1.zip")
+ self.makeZip(files1, zip1)
+
+ zip2 = TEMP_DIR
+ self.makeTree(files2, zip2)
+
+ # zip2 should override zip1.
+ sys.path.insert(0, zip1)
+ sys.path.insert(0, zip2)
+
+ mod = importlib.import_module(TESTPACK)
+
+ # if TESTPACK is functioning as a namespace pkg then
+ # there should be two entries in the __path__.
+ # First should be path2 and second path1.
+ self.assertEqual(2, len(mod.__path__))
+ p1, p2 = mod.__path__
+ self.assertEqual(os.path.basename(TEMP_DIR), p1.split(os.sep)[-2])
+ self.assertEqual("path1.zip", p2.split(os.sep)[-2])
+
+ # packdir3 should import as a namespace package.
+ # Its __path__ is an iterable of 1 element from zip1.
+ mod = importlib.import_module(packdir3.replace(os.sep, '.')[:-1])
+ self.assertEqual(1, len(mod.__path__))
+ mpath = list(mod.__path__)[0].split('path1.zip' + os.sep)[1]
+ self.assertEqual(packdir3[:-1], mpath)
+
+ # TESTPACK/TESTMOD only exists in path1.
+ mod = importlib.import_module('.'.join((TESTPACK, TESTMOD)))
+ self.assertEqual("path1.zip", mod.__file__.split(os.sep)[-3])
+
+ # And TESTPACK/(TESTMOD + '2') only exists in path2.
+ mod = importlib.import_module('.'.join((TESTPACK, TESTMOD + '2')))
+ self.assertEqual(os.path.basename(TEMP_DIR),
+ mod.__file__.split(os.sep)[-3])
+
+ # One level deeper...
+ subpkg = '.'.join((TESTPACK, TESTPACK2))
+ mod = importlib.import_module(subpkg)
+ self.assertEqual(2, len(mod.__path__))
+ p1, p2 = mod.__path__
+ self.assertEqual(os.path.basename(TEMP_DIR), p1.split(os.sep)[-3])
+ self.assertEqual("path1.zip", p2.split(os.sep)[-3])
+
+ # subpkg.TESTMOD exists in both zips should load from zip2.
+ mod = importlib.import_module('.'.join((subpkg, TESTMOD)))
+ self.assertEqual(os.path.basename(TEMP_DIR),
+ mod.__file__.split(os.sep)[-4])
+
+ # subpkg.TESTMOD + '2' only exists in zip2.
+ mod = importlib.import_module('.'.join((subpkg, TESTMOD + '2')))
+ self.assertEqual(os.path.basename(TEMP_DIR),
+ mod.__file__.split(os.sep)[-4])
+
+ # Finally subpkg.TESTMOD + '3' only exists in zip1.
+ mod = importlib.import_module('.'.join((subpkg, TESTMOD + '3')))
+ self.assertEqual('path1.zip', mod.__file__.split(os.sep)[-4])
+
+ def testNamespacePackage(self):
+ # Test implicit namespace packages spread between multiple zip
+ # archives.
+ packdir = TESTPACK + os.sep
+ packdir2 = packdir + TESTPACK2 + os.sep
+ packdir3 = packdir2 + TESTPACK + '3' + os.sep
+ files1 = {packdir: (NOW, ""),
+ packdir + TESTMOD + pyc_ext: (NOW, test_pyc),
+ packdir2: (NOW, ""),
+ packdir3: (NOW, ""),
+ packdir3 + TESTMOD + pyc_ext: (NOW, test_pyc),
+ packdir2 + TESTMOD + '3' + pyc_ext: (NOW, test_pyc),
+ packdir2 + TESTMOD + pyc_ext: (NOW, test_pyc)}
+ zip1 = os.path.abspath("path1.zip")
+ self.makeZip(files1, zip1)
+
+ files2 = {packdir: (NOW, ""),
+ packdir + TESTMOD + '2' + pyc_ext: (NOW, test_pyc),
+ packdir2: (NOW, ""),
+ packdir2 + TESTMOD + '2' + pyc_ext: (NOW, test_pyc),
+ packdir2 + TESTMOD + pyc_ext: (NOW, test_pyc)}
+ zip2 = os.path.abspath("path2.zip")
+ self.makeZip(files2, zip2)
+
+ # zip2 should override zip1.
+ sys.path.insert(0, zip1)
+ sys.path.insert(0, zip2)
+
+ mod = importlib.import_module(TESTPACK)
+
+ # if TESTPACK is functioning as a namespace pkg then
+ # there should be two entries in the __path__.
+ # First should be path2 and second path1.
+ self.assertEqual(2, len(mod.__path__))
+ p1, p2 = mod.__path__
+ self.assertEqual("path2.zip", p1.split(os.sep)[-2])
+ self.assertEqual("path1.zip", p2.split(os.sep)[-2])
+
+ # packdir3 should import as a namespace package.
+ # Tts __path__ is an iterable of 1 element from zip1.
+ mod = importlib.import_module(packdir3.replace(os.sep, '.')[:-1])
+ self.assertEqual(1, len(mod.__path__))
+ mpath = list(mod.__path__)[0].split('path1.zip' + os.sep)[1]
+ self.assertEqual(packdir3[:-1], mpath)
+
+ # TESTPACK/TESTMOD only exists in path1.
+ mod = importlib.import_module('.'.join((TESTPACK, TESTMOD)))
+ self.assertEqual("path1.zip", mod.__file__.split(os.sep)[-3])
+
+ # And TESTPACK/(TESTMOD + '2') only exists in path2.
+ mod = importlib.import_module('.'.join((TESTPACK, TESTMOD + '2')))
+ self.assertEqual("path2.zip", mod.__file__.split(os.sep)[-3])
+
+ # One level deeper...
+ subpkg = '.'.join((TESTPACK, TESTPACK2))
+ mod = importlib.import_module(subpkg)
+ self.assertEqual(2, len(mod.__path__))
+ p1, p2 = mod.__path__
+ self.assertEqual("path2.zip", p1.split(os.sep)[-3])
+ self.assertEqual("path1.zip", p2.split(os.sep)[-3])
+
+ # subpkg.TESTMOD exists in both zips should load from zip2.
+ mod = importlib.import_module('.'.join((subpkg, TESTMOD)))
+ self.assertEqual('path2.zip', mod.__file__.split(os.sep)[-4])
+
+ # subpkg.TESTMOD + '2' only exists in zip2.
+ mod = importlib.import_module('.'.join((subpkg, TESTMOD + '2')))
+ self.assertEqual('path2.zip', mod.__file__.split(os.sep)[-4])
+
+ # Finally subpkg.TESTMOD + '3' only exists in zip1.
+ mod = importlib.import_module('.'.join((subpkg, TESTMOD + '3')))
+ self.assertEqual('path1.zip', mod.__file__.split(os.sep)[-4])
+
def testZipImporterMethods(self):
packdir = TESTPACK + os.sep
packdir2 = packdir + TESTPACK2 + os.sep
@@ -231,7 +415,7 @@ class UncompressedZipImportTestCase(ImportHooksBaseTestCase):
mod = zi.load_module(TESTPACK)
self.assertEqual(zi.get_filename(TESTPACK), mod.__file__)
- existing_pack_path = __import__(TESTPACK).__path__[0]
+ existing_pack_path = importlib.import_module(TESTPACK).__path__[0]
expected_path_path = os.path.join(TEMP_ZIP, TESTPACK)
self.assertEqual(existing_pack_path, expected_path_path)
@@ -241,8 +425,8 @@ class UncompressedZipImportTestCase(ImportHooksBaseTestCase):
mod_path = packdir2 + TESTMOD
mod_name = module_path_to_dotted_name(mod_path)
- __import__(mod_name)
- mod = sys.modules[mod_name]
+ mod = importlib.import_module(mod_name)
+ self.assertTrue(mod_name in sys.modules)
self.assertEqual(zi.get_source(TESTPACK), None)
self.assertEqual(zi.get_source(mod_path), None)
self.assertEqual(zi.get_filename(mod_path), mod.__file__)
@@ -289,13 +473,13 @@ class UncompressedZipImportTestCase(ImportHooksBaseTestCase):
mod_path = TESTPACK2 + os.sep + TESTMOD
mod_name = module_path_to_dotted_name(mod_path)
- __import__(mod_name)
- mod = sys.modules[mod_name]
+ mod = importlib.import_module(mod_name)
+ self.assertTrue(mod_name in sys.modules)
self.assertEqual(zi.get_source(TESTPACK2), None)
self.assertEqual(zi.get_source(mod_path), None)
self.assertEqual(zi.get_filename(mod_path), mod.__file__)
# To pass in the module name instead of the path, we must use the
- # right importer
+ # right importer.
loader = mod.__loader__
self.assertEqual(loader.get_source(mod_name), None)
self.assertEqual(loader.get_filename(mod_name), mod.__file__)
@@ -450,7 +634,9 @@ class BadFileZipImportTestCase(unittest.TestCase):
fd = os.open(TESTMOD, os.O_CREAT, 000)
try:
os.close(fd)
- self.assertZipFailure(TESTMOD)
+
+ with self.assertRaises(zipimport.ZipImportError) as cm:
+ zipimport.zipimporter(TESTMOD)
finally:
# If we leave "the read-only bit" set on Windows, nothing can
# delete TESTMOD, and later tests suffer bogus failures.
diff --git a/Lib/test/test_zipimport_support.py b/Lib/test/test_zipimport_support.py
index 66c35578e2..5913622f56 100644
--- a/Lib/test/test_zipimport_support.py
+++ b/Lib/test/test_zipimport_support.py
@@ -14,8 +14,8 @@ import inspect
import linecache
import pdb
import unittest
-from test.script_helper import (spawn_python, kill_python, assert_python_ok,
- temp_dir, make_script, make_zip_script)
+from test.support.script_helper import (spawn_python, kill_python, assert_python_ok,
+ make_script, make_zip_script)
verbose = test.support.verbose
@@ -39,7 +39,7 @@ def _run_object_doctest(obj, module):
# Use the object's fully qualified name if it has one
# Otherwise, use the module's name
try:
- name = "%s.%s" % (obj.__module__, obj.__name__)
+ name = "%s.%s" % (obj.__module__, obj.__qualname__)
except AttributeError:
name = module.__name__
for example in finder.find(obj, name, module):
@@ -78,7 +78,7 @@ class ZipSupportTests(unittest.TestCase):
def test_inspect_getsource_issue4223(self):
test_src = "def foo(): pass\n"
- with temp_dir() as d:
+ with test.support.temp_dir() as d:
init_name = make_script(d, '__init__', test_src)
name_in_zip = os.path.join('zip_pkg',
os.path.basename(init_name))
@@ -118,7 +118,7 @@ class ZipSupportTests(unittest.TestCase):
mod_name = mod_name.replace("sample_", "sample_zipped_")
sample_sources[mod_name] = src
- with temp_dir() as d:
+ with test.support.temp_dir() as d:
script_name = make_script(d, 'test_zipped_doctest',
test_src)
zip_name, run_name = make_zip_script(d, 'test_zip',
@@ -195,7 +195,7 @@ class ZipSupportTests(unittest.TestCase):
doctest.testmod()
""")
pattern = 'File "%s", line 2, in %s'
- with temp_dir() as d:
+ with test.support.temp_dir() as d:
script_name = make_script(d, 'script', test_src)
rc, out, err = assert_python_ok(script_name)
expected = pattern % (script_name, "__main__.Test")
@@ -222,7 +222,7 @@ class ZipSupportTests(unittest.TestCase):
import pdb
pdb.Pdb(nosigint=True).runcall(f)
""")
- with temp_dir() as d:
+ with test.support.temp_dir() as d:
script_name = make_script(d, 'script', test_src)
p = spawn_python(script_name)
p.stdin.write(b'l\n')
@@ -238,9 +238,8 @@ class ZipSupportTests(unittest.TestCase):
self.assertIn(os.path.normcase(run_name.encode('utf-8')), data)
-def test_main():
- test.support.run_unittest(ZipSupportTests)
+def tearDownModule():
test.support.reap_children()
if __name__ == '__main__':
- test_main()
+ unittest.main()
diff --git a/Lib/test/test_zlib.py b/Lib/test/test_zlib.py
index e1575c4252..78ecade950 100644
--- a/Lib/test/test_zlib.py
+++ b/Lib/test/test_zlib.py
@@ -47,16 +47,11 @@ class ChecksumTestCase(unittest.TestCase):
self.assertEqual(zlib.adler32(b"", 1), 1)
self.assertEqual(zlib.adler32(b"", 432), 432)
- def assertEqual32(self, seen, expected):
- # 32-bit values masked -- checksums on 32- vs 64- bit machines
- # This is important if bit 31 (0x08000000L) is set.
- self.assertEqual(seen & 0x0FFFFFFFF, expected & 0x0FFFFFFFF)
-
def test_penguins(self):
- self.assertEqual32(zlib.crc32(b"penguin", 0), 0x0e5c1a120)
- self.assertEqual32(zlib.crc32(b"penguin", 1), 0x43b6aa94)
- self.assertEqual32(zlib.adler32(b"penguin", 0), 0x0bcf02f6)
- self.assertEqual32(zlib.adler32(b"penguin", 1), 0x0bd602f7)
+ self.assertEqual(zlib.crc32(b"penguin", 0), 0x0e5c1a120)
+ self.assertEqual(zlib.crc32(b"penguin", 1), 0x43b6aa94)
+ self.assertEqual(zlib.adler32(b"penguin", 0), 0x0bcf02f6)
+ self.assertEqual(zlib.adler32(b"penguin", 1), 0x0bd602f7)
self.assertEqual(zlib.crc32(b"penguin"), zlib.crc32(b"penguin", 0))
self.assertEqual(zlib.adler32(b"penguin"),zlib.adler32(b"penguin",1))
@@ -122,11 +117,17 @@ class ExceptionTestCase(unittest.TestCase):
self.assertRaises(ValueError, zlib.decompressobj().flush, 0)
self.assertRaises(ValueError, zlib.decompressobj().flush, -1)
+ @support.cpython_only
+ def test_overflow(self):
+ with self.assertRaisesRegex(OverflowError, 'int too large'):
+ zlib.decompress(b'', 15, sys.maxsize + 1)
+ with self.assertRaisesRegex(OverflowError, 'int too large'):
+ zlib.decompressobj().flush(sys.maxsize + 1)
+
class BaseCompressTestCase(object):
def check_big_compress_buffer(self, size, compress_func):
_1M = 1024 * 1024
- fmt = "%%0%dx" % (2 * _1M)
# Generate 10MB worth of random, and expand it by repeating it.
# The assumption is that zlib's memory is not big enough to exploit
# such spread out redundancy.
@@ -170,7 +171,7 @@ class CompressTestCase(BaseCompressTestCase, unittest.TestCase):
self.assertEqual(zlib.decompress(ob), data)
def test_incomplete_stream(self):
- # An useful error message is given
+ # A useful error message is given
x = zlib.compress(HAMLET_SCENE)
self.assertRaisesRegex(zlib.error,
"Error -5 while decompressing data: incomplete or truncated stream",
@@ -196,6 +197,18 @@ class CompressTestCase(BaseCompressTestCase, unittest.TestCase):
finally:
data = None
+ @bigmemtest(size=_4G, memuse=1)
+ def test_large_bufsize(self, size):
+ # Test decompress(bufsize) parameter greater than the internal limit
+ data = HAMLET_SCENE * 10
+ compressed = zlib.compress(data, 1)
+ self.assertEqual(zlib.decompress(compressed, 15, size), data)
+
+ def test_custom_bufsize(self):
+ data = HAMLET_SCENE * 10
+ compressed = zlib.compress(data, 1)
+ self.assertEqual(zlib.decompress(compressed, 15, CustomInt()), data)
+
class CompressObjectTestCase(BaseCompressTestCase, unittest.TestCase):
# Test compression object
@@ -364,6 +377,21 @@ class CompressObjectTestCase(BaseCompressTestCase, unittest.TestCase):
self.assertRaises(ValueError, dco.decompress, b"", -1)
self.assertEqual(b'', dco.unconsumed_tail)
+ def test_maxlen_large(self):
+ # Sizes up to sys.maxsize should be accepted, although zlib is
+ # internally limited to expressing sizes with unsigned int
+ data = HAMLET_SCENE * 10
+ self.assertGreater(len(data), zlib.DEF_BUF_SIZE)
+ compressed = zlib.compress(data, 1)
+ dco = zlib.decompressobj()
+ self.assertEqual(dco.decompress(compressed, sys.maxsize), data)
+
+ def test_maxlen_custom(self):
+ data = HAMLET_SCENE * 10
+ compressed = zlib.compress(data, 1)
+ dco = zlib.decompressobj()
+ self.assertEqual(dco.decompress(compressed, CustomInt()), data[:100])
+
def test_clear_unconsumed_tail(self):
# Issue #12050: calling decompress() without providing max_length
# should clear the unconsumed_tail attribute.
@@ -525,6 +553,15 @@ class CompressObjectTestCase(BaseCompressTestCase, unittest.TestCase):
self.assertEqual(dco.unconsumed_tail, b'')
self.assertEqual(dco.unused_data, remainder)
+ # issue27164
+ def test_decompress_raw_with_dictionary(self):
+ zdict = b'abcdefghijklmnopqrstuvwxyz'
+ co = zlib.compressobj(wbits=-zlib.MAX_WBITS, zdict=zdict)
+ comp = co.compress(zdict) + co.flush()
+ dco = zlib.decompressobj(wbits=-zlib.MAX_WBITS, zdict=zdict)
+ uncomp = dco.decompress(comp) + dco.flush()
+ self.assertEqual(zdict, uncomp)
+
def test_flush_with_freed_input(self):
# Issue #16411: decompressor accesses input to last decompress() call
# in flush(), even if this object has been freed in the meanwhile.
@@ -537,6 +574,22 @@ class CompressObjectTestCase(BaseCompressTestCase, unittest.TestCase):
data = zlib.compress(input2)
self.assertEqual(dco.flush(), input1[1:])
+ @bigmemtest(size=_4G, memuse=1)
+ def test_flush_large_length(self, size):
+ # Test flush(length) parameter greater than internal limit UINT_MAX
+ input = HAMLET_SCENE * 10
+ data = zlib.compress(input, 1)
+ dco = zlib.decompressobj()
+ dco.decompress(data, 1)
+ self.assertEqual(dco.flush(size), input[1:])
+
+ def test_flush_custom_length(self):
+ input = HAMLET_SCENE * 10
+ data = zlib.compress(input, 1)
+ dco = zlib.decompressobj()
+ dco.decompress(data, 1)
+ self.assertEqual(dco.flush(CustomInt()), input[1:])
+
@requires_Compress_copy
def test_compresscopy(self):
# Test copying a compression object
@@ -636,6 +689,58 @@ class CompressObjectTestCase(BaseCompressTestCase, unittest.TestCase):
finally:
data = None
+ def test_wbits(self):
+ # wbits=0 only supported since zlib v1.2.3.5
+ # Register "1.2.3" as "1.2.3.0"
+ v = (zlib.ZLIB_RUNTIME_VERSION + ".0").split(".", 4)
+ supports_wbits_0 = int(v[0]) > 1 or int(v[0]) == 1 \
+ and (int(v[1]) > 2 or int(v[1]) == 2
+ and (int(v[2]) > 3 or int(v[2]) == 3 and int(v[3]) >= 5))
+
+ co = zlib.compressobj(level=1, wbits=15)
+ zlib15 = co.compress(HAMLET_SCENE) + co.flush()
+ self.assertEqual(zlib.decompress(zlib15, 15), HAMLET_SCENE)
+ if supports_wbits_0:
+ self.assertEqual(zlib.decompress(zlib15, 0), HAMLET_SCENE)
+ self.assertEqual(zlib.decompress(zlib15, 32 + 15), HAMLET_SCENE)
+ with self.assertRaisesRegex(zlib.error, 'invalid window size'):
+ zlib.decompress(zlib15, 14)
+ dco = zlib.decompressobj(wbits=32 + 15)
+ self.assertEqual(dco.decompress(zlib15), HAMLET_SCENE)
+ dco = zlib.decompressobj(wbits=14)
+ with self.assertRaisesRegex(zlib.error, 'invalid window size'):
+ dco.decompress(zlib15)
+
+ co = zlib.compressobj(level=1, wbits=9)
+ zlib9 = co.compress(HAMLET_SCENE) + co.flush()
+ self.assertEqual(zlib.decompress(zlib9, 9), HAMLET_SCENE)
+ self.assertEqual(zlib.decompress(zlib9, 15), HAMLET_SCENE)
+ if supports_wbits_0:
+ self.assertEqual(zlib.decompress(zlib9, 0), HAMLET_SCENE)
+ self.assertEqual(zlib.decompress(zlib9, 32 + 9), HAMLET_SCENE)
+ dco = zlib.decompressobj(wbits=32 + 9)
+ self.assertEqual(dco.decompress(zlib9), HAMLET_SCENE)
+
+ co = zlib.compressobj(level=1, wbits=-15)
+ deflate15 = co.compress(HAMLET_SCENE) + co.flush()
+ self.assertEqual(zlib.decompress(deflate15, -15), HAMLET_SCENE)
+ dco = zlib.decompressobj(wbits=-15)
+ self.assertEqual(dco.decompress(deflate15), HAMLET_SCENE)
+
+ co = zlib.compressobj(level=1, wbits=-9)
+ deflate9 = co.compress(HAMLET_SCENE) + co.flush()
+ self.assertEqual(zlib.decompress(deflate9, -9), HAMLET_SCENE)
+ self.assertEqual(zlib.decompress(deflate9, -15), HAMLET_SCENE)
+ dco = zlib.decompressobj(wbits=-9)
+ self.assertEqual(dco.decompress(deflate9), HAMLET_SCENE)
+
+ co = zlib.compressobj(level=1, wbits=16 + 15)
+ gzip = co.compress(HAMLET_SCENE) + co.flush()
+ self.assertEqual(zlib.decompress(gzip, 16 + 15), HAMLET_SCENE)
+ self.assertEqual(zlib.decompress(gzip, 32 + 15), HAMLET_SCENE)
+ dco = zlib.decompressobj(32 + 15)
+ self.assertEqual(dco.decompress(gzip), HAMLET_SCENE)
+
def genblock(seed, length, step=1024, generator=random):
"""length-byte stream of random data from a seed (in step-byte blocks)."""
@@ -725,16 +830,10 @@ LAERTES
"""
-def test_main():
- support.run_unittest(
- VersionTestCase,
- ChecksumTestCase,
- ChecksumBigBufferTestCase,
- ExceptionTestCase,
- CompressTestCase,
- CompressObjectTestCase
- )
+class CustomInt:
+ def __int__(self):
+ return 100
+
if __name__ == "__main__":
- unittest.main() # XXX
- ###test_main()
+ unittest.main()
diff --git a/Lib/test/tf_inherit_check.py b/Lib/test/tf_inherit_check.py
index afe50d2325..138f25a858 100644
--- a/Lib/test/tf_inherit_check.py
+++ b/Lib/test/tf_inherit_check.py
@@ -4,22 +4,24 @@
import sys
import os
+from test.support import SuppressCrashReport
-verbose = (sys.argv[1] == 'v')
-try:
- fd = int(sys.argv[2])
-
+with SuppressCrashReport():
+ verbose = (sys.argv[1] == 'v')
try:
- os.write(fd, b"blat")
- except OSError:
- # Success -- could not write to fd.
- sys.exit(0)
- else:
+ fd = int(sys.argv[2])
+
+ try:
+ os.write(fd, b"blat")
+ except OSError:
+ # Success -- could not write to fd.
+ sys.exit(0)
+ else:
+ if verbose:
+ sys.stderr.write("fd %d is open in child" % fd)
+ sys.exit(1)
+
+ except Exception:
if verbose:
- sys.stderr.write("fd %d is open in child" % fd)
+ raise
sys.exit(1)
-
-except Exception:
- if verbose:
- raise
- sys.exit(1)
diff --git a/Lib/test/tokenize_tests-latin1-coding-cookie-and-utf8-bom-sig.txt b/Lib/test/tokenize_tests-latin1-coding-cookie-and-utf8-bom-sig.txt
index 2f53718dac..dc7c5f060a 100644
--- a/Lib/test/tokenize_tests-latin1-coding-cookie-and-utf8-bom-sig.txt
+++ b/Lib/test/tokenize_tests-latin1-coding-cookie-and-utf8-bom-sig.txt
@@ -2,7 +2,7 @@
# IMPORTANT: this file has the utf-8 BOM signature '\xef\xbb\xbf'
# at the start of it. Make sure this is preserved if any changes
# are made! Also note that the coding cookie above conflicts with
-# the presense of a utf-8 BOM signature -- this is intended.
+# the presence of a utf-8 BOM signature -- this is intended.
# Arbitrary encoded utf-8 text (stolen from test_doctest2.py).
x = 'ЉЊЈÐЂ'
diff --git a/Lib/test/wrongcert.pem b/Lib/test/wrongcert.pem
new file mode 100644
index 0000000000..5f92f9bce7
--- /dev/null
+++ b/Lib/test/wrongcert.pem
@@ -0,0 +1,32 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXAIBAAKBgQC89ZNxjTgWgq7Z1g0tJ65w+k7lNAj5IgjLb155UkUrz0XsHDnH
+FlbsVUg2Xtk6+bo2UEYIzN7cIm5ImpmyW/2z0J1IDVDlvR2xJ659xrE0v5c2cB6T
+f9lnNTwpSoeK24Nd7Jwq4j9vk95fLrdqsBq0/KVlsCXeixS/CaqqduXfvwIDAQAB
+AoGAQFko4uyCgzfxr4Ezb4Mp5pN3Npqny5+Jey3r8EjSAX9Ogn+CNYgoBcdtFgbq
+1yif/0sK7ohGBJU9FUCAwrqNBI9ZHB6rcy7dx+gULOmRBGckln1o5S1+smVdmOsW
+7zUVLBVByKuNWqTYFlzfVd6s4iiXtAE2iHn3GCyYdlICwrECQQDhMQVxHd3EFbzg
+SFmJBTARlZ2GKA3c1g/h9/XbkEPQ9/RwI3vnjJ2RaSnjlfoLl8TOcf0uOGbOEyFe
+19RvCLXjAkEA1s+UE5ziF+YVkW3WolDCQ2kQ5WG9+ccfNebfh6b67B7Ln5iG0Sbg
+ky9cjsO3jbMJQtlzAQnH1850oRD5Gi51dQJAIbHCDLDZU9Ok1TI+I2BhVuA6F666
+lEZ7TeZaJSYq34OaUYUdrwG9OdqwZ9sy9LUav4ESzu2lhEQchCJrKMn23QJAReqs
+ZLHUeTjfXkVk7dHhWPWSlUZ6AhmIlA/AQ7Payg2/8wM/JkZEJEPvGVykms9iPUrv
+frADRr+hAGe43IewnQJBAJWKZllPgKuEBPwoEldHNS8nRu61D7HzxEzQ2xnfj+Nk
+2fgf1MAzzTRsikfGENhVsVWeqOcijWb6g5gsyCmlRpc=
+-----END RSA PRIVATE KEY-----
+-----BEGIN CERTIFICATE-----
+MIICsDCCAhmgAwIBAgIJAOqYOYFJfEEoMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV
+BAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX
+aWRnaXRzIFB0eSBMdGQwHhcNMDgwNjI2MTgxNTUyWhcNMDkwNjI2MTgxNTUyWjBF
+MQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50
+ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKB
+gQC89ZNxjTgWgq7Z1g0tJ65w+k7lNAj5IgjLb155UkUrz0XsHDnHFlbsVUg2Xtk6
++bo2UEYIzN7cIm5ImpmyW/2z0J1IDVDlvR2xJ659xrE0v5c2cB6Tf9lnNTwpSoeK
+24Nd7Jwq4j9vk95fLrdqsBq0/KVlsCXeixS/CaqqduXfvwIDAQABo4GnMIGkMB0G
+A1UdDgQWBBTctMtI3EO9OjLI0x9Zo2ifkwIiNjB1BgNVHSMEbjBsgBTctMtI3EO9
+OjLI0x9Zo2ifkwIiNqFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUt
+U3RhdGUxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAOqYOYFJ
+fEEoMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAQwa7jya/DfhaDn7E
+usPkpgIX8WCL2B1SqnRTXEZfBPPVq/cUmFGyEVRVATySRuMwi8PXbVcOhXXuocA+
+43W+iIsD9pXapCZhhOerCq18TC1dWK98vLUsoK8PMjB6e5H/O8bqojv0EeC+fyCw
+eSHj5jpC8iZKjCHBn+mAi4cQ514=
+-----END CERTIFICATE-----
diff --git a/Lib/textwrap.py b/Lib/textwrap.py
index 1759b0d7cf..05e030673a 100644
--- a/Lib/textwrap.py
+++ b/Lib/textwrap.py
@@ -79,10 +79,25 @@ class TextWrapper:
# splits into
# Hello/ /there/ /--/ /you/ /goof-/ball,/ /use/ /the/ /-b/ /option!
# (after stripping out empty strings).
- wordsep_re = re.compile(
- r'(\s+|' # any whitespace
- r'[^\s\w]*\w+[^0-9\W]-(?=\w+[^0-9\W])|' # hyphenated words
- r'(?<=[\w\!\"\'\&\.\,\?])-{2,}(?=\w))') # em-dash
+ word_punct = r'[\w!"\'&.,?]'
+ letter = r'[^\d\W]'
+ wordsep_re = re.compile(r'''
+ ( # any whitespace
+ \s+
+ | # em-dash between words
+ (?<=%(wp)s) -{2,} (?=\w)
+ | # word, possibly hyphenated
+ \S+? (?:
+ # hyphenated word
+ -(?: (?<=%(lt)s{2}-) | (?<=%(lt)s-%(lt)s-))
+ (?= %(lt)s -? %(lt)s)
+ | # end of word
+ (?=\s|\Z)
+ | # em-dash
+ (?<=%(wp)s) (?=-{2,}\w)
+ )
+ )''' % {'wp': word_punct, 'lt': letter}, re.VERBOSE)
+ del word_punct, letter
# This less funky little regex just split on recognized spaces. E.g.
# "Hello there -- you goof-ball, use the -b option!"
diff --git a/Lib/threading.py b/Lib/threading.py
index 56a4060337..c9f8cb64ee 100644
--- a/Lib/threading.py
+++ b/Lib/threading.py
@@ -3,10 +3,7 @@
import sys as _sys
import _thread
-try:
- from time import monotonic as _time
-except ImportError:
- from time import time as _time
+from time import monotonic as _time
from traceback import format_exc as _format_exc
from _weakrefset import WeakSet
from itertools import islice as _islice, count as _count
@@ -106,8 +103,14 @@ class _RLock:
owner = _active[owner].name
except KeyError:
pass
- return "<%s owner=%r count=%d>" % (
- self.__class__.__name__, owner, self._count)
+ return "<%s %s.%s object owner=%r count=%d at %s>" % (
+ "locked" if self._block.locked() else "unlocked",
+ self.__class__.__module__,
+ self.__class__.__qualname__,
+ owner,
+ self._count,
+ hex(id(self))
+ )
def acquire(self, blocking=True, timeout=-1):
"""Acquire a lock, blocking or non-blocking.
@@ -918,7 +921,7 @@ class Thread:
# self.
if _sys and _sys.stderr is not None:
print("Exception in thread %s:\n%s" %
- (self.name, _format_exc()), file=self._stderr)
+ (self.name, _format_exc()), file=_sys.stderr)
elif self._stderr is not None:
# Do the best job possible w/o a huge amt. of code to
# approximate a traceback (code ideas from
@@ -1058,7 +1061,7 @@ class Thread:
# Issue #18808: wait for the thread state to be gone.
# At the end of the thread's life, after all knowledge of the thread
# is removed from C data structures, C code releases our _tstate_lock.
- # This method passes its arguments to _tstate_lock.aquire().
+ # This method passes its arguments to _tstate_lock.acquire().
# If the lock is acquired, the C code is done, and self._stop() is
# called. That sets ._is_stopped to True, and ._tstate_lock to None.
lock = self._tstate_lock
diff --git a/Lib/timeit.py b/Lib/timeit.py
index 0b1c601c97..2de88f7271 100755
--- a/Lib/timeit.py
+++ b/Lib/timeit.py
@@ -20,6 +20,7 @@ Options:
-t/--time: use time.time() (deprecated)
-c/--clock: use time.clock() (deprecated)
-v/--verbose: print raw timing results; repeat for more digits precision
+ -u/--unit: set the output time unit (usec, msec, or sec)
-h/--help: print this usage message and exit
--: separate options from statement, use when statement starts with -
statement: statement to be timed (default 'pass')
@@ -61,6 +62,8 @@ default_number = 1000000
default_repeat = 3
default_timer = time.perf_counter
+_globals = globals
+
# Don't change the indentation of the template; the reindent() calls
# in Timer.__init__() depend on setup being indented 4 spaces and stmt
# being indented 8 spaces.
@@ -78,24 +81,15 @@ def reindent(src, indent):
"""Helper to reindent a multi-line statement."""
return src.replace("\n", "\n" + " "*indent)
-def _template_func(setup, func):
- """Create a timer function. Used if the "statement" is a callable."""
- def inner(_it, _timer, _func=func):
- setup()
- _t0 = _timer()
- for _i in _it:
- _func()
- _t1 = _timer()
- return _t1 - _t0
- return inner
-
class Timer:
"""Class for timing execution speed of small code snippets.
The constructor takes a statement to be timed, an additional
statement used for setup, and a timer function. Both statements
default to 'pass'; the timer function is platform-dependent (see
- module doc string).
+ module doc string). If 'globals' is specified, the code will be
+ executed within that namespace (as opposed to inside timeit's
+ namespace).
To measure the execution time of the first statement, use the
timeit() method. The repeat() method is a convenience to call
@@ -105,42 +99,40 @@ class Timer:
multi-line string literals.
"""
- def __init__(self, stmt="pass", setup="pass", timer=default_timer):
+ def __init__(self, stmt="pass", setup="pass", timer=default_timer,
+ globals=None):
"""Constructor. See class doc string."""
self.timer = timer
- ns = {}
+ local_ns = {}
+ global_ns = _globals() if globals is None else globals
+ init = ''
+ if isinstance(setup, str):
+ # Check that the code can be compiled outside a function
+ compile(setup, dummy_src_name, "exec")
+ stmtprefix = setup + '\n'
+ setup = reindent(setup, 4)
+ elif callable(setup):
+ local_ns['_setup'] = setup
+ init += ', _setup=_setup'
+ stmtprefix = ''
+ setup = '_setup()'
+ else:
+ raise ValueError("setup is neither a string nor callable")
if isinstance(stmt, str):
# Check that the code can be compiled outside a function
- if isinstance(setup, str):
- compile(setup, dummy_src_name, "exec")
- compile(setup + '\n' + stmt, dummy_src_name, "exec")
- else:
- compile(stmt, dummy_src_name, "exec")
+ compile(stmtprefix + stmt, dummy_src_name, "exec")
stmt = reindent(stmt, 8)
- if isinstance(setup, str):
- setup = reindent(setup, 4)
- src = template.format(stmt=stmt, setup=setup, init='')
- elif callable(setup):
- src = template.format(stmt=stmt, setup='_setup()',
- init=', _setup=_setup')
- ns['_setup'] = setup
- else:
- raise ValueError("setup is neither a string nor callable")
- self.src = src # Save for traceback display
- code = compile(src, dummy_src_name, "exec")
- exec(code, globals(), ns)
- self.inner = ns["inner"]
elif callable(stmt):
- self.src = None
- if isinstance(setup, str):
- _setup = setup
- def setup():
- exec(_setup, globals(), ns)
- elif not callable(setup):
- raise ValueError("setup is neither a string nor callable")
- self.inner = _template_func(setup, stmt)
+ local_ns['_stmt'] = stmt
+ init += ', _stmt=_stmt'
+ stmt = '_stmt()'
else:
raise ValueError("stmt is neither a string nor callable")
+ src = template.format(stmt=stmt, setup=setup, init=init)
+ self.src = src # Save for traceback display
+ code = compile(src, dummy_src_name, "exec")
+ exec(code, global_ns, local_ns)
+ self.inner = local_ns["inner"]
def print_exc(self, file=None):
"""Helper to print a traceback from the timed code.
@@ -216,14 +208,14 @@ class Timer:
return r
def timeit(stmt="pass", setup="pass", timer=default_timer,
- number=default_number):
+ number=default_number, globals=None):
"""Convenience function to create Timer object and call timeit method."""
- return Timer(stmt, setup, timer).timeit(number)
+ return Timer(stmt, setup, timer, globals).timeit(number)
def repeat(stmt="pass", setup="pass", timer=default_timer,
- repeat=default_repeat, number=default_number):
+ repeat=default_repeat, number=default_number, globals=None):
"""Convenience function to create Timer object and call repeat method."""
- return Timer(stmt, setup, timer).repeat(repeat, number)
+ return Timer(stmt, setup, timer, globals).repeat(repeat, number)
def main(args=None, *, _wrap_timer=None):
"""Main program, used when run as a script.
@@ -246,10 +238,10 @@ def main(args=None, *, _wrap_timer=None):
args = sys.argv[1:]
import getopt
try:
- opts, args = getopt.getopt(args, "n:s:r:tcpvh",
+ opts, args = getopt.getopt(args, "n:u:s:r:tcpvh",
["number=", "setup=", "repeat=",
"time", "clock", "process",
- "verbose", "help"])
+ "verbose", "unit=", "help"])
except getopt.error as err:
print(err)
print("use -h/--help for command line help")
@@ -260,12 +252,21 @@ def main(args=None, *, _wrap_timer=None):
setup = []
repeat = default_repeat
verbose = 0
+ time_unit = None
+ units = {"usec": 1, "msec": 1e3, "sec": 1e6}
precision = 3
for o, a in opts:
if o in ("-n", "--number"):
number = int(a)
if o in ("-s", "--setup"):
setup.append(a)
+ if o in ("-u", "--unit"):
+ if a in units:
+ time_unit = a
+ else:
+ print("Unrecognized unit. Please select usec, msec, or sec.",
+ file=sys.stderr)
+ return 2
if o in ("-r", "--repeat"):
repeat = int(a)
if repeat <= 0:
@@ -315,15 +316,21 @@ def main(args=None, *, _wrap_timer=None):
print("raw times:", " ".join(["%.*g" % (precision, x) for x in r]))
print("%d loops," % number, end=' ')
usec = best * 1e6 / number
- if usec < 1000:
- print("best of %d: %.*g usec per loop" % (repeat, precision, usec))
+ if time_unit is not None:
+ print("best of %d: %.*g %s per loop" % (repeat, precision,
+ usec/units[time_unit], time_unit))
else:
- msec = usec / 1000
- if msec < 1000:
- print("best of %d: %.*g msec per loop" % (repeat, precision, msec))
+ if usec < 1000:
+ print("best of %d: %.*g usec per loop" % (repeat, precision, usec))
else:
- sec = msec / 1000
- print("best of %d: %.*g sec per loop" % (repeat, precision, sec))
+ msec = usec / 1000
+ if msec < 1000:
+ print("best of %d: %.*g msec per loop" % (repeat,
+ precision, msec))
+ else:
+ sec = msec / 1000
+ print("best of %d: %.*g sec per loop" % (repeat,
+ precision, sec))
return None
if __name__ == "__main__":
diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py
index 75c40e56e8..aa646dc8ed 100644
--- a/Lib/tkinter/__init__.py
+++ b/Lib/tkinter/__init__.py
@@ -31,9 +31,6 @@ tk.mainloop()
"""
import sys
-if sys.platform == "win32":
- # Attempt to configure Tcl/Tk without requiring PATH
- from tkinter import _fix
import _tkinter # If this fails your Python may not be configured for Tk
TclError = _tkinter.TclError
@@ -355,7 +352,7 @@ class IntVar(Variable):
def get(self):
"""Return the value of the variable as an integer."""
- return getint(self._tk.globalgetvar(self._name))
+ return self._tk.getint(self._tk.globalgetvar(self._name))
class DoubleVar(Variable):
"""Value holder for float variables."""
@@ -374,7 +371,7 @@ class DoubleVar(Variable):
def get(self):
"""Return the value of the variable as a float."""
- return getdouble(self._tk.globalgetvar(self._name))
+ return self._tk.getdouble(self._tk.globalgetvar(self._name))
class BooleanVar(Variable):
"""Value holder for boolean variables."""
@@ -505,14 +502,26 @@ class Misc:
def getvar(self, name='PY_VAR'):
"""Return value of Tcl variable NAME."""
return self.tk.getvar(name)
- getint = int
- getdouble = float
+
+ def getint(self, s):
+ try:
+ return self.tk.getint(s)
+ except TclError as exc:
+ raise ValueError(str(exc))
+
+ def getdouble(self, s):
+ try:
+ return self.tk.getdouble(s)
+ except TclError as exc:
+ raise ValueError(str(exc))
+
def getboolean(self, s):
"""Return a boolean value for Tcl boolean values true and false given as parameter."""
try:
return self.tk.getboolean(s)
except TclError:
raise ValueError("invalid literal for getboolean()")
+
def focus_set(self):
"""Direct input focus to this widget.
@@ -775,13 +784,10 @@ class Misc:
"""Raise this widget in the stacking order."""
self.tk.call('raise', self._w, aboveThis)
lift = tkraise
- def colormodel(self, value=None):
- """Useless. Not implemented in Tk."""
- return self.tk.call('tk', 'colormodel', self._w, value)
def winfo_atom(self, name, displayof=0):
"""Return integer which represents atom NAME."""
args = ('winfo', 'atom') + self._displayof(displayof) + (name,)
- return getint(self.tk.call(args))
+ return self.tk.getint(self.tk.call(args))
def winfo_atomname(self, id, displayof=0):
"""Return name of atom with identifier ID."""
args = ('winfo', 'atomname') \
@@ -789,7 +795,7 @@ class Misc:
return self.tk.call(args)
def winfo_cells(self):
"""Return number of cells in the colormap for this widget."""
- return getint(
+ return self.tk.getint(
self.tk.call('winfo', 'cells', self._w))
def winfo_children(self):
"""Return a list of all widgets which are children of this widget."""
@@ -820,22 +826,22 @@ class Misc:
return self._nametowidget(name)
def winfo_depth(self):
"""Return the number of bits per pixel."""
- return getint(self.tk.call('winfo', 'depth', self._w))
+ return self.tk.getint(self.tk.call('winfo', 'depth', self._w))
def winfo_exists(self):
"""Return true if this widget exists."""
- return getint(
+ return self.tk.getint(
self.tk.call('winfo', 'exists', self._w))
def winfo_fpixels(self, number):
"""Return the number of pixels for the given distance NUMBER
(e.g. "3c") as float."""
- return getdouble(self.tk.call(
+ return self.tk.getdouble(self.tk.call(
'winfo', 'fpixels', self._w, number))
def winfo_geometry(self):
"""Return geometry string for this widget in the form "widthxheight+X+Y"."""
return self.tk.call('winfo', 'geometry', self._w)
def winfo_height(self):
"""Return height of this widget."""
- return getint(
+ return self.tk.getint(
self.tk.call('winfo', 'height', self._w))
def winfo_id(self):
"""Return identifier ID for this widget."""
@@ -847,7 +853,7 @@ class Misc:
return self.tk.splitlist(self.tk.call(args))
def winfo_ismapped(self):
"""Return true if this widget is mapped."""
- return getint(
+ return self.tk.getint(
self.tk.call('winfo', 'ismapped', self._w))
def winfo_manager(self):
"""Return the window mananger name for this widget."""
@@ -865,11 +871,11 @@ class Misc:
return self.tk.call(args)
def winfo_pixels(self, number):
"""Rounded integer value of winfo_fpixels."""
- return getint(
+ return self.tk.getint(
self.tk.call('winfo', 'pixels', self._w, number))
def winfo_pointerx(self):
"""Return the x coordinate of the pointer on the root window."""
- return getint(
+ return self.tk.getint(
self.tk.call('winfo', 'pointerx', self._w))
def winfo_pointerxy(self):
"""Return a tuple of x and y coordinates of the pointer on the root window."""
@@ -877,15 +883,15 @@ class Misc:
self.tk.call('winfo', 'pointerxy', self._w))
def winfo_pointery(self):
"""Return the y coordinate of the pointer on the root window."""
- return getint(
+ return self.tk.getint(
self.tk.call('winfo', 'pointery', self._w))
def winfo_reqheight(self):
"""Return requested height of this widget."""
- return getint(
+ return self.tk.getint(
self.tk.call('winfo', 'reqheight', self._w))
def winfo_reqwidth(self):
"""Return requested width of this widget."""
- return getint(
+ return self.tk.getint(
self.tk.call('winfo', 'reqwidth', self._w))
def winfo_rgb(self, color):
"""Return tuple of decimal values for red, green, blue for
@@ -895,12 +901,12 @@ class Misc:
def winfo_rootx(self):
"""Return x coordinate of upper left corner of this widget on the
root window."""
- return getint(
+ return self.tk.getint(
self.tk.call('winfo', 'rootx', self._w))
def winfo_rooty(self):
"""Return y coordinate of upper left corner of this widget on the
root window."""
- return getint(
+ return self.tk.getint(
self.tk.call('winfo', 'rooty', self._w))
def winfo_screen(self):
"""Return the screen name of this widget."""
@@ -908,27 +914,27 @@ class Misc:
def winfo_screencells(self):
"""Return the number of the cells in the colormap of the screen
of this widget."""
- return getint(
+ return self.tk.getint(
self.tk.call('winfo', 'screencells', self._w))
def winfo_screendepth(self):
"""Return the number of bits per pixel of the root window of the
screen of this widget."""
- return getint(
+ return self.tk.getint(
self.tk.call('winfo', 'screendepth', self._w))
def winfo_screenheight(self):
"""Return the number of pixels of the height of the screen of this widget
in pixel."""
- return getint(
+ return self.tk.getint(
self.tk.call('winfo', 'screenheight', self._w))
def winfo_screenmmheight(self):
"""Return the number of pixels of the height of the screen of
this widget in mm."""
- return getint(
+ return self.tk.getint(
self.tk.call('winfo', 'screenmmheight', self._w))
def winfo_screenmmwidth(self):
"""Return the number of pixels of the width of the screen of
this widget in mm."""
- return getint(
+ return self.tk.getint(
self.tk.call('winfo', 'screenmmwidth', self._w))
def winfo_screenvisual(self):
"""Return one of the strings directcolor, grayscale, pseudocolor,
@@ -938,7 +944,7 @@ class Misc:
def winfo_screenwidth(self):
"""Return the number of pixels of the width of the screen of
this widget in pixel."""
- return getint(
+ return self.tk.getint(
self.tk.call('winfo', 'screenwidth', self._w))
def winfo_server(self):
"""Return information of the X-Server of the screen of this widget in
@@ -950,7 +956,7 @@ class Misc:
'winfo', 'toplevel', self._w))
def winfo_viewable(self):
"""Return true if the widget and all its higher ancestors are mapped."""
- return getint(
+ return self.tk.getint(
self.tk.call('winfo', 'viewable', self._w))
def winfo_visual(self):
"""Return one of the strings directcolor, grayscale, pseudocolor,
@@ -982,37 +988,37 @@ class Misc:
"""Return the height of the virtual root window associated with this
widget in pixels. If there is no virtual root window return the
height of the screen."""
- return getint(
+ return self.tk.getint(
self.tk.call('winfo', 'vrootheight', self._w))
def winfo_vrootwidth(self):
"""Return the width of the virtual root window associated with this
widget in pixel. If there is no virtual root window return the
width of the screen."""
- return getint(
+ return self.tk.getint(
self.tk.call('winfo', 'vrootwidth', self._w))
def winfo_vrootx(self):
"""Return the x offset of the virtual root relative to the root
window of the screen of this widget."""
- return getint(
+ return self.tk.getint(
self.tk.call('winfo', 'vrootx', self._w))
def winfo_vrooty(self):
"""Return the y offset of the virtual root relative to the root
window of the screen of this widget."""
- return getint(
+ return self.tk.getint(
self.tk.call('winfo', 'vrooty', self._w))
def winfo_width(self):
"""Return the width of this widget."""
- return getint(
+ return self.tk.getint(
self.tk.call('winfo', 'width', self._w))
def winfo_x(self):
"""Return the x coordinate of the upper left corner of this widget
in the parent."""
- return getint(
+ return self.tk.getint(
self.tk.call('winfo', 'x', self._w))
def winfo_y(self):
"""Return the y coordinate of the upper left corner of this widget
in the parent."""
- return getint(
+ return self.tk.getint(
self.tk.call('winfo', 'y', self._w))
def update(self):
"""Enter event loop until all pending events have been processed by Tcl."""
@@ -1129,11 +1135,11 @@ class Misc:
def _getints(self, string):
"""Internal function."""
if string:
- return tuple(map(getint, self.tk.splitlist(string)))
+ return tuple(map(self.tk.getint, self.tk.splitlist(string)))
def _getdoubles(self, string):
"""Internal function."""
if string:
- return tuple(map(getdouble, self.tk.splitlist(string)))
+ return tuple(map(self.tk.getdouble, self.tk.splitlist(string)))
def _getboolean(self, string):
"""Internal function."""
if string:
@@ -1232,18 +1238,18 @@ class Misc:
if len(args) != len(self._subst_format): return args
getboolean = self.tk.getboolean
- getint = int
+ getint = self.tk.getint
def getint_event(s):
"""Tk changed behavior in 8.4.2, returning "??" rather more often."""
try:
- return int(s)
- except ValueError:
+ return getint(s)
+ except (ValueError, TclError):
return s
nsign, b, f, h, k, s, t, w, x, y, A, E, K, N, W, T, X, Y, D = args
# Missing: (a, c, d, m, o, v, B, R)
e = Event()
- # serial field: valid vor all events
+ # serial field: valid for all events
# number of button: ButtonPress and ButtonRelease events only
# height field: Configure, ConfigureRequest, Create,
# ResizeRequest, and Expose events only
@@ -1251,11 +1257,11 @@ class Misc:
# time field: "valid for events that contain a time field"
# width field: Configure, ConfigureRequest, Create, ResizeRequest,
# and Expose events only
- # x field: "valid for events that contain a x field"
+ # x field: "valid for events that contain an x field"
# y field: "valid for events that contain a y field"
# keysym as decimal: KeyPress and KeyRelease events only
# x_root, y_root fields: ButtonPress, ButtonRelease, KeyPress,
- # KeyRelease,and Motion events
+ # KeyRelease, and Motion events
e.serial = getint(nsign)
e.num = getint_event(b)
try: e.focus = getboolean(f)
@@ -1281,7 +1287,7 @@ class Misc:
e.y_root = getint_event(Y)
try:
e.delta = getint(D)
- except ValueError:
+ except (ValueError, TclError):
e.delta = 0
return (e,)
def _report_exception(self):
@@ -1331,11 +1337,17 @@ class Misc:
self.configure({key: value})
def keys(self):
"""Return a list of all resource names of this widget."""
- return [x[0][1:] for x in
- self.tk.splitlist(self.tk.call(self._w, 'configure'))]
+ splitlist = self.tk.splitlist
+ return [splitlist(x)[0][1:] for x in
+ splitlist(self.tk.call(self._w, 'configure'))]
def __str__(self):
"""Return the window path name of this widget."""
return self._w
+
+ def __repr__(self):
+ return '<%s.%s object %s>' % (
+ self.__class__.__module__, self.__class__.__qualname__, self._w)
+
# Pack methods that apply to the master
_noarg_ = ['_noarg_']
def pack_propagate(self, flag=_noarg_):
@@ -1401,10 +1413,10 @@ class Misc:
if not svalue:
return None
elif '.' in svalue:
- return getdouble(svalue)
+ return self.tk.getdouble(svalue)
else:
- return getint(svalue)
- except ValueError:
+ return self.tk.getint(svalue)
+ except (ValueError, TclError):
pass
return value
@@ -1850,7 +1862,7 @@ class Tk(Misc, Wm):
import os
baseName = os.path.basename(sys.argv[0])
baseName, ext = os.path.splitext(baseName)
- if ext not in ('.py', '.pyc', '.pyo'):
+ if ext not in ('.py', '.pyc'):
baseName = baseName + ext
interactive = 0
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
@@ -2196,21 +2208,6 @@ class Button(Widget):
"""
Widget.__init__(self, master, 'button', cnf, kw)
- def tkButtonEnter(self, *dummy):
- self.tk.call('tkButtonEnter', self._w)
-
- def tkButtonLeave(self, *dummy):
- self.tk.call('tkButtonLeave', self._w)
-
- def tkButtonDown(self, *dummy):
- self.tk.call('tkButtonDown', self._w)
-
- def tkButtonUp(self, *dummy):
- self.tk.call('tkButtonUp', self._w)
-
- def tkButtonInvoke(self, *dummy):
- self.tk.call('tkButtonInvoke', self._w)
-
def flash(self):
"""Flash the button.
@@ -2297,17 +2294,17 @@ class Canvas(Widget, XView, YView):
def canvasx(self, screenx, gridspacing=None):
"""Return the canvas x coordinate of pixel position SCREENX rounded
to nearest multiple of GRIDSPACING units."""
- return getdouble(self.tk.call(
+ return self.tk.getdouble(self.tk.call(
self._w, 'canvasx', screenx, gridspacing))
def canvasy(self, screeny, gridspacing=None):
"""Return the canvas y coordinate of pixel position SCREENY rounded
to nearest multiple of GRIDSPACING units."""
- return getdouble(self.tk.call(
+ return self.tk.getdouble(self.tk.call(
self._w, 'canvasy', screeny, gridspacing))
def coords(self, *args):
"""Return a list of coordinates for the item given in ARGS."""
# XXX Should use _flatten on args
- return [getdouble(x) for x in
+ return [self.tk.getdouble(x) for x in
self.tk.splitlist(
self.tk.call((self._w, 'coords') + args))]
def _create(self, itemType, args, kw): # Args: (val, val, ..., cnf={})
@@ -2318,7 +2315,7 @@ class Canvas(Widget, XView, YView):
args = args[:-1]
else:
cnf = {}
- return getint(self.tk.call(
+ return self.tk.getint(self.tk.call(
self._w, 'create', itemType,
*(args + self._options(cnf, kw))))
def create_arc(self, *args, **kw):
@@ -2402,7 +2399,7 @@ class Canvas(Widget, XView, YView):
self.tk.call((self._w, 'icursor') + args)
def index(self, *args):
"""Return position of cursor as integer in item specified in ARGS."""
- return getint(self.tk.call((self._w, 'index') + args))
+ return self.tk.getint(self.tk.call((self._w, 'index') + args))
def insert(self, *args):
"""Insert TEXT in item TAGORID at position POS. ARGS must
be TAGORID POS TEXT."""
@@ -2504,7 +2501,7 @@ class Checkbutton(Widget):
self.tk.call(self._w, 'toggle')
class Entry(Widget, XView):
- """Entry widget which allows to display simple text."""
+ """Entry widget which allows displaying simple text."""
def __init__(self, master=None, cnf={}, **kw):
"""Construct an entry widget with the parent MASTER.
@@ -2528,7 +2525,7 @@ class Entry(Widget, XView):
self.tk.call(self._w, 'icursor', index)
def index(self, index):
"""Return position of cursor."""
- return getint(self.tk.call(
+ return self.tk.getint(self.tk.call(
self._w, 'index', index))
def insert(self, index, string):
"""Insert STRING at INDEX."""
@@ -2643,13 +2640,13 @@ class Listbox(Widget, XView, YView):
"""Return index of item identified with INDEX."""
i = self.tk.call(self._w, 'index', index)
if i == 'none': return None
- return getint(i)
+ return self.tk.getint(i)
def insert(self, index, *elements):
"""Insert ELEMENTS at INDEX."""
self.tk.call((self._w, 'insert', index) + elements)
def nearest(self, y):
"""Get index of item which is nearest to y coordinate Y."""
- return getint(self.tk.call(
+ return self.tk.getint(self.tk.call(
self._w, 'nearest', y))
def scan_mark(self, x, y):
"""Remember the current X, Y coordinates."""
@@ -2683,7 +2680,7 @@ class Listbox(Widget, XView, YView):
select_set = selection_set
def size(self):
"""Return the number of elements in the listbox."""
- return getint(self.tk.call(self._w, 'size'))
+ return self.tk.getint(self.tk.call(self._w, 'size'))
def itemcget(self, index, option):
"""Return the resource value for an ITEM and an OPTION."""
return self.tk.call(
@@ -2700,7 +2697,7 @@ class Listbox(Widget, XView, YView):
itemconfig = itemconfigure
class Menu(Widget):
- """Menu widget which allows to display menu bars, pull-down menus and pop-up menus."""
+ """Menu widget which allows displaying menu bars, pull-down menus and pop-up menus."""
def __init__(self, master=None, cnf={}, **kw):
"""Construct menu widget with the parent MASTER.
@@ -2709,35 +2706,15 @@ class Menu(Widget):
disabledforeground, fg, font, foreground, postcommand, relief,
selectcolor, takefocus, tearoff, tearoffcommand, title, type."""
Widget.__init__(self, master, 'menu', cnf, kw)
+ def tk_popup(self, x, y, entry=""):
+ """Post the menu at position X,Y with entry ENTRY."""
+ self.tk.call('tk_popup', self._w, x, y, entry)
def tk_bindForTraversal(self):
# obsolete since Tk 4.0
import warnings
warnings.warn('tk_bindForTraversal() does nothing and '
'will be removed in 3.6',
DeprecationWarning, stacklevel=2)
- def tk_mbPost(self):
- self.tk.call('tk_mbPost', self._w)
- def tk_mbUnpost(self):
- self.tk.call('tk_mbUnpost')
- def tk_traverseToMenu(self, char):
- self.tk.call('tk_traverseToMenu', self._w, char)
- def tk_traverseWithinMenu(self, char):
- self.tk.call('tk_traverseWithinMenu', self._w, char)
- def tk_getMenuButtons(self):
- return self.tk.call('tk_getMenuButtons', self._w)
- def tk_nextMenu(self, count):
- self.tk.call('tk_nextMenu', count)
- def tk_nextMenuEntry(self, count):
- self.tk.call('tk_nextMenuEntry', count)
- def tk_invokeMenu(self):
- self.tk.call('tk_invokeMenu', self._w)
- def tk_firstMenu(self):
- self.tk.call('tk_firstMenu', self._w)
- def tk_mbButtonDown(self):
- self.tk.call('tk_mbButtonDown', self._w)
- def tk_popup(self, x, y, entry=""):
- """Post the menu at position X,Y with entry ENTRY."""
- self.tk.call('tk_popup', self._w, x, y, entry)
def activate(self, index):
"""Activate entry at INDEX."""
self.tk.call(self._w, 'activate', index)
@@ -2795,7 +2772,7 @@ class Menu(Widget):
self.deletecommand(c)
self.tk.call(self._w, 'delete', index1, index2)
def entrycget(self, index, option):
- """Return the resource value of an menu item for OPTION at INDEX."""
+ """Return the resource value of a menu item for OPTION at INDEX."""
return self.tk.call(self._w, 'entrycget', index, '-' + option)
def entryconfigure(self, index, cnf=None, **kw):
"""Configure a menu item at INDEX."""
@@ -2805,7 +2782,7 @@ class Menu(Widget):
"""Return the index of a menu item identified by INDEX."""
i = self.tk.call(self._w, 'index', index)
if i == 'none': return None
- return getint(i)
+ return self.tk.getint(i)
def invoke(self, index):
"""Invoke a menu item identified by INDEX and execute
the associated command."""
@@ -2822,10 +2799,10 @@ class Menu(Widget):
def xposition(self, index): # new in Tk 8.5
"""Return the x-position of the leftmost pixel of the menu item
at INDEX."""
- return getint(self.tk.call(self._w, 'xposition', index))
+ return self.tk.getint(self.tk.call(self._w, 'xposition', index))
def yposition(self, index):
"""Return the y-position of the topmost pixel of the menu item at INDEX."""
- return getint(self.tk.call(
+ return self.tk.getint(self.tk.call(
self._w, 'yposition', index))
class Menubutton(Widget):
@@ -2881,9 +2858,9 @@ class Scale(Widget):
"""Get the current value as integer or float."""
value = self.tk.call(self._w, 'get')
try:
- return getint(value)
- except ValueError:
- return getdouble(value)
+ return self.tk.getint(value)
+ except (ValueError, TclError):
+ return self.tk.getdouble(value)
def set(self, value):
"""Set the value to VALUE."""
self.tk.call(self._w, 'set', value)
@@ -2910,19 +2887,23 @@ class Scrollbar(Widget):
relief, repeatdelay, repeatinterval, takefocus,
troughcolor, width."""
Widget.__init__(self, master, 'scrollbar', cnf, kw)
- def activate(self, index):
- """Display the element at INDEX with activebackground and activerelief.
- INDEX can be "arrow1","slider" or "arrow2"."""
- self.tk.call(self._w, 'activate', index)
+ def activate(self, index=None):
+ """Marks the element indicated by index as active.
+ The only index values understood by this method are "arrow1",
+ "slider", or "arrow2". If any other value is specified then no
+ element of the scrollbar will be active. If index is not specified,
+ the method returns the name of the element that is currently active,
+ or None if no element is active."""
+ return self.tk.call(self._w, 'activate', index) or None
def delta(self, deltax, deltay):
"""Return the fractional change of the scrollbar setting if it
would be moved by DELTAX or DELTAY pixels."""
- return getdouble(
+ return self.tk.getdouble(
self.tk.call(self._w, 'delta', deltax, deltay))
def fraction(self, x, y):
"""Return the fractional value which corresponds to a slider
position of X,Y."""
- return getdouble(self.tk.call(self._w, 'fraction', x, y))
+ return self.tk.getdouble(self.tk.call(self._w, 'fraction', x, y))
def identify(self, x, y):
"""Return the element under position X,Y as one of
"arrow1","slider","arrow2" or ""."""
@@ -2931,10 +2912,10 @@ class Scrollbar(Widget):
"""Return the current fractional values (upper and lower end)
of the slider position."""
return self._getdoubles(self.tk.call(self._w, 'get'))
- def set(self, *args):
+ def set(self, first, last):
"""Set the fractional values of the slider position (upper and
lower ends as value between 0 and 1)."""
- self.tk.call((self._w, 'set') + args)
+ self.tk.call(self._w, 'set', first, last)
@@ -2969,14 +2950,6 @@ class Text(Widget, XView, YView):
box of the visible part of the character at the given index."""
return self._getints(
self.tk.call(self._w, 'bbox', index)) or None
- def tk_textSelectTo(self, index):
- self.tk.call('tk_textSelectTo', self._w, index)
- def tk_textBackspace(self):
- self.tk.call('tk_textBackspace', self._w)
- def tk_textIndexCloser(self, a, b, c):
- self.tk.call('tk_textIndexCloser', self._w, a, b, c)
- def tk_textResetAnchor(self, index):
- self.tk.call('tk_textResetAnchor', self._w, index)
def compare(self, index1, op, index2):
"""Return whether between index INDEX1 and index INDEX2 the
relation OP is satisfied. OP is one of <, <=, ==, >=, >, or !=."""
@@ -3168,7 +3141,7 @@ class Text(Widget, XView, YView):
"""Creates a peer text widget with the given newPathName, and any
optional standard configuration options. By default the peer will
have the same start and end line as the parent widget, but
- these can be overriden with the standard configuration options."""
+ these can be overridden with the standard configuration options."""
self.tk.call(self._w, 'peer', 'create', newPathName,
*self._options(cnf, kw))
def peer_names(self): # new in Tk 8.5
@@ -3401,14 +3374,14 @@ class Image:
config = configure
def height(self):
"""Return the height of the image."""
- return getint(
+ return self.tk.getint(
self.tk.call('image', 'height', self.name))
def type(self):
"""Return the type of the imgage, e.g. "photo" or "bitmap"."""
return self.tk.call('image', 'type', self.name)
def width(self):
"""Return the width of the image."""
- return getint(
+ return self.tk.getint(
self.tk.call('image', 'width', self.name))
class PhotoImage(Image):
@@ -3434,16 +3407,20 @@ class PhotoImage(Image):
destImage = PhotoImage(master=self.tk)
self.tk.call(destImage, 'copy', self.name)
return destImage
- def zoom(self,x,y=''):
+ def zoom(self, x, y=''):
"""Return a new PhotoImage with the same image as this widget
- but zoom it with X and Y."""
+ but zoom it with a factor of x in the X direction and y in the Y
+ direction. If y is not given, the default value is the same as x.
+ """
destImage = PhotoImage(master=self.tk)
if y=='': y=x
self.tk.call(destImage, 'copy', self.name, '-zoom',x,y)
return destImage
- def subsample(self,x,y=''):
+ def subsample(self, x, y=''):
"""Return a new PhotoImage based on the same image as this widget
- but use only every Xth or Yth pixel."""
+ but use only every Xth or Yth pixel. If y is not given, the
+ default value is the same as x.
+ """
destImage = PhotoImage(master=self.tk)
if y=='': y=x
self.tk.call(destImage, 'copy', self.name, '-subsample',x,y)
@@ -3854,35 +3831,12 @@ class PanedWindow(Widget):
"""Returns an ordered list of the child panes."""
return self.tk.splitlist(self.tk.call(self._w, 'panes'))
-######################################################################
-# Extensions:
-
-class Studbutton(Button):
- def __init__(self, master=None, cnf={}, **kw):
- Widget.__init__(self, master, 'studbutton', cnf, kw)
- self.bind('<Any-Enter>', self.tkButtonEnter)
- self.bind('<Any-Leave>', self.tkButtonLeave)
- self.bind('<1>', self.tkButtonDown)
- self.bind('<ButtonRelease-1>', self.tkButtonUp)
-
-class Tributton(Button):
- def __init__(self, master=None, cnf={}, **kw):
- Widget.__init__(self, master, 'tributton', cnf, kw)
- self.bind('<Any-Enter>', self.tkButtonEnter)
- self.bind('<Any-Leave>', self.tkButtonLeave)
- self.bind('<1>', self.tkButtonDown)
- self.bind('<ButtonRelease-1>', self.tkButtonUp)
- self['fg'] = self['bg']
- self['activebackground'] = self['bg']
-
-######################################################################
# Test:
def _test():
root = Tk()
text = "This is Tcl/Tk version %s" % TclVersion
- if TclVersion >= 8.1:
- text += "\nThis should be a cedilla: \xe7"
+ text += "\nThis should be a cedilla: \xe7"
label = Label(root, text=text)
label.pack()
test = Button(root, text="Click me!",
diff --git a/Lib/tkinter/_fix.py b/Lib/tkinter/_fix.py
deleted file mode 100644
index fa88734c05..0000000000
--- a/Lib/tkinter/_fix.py
+++ /dev/null
@@ -1,78 +0,0 @@
-import sys, os
-
-# Delay import _tkinter until we have set TCL_LIBRARY,
-# so that Tcl_FindExecutable has a chance to locate its
-# encoding directory.
-
-# Unfortunately, we cannot know the TCL_LIBRARY directory
-# if we don't know the tcl version, which we cannot find out
-# without import Tcl. Fortunately, Tcl will itself look in
-# <TCL_LIBRARY>\..\tcl<TCL_VERSION>, so anything close to
-# the real Tcl library will do.
-
-# Expand symbolic links on Vista
-try:
- import ctypes
- ctypes.windll.kernel32.GetFinalPathNameByHandleW
-except (ImportError, AttributeError):
- def convert_path(s):
- return s
-else:
- def convert_path(s):
- if isinstance(s, bytes):
- s = s.decode("mbcs")
- hdir = ctypes.windll.kernel32.\
- CreateFileW(s, 0x80, # FILE_READ_ATTRIBUTES
- 1, # FILE_SHARE_READ
- None, 3, # OPEN_EXISTING
- 0x02000000, # FILE_FLAG_BACKUP_SEMANTICS
- None)
- if hdir == -1:
- # Cannot open directory, give up
- return s
- buf = ctypes.create_unicode_buffer("", 32768)
- res = ctypes.windll.kernel32.\
- GetFinalPathNameByHandleW(hdir, buf, len(buf),
- 0) # VOLUME_NAME_DOS
- ctypes.windll.kernel32.CloseHandle(hdir)
- if res == 0:
- # Conversion failed (e.g. network location)
- return s
- s = buf[:res]
- # Ignore leading \\?\
- if s.startswith("\\\\?\\"):
- s = s[4:]
- if s.startswith("UNC"):
- s = "\\" + s[3:]
- return s
-
-prefix = os.path.join(sys.base_prefix,"tcl")
-if not os.path.exists(prefix):
- # devdir/externals/tcltk/lib
- prefix = os.path.join(sys.base_prefix, "externals", "tcltk", "lib")
- prefix = os.path.abspath(prefix)
-# if this does not exist, no further search is needed
-if os.path.exists(prefix):
- prefix = convert_path(prefix)
- if "TCL_LIBRARY" not in os.environ:
- for name in os.listdir(prefix):
- if name.startswith("tcl"):
- tcldir = os.path.join(prefix,name)
- if os.path.isdir(tcldir):
- os.environ["TCL_LIBRARY"] = tcldir
- # Compute TK_LIBRARY, knowing that it has the same version
- # as Tcl
- import _tkinter
- ver = str(_tkinter.TCL_VERSION)
- if "TK_LIBRARY" not in os.environ:
- v = os.path.join(prefix, 'tk'+ver)
- if os.path.exists(os.path.join(v, "tclIndex")):
- os.environ['TK_LIBRARY'] = v
- # We don't know the Tix version, so we must search the entire
- # directory
- if "TIX_LIBRARY" not in os.environ:
- for name in os.listdir(prefix):
- if name.startswith("tix"):
- tixdir = os.path.join(prefix,name)
- if os.path.isdir(tixdir):
- os.environ["TIX_LIBRARY"] = tixdir
diff --git a/Lib/tkinter/dnd.py b/Lib/tkinter/dnd.py
index 55f0776ce9..e0971a26ad 100644
--- a/Lib/tkinter/dnd.py
+++ b/Lib/tkinter/dnd.py
@@ -3,7 +3,7 @@
This is very preliminary. I currently only support dnd *within* one
application, between different windows (or within the same window).
-I an trying to make this as generic as possible -- not dependent on
+I am trying to make this as generic as possible -- not dependent on
the use of a particular widget or icon type, etc. I also hope that
this will work with Pmw.
diff --git a/Lib/tkinter/font.py b/Lib/tkinter/font.py
index b96673208b..136425726a 100644
--- a/Lib/tkinter/font.py
+++ b/Lib/tkinter/font.py
@@ -112,8 +112,6 @@ class Font:
try:
if self.delete_font:
self._call("font", "delete", self.name)
- except (KeyboardInterrupt, SystemExit):
- raise
except Exception:
pass
@@ -153,7 +151,7 @@ class Font:
args = (text,)
if displayof:
args = ('-displayof', displayof, text)
- return int(self._call("font", "measure", self.name, *args))
+ return self._tk.getint(self._call("font", "measure", self.name, *args))
def metrics(self, *options, **kw):
"""Return font metrics.
@@ -166,13 +164,13 @@ class Font:
args = ('-displayof', displayof)
if options:
args = args + self._get(options)
- return int(
+ return self._tk.getint(
self._call("font", "metrics", self.name, *args))
else:
res = self._split(self._call("font", "metrics", self.name, *args))
options = {}
for i in range(0, len(res), 2):
- options[res[i][1:]] = int(res[i+1])
+ options[res[i][1:]] = self._tk.getint(res[i+1])
return options
diff --git a/Lib/tkinter/simpledialog.py b/Lib/tkinter/simpledialog.py
index 45302b4569..a95f5516c9 100644
--- a/Lib/tkinter/simpledialog.py
+++ b/Lib/tkinter/simpledialog.py
@@ -325,7 +325,7 @@ class _QueryDialog(Dialog):
class _QueryInteger(_QueryDialog):
errormessage = "Not an integer."
def getresult(self):
- return int(self.entry.get())
+ return self.getint(self.entry.get())
def askinteger(title, prompt, **kw):
'''get an integer from the user
@@ -344,7 +344,7 @@ def askinteger(title, prompt, **kw):
class _QueryFloat(_QueryDialog):
errormessage = "Not a floating point value."
def getresult(self):
- return float(self.entry.get())
+ return self.getdouble(self.entry.get())
def askfloat(title, prompt, **kw):
'''get a float from the user
diff --git a/Lib/tkinter/test/runtktests.py b/Lib/tkinter/test/runtktests.py
index ccb375556f..dbe5e88c14 100644
--- a/Lib/tkinter/test/runtktests.py
+++ b/Lib/tkinter/test/runtktests.py
@@ -16,7 +16,7 @@ this_dir_path = os.path.abspath(os.path.dirname(__file__))
def is_package(path):
for name in os.listdir(path):
- if name in ('__init__.py', '__init__.pyc', '__init.pyo'):
+ if name in ('__init__.py', '__init__.pyc'):
return True
return False
diff --git a/Lib/tkinter/test/test_tkinter/test_geometry_managers.py b/Lib/tkinter/test/test_tkinter/test_geometry_managers.py
index e42b1be56a..c645d43007 100644
--- a/Lib/tkinter/test/test_tkinter/test_geometry_managers.py
+++ b/Lib/tkinter/test/test_tkinter/test_geometry_managers.py
@@ -12,6 +12,8 @@ requires('gui')
class PackTest(AbstractWidgetTest, unittest.TestCase):
+ test_keys = None
+
def create2(self):
pack = tkinter.Toplevel(self.root, name='pack')
pack.wm_geometry('300x200+0+0')
@@ -276,6 +278,8 @@ class PackTest(AbstractWidgetTest, unittest.TestCase):
class PlaceTest(AbstractWidgetTest, unittest.TestCase):
+ test_keys = None
+
def create2(self):
t = tkinter.Toplevel(self.root, width=300, height=200, bd=0)
t.wm_geometry('300x200+0+0')
@@ -478,6 +482,8 @@ class PlaceTest(AbstractWidgetTest, unittest.TestCase):
class GridTest(AbstractWidgetTest, unittest.TestCase):
+ test_keys = None
+
def tearDown(self):
cols, rows = self.root.grid_size()
for i in range(cols + 1):
diff --git a/Lib/tkinter/test/test_tkinter/test_misc.py b/Lib/tkinter/test/test_tkinter/test_misc.py
index d8de949e46..85ee2c70b1 100644
--- a/Lib/tkinter/test/test_tkinter/test_misc.py
+++ b/Lib/tkinter/test/test_tkinter/test_misc.py
@@ -7,6 +7,11 @@ support.requires('gui')
class MiscTest(AbstractTkTest, unittest.TestCase):
+ def test_repr(self):
+ t = tkinter.Toplevel(self.root, name='top')
+ f = tkinter.Frame(t, name='child')
+ self.assertEqual(repr(f), '<tkinter.Frame object .top.child>')
+
def test_tk_setPalette(self):
root = self.root
root.tk_setPalette('black')
diff --git a/Lib/tkinter/test/test_tkinter/test_variables.py b/Lib/tkinter/test/test_tkinter/test_variables.py
index 4b72943178..abdce96998 100644
--- a/Lib/tkinter/test/test_tkinter/test_variables.py
+++ b/Lib/tkinter/test/test_tkinter/test_variables.py
@@ -122,10 +122,10 @@ class TestIntVar(TestBase):
def test_invalid_value(self):
v = IntVar(self.root, name="name")
self.root.globalsetvar("name", "value")
- with self.assertRaises(ValueError):
+ with self.assertRaises((ValueError, TclError)):
v.get()
self.root.globalsetvar("name", "345.0")
- with self.assertRaises(ValueError):
+ with self.assertRaises((ValueError, TclError)):
v.get()
@@ -152,7 +152,7 @@ class TestDoubleVar(TestBase):
def test_invalid_value(self):
v = DoubleVar(self.root, name="name")
self.root.globalsetvar("name", "value")
- with self.assertRaises(ValueError):
+ with self.assertRaises((ValueError, TclError)):
v.get()
diff --git a/Lib/tkinter/test/test_tkinter/test_widgets.py b/Lib/tkinter/test/test_tkinter/test_widgets.py
index 8be0371744..c924d55937 100644
--- a/Lib/tkinter/test/test_tkinter/test_widgets.py
+++ b/Lib/tkinter/test/test_tkinter/test_widgets.py
@@ -102,7 +102,7 @@ class FrameTest(AbstractToplevelTest, unittest.TestCase):
'background', 'borderwidth',
'class', 'colormap', 'container', 'cursor', 'height',
'highlightbackground', 'highlightcolor', 'highlightthickness',
- 'relief', 'takefocus', 'visual', 'width',
+ 'padx', 'pady', 'relief', 'takefocus', 'visual', 'width',
)
def create(self, **kwargs):
@@ -636,7 +636,7 @@ class CanvasTest(AbstractWidgetTest, unittest.TestCase):
'highlightbackground', 'highlightcolor', 'highlightthickness',
'insertbackground', 'insertborderwidth',
'insertofftime', 'insertontime', 'insertwidth',
- 'relief', 'scrollregion',
+ 'offset', 'relief', 'scrollregion',
'selectbackground', 'selectborderwidth', 'selectforeground',
'state', 'takefocus',
'xscrollcommand', 'xscrollincrement',
@@ -658,6 +658,15 @@ class CanvasTest(AbstractWidgetTest, unittest.TestCase):
widget = self.create()
self.checkBooleanParam(widget, 'confine')
+ def test_offset(self):
+ widget = self.create()
+ self.assertEqual(widget['offset'], '0,0')
+ self.checkParams(widget, 'offset',
+ 'n', 'ne', 'e', 'se', 's', 'sw', 'w', 'nw', 'center')
+ self.checkParam(widget, 'offset', '10,20')
+ self.checkParam(widget, 'offset', '#5,6')
+ self.checkInvalidParam(widget, 'offset', 'spam')
+
def test_scrollregion(self):
widget = self.create()
self.checkParam(widget, 'scrollregion', '0 0 200 150')
@@ -920,8 +929,9 @@ class ScrollbarTest(AbstractWidgetTest, unittest.TestCase):
sb = self.create()
for e in ('arrow1', 'slider', 'arrow2'):
sb.activate(e)
+ self.assertEqual(sb.activate(), e)
sb.activate('')
- self.assertRaises(TypeError, sb.activate)
+ self.assertIsNone(sb.activate())
self.assertRaises(TypeError, sb.activate, 'arrow1', 'arrow2')
def test_set(self):
@@ -931,8 +941,8 @@ class ScrollbarTest(AbstractWidgetTest, unittest.TestCase):
self.assertRaises(TclError, sb.set, 'abc', 'def')
self.assertRaises(TclError, sb.set, 0.6, 'def')
self.assertRaises(TclError, sb.set, 0.6, None)
- self.assertRaises(TclError, sb.set, 0.6)
- self.assertRaises(TclError, sb.set, 0.6, 0.7, 0.8)
+ self.assertRaises(TypeError, sb.set, 0.6)
+ self.assertRaises(TypeError, sb.set, 0.6, 0.7, 0.8)
@add_standard_options(StandardOptionsTests)
diff --git a/Lib/tkinter/test/test_ttk/test_extensions.py b/Lib/tkinter/test/test_ttk/test_extensions.py
index c3af06cddd..f33945cef9 100644
--- a/Lib/tkinter/test/test_ttk/test_extensions.py
+++ b/Lib/tkinter/test/test_ttk/test_extensions.py
@@ -70,17 +70,15 @@ class LabeledScaleTest(AbstractTkTest, unittest.TestCase):
# variable initialization/passing
passed_expected = (('0', 0), (0, 0), (10, 10),
(-1, -1), (sys.maxsize + 1, sys.maxsize + 1))
- if self.wantobjects:
- passed_expected += ((2.5, 2),)
for pair in passed_expected:
x = ttk.LabeledScale(self.root, from_=pair[0])
self.assertEqual(x.value, pair[1])
x.destroy()
x = ttk.LabeledScale(self.root, from_='2.5')
- self.assertRaises(ValueError, x._variable.get)
+ self.assertRaises((ValueError, tkinter.TclError), x._variable.get)
x.destroy()
x = ttk.LabeledScale(self.root, from_=None)
- self.assertRaises(ValueError, x._variable.get)
+ self.assertRaises((ValueError, tkinter.TclError), x._variable.get)
x.destroy()
# variable should have its default value set to the from_ value
myvar = tkinter.DoubleVar(self.root, value=20)
diff --git a/Lib/tkinter/test/test_ttk/test_functions.py b/Lib/tkinter/test/test_ttk/test_functions.py
index c9dcf975f8..c68a650559 100644
--- a/Lib/tkinter/test/test_ttk/test_functions.py
+++ b/Lib/tkinter/test/test_ttk/test_functions.py
@@ -193,7 +193,7 @@ class InternalFunctionsTest(unittest.TestCase):
## Testing type = vsapi
# vsapi type expects at least a class name and a part_id, so this
- # should raise an ValueError since it tries to get two elements from
+ # should raise a ValueError since it tries to get two elements from
# an empty tuple
self.assertRaises(ValueError, ttk._format_elemcreate, 'vsapi')
diff --git a/Lib/tkinter/test/test_ttk/test_widgets.py b/Lib/tkinter/test/test_ttk/test_widgets.py
index afd3230c1d..c031351fed 100644
--- a/Lib/tkinter/test/test_ttk/test_widgets.py
+++ b/Lib/tkinter/test/test_ttk/test_widgets.py
@@ -187,7 +187,7 @@ class AbstractLabelTest(AbstractWidgetTest):
@add_standard_options(StandardTtkOptionsTests)
class LabelTest(AbstractLabelTest, unittest.TestCase):
OPTIONS = (
- 'anchor', 'background',
+ 'anchor', 'background', 'borderwidth',
'class', 'compound', 'cursor', 'font', 'foreground',
'image', 'justify', 'padding', 'relief', 'state', 'style',
'takefocus', 'text', 'textvariable',
@@ -208,7 +208,8 @@ class LabelTest(AbstractLabelTest, unittest.TestCase):
class ButtonTest(AbstractLabelTest, unittest.TestCase):
OPTIONS = (
'class', 'command', 'compound', 'cursor', 'default',
- 'image', 'state', 'style', 'takefocus', 'text', 'textvariable',
+ 'image', 'padding', 'state', 'style',
+ 'takefocus', 'text', 'textvariable',
'underline', 'width',
)
@@ -232,7 +233,7 @@ class CheckbuttonTest(AbstractLabelTest, unittest.TestCase):
'class', 'command', 'compound', 'cursor',
'image',
'offvalue', 'onvalue',
- 'state', 'style',
+ 'padding', 'state', 'style',
'takefocus', 'text', 'textvariable',
'underline', 'variable', 'width',
)
@@ -276,137 +277,10 @@ class CheckbuttonTest(AbstractLabelTest, unittest.TestCase):
@add_standard_options(IntegerSizeTests, StandardTtkOptionsTests)
-class ComboboxTest(AbstractWidgetTest, unittest.TestCase):
- OPTIONS = (
- 'class', 'cursor', 'exportselection', 'height',
- 'justify', 'postcommand', 'state', 'style',
- 'takefocus', 'textvariable', 'values', 'width',
- )
-
- def setUp(self):
- super().setUp()
- self.combo = self.create()
-
- def create(self, **kwargs):
- return ttk.Combobox(self.root, **kwargs)
-
- def test_height(self):
- widget = self.create()
- self.checkParams(widget, 'height', 100, 101.2, 102.6, -100, 0, '1i')
-
- def test_state(self):
- widget = self.create()
- self.checkParams(widget, 'state', 'active', 'disabled', 'normal')
-
- def _show_drop_down_listbox(self):
- width = self.combo.winfo_width()
- self.combo.event_generate('<ButtonPress-1>', x=width - 5, y=5)
- self.combo.event_generate('<ButtonRelease-1>', x=width - 5, y=5)
- self.combo.update_idletasks()
-
-
- def test_virtual_event(self):
- success = []
-
- self.combo['values'] = [1]
- self.combo.bind('<<ComboboxSelected>>',
- lambda evt: success.append(True))
- self.combo.pack()
- self.combo.wait_visibility()
-
- height = self.combo.winfo_height()
- self._show_drop_down_listbox()
- self.combo.update()
- self.combo.event_generate('<Return>')
- self.combo.update()
-
- self.assertTrue(success)
-
-
- def test_postcommand(self):
- success = []
-
- self.combo['postcommand'] = lambda: success.append(True)
- self.combo.pack()
- self.combo.wait_visibility()
-
- self._show_drop_down_listbox()
- self.assertTrue(success)
-
- # testing postcommand removal
- self.combo['postcommand'] = ''
- self._show_drop_down_listbox()
- self.assertEqual(len(success), 1)
-
-
- def test_values(self):
- def check_get_current(getval, currval):
- self.assertEqual(self.combo.get(), getval)
- self.assertEqual(self.combo.current(), currval)
-
- self.assertEqual(self.combo['values'],
- () if tcl_version < (8, 5) else '')
- check_get_current('', -1)
-
- self.checkParam(self.combo, 'values', 'mon tue wed thur',
- expected=('mon', 'tue', 'wed', 'thur'))
- self.checkParam(self.combo, 'values', ('mon', 'tue', 'wed', 'thur'))
- self.checkParam(self.combo, 'values', (42, 3.14, '', 'any string'))
- self.checkParam(self.combo, 'values', '',
- expected='' if get_tk_patchlevel() < (8, 5, 10) else ())
-
- self.combo['values'] = ['a', 1, 'c']
-
- self.combo.set('c')
- check_get_current('c', 2)
-
- self.combo.current(0)
- check_get_current('a', 0)
-
- self.combo.set('d')
- check_get_current('d', -1)
-
- # testing values with empty string
- self.combo.set('')
- self.combo['values'] = (1, 2, '', 3)
- check_get_current('', 2)
-
- # testing values with empty string set through configure
- self.combo.configure(values=[1, '', 2])
- self.assertEqual(self.combo['values'],
- ('1', '', '2') if self.wantobjects else
- '1 {} 2')
-
- # testing values with spaces
- self.combo['values'] = ['a b', 'a\tb', 'a\nb']
- self.assertEqual(self.combo['values'],
- ('a b', 'a\tb', 'a\nb') if self.wantobjects else
- '{a b} {a\tb} {a\nb}')
-
- # testing values with special characters
- self.combo['values'] = [r'a\tb', '"a"', '} {']
- self.assertEqual(self.combo['values'],
- (r'a\tb', '"a"', '} {') if self.wantobjects else
- r'a\\tb {"a"} \}\ \{')
-
- # out of range
- self.assertRaises(tkinter.TclError, self.combo.current,
- len(self.combo['values']))
- # it expects an integer (or something that can be converted to int)
- self.assertRaises(tkinter.TclError, self.combo.current, '')
-
- # testing creating combobox with empty string in values
- combo2 = ttk.Combobox(self.root, values=[1, 2, ''])
- self.assertEqual(combo2['values'],
- ('1', '2', '') if self.wantobjects else '1 2 {}')
- combo2.destroy()
-
-
-@add_standard_options(IntegerSizeTests, StandardTtkOptionsTests)
class EntryTest(AbstractWidgetTest, unittest.TestCase):
OPTIONS = (
'background', 'class', 'cursor',
- 'exportselection', 'font',
+ 'exportselection', 'font', 'foreground',
'invalidcommand', 'justify',
'show', 'state', 'style', 'takefocus', 'textvariable',
'validate', 'validatecommand', 'width', 'xscrollcommand',
@@ -535,6 +409,132 @@ class EntryTest(AbstractWidgetTest, unittest.TestCase):
@add_standard_options(IntegerSizeTests, StandardTtkOptionsTests)
+class ComboboxTest(EntryTest, unittest.TestCase):
+ OPTIONS = (
+ 'background', 'class', 'cursor', 'exportselection',
+ 'font', 'foreground', 'height', 'invalidcommand',
+ 'justify', 'postcommand', 'show', 'state', 'style',
+ 'takefocus', 'textvariable',
+ 'validate', 'validatecommand', 'values',
+ 'width', 'xscrollcommand',
+ )
+
+ def setUp(self):
+ super().setUp()
+ self.combo = self.create()
+
+ def create(self, **kwargs):
+ return ttk.Combobox(self.root, **kwargs)
+
+ def test_height(self):
+ widget = self.create()
+ self.checkParams(widget, 'height', 100, 101.2, 102.6, -100, 0, '1i')
+
+ def _show_drop_down_listbox(self):
+ width = self.combo.winfo_width()
+ self.combo.event_generate('<ButtonPress-1>', x=width - 5, y=5)
+ self.combo.event_generate('<ButtonRelease-1>', x=width - 5, y=5)
+ self.combo.update_idletasks()
+
+
+ def test_virtual_event(self):
+ success = []
+
+ self.combo['values'] = [1]
+ self.combo.bind('<<ComboboxSelected>>',
+ lambda evt: success.append(True))
+ self.combo.pack()
+ self.combo.wait_visibility()
+
+ height = self.combo.winfo_height()
+ self._show_drop_down_listbox()
+ self.combo.update()
+ self.combo.event_generate('<Return>')
+ self.combo.update()
+
+ self.assertTrue(success)
+
+
+ def test_postcommand(self):
+ success = []
+
+ self.combo['postcommand'] = lambda: success.append(True)
+ self.combo.pack()
+ self.combo.wait_visibility()
+
+ self._show_drop_down_listbox()
+ self.assertTrue(success)
+
+ # testing postcommand removal
+ self.combo['postcommand'] = ''
+ self._show_drop_down_listbox()
+ self.assertEqual(len(success), 1)
+
+
+ def test_values(self):
+ def check_get_current(getval, currval):
+ self.assertEqual(self.combo.get(), getval)
+ self.assertEqual(self.combo.current(), currval)
+
+ self.assertEqual(self.combo['values'],
+ () if tcl_version < (8, 5) else '')
+ check_get_current('', -1)
+
+ self.checkParam(self.combo, 'values', 'mon tue wed thur',
+ expected=('mon', 'tue', 'wed', 'thur'))
+ self.checkParam(self.combo, 'values', ('mon', 'tue', 'wed', 'thur'))
+ self.checkParam(self.combo, 'values', (42, 3.14, '', 'any string'))
+ self.checkParam(self.combo, 'values', '',
+ expected='' if get_tk_patchlevel() < (8, 5, 10) else ())
+
+ self.combo['values'] = ['a', 1, 'c']
+
+ self.combo.set('c')
+ check_get_current('c', 2)
+
+ self.combo.current(0)
+ check_get_current('a', 0)
+
+ self.combo.set('d')
+ check_get_current('d', -1)
+
+ # testing values with empty string
+ self.combo.set('')
+ self.combo['values'] = (1, 2, '', 3)
+ check_get_current('', 2)
+
+ # testing values with empty string set through configure
+ self.combo.configure(values=[1, '', 2])
+ self.assertEqual(self.combo['values'],
+ ('1', '', '2') if self.wantobjects else
+ '1 {} 2')
+
+ # testing values with spaces
+ self.combo['values'] = ['a b', 'a\tb', 'a\nb']
+ self.assertEqual(self.combo['values'],
+ ('a b', 'a\tb', 'a\nb') if self.wantobjects else
+ '{a b} {a\tb} {a\nb}')
+
+ # testing values with special characters
+ self.combo['values'] = [r'a\tb', '"a"', '} {']
+ self.assertEqual(self.combo['values'],
+ (r'a\tb', '"a"', '} {') if self.wantobjects else
+ r'a\\tb {"a"} \}\ \{')
+
+ # out of range
+ self.assertRaises(tkinter.TclError, self.combo.current,
+ len(self.combo['values']))
+ # it expects an integer (or something that can be converted to int)
+ self.assertRaises(tkinter.TclError, self.combo.current, '')
+
+ # testing creating combobox with empty string in values
+ combo2 = ttk.Combobox(self.root, values=[1, 2, ''])
+ self.assertEqual(combo2['values'],
+ ('1', '2', '') if self.wantobjects else '1 2 {}')
+ combo2.destroy()
+
+
+@add_standard_options(IntegerSizeTests, StandardTtkOptionsTests)
class PanedWindowTest(AbstractWidgetTest, unittest.TestCase):
OPTIONS = (
'class', 'cursor', 'height',
@@ -674,7 +674,7 @@ class RadiobuttonTest(AbstractLabelTest, unittest.TestCase):
OPTIONS = (
'class', 'command', 'compound', 'cursor',
'image',
- 'state', 'style',
+ 'padding', 'state', 'style',
'takefocus', 'text', 'textvariable',
'underline', 'value', 'variable', 'width',
)
@@ -724,7 +724,7 @@ class RadiobuttonTest(AbstractLabelTest, unittest.TestCase):
class MenubuttonTest(AbstractLabelTest, unittest.TestCase):
OPTIONS = (
'class', 'compound', 'cursor', 'direction',
- 'image', 'menu', 'state', 'style',
+ 'image', 'menu', 'padding', 'state', 'style',
'takefocus', 'text', 'textvariable',
'underline', 'width',
)
@@ -902,7 +902,7 @@ class ScrollbarTest(AbstractWidgetTest, unittest.TestCase):
@add_standard_options(IntegerSizeTests, StandardTtkOptionsTests)
class NotebookTest(AbstractWidgetTest, unittest.TestCase):
OPTIONS = (
- 'class', 'cursor', 'height', 'padding', 'style', 'takefocus',
+ 'class', 'cursor', 'height', 'padding', 'style', 'takefocus', 'width',
)
def setUp(self):
diff --git a/Lib/tkinter/test/widget_tests.py b/Lib/tkinter/test/widget_tests.py
index 779538d2e0..75a068fbbf 100644
--- a/Lib/tkinter/test/widget_tests.py
+++ b/Lib/tkinter/test/widget_tests.py
@@ -206,6 +206,33 @@ class AbstractWidgetTest(AbstractTkTest):
break
+ def test_keys(self):
+ widget = self.create()
+ keys = widget.keys()
+ # XXX
+ if not isinstance(widget, Scale):
+ self.assertEqual(sorted(keys), sorted(widget.configure()))
+ for k in keys:
+ widget[k]
+ # Test if OPTIONS contains all keys
+ if test.support.verbose:
+ aliases = {
+ 'bd': 'borderwidth',
+ 'bg': 'background',
+ 'fg': 'foreground',
+ 'invcmd': 'invalidcommand',
+ 'vcmd': 'validatecommand',
+ }
+ keys = set(keys)
+ expected = set(self.OPTIONS)
+ for k in sorted(keys - expected):
+ if not (k in aliases and
+ aliases[k] in keys and
+ aliases[k] in expected):
+ print('%s.OPTIONS doesn\'t contain "%s"' %
+ (self.__class__.__name__, k))
+
+
class StandardOptionsTests:
STANDARD_OPTIONS = (
'activebackground', 'activeborderwidth', 'activeforeground', 'anchor',
diff --git a/Lib/tkinter/tix.py b/Lib/tkinter/tix.py
index c1cdfa7c03..f667933a1e 100644
--- a/Lib/tkinter/tix.py
+++ b/Lib/tkinter/tix.py
@@ -221,7 +221,7 @@ class Tk(tkinter.Tk, tixCommand):
self.tk.eval('package require Tix')
def destroy(self):
- # For safety, remove an delete_window binding before destroy
+ # For safety, remove the delete_window binding before destroy
self.protocol("WM_DELETE_WINDOW", "")
tkinter.Tk.destroy(self)
@@ -702,7 +702,7 @@ class DirSelectBox(TixWidget):
class ExFileSelectBox(TixWidget):
"""ExFileSelectBox - MS Windows style file select box.
- It provides an convenient method for the user to select files.
+ It provides a convenient method for the user to select files.
Subwidget Class
--------- -----
@@ -760,7 +760,7 @@ class DirSelectDialog(TixWidget):
# Should inherit from a Dialog class
class ExFileSelectDialog(TixWidget):
"""ExFileSelectDialog - MS Windows style file select dialog.
- It provides an convenient method for the user to select files.
+ It provides a convenient method for the user to select files.
Subwidgets Class
---------- -----
@@ -1052,8 +1052,8 @@ class InputOnly(TixWidget):
class LabelEntry(TixWidget):
"""LabelEntry - Entry field with label. Packages an entry widget
- and a label into one mega widget. It can beused be used to simplify
- the creation of ``entry-form'' type of interface.
+ and a label into one mega widget. It can be used to simplify the creation
+ of ``entry-form'' type of interface.
Subwidgets Class
---------- -----
diff --git a/Lib/tkinter/ttk.py b/Lib/tkinter/ttk.py
index 244fb3dd74..8f9369b060 100644
--- a/Lib/tkinter/ttk.py
+++ b/Lib/tkinter/ttk.py
@@ -1012,7 +1012,7 @@ class Progressbar(Widget):
"""Begin autoincrement mode: schedules a recurring timer event
that calls method step every interval milliseconds.
- interval defaults to 50 milliseconds (20 steps/second) if ommited."""
+ interval defaults to 50 milliseconds (20 steps/second) if omitted."""
self.tk.call(self._w, "start", interval)
@@ -1474,7 +1474,7 @@ class LabeledScale(Frame):
can be accessed through instance.label"""
def __init__(self, master=None, variable=None, from_=0, to=10, **kw):
- """Construct an horizontal LabeledScale with parent master, a
+ """Construct a horizontal LabeledScale with parent master, a
variable to be associated with the Ttk Scale widget and its range.
If variable is not specified, a tkinter.IntVar is created.
diff --git a/Lib/token.py b/Lib/token.py
index 7470c8c376..5fdb222133 100644
--- a/Lib/token.py
+++ b/Lib/token.py
@@ -60,11 +60,14 @@ DOUBLESTAREQUAL = 46
DOUBLESLASH = 47
DOUBLESLASHEQUAL = 48
AT = 49
-RARROW = 50
-ELLIPSIS = 51
-OP = 52
-ERRORTOKEN = 53
-N_TOKENS = 54
+ATEQUAL = 50
+RARROW = 51
+ELLIPSIS = 52
+OP = 53
+AWAIT = 54
+ASYNC = 55
+ERRORTOKEN = 56
+N_TOKENS = 57
NT_OFFSET = 256
#--end constants--
@@ -96,8 +99,8 @@ def _main():
except OSError as err:
sys.stdout.write("I/O error: %s\n" % str(err))
sys.exit(1)
- lines = fp.read().split("\n")
- fp.close()
+ with fp:
+ lines = fp.read().split("\n")
prog = re.compile(
"#define[ \t][ \t]*([A-Z0-9][A-Z0-9_]*)[ \t][ \t]*([0-9][0-9]*)",
re.IGNORECASE)
@@ -115,8 +118,8 @@ def _main():
except OSError as err:
sys.stderr.write("I/O error: %s\n" % str(err))
sys.exit(2)
- format = fp.read().split("\n")
- fp.close()
+ with fp:
+ format = fp.read().split("\n")
try:
start = format.index("#--start constants--") + 1
end = format.index("#--end constants--")
@@ -132,8 +135,8 @@ def _main():
except OSError as err:
sys.stderr.write("I/O error: %s\n" % str(err))
sys.exit(4)
- fp.write("\n".join(format))
- fp.close()
+ with fp:
+ fp.write("\n".join(format))
if __name__ == "__main__":
diff --git a/Lib/tokenize.py b/Lib/tokenize.py
index 4d93a83e29..b1d0c83263 100644
--- a/Lib/tokenize.py
+++ b/Lib/tokenize.py
@@ -33,7 +33,7 @@ import re
import sys
from token import *
-cookie_re = re.compile(r'^[ \t\f]*#.*coding[:=][ \t]*([-\w.]+)', re.ASCII)
+cookie_re = re.compile(r'^[ \t\f]*#.*?coding[:=][ \t]*([-\w.]+)', re.ASCII)
blank_re = re.compile(br'^[ \t\f]*(?:[#\r\n]|$)', re.ASCII)
import token
@@ -91,7 +91,8 @@ EXACT_TOKEN_TYPES = {
'**=': DOUBLESTAREQUAL,
'//': DOUBLESLASH,
'//=': DOUBLESLASHEQUAL,
- '@': AT
+ '@': AT,
+ '@=': ATEQUAL,
}
class TokenInfo(collections.namedtuple('TokenInfo', 'type string start end line')):
@@ -150,7 +151,7 @@ String = group(StringPrefix + r"'[^\n'\\]*(?:\\.[^\n'\\]*)*'",
# recognized as two instances of =).
Operator = group(r"\*\*=?", r">>=?", r"<<=?", r"!=",
r"//=?", r"->",
- r"[+\-*/%&|^=<>]=?",
+ r"[+\-*/%&@|^=<>]=?",
r"~")
Bracket = '[][(){}]'
@@ -186,7 +187,6 @@ endpats = {"'": Single, '"': Double,
"rB'''": Single3, 'rB"""': Double3,
"RB'''": Single3, 'RB"""': Double3,
"u'''": Single3, 'u"""': Double3,
- "R'''": Single3, 'R"""': Double3,
"U'''": Single3, 'U"""': Double3,
'r': None, 'R': None, 'b': None, 'B': None,
'u': None, 'U': None}
@@ -291,7 +291,7 @@ class Untokenizer:
self.encoding = tokval
continue
- if toknum in (NAME, NUMBER):
+ if toknum in (NAME, NUMBER, ASYNC, AWAIT):
tokval += ' '
# Insert a space between two consecutive strings
@@ -328,8 +328,8 @@ def untokenize(iterable):
Round-trip invariant for full input:
Untokenized source will match input source exactly
- Round-trip invariant for limited intput:
- # Output bytes will tokenize the back to the input
+ Round-trip invariant for limited input:
+ # Output bytes will tokenize back to the input
t1 = [tok[:2] for tok in tokenize(f.readline)]
newcode = untokenize(t1)
readline = BytesIO(newcode).readline
@@ -465,10 +465,10 @@ def open(filename):
def tokenize(readline):
"""
- The tokenize() generator requires one argment, readline, which
+ The tokenize() generator requires one argument, readline, which
must be a callable object which provides the same interface as the
readline() method of built-in file objects. Each call to the function
- should return one line of input as bytes. Alternately, readline
+ should return one line of input as bytes. Alternatively, readline
can be a callable function terminating with StopIteration:
readline = open(myfile, 'rb').__next__ # Example of alternate readline
@@ -498,6 +498,12 @@ def _tokenize(readline, encoding):
contline = None
indents = [0]
+ # 'stashed' and 'async_*' are used for async/await parsing
+ stashed = None
+ async_def = False
+ async_def_indent = 0
+ async_def_nl = False
+
if encoding is not None:
if encoding == "utf-8-sig":
# BOM will already have been stripped.
@@ -573,8 +579,19 @@ def _tokenize(readline, encoding):
"unindent does not match any outer indentation level",
("<tokenize>", lnum, pos, line))
indents = indents[:-1]
+
+ if async_def and async_def_indent >= indents[-1]:
+ async_def = False
+ async_def_nl = False
+ async_def_indent = 0
+
yield TokenInfo(DEDENT, '', (lnum, pos), (lnum, pos), line)
+ if async_def and async_def_nl and async_def_indent >= indents[-1]:
+ async_def = False
+ async_def_nl = False
+ async_def_indent = 0
+
else: # continued statement
if not line:
raise TokenError("EOF in multi-line statement", (lnum, 0))
@@ -593,10 +610,21 @@ def _tokenize(readline, encoding):
(initial == '.' and token != '.' and token != '...')):
yield TokenInfo(NUMBER, token, spos, epos, line)
elif initial in '\r\n':
- yield TokenInfo(NL if parenlev > 0 else NEWLINE,
- token, spos, epos, line)
+ if stashed:
+ yield stashed
+ stashed = None
+ if parenlev > 0:
+ yield TokenInfo(NL, token, spos, epos, line)
+ else:
+ yield TokenInfo(NEWLINE, token, spos, epos, line)
+ if async_def:
+ async_def_nl = True
+
elif initial == '#':
assert not token.endswith("\n")
+ if stashed:
+ yield stashed
+ stashed = None
yield TokenInfo(COMMENT, token, spos, epos, line)
elif token in triple_quoted:
endprog = _compile(endpats[token])
@@ -624,7 +652,36 @@ def _tokenize(readline, encoding):
else: # ordinary string
yield TokenInfo(STRING, token, spos, epos, line)
elif initial.isidentifier(): # ordinary name
- yield TokenInfo(NAME, token, spos, epos, line)
+ if token in ('async', 'await'):
+ if async_def:
+ yield TokenInfo(
+ ASYNC if token == 'async' else AWAIT,
+ token, spos, epos, line)
+ continue
+
+ tok = TokenInfo(NAME, token, spos, epos, line)
+ if token == 'async' and not stashed:
+ stashed = tok
+ continue
+
+ if token == 'def':
+ if (stashed
+ and stashed.type == NAME
+ and stashed.string == 'async'):
+
+ async_def = True
+ async_def_indent = indents[-1]
+
+ yield TokenInfo(ASYNC, stashed.string,
+ stashed.start, stashed.end,
+ stashed.line)
+ stashed = None
+
+ if stashed:
+ yield stashed
+ stashed = None
+
+ yield tok
elif initial == '\\': # continued stmt
continued = 1
else:
@@ -632,12 +689,19 @@ def _tokenize(readline, encoding):
parenlev += 1
elif initial in ')]}':
parenlev -= 1
+ if stashed:
+ yield stashed
+ stashed = None
yield TokenInfo(OP, token, spos, epos, line)
else:
yield TokenInfo(ERRORTOKEN, line[pos],
(lnum, pos), (lnum, pos+1), line)
pos += 1
+ if stashed:
+ yield stashed
+ stashed = None
+
for indent in indents[1:]: # pop remaining indent levels
yield TokenInfo(DEDENT, '', (lnum, 0), (lnum, 0), '')
yield TokenInfo(ENDMARKER, '', (lnum, 0), (lnum, 0), '')
diff --git a/Lib/trace.py b/Lib/trace.py
index 09fe9ee0e4..f108266816 100755
--- a/Lib/trace.py
+++ b/Lib/trace.py
@@ -59,10 +59,7 @@ import gc
import dis
import pickle
from warnings import warn as _warn
-try:
- from time import monotonic as _time
-except ImportError:
- from time import time as _time
+from time import monotonic as _time
try:
import threading
@@ -235,8 +232,8 @@ class CoverageResults:
if self.infile:
# Try to merge existing counts file.
try:
- counts, calledfuncs, callers = \
- pickle.load(open(self.infile, 'rb'))
+ with open(self.infile, 'rb') as f:
+ counts, calledfuncs, callers = pickle.load(f)
self.update(self.__class__(counts, calledfuncs, callers))
except (OSError, EOFError, ValueError) as err:
print(("Skipping counts file %r: %s"
@@ -308,7 +305,7 @@ class CoverageResults:
if self.is_ignored_filename(filename):
continue
- if filename.endswith((".pyc", ".pyo")):
+ if filename.endswith(".pyc"):
filename = filename[:-1]
if coverdir is None:
@@ -326,16 +323,17 @@ class CoverageResults:
lnotab = _find_executable_linenos(filename)
else:
lnotab = {}
+ if lnotab:
+ source = linecache.getlines(filename)
+ coverpath = os.path.join(dir, modulename + ".cover")
+ with open(filename, 'rb') as fp:
+ encoding, _ = tokenize.detect_encoding(fp.readline)
+ n_hits, n_lines = self.write_results_file(coverpath, source,
+ lnotab, count, encoding)
+ if summary and n_lines:
+ percent = int(100 * n_hits / n_lines)
+ sums[modulename] = n_lines, percent, modulename, filename
- source = linecache.getlines(filename)
- coverpath = os.path.join(dir, modulename + ".cover")
- with open(filename, 'rb') as fp:
- encoding, _ = tokenize.detect_encoding(fp.readline)
- n_hits, n_lines = self.write_results_file(coverpath, source,
- lnotab, count, encoding)
- if summary and n_lines:
- percent = int(100 * n_hits / n_lines)
- sums[modulename] = n_lines, percent, modulename, filename
if summary and sums:
print("lines cov% module (path)")
@@ -363,26 +361,26 @@ class CoverageResults:
n_lines = 0
n_hits = 0
- for lineno, line in enumerate(lines, 1):
- # do the blank/comment match to try to mark more lines
- # (help the reader find stuff that hasn't been covered)
- if lineno in lines_hit:
- outfile.write("%5d: " % lines_hit[lineno])
- n_hits += 1
- n_lines += 1
- elif rx_blank.match(line):
- outfile.write(" ")
- else:
- # lines preceded by no marks weren't hit
- # Highlight them if so indicated, unless the line contains
- # #pragma: NO COVER
- if lineno in lnotab and not PRAGMA_NOCOVER in line:
- outfile.write(">>>>>> ")
+ with outfile:
+ for lineno, line in enumerate(lines, 1):
+ # do the blank/comment match to try to mark more lines
+ # (help the reader find stuff that hasn't been covered)
+ if lineno in lines_hit:
+ outfile.write("%5d: " % lines_hit[lineno])
+ n_hits += 1
n_lines += 1
- else:
+ elif rx_blank.match(line):
outfile.write(" ")
- outfile.write(line.expandtabs(8))
- outfile.close()
+ else:
+ # lines preceded by no marks weren't hit
+ # Highlight them if so indicated, unless the line contains
+ # #pragma: NO COVER
+ if lineno in lnotab and not PRAGMA_NOCOVER in line:
+ outfile.write(">>>>>> ")
+ n_lines += 1
+ else:
+ outfile.write(" ")
+ outfile.write(line.expandtabs(8))
return n_hits, n_lines
diff --git a/Lib/traceback.py b/Lib/traceback.py
index faf593a735..a2eb539c02 100644
--- a/Lib/traceback.py
+++ b/Lib/traceback.py
@@ -1,32 +1,27 @@
"""Extract, format and print information about Python stack traces."""
+import collections
+import itertools
import linecache
import sys
-import operator
__all__ = ['extract_stack', 'extract_tb', 'format_exception',
'format_exception_only', 'format_list', 'format_stack',
'format_tb', 'print_exc', 'format_exc', 'print_exception',
- 'print_last', 'print_stack', 'print_tb',
- 'clear_frames']
+ 'print_last', 'print_stack', 'print_tb', 'clear_frames',
+ 'FrameSummary', 'StackSummary', 'TracebackException',
+ 'walk_stack', 'walk_tb']
#
# Formatting and printing lists of traceback lines.
#
-def _format_list_iter(extracted_list):
- for filename, lineno, name, line in extracted_list:
- item = ' File "{}", line {}, in {}\n'.format(filename, lineno, name)
- if line:
- item = item + ' {}\n'.format(line.strip())
- yield item
-
def print_list(extracted_list, file=None):
"""Print the list of tuples as returned by extract_tb() or
extract_stack() as a formatted stack trace to the given file."""
if file is None:
file = sys.stderr
- for item in _format_list_iter(extracted_list):
+ for item in StackSummary.from_list(extracted_list).format():
print(item, file=file, end="")
def format_list(extracted_list):
@@ -39,45 +34,12 @@ def format_list(extracted_list):
the strings may contain internal newlines as well, for those items
whose source text line is not None.
"""
- return list(_format_list_iter(extracted_list))
+ return StackSummary.from_list(extracted_list).format()
#
# Printing and Extracting Tracebacks.
#
-# extractor takes curr and needs to return a tuple of:
-# - Frame object
-# - Line number
-# - Next item (same type as curr)
-# In practice, curr is either a traceback or a frame.
-def _extract_tb_or_stack_iter(curr, limit, extractor):
- if limit is None:
- limit = getattr(sys, 'tracebacklimit', None)
-
- n = 0
- while curr is not None and (limit is None or n < limit):
- f, lineno, next_item = extractor(curr)
- co = f.f_code
- filename = co.co_filename
- name = co.co_name
-
- linecache.checkcache(filename)
- line = linecache.getline(filename, lineno, f.f_globals)
-
- if line:
- line = line.strip()
- else:
- line = None
-
- yield (filename, lineno, name, line)
- curr = next_item
- n += 1
-
-def _extract_tb_iter(tb, limit):
- return _extract_tb_or_stack_iter(
- tb, limit,
- operator.attrgetter("tb_frame", "tb_lineno", "tb_next"))
-
def print_tb(tb, limit=None, file=None):
"""Print up to 'limit' stack trace entries from the traceback 'tb'.
@@ -90,7 +52,7 @@ def print_tb(tb, limit=None, file=None):
def format_tb(tb, limit=None):
"""A shorthand for 'format_list(extract_tb(tb, limit))'."""
- return format_list(extract_tb(tb, limit=limit))
+ return extract_tb(tb, limit=limit).format()
def extract_tb(tb, limit=None):
"""Return list of up to limit pre-processed entries from traceback.
@@ -103,7 +65,7 @@ def extract_tb(tb, limit=None):
leading and trailing whitespace stripped; if the source is not
available it is None.
"""
- return list(_extract_tb_iter(tb, limit=limit))
+ return StackSummary.extract(walk_tb(tb), limit=limit)
#
# Exception formatting and output.
@@ -111,47 +73,12 @@ def extract_tb(tb, limit=None):
_cause_message = (
"\nThe above exception was the direct cause "
- "of the following exception:\n")
+ "of the following exception:\n\n")
_context_message = (
"\nDuring handling of the above exception, "
- "another exception occurred:\n")
-
-def _iter_chain(exc, custom_tb=None, seen=None):
- if seen is None:
- seen = set()
- seen.add(exc)
- its = []
- context = exc.__context__
- cause = exc.__cause__
- if cause is not None and cause not in seen:
- its.append(_iter_chain(cause, False, seen))
- its.append([(_cause_message, None)])
- elif (context is not None and
- not exc.__suppress_context__ and
- context not in seen):
- its.append(_iter_chain(context, None, seen))
- its.append([(_context_message, None)])
- its.append([(exc, custom_tb or exc.__traceback__)])
- # itertools.chain is in an extension module and may be unavailable
- for it in its:
- yield from it
-
-def _format_exception_iter(etype, value, tb, limit, chain):
- if chain:
- values = _iter_chain(value, tb)
- else:
- values = [(value, tb)]
-
- for value, tb in values:
- if isinstance(value, str):
- # This is a cause/context message line
- yield value + '\n'
- continue
- if tb:
- yield 'Traceback (most recent call last):\n'
- yield from _format_list_iter(_extract_tb_iter(tb, limit=limit))
- yield from _format_exception_only_iter(type(value), value)
+ "another exception occurred:\n\n")
+
def print_exception(etype, value, tb, limit=None, file=None, chain=True):
"""Print exception up to 'limit' stack trace entries from 'tb' to 'file'.
@@ -164,11 +91,16 @@ def print_exception(etype, value, tb, limit=None, file=None, chain=True):
occurred with a caret on the next line indicating the approximate
position of the error.
"""
+ # format_exception has ignored etype for some time, and code such as cgitb
+ # passes in bogus values as a result. For compatibility with such code we
+ # ignore it here (rather than in the new TracebackException API).
if file is None:
file = sys.stderr
- for line in _format_exception_iter(etype, value, tb, limit, chain):
+ for line in TracebackException(
+ type(value), value, tb, limit=limit).format(chain=chain):
print(line, file=file, end="")
+
def format_exception(etype, value, tb, limit=None, chain=True):
"""Format a stack trace and the exception information.
@@ -178,7 +110,12 @@ def format_exception(etype, value, tb, limit=None, chain=True):
these lines are concatenated and printed, exactly the same text is
printed as does print_exception().
"""
- return list(_format_exception_iter(etype, value, tb, limit, chain))
+ # format_exception has ignored etype for some time, and code such as cgitb
+ # passes in bogus values as a result. For compatibility with such code we
+ # ignore it here (rather than in the new TracebackException API).
+ return list(TracebackException(
+ type(value), value, tb, limit=limit).format(chain=chain))
+
def format_exception_only(etype, value):
"""Format the exception part of a traceback.
@@ -196,46 +133,14 @@ def format_exception_only(etype, value):
string in the list.
"""
- return list(_format_exception_only_iter(etype, value))
-
-def _format_exception_only_iter(etype, value):
- # Gracefully handle (the way Python 2.4 and earlier did) the case of
- # being called with (None, None).
- if etype is None:
- yield _format_final_exc_line(etype, value)
- return
-
- stype = etype.__name__
- smod = etype.__module__
- if smod not in ("__main__", "builtins"):
- stype = smod + '.' + stype
-
- if not issubclass(etype, SyntaxError):
- yield _format_final_exc_line(stype, value)
- return
-
- # It was a syntax error; show exactly where the problem was found.
- filename = value.filename or "<string>"
- lineno = str(value.lineno) or '?'
- yield ' File "{}", line {}\n'.format(filename, lineno)
-
- badline = value.text
- offset = value.offset
- if badline is not None:
- yield ' {}\n'.format(badline.strip())
- if offset is not None:
- caretspace = badline.rstrip('\n')
- offset = min(len(caretspace), offset) - 1
- caretspace = caretspace[:offset].lstrip()
- # non-space whitespace (likes tabs) must be kept for alignment
- caretspace = ((c.isspace() and c or ' ') for c in caretspace)
- yield ' {}^\n'.format(''.join(caretspace))
- msg = value.msg or "<no detail available>"
- yield "{}: {}\n".format(stype, msg)
+ return list(TracebackException(etype, value, None).format_exception_only())
+
+
+# -- not official API but folk probably use these two functions.
def _format_final_exc_line(etype, value):
valuestr = _some_str(value)
- if value is None or not valuestr:
+ if value == 'None' or value is None or not valuestr:
line = "%s\n" % etype
else:
line = "%s: %s\n" % (etype, valuestr)
@@ -247,6 +152,8 @@ def _some_str(value):
except:
return '<unprintable %s object>' % type(value).__name__
+# --
+
def print_exc(limit=None, file=None, chain=True):
"""Shorthand for 'print_exception(*sys.exc_info(), limit, file)'."""
print_exception(*sys.exc_info(), limit=limit, file=file, chain=chain)
@@ -267,15 +174,6 @@ def print_last(limit=None, file=None, chain=True):
# Printing and Extracting Stacks.
#
-def _extract_stack_iter(f, limit=None):
- return _extract_tb_or_stack_iter(
- f, limit, lambda f: (f, f.f_lineno, f.f_back))
-
-def _get_stack(f):
- if f is None:
- f = sys._getframe().f_back.f_back
- return f
-
def print_stack(f=None, limit=None, file=None):
"""Print a stack trace from its invocation point.
@@ -283,11 +181,17 @@ def print_stack(f=None, limit=None, file=None):
stack frame at which to start. The optional 'limit' and 'file'
arguments have the same meaning as for print_exception().
"""
- print_list(extract_stack(_get_stack(f), limit=limit), file=file)
+ if f is None:
+ f = sys._getframe().f_back
+ print_list(extract_stack(f, limit=limit), file=file)
+
def format_stack(f=None, limit=None):
"""Shorthand for 'format_list(extract_stack(f, limit))'."""
- return format_list(extract_stack(_get_stack(f), limit=limit))
+ if f is None:
+ f = sys._getframe().f_back
+ return format_list(extract_stack(f, limit=limit))
+
def extract_stack(f=None, limit=None):
"""Extract the raw traceback from the current stack frame.
@@ -298,10 +202,13 @@ def extract_stack(f=None, limit=None):
line number, function name, text), and the entries are in order
from oldest to newest stack frame.
"""
- stack = list(_extract_stack_iter(_get_stack(f), limit=limit))
+ if f is None:
+ f = sys._getframe().f_back
+ stack = StackSummary.extract(walk_stack(f), limit=limit)
stack.reverse()
return stack
+
def clear_frames(tb):
"Clear all references to local variables in the frames of a traceback."
while tb is not None:
@@ -311,3 +218,361 @@ def clear_frames(tb):
# Ignore the exception raised if the frame is still executing.
pass
tb = tb.tb_next
+
+
+class FrameSummary:
+ """A single frame from a traceback.
+
+ - :attr:`filename` The filename for the frame.
+ - :attr:`lineno` The line within filename for the frame that was
+ active when the frame was captured.
+ - :attr:`name` The name of the function or method that was executing
+ when the frame was captured.
+ - :attr:`line` The text from the linecache module for the
+ of code that was running when the frame was captured.
+ - :attr:`locals` Either None if locals were not supplied, or a dict
+ mapping the name to the repr() of the variable.
+ """
+
+ __slots__ = ('filename', 'lineno', 'name', '_line', 'locals')
+
+ def __init__(self, filename, lineno, name, *, lookup_line=True,
+ locals=None, line=None):
+ """Construct a FrameSummary.
+
+ :param lookup_line: If True, `linecache` is consulted for the source
+ code line. Otherwise, the line will be looked up when first needed.
+ :param locals: If supplied the frame locals, which will be captured as
+ object representations.
+ :param line: If provided, use this instead of looking up the line in
+ the linecache.
+ """
+ self.filename = filename
+ self.lineno = lineno
+ self.name = name
+ self._line = line
+ if lookup_line:
+ self.line
+ self.locals = \
+ dict((k, repr(v)) for k, v in locals.items()) if locals else None
+
+ def __eq__(self, other):
+ if isinstance(other, FrameSummary):
+ return (self.filename == other.filename and
+ self.lineno == other.lineno and
+ self.name == other.name and
+ self.locals == other.locals)
+ if isinstance(other, tuple):
+ return (self.filename, self.lineno, self.name, self.line) == other
+ return NotImplemented
+
+ def __getitem__(self, pos):
+ return (self.filename, self.lineno, self.name, self.line)[pos]
+
+ def __iter__(self):
+ return iter([self.filename, self.lineno, self.name, self.line])
+
+ def __repr__(self):
+ return "<FrameSummary file {filename}, line {lineno} in {name}>".format(
+ filename=self.filename, lineno=self.lineno, name=self.name)
+
+ @property
+ def line(self):
+ if self._line is None:
+ self._line = linecache.getline(self.filename, self.lineno).strip()
+ return self._line
+
+
+def walk_stack(f):
+ """Walk a stack yielding the frame and line number for each frame.
+
+ This will follow f.f_back from the given frame. If no frame is given, the
+ current stack is used. Usually used with StackSummary.extract.
+ """
+ if f is None:
+ f = sys._getframe().f_back.f_back
+ while f is not None:
+ yield f, f.f_lineno
+ f = f.f_back
+
+
+def walk_tb(tb):
+ """Walk a traceback yielding the frame and line number for each frame.
+
+ This will follow tb.tb_next (and thus is in the opposite order to
+ walk_stack). Usually used with StackSummary.extract.
+ """
+ while tb is not None:
+ yield tb.tb_frame, tb.tb_lineno
+ tb = tb.tb_next
+
+
+class StackSummary(list):
+ """A stack of frames."""
+
+ @classmethod
+ def extract(klass, frame_gen, *, limit=None, lookup_lines=True,
+ capture_locals=False):
+ """Create a StackSummary from a traceback or stack object.
+
+ :param frame_gen: A generator that yields (frame, lineno) tuples to
+ include in the stack.
+ :param limit: None to include all frames or the number of frames to
+ include.
+ :param lookup_lines: If True, lookup lines for each frame immediately,
+ otherwise lookup is deferred until the frame is rendered.
+ :param capture_locals: If True, the local variables from each frame will
+ be captured as object representations into the FrameSummary.
+ """
+ if limit is None:
+ limit = getattr(sys, 'tracebacklimit', None)
+ if limit is not None and limit < 0:
+ limit = 0
+ if limit is not None:
+ if limit >= 0:
+ frame_gen = itertools.islice(frame_gen, limit)
+ else:
+ frame_gen = collections.deque(frame_gen, maxlen=-limit)
+
+ result = klass()
+ fnames = set()
+ for f, lineno in frame_gen:
+ co = f.f_code
+ filename = co.co_filename
+ name = co.co_name
+
+ fnames.add(filename)
+ linecache.lazycache(filename, f.f_globals)
+ # Must defer line lookups until we have called checkcache.
+ if capture_locals:
+ f_locals = f.f_locals
+ else:
+ f_locals = None
+ result.append(FrameSummary(
+ filename, lineno, name, lookup_line=False, locals=f_locals))
+ for filename in fnames:
+ linecache.checkcache(filename)
+ # If immediate lookup was desired, trigger lookups now.
+ if lookup_lines:
+ for f in result:
+ f.line
+ return result
+
+ @classmethod
+ def from_list(klass, a_list):
+ """Create a StackSummary from a simple list of tuples.
+
+ This method supports the older Python API. Each tuple should be a
+ 4-tuple with (filename, lineno, name, line) elements.
+ """
+ # While doing a fast-path check for isinstance(a_list, StackSummary) is
+ # appealing, idlelib.run.cleanup_traceback and other similar code may
+ # break this by making arbitrary frames plain tuples, so we need to
+ # check on a frame by frame basis.
+ result = StackSummary()
+ for frame in a_list:
+ if isinstance(frame, FrameSummary):
+ result.append(frame)
+ else:
+ filename, lineno, name, line = frame
+ result.append(FrameSummary(filename, lineno, name, line=line))
+ return result
+
+ def format(self):
+ """Format the stack ready for printing.
+
+ Returns a list of strings ready for printing. Each string in the
+ resulting list corresponds to a single frame from the stack.
+ Each string ends in a newline; the strings may contain internal
+ newlines as well, for those items with source text lines.
+ """
+ result = []
+ for frame in self:
+ row = []
+ row.append(' File "{}", line {}, in {}\n'.format(
+ frame.filename, frame.lineno, frame.name))
+ if frame.line:
+ row.append(' {}\n'.format(frame.line.strip()))
+ if frame.locals:
+ for name, value in sorted(frame.locals.items()):
+ row.append(' {name} = {value}\n'.format(name=name, value=value))
+ result.append(''.join(row))
+ return result
+
+
+class TracebackException:
+ """An exception ready for rendering.
+
+ The traceback module captures enough attributes from the original exception
+ to this intermediary form to ensure that no references are held, while
+ still being able to fully print or format it.
+
+ Use `from_exception` to create TracebackException instances from exception
+ objects, or the constructor to create TracebackException instances from
+ individual components.
+
+ - :attr:`__cause__` A TracebackException of the original *__cause__*.
+ - :attr:`__context__` A TracebackException of the original *__context__*.
+ - :attr:`__suppress_context__` The *__suppress_context__* value from the
+ original exception.
+ - :attr:`stack` A `StackSummary` representing the traceback.
+ - :attr:`exc_type` The class of the original traceback.
+ - :attr:`filename` For syntax errors - the filename where the error
+ occurred.
+ - :attr:`lineno` For syntax errors - the linenumber where the error
+ occurred.
+ - :attr:`text` For syntax errors - the text where the error
+ occurred.
+ - :attr:`offset` For syntax errors - the offset into the text where the
+ error occurred.
+ - :attr:`msg` For syntax errors - the compiler error message.
+ """
+
+ def __init__(self, exc_type, exc_value, exc_traceback, *, limit=None,
+ lookup_lines=True, capture_locals=False, _seen=None):
+ # NB: we need to accept exc_traceback, exc_value, exc_traceback to
+ # permit backwards compat with the existing API, otherwise we
+ # need stub thunk objects just to glue it together.
+ # Handle loops in __cause__ or __context__.
+ if _seen is None:
+ _seen = set()
+ _seen.add(exc_value)
+ # Gracefully handle (the way Python 2.4 and earlier did) the case of
+ # being called with no type or value (None, None, None).
+ if (exc_value and exc_value.__cause__ is not None
+ and exc_value.__cause__ not in _seen):
+ cause = TracebackException(
+ type(exc_value.__cause__),
+ exc_value.__cause__,
+ exc_value.__cause__.__traceback__,
+ limit=limit,
+ lookup_lines=False,
+ capture_locals=capture_locals,
+ _seen=_seen)
+ else:
+ cause = None
+ if (exc_value and exc_value.__context__ is not None
+ and exc_value.__context__ not in _seen):
+ context = TracebackException(
+ type(exc_value.__context__),
+ exc_value.__context__,
+ exc_value.__context__.__traceback__,
+ limit=limit,
+ lookup_lines=False,
+ capture_locals=capture_locals,
+ _seen=_seen)
+ else:
+ context = None
+ self.exc_traceback = exc_traceback
+ self.__cause__ = cause
+ self.__context__ = context
+ self.__suppress_context__ = \
+ exc_value.__suppress_context__ if exc_value else False
+ # TODO: locals.
+ self.stack = StackSummary.extract(
+ walk_tb(exc_traceback), limit=limit, lookup_lines=lookup_lines,
+ capture_locals=capture_locals)
+ self.exc_type = exc_type
+ # Capture now to permit freeing resources: only complication is in the
+ # unofficial API _format_final_exc_line
+ self._str = _some_str(exc_value)
+ if exc_type and issubclass(exc_type, SyntaxError):
+ # Handle SyntaxError's specially
+ self.filename = exc_value.filename
+ self.lineno = str(exc_value.lineno)
+ self.text = exc_value.text
+ self.offset = exc_value.offset
+ self.msg = exc_value.msg
+ if lookup_lines:
+ self._load_lines()
+
+ @classmethod
+ def from_exception(self, exc, *args, **kwargs):
+ """Create a TracebackException from an exception."""
+ return TracebackException(
+ type(exc), exc, exc.__traceback__, *args, **kwargs)
+
+ def _load_lines(self):
+ """Private API. force all lines in the stack to be loaded."""
+ for frame in self.stack:
+ frame.line
+ if self.__context__:
+ self.__context__._load_lines()
+ if self.__cause__:
+ self.__cause__._load_lines()
+
+ def __eq__(self, other):
+ return self.__dict__ == other.__dict__
+
+ def __str__(self):
+ return self._str
+
+ def format_exception_only(self):
+ """Format the exception part of the traceback.
+
+ The return value is a generator of strings, each ending in a newline.
+
+ Normally, the generator emits a single string; however, for
+ SyntaxError exceptions, it emites several lines that (when
+ printed) display detailed information about where the syntax
+ error occurred.
+
+ The message indicating which exception occurred is always the last
+ string in the output.
+ """
+ if self.exc_type is None:
+ yield _format_final_exc_line(None, self._str)
+ return
+
+ stype = self.exc_type.__qualname__
+ smod = self.exc_type.__module__
+ if smod not in ("__main__", "builtins"):
+ stype = smod + '.' + stype
+
+ if not issubclass(self.exc_type, SyntaxError):
+ yield _format_final_exc_line(stype, self._str)
+ return
+
+ # It was a syntax error; show exactly where the problem was found.
+ filename = self.filename or "<string>"
+ lineno = str(self.lineno) or '?'
+ yield ' File "{}", line {}\n'.format(filename, lineno)
+
+ badline = self.text
+ offset = self.offset
+ if badline is not None:
+ yield ' {}\n'.format(badline.strip())
+ if offset is not None:
+ caretspace = badline.rstrip('\n')
+ offset = min(len(caretspace), offset) - 1
+ caretspace = caretspace[:offset].lstrip()
+ # non-space whitespace (likes tabs) must be kept for alignment
+ caretspace = ((c.isspace() and c or ' ') for c in caretspace)
+ yield ' {}^\n'.format(''.join(caretspace))
+ msg = self.msg or "<no detail available>"
+ yield "{}: {}\n".format(stype, msg)
+
+ def format(self, *, chain=True):
+ """Format the exception.
+
+ If chain is not *True*, *__cause__* and *__context__* will not be formatted.
+
+ The return value is a generator of strings, each ending in a newline and
+ some containing internal newlines. `print_exception` is a wrapper around
+ this method which just prints the lines to a file.
+
+ The message indicating which exception occurred is always the last
+ string in the output.
+ """
+ if chain:
+ if self.__cause__ is not None:
+ yield from self.__cause__.format(chain=chain)
+ yield _cause_message
+ elif (self.__context__ is not None and
+ not self.__suppress_context__):
+ yield from self.__context__.format(chain=chain)
+ yield _context_message
+ if self.exc_traceback is not None:
+ yield 'Traceback (most recent call last):\n'
+ yield from self.stack.format()
+ yield from self.format_exception_only()
diff --git a/Lib/tracemalloc.py b/Lib/tracemalloc.py
index adedfc5fb4..6288da8409 100644
--- a/Lib/tracemalloc.py
+++ b/Lib/tracemalloc.py
@@ -297,7 +297,7 @@ class _Traces(Sequence):
def _normalize_filename(filename):
filename = os.path.normcase(filename)
- if filename.endswith(('.pyc', '.pyo')):
+ if filename.endswith('.pyc'):
filename = filename[:-1]
return filename
diff --git a/Lib/turtledemo/__main__.py b/Lib/turtledemo/__main__.py
index 106d058808..711d0abf2e 100755..100644
--- a/Lib/turtledemo/__main__.py
+++ b/Lib/turtledemo/__main__.py
@@ -89,8 +89,8 @@ import sys
import os
from tkinter import *
+from idlelib.ColorDelegator import ColorDelegator, color_config
from idlelib.Percolator import Percolator
-from idlelib.ColorDelegator import ColorDelegator
from idlelib.textView import view_text
from turtledemo import __doc__ as about_turtledemo
@@ -124,6 +124,8 @@ help_entries = ( # (help_label, help_doc)
('About turtle module', turtle.__doc__),
)
+
+
class DemoWindow(object):
def __init__(self, filename=None):
@@ -204,6 +206,7 @@ class DemoWindow(object):
self.text_frame = text_frame = Frame(root)
self.text = text = Text(text_frame, name='text', padx=5,
wrap='none', width=45)
+ color_config(text)
self.vbar = vbar = Scrollbar(text_frame, name='vbar')
vbar['command'] = text.yview
diff --git a/Lib/turtledemo/bytedesign.py b/Lib/turtledemo/bytedesign.py
index 64b1d7d5b0..64b1d7d5b0 100644..100755
--- a/Lib/turtledemo/bytedesign.py
+++ b/Lib/turtledemo/bytedesign.py
diff --git a/Lib/turtledemo/sorting_animate.py b/Lib/turtledemo/sorting_animate.py
new file mode 100644
index 0000000000..d25a0ab6ce
--- /dev/null
+++ b/Lib/turtledemo/sorting_animate.py
@@ -0,0 +1,204 @@
+#!/usr/bin/env python3
+"""
+
+ sorting_animation.py
+
+A minimal sorting algorithm animation:
+Sorts a shelf of 10 blocks using insertion
+sort, selection sort and quicksort.
+
+Shelfs are implemented using builtin lists.
+
+Blocks are turtles with shape "square", but
+stretched to rectangles by shapesize()
+ ---------------------------------------
+ To exit press space button
+ ---------------------------------------
+"""
+from turtle import *
+import random
+
+
+class Block(Turtle):
+
+ def __init__(self, size):
+ self.size = size
+ Turtle.__init__(self, shape="square", visible=False)
+ self.pu()
+ self.shapesize(size * 1.5, 1.5, 2) # square-->rectangle
+ self.fillcolor("black")
+ self.st()
+
+ def glow(self):
+ self.fillcolor("red")
+
+ def unglow(self):
+ self.fillcolor("black")
+
+ def __repr__(self):
+ return "Block size: {0}".format(self.size)
+
+
+class Shelf(list):
+
+ def __init__(self, y):
+ "create a shelf. y is y-position of first block"
+ self.y = y
+ self.x = -150
+
+ def push(self, d):
+ width, _, _ = d.shapesize()
+ # align blocks by the bottom edge
+ y_offset = width / 2 * 20
+ d.sety(self.y + y_offset)
+ d.setx(self.x + 34 * len(self))
+ self.append(d)
+
+ def _close_gap_from_i(self, i):
+ for b in self[i:]:
+ xpos, _ = b.pos()
+ b.setx(xpos - 34)
+
+ def _open_gap_from_i(self, i):
+ for b in self[i:]:
+ xpos, _ = b.pos()
+ b.setx(xpos + 34)
+
+ def pop(self, key):
+ b = list.pop(self, key)
+ b.glow()
+ b.sety(200)
+ self._close_gap_from_i(key)
+ return b
+
+ def insert(self, key, b):
+ self._open_gap_from_i(key)
+ list.insert(self, key, b)
+ b.setx(self.x + 34 * key)
+ width, _, _ = b.shapesize()
+ # align blocks by the bottom edge
+ y_offset = width / 2 * 20
+ b.sety(self.y + y_offset)
+ b.unglow()
+
+def isort(shelf):
+ length = len(shelf)
+ for i in range(1, length):
+ hole = i
+ while hole > 0 and shelf[i].size < shelf[hole - 1].size:
+ hole = hole - 1
+ shelf.insert(hole, shelf.pop(i))
+ return
+
+def ssort(shelf):
+ length = len(shelf)
+ for j in range(0, length - 1):
+ imin = j
+ for i in range(j + 1, length):
+ if shelf[i].size < shelf[imin].size:
+ imin = i
+ if imin != j:
+ shelf.insert(j, shelf.pop(imin))
+
+def partition(shelf, left, right, pivot_index):
+ pivot = shelf[pivot_index]
+ shelf.insert(right, shelf.pop(pivot_index))
+ store_index = left
+ for i in range(left, right): # range is non-inclusive of ending value
+ if shelf[i].size < pivot.size:
+ shelf.insert(store_index, shelf.pop(i))
+ store_index = store_index + 1
+ shelf.insert(store_index, shelf.pop(right)) # move pivot to correct position
+ return store_index
+
+def qsort(shelf, left, right):
+ if left < right:
+ pivot_index = left
+ pivot_new_index = partition(shelf, left, right, pivot_index)
+ qsort(shelf, left, pivot_new_index - 1)
+ qsort(shelf, pivot_new_index + 1, right)
+
+def randomize():
+ disable_keys()
+ clear()
+ target = list(range(10))
+ random.shuffle(target)
+ for i, t in enumerate(target):
+ for j in range(i, len(s)):
+ if s[j].size == t + 1:
+ s.insert(i, s.pop(j))
+ show_text(instructions1)
+ show_text(instructions2, line=1)
+ enable_keys()
+
+def show_text(text, line=0):
+ line = 20 * line
+ goto(0,-250 - line)
+ write(text, align="center", font=("Courier", 16, "bold"))
+
+def start_ssort():
+ disable_keys()
+ clear()
+ show_text("Selection Sort")
+ ssort(s)
+ clear()
+ show_text(instructions1)
+ show_text(instructions2, line=1)
+ enable_keys()
+
+def start_isort():
+ disable_keys()
+ clear()
+ show_text("Insertion Sort")
+ isort(s)
+ clear()
+ show_text(instructions1)
+ show_text(instructions2, line=1)
+ enable_keys()
+
+def start_qsort():
+ disable_keys()
+ clear()
+ show_text("Quicksort")
+ qsort(s, 0, len(s) - 1)
+ clear()
+ show_text(instructions1)
+ show_text(instructions2, line=1)
+ enable_keys()
+
+def init_shelf():
+ global s
+ s = Shelf(-200)
+ vals = (4, 2, 8, 9, 1, 5, 10, 3, 7, 6)
+ for i in vals:
+ s.push(Block(i))
+
+def disable_keys():
+ onkey(None, "s")
+ onkey(None, "i")
+ onkey(None, "q")
+ onkey(None, "r")
+
+def enable_keys():
+ onkey(start_isort, "i")
+ onkey(start_ssort, "s")
+ onkey(start_qsort, "q")
+ onkey(randomize, "r")
+ onkey(bye, "space")
+
+def main():
+ getscreen().clearscreen()
+ ht(); penup()
+ init_shelf()
+ show_text(instructions1)
+ show_text(instructions2, line=1)
+ enable_keys()
+ listen()
+ return "EVENTLOOP"
+
+instructions1 = "press i for insertion sort, s for selection sort, q for quicksort"
+instructions2 = "spacebar to quit, r to randomize"
+
+if __name__=="__main__":
+ msg = main()
+ mainloop()
diff --git a/Lib/types.py b/Lib/types.py
index 4fb2defb8c..48891cd3f6 100644
--- a/Lib/types.py
+++ b/Lib/types.py
@@ -19,6 +19,11 @@ def _g():
yield 1
GeneratorType = type(_g())
+async def _c(): pass
+_c = _c()
+CoroutineType = type(_c)
+_c.close() # Prevent ResourceWarning
+
class _C:
def _m(self): pass
MethodType = type(_C()._m)
@@ -40,7 +45,7 @@ except TypeError:
GetSetDescriptorType = type(FunctionType.__code__)
MemberDescriptorType = type(FunctionType.__globals__)
-del sys, _f, _g, _C, # Not for export
+del sys, _f, _g, _C, _c, # Not for export
# Provide a PEP 3115 compliant mechanism for class creation
@@ -158,4 +163,99 @@ class DynamicClassAttribute:
return result
+import functools as _functools
+import collections.abc as _collections_abc
+
+class _GeneratorWrapper:
+ # TODO: Implement this in C.
+ def __init__(self, gen):
+ self.__wrapped = gen
+ self.__isgen = gen.__class__ is GeneratorType
+ self.__name__ = getattr(gen, '__name__', None)
+ self.__qualname__ = getattr(gen, '__qualname__', None)
+ def send(self, val):
+ return self.__wrapped.send(val)
+ def throw(self, tp, *rest):
+ return self.__wrapped.throw(tp, *rest)
+ def close(self):
+ return self.__wrapped.close()
+ @property
+ def gi_code(self):
+ return self.__wrapped.gi_code
+ @property
+ def gi_frame(self):
+ return self.__wrapped.gi_frame
+ @property
+ def gi_running(self):
+ return self.__wrapped.gi_running
+ @property
+ def gi_yieldfrom(self):
+ return self.__wrapped.gi_yieldfrom
+ cr_code = gi_code
+ cr_frame = gi_frame
+ cr_running = gi_running
+ cr_await = gi_yieldfrom
+ def __next__(self):
+ return next(self.__wrapped)
+ def __iter__(self):
+ if self.__isgen:
+ return self.__wrapped
+ return self
+ __await__ = __iter__
+
+def coroutine(func):
+ """Convert regular generator function to a coroutine."""
+
+ if not callable(func):
+ raise TypeError('types.coroutine() expects a callable')
+
+ if (func.__class__ is FunctionType and
+ getattr(func, '__code__', None).__class__ is CodeType):
+
+ co_flags = func.__code__.co_flags
+
+ # Check if 'func' is a coroutine function.
+ # (0x180 == CO_COROUTINE | CO_ITERABLE_COROUTINE)
+ if co_flags & 0x180:
+ return func
+
+ # Check if 'func' is a generator function.
+ # (0x20 == CO_GENERATOR)
+ if co_flags & 0x20:
+ # TODO: Implement this in C.
+ co = func.__code__
+ func.__code__ = CodeType(
+ co.co_argcount, co.co_kwonlyargcount, co.co_nlocals,
+ co.co_stacksize,
+ co.co_flags | 0x100, # 0x100 == CO_ITERABLE_COROUTINE
+ co.co_code,
+ co.co_consts, co.co_names, co.co_varnames, co.co_filename,
+ co.co_name, co.co_firstlineno, co.co_lnotab, co.co_freevars,
+ co.co_cellvars)
+ return func
+
+ # The following code is primarily to support functions that
+ # return generator-like objects (for instance generators
+ # compiled with Cython).
+
+ @_functools.wraps(func)
+ def wrapped(*args, **kwargs):
+ coro = func(*args, **kwargs)
+ if (coro.__class__ is CoroutineType or
+ coro.__class__ is GeneratorType and coro.gi_code.co_flags & 0x100):
+ # 'coro' is a native coroutine object or an iterable coroutine
+ return coro
+ if (isinstance(coro, _collections_abc.Generator) and
+ not isinstance(coro, _collections_abc.Coroutine)):
+ # 'coro' is either a pure Python generator iterator, or it
+ # implements collections.abc.Generator (and does not implement
+ # collections.abc.Coroutine).
+ return _GeneratorWrapper(coro)
+ # 'coro' is either an instance of collections.abc.Coroutine or
+ # some other object -- pass it through.
+ return coro
+
+ return wrapped
+
+
__all__ = [n for n in globals() if n[:1] != '_']
diff --git a/Lib/typing.py b/Lib/typing.py
new file mode 100644
index 0000000000..4cac66cd13
--- /dev/null
+++ b/Lib/typing.py
@@ -0,0 +1,1843 @@
+import abc
+from abc import abstractmethod, abstractproperty
+import collections
+import contextlib
+import functools
+import re as stdlib_re # Avoid confusion with the re we export.
+import sys
+import types
+try:
+ import collections.abc as collections_abc
+except ImportError:
+ import collections as collections_abc # Fallback for PY3.2.
+
+
+# Please keep __all__ alphabetized within each category.
+__all__ = [
+ # Super-special typing primitives.
+ 'Any',
+ 'Callable',
+ 'Generic',
+ 'Optional',
+ 'Tuple',
+ 'Type',
+ 'TypeVar',
+ 'Union',
+
+ # ABCs (from collections.abc).
+ 'AbstractSet', # collections.abc.Set.
+ 'Awaitable',
+ 'AsyncIterator',
+ 'AsyncIterable',
+ 'ByteString',
+ 'Container',
+ 'Hashable',
+ 'ItemsView',
+ 'Iterable',
+ 'Iterator',
+ 'KeysView',
+ 'Mapping',
+ 'MappingView',
+ 'MutableMapping',
+ 'MutableSequence',
+ 'MutableSet',
+ 'Sequence',
+ 'Sized',
+ 'ValuesView',
+
+ # Structural checks, a.k.a. protocols.
+ 'Reversible',
+ 'SupportsAbs',
+ 'SupportsFloat',
+ 'SupportsInt',
+ 'SupportsRound',
+
+ # Concrete collection types.
+ 'Dict',
+ 'DefaultDict',
+ 'List',
+ 'Set',
+ 'NamedTuple', # Not really a type.
+ 'Generator',
+
+ # One-off things.
+ 'AnyStr',
+ 'cast',
+ 'get_type_hints',
+ 'NewType',
+ 'no_type_check',
+ 'no_type_check_decorator',
+ 'overload',
+ 'Text',
+ 'TYPE_CHECKING',
+]
+
+# The pseudo-submodules 're' and 'io' are part of the public
+# namespace, but excluded from __all__ because they might stomp on
+# legitimate imports of those modules.
+
+
+def _qualname(x):
+ if sys.version_info[:2] >= (3, 3):
+ return x.__qualname__
+ else:
+ # Fall back to just name.
+ return x.__name__
+
+
+class TypingMeta(type):
+ """Metaclass for every type defined below.
+
+ This overrides __new__() to require an extra keyword parameter
+ '_root', which serves as a guard against naive subclassing of the
+ typing classes. Any legitimate class defined using a metaclass
+ derived from TypingMeta (including internal subclasses created by
+ e.g. Union[X, Y]) must pass _root=True.
+
+ This also defines a dummy constructor (all the work is done in
+ __new__) and a nicer repr().
+ """
+
+ _is_protocol = False
+
+ def __new__(cls, name, bases, namespace, *, _root=False):
+ if not _root:
+ raise TypeError("Cannot subclass %s" %
+ (', '.join(map(_type_repr, bases)) or '()'))
+ return super().__new__(cls, name, bases, namespace)
+
+ def __init__(self, *args, **kwds):
+ pass
+
+ def _eval_type(self, globalns, localns):
+ """Override this in subclasses to interpret forward references.
+
+ For example, Union['C'] is internally stored as
+ Union[_ForwardRef('C')], which should evaluate to _Union[C],
+ where C is an object found in globalns or localns (searching
+ localns first, of course).
+ """
+ return self
+
+ def _get_type_vars(self, tvars):
+ pass
+
+ def __repr__(self):
+ return '%s.%s' % (self.__module__, _qualname(self))
+
+
+class Final:
+ """Mix-in class to prevent instantiation."""
+
+ __slots__ = ()
+
+ def __new__(self, *args, **kwds):
+ raise TypeError("Cannot instantiate %r" % self.__class__)
+
+
+class _ForwardRef(TypingMeta):
+ """Wrapper to hold a forward reference."""
+
+ def __new__(cls, arg):
+ if not isinstance(arg, str):
+ raise TypeError('ForwardRef must be a string -- got %r' % (arg,))
+ try:
+ code = compile(arg, '<string>', 'eval')
+ except SyntaxError:
+ raise SyntaxError('ForwardRef must be an expression -- got %r' %
+ (arg,))
+ self = super().__new__(cls, arg, (), {}, _root=True)
+ self.__forward_arg__ = arg
+ self.__forward_code__ = code
+ self.__forward_evaluated__ = False
+ self.__forward_value__ = None
+ typing_globals = globals()
+ frame = sys._getframe(1)
+ while frame is not None and frame.f_globals is typing_globals:
+ frame = frame.f_back
+ assert frame is not None
+ self.__forward_frame__ = frame
+ return self
+
+ def _eval_type(self, globalns, localns):
+ if not isinstance(localns, dict):
+ raise TypeError('ForwardRef localns must be a dict -- got %r' %
+ (localns,))
+ if not isinstance(globalns, dict):
+ raise TypeError('ForwardRef globalns must be a dict -- got %r' %
+ (globalns,))
+ if not self.__forward_evaluated__:
+ if globalns is None and localns is None:
+ globalns = localns = {}
+ elif globalns is None:
+ globalns = localns
+ elif localns is None:
+ localns = globalns
+ self.__forward_value__ = _type_check(
+ eval(self.__forward_code__, globalns, localns),
+ "Forward references must evaluate to types.")
+ self.__forward_evaluated__ = True
+ return self.__forward_value__
+
+ def __instancecheck__(self, obj):
+ raise TypeError("Forward references cannot be used with isinstance().")
+
+ def __subclasscheck__(self, cls):
+ if not self.__forward_evaluated__:
+ globalns = self.__forward_frame__.f_globals
+ localns = self.__forward_frame__.f_locals
+ try:
+ self._eval_type(globalns, localns)
+ except NameError:
+ return False # Too early.
+ return issubclass(cls, self.__forward_value__)
+
+ def __repr__(self):
+ return '_ForwardRef(%r)' % (self.__forward_arg__,)
+
+
+class _TypeAlias:
+ """Internal helper class for defining generic variants of concrete types.
+
+ Note that this is not a type; let's call it a pseudo-type. It can
+ be used in instance and subclass checks, e.g. isinstance(m, Match)
+ or issubclass(type(m), Match). However, it cannot be itself the
+ target of an issubclass() call; e.g. issubclass(Match, C) (for
+ some arbitrary class C) raises TypeError rather than returning
+ False.
+ """
+
+ __slots__ = ('name', 'type_var', 'impl_type', 'type_checker')
+
+ def __new__(cls, *args, **kwds):
+ """Constructor.
+
+ This only exists to give a better error message in case
+ someone tries to subclass a type alias (not a good idea).
+ """
+ if (len(args) == 3 and
+ isinstance(args[0], str) and
+ isinstance(args[1], tuple)):
+ # Close enough.
+ raise TypeError("A type alias cannot be subclassed")
+ return object.__new__(cls)
+
+ def __init__(self, name, type_var, impl_type, type_checker):
+ """Initializer.
+
+ Args:
+ name: The name, e.g. 'Pattern'.
+ type_var: The type parameter, e.g. AnyStr, or the
+ specific type, e.g. str.
+ impl_type: The implementation type.
+ type_checker: Function that takes an impl_type instance.
+ and returns a value that should be a type_var instance.
+ """
+ assert isinstance(name, str), repr(name)
+ assert isinstance(type_var, type), repr(type_var)
+ assert isinstance(impl_type, type), repr(impl_type)
+ assert not isinstance(impl_type, TypingMeta), repr(impl_type)
+ self.name = name
+ self.type_var = type_var
+ self.impl_type = impl_type
+ self.type_checker = type_checker
+
+ def __repr__(self):
+ return "%s[%s]" % (self.name, _type_repr(self.type_var))
+
+ def __getitem__(self, parameter):
+ assert isinstance(parameter, type), repr(parameter)
+ if not isinstance(self.type_var, TypeVar):
+ raise TypeError("%s cannot be further parameterized." % self)
+ if self.type_var.__constraints__:
+ if not issubclass(parameter, Union[self.type_var.__constraints__]):
+ raise TypeError("%s is not a valid substitution for %s." %
+ (parameter, self.type_var))
+ return self.__class__(self.name, parameter,
+ self.impl_type, self.type_checker)
+
+ def __instancecheck__(self, obj):
+ raise TypeError("Type aliases cannot be used with isinstance().")
+
+ def __subclasscheck__(self, cls):
+ if cls is Any:
+ return True
+ if isinstance(cls, _TypeAlias):
+ # Covariance. For now, we compare by name.
+ return (cls.name == self.name and
+ issubclass(cls.type_var, self.type_var))
+ else:
+ # Note that this is too lenient, because the
+ # implementation type doesn't carry information about
+ # whether it is about bytes or str (for example).
+ return issubclass(cls, self.impl_type)
+
+
+def _get_type_vars(types, tvars):
+ for t in types:
+ if isinstance(t, TypingMeta):
+ t._get_type_vars(tvars)
+
+
+def _type_vars(types):
+ tvars = []
+ _get_type_vars(types, tvars)
+ return tuple(tvars)
+
+
+def _eval_type(t, globalns, localns):
+ if isinstance(t, TypingMeta):
+ return t._eval_type(globalns, localns)
+ else:
+ return t
+
+
+def _type_check(arg, msg):
+ """Check that the argument is a type, and return it.
+
+ As a special case, accept None and return type(None) instead.
+ Also, _TypeAlias instances (e.g. Match, Pattern) are acceptable.
+
+ The msg argument is a human-readable error message, e.g.
+
+ "Union[arg, ...]: arg should be a type."
+
+ We append the repr() of the actual value (truncated to 100 chars).
+ """
+ if arg is None:
+ return type(None)
+ if isinstance(arg, str):
+ arg = _ForwardRef(arg)
+ if not isinstance(arg, (type, _TypeAlias)) and not callable(arg):
+ raise TypeError(msg + " Got %.100r." % (arg,))
+ return arg
+
+
+def _type_repr(obj):
+ """Return the repr() of an object, special-casing types.
+
+ If obj is a type, we return a shorter version than the default
+ type.__repr__, based on the module and qualified name, which is
+ typically enough to uniquely identify a type. For everything
+ else, we fall back on repr(obj).
+ """
+ if isinstance(obj, type) and not isinstance(obj, TypingMeta):
+ if obj.__module__ == 'builtins':
+ return _qualname(obj)
+ else:
+ return '%s.%s' % (obj.__module__, _qualname(obj))
+ else:
+ return repr(obj)
+
+
+class AnyMeta(TypingMeta):
+ """Metaclass for Any."""
+
+ def __new__(cls, name, bases, namespace, _root=False):
+ self = super().__new__(cls, name, bases, namespace, _root=_root)
+ return self
+
+ def __instancecheck__(self, obj):
+ raise TypeError("Any cannot be used with isinstance().")
+
+ def __subclasscheck__(self, cls):
+ if not isinstance(cls, type):
+ return super().__subclasscheck__(cls) # To TypeError.
+ return True
+
+
+class Any(Final, metaclass=AnyMeta, _root=True):
+ """Special type indicating an unconstrained type.
+
+ - Any object is an instance of Any.
+ - Any class is a subclass of Any.
+ - As a special case, Any and object are subclasses of each other.
+ """
+
+ __slots__ = ()
+
+
+class TypeVar(TypingMeta, metaclass=TypingMeta, _root=True):
+ """Type variable.
+
+ Usage::
+
+ T = TypeVar('T') # Can be anything
+ A = TypeVar('A', str, bytes) # Must be str or bytes
+
+ Type variables exist primarily for the benefit of static type
+ checkers. They serve as the parameters for generic types as well
+ as for generic function definitions. See class Generic for more
+ information on generic types. Generic functions work as follows:
+
+ def repeat(x: T, n: int) -> Sequence[T]:
+ '''Return a list containing n references to x.'''
+ return [x]*n
+
+ def longest(x: A, y: A) -> A:
+ '''Return the longest of two strings.'''
+ return x if len(x) >= len(y) else y
+
+ The latter example's signature is essentially the overloading
+ of (str, str) -> str and (bytes, bytes) -> bytes. Also note
+ that if the arguments are instances of some subclass of str,
+ the return type is still plain str.
+
+ At runtime, isinstance(x, T) will raise TypeError. However,
+ issubclass(C, T) is true for any class C, and issubclass(str, A)
+ and issubclass(bytes, A) are true, and issubclass(int, A) is
+ false. (TODO: Why is this needed? This may change. See #136.)
+
+ Type variables may be marked covariant or contravariant by passing
+ covariant=True or contravariant=True. See PEP 484 for more
+ details. By default type variables are invariant.
+
+ Type variables can be introspected. e.g.:
+
+ T.__name__ == 'T'
+ T.__constraints__ == ()
+ T.__covariant__ == False
+ T.__contravariant__ = False
+ A.__constraints__ == (str, bytes)
+ """
+
+ def __new__(cls, name, *constraints, bound=None,
+ covariant=False, contravariant=False):
+ self = super().__new__(cls, name, (Final,), {}, _root=True)
+ if covariant and contravariant:
+ raise ValueError("Bivariant type variables are not supported.")
+ self.__covariant__ = bool(covariant)
+ self.__contravariant__ = bool(contravariant)
+ if constraints and bound is not None:
+ raise TypeError("Constraints cannot be combined with bound=...")
+ if constraints and len(constraints) == 1:
+ raise TypeError("A single constraint is not allowed")
+ msg = "TypeVar(name, constraint, ...): constraints must be types."
+ self.__constraints__ = tuple(_type_check(t, msg) for t in constraints)
+ if bound:
+ self.__bound__ = _type_check(bound, "Bound must be a type.")
+ else:
+ self.__bound__ = None
+ return self
+
+ def _get_type_vars(self, tvars):
+ if self not in tvars:
+ tvars.append(self)
+
+ def __repr__(self):
+ if self.__covariant__:
+ prefix = '+'
+ elif self.__contravariant__:
+ prefix = '-'
+ else:
+ prefix = '~'
+ return prefix + self.__name__
+
+ def __instancecheck__(self, instance):
+ raise TypeError("Type variables cannot be used with isinstance().")
+
+ def __subclasscheck__(self, cls):
+ # TODO: Make this raise TypeError too?
+ if cls is self:
+ return True
+ if cls is Any:
+ return True
+ if self.__bound__ is not None:
+ return issubclass(cls, self.__bound__)
+ if self.__constraints__:
+ return any(issubclass(cls, c) for c in self.__constraints__)
+ return True
+
+
+# Some unconstrained type variables. These are used by the container types.
+# (These are not for export.)
+T = TypeVar('T') # Any type.
+KT = TypeVar('KT') # Key type.
+VT = TypeVar('VT') # Value type.
+T_co = TypeVar('T_co', covariant=True) # Any type covariant containers.
+V_co = TypeVar('V_co', covariant=True) # Any type covariant containers.
+VT_co = TypeVar('VT_co', covariant=True) # Value type covariant containers.
+T_contra = TypeVar('T_contra', contravariant=True) # Ditto contravariant.
+
+# A useful type variable with constraints. This represents string types.
+# (This one *is* for export!)
+AnyStr = TypeVar('AnyStr', bytes, str)
+
+
+class UnionMeta(TypingMeta):
+ """Metaclass for Union."""
+
+ def __new__(cls, name, bases, namespace, parameters=None, _root=False):
+ if parameters is None:
+ return super().__new__(cls, name, bases, namespace, _root=_root)
+ if not isinstance(parameters, tuple):
+ raise TypeError("Expected parameters=<tuple>")
+ # Flatten out Union[Union[...], ...] and type-check non-Union args.
+ params = []
+ msg = "Union[arg, ...]: each arg must be a type."
+ for p in parameters:
+ if isinstance(p, UnionMeta):
+ params.extend(p.__union_params__)
+ else:
+ params.append(_type_check(p, msg))
+ # Weed out strict duplicates, preserving the first of each occurrence.
+ all_params = set(params)
+ if len(all_params) < len(params):
+ new_params = []
+ for t in params:
+ if t in all_params:
+ new_params.append(t)
+ all_params.remove(t)
+ params = new_params
+ assert not all_params, all_params
+ # Weed out subclasses.
+ # E.g. Union[int, Employee, Manager] == Union[int, Employee].
+ # If Any or object is present it will be the sole survivor.
+ # If both Any and object are present, Any wins.
+ # Never discard type variables, except against Any.
+ # (In particular, Union[str, AnyStr] != AnyStr.)
+ all_params = set(params)
+ for t1 in params:
+ if t1 is Any:
+ return Any
+ if isinstance(t1, TypeVar):
+ continue
+ if isinstance(t1, _TypeAlias):
+ # _TypeAlias is not a real class.
+ continue
+ if not isinstance(t1, type):
+ assert callable(t1) # A callable might sneak through.
+ continue
+ if any(isinstance(t2, type) and issubclass(t1, t2)
+ for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
+ all_params.remove(t1)
+ # It's not a union if there's only one type left.
+ if len(all_params) == 1:
+ return all_params.pop()
+ # Create a new class with these params.
+ self = super().__new__(cls, name, bases, {}, _root=True)
+ self.__union_params__ = tuple(t for t in params if t in all_params)
+ self.__union_set_params__ = frozenset(self.__union_params__)
+ return self
+
+ def _eval_type(self, globalns, localns):
+ p = tuple(_eval_type(t, globalns, localns)
+ for t in self.__union_params__)
+ if p == self.__union_params__:
+ return self
+ else:
+ return self.__class__(self.__name__, self.__bases__, {},
+ p, _root=True)
+
+ def _get_type_vars(self, tvars):
+ if self.__union_params__:
+ _get_type_vars(self.__union_params__, tvars)
+
+ def __repr__(self):
+ r = super().__repr__()
+ if self.__union_params__:
+ r += '[%s]' % (', '.join(_type_repr(t)
+ for t in self.__union_params__))
+ return r
+
+ def __getitem__(self, parameters):
+ if self.__union_params__ is not None:
+ raise TypeError(
+ "Cannot subscript an existing Union. Use Union[u, t] instead.")
+ if parameters == ():
+ raise TypeError("Cannot take a Union of no types.")
+ if not isinstance(parameters, tuple):
+ parameters = (parameters,)
+ return self.__class__(self.__name__, self.__bases__,
+ dict(self.__dict__), parameters, _root=True)
+
+ def __eq__(self, other):
+ if not isinstance(other, UnionMeta):
+ return NotImplemented
+ return self.__union_set_params__ == other.__union_set_params__
+
+ def __hash__(self):
+ return hash(self.__union_set_params__)
+
+ def __instancecheck__(self, obj):
+ raise TypeError("Unions cannot be used with isinstance().")
+
+ def __subclasscheck__(self, cls):
+ if cls is Any:
+ return True
+ if self.__union_params__ is None:
+ return isinstance(cls, UnionMeta)
+ elif isinstance(cls, UnionMeta):
+ if cls.__union_params__ is None:
+ return False
+ return all(issubclass(c, self) for c in (cls.__union_params__))
+ elif isinstance(cls, TypeVar):
+ if cls in self.__union_params__:
+ return True
+ if cls.__constraints__:
+ return issubclass(Union[cls.__constraints__], self)
+ return False
+ else:
+ return any(issubclass(cls, t) for t in self.__union_params__)
+
+
+class Union(Final, metaclass=UnionMeta, _root=True):
+ """Union type; Union[X, Y] means either X or Y.
+
+ To define a union, use e.g. Union[int, str]. Details:
+
+ - The arguments must be types and there must be at least one.
+
+ - None as an argument is a special case and is replaced by
+ type(None).
+
+ - Unions of unions are flattened, e.g.::
+
+ Union[Union[int, str], float] == Union[int, str, float]
+
+ - Unions of a single argument vanish, e.g.::
+
+ Union[int] == int # The constructor actually returns int
+
+ - Redundant arguments are skipped, e.g.::
+
+ Union[int, str, int] == Union[int, str]
+
+ - When comparing unions, the argument order is ignored, e.g.::
+
+ Union[int, str] == Union[str, int]
+
+ - When two arguments have a subclass relationship, the least
+ derived argument is kept, e.g.::
+
+ class Employee: pass
+ class Manager(Employee): pass
+ Union[int, Employee, Manager] == Union[int, Employee]
+ Union[Manager, int, Employee] == Union[int, Employee]
+ Union[Employee, Manager] == Employee
+
+ - Corollary: if Any is present it is the sole survivor, e.g.::
+
+ Union[int, Any] == Any
+
+ - Similar for object::
+
+ Union[int, object] == object
+
+ - To cut a tie: Union[object, Any] == Union[Any, object] == Any.
+
+ - You cannot subclass or instantiate a union.
+
+ - You cannot write Union[X][Y] (what would it mean?).
+
+ - You can use Optional[X] as a shorthand for Union[X, None].
+ """
+
+ # Unsubscripted Union type has params set to None.
+ __union_params__ = None
+ __union_set_params__ = None
+
+
+class OptionalMeta(TypingMeta):
+ """Metaclass for Optional."""
+
+ def __new__(cls, name, bases, namespace, _root=False):
+ return super().__new__(cls, name, bases, namespace, _root=_root)
+
+ def __getitem__(self, arg):
+ arg = _type_check(arg, "Optional[t] requires a single type.")
+ return Union[arg, type(None)]
+
+
+class Optional(Final, metaclass=OptionalMeta, _root=True):
+ """Optional type.
+
+ Optional[X] is equivalent to Union[X, type(None)].
+ """
+
+ __slots__ = ()
+
+
+class TupleMeta(TypingMeta):
+ """Metaclass for Tuple."""
+
+ def __new__(cls, name, bases, namespace, parameters=None,
+ use_ellipsis=False, _root=False):
+ self = super().__new__(cls, name, bases, namespace, _root=_root)
+ self.__tuple_params__ = parameters
+ self.__tuple_use_ellipsis__ = use_ellipsis
+ return self
+
+ def _get_type_vars(self, tvars):
+ if self.__tuple_params__:
+ _get_type_vars(self.__tuple_params__, tvars)
+
+ def _eval_type(self, globalns, localns):
+ tp = self.__tuple_params__
+ if tp is None:
+ return self
+ p = tuple(_eval_type(t, globalns, localns) for t in tp)
+ if p == self.__tuple_params__:
+ return self
+ else:
+ return self.__class__(self.__name__, self.__bases__, {},
+ p, _root=True)
+
+ def __repr__(self):
+ r = super().__repr__()
+ if self.__tuple_params__ is not None:
+ params = [_type_repr(p) for p in self.__tuple_params__]
+ if self.__tuple_use_ellipsis__:
+ params.append('...')
+ if not params:
+ params.append('()')
+ r += '[%s]' % (
+ ', '.join(params))
+ return r
+
+ def __getitem__(self, parameters):
+ if self.__tuple_params__ is not None:
+ raise TypeError("Cannot re-parameterize %r" % (self,))
+ if not isinstance(parameters, tuple):
+ parameters = (parameters,)
+ if len(parameters) == 2 and parameters[1] == Ellipsis:
+ parameters = parameters[:1]
+ use_ellipsis = True
+ msg = "Tuple[t, ...]: t must be a type."
+ else:
+ use_ellipsis = False
+ msg = "Tuple[t0, t1, ...]: each t must be a type."
+ parameters = tuple(_type_check(p, msg) for p in parameters)
+ return self.__class__(self.__name__, self.__bases__,
+ dict(self.__dict__), parameters,
+ use_ellipsis=use_ellipsis, _root=True)
+
+ def __eq__(self, other):
+ if not isinstance(other, TupleMeta):
+ return NotImplemented
+ return (self.__tuple_params__ == other.__tuple_params__ and
+ self.__tuple_use_ellipsis__ == other.__tuple_use_ellipsis__)
+
+ def __hash__(self):
+ return hash(self.__tuple_params__)
+
+ def __instancecheck__(self, obj):
+ raise TypeError("Tuples cannot be used with isinstance().")
+
+ def __subclasscheck__(self, cls):
+ if cls is Any:
+ return True
+ if not isinstance(cls, type):
+ return super().__subclasscheck__(cls) # To TypeError.
+ if issubclass(cls, tuple):
+ return True # Special case.
+ if not isinstance(cls, TupleMeta):
+ return super().__subclasscheck__(cls) # False.
+ if self.__tuple_params__ is None:
+ return True
+ if cls.__tuple_params__ is None:
+ return False # ???
+ if cls.__tuple_use_ellipsis__ != self.__tuple_use_ellipsis__:
+ return False
+ # Covariance.
+ return (len(self.__tuple_params__) == len(cls.__tuple_params__) and
+ all(issubclass(x, p)
+ for x, p in zip(cls.__tuple_params__,
+ self.__tuple_params__)))
+
+
+class Tuple(Final, metaclass=TupleMeta, _root=True):
+ """Tuple type; Tuple[X, Y] is the cross-product type of X and Y.
+
+ Example: Tuple[T1, T2] is a tuple of two elements corresponding
+ to type variables T1 and T2. Tuple[int, float, str] is a tuple
+ of an int, a float and a string.
+
+ To specify a variable-length tuple of homogeneous type, use Sequence[T].
+ """
+
+ __slots__ = ()
+
+
+class CallableMeta(TypingMeta):
+ """Metaclass for Callable."""
+
+ def __new__(cls, name, bases, namespace, _root=False,
+ args=None, result=None):
+ if args is None and result is None:
+ pass # Must be 'class Callable'.
+ else:
+ if args is not Ellipsis:
+ if not isinstance(args, list):
+ raise TypeError("Callable[args, result]: "
+ "args must be a list."
+ " Got %.100r." % (args,))
+ msg = "Callable[[arg, ...], result]: each arg must be a type."
+ args = tuple(_type_check(arg, msg) for arg in args)
+ msg = "Callable[args, result]: result must be a type."
+ result = _type_check(result, msg)
+ self = super().__new__(cls, name, bases, namespace, _root=_root)
+ self.__args__ = args
+ self.__result__ = result
+ return self
+
+ def _get_type_vars(self, tvars):
+ if self.__args__:
+ _get_type_vars(self.__args__, tvars)
+
+ def _eval_type(self, globalns, localns):
+ if self.__args__ is None and self.__result__ is None:
+ return self
+ if self.__args__ is Ellipsis:
+ args = self.__args__
+ else:
+ args = [_eval_type(t, globalns, localns) for t in self.__args__]
+ result = _eval_type(self.__result__, globalns, localns)
+ if args == self.__args__ and result == self.__result__:
+ return self
+ else:
+ return self.__class__(self.__name__, self.__bases__, {},
+ args=args, result=result, _root=True)
+
+ def __repr__(self):
+ r = super().__repr__()
+ if self.__args__ is not None or self.__result__ is not None:
+ if self.__args__ is Ellipsis:
+ args_r = '...'
+ else:
+ args_r = '[%s]' % ', '.join(_type_repr(t)
+ for t in self.__args__)
+ r += '[%s, %s]' % (args_r, _type_repr(self.__result__))
+ return r
+
+ def __getitem__(self, parameters):
+ if self.__args__ is not None or self.__result__ is not None:
+ raise TypeError("This Callable type is already parameterized.")
+ if not isinstance(parameters, tuple) or len(parameters) != 2:
+ raise TypeError(
+ "Callable must be used as Callable[[arg, ...], result].")
+ args, result = parameters
+ return self.__class__(self.__name__, self.__bases__,
+ dict(self.__dict__), _root=True,
+ args=args, result=result)
+
+ def __eq__(self, other):
+ if not isinstance(other, CallableMeta):
+ return NotImplemented
+ return (self.__args__ == other.__args__ and
+ self.__result__ == other.__result__)
+
+ def __hash__(self):
+ return hash(self.__args__) ^ hash(self.__result__)
+
+ def __instancecheck__(self, obj):
+ # For unparametrized Callable we allow this, because
+ # typing.Callable should be equivalent to
+ # collections.abc.Callable.
+ if self.__args__ is None and self.__result__ is None:
+ return isinstance(obj, collections_abc.Callable)
+ else:
+ raise TypeError("Callable[] cannot be used with isinstance().")
+
+ def __subclasscheck__(self, cls):
+ if cls is Any:
+ return True
+ if not isinstance(cls, CallableMeta):
+ return super().__subclasscheck__(cls)
+ if self.__args__ is None and self.__result__ is None:
+ return True
+ # We're not doing covariance or contravariance -- this is *invariance*.
+ return self == cls
+
+
+class Callable(Final, metaclass=CallableMeta, _root=True):
+ """Callable type; Callable[[int], str] is a function of (int) -> str.
+
+ The subscription syntax must always be used with exactly two
+ values: the argument list and the return type. The argument list
+ must be a list of types; the return type must be a single type.
+
+ There is no syntax to indicate optional or keyword arguments,
+ such function types are rarely used as callback types.
+ """
+
+ __slots__ = ()
+
+
+def _gorg(a):
+ """Return the farthest origin of a generic class."""
+ assert isinstance(a, GenericMeta)
+ while a.__origin__ is not None:
+ a = a.__origin__
+ return a
+
+
+def _geqv(a, b):
+ """Return whether two generic classes are equivalent.
+
+ The intention is to consider generic class X and any of its
+ parameterized forms (X[T], X[int], etc.) as equivalent.
+
+ However, X is not equivalent to a subclass of X.
+
+ The relation is reflexive, symmetric and transitive.
+ """
+ assert isinstance(a, GenericMeta) and isinstance(b, GenericMeta)
+ # Reduce each to its origin.
+ return _gorg(a) is _gorg(b)
+
+
+def _next_in_mro(cls):
+ """Helper for Generic.__new__.
+
+ Returns the class after the last occurrence of Generic or
+ Generic[...] in cls.__mro__.
+ """
+ next_in_mro = object
+ # Look for the last occurrence of Generic or Generic[...].
+ for i, c in enumerate(cls.__mro__[:-1]):
+ if isinstance(c, GenericMeta) and _gorg(c) is Generic:
+ next_in_mro = cls.__mro__[i+1]
+ return next_in_mro
+
+
+class GenericMeta(TypingMeta, abc.ABCMeta):
+ """Metaclass for generic types."""
+
+ def __new__(cls, name, bases, namespace,
+ tvars=None, args=None, origin=None, extra=None):
+ self = super().__new__(cls, name, bases, namespace, _root=True)
+
+ if tvars is not None:
+ # Called from __getitem__() below.
+ assert origin is not None
+ assert all(isinstance(t, TypeVar) for t in tvars), tvars
+ else:
+ # Called from class statement.
+ assert tvars is None, tvars
+ assert args is None, args
+ assert origin is None, origin
+
+ # Get the full set of tvars from the bases.
+ tvars = _type_vars(bases)
+ # Look for Generic[T1, ..., Tn].
+ # If found, tvars must be a subset of it.
+ # If not found, tvars is it.
+ # Also check for and reject plain Generic,
+ # and reject multiple Generic[...].
+ gvars = None
+ for base in bases:
+ if base is Generic:
+ raise TypeError("Cannot inherit from plain Generic")
+ if (isinstance(base, GenericMeta) and
+ base.__origin__ is Generic):
+ if gvars is not None:
+ raise TypeError(
+ "Cannot inherit from Generic[...] multiple types.")
+ gvars = base.__parameters__
+ if gvars is None:
+ gvars = tvars
+ else:
+ tvarset = set(tvars)
+ gvarset = set(gvars)
+ if not tvarset <= gvarset:
+ raise TypeError(
+ "Some type variables (%s) "
+ "are not listed in Generic[%s]" %
+ (", ".join(str(t) for t in tvars if t not in gvarset),
+ ", ".join(str(g) for g in gvars)))
+ tvars = gvars
+
+ self.__parameters__ = tvars
+ self.__args__ = args
+ self.__origin__ = origin
+ self.__extra__ = extra
+ # Speed hack (https://github.com/python/typing/issues/196).
+ self.__next_in_mro__ = _next_in_mro(self)
+ return self
+
+ def _get_type_vars(self, tvars):
+ if self.__origin__ and self.__parameters__:
+ _get_type_vars(self.__parameters__, tvars)
+
+ def __repr__(self):
+ if self.__origin__ is not None:
+ r = repr(self.__origin__)
+ else:
+ r = super().__repr__()
+ if self.__args__:
+ r += '[%s]' % (
+ ', '.join(_type_repr(p) for p in self.__args__))
+ if self.__parameters__:
+ r += '<%s>' % (
+ ', '.join(_type_repr(p) for p in self.__parameters__))
+ return r
+
+ def __eq__(self, other):
+ if not isinstance(other, GenericMeta):
+ return NotImplemented
+ if self.__origin__ is not None:
+ return (self.__origin__ is other.__origin__ and
+ self.__args__ == other.__args__ and
+ self.__parameters__ == other.__parameters__)
+ else:
+ return self is other
+
+ def __hash__(self):
+ return hash((self.__name__, self.__parameters__))
+
+ def __getitem__(self, params):
+ if not isinstance(params, tuple):
+ params = (params,)
+ if not params:
+ raise TypeError(
+ "Parameter list to %s[...] cannot be empty" % _qualname(self))
+ msg = "Parameters to generic types must be types."
+ params = tuple(_type_check(p, msg) for p in params)
+ if self is Generic:
+ # Generic can only be subscripted with unique type variables.
+ if not all(isinstance(p, TypeVar) for p in params):
+ raise TypeError(
+ "Parameters to Generic[...] must all be type variables")
+ if len(set(params)) != len(params):
+ raise TypeError(
+ "Parameters to Generic[...] must all be unique")
+ tvars = params
+ args = None
+ elif self is _Protocol:
+ # _Protocol is internal, don't check anything.
+ tvars = params
+ args = None
+ elif self.__origin__ in (Generic, _Protocol):
+ # Can't subscript Generic[...] or _Protocol[...].
+ raise TypeError("Cannot subscript already-subscripted %s" %
+ repr(self))
+ else:
+ # Subscripting a regular Generic subclass.
+ if not self.__parameters__:
+ raise TypeError("%s is not a generic class" % repr(self))
+ alen = len(params)
+ elen = len(self.__parameters__)
+ if alen != elen:
+ raise TypeError(
+ "Too %s parameters for %s; actual %s, expected %s" %
+ ("many" if alen > elen else "few", repr(self), alen, elen))
+ tvars = _type_vars(params)
+ args = params
+ return self.__class__(self.__name__,
+ (self,) + self.__bases__,
+ dict(self.__dict__),
+ tvars=tvars,
+ args=args,
+ origin=self,
+ extra=self.__extra__)
+
+ def __instancecheck__(self, instance):
+ # Since we extend ABC.__subclasscheck__ and
+ # ABC.__instancecheck__ inlines the cache checking done by the
+ # latter, we must extend __instancecheck__ too. For simplicity
+ # we just skip the cache check -- instance checks for generic
+ # classes are supposed to be rare anyways.
+ return self.__subclasscheck__(instance.__class__)
+
+ def __subclasscheck__(self, cls):
+ if cls is Any:
+ return True
+ if isinstance(cls, GenericMeta):
+ # For a class C(Generic[T]) where T is co-variant,
+ # C[X] is a subclass of C[Y] iff X is a subclass of Y.
+ origin = self.__origin__
+ if origin is not None and origin is cls.__origin__:
+ assert len(self.__args__) == len(origin.__parameters__)
+ assert len(cls.__args__) == len(origin.__parameters__)
+ for p_self, p_cls, p_origin in zip(self.__args__,
+ cls.__args__,
+ origin.__parameters__):
+ if isinstance(p_origin, TypeVar):
+ if p_origin.__covariant__:
+ # Covariant -- p_cls must be a subclass of p_self.
+ if not issubclass(p_cls, p_self):
+ break
+ elif p_origin.__contravariant__:
+ # Contravariant. I think it's the opposite. :-)
+ if not issubclass(p_self, p_cls):
+ break
+ else:
+ # Invariant -- p_cls and p_self must equal.
+ if p_self != p_cls:
+ break
+ else:
+ # If the origin's parameter is not a typevar,
+ # insist on invariance.
+ if p_self != p_cls:
+ break
+ else:
+ return True
+ # If we break out of the loop, the superclass gets a chance.
+ if super().__subclasscheck__(cls):
+ return True
+ if self.__extra__ is None or isinstance(cls, GenericMeta):
+ return False
+ return issubclass(cls, self.__extra__)
+
+
+# Prevent checks for Generic to crash when defining Generic.
+Generic = None
+
+
+class Generic(metaclass=GenericMeta):
+ """Abstract base class for generic types.
+
+ A generic type is typically declared by inheriting from an
+ instantiation of this class with one or more type variables.
+ For example, a generic mapping type might be defined as::
+
+ class Mapping(Generic[KT, VT]):
+ def __getitem__(self, key: KT) -> VT:
+ ...
+ # Etc.
+
+ This class can then be used as follows::
+
+ def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:
+ try:
+ return mapping[key]
+ except KeyError:
+ return default
+ """
+
+ __slots__ = ()
+
+ def __new__(cls, *args, **kwds):
+ if cls.__origin__ is None:
+ return cls.__next_in_mro__.__new__(cls)
+ else:
+ origin = _gorg(cls)
+ obj = cls.__next_in_mro__.__new__(origin)
+ obj.__init__(*args, **kwds)
+ return obj
+
+
+def cast(typ, val):
+ """Cast a value to a type.
+
+ This returns the value unchanged. To the type checker this
+ signals that the return value has the designated type, but at
+ runtime we intentionally don't check anything (we want this
+ to be as fast as possible).
+ """
+ return val
+
+
+def _get_defaults(func):
+ """Internal helper to extract the default arguments, by name."""
+ code = func.__code__
+ pos_count = code.co_argcount
+ arg_names = code.co_varnames
+ arg_names = arg_names[:pos_count]
+ defaults = func.__defaults__ or ()
+ kwdefaults = func.__kwdefaults__
+ res = dict(kwdefaults) if kwdefaults else {}
+ pos_offset = pos_count - len(defaults)
+ for name, value in zip(arg_names[pos_offset:], defaults):
+ assert name not in res
+ res[name] = value
+ return res
+
+
+def get_type_hints(obj, globalns=None, localns=None):
+ """Return type hints for a function or method object.
+
+ This is often the same as obj.__annotations__, but it handles
+ forward references encoded as string literals, and if necessary
+ adds Optional[t] if a default value equal to None is set.
+
+ BEWARE -- the behavior of globalns and localns is counterintuitive
+ (unless you are familiar with how eval() and exec() work). The
+ search order is locals first, then globals.
+
+ - If no dict arguments are passed, an attempt is made to use the
+ globals from obj, and these are also used as the locals. If the
+ object does not appear to have globals, an exception is raised.
+
+ - If one dict argument is passed, it is used for both globals and
+ locals.
+
+ - If two dict arguments are passed, they specify globals and
+ locals, respectively.
+ """
+ if getattr(obj, '__no_type_check__', None):
+ return {}
+ if globalns is None:
+ globalns = getattr(obj, '__globals__', {})
+ if localns is None:
+ localns = globalns
+ elif localns is None:
+ localns = globalns
+ defaults = _get_defaults(obj)
+ hints = dict(obj.__annotations__)
+ for name, value in hints.items():
+ if isinstance(value, str):
+ value = _ForwardRef(value)
+ value = _eval_type(value, globalns, localns)
+ if name in defaults and defaults[name] is None:
+ value = Optional[value]
+ hints[name] = value
+ return hints
+
+
+def no_type_check(arg):
+ """Decorator to indicate that annotations are not type hints.
+
+ The argument must be a class or function; if it is a class, it
+ applies recursively to all methods defined in that class (but not
+ to methods defined in its superclasses or subclasses).
+
+ This mutates the function(s) in place.
+ """
+ if isinstance(arg, type):
+ for obj in arg.__dict__.values():
+ if isinstance(obj, types.FunctionType):
+ obj.__no_type_check__ = True
+ else:
+ arg.__no_type_check__ = True
+ return arg
+
+
+def no_type_check_decorator(decorator):
+ """Decorator to give another decorator the @no_type_check effect.
+
+ This wraps the decorator with something that wraps the decorated
+ function in @no_type_check.
+ """
+
+ @functools.wraps(decorator)
+ def wrapped_decorator(*args, **kwds):
+ func = decorator(*args, **kwds)
+ func = no_type_check(func)
+ return func
+
+ return wrapped_decorator
+
+
+def _overload_dummy(*args, **kwds):
+ """Helper for @overload to raise when called."""
+ raise NotImplementedError(
+ "You should not call an overloaded function. "
+ "A series of @overload-decorated functions "
+ "outside a stub module should always be followed "
+ "by an implementation that is not @overload-ed.")
+
+
+def overload(func):
+ """Decorator for overloaded functions/methods.
+
+ In a stub file, place two or more stub definitions for the same
+ function in a row, each decorated with @overload. For example:
+
+ @overload
+ def utf8(value: None) -> None: ...
+ @overload
+ def utf8(value: bytes) -> bytes: ...
+ @overload
+ def utf8(value: str) -> bytes: ...
+
+ In a non-stub file (i.e. a regular .py file), do the same but
+ follow it with an implementation. The implementation should *not*
+ be decorated with @overload. For example:
+
+ @overload
+ def utf8(value: None) -> None: ...
+ @overload
+ def utf8(value: bytes) -> bytes: ...
+ @overload
+ def utf8(value: str) -> bytes: ...
+ def utf8(value):
+ # implementation goes here
+ """
+ return _overload_dummy
+
+
+class _ProtocolMeta(GenericMeta):
+ """Internal metaclass for _Protocol.
+
+ This exists so _Protocol classes can be generic without deriving
+ from Generic.
+ """
+
+ def __instancecheck__(self, obj):
+ raise TypeError("Protocols cannot be used with isinstance().")
+
+ def __subclasscheck__(self, cls):
+ if not self._is_protocol:
+ # No structural checks since this isn't a protocol.
+ return NotImplemented
+
+ if self is _Protocol:
+ # Every class is a subclass of the empty protocol.
+ return True
+
+ # Find all attributes defined in the protocol.
+ attrs = self._get_protocol_attrs()
+
+ for attr in attrs:
+ if not any(attr in d.__dict__ for d in cls.__mro__):
+ return False
+ return True
+
+ def _get_protocol_attrs(self):
+ # Get all Protocol base classes.
+ protocol_bases = []
+ for c in self.__mro__:
+ if getattr(c, '_is_protocol', False) and c.__name__ != '_Protocol':
+ protocol_bases.append(c)
+
+ # Get attributes included in protocol.
+ attrs = set()
+ for base in protocol_bases:
+ for attr in base.__dict__.keys():
+ # Include attributes not defined in any non-protocol bases.
+ for c in self.__mro__:
+ if (c is not base and attr in c.__dict__ and
+ not getattr(c, '_is_protocol', False)):
+ break
+ else:
+ if (not attr.startswith('_abc_') and
+ attr != '__abstractmethods__' and
+ attr != '_is_protocol' and
+ attr != '__dict__' and
+ attr != '__args__' and
+ attr != '__slots__' and
+ attr != '_get_protocol_attrs' and
+ attr != '__next_in_mro__' and
+ attr != '__parameters__' and
+ attr != '__origin__' and
+ attr != '__extra__' and
+ attr != '__module__'):
+ attrs.add(attr)
+
+ return attrs
+
+
+class _Protocol(metaclass=_ProtocolMeta):
+ """Internal base class for protocol classes.
+
+ This implements a simple-minded structural isinstance check
+ (similar but more general than the one-offs in collections.abc
+ such as Hashable).
+ """
+
+ __slots__ = ()
+
+ _is_protocol = True
+
+
+# Various ABCs mimicking those in collections.abc.
+# A few are simply re-exported for completeness.
+
+Hashable = collections_abc.Hashable # Not generic.
+
+
+if hasattr(collections_abc, 'Awaitable'):
+ class Awaitable(Generic[T_co], extra=collections_abc.Awaitable):
+ __slots__ = ()
+else:
+ Awaitable = None
+
+
+if hasattr(collections_abc, 'AsyncIterable'):
+
+ class AsyncIterable(Generic[T_co], extra=collections_abc.AsyncIterable):
+ __slots__ = ()
+
+ class AsyncIterator(AsyncIterable[T_co],
+ extra=collections_abc.AsyncIterator):
+ __slots__ = ()
+
+else:
+ AsyncIterable = None
+ AsyncIterator = None
+
+
+class Iterable(Generic[T_co], extra=collections_abc.Iterable):
+ __slots__ = ()
+
+
+class Iterator(Iterable[T_co], extra=collections_abc.Iterator):
+ __slots__ = ()
+
+
+class SupportsInt(_Protocol):
+ __slots__ = ()
+
+ @abstractmethod
+ def __int__(self) -> int:
+ pass
+
+
+class SupportsFloat(_Protocol):
+ __slots__ = ()
+
+ @abstractmethod
+ def __float__(self) -> float:
+ pass
+
+
+class SupportsComplex(_Protocol):
+ __slots__ = ()
+
+ @abstractmethod
+ def __complex__(self) -> complex:
+ pass
+
+
+class SupportsBytes(_Protocol):
+ __slots__ = ()
+
+ @abstractmethod
+ def __bytes__(self) -> bytes:
+ pass
+
+
+class SupportsAbs(_Protocol[T_co]):
+ __slots__ = ()
+
+ @abstractmethod
+ def __abs__(self) -> T_co:
+ pass
+
+
+class SupportsRound(_Protocol[T_co]):
+ __slots__ = ()
+
+ @abstractmethod
+ def __round__(self, ndigits: int = 0) -> T_co:
+ pass
+
+
+if hasattr(collections_abc, 'Reversible'):
+ class Reversible(Iterable[T_co], extra=collections_abc.Reversible):
+ __slots__ = ()
+else:
+ class Reversible(_Protocol[T_co]):
+ __slots__ = ()
+
+ @abstractmethod
+ def __reversed__(self) -> 'Iterator[T_co]':
+ pass
+
+
+Sized = collections_abc.Sized # Not generic.
+
+
+class Container(Generic[T_co], extra=collections_abc.Container):
+ __slots__ = ()
+
+
+# Callable was defined earlier.
+
+
+class AbstractSet(Sized, Iterable[T_co], Container[T_co],
+ extra=collections_abc.Set):
+ pass
+
+
+class MutableSet(AbstractSet[T], extra=collections_abc.MutableSet):
+ pass
+
+
+# NOTE: Only the value type is covariant.
+class Mapping(Sized, Iterable[KT], Container[KT], Generic[KT, VT_co],
+ extra=collections_abc.Mapping):
+ pass
+
+
+class MutableMapping(Mapping[KT, VT], extra=collections_abc.MutableMapping):
+ pass
+
+if hasattr(collections_abc, 'Reversible'):
+ class Sequence(Sized, Reversible[T_co], Container[T_co],
+ extra=collections_abc.Sequence):
+ pass
+else:
+ class Sequence(Sized, Iterable[T_co], Container[T_co],
+ extra=collections_abc.Sequence):
+ pass
+
+
+class MutableSequence(Sequence[T], extra=collections_abc.MutableSequence):
+ pass
+
+
+class ByteString(Sequence[int], extra=collections_abc.ByteString):
+ pass
+
+
+ByteString.register(type(memoryview(b'')))
+
+
+class List(list, MutableSequence[T], extra=list):
+
+ def __new__(cls, *args, **kwds):
+ if _geqv(cls, List):
+ raise TypeError("Type List cannot be instantiated; "
+ "use list() instead")
+ return list.__new__(cls, *args, **kwds)
+
+
+class Set(set, MutableSet[T], extra=set):
+
+ def __new__(cls, *args, **kwds):
+ if _geqv(cls, Set):
+ raise TypeError("Type Set cannot be instantiated; "
+ "use set() instead")
+ return set.__new__(cls, *args, **kwds)
+
+
+class _FrozenSetMeta(GenericMeta):
+ """This metaclass ensures set is not a subclass of FrozenSet.
+
+ Without this metaclass, set would be considered a subclass of
+ FrozenSet, because FrozenSet.__extra__ is collections.abc.Set, and
+ set is a subclass of that.
+ """
+
+ def __subclasscheck__(self, cls):
+ if issubclass(cls, Set):
+ return False
+ return super().__subclasscheck__(cls)
+
+
+class FrozenSet(frozenset, AbstractSet[T_co], metaclass=_FrozenSetMeta,
+ extra=frozenset):
+ __slots__ = ()
+
+ def __new__(cls, *args, **kwds):
+ if _geqv(cls, FrozenSet):
+ raise TypeError("Type FrozenSet cannot be instantiated; "
+ "use frozenset() instead")
+ return frozenset.__new__(cls, *args, **kwds)
+
+
+class MappingView(Sized, Iterable[T_co], extra=collections_abc.MappingView):
+ pass
+
+
+class KeysView(MappingView[KT], AbstractSet[KT],
+ extra=collections_abc.KeysView):
+ pass
+
+
+class ItemsView(MappingView[Tuple[KT, VT_co]],
+ AbstractSet[Tuple[KT, VT_co]],
+ Generic[KT, VT_co],
+ extra=collections_abc.ItemsView):
+ pass
+
+
+class ValuesView(MappingView[VT_co], extra=collections_abc.ValuesView):
+ pass
+
+
+if hasattr(contextlib, 'AbstractContextManager'):
+ class ContextManager(Generic[T_co], extra=contextlib.AbstractContextManager):
+ __slots__ = ()
+ __all__.append('ContextManager')
+
+
+class Dict(dict, MutableMapping[KT, VT], extra=dict):
+
+ def __new__(cls, *args, **kwds):
+ if _geqv(cls, Dict):
+ raise TypeError("Type Dict cannot be instantiated; "
+ "use dict() instead")
+ return dict.__new__(cls, *args, **kwds)
+
+class DefaultDict(collections.defaultdict, MutableMapping[KT, VT],
+ extra=collections.defaultdict):
+
+ def __new__(cls, *args, **kwds):
+ if _geqv(cls, DefaultDict):
+ raise TypeError("Type DefaultDict cannot be instantiated; "
+ "use collections.defaultdict() instead")
+ return collections.defaultdict.__new__(cls, *args, **kwds)
+
+# Determine what base class to use for Generator.
+if hasattr(collections_abc, 'Generator'):
+ # Sufficiently recent versions of 3.5 have a Generator ABC.
+ _G_base = collections_abc.Generator
+else:
+ # Fall back on the exact type.
+ _G_base = types.GeneratorType
+
+
+class Generator(Iterator[T_co], Generic[T_co, T_contra, V_co],
+ extra=_G_base):
+ __slots__ = ()
+
+ def __new__(cls, *args, **kwds):
+ if _geqv(cls, Generator):
+ raise TypeError("Type Generator cannot be instantiated; "
+ "create a subclass instead")
+ return super().__new__(cls, *args, **kwds)
+
+
+# Internal type variable used for Type[].
+CT = TypeVar('CT', covariant=True, bound=type)
+
+
+# This is not a real generic class. Don't use outside annotations.
+class Type(type, Generic[CT], extra=type):
+ """A special construct usable to annotate class objects.
+
+ For example, suppose we have the following classes::
+
+ class User: ... # Abstract base for User classes
+ class BasicUser(User): ...
+ class ProUser(User): ...
+ class TeamUser(User): ...
+
+ And a function that takes a class argument that's a subclass of
+ User and returns an instance of the corresponding class::
+
+ U = TypeVar('U', bound=User)
+ def new_user(user_class: Type[U]) -> U:
+ user = user_class()
+ # (Here we could write the user object to a database)
+ return user
+
+ joe = new_user(BasicUser)
+
+ At this point the type checker knows that joe has type BasicUser.
+ """
+
+
+def NamedTuple(typename, fields):
+ """Typed version of namedtuple.
+
+ Usage::
+
+ Employee = typing.NamedTuple('Employee', [('name', str), 'id', int)])
+
+ This is equivalent to::
+
+ Employee = collections.namedtuple('Employee', ['name', 'id'])
+
+ The resulting class has one extra attribute: _field_types,
+ giving a dict mapping field names to types. (The field names
+ are in the _fields attribute, which is part of the namedtuple
+ API.)
+ """
+ fields = [(n, t) for n, t in fields]
+ cls = collections.namedtuple(typename, [n for n, t in fields])
+ cls._field_types = dict(fields)
+ # Set the module to the caller's module (otherwise it'd be 'typing').
+ try:
+ cls.__module__ = sys._getframe(1).f_globals.get('__name__', '__main__')
+ except (AttributeError, ValueError):
+ pass
+ return cls
+
+
+def NewType(name, tp):
+ """NewType creates simple unique types with almost zero
+ runtime overhead. NewType(name, tp) is considered a subtype of tp
+ by static type checkers. At runtime, NewType(name, tp) returns
+ a dummy function that simply returns its argument. Usage::
+
+ UserId = NewType('UserId', int)
+
+ def name_by_id(user_id: UserId) -> str:
+ ...
+
+ UserId('user') # Fails type check
+
+ name_by_id(42) # Fails type check
+ name_by_id(UserId(42)) # OK
+
+ num = UserId(5) + 1 # type: int
+ """
+
+ def new_type(x):
+ return x
+
+ new_type.__name__ = name
+ new_type.__supertype__ = tp
+ return new_type
+
+
+# Python-version-specific alias (Python 2: unicode; Python 3: str)
+Text = str
+
+
+# Constant that's True when type checking, but False here.
+TYPE_CHECKING = False
+
+
+class IO(Generic[AnyStr]):
+ """Generic base class for TextIO and BinaryIO.
+
+ This is an abstract, generic version of the return of open().
+
+ NOTE: This does not distinguish between the different possible
+ classes (text vs. binary, read vs. write vs. read/write,
+ append-only, unbuffered). The TextIO and BinaryIO subclasses
+ below capture the distinctions between text vs. binary, which is
+ pervasive in the interface; however we currently do not offer a
+ way to track the other distinctions in the type system.
+ """
+
+ __slots__ = ()
+
+ @abstractproperty
+ def mode(self) -> str:
+ pass
+
+ @abstractproperty
+ def name(self) -> str:
+ pass
+
+ @abstractmethod
+ def close(self) -> None:
+ pass
+
+ @abstractmethod
+ def closed(self) -> bool:
+ pass
+
+ @abstractmethod
+ def fileno(self) -> int:
+ pass
+
+ @abstractmethod
+ def flush(self) -> None:
+ pass
+
+ @abstractmethod
+ def isatty(self) -> bool:
+ pass
+
+ @abstractmethod
+ def read(self, n: int = -1) -> AnyStr:
+ pass
+
+ @abstractmethod
+ def readable(self) -> bool:
+ pass
+
+ @abstractmethod
+ def readline(self, limit: int = -1) -> AnyStr:
+ pass
+
+ @abstractmethod
+ def readlines(self, hint: int = -1) -> List[AnyStr]:
+ pass
+
+ @abstractmethod
+ def seek(self, offset: int, whence: int = 0) -> int:
+ pass
+
+ @abstractmethod
+ def seekable(self) -> bool:
+ pass
+
+ @abstractmethod
+ def tell(self) -> int:
+ pass
+
+ @abstractmethod
+ def truncate(self, size: int = None) -> int:
+ pass
+
+ @abstractmethod
+ def writable(self) -> bool:
+ pass
+
+ @abstractmethod
+ def write(self, s: AnyStr) -> int:
+ pass
+
+ @abstractmethod
+ def writelines(self, lines: List[AnyStr]) -> None:
+ pass
+
+ @abstractmethod
+ def __enter__(self) -> 'IO[AnyStr]':
+ pass
+
+ @abstractmethod
+ def __exit__(self, type, value, traceback) -> None:
+ pass
+
+
+class BinaryIO(IO[bytes]):
+ """Typed version of the return of open() in binary mode."""
+
+ __slots__ = ()
+
+ @abstractmethod
+ def write(self, s: Union[bytes, bytearray]) -> int:
+ pass
+
+ @abstractmethod
+ def __enter__(self) -> 'BinaryIO':
+ pass
+
+
+class TextIO(IO[str]):
+ """Typed version of the return of open() in text mode."""
+
+ __slots__ = ()
+
+ @abstractproperty
+ def buffer(self) -> BinaryIO:
+ pass
+
+ @abstractproperty
+ def encoding(self) -> str:
+ pass
+
+ @abstractproperty
+ def errors(self) -> str:
+ pass
+
+ @abstractproperty
+ def line_buffering(self) -> bool:
+ pass
+
+ @abstractproperty
+ def newlines(self) -> Any:
+ pass
+
+ @abstractmethod
+ def __enter__(self) -> 'TextIO':
+ pass
+
+
+class io:
+ """Wrapper namespace for IO generic classes."""
+
+ __all__ = ['IO', 'TextIO', 'BinaryIO']
+ IO = IO
+ TextIO = TextIO
+ BinaryIO = BinaryIO
+
+io.__name__ = __name__ + '.io'
+sys.modules[io.__name__] = io
+
+
+Pattern = _TypeAlias('Pattern', AnyStr, type(stdlib_re.compile('')),
+ lambda p: p.pattern)
+Match = _TypeAlias('Match', AnyStr, type(stdlib_re.match('', '')),
+ lambda m: m.re.pattern)
+
+
+class re:
+ """Wrapper namespace for re type aliases."""
+
+ __all__ = ['Pattern', 'Match']
+ Pattern = Pattern
+ Match = Match
+
+re.__name__ = __name__ + '.re'
+sys.modules[re.__name__] = re
diff --git a/Lib/unittest/__init__.py b/Lib/unittest/__init__.py
index a5d50af78f..7f61a80ff4 100644
--- a/Lib/unittest/__init__.py
+++ b/Lib/unittest/__init__.py
@@ -1,6 +1,6 @@
"""
Python unit testing framework, based on Erich Gamma's JUnit and Kent Beck's
-Smalltalk testing framework.
+Smalltalk testing framework (used with permission).
This module contains the core framework classes that form the basis of
specific test cases and suites (TestCase, TestSuite etc.), and also a
@@ -67,3 +67,12 @@ from .signals import installHandler, registerResult, removeResult, removeHandler
# deprecated
_TextTestResult = TextTestResult
+
+# There are no tests here, so don't try to run anything discovered from
+# introspecting the symbols (e.g. FunctionTestCase). Instead, all our
+# tests come from within unittest.test.
+def load_tests(loader, tests, pattern):
+ import os.path
+ # top level directory cached on loader instance
+ this_dir = os.path.dirname(__file__)
+ return loader.discover(start_dir=this_dir, pattern=pattern)
diff --git a/Lib/unittest/case.py b/Lib/unittest/case.py
index 8a9f1c0a9d..524a7b1050 100644
--- a/Lib/unittest/case.py
+++ b/Lib/unittest/case.py
@@ -119,6 +119,10 @@ def expectedFailure(test_item):
test_item.__unittest_expecting_failure__ = True
return test_item
+def _is_subtype(expected, basetype):
+ if isinstance(expected, tuple):
+ return all(_is_subtype(e, basetype) for e in expected)
+ return isinstance(expected, type) and issubclass(expected, basetype)
class _BaseTestCaseContext:
@@ -129,35 +133,45 @@ class _BaseTestCaseContext:
msg = self.test_case._formatMessage(self.msg, standardMsg)
raise self.test_case.failureException(msg)
-
class _AssertRaisesBaseContext(_BaseTestCaseContext):
- def __init__(self, expected, test_case, callable_obj=None,
- expected_regex=None):
+ def __init__(self, expected, test_case, expected_regex=None):
_BaseTestCaseContext.__init__(self, test_case)
self.expected = expected
self.test_case = test_case
- if callable_obj is not None:
- try:
- self.obj_name = callable_obj.__name__
- except AttributeError:
- self.obj_name = str(callable_obj)
- else:
- self.obj_name = None
if expected_regex is not None:
expected_regex = re.compile(expected_regex)
self.expected_regex = expected_regex
+ self.obj_name = None
self.msg = None
- def handle(self, name, callable_obj, args, kwargs):
+ def handle(self, name, args, kwargs):
"""
- If callable_obj is None, assertRaises/Warns is being used as a
+ If args is empty, assertRaises/Warns is being used as a
context manager, so check for a 'msg' kwarg and return self.
- If callable_obj is not None, call it passing args and kwargs.
+ If args is not empty, call a callable passing positional and keyword
+ arguments.
"""
- if callable_obj is None:
+ if not _is_subtype(self.expected, self._base_type):
+ raise TypeError('%s() arg 1 must be %s' %
+ (name, self._base_type_str))
+ if args and args[0] is None:
+ warnings.warn("callable is None",
+ DeprecationWarning, 3)
+ args = ()
+ if not args:
self.msg = kwargs.pop('msg', None)
+ if kwargs:
+ warnings.warn('%r is an invalid keyword argument for '
+ 'this function' % next(iter(kwargs)),
+ DeprecationWarning, 3)
return self
+
+ callable_obj, *args = args
+ try:
+ self.obj_name = callable_obj.__name__
+ except AttributeError:
+ self.obj_name = str(callable_obj)
with self:
callable_obj(*args, **kwargs)
@@ -165,6 +179,9 @@ class _AssertRaisesBaseContext(_BaseTestCaseContext):
class _AssertRaisesContext(_AssertRaisesBaseContext):
"""A context manager used to implement TestCase.assertRaises* methods."""
+ _base_type = BaseException
+ _base_type_str = 'an exception type or tuple of exception types'
+
def __enter__(self):
return self
@@ -199,6 +216,9 @@ class _AssertRaisesContext(_AssertRaisesBaseContext):
class _AssertWarnsContext(_AssertRaisesBaseContext):
"""A context manager used to implement TestCase.assertWarns* methods."""
+ _base_type = Warning
+ _base_type_str = 'a warning type or tuple of warning types'
+
def __enter__(self):
# The __warningregistry__'s need to be in a pristine state for tests
# to work properly.
@@ -677,15 +697,15 @@ class TestCase(object):
except UnicodeDecodeError:
return '%s : %s' % (safe_repr(standardMsg), safe_repr(msg))
- def assertRaises(self, excClass, callableObj=None, *args, **kwargs):
- """Fail unless an exception of class excClass is raised
- by callableObj when invoked with arguments args and keyword
- arguments kwargs. If a different type of exception is
+ def assertRaises(self, expected_exception, *args, **kwargs):
+ """Fail unless an exception of class expected_exception is raised
+ by the callable when invoked with specified positional and
+ keyword arguments. If a different type of exception is
raised, it will not be caught, and the test case will be
deemed to have suffered an error, exactly as for an
unexpected exception.
- If called with callableObj omitted or None, will return a
+ If called with the callable and arguments omitted, will return a
context object used like this::
with self.assertRaises(SomeException):
@@ -703,18 +723,18 @@ class TestCase(object):
the_exception = cm.exception
self.assertEqual(the_exception.error_code, 3)
"""
- context = _AssertRaisesContext(excClass, self, callableObj)
- return context.handle('assertRaises', callableObj, args, kwargs)
+ context = _AssertRaisesContext(expected_exception, self)
+ return context.handle('assertRaises', args, kwargs)
- def assertWarns(self, expected_warning, callable_obj=None, *args, **kwargs):
+ def assertWarns(self, expected_warning, *args, **kwargs):
"""Fail unless a warning of class warnClass is triggered
- by callable_obj when invoked with arguments args and keyword
- arguments kwargs. If a different type of warning is
+ by the callable when invoked with specified positional and
+ keyword arguments. If a different type of warning is
triggered, it will not be handled: depending on the other
warning filtering rules in effect, it might be silenced, printed
out, or raised as an exception.
- If called with callable_obj omitted or None, will return a
+ If called with the callable and arguments omitted, will return a
context object used like this::
with self.assertWarns(SomeWarning):
@@ -734,8 +754,8 @@ class TestCase(object):
the_warning = cm.warning
self.assertEqual(the_warning.some_attribute, 147)
"""
- context = _AssertWarnsContext(expected_warning, self, callable_obj)
- return context.handle('assertWarns', callable_obj, args, kwargs)
+ context = _AssertWarnsContext(expected_warning, self)
+ return context.handle('assertWarns', args, kwargs)
def assertLogs(self, logger=None, level=None):
"""Fail unless a log message of level *level* or higher is emitted
@@ -944,7 +964,7 @@ class TestCase(object):
if item1 != item2:
differing += ('\nFirst differing element %d:\n%s\n%s\n' %
- (i, item1, item2))
+ ((i,) + _common_shorten_repr(item1, item2)))
break
else:
if (len1 == len2 and seq_type is None and
@@ -957,7 +977,7 @@ class TestCase(object):
'elements.\n' % (seq_type_name, len1 - len2))
try:
differing += ('First extra element %d:\n%s\n' %
- (len2, seq1[len2]))
+ (len2, safe_repr(seq1[len2])))
except (TypeError, IndexError, NotImplementedError):
differing += ('Unable to index element %d '
'of first %s\n' % (len2, seq_type_name))
@@ -966,7 +986,7 @@ class TestCase(object):
'elements.\n' % (seq_type_name, len2 - len1))
try:
differing += ('First extra element %d:\n%s\n' %
- (len1, seq2[len1]))
+ (len1, safe_repr(seq2[len1])))
except (TypeError, IndexError, NotImplementedError):
differing += ('Unable to index element %d '
'of second %s\n' % (len1, seq_type_name))
@@ -1222,26 +1242,23 @@ class TestCase(object):
self.fail(self._formatMessage(msg, standardMsg))
def assertRaisesRegex(self, expected_exception, expected_regex,
- callable_obj=None, *args, **kwargs):
+ *args, **kwargs):
"""Asserts that the message in a raised exception matches a regex.
Args:
expected_exception: Exception class expected to be raised.
expected_regex: Regex (re pattern object or string) expected
to be found in error message.
- callable_obj: Function to be called.
+ args: Function to be called and extra positional args.
+ kwargs: Extra kwargs.
msg: Optional message used in case of failure. Can only be used
when assertRaisesRegex is used as a context manager.
- args: Extra args.
- kwargs: Extra kwargs.
"""
- context = _AssertRaisesContext(expected_exception, self, callable_obj,
- expected_regex)
-
- return context.handle('assertRaisesRegex', callable_obj, args, kwargs)
+ context = _AssertRaisesContext(expected_exception, self, expected_regex)
+ return context.handle('assertRaisesRegex', args, kwargs)
def assertWarnsRegex(self, expected_warning, expected_regex,
- callable_obj=None, *args, **kwargs):
+ *args, **kwargs):
"""Asserts that the message in a triggered warning matches a regexp.
Basic functioning is similar to assertWarns() with the addition
that only warnings whose messages also match the regular expression
@@ -1251,15 +1268,13 @@ class TestCase(object):
expected_warning: Warning class expected to be triggered.
expected_regex: Regex (re pattern object or string) expected
to be found in error message.
- callable_obj: Function to be called.
+ args: Function to be called and extra positional args.
+ kwargs: Extra kwargs.
msg: Optional message used in case of failure. Can only be used
when assertWarnsRegex is used as a context manager.
- args: Extra args.
- kwargs: Extra kwargs.
"""
- context = _AssertWarnsContext(expected_warning, self, callable_obj,
- expected_regex)
- return context.handle('assertWarnsRegex', callable_obj, args, kwargs)
+ context = _AssertWarnsContext(expected_warning, self, expected_regex)
+ return context.handle('assertWarnsRegex', args, kwargs)
def assertRegex(self, text, expected_regex, msg=None):
"""Fail the test unless the text matches the regular expression."""
@@ -1267,8 +1282,10 @@ class TestCase(object):
assert expected_regex, "expected_regex must not be empty."
expected_regex = re.compile(expected_regex)
if not expected_regex.search(text):
- msg = msg or "Regex didn't match"
- msg = '%s: %r not found in %r' % (msg, expected_regex.pattern, text)
+ standardMsg = "Regex didn't match: %r not found in %r" % (
+ expected_regex.pattern, text)
+ # _formatMessage ensures the longMessage option is respected
+ msg = self._formatMessage(msg, standardMsg)
raise self.failureException(msg)
def assertNotRegex(self, text, unexpected_regex, msg=None):
@@ -1277,11 +1294,12 @@ class TestCase(object):
unexpected_regex = re.compile(unexpected_regex)
match = unexpected_regex.search(text)
if match:
- msg = msg or "Regex matched"
- msg = '%s: %r matches %r in %r' % (msg,
- text[match.start():match.end()],
- unexpected_regex.pattern,
- text)
+ standardMsg = 'Regex matched: %r matches %r in %r' % (
+ text[match.start() : match.end()],
+ unexpected_regex.pattern,
+ text)
+ # _formatMessage ensures the longMessage option is respected
+ msg = self._formatMessage(msg, standardMsg)
raise self.failureException(msg)
@@ -1303,6 +1321,7 @@ class TestCase(object):
failIf = _deprecate(assertFalse)
assertRaisesRegexp = _deprecate(assertRaisesRegex)
assertRegexpMatches = _deprecate(assertRegex)
+ assertNotRegexpMatches = _deprecate(assertNotRegex)
diff --git a/Lib/unittest/loader.py b/Lib/unittest/loader.py
index af39216d26..eb447d7ab6 100644
--- a/Lib/unittest/loader.py
+++ b/Lib/unittest/loader.py
@@ -6,6 +6,7 @@ import sys
import traceback
import types
import functools
+import warnings
from fnmatch import fnmatch
@@ -13,9 +14,9 @@ from . import case, suite, util
__unittest = True
-# what about .pyc or .pyo (etc)
+# what about .pyc (etc)
# we would need to avoid loading the same tests multiple times
-# from '.py', '.pyc' *and* '.pyo'
+# from '.py', *and* '.pyc'
VALID_MODULE_NAME = re.compile(r'[_a-z]\w*\.py$', re.IGNORECASE)
@@ -35,15 +36,18 @@ class _FailedTest(case.TestCase):
def _make_failed_import_test(name, suiteClass):
- message = 'Failed to import test module: %s\n%s' % (name, traceback.format_exc())
- return _make_failed_test(name, ImportError(message), suiteClass)
+ message = 'Failed to import test module: %s\n%s' % (
+ name, traceback.format_exc())
+ return _make_failed_test(name, ImportError(message), suiteClass, message)
def _make_failed_load_tests(name, exception, suiteClass):
- return _make_failed_test(name, exception, suiteClass)
+ message = 'Failed to call load_tests:\n%s' % (traceback.format_exc(),)
+ return _make_failed_test(
+ name, exception, suiteClass, message)
-def _make_failed_test(methodname, exception, suiteClass):
+def _make_failed_test(methodname, exception, suiteClass, message):
test = _FailedTest(methodname, exception)
- return suiteClass((test,))
+ return suiteClass((test,)), message
def _make_skipped_test(methodname, exception, suiteClass):
@case.skip(str(exception))
@@ -69,6 +73,13 @@ class TestLoader(object):
suiteClass = suite.TestSuite
_top_level_dir = None
+ def __init__(self):
+ super(TestLoader, self).__init__()
+ self.errors = []
+ # Tracks packages which we have called into via load_tests, to
+ # avoid infinite re-entrancy.
+ self._loading_packages = set()
+
def loadTestsFromTestCase(self, testCaseClass):
"""Return a suite of all tests cases contained in testCaseClass"""
if issubclass(testCaseClass, suite.TestSuite):
@@ -81,8 +92,30 @@ class TestLoader(object):
loaded_suite = self.suiteClass(map(testCaseClass, testCaseNames))
return loaded_suite
- def loadTestsFromModule(self, module, use_load_tests=True):
+ # XXX After Python 3.5, remove backward compatibility hacks for
+ # use_load_tests deprecation via *args and **kws. See issue 16662.
+ def loadTestsFromModule(self, module, *args, pattern=None, **kws):
"""Return a suite of all tests cases contained in the given module"""
+ # This method used to take an undocumented and unofficial
+ # use_load_tests argument. For backward compatibility, we still
+ # accept the argument (which can also be the first position) but we
+ # ignore it and issue a deprecation warning if it's present.
+ if len(args) > 0 or 'use_load_tests' in kws:
+ warnings.warn('use_load_tests is deprecated and ignored',
+ DeprecationWarning)
+ kws.pop('use_load_tests', None)
+ if len(args) > 1:
+ # Complain about the number of arguments, but don't forget the
+ # required `module` argument.
+ complaint = len(args) + 1
+ raise TypeError('loadTestsFromModule() takes 1 positional argument but {} were given'.format(complaint))
+ if len(kws) != 0:
+ # Since the keyword arguments are unsorted (see PEP 468), just
+ # pick the alphabetically sorted first argument to complain about,
+ # if multiple were given. At least the error message will be
+ # predictable.
+ complaint = sorted(kws)[0]
+ raise TypeError("loadTestsFromModule() got an unexpected keyword argument '{}'".format(complaint))
tests = []
for name in dir(module):
obj = getattr(module, name)
@@ -91,12 +124,14 @@ class TestLoader(object):
load_tests = getattr(module, 'load_tests', None)
tests = self.suiteClass(tests)
- if use_load_tests and load_tests is not None:
+ if load_tests is not None:
try:
- return load_tests(self, tests, None)
+ return load_tests(self, tests, pattern)
except Exception as e:
- return _make_failed_load_tests(module.__name__, e,
- self.suiteClass)
+ error_case, error_message = _make_failed_load_tests(
+ module.__name__, e, self.suiteClass)
+ self.errors.append(error_message)
+ return error_case
return tests
def loadTestsFromName(self, name, module=None):
@@ -109,20 +144,47 @@ class TestLoader(object):
The method optionally resolves the names relative to a given module.
"""
parts = name.split('.')
+ error_case, error_message = None, None
if module is None:
parts_copy = parts[:]
while parts_copy:
try:
- module = __import__('.'.join(parts_copy))
+ module_name = '.'.join(parts_copy)
+ module = __import__(module_name)
break
except ImportError:
- del parts_copy[-1]
+ next_attribute = parts_copy.pop()
+ # Last error so we can give it to the user if needed.
+ error_case, error_message = _make_failed_import_test(
+ next_attribute, self.suiteClass)
if not parts_copy:
- raise
+ # Even the top level import failed: report that error.
+ self.errors.append(error_message)
+ return error_case
parts = parts[1:]
obj = module
for part in parts:
- parent, obj = obj, getattr(obj, part)
+ try:
+ parent, obj = obj, getattr(obj, part)
+ except AttributeError as e:
+ # We can't traverse some part of the name.
+ if (getattr(obj, '__path__', None) is not None
+ and error_case is not None):
+ # This is a package (no __path__ per importlib docs), and we
+ # encountered an error importing something. We cannot tell
+ # the difference between package.WrongNameTestClass and
+ # package.wrong_module_name so we just report the
+ # ImportError - it is more informative.
+ self.errors.append(error_message)
+ return error_case
+ else:
+ # Otherwise, we signal that an AttributeError has occurred.
+ error_case, error_message = _make_failed_test(
+ part, e, self.suiteClass,
+ 'Failed to access attribute:\n%s' % (
+ traceback.format_exc(),))
+ self.errors.append(error_message)
+ return error_case
if isinstance(obj, types.ModuleType):
return self.loadTestsFromModule(obj)
@@ -181,9 +243,13 @@ class TestLoader(object):
If a test package name (directory with '__init__.py') matches the
pattern then the package will be checked for a 'load_tests' function. If
- this exists then it will be called with loader, tests, pattern.
+ this exists then it will be called with (loader, tests, pattern) unless
+ the package has already had load_tests called from the same discovery
+ invocation, in which case the package module object is not scanned for
+ tests - this ensures that when a package uses discover to further
+ discover child tests that infinite recursion does not happen.
- If load_tests exists then discovery does *not* recurse into the package,
+ If load_tests exists then discovery does *not* recurse into the package,
load_tests is responsible for loading all tests in the package.
The pattern is deliberately not stored as a loader attribute so that
@@ -288,6 +354,8 @@ class TestLoader(object):
return os.path.dirname(full_path)
def _get_name_from_path(self, path):
+ if path == self._top_level_dir:
+ return '.'
path = _jython_aware_splitext(os.path.normpath(path))
_relpath = os.path.relpath(path, self._top_level_dir)
@@ -307,63 +375,113 @@ class TestLoader(object):
def _find_tests(self, start_dir, pattern, namespace=False):
"""Used by discovery. Yields test suites it loads."""
+ # Handle the __init__ in this package
+ name = self._get_name_from_path(start_dir)
+ # name is '.' when start_dir == top_level_dir (and top_level_dir is by
+ # definition not a package).
+ if name != '.' and name not in self._loading_packages:
+ # name is in self._loading_packages while we have called into
+ # loadTestsFromModule with name.
+ tests, should_recurse = self._find_test_path(
+ start_dir, pattern, namespace)
+ if tests is not None:
+ yield tests
+ if not should_recurse:
+ # Either an error occurred, or load_tests was used by the
+ # package.
+ return
+ # Handle the contents.
paths = sorted(os.listdir(start_dir))
-
for path in paths:
full_path = os.path.join(start_dir, path)
- if os.path.isfile(full_path):
- if not VALID_MODULE_NAME.match(path):
- # valid Python identifiers only
- continue
- if not self._match_path(path, full_path, pattern):
- continue
- # if the test file matches, load it
+ tests, should_recurse = self._find_test_path(
+ full_path, pattern, namespace)
+ if tests is not None:
+ yield tests
+ if should_recurse:
+ # we found a package that didn't use load_tests.
name = self._get_name_from_path(full_path)
+ self._loading_packages.add(name)
try:
- module = self._get_module_from_name(name)
- except case.SkipTest as e:
- yield _make_skipped_test(name, e, self.suiteClass)
- except:
- yield _make_failed_import_test(name, self.suiteClass)
- else:
- mod_file = os.path.abspath(getattr(module, '__file__', full_path))
- realpath = _jython_aware_splitext(os.path.realpath(mod_file))
- fullpath_noext = _jython_aware_splitext(os.path.realpath(full_path))
- if realpath.lower() != fullpath_noext.lower():
- module_dir = os.path.dirname(realpath)
- mod_name = _jython_aware_splitext(os.path.basename(full_path))
- expected_dir = os.path.dirname(full_path)
- msg = ("%r module incorrectly imported from %r. Expected %r. "
- "Is this module globally installed?")
- raise ImportError(msg % (mod_name, module_dir, expected_dir))
- yield self.loadTestsFromModule(module)
- elif os.path.isdir(full_path):
- if (not namespace and
- not os.path.isfile(os.path.join(full_path, '__init__.py'))):
- continue
-
- load_tests = None
- tests = None
- if fnmatch(path, pattern):
- # only check load_tests if the package directory itself matches the filter
- name = self._get_name_from_path(full_path)
- package = self._get_module_from_name(name)
- load_tests = getattr(package, 'load_tests', None)
- tests = self.loadTestsFromModule(package, use_load_tests=False)
-
- if load_tests is None:
- if tests is not None:
- # tests loaded from package file
- yield tests
- # recurse into the package
- yield from self._find_tests(full_path, pattern,
- namespace=namespace)
- else:
- try:
- yield load_tests(self, tests, pattern)
- except Exception as e:
- yield _make_failed_load_tests(package.__name__, e,
- self.suiteClass)
+ yield from self._find_tests(full_path, pattern, namespace)
+ finally:
+ self._loading_packages.discard(name)
+
+ def _find_test_path(self, full_path, pattern, namespace=False):
+ """Used by discovery.
+
+ Loads tests from a single file, or a directories' __init__.py when
+ passed the directory.
+
+ Returns a tuple (None_or_tests_from_file, should_recurse).
+ """
+ basename = os.path.basename(full_path)
+ if os.path.isfile(full_path):
+ if not VALID_MODULE_NAME.match(basename):
+ # valid Python identifiers only
+ return None, False
+ if not self._match_path(basename, full_path, pattern):
+ return None, False
+ # if the test file matches, load it
+ name = self._get_name_from_path(full_path)
+ try:
+ module = self._get_module_from_name(name)
+ except case.SkipTest as e:
+ return _make_skipped_test(name, e, self.suiteClass), False
+ except:
+ error_case, error_message = \
+ _make_failed_import_test(name, self.suiteClass)
+ self.errors.append(error_message)
+ return error_case, False
+ else:
+ mod_file = os.path.abspath(
+ getattr(module, '__file__', full_path))
+ realpath = _jython_aware_splitext(
+ os.path.realpath(mod_file))
+ fullpath_noext = _jython_aware_splitext(
+ os.path.realpath(full_path))
+ if realpath.lower() != fullpath_noext.lower():
+ module_dir = os.path.dirname(realpath)
+ mod_name = _jython_aware_splitext(
+ os.path.basename(full_path))
+ expected_dir = os.path.dirname(full_path)
+ msg = ("%r module incorrectly imported from %r. Expected "
+ "%r. Is this module globally installed?")
+ raise ImportError(
+ msg % (mod_name, module_dir, expected_dir))
+ return self.loadTestsFromModule(module, pattern=pattern), False
+ elif os.path.isdir(full_path):
+ if (not namespace and
+ not os.path.isfile(os.path.join(full_path, '__init__.py'))):
+ return None, False
+
+ load_tests = None
+ tests = None
+ name = self._get_name_from_path(full_path)
+ try:
+ package = self._get_module_from_name(name)
+ except case.SkipTest as e:
+ return _make_skipped_test(name, e, self.suiteClass), False
+ except:
+ error_case, error_message = \
+ _make_failed_import_test(name, self.suiteClass)
+ self.errors.append(error_message)
+ return error_case, False
+ else:
+ load_tests = getattr(package, 'load_tests', None)
+ # Mark this package as being in load_tests (possibly ;))
+ self._loading_packages.add(name)
+ try:
+ tests = self.loadTestsFromModule(package, pattern=pattern)
+ if load_tests is not None:
+ # loadTestsFromModule(package) has loaded tests for us.
+ return tests, False
+ return tests, True
+ finally:
+ self._loading_packages.discard(name)
+ else:
+ return None, False
+
defaultTestLoader = TestLoader()
diff --git a/Lib/unittest/main.py b/Lib/unittest/main.py
index e750ca5062..09fefe1164 100644
--- a/Lib/unittest/main.py
+++ b/Lib/unittest/main.py
@@ -58,7 +58,7 @@ class TestProgram(object):
def __init__(self, module='__main__', defaultTest=None, argv=None,
testRunner=None, testLoader=loader.defaultTestLoader,
exit=True, verbosity=1, failfast=None, catchbreak=None,
- buffer=None, warnings=None):
+ buffer=None, warnings=None, *, tb_locals=False):
if isinstance(module, str):
self.module = __import__(module)
for part in module.split('.')[1:]:
@@ -73,8 +73,9 @@ class TestProgram(object):
self.catchbreak = catchbreak
self.verbosity = verbosity
self.buffer = buffer
+ self.tb_locals = tb_locals
if warnings is None and not sys.warnoptions:
- # even if DreprecationWarnings are ignored by default
+ # even if DeprecationWarnings are ignored by default
# print them anyway unless other warnings settings are
# specified by the warnings arg or the -W python flag
self.warnings = 'default'
@@ -159,7 +160,9 @@ class TestProgram(object):
parser.add_argument('-q', '--quiet', dest='verbosity',
action='store_const', const=0,
help='Quiet output')
-
+ parser.add_argument('--locals', dest='tb_locals',
+ action='store_true',
+ help='Show local variables in tracebacks')
if self.failfast is None:
parser.add_argument('-f', '--failfast', dest='failfast',
action='store_true',
@@ -231,10 +234,18 @@ class TestProgram(object):
self.testRunner = runner.TextTestRunner
if isinstance(self.testRunner, type):
try:
- testRunner = self.testRunner(verbosity=self.verbosity,
- failfast=self.failfast,
- buffer=self.buffer,
- warnings=self.warnings)
+ try:
+ testRunner = self.testRunner(verbosity=self.verbosity,
+ failfast=self.failfast,
+ buffer=self.buffer,
+ warnings=self.warnings,
+ tb_locals=self.tb_locals)
+ except TypeError:
+ # didn't accept the tb_locals argument
+ testRunner = self.testRunner(verbosity=self.verbosity,
+ failfast=self.failfast,
+ buffer=self.buffer,
+ warnings=self.warnings)
except TypeError:
# didn't accept the verbosity, buffer or failfast arguments
testRunner = self.testRunner()
diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py
index 573c799ced..86a5a3dfeb 100644
--- a/Lib/unittest/mock.py
+++ b/Lib/unittest/mock.py
@@ -27,9 +27,13 @@ __version__ = '1.0'
import inspect
import pprint
import sys
+import builtins
+from types import ModuleType
from functools import wraps, partial
+_builtins = {name for name in dir(builtins) if not name.startswith('_')}
+
BaseExceptions = (BaseException,)
if 'java' in sys.platform:
# jython
@@ -271,13 +275,11 @@ def _copy(value):
return value
-_allowed_names = set(
- [
- 'return_value', '_mock_return_value', 'side_effect',
- '_mock_side_effect', '_mock_parent', '_mock_new_parent',
- '_mock_name', '_mock_new_name'
- ]
-)
+_allowed_names = {
+ 'return_value', '_mock_return_value', 'side_effect',
+ '_mock_side_effect', '_mock_parent', '_mock_new_parent',
+ '_mock_name', '_mock_new_name'
+}
def _delegating_property(name):
@@ -375,7 +377,7 @@ class NonCallableMock(Base):
def __init__(
self, spec=None, wraps=None, name=None, spec_set=None,
parent=None, _spec_state=None, _new_name='', _new_parent=None,
- _spec_as_instance=False, _eat_self=None, **kwargs
+ _spec_as_instance=False, _eat_self=None, unsafe=False, **kwargs
):
if _new_parent is None:
_new_parent = parent
@@ -405,6 +407,7 @@ class NonCallableMock(Base):
__dict__['_mock_mock_calls'] = _CallList()
__dict__['method_calls'] = _CallList()
+ __dict__['_mock_unsafe'] = unsafe
if kwargs:
self.configure_mock(**kwargs)
@@ -503,7 +506,8 @@ class NonCallableMock(Base):
if delegated is None:
return self._mock_side_effect
sf = delegated.side_effect
- if sf is not None and not callable(sf) and not isinstance(sf, _MockIter):
+ if (sf is not None and not callable(sf)
+ and not isinstance(sf, _MockIter) and not _is_exception(sf)):
sf = _MockIter(sf)
delegated.side_effect = sf
return sf
@@ -567,13 +571,16 @@ class NonCallableMock(Base):
def __getattr__(self, name):
- if name == '_mock_methods':
+ if name in {'_mock_methods', '_mock_unsafe'}:
raise AttributeError(name)
elif self._mock_methods is not None:
if name not in self._mock_methods or name in _all_magics:
raise AttributeError("Mock object has no attribute %r" % name)
elif _is_magic(name):
raise AttributeError(name)
+ if not self._mock_unsafe:
+ if name.startswith(('assert', 'assret')):
+ raise AttributeError(name)
result = self._mock_children.get(name)
if result is _deleted:
@@ -756,6 +763,14 @@ class NonCallableMock(Base):
else:
return _call
+ def assert_not_called(_mock_self):
+ """assert that the mock was never called.
+ """
+ self = _mock_self
+ if self.call_count != 0:
+ msg = ("Expected '%s' to not have been called. Called %s times." %
+ (self._mock_name or 'mock', self.call_count))
+ raise AssertionError(msg)
def assert_called_with(_mock_self, *args, **kwargs):
"""assert that the mock was called with the specified arguments.
@@ -1172,6 +1187,9 @@ class _patch(object):
else:
local = True
+ if name in _builtins and isinstance(target, ModuleType):
+ self.create = True
+
if not self.create and original is DEFAULT:
raise AttributeError(
"%s does not have the attribute %r" % (target, name)
@@ -1314,7 +1332,10 @@ class _patch(object):
setattr(self.target, self.attribute, self.temp_original)
else:
delattr(self.target, self.attribute)
- if not self.create and not hasattr(self.target, self.attribute):
+ if not self.create and (not hasattr(self.target, self.attribute) or
+ self.attribute in ('__doc__', '__module__',
+ '__defaults__', '__annotations__',
+ '__kwdefaults__')):
# needed for proxy objects like django settings
setattr(self.target, self.attribute, self.temp_original)
@@ -1659,7 +1680,7 @@ magic_methods = (
)
numerics = (
- "add sub mul div floordiv mod lshift rshift and xor or pow truediv"
+ "add sub mul matmul div floordiv mod lshift rshift and xor or pow truediv"
)
inplace = ' '.join('i%s' % n for n in numerics.split())
right = ' '.join('r%s' % n for n in numerics.split())
@@ -1668,11 +1689,12 @@ right = ' '.join('r%s' % n for n in numerics.split())
# (as they are metaclass methods)
# __del__ is not supported at all as it causes problems if it exists
-_non_defaults = set('__%s__' % method for method in [
- 'get', 'set', 'delete', 'reversed', 'missing', 'reduce', 'reduce_ex',
- 'getinitargs', 'getnewargs', 'getstate', 'setstate', 'getformat',
- 'setformat', 'repr', 'dir', 'subclasses', 'format',
-])
+_non_defaults = {
+ '__get__', '__set__', '__delete__', '__reversed__', '__missing__',
+ '__reduce__', '__reduce_ex__', '__getinitargs__', '__getnewargs__',
+ '__getstate__', '__setstate__', '__getformat__', '__setformat__',
+ '__repr__', '__dir__', '__subclasses__', '__format__',
+}
def _get_method(name, func):
@@ -1683,19 +1705,19 @@ def _get_method(name, func):
return method
-_magics = set(
+_magics = {
'__%s__' % method for method in
' '.join([magic_methods, numerics, inplace, right]).split()
-)
+}
_all_magics = _magics | _non_defaults
-_unsupported_magics = set([
+_unsupported_magics = {
'__getattr__', '__setattr__',
'__init__', '__new__', '__prepare__'
'__instancecheck__', '__subclasscheck__',
'__del__'
-])
+}
_calculate_return_value = {
'__hash__': lambda self: object.__hash__(self),
@@ -1884,7 +1906,7 @@ def _format_call_signature(name, args, kwargs):
formatted_args = ''
args_string = ', '.join([repr(arg) for arg in args])
kwargs_string = ', '.join([
- '%s=%r' % (key, value) for key, value in kwargs.items()
+ '%s=%r' % (key, value) for key, value in sorted(kwargs.items())
])
if args_string:
formatted_args = args_string
@@ -2007,8 +2029,7 @@ class _Call(tuple):
return (other_args, other_kwargs) == (self_args, self_kwargs)
- def __ne__(self, other):
- return not self.__eq__(other)
+ __ne__ = object.__ne__
def __call__(self, *args, **kwargs):
@@ -2026,6 +2047,12 @@ class _Call(tuple):
return _Call(name=name, parent=self, from_kall=False)
+ def count(self, *args, **kwargs):
+ return self.__getattr__('count')(*args, **kwargs)
+
+ def index(self, *args, **kwargs):
+ return self.__getattr__('index')(*args, **kwargs)
+
def __repr__(self):
if not self.from_kall:
name = self.name or 'call'
@@ -2296,6 +2323,8 @@ def mock_open(mock=None, read_data=''):
yield handle.readline.return_value
for line in _state[0]:
yield line
+ while True:
+ yield type(read_data)()
global file_spec
diff --git a/Lib/unittest/result.py b/Lib/unittest/result.py
index 8e0a64322b..c7e3206d74 100644
--- a/Lib/unittest/result.py
+++ b/Lib/unittest/result.py
@@ -45,6 +45,7 @@ class TestResult(object):
self.unexpectedSuccesses = []
self.shouldStop = False
self.buffer = False
+ self.tb_locals = False
self._stdout_buffer = None
self._stderr_buffer = None
self._original_stdout = sys.stdout
@@ -147,7 +148,7 @@ class TestResult(object):
self.skipped.append((test, reason))
def addExpectedFailure(self, test, err):
- """Called when an expected failure/error occured."""
+ """Called when an expected failure/error occurred."""
self.expectedFailures.append(
(test, self._exc_info_to_string(err, test)))
@@ -179,9 +180,11 @@ class TestResult(object):
if exctype is test.failureException:
# Skip assert*() traceback levels
length = self._count_relevant_tb_levels(tb)
- msgLines = traceback.format_exception(exctype, value, tb, length)
else:
- msgLines = traceback.format_exception(exctype, value, tb)
+ length = None
+ tb_e = traceback.TracebackException(
+ exctype, value, tb, limit=length, capture_locals=self.tb_locals)
+ msgLines = list(tb_e.format())
if self.buffer:
output = sys.stdout.getvalue()
diff --git a/Lib/unittest/runner.py b/Lib/unittest/runner.py
index 28b8865978..2112262e4e 100644
--- a/Lib/unittest/runner.py
+++ b/Lib/unittest/runner.py
@@ -126,7 +126,13 @@ class TextTestRunner(object):
resultclass = TextTestResult
def __init__(self, stream=None, descriptions=True, verbosity=1,
- failfast=False, buffer=False, resultclass=None, warnings=None):
+ failfast=False, buffer=False, resultclass=None, warnings=None,
+ *, tb_locals=False):
+ """Construct a TextTestRunner.
+
+ Subclasses should accept **kwargs to ensure compatibility as the
+ interface changes.
+ """
if stream is None:
stream = sys.stderr
self.stream = _WritelnDecorator(stream)
@@ -134,6 +140,7 @@ class TextTestRunner(object):
self.verbosity = verbosity
self.failfast = failfast
self.buffer = buffer
+ self.tb_locals = tb_locals
self.warnings = warnings
if resultclass is not None:
self.resultclass = resultclass
@@ -147,6 +154,7 @@ class TextTestRunner(object):
registerResult(result)
result.failfast = self.failfast
result.buffer = self.buffer
+ result.tb_locals = self.tb_locals
with warnings.catch_warnings():
if self.warnings:
# if self.warnings is set, use it to filter all the warnings
diff --git a/Lib/unittest/suite.py b/Lib/unittest/suite.py
index 76c472514e..353d4a17b9 100644
--- a/Lib/unittest/suite.py
+++ b/Lib/unittest/suite.py
@@ -71,7 +71,7 @@ class BaseTestSuite(object):
try:
test = self._tests[index]
except TypeError:
- # support for suite implementations that have overriden self._tests
+ # support for suite implementations that have overridden self._tests
pass
else:
# Some unittest tests add non TestCase/TestSuite objects to
diff --git a/Lib/unittest/test/support.py b/Lib/unittest/test/support.py
index 02e8f3a00b..529265304f 100644
--- a/Lib/unittest/test/support.py
+++ b/Lib/unittest/test/support.py
@@ -25,8 +25,6 @@ class TestHashing(object):
try:
if not hash(obj_1) == hash(obj_2):
self.fail("%r and %r do not hash equal" % (obj_1, obj_2))
- except KeyboardInterrupt:
- raise
except Exception as e:
self.fail("Problem hashing %r and %r: %s" % (obj_1, obj_2, e))
@@ -35,8 +33,6 @@ class TestHashing(object):
if hash(obj_1) == hash(obj_2):
self.fail("%s and %s hash equal, but shouldn't" %
(obj_1, obj_2))
- except KeyboardInterrupt:
- raise
except Exception as e:
self.fail("Problem hashing %s and %s: %s" % (obj_1, obj_2, e))
diff --git a/Lib/unittest/test/test_assertions.py b/Lib/unittest/test/test_assertions.py
index c349a95794..e6e2bc2ca7 100644
--- a/Lib/unittest/test/test_assertions.py
+++ b/Lib/unittest/test/test_assertions.py
@@ -133,7 +133,6 @@ class Test_Assertions(unittest.TestCase):
try:
self.assertNotRegex('Ala ma kota', r'k.t', 'Message')
except self.failureException as e:
- self.assertIn("'kot'", e.args[0])
self.assertIn('Message', e.args[0])
else:
self.fail('assertNotRegex should have failed.')
@@ -329,6 +328,20 @@ class TestLongMessage(unittest.TestCase):
"^unexpectedly identical: None$",
"^unexpectedly identical: None : oops$"])
+ def testAssertRegex(self):
+ self.assertMessages('assertRegex', ('foo', 'bar'),
+ ["^Regex didn't match:",
+ "^oops$",
+ "^Regex didn't match:",
+ "^Regex didn't match: (.*) : oops$"])
+
+ def testAssertNotRegex(self):
+ self.assertMessages('assertNotRegex', ('foo', 'foo'),
+ ["^Regex matched:",
+ "^oops$",
+ "^Regex matched:",
+ "^Regex matched: (.*) : oops$"])
+
def assertMessagesCM(self, methodName, args, func, errors):
"""
diff --git a/Lib/unittest/test/test_break.py b/Lib/unittest/test/test_break.py
index 0bf1a229b8..2c7501952c 100644
--- a/Lib/unittest/test/test_break.py
+++ b/Lib/unittest/test/test_break.py
@@ -211,6 +211,7 @@ class TestBreak(unittest.TestCase):
self.verbosity = verbosity
self.failfast = failfast
self.catchbreak = catchbreak
+ self.tb_locals = False
self.testRunner = FakeRunner
self.test = test
self.result = None
@@ -221,6 +222,7 @@ class TestBreak(unittest.TestCase):
self.assertEqual(FakeRunner.initArgs, [((), {'buffer': None,
'verbosity': verbosity,
'failfast': failfast,
+ 'tb_locals': False,
'warnings': None})])
self.assertEqual(FakeRunner.runArgs, [test])
self.assertEqual(p.result, result)
@@ -235,6 +237,7 @@ class TestBreak(unittest.TestCase):
self.assertEqual(FakeRunner.initArgs, [((), {'buffer': None,
'verbosity': verbosity,
'failfast': failfast,
+ 'tb_locals': False,
'warnings': None})])
self.assertEqual(FakeRunner.runArgs, [test])
self.assertEqual(p.result, result)
diff --git a/Lib/unittest/test/test_case.py b/Lib/unittest/test/test_case.py
index 321d67a82f..1fb95dce2f 100644
--- a/Lib/unittest/test/test_case.py
+++ b/Lib/unittest/test/test_case.py
@@ -1103,12 +1103,9 @@ test case
except self.failureException as e:
# need to remove the first line of the error message
error = str(e).split('\n', 1)[1]
+ self.assertEqual(sample_text_error, error)
- # no fair testing ourself with ourself, and assertEqual is used for strings
- # so can't use assertEqual either. Just use assertTrue.
- self.assertTrue(sample_text_error == error)
-
- def testAsertEqualSingleLine(self):
+ def testAssertEqualSingleLine(self):
sample_text = "laden swallows fly slowly"
revised_sample_text = "unladen swallows fly quickly"
sample_text_error = """\
@@ -1120,8 +1117,85 @@ test case
try:
self.assertEqual(sample_text, revised_sample_text)
except self.failureException as e:
+ # need to remove the first line of the error message
error = str(e).split('\n', 1)[1]
- self.assertTrue(sample_text_error == error)
+ self.assertEqual(sample_text_error, error)
+
+ def testEqualityBytesWarning(self):
+ if sys.flags.bytes_warning:
+ def bytes_warning():
+ return self.assertWarnsRegex(BytesWarning,
+ 'Comparison between bytes and string')
+ else:
+ def bytes_warning():
+ return contextlib.ExitStack()
+
+ with bytes_warning(), self.assertRaises(self.failureException):
+ self.assertEqual('a', b'a')
+ with bytes_warning():
+ self.assertNotEqual('a', b'a')
+
+ a = [0, 'a']
+ b = [0, b'a']
+ with bytes_warning(), self.assertRaises(self.failureException):
+ self.assertListEqual(a, b)
+ with bytes_warning(), self.assertRaises(self.failureException):
+ self.assertTupleEqual(tuple(a), tuple(b))
+ with bytes_warning(), self.assertRaises(self.failureException):
+ self.assertSequenceEqual(a, tuple(b))
+ with bytes_warning(), self.assertRaises(self.failureException):
+ self.assertSequenceEqual(tuple(a), b)
+ with bytes_warning(), self.assertRaises(self.failureException):
+ self.assertSequenceEqual('a', b'a')
+ with bytes_warning(), self.assertRaises(self.failureException):
+ self.assertSetEqual(set(a), set(b))
+
+ with self.assertRaises(self.failureException):
+ self.assertListEqual(a, tuple(b))
+ with self.assertRaises(self.failureException):
+ self.assertTupleEqual(tuple(a), b)
+
+ a = [0, b'a']
+ b = [0]
+ with self.assertRaises(self.failureException):
+ self.assertListEqual(a, b)
+ with self.assertRaises(self.failureException):
+ self.assertTupleEqual(tuple(a), tuple(b))
+ with self.assertRaises(self.failureException):
+ self.assertSequenceEqual(a, tuple(b))
+ with self.assertRaises(self.failureException):
+ self.assertSequenceEqual(tuple(a), b)
+ with self.assertRaises(self.failureException):
+ self.assertSetEqual(set(a), set(b))
+
+ a = [0]
+ b = [0, b'a']
+ with self.assertRaises(self.failureException):
+ self.assertListEqual(a, b)
+ with self.assertRaises(self.failureException):
+ self.assertTupleEqual(tuple(a), tuple(b))
+ with self.assertRaises(self.failureException):
+ self.assertSequenceEqual(a, tuple(b))
+ with self.assertRaises(self.failureException):
+ self.assertSequenceEqual(tuple(a), b)
+ with self.assertRaises(self.failureException):
+ self.assertSetEqual(set(a), set(b))
+
+ with bytes_warning(), self.assertRaises(self.failureException):
+ self.assertDictEqual({'a': 0}, {b'a': 0})
+ with self.assertRaises(self.failureException):
+ self.assertDictEqual({}, {b'a': 0})
+ with self.assertRaises(self.failureException):
+ self.assertDictEqual({b'a': 0}, {})
+
+ with self.assertRaises(self.failureException):
+ self.assertCountEqual([b'a', b'a'], [b'a', b'a', b'a'])
+ with bytes_warning():
+ self.assertCountEqual(['a', b'a'], ['a', b'a'])
+ with bytes_warning(), self.assertRaises(self.failureException):
+ self.assertCountEqual(['a', 'a'], [b'a', b'a'])
+ with bytes_warning(), self.assertRaises(self.failureException):
+ self.assertCountEqual(['a', 'a', []], [b'a', b'a', []])
def testAssertIsNone(self):
self.assertIsNone(None)
@@ -1147,6 +1221,9 @@ test case
# Failure when no exception is raised
with self.assertRaises(self.failureException):
self.assertRaises(ExceptionMock, lambda: 0)
+ # Failure when the function is None
+ with self.assertWarns(DeprecationWarning):
+ self.assertRaises(ExceptionMock, None)
# Failure when another exception is raised
with self.assertRaises(ExceptionMock):
self.assertRaises(ValueError, Stub)
@@ -1171,10 +1248,31 @@ test case
with self.assertRaises(self.failureException):
with self.assertRaises(ExceptionMock):
pass
+ # Custom message
+ with self.assertRaisesRegex(self.failureException, 'foobar'):
+ with self.assertRaises(ExceptionMock, msg='foobar'):
+ pass
+ # Invalid keyword argument
+ with self.assertWarnsRegex(DeprecationWarning, 'foobar'), \
+ self.assertRaises(AssertionError):
+ with self.assertRaises(ExceptionMock, foobar=42):
+ pass
# Failure when another exception is raised
with self.assertRaises(ExceptionMock):
self.assertRaises(ValueError, Stub)
+ def testAssertRaisesNoExceptionType(self):
+ with self.assertRaises(TypeError):
+ self.assertRaises()
+ with self.assertRaises(TypeError):
+ self.assertRaises(1)
+ with self.assertRaises(TypeError):
+ self.assertRaises(object)
+ with self.assertRaises(TypeError):
+ self.assertRaises((ValueError, 1))
+ with self.assertRaises(TypeError):
+ self.assertRaises((ValueError, object))
+
def testAssertRaisesRegex(self):
class ExceptionMock(Exception):
pass
@@ -1184,6 +1282,8 @@ test case
self.assertRaisesRegex(ExceptionMock, re.compile('expect$'), Stub)
self.assertRaisesRegex(ExceptionMock, 'expect$', Stub)
+ with self.assertWarns(DeprecationWarning):
+ self.assertRaisesRegex(ExceptionMock, 'expect$', None)
def testAssertNotRaisesRegex(self):
self.assertRaisesRegex(
@@ -1194,6 +1294,15 @@ test case
self.failureException, '^Exception not raised by <lambda>$',
self.assertRaisesRegex, Exception, 'x',
lambda: None)
+ # Custom message
+ with self.assertRaisesRegex(self.failureException, 'foobar'):
+ with self.assertRaisesRegex(Exception, 'expect', msg='foobar'):
+ pass
+ # Invalid keyword argument
+ with self.assertWarnsRegex(DeprecationWarning, 'foobar'), \
+ self.assertRaises(AssertionError):
+ with self.assertRaisesRegex(Exception, 'expect', foobar=42):
+ pass
def testAssertRaisesRegexInvalidRegex(self):
# Issue 20145.
@@ -1237,6 +1346,20 @@ test case
self.assertIsInstance(e, ExceptionMock)
self.assertEqual(e.args[0], v)
+ def testAssertRaisesRegexNoExceptionType(self):
+ with self.assertRaises(TypeError):
+ self.assertRaisesRegex()
+ with self.assertRaises(TypeError):
+ self.assertRaisesRegex(ValueError)
+ with self.assertRaises(TypeError):
+ self.assertRaisesRegex(1, 'expect')
+ with self.assertRaises(TypeError):
+ self.assertRaisesRegex(object, 'expect')
+ with self.assertRaises(TypeError):
+ self.assertRaisesRegex((ValueError, 1), 'expect')
+ with self.assertRaises(TypeError):
+ self.assertRaisesRegex((ValueError, object), 'expect')
+
def testAssertWarnsCallable(self):
def _runtime_warn():
warnings.warn("foo", RuntimeWarning)
@@ -1251,6 +1374,9 @@ test case
# Failure when no warning is triggered
with self.assertRaises(self.failureException):
self.assertWarns(RuntimeWarning, lambda: 0)
+ # Failure when the function is None
+ with self.assertWarns(DeprecationWarning):
+ self.assertWarns(RuntimeWarning, None)
# Failure when another warning is triggered
with warnings.catch_warnings():
# Force default filter (in case tests are run with -We)
@@ -1289,6 +1415,15 @@ test case
with self.assertRaises(self.failureException):
with self.assertWarns(RuntimeWarning):
pass
+ # Custom message
+ with self.assertRaisesRegex(self.failureException, 'foobar'):
+ with self.assertWarns(RuntimeWarning, msg='foobar'):
+ pass
+ # Invalid keyword argument
+ with self.assertWarnsRegex(DeprecationWarning, 'foobar'), \
+ self.assertRaises(AssertionError):
+ with self.assertWarns(RuntimeWarning, foobar=42):
+ pass
# Failure when another warning is triggered
with warnings.catch_warnings():
# Force default filter (in case tests are run with -We)
@@ -1303,6 +1438,20 @@ test case
with self.assertWarns(DeprecationWarning):
_runtime_warn()
+ def testAssertWarnsNoExceptionType(self):
+ with self.assertRaises(TypeError):
+ self.assertWarns()
+ with self.assertRaises(TypeError):
+ self.assertWarns(1)
+ with self.assertRaises(TypeError):
+ self.assertWarns(object)
+ with self.assertRaises(TypeError):
+ self.assertWarns((UserWarning, 1))
+ with self.assertRaises(TypeError):
+ self.assertWarns((UserWarning, object))
+ with self.assertRaises(TypeError):
+ self.assertWarns((UserWarning, Exception))
+
def testAssertWarnsRegexCallable(self):
def _runtime_warn(msg):
warnings.warn(msg, RuntimeWarning)
@@ -1312,6 +1461,9 @@ test case
with self.assertRaises(self.failureException):
self.assertWarnsRegex(RuntimeWarning, "o+",
lambda: 0)
+ # Failure when the function is None
+ with self.assertWarns(DeprecationWarning):
+ self.assertWarnsRegex(RuntimeWarning, "o+", None)
# Failure when another warning is triggered
with warnings.catch_warnings():
# Force default filter (in case tests are run with -We)
@@ -1348,6 +1500,15 @@ test case
with self.assertRaises(self.failureException):
with self.assertWarnsRegex(RuntimeWarning, "o+"):
pass
+ # Custom message
+ with self.assertRaisesRegex(self.failureException, 'foobar'):
+ with self.assertWarnsRegex(RuntimeWarning, 'o+', msg='foobar'):
+ pass
+ # Invalid keyword argument
+ with self.assertWarnsRegex(DeprecationWarning, 'foobar'), \
+ self.assertRaises(AssertionError):
+ with self.assertWarnsRegex(RuntimeWarning, 'o+', foobar=42):
+ pass
# Failure when another warning is triggered
with warnings.catch_warnings():
# Force default filter (in case tests are run with -We)
@@ -1369,6 +1530,22 @@ test case
with self.assertWarnsRegex(RuntimeWarning, "o+"):
_runtime_warn("barz")
+ def testAssertWarnsRegexNoExceptionType(self):
+ with self.assertRaises(TypeError):
+ self.assertWarnsRegex()
+ with self.assertRaises(TypeError):
+ self.assertWarnsRegex(UserWarning)
+ with self.assertRaises(TypeError):
+ self.assertWarnsRegex(1, 'expect')
+ with self.assertRaises(TypeError):
+ self.assertWarnsRegex(object, 'expect')
+ with self.assertRaises(TypeError):
+ self.assertWarnsRegex((UserWarning, 1), 'expect')
+ with self.assertRaises(TypeError):
+ self.assertWarnsRegex((UserWarning, object), 'expect')
+ with self.assertRaises(TypeError):
+ self.assertWarnsRegex((UserWarning, Exception), 'expect')
+
@contextlib.contextmanager
def assertNoStderr(self):
with captured_stderr() as buf:
diff --git a/Lib/unittest/test/test_discovery.py b/Lib/unittest/test/test_discovery.py
index f12e8983cd..bb196e6997 100644
--- a/Lib/unittest/test/test_discovery.py
+++ b/Lib/unittest/test/test_discovery.py
@@ -1,4 +1,5 @@
-import os
+import os.path
+from os.path import abspath
import re
import sys
import types
@@ -69,7 +70,13 @@ class TestDiscovery(unittest.TestCase):
self.addCleanup(restore_isfile)
loader._get_module_from_name = lambda path: path + ' module'
- loader.loadTestsFromModule = lambda module: module + ' tests'
+ orig_load_tests = loader.loadTestsFromModule
+ def loadTestsFromModule(module, pattern=None):
+ # This is where load_tests is called.
+ base = orig_load_tests(module, pattern=pattern)
+ return base + [module + ' tests']
+ loader.loadTestsFromModule = loadTestsFromModule
+ loader.suiteClass = lambda thing: thing
top_level = os.path.abspath('/foo')
loader._top_level_dir = top_level
@@ -77,12 +84,52 @@ class TestDiscovery(unittest.TestCase):
# The test suites found should be sorted alphabetically for reliable
# execution order.
- expected = [name + ' module tests' for name in
- ('test1', 'test2')]
- expected.extend([('test_dir.%s' % name) + ' module tests' for name in
+ expected = [[name + ' module tests'] for name in
+ ('test1', 'test2', 'test_dir')]
+ expected.extend([[('test_dir.%s' % name) + ' module tests'] for name in
('test3', 'test4')])
self.assertEqual(suite, expected)
+ def test_find_tests_socket(self):
+ # A socket is neither a directory nor a regular file.
+ # https://bugs.python.org/issue25320
+ loader = unittest.TestLoader()
+
+ original_listdir = os.listdir
+ def restore_listdir():
+ os.listdir = original_listdir
+ original_isfile = os.path.isfile
+ def restore_isfile():
+ os.path.isfile = original_isfile
+ original_isdir = os.path.isdir
+ def restore_isdir():
+ os.path.isdir = original_isdir
+
+ path_lists = [['socket']]
+ os.listdir = lambda path: path_lists.pop(0)
+ self.addCleanup(restore_listdir)
+
+ os.path.isdir = lambda path: False
+ self.addCleanup(restore_isdir)
+
+ os.path.isfile = lambda path: False
+ self.addCleanup(restore_isfile)
+
+ loader._get_module_from_name = lambda path: path + ' module'
+ orig_load_tests = loader.loadTestsFromModule
+ def loadTestsFromModule(module, pattern=None):
+ # This is where load_tests is called.
+ base = orig_load_tests(module, pattern=pattern)
+ return base + [module + ' tests']
+ loader.loadTestsFromModule = loadTestsFromModule
+ loader.suiteClass = lambda thing: thing
+
+ top_level = os.path.abspath('/foo')
+ loader._top_level_dir = top_level
+ suite = list(loader._find_tests(top_level, 'test*.py'))
+
+ self.assertEqual(suite, [])
+
def test_find_tests_with_package(self):
loader = unittest.TestLoader()
@@ -117,34 +164,204 @@ class TestDiscovery(unittest.TestCase):
if os.path.basename(path) == 'test_directory':
def load_tests(loader, tests, pattern):
self.load_tests_args.append((loader, tests, pattern))
- return 'load_tests'
+ return [self.path + ' load_tests']
self.load_tests = load_tests
def __eq__(self, other):
return self.path == other.path
loader._get_module_from_name = lambda name: Module(name)
- def loadTestsFromModule(module, use_load_tests):
- if use_load_tests:
- raise self.failureException('use_load_tests should be False for packages')
- return module.path + ' module tests'
+ orig_load_tests = loader.loadTestsFromModule
+ def loadTestsFromModule(module, pattern=None):
+ # This is where load_tests is called.
+ base = orig_load_tests(module, pattern=pattern)
+ return base + [module.path + ' module tests']
loader.loadTestsFromModule = loadTestsFromModule
+ loader.suiteClass = lambda thing: thing
loader._top_level_dir = '/foo'
# this time no '.py' on the pattern so that it can match
# a test package
suite = list(loader._find_tests('/foo', 'test*'))
- # We should have loaded tests from the test_directory package by calling load_tests
- # and directly from the test_directory2 package
+ # We should have loaded tests from the a_directory and test_directory2
+ # directly and via load_tests for the test_directory package, which
+ # still calls the baseline module loader.
+ self.assertEqual(suite,
+ [['a_directory module tests'],
+ ['test_directory load_tests',
+ 'test_directory module tests'],
+ ['test_directory2 module tests']])
+
+
+ # The test module paths should be sorted for reliable execution order
+ self.assertEqual(Module.paths,
+ ['a_directory', 'test_directory', 'test_directory2'])
+
+ # load_tests should have been called once with loader, tests and pattern
+ # (but there are no tests in our stub module itself, so thats [] at the
+ # time of call.
+ self.assertEqual(Module.load_tests_args,
+ [(loader, [], 'test*')])
+
+ def test_find_tests_default_calls_package_load_tests(self):
+ loader = unittest.TestLoader()
+
+ original_listdir = os.listdir
+ def restore_listdir():
+ os.listdir = original_listdir
+ original_isfile = os.path.isfile
+ def restore_isfile():
+ os.path.isfile = original_isfile
+ original_isdir = os.path.isdir
+ def restore_isdir():
+ os.path.isdir = original_isdir
+
+ directories = ['a_directory', 'test_directory', 'test_directory2']
+ path_lists = [directories, [], [], []]
+ os.listdir = lambda path: path_lists.pop(0)
+ self.addCleanup(restore_listdir)
+
+ os.path.isdir = lambda path: True
+ self.addCleanup(restore_isdir)
+
+ os.path.isfile = lambda path: os.path.basename(path) not in directories
+ self.addCleanup(restore_isfile)
+
+ class Module(object):
+ paths = []
+ load_tests_args = []
+
+ def __init__(self, path):
+ self.path = path
+ self.paths.append(path)
+ if os.path.basename(path) == 'test_directory':
+ def load_tests(loader, tests, pattern):
+ self.load_tests_args.append((loader, tests, pattern))
+ return [self.path + ' load_tests']
+ self.load_tests = load_tests
+
+ def __eq__(self, other):
+ return self.path == other.path
+
+ loader._get_module_from_name = lambda name: Module(name)
+ orig_load_tests = loader.loadTestsFromModule
+ def loadTestsFromModule(module, pattern=None):
+ # This is where load_tests is called.
+ base = orig_load_tests(module, pattern=pattern)
+ return base + [module.path + ' module tests']
+ loader.loadTestsFromModule = loadTestsFromModule
+ loader.suiteClass = lambda thing: thing
+
+ loader._top_level_dir = '/foo'
+ # this time no '.py' on the pattern so that it can match
+ # a test package
+ suite = list(loader._find_tests('/foo', 'test*.py'))
+
+ # We should have loaded tests from the a_directory and test_directory2
+ # directly and via load_tests for the test_directory package, which
+ # still calls the baseline module loader.
self.assertEqual(suite,
- ['load_tests', 'test_directory2' + ' module tests'])
+ [['a_directory module tests'],
+ ['test_directory load_tests',
+ 'test_directory module tests'],
+ ['test_directory2 module tests']])
# The test module paths should be sorted for reliable execution order
- self.assertEqual(Module.paths, ['test_directory', 'test_directory2'])
+ self.assertEqual(Module.paths,
+ ['a_directory', 'test_directory', 'test_directory2'])
+
# load_tests should have been called once with loader, tests and pattern
self.assertEqual(Module.load_tests_args,
- [(loader, 'test_directory' + ' module tests', 'test*')])
+ [(loader, [], 'test*.py')])
+
+ def test_find_tests_customise_via_package_pattern(self):
+ # This test uses the example 'do-nothing' load_tests from
+ # https://docs.python.org/3/library/unittest.html#load-tests-protocol
+ # to make sure that that actually works.
+ # Housekeeping
+ original_listdir = os.listdir
+ def restore_listdir():
+ os.listdir = original_listdir
+ self.addCleanup(restore_listdir)
+ original_isfile = os.path.isfile
+ def restore_isfile():
+ os.path.isfile = original_isfile
+ self.addCleanup(restore_isfile)
+ original_isdir = os.path.isdir
+ def restore_isdir():
+ os.path.isdir = original_isdir
+ self.addCleanup(restore_isdir)
+ self.addCleanup(sys.path.remove, abspath('/foo'))
+
+ # Test data: we expect the following:
+ # a listdir to find our package, and isfile and isdir checks on it.
+ # a module-from-name call to turn that into a module
+ # followed by load_tests.
+ # then our load_tests will call discover() which is messy
+ # but that finally chains into find_tests again for the child dir -
+ # which is why we don't have an infinite loop.
+ # We expect to see:
+ # the module load tests for both package and plain module called,
+ # and the plain module result nested by the package module load_tests
+ # indicating that it was processed and could have been mutated.
+ vfs = {abspath('/foo'): ['my_package'],
+ abspath('/foo/my_package'): ['__init__.py', 'test_module.py']}
+ def list_dir(path):
+ return list(vfs[path])
+ os.listdir = list_dir
+ os.path.isdir = lambda path: not path.endswith('.py')
+ os.path.isfile = lambda path: path.endswith('.py')
+
+ class Module(object):
+ paths = []
+ load_tests_args = []
+
+ def __init__(self, path):
+ self.path = path
+ self.paths.append(path)
+ if path.endswith('test_module'):
+ def load_tests(loader, tests, pattern):
+ self.load_tests_args.append((loader, tests, pattern))
+ return [self.path + ' load_tests']
+ else:
+ def load_tests(loader, tests, pattern):
+ self.load_tests_args.append((loader, tests, pattern))
+ # top level directory cached on loader instance
+ __file__ = '/foo/my_package/__init__.py'
+ this_dir = os.path.dirname(__file__)
+ pkg_tests = loader.discover(
+ start_dir=this_dir, pattern=pattern)
+ return [self.path + ' load_tests', tests
+ ] + pkg_tests
+ self.load_tests = load_tests
+
+ def __eq__(self, other):
+ return self.path == other.path
+
+ loader = unittest.TestLoader()
+ loader._get_module_from_name = lambda name: Module(name)
+ loader.suiteClass = lambda thing: thing
+
+ loader._top_level_dir = abspath('/foo')
+ # this time no '.py' on the pattern so that it can match
+ # a test package
+ suite = list(loader._find_tests(abspath('/foo'), 'test*.py'))
+
+ # We should have loaded tests from both my_package and
+ # my_pacakge.test_module, and also run the load_tests hook in both.
+ # (normally this would be nested TestSuites.)
+ self.assertEqual(suite,
+ [['my_package load_tests', [],
+ ['my_package.test_module load_tests']]])
+ # Parents before children.
+ self.assertEqual(Module.paths,
+ ['my_package', 'my_package.test_module'])
+
+ # load_tests should have been called twice with loader, tests and pattern
+ self.assertEqual(Module.load_tests_args,
+ [(loader, [], 'test*.py'),
+ (loader, [], 'test*.py')])
def test_discover(self):
loader = unittest.TestLoader()
@@ -192,6 +409,51 @@ class TestDiscovery(unittest.TestCase):
self.assertEqual(_find_tests_args, [(start_dir, 'pattern')])
self.assertIn(top_level_dir, sys.path)
+ def test_discover_start_dir_is_package_calls_package_load_tests(self):
+ # This test verifies that the package load_tests in a package is indeed
+ # invoked when the start_dir is a package (and not the top level).
+ # http://bugs.python.org/issue22457
+
+ # Test data: we expect the following:
+ # an isfile to verify the package, then importing and scanning
+ # as per _find_tests' normal behaviour.
+ # We expect to see our load_tests hook called once.
+ vfs = {abspath('/toplevel'): ['startdir'],
+ abspath('/toplevel/startdir'): ['__init__.py']}
+ def list_dir(path):
+ return list(vfs[path])
+ self.addCleanup(setattr, os, 'listdir', os.listdir)
+ os.listdir = list_dir
+ self.addCleanup(setattr, os.path, 'isfile', os.path.isfile)
+ os.path.isfile = lambda path: path.endswith('.py')
+ self.addCleanup(setattr, os.path, 'isdir', os.path.isdir)
+ os.path.isdir = lambda path: not path.endswith('.py')
+ self.addCleanup(sys.path.remove, abspath('/toplevel'))
+
+ class Module(object):
+ paths = []
+ load_tests_args = []
+
+ def __init__(self, path):
+ self.path = path
+
+ def load_tests(self, loader, tests, pattern):
+ return ['load_tests called ' + self.path]
+
+ def __eq__(self, other):
+ return self.path == other.path
+
+ loader = unittest.TestLoader()
+ loader._get_module_from_name = lambda name: Module(name)
+ loader.suiteClass = lambda thing: thing
+
+ suite = loader.discover('/toplevel/startdir', top_level_dir='/toplevel')
+
+ # We should have loaded tests from the package __init__.
+ # (normally this would be nested TestSuites.)
+ self.assertEqual(suite,
+ [['load_tests called startdir']])
+
def setup_import_issue_tests(self, fakefile):
listdir = os.listdir
os.listdir = lambda _: [fakefile]
@@ -204,6 +466,17 @@ class TestDiscovery(unittest.TestCase):
sys.path[:] = orig_sys_path
self.addCleanup(restore)
+ def setup_import_issue_package_tests(self, vfs):
+ self.addCleanup(setattr, os, 'listdir', os.listdir)
+ self.addCleanup(setattr, os.path, 'isfile', os.path.isfile)
+ self.addCleanup(setattr, os.path, 'isdir', os.path.isdir)
+ self.addCleanup(sys.path.__setitem__, slice(None), list(sys.path))
+ def list_dir(path):
+ return list(vfs[path])
+ os.listdir = list_dir
+ os.path.isdir = lambda path: not path.endswith('.py')
+ os.path.isfile = lambda path: path.endswith('.py')
+
def test_discover_with_modules_that_fail_to_import(self):
loader = unittest.TestLoader()
@@ -212,11 +485,44 @@ class TestDiscovery(unittest.TestCase):
suite = loader.discover('.')
self.assertIn(os.getcwd(), sys.path)
self.assertEqual(suite.countTestCases(), 1)
+ # Errors loading the suite are also captured for introspection.
+ self.assertNotEqual([], loader.errors)
+ self.assertEqual(1, len(loader.errors))
+ error = loader.errors[0]
+ self.assertTrue(
+ 'Failed to import test module: test_this_does_not_exist' in error,
+ 'missing error string in %r' % error)
test = list(list(suite)[0])[0] # extract test from suite
with self.assertRaises(ImportError):
test.test_this_does_not_exist()
+ def test_discover_with_init_modules_that_fail_to_import(self):
+ vfs = {abspath('/foo'): ['my_package'],
+ abspath('/foo/my_package'): ['__init__.py', 'test_module.py']}
+ self.setup_import_issue_package_tests(vfs)
+ import_calls = []
+ def _get_module_from_name(name):
+ import_calls.append(name)
+ raise ImportError("Cannot import Name")
+ loader = unittest.TestLoader()
+ loader._get_module_from_name = _get_module_from_name
+ suite = loader.discover(abspath('/foo'))
+
+ self.assertIn(abspath('/foo'), sys.path)
+ self.assertEqual(suite.countTestCases(), 1)
+ # Errors loading the suite are also captured for introspection.
+ self.assertNotEqual([], loader.errors)
+ self.assertEqual(1, len(loader.errors))
+ error = loader.errors[0]
+ self.assertTrue(
+ 'Failed to import test module: my_package' in error,
+ 'missing error string in %r' % error)
+ test = list(list(suite)[0])[0] # extract test from suite
+ with self.assertRaises(ImportError):
+ test.my_package()
+ self.assertEqual(import_calls, ['my_package'])
+
# Check picklability
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
pickle.loads(pickle.dumps(test, proto))
@@ -241,6 +547,30 @@ class TestDiscovery(unittest.TestCase):
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
pickle.loads(pickle.dumps(suite, proto))
+ def test_discover_with_init_module_that_raises_SkipTest_on_import(self):
+ vfs = {abspath('/foo'): ['my_package'],
+ abspath('/foo/my_package'): ['__init__.py', 'test_module.py']}
+ self.setup_import_issue_package_tests(vfs)
+ import_calls = []
+ def _get_module_from_name(name):
+ import_calls.append(name)
+ raise unittest.SkipTest('skipperoo')
+ loader = unittest.TestLoader()
+ loader._get_module_from_name = _get_module_from_name
+ suite = loader.discover(abspath('/foo'))
+
+ self.assertIn(abspath('/foo'), sys.path)
+ self.assertEqual(suite.countTestCases(), 1)
+ result = unittest.TestResult()
+ suite.run(result)
+ self.assertEqual(len(result.skipped), 1)
+ self.assertEqual(result.testsRun, 1)
+ self.assertEqual(import_calls, ['my_package'])
+
+ # Check picklability
+ for proto in range(pickle.HIGHEST_PROTOCOL + 1):
+ pickle.loads(pickle.dumps(suite, proto))
+
def test_command_line_handling_parseArgs(self):
program = TestableTestProgram()
diff --git a/Lib/unittest/test/test_loader.py b/Lib/unittest/test/test_loader.py
index b62a1b5c54..4b97882d65 100644
--- a/Lib/unittest/test/test_loader.py
+++ b/Lib/unittest/test/test_loader.py
@@ -1,12 +1,37 @@
import sys
import types
-
+import warnings
import unittest
+# Decorator used in the deprecation tests to reset the warning registry for
+# test isolation and reproducibility.
+def warningregistry(func):
+ def wrapper(*args, **kws):
+ missing = []
+ saved = getattr(warnings, '__warningregistry__', missing).copy()
+ try:
+ return func(*args, **kws)
+ finally:
+ if saved is missing:
+ try:
+ del warnings.__warningregistry__
+ except AttributeError:
+ pass
+ else:
+ warnings.__warningregistry__ = saved
+ return wrapper
+
class Test_TestLoader(unittest.TestCase):
+ ### Basic object tests
+ ################################################################
+
+ def test___init__(self):
+ loader = unittest.TestLoader()
+ self.assertEqual([], loader.errors)
+
### Tests for TestLoader.loadTestsFromTestCase
################################################################
@@ -150,6 +175,7 @@ class Test_TestLoader(unittest.TestCase):
# Check that loadTestsFromModule honors (or not) a module
# with a load_tests function.
+ @warningregistry
def test_loadTestsFromModule__load_tests(self):
m = types.ModuleType('m')
class MyTestCase(unittest.TestCase):
@@ -168,10 +194,145 @@ class Test_TestLoader(unittest.TestCase):
suite = loader.loadTestsFromModule(m)
self.assertIsInstance(suite, unittest.TestSuite)
self.assertEqual(load_tests_args, [loader, suite, None])
+ # With Python 3.5, the undocumented and unofficial use_load_tests is
+ # ignored (and deprecated).
+ load_tests_args = []
+ with warnings.catch_warnings(record=False):
+ warnings.simplefilter('ignore')
+ suite = loader.loadTestsFromModule(m, use_load_tests=False)
+ self.assertEqual(load_tests_args, [loader, suite, None])
+
+ @warningregistry
+ def test_loadTestsFromModule__use_load_tests_deprecated_positional(self):
+ m = types.ModuleType('m')
+ class MyTestCase(unittest.TestCase):
+ def test(self):
+ pass
+ m.testcase_1 = MyTestCase
+
+ load_tests_args = []
+ def load_tests(loader, tests, pattern):
+ self.assertIsInstance(tests, unittest.TestSuite)
+ load_tests_args.extend((loader, tests, pattern))
+ return tests
+ m.load_tests = load_tests
+ # The method still works.
+ loader = unittest.TestLoader()
+ # use_load_tests=True as a positional argument.
+ with warnings.catch_warnings(record=True) as w:
+ warnings.simplefilter('always')
+ suite = loader.loadTestsFromModule(m, False)
+ self.assertIsInstance(suite, unittest.TestSuite)
+ # load_tests was still called because use_load_tests is deprecated
+ # and ignored.
+ self.assertEqual(load_tests_args, [loader, suite, None])
+ # We got a warning.
+ self.assertIs(w[-1].category, DeprecationWarning)
+ self.assertEqual(str(w[-1].message),
+ 'use_load_tests is deprecated and ignored')
+
+ @warningregistry
+ def test_loadTestsFromModule__use_load_tests_deprecated_keyword(self):
+ m = types.ModuleType('m')
+ class MyTestCase(unittest.TestCase):
+ def test(self):
+ pass
+ m.testcase_1 = MyTestCase
+
+ load_tests_args = []
+ def load_tests(loader, tests, pattern):
+ self.assertIsInstance(tests, unittest.TestSuite)
+ load_tests_args.extend((loader, tests, pattern))
+ return tests
+ m.load_tests = load_tests
+ # The method still works.
+ loader = unittest.TestLoader()
+ with warnings.catch_warnings(record=True) as w:
+ warnings.simplefilter('always')
+ suite = loader.loadTestsFromModule(m, use_load_tests=False)
+ self.assertIsInstance(suite, unittest.TestSuite)
+ # load_tests was still called because use_load_tests is deprecated
+ # and ignored.
+ self.assertEqual(load_tests_args, [loader, suite, None])
+ # We got a warning.
+ self.assertIs(w[-1].category, DeprecationWarning)
+ self.assertEqual(str(w[-1].message),
+ 'use_load_tests is deprecated and ignored')
+
+ @warningregistry
+ def test_loadTestsFromModule__too_many_positional_args(self):
+ m = types.ModuleType('m')
+ class MyTestCase(unittest.TestCase):
+ def test(self):
+ pass
+ m.testcase_1 = MyTestCase
+
+ load_tests_args = []
+ def load_tests(loader, tests, pattern):
+ self.assertIsInstance(tests, unittest.TestSuite)
+ load_tests_args.extend((loader, tests, pattern))
+ return tests
+ m.load_tests = load_tests
+ loader = unittest.TestLoader()
+ with self.assertRaises(TypeError) as cm, \
+ warnings.catch_warnings(record=True) as w:
+ warnings.simplefilter('always')
+ loader.loadTestsFromModule(m, False, 'testme.*')
+ # We still got the deprecation warning.
+ self.assertIs(w[-1].category, DeprecationWarning)
+ self.assertEqual(str(w[-1].message),
+ 'use_load_tests is deprecated and ignored')
+ # We also got a TypeError for too many positional arguments.
+ self.assertEqual(type(cm.exception), TypeError)
+ self.assertEqual(
+ str(cm.exception),
+ 'loadTestsFromModule() takes 1 positional argument but 3 were given')
+
+ @warningregistry
+ def test_loadTestsFromModule__use_load_tests_other_bad_keyword(self):
+ m = types.ModuleType('m')
+ class MyTestCase(unittest.TestCase):
+ def test(self):
+ pass
+ m.testcase_1 = MyTestCase
+
+ load_tests_args = []
+ def load_tests(loader, tests, pattern):
+ self.assertIsInstance(tests, unittest.TestSuite)
+ load_tests_args.extend((loader, tests, pattern))
+ return tests
+ m.load_tests = load_tests
+ loader = unittest.TestLoader()
+ with warnings.catch_warnings():
+ warnings.simplefilter('ignore')
+ with self.assertRaises(TypeError) as cm:
+ loader.loadTestsFromModule(
+ m, use_load_tests=False, very_bad=True, worse=False)
+ self.assertEqual(type(cm.exception), TypeError)
+ # The error message names the first bad argument alphabetically,
+ # however use_load_tests (which sorts first) is ignored.
+ self.assertEqual(
+ str(cm.exception),
+ "loadTestsFromModule() got an unexpected keyword argument 'very_bad'")
+
+ def test_loadTestsFromModule__pattern(self):
+ m = types.ModuleType('m')
+ class MyTestCase(unittest.TestCase):
+ def test(self):
+ pass
+ m.testcase_1 = MyTestCase
load_tests_args = []
- suite = loader.loadTestsFromModule(m, use_load_tests=False)
- self.assertEqual(load_tests_args, [])
+ def load_tests(loader, tests, pattern):
+ self.assertIsInstance(tests, unittest.TestSuite)
+ load_tests_args.extend((loader, tests, pattern))
+ return tests
+ m.load_tests = load_tests
+
+ loader = unittest.TestLoader()
+ suite = loader.loadTestsFromModule(m, pattern='testme.*')
+ self.assertIsInstance(suite, unittest.TestSuite)
+ self.assertEqual(load_tests_args, [loader, suite, 'testme.*'])
def test_loadTestsFromModule__faulty_load_tests(self):
m = types.ModuleType('m')
@@ -184,6 +345,13 @@ class Test_TestLoader(unittest.TestCase):
suite = loader.loadTestsFromModule(m)
self.assertIsInstance(suite, unittest.TestSuite)
self.assertEqual(suite.countTestCases(), 1)
+ # Errors loading the suite are also captured for introspection.
+ self.assertNotEqual([], loader.errors)
+ self.assertEqual(1, len(loader.errors))
+ error = loader.errors[0]
+ self.assertTrue(
+ 'Failed to call load_tests:' in error,
+ 'missing error string in %r' % error)
test = list(suite)[0]
self.assertRaisesRegex(TypeError, "some failure", test.m)
@@ -219,15 +387,15 @@ class Test_TestLoader(unittest.TestCase):
def test_loadTestsFromName__malformed_name(self):
loader = unittest.TestLoader()
- # XXX Should this raise ValueError or ImportError?
- try:
- loader.loadTestsFromName('abc () //')
- except ValueError:
- pass
- except ImportError:
- pass
- else:
- self.fail("TestLoader.loadTestsFromName failed to raise ValueError")
+ suite = loader.loadTestsFromName('abc () //')
+ error, test = self.check_deferred_error(loader, suite)
+ expected = "Failed to import test module: abc () //"
+ expected_regex = "Failed to import test module: abc \(\) //"
+ self.assertIn(
+ expected, error,
+ 'missing error string in %r' % error)
+ self.assertRaisesRegex(
+ ImportError, expected_regex, getattr(test, 'abc () //'))
# "The specifier name is a ``dotted name'' that may resolve ... to a
# module"
@@ -236,28 +404,47 @@ class Test_TestLoader(unittest.TestCase):
def test_loadTestsFromName__unknown_module_name(self):
loader = unittest.TestLoader()
- try:
- loader.loadTestsFromName('sdasfasfasdf')
- except ImportError as e:
- self.assertEqual(str(e), "No module named 'sdasfasfasdf'")
- else:
- self.fail("TestLoader.loadTestsFromName failed to raise ImportError")
+ suite = loader.loadTestsFromName('sdasfasfasdf')
+ expected = "No module named 'sdasfasfasdf'"
+ error, test = self.check_deferred_error(loader, suite)
+ self.assertIn(
+ expected, error,
+ 'missing error string in %r' % error)
+ self.assertRaisesRegex(ImportError, expected, test.sdasfasfasdf)
# "The specifier name is a ``dotted name'' that may resolve either to
# a module, a test case class, a TestSuite instance, a test method
# within a test case class, or a callable object which returns a
# TestCase or TestSuite instance."
#
- # What happens when the module is found, but the attribute can't?
- def test_loadTestsFromName__unknown_attr_name(self):
+ # What happens when the module is found, but the attribute isn't?
+ def test_loadTestsFromName__unknown_attr_name_on_module(self):
loader = unittest.TestLoader()
- try:
- loader.loadTestsFromName('unittest.sdasfasfasdf')
- except AttributeError as e:
- self.assertEqual(str(e), "'module' object has no attribute 'sdasfasfasdf'")
- else:
- self.fail("TestLoader.loadTestsFromName failed to raise AttributeError")
+ suite = loader.loadTestsFromName('unittest.loader.sdasfasfasdf')
+ expected = "module 'unittest.loader' has no attribute 'sdasfasfasdf'"
+ error, test = self.check_deferred_error(loader, suite)
+ self.assertIn(
+ expected, error,
+ 'missing error string in %r' % error)
+ self.assertRaisesRegex(AttributeError, expected, test.sdasfasfasdf)
+
+ # "The specifier name is a ``dotted name'' that may resolve either to
+ # a module, a test case class, a TestSuite instance, a test method
+ # within a test case class, or a callable object which returns a
+ # TestCase or TestSuite instance."
+ #
+ # What happens when the module is found, but the attribute isn't?
+ def test_loadTestsFromName__unknown_attr_name_on_package(self):
+ loader = unittest.TestLoader()
+
+ suite = loader.loadTestsFromName('unittest.sdasfasfasdf')
+ expected = "No module named 'unittest.sdasfasfasdf'"
+ error, test = self.check_deferred_error(loader, suite)
+ self.assertIn(
+ expected, error,
+ 'missing error string in %r' % error)
+ self.assertRaisesRegex(ImportError, expected, test.sdasfasfasdf)
# "The specifier name is a ``dotted name'' that may resolve either to
# a module, a test case class, a TestSuite instance, a test method
@@ -269,12 +456,13 @@ class Test_TestLoader(unittest.TestCase):
def test_loadTestsFromName__relative_unknown_name(self):
loader = unittest.TestLoader()
- try:
- loader.loadTestsFromName('sdasfasfasdf', unittest)
- except AttributeError as e:
- self.assertEqual(str(e), "'module' object has no attribute 'sdasfasfasdf'")
- else:
- self.fail("TestLoader.loadTestsFromName failed to raise AttributeError")
+ suite = loader.loadTestsFromName('sdasfasfasdf', unittest)
+ expected = "module 'unittest' has no attribute 'sdasfasfasdf'"
+ error, test = self.check_deferred_error(loader, suite)
+ self.assertIn(
+ expected, error,
+ 'missing error string in %r' % error)
+ self.assertRaisesRegex(AttributeError, expected, test.sdasfasfasdf)
# "The specifier name is a ``dotted name'' that may resolve either to
# a module, a test case class, a TestSuite instance, a test method
@@ -290,12 +478,13 @@ class Test_TestLoader(unittest.TestCase):
def test_loadTestsFromName__relative_empty_name(self):
loader = unittest.TestLoader()
- try:
- loader.loadTestsFromName('', unittest)
- except AttributeError as e:
- pass
- else:
- self.fail("Failed to raise AttributeError")
+ suite = loader.loadTestsFromName('', unittest)
+ error, test = self.check_deferred_error(loader, suite)
+ expected = "has no attribute ''"
+ self.assertIn(
+ expected, error,
+ 'missing error string in %r' % error)
+ self.assertRaisesRegex(AttributeError, expected, getattr(test, ''))
# "The specifier name is a ``dotted name'' that may resolve either to
# a module, a test case class, a TestSuite instance, a test method
@@ -310,14 +499,15 @@ class Test_TestLoader(unittest.TestCase):
loader = unittest.TestLoader()
# XXX Should this raise AttributeError or ValueError?
- try:
- loader.loadTestsFromName('abc () //', unittest)
- except ValueError:
- pass
- except AttributeError:
- pass
- else:
- self.fail("TestLoader.loadTestsFromName failed to raise ValueError")
+ suite = loader.loadTestsFromName('abc () //', unittest)
+ error, test = self.check_deferred_error(loader, suite)
+ expected = "module 'unittest' has no attribute 'abc () //'"
+ expected_regex = "module 'unittest' has no attribute 'abc \(\) //'"
+ self.assertIn(
+ expected, error,
+ 'missing error string in %r' % error)
+ self.assertRaisesRegex(
+ AttributeError, expected_regex, getattr(test, 'abc () //'))
# "The method optionally resolves name relative to the given module"
#
@@ -423,12 +613,13 @@ class Test_TestLoader(unittest.TestCase):
m.testcase_1 = MyTestCase
loader = unittest.TestLoader()
- try:
- loader.loadTestsFromName('testcase_1.testfoo', m)
- except AttributeError as e:
- self.assertEqual(str(e), "type object 'MyTestCase' has no attribute 'testfoo'")
- else:
- self.fail("Failed to raise AttributeError")
+ suite = loader.loadTestsFromName('testcase_1.testfoo', m)
+ expected = "type object 'MyTestCase' has no attribute 'testfoo'"
+ error, test = self.check_deferred_error(loader, suite)
+ self.assertIn(
+ expected, error,
+ 'missing error string in %r' % error)
+ self.assertRaisesRegex(AttributeError, expected, test.testfoo)
# "The specifier name is a ``dotted name'' that may resolve ... to
# ... a callable object which returns a ... TestSuite instance"
@@ -546,6 +737,23 @@ class Test_TestLoader(unittest.TestCase):
### Tests for TestLoader.loadTestsFromNames()
################################################################
+ def check_deferred_error(self, loader, suite):
+ """Helper function for checking that errors in loading are reported.
+
+ :param loader: A loader with some errors.
+ :param suite: A suite that should have a late bound error.
+ :return: The first error message from the loader and the test object
+ from the suite.
+ """
+ self.assertIsInstance(suite, unittest.TestSuite)
+ self.assertEqual(suite.countTestCases(), 1)
+ # Errors loading the suite are also captured for introspection.
+ self.assertNotEqual([], loader.errors)
+ self.assertEqual(1, len(loader.errors))
+ error = loader.errors[0]
+ test = list(suite)[0]
+ return error, test
+
# "Similar to loadTestsFromName(), but takes a sequence of names rather
# than a single name."
#
@@ -598,14 +806,15 @@ class Test_TestLoader(unittest.TestCase):
loader = unittest.TestLoader()
# XXX Should this raise ValueError or ImportError?
- try:
- loader.loadTestsFromNames(['abc () //'])
- except ValueError:
- pass
- except ImportError:
- pass
- else:
- self.fail("TestLoader.loadTestsFromNames failed to raise ValueError")
+ suite = loader.loadTestsFromNames(['abc () //'])
+ error, test = self.check_deferred_error(loader, list(suite)[0])
+ expected = "Failed to import test module: abc () //"
+ expected_regex = "Failed to import test module: abc \(\) //"
+ self.assertIn(
+ expected, error,
+ 'missing error string in %r' % error)
+ self.assertRaisesRegex(
+ ImportError, expected_regex, getattr(test, 'abc () //'))
# "The specifier name is a ``dotted name'' that may resolve either to
# a module, a test case class, a TestSuite instance, a test method
@@ -616,12 +825,13 @@ class Test_TestLoader(unittest.TestCase):
def test_loadTestsFromNames__unknown_module_name(self):
loader = unittest.TestLoader()
- try:
- loader.loadTestsFromNames(['sdasfasfasdf'])
- except ImportError as e:
- self.assertEqual(str(e), "No module named 'sdasfasfasdf'")
- else:
- self.fail("TestLoader.loadTestsFromNames failed to raise ImportError")
+ suite = loader.loadTestsFromNames(['sdasfasfasdf'])
+ error, test = self.check_deferred_error(loader, list(suite)[0])
+ expected = "Failed to import test module: sdasfasfasdf"
+ self.assertIn(
+ expected, error,
+ 'missing error string in %r' % error)
+ self.assertRaisesRegex(ImportError, expected, test.sdasfasfasdf)
# "The specifier name is a ``dotted name'' that may resolve either to
# a module, a test case class, a TestSuite instance, a test method
@@ -632,12 +842,14 @@ class Test_TestLoader(unittest.TestCase):
def test_loadTestsFromNames__unknown_attr_name(self):
loader = unittest.TestLoader()
- try:
- loader.loadTestsFromNames(['unittest.sdasfasfasdf', 'unittest'])
- except AttributeError as e:
- self.assertEqual(str(e), "'module' object has no attribute 'sdasfasfasdf'")
- else:
- self.fail("TestLoader.loadTestsFromNames failed to raise AttributeError")
+ suite = loader.loadTestsFromNames(
+ ['unittest.loader.sdasfasfasdf', 'unittest.test.dummy'])
+ error, test = self.check_deferred_error(loader, list(suite)[0])
+ expected = "module 'unittest.loader' has no attribute 'sdasfasfasdf'"
+ self.assertIn(
+ expected, error,
+ 'missing error string in %r' % error)
+ self.assertRaisesRegex(AttributeError, expected, test.sdasfasfasdf)
# "The specifier name is a ``dotted name'' that may resolve either to
# a module, a test case class, a TestSuite instance, a test method
@@ -651,12 +863,13 @@ class Test_TestLoader(unittest.TestCase):
def test_loadTestsFromNames__unknown_name_relative_1(self):
loader = unittest.TestLoader()
- try:
- loader.loadTestsFromNames(['sdasfasfasdf'], unittest)
- except AttributeError as e:
- self.assertEqual(str(e), "'module' object has no attribute 'sdasfasfasdf'")
- else:
- self.fail("TestLoader.loadTestsFromName failed to raise AttributeError")
+ suite = loader.loadTestsFromNames(['sdasfasfasdf'], unittest)
+ error, test = self.check_deferred_error(loader, list(suite)[0])
+ expected = "module 'unittest' has no attribute 'sdasfasfasdf'"
+ self.assertIn(
+ expected, error,
+ 'missing error string in %r' % error)
+ self.assertRaisesRegex(AttributeError, expected, test.sdasfasfasdf)
# "The specifier name is a ``dotted name'' that may resolve either to
# a module, a test case class, a TestSuite instance, a test method
@@ -670,12 +883,13 @@ class Test_TestLoader(unittest.TestCase):
def test_loadTestsFromNames__unknown_name_relative_2(self):
loader = unittest.TestLoader()
- try:
- loader.loadTestsFromNames(['TestCase', 'sdasfasfasdf'], unittest)
- except AttributeError as e:
- self.assertEqual(str(e), "'module' object has no attribute 'sdasfasfasdf'")
- else:
- self.fail("TestLoader.loadTestsFromName failed to raise AttributeError")
+ suite = loader.loadTestsFromNames(['TestCase', 'sdasfasfasdf'], unittest)
+ error, test = self.check_deferred_error(loader, list(suite)[1])
+ expected = "module 'unittest' has no attribute 'sdasfasfasdf'"
+ self.assertIn(
+ expected, error,
+ 'missing error string in %r' % error)
+ self.assertRaisesRegex(AttributeError, expected, test.sdasfasfasdf)
# "The specifier name is a ``dotted name'' that may resolve either to
# a module, a test case class, a TestSuite instance, a test method
@@ -691,12 +905,13 @@ class Test_TestLoader(unittest.TestCase):
def test_loadTestsFromNames__relative_empty_name(self):
loader = unittest.TestLoader()
- try:
- loader.loadTestsFromNames([''], unittest)
- except AttributeError:
- pass
- else:
- self.fail("Failed to raise ValueError")
+ suite = loader.loadTestsFromNames([''], unittest)
+ error, test = self.check_deferred_error(loader, list(suite)[0])
+ expected = "has no attribute ''"
+ self.assertIn(
+ expected, error,
+ 'missing error string in %r' % error)
+ self.assertRaisesRegex(AttributeError, expected, getattr(test, ''))
# "The specifier name is a ``dotted name'' that may resolve either to
# a module, a test case class, a TestSuite instance, a test method
@@ -710,14 +925,15 @@ class Test_TestLoader(unittest.TestCase):
loader = unittest.TestLoader()
# XXX Should this raise AttributeError or ValueError?
- try:
- loader.loadTestsFromNames(['abc () //'], unittest)
- except AttributeError:
- pass
- except ValueError:
- pass
- else:
- self.fail("TestLoader.loadTestsFromNames failed to raise ValueError")
+ suite = loader.loadTestsFromNames(['abc () //'], unittest)
+ error, test = self.check_deferred_error(loader, list(suite)[0])
+ expected = "module 'unittest' has no attribute 'abc () //'"
+ expected_regex = "module 'unittest' has no attribute 'abc \(\) //'"
+ self.assertIn(
+ expected, error,
+ 'missing error string in %r' % error)
+ self.assertRaisesRegex(
+ AttributeError, expected_regex, getattr(test, 'abc () //'))
# "The method optionally resolves name relative to the given module"
#
@@ -835,12 +1051,13 @@ class Test_TestLoader(unittest.TestCase):
m.testcase_1 = MyTestCase
loader = unittest.TestLoader()
- try:
- loader.loadTestsFromNames(['testcase_1.testfoo'], m)
- except AttributeError as e:
- self.assertEqual(str(e), "type object 'MyTestCase' has no attribute 'testfoo'")
- else:
- self.fail("Failed to raise AttributeError")
+ suite = loader.loadTestsFromNames(['testcase_1.testfoo'], m)
+ error, test = self.check_deferred_error(loader, list(suite)[0])
+ expected = "type object 'MyTestCase' has no attribute 'testfoo'"
+ self.assertIn(
+ expected, error,
+ 'missing error string in %r' % error)
+ self.assertRaisesRegex(AttributeError, expected, test.testfoo)
# "The specifier name is a ``dotted name'' that may resolve ... to
# ... a callable object which returns a ... TestSuite instance"
diff --git a/Lib/unittest/test/test_program.py b/Lib/unittest/test/test_program.py
index 725d67fdaf..1cfc17959e 100644
--- a/Lib/unittest/test/test_program.py
+++ b/Lib/unittest/test/test_program.py
@@ -134,6 +134,7 @@ class InitialisableProgram(unittest.TestProgram):
result = None
verbosity = 1
defaultTest = None
+ tb_locals = False
testRunner = None
testLoader = unittest.defaultTestLoader
module = '__main__'
@@ -147,18 +148,19 @@ RESULT = object()
class FakeRunner(object):
initArgs = None
test = None
- raiseError = False
+ raiseError = 0
def __init__(self, **kwargs):
FakeRunner.initArgs = kwargs
if FakeRunner.raiseError:
- FakeRunner.raiseError = False
+ FakeRunner.raiseError -= 1
raise TypeError
def run(self, test):
FakeRunner.test = test
return RESULT
+
class TestCommandLineArgs(unittest.TestCase):
def setUp(self):
@@ -166,7 +168,7 @@ class TestCommandLineArgs(unittest.TestCase):
self.program.createTests = lambda: None
FakeRunner.initArgs = None
FakeRunner.test = None
- FakeRunner.raiseError = False
+ FakeRunner.raiseError = 0
def testVerbosity(self):
program = self.program
@@ -256,6 +258,7 @@ class TestCommandLineArgs(unittest.TestCase):
self.assertEqual(FakeRunner.initArgs, {'verbosity': 'verbosity',
'failfast': 'failfast',
'buffer': 'buffer',
+ 'tb_locals': False,
'warnings': 'warnings'})
self.assertEqual(FakeRunner.test, 'test')
self.assertIs(program.result, RESULT)
@@ -274,10 +277,25 @@ class TestCommandLineArgs(unittest.TestCase):
self.assertEqual(FakeRunner.test, 'test')
self.assertIs(program.result, RESULT)
+ def test_locals(self):
+ program = self.program
+
+ program.testRunner = FakeRunner
+ program.parseArgs([None, '--locals'])
+ self.assertEqual(True, program.tb_locals)
+ program.runTests()
+ self.assertEqual(FakeRunner.initArgs, {'buffer': False,
+ 'failfast': False,
+ 'tb_locals': True,
+ 'verbosity': 1,
+ 'warnings': None})
+
def testRunTestsOldRunnerClass(self):
program = self.program
- FakeRunner.raiseError = True
+ # Two TypeErrors are needed to fall all the way back to old-style
+ # runners - one to fail tb_locals, one to fail buffer etc.
+ FakeRunner.raiseError = 2
program.testRunner = FakeRunner
program.verbosity = 'verbosity'
program.failfast = 'failfast'
diff --git a/Lib/unittest/test/test_result.py b/Lib/unittest/test/test_result.py
index 489fe17754..e39e2eaeca 100644
--- a/Lib/unittest/test/test_result.py
+++ b/Lib/unittest/test/test_result.py
@@ -8,6 +8,20 @@ import traceback
import unittest
+class MockTraceback(object):
+ class TracebackException:
+ def __init__(self, *args, **kwargs):
+ self.capture_locals = kwargs.get('capture_locals', False)
+ def format(self):
+ result = ['A traceback']
+ if self.capture_locals:
+ result.append('locals')
+ return result
+
+def restore_traceback():
+ unittest.result.traceback = traceback
+
+
class Test_TestResult(unittest.TestCase):
# Note: there are not separate tests for TestResult.wasSuccessful(),
# TestResult.errors, TestResult.failures, TestResult.testsRun or
@@ -227,6 +241,25 @@ class Test_TestResult(unittest.TestCase):
self.assertIs(test_case, test)
self.assertIsInstance(formatted_exc, str)
+ def test_addError_locals(self):
+ class Foo(unittest.TestCase):
+ def test_1(self):
+ 1/0
+
+ test = Foo('test_1')
+ result = unittest.TestResult()
+ result.tb_locals = True
+
+ unittest.result.traceback = MockTraceback
+ self.addCleanup(restore_traceback)
+ result.startTestRun()
+ test.run(result)
+ result.stopTestRun()
+
+ self.assertEqual(len(result.errors), 1)
+ test_case, formatted_exc = result.errors[0]
+ self.assertEqual('A tracebacklocals', formatted_exc)
+
def test_addSubTest(self):
class Foo(unittest.TestCase):
def test_1(self):
@@ -398,6 +431,7 @@ def __init__(self, stream=None, descriptions=None, verbosity=None):
self.testsRun = 0
self.shouldStop = False
self.buffer = False
+ self.tb_locals = False
classDict['__init__'] = __init__
OldResult = type('OldResult', (object,), classDict)
@@ -454,15 +488,6 @@ class Test_OldTestResult(unittest.TestCase):
runner.run(Test('testFoo'))
-class MockTraceback(object):
- @staticmethod
- def format_exception(*_):
- return ['A traceback']
-
-def restore_traceback():
- unittest.result.traceback = traceback
-
-
class TestOutputBuffering(unittest.TestCase):
def setUp(self):
diff --git a/Lib/unittest/test/test_runner.py b/Lib/unittest/test/test_runner.py
index 7c0bd51d79..ddc498c230 100644
--- a/Lib/unittest/test/test_runner.py
+++ b/Lib/unittest/test/test_runner.py
@@ -158,7 +158,7 @@ class Test_TextTestRunner(unittest.TestCase):
self.assertEqual(runner.warnings, None)
self.assertTrue(runner.descriptions)
self.assertEqual(runner.resultclass, unittest.TextTestResult)
-
+ self.assertFalse(runner.tb_locals)
def test_multiple_inheritance(self):
class AResult(unittest.TestResult):
@@ -172,14 +172,13 @@ class Test_TextTestRunner(unittest.TestCase):
# on arguments in its __init__ super call
ATextResult(None, None, 1)
-
def testBufferAndFailfast(self):
class Test(unittest.TestCase):
def testFoo(self):
pass
result = unittest.TestResult()
runner = unittest.TextTestRunner(stream=io.StringIO(), failfast=True,
- buffer=True)
+ buffer=True)
# Use our result object
runner._makeResult = lambda: result
runner.run(Test('testFoo'))
@@ -187,6 +186,11 @@ class Test_TextTestRunner(unittest.TestCase):
self.assertTrue(result.failfast)
self.assertTrue(result.buffer)
+ def test_locals(self):
+ runner = unittest.TextTestRunner(stream=io.StringIO(), tb_locals=True)
+ result = runner.run(unittest.TestSuite())
+ self.assertEqual(True, result.tb_locals)
+
def testRunnerRegistersResult(self):
class Test(unittest.TestCase):
def testFoo(self):
@@ -286,7 +290,8 @@ class Test_TextTestRunner(unittest.TestCase):
# no args -> all the warnings are printed, unittest warnings only once
p = subprocess.Popen([sys.executable, '_test_warnings.py'], **opts)
- out, err = get_parse_out_err(p)
+ with p:
+ out, err = get_parse_out_err(p)
self.assertIn(b'OK', err)
# check that the total number of warnings in the output is correct
self.assertEqual(len(out), 12)
@@ -307,7 +312,8 @@ class Test_TextTestRunner(unittest.TestCase):
# in all these cases no warnings are printed
for args in args_list:
p = subprocess.Popen(args, **opts)
- out, err = get_parse_out_err(p)
+ with p:
+ out, err = get_parse_out_err(p)
self.assertIn(b'OK', err)
self.assertEqual(len(out), 0)
@@ -316,7 +322,8 @@ class Test_TextTestRunner(unittest.TestCase):
# unittest warnings only once
p = subprocess.Popen([sys.executable, '_test_warnings.py', 'always'],
**opts)
- out, err = get_parse_out_err(p)
+ with p:
+ out, err = get_parse_out_err(p)
self.assertIn(b'OK', err)
self.assertEqual(len(out), 14)
for msg in [b'dw', b'iw', b'uw', b'rw']:
diff --git a/Lib/unittest/test/test_setups.py b/Lib/unittest/test/test_setups.py
index 392f95efc0..2df703ed93 100644
--- a/Lib/unittest/test/test_setups.py
+++ b/Lib/unittest/test/test_setups.py
@@ -111,7 +111,7 @@ class TestSetups(unittest.TestCase):
self.assertEqual(len(result.errors), 1)
error, _ = result.errors[0]
self.assertEqual(str(error),
- 'setUpClass (%s.BrokenTest)' % __name__)
+ 'setUpClass (%s.%s)' % (__name__, BrokenTest.__qualname__))
def test_error_in_teardown_class(self):
class Test(unittest.TestCase):
@@ -144,7 +144,7 @@ class TestSetups(unittest.TestCase):
error, _ = result.errors[0]
self.assertEqual(str(error),
- 'tearDownClass (%s.Test)' % __name__)
+ 'tearDownClass (%s.%s)' % (__name__, Test.__qualname__))
def test_class_not_torndown_when_setup_fails(self):
class Test(unittest.TestCase):
@@ -414,7 +414,8 @@ class TestSetups(unittest.TestCase):
self.assertEqual(len(result.errors), 0)
self.assertEqual(len(result.skipped), 1)
skipped = result.skipped[0][0]
- self.assertEqual(str(skipped), 'setUpClass (%s.Test)' % __name__)
+ self.assertEqual(str(skipped),
+ 'setUpClass (%s.%s)' % (__name__, Test.__qualname__))
def test_skiptest_in_setupmodule(self):
class Test(unittest.TestCase):
diff --git a/Lib/unittest/test/testmock/testmagicmethods.py b/Lib/unittest/test/testmock/testmagicmethods.py
index e05c6e014d..bb9b956bb2 100644
--- a/Lib/unittest/test/testmock/testmagicmethods.py
+++ b/Lib/unittest/test/testmock/testmagicmethods.py
@@ -424,6 +424,17 @@ class TestMockingMagicMethods(unittest.TestCase):
self.assertEqual(list(m), [])
+ def test_matmul(self):
+ m = MagicMock()
+ self.assertIsInstance(m @ 1, MagicMock)
+ m.__matmul__.return_value = 42
+ m.__rmatmul__.return_value = 666
+ m.__imatmul__.return_value = 24
+ self.assertEqual(m @ 1, 42)
+ self.assertEqual(1 @ m, 666)
+ m @= 24
+ self.assertEqual(m, 24)
+
def test_divmod_and_rdivmod(self):
m = MagicMock()
self.assertIsInstance(divmod(5, m), MagicMock)
diff --git a/Lib/unittest/test/testmock/testmock.py b/Lib/unittest/test/testmock/testmock.py
index cf1673c6ca..5f82b82966 100644
--- a/Lib/unittest/test/testmock/testmock.py
+++ b/Lib/unittest/test/testmock/testmock.py
@@ -174,6 +174,15 @@ class MockTest(unittest.TestCase):
self.assertEqual([mock(), mock(), mock()], [3, 2, 1],
"callable side effect not used correctly")
+ def test_autospec_side_effect_exception(self):
+ # Test for issue 23661
+ def f():
+ pass
+
+ mock = create_autospec(f)
+ mock.side_effect = ValueError('Bazinga!')
+ self.assertRaisesRegex(ValueError, 'Bazinga!', mock)
+
@unittest.skipUnless('java' in sys.platform,
'This test only applies to Jython')
def test_java_exception_side_effect(self):
@@ -295,6 +304,17 @@ class MockTest(unittest.TestCase):
# an exception. See issue 24857.
self.assertFalse(mock.call_args == "a long sequence")
+
+ def test_calls_equal_with_any(self):
+ call1 = mock.call(mock.MagicMock())
+ call2 = mock.call(mock.ANY)
+
+ # Check that equality and non-equality is consistent even when
+ # comparing with mock.ANY
+ self.assertTrue(call1 == call2)
+ self.assertFalse(call1 != call2)
+
+
def test_assert_called_with(self):
mock = Mock()
mock()
@@ -310,6 +330,12 @@ class MockTest(unittest.TestCase):
mock.assert_called_with(1, 2, 3, a='fish', b='nothing')
+ def test_assert_called_with_any(self):
+ m = MagicMock()
+ m(MagicMock())
+ m.assert_called_with(mock.ANY)
+
+
def test_assert_called_with_function_spec(self):
def f(a, b, c, d=None):
pass
@@ -1194,6 +1220,42 @@ class MockTest(unittest.TestCase):
m = mock.create_autospec(object(), name='sweet_func')
self.assertIn('sweet_func', repr(m))
+ #Issue21238
+ def test_mock_unsafe(self):
+ m = Mock()
+ with self.assertRaises(AttributeError):
+ m.assert_foo_call()
+ with self.assertRaises(AttributeError):
+ m.assret_foo_call()
+ m = Mock(unsafe=True)
+ m.assert_foo_call()
+ m.assret_foo_call()
+
+ #Issue21262
+ def test_assert_not_called(self):
+ m = Mock()
+ m.hello.assert_not_called()
+ m.hello()
+ with self.assertRaises(AssertionError):
+ m.hello.assert_not_called()
+
+ #Issue21256 printout of keyword args should be in deterministic order
+ def test_sorted_call_signature(self):
+ m = Mock()
+ m.hello(name='hello', daddy='hero')
+ text = "call(daddy='hero', name='hello')"
+ self.assertEqual(repr(m.hello.call_args), text)
+
+ #Issue21270 overrides tuple methods for mock.call objects
+ def test_override_tuple_methods(self):
+ c = call.count()
+ i = call.index(132,'hello')
+ m = Mock()
+ m.count()
+ m.index(132,"hello")
+ self.assertEqual(m.method_calls[0], c)
+ self.assertEqual(m.method_calls[1], i)
+
def test_mock_add_spec(self):
class _One(object):
one = 1
@@ -1357,6 +1419,18 @@ class MockTest(unittest.TestCase):
self.assertEqual('abc', first)
self.assertEqual('abc', second)
+ def test_mock_open_after_eof(self):
+ # read, readline and readlines should work after end of file.
+ _open = mock.mock_open(read_data='foo')
+ h = _open('bar')
+ h.read()
+ self.assertEqual('', h.read())
+ self.assertEqual('', h.read())
+ self.assertEqual('', h.readline())
+ self.assertEqual('', h.readline())
+ self.assertEqual([], h.readlines())
+ self.assertEqual([], h.readlines())
+
def test_mock_parents(self):
for Klass in Mock, MagicMock:
m = Klass()
diff --git a/Lib/unittest/test/testmock/testpatch.py b/Lib/unittest/test/testmock/testpatch.py
index b516f42af0..dfce3696d6 100644
--- a/Lib/unittest/test/testmock/testpatch.py
+++ b/Lib/unittest/test/testmock/testpatch.py
@@ -377,7 +377,7 @@ class PatchTest(unittest.TestCase):
def test_patchobject_wont_create_by_default(self):
try:
- @patch.object(SomeClass, 'frooble', sentinel.Frooble)
+ @patch.object(SomeClass, 'ord', sentinel.Frooble)
def test():
self.fail('Patching non existent attributes should fail')
@@ -386,7 +386,27 @@ class PatchTest(unittest.TestCase):
pass
else:
self.fail('Patching non existent attributes should fail')
- self.assertFalse(hasattr(SomeClass, 'frooble'))
+ self.assertFalse(hasattr(SomeClass, 'ord'))
+
+
+ def test_patch_builtins_without_create(self):
+ @patch(__name__+'.ord')
+ def test_ord(mock_ord):
+ mock_ord.return_value = 101
+ return ord('c')
+
+ @patch(__name__+'.open')
+ def test_open(mock_open):
+ m = mock_open.return_value
+ m.read.return_value = 'abcd'
+
+ fobj = open('doesnotexists.txt')
+ data = fobj.read()
+ fobj.close()
+ return data
+
+ self.assertEqual(test_ord(), 101)
+ self.assertEqual(test_open(), 'abcd')
def test_patch_with_static_methods(self):
@@ -1797,5 +1817,31 @@ class PatchTest(unittest.TestCase):
self.assertEqual(stopped, ["three", "two", "one"])
+ def test_special_attrs(self):
+ def foo(x=0):
+ """TEST"""
+ return x
+ with patch.object(foo, '__defaults__', (1, )):
+ self.assertEqual(foo(), 1)
+ self.assertEqual(foo(), 0)
+
+ with patch.object(foo, '__doc__', "FUN"):
+ self.assertEqual(foo.__doc__, "FUN")
+ self.assertEqual(foo.__doc__, "TEST")
+
+ with patch.object(foo, '__module__', "testpatch2"):
+ self.assertEqual(foo.__module__, "testpatch2")
+ self.assertEqual(foo.__module__, 'unittest.test.testmock.testpatch')
+
+ with patch.object(foo, '__annotations__', dict([('s', 1, )])):
+ self.assertEqual(foo.__annotations__, dict([('s', 1, )]))
+ self.assertEqual(foo.__annotations__, dict())
+
+ def foo(*a, x=0):
+ return x
+ with patch.object(foo, '__kwdefaults__', dict([('x', 1, )])):
+ self.assertEqual(foo(), 1)
+ self.assertEqual(foo(), 0)
+
if __name__ == '__main__':
unittest.main()
diff --git a/Lib/unittest/util.py b/Lib/unittest/util.py
index aee498fd0b..45485dcb0d 100644
--- a/Lib/unittest/util.py
+++ b/Lib/unittest/util.py
@@ -52,7 +52,7 @@ def safe_repr(obj, short=False):
return result[:_MAX_LENGTH] + ' [truncated]...'
def strclass(cls):
- return "%s.%s" % (cls.__module__, cls.__name__)
+ return "%s.%s" % (cls.__module__, cls.__qualname__)
def sorted_list_difference(expected, actual):
"""Finds elements in only one or the other of two, sorted input lists.
diff --git a/Lib/urllib/error.py b/Lib/urllib/error.py
index 45b7169793..c5b675d161 100644
--- a/Lib/urllib/error.py
+++ b/Lib/urllib/error.py
@@ -35,6 +35,7 @@ class URLError(OSError):
def __str__(self):
return '<urlopen error %s>' % self.reason
+
class HTTPError(URLError, urllib.response.addinfourl):
"""Raised when HTTP error occurs, but also acts like non-error return"""
__super_init = urllib.response.addinfourl.__init__
@@ -55,6 +56,9 @@ class HTTPError(URLError, urllib.response.addinfourl):
def __str__(self):
return 'HTTP Error %s: %s' % (self.code, self.msg)
+ def __repr__(self):
+ return '<HTTPError %s: %r>' % (self.code, self.msg)
+
# since URLError specifies a .reason attribute, HTTPError should also
# provide this attribute. See issue13211 for discussion.
@property
@@ -69,8 +73,9 @@ class HTTPError(URLError, urllib.response.addinfourl):
def headers(self, headers):
self.hdrs = headers
-# exception raised when downloaded size does not match content-length
+
class ContentTooShortError(URLError):
+ """Exception raised when downloaded size does not match content-length."""
def __init__(self, message, content):
URLError.__init__(self, message)
self.content = content
diff --git a/Lib/urllib/parse.py b/Lib/urllib/parse.py
index d36833111f..4d7fcec94b 100644
--- a/Lib/urllib/parse.py
+++ b/Lib/urllib/parse.py
@@ -34,7 +34,9 @@ import collections
__all__ = ["urlparse", "urlunparse", "urljoin", "urldefrag",
"urlsplit", "urlunsplit", "urlencode", "parse_qs",
"parse_qsl", "quote", "quote_plus", "quote_from_bytes",
- "unquote", "unquote_plus", "unquote_to_bytes"]
+ "unquote", "unquote_plus", "unquote_to_bytes",
+ "DefragResult", "ParseResult", "SplitResult",
+ "DefragResultBytes", "ParseResultBytes", "SplitResultBytes"]
# A classification of schemes ('' means apply by default)
uses_relative = ['ftp', 'http', 'gopher', 'nntp', 'imap',
@@ -409,11 +411,13 @@ def urljoin(base, url, allow_fragments=True):
return url
if not url:
return base
+
base, url, _coerce_result = _coerce_args(base, url)
bscheme, bnetloc, bpath, bparams, bquery, bfragment = \
urlparse(base, '', allow_fragments)
scheme, netloc, path, params, query, fragment = \
urlparse(url, bscheme, allow_fragments)
+
if scheme != bscheme or scheme not in uses_relative:
return _coerce_result(url)
if scheme in uses_netloc:
@@ -421,9 +425,7 @@ def urljoin(base, url, allow_fragments=True):
return _coerce_result(urlunparse((scheme, netloc, path,
params, query, fragment)))
netloc = bnetloc
- if path[:1] == '/':
- return _coerce_result(urlunparse((scheme, netloc, path,
- params, query, fragment)))
+
if not path and not params:
path = bpath
params = bparams
@@ -431,29 +433,45 @@ def urljoin(base, url, allow_fragments=True):
query = bquery
return _coerce_result(urlunparse((scheme, netloc, path,
params, query, fragment)))
- segments = bpath.split('/')[:-1] + path.split('/')
- # XXX The stuff below is bogus in various ways...
- if segments[-1] == '.':
- segments[-1] = ''
- while '.' in segments:
- segments.remove('.')
- while 1:
- i = 1
- n = len(segments) - 1
- while i < n:
- if (segments[i] == '..'
- and segments[i-1] not in ('', '..')):
- del segments[i-1:i+1]
- break
- i = i+1
+
+ base_parts = bpath.split('/')
+ if base_parts[-1] != '':
+ # the last item is not a directory, so will not be taken into account
+ # in resolving the relative path
+ del base_parts[-1]
+
+ # for rfc3986, ignore all base path should the first character be root.
+ if path[:1] == '/':
+ segments = path.split('/')
+ else:
+ segments = base_parts + path.split('/')
+ # filter out elements that would cause redundant slashes on re-joining
+ # the resolved_path
+ segments[1:-1] = filter(None, segments[1:-1])
+
+ resolved_path = []
+
+ for seg in segments:
+ if seg == '..':
+ try:
+ resolved_path.pop()
+ except IndexError:
+ # ignore any .. segments that would otherwise cause an IndexError
+ # when popped from resolved_path if resolving for rfc3986
+ pass
+ elif seg == '.':
+ continue
else:
- break
- if segments == ['', '..']:
- segments[-1] = ''
- elif len(segments) >= 2 and segments[-1] == '..':
- segments[-2:] = ['']
- return _coerce_result(urlunparse((scheme, netloc, '/'.join(segments),
- params, query, fragment)))
+ resolved_path.append(seg)
+
+ if segments[-1] in ('.', '..'):
+ # do some post-processing here. if the last segment was a relative dir,
+ # then we need to append the trailing '/'
+ resolved_path.append('')
+
+ return _coerce_result(urlunparse((scheme, netloc, '/'.join(
+ resolved_path) or '/', params, query, fragment)))
+
def urldefrag(url):
"""Removes any existing fragment from URL.
@@ -641,7 +659,7 @@ class Quoter(collections.defaultdict):
def __repr__(self):
# Without this, will just display as a defaultdict
- return "<Quoter %r>" % dict(self)
+ return "<%s %r>" % (self.__class__.__name__, dict(self))
def __missing__(self, b):
# Handle a cache miss. Store quoted string in cache and return.
@@ -732,7 +750,8 @@ def quote_from_bytes(bs, safe='/'):
_safe_quoters[safe] = quoter = Quoter(safe).__getitem__
return ''.join([quoter(char) for char in bs])
-def urlencode(query, doseq=False, safe='', encoding=None, errors=None):
+def urlencode(query, doseq=False, safe='', encoding=None, errors=None,
+ quote_via=quote_plus):
"""Encode a dict or sequence of two-element tuples into a URL query string.
If any values in the query arg are sequences and doseq is true, each
@@ -744,8 +763,8 @@ def urlencode(query, doseq=False, safe='', encoding=None, errors=None):
The components of a query arg may each be either a string or a bytes type.
- The safe, encoding, and errors parameters are passed down to quote_plus()
- (encoding and errors only if a component is a str).
+ The safe, encoding, and errors parameters are passed down to the function
+ specified by quote_via (encoding and errors only if a component is a str).
"""
if hasattr(query, "items"):
@@ -771,27 +790,27 @@ def urlencode(query, doseq=False, safe='', encoding=None, errors=None):
if not doseq:
for k, v in query:
if isinstance(k, bytes):
- k = quote_plus(k, safe)
+ k = quote_via(k, safe)
else:
- k = quote_plus(str(k), safe, encoding, errors)
+ k = quote_via(str(k), safe, encoding, errors)
if isinstance(v, bytes):
- v = quote_plus(v, safe)
+ v = quote_via(v, safe)
else:
- v = quote_plus(str(v), safe, encoding, errors)
+ v = quote_via(str(v), safe, encoding, errors)
l.append(k + '=' + v)
else:
for k, v in query:
if isinstance(k, bytes):
- k = quote_plus(k, safe)
+ k = quote_via(k, safe)
else:
- k = quote_plus(str(k), safe, encoding, errors)
+ k = quote_via(str(k), safe, encoding, errors)
if isinstance(v, bytes):
- v = quote_plus(v, safe)
+ v = quote_via(v, safe)
l.append(k + '=' + v)
elif isinstance(v, str):
- v = quote_plus(v, safe, encoding, errors)
+ v = quote_via(v, safe, encoding, errors)
l.append(k + '=' + v)
else:
try:
@@ -799,33 +818,18 @@ def urlencode(query, doseq=False, safe='', encoding=None, errors=None):
x = len(v)
except TypeError:
# not a sequence
- v = quote_plus(str(v), safe, encoding, errors)
+ v = quote_via(str(v), safe, encoding, errors)
l.append(k + '=' + v)
else:
# loop over the sequence
for elt in v:
if isinstance(elt, bytes):
- elt = quote_plus(elt, safe)
+ elt = quote_via(elt, safe)
else:
- elt = quote_plus(str(elt), safe, encoding, errors)
+ elt = quote_via(str(elt), safe, encoding, errors)
l.append(k + '=' + elt)
return '&'.join(l)
-# Utilities to parse URLs (most of these return None for missing parts):
-# unwrap('<URL:type://host/path>') --> 'type://host/path'
-# splittype('type:opaquestring') --> 'type', 'opaquestring'
-# splithost('//host[:port]/path') --> 'host[:port]', '/path'
-# splituser('user[:passwd]@host[:port]') --> 'user[:passwd]', 'host[:port]'
-# splitpasswd('user:passwd') -> 'user', 'passwd'
-# splitport('host:port') --> 'host', 'port'
-# splitquery('/path?query') --> '/path', 'query'
-# splittag('/path#tag') --> '/path', 'tag'
-# splitattr('/path;attr1=value1;attr2=value2;...') ->
-# '/path', ['attr1=value1', 'attr2=value2', ...]
-# splitvalue('attr=value') --> 'attr', 'value'
-# urllib.parse.unquote('abc%20def') -> 'abc def'
-# quote('abc def') -> 'abc%20def')
-
def to_bytes(url):
"""to_bytes(u"URL") --> 'URL'."""
# Most URL schemes require ASCII. If that changes, the conversion
@@ -852,12 +856,12 @@ def splittype(url):
"""splittype('type:opaquestring') --> 'type', 'opaquestring'."""
global _typeprog
if _typeprog is None:
- _typeprog = re.compile('^([^/:]+):')
+ _typeprog = re.compile('([^/:]+):(.*)', re.DOTALL)
match = _typeprog.match(url)
if match:
- scheme = match.group(1)
- return scheme.lower(), url[len(scheme) + 1:]
+ scheme, data = match.groups()
+ return scheme.lower(), data
return None, url
_hostprog = None
@@ -865,38 +869,25 @@ def splithost(url):
"""splithost('//host[:port]/path') --> 'host[:port]', '/path'."""
global _hostprog
if _hostprog is None:
- _hostprog = re.compile('^//([^/?]*)(.*)$')
+ _hostprog = re.compile('//([^/?]*)(.*)', re.DOTALL)
match = _hostprog.match(url)
if match:
- host_port = match.group(1)
- path = match.group(2)
- if path and not path.startswith('/'):
+ host_port, path = match.groups()
+ if path and path[0] != '/':
path = '/' + path
return host_port, path
return None, url
-_userprog = None
def splituser(host):
"""splituser('user[:passwd]@host[:port]') --> 'user[:passwd]', 'host[:port]'."""
- global _userprog
- if _userprog is None:
- _userprog = re.compile('^(.*)@(.*)$')
-
- match = _userprog.match(host)
- if match: return match.group(1, 2)
- return None, host
+ user, delim, host = host.rpartition('@')
+ return (user if delim else None), host
-_passwdprog = None
def splitpasswd(user):
"""splitpasswd('user:passwd') -> 'user', 'passwd'."""
- global _passwdprog
- if _passwdprog is None:
- _passwdprog = re.compile('^([^:]*):(.*)$',re.S)
-
- match = _passwdprog.match(user)
- if match: return match.group(1, 2)
- return user, None
+ user, delim, passwd = user.partition(':')
+ return user, (passwd if delim else None)
# splittag('/path#tag') --> '/path', 'tag'
_portprog = None
@@ -904,7 +895,7 @@ def splitport(host):
"""splitport('host:port') --> 'host', 'port'."""
global _portprog
if _portprog is None:
- _portprog = re.compile('^(.*):([0-9]*)$')
+ _portprog = re.compile('(.*):([0-9]*)$', re.DOTALL)
match = _portprog.match(host)
if match:
@@ -913,47 +904,34 @@ def splitport(host):
return host, port
return host, None
-_nportprog = None
def splitnport(host, defport=-1):
"""Split host and port, returning numeric port.
Return given default port if no ':' found; defaults to -1.
Return numerical port if a valid number are found after ':'.
Return None if ':' but not a valid number."""
- global _nportprog
- if _nportprog is None:
- _nportprog = re.compile('^(.*):(.*)$')
-
- match = _nportprog.match(host)
- if match:
- host, port = match.group(1, 2)
- if port:
- try:
- nport = int(port)
- except ValueError:
- nport = None
- return host, nport
+ host, delim, port = host.rpartition(':')
+ if not delim:
+ host = port
+ elif port:
+ try:
+ nport = int(port)
+ except ValueError:
+ nport = None
+ return host, nport
return host, defport
-_queryprog = None
def splitquery(url):
"""splitquery('/path?query') --> '/path', 'query'."""
- global _queryprog
- if _queryprog is None:
- _queryprog = re.compile('^(.*)\?([^?]*)$')
-
- match = _queryprog.match(url)
- if match: return match.group(1, 2)
+ path, delim, query = url.rpartition('?')
+ if delim:
+ return path, query
return url, None
-_tagprog = None
def splittag(url):
"""splittag('/path#tag') --> '/path', 'tag'."""
- global _tagprog
- if _tagprog is None:
- _tagprog = re.compile('^(.*)#([^#]*)$')
-
- match = _tagprog.match(url)
- if match: return match.group(1, 2)
+ path, delim, tag = url.rpartition('#')
+ if delim:
+ return path, tag
return url, None
def splitattr(url):
@@ -962,13 +940,7 @@ def splitattr(url):
words = url.split(';')
return words[0], words[1:]
-_valueprog = None
def splitvalue(attr):
"""splitvalue('attr=value') --> 'attr', 'value'."""
- global _valueprog
- if _valueprog is None:
- _valueprog = re.compile('^([^=]*)=(.*)$')
-
- match = _valueprog.match(attr)
- if match: return match.group(1, 2)
- return attr, None
+ attr, delim, value = attr.partition('=')
+ return attr, (value if delim else None)
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py
index 376bba4079..1731fe3df1 100644
--- a/Lib/urllib/request.py
+++ b/Lib/urllib/request.py
@@ -91,6 +91,7 @@ import os
import posixpath
import re
import socket
+import string
import sys
import time
import collections
@@ -120,9 +121,10 @@ __all__ = [
'Request', 'OpenerDirector', 'BaseHandler', 'HTTPDefaultErrorHandler',
'HTTPRedirectHandler', 'HTTPCookieProcessor', 'ProxyHandler',
'HTTPPasswordMgr', 'HTTPPasswordMgrWithDefaultRealm',
- 'AbstractBasicAuthHandler', 'HTTPBasicAuthHandler', 'ProxyBasicAuthHandler',
- 'AbstractDigestAuthHandler', 'HTTPDigestAuthHandler', 'ProxyDigestAuthHandler',
- 'HTTPHandler', 'FileHandler', 'FTPHandler', 'CacheFTPHandler', 'DataHandler',
+ 'HTTPPasswordMgrWithPriorAuth', 'AbstractBasicAuthHandler',
+ 'HTTPBasicAuthHandler', 'ProxyBasicAuthHandler', 'AbstractDigestAuthHandler',
+ 'HTTPDigestAuthHandler', 'ProxyDigestAuthHandler', 'HTTPHandler',
+ 'FileHandler', 'FTPHandler', 'CacheFTPHandler', 'DataHandler',
'UnknownHandler', 'HTTPErrorProcessor',
# Functions
'urlopen', 'install_opener', 'build_opener',
@@ -615,8 +617,12 @@ class HTTPRedirectHandler(BaseHandler):
# from the user (of urllib.request, in this case). In practice,
# essentially all clients do redirect in this case, so we do
# the same.
- # be conciliant with URIs containing a space
+
+ # Be conciliant with URIs containing a space. This is mainly
+ # redundant with the more complete encoding done in http_error_302(),
+ # but it is kept for compatibility with other callers.
newurl = newurl.replace(' ', '%20')
+
CONTENT_HEADERS = ("content-length", "content-type")
newheaders = dict((k, v) for k, v in req.headers.items()
if k.lower() not in CONTENT_HEADERS)
@@ -651,11 +657,16 @@ class HTTPRedirectHandler(BaseHandler):
"%s - Redirection to url '%s' is not allowed" % (msg, newurl),
headers, fp)
- if not urlparts.path:
+ if not urlparts.path and urlparts.netloc:
urlparts = list(urlparts)
urlparts[2] = "/"
newurl = urlunparse(urlparts)
+ # http.client.parse_headers() decodes as ISO-8859-1. Recover the
+ # original bytes and percent-encode non-ASCII bytes, and any special
+ # characters such as the space.
+ newurl = quote(
+ newurl, encoding="iso-8859-1", safe=string.punctuation)
newurl = urljoin(req.full_url, newurl)
# XXX Probably want to forget about the state of the current
@@ -836,6 +847,37 @@ class HTTPPasswordMgrWithDefaultRealm(HTTPPasswordMgr):
return HTTPPasswordMgr.find_user_password(self, None, authuri)
+class HTTPPasswordMgrWithPriorAuth(HTTPPasswordMgrWithDefaultRealm):
+
+ def __init__(self, *args, **kwargs):
+ self.authenticated = {}
+ super().__init__(*args, **kwargs)
+
+ def add_password(self, realm, uri, user, passwd, is_authenticated=False):
+ self.update_authenticated(uri, is_authenticated)
+ # Add a default for prior auth requests
+ if realm is not None:
+ super().add_password(None, uri, user, passwd)
+ super().add_password(realm, uri, user, passwd)
+
+ def update_authenticated(self, uri, is_authenticated=False):
+ # uri could be a single URI or a sequence
+ if isinstance(uri, str):
+ uri = [uri]
+
+ for default_port in True, False:
+ for u in uri:
+ reduced_uri = self.reduce_uri(u, default_port)
+ self.authenticated[reduced_uri] = is_authenticated
+
+ def is_authenticated(self, authuri):
+ for default_port in True, False:
+ reduced_authuri = self.reduce_uri(authuri, default_port)
+ for uri in self.authenticated:
+ if self.is_suburi(uri, reduced_authuri):
+ return self.authenticated[uri]
+
+
class AbstractBasicAuthHandler:
# XXX this allows for multiple auth-schemes, but will stupidly pick
@@ -890,6 +932,31 @@ class AbstractBasicAuthHandler:
else:
return None
+ def http_request(self, req):
+ if (not hasattr(self.passwd, 'is_authenticated') or
+ not self.passwd.is_authenticated(req.full_url)):
+ return req
+
+ if not req.has_header('Authorization'):
+ user, passwd = self.passwd.find_user_password(None, req.full_url)
+ credentials = '{0}:{1}'.format(user, passwd).encode()
+ auth_str = base64.standard_b64encode(credentials).decode()
+ req.add_unredirected_header('Authorization',
+ 'Basic {}'.format(auth_str.strip()))
+ return req
+
+ def http_response(self, req, response):
+ if hasattr(self.passwd, 'is_authenticated'):
+ if 200 <= response.code < 300:
+ self.passwd.update_authenticated(req.full_url, True)
+ else:
+ self.passwd.update_authenticated(req.full_url, False)
+ return response
+
+ https_request = http_request
+ https_response = http_response
+
+
class HTTPBasicAuthHandler(AbstractBasicAuthHandler, BaseHandler):
@@ -1054,6 +1121,9 @@ class AbstractDigestAuthHandler:
elif algorithm == 'SHA':
H = lambda x: hashlib.sha1(x.encode("ascii")).hexdigest()
# XXX MD5-sess
+ else:
+ raise ValueError("Unsupported digest authentication "
+ "algorithm %r" % algorithm)
KD = lambda s, d: H("%s:%s" % (s, d))
return H, KD
@@ -1151,6 +1221,7 @@ class AbstractHTTPHandler(BaseHandler):
# will parse host:port
h = http_class(host, timeout=req.timeout, **http_conn_args)
+ h.set_debuglevel(self._debuglevel)
headers = dict(req.unredirected_hdrs)
headers.update(dict((k, v) for k, v in req.headers.items()
@@ -1993,18 +2064,20 @@ class FancyURLopener(URLopener):
def http_error_302(self, url, fp, errcode, errmsg, headers, data=None):
"""Error 302 -- relocated (temporarily)."""
self.tries += 1
- if self.maxtries and self.tries >= self.maxtries:
- if hasattr(self, "http_error_500"):
- meth = self.http_error_500
- else:
- meth = self.http_error_default
+ try:
+ if self.maxtries and self.tries >= self.maxtries:
+ if hasattr(self, "http_error_500"):
+ meth = self.http_error_500
+ else:
+ meth = self.http_error_default
+ return meth(url, fp, 500,
+ "Internal Server Error: Redirect Recursion",
+ headers)
+ result = self.redirect_internal(url, fp, errcode, errmsg,
+ headers, data)
+ return result
+ finally:
self.tries = 0
- return meth(url, fp, 500,
- "Internal Server Error: Redirect Recursion", headers)
- result = self.redirect_internal(url, fp, errcode, errmsg, headers,
- data)
- self.tries = 0
- return result
def redirect_internal(self, url, fp, errcode, errmsg, headers, data):
if 'location' in headers:
@@ -2333,19 +2406,35 @@ def getproxies_environment():
"""
proxies = {}
+ # in order to prefer lowercase variables, process environment in
+ # two passes: first matches any, second pass matches lowercase only
for name, value in os.environ.items():
name = name.lower()
if value and name[-6:] == '_proxy':
proxies[name[:-6]] = value
+ for name, value in os.environ.items():
+ if name[-6:] == '_proxy':
+ name = name.lower()
+ if value:
+ proxies[name[:-6]] = value
+ else:
+ proxies.pop(name[:-6], None)
return proxies
-def proxy_bypass_environment(host):
+def proxy_bypass_environment(host, proxies=None):
"""Test if proxies should not be used for a particular host.
- Checks the environment for a variable named no_proxy, which should
- be a list of DNS suffixes separated by commas, or '*' for all hosts.
+ Checks the proxy dict for the value of no_proxy, which should
+ be a list of comma separated DNS suffixes, or '*' for all hosts.
+
"""
- no_proxy = os.environ.get('no_proxy', '') or os.environ.get('NO_PROXY', '')
+ if proxies is None:
+ proxies = getproxies_environment()
+ # don't bypass, if no_proxy isn't specified
+ try:
+ no_proxy = proxies['no']
+ except KeyError:
+ return 0
# '*' is special case for always bypass
if no_proxy == '*':
return 1
@@ -2354,8 +2443,12 @@ def proxy_bypass_environment(host):
# check if the host ends with any of the DNS suffixes
no_proxy_list = [proxy.strip() for proxy in no_proxy.split(',')]
for name in no_proxy_list:
- if name and (hostonly.endswith(name) or host.endswith(name)):
- return 1
+ if name:
+ name = re.escape(name)
+ pattern = r'(.+\.)?%s$' % name
+ if (re.match(pattern, hostonly, re.I)
+ or re.match(pattern, host, re.I)):
+ return 1
# otherwise, don't bypass
return 0
@@ -2440,8 +2533,15 @@ if sys.platform == 'darwin':
def proxy_bypass(host):
- if getproxies_environment():
- return proxy_bypass_environment(host)
+ """Return True, if host should be bypassed.
+
+ Checks proxy settings gathered from the environment, if specified,
+ or from the MacOSX framework SystemConfiguration.
+
+ """
+ proxies = getproxies_environment()
+ if proxies:
+ return proxy_bypass_environment(host, proxies)
else:
return proxy_bypass_macosx_sysconf(host)
@@ -2555,14 +2655,15 @@ elif os.name == 'nt':
return 0
def proxy_bypass(host):
- """Return a dictionary of scheme -> proxy server URL mappings.
+ """Return True, if host should be bypassed.
- Returns settings gathered from the environment, if specified,
+ Checks proxy settings gathered from the environment, if specified,
or the registry.
"""
- if getproxies_environment():
- return proxy_bypass_environment(host)
+ proxies = getproxies_environment()
+ if proxies:
+ return proxy_bypass_environment(host, proxies)
else:
return proxy_bypass_registry(host)
diff --git a/Lib/urllib/robotparser.py b/Lib/urllib/robotparser.py
index 1d7b751e03..8b69fd985e 100644
--- a/Lib/urllib/robotparser.py
+++ b/Lib/urllib/robotparser.py
@@ -132,7 +132,7 @@ class RobotFileParser:
return True
# Until the robots.txt file has been read or found not
# to exist, we must assume that no url is allowable.
- # This prevents false positives when a user erronenously
+ # This prevents false positives when a user erroneously
# calls can_fetch() before calling read().
if not self.last_checked:
return False
@@ -172,7 +172,7 @@ class RuleLine:
return self.path == "*" or filename.startswith(self.path)
def __str__(self):
- return (self.allowance and "Allow" or "Disallow") + ": " + self.path
+ return ("Allow" if self.allowance else "Disallow") + ": " + self.path
class Entry:
diff --git a/Lib/uuid.py b/Lib/uuid.py
index 1061bffc43..e96e7e034c 100644
--- a/Lib/uuid.py
+++ b/Lib/uuid.py
@@ -44,6 +44,8 @@ Typical usage:
UUID('00010203-0405-0607-0809-0a0b0c0d0e0f')
"""
+import os
+
__author__ = 'Ka-Ping Yee <ping@zesty.ca>'
RESERVED_NCS, RFC_4122, RESERVED_MICROSOFT, RESERVED_FUTURE = [
@@ -129,7 +131,8 @@ class UUID(object):
"""
if [hex, bytes, bytes_le, fields, int].count(None) != 4:
- raise TypeError('need one of hex, bytes, bytes_le, fields, or int')
+ raise TypeError('one of the hex, bytes, bytes_le, fields, '
+ 'or int arguments must be given')
if hex is not None:
hex = hex.replace('urn:', '').replace('uuid:', '')
hex = hex.strip('{}').replace('-', '')
@@ -139,10 +142,8 @@ class UUID(object):
if bytes_le is not None:
if len(bytes_le) != 16:
raise ValueError('bytes_le is not a 16-char string')
- bytes = (bytes_(reversed(bytes_le[0:4])) +
- bytes_(reversed(bytes_le[4:6])) +
- bytes_(reversed(bytes_le[6:8])) +
- bytes_le[8:])
+ bytes = (bytes_le[4-1::-1] + bytes_le[6-1:4-1:-1] +
+ bytes_le[8-1:6-1:-1] + bytes_le[8:])
if bytes is not None:
if len(bytes) != 16:
raise ValueError('bytes is not a 16-char string')
@@ -187,11 +188,6 @@ class UUID(object):
return self.int == other.int
return NotImplemented
- def __ne__(self, other):
- if isinstance(other, UUID):
- return self.int != other.int
- return NotImplemented
-
# Q. What's the value of being able to sort UUIDs?
# A. Use them as keys in a B-Tree or similar mapping.
@@ -222,7 +218,7 @@ class UUID(object):
return self.int
def __repr__(self):
- return 'UUID(%r)' % str(self)
+ return '%s(%r)' % (self.__class__.__name__, str(self))
def __setattr__(self, name, value):
raise TypeError('UUID objects are immutable')
@@ -234,17 +230,12 @@ class UUID(object):
@property
def bytes(self):
- bytes = bytearray()
- for shift in range(0, 128, 8):
- bytes.insert(0, (self.int >> shift) & 0xff)
- return bytes_(bytes)
+ return self.int.to_bytes(16, 'big')
@property
def bytes_le(self):
bytes = self.bytes
- return (bytes_(reversed(bytes[0:4])) +
- bytes_(reversed(bytes[4:6])) +
- bytes_(reversed(bytes[6:8])) +
+ return (bytes[4-1::-1] + bytes[6-1:4-1:-1] + bytes[8-1:6-1:-1] +
bytes[8:])
@property
@@ -311,33 +302,38 @@ class UUID(object):
if self.variant == RFC_4122:
return int((self.int >> 76) & 0xf)
-def _popen(command, args):
- import os, shutil
+def _popen(command, *args):
+ import os, shutil, subprocess
executable = shutil.which(command)
if executable is None:
path = os.pathsep.join(('/sbin', '/usr/sbin'))
executable = shutil.which(command, path=path)
if executable is None:
return None
- # LC_ALL to ensure English output, 2>/dev/null to prevent output on
- # stderr (Note: we don't have an example where the words we search for
- # are actually localized, but in theory some system could do so.)
- cmd = 'LC_ALL=C %s %s 2>/dev/null' % (executable, args)
- return os.popen(cmd)
+ # LC_ALL=C to ensure English output, stderr=DEVNULL to prevent output
+ # on stderr (Note: we don't have an example where the words we search
+ # for are actually localized, but in theory some system could do so.)
+ env = dict(os.environ)
+ env['LC_ALL'] = 'C'
+ proc = subprocess.Popen((executable,) + args,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.DEVNULL,
+ env=env)
+ return proc
def _find_mac(command, args, hw_identifiers, get_index):
try:
- pipe = _popen(command, args)
- if not pipe:
+ proc = _popen(command, *args.split())
+ if not proc:
return
- with pipe:
- for line in pipe:
+ with proc:
+ for line in proc.stdout:
words = line.lower().rstrip().split()
for i in range(len(words)):
if words[i] in hw_identifiers:
try:
word = words[get_index(i)]
- mac = int(word.replace(':', ''), 16)
+ mac = int(word.replace(b':', b''), 16)
if mac:
return mac
except (ValueError, IndexError):
@@ -354,10 +350,17 @@ def _ifconfig_getnode():
"""Get the hardware address on Unix by running ifconfig."""
# This works on Linux ('' or '-a'), Tru64 ('-av'), but not all Unixes.
for args in ('', '-a', '-av'):
- mac = _find_mac('ifconfig', args, ['hwaddr', 'ether'], lambda i: i+1)
+ mac = _find_mac('ifconfig', args, [b'hwaddr', b'ether'], lambda i: i+1)
if mac:
return mac
+def _ip_getnode():
+ """Get the hardware address on Unix by running ip."""
+ # This works on Linux with iproute2.
+ mac = _find_mac('ip', 'link list', [b'link/ether'], lambda i: i+1)
+ if mac:
+ return mac
+
def _arp_getnode():
"""Get the hardware address on Unix by running arp."""
import os, socket
@@ -367,32 +370,32 @@ def _arp_getnode():
return None
# Try getting the MAC addr from arp based on our IP address (Solaris).
- return _find_mac('arp', '-an', [ip_addr], lambda i: -1)
+ return _find_mac('arp', '-an', [os.fsencode(ip_addr)], lambda i: -1)
def _lanscan_getnode():
"""Get the hardware address on Unix by running lanscan."""
# This might work on HP-UX.
- return _find_mac('lanscan', '-ai', ['lan0'], lambda i: 0)
+ return _find_mac('lanscan', '-ai', [b'lan0'], lambda i: 0)
def _netstat_getnode():
"""Get the hardware address on Unix by running netstat."""
# This might work on AIX, Tru64 UNIX and presumably on IRIX.
try:
- pipe = _popen('netstat', '-ia')
- if not pipe:
+ proc = _popen('netstat', '-ia')
+ if not proc:
return
- with pipe:
- words = pipe.readline().rstrip().split()
+ with proc:
+ words = proc.stdout.readline().rstrip().split()
try:
- i = words.index('Address')
+ i = words.index(b'Address')
except ValueError:
return
- for line in pipe:
+ for line in proc.stdout:
try:
words = line.rstrip().split()
word = words[i]
- if len(word) == 17 and word.count(':') == 5:
- mac = int(word.replace(':', ''), 16)
+ if len(word) == 17 and word.count(b':') == 5:
+ mac = int(word.replace(b':', b''), 16)
if mac:
return mac
except (ValueError, IndexError):
@@ -447,31 +450,34 @@ def _netbios_getnode():
if win32wnet.Netbios(ncb) != 0:
continue
status._unpack()
- bytes = status.adapter_address
- return ((bytes[0]<<40) + (bytes[1]<<32) + (bytes[2]<<24) +
- (bytes[3]<<16) + (bytes[4]<<8) + bytes[5])
+ bytes = status.adapter_address[:6]
+ if len(bytes) != 6:
+ continue
+ return int.from_bytes(bytes, 'big')
# Thanks to Thomas Heller for ctypes and for his help with its use here.
# If ctypes is available, use it to find system routines for UUID generation.
# XXX This makes the module non-thread-safe!
-_uuid_generate_random = _uuid_generate_time = _UuidCreate = None
+_uuid_generate_time = _UuidCreate = None
try:
import ctypes, ctypes.util
+ import sys
# The uuid_generate_* routines are provided by libuuid on at least
# Linux and FreeBSD, and provided by libc on Mac OS X.
- for libname in ['uuid', 'c']:
+ _libnames = ['uuid']
+ if not sys.platform.startswith('win'):
+ _libnames.append('c')
+ for libname in _libnames:
try:
lib = ctypes.CDLL(ctypes.util.find_library(libname))
- except:
+ except Exception:
continue
- if hasattr(lib, 'uuid_generate_random'):
- _uuid_generate_random = lib.uuid_generate_random
if hasattr(lib, 'uuid_generate_time'):
_uuid_generate_time = lib.uuid_generate_time
- if _uuid_generate_random is not None:
- break # found everything we were looking for
+ break
+ del _libnames
# The uuid_generate_* functions are broken on MacOS X 10.5, as noted
# in issue #8621 the function generates the same sequence of values
@@ -480,11 +486,10 @@ try:
#
# Assume that the uuid_generate functions are broken from 10.5 onward,
# the test can be adjusted when a later version is fixed.
- import sys
if sys.platform == 'darwin':
import os
if int(os.uname().release.split('.')[0]) >= 9:
- _uuid_generate_random = _uuid_generate_time = None
+ _uuid_generate_time = None
# On Windows prior to 2000, UuidCreate gives a UUID containing the
# hardware address. On Windows 2000 and later, UuidCreate makes a
@@ -518,7 +523,7 @@ def _windll_getnode():
def _random_getnode():
"""Get a random node ID, with eighth bit set as suggested by RFC 4122."""
import random
- return random.randrange(0, 1<<48) | 0x010000000000
+ return random.getrandbits(48) | 0x010000000000
_node = None
@@ -539,8 +544,8 @@ def getnode():
if sys.platform == 'win32':
getters = [_windll_getnode, _netbios_getnode, _ipconfig_getnode]
else:
- getters = [_unixdll_getnode, _ifconfig_getnode, _arp_getnode,
- _lanscan_getnode, _netstat_getnode]
+ getters = [_unixdll_getnode, _ifconfig_getnode, _ip_getnode,
+ _arp_getnode, _lanscan_getnode, _netstat_getnode]
for getter in getters + [_random_getnode]:
try:
@@ -576,7 +581,7 @@ def uuid1(node=None, clock_seq=None):
_last_timestamp = timestamp
if clock_seq is None:
import random
- clock_seq = random.randrange(1<<14) # instead of stable storage
+ clock_seq = random.getrandbits(14) # instead of stable storage
time_low = timestamp & 0xffffffff
time_mid = (timestamp >> 32) & 0xffff
time_hi_version = (timestamp >> 48) & 0x0fff
@@ -595,21 +600,7 @@ def uuid3(namespace, name):
def uuid4():
"""Generate a random UUID."""
-
- # When the system provides a version-4 UUID generator, use it.
- if _uuid_generate_random:
- _buffer = ctypes.create_string_buffer(16)
- _uuid_generate_random(_buffer)
- return UUID(bytes=bytes_(_buffer.raw))
-
- # Otherwise, get randomness from urandom or the 'random' module.
- try:
- import os
- return UUID(bytes=os.urandom(16), version=4)
- except:
- import random
- bytes = bytes_(random.randrange(256) for i in range(16))
- return UUID(bytes=bytes, version=4)
+ return UUID(bytes=os.urandom(16), version=4)
def uuid5(namespace, name):
"""Generate a UUID from the SHA-1 hash of a namespace UUID and a name."""
diff --git a/Lib/venv/__init__.py b/Lib/venv/__init__.py
index 3d606ef89c..74245abbb2 100644
--- a/Lib/venv/__init__.py
+++ b/Lib/venv/__init__.py
@@ -19,9 +19,8 @@ optional arguments:
Give the virtual environment access to the system
site-packages dir.
--symlinks Attempt to symlink rather than copy.
- --clear Delete the environment directory if it already exists.
- If not specified and the directory exists, an error is
- raised.
+ --clear Delete the contents of the environment directory if it
+ already exists, before environment creation.
--upgrade Upgrade the environment directory to use this version
of Python, assuming Python has been upgraded in-place.
--without-pip Skips installing or upgrading pip in the virtual
@@ -52,9 +51,8 @@ class EnvBuilder:
:param system_site_packages: If True, the system (global) site-packages
dir is available to created environments.
- :param clear: If True and the target directory exists, it is deleted.
- Otherwise, if the target directory exists, an error is
- raised.
+ :param clear: If True, delete the contents of the environment directory if
+ it already exists, before environment creation.
:param symlinks: If True, attempt to symlink rather than copy files into
virtual environment.
:param upgrade: If True, upgrade an existing virtual environment.
@@ -361,9 +359,8 @@ def create(env_dir, system_site_packages=False, clear=False,
:param env_dir: The target directory to create an environment in.
:param system_site_packages: If True, the system (global) site-packages
dir is available to the environment.
- :param clear: If True and the target directory exists, it is deleted.
- Otherwise, if the target directory exists, an error is
- raised.
+ :param clear: If True, delete the contents of the environment directory if
+ it already exists, before environment creation.
:param symlinks: If True, attempt to symlink rather than copy files into
virtual environment.
:param with_pip: If True, ensure pip is installed in the virtual
diff --git a/Lib/venv/scripts/posix/activate.fish b/Lib/venv/scripts/posix/activate.fish
index 45391aa01c..fb7f5c0db9 100644
--- a/Lib/venv/scripts/posix/activate.fish
+++ b/Lib/venv/scripts/posix/activate.fish
@@ -55,8 +55,8 @@ if test -z "$VIRTUAL_ENV_DISABLE_PROMPT"
# with the original prompt function renamed, we can override with our own.
function fish_prompt
# Prompt override?
- if test -n "__VENV_PROMPT__"
- printf "%s%s%s" "__VENV_PROMPT__" (set_color normal) (_old_fish_prompt)
+ if test -n "$__VENV_PROMPT__"
+ printf "%s%s%s" "$__VENV_PROMPT__" (set_color normal) (_old_fish_prompt)
return
end
# ...Otherwise, prepend env
diff --git a/Lib/warnings.py b/Lib/warnings.py
index 70d087e6d9..c6631fcbf4 100644
--- a/Lib/warnings.py
+++ b/Lib/warnings.py
@@ -21,9 +21,15 @@ def showwarning(message, category, filename, lineno, file=None, line=None):
def formatwarning(message, category, filename, lineno, line=None):
"""Function to format a warning the standard way."""
- import linecache
s = "%s:%s: %s: %s\n" % (filename, lineno, category.__name__, message)
- line = linecache.getline(filename, lineno) if line is None else line
+ if line is None:
+ try:
+ import linecache
+ line = linecache.getline(filename, lineno)
+ except Exception:
+ # When a warning is logged during Python shutdown, linecache
+ # and the import machinery don't work anymore
+ line = None
if line:
line = line.strip()
s += " %s\n" % line
@@ -50,13 +56,8 @@ def filterwarnings(action, message="", category=Warning, module="", lineno=0,
assert isinstance(module, str), "module must be a string"
assert isinstance(lineno, int) and lineno >= 0, \
"lineno must be an int >= 0"
- item = (action, re.compile(message, re.I), category,
- re.compile(module), lineno)
- if append:
- filters.append(item)
- else:
- filters.insert(0, item)
- _filters_mutated()
+ _add_filter(action, re.compile(message, re.I), category,
+ re.compile(module), lineno, append=append)
def simplefilter(action, category=Warning, lineno=0, append=False):
"""Insert a simple entry into the list of warnings filters (at the front).
@@ -72,11 +73,20 @@ def simplefilter(action, category=Warning, lineno=0, append=False):
"once"), "invalid action: %r" % (action,)
assert isinstance(lineno, int) and lineno >= 0, \
"lineno must be an int >= 0"
- item = (action, None, category, None, lineno)
- if append:
- filters.append(item)
- else:
+ _add_filter(action, None, category, None, lineno, append=append)
+
+def _add_filter(*item, append):
+ # Remove possible duplicate filters, so new one will be placed
+ # in correct place. If append=True and duplicate exists, do nothing.
+ if not append:
+ try:
+ filters.remove(item)
+ except ValueError:
+ pass
filters.insert(0, item)
+ else:
+ if item not in filters:
+ filters.append(item)
_filters_mutated()
def resetwarnings():
@@ -160,6 +170,20 @@ def _getcategory(category):
return cat
+def _is_internal_frame(frame):
+ """Signal whether the frame is an internal CPython implementation detail."""
+ filename = frame.f_code.co_filename
+ return 'importlib' in filename and '_bootstrap' in filename
+
+
+def _next_external_frame(frame):
+ """Find the next frame that doesn't involve CPython internals."""
+ frame = frame.f_back
+ while frame is not None and _is_internal_frame(frame):
+ frame = frame.f_back
+ return frame
+
+
# Code typically replaced by _warnings
def warn(message, category=None, stacklevel=1):
"""Issue a warning, or maybe ignore it or raise an exception."""
@@ -169,16 +193,28 @@ def warn(message, category=None, stacklevel=1):
# Check category argument
if category is None:
category = UserWarning
- assert issubclass(category, Warning)
+ if not (isinstance(category, type) and issubclass(category, Warning)):
+ raise TypeError("category must be a Warning subclass, "
+ "not '{:s}'".format(type(category).__name__))
# Get context information
try:
- caller = sys._getframe(stacklevel)
+ if stacklevel <= 1 or _is_internal_frame(sys._getframe(1)):
+ # If frame is too small to care or if the warning originated in
+ # internal code, then do not try to hide any frames.
+ frame = sys._getframe(stacklevel)
+ else:
+ frame = sys._getframe(1)
+ # Look for one frame less since the above line starts us off.
+ for x in range(stacklevel-1):
+ frame = _next_external_frame(frame)
+ if frame is None:
+ raise ValueError
except ValueError:
globals = sys.__dict__
lineno = 1
else:
- globals = caller.f_globals
- lineno = caller.f_lineno
+ globals = frame.f_globals
+ lineno = frame.f_lineno
if '__name__' in globals:
module = globals['__name__']
else:
@@ -186,7 +222,7 @@ def warn(message, category=None, stacklevel=1):
filename = globals.get('__file__')
if filename:
fnl = filename.lower()
- if fnl.endswith((".pyc", ".pyo")):
+ if fnl.endswith(".pyc"):
filename = filename[:-1]
else:
if module == "__main__":
@@ -372,7 +408,6 @@ try:
defaultaction = _defaultaction
onceregistry = _onceregistry
_warnings_defaults = True
-
except ImportError:
filters = []
defaultaction = "default"
diff --git a/Lib/weakref.py b/Lib/weakref.py
index 5d09497155..2968fb9f72 100644
--- a/Lib/weakref.py
+++ b/Lib/weakref.py
@@ -150,7 +150,7 @@ class WeakValueDictionary(collections.MutableMapping):
return o is not None
def __repr__(self):
- return "<WeakValueDictionary at %s>" % id(self)
+ return "<%s at %#x>" % (self.__class__.__name__, id(self))
def __setitem__(self, key, value):
if self._pending_removals:
@@ -372,7 +372,7 @@ class WeakKeyDictionary(collections.MutableMapping):
return len(self.data) - len(self._pending_removals)
def __repr__(self):
- return "<WeakKeyDictionary at %s>" % id(self)
+ return "<%s at %#x>" % (self.__class__.__name__, id(self))
def __setitem__(self, key, value):
self.data[ref(key, self._remove)] = value
diff --git a/Lib/wsgiref/handlers.py b/Lib/wsgiref/handlers.py
index 63d5993eca..f4300b831a 100644
--- a/Lib/wsgiref/handlers.py
+++ b/Lib/wsgiref/handlers.py
@@ -226,7 +226,7 @@ class BaseHandler:
self.headers = self.headers_class(headers)
status = self._convert_string_type(status, "Status")
assert len(status)>=4,"Status must be at least 4 characters"
- assert int(status[:3]),"Status message must begin w/3-digit code"
+ assert status[:3].isdigit(), "Status message must begin w/3-digit code"
assert status[3]==" ", "Status message must have a space after code"
if __debug__:
@@ -450,7 +450,17 @@ class SimpleHandler(BaseHandler):
self.environ.update(self.base_env)
def _write(self,data):
- self.stdout.write(data)
+ result = self.stdout.write(data)
+ if result is None or result == len(data):
+ return
+ from warnings import warn
+ warn("SimpleHandler.stdout.write() should not do partial writes",
+ DeprecationWarning)
+ while True:
+ data = data[result:]
+ if not data:
+ break
+ result = self.stdout.write(data)
def _flush(self):
self.stdout.flush()
diff --git a/Lib/wsgiref/headers.py b/Lib/wsgiref/headers.py
index d93962831a..fab851c5a4 100644
--- a/Lib/wsgiref/headers.py
+++ b/Lib/wsgiref/headers.py
@@ -26,10 +26,10 @@ def _formatparam(param, value=None, quote=1):
class Headers:
-
"""Manage a collection of HTTP response headers"""
- def __init__(self,headers):
+ def __init__(self, headers=None):
+ headers = headers if headers is not None else []
if type(headers) is not list:
raise TypeError("Headers must be a list of name/value tuples")
self._headers = headers
@@ -69,7 +69,7 @@ class Headers:
Return None if the header is missing instead of raising an exception.
Note that if the header appeared multiple times, the first exactly which
- occurrance gets returned is undefined. Use getall() to get all
+ occurrence gets returned is undefined. Use getall() to get all
the values matching a header field name.
"""
return self.get(name)
@@ -131,7 +131,7 @@ class Headers:
return self._headers[:]
def __repr__(self):
- return "Headers(%r)" % self._headers
+ return "%s(%r)" % (self.__class__.__name__, self._headers)
def __str__(self):
"""str() returns the formatted headers, complete with end line,
diff --git a/Lib/wsgiref/simple_server.py b/Lib/wsgiref/simple_server.py
index 378b316bbd..7fddbe822c 100644
--- a/Lib/wsgiref/simple_server.py
+++ b/Lib/wsgiref/simple_server.py
@@ -11,6 +11,7 @@ module. See also the BaseHTTPServer module docs for other API information.
"""
from http.server import BaseHTTPRequestHandler, HTTPServer
+from io import BufferedWriter
import sys
import urllib.parse
from wsgiref.handlers import SimpleHandler
@@ -82,7 +83,7 @@ class WSGIRequestHandler(BaseHTTPRequestHandler):
else:
path,query = self.path,''
- env['PATH_INFO'] = urllib.parse.unquote_to_bytes(path).decode('iso-8859-1')
+ env['PATH_INFO'] = urllib.parse.unquote(path, 'iso-8859-1')
env['QUERY_STRING'] = query
host = self.address_string()
@@ -126,11 +127,17 @@ class WSGIRequestHandler(BaseHTTPRequestHandler):
if not self.parse_request(): # An error code has been sent, just exit
return
- handler = ServerHandler(
- self.rfile, self.wfile, self.get_stderr(), self.get_environ()
- )
- handler.request_handler = self # backpointer for logging
- handler.run(self.server.get_app())
+ # Avoid passing the raw file object wfile, which can do partial
+ # writes (Issue 24291)
+ stdout = BufferedWriter(self.wfile)
+ try:
+ handler = ServerHandler(
+ self.rfile, stdout, self.get_stderr(), self.get_environ()
+ )
+ handler.request_handler = self # backpointer for logging
+ handler.run(self.server.get_app())
+ finally:
+ stdout.detach()
diff --git a/Lib/xml/dom/minidom.py b/Lib/xml/dom/minidom.py
index c379a332e1..a5d813f932 100644
--- a/Lib/xml/dom/minidom.py
+++ b/Lib/xml/dom/minidom.py
@@ -545,9 +545,6 @@ class NamedNodeMap(object):
def __lt__(self, other):
return self._cmp(other) < 0
- def __ne__(self, other):
- return self._cmp(other) != 0
-
def __getitem__(self, attname_or_tuple):
if isinstance(attname_or_tuple, tuple):
return self._attrsNS[attname_or_tuple]
@@ -648,9 +645,10 @@ class TypeInfo(object):
def __repr__(self):
if self.namespace:
- return "<TypeInfo %r (from %r)>" % (self.name, self.namespace)
+ return "<%s %r (from %r)>" % (self.__class__.__name__, self.name,
+ self.namespace)
else:
- return "<TypeInfo %r>" % self.name
+ return "<%s %r>" % (self.__class__.__name__, self.name)
def _get_name(self):
return self.name
diff --git a/Lib/xml/dom/xmlbuilder.py b/Lib/xml/dom/xmlbuilder.py
index d798624709..444f0b2a57 100644
--- a/Lib/xml/dom/xmlbuilder.py
+++ b/Lib/xml/dom/xmlbuilder.py
@@ -1,6 +1,7 @@
"""Implementation of the DOM Level 3 'LS-Load' feature."""
import copy
+import warnings
import xml.dom
from xml.dom.NodeFilter import NodeFilter
@@ -331,13 +332,33 @@ class DOMBuilderFilter:
del NodeFilter
+class _AsyncDeprecatedProperty:
+ def warn(self, cls):
+ clsname = cls.__name__
+ warnings.warn(
+ "{cls}.async is deprecated; use {cls}.async_".format(cls=clsname),
+ DeprecationWarning)
+
+ def __get__(self, instance, cls):
+ self.warn(cls)
+ if instance is not None:
+ return instance.async_
+ return False
+
+ def __set__(self, instance, value):
+ self.warn(type(instance))
+ setattr(instance, 'async_', value)
+
+
class DocumentLS:
"""Mixin to create documents that conform to the load/save spec."""
- async = False
+ async = _AsyncDeprecatedProperty()
+ async_ = False
def _get_async(self):
return False
+
def _set_async(self, async):
if async:
raise xml.dom.NotSupportedErr(
@@ -363,6 +384,9 @@ class DocumentLS:
return snode.toxml()
+del _AsyncDeprecatedProperty
+
+
class DOMImplementationLS:
MODE_SYNCHRONOUS = 1
MODE_ASYNCHRONOUS = 2
diff --git a/Lib/xml/etree/ElementPath.py b/Lib/xml/etree/ElementPath.py
index d914ddb672..5de42324c2 100644
--- a/Lib/xml/etree/ElementPath.py
+++ b/Lib/xml/etree/ElementPath.py
@@ -114,7 +114,10 @@ def prepare_self(next, token):
return select
def prepare_descendant(next, token):
- token = next()
+ try:
+ token = next()
+ except StopIteration:
+ return
if token[0] == "*":
tag = "*"
elif not token[0]:
@@ -148,7 +151,10 @@ def prepare_predicate(next, token):
signature = []
predicate = []
while 1:
- token = next()
+ try:
+ token = next()
+ except StopIteration:
+ return
if token[0] == "]":
break
if token[0] and token[0][:1] in "'\"":
@@ -261,7 +267,10 @@ def iterfind(elem, path, namespaces=None):
if path[:1] == "/":
raise SyntaxError("cannot use absolute path on element")
next = iter(xpath_tokenizer(path, namespaces)).__next__
- token = next()
+ try:
+ token = next()
+ except StopIteration:
+ return
selector = []
while 1:
try:
@@ -286,10 +295,7 @@ def iterfind(elem, path, namespaces=None):
# Find first matching object.
def find(elem, path, namespaces=None):
- try:
- return next(iterfind(elem, path, namespaces))
- except StopIteration:
- return None
+ return next(iterfind(elem, path, namespaces), None)
##
# Find all matching objects.
diff --git a/Lib/xml/etree/ElementTree.py b/Lib/xml/etree/ElementTree.py
index 5a09b35da0..6d1b0ab864 100644
--- a/Lib/xml/etree/ElementTree.py
+++ b/Lib/xml/etree/ElementTree.py
@@ -174,7 +174,7 @@ class Element:
self._children = []
def __repr__(self):
- return "<Element %s at 0x%x>" % (repr(self.tag), id(self))
+ return "<%s %r at %#x>" % (self.__class__.__name__, self.tag, id(self))
def makeelement(self, tag, attrib):
"""Create a new element with the same type.
@@ -428,12 +428,14 @@ class Element:
tag = self.tag
if not isinstance(tag, str) and tag is not None:
return
- if self.text:
- yield self.text
+ t = self.text
+ if t:
+ yield t
for e in self:
yield from e.itertext()
- if e.tail:
- yield e.tail
+ t = e.tail
+ if t:
+ yield t
def SubElement(parent, tag, attrib={}, **extra):
@@ -509,7 +511,7 @@ class QName:
def __str__(self):
return self.text
def __repr__(self):
- return '<QName %r>' % (self.text,)
+ return '<%s %r>' % (self.__class__.__name__, self.text)
def __hash__(self):
return hash(self.text)
def __le__(self, other):
@@ -532,10 +534,6 @@ class QName:
if isinstance(other, QName):
return self.text == other.text
return self.text == other
- def __ne__(self, other):
- if isinstance(other, QName):
- return self.text != other.text
- return self.text != other
# --------------------------------------------------------------------
@@ -1456,7 +1454,7 @@ class TreeBuilder:
class XMLParser:
"""Element structure builder for XML source data based on the expat parser.
- *html* are predefined HTML entities (not supported currently),
+ *html* are predefined HTML entities (deprecated and not supported),
*target* is an optional target object which defaults to an instance of the
standard TreeBuilder class, *encoding* is an optional encoding string
which if given, overrides the encoding specified in the XML file:
diff --git a/Lib/xml/sax/__init__.py b/Lib/xml/sax/__init__.py
index b161b1f07a..ef67ae67a6 100644
--- a/Lib/xml/sax/__init__.py
+++ b/Lib/xml/sax/__init__.py
@@ -33,8 +33,7 @@ def parse(source, handler, errorHandler=ErrorHandler()):
parser.parse(source)
def parseString(string, handler, errorHandler=ErrorHandler()):
- from io import BytesIO
-
+ import io
if errorHandler is None:
errorHandler = ErrorHandler()
parser = make_parser()
@@ -42,7 +41,10 @@ def parseString(string, handler, errorHandler=ErrorHandler()):
parser.setErrorHandler(errorHandler)
inpsrc = InputSource()
- inpsrc.setByteStream(BytesIO(string))
+ if isinstance(string, str):
+ inpsrc.setCharacterStream(io.StringIO(string))
+ else:
+ inpsrc.setByteStream(io.BytesIO(string))
parser.parse(inpsrc)
# this is the parser list used by the make_parser function if no
diff --git a/Lib/xml/sax/expatreader.py b/Lib/xml/sax/expatreader.py
index 3b63737457..98b5ca9539 100644
--- a/Lib/xml/sax/expatreader.py
+++ b/Lib/xml/sax/expatreader.py
@@ -232,9 +232,14 @@ class ExpatParser(xmlreader.IncrementalParser, xmlreader.Locator):
parser.ErrorColumnNumber = self._parser.ErrorColumnNumber
parser.ErrorLineNumber = self._parser.ErrorLineNumber
self._parser = parser
- bs = self._source.getByteStream()
- if bs is not None:
- bs.close()
+ try:
+ file = self._source.getCharacterStream()
+ if file is not None:
+ file.close()
+ finally:
+ file = self._source.getByteStream()
+ if file is not None:
+ file.close()
def _reset_cont_handler(self):
self._parser.ProcessingInstructionHandler = \
diff --git a/Lib/xml/sax/saxutils.py b/Lib/xml/sax/saxutils.py
index 1d3d0ecc5f..a69c7f7621 100644
--- a/Lib/xml/sax/saxutils.py
+++ b/Lib/xml/sax/saxutils.py
@@ -345,11 +345,14 @@ def prepare_input_source(source, base=""):
elif hasattr(source, "read"):
f = source
source = xmlreader.InputSource()
- source.setByteStream(f)
+ if isinstance(f.read(0), str):
+ source.setCharacterStream(f)
+ else:
+ source.setByteStream(f)
if hasattr(f, "name") and isinstance(f.name, str):
source.setSystemId(f.name)
- if source.getByteStream() is None:
+ if source.getCharacterStream() is None and source.getByteStream() is None:
sysid = source.getSystemId()
basehead = os.path.dirname(os.path.normpath(base))
sysidfilename = os.path.join(basehead, sysid)
diff --git a/Lib/xml/sax/xmlreader.py b/Lib/xml/sax/xmlreader.py
index 7ef497f94f..716f228404 100644
--- a/Lib/xml/sax/xmlreader.py
+++ b/Lib/xml/sax/xmlreader.py
@@ -117,7 +117,9 @@ class IncrementalParser(XMLReader):
source = saxutils.prepare_input_source(source)
self.prepareParser(source)
- file = source.getByteStream()
+ file = source.getCharacterStream()
+ if file is None:
+ file = source.getByteStream()
buffer = file.read(self._bufsize)
while buffer:
self.feed(buffer)
diff --git a/Lib/xmlrpc/client.py b/Lib/xmlrpc/client.py
index 9de5111a65..bbf9ee63f7 100644
--- a/Lib/xmlrpc/client.py
+++ b/Lib/xmlrpc/client.py
@@ -208,8 +208,8 @@ class ProtocolError(Error):
self.headers = headers
def __repr__(self):
return (
- "<ProtocolError for %s: %s %s>" %
- (self.url, self.errcode, self.errmsg)
+ "<%s for %s: %s %s>" %
+ (self.__class__.__name__, self.url, self.errcode, self.errmsg)
)
##
@@ -237,7 +237,8 @@ class Fault(Error):
self.faultCode = faultCode
self.faultString = faultString
def __repr__(self):
- return "<Fault %s: %r>" % (self.faultCode, self.faultString)
+ return "<%s %s: %r>" % (self.__class__.__name__,
+ self.faultCode, self.faultString)
# --------------------------------------------------------------------
# Special values
@@ -339,10 +340,6 @@ class DateTime:
s, o = self.make_comparable(other)
return s == o
- def __ne__(self, other):
- s, o = self.make_comparable(other)
- return s != o
-
def timetuple(self):
return time.strptime(self.value, "%Y%m%dT%H:%M:%S")
@@ -355,7 +352,7 @@ class DateTime:
return self.value
def __repr__(self):
- return "<DateTime %r at %x>" % (self.value, id(self))
+ return "<%s %r at %#x>" % (self.__class__.__name__, self.value, id(self))
def decode(self, data):
self.value = str(data).strip()
@@ -406,11 +403,6 @@ class Binary:
other = other.data
return self.data == other
- def __ne__(self, other):
- if isinstance(other, Binary):
- other = other.data
- return self.data != other
-
def decode(self, data):
self.data = base64.decodebytes(data)
@@ -648,6 +640,7 @@ class Unmarshaller:
self._stack = []
self._marks = []
self._data = []
+ self._value = False
self._methodname = None
self._encoding = "utf-8"
self.append = self._stack.append
@@ -677,6 +670,8 @@ class Unmarshaller:
if tag == "array" or tag == "struct":
self._marks.append(len(self._stack))
self._data = []
+ if self._value and tag not in self.dispatch:
+ raise ResponseError("unknown tag %r" % tag)
self._value = (tag == "value")
def data(self, text):
@@ -852,7 +847,7 @@ class MultiCall:
self.__call_list = []
def __repr__(self):
- return "<MultiCall at %x>" % id(self)
+ return "<%s at %#x>" % (self.__class__.__name__, id(self))
__str__ = __repr__
@@ -963,8 +958,6 @@ def dumps(params, methodname=None, methodresponse=None, encoding=None,
# standard XML-RPC wrappings
if methodname:
# a method call
- if not isinstance(methodname, str):
- methodname = methodname.encode(encoding)
data = (
xmlheader,
"<methodCall>\n"
@@ -1023,12 +1016,9 @@ def gzip_encode(data):
if not gzip:
raise NotImplementedError
f = BytesIO()
- gzf = gzip.GzipFile(mode="wb", fileobj=f, compresslevel=1)
- gzf.write(data)
- gzf.close()
- encoded = f.getvalue()
- f.close()
- return encoded
+ with gzip.GzipFile(mode="wb", fileobj=f, compresslevel=1) as gzf:
+ gzf.write(data)
+ return f.getvalue()
##
# Decode a string using the gzip content encoding such as specified by the
@@ -1049,17 +1039,14 @@ def gzip_decode(data, max_decode=20971520):
"""
if not gzip:
raise NotImplementedError
- f = BytesIO(data)
- gzf = gzip.GzipFile(mode="rb", fileobj=f)
- try:
- if max_decode < 0: # no limit
- decoded = gzf.read()
- else:
- decoded = gzf.read(max_decode + 1)
- except OSError:
- raise ValueError("invalid data")
- f.close()
- gzf.close()
+ with gzip.GzipFile(mode="rb", fileobj=BytesIO(data)) as gzf:
+ try:
+ if max_decode < 0: # no limit
+ decoded = gzf.read()
+ else:
+ decoded = gzf.read(max_decode + 1)
+ except OSError:
+ raise ValueError("invalid data")
if max_decode >= 0 and len(decoded) > max_decode:
raise ValueError("max gzipped payload length exceeded")
return decoded
@@ -1145,13 +1132,13 @@ class Transport:
for i in (0, 1):
try:
return self.single_request(host, handler, request_body, verbose)
+ except http.client.RemoteDisconnected:
+ if i:
+ raise
except OSError as e:
if i or e.errno not in (errno.ECONNRESET, errno.ECONNABORTED,
errno.EPIPE):
raise
- except http.client.BadStatusLine: #close after we sent request
- if i:
- raise
def single_request(self, host, handler, request_body, verbose=False):
# issue XML-RPC request
@@ -1436,7 +1423,7 @@ class ServerProxy:
# call a method on the remote server
request = dumps(params, methodname, encoding=self.__encoding,
- allow_none=self.__allow_none).encode(self.__encoding)
+ allow_none=self.__allow_none).encode(self.__encoding, 'xmlcharrefreplace')
response = self.__transport.request(
self.__host,
@@ -1452,8 +1439,8 @@ class ServerProxy:
def __repr__(self):
return (
- "<ServerProxy for %s%s>" %
- (self.__host, self.__handler)
+ "<%s for %s%s>" %
+ (self.__class__.__name__, self.__host, self.__handler)
)
__str__ = __repr__
@@ -1462,7 +1449,7 @@ class ServerProxy:
# magic method dispatcher
return _Method(self.__request, name)
- # note: to call a remote object with an non-standard name, use
+ # note: to call a remote object with a non-standard name, use
# result getattr(server, "strange-python-name")(args)
def __call__(self, attr):
@@ -1475,6 +1462,12 @@ class ServerProxy:
return self.__transport
raise AttributeError("Attribute %r not found" % (attr,))
+ def __enter__(self):
+ return self
+
+ def __exit__(self, *args):
+ self.__close()
+
# compatibility
Server = ServerProxy
diff --git a/Lib/xmlrpc/server.py b/Lib/xmlrpc/server.py
index 304e218c00..5b5bf7c405 100644
--- a/Lib/xmlrpc/server.py
+++ b/Lib/xmlrpc/server.py
@@ -269,7 +269,7 @@ class SimpleXMLRPCDispatcher:
encoding=self.encoding, allow_none=self.allow_none,
)
- return response.encode(self.encoding)
+ return response.encode(self.encoding, 'xmlcharrefreplace')
def system_listMethods(self):
"""system.listMethods() => ['add', 'subtract', 'multiple']
@@ -622,7 +622,7 @@ class MultiPathXMLRPCServer(SimpleXMLRPCServer):
response = dumps(
Fault(1, "%s:%s" % (exc_type, exc_value)),
encoding=self.encoding, allow_none=self.allow_none)
- response = response.encode(self.encoding)
+ response = response.encode(self.encoding, 'xmlcharrefreplace')
return response
class CGIXMLRPCRequestHandler(SimpleXMLRPCDispatcher):
diff --git a/Lib/zipapp.py b/Lib/zipapp.py
new file mode 100644
index 0000000000..eceb91de1a
--- /dev/null
+++ b/Lib/zipapp.py
@@ -0,0 +1,201 @@
+import contextlib
+import os
+import pathlib
+import shutil
+import stat
+import sys
+import zipfile
+
+__all__ = ['ZipAppError', 'create_archive', 'get_interpreter']
+
+
+# The __main__.py used if the users specifies "-m module:fn".
+# Note that this will always be written as UTF-8 (module and
+# function names can be non-ASCII in Python 3).
+# We add a coding cookie even though UTF-8 is the default in Python 3
+# because the resulting archive may be intended to be run under Python 2.
+MAIN_TEMPLATE = """\
+# -*- coding: utf-8 -*-
+import {module}
+{module}.{fn}()
+"""
+
+
+# The Windows launcher defaults to UTF-8 when parsing shebang lines if the
+# file has no BOM. So use UTF-8 on Windows.
+# On Unix, use the filesystem encoding.
+if sys.platform.startswith('win'):
+ shebang_encoding = 'utf-8'
+else:
+ shebang_encoding = sys.getfilesystemencoding()
+
+
+class ZipAppError(ValueError):
+ pass
+
+
+@contextlib.contextmanager
+def _maybe_open(archive, mode):
+ if isinstance(archive, pathlib.Path):
+ archive = str(archive)
+ if isinstance(archive, str):
+ with open(archive, mode) as f:
+ yield f
+ else:
+ yield archive
+
+
+def _write_file_prefix(f, interpreter):
+ """Write a shebang line."""
+ if interpreter:
+ shebang = b'#!' + interpreter.encode(shebang_encoding) + b'\n'
+ f.write(shebang)
+
+
+def _copy_archive(archive, new_archive, interpreter=None):
+ """Copy an application archive, modifying the shebang line."""
+ with _maybe_open(archive, 'rb') as src:
+ # Skip the shebang line from the source.
+ # Read 2 bytes of the source and check if they are #!.
+ first_2 = src.read(2)
+ if first_2 == b'#!':
+ # Discard the initial 2 bytes and the rest of the shebang line.
+ first_2 = b''
+ src.readline()
+
+ with _maybe_open(new_archive, 'wb') as dst:
+ _write_file_prefix(dst, interpreter)
+ # If there was no shebang, "first_2" contains the first 2 bytes
+ # of the source file, so write them before copying the rest
+ # of the file.
+ dst.write(first_2)
+ shutil.copyfileobj(src, dst)
+
+ if interpreter and isinstance(new_archive, str):
+ os.chmod(new_archive, os.stat(new_archive).st_mode | stat.S_IEXEC)
+
+
+def create_archive(source, target=None, interpreter=None, main=None):
+ """Create an application archive from SOURCE.
+
+ The SOURCE can be the name of a directory, or a filename or a file-like
+ object referring to an existing archive.
+
+ The content of SOURCE is packed into an application archive in TARGET,
+ which can be a filename or a file-like object. If SOURCE is a directory,
+ TARGET can be omitted and will default to the name of SOURCE with .pyz
+ appended.
+
+ The created application archive will have a shebang line specifying
+ that it should run with INTERPRETER (there will be no shebang line if
+ INTERPRETER is None), and a __main__.py which runs MAIN (if MAIN is
+ not specified, an existing __main__.py will be used). It is an error
+ to specify MAIN for anything other than a directory source with no
+ __main__.py, and it is an error to omit MAIN if the directory has no
+ __main__.py.
+ """
+ # Are we copying an existing archive?
+ source_is_file = False
+ if hasattr(source, 'read') and hasattr(source, 'readline'):
+ source_is_file = True
+ else:
+ source = pathlib.Path(source)
+ if source.is_file():
+ source_is_file = True
+
+ if source_is_file:
+ _copy_archive(source, target, interpreter)
+ return
+
+ # We are creating a new archive from a directory.
+ if not source.exists():
+ raise ZipAppError("Source does not exist")
+ has_main = (source / '__main__.py').is_file()
+ if main and has_main:
+ raise ZipAppError(
+ "Cannot specify entry point if the source has __main__.py")
+ if not (main or has_main):
+ raise ZipAppError("Archive has no entry point")
+
+ main_py = None
+ if main:
+ # Check that main has the right format.
+ mod, sep, fn = main.partition(':')
+ mod_ok = all(part.isidentifier() for part in mod.split('.'))
+ fn_ok = all(part.isidentifier() for part in fn.split('.'))
+ if not (sep == ':' and mod_ok and fn_ok):
+ raise ZipAppError("Invalid entry point: " + main)
+ main_py = MAIN_TEMPLATE.format(module=mod, fn=fn)
+
+ if target is None:
+ target = source.with_suffix('.pyz')
+ elif not hasattr(target, 'write'):
+ target = pathlib.Path(target)
+
+ with _maybe_open(target, 'wb') as fd:
+ _write_file_prefix(fd, interpreter)
+ with zipfile.ZipFile(fd, 'w') as z:
+ root = pathlib.Path(source)
+ for child in root.rglob('*'):
+ arcname = str(child.relative_to(root))
+ z.write(str(child), arcname)
+ if main_py:
+ z.writestr('__main__.py', main_py.encode('utf-8'))
+
+ if interpreter and not hasattr(target, 'write'):
+ target.chmod(target.stat().st_mode | stat.S_IEXEC)
+
+
+def get_interpreter(archive):
+ with _maybe_open(archive, 'rb') as f:
+ if f.read(2) == b'#!':
+ return f.readline().strip().decode(shebang_encoding)
+
+
+def main(args=None):
+ """Run the zipapp command line interface.
+
+ The ARGS parameter lets you specify the argument list directly.
+ Omitting ARGS (or setting it to None) works as for argparse, using
+ sys.argv[1:] as the argument list.
+ """
+ import argparse
+
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--output', '-o', default=None,
+ help="The name of the output archive. "
+ "Required if SOURCE is an archive.")
+ parser.add_argument('--python', '-p', default=None,
+ help="The name of the Python interpreter to use "
+ "(default: no shebang line).")
+ parser.add_argument('--main', '-m', default=None,
+ help="The main function of the application "
+ "(default: use an existing __main__.py).")
+ parser.add_argument('--info', default=False, action='store_true',
+ help="Display the interpreter from the archive.")
+ parser.add_argument('source',
+ help="Source directory (or existing archive).")
+
+ args = parser.parse_args(args)
+
+ # Handle `python -m zipapp archive.pyz --info`.
+ if args.info:
+ if not os.path.isfile(args.source):
+ raise SystemExit("Can only get info for an archive file")
+ interpreter = get_interpreter(args.source)
+ print("Interpreter: {}".format(interpreter or "<none>"))
+ sys.exit(0)
+
+ if os.path.isfile(args.source):
+ if args.output is None or (os.path.exists(args.output) and
+ os.path.samefile(args.source, args.output)):
+ raise SystemExit("In-place editing of archives is not supported")
+ if args.main:
+ raise SystemExit("Cannot change the main function when copying")
+
+ create_archive(args.source, args.output,
+ interpreter=args.python, main=args.main)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/Lib/zipfile.py b/Lib/zipfile.py
index 11d7cf9cb6..56a2479fb3 100644
--- a/Lib/zipfile.py
+++ b/Lib/zipfile.py
@@ -14,6 +14,10 @@ import shutil
import struct
import binascii
+try:
+ import threading
+except ImportError:
+ import dummy_threading as threading
try:
import zlib # We may need its compression method
@@ -355,6 +359,28 @@ class ZipInfo (object):
# compress_size Size of the compressed file
# file_size Size of the uncompressed file
+ def __repr__(self):
+ result = ['<%s filename=%r' % (self.__class__.__name__, self.filename)]
+ if self.compress_type != ZIP_STORED:
+ result.append(' compress_type=%s' %
+ compressor_names.get(self.compress_type,
+ self.compress_type))
+ hi = self.external_attr >> 16
+ lo = self.external_attr & 0xFFFF
+ if hi:
+ result.append(' filemode=%r' % stat.filemode(hi))
+ if lo:
+ result.append(' external_attr=%#x' % lo)
+ isdir = self.filename[-1:] == '/'
+ if not isdir or self.file_size:
+ result.append(' file_size=%r' % self.file_size)
+ if ((not isdir or self.compress_size) and
+ (self.compress_type != ZIP_STORED or
+ self.file_size != self.compress_size)):
+ result.append(' compress_size=%r' % self.compress_size)
+ result.append('>')
+ return ''.join(result)
+
def FileHeader(self, zip64=None):
"""Return the per-file header as a string."""
dt = self.date_time
@@ -624,6 +650,47 @@ def _get_decompressor(compress_type):
raise NotImplementedError("compression type %d" % (compress_type,))
+class _SharedFile:
+ def __init__(self, file, pos, close, lock):
+ self._file = file
+ self._pos = pos
+ self._close = close
+ self._lock = lock
+
+ def read(self, n=-1):
+ with self._lock:
+ self._file.seek(self._pos)
+ data = self._file.read(n)
+ self._pos = self._file.tell()
+ return data
+
+ def close(self):
+ if self._file is not None:
+ fileobj = self._file
+ self._file = None
+ self._close(fileobj)
+
+# Provide the tell method for unseekable stream
+class _Tellable:
+ def __init__(self, fp):
+ self.fp = fp
+ self.offset = 0
+
+ def write(self, data):
+ n = self.fp.write(data)
+ self.offset += n
+ return n
+
+ def tell(self):
+ return self.offset
+
+ def flush(self):
+ self.fp.flush()
+
+ def close(self):
+ self.fp.close()
+
+
class ZipExtFile(io.BufferedIOBase):
"""File-like object for reading an archive member.
Is returned by ZipFile.open().
@@ -667,10 +734,24 @@ class ZipExtFile(io.BufferedIOBase):
if hasattr(zipinfo, 'CRC'):
self._expected_crc = zipinfo.CRC
- self._running_crc = crc32(b'') & 0xffffffff
+ self._running_crc = crc32(b'')
else:
self._expected_crc = None
+ def __repr__(self):
+ result = ['<%s.%s' % (self.__class__.__module__,
+ self.__class__.__qualname__)]
+ if not self.closed:
+ result.append(' name=%r mode=%r' % (self.name, self.mode))
+ if self._compress_type != ZIP_STORED:
+ result.append(' compress_type=%s' %
+ compressor_names.get(self._compress_type,
+ self._compress_type))
+ else:
+ result.append(' [closed]')
+ result.append('>')
+ return ''.join(result)
+
def readline(self, limit=-1):
"""Read and return a line from the stream.
@@ -775,7 +856,7 @@ class ZipExtFile(io.BufferedIOBase):
if self._expected_crc is None:
# No need to compute the CRC if we don't have a reference value
return
- self._running_crc = crc32(newdata, self._running_crc) & 0xffffffff
+ self._running_crc = crc32(newdata, self._running_crc)
# Check the CRC if we're at the end of the file
if self._eof and self._running_crc != self._expected_crc:
raise BadZipFile("Bad CRC-32 for file %r" % self.name)
@@ -884,7 +965,8 @@ class ZipFile:
file: Either the path to the file, or a file-like object.
If it is a path, the file will be opened and closed by ZipFile.
- mode: The mode can be either read "r", write "w" or append "a".
+ mode: The mode can be either read 'r', write 'w', exclusive create 'x',
+ or append 'a'.
compression: ZIP_STORED (no compression), ZIP_DEFLATED (requires zlib),
ZIP_BZIP2 (requires bz2) or ZIP_LZMA (requires lzma).
allowZip64: if True ZipFile will create files with ZIP64 extensions when
@@ -897,9 +979,10 @@ class ZipFile:
_windows_illegal_name_trans_table = None
def __init__(self, file, mode="r", compression=ZIP_STORED, allowZip64=True):
- """Open the ZIP file with mode read "r", write "w" or append "a"."""
- if mode not in ("r", "w", "a"):
- raise RuntimeError('ZipFile() requires mode "r", "w", or "a"')
+ """Open the ZIP file with mode read 'r', write 'w', exclusive create 'x',
+ or append 'a'."""
+ if mode not in ('r', 'w', 'x', 'a'):
+ raise RuntimeError("ZipFile requires mode 'r', 'w', 'x', or 'a'")
_check_compression(compression)
@@ -909,7 +992,7 @@ class ZipFile:
self.NameToInfo = {} # Find file info given name
self.filelist = [] # List of ZipInfo instances for archive
self.compression = compression # Method of compression
- self.mode = key = mode.replace('b', '')[0]
+ self.mode = mode
self.pwd = None
self._comment = b''
@@ -918,33 +1001,51 @@ class ZipFile:
# No, it's a filename
self._filePassed = 0
self.filename = file
- modeDict = {'r' : 'rb', 'w': 'wb', 'a' : 'r+b'}
- try:
- self.fp = io.open(file, modeDict[mode])
- except OSError:
- if mode == 'a':
- mode = key = 'w'
- self.fp = io.open(file, modeDict[mode])
- else:
+ modeDict = {'r' : 'rb', 'w': 'w+b', 'x': 'x+b', 'a' : 'r+b',
+ 'r+b': 'w+b', 'w+b': 'wb', 'x+b': 'xb'}
+ filemode = modeDict[mode]
+ while True:
+ try:
+ self.fp = io.open(file, filemode)
+ except OSError:
+ if filemode in modeDict:
+ filemode = modeDict[filemode]
+ continue
raise
+ break
else:
self._filePassed = 1
self.fp = file
self.filename = getattr(file, 'name', None)
+ self._fileRefCnt = 1
+ self._lock = threading.RLock()
+ self._seekable = True
try:
- if key == 'r':
+ if mode == 'r':
self._RealGetContents()
- elif key == 'w':
+ elif mode in ('w', 'x'):
# set the modified flag so central directory gets written
# even if no files are added to the archive
self._didModify = True
- elif key == 'a':
+ try:
+ self.start_dir = self.fp.tell()
+ except (AttributeError, OSError):
+ self.fp = _Tellable(self.fp)
+ self.start_dir = 0
+ self._seekable = False
+ else:
+ # Some file-like objects can provide tell() but not seek()
+ try:
+ self.fp.seek(self.start_dir)
+ except (AttributeError, OSError):
+ self._seekable = False
+ elif mode == 'a':
try:
# See if file is a zip file
self._RealGetContents()
# seek to start of directory and overwrite
- self.fp.seek(self.start_dir, 0)
+ self.fp.seek(self.start_dir)
except BadZipFile:
# file is not a zip file, just append
self.fp.seek(0, 2)
@@ -952,13 +1053,13 @@ class ZipFile:
# set the modified flag so central directory gets written
# even if no files are added to the archive
self._didModify = True
+ self.start_dir = self.fp.tell()
else:
- raise RuntimeError('Mode must be "r", "w" or "a"')
+ raise RuntimeError("Mode must be 'r', 'w', 'x', or 'a'")
except:
fp = self.fp
self.fp = None
- if not self._filePassed:
- fp.close()
+ self._fpclose(fp)
raise
def __enter__(self):
@@ -967,6 +1068,20 @@ class ZipFile:
def __exit__(self, type, value, traceback):
self.close()
+ def __repr__(self):
+ result = ['<%s.%s' % (self.__class__.__module__,
+ self.__class__.__qualname__)]
+ if self.fp is not None:
+ if self._filePassed:
+ result.append(' file=%r' % self.fp)
+ elif self.filename is not None:
+ result.append(' filename=%r' % self.filename)
+ result.append(' mode=%r' % self.mode)
+ else:
+ result.append(' [closed]')
+ result.append('>')
+ return ''.join(result)
+
def _RealGetContents(self):
"""Read in the table of contents for the ZIP file."""
fp = self.fp
@@ -1131,23 +1246,17 @@ class ZipFile:
raise RuntimeError(
"Attempt to read ZIP archive that was already closed")
- # Only open a new file for instances where we were not
- # given a file object in the constructor
- if self._filePassed:
- zef_file = self.fp
+ # Make sure we have an info object
+ if isinstance(name, ZipInfo):
+ # 'name' is already an info object
+ zinfo = name
else:
- zef_file = io.open(self.filename, 'rb')
+ # Get info object for name
+ zinfo = self.getinfo(name)
+ self._fileRefCnt += 1
+ zef_file = _SharedFile(self.fp, zinfo.header_offset, self._fpclose, self._lock)
try:
- # Make sure we have an info object
- if isinstance(name, ZipInfo):
- # 'name' is already an info object
- zinfo = name
- else:
- # Get info object for name
- zinfo = self.getinfo(name)
- zef_file.seek(zinfo.header_offset, 0)
-
# Skip the file header:
fheader = zef_file.read(sizeFileHeader)
if len(fheader) != sizeFileHeader:
@@ -1206,11 +1315,9 @@ class ZipFile:
if h[11] != check_byte:
raise RuntimeError("Bad password for file", name)
- return ZipExtFile(zef_file, mode, zinfo, zd,
- close_fileobj=not self._filePassed)
+ return ZipExtFile(zef_file, mode, zinfo, zd, True)
except:
- if not self._filePassed:
- zef_file.close()
+ zef_file.close()
raise
def extract(self, member, path=None, pwd=None):
@@ -1298,8 +1405,8 @@ class ZipFile:
if zinfo.filename in self.NameToInfo:
import warnings
warnings.warn('Duplicate name: %r' % zinfo.filename, stacklevel=3)
- if self.mode not in ("w", "a"):
- raise RuntimeError('write() requires mode "w" or "a"')
+ if self.mode not in ('w', 'x', 'a'):
+ raise RuntimeError("write() requires mode 'w', 'x', or 'a'")
if not self.fp:
raise RuntimeError(
"Attempt to write ZIP archive that was already closed")
@@ -1346,66 +1453,79 @@ class ZipFile:
zinfo.file_size = st.st_size
zinfo.flag_bits = 0x00
- zinfo.header_offset = self.fp.tell() # Start of header bytes
- if zinfo.compress_type == ZIP_LZMA:
- # Compressed data includes an end-of-stream (EOS) marker
- zinfo.flag_bits |= 0x02
-
- self._writecheck(zinfo)
- self._didModify = True
-
- if isdir:
- zinfo.file_size = 0
- zinfo.compress_size = 0
- zinfo.CRC = 0
- zinfo.external_attr |= 0x10 # MS-DOS directory flag
+ with self._lock:
+ if self._seekable:
+ self.fp.seek(self.start_dir)
+ zinfo.header_offset = self.fp.tell() # Start of header bytes
+ if zinfo.compress_type == ZIP_LZMA:
+ # Compressed data includes an end-of-stream (EOS) marker
+ zinfo.flag_bits |= 0x02
+
+ self._writecheck(zinfo)
+ self._didModify = True
+
+ if isdir:
+ zinfo.file_size = 0
+ zinfo.compress_size = 0
+ zinfo.CRC = 0
+ zinfo.external_attr |= 0x10 # MS-DOS directory flag
+ self.filelist.append(zinfo)
+ self.NameToInfo[zinfo.filename] = zinfo
+ self.fp.write(zinfo.FileHeader(False))
+ self.start_dir = self.fp.tell()
+ return
+
+ cmpr = _get_compressor(zinfo.compress_type)
+ if not self._seekable:
+ zinfo.flag_bits |= 0x08
+ with open(filename, "rb") as fp:
+ # Must overwrite CRC and sizes with correct data later
+ zinfo.CRC = CRC = 0
+ zinfo.compress_size = compress_size = 0
+ # Compressed size can be larger than uncompressed size
+ zip64 = self._allowZip64 and \
+ zinfo.file_size * 1.05 > ZIP64_LIMIT
+ self.fp.write(zinfo.FileHeader(zip64))
+ file_size = 0
+ while 1:
+ buf = fp.read(1024 * 8)
+ if not buf:
+ break
+ file_size = file_size + len(buf)
+ CRC = crc32(buf, CRC)
+ if cmpr:
+ buf = cmpr.compress(buf)
+ compress_size = compress_size + len(buf)
+ self.fp.write(buf)
+ if cmpr:
+ buf = cmpr.flush()
+ compress_size = compress_size + len(buf)
+ self.fp.write(buf)
+ zinfo.compress_size = compress_size
+ else:
+ zinfo.compress_size = file_size
+ zinfo.CRC = CRC
+ zinfo.file_size = file_size
+ if zinfo.flag_bits & 0x08:
+ # Write CRC and file sizes after the file data
+ fmt = '<LQQ' if zip64 else '<LLL'
+ self.fp.write(struct.pack(fmt, zinfo.CRC, zinfo.compress_size,
+ zinfo.file_size))
+ self.start_dir = self.fp.tell()
+ else:
+ if not zip64 and self._allowZip64:
+ if file_size > ZIP64_LIMIT:
+ raise RuntimeError('File size has increased during compressing')
+ if compress_size > ZIP64_LIMIT:
+ raise RuntimeError('Compressed size larger than uncompressed size')
+ # Seek backwards and write file header (which will now include
+ # correct CRC and file sizes)
+ self.start_dir = self.fp.tell() # Preserve current position in file
+ self.fp.seek(zinfo.header_offset)
+ self.fp.write(zinfo.FileHeader(zip64))
+ self.fp.seek(self.start_dir)
self.filelist.append(zinfo)
self.NameToInfo[zinfo.filename] = zinfo
- self.fp.write(zinfo.FileHeader(False))
- return
-
- cmpr = _get_compressor(zinfo.compress_type)
- with open(filename, "rb") as fp:
- # Must overwrite CRC and sizes with correct data later
- zinfo.CRC = CRC = 0
- zinfo.compress_size = compress_size = 0
- # Compressed size can be larger than uncompressed size
- zip64 = self._allowZip64 and \
- zinfo.file_size * 1.05 > ZIP64_LIMIT
- self.fp.write(zinfo.FileHeader(zip64))
- file_size = 0
- while 1:
- buf = fp.read(1024 * 8)
- if not buf:
- break
- file_size = file_size + len(buf)
- CRC = crc32(buf, CRC) & 0xffffffff
- if cmpr:
- buf = cmpr.compress(buf)
- compress_size = compress_size + len(buf)
- self.fp.write(buf)
- if cmpr:
- buf = cmpr.flush()
- compress_size = compress_size + len(buf)
- self.fp.write(buf)
- zinfo.compress_size = compress_size
- else:
- zinfo.compress_size = file_size
- zinfo.CRC = CRC
- zinfo.file_size = file_size
- if not zip64 and self._allowZip64:
- if file_size > ZIP64_LIMIT:
- raise RuntimeError('File size has increased during compressing')
- if compress_size > ZIP64_LIMIT:
- raise RuntimeError('Compressed size larger than uncompressed size')
- # Seek backwards and write file header (which will now include
- # correct CRC and file sizes)
- position = self.fp.tell() # Preserve current position in file
- self.fp.seek(zinfo.header_offset, 0)
- self.fp.write(zinfo.FileHeader(zip64))
- self.fp.seek(position, 0)
- self.filelist.append(zinfo)
- self.NameToInfo[zinfo.filename] = zinfo
def writestr(self, zinfo_or_arcname, data, compress_type=None):
"""Write a file into the archive. The contents is 'data', which
@@ -1432,154 +1552,171 @@ class ZipFile:
"Attempt to write to ZIP archive that was already closed")
zinfo.file_size = len(data) # Uncompressed size
- zinfo.header_offset = self.fp.tell() # Start of header data
- if compress_type is not None:
- zinfo.compress_type = compress_type
- if zinfo.compress_type == ZIP_LZMA:
- # Compressed data includes an end-of-stream (EOS) marker
- zinfo.flag_bits |= 0x02
-
- self._writecheck(zinfo)
- self._didModify = True
- zinfo.CRC = crc32(data) & 0xffffffff # CRC-32 checksum
- co = _get_compressor(zinfo.compress_type)
- if co:
- data = co.compress(data) + co.flush()
- zinfo.compress_size = len(data) # Compressed size
- else:
- zinfo.compress_size = zinfo.file_size
- zip64 = zinfo.file_size > ZIP64_LIMIT or \
- zinfo.compress_size > ZIP64_LIMIT
- if zip64 and not self._allowZip64:
- raise LargeZipFile("Filesize would require ZIP64 extensions")
- self.fp.write(zinfo.FileHeader(zip64))
- self.fp.write(data)
- if zinfo.flag_bits & 0x08:
- # Write CRC and file sizes after the file data
- fmt = '<LQQ' if zip64 else '<LLL'
- self.fp.write(struct.pack(fmt, zinfo.CRC, zinfo.compress_size,
- zinfo.file_size))
- self.fp.flush()
- self.filelist.append(zinfo)
- self.NameToInfo[zinfo.filename] = zinfo
+ with self._lock:
+ if self._seekable:
+ self.fp.seek(self.start_dir)
+ zinfo.header_offset = self.fp.tell() # Start of header data
+ if compress_type is not None:
+ zinfo.compress_type = compress_type
+ zinfo.header_offset = self.fp.tell() # Start of header data
+ if compress_type is not None:
+ zinfo.compress_type = compress_type
+ if zinfo.compress_type == ZIP_LZMA:
+ # Compressed data includes an end-of-stream (EOS) marker
+ zinfo.flag_bits |= 0x02
+
+ self._writecheck(zinfo)
+ self._didModify = True
+ zinfo.CRC = crc32(data) # CRC-32 checksum
+ co = _get_compressor(zinfo.compress_type)
+ if co:
+ data = co.compress(data) + co.flush()
+ zinfo.compress_size = len(data) # Compressed size
+ else:
+ zinfo.compress_size = zinfo.file_size
+ zip64 = zinfo.file_size > ZIP64_LIMIT or \
+ zinfo.compress_size > ZIP64_LIMIT
+ if zip64 and not self._allowZip64:
+ raise LargeZipFile("Filesize would require ZIP64 extensions")
+ self.fp.write(zinfo.FileHeader(zip64))
+ self.fp.write(data)
+ if zinfo.flag_bits & 0x08:
+ # Write CRC and file sizes after the file data
+ fmt = '<LQQ' if zip64 else '<LLL'
+ self.fp.write(struct.pack(fmt, zinfo.CRC, zinfo.compress_size,
+ zinfo.file_size))
+ self.fp.flush()
+ self.start_dir = self.fp.tell()
+ self.filelist.append(zinfo)
+ self.NameToInfo[zinfo.filename] = zinfo
def __del__(self):
"""Call the "close()" method in case the user forgot."""
self.close()
def close(self):
- """Close the file, and for mode "w" and "a" write the ending
+ """Close the file, and for mode 'w', 'x' and 'a' write the ending
records."""
if self.fp is None:
return
try:
- if self.mode in ("w", "a") and self._didModify: # write ending records
- pos1 = self.fp.tell()
- for zinfo in self.filelist: # write central directory
- dt = zinfo.date_time
- dosdate = (dt[0] - 1980) << 9 | dt[1] << 5 | dt[2]
- dostime = dt[3] << 11 | dt[4] << 5 | (dt[5] // 2)
- extra = []
- if zinfo.file_size > ZIP64_LIMIT \
- or zinfo.compress_size > ZIP64_LIMIT:
- extra.append(zinfo.file_size)
- extra.append(zinfo.compress_size)
- file_size = 0xffffffff
- compress_size = 0xffffffff
- else:
- file_size = zinfo.file_size
- compress_size = zinfo.compress_size
+ if self.mode in ('w', 'x', 'a') and self._didModify: # write ending records
+ with self._lock:
+ if self._seekable:
+ self.fp.seek(self.start_dir)
+ self._write_end_record()
+ finally:
+ fp = self.fp
+ self.fp = None
+ self._fpclose(fp)
+
+ def _write_end_record(self):
+ for zinfo in self.filelist: # write central directory
+ dt = zinfo.date_time
+ dosdate = (dt[0] - 1980) << 9 | dt[1] << 5 | dt[2]
+ dostime = dt[3] << 11 | dt[4] << 5 | (dt[5] // 2)
+ extra = []
+ if zinfo.file_size > ZIP64_LIMIT \
+ or zinfo.compress_size > ZIP64_LIMIT:
+ extra.append(zinfo.file_size)
+ extra.append(zinfo.compress_size)
+ file_size = 0xffffffff
+ compress_size = 0xffffffff
+ else:
+ file_size = zinfo.file_size
+ compress_size = zinfo.compress_size
- if zinfo.header_offset > ZIP64_LIMIT:
- extra.append(zinfo.header_offset)
- header_offset = 0xffffffff
- else:
- header_offset = zinfo.header_offset
+ if zinfo.header_offset > ZIP64_LIMIT:
+ extra.append(zinfo.header_offset)
+ header_offset = 0xffffffff
+ else:
+ header_offset = zinfo.header_offset
- extra_data = zinfo.extra
- min_version = 0
- if extra:
- # Append a ZIP64 field to the extra's
- extra_data = struct.pack(
- '<HH' + 'Q'*len(extra),
- 1, 8*len(extra), *extra) + extra_data
+ extra_data = zinfo.extra
+ min_version = 0
+ if extra:
+ # Append a ZIP64 field to the extra's
+ extra_data = struct.pack(
+ '<HH' + 'Q'*len(extra),
+ 1, 8*len(extra), *extra) + extra_data
- min_version = ZIP64_VERSION
+ min_version = ZIP64_VERSION
- if zinfo.compress_type == ZIP_BZIP2:
- min_version = max(BZIP2_VERSION, min_version)
- elif zinfo.compress_type == ZIP_LZMA:
- min_version = max(LZMA_VERSION, min_version)
+ if zinfo.compress_type == ZIP_BZIP2:
+ min_version = max(BZIP2_VERSION, min_version)
+ elif zinfo.compress_type == ZIP_LZMA:
+ min_version = max(LZMA_VERSION, min_version)
- extract_version = max(min_version, zinfo.extract_version)
- create_version = max(min_version, zinfo.create_version)
- try:
- filename, flag_bits = zinfo._encodeFilenameFlags()
- centdir = struct.pack(structCentralDir,
- stringCentralDir, create_version,
- zinfo.create_system, extract_version, zinfo.reserved,
- flag_bits, zinfo.compress_type, dostime, dosdate,
- zinfo.CRC, compress_size, file_size,
- len(filename), len(extra_data), len(zinfo.comment),
- 0, zinfo.internal_attr, zinfo.external_attr,
- header_offset)
- except DeprecationWarning:
- print((structCentralDir, stringCentralDir, create_version,
- zinfo.create_system, extract_version, zinfo.reserved,
- zinfo.flag_bits, zinfo.compress_type, dostime, dosdate,
- zinfo.CRC, compress_size, file_size,
- len(zinfo.filename), len(extra_data), len(zinfo.comment),
- 0, zinfo.internal_attr, zinfo.external_attr,
- header_offset), file=sys.stderr)
- raise
- self.fp.write(centdir)
- self.fp.write(filename)
- self.fp.write(extra_data)
- self.fp.write(zinfo.comment)
-
- pos2 = self.fp.tell()
- # Write end-of-zip-archive record
- centDirCount = len(self.filelist)
- centDirSize = pos2 - pos1
- centDirOffset = pos1
- requires_zip64 = None
- if centDirCount > ZIP_FILECOUNT_LIMIT:
- requires_zip64 = "Files count"
- elif centDirOffset > ZIP64_LIMIT:
- requires_zip64 = "Central directory offset"
- elif centDirSize > ZIP64_LIMIT:
- requires_zip64 = "Central directory size"
- if requires_zip64:
- # Need to write the ZIP64 end-of-archive records
- if not self._allowZip64:
- raise LargeZipFile(requires_zip64 +
- " would require ZIP64 extensions")
- zip64endrec = struct.pack(
- structEndArchive64, stringEndArchive64,
- 44, 45, 45, 0, 0, centDirCount, centDirCount,
- centDirSize, centDirOffset)
- self.fp.write(zip64endrec)
-
- zip64locrec = struct.pack(
- structEndArchive64Locator,
- stringEndArchive64Locator, 0, pos2, 1)
- self.fp.write(zip64locrec)
- centDirCount = min(centDirCount, 0xFFFF)
- centDirSize = min(centDirSize, 0xFFFFFFFF)
- centDirOffset = min(centDirOffset, 0xFFFFFFFF)
-
- endrec = struct.pack(structEndArchive, stringEndArchive,
- 0, 0, centDirCount, centDirCount,
- centDirSize, centDirOffset, len(self._comment))
- self.fp.write(endrec)
- self.fp.write(self._comment)
- self.fp.flush()
- finally:
- fp = self.fp
- self.fp = None
- if not self._filePassed:
- fp.close()
+ extract_version = max(min_version, zinfo.extract_version)
+ create_version = max(min_version, zinfo.create_version)
+ try:
+ filename, flag_bits = zinfo._encodeFilenameFlags()
+ centdir = struct.pack(structCentralDir,
+ stringCentralDir, create_version,
+ zinfo.create_system, extract_version, zinfo.reserved,
+ flag_bits, zinfo.compress_type, dostime, dosdate,
+ zinfo.CRC, compress_size, file_size,
+ len(filename), len(extra_data), len(zinfo.comment),
+ 0, zinfo.internal_attr, zinfo.external_attr,
+ header_offset)
+ except DeprecationWarning:
+ print((structCentralDir, stringCentralDir, create_version,
+ zinfo.create_system, extract_version, zinfo.reserved,
+ zinfo.flag_bits, zinfo.compress_type, dostime, dosdate,
+ zinfo.CRC, compress_size, file_size,
+ len(zinfo.filename), len(extra_data), len(zinfo.comment),
+ 0, zinfo.internal_attr, zinfo.external_attr,
+ header_offset), file=sys.stderr)
+ raise
+ self.fp.write(centdir)
+ self.fp.write(filename)
+ self.fp.write(extra_data)
+ self.fp.write(zinfo.comment)
+
+ pos2 = self.fp.tell()
+ # Write end-of-zip-archive record
+ centDirCount = len(self.filelist)
+ centDirSize = pos2 - self.start_dir
+ centDirOffset = self.start_dir
+ requires_zip64 = None
+ if centDirCount > ZIP_FILECOUNT_LIMIT:
+ requires_zip64 = "Files count"
+ elif centDirOffset > ZIP64_LIMIT:
+ requires_zip64 = "Central directory offset"
+ elif centDirSize > ZIP64_LIMIT:
+ requires_zip64 = "Central directory size"
+ if requires_zip64:
+ # Need to write the ZIP64 end-of-archive records
+ if not self._allowZip64:
+ raise LargeZipFile(requires_zip64 +
+ " would require ZIP64 extensions")
+ zip64endrec = struct.pack(
+ structEndArchive64, stringEndArchive64,
+ 44, 45, 45, 0, 0, centDirCount, centDirCount,
+ centDirSize, centDirOffset)
+ self.fp.write(zip64endrec)
+
+ zip64locrec = struct.pack(
+ structEndArchive64Locator,
+ stringEndArchive64Locator, 0, pos2, 1)
+ self.fp.write(zip64locrec)
+ centDirCount = min(centDirCount, 0xFFFF)
+ centDirSize = min(centDirSize, 0xFFFFFFFF)
+ centDirOffset = min(centDirOffset, 0xFFFFFFFF)
+
+ endrec = struct.pack(structEndArchive, stringEndArchive,
+ 0, 0, centDirCount, centDirCount,
+ centDirSize, centDirOffset, len(self._comment))
+ self.fp.write(endrec)
+ self.fp.write(self._comment)
+ self.fp.flush()
+
+ def _fpclose(self, fp):
+ assert self._fileRefCnt > 0
+ self._fileRefCnt -= 1
+ if not self._fileRefCnt and not self._filePassed:
+ fp.close()
class PyZipFile(ZipFile):
@@ -1599,7 +1736,7 @@ class PyZipFile(ZipFile):
the modules into the archive. If pathname is a plain
directory, listdir *.py and enter all modules. Else, pathname
must be a Python *.py file and the module will be put into the
- archive. Added modules are always module.pyo or module.pyc.
+ archive. Added modules are always module.pyc.
This method will compile the module.py into module.pyc if
necessary.
If filterfunc(pathname) is given, it is called with every argument.
@@ -1692,46 +1829,59 @@ class PyZipFile(ZipFile):
file_py = pathname + ".py"
file_pyc = pathname + ".pyc"
- file_pyo = pathname + ".pyo"
- pycache_pyc = importlib.util.cache_from_source(file_py, True)
- pycache_pyo = importlib.util.cache_from_source(file_py, False)
+ pycache_opt0 = importlib.util.cache_from_source(file_py, optimization='')
+ pycache_opt1 = importlib.util.cache_from_source(file_py, optimization=1)
+ pycache_opt2 = importlib.util.cache_from_source(file_py, optimization=2)
if self._optimize == -1:
# legacy mode: use whatever file is present
- if (os.path.isfile(file_pyo) and
- os.stat(file_pyo).st_mtime >= os.stat(file_py).st_mtime):
- # Use .pyo file.
- arcname = fname = file_pyo
- elif (os.path.isfile(file_pyc) and
+ if (os.path.isfile(file_pyc) and
os.stat(file_pyc).st_mtime >= os.stat(file_py).st_mtime):
# Use .pyc file.
arcname = fname = file_pyc
- elif (os.path.isfile(pycache_pyc) and
- os.stat(pycache_pyc).st_mtime >= os.stat(file_py).st_mtime):
+ elif (os.path.isfile(pycache_opt0) and
+ os.stat(pycache_opt0).st_mtime >= os.stat(file_py).st_mtime):
# Use the __pycache__/*.pyc file, but write it to the legacy pyc
# file name in the archive.
- fname = pycache_pyc
+ fname = pycache_opt0
arcname = file_pyc
- elif (os.path.isfile(pycache_pyo) and
- os.stat(pycache_pyo).st_mtime >= os.stat(file_py).st_mtime):
- # Use the __pycache__/*.pyo file, but write it to the legacy pyo
+ elif (os.path.isfile(pycache_opt1) and
+ os.stat(pycache_opt1).st_mtime >= os.stat(file_py).st_mtime):
+ # Use the __pycache__/*.pyc file, but write it to the legacy pyc
+ # file name in the archive.
+ fname = pycache_opt1
+ arcname = file_pyc
+ elif (os.path.isfile(pycache_opt2) and
+ os.stat(pycache_opt2).st_mtime >= os.stat(file_py).st_mtime):
+ # Use the __pycache__/*.pyc file, but write it to the legacy pyc
# file name in the archive.
- fname = pycache_pyo
- arcname = file_pyo
+ fname = pycache_opt2
+ arcname = file_pyc
else:
# Compile py into PEP 3147 pyc file.
if _compile(file_py):
- fname = (pycache_pyc if __debug__ else pycache_pyo)
- arcname = (file_pyc if __debug__ else file_pyo)
+ if sys.flags.optimize == 0:
+ fname = pycache_opt0
+ elif sys.flags.optimize == 1:
+ fname = pycache_opt1
+ else:
+ fname = pycache_opt2
+ arcname = file_pyc
else:
fname = arcname = file_py
else:
# new mode: use given optimization level
if self._optimize == 0:
- fname = pycache_pyc
+ fname = pycache_opt0
arcname = file_pyc
else:
- fname = pycache_pyo
- arcname = file_pyo
+ arcname = file_pyc
+ if self._optimize == 1:
+ fname = pycache_opt1
+ elif self._optimize == 2:
+ fname = pycache_opt2
+ else:
+ msg = "invalid value for 'optimize': {!r}".format(self._optimize)
+ raise ValueError(msg)
if not (os.path.isfile(fname) and
os.stat(fname).st_mtime >= os.stat(file_py).st_mtime):
if not _compile(file_py, optimize=self._optimize):
diff --git a/Mac/BuildScript/README.txt b/Mac/BuildScript/README.txt
index db687be7c5..f8b25fa5af 100644
--- a/Mac/BuildScript/README.txt
+++ b/Mac/BuildScript/README.txt
@@ -1,25 +1,15 @@
Building a Python Mac OS X distribution
=======================================
-The ``build-installer.py`` script creates Python distributions, including
-certain third-party libraries as necessary. It builds a complete
-framework-based Python out-of-tree, installs it in a funny place with
-$DESTROOT, massages that installation to remove .pyc files and such, creates
-an Installer package from the installation plus other files in ``resources``
+The ``build-install.py`` script creates Python distributions, including
+certain third-party libraries as necessary. It builds a complete
+framework-based Python out-of-tree, installs it in a funny place with
+$DESTROOT, massages that installation to remove .pyc files and such, creates
+an Installer package from the installation plus other files in ``resources``
and ``scripts`` and placed that on a ``.dmg`` disk image.
-This installers built by this script are legacy bundle installers that have
-been supported from the early days of OS X. In particular, they are supported
-on OS X 10.3.9, the earliest supported release for builds from this script.
-
-Beginning with Python 3.4.2, PSF practice is to build two installer variants
-using the newer flat package format, supported on 10.5+, and signed with the
-builder's Apple developer key, allowing downloaded packages to satisfy Apple's
-default Gatekeeper policy (e.g. starting with 10.8, Apple store downloads and
-Apple developer ID signed apps and installer packages). The process for
-transforming the output build artifacts into signed flat packages is not
-yet integrated into ``build-installer.py``. The steps prior to the flat
-package creation are the same as for 3.4.1 below.
+For Python 3.4.0, PSF practice is to build two installer variants
+for each release.
1. 32-bit-only, i386 and PPC universal, capable on running on all machines
supported by Mac OS X 10.5 through (at least) 10.9::
@@ -31,7 +21,6 @@ package creation are the same as for 3.4.1 below.
- builds the following third-party libraries
- * libcrypto and libssl from OpenSSL 1.0.1 (new, as of 3.4.3)
* NCurses 5.9 (http://bugs.python.org/issue15037)
* SQLite 3.8.11
* XZ 5.0.5
@@ -73,7 +62,6 @@ package creation are the same as for 3.4.1 below.
- uses system-supplied versions of third-party libraries
- * libcrypto and libssl from Apple OpenSSL 0.9.8
* readline module links with Apple BSD editline (libedit)
- requires ActiveState Tcl/Tk 8.5.15.1 (or later) to be installed for building
@@ -102,6 +90,47 @@ package creation are the same as for 3.4.1 below.
that the Xcode 3 gcc-4.2 compiler has had.
+* For Python 2.7.x and 3.2.x, the 32-bit-only installer was configured to
+ support Mac OS X 10.3.9 through (at least) 10.6. Because it is
+ believed that there are few systems still running OS X 10.3 or 10.4
+ and because it has become increasingly difficult to test and
+ support the differences in these earlier systems, as of Python 3.3.0 the PSF
+ 32-bit installer no longer supports them. For reference in building such
+ an installer yourself, the details are::
+
+ /usr/bin/python build-installer.py \
+ --sdk-path=/Developer/SDKs/MacOSX10.4u.sdk \
+ --universal-archs=32-bit \
+ --dep-target=10.3
+
+ - builds the following third-party libraries
+
+ * Bzip2
+ * NCurses
+ * GNU Readline (GPL)
+ * SQLite 3
+ * XZ
+ * Zlib 1.2.3
+ * Oracle Sleepycat DB 4.8 (Python 2.x only)
+
+ - requires ActiveState ``Tcl/Tk 8.4`` (currently 8.4.20) to be installed for building
+
+ - recommended build environment:
+
+ * Mac OS X 10.5.8 PPC or Intel
+ * Xcode 3.1.4 (or later)
+ * ``MacOSX10.4u`` SDK (later SDKs do not support PPC G3 processors)
+ * ``MACOSX_DEPLOYMENT_TARGET=10.3``
+ * Apple ``gcc-4.0``
+ * system Python 2.5 for documentation build with Sphinx
+
+ - alternate build environments:
+
+ * Mac OS X 10.6.8 with Xcode 3.2.6
+ - need to change ``/System/Library/Frameworks/{Tcl,Tk}.framework/Version/Current`` to ``8.4``
+
+
+
General Prerequisites
---------------------
@@ -145,7 +174,7 @@ Here are the steps you need to follow to build a Python installer:
Building other universal installers
...................................
-It is also possible to build a 4-way universal installer that runs on
+It is also possible to build a 4-way universal installer that runs on
OS X 10.5 Leopard or later::
/usr/bin/python /build-installer.py \
@@ -179,7 +208,7 @@ a PPC G4 system with OS X 10.5 and at least one Intel system running OS X
/usr/local/bin/pythonn.n -m test -w -u all,-largefile
/usr/local/bin/pythonn.n-32 -m test -w -u all
-
+
Certain tests will be skipped and some cause the interpreter to fail
which will likely generate ``Python quit unexpectedly`` alert messages
to be generated at several points during a test run. These are normal
diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py
index 1d469bb8f7..d09da2f2f3 100755
--- a/Mac/BuildScript/build-installer.py
+++ b/Mac/BuildScript/build-installer.py
@@ -206,7 +206,7 @@ def library_recipes():
LT_10_5 = bool(getDeptargetTuple() < (10, 5))
- if getDeptargetTuple() < (10, 6):
+ if not (10, 5) < getDeptargetTuple() < (10, 10):
# The OpenSSL libs shipped with OS X 10.5 and earlier are
# hopelessly out-of-date and do not include Apple's tie-in to
# the root certificates in the user and system keychains via TEA
@@ -226,7 +226,8 @@ def library_recipes():
# now more obvious with cert checking enabled by default in the
# standard library.
#
- # For builds with 10.6+ SDKs, continue to use the deprecated but
+ # For builds with 10.6 through 10.9 SDKs,
+ # continue to use the deprecated but
# less out-of-date Apple 0.9.8 libs for now. While they are less
# secure than using an up-to-date 1.0.1 version, doing so
# avoids the big problems of forcing users to have to manage
@@ -234,12 +235,16 @@ def library_recipes():
# APIs for cert validation from keychains if validation using the
# standard OpenSSL locations (/System/Library/OpenSSL, normally empty)
# fails.
+ #
+ # Since Apple removed the header files for the deprecated system
+ # OpenSSL as of the Xcode 7 release (for OS X 10.10+), we do not
+ # have much choice but to build our own copy here, too.
result.extend([
dict(
- name="OpenSSL 1.0.2e",
- url="https://www.openssl.org/source/openssl-1.0.2e.tar.gz",
- checksum='5262bfa25b60ed9de9f28d5d52d77fc5',
+ name="OpenSSL 1.0.2h",
+ url="https://www.openssl.org/source/openssl-1.0.2h.tar.gz",
+ checksum='9392e65072ce4b614c1392eefc1f23d0',
patches=[
"openssl_sdk_makedepend.patch",
],
@@ -572,7 +577,7 @@ def getTclTkVersion(configfile, versionline):
"""
try:
f = open(configfile, "r")
- except:
+ except OSError:
fatal("Framework configuration file not found: %s" % configfile)
for l in f:
@@ -814,7 +819,7 @@ def downloadURL(url, fname):
except:
try:
os.unlink(fname)
- except:
+ except OSError:
pass
def verifyThirdPartyFile(url, checksum, fname):
diff --git a/Mac/BuildScript/openssl_sdk_makedepend.patch b/Mac/BuildScript/openssl_sdk_makedepend.patch
index 85bd69be4c..96a88413c8 100644
--- a/Mac/BuildScript/openssl_sdk_makedepend.patch
+++ b/Mac/BuildScript/openssl_sdk_makedepend.patch
@@ -1,18 +1,17 @@
# HG changeset patch
-# Parent ff8a7557607cffd626997e57ed31c1012a3018aa
+# Parent d377390f787c0739a3e89f669def72d7167e5108
# openssl_sdk_makedepend.patch
#
-# using openssl 1.0.2e
+# using openssl 1.0.2f
#
# - support building with an OS X SDK
-# - allow "make depend" to use compilers with names other than "gcc"
diff Configure
diff --git a/Configure b/Configure
--- a/Configure
+++ b/Configure
-@@ -635,12 +635,12 @@
+@@ -638,12 +638,12 @@
##### MacOS X (a.k.a. Rhapsody or Darwin) setup
"rhapsody-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown):MACOSX_RHAPSODY::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}::",
@@ -31,7 +30,7 @@ diff --git a/Configure b/Configure
"debug-darwin-ppc-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DB_ENDIAN -g -Wall -O::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${ppc32_asm}:osx32:dlfcn:darwin-shared:-fPIC:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
# iPhoneOS/iOS
"iphoneos-cross","llvm-gcc:-O3 -isysroot \$(CROSS_TOP)/SDKs/\$(CROSS_SDK) -fomit-frame-pointer -fno-common::-D_REENTRANT:iOS:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
-@@ -1714,8 +1714,7 @@
+@@ -1717,8 +1717,7 @@
s/^CC=.*$/CC= $cc/;
s/^AR=\s*ar/AR= $ar/;
s/^RANLIB=.*/RANLIB= $ranlib/;
@@ -41,16 +40,3 @@ diff --git a/Configure b/Configure
}
s/^CFLAG=.*$/CFLAG= $cflags/;
s/^DEPFLAG=.*$/DEPFLAG=$depflags/;
-diff --git a/util/domd b/util/domd
---- a/util/domd
-+++ b/util/domd
-@@ -14,8 +14,7 @@
- cp Makefile Makefile.save
- # fake the presence of Kerberos
- touch $TOP/krb5.h
--if ${MAKEDEPEND} --version 2>&1 | grep -q "clang" ||
-- echo $MAKEDEPEND | grep -q "gcc"; then
-+if true ; then
- args=""
- while [ $# -gt 0 ]; do
- if [ "$1" != "--" ]; then args="$args $1"; fi
diff --git a/Mac/BuildScript/resources/ReadMe.rtf b/Mac/BuildScript/resources/ReadMe.rtf
index 52d8b807be..65e3f14cd3 100644
--- a/Mac/BuildScript/resources/ReadMe.rtf
+++ b/Mac/BuildScript/resources/ReadMe.rtf
@@ -1,4 +1,4 @@
-{\rtf1\ansi\ansicpg1252\cocoartf1347\cocoasubrtf570
+{\rtf1\ansi\ansicpg1252\cocoartf1348\cocoasubrtf170
{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fmodern\fcharset0 CourierNewPSMT;}
{\colortbl;\red255\green255\blue255;}
\margl1440\margr1440\vieww13380\viewh14600\viewkind0
@@ -24,7 +24,7 @@ Python.org provides two installer variants for download: one that installs a
\i0 variant. Unless you are installing to an 10.5 system or you need to build applications that can run on 10.5 systems, use the 10.6 variant if possible. There are some additional operating system functions that are supported starting with 10.6 and you may see better performance using 64-bit mode. By default, Python will automatically run in 64-bit mode if your system supports it. Also see
\i Certificate verification and OpenSSL
\i0 below. The Pythons installed by these installers are built with private copies of some third-party libraries not included with or newer than those in OS X itself. The list of these libraries varies by installer variant and is included at the end of the License.rtf file.
-\b \ul \ulc0 \
+\b \ul \
\
Update your version of Tcl/Tk to use IDLE or other Tk applications
\b0 \ulnone \
@@ -36,75 +36,16 @@ To use IDLE or other programs that use the Tkinter graphical user interface tool
\i0 for this version of Python and of Mac OS X.\
\b \ul \
-Installing on OS X 10.8 (Mountain Lion) or later systems\
-\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
-\cf0 \ulnone [CHANGED for Python 3.4.2]
-\b0 \
-\
-As of Python 3.4.2, installer packages from python.org are now compatible with the Gatekeeper security feature introduced in OS X 10.8. Downloaded packages can now be directly installed by double-clicking with the default system security settings. Python.org installer packages for OS X are signed with the Developer ID of the builder, as identified on {\field{\*\fldinst{HYPERLINK "https://www.python.org/downloads/"}}{\fldrslt the download page}} for this release. To inspect the digital signature of the package, click on the lock icon in the upper right corner of the
-\i Install Python
-\i0 installer window. Refer to Apple\'92s support pages for {\field{\*\fldinst{HYPERLINK "http://support.apple.com/kb/ht5290"}}{\fldrslt more information on Gatekeeper}}.\
-\
-\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
-
-\b \cf0 \ul Simplified web-based installs\
-\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
-\cf0 \ulnone [NEW for Python 3.4.2]
-\b0 \
-\
-With the change to the newer flat format installer package, the download file now has a
-\f1 .pkg
-\f0 extension as it is no longer necessary to embed the installer within a disk image (
-\f1 .dmg
-\f0 ) container. If you download the Python installer through a web browser, the OS X installer application may open automatically to allow you to perform the install. If your browser settings do not allow automatic open, double click on the downloaded installer file.\
-\
-\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+Certificate verification and OpenSSL\
-\b \cf0 \ul New Installation Options and Defaults\
-\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
-\cf0 \ulnone [NEW for Python 3.4.0]
-\b0 \
-\
-The Python installer now includes an option to automatically install or upgrade
-\f1 pip
-\f0 , a tool for installing and managing Python packages. This option is enabled by default and no Internet access is required. If you do not want the installer to do this, select the
-\i Customize
-\i0 option at the
-\i Installation Type
-\i0 step and uncheck the
-\i Install or ugprade pip
-\i0 option.\
-\
-To make it easier to use scripts installed by third-party Python packages, with
-\f1 pip
-\f0 or by other means, the
-\i Shell profile updater
-\i0 option is now enabled by default, as has been the case with Python 2.7.x installers. You can also turn this option off by selecting
-\i Customize
-\i0 and unchecking the
-\i Shell profile updater
-\i0 option. You can also update your shell profile later by launching the
-\i Update Shell Profile
-\i0 command found in the
-\f1 /Applications/Python $VERSION
-\f0 folder. You may need to start a new terminal window for the changes to take effect.\
-\
-For other changes in this release, see the Release Notes link for this release at {\field{\*\fldinst{HYPERLINK "https://www.python.org/downloads/"}}{\fldrslt https://www.python.org/downloads/}}.\
-\
-\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
-
-\b \cf0 \ul Certificate verification and OpenSSL\
-\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
-\cf0 \ulnone [CHANGED for Python 3.4.3]
-\b0 \
-\
-Python 3.4.3 includes a number of network security enhancements that have been approved for inclusion in Python 3.4 maintenance releases. {\field{\*\fldinst{HYPERLINK "https://www.python.org/dev/peps/pep-0476/"}}{\fldrslt PEP 476}} changes several standard library modules, like
+\b0 \ulnone \
+Python 3.5 includes a number of network security enhancements that were released in Python 3.4.3 and Python 2.7.10. {\field{\*\fldinst{HYPERLINK "https://www.python.org/dev/peps/pep-0476/"}}{\fldrslt PEP 476}} changes several standard library modules, like
\i httplib
\i0 ,
\i urllib
\i0 , and
\i xmlrpclib
-\i0 , to by default verify certificates presented by servers over secure (TLS) connections. The verification is performed by the OpenSSL libraries that Python is linked to. Prior to 3.4.3, the python.org installers dynamically linked with Apple-supplied OpenSSL libraries shipped with OS X. OS X provides a multiple level security framework that stores trust certificates in system and user keychains managed by the
+\i0 , to by default verify certificates presented by servers over secure (TLS) connections. The verification is performed by the OpenSSL libraries that Python is linked to. Prior to 3.4.3, both python.org installers dynamically linked with Apple-supplied OpenSSL libraries shipped with OS X. OS X provides a multiple level security framework that stores trust certificates in system and user keychains managed by the
\i Keychain Access
\i0 application and the
\i security
@@ -122,10 +63,10 @@ For OS X 10.5, Apple provides
\f1 /System/Library/OpenSSL
\f0 . These directories are typically empty and not managed by OS X; you must manage them yourself or supply your own SSL contexts. OpenSSL 0.9.7 is obsolete by current security standards, lacking a number of important features found in later versions. Among the problems this causes is the inability to verify higher-security certificates now used by python.org services, including
\i t{\field{\*\fldinst{HYPERLINK "https://pypi.python.org/pypi"}}{\fldrslt he Python Package Index, PyPI}}
-\i0 . To solve this problem, as of 3.4.3 the
+\i0 . To solve this problem, the
\i 10.5+ 32-bit-only python.org variant
\i0 is linked with a private copy of
-\i OpenSSL 1.0
+\i OpenSSL 1.0.2
\i0 ; it consults the same default certificate directory,
\f1 /System/Library/OpenSSL
\f0 . As before, it is still necessary to manage certificates yourself when you use this Python variant and, with certificate verification now enabled by default, you may now need to take additional steps to ensure your Python programs have access to CA certificates you trust. If you use this Python variant to build standalone applications with third-party tools like {\field{\*\fldinst{HYPERLINK "https://pypi.python.org/pypi/py2app/"}}{\fldrslt
@@ -137,7 +78,7 @@ For OS X 10.6+, Apple also provides
\i 0.9.8 libraries
\i0 . Apple's 0.9.8 version includes an important additional feature: if a certificate cannot be verified using the manually administered certificates in
\f1 /System/Library/OpenSSL
-\f0 , the certificates managed by the system security framework In the user and system keychains are also consulted (using Apple private APIs). For this reason, for 3.4.3 the
+\f0 , the certificates managed by the system security framework In the user and system keychains are also consulted (using Apple private APIs). For this reason, the
\i 64-bit/32-bit 10.6+ python.org variant
\i0 continues to be dynamically linked with Apple's OpenSSL 0.9.8 since it was felt that the loss of the system-provided certificates and management tools outweighs the additional security features provided by newer versions of OpenSSL. This will likely change in future releases of the python.org installers as Apple has deprecated use of the system-supplied OpenSSL libraries. If you do need features from newer versions of OpenSSL, there are third-party OpenSSL wrapper packages available through
\i PyPI
@@ -145,7 +86,18 @@ For OS X 10.6+, Apple also provides
\
The bundled
\f1 pip
-\f0 included with 3.4.3 has its own default certificate store for verifying download connections.\
+\f0 included with the Python 3.5 installers has its own default certificate store for verifying download connections.\
+\
+
+\b \ul Other changes\
+
+\b0 \ulnone \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
+\cf0 For other changes in this release, see the
+\i What's new
+\i0 section in the {\field{\*\fldinst{HYPERLINK "https://www.python.org/doc/"}}{\fldrslt Documentation Set}} for this release and its
+\i Release Notes
+\i0 link at {\field{\*\fldinst{HYPERLINK "https://www.python.org/downloads/"}}{\fldrslt https://www.python.org/downloads/}}.\
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural
\b \cf0 \ul \
diff --git a/Mac/BuildScript/resources/Welcome.rtf b/Mac/BuildScript/resources/Welcome.rtf
index 25277874db..dfb75d854d 100644
--- a/Mac/BuildScript/resources/Welcome.rtf
+++ b/Mac/BuildScript/resources/Welcome.rtf
@@ -1,5 +1,5 @@
{\rtf1\ansi\ansicpg1252\cocoartf1343\cocoasubrtf160
-\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fmodern\fcharset0 CourierNewPSMT;}
+\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\paperw11905\paperh16837\margl1440\margr1440\vieww12200\viewh10880\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
@@ -17,12 +17,6 @@
\b0 .\
\
-\b NEW for Python 3.4.3:
-\b0 3.4.3 includes network security enhancements that may require changes to your Python applications. See the
-\f1 ReadMe
-\f0 file and {\field{\*\fldinst{HYPERLINK "https://docs.python.org/3/whatsnew/3.4.html#changed-in-3-4-3"}}{\fldrslt the Python documentation}} for more information.\
-\
-
\b IMPORTANT:
\b0
\b IDLE
diff --git a/Mac/BuildScript/scripts/postflight.ensurepip b/Mac/BuildScript/scripts/postflight.ensurepip
index bf893d1da6..3074fa36fc 100755
--- a/Mac/BuildScript/scripts/postflight.ensurepip
+++ b/Mac/BuildScript/scripts/postflight.ensurepip
@@ -10,15 +10,15 @@ RELFWKBIN="../../..${FWK}/bin"
umask 022
-"${FWK}/bin/python${PYVER}" -m ensurepip --upgrade
+"${FWK}/bin/python${PYVER}" -E -s -m ensurepip --upgrade
-"${FWK}/bin/python${PYVER}" -Wi \
- "${FWK}/lib/python${PYVER}/compileall.py" \
+"${FWK}/bin/python${PYVER}" -E -s -Wi \
+ "${FWK}/lib/python${PYVER}/compileall.py" -q -j0 \
-f -x badsyntax \
"${FWK}/lib/python${PYVER}/site-packages"
-"${FWK}/bin/python${PYVER}" -Wi -O \
- "${FWK}/lib/python${PYVER}/compileall.py" \
+"${FWK}/bin/python${PYVER}" -E -s -Wi -O \
+ "${FWK}/lib/python${PYVER}/compileall.py" -q -j0 \
-f -x badsyntax \
"${FWK}/lib/python${PYVER}/site-packages"
diff --git a/Mac/BuildScript/scripts/postflight.framework b/Mac/BuildScript/scripts/postflight.framework
index eb082979be..0f2e52c4ca 100755
--- a/Mac/BuildScript/scripts/postflight.framework
+++ b/Mac/BuildScript/scripts/postflight.framework
@@ -6,23 +6,23 @@
PYVER="@PYVER@"
FWK="/Library/Frameworks/Python.framework/Versions/@PYVER@"
-"${FWK}/bin/python@PYVER@" -Wi \
- "${FWK}/lib/python${PYVER}/compileall.py" \
+"${FWK}/bin/python@PYVER@" -E -s -Wi \
+ "${FWK}/lib/python${PYVER}/compileall.py" -q -j0 \
-f -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
"${FWK}/lib/python${PYVER}"
-"${FWK}/bin/python@PYVER@" -Wi -O \
- "${FWK}/lib/python${PYVER}/compileall.py" \
+"${FWK}/bin/python@PYVER@" -E -s -Wi -O \
+ "${FWK}/lib/python${PYVER}/compileall.py" -q -j0 \
-f -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
"${FWK}/lib/python${PYVER}"
-"${FWK}/bin/python@PYVER@" -Wi \
- "${FWK}/lib/python${PYVER}/compileall.py" \
+"${FWK}/bin/python@PYVER@" -E -s -Wi \
+ "${FWK}/lib/python${PYVER}/compileall.py" -q -j0 \
-f -x badsyntax \
"${FWK}/lib/python${PYVER}/site-packages"
-"${FWK}/bin/python@PYVER@" -Wi -O \
- "${FWK}/lib/python${PYVER}/compileall.py" \
+"${FWK}/bin/python@PYVER@" -E -s -Wi -O \
+ "${FWK}/lib/python${PYVER}/compileall.py" -q -j0 \
-f -x badsyntax \
"${FWK}/lib/python${PYVER}/site-packages"
diff --git a/Mac/BuildScript/scripts/postflight.patch-profile b/Mac/BuildScript/scripts/postflight.patch-profile
index 36d0a3e40e..0a62e327f5 100755
--- a/Mac/BuildScript/scripts/postflight.patch-profile
+++ b/Mac/BuildScript/scripts/postflight.patch-profile
@@ -58,7 +58,7 @@ case "${BSH}" in
fi
echo "" >> "${RC}"
echo "# Setting PATH for Python ${PYVER}" >> "${RC}"
- echo "# The orginal version is saved in .cshrc.pysave" >> "${RC}"
+ echo "# The original version is saved in .cshrc.pysave" >> "${RC}"
echo "set path=(${PYTHON_ROOT}/bin "'$path'")" >> "${RC}"
if [ `id -ur` = 0 ]; then
chown "${USER}" "${RC}"
@@ -90,7 +90,7 @@ if [ -f "${PR}" ]; then
fi
echo "" >> "${PR}"
echo "# Setting PATH for Python ${PYVER}" >> "${PR}"
-echo "# The orginal version is saved in `basename ${PR}`.pysave" >> "${PR}"
+echo "# The original version is saved in `basename ${PR}`.pysave" >> "${PR}"
echo 'PATH="'"${PYTHON_ROOT}/bin"':${PATH}"' >> "${PR}"
echo 'export PATH' >> "${PR}"
if [ `id -ur` = 0 ]; then
diff --git a/Mac/Makefile.in b/Mac/Makefile.in
index 03ec738e34..1255b13b42 100644
--- a/Mac/Makefile.in
+++ b/Mac/Makefile.in
@@ -1,5 +1,5 @@
-# This file can be invoked from the various frameworkinstall... targets in the
-# main Makefile. The next couple of variables are overridden on the
+# This file can be invoked from the various frameworkinstall... targets in the
+# main Makefile. The next couple of variables are overridden on the
# commandline in that case.
VERSION=@VERSION@
@@ -53,7 +53,7 @@ compileall=$(srcdir)/../Lib/compileall.py
installapps: install_Python install_PythonLauncher install_IDLE
#
-# Install unix tools in /usr/local/bin. These are just aliases for the
+# Install unix tools in /usr/local/bin. These are just aliases for the
# actual installation inside the framework.
#
installunixtools:
diff --git a/Mac/PythonLauncher/Info.plist.in b/Mac/PythonLauncher/Info.plist.in
index 6c4bfe818a..4a5eeb5ff5 100644
--- a/Mac/PythonLauncher/Info.plist.in
+++ b/Mac/PythonLauncher/Info.plist.in
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
@@ -38,7 +38,7 @@
</dict>
</array>
<key>CFBundleExecutable</key>
- <string>PythonLauncher</string>
+ <string>Python Launcher</string>
<key>CFBundleGetInfoString</key>
<string>%VERSION%, © 2001-2016 Python Software Foundation</string>
<key>CFBundleIconFile</key>
diff --git a/Mac/PythonLauncher/Makefile.in b/Mac/PythonLauncher/Makefile.in
index f05efdfbfd..4c05f26e83 100644
--- a/Mac/PythonLauncher/Makefile.in
+++ b/Mac/PythonLauncher/Makefile.in
@@ -15,12 +15,10 @@ BUILDPYTHON= $(builddir)/python$(BUILDEXE)
PYTHONFRAMEWORK=@PYTHONFRAMEWORK@
# Deployment target selected during configure, to be checked
-# by distutils
+# by distutils
MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@
@EXPORT_MACOSX_DEPLOYMENT_TARGET@export MACOSX_DEPLOYMENT_TARGET
-BUNDLEBULDER=$(srcdir)/../Tools/bundlebuilder.py
-
PYTHONAPPSDIR=@FRAMEWORKINSTALLAPPSPREFIX@/$(PYTHONFRAMEWORK) $(VERSION)
OBJECTS=FileSettings.o MyAppDelegate.o MyDocument.o PreferencesWindowController.o doscript.o main.o
@@ -30,10 +28,10 @@ install: Python\ Launcher.app
/bin/cp -r "Python Launcher.app" "$(DESTDIR)$(PYTHONAPPSDIR)"
touch "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app"
-
clean:
rm -f *.o "Python Launcher"
rm -rf "Python Launcher.app"
+ rm -f Info.plist
Python\ Launcher.app: Info.plist \
Python\ Launcher $(srcdir)/../Icons/PythonLauncher.icns \
@@ -41,18 +39,17 @@ Python\ Launcher.app: Info.plist \
$(srcdir)/../Icons/PythonCompiled.icns \
$(srcdir)/factorySettings.plist
rm -fr "Python Launcher.app"
- $(RUNSHARED) $(BUILDPYTHON) $(BUNDLEBULDER) \
- --builddir=. \
- --name="Python Launcher" \
- --executable="Python Launcher" \
- --iconfile=$(srcdir)/../Icons/PythonLauncher.icns \
- --bundle-id=org.python.PythonLauncher \
- --resource=$(srcdir)/../Icons/PythonSource.icns \
- --resource=$(srcdir)/../Icons/PythonCompiled.icns \
- --resource=$(srcdir)/English.lproj \
- --resource=$(srcdir)/factorySettings.plist \
- --plist Info.plist \
- build
+ mkdir "Python Launcher.app"
+ mkdir "Python Launcher.app/Contents"
+ mkdir "Python Launcher.app/Contents/MacOS"
+ mkdir "Python Launcher.app/Contents/Resources"
+ cp "Python Launcher" "Python Launcher.app/Contents/MacOS"
+ cp Info.plist "Python Launcher.app/Contents"
+ cp $(srcdir)/../Icons/PythonLauncher.icns "Python Launcher.app/Contents/Resources"
+ cp $(srcdir)/../Icons/PythonSource.icns "Python Launcher.app/Contents/Resources"
+ cp $(srcdir)/../Icons/PythonCompiled.icns "Python Launcher.app/Contents/Resources"
+ cp $(srcdir)/factorySettings.plist "Python Launcher.app/Contents/Resources"
+ cp -R $(srcdir)/English.lproj "Python Launcher.app/Contents/Resources"
FileSettings.o: $(srcdir)/FileSettings.m
$(CC) $(CFLAGS) -o $@ -c $(srcdir)/FileSettings.m
diff --git a/Mac/README b/Mac/README
index 0a313d178f..07f09fa836 100644
--- a/Mac/README
+++ b/Mac/README
@@ -19,7 +19,7 @@ OS X specific arguments to configure
If this argument is specified the build will create a Python.framework rather
than a traditional Unix install. See the section
- _`Building and using a framework-based Python on Mac OS X` for more
+ _`Building and using a framework-based Python on Mac OS X` for more
information on frameworks.
If the optional directory argument is specified the framework is installed
@@ -46,14 +46,19 @@ OS X specific arguments to configure
The optional argument specifies which OS X SDK should be used to perform the
build. If xcodebuild is available and configured, this defaults to
the Xcode default MacOS X SDK, otherwise ``/Developer/SDKs/MacOSX.10.4u.sdk``
- if available or ``/`` if not.
+ if available or ``/`` if not. When building on OS X 10.5 or later, you can
+ specify ``/`` to use the installed system headers rather than an SDK. As of
+ OS X 10.9, you should install the optional system headers from the Command
+ Line Tools component using ``xcode-select``::
+
+ $ sudo xcode-select --install
See the section _`Building and using a universal binary of Python on Mac OS X`
for more information.
-* ``--with-univeral-archs=VALUE``
+* ``--with-universal-archs=VALUE``
- Specify the kind of universal binary that should be created. This option is
+ Specify the kind of universal binary that should be created. This option is
only valid when ``--enable-universalsdk`` is specified. The default is
``32-bit`` if a building with a SDK that supports PPC, otherwise defaults
to ``intel``.
@@ -121,7 +126,7 @@ values are available:
To build a universal binary that includes a 64-bit architecture, you must build
on a system running OS X 10.5 or later. The ``all`` and ``64-bit`` flavors can
-only be built with an 10.5 SDK because ``ppc64`` support was only included with
+only be built with a 10.5 SDK because ``ppc64`` support was only included with
OS X 10.5. Although legacy ``ppc`` support was included with Xcode 3 on OS X
10.6, it was removed in Xcode 4, versions of which were released on OS X 10.6
and which is the standard for OS X 10.7. To summarize, the
@@ -174,14 +179,14 @@ Building and using a framework-based Python on Mac OS X.
--------------------------------------------------------------------------
The main reason is because you want to create GUI programs in Python. With the
-exception of X11/XDarwin-based GUI toolkits all GUI programs need to be run
+exception of X11/XDarwin-based GUI toolkits all GUI programs need to be run
from a Mac OS X application bundle (".app").
While it is technically possible to create a .app without using frameworks you
will have to do the work yourself if you really want this.
A second reason for using frameworks is that they put Python-related items in
-only two places: "/Library/Framework/Python.framework" and
+only two places: "/Library/Framework/Python.framework" and
"/Applications/Python <VERSION>" where ``<VERSION>`` can be e.g. "3.4",
"2.7", etc. This simplifies matters for users installing
Python from a binary distribution if they want to get rid of it again. Moreover,
@@ -228,11 +233,11 @@ in the sequence
1. ./configure --enable-framework
2. make
-
+
3. make install
This sequence will put the framework in ``/Library/Framework/Python.framework``,
-the applications in ``/Applications/Python <VERSION>`` and the unix tools in
+the applications in ``/Applications/Python <VERSION>`` and the unix tools in
``/usr/local/bin``.
Installing in another place, for instance ``$HOME/Library/Frameworks`` if you
@@ -300,7 +305,7 @@ All of this is normally done completely isolated in /tmp/_py, so it does not
use your normal build directory nor does it install into /.
Because of the way the script locates the files it needs you have to run it
-from within the BuildScript directory. The script accepts a number of
+from within the BuildScript directory. The script accepts a number of
command-line arguments, run it with --help for more information.
Configure warnings
diff --git a/Mac/Tools/bundlebuilder.py b/Mac/Tools/bundlebuilder.py
deleted file mode 100755
index f5679d3bd1..0000000000
--- a/Mac/Tools/bundlebuilder.py
+++ /dev/null
@@ -1,934 +0,0 @@
-#! /usr/bin/env python
-
-"""\
-bundlebuilder.py -- Tools to assemble MacOS X (application) bundles.
-
-This module contains two classes to build so called "bundles" for
-MacOS X. BundleBuilder is a general tool, AppBuilder is a subclass
-specialized in building application bundles.
-
-[Bundle|App]Builder objects are instantiated with a bunch of keyword
-arguments, and have a build() method that will do all the work. See
-the class doc strings for a description of the constructor arguments.
-
-The module contains a main program that can be used in two ways:
-
- % python bundlebuilder.py [options] build
- % python buildapp.py [options] build
-
-Where "buildapp.py" is a user-supplied setup.py-like script following
-this model:
-
- from bundlebuilder import buildapp
- buildapp(<lots-of-keyword-args>)
-
-"""
-
-
-__all__ = ["BundleBuilder", "BundleBuilderError", "AppBuilder", "buildapp"]
-
-
-import sys
-import os, errno, shutil
-import imp, marshal
-import re
-from copy import deepcopy
-import getopt
-from plistlib import Plist
-from types import FunctionType as function
-
-class BundleBuilderError(Exception): pass
-
-
-class Defaults:
-
- """Class attributes that don't start with an underscore and are
- not functions or classmethods are (deep)copied to self.__dict__.
- This allows for mutable default values.
- """
-
- def __init__(self, **kwargs):
- defaults = self._getDefaults()
- defaults.update(kwargs)
- self.__dict__.update(defaults)
-
- def _getDefaults(cls):
- defaults = {}
- for base in cls.__bases__:
- if hasattr(base, "_getDefaults"):
- defaults.update(base._getDefaults())
- for name, value in list(cls.__dict__.items()):
- if name[0] != "_" and not isinstance(value,
- (function, classmethod)):
- defaults[name] = deepcopy(value)
- return defaults
- _getDefaults = classmethod(_getDefaults)
-
-
-class BundleBuilder(Defaults):
-
- """BundleBuilder is a barebones class for assembling bundles. It
- knows nothing about executables or icons, it only copies files
- and creates the PkgInfo and Info.plist files.
- """
-
- # (Note that Defaults.__init__ (deep)copies these values to
- # instance variables. Mutable defaults are therefore safe.)
-
- # Name of the bundle, with or without extension.
- name = None
-
- # The property list ("plist")
- plist = Plist(CFBundleDevelopmentRegion = "English",
- CFBundleInfoDictionaryVersion = "6.0")
-
- # The type of the bundle.
- type = "BNDL"
- # The creator code of the bundle.
- creator = None
-
- # the CFBundleIdentifier (this is used for the preferences file name)
- bundle_id = None
-
- # List of files that have to be copied to <bundle>/Contents/Resources.
- resources = []
-
- # List of (src, dest) tuples; dest should be a path relative to the bundle
- # (eg. "Contents/Resources/MyStuff/SomeFile.ext).
- files = []
-
- # List of shared libraries (dylibs, Frameworks) to bundle with the app
- # will be placed in Contents/Frameworks
- libs = []
-
- # Directory where the bundle will be assembled.
- builddir = "build"
-
- # Make symlinks instead copying files. This is handy during debugging, but
- # makes the bundle non-distributable.
- symlink = 0
-
- # Verbosity level.
- verbosity = 1
-
- # Destination root directory
- destroot = ""
-
- def setup(self):
- # XXX rethink self.name munging, this is brittle.
- self.name, ext = os.path.splitext(self.name)
- if not ext:
- ext = ".bundle"
- bundleextension = ext
- # misc (derived) attributes
- self.bundlepath = pathjoin(self.builddir, self.name + bundleextension)
-
- plist = self.plist
- plist.CFBundleName = self.name
- plist.CFBundlePackageType = self.type
- if self.creator is None:
- if hasattr(plist, "CFBundleSignature"):
- self.creator = plist.CFBundleSignature
- else:
- self.creator = "????"
- plist.CFBundleSignature = self.creator
- if self.bundle_id:
- plist.CFBundleIdentifier = self.bundle_id
- elif not hasattr(plist, "CFBundleIdentifier"):
- plist.CFBundleIdentifier = self.name
-
- def build(self):
- """Build the bundle."""
- builddir = self.builddir
- if builddir and not os.path.exists(builddir):
- os.mkdir(builddir)
- self.message("Building %s" % repr(self.bundlepath), 1)
- if os.path.exists(self.bundlepath):
- shutil.rmtree(self.bundlepath)
- if os.path.exists(self.bundlepath + '~'):
- shutil.rmtree(self.bundlepath + '~')
- bp = self.bundlepath
-
- # Create the app bundle in a temporary location and then
- # rename the completed bundle. This way the Finder will
- # never see an incomplete bundle (where it might pick up
- # and cache the wrong meta data)
- self.bundlepath = bp + '~'
- try:
- os.mkdir(self.bundlepath)
- self.preProcess()
- self._copyFiles()
- self._addMetaFiles()
- self.postProcess()
- os.rename(self.bundlepath, bp)
- finally:
- self.bundlepath = bp
- self.message("Done.", 1)
-
- def preProcess(self):
- """Hook for subclasses."""
- pass
- def postProcess(self):
- """Hook for subclasses."""
- pass
-
- def _addMetaFiles(self):
- contents = pathjoin(self.bundlepath, "Contents")
- makedirs(contents)
- #
- # Write Contents/PkgInfo
- assert len(self.type) == len(self.creator) == 4, \
- "type and creator must be 4-byte strings."
- pkginfo = pathjoin(contents, "PkgInfo")
- f = open(pkginfo, "wb")
- f.write((self.type + self.creator).encode('latin1'))
- f.close()
- #
- # Write Contents/Info.plist
- infoplist = pathjoin(contents, "Info.plist")
- self.plist.write(infoplist)
-
- def _copyFiles(self):
- files = self.files[:]
- for path in self.resources:
- files.append((path, pathjoin("Contents", "Resources",
- os.path.basename(path))))
- for path in self.libs:
- files.append((path, pathjoin("Contents", "Frameworks",
- os.path.basename(path))))
- if self.symlink:
- self.message("Making symbolic links", 1)
- msg = "Making symlink from"
- else:
- self.message("Copying files", 1)
- msg = "Copying"
- files.sort()
- for src, dst in files:
- if os.path.isdir(src):
- self.message("%s %s/ to %s/" % (msg, src, dst), 2)
- else:
- self.message("%s %s to %s" % (msg, src, dst), 2)
- dst = pathjoin(self.bundlepath, dst)
- if self.symlink:
- symlink(src, dst, mkdirs=1)
- else:
- copy(src, dst, mkdirs=1)
-
- def message(self, msg, level=0):
- if level <= self.verbosity:
- indent = ""
- if level > 1:
- indent = (level - 1) * " "
- sys.stderr.write(indent + msg + "\n")
-
- def report(self):
- # XXX something decent
- pass
-
-
-if __debug__:
- PYC_EXT = ".pyc"
-else:
- PYC_EXT = ".pyo"
-
-MAGIC = imp.get_magic()
-USE_ZIPIMPORT = "zipimport" in sys.builtin_module_names
-
-# For standalone apps, we have our own minimal site.py. We don't need
-# all the cruft of the real site.py.
-SITE_PY = """\
-import sys
-if not %(semi_standalone)s:
- del sys.path[1:] # sys.path[0] is Contents/Resources/
-"""
-
-if USE_ZIPIMPORT:
- ZIP_ARCHIVE = "Modules.zip"
- SITE_PY += "sys.path.append(sys.path[0] + '/%s')\n" % ZIP_ARCHIVE
- def getPycData(fullname, code, ispkg):
- if ispkg:
- fullname += ".__init__"
- path = fullname.replace(".", os.sep) + PYC_EXT
- return path, MAGIC + '\0\0\0\0' + marshal.dumps(code)
-
-#
-# Extension modules can't be in the modules zip archive, so a placeholder
-# is added instead, that loads the extension from a specified location.
-#
-EXT_LOADER = """\
-def __load():
- import imp, sys, os
- for p in sys.path:
- path = os.path.join(p, "%(filename)s")
- if os.path.exists(path):
- break
- else:
- assert 0, "file not found: %(filename)s"
- mod = imp.load_dynamic("%(name)s", path)
-
-__load()
-del __load
-"""
-
-MAYMISS_MODULES = ['mac', 'nt', 'ntpath', 'dos', 'dospath',
- 'win32api', 'ce', '_winreg', 'nturl2path', 'sitecustomize',
- 'org.python.core', 'riscos', 'riscosenviron', 'riscospath'
-]
-
-STRIP_EXEC = "/usr/bin/strip"
-
-#
-# We're using a stock interpreter to run the app, yet we need
-# a way to pass the Python main program to the interpreter. The
-# bootstrapping script fires up the interpreter with the right
-# arguments. os.execve() is used as OSX doesn't like us to
-# start a real new process. Also, the executable name must match
-# the CFBundleExecutable value in the Info.plist, so we lie
-# deliberately with argv[0]. The actual Python executable is
-# passed in an environment variable so we can "repair"
-# sys.executable later.
-#
-BOOTSTRAP_SCRIPT = """\
-#!%(hashbang)s
-
-import sys, os
-execdir = os.path.dirname(sys.argv[0])
-executable = os.path.join(execdir, "%(executable)s")
-resdir = os.path.join(os.path.dirname(execdir), "Resources")
-libdir = os.path.join(os.path.dirname(execdir), "Frameworks")
-mainprogram = os.path.join(resdir, "%(mainprogram)s")
-
-sys.argv.insert(1, mainprogram)
-if %(standalone)s or %(semi_standalone)s:
- os.environ["PYTHONPATH"] = resdir
- if %(standalone)s:
- os.environ["PYTHONHOME"] = resdir
-else:
- pypath = os.getenv("PYTHONPATH", "")
- if pypath:
- pypath = ":" + pypath
- os.environ["PYTHONPATH"] = resdir + pypath
-os.environ["PYTHONEXECUTABLE"] = executable
-os.environ["DYLD_LIBRARY_PATH"] = libdir
-os.environ["DYLD_FRAMEWORK_PATH"] = libdir
-os.execve(executable, sys.argv, os.environ)
-"""
-
-
-#
-# Optional wrapper that converts "dropped files" into sys.argv values.
-#
-ARGV_EMULATOR = """\
-import argvemulator, os
-
-argvemulator.ArgvCollector().mainloop()
-execfile(os.path.join(os.path.split(__file__)[0], "%(realmainprogram)s"))
-"""
-
-#
-# When building a standalone app with Python.framework, we need to copy
-# a subset from Python.framework to the bundle. The following list
-# specifies exactly what items we'll copy.
-#
-PYTHONFRAMEWORKGOODIES = [
- "Python", # the Python core library
- "Resources/English.lproj",
- "Resources/Info.plist",
- "Resources/version.plist",
-]
-
-def isFramework():
- return sys.exec_prefix.find("Python.framework") > 0
-
-
-LIB = os.path.join(sys.prefix, "lib", "python" + sys.version[:3])
-SITE_PACKAGES = os.path.join(LIB, "site-packages")
-
-
-class AppBuilder(BundleBuilder):
-
- # Override type of the bundle.
- type = "APPL"
-
- # platform, name of the subfolder of Contents that contains the executable.
- platform = "MacOS"
-
- # A Python main program. If this argument is given, the main
- # executable in the bundle will be a small wrapper that invokes
- # the main program. (XXX Discuss why.)
- mainprogram = None
-
- # The main executable. If a Python main program is specified
- # the executable will be copied to Resources and be invoked
- # by the wrapper program mentioned above. Otherwise it will
- # simply be used as the main executable.
- executable = None
-
- # The name of the main nib, for Cocoa apps. *Must* be specified
- # when building a Cocoa app.
- nibname = None
-
- # The name of the icon file to be copied to Resources and used for
- # the Finder icon.
- iconfile = None
-
- # Symlink the executable instead of copying it.
- symlink_exec = 0
-
- # If True, build standalone app.
- standalone = 0
-
- # If True, build semi-standalone app (only includes third-party modules).
- semi_standalone = 0
-
- # If set, use this for #! lines in stead of sys.executable
- python = None
-
- # If True, add a real main program that emulates sys.argv before calling
- # mainprogram
- argv_emulation = 0
-
- # The following attributes are only used when building a standalone app.
-
- # Exclude these modules.
- excludeModules = []
-
- # Include these modules.
- includeModules = []
-
- # Include these packages.
- includePackages = []
-
- # Strip binaries from debug info.
- strip = 0
-
- # Found Python modules: [(name, codeobject, ispkg), ...]
- pymodules = []
-
- # Modules that modulefinder couldn't find:
- missingModules = []
- maybeMissingModules = []
-
- def setup(self):
- if ((self.standalone or self.semi_standalone)
- and self.mainprogram is None):
- raise BundleBuilderError("must specify 'mainprogram' when "
- "building a standalone application.")
- if self.mainprogram is None and self.executable is None:
- raise BundleBuilderError("must specify either or both of "
- "'executable' and 'mainprogram'")
-
- self.execdir = pathjoin("Contents", self.platform)
-
- if self.name is not None:
- pass
- elif self.mainprogram is not None:
- self.name = os.path.splitext(os.path.basename(self.mainprogram))[0]
- elif executable is not None:
- self.name = os.path.splitext(os.path.basename(self.executable))[0]
- if self.name[-4:] != ".app":
- self.name += ".app"
-
- if self.executable is None:
- if not self.standalone and not isFramework():
- self.symlink_exec = 1
- if self.python:
- self.executable = self.python
- else:
- self.executable = sys.executable
-
- if self.nibname:
- self.plist.NSMainNibFile = self.nibname
- if not hasattr(self.plist, "NSPrincipalClass"):
- self.plist.NSPrincipalClass = "NSApplication"
-
- if self.standalone and isFramework():
- self.addPythonFramework()
-
- BundleBuilder.setup(self)
-
- self.plist.CFBundleExecutable = self.name
-
- if self.standalone or self.semi_standalone:
- self.findDependencies()
-
- def preProcess(self):
- resdir = "Contents/Resources"
- if self.executable is not None:
- if self.mainprogram is None:
- execname = self.name
- else:
- execname = os.path.basename(self.executable)
- execpath = pathjoin(self.execdir, execname)
- if not self.symlink_exec:
- self.files.append((self.destroot + self.executable, execpath))
- self.execpath = execpath
-
- if self.mainprogram is not None:
- mainprogram = os.path.basename(self.mainprogram)
- self.files.append((self.mainprogram, pathjoin(resdir, mainprogram)))
- if self.argv_emulation:
- # Change the main program, and create the helper main program (which
- # does argv collection and then calls the real main).
- # Also update the included modules (if we're creating a standalone
- # program) and the plist
- realmainprogram = mainprogram
- mainprogram = '__argvemulator_' + mainprogram
- resdirpath = pathjoin(self.bundlepath, resdir)
- mainprogrampath = pathjoin(resdirpath, mainprogram)
- makedirs(resdirpath)
- open(mainprogrampath, "w").write(ARGV_EMULATOR % locals())
- if self.standalone or self.semi_standalone:
- self.includeModules.append("argvemulator")
- self.includeModules.append("os")
- if "CFBundleDocumentTypes" not in self.plist:
- self.plist["CFBundleDocumentTypes"] = [
- { "CFBundleTypeOSTypes" : [
- "****",
- "fold",
- "disk"],
- "CFBundleTypeRole": "Viewer"}]
- # Write bootstrap script
- executable = os.path.basename(self.executable)
- execdir = pathjoin(self.bundlepath, self.execdir)
- bootstrappath = pathjoin(execdir, self.name)
- makedirs(execdir)
- if self.standalone or self.semi_standalone:
- # XXX we're screwed when the end user has deleted
- # /usr/bin/python
- hashbang = "/usr/bin/python"
- elif self.python:
- hashbang = self.python
- else:
- hashbang = os.path.realpath(sys.executable)
- standalone = self.standalone
- semi_standalone = self.semi_standalone
- open(bootstrappath, "w").write(BOOTSTRAP_SCRIPT % locals())
- os.chmod(bootstrappath, 0o775)
-
- if self.iconfile is not None:
- iconbase = os.path.basename(self.iconfile)
- self.plist.CFBundleIconFile = iconbase
- self.files.append((self.iconfile, pathjoin(resdir, iconbase)))
-
- def postProcess(self):
- if self.standalone or self.semi_standalone:
- self.addPythonModules()
- if self.strip and not self.symlink:
- self.stripBinaries()
-
- if self.symlink_exec and self.executable:
- self.message("Symlinking executable %s to %s" % (self.executable,
- self.execpath), 2)
- dst = pathjoin(self.bundlepath, self.execpath)
- makedirs(os.path.dirname(dst))
- os.symlink(os.path.abspath(self.executable), dst)
-
- if self.missingModules or self.maybeMissingModules:
- self.reportMissing()
-
- def addPythonFramework(self):
- # If we're building a standalone app with Python.framework,
- # include a minimal subset of Python.framework, *unless*
- # Python.framework was specified manually in self.libs.
- for lib in self.libs:
- if os.path.basename(lib) == "Python.framework":
- # a Python.framework was specified as a library
- return
-
- frameworkpath = sys.exec_prefix[:sys.exec_prefix.find(
- "Python.framework") + len("Python.framework")]
-
- version = sys.version[:3]
- frameworkpath = pathjoin(frameworkpath, "Versions", version)
- destbase = pathjoin("Contents", "Frameworks", "Python.framework",
- "Versions", version)
- for item in PYTHONFRAMEWORKGOODIES:
- src = pathjoin(frameworkpath, item)
- dst = pathjoin(destbase, item)
- self.files.append((src, dst))
-
- def _getSiteCode(self):
- return compile(SITE_PY % {"semi_standalone": self.semi_standalone},
- "<-bundlebuilder.py->", "exec")
-
- def addPythonModules(self):
- self.message("Adding Python modules", 1)
-
- if USE_ZIPIMPORT:
- # Create a zip file containing all modules as pyc.
- import zipfile
- relpath = pathjoin("Contents", "Resources", ZIP_ARCHIVE)
- abspath = pathjoin(self.bundlepath, relpath)
- zf = zipfile.ZipFile(abspath, "w", zipfile.ZIP_DEFLATED)
- for name, code, ispkg in self.pymodules:
- self.message("Adding Python module %s" % name, 2)
- path, pyc = getPycData(name, code, ispkg)
- zf.writestr(path, pyc)
- zf.close()
- # add site.pyc
- sitepath = pathjoin(self.bundlepath, "Contents", "Resources",
- "site" + PYC_EXT)
- writePyc(self._getSiteCode(), sitepath)
- else:
- # Create individual .pyc files.
- for name, code, ispkg in self.pymodules:
- if ispkg:
- name += ".__init__"
- path = name.split(".")
- path = pathjoin("Contents", "Resources", *path) + PYC_EXT
-
- if ispkg:
- self.message("Adding Python package %s" % path, 2)
- else:
- self.message("Adding Python module %s" % path, 2)
-
- abspath = pathjoin(self.bundlepath, path)
- makedirs(os.path.dirname(abspath))
- writePyc(code, abspath)
-
- def stripBinaries(self):
- if not os.path.exists(STRIP_EXEC):
- self.message("Error: can't strip binaries: no strip program at "
- "%s" % STRIP_EXEC, 0)
- else:
- import stat
- self.message("Stripping binaries", 1)
- def walk(top):
- for name in os.listdir(top):
- path = pathjoin(top, name)
- if os.path.islink(path):
- continue
- if os.path.isdir(path):
- walk(path)
- else:
- mod = os.stat(path)[stat.ST_MODE]
- if not (mod & 0o100):
- continue
- relpath = path[len(self.bundlepath):]
- self.message("Stripping %s" % relpath, 2)
- inf, outf = os.popen4("%s -S \"%s\"" %
- (STRIP_EXEC, path))
- output = outf.read().strip()
- if output:
- # usually not a real problem, like when we're
- # trying to strip a script
- self.message("Problem stripping %s:" % relpath, 3)
- self.message(output, 3)
- walk(self.bundlepath)
-
- def findDependencies(self):
- self.message("Finding module dependencies", 1)
- import modulefinder
- mf = modulefinder.ModuleFinder(excludes=self.excludeModules)
- if USE_ZIPIMPORT:
- # zipimport imports zlib, must add it manually
- mf.import_hook("zlib")
- # manually add our own site.py
- site = mf.add_module("site")
- site.__code__ = self._getSiteCode()
- mf.scan_code(site.__code__, site)
-
- # warnings.py gets imported implicitly from C
- mf.import_hook("warnings")
-
- includeModules = self.includeModules[:]
- for name in self.includePackages:
- includeModules.extend(list(findPackageContents(name).keys()))
- for name in includeModules:
- try:
- mf.import_hook(name)
- except ImportError:
- self.missingModules.append(name)
-
- mf.run_script(self.mainprogram)
- modules = list(mf.modules.items())
- modules.sort()
- for name, mod in modules:
- path = mod.__file__
- if path and self.semi_standalone:
- # skip the standard library
- if path.startswith(LIB) and not path.startswith(SITE_PACKAGES):
- continue
- if path and mod.__code__ is None:
- # C extension
- filename = os.path.basename(path)
- pathitems = name.split(".")[:-1] + [filename]
- dstpath = pathjoin(*pathitems)
- if USE_ZIPIMPORT:
- if name != "zlib":
- # neatly pack all extension modules in a subdirectory,
- # except zlib, since it's necessary for bootstrapping.
- dstpath = pathjoin("ExtensionModules", dstpath)
- # Python modules are stored in a Zip archive, but put
- # extensions in Contents/Resources/. Add a tiny "loader"
- # program in the Zip archive. Due to Thomas Heller.
- source = EXT_LOADER % {"name": name, "filename": dstpath}
- code = compile(source, "<dynloader for %s>" % name, "exec")
- mod.__code__ = code
- self.files.append((path, pathjoin("Contents", "Resources", dstpath)))
- if mod.__code__ is not None:
- ispkg = mod.__path__ is not None
- if not USE_ZIPIMPORT or name != "site":
- # Our site.py is doing the bootstrapping, so we must
- # include a real .pyc file if USE_ZIPIMPORT is True.
- self.pymodules.append((name, mod.__code__, ispkg))
-
- if hasattr(mf, "any_missing_maybe"):
- missing, maybe = mf.any_missing_maybe()
- else:
- missing = mf.any_missing()
- maybe = []
- self.missingModules.extend(missing)
- self.maybeMissingModules.extend(maybe)
-
- def reportMissing(self):
- missing = [name for name in self.missingModules
- if name not in MAYMISS_MODULES]
- if self.maybeMissingModules:
- maybe = self.maybeMissingModules
- else:
- maybe = [name for name in missing if "." in name]
- missing = [name for name in missing if "." not in name]
- missing.sort()
- maybe.sort()
- if maybe:
- self.message("Warning: couldn't find the following submodules:", 1)
- self.message(" (Note that these could be false alarms -- "
- "it's not always", 1)
- self.message(" possible to distinguish between \"from package "
- "import submodule\" ", 1)
- self.message(" and \"from package import name\")", 1)
- for name in maybe:
- self.message(" ? " + name, 1)
- if missing:
- self.message("Warning: couldn't find the following modules:", 1)
- for name in missing:
- self.message(" ? " + name, 1)
-
- def report(self):
- # XXX something decent
- import pprint
- pprint.pprint(self.__dict__)
- if self.standalone or self.semi_standalone:
- self.reportMissing()
-
-#
-# Utilities.
-#
-
-SUFFIXES = [_suf for _suf, _mode, _tp in imp.get_suffixes()]
-identifierRE = re.compile(r"[_a-zA-z][_a-zA-Z0-9]*$")
-
-def findPackageContents(name, searchpath=None):
- head = name.split(".")[-1]
- if identifierRE.match(head) is None:
- return {}
- try:
- fp, path, (ext, mode, tp) = imp.find_module(head, searchpath)
- except ImportError:
- return {}
- modules = {name: None}
- if tp == imp.PKG_DIRECTORY and path:
- files = os.listdir(path)
- for sub in files:
- sub, ext = os.path.splitext(sub)
- fullname = name + "." + sub
- if sub != "__init__" and fullname not in modules:
- modules.update(findPackageContents(fullname, [path]))
- return modules
-
-def writePyc(code, path):
- f = open(path, "wb")
- f.write(MAGIC)
- f.write("\0" * 4) # don't bother about a time stamp
- marshal.dump(code, f)
- f.close()
-
-def copy(src, dst, mkdirs=0):
- """Copy a file or a directory."""
- if mkdirs:
- makedirs(os.path.dirname(dst))
- if os.path.isdir(src):
- shutil.copytree(src, dst, symlinks=1)
- else:
- shutil.copy2(src, dst)
-
-def copytodir(src, dstdir):
- """Copy a file or a directory to an existing directory."""
- dst = pathjoin(dstdir, os.path.basename(src))
- copy(src, dst)
-
-def makedirs(dir):
- """Make all directories leading up to 'dir' including the leaf
- directory. Don't moan if any path element already exists."""
- try:
- os.makedirs(dir)
- except OSError as why:
- if why.errno != errno.EEXIST:
- raise
-
-def symlink(src, dst, mkdirs=0):
- """Copy a file or a directory."""
- if not os.path.exists(src):
- raise IOError("No such file or directory: '%s'" % src)
- if mkdirs:
- makedirs(os.path.dirname(dst))
- os.symlink(os.path.abspath(src), dst)
-
-def pathjoin(*args):
- """Safe wrapper for os.path.join: asserts that all but the first
- argument are relative paths."""
- for seg in args[1:]:
- assert seg[0] != "/"
- return os.path.join(*args)
-
-
-cmdline_doc = """\
-Usage:
- python bundlebuilder.py [options] command
- python mybuildscript.py [options] command
-
-Commands:
- build build the application
- report print a report
-
-Options:
- -b, --builddir=DIR the build directory; defaults to "build"
- -n, --name=NAME application name
- -r, --resource=FILE extra file or folder to be copied to Resources
- -f, --file=SRC:DST extra file or folder to be copied into the bundle;
- DST must be a path relative to the bundle root
- -e, --executable=FILE the executable to be used
- -m, --mainprogram=FILE the Python main program
- -a, --argv add a wrapper main program to create sys.argv
- -p, --plist=FILE .plist file (default: generate one)
- --nib=NAME main nib name
- -c, --creator=CCCC 4-char creator code (default: '????')
- --iconfile=FILE filename of the icon (an .icns file) to be used
- as the Finder icon
- --bundle-id=ID the CFBundleIdentifier, in reverse-dns format
- (eg. org.python.BuildApplet; this is used for
- the preferences file name)
- -l, --link symlink files/folder instead of copying them
- --link-exec symlink the executable instead of copying it
- --standalone build a standalone application, which is fully
- independent of a Python installation
- --semi-standalone build a standalone application, which depends on
- an installed Python, yet includes all third-party
- modules.
- --python=FILE Python to use in #! line in stead of current Python
- --lib=FILE shared library or framework to be copied into
- the bundle
- -x, --exclude=MODULE exclude module (with --(semi-)standalone)
- -i, --include=MODULE include module (with --(semi-)standalone)
- --package=PACKAGE include a whole package (with --(semi-)standalone)
- --strip strip binaries (remove debug info)
- -v, --verbose increase verbosity level
- -q, --quiet decrease verbosity level
- -h, --help print this message
-"""
-
-def usage(msg=None):
- if msg:
- print(msg)
- print(cmdline_doc)
- sys.exit(1)
-
-def main(builder=None):
- if builder is None:
- builder = AppBuilder(verbosity=1)
-
- shortopts = "b:n:r:f:e:m:c:p:lx:i:hvqa"
- longopts = ("builddir=", "name=", "resource=", "file=", "executable=",
- "mainprogram=", "creator=", "nib=", "plist=", "link",
- "link-exec", "help", "verbose", "quiet", "argv", "standalone",
- "exclude=", "include=", "package=", "strip", "iconfile=",
- "lib=", "python=", "semi-standalone", "bundle-id=", "destroot=")
-
- try:
- options, args = getopt.getopt(sys.argv[1:], shortopts, longopts)
- except getopt.error:
- usage()
-
- for opt, arg in options:
- if opt in ('-b', '--builddir'):
- builder.builddir = arg
- elif opt in ('-n', '--name'):
- builder.name = arg
- elif opt in ('-r', '--resource'):
- builder.resources.append(os.path.normpath(arg))
- elif opt in ('-f', '--file'):
- srcdst = arg.split(':')
- if len(srcdst) != 2:
- usage("-f or --file argument must be two paths, "
- "separated by a colon")
- builder.files.append(srcdst)
- elif opt in ('-e', '--executable'):
- builder.executable = arg
- elif opt in ('-m', '--mainprogram'):
- builder.mainprogram = arg
- elif opt in ('-a', '--argv'):
- builder.argv_emulation = 1
- elif opt in ('-c', '--creator'):
- builder.creator = arg
- elif opt == '--bundle-id':
- builder.bundle_id = arg
- elif opt == '--iconfile':
- builder.iconfile = arg
- elif opt == "--lib":
- builder.libs.append(os.path.normpath(arg))
- elif opt == "--nib":
- builder.nibname = arg
- elif opt in ('-p', '--plist'):
- builder.plist = Plist.fromFile(arg)
- elif opt in ('-l', '--link'):
- builder.symlink = 1
- elif opt == '--link-exec':
- builder.symlink_exec = 1
- elif opt in ('-h', '--help'):
- usage()
- elif opt in ('-v', '--verbose'):
- builder.verbosity += 1
- elif opt in ('-q', '--quiet'):
- builder.verbosity -= 1
- elif opt == '--standalone':
- builder.standalone = 1
- elif opt == '--semi-standalone':
- builder.semi_standalone = 1
- elif opt == '--python':
- builder.python = arg
- elif opt in ('-x', '--exclude'):
- builder.excludeModules.append(arg)
- elif opt in ('-i', '--include'):
- builder.includeModules.append(arg)
- elif opt == '--package':
- builder.includePackages.append(arg)
- elif opt == '--strip':
- builder.strip = 1
- elif opt == '--destroot':
- builder.destroot = arg
-
- if len(args) != 1:
- usage("Must specify one command ('build', 'report' or 'help')")
- command = args[0]
-
- if command == "build":
- builder.setup()
- builder.build()
- elif command == "report":
- builder.setup()
- builder.report()
- elif command == "help":
- usage()
- else:
- usage("Unknown command '%s'" % command)
-
-
-def buildapp(**kwargs):
- builder = AppBuilder(**kwargs)
- main(builder)
-
-
-if __name__ == "__main__":
- main()
diff --git a/Makefile.pre.in b/Makefile.pre.in
index e19fc00b2b..87528a094d 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -43,6 +43,11 @@ LDVERSION= @LDVERSION@
HGVERSION= @HGVERSION@
HGTAG= @HGTAG@
HGBRANCH= @HGBRANCH@
+PGO_PROF_GEN_FLAG=@PGO_PROF_GEN_FLAG@
+PGO_PROF_USE_FLAG=@PGO_PROF_USE_FLAG@
+LLVM_PROF_MERGER=@LLVM_PROF_MERGER@
+LLVM_PROF_FILE=@LLVM_PROF_FILE@
+LLVM_PROF_ERR=@LLVM_PROF_ERR@
GNULD= @GNULD@
@@ -216,6 +221,7 @@ LIBOBJS= @LIBOBJS@
PYTHON= python$(EXE)
BUILDPYTHON= python$(BUILDEXE)
+cross_compiling=@cross_compiling@
PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@
_PYTHON_HOST_PLATFORM=@_PYTHON_HOST_PLATFORM@
BUILD_GNU_TYPE= @build@
@@ -225,9 +231,10 @@ HOST_GNU_TYPE= @host@
TCLTK_INCLUDES= @TCLTK_INCLUDES@
TCLTK_LIBS= @TCLTK_LIBS@
-# The task to run while instrument when building the profile-opt target
-PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
-#PROFILE_TASK= $(srcdir)/Lib/test/regrtest.py
+# The task to run while instrumented when building the profile-opt target.
+# We exclude unittests with -x that take a rediculious amount of time to
+# run in the instrumented training build or do not provide much value.
+PROFILE_TASK=-m test.regrtest --pgo -x test_asyncore test_gdb test_multiprocessing_fork test_multiprocessing_forkserver test_multiprocessing_main_handling test_multiprocessing_spawn test_subprocess
# report files for gcov / lcov coverage report
COVERAGE_INFO= $(abs_builddir)/coverage.info
@@ -328,6 +335,13 @@ PGENSRCS= $(PSRCS) $(PGSRCS)
PGENOBJS= $(POBJS) $(PGOBJS)
##########################################################################
+# opcode.h generation
+OPCODE_H_DIR= $(srcdir)/Include
+OPCODE_H_SCRIPT= $(srcdir)/Tools/scripts/generate_opcode_h.py
+OPCODE_H= $(OPCODE_H_DIR)/opcode.h
+OPCODE_H_GEN= @OPCODEHGEN@ $(OPCODE_H_SCRIPT) $(srcdir)/Lib/opcode.py $(OPCODE_H)
+#
+##########################################################################
# AST
AST_H_DIR= Include
AST_H= $(AST_H_DIR)/Python-ast.h
@@ -382,6 +396,7 @@ PYTHON_OBJS= \
Python/pyctype.o \
Python/pyfpe.o \
Python/pyhash.o \
+ Python/pylifecycle.o \
Python/pymath.o \
Python/pystate.o \
Python/pythonrun.o \
@@ -394,6 +409,7 @@ PYTHON_OBJS= \
Python/getopt.o \
Python/pystrcmp.o \
Python/pystrtod.o \
+ Python/pystrhex.o \
Python/dtoa.o \
Python/formatter_unicode.o \
Python/fileutils.o \
@@ -428,6 +444,7 @@ OBJECT_OBJS= \
Objects/listobject.o \
Objects/longobject.o \
Objects/dictobject.o \
+ Objects/odictobject.o \
Objects/memoryobject.o \
Objects/methodobject.o \
Objects/moduleobject.o \
@@ -465,29 +482,40 @@ LIBRARY_OBJS= \
# Default target
all: build_all
-build_all: $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks Modules/_testembed python-config
+build_all: $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks Programs/_testembed python-config
-# Compile a binary with gcc profile guided optimization.
+# Compile a binary with profile guided optimization.
profile-opt:
+ @if [ $(LLVM_PROF_ERR) = yes ]; then \
+ echo "Error: Cannot perform PGO build because llvm-profdata was not found in PATH" ;\
+ echo "Please add it to PATH and run ./configure again" ;\
+ exit 1;\
+ fi
@echo "Building with support for profile generation:"
$(MAKE) clean
+ $(MAKE) profile-removal
$(MAKE) build_all_generate_profile
- @echo "Running benchmark to generate profile data:"
$(MAKE) profile-removal
+ @echo "Running code to generate profile data (this can take a while):"
$(MAKE) run_profile_task
+ $(MAKE) build_all_merge_profile
@echo "Rebuilding with profile guided optimizations:"
$(MAKE) clean
$(MAKE) build_all_use_profile
+ $(MAKE) profile-removal
build_all_generate_profile:
- $(MAKE) all CFLAGS_NODIST="$(CFLAGS) -fprofile-generate" LDFLAGS="-fprofile-generate" LIBS="$(LIBS) -lgcov"
+ $(MAKE) all CFLAGS_NODIST="$(CFLAGS) $(PGO_PROF_GEN_FLAG) @LTOFLAGS@" LDFLAGS="$(LDFLAGS) $(PGO_PROF_GEN_FLAG) @LTOFLAGS@" LIBS="$(LIBS)"
run_profile_task:
: # FIXME: can't run for a cross build
- $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK)
+ $(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) || true
+
+build_all_merge_profile:
+ $(LLVM_PROF_MERGER)
build_all_use_profile:
- $(MAKE) all CFLAGS_NODIST="$(CFLAGS) -fprofile-use -fprofile-correction"
+ $(MAKE) all CFLAGS_NODIST="$(CFLAGS) $(PGO_PROF_USE_FLAG) @LTOFLAGS@" LDFLAGS="$(LDFLAGS) @LTOFLAGS@"
# Compile and run with gcov
.PHONY=coverage coverage-lcov coverage-report
@@ -524,6 +552,7 @@ coverage-report:
: # force rebuilding of parser and importlib
@touch $(GRAMMAR_INPUT)
@touch $(srcdir)/Lib/importlib/_bootstrap.py
+ @touch $(srcdir)/Lib/importlib/_bootstrap_external.py
: # build with coverage info
$(MAKE) coverage
: # run tests, ignore failures
@@ -538,8 +567,8 @@ clinic: $(BUILDPYTHON)
$(RUNSHARED) $(PYTHON_FOR_BUILD) ./Tools/clinic/clinic.py --make
# Build the interpreter
-$(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
- $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Modules/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
+$(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
+ $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
platform: $(BUILDPYTHON) pybuilddir.txt
$(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print(get_platform()+"-"+sys.version[0:3])' >platform
@@ -560,11 +589,15 @@ pybuilddir.txt: $(BUILDPYTHON)
exit 1 ; \
fi
+# This is shared by the math and cmath modules
+Modules/_math.o: Modules/_math.c Modules/_math.h
+ $(CC) -c $(CCSHARED) $(PY_CORE_CFLAGS) -o $@ $<
+
# Build the shared modules
# Under GNU make, MAKEFLAGS are sorted and normalized; the 's' for
# -s, --silent or --quiet is always the first char.
# Under BSD make, MAKEFLAGS might be " -s -v x=y".
-sharedmods: $(BUILDPYTHON) pybuilddir.txt
+sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o
@case "$$MAKEFLAGS" in \
*\ -s*|s*) quiet="-q";; \
*) quiet="";; \
@@ -674,19 +707,28 @@ Modules/Setup: $(srcdir)/Modules/Setup.dist
echo "-----------------------------------------------"; \
fi
-Modules/_testembed: Modules/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
- $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Modules/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
+Programs/_testembed: Programs/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
+ $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
############################################################################
# Importlib
-Modules/_freeze_importlib: Modules/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN)
- $(LINKCC) $(PY_LDFLAGS) -o $@ Modules/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
+Programs/_freeze_importlib.o: Programs/_freeze_importlib.c Makefile
-Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py Modules/_freeze_importlib.c
- $(MAKE) Modules/_freeze_importlib
- ./Modules/_freeze_importlib \
- $(srcdir)/Lib/importlib/_bootstrap.py Python/importlib.h
+Programs/_freeze_importlib: Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN)
+ $(LINKCC) $(PY_LDFLAGS) -o $@ Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
+
+Python/importlib_external.h: $(srcdir)/Lib/importlib/_bootstrap_external.py Programs/_freeze_importlib
+ if test "$(cross_compiling)" != "yes"; then \
+ ./Programs/_freeze_importlib \
+ $(srcdir)/Lib/importlib/_bootstrap_external.py Python/importlib_external.h; \
+ fi
+
+Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib
+ if test "$(cross_compiling)" != "yes"; then \
+ ./Programs/_freeze_importlib \
+ $(srcdir)/Lib/importlib/_bootstrap.py Python/importlib.h; \
+ fi
############################################################################
@@ -713,11 +755,11 @@ Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile
-DVPATH='"$(VPATH)"' \
-o $@ $(srcdir)/Modules/getpath.c
-Modules/python.o: $(srcdir)/Modules/python.c
- $(MAINCC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Modules/python.c
+Programs/python.o: $(srcdir)/Programs/python.c
+ $(MAINCC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/python.c
-Modules/_testembed.o: $(srcdir)/Modules/_testembed.c
- $(MAINCC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Modules/_testembed.c
+Programs/_testembed.o: $(srcdir)/Programs/_testembed.c
+ $(MAINCC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/_testembed.c
Modules/_sre.o: $(srcdir)/Modules/_sre.c $(srcdir)/Modules/sre.h $(srcdir)/Modules/sre_constants.h $(srcdir)/Modules/sre_lib.h
@@ -746,15 +788,24 @@ Python/sysmodule.o: $(srcdir)/Python/sysmodule.c Makefile
$(IO_OBJS): $(IO_H)
-$(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS)
- @$(MKDIR_P) Include
- $(MAKE) $(PGEN)
- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
-$(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS)
- $(MAKE) $(GRAMMAR_H)
- touch $(GRAMMAR_C)
+$(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGEN)
+ @$(MKDIR_P) Include
+ # Avoid copying the file onto itself for an in-tree build
+ if test "$(cross_compiling)" != "yes"; then \
+ $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C); \
+ else \
+ cp $(srcdir)/Include/graminit.h $(GRAMMAR_H).tmp; \
+ mv $(GRAMMAR_H).tmp $(GRAMMAR_H); \
+ fi
+$(GRAMMAR_C): $(GRAMMAR_H)
+ if test "$(cross_compiling)" != "yes"; then \
+ touch $(GRAMMAR_C); \
+ else \
+ cp $(srcdir)/Python/graminit.c $(GRAMMAR_C).tmp; \
+ mv $(GRAMMAR_C).tmp $(GRAMMAR_C); \
+ fi
-$(PGEN): $(PGENOBJS)
+$(PGEN): $(PGENOBJS)
$(CC) $(OPT) $(PY_LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
Parser/grammar.o: $(srcdir)/Parser/grammar.c \
@@ -776,6 +827,9 @@ $(AST_C): $(AST_H) $(AST_ASDL) $(ASDLGEN_FILES)
$(MKDIR_P) $(AST_C_DIR)
$(ASDLGEN) -c $(AST_C_DIR) $(AST_ASDL)
+$(OPCODE_H): $(srcdir)/Lib/opcode.py $(OPCODE_H_SCRIPT)
+ $(OPCODE_H_GEN)
+
Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
Python/getplatform.o: $(srcdir)/Python/getplatform.c
@@ -830,7 +884,7 @@ $(OPCODETARGETS_H): $(OPCODETARGETGEN_FILES)
Python/ceval.o: $(OPCODETARGETS_H) $(srcdir)/Python/ceval_gil.h
-Python/frozen.o: Python/importlib.h
+Python/frozen.o: Python/importlib.h Python/importlib_external.h
Objects/typeobject.o: Objects/typeslots.inc
Objects/typeslots.inc: $(srcdir)/Include/typeslots.h $(srcdir)/Objects/typeslots.py
@@ -887,7 +941,7 @@ PYTHON_HEADERS= \
$(srcdir)/Include/node.h \
$(srcdir)/Include/object.h \
$(srcdir)/Include/objimpl.h \
- $(srcdir)/Include/opcode.h \
+ $(OPCODE_H) \
$(srcdir)/Include/osdefs.h \
$(srcdir)/Include/patchlevel.h \
$(srcdir)/Include/pgen.h \
@@ -900,6 +954,7 @@ PYTHON_HEADERS= \
$(srcdir)/Include/pyerrors.h \
$(srcdir)/Include/pyfpe.h \
$(srcdir)/Include/pyhash.h \
+ $(srcdir)/Include/pylifecycle.h \
$(srcdir)/Include/pymath.h \
$(srcdir)/Include/pygetopt.h \
$(srcdir)/Include/pymacro.h \
@@ -908,6 +963,7 @@ PYTHON_HEADERS= \
$(srcdir)/Include/pystate.h \
$(srcdir)/Include/pystrcmp.h \
$(srcdir)/Include/pystrtod.h \
+ $(srcdir)/Include/pystrhex.h \
$(srcdir)/Include/pythonrun.h \
$(srcdir)/Include/pythread.h \
$(srcdir)/Include/pytime.h \
@@ -928,7 +984,7 @@ PYTHON_HEADERS= \
$(PARSER_HEADERS) \
$(AST_H)
-$(LIBRARY_OBJS) $(MODOBJS) Modules/python.o: $(PYTHON_HEADERS)
+$(LIBRARY_OBJS) $(MODOBJS) Programs/python.o: $(PYTHON_HEADERS)
######################################################################
@@ -1076,6 +1132,10 @@ altbininstall: $(BUILDPYTHON) @FRAMEWORKPYTHONW@
fi
bininstall: altbininstall
+ if test ! -d $(DESTDIR)$(LIBPC); then \
+ echo "Creating directory $(LIBPC)"; \
+ $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(LIBPC); \
+ fi
-if test -f $(DESTDIR)$(BINDIR)/python3$(EXE) -o -h $(DESTDIR)$(BINDIR)/python3$(EXE); \
then rm -f $(DESTDIR)$(BINDIR)/python3$(EXE); \
else true; \
@@ -1131,9 +1191,14 @@ LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \
test/audiodata \
test/capath test/data \
test/cjkencodings test/decimaltestdata test/xmltestdata \
+ test/eintrdata \
test/imghdrdata \
test/subprocessdata test/sndhdrdata test/support \
test/tracedmodules test/encoded_modules \
+ test/test_import \
+ test/test_import/data \
+ test/test_import/data/circular_imports \
+ test/test_import/data/circular_imports/subpkg \
test/test_importlib/namespace_pkgs \
test/test_importlib/namespace_pkgs/both_portions \
test/test_importlib/namespace_pkgs/both_portions/foo \
@@ -1246,7 +1311,12 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
-d $(LIBDEST) -f \
-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
$(DESTDIR)$(LIBDEST)
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST) -f \
+ -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+ $(DESTDIR)$(LIBDEST)
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
-d $(LIBDEST)/site-packages -f \
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
@@ -1255,6 +1325,10 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
-d $(LIBDEST)/site-packages -f \
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST)/site-packages -f \
+ -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
@@ -1337,7 +1411,7 @@ libainstall: all python-config
fi; \
fi
$(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
- $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
+ $(INSTALL_DATA) Programs/python.o $(DESTDIR)$(LIBPL)/python.o
$(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
$(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile
$(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup
@@ -1348,10 +1422,10 @@ libainstall: all python-config
$(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
$(INSTALL_SCRIPT) python-config.py $(DESTDIR)$(LIBPL)/python-config.py
$(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(LDVERSION)-config
- @if [ -s Modules/python.exp -a \
+ @if [ -s Programs/python.exp -a \
"`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
echo; echo "Installing support files for building shared extension modules on AIX:"; \
- $(INSTALL_DATA) Modules/python.exp \
+ $(INSTALL_DATA) Programs/python.exp \
$(DESTDIR)$(LIBPL)/python.exp; \
echo; echo "$(LIBPL)/python.exp"; \
$(INSTALL_SCRIPT) $(srcdir)/Modules/makexp_aix \
@@ -1381,7 +1455,7 @@ sharedinstall: sharedmods
# the Makefile in Mac
#
#
-# This target is here for backward compatiblity, previous versions of Python
+# This target is here for backward compatibility, previous versions of Python
# hadn't integrated framework installation in the normal install process.
frameworkinstall: install
@@ -1534,10 +1608,13 @@ clean: pycremoval
find build -name '*.py[co]' -exec rm -f {} ';' || true
-rm -f pybuilddir.txt
-rm -f Lib/lib2to3/*Grammar*.pickle
- -rm -f Modules/_testembed Modules/_freeze_importlib
+ -rm -f Programs/_testembed Programs/_freeze_importlib
+ -rm -rf build
profile-removal:
find . -name '*.gc??' -exec rm -f {} ';'
+ find . -name '*.profclang?' -exec rm -f {} ';'
+ find . -name '*.dyn' -exec rm -f {} ';'
rm -f $(COVERAGE_INFO)
rm -rf $(COVERAGE_REPORT)
@@ -1558,7 +1635,7 @@ distclean: clobber
done
-rm -f core Makefile Makefile.pre config.status \
Modules/Setup Modules/Setup.local Modules/Setup.config \
- Modules/ld_so_aix Modules/python.exp Misc/python.pc
+ Modules/ld_so_aix Programs/python.exp Misc/python.pc
-rm -f python*-gdb.py
find $(srcdir)/[a-zA-Z]* '(' -name '*.fdc' -o -name '*~' \
-o -name '[@,#]*' -o -name '*.old' \
@@ -1605,7 +1682,7 @@ funny:
-o -print
# Perform some verification checks on any modified files.
-patchcheck:
+patchcheck: all
$(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
# Dependencies
diff --git a/Misc/ACKS b/Misc/ACKS
index 6824554d16..001373b940 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -46,6 +46,7 @@ Pehr Anderson
Erik Andersén
Oliver Andrich
Ross Andrus
+Fabrice Aneche
Juancarlo Añez
Chris Angelico
Jérémy Anger
@@ -71,6 +72,7 @@ Dwayne Bailey
Stig Bakken
Greg Ball
Luigi Ballabio
+Thomas Ballinger
Jeff Balogh
Manuel Balsera
Matt Bandy
@@ -88,7 +90,9 @@ Matthew Barnett
Richard Barran
Cesar Eduardo Barros
Des Barry
+Emanuel Barry
Ulf Bartelt
+Campbell Barton
Don Bashford
Pior Bastida
Nick Bastin
@@ -98,13 +102,16 @@ Michael R Bax
Anthony Baxter
Mike Bayer
Samuel L. Bayer
+Tommy Beadle
Donald Beaudry
David Beazley
John Beck
+Ingolf Becker
Neal Becker
Robin Becker
Torsten Becker
Bill Bedford
+Michał Bednarski
Ian Beer
Stefan Behnel
Reimer Behrends
@@ -152,6 +159,7 @@ Wouter Bolsterlee
Gawain Bolton
Forest Bond
Gregory Bond
+Médéric Boquien
Matias Bordese
Jonas Borgström
Jurjen Bos
@@ -167,6 +175,7 @@ Monty Brandenberg
Georg Brandl
Christopher Brannon
Terrence Brannon
+Erin Braswell
Sven Brauch
Germán M. Bravo
Erik Bray
@@ -191,6 +200,7 @@ Ian Bruntlett
Floris Bruynooghe
Matt Bryant
Stan Bubrouski
+Colm Buckley
Erik de Bueger
Jan-Hein Bührman
Lars Buitinck
@@ -232,10 +242,12 @@ Pascal Chambon
John Chandler
Hye-Shik Chang
Jeffrey Chang
+Gavin Chappell
Godefroid Chapelle
Brad Chapman
Greg Chapman
Mitch Chapman
+Matt Chaput
Yogesh Chaudhari
David Chaum
Nicolas Chauvat
@@ -343,7 +355,6 @@ Humberto Diogenes
Yves Dionne
Daniel Dittmar
Josip Djolonga
-Walter Dörwald
Jaromir Dolecek
Ismail Donmez
Robert Donohue
@@ -371,6 +382,7 @@ Eugene Dvurechenski
Karmen Dykstra
Josip Dzolonga
Maxim Dzumanenko
+Walter Dörwald
Hans Eckardt
Rodolpho Eckhardt
Ulrich Eckhardt
@@ -386,6 +398,7 @@ Lance Ellinghaus
Daniel Ellis
Phil Elson
David Ely
+Victor van den Elzen
Jeff Epler
Tom Epperly
Gökcen Eraslan
@@ -477,7 +490,9 @@ Matthieu Gautier
Stephen M. Gava
Xavier de Gaye
Harry Henry Gebel
+Tamás Bence Gedai
Marius Gedminas
+Jan-Philip Gehrcke
Thomas Gellekum
Gabriel Genellina
Christos Georgiou
@@ -490,6 +505,7 @@ Johannes Gijsbers
Michael Gilfix
Julian Gindi
Yannick Gingras
+Neil Girdhar
Matt Giuca
Wim Glenn
Michael Goderbauer
@@ -504,6 +520,7 @@ Shelley Gooch
David Goodger
Hans de Graaff
Tim Graham
+Kim Gräsman
Nathaniel Gray
Eddy De Greef
Grant Griffin
@@ -578,6 +595,7 @@ Kevan Heydon
Wouter van Heyst
Kelsey Hightower
Jason Hildebrand
+Aaron Hill
Richie Hindle
Konrad Hinsen
David Hobley
@@ -615,6 +633,7 @@ Alan Hourihane
Ken Howard
Brad Howes
Mike Hoy
+Ben Hoyt
Chiu-Hsiang Hsu
Chih-Hao Huang
Christian Hudon
@@ -633,8 +652,10 @@ Catalin Iacob
Mihai Ibanescu
Ali Ikinci
Aaron Iles
+Thomas Ilsche
Lars Immisch
Bobby Impollonia
+Naoki Inada
Meador Inge
Peter Ingebretson
Tony Ingraldi
@@ -653,18 +674,22 @@ Kjetil Jacobsen
Bertrand Janin
Geert Jansen
Jack Jansen
+Hans-Peter Jansen
Bill Janssen
Thomas Jarosch
Juhana Jauhiainen
Rajagopalasarma Jayakrishnan
+Devin Jeanpierre
Zbigniew Jędrzejewski-Szmek
Julien Jehannet
+Muhammad Jehanzeb
Drew Jenkins
Flemming Kjær Jensen
Philip H. Jensen
Philip Jenvey
MunSic Jeong
Chris Jerdonek
+Joe Jevnik
Jim Jewett
Pedro Diaz Jimenez
Orjan Johansen
@@ -678,6 +703,7 @@ Thomas Jollans
Nicolas Joly
Brian K. Jones
Evan Jones
+Glenn Jones
Jeremy Jones
Richard Jones
Irmen de Jong
@@ -700,12 +726,15 @@ Peter van Kampen
Jan Kanis
Rafe Kaplan
Jacob Kaplan-Moss
+Allison Kaptur
Janne Karila
Per Øyvind Karlsen
Anton Kasyanov
Lou Kates
Makoto Kato
Hiroaki Kawai
+Dmitry Kazakov
+Brian Kearns
Sebastien Keim
Ryan Kelly
Dan Kenigsberg
@@ -716,11 +745,13 @@ Magnus Kessler
Lawrence Kesteloot
Vivek Khera
Dhiru Kholia
+Akshit Khurana
Mads Kiilerich
Jason Killen
Jan Kim
Taek Joo Kim
Sam Kimbrel
+James King
W. Trevor King
Paul Kippes
Steve Kirsch
@@ -740,6 +771,7 @@ Pat Knight
Jeff Knupp
Kubilay Kocak
Greg Kochanski
+Manvisha Kodali
Damon Kohler
Marko Kohtala
Vajrasky Kok
@@ -749,6 +781,7 @@ Arkady Koplyarov
Peter A. Koren
Марк Коренберг
Vlad Korolev
+Susumu Koshiba
Joseph Koshy
Daniel Kozan
Jerzy Kozera
@@ -768,7 +801,9 @@ Steven Kryskalla
Andrew Kuchling
Dave Kuhlman
Jon Kuhn
+Upendra Kumar
Toshio Kuratomi
+Ilia Kurenkov
Vladimir Kushnir
Erno Kuusela
Ross Lagerwall
@@ -789,9 +824,11 @@ Soren Larsen
Amos Latteier
Piers Lauder
Ben Laurie
+Yoni Lavi
Simon Law
Julia Lawall
Chris Lawrence
+Mark Lawrence
Chris Laws
Brian Leair
Mathieu Leduc-Hamel
@@ -833,6 +870,7 @@ Ross Light
Shawn Ligocki
Martin Ligr
Gediminas Liktaras
+Vitor de Lima
Grant Limberg
Christopher Lindblad
Ulf A. Lindgren
@@ -844,7 +882,6 @@ Everett Lipman
Mirko Liss
Nick Lockwood
Stephanie Lockwood
-Martin von Löwis
Hugo Lopes Tavares
Guillermo López-Anglada
Anne Lord
@@ -852,7 +889,9 @@ Tom Loredo
Justin Love
Ned Jackson Lovely
Peter Lovett
+Chalmer Lowe
Jason Lowe
+Martin von Löwis
Tony Lownds
Ray Loyzaga
Kang-Hao (Kenny) Lu
@@ -905,9 +944,11 @@ Lucas Maystre
Arnaud Mazin
Pam McA'Nulty
Matt McClure
+Jack McCracken
Rebecca McCreary
Kirk McDonald
Chris McDonough
+Michael McFadden
Greg McFarlane
Alan McIntyre
Jessica McKellar
@@ -961,6 +1002,7 @@ Peter Moody
Paul Moore
Ross Moore
Ben Morgan
+Emily Morehouse
Derek Morr
James A Morrison
Martin Morrison
@@ -979,6 +1021,7 @@ Louis Munro
R. David Murray
Matti Mäki
Jörg Müller
+Kaushik N
Dale Nagata
John Nagle
Takahiro Nakayama
@@ -1009,10 +1052,12 @@ Neal Norwitz
Mikhail Novikov
Michal Nowikowski
Steffen Daode Nurpmeso
+Thomas Nyberg
Nigel O'Brian
John O'Connor
Kevin O'Connor
Tim O'Malley
+Dan O'Reilly
Zooko O'Whielacronx
Aaron Oakley
James Oakley
@@ -1039,6 +1084,8 @@ Russel Owen
Joonas Paalasmaa
Martin Packman
Shriphani Palakodety
+Julien Palard
+Aviv Palivoda
Ondrej Palkovsky
Mike Pall
Todd R. Palmer
@@ -1053,11 +1100,14 @@ M. Papillon
Peter Parente
Alexandre Parenteau
Dan Parisien
+HyeSoo Park
William Park
+Claude Paroz
Heikki Partanen
Harri Pasanen
Gaël Pasgrimaud
Ashish Nitin Patil
+Alecsandru Patrascu
Randy Pausch
Samuele Pedroni
Justin Peel
@@ -1116,6 +1166,7 @@ Florian Preinstorfer
Amrit Prem
Paul Prescod
Donovan Preston
+Eric Price
Paul Price
Iuliia Proskurnia
Dorian Pula
@@ -1131,7 +1182,10 @@ Thomas Rachel
Ram Rachum
Jérôme Radix
Burton Radons
+Abhilash Raj
+Shorya Raj
Jeff Ramnani
+Varpu Rantala
Brodie Rao
Senko Rasic
Antti Rasinen
@@ -1173,9 +1227,12 @@ Mohd Sanad Zaki Rizvi
Davide Rizzo
Anthony Roach
Carl Robben
+Ben Roberts
Mark Roberts
Andy Robinson
Jim Robinson
+Yolanda Robla
+Daniel Rocco
Mark Roddy
Kevin Rodgers
Sean Rodman
@@ -1189,8 +1246,10 @@ Case Roole
Timothy Roscoe
Erik Rose
Mark Roseman
+Josh Rosenberg
Jim Roskind
Brian Rosner
+Ignacio Rossi
Guido van Rossum
Just van Rossum
Hugo van Rossum
@@ -1207,6 +1266,7 @@ Demur Rumed
Audun S. Runde
Eran Rundstein
Rauli Ruohonen
+Laura Rupprecht
Jeff Rush
Sam Rushing
Mark Russell
@@ -1221,6 +1281,7 @@ Sébastien Sablé
Suman Saha
Hajime Saitou
George Sakkis
+Victor Salgado
Rich Salz
Kevin Samborn
Adrian Sampson
@@ -1249,6 +1310,7 @@ Ralf Schmitt
Michael Schneider
Peter Schneider-Kamp
Arvin Schnell
+Nofar Schnider
Scott Schram
Robin Schreiber
Chad J. Schroeder
@@ -1273,11 +1335,13 @@ Pete Sevander
Denis Severson
Ian Seyer
Dmitry Shachnev
+Anish Shah
Daniel Shahaf
Mark Shannon
Ha Shao
Richard Shapiro
Varun Sharma
+Daniel Shaulov
Vlad Shcherbina
Justin Sheehy
Charlie Shepherd
@@ -1325,7 +1389,9 @@ Nir Soffer
Paul Sokolovsky
Evgeny Sologubov
Cody Somerville
+Anthony Sottile
Edoardo Spadolini
+Geoffrey Spear
Clay Spence
Stefan Sperling
Nicholas Spies
@@ -1372,6 +1438,7 @@ Thenault Sylvain
Péter Szabó
John Szakmeister
Amir Szekely
+Maciej Szulik
Arfrever Frehtes Taifersar Arahesis
Hideaki Takahashi
Takase Arihiro
@@ -1385,6 +1452,7 @@ Steven Taschuk
Amy Taylor
Monty Taylor
Anatoly Techtonik
+Gustavo Temple
Mikhail Terekhov
Victor Terrón
Richard M. Tew
@@ -1418,6 +1486,7 @@ David Townshend
Nathan Trapuzzano
Laurence Tratt
Alberto Trevino
+Mayank Tripathi
Matthias Troffaes
Tom Tromey
John Tromp
@@ -1440,9 +1509,11 @@ Roger Upole
Daniel Urban
Michael Urman
Hector Urtubia
+Lukas Vacek
Ville Vainio
Andi Vajda
Case Van Horsen
+John Mark Vandenberg
Kyle VanderBeek
Andrew Vant
Atul Varma
@@ -1450,11 +1521,13 @@ Dmitry Vasiliev
Sebastian Ortiz Vasquez
Alexandre Vassalotti
Nadeem Vawda
+Sye van der Veen
Frank Vercruesse
Mike Verdone
Jaap Vermeulen
Nikita Vetoshkin
Al Vezza
+Petr Victorin
Jacques A. Vidrine
John Viega
Dino Viehland
@@ -1464,11 +1537,14 @@ Norman Vine
Pauli Virtanen
Frank Visser
Johannes Vogel
+Michael Vogt
+Radu Voicilas
Alex Volkov
Guido Vranken
Martijn Vries
Sjoerd de Vries
Jonas Wagner
+Daniel Wagner-Hall
Niki W. Waibel
Wojtek Walczak
Charles Waldman
@@ -1488,6 +1564,7 @@ Bob Watson
David Watson
Aaron Watters
Henrik Weber
+Leon Weber
Corran Webster
Glyn Webster
Phil Webster
@@ -1507,6 +1584,7 @@ Felix Wiemann
Gerry Wiener
Frank Wierzbicki
Santoso Wijaya
+Chris Wilcox
Bryce "Zooko" Wilcox-O'Hearn
Timothy Wild
Jakub Wilk
@@ -1517,6 +1595,8 @@ Sue Williams
Carol Willing
Steven Willis
Frank Willison
+Alex Willmer
+David Wilson
Geoff Wilson
Greg V. Wilson
J Derek Wilson
@@ -1542,11 +1622,13 @@ Gordon Worley
Darren Worrall
Thomas Wouters
Daniel Wozniak
+Wei Wu
Heiko Wundram
Doug Wyatt
Xiang Zhang
Robert Xiao
Florent Xicluna
+Arnon Yaari
Hirokazu Yamamoto
Ka-Ping Yee
Jason Yeo
diff --git a/Misc/HISTORY b/Misc/HISTORY
index a9e2910ee6..67823337b7 100644
--- a/Misc/HISTORY
+++ b/Misc/HISTORY
@@ -18,13 +18,13 @@ Core and Builtins
- Issue #16046: Fix loading sourceless legacy .pyo files.
-- Issue #16060: Fix refcounting bug when __trunc__ returns an object
- whose __int__ gives a non-integer. Patch by Serhiy Storchaka.
+- Issue #16060: Fix refcounting bug when `__trunc__()` returns an object whose
+ `__int__()` gives a non-integer. Patch by Serhiy Storchaka.
Extension Modules
-----------------
-- Issue #16012: Fix a regression in pyexpat. The parser's UseForeignDTD()
+- Issue #16012: Fix a regression in pyexpat. The parser's `UseForeignDTD()`
method doesn't require an argument again.
@@ -36,26 +36,26 @@ What's New in Python 3.3.0 Release Candidate 3?
Core and Builtins
-----------------
-- Issue #15900: Fix reference leak in PyUnicode_TranslateCharmap().
+- Issue #15900: Fix reference leak in `PyUnicode_TranslateCharmap()`.
- Issue #15926: Fix crash after multiple reinitializations of the interpreter.
- Issue #15895: Fix FILE pointer leak in one error branch of
- PyRun_SimpleFileExFlags() when filename points to a pyc/pyo file, closeit
- is false an and set_main_loader() fails.
+ `PyRun_SimpleFileExFlags()` when filename points to a pyc/pyo file, closeit is
+ false an and set_main_loader() fails.
- Fixes for a few crash and memory leak regressions found by Coverity.
Library
-------
-- Issue #15882: Change _decimal to accept any coefficient tuple when
- constructing infinities. This is done for backwards compatibility
- with decimal.py: Infinity coefficients are undefined in _decimal
- (in accordance with the specification).
+- Issue #15882: Change `_decimal` to accept any coefficient tuple when
+ constructing infinities. This is done for backwards compatibility with
+ decimal.py: Infinity coefficients are undefined in _decimal (in accordance
+ with the specification).
-- Issue #15925: Fix a regression in email.util where the parsedate() and
- parsedate_tz() functions did not return None anymore when the argument could
+- Issue #15925: Fix a regression in `email.util` where the `parsedate()` and
+ `parsedate_tz()` functions did not return None anymore when the argument could
not be parsed.
Extension Modules
@@ -67,7 +67,7 @@ Extension Modules
- Issue #15977: Fix memory leak in Modules/_ssl.c when the function
_set_npn_protocols() is called multiple times, thanks to Daniel Sommermann.
-- Issue #15969: faulthandler module: rename dump_tracebacks_later() to
+- Issue #15969: `faulthandler` module: rename dump_tracebacks_later() to
dump_traceback_later() and cancel_dump_tracebacks_later() to
cancel_dump_traceback_later().
@@ -83,35 +83,37 @@ Core and Builtins
-----------------
- Issue #13992: The trashcan mechanism is now thread-safe. This eliminates
- sporadic crashes in multi-thread programs when several long deallocator
- chains ran concurrently and involved subclasses of built-in container
- types.
+ sporadic crashes in multi-thread programs when several long deallocator chains
+ ran concurrently and involved subclasses of built-in container types.
-- Issue #15784: Modify OSError.__str__() to better distinguish between
- errno error numbers and Windows error numbers.
+- Issue #15784: Modify `OSError`.__str__() to better distinguish between errno
+ error numbers and Windows error numbers.
- Issue #15781: Fix two small race conditions in import's module locking.
Library
-------
-- Issue #15847: Fix a regression in argparse, which did not accept tuples
- as argument lists anymore.
+- Issue #17158: Add 'symbols' to help() welcome message; clarify
+ 'modules spam' messages.
+
+- Issue #15847: Fix a regression in argparse, which did not accept tuples as
+ argument lists anymore.
-- Issue #15828: Restore support for C extensions in imp.load_module().
+- Issue #15828: Restore support for C extensions in `imp.load_module()`.
-- Issue #15340: Fix importing the random module when /dev/urandom cannot
- be opened. This was a regression caused by the hash randomization patch.
+- Issue #15340: Fix importing the random module when ``/dev/urandom`` cannot be
+ opened. This was a regression caused by the hash randomization patch.
-- Issue #10650: Deprecate the watchexp parameter of the Decimal.quantize()
+- Issue #10650: Deprecate the watchexp parameter of the `Decimal.quantize()`
method.
-- Issue #15785: Modify window.get_wch() API of the curses module: return
- a character for most keys, and an integer for special keys, instead of
- always returning an integer. So it is now possible to distinguish special
- keys like keypad keys.
+- Issue #15785: Modify `window.get_wch()` API of the curses module: return a
+ character for most keys, and an integer for special keys, instead of always
+ returning an integer. So it is now possible to distinguish special keys like
+ keypad keys.
-- Issue #14223: Fix window.addch() of the curses module for special characters
+- Issue #14223: Fix `window.addch()` of the curses module for special characters
like curses.ACS_HLINE: the Python function addch(int) and addch(bytes) is now
calling the C function waddch()/mvwaddch() (as it was done in Python 3.2),
instead of wadd_wch()/mvwadd_wch(). The Python function addch(str) is still
@@ -127,10 +129,10 @@ Build
Documentation
-------------
-- Issue #15814: The memoryview enhancements in 3.3.0 accidentally permitted
- the hashing of multi-dimensional memorviews and memoryviews with multi-byte
- item formats. The intended restrictions have now been documented - they
- will be correctly enforced in 3.3.1
+- Issue #15814: The memoryview enhancements in 3.3.0 accidentally permitted the
+ hashing of multi-dimensional memorviews and memoryviews with multi-byte item
+ formats. The intended restrictions have now been documented - they will be
+ correctly enforced in 3.3.1.
What's New in Python 3.3.0 Release Candidate 1?
@@ -144,131 +146,123 @@ Core and Builtins
- Issue #15573: memoryview comparisons are now performed by value with full
support for any valid struct module format definition.
-- Issue #15316: When an item in the fromlist for __import__ doesn't exist,
+- Issue #15316: When an item in the fromlist for `__import__()` doesn't exist,
don't raise an error, but if an exception is raised as part of an import do
let that propagate.
-- Issue #15778: ensure that str(ImportError(msg)) returns a str
- even when msg isn't a str.
+- Issue #15778: Ensure that ``str(ImportError(msg))`` returns a str even when
+ msg isn't a str.
-- Issue #2051: Source file permission bits are once again correctly
- copied to the cached bytecode file. (The migration to importlib
- reintroduced this problem because these was no regression test. A test
- has been added as part of this patch)
+- Issue #2051: Source file permission bits are once again correctly copied to
+ the cached bytecode file. (The migration to importlib reintroduced this
+ problem because these was no regression test. A test has been added as part of
+ this patch)
-- Issue #15761: Fix crash when PYTHONEXECUTABLE is set on Mac OS X.
+- Issue #15761: Fix crash when ``PYTHONEXECUTABLE`` is set on Mac OS X.
-- Issue #15726: Fix incorrect bounds checking in PyState_FindModule.
- Patch by Robin Schreiber.
+- Issue #15726: Fix incorrect bounds checking in PyState_FindModule. Patch by
+ Robin Schreiber.
-- Issue #15604: Update uses of PyObject_IsTrue() to check for and handle
+- Issue #15604: Update uses of `PyObject_IsTrue()` to check for and handle
errors correctly. Patch by Serhiy Storchaka.
-- Issue #14846: importlib.FileFinder now handles the case where the
- directory being searched is removed after a previous import attempt
+- Issue #14846: `importlib.FileFinder` now handles the case where the directory
+ being searched is removed after a previous import attempt.
Library
-------
-- Issue #13370: Ensure that ctypes works on Mac OS X when Python is
- compiled using the clang compiler
+- Issue #13370: Ensure that ctypes works on Mac OS X when Python is compiled
+ using the clang compiler.
-- Issue #13072: The array module's 'u' format code is now deprecated and
- will be removed in Python 4.0.
+- Issue #13072: The array module's 'u' format code is now deprecated and will be
+ removed in Python 4.0.
- Issue #15544: Fix Decimal.__float__ to work with payload-carrying NaNs.
-- Issue #15249: BytesGenerator now correctly mangles From lines (when
+- Issue #15776: Allow pyvenv to work in existing directory with --clean.
+
+- Issue #15249: email's BytesGenerator now correctly mangles From lines (when
requested) even if the body contains undecodable bytes.
- Issue #15777: Fix a refleak in _posixsubprocess.
-- Issue ##665194: Update email.utils.localtime to use datetime.astimezone and
+- Issue #665194: Update `email.utils.localtime` to use datetime.astimezone and
correctly handle historic changes in UTC offsets.
- Issue #15199: Fix JavaScript's default MIME type to application/javascript.
Patch by Bohuslav Kabrda.
-- Issue #12643: code.InteractiveConsole now respects sys.excepthook when
- displaying exceptions (Patch by Aaron Iles)
-
-- Issue #13579: string.Formatter now understands the 'a' conversion specifier.
+- Issue #12643: `code.InteractiveConsole` now respects `sys.excepthook` when
+ displaying exceptions. Patch by Aaron Iles.
-- Issue #15793: Stack corruption in ssl.RAND_egd().
- Patch by Serhiy Storchaka.
+- Issue #13579: `string.Formatter` now understands the 'a' conversion specifier.
-- Issue #15595: Fix subprocess.Popen(universal_newlines=True)
- for certain locales (utf-16 and utf-32 family). Patch by Chris Jerdonek.
+- Issue #15595: Fix ``subprocess.Popen(universal_newlines=True)`` for certain
+ locales (utf-16 and utf-32 family). Patch by Chris Jerdonek.
- Issue #15477: In cmath and math modules, add workaround for platforms whose
system-supplied log1p function doesn't respect signs of zeros.
-- Issue #15715: importlib.__import__() will silence an ImportError when the use
- of fromlist leads to a failed import.
+- Issue #15715: `importlib.__import__()` will silence an ImportError when the
+ use of fromlist leads to a failed import.
-- Issue #14669: Fix pickling of connections and sockets on MacOSX
- by sending/receiving an acknowledgment after file descriptor transfer.
- TestPicklingConnection has been reenabled for MacOSX.
+- Issue #14669: Fix pickling of connections and sockets on Mac OS X by
+ sending/receiving an acknowledgment after file descriptor transfer.
+ TestPicklingConnection has been reenabled for Mac OS X.
- Issue #11062: Fix adding a message from file to Babyl mailbox.
-- Issue #15646: Prevent equivalent of a fork bomb when using
- multiprocessing on Windows without the "if __name__ == '__main__'"
- idiom.
+- Issue #15646: Prevent equivalent of a fork bomb when using `multiprocessing`
+ on Windows without the ``if __name__ == '__main__'`` idiom.
-- Issue #15678: Fix IDLE menus when started from OS X command line
- (3.3.0b2 regression).
-
-C API
------
-
-Extension Modules
------------------
+IDLE
+----
-Tools/Demos
------------
+- Issue #15678: Fix IDLE menus when started from OS X command line (3.3.0b2
+ regression).
Documentation
-------------
-- Issue #14674: Add a discussion of the json module's standard compliance.
+- Touched up the Python 2 to 3 porting guide.
+
+- Issue #14674: Add a discussion of the `json` module's standard compliance.
Patch by Chris Rebert.
- Create a 'Concurrent Execution' section in the docs, and split up the
'Optional Operating System Services' section to use a more user-centric
- classification scheme (splitting them across the new CE section, IPC and
- text processing). Operating system limitatons can be reflected with
- the Sphinx ``:platform:`` tag, it doesn't make sense as part of the Table of
- Contents.
+ classification scheme (splitting them across the new CE section, IPC and text
+ processing). Operating system limitations can be reflected with the Sphinx
+ ``:platform:`` tag, it doesn't make sense as part of the Table of Contents.
-- Issue #4966: Bring the sequence docs up to date for the Py3k transition
- and the many language enhancements since they were original written
+- Issue #4966: Bring the sequence docs up to date for the Py3k transition and
+ the many language enhancements since they were original written.
- The "path importer" misnomer has been replaced with Eric Snow's
- more-awkward-but-at-least-not-wrong suggestion of "path based finder" in
- the import system reference docs
+ more-awkward-but-at-least-not-wrong suggestion of "path based finder" in the
+ import system reference docs.
-- Issue #15640: Document importlib.abc.Finder as deprecated.
+- Issue #15640: Document `importlib.abc.Finder` as deprecated.
-- Issue #15630: Add an example for "continue" stmt in the tutorial. Patch by
+- Issue #15630: Add an example for "continue" stmt in the tutorial. Patch by
Daniel Ellis.
Tests
-----
- Issue #15747: ZFS always returns EOPNOTSUPP when attempting to set the
- UF_IMMUTABLE flag (via either chflags or lchflags); refactor affected
- tests in test_posix.py to account for this.
+ UF_IMMUTABLE flag (via either chflags or lchflags); refactor affected tests in
+ test_posix.py to account for this.
-- Issue #15285: Refactor the approach for testing connect timeouts using
- two external hosts that have been configured specifically for this type
- of test.
+- Issue #15285: Refactor the approach for testing connect timeouts using two
+ external hosts that have been configured specifically for this type of test.
-- Issue #15743: Remove the deprecated method usage in urllib tests. Patch by
+- Issue #15743: Remove the deprecated method usage in `urllib` tests. Patch by
Jeff Knupp.
-- Issue #15615: Add some tests for the json module's handling of invalid
- input data. Patch by Kushal Das.
+- Issue #15615: Add some tests for the `json` module's handling of invalid input
+ data. Patch by Kushal Das.
Build
-----
@@ -277,11 +271,11 @@ Build
- Pick up 32-bit launcher from PGO directory on 64-bit PGO build.
-- Drop PC\python_nt.h as it's not used. Add input dependency on custom
+- Drop ``PC\python_nt.h`` as it's not used. Add input dependency on custom
build step.
-- Issue #15511: Drop explicit dependency on pythonxy.lib from _decimal
- amd64 configuration.
+- Issue #15511: Drop explicit dependency on pythonxy.lib from _decimal amd64
+ configuration.
- Add missing PGI/PGO configurations for pywlauncher.
@@ -296,15 +290,15 @@ What's New in Python 3.3.0 Beta 2?
Core and Builtins
-----------------
-- Issue #15568: Fix the return value of "yield from" when StopIteration is
+- Issue #15568: Fix the return value of ``yield from`` when StopIteration is
raised by a custom iterator.
-- Issue #13119: sys.stdout and sys.stderr are now using "\r\n" newline on
+- Issue #13119: `sys.stdout` and `sys.stderr` are now using "\r\n" newline on
Windows, as Python 2.
- Issue #15534: Fix the fast-search function for non-ASCII Unicode strings.
-- Issue #15508: Fix the docstring for __import__ to have the proper default
+- Issue #15508: Fix the docstring for `__import__()` to have the proper default
value of 0 for 'level' and to not mention negative levels since they are not
supported.
@@ -317,17 +311,17 @@ Core and Builtins
byte code files) equal between 32-bit and 64-bit systems.
- Issue #1692335: Move initial exception args assignment to
- "BaseException.__new__" to help pickling of naive subclasses.
+ `BaseException.__new__()` to help pickling of naive subclasses.
-- Issue #12834: Fix PyBuffer_ToContiguous() for non-contiguous arrays.
+- Issue #12834: Fix `PyBuffer_ToContiguous()` for non-contiguous arrays.
-- Issue #15456: Fix code __sizeof__ after #12399 change. Patch by Serhiy
+- Issue #15456: Fix code `__sizeof__()` after #12399 change. Patch by Serhiy
Storchaka.
- Issue #15404: Refleak in PyMethodObject repr.
-- Issue #15394: An issue in PyModule_Create that caused references to be leaked
- on some error paths has been fixed. Patch by Julia Lawall.
+- Issue #15394: An issue in `PyModule_Create()` that caused references to be
+ leaked on some error paths has been fixed. Patch by Julia Lawall.
- Issue #15368: An issue that caused bytecode generation to be non-deterministic
has been fixed.
@@ -335,7 +329,7 @@ Core and Builtins
- Issue #15202: Consistently use the name "follow_symlinks" for new parameters
in os and shutil functions.
-- Issue #15314: __main__.__loader__ is now set correctly during interpreter
+- Issue #15314: ``__main__.__loader__`` is now set correctly during interpreter
startup.
- Issue #15111: When a module imported using 'from import' has an ImportError
@@ -350,57 +344,62 @@ Core and Builtins
- Issue #15110: Fix the tracebacks generated by "import xxx" to not show the
importlib stack frames.
+- Issue #16369: Global PyTypeObjects not initialized with PyType_Ready(...).
+
- Issue #15020: The program name used to search for Python's path is now
"python3" under Unix, not "python".
-- Issue #15033: Fix the exit status bug when modules invoked using -m swith,
+- Issue #15897: zipimport.c doesn't check return value of fseek().
+ Patch by Felipe Cruz.
+
+- Issue #15033: Fix the exit status bug when modules invoked using -m switch,
return the proper failure return value (1). Patch contributed by Jeff Knupp.
-- Issue #15229: An OSError subclass whose __init__ doesn't call back
+- Issue #15229: An `OSError` subclass whose __init__ doesn't call back
OSError.__init__ could produce incomplete instances, leading to crashes when
calling str() on them.
-- Issue 15307: Virtual environments now use symlinks with framework builds on
+- Issue #15307: Virtual environments now use symlinks with framework builds on
Mac OS X, like other POSIX builds.
Library
-------
-- Issue #15424: Add a __sizeof__ implementation for array objects. Patch by
+- Issue #14590: configparser now correctly strips inline comments when delimiter
+ occurs earlier without preceding space.
+
+- Issue #15424: Add a `__sizeof__()` implementation for array objects. Patch by
Ludwig Hähne.
- Issue #15576: Allow extension modules to act as a package's __init__ module.
-- Issue #15502: Have importlib.invalidate_caches() work on sys.meta_path instead
- of sys.path_importer_cache.
+- Issue #15502: Have `importlib.invalidate_caches()` work on `sys.meta_path`
+ instead of `sys.path_importer_cache`.
- Issue #15163: Pydoc shouldn't list __loader__ as module data.
- Issue #15471: Do not use mutable objects as defaults for
- importlib.__import__().
+ `importlib.__import__()`.
- Issue #15559: To avoid a problematic failure mode when passed to the bytes
- constructor, objects in the ipaddress module no longer implement __index__
- (they still implement __int__ as appropriate)
+ constructor, objects in the ipaddress module no longer implement `__index__()`
+ (they still implement `__int__()` as appropriate).
- Issue #15546: Fix handling of pathological input data in the peek() and
read1() methods of the BZ2File, GzipFile and LZMAFile classes.
-- Issue #13052: Fix IDLE crashing when replace string in Search/Replace dialog
- ended with '\'. Patch by Roger Serwy.
-
-- Issue #12655: Instead of requiring a custom type, os.sched_getaffinity and
- os.sched_setaffinity now use regular sets of integers to represent the CPUs a
- process is restricted to.
+- Issue #12655: Instead of requiring a custom type, `os.sched_getaffinity()` and
+ `os.sched_setaffinity()` now use regular sets of integers to represent the
+ CPUs a process is restricted to.
-- Issue #15538: Fix compilation of the getnameinfo() / getaddrinfo() emulation
- code. Patch by Philipp Hagemeister.
+- Issue #15538: Fix compilation of the `socket.getnameinfo()` /
+ `socket.getaddrinfo()` emulation code. Patch by Philipp Hagemeister.
- Issue #15519: Properly expose WindowsRegistryFinder in importlib (and use the
- correct term for it). Original patch by Eric Snow.
+ correct term for it). Original patch by Eric Snow.
- Issue #15502: Bring the importlib ABCs into line with the current state of the
- import protocols given PEP 420. Original patch by Eric Snow.
+ import protocols given PEP 420. Original patch by Eric Snow.
- Issue #15499: Launching a webbrowser in Unix used to sleep for a few seconds.
Original patch by Anton Barkovsky.
@@ -408,37 +407,36 @@ Library
- Issue #15463: The faulthandler module truncates strings to 500 characters,
instead of 100, to be able to display long file paths.
-- Issue #6056: Make multiprocessing use setblocking(True) on the sockets it
+- Issue #6056: Make `multiprocessing` use setblocking(True) on the sockets it
uses. Original patch by J Derek Wilson.
- Issue #15364: Fix sysconfig.get_config_var('srcdir') to be an absolute path.
-- Issue #15041: Update "see also" list in tkinter documentation.
-
-- Issue #15413: os.times() had disappeared under Windows.
+- Issue #15413: `os.times()` had disappeared under Windows.
-- Issue #15402: An issue in the struct module that caused sys.getsizeof to
+- Issue #15402: An issue in the struct module that caused `sys.getsizeof()` to
return incorrect results for struct.Struct instances has been fixed. Initial
patch by Serhiy Storchaka.
-- Issue #15232: When mangle_from is True, email.Generator now correctly mangles
- lines that start with 'From ' that occur in a MIME preamble or epilogue.
+- Issue #15232: When mangle_from is True, `email.Generator` now correctly
+ mangles lines that start with 'From ' that occur in a MIME preamble or
+ epilogue.
- Issue #15094: Incorrectly placed #endif in _tkinter.c. Patch by Serhiy
Storchaka.
-- Issue #13922: argparse no longer incorrectly strips '--'s that appear after
+- Issue #13922: `argparse` no longer incorrectly strips '--'s that appear after
the first one.
-- Issue #12353: argparse now correctly handles null argument values.
+- Issue #12353: `argparse` now correctly handles null argument values.
- Issue #10017, issue #14998: Fix TypeError using pprint on dictionaries with
user-defined types as keys or other unorderable keys.
-- Issue #15397: inspect.getmodulename() is now based directly on importlib via a
- new importlib.machinery.all_suffixes() API.
+- Issue #15397: `inspect.getmodulename()` is now based directly on importlib via
+ a new `importlib.machinery.all_suffixes()` API.
-- Issue #14635: telnetlib will use poll() rather than select() when possible to
+- Issue #14635: `telnetlib` will use poll() rather than select() when possible to
avoid failing due to the select() file descriptor limit.
- Issue #15180: Clarify posixpath.join() error message when mixing str & bytes.
@@ -455,7 +453,7 @@ Library
- Issue #15233: Python now guarantees that callables registered with the atexit
module will be called in a deterministic order.
-- Issue #15238: shutil.copystat now copies Linux "extended attributes".
+- Issue #15238: `shutil.copystat()` now copies Linux "extended attributes".
- Issue #15230: runpy.run_path now correctly sets __package__ as described in
the documentation.
@@ -465,42 +463,42 @@ Library
- Issue #15294: Fix a regression in pkgutil.extend_path()'s handling of nested
namespace packages.
-- Issue #15056: imp.cache_from_source() and source_from_cache() raise
- NotImplementedError when sys.implementation.cache_tag is set to None.
+- Issue #15056: `imp.cache_from_source()` and `imp.source_from_cache()` raise
+ NotImplementedError when `sys.implementation.cache_tag` is set to None.
-- Issue #15256: Grammatical mistake in exception raised by imp.find_module().
+- Issue #15256: Grammatical mistake in exception raised by `imp.find_module()`.
-- Issue #5931: wsgiref environ variable SERVER_SOFTWARE will specify an
+- Issue #5931: `wsgiref` environ variable SERVER_SOFTWARE will specify an
implementation specific term like CPython, Jython instead of generic "Python".
- Issue #13248: Remove obsolete argument "max_buffer_size" of BufferedWriter and
BufferedRWPair, from the io module.
-- Issue #13248: Remove obsolete argument "version" of argparse.ArgumentParser.
+- Issue #13248: Remove obsolete argument "version" of `argparse.ArgumentParser`.
- Issue #14814: Implement more consistent ordering and sorting behaviour for
ipaddress objects.
-- Issue #14814: ipaddress network objects correctly return NotImplemented when
+- Issue #14814: `ipaddress` network objects correctly return NotImplemented when
compared to arbitrary objects instead of raising TypeError.
- Issue #14990: Correctly fail with SyntaxError on invalid encoding declaration.
-- Issue #14814: ipaddress now provides more informative error messages when
+- Issue #14814: `ipaddress` now provides more informative error messages when
constructing instances directly (changes permitted during beta due to
provisional API status).
-- Issue #15247: FileIO now raises an error when given a file descriptor pointing
- to a directory.
+- Issue #15247: `io.FileIO` now raises an error when given a file descriptor
+ pointing to a directory.
- Issue #15261: Stop os.stat(fd) crashing on Windows when fd not open.
-- Issue #15166: Implement imp.get_tag() using sys.implementation.cache_tag.
+- Issue #15166: Implement `imp.get_tag()` using `sys.implementation.cache_tag`.
-- Issue #15210: Catch KeyError when importlib.__init__ can't find
+- Issue #15210: Catch KeyError when `importlib.__init__()` can't find
_frozen_importlib in sys.modules, not ImportError.
-- Issue #15030: importlib.abc.PyPycLoader now supports the new source size
+- Issue #15030: `importlib.abc.PyPycLoader` now supports the new source size
header field in .pyc files.
- Issue #5346: Preserve permissions of mbox, MMDF and Babyl mailbox files on
@@ -513,7 +511,7 @@ Library
renamed over the old file when flush() is called on an mbox, MMDF or Babyl
mailbox.
-- Issue 10924: Fixed crypt.mksalt() to use a RNG that is suitable for
+- Issue #10924: Fixed `crypt.mksalt()` to use a RNG that is suitable for
cryptographic purpose.
- Issue #15184: Ensure consistent results of OS X configuration tailoring for
@@ -524,10 +522,10 @@ Library
C API
-----
-- Issue #15610: PyImport_ImportModuleEx() now uses a 'level' of 0 instead of -1.
+- Issue #15610: `PyImport_ImportModuleEx()` now uses a 'level' of 0 instead of -1.
-- Issues #15169, #14599: Strip out the C implementation of
- imp.source_from_cache() used by PyImport_ExecCodeModuleWithPathnames() and
+- Issue #15169, issue #14599: Strip out the C implementation of
+ `imp.source_from_cache()` used by PyImport_ExecCodeModuleWithPathnames() and
used the Python code instead. Leads to PyImport_ExecCodeModuleObject() to not
try to infer the source path from the bytecode path as
PyImport_ExecCodeModuleWithPathnames() does.
@@ -535,14 +533,17 @@ C API
Extension Modules
-----------------
-- Issue #15676: Now "mmap" check for empty files before doing the
- offset check. Patch by Steven Willis.
-
-- Issue #6493: An issue in ctypes on Windows that caused structure bitfields
- of type ctypes.c_uint32 and width 32 to incorrectly be set has been fixed.
+- Issue #6493: An issue in ctypes on Windows that caused structure bitfields of
+ type `ctypes.c_uint32` and width 32 to incorrectly be set has been fixed.
- Issue #15194: Update libffi to the 3.0.11 release.
+IDLE
+----
+
+- Issue #13052: Fix IDLE crashing when replace string in Search/Replace dialog
+ ended with ``\``. Patch by Roger Serwy.
+
Tools/Demos
-----------
@@ -562,8 +563,10 @@ Tools/Demos
Documentation
-------------
-- Issue #15444: Use proper spelling for non-ASCII contributor names. Patch
- by Serhiy Storchaka.
+- Issue #15041: Update "see also" list in tkinter documentation.
+
+- Issue #15444: Use proper spelling for non-ASCII contributor names. Patch by
+ Serhiy Storchaka.
- Issue #15295: Reorganize and rewrite the documentation on the import system.
@@ -578,25 +581,29 @@ Documentation
"changed" since they will no longer work with modules directly imported by
import itself.
-- Issue #13557: Clarify effect of giving two different namespaces to exec or
- execfile().
+- Issue #13557: Clarify effect of giving two different namespaces to `exec()` or
+ `execfile()`.
-- Issue #15250: Document that filecmp.dircmp compares files shallowly. Patch
+- Issue #15250: Document that `filecmp.dircmp()` compares files shallowly. Patch
contributed by Chris Jerdonek.
+- Issue #15442: Expose the default list of directories ignored by
+ `filecmp.dircmp()` as a module attribute, and expand the list to more modern
+ values.
+
Tests
-----
-- Issue #15467: Move helpers for __sizeof__ tests into test_support. Patch by
- Serhiy Storchaka.
+- Issue #15467: Move helpers for `__sizeof__()` tests into test_support. Patch
+ by Serhiy Storchaka.
- Issue #15320: Make iterating the list of tests thread-safe when running tests
in multiprocess mode. Patch by Chris Jerdonek.
-- Issue #15168: Move importlib.test to test.test_importlib.
+- Issue #15168: Move `importlib.test` to `test.test_importlib`.
- Issue #15091: Reactivate a test on UNIX which was failing thanks to a
- forgotten importlib.invalidate_caches() call.
+ forgotten `importlib.invalidate_caches()` call.
- Issue #15230: Adopted a more systematic approach in the runpy tests.
@@ -629,6 +636,8 @@ Build
- Issue #14018: Fix OS X Tcl/Tk framework checking when using OS X SDKs.
+- Issue #16256: OS X installer now sets correct permissions for doc directory.
+
- Issue #15431: Add _freeze_importlib project to regenerate importlib.h on
Windows. Patch by Kristján Valur Jónsson.
@@ -664,14 +673,9 @@ Core and Builtins
- Issue #11626: Add _SizeT functions to stable ABI.
-- Issue #15146: Add PyType_FromSpecWithBases. Patch by Robin Schreiber.
-
- Issue #15142: Fix reference leak when deallocating instances of types
created using PyType_FromSpec().
-- Issue #15042: Add PyState_AddModule and PyState_RemoveModule. Add version
- guard for Py_LIMITED_API additions. Patch by Robin Schreiber.
-
- Issue #10053: Don't close FDs when FileIO.__init__ fails. Loosely based on
the work by Hirokazu Yamamoto.
@@ -699,9 +703,6 @@ Core and Builtins
Library
-------
-- Issue #9803: Don't close IDLE on saving if breakpoint is open.
- Patch by Roger Serwy.
-
- Issue #12288: Consider '0' and '0.0' as valid initialvalue
for tkinter SimpleDialog.
@@ -720,14 +721,8 @@ Library
- Issue #15514: Correct __sizeof__ support for cpu_set.
Patch by Serhiy Storchaka.
-- Issue #15187: Bugfix: remove temporary directories test_shutil was leaving
- behind.
-
- Issue #15177: Added dir_fd parameter to os.fwalk().
-- Issue #15176: Clarified behavior, documentation, and implementation
- of os.listdir().
-
- Issue #15061: Re-implemented hmac.compare_digest() in C to prevent further
timing analysis and to support all buffer protocol aware objects as well as
ASCII only str instances safely.
@@ -787,7 +782,7 @@ Library
- Issue #15008: Implement PEP 362 "Signature Objects".
Patch by Yury Selivanov.
-- Issue: #15138: base64.urlsafe_{en,de}code() are now 3-4x faster.
+- Issue #15138: base64.urlsafe_{en,de}code() are now 3-4x faster.
- Issue #444582: Add shutil.which, for finding programs on the system path.
Original patch by Erik Demaine, with later iterations by Jan Killian
@@ -827,10 +822,6 @@ Library
- Issue #15006: Allow equality comparison between naive and aware
time or datetime objects.
-- Issue #14982: Document that pkgutil's iteration functions require the
- non-standard iter_modules() method to be defined by an importer (something
- the importlib importers do not define).
-
- Issue #15036: Mailbox no longer throws an error if a flush is done
between operations when removing or changing multiple items in mbox,
MMDF, or Babyl mailboxes.
@@ -898,9 +889,6 @@ Library
- Issue #14969: Better handling of exception chaining in contextlib.ExitStack
-- Issue #14962: Update text coloring in IDLE shell window after changing
- options. Patch by Roger Serwy.
-
- Issue #14963: Convert contextlib.ExitStack.__exit__ to use an iterative
algorithm (Patch by Alon Horev)
@@ -913,6 +901,11 @@ Library
C-API
-----
+- Issue #15146: Add PyType_FromSpecWithBases. Patch by Robin Schreiber.
+
+- Issue #15042: Add PyState_AddModule and PyState_RemoveModule. Add version
+ guard for Py_LIMITED_API additions. Patch by Robin Schreiber.
+
- Issue #13783: Inadvertent additions to the public C API in the PEP 380
implementation have either been removed or marked as private interfaces.
@@ -921,9 +914,25 @@ Extension Modules
- Issue #15000: Support the "unique" x32 architecture in _posixsubprocess.c.
+IDLE
+----
+
+- Issue #9803: Don't close IDLE on saving if breakpoint is open.
+ Patch by Roger Serwy.
+
+- Issue #14962: Update text coloring in IDLE shell window after changing
+ options. Patch by Roger Serwy.
+
Documentation
-------------
+- Issue #15176: Clarified behavior, documentation, and implementation
+ of os.listdir().
+
+- Issue #14982: Document that pkgutil's iteration functions require the
+ non-standard iter_modules() method to be defined by an importer (something
+ the importlib importers do not define).
+
- Issue #15081: Document PyState_FindModule.
Patch by Robin Schreiber.
@@ -932,6 +941,9 @@ Documentation
Tests
-----
+- Issue #15187: Bugfix: remove temporary directories test_shutil was leaving
+ behind.
+
- Issue #14769: test_capi now has SkipitemTest, which cleverly checks
for "parity" between PyArg_ParseTuple() and the Python/getargs.c static
function skipitem() for all possible "format units".
@@ -1020,34 +1032,18 @@ Core and Builtins
- Issue #14700: Fix two broken and undefined-behaviour-inducing overflow checks
in old-style string formatting.
-- Issue #14705: The PyArg_Parse() family of functions now support the 'p' format
- unit, which accepts a "boolean predicate" argument. It converts any Python
- value into an integer--0 if it is "false", and 1 otherwise.
-
Library
-------
- Issue #14690: Use monotonic clock instead of system clock in the sched,
subprocess and trace modules.
-- Issue #14958: Change IDLE systax highlighting to recognize all string and
- byte literals supported in Python 3.3.
-
-- Issue #10997: Prevent a duplicate entry in IDLE's "Recent Files" menu.
-
- Issue #14443: Tell rpmbuild to use the correct version of Python in
bdist_rpm. Initial patch by Ross Lagerwall.
-- Issue #14929: Stop Idle 3.x from closing on Unicode decode errors when
- grepping. Patch by Roger Serwy.
-
- Issue #12515: email now registers a defect if it gets to EOF while parsing
a MIME part without seeing the closing MIME boundary.
-- Issue #12510: Attempting to get invalid tooltip no longer closes Idle.
- Other tooltipss have been corrected or improved and the number of tests
- has been tripled. Original patch by Roger Serwy.
-
- Issue #1672568: email now always decodes base64 payloads, adding padding and
ignoring non-base64-alphabet characters if needed, and registering defects
for any such problems.
@@ -1081,9 +1077,6 @@ Library
- Issue #14548: Make multiprocessing finalizers check pid before
running to cope with possibility of gc running just after fork.
-- Issue #14863: Update the documentation of os.fdopen() to reflect the
- fact that it's only a thin wrapper around open() anymore.
-
- Issue #14036: Add an additional check to validate that port in urlparse does
not go in illegal range and returns None.
@@ -1102,7 +1095,7 @@ Library
functions to support PEP 3115 compliant dynamic class creation. Patch by
Daniel Urban and Nick Coghlan.
-- Issue #13152: Allow to specify a custom tabsize for expanding tabs in
+- Issue #13152: Allow specifying a custom tabsize for expanding tabs in
textwrap. Patch by John Feuerstein.
- Issue #14721: Send the correct 'Content-length: 0' header when the body is an
@@ -1210,6 +1203,21 @@ Library
- Issue #14127 and #10148: shutil.copystat now preserves exact mtime and atime
on filesystems providing nanosecond resolution.
+IDLE
+----
+
+- Issue #14958: Change IDLE systax highlighting to recognize all string and
+ byte literals supported in Python 3.3.
+
+- Issue #10997: Prevent a duplicate entry in IDLE's "Recent Files" menu.
+
+- Issue #14929: Stop IDLE 3.x from closing on Unicode decode errors when
+ grepping. Patch by Roger Serwy.
+
+- Issue #12510: Attempting to get invalid tooltip no longer closes IDLE.
+ Other tooltipss have been corrected or improved and the number of tests
+ has been tripled. Original patch by Roger Serwy.
+
Tools/Demos
-----------
@@ -1228,9 +1236,19 @@ Build
- Issue #13210: Windows build now uses VS2010, ported from VS2008.
+C-API
+-----
+
+- Issue #14705: The PyArg_Parse() family of functions now support the 'p' format
+ unit, which accepts a "boolean predicate" argument. It converts any Python
+ value into an integer--0 if it is "false", and 1 otherwise.
+
Documentation
-------------
+- Issue #14863: Update the documentation of os.fdopen() to reflect the
+ fact that it's only a thin wrapper around open() anymore.
+
- Issue #14588: The language reference now accurately documents the Python 3
class definition process. Patch by Nick Coghlan.
@@ -1279,9 +1297,6 @@ Core and Builtins
- Issue #14339: Speed improvements to bin, oct and hex functions. Patch by
Serhiy Storchaka.
-- Issue #14098: New functions PyErr_GetExcInfo and PyErr_SetExcInfo.
- Patch by Stefan Behnel.
-
- Issue #14385: It is now possible to use a custom type for the __builtins__
namespace, instead of a dict. It can be used for sandboxing for example.
Raise also a NameError instead of ImportError if __build_class__ name if not
@@ -1431,12 +1446,6 @@ Library
- Don't Py_DECREF NULL variable in io.IncrementalNewlineDecoder.
-- Issue #8515: Set __file__ when run file in IDLE.
- Initial patch by Bruce Frederiksen.
-
-- Issue #14496: Fix wrong name in idlelib/tabbedpages.py.
- Patch by Popa Claudiu.
-
- Issue #3033: Add displayof parameter to tkinter font. Patch by Guilherme Polo.
- Issue #14482: Raise a ValueError, not a NameError, when trying to create
@@ -1472,6 +1481,15 @@ Tests
- Issue #14355: Regrtest now supports the standard unittest test loading, and
will use it if a test file contains no `test_main` method.
+IDLE
+----
+
+- Issue #8515: Set __file__ when run file in IDLE.
+ Initial patch by Bruce Frederiksen.
+
+- Issue #14496: Fix wrong name in idlelib/tabbedpages.py.
+ Patch by Popa Claudiu.
+
Tools / Demos
-------------
@@ -1481,6 +1499,12 @@ Tools / Demos
- Issue #13165: stringbench is now available in the Tools/stringbench folder.
It used to live in its own SVN project.
+C-API
+-----
+
+- Issue #14098: New functions PyErr_GetExcInfo and PyErr_SetExcInfo.
+ Patch by Stefan Behnel.
+
What's New in Python 3.3.0 Alpha 2?
===================================
@@ -1532,16 +1556,9 @@ Library
- Issue #5136: deprecate old, unused functions from tkinter.
-- Issue #14409: IDLE now properly executes commands in the Shell window
- when it cannot read the normal config files on startup and
- has to use the built-in default key bindings.
- There was previously a bug in one of the defaults.
-
- Issue #14416: syslog now defines the LOG_ODELAY and LOG_AUTHPRIV constants
if they are defined in <syslog.h>.
-- IDLE can be launched as python -m idlelib
-
- Issue #14295: Add unittest.mock
- Issue #7652: Add --with-system-libmpdec option to configure for linking
@@ -1567,9 +1584,6 @@ Library
up the decimal module. Performance gains of the new C implementation are
between 10x and 100x, depending on the application.
-- Issue #3573: IDLE hangs when passing invalid command line args
- (directory(ies) instead of file(s)) (Patch by Guilherme Polo)
-
- Issue #14269: SMTPD now conforms to the RFC and requires a HELO command
before MAIL, RCPT, or DATA.
@@ -1601,8 +1615,6 @@ Library
denial of service due to hash collisions. Patch by David Malcolm with some
modifications by the expat project.
-- Issue #14200: Idle shell crash on printing non-BMP unicode character.
-
- Issue #12818: format address no longer needlessly \ escapes ()s in names when
the name ends up being quoted.
@@ -1618,8 +1630,6 @@ Library
- Issue #989712: Support using Tk without a mainloop.
-- Issue #5219: Prevent event handler cascade in IDLE.
-
- Issue #3835: Refuse to use unthreaded Tcl in threaded Python.
- Issue #2843: Add new Tk API to Tkinter.
@@ -1824,7 +1834,7 @@ Core and Builtins
objects. Initial patch by Matthias Troffaes.
- Fix OSError.__init__ and OSError.__new__ so that each of them can be
- overriden and take additional arguments (followup to issue #12555).
+ overridden and take additional arguments (followup to issue #12555).
- Fix the fix for issue #12149: it was incorrect, although it had the side
effect of appearing to resolve the issue. Thanks to Mark Shannon for
@@ -1848,10 +1858,6 @@ Core and Builtins
on POSIX systems supporting anonymous memory mappings. Patch by
Charles-François Natali.
-- Issue #13452: PyUnicode_EncodeDecimal() doesn't support error handlers
- different than "strict" anymore. The caller was unable to compute the
- size of the output buffer: it depends on the error handler.
-
- PEP 3155 / issue #13448: Qualified name for classes and functions.
- Issue #13436: Fix a bogus error message when an AST object was passed
@@ -1942,10 +1948,6 @@ Core and Builtins
- PEP 3151 / issue #12555: reworking the OS and IO exception hierarchy.
-- Issue #13560: Add PyUnicode_DecodeLocale(), PyUnicode_DecodeLocaleAndSize()
- and PyUnicode_EncodeLocale() functions to the C API to decode/encode from/to
- the current locale encoding.
-
- Add internal API for static strings (_Py_identifier et al.).
- Issue #13063: the Windows error ERROR_NO_DATA (numbered 232 and described
@@ -2028,7 +2030,7 @@ Core and Builtins
deallocator calls one of the methods on the type (e.g. when subclassing
IOBase). Diagnosis and patch by Davide Rizzo.
-- Issue #9611, #9015: FileIO.read() clamps the length to INT_MAX on Windows.
+- Issue #9611, Issue #9015: FileIO.read() clamps the length to INT_MAX on Windows.
- Issue #9642: Uniformize the tests on the availability of the mbcs codec, add
a new HAVE_MBCS define.
@@ -2051,7 +2053,7 @@ Core and Builtins
given, produce an informative error message which includes the name(s) of the
missing arguments.
-- Issue #12370: Fix super with no arguments when __class__ is overriden in the
+- Issue #12370: Fix super with no arguments when __class__ is overridden in the
class body.
- Issue #12084: os.stat on Windows now works properly with relative symbolic
@@ -2191,17 +2193,11 @@ Core and Builtins
PyUnicode_AsUTF8String() and PyUnicode_AsEncodedString(unicode, "utf-8",
NULL).
-- Issue #10831: PyUnicode_FromFormat() supports %li, %lli and %zi formats.
-
- Issue #10829: Refactor PyUnicode_FromFormat(), use the same function to parse
the format string in the 3 steps, fix crashs on invalid format strings.
- Issue #13007: whichdb should recognize gdbm 1.9 magic numbers.
-- Issue #11246: Fix PyUnicode_FromFormat("%V") to decode the byte string from
- UTF-8 (with replace error handler) instead of ISO-8859-1 (in strict mode).
- Patch written by Ray Allen.
-
- Issue #11286: Raise a ValueError from calling PyMemoryView_FromBuffer with
a buffer struct having a NULL data pointer.
@@ -2211,9 +2207,6 @@ Core and Builtins
- Issue #11828: startswith and endswith now accept None as slice index.
Patch by Torsten Becker.
-- Issue #10830: Fix PyUnicode_FromFormatV("%c") for non-BMP characters on
- narrow build.
-
- Issue #11168: Remove filename debug variable from PyEval_EvalFrameEx().
It encoded the Unicode filename to UTF-8, but the encoding fails on
undecodable filename (on surrogate characters) which raises an unexpected
@@ -2241,10 +2234,10 @@ Library
fixed.
- Issue #14166: Pickler objects now have an optional ``dispatch_table``
- attribute which allows to set custom per-pickler reduction functions.
+ attribute which allows setting custom per-pickler reduction functions.
Patch by sbt.
-- Issue #14177: marshal.loads() now raises TypeError when given an unicode
+- Issue #14177: marshal.loads() now raises TypeError when given a unicode
string. Patch by Guilherme Gonçalves.
- Issue #13550: Remove the debug machinery from the threading module: remove
@@ -2255,15 +2248,9 @@ Library
are dead or dying. Moreover, the implementation is now O(1) rather than
O(n).
-- Issue #13125: Silence spurious test_lib2to3 output when in non-verbose mode.
- Patch by Mikhail Novikov.
-
- Issue #11841: Fix comparison bug with 'rc' versions in packaging.version.
Patch by Filip Gruszczyński.
-- Issue #13447: Add a test file to host regression tests for bugs in the
- scripts found in the Tools directory.
-
- Issue #6884: Fix long-standing bugs with MANIFEST.in parsing in distutils
on Windows. Also fixed in packaging.
@@ -2319,9 +2306,6 @@ Library
authenticating (since the result may change, according to RFC 4643).
Patch by Hynek Schlawack.
-- Issue #13989: Document that GzipFile does not support text mode, and give a
- more helpful error message when opened with an invalid mode string.
-
- Issue #13590: On OS X 10.7 and 10.6 with Xcode 4.2, building
Distutils-based packages with C extension modules may fail because
Apple has removed gcc-4.2, the version used to build python.org
@@ -2338,10 +2322,6 @@ Library
- Issue #13960: HTMLParser is now able to handle broken comments when
strict=False.
-- Issue #13921: Undocument and clean up sqlite3.OptimizedUnicode,
- which is obsolete in Python 3.x. It's now aliased to str for
- backwards compatibility.
-
- When '' is a path (e.g. in sys.path), make sure __file__ uses the current
working directory instead of '' in importlib.
@@ -2363,11 +2343,6 @@ Library
- Issue #10811: Fix recursive usage of cursors. Instead of crashing,
raise a ProgrammingError now.
-- Issue #10881: Fix test_site failure with OS X framework builds.
-
-- Issue #964437: Make IDLE help window non-modal.
- Patch by Guilherme Polo and Roger Serwy.
-
- Issue #13734: Add os.fwalk(), a directory walking function yielding file
descriptors.
@@ -2377,16 +2352,8 @@ Library
- Issue #11805: package_data in setup.cfg should allow more than one value.
-- Issue #13933: IDLE auto-complete did not work with some imported
- module, like hashlib. (Patch by Roger Serwy)
-
-- Issue #13901: Prevent test_distutils failures on OS X with --enable-shared.
-
- Issue #13676: Handle strings with embedded zeros correctly in sqlite3.
-- Issue #13506: Add '' to path for IDLE Shell when started and restarted with Restart Shell.
- Original patches by Marco Scataglini and Roger Serwy.
-
- Issue #8828: Add new function os.replace(), for cross-platform renaming
with overwriting.
@@ -2407,12 +2374,6 @@ Library
OSError if localtime() failed. time.clock() now raises a RuntimeError if the
processor time used is not available or its value cannot be represented
-- Issue #13862: Fix spurious failure in test_zlib due to runtime/compile time
- minor versions not matching.
-
-- Issue #12804: Fix test_socket and test_urllib2net failures when running tests
- on a system without internet access.
-
- Issue #13772: In os.symlink() under Windows, do not try to guess the link
target's type (file or directory). The detection was buggy and made the
call non-atomic (therefore prone to race conditions).
@@ -2439,9 +2400,6 @@ Library
- Issue #13642: Unquote before b64encoding user:password during Basic
Authentication. Patch contributed by Joonas Kuorilehto.
-- Issue #13726: Fix the ambiguous -S flag in regrtest. It is -o/--slow for slow
- tests.
-
- Issue #12364: Fix a hang in concurrent.futures.ProcessPoolExecutor.
The hang would occur when retrieving the result of a scheduled future after
the executor had been shut down.
@@ -2524,15 +2482,11 @@ Library
- Issue #13591: A bug in importlib has been fixed that caused import_module
to load a module twice.
-- Issue #4625: If IDLE cannot write to its recent file or breakpoint files,
- display a message popup and continue rather than crash. Original patch by
- Roger Serwy.
-
-- Issue #13449 sched.scheduler.run() method has a new "blocking" parameter which
+- Issue #13449: sched.scheduler.run() method has a new "blocking" parameter which
when set to False makes run() execute the scheduled events due to expire
soonest (if any) and then return. Patch by Giampaolo Rodolà.
-- Issue #8684 sched.scheduler class can be safely used in multi-threaded
+- Issue #8684: sched.scheduler class can be safely used in multi-threaded
environments. Patch by Josiah Carlson and Giampaolo Rodolà.
- Alias resource.error to OSError ala PEP 3151.
@@ -2544,12 +2498,9 @@ Library
'importlib.abc.PyPycLoader', 'nntplib.NNTP.xgtitle', 'nntplib.NNTP.xpath',
and private attributes of 'smtpd.SMTPChannel'.
-- Issue #5905, #13560: time.strftime() is now using the current locale
+- Issue #5905, Issue #13560: time.strftime() is now using the current locale
encoding, instead of UTF-8, if the wcsftime() function is not available.
-- Issue #8641: Update IDLE 3 syntax coloring to recognize b".." and not u"..".
- Patch by Tal Einat.
-
- Issue #13464: Add a readinto() method to http.client.HTTPResponse. Patch
by Jon Kuhn.
@@ -2661,9 +2612,6 @@ Library
- Issue #10817: Fix urlretrieve function to raise ContentTooShortError even
when reporthook is None. Patch by Jyrki Pulliainen.
-- Issue #13296: Fix IDLE to clear compile __future__ flags on shell restart.
- (Patch by Roger Serwy)
-
- Fix the xmlrpc.client user agent to return something similar to
urllib.request user agent: "Python-xmlrpc/3.3".
@@ -2766,10 +2714,6 @@ Library
- Issue #13034: When decoding some SSL certificates, the subjectAltName
extension could be unreported.
-- Issue #9871: Prevent IDLE 3 crash when given byte stings
- with invalid hex escape sequences, like b'\x0'.
- (Original patch by Claudiu Popa.)
-
- Issue #12306: Expose the runtime version of the zlib C library as a constant,
ZLIB_RUNTIME_VERSION, in the zlib module. Patch by Torsten Landschoff.
@@ -2798,8 +2742,6 @@ Library
- Issue #12878: Expose a __dict__ attribute on io.IOBase and its subclasses.
-- Issue #12636: IDLE reads the coding cookie when executing a Python script.
-
- Issue #12494: On error, call(), check_call(), check_output() and
getstatusoutput() functions of the subprocess module now kill the process,
read its status (to avoid zombis) and close pipes.
@@ -2869,9 +2811,6 @@ Library
- Issue #10087: Fix the html output format of the calendar module.
-- Issue #12540: Prevent zombie IDLE processes on Windows due to changes
- in os.kill().
-
- Issue #13121: add support for inplace math operators to collections.Counter.
- Add support for unary plus and unary minus to collections.Counter.
@@ -2903,7 +2842,7 @@ Library
Condition, etc.) used to be factory functions returning instances of hidden
classes (_Event, _Condition, etc.), because (if Guido recalls correctly) this
code pre-dates the ability to subclass extension types. It is now possible
- to inherit from these classes without having to import the private
+ to inherit from these classes, without having to import the private
underscored names like multiprocessing did.
- Issue #9723: Add shlex.quote functions, to escape filenames and command
@@ -2917,14 +2856,8 @@ Library
- Issue #12607: In subprocess, fix issue where if stdin, stdout or stderr is
given as a low fd, it gets overwritten.
-- Issue #12590: IDLE editor window now always displays the first line
- when opening a long file. With Tk 8.5, the first line was hidden.
-
- Issue #12576: Fix urlopen behavior on sites which do not send (or obfuscates)
- Connection:close header.
-
-- Issue #12102: Document that buffered files must be flushed before being used
- with mmap. Patch by Steffen Daode Nurpmeso.
+ ``Connection: close`` header.
- Issue #12560: Build libpython.so on OpenBSD. Patch by Stefan Sperling.
@@ -3179,7 +3112,7 @@ Library
- Issue #12175: FileIO.readall() now raises a ValueError instead of an IOError
if the file is closed.
-- Issue #11109: New service_action method for BaseServer, used by ForkingMixIn
+- Issue #11109: New service_action method for BaseServer, used by ForkingMixin
class for cleanup. Initial Patch by Justin Warkentin.
- Issue #12045: Avoid duplicate execution of command in
@@ -3224,9 +3157,6 @@ Library
passing a ``context`` argument pointing to an ssl.SSLContext instance.
Patch by Kasun Herath.
-- Issue #11088: don't crash when using F5 to run a script in IDLE on MacOSX
- with Tk 8.5.
-
- Issue #9516: Issue #9516: avoid errors in sysconfig when MACOSX_DEPLOYMENT_TARGET
is set in shell.
@@ -3246,10 +3176,6 @@ Library
- Issue #9971: Write an optimized implementation of BufferedReader.readinto().
Patch by John O'Connor.
-- Issue #1028: Tk returns invalid Unicode null in %A: UnicodeDecodeError.
- With Tk < 8.5 _tkinter.c:PythonCmd() raised UnicodeDecodeError, caused
- IDLE to exit. Converted to valid Unicode null in PythonCmd().
-
- Issue #11799: urllib.request Authentication Handlers will raise a ValueError
when presented with an unsupported Authentication Scheme. Patch contributed
by Yuval Greenfield.
@@ -3259,7 +3185,7 @@ Library
binary mode, but ensure that the shebang is decodable from UTF-8 and from the
encoding of the script.
-- Issue #8498: In socket.accept(), allow to specify 0 as a backlog value in
+- Issue #8498: In socket.accept(), allow specifying 0 as a backlog value in
order to accept exactly one connection. Patch by Daniel Evers.
- Issue #12011: signal.signal() and signal.siginterrupt() raise an OSError,
@@ -3486,12 +3412,12 @@ Library
- Issue #7639: Fix short file name generation in bdist_msi
-- Issue #11659: Fix ResourceWarning in test_subprocess introduced by #11459.
- Patch by Ben Hayden.
-
- Issue #11635: Don't use polling in worker threads and processes launched by
concurrent.futures.
+- Issue #5845: Automatically read readline configuration to enable completion
+ in interactive mode.
+
- Issue #6811: Allow importlib to change a code object's co_filename attribute
to match the path to where the source code currently is, not where the code
object originally came from.
@@ -3526,7 +3452,7 @@ Library
- Issue #11127: Raise a TypeError when trying to pickle a socket object.
-- Issue #11563: Connection:close header is sent by requests using URLOpener
+- Issue #11563: ``Connection: close`` header is sent by requests using URLOpener
class which helps in closing of sockets after connection is over. Patch
contributions by Jeff McNeil and Nadeem Vawda.
@@ -3541,8 +3467,6 @@ Library
- Issue #10979: unittest stdout buffering now works with class and module
setup and teardown.
-- Issue #11577: fix ResourceWarning triggered by improved binhex test coverage
-
- Issue #11243: fix the parameter querying methods of Message to work if
the headers contain un-encoded non-ASCII data.
@@ -3575,9 +3499,6 @@ Library
- Issue #11554: Fixed support for Japanese codecs; previously the body output
encoding was not done if euc-jp or shift-jis was specified as the charset.
-- Issue #11509: Significantly increase test coverage of fileinput.
- Patch by Denver Coneybeare at PyCon 2011 Sprints.
-
- Issue #11407: `TestCase.run` returns the result object used or created.
Contributed by Janathan Hartley.
@@ -3700,11 +3621,6 @@ Library
- Issue #9348: Raise an early error if argparse nargs and metavar don't match.
-- Issue #8982: Improve the documentation for the argparse Namespace object.
-
-- Issue #9343: Document that argparse parent parsers must be configured before
- their children.
-
- Issue #9026: Fix order of argparse sub-commands in help messages.
- Issue #9347: Fix formatting for tuples in argparse type= error messages.
@@ -3757,10 +3673,61 @@ Build
- Issue #11495: OSF support is eliminated. It was deprecated in Python 3.2.
-
IDLE
----
+- Issue #14409: IDLE now properly executes commands in the Shell window
+ when it cannot read the normal config files on startup and
+ has to use the built-in default key bindings.
+ There was previously a bug in one of the defaults.
+
+- IDLE can be launched as python -m idlelib
+
+- Issue #3573: IDLE hangs when passing invalid command line args
+ (directory(ies) instead of file(s)) (Patch by Guilherme Polo)
+
+- Issue #14200: IDLE shell crash on printing non-BMP unicode character.
+
+- Issue #5219: Prevent event handler cascade in IDLE.
+
+- Issue #964437: Make IDLE help window non-modal.
+ Patch by Guilherme Polo and Roger Serwy.
+
+- Issue #13933: IDLE auto-complete did not work with some imported
+ module, like hashlib. (Patch by Roger Serwy)
+
+- Issue #13506: Add '' to path for IDLE Shell when started and restarted with Restart Shell.
+ Original patches by Marco Scataglini and Roger Serwy.
+
+- Issue #4625: If IDLE cannot write to its recent file or breakpoint files,
+ display a message popup and continue rather than crash. Original patch by
+ Roger Serwy.
+
+- Issue #8641: Update IDLE 3 syntax coloring to recognize b".." and not u"..".
+ Patch by Tal Einat.
+
+- Issue #13296: Fix IDLE to clear compile __future__ flags on shell restart.
+ (Patch by Roger Serwy)
+
+- Issue #9871: Prevent IDLE 3 crash when given byte stings
+ with invalid hex escape sequences, like b'\x0'.
+ (Original patch by Claudiu Popa.)
+
+- Issue #12636: IDLE reads the coding cookie when executing a Python script.
+
+- Issue #12540: Prevent zombie IDLE processes on Windows due to changes
+ in os.kill().
+
+- Issue #12590: IDLE editor window now always displays the first line
+ when opening a long file. With Tk 8.5, the first line was hidden.
+
+- Issue #11088: don't crash when using F5 to run a script in IDLE on MacOSX
+ with Tk 8.5.
+
+- Issue #1028: Tk returns invalid Unicode null in %A: UnicodeDecodeError.
+ With Tk < 8.5 _tkinter.c:PythonCmd() raised UnicodeDecodeError, caused
+ IDLE to exit. Converted to valid Unicode null in PythonCmd().
+
- Issue #11718: IDLE's open module dialog couldn't find the __init__.py
file in a package.
@@ -3790,6 +3757,10 @@ Tools/Demos
Extension Modules
-----------------
+- Issue #16847: Fixed improper use of _PyUnicode_CheckConsistency() in
+ non-pydebug builds. Several extension modules now compile cleanly when
+ assert()s are enabled in standard builds (-DDEBUG flag).
+
- Issue #13840: The error message produced by ctypes.create_string_buffer
when given a Unicode string has been fixed.
@@ -3852,6 +3823,33 @@ Extension Modules
Tests
-----
+- Issue #13125: Silence spurious test_lib2to3 output when in non-verbose mode.
+ Patch by Mikhail Novikov.
+
+- Issue #13447: Add a test file to host regression tests for bugs in the
+ scripts found in the Tools directory.
+
+- Issue #10881: Fix test_site failure with OS X framework builds.
+
+- Issue #13901: Prevent test_distutils failures on OS X with --enable-shared.
+
+- Issue #13862: Fix spurious failure in test_zlib due to runtime/compile time
+ minor versions not matching.
+
+- Issue #12804: Fix test_socket and test_urllib2net failures when running tests
+ on a system without internet access.
+
+- Issue #13726: Fix the ambiguous -S flag in regrtest. It is -o/--slow for slow
+ tests.
+
+- Issue #11659: Fix ResourceWarning in test_subprocess introduced by #11459.
+ Patch by Ben Hayden.
+
+- Issue #11577: fix ResourceWarning triggered by improved binhex test coverage
+
+- Issue #11509: Significantly increase test coverage of fileinput.
+ Patch by Denver Coneybeare at PyCon 2011 Sprints.
+
- Issue #11689: Fix a variable scoping error in an sqlite3 test
- Issue #13786: Remove unimplemented 'trace' long option from regrtest.py.
@@ -3887,7 +3885,7 @@ Tests
- Issue #12331: The test suite for lib2to3 can now run from an installed
Python.
-- Issue #12626: In regrtest, allow to filter tests using a glob filter
+- Issue #12626: In regrtest, allow filtering tests using a glob filter
with the ``-m`` (or ``--match``) option. This works with all test cases
using the unittest module. This is useful with long test suites
such as test_io or test_subprocess.
@@ -4030,7 +4028,7 @@ Tests
- Issue #11505: improves test coverage of string.py. Patch by Alicia
Arlen
-- Issue #11490: test_subprocess:test_leaking_fds_on_error no longer gives a
+- Issue #11490: test_subprocess.test_leaking_fds_on_error no longer gives a
false positive if the last directory in the path is inaccessible.
- Issue #11223: Fix test_threadsignals to fail, not hang, when the
@@ -4054,6 +4052,23 @@ Tests
C-API
-----
+- Issue #13452: PyUnicode_EncodeDecimal() doesn't support error handlers
+ different than "strict" anymore. The caller was unable to compute the
+ size of the output buffer: it depends on the error handler.
+
+- Issue #13560: Add PyUnicode_DecodeLocale(), PyUnicode_DecodeLocaleAndSize()
+ and PyUnicode_EncodeLocale() functions to the C API to decode/encode from/to
+ the current locale encoding.
+
+- Issue #10831: PyUnicode_FromFormat() supports %li, %lli and %zi formats.
+
+- Issue #11246: Fix PyUnicode_FromFormat("%V") to decode the byte string from
+ UTF-8 (with replace error handler) instead of ISO-8859-1 (in strict mode).
+ Patch written by Ray Allen.
+
+- Issue #10830: Fix PyUnicode_FromFormatV("%c") for non-BMP characters on
+ narrow build.
+
- Add PyObject_GenericGetDict and PyObject_GeneriSetDict. They are generic
implementations for the getter and setter of a ``__dict__`` descriptor of C
types.
@@ -4079,6 +4094,24 @@ C-API
Documentation
-------------
+- Issue #13989: Document that GzipFile does not support text mode, and give a
+ more helpful error message when opened with an invalid mode string.
+
+- Issue #13921: Undocument and clean up sqlite3.OptimizedUnicode,
+ which is obsolete in Python 3.x. It's now aliased to str for
+ backwards compatibility.
+
+- Issue #12102: Document that buffered files must be flushed before being used
+ with mmap. Patch by Steffen Daode Nurpmeso.
+
+- Issue #8982: Improve the documentation for the argparse Namespace object.
+
+- Issue #9343: Document that argparse parent parsers must be configured before
+ their children.
+
+- Issue #13498: Clarify docs of os.makedirs()'s exist_ok argument. Done with
+ great native-speaker help from R. David Murray.
+
- Issues #13491 and #13995: Fix many errors in sqlite3 documentation.
Initial patch for #13491 by Johannes Vogel.
@@ -4188,7 +4221,7 @@ What's New in Python 3.2 Release Candidate 2?
Core and Builtins
-----------------
-- Issue #10451: memoryview objects could allow to mutate a readable buffer.
+- Issue #10451: memoryview objects could allow mutating a readable buffer.
Initial patch by Ross Lagerwall.
Library
@@ -4732,7 +4765,7 @@ Library
- Add the "display" and "undisplay" pdb commands.
-- Issue #7245: Add a SIGINT handler in pdb that allows to break a program again
+- Issue #7245: Add a SIGINT handler in pdb that allows breaking a program again
after a "continue" command.
- Add the "interact" pdb command.
@@ -6600,7 +6633,7 @@ C-API
PyErr_Format, on machines with HAVE_LONG_LONG defined.
- Issue #6151: Made PyDescr_COMMON conform to standard C (like PyObject_HEAD in
- PEP 3123). The PyDescr_TYPE and PyDescr_NAME macros should be should used for
+ PEP 3123). The PyDescr_TYPE and PyDescr_NAME macros should be used for
accessing the d_type and d_name members of structures using PyDescr_COMMON.
- Issue #6405: Remove duplicate type declarations in descrobject.h.
@@ -6883,7 +6916,7 @@ Library
correct encoding.
- Issue #4870: Add an `options` attribute to SSL contexts, as well as several
- ``OP_*`` constants to the `ssl` module. This allows to selectively disable
+ ``OP_*`` constants to the `ssl` module. This allows selectively disabling
protocol versions, when used in combination with `PROTOCOL_SSLv23`.
- Issue #8759: Fixed user paths in sysconfig for posix and os2 schemes.
@@ -7187,7 +7220,7 @@ Library
cElementTree module is updated too.
- Issue #7774: Set sys.executable to an empty string if argv[0] has been set to
- an non existent program name and Python is unable to retrieve the real program
+ a non existent program name and Python is unable to retrieve the real program
name.
- Issue #7880: Fix sysconfig when the python executable is a symbolic link.
@@ -7240,7 +7273,7 @@ Library
messages parsed by email.Parser.HeaderParser.
- Issue #7361: Importlib was not properly checking the number of bytes in
- bytecode file when it was less then 8 bytes.
+ bytecode file when it was less than 8 bytes.
- Issue #7633: In the decimal module, Context class methods (with the exception
of canonical and is_canonical) now accept instances of int and long wherever a
@@ -7676,7 +7709,7 @@ Extension Modules
- Issue #7900: The getgroups(2) system call on MacOSX behaves rather oddly
compared to other unix systems. In particular, os.getgroups() does not reflect
- any changes made using os.setgroups() but basicly always returns the same
+ any changes made using os.setgroups() but basically always returns the same
information as the id command. os.getgroups() can now return more than 16
groups on MacOSX.
@@ -7695,7 +7728,7 @@ Extension Modules
- Issue #1578269: Implement os.symlink for Windows 6.0+. Patch by Jason
R. Coombs.
-- In struct.pack, correctly propogate exceptions from computing the truth of an
+- In struct.pack, correctly propagate exceptions from computing the truth of an
object in the '?' format.
- Issue #9000: datetime.timezone objects now have eval-friendly repr.
@@ -8182,7 +8215,7 @@ Build
added LIBS to OS X framework builds.
- Issue #5809: Specifying both --enable-framework and --enable-shared is
- an error. Configure now explicity tells you about this.
+ an error. Configure now explicitly tells you about this.
@@ -8271,7 +8304,7 @@ Library
- Issue #1664: Make nntplib IPv6-capable. Patch by Derek Morr.
- Issue #5006: Better handling of unicode byte-order marks (BOM) in the io
- library. This means, for example, that opening an UTF-16 text file in
+ library. This means, for example, that opening a UTF-16 text file in
append mode doesn't add a BOM at the end of the file if the file isn't
empty.
@@ -9176,7 +9209,7 @@ Library
been backported to help facilitate transitions from 2.7 to 3.1.
- Issue #1885: distutils. When running sdist with --formats=tar,gztar
- the tar file was overriden by the gztar one.
+ the tar file was overridden by the gztar one.
- Issue #4863: distutils.mwerkscompiler has been removed.
@@ -9295,7 +9328,7 @@ Library
- Issue #4756: zipfile.is_zipfile() now supports file-like objects. Patch by
Gabriel Genellina.
-- Issue #4574: reading an UTF16-encoded text file crashes if \r on 64-char
+- Issue #4574: reading a UTF16-encoded text file crashes if \r on 64-char
boundary.
- Issue #4223: inspect.getsource() will now correctly display source code
@@ -9464,8 +9497,8 @@ Extension Modules
- Issue #4051: Prevent conflict of UNICODE macros in cPickle.
-- Issue #4738: Each zlib object now has a separate lock, allowing to compress
- or decompress several streams at once on multi-CPU systems. Also, the GIL
+- Issue #4738: Each zlib object now has a separate lock, allowing several streams
+ to be compressed or decompressed at once on multi-CPU systems. Also, the GIL
is now released when computing the CRC of a large buffer. Patch by ebfe.
- Issue #4228: Pack negative values the same way as 2.4 in struct's L format.
@@ -9652,7 +9685,7 @@ Core and Builtins
- Issue #1210: Fixed imaplib and its documentation.
-- Issue #4233: Changed semantic of ``_fileio.FileIO``'s ``close()``
+- Issue #4233: Changed semantic of ``_fileio.FileIO``'s ``close()``
method on file objects with closefd=False. The file descriptor is still
kept open but the file object behaves like a closed file. The ``FileIO``
object also got a new readonly attribute ``closefd``.
@@ -9789,20 +9822,20 @@ Core and Builtins
the recursion limit checking code, due to bogus handling of recursion
limit when USE_STACKCHEK was enabled.
-- Issue 3639: The _warnings module could segfault the interpreter when
+- Issue #3639: The _warnings module could segfault the interpreter when
unexpected types were passed in as arguments.
- Issue #3712: The memoryview object had a reference leak and didn't support
cyclic garbage collection.
- Issue #3668: Fix a memory leak with the "s*" argument parser in
- PyArg_ParseTuple and friends, which occurred when the argument for "s*"
+ PyArg_ParseTuple and friends, which occurred when the argument for "s*"
was correctly parsed but parsing of subsequent arguments failed.
- Issue #3611: An exception __context__ could be cleared in a complex pattern
involving a __del__ method re-raising an exception.
-- Issue #2534: speed up isinstance() and issubclass() by 50-70%, so as to
+- Issue #2534: speed up isinstance() and issubclass() by 50-70%, so as to
match Python 2.5 speed despite the __instancecheck__ / __subclasscheck__
mechanism. In the process, fix a bug where isinstance() and issubclass(),
when given a tuple of classes as second argument, were looking up
@@ -9868,19 +9901,19 @@ Library
It is now maintained outside of the standard library at
http://www.jcea.es/programacion/pybsddb.htm.
-- Issue 600362: Relocated parse_qs() and parse_qsl(), from the cgi module
+- Issue #600362: Relocated parse_qs() and parse_qsl(), from the cgi module
to the urlparse one. Added a DeprecationWarning in the old module, it
will be deprecated in the future.
- Issue #3719: platform.architecture() fails if there are spaces in the
path to the Python binary.
-- Issue 3602: As part of the merge of r66135, make the parameters on
+- Issue #3602: As part of the merge of r66135, make the parameters on
warnings.catch_warnings() keyword-only. Also remove a DeprecationWarning.
- The deprecation warnings for the camelCase threading API names were removed.
-- Issue #3110: multiprocessing fails to compiel on solaris 10 due to missing
+- Issue #3110: multiprocessing fails to compiel on solaris 10 due to missing
SEM_VALUE_MAX.
Extension Modules
@@ -9896,7 +9929,7 @@ Extension Modules
exploitation of poor argument checking.
- bsddb code updated to version 4.7.3pre2. This code is the same than
- Python 2.6 one, since the intention is to keep an unified 2.x/3.x codebase.
+ Python 2.6 one, since the intention is to keep a unified 2.x/3.x codebase.
The Python code is automatically translated using "2to3". Please, do not
update this code in Python 3.0 by hand. Update the 2.6 one and then
do "2to3".
@@ -9963,7 +9996,7 @@ Core and Builtins
as bytes string, please use PyUnicode_AsUTF8String() instead.
- Issue #3460: PyUnicode_Join() implementation is 10% to 80% faster thanks
- to Python 3.0's stricter semantics which allow to avoid successive
+ to Python 3.0's stricter semantics which allow avoiding successive
reallocations of the result string (this also affects str.join()).
@@ -10606,8 +10639,8 @@ Core and Builtins
certain operations between bytes/buffer and str like str(b'') and
comparison.
-- The standards streams sys.stdin, stdout and stderr may be None when
- the when the C runtime library returns an invalid file descriptor
+- The standard streams sys.stdin, stdout and stderr may be None
+ when the C runtime library returns an invalid file descriptor
for the streams (fileno(stdin) < 0). For now this happens only for
Windows GUI apps and scripts started with `pythonw.exe`.
@@ -10646,7 +10679,7 @@ Library
- Removed the 'new' module.
-- Removed all types from the 'types' module that are easily accessable
+- Removed all types from the 'types' module that are easily accessible
through builtins.
@@ -12729,7 +12762,7 @@ Library
- Patch #1110248: SYNC_FLUSH the zlib buffer for GZipFile.flush.
-- Patch #1107973: Allow to iterate over the lines of a tarfile.ExFileObject.
+- Patch #1107973: Allow iterating over the lines of a tarfile.ExFileObject.
- Patch #1104111: Alter setup.py --help and --help-commands.
@@ -13706,7 +13739,7 @@ Library
same as when the argument is omitted).
[SF bug 658254, patch 663482]
-- nntplib does now allow to ignore a .netrc file.
+- nntplib does now allow ignoring a .netrc file.
- urllib2 now recognizes Basic authentication even if other authentication
schemes are offered.
@@ -13980,7 +14013,7 @@ Core and builtins
would not be removed while allocating a new weakref object. Since
GC could be invoked at that time, however, that assumption was
invalid. In a truly obscure case of GC being triggered during
- creation for a new weakref object for an referent which already
+ creation for a new weakref object for a referent which already
has a weakref without a callback which is only referenced from
cyclic trash, a memory error can occur. This consistently created a
segfault in a debug build, but provided less predictable behavior in
@@ -14124,7 +14157,7 @@ Extension modules
- fcntl.ioctl now warns if the mutate flag is not specified.
-- nt now properly allows to refer to UNC roots, e.g. in nt.stat().
+- nt now properly allows referring to UNC roots, e.g. in nt.stat().
- the weakref module now supports additional objects: array.array,
sre.pattern_objects, file objects, and sockets.
@@ -16032,7 +16065,7 @@ Core and builtins
- All standard iterators now ensure that, once StopIteration has been
raised, all future calls to next() on the same iterator will also
raise StopIteration. There used to be various counterexamples to
- this behavior, which could caused confusion or subtle program
+ this behavior, which could have caused confusion or subtle program
breakage, without any benefits. (Note that this is still an
iterator's responsibility; the iterator framework does not enforce
this.)
@@ -16682,7 +16715,7 @@ C API
- New functions PyErr_SetExcFromWindowsErr() and
PyErr_SetExcFromWindowsErrWithFilename(). Similar to
PyErr_SetFromWindowsErrWithFilename() and
- PyErr_SetFromWindowsErr(), but they allow to specify
+ PyErr_SetFromWindowsErr(), but they allow specifying
the exception type to raise. Available on Windows.
- Py_FatalError() is now declared as taking a const char* argument. It
@@ -17557,8 +17590,8 @@ Type/class unification and new-style classes
- property() now takes 4 keyword arguments: fget, fset, fdel and doc.
These map to read-only attributes 'fget', 'fset', 'fdel', and '__doc__'
in the constructed property object. fget, fset and fdel weren't
- discoverable from Python in 2.2a3. __doc__ is new, and allows to
- associate a docstring with a property.
+ discoverable from Python in 2.2a3. __doc__ is new, and allows
+ associating a docstring with a property.
- Comparison overloading is now more completely implemented. For
example, a str subclass instance can properly be compared to a str
@@ -17973,7 +18006,7 @@ Tests
-----
- regrtest.py now knows which tests are expected to be skipped on some
- platforms, allowing to give clearer test result output. regrtest
+ platforms, allowing clearer test result output to be given. regrtest
also has optional --use/-u switch to run normally disabled tests
which require network access or consume significant disk resources.
@@ -18704,7 +18737,7 @@ Standard library
- xml.dom.minidom offers a toprettyxml method. A number of DOM
conformance issues have been resolved. In particular, Element now
- has an hasAttributes method, and the handling of namespaces was
+ has a hasAttributes method, and the handling of namespaces was
improved.
- Ka-Ping Yee contributed two new modules: inspect.py, a module for
@@ -18903,7 +18936,7 @@ Core language, builtins, and interpreter
- There is a new Unicode companion to the PyObject_Str() API
called PyObject_Unicode(). It behaves in the same way as the
- former, but assures that the returned value is an Unicode object
+ former, but assures that the returned value is a Unicode object
(applying the usual coercion if necessary).
- The comparison operators support "rich comparison overloading" (PEP
@@ -20194,7 +20227,7 @@ list of all new modules is included below.
Probably the most pervasive change is the addition of Unicode support.
We've added a new fundamental datatype, the Unicode string, a new
-build-in function unicode(), an numerous C APIs to deal with Unicode
+built-in function unicode(), and numerous C APIs to deal with Unicode
and encodings. See the file Misc/unicode.txt for details, or
http://starship.python.net/crew/lemburg/unicode-proposal.txt.
@@ -20888,7 +20921,7 @@ Fri Mar 26 22:36:00 1999 Fred Drake <fdrake@eric.cnri.reston.va.us>
* Tools/scripts/dutree.py:
During display, if EPIPE is raised, it's probably because a pager was
- killed. Discard the error in that case, but propogate it otherwise.
+ killed. Discard the error in that case, but propagate it otherwise.
Fri Mar 26 16:20:45 1999 Guido van Rossum <guido@eric.cnri.reston.va.us>
@@ -21512,7 +21545,7 @@ Thu Feb 18 20:51:50 1999 Fred Drake <fdrake@eric.cnri.reston.va.us>
Bow to font-lock at the end of the docstring, since it throws stuff
off.
- Make sure the path parameter to readmodule() is a list before adding it
+ Make sure the path paramter to readmodule() is a list before adding it
with sys.path, or the addition could fail.
@@ -21593,7 +21626,7 @@ New or improved ports
- Improved BeOS support.
-- Support dynamic loading of shared libraries on NetBSD platforms that
+- Support dynamic loading of shared libraries on NetBSD platforms that
use ELF (i.e., MIPS and Alpha systems).
Configuration/build changes
@@ -21679,7 +21712,7 @@ real list objects.
- The uu module now deals better with trailing garbage generated by
some broke uuencoders.
-- The telnet module now has an my_interact() method which uses threads
+- The telnet module now has a my_interact() method which uses threads
instead of select. The interact() method uses this by default on
Windows (where the single-threaded version doesn't work).
@@ -21810,7 +21843,7 @@ provide its own version of this function, while still sharing the
higher-level classes in code.py.
- turtle.py is a new module for simple turtle graphics. I'm still
-working on it; let me know if you use this to teach Python to children
+working on it; let me know if you use this to teach Python to children
or other novices without prior programming experience.
Obsoleted library modules
@@ -21942,7 +21975,7 @@ control pseudo-device, per audio(7I).
Changes to tools
----------------
-- New, improved version of Barry Warsaw's Misc/python-mode.el (editing
+- New, improved version of Barry Warsaw's Misc/python-mode.el (editing
support for Emacs).
- tabnanny.py: added a -q ('quiet') option to tabnanny, which causes
@@ -22217,7 +22250,7 @@ Windows Installer
-----------------
- Install zlib.dll in the DLLs directory instead of in the win32
-system directory, to avoid conflicts with other applications that have
+system directory, to avoid conflicts with other applications that have
their own zlib.dll.
Test Suite
@@ -22297,7 +22330,7 @@ General
so that a symlink to a symlink can work.
- Added a hack so that when you type 'quit' or 'exit' at the
-interpreter, you get a friendly explanation of how to press Ctrl-D (or
+interpreter, you get a friendly explanation of how to press Ctrl-D (or
Ctrl-Z) to exit.
- New and improved Misc/python-mode.el (Python mode for Emacs).
@@ -22470,13 +22503,13 @@ problem that randint() was accidentally defined as taking an inclusive
range. Also, randint(a, b) is now redefined as randrange(a, b+1),
adding extra range and type checking to its arguments!
-- Add some semi-thread-safety to random.gauss() (it used to be able to
+- Add some semi-thread-safety to random.gauss() (it used to be able to
crash when invoked from separate threads; now the worst it can do is
give a duplicate result occasionally).
- Some restructuring and generalization done to cmd.py.
-- Major upgrade to ConfigParser.py; converted to using 're', added new
+- Major upgrade to ConfigParser.py; converted to using 're', added new
exceptions, support underscore in section header and option name. No
longer add 'name' option to every section; instead, add '__name__'.
@@ -22673,7 +22706,7 @@ Windows Installer
-----------------
- The registry key used is now "1.5" instead of "1.5.x" -- so future
-versions of 1.5 and Mark Hammond's win32all installer don't need to be
+versions of 1.5 and Mark Hammond's win32all installer don't need to be
resynchronized.
Windows Tools
@@ -22736,11 +22769,11 @@ PyEval_CallMethod().
- New macros to access object members for PyFunction, PyCFunction
objects.
-- New APIs PyImport_AppendInittab() an PyImport_ExtendInittab() to
+- New APIs PyImport_AppendInittab() and PyImport_ExtendInittab() to
dynamically add one or many entries to the table of built-in modules.
- New macro Py_InitModule3(name, methods, doc) which calls
-Py_InitModule4() with appropriate arguments. (The -4 variant requires
+Py_InitModule4() with appropriate arguments. (The -4 variant requires
you to pass an obscure version number constant which is always the same.)
- New APIs PySys_WriteStdout() and PySys_WriteStderr() to write to
@@ -22812,7 +22845,7 @@ less common scenario in practice.
Syntax change
-------------
-- The raise statement can now be used without arguments, to re-raise
+- The raise statement can now be used without arguments, to re-raise
a previously set exception. This should be used after catching an
exception with an except clause only, either in the except clause or
later in the same function.
@@ -22871,7 +22904,7 @@ of a tab. The preferred module is tabnanny.py (by Tim Peters).
Demo/tkinter/guido/paint.py -- Dave Mitchell
Demo/sockets/unixserver.py -- Piet van Oostrum
-
+
- Much better freeze support. The freeze script can now freeze
hierarchical module names (with a corresponding change to import.c),
@@ -23010,7 +23043,7 @@ certain locales).
- New command supported by the ftplib module: rmd(); also fixed some
minor bugs.
-- The profile module now uses a different timer function by default --
+- The profile module now uses a different timer function by default --
time.clock() is generally better than os.times(). This makes it work
better on Windows NT, too.
@@ -23049,14 +23082,14 @@ module. Courtesy Barry Warsaw.
- In the multifile module, support the optional second parameter to
seek() when possible.
-- Several fixes to the gopherlib module by Lars Marius Garshol. Also,
+- Several fixes to the gopherlib module by Lars Marius Garshol. Also,
urlparse now correctly handles Gopher URLs with query strings.
- Fixed a tiny bug in format_exception() in the traceback module.
Also rewrite tb_lineno() to be compatible with JPython (and not
disturb the current exception!); by Jim Hugunin.
-- The httplib module is more robust when servers send a short response
+- The httplib module is more robust when servers send a short response
-- courtesy Tim O'Malley.
Tkinter and friends
@@ -23071,7 +23104,7 @@ application only).
no longer use the default root.
- The interfaces for the bind*() and unbind() widget methods have been
-redesigned; the bind*() methods now return the name of the Tcl command
+redesigned; the bind*() methods now return the name of the Tcl command
created for the callback, and this can be passed as an optional
argument to unbind() in order to delete the command (normally, such
commands are automatically unbound when the widget is destroyed, but
@@ -23107,7 +23140,7 @@ intended for storing thread-local global variables.
dictionary to allow recursive container types to detect recursion in
their repr(), str() and print implementations.
-- New function PyObject_Not(x) calculates (not x) according to Python's
+- New function PyObject_Not(x) calculates (not x) according to Python's
standard rules (basically, it negates the outcome PyObject_IsTrue(x).
- New function _PyModule_Clear(), which clears a module's dictionary
@@ -23268,7 +23301,7 @@ defined in packages correctly. The same change applies to copying
instances with copy.py. The cPickle.c changes and some pickle.py
changes are courtesy Jim Fulton.
-- Locale support in he "re" (Perl regular expressions) module. Use
+- Locale support in he "re" (Perl regular expressions) module. Use
the flag re.L (or re.LOCALE) to enable locale-specific matching
rules for \w and \b. The in-line syntax for this flag is (?L).
@@ -23334,7 +23367,7 @@ don't know how to deal with those.
- Some improvements to the _tkinter build line suggested by Case Roole.
-- A full suite of platform specific files for NetBSD 1.x, submitted by
+- A full suite of platform specific files for NetBSD 1.x, submitted by
Anders Andersen.
- New Solaris specific header STROPTS.py.
@@ -23404,7 +23437,7 @@ after studying the GNU libg++ quicksort. This should be much faster
if there are lots of duplicates, and otherwise at least as good.
- Added "uue" as an alias for "uuencode" to mimetools.py. (Hm, the
-uudecode bug where it complaints about trailing garbage is still there
+uudecode bug where it complaints about trailing garbage is still there
:-( ).
- pickle.py requires integers in text mode to be in decimal notation
@@ -23564,7 +23597,7 @@ an underscore and used to initialize the pointer.
- The warning about a thread still having a frame now only happens in
verbose mode.
-- Change the signal finalization so that it also resets the signal
+- Change the signal finialization so that it also resets the signal
handlers. After this has been called, our signal handlers are no
longer active!
@@ -23710,7 +23743,7 @@ the first class with an applicable hook wins. Makes more sense.
- Changed the checks made in Py_Initialize() and Py_Finalize(). It is
now legal to call these more than once. The first call to
Py_Initialize() initializes, the first call to Py_Finalize()
-finalizes. There's also a new API, Py_IsInitalized() which checks
+finalizes. There's also a new API, Py_IsInitialized() which checks
whether we are already initialized (in case you want to leave things
as they were).
@@ -24180,7 +24213,7 @@ the C and the Python variety) and for floating point numbers.
The Python/C API for frames is changed (you shouldn't be using this
anyway).
-- Significant speedup by inlining some common opcodes for common operand
+- Significant speedup by inlining some common opcodes for common operand
types (e.g. i+i, i-i, and list[i]). Fredrik Lundh.
- Small speedup by reordering the method tables of some common
@@ -24206,34 +24239,34 @@ pressure to document their own contributed modules :-). Note that
printing the documentation now kills fewer trees -- the margins have
been reduced.
-- I have started documenting the Python/C API. Unfortunately this project
-hasn't been completed yet. It will be complete before the final release of
-Python 1.5, though. At the moment, it's better to read the LaTeX source
+- I have started documenting the Python/C API. Unfortunately this project
+hasn't been completed yet. It will be complete before the final release of
+Python 1.5, though. At the moment, it's better to read the LaTeX source
than to attempt to run it through LaTeX and print the resulting dvi file.
-- The posix module (and hence os.py) now has doc strings! Thanks to Neil
-Schemenauer. I received a few other contributions of doc strings. In most
+- The posix module (and hence os.py) now has doc strings! Thanks to Neil
+Schemenauer. I received a few other contributions of doc strings. In most
other places, doc strings are still wishful thinking...
Language changes
----------------
-- Private variables with leading double underscore are now a permanent
-feature of the language. (These were experimental in release 1.4. I have
-favorable experience using them; I can't label them "experimental"
+- Private variables with leading double underscore are now a permanent
+feature of the language. (These were experimental in release 1.4. I have
+favorable experience using them; I can't label them "experimental"
forever.)
-- There's new string literal syntax for "raw strings". Prefixing a string
-literal with the letter r (or R) disables all escape processing in the
-string; for example, r'\n' is a two-character string consisting of a
-backslash followed by the letter n. This combines with all forms of string
-quotes; it is actually useful for triple quoted doc strings which might
-contain references to \n or \t. An embedded quote prefixed with a
-backslash does not terminate the string, but the backslash is still
-included in the string; for example, r'\'' is a two-character string
-consisting of a backslash and a quote. (Raw strings are also
-affectionately known as Robin strings, after their inventor, Robin
+- There's new string literal syntax for "raw strings". Prefixing a string
+literal with the letter r (or R) disables all escape processing in the
+string; for example, r'\n' is a two-character string consisting of a
+backslash followed by the letter n. This combines with all forms of string
+quotes; it is actually useful for triple quoted doc strings which might
+contain references to \n or \t. An embedded quote prefixed with a
+backslash does not terminate the string, but the backslash is still
+included in the string; for example, r'\'' is a two-character string
+consisting of a backslash and a quote. (Raw strings are also
+affectionately known as Robin strings, after their inventor, Robin
Friedrich.)
- There's a simple assert statement, and a new exception
@@ -24262,10 +24295,10 @@ patches to catch floating point exceptions, at the moment).
- The obsolete exception ConflictError (presumably used by the long
obsolete access statement) has been deleted.
-- There's a new function sys.exc_info() which returns the tuple
+- There's a new function sys.exc_info() which returns the tuple
(sys.exc_type, sys.exc_value, sys.exc_traceback) in a thread-safe way.
-- There's a new variable sys.executable, pointing to the executable file
+- There's a new variable sys.executable, pointing to the executable file
for the Python interpreter.
- The sort() methods for lists no longer uses the C library qsort(); I
@@ -24291,11 +24324,11 @@ caught an exception are kept alive until another exception is caught
returning from a function that caught an exception.
- There's a new "buffer" interface. Certain objects (e.g. strings and
-arrays) now support the "buffer" protocol. Buffer objects are acceptable
-whenever formerly a string was required for a write operation; mutable
+arrays) now support the "buffer" protocol. Buffer objects are acceptable
+whenever formerly a string was required for a write operation; mutable
buffer objects can be the target of a read operation using the call
-f.readinto(buffer). A cool feature is that regular expression matching now
-also work on array objects. Contribution by Jack Jansen. (Needs
+f.readinto(buffer). A cool feature is that regular expression matching now
+also work on array objects. Contribution by Jack Jansen. (Needs
documentation.)
- String interning: dictionary lookups are faster when the lookup
@@ -24587,7 +24620,7 @@ Wirzenius, and RFC 850 dates (Chris Lawrence).
of message sequence specifiers without invoking a subprocess. Also
added a createmessage() method by Lars Wirzenius.
-- The StringIO.StringIO class now supports readline(nbytes). (Lars
+- The StringIO.StringIO class now supports readline(nbytes). (Lars
Wirzenius.) (Of course, you should be using cStringIO for performance.)
- UserDict.py supports the new dictionary methods as well.
@@ -24635,8 +24668,8 @@ command line utilities.
- Various small fixes to the nntplib.py module that I can't bother to
document in detail.
-- Sjoerd Mullender's mimify.py module now supports base64 encoding and
-includes functions to handle the funny encoding you sometimes see in mail
+- Sjoerd Mullender's mimify.py module now supports base64 encoding and
+includes functions to handle the funny encoding you sometimes see in mail
headers. It is now documented.
- mailbox.py: Added BabylMailbox. Improved the way the mailbox is
@@ -24987,23 +25020,23 @@ Windows (NT and 95)
NT (the old VC++ 4.2 Makefile is also still supported, but will
eventually be withdrawn due to its bulkiness).
-- See the note on the new module search path in the "Miscellaneous" section
+- See the note on the new module search path in the "Miscellaneous" section
above.
- Support for Win32s (the 32-bit Windows API under Windows 3.1) is
basically withdrawn. If it still works for you, you're lucky.
-- There's a new extension module, msvcrt.c, which provides various
-low-level operations defined in the Microsoft Visual C++ Runtime Library.
-These include locking(), setmode(), get_osfhandle(), set_osfhandle(), and
+- There's a new extension module, msvcrt.c, which provides various
+low-level operations defined in the Microsoft Visual C++ Runtime Library.
+These include locking(), setmode(), get_osfhandle(), set_osfhandle(), and
console I/O functions like kbhit(), getch() and putch().
- The -u option not only sets the standard I/O streams to unbuffered
status, but also sets them in binary mode. (This can also be done
using msvcrt.setmode(), by the way.)
-- The, sys.prefix and sys.exec_prefix variables point to the directory
-where Python is installed, or to the top of the source tree, if it was run
+- The, sys.prefix and sys.exec_prefix variables point to the directory
+where Python is installed, or to the top of the source tree, if it was run
from there.
- The various os.path modules (posixpath, ntpath, macpath) now support
@@ -25011,7 +25044,7 @@ passing more than two arguments to the join() function, so
os.path.join(a, b, c) is the same as os.path.join(a, os.path.join(b,
c)).
-- The ntpath module (normally used as os.path) supports ~ to $HOME
+- The ntpath module (normally used as os.path) supports ~ to $HOME
expansion in expanduser().
- The freeze tool now works on Windows.
@@ -25309,47 +25342,47 @@ output directory.
- New module whichdb recognizes dbm, gdbm and bsddb/dbhash files.
-- The Doc/Makefile targets have been reorganized somewhat to remove the
+- The Doc/Makefile targets have been reorganized somewhat to remove the
insistence on always generating PostScript.
- The texinfo to html filter (Doc/texi2html.py) has been improved somewhat.
-- "errors.h" has been renamed to "pyerrors.h" to resolve a long-standing
+- "errors.h" has been renamed to "pyerrors.h" to resolve a long-standing
name conflict on the Mac.
-- Linking a module compiled with a different setting for Py_TRACE_REFS now
+- Linking a module compiled with a different setting for Py_TRACE_REFS now
generates a linker error rather than a core dump.
-- The cgi module has a new convenience function print_exception(), which
-formats a python exception using HTML. It also fixes a bug in the
-compatibility code and adds a dubious feature which makes it possible to
+- The cgi module has a new convenience function print_exception(), which
+formats a python exception using HTML. It also fixes a bug in the
+compatibility code and adds a dubious feature which makes it possible to
have two query strings, one in the URL and one in the POST data.
-- A subtle change in the unpickling of class instances makes it possible
-to unpickle in restricted execution mode, where the __dict__ attribute is
+- A subtle change in the unpickling of class instances makes it possible
+to unpickle in restricted execution mode, where the __dict__ attribute is
not available (but setattr() is).
-- Documentation for os.path.splitext() (== posixpath.splitext()) has been
+- Documentation for os.path.splitext() (== posixpath.splitext()) has been
cleared up. It splits at the *last* dot.
- posixfile locking is now also correctly supported on AIX.
-- The tempfile module once again honors an initial setting of tmpdir. It
+- The tempfile module once again honors an initial setting of tmpdir. It
now works on Windows, too.
-- The traceback module has some new functions to extract, format and print
+- The traceback module has some new functions to extract, format and print
the active stack.
-- Some translation functions in the urllib module have been made a little
+- Some translation functions in the urllib module have been made a little
less sluggish.
-- The addtag_* methods for Canvas widgets in Tkinter as well as in the
-separate Canvas class have been fixed so they actually do something
+- The addtag_* methods for Canvas widgets in Tkinter as well as in the
+separate Canvas class have been fixed so they actually do something
meaningful.
- A tiny _test() function has been added to Tkinter.py.
-- A generic Makefile for dynamically loaded modules is provided in the Misc
+- A generic Makefile for dynamically loaded modules is provided in the Misc
subdirectory (Misc/gMakefile).
- A new version of python-mode.el for Emacs is provided. See
@@ -25357,25 +25390,25 @@ http://www.python.org/ftp/emacs/pmdetails.html for details. The
separate file pyimenu.el is no longer needed, imenu support is folded
into python-mode.el.
-- The configure script can finally correctly find the readline library in a
-non-standard location. The LDFLAGS variable is passed on the Makefiles
+- The configure script can finally correctly find the readline library in a
+non-standard location. The LDFLAGS variable is passed on the Makefiles
from the configure script.
-- Shared libraries are now installed as programs (i.e. with executable
+- Shared libraries are now installed as programs (i.e. with executable
permission). This is required on HP-UX and won't hurt on other systems.
-- The objc.c module is no longer part of the distribution. Objective-C
+- The objc.c module is no longer part of the distribution. Objective-C
support may become available as contributed software on the ftp site.
- The sybase module is no longer part of the distribution. A much
improved sybase module is available as contributed software from the
ftp site.
-- _tkinter is now compatible with Tcl 7.5 / Tk 4.1 patch1 on Windows and
-Mac (don't use unpatched Tcl/Tk!). The default line in the Setup.in file
+- _tkinter is now compatible with Tcl 7.5 / Tk 4.1 patch1 on Windows and
+Mac (don't use unpatched Tcl/Tk!). The default line in the Setup.in file
now links with Tcl 7.5 / Tk 4.1 rather than 7.4/4.0.
-- In Setup, you can now write "*shared*" instead of "*noconfig*", and you
+- In Setup, you can now write "*shared*" instead of "*noconfig*", and you
can use *.so and *.sl as shared libraries.
- Some more fidgeting for AIX shared libraries.
@@ -25384,81 +25417,81 @@ can use *.so and *.sl as shared libraries.
(Note -- a complete replacement by Niels Mo"ller, called gpmodule, is
available from the contrib directory on the ftp site.)
-- A warning is written to sys.stderr when a __del__ method raises an
+- A warning is written to sys.stderr when a __del__ method raises an
exception (formerly, such exceptions were completely ignored).
-- The configure script now defines HAVE_OLD_CPP if the C preprocessor is
+- The configure script now defines HAVE_OLD_CPP if the C preprocessor is
incapable of ANSI style token concatenation and stringification.
-- All source files (except a few platform specific modules) are once again
+- All source files (except a few platform specific modules) are once again
compatible with K&R C compilers as well as ANSI compilers. In particular,
-ANSI-isms have been removed or made conditional in complexobject.c,
+ANSI-isms have been removed or made conditional in complexobject.c,
getargs.c and operator.c.
-- The abstract object API has three new functions, PyObject_DelItem,
+- The abstract object API has three new functions, PyObject_DelItem,
PySequence_DelItem, and PySequence_DelSlice.
-- The operator module has new functions delitem and delslice, and the
-functions "or" and "and" are renamed to "or_" and "and_" (since "or" and
+- The operator module has new functions delitem and delslice, and the
+functions "or" and "and" are renamed to "or_" and "and_" (since "or" and
"and" are reserved words). ("__or__" and "__and__" are unchanged.)
-- The environment module is no longer supported; putenv() is now a function
+- The environment module is no longer supported; putenv() is now a function
in posixmodule (also under NT).
- Error in filter(<function>, "") has been fixed.
- Unrecognized keyword arguments raise TypeError, not KeyError.
-- Better portability, fewer bugs and memory leaks, fewer compiler warnings,
+- Better portability, fewer bugs and memory leaks, fewer compiler warnings,
some more documentation.
-- Bug in float power boundary case (0.0 to the negative integer power)
+- Bug in float power boundary case (0.0 to the negative integer power)
fixed.
-- The test of negative number to the float power has been moved from the
+- The test of negative number to the float power has been moved from the
built-in pow() function to floatobject.c (so complex numbers can yield the
correct result).
-- The bug introduced in beta2 where shared libraries loaded (using
+- The bug introduced in beta2 where shared libraries loaded (using
dlopen()) from the current directory would fail, has been fixed.
-- Modules imported as shared libraries now also have a __file__ attribute,
-giving the filename from which they were loaded. The only modules without
+- Modules imported as shared libraries now also have a __file__ attribute,
+giving the filename from which they were loaded. The only modules without
a __file__ attribute now are built-in modules.
-- On the Mac, dynamically loaded modules can end in either ".slb" or
-".<platform>.slb" where <platform> is either "CFM68K" or "ppc". The ".slb"
+- On the Mac, dynamically loaded modules can end in either ".slb" or
+".<platform>.slb" where <platform> is either "CFM68K" or "ppc". The ".slb"
extension should only be used for "fat" binaries.
-- C API addition: marshal.c now supports
+- C API addition: marshal.c now supports
PyMarshal_WriteObjectToString(object).
- C API addition: getargs.c now supports
PyArg_ParseTupleAndKeywords(args, kwdict, format, kwnames, ...)
to parse keyword arguments.
-- The PC versioning scheme (sys.winver) has changed once again. the
-version number is now "<digit>.<digit>.<digit>.<apiversion>", where the
-first three <digit>s are the Python version (e.g. "1.4.0" for Python 1.4,
-"1.4.1" for Python 1.4.1 -- the beta level is not included) and
+- The PC versioning scheme (sys.winver) has changed once again. the
+version number is now "<digit>.<digit>.<digit>.<apiversion>", where the
+first three <digit>s are the Python version (e.g. "1.4.0" for Python 1.4,
+"1.4.1" for Python 1.4.1 -- the beta level is not included) and
<apiversion> is the four-digit PYTHON_API_VERSION (currently 1005).
- h2py.py accepts whitespace before the # in CPP directives
-- On Solaris 2.5, it should now be possible to use either Posix threads or
-Solaris threads (XXX: how do you select which is used???). (Note: the
-Python pthreads interface doesn't fully support semaphores yet -- anyone
+- On Solaris 2.5, it should now be possible to use either Posix threads or
+Solaris threads (XXX: how do you select which is used???). (Note: the
+Python pthreads interface doesn't fully support semaphores yet -- anyone
care to fix this?)
-- Thread support should now work on AIX, using either DCE threads or
+- Thread support should now work on AIX, using either DCE threads or
pthreads.
- New file Demo/sockets/unicast.py
-- Working Mac port, with CFM68K support, with Tk 4.1 support (though not
+- Working Mac port, with CFM68K support, with Tk 4.1 support (though not
both) (XXX)
-- New project setup for PC port, now compatible with PythonWin, with
+- New project setup for PC port, now compatible with PythonWin, with
_tkinter and NumPy support (XXX)
- New module site.py (XXX)
@@ -25475,7 +25508,7 @@ _tkinter and NumPy support (XXX)
- string.atoi c.s. now raise an exception for an empty input string.
-- At last, it is no longer necessary to define HAVE_CONFIG_H in order to
+- At last, it is no longer necessary to define HAVE_CONFIG_H in order to
have config.h included at various places.
- Unrecognized keyword arguments now raise TypeError rather than KeyError.
@@ -25483,25 +25516,25 @@ have config.h included at various places.
- The makesetup script recognizes files with extension .so or .sl as
(shared) libraries.
-- 'access' is no longer a reserved word, and all code related to its
-implementation is gone (or at least #ifdef'ed out). This should make
+- 'access' is no longer a reserved word, and all code related to its
+implementation is gone (or at least #ifdef'ed out). This should make
Python a little speedier too!
-- Performance enhancements suggested by Sjoerd Mullender. This includes
-the introduction of two new optional function pointers in type object,
-getattro and setattro, which are like getattr and setattr but take a
+- Performance enhancements suggested by Sjoerd Mullender. This includes
+the introduction of two new optional function pointers in type object,
+getattro and setattro, which are like getattr and setattr but take a
string object instead of a C string pointer.
-- New operations in string module: lstrip(s) and rstrip(s) strip whitespace
-only on the left or only on the right, A new optional third argument to
-split() specifies the maximum number of separators honored (so
-splitfields(s, sep, n) returns a list of at most n+1 elements). (Since
+- New operations in string module: lstrip(s) and rstrip(s) strip whitespace
+only on the left or only on the right, A new optional third argument to
+split() specifies the maximum number of separators honored (so
+splitfields(s, sep, n) returns a list of at most n+1 elements). (Since
1.3, splitfields(s, None) is totally equivalent to split(s).)
-string.capwords() has an optional second argument specifying the
+string.capwords() has an optional second argument specifying the
separator (which is passed to split()).
-- regsub.split() has the same addition as string.split(). regsub.splitx(s,
-sep, maxsep) implements the functionality that was regsub.split(s, 1) in
+- regsub.split() has the same addition as string.split(). regsub.splitx(s,
+sep, maxsep) implements the functionality that was regsub.split(s, 1) in
1.4beta2 (return a list containing the delimiters as well as the words).
- Final touch for AIX loading, rewritten Misc/AIX-NOTES.
@@ -25545,11 +25578,11 @@ What's new in 1.4beta2 (since beta1)?
meaningful value (a few things were botched in beta 1). Lib/dos_8x3
is now a standard part of the distribution (alas).
-- More improvements to the installation procedure. Typing "make install"
-now inserts the version number in the pathnames of almost everything
-installed, and creates the machine dependent modules (FCNTL.py etc.) if not
-supplied by the distribution. (XXX There's still a problem with the latter
-because the "regen" script requires that Python is installed. Some manual
+- More improvements to the installation procedure. Typing "make install"
+now inserts the version number in the pathnames of almost everything
+installed, and creates the machine dependent modules (FCNTL.py etc.) if not
+supplied by the distribution. (XXX There's still a problem with the latter
+because the "regen" script requires that Python is installed. Some manual
intervention may still be required.) (This has been fixed in 1.4beta3.)
- New modules: errno, operator (XXX).
@@ -25612,8 +25645,8 @@ What's new in 1.4beta1 (since 1.3)?
- Added sys.platform and sys.exec_platform for Bill Janssen.
-- Installation has been completely overhauled. "make install" now installs
-everything, not just the python binary. Installation uses the install-sh
+- Installation has been completely overhauled. "make install" now installs
+everything, not just the python binary. Installation uses the install-sh
script (borrowed from X11) to install each file.
- New functions in the posix module: mkfifo, plock, remove (== unlink),
@@ -25623,59 +25656,59 @@ and ftruncate. More functions are also available under NT.
- Shared library support for FreeBSD.
-- The --with-readline option can now be used without a DIRECTORY argument,
-for systems where libreadline.* is in one of the standard places. It is
+- The --with-readline option can now be used without a DIRECTORY argument,
+for systems where libreadline.* is in one of the standard places. It is
also possible for it to be a shared library.
-- The extension tkinter has been renamed to _tkinter, to avoid confusion
-with Tkinter.py oncase insensitive file systems. It now supports Tk 4.1 as
+- The extension tkinter has been renamed to _tkinter, to avoid confusion
+with Tkinter.py oncase insensitive file systems. It now supports Tk 4.1 as
well as 4.0.
-- Author's change of address from CWI in Amsterdam, The Netherlands, to
+- Author's change of address from CWI in Amsterdam, The Netherlands, to
CNRI in Reston, VA, USA.
-- The math.hypot() function is now always available (if it isn't found in
+- The math.hypot() function is now always available (if it isn't found in
the C math library, Python provides its own implementation).
-- The latex documentation is now compatible with latex2e, thanks to David
+- The latex documentation is now compatible with latex2e, thanks to David
Ascher.
- The expression x**y is now equivalent to pow(x, y).
- The indexing expression x[a, b, c] is now equivalent to x[(a, b, c)].
-- Complex numbers are now supported. Imaginary constants are written with
-a 'j' or 'J' prefix, general complex numbers can be formed by adding a real
-part to an imaginary part, like 3+4j. Complex numbers are always stored in
-floating point form, so this is equivalent to 3.0+4.0j. It is also
-possible to create complex numbers with the new built-in function
-complex(re, [im]). For the footprint-conscious, complex number support can
+- Complex numbers are now supported. Imaginary constants are written with
+a 'j' or 'J' prefix, general complex numbers can be formed by adding a real
+part to an imaginary part, like 3+4j. Complex numbers are always stored in
+floating point form, so this is equivalent to 3.0+4.0j. It is also
+possible to create complex numbers with the new built-in function
+complex(re, [im]). For the footprint-conscious, complex number support can
be disabled by defining the symbol WITHOUT_COMPLEX.
- New built-in function list() is the long-awaited counterpart of tuple().
-- There's a new "cmath" module which provides the same functions as the
-"math" library but with complex arguments and results. (There are very
-good reasons why math.sqrt(-1) still raises an exception -- you have to use
+- There's a new "cmath" module which provides the same functions as the
+"math" library but with complex arguments and results. (There are very
+good reasons why math.sqrt(-1) still raises an exception -- you have to use
cmath.sqrt(-1) to get 1j for an answer.)
-- The Python.h header file (which is really the same as allobjects.h except
-it disables support for old style names) now includes several more files,
+- The Python.h header file (which is really the same as allobjects.h except
+it disables support for old style names) now includes several more files,
so you have to have fewer #include statements in the average extension.
-- The NDEBUG symbol is no longer used. Code that used to be dependent on
-the presence of NDEBUG is now present on the absence of DEBUG. TRACE_REFS
-and REF_DEBUG have been renamed to Py_TRACE_REFS and Py_REF_DEBUG,
-respectively. At long last, the source actually compiles and links without
+- The NDEBUG symbol is no longer used. Code that used to be dependent on
+the presence of NDEBUG is now present on the absence of DEBUG. TRACE_REFS
+and REF_DEBUG have been renamed to Py_TRACE_REFS and Py_REF_DEBUG,
+respectively. At long last, the source actually compiles and links without
errors when this symbol is defined.
-- Several symbols that didn't follow the new naming scheme have been
-renamed (usually by adding to rename2.h) to use a Py or _Py prefix. There
-are no external symbols left without a Py or _Py prefix, not even those
-defined by sources that were incorporated from elsewhere (regexpr.c,
+- Several symbols that didn't follow the new naming scheme have been
+renamed (usually by adding to rename2.h) to use a Py or _Py prefix. There
+are no external symbols left without a Py or _Py prefix, not even those
+defined by sources that were incorporated from elsewhere (regexpr.c,
md5c.c). (Macros are a different story...)
-- There are now typedefs for the structures defined in config.c and
+- There are now typedefs for the structures defined in config.c and
frozen.c.
- New PYTHON_API_VERSION value and .pyc file magic number.
@@ -25689,125 +25722,125 @@ frozen.c.
- The binhex and binascii modules now actually work.
- The cgi module has been almost totally rewritten and documented.
-It now supports file upload and a new data type to handle forms more
+It now supports file upload and a new data type to handle forms more
flexibly.
- The formatter module (for use with htmllib) has been overhauled (again).
- The ftplib module now supports passive mode and has doc strings.
-- In (ideally) all places where binary files are read or written, the file
-is now correctly opened in binary mode ('rb' or 'wb') so the code will work
+- In (ideally) all places where binary files are read or written, the file
+is now correctly opened in binary mode ('rb' or 'wb') so the code will work
on Mac or PC.
-- Dummy versions of os.path.expandvars() and expanduser() are now provided
+- Dummy versions of os.path.expandvars() and expanduser() are now provided
on non-Unix platforms.
-- Module urllib now has two new functions url2pathname and pathname2url
-which turn local filenames into "file:..." URLs using the same rules as
-Netscape (why be different). it also supports urlretrieve() with a
-pathname parameter, and honors the proxy environment variables (http_proxy
+- Module urllib now has two new functions url2pathname and pathname2url
+which turn local filenames into "file:..." URLs using the same rules as
+Netscape (why be different). it also supports urlretrieve() with a
+pathname parameter, and honors the proxy environment variables (http_proxy
etc.). The URL parsing has been improved somewhat, too.
-- Micro improvements to urlparse. Added urlparse.urldefrag() which
+- Micro improvements to urlparse. Added urlparse.urldefrag() which
removes a trailing ``#fragment'' if any.
- The mailbox module now supports MH style message delimiters as well.
-- The mhlib module contains some new functionality: setcontext() to set the
-current folder and parsesequence() to parse a sequence as commonly passed
+- The mhlib module contains some new functionality: setcontext() to set the
+current folder and parsesequence() to parse a sequence as commonly passed
to MH commands (e.g. 1-10 or last:5).
-- New module mimify for conversion to and from MIME format of email
+- New module mimify for conversion to and from MIME format of email
messages.
-- Module ni now automatically installs itself when first imported -- this
-is against the normal rule that modules should define classes and functions
-but not invoke them, but appears more useful in the case that two
+- Module ni now automatically installs itself when first imported -- this
+is against the normal rule that modules should define classes and functions
+but not invoke them, but appears more useful in the case that two
different, independent modules want to use ni's features.
- Some small performance enhancements in module pickle.
-- Small interface change to the profile.run*() family of functions -- more
+- Small interface change to the profile.run*() family of functions -- more
sensible handling of return values.
-- The officially registered Mac creator for Python files is 'Pyth'. This
+- The officially registered Mac creator for Python files is 'Pyth'. This
replaces 'PYTH' which was used before but never registered.
- Added regsub.capwords(). (XXX)
-- Added string.capwords(), string.capitalize() and string.translate().
+- Added string.capwords(), string.capitalize() and string.translate().
(XXX)
-- Fixed an interface bug in the rexec module: it was impossible to pass a
-hooks instance to the RExec class. rexec now also supports the dynamic
-loading of modules from shared libraries. Some other interfaces have been
+- Fixed an interface bug in the rexec module: it was impossible to pass a
+hooks instance to the RExec class. rexec now also supports the dynamic
+loading of modules from shared libraries. Some other interfaces have been
added too.
-- Module rfc822 now caches the headers in a dictionary for more efficient
+- Module rfc822 now caches the headers in a dictionary for more efficient
lookup.
-- The sgmllib module now understands a limited number of SGML "shorthands"
+- The sgmllib module now understands a limited number of SGML "shorthands"
like <A/.../ for <A>...</A>. (It's not clear that this was a good idea...)
-- The tempfile module actually tries a number of different places to find a
-usable temporary directory. (This was prompted by certain Linux
-installations that appear to be missing a /usr/tmp directory.) [A bug in
-the implementation that would ignore a pre-existing tmpdir global has been
+- The tempfile module actually tries a number of different places to find a
+usable temporary directory. (This was prompted by certain Linux
+installations that appear to be missing a /usr/tmp directory.) [A bug in
+the implementation that would ignore a pre-existing tmpdir global has been
fixed in beta3.]
- Much improved and enhanved FileDialog module for Tkinter.
-- Many small changes to Tkinter, to bring it more in line with Tk 4.0 (as
+- Many small changes to Tkinter, to bring it more in line with Tk 4.0 (as
well as Tk 4.1).
-- New socket interfaces include ntohs(), ntohl(), htons(), htonl(), and
-s.dup(). Sockets now work correctly on Windows. On Windows, the built-in
-extension is called _socket and a wrapper module win/socket.py provides
-"makefile()" and "dup()" functionality. On Windows, the select module
+- New socket interfaces include ntohs(), ntohl(), htons(), htonl(), and
+s.dup(). Sockets now work correctly on Windows. On Windows, the built-in
+extension is called _socket and a wrapper module win/socket.py provides
+"makefile()" and "dup()" functionality. On Windows, the select module
works only with socket objects.
- Bugs in bsddb module fixed (e.g. missing default argument values).
- The curses extension now includes <ncurses.h> when available.
-- The gdbm module now supports opening databases in "fast" mode by
+- The gdbm module now supports opening databases in "fast" mode by
specifying 'f' as the second character or the mode string.
-- new variables sys.prefix and sys.exec_prefix pass corresponding
+- new variables sys.prefix and sys.exec_prefix pass corresponding
configuration options / Makefile variables to the Python programmer.
-- The ``new'' module now supports creating new user-defined classes as well
+- The ``new'' module now supports creating new user-defined classes as well
as instances thereof.
-- The soundex module now sports get_soundex() to get the soundex value for an
-arbitrary string (formerly it would only do soundex-based string
+- The soundex module now sports get_soundex() to get the soundex value for an
+arbitrary string (formerly it would only do soundex-based string
comparison) as well as doc strings.
-- New object type "cobject" to safely wrap void pointers for passing them
+- New object type "cobject" to safely wrap void pointers for passing them
between various extension modules.
- More efficient computation of float**smallint.
-- The mysterious bug whereby "x.x" (two occurrences of the same
-one-character name) typed from the commandline would sometimes fail
+- The mysterious bug whereby "x.x" (two occurrences of the same
+one-character name) typed from the commandline would sometimes fail
mysteriously.
-- The initialization of the readline function can now be invoked by a C
+- The initialization of the readline function can now be invoked by a C
extension through PyOS_ReadlineInit().
-- There's now an externally visible pointer PyImport_FrozenModules which
+- There's now an externally visible pointer PyImport_FrozenModules which
can be changed by an embedding application.
-- The argument parsing functions now support a new format character 'D' to
+- The argument parsing functions now support a new format character 'D' to
specify complex numbers.
- Various memory leaks plugged and bugs fixed.
-- Improved support for posix threads (now that real implementations are
+- Improved support for posix threads (now that real implementations are
beginning to apepar). Still no fully functioning semaphores.
-- Some various and sundry improvements and new entries in the Tools
+- Some various and sundry improvements and new entries in the Tools
directory.
@@ -26766,7 +26799,7 @@ the first time it is imported.
python parser. Corresponding standard library modules token and symbol
defines the numeric values of tokens and non-terminal symbols.
-* The posix module has aquired new functions setuid(), setgid(),
+* The posix module has acquired new functions setuid(), setgid(),
execve(), and exec() has been renamed to execv().
* The array module is extended with 8-byte object swaps, the 'i'
@@ -26780,7 +26813,7 @@ module can't be decoded by the new version.
* For select.select(), a timeout (4th) argument of None means the same
as leaving the timeout argument out.
-* Module strop (and hence standard library module string) has aquired
+* Module strop (and hence standard library module string) has acquired
a new function: rindex(). Thanks to Amrit Prem!
* Module regex defines a new function symcomp() which uses an extended
@@ -27146,7 +27179,7 @@ a string it is returned unchanged, otherwise it returns `x`.
* repr(x) returns the same as `x`. (Some users found it easier to
have this as a function.)
-* round(x) returns the floating point number x rounded to an whole
+* round(x) returns the floating point number x rounded to a whole
number, represented as a floating point number. round(x, n) returns x
rounded to n digits.
@@ -27417,7 +27450,7 @@ it's now about 38).
The limit on the size of the *run-time* stack has completely been
removed -- this means that tuple or list displays can contain any
number of elements (formerly more than 50 would crash the
-interpreter).
+interpreter).
Changes to existing built-in functions and methods
@@ -27926,7 +27959,7 @@ New features in 0.9.6:
to give more useful results for negative operands
- Changed/added range checks for long/plain integer shifts
- Options found after "-c command" are now passed to the command in sys.argv
- (note subtle incompatiblity with "python -c command -- -options"!)
+ (note subtle incompatibility with "python -c command -- -options"!)
- Module stdwin is better protected against touching objects after they've
been closed; menus can now also be closed explicitly
- Stdwin now uses its own exception (stdwin.error)
diff --git a/Misc/NEWS b/Misc/NEWS
index 92e1a809fe..418fd5c1bc 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1,174 +1,468 @@
-+++++++++++
++++++++++++
Python News
+++++++++++
-What's New in Python 3.4.5?
-===========================
+What's New in Python 3.5.2 release candidate 1?
+===============================================
Release date: tba
Core and Builtins
-----------------
+- Issue #27066: Fixed SystemError if a custom opener (for open()) returns a
+ negative number without setting an exception.
+
+- Issue #20041: Fixed TypeError when frame.f_trace is set to None.
+ Patch by Xavier de Gaye.
+
+- Issue #26168: Fixed possible refleaks in failing Py_BuildValue() with the "N"
+ format unit.
+
+- Issue #26991: Fix possible refleak when creating a function with annotations.
+
+- Issue #27039: Fixed bytearray.remove() for values greater than 127. Patch by
+ Joe Jevnik.
+
+- Issue #23640: int.from_bytes() no longer bypasses constructors for subclasses.
+
+- Issue #26811: gc.get_objects() no longer contains a broken tuple with NULL
+ pointer.
+
+- Issue #20120: Use RawConfigParser for .pypirc parsing,
+ removing support for interpolation unintentionally added
+ with move to Python 3. Behavior no longer does any
+ interpolation in .pypirc files, matching behavior in Python
+ 2.7 and Setuptools 19.0.
+
+- Issue #26659: Make the builtin slice type support cycle collection.
+
+- Issue #26718: super.__init__ no longer leaks memory if called multiple times.
+ NOTE: A direct call of super.__init__ is not endorsed!
+
+- Issue #25339: PYTHONIOENCODING now has priority over locale in setting the
+ error handler for stdin and stdout.
+
+- Issue #26494: Fixed crash on iterating exhausting iterators.
+ Affected classes are generic sequence iterators, iterators of str, bytes,
+ bytearray, list, tuple, set, frozenset, dict, OrderedDict, corresponding
+ views and os.scandir() iterator.
+
+- Issue #26581: If coding cookie is specified multiple times on a line in
+ Python source code file, only the first one is taken to account.
+
+- Issue #26464: Fix str.translate() when string is ASCII and first replacements
+ removes character, but next replacement uses a non-ASCII character or a
+ string longer than 1 character. Regression introduced in Python 3.5.0.
+
+- Issue #22836: Ensure exception reports from PyErr_Display() and
+ PyErr_WriteUnraisable() are sensible even when formatting them produces
+ secondary errors. This affects the reports produced by
+ sys.__excepthook__() and when __del__() raises an exception.
+
+- Issue #26302: Correct behavior to reject comma as a legal character for
+ cookie names.
+
+- Issue #4806: Avoid masking the original TypeError exception when using star
+ (*) unpacking in function calls. Based on patch by Hagen Fürstenau and
+ Daniel Urban.
+
+- Issue #27138: Fix the doc comment for FileFinder.find_spec().
+
+- Issue #26154: Add a new private _PyThreadState_UncheckedGet() function to get
+ the current Python thread state, but don't issue a fatal error if it is NULL.
+ This new function must be used instead of accessing directly the
+ _PyThreadState_Current variable. The variable is no more exposed since
+ Python 3.5.1 to hide the exact implementation of atomic C types, to avoid
+ compiler issues.
+
+- Issue #26194: Deque.insert() gave odd results for bounded deques that had
+ reached their maximum size. Now an IndexError will be raised when attempting
+ to insert into a full deque.
+
+- Issue #25843: When compiling code, don't merge constants if they are equal
+ but have a different types. For example, ``f1, f2 = lambda: 1, lambda: 1.0``
+ is now correctly compiled to two different functions: ``f1()`` returns ``1``
+ (``int``) and ``f2()`` returns ``1.0`` (``int``), even if ``1`` and ``1.0``
+ are equal.
+
+- Issue #22995: [UPDATE] Comment out the one of the pickleability tests in
+ _PyObject_GetState() due to regressions observed in Cython-based projects.
+
+- Issue #25961: Disallowed null characters in the type name.
+
+- Issue #25973: Fix segfault when an invalid nonlocal statement binds a name
+ starting with two underscores.
+
+- Issue #22995: Instances of extension types with a state that aren't
+ subclasses of list or dict and haven't implemented any pickle-related
+ methods (__reduce__, __reduce_ex__, __getnewargs__, __getnewargs_ex__,
+ or __getstate__), can no longer be pickled. Including memoryview.
+
+- Issue #20440: Massive replacing unsafe attribute setting code with special
+ macro Py_SETREF.
+
+- Issue #25766: Special method __bytes__() now works in str subclasses.
+
+- Issue #25421: __sizeof__ methods of builtin types now use dynamic basic size.
+ This allows sys.getsize() to work correctly with their subclasses with
+ __slots__ defined.
+
+- Issue #25709: Fixed problem with in-place string concatenation and utf-8 cache.
+
+- Issue #27147: Mention PEP 420 in the importlib docs.
+
+- Issue #24097: Fixed crash in object.__reduce__() if slot name is freed inside
+ __getattr__.
+
+- Issue #24731: Fixed crash on converting objects with special methods
+ __bytes__, __trunc__, and __float__ returning instances of subclasses of
+ bytes, int, and float to subclasses of bytes, int, and float correspondingly.
+
- Issue #26478: Fix semantic bugs when using binary operators with dictionary
views and tuples.
- Issue #26171: Fix possible integer overflow and heap corruption in
zipimporter.get_data().
+- Issue #25660: Fix TAB key behaviour in REPL with readline.
+
+- Issue #25887: Raise a RuntimeError when a coroutine object is awaited
+ more than once.
+
+- Issue #27243: Update the __aiter__ protocol: instead of returning
+ an awaitable that resolves to an asynchronous iterator, the asynchronous
+ iterator should be returned directly. Doing the former will trigger a
+ PendingDeprecationWarning.
+
+
Library
-------
- Fix TLS stripping vulnerability in smptlib, CVE-2016-0772. Reported by Team
Oststrom
-- Issue #25939: On Windows open the cert store readonly in ssl.enum_certificates.
+- Issue #21386: Implement missing IPv4Address.is_global property. It was
+ documented since 07a5610bae9d. Initial patch by Roger Luethi.
-- Issue #26012: Don't traverse into symlinks for ** pattern in
- pathlib.Path.[r]glob().
+- Issue #20900: distutils register command now decodes HTTP responses
+ correctly. Initial patch by ingrid.
-- Issue #24120: Ignore PermissionError when traversing a tree with
- pathlib.Path.[r]glob(). Patch by Ulrich Petri.
+- A new version of typing.py provides several new classes and
+ features: @overload outside stubs, Reversible, DefaultDict, Text,
+ ContextManager, Type[], NewType(), TYPE_CHECKING, and numerous bug
+ fixes (note that some of the new features are not yet implemented in
+ mypy or other static analyzers). Also classes for PEP 492
+ (Awaitable, AsyncIterable, AsyncIterator) have been added (in fact
+ they made it into 3.5.1 but were never mentioned).
-- Skip getaddrinfo if host is already resolved.
- Patch by A. Jesse Jiryu Davis.
+- Issue #25738: Stop http.server.BaseHTTPRequestHandler.send_error() from
+ sending a message body for 205 Reset Content. Also, don't send Content
+ header fields in responses that don't have a body. Patch by Susumu
+ Koshiba.
-- Add asyncio.timeout() context manager.
+- Issue #21313: Fix the "platform" module to tolerate when sys.version
+ contains truncated build information.
-- Issue #26050: Add asyncio.StreamReader.readuntil() method.
- Patch by Марк Коренберг.
+- Issue #26839: On Linux, :func:`os.urandom` now calls ``getrandom()`` with
+ ``GRND_NONBLOCK`` to fall back on reading ``/dev/urandom`` if the urandom
+ entropy pool is not initialized yet. Patch written by Colm Buckley.
-Tests
------
+- Issue #27164: In the zlib module, allow decompressing raw Deflate streams
+ with a predefined zdict. Based on patch by Xiang Zhang.
-- Issue #25940: Changed test_ssl to use self-signed.pythontest.net. This
- avoids relying on svn.python.org, which recently changed root certificate.
+- Issue #24291: Fix wsgiref.simple_server.WSGIRequestHandler to completely
+ write data to the client. Previously it could do partial writes and
+ truncate data. Also, wsgiref.handler.ServerHandler can now handle stdout
+ doing partial writes, but this is deprecated.
+- Issue #26809: Add ``__all__`` to :mod:`string`. Patch by Emanuel Barry.
-What's New in Python 3.4.4?
-===========================
+- Issue #26373: subprocess.Popen.communicate now correctly ignores
+ BrokenPipeError when the child process dies before .communicate()
+ is called in more/all circumstances.
-Release date: 2015/12/20
+- Issue #21776: distutils.upload now correctly handles HTTPError.
+ Initial patch by Claudiu Popa.
-Windows
--------
+- Issue #27114: Fix SSLContext._load_windows_store_certs fails with
+ PermissionError
-- Issue #25844: Corrected =/== typo potentially leading to crash in launcher.
+- Issue #18383: Avoid creating duplicate filters when using filterwarnings
+ and simplefilter. Based on patch by Alex Shkop.
+- Issue #27057: Fix os.set_inheritable() on Android, ioctl() is blocked by
+ SELinux and fails with EACCESS. The function now falls back to fcntl().
+ Patch written by Michał Bednarski.
-What's New in Python 3.4.4rc1?
-==============================
+- Issue #27014: Fix infinite recursion using typing.py. Thanks to Kalle Tuure!
-Release date: 2015/12/06
+- Issue #14132: Fix urllib.request redirect handling when the target only has
+ a query string. Original fix by Ján Janech.
-Core and Builtins
------------------
+- Issue #17214: The "urllib.request" module now percent-encodes non-ASCII
+ bytes found in redirect target URLs. Some servers send Location header
+ fields with non-ASCII bytes, but "http.client" requires the request target
+ to be ASCII-encodable, otherwise a UnicodeEncodeError is raised. Based on
+ patch by Christian Heimes.
-- Issue #25709: Fixed problem with in-place string concatenation and utf-8
- cache.
+- Issue #26892: Honor debuglevel flag in urllib.request.HTTPHandler. Patch
+ contributed by Chi Hsuan Yen.
-- Issue #24097: Fixed crash in object.__reduce__() if slot name is freed inside
- __getattr__.
+- Issue #22274: In the subprocess module, allow stderr to be redirected to
+ stdout even when stdout is not redirected. Patch by Akira Li.
-- Issue #24731: Fixed crash on converting objects with special methods
- __bytes__, __trunc__, and __float__ returning instances of subclasses of
- bytes, int, and float to subclasses of bytes, int, and float correspondingly.
+- Issue #26807: mock_open 'files' no longer error on readline at end of file.
+ Patch from Yolanda Robla.
-- Issue #25388: Fixed tokenizer crash when processing undecodable source code
- with a null byte.
+- Issue #25745: Fixed leaking a userptr in curses panel destructor.
-- Issue #22995: Default implementation of __reduce__ and __reduce_ex__ now
- rejects builtin types with not defined __new__.
+- Issue #26977: Removed unnecessary, and ignored, call to sum of squares helper
+ in statistics.pvariance.
-- Issue #24802: Avoid buffer overreads when int(), float(), compile(), exec()
- and eval() are passed bytes-like objects. These objects are not
- necessarily terminated by a null byte, but the functions assumed they were.
+- Issue #26881: The modulefinder module now supports extended opcode arguments.
-- Issue #24402: Fix input() to prompt to the redirected stdout when
- sys.stdout.fileno() fails.
+- Issue #23815: Fixed crashes related to directly created instances of types in
+ _tkinter and curses.panel modules.
-- Issue #24806: Prevent builtin types that are not allowed to be subclassed from
- being subclassed through multiple inheritance.
+- Issue #17765: weakref.ref() no longer silently ignores keyword arguments.
+ Patch by Georg Brandl.
-- Issue #24848: Fixed a number of bugs in UTF-7 decoding of misformed data.
+- Issue #26873: xmlrpc now raises ResponseError on unsupported type tags
+ instead of silently return incorrect result.
-- Issue #25280: Import trace messages emitted in verbose (-v) mode are no
- longer formatted twice.
+- Issue #26711: Fixed the comparison of plistlib.Data with other types.
-- Issue #25003: os.urandom() doesn't use getentropy() on Solaris because
- getentropy() is blocking, whereas os.urandom() should not block. getentropy()
- is supported since Solaris 11.3.
+- Issue #24114: Fix an uninitialized variable in `ctypes.util`.
-- Issue #25182: The stdprinter (used as sys.stderr before the io module is
- imported at startup) now uses the backslashreplace error handler.
+ The bug only occurs on SunOS when the ctypes implementation searches
+ for the `crle` program. Patch by Xiang Zhang. Tested on SunOS by
+ Kees Bos.
-- Issue #24891: Fix a race condition at Python startup if the file descriptor
- of stdin (0), stdout (1) or stderr (2) is closed while Python is creating
- sys.stdin, sys.stdout and sys.stderr objects. These attributes are now set
- to None if the creation of the object failed, instead of raising an OSError
- exception. Initial patch written by Marco Paolini.
+- Issue #26864: In urllib.request, change the proxy bypass host checking
+ against no_proxy to be case-insensitive, and to not match unrelated host
+ names that happen to have a bypassed hostname as a suffix. Patch by Xiang
+ Zhang.
-- Issue #21167: NAN operations are now handled correctly when python is
- compiled with ICC even if -fp-model strict is not specified.
+- Issue #26634: recursive_repr() now sets __qualname__ of wrapper. Patch by
+ Xiang Zhang.
-- Issue #4395: Better testing and documentation of binary operators.
- Patch by Martin Panter.
+- Issue #26804: urllib.request will prefer lower_case proxy environment
+ variables over UPPER_CASE or Mixed_Case ones. Patch contributed by Hans-Peter
+ Jansen.
-- Issue #24467: Fixed possible buffer over-read in bytearray. The bytearray
- object now always allocates place for trailing null byte and it's buffer now
- is always null-terminated.
+- Issue #26837: assertSequenceEqual() now correctly outputs non-stringified
+ differing items (like bytes in the -b mode). This affects assertListEqual()
+ and assertTupleEqual().
-- Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(),
- PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains()
- to check for and handle errors correctly.
+- Issue #26041: Remove "will be removed in Python 3.7" from deprecation
+ messages of platform.dist() and platform.linux_distribution().
+ Patch by Kumaripaba Miyurusara Athukorala.
-- Issue #24257: Fixed system error in the comparison of faked
- types.SimpleNamespace.
+- Issue #26822: itemgetter, attrgetter and methodcaller objects no longer
+ silently ignore keyword arguments.
-- Issue #22939: Fixed integer overflow in iterator object. Patch by
- Clement Rouault.
+- Issue #26733: Disassembling a class now disassembles class and static methods.
+ Patch by Xiang Zhang.
-- Issue #23985: Fix a possible buffer overrun when deleting a slice from
- the front of a bytearray and then appending some other bytes data.
+- Issue #26801: Fix error handling in :func:`shutil.get_terminal_size`, catch
+ :exc:`AttributeError` instead of :exc:`NameError`. Patch written by Emanuel
+ Barry.
-- Issue #24102: Fixed exception type checking in standard error handlers.
+- Issue #24838: tarfile's ustar and gnu formats now correctly calculate name
+ and link field limits for multibyte character encodings like utf-8.
-- Issue #23757: PySequence_Tuple() incorrectly called the concrete list API
- when the data was a list subclass.
+- Issue #26657: Fix directory traversal vulnerability with http.server on
+ Windows. This fixes a regression that was introduced in 3.3.4rc1 and
+ 3.4.0rc1. Based on patch by Philipp Hagemeister.
-- Issue #24407: Fix crash when dict is mutated while being updated.
+- Issue #26717: Stop encoding Latin-1-ized WSGI paths with UTF-8. Patch by
+ Anthony Sottile.
-- Issue #24096: Make warnings.warn_explicit more robust against mutation of the
- warnings.filters list.
+- Issue #26735: Fix :func:`os.urandom` on Solaris 11.3 and newer when reading
+ more than 1,024 bytes: call ``getrandom()`` multiple times with a limit of
+ 1024 bytes per call.
-- Issue #23996: Avoid a crash when a delegated generator raises an
- unnormalized StopIteration exception. Patch by Stefan Behnel.
+- Issue #16329: Add .webm to mimetypes.types_map. Patch by Giampaolo Rodola'.
-- Issue #24022: Fix tokenizer crash when processing undecodable source code.
+- Issue #13952: Add .csv to mimetypes.types_map. Patch by Geoff Wilson.
-- Issue #23309: Avoid a deadlock at shutdown if a daemon thread is aborted
- while it is holding a lock to a buffered I/O object, and the main thread
- tries to use the same I/O object (typically stdout or stderr). A fatal
- error is emitted instead.
+- Issue #26709: Fixed Y2038 problem in loading binary PLists.
-- Issue #22977: Fixed formatting Windows error messages on Wine.
- Patch by Martin Panter.
+- Issue #23735: Handle terminal resizing with Readline 6.3+ by installing our
+ own SIGWINCH handler. Patch by Eric Price.
-- Issue #23803: Fixed str.partition() and str.rpartition() when a separator
- is wider then partitioned string.
+- Issue #26586: In http.server, respond with "413 Request header fields too
+ large" if there are too many header fields to parse, rather than killing
+ the connection and raising an unhandled exception. Patch by Xiang Zhang.
-- Issue #23192: Fixed generator lambdas. Patch by Bruno Cauet.
+- Issue #22854: Change BufferedReader.writable() and
+ BufferedWriter.readable() to always return False.
-- Issue #23629: Fix the default __sizeof__ implementation for variable-sized
- objects.
+- Issue #25195: Fix a regression in mock.MagicMock. _Call is a subclass of
+ tuple (changeset 3603bae63c13 only works for classes) so we need to
+ implement __ne__ ourselves. Patch by Andrew Plummer.
-- Issue #24044: Fix possible null pointer dereference in list.sort in out of
- memory conditions.
+- Issue #26644: Raise ValueError rather than SystemError when a negative
+ length is passed to SSLSocket.recv() or read().
-- Issue #21354: PyCFunction_New function is exposed by python DLL again.
+- Issue #23804: Fix SSL recv(0) and read(0) methods to return zero bytes
+ instead of up to 1024.
-Library
--------
+- Issue #26616: Fixed a bug in datetime.astimezone() method.
+
+- Issue #21925: :func:`warnings.formatwarning` now catches exceptions on
+ ``linecache.getline(...)`` to be able to log :exc:`ResourceWarning` emitted
+ late during the Python shutdown process.
+
+- Issue #24266: Ctrl+C during Readline history search now cancels the search
+ mode when compiled with Readline 7.
+
+- Issue #26560: Avoid potential ValueError in BaseHandler.start_response.
+ Initial patch by Peter Inglesby.
+
+- Issue #26313: ssl.py _load_windows_store_certs fails if windows cert store
+ is empty. Patch by Baji.
+
+- Issue #26569: Fix :func:`pyclbr.readmodule` and :func:`pyclbr.readmodule_ex`
+ to support importing packages.
+
+- Issue #26499: Account for remaining Content-Length in
+ HTTPResponse.readline() and read1(). Based on patch by Silent Ghost.
+ Also document that HTTPResponse now supports these methods.
+
+- Issue #25320: Handle sockets in directories unittest discovery is scanning.
+ Patch from Victor van den Elzen.
+
+- Issue #16181: cookiejar.http2time() now returns None if year is higher than
+ datetime.MAXYEAR.
+
+- Issue #26513: Fixes platform module detection of Windows Server
+
+- Issue #23718: Fixed parsing time in week 0 before Jan 1. Original patch by
+ Tamás Bence Gedai.
+
+- Issue #20589: Invoking Path.owner() and Path.group() on Windows now raise
+ NotImplementedError instead of ImportError.
+
+- Issue #26177: Fixed the keys() method for Canvas and Scrollbar widgets.
+
+- Issue #15068: Got rid of excessive buffering in the fileinput module.
+ The bufsize parameter is no longer used.
+
+- Issue #2202: Fix UnboundLocalError in
+ AbstractDigestAuthHandler.get_algorithm_impls. Initial patch by Mathieu Dupuy.
+
+- Issue #25718: Fixed pickling and copying the accumulate() iterator with
+ total is None.
+
+- Issue #26475: Fixed debugging output for regular expressions with the (?x)
+ flag.
+
+- Issue #26457: Fixed the subnets() methods in IP network classes for the case
+ when resulting prefix length is equal to maximal prefix length.
+ Based on patch by Xiang Zhang.
+
+- Issue #26385: Remove the file if the internal open() call in
+ NamedTemporaryFile() fails. Patch by Silent Ghost.
+
+- Issue #26402: Fix XML-RPC client to retry when the server shuts down a
+ persistent connection. This was a regression related to the new
+ http.client.RemoteDisconnected exception in 3.5.0a4.
+
+- Issue #25913: Leading ``<~`` is optional now in base64.a85decode() with
+ adobe=True. Patch by Swati Jaiswal.
+
+- Issue #26186: Remove an invalid type check in importlib.util.LazyLoader.
+
+- Issue #26367: importlib.__import__() raises SystemError like
+ builtins.__import__() when ``level`` is specified but without an accompanying
+ package specified.
+
+- Issue #26309: In the "socketserver" module, shut down the request (closing
+ the connected socket) when verify_request() returns false. Patch by Aviv
+ Palivoda.
+
+- Issue #25939: On Windows open the cert store readonly in ssl.enum_certificates.
+
+- Issue #25995: os.walk() no longer uses FDs proportional to the tree depth.
+
+- Issue #26117: The os.scandir() iterator now closes file descriptor not only
+ when the iteration is finished, but when it was failed with error.
+
+- Issue #25911: Restored support of bytes paths in os.walk() on Windows.
+
+- Issue #26045: Add UTF-8 suggestion to error message when posting a
+ non-Latin-1 string with http.client.
+
+- Issue #12923: Reset FancyURLopener's redirect counter even if there is an
+ exception. Based on patches by Brian Brazil and Daniel Rocco.
+
+- Issue #25945: Fixed a crash when unpickle the functools.partial object with
+ wrong state. Fixed a leak in failed functools.partial constructor.
+ "args" and "keywords" attributes of functools.partial have now always types
+ tuple and dict correspondingly.
+
+- Issue #26202: copy.deepcopy() now correctly copies range() objects with
+ non-atomic attributes.
+
+- Issue #23076: Path.glob() now raises a ValueError if it's called with an
+ invalid pattern. Patch by Thomas Nyberg.
+
+- Issue #19883: Fixed possible integer overflows in zipimport.
+
+- Issue #26227: On Windows, getnameinfo(), gethostbyaddr() and
+ gethostbyname_ex() functions of the socket module now decode the hostname
+ from the ANSI code page rather than UTF-8.
+
+- Issue #26147: xmlrpc now works with strings not encodable with used
+ non-UTF-8 encoding.
+
+- Issue #25935: Garbage collector now breaks reference loops with OrderedDict.
+
+- Issue #16620: Fixed AttributeError in msilib.Directory.glob().
+
+- Issue #26013: Added compatibility with broken protocol 2 pickles created
+ in old Python 3 versions (3.4.3 and lower).
+
+- Issue #25850: Use cross-compilation by default for 64-bit Windows.
+
+- Issue #17633: Improve zipimport's support for namespace packages.
+
+- Issue #24705: Fix sysconfig._parse_makefile not expanding ${} vars
+ appearing before $() vars.
+
+- Issue #22138: Fix mock.patch behavior when patching descriptors. Restore
+ original values after patching. Patch contributed by Sean McCully.
+
+- Issue #25672: In the ssl module, enable the SSL_MODE_RELEASE_BUFFERS mode
+ option if it is safe to do so.
+
+- Issue #26012: Don't traverse into symlinks for ** pattern in
+ pathlib.Path.[r]glob().
+
+- Issue #24120: Ignore PermissionError when traversing a tree with
+ pathlib.Path.[r]glob(). Patch by Ulrich Petri.
+
+- Issue #25447: fileinput now uses sys.stdin as-is if it does not have a
+ buffer attribute (restores backward compatibility).
+
+- Issue #25447: Copying the lru_cache() wrapper object now always works,
+ independedly from the type of the wrapped object (by returning the original
+ object unchanged).
+
+- Issue #24103: Fixed possible use after free in ElementTree.XMLPullParser.
+
+- Issue #25860: os.fwalk() no longer skips remaining directories when error
+ occurs. Original patch by Samson Lee.
+
+- Issue #25914: Fixed and simplified OrderedDict.__sizeof__.
+
+- Issue #25902: Fixed various refcount issues in ElementTree iteration.
+
+- Issue #25717: Restore the previous behaviour of tolerating most fstat()
+ errors when opening files. This was a regression in 3.5a1, and stopped
+ anonymous temporary files from working in special cases.
- Issue #24903: Fix regression in number of arguments compileall accepts when
'-d' is specified. The check on the number of arguments has been dropped
@@ -180,6 +474,15 @@ Library
- Issue #6478: _strptime's regexp cache now is reset after changing timezone
with time.tzset().
+- Issue #14285: When executing a package with the "python -m package" option,
+ and package initialization fails, a proper traceback is now reported. The
+ "runpy" module now lets exceptions from package initialization pass back to
+ the caller, rather than raising ImportError.
+
+- Issue #19771: Also in runpy and the "-m" option, omit the irrelevant
+ message ". . . is a package and cannot be directly executed" if the package
+ could not even be initialized (e.g. due to a bad ``*.pyc`` file).
+
- Issue #25177: Fixed problem with the mean of very small and very large
numbers. As a side effect, statistics.mean and statistics.variance should
be significantly faster.
@@ -204,6 +507,324 @@ Library
- Issue #25624: ZipFile now always writes a ZIP_STORED header for directory
entries. Patch by Dingyuan Wang.
+- Skip getaddrinfo if host is already resolved.
+ Patch by A. Jesse Jiryu Davis.
+
+- Issue #26050: Add asyncio.StreamReader.readuntil() method.
+ Patch by Марк Коренберг.
+
+- Issue #25924: Avoid unnecessary serialization of getaddrinfo(3) calls on
+ OS X versions 10.5 or higher. Original patch by A. Jesse Jiryu Davis.
+
+- Issue #26406: Avoid unnecessary serialization of getaddrinfo(3) calls on
+ current versions of OpenBSD and NetBSD. Patch by A. Jesse Jiryu Davis.
+
+- Issue #26848: Fix asyncio/subprocess.communicate() to handle empty input.
+ Patch by Jack O'Connor.
+
+- Issue #27040: Add loop.get_exception_handler method
+
+- Issue #27041: asyncio: Add loop.create_future method
+
+- Issue #27223: asyncio: Fix _read_ready and _write_ready to respect
+ _conn_lost.
+ Patch by Åukasz Langa.
+
+- Issue #22970: asyncio: Fix inconsistency cancelling Condition.wait.
+ Patch by David Coles.
+
+IDLE
+----
+
+- Issue #5124: Paste with text selected now replaces the selection on X11.
+ This matches how paste works on Windows, Mac, most modern Linux apps,
+ and ttk widgets. Original patch by Serhiy Storchaka.
+
+- Issue #24759: Make clear in idlelib.idle_test.__init__ that the directory
+ is a private implementation of test.test_idle and tool for maintainers.
+
+- Issue #27196: Stop 'ThemeChanged' warnings when running IDLE tests.
+ These persisted after other warnings were suppressed in #20567.
+ Apply Serhiy Storchaka's update_idletasks solution to four test files.
+ Record this additional advice in idle_test/README.txt
+
+- Issue #20567: Revise idle_test/README.txt with advice about avoiding
+ tk warning messages from tests. Apply advice to several IDLE tests.
+
+- Issue #27117: Make colorizer htest and turtledemo work with dark themes.
+ Move code for configuring text widget colors to a new function.
+
+- Issue #26673: When tk reports font size as 0, change to size 10.
+ Such fonts on Linux prevented the configuration dialog from opening.
+
+- Issue #21939: Add test for IDLE's percolator.
+ Original patch by Saimadhav Heblikar.
+
+- Issue #21676: Add test for IDLE's replace dialog.
+ Original patch by Saimadhav Heblikar.
+
+- Issue #18410: Add test for IDLE's search dialog.
+ Original patch by Westley Martínez.
+
+- Issue #21703: Add test for IDLE's undo delegator.
+ Original patch by Saimadhav Heblikar .
+
+- Issue #27044: Add ConfigDialog.remove_var_callbacks to stop memory leaks.
+
+- Issue #23977: Add more asserts to test_delegator.
+
+- Issue #20640: Add tests for idlelib.configHelpSourceEdit.
+ Patch by Saimadhav Heblikar.
+
+- In the 'IDLE-console differences' section of the IDLE doc, clarify
+ how running with IDLE affects sys.modules and the standard streams.
+
+- Issue #25507: fix incorrect change in IOBinding that prevented printing.
+ Augment IOBinding htest to include all major IOBinding functions.
+
+- Issue #25905: Revert unwanted conversion of ' to ’ RIGHT SINGLE QUOTATION
+ MARK in README.txt and open this and NEWS.txt with 'ascii'.
+ Re-encode CREDITS.txt to utf-8 and open it with 'utf-8'.
+
+Documentation
+-------------
+
+- Issue #26736: Used HTTPS for external links in the documentation if possible.
+
+- Issue #6953: Rework the Readline module documentation to group related
+ functions together, and add more details such as what underlying Readline
+ functions and variables are accessed.
+
+- Issue #23606: Adds note to ctypes documentation regarding cdll.msvcrt.
+
+- Issue #25500: Fix documentation to not claim that __import__ is searched for
+ in the global scope.
+
+- Issue #26014: Update 3.x packaging documentation:
+ * "See also" links to the new docs are now provided in the legacy pages
+ * links to setuptools documentation have been updated
+
+Tests
+-----
+
+- Issue #21916: Added tests for the turtle module. Patch by ingrid,
+ Gregory Loyse and Jelle Zijlstra.
+
+- Issue #26523: The multiprocessing thread pool (multiprocessing.dummy.Pool)
+ was untested.
+
+- Issue #26015: Added new tests for pickling iterators of mutable sequences.
+
+- Issue #26325: Added test.support.check_no_resource_warning() to check that
+ no ResourceWarning is emitted.
+
+- Issue #25940: Changed test_ssl to use self-signed.pythontest.net. This
+ avoids relying on svn.python.org, which recently changed root certificate.
+
+- Issue #25616: Tests for OrderedDict are extracted from test_collections
+ into separate file test_ordered_dict.
+
+- Issue #26583: Skip test_timestamp_overflow in test_import if bytecode
+ files cannot be written.
+
+Build
+-----
+
+- Issue #26884: Fix linking extension modules for cross builds.
+ Patch by Xavier de Gaye.
+
+- Issue #22359: Disable the rules for running _freeze_importlib and pgen when
+ cross-compiling. The output of these programs is normally saved with the
+ source code anyway, and is still regenerated when doing a native build.
+ Patch by Xavier de Gaye.
+
+- Issue #27229: Fix the cross-compiling pgen rule for in-tree builds. Patch
+ by Xavier de Gaye.
+
+- Issue #21668: Link audioop, _datetime, _ctypes_test modules to libm,
+ except on Mac OS X. Patch written by Xavier de Gaye.
+
+- Issue #25702: A --with-lto configure option has been added that will
+ enable link time optimizations at build time during a make profile-opt.
+ Some compilers and toolchains are known to not produce stable code when
+ using LTO, be sure to test things thoroughly before relying on it.
+ It can provide a few % speed up over profile-opt alone.
+
+- Issue #26624: Adds validation of ucrtbase[d].dll version with warning
+ for old versions.
+
+- Issue #17603: Avoid error about nonexistant fileblocks.o file by using a
+ lower-level check for st_blocks in struct stat.
+
+- Issue #26079: Fixing the build output folder for tix-8.4.3.6. Patch by
+ Bjoern Thiel.
+
+- Issue #26465: Update Windows builds to use OpenSSL 1.0.2g.
+
+- Issue #24421: Compile Modules/_math.c once, before building extensions.
+ Previously it could fail to compile properly if the math and cmath builds
+ were concurrent.
+
+- Issue #25348: Added ``--pgo`` and ``--pgo-job`` arguments to
+ ``PCbuild\build.bat`` for building with Profile-Guided Optimization. The
+ old ``PCbuild\build_pgo.bat`` script is now deprecated, and simply calls
+ ``PCbuild\build.bat --pgo %*``.
+
+- Issue #25827: Add support for building with ICC to ``configure``, including
+ a new ``--with-icc`` flag.
+
+- Issue #25696: Fix installation of Python on UNIX with make -j9.
+
+- Issue #26930: Update OS X 10.5+ 32-bit-only installer to build
+ and link with OpenSSL 1.0.2h.
+
+- Issue #26268: Update Windows builds to use OpenSSL 1.0.2f.
+
+- Issue #25136: Support Apple Xcode 7's new textual SDK stub libraries.
+
+- Issue #24324: Do not enable unreachable code warnings when using
+ gcc as the option does not work correctly in older versions of gcc
+ and has been silently removed as of gcc-4.5.
+
+Windows
+-------
+
+- Issue #27053: Updates make_zip.py to correctly generate library ZIP file.
+
+- Issue #26268: Update the prepare_ssl.py script to handle OpenSSL releases
+ that don't include the contents of the include directory (that is, 1.0.2e
+ and later).
+
+- Issue #26071: bdist_wininst created binaries fail to start and find
+ 32bit Python
+
+- Issue #26073: Update the list of magic numbers in launcher
+
+- Issue #26065: Excludes venv from library when generating embeddable
+ distro.
+
+Tools/Demos
+-----------
+
+- Issue #26799: Fix python-gdb.py: don't get C types once when the Python code
+ is loaded, but get C types on demand. The C types can change if
+ python-gdb.py is loaded before the Python executable. Patch written by Thomas
+ Ilsche.
+
+- Issue #26271: Fix the Freeze tool to properly use flags passed through
+ configure. Patch by Daniel Shaulov.
+
+- Issue #26489: Add dictionary unpacking support to Tools/parser/unparse.py.
+ Patch by Guo Ci Teo.
+
+- Issue #26316: Fix variable name typo in Argument Clinic.
+
+Misc
+----
+
+- Issue #17500, and https://github.com/python/pythondotorg/issues/945: Remove
+ unused and outdated icons.
+
+
+What's New in Python 3.5.1 final?
+=================================
+
+Release date: 2015-12-06
+
+Core and Builtins
+-----------------
+
+- Issue #25709: Fixed problem with in-place string concatenation and
+ utf-8 cache.
+
+Windows
+-------
+
+- Issue #25715: Python 3.5.1 installer shows wrong upgrade path and incorrect
+ logic for launcher detection.
+
+
+What's New in Python 3.5.1 release candidate 1?
+===============================================
+
+Release date: 2015-11-22
+
+Core and Builtins
+-----------------
+
+- Issue #25630: Fix a possible segfault during argument parsing in functions
+ that accept filesystem paths.
+
+- Issue #23564: Fixed a partially broken sanity check in the _posixsubprocess
+ internals regarding how fds_to_pass were passed to the child. The bug had
+ no actual impact as subprocess.py already avoided it.
+
+- Issue #25388: Fixed tokenizer crash when processing undecodable source code
+ with a null byte.
+
+- Issue #25462: The hash of the key now is calculated only once in most
+ operations in C implementation of OrderedDict.
+
+- Issue #22995: Default implementation of __reduce__ and __reduce_ex__ now
+ rejects builtin types with not defined __new__.
+
+- Issue #25555: Fix parser and AST: fill lineno and col_offset of "arg" node
+ when compiling AST from Python objects.
+
+- Issue #24802: Avoid buffer overreads when int(), float(), compile(), exec()
+ and eval() are passed bytes-like objects. These objects are not
+ necessarily terminated by a null byte, but the functions assumed they were.
+
+- Issue #24726: Fixed a crash and leaking NULL in repr() of OrderedDict that
+ was mutated by direct calls of dict methods.
+
+- Issue #25449: Iterating OrderedDict with keys with unstable hash now raises
+ KeyError in C implementations as well as in Python implementation.
+
+- Issue #25395: Fixed crash when highly nested OrderedDict structures were
+ garbage collected.
+
+- Issue #25274: sys.setrecursionlimit() now raises a RecursionError if the new
+ recursion limit is too low depending at the current recursion depth. Modify
+ also the "lower-water mark" formula to make it monotonic. This mark is used
+ to decide when the overflowed flag of the thread state is reset.
+
+- Issue #24402: Fix input() to prompt to the redirected stdout when
+ sys.stdout.fileno() fails.
+
+- Issue #24806: Prevent builtin types that are not allowed to be subclassed from
+ being subclassed through multiple inheritance.
+
+- Issue #24848: Fixed a number of bugs in UTF-7 decoding of misformed data.
+
+- Issue #25280: Import trace messages emitted in verbose (-v) mode are no
+ longer formatted twice.
+
+- Issue #25003: On Solaris 11.3 or newer, os.urandom() now uses the
+ getrandom() function instead of the getentropy() function. The getentropy()
+ function is blocking to generate very good quality entropy, os.urandom()
+ doesn't need such high-quality entropy.
+
+- Issue #25182: The stdprinter (used as sys.stderr before the io module is
+ imported at startup) now uses the backslashreplace error handler.
+
+- Issue #25131: Make the line number and column offset of set/dict literals and
+ comprehensions correspond to the opening brace.
+
+- Issue #25150: Hide the private _Py_atomic_xxx symbols from the public
+ Python.h header to fix a compilation error with OpenMP. PyThreadState_GET()
+ becomes an alias to PyThreadState_Get() to avoid ABI incompatibilies.
+
+Library
+-------
+
+- Issue #25626: Change three zlib functions to accept sizes that fit in
+ Py_ssize_t, but internally cap those sizes to UINT_MAX. This resolves a
+ regression in 3.5 where GzipFile.read() failed to read chunks larger than 2
+ or 4 GiB. The change affects the zlib.Decompress.decompress() max_length
+ parameter, the zlib.decompress() bufsize parameter, and the
+ zlib.Decompress.flush() length parameter.
+
- Issue #25583: Avoid incorrect errors raised by os.makedirs(exist_ok=True)
when the OS gives priority to errors such as EACCES over EEXIST.
@@ -213,39 +834,65 @@ Library
not allow the send_signal(), terminate(), or kill() methods to do
anything as they could potentially signal a different process.
-- Issue #25578: Fix (another) memory leak in SSLSocket.getpeercer().
-
- Issue #25590: In the Readline completer, only call getattr() once per
attribute.
- Issue #25498: Fix a crash when garbage-collecting ctypes objects created
- by wrapping a memoryview. This was a regression made in 3.4.3. Based
+ by wrapping a memoryview. This was a regression made in 3.5a1. Based
on patch by Eryksun.
+- Issue #25584: Added "escape" to the __all__ list in the glob module.
+
+- Issue #25584: Fixed recursive glob() with patterns starting with '\*\*'.
+
+- Issue #25446: Fix regression in smtplib's AUTH LOGIN support.
+
- Issue #18010: Fix the pydoc web server's module search function to handle
exceptions from importing packages.
+- Issue #25554: Got rid of circular references in regular expression parsing.
+
- Issue #25510: fileinput.FileInput.readline() now returns b'' instead of ''
at the end if the FileInput was opened with binary mode.
Patch by Ryosuke Ito.
-- Issue #25530: Disable the vulnerable SSLv3 protocol by default when creating
- ssl.SSLContext.
+- Issue #25503: Fixed inspect.getdoc() for inherited docstrings of properties.
+ Original patch by John Mark Vandenberg.
-- Issue #25569: Fix memory leak in SSLSocket.getpeercert().
+- Issue #25515: Always use os.urandom as a source of randomness in uuid.uuid4.
- Issue #21827: Fixed textwrap.dedent() for the case when largest common
whitespace is a substring of smallest leading whitespace.
Based on patch by Robert Li.
-- Issue #25471: Sockets returned from accept() shouldn't appear to be
- nonblocking.
+- Issue #25447: The lru_cache() wrapper objects now can be copied and pickled
+ (by returning the original object unchanged).
+
+- Issue #25390: typing: Don't crash on Union[str, Pattern].
- Issue #25441: asyncio: Raise error from drain() when socket is closed.
+- Issue #25410: Cleaned up and fixed minor bugs in C implementation of
+ OrderedDict.
+
- Issue #25411: Improved Unicode support in SMTPHandler through better use of
the email package. Thanks to user simon04 for the patch.
+- Issue #25407: Remove mentions of the formatter module being removed in
+ Python 3.6.
+
+- Issue #25406: Fixed a bug in C implementation of OrderedDict.move_to_end()
+ that caused segmentation fault or hang in iterating after moving several
+ items to the start of ordered dict.
+
+- Issue #25364: zipfile now works in threads disabled builds.
+
+- Issue #25328: smtpd's SMTPChannel now correctly raises a ValueError if both
+ decode_data and enable_SMTPUTF8 are set to true.
+
+- Issue #25316: distutils raises OSError instead of DistutilsPlatformError
+ when MSVC is not installed.
+
- Issue #25380: Fixed protocol for the STACK_GLOBAL opcode in
pickletools.opcodes.
@@ -259,22 +906,24 @@ Library
submit a coroutine to a loop from another thread, returning a
concurrent.futures.Future. By Vincent Michel.
-- Issue #25319: When threading.Event is reinitialized, the underlying condition
- should use a regular lock rather than a recursive lock.
-
- Issue #25232: Fix CGIRequestHandler to split the query from the URL at the
first question mark (?) rather than the last. Patch from Xiang Zhang.
- Issue #24657: Prevent CGIRequestHandler from collapsing slashes in the
query part of the URL as if it were a path. Patch from Xiang Zhang.
+- Issue #24483: C implementation of functools.lru_cache() now calculates key's
+ hash only once.
+
- Issue #22958: Constructor and update method of weakref.WeakValueDictionary
now accept the self and the dict keyword arguments.
- Issue #22609: Constructor of collections.UserDict now accepts the self keyword
argument.
-- Issue #25262. Added support for BINBYTES8 opcode in Python implementation of
+- Issue #25111: Fixed comparison of traceback.FrameSummary.
+
+- Issue #25262: Added support for BINBYTES8 opcode in Python implementation of
unpickler. Highest 32 bits of 64-bit size for BINUNICODE8 and BINBYTES8
opcodes no longer silently ignored on 32-bit platforms in C implementation.
@@ -284,11 +933,14 @@ Library
- Issue #25233: Rewrite the guts of asyncio.Queue and
asyncio.Semaphore to be more understandable and correct.
+- Issue #25203: Failed readline.set_completer_delims() no longer left the
+ module in inconsistent state.
+
- Issue #23600: Default implementation of tzinfo.fromutc() was returning
wrong results in some cases.
-- Issue #25203: Failed readline.set_completer_delims() no longer left the
- module in inconsistent state.
+- Issue #23329: Allow the ssl module to be built with older versions of
+ LibreSSL.
- Prevent overflow in _Unpickler_Read.
@@ -296,61 +948,415 @@ Library
respects the letter case given by the user. This restores the ability to
write encoding names in uppercase like "UTF-8", which worked in Python 2.
+- Issue #25135: Make deque_clear() safer by emptying the deque before clearing.
+ This helps avoid possible reentrancy issues.
+
- Issue #19143: platform module now reads Windows version from kernel32.dll to
avoid compatibility shims.
+- Issue #25092: Fix datetime.strftime() failure when errno was already set to
+ EINVAL.
+
- Issue #23517: Fix rounding in fromtimestamp() and utcfromtimestamp() methods
of datetime.datetime: microseconds are now rounded to nearest with ties
going to nearest even integer (ROUND_HALF_EVEN), instead of being rounding
- towards zero (ROUND_DOWN). It's important that these methods use the same
- rounding mode than datetime.timedelta to keep the property:
+ towards minus infinity (ROUND_FLOOR). It's important that these methods use
+ the same rounding mode than datetime.timedelta to keep the property:
(datetime(1970,1,1) + timedelta(seconds=t)) == datetime.utcfromtimestamp(t).
It also the rounding mode used by round(float) for example.
+- Issue #25155: Fix datetime.datetime.now() and datetime.datetime.utcnow() on
+ Windows to support date after year 2038. It was a regression introduced in
+ Python 3.5.0.
+
+- Issue #25108: Omitted internal frames in traceback functions print_stack(),
+ format_stack(), and extract_stack() called without arguments.
+
+- Issue #25118: Fix a regression of Python 3.5.0 in os.waitpid() on Windows.
+
- Issue #24684: socket.socket.getaddrinfo() now calls
PyUnicode_AsEncodedString() instead of calling the encode() method of the
host, to handle correctly custom string with an encode() method which doesn't
return a byte string. The encoder of the IDNA codec is now called directly
instead of calling the encode() method of the string.
-- Issue #24982: shutil.make_archive() with the "zip" format now adds entries
- for directories (including empty directories) in ZIP file.
+- Issue #25060: Correctly compute stack usage of the BUILD_MAP opcode.
- Issue #24857: Comparing call_args to a long sequence now correctly returns a
boolean result instead of raising an exception. Patch by A Kaptur.
-- Issue #25019: Fixed a crash caused by setting non-string key of expat parser.
- Based on patch by John Leitch.
-
-- Issue #24917: time_strftime() buffer over-read.
-
- Issue #23144: Make sure that HTMLParser.feed() returns all the data, even
when convert_charrefs is True.
+- Issue #24982: shutil.make_archive() with the "zip" format now adds entries
+ for directories (including empty directories) in ZIP file.
+
+- Issue #25019: Fixed a crash caused by setting non-string key of expat parser.
+ Based on patch by John Leitch.
+
- Issue #16180: Exit pdb if file has syntax error, instead of trapping user
in an infinite loop. Patch by Xavier de Gaye.
+- Issue #24891: Fix a race condition at Python startup if the file descriptor
+ of stdin (0), stdout (1) or stderr (2) is closed while Python is creating
+ sys.stdin, sys.stdout and sys.stderr objects. These attributes are now set
+ to None if the creation of the object failed, instead of raising an OSError
+ exception. Initial patch written by Marco Paolini.
+
+- Issue #24992: Fix error handling and a race condition (related to garbage
+ collection) in collections.OrderedDict constructor.
+
+- Issue #24881: Fixed setting binary mode in Python implementation of FileIO
+ on Windows and Cygwin. Patch from Akira Li.
+
+- Issue #25578: Fix (another) memory leak in SSLSocket.getpeercer().
+
+- Issue #25530: Disable the vulnerable SSLv3 protocol by default when creating
+ ssl.SSLContext.
+
+- Issue #25569: Fix memory leak in SSLSocket.getpeercert().
+
+- Issue #25471: Sockets returned from accept() shouldn't appear to be
+ nonblocking.
+
+- Issue #25319: When threading.Event is reinitialized, the underlying condition
+ should use a regular lock rather than a recursive lock.
+
- Issue #21112: Fix regression in unittest.expectedFailure on subclasses.
Patch from Berker Peksag.
-- Issue #24931: Instances of subclasses of namedtuples have their own __dict__
- which breaks the inherited __dict__ property and breaks the _asdict() method.
- Removed the __dict__ property to prevent the conflict and fixed _asdict().
-
- Issue #24764: cgi.FieldStorage.read_multi() now ignores the Content-Length
header in part headers. Patch written by Peter Landry and reviewed by Pierre
Quentel.
+- Issue #24913: Fix overrun error in deque.index().
+ Found by John Leitch and Bryce Darling.
+
- Issue #24774: Fix docstring in http.server.test. Patch from Chiu-Hsiang Hsu.
- Issue #21159: Improve message in configparser.InterpolationMissingOptionError.
Patch from Åukasz Langa.
-- Issue #23888: Handle fractional time in cookie expiry. Patch by ssh.
+- Issue #20362: Honour TestCase.longMessage correctly in assertRegex.
+ Patch from Ilia Kurenkov.
+
+- Issue #23572: Fixed functools.singledispatch on classes with falsy
+ metaclasses. Patch by Ethan Furman.
+
+- asyncio: ensure_future() now accepts awaitable objects.
+
+IDLE
+----
+
+- Issue #15348: Stop the debugger engine (normally in a user process)
+ before closing the debugger window (running in the IDLE process).
+ This prevents the RuntimeErrors that were being caught and ignored.
+
+- Issue #24455: Prevent IDLE from hanging when a) closing the shell while the
+ debugger is active (15347); b) closing the debugger with the [X] button
+ (15348); and c) activating the debugger when already active (24455).
+ The patch by Mark Roseman does this by making two changes.
+ 1. Suspend and resume the gui.interaction method with the tcl vwait
+ mechanism intended for this purpose (instead of root.mainloop & .quit).
+ 2. In gui.run, allow any existing interaction to terminate first.
+
+- Change 'The program' to 'Your program' in an IDLE 'kill program?' message
+ to make it clearer that the program referred to is the currently running
+ user program, not IDLE itself.
+
+- Issue #24750: Improve the appearance of the IDLE editor window status bar.
+ Patch by Mark Roseman.
+
+- Issue #25313: Change the handling of new built-in text color themes to better
+ address the compatibility problem introduced by the addition of IDLE Dark.
+ Consistently use the revised idleConf.CurrentTheme everywhere in idlelib.
+
+- Issue #24782: Extension configuration is now a tab in the IDLE Preferences
+ dialog rather than a separate dialog. The former tabs are now a sorted
+ list. Patch by Mark Roseman.
+
+- Issue #22726: Re-activate the config dialog help button with some content
+ about the other buttons and the new IDLE Dark theme.
+
+- Issue #24820: IDLE now has an 'IDLE Dark' built-in text color theme.
+ It is more or less IDLE Classic inverted, with a cobalt blue background.
+ Strings, comments, keywords, ... are still green, red, orange, ... .
+ To use it with IDLEs released before November 2015, hit the
+ 'Save as New Custom Theme' button and enter a new name,
+ such as 'Custom Dark'. The custom theme will work with any IDLE
+ release, and can be modified.
+
+- Issue #25224: README.txt is now an idlelib index for IDLE developers and
+ curious users. The previous user content is now in the IDLE doc chapter.
+ 'IDLE' now means 'Integrated Development and Learning Environment'.
+
+- Issue #24820: Users can now set breakpoint colors in
+ Settings -> Custom Highlighting. Original patch by Mark Roseman.
+
+- Issue #24972: Inactive selection background now matches active selection
+ background, as configured by users, on all systems. Found items are now
+ always highlighted on Windows. Initial patch by Mark Roseman.
+
+- Issue #24570: Idle: make calltip and completion boxes appear on Macs
+ affected by a tk regression. Initial patch by Mark Roseman.
+
+- Issue #24988: Idle ScrolledList context menus (used in debugger)
+ now work on Mac Aqua. Patch by Mark Roseman.
+
+- Issue #24801: Make right-click for context menu work on Mac Aqua.
+ Patch by Mark Roseman.
+
+- Issue #25173: Associate tkinter messageboxes with a specific widget.
+ For Mac OSX, make them a 'sheet'. Patch by Mark Roseman.
+
+- Issue #25198: Enhance the initial html viewer now used for Idle Help.
+ * Properly indent fixed-pitch text (patch by Mark Roseman).
+ * Give code snippet a very Sphinx-like light blueish-gray background.
+ * Re-use initial width and height set by users for shell and editor.
+ * When the Table of Contents (TOC) menu is used, put the section header
+ at the top of the screen.
+
+- Issue #25225: Condense and rewrite Idle doc section on text colors.
+
+- Issue #21995: Explain some differences between IDLE and console Python.
+
+- Issue #22820: Explain need for *print* when running file from Idle editor.
+
+- Issue #25224: Doc: augment Idle feature list and no-subprocess section.
+
+- Issue #25219: Update doc for Idle command line options.
+ Some were missing and notes were not correct.
+
+- Issue #24861: Most of idlelib is private and subject to change.
+ Use idleib.idle.* to start Idle. See idlelib.__init__.__doc__.
+
+- Issue #25199: Idle: add synchronization comments for future maintainers.
+
+- Issue #16893: Replace help.txt with help.html for Idle doc display.
+ The new idlelib/help.html is rstripped Doc/build/html/library/idle.html.
+ It looks better than help.txt and will better document Idle as released.
+ The tkinter html viewer that works for this file was written by Mark Roseman.
+ The now unused EditorWindow.HelpDialog class and helt.txt file are deprecated.
+
+- Issue #24199: Deprecate unused idlelib.idlever with possible removal in 3.6.
+
+- Issue #24790: Remove extraneous code (which also create 2 & 3 conflicts).
+
+Documentation
+-------------
+
+- Issue #22558: Add remaining doc links to source code for Python-coded modules.
+ Patch by Yoni Lavi.
+
+- Issue #12067: Rewrite Comparisons section in the Expressions chapter of the
+ language reference. Some of the details of comparing mixed types were
+ incorrect or ambiguous. NotImplemented is only relevant at a lower level
+ than the Expressions chapter. Added details of comparing range() objects,
+ and default behaviour and consistency suggestions for user-defined classes.
+ Patch from Andy Maier.
+
+- Issue #24952: Clarify the default size argument of stack_size() in
+ the "threading" and "_thread" modules. Patch from Mattip.
+
+- Issue #23725: Overhaul tempfile docs. Note deprecated status of mktemp.
+ Patch from Zbigniew Jędrzejewski-Szmek.
+
+- Issue #24808: Update the types of some PyTypeObject fields. Patch by
+ Joseph Weston.
+
+- Issue #22812: Fix unittest discovery examples.
+ Patch from Pam McA'Nulty.
+
+Tests
+-----
+
+- Issue #25449: Added tests for OrderedDict subclasses.
+
+- Issue #25099: Make test_compileall not fail when an entry on sys.path cannot
+ be written to (commonly seen in administrative installs on Windows).
+
+- Issue #23919: Prevents assert dialogs appearing in the test suite.
+
+- ``PCbuild\rt.bat`` now accepts an unlimited number of arguments to pass along
+ to regrtest.py. Previously there was a limit of 9.
+
+Build
+-----
+
+- Issue #24915: Add LLVM support for PGO builds and use the test suite to
+ generate the profile data. Initial patch by Alecsandru Patrascu of Intel.
+
+- Issue #24910: Windows MSIs now have unique display names.
+
+- Issue #24986: It is now possible to build Python on Windows without errors
+ when external libraries are not available.
+
+Windows
+-------
+
+- Issue #25450: Updates shortcuts to start Python in installation directory.
+
+- Issue #25164: Changes default all-users install directory to match per-user
+ directory.
+
+- Issue #25143: Improves installer error messages for unsupported platforms.
+
+- Issue #25163: Display correct directory in installer when using non-default
+ settings.
+
+- Issue #25361: Disables use of SSE2 instructions in Windows 32-bit build
+
+- Issue #25089: Adds logging to installer for case where launcher is not
+ selected on upgrade.
+
+- Issue #25165: Windows uninstallation should not remove launcher if other
+ versions remain
+
+- Issue #25112: py.exe launcher is missing icons
+
+- Issue #25102: Windows installer does not precompile for -O or -OO.
+
+- Issue #25081: Makes Back button in installer go back to upgrade page when
+ upgrading.
+
+- Issue #25091: Increases font size of the installer.
+
+- Issue #25126: Clarifies that the non-web installer will download some
+ components.
+
+- Issue #25213: Restores requestedExecutionLevel to manifest to disable
+ UAC virtualization.
+
+- Issue #25022: Removed very outdated PC/example_nt/ directory.
+
+Tools/Demos
+-----------
+
+- Issue #25440: Fix output of python-config --extension-suffix.
+
+
+What's New in Python 3.5.0 final?
+=================================
+
+Release date: 2015-09-13
+
+Build
+-----
+
+- Issue #25071: Windows installer should not require TargetDir
+ parameter when installing quietly.
+
+
+What's New in Python 3.5.0 release candidate 4?
+===============================================
+
+Release date: 2015-09-09
+
+Library
+-------
+
+- Issue #25029: Fixes MemoryError in test_strptime.
+
+Build
+-----
+
+- Issue #25027: Reverts partial-static build options and adds
+ vcruntime140.dll to Windows installation.
+
+
+What's New in Python 3.5.0 release candidate 3?
+===============================================
+
+Release date: 2015-09-07
+
+Core and Builtins
+-----------------
+
+- Issue #24305: Prevent import subsystem stack frames from being counted
+ by the warnings.warn(stacklevel=) parameter.
+
+- Issue #24912: Prevent __class__ assignment to immutable built-in objects.
+
+- Issue #24975: Fix AST compilation for PEP 448 syntax.
+
+Library
+-------
+
+- Issue #24917: time_strftime() buffer over-read.
+
+- Issue #24748: To resolve a compatibility problem found with py2exe and
+ pywin32, imp.load_dynamic() once again ignores previously loaded modules
+ to support Python modules replacing themselves with extension modules.
+ Patch by Petr Viktorin.
+
+- Issue #24635: Fixed a bug in typing.py where isinstance([], typing.Iterable)
+ would return True once, then False on subsequent calls.
+
+- Issue #24989: Fixed buffer overread in BytesIO.readline() if a position is
+ set beyond size. Based on patch by John Leitch.
+
+- Issue #24913: Fix overrun error in deque.index().
+ Found by John Leitch and Bryce Darling.
+
+
+What's New in Python 3.5.0 release candidate 2?
+===============================================
+
+Release date: 2015-08-25
+
+Core and Builtins
+-----------------
+
+- Issue #24769: Interpreter now starts properly when dynamic loading
+ is disabled. Patch by Petr Viktorin.
+
+- Issue #21167: NAN operations are now handled correctly when python is
+ compiled with ICC even if -fp-model strict is not specified.
+
+- Issue #24492: A "package" lacking a __name__ attribute when trying to perform
+ a ``from .. import ...`` statement will trigger an ImportError instead of an
+ AttributeError.
+
+Library
+-------
+
+- Issue #24847: Removes vcruntime140.dll dependency from Tcl/Tk.
+
+- Issue #24839: platform._syscmd_ver raises DeprecationWarning
+
+- Issue #24867: Fix Task.get_stack() for 'async def' coroutines
+
+
+What's New in Python 3.5.0 release candidate 1?
+===============================================
+
+Release date: 2015-08-09
+
+Core and Builtins
+-----------------
+
+- Issue #24667: Resize odict in all cases that the underlying dict resizes.
+
+Library
+-------
+
+- Issue #24824: Signatures of codecs.encode() and codecs.decode() now are
+ compatible with pydoc.
+
+- Issue #24634: Importing uuid should not try to load libc on Windows
+
+- Issue #24798: _msvccompiler.py doesn't properly support manifests
+
+- Issue #4395: Better testing and documentation of binary operators.
+ Patch by Martin Panter.
+
+- Issue #23973: Update typing.py from GitHub repo.
- Issue #23004: mock_open() now reads binary data correctly when the type of
read_data is bytes. Initial patch by Aaron Hill.
+- Issue #23888: Handle fractional time in cookie expiry. Patch by ssh.
+
- Issue #23652: Make it possible to compile the select module against the
libc headers from the Linux Standard Base, which do not include some
EPOLL macros. Patch by Matt Frank.
@@ -369,13 +1375,80 @@ Library
- Issue #19450: Update Windows and OS X installer builds to use SQLite 3.8.11.
-- Issue #23441: rcompleter now prints a tab character instead of displaying
- possible completions for an empty word. Initial patch by Martin Sekera.
+- Issue #17527: Add PATCH to wsgiref.validator. Patch from Luca Sbardella.
-- Issue #24735: Fix invalid memory access in
- itertools.combinations_with_replacement().
+- Issue #24791: Fix grammar regression for call syntax: 'g(\*a or b)'.
-- Issue #17527: Add PATCH to wsgiref.validator. Patch from Luca Sbardella.
+IDLE
+----
+
+- Issue #23672: Allow Idle to edit and run files with astral chars in name.
+ Patch by Mohd Sanad Zaki Rizvi.
+
+- Issue #24745: Idle editor default font. Switch from Courier to
+ platform-sensitive TkFixedFont. This should not affect current customized
+ font selections. If there is a problem, edit $HOME/.idlerc/config-main.cfg
+ and remove 'fontxxx' entries from [Editor Window]. Patch by Mark Roseman.
+
+- Issue #21192: Idle editor. When a file is run, put its name in the restart bar.
+ Do not print false prompts. Original patch by Adnan Umer.
+
+- Issue #13884: Idle menus. Remove tearoff lines. Patch by Roger Serwy.
+
+Documentation
+-------------
+
+- Issue #24129: Clarify the reference documentation for name resolution.
+ This includes removing the assumption that readers will be familiar with the
+ name resolution scheme Python used prior to the introduction of lexical
+ scoping for function namespaces. Patch by Ivan Levkivskyi.
+
+- Issue #20769: Improve reload() docs. Patch by Dorian Pula.
+
+- Issue #23589: Remove duplicate sentence from the FAQ. Patch by Yongzhi Pan.
+
+- Issue #24729: Correct IO tutorial to match implementation regarding
+ encoding parameter to open function.
+
+Tests
+-----
+
+- Issue #24751: When running regrtest with the ``-w`` command line option,
+ a test run is no longer marked as a failure if all tests succeed when
+ re-run.
+
+
+What's New in Python 3.5.0 beta 4?
+==================================
+
+Release date: 2015-07-26
+
+Core and Builtins
+-----------------
+
+- Issue #23573: Restored optimization of bytes.rfind() and bytearray.rfind()
+ for single-byte argument on Linux.
+
+- Issue #24569: Make PEP 448 dictionary evaluation more consistent.
+
+- Issue #24583: Fix crash when set is mutated while being updated.
+
+- Issue #24407: Fix crash when dict is mutated while being updated.
+
+- Issue #24619: New approach for tokenizing async/await. As a consequence,
+ it is now possible to have one-line 'async def foo(): await ..' functions.
+
+- Issue #24687: Plug refleak on SyntaxError in function parameters
+ annotations.
+
+- Issue #15944: memoryview: Allow arbitrary formats when casting to bytes.
+ Patch by Martin Panter.
+
+Library
+-------
+
+- Issue #23441: rcompleter now prints a tab character instead of displaying
+ possible completions for an empty word. Initial patch by Martin Sekera.
- Issue #24683: Fixed crashes in _json functions called with arguments of
inappropriate type.
@@ -383,20 +1456,33 @@ Library
- Issue #21697: shutil.copytree() now correctly handles symbolic links that
point to directories. Patch by Eduardo Seabra and Thomas Kluyver.
+- Issue #14373: Fixed segmentation fault when gc.collect() is called during
+ constructing lru_cache (C implementation).
+
+- Issue #24695: Fix a regression in traceback.print_exception(). If
+ exc_traceback is None we shouldn't print a traceback header like described
+ in the documentation.
+
- Issue #24620: Random.setstate() now validates the value of state last element.
+- Issue #22485: Fixed an issue that caused `inspect.getsource` to return
+ incorrect results on nested functions.
+
- Issue #22153: Improve unittest docs. Patch from Martin Panter and evilzero.
-- Issue #24206: Fixed __eq__ and __ne__ methods of inspect classes.
+- Issue #24580: Symbolic group references to open group in re patterns now are
+ explicitly forbidden as well as numeric group references.
-- Issue #21750: mock_open.read_data can now be read from each instance, as it
- could in Python 3.3.
+- Issue #24206: Fixed __eq__ and __ne__ methods of inspect classes.
-- Issue #23247: Fix a crash in the StreamWriter.reset() of CJK codecs.
+- Issue #24631: Fixed regression in the timeit module with multiline setup.
- Issue #18622: unittest.mock.mock_open().reset_mock would recurse infinitely.
Patch from Nicola Palumbo and Laurent De Buyst.
+- Issue #23661: unittest.mock side_effects can now be exceptions again. This
+ was a regression vs Python 3.4. Patch from Ignacio Rossi
+
- Issue #24608: chunk.Chunk.read() now always returns bytes, not str.
- Issue #18684: Fixed reading out of the buffer in the re module.
@@ -404,6 +1490,59 @@ Library
- Issue #24259: tarfile now raises a ReadError if an archive is truncated
inside a data segment.
+- Issue #15014: SMTP.auth() and SMTP.login() now support RFC 4954's optional
+ initial-response argument to the SMTP AUTH command.
+
+- Issue #24669: Fix inspect.getsource() for 'async def' functions.
+ Patch by Kai Groner.
+
+- Issue #24688: ast.get_docstring() for 'async def' functions.
+
+Build
+-----
+
+- Issue #24603: Update Windows builds and OS X 10.5 installer to use OpenSSL
+ 1.0.2d.
+
+
+What's New in Python 3.5.0 beta 3?
+==================================
+
+Release date: 2015-07-05
+
+Core and Builtins
+-----------------
+
+- Issue #24467: Fixed possible buffer over-read in bytearray. The bytearray
+ object now always allocates place for trailing null byte and it's buffer now
+ is always null-terminated.
+
+- Upgrade to Unicode 8.0.0.
+
+- Issue #24345: Add Py_tp_finalize slot for the stable ABI.
+
+- Issue #24400: Introduce a distinct type for PEP 492 coroutines; add
+ types.CoroutineType, inspect.getcoroutinestate, inspect.getcoroutinelocals;
+ coroutines no longer use CO_GENERATOR flag; sys.set_coroutine_wrapper
+ works only for 'async def' coroutines; inspect.iscoroutine no longer
+ uses collections.abc.Coroutine, it's intended to test for pure 'async def'
+ coroutines only; add new opcode: GET_YIELD_FROM_ITER; fix generators wrapper
+ used in types.coroutine to be instance of collections.abc.Generator;
+ collections.abc.Awaitable and collections.abc.Coroutine can no longer
+ be used to detect generator-based coroutines--use inspect.isawaitable
+ instead.
+
+- Issue #24450: Add gi_yieldfrom to generators and cr_await to coroutines.
+ Contributed by Benno Leslie and Yury Selivanov.
+
+- Issue #19235: Add new RecursionError exception. Patch by Georg Brandl.
+
+Library
+-------
+
+- Issue #21750: mock_open.read_data can now be read from each instance, as it
+ could in Python 3.3.
+
- Issue #24552: Fix use after free in an error case of the _pickle module.
- Issue #24514: tarfile now tolerates number fields consisting of only
@@ -424,24 +1563,197 @@ Library
- Issue #24336: The contextmanager decorator now works with functions with
keyword arguments called "func" and "self". Patch by Martin Panter.
+- Issue #24522: Fix possible integer overflow in json accelerator module.
+
- Issue #24489: ensure a previously set C errno doesn't disturb cmath.polar().
+- Issue #24408: Fixed AttributeError in measure() and metrics() methods of
+ tkinter.Font.
+
+- Issue #14373: C implementation of functools.lru_cache() now can be used with
+ methods.
+
+- Issue #24347: Set KeyError if PyDict_GetItemWithError returns NULL.
+
+- Issue #24348: Drop superfluous incref/decref.
+
+- Issue #24359: Check for changed OrderedDict size during iteration.
+
+- Issue #24368: Support keyword arguments in OrderedDict methods.
+
+- Issue #24362: Simplify the C OrderedDict fast nodes resize logic.
+
+- Issue #24377: Fix a ref leak in OrderedDict.__repr__.
+
+- Issue #24369: Defend against key-changes during iteration.
+
+Tests
+-----
+
+- Issue #24373: _testmultiphase and xxlimited now use tp_traverse and
+ tp_finalize to avoid reference leaks encountered when combining tp_dealloc
+ with PyType_FromSpec (see issue #16690 for details)
+
+Documentation
+-------------
+
+- Issue #24458: Update documentation to cover multi-phase initialization for
+ extension modules (PEP 489). Patch by Petr Viktorin.
+
+- Issue #24351: Clarify what is meant by "identifier" in the context of
+ string.Template instances.
+
+Build
+-----
+
+- Issue #24432: Update Windows builds and OS X 10.5 installer to use OpenSSL
+ 1.0.2c.
+
+
+What's New in Python 3.5.0 beta 2?
+==================================
+
+Release date: 2015-05-31
+
+Core and Builtins
+-----------------
+
+- Issue #24284: The startswith and endswith methods of the str class no longer
+ return True when finding the empty string and the indexes are completely out
+ of range.
+
+- Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(),
+ PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains()
+ to check for and handle errors correctly.
+
+- Issue #24328: Fix importing one character extension modules.
+
+- Issue #11205: In dictionary displays, evaluate the key before the value.
+
+- Issue #24285: Fixed regression that prevented importing extension modules
+ from inside packages. Patch by Petr Viktorin.
+
+Library
+-------
+
+- Issue #23247: Fix a crash in the StreamWriter.reset() of CJK codecs.
+
+- Issue #24270: Add math.isclose() and cmath.isclose() functions as per PEP 485.
+ Contributed by Chris Barker and Tal Einat.
+
- Issue #5633: Fixed timeit when the statement is a string and the setup is not.
- Issue #24326: Fixed audioop.ratecv() with non-default weightB argument.
Original patch by David Moore.
-- Issue #23840: tokenize.open() now closes the temporary binary file on error
- to fix a resource warning.
+- Issue #16991: Add a C implementation of OrderedDict.
+
+- Issue #23934: Fix inspect.signature to fail correctly for builtin types
+ lacking signature information. Initial patch by James Powell.
+
+
+What's New in Python 3.5.0 beta 1?
+==================================
+
+Release date: 2015-05-24
+
+Core and Builtins
+-----------------
+
+- Issue #24276: Fixed optimization of property descriptor getter.
+
+- Issue #24268: PEP 489: Multi-phase extension module initialization.
+ Patch by Petr Viktorin.
+
+- Issue #23955: Add pyvenv.cfg option to suppress registry/environment
+ lookup for generating sys.path on Windows.
+
+- Issue #24257: Fixed system error in the comparison of faked
+ types.SimpleNamespace.
+
+- Issue #22939: Fixed integer overflow in iterator object. Patch by
+ Clement Rouault.
+
+- Issue #23985: Fix a possible buffer overrun when deleting a slice from
+ the front of a bytearray and then appending some other bytes data.
+
+- Issue #24102: Fixed exception type checking in standard error handlers.
+
+- Issue #15027: The UTF-32 encoder is now 3x to 7x faster.
+
+- Issue #23290: Optimize set_merge() for cases where the target is empty.
+ (Contributed by Serhiy Storchaka.)
+
+- Issue #2292: PEP 448: Additional Unpacking Generalizations.
+
+- Issue #24096: Make warnings.warn_explicit more robust against mutation of the
+ warnings.filters list.
+
+- Issue #23996: Avoid a crash when a delegated generator raises an
+ unnormalized StopIteration exception. Patch by Stefan Behnel.
+
+- Issue #23910: Optimize property() getter calls. Patch by Joe Jevnik.
+
+- Issue #23911: Move path-based importlib bootstrap code to a separate
+ frozen module.
+
+- Issue #24192: Fix namespace package imports.
+
+- Issue #24022: Fix tokenizer crash when processing undecodable source code.
+
+- Issue #9951: Added a hex() method to bytes, bytearray, and memoryview.
+
+- Issue #22906: PEP 479: Change StopIteration handling inside generators.
+
+- Issue #24017: PEP 492: Coroutines with async and await syntax.
+
+Library
+-------
+
+- Issue #14373: Added C implementation of functools.lru_cache(). Based on
+ patches by Matt Joiner and Alexey Kachayev.
+
+- Issue #24230: The tempfile module now accepts bytes for prefix, suffix and dir
+ parameters and returns bytes in such situations (matching the os module APIs).
+
+- Issue #22189: collections.UserString now supports __getnewargs__(),
+ __rmod__(), casefold(), format_map(), isprintable(), and maketrans().
+ Patch by Joe Jevnik.
+
+- Issue #24244: Prevents termination when an invalid format string is
+ encountered on Windows in strftime.
+
+- Issue #23973: PEP 484: Add the typing module.
+
+- Issue #23086: The collections.abc.Sequence() abstract base class added
+ *start* and *stop* parameters to the index() mixin.
+ Patch by Devin Jeanpierre.
+
+- Issue #20035: Replaced the ``tkinter._fix`` module used for setting up the
+ Tcl/Tk environment on Windows with a private function in the ``_tkinter``
+ module that makes no permanent changes to the environment.
- Issue #24257: Fixed segmentation fault in sqlite3.Row constructor with faked
cursor type.
+- Issue #15836: assertRaises(), assertRaisesRegex(), assertWarns() and
+ assertWarnsRegex() assertments now check the type of the first argument
+ to prevent possible user error. Based on patch by Daniel Wagner-Hall.
+
+- Issue #9858: Add missing method stubs to _io.RawIOBase. Patch by Laura
+ Rupprecht.
+
+- Issue #22955: attrgetter, itemgetter and methodcaller objects in the operator
+ module now support pickling. Added readable and evaluable repr for these
+ objects. Based on patch by Josh Rosenberg.
+
- Issue #22107: tempfile.gettempdir() and tempfile.mkdtemp() now try again
when a directory with the chosen name already exists on Windows as well as
on Unix. tempfile.mkstemp() now fails early if parent directory is not
valid (not exists or is a file) on Windows.
+- Issue #23780: Improved error message in os.path.join() with single argument.
+
- Issue #6598: Increased time precision and random number range in
email.utils.make_msgid() to strengthen the uniqueness of the message ID.
@@ -452,38 +1764,85 @@ Library
argument instead of a ValueError with a bogus FCI error number.
Patch by Jeffrey Armstrong.
+- Issue #13866: *quote_via* argument added to urllib.parse.urlencode.
+
+- Issue #20098: New mangle_from policy option for email, default True
+ for compat32, but False for all other policies.
+
+- Issue #24211: The email library now supports RFC 6532: it can generate
+ headers using utf-8 instead of encoded words.
+
+- Issue #16314: Added support for the LZMA compression in distutils.
+
+- Issue #21804: poplib now supports RFC 6856 (UTF8).
+
+- Issue #18682: Optimized pprint functions for builtin scalar types.
+
+- Issue #22027: smtplib now supports RFC 6531 (SMTPUTF8).
+
+- Issue #23488: Random generator objects now consume 2x less memory on 64-bit.
+
+- Issue #1322: platform.dist() and platform.linux_distribution() functions are
+ now deprecated. Initial patch by Vajrasky Kok.
+
+- Issue #22486: Added the math.gcd() function. The fractions.gcd() function now is
+ deprecated. Based on patch by Mark Dickinson.
+
+- Issue #24064: Property() docstrings are now writeable.
+ (Patch by Berker Peksag.)
+
+- Issue #22681: Added support for the koi8_t encoding.
+
+- Issue #22682: Added support for the kz1048 encoding.
+
- Issue #23796: peek and read1 methods of BufferedReader now raise ValueError
if they called on a closed object. Patch by John Hergenroeder.
-- Issue #24521: Fix possible integer overflows in the pickle module.
+- Issue #21795: smtpd now supports the 8BITMIME extension whenever
+ the new *decode_data* constructor argument is set to False.
-- Issue #22931: Allow '[' and ']' in cookie values.
+- Issue #24155: optimize heapq.heapify() for better cache performance
+ when heapifying large lists.
+
+- Issue #21800: imaplib now supports RFC 5161 (enable), RFC 6855
+ (utf8/internationalized email) and automatically encodes non-ASCII
+ usernames and passwords to UTF8.
+
+- Issue #20274: When calling a _sqlite.Connection, it now complains if passed
+ any keyword arguments. Previously it silently ignored them.
- Issue #20274: Remove ignored and erroneous "kwargs" parameters from three
METH_VARARGS methods on _sqlite.Connection.
+- Issue #24134: assertRaises(), assertRaisesRegex(), assertWarns() and
+ assertWarnsRegex() checks now emits a deprecation warning when callable is
+ None or keyword arguments except msg is passed in the context manager mode.
+
+- Issue #24018: Add a collections.abc.Generator abstract base class.
+ Contributed by Stefan Behnel.
+
+- Issue #23880: Tkinter's getint() and getdouble() now support Tcl_Obj.
+ Tkinter's getdouble() now supports any numbers (in particular int).
+
+- Issue #22619: Added negative limit support in the traceback module.
+ Based on patch by Dmitry Kazakov.
+
- Issue #24094: Fix possible crash in json.encode with poorly behaved dict
subclasses.
-- Asyncio issue 222 / PR 231 (Victor Stinner) -- fix @coroutine
- functions without __name__.
-
- Issue #9246: On POSIX, os.getcwd() now supports paths longer than 1025 bytes.
Patch written by William Orr.
-- The keywords attribute of functools.partial is now always a dictionary.
-
-- Issues #24099, #24100, and #24101: Fix free-after-use bug in heapq's siftup
- and siftdown functions.
+- Issue #17445: add difflib.diff_bytes() to support comparison of
+ byte strings (fixes a regression from Python 2).
-- Backport collections.deque fixes from Python 3.5. Prevents reentrant badness
- during deletion by deferring the decref until the container has been restored
- to a consistent state.
+- Issue #23917: Fall back to sequential compilation when ProcessPoolExecutor
+ doesn't exist. Patch by Claudiu Popa.
- Issue #23008: Fixed resolving attributes with boolean value is False in pydoc.
- Fix asyncio issue 235: LifoQueue and PriorityQueue's put didn't
- increment unfinished tasks (this bug was introduced in 3.4.3 when
+ increment unfinished tasks (this bug was introduced when
JoinableQueue was merged with Queue).
- Issue #23908: os functions now reject paths with embedded null character
@@ -492,64 +1851,392 @@ Library
- Issue #23728: binascii.crc_hqx() could return an integer outside of the range
0-0xffff for empty data.
+- Issue #23887: urllib.error.HTTPError now has a proper repr() representation.
+ Patch by Berker Peksag.
+
+- asyncio: New event loop APIs: set_task_factory() and get_task_factory().
+
+- asyncio: async() function is deprecated in favour of ensure_future().
+
+- Issue #24178: asyncio.Lock, Condition, Semaphore, and BoundedSemaphore
+ support new 'async with' syntax. Contributed by Yury Selivanov.
+
+- Issue #24179: Support 'async for' for asyncio.StreamReader.
+ Contributed by Yury Selivanov.
+
+- Issue #24184: Add AsyncIterator and AsyncIterable ABCs to
+ collections.abc. Contributed by Yury Selivanov.
+
+- Issue #22547: Implement informative __repr__ for inspect.BoundArguments.
+ Contributed by Yury Selivanov.
+
+- Issue #24190: Implement inspect.BoundArgument.apply_defaults() method.
+ Contributed by Yury Selivanov.
+
+- Issue #20691: Add 'follow_wrapped' argument to
+ inspect.Signature.from_callable() and inspect.signature().
+ Contributed by Yury Selivanov.
+
+- Issue #24248: Deprecate inspect.Signature.from_function() and
+ inspect.Signature.from_builtin().
+
+- Issue #23898: Fix inspect.classify_class_attrs() to support attributes
+ with overloaded __eq__ and __bool__. Patch by Mike Bayer.
+
+- Issue #24298: Fix inspect.signature() to correctly unwrap wrappers
+ around bound methods.
+
+IDLE
+----
+
+- Issue #23184: remove unused names and imports in idlelib.
+ Initial patch by Al Sweigart.
+
+Tests
+-----
+
+- Issue #21520: test_zipfile no longer fails if the word 'bad' appears
+ anywhere in the name of the current directory.
+
+- Issue #9517: Move script_helper into the support package.
+ Patch by Christie Wilson.
+
+Documentation
+-------------
+
+- Issue #22155: Add File Handlers subsection with createfilehandler to tkinter
+ doc. Remove obsolete example from FAQ. Patch by Martin Panter.
+
+- Issue #24029: Document the name binding behavior for submodule imports.
+
+- Issue #24077: Fix typo in man page for -I command option: -s, not -S
+
+Tools/Demos
+-----------
+
+- Issue #24000: Improved Argument Clinic's mapping of converters to legacy
+ "format units". Updated the documentation to match.
+
+- Issue #24001: Argument Clinic converters now use accept={type}
+ instead of types={'type'} to specify the types the converter accepts.
+
+- Issue #23330: h2py now supports arbitrary filenames in #include.
+
+- Issue #24031: make patchcheck now supports git checkouts, too.
+
+
+What's New in Python 3.5.0 alpha 4?
+===================================
+
+Release date: 2015-04-19
+
+Core and Builtins
+-----------------
+
+- Issue #22980: Under Linux, GNU/KFreeBSD and the Hurd, C extensions now include
+ the architecture triplet in the extension name, to make it easy to test builds
+ for different ABIs in the same working tree. Under OS X, the extension name
+ now includes PEP 3149-style information.
+
+- Issue #22631: Added Linux-specific socket constant CAN_RAW_FD_FRAMES.
+ Patch courtesy of Joe Jevnik.
+
+- Issue #23731: Implement PEP 488: removal of .pyo files.
+
+- Issue #23726: Don't enable GC for user subclasses of non-GC types that
+ don't add any new fields. Patch by Eugene Toder.
+
+- Issue #23309: Avoid a deadlock at shutdown if a daemon thread is aborted
+ while it is holding a lock to a buffered I/O object, and the main thread
+ tries to use the same I/O object (typically stdout or stderr). A fatal
+ error is emitted instead.
+
+- Issue #22977: Fixed formatting Windows error messages on Wine.
+ Patch by Martin Panter.
+
+- Issue #23466: %c, %o, %x, and %X in bytes formatting now raise TypeError on
+ non-integer input.
+
+- Issue #24044: Fix possible null pointer dereference in list.sort in out of
+ memory conditions.
+
+- Issue #21354: PyCFunction_New function is exposed by python DLL again.
+
+Library
+-------
+
+- Issue #23840: tokenize.open() now closes the temporary binary file on error
+ to fix a resource warning.
+
+- Issue #16914: new debuglevel 2 in smtplib adds timestamps to debug output.
+
+- Issue #7159: urllib.request now supports sending auth credentials
+ automatically after the first 401. This enhancement is a superset of the
+ enhancement from issue #19494 and supersedes that change.
+
+- Issue #23703: Fix a regression in urljoin() introduced in 901e4e52b20a.
+ Patch by Demian Brecht.
+
+- Issue #4254: Adds _curses.update_lines_cols(). Patch by Arnon Yaari
+
+- Issue #19933: Provide default argument for ndigits in round. Patch by
+ Vajrasky Kok.
+
+- Issue #23193: Add a numeric_owner parameter to
+ tarfile.TarFile.extract and tarfile.TarFile.extractall. Patch by
+ Michael Vogt and Eric Smith.
+
+- Issue #23342: Add a subprocess.run() function than returns a CalledProcess
+ instance for a more consistent API than the existing call* functions.
+
+- Issue #21217: inspect.getsourcelines() now tries to compute the start and end
+ lines from the code object, fixing an issue when a lambda function is used as
+ decorator argument. Patch by Thomas Ballinger and Allison Kaptur.
+
+- Issue #24521: Fix possible integer overflows in the pickle module.
+
+- Issue #22931: Allow '[' and ']' in cookie values.
+
+- The keywords attribute of functools.partial is now always a dictionary.
+
- Issue #23811: Add missing newline to the PyCompileError error message.
Patch by Alex Shkop.
-- Issue #17898: Fix exception in gettext.py when parsing certain plural forms.
+- Issue #21116: Avoid blowing memory when allocating a multiprocessing shared
+ array that's larger than 50% of the available RAM. Patch by Médéric Boquien.
- Issue #22982: Improve BOM handling when seeking to multiple positions of
a writable text file.
+- Issue #23464: Removed deprecated asyncio JoinableQueue.
+
+- Issue #23529: Limit the size of decompressed data when reading from
+ GzipFile, BZ2File or LZMAFile. This defeats denial of service attacks
+ using compressed bombs (i.e. compressed payloads which decompress to a huge
+ size). Patch by Martin Panter and Nikolaus Rath.
+
+- Issue #21859: Added Python implementation of io.FileIO.
+
- Issue #23865: close() methods in multiple modules now are idempotent and more
robust at shutdown. If they need to release multiple resources, all are
released even if errors occur.
+- Issue #23400: Raise same exception on both Python 2 and 3 if sem_open is not
+ available. Patch by Davin Potts.
+
+- Issue #10838: The subprocess now module includes SubprocessError and
+ TimeoutError in its list of exported names for the users wild enough
+ to use ``from subprocess import *``.
+
+- Issue #23411: Added DefragResult, ParseResult, SplitResult, DefragResultBytes,
+ ParseResultBytes, and SplitResultBytes to urllib.parse.__all__.
+ Patch by Martin Panter.
+
- Issue #23881: urllib.request.ftpwrapper constructor now closes the socket if
the FTP connection failed to fix a ResourceWarning.
-- Issue #23400: Raise same exception on both Python 2 and 3 if sem_open is not
- available. Patch by Davin Potts.
+- Issue #23853: :meth:`socket.socket.sendall` does no more reset the socket
+ timeout each time data is sent successfuly. The socket timeout is now the
+ maximum total duration to send all data.
+
+- Issue #22721: An order of multiline pprint output of set or dict containing
+ orderable and non-orderable elements no longer depends on iteration order of
+ set or dict.
- Issue #15133: _tkinter.tkapp.getboolean() now supports Tcl_Obj and always
returns bool. tkinter.BooleanVar now validates input values (accepted bool,
int, str, and Tcl_Obj). tkinter.BooleanVar.get() now always returns bool.
+- Issue #10590: xml.sax.parseString() now supports string argument.
+
- Issue #23338: Fixed formatting ctypes error messages on Cygwin.
Patch by Makoto Kato.
+- Issue #15582: inspect.getdoc() now follows inheritance chains.
+
+- Issue #2175: SAX parsers now support a character stream of InputSource object.
+
- Issue #16840: Tkinter now supports 64-bit integers added in Tcl 8.4 and
arbitrary precision integers added in Tcl 8.5.
- Issue #23834: Fix socket.sendto(), use the C Py_ssize_t type to store the
result of sendto() instead of the C int type.
+- Issue #23618: :meth:`socket.socket.connect` now waits until the connection
+ completes instead of raising :exc:`InterruptedError` if the connection is
+ interrupted by signals, signal handlers don't raise an exception and the
+ socket is blocking or has a timeout. :meth:`socket.socket.connect` still
+ raise :exc:`InterruptedError` for non-blocking sockets.
+
- Issue #21526: Tkinter now supports new boolean type in Tcl 8.5.
+- Issue #23836: Fix the faulthandler module to handle reentrant calls to
+ its signal handlers.
+
- Issue #23838: linecache now clears the cache and returns an empty result on
MemoryError.
+- Issue #10395: Added os.path.commonpath(). Implemented in posixpath and ntpath.
+ Based on patch by Rafik Draoui.
+
+- Issue #23611: Serializing more "lookupable" objects (such as unbound methods
+ or nested classes) now are supported with pickle protocols < 4.
+
+- Issue #13583: sqlite3.Row now supports slice indexing.
+
- Issue #18473: Fixed 2to3 and 3to2 compatible pickle mappings. Fixed
ambigious reverse mappings. Added many new mappings. Import mapping is no
longer applied to modules already mapped with full name mapping.
+- Issue #23485: select.select() is now retried automatically with the
+ recomputed timeout when interrupted by a signal, except if the signal handler
+ raises an exception. This change is part of the PEP 475.
+
+- Issue #23752: When built from an existing file descriptor, io.FileIO() now
+ only calls fstat() once. Before fstat() was called twice, which was not
+ necessary.
+
+- Issue #23704: collections.deque() objects now support __add__, __mul__, and
+ __imul__().
+
+- Issue #23171: csv.Writer.writerow() now supports arbitrary iterables.
+
- Issue #23745: The new email header parser now handles duplicate MIME
parameter names without error, similar to how get_param behaves.
+- Issue #22117: Fix os.utime(), it now rounds the timestamp towards minus
+ infinity (-inf) instead of rounding towards zero.
+
+- Issue #23310: Fix MagicMock's initializer to work with __methods__, just
+ like configure_mock(). Patch by Kasia Jachim.
+
+Build
+-----
+
+- Issue #23817: FreeBSD now uses "1.0" in the SOVERSION as other operating
+ systems, instead of just "1".
+
+- Issue #23501: Argument Clinic now generates code into separate files by default.
+
+Tests
+-----
+
+- Issue #23799: Added test.support.start_threads() for running and
+ cleaning up multiple threads.
+
+- Issue #22390: test.regrtest now emits a warning if temporary files or
+ directories are left after running a test.
+
+Tools/Demos
+-----------
+
+- Issue #18128: pygettext now uses standard +NNNN format in the
+ POT-Creation-Date header.
+
+- Issue #23935: Argument Clinic's understanding of format units
+ accepting bytes, bytearrays, and buffers is now consistent with
+ both the documentation and the implementation.
+
+- Issue #23944: Argument Clinic now wraps long impl prototypes at column 78.
+
+- Issue #20586: Argument Clinic now ensures that functions without docstrings
+ have signatures.
+
+- Issue #23492: Argument Clinic now generates argument parsing code with
+ PyArg_Parse instead of PyArg_ParseTuple if possible.
+
+- Issue #23500: Argument Clinic is now smarter about generating the "#ifndef"
+ (empty) definition of the methoddef macro: it's only generated once, even
+ if Argument Clinic processes the same symbol multiple times, and it's emitted
+ at the end of all processing rather than immediately after the first use.
+
+C API
+-----
+
+- Issue #23998: PyImport_ReInitLock() now checks for lock allocation error
+
+
+What's New in Python 3.5.0 alpha 3?
+===================================
+
+Release date: 2015-03-28
+
+Core and Builtins
+-----------------
+
+- Issue #23573: Increased performance of string search operations (str.find,
+ str.index, str.count, the in operator, str.split, str.partition) with
+ arguments of different kinds (UCS1, UCS2, UCS4).
+
+- Issue #23753: Python doesn't support anymore platforms without stat() or
+ fstat(), these functions are always required.
+
+- Issue #23681: The -b option now affects comparisons of bytes with int.
+
+- Issue #23632: Memoryviews now allow tuple indexing (including for
+ multi-dimensional memoryviews).
+
+- Issue #23192: Fixed generator lambdas. Patch by Bruno Cauet.
+
+- Issue #23629: Fix the default __sizeof__ implementation for variable-sized
+ objects.
+
+Library
+-------
+
+- Issue #14260: The groupindex attribute of regular expression pattern object
+ now is non-modifiable mapping.
+
- Issue #23792: Ignore KeyboardInterrupt when the pydoc pager is active.
This mimics the behavior of the standard unix pagers, and prevents
pipepager from shutting down while the pager itself is still running.
+- Issue #23775: pprint() of OrderedDict now outputs the same representation
+ as repr().
+
+- Issue #23765: Removed IsBadStringPtr calls in ctypes
+
+- Issue #22364: Improved some re error messages using regex for hints.
+
- Issue #23742: ntpath.expandvars() no longer loses unbalanced single quotes.
+- Issue #21717: The zipfile.ZipFile.open function now supports 'x' (exclusive
+ creation) mode.
+
- Issue #21802: The reader in BufferedRWPair now is closed even when closing
writer failed in BufferedRWPair.close().
-- Issue #23671: string.Template now allows to specify the "self" parameter as
- keyword argument. string.Formatter now allows to specify the "self" and
+- Issue #23622: Unknown escapes in regular expressions that consist of ``'\'``
+ and ASCII letter now raise a deprecation warning and will be forbidden in
+ Python 3.6.
+
+- Issue #23671: string.Template now allows specifying the "self" parameter as
+ a keyword argument. string.Formatter now allows specifying the "self" and
the "format_string" parameters as keyword arguments.
-- Issue #21560: An attempt to write a data of wrong type no longer cause
- GzipFile corruption. Original patch by Wolfgang Maier.
+- Issue #23502: The pprint module now supports mapping proxies.
+
+- Issue #17530: pprint now wraps long bytes objects and bytearrays.
+
+- Issue #22687: Fixed some corner cases in breaking words in tetxtwrap.
+ Got rid of quadratic complexity in breaking long words.
+
+- Issue #4727: The copy module now uses pickle protocol 4 (PEP 3154) and
+ supports copying of instances of classes whose __new__ method takes
+ keyword-only arguments.
+
+- Issue #23491: Added a zipapp module to support creating executable zip
+ file archives of Python code. Registered ".pyz" and ".pyzw" extensions
+ on Windows for these archives (PEP 441).
+
+- Issue #23657: Avoid explicit checks for str in zipapp, adding support
+ for pathlib.Path objects as arguments.
+
+- Issue #23688: Added support of arbitrary bytes-like objects and avoided
+ unnecessary copying of memoryview in gzip.GzipFile.write().
+ Original patch by Wolfgang Maier.
+
+- Issue #23252: Added support for writing ZIP files to unseekable streams.
- Issue #23647: Increase impalib's MAXLINE to accommodate modern mailbox sizes.
@@ -561,6 +2248,23 @@ Library
and socket open until the garbage collector cleans them up. Patch by
Martin Panter.
+- Issue #23704: collections.deque() objects now support methods for index(),
+ insert(), and copy(). This allows deques to be registered as a
+ MutableSequence and it improves their substitutability for lists.
+
+- Issue #23715: :func:`signal.sigwaitinfo` and :func:`signal.sigtimedwait` are
+ now retried when interrupted by a signal not in the *sigset* parameter, if
+ the signal handler does not raise an exception. signal.sigtimedwait()
+ recomputes the timeout with a monotonic clock when it is retried.
+
+- Issue #23001: Few functions in modules mmap, ossaudiodev, socket, ssl, and
+ codecs, that accepted only read-only bytes-like object now accept writable
+ bytes-like object too.
+
+- Issue #23646: If time.sleep() is interrupted by a signal, the sleep is now
+ retried with the recomputed delay, except if the signal handler raises an
+ exception (PEP 475).
+
- Issue #23136: _strptime now uniformly handles all days in week 0, including
Dec 30 of previous year. Based on patch by Jim Carroll.
@@ -570,9 +2274,31 @@ Library
- Issue #22903: The fake test case created by unittest.loader when it fails
importing a test module is now picklable.
+- Issue #22181: On Linux, os.urandom() now uses the new getrandom() syscall if
+ available, syscall introduced in the Linux kernel 3.17. It is more reliable
+ and more secure, because it avoids the need of a file descriptor and waits
+ until the kernel has enough entropy.
+
+- Issue #2211: Updated the implementation of the http.cookies.Morsel class.
+ Setting attributes key, value and coded_value directly now is deprecated.
+ update() and setdefault() now transform and check keys. Comparing for
+ equality now takes into account attributes key, value and coded_value.
+ copy() now returns a Morsel, not a dict. repr() now contains all attributes.
+ Optimized checking keys and quoting values. Added new tests.
+ Original patch by Demian Brecht.
+
+- Issue #18983: Allow selection of output units in timeit.
+ Patch by Julian Gindi.
+
+- Issue #23631: Fix traceback.format_list when a traceback has been mutated.
+
- Issue #23568: Add rdivmod support to MagicMock() objects.
Patch by Håkan Lövdahl.
+- Issue #2052: Add charset parameter to HtmlDiff.make_file().
+
+- Issue #23668: Support os.truncate and os.ftruncate on Windows.
+
- Issue #23138: Fixed parsing cookies with absent keys or values in cookiejar.
Patch by Demian Brecht.
@@ -580,12 +2306,66 @@ Library
handle exceptions raised by an iterator. Patch by Alon Diamant and Davin
Potts.
+- Issue #23581: Add matmul support to MagicMock. Patch by Håkan Lövdahl.
+
+- Issue #23566: enable(), register(), dump_traceback() and
+ dump_traceback_later() functions of faulthandler now accept file
+ descriptors. Patch by Wei Wu.
+
- Issue #22928: Disabled HTTP header injections in http.client.
Original patch by Demian Brecht.
- Issue #23615: Modules bz2, tarfile and tokenize now can be reloaded with
imp.reload(). Patch by Thomas Kluyver.
+- Issue #23605: os.walk() now calls os.scandir() instead of os.listdir().
+ The usage of os.scandir() reduces the number of calls to os.stat().
+ Initial patch written by Ben Hoyt.
+
+Build
+-----
+
+- Issue #23585: make patchcheck will ensure the interpreter is built.
+
+Tests
+-----
+
+- Issue #23583: Added tests for standard IO streams in IDLE.
+
+- Issue #22289: Prevent test_urllib2net failures due to ftp connection timeout.
+
+Tools/Demos
+-----------
+
+- Issue #22826: The result of open() in Tools/freeze/bkfile.py is now better
+ compatible with regular files (in particular it now supports the context
+ management protocol).
+
+
+What's New in Python 3.5 alpha 2?
+=================================
+
+Release date: 2015-03-09
+
+Core and Builtins
+-----------------
+
+- Issue #23571: PyObject_Call() and PyCFunction_Call() now raise a SystemError
+ if a function returns a result and raises an exception. The SystemError is
+ chained to the previous exception.
+
+Library
+-------
+
+- Issue #22524: New os.scandir() function, part of the PEP 471: "os.scandir()
+ function -- a better and faster directory iterator". Patch written by Ben
+ Hoyt.
+
+- Issue #23103: Reduced the memory consumption of IPv4Address and IPv6Address.
+
+- Issue #21793: BaseHTTPRequestHandler again logs response code as numeric,
+ not as stringified enum. Patch by Demian Brecht.
+
- Issue #23476: In the ssl module, enable OpenSSL's X509_V_FLAG_TRUSTED_FIRST
flag on certificate stores when it is available.
@@ -594,8 +2374,16 @@ Library
- Issue #23504: Added an __all__ to the types module.
+- Issue #23563: Optimized utility functions in urllib.parse.
+
+- Issue #7830: Flatten nested functools.partial.
+
- Issue #20204: Added the __module__ attribute to _tkinter classes.
+- Issue #19980: Improved help() for non-recognized strings. help('') now
+ shows the help on str. help('help') now shows the help on help().
+ Original patch by Mark Lawrence.
+
- Issue #23521: Corrected pure python implementation of timedelta division.
* Eliminated OverflowError from timedelta * float for some floats;
@@ -604,12 +2392,17 @@ Library
- Issue #21619: Popen objects no longer leave a zombie after exit in the with
statement if the pipe was broken. Patch by Martin Panter.
+- Issue #22936: Make it possible to show local variables in tracebacks for
+ both the traceback module and unittest.
+
+- Issue #15955: Add an option to limit the output size in bz2.decompress().
+ Patch by Nikolaus Rath.
+
- Issue #6639: Module-level turtle functions no longer raise TclError after
closing the window.
-- Issues #814253, #9179: Warnings now are raised when group references and
- conditional group references are used in lookbehind assertions in regular
- expressions.
+- Issues #814253, #9179: Group references and conditional group references now
+ work in lookbehind assertions in regular expressions.
- Issue #23215: Multibyte codecs with custom error handlers that ignores errors
consumed too much memory and raised SystemError or MemoryError.
@@ -629,293 +2422,294 @@ Library
- Issue #22885: Fixed arbitrary code execution vulnerability in the dbm.dumb
module. Original patch by Claudiu Popa.
+- Issue #23239: ssl.match_hostname() now supports matching of IP addresses.
+
- Issue #23146: Fix mishandling of absolute Windows paths with forward
slashes in pathlib.
-- Issue #23421: Fixed compression in tarfile CLI. Patch by wdv4758h.
+- Issue #23096: Pickle representation of floats with protocol 0 now is the same
+ for both Python and C implementations.
-- Issue #23367: Fix possible overflows in the unicodedata module.
+- Issue #19105: pprint now more efficiently uses free space at the right.
-- Issue #23361: Fix possible overflow in Windows subprocess creation code.
+- Issue #14910: Add allow_abbrev parameter to argparse.ArgumentParser. Patch by
+ Jonathan Paugh, Steven Bethard, paul j3 and Daniel Eriksson.
-- Issue #23801: Fix issue where cgi.FieldStorage did not always ignore the
- entire preamble to a multipart body.
+- Issue #21717: tarfile.open() now supports 'x' (exclusive creation) mode.
-- Issue #23310: Fix MagicMock's initializer to work with __methods__, just
- like configure_mock(). Patch by Kasia Jachim.
+- Issue #23344: marshal.dumps() is now 20-25% faster on average.
-- asyncio: New event loop APIs: set_task_factory() and get_task_factory().
+- Issue #20416: marshal.dumps() with protocols 3 and 4 is now 40-50% faster on
+ average.
-- asyncio: async() function is deprecated in favour of ensure_future().
+- Issue #23421: Fixed compression in tarfile CLI. Patch by wdv4758h.
-- Issue #23898: Fix inspect.classify_class_attrs() to support attributes
- with overloaded __eq__ and __bool__. Patch by Mike Bayer.
+- Issue #23367: Fix possible overflows in the unicodedata module.
-- Issue #24298: Fix inspect.signature() to correctly unwrap wrappers
- around bound methods.
+- Issue #23361: Fix possible overflow in Windows subprocess creation code.
-- Issue #23572: Fixed functools.singledispatch on classes with falsy
- metaclasses. Patch by Ethan Furman.
+- logging.handlers.QueueListener now takes a respect_handler_level keyword
+ argument which, if set to True, will pass messages to handlers taking handler
+ levels into account.
-IDLE
-----
+- Issue #19705: turtledemo now has a visual sorting algorithm demo. Original
+ patch from Jason Yeo.
-- Issue 15348: Stop the debugger engine (normally in a user process)
- before closing the debugger window (running in the IDLE process).
- This prevents the RuntimeErrors that were being caught and ignored.
+- Issue #23801: Fix issue where cgi.FieldStorage did not always ignore the
+ entire preamble to a multipart body.
-- Issue #24455: Prevent IDLE from hanging when a) closing the shell while the
- debugger is active (15347); b) closing the debugger with the [X] button
- (15348); and c) activating the debugger when already active (24455).
- The patch by Mark Roseman does this by making two changes.
- 1. Suspend and resume the gui.interaction method with the tcl vwait
- mechanism intended for this purpose (instead of root.mainloop & .quit).
- 2. In gui.run, allow any existing interaction to terminate first.
+Build
+-----
-- Change 'The program' to 'Your program' in an IDLE 'kill program?' message
- to make it clearer that the program referred to is the currently running
- user program, not IDLE itself.
+- Issue #23445: pydebug builds now use "gcc -Og" where possible, to make
+ the resulting executable faster.
-- Issue #24750: Improve the appearance of the IDLE editor window status bar.
- Patch by Mark Roseman.
+- Issue #23686: Update OS X 10.5 installer build to use OpenSSL 1.0.2a.
-- Issue #25313: Change the handling of new built-in text color themes to better
- address the compatibility problem introduced by the addition of IDLE Dark.
- Consistently use the revised idleConf.CurrentTheme everywhere in idlelib.
+C API
+-----
-- Issue #24782: Extension configuration is now a tab in the IDLE Preferences
- dialog rather than a separate dialog. The former tabs are now a sorted
- list. Patch by Mark Roseman.
+- Issue #20204: Deprecation warning is now raised for builtin types without the
+ __module__ attribute.
-- Issue #22726: Re-activate the config dialog help button with some content
- about the other buttons and the new IDLE Dark theme.
+Windows
+-------
-- Issue #24820: IDLE now has an 'IDLE Dark' built-in text color theme.
- It is more or less IDLE Classic inverted, with a cobalt blue background.
- Strings, comments, keywords, ... are still green, red, orange, ... .
- To use it with IDLEs released before November 2015, hit the
- 'Save as New Custom Theme' button and enter a new name,
- such as 'Custom Dark'. The custom theme will work with any IDLE
- release, and can be modified.
+- Issue #23465: Implement PEP 486 - Make the Python Launcher aware of virtual
+ environments. Patch by Paul Moore.
-- Issue #25224: README.txt is now an idlelib index for IDLE developers and
- curious users. The previous user content is now in the IDLE doc chapter.
- 'IDLE' now means 'Integrated Development and Learning Environment'.
+- Issue #23437: Make user scripts directory versioned on Windows. Patch by Paul
+ Moore.
-- Issue #24820: Users can now set breakpoint colors in
- Settings -> Custom Highlighting. Original patch by Mark Roseman.
-- Issue #24972: Inactive selection background now matches active selection
- background, as configured by users, on all systems. Found items are now
- always highlighted on Windows. Initial patch by Mark Roseman.
+What's New in Python 3.5 alpha 1?
+=================================
-- Issue #24570: Idle: make calltip and completion boxes appear on Macs
- affected by a tk regression. Initial patch by Mark Roseman.
+Release date: 2015-02-08
-- Issue #24988: Idle ScrolledList context menus (used in debugger)
- now work on Mac Aqua. Patch by Mark Roseman.
+Core and Builtins
+-----------------
-- Issue #24801: Make right-click for context menu work on Mac Aqua.
- Patch by Mark Roseman.
+- Issue #23285: PEP 475 - EINTR handling.
-- Issue #25173: Associate tkinter messageboxes with a specific widget.
- For Mac OSX, make them a 'sheet'. Patch by Mark Roseman.
+- Issue #22735: Fix many edge cases (including crashes) involving custom mro()
+ implementations.
-- Issue #25198: Enhance the initial html viewer now used for Idle Help.
- * Properly indent fixed-pitch text (patch by Mark Roseman).
- * Give code snippet a very Sphinx-like light blueish-gray background.
- * Re-use initial width and height set by users for shell and editor.
- * When the Table of Contents (TOC) menu is used, put the section header
- at the top of the screen.
+- Issue #22896: Avoid using PyObject_AsCharBuffer(), PyObject_AsReadBuffer()
+ and PyObject_AsWriteBuffer().
-- Issue #25225: Condense and rewrite Idle doc section on text colors.
+- Issue #21295: Revert some changes (issue #16795) to AST line numbers and
+ column offsets that constituted a regression.
-- Issue #21995: Explain some differences between IDLE and console Python.
+- Issue #22986: Allow changing an object's __class__ between a dynamic type and
+ static type in some cases.
-- Issue #22820: Explain need for *print* when running file from Idle editor.
+- Issue #15859: PyUnicode_EncodeFSDefault(), PyUnicode_EncodeMBCS() and
+ PyUnicode_EncodeCodePage() now raise an exception if the object is not a
+ Unicode object. For PyUnicode_EncodeFSDefault(), it was already the case on
+ platforms other than Windows. Patch written by Campbell Barton.
-- Issue #25224: Doc: augment Idle feature list and no-subprocess section.
+- Issue #21408: The default __ne__() now returns NotImplemented if __eq__()
+ returned NotImplemented. Original patch by Martin Panter.
-- Issue #25219: Update doc for Idle command line options.
- Some were missing and notes were not correct.
+- Issue #23321: Fixed a crash in str.decode() when error handler returned
+ replacment string longer than mailformed input data.
-- Issue #24861: Most of idlelib is private and subject to change.
- Use idleib.idle.* to start Idle. See idlelib.__init__.__doc__.
+- Issue #22286: The "backslashreplace" error handlers now works with
+ decoding and translating.
-- Issue #25199: Idle: add synchronization comments for future maintainers.
+- Issue #23253: Delay-load ShellExecute[AW] in os.startfile for reduced
+ startup overhead on Windows.
-- Issue #16893: Replace help.txt with help.html for Idle doc display.
- The new idlelib/help.html is rstripped Doc/build/html/library/idle.html.
- It looks better than help.txt and will better document Idle as released.
- The tkinter html viewer that works for this file was written by Mark Roseman.
- The now unused EditorWindow.HelpDialog class and helt.txt file are deprecated.
+- Issue #22038: pyatomic.h now uses stdatomic.h or GCC built-in functions for
+ atomic memory access if available. Patch written by Vitor de Lima and Gustavo
+ Temple.
-- Issue #24199: Deprecate unused idlelib.idlever with possible removal in 3.6.
+- Issue #20284: %-interpolation (aka printf) formatting added for bytes and
+ bytearray.
-- Issue #24790: Remove extraneous code (which also create 2 & 3 conflicts).
+- Issue #23048: Fix jumping out of an infinite while loop in the pdb.
-- Issue #23672: Allow Idle to edit and run files with astral chars in name.
- Patch by Mohd Sanad Zaki Rizvi.
+- Issue #20335: bytes constructor now raises TypeError when encoding or errors
+ is specified with non-string argument. Based on patch by Renaud Blanch.
-- Issue 24745: Idle editor default font. Switch from Courier to
- platform-sensitive TkFixedFont. This should not affect current customized
- font selections. If there is a problem, edit $HOME/.idlerc/config-main.cfg
- and remove 'fontxxx' entries from [Editor Window]. Patch by Mark Roseman.
+- Issue #22834: If the current working directory ends up being set to a
+ non-existent directory then import will no longer raise FileNotFoundError.
-- Issue #21192: Idle editor. When a file is run, put its name in the restart bar.
- Do not print false prompts. Original patch by Adnan Umer.
+- Issue #22869: Move the interpreter startup & shutdown code to a new
+ dedicated pylifecycle.c module
-- Issue #13884: Idle menus. Remove tearoff lines. Patch by Roger Serwy.
+- Issue #22847: Improve method cache efficiency.
-- Issue #23184: remove unused names and imports in idlelib.
- Initial patch by Al Sweigart.
+- Issue #22335: Fix crash when trying to enlarge a bytearray to 0x7fffffff
+ bytes on a 32-bit platform.
-Tests
------
+- Issue #22653: Fix an assertion failure in debug mode when doing a reentrant
+ dict insertion in debug mode.
-- Issue #25616: Tests for OrderedDict are extracted from test_collections
- into separate file test_ordered_dict.
+- Issue #22643: Fix integer overflow in Unicode case operations (upper, lower,
+ title, swapcase, casefold).
-- Issue #25099: Make test_compileall not fail when an entry on sys.path cannot
- be written to (commonly seen in administrative installs on Windows).
+- Issue #17636: Circular imports involving relative imports are now
+ supported.
-- Issue #24751: When running regrtest with the ``-w`` command line option,
- a test run is no longer marked as a failure if all tests succeed when
- re-run.
+- Issue #22604: Fix assertion error in debug mode when dividing a complex
+ number by (nan+0j).
-- Issue #21520: test_zipfile no longer fails if the word 'bad' appears
- anywhere in the name of the current directory.
+- Issue #21052: Do not raise ImportWarning when sys.path_hooks or sys.meta_path
+ are set to None.
-- Issue #23799: Added test.support.start_threads() for running and
- cleaning up multiple threads.
+- Issue #16518: Use 'bytes-like object required' in error messages that
+ previously used the far more cryptic "'x' does not support the buffer
+ protocol.
-- Issue #22390: test.regrtest now emits a warning if temporary files or
- directories are left after running a test.
+- Issue #22470: Fixed integer overflow issues in "backslashreplace",
+ "xmlcharrefreplace", and "surrogatepass" error handlers.
-- Issue #23583: Added tests for standard IO streams in IDLE.
+- Issue #22540: speed up `PyObject_IsInstance` and `PyObject_IsSubclass` in the
+ common case that the second argument has metaclass `type`.
-Build
------
+- Issue #18711: Add a new `PyErr_FormatV` function, similar to `PyErr_Format`
+ but accepting a `va_list` argument.
-- Issue #23445: pydebug builds now use "gcc -Og" where possible, to make
- the resulting executable faster.
+- Issue #22520: Fix overflow checking when generating the repr of a unicode
+ object.
-- Issue #24603: Update Windows builds to use OpenSSL1.0.2d
- and OS X 10.5 installer to use OpenSSL 1.0.2e.
+- Issue #22519: Fix overflow checking in PyBytes_Repr.
-C API
------
+- Issue #22518: Fix integer overflow issues in latin-1 encoding.
-- Issue #23998: PyImport_ReInitLock() now checks for lock allocation error
+- Issue #16324: _charset parameter of MIMEText now also accepts
+ email.charset.Charset instances. Initial patch by Claude Paroz.
-Documentation
--------------
+- Issue #1764286: Fix inspect.getsource() to support decorated functions.
+ Patch by Claudiu Popa.
-- Issue #12067: Rewrite Comparisons section in the Expressions chapter of the
- language reference. Some of the details of comparing mixed types were
- incorrect or ambiguous. NotImplemented is only relevant at a lower level
- than the Expressions chapter. Added details of comparing range() objects,
- and default behaviour and consistency suggestions for user-defined classes.
- Patch from Andy Maier.
+- Issue #18554: os.__all__ includes posix functions.
-- Issue #24952: Clarify the default size argument of stack_size() in
- the "threading" and "_thread" modules. Patch from Mattip.
+- Issue #21391: Use os.path.abspath in the shutil module.
-- Issue #24808: Update the types of some PyTypeObject fields. Patch by
- Joseph Weston.
+- Issue #11471: avoid generating a JUMP_FORWARD instruction at the end of
+ an if-block if there is no else-clause. Original patch by Eugene Toder.
-- Issue #22812: Fix unittest discovery examples.
- Patch from Pam McA'Nulty.
+- Issue #22215: Now ValueError is raised instead of TypeError when str or bytes
+ argument contains not permitted null character or byte.
-- Issue #24129: Clarify the reference documentation for name resolution.
- This includes removing the assumption that readers will be familiar with the
- name resolution scheme Python used prior to the introduction of lexical
- scoping for function namespaces. Patch by Ivan Levkivskyi.
+- Issue #22258: Fix the internal function set_inheritable() on Illumos.
+ This platform exposes the function ``ioctl(FIOCLEX)``, but calling it fails
+ with errno is ENOTTY: "Inappropriate ioctl for device". set_inheritable()
+ now falls back to the slower ``fcntl()`` (``F_GETFD`` and then ``F_SETFD``).
-- Issue #20769: Improve reload() docs. Patch by Dorian Pula.
+- Issue #21389: Displaying the __qualname__ of the underlying function in the
+ repr of a bound method.
-- Issue #23589: Remove duplicate sentence from the FAQ. Patch by Yongzhi Pan.
+- Issue #22206: Using pthread, PyThread_create_key() now sets errno to ENOMEM
+ and returns -1 (error) on integer overflow.
-- Issue #24729: Correct IO tutorial to match implementation regarding
- encoding parameter to open function.
+- Issue #20184: Argument Clinic based signature introspection added for
+ 30 of the builtin functions.
-- Issue #24351: Clarify what is meant by "identifier" in the context of
- string.Template instances.
+- Issue #22116: C functions and methods (of the 'builtin_function_or_method'
+ type) can now be weakref'ed. Patch by Wei Wu.
-- Issue #22155: Add File Handlers subsection with createfilehandler to tkinter
- doc. Remove obsolete example from FAQ. Patch by Martin Panter.
+- Issue #22077: Improve index error messages for bytearrays, bytes, lists,
+ and tuples by adding 'or slices'. Added ', not <typename>' for bytearrays.
+ Original patch by Claudiu Popa.
-- Issue #24029: Document the name binding behavior for submodule imports.
+- Issue #20179: Apply Argument Clinic to bytes and bytearray.
+ Patch by Tal Einat.
-- Issue #24077: Fix typo in man page for -I command option: -s, not -S.
+- Issue #22082: Clear interned strings in slotdefs.
-Tools/Demos
------------
+- Upgrade Unicode database to Unicode 7.0.0.
-- Issue #25440: Fix output of python-config --extension-suffix.
+- Issue #21897: Fix a crash with the f_locals attribute with closure
+ variables when frame.clear() has been called.
-- Issue #23330: h2py now supports arbitrary filenames in #include.
+- Issue #21205: Add a new ``__qualname__`` attribute to generator, the
+ qualified name, and use it in the representation of a generator
+ (``repr(gen)``). The default name of the generator (``__name__`` attribute)
+ is now get from the function instead of the code. Use ``gen.gi_code.co_name``
+ to get the name of the code.
-- Issue #24031: make patchcheck now supports git checkouts, too.
+- Issue #21669: With the aid of heuristics in SyntaxError.__init__, the
+ parser now attempts to generate more meaningful (or at least more search
+ engine friendly) error messages when "exec" and "print" are used as
+ statements.
-Windows
--------
+- Issue #21642: In the conditional if-else expression, allow an integer written
+ with no space between itself and the ``else`` keyword (e.g. ``True if 42else
+ False``) to be valid syntax.
-- Issue #24306: Sets component ID for launcher to match 3.5 and later
- to avoid downgrading.
+- Issue #21523: Fix over-pessimistic computation of the stack effect of
+ some opcodes in the compiler. This also fixes a quadratic compilation
+ time issue noticeable when compiling code with a large number of "and"
+ and "or" operators.
-- Issue #25022: Removed very outdated PC/example_nt/ directory.
+- Issue #21418: Fix a crash in the builtin function super() when called without
+ argument and without current frame (ex: embedded Python).
+- Issue #21425: Fix flushing of standard streams in the interactive
+ interpreter.
-What's New in Python 3.4.3?
-===========================
+- Issue #21435: In rare cases, when running finalizers on objects in cyclic
+ trash a bad pointer dereference could occur due to a subtle flaw in
+ internal iteration logic.
-Release date: 2015-02-23
+- Issue #21377: PyBytes_Concat() now tries to concatenate in-place when the
+ first argument has a reference count of 1. Patch by Nikolaus Rath.
-Core and Builtins
------------------
+- Issue #20355: -W command line options now have higher priority than the
+ PYTHONWARNINGS environment variable. Patch by Arfrever.
-- Issue #22735: Fix many edge cases (including crashes) involving custom mro()
- implementations.
+- Issue #21274: Define PATH_MAX for GNU/Hurd in Python/pythonrun.c.
-- Issue #22896: Avoid using PyObject_AsCharBuffer(), PyObject_AsReadBuffer()
- and PyObject_AsWriteBuffer().
+- Issue #20904: Support setting FPU precision on m68k.
-- Issue #21295: Revert some changes (issue #16795) to AST line numbers and
- column offsets that constituted a regression.
+- Issue #21209: Fix sending tuples to custom generator objects with the yield
+ from syntax.
-- Issue #21408: The default __ne__() now returns NotImplemented if __eq__()
- returned NotImplemented. Original patch by Martin Panter.
+- Issue #21193: pow(a, b, c) now raises ValueError rather than TypeError when b
+ is negative. Patch by Josh Rosenberg.
-- Issue #23321: Fixed a crash in str.decode() when error handler returned
- replacment string longer than mailformed input data.
+- PEP 465 and Issue #21176: Add the '@' operator for matrix multiplication.
-- Issue #23048: Fix jumping out of an infinite while loop in the pdb.
+- Issue #21134: Fix segfault when str is called on an uninitialized
+ UnicodeEncodeError, UnicodeDecodeError, or UnicodeTranslateError object.
-- Issue #20335: bytes constructor now raises TypeError when encoding or errors
- is specified with non-string argument. Based on patch by Renaud Blanch.
+- Issue #19537: Fix PyUnicode_DATA() alignment under m68k. Patch by
+ Andreas Schwab.
-- Issue #22335: Fix crash when trying to enlarge a bytearray to 0x7fffffff
- bytes on a 32-bit platform.
+- Issue #20929: Add a type cast to avoid shifting a negative number.
-- Issue #22653: Fix an assertion failure in debug mode when doing a reentrant
- dict insertion in debug mode.
+- Issue #20731: Properly position in source code files even if they
+ are opened in text mode. Patch by Serhiy Storchaka.
-- Issue #22643: Fix integer overflow in Unicode case operations (upper, lower,
- title, swapcase, casefold).
+- Issue #20637: Key-sharing now also works for instance dictionaries of
+ subclasses. Patch by Peter Ingebretson.
-- Issue #22604: Fix assertion error in debug mode when dividing a complex
- number by (nan+0j).
+- Issue #8297: Attributes missing from modules now include the module name
+ in the error text. Original patch by ysj.ray.
-- Issue #22470: Fixed integer overflow issues in "backslashreplace",
- "xmlcharrefreplace", and "surrogatepass" error handlers.
+- Issue #19995: %c, %o, %x, and %X now raise TypeError on non-integer input.
-- Issue #22520: Fix overflow checking when generating the repr of a unicode
- object.
+- Issue #19655: The ASDL parser - used by the build process to generate code for
+ managing the Python AST in C - was rewritten. The new parser is self contained
+ and does not require to carry long the spark.py parser-generator library;
+ spark.py was removed from the source base.
-- Issue #22519: Fix overflow checking in PyBytes_Repr.
+- Issue #12546: Allow ``\x00`` to be used as a fill character when using str, int,
+ float, and complex __format__ methods.
-- Issue #22518: Fix integer overflow issues in latin-1 encoding.
+- Issue #20480: Add ipaddress.reverse_pointer. Patch by Leon Weber.
+
+- Issue #13598: Modify string.Formatter to support auto-numbering of
+ replacement fields. It now matches the behavior of str.format() in
+ this regard. Patches by Phil Elson and Ramchandra Apte.
+
+- Issue #8931: Make alternate formatting ('#') for type 'c' raise an
+ exception. In versions prior to 3.5, '#' with 'c' had no effect. Now
+ specifying it is an error. Patch by Torsten Landschoff.
- Issue #23165: Perform overflow checks before allocating memory in the
_Py_char2wchar function.
@@ -925,9 +2719,24 @@ Library
- Issue #23399: pyvenv creates relative symlinks where possible.
+- Issue #20289: cgi.FieldStorage() now supports the context management
+ protocol.
+
+- Issue #13128: Print response headers for CONNECT requests when debuglevel
+ > 0. Patch by Demian Brecht.
+
+- Issue #15381: Optimized io.BytesIO to make less allocations and copyings.
+
+- Issue #22818: Splitting on a pattern that could match an empty string now
+ raises a warning. Patterns that can only match empty strings are now
+ rejected.
+
- Issue #23099: Closing io.BytesIO with exported buffer is rejected now to
prevent corrupting exported buffer.
+- Issue #23326: Removed __ne__ implementations. Since fixing default __ne__
+ implementation in issue #21408 they are redundant.
+
- Issue #23363: Fix possible overflow in itertools.permutations.
- Issue #23364: Fix possible overflow in itertools.product.
@@ -943,6 +2752,14 @@ Library
is now always restored or swapped, not only if why is WHY_YIELD or
WHY_RETURN. Patch co-written with Antoine Pitrou.
+- Issue #14099: Restored support of writing ZIP files to tellable but
+ non-seekable streams.
+
+- Issue #14099: Writing to ZipFile and reading multiple ZipExtFiles is
+ threadsafe now.
+
+- Issue #19361: JSON decoder now raises JSONDecodeError instead of ValueError.
+
- Issue #18518: timeit now rejects statements which can't be compiled outside
a function or a loop (e.g. "return" or "break").
@@ -957,47 +2774,85 @@ Library
- Issue #19996: :class:`email.feedparser.FeedParser` now handles (malformed)
headers with no key rather than assuming the body has started.
+- Issue #20188: Support Application-Layer Protocol Negotiation (ALPN) in the ssl
+ module.
+
+- Issue #23133: Pickling of ipaddress objects now produces more compact and
+ portable representation.
+
- Issue #23248: Update ssl error codes from latest OpenSSL git master.
+- Issue #23266: Much faster implementation of ipaddress.collapse_addresses()
+ when there are many non-consecutive addresses.
+
- Issue #23098: 64-bit dev_t is now supported in the os module.
+- Issue #21817: When an exception is raised in a task submitted to a
+ ProcessPoolExecutor, the remote traceback is now displayed in the
+ parent process. Patch by Claudiu Popa.
+
+- Issue #15955: Add an option to limit output size when decompressing LZMA
+ data. Patch by Nikolaus Rath and Martin Panter.
+
- Issue #23250: In the http.cookies module, capitalize "HttpOnly" and "Secure"
as they are written in the standard.
- Issue #23063: In the disutils' check command, fix parsing of reST with code or
code-block directives.
-- Issue #23209, #23225: selectors.BaseSelector.close() now clears its internal
- reference to the selector mapping to break a reference cycle. Initial patch
- written by Martin Richard.
+- Issue #23209, #23225: selectors.BaseSelector.get_key() now raises a
+ RuntimeError if the selector is closed. And selectors.BaseSelector.close()
+ now clears its internal reference to the selector mapping to break a
+ reference cycle. Initial patch written by Martin Richard.
-- Issue #21356: Make ssl.RAND_egd() optional to support LibreSSL. The
- availability of the function is checked during the compilation. Patch written
- by Bernard Spil.
+- Issue #17911: Provide a way to seed the linecache for a PEP-302 module
+ without actually loading the code.
-- Issue #20896, #22935: The :func:`ssl.get_server_certificate` function now
- uses the :data:`~ssl.PROTOCOL_SSLv23` protocol by default, not
- :data:`~ssl.PROTOCOL_SSLv3`, for maximum compatibility and support platforms
- where :data:`~ssl.PROTOCOL_SSLv3` support is disabled.
+- Issue #17911: Provide a new object API for traceback, including the ability
+ to not lookup lines at all until the traceback is actually rendered, without
+ any trace of the original objects being kept alive.
-- Issue #23111: In the ftplib, make ssl.PROTOCOL_SSLv23 the default protocol
- version.
+- Issue #19777: Provide a home() classmethod on Path objects. Contributed
+ by Victor Salgado and Mayank Tripathi.
-- Issue #23132: Mitigate regression in speed and clarity in functools.total_ordering.
+- Issue #23206: Make ``json.dumps(..., ensure_ascii=False)`` as fast as the
+ default case of ``ensure_ascii=True``. Patch by Naoki Inada.
-- Issue #22585: On OpenBSD 5.6 and newer, os.urandom() now calls getentropy(),
- instead of reading /dev/urandom, to get pseudo-random bytes.
+- Issue #23185: Add math.inf and math.nan constants.
+
+- Issue #23186: Add ssl.SSLObject.shared_ciphers() and
+ ssl.SSLSocket.shared_ciphers() to fetch the client's list ciphers sent at
+ handshake.
+
+- Issue #23143: Remove compatibility with OpenSSLs older than 0.9.8.
+
+- Issue #23132: Improve performance and introspection support of comparison
+ methods created by functool.total_ordering.
+
+- Issue #19776: Add an expanduser() method on Path objects.
- Issue #23112: Fix SimpleHTTPServer to correctly carry the query string and
fragment when it redirects to add a trailing slash.
+- Issue #21793: Added http.HTTPStatus enums (i.e. HTTPStatus.OK,
+ HTTPStatus.NOT_FOUND). Patch by Demian Brecht.
+
- Issue #23093: In the io, module allow more operations to work on detached
streams.
+- Issue #23111: In the ftplib, make ssl.PROTOCOL_SSLv23 the default protocol
+ version.
+
+- Issue #22585: On OpenBSD 5.6 and newer, os.urandom() now calls getentropy(),
+ instead of reading /dev/urandom, to get pseudo-random bytes.
+
- Issue #19104: pprint now produces evaluable output for wrapped strings.
- Issue #23071: Added missing names to codecs.__all__. Patch by Martin Panter.
+- Issue #22783: Pickling now uses the NEWOBJ opcode instead of the NEWOBJ_EX
+ opcode if possible.
+
- Issue #15513: Added a __sizeof__ implementation for pickle classes.
- Issue #19858: pickletools.optimize() now aware of the MEMOIZE opcode, can
@@ -1011,7 +2866,7 @@ Library
is run with pythonw.exe.
- Issue #21775: shutil.copytree(): fix crash when copying to VFAT. An exception
- handler assumed that that OSError objects always have a 'winerror' attribute.
+ handler assumed that OSError objects always have a 'winerror' attribute.
That is not the case, so the exception handler itself raised AttributeError
when run on Linux (and, presumably, any other non-Windows OS).
Patch by Greg Ward.
@@ -1019,29 +2874,58 @@ Library
- Issue #1218234: Fix inspect.getsource() to load updated source of
reloaded module. Initial patch by Berker Peksag.
+- Issue #21740: Support wrapped callables in doctest. Patch by Claudiu Popa.
+
+- Issue #23009: Make sure selectors.EpollSelecrtor.select() works when no
+ FD is registered.
+
- Issue #22959: In the constructor of http.client.HTTPSConnection, prefer the
context's check_hostname attribute over the *check_hostname* parameter.
+- Issue #22696: Add function :func:`sys.is_finalizing` to know about
+ interpreter shutdown.
+
- Issue #16043: Add a default limit for the amount of data xmlrpclib.gzip_decode
will return. This resolves CVE-2013-1753.
+- Issue #14099: ZipFile.open() no longer reopen the underlying file. Objects
+ returned by ZipFile.open() can now operate independently of the ZipFile even
+ if the ZipFile was created by passing in a file-like object as the first
+ argument to the constructor.
+
- Issue #22966: Fix __pycache__ pyc file name clobber when pyc_compile is
asked to compile a source file containing multiple dots in the source file
name.
- Issue #21971: Update turtledemo doc and add module to the index.
-- Issue #21032. Fixed socket leak if HTTPConnection.getresponse() fails.
+- Issue #21032: Fixed socket leak if HTTPConnection.getresponse() fails.
Original patch by Martin Panter.
+- Issue #22407: Deprecated the use of re.LOCALE flag with str patterns or
+ re.ASCII. It was newer worked.
+
+- Issue #22902: The "ip" command is now used on Linux to determine MAC address
+ in uuid.getnode(). Pach by Bruno Cauet.
+
- Issue #22960: Add a context argument to xmlrpclib.ServerProxy constructor.
+- Issue #22389: Add contextlib.redirect_stderr().
+
+- Issue #21356: Make ssl.RAND_egd() optional to support LibreSSL. The
+ availability of the function is checked during the compilation. Patch written
+ by Bernard Spil.
+
- Issue #22915: SAX parser now supports files opened with file descriptor or
bytes path.
- Issue #22609: Constructors and update methods of mapping classes in the
collections module now accept the self keyword argument.
+- Issue #22940: Add readline.append_history_file.
+
+- Issue #19676: Added the "namereplace" error handler.
+
- Issue #22788: Add *context* parameter to logging.handlers.HTTPHandler.
- Issue #22921: Allow SSLContext to take the *hostname* parameter even if
@@ -1050,14 +2934,19 @@ Library
- Issue #22894: TestCase.subTest() would cause the test suite to be stopped
when in failfast mode, even in the absence of failures.
-- Issue #22638: SSLv3 is now disabled throughout the standard library.
- It can still be enabled by instantiating a SSLContext manually.
+- Issue #22796: HTTP cookie parsing is now stricter, in order to protect
+ against potential injection attacks.
- Issue #22370: Windows detection in pathlib is now more robust.
- Issue #22841: Reject coroutines in asyncio add_signal_handler().
Patch by Ludovic.Gasc.
+- Issue #19494: Added urllib.request.HTTPBasicPriorAuthHandler. Patch by
+ Matej Cepl.
+
+- Issue #22578: Added attributes to the re.error class.
+
- Issue #22849: Fix possible double free in the io.TextIOWrapper constructor.
- Issue #12728: Different Unicode characters having the same uppercase but
@@ -1066,6 +2955,14 @@ Library
- Issue #22821: Fixed fcntl() with integer argument on 64-bit big-endian
platforms.
+- Issue #21650: Add an `--sort-keys` option to json.tool CLI.
+
+- Issue #22824: Updated reprlib output format for sets to use set literals.
+ Patch contributed by Berker Peksag.
+
+- Issue #22824: Updated reprlib output format for arrays to display empty
+ arrays without an unnecessary empty list. Suggested by Serhiy Storchaka.
+
- Issue #22406: Fixed the uu_codec codec incorrectly ported to 3.x.
Based on patch by Martin Panter.
@@ -1079,16 +2976,15 @@ Library
- Issue #22775: Fixed unpickling of http.cookies.SimpleCookie with protocol 2
and above. Patch by Tim Graham.
-- Issue #22366: urllib.request.urlopen will accept a context object
- (SSLContext) as an argument which will then used be for HTTPS connection.
- Patch by Alex Gaynor.
-
- Issue #22776: Brought excluded code into the scope of a try block in
SysLogHandler.emit().
- Issue #22665: Add missing get_terminal_size and SameFileError to
shutil.__all__.
+- Issue #6623: Remove deprecated Netrc class in the ftplib module. Patch by
+ Matt Chaput.
+
- Issue #17381: Fixed handling of case-insensitive ranges in regular
expressions.
@@ -1102,18 +2998,53 @@ Library
doesn't work. This allows use with special filesystems such as VirtualBox
shared folders.
+- Issue #22217: Implemented reprs of classes in the zipfile module.
+
+- Issue #22457: Honour load_tests in the start_dir of discovery.
+
+- Issue #18216: gettext now raises an error when a .mo file has an
+ unsupported major version number. Patch by Aaron Hill.
+
+- Issue #13918: Provide a locale.delocalize() function which can remove
+ locale-specific number formatting from a string representing a number,
+ without then converting it to a specific type. Patch by Cédric Krier.
+
+- Issue #22676: Make the pickling of global objects which don't have a
+ __module__ attribute less slow.
+
- Issue #18853: Fixed ResourceWarning in shlex.__nain__.
- Issue #9351: Defaults set with set_defaults on an argparse subparser
are no longer ignored when also set on the parent parser.
+- Issue #7559: unittest test loading ImportErrors are reported as import errors
+ with their import exception rather than as attribute errors after the import
+ has already failed.
+
+- Issue #19746: Make it possible to examine the errors from unittest
+ discovery without executing the test suite. The new `errors` attribute
+ on TestLoader exposes these non-fatal errors encountered during discovery.
+
- Issue #21991: Make email.headerregistry's header 'params' attributes
be read-only (MappingProxyType). Previously the dictionary was modifiable
but a new one was created on each access of the attribute.
+- Issue #22638: SSLv3 is now disabled throughout the standard library.
+ It can still be enabled by instantiating a SSLContext manually.
+
- Issue #22641: In asyncio, the default SSL context for client connections
is now created using ssl.create_default_context(), for stronger security.
+- Issue #17401: Include closefd in io.FileIO repr.
+
+- Issue #21338: Add silent mode for compileall. quiet parameters of
+ compile_{dir, file, path} functions now have a multilevel value. Also,
+ -q option of the CLI now have a multilevel value. Patch by Thomas Kluyver.
+
+- Issue #20152: Convert the array and cmath modules to Argument Clinic.
+
+- Issue #18643: Add socket.socketpair() on Windows.
+
- Issue #22435: Fix a file descriptor leak when SocketServer bind fails.
- Issue #13096: Fixed segfault in CTypes POINTER handling of large
@@ -1122,9 +3053,19 @@ Library
- Issue #11694: Raise ConversionError in xdrlib as documented. Patch
by Filip Gruszczyński and Claudiu Popa.
+- Issue #19380: Optimized parsing of regular expressions.
+
+- Issue #1519638: Now unmatched groups are replaced with empty strings in re.sub()
+ and re.subn().
+
+- Issue #18615: sndhdr.what/whathdr now return a namedtuple.
+
- Issue #22462: Fix pyexpat's creation of a dummy frame to make it
appear in exception tracebacks.
+- Issue #21965: Add support for in-memory SSL to the ssl module. Patch
+ by Geert Jansen.
+
- Issue #21173: Fix len() on a WeakKeyDictionary when .clear() was called
with an iterator alive.
@@ -1134,149 +3075,38 @@ Library
- Issue #21905: Avoid RuntimeError in pickle.whichmodule() when sys.modules
is mutated while iterating. Patch by Olivier Grisel.
+- Issue #11271: concurrent.futures.Executor.map() now takes a *chunksize*
+ argument to allow batching of tasks in child processes and improve
+ performance of ProcessPoolExecutor. Patch by Dan O'Reilly.
+
+- Issue #21883: os.path.join() and os.path.relpath() now raise a TypeError with
+ more helpful error message for unsupported or mismatched types of arguments.
+
- Issue #22219: The zipfile module CLI now adds entries for directories
(including empty directories) in ZIP file.
- Issue #22449: In the ssl.SSLContext.load_default_certs, consult the
environmental variables SSL_CERT_DIR and SSL_CERT_FILE on Windows.
+- Issue #22508: The email.__version__ variable has been removed; the email
+ code is no longer shipped separately from the stdlib, and __version__
+ hasn't been updated in several releases.
+
- Issue #20076: Added non derived UTF-8 aliases to locale aliases table.
- Issue #20079: Added locales supported in glibc 2.18 to locale alias table.
-- Issue #22396: On 32-bit AIX platform, don't expose os.posix_fadvise() nor
- os.posix_fallocate() because their prototypes in system headers are wrong.
+- Issue #20218: Added convenience methods read_text/write_text and read_bytes/
+ write_bytes to pathlib.Path objects.
-- Issue #22517: When a io.BufferedRWPair object is deallocated, clear its
- weakrefs.
+- Issue #22437: Number of capturing groups in regular expression is no longer
+ limited by 100.
-- Issue #22448: Improve canceled timer handles cleanup to prevent
- unbound memory usage. Patch by Joshua Moore-Oliva.
-
-- Issue #23009: Make sure selectors.EpollSelecrtor.select() works when no
- FD is registered.
-
-IDLE
-----
-
-- Issue #20577: Configuration of the max line length for the FormatParagraph
- extension has been moved from the General tab of the Idle preferences dialog
- to the FormatParagraph tab of the Config Extensions dialog.
- Patch by Tal Einat.
-
-- Issue #16893: Update Idle doc chapter to match current Idle and add new
- information.
-
-- Issue #3068: Add Idle extension configuration dialog to Options menu.
- Changes are written to HOME/.idlerc/config-extensions.cfg.
- Original patch by Tal Einat.
-
-- Issue #16233: A module browser (File : Class Browser, Alt+C) requires an
- editor window with a filename. When Class Browser is requested otherwise,
- from a shell, output window, or 'Untitled' editor, Idle no longer displays
- an error box. It now pops up an Open Module box (Alt+M). If a valid name
- is entered and a module is opened, a corresponding browser is also opened.
-
-- Issue #4832: Save As to type Python files automatically adds .py to the
- name you enter (even if your system does not display it). Some systems
- automatically add .txt when type is Text files.
-
-- Issue #21986: Code objects are not normally pickled by the pickle module.
- To match this, they are no longer pickled when running under Idle.
-
-- Issue #23180: Rename IDLE "Windows" menu item to "Window".
- Patch by Al Sweigart.
-
-Tests
------
+- Issue #17442: InteractiveInterpreter now displays the full chained traceback
+ in its showtraceback method, to match the built in interactive interpreter.
- Issue #23392: Added tests for marshal C API that works with FILE*.
-- Issue #18982: Add tests for CLI of the calendar module.
-
-- Issue #19548: Added some additional checks to test_codecs to ensure that
- statements in the updated documentation remain accurate. Patch by Martin
- Panter.
-
-- Issue #22838: All test_re tests now work with unittest test discovery.
-
-- Issue #22173: Update lib2to3 tests to use unittest test discovery.
-
-- Issue #16000: Convert test_curses to use unittest.
-
-- Issue #21456: Skip two tests in test_urllib2net.py if _ssl module not
- present. Patch by Remi Pointel.
-
-- Issue #22770: Prevent some Tk segfaults on OS X when running gui tests.
-
-- Issue #23211: Workaround test_logging failure on some OS X 10.6 systems.
-
-- Issue #23345: Prevent test_ssl failures with large OpenSSL patch level
- values (like 0.9.8zc).
-
-- Issue #22289: Prevent test_urllib2net failures due to ftp connection timeout.
-
-Build
------
-
-- Issue #15506: Use standard PKG_PROG_PKG_CONFIG autoconf macro in the configure
- script.
-
-- Issue #22935: Allow the ssl module to be compiled if openssl doesn't support
- SSL 3.
-
-- Issue #16537: Check whether self.extensions is empty in setup.py. Patch by
- Jonathan Hosmer.
-
-- Issue #18096: Fix library order returned by python-config.
-
-- Issue #17219: Add library build dir for Python extension cross-builds.
-
-- Issue #17128: Use private version of OpenSSL for 3.4.3 OS X 10.5+ installer.
-
-C API
------
-
-- Issue #22079: PyType_Ready() now checks that statically allocated type has
- no dynamically allocated bases.
-
-Documentation
--------------
-
-- Issue #19548: Update the codecs module documentation to better cover the
- distinction between text encodings and other codecs, together with other
- clarifications. Patch by Martin Panter.
-
-- Issue #22914: Update the Python 2/3 porting HOWTO to describe a more automated
- approach.
-
-- Issue #21514: The documentation of the json module now refers to new JSON RFC
- 7159 instead of obsoleted RFC 4627.
-
-Tools/Demos
------------
-
-- Issue #22314: pydoc now works when the LINES environment variable is set.
-
-Windows
--------
-
-- Issue #17896: The Windows build scripts now expect external library sources
- to be in ``PCbuild\..\externals`` rather than ``PCbuild\..\..``.
-
-- Issue #17717: The Windows build scripts now use a copy of NASM pulled from
- svn.python.org to build OpenSSL.
-
-- Issue #22644: The bundled version of OpenSSL has been updated to 1.0.1j.
-
-
-What's New in Python 3.4.2?
-===========================
-
-Release date: 2014-10-06
-
-Library
--------
- Issue #10510: distutils register and upload methods now use HTML standards
compliant CRLF line endings.
@@ -1284,15 +3114,27 @@ Library
- Issue #9850: Fixed macpath.join() for empty first component. Patch by
Oleg Oshmyan.
+- Issue #5309: distutils' build and build_ext commands now accept a ``-j``
+ option to enable parallel building of extension modules.
+
+- Issue #22448: Improve canceled timer handles cleanup to prevent
+ unbound memory usage. Patch by Joshua Moore-Oliva.
+
- Issue #22427: TemporaryDirectory no longer attempts to clean up twice when
used in the with statement in generator.
+- Issue #22362: Forbidden ambiguous octal escapes out of range 0-0o377 in
+ regular expressions.
+
- Issue #20912: Now directories added to ZIP file have correct Unix and MS-DOS
directory attributes.
- Issue #21866: ZipFile.close() no longer writes ZIP64 central directory
records if allowZip64 is false.
+- Issue #22278: Fix urljoin problem with relative urls, a regression observed
+ after changes to issue22118 were submitted.
+
- Issue #22415: Fixed debugging output of the GROUPREF_EXISTS opcode in the re
module. Removed trailing spaces in debugging output.
@@ -1302,47 +3144,18 @@ Library
- Issue #21332: Ensure that ``bufsize=1`` in subprocess.Popen() selects
line buffering, rather than block buffering. Patch by Akira Li.
-
-What's New in Python 3.4.2rc1?
-==============================
-
-Release date: 2014-09-22
-
-Core and Builtins
------------------
-
-- Issue #22258: Fix the the internal function set_inheritable() on Illumos.
- This platform exposes the function ``ioctl(FIOCLEX)``, but calling it fails
- with errno is ENOTTY: "Inappropriate ioctl for device". set_inheritable()
- now falls back to the slower ``fcntl()`` (``F_GETFD`` and then ``F_SETFD``).
-
-- Issue #21669: With the aid of heuristics in SyntaxError.__init__, the
- parser now attempts to generate more meaningful (or at least more search
- engine friendly) error messages when "exec" and "print" are used as
- statements.
-
-- Issue #21642: In the conditional if-else expression, allow an integer written
- with no space between itself and the ``else`` keyword (e.g. ``True if 42else
- False``) to be valid syntax.
-
-- Issue #21523: Fix over-pessimistic computation of the stack effect of
- some opcodes in the compiler. This also fixes a quadratic compilation
- time issue noticeable when compiling code with a large number of "and"
- and "or" operators.
-
-Library
--------
-
- Issue #21091: Fix API bug: email.message.EmailMessage.is_attachment is now
- a method. Since EmailMessage is provisional, we can change the API in a
- maintenance release, but we use a trick to remain backward compatible with
- 3.4.0/1.
+ a method.
- Issue #21079: Fix email.message.EmailMessage.is_attachment to return the
correct result when the header has parameters as well as a value.
- Issue #22247: Add NNTPError to nntplib.__all__.
+- Issue #22366: urllib.request.urlopen will accept a context object
+ (SSLContext) as an argument which will then be used for HTTPS connection.
+ Patch by Alex Gaynor.
+
- Issue #4180: The warnings registries are now reset when the filters
are modified.
@@ -1354,6 +3167,9 @@ Library
with non-standard cookie handling in some Web browsers. Reported by
Sergey Bobrov.
+- Issue #20537: logging methods now accept an exception instance as well as a
+ Boolean value or exception tuple. Thanks to Yury Selivanov for the patch.
+
- Issue #22384: An exception in Tkinter callback no longer crashes the program
when it is run with pythonw.exe.
@@ -1362,6 +3178,9 @@ Library
- Issue #21147: sqlite3 now raises an exception if the request contains a null
character instead of truncate it. Based on patch by Victor Stinner.
+- Issue #13968: The glob module now supports recursive search in
+ subdirectories using the "**" pattern.
+
- Issue #21951: Fixed a crash in Tkinter on AIX when called Tcl command with
empty string or tuple argument.
@@ -1370,12 +3189,31 @@ Library
- Issue #22338: Fix a crash in the json module on memory allocation failure.
+- Issue #12410: imaplib.IMAP4 now supports the context management protocol.
+ Original patch by Tarek Ziadé.
+
+- Issue #21270: We now override tuple methods in mock.call objects so that
+ they can be used as normal call attributes.
+
+- Issue #16662: load_tests() is now unconditionally run when it is present in
+ a package's __init__.py. TestLoader.loadTestsFromModule() still accepts
+ use_load_tests, but it is deprecated and ignored. A new keyword-only
+ attribute `pattern` is added and documented. Patch given by Robert Collins,
+ tweaked by Barry Warsaw.
+
- Issue #22226: First letter no longer is stripped from the "status" key in
the result of Treeview.heading().
- Issue #19524: Fixed resource leak in the HTTP connection when an invalid
response is received. Patch by Martin Panter.
+- Issue #20421: Add a .version() method to SSL sockets exposing the actual
+ protocol version in use.
+
+- Issue #19546: configparser exceptions no longer expose implementation details.
+ Chained KeyErrors are removed, which leads to cleaner tracebacks. Patch by
+ Claudiu Popa.
+
- Issue #22051: turtledemo no longer reloads examples to re-run them.
Initialization of variables and gui setup should be done in main(),
which is called each time a demo is run, but not on import.
@@ -1392,23 +3230,57 @@ Library
- Issue #18132: Turtledemo buttons no longer disappear when the window is
shrunk. Original patches by Jan Kanis and Lita Cho.
+- Issue #22043: time.monotonic() is now always available.
+ ``threading.Lock.acquire()``, ``threading.RLock.acquire()`` and socket
+ operations now use a monotonic clock, instead of the system clock, when a
+ timeout is used.
+
+- Issue #21527: Add a default number of workers to ThreadPoolExecutor equal
+ to 5 times the number of CPUs. Patch by Claudiu Popa.
+
- Issue #22216: smtplib now resets its state more completely after a quit. The
most obvious consequence of the previous behavior was a STARTTLS failure
during a connect/starttls/quit/connect/starttls sequence.
+- Issue #22098: ctypes' BigEndianStructure and LittleEndianStructure now
+ define an empty __slots__ so that subclasses don't always get an instance
+ dict. Patch by Claudiu Popa.
+
- Issue #22185: Fix an occasional RuntimeError in threading.Condition.wait()
caused by mutation of the waiters queue without holding the lock. Patch
by Doug Zongker.
+- Issue #22287: On UNIX, _PyTime_gettimeofday() now uses
+ clock_gettime(CLOCK_REALTIME) if available. As a side effect, Python now
+ depends on the librt library on Solaris and on Linux (only with glibc older
+ than 2.17).
+
- Issue #22182: Use e.args to unpack exceptions correctly in
distutils.file_util.move_file. Patch by Claudiu Popa.
- The webbrowser module now uses subprocess's start_new_session=True rather
than a potentially risky preexec_fn=os.setsid call.
+- Issue #22042: signal.set_wakeup_fd(fd) now raises an exception if the file
+ descriptor is in blocking mode.
+
+- Issue #16808: inspect.stack() now returns a named tuple instead of a tuple.
+ Patch by Daniel Shahaf.
+
- Issue #22236: Fixed Tkinter images copying operations in NoDefaultRoot mode.
-- Issue #22191: Fix warnings.__all__.
+- Issue #2527: Add a *globals* argument to timeit functions, in order to
+ override the globals namespace in which the timed code is executed.
+ Patch by Ben Roberts.
+
+- Issue #22118: Switch urllib.parse to use RFC 3986 semantics for the
+ resolution of relative URLs, rather than RFCs 1808 and 2396.
+ Patch by Demian Brecht.
+
+- Issue #21549: Added the "members" parameter to TarFile.list().
+
+- Issue #19628: Allow compileall recursion depth to be specified with a -r
+ option.
- Issue #15696: Add a __sizeof__ implementation for mmap objects on Windows.
@@ -1416,6 +3288,8 @@ Library
- Issue #22165: SimpleHTTPRequestHandler now supports undecodable file names.
+- Issue #15381: Optimized line reading in io.BytesIO.
+
- Issue #8797: Raise HTTPError on failed Basic Authentication immediately.
Initial patch by Sam Bull.
@@ -1431,6 +3305,14 @@ Library
- Issue #17923: glob() patterns ending with a slash no longer match non-dirs on
AIX. Based on patch by Delhallt.
+- Issue #21725: Added support for RFC 6531 (SMTPUTF8) in smtpd.
+
+- Issue #22176: Update the ctypes module's libffi to v3.1. This release
+ adds support for the Linux AArch64 and POWERPC ELF ABIv2 little endian
+ architectures.
+
+- Issue #5411: Added support for the "xztar" format in the shutil module.
+
- Issue #21121: Don't force 3rd party C extensions to be built with
-Werror=declaration-after-statement.
@@ -1438,8 +3320,38 @@ Library
when unpickling pickled sqlite3.Row). sqlite3.Row is now initialized in the
__new__() method.
+- Issue #20170: Convert posixmodule to use Argument Clinic.
+
+- Issue #21539: Add an *exists_ok* argument to `Pathlib.mkdir()` to mimic
+ `mkdir -p` and `os.makedirs()` functionality. When true, ignore
+ FileExistsErrors. Patch by Berker Peksag.
+
+- Issue #22127: Bypass IDNA for pure-ASCII host names in the socket module
+ (in particular for numeric IPs).
+
+- Issue #21047: set the default value for the *convert_charrefs* argument
+ of HTMLParser to True. Patch by Berker Peksag.
+
+- Add an __all__ to html.entities.
+
+- Issue #15114: the strict mode and argument of HTMLParser, HTMLParser.error,
+ and the HTMLParserError exception have been removed.
+
+- Issue #22085: Dropped support of Tk 8.3 in Tkinter.
+
- Issue #21580: Now Tkinter correctly handles bytes arguments passed to Tk.
- In particular this allows to initialize images from binary data.
+ In particular this allows initializing images from binary data.
+
+- Issue #22003: When initialized from a bytes object, io.BytesIO() now
+ defers making a copy until it is mutated, improving performance and
+ memory use on some use cases. Patch by David Wilson.
+
+- Issue #22018: On Windows, signal.set_wakeup_fd() now also supports sockets.
+ A side effect is that Python depends to the WinSock library.
+
+- Issue #22054: Add os.get_blocking() and os.set_blocking() functions to get
+ and set the blocking mode of a file descriptor (False if the O_NONBLOCK flag
+ is set, True otherwise). These functions are not available on Windows.
- Issue #17172: Make turtledemo start as active on OS X even when run with
subprocess. Patch by Lita Cho.
@@ -1447,9 +3359,18 @@ Library
- Issue #21704: Fix build error for _multiprocessing when semaphores
are not available. Patch by Arfrever Frehtes Taifersar Arahesis.
+- Issue #20173: Convert sha1, sha256, sha512 and md5 to ArgumentClinic.
+ Patch by Vajrasky Kok.
+
- Fix repr(_socket.socket) on Windows 64-bit: don't fail with OverflowError
on closed socket. repr(socket.socket) already works fine.
+- Issue #22033: Reprs of most Python implemened classes now contain actual
+ class name instead of hardcoded one.
+
+- Issue #21947: The dis module can now disassemble generator-iterator
+ objects based on their gi_code attribute. Patch by Clement Rouault.
+
- Issue #16133: The asynchat.async_chat.handle_read() method now ignores
BlockingIOError exceptions.
@@ -1457,20 +3378,46 @@ Library
Patch by Tom Flanagan.
- Issue #19884: readline: Disable the meta modifier key if stdout is not
- a terminal to not write the ANSI sequence "\033[1034h" into stdout. This
+ a terminal to not write the ANSI sequence ``"\033[1034h"`` into stdout. This
sequence is used on some terminal (ex: TERM=xterm-256color") to enable
support of 8 bit characters.
+- Issue #4350: Removed a number of out-of-dated and non-working for a long time
+ Tkinter methods.
+
+- Issue #6167: Scrollbar.activate() now returns the name of active element if
+ the argument is not specified. Scrollbar.set() now always accepts only 2
+ arguments.
+
+- Issue #15275: Clean up and speed up the ntpath module.
+
- Issue #21888: plistlib's load() and loads() now work if the fmt parameter is
specified.
+- Issue #22032: __qualname__ instead of __name__ is now always used to format
+ fully qualified class names of Python implemented classes.
+
+- Issue #22031: Reprs now always use hexadecimal format with the "0x" prefix
+ when contain an id in form " at 0x...".
+
+- Issue #22018: signal.set_wakeup_fd() now raises an OSError instead of a
+ ValueError on ``fstat()`` failure.
+
- Issue #21044: tarfile.open() now handles fileobj with an integer 'name'
attribute. Based on patch by Antoine Pietri.
-- Issue #21867: Prevent turtle crash due to invalid undo buffer size.
+- Issue #21966: Respect -q command-line option when code module is ran.
- Issue #19076: Don't pass the redundant 'file' argument to self.error().
+- Issue #16382: Improve exception message of warnings.warn() for bad
+ category. Initial patch by Phil Elson.
+
+- Issue #21932: os.read() now uses a :c:func:`Py_ssize_t` type instead of
+ :c:type:`int` for the size to support reading more than 2 GB at once. On
+ Windows, the size is truncted to INT_MAX. As any call to os.read(), the OS
+ may read less bytes than the number of requested bytes.
+
- Issue #21942: Fixed source file viewing in pydoc's server mode on Windows.
- Issue #11259: asynchat.async_chat().set_terminator() now raises a ValueError
@@ -1488,8 +3435,8 @@ Library
- Issue #21714: Disallow the construction of invalid paths using
Path.with_name(). Original patch by Antony Lee.
-- Issue #21897: Fix a crash with the f_locals attribute with closure
- variables when frame.clear() has been called.
+- Issue #15014: Added 'auth' method to smtplib to make implementing auth
+ mechanisms simpler, and used it internally in the login method.
- Issue #21151: Fixed a segfault in the winreg module when ``None`` is passed
as a ``REG_BINARY`` value to SetValueEx. Patch by John Ehresman.
@@ -1497,8 +3444,17 @@ Library
- Issue #21090: io.FileIO.readall() does not ignore I/O errors anymore. Before,
it ignored I/O errors if at least the first C call read() succeed.
+- Issue #5800: headers parameter of wsgiref.headers.Headers is now optional.
+ Initial patch by Pablo Torres Navarrete and SilentGhost.
+
- Issue #21781: ssl.RAND_add() now supports strings longer than 2 GB.
+- Issue #21679: Prevent extraneous fstat() calls during open(). Patch by
+ Bohuslav Kabrda.
+
+- Issue #21863: cProfile now displays the module name of C extension functions,
+ in addition to their own name.
+
- Issue #11453: asyncore: emit a ResourceWarning when an unclosed file_wrapper
object is destroyed. The destructor now closes the file if needed. The
close() method can now be called twice: the second call does nothing.
@@ -1508,23 +3464,17 @@ Library
- Issue #21476: Make sure the email.parser.BytesParser TextIOWrapper is
discarded after parsing, so the input file isn't unexpectedly closed.
+- Issue #20295: imghdr now recognizes OpenEXR format images.
+
- Issue #21729: Used the "with" statement in the dbm.dumb module to ensure
files closing. Patch by Claudiu Popa.
- Issue #21491: socketserver: Fix a race condition in child processes reaping.
-- Issue #21832: Require named tuple inputs to be exact strings.
+- Issue #21719: Added the ``st_file_attributes`` field to os.stat_result on
+ Windows.
-- Issue #19145: The times argument for itertools.repeat now handles
- negative values the same way for keyword arguments as it does for
- positional arguments.
-
-- Issue #21812: turtle.shapetransform did not tranform the turtle on the
- first call. (Issue identified and fixed by Lita Cho.)
-
-- Issue #21635: The difflib SequenceMatcher.get_matching_blocks() method
- cache didn't match the actual result. The former was a list of tuples
- and the latter was a list of named tuples.
+- Issue #21832: Require named tuple inputs to be exact strings.
- Issue #21722: The distutils "upload" command now exits with a non-zero
return code when uploading fails. Patch by Martin Dengler.
@@ -1532,24 +3482,35 @@ Library
- Issue #21723: asyncio.Queue: support any type of number (ex: float) for the
maximum size. Patch written by Vajrasky Kok.
+- Issue #21711: support for "site-python" directories has now been removed
+ from the site module (it was deprecated in 3.4).
+
+- Issue #17552: new socket.sendfile() method allowing a file to be sent over a
+ socket by using high-performance os.sendfile() on UNIX.
+ Patch by Giampaolo Rodola'.
+
+- Issue #18039: dbm.dump.open() now always creates a new database when the
+ flag has the value 'n'. Patch by Claudiu Popa.
+
- Issue #21326: Add a new is_closed() method to asyncio.BaseEventLoop.
run_forever() and run_until_complete() methods of asyncio.BaseEventLoop now
raise an exception if the event loop was closed.
-- Issue #21774: Fixed NameError for an incorrect variable reference in the
- XML Minidom code for creating processing instructions.
- (Found and fixed by Claudiu Popa.)
-
- Issue #21766: Prevent a security hole in CGIHTTPServer by URL unquoting paths
before checking for a CGI script at that path.
- Issue #21310: Fixed possible resource leak in failed open().
+- Issue #21256: Printout of keyword args should be in deterministic order in
+ a mock function call. This will help to write better doctests.
+
- Issue #21677: Fixed chaining nonnormalized exceptions in io close() methods.
- Issue #11709: Fix the pydoc.help function to not fail when sys.stdin is not a
valid file.
+- Issue #21515: tempfile.TemporaryFile now uses os.O_TMPFILE flag is available.
+
- Issue #13223: Fix pydoc.writedoc so that the HTML documentation for methods
that use 'self' in the example code is generated correctly.
@@ -1560,6 +3521,9 @@ Library
limits would otherwise allow. On systems with a functioning /proc/self/fd
or /dev/fd interface the max is now ignored and all fds are closed.
+- Issue #20383: Introduce importlib.util.module_from_spec() as the preferred way
+ to create a new module.
+
- Issue #21552: Fixed possible integer overflow of too long string lengths in
the tkinter module on 64-bit platforms.
@@ -1568,8 +3532,14 @@ Library
error bubble up as this "bad data" appears in many real world zip files in
the wild and is ignored by other zip tools.
+- Issue #13742: Added "key" and "reverse" parameters to heapq.merge().
+ (First draft of patch contributed by Simon Sapin.)
+
- Issue #21402: tkinter.ttk now works when default root window is not set.
+- Issue #3015: _tkinter.create() now creates tkapp object with wantobject=1 by
+ default.
+
- Issue #10203: sqlite3.Row now truly supports sequence protocol. In particular
it supports reverse() and negative indices. Original patch by Claudiu Popa.
@@ -1577,97 +3547,21 @@ Library
interpreter aliases (python, python3) are now created by copying rather than
symlinking.
-- Issue #14710: pkgutil.get_loader() no longer raises an exception when None is
- found in sys.modules.
-
-- Issue #14710: pkgutil.find_loader() no longer raises an exception when a
- module doesn't exist.
-
-- Issue #21481: Argparse equality and inequality tests now return
- NotImplemented when comparing to an unknown type.
+- Issue #20197: Added support for the WebP image type in the imghdr module.
+ Patch by Fabrice Aneche and Claudiu Popa.
-- Issue #8743: Fix interoperability between set objects and the
- collections.Set() abstract base class.
+- Issue #21513: Speedup some properties of IP addresses (IPv4Address,
+ IPv6Address) such as .is_private or .is_multicast.
-- Issue #13355: random.triangular() no longer fails with a ZeroDivisionError
- when low equals high.
+- Issue #21137: Improve the repr for threading.Lock() and its variants
+ by showing the "locked" or "unlocked" status. Patch by Berker Peksag.
- Issue #21538: The plistlib module now supports loading of binary plist files
when reference or offset size is not a power of two.
-- Issue #21801: Validate that __signature__ is None or an instance of Signature.
-
-- Issue #21923: Prevent AttributeError in distutils.sysconfig.customize_compiler
- due to possible uninitialized _config_vars.
-
-- Issue #21323: Fix http.server to again handle scripts in CGI subdirectories,
- broken by the fix for security issue #19435. Patch by Zach Byrne.
-
-Extension Modules
------------------
-
-- Issue #22176: Update the ctypes module's libffi to v3.1. This release
- adds support for the Linux AArch64 and POWERPC ELF ABIv2 little endian
- architectures.
-
-Build
------
-
-- Issue #15661: python.org OS X installers are now distributed as signed
- installer packages compatible with the Gatekeeper security feature.
-
-- Issue #21958: Define HAVE_ROUND when building with Visual Studio 2013 and
- above. Patch by Zachary Turner.
-
-- Issue #15759: "make suspicious", "make linkcheck" and "make doctest" in Doc/
- now display special message when and only when there are failures.
-
-- Issue #17095: Fix Modules/Setup *shared* support.
-
-- Issue #21811: Anticipated fixes to support OS X versions > 10.9.
-
-- Issue #21166: Prevent possible segfaults and other random failures of
- python --generate-posix-vars in pybuilddir.txt build target.
-
-IDLE
-----
-
-- Issue #17390: Adjust Editor window title; remove 'Python',
- move version to end.
-
-- Issue #14105: Idle debugger breakpoints no longer disappear
- when inseting or deleting lines.
-
-- Issue #17172: Turtledemo can now be run from Idle.
- Currently, the entry is on the Help menu, but it may move to Run.
- Patch by Ramchandra Apt and Lita Cho.
-
-- Issue #21765: Add support for non-ascii identifiers to HyperParser.
-
-- Issue #21940: Add unittest for WidgetRedirector. Initial patch by Saimadhav
- Heblikar.
-
-- Issue #18592: Add unittest for SearchDialogBase. Patch by Phil Webster.
-
-- Issue #21694: Add unittest for ParenMatch. Patch by Saimadhav Heblikar.
+- Issue #21455: Add a default backlog to socket.listen().
-- Issue #21686: add unittest for HyperParser. Original patch by Saimadhav
- Heblikar.
-
-- Issue #12387: Add missing upper(lower)case versions of default Windows key
- bindings for Idle so Caps Lock does not disable them. Patch by Roger Serwy.
-
-- Issue #21695: Closing a Find-in-files output window while the search is
- still in progress no longer closes Idle.
-
-- Issue #18910: Add unittest for textView. Patch by Phil Webster.
-
-- Issue #18292: Add unittest for AutoExpand. Patch by Saihadhav Heblikar.
-
-- Issue #18409: Add unittest for AutoComplete. Patch by Phil Webster.
-
-Tests
------
+- Issue #21525: Most Tkinter methods which accepted tuples now accept lists too.
- Issue #22166: With the assistance of a new internal _codecs._forget_codec
helping function, test_codecs now clears the encoding caches to avoid the
@@ -1676,100 +3570,19 @@ Tests
- Issue #22236: Tkinter tests now don't reuse default root window. New root
window is created for every test class.
-- Issue #20746: Fix test_pdb to run in refleak mode (-R). Patch by Xavier
- de Gaye.
-
-- Issue #22060: test_ctypes has been somewhat cleaned up and simplified; it
- now uses unittest test discovery to find its tests.
-
-- Issue #22104: regrtest.py no longer holds a reference to the suite of tests
- loaded from test modules that don't define test_main().
-
-- Issue #22002: Added ``load_package_tests`` function to test.support and used
- it to implement/augment test discovery in test_asyncio, test_email,
- test_importlib, test_json, and test_tools.
-
-- Issue #21976: Fix test_ssl to accept LibreSSL version strings. Thanks
- to William Orr.
-
-- Issue #21918: Converted test_tools from a module to a package containing
- separate test files for each tested script.
-
-- Issue #20155: Changed HTTP method names in failing tests in test_httpservers
- so that packet filtering software (specifically Windows Base Filtering Engine)
- does not interfere with the transaction semantics expected by the tests.
-
-- Issue #19493: Refactored the ctypes test package to skip tests explicitly
- rather than silently.
-
-- Issue #18492: All resources are now allowed when tests are not run by
- regrtest.py.
-
-- Issue #21634: Fix pystone micro-benchmark: use floor division instead of true
- division to benchmark integers instead of floating point numbers. Set pystone
- version to 1.2. Patch written by Lennart Regebro.
-
-- Issue #21605: Added tests for Tkinter images.
-
-- Issue #21493: Added test for ntpath.expanduser(). Original patch by
- Claudiu Popa.
-
-- Issue #19925: Added tests for the spwd module. Original patch by Vajrasky Kok.
-
-- Issue #21522: Added Tkinter tests for Listbox.itemconfigure(),
- PanedWindow.paneconfigure(), and Menu.entryconfigure().
-
-Documentation
--------------
-
-- Issue #21777: The binary sequence methods on bytes and bytearray are now
- documented explicitly, rather than assuming users will be able to derive
- the expected behaviour from the behaviour of the corresponding str methods.
-
-Windows
--------
-
-- Issue #21671, #22160, CVE-2014-0224: The bundled version of OpenSSL has been
- updated to 1.0.1i.
-
-- Issue #10747: Use versioned labels in the Windows start menu.
- Patch by Olive Kilburn.
-
-Tools/Demos
------------
-
-- Issue #22201: Command-line interface of the zipfile module now correctly
- extracts ZIP files with directory entries. Patch by Ryan Wilson.
-
-- Issue #21906: Make Tools/scripts/md5sum.py work in Python 3.
- Patch by Zachary Ware.
-
-- Issue #21629: Fix Argument Clinic's "--converters" feature.
-
-
-What's New in Python 3.4.1?
-===========================
+- Issue #10744: Fix PEP 3118 format strings on ctypes objects with a nontrivial
+ shape.
-Release date: 2014-05-18
+- Issue #20826: Optimize ipaddress.collapse_addresses().
-Core and Builtins
------------------
-
-- Issue #21418: Fix a crash in the builtin function super() when called without
- argument and without current frame (ex: embedded Python).
+- Issue #21487: Optimize ipaddress.summarize_address_range() and
+ ipaddress.{IPv4Network,IPv6Network}.subnets().
-- Issue #21425: Fix flushing of standard streams in the interactive
- interpreter.
+- Issue #21486: Optimize parsing of netmasks in ipaddress.IPv4Network and
+ ipaddress.IPv6Network.
-- Issue #21435: In rare cases, when running finalizers on objects in cyclic
- trash a bad pointer dereference could occur due to a subtle flaw in
- internal iteration logic.
-
-Library
--------
-
-- Issue #10744: Fix PEP 3118 format strings on ctypes objects with a nontrivial
- shape.
+- Issue #13916: Disallowed the surrogatepass error handler for non UTF-\*
+ encodings.
- Issue #20998: Fixed re.fullmatch() of repeated single character pattern
with ignore case. Original patch by Matthew Barnett.
@@ -1777,80 +3590,73 @@ Library
- Issue #21075: fileinput.FileInput now reads bytes from standard stream if
binary mode is specified. Patch by Sam Kimbrel.
-- Issue #21396: Fix TextIOWrapper(..., write_through=True) to not force a
- flush() on the underlying binary stream. Patch by akira.
+- Issue #19775: Add a samefile() method to pathlib Path objects. Initial
+ patch by Vajrasky Kok.
-- Issue #21470: Do a better job seeding the random number generator by
- using enough bytes to span the full state space of the Mersenne Twister.
+- Issue #21226: Set up modules properly in PyImport_ExecCodeModuleObject
+ (and friends).
-- Issue #21398: Fix an unicode error in the pydoc pager when the documentation
+- Issue #21398: Fix a unicode error in the pydoc pager when the documentation
contains characters not encodable to the stdout encoding.
-Tests
------
-
-- Issue #17756: Fix test_code test when run from the installed location.
-
-- Issue #17752: Fix distutils tests when run from the installed location.
-
-IDLE
-----
-
-- Issue #18104: Add idlelib/idle_test/htest.py with a few sample tests to begin
- consolidating and improving human-validated tests of Idle. Change other files
- as needed to work with htest. Running the module as __main__ runs all tests.
-
+- Issue #16531: ipaddress.IPv4Network and ipaddress.IPv6Network now accept
+ an (address, netmask) tuple argument, so as to easily construct network
+ objects from existing addresses.
-What's New in Python 3.4.1rc1?
-==============================
+- Issue #21156: importlib.abc.InspectLoader.source_to_code() is now a
+ staticmethod.
-Release date: 2014-05-05
+- Issue #21424: Simplified and optimized heaqp.nlargest() and nmsmallest()
+ to make fewer tuple comparisons.
-Core and Builtins
------------------
-
-- Issue #21274: Define PATH_MAX for GNU/Hurd in Python/pythonrun.c.
+- Issue #21396: Fix TextIOWrapper(..., write_through=True) to not force a
+ flush() on the underlying binary stream. Patch by akira.
-- Issue #21209: Fix sending tuples to custom generator objects with the yield
- from syntax.
+- Issue #18314: Unlink now removes junctions on Windows. Patch by Kim Gräsman
-- Issue #21134: Fix segfault when str is called on an uninitialized
- UnicodeEncodeError, UnicodeDecodeError, or UnicodeTranslateError object.
+- Issue #21088: Bugfix for curses.window.addch() regression in 3.4.0.
+ In porting to Argument Clinic, the first two arguments were reversed.
-- Issue #19537: Fix PyUnicode_DATA() alignment under m68k. Patch by
- Andreas Schwab.
+- Issue #21407: _decimal: The module now supports function signatures.
-- Issue #20929: Add a type cast to avoid shifting a negative number.
+- Issue #10650: Remove the non-standard 'watchexp' parameter from the
+ Decimal.quantize() method in the Python version. It had never been
+ present in the C version.
-- Issue #20731: Properly position in source code files even if they
- are opened in text mode. Patch by Serhiy Storchaka.
+- Issue #21469: Reduced the risk of false positives in robotparser by
+ checking to make sure that robots.txt has been read or does not exist
+ prior to returning True in can_fetch().
-- Issue #20637: Key-sharing now also works for instance dictionaries of
- subclasses. Patch by Peter Ingebretson.
+- Issue #19414: Have the OrderedDict mark deleted links as unusable.
+ This gives an early failure if the link is deleted during iteration.
-- Issue #12546: Allow ``\x00`` to be used as a fill character when using str, int,
- float, and complex __format__ methods.
+- Issue #21421: Add __slots__ to the MappingViews ABC.
+ Patch by Josh Rosenberg.
-- Issue #13598: Modify string.Formatter to support auto-numbering of
- replacement fields. It now matches the behavior of str.format() in
- this regard. Patches by Phil Elson and Ramchandra Apte.
+- Issue #21101: Eliminate double hashing in the C speed-up code for
+ collections.Counter().
-Library
--------
+- Issue #21321: itertools.islice() now releases the reference to the source
+ iterator when the slice is exhausted. Patch by Anton Afanasyev.
-- Issue #21088: Bugfix for curses.window.addch() regression in 3.4.0.
- In porting to Argument Clinic, the first two arguments were reversed.
+- Issue #21057: TextIOWrapper now allows the underlying binary stream's
+ read() or read1() method to return an arbitrary bytes-like object
+ (such as a memoryview). Patch by Nikolaus Rath.
-- Issue #21469: Reduced the risk of false positives in robotparser by
- checking to make sure that robots.txt has been read or does not exist
- prior to returning True in can_fetch().
+- Issue #20951: SSLSocket.send() now raises either SSLWantReadError or
+ SSLWantWriteError on a non-blocking socket if the operation would block.
+ Previously, it would return 0. Patch by Nikolaus Rath.
-- Issue #21321: itertools.islice() now releases the reference to the source
- iterator when the slice is exhausted. Patch by Anton Afanasyev.
+- Issue #13248: removed previously deprecated asyncore.dispatcher __getattr__
+ cheap inheritance hack.
- Issue #9815: assertRaises now tries to clear references to local variables
in the exception's traceback.
+- Issue #19940: ssl.cert_time_to_seconds() now interprets the given time
+ string in the UTC timezone (as specified in RFC 5280), not the local
+ timezone.
+
- Issue #13204: Calling sys.flags.__new__ would crash the interpreter,
now it raises a TypeError.
@@ -1874,9 +3680,25 @@ Library
- Issue #12220: mindom now raises a custom ValueError indicating it doesn't
support spaces in URIs instead of letting a 'split' ValueError bubble up.
+- Issue #21068: The ssl.PROTOCOL* constants are now enum members.
+
+- Issue #21276: posixmodule: Don't define USE_XATTRS on KFreeBSD and the Hurd.
+
+- Issue #21262: New method assert_not_called for Mock.
+ It raises AssertionError if the mock has been called.
+
+- Issue #21238: New keyword argument `unsafe` to Mock. It raises
+ `AttributeError` incase of an attribute startswith assert or assret.
+
+- Issue #20896: ssl.get_server_certificate() now uses PROTOCOL_SSLv23, not
+ PROTOCOL_SSLv3, for maximum compatibility.
+
- Issue #21239: patch.stopall() didn't work deterministically when the same
name was patched more than once.
+- Issue #21203: Updated fileConfig and dictConfig to remove inconsistencies.
+ Thanks to Jure Koren for the patch.
+
- Issue #21222: Passing name keyword argument to mock.create_autospec now
works.
@@ -1907,17 +3729,31 @@ Library
- Issue #21171: Fixed undocumented filter API of the rot13 codec.
Patch by Berker Peksag.
+- Issue #20539: Improved math.factorial error message for large positive inputs
+ and changed exception type (OverflowError -> ValueError) for large negative
+ inputs.
+
- Issue #21172: isinstance check relaxed from dict to collections.Mapping.
- Issue #21155: asyncio.EventLoop.create_unix_server() now raises a ValueError
if path and sock are specified at the same time.
+- Issue #21136: Avoid unnecessary normalization of Fractions resulting from
+ power and other operations. Patch by Raymond Hettinger.
+
+- Issue #17621: Introduce importlib.util.LazyLoader.
+
+- Issue #21076: signal module constants were turned into enums.
+ Patch by Giampaolo Rodola'.
+
+- Issue #20636: Improved the repr of Tkinter widgets.
+
+- Issue #19505: The items, keys, and values views of OrderedDict now support
+ reverse iteration using reversed().
+
- Issue #21149: Improved thread-safety in logging cleanup during interpreter
shutdown. Thanks to Devin Jeanpierre for the patch.
-- Issue #20145: `assertRaisesRegex` and `assertWarnsRegex` now raise a
- TypeError if the second argument is not a string or compiled regex.
-
- Issue #21058: Fix a leak of file descriptor in
:func:`tempfile.NamedTemporaryFile`, close the file descriptor if
:func:`io.open` fails
@@ -1927,6 +3763,9 @@ Library
- Issue #21013: Enhance ssl.create_default_context() when used for server side
sockets to provide better security by default.
+- Issue #20145: `assertRaisesRegex` and `assertWarnsRegex` now raise a
+ TypeError if the second argument is not a string or compiled regex.
+
- Issue #20633: Replace relative import by absolute import.
- Issue #20980: Stop wrapping exception when using ThreadPool.
@@ -1940,13 +3779,33 @@ Library
curve for ECDH key exchange on OpenSSL 1.0.2 and later, and otherwise
default to "prime256v1".
+- Issue #21000: Improve the command-line interface of json.tool.
+
- Issue #20995: Enhance default ciphers used by the ssl module to enable
- better security an prioritize perfect forward secrecy.
+ better security and prioritize perfect forward secrecy.
- Issue #20884: Don't assume that __file__ is defined on importlib.__init__.
- Issue #21499: Ignore __builtins__ in several test_importlib.test_api tests.
+- Issue #20627: xmlrpc.client.ServerProxy is now a context manager.
+
+- Issue #19165: The formatter module now raises DeprecationWarning instead of
+ PendingDeprecationWarning.
+
+- Issue #13936: Remove the ability of datetime.time instances to be considered
+ false in boolean contexts.
+
+- Issue #18931: selectors module now supports /dev/poll on Solaris.
+ Patch by Giampaolo Rodola'.
+
+- Issue #19977: When the ``LC_TYPE`` locale is the POSIX locale (``C`` locale),
+ :py:data:`sys.stdin` and :py:data:`sys.stdout` are now using the
+ ``surrogateescape`` error handler, instead of the ``strict`` error handler.
+
+- Issue #20574: Implement incremental decoder for cp65001 code (Windows code
+ page 65001, Microsoft UTF-8).
+
- Issue #20879: Delay the initialization of encoding and decoding tables for
base32, ascii85 and base85 codecs in the base64 module, and delay the
initialization of the unquote_to_bytes() table of the urllib.parse module, to
@@ -1981,6 +3840,14 @@ Library
- Issue #19748: On AIX, time.mktime() now raises an OverflowError for year
outsize range [1902; 2037].
+- Issue #19573: inspect.signature: Use enum for parameter kind constants.
+
+- Issue #20726: inspect.signature: Make Signature and Parameter picklable.
+
+- Issue #17373: Add inspect.Signature.from_callable method.
+
+- Issue #20378: Improve repr of inspect.Signature and inspect.Parameter.
+
- Issue #20816: Fix inspect.getcallargs() to raise correct TypeError for
missing keyword-only arguments. Patch by Jeremiah Lowin.
@@ -1997,6 +3864,12 @@ Library
positional-or-keyword arguments passed as keyword arguments become
keyword-only.
+- Issue #20334: inspect.Signature and inspect.Parameter are now hashable.
+ Thanks to Antony Lee for bug reports and suggestions.
+
+- Issue #15916: doctest.DocTestSuite returns an empty unittest.TestSuite instead
+ of raising ValueError if it finds no tests
+
- Issue #21209: Fix asyncio.tasks.CoroWrapper to workaround a bug
in yield-from implementation in CPythons prior to 3.4.1.
@@ -2009,17 +3882,90 @@ Library
- Issue #11571: Ensure that the turtle window becomes the topmost window
when launched on OS X.
-Extension Modules
------------------
+- Issue #21801: Validate that __signature__ is None or an instance of Signature.
-- Issue #21276: posixmodule: Don't define USE_XATTRS on KFreeBSD and the Hurd.
+- Issue #21923: Prevent AttributeError in distutils.sysconfig.customize_compiler
+ due to possible uninitialized _config_vars.
-- Issue #21226: Set up modules properly in PyImport_ExecCodeModuleObject
- (and friends).
+- Issue #21323: Fix http.server to again handle scripts in CGI subdirectories,
+ broken by the fix for security issue #19435. Patch by Zach Byrne.
+
+- Issue #22733: Fix ffi_prep_args not zero-extending argument values correctly
+ on 64-bit Windows.
+
+- Issue #23302: Default to TCP_NODELAY=1 upon establishing an HTTPConnection.
+ Removed use of hard-coded MSS as it's an optimization that's no longer needed
+ with Nagle disabled.
IDLE
----
+- Issue #20577: Configuration of the max line length for the FormatParagraph
+ extension has been moved from the General tab of the Idle preferences dialog
+ to the FormatParagraph tab of the Config Extensions dialog.
+ Patch by Tal Einat.
+
+- Issue #16893: Update Idle doc chapter to match current Idle and add new
+ information.
+
+- Issue #3068: Add Idle extension configuration dialog to Options menu.
+ Changes are written to HOME/.idlerc/config-extensions.cfg.
+ Original patch by Tal Einat.
+
+- Issue #16233: A module browser (File : Class Browser, Alt+C) requires an
+ editor window with a filename. When Class Browser is requested otherwise,
+ from a shell, output window, or 'Untitled' editor, Idle no longer displays
+ an error box. It now pops up an Open Module box (Alt+M). If a valid name
+ is entered and a module is opened, a corresponding browser is also opened.
+
+- Issue #4832: Save As to type Python files automatically adds .py to the
+ name you enter (even if your system does not display it). Some systems
+ automatically add .txt when type is Text files.
+
+- Issue #21986: Code objects are not normally pickled by the pickle module.
+ To match this, they are no longer pickled when running under Idle.
+
+- Issue #17390: Adjust Editor window title; remove 'Python',
+ move version to end.
+
+- Issue #14105: Idle debugger breakpoints no longer disappear
+ when inserting or deleting lines.
+
+- Issue #17172: Turtledemo can now be run from Idle.
+ Currently, the entry is on the Help menu, but it may move to Run.
+ Patch by Ramchandra Apt and Lita Cho.
+
+- Issue #21765: Add support for non-ascii identifiers to HyperParser.
+
+- Issue #21940: Add unittest for WidgetRedirector. Initial patch by Saimadhav
+ Heblikar.
+
+- Issue #18592: Add unittest for SearchDialogBase. Patch by Phil Webster.
+
+- Issue #21694: Add unittest for ParenMatch. Patch by Saimadhav Heblikar.
+
+- Issue #21686: add unittest for HyperParser. Original patch by Saimadhav
+ Heblikar.
+
+- Issue #12387: Add missing upper(lower)case versions of default Windows key
+ bindings for Idle so Caps Lock does not disable them. Patch by Roger Serwy.
+
+- Issue #21695: Closing a Find-in-files output window while the search is
+ still in progress no longer closes Idle.
+
+- Issue #18910: Add unittest for textView. Patch by Phil Webster.
+
+- Issue #18292: Add unittest for AutoExpand. Patch by Saihadhav Heblikar.
+
+- Issue #18409: Add unittest for AutoComplete. Patch by Phil Webster.
+
+- Issue #21477: htest.py - Improve framework, complete set of tests.
+ Patches by Saimadhav Heblikar
+
+- Issue #18104: Add idlelib/idle_test/htest.py with a few sample tests to begin
+ consolidating and improving human-validated tests of Idle. Change other files
+ as needed to work with htest. Running the module as __main__ runs all tests.
+
- Issue #21139: Change default paragraph width to 72, the PEP 8 recommendation.
- Issue #21284: Paragraph reformat test passes after user changes reformat width.
@@ -2027,10 +3973,52 @@ IDLE
- Issue #17654: Ensure IDLE menus are customized properly on OS X for
non-framework builds and for all variants of Tk.
+- Issue #23180: Rename IDLE "Windows" menu item to "Window".
+ Patch by Al Sweigart.
+
Build
-----
-- The Windows build now includes OpenSSL 1.0.1g
+- Issue #15506: Use standard PKG_PROG_PKG_CONFIG autoconf macro in the configure
+ script.
+
+- Issue #22935: Allow the ssl module to be compiled if openssl doesn't support
+ SSL 3.
+
+- Issue #22592: Drop support of the Borland C compiler to build Python. The
+ distutils module still supports it to build extensions.
+
+- Issue #22591: Drop support of MS-DOS, especially of the DJGPP compiler
+ (MS-DOS port of GCC).
+
+- Issue #16537: Check whether self.extensions is empty in setup.py. Patch by
+ Jonathan Hosmer.
+
+- Issue #22359: Remove incorrect uses of recursive make. Patch by Jonas
+ Wagner.
+
+- Issue #21958: Define HAVE_ROUND when building with Visual Studio 2013 and
+ above. Patch by Zachary Turner.
+
+- Issue #18093: the programs that embed the CPython runtime are now in a
+ separate "Programs" directory, rather than being kept in the Modules
+ directory.
+
+- Issue #15759: "make suspicious", "make linkcheck" and "make doctest" in Doc/
+ now display special message when and only when there are failures.
+
+- Issue #21141: The Windows build process no longer attempts to find Perl,
+ instead relying on OpenSSL source being configured and ready to build. The
+ ``PCbuild\build_ssl.py`` script has been re-written and re-named to
+ ``PCbuild\prepare_ssl.py``, and takes care of configuring OpenSSL source
+ for both 32 and 64 bit platforms. OpenSSL sources obtained from
+ svn.python.org will always be pre-configured and ready to build.
+
+- Issue #21037: Add a build option to enable AddressSanitizer support.
+
+- Issue #19962: The Windows build process now creates "python.bat" in the
+ root of the source tree, which passes all arguments through to the most
+ recently built interpreter.
- Issue #21285: Refactor and fix curses configure check to always search
in a ncursesw directory.
@@ -2039,12 +4027,60 @@ Build
include directories if they aren't already being searched. This avoids
an explicit runtime library dependency.
+- Issue #17861: Tools/scripts/generate_opcode_h.py automatically regenerates
+ Include/opcode.h from Lib/opcode.py if the later gets any change.
+
- Issue #20644: OS X installer build support for documentation build changes
in 3.4.1: assume externally supplied sphinx-build is available in /usr/bin.
+- Issue #20022: Eliminate use of deprecated bundlebuilder in OS X builds.
+
+- Issue #15968: Incorporated Tcl, Tk, and Tix builds into the Windows build
+ solution.
+
+- Issue #17095: Fix Modules/Setup *shared* support.
+
+- Issue #21811: Anticipated fixes to support OS X versions > 10.9.
+
+- Issue #21166: Prevent possible segfaults and other random failures of
+ python --generate-posix-vars in pybuilddir.txt build target.
+
+- Issue #18096: Fix library order returned by python-config.
+
+- Issue #17219: Add library build dir for Python extension cross-builds.
+
+- Issue #22919: Windows build updated to support VC 14.0 (Visual Studio 2015),
+ which will be used for the official release.
+
+- Issue #21236: Build _msi.pyd with cabinet.lib instead of fci.lib
+
+- Issue #17128: Use private version of OpenSSL for OS X 10.5+ installer.
+
C API
-----
+- Issue #14203: Remove obsolete support for view==NULL in PyBuffer_FillInfo(),
+ bytearray_getbuffer(), bytesiobuf_getbuffer() and array_buffer_getbuf().
+ All functions now raise BufferError in that case.
+
+- Issue #22445: PyBuffer_IsContiguous() now implements precise contiguity
+ tests, compatible with NumPy's NPY_RELAXED_STRIDES_CHECKING compilation
+ flag. Previously the function reported false negatives for corner cases.
+
+- Issue #22079: PyType_Ready() now checks that statically allocated type has
+ no dynamically allocated bases.
+
+- Issue #22453: Removed non-documented macro PyObject_REPR().
+
+- Issue #18395: Rename ``_Py_char2wchar()`` to :c:func:`Py_DecodeLocale`,
+ rename ``_Py_wchar2char()`` to :c:func:`Py_EncodeLocale`, and document
+ these functions.
+
+- Issue #21233: Add new C functions: PyMem_RawCalloc(), PyMem_Calloc(),
+ PyObject_Calloc(), _PyObject_GC_Calloc(). bytes(int) is now using
+ ``calloc()`` instead of ``malloc()`` for large objects which is faster and
+ use less memory.
+
- Issue #20942: PyImport_ImportFrozenModuleObject() no longer sets __file__ to
match what importlib does; this affects _frozen_importlib as well as any
module loaded using imp.init_frozen().
@@ -2052,9 +4088,29 @@ C API
Documentation
-------------
+- Issue #19548: Update the codecs module documentation to better cover the
+ distinction between text encodings and other codecs, together with other
+ clarifications. Patch by Martin Panter.
+
+- Issue #22394: Doc/Makefile now supports ``make venv PYTHON=../python`` to
+ create a venv for generating the documentation, e.g.,
+ ``make html PYTHON=venv/bin/python3``.
+
+- Issue #21514: The documentation of the json module now refers to new JSON RFC
+ 7159 instead of obsoleted RFC 4627.
+
+- Issue #21777: The binary sequence methods on bytes and bytearray are now
+ documented explicitly, rather than assuming users will be able to derive
+ the expected behaviour from the behaviour of the corresponding str methods.
+
+- Issue #6916: undocument deprecated asynchat.fifo class.
+
- Issue #17386: Expanded functionality of the ``Doc/make.bat`` script to make
it much more comparable to ``Doc/Makefile``.
+- Issue #21312: Update the thread_foobar.h template file to include newer
+ threading APIs. Patch by Jack McCracken.
+
- Issue #21043: Remove the recommendation for specific CA organizations and to
mention the ability to load the OS certificates.
@@ -2072,6 +4128,73 @@ Documentation
Tests
-----
+- Issue #18982: Add tests for CLI of the calendar module.
+
+- Issue #19548: Added some additional checks to test_codecs to ensure that
+ statements in the updated documentation remain accurate. Patch by Martin
+ Panter.
+
+- Issue #22838: All test_re tests now work with unittest test discovery.
+
+- Issue #22173: Update lib2to3 tests to use unittest test discovery.
+
+- Issue #16000: Convert test_curses to use unittest.
+
+- Issue #21456: Skip two tests in test_urllib2net.py if _ssl module not
+ present. Patch by Remi Pointel.
+
+- Issue #20746: Fix test_pdb to run in refleak mode (-R). Patch by Xavier
+ de Gaye.
+
+- Issue #22060: test_ctypes has been somewhat cleaned up and simplified; it
+ now uses unittest test discovery to find its tests.
+
+- Issue #22104: regrtest.py no longer holds a reference to the suite of tests
+ loaded from test modules that don't define test_main().
+
+- Issue #22111: Assorted cleanups in test_imaplib. Patch by Milan Oberkirch.
+
+- Issue #22002: Added ``load_package_tests`` function to test.support and used
+ it to implement/augment test discovery in test_asyncio, test_email,
+ test_importlib, test_json, and test_tools.
+
+- Issue #21976: Fix test_ssl to accept LibreSSL version strings. Thanks
+ to William Orr.
+
+- Issue #21918: Converted test_tools from a module to a package containing
+ separate test files for each tested script.
+
+- Issue #9554: Use modern unittest features in test_argparse. Initial patch by
+ Denver Coneybeare and Radu Voicilas.
+
+- Issue #20155: Changed HTTP method names in failing tests in test_httpservers
+ so that packet filtering software (specifically Windows Base Filtering Engine)
+ does not interfere with the transaction semantics expected by the tests.
+
+- Issue #19493: Refactored the ctypes test package to skip tests explicitly
+ rather than silently.
+
+- Issue #18492: All resources are now allowed when tests are not run by
+ regrtest.py.
+
+- Issue #21634: Fix pystone micro-benchmark: use floor division instead of true
+ division to benchmark integers instead of floating point numbers. Set pystone
+ version to 1.2. Patch written by Lennart Regebro.
+
+- Issue #21605: Added tests for Tkinter images.
+
+- Issue #21493: Added test for ntpath.expanduser(). Original patch by
+ Claudiu Popa.
+
+- Issue #19925: Added tests for the spwd module. Original patch by Vajrasky Kok.
+
+- Issue #21522: Added Tkinter tests for Listbox.itemconfigure(),
+ PanedWindow.paneconfigure(), and Menu.entryconfigure().
+
+- Issue #17756: Fix test_code test when run from the installed location.
+
+- Issue #17752: Fix distutils tests when run from the installed location.
+
- Issue #18604: Consolidated checks for GUI availability. All platforms now
at least check whether Tk can be instantiated when the GUI resource is
requested.
@@ -2089,6 +4212,8 @@ Tests
- Issue #21097: Move test_namespace_pkgs into test_importlib.
+- Issue #21503: Use test_both() consistently in test_importlib.
+
- Issue #20939: Avoid various network test failures due to new
redirect of http://www.python.org/ to https://www.python.org:
use http://www.example.com instead.
@@ -2099,9 +4224,41 @@ Tests
- Issue #21093: Prevent failures of ctypes test_macholib on OS X if a
copy of libz exists in $HOME/lib or /usr/local/lib.
+- Issue #22770: Prevent some Tk segfaults on OS X when running gui tests.
+
+- Issue #23211: Workaround test_logging failure on some OS X 10.6 systems.
+
+- Issue #23345: Prevent test_ssl failures with large OpenSSL patch level
+ values (like 0.9.8zc).
+
Tools/Demos
-----------
+- Issue #22314: pydoc now works when the LINES environment variable is set.
+
+- Issue #22615: Argument Clinic now supports the "type" argument for the
+ int converter. This permits using the int converter with enums and
+ typedefs.
+
+- Issue #20076: The makelocalealias.py script no longer ignores UTF-8 mapping.
+
+- Issue #20079: The makelocalealias.py script now can parse the SUPPORTED file
+ from glibc sources and supports command line options for source paths.
+
+- Issue #22201: Command-line interface of the zipfile module now correctly
+ extracts ZIP files with directory entries. Patch by Ryan Wilson.
+
+- Issue #22120: For functions using an unsigned integer return converter,
+ Argument Clinic now generates a cast to that type for the comparison
+ to -1 in the generated code. (This supresses a compilation warning.)
+
+- Issue #18974: Tools/scripts/diff.py now uses argparse instead of optparse.
+
+- Issue #21906: Make Tools/scripts/md5sum.py work in Python 3.
+ Patch by Zachary Ware.
+
+- Issue #21629: Fix Argument Clinic's "--converters" feature.
+
- Add support for ``yield from`` to 2to3.
- Add support for the PEP 465 matrix multiplication operator to 2to3.
@@ -2114,6 +4271,32 @@ Tools/Demos
- Issue #20535: PYTHONWARNING no longer affects the run_tests.py script.
Patch by Arfrever Frehtes Taifersar Arahesis.
+Windows
+-------
+
+- Issue #23260: Update Windows installer
+
+- The bundled version of Tcl/Tk has been updated to 8.6.3. The most visible
+ result of this change is the addition of new native file dialogs when
+ running on Windows Vista or newer. See Tcl/Tk's TIP 432 for more
+ information. Also, this version of Tcl/Tk includes support for Windows 10.
+
+- Issue #17896: The Windows build scripts now expect external library sources
+ to be in ``PCbuild\..\externals`` rather than ``PCbuild\..\..``.
+
+- Issue #17717: The Windows build scripts now use a copy of NASM pulled from
+ svn.python.org to build OpenSSL.
+
+- Issue #21907: Improved the batch scripts provided for building Python.
+
+- Issue #22644: The bundled version of OpenSSL has been updated to 1.0.1j.
+
+- Issue #10747: Use versioned labels in the Windows start menu.
+ Patch by Olive Kilburn.
+
+- Issue #22980: .pyd files with a version and platform tag (for example,
+ ".cp35-win32.pyd") will now be loaded in preference to those without tags.
+
What's New in Python 3.4.0?
===========================
@@ -3308,8 +5491,8 @@ Library
- Issue #19448: Add private API to SSL module to lookup ASN.1 objects by OID,
NID, short name and long name.
-- Issue #19282: dbm.open now supports the context management protocol. (Inital
- patch by Claudiu Popa)
+- Issue #19282: dbm.open now supports the context management protocol.
+ (Initial patch by Claudiu Popa)
- Issue #8311: Added support for writing any bytes-like objects in the aifc,
sunau, and wave modules.
@@ -3403,7 +5586,7 @@ Library
- Issue #19227: Remove pthread_atfork() handler. The handler was added to
solve #18747 but has caused issues.
-- Issue #19420: Fix reference leak in module initalization code of
+- Issue #19420: Fix reference leak in module initialization code of
_hashopenssl.c
- Issue #19329: Optimized compiling charsets in regular expressions.
@@ -4417,7 +6600,7 @@ Core and Builtins
- Issue #17173: Remove uses of locale-dependent C functions (isalpha() etc.)
in the interpreter.
-- Issue #17137: When an Unicode string is resized, the internal wide character
+- Issue #17137: When a Unicode string is resized, the internal wide character
string (wstr) format is now cleared.
- Issue #17043: The unicode-internal decoder no longer read past the end of
@@ -4944,7 +7127,7 @@ Library
Thomas Barlow.
- Issue #17358: Modules loaded by imp.load_source() and load_compiled() (and by
- extention load_module()) now have a better chance of working when reloaded.
+ extension load_module()) now have a better chance of working when reloaded.
- Issue #17804: New function ``struct.iter_unpack`` allows for streaming
struct unpacking.
@@ -5057,8 +7240,8 @@ Library
error message has been removed. Patch by Ram Rachum.
- Issue #18080: When building a C extension module on OS X, if the compiler
- is overriden with the CC environment variable, use the new compiler as
- the default for linking if LDSHARED is not also overriden. This restores
+ is overridden with the CC environment variable, use the new compiler as
+ the default for linking if LDSHARED is not also overridden. This restores
Distutils behavior introduced in 3.2.3 and inadvertently dropped in 3.3.0.
- Issue #18113: Fixed a refcount leak in the curses.panel module's
@@ -5265,7 +7448,7 @@ Library
symlinks on POSIX platforms.
- Issue #13773: sqlite3.connect() gets a new `uri` parameter to pass the
- filename as a URI, allowing to pass custom options.
+ filename as a URI, allowing custom options to be passed.
- Issue #16564: Fixed regression relative to Python2 in the operation of
email.encoders.encode_noop when used with binary data.
@@ -5304,7 +7487,7 @@ Library
internal XML encoding is not UTF-8 or US-ASCII. It also now accepts bytes
and strings larger than 2 GiB.
-- Issue #6083: Fix multiple segmentation faults occured when PyArg_ParseTuple
+- Issue #6083: Fix multiple segmentation faults occurred when PyArg_ParseTuple
parses nested mutating sequence.
- Issue #5289: Fix ctypes.util.find_library on Solaris.
@@ -5526,7 +7709,7 @@ Library
- Issue #7719: Make distutils ignore ``.nfs*`` files instead of choking later
on. Initial patch by SilentGhost and Jeff Ramnani.
-- Issue #13120: Allow to call pdb.set_trace() from thread.
+- Issue #13120: Allow calling pdb.set_trace() from thread.
Patch by Ilya Sandler.
- Issue #16585: Make CJK encoders support error handlers that return bytes per
@@ -5627,7 +7810,7 @@ Library
- Issue #16284: Prevent keeping unnecessary references to worker functions
in concurrent.futures ThreadPoolExecutor.
-- Issue #16230: Fix a crash in select.select() when one the lists changes
+- Issue #16230: Fix a crash in select.select() when one of the lists changes
size while iterated on. Patch by Serhiy Storchaka.
- Issue #16228: Fix a crash in the json module where a list changes size
@@ -5656,7 +7839,7 @@ Library
- Issue #16245: Fix the value of a few entities in html.entities.html5.
-- Issue #16301: Fix the localhost verification in urllib/request.py for file://
+- Issue #16301: Fix the localhost verification in urllib/request.py for ``file://``
urls.
- Issue #16250: Fix the invocations of URLError which had misplaced filename
@@ -5687,7 +7870,7 @@ Library
- Issue #16176: Properly identify Windows 8 via platform.platform()
- Issue #16088: BaseHTTPRequestHandler's send_error method includes a
- Content-Length header in it's response now. Patch by Antoine Pitrou.
+ Content-Length header in its response now. Patch by Antoine Pitrou.
- Issue #16114: The subprocess module no longer provides a misleading error
message stating that args[0] did not exist when either the cwd or executable
@@ -6234,6 +8417,10 @@ C-API
Documentation
-------------
+- Issue #23006: Improve the documentation and indexing of dict.__missing__.
+ Add an entry in the language datamodel special methods section.
+ Revise and index its discussion in the stdtypes mapping/dict section.
+
- Issue #17701: Improving strftime documentation.
- Issue #18440: Clarify that `hash()` can truncate the value returned from an
@@ -6396,4141 +8583,4 @@ Windows
- Issue #18569: The installer now adds .py to the PATHEXT variable when extensions
are registered. Patch by Paul Moore.
-
-What's New in Python 3.3.0?
-===========================
-
-*Release date: 29-Sep-2012*
-
-Core and Builtins
------------------
-
-- Issue #16046: Fix loading sourceless legacy .pyo files.
-
-- Issue #16060: Fix refcounting bug when `__trunc__()` returns an object whose
- `__int__()` gives a non-integer. Patch by Serhiy Storchaka.
-
-Extension Modules
------------------
-
-- Issue #16012: Fix a regression in pyexpat. The parser's `UseForeignDTD()`
- method doesn't require an argument again.
-
-
-What's New in Python 3.3.0 Release Candidate 3?
-===============================================
-
-*Release date: 23-Sep-2012*
-
-Core and Builtins
------------------
-
-- Issue #15900: Fix reference leak in `PyUnicode_TranslateCharmap()`.
-
-- Issue #15926: Fix crash after multiple reinitializations of the interpreter.
-
-- Issue #15895: Fix FILE pointer leak in one error branch of
- `PyRun_SimpleFileExFlags()` when filename points to a pyc/pyo file, closeit is
- false an and set_main_loader() fails.
-
-- Fixes for a few crash and memory leak regressions found by Coverity.
-
-Library
--------
-
-- Issue #15882: Change `_decimal` to accept any coefficient tuple when
- constructing infinities. This is done for backwards compatibility with
- decimal.py: Infinity coefficients are undefined in _decimal (in accordance
- with the specification).
-
-- Issue #15925: Fix a regression in `email.util` where the `parsedate()` and
- `parsedate_tz()` functions did not return None anymore when the argument could
- not be parsed.
-
-Extension Modules
------------------
-
-- Issue #15973: Fix a segmentation fault when comparing datetime timezone
- objects.
-
-- Issue #15977: Fix memory leak in Modules/_ssl.c when the function
- _set_npn_protocols() is called multiple times, thanks to Daniel Sommermann.
-
-- Issue #15969: `faulthandler` module: rename dump_tracebacks_later() to
- dump_traceback_later() and cancel_dump_tracebacks_later() to
- cancel_dump_traceback_later().
-
-- _decimal module: use only C 89 style comments.
-
-
-What's New in Python 3.3.0 Release Candidate 2?
-===============================================
-
-*Release date: 09-Sep-2012*
-
-Core and Builtins
------------------
-
-- Issue #13992: The trashcan mechanism is now thread-safe. This eliminates
- sporadic crashes in multi-thread programs when several long deallocator chains
- ran concurrently and involved subclasses of built-in container types.
-
-- Issue #15784: Modify `OSError`.__str__() to better distinguish between errno
- error numbers and Windows error numbers.
-
-- Issue #15781: Fix two small race conditions in import's module locking.
-
-Library
--------
-
-- Issue #17158: Add 'symbols' to help() welcome message; clarify
- 'modules spam' messages.
-
-- Issue #15847: Fix a regression in argparse, which did not accept tuples as
- argument lists anymore.
-
-- Issue #15828: Restore support for C extensions in `imp.load_module()`.
-
-- Issue #15340: Fix importing the random module when ``/dev/urandom`` cannot be
- opened. This was a regression caused by the hash randomization patch.
-
-- Issue #10650: Deprecate the watchexp parameter of the `Decimal.quantize()`
- method.
-
-- Issue #15785: Modify `window.get_wch()` API of the curses module: return a
- character for most keys, and an integer for special keys, instead of always
- returning an integer. So it is now possible to distinguish special keys like
- keypad keys.
-
-- Issue #14223: Fix `window.addch()` of the curses module for special characters
- like curses.ACS_HLINE: the Python function addch(int) and addch(bytes) is now
- calling the C function waddch()/mvwaddch() (as it was done in Python 3.2),
- instead of wadd_wch()/mvwadd_wch(). The Python function addch(str) is still
- calling the C function wadd_wch()/mvwadd_wch() if the Python curses is linked
- to libncursesw.
-
-Build
------
-
-- Issue #15822: Really ensure 2to3 grammar pickles are properly installed
- (replaces fixes for Issue #15645).
-
-Documentation
--------------
-
-- Issue #15814: The memoryview enhancements in 3.3.0 accidentally permitted the
- hashing of multi-dimensional memorviews and memoryviews with multi-byte item
- formats. The intended restrictions have now been documented - they will be
- correctly enforced in 3.3.1.
-
-
-What's New in Python 3.3.0 Release Candidate 1?
-===============================================
-
-*Release date: 25-Aug-2012*
-
-Core and Builtins
------------------
-
-- Issue #15573: memoryview comparisons are now performed by value with full
- support for any valid struct module format definition.
-
-- Issue #15316: When an item in the fromlist for `__import__()` doesn't exist,
- don't raise an error, but if an exception is raised as part of an import do
- let that propagate.
-
-- Issue #15778: Ensure that ``str(ImportError(msg))`` returns a str even when
- msg isn't a str.
-
-- Issue #2051: Source file permission bits are once again correctly copied to
- the cached bytecode file. (The migration to importlib reintroduced this
- problem because these was no regression test. A test has been added as part of
- this patch)
-
-- Issue #15761: Fix crash when ``PYTHONEXECUTABLE`` is set on Mac OS X.
-
-- Issue #15726: Fix incorrect bounds checking in PyState_FindModule. Patch by
- Robin Schreiber.
-
-- Issue #15604: Update uses of `PyObject_IsTrue()` to check for and handle
- errors correctly. Patch by Serhiy Storchaka.
-
-- Issue #14846: `importlib.FileFinder` now handles the case where the directory
- being searched is removed after a previous import attempt.
-
-Library
--------
-
-- Issue #13370: Ensure that ctypes works on Mac OS X when Python is compiled
- using the clang compiler.
-
-- Issue #13072: The array module's 'u' format code is now deprecated and will be
- removed in Python 4.0.
-
-- Issue #15544: Fix Decimal.__float__ to work with payload-carrying NaNs.
-
-- Issue #15776: Allow pyvenv to work in existing directory with --clean.
-
-- Issue #15249: email's BytesGenerator now correctly mangles From lines (when
- requested) even if the body contains undecodable bytes.
-
-- Issue #15777: Fix a refleak in _posixsubprocess.
-
-- Issue ##665194: Update `email.utils.localtime` to use datetime.astimezone and
- correctly handle historic changes in UTC offsets.
-
-- Issue #15199: Fix JavaScript's default MIME type to application/javascript.
- Patch by Bohuslav Kabrda.
-
-- Issue #12643: `code.InteractiveConsole` now respects `sys.excepthook` when
- displaying exceptions. Patch by Aaron Iles.
-
-- Issue #13579: `string.Formatter` now understands the 'a' conversion specifier.
-
-- Issue #15595: Fix ``subprocess.Popen(universal_newlines=True)`` for certain
- locales (utf-16 and utf-32 family). Patch by Chris Jerdonek.
-
-- Issue #15477: In cmath and math modules, add workaround for platforms whose
- system-supplied log1p function doesn't respect signs of zeros.
-
-- Issue #15715: `importlib.__import__()` will silence an ImportError when the
- use of fromlist leads to a failed import.
-
-- Issue #14669: Fix pickling of connections and sockets on Mac OS X by
- sending/receiving an acknowledgment after file descriptor transfer.
- TestPicklingConnection has been reenabled for Mac OS X.
-
-- Issue #11062: Fix adding a message from file to Babyl mailbox.
-
-- Issue #15646: Prevent equivalent of a fork bomb when using `multiprocessing`
- on Windows without the ``if __name__ == '__main__'`` idiom.
-
-IDLE
-----
-
-- Issue #15678: Fix IDLE menus when started from OS X command line (3.3.0b2
- regression).
-
-Documentation
--------------
-
-- Touched up the Python 2 to 3 porting guide.
-
-- Issue #14674: Add a discussion of the `json` module's standard compliance.
- Patch by Chris Rebert.
-
-- Create a 'Concurrent Execution' section in the docs, and split up the
- 'Optional Operating System Services' section to use a more user-centric
- classification scheme (splitting them across the new CE section, IPC and text
- processing). Operating system limitations can be reflected with the Sphinx
- ``:platform:`` tag, it doesn't make sense as part of the Table of Contents.
-
-- Issue #4966: Bring the sequence docs up to date for the Py3k transition and
- the many language enhancements since they were original written.
-
-- The "path importer" misnomer has been replaced with Eric Snow's
- more-awkward-but-at-least-not-wrong suggestion of "path based finder" in the
- import system reference docs.
-
-- Issue #15640: Document `importlib.abc.Finder` as deprecated.
-
-- Issue #15630: Add an example for "continue" stmt in the tutorial. Patch by
- Daniel Ellis.
-
-Tests
------
-
-- Issue #15747: ZFS always returns EOPNOTSUPP when attempting to set the
- UF_IMMUTABLE flag (via either chflags or lchflags); refactor affected tests in
- test_posix.py to account for this.
-
-- Issue #15285: Refactor the approach for testing connect timeouts using two
- external hosts that have been configured specifically for this type of test.
-
-- Issue #15743: Remove the deprecated method usage in `urllib` tests. Patch by
- Jeff Knupp.
-
-- Issue #15615: Add some tests for the `json` module's handling of invalid input
- data. Patch by Kushal Das.
-
-Build
------
-
-- Output lib files for PGO build into PGO directory.
-
-- Pick up 32-bit launcher from PGO directory on 64-bit PGO build.
-
-- Drop ``PC\python_nt.h`` as it's not used. Add input dependency on custom
- build step.
-
-- Issue #15511: Drop explicit dependency on pythonxy.lib from _decimal amd64
- configuration.
-
-- Add missing PGI/PGO configurations for pywlauncher.
-
-- Issue #15645: Ensure 2to3 grammar pickles are properly installed.
-
-
-What's New in Python 3.3.0 Beta 2?
-==================================
-
-*Release date: 12-Aug-2012*
-
-Core and Builtins
------------------
-
-- Issue #15568: Fix the return value of ``yield from`` when StopIteration is
- raised by a custom iterator.
-
-- Issue #13119: `sys.stdout` and `sys.stderr` are now using "\r\n" newline on
- Windows, as Python 2.
-
-- Issue #15534: Fix the fast-search function for non-ASCII Unicode strings.
-
-- Issue #15508: Fix the docstring for `__import__()` to have the proper default
- value of 0 for 'level' and to not mention negative levels since they are not
- supported.
-
-- Issue #15425: Eliminated traceback noise from more situations involving
- importlib.
-
-- Issue #14578: Support modules registered in the Windows registry again.
-
-- Issue #15466: Stop using TYPE_INT64 in marshal, to make importlib.h (and other
- byte code files) equal between 32-bit and 64-bit systems.
-
-- Issue #1692335: Move initial exception args assignment to
- `BaseException.__new__()` to help pickling of naive subclasses.
-
-- Issue #12834: Fix `PyBuffer_ToContiguous()` for non-contiguous arrays.
-
-- Issue #15456: Fix code `__sizeof__()` after #12399 change. Patch by Serhiy
- Storchaka.
-
-- Issue #15404: Refleak in PyMethodObject repr.
-
-- Issue #15394: An issue in `PyModule_Create()` that caused references to be
- leaked on some error paths has been fixed. Patch by Julia Lawall.
-
-- Issue #15368: An issue that caused bytecode generation to be non-deterministic
- has been fixed.
-
-- Issue #15202: Consistently use the name "follow_symlinks" for new parameters
- in os and shutil functions.
-
-- Issue #15314: ``__main__.__loader__`` is now set correctly during interpreter
- startup.
-
-- Issue #15111: When a module imported using 'from import' has an ImportError
- inside itself, don't mask that fact behind a generic ImportError for the
- module itself.
-
-- Issue #15293: Add GC support to the AST base node type.
-
-- Issue #15291: Fix a memory leak where AST nodes where not properly
- deallocated.
-
-- Issue #15110: Fix the tracebacks generated by "import xxx" to not show the
- importlib stack frames.
-
-- Issue #16369: Global PyTypeObjects not initialized with PyType_Ready(...).
-
-- Issue #15020: The program name used to search for Python's path is now
- "python3" under Unix, not "python".
-
-- Issue #15897: zipimport.c doesn't check return value of fseek().
- Patch by Felipe Cruz.
-
-- Issue #15033: Fix the exit status bug when modules invoked using -m switch,
- return the proper failure return value (1). Patch contributed by Jeff Knupp.
-
-- Issue #15229: An `OSError` subclass whose __init__ doesn't call back
- OSError.__init__ could produce incomplete instances, leading to crashes when
- calling str() on them.
-
-- Issue #15307: Virtual environments now use symlinks with framework builds on
- Mac OS X, like other POSIX builds.
-
-Library
--------
-
-- Issue #14590: configparser now correctly strips inline comments when delimiter
- occurs earlier without preceding space.
-
-- Issue #15424: Add a `__sizeof__()` implementation for array objects. Patch by
- Ludwig Hähne.
-
-- Issue #15576: Allow extension modules to act as a package's __init__ module.
-
-- Issue #15502: Have `importlib.invalidate_caches()` work on `sys.meta_path`
- instead of `sys.path_importer_cache`.
-
-- Issue #15163: Pydoc shouldn't list __loader__ as module data.
-
-- Issue #15471: Do not use mutable objects as defaults for
- `importlib.__import__()`.
-
-- Issue #15559: To avoid a problematic failure mode when passed to the bytes
- constructor, objects in the ipaddress module no longer implement `__index__()`
- (they still implement `__int__()` as appropriate).
-
-- Issue #15546: Fix handling of pathological input data in the peek() and
- read1() methods of the BZ2File, GzipFile and LZMAFile classes.
-
-- Issue #12655: Instead of requiring a custom type, `os.sched_getaffinity()` and
- `os.sched_setaffinity()` now use regular sets of integers to represent the
- CPUs a process is restricted to.
-
-- Issue #15538: Fix compilation of the `socket.getnameinfo()` /
- `socket.getaddrinfo()` emulation code. Patch by Philipp Hagemeister.
-
-- Issue #15519: Properly expose WindowsRegistryFinder in importlib (and use the
- correct term for it). Original patch by Eric Snow.
-
-- Issue #15502: Bring the importlib ABCs into line with the current state of the
- import protocols given PEP 420. Original patch by Eric Snow.
-
-- Issue #15499: Launching a webbrowser in Unix used to sleep for a few seconds.
- Original patch by Anton Barkovsky.
-
-- Issue #15463: The faulthandler module truncates strings to 500 characters,
- instead of 100, to be able to display long file paths.
-
-- Issue #6056: Make `multiprocessing` use setblocking(True) on the sockets it
- uses. Original patch by J Derek Wilson.
-
-- Issue #15364: Fix sysconfig.get_config_var('srcdir') to be an absolute path.
-
-- Issue #15413: `os.times()` had disappeared under Windows.
-
-- Issue #15402: An issue in the struct module that caused `sys.getsizeof()` to
- return incorrect results for struct.Struct instances has been fixed. Initial
- patch by Serhiy Storchaka.
-
-- Issue #15232: When mangle_from is True, `email.Generator` now correctly
- mangles lines that start with 'From ' that occur in a MIME preamble or
- epilogue.
-
-- Issue #15094: Incorrectly placed #endif in _tkinter.c. Patch by Serhiy
- Storchaka.
-
-- Issue #13922: `argparse` no longer incorrectly strips '--'s that appear after
- the first one.
-
-- Issue #12353: `argparse` now correctly handles null argument values.
-
-- Issue #10017, issue #14998: Fix TypeError using pprint on dictionaries with
- user-defined types as keys or other unorderable keys.
-
-- Issue #15397: `inspect.getmodulename()` is now based directly on importlib via
- a new `importlib.machinery.all_suffixes()` API.
-
-- Issue #14635: `telnetlib` will use poll() rather than select() when possible to
- avoid failing due to the select() file descriptor limit.
-
-- Issue #15180: Clarify posixpath.join() error message when mixing str & bytes.
-
-- Issue #15343: pkgutil now includes an iter_importer_modules implementation for
- importlib.machinery.FileFinder (similar to the way it already handled
- zipimport.zipimporter).
-
-- Issue #15314: runpy now sets __main__.__loader__ correctly.
-
-- Issue #15357: The import emulation in pkgutil is now deprecated. pkgutil uses
- importlib internally rather than the emulation.
-
-- Issue #15233: Python now guarantees that callables registered with the atexit
- module will be called in a deterministic order.
-
-- Issue #15238: `shutil.copystat()` now copies Linux "extended attributes".
-
-- Issue #15230: runpy.run_path now correctly sets __package__ as described in
- the documentation.
-
-- Issue #15315: Support VS 2010 in distutils cygwincompiler.
-
-- Issue #15294: Fix a regression in pkgutil.extend_path()'s handling of nested
- namespace packages.
-
-- Issue #15056: `imp.cache_from_source()` and `imp.source_from_cache()` raise
- NotImplementedError when `sys.implementation.cache_tag` is set to None.
-
-- Issue #15256: Grammatical mistake in exception raised by `imp.find_module()`.
-
-- Issue #5931: `wsgiref` environ variable SERVER_SOFTWARE will specify an
- implementation specific term like CPython, Jython instead of generic "Python".
-
-- Issue #13248: Remove obsolete argument "max_buffer_size" of BufferedWriter and
- BufferedRWPair, from the io module.
-
-- Issue #13248: Remove obsolete argument "version" of `argparse.ArgumentParser`.
-
-- Issue #14814: Implement more consistent ordering and sorting behaviour for
- ipaddress objects.
-
-- Issue #14814: `ipaddress` network objects correctly return NotImplemented when
- compared to arbitrary objects instead of raising TypeError.
-
-- Issue #14990: Correctly fail with SyntaxError on invalid encoding declaration.
-
-- Issue #14814: `ipaddress` now provides more informative error messages when
- constructing instances directly (changes permitted during beta due to
- provisional API status).
-
-- Issue #15247: `io.FileIO` now raises an error when given a file descriptor
- pointing to a directory.
-
-- Issue #15261: Stop os.stat(fd) crashing on Windows when fd not open.
-
-- Issue #15166: Implement `imp.get_tag()` using `sys.implementation.cache_tag`.
-
-- Issue #15210: Catch KeyError when `importlib.__init__()` can't find
- _frozen_importlib in sys.modules, not ImportError.
-
-- Issue #15030: `importlib.abc.PyPycLoader` now supports the new source size
- header field in .pyc files.
-
-- Issue #5346: Preserve permissions of mbox, MMDF and Babyl mailbox files on
- flush().
-
-- Issue #10571: Fix the "--sign" option of distutils' upload command. Patch by
- Jakub Wilk.
-
-- Issue #9559: If messages were only added, a new file is no longer created and
- renamed over the old file when flush() is called on an mbox, MMDF or Babyl
- mailbox.
-
-- Issue #10924: Fixed `crypt.mksalt()` to use a RNG that is suitable for
- cryptographic purpose.
-
-- Issue #15184: Ensure consistent results of OS X configuration tailoring for
- universal builds by factoring out common OS X-specific customizations from
- sysconfig, distutils.sysconfig, distutils.util, and distutils.unixccompiler
- into a new module _osx_support.
-
-C API
------
-
-- Issue #15610: `PyImport_ImportModuleEx()` now uses a 'level' of 0 instead of -1.
-
-- Issue #15169, issue #14599: Strip out the C implementation of
- `imp.source_from_cache()` used by PyImport_ExecCodeModuleWithPathnames() and
- used the Python code instead. Leads to PyImport_ExecCodeModuleObject() to not
- try to infer the source path from the bytecode path as
- PyImport_ExecCodeModuleWithPathnames() does.
-
-Extension Modules
------------------
-
-- Issue #6493: An issue in ctypes on Windows that caused structure bitfields of
- type `ctypes.c_uint32` and width 32 to incorrectly be set has been fixed.
-
-- Issue #15194: Update libffi to the 3.0.11 release.
-
-IDLE
-----
-
-- Issue #13052: Fix IDLE crashing when replace string in Search/Replace dialog
- ended with ``\``. Patch by Roger Serwy.
-
-Tools/Demos
------------
-
-- Issue #15458: python-config gets a new option --configdir to print the $LIBPL
- value.
-
-- Move importlib.test.benchmark to Tools/importbench.
-
-- Issue #12605: The gdb hooks for debugging CPython (within Tools/gdb) have been
- enhanced to show information on more C frames relevant to CPython within the
- "py-bt" and "py-bt-full" commands:
-
- * C frames that are waiting on the GIL
- * C frames that are garbage-collecting
- * C frames that are due to the invocation of a PyCFunction
-
-Documentation
--------------
-
-- Issue #15041: Update "see also" list in tkinter documentation.
-
-- Issue #15444: Use proper spelling for non-ASCII contributor names. Patch by
- Serhiy Storchaka.
-
-- Issue #15295: Reorganize and rewrite the documentation on the import system.
-
-- Issue #15230: Clearly document some of the limitations of the runpy module and
- nudge readers towards importlib when appropriate.
-
-- Issue #15053: Copy Python 3.3 import lock change notice to all relevant
- functions in imp instead of just at the top of the relevant section.
-
-- Issue #15288: Link to the term "loader" in notes in pkgutil about how things
- won't work as expected in Python 3.3 and mark the requisite functions as
- "changed" since they will no longer work with modules directly imported by
- import itself.
-
-- Issue #13557: Clarify effect of giving two different namespaces to `exec()` or
- `execfile()`.
-
-- Issue #15250: Document that `filecmp.dircmp()` compares files shallowly. Patch
- contributed by Chris Jerdonek.
-
-- Issue #15442: Expose the default list of directories ignored by
- `filecmp.dircmp()` as a module attribute, and expand the list to more modern
- values.
-
-Tests
------
-
-- Issue #15467: Move helpers for `__sizeof__()` tests into test_support. Patch
- by Serhiy Storchaka.
-
-- Issue #15320: Make iterating the list of tests thread-safe when running tests
- in multiprocess mode. Patch by Chris Jerdonek.
-
-- Issue #15168: Move `importlib.test` to `test.test_importlib`.
-
-- Issue #15091: Reactivate a test on UNIX which was failing thanks to a
- forgotten `importlib.invalidate_caches()` call.
-
-- Issue #15230: Adopted a more systematic approach in the runpy tests.
-
-- Issue #15300: Ensure the temporary test working directories are in the same
- parent folder when running tests in multiprocess mode from a Python build.
- Patch by Chris Jerdonek.
-
-- Issue #15284: Skip {send,recv}msg tests in test_socket when IPv6 is not
- enabled. Patch by Brian Brazil.
-
-- Issue #15277: Fix a resource leak in support.py when IPv6 is disabled. Patch
- by Brian Brazil.
-
-Build
------
-
-- Issue #11715: Fix multiarch detection without having Debian development tools
- (dpkg-dev) installed.
-
-- Issue #15037: Build OS X installers with local copy of ncurses 5.9 libraries
- to avoid curses.unget_wch bug present in older versions of ncurses such as
- those shipped with OS X.
-
-- Issue #15560: Fix building _sqlite3 extension on OS X with an SDK. Also, for
- OS X installers, ensure consistent sqlite3 behavior and feature availability
- by building a local copy of libsqlite3 rather than depending on the wide range
- of versions supplied with various OS X releases.
-
-- Issue #8847: Disable COMDAT folding in Windows PGO builds.
-
-- Issue #14018: Fix OS X Tcl/Tk framework checking when using OS X SDKs.
-
-- Issue #16256: OS X installer now sets correct permissions for doc directory.
-
-- Issue #15431: Add _freeze_importlib project to regenerate importlib.h on
- Windows. Patch by Kristján Valur Jónsson.
-
-- Issue #14197: For OS X framework builds, ensure links to the shared library
- are created with the proper ABI suffix.
-
-- Issue #14330: For cross builds, don't use host python, use host search paths
- for host compiler.
-
-- Issue #15235: Allow Berkley DB versions up to 5.3 to build the dbm module.
-
-- Issue #15268: Search curses.h in /usr/include/ncursesw.
-
-
-What's New in Python 3.3.0 Beta 1?
-==================================
-
-*Release date: 27-Jun-2012*
-
-Core and Builtins
------------------
-
-- Fix a (most likely) very rare memory leak when calling main() and not being
- able to decode a command-line argument.
-
-- Issue #14815: Use Py_ssize_t instead of long for the object hash, to
- preserve all 64 bits of hash on Win64.
-
-- Issue #12268: File readline, readlines and read() or readall() methods
- no longer lose data when an underlying read system call is interrupted.
- IOError is no longer raised due to a read system call returning EINTR
- from within these methods.
-
-- Issue #11626: Add _SizeT functions to stable ABI.
-
-- Issue #15142: Fix reference leak when deallocating instances of types
- created using PyType_FromSpec().
-
-- Issue #10053: Don't close FDs when FileIO.__init__ fails. Loosely based on
- the work by Hirokazu Yamamoto.
-
-- Issue #15096: Removed support for ur'' as the raw notation isn't
- compatible with Python 2.x's raw unicode strings.
-
-- Issue #13783: Generator objects now use the identifier APIs internally
-
-- Issue #14874: Restore charmap decoding speed to pre-PEP 393 levels.
- Patch by Serhiy Storchaka.
-
-- Issue #15026: utf-16 encoding is now significantly faster (up to 10x).
- Patch by Serhiy Storchaka.
-
-- Issue #11022: open() and io.TextIOWrapper are now calling
- locale.getpreferredencoding(False) instead of locale.getpreferredencoding()
- in text mode if the encoding is not specified. Don't change temporary the
- locale encoding using locale.setlocale(), use the current locale encoding
- instead of the user preferred encoding.
-
-- Issue #14673: Add Eric Snow's sys.implementation implementation.
-
-- Issue #15038: Optimize python Locks on Windows.
-
-Library
--------
-
-- Issue #12288: Consider '0' and '0.0' as valid initialvalue
- for tkinter SimpleDialog.
-
-- Issue #15512: Add a __sizeof__ implementation for parser.
- Patch by Serhiy Storchaka.
-
-- Issue #15469: Add a __sizeof__ implementation for deque objects.
- Patch by Serhiy Storchaka.
-
-- Issue #15489: Add a __sizeof__ implementation for BytesIO objects.
- Patch by Serhiy Storchaka.
-
-- Issue #15487: Add a __sizeof__ implementation for buffered I/O objects.
- Patch by Serhiy Storchaka.
-
-- Issue #15514: Correct __sizeof__ support for cpu_set.
- Patch by Serhiy Storchaka.
-
-- Issue #15177: Added dir_fd parameter to os.fwalk().
-
-- Issue #15061: Re-implemented hmac.compare_digest() in C to prevent further
- timing analysis and to support all buffer protocol aware objects as well as
- ASCII only str instances safely.
-
-- Issue #15164: Change return value of platform.uname() from a
- plain tuple to a collections.namedtuple.
-
-- Support Mageia Linux in the platform module.
-
-- Issue #11678: Support Arch linux in the platform module.
-
-- Issue #15118: Change return value of os.uname() and os.times() from
- plain tuples to immutable iterable objects with named attributes
- (structseq objects).
-
-- Speed up _decimal by another 10-15% by caching the thread local context
- that was last accessed. In the pi benchmark (64-bit platform, prec=9),
- _decimal is now only 1.5x slower than float.
-
-- Remove the packaging module, which is not ready for prime time.
-
-- Issue #15154: Add "dir_fd" parameter to os.rmdir, remove "rmdir"
- parameter from os.remove / os.unlink.
-
-- Issue #4489: Add a shutil.rmtree that isn't susceptible to symlink attacks.
- It is used automatically on platforms supporting the necessary os.openat()
- and os.unlinkat() functions. Main code by Martin von Löwis.
-
-- Issue #15156: HTMLParser now uses the new "html.entities.html5" dictionary.
-
-- Issue #11113: add a new "html5" dictionary containing the named character
- references defined by the HTML5 standard and the equivalent Unicode
- character(s) to the html.entities module.
-
-- Issue #15114: the strict mode of HTMLParser and the HTMLParseError exception
- are deprecated now that the parser is able to parse invalid markup.
-
-- Issue #3665: \u and \U escapes are now supported in unicode regular
- expressions. Patch by Serhiy Storchaka.
-
-- Issue #15153: Added inspect.getgeneratorlocals to simplify white box
- testing of generator state updates
-
-- Issue #13062: Added inspect.getclosurevars to simplify testing stateful
- closures
-
-- Issue #11024: Fixes and additional tests for Time2Internaldate.
-
-- Issue #14626: Large refactoring of functions / parameters in the os module.
- Many functions now support "dir_fd" and "follow_symlinks" parameters;
- some also support accepting an open file descriptor in place of a path
- string. Added os.support_* collections as LBYL helpers. Removed many
- functions only previously seen in 3.3 alpha releases (often starting with
- "f" or "l", or ending with "at"). Originally suggested by Serhiy Storchaka;
- implemented by Larry Hastings.
-
-- Issue #15008: Implement PEP 362 "Signature Objects".
- Patch by Yury Selivanov.
-
-- Issue: #15138: base64.urlsafe_{en,de}code() are now 3-4x faster.
-
-- Issue #444582: Add shutil.which, for finding programs on the system path.
- Original patch by Erik Demaine, with later iterations by Jan Killian
- and Brian Curtin.
-
-- Issue #14837: SSL errors now have ``library`` and ``reason`` attributes
- describing precisely what happened and in which OpenSSL submodule. The
- str() of a SSLError is also enhanced accordingly.
-
-- Issue #9527: datetime.astimezone() method will now supply a class
- timezone instance corresponding to the system local timezone when
- called with no arguments.
-
-- Issue #14653: email.utils.mktime_tz() no longer relies on system
- mktime() when timezone offest is supplied.
-
-- Issue #14684: zlib.compressobj() and zlib.decompressobj() now support the use
- of predefined compression dictionaries. Original patch by Sam Rushing.
-
-- Fix GzipFile's handling of filenames given as bytes objects.
-
-- Issue #14772: Return destination values from some shutil functions.
-
-- Issue #15064: Implement context manager protocol for multiprocessing types
-
-- Issue #15101: Make pool finalizer avoid joining current thread.
-
-- Issue #14657: The frozen instance of importlib used for bootstrap is now
- also the module imported as importlib._bootstrap.
-
-- Issue #14055: Add __sizeof__ support to _elementtree.
-
-- Issue #15054: A bug in tokenize.tokenize that caused string literals
- with 'b' prefixes to be incorrectly tokenized has been fixed.
- Patch by Serhiy Storchaka.
-
-- Issue #15006: Allow equality comparison between naive and aware
- time or datetime objects.
-
-- Issue #15036: Mailbox no longer throws an error if a flush is done
- between operations when removing or changing multiple items in mbox,
- MMDF, or Babyl mailboxes.
-
-- Issue #14059: Implement multiprocessing.Barrier.
-
-- Issue #15061: The inappropriately named hmac.secure_compare has been
- renamed to hmac.compare_digest, restricted to operating on bytes inputs
- only and had its documentation updated to more accurately reflect both its
- intent and its limitations
-
-- Issue #13841: Make child processes exit using sys.exit() on Windows.
-
-- Issue #14936: curses_panel was converted to PEP 3121 and PEP 384 API.
- Patch by Robin Schreiber.
-
-- Issue #1667546: On platforms supporting tm_zone and tm_gmtoff fields
- in struct tm, time.struct_time objects returned by time.gmtime(),
- time.localtime() and time.strptime() functions now have tm_zone and
- tm_gmtoff attributes. Original patch by Paul Boddie.
-
-- Rename adjusted attribute to adjustable in time.get_clock_info() result.
-
-- Issue #3518: Remove references to non-existent BaseManager.from_address()
- method.
-
-- Issue #13857: Added textwrap.indent() function (initial patch by Ezra
- Berch)
-
-- Issue #2736: Added datetime.timestamp() method.
-
-- Issue #13854: Make multiprocessing properly handle non-integer
- non-string argument to SystemExit.
-
-- Issue #12157: Make pool.map() empty iterables correctly. Initial
- patch by mouad.
-
-- Issue #11823: disassembly now shows argument counts on calls with keyword args.
-
-- Issue #14711: os.stat_float_times() has been deprecated.
-
-- LZMAFile now accepts the modes "rb"/"wb"/"ab" as synonyms of "r"/"w"/"a".
-
-- The bz2 and lzma modules now each contain an open() function, allowing
- compressed files to readily be opened in text mode as well as binary mode.
-
-- BZ2File.__init__() and LZMAFile.__init__() now accept a file object as their
- first argument, rather than requiring a separate "fileobj" argument.
-
-- gzip.open() now accepts file objects as well as filenames.
-
-- Issue #14992: os.makedirs(path, exist_ok=True) would raise an OSError
- when the path existed and had the S_ISGID mode bit set when it was
- not explicitly asked for. This is no longer an exception as mkdir
- cannot control if the OS sets that bit for it or not.
-
-- Issue #14989: Make the CGI enable option to http.server available via command
- line.
-
-- Issue #14987: Add a missing import statement to inspect.
-
-- Issue #1079: email.header.decode_header now correctly parses all the examples
- in RFC2047. There is a necessary visible behavior change: the leading and/or
- trailing whitespace on ASCII parts is now preserved.
-
-- Issue #14969: Better handling of exception chaining in contextlib.ExitStack
-
-- Issue #14963: Convert contextlib.ExitStack.__exit__ to use an iterative
- algorithm (Patch by Alon Horev)
-
-- Issue #14785: Add sys._debugmallocstats() to help debug low-level memory
- allocation issues
-
-- Issue #14443: Ensure that .py files are byte-compiled with the correct Python
- executable within bdist_rpm even on older versions of RPM
-
-C-API
------
-
-- Issue #15146: Add PyType_FromSpecWithBases. Patch by Robin Schreiber.
-
-- Issue #15042: Add PyState_AddModule and PyState_RemoveModule. Add version
- guard for Py_LIMITED_API additions. Patch by Robin Schreiber.
-
-- Issue #13783: Inadvertent additions to the public C API in the PEP 380
- implementation have either been removed or marked as private interfaces.
-
-Extension Modules
------------------
-
-- Issue #15000: Support the "unique" x32 architecture in _posixsubprocess.c.
-
-IDLE
-----
-
-- Issue #9803: Don't close IDLE on saving if breakpoint is open.
- Patch by Roger Serwy.
-
-- Issue #14962: Update text coloring in IDLE shell window after changing
- options. Patch by Roger Serwy.
-
-Documentation
--------------
-
-- Issue #15176: Clarified behavior, documentation, and implementation
- of os.listdir().
-
-- Issue #14982: Document that pkgutil's iteration functions require the
- non-standard iter_modules() method to be defined by an importer (something
- the importlib importers do not define).
-
-- Issue #15081: Document PyState_FindModule.
- Patch by Robin Schreiber.
-
-- Issue #14814: Added first draft of ipaddress module API reference
-
-Tests
------
-
-- Issue #15187: Bugfix: remove temporary directories test_shutil was leaving
- behind.
-
-- Issue #14769: test_capi now has SkipitemTest, which cleverly checks
- for "parity" between PyArg_ParseTuple() and the Python/getargs.c static
- function skipitem() for all possible "format units".
-
-- test_nntplib now tolerates being run from behind NNTP gateways that add
- "X-Antivirus" headers to articles
-
-- Issue #15043: test_gdb is now skipped entirely if gdb security settings
- block loading of the gdb hooks
-
-- Issue #14963: Add test cases for exception handling behaviour
- in contextlib.ExitStack (Initial patch by Alon Horev)
-
-Build
------
-
-- Issue #13590: Improve support for OS X Xcode 4:
- * Try to avoid building Python or extension modules with problematic
- llvm-gcc compiler.
- * Since Xcode 4 removes ppc support, extension module builds now
- check for ppc compiler support and automatically remove ppc and
- ppc64 archs when not available.
- * Since Xcode 4 no longer install SDKs in default locations,
- extension module builds now revert to using installed headers
- and libs if the SDK used to build the interpreter is not
- available.
- * Update ./configure to use better defaults for universal builds;
- in particular, --enable-universalsdk=yes uses the Xcode default
- SDK and --with-universal-archs now defaults to "intel" if ppc
- not available.
-
-- Issue #14225: Fix Unicode support for curses (#12567) on OS X
-
-- Issue #14928: Fix importlib bootstrap issues by using a custom executable
- (Modules/_freeze_importlib) to build Python/importlib.h.
-
-
-What's New in Python 3.3.0 Alpha 4?
-===================================
-
-*Release date: 31-May-2012*
-
-Core and Builtins
------------------
-
-- Issue #14835: Make plistlib output empty arrays & dicts like OS X.
- Patch by Sidney San Martín.
-
-- Issue #14744: Use the new _PyUnicodeWriter internal API to speed up
- str%args and str.format(args).
-
-- Issue #14930: Make memoryview objects weakrefable.
-
-- Issue #14775: Fix a potential quadratic dict build-up due to the garbage
- collector repeatedly trying to untrack dicts.
-
-- Issue #14857: fix regression in references to PEP 3135 implicit __class__
- closure variable (Reopens issue #12370)
-
-- Issue #14712 (PEP 405): Virtual environments. Implemented by Vinay Sajip.
-
-- Issue #14660 (PEP 420): Namespace packages. Implemented by Eric Smith.
-
-- Issue #14494: Fix __future__.py and its documentation to note that
- absolute imports are the default behavior in 3.0 instead of 2.7.
- Patch by Sven Marnach.
-
-- Issue #9260: A finer-grained import lock. Most of the import sequence
- now uses per-module locks rather than the global import lock, eliminating
- well-known issues with threads and imports.
-
-- Issue #14624: UTF-16 decoding is now 3x to 4x faster on various inputs.
- Patch by Serhiy Storchaka.
-
-- asdl_seq and asdl_int_seq are now Py_ssize_t sized.
-
-- Issue #14133 (PEP 415): Implement suppression of __context__ display with an
- attribute on BaseException. This replaces the original mechanism of PEP 409.
-
-- Issue #14417: Mutating a dict during lookup now restarts the lookup instead
- of raising a RuntimeError (undoes issue #14205).
-
-- Issue #14738: Speed-up UTF-8 decoding on non-ASCII data. Patch by Serhiy
- Storchaka.
-
-- Issue #14700: Fix two broken and undefined-behaviour-inducing overflow checks
- in old-style string formatting.
-
-Library
--------
-
-- Issue #14690: Use monotonic clock instead of system clock in the sched,
- subprocess and trace modules.
-
-- Issue #14443: Tell rpmbuild to use the correct version of Python in
- bdist_rpm. Initial patch by Ross Lagerwall.
-
-- Issue #12515: email now registers a defect if it gets to EOF while parsing
- a MIME part without seeing the closing MIME boundary.
-
-- Issue #1672568: email now always decodes base64 payloads, adding padding and
- ignoring non-base64-alphabet characters if needed, and registering defects
- for any such problems.
-
-- Issue #14925: email now registers a defect when the parser decides that there
- is a missing header/body separator line. MalformedHeaderDefect, which the
- existing code would never actually generate, is deprecated.
-
-- Issue #10365: File open dialog now works instead of crashing even when
- the parent window is closed before the dialog. Patch by Roger Serwy.
-
-- Issue #8739: Updated smtpd to support RFC 5321, and added support for the
- RFC 1870 SIZE extension.
-
-- Issue #665194: Added a localtime function to email.utils to provide an
- aware local datetime for use in setting Date headers.
-
-- Issue #12586: Added new provisional policies that implement convenient
- unicode support for email headers. See What's New for details.
-
-- Issue #14731: Refactored email Policy framework to support full backward
- compatibility with Python 3.2 by default yet allow for the introduction of
- new features through new policies. Note that Policy.must_be_7bit is renamed
- to cte_type.
-
-- Issue #14876: Use user-selected font for highlight configuration.
-
-- Issue #14920: Fix the help(urllib.parse) failure on locale C on terminals.
- Have ascii characters in help.
-
-- Issue #14548: Make multiprocessing finalizers check pid before
- running to cope with possibility of gc running just after fork.
-
-- Issue #14036: Add an additional check to validate that port in urlparse does
- not go in illegal range and returns None.
-
-- Issue #14862: Add missing names to os.__all__
-
-- Issue #14875: Use float('inf') instead of float('1e66666') in the json module.
-
-- Issue #13585: Added contextlib.ExitStack
-
-- PEP 3144, Issue #14814: Added the ipaddress module
-
-- Issue #14426: Correct the Date format in Expires attribute of Set-Cookie
- Header in Cookie.py.
-
-- Issue #14588: The types module now provide new_class() and prepare_class()
- functions to support PEP 3115 compliant dynamic class creation. Patch by
- Daniel Urban and Nick Coghlan.
-
-- Issue #13152: Allow to specify a custom tabsize for expanding tabs in
- textwrap. Patch by John Feuerstein.
-
-- Issue #14721: Send the correct 'Content-length: 0' header when the body is an
- empty string ''. Initial Patch contributed by Arve Knudsen.
-
-- Issue #14072: Fix parsing of 'tel' URIs in urlparse by making the check for
- ports stricter.
-
-- Issue #9374: Generic parsing of query and fragment portions of url for any
- scheme. Supported both by RFC3986 and RFC2396.
-
-- Issue #14798: Fix the functions in pyclbr to raise an ImportError
- when the first part of a dotted name is not a package. Patch by
- Xavier de Gaye.
-
-- Issue #12098: multiprocessing on Windows now starts child processes
- using the same sys.flags as the current process. Initial patch by
- Sergey Mezentsev.
-
-- Issue #13031: Small speed-up for tarfile when unzipping tarfiles.
- Patch by Justin Peel.
-
-- Issue #14780: urllib.request.urlopen() now has a ``cadefault`` argument
- to use the default certificate store. Initial patch by James Oakley.
-
-- Issue #14829: Fix bisect and range() indexing with large indices
- (>= 2 ** 32) under 64-bit Windows.
-
-- Issue #14732: The _csv module now uses PEP 3121 module initialization.
- Patch by Robin Schreiber.
-
-- Issue #14809: Add HTTP status codes introduced by RFC 6585 to http.server
- and http.client. Patch by EungJun Yi.
-
-- Issue #14777: tkinter may return undecoded UTF-8 bytes as a string when
- accessing the Tk clipboard. Modify clipboad_get() to first request type
- UTF8_STRING when no specific type is requested in an X11 windowing
- environment, falling back to the current default type STRING if that fails.
- Original patch by Thomas Kluyver.
-
-- Issue #14773: Fix os.fwalk() failing on dangling symlinks.
-
-- Issue #12541: Be lenient with quotes around Realm field of HTTP Basic
- Authentation in urllib2.
-
-- Issue #14807: move undocumented tarfile.filemode() to stat.filemode() and add
- doc entry. Add tarfile.filemode alias with deprecation warning.
-
-- Issue #13815: TarFile.extractfile() now returns io.BufferedReader objects.
-
-- Issue #14532: Add a secure_compare() helper to the hmac module, to mitigate
- timing attacks. Patch by Jon Oberheide.
-
-- Add importlib.util.resolve_name().
-
-- Issue #14366: Support lzma compression in zip files.
- Patch by Serhiy Storchaka.
-
-- Issue #13959: Introduce importlib.find_loader() and document
- imp.find_module/load_module as deprecated.
-
-- Issue #14082: shutil.copy2() now copies extended attributes, if possible.
- Patch by Hynek Schlawack.
-
-- Issue #13959: Make importlib.abc.FileLoader.load_module()/get_filename() and
- importlib.machinery.ExtensionFileLoader.load_module() have their single
- argument be optional. Allows for the replacement (and thus deprecation) of
- imp.load_source()/load_package()/load_compiled().
-
-- Issue #13959: imp.get_suffixes() has been deprecated in favour of the new
- attributes on importlib.machinery: SOURCE_SUFFIXES, DEBUG_BYTECODE_SUFFIXES,
- OPTIMIZED_BYTECODE_SUFFIXES, BYTECODE_SUFFIXES, and EXTENSION_SUFFIXES. This
- led to an indirect deprecation of inspect.getmoduleinfo().
-
-- Issue #14662: Prevent shutil failures on OS X when destination does not
- support chflag operations. Patch by Hynek Schlawack.
-
-- Issue #14157: Fix time.strptime failing without a year on February 29th.
- Patch by Hynek Schlawack.
-
-- Issue #14753: Make multiprocessing's handling of negative timeouts
- the same as it was in Python 3.2.
-
-- Issue #14583: Fix importlib bug when a package's __init__.py would first
- import one of its modules then raise an error.
-
-- Issue #14741: Fix missing support for Ellipsis ('...') in parser module.
-
-- Issue #14697: Fix missing support for set displays and set comprehensions in
- parser module.
-
-- Issue #14701: Fix missing support for 'raise ... from' in parser module.
-
-- Add support for timeouts to the acquire() methods of
- multiprocessing's lock/semaphore/condition proxies.
-
-- Issue #13989: Add support for text mode to gzip.open().
-
-- Issue #14127: The os.stat() result object now provides three additional
- fields: st_ctime_ns, st_mtime_ns, and st_atime_ns, providing those times as an
- integer with nanosecond resolution. The functions os.utime(), os.lutimes(),
- and os.futimes() now accept a new parameter, ns, which accepts mtime and atime
- as integers with nanosecond resolution.
-
-- Issue #14127 and #10148: shutil.copystat now preserves exact mtime and atime
- on filesystems providing nanosecond resolution.
-
-IDLE
-----
-
-- Issue #14958: Change IDLE systax highlighting to recognize all string and
- byte literals supported in Python 3.3.
-
-- Issue #10997: Prevent a duplicate entry in IDLE's "Recent Files" menu.
-
-- Issue #14929: Stop IDLE 3.x from closing on Unicode decode errors when
- grepping. Patch by Roger Serwy.
-
-- Issue #12510: Attempting to get invalid tooltip no longer closes IDLE.
- Other tooltipss have been corrected or improved and the number of tests
- has been tripled. Original patch by Roger Serwy.
-
-Tools/Demos
------------
-
-- Issue #14695: Bring Tools/parser/unparse.py support up to date with
- the Python 3.3 Grammar.
-
-Build
------
-
-- Issue #14472: Update .gitignore. Patch by Matej Cepl.
-
-- Upgrade Windows library versions: bzip 1.0.6, OpenSSL 1.0.1c.
-
-- Issue #14693: Under non-Windows platforms, hashlib's fallback modules are
- always compiled, even if OpenSSL is present at build time.
-
-- Issue #13210: Windows build now uses VS2010, ported from VS2008.
-
-C-API
------
-
-- Issue #14705: The PyArg_Parse() family of functions now support the 'p' format
- unit, which accepts a "boolean predicate" argument. It converts any Python
- value into an integer--0 if it is "false", and 1 otherwise.
-
-Documentation
--------------
-
-- Issue #14863: Update the documentation of os.fdopen() to reflect the
- fact that it's only a thin wrapper around open() anymore.
-
-- Issue #14588: The language reference now accurately documents the Python 3
- class definition process. Patch by Nick Coghlan.
-
-- Issue #14943: Correct a default argument value for winreg.OpenKey
- and correctly list the argument names in the function's explanation.
-
-
-What's New in Python 3.3.0 Alpha 3?
-===================================
-
-*Release date: 01-May-2012*
-
-Core and Builtins
------------------
-
-- Issue #14699: Fix calling the classmethod descriptor directly.
-
-- Issue #14433: Prevent msvcrt crash in interactive prompt when stdin is closed.
-
-- Issue #14521: Make result of float('nan') and float('-nan') more consistent
- across platforms.
-
-- Issue #14646: __import__() sets __loader__ if the loader did not.
-
-- Issue #14605: No longer have implicit entries in sys.meta_path. If
- sys.meta_path is found to be empty, raise ImportWarning.
-
-- Issue #14605: No longer have implicit entries in sys.path_hooks. If
- sys.path_hooks is found to be empty, a warning will be raised. None is now
- inserted into sys.path_importer_cache if no finder was discovered. This also
- means imp.NullImporter is no longer implicitly used.
-
-- Issue #13903: Implement PEP 412. Individual dictionary instances can now share
- their keys with other dictionaries. Classes take advantage of this to share
- their instance dictionary keys for improved memory and performance.
-
-- Issue #11603 (again): Setting __repr__ to __str__ now raises a RuntimeError
- when repr() or str() is called on such an object.
-
-- Issue #14658: Fix binding a special method to a builtin implementation of a
- special method with a different name.
-
-- Issue #14630: Fix a memory access bug for instances of a subclass of int
- with value 0.
-
-- Issue #14339: Speed improvements to bin, oct and hex functions. Patch by
- Serhiy Storchaka.
-
-- Issue #14385: It is now possible to use a custom type for the __builtins__
- namespace, instead of a dict. It can be used for sandboxing for example.
- Raise also a NameError instead of ImportError if __build_class__ name if not
- found in __builtins__.
-
-- Issue #12599: Be more strict in accepting None compared to a false-like
- object for importlib.util.module_for_loader and
- importlib.machinery.PathFinder.
-
-- Issue #14612: Fix jumping around with blocks by setting f_lineno.
-
-- Issue #14592: Attempting a relative import w/o __package__ or __name__ set in
- globals raises a KeyError.
-
-- Issue #14607: Fix keyword-only arguments which started with ``__``.
-
-- Issue #10854: The ImportError raised when an extension module on Windows
- fails to import now uses the new path and name attributes from
- Issue #1559549.
-
-- Issue #13889: Check and (if necessary) set FPU control word before calling
- any of the dtoa.c string <-> float conversion functions, on MSVC builds of
- Python. This fixes issues when embedding Python in a Delphi app.
-
-- __import__() now matches PEP 328 and documentation by defaulting 'index' to 0
- instead of -1 and removing support for negative values.
-
-- Issue #2377: Make importlib the implementation of __import__().
-
-- Issue #1559549: ImportError now has 'name' and 'path' attributes that are set
- using keyword arguments to its constructor. They are currently not set by
- import as they are meant for use by importlib.
-
-- Issue #14474: Save and restore exception state in thread.start_new_thread()
- while writing error message if the thread leaves a unhandled exception.
-
-- Issue #13019: Fix potential reference leaks in bytearray.extend(). Patch
- by Suman Saha.
-
-Library
--------
-
-- Issue #14768: os.path.expanduser('~/a') doesn't works correctly when HOME is '/'.
-
-- Issue #14371: Support bzip2 in zipfile module. Patch by Serhiy Storchaka.
-
-- Issue #13183: Fix pdb skipping frames after hitting a breakpoint and running
- step. Patch by Xavier de Gaye.
-
-- Issue #14696: Fix parser module to understand 'nonlocal' declarations.
-
-- Issue #10941: Fix imaplib.Internaldate2tuple to produce correct result near
- the DST transition. Patch by Joe Peterson.
-
-- Issue #9154: Fix parser module to understand function annotations.
-
-- Issue #6085: In http.server.py SimpleHTTPServer.address_string returns the
- client ip address instead client hostname. Patch by Charles-François Natali.
-
-- Issue #14309: Deprecate time.clock(), use time.perf_counter() or
- time.process_time() instead.
-
-- Issue #14428: Implement the PEP 418. Add time.get_clock_info(),
- time.perf_counter() and time.process_time() functions, and rename
- time.steady() to time.monotonic().
-
-- Issue #14646: importlib.util.module_for_loader() now sets __loader__ and
- __package__ (when possible).
-
-- Issue #14664: It is now possible to use @unittest.skip{If,Unless} on a
- test class that doesn't inherit from TestCase (i.e. a mixin).
-
-- Issue #4892: multiprocessing Connections can now be transferred over
- multiprocessing Connections. Patch by Richard Oudkerk (sbt).
-
-- Issue #14160: TarFile.extractfile() failed to resolve symbolic links when
- the links were not located in an archive subdirectory.
-
-- Issue #14638: pydoc now treats non-string __name__ values as if they
- were missing, instead of raising an error.
-
-- Issue #13684: Fix httplib tunnel issue of infinite loops for certain sites
- which send EOF without trailing \r\n.
-
-- Issue #14605: Add importlib.abc.FileLoader, importlib.machinery.(FileFinder,
- SourceFileLoader, SourcelessFileLoader, ExtensionFileLoader).
-
-- Issue #13959: imp.cache_from_source()/source_from_cache() now follow
- os.path.join()/split() semantics for path manipulation instead of its prior,
- custom semantics of caring the right-most path separator forward in path
- joining.
-
-- Issue #2193: Allow ":" character in Cookie NAME values.
-
-- Issue #14629: tokenizer.detect_encoding will specify the filename in the
- SyntaxError exception if found at readline.__self__.name.
-
-- Issue #14629: Raise SyntaxError in tokenizer.detect_encoding if the
- first two lines have non-UTF-8 characters without an encoding declaration.
-
-- Issue #14308: Fix an exception when a "dummy" thread is in the threading
- module's active list after a fork().
-
-- Issue #11750: The Windows API functions scattered in the _subprocess and
- _multiprocessing.win32 modules now live in a single module "_winapi".
- Patch by sbt.
-
-- Issue #14087: multiprocessing: add Condition.wait_for(). Patch by sbt.
-
-- Issue #14538: HTMLParser can now parse correctly start tags that contain
- a bare '/'.
-
-- Issue #14452: SysLogHandler no longer inserts a UTF-8 BOM into the message.
-
-- Issue #14386: Expose the dict_proxy internal type as types.MappingProxyType.
-
-- Issue #13959: Make imp.reload() always use a module's __loader__ to perform
- the reload.
-
-- Issue #13959: Add imp.py and rename the built-in module to _imp, allowing for
- re-implementing parts of the module in pure Python.
-
-- Issue #13496: Fix potential overflow in bisect.bisect algorithm when applied
- to a collection of size > sys.maxsize / 2.
-
-- Have importlib take advantage of ImportError's new 'name' and 'path'
- attributes.
-
-- Issue #14399: zipfile now recognizes that the archive has been modified even
- if only the comment is changed. In addition, the TypeError that results from
- trying to set a non-binary value as a comment is now raised at the time
- the comment is set rather than at the time the zipfile is written.
-
-- trace.CoverageResults.is_ignored_filename() now ignores any name that starts
- with "<" and ends with ">" instead of special-casing "<string>" and
- "<doctest ".
-
-- Issue #12537: The mailbox module no longer depends on knowledge of internal
- implementation details of the email package Message object.
-
-- Issue #7978: socketserver now restarts the select() call when EINTR is
- returned. This avoids crashing the server loop when a signal is received.
- Patch by Jerzy Kozera.
-
-- Issue #14522: Avoid duplicating socket handles in multiprocessing.connection.
- Patch by sbt.
-
-- Don't Py_DECREF NULL variable in io.IncrementalNewlineDecoder.
-
-- Issue #3033: Add displayof parameter to tkinter font. Patch by Guilherme Polo.
-
-- Issue #14482: Raise a ValueError, not a NameError, when trying to create
- a multiprocessing Client or Listener with an AF_UNIX type address under
- Windows. Patch by Popa Claudiu.
-
-- Issue #802310: Generate always unique tkinter font names if not directly passed.
-
-- Issue #14151: Raise a ValueError, not a NameError, when trying to create
- a multiprocessing Client or Listener with an AF_PIPE type address under
- non-Windows platforms. Patch by Popa Claudiu.
-
-- Issue #14493: Use gvfs-open or xdg-open in webbrowser.
-
-Build
------
-
-- "make touch" will now touch generated files that are checked into Mercurial,
- after a "hg update" which failed to bring the timestamps into the right order.
-
-Tests
------
-
-- Issue #14026: In test_cmd_line_script, check that sys.argv is populated
- correctly for the various invocation approaches (Patch by Jason Yeo)
-
-- Issue #14032: Fix incorrect variable name in test_cmd_line_script debugging
- message (Patch by Jason Yeo)
-
-- Issue #14589: Update certificate chain for sha256.tbs-internet.com, fixing
- a test failure in test_ssl.
-
-- Issue #14355: Regrtest now supports the standard unittest test loading, and
- will use it if a test file contains no `test_main` method.
-
-IDLE
-----
-
-- Issue #8515: Set __file__ when run file in IDLE.
- Initial patch by Bruce Frederiksen.
-
-- Issue #14496: Fix wrong name in idlelib/tabbedpages.py.
- Patch by Popa Claudiu.
-
-Tools / Demos
--------------
-
-- Issue #3561: The Windows installer now has an option, off by default, for
- placing the Python installation into the system "Path" environment variable.
-
-- Issue #13165: stringbench is now available in the Tools/stringbench folder.
- It used to live in its own SVN project.
-
-C-API
------
-
-- Issue #14098: New functions PyErr_GetExcInfo and PyErr_SetExcInfo.
- Patch by Stefan Behnel.
-
-
-What's New in Python 3.3.0 Alpha 2?
-===================================
-
-*Release date: 01-Apr-2012*
-
-Core and Builtins
------------------
-
-- Issue #1683368: object.__new__ and object.__init__ raise a TypeError if they
- are passed arguments and their complementary method is not overridden.
-
-- Issue #14378: Fix compiling ast.ImportFrom nodes with a "__future__" string as
- the module name that was not interned.
-
-- Issue #14331: Use significantly less stack space when importing modules by
- allocating path buffers on the heap instead of the stack.
-
-- Issue #14334: Prevent in a segfault in type.__getattribute__ when it was not
- passed strings.
-
-- Issue #1469629: Allow cycles through an object's __dict__ slot to be
- collected. (For example if ``x.__dict__ is x``).
-
-- Issue #14205: dict lookup raises a RuntimeError if the dict is modified
- during a lookup.
-
-- Issue #14220: When a generator is delegating to another iterator with the
- yield from syntax, it needs to have its ``gi_running`` flag set to True.
-
-- Issue #14435: Remove dedicated block allocator from floatobject.c and rely
- on the PyObject_Malloc() api like all other objects.
-
-- Issue #14471: Fix a possible buffer overrun in the winreg module.
-
-- Issue #14288: Allow the serialization of builtin iterators
-
-Library
--------
-
-- Issue #14300: Under Windows, sockets created using socket.dup() now allow
- overlapped I/O. Patch by sbt.
-
-- Issue #13872: socket.detach() now marks the socket closed (as mirrored
- in the socket repr()). Patch by Matt Joiner.
-
-- Issue #14406: Fix a race condition when using ``concurrent.futures.wait(
- return_when=ALL_COMPLETED)``. Patch by Matt Joiner.
-
-- Issue #5136: deprecate old, unused functions from tkinter.
-
-- Issue #14416: syslog now defines the LOG_ODELAY and LOG_AUTHPRIV constants
- if they are defined in <syslog.h>.
-
-- Issue #14295: Add unittest.mock
-
-- Issue #7652: Add --with-system-libmpdec option to configure for linking
- the _decimal module against an installed libmpdec.
-
-- Issue #14380: MIMEText now defaults to utf-8 when passed non-ASCII unicode
- with no charset specified.
-
-- Issue #10340: asyncore - properly handle EINVAL in dispatcher constructor on
- OSX; avoid to call handle_connect in case of a disconnected socket which
- was not meant to connect.
-
-- Issue #14204: The ssl module now has support for the Next Protocol
- Negotiation extension, if available in the underlying OpenSSL library.
- Patch by Colin Marc.
-
-- Issue #3035: Unused functions from tkinter are marked as pending deprecated.
-
-- Issue #12757: Fix the skipping of doctests when python is run with -OO so
- that it works in unittest's verbose mode as well as non-verbose mode.
-
-- Issue #7652: Integrate the decimal floating point libmpdec library to speed
- up the decimal module. Performance gains of the new C implementation are
- between 10x and 100x, depending on the application.
-
-- Issue #14269: SMTPD now conforms to the RFC and requires a HELO command
- before MAIL, RCPT, or DATA.
-
-- Issue #13694: asynchronous connect in asyncore.dispatcher does not set addr
- attribute.
-
-- Issue #14344: fixed the repr of email.policy objects.
-
-- Issue #11686: Added missing entries to email package __all__ lists
- (mostly the new Bytes classes).
-
-- Issue #14335: multiprocessing's custom Pickler subclass now inherits from
- the C-accelerated implementation. Patch by sbt.
-
-- Issue #10484: Fix the CGIHTTPServer's PATH_INFO handling problem.
-
-- Issue #11199: Fix the with urllib which hangs on particular ftp urls.
-
-- Improve the memory utilization and speed of functools.lru_cache.
-
-- Issue #14222: Use the new time.steady() function instead of time.time() for
- timeout in queue and threading modules to not be affected of system time
- update.
-
-- Issue #13248: Remove lib2to3.pytree.Base.get_prefix/set_prefix.
-
-- Issue #14234: CVE-2012-0876: Randomize hashes of xml attributes in the hash
- table internal to the pyexpat module's copy of the expat library to avoid a
- denial of service due to hash collisions. Patch by David Malcolm with some
- modifications by the expat project.
-
-- Issue #12818: format address no longer needlessly \ escapes ()s in names when
- the name ends up being quoted.
-
-- Issue #14062: BytesGenerator now correctly folds Header objects,
- including using linesep when folding.
-
-- Issue #13839: When invoked on the command-line, the pstats module now
- accepts several filenames of profile stat files and merges them all.
- Patch by Matt Joiner.
-
-- Issue #14291: Email now defaults to utf-8 for non-ASCII unicode headers
- instead of raising an error. This fixes a regression relative to 2.7.
-
-- Issue #989712: Support using Tk without a mainloop.
-
-- Issue #3835: Refuse to use unthreaded Tcl in threaded Python.
-
-- Issue #2843: Add new Tk API to Tkinter.
-
-- Issue #14184: Increase the default stack size for secondary threads on
- Mac OS X to avoid interpreter crashes when using threads on 10.7.
-
-- Issue #14180: datetime.date.fromtimestamp(),
- datetime.datetime.fromtimestamp() and datetime.datetime.utcfromtimestamp()
- now raise an OSError instead of ValueError if localtime() or gmtime() failed.
-
-- Issue #14180: time.ctime(), gmtime(), time.localtime(),
- datetime.date.fromtimestamp(), datetime.datetime.fromtimestamp() and
- datetime.datetime.utcfromtimestamp() now raises an OverflowError, instead of
- a ValueError, if the timestamp does not fit in time_t.
-
-- Issue #14180: datetime.datetime.fromtimestamp() and
- datetime.datetime.utcfromtimestamp() now round microseconds towards zero
- instead of rounding to nearest with ties going away from zero.
-
-- Issue #10543: Fix unittest test discovery with Jython bytecode files.
-
-- Issue #1178863: Separate initialisation from setting when initializing
- Tkinter.Variables; harmonize exceptions to ValueError; only delete variables
- that have not been deleted; assert that variable names are strings.
-
-- Issue #14104: Implement time.monotonic() on Mac OS X, patch written by
- Nicholas Riley.
-
-- Issue #13394: the aifc module now uses warnings.warn() to signal warnings.
-
-- Issue #14252: Fix subprocess.Popen.terminate() to not raise an error under
- Windows when the child process has already exited.
-
-- Issue #14223: curses.addch() is no more limited to the range 0-255 when the
- Python curses is not linked to libncursesw. It was a regression introduced
- in Python 3.3a1.
-
-- Issue #14168: Check for presence of Element._attrs in minidom before
- accessing it.
-
-- Issue #12328: Fix multiprocessing's use of overlapped I/O on Windows.
- Also, add a multiprocessing.connection.wait(rlist, timeout=None) function
- for polling multiple objects at once. Patch by sbt.
-
-- Issue #14007: Accept incomplete TreeBuilder objects (missing start, end,
- data or close method) for the Python implementation as well.
- Drop the no-op TreeBuilder().xml() method from the C implementation.
-
-- Issue #14210: pdb now has tab-completion not only for command names, but
- also for their arguments, wherever possible.
-
-- Issue #14310: Sockets can now be with other processes on Windows using
- the api socket.socket.share() and socket.fromshare().
-
-- Issue #10576: The gc module now has a 'callbacks' member that will get
- called when garbage collection takes place.
-
-Build
------
-
-- Issue #14557: Fix extensions build on HP-UX. Patch by Adi Roiban.
-
-- Issue #14387: Do not include accu.h from Python.h.
-
-- Issue #14359: Only use O_CLOEXEC in _posixmodule.c if it is defined.
- Based on patch from Hervé Coatanhay.
-
-- Issue #14321: Do not run pgen during the build if files are up to date.
-
-Documentation
--------------
-
-- Issue #14034: added the argparse tutorial.
-
-- Issue #14324: Fix configure tests for cross builds.
-
-- Issue #14327: Call AC_CANONICAL_HOST in configure.ac and check in
- config.{guess,sub}. Don't use uname calls for cross builds.
-
-Extension Modules
------------------
-
-- Issue #9041: An issue in ctypes.c_longdouble, ctypes.c_double, and
- ctypes.c_float that caused an incorrect exception to be returned in the
- case of overflow has been fixed.
-
-- Issue #14212: The re module didn't retain a reference to buffers it was
- scanning, resulting in segfaults.
-
-- Issue #14259: The finditer() method of re objects did not take any
- keyword arguments, contrary to the documentation.
-
-- Issue #10142: Support for SEEK_HOLE/SEEK_DATA (for example, under ZFS).
-
-Tests
------
-
-- Issue #14442: Add missing errno import in test_smtplib.
-
-- Issue #8315: (partial fix) python -m unittest test.test_email now works.
-
-
-What's New in Python 3.3.0 Alpha 1?
-===================================
-
-*Release date: 05-Mar-2012*
-
-Core and Builtins
------------------
-
-- Issue #14172: Fix reference leak when marshalling a buffer-like object
- (other than a bytes object).
-
-- Issue #13521: dict.setdefault() now does only one lookup for the given key,
- making it "atomic" for many purposes. Patch by Filip Gruszczyński.
-
-- PEP 409, Issue #6210: "raise X from None" is now supported as a means of
- suppressing the display of the chained exception context. The chained
- context still remains available as the __context__ attribute.
-
-- Issue #10181: New memoryview implementation fixes multiple ownership
- and lifetime issues of dynamically allocated Py_buffer members (#9990)
- as well as crashes (#8305, #7433). Many new features have been added
- (See whatsnew/3.3), and the documentation has been updated extensively.
- The ndarray test object from _testbuffer.c implements all aspects of
- PEP-3118, so further development towards the complete implementation
- of the PEP can proceed in a test-driven manner.
-
- Thanks to Nick Coghlan, Antoine Pitrou and Pauli Virtanen for review
- and many ideas.
-
-- Issue #12834: Fix incorrect results of memoryview.tobytes() for
- non-contiguous arrays.
-
-- Issue #5231: Introduce memoryview.cast() method that allows changing
- format and shape without making a copy of the underlying memory.
-
-- Issue #14084: Fix a file descriptor leak when importing a module with a
- bad encoding.
-
-- Upgrade Unicode data to Unicode 6.1.
-
-- Issue #14040: Remove rarely used file name suffixes for C extensions
- (under POSIX mainly).
-
-- Issue #14051: Allow arbitrary attributes to be set of classmethod and
- staticmethod.
-
-- Issue #13703: oCERT-2011-003: Randomize hashes of str and bytes to protect
- against denial of service attacks due to hash collisions within the dict and
- set types. Patch by David Malcolm, based on work by Victor Stinner.
-
-- Issue #13020: Fix a reference leak when allocating a structsequence object
- fails. Patch by Suman Saha.
-
-- Issue #13908: Ready types returned from PyType_FromSpec.
-
-- Issue #11235: Fix OverflowError when trying to import a source file whose
- modification time doesn't fit in a 32-bit timestamp.
-
-- Issue #12705: A SyntaxError exception is now raised when attempting to
- compile multiple statements as a single interactive statement.
-
-- Fix the builtin module initialization code to store the init function for
- future reinitialization.
-
-- Issue #8052: The posix subprocess module would take a long time closing
- all possible file descriptors in the child process rather than just open
- file descriptors. It now closes only the open fds if possible for the
- default close_fds=True behavior.
-
-- Issue #13629: Renumber the tokens in token.h so that they match the indexes
- into _PyParser_TokenNames.
-
-- Issue #13752: Add a casefold() method to str.
-
-- Issue #13761: Add a "flush" keyword argument to the print() function,
- used to ensure flushing the output stream.
-
-- Issue #13645: pyc files now contain the size of the corresponding source
- code, to avoid timestamp collisions (especially on filesystems with a low
- timestamp resolution) when checking for freshness of the bytecode.
-
-- PEP 380, Issue #11682: Add "yield from <x>" to support easy delegation to
- subgenerators (initial patch by Greg Ewing, integration into 3.3 by
- Renaud Blanch, Ryan Kelly, Zbigniew Jędrzejewski-Szmek and Nick Coghlan)
-
-- Issue #13748: Raw bytes literals can now be written with the ``rb`` prefix
- as well as ``br``.
-
-- Issue #12736: Use full unicode case mappings for upper, lower, and title case.
-
-- Issue #12760: Add a create mode to open(). Patch by David Townshend.
-
-- Issue #13738: Simplify implementation of bytes.lower() and bytes.upper().
-
-- Issue #13577: Built-in methods and functions now have a __qualname__.
- Patch by sbt.
-
-- Issue #6695: Full garbage collection runs now clear the freelist of set
- objects. Initial patch by Matthias Troffaes.
-
-- Fix OSError.__init__ and OSError.__new__ so that each of them can be
- overriden and take additional arguments (followup to issue #12555).
-
-- Fix the fix for issue #12149: it was incorrect, although it had the side
- effect of appearing to resolve the issue. Thanks to Mark Shannon for
- noticing.
-
-- Issue #13505: Pickle bytes objects in a way that is compatible with
- Python 2 when using protocols <= 2.
-
-- Issue #11147: Fix an unused argument in _Py_ANNOTATE_MEMORY_ORDER. (Fix
- given by Campbell Barton).
-
-- Issue #13503: Use a more efficient reduction format for bytearrays with
- pickle protocol >= 3. The old reduction format is kept with older protocols
- in order to allow unpickling under Python 2. Patch by Irmen de Jong.
-
-- Issue #7111: Python can now be run without a stdin, stdout or stderr
- stream. It was already the case with Python 2. However, the corresponding
- sys module entries are now set to None (instead of an unusable file object).
-
-- Issue #11849: Ensure that free()d memory arenas are really released
- on POSIX systems supporting anonymous memory mappings. Patch by
- Charles-François Natali.
-
-- PEP 3155 / issue #13448: Qualified name for classes and functions.
-
-- Issue #13436: Fix a bogus error message when an AST object was passed
- an invalid integer value.
-
-- Issue #13411: memoryview objects are now hashable when the underlying
- object is hashable.
-
-- Issue #13338: Handle all enumerations in _Py_ANNOTATE_MEMORY_ORDER
- to allow compiling extension modules with -Wswitch-enum on gcc.
- Initial patch by Floris Bruynooghe.
-
-- Issue #10227: Add an allocation cache for a single slice object. Patch by
- Stefan Behnel.
-
-- Issue #13393: BufferedReader.read1() now asks the full requested size to
- the raw stream instead of limiting itself to the buffer size.
-
-- Issue #13392: Writing a pyc file should now be atomic under Windows as well.
-
-- Issue #13333: The UTF-7 decoder now accepts lone surrogates (the encoder
- already accepts them).
-
-- Issue #13389: Full garbage collection passes now clear the freelists for
- list and dict objects. They already cleared other freelists in the
- interpreter.
-
-- Issue #13327: Remove the need for an explicit None as the second argument
- to os.utime, os.lutimes, os.futimes, os.futimens, os.futimesat, in
- order to update to the current time. Also added keyword argument
- handling to os.utimensat in order to remove the need for explicit None.
-
-- Issue #13350: Simplify some C code by replacing most usages of
- PyUnicode_Format by PyUnicode_FromFormat.
-
-- Issue #13342: input() used to ignore sys.stdin's and sys.stdout's unicode
- error handler in interactive mode (when calling into PyOS_Readline()).
-
-- Issue #9896: Add start, stop, and step attributes to range objects.
-
-- Issue #13343: Fix a SystemError when a lambda expression uses a global
- variable in the default value of a keyword-only argument: ``lambda *,
- arg=GLOBAL_NAME: None``
-
-- Issue #12797: Added custom opener parameter to builtin open() and
- FileIO.open().
-
-- Issue #10519: Avoid unnecessary recursive function calls in
- setobject.c.
-
-- Issue #10363: Deallocate global locks in Py_Finalize().
-
-- Issue #13018: Fix reference leaks in error paths in dictobject.c.
- Patch by Suman Saha.
-
-- Issue #13201: Define '==' and '!=' to compare range objects based on
- the sequence of values they define (instead of comparing based on
- object identity).
-
-- Issue #1294232: In a few cases involving metaclass inheritance, the
- interpreter would sometimes invoke the wrong metaclass when building a new
- class object. These cases now behave correctly. Patch by Daniel Urban.
-
-- Issue #12753: Add support for Unicode name aliases and named sequences.
- Both ``unicodedata.lookup()`` and '\N{...}' now resolve aliases,
- and ``unicodedata.lookup()`` resolves named sequences too.
-
-- Issue #12170: The count(), find(), rfind(), index() and rindex() methods
- of bytes and bytearray objects now accept an integer between 0 and 255
- as their first argument. Patch by Petri Lehtinen.
-
-- Issue #12604: VTRACE macro expanded to no-op in _sre.c to avoid compiler
- warnings. Patch by Josh Triplett and Petri Lehtinen.
-
-- Issue #12281: Rewrite the MBCS codec to handle correctly replace and ignore
- error handlers on all Windows versions. The MBCS codec is now supporting all
- error handlers, instead of only replace to encode and ignore to decode.
-
-- Issue #13188: When called without an explicit traceback argument,
- generator.throw() now gets the traceback from the passed exception's
- ``__traceback__`` attribute. Patch by Petri Lehtinen.
-
-- Issue #13146: Writing a pyc file is now atomic under POSIX.
-
-- Issue #7833: Extension modules built using distutils on Windows will no
- longer include a "manifest" to prevent them failing at import time in some
- embedded situations.
-
-- PEP 3151 / issue #12555: reworking the OS and IO exception hierarchy.
-
-- Add internal API for static strings (_Py_identifier et al.).
-
-- Issue #13063: the Windows error ERROR_NO_DATA (numbered 232 and described
- as "The pipe is being closed") is now mapped to POSIX errno EPIPE
- (previously EINVAL).
-
-- Issue #12911: Fix memory consumption when calculating the repr() of huge
- tuples or lists.
-
-- PEP 393: flexible string representation. Thanks to Torsten Becker for the
- initial implementation, and Victor Stinner for various bug fixes.
-
-- Issue #14081: The 'sep' and 'maxsplit' parameter to str.split, bytes.split,
- and bytearray.split may now be passed as keyword arguments.
-
-- Issue #13012: The 'keepends' parameter to str.splitlines may now be passed
- as a keyword argument: "my_string.splitlines(keepends=True)". The same
- change also applies to bytes.splitlines and bytearray.splitlines.
-
-- Issue #7732: Don't open a directory as a file anymore while importing a
- module. Ignore the direcotry if its name matchs the module name (e.g.
- "__init__.py") and raise a ImportError instead.
-
-- Issue #13021: Missing decref on an error path. Thanks to Suman Saha for
- finding the bug and providing a patch.
-
-- Issue #12973: Fix overflow checks that relied on undefined behaviour in
- list_repeat (listobject.c) and islice_next (itertoolsmodule.c). These bugs
- caused test failures with recent versions of Clang.
-
-- Issue #12904: os.utime, os.futimes, os.lutimes, and os.futimesat now write
- atime and mtime with nanosecond precision on modern POSIX platforms.
-
-- Issue #12802: the Windows error ERROR_DIRECTORY (numbered 267) is now
- mapped to POSIX errno ENOTDIR (previously EINVAL).
-
-- Issue #9200: The str.is* methods now work with strings that contain non-BMP
- characters even in narrow Unicode builds.
-
-- Issue #12791: Break reference cycles early when a generator exits with
- an exception.
-
-- Issue #12773: Make __doc__ mutable on user-defined classes.
-
-- Issue #12766: Raise a ValueError when creating a class with a class variable
- that conflicts with a name in __slots__.
-
-- Issue #12266: Fix str.capitalize() to correctly uppercase/lowercase
- titlecased and cased non-letter characters.
-
-- Issue #12732: In narrow unicode builds, allow Unicode identifiers which fall
- outside the BMP.
-
-- Issue #12575: Validate user-generated AST before it is compiled.
-
-- Make type(None), type(Ellipsis), and type(NotImplemented) callable. They
- return the respective singleton instances.
-
-- Forbid summing bytes with sum().
-
-- Verify the types of AST strings and identifiers provided by the user before
- compiling them.
-
-- Issue #12647: The None object now has a __bool__() method that returns False.
- Formerly, bool(None) returned False only because of special case logic
- in PyObject_IsTrue().
-
-- Issue #12579: str.format_map() now raises a ValueError if used on a
- format string that contains positional fields. Initial patch by
- Julian Berman.
-
-- Issue #10271: Allow warnings.showwarning() be any callable.
-
-- Issue #11627: Fix segfault when __new__ on a exception returns a
- non-exception class.
-
-- Issue #12149: Update the method cache after a type's dictionary gets
- cleared by the garbage collector. This fixes a segfault when an instance
- and its type get caught in a reference cycle, and the instance's
- deallocator calls one of the methods on the type (e.g. when subclassing
- IOBase). Diagnosis and patch by Davide Rizzo.
-
-- Issue #9611, Issue #9015: FileIO.read() clamps the length to INT_MAX on Windows.
-
-- Issue #9642: Uniformize the tests on the availability of the mbcs codec, add
- a new HAVE_MBCS define.
-
-- Issue #9642: Fix filesystem encoding initialization: use the ANSI code page
- on Windows if the mbcs codec is not available, and fail with a fatal error if
- we cannot get the locale encoding (if nl_langinfo(CODESET) is not available)
- instead of using UTF-8.
-
-- When a generator yields, do not retain the caller's exception state on the
- generator.
-
-- Issue #12475: Prevent generators from leaking their exception state into the
- caller's frame as they return for the last time.
-
-- Issue #12291: You can now load multiple marshalled objects from a stream,
- with other data interleaved between marshalled objects.
-
-- Issue #12356: When required positional or keyword-only arguments are not
- given, produce a informative error message which includes the name(s) of the
- missing arguments.
-
-- Issue #12370: Fix super with no arguments when __class__ is overriden in the
- class body.
-
-- Issue #12084: os.stat on Windows now works properly with relative symbolic
- links when called from any directory.
-
-- Loosen type restrictions on the __dir__ method. __dir__ can now return any
- sequence, which will be converted to a list and sorted by dir().
-
-- Issue #12265: Make error messages produced by passing an invalid set of
- arguments to a function more informative.
-
-- Issue #12225: Still allow Python to build if Python is not in its hg repo or
- mercurial is not installed.
-
-- Issue #1195: my_fgets() now always clears errors before calling fgets(). Fix
- the following case: sys.stdin.read() stopped with CTRL+d (end of file),
- raw_input() interrupted by CTRL+c.
-
-- Issue #12216: Allow unexpected EOF errors to happen on any line of the file.
-
-- Issue #12199: The TryExcept and TryFinally and AST nodes have been unified
- into a Try node.
-
-- Issue #9670: Increase the default stack size for secondary threads on
- Mac OS X and FreeBSD to reduce the chances of a crash instead of a
- "maximum recursion depth" RuntimeError exception.
- (patch by Ronald Oussoren)
-
-- Issue #12106: The use of the multiple-with shorthand syntax is now reflected
- in the AST.
-
-- Issue #12190: Try to use the same filename object when compiling unmarshalling
- a code objects in the same file.
-
-- Issue #12166: Move implementations of dir() specialized for various types into
- the __dir__() methods of those types.
-
-- Issue #5715: In socketserver, close the server socket in the child process.
-
-- Correct lookup of __dir__ on objects. Among other things, this causes errors
- besides AttributeError found on lookup to be propagated.
-
-- Issue #12060: Use sig_atomic_t type and volatile keyword in the signal
- module. Patch written by Charles-François Natali.
-
-- Issue #1746656: Added the if_nameindex, if_indextoname, if_nametoindex
- methods to the socket module.
-
-- Issue #12044: Fixed subprocess.Popen when used as a context manager to
- wait for the process to end when exiting the context to avoid unintentionally
- leaving zombie processes around.
-
-- Issue #1195: Fix input() if it is interrupted by CTRL+d and then CTRL+c,
- clear the end-of-file indicator after CTRL+d.
-
-- Issue #1856: Avoid crashes and lockups when daemon threads run while the
- interpreter is shutting down; instead, these threads are now killed when
- they try to take the GIL.
-
-- Issue #9756: When calling a method descriptor or a slot wrapper descriptor,
- the check of the object type doesn't read the __class__ attribute anymore.
- Fix a crash if a class override its __class__ attribute (e.g. a proxy of the
- str type). Patch written by Andreas Stührk.
-
-- Issue #10517: After fork(), reinitialize the TLS used by the PyGILState_*
- APIs, to avoid a crash with the pthread implementation in RHEL 5. Patch
- by Charles-François Natali.
-
-- Issue #10914: Initialize correctly the filesystem codec when creating a new
- subinterpreter to fix a bootstrap issue with codecs implemented in Python, as
- the ISO-8859-15 codec.
-
-- Issue #11918: OS/2 and VMS are no more supported because of the lack of
- maintainer.
-
-- Issue #6780: fix starts/endswith error message to mention that tuples are
- accepted too.
-
-- Issue #5057: fix a bug in the peepholer that led to non-portable pyc files
- between narrow and wide builds while optimizing BINARY_SUBSCR on non-BMP
- chars (e.g. "\U00012345"[0]).
-
-- Issue #11845: Fix typo in rangeobject.c that caused a crash in
- compute_slice_indices. Patch by Daniel Urban.
-
-- Issue #5673: Added a `timeout` keyword argument to subprocess.Popen.wait,
- subprocess.Popen.communicated, subprocess.call, subprocess.check_call, and
- subprocess.check_output. If the blocking operation takes more than `timeout`
- seconds, the `subprocess.TimeoutExpired` exception is raised.
-
-- Issue #11650: PyOS_StdioReadline() retries fgets() if it was interrupted
- (EINTR), for example if the program is stopped with CTRL+z on Mac OS X. Patch
- written by Charles-Francois Natali.
-
-- Issue #9319: Include the filename in "Non-UTF8 code ..." syntax error.
-
-- Issue #10785: Store the filename as Unicode in the Python parser.
-
-- Issue #11619: _PyImport_LoadDynamicModule() doesn't encode the path to bytes
- on Windows.
-
-- Issue #10998: Remove mentions of -Q, sys.flags.division_warning and
- Py_DivisionWarningFlag left over from Python 2.
-
-- Issue #11244: Remove an unnecessary peepholer check that was preventing
- negative zeros from being constant-folded properly.
-
-- Issue #11395: io.FileIO().write() clamps the data length to 32,767 bytes on
- Windows if the file is a TTY to workaround a Windows bug. The Windows console
- returns an error (12: not enough space error) on writing into stdout if
- stdout mode is binary and the length is greater than 66,000 bytes (or less,
- depending on heap usage).
-
-- Issue #11320: fix bogus memory management in Modules/getpath.c, leading to
- a possible crash when calling Py_SetPath().
-
-- Issue #11432: A bug was introduced in subprocess.Popen on posix systems with
- 3.2.0 where the stdout or stderr file descriptor being the same as the stdin
- file descriptor would raise an exception. webbrowser.open would fail. fixed.
-
-- Issue #9856: Change object.__format__ with a non-empty format string
- to be a DeprecationWarning. In 3.2 it was a PendingDeprecationWarning.
- In 3.4 it will be a TypeError.
-
-- Issue #11244: The peephole optimizer is now able to constant-fold
- arbitrarily complex expressions. This also fixes a 3.2 regression where
- operations involving negative numbers were not constant-folded.
-
-- Issue #11450: Don't truncate hg version info in Py_GetBuildInfo() when
- there are many tags (e.g. when using mq). Patch by Nadeem Vawda.
-
-- Issue #11335: Fixed a memory leak in list.sort when the key function
- throws an exception.
-
-- Issue #8923: When a string is encoded to UTF-8 in strict mode, the result is
- cached into the object. Examples: str.encode(), str.encode('utf-8'),
- PyUnicode_AsUTF8String() and PyUnicode_AsEncodedString(unicode, "utf-8",
- NULL).
-
-- Issue #10829: Refactor PyUnicode_FromFormat(), use the same function to parse
- the format string in the 3 steps, fix crashs on invalid format strings.
-
-- Issue #13007: whichdb should recognize gdbm 1.9 magic numbers.
-
-- Issue #11286: Raise a ValueError from calling PyMemoryView_FromBuffer with
- a buffer struct having a NULL data pointer.
-
-- Issue #11272: On Windows, input() strips '\r' (and not only '\n'), and
- sys.stdin uses universal newline (replace '\r\n' by '\n').
-
-- Issue #11828: startswith and endswith now accept None as slice index.
- Patch by Torsten Becker.
-
-- Issue #11168: Remove filename debug variable from PyEval_EvalFrameEx().
- It encoded the Unicode filename to UTF-8, but the encoding fails on
- undecodable filename (on surrogate characters) which raises an unexpected
- UnicodeEncodeError on recursion limit.
-
-- Issue #11187: Remove bootstrap code (use ASCII) of
- PyUnicode_AsEncodedString(), it was replaced by a better fallback (use the
- locale encoding) in PyUnicode_EncodeFSDefault().
-
-- Check for NULL result in PyType_FromSpec.
-
-- Issue #10516: New copy() and clear() methods for lists and bytearrays.
-
-- Issue #11386: bytearray.pop() now throws IndexError when the bytearray is
- empty, instead of OverflowError.
-
-- Issue #12380: The rjust, ljust and center methods of bytes and bytearray
- now accept a bytearray argument.
-
-Library
--------
-
-- Issue #14195: An issue that caused weakref.WeakSet instances to incorrectly
- return True for a WeakSet instance 'a' in both 'a < a' and 'a > a' has been
- fixed.
-
-- Issue #14166: Pickler objects now have an optional ``dispatch_table``
- attribute which allows to set custom per-pickler reduction functions.
- Patch by sbt.
-
-- Issue #14177: marshal.loads() now raises TypeError when given an unicode
- string. Patch by Guilherme Gonçalves.
-
-- Issue #13550: Remove the debug machinery from the threading module: remove
- verbose arguments from all threading classes and functions.
-
-- Issue #14159: Fix the len() of weak containers (WeakSet, WeakKeyDictionary,
- WeakValueDictionary) to return a better approximation when some objects
- are dead or dying. Moreover, the implementation is now O(1) rather than
- O(n).
-
-- Issue #11841: Fix comparison bug with 'rc' versions in packaging.version.
- Patch by Filip Gruszczyński.
-
-- Issue #6884: Fix long-standing bugs with MANIFEST.in parsing in distutils
- on Windows. Also fixed in packaging.
-
-- Issue #8033: sqlite3: Fix 64-bit integer handling in user functions
- on 32-bit architectures. Initial patch by Philippe Devalkeneer.
-
-- HTMLParser is now able to handle slashes in the start tag.
-
-- Issue #13641: Decoding functions in the base64 module now accept ASCII-only
- unicode strings. Patch by Catalin Iacob.
-
-- Issue #14043: Speed up importlib's _FileFinder by at least 8x, and add a
- new importlib.invalidate_caches() function.
-
-- Issue #14001: CVE-2012-0845: xmlrpc: Fix an endless loop in
- SimpleXMLRPCServer upon malformed POST request.
-
-- Issue #13961: Move importlib over to using os.replace() for atomic renaming.
-
-- Do away with ambiguous level values (as suggested by PEP 328) in
- importlib.__import__() by raising ValueError when level < 0.
-
-- Issue #2489: pty.spawn could consume 100% cpu when it encountered an EOF.
-
-- Issue #13014: Fix a possible reference leak in SSLSocket.getpeercert().
-
-- Issue #13777: Add PF_SYSTEM sockets on OS X.
- Patch by Michael Goderbauer.
-
-- Issue #13015: Fix a possible reference leak in defaultdict.__repr__.
- Patch by Suman Saha.
-
-- Issue #1326113: distutils' and packaging's build_ext commands option now
- correctly parses multiple values (separated by whitespace or commas) given
- to their --libraries option.
-
-- Issue #10287: nntplib now queries the server's CAPABILITIES first before
- sending MODE READER, and only sends it if not already in READER mode.
- Patch by Hynek Schlawack.
-
-- Issue #13993: HTMLParser is now able to handle broken end tags when
- strict=False.
-
-- Issue #13930: lib2to3 now supports writing converted output files to another
- directory tree as well as copying unchanged files and altering the file
- suffix.
-
-- Issue #9750: Fix sqlite3.Connection.iterdump on tables and fields
- with a name that is a keyword or contains quotes. Patch by Marko
- Kohtala.
-
-- Issue #10287: nntplib now queries the server's CAPABILITIES again after
- authenticating (since the result may change, according to RFC 4643).
- Patch by Hynek Schlawack.
-
-- Issue #13590: On OS X 10.7 and 10.6 with Xcode 4.2, building
- Distutils-based packages with C extension modules may fail because
- Apple has removed gcc-4.2, the version used to build python.org
- 64-bit/32-bit Pythons. If the user does not explicitly override
- the default C compiler by setting the CC environment variable,
- Distutils will now attempt to compile extension modules with clang
- if gcc-4.2 is required but not found. Also as a convenience, if
- the user does explicitly set CC, substitute its value as the default
- compiler in the Distutils LDSHARED configuration variable for OS X.
- (Note, the python.org 32-bit-only Pythons use gcc-4.0 and the 10.4u
- SDK, neither of which are available in Xcode 4. This change does not
- attempt to override settings to support their use with Xcode 4.)
-
-- Issue #13960: HTMLParser is now able to handle broken comments when
- strict=False.
-
-- When '' is a path (e.g. in sys.path), make sure __file__ uses the current
- working directory instead of '' in importlib.
-
-- Issue #13609: Add two functions to query the terminal size:
- os.get_terminal_size (low level) and shutil.get_terminal_size (high level).
- Patch by Zbigniew Jędrzejewski-Szmek.
-
-- Issue #13845: On Windows, time.time() now uses GetSystemTimeAsFileTime()
- instead of ftime() to have a resolution of 100 ns instead of 1 ms (the clock
- accuracy is between 0.5 ms and 15 ms).
-
-- Issue #13846: Add time.monotonic(), monotonic clock.
-
-- Issue #8184: multiprocessing: On Windows, don't set SO_REUSEADDR on
- Connection sockets, and set FILE_FLAG_FIRST_PIPE_INSTANCE on named pipes, to
- make sure two listeners can't bind to the same socket/pipe (or any existing
- socket/pipe).
-
-- Issue #10811: Fix recursive usage of cursors. Instead of crashing,
- raise a ProgrammingError now.
-
-- Issue #13734: Add os.fwalk(), a directory walking function yielding file
- descriptors.
-
-- Issue #2945: Make the distutils upload command aware of bdist_rpm products.
-
-- Issue #13712: pysetup create should not convert package_data to extra_files.
-
-- Issue #11805: package_data in setup.cfg should allow more than one value.
-
-- Issue #13676: Handle strings with embedded zeros correctly in sqlite3.
-
-- Issue #8828: Add new function os.replace(), for cross-platform renaming
- with overwriting.
-
-- Issue #13848: open() and the FileIO constructor now check for NUL
- characters in the file name. Patch by Hynek Schlawack.
-
-- Issue #13806: The size check in audioop decompression functions was too
- strict and could reject valid compressed data. Patch by Oleg Plakhotnyuk.
-
-- Issue #13812: When a multiprocessing Process child raises an exception,
- flush stderr after printing the exception traceback.
-
-- Issue #13885: CVE-2011-3389: the _ssl module would always disable the CBC
- IV attack countermeasure.
-
-- Issue #13847: time.localtime() and time.gmtime() now raise an OSError instead
- of ValueError on failure. time.ctime() and time.asctime() now raises an
- OSError if localtime() failed. time.clock() now raises a RuntimeError if the
- processor time used is not available or its value cannot be represented
-
-- Issue #13772: In os.symlink() under Windows, do not try to guess the link
- target's type (file or directory). The detection was buggy and made the
- call non-atomic (therefore prone to race conditions).
-
-- Issue #6631: Disallow relative file paths in urllib urlopen methods.
-
-- Issue #13722: Avoid silencing ImportErrors when initializing the codecs
- registry.
-
-- Issue #13781: Fix GzipFile bug that caused an exception to be raised when
- opening for writing using a fileobj returned by os.fdopen().
-
-- Issue #13803: Under Solaris, distutils doesn't include bitness
- in the directory name.
-
-- Issue #10278: Add time.wallclock() function, monotonic clock.
-
-- Issue #13809: Fix regression where bz2 module wouldn't work when threads are
- disabled. Original patch by Amaury Forgeot d'Arc.
-
-- Issue #13589: Fix some serialization primitives in the aifc module.
- Patch by Oleg Plakhotnyuk.
-
-- Issue #13642: Unquote before b64encoding user:password during Basic
- Authentication. Patch contributed by Joonas Kuorilehto.
-
-- Issue #12364: Fix a hang in concurrent.futures.ProcessPoolExecutor.
- The hang would occur when retrieving the result of a scheduled future after
- the executor had been shut down.
-
-- Issue #13502: threading: Fix a race condition in Event.wait() that made it
- return False when the event was set and cleared right after.
-
-- Issue #9993: When the source and destination are on different filesystems,
- and the source is a symlink, shutil.move() now recreates a symlink on the
- destination instead of copying the file contents. Patch by Jonathan Niehof
- and Hynek Schlawack.
-
-- Issue #12926: Fix a bug in tarfile's link extraction.
-
-- Issue #13696: Fix the 302 Relative URL Redirection problem.
-
-- Issue #13636: Weak ciphers are now disabled by default in the ssl module
- (except when SSLv2 is explicitly asked for).
-
-- Issue #12715: Add an optional symlinks argument to shutil functions
- (copyfile, copymode, copystat, copy, copy2). When that parameter is
- true, symlinks aren't dereferenced and the operation instead acts on the
- symlink itself (or creates one, if relevant). Patch by Hynek Schlawack.
-
-- Add a flags parameter to select.epoll.
-
-- Issue #13626: Add support for SSL Diffie-Hellman key exchange, through the
- SSLContext.load_dh_params() method and the ssl.OP_SINGLE_DH_USE option.
-
-- Issue #11006: Don't issue low level warning in subprocess when pipe2() fails.
-
-- Issue #13620: Support for Chrome browser in webbrowser. Patch contributed
- by Arnaud Calmettes.
-
-- Issue #11829: Fix code execution holes in inspect.getattr_static for
- metaclasses with metaclasses. Patch by Andreas Stührk.
-
-- Issue #12708: Add starmap() and starmap_async() methods (similar to
- itertools.starmap()) to multiprocessing.Pool. Patch by Hynek Schlawack.
-
-- Issue #1785: Fix inspect and pydoc with misbehaving descriptors.
-
-- Issue #13637: "a2b" functions in the binascii module now accept ASCII-only
- unicode strings.
-
-- Issue #13634: Add support for querying and disabling SSL compression.
-
-- Issue #13627: Add support for SSL Elliptic Curve-based Diffie-Hellman
- key exchange, through the SSLContext.set_ecdh_curve() method and the
- ssl.OP_SINGLE_ECDH_USE option.
-
-- Issue #13635: Add ssl.OP_CIPHER_SERVER_PREFERENCE, so that SSL servers
- choose the cipher based on their own preferences, rather than on the
- client's.
-
-- Issue #11813: Fix inspect.getattr_static for modules. Patch by Andreas
- Stührk.
-
-- Issue #7502: Fix equality comparison for DocTestCase instances. Patch by
- Cédric Krier.
-
-- Issue #11870: threading: Properly reinitialize threads internal locks and
- condition variables to avoid deadlocks in child processes.
-
-- Issue #8035: urllib: Fix a bug where the client could remain stuck after a
- redirection or an error.
-
-- Issue #13560: os.strerror() now uses the current locale encoding instead of
- UTF-8.
-
-- Issue #8373: The filesystem path of AF_UNIX sockets now uses the filesystem
- encoding and the surrogateescape error handler, rather than UTF-8. Patch
- by David Watson.
-
-- Issue #10350: Read and save errno before calling a function which might
- overwrite it. Original patch by Hallvard B Furuseth.
-
-- Issue #11610: Introduce a more general way to declare abstract properties.
-
-- Issue #13591: A bug in importlib has been fixed that caused import_module
- to load a module twice.
-
-- Issue #13449 sched.scheduler.run() method has a new "blocking" parameter which
- when set to False makes run() execute the scheduled events due to expire
- soonest (if any) and then return. Patch by Giampaolo Rodolà.
-
-- Issue #8684 sched.scheduler class can be safely used in multi-threaded
- environments. Patch by Josiah Carlson and Giampaolo Rodolà.
-
-- Alias resource.error to OSError ala PEP 3151.
-
-- Issue #5689: Add support for lzma compression to the tarfile module.
-
-- Issue #13248: Turn 3.2's PendingDeprecationWarning into 3.3's
- DeprecationWarning. It covers 'cgi.escape', 'importlib.abc.PyLoader',
- 'importlib.abc.PyPycLoader', 'nntplib.NNTP.xgtitle', 'nntplib.NNTP.xpath',
- and private attributes of 'smtpd.SMTPChannel'.
-
-- Issue #5905, Issue #13560: time.strftime() is now using the current locale
- encoding, instead of UTF-8, if the wcsftime() function is not available.
-
-- Issue #13464: Add a readinto() method to http.client.HTTPResponse. Patch
- by Jon Kuhn.
-
-- tarfile.py: Correctly detect bzip2 compressed streams with blocksizes
- other than 900k.
-
-- Issue #13439: Fix many errors in turtle docstrings.
-
-- Issue #6715: Add a module 'lzma' for compression using the LZMA algorithm.
- Thanks to Per Øyvind Karlsen for the initial implementation.
-
-- Issue #13487: Make inspect.getmodule robust against changes done to
- sys.modules while it is iterating over it.
-
-- Issue #12618: Fix a bug that prevented py_compile from creating byte
- compiled files in the current directory. Initial patch by Sjoerd de Vries.
-
-- Issue #13444: When stdout has been closed explicitly, we should not attempt
- to flush it at shutdown and print an error.
-
-- Issue #12567: The curses module uses Unicode functions for Unicode arguments
- when it is linked to the ncurses library. It encodes also Unicode strings to
- the locale encoding instead of UTF-8.
-
-- Issue #12856: Ensure child processes do not inherit the parent's random
- seed for filename generation in the tempfile module. Patch by Brian
- Harring.
-
-- Issue #9957: SpooledTemporaryFile.truncate() now accepts an optional size
- parameter, as other file-like objects. Patch by Ryan Kelly.
-
-- Issue #13458: Fix a memory leak in the ssl module when decoding a
- certificate with a subjectAltName. Patch by Robert Xiao.
-
-- Issue #13415: os.unsetenv() doesn't ignore errors anymore.
-
-- Issue #13245: sched.scheduler class constructor's timefunc and
- delayfunct parameters are now optional.
- scheduler.enter and scheduler.enterabs methods gained a new kwargs parameter.
- Patch contributed by Chris Clark.
-
-- Issue #12328: Under Windows, refactor handling of Ctrl-C events and
- make _multiprocessing.win32.WaitForMultipleObjects interruptible when
- the wait_flag parameter is false. Patch by sbt.
-
-- Issue #13322: Fix BufferedWriter.write() to ensure that BlockingIOError is
- raised when the wrapped raw file is non-blocking and the write would block.
- Previous code assumed that the raw write() would raise BlockingIOError, but
- RawIOBase.write() is defined to returned None when the call would block.
- Patch by sbt.
-
-- Issue #13358: HTMLParser now calls handle_data only once for each CDATA.
-
-- Issue #4147: minidom's toprettyxml no longer adds whitespace around a text
- node when it is the only child of an element. Initial patch by Dan
- Kenigsberg.
-
-- Issue #13374: The Windows bytes API has been deprecated in the os module. Use
- Unicode filenames instead of bytes filenames to not depend on the ANSI code
- page anymore and to support any filename.
-
-- Issue #13297: Use bytes type to send and receive binary data through XMLRPC.
-
-- Issue #6397: Support "/dev/poll" polling objects in select module,
- under Solaris & derivatives.
-
-- Issues #1745761, #755670, #13357, #12629, #1200313: HTMLParser now correctly
- handles non-valid attributes, including adjacent and unquoted attributes.
-
-- Issue #13193: Fix distutils.filelist.FileList and packaging.manifest.Manifest
- under Windows.
-
-- Issue #13384: Remove unnecessary __future__ import in Lib/random.py
-
-- Issue #13149: Speed up append-only StringIO objects.
-
-- Issue #13373: multiprocessing.Queue.get() could sometimes block indefinitely
- when called with a timeout. Patch by Arnaud Ysmal.
-
-- Issue #13254: Fix Maildir initialization so that maildir contents
- are read correctly.
-
-- Issue #3067: locale.setlocale() now raises TypeError if the second
- argument is an invalid iterable. Its documentation and docstring
- were also updated. Initial patch by Jyrki Pulliainen.
-
-- Issue #13140: Fix the daemon_threads attribute of ThreadingMixIn.
-
-- Issue #13339: Fix compile error in posixmodule.c due to missing semicolon.
- Thanks to Robert Xiao.
-
-- Byte compilation in packaging is now isolated from the calling Python -B or
- -O options, instead of being disallowed under -B or buggy under -O.
-
-- Issue #10570: curses.putp() and curses.tparm() are now expecting a byte
- string, instead of a Unicode string.
-
-- Issue #13295: http.server now produces valid HTML 4.01 strict.
-
-- Issue #2892: preserve iterparse events in case of SyntaxError.
-
-- Issue #13287: urllib.request and urllib.error now contains an __all__
- attribute to expose only relevant classes and functions. Patch by Florent
- Xicluna.
-
-- Issue #670664: Fix HTMLParser to correctly handle the content of
- ``<script>...</script>`` and ``<style>...</style>``.
-
-- Issue #10817: Fix urlretrieve function to raise ContentTooShortError even
- when reporthook is None. Patch by Jyrki Pulliainen.
-
-- Fix the xmlrpc.client user agent to return something similar to
- urllib.request user agent: "Python-xmlrpc/3.3".
-
-- Issue #13293: Better error message when trying to marshal bytes using
- xmlrpc.client.
-
-- Issue #13291: NameError in xmlrpc package.
-
-- Issue #13258: Use callable() built-in in the standard library.
-
-- Issue #13273: fix a bug that prevented HTMLParser to properly detect some
- tags when strict=False.
-
-- Issue #11183: Add finer-grained exceptions to the ssl module, so that
- you don't have to inspect the exception's attributes in the common case.
-
-- Issue #13216: Add cp65001 codec, the Windows UTF-8 (CP_UTF8).
-
-- Issue #13226: Add RTLD_xxx constants to the os module. These constants can be
- used with sys.setdlopenflags().
-
-- Issue #10278: Add clock_getres(), clock_gettime() and CLOCK_xxx constants to
- the time module. time.clock_gettime(time.CLOCK_MONOTONIC) provides a
- monotonic clock
-
-- Issue #10332: multiprocessing: fix a race condition when a Pool is closed
- before all tasks have completed.
-
-- Issue #13255: wrong docstrings in array module.
-
-- Issue #8540: Remove deprecated Context._clamp attribute in Decimal module.
-
-- Issue #13235: Added DeprecationWarning to logging.warn() method and function.
-
-- Issue #9168: now smtpd is able to bind privileged port.
-
-- Issue #12529: fix cgi.parse_header issue on strings with double-quotes and
- semicolons together. Patch by Ben Darnell and Petri Lehtinen.
-
-- Issue #13227: functools.lru_cache() now has a option to distinguish
- calls with different argument types.
-
-- Issue #6090: zipfile raises a ValueError when a document with a timestamp
- earlier than 1980 is provided. Patch contributed by Petri Lehtinen.
-
-- Issue #13150: sysconfig no longer parses the Makefile and config.h files
- when imported, instead doing it at build time. This makes importing
- sysconfig faster and reduces Python startup time by 20%.
-
-- Issue #12448: smtplib now flushes stdout while running ``python -m smtplib``
- in order to display the prompt correctly.
-
-- Issue #12454: The mailbox module is now using ASCII, instead of the locale
- encoding, to read and write .mh_sequences files.
-
-- Issue #13194: zlib.compressobj().copy() and zlib.decompressobj().copy() are
- now available on Windows.
-
-- Issue #1673007: urllib.request now supports HEAD request via new method argument.
- Patch contributions by David Stanek, Patrick Westerhoff and Ezio Melotti.
-
-- Issue #12386: packaging does not fail anymore when writing the RESOURCES
- file.
-
-- Issue #13158: Fix decoding and encoding of GNU tar specific base-256 number
- fields in tarfile.
-
-- Issue #13025: mimetypes is now reading MIME types using the UTF-8 encoding,
- instead of the locale encoding.
-
-- Issue #10653: On Windows, use strftime() instead of wcsftime() because
- wcsftime() doesn't format time zone correctly.
-
-- Issue #13150: The tokenize module doesn't compile large regular expressions
- at startup anymore.
-
-- Issue #11171: Fix distutils.sysconfig.get_makefile_filename when Python was
- configured with different prefix and exec-prefix.
-
-- Issue #11254: Teach distutils and packaging to compile .pyc and .pyo files in
- PEP 3147-compliant __pycache__ directories.
-
-- Issue #7367: Fix pkgutil.walk_paths to skip directories whose
- contents cannot be read.
-
-- Issue #3163: The struct module gets new format characters 'n' and 'N'
- supporting C integer types ``ssize_t`` and ``size_t``, respectively.
-
-- Issue #13099: Fix sqlite3.Cursor.lastrowid under a Turkish locale.
- Reported and diagnosed by Thomas Kluyver.
-
-- Issue #13087: BufferedReader.seek() now always raises UnsupportedOperation
- if the underlying raw stream is unseekable, even if the seek could be
- satisfied using the internal buffer. Patch by John O'Connor.
-
-- Issue #7689: Allow pickling of dynamically created classes when their
- metaclass is registered with copyreg. Patch by Nicolas M. Thiéry and Craig
- Citro.
-
-- Issue #13034: When decoding some SSL certificates, the subjectAltName
- extension could be unreported.
-
-- Issue #12306: Expose the runtime version of the zlib C library as a constant,
- ZLIB_RUNTIME_VERSION, in the zlib module. Patch by Torsten Landschoff.
-
-- Issue #12959: Add collections.ChainMap to collections.__all__.
-
-- Issue #8933: distutils' PKG-INFO files and packaging's METADATA files will
- now correctly report Metadata-Version: 1.1 instead of 1.0 if a Classifier or
- Download-URL field is present.
-
-- Issue #12567: Add curses.unget_wch() function. Push a character so the next
- get_wch() will return it.
-
-- Issue #9561: distutils and packaging now writes egg-info files using UTF-8,
- instead of the locale encoding.
-
-- Issue #8286: The distutils command sdist will print a warning message instead
- of crashing when an invalid path is given in the manifest template.
-
-- Issue #12841: tarfile unnecessarily checked the existence of numerical user
- and group ids on extraction. If one of them did not exist the respective id
- of the current user (i.e. root) was used for the file and ownership
- information was lost.
-
-- Issue #12888: Fix a bug in HTMLParser.unescape that prevented it to escape
- more than 128 entities. Patch by Peter Otten.
-
-- Issue #12878: Expose a __dict__ attribute on io.IOBase and its subclasses.
-
-- Issue #12494: On error, call(), check_call(), check_output() and
- getstatusoutput() functions of the subprocess module now kill the process,
- read its status (to avoid zombis) and close pipes.
-
-- Issue #12720: Expose low-level Linux extended file attribute functions in os.
-
-- Issue #10946: The distutils commands bdist_dumb, bdist_wininst and bdist_msi
- now respect a --skip-build option given to bdist. The packaging commands
- were fixed too.
-
-- Issue #12847: Fix a crash with negative PUT and LONG_BINPUT arguments in
- the C pickle implementation.
-
-- Issue #11564: Avoid crashes when trying to pickle huge objects or containers
- (more than 2**31 items). Instead, in most cases, an OverflowError is raised.
-
-- Issue #12287: Fix a stack corruption in ossaudiodev module when the FD is
- greater than FD_SETSIZE.
-
-- Issue #12839: Fix crash in zlib module due to version mismatch.
- Fix by Richard M. Tew.
-
-- Issue #9923: The mailcap module now correctly uses the platform path
- separator for the MAILCAP environment variable on non-POSIX platforms.
-
-- Issue #12835: Follow up to #6560 that unconditionally prevents use of the
- unencrypted sendmsg/recvmsg APIs on SSL wrapped sockets. Patch by David
- Watson.
-
-- Issue #12803: SSLContext.load_cert_chain() now accepts a password argument
- to be used if the private key is encrypted. Patch by Adam Simpkins.
-
-- Issue #11657: Fix sending file descriptors over 255 over a multiprocessing
- Pipe.
-
-- Issue #12811: tabnanny.check() now promptly closes checked files. Patch by
- Anthony Briggs.
-
-- Issue #6560: The sendmsg/recvmsg API is now exposed by the socket module
- when provided by the underlying platform, supporting processing of
- ancillary data in pure Python code. Patch by David Watson and Heiko Wundram.
-
-- Issue #12326: On Linux, sys.platform doesn't contain the major version
- anymore. It is now always 'linux', instead of 'linux2' or 'linux3' depending
- on the Linux version used to build Python.
-
-- Issue #12213: Fix a buffering bug with interleaved reads and writes that
- could appear on BufferedRandom streams.
-
-- Issue #12778: Reduce memory consumption when JSON-encoding a large
- container of many small objects.
-
-- Issue #12650: Fix a race condition where a subprocess.Popen could leak
- resources (FD/zombie) when killed at the wrong time.
-
-- Issue #12744: Fix inefficient representation of integers between 2**31 and
- 2**63 on systems with a 64-bit C "long".
-
-- Issue #12646: Add an 'eof' attribute to zlib.Decompress, to make it easier to
- detect truncated input streams.
-
-- Issue #11513: Fix exception handling ``tarfile.TarFile.gzopen()`` when
- the file cannot be opened.
-
-- Issue #12687: Fix a possible buffering bug when unpickling text mode
- (protocol 0, mostly) pickles.
-
-- Issue #10087: Fix the html output format of the calendar module.
-
-- Issue #13121: add support for inplace math operators to collections.Counter.
-
-- Add support for unary plus and unary minus to collections.Counter.
-
-- Issue #12683: urlparse updated to include svn as schemes that uses relative
- paths. (svn from 1.5 onwards support relative path).
-
-- Issue #12655: Expose functions from sched.h in the os module: sched_yield(),
- sched_setscheduler(), sched_getscheduler(), sched_setparam(),
- sched_get_min_priority(), sched_get_max_priority(), sched_rr_get_interval(),
- sched_getaffinity(), sched_setaffinity().
-
-- Add ThreadError to threading.__all__.
-
-- Issues #11104, #8688: Fix the behavior of distutils' sdist command with
- manually-maintained MANIFEST files.
-
-- Issue #11281: smtplib.STMP gets source_address parameter, which adds the
- ability to bind to specific source address on a machine with multiple
- interfaces. Patch by Paulo Scardine.
-
-- Issue #12464: tempfile.TemporaryDirectory.cleanup() should not follow
- symlinks: fix it. Patch by Petri Lehtinen.
-
-- Issue #8887: "pydoc somebuiltin.somemethod" (or help('somebuiltin.somemethod')
- in Python code) now finds the doc of the method.
-
-- Issue #10968: Remove indirection in threading. The public names (Event,
- Condition, etc.) used to be factory functions returning instances of hidden
- classes (_Event, _Condition, etc.), because (if Guido recalls correctly) this
- code pre-dates the ability to subclass extension types. It is now possible
- to inherit from these classes, without having to import the private
- underscored names like multiprocessing did.
-
-- Issue #9723: Add shlex.quote functions, to escape filenames and command
- lines.
-
-- Issue #12603: Fix pydoc.synopsis() on files with non-negative st_mtime.
-
-- Issue #12514: Use try/finally to assure the timeit module restores garbage
- collections when it is done.
-
-- Issue #12607: In subprocess, fix issue where if stdin, stdout or stderr is
- given as a low fd, it gets overwritten.
-
-- Issue #12576: Fix urlopen behavior on sites which do not send (or obfuscates)
- ``Connection: close`` header.
-
-- Issue #12560: Build libpython.so on OpenBSD. Patch by Stefan Sperling.
-
-- Issue #1813: Fix codec lookup under Turkish locales.
-
-- Issue #12591: Improve support of "universal newlines" in the subprocess
- module: the piped streams can now be properly read from or written to.
-
-- Issue #12591: Allow io.TextIOWrapper to work with raw IO objects (without
- a read1() method), and add a *write_through* parameter to mandate
- unbuffered writes.
-
-- Issue #10883: Fix socket leaks in urllib.request when using FTP.
-
-- Issue #12592: Make Python build on OpenBSD 5 (and future major releases).
-
-- Issue #12372: POSIX semaphores are broken on AIX: don't use them.
-
-- Issue #12551: Provide a get_channel_binding() method on SSL sockets so as
- to get channel binding data for the current SSL session (only the
- "tls-unique" channel binding is implemented). This allows the implementation
- of certain authentication mechanisms such as SCRAM-SHA-1-PLUS. Patch by
- Jacek Konieczny.
-
-- Issue #665194: email.utils now has format_datetime and parsedate_to_datetime
- functions, allowing for round tripping of RFC2822 format dates.
-
-- Issue #12571: Add a plat-linux3 directory mirroring the plat-linux2
- directory, so that "import DLFCN" and other similar imports work on
- Linux 3.0.
-
-- Issue #7484: smtplib no longer puts <> around addresses in VRFY and EXPN
- commands; they aren't required and in fact postfix doesn't support that form.
-
-- Issue #12273: Remove ast.__version__. AST changes can be accounted for by
- checking sys.version_info or sys._mercurial.
-
-- Silence spurious "broken pipe" tracebacks when shutting down a
- ProcessPoolExecutor.
-
-- Fix potential resource leaks in concurrent.futures.ProcessPoolExecutor
- by joining all queues and processes when shutdown() is called.
-
-- Issue #11603: Fix a crash when __str__ is rebound as __repr__. Patch by
- Andreas Stührk.
-
-- Issue #11321: Fix a crash with multiple imports of the _pickle module when
- embedding Python. Patch by Andreas Stührk.
-
-- Issue #6755: Add get_wch() method to curses.window class. Patch by Iñigo
- Serna.
-
-- Add cgi.closelog() function to close the log file.
-
-- Issue #12502: asyncore: fix polling loop with AF_UNIX sockets.
-
-- Issue #4376: ctypes now supports nested structures in a endian different than
- the parent structure. Patch by Vlad Riscutia.
-
-- Raise ValueError when attempting to set the _CHUNK_SIZE attribute of a
- TextIOWrapper to a huge value, not TypeError.
-
-- Issue #12504: Close file handles in a timely manner in packaging.database.
- This fixes a bug with the remove (uninstall) feature on Windows.
-
-- Issues #12169 and #10510: Factor out code used by various packaging commands
- to make HTTP POST requests, and make sure it uses CRLF.
-
-- Issue #12016: Multibyte CJK decoders now resynchronize faster. They only
- ignore the first byte of an invalid byte sequence. For example,
- b'\xff\n'.decode('gb2312', 'replace') gives '\ufffd\n' instead of '\ufffd'.
-
-- Issue #12459: time.sleep() now raises a ValueError if the sleep length is
- negative, instead of an infinite sleep on Windows or raising an IOError on
- Linux for example, to have the same behaviour on all platforms.
-
-- Issue #12451: pydoc: html_getfile() now uses tokenize.open() to support
- Python scripts using a encoding different than UTF-8 (read the coding cookie
- of the script).
-
-- Issue #12493: subprocess: Popen.communicate() now also handles EINTR errors
- if the process has only one pipe.
-
-- Issue #12467: warnings: fix a race condition if a warning is emitted at
- shutdown, if globals()['__file__'] is None.
-
-- Issue #12451: pydoc: importfile() now opens the Python script in binary mode,
- instead of text mode using the locale encoding, to avoid encoding issues.
-
-- Issue #12451: runpy: run_path() now opens the Python script in binary mode,
- instead of text mode using the locale encoding, to support other encodings
- than UTF-8 (scripts using the coding cookie).
-
-- Issue #12451: xml.dom.pulldom: parse() now opens files in binary mode instead
- of the text mode (using the locale encoding) to avoid encoding issues.
-
-- Issue #12147: Adjust the new-in-3.2 smtplib.send_message method for better
- conformance to the RFCs: correctly handle Sender and Resent- headers.
-
-- Issue #12352: Fix a deadlock in multiprocessing.Heap when a block is freed by
- the garbage collector while the Heap lock is held.
-
-- Issue #12462: time.sleep() now immediately calls the (Python) signal handler
- if it is interrupted by a signal, instead of having to wait until the next
- instruction.
-
-- Issue #12442: new shutil.disk_usage function, providing total, used and free
- disk space statistics.
-
-- Issue #12451: The XInclude default loader of xml.etree now decodes files from
- UTF-8 instead of the locale encoding if the encoding is not specified. It now
- also opens XML files for the parser in binary mode instead of the text mode
- to avoid encoding issues.
-
-- Issue #12451: doctest.debug_script() doesn't create a temporary file
- anymore to avoid encoding issues.
-
-- Issue #12451: pydoc.synopsis() now reads the encoding cookie if available,
- to read the Python script from the right encoding.
-
-- Issue #12451: distutils now opens the setup script in binary mode to read the
- encoding cookie, instead of opening it in UTF-8.
-
-- Issue #9516: On Mac OS X, change Distutils to no longer globally attempt to
- check or set the MACOSX_DEPLOYMENT_TARGET environment variable for the
- interpreter process. This could cause failures in non-Distutils subprocesses
- and was unreliable since tests or user programs could modify the interpreter
- environment after Distutils set it. Instead, have Distutils set the
- deployment target only in the environment of each build subprocess. It is
- still possible to globally override the default by setting
- MACOSX_DEPLOYMENT_TARGET before launching the interpreter; its value must be
- greater or equal to the default value, the value with which the interpreter
- was built. Also, implement the same handling in packaging.
-
-- Issue #12422: In the copy module, don't store objects that are their own copy
- in the memo dict.
-
-- Issue #12303: Add sigwaitinfo() and sigtimedwait() to the signal module.
-
-- Issue #12404: Remove C89 incompatible code from mmap module. Patch by Akira
- Kitada.
-
-- Issue #1874: email now detects and reports as a defect the presence of
- any CTE other than 7bit, 8bit, or binary on a multipart.
-
-- Issue #12383: Fix subprocess module with env={}: don't copy the environment
- variables, start with an empty environment.
-
-- Issue #11637: Fix support for importing packaging setup hooks from the
- project directory.
-
-- Issue #6771: Moved the curses.wrapper function from the single-function
- wrapper module into __init__, eliminating the module. Since __init__ was
- already importing the function to curses.wrapper, there is no API change.
-
-- Issue #11584: email.header.decode_header no longer fails if the header
- passed to it is a Header object, and Header/make_header no longer fail
- if given binary unknown-8bit input.
-
-- Issue #11700: mailbox proxy object close methods can now be called multiple
- times without error.
-
-- Issue #11767: Correct file descriptor leak in mailbox's __getitem__ method.
-
-- Issue #12133: AbstractHTTPHandler.do_open() of urllib.request closes the HTTP
- connection if its getresponse() method fails with a socket error. Patch
- written by Ezio Melotti.
-
-- Issue #12240: Allow multiple setup hooks in packaging's setup.cfg files.
- Original patch by Erik Bray.
-
-- Issue #9284: Allow inspect.findsource() to find the source of doctest
- functions.
-
-- Issue #11595: Fix assorted bugs in packaging.util.cfg_to_args, a
- compatibility helper for the distutils-packaging transition. Original patch
- by Erik Bray.
-
-- Issue #12287: In ossaudiodev, check that the device isn't closed in several
- methods.
-
-- Issue #12009: Fixed regression in netrc file comment handling.
-
-- Issue #12246: Warn and fail when trying to install a third-party project from
- an uninstalled Python (built in a source checkout). Original patch by
- Tshepang Lekhonkhobe.
-
-- Issue #10694: zipfile now ignores garbage at the end of a zipfile.
-
-- Issue #12283: Fixed regression in smtplib quoting of leading dots in DATA.
-
-- Issue #10424: Argparse now includes the names of the missing required
- arguments in the missing arguments error message.
-
-- Issue #12168: SysLogHandler now allows NUL termination to be controlled using
- a new 'append_nul' attribute on the handler.
-
-- Issue #11583: Speed up os.path.isdir on Windows by using GetFileAttributes
- instead of os.stat.
-
-- Issue #12021: Make mmap's read() method argument optional. Patch by Petri
- Lehtinen.
-
-- Issue #9205: concurrent.futures.ProcessPoolExecutor now detects killed
- children and raises BrokenProcessPool in such a situation. Previously it
- would reliably freeze/deadlock.
-
-- Issue #12040: Expose a new attribute ``sentinel`` on instances of
- ``multiprocessing.Process``. Also, fix Process.join() to not use polling
- anymore, when given a timeout.
-
-- Issue #11893: Remove obsolete internal wrapper class ``SSLFakeFile`` in the
- smtplib module. Patch by Catalin Iacob.
-
-- Issue #12080: Fix a Decimal.power() case that took an unreasonably long time
- to compute.
-
-- Issue #12221: Remove __version__ attributes from pyexpat, pickle, tarfile,
- pydoc, tkinter, and xml.parsers.expat. This were useless version constants
- left over from the Mercurial transition
-
-- Named tuples now work correctly with vars().
-
-- Issue #12085: Fix an attribute error in subprocess.Popen destructor if the
- constructor has failed, e.g. because of an undeclared keyword argument. Patch
- written by Oleg Oshmyan.
-
-- Issue #12028: Make threading._get_ident() public, rename it to
- threading.get_ident() and document it. This function was already used using
- _thread.get_ident().
-
-- Issue #12171: IncrementalEncoder.reset() of CJK codecs (multibytecodec) calls
- encreset() instead of decreset().
-
-- Issue #12218: Removed wsgiref.egg-info.
-
-- Issue #12196: Add pipe2() to the os module.
-
-- Issue #985064: Make plistlib more resilient to faulty input plists.
- Patch by Mher Movsisyan.
-
-- Issue #1625: BZ2File and bz2.decompress() now support multi-stream files.
- Initial patch by Nir Aides.
-
-- Issue #12175: BufferedReader.read(-1) now calls raw.readall() if available.
-
-- Issue #12175: FileIO.readall() now only reads the file position and size
- once.
-
-- Issue #12175: RawIOBase.readall() now returns None if read() returns None.
-
-- Issue #12175: FileIO.readall() now raises a ValueError instead of an IOError
- if the file is closed.
-
-- Issue #11109: New service_action method for BaseServer, used by ForkingMixin
- class for cleanup. Initial Patch by Justin Warkentin.
-
-- Issue #12045: Avoid duplicate execution of command in
- ctypes.util._get_soname(). Patch by Sijin Joseph.
-
-- Issue #10818: Remove the Tk GUI and the serve() function of the pydoc module,
- pydoc -g has been deprecated in Python 3.2 and it has a new enhanced web
- server.
-
-- Issue #1441530: In imaplib, read the data in one chunk to speed up large
- reads and simplify code.
-
-- Issue #12070: Fix the Makefile parser of the sysconfig module to handle
- correctly references to "bogus variable" (e.g. "prefix=$/opt/python").
-
-- Issue #12100: Don't reset incremental encoders of CJK codecs at each call to
- their encode() method anymore, but continue to call the reset() method if the
- final argument is True.
-
-- Issue #12049: Add RAND_bytes() and RAND_pseudo_bytes() functions to the ssl
- module.
-
-- Issue #6501: os.device_encoding() returns None on Windows if the application
- has no console.
-
-- Issue #12105: Add O_CLOEXEC to the os module.
-
-- Issue #12079: Decimal('Infinity').fma(Decimal('0'), (3.91224318126786e+19+0j))
- now raises TypeError (reflecting the invalid type of the 3rd argument) rather
- than Decimal.InvalidOperation.
-
-- Issue #12124: zipimport doesn't keep a reference to zlib.decompress() anymore
- to be able to unload the module.
-
-- Add the packaging module, an improved fork of distutils (also known as
- distutils2).
-
-- Issue #12065: connect_ex() on an SSL socket now returns the original errno
- when the socket's timeout expires (it used to return None).
-
-- Issue #8809: The SMTP_SSL constructor and SMTP.starttls() now support
- passing a ``context`` argument pointing to an ssl.SSLContext instance.
- Patch by Kasun Herath.
-
-- Issue #9516: Issue #9516: avoid errors in sysconfig when MACOSX_DEPLOYMENT_TARGET
- is set in shell.
-
-- Issue #8650: Make zlib module 64-bit clean. compress(), decompress() and
- their incremental counterparts now raise OverflowError if given an input
- larger than 4GB, instead of silently truncating the input and returning
- an incorrect result.
-
-- Issue #12050: zlib.decompressobj().decompress() now clears the unconsumed_tail
- attribute when called without a max_length argument.
-
-- Issue #12062: Fix a flushing bug when doing a certain type of I/O sequence
- on a file opened in read+write mode (namely: reading, seeking a bit forward,
- writing, then seeking before the previous write but still within buffered
- data, and writing again).
-
-- Issue #9971: Write an optimized implementation of BufferedReader.readinto().
- Patch by John O'Connor.
-
-- Issue #11799: urllib.request Authentication Handlers will raise a ValueError
- when presented with an unsupported Authentication Scheme. Patch contributed
- by Yuval Greenfield.
-
-- Issue #10419, #6011: build_scripts command of distutils handles correctly
- non-ASCII path (path to the Python executable). Open and write the script in
- binary mode, but ensure that the shebang is decodable from UTF-8 and from the
- encoding of the script.
-
-- Issue #8498: In socket.accept(), allow to specify 0 as a backlog value in
- order to accept exactly one connection. Patch by Daniel Evers.
-
-- Issue #12011: signal.signal() and signal.siginterrupt() raise an OSError,
- instead of a RuntimeError: OSError has an errno attribute.
-
-- Issue #3709: add a flush_headers method to BaseHTTPRequestHandler, which
- manages the sending of headers to output stream and flushing the internal
- headers buffer. Patch contribution by Andrew Schaaf
-
-- Issue #11743: Rewrite multiprocessing connection classes in pure Python.
-
-- Issue #11164: Stop trying to use _xmlplus in the xml module.
-
-- Issue #11888: Add log2 function to math module. Patch written by Mark
- Dickinson.
-
-- Issue #12012: ssl.PROTOCOL_SSLv2 becomes optional.
-
-- Issue #8407: The signal handler writes the signal number as a single byte
- instead of a nul byte into the wakeup file descriptor. So it is possible to
- wait more than one signal and know which signals were raised.
-
-- Issue #8407: Add pthread_kill(), sigpending() and sigwait() functions to the
- signal module.
-
-- Issue #11927: SMTP_SSL now uses port 465 by default as documented. Patch
- by Kasun Herath.
-
-- Issue #12002: ftplib's abort() method raises TypeError.
-
-- Issue #11916: Add a number of MacOSX specific definitions to the errno module.
- Patch by Pierre Carrier.
-
-- Issue #11999: fixed sporadic sync failure mailbox.Maildir due to its trying to
- detect mtime changes by comparing to the system clock instead of to the
- previous value of the mtime.
-
-- Issue #11072: added MLSD command (RFC-3659) support to ftplib.
-
-- Issue #8808: The IMAP4_SSL constructor now allows passing an SSLContext
- parameter to control parameters of the secure channel. Patch by Sijin
- Joseph.
-
-- ntpath.samefile failed to notice that "a.txt" and "A.TXT" refer to the same
- file on Windows XP. As noticed in issue #10684.
-
-- Issue #12000: When a SSL certificate has a subjectAltName without any
- dNSName entry, ssl.match_hostname() should use the subject's commonName.
- Patch by Nicolas Bareil.
-
-- Issue #10775: assertRaises, assertRaisesRegex, assertWarns, and
- assertWarnsRegex now accept a keyword argument 'msg' when used as context
- managers. Initial patch by Winston Ewert.
-
-- Issue #10684: shutil.move used to delete a folder on case insensitive
- filesystems when the source and destination name where the same except
- for the case.
-
-- Issue #11647: objects created using contextlib.contextmanager now support
- more than one call to the function when used as a decorator. Initial patch
- by Ysj Ray.
-
-- Issue #11930: Removed deprecated time.accept2dyear variable.
- Removed year >= 1000 restriction from datetime.strftime.
-
-- logging: don't define QueueListener if Python has no thread support.
-
-- functools.cmp_to_key() now works with collections.Hashable().
-
-- Issue #11277: mmap.mmap() calls fcntl(fd, F_FULLFSYNC) on Mac OS X to get
- around a mmap bug with sparse files. Patch written by Steffen Daode Nurpmeso.
-
-- Issue #8407: Add signal.pthread_sigmask() function to fetch and/or change the
- signal mask of the calling thread.
-
-- Issue #11858: configparser.ExtendedInterpolation expected lower-case section
- names.
-
-- Issue #11324: ConfigParser(interpolation=None) now works correctly.
-
-- Issue #11811: ssl.get_server_certificate() is now IPv6-compatible. Patch
- by Charles-François Natali.
-
-- Issue #11763: don't use difflib in TestCase.assertMultiLineEqual if the
- strings are too long.
-
-- Issue #11236: getpass.getpass responds to ctrl-c or ctrl-z on terminal.
-
-- Issue #11856: Speed up parsing of JSON numbers.
-
-- Issue #11005: threading.RLock()._release_save() raises a RuntimeError if the
- lock was not acquired.
-
-- Issue #11258: Speed up ctypes.util.find_library() under Linux by a factor
- of 5 to 10. Initial patch by Jonas H.
-
-- Issue #11382: Trivial system calls, such as dup() or pipe(), needn't
- release the GIL. Patch by Charles-François Natali.
-
-- Issue #11223: Add threading._info() function providing informations about
- the thread implementation.
-
-- Issue #11731: simplify/enhance email parser/generator API by introducing
- policy objects.
-
-- Issue #11768: The signal handler of the signal module only calls
- Py_AddPendingCall() for the first signal to fix a deadlock on reentrant or
- parallel calls. PyErr_SetInterrupt() writes also into the wake up file.
-
-- Issue #11492: fix several issues with header folding in the email package.
-
-- Issue #11852: Add missing imports and update tests.
-
-- Issue #11875: collections.OrderedDict's __reduce__ was temporarily
- mutating the object instead of just working on a copy.
-
-- Issue #11467: Fix urlparse behavior when handling urls which contains scheme
- specific part only digits. Patch by Santoso Wijaya.
-
-- collections.Counter().copy() now works correctly for subclasses.
-
-- Issue #11474: Fix the bug with url2pathname() handling of '/C|/' on Windows.
- Patch by Santoso Wijaya.
-
-- Issue #11684: complete email.parser bytes API by adding BytesHeaderParser.
-
-- The bz2 module now handles 4GiB+ input buffers correctly.
-
-- Issue #9233: Fix json.loads('{}') to return a dict (instead of a list), when
- _json is not available.
-
-- Issue #11830: Remove unnecessary introspection code in the decimal module.
-
-- Issue #11703: urllib2.geturl() does not return correct url when the original
- url contains #fragment.
-
-- Issue #10019: Fixed regression in json module where an indent of 0 stopped
- adding newlines and acted instead like 'None'.
-
-- Issue #11186: pydoc ignores a module if its name contains a surrogate
- character in the index of modules.
-
-- Issue #11815: Use a light-weight SimpleQueue for the result queue in
- concurrent.futures.ProcessPoolExecutor.
-
-- Issue #5162: Treat services like frozen executables to allow child spawning
- from multiprocessing.forking on Windows.
-
-- logging.basicConfig now supports an optional 'handlers' argument taking an
- iterable of handlers to be added to the root logger. Additional parameter
- checks were also added to basicConfig.
-
-- Issue #11814: Fix likely typo in multiprocessing.Pool._terminate().
-
-- Issue #11747: Fix range formatting in difflib.context_diff() and
- difflib.unified_diff().
-
-- Issue #8428: Fix a race condition in multiprocessing.Pool when terminating
- worker processes: new processes would be spawned while the pool is being
- shut down. Patch by Charles-François Natali.
-
-- Issue #2650: re.escape() no longer escapes the '_'.
-
-- Issue #11757: select.select() now raises ValueError when a negative timeout
- is passed (previously, a select.error with EINVAL would be raised). Patch
- by Charles-François Natali.
-
-- Issue #7311: fix html.parser to accept non-ASCII attribute values.
-
-- Issue #11605: email.parser.BytesFeedParser was incorrectly converting
- multipart subparts with an 8-bit CTE into unicode instead of preserving the
- bytes.
-
-- Issue #1690608: email.util.formataddr is now RFC 2047 aware: it now has a
- charset parameter that defaults to utf-8 and is used as the charset for RFC
- 2047 encoding when the realname contains non-ASCII characters.
-
-- Issue #10963: Ensure that subprocess.communicate() never raises EPIPE.
-
-- Issue #10791: Implement missing method GzipFile.read1(), allowing GzipFile
- to be wrapped in a TextIOWrapper. Patch by Nadeem Vawda.
-
-- Issue #11707: Added a fast C version of functools.cmp_to_key().
- Patch by Filip Gruszczyński.
-
-- Issue #11688: Add sqlite3.Connection.set_trace_callback(). Patch by
- Torsten Landschoff.
-
-- Issue #11746: Fix SSLContext.load_cert_chain() to accept elliptic curve
- private keys.
-
-- Issue #5863: Rewrite BZ2File in pure Python, and allow it to accept
- file-like objects using a new ``fileobj`` constructor argument. Patch by
- Nadeem Vawda.
-
-- unittest.TestCase.assertSameElements has been removed.
-
-- sys.getfilesystemencoding() raises a RuntimeError if initfsencoding() was not
- called yet: detect bootstrap (startup) issues earlier.
-
-- Issue #11393: Add the new faulthandler module.
-
-- Issue #11618: Fix the timeout logic in threading.Lock.acquire() under Windows.
-
-- Removed the 'strict' argument to email.parser.Parser, which has been
- deprecated since Python 2.4.
-
-- Issue #11256: Fix inspect.getcallargs on functions that take only keyword
- arguments.
-
-- Issue #11696: Fix ID generation in msilib.
-
-- itertools.accumulate now supports an optional *func* argument for
- a user-supplied binary function.
-
-- Issue #11692: Remove unnecessary demo functions in subprocess module.
-
-- Issue #9696: Fix exception incorrectly raised by xdrlib.Packer.pack_int when
- trying to pack a negative (in-range) integer.
-
-- Issue #11675: multiprocessing.[Raw]Array objects created from an integer size
- are now zeroed on creation. This matches the behaviour specified by the
- documentation.
-
-- Issue #7639: Fix short file name generation in bdist_msi
-
-- Issue #11635: Don't use polling in worker threads and processes launched by
- concurrent.futures.
-
-- Issue #5845: Automatically read readline configuration to enable completion
- in interactive mode.
-
-- Issue #6811: Allow importlib to change a code object's co_filename attribute
- to match the path to where the source code currently is, not where the code
- object originally came from.
-
-- Issue #8754: Have importlib use the repr of a module name in error messages.
-
-- Issue #11591: Prevent "import site" from modifying sys.path when python
- was started with -S.
-
-- collections.namedtuple() now adds a _source attribute to the generated
- class. This make the source more accessible than the outdated
- "verbose" option which prints to stdout but doesn't make the source
- string available.
-
-- Issue #11371: Mark getopt error messages as localizable. Patch by Filip
- Gruszczyński.
-
-- Issue #11333: Add __slots__ to collections ABCs.
-
-- Issue #11628: cmp_to_key generated class should use __slots__.
-
-- Issue #11666: let help() display named tuple attributes and methods
- that start with a leading underscore.
-
-- Issue #11662: Make urllib and urllib2 ignore redirections if the
- scheme is not HTTP, HTTPS or FTP (CVE-2011-1521).
-
-- Issue #5537: Fix time2isoz() and time2netscape() functions of
- httplib.cookiejar for expiration year greater than 2038 on 32-bit systems.
-
-- Issue #4391: Use proper gettext plural forms in optparse.
-
-- Issue #11127: Raise a TypeError when trying to pickle a socket object.
-
-- Issue #11563: ``Connection: close`` header is sent by requests using URLOpener
- class which helps in closing of sockets after connection is over. Patch
- contributions by Jeff McNeil and Nadeem Vawda.
-
-- Issue #11459: A ``bufsize`` value of 0 in subprocess.Popen() really creates
- unbuffered pipes, such that select() works properly on them.
-
-- Issue #5421: Fix misleading error message when one of socket.sendto()'s
- arguments has the wrong type. Patch by Nikita Vetoshkin.
-
-- Issue #10812: Add some extra posix functions to the os module.
-
-- Issue #10979: unittest stdout buffering now works with class and module
- setup and teardown.
-
-- Issue #11243: fix the parameter querying methods of Message to work if
- the headers contain un-encoded non-ASCII data.
-
-- Issue #11401: fix handling of headers with no value; this fixes a regression
- relative to Python2 and the result is now the same as it was in Python2.
-
-- Issue #9298: base64 bodies weren't being folded to line lengths less than 78,
- which was a regression relative to Python2. Unlike Python2, the last line
- of the folded body now ends with a carriage return.
-
-- Issue #11560: shutil.unpack_archive now correctly handles the format
- parameter. Patch by Evan Dandrea.
-
-- Issue #5870: Add `subprocess.DEVNULL` constant.
-
-- Issue #11133: fix two cases where inspect.getattr_static can trigger code
- execution. Patch by Andreas Stührk.
-
-- Issue #11569: use absolute path to the sysctl command in multiprocessing to
- ensure that it will be found regardless of the shell PATH. This ensures
- that multiprocessing.cpu_count works on default installs of MacOSX.
-
-- Issue #11501: disutils.archive_utils.make_zipfile no longer fails if zlib is
- not installed. Instead, the zipfile.ZIP_STORED compression is used to create
- the ZipFile. Patch by Natalia B. Bidart.
-
-- Issue #11289: `smtp.SMTP` class is now a context manager so it can be used
- in a `with` statement. Contributed by Giampaolo Rodola.
-
-- Issue #11554: Fixed support for Japanese codecs; previously the body output
- encoding was not done if euc-jp or shift-jis was specified as the charset.
-
-- Issue #11407: `TestCase.run` returns the result object used or created.
- Contributed by Janathan Hartley.
-
-- Issue #11500: Fixed a bug in the OS X proxy bypass code for fully qualified
- IP addresses in the proxy exception list.
-
-- Issue #11491: dbm.error is no longer raised when dbm.open is called with
- the "n" as the flag argument and the file exists. The behavior matches
- the documentation and general logic.
-
-- Issue #1162477: Postel Principle adjustment to email date parsing: handle the
- fact that some non-compliant MUAs use '.' instead of ':' in time specs.
-
-- Issue #11131: Fix sign of zero in decimal.Decimal plus and minus
- operations when the rounding mode is ROUND_FLOOR.
-
-- Issue #9935: Speed up pickling of instances of user-defined classes.
-
-- Issue #5622: Fix curses.wrapper to raise correct exception if curses
- initialization fails.
-
-- Issue #11408: In threading.Lock.acquire(), only call gettimeofday() when
- really necessary. Patch by Charles-François Natali.
-
-- Issue #11391: Writing to a mmap object created with
- ``mmap.PROT_READ|mmap.PROT_EXEC`` would segfault instead of raising a
- TypeError. Patch by Charles-François Natali.
-
-- Issue #9795: add context manager protocol support for nntplib.NNTP class.
-
-- Issue #11306: mailbox in certain cases adapts to an inability to open
- certain files in read-write mode. Previously it detected this by
- checking for EACCES, now it also checks for EROFS.
-
-- Issue #11265: asyncore now correctly handles EPIPE, EBADF and EAGAIN errors
- on accept(), send() and recv().
-
-- Issue #11377: Deprecate platform.popen() and reimplement it with os.popen().
-
-- Issue #8513: On UNIX, subprocess supports bytes command string.
-
-- Issue #10866: Add socket.sethostname(). Initial patch by Ross Lagerwall.
-
-- Issue #11140: Lock.release() now raises a RuntimeError when attempting
- to release an unacquired lock, as claimed in the threading documentation.
- The _thread.error exception is now an alias of RuntimeError. Patch by
- Filip Gruszczyński. Patch for _dummy_thread by Aymeric Augustin.
-
-- Issue #8594: ftplib now provides a source_address parameter to specify which
- (address, port) to bind to before connecting.
-
-- Issue #11326: Add the missing connect_ex() implementation for SSL sockets,
- and make it work for non-blocking connects.
-
-- Issue #11297: Add collections.ChainMap().
-
-- Issue #10755: Add the posix.flistdir() function. Patch by Ross Lagerwall.
-
-- Issue #4761: Add the ``*at()`` family of functions (openat(), etc.) to the
- posix module. Patch by Ross Lagerwall.
-
-- Issue #7322: Trying to read from a socket's file-like object after a timeout
- occurred now raises an error instead of silently losing data.
-
-- Issue #11291: poplib.POP no longer suppresses errors on quit().
-
-- Issue #11177: asyncore's create_socket() arguments can now be omitted.
-
-- Issue #6064: Add a ``daemon`` keyword argument to the threading.Thread
- and multiprocessing.Process constructors in order to override the
- default behaviour of inheriting the daemonic property from the current
- thread/process.
-
-- Issue #10956: Buffered I/O classes retry reading or writing after a signal
- has arrived and the handler returned successfully.
-
-- Issue #10784: New os.getpriority() and os.setpriority() functions.
-
-- Issue #11114: Fix catastrophic performance of tell() on text files (up
- to 1000x faster in some cases). It is still one to two order of magnitudes
- slower than binary tell().
-
-- Issue #10882: Add os.sendfile function.
-
-- Issue #10868: Allow usage of the register method of an ABC as a class
- decorator.
-
-- Issue #11224: Fixed a regression in tarfile that affected the file-like
- objects returned by TarFile.extractfile() regarding performance, memory
- consumption and failures with the stream interface.
-
-- Issue #10924: Adding salt and Modular Crypt Format to crypt library.
- Moved old C wrapper to _crypt, and added a Python wrapper with
- enhanced salt generation and simpler API for password generation.
-
-- Issue #11074: Make 'tokenize' so it can be reloaded.
-
-- Issue #11085: Moved collections abstract base classes into a separate
- module called collections.abc, following the pattern used by importlib.abc.
- For backwards compatibility, the names are imported into the collections
- module.
-
-- Issue #4681: Allow mmap() to work on file sizes and offsets larger than
- 4GB, even on 32-bit builds. Initial patch by Ross Lagerwall, adapted for
- 32-bit Windows.
-
-- Issue #11169: compileall module uses repr() to format filenames and paths to
- escape surrogate characters and show spaces.
-
-- Issue #11089: Fix performance issue limiting the use of ConfigParser()
- with large config files.
-
-- Issue #10276: Fix the results of zlib.crc32() and zlib.adler32() on buffers
- larger than 4GB. Patch by Nadeem Vawda.
-
-- Issue #11388: Added a clear() method to MutableSequence
-
-- Issue #11174: Add argparse.MetavarTypeHelpFormatter, which uses type names
- for the names of optional and positional arguments in help messages.
-
-- Issue #9348: Raise an early error if argparse nargs and metavar don't match.
-
-- Issue #9026: Fix order of argparse sub-commands in help messages.
-
-- Issue #9347: Fix formatting for tuples in argparse type= error messages.
-
-- Issue #12191: Added shutil.chown() to change user and/or group owner of a
- given path also specifying their names.
-
-- Issue #13988: The _elementtree accelerator is used whenever available.
- Now xml.etree.cElementTree becomes a deprecated alias to ElementTree.
-
-Build
------
-
-- Issue #6807: Run msisupport.mak earlier.
-
-- Issue #10580: Minor grammar change in Windows installer.
-
-- Issue #13326: Clean __pycache__ directories correctly on OpenBSD.
-
-- PEP 393: the configure option --with-wide-unicode is removed.
-
-- Issue #12852: Set _XOPEN_SOURCE to 700, instead of 600, to get POSIX 2008
- functions on OpenBSD (e.g. fdopendir).
-
-- Issue #11863: Remove support for legacy systems deprecated in Python 3.2
- (following PEP 11). These systems are systems using Mach C Threads,
- SunOS lightweight processes, GNU pth threads and IRIX threads.
-
-- Issue #8746: Correct faulty configure checks so that os.chflags() and
- os.lchflags() are once again built on systems that support these
- functions (BSD and OS X). Also add new stat file flags for OS X
- (UF_HIDDEN and UF_COMPRESSED).
-
-- Issue #10645: Installing Python no longer creates a
- Python-X.Y.Z-pyX.Y.egg-info file in the lib-dynload directory.
-
-- Do not accidentally include the directory containing sqlite.h twice when
- building sqlite3.
-
-- Issue #11217: For 64-bit/32-bit Mac OS X universal framework builds,
- ensure "make install" creates symlinks in --prefix bin for the "-32"
- files in the framework bin directory like the installer does.
-
-- Issue #11347: Use --no-as-needed when linking libpython3.so.
-
-- Issue #11411: Fix 'make DESTDIR=' with a relative destination.
-
-- Issue #11268: Prevent Mac OS X Installer failure if Documentation
- package had previously been installed.
-
-- Issue #11495: OSF support is eliminated. It was deprecated in Python 3.2.
-
-IDLE
-----
-
-- Issue #14409: IDLE now properly executes commands in the Shell window
- when it cannot read the normal config files on startup and
- has to use the built-in default key bindings.
- There was previously a bug in one of the defaults.
-
-- IDLE can be launched as python -m idlelib
-
-- Issue #3573: IDLE hangs when passing invalid command line args
- (directory(ies) instead of file(s)) (Patch by Guilherme Polo)
-
-- Issue #14200: IDLE shell crash on printing non-BMP unicode character.
-
-- Issue #5219: Prevent event handler cascade in IDLE.
-
-- Issue #964437: Make IDLE help window non-modal.
- Patch by Guilherme Polo and Roger Serwy.
-
-- Issue #13933: IDLE auto-complete did not work with some imported
- module, like hashlib. (Patch by Roger Serwy)
-
-- Issue #13506: Add '' to path for IDLE Shell when started and restarted with Restart Shell.
- Original patches by Marco Scataglini and Roger Serwy.
-
-- Issue #4625: If IDLE cannot write to its recent file or breakpoint files,
- display a message popup and continue rather than crash. Original patch by
- Roger Serwy.
-
-- Issue #8641: Update IDLE 3 syntax coloring to recognize b".." and not u"..".
- Patch by Tal Einat.
-
-- Issue #13296: Fix IDLE to clear compile __future__ flags on shell restart.
- (Patch by Roger Serwy)
-
-- Issue #9871: Prevent IDLE 3 crash when given byte stings
- with invalid hex escape sequences, like b'\x0'.
- (Original patch by Claudiu Popa.)
-
-- Issue #12636: IDLE reads the coding cookie when executing a Python script.
-
-- Issue #12540: Prevent zombie IDLE processes on Windows due to changes
- in os.kill().
-
-- Issue #12590: IDLE editor window now always displays the first line
- when opening a long file. With Tk 8.5, the first line was hidden.
-
-- Issue #11088: don't crash when using F5 to run a script in IDLE on MacOSX
- with Tk 8.5.
-
-- Issue #1028: Tk returns invalid Unicode null in %A: UnicodeDecodeError.
- With Tk < 8.5 _tkinter.c:PythonCmd() raised UnicodeDecodeError, caused
- IDLE to exit. Converted to valid Unicode null in PythonCmd().
-
-- Issue #11718: IDLE's open module dialog couldn't find the __init__.py
- file in a package.
-
-Tools/Demos
------------
-
-- Issue #14053: patchcheck.py ("make patchcheck") now works with MQ patches.
- Patch by Francisco Martín Brugué.
-
-- Issue #13930: 2to3 is now able to write its converted output files to another
- directory tree as well as copying unchanged files and altering the file
- suffix. See its new -o, -W and --add-suffix options. This makes it more
- useful in many automated code translation workflows.
-
-- Issue #13628: python-gdb.py is now able to retrieve more frames in the Python
- traceback if Python is optimized.
-
-- Issue #11996: libpython (gdb), replace "py-bt" command by "py-bt-full" and
- add a smarter "py-bt" command printing a classic Python traceback.
-
-- Issue #11179: Make ccbench work under Python 3.1 and 2.7 again.
-
-- Issue #10639: reindent.py no longer converts newlines and will raise
- an error if attempting to convert a file with mixed newlines.
- "--newline" option added to specify new line character.
-
-Extension Modules
------------------
-
-- Issue #16847: Fixed improper use of _PyUnicode_CheckConsistency() in
- non-pydebug builds. Several extension modules now compile cleanly when
- assert()s are enabled in standard builds (-DDEBUG flag).
-
-- Issue #13840: The error message produced by ctypes.create_string_buffer
- when given a Unicode string has been fixed.
-
-- Issue #9975: socket: Fix incorrect use of flowinfo and scope_id. Patch by
- Vilmos Nebehaj.
-
-- Issue #7777: socket: Add Reliable Datagram Sockets (PF_RDS) support.
-
-- Issue #13159: FileIO and BZ2Compressor/BZ2Decompressor now use a linear-time
- buffer growth strategy instead of a quadratic-time one.
-
-- Issue #10141: socket: Add SocketCAN (PF_CAN) support. Initial patch by
- Matthias Fuchs, updated by Tiago Gonçalves.
-
-- Issue #13070: Fix a crash when a TextIOWrapper caught in a reference cycle
- would be finalized after the reference to its underlying BufferedRWPair's
- writer got cleared by the GC.
-
-- Issue #12881: ctypes: Fix segfault with large structure field names.
-
-- Issue #13058: ossaudiodev: fix a file descriptor leak on error. Patch by
- Thomas Jarosch.
-
-- Issue #13013: ctypes: Fix a reference leak in PyCArrayType_from_ctype.
- Thanks to Suman Saha for finding the bug and providing a patch.
-
-- Issue #13022: Fix: _multiprocessing.recvfd() doesn't check that
- file descriptor was actually received.
-
-- Issue #1172711: Add 'long long' support to the array module.
- Initial patch by Oren Tirosh and Hirokazu Yamamoto.
-
-- Issue #12483: ctypes: Fix a crash when the destruction of a callback
- object triggers the garbage collector.
-
-- Issue #12950: Fix passing file descriptors in multiprocessing, under
- OpenIndiana/Illumos.
-
-- Issue #12764: Fix a crash in ctypes when the name of a Structure field is not
- a string.
-
-- Issue #11241: subclasses of ctypes.Array can now be subclassed.
-
-- Issue #9651: Fix a crash when ctypes.create_string_buffer(0) was passed to
- some functions like file.write().
-
-- Issue #10309: Define _GNU_SOURCE so that mremap() gets the proper
- signature. Without this, architectures where sizeof void* != sizeof int are
- broken. Patch given by Hallvard B Furuseth.
-
-- Issue #12051: Fix segfault in json.dumps() while encoding highly-nested
- objects using the C accelerations.
-
-- Issue #12017: Fix segfault in json.loads() while decoding highly-nested
- objects using the C accelerations.
-
-- Issue #1838: Prevent segfault in ctypes, when _as_parameter_ on a class is set
- to an instance of the class.
-
-Tests
------
-
-- Issue #13125: Silence spurious test_lib2to3 output when in non-verbose mode.
- Patch by Mikhail Novikov.
-
-- Issue #13447: Add a test file to host regression tests for bugs in the
- scripts found in the Tools directory.
-
-- Issue #10881: Fix test_site failure with OS X framework builds.
-
-- Issue #13901: Prevent test_distutils failures on OS X with --enable-shared.
-
-- Issue #13862: Fix spurious failure in test_zlib due to runtime/compile time
- minor versions not matching.
-
-- Issue #12804: Fix test_socket and test_urllib2net failures when running tests
- on a system without internet access.
-
-- Issue #13726: Fix the ambiguous -S flag in regrtest. It is -o/--slow for slow
- tests.
-
-- Issue #11659: Fix ResourceWarning in test_subprocess introduced by #11459.
- Patch by Ben Hayden.
-
-- Issue #11577: fix ResourceWarning triggered by improved binhex test coverage
-
-- Issue #11509: Significantly increase test coverage of fileinput.
- Patch by Denver Coneybeare at PyCon 2011 Sprints.
-
-- Issue #11689: Fix a variable scoping error in an sqlite3 test
-
-- Issue #13786: Remove unimplemented 'trace' long option from regrtest.py.
-
-- Issue #13725: Fix regrtest to recognize the documented -d flag.
- Patch by Erno Tukia.
-
-- Issue #13304: Skip test case if user site-packages disabled (-s or
- PYTHONNOUSERSITE). (Patch by Carl Meyer)
-
-- Issue #5661: Add a test for ECONNRESET/EPIPE handling to test_asyncore. Patch
- by Xavier de Gaye.
-
-- Issue #13218: Fix test_ssl failures on Debian/Ubuntu.
-
-- Re-enable lib2to3's test_parser.py tests, though with an expected failure
- (see issue #13125).
-
-- Issue #12656: Add tests for IPv6 and Unix sockets to test_asyncore.
-
-- Issue #6484: Add unit tests for mailcap module (patch by Gregory Nofi)
-
-- Issue #11651: Improve the Makefile test targets to run more of the test suite
- more quickly. The --multiprocess option is now enabled by default, reducing
- the amount of time needed to run the tests. "make test" and "make quicktest"
- now include some resource-intensive tests, but no longer run the test suite
- twice to check for bugs in .pyc generation. Tools/scripts/run_test.py provides
- an easy platform-independent way to run test suite with sensible defaults.
-
-- Issue #12331: The test suite for the packaging module can now run from an
- installed Python.
-
-- Issue #12331: The test suite for lib2to3 can now run from an installed
- Python.
-
-- Issue #12626: In regrtest, allow to filter tests using a glob filter
- with the ``-m`` (or ``--match``) option. This works with all test cases
- using the unittest module. This is useful with long test suites
- such as test_io or test_subprocess.
-
-- Issue #12624: It is now possible to fail after the first failure when
- running in verbose mode (``-v`` or ``-W``), by using the ``--failfast``
- (or ``-G``) option to regrtest. This is useful with long test suites
- such as test_io or test_subprocess.
-
-- Issue #12587: Correct faulty test file and reference in test_tokenize.
- (Patch by Robert Xiao)
-
-- Issue #12573: Add resource checks for dangling Thread and Process objects.
-
-- Issue #12549: Correct test_platform to not fail when OS X returns 'x86_64'
- as the processor type on some Mac systems.
-
-- Skip network tests when getaddrinfo() returns EAI_AGAIN, meaning a temporary
- failure in name resolution.
-
-- Issue #11812: Solve transient socket failure to connect to 'localhost'
- in test_telnetlib.py.
-
-- Solved a potential deadlock in test_telnetlib.py. Related to issue #11812.
-
-- Avoid failing in test_robotparser when mueblesmoraleda.com is flaky and
- an overzealous DNS service (e.g. OpenDNS) redirects to a placeholder
- Web site.
-
-- Avoid failing in test_urllibnet.test_bad_address when some overzealous
- DNS service (e.g. OpenDNS) resolves a non-existent domain name. The test
- is now skipped instead.
-
-- Issue #12440: When testing whether some bits in SSLContext.options can be
- reset, check the version of the OpenSSL headers Python was compiled against,
- rather than the runtime version of the OpenSSL library.
-
-- Issue #11512: Add a test suite for the cgitb module. Patch by Robbie Clemons.
-
-- Issue #12497: Install test/data to prevent failures of the various codecmaps
- tests.
-
-- Issue #12496: Install test/capath directory to prevent test_connect_capath
- testcase failure in test_ssl.
-
-- Issue #12469: Run wakeup and pending signal tests in a subprocess to run the
- test in a fresh process with only one thread and to not change signal
- handling of the parent process.
-
-- Issue #8716: Avoid crashes caused by Aqua Tk on OSX when attempting to run
- test_tk or test_ttk_guionly under a username that is not currently logged
- in to the console windowserver (as may be the case under buildbot or ssh).
-
-- Issue #12407: Explicitly skip test_capi.EmbeddingTest under Windows.
-
-- Issue #12400: regrtest -W doesn't rerun the tests twice anymore, but captures
- the output and displays it on failure instead. regrtest -v doesn't print the
- error twice anymore if there is only one error.
-
-- Issue #12141: Install copies of template C module file so that
- test_build_ext of test_distutils and test_command_build_ext of
- test_packaging are no longer silently skipped when
- run outside of a build directory.
-
-- Issue #8746: Add additional tests for os.chflags() and os.lchflags().
- Patch by Garrett Cooper.
-
-- Issue #10736: Fix test_ttk test_widgets failures with Cocoa Tk 8.5.9
- 2.8+ on Mac OS X. (Patch by Ronald Oussoren)
-
-- Issue #12057: Add tests for ISO 2022 codecs (iso2022_jp, iso2022_jp_2,
- iso2022_kr).
-
-- Issue #12096: Fix a race condition in test_threading.test_waitfor(). Patch
- written by Charles-François Natali.
-
-- Issue #11614: import __hello__ prints "Hello World!". Patch written by
- Andreas Stührk.
-
-- Issue #5723: Improve json tests to be executed with and without accelerations.
-
-- Issue #12041: Make test_wait3 more robust.
-
-- Issue #11873: Change regex in test_compileall to fix occasional failures when
- when the randomly generated temporary path happened to match the regex.
-
-- Issue #11958: Fix FTP tests for IPv6, bind to "::1" instead of "localhost".
- Patch written by Charles-Francois Natali.
-
-- Issue #8407, #11859: Fix tests of test_io using threads and an alarm: use
- pthread_sigmask() to ensure that the SIGALRM signal is received by the main
- thread.
-
-- Issue #11811: Factor out detection of IPv6 support on the current host
- and make it available as ``test.support.IPV6_ENABLED``. Patch by
- Charles-François Natali.
-
-- Issue #10914: Add a minimal embedding test to test_capi.
-
-- Issue #11223: Skip test_lock_acquire_interruption() and
- test_rlock_acquire_interruption() of test_threadsignals if a thread lock is
- implemented using a POSIX mutex and a POSIX condition variable. A POSIX
- condition variable cannot be interrupted by a signal (e.g. on Linux, the
- futex system call is restarted).
-
-- Issue #11790: Fix sporadic failures in test_multiprocessing.WithProcessesTestCondition.
-
-- Fix possible "file already exists" error when running the tests in parallel.
-
-- Issue #11719: Fix message about unexpected test_msilib skip on non-Windows
- platforms. Patch by Nadeem Vawda.
-
-- Issue #11727: Add a --timeout option to regrtest: if a test takes more than
- TIMEOUT seconds, dumps the traceback of all threads and exits.
-
-- Issue #11653: fix -W with -j in regrtest.
-
-- The email test suite now lives in the Lib/test/test_email package. The test
- harness code has also been modernized to allow use of new unittest features.
-
-- regrtest now discovers test packages as well as test modules.
-
-- Issue #11577: improve test coverage of binhex.py. Patch by Arkady Koplyarov.
-
-- New test_crashers added to exercise the scripts in the Lib/test/crashers
- directory and confirm they fail as expected
-
-- Issue #11578: added test for the timeit module. Patch by Michael Henry.
-
-- Issue #11503: improve test coverage of posixpath.py. Patch by Evan Dandrea.
-
-- Issue #11505: improves test coverage of string.py, increases granularity of
- string.Formatter tests. Initial patch by Alicia Arlen.
-
-- Issue #11548: Improve test coverage of the shutil module. Patch by
- Evan Dandrea.
-
-- Issue #11554: Reactivated test_email_codecs.
-
-- Issue #11505: improves test coverage of string.py. Patch by Alicia
- Arlen
-
-- Issue #11490: test_subprocess.test_leaking_fds_on_error no longer gives a
- false positive if the last directory in the path is inaccessible.
-
-- Issue #11223: Fix test_threadsignals to fail, not hang, when the
- non-semaphore implementation of locks is used under POSIX.
-
-- Issue #10911: Add tests on CGI with non-ASCII characters. Patch written by
- Pierre Quentel.
-
-- Issue #9931: Fix hangs in GUI tests under Windows in certain conditions.
- Patch by Hirokazu Yamamoto.
-
-- Issue #10512: Properly close sockets under test.test_cgi.
-
-- Issue #10992: Make tests pass under coverage.
-
-- Issue #10826: Prevent sporadic failure in test_subprocess on Solaris due
- to open door files.
-
-- Issue #10990: Prevent tests from clobbering a set trace function.
-
-C-API
------
-
-- Issue #13452: PyUnicode_EncodeDecimal() doesn't support error handlers
- different than "strict" anymore. The caller was unable to compute the
- size of the output buffer: it depends on the error handler.
-
-- Issue #13560: Add PyUnicode_DecodeLocale(), PyUnicode_DecodeLocaleAndSize()
- and PyUnicode_EncodeLocale() functions to the C API to decode/encode from/to
- the current locale encoding.
-
-- Issue #10831: PyUnicode_FromFormat() supports %li, %lli and %zi formats.
-
-- Issue #11246: Fix PyUnicode_FromFormat("%V") to decode the byte string from
- UTF-8 (with replace error handler) instead of ISO-8859-1 (in strict mode).
- Patch written by Ray Allen.
-
-- Issue #10830: Fix PyUnicode_FromFormatV("%c") for non-BMP characters on
- narrow build.
-
-- Add PyObject_GenericGetDict and PyObject_GeneriSetDict. They are generic
- implementations for the getter and setter of a ``__dict__`` descriptor of C
- types.
-
-- Issue #13727: Add 3 macros to access PyDateTime_Delta members:
- PyDateTime_DELTA_GET_DAYS, PyDateTime_DELTA_GET_SECONDS,
- PyDateTime_DELTA_GET_MICROSECONDS.
-
-- Issue #10542: Add 4 macros to work with surrogates: Py_UNICODE_IS_SURROGATE,
- Py_UNICODE_IS_HIGH_SURROGATE, Py_UNICODE_IS_LOW_SURROGATE,
- Py_UNICODE_JOIN_SURROGATES.
-
-- Issue #12724: Add Py_RETURN_NOTIMPLEMENTED macro for returning NotImplemented.
-
-- PY_PATCHLEVEL_REVISION has been removed, since it's meaningless with
- Mercurial.
-
-- Issue #12173: The first argument of PyImport_ImportModuleLevel is now `const
- char *` instead of `char *`.
-
-- Issue #12380: PyArg_ParseTuple now accepts a bytearray for the 'c' format.
-
-Documentation
--------------
-
-- Issue #23006: Improve the documentation and indexing of dict.__missing__.
- Add an entry in the language datamodel special methods section.
- Revise and index its discussion in the stdtypes mapping/dict section.
-
-- Issue #13989: Document that GzipFile does not support text mode, and give a
- more helpful error message when opened with an invalid mode string.
-
-- Issue #13921: Undocument and clean up sqlite3.OptimizedUnicode,
- which is obsolete in Python 3.x. It's now aliased to str for
- backwards compatibility.
-
-- Issue #12102: Document that buffered files must be flushed before being used
- with mmap. Patch by Steffen Daode Nurpmeso.
-
-- Issue #8982: Improve the documentation for the argparse Namespace object.
-
-- Issue #9343: Document that argparse parent parsers must be configured before
- their children.
-
-- Issue #13498: Clarify docs of os.makedirs()'s exist_ok argument. Done with
- great native-speaker help from R. David Murray.
-
-- Issues #13491 and #13995: Fix many errors in sqlite3 documentation.
- Initial patch for #13491 by Johannes Vogel.
-
-- Issue #13402: Document absoluteness of sys.executable.
-
-- Issue #13883: PYTHONCASEOK also works on OS X.
-
-- Issue #9021: Add an introduction to the copy module documentation.
-
-- Issue #6005: Examples in the socket library documentation use sendall, where
- relevant, instead send method.
-
-- Issue #12798: Updated the mimetypes documentation.
-
-- Issue #12949: Document the kwonlyargcount argument for the PyCode_New
- C API function.
-
-- Issue #13513: Fix io.IOBase documentation to correctly link to the
- io.IOBase.readline method instead of the readline module.
-
-- Issue #13237: Reorganise subprocess documentation to emphasise convenience
- functions and the most commonly needed arguments to Popen.
-
-- Issue #13141: Demonstrate recommended style for socketserver examples.
-
-- Issue #11818: Fix tempfile examples for Python 3.
-
-
**(For information about older versions, consult the HISTORY file.)**
diff --git a/Misc/Porting b/Misc/Porting
index 51f73e63d1..c43b112978 100644
--- a/Misc/Porting
+++ b/Misc/Porting
@@ -1,41 +1 @@
-Q. I want to port Python to a new platform. How do I begin?
-
-A. I guess the two things to start with is to familiarize yourself
-with are the development system for your target platform and the
-generic build process for Python. Make sure you can compile and run a
-simple hello-world program on your target platform. Make sure you can
-compile and run the Python interpreter on a platform to which it has
-already been ported (preferably Unix, but Mac or Windows will do,
-too).
-
-I also would never start something like this without at least
-medium-level understanding of your target platform (i.e. how it is
-generally used, how to write platform specific apps etc.) and Python
-(or else you'll never know how to test the results).
-
-The build process for Python, in particular the Makefiles in the
-source distribution, will give you a hint on which files to compile
-for Python. Not all source files are relevant -- some are platform
-specific, others are only used in emergencies (e.g. getopt.c). The
-Makefiles tell the story.
-
-You'll also need a pyconfig.h file tailored for your platform. You can
-start with pyconfig.h.in, read the comments and turn on definitions that
-apply to your platform.
-
-And you'll need a config.c file, which lists the built-in modules you
-support. Start with Modules/config.c.in.
-
-Finally, you'll run into some things that aren't supported on your
-target platform. Forget about the posix module for now -- simply take
-it out of the config.c file.
-
-Bang on it until you get a >>> prompt. (You may have to disable the
-importing of "site.py" by passing the -S option.)
-
-Then bang on it until it executes very simple Python statements.
-
-Now bang on it some more. At some point you'll want to use the os
-module; this is the time to start thinking about what to do with the
-posix module. It's okay to simply #ifdef out those functions that
-cause problems; the remaining ones will be quite useful.
+This document is moved to https://docs.python.org/devguide/faq.html#how-do-i-port-python-to-a-new-platform
diff --git a/Misc/coverity_model.c b/Misc/coverity_model.c
index 57f3aeb11a..493e7c1b30 100644
--- a/Misc/coverity_model.c
+++ b/Misc/coverity_model.c
@@ -85,7 +85,7 @@ PyObject *PyErr_SetFromErrnoWithFilename(PyObject *exc, const char *filename)
}
/* Python/fileutils.c */
-wchar_t *_Py_char2wchar(const char* arg, size_t *size)
+wchar_t *Py_DecodeLocale(const char* arg, size_t *size)
{
wchar_t *w;
__coverity_tainted_data_sink__(arg);
@@ -122,7 +122,8 @@ static long r_long(RFILE *p)
/* Coverity doesn't understand that fdopendir() may take ownership of fd. */
-DIR *fdopendir(int fd) {
+DIR *fdopendir(int fd)
+{
DIR *d;
if (d) {
__coverity_close__(fd);
@@ -130,3 +131,58 @@ DIR *fdopendir(int fd) {
return d;
}
+/* Modules/_datetime.c
+ *
+ * Coverity thinks that the input values for these function come from a
+ * tainted source PyDateTime_DATE_GET_* macros use bit shifting.
+ */
+static PyObject *
+build_struct_time(int y, int m, int d, int hh, int mm, int ss, int dstflag)
+{
+ PyObject *result;
+
+ __coverity_tainted_data_sanitize__(y);
+ __coverity_tainted_data_sanitize__(m);
+ __coverity_tainted_data_sanitize__(d);
+ __coverity_tainted_data_sanitize__(hh);
+ __coverity_tainted_data_sanitize__(mm);
+ __coverity_tainted_data_sanitize__(ss);
+ __coverity_tainted_data_sanitize__(dstflag);
+
+ return result;
+}
+
+static int
+ymd_to_ord(int year, int month, int day)
+{
+ int ord = 0;
+
+ __coverity_tainted_data_sanitize__(year);
+ __coverity_tainted_data_sanitize__(month);
+ __coverity_tainted_data_sanitize__(day);
+
+ return ord;
+}
+
+static int
+normalize_date(int *year, int *month, int *day)
+{
+ __coverity_tainted_data_sanitize__(*year);
+ __coverity_tainted_data_sanitize__(*month);
+ __coverity_tainted_data_sanitize__(*day);
+
+ return 0;
+}
+
+static int
+weekday(int year, int month, int day)
+{
+ int w = 0;
+
+ __coverity_tainted_data_sanitize__(year);
+ __coverity_tainted_data_sanitize__(month);
+ __coverity_tainted_data_sanitize__(day);
+
+ return w;
+}
+
diff --git a/Misc/gdbinit b/Misc/gdbinit
index 9484b51824..3b6fe50ef9 100644
--- a/Misc/gdbinit
+++ b/Misc/gdbinit
@@ -150,10 +150,10 @@ end
# generally useful macro to print a Unicode string
def pu
- set $uni = $arg0
+ set $uni = $arg0
set $i = 0
while (*$uni && $i++<100)
- if (*$uni < 0x80)
+ if (*$uni < 0x80)
print *(char*)$uni++
else
print /x *(short*)$uni++
diff --git a/Misc/python.man b/Misc/python.man
index af26b7cf18..3d530d7590 100644
--- a/Misc/python.man
+++ b/Misc/python.man
@@ -103,10 +103,10 @@ Python is also adaptable as an extension language for existing
applications.
See the internal documentation for hints.
.PP
-Documentation for installed Python modules and packages can be
-viewed by running the
+Documentation for installed Python modules and packages can be
+viewed by running the
.B pydoc
-program.
+program.
.SH COMMAND LINE OPTIONS
.TP
.B \-B
@@ -143,29 +143,26 @@ raises an exception.
.TP
.B \-I
Run Python in isolated mode. This also implies \fB\-E\fP and \fB\-s\fP. In
-isolated mode sys.path contains neither the script’s directory nor the user’s
+isolated mode sys.path contains neither the script's directory nor the user's
site-packages directory. All PYTHON* environment variables are ignored, too.
Further restrictions may be imposed to prevent the user from injecting
malicious code.
.TP
.BI "\-m " module-name
-Searches
-.I sys.path
-for the named module and runs the corresponding
-.I .py
+Searches
+.I sys.path
+for the named module and runs the corresponding
+.I .py
file as a script.
.TP
.B \-O
-Turn on basic optimizations. This changes the filename extension for
-compiled (bytecode) files from
-.I .pyc
-to \fI.pyo\fP. Given twice, causes docstrings to be discarded.
+Turn on basic optimizations. Given twice, causes docstrings to be discarded.
.TP
.B \-OO
Discard docstrings in addition to the \fB-O\fP optimizations.
.TP
.B \-q
-Do not print the version and copyright messages. These messages are
+Do not print the version and copyright messages. These messages are
also suppressed in non-interactive mode.
.TP
.B \-s
@@ -192,7 +189,7 @@ The text I/O layer will still be line-buffered.
.B \-v
Print a message each time a module is initialized, showing the place
(filename or built-in module) from which it is loaded. When given
-twice, print a message for each file that is checked for when
+twice, print a message for each file that is checked for when
searching for a module. Also provides information on module cleanup
at exit.
.TP
@@ -417,7 +414,7 @@ the \fB\-u\fP option.
.IP PYTHONVERBOSE
If this is set to a non-empty string it is equivalent to specifying
the \fB\-v\fP option. If set to an integer, it is equivalent to
-specifying \fB\-v\fP multiple times.
+specifying \fB\-v\fP multiple times.
.IP PYTHONWARNINGS
If this is set to a comma-separated string it is equivalent to
specifying the \fB\-W\fP option for each separate value.
diff --git a/Modules/README b/Modules/README
new file mode 100644
index 0000000000..9b79f53889
--- /dev/null
+++ b/Modules/README
@@ -0,0 +1,2 @@
+Source files for standard library extension modules,
+and former extension modules that are now builtin modules.
diff --git a/Modules/Setup.config.in b/Modules/Setup.config.in
index 5ac2404bf8..adac030b6a 100644
--- a/Modules/Setup.config.in
+++ b/Modules/Setup.config.in
@@ -7,7 +7,7 @@
@USE_THREAD_MODULE@_thread _threadmodule.c
# The signal module
-@USE_SIGNAL_MODULE@signal signalmodule.c
+@USE_SIGNAL_MODULE@_signal signalmodule.c
# The rest of the modules previously listed in this file are built
# by the setup.py script in Python 2.1 and later.
diff --git a/Modules/Setup.dist b/Modules/Setup.dist
index b60b5946f9..06ba6adf24 100644
--- a/Modules/Setup.dist
+++ b/Modules/Setup.dist
@@ -118,6 +118,7 @@ _collections _collectionsmodule.c # Container types
itertools itertoolsmodule.c # Functions creating iterators for efficient looping
atexit atexitmodule.c # Register functions to be run at interpreter-shutdown
_stat _stat.c # stat.h interface
+time timemodule.c # -lm # time operations and variables
# access to ISO C locale support
_locale _localemodule.c # -lintl
@@ -171,7 +172,6 @@ _symtable symtablemodule.c
#cmath cmathmodule.c _math.c # -lm # complex math library functions
#math mathmodule.c _math.c # -lm # math library functions, e.g. sin()
#_struct _struct.c # binary structure packing/unpacking
-#time timemodule.c # -lm # time operations and variables
#_weakref _weakref.c # basic weak reference support
#_testcapi _testcapimodule.c # Python C API test module
#_random _randommodule.c # Random number generator
diff --git a/Modules/_bz2module.c b/Modules/_bz2module.c
index e652f4dfcd..e3e0eb1f23 100644
--- a/Modules/_bz2module.c
+++ b/Modules/_bz2module.c
@@ -51,6 +51,14 @@ typedef struct {
bz_stream bzs;
char eof; /* T_BOOL expects a char */
PyObject *unused_data;
+ char needs_input;
+ char *input_buffer;
+ size_t input_buffer_size;
+
+ /* bzs->avail_in is only 32 bit, so we store the true length
+ separately. Conversion and looping is encapsulated in
+ decompress_buf() */
+ size_t bzs_avail_in_real;
#ifdef WITH_THREAD
PyThread_type_lock lock;
#endif
@@ -111,19 +119,23 @@ catch_bz2_error(int bzerror)
}
#if BUFSIZ < 8192
-#define SMALLCHUNK 8192
+#define INITIAL_BUFFER_SIZE 8192
#else
-#define SMALLCHUNK BUFSIZ
+#define INITIAL_BUFFER_SIZE BUFSIZ
#endif
static int
-grow_buffer(PyObject **buf)
+grow_buffer(PyObject **buf, Py_ssize_t max_length)
{
/* Expand the buffer by an amount proportional to the current size,
giving us amortized linear-time behavior. Use a less-than-double
growth factor to avoid excessive allocation. */
size_t size = PyBytes_GET_SIZE(*buf);
size_t new_size = size + (size >> 3) + 6;
+
+ if (max_length > 0 && new_size > (size_t) max_length)
+ new_size = (size_t) max_length;
+
if (new_size > size) {
return _PyBytes_Resize(buf, new_size);
} else { /* overflow */
@@ -142,14 +154,14 @@ compress(BZ2Compressor *c, char *data, size_t len, int action)
size_t data_size = 0;
PyObject *result;
- result = PyBytes_FromStringAndSize(NULL, SMALLCHUNK);
+ result = PyBytes_FromStringAndSize(NULL, INITIAL_BUFFER_SIZE);
if (result == NULL)
return NULL;
c->bzs.next_in = data;
c->bzs.avail_in = 0;
c->bzs.next_out = PyBytes_AS_STRING(result);
- c->bzs.avail_out = SMALLCHUNK;
+ c->bzs.avail_out = INITIAL_BUFFER_SIZE;
for (;;) {
char *this_out;
int bzerror;
@@ -168,7 +180,7 @@ compress(BZ2Compressor *c, char *data, size_t len, int action)
if (c->bzs.avail_out == 0) {
size_t buffer_left = PyBytes_GET_SIZE(result) - data_size;
if (buffer_left == 0) {
- if (grow_buffer(&result) < 0)
+ if (grow_buffer(&result, -1) < 0)
goto error;
c->bzs.next_out = PyBytes_AS_STRING(result) + data_size;
buffer_left = PyBytes_GET_SIZE(result) - data_size;
@@ -188,7 +200,7 @@ compress(BZ2Compressor *c, char *data, size_t len, int action)
if (action == BZ_FINISH && bzerror == BZ_STREAM_END)
break;
}
- if (data_size != PyBytes_GET_SIZE(result))
+ if (data_size != (size_t)PyBytes_GET_SIZE(result))
if (_PyBytes_Resize(&result, data_size) < 0)
goto error;
return result;
@@ -199,12 +211,11 @@ error:
}
/*[clinic input]
-output preset file
module _bz2
class _bz2.BZ2Compressor "BZ2Compressor *" "&BZ2Compressor_Type"
class _bz2.BZ2Decompressor "BZ2Decompressor *" "&BZ2Decompressor_Type"
[clinic start generated code]*/
-/*[clinic end generated code: output=da39a3ee5e6b4b0d input=e3b139924f5e18cc]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=dc7d7992a79f9cb7]*/
#include "clinic/_bz2module.c.h"
@@ -402,64 +413,175 @@ static PyTypeObject BZ2Compressor_Type = {
/* BZ2Decompressor class. */
-static PyObject *
-decompress(BZ2Decompressor *d, char *data, size_t len)
+/* Decompress data of length d->bzs_avail_in_real in d->bzs.next_in. The output
+ buffer is allocated dynamically and returned. At most max_length bytes are
+ returned, so some of the input may not be consumed. d->bzs.next_in and
+ d->bzs_avail_in_real are updated to reflect the consumed input. */
+static PyObject*
+decompress_buf(BZ2Decompressor *d, Py_ssize_t max_length)
{
- size_t data_size = 0;
+ /* data_size is strictly positive, but because we repeatedly have to
+ compare against max_length and PyBytes_GET_SIZE we declare it as
+ signed */
+ Py_ssize_t data_size = 0;
PyObject *result;
+ bz_stream *bzs = &d->bzs;
- result = PyBytes_FromStringAndSize(NULL, SMALLCHUNK);
+ if (max_length < 0 || max_length >= INITIAL_BUFFER_SIZE)
+ result = PyBytes_FromStringAndSize(NULL, INITIAL_BUFFER_SIZE);
+ else
+ result = PyBytes_FromStringAndSize(NULL, max_length);
if (result == NULL)
- return result;
- d->bzs.next_in = data;
- /* On a 64-bit system, len might not fit in avail_in (an unsigned int).
- Do decompression in chunks of no more than UINT_MAX bytes each. */
- d->bzs.avail_in = (unsigned int)Py_MIN(len, UINT_MAX);
- len -= d->bzs.avail_in;
- d->bzs.next_out = PyBytes_AS_STRING(result);
- d->bzs.avail_out = SMALLCHUNK;
+ return NULL;
+
+ bzs->next_out = PyBytes_AS_STRING(result);
for (;;) {
- char *this_out;
- int bzerror;
+ int bzret;
+ size_t avail;
+
+ /* On a 64-bit system, buffer length might not fit in avail_out, so we
+ do decompression in chunks of no more than UINT_MAX bytes
+ each. Note that the expression for `avail` is guaranteed to be
+ positive, so the cast is safe. */
+ avail = (size_t) (PyBytes_GET_SIZE(result) - data_size);
+ bzs->avail_out = (unsigned int)Py_MIN(avail, UINT_MAX);
+ bzs->avail_in = (unsigned int)Py_MIN(d->bzs_avail_in_real, UINT_MAX);
+ d->bzs_avail_in_real -= bzs->avail_in;
Py_BEGIN_ALLOW_THREADS
- this_out = d->bzs.next_out;
- bzerror = BZ2_bzDecompress(&d->bzs);
- data_size += d->bzs.next_out - this_out;
+ bzret = BZ2_bzDecompress(bzs);
+ data_size = bzs->next_out - PyBytes_AS_STRING(result);
+ d->bzs_avail_in_real += bzs->avail_in;
Py_END_ALLOW_THREADS
- if (catch_bz2_error(bzerror))
+ if (catch_bz2_error(bzret))
goto error;
- if (bzerror == BZ_STREAM_END) {
+ if (bzret == BZ_STREAM_END) {
d->eof = 1;
- len += d->bzs.avail_in;
- if (len > 0) { /* Save leftover input to unused_data */
- Py_CLEAR(d->unused_data);
- d->unused_data = PyBytes_FromStringAndSize(d->bzs.next_in, len);
- if (d->unused_data == NULL)
- goto error;
- }
break;
- }
- if (d->bzs.avail_in == 0) {
- if (len == 0)
+ } else if (d->bzs_avail_in_real == 0) {
+ break;
+ } else if (bzs->avail_out == 0) {
+ if (data_size == max_length)
break;
- d->bzs.avail_in = (unsigned int)Py_MIN(len, UINT_MAX);
- len -= d->bzs.avail_in;
+ if (data_size == PyBytes_GET_SIZE(result) &&
+ grow_buffer(&result, max_length) == -1)
+ goto error;
+ bzs->next_out = PyBytes_AS_STRING(result) + data_size;
}
- if (d->bzs.avail_out == 0) {
- size_t buffer_left = PyBytes_GET_SIZE(result) - data_size;
- if (buffer_left == 0) {
- if (grow_buffer(&result) < 0)
+ }
+ if (data_size != PyBytes_GET_SIZE(result))
+ if (_PyBytes_Resize(&result, data_size) == -1)
+ goto error;
+
+ return result;
+
+error:
+ Py_XDECREF(result);
+ return NULL;
+}
+
+
+static PyObject *
+decompress(BZ2Decompressor *d, char *data, size_t len, Py_ssize_t max_length)
+{
+ char input_buffer_in_use;
+ PyObject *result;
+ bz_stream *bzs = &d->bzs;
+
+ /* Prepend unconsumed input if necessary */
+ if (bzs->next_in != NULL) {
+ size_t avail_now, avail_total;
+
+ /* Number of bytes we can append to input buffer */
+ avail_now = (d->input_buffer + d->input_buffer_size)
+ - (bzs->next_in + d->bzs_avail_in_real);
+
+ /* Number of bytes we can append if we move existing
+ contents to beginning of buffer (overwriting
+ consumed input) */
+ avail_total = d->input_buffer_size - d->bzs_avail_in_real;
+
+ if (avail_total < len) {
+ size_t offset = bzs->next_in - d->input_buffer;
+ char *tmp;
+ size_t new_size = d->input_buffer_size + len - avail_now;
+
+ /* Assign to temporary variable first, so we don't
+ lose address of allocated buffer if realloc fails */
+ tmp = PyMem_Realloc(d->input_buffer, new_size);
+ if (tmp == NULL) {
+ PyErr_SetNone(PyExc_MemoryError);
+ return NULL;
+ }
+ d->input_buffer = tmp;
+ d->input_buffer_size = new_size;
+
+ bzs->next_in = d->input_buffer + offset;
+ }
+ else if (avail_now < len) {
+ memmove(d->input_buffer, bzs->next_in,
+ d->bzs_avail_in_real);
+ bzs->next_in = d->input_buffer;
+ }
+ memcpy((void*)(bzs->next_in + d->bzs_avail_in_real), data, len);
+ d->bzs_avail_in_real += len;
+ input_buffer_in_use = 1;
+ }
+ else {
+ bzs->next_in = data;
+ d->bzs_avail_in_real = len;
+ input_buffer_in_use = 0;
+ }
+
+ result = decompress_buf(d, max_length);
+ if(result == NULL)
+ return NULL;
+
+ if (d->eof) {
+ d->needs_input = 0;
+ if (d->bzs_avail_in_real > 0) {
+ Py_XSETREF(d->unused_data,
+ PyBytes_FromStringAndSize(bzs->next_in, d->bzs_avail_in_real));
+ if (d->unused_data == NULL)
+ goto error;
+ }
+ }
+ else if (d->bzs_avail_in_real == 0) {
+ bzs->next_in = NULL;
+ d->needs_input = 1;
+ }
+ else {
+ d->needs_input = 0;
+
+ /* If we did not use the input buffer, we now have
+ to copy the tail from the caller's buffer into the
+ input buffer */
+ if (!input_buffer_in_use) {
+
+ /* Discard buffer if it's too small
+ (resizing it may needlessly copy the current contents) */
+ if (d->input_buffer != NULL &&
+ d->input_buffer_size < d->bzs_avail_in_real) {
+ PyMem_Free(d->input_buffer);
+ d->input_buffer = NULL;
+ }
+
+ /* Allocate if necessary */
+ if (d->input_buffer == NULL) {
+ d->input_buffer = PyMem_Malloc(d->bzs_avail_in_real);
+ if (d->input_buffer == NULL) {
+ PyErr_SetNone(PyExc_MemoryError);
goto error;
- d->bzs.next_out = PyBytes_AS_STRING(result) + data_size;
- buffer_left = PyBytes_GET_SIZE(result) - data_size;
+ }
+ d->input_buffer_size = d->bzs_avail_in_real;
}
- d->bzs.avail_out = (unsigned int)Py_MIN(buffer_left, UINT_MAX);
+
+ /* Copy tail */
+ memcpy(d->input_buffer, bzs->next_in, d->bzs_avail_in_real);
+ bzs->next_in = d->input_buffer;
}
}
- if (data_size != PyBytes_GET_SIZE(result))
- if (_PyBytes_Resize(&result, data_size) < 0)
- goto error;
+
return result;
error:
@@ -470,21 +592,30 @@ error:
/*[clinic input]
_bz2.BZ2Decompressor.decompress
+ self: self(type="BZ2Decompressor *")
data: Py_buffer
- /
+ max_length: Py_ssize_t=-1
+
+Decompress *data*, returning uncompressed data as bytes.
-Provide data to the decompressor object.
+If *max_length* is nonnegative, returns at most *max_length* bytes of
+decompressed data. If this limit is reached and further output can be
+produced, *self.needs_input* will be set to ``False``. In this case, the next
+call to *decompress()* may provide *data* as b'' to obtain more of the output.
-Returns a chunk of decompressed data if possible, or b'' otherwise.
+If all of the input data was decompressed and returned (either because this
+was less than *max_length* bytes, or because *max_length* was negative),
+*self.needs_input* will be set to True.
-Attempting to decompress data after the end of stream is reached
-raises an EOFError. Any data found after the end of the stream
-is ignored and saved in the unused_data attribute.
+Attempting to decompress data after the end of stream is reached raises an
+EOFError. Any data found after the end of the stream is ignored and saved in
+the unused_data attribute.
[clinic start generated code]*/
static PyObject *
-_bz2_BZ2Decompressor_decompress_impl(BZ2Decompressor *self, Py_buffer *data)
-/*[clinic end generated code: output=086e4b99e60cb3f6 input=616c2a6db5269961]*/
+_bz2_BZ2Decompressor_decompress_impl(BZ2Decompressor *self, Py_buffer *data,
+ Py_ssize_t max_length)
+/*[clinic end generated code: output=23e41045deb240a3 input=9558b424c8b00516]*/
{
PyObject *result = NULL;
@@ -492,7 +623,7 @@ _bz2_BZ2Decompressor_decompress_impl(BZ2Decompressor *self, Py_buffer *data)
if (self->eof)
PyErr_SetString(PyExc_EOFError, "End of stream already reached");
else
- result = decompress(self, data->buf, data->len);
+ result = decompress(self, data->buf, data->len, max_length);
RELEASE_LOCK(self);
return result;
}
@@ -527,7 +658,11 @@ _bz2_BZ2Decompressor___init___impl(BZ2Decompressor *self)
}
#endif
- self->unused_data = PyBytes_FromStringAndSize("", 0);
+ self->needs_input = 1;
+ self->bzs_avail_in_real = 0;
+ self->input_buffer = NULL;
+ self->input_buffer_size = 0;
+ self->unused_data = PyBytes_FromStringAndSize(NULL, 0);
if (self->unused_data == NULL)
goto error;
@@ -549,6 +684,8 @@ error:
static void
BZ2Decompressor_dealloc(BZ2Decompressor *self)
{
+ if(self->input_buffer != NULL)
+ PyMem_Free(self->input_buffer);
BZ2_bzDecompressEnd(&self->bzs);
Py_CLEAR(self->unused_data);
#ifdef WITH_THREAD
@@ -570,11 +707,16 @@ PyDoc_STRVAR(BZ2Decompressor_eof__doc__,
PyDoc_STRVAR(BZ2Decompressor_unused_data__doc__,
"Data found after the end of the compressed stream.");
+PyDoc_STRVAR(BZ2Decompressor_needs_input_doc,
+"True if more input is needed before more decompressed data can be produced.");
+
static PyMemberDef BZ2Decompressor_members[] = {
{"eof", T_BOOL, offsetof(BZ2Decompressor, eof),
READONLY, BZ2Decompressor_eof__doc__},
{"unused_data", T_OBJECT_EX, offsetof(BZ2Decompressor, unused_data),
READONLY, BZ2Decompressor_unused_data__doc__},
+ {"needs_input", T_BOOL, offsetof(BZ2Decompressor, needs_input), READONLY,
+ BZ2Decompressor_needs_input_doc},
{NULL}
};
diff --git a/Modules/_codecsmodule.c b/Modules/_codecsmodule.c
index 52f34793c4..7575773f45 100644
--- a/Modules/_codecsmodule.c
+++ b/Modules/_codecsmodule.c
@@ -47,19 +47,25 @@ module _codecs
[clinic start generated code]*/
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=e1390e3da3cb9deb]*/
+#include "clinic/_codecsmodule.c.h"
/* --- Registry ----------------------------------------------------------- */
-PyDoc_STRVAR(register__doc__,
-"register(search_function)\n\
-\n\
-Register a codec search function. Search functions are expected to take\n\
-one argument, the encoding name in all lower case letters, and either\n\
-return None, or a tuple of functions (encoder, decoder, stream_reader,\n\
-stream_writer) (or a CodecInfo object).");
+/*[clinic input]
+_codecs.register
+ search_function: object
+ /
-static
-PyObject *codec_register(PyObject *self, PyObject *search_function)
+Register a codec search function.
+
+Search functions are expected to take one argument, the encoding name in
+all lower case letters, and either return None, or a tuple of functions
+(encoder, decoder, stream_reader, stream_writer) (or a CodecInfo object).
+[clinic start generated code]*/
+
+static PyObject *
+_codecs_register(PyModuleDef *module, PyObject *search_function)
+/*[clinic end generated code: output=d17608b6ad380eb8 input=369578467955cae4]*/
{
if (PyCodec_Register(search_function))
return NULL;
@@ -67,75 +73,73 @@ PyObject *codec_register(PyObject *self, PyObject *search_function)
Py_RETURN_NONE;
}
-PyDoc_STRVAR(lookup__doc__,
-"lookup(encoding) -> CodecInfo\n\
-\n\
-Looks up a codec tuple in the Python codec registry and returns\n\
-a CodecInfo object.");
-
-static
-PyObject *codec_lookup(PyObject *self, PyObject *args)
-{
- char *encoding;
+/*[clinic input]
+_codecs.lookup
+ encoding: str
+ /
- if (!PyArg_ParseTuple(args, "s:lookup", &encoding))
- return NULL;
+Looks up a codec tuple in the Python codec registry and returns a CodecInfo object.
+[clinic start generated code]*/
+static PyObject *
+_codecs_lookup_impl(PyModuleDef *module, const char *encoding)
+/*[clinic end generated code: output=798e41aff0c04ef6 input=3c572c0db3febe9c]*/
+{
return _PyCodec_Lookup(encoding);
}
-PyDoc_STRVAR(encode__doc__,
-"encode(obj, [encoding[,errors]]) -> object\n\
-\n\
-Encodes obj using the codec registered for encoding. encoding defaults\n\
-to the default encoding. errors may be given to set a different error\n\
-handling scheme. Default is 'strict' meaning that encoding errors raise\n\
-a ValueError. Other possible values are 'ignore', 'replace' and\n\
-'xmlcharrefreplace' as well as any other name registered with\n\
-codecs.register_error that can handle ValueErrors.");
+/*[clinic input]
+_codecs.encode
+ obj: object
+ encoding: str(c_default="NULL") = "utf-8"
+ errors: str(c_default="NULL") = "strict"
+
+Encodes obj using the codec registered for encoding.
+
+The default encoding is 'utf-8'. errors may be given to set a
+different error handling scheme. Default is 'strict' meaning that encoding
+errors raise a ValueError. Other possible values are 'ignore', 'replace'
+and 'backslashreplace' as well as any other name registered with
+codecs.register_error that can handle ValueErrors.
+[clinic start generated code]*/
static PyObject *
-codec_encode(PyObject *self, PyObject *args)
+_codecs_encode_impl(PyModuleDef *module, PyObject *obj, const char *encoding,
+ const char *errors)
+/*[clinic end generated code: output=5c073f62249c8d7c input=cd5b685040ff61f0]*/
{
- const char *encoding = NULL;
- const char *errors = NULL;
- PyObject *v;
-
- if (!PyArg_ParseTuple(args, "O|ss:encode", &v, &encoding, &errors))
- return NULL;
-
if (encoding == NULL)
encoding = PyUnicode_GetDefaultEncoding();
/* Encode via the codec registry */
- return PyCodec_Encode(v, encoding, errors);
+ return PyCodec_Encode(obj, encoding, errors);
}
-PyDoc_STRVAR(decode__doc__,
-"decode(obj, [encoding[,errors]]) -> object\n\
-\n\
-Decodes obj using the codec registered for encoding. encoding defaults\n\
-to the default encoding. errors may be given to set a different error\n\
-handling scheme. Default is 'strict' meaning that encoding errors raise\n\
-a ValueError. Other possible values are 'ignore' and 'replace'\n\
-as well as any other name registered with codecs.register_error that is\n\
-able to handle ValueErrors.");
+/*[clinic input]
+_codecs.decode
+ obj: object
+ encoding: str(c_default="NULL") = "utf-8"
+ errors: str(c_default="NULL") = "strict"
+
+Decodes obj using the codec registered for encoding.
+
+Default encoding is 'utf-8'. errors may be given to set a
+different error handling scheme. Default is 'strict' meaning that encoding
+errors raise a ValueError. Other possible values are 'ignore', 'replace'
+and 'backslashreplace' as well as any other name registered with
+codecs.register_error that can handle ValueErrors.
+[clinic start generated code]*/
static PyObject *
-codec_decode(PyObject *self, PyObject *args)
+_codecs_decode_impl(PyModuleDef *module, PyObject *obj, const char *encoding,
+ const char *errors)
+/*[clinic end generated code: output=c81cbf6189a7f878 input=7702c0cc2fa1add6]*/
{
- const char *encoding = NULL;
- const char *errors = NULL;
- PyObject *v;
-
- if (!PyArg_ParseTuple(args, "O|ss:decode", &v, &encoding, &errors))
- return NULL;
-
if (encoding == NULL)
encoding = PyUnicode_GetDefaultEncoding();
/* Decode via the codec registry */
- return PyCodec_Decode(v, encoding, errors);
+ return PyCodec_Decode(obj, encoding, errors);
}
/* --- Helpers ------------------------------------------------------------ */
@@ -149,37 +153,9 @@ _codecs._forget_codec
Purge the named codec from the internal codec lookup cache
[clinic start generated code]*/
-PyDoc_STRVAR(_codecs__forget_codec__doc__,
-"_forget_codec($module, encoding, /)\n"
-"--\n"
-"\n"
-"Purge the named codec from the internal codec lookup cache");
-
-#define _CODECS__FORGET_CODEC_METHODDEF \
- {"_forget_codec", (PyCFunction)_codecs__forget_codec, METH_VARARGS, _codecs__forget_codec__doc__},
-
-static PyObject *
-_codecs__forget_codec_impl(PyModuleDef *module, const char *encoding);
-
-static PyObject *
-_codecs__forget_codec(PyModuleDef *module, PyObject *args)
-{
- PyObject *return_value = NULL;
- const char *encoding;
-
- if (!PyArg_ParseTuple(args,
- "s:_forget_codec",
- &encoding))
- goto exit;
- return_value = _codecs__forget_codec_impl(module, encoding);
-
-exit:
- return return_value;
-}
-
static PyObject *
_codecs__forget_codec_impl(PyModuleDef *module, const char *encoding)
-/*[clinic end generated code: output=a75e631591702a5c input=18d5d92d0e386c38]*/
+/*[clinic end generated code: output=b56a9b99d2d28080 input=18d5d92d0e386c38]*/
{
if (_PyCodec_Forget(encoding) < 0) {
return NULL;
@@ -188,48 +164,49 @@ _codecs__forget_codec_impl(PyModuleDef *module, const char *encoding)
}
static
-PyObject *codec_tuple(PyObject *unicode,
+PyObject *codec_tuple(PyObject *decoded,
Py_ssize_t len)
{
- PyObject *v;
- if (unicode == NULL)
+ if (decoded == NULL)
return NULL;
- v = Py_BuildValue("On", unicode, len);
- Py_DECREF(unicode);
- return v;
+ return Py_BuildValue("Nn", decoded, len);
}
/* --- String codecs ------------------------------------------------------ */
+/*[clinic input]
+_codecs.escape_decode
+ data: Py_buffer(accept={str, buffer})
+ errors: str(accept={str, NoneType}) = NULL
+ /
+[clinic start generated code]*/
+
static PyObject *
-escape_decode(PyObject *self,
- PyObject *args)
+_codecs_escape_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors)
+/*[clinic end generated code: output=648fa3e78d03e658 input=0018edfd99db714d]*/
{
- const char *errors = NULL;
- const char *data;
- Py_ssize_t size;
-
- if (!PyArg_ParseTuple(args, "s#|z:escape_decode",
- &data, &size, &errors))
- return NULL;
- return codec_tuple(PyBytes_DecodeEscape(data, size, errors, 0, NULL),
- size);
+ PyObject *decoded = PyBytes_DecodeEscape(data->buf, data->len,
+ errors, 0, NULL);
+ return codec_tuple(decoded, data->len);
}
+/*[clinic input]
+_codecs.escape_encode
+ data: object(subclass_of='&PyBytes_Type')
+ errors: str(accept={str, NoneType}) = NULL
+ /
+[clinic start generated code]*/
+
static PyObject *
-escape_encode(PyObject *self,
- PyObject *args)
+_codecs_escape_encode_impl(PyModuleDef *module, PyObject *data,
+ const char *errors)
+/*[clinic end generated code: output=fcd6f34fe4111c50 input=da9ded00992f32f2]*/
{
- PyObject *str;
Py_ssize_t size;
Py_ssize_t newsize;
- const char *errors = NULL;
PyObject *v;
- if (!PyArg_ParseTuple(args, "O!|z:escape_encode",
- &PyBytes_Type, &str, &errors))
- return NULL;
-
- size = PyBytes_GET_SIZE(str);
+ size = PyBytes_GET_SIZE(data);
if (size > PY_SSIZE_T_MAX / 4) {
PyErr_SetString(PyExc_OverflowError,
"string is too large to encode");
@@ -249,7 +226,7 @@ escape_encode(PyObject *self,
for (i = 0; i < size; i++) {
/* There's at least enough room for a hex escape */
assert(newsize - (p - PyBytes_AS_STRING(v)) >= 4);
- c = PyBytes_AS_STRING(str)[i];
+ c = PyBytes_AS_STRING(data)[i];
if (c == '\'' || c == '\\')
*p++ = '\\', *p++ = c;
else if (c == '\t')
@@ -277,18 +254,18 @@ escape_encode(PyObject *self,
}
/* --- Decoder ------------------------------------------------------------ */
+/*[clinic input]
+_codecs.unicode_internal_decode
+ obj: object
+ errors: str(accept={str, NoneType}) = NULL
+ /
+[clinic start generated code]*/
static PyObject *
-unicode_internal_decode(PyObject *self,
- PyObject *args)
+_codecs_unicode_internal_decode_impl(PyModuleDef *module, PyObject *obj,
+ const char *errors)
+/*[clinic end generated code: output=9fe47c2cd8807d92 input=8d57930aeda170c6]*/
{
- PyObject *obj;
- const char *errors = NULL;
-
- if (!PyArg_ParseTuple(args, "O|z:unicode_internal_decode",
- &obj, &errors))
- return NULL;
-
if (PyUnicode_Check(obj)) {
if (PyUnicode_READY(obj) < 0)
return NULL;
@@ -309,120 +286,109 @@ unicode_internal_decode(PyObject *self,
}
}
+/*[clinic input]
+_codecs.utf_7_decode
+ data: Py_buffer
+ errors: str(accept={str, NoneType}) = NULL
+ final: int(c_default="0") = False
+ /
+[clinic start generated code]*/
+
static PyObject *
-utf_7_decode(PyObject *self,
- PyObject *args)
+_codecs_utf_7_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors, int final)
+/*[clinic end generated code: output=ca945e907e72e827 input=bc4d6247ecdb01e6]*/
{
- Py_buffer pbuf;
- const char *errors = NULL;
- int final = 0;
- Py_ssize_t consumed;
- PyObject *decoded = NULL;
-
- if (!PyArg_ParseTuple(args, "y*|zi:utf_7_decode",
- &pbuf, &errors, &final))
- return NULL;
- consumed = pbuf.len;
-
- decoded = PyUnicode_DecodeUTF7Stateful(pbuf.buf, pbuf.len, errors,
- final ? NULL : &consumed);
- PyBuffer_Release(&pbuf);
- if (decoded == NULL)
- return NULL;
+ Py_ssize_t consumed = data->len;
+ PyObject *decoded = PyUnicode_DecodeUTF7Stateful(data->buf, data->len,
+ errors,
+ final ? NULL : &consumed);
return codec_tuple(decoded, consumed);
}
+/*[clinic input]
+_codecs.utf_8_decode
+ data: Py_buffer
+ errors: str(accept={str, NoneType}) = NULL
+ final: int(c_default="0") = False
+ /
+[clinic start generated code]*/
+
static PyObject *
-utf_8_decode(PyObject *self,
- PyObject *args)
+_codecs_utf_8_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors, int final)
+/*[clinic end generated code: output=7309f9ff4ef5c9b6 input=39161d71e7422ee2]*/
{
- Py_buffer pbuf;
- const char *errors = NULL;
- int final = 0;
- Py_ssize_t consumed;
- PyObject *decoded = NULL;
-
- if (!PyArg_ParseTuple(args, "y*|zi:utf_8_decode",
- &pbuf, &errors, &final))
- return NULL;
- consumed = pbuf.len;
-
- decoded = PyUnicode_DecodeUTF8Stateful(pbuf.buf, pbuf.len, errors,
- final ? NULL : &consumed);
- PyBuffer_Release(&pbuf);
- if (decoded == NULL)
- return NULL;
+ Py_ssize_t consumed = data->len;
+ PyObject *decoded = PyUnicode_DecodeUTF8Stateful(data->buf, data->len,
+ errors,
+ final ? NULL : &consumed);
return codec_tuple(decoded, consumed);
}
+/*[clinic input]
+_codecs.utf_16_decode
+ data: Py_buffer
+ errors: str(accept={str, NoneType}) = NULL
+ final: int(c_default="0") = False
+ /
+[clinic start generated code]*/
+
static PyObject *
-utf_16_decode(PyObject *self,
- PyObject *args)
+_codecs_utf_16_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors, int final)
+/*[clinic end generated code: output=8d2fa0507d9bef2c input=f3cf01d1461007ce]*/
{
- Py_buffer pbuf;
- const char *errors = NULL;
int byteorder = 0;
- int final = 0;
- Py_ssize_t consumed;
- PyObject *decoded;
-
- if (!PyArg_ParseTuple(args, "y*|zi:utf_16_decode",
- &pbuf, &errors, &final))
- return NULL;
- consumed = pbuf.len; /* This is overwritten unless final is true. */
- decoded = PyUnicode_DecodeUTF16Stateful(pbuf.buf, pbuf.len, errors,
- &byteorder, final ? NULL : &consumed);
- PyBuffer_Release(&pbuf);
- if (decoded == NULL)
- return NULL;
+ /* This is overwritten unless final is true. */
+ Py_ssize_t consumed = data->len;
+ PyObject *decoded = PyUnicode_DecodeUTF16Stateful(data->buf, data->len,
+ errors, &byteorder,
+ final ? NULL : &consumed);
return codec_tuple(decoded, consumed);
}
+/*[clinic input]
+_codecs.utf_16_le_decode
+ data: Py_buffer
+ errors: str(accept={str, NoneType}) = NULL
+ final: int(c_default="0") = False
+ /
+[clinic start generated code]*/
+
static PyObject *
-utf_16_le_decode(PyObject *self,
- PyObject *args)
+_codecs_utf_16_le_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors, int final)
+/*[clinic end generated code: output=4fd621515ef4ce18 input=a77e3bf97335d94e]*/
{
- Py_buffer pbuf;
- const char *errors = NULL;
int byteorder = -1;
- int final = 0;
- Py_ssize_t consumed;
- PyObject *decoded = NULL;
-
- if (!PyArg_ParseTuple(args, "y*|zi:utf_16_le_decode",
- &pbuf, &errors, &final))
- return NULL;
-
- consumed = pbuf.len; /* This is overwritten unless final is true. */
- decoded = PyUnicode_DecodeUTF16Stateful(pbuf.buf, pbuf.len, errors,
- &byteorder, final ? NULL : &consumed);
- PyBuffer_Release(&pbuf);
- if (decoded == NULL)
- return NULL;
+ /* This is overwritten unless final is true. */
+ Py_ssize_t consumed = data->len;
+ PyObject *decoded = PyUnicode_DecodeUTF16Stateful(data->buf, data->len,
+ errors, &byteorder,
+ final ? NULL : &consumed);
return codec_tuple(decoded, consumed);
}
+/*[clinic input]
+_codecs.utf_16_be_decode
+ data: Py_buffer
+ errors: str(accept={str, NoneType}) = NULL
+ final: int(c_default="0") = False
+ /
+[clinic start generated code]*/
+
static PyObject *
-utf_16_be_decode(PyObject *self,
- PyObject *args)
+_codecs_utf_16_be_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors, int final)
+/*[clinic end generated code: output=792f4eacb3e1fa05 input=606f69fae91b5563]*/
{
- Py_buffer pbuf;
- const char *errors = NULL;
int byteorder = 1;
- int final = 0;
- Py_ssize_t consumed;
- PyObject *decoded = NULL;
-
- if (!PyArg_ParseTuple(args, "y*|zi:utf_16_be_decode",
- &pbuf, &errors, &final))
- return NULL;
-
- consumed = pbuf.len; /* This is overwritten unless final is true. */
- decoded = PyUnicode_DecodeUTF16Stateful(pbuf.buf, pbuf.len, errors,
- &byteorder, final ? NULL : &consumed);
- PyBuffer_Release(&pbuf);
- if (decoded == NULL)
- return NULL;
+ /* This is overwritten unless final is true. */
+ Py_ssize_t consumed = data->len;
+ PyObject *decoded = PyUnicode_DecodeUTF16Stateful(data->buf, data->len,
+ errors, &byteorder,
+ final ? NULL : &consumed);
return codec_tuple(decoded, consumed);
}
@@ -433,98 +399,94 @@ utf_16_be_decode(PyObject *self,
being the value in effect at the end of data.
*/
+/*[clinic input]
+_codecs.utf_16_ex_decode
+ data: Py_buffer
+ errors: str(accept={str, NoneType}) = NULL
+ byteorder: int = 0
+ final: int(c_default="0") = False
+ /
+[clinic start generated code]*/
static PyObject *
-utf_16_ex_decode(PyObject *self,
- PyObject *args)
+_codecs_utf_16_ex_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors, int byteorder, int final)
+/*[clinic end generated code: output=f136a186dc2defa0 input=f6e7f697658c013e]*/
{
- Py_buffer pbuf;
- const char *errors = NULL;
- int byteorder = 0;
- PyObject *unicode, *tuple;
- int final = 0;
- Py_ssize_t consumed;
+ /* This is overwritten unless final is true. */
+ Py_ssize_t consumed = data->len;
- if (!PyArg_ParseTuple(args, "y*|zii:utf_16_ex_decode",
- &pbuf, &errors, &byteorder, &final))
- return NULL;
- consumed = pbuf.len; /* This is overwritten unless final is true. */
- unicode = PyUnicode_DecodeUTF16Stateful(pbuf.buf, pbuf.len, errors,
- &byteorder, final ? NULL : &consumed);
- PyBuffer_Release(&pbuf);
- if (unicode == NULL)
+ PyObject *decoded = PyUnicode_DecodeUTF16Stateful(data->buf, data->len,
+ errors, &byteorder,
+ final ? NULL : &consumed);
+ if (decoded == NULL)
return NULL;
- tuple = Py_BuildValue("Oni", unicode, consumed, byteorder);
- Py_DECREF(unicode);
- return tuple;
+ return Py_BuildValue("Nni", decoded, consumed, byteorder);
}
+/*[clinic input]
+_codecs.utf_32_decode
+ data: Py_buffer
+ errors: str(accept={str, NoneType}) = NULL
+ final: int(c_default="0") = False
+ /
+[clinic start generated code]*/
+
static PyObject *
-utf_32_decode(PyObject *self,
- PyObject *args)
+_codecs_utf_32_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors, int final)
+/*[clinic end generated code: output=b7635e55857e8efb input=86d4f41c6c2e763d]*/
{
- Py_buffer pbuf;
- const char *errors = NULL;
int byteorder = 0;
- int final = 0;
- Py_ssize_t consumed;
- PyObject *decoded;
-
- if (!PyArg_ParseTuple(args, "y*|zi:utf_32_decode",
- &pbuf, &errors, &final))
- return NULL;
- consumed = pbuf.len; /* This is overwritten unless final is true. */
- decoded = PyUnicode_DecodeUTF32Stateful(pbuf.buf, pbuf.len, errors,
- &byteorder, final ? NULL : &consumed);
- PyBuffer_Release(&pbuf);
- if (decoded == NULL)
- return NULL;
+ /* This is overwritten unless final is true. */
+ Py_ssize_t consumed = data->len;
+ PyObject *decoded = PyUnicode_DecodeUTF32Stateful(data->buf, data->len,
+ errors, &byteorder,
+ final ? NULL : &consumed);
return codec_tuple(decoded, consumed);
}
+/*[clinic input]
+_codecs.utf_32_le_decode
+ data: Py_buffer
+ errors: str(accept={str, NoneType}) = NULL
+ final: int(c_default="0") = False
+ /
+[clinic start generated code]*/
+
static PyObject *
-utf_32_le_decode(PyObject *self,
- PyObject *args)
+_codecs_utf_32_le_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors, int final)
+/*[clinic end generated code: output=a79d1787d8ddf988 input=d18b650772d188ba]*/
{
- Py_buffer pbuf;
- const char *errors = NULL;
int byteorder = -1;
- int final = 0;
- Py_ssize_t consumed;
- PyObject *decoded;
-
- if (!PyArg_ParseTuple(args, "y*|zi:utf_32_le_decode",
- &pbuf, &errors, &final))
- return NULL;
- consumed = pbuf.len; /* This is overwritten unless final is true. */
- decoded = PyUnicode_DecodeUTF32Stateful(pbuf.buf, pbuf.len, errors,
- &byteorder, final ? NULL : &consumed);
- PyBuffer_Release(&pbuf);
- if (decoded == NULL)
- return NULL;
+ /* This is overwritten unless final is true. */
+ Py_ssize_t consumed = data->len;
+ PyObject *decoded = PyUnicode_DecodeUTF32Stateful(data->buf, data->len,
+ errors, &byteorder,
+ final ? NULL : &consumed);
return codec_tuple(decoded, consumed);
}
+/*[clinic input]
+_codecs.utf_32_be_decode
+ data: Py_buffer
+ errors: str(accept={str, NoneType}) = NULL
+ final: int(c_default="0") = False
+ /
+[clinic start generated code]*/
+
static PyObject *
-utf_32_be_decode(PyObject *self,
- PyObject *args)
+_codecs_utf_32_be_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors, int final)
+/*[clinic end generated code: output=a8356b0f36779981 input=19c271b5d34926d8]*/
{
- Py_buffer pbuf;
- const char *errors = NULL;
int byteorder = 1;
- int final = 0;
- Py_ssize_t consumed;
- PyObject *decoded;
-
- if (!PyArg_ParseTuple(args, "y*|zi:utf_32_be_decode",
- &pbuf, &errors, &final))
- return NULL;
- consumed = pbuf.len; /* This is overwritten unless final is true. */
- decoded = PyUnicode_DecodeUTF32Stateful(pbuf.buf, pbuf.len, errors,
- &byteorder, final ? NULL : &consumed);
- PyBuffer_Release(&pbuf);
- if (decoded == NULL)
- return NULL;
+ /* This is overwritten unless final is true. */
+ Py_ssize_t consumed = data->len;
+ PyObject *decoded = PyUnicode_DecodeUTF32Stateful(data->buf, data->len,
+ errors, &byteorder,
+ final ? NULL : &consumed);
return codec_tuple(decoded, consumed);
}
@@ -535,167 +497,157 @@ utf_32_be_decode(PyObject *self,
being the value in effect at the end of data.
*/
+/*[clinic input]
+_codecs.utf_32_ex_decode
+ data: Py_buffer
+ errors: str(accept={str, NoneType}) = NULL
+ byteorder: int = 0
+ final: int(c_default="0") = False
+ /
+[clinic start generated code]*/
static PyObject *
-utf_32_ex_decode(PyObject *self,
- PyObject *args)
+_codecs_utf_32_ex_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors, int byteorder, int final)
+/*[clinic end generated code: output=ab8c70977c1992f5 input=4af3e6ccfe34a076]*/
{
- Py_buffer pbuf;
- const char *errors = NULL;
- int byteorder = 0;
- PyObject *unicode, *tuple;
- int final = 0;
- Py_ssize_t consumed;
-
- if (!PyArg_ParseTuple(args, "y*|zii:utf_32_ex_decode",
- &pbuf, &errors, &byteorder, &final))
- return NULL;
- consumed = pbuf.len; /* This is overwritten unless final is true. */
- unicode = PyUnicode_DecodeUTF32Stateful(pbuf.buf, pbuf.len, errors,
- &byteorder, final ? NULL : &consumed);
- PyBuffer_Release(&pbuf);
- if (unicode == NULL)
+ Py_ssize_t consumed = data->len;
+ PyObject *decoded = PyUnicode_DecodeUTF32Stateful(data->buf, data->len,
+ errors, &byteorder,
+ final ? NULL : &consumed);
+ if (decoded == NULL)
return NULL;
- tuple = Py_BuildValue("Oni", unicode, consumed, byteorder);
- Py_DECREF(unicode);
- return tuple;
+ return Py_BuildValue("Nni", decoded, consumed, byteorder);
}
+/*[clinic input]
+_codecs.unicode_escape_decode
+ data: Py_buffer(accept={str, buffer})
+ errors: str(accept={str, NoneType}) = NULL
+ /
+[clinic start generated code]*/
+
static PyObject *
-unicode_escape_decode(PyObject *self,
- PyObject *args)
+_codecs_unicode_escape_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors)
+/*[clinic end generated code: output=d1aa63f2620c4999 input=49fd27d06813a7f5]*/
{
- Py_buffer pbuf;
- const char *errors = NULL;
- PyObject *unicode;
-
- if (!PyArg_ParseTuple(args, "s*|z:unicode_escape_decode",
- &pbuf, &errors))
- return NULL;
-
- unicode = PyUnicode_DecodeUnicodeEscape(pbuf.buf, pbuf.len, errors);
- PyBuffer_Release(&pbuf);
- return codec_tuple(unicode, pbuf.len);
+ PyObject *decoded = PyUnicode_DecodeUnicodeEscape(data->buf, data->len,
+ errors);
+ return codec_tuple(decoded, data->len);
}
+/*[clinic input]
+_codecs.raw_unicode_escape_decode
+ data: Py_buffer(accept={str, buffer})
+ errors: str(accept={str, NoneType}) = NULL
+ /
+[clinic start generated code]*/
+
static PyObject *
-raw_unicode_escape_decode(PyObject *self,
- PyObject *args)
+_codecs_raw_unicode_escape_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors)
+/*[clinic end generated code: output=0bf96cc182d81379 input=770903a211434ebc]*/
{
- Py_buffer pbuf;
- const char *errors = NULL;
- PyObject *unicode;
-
- if (!PyArg_ParseTuple(args, "s*|z:raw_unicode_escape_decode",
- &pbuf, &errors))
- return NULL;
-
- unicode = PyUnicode_DecodeRawUnicodeEscape(pbuf.buf, pbuf.len, errors);
- PyBuffer_Release(&pbuf);
- return codec_tuple(unicode, pbuf.len);
+ PyObject *decoded = PyUnicode_DecodeRawUnicodeEscape(data->buf, data->len,
+ errors);
+ return codec_tuple(decoded, data->len);
}
+/*[clinic input]
+_codecs.latin_1_decode
+ data: Py_buffer
+ errors: str(accept={str, NoneType}) = NULL
+ /
+[clinic start generated code]*/
+
static PyObject *
-latin_1_decode(PyObject *self,
- PyObject *args)
+_codecs_latin_1_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors)
+/*[clinic end generated code: output=66b916f5055aaf13 input=5cad0f1759c618ec]*/
{
- Py_buffer pbuf;
- PyObject *unicode;
- const char *errors = NULL;
-
- if (!PyArg_ParseTuple(args, "y*|z:latin_1_decode",
- &pbuf, &errors))
- return NULL;
-
- unicode = PyUnicode_DecodeLatin1(pbuf.buf, pbuf.len, errors);
- PyBuffer_Release(&pbuf);
- return codec_tuple(unicode, pbuf.len);
+ PyObject *decoded = PyUnicode_DecodeLatin1(data->buf, data->len, errors);
+ return codec_tuple(decoded, data->len);
}
+/*[clinic input]
+_codecs.ascii_decode
+ data: Py_buffer
+ errors: str(accept={str, NoneType}) = NULL
+ /
+[clinic start generated code]*/
+
static PyObject *
-ascii_decode(PyObject *self,
- PyObject *args)
+_codecs_ascii_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors)
+/*[clinic end generated code: output=7f213a1b5cdafc65 input=ad1106f64037bd16]*/
{
- Py_buffer pbuf;
- PyObject *unicode;
- const char *errors = NULL;
-
- if (!PyArg_ParseTuple(args, "y*|z:ascii_decode",
- &pbuf, &errors))
- return NULL;
-
- unicode = PyUnicode_DecodeASCII(pbuf.buf, pbuf.len, errors);
- PyBuffer_Release(&pbuf);
- return codec_tuple(unicode, pbuf.len);
+ PyObject *decoded = PyUnicode_DecodeASCII(data->buf, data->len, errors);
+ return codec_tuple(decoded, data->len);
}
+/*[clinic input]
+_codecs.charmap_decode
+ data: Py_buffer
+ errors: str(accept={str, NoneType}) = NULL
+ mapping: object = NULL
+ /
+[clinic start generated code]*/
+
static PyObject *
-charmap_decode(PyObject *self,
- PyObject *args)
+_codecs_charmap_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors, PyObject *mapping)
+/*[clinic end generated code: output=87d27f365098bbae input=19712ca35c5a80e2]*/
{
- Py_buffer pbuf;
- PyObject *unicode;
- const char *errors = NULL;
- PyObject *mapping = NULL;
+ PyObject *decoded;
- if (!PyArg_ParseTuple(args, "y*|zO:charmap_decode",
- &pbuf, &errors, &mapping))
- return NULL;
if (mapping == Py_None)
mapping = NULL;
- unicode = PyUnicode_DecodeCharmap(pbuf.buf, pbuf.len, mapping, errors);
- PyBuffer_Release(&pbuf);
- return codec_tuple(unicode, pbuf.len);
+ decoded = PyUnicode_DecodeCharmap(data->buf, data->len, mapping, errors);
+ return codec_tuple(decoded, data->len);
}
#ifdef HAVE_MBCS
+/*[clinic input]
+_codecs.mbcs_decode
+ data: Py_buffer
+ errors: str(accept={str, NoneType}) = NULL
+ final: int(c_default="0") = False
+ /
+[clinic start generated code]*/
+
static PyObject *
-mbcs_decode(PyObject *self,
- PyObject *args)
+_codecs_mbcs_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors, int final)
+/*[clinic end generated code: output=0ebaf3a5b20e53fa input=d492c1ca64f4fa8a]*/
{
- Py_buffer pbuf;
- const char *errors = NULL;
- int final = 0;
- Py_ssize_t consumed;
- PyObject *decoded = NULL;
-
- if (!PyArg_ParseTuple(args, "y*|zi:mbcs_decode",
- &pbuf, &errors, &final))
- return NULL;
- consumed = pbuf.len;
-
- decoded = PyUnicode_DecodeMBCSStateful(pbuf.buf, pbuf.len, errors,
- final ? NULL : &consumed);
- PyBuffer_Release(&pbuf);
- if (decoded == NULL)
- return NULL;
+ Py_ssize_t consumed = data->len;
+ PyObject *decoded = PyUnicode_DecodeMBCSStateful(data->buf, data->len,
+ errors, final ? NULL : &consumed);
return codec_tuple(decoded, consumed);
}
+/*[clinic input]
+_codecs.code_page_decode
+ codepage: int
+ data: Py_buffer
+ errors: str(accept={str, NoneType}) = NULL
+ final: int(c_default="0") = False
+ /
+[clinic start generated code]*/
+
static PyObject *
-code_page_decode(PyObject *self,
- PyObject *args)
+_codecs_code_page_decode_impl(PyModuleDef *module, int codepage,
+ Py_buffer *data, const char *errors, int final)
+/*[clinic end generated code: output=4318e3d9971e31ba input=4f3152a304e21d51]*/
{
- Py_buffer pbuf;
- const char *errors = NULL;
- int final = 0;
- Py_ssize_t consumed;
- PyObject *decoded = NULL;
- int code_page;
-
- if (!PyArg_ParseTuple(args, "iy*|zi:code_page_decode",
- &code_page, &pbuf, &errors, &final))
- return NULL;
- consumed = pbuf.len;
-
- decoded = PyUnicode_DecodeCodePageStateful(code_page,
- pbuf.buf, pbuf.len, errors,
- final ? NULL : &consumed);
- PyBuffer_Release(&pbuf);
- if (decoded == NULL)
- return NULL;
+ Py_ssize_t consumed = data->len;
+ PyObject *decoded = PyUnicode_DecodeCodePageStateful(codepage,
+ data->buf, data->len,
+ errors,
+ final ? NULL : &consumed);
return codec_tuple(decoded, consumed);
}
@@ -703,43 +655,39 @@ code_page_decode(PyObject *self,
/* --- Encoder ------------------------------------------------------------ */
+/*[clinic input]
+_codecs.readbuffer_encode
+ data: Py_buffer(accept={str, buffer})
+ errors: str(accept={str, NoneType}) = NULL
+ /
+[clinic start generated code]*/
+
static PyObject *
-readbuffer_encode(PyObject *self,
- PyObject *args)
+_codecs_readbuffer_encode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors)
+/*[clinic end generated code: output=319cc24083299859 input=b7c322b89d4ab923]*/
{
- Py_buffer pdata;
- const char *data;
- Py_ssize_t size;
- const char *errors = NULL;
- PyObject *result;
-
- if (!PyArg_ParseTuple(args, "s*|z:readbuffer_encode",
- &pdata, &errors))
- return NULL;
- data = pdata.buf;
- size = pdata.len;
-
- result = PyBytes_FromStringAndSize(data, size);
- PyBuffer_Release(&pdata);
- return codec_tuple(result, size);
+ PyObject *result = PyBytes_FromStringAndSize(data->buf, data->len);
+ return codec_tuple(result, data->len);
}
+/*[clinic input]
+_codecs.unicode_internal_encode
+ obj: object
+ errors: str(accept={str, NoneType}) = NULL
+ /
+[clinic start generated code]*/
+
static PyObject *
-unicode_internal_encode(PyObject *self,
- PyObject *args)
+_codecs_unicode_internal_encode_impl(PyModuleDef *module, PyObject *obj,
+ const char *errors)
+/*[clinic end generated code: output=be08457068ad503b input=8628f0280cf5ba61]*/
{
- PyObject *obj;
- const char *errors = NULL;
-
if (PyErr_WarnEx(PyExc_DeprecationWarning,
"unicode_internal codec has been deprecated",
1))
return NULL;
- if (!PyArg_ParseTuple(args, "O|z:unicode_internal_encode",
- &obj, &errors))
- return NULL;
-
if (PyUnicode_Check(obj)) {
Py_UNICODE *u;
Py_ssize_t len, size;
@@ -750,7 +698,7 @@ unicode_internal_encode(PyObject *self,
u = PyUnicode_AsUnicodeAndSize(obj, &len);
if (u == NULL)
return NULL;
- if (len > PY_SSIZE_T_MAX / sizeof(Py_UNICODE))
+ if ((size_t)len > (size_t)PY_SSIZE_T_MAX / sizeof(Py_UNICODE))
return PyErr_NoMemory();
size = len * sizeof(Py_UNICODE);
return codec_tuple(PyBytes_FromStringAndSize((const char*)u, size),
@@ -761,22 +709,26 @@ unicode_internal_encode(PyObject *self,
PyObject *result;
if (PyObject_GetBuffer(obj, &view, PyBUF_SIMPLE) != 0)
return NULL;
- result = codec_tuple(PyBytes_FromStringAndSize(view.buf, view.len), view.len);
+ result = codec_tuple(PyBytes_FromStringAndSize(view.buf, view.len),
+ view.len);
PyBuffer_Release(&view);
return result;
}
}
+/*[clinic input]
+_codecs.utf_7_encode
+ str: object
+ errors: str(accept={str, NoneType}) = NULL
+ /
+[clinic start generated code]*/
+
static PyObject *
-utf_7_encode(PyObject *self,
- PyObject *args)
+_codecs_utf_7_encode_impl(PyModuleDef *module, PyObject *str,
+ const char *errors)
+/*[clinic end generated code: output=a7accc496a32b759 input=fd91a78f103b0421]*/
{
- PyObject *str, *v;
- const char *errors = NULL;
-
- if (!PyArg_ParseTuple(args, "O|z:utf_7_encode",
- &str, &errors))
- return NULL;
+ PyObject *v;
str = PyUnicode_FromObject(str);
if (str == NULL || PyUnicode_READY(str) < 0) {
@@ -789,16 +741,19 @@ utf_7_encode(PyObject *self,
return v;
}
+/*[clinic input]
+_codecs.utf_8_encode
+ str: object
+ errors: str(accept={str, NoneType}) = NULL
+ /
+[clinic start generated code]*/
+
static PyObject *
-utf_8_encode(PyObject *self,
- PyObject *args)
+_codecs_utf_8_encode_impl(PyModuleDef *module, PyObject *str,
+ const char *errors)
+/*[clinic end generated code: output=ec831d80e7aedede input=2c22d40532f071f3]*/
{
- PyObject *str, *v;
- const char *errors = NULL;
-
- if (!PyArg_ParseTuple(args, "O|z:utf_8_encode",
- &str, &errors))
- return NULL;
+ PyObject *v;
str = PyUnicode_FromObject(str);
if (str == NULL || PyUnicode_READY(str) < 0) {
@@ -818,17 +773,20 @@ utf_8_encode(PyObject *self,
*/
+/*[clinic input]
+_codecs.utf_16_encode
+ str: object
+ errors: str(accept={str, NoneType}) = NULL
+ byteorder: int = 0
+ /
+[clinic start generated code]*/
+
static PyObject *
-utf_16_encode(PyObject *self,
- PyObject *args)
+_codecs_utf_16_encode_impl(PyModuleDef *module, PyObject *str,
+ const char *errors, int byteorder)
+/*[clinic end generated code: output=93ac58e960a9ee4d input=3935a489b2d5385e]*/
{
- PyObject *str, *v;
- const char *errors = NULL;
- int byteorder = 0;
-
- if (!PyArg_ParseTuple(args, "O|zi:utf_16_encode",
- &str, &errors, &byteorder))
- return NULL;
+ PyObject *v;
str = PyUnicode_FromObject(str);
if (str == NULL || PyUnicode_READY(str) < 0) {
@@ -841,16 +799,19 @@ utf_16_encode(PyObject *self,
return v;
}
+/*[clinic input]
+_codecs.utf_16_le_encode
+ str: object
+ errors: str(accept={str, NoneType}) = NULL
+ /
+[clinic start generated code]*/
+
static PyObject *
-utf_16_le_encode(PyObject *self,
- PyObject *args)
+_codecs_utf_16_le_encode_impl(PyModuleDef *module, PyObject *str,
+ const char *errors)
+/*[clinic end generated code: output=422bedb8da34fb66 input=bc27df05d1d20dfe]*/
{
- PyObject *str, *v;
- const char *errors = NULL;
-
- if (!PyArg_ParseTuple(args, "O|z:utf_16_le_encode",
- &str, &errors))
- return NULL;
+ PyObject *v;
str = PyUnicode_FromObject(str);
if (str == NULL || PyUnicode_READY(str) < 0) {
@@ -863,16 +824,19 @@ utf_16_le_encode(PyObject *self,
return v;
}
+/*[clinic input]
+_codecs.utf_16_be_encode
+ str: object
+ errors: str(accept={str, NoneType}) = NULL
+ /
+[clinic start generated code]*/
+
static PyObject *
-utf_16_be_encode(PyObject *self,
- PyObject *args)
+_codecs_utf_16_be_encode_impl(PyModuleDef *module, PyObject *str,
+ const char *errors)
+/*[clinic end generated code: output=3aa7ee9502acdd77 input=5a69d4112763462b]*/
{
- PyObject *str, *v;
- const char *errors = NULL;
-
- if (!PyArg_ParseTuple(args, "O|z:utf_16_be_encode",
- &str, &errors))
- return NULL;
+ PyObject *v;
str = PyUnicode_FromObject(str);
if (str == NULL || PyUnicode_READY(str) < 0) {
@@ -892,17 +856,20 @@ utf_16_be_encode(PyObject *self,
*/
+/*[clinic input]
+_codecs.utf_32_encode
+ str: object
+ errors: str(accept={str, NoneType}) = NULL
+ byteorder: int = 0
+ /
+[clinic start generated code]*/
+
static PyObject *
-utf_32_encode(PyObject *self,
- PyObject *args)
+_codecs_utf_32_encode_impl(PyModuleDef *module, PyObject *str,
+ const char *errors, int byteorder)
+/*[clinic end generated code: output=3e7d5a003b02baed input=434a1efa492b8d58]*/
{
- PyObject *str, *v;
- const char *errors = NULL;
- int byteorder = 0;
-
- if (!PyArg_ParseTuple(args, "O|zi:utf_32_encode",
- &str, &errors, &byteorder))
- return NULL;
+ PyObject *v;
str = PyUnicode_FromObject(str);
if (str == NULL || PyUnicode_READY(str) < 0) {
@@ -915,16 +882,19 @@ utf_32_encode(PyObject *self,
return v;
}
+/*[clinic input]
+_codecs.utf_32_le_encode
+ str: object
+ errors: str(accept={str, NoneType}) = NULL
+ /
+[clinic start generated code]*/
+
static PyObject *
-utf_32_le_encode(PyObject *self,
- PyObject *args)
+_codecs_utf_32_le_encode_impl(PyModuleDef *module, PyObject *str,
+ const char *errors)
+/*[clinic end generated code: output=5dda641cd33dbfc2 input=dfa2d7dc78b99422]*/
{
- PyObject *str, *v;
- const char *errors = NULL;
-
- if (!PyArg_ParseTuple(args, "O|z:utf_32_le_encode",
- &str, &errors))
- return NULL;
+ PyObject *v;
str = PyUnicode_FromObject(str);
if (str == NULL || PyUnicode_READY(str) < 0) {
@@ -937,16 +907,19 @@ utf_32_le_encode(PyObject *self,
return v;
}
+/*[clinic input]
+_codecs.utf_32_be_encode
+ str: object
+ errors: str(accept={str, NoneType}) = NULL
+ /
+[clinic start generated code]*/
+
static PyObject *
-utf_32_be_encode(PyObject *self,
- PyObject *args)
+_codecs_utf_32_be_encode_impl(PyModuleDef *module, PyObject *str,
+ const char *errors)
+/*[clinic end generated code: output=ccca8b44d91a7c7a input=4595617b18169002]*/
{
- PyObject *str, *v;
- const char *errors = NULL;
-
- if (!PyArg_ParseTuple(args, "O|z:utf_32_be_encode",
- &str, &errors))
- return NULL;
+ PyObject *v;
str = PyUnicode_FromObject(str);
if (str == NULL || PyUnicode_READY(str) < 0) {
@@ -959,16 +932,19 @@ utf_32_be_encode(PyObject *self,
return v;
}
+/*[clinic input]
+_codecs.unicode_escape_encode
+ str: object
+ errors: str(accept={str, NoneType}) = NULL
+ /
+[clinic start generated code]*/
+
static PyObject *
-unicode_escape_encode(PyObject *self,
- PyObject *args)
+_codecs_unicode_escape_encode_impl(PyModuleDef *module, PyObject *str,
+ const char *errors)
+/*[clinic end generated code: output=389f23d2b8f8d80b input=8273506f14076912]*/
{
- PyObject *str, *v;
- const char *errors = NULL;
-
- if (!PyArg_ParseTuple(args, "O|z:unicode_escape_encode",
- &str, &errors))
- return NULL;
+ PyObject *v;
str = PyUnicode_FromObject(str);
if (str == NULL || PyUnicode_READY(str) < 0) {
@@ -981,16 +957,19 @@ unicode_escape_encode(PyObject *self,
return v;
}
+/*[clinic input]
+_codecs.raw_unicode_escape_encode
+ str: object
+ errors: str(accept={str, NoneType}) = NULL
+ /
+[clinic start generated code]*/
+
static PyObject *
-raw_unicode_escape_encode(PyObject *self,
- PyObject *args)
+_codecs_raw_unicode_escape_encode_impl(PyModuleDef *module, PyObject *str,
+ const char *errors)
+/*[clinic end generated code: output=fec4e39d6ec37a62 input=181755d5dfacef3c]*/
{
- PyObject *str, *v;
- const char *errors = NULL;
-
- if (!PyArg_ParseTuple(args, "O|z:raw_unicode_escape_encode",
- &str, &errors))
- return NULL;
+ PyObject *v;
str = PyUnicode_FromObject(str);
if (str == NULL || PyUnicode_READY(str) < 0) {
@@ -1003,16 +982,19 @@ raw_unicode_escape_encode(PyObject *self,
return v;
}
+/*[clinic input]
+_codecs.latin_1_encode
+ str: object
+ errors: str(accept={str, NoneType}) = NULL
+ /
+[clinic start generated code]*/
+
static PyObject *
-latin_1_encode(PyObject *self,
- PyObject *args)
+_codecs_latin_1_encode_impl(PyModuleDef *module, PyObject *str,
+ const char *errors)
+/*[clinic end generated code: output=ecf00eb8e48c889c input=f03f6dcf1d84bee4]*/
{
- PyObject *str, *v;
- const char *errors = NULL;
-
- if (!PyArg_ParseTuple(args, "O|z:latin_1_encode",
- &str, &errors))
- return NULL;
+ PyObject *v;
str = PyUnicode_FromObject(str);
if (str == NULL || PyUnicode_READY(str) < 0) {
@@ -1025,16 +1007,19 @@ latin_1_encode(PyObject *self,
return v;
}
+/*[clinic input]
+_codecs.ascii_encode
+ str: object
+ errors: str(accept={str, NoneType}) = NULL
+ /
+[clinic start generated code]*/
+
static PyObject *
-ascii_encode(PyObject *self,
- PyObject *args)
+_codecs_ascii_encode_impl(PyModuleDef *module, PyObject *str,
+ const char *errors)
+/*[clinic end generated code: output=a9d18fc6b6b91cfb input=d87e25a10a593fee]*/
{
- PyObject *str, *v;
- const char *errors = NULL;
-
- if (!PyArg_ParseTuple(args, "O|z:ascii_encode",
- &str, &errors))
- return NULL;
+ PyObject *v;
str = PyUnicode_FromObject(str);
if (str == NULL || PyUnicode_READY(str) < 0) {
@@ -1047,17 +1032,21 @@ ascii_encode(PyObject *self,
return v;
}
+/*[clinic input]
+_codecs.charmap_encode
+ str: object
+ errors: str(accept={str, NoneType}) = NULL
+ mapping: object = NULL
+ /
+[clinic start generated code]*/
+
static PyObject *
-charmap_encode(PyObject *self,
- PyObject *args)
+_codecs_charmap_encode_impl(PyModuleDef *module, PyObject *str,
+ const char *errors, PyObject *mapping)
+/*[clinic end generated code: output=14ca42b83853c643 input=85f4172661e8dad9]*/
{
- PyObject *str, *v;
- const char *errors = NULL;
- PyObject *mapping = NULL;
+ PyObject *v;
- if (!PyArg_ParseTuple(args, "O|zO:charmap_encode",
- &str, &errors, &mapping))
- return NULL;
if (mapping == Py_None)
mapping = NULL;
@@ -1072,27 +1061,34 @@ charmap_encode(PyObject *self,
return v;
}
-static PyObject*
-charmap_build(PyObject *self, PyObject *args)
+/*[clinic input]
+_codecs.charmap_build
+ map: unicode
+ /
+[clinic start generated code]*/
+
+static PyObject *
+_codecs_charmap_build_impl(PyModuleDef *module, PyObject *map)
+/*[clinic end generated code: output=9485b58fa44afa6a input=d91a91d1717dbc6d]*/
{
- PyObject *map;
- if (!PyArg_ParseTuple(args, "U:charmap_build", &map))
- return NULL;
return PyUnicode_BuildEncodingMap(map);
}
#ifdef HAVE_MBCS
+/*[clinic input]
+_codecs.mbcs_encode
+ str: object
+ errors: str(accept={str, NoneType}) = NULL
+ /
+[clinic start generated code]*/
+
static PyObject *
-mbcs_encode(PyObject *self,
- PyObject *args)
+_codecs_mbcs_encode_impl(PyModuleDef *module, PyObject *str,
+ const char *errors)
+/*[clinic end generated code: output=d1a013bc68798bd7 input=65c09ee1e4203263]*/
{
- PyObject *str, *v;
- const char *errors = NULL;
-
- if (!PyArg_ParseTuple(args, "O|z:mbcs_encode",
- &str, &errors))
- return NULL;
+ PyObject *v;
str = PyUnicode_FromObject(str);
if (str == NULL || PyUnicode_READY(str) < 0) {
@@ -1105,17 +1101,20 @@ mbcs_encode(PyObject *self,
return v;
}
+/*[clinic input]
+_codecs.code_page_encode
+ code_page: int
+ str: object
+ errors: str(accept={str, NoneType}) = NULL
+ /
+[clinic start generated code]*/
+
static PyObject *
-code_page_encode(PyObject *self,
- PyObject *args)
+_codecs_code_page_encode_impl(PyModuleDef *module, int code_page,
+ PyObject *str, const char *errors)
+/*[clinic end generated code: output=3b406618dbfbce25 input=c8562ec460c2e309]*/
{
- PyObject *str, *v;
- const char *errors = NULL;
- int code_page;
-
- if (!PyArg_ParseTuple(args, "iO|z:code_page_encode",
- &code_page, &str, &errors))
- return NULL;
+ PyObject *v;
str = PyUnicode_FromObject(str);
if (str == NULL || PyUnicode_READY(str) < 0) {
@@ -1134,99 +1133,94 @@ code_page_encode(PyObject *self,
/* --- Error handler registry --------------------------------------------- */
-PyDoc_STRVAR(register_error__doc__,
-"register_error(errors, handler)\n\
-\n\
-Register the specified error handler under the name\n\
-errors. handler must be a callable object, that\n\
-will be called with an exception instance containing\n\
-information about the location of the encoding/decoding\n\
-error and must return a (replacement, new position) tuple.");
+/*[clinic input]
+_codecs.register_error
+ errors: str
+ handler: object
+ /
-static PyObject *register_error(PyObject *self, PyObject *args)
-{
- const char *name;
- PyObject *handler;
+Register the specified error handler under the name errors.
- if (!PyArg_ParseTuple(args, "sO:register_error",
- &name, &handler))
- return NULL;
- if (PyCodec_RegisterError(name, handler))
+handler must be a callable object, that will be called with an exception
+instance containing information about the location of the encoding/decoding
+error and must return a (replacement, new position) tuple.
+[clinic start generated code]*/
+
+static PyObject *
+_codecs_register_error_impl(PyModuleDef *module, const char *errors,
+ PyObject *handler)
+/*[clinic end generated code: output=be00d3b1849ce68a input=5e6709203c2e33fe]*/
+{
+ if (PyCodec_RegisterError(errors, handler))
return NULL;
Py_RETURN_NONE;
}
-PyDoc_STRVAR(lookup_error__doc__,
-"lookup_error(errors) -> handler\n\
-\n\
-Return the error handler for the specified error handling name\n\
-or raise a LookupError, if no handler exists under this name.");
+/*[clinic input]
+_codecs.lookup_error
+ name: str
+ /
-static PyObject *lookup_error(PyObject *self, PyObject *args)
-{
- const char *name;
+lookup_error(errors) -> handler
- if (!PyArg_ParseTuple(args, "s:lookup_error",
- &name))
- return NULL;
+Return the error handler for the specified error handling name or raise a
+LookupError, if no handler exists under this name.
+[clinic start generated code]*/
+
+static PyObject *
+_codecs_lookup_error_impl(PyModuleDef *module, const char *name)
+/*[clinic end generated code: output=731e6df8c83c6158 input=4775dd65e6235aba]*/
+{
return PyCodec_LookupError(name);
}
/* --- Module API --------------------------------------------------------- */
static PyMethodDef _codecs_functions[] = {
- {"register", codec_register, METH_O,
- register__doc__},
- {"lookup", codec_lookup, METH_VARARGS,
- lookup__doc__},
- {"encode", codec_encode, METH_VARARGS,
- encode__doc__},
- {"decode", codec_decode, METH_VARARGS,
- decode__doc__},
- {"escape_encode", escape_encode, METH_VARARGS},
- {"escape_decode", escape_decode, METH_VARARGS},
- {"utf_8_encode", utf_8_encode, METH_VARARGS},
- {"utf_8_decode", utf_8_decode, METH_VARARGS},
- {"utf_7_encode", utf_7_encode, METH_VARARGS},
- {"utf_7_decode", utf_7_decode, METH_VARARGS},
- {"utf_16_encode", utf_16_encode, METH_VARARGS},
- {"utf_16_le_encode", utf_16_le_encode, METH_VARARGS},
- {"utf_16_be_encode", utf_16_be_encode, METH_VARARGS},
- {"utf_16_decode", utf_16_decode, METH_VARARGS},
- {"utf_16_le_decode", utf_16_le_decode, METH_VARARGS},
- {"utf_16_be_decode", utf_16_be_decode, METH_VARARGS},
- {"utf_16_ex_decode", utf_16_ex_decode, METH_VARARGS},
- {"utf_32_encode", utf_32_encode, METH_VARARGS},
- {"utf_32_le_encode", utf_32_le_encode, METH_VARARGS},
- {"utf_32_be_encode", utf_32_be_encode, METH_VARARGS},
- {"utf_32_decode", utf_32_decode, METH_VARARGS},
- {"utf_32_le_decode", utf_32_le_decode, METH_VARARGS},
- {"utf_32_be_decode", utf_32_be_decode, METH_VARARGS},
- {"utf_32_ex_decode", utf_32_ex_decode, METH_VARARGS},
- {"unicode_escape_encode", unicode_escape_encode, METH_VARARGS},
- {"unicode_escape_decode", unicode_escape_decode, METH_VARARGS},
- {"unicode_internal_encode", unicode_internal_encode, METH_VARARGS},
- {"unicode_internal_decode", unicode_internal_decode, METH_VARARGS},
- {"raw_unicode_escape_encode", raw_unicode_escape_encode, METH_VARARGS},
- {"raw_unicode_escape_decode", raw_unicode_escape_decode, METH_VARARGS},
- {"latin_1_encode", latin_1_encode, METH_VARARGS},
- {"latin_1_decode", latin_1_decode, METH_VARARGS},
- {"ascii_encode", ascii_encode, METH_VARARGS},
- {"ascii_decode", ascii_decode, METH_VARARGS},
- {"charmap_encode", charmap_encode, METH_VARARGS},
- {"charmap_decode", charmap_decode, METH_VARARGS},
- {"charmap_build", charmap_build, METH_VARARGS},
- {"readbuffer_encode", readbuffer_encode, METH_VARARGS},
-#ifdef HAVE_MBCS
- {"mbcs_encode", mbcs_encode, METH_VARARGS},
- {"mbcs_decode", mbcs_decode, METH_VARARGS},
- {"code_page_encode", code_page_encode, METH_VARARGS},
- {"code_page_decode", code_page_decode, METH_VARARGS},
-#endif
- {"register_error", register_error, METH_VARARGS,
- register_error__doc__},
- {"lookup_error", lookup_error, METH_VARARGS,
- lookup_error__doc__},
+ _CODECS_REGISTER_METHODDEF
+ _CODECS_LOOKUP_METHODDEF
+ _CODECS_ENCODE_METHODDEF
+ _CODECS_DECODE_METHODDEF
+ _CODECS_ESCAPE_ENCODE_METHODDEF
+ _CODECS_ESCAPE_DECODE_METHODDEF
+ _CODECS_UTF_8_ENCODE_METHODDEF
+ _CODECS_UTF_8_DECODE_METHODDEF
+ _CODECS_UTF_7_ENCODE_METHODDEF
+ _CODECS_UTF_7_DECODE_METHODDEF
+ _CODECS_UTF_16_ENCODE_METHODDEF
+ _CODECS_UTF_16_LE_ENCODE_METHODDEF
+ _CODECS_UTF_16_BE_ENCODE_METHODDEF
+ _CODECS_UTF_16_DECODE_METHODDEF
+ _CODECS_UTF_16_LE_DECODE_METHODDEF
+ _CODECS_UTF_16_BE_DECODE_METHODDEF
+ _CODECS_UTF_16_EX_DECODE_METHODDEF
+ _CODECS_UTF_32_ENCODE_METHODDEF
+ _CODECS_UTF_32_LE_ENCODE_METHODDEF
+ _CODECS_UTF_32_BE_ENCODE_METHODDEF
+ _CODECS_UTF_32_DECODE_METHODDEF
+ _CODECS_UTF_32_LE_DECODE_METHODDEF
+ _CODECS_UTF_32_BE_DECODE_METHODDEF
+ _CODECS_UTF_32_EX_DECODE_METHODDEF
+ _CODECS_UNICODE_ESCAPE_ENCODE_METHODDEF
+ _CODECS_UNICODE_ESCAPE_DECODE_METHODDEF
+ _CODECS_UNICODE_INTERNAL_ENCODE_METHODDEF
+ _CODECS_UNICODE_INTERNAL_DECODE_METHODDEF
+ _CODECS_RAW_UNICODE_ESCAPE_ENCODE_METHODDEF
+ _CODECS_RAW_UNICODE_ESCAPE_DECODE_METHODDEF
+ _CODECS_LATIN_1_ENCODE_METHODDEF
+ _CODECS_LATIN_1_DECODE_METHODDEF
+ _CODECS_ASCII_ENCODE_METHODDEF
+ _CODECS_ASCII_DECODE_METHODDEF
+ _CODECS_CHARMAP_ENCODE_METHODDEF
+ _CODECS_CHARMAP_DECODE_METHODDEF
+ _CODECS_CHARMAP_BUILD_METHODDEF
+ _CODECS_READBUFFER_ENCODE_METHODDEF
+ _CODECS_MBCS_ENCODE_METHODDEF
+ _CODECS_MBCS_DECODE_METHODDEF
+ _CODECS_CODE_PAGE_ENCODE_METHODDEF
+ _CODECS_CODE_PAGE_DECODE_METHODDEF
+ _CODECS_REGISTER_ERROR_METHODDEF
+ _CODECS_LOOKUP_ERROR_METHODDEF
_CODECS__FORGET_CODEC_METHODDEF
{NULL, NULL} /* sentinel */
};
diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c
index 6115c702a9..10fbcfe6b9 100644
--- a/Modules/_collectionsmodule.c
+++ b/Modules/_collectionsmodule.c
@@ -1,48 +1,71 @@
#include "Python.h"
#include "structmember.h"
+#ifdef STDC_HEADERS
+#include <stddef.h>
+#else
+#include <sys/types.h> /* For size_t */
+#endif
+
/* collections module implementation of a deque() datatype
Written and maintained by Raymond D. Hettinger <python@rcn.com>
*/
/* The block length may be set to any number over 1. Larger numbers
* reduce the number of calls to the memory allocator, give faster
- * indexing and rotation, and reduce the link::data overhead ratio.
- *
- * Ideally, the block length will be set to two less than some
- * multiple of the cache-line length (so that the full block
- * including the leftlink and rightlink will fit neatly into
- * cache lines).
+ * indexing and rotation, and reduce the link to data overhead ratio.
+ * Making the block length a power of two speeds-up the modulo
+ * and division calculations in deque_item() and deque_ass_item().
*/
-#define BLOCKLEN 62
+#define BLOCKLEN 64
#define CENTER ((BLOCKLEN - 1) / 2)
-/* A `dequeobject` is composed of a doubly-linked list of `block` nodes.
+/* Data for deque objects is stored in a doubly-linked list of fixed
+ * length blocks. This assures that appends or pops never move any
+ * other data elements besides the one being appended or popped.
+ *
+ * Another advantage is that it completely avoids use of realloc(),
+ * resulting in more predictable performance.
+ *
+ * Textbook implementations of doubly-linked lists store one datum
+ * per link, but that gives them a 200% memory overhead (a prev and
+ * next link for each datum) and it costs one malloc() call per data
+ * element. By using fixed-length blocks, the link to data ratio is
+ * significantly improved and there are proportionally fewer calls
+ * to malloc() and free(). The data blocks of consecutive pointers
+ * also improve cache locality.
+ *
* The list of blocks is never empty, so d.leftblock and d.rightblock
* are never equal to NULL. The list is not circular.
*
* A deque d's first element is at d.leftblock[leftindex]
* and its last element is at d.rightblock[rightindex].
- * Unlike Python slice indices, these indices are inclusive
- * on both ends. This makes the algorithms for left and
- * right operations more symmetrical and simplifies the design.
*
- * The indices, d.leftindex and d.rightindex are always in the range
- * 0 <= index < BLOCKLEN.
- * Their exact relationship is:
- * (d.leftindex + d.len - 1) % BLOCKLEN == d.rightindex.
+ * Unlike Python slice indices, these indices are inclusive on both
+ * ends. This makes the algorithms for left and right operations
+ * more symmetrical and it simplifies the design.
*
- * Empty deques have d.len == 0; d.leftblock==d.rightblock;
- * d.leftindex == CENTER+1; and d.rightindex == CENTER.
- * Checking for d.len == 0 is the intended way to see whether d is empty.
+ * The indices, d.leftindex and d.rightindex are always in the range:
+ * 0 <= index < BLOCKLEN
+ *
+ * And their exact relationship is:
+ * (d.leftindex + d.len - 1) % BLOCKLEN == d.rightindex
+ *
+ * Whenever d.leftblock == d.rightblock, then:
+ * d.leftindex + d.len - 1 == d.rightindex
*
- * Whenever d.leftblock == d.rightblock,
- * d.leftindex + d.len - 1 == d.rightindex.
+ * However, when d.leftblock != d.rightblock, the d.leftindex and
+ * d.rightindex become indices into distinct blocks and either may
+ * be larger than the other.
*
- * However, when d.leftblock != d.rightblock, d.leftindex and d.rightindex
- * become indices into distinct blocks and either may be larger than the
- * other.
+ * Empty deques have:
+ * d.len == 0
+ * d.leftblock == d.rightblock
+ * d.leftindex == CENTER + 1
+ * d.rightindex == CENTER
+ *
+ * Checking for d.len == 0 is the intended way to see whether d is empty.
*/
typedef struct BLOCK {
@@ -51,6 +74,19 @@ typedef struct BLOCK {
struct BLOCK *rightlink;
} block;
+typedef struct {
+ PyObject_VAR_HEAD
+ block *leftblock;
+ block *rightblock;
+ Py_ssize_t leftindex; /* 0 <= leftindex < BLOCKLEN */
+ Py_ssize_t rightindex; /* 0 <= rightindex < BLOCKLEN */
+ size_t state; /* incremented whenever the indices move */
+ Py_ssize_t maxlen;
+ PyObject *weakreflist;
+} dequeobject;
+
+static PyTypeObject deque_type;
+
/* For debug builds, add error checking to track the endpoints
* in the chain of links. The goal is to make sure that link
* assignments only take place at endpoints so that links already
@@ -72,8 +108,14 @@ typedef struct BLOCK {
#define CHECK_NOT_END(link)
#endif
+/* To prevent len from overflowing PY_SSIZE_T_MAX, we refuse to
+ allocate new blocks if the current len is nearing overflow.
+*/
+
+#define MAX_DEQUE_LEN (PY_SSIZE_T_MAX - 3*BLOCKLEN)
+
/* A simple freelisting scheme is used to minimize calls to the memory
- allocator. It accomodates common use cases where new blocks are being
+ allocator. It accommodates common use cases where new blocks are being
added at about the same rate as old blocks are being freed.
*/
@@ -84,9 +126,7 @@ static block *freeblocks[MAXFREEBLOCKS];
static block *
newblock(Py_ssize_t len) {
block *b;
- /* To prevent len from overflowing PY_SSIZE_T_MAX, we refuse to
- * allocate new blocks if the current len is nearing overflow. */
- if (len >= PY_SSIZE_T_MAX - 2*BLOCKLEN) {
+ if (len >= MAX_DEQUE_LEN) {
PyErr_SetString(PyExc_OverflowError,
"cannot add more blocks to the deque");
return NULL;
@@ -114,34 +154,11 @@ freeblock(block *b)
}
}
-typedef struct {
- PyObject_VAR_HEAD
- block *leftblock;
- block *rightblock;
- Py_ssize_t leftindex; /* in range(BLOCKLEN) */
- Py_ssize_t rightindex; /* in range(BLOCKLEN) */
- long state; /* incremented whenever the indices move */
- Py_ssize_t maxlen;
- PyObject *weakreflist; /* List of weak references */
-} dequeobject;
-
-/* The deque's size limit is d.maxlen. The limit can be zero or positive.
- * If there is no limit, then d.maxlen == -1.
- *
- * After an item is added to a deque, we check to see if the size has grown past
- * the limit. If it has, we get the size back down to the limit by popping an
- * item off of the opposite end. The methods that can trigger this are append(),
- * appendleft(), extend(), and extendleft().
- */
-
-#define TRIM(d, popfunction) \
- if (d->maxlen != -1 && Py_SIZE(d) > d->maxlen) { \
- PyObject *rv = popfunction(d, NULL); \
- assert(rv != NULL && Py_SIZE(d) <= d->maxlen); \
- Py_DECREF(rv); \
- }
-
-static PyTypeObject deque_type;
+/* XXX Todo:
+ If aligned memory allocations become available, make the
+ deque object 64 byte aligned so that all of the fields
+ can be retrieved or updated in a single cache line.
+*/
static PyObject *
deque_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
@@ -163,14 +180,14 @@ deque_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
MARK_END(b->rightlink);
assert(BLOCKLEN >= 2);
+ Py_SIZE(deque) = 0;
deque->leftblock = b;
deque->rightblock = b;
deque->leftindex = CENTER + 1;
deque->rightindex = CENTER;
- Py_SIZE(deque) = 0;
deque->state = 0;
- deque->weakreflist = NULL;
deque->maxlen = -1;
+ deque->weakreflist = NULL;
return (PyObject *)deque;
}
@@ -191,13 +208,7 @@ deque_pop(dequeobject *deque, PyObject *unused)
deque->state++;
if (deque->rightindex == -1) {
- if (Py_SIZE(deque) == 0) {
- assert(deque->leftblock == deque->rightblock);
- assert(deque->leftindex == deque->rightindex+1);
- /* re-center instead of freeing a block */
- deque->leftindex = CENTER + 1;
- deque->rightindex = CENTER;
- } else {
+ if (Py_SIZE(deque)) {
prevblock = deque->rightblock->leftlink;
assert(deque->leftblock != deque->rightblock);
freeblock(deque->rightblock);
@@ -205,6 +216,12 @@ deque_pop(dequeobject *deque, PyObject *unused)
MARK_END(prevblock->rightlink);
deque->rightblock = prevblock;
deque->rightindex = BLOCKLEN - 1;
+ } else {
+ assert(deque->leftblock == deque->rightblock);
+ assert(deque->leftindex == deque->rightindex+1);
+ /* re-center instead of freeing a block */
+ deque->leftindex = CENTER + 1;
+ deque->rightindex = CENTER;
}
}
return item;
@@ -229,13 +246,7 @@ deque_popleft(dequeobject *deque, PyObject *unused)
deque->state++;
if (deque->leftindex == BLOCKLEN) {
- if (Py_SIZE(deque) == 0) {
- assert(deque->leftblock == deque->rightblock);
- assert(deque->leftindex == deque->rightindex+1);
- /* re-center instead of freeing a block */
- deque->leftindex = CENTER + 1;
- deque->rightindex = CENTER;
- } else {
+ if (Py_SIZE(deque)) {
assert(deque->leftblock != deque->rightblock);
prevblock = deque->leftblock->rightlink;
freeblock(deque->leftblock);
@@ -243,6 +254,12 @@ deque_popleft(dequeobject *deque, PyObject *unused)
MARK_END(prevblock->leftlink);
deque->leftblock = prevblock;
deque->leftindex = 0;
+ } else {
+ assert(deque->leftblock == deque->rightblock);
+ assert(deque->leftindex == deque->rightindex+1);
+ /* re-center instead of freeing a block */
+ deque->leftindex = CENTER + 1;
+ deque->rightindex = CENTER;
}
}
return item;
@@ -250,11 +267,42 @@ deque_popleft(dequeobject *deque, PyObject *unused)
PyDoc_STRVAR(popleft_doc, "Remove and return the leftmost element.");
+/* The deque's size limit is d.maxlen. The limit can be zero or positive.
+ * If there is no limit, then d.maxlen == -1.
+ *
+ * After an item is added to a deque, we check to see if the size has grown past
+ * the limit. If it has, we get the size back down to the limit by popping an
+ * item off of the opposite end. The methods that can trigger this are append(),
+ * appendleft(), extend(), and extendleft().
+ */
+
+static void
+deque_trim_right(dequeobject *deque)
+{
+ if (deque->maxlen != -1 && Py_SIZE(deque) > deque->maxlen) {
+ PyObject *rv = deque_pop(deque, NULL);
+ assert(rv != NULL);
+ assert(Py_SIZE(deque) <= deque->maxlen);
+ Py_DECREF(rv);
+ }
+}
+
+static void
+deque_trim_left(dequeobject *deque)
+{
+ if (deque->maxlen != -1 && Py_SIZE(deque) > deque->maxlen) {
+ PyObject *rv = deque_popleft(deque, NULL);
+ assert(rv != NULL);
+ assert(Py_SIZE(deque) <= deque->maxlen);
+ Py_DECREF(rv);
+ }
+}
+
static PyObject *
deque_append(dequeobject *deque, PyObject *item)
{
deque->state++;
- if (deque->rightindex == BLOCKLEN-1) {
+ if (deque->rightindex == BLOCKLEN - 1) {
block *b = newblock(Py_SIZE(deque));
if (b == NULL)
return NULL;
@@ -269,7 +317,7 @@ deque_append(dequeobject *deque, PyObject *item)
Py_SIZE(deque)++;
deque->rightindex++;
deque->rightblock->data[deque->rightindex] = item;
- TRIM(deque, deque_popleft);
+ deque_trim_left(deque);
Py_RETURN_NONE;
}
@@ -294,7 +342,7 @@ deque_appendleft(dequeobject *deque, PyObject *item)
Py_SIZE(deque)++;
deque->leftindex--;
deque->leftblock->data[deque->leftindex] = item;
- TRIM(deque, deque_pop);
+ deque_trim_right(deque);
Py_RETURN_NONE;
}
@@ -350,7 +398,7 @@ deque_extend(dequeobject *deque, PyObject *iterable)
while ((item = PyIter_Next(it)) != NULL) {
deque->state++;
- if (deque->rightindex == BLOCKLEN-1) {
+ if (deque->rightindex == BLOCKLEN - 1) {
block *b = newblock(Py_SIZE(deque));
if (b == NULL) {
Py_DECREF(item);
@@ -367,11 +415,13 @@ deque_extend(dequeobject *deque, PyObject *iterable)
Py_SIZE(deque)++;
deque->rightindex++;
deque->rightblock->data[deque->rightindex] = item;
- TRIM(deque, deque_popleft);
+ deque_trim_left(deque);
}
- Py_DECREF(it);
- if (PyErr_Occurred())
+ if (PyErr_Occurred()) {
+ Py_DECREF(it);
return NULL;
+ }
+ Py_DECREF(it);
Py_RETURN_NONE;
}
@@ -428,11 +478,13 @@ deque_extendleft(dequeobject *deque, PyObject *iterable)
Py_SIZE(deque)++;
deque->leftindex--;
deque->leftblock->data[deque->leftindex] = item;
- TRIM(deque, deque_pop);
+ deque_trim_right(deque);
}
- Py_DECREF(it);
- if (PyErr_Occurred())
+ if (PyErr_Occurred()) {
+ Py_DECREF(it);
return NULL;
+ }
+ Py_DECREF(it);
Py_RETURN_NONE;
}
@@ -447,11 +499,151 @@ deque_inplace_concat(dequeobject *deque, PyObject *other)
result = deque_extend(deque, other);
if (result == NULL)
return result;
+ Py_INCREF(deque);
Py_DECREF(result);
+ return (PyObject *)deque;
+}
+
+static PyObject *deque_copy(PyObject *deque);
+
+static PyObject *
+deque_concat(dequeobject *deque, PyObject *other)
+{
+ PyObject *new_deque, *result;
+ int rv;
+
+ rv = PyObject_IsInstance(other, (PyObject *)&deque_type);
+ if (rv <= 0) {
+ if (rv == 0) {
+ PyErr_Format(PyExc_TypeError,
+ "can only concatenate deque (not \"%.200s\") to deque",
+ other->ob_type->tp_name);
+ }
+ return NULL;
+ }
+
+ new_deque = deque_copy((PyObject *)deque);
+ if (new_deque == NULL)
+ return NULL;
+ result = deque_extend((dequeobject *)new_deque, other);
+ if (result == NULL) {
+ Py_DECREF(new_deque);
+ return NULL;
+ }
+ Py_DECREF(result);
+ return new_deque;
+}
+
+static void deque_clear(dequeobject *deque);
+
+static PyObject *
+deque_repeat(dequeobject *deque, Py_ssize_t n)
+{
+ dequeobject *new_deque;
+ PyObject *result;
+
+ /* XXX add a special case for when maxlen is defined */
+ if (n < 0)
+ n = 0;
+ else if (n > 0 && Py_SIZE(deque) > MAX_DEQUE_LEN / n)
+ return PyErr_NoMemory();
+
+ new_deque = (dequeobject *)deque_new(&deque_type, (PyObject *)NULL, (PyObject *)NULL);
+ new_deque->maxlen = deque->maxlen;
+
+ for ( ; n ; n--) {
+ result = deque_extend(new_deque, (PyObject *)deque);
+ if (result == NULL) {
+ Py_DECREF(new_deque);
+ return NULL;
+ }
+ Py_DECREF(result);
+ }
+ return (PyObject *)new_deque;
+}
+
+static PyObject *
+deque_inplace_repeat(dequeobject *deque, Py_ssize_t n)
+{
+ Py_ssize_t i, size;
+ PyObject *seq;
+ PyObject *rv;
+
+ size = Py_SIZE(deque);
+ if (size == 0 || n == 1) {
+ Py_INCREF(deque);
+ return (PyObject *)deque;
+ }
+
+ if (n <= 0) {
+ deque_clear(deque);
+ Py_INCREF(deque);
+ return (PyObject *)deque;
+ }
+
+ if (size > MAX_DEQUE_LEN / n) {
+ return PyErr_NoMemory();
+ }
+
+ if (size == 1) {
+ /* common case, repeating a single element */
+ PyObject *item = deque->leftblock->data[deque->leftindex];
+
+ if (deque->maxlen != -1 && n > deque->maxlen)
+ n = deque->maxlen;
+
+ for (i = 0 ; i < n-1 ; i++) {
+ rv = deque_append(deque, item);
+ if (rv == NULL)
+ return NULL;
+ Py_DECREF(rv);
+ }
+ Py_INCREF(deque);
+ return (PyObject *)deque;
+ }
+
+ seq = PySequence_List((PyObject *)deque);
+ if (seq == NULL)
+ return seq;
+
+ for (i = 0 ; i < n-1 ; i++) {
+ rv = deque_extend(deque, seq);
+ if (rv == NULL) {
+ Py_DECREF(seq);
+ return NULL;
+ }
+ Py_DECREF(rv);
+ }
Py_INCREF(deque);
+ Py_DECREF(seq);
return (PyObject *)deque;
}
+/* The rotate() method is part of the public API and is used internally
+as a primitive for other methods.
+
+Rotation by 1 or -1 is a common case, so any optimizations for high
+volume rotations should take care not to penalize the common case.
+
+Conceptually, a rotate by one is equivalent to a pop on one side and an
+append on the other. However, a pop/append pair is unnecessarily slow
+because it requires an incref/decref pair for an object located randomly
+in memory. It is better to just move the object pointer from one block
+to the next without changing the reference count.
+
+When moving batches of pointers, it is tempting to use memcpy() but that
+proved to be slower than a simple loop for a variety of reasons.
+Memcpy() cannot know in advance that we're copying pointers instead of
+bytes, that the source and destination are pointer aligned and
+non-overlapping, that moving just one pointer is a common case, that we
+never need to move more than BLOCKLEN pointers, and that at least one
+pointer is always moved.
+
+For high volume rotations, newblock() and freeblock() are never called
+more than once. Previously emptied blocks are immediately reused as a
+destination block. If a block is left-over at the end, it is freed.
+*/
+
static int
_deque_rotate(dequeobject *deque, Py_ssize_t n)
{
@@ -501,13 +693,13 @@ _deque_rotate(dequeobject *deque, Py_ssize_t n)
if (m > leftindex)
m = leftindex;
assert (m > 0 && m <= len);
- src = &rightblock->data[rightindex];
- dest = &leftblock->data[leftindex - 1];
rightindex -= m;
leftindex -= m;
+ src = &rightblock->data[rightindex + 1];
+ dest = &leftblock->data[leftindex];
n -= m;
do {
- *(dest--) = *(src--);
+ *(dest++) = *(src++);
} while (--m);
}
if (rightindex == -1) {
@@ -583,7 +775,7 @@ deque_rotate(dequeobject *deque, PyObject *args)
if (!PyArg_ParseTuple(args, "|n:rotate", &n))
return NULL;
- if (_deque_rotate(deque, n) == 0)
+ if (!_deque_rotate(deque, n))
Py_RETURN_NONE;
return NULL;
}
@@ -598,7 +790,7 @@ deque_reverse(dequeobject *deque, PyObject *unused)
block *rightblock = deque->rightblock;
Py_ssize_t leftindex = deque->leftindex;
Py_ssize_t rightindex = deque->rightindex;
- Py_ssize_t n = (Py_SIZE(deque))/2;
+ Py_ssize_t n = Py_SIZE(deque) / 2;
Py_ssize_t i;
PyObject *tmp;
@@ -641,8 +833,8 @@ deque_count(dequeobject *deque, PyObject *v)
Py_ssize_t n = Py_SIZE(deque);
Py_ssize_t i;
Py_ssize_t count = 0;
+ size_t start_state = deque->state;
PyObject *item;
- long start_state = deque->state;
int cmp;
for (i=0 ; i<n ; i++) {
@@ -673,6 +865,38 @@ deque_count(dequeobject *deque, PyObject *v)
PyDoc_STRVAR(count_doc,
"D.count(value) -> integer -- return number of occurrences of value");
+static int
+deque_contains(dequeobject *deque, PyObject *v)
+{
+ block *b = deque->leftblock;
+ Py_ssize_t index = deque->leftindex;
+ Py_ssize_t n = Py_SIZE(deque);
+ Py_ssize_t i;
+ size_t start_state = deque->state;
+ PyObject *item;
+ int cmp;
+
+ for (i=0 ; i<n ; i++) {
+ CHECK_NOT_END(b);
+ item = b->data[index];
+ cmp = PyObject_RichCompareBool(item, v, Py_EQ);
+ if (cmp) {
+ return cmp;
+ }
+ if (start_state != deque->state) {
+ PyErr_SetString(PyExc_RuntimeError,
+ "deque mutated during iteration");
+ return -1;
+ }
+ index++;
+ if (index == BLOCKLEN) {
+ b = b->rightlink;
+ index = 0;
+ }
+ }
+ return 0;
+}
+
static Py_ssize_t
deque_len(dequeobject *deque)
{
@@ -680,6 +904,105 @@ deque_len(dequeobject *deque)
}
static PyObject *
+deque_index(dequeobject *deque, PyObject *args)
+{
+ Py_ssize_t i, start=0, stop=Py_SIZE(deque);
+ PyObject *v, *item;
+ block *b = deque->leftblock;
+ Py_ssize_t index = deque->leftindex;
+ size_t start_state = deque->state;
+
+ if (!PyArg_ParseTuple(args, "O|O&O&:index", &v,
+ _PyEval_SliceIndex, &start,
+ _PyEval_SliceIndex, &stop))
+ return NULL;
+ if (start < 0) {
+ start += Py_SIZE(deque);
+ if (start < 0)
+ start = 0;
+ }
+ if (stop < 0) {
+ stop += Py_SIZE(deque);
+ if (stop < 0)
+ stop = 0;
+ }
+ if (stop > Py_SIZE(deque))
+ stop = Py_SIZE(deque);
+
+ for (i=0 ; i<stop ; i++) {
+ if (i >= start) {
+ int cmp;
+ CHECK_NOT_END(b);
+ item = b->data[index];
+ cmp = PyObject_RichCompareBool(item, v, Py_EQ);
+ if (cmp > 0)
+ return PyLong_FromSsize_t(i);
+ else if (cmp < 0)
+ return NULL;
+ if (start_state != deque->state) {
+ PyErr_SetString(PyExc_RuntimeError,
+ "deque mutated during iteration");
+ return NULL;
+ }
+ }
+ index++;
+ if (index == BLOCKLEN) {
+ b = b->rightlink;
+ index = 0;
+ }
+ }
+ PyErr_Format(PyExc_ValueError, "%R is not in deque", v);
+ return NULL;
+}
+
+PyDoc_STRVAR(index_doc,
+"D.index(value, [start, [stop]]) -> integer -- return first index of value.\n"
+"Raises ValueError if the value is not present.");
+
+/* insert(), remove(), and delitem() are implemented in terms of
+ rotate() for simplicity and reasonable performance near the end
+ points. If for some reason these methods become popular, it is not
+ hard to re-implement this using direct data movement (similar to
+ the code used in list slice assignments) and achieve a performance
+ boost (by moving each pointer only once instead of twice).
+*/
+
+static PyObject *
+deque_insert(dequeobject *deque, PyObject *args)
+{
+ Py_ssize_t index;
+ Py_ssize_t n = Py_SIZE(deque);
+ PyObject *value;
+ PyObject *rv;
+
+ if (!PyArg_ParseTuple(args, "nO:insert", &index, &value))
+ return NULL;
+ if (deque->maxlen == Py_SIZE(deque)) {
+ PyErr_SetString(PyExc_IndexError, "deque already at its maximum size");
+ return NULL;
+ }
+ if (index >= n)
+ return deque_append(deque, value);
+ if (index <= -n || index == 0)
+ return deque_appendleft(deque, value);
+ if (_deque_rotate(deque, -index))
+ return NULL;
+ if (index < 0)
+ rv = deque_append(deque, value);
+ else
+ rv = deque_appendleft(deque, value);
+ if (rv == NULL)
+ return NULL;
+ Py_DECREF(rv);
+ if (_deque_rotate(deque, index))
+ return NULL;
+ Py_RETURN_NONE;
+}
+
+PyDoc_STRVAR(insert_doc,
+"D.insert(index, object) -- insert object before index");
+
+static PyObject *
deque_remove(dequeobject *deque, PyObject *value)
{
Py_ssize_t i, n=Py_SIZE(deque);
@@ -717,16 +1040,83 @@ PyDoc_STRVAR(remove_doc,
static void
deque_clear(dequeobject *deque)
{
+ block *b;
+ block *prevblock;
+ block *leftblock;
+ Py_ssize_t leftindex;
+ Py_ssize_t n;
PyObject *item;
+ if (Py_SIZE(deque) == 0)
+ return;
+
+ /* During the process of clearing a deque, decrefs can cause the
+ deque to mutate. To avoid fatal confusion, we have to make the
+ deque empty before clearing the blocks and never refer to
+ anything via deque->ref while clearing. (This is the same
+ technique used for clearing lists, sets, and dicts.)
+
+ Making the deque empty requires allocating a new empty block. In
+ the unlikely event that memory is full, we fall back to an
+ alternate method that doesn't require a new block. Repeating
+ pops in a while-loop is slower, possibly re-entrant (and a clever
+ adversary could cause it to never terminate).
+ */
+
+ b = newblock(0);
+ if (b == NULL) {
+ PyErr_Clear();
+ goto alternate_method;
+ }
+
+ /* Remember the old size, leftblock, and leftindex */
+ leftblock = deque->leftblock;
+ leftindex = deque->leftindex;
+ n = Py_SIZE(deque);
+
+ /* Set the deque to be empty using the newly allocated block */
+ MARK_END(b->leftlink);
+ MARK_END(b->rightlink);
+ Py_SIZE(deque) = 0;
+ deque->leftblock = b;
+ deque->rightblock = b;
+ deque->leftindex = CENTER + 1;
+ deque->rightindex = CENTER;
+ deque->state++;
+
+ /* Now the old size, leftblock, and leftindex are disconnected from
+ the empty deque and we can use them to decref the pointers.
+ */
+ while (n--) {
+ item = leftblock->data[leftindex];
+ Py_DECREF(item);
+ leftindex++;
+ if (leftindex == BLOCKLEN && n) {
+ CHECK_NOT_END(leftblock->rightlink);
+ prevblock = leftblock;
+ leftblock = leftblock->rightlink;
+ leftindex = 0;
+ freeblock(prevblock);
+ }
+ }
+ CHECK_END(leftblock->rightlink);
+ freeblock(leftblock);
+ return;
+
+ alternate_method:
while (Py_SIZE(deque)) {
item = deque_pop(deque, NULL);
assert (item != NULL);
Py_DECREF(item);
}
- assert(deque->leftblock == deque->rightblock &&
- deque->leftindex - 1 == deque->rightindex &&
- Py_SIZE(deque) == 0);
+}
+
+static int
+valid_index(Py_ssize_t i, Py_ssize_t limit)
+{
+ /* The cast to size_t let us use just a single comparison
+ to check whether i is in the range: 0 <= i < limit */
+ return (size_t) i < (size_t) limit;
}
static PyObject *
@@ -736,9 +1126,8 @@ deque_item(dequeobject *deque, Py_ssize_t i)
PyObject *item;
Py_ssize_t n, index=i;
- if (i < 0 || i >= Py_SIZE(deque)) {
- PyErr_SetString(PyExc_IndexError,
- "deque index out of range");
+ if (!valid_index(i, Py_SIZE(deque))) {
+ PyErr_SetString(PyExc_IndexError, "deque index out of range");
return NULL;
}
@@ -750,14 +1139,16 @@ deque_item(dequeobject *deque, Py_ssize_t i)
b = deque->rightblock;
} else {
i += deque->leftindex;
- n = i / BLOCKLEN;
- i %= BLOCKLEN;
+ n = (Py_ssize_t)((size_t) i / BLOCKLEN);
+ i = (Py_ssize_t)((size_t) i % BLOCKLEN);
if (index < (Py_SIZE(deque) >> 1)) {
b = deque->leftblock;
while (n--)
b = b->rightlink;
} else {
- n = (deque->leftindex + Py_SIZE(deque) - 1) / BLOCKLEN - n;
+ n = (Py_ssize_t)(
+ ((size_t)(deque->leftindex + Py_SIZE(deque) - 1))
+ / BLOCKLEN - n);
b = deque->rightblock;
while (n--)
b = b->leftlink;
@@ -768,13 +1159,6 @@ deque_item(dequeobject *deque, Py_ssize_t i)
return item;
}
-/* delitem() implemented in terms of rotate for simplicity and reasonable
- performance near the end points. If for some reason this method becomes
- popular, it is not hard to re-implement this using direct data movement
- (similar to code in list slice assignment) and achieve a two or threefold
- performance boost.
-*/
-
static int
deque_del_item(dequeobject *deque, Py_ssize_t i)
{
@@ -798,23 +1182,24 @@ deque_ass_item(dequeobject *deque, Py_ssize_t i, PyObject *v)
block *b;
Py_ssize_t n, len=Py_SIZE(deque), halflen=(len+1)>>1, index=i;
- if (i < 0 || i >= len) {
- PyErr_SetString(PyExc_IndexError,
- "deque index out of range");
+ if (!valid_index(i, len)) {
+ PyErr_SetString(PyExc_IndexError, "deque index out of range");
return -1;
}
if (v == NULL)
return deque_del_item(deque, i);
i += deque->leftindex;
- n = i / BLOCKLEN;
- i %= BLOCKLEN;
+ n = (Py_ssize_t)((size_t) i / BLOCKLEN);
+ i = (Py_ssize_t)((size_t) i % BLOCKLEN);
if (index <= halflen) {
b = deque->leftblock;
while (n--)
b = b->rightlink;
} else {
- n = (deque->leftindex + len - 1) / BLOCKLEN - n;
+ n = (Py_ssize_t)(
+ ((size_t)(deque->leftindex + Py_SIZE(deque) - 1))
+ / BLOCKLEN - n);
b = deque->rightblock;
while (n--)
b = b->leftlink;
@@ -936,13 +1321,12 @@ deque_repr(PyObject *deque)
return NULL;
}
if (((dequeobject *)deque)->maxlen != -1)
-
result = PyUnicode_FromFormat("deque(%R, maxlen=%zd)",
aslist, ((dequeobject *)deque)->maxlen);
else
result = PyUnicode_FromFormat("deque(%R)", aslist);
- Py_DECREF(aslist);
Py_ReprLeave(deque);
+ Py_DECREF(aslist);
return result;
}
@@ -1044,7 +1428,8 @@ deque_init(dequeobject *deque, PyObject *args, PyObject *kwdargs)
}
}
deque->maxlen = maxlen;
- deque_clear(deque);
+ if (Py_SIZE(deque) > 0)
+ deque_clear(deque);
if (iterable != NULL) {
PyObject *rv = deque_extend(deque, iterable);
if (rv == NULL)
@@ -1060,7 +1445,7 @@ deque_sizeof(dequeobject *deque, void *unused)
Py_ssize_t res;
Py_ssize_t blocks;
- res = sizeof(dequeobject);
+ res = _PyObject_SIZE(Py_TYPE(deque));
blocks = (deque->leftindex + Py_SIZE(deque) + BLOCKLEN - 1) / BLOCKLEN;
assert(deque->leftindex + Py_SIZE(deque) - 1 ==
(blocks - 1) * BLOCKLEN + deque->rightindex);
@@ -1071,6 +1456,12 @@ deque_sizeof(dequeobject *deque, void *unused)
PyDoc_STRVAR(sizeof_doc,
"D.__sizeof__() -- size of D in memory, in bytes");
+static int
+deque_bool(dequeobject *deque)
+{
+ return Py_SIZE(deque) != 0;
+}
+
static PyObject *
deque_get_maxlen(dequeobject *deque)
{
@@ -1079,6 +1470,9 @@ deque_get_maxlen(dequeobject *deque)
return PyLong_FromSsize_t(deque->maxlen);
}
+
+/* deque object ********************************************************/
+
static PyGetSetDef deque_getset[] = {
{"maxlen", (getter)deque_get_maxlen, (setter)NULL,
"maximum size of a deque or None if unbounded"},
@@ -1087,19 +1481,30 @@ static PyGetSetDef deque_getset[] = {
static PySequenceMethods deque_as_sequence = {
(lenfunc)deque_len, /* sq_length */
- 0, /* sq_concat */
- 0, /* sq_repeat */
+ (binaryfunc)deque_concat, /* sq_concat */
+ (ssizeargfunc)deque_repeat, /* sq_repeat */
(ssizeargfunc)deque_item, /* sq_item */
0, /* sq_slice */
- (ssizeobjargproc)deque_ass_item, /* sq_ass_item */
+ (ssizeobjargproc)deque_ass_item, /* sq_ass_item */
0, /* sq_ass_slice */
- 0, /* sq_contains */
- (binaryfunc)deque_inplace_concat, /* sq_inplace_concat */
- 0, /* sq_inplace_repeat */
-
+ (objobjproc)deque_contains, /* sq_contains */
+ (binaryfunc)deque_inplace_concat, /* sq_inplace_concat */
+ (ssizeargfunc)deque_inplace_repeat, /* sq_inplace_repeat */
};
-/* deque object ********************************************************/
+static PyNumberMethods deque_as_number = {
+ 0, /* nb_add */
+ 0, /* nb_subtract */
+ 0, /* nb_multiply */
+ 0, /* nb_remainder */
+ 0, /* nb_divmod */
+ 0, /* nb_power */
+ 0, /* nb_negative */
+ 0, /* nb_positive */
+ 0, /* nb_absolute */
+ (inquiry)deque_bool, /* nb_bool */
+ 0, /* nb_invert */
+ };
static PyObject *deque_iter(dequeobject *deque);
static PyObject *deque_reviter(dequeobject *deque);
@@ -1115,17 +1520,23 @@ static PyMethodDef deque_methods[] = {
METH_NOARGS, clear_doc},
{"__copy__", (PyCFunction)deque_copy,
METH_NOARGS, copy_doc},
+ {"copy", (PyCFunction)deque_copy,
+ METH_NOARGS, copy_doc},
{"count", (PyCFunction)deque_count,
- METH_O, count_doc},
+ METH_O, count_doc},
{"extend", (PyCFunction)deque_extend,
METH_O, extend_doc},
{"extendleft", (PyCFunction)deque_extendleft,
METH_O, extendleft_doc},
+ {"index", (PyCFunction)deque_index,
+ METH_VARARGS, index_doc},
+ {"insert", (PyCFunction)deque_insert,
+ METH_VARARGS, insert_doc},
{"pop", (PyCFunction)deque_pop,
METH_NOARGS, pop_doc},
{"popleft", (PyCFunction)deque_popleft,
METH_NOARGS, popleft_doc},
- {"__reduce__", (PyCFunction)deque_reduce,
+ {"__reduce__", (PyCFunction)deque_reduce,
METH_NOARGS, reduce_doc},
{"remove", (PyCFunction)deque_remove,
METH_O, remove_doc},
@@ -1143,7 +1554,7 @@ static PyMethodDef deque_methods[] = {
PyDoc_STRVAR(deque_doc,
"deque([iterable[, maxlen]]) --> deque object\n\
\n\
-Build an ordered collection with optimized access from its endpoints.");
+A list-like sequence optimized for data accesses near its endpoints.");
static PyTypeObject deque_type = {
PyVarObject_HEAD_INIT(NULL, 0)
@@ -1157,7 +1568,7 @@ static PyTypeObject deque_type = {
0, /* tp_setattr */
0, /* tp_reserved */
deque_repr, /* tp_repr */
- 0, /* tp_as_number */
+ &deque_as_number, /* tp_as_number */
&deque_as_sequence, /* tp_as_sequence */
0, /* tp_as_mapping */
PyObject_HashNotImplemented, /* tp_hash */
@@ -1193,10 +1604,10 @@ static PyTypeObject deque_type = {
typedef struct {
PyObject_HEAD
- Py_ssize_t index;
block *b;
+ Py_ssize_t index;
dequeobject *deque;
- long state; /* state when the iterator is created */
+ size_t state; /* state when the iterator is created */
Py_ssize_t counter; /* number of items remaining for iteration */
} dequeiterobject;
@@ -1313,7 +1724,7 @@ static PyMethodDef dequeiter_methods[] = {
static PyTypeObject dequeiter_type = {
PyVarObject_HEAD_INIT(NULL, 0)
- "_collections._deque_iterator", /* tp_name */
+ "_collections._deque_iterator", /* tp_name */
sizeof(dequeiterobject), /* tp_basicsize */
0, /* tp_itemsize */
/* methods */
@@ -1332,7 +1743,7 @@ static PyTypeObject dequeiter_type = {
PyObject_GenericGetAttr, /* tp_getattro */
0, /* tp_setattro */
0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */
0, /* tp_doc */
(traverseproc)dequeiter_traverse, /* tp_traverse */
0, /* tp_clear */
@@ -1435,7 +1846,7 @@ dequereviter_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyTypeObject dequereviter_type = {
PyVarObject_HEAD_INIT(NULL, 0)
- "_collections._deque_reverse_iterator", /* tp_name */
+ "_collections._deque_reverse_iterator", /* tp_name */
sizeof(dequeiterobject), /* tp_basicsize */
0, /* tp_itemsize */
/* methods */
@@ -1454,7 +1865,7 @@ static PyTypeObject dequereviter_type = {
PyObject_GenericGetAttr, /* tp_getattro */
0, /* tp_setattro */
0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */
0, /* tp_doc */
(traverseproc)dequeiter_traverse, /* tp_traverse */
0, /* tp_clear */
@@ -1798,19 +2209,40 @@ _count_elements(PyObject *self, PyObject *args)
if (mapping_get != NULL && mapping_get == dict_get &&
mapping_setitem != NULL && mapping_setitem == dict_setitem) {
while (1) {
+ /* Fast path advantages:
+ 1. Eliminate double hashing
+ (by re-using the same hash for both the get and set)
+ 2. Avoid argument overhead of PyObject_CallFunctionObjArgs
+ (argument tuple creation and parsing)
+ 3. Avoid indirection through a bound method object
+ (creates another argument tuple)
+ 4. Avoid initial increment from zero
+ (reuse an existing one-object instead)
+ */
+ Py_hash_t hash;
+
key = PyIter_Next(it);
if (key == NULL)
break;
- oldval = PyDict_GetItem(mapping, key);
+
+ if (!PyUnicode_CheckExact(key) ||
+ (hash = ((PyASCIIObject *) key)->hash) == -1)
+ {
+ hash = PyObject_Hash(key);
+ if (hash == -1)
+ goto done;
+ }
+
+ oldval = _PyDict_GetItem_KnownHash(mapping, key, hash);
if (oldval == NULL) {
- if (PyDict_SetItem(mapping, key, one) == -1)
- break;
+ if (_PyDict_SetItem_KnownHash(mapping, key, one, hash) == -1)
+ goto done;
} else {
newval = PyNumber_Add(oldval, one);
if (newval == NULL)
- break;
- if (PyDict_SetItem(mapping, key, newval) == -1)
- break;
+ goto done;
+ if (_PyDict_SetItem_KnownHash(mapping, key, newval, hash) == -1)
+ goto done;
Py_CLEAR(newval);
}
Py_DECREF(key);
@@ -1899,6 +2331,9 @@ PyInit__collections(void)
Py_INCREF(&defdict_type);
PyModule_AddObject(m, "defaultdict", (PyObject *)&defdict_type);
+ Py_INCREF(&PyODict_Type);
+ PyModule_AddObject(m, "OrderedDict", (PyObject *)&PyODict_Type);
+
if (PyType_Ready(&dequeiter_type) < 0)
return NULL;
Py_INCREF(&dequeiter_type);
diff --git a/Modules/_cryptmodule.c b/Modules/_cryptmodule.c
index da44ef34ee..d422cfdff7 100644
--- a/Modules/_cryptmodule.c
+++ b/Modules/_cryptmodule.c
@@ -12,12 +12,13 @@ module crypt
[clinic start generated code]*/
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=c6252cf4f2f2ae81]*/
+#include "clinic/_cryptmodule.c.h"
/*[clinic input]
crypt.crypt
- word: 's'
- salt: 's'
+ word: str
+ salt: str
/
Hash a *word* with the given *salt* and return the hashed password.
@@ -29,43 +30,9 @@ results for a given *word*.
[clinic start generated code]*/
-PyDoc_STRVAR(crypt_crypt__doc__,
-"crypt($module, word, salt, /)\n"
-"--\n"
-"\n"
-"Hash a *word* with the given *salt* and return the hashed password.\n"
-"\n"
-"*word* will usually be a user\'s password. *salt* (either a random 2 or 16\n"
-"character string, possibly prefixed with $digit$ to indicate the method)\n"
-"will be used to perturb the encryption algorithm and produce distinct\n"
-"results for a given *word*.");
-
-#define CRYPT_CRYPT_METHODDEF \
- {"crypt", (PyCFunction)crypt_crypt, METH_VARARGS, crypt_crypt__doc__},
-
-static PyObject *
-crypt_crypt_impl(PyModuleDef *module, const char *word, const char *salt);
-
-static PyObject *
-crypt_crypt(PyModuleDef *module, PyObject *args)
-{
- PyObject *return_value = NULL;
- const char *word;
- const char *salt;
-
- if (!PyArg_ParseTuple(args,
- "ss:crypt",
- &word, &salt))
- goto exit;
- return_value = crypt_crypt_impl(module, word, salt);
-
-exit:
- return return_value;
-}
-
static PyObject *
crypt_crypt_impl(PyModuleDef *module, const char *word, const char *salt)
-/*[clinic end generated code: output=3eaacdf994a6ff23 input=4d93b6d0f41fbf58]*/
+/*[clinic end generated code: output=995ad1e854d83069 input=0e8edec9c364352b]*/
{
/* On some platforms (AtheOS) crypt returns NULL for an invalid
salt. Return None in that case. XXX Maybe raise an exception? */
diff --git a/Modules/_csv.c b/Modules/_csv.c
index 1a363fa5d0..101f449d06 100644
--- a/Modules/_csv.c
+++ b/Modules/_csv.c
@@ -248,7 +248,7 @@ _set_char(const char *name, Py_UCS4 *target, PyObject *src, Py_UCS4 dflt)
len = PyUnicode_GetLength(src);
if (len > 1) {
PyErr_Format(PyExc_TypeError,
- "\"%s\" must be an 1-character string",
+ "\"%s\" must be a 1-character string",
name);
return -1;
}
@@ -276,9 +276,8 @@ _set_str(const char *name, PyObject **target, PyObject *src, const char *dflt)
else {
if (PyUnicode_READY(src) == -1)
return -1;
- Py_XDECREF(*target);
Py_INCREF(src);
- *target = src;
+ Py_XSETREF(*target, src);
}
}
return 0;
@@ -290,7 +289,7 @@ dialect_check_quoting(int quoting)
StyleDesc *qs;
for (qs = quote_styles; qs->name; qs++) {
- if (qs->style == quoting)
+ if ((int)qs->style == quoting)
return 0;
}
PyErr_Format(PyExc_TypeError, "bad \"quoting\" value");
@@ -432,7 +431,7 @@ dialect_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
goto err;
if (self->delimiter == 0) {
PyErr_SetString(PyExc_TypeError,
- "\"delimiter\" must be an 1-character string");
+ "\"delimiter\" must be a 1-character string");
goto err;
}
if (quotechar == Py_None && quoting == NULL)
@@ -732,7 +731,7 @@ parse_process_char(ReaderObj *self, Py_UCS4 c)
break;
case QUOTE_IN_QUOTED_FIELD:
- /* doublequote - seen a quote in an quoted field */
+ /* doublequote - seen a quote in a quoted field */
if (dialect->quoting != QUOTE_NONE &&
c == dialect->quotechar) {
/* save "" as " */
@@ -784,8 +783,7 @@ parse_process_char(ReaderObj *self, Py_UCS4 c)
static int
parse_reset(ReaderObj *self)
{
- Py_XDECREF(self->fields);
- self->fields = PyList_New(0);
+ Py_XSETREF(self->fields, PyList_New(0));
if (self->fields == NULL)
return -1;
self->field_len = 0;
@@ -1009,7 +1007,7 @@ join_reset(WriterObj *self)
*/
static Py_ssize_t
join_append_data(WriterObj *self, unsigned int field_kind, void *field_data,
- Py_ssize_t field_len, int quote_empty, int *quoted,
+ Py_ssize_t field_len, int *quoted,
int copy_phase)
{
DialectObj *dialect = self->dialect;
@@ -1071,18 +1069,6 @@ join_append_data(WriterObj *self, unsigned int field_kind, void *field_data,
ADDCH(c);
}
- /* If field is empty check if it needs to be quoted.
- */
- if (i == 0 && quote_empty) {
- if (dialect->quoting == QUOTE_NONE) {
- PyErr_Format(_csvstate_global->error_obj,
- "single empty field record must be quoted");
- return -1;
- }
- else
- *quoted = 1;
- }
-
if (*quoted) {
if (copy_phase)
ADDCH(dialect->quotechar);
@@ -1126,7 +1112,7 @@ join_check_rec_size(WriterObj *self, Py_ssize_t rec_len)
}
static int
-join_append(WriterObj *self, PyObject *field, int *quoted, int quote_empty)
+join_append(WriterObj *self, PyObject *field, int quoted)
{
unsigned int field_kind = -1;
void *field_data = NULL;
@@ -1141,7 +1127,7 @@ join_append(WriterObj *self, PyObject *field, int *quoted, int quote_empty)
field_len = PyUnicode_GET_LENGTH(field);
}
rec_len = join_append_data(self, field_kind, field_data, field_len,
- quote_empty, quoted, 0);
+ &quoted, 0);
if (rec_len < 0)
return 0;
@@ -1150,7 +1136,7 @@ join_append(WriterObj *self, PyObject *field, int *quoted, int quote_empty)
return 0;
self->rec_len = join_append_data(self, field_kind, field_data, field_len,
- quote_empty, quoted, 1);
+ &quoted, 1);
self->num_fields++;
return 1;
@@ -1181,37 +1167,30 @@ join_append_lineterminator(WriterObj *self)
}
PyDoc_STRVAR(csv_writerow_doc,
-"writerow(sequence)\n"
+"writerow(iterable)\n"
"\n"
-"Construct and write a CSV record from a sequence of fields. Non-string\n"
+"Construct and write a CSV record from an iterable of fields. Non-string\n"
"elements will be converted to string.");
static PyObject *
csv_writerow(WriterObj *self, PyObject *seq)
{
DialectObj *dialect = self->dialect;
- Py_ssize_t len, i;
- PyObject *line, *result;
+ PyObject *iter, *field, *line, *result;
- if (!PySequence_Check(seq))
- return PyErr_Format(_csvstate_global->error_obj, "sequence expected");
-
- len = PySequence_Length(seq);
- if (len < 0)
- return NULL;
+ iter = PyObject_GetIter(seq);
+ if (iter == NULL)
+ return PyErr_Format(_csvstate_global->error_obj,
+ "iterable expected, not %.200s",
+ seq->ob_type->tp_name);
/* Join all fields in internal buffer.
*/
join_reset(self);
- for (i = 0; i < len; i++) {
- PyObject *field;
+ while ((field = PyIter_Next(iter))) {
int append_ok;
int quoted;
- field = PySequence_GetItem(seq, i);
- if (field == NULL)
- return NULL;
-
switch (dialect->quoting) {
case QUOTE_NONNUMERIC:
quoted = !PyNumber_Check(field);
@@ -1225,11 +1204,11 @@ csv_writerow(WriterObj *self, PyObject *seq)
}
if (PyUnicode_Check(field)) {
- append_ok = join_append(self, field, &quoted, len == 1);
+ append_ok = join_append(self, field, quoted);
Py_DECREF(field);
}
else if (field == Py_None) {
- append_ok = join_append(self, NULL, &quoted, len == 1);
+ append_ok = join_append(self, NULL, quoted);
Py_DECREF(field);
}
else {
@@ -1237,19 +1216,37 @@ csv_writerow(WriterObj *self, PyObject *seq)
str = PyObject_Str(field);
Py_DECREF(field);
- if (str == NULL)
+ if (str == NULL) {
+ Py_DECREF(iter);
return NULL;
- append_ok = join_append(self, str, &quoted, len == 1);
+ }
+ append_ok = join_append(self, str, quoted);
Py_DECREF(str);
}
- if (!append_ok)
+ if (!append_ok) {
+ Py_DECREF(iter);
+ return NULL;
+ }
+ }
+ Py_DECREF(iter);
+ if (PyErr_Occurred())
+ return NULL;
+
+ if (self->num_fields > 0 && self->rec_size == 0) {
+ if (dialect->quoting == QUOTE_NONE) {
+ PyErr_Format(_csvstate_global->error_obj,
+ "single empty field record must be quoted");
+ return NULL;
+ }
+ self->num_fields--;
+ if (!join_append(self, NULL, 1))
return NULL;
}
/* Add line terminator.
*/
if (!join_append_lineterminator(self))
- return 0;
+ return NULL;
line = PyUnicode_FromKindAndData(PyUnicode_4BYTE_KIND,
(void *) self->rec, self->rec_len);
@@ -1261,9 +1258,9 @@ csv_writerow(WriterObj *self, PyObject *seq)
}
PyDoc_STRVAR(csv_writerows_doc,
-"writerows(sequence of sequences)\n"
+"writerows(iterable of iterables)\n"
"\n"
-"Construct and write a series of sequences to a csv file. Non-string\n"
+"Construct and write a series of iterables to a csv file. Non-string\n"
"elements will be converted to string.");
static PyObject *
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c
index 2b27ed36db..2e01323b43 100644
--- a/Modules/_ctypes/_ctypes.c
+++ b/Modules/_ctypes/_ctypes.c
@@ -49,7 +49,7 @@ from_address(addr)
from_param(obj)
- typecheck and convert a Python object into a C function call parameter
- the result may be an instance of the type, or an integer or tuple
+ The result may be an instance of the type, or an integer or tuple
(typecode, value[, obj])
instance methods/properties
@@ -301,7 +301,7 @@ _ctypes_alloc_format_string_with_shape(int ndim, const Py_ssize_t *shape,
char *new_prefix;
char *result;
char buf[32];
- int prefix_len;
+ Py_ssize_t prefix_len;
int k;
prefix_len = 32 * ndim + 3;
@@ -391,8 +391,7 @@ StructUnionType_new(PyTypeObject *type, PyObject *args, PyObject *kwds, int isSt
Py_DECREF((PyObject *)dict);
return NULL;
}
- Py_DECREF(result->tp_dict);
- result->tp_dict = (PyObject *)dict;
+ Py_SETREF(result->tp_dict, (PyObject *)dict);
dict->format = _ctypes_alloc_format_string(NULL, "B");
if (dict->format == NULL) {
Py_DECREF(result);
@@ -871,8 +870,7 @@ PyCPointerType_SetProto(StgDictObject *stgdict, PyObject *proto)
return -1;
}
Py_INCREF(proto);
- Py_XDECREF(stgdict->proto);
- stgdict->proto = proto;
+ Py_XSETREF(stgdict->proto, proto);
return 0;
}
@@ -962,8 +960,7 @@ PyCPointerType_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_DECREF((PyObject *)stgdict);
return NULL;
}
- Py_DECREF(result->tp_dict);
- result->tp_dict = (PyObject *)stgdict;
+ Py_SETREF(result->tp_dict, (PyObject *)stgdict);
return (PyObject *)result;
}
@@ -1406,8 +1403,7 @@ PyCArrayType_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
/* replace the class dict by our updated spam dict */
if (-1 == PyDict_Update((PyObject *)stgdict, result->tp_dict))
goto error;
- Py_DECREF(result->tp_dict);
- result->tp_dict = (PyObject *)stgdict; /* steal the reference */
+ Py_SETREF(result->tp_dict, (PyObject *)stgdict); /* steal the reference */
stgdict = NULL;
/* Special case for character arrays.
@@ -1820,8 +1816,7 @@ static PyObject *CreateSwappedType(PyTypeObject *type, PyObject *args, PyObject
Py_DECREF((PyObject *)stgdict);
return NULL;
}
- Py_DECREF(result->tp_dict);
- result->tp_dict = (PyObject *)stgdict;
+ Py_SETREF(result->tp_dict, (PyObject *)stgdict);
return (PyObject *)result;
}
@@ -1949,8 +1944,7 @@ PyCSimpleType_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_DECREF((PyObject *)stgdict);
return NULL;
}
- Py_DECREF(result->tp_dict);
- result->tp_dict = (PyObject *)stgdict;
+ Py_SETREF(result->tp_dict, (PyObject *)stgdict);
/* Install from_param class methods in ctypes base classes.
Overrides the PyCSimpleType_from_param generic method.
@@ -2313,8 +2307,7 @@ PyCFuncPtrType_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
Py_DECREF((PyObject *)stgdict);
return NULL;
}
- Py_DECREF(result->tp_dict);
- result->tp_dict = (PyObject *)stgdict;
+ Py_SETREF(result->tp_dict, (PyObject *)stgdict);
if (-1 == make_funcptrtype_dict(stgdict)) {
Py_DECREF(result);
@@ -2458,8 +2451,7 @@ KeepRef(CDataObject *target, Py_ssize_t index, PyObject *keep)
return -1;
}
if (ob->b_objects == NULL || !PyDict_CheckExact(ob->b_objects)) {
- Py_XDECREF(ob->b_objects);
- ob->b_objects = keep; /* refcount consumed */
+ Py_XSETREF(ob->b_objects, keep); /* refcount consumed */
return 0;
}
key = unique_key(target, index);
@@ -2839,8 +2831,9 @@ _PyCData_set(CDataObject *dst, PyObject *type, SETFUNC setfunc, PyObject *value,
src->b_ptr,
size);
- if (PyCPointerTypeObject_Check(type))
- /* XXX */;
+ if (PyCPointerTypeObject_Check(type)) {
+ /* XXX */
+ }
value = GetKeepedObjects(src);
if (value == NULL)
@@ -2961,9 +2954,8 @@ PyCFuncPtr_set_errcheck(PyCFuncPtrObject *self, PyObject *ob)
"the errcheck attribute must be callable");
return -1;
}
- Py_XDECREF(self->errcheck);
Py_XINCREF(ob);
- self->errcheck = ob;
+ Py_XSETREF(self->errcheck, ob);
return 0;
}
@@ -2991,11 +2983,9 @@ PyCFuncPtr_set_restype(PyCFuncPtrObject *self, PyObject *ob)
"restype must be a type, a callable, or None");
return -1;
}
- Py_XDECREF(self->checker);
- Py_XDECREF(self->restype);
Py_INCREF(ob);
- self->restype = ob;
- self->checker = PyObject_GetAttrString(ob, "_check_retval_");
+ Py_XSETREF(self->restype, ob);
+ Py_XSETREF(self->checker, PyObject_GetAttrString(ob, "_check_retval_"));
if (self->checker == NULL)
PyErr_Clear();
return 0;
@@ -3032,11 +3022,9 @@ PyCFuncPtr_set_argtypes(PyCFuncPtrObject *self, PyObject *ob)
converters = converters_from_argtypes(ob);
if (!converters)
return -1;
- Py_XDECREF(self->converters);
- self->converters = converters;
- Py_XDECREF(self->argtypes);
+ Py_XSETREF(self->converters, converters);
Py_INCREF(ob);
- self->argtypes = ob;
+ Py_XSETREF(self->argtypes, ob);
}
return 0;
}
@@ -3414,7 +3402,7 @@ PyCFuncPtr_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
return NULL;
}
- /* XXX XXX This would allow to pass additional options. For COM
+ /* XXX XXX This would allow passing additional options. For COM
method *implementations*, we would probably want different
behaviour than in 'normal' callback functions: return a HRESULT if
an exception occurs in the callback, and print the traceback not
@@ -3814,7 +3802,7 @@ PyCFuncPtr_call(PyCFuncPtrObject *self, PyObject *inargs, PyObject *kwds)
return NULL;
}
/* there should be more checks? No, in Python */
- /* First arg is an pointer to an interface instance */
+ /* First arg is a pointer to an interface instance */
if (!this->b_ptr || *(void **)this->b_ptr == NULL) {
PyErr_SetString(PyExc_ValueError,
"NULL COM pointer access");
@@ -5163,9 +5151,8 @@ comerror_init(PyObject *self, PyObject *args, PyObject *kwds)
return -1;
bself = (PyBaseExceptionObject *)self;
- Py_DECREF(bself->args);
- bself->args = args;
- Py_INCREF(bself->args);
+ Py_INCREF(args);
+ Py_SETREF(bself->args, args);
return 0;
}
diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c
index 8daeffca93..03a911fa06 100644
--- a/Modules/_ctypes/callproc.c
+++ b/Modules/_ctypes/callproc.c
@@ -1603,7 +1603,7 @@ resize(PyObject *self, PyObject *args)
"Memory cannot be resized because this object doesn't own it");
return NULL;
}
- if (size <= sizeof(obj->b_value)) {
+ if ((size_t)size <= sizeof(obj->b_value)) {
/* internal default buffer is large enough */
obj->b_size = size;
goto done;
diff --git a/Modules/_ctypes/cfield.c b/Modules/_ctypes/cfield.c
index c89d91956a..8cb6d663e7 100644
--- a/Modules/_ctypes/cfield.c
+++ b/Modules/_ctypes/cfield.c
@@ -1355,14 +1355,6 @@ z_get(void *ptr, Py_ssize_t size)
{
/* XXX What about invalid pointers ??? */
if (*(void **)ptr) {
-#if defined(MS_WIN32) && !defined(_WIN32_WCE)
- if (IsBadStringPtrA(*(char **)ptr, -1)) {
- PyErr_Format(PyExc_ValueError,
- "invalid string pointer %p",
- *(char **)ptr);
- return NULL;
- }
-#endif
return PyBytes_FromStringAndSize(*(char **)ptr,
strlen(*(char **)ptr));
} else {
@@ -1383,7 +1375,7 @@ Z_set(void *ptr, PyObject *value, Py_ssize_t size)
Py_INCREF(value);
return value;
}
- if (PyLong_Check(value) || PyLong_Check(value)) {
+ if (PyLong_Check(value)) {
#if SIZEOF_VOID_P == SIZEOF_LONG_LONG
*(wchar_t **)ptr = (wchar_t *)PyLong_AsUnsignedLongLongMask(value);
#else
@@ -1419,14 +1411,6 @@ Z_get(void *ptr, Py_ssize_t size)
wchar_t *p;
p = *(wchar_t **)ptr;
if (p) {
-#if defined(MS_WIN32) && !defined(_WIN32_WCE)
- if (IsBadStringPtrW(*(wchar_t **)ptr, -1)) {
- PyErr_Format(PyExc_ValueError,
- "invalid string pointer %p",
- *(wchar_t **)ptr);
- return NULL;
- }
-#endif
return PyUnicode_FromWideChar(p, wcslen(p));
} else {
Py_INCREF(Py_None);
@@ -1456,15 +1440,15 @@ BSTR_set(void *ptr, PyObject *value, Py_ssize_t size)
/* create a BSTR from value */
if (value) {
wchar_t* wvalue;
- Py_ssize_t size;
- wvalue = PyUnicode_AsUnicodeAndSize(value, &size);
+ Py_ssize_t wsize;
+ wvalue = PyUnicode_AsUnicodeAndSize(value, &wsize);
if (wvalue == NULL)
return NULL;
- if ((unsigned) size != size) {
+ if ((unsigned) wsize != wsize) {
PyErr_SetString(PyExc_ValueError, "String too long for BSTR");
return NULL;
}
- bstr = SysAllocStringLen(wvalue, (unsigned)size);
+ bstr = SysAllocStringLen(wvalue, (unsigned)wsize);
Py_DECREF(value);
} else
bstr = NULL;
@@ -1507,7 +1491,7 @@ P_set(void *ptr, PyObject *value, Py_ssize_t size)
_RET(value);
}
- if (!PyLong_Check(value) && !PyLong_Check(value)) {
+ if (!PyLong_Check(value)) {
PyErr_SetString(PyExc_TypeError,
"cannot be converted to pointer");
return NULL;
diff --git a/Modules/_ctypes/ctypes_dlfcn.h b/Modules/_ctypes/ctypes_dlfcn.h
index d8bf904be2..54cdde9a4f 100644
--- a/Modules/_ctypes/ctypes_dlfcn.h
+++ b/Modules/_ctypes/ctypes_dlfcn.h
@@ -1,7 +1,3 @@
-/*****************************************************************
- This file should be kept compatible with Python 2.3, see PEP 291.
- *****************************************************************/
-
#ifndef _CTYPES_DLFCN_H_
#define _CTYPES_DLFCN_H_
diff --git a/Modules/_ctypes/libffi/m4/libtool.m4 b/Modules/_ctypes/libffi/m4/libtool.m4
index 4bc6b22c80..d9cc77b840 100644
--- a/Modules/_ctypes/libffi/m4/libtool.m4
+++ b/Modules/_ctypes/libffi/m4/libtool.m4
@@ -1121,7 +1121,7 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
# If we don't find anything, use the default library path according
# to the aix ld manual.
# Store the results from the different compilers for each TAGNAME.
-# Allow to override them for all tags through lt_cv_aix_libpath.
+# Allow overriding them for all tags through lt_cv_aix_libpath.
m4_defun([_LT_SYS_MODULE_PATH_AIX],
[m4_require([_LT_DECL_SED])dnl
if test set = "${lt_cv_aix_libpath+set}"; then
diff --git a/Modules/_ctypes/libffi_msvc/ffi.c b/Modules/_ctypes/libffi_msvc/ffi.c
index 76cb03efcd..b7586c70eb 100644
--- a/Modules/_ctypes/libffi_msvc/ffi.c
+++ b/Modules/_ctypes/libffi_msvc/ffi.c
@@ -65,37 +65,56 @@ void ffi_prep_args(char *stack, extended_cif *ecif)
argp = (char *) ALIGN(argp, sizeof(void *));
z = (*p_arg)->size;
- if (z < sizeof(int))
+ if (z < sizeof(intptr_t))
{
- z = sizeof(int);
+ z = sizeof(intptr_t);
switch ((*p_arg)->type)
{
case FFI_TYPE_SINT8:
- *(signed int *) argp = (signed int)*(SINT8 *)(* p_argv);
+ *(intptr_t *) argp = (intptr_t)*(SINT8 *)(* p_argv);
break;
case FFI_TYPE_UINT8:
- *(unsigned int *) argp = (unsigned int)*(UINT8 *)(* p_argv);
+ *(uintptr_t *) argp = (uintptr_t)*(UINT8 *)(* p_argv);
break;
case FFI_TYPE_SINT16:
- *(signed int *) argp = (signed int)*(SINT16 *)(* p_argv);
+ *(intptr_t *) argp = (intptr_t)*(SINT16 *)(* p_argv);
break;
case FFI_TYPE_UINT16:
- *(unsigned int *) argp = (unsigned int)*(UINT16 *)(* p_argv);
+ *(uintptr_t *) argp = (uintptr_t)*(UINT16 *)(* p_argv);
break;
case FFI_TYPE_SINT32:
- *(signed int *) argp = (signed int)*(SINT32 *)(* p_argv);
+ *(intptr_t *) argp = (intptr_t)*(SINT32 *)(* p_argv);
break;
case FFI_TYPE_UINT32:
- *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv);
+ *(uintptr_t *) argp = (uintptr_t)*(UINT32 *)(* p_argv);
+ break;
+
+ case FFI_TYPE_FLOAT:
+ *(uintptr_t *) argp = 0;
+ *(float *) argp = *(float *)(* p_argv);
+ break;
+
+ // 64-bit value cases should never be used for x86 and AMD64 builds
+ case FFI_TYPE_SINT64:
+ *(intptr_t *) argp = (intptr_t)*(SINT64 *)(* p_argv);
+ break;
+
+ case FFI_TYPE_UINT64:
+ *(uintptr_t *) argp = (uintptr_t)*(UINT64 *)(* p_argv);
break;
case FFI_TYPE_STRUCT:
- *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv);
+ *(uintptr_t *) argp = (uintptr_t)*(UINT32 *)(* p_argv);
+ break;
+
+ case FFI_TYPE_DOUBLE:
+ *(uintptr_t *) argp = 0;
+ *(double *) argp = *(double *)(* p_argv);
break;
default:
diff --git a/Modules/_curses_panel.c b/Modules/_curses_panel.c
index 87b9c0516f..228f4971ac 100644
--- a/Modules/_curses_panel.c
+++ b/Modules/_curses_panel.c
@@ -220,6 +220,11 @@ PyCursesPanel_New(PANEL *pan, PyCursesWindowObject *wo)
static void
PyCursesPanel_Dealloc(PyCursesPanelObject *po)
{
+ PyObject *obj = (PyObject *) panel_userptr(po->pan);
+ if (obj) {
+ (void)set_panel_userptr(po->pan, NULL);
+ Py_DECREF(obj);
+ }
(void)del_panel(po->pan);
if (po->wo != NULL) {
Py_DECREF(po->wo);
@@ -312,9 +317,8 @@ PyCursesPanel_replace_panel(PyCursesPanelObject *self, PyObject *args)
PyErr_SetString(_curses_panelstate_global->PyCursesError, "replace_panel() returned ERR");
return NULL;
}
- Py_DECREF(po->wo);
- po->wo = temp;
- Py_INCREF(po->wo);
+ Py_INCREF(temp);
+ Py_SETREF(po->wo, temp);
Py_INCREF(Py_None);
return Py_None;
}
@@ -507,10 +511,11 @@ PyInit__curses_panel(void)
d = PyModule_GetDict(m);
/* Initialize object type */
- _curses_panelstate(m)->PyCursesPanel_Type = \
- PyType_FromSpec(&PyCursesPanel_Type_spec);
- if (_curses_panelstate(m)->PyCursesPanel_Type == NULL)
+ v = PyType_FromSpec(&PyCursesPanel_Type_spec);
+ if (v == NULL)
goto fail;
+ ((PyTypeObject *)v)->tp_new = NULL;
+ _curses_panelstate(m)->PyCursesPanel_Type = v;
import_curses();
if (PyErr_Occurred())
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
index 5ffce2f954..d64bdc74e9 100644
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -140,6 +140,8 @@ class curses.window "PyCursesWindowObject *" "&PyCursesWindow_Type"
[clinic start generated code]*/
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=88c860abdbb50e0c]*/
+#include "clinic/_cursesmodule.c.h"
+
/* Definition of exception curses.error */
static PyObject *PyCursesError;
@@ -583,75 +585,10 @@ By default, the character position and attributes are the
current settings for the window object.
[clinic start generated code]*/
-PyDoc_STRVAR(curses_window_addch__doc__,
-"addch([y, x,] ch, [attr])\n"
-"Paint character ch at (y, x) with attributes attr.\n"
-"\n"
-" y\n"
-" Y-coordinate.\n"
-" x\n"
-" X-coordinate.\n"
-" ch\n"
-" Character to add.\n"
-" attr\n"
-" Attributes for the character.\n"
-"\n"
-"Paint character ch at (y, x) with attributes attr,\n"
-"overwriting any character previously painted at that location.\n"
-"By default, the character position and attributes are the\n"
-"current settings for the window object.");
-
-#define CURSES_WINDOW_ADDCH_METHODDEF \
- {"addch", (PyCFunction)curses_window_addch, METH_VARARGS, curses_window_addch__doc__},
-
static PyObject *
-curses_window_addch_impl(PyCursesWindowObject *self, int group_left_1, int y, int x, PyObject *ch, int group_right_1, long attr);
-
-static PyObject *
-curses_window_addch(PyCursesWindowObject *self, PyObject *args)
-{
- PyObject *return_value = NULL;
- int group_left_1 = 0;
- int y = 0;
- int x = 0;
- PyObject *ch;
- int group_right_1 = 0;
- long attr = 0;
-
- switch (PyTuple_GET_SIZE(args)) {
- case 1:
- if (!PyArg_ParseTuple(args, "O:addch", &ch))
- goto exit;
- break;
- case 2:
- if (!PyArg_ParseTuple(args, "Ol:addch", &ch, &attr))
- goto exit;
- group_right_1 = 1;
- break;
- case 3:
- if (!PyArg_ParseTuple(args, "iiO:addch", &y, &x, &ch))
- goto exit;
- group_left_1 = 1;
- break;
- case 4:
- if (!PyArg_ParseTuple(args, "iiOl:addch", &y, &x, &ch, &attr))
- goto exit;
- group_right_1 = 1;
- group_left_1 = 1;
- break;
- default:
- PyErr_SetString(PyExc_TypeError, "curses.window.addch requires 1 to 4 arguments");
- goto exit;
- }
- return_value = curses_window_addch_impl(self, group_left_1, y, x, ch, group_right_1, attr);
-
-exit:
- return return_value;
-}
-
-static PyObject *
-curses_window_addch_impl(PyCursesWindowObject *self, int group_left_1, int y, int x, PyObject *ch, int group_right_1, long attr)
-/*[clinic end generated code: output=d4b97cc287010c54 input=5a41efb34a2de338]*/
+curses_window_addch_impl(PyCursesWindowObject *self, int group_left_1, int y,
+ int x, PyObject *ch, int group_right_1, long attr)
+/*[clinic end generated code: output=99f7f85078ec06c3 input=5a41efb34a2de338]*/
{
PyCursesWindowObject *cwself = (PyCursesWindowObject *)self;
int coordinates_group = group_left_1;
@@ -2675,7 +2612,7 @@ PyCurses_KeyName(PyObject *self, PyObject *args)
}
knp = keyname(ch);
- return PyBytes_FromString((knp == NULL) ? "" : (char *)knp);
+ return PyBytes_FromString((knp == NULL) ? "" : knp);
}
#endif
@@ -2929,6 +2866,13 @@ update_lines_cols(void)
Py_DECREF(m);
return 1;
}
+
+static PyObject *
+PyCurses_update_lines_cols(PyObject *self)
+{
+ return PyLong_FromLong((long) update_lines_cols());
+}
+
#endif
#ifdef HAVE_CURSES_RESIZETERM
@@ -3331,6 +3275,9 @@ static PyMethodDef PyCurses_methods[] = {
{"typeahead", (PyCFunction)PyCurses_TypeAhead, METH_VARARGS},
{"unctrl", (PyCFunction)PyCurses_UnCtrl, METH_VARARGS},
{"ungetch", (PyCFunction)PyCurses_UngetCh, METH_VARARGS},
+#if defined(HAVE_CURSES_RESIZETERM) || defined(HAVE_CURSES_RESIZE_TERM)
+ {"update_lines_cols", (PyCFunction)PyCurses_update_lines_cols, METH_NOARGS},
+#endif
#ifdef HAVE_NCURSESW
{"unget_wch", (PyCFunction)PyCurses_Unget_Wch, METH_VARARGS},
#endif
diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c
index 6084ffa201..f419cb22ef 100644
--- a/Modules/_datetimemodule.c
+++ b/Modules/_datetimemodule.c
@@ -7,6 +7,10 @@
#include <time.h>
+#ifdef MS_WINDOWS
+# include <winsock2.h> /* struct timeval */
+#endif
+
/* Differentiate between building the core module and building extension
* modules.
*/
@@ -22,6 +26,8 @@ class datetime.datetime "PyDateTime_DateTime *" "&PyDateTime_DateTimeType"
[clinic start generated code]*/
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=78142cb64b9e98bc]*/
+#include "clinic/_datetimemodule.c.h"
+
/* We require that C int be at least 32 bits, and use int virtually
* everywhere. In just a few cases we use a temp long, where a Python
* API returns a C long. In such cases, we have to ensure that the
@@ -213,7 +219,7 @@ days_in_month(int year, int month)
return _days_in_month[month];
}
-/* year, month -> number of days in year preceeding first day of month */
+/* year, month -> number of days in year preceding first day of month */
static int
days_before_month(int year, int month)
{
@@ -1067,7 +1073,7 @@ format_utcoffset(char *buf, size_t buflen, const char *sep,
minutes = divmod(seconds, 60, &seconds);
hours = divmod(minutes, 60, &minutes);
assert(seconds == 0);
- /* XXX ignore sub-minute data, curently not allowed. */
+ /* XXX ignore sub-minute data, currently not allowed. */
PyOS_snprintf(buf, buflen, "%c%02d%s%02d", sign, hours, sep, minutes);
return 0;
@@ -2459,7 +2465,7 @@ date_local_from_object(PyObject *cls, PyObject *obj)
struct tm *tm;
time_t t;
- if (_PyTime_ObjectToTime_t(obj, &t, _PyTime_ROUND_DOWN) == -1)
+ if (_PyTime_ObjectToTime_t(obj, &t, _PyTime_ROUND_FLOOR) == -1)
return NULL;
tm = localtime(&t);
@@ -3298,7 +3304,7 @@ timezone_str(PyDateTime_TimeZone *self)
Py_DECREF(offset);
minutes = divmod(seconds, 60, &seconds);
hours = divmod(minutes, 60, &minutes);
- /* XXX ignore sub-minute data, curently not allowed. */
+ /* XXX ignore sub-minute data, currently not allowed. */
assert(seconds == 0);
return PyUnicode_FromFormat("UTC%c%02d:%02d", sign, hours, minutes);
}
@@ -3805,29 +3811,6 @@ time_replace(PyDateTime_Time *self, PyObject *args, PyObject *kw)
return clone;
}
-static int
-time_bool(PyObject *self)
-{
- PyObject *offset, *tzinfo;
- int offsecs = 0;
-
- if (TIME_GET_SECOND(self) || TIME_GET_MICROSECOND(self)) {
- /* Since utcoffset is in whole minutes, nothing can
- * alter the conclusion that this is nonzero.
- */
- return 1;
- }
- tzinfo = GET_TIME_TZINFO(self);
- if (tzinfo != Py_None) {
- offset = call_utcoffset(tzinfo, Py_None);
- if (offset == NULL)
- return -1;
- offsecs = GET_TD_DAYS(offset)*86400 + GET_TD_SECONDS(offset);
- Py_DECREF(offset);
- }
- return (TIME_GET_MINUTE(self)*60 - offsecs + TIME_GET_HOUR(self)*3600) != 0;
-}
-
/* Pickle support, a simple use of __reduce__. */
/* Let basestate be the non-tzinfo data string.
@@ -3895,19 +3878,6 @@ PyDoc_STR("time([hour[, minute[, second[, microsecond[, tzinfo]]]]]) --> a time
All arguments are optional. tzinfo may be None, or an instance of\n\
a tzinfo subclass. The remaining arguments may be ints.\n");
-static PyNumberMethods time_as_number = {
- 0, /* nb_add */
- 0, /* nb_subtract */
- 0, /* nb_multiply */
- 0, /* nb_remainder */
- 0, /* nb_divmod */
- 0, /* nb_power */
- 0, /* nb_negative */
- 0, /* nb_positive */
- 0, /* nb_absolute */
- (inquiry)time_bool, /* nb_bool */
-};
-
static PyTypeObject PyDateTime_TimeType = {
PyVarObject_HEAD_INIT(NULL, 0)
"datetime.time", /* tp_name */
@@ -3919,7 +3889,7 @@ static PyTypeObject PyDateTime_TimeType = {
0, /* tp_setattr */
0, /* tp_reserved */
(reprfunc)time_repr, /* tp_repr */
- &time_as_number, /* tp_as_number */
+ 0, /* tp_as_number */
0, /* tp_as_sequence */
0, /* tp_as_mapping */
(hashfunc)time_hash, /* tp_hash */
@@ -4194,10 +4164,15 @@ datetime_from_timestamp(PyObject *cls, TM_FUNC f, double timestamp,
static PyObject *
datetime_best_possible(PyObject *cls, TM_FUNC f, PyObject *tzinfo)
{
- _PyTime_timeval t;
- _PyTime_gettimeofday(&t);
- return datetime_from_timet_and_us(cls, f, t.tv_sec, (int)t.tv_usec,
- tzinfo);
+ _PyTime_t ts = _PyTime_GetSystemClock();
+ time_t secs;
+ int us;
+
+ if (_PyTime_AsTimevalTime_t(ts, &secs, &us, _PyTime_ROUND_FLOOR) < 0)
+ return NULL;
+ assert(0 <= us && us <= 999999);
+
+ return datetime_from_timet_and_us(cls, f, secs, us, tzinfo);
}
/*[clinic input]
@@ -4213,43 +4188,9 @@ Returns new datetime object representing current time local to tz.
If no tz is specified, uses local timezone.
[clinic start generated code]*/
-PyDoc_STRVAR(datetime_datetime_now__doc__,
-"now($type, /, tz=None)\n"
-"--\n"
-"\n"
-"Returns new datetime object representing current time local to tz.\n"
-"\n"
-" tz\n"
-" Timezone object.\n"
-"\n"
-"If no tz is specified, uses local timezone.");
-
-#define DATETIME_DATETIME_NOW_METHODDEF \
- {"now", (PyCFunction)datetime_datetime_now, METH_VARARGS|METH_KEYWORDS|METH_CLASS, datetime_datetime_now__doc__},
-
-static PyObject *
-datetime_datetime_now_impl(PyTypeObject *type, PyObject *tz);
-
-static PyObject *
-datetime_datetime_now(PyTypeObject *type, PyObject *args, PyObject *kwargs)
-{
- PyObject *return_value = NULL;
- static char *_keywords[] = {"tz", NULL};
- PyObject *tz = Py_None;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "|O:now", _keywords,
- &tz))
- goto exit;
- return_value = datetime_datetime_now_impl(type, tz);
-
-exit:
- return return_value;
-}
-
static PyObject *
datetime_datetime_now_impl(PyTypeObject *type, PyObject *tz)
-/*[clinic end generated code: output=583c5637e3c843fa input=80d09869c5267d00]*/
+/*[clinic end generated code: output=b3386e5345e2b47a input=80d09869c5267d00]*/
{
PyObject *self;
@@ -4808,7 +4749,12 @@ local_timezone(PyDateTime_DateTime *utc_time)
PyObject *nameo = NULL;
const char *zone = NULL;
- delta = datetime_subtract((PyObject *)utc_time, PyDateTime_Epoch);
+ delta = new_delta(ymd_to_ord(GET_YEAR(utc_time), GET_MONTH(utc_time),
+ GET_DAY(utc_time)) - 719163,
+ 60 * (60 * DATE_GET_HOUR(utc_time) +
+ DATE_GET_MINUTE(utc_time)) +
+ DATE_GET_SECOND(utc_time),
+ 0, 0);
if (delta == NULL)
return NULL;
one_second = new_delta(0, 1, 0, 0);
@@ -5111,8 +5057,7 @@ static PyMethodDef datetime_methods[] = {
{"utcfromtimestamp", (PyCFunction)datetime_utcfromtimestamp,
METH_VARARGS | METH_CLASS,
- PyDoc_STR("timestamp -> UTC datetime from a POSIX timestamp "
- "(like time.time()).")},
+ PyDoc_STR("Construct a naive UTC datetime from a POSIX timestamp.")},
{"strptime", (PyCFunction)datetime_strptime,
METH_VARARGS | METH_CLASS,
diff --git a/Modules/_dbmmodule.c b/Modules/_dbmmodule.c
index 93ea4161a7..02899e4303 100644
--- a/Modules/_dbmmodule.c
+++ b/Modules/_dbmmodule.c
@@ -29,10 +29,10 @@ static char *which_dbm = "Berkeley DB";
#endif
/*[clinic input]
-module dbm
-class dbm.dbm "dbmobject *" "&Dbmtype"
+module _dbm
+class _dbm.dbm "dbmobject *" "&Dbmtype"
[clinic start generated code]*/
-/*[clinic end generated code: output=da39a3ee5e6b4b0d input=92450564684a69a3]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=9b1aa8756d16150e]*/
typedef struct {
PyObject_HEAD
@@ -40,6 +40,8 @@ typedef struct {
DBM *di_dbm;
} dbmobject;
+#include "clinic/_dbmmodule.c.h"
+
static PyTypeObject Dbmtype;
#define is_dbmobject(v) (Py_TYPE(v) == &Dbmtype)
@@ -49,15 +51,6 @@ static PyTypeObject Dbmtype;
static PyObject *DbmError;
-/*[python input]
-class dbmobject_converter(self_converter):
- type = "dbmobject *"
- def pre_render(self):
- super().pre_render()
- self.name = 'dp'
-[python start generated code]*/
-/*[python end generated code: output=da39a3ee5e6b4b0d input=6ad536357913879a]*/
-
static PyObject *
newdbmobject(const char *file, int flags, int mode)
{
@@ -181,29 +174,43 @@ static PyMappingMethods dbm_as_mapping = {
(objobjargproc)dbm_ass_sub, /*mp_ass_subscript*/
};
+/*[clinic input]
+_dbm.dbm.close
+
+Close the database.
+[clinic start generated code]*/
+
static PyObject *
-dbm__close(dbmobject *dp, PyObject *unused)
+_dbm_dbm_close_impl(dbmobject *self)
+/*[clinic end generated code: output=c8dc5b6709600b86 input=046db72377d51be8]*/
{
- if (dp->di_dbm)
- dbm_close(dp->di_dbm);
- dp->di_dbm = NULL;
+ if (self->di_dbm)
+ dbm_close(self->di_dbm);
+ self->di_dbm = NULL;
Py_INCREF(Py_None);
return Py_None;
}
+/*[clinic input]
+_dbm.dbm.keys
+
+Return a list of all keys in the database.
+[clinic start generated code]*/
+
static PyObject *
-dbm_keys(dbmobject *dp, PyObject *unused)
+_dbm_dbm_keys_impl(dbmobject *self)
+/*[clinic end generated code: output=434549f7c121b33c input=d210ba778cd9c68a]*/
{
PyObject *v, *item;
datum key;
int err;
- check_dbmobject_open(dp);
+ check_dbmobject_open(self);
v = PyList_New(0);
if (v == NULL)
return NULL;
- for (key = dbm_firstkey(dp->di_dbm); key.dptr;
- key = dbm_nextkey(dp->di_dbm)) {
+ for (key = dbm_firstkey(self->di_dbm); key.dptr;
+ key = dbm_nextkey(self->di_dbm)) {
item = PyBytes_FromStringAndSize(key.dptr, key.dsize);
if (item == NULL) {
Py_DECREF(v);
@@ -265,58 +272,27 @@ static PySequenceMethods dbm_as_sequence = {
};
/*[clinic input]
+_dbm.dbm.get
-dbm.dbm.get
-
- self: dbmobject
-
- key: str(length=True)
- default: object = None
+ key: str(accept={str, robuffer}, zeroes=True)
+ default: object(c_default="NULL") = b''
/
Return the value for key if present, otherwise default.
[clinic start generated code]*/
-PyDoc_STRVAR(dbm_dbm_get__doc__,
-"get($self, key, default=None, /)\n"
-"--\n"
-"\n"
-"Return the value for key if present, otherwise default.");
-
-#define DBM_DBM_GET_METHODDEF \
- {"get", (PyCFunction)dbm_dbm_get, METH_VARARGS, dbm_dbm_get__doc__},
-
-static PyObject *
-dbm_dbm_get_impl(dbmobject *dp, const char *key, Py_ssize_clean_t key_length, PyObject *default_value);
-
static PyObject *
-dbm_dbm_get(dbmobject *dp, PyObject *args)
-{
- PyObject *return_value = NULL;
- const char *key;
- Py_ssize_clean_t key_length;
- PyObject *default_value = Py_None;
-
- if (!PyArg_ParseTuple(args,
- "s#|O:get",
- &key, &key_length, &default_value))
- goto exit;
- return_value = dbm_dbm_get_impl(dp, key, key_length, default_value);
-
-exit:
- return return_value;
-}
-
-static PyObject *
-dbm_dbm_get_impl(dbmobject *dp, const char *key, Py_ssize_clean_t key_length, PyObject *default_value)
-/*[clinic end generated code: output=452ea11394e7e92d input=aecf5efd2f2b1a3b]*/
+_dbm_dbm_get_impl(dbmobject *self, const char *key,
+ Py_ssize_clean_t key_length, PyObject *default_value)
+/*[clinic end generated code: output=b44f95eba8203d93 input=a3a279957f85eb6d]*/
+/*[clinic end generated code: output=4f5c0e523eaf1251 input=9402c0af8582dc69]*/
{
datum dbm_key, val;
dbm_key.dptr = (char *)key;
dbm_key.dsize = key_length;
- check_dbmobject_open(dp);
- val = dbm_fetch(dp->di_dbm, dbm_key);
+ check_dbmobject_open(self);
+ val = dbm_fetch(self->di_dbm, dbm_key);
if (val.dptr != NULL)
return PyBytes_FromStringAndSize(val.dptr, val.dsize);
@@ -324,46 +300,55 @@ dbm_dbm_get_impl(dbmobject *dp, const char *key, Py_ssize_clean_t key_length, Py
return default_value;
}
+/*[clinic input]
+_dbm.dbm.setdefault
+ key: str(accept={str, robuffer}, zeroes=True)
+ default: object(c_default="NULL") = b''
+ /
+
+Return the value for key if present, otherwise default.
+
+If key is not in the database, it is inserted with default as the value.
+[clinic start generated code]*/
+
static PyObject *
-dbm_setdefault(dbmobject *dp, PyObject *args)
+_dbm_dbm_setdefault_impl(dbmobject *self, const char *key,
+ Py_ssize_clean_t key_length,
+ PyObject *default_value)
+/*[clinic end generated code: output=52545886cf272161 input=bf40c48edaca01d6]*/
{
- datum key, val;
- PyObject *defvalue = NULL;
- char *tmp_ptr;
+ datum dbm_key, val;
Py_ssize_t tmp_size;
- if (!PyArg_ParseTuple(args, "s#|O:setdefault",
- &tmp_ptr, &tmp_size, &defvalue))
- return NULL;
- key.dptr = tmp_ptr;
- key.dsize = tmp_size;
- check_dbmobject_open(dp);
- val = dbm_fetch(dp->di_dbm, key);
+ dbm_key.dptr = (char *)key;
+ dbm_key.dsize = key_length;
+ check_dbmobject_open(self);
+ val = dbm_fetch(self->di_dbm, dbm_key);
if (val.dptr != NULL)
return PyBytes_FromStringAndSize(val.dptr, val.dsize);
- if (defvalue == NULL) {
- defvalue = PyBytes_FromStringAndSize(NULL, 0);
- if (defvalue == NULL)
+ if (default_value == NULL) {
+ default_value = PyBytes_FromStringAndSize(NULL, 0);
+ if (default_value == NULL)
return NULL;
val.dptr = NULL;
val.dsize = 0;
}
else {
- if ( !PyArg_Parse(defvalue, "s#", &val.dptr, &tmp_size) ) {
+ if ( !PyArg_Parse(default_value, "s#", &val.dptr, &tmp_size) ) {
PyErr_SetString(PyExc_TypeError,
"dbm mappings have byte string elements only");
return NULL;
}
val.dsize = tmp_size;
- Py_INCREF(defvalue);
+ Py_INCREF(default_value);
}
- if (dbm_store(dp->di_dbm, key, val, DBM_INSERT) < 0) {
- dbm_clearerr(dp->di_dbm);
+ if (dbm_store(self->di_dbm, dbm_key, val, DBM_INSERT) < 0) {
+ dbm_clearerr(self->di_dbm);
PyErr_SetString(DbmError, "cannot add item to database");
- Py_DECREF(defvalue);
+ Py_DECREF(default_value);
return NULL;
}
- return defvalue;
+ return default_value;
}
static PyObject *
@@ -382,15 +367,10 @@ dbm__exit__(PyObject *self, PyObject *args)
static PyMethodDef dbm_methods[] = {
- {"close", (PyCFunction)dbm__close, METH_NOARGS,
- "close()\nClose the database."},
- {"keys", (PyCFunction)dbm_keys, METH_NOARGS,
- "keys() -> list\nReturn a list of all keys in the database."},
- DBM_DBM_GET_METHODDEF
- {"setdefault", (PyCFunction)dbm_setdefault, METH_VARARGS,
- "setdefault(key[, default]) -> value\n"
- "Return the value for key if present, otherwise default. If key\n"
- "is not in the database, it is inserted with default as the value."},
+ _DBM_DBM_CLOSE_METHODDEF
+ _DBM_DBM_KEYS_METHODDEF
+ _DBM_DBM_GET_METHODDEF
+ _DBM_DBM_SETDEFAULT_METHODDEF
{"__enter__", dbm__enter__, METH_NOARGS, NULL},
{"__exit__", dbm__exit__, METH_VARARGS, NULL},
{NULL, NULL} /* sentinel */
@@ -431,7 +411,7 @@ static PyTypeObject Dbmtype = {
/*[clinic input]
-dbm.open as dbmopen
+_dbm.open as dbmopen
filename: str
The filename to open.
@@ -449,47 +429,10 @@ Return a database object.
[clinic start generated code]*/
-PyDoc_STRVAR(dbmopen__doc__,
-"open($module, filename, flags=\'r\', mode=0o666, /)\n"
-"--\n"
-"\n"
-"Return a database object.\n"
-"\n"
-" filename\n"
-" The filename to open.\n"
-" flags\n"
-" How to open the file. \"r\" for reading, \"w\" for writing, etc.\n"
-" mode\n"
-" If creating a new file, the mode bits for the new file\n"
-" (e.g. os.O_RDWR).");
-
-#define DBMOPEN_METHODDEF \
- {"open", (PyCFunction)dbmopen, METH_VARARGS, dbmopen__doc__},
-
-static PyObject *
-dbmopen_impl(PyModuleDef *module, const char *filename, const char *flags, int mode);
-
-static PyObject *
-dbmopen(PyModuleDef *module, PyObject *args)
-{
- PyObject *return_value = NULL;
- const char *filename;
- const char *flags = "r";
- int mode = 438;
-
- if (!PyArg_ParseTuple(args,
- "s|si:open",
- &filename, &flags, &mode))
- goto exit;
- return_value = dbmopen_impl(module, filename, flags, mode);
-
-exit:
- return return_value;
-}
-
static PyObject *
-dbmopen_impl(PyModuleDef *module, const char *filename, const char *flags, int mode)
-/*[clinic end generated code: output=9a7b725f9c4dcec2 input=6499ab0fab1333ac]*/
+dbmopen_impl(PyModuleDef *module, const char *filename, const char *flags,
+ int mode)
+/*[clinic end generated code: output=e8d4b36f25c733fd input=226334bade5764e6]*/
{
int iflags;
diff --git a/Modules/_decimal/_decimal.c b/Modules/_decimal/_decimal.c
index f00088736e..112b44fda7 100644
--- a/Modules/_decimal/_decimal.c
+++ b/Modules/_decimal/_decimal.c
@@ -4529,7 +4529,7 @@ dec_sizeof(PyObject *v, PyObject *dummy UNUSED)
{
Py_ssize_t res;
- res = sizeof(PyDecObject);
+ res = _PyObject_SIZE(Py_TYPE(v));
if (mpd_isdynamic_data(MPD(v))) {
res += MPD(v)->alloc * sizeof(mpd_uint_t);
}
@@ -5640,7 +5640,7 @@ PyInit__decimal(void)
goto error; /* GCOV_NOT_REACHED */
}
- ASSIGN_PTR(cm->ex, PyErr_NewException((char *)cm->fqname, base, NULL));
+ ASSIGN_PTR(cm->ex, PyErr_NewException(cm->fqname, base, NULL));
Py_DECREF(base);
/* add to module */
@@ -5672,7 +5672,7 @@ PyInit__decimal(void)
goto error; /* GCOV_NOT_REACHED */
}
- ASSIGN_PTR(cm->ex, PyErr_NewException((char *)cm->fqname, base, NULL));
+ ASSIGN_PTR(cm->ex, PyErr_NewException(cm->fqname, base, NULL));
Py_DECREF(base);
Py_INCREF(cm->ex);
diff --git a/Modules/_decimal/docstrings.h b/Modules/_decimal/docstrings.h
index a6490b982a..71029a994b 100644
--- a/Modules/_decimal/docstrings.h
+++ b/Modules/_decimal/docstrings.h
@@ -19,26 +19,30 @@
PyDoc_STRVAR(doc__decimal,
"C decimal arithmetic module");
-PyDoc_STRVAR(doc_getcontext,"\n\
-getcontext() - Get the current default context.\n\
+PyDoc_STRVAR(doc_getcontext,
+"getcontext($module, /)\n--\n\n\
+Get the current default context.\n\
\n");
-PyDoc_STRVAR(doc_setcontext,"\n\
-setcontext(c) - Set a new default context.\n\
+PyDoc_STRVAR(doc_setcontext,
+"setcontext($module, context, /)\n--\n\n\
+Set a new default context.\n\
\n");
-PyDoc_STRVAR(doc_localcontext,"\n\
-localcontext(ctx=None) - Return a context manager that will set the default\n\
-context to a copy of ctx on entry to the with-statement and restore the\n\
-previous default context when exiting the with-statement. If no context is\n\
-specified, a copy of the current default context is used.\n\
+PyDoc_STRVAR(doc_localcontext,
+"localcontext($module, /, ctx=None)\n--\n\n\
+Return a context manager that will set the default context to a copy of ctx\n\
+on entry to the with-statement and restore the previous default context when\n\
+exiting the with-statement. If no context is specified, a copy of the current\n\
+default context is used.\n\
\n");
#ifdef EXTRA_FUNCTIONALITY
-PyDoc_STRVAR(doc_ieee_context,"\n\
-IEEEContext(bits) - Return a context object initialized to the proper values for\n\
-one of the IEEE interchange formats. The argument must be a multiple of 32 and\n\
-less than IEEE_CONTEXT_MAX_BITS. For the most common values, the constants\n\
+PyDoc_STRVAR(doc_ieee_context,
+"IEEEContext($module, bits, /)\n--\n\n\
+Return a context object initialized to the proper values for one of the\n\
+IEEE interchange formats. The argument must be a multiple of 32 and less\n\
+than IEEE_CONTEXT_MAX_BITS. For the most common values, the constants\n\
DECIMAL32, DECIMAL64 and DECIMAL128 are provided.\n\
\n");
#endif
@@ -48,32 +52,34 @@ DECIMAL32, DECIMAL64 and DECIMAL128 are provided.\n\
/* Decimal Object and Methods */
/******************************************************************************/
-PyDoc_STRVAR(doc_decimal,"\n\
-Decimal(value=\"0\", context=None): Construct a new Decimal object.\n\
-value can be an integer, string, tuple, or another Decimal object.\n\
-If no value is given, return Decimal('0'). The context does not affect\n\
-the conversion and is only passed to determine if the InvalidOperation\n\
-trap is active.\n\
+PyDoc_STRVAR(doc_decimal,
+"Decimal(value=\"0\", context=None)\n--\n\n\
+Construct a new Decimal object. 'value' can be an integer, string, tuple,\n\
+or another Decimal object. If no value is given, return Decimal('0'). The\n\
+context does not affect the conversion and is only passed to determine if\n\
+the InvalidOperation trap is active.\n\
\n");
-PyDoc_STRVAR(doc_adjusted,"\n\
-adjusted() - Return the adjusted exponent of the number.\n\
-\n\
-Defined as exp + digits - 1.\n\
+PyDoc_STRVAR(doc_adjusted,
+"adjusted($self, /)\n--\n\n\
+Return the adjusted exponent of the number. Defined as exp + digits - 1.\n\
\n");
-PyDoc_STRVAR(doc_as_tuple,"\n\
-as_tuple() - Return a tuple representation of the number.\n\
+PyDoc_STRVAR(doc_as_tuple,
+"as_tuple($self, /)\n--\n\n\
+Return a tuple representation of the number.\n\
\n");
-PyDoc_STRVAR(doc_canonical,"\n\
-canonical() - Return the canonical encoding of the argument. Currently,\n\
-the encoding of a Decimal instance is always canonical, so this operation\n\
-returns its argument unchanged.\n\
+PyDoc_STRVAR(doc_canonical,
+"canonical($self, /)\n--\n\n\
+Return the canonical encoding of the argument. Currently, the encoding\n\
+of a Decimal instance is always canonical, so this operation returns its\n\
+argument unchanged.\n\
\n");
-PyDoc_STRVAR(doc_compare,"\n\
-compare(other, context=None) - Compare self to other. Return a decimal value:\n\
+PyDoc_STRVAR(doc_compare,
+"compare($self, /, other, context=None)\n--\n\n\
+Compare self to other. Return a decimal value:\n\
\n\
a or b is a NaN ==> Decimal('NaN')\n\
a < b ==> Decimal('-1')\n\
@@ -81,17 +87,18 @@ compare(other, context=None) - Compare self to other. Return a decimal value:\n\
a > b ==> Decimal('1')\n\
\n");
-PyDoc_STRVAR(doc_compare_signal,"\n\
-compare_signal(other, context=None) - Identical to compare, except that\n\
-all NaNs signal.\n\
+PyDoc_STRVAR(doc_compare_signal,
+"compare_signal($self, /, other, context=None)\n--\n\n\
+Identical to compare, except that all NaNs signal.\n\
\n");
-PyDoc_STRVAR(doc_compare_total,"\n\
-compare_total(other, context=None) - Compare two operands using their\n\
-abstract representation rather than their numerical value. Similar to the\n\
-compare() method, but the result gives a total ordering on Decimal instances.\n\
-Two Decimal instances with the same numeric value but different representations\n\
-compare unequal in this ordering:\n\
+PyDoc_STRVAR(doc_compare_total,
+"compare_total($self, /, other, context=None)\n--\n\n\
+Compare two operands using their abstract representation rather than\n\
+their numerical value. Similar to the compare() method, but the result\n\
+gives a total ordering on Decimal instances. Two Decimal instances with\n\
+the same numeric value but different representations compare unequal\n\
+in this ordering:\n\
\n\
>>> Decimal('12.0').compare_total(Decimal('12'))\n\
Decimal('-1')\n\
@@ -107,36 +114,39 @@ and no rounding is performed. As an exception, the C version may raise\n\
InvalidOperation if the second operand cannot be converted exactly.\n\
\n");
-PyDoc_STRVAR(doc_compare_total_mag,"\n\
-compare_total_mag(other, context=None) - Compare two operands using their\n\
-abstract representation rather than their value as in compare_total(), but\n\
-ignoring the sign of each operand. x.compare_total_mag(y) is equivalent to\n\
-x.copy_abs().compare_total(y.copy_abs()).\n\
+PyDoc_STRVAR(doc_compare_total_mag,
+"compare_total_mag($self, /, other, context=None)\n--\n\n\
+Compare two operands using their abstract representation rather than their\n\
+value as in compare_total(), but ignoring the sign of each operand.\n\
+\n\
+x.compare_total_mag(y) is equivalent to x.copy_abs().compare_total(y.copy_abs()).\n\
\n\
This operation is unaffected by context and is quiet: no flags are changed\n\
and no rounding is performed. As an exception, the C version may raise\n\
InvalidOperation if the second operand cannot be converted exactly.\n\
\n");
-PyDoc_STRVAR(doc_conjugate,"\n\
-conjugate() - Return self.\n\
+PyDoc_STRVAR(doc_conjugate,
+"conjugate($self, /)\n--\n\n\
+Return self.\n\
\n");
-PyDoc_STRVAR(doc_copy_abs,"\n\
-copy_abs() - Return the absolute value of the argument. This operation\n\
-is unaffected by context and is quiet: no flags are changed and no rounding\n\
-is performed.\n\
+PyDoc_STRVAR(doc_copy_abs,
+"copy_abs($self, /)\n--\n\n\
+Return the absolute value of the argument. This operation is unaffected by\n\
+context and is quiet: no flags are changed and no rounding is performed.\n\
\n");
-PyDoc_STRVAR(doc_copy_negate,"\n\
-copy_negate() - Return the negation of the argument. This operation is\n\
-unaffected by context and is quiet: no flags are changed and no rounding\n\
-is performed.\n\
+PyDoc_STRVAR(doc_copy_negate,
+"copy_negate($self, /)\n--\n\n\
+Return the negation of the argument. This operation is unaffected by context\n\
+and is quiet: no flags are changed and no rounding is performed.\n\
\n");
-PyDoc_STRVAR(doc_copy_sign,"\n\
-copy_sign(other, context=None) - Return a copy of the first operand with\n\
-the sign set to be the same as the sign of the second operand. For example:\n\
+PyDoc_STRVAR(doc_copy_sign,
+"copy_sign($self, /, other, context=None)\n--\n\n\
+Return a copy of the first operand with the sign set to be the same as the\n\
+sign of the second operand. For example:\n\
\n\
>>> Decimal('2.3').copy_sign(Decimal('-1.5'))\n\
Decimal('-2.3')\n\
@@ -146,14 +156,16 @@ and no rounding is performed. As an exception, the C version may raise\n\
InvalidOperation if the second operand cannot be converted exactly.\n\
\n");
-PyDoc_STRVAR(doc_exp,"\n\
-exp(context=None) - Return the value of the (natural) exponential function\n\
-e**x at the given number. The function always uses the ROUND_HALF_EVEN mode\n\
-and the result is correctly rounded.\n\
+PyDoc_STRVAR(doc_exp,
+"exp($self, /, context=None)\n--\n\n\
+Return the value of the (natural) exponential function e**x at the given\n\
+number. The function always uses the ROUND_HALF_EVEN mode and the result\n\
+is correctly rounded.\n\
\n");
-PyDoc_STRVAR(doc_from_float,"\n\
-from_float(f) - Class method that converts a float to a decimal number, exactly.\n\
+PyDoc_STRVAR(doc_from_float,
+"from_float($type, f, /)\n--\n\n\
+Class method that converts a float to a decimal number, exactly.\n\
Since 0.1 is not exactly representable in binary floating point,\n\
Decimal.from_float(0.1) is not the same as Decimal('0.1').\n\
\n\
@@ -168,155 +180,176 @@ Decimal.from_float(0.1) is not the same as Decimal('0.1').\n\
\n\
\n");
-PyDoc_STRVAR(doc_fma,"\n\
-fma(other, third, context=None) - Fused multiply-add. Return self*other+third\n\
-with no rounding of the intermediate product self*other.\n\
+PyDoc_STRVAR(doc_fma,
+"fma($self, /, other, third, context=None)\n--\n\n\
+Fused multiply-add. Return self*other+third with no rounding of the\n\
+intermediate product self*other.\n\
\n\
>>> Decimal(2).fma(3, 5)\n\
Decimal('11')\n\
\n\
\n");
-PyDoc_STRVAR(doc_is_canonical,"\n\
-is_canonical() - Return True if the argument is canonical and False otherwise.\n\
-Currently, a Decimal instance is always canonical, so this operation always\n\
-returns True.\n\
+PyDoc_STRVAR(doc_is_canonical,
+"is_canonical($self, /)\n--\n\n\
+Return True if the argument is canonical and False otherwise. Currently,\n\
+a Decimal instance is always canonical, so this operation always returns\n\
+True.\n\
\n");
-PyDoc_STRVAR(doc_is_finite,"\n\
-is_finite() - Return True if the argument is a finite number, and False if the\n\
-argument is infinite or a NaN.\n\
+PyDoc_STRVAR(doc_is_finite,
+"is_finite($self, /)\n--\n\n\
+Return True if the argument is a finite number, and False if the argument\n\
+is infinite or a NaN.\n\
\n");
-PyDoc_STRVAR(doc_is_infinite,"\n\
-is_infinite() - Return True if the argument is either positive or negative\n\
-infinity and False otherwise.\n\
+PyDoc_STRVAR(doc_is_infinite,
+"is_infinite($self, /)\n--\n\n\
+Return True if the argument is either positive or negative infinity and\n\
+False otherwise.\n\
\n");
-PyDoc_STRVAR(doc_is_nan,"\n\
-is_nan() - Return True if the argument is a (quiet or signaling) NaN and\n\
-False otherwise.\n\
+PyDoc_STRVAR(doc_is_nan,
+"is_nan($self, /)\n--\n\n\
+Return True if the argument is a (quiet or signaling) NaN and False\n\
+otherwise.\n\
\n");
-PyDoc_STRVAR(doc_is_normal,"\n\
-is_normal(context=None) - Return True if the argument is a normal finite\n\
-non-zero number with an adjusted exponent greater than or equal to Emin.\n\
-Return False if the argument is zero, subnormal, infinite or a NaN.\n\
+PyDoc_STRVAR(doc_is_normal,
+"is_normal($self, /, context=None)\n--\n\n\
+Return True if the argument is a normal finite non-zero number with an\n\
+adjusted exponent greater than or equal to Emin. Return False if the\n\
+argument is zero, subnormal, infinite or a NaN.\n\
\n");
-PyDoc_STRVAR(doc_is_qnan,"\n\
-is_qnan() - Return True if the argument is a quiet NaN, and False otherwise.\n\
+PyDoc_STRVAR(doc_is_qnan,
+"is_qnan($self, /)\n--\n\n\
+Return True if the argument is a quiet NaN, and False otherwise.\n\
\n");
-PyDoc_STRVAR(doc_is_signed,"\n\
-is_signed() - Return True if the argument has a negative sign and\n\
-False otherwise. Note that both zeros and NaNs can carry signs.\n\
+PyDoc_STRVAR(doc_is_signed,
+"is_signed($self, /)\n--\n\n\
+Return True if the argument has a negative sign and False otherwise.\n\
+Note that both zeros and NaNs can carry signs.\n\
\n");
-PyDoc_STRVAR(doc_is_snan,"\n\
-is_snan() - Return True if the argument is a signaling NaN and False otherwise.\n\
+PyDoc_STRVAR(doc_is_snan,
+"is_snan($self, /)\n--\n\n\
+Return True if the argument is a signaling NaN and False otherwise.\n\
\n");
-PyDoc_STRVAR(doc_is_subnormal,"\n\
-is_subnormal(context=None) - Return True if the argument is subnormal, and\n\
-False otherwise. A number is subnormal if it is non-zero, finite, and has an\n\
-adjusted exponent less than Emin.\n\
+PyDoc_STRVAR(doc_is_subnormal,
+"is_subnormal($self, /, context=None)\n--\n\n\
+Return True if the argument is subnormal, and False otherwise. A number is\n\
+subnormal if it is non-zero, finite, and has an adjusted exponent less\n\
+than Emin.\n\
\n");
-PyDoc_STRVAR(doc_is_zero,"\n\
-is_zero() - Return True if the argument is a (positive or negative) zero and\n\
-False otherwise.\n\
+PyDoc_STRVAR(doc_is_zero,
+"is_zero($self, /)\n--\n\n\
+Return True if the argument is a (positive or negative) zero and False\n\
+otherwise.\n\
\n");
-PyDoc_STRVAR(doc_ln,"\n\
-ln(context=None) - Return the natural (base e) logarithm of the operand.\n\
-The function always uses the ROUND_HALF_EVEN mode and the result is\n\
-correctly rounded.\n\
+PyDoc_STRVAR(doc_ln,
+"ln($self, /, context=None)\n--\n\n\
+Return the natural (base e) logarithm of the operand. The function always\n\
+uses the ROUND_HALF_EVEN mode and the result is correctly rounded.\n\
\n");
-PyDoc_STRVAR(doc_log10,"\n\
-log10(context=None) - Return the base ten logarithm of the operand.\n\
-The function always uses the ROUND_HALF_EVEN mode and the result is\n\
-correctly rounded.\n\
+PyDoc_STRVAR(doc_log10,
+"log10($self, /, context=None)\n--\n\n\
+Return the base ten logarithm of the operand. The function always uses the\n\
+ROUND_HALF_EVEN mode and the result is correctly rounded.\n\
\n");
-PyDoc_STRVAR(doc_logb,"\n\
-logb(context=None) - For a non-zero number, return the adjusted exponent\n\
-of the operand as a Decimal instance. If the operand is a zero, then\n\
-Decimal('-Infinity') is returned and the DivisionByZero condition is\n\
-raised. If the operand is an infinity then Decimal('Infinity') is returned.\n\
+PyDoc_STRVAR(doc_logb,
+"logb($self, /, context=None)\n--\n\n\
+For a non-zero number, return the adjusted exponent of the operand as a\n\
+Decimal instance. If the operand is a zero, then Decimal('-Infinity') is\n\
+returned and the DivisionByZero condition is raised. If the operand is\n\
+an infinity then Decimal('Infinity') is returned.\n\
\n");
-PyDoc_STRVAR(doc_logical_and,"\n\
-logical_and(other, context=None) - Return the digit-wise and of the two\n\
-(logical) operands.\n\
+PyDoc_STRVAR(doc_logical_and,
+"logical_and($self, /, other, context=None)\n--\n\n\
+Return the digit-wise 'and' of the two (logical) operands.\n\
\n");
-PyDoc_STRVAR(doc_logical_invert,"\n\
-logical_invert(context=None) - Return the digit-wise inversion of the\n\
-(logical) operand.\n\
+PyDoc_STRVAR(doc_logical_invert,
+"logical_invert($self, /, context=None)\n--\n\n\
+Return the digit-wise inversion of the (logical) operand.\n\
\n");
-PyDoc_STRVAR(doc_logical_or,"\n\
-logical_or(other, context=None) - Return the digit-wise or of the two\n\
-(logical) operands.\n\
+PyDoc_STRVAR(doc_logical_or,
+"logical_or($self, /, other, context=None)\n--\n\n\
+Return the digit-wise 'or' of the two (logical) operands.\n\
\n");
-PyDoc_STRVAR(doc_logical_xor,"\n\
-logical_xor(other, context=None) - Return the digit-wise exclusive or of the\n\
-two (logical) operands.\n\
+PyDoc_STRVAR(doc_logical_xor,
+"logical_xor($self, /, other, context=None)\n--\n\n\
+Return the digit-wise 'exclusive or' of the two (logical) operands.\n\
\n");
-PyDoc_STRVAR(doc_max,"\n\
-max(other, context=None) - Maximum of self and other. If one operand is a\n\
-quiet NaN and the other is numeric, the numeric operand is returned.\n\
+PyDoc_STRVAR(doc_max,
+"max($self, /, other, context=None)\n--\n\n\
+Maximum of self and other. If one operand is a quiet NaN and the other is\n\
+numeric, the numeric operand is returned.\n\
\n");
-PyDoc_STRVAR(doc_max_mag,"\n\
-max_mag(other, context=None) - Similar to the max() method, but the\n\
-comparison is done using the absolute values of the operands.\n\
+PyDoc_STRVAR(doc_max_mag,
+"max_mag($self, /, other, context=None)\n--\n\n\
+Similar to the max() method, but the comparison is done using the absolute\n\
+values of the operands.\n\
\n");
-PyDoc_STRVAR(doc_min,"\n\
-min(other, context=None) - Minimum of self and other. If one operand is a\n\
-quiet NaN and the other is numeric, the numeric operand is returned.\n\
+PyDoc_STRVAR(doc_min,
+"min($self, /, other, context=None)\n--\n\n\
+Minimum of self and other. If one operand is a quiet NaN and the other is\n\
+numeric, the numeric operand is returned.\n\
\n");
-PyDoc_STRVAR(doc_min_mag,"\n\
-min_mag(other, context=None) - Similar to the min() method, but the\n\
-comparison is done using the absolute values of the operands.\n\
+PyDoc_STRVAR(doc_min_mag,
+"min_mag($self, /, other, context=None)\n--\n\n\
+Similar to the min() method, but the comparison is done using the absolute\n\
+values of the operands.\n\
\n");
-PyDoc_STRVAR(doc_next_minus,"\n\
-next_minus(context=None) - Return the largest number representable in the\n\
-given context (or in the current default context if no context is given) that\n\
-is smaller than the given operand.\n\
+PyDoc_STRVAR(doc_next_minus,
+"next_minus($self, /, context=None)\n--\n\n\
+Return the largest number representable in the given context (or in the\n\
+current default context if no context is given) that is smaller than the\n\
+given operand.\n\
\n");
-PyDoc_STRVAR(doc_next_plus,"\n\
-next_plus(context=None) - Return the smallest number representable in the\n\
-given context (or in the current default context if no context is given) that\n\
-is larger than the given operand.\n\
+PyDoc_STRVAR(doc_next_plus,
+"next_plus($self, /, context=None)\n--\n\n\
+Return the smallest number representable in the given context (or in the\n\
+current default context if no context is given) that is larger than the\n\
+given operand.\n\
\n");
-PyDoc_STRVAR(doc_next_toward,"\n\
-next_toward(other, context=None) - If the two operands are unequal, return\n\
-the number closest to the first operand in the direction of the second operand.\n\
-If both operands are numerically equal, return a copy of the first operand\n\
-with the sign set to be the same as the sign of the second operand.\n\
+PyDoc_STRVAR(doc_next_toward,
+"next_toward($self, /, other, context=None)\n--\n\n\
+If the two operands are unequal, return the number closest to the first\n\
+operand in the direction of the second operand. If both operands are\n\
+numerically equal, return a copy of the first operand with the sign set\n\
+to be the same as the sign of the second operand.\n\
\n");
-PyDoc_STRVAR(doc_normalize,"\n\
-normalize(context=None) - Normalize the number by stripping the rightmost\n\
-trailing zeros and converting any result equal to Decimal('0') to Decimal('0e0').\n\
-Used for producing canonical values for members of an equivalence class. For\n\
-example, Decimal('32.100') and Decimal('0.321000e+2') both normalize to the\n\
-equivalent value Decimal('32.1').\n\
+PyDoc_STRVAR(doc_normalize,
+"normalize($self, /, context=None)\n--\n\n\
+Normalize the number by stripping the rightmost trailing zeros and\n\
+converting any result equal to Decimal('0') to Decimal('0e0'). Used\n\
+for producing canonical values for members of an equivalence class.\n\
+For example, Decimal('32.100') and Decimal('0.321000e+2') both normalize\n\
+to the equivalent value Decimal('32.1').\n\
\n");
-PyDoc_STRVAR(doc_number_class,"\n\
-number_class(context=None) - Return a string describing the class of the\n\
-operand. The returned value is one of the following ten strings:\n\
+PyDoc_STRVAR(doc_number_class,
+"number_class($self, /, context=None)\n--\n\n\
+Return a string describing the class of the operand. The returned value\n\
+is one of the following ten strings:\n\
\n\
* '-Infinity', indicating that the operand is negative infinity.\n\
* '-Normal', indicating that the operand is a negative normal number.\n\
@@ -331,9 +364,10 @@ operand. The returned value is one of the following ten strings:\n\
\n\
\n");
-PyDoc_STRVAR(doc_quantize,"\n\
-quantize(exp, rounding=None, context=None) - Return a value equal to the\n\
-first operand after rounding and having the exponent of the second operand.\n\
+PyDoc_STRVAR(doc_quantize,
+"quantize($self, /, exp, rounding=None, context=None)\n--\n\n\
+Return a value equal to the first operand after rounding and having the\n\
+exponent of the second operand.\n\
\n\
>>> Decimal('1.41421356').quantize(Decimal('1.000'))\n\
Decimal('1.414')\n\
@@ -352,93 +386,98 @@ rounding argument if given, else by the given context argument; if neither\n\
argument is given, the rounding mode of the current thread's context is used.\n\
\n");
-PyDoc_STRVAR(doc_radix,"\n\
-radix() - Return Decimal(10), the radix (base) in which the Decimal class does\n\
+PyDoc_STRVAR(doc_radix,
+"radix($self, /)\n--\n\n\
+Return Decimal(10), the radix (base) in which the Decimal class does\n\
all its arithmetic. Included for compatibility with the specification.\n\
\n");
-PyDoc_STRVAR(doc_remainder_near,"\n\
-remainder_near(other, context=None) - Return the remainder from dividing\n\
-self by other. This differs from self % other in that the sign of the\n\
-remainder is chosen so as to minimize its absolute value. More precisely, the\n\
-return value is self - n * other where n is the integer nearest to the exact\n\
-value of self / other, and if two integers are equally near then the even one\n\
-is chosen.\n\
+PyDoc_STRVAR(doc_remainder_near,
+"remainder_near($self, /, other, context=None)\n--\n\n\
+Return the remainder from dividing self by other. This differs from\n\
+self % other in that the sign of the remainder is chosen so as to minimize\n\
+its absolute value. More precisely, the return value is self - n * other\n\
+where n is the integer nearest to the exact value of self / other, and\n\
+if two integers are equally near then the even one is chosen.\n\
\n\
If the result is zero then its sign will be the sign of self.\n\
\n");
-PyDoc_STRVAR(doc_rotate,"\n\
-rotate(other, context=None) - Return the result of rotating the digits of the\n\
-first operand by an amount specified by the second operand. The second operand\n\
-must be an integer in the range -precision through precision. The absolute\n\
-value of the second operand gives the number of places to rotate. If the second\n\
-operand is positive then rotation is to the left; otherwise rotation is to the\n\
-right. The coefficient of the first operand is padded on the left with zeros to\n\
+PyDoc_STRVAR(doc_rotate,
+"rotate($self, /, other, context=None)\n--\n\n\
+Return the result of rotating the digits of the first operand by an amount\n\
+specified by the second operand. The second operand must be an integer in\n\
+the range -precision through precision. The absolute value of the second\n\
+operand gives the number of places to rotate. If the second operand is\n\
+positive then rotation is to the left; otherwise rotation is to the right.\n\
+The coefficient of the first operand is padded on the left with zeros to\n\
length precision if necessary. The sign and exponent of the first operand are\n\
unchanged.\n\
\n");
-PyDoc_STRVAR(doc_same_quantum,"\n\
-same_quantum(other, context=None) - Test whether self and other have the\n\
-same exponent or whether both are NaN.\n\
+PyDoc_STRVAR(doc_same_quantum,
+"same_quantum($self, /, other, context=None)\n--\n\n\
+Test whether self and other have the same exponent or whether both are NaN.\n\
\n\
This operation is unaffected by context and is quiet: no flags are changed\n\
and no rounding is performed. As an exception, the C version may raise\n\
InvalidOperation if the second operand cannot be converted exactly.\n\
\n");
-PyDoc_STRVAR(doc_scaleb,"\n\
-scaleb(other, context=None) - Return the first operand with the exponent\n\
-adjusted the second. Equivalently, return the first operand multiplied by\n\
-10**other. The second operand must be an integer.\n\
+PyDoc_STRVAR(doc_scaleb,
+"scaleb($self, /, other, context=None)\n--\n\n\
+Return the first operand with the exponent adjusted the second. Equivalently,\n\
+return the first operand multiplied by 10**other. The second operand must be\n\
+an integer.\n\
\n");
-PyDoc_STRVAR(doc_shift,"\n\
-shift(other, context=None) - Return the result of shifting the digits of\n\
-the first operand by an amount specified by the second operand. The second\n\
-operand must be an integer in the range -precision through precision. The\n\
-absolute value of the second operand gives the number of places to shift.\n\
-If the second operand is positive, then the shift is to the left; otherwise\n\
-the shift is to the right. Digits shifted into the coefficient are zeros.\n\
-The sign and exponent of the first operand are unchanged.\n\
+PyDoc_STRVAR(doc_shift,
+"shift($self, /, other, context=None)\n--\n\n\
+Return the result of shifting the digits of the first operand by an amount\n\
+specified by the second operand. The second operand must be an integer in\n\
+the range -precision through precision. The absolute value of the second\n\
+operand gives the number of places to shift. If the second operand is\n\
+positive, then the shift is to the left; otherwise the shift is to the\n\
+right. Digits shifted into the coefficient are zeros. The sign and exponent\n\
+of the first operand are unchanged.\n\
\n");
-PyDoc_STRVAR(doc_sqrt,"\n\
-sqrt(context=None) - Return the square root of the argument to full precision.\n\
-The result is correctly rounded using the ROUND_HALF_EVEN rounding mode.\n\
+PyDoc_STRVAR(doc_sqrt,
+"sqrt($self, /, context=None)\n--\n\n\
+Return the square root of the argument to full precision. The result is\n\
+correctly rounded using the ROUND_HALF_EVEN rounding mode.\n\
\n");
-PyDoc_STRVAR(doc_to_eng_string,"\n\
-to_eng_string(context=None) - Convert to an engineering-type string.\n\
-Engineering notation has an exponent which is a multiple of 3, so there\n\
-are up to 3 digits left of the decimal place. For example, Decimal('123E+1')\n\
-is converted to Decimal('1.23E+3').\n\
+PyDoc_STRVAR(doc_to_eng_string,
+"to_eng_string($self, /, context=None)\n--\n\n\
+Convert to an engineering-type string. Engineering notation has an exponent\n\
+which is a multiple of 3, so there are up to 3 digits left of the decimal\n\
+place. For example, Decimal('123E+1') is converted to Decimal('1.23E+3').\n\
\n\
The value of context.capitals determines whether the exponent sign is lower\n\
or upper case. Otherwise, the context does not affect the operation.\n\
\n");
-PyDoc_STRVAR(doc_to_integral,"\n\
-to_integral(rounding=None, context=None) - Identical to the\n\
-to_integral_value() method. The to_integral() name has been kept\n\
-for compatibility with older versions.\n\
+PyDoc_STRVAR(doc_to_integral,
+"to_integral($self, /, rounding=None, context=None)\n--\n\n\
+Identical to the to_integral_value() method. The to_integral() name has been\n\
+kept for compatibility with older versions.\n\
\n");
-PyDoc_STRVAR(doc_to_integral_exact,"\n\
-to_integral_exact(rounding=None, context=None) - Round to the nearest\n\
-integer, signaling Inexact or Rounded as appropriate if rounding occurs.\n\
-The rounding mode is determined by the rounding parameter if given, else\n\
-by the given context. If neither parameter is given, then the rounding mode\n\
-of the current default context is used.\n\
+PyDoc_STRVAR(doc_to_integral_exact,
+"to_integral_exact($self, /, rounding=None, context=None)\n--\n\n\
+Round to the nearest integer, signaling Inexact or Rounded as appropriate if\n\
+rounding occurs. The rounding mode is determined by the rounding parameter\n\
+if given, else by the given context. If neither parameter is given, then the\n\
+rounding mode of the current default context is used.\n\
\n");
-PyDoc_STRVAR(doc_to_integral_value,"\n\
-to_integral_value(rounding=None, context=None) - Round to the nearest\n\
-integer without signaling Inexact or Rounded. The rounding mode is determined\n\
-by the rounding parameter if given, else by the given context. If neither\n\
-parameter is given, then the rounding mode of the current default context is\n\
-used.\n\
+PyDoc_STRVAR(doc_to_integral_value,
+"to_integral_value($self, /, rounding=None, context=None)\n--\n\n\
+Round to the nearest integer without signaling Inexact or Rounded. The\n\
+rounding mode is determined by the rounding parameter if given, else by\n\
+the given context. If neither parameter is given, then the rounding mode\n\
+of the current default context is used.\n\
\n");
@@ -446,9 +485,10 @@ used.\n\
/* Context Object and Methods */
/******************************************************************************/
-PyDoc_STRVAR(doc_context,"\n\
+PyDoc_STRVAR(doc_context,
+"Context(prec=None, rounding=None, Emin=None, Emax=None, capitals=None, clamp=None, flags=None, traps=None)\n--\n\n\
The context affects almost all operations and controls rounding,\n\
-Over/Underflow, raising of exceptions and much more. A new context\n\
+Over/Underflow, raising of exceptions and much more. A new context\n\
can be constructed as follows:\n\
\n\
>>> c = Context(prec=28, Emin=-425000000, Emax=425000000,\n\
@@ -460,308 +500,372 @@ can be constructed as follows:\n\
\n");
#ifdef EXTRA_FUNCTIONALITY
-PyDoc_STRVAR(doc_ctx_apply,"\n\
-apply(x) - Apply self to Decimal x.\n\
+PyDoc_STRVAR(doc_ctx_apply,
+"apply($self, x, /)\n--\n\n\
+Apply self to Decimal x.\n\
\n");
#endif
-PyDoc_STRVAR(doc_ctx_clear_flags,"\n\
-clear_flags() - Reset all flags to False.\n\
+PyDoc_STRVAR(doc_ctx_clear_flags,
+"clear_flags($self, /)\n--\n\n\
+Reset all flags to False.\n\
\n");
-PyDoc_STRVAR(doc_ctx_clear_traps,"\n\
-clear_traps() - Set all traps to False.\n\
+PyDoc_STRVAR(doc_ctx_clear_traps,
+"clear_traps($self, /)\n--\n\n\
+Set all traps to False.\n\
\n");
-PyDoc_STRVAR(doc_ctx_copy,"\n\
-copy() - Return a duplicate of the context with all flags cleared.\n\
+PyDoc_STRVAR(doc_ctx_copy,
+"copy($self, /)\n--\n\n\
+Return a duplicate of the context with all flags cleared.\n\
\n");
-PyDoc_STRVAR(doc_ctx_copy_decimal,"\n\
-copy_decimal(x) - Return a copy of Decimal x.\n\
+PyDoc_STRVAR(doc_ctx_copy_decimal,
+"copy_decimal($self, x, /)\n--\n\n\
+Return a copy of Decimal x.\n\
\n");
-PyDoc_STRVAR(doc_ctx_create_decimal,"\n\
-create_decimal(x) - Create a new Decimal instance from x, using self as the\n\
-context. Unlike the Decimal constructor, this function observes the context\n\
-limits.\n\
+PyDoc_STRVAR(doc_ctx_create_decimal,
+"create_decimal($self, num=\"0\", /)\n--\n\n\
+Create a new Decimal instance from num, using self as the context. Unlike the\n\
+Decimal constructor, this function observes the context limits.\n\
\n");
-PyDoc_STRVAR(doc_ctx_create_decimal_from_float,"\n\
-create_decimal_from_float(f) - Create a new Decimal instance from float f.\n\
-Unlike the Decimal.from_float() class method, this function observes the\n\
-context limits.\n\
+PyDoc_STRVAR(doc_ctx_create_decimal_from_float,
+"create_decimal_from_float($self, f, /)\n--\n\n\
+Create a new Decimal instance from float f. Unlike the Decimal.from_float()\n\
+class method, this function observes the context limits.\n\
\n");
-PyDoc_STRVAR(doc_ctx_Etiny,"\n\
-Etiny() - Return a value equal to Emin - prec + 1, which is the minimum\n\
-exponent value for subnormal results. When underflow occurs, the exponent\n\
-is set to Etiny.\n\
+PyDoc_STRVAR(doc_ctx_Etiny,
+"Etiny($self, /)\n--\n\n\
+Return a value equal to Emin - prec + 1, which is the minimum exponent value\n\
+for subnormal results. When underflow occurs, the exponent is set to Etiny.\n\
\n");
-PyDoc_STRVAR(doc_ctx_Etop,"\n\
-Etop() - Return a value equal to Emax - prec + 1. This is the maximum exponent\n\
-if the _clamp field of the context is set to 1 (IEEE clamp mode). Etop() must\n\
-not be negative.\n\
+PyDoc_STRVAR(doc_ctx_Etop,
+"Etop($self, /)\n--\n\n\
+Return a value equal to Emax - prec + 1. This is the maximum exponent\n\
+if the _clamp field of the context is set to 1 (IEEE clamp mode). Etop()\n\
+must not be negative.\n\
\n");
-PyDoc_STRVAR(doc_ctx_abs,"\n\
-abs(x) - Return the absolute value of x.\n\
+PyDoc_STRVAR(doc_ctx_abs,
+"abs($self, x, /)\n--\n\n\
+Return the absolute value of x.\n\
\n");
-PyDoc_STRVAR(doc_ctx_add,"\n\
-add(x, y) - Return the sum of x and y.\n\
+PyDoc_STRVAR(doc_ctx_add,
+"add($self, x, y, /)\n--\n\n\
+Return the sum of x and y.\n\
\n");
-PyDoc_STRVAR(doc_ctx_canonical,"\n\
-canonical(x) - Return a new instance of x.\n\
+PyDoc_STRVAR(doc_ctx_canonical,
+"canonical($self, x, /)\n--\n\n\
+Return a new instance of x.\n\
\n");
-PyDoc_STRVAR(doc_ctx_compare,"\n\
-compare(x, y) - Compare x and y numerically.\n\
+PyDoc_STRVAR(doc_ctx_compare,
+"compare($self, x, y, /)\n--\n\n\
+Compare x and y numerically.\n\
\n");
-PyDoc_STRVAR(doc_ctx_compare_signal,"\n\
-compare_signal(x, y) - Compare x and y numerically. All NaNs signal.\n\
+PyDoc_STRVAR(doc_ctx_compare_signal,
+"compare_signal($self, x, y, /)\n--\n\n\
+Compare x and y numerically. All NaNs signal.\n\
\n");
-PyDoc_STRVAR(doc_ctx_compare_total,"\n\
-compare_total(x, y) - Compare x and y using their abstract representation.\n\
+PyDoc_STRVAR(doc_ctx_compare_total,
+"compare_total($self, x, y, /)\n--\n\n\
+Compare x and y using their abstract representation.\n\
\n");
-PyDoc_STRVAR(doc_ctx_compare_total_mag,"\n\
-compare_total_mag(x, y) - Compare x and y using their abstract representation,\n\
-ignoring sign.\n\
+PyDoc_STRVAR(doc_ctx_compare_total_mag,
+"compare_total_mag($self, x, y, /)\n--\n\n\
+Compare x and y using their abstract representation, ignoring sign.\n\
\n");
-PyDoc_STRVAR(doc_ctx_copy_abs,"\n\
-copy_abs(x) - Return a copy of x with the sign set to 0.\n\
+PyDoc_STRVAR(doc_ctx_copy_abs,
+"copy_abs($self, x, /)\n--\n\n\
+Return a copy of x with the sign set to 0.\n\
\n");
-PyDoc_STRVAR(doc_ctx_copy_negate,"\n\
-copy_negate(x) - Return a copy of x with the sign inverted.\n\
+PyDoc_STRVAR(doc_ctx_copy_negate,
+"copy_negate($self, x, /)\n--\n\n\
+Return a copy of x with the sign inverted.\n\
\n");
-PyDoc_STRVAR(doc_ctx_copy_sign,"\n\
-copy_sign(x, y) - Copy the sign from y to x.\n\
+PyDoc_STRVAR(doc_ctx_copy_sign,
+"copy_sign($self, x, y, /)\n--\n\n\
+Copy the sign from y to x.\n\
\n");
-PyDoc_STRVAR(doc_ctx_divide,"\n\
-divide(x, y) - Return x divided by y.\n\
+PyDoc_STRVAR(doc_ctx_divide,
+"divide($self, x, y, /)\n--\n\n\
+Return x divided by y.\n\
\n");
-PyDoc_STRVAR(doc_ctx_divide_int,"\n\
-divide_int(x, y) - Return x divided by y, truncated to an integer.\n\
+PyDoc_STRVAR(doc_ctx_divide_int,
+"divide_int($self, x, y, /)\n--\n\n\
+Return x divided by y, truncated to an integer.\n\
\n");
-PyDoc_STRVAR(doc_ctx_divmod,"\n\
-divmod(x, y) - Return quotient and remainder of the division x / y.\n\
+PyDoc_STRVAR(doc_ctx_divmod,
+"divmod($self, x, y, /)\n--\n\n\
+Return quotient and remainder of the division x / y.\n\
\n");
-PyDoc_STRVAR(doc_ctx_exp,"\n\
-exp(x) - Return e ** x.\n\
+PyDoc_STRVAR(doc_ctx_exp,
+"exp($self, x, /)\n--\n\n\
+Return e ** x.\n\
\n");
-PyDoc_STRVAR(doc_ctx_fma,"\n\
-fma(x, y, z) - Return x multiplied by y, plus z.\n\
+PyDoc_STRVAR(doc_ctx_fma,
+"fma($self, x, y, z, /)\n--\n\n\
+Return x multiplied by y, plus z.\n\
\n");
-PyDoc_STRVAR(doc_ctx_is_canonical,"\n\
-is_canonical(x) - Return True if x is canonical, False otherwise.\n\
+PyDoc_STRVAR(doc_ctx_is_canonical,
+"is_canonical($self, x, /)\n--\n\n\
+Return True if x is canonical, False otherwise.\n\
\n");
-PyDoc_STRVAR(doc_ctx_is_finite,"\n\
-is_finite(x) - Return True if x is finite, False otherwise.\n\
+PyDoc_STRVAR(doc_ctx_is_finite,
+"is_finite($self, x, /)\n--\n\n\
+Return True if x is finite, False otherwise.\n\
\n");
-PyDoc_STRVAR(doc_ctx_is_infinite,"\n\
-is_infinite(x) - Return True if x is infinite, False otherwise.\n\
+PyDoc_STRVAR(doc_ctx_is_infinite,
+"is_infinite($self, x, /)\n--\n\n\
+Return True if x is infinite, False otherwise.\n\
\n");
-PyDoc_STRVAR(doc_ctx_is_nan,"\n\
-is_nan(x) - Return True if x is a qNaN or sNaN, False otherwise.\n\
+PyDoc_STRVAR(doc_ctx_is_nan,
+"is_nan($self, x, /)\n--\n\n\
+Return True if x is a qNaN or sNaN, False otherwise.\n\
\n");
-PyDoc_STRVAR(doc_ctx_is_normal,"\n\
-is_normal(x) - Return True if x is a normal number, False otherwise.\n\
+PyDoc_STRVAR(doc_ctx_is_normal,
+"is_normal($self, x, /)\n--\n\n\
+Return True if x is a normal number, False otherwise.\n\
\n");
-PyDoc_STRVAR(doc_ctx_is_qnan,"\n\
-is_qnan(x) - Return True if x is a quiet NaN, False otherwise.\n\
+PyDoc_STRVAR(doc_ctx_is_qnan,
+"is_qnan($self, x, /)\n--\n\n\
+Return True if x is a quiet NaN, False otherwise.\n\
\n");
-PyDoc_STRVAR(doc_ctx_is_signed,"\n\
-is_signed(x) - Return True if x is negative, False otherwise.\n\
+PyDoc_STRVAR(doc_ctx_is_signed,
+"is_signed($self, x, /)\n--\n\n\
+Return True if x is negative, False otherwise.\n\
\n");
-PyDoc_STRVAR(doc_ctx_is_snan,"\n\
-is_snan() - Return True if x is a signaling NaN, False otherwise.\n\
+PyDoc_STRVAR(doc_ctx_is_snan,
+"is_snan($self, x, /)\n--\n\n\
+Return True if x is a signaling NaN, False otherwise.\n\
\n");
-PyDoc_STRVAR(doc_ctx_is_subnormal,"\n\
-is_subnormal(x) - Return True if x is subnormal, False otherwise.\n\
+PyDoc_STRVAR(doc_ctx_is_subnormal,
+"is_subnormal($self, x, /)\n--\n\n\
+Return True if x is subnormal, False otherwise.\n\
\n");
-PyDoc_STRVAR(doc_ctx_is_zero,"\n\
-is_zero(x) - Return True if x is a zero, False otherwise.\n\
+PyDoc_STRVAR(doc_ctx_is_zero,
+"is_zero($self, x, /)\n--\n\n\
+Return True if x is a zero, False otherwise.\n\
\n");
-PyDoc_STRVAR(doc_ctx_ln,"\n\
-ln(x) - Return the natural (base e) logarithm of x.\n\
+PyDoc_STRVAR(doc_ctx_ln,
+"ln($self, x, /)\n--\n\n\
+Return the natural (base e) logarithm of x.\n\
\n");
-PyDoc_STRVAR(doc_ctx_log10,"\n\
-log10(x) - Return the base 10 logarithm of x.\n\
+PyDoc_STRVAR(doc_ctx_log10,
+"log10($self, x, /)\n--\n\n\
+Return the base 10 logarithm of x.\n\
\n");
-PyDoc_STRVAR(doc_ctx_logb,"\n\
-logb(x) - Return the exponent of the magnitude of the operand's MSD.\n\
+PyDoc_STRVAR(doc_ctx_logb,
+"logb($self, x, /)\n--\n\n\
+Return the exponent of the magnitude of the operand's MSD.\n\
\n");
-PyDoc_STRVAR(doc_ctx_logical_and,"\n\
-logical_and(x, y) - Digit-wise and of x and y.\n\
+PyDoc_STRVAR(doc_ctx_logical_and,
+"logical_and($self, x, y, /)\n--\n\n\
+Digit-wise and of x and y.\n\
\n");
-PyDoc_STRVAR(doc_ctx_logical_invert,"\n\
-logical_invert(x) - Invert all digits of x.\n\
+PyDoc_STRVAR(doc_ctx_logical_invert,
+"logical_invert($self, x, /)\n--\n\n\
+Invert all digits of x.\n\
\n");
-PyDoc_STRVAR(doc_ctx_logical_or,"\n\
-logical_or(x, y) - Digit-wise or of x and y.\n\
+PyDoc_STRVAR(doc_ctx_logical_or,
+"logical_or($self, x, y, /)\n--\n\n\
+Digit-wise or of x and y.\n\
\n");
-PyDoc_STRVAR(doc_ctx_logical_xor,"\n\
-logical_xor(x, y) - Digit-wise xor of x and y.\n\
+PyDoc_STRVAR(doc_ctx_logical_xor,
+"logical_xor($self, x, y, /)\n--\n\n\
+Digit-wise xor of x and y.\n\
\n");
-PyDoc_STRVAR(doc_ctx_max,"\n\
-max(x, y) - Compare the values numerically and return the maximum.\n\
+PyDoc_STRVAR(doc_ctx_max,
+"max($self, x, y, /)\n--\n\n\
+Compare the values numerically and return the maximum.\n\
\n");
-PyDoc_STRVAR(doc_ctx_max_mag,"\n\
-max_mag(x, y) - Compare the values numerically with their sign ignored.\n\
+PyDoc_STRVAR(doc_ctx_max_mag,
+"max_mag($self, x, y, /)\n--\n\n\
+Compare the values numerically with their sign ignored.\n\
\n");
-PyDoc_STRVAR(doc_ctx_min,"\n\
-min(x, y) - Compare the values numerically and return the minimum.\n\
+PyDoc_STRVAR(doc_ctx_min,
+"min($self, x, y, /)\n--\n\n\
+Compare the values numerically and return the minimum.\n\
\n");
-PyDoc_STRVAR(doc_ctx_min_mag,"\n\
-min_mag(x, y) - Compare the values numerically with their sign ignored.\n\
+PyDoc_STRVAR(doc_ctx_min_mag,
+"min_mag($self, x, y, /)\n--\n\n\
+Compare the values numerically with their sign ignored.\n\
\n");
-PyDoc_STRVAR(doc_ctx_minus,"\n\
-minus(x) - Minus corresponds to the unary prefix minus operator in Python,\n\
-but applies the context to the result.\n\
+PyDoc_STRVAR(doc_ctx_minus,
+"minus($self, x, /)\n--\n\n\
+Minus corresponds to the unary prefix minus operator in Python, but applies\n\
+the context to the result.\n\
\n");
-PyDoc_STRVAR(doc_ctx_multiply,"\n\
-multiply(x, y) - Return the product of x and y.\n\
+PyDoc_STRVAR(doc_ctx_multiply,
+"multiply($self, x, y, /)\n--\n\n\
+Return the product of x and y.\n\
\n");
-PyDoc_STRVAR(doc_ctx_next_minus,"\n\
-next_minus(x) - Return the largest representable number smaller than x.\n\
+PyDoc_STRVAR(doc_ctx_next_minus,
+"next_minus($self, x, /)\n--\n\n\
+Return the largest representable number smaller than x.\n\
\n");
-PyDoc_STRVAR(doc_ctx_next_plus,"\n\
-next_plus(x) - Return the smallest representable number larger than x.\n\
+PyDoc_STRVAR(doc_ctx_next_plus,
+"next_plus($self, x, /)\n--\n\n\
+Return the smallest representable number larger than x.\n\
\n");
-PyDoc_STRVAR(doc_ctx_next_toward,"\n\
-next_toward(x) - Return the number closest to x, in the direction towards y.\n\
+PyDoc_STRVAR(doc_ctx_next_toward,
+"next_toward($self, x, y, /)\n--\n\n\
+Return the number closest to x, in the direction towards y.\n\
\n");
-PyDoc_STRVAR(doc_ctx_normalize,"\n\
-normalize(x) - Reduce x to its simplest form. Alias for reduce(x).\n\
+PyDoc_STRVAR(doc_ctx_normalize,
+"normalize($self, x, /)\n--\n\n\
+Reduce x to its simplest form. Alias for reduce(x).\n\
\n");
-PyDoc_STRVAR(doc_ctx_number_class,"\n\
-number_class(x) - Return an indication of the class of x.\n\
+PyDoc_STRVAR(doc_ctx_number_class,
+"number_class($self, x, /)\n--\n\n\
+Return an indication of the class of x.\n\
\n");
-PyDoc_STRVAR(doc_ctx_plus,"\n\
-plus(x) - Plus corresponds to the unary prefix plus operator in Python,\n\
-but applies the context to the result.\n\
+PyDoc_STRVAR(doc_ctx_plus,
+"plus($self, x, /)\n--\n\n\
+Plus corresponds to the unary prefix plus operator in Python, but applies\n\
+the context to the result.\n\
\n");
-PyDoc_STRVAR(doc_ctx_power,"\n\
-power(x, y) - Compute x**y. If x is negative, then y must be integral.\n\
-The result will be inexact unless y is integral and the result is finite\n\
-and can be expressed exactly in 'precision' digits. In the Python version\n\
-the result is always correctly rounded, in the C version the result is\n\
-almost always correctly rounded.\n\
+PyDoc_STRVAR(doc_ctx_power,
+"power($self, /, a, b, modulo=None)\n--\n\n\
+Compute a**b. If 'a' is negative, then 'b' must be integral. The result\n\
+will be inexact unless 'a' is integral and the result is finite and can\n\
+be expressed exactly in 'precision' digits. In the Python version the\n\
+result is always correctly rounded, in the C version the result is almost\n\
+always correctly rounded.\n\
\n\
-power(x, y, m) - Compute (x**y) % m. The following restrictions hold:\n\
+If modulo is given, compute (a**b) % modulo. The following restrictions\n\
+hold:\n\
\n\
* all three arguments must be integral\n\
- * y must be nonnegative\n\
- * at least one of x or y must be nonzero\n\
- * m must be nonzero and less than 10**prec in absolute value\n\
+ * 'b' must be nonnegative\n\
+ * at least one of 'a' or 'b' must be nonzero\n\
+ * modulo must be nonzero and less than 10**prec in absolute value\n\
\n\
\n");
-PyDoc_STRVAR(doc_ctx_quantize,"\n\
-quantize(x, y) - Return a value equal to x (rounded), having the exponent of y.\n\
+PyDoc_STRVAR(doc_ctx_quantize,
+"quantize($self, x, y, /)\n--\n\n\
+Return a value equal to x (rounded), having the exponent of y.\n\
\n");
-PyDoc_STRVAR(doc_ctx_radix,"\n\
-radix() - Return 10.\n\
+PyDoc_STRVAR(doc_ctx_radix,
+"radix($self, /)\n--\n\n\
+Return 10.\n\
\n");
-PyDoc_STRVAR(doc_ctx_remainder,"\n\
-remainder(x, y) - Return the remainder from integer division. The sign of\n\
-the result, if non-zero, is the same as that of the original dividend.\n\
+PyDoc_STRVAR(doc_ctx_remainder,
+"remainder($self, x, y, /)\n--\n\n\
+Return the remainder from integer division. The sign of the result,\n\
+if non-zero, is the same as that of the original dividend.\n\
\n");
-PyDoc_STRVAR(doc_ctx_remainder_near,"\n\
-remainder_near(x, y) - Return x - y * n, where n is the integer nearest the\n\
-exact value of x / y (if the result is 0 then its sign will be the sign of x).\n\
+PyDoc_STRVAR(doc_ctx_remainder_near,
+"remainder_near($self, x, y, /)\n--\n\n\
+Return x - y * n, where n is the integer nearest the exact value of x / y\n\
+(if the result is 0 then its sign will be the sign of x).\n\
\n");
-PyDoc_STRVAR(doc_ctx_rotate,"\n\
-rotate(x, y) - Return a copy of x, rotated by y places.\n\
+PyDoc_STRVAR(doc_ctx_rotate,
+"rotate($self, x, y, /)\n--\n\n\
+Return a copy of x, rotated by y places.\n\
\n");
-PyDoc_STRVAR(doc_ctx_same_quantum,"\n\
-same_quantum(x, y) - Return True if the two operands have the same exponent.\n\
+PyDoc_STRVAR(doc_ctx_same_quantum,
+"same_quantum($self, x, y, /)\n--\n\n\
+Return True if the two operands have the same exponent.\n\
\n");
-PyDoc_STRVAR(doc_ctx_scaleb,"\n\
-scaleb(x, y) - Return the first operand after adding the second value\n\
-to its exp.\n\
+PyDoc_STRVAR(doc_ctx_scaleb,
+"scaleb($self, x, y, /)\n--\n\n\
+Return the first operand after adding the second value to its exp.\n\
\n");
-PyDoc_STRVAR(doc_ctx_shift,"\n\
-shift(x, y) - Return a copy of x, shifted by y places.\n\
+PyDoc_STRVAR(doc_ctx_shift,
+"shift($self, x, y, /)\n--\n\n\
+Return a copy of x, shifted by y places.\n\
\n");
-PyDoc_STRVAR(doc_ctx_sqrt,"\n\
-sqrt(x) - Square root of a non-negative number to context precision.\n\
+PyDoc_STRVAR(doc_ctx_sqrt,
+"sqrt($self, x, /)\n--\n\n\
+Square root of a non-negative number to context precision.\n\
\n");
-PyDoc_STRVAR(doc_ctx_subtract,"\n\
-subtract(x, y) - Return the difference between x and y.\n\
+PyDoc_STRVAR(doc_ctx_subtract,
+"subtract($self, x, y, /)\n--\n\n\
+Return the difference between x and y.\n\
\n");
-PyDoc_STRVAR(doc_ctx_to_eng_string,"\n\
-to_eng_string(x) - Convert a number to a string, using engineering notation.\n\
+PyDoc_STRVAR(doc_ctx_to_eng_string,
+"to_eng_string($self, x, /)\n--\n\n\
+Convert a number to a string, using engineering notation.\n\
\n");
-PyDoc_STRVAR(doc_ctx_to_integral,"\n\
-to_integral(x) - Identical to to_integral_value(x).\n\
+PyDoc_STRVAR(doc_ctx_to_integral,
+"to_integral($self, x, /)\n--\n\n\
+Identical to to_integral_value(x).\n\
\n");
-PyDoc_STRVAR(doc_ctx_to_integral_exact,"\n\
-to_integral_exact(x) - Round to an integer. Signal if the result is\n\
-rounded or inexact.\n\
+PyDoc_STRVAR(doc_ctx_to_integral_exact,
+"to_integral_exact($self, x, /)\n--\n\n\
+Round to an integer. Signal if the result is rounded or inexact.\n\
\n");
-PyDoc_STRVAR(doc_ctx_to_integral_value,"\n\
-to_integral_value(x) - Round to an integer.\n\
+PyDoc_STRVAR(doc_ctx_to_integral_value,
+"to_integral_value($self, x, /)\n--\n\n\
+Round to an integer.\n\
\n");
-PyDoc_STRVAR(doc_ctx_to_sci_string,"\n\
-to_sci_string(x) - Convert a number to a string using scientific notation.\n\
+PyDoc_STRVAR(doc_ctx_to_sci_string,
+"to_sci_string($self, x, /)\n--\n\n\
+Convert a number to a string using scientific notation.\n\
\n");
diff --git a/Modules/_decimal/libmpdec/mpdecimal.c b/Modules/_decimal/libmpdec/mpdecimal.c
index 21d222277c..593f9f5e03 100644
--- a/Modules/_decimal/libmpdec/mpdecimal.c
+++ b/Modules/_decimal/libmpdec/mpdecimal.c
@@ -43,6 +43,7 @@
#ifdef PPRO
#if defined(_MSC_VER)
#include <float.h>
+ #pragma float_control(precise, on)
#pragma fenv_access(on)
#elif !defined(__OpenBSD__) && !defined(__NetBSD__)
/* C99 */
diff --git a/Modules/_decimal/tests/deccheck.py b/Modules/_decimal/tests/deccheck.py
index 27137b2e49..ab7d5bdf4e 100644
--- a/Modules/_decimal/tests/deccheck.py
+++ b/Modules/_decimal/tests/deccheck.py
@@ -36,6 +36,7 @@ from test.support import import_fresh_module
from randdec import randfloat, all_unary, all_binary, all_ternary
from randdec import unary_optarg, binary_optarg, ternary_optarg
from formathelper import rand_format, rand_locale
+from _pydecimal import _dec_from_triple
C = import_fresh_module('decimal', fresh=['_decimal'])
P = import_fresh_module('decimal', blocked=['_decimal'])
@@ -370,7 +371,7 @@ class SkipHandler:
return abs(a - b)
def standard_ulp(self, dec, prec):
- return P._dec_from_triple(0, '1', dec._exp+len(dec._int)-prec)
+ return _dec_from_triple(0, '1', dec._exp+len(dec._int)-prec)
def rounding_direction(self, x, mode):
"""Determine the effective direction of the rounding when
@@ -401,10 +402,10 @@ class SkipHandler:
# Convert infinities to the largest representable number + 1.
x = exact
if exact.is_infinite():
- x = P._dec_from_triple(exact._sign, '10', context.p.Emax)
+ x = _dec_from_triple(exact._sign, '10', context.p.Emax)
y = rounded
if rounded.is_infinite():
- y = P._dec_from_triple(rounded._sign, '10', context.p.Emax)
+ y = _dec_from_triple(rounded._sign, '10', context.p.Emax)
# err = (rounded - exact) / ulp(rounded)
self.maxctx.prec = p * 2
diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c
index cf819e896c..0f1d6a1faa 100644
--- a/Modules/_elementtree.c
+++ b/Modules/_elementtree.c
@@ -11,6 +11,8 @@
*--------------------------------------------------------------------
*/
+#define PY_SSIZE_T_CLEAN
+
#include "Python.h"
#include "structmember.h"
@@ -185,8 +187,8 @@ typedef struct {
PyObject* attrib;
/* child elements */
- int length; /* actual number of items */
- int allocated; /* allocated items */
+ Py_ssize_t length; /* actual number of items */
+ Py_ssize_t allocated; /* allocated items */
/* this either points to _children or to a malloced buffer */
PyObject* *children;
@@ -251,7 +253,7 @@ LOCAL(void)
dealloc_extra(ElementObject* self)
{
ElementObjectExtra *myextra;
- int i;
+ Py_ssize_t i;
if (!self->extra)
return;
@@ -368,6 +370,14 @@ get_attrib_from_keywords(PyObject *kwds)
return attrib;
}
+/*[clinic input]
+module _elementtree
+class _elementtree.Element "ElementObject *" "&Element_Type"
+class _elementtree.TreeBuilder "TreeBuilderObject *" "&TreeBuilder_Type"
+class _elementtree.XMLParser "XMLParserObject *" "&XMLParser_Type"
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=159aa50a54061c22]*/
+
static int
element_init(PyObject *self, PyObject *args, PyObject *kwds)
{
@@ -442,7 +452,7 @@ element_resize(ElementObject* self, Py_ssize_t extra)
return -1;
}
- size = self->extra->length + extra;
+ size = self->extra->length + extra; /* never overflows */
if (size > self->extra->allocated) {
/* use Python 2.4's list growth strategy */
@@ -455,11 +465,6 @@ element_resize(ElementObject* self, Py_ssize_t extra)
size = size ? size : 1;
if ((size_t)size > PY_SSIZE_T_MAX/sizeof(PyObject*))
goto nomemory;
- if (size > INT_MAX) {
- PyErr_SetString(PyExc_OverflowError,
- "too many children");
- return -1;
- }
if (self->extra->children != self->extra->_children) {
/* Coverity CID #182 size_error: Allocating 1 bytes to pointer
* "children", which needs at least 4 bytes. Although it's a
@@ -620,7 +625,7 @@ element_gc_traverse(ElementObject *self, visitproc visit, void *arg)
Py_VISIT(JOIN_OBJ(self->tail));
if (self->extra) {
- int i;
+ Py_ssize_t i;
Py_VISIT(self->extra->attrib);
for (i = 0; i < self->extra->length; ++i)
@@ -661,25 +666,33 @@ element_dealloc(ElementObject* self)
/* -------------------------------------------------------------------- */
-static PyObject*
-element_append(ElementObject* self, PyObject* args)
-{
- PyObject* element;
- if (!PyArg_ParseTuple(args, "O!:append", &Element_Type, &element))
- return NULL;
+/*[clinic input]
+_elementtree.Element.append
- if (element_add_subelement(self, element) < 0)
+ subelement: object(subclass_of='&Element_Type')
+ /
+
+[clinic start generated code]*/
+
+static PyObject *
+_elementtree_Element_append_impl(ElementObject *self, PyObject *subelement)
+/*[clinic end generated code: output=54a884b7cf2295f4 input=3ed648beb5bfa22a]*/
+{
+ if (element_add_subelement(self, subelement) < 0)
return NULL;
Py_RETURN_NONE;
}
-static PyObject*
-element_clearmethod(ElementObject* self, PyObject* args)
-{
- if (!PyArg_ParseTuple(args, ":clear"))
- return NULL;
+/*[clinic input]
+_elementtree.Element.clear
+
+[clinic start generated code]*/
+static PyObject *
+_elementtree_Element_clear_impl(ElementObject *self)
+/*[clinic end generated code: output=8bcd7a51f94cfff6 input=3c719ff94bf45dd6]*/
+{
dealloc_extra(self);
Py_INCREF(Py_None);
@@ -693,15 +706,18 @@ element_clearmethod(ElementObject* self, PyObject* args)
Py_RETURN_NONE;
}
-static PyObject*
-element_copy(ElementObject* self, PyObject* args)
+/*[clinic input]
+_elementtree.Element.__copy__
+
+[clinic start generated code]*/
+
+static PyObject *
+_elementtree_Element___copy___impl(ElementObject *self)
+/*[clinic end generated code: output=2c701ebff7247781 input=ad87aaebe95675bf]*/
{
- int i;
+ Py_ssize_t i;
ElementObject* element;
- if (!PyArg_ParseTuple(args, ":__copy__"))
- return NULL;
-
element = (ElementObject*) create_new_element(
self->tag, (self->extra) ? self->extra->attrib : Py_None);
if (!element)
@@ -732,10 +748,19 @@ element_copy(ElementObject* self, PyObject* args)
return (PyObject*) element;
}
-static PyObject*
-element_deepcopy(ElementObject* self, PyObject* args)
+/*[clinic input]
+_elementtree.Element.__deepcopy__
+
+ memo: object
+ /
+
+[clinic start generated code]*/
+
+static PyObject *
+_elementtree_Element___deepcopy__(ElementObject *self, PyObject *memo)
+/*[clinic end generated code: output=d1f19851d17bf239 input=df24c2b602430b77]*/
{
- int i;
+ Py_ssize_t i;
ElementObject* element;
PyObject* tag;
PyObject* attrib;
@@ -743,10 +768,6 @@ element_deepcopy(ElementObject* self, PyObject* args)
PyObject* tail;
PyObject* id;
- PyObject* memo;
- if (!PyArg_ParseTuple(args, "O:__deepcopy__", &memo))
- return NULL;
-
tag = deepcopy(self->tag, memo);
if (!tag)
return NULL;
@@ -817,17 +838,22 @@ element_deepcopy(ElementObject* self, PyObject* args)
return NULL;
}
-static PyObject*
-element_sizeof(PyObject* myself, PyObject* args)
+/*[clinic input]
+_elementtree.Element.__sizeof__ -> Py_ssize_t
+
+[clinic start generated code]*/
+
+static Py_ssize_t
+_elementtree_Element___sizeof___impl(ElementObject *self)
+/*[clinic end generated code: output=bf73867721008000 input=70f4b323d55a17c1]*/
{
- ElementObject *self = (ElementObject*)myself;
- Py_ssize_t result = sizeof(ElementObject);
+ Py_ssize_t result = _PyObject_SIZE(Py_TYPE(self));
if (self->extra) {
result += sizeof(ElementObjectExtra);
if (self->extra->children != self->extra->_children)
result += sizeof(PyObject*) * self->extra->allocated;
}
- return PyLong_FromSsize_t(result);
+ return result;
}
/* dict keys for getstate/setstate. */
@@ -843,10 +869,16 @@ element_sizeof(PyObject* myself, PyObject* args)
* any unnecessary structures there; and (b) it buys compatibility with 3.2
* pickles. See issue #16076.
*/
+/*[clinic input]
+_elementtree.Element.__getstate__
+
+[clinic start generated code]*/
+
static PyObject *
-element_getstate(ElementObject *self)
+_elementtree_Element___getstate___impl(ElementObject *self)
+/*[clinic end generated code: output=37279aeeb6bb5b04 input=f0d16d7ec2f7adc1]*/
{
- int i, noattrib;
+ Py_ssize_t i, noattrib;
PyObject *instancedict = NULL, *children;
/* Build a list of children. */
@@ -896,16 +928,15 @@ element_setstate_from_attributes(ElementObject *self,
PyObject *tail,
PyObject *children)
{
- int i, nchildren;
+ Py_ssize_t i, nchildren;
if (!tag) {
PyErr_SetString(PyExc_TypeError, "tag may not be NULL");
return NULL;
}
- Py_CLEAR(self->tag);
- self->tag = tag;
- Py_INCREF(self->tag);
+ Py_INCREF(tag);
+ Py_XSETREF(self->tag, tag);
_clear_joined_ptr(&self->text);
self->text = text ? JOIN_SET(text, PyList_CheckExact(text)) : Py_None;
@@ -921,18 +952,11 @@ element_setstate_from_attributes(ElementObject *self,
/* Compute 'nchildren'. */
if (children) {
- Py_ssize_t size;
if (!PyList_Check(children)) {
PyErr_SetString(PyExc_TypeError, "'_children' is not a list");
return NULL;
}
- size = PyList_Size(children);
- /* expat limits nchildren to int */
- if (size > INT_MAX) {
- PyErr_SetString(PyExc_OverflowError, "too many children");
- return NULL;
- }
- nchildren = (int)size;
+ nchildren = PyList_Size(children);
}
else {
nchildren = 0;
@@ -955,9 +979,8 @@ element_setstate_from_attributes(ElementObject *self,
/* Stash attrib. */
if (attrib) {
- Py_CLEAR(self->extra->attrib);
- self->extra->attrib = attrib;
Py_INCREF(attrib);
+ Py_XSETREF(self->extra->attrib, attrib);
}
Py_RETURN_NONE;
@@ -966,6 +989,7 @@ element_setstate_from_attributes(ElementObject *self,
/* __setstate__ for Element instance from the Python implementation.
* 'state' should be the instance dict.
*/
+
static PyObject *
element_setstate_from_Python(ElementObject *self, PyObject *state)
{
@@ -991,8 +1015,17 @@ element_setstate_from_Python(ElementObject *self, PyObject *state)
return retval;
}
+/*[clinic input]
+_elementtree.Element.__setstate__
+
+ state: object
+ /
+
+[clinic start generated code]*/
+
static PyObject *
-element_setstate(ElementObject *self, PyObject *state)
+_elementtree_Element___setstate__(ElementObject *self, PyObject *state)
+/*[clinic end generated code: output=ea28bf3491b1f75e input=aaf80abea7c1e3b9]*/
{
if (!PyDict_CheckExact(state)) {
PyErr_Format(PyExc_TypeError,
@@ -1046,21 +1079,26 @@ checkpath(PyObject* tag)
return 1; /* unknown type; might be path expression */
}
-static PyObject*
-element_extend(ElementObject* self, PyObject* args)
+/*[clinic input]
+_elementtree.Element.extend
+
+ elements: object
+ /
+
+[clinic start generated code]*/
+
+static PyObject *
+_elementtree_Element_extend(ElementObject *self, PyObject *elements)
+/*[clinic end generated code: output=f6e67fc2ff529191 input=807bc4f31c69f7c0]*/
{
PyObject* seq;
Py_ssize_t i;
- PyObject* seq_in;
- if (!PyArg_ParseTuple(args, "O:extend", &seq_in))
- return NULL;
-
- seq = PySequence_Fast(seq_in, "");
+ seq = PySequence_Fast(elements, "");
if (!seq) {
PyErr_Format(
PyExc_TypeError,
- "expected sequence, not \"%.200s\"", Py_TYPE(seq_in)->tp_name
+ "expected sequence, not \"%.200s\"", Py_TYPE(elements)->tp_name
);
return NULL;
}
@@ -1091,23 +1129,26 @@ element_extend(ElementObject* self, PyObject* args)
Py_RETURN_NONE;
}
-static PyObject*
-element_find(ElementObject *self, PyObject *args, PyObject *kwds)
+/*[clinic input]
+_elementtree.Element.find
+
+ path: object
+ namespaces: object = None
+
+[clinic start generated code]*/
+
+static PyObject *
+_elementtree_Element_find_impl(ElementObject *self, PyObject *path,
+ PyObject *namespaces)
+/*[clinic end generated code: output=41b43f0f0becafae input=359b6985f6489d2e]*/
{
- int i;
- PyObject* tag;
- PyObject* namespaces = Py_None;
- static char *kwlist[] = {"path", "namespaces", 0};
+ Py_ssize_t i;
elementtreestate *st = ET_STATE_GLOBAL;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|O:find", kwlist,
- &tag, &namespaces))
- return NULL;
-
- if (checkpath(tag) || namespaces != Py_None) {
+ if (checkpath(path) || namespaces != Py_None) {
_Py_IDENTIFIER(find);
return _PyObject_CallMethodId(
- st->elementpath_obj, &PyId_find, "OOO", self, tag, namespaces
+ st->elementpath_obj, &PyId_find, "OOO", self, path, namespaces
);
}
@@ -1120,7 +1161,7 @@ element_find(ElementObject *self, PyObject *args, PyObject *kwds)
if (!Element_CheckExact(item))
continue;
Py_INCREF(item);
- rc = PyObject_RichCompareBool(((ElementObject*)item)->tag, tag, Py_EQ);
+ rc = PyObject_RichCompareBool(((ElementObject*)item)->tag, path, Py_EQ);
if (rc > 0)
return item;
Py_DECREF(item);
@@ -1131,24 +1172,28 @@ element_find(ElementObject *self, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
}
-static PyObject*
-element_findtext(ElementObject *self, PyObject *args, PyObject *kwds)
+/*[clinic input]
+_elementtree.Element.findtext
+
+ path: object
+ default: object = None
+ namespaces: object = None
+
+[clinic start generated code]*/
+
+static PyObject *
+_elementtree_Element_findtext_impl(ElementObject *self, PyObject *path,
+ PyObject *default_value,
+ PyObject *namespaces)
+/*[clinic end generated code: output=83b3ba4535d308d2 input=b53a85aa5aa2a916]*/
{
- int i;
- PyObject* tag;
- PyObject* default_value = Py_None;
- PyObject* namespaces = Py_None;
+ Py_ssize_t i;
_Py_IDENTIFIER(findtext);
- static char *kwlist[] = {"path", "default", "namespaces", 0};
elementtreestate *st = ET_STATE_GLOBAL;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|OO:findtext", kwlist,
- &tag, &default_value, &namespaces))
- return NULL;
-
- if (checkpath(tag) || namespaces != Py_None)
+ if (checkpath(path) || namespaces != Py_None)
return _PyObject_CallMethodId(
- st->elementpath_obj, &PyId_findtext, "OOOO", self, tag, default_value, namespaces
+ st->elementpath_obj, &PyId_findtext, "OOOO", self, path, default_value, namespaces
);
if (!self->extra) {
@@ -1162,7 +1207,7 @@ element_findtext(ElementObject *self, PyObject *args, PyObject *kwds)
if (!Element_CheckExact(item))
continue;
Py_INCREF(item);
- rc = PyObject_RichCompareBool(item->tag, tag, Py_EQ);
+ rc = PyObject_RichCompareBool(item->tag, path, Py_EQ);
if (rc > 0) {
PyObject* text = element_get_text(item);
if (text == Py_None) {
@@ -1182,20 +1227,24 @@ element_findtext(ElementObject *self, PyObject *args, PyObject *kwds)
return default_value;
}
-static PyObject*
-element_findall(ElementObject *self, PyObject *args, PyObject *kwds)
+/*[clinic input]
+_elementtree.Element.findall
+
+ path: object
+ namespaces: object = None
+
+[clinic start generated code]*/
+
+static PyObject *
+_elementtree_Element_findall_impl(ElementObject *self, PyObject *path,
+ PyObject *namespaces)
+/*[clinic end generated code: output=1a0bd9f5541b711d input=4d9e6505a638550c]*/
{
- int i;
+ Py_ssize_t i;
PyObject* out;
- PyObject* tag;
- PyObject* namespaces = Py_None;
- static char *kwlist[] = {"path", "namespaces", 0};
+ PyObject* tag = path;
elementtreestate *st = ET_STATE_GLOBAL;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|O:findall", kwlist,
- &tag, &namespaces))
- return NULL;
-
if (checkpath(tag) || namespaces != Py_None) {
_Py_IDENTIFIER(findall);
return _PyObject_CallMethodId(
@@ -1228,36 +1277,41 @@ element_findall(ElementObject *self, PyObject *args, PyObject *kwds)
return out;
}
-static PyObject*
-element_iterfind(ElementObject *self, PyObject *args, PyObject *kwds)
+/*[clinic input]
+_elementtree.Element.iterfind
+
+ path: object
+ namespaces: object = None
+
+[clinic start generated code]*/
+
+static PyObject *
+_elementtree_Element_iterfind_impl(ElementObject *self, PyObject *path,
+ PyObject *namespaces)
+/*[clinic end generated code: output=ecdd56d63b19d40f input=abb974e350fb65c7]*/
{
- PyObject* tag;
- PyObject* namespaces = Py_None;
+ PyObject* tag = path;
_Py_IDENTIFIER(iterfind);
- static char *kwlist[] = {"path", "namespaces", 0};
elementtreestate *st = ET_STATE_GLOBAL;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|O:iterfind", kwlist,
- &tag, &namespaces)) {
- return NULL;
- }
-
return _PyObject_CallMethodId(
st->elementpath_obj, &PyId_iterfind, "OOO", self, tag, namespaces);
}
-static PyObject*
-element_get(ElementObject* self, PyObject* args, PyObject* kwds)
-{
- PyObject* value;
- static char* kwlist[] = {"key", "default", 0};
+/*[clinic input]
+_elementtree.Element.get
- PyObject* key;
- PyObject* default_value = Py_None;
+ key: object
+ default: object = None
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|O:get", kwlist, &key,
- &default_value))
- return NULL;
+[clinic start generated code]*/
+
+static PyObject *
+_elementtree_Element_get_impl(ElementObject *self, PyObject *key,
+ PyObject *default_value)
+/*[clinic end generated code: output=523c614142595d75 input=ee153bbf8cdb246e]*/
+{
+ PyObject* value;
if (!self->extra || self->extra->attrib == Py_None)
value = default_value;
@@ -1271,17 +1325,20 @@ element_get(ElementObject* self, PyObject* args, PyObject* kwds)
return value;
}
-static PyObject*
-element_getchildren(ElementObject* self, PyObject* args)
+/*[clinic input]
+_elementtree.Element.getchildren
+
+[clinic start generated code]*/
+
+static PyObject *
+_elementtree_Element_getchildren_impl(ElementObject *self)
+/*[clinic end generated code: output=e50ffe118637b14f input=0f754dfded150d5f]*/
{
- int i;
+ Py_ssize_t i;
PyObject* list;
/* FIXME: report as deprecated? */
- if (!PyArg_ParseTuple(args, ":getchildren"))
- return NULL;
-
if (!self->extra)
return PyList_New(0);
@@ -1303,25 +1360,41 @@ static PyObject *
create_elementiter(ElementObject *self, PyObject *tag, int gettext);
+/*[clinic input]
+_elementtree.Element.iter
+
+ tag: object = None
+
+[clinic start generated code]*/
+
static PyObject *
-element_iter(ElementObject *self, PyObject *args, PyObject *kwds)
+_elementtree_Element_iter_impl(ElementObject *self, PyObject *tag)
+/*[clinic end generated code: output=3f49f9a862941cc5 input=774d5b12e573aedd]*/
{
- PyObject* tag = Py_None;
- static char* kwlist[] = {"tag", 0};
-
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O:iter", kwlist, &tag))
- return NULL;
+ if (PyUnicode_Check(tag)) {
+ if (PyUnicode_READY(tag) < 0)
+ return NULL;
+ if (PyUnicode_GET_LENGTH(tag) == 1 && PyUnicode_READ_CHAR(tag, 0) == '*')
+ tag = Py_None;
+ }
+ else if (PyBytes_Check(tag)) {
+ if (PyBytes_GET_SIZE(tag) == 1 && *PyBytes_AS_STRING(tag) == '*')
+ tag = Py_None;
+ }
return create_elementiter(self, tag, 0);
}
-static PyObject*
-element_itertext(ElementObject* self, PyObject* args)
-{
- if (!PyArg_ParseTuple(args, ":itertext"))
- return NULL;
+/*[clinic input]
+_elementtree.Element.itertext
+
+[clinic start generated code]*/
+static PyObject *
+_elementtree_Element_itertext_impl(ElementObject *self)
+/*[clinic end generated code: output=5fa34b2fbcb65df6 input=af8f0e42cb239c89]*/
+{
return create_elementiter(self, Py_None, 1);
}
@@ -1343,16 +1416,21 @@ element_getitem(PyObject* self_, Py_ssize_t index)
return self->extra->children[index];
}
-static PyObject*
-element_insert(ElementObject* self, PyObject* args)
-{
- int i;
+/*[clinic input]
+_elementtree.Element.insert
- int index;
- PyObject* element;
- if (!PyArg_ParseTuple(args, "iO!:insert", &index,
- &Element_Type, &element))
- return NULL;
+ index: Py_ssize_t
+ subelement: object(subclass_of='&Element_Type')
+ /
+
+[clinic start generated code]*/
+
+static PyObject *
+_elementtree_Element_insert_impl(ElementObject *self, Py_ssize_t index,
+ PyObject *subelement)
+/*[clinic end generated code: output=990adfef4d424c0b input=cd6fbfcdab52d7a8]*/
+{
+ Py_ssize_t i;
if (!self->extra) {
if (create_extra(self, NULL) < 0)
@@ -1373,32 +1451,38 @@ element_insert(ElementObject* self, PyObject* args)
for (i = self->extra->length; i > index; i--)
self->extra->children[i] = self->extra->children[i-1];
- Py_INCREF(element);
- self->extra->children[index] = element;
+ Py_INCREF(subelement);
+ self->extra->children[index] = subelement;
self->extra->length++;
Py_RETURN_NONE;
}
-static PyObject*
-element_items(ElementObject* self, PyObject* args)
-{
- if (!PyArg_ParseTuple(args, ":items"))
- return NULL;
+/*[clinic input]
+_elementtree.Element.items
+
+[clinic start generated code]*/
+static PyObject *
+_elementtree_Element_items_impl(ElementObject *self)
+/*[clinic end generated code: output=6db2c778ce3f5a4d input=adbe09aaea474447]*/
+{
if (!self->extra || self->extra->attrib == Py_None)
return PyList_New(0);
return PyDict_Items(self->extra->attrib);
}
-static PyObject*
-element_keys(ElementObject* self, PyObject* args)
-{
- if (!PyArg_ParseTuple(args, ":keys"))
- return NULL;
+/*[clinic input]
+_elementtree.Element.keys
+
+[clinic start generated code]*/
+static PyObject *
+_elementtree_Element_keys_impl(ElementObject *self)
+/*[clinic end generated code: output=bc5bfabbf20eeb3c input=f02caf5b496b5b0b]*/
+{
if (!self->extra || self->extra->attrib == Py_None)
return PyList_New(0);
@@ -1414,16 +1498,22 @@ element_length(ElementObject* self)
return self->extra->length;
}
-static PyObject*
-element_makeelement(PyObject* self, PyObject* args, PyObject* kw)
+/*[clinic input]
+_elementtree.Element.makeelement
+
+ tag: object
+ attrib: object
+ /
+
+[clinic start generated code]*/
+
+static PyObject *
+_elementtree_Element_makeelement_impl(ElementObject *self, PyObject *tag,
+ PyObject *attrib)
+/*[clinic end generated code: output=4109832d5bb789ef input=9480d1d2e3e68235]*/
{
PyObject* elem;
- PyObject* tag;
- PyObject* attrib;
- if (!PyArg_ParseTuple(args, "OO:makeelement", &tag, &attrib))
- return NULL;
-
attrib = PyDict_Copy(attrib);
if (!attrib)
return NULL;
@@ -1435,16 +1525,21 @@ element_makeelement(PyObject* self, PyObject* args, PyObject* kw)
return elem;
}
-static PyObject*
-element_remove(ElementObject* self, PyObject* args)
+/*[clinic input]
+_elementtree.Element.remove
+
+ subelement: object(subclass_of='&Element_Type')
+ /
+
+[clinic start generated code]*/
+
+static PyObject *
+_elementtree_Element_remove_impl(ElementObject *self, PyObject *subelement)
+/*[clinic end generated code: output=38fe6c07d6d87d1f input=d52fc28ededc0bd8]*/
{
- int i;
+ Py_ssize_t i;
int rc;
- PyObject* element;
- PyObject* found;
-
- if (!PyArg_ParseTuple(args, "O!:remove", &Element_Type, &element))
- return NULL;
+ PyObject *found;
if (!self->extra) {
/* element has no children, so raise exception */
@@ -1456,9 +1551,9 @@ element_remove(ElementObject* self, PyObject* args)
}
for (i = 0; i < self->extra->length; i++) {
- if (self->extra->children[i] == element)
+ if (self->extra->children[i] == subelement)
break;
- rc = PyObject_RichCompareBool(self->extra->children[i], element, Py_EQ);
+ rc = PyObject_RichCompareBool(self->extra->children[i], subelement, Py_EQ);
if (rc > 0)
break;
if (rc < 0)
@@ -1466,7 +1561,7 @@ element_remove(ElementObject* self, PyObject* args)
}
if (i >= self->extra->length) {
- /* element is not in children, so raise exception */
+ /* subelement is not in children, so raise exception */
PyErr_SetString(
PyExc_ValueError,
"list.remove(x): x not in list"
@@ -1493,16 +1588,22 @@ element_repr(ElementObject* self)
return PyUnicode_FromFormat("<Element at %p>", self);
}
-static PyObject*
-element_set(ElementObject* self, PyObject* args)
+/*[clinic input]
+_elementtree.Element.set
+
+ key: object
+ value: object
+ /
+
+[clinic start generated code]*/
+
+static PyObject *
+_elementtree_Element_set_impl(ElementObject *self, PyObject *key,
+ PyObject *value)
+/*[clinic end generated code: output=fb938806be3c5656 input=1efe90f7d82b3fe9]*/
{
PyObject* attrib;
- PyObject* key;
- PyObject* value;
- if (!PyArg_ParseTuple(args, "OO:set", &key, &value))
- return NULL;
-
if (!self->extra) {
if (create_extra(self, NULL) < 0)
return NULL;
@@ -1519,19 +1620,18 @@ element_set(ElementObject* self, PyObject* args)
}
static int
-element_setitem(PyObject* self_, Py_ssize_t index_, PyObject* item)
+element_setitem(PyObject* self_, Py_ssize_t index, PyObject* item)
{
ElementObject* self = (ElementObject*) self_;
- int i, index;
+ Py_ssize_t i;
PyObject* old;
- if (!self->extra || index_ < 0 || index_ >= self->extra->length) {
+ if (!self->extra || index < 0 || index >= self->extra->length) {
PyErr_SetString(
PyExc_IndexError,
"child assignment index out of range");
return -1;
}
- index = (int)index_;
old = self->extra->children[index];
@@ -1632,7 +1732,6 @@ element_ass_subscr(PyObject* self_, PyObject* item, PyObject* value)
&start, &stop, &step, &slicelen) < 0) {
return -1;
}
- assert(slicelen <= self->extra->length);
if (value == NULL) {
/* Delete slice */
@@ -1694,7 +1793,7 @@ element_ass_subscr(PyObject* self_, PyObject* item, PyObject* value)
(self->extra->length - cur) * sizeof(PyObject *));
}
- self->extra->length -= (int)slicelen;
+ self->extra->length -= slicelen;
/* Discard the recycle list with all the deleted sub-elements */
Py_XDECREF(recycle);
@@ -1730,8 +1829,6 @@ element_ass_subscr(PyObject* self_, PyObject* item, PyObject* value)
return -1;
}
}
- assert(newlen - slicelen <= INT_MAX - self->extra->length);
- assert(newlen - slicelen >= -self->extra->length);
if (slicelen > 0) {
/* to avoid recursive calls to this method (via decref), move
@@ -1765,7 +1862,7 @@ element_ass_subscr(PyObject* self_, PyObject* item, PyObject* value)
self->extra->children[cur] = element;
}
- self->extra->length += (int)(newlen - slicelen);
+ self->extra->length += newlen - slicelen;
Py_DECREF(seq);
@@ -1781,43 +1878,6 @@ element_ass_subscr(PyObject* self_, PyObject* item, PyObject* value)
}
}
-static PyMethodDef element_methods[] = {
-
- {"clear", (PyCFunction) element_clearmethod, METH_VARARGS},
-
- {"get", (PyCFunction) element_get, METH_VARARGS | METH_KEYWORDS},
- {"set", (PyCFunction) element_set, METH_VARARGS},
-
- {"find", (PyCFunction) element_find, METH_VARARGS | METH_KEYWORDS},
- {"findtext", (PyCFunction) element_findtext, METH_VARARGS | METH_KEYWORDS},
- {"findall", (PyCFunction) element_findall, METH_VARARGS | METH_KEYWORDS},
-
- {"append", (PyCFunction) element_append, METH_VARARGS},
- {"extend", (PyCFunction) element_extend, METH_VARARGS},
- {"insert", (PyCFunction) element_insert, METH_VARARGS},
- {"remove", (PyCFunction) element_remove, METH_VARARGS},
-
- {"iter", (PyCFunction) element_iter, METH_VARARGS | METH_KEYWORDS},
- {"itertext", (PyCFunction) element_itertext, METH_VARARGS},
- {"iterfind", (PyCFunction) element_iterfind, METH_VARARGS | METH_KEYWORDS},
-
- {"getiterator", (PyCFunction) element_iter, METH_VARARGS | METH_KEYWORDS},
- {"getchildren", (PyCFunction) element_getchildren, METH_VARARGS},
-
- {"items", (PyCFunction) element_items, METH_VARARGS},
- {"keys", (PyCFunction) element_keys, METH_VARARGS},
-
- {"makeelement", (PyCFunction) element_makeelement, METH_VARARGS},
-
- {"__copy__", (PyCFunction) element_copy, METH_VARARGS},
- {"__deepcopy__", (PyCFunction) element_deepcopy, METH_VARARGS},
- {"__sizeof__", element_sizeof, METH_NOARGS},
- {"__getstate__", (PyCFunction)element_getstate, METH_NOARGS},
- {"__setstate__", (PyCFunction)element_setstate, METH_O},
-
- {NULL, NULL}
-};
-
static PyObject*
element_getattro(ElementObject* self, PyObject* nameobj)
{
@@ -1882,9 +1942,8 @@ element_setattro(ElementObject* self, PyObject* nameobj, PyObject* value)
return -1;
if (strcmp(name, "tag") == 0) {
- Py_DECREF(self->tag);
- self->tag = value;
- Py_INCREF(self->tag);
+ Py_INCREF(value);
+ Py_SETREF(self->tag, value);
} else if (strcmp(name, "text") == 0) {
Py_DECREF(JOIN_OBJ(self->text));
self->text = value;
@@ -1898,9 +1957,8 @@ element_setattro(ElementObject* self, PyObject* nameobj, PyObject* value)
if (create_extra(self, NULL) < 0)
return -1;
}
- Py_DECREF(self->extra->attrib);
- self->extra->attrib = value;
- Py_INCREF(self->extra->attrib);
+ Py_INCREF(value);
+ Py_SETREF(self->extra->attrib, value);
} else {
PyErr_SetString(PyExc_AttributeError,
"Can't set arbitrary attributes on Element");
@@ -1920,54 +1978,6 @@ static PySequenceMethods element_as_sequence = {
0,
};
-static PyMappingMethods element_as_mapping = {
- (lenfunc) element_length,
- (binaryfunc) element_subscr,
- (objobjargproc) element_ass_subscr,
-};
-
-static PyTypeObject Element_Type = {
- PyVarObject_HEAD_INIT(NULL, 0)
- "xml.etree.ElementTree.Element", sizeof(ElementObject), 0,
- /* methods */
- (destructor)element_dealloc, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)element_repr, /* tp_repr */
- 0, /* tp_as_number */
- &element_as_sequence, /* tp_as_sequence */
- &element_as_mapping, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- (getattrofunc)element_getattro, /* tp_getattro */
- (setattrofunc)element_setattro, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC,
- /* tp_flags */
- 0, /* tp_doc */
- (traverseproc)element_gc_traverse, /* tp_traverse */
- (inquiry)element_gc_clear, /* tp_clear */
- 0, /* tp_richcompare */
- offsetof(ElementObject, weakreflist), /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- element_methods, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- 0, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)element_init, /* tp_init */
- PyType_GenericAlloc, /* tp_alloc */
- element_new, /* tp_new */
- 0, /* tp_free */
-};
-
/******************************* Element iterator ****************************/
/* ElementIterObject represents the iteration state over an XML element in
@@ -2058,6 +2068,7 @@ elementiter_next(ElementIterObject *it)
ElementObject *cur_parent;
Py_ssize_t child_index;
int rc;
+ ElementObject *elem;
while (1) {
/* Handle the case reached in the beginning and end of iteration, where
@@ -2071,38 +2082,47 @@ elementiter_next(ElementIterObject *it)
PyErr_SetNone(PyExc_StopIteration);
return NULL;
} else {
+ elem = it->root_element;
it->parent_stack = parent_stack_push_new(it->parent_stack,
- it->root_element);
+ elem);
if (!it->parent_stack) {
PyErr_NoMemory();
return NULL;
}
+ Py_INCREF(elem);
it->root_done = 1;
rc = (it->sought_tag == Py_None);
if (!rc) {
- rc = PyObject_RichCompareBool(it->root_element->tag,
+ rc = PyObject_RichCompareBool(elem->tag,
it->sought_tag, Py_EQ);
- if (rc < 0)
+ if (rc < 0) {
+ Py_DECREF(elem);
return NULL;
+ }
}
if (rc) {
if (it->gettext) {
- PyObject *text = element_get_text(it->root_element);
- if (!text)
+ PyObject *text = element_get_text(elem);
+ if (!text) {
+ Py_DECREF(elem);
return NULL;
+ }
+ Py_INCREF(text);
+ Py_DECREF(elem);
rc = PyObject_IsTrue(text);
+ if (rc > 0)
+ return text;
+ Py_DECREF(text);
if (rc < 0)
return NULL;
- if (rc) {
- Py_INCREF(text);
- return text;
- }
} else {
- Py_INCREF(it->root_element);
- return (PyObject *)it->root_element;
+ return (PyObject *)elem;
}
}
+ else {
+ Py_DECREF(elem);
+ }
}
}
@@ -2112,54 +2132,68 @@ elementiter_next(ElementIterObject *it)
cur_parent = it->parent_stack->parent;
child_index = it->parent_stack->child_index;
if (cur_parent->extra && child_index < cur_parent->extra->length) {
- ElementObject *child = (ElementObject *)
- cur_parent->extra->children[child_index];
+ elem = (ElementObject *)cur_parent->extra->children[child_index];
it->parent_stack->child_index++;
it->parent_stack = parent_stack_push_new(it->parent_stack,
- child);
+ elem);
if (!it->parent_stack) {
PyErr_NoMemory();
return NULL;
}
+ Py_INCREF(elem);
if (it->gettext) {
- PyObject *text = element_get_text(child);
- if (!text)
+ PyObject *text = element_get_text(elem);
+ if (!text) {
+ Py_DECREF(elem);
return NULL;
+ }
+ Py_INCREF(text);
+ Py_DECREF(elem);
rc = PyObject_IsTrue(text);
+ if (rc > 0)
+ return text;
+ Py_DECREF(text);
if (rc < 0)
return NULL;
- if (rc) {
- Py_INCREF(text);
- return text;
- }
} else {
rc = (it->sought_tag == Py_None);
if (!rc) {
- rc = PyObject_RichCompareBool(child->tag,
+ rc = PyObject_RichCompareBool(elem->tag,
it->sought_tag, Py_EQ);
- if (rc < 0)
+ if (rc < 0) {
+ Py_DECREF(elem);
return NULL;
+ }
}
if (rc) {
- Py_INCREF(child);
- return (PyObject *)child;
+ return (PyObject *)elem;
}
+ Py_DECREF(elem);
}
}
else {
PyObject *tail;
- ParentLocator *next = it->parent_stack->next;
+ ParentLocator *next;
if (it->gettext) {
+ Py_INCREF(cur_parent);
tail = element_get_tail(cur_parent);
- if (!tail)
+ if (!tail) {
+ Py_DECREF(cur_parent);
return NULL;
+ }
+ Py_INCREF(tail);
+ Py_DECREF(cur_parent);
}
- else
+ else {
tail = Py_None;
- Py_XDECREF(it->parent_stack->parent);
+ Py_INCREF(tail);
+ }
+ next = it->parent_stack->next;
+ cur_parent = it->parent_stack->parent;
PyObject_Free(it->parent_stack);
it->parent_stack = next;
+ Py_XDECREF(cur_parent);
/* Note that extra condition on it->parent_stack->parent here;
* this is because itertext() is supposed to only return *inner*
@@ -2167,12 +2201,14 @@ elementiter_next(ElementIterObject *it)
*/
if (it->parent_stack->parent) {
rc = PyObject_IsTrue(tail);
+ if (rc > 0)
+ return tail;
+ Py_DECREF(tail);
if (rc < 0)
return NULL;
- if (rc) {
- Py_INCREF(tail);
- return tail;
- }
+ }
+ else {
+ Py_DECREF(tail);
}
}
}
@@ -2235,17 +2271,6 @@ create_elementiter(ElementObject *self, PyObject *tag, int gettext)
if (!it)
return NULL;
- if (PyUnicode_Check(tag)) {
- if (PyUnicode_READY(tag) < 0)
- return NULL;
- if (PyUnicode_GET_LENGTH(tag) == 1 && PyUnicode_READ_CHAR(tag, 0) == '*')
- tag = Py_None;
- }
- else if (PyBytes_Check(tag)) {
- if (PyBytes_GET_SIZE(tag) == 1 && *PyBytes_AS_STRING(tag) == '*')
- tag = Py_None;
- }
-
Py_INCREF(tag);
it->sought_tag = tag;
it->root_done = 0;
@@ -2330,23 +2355,24 @@ treebuilder_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
return (PyObject *)t;
}
+/*[clinic input]
+_elementtree.TreeBuilder.__init__
+
+ element_factory: object = NULL
+
+[clinic start generated code]*/
+
static int
-treebuilder_init(PyObject *self, PyObject *args, PyObject *kwds)
+_elementtree_TreeBuilder___init___impl(TreeBuilderObject *self,
+ PyObject *element_factory)
+/*[clinic end generated code: output=91cfa7558970ee96 input=1b424eeefc35249c]*/
{
- static char *kwlist[] = {"element_factory", 0};
- PyObject *element_factory = NULL;
- TreeBuilderObject *self_tb = (TreeBuilderObject *)self;
PyObject *tmp;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O:TreeBuilder", kwlist,
- &element_factory)) {
- return -1;
- }
-
if (element_factory) {
Py_INCREF(element_factory);
- tmp = self_tb->element_factory;
- self_tb->element_factory = element_factory;
+ tmp = self->element_factory;
+ self->element_factory = element_factory;
Py_XDECREF(tmp);
}
@@ -2524,13 +2550,10 @@ treebuilder_handle_start(TreeBuilderObject* self, PyObject* tag,
}
self->index++;
- Py_DECREF(this);
Py_INCREF(node);
- self->this = node;
-
- Py_DECREF(self->last);
+ Py_SETREF(self->this, node);
Py_INCREF(node);
- self->last = node;
+ Py_SETREF(self->last, node);
if (treebuilder_append_event(self, self->start_event_obj, node) < 0)
goto error;
@@ -2603,15 +2626,12 @@ treebuilder_handle_end(TreeBuilderObject* self, PyObject* tag)
return NULL;
}
- self->index--;
-
- item = PyList_GET_ITEM(self->stack, self->index);
- Py_INCREF(item);
-
- Py_DECREF(self->last);
-
+ item = self->last;
self->last = self->this;
- self->this = item;
+ self->index--;
+ self->this = PyList_GET_ITEM(self->stack, self->index);
+ Py_INCREF(self->this);
+ Py_DECREF(item);
if (treebuilder_append_event(self, self->end_event_obj, self->last) < 0)
return NULL;
@@ -2623,23 +2643,33 @@ treebuilder_handle_end(TreeBuilderObject* self, PyObject* tag)
/* -------------------------------------------------------------------- */
/* methods (in alphabetical order) */
-static PyObject*
-treebuilder_data(TreeBuilderObject* self, PyObject* args)
-{
- PyObject* data;
- if (!PyArg_ParseTuple(args, "O:data", &data))
- return NULL;
+/*[clinic input]
+_elementtree.TreeBuilder.data
+
+ data: object
+ /
+
+[clinic start generated code]*/
+static PyObject *
+_elementtree_TreeBuilder_data(TreeBuilderObject *self, PyObject *data)
+/*[clinic end generated code: output=69144c7100795bb2 input=a0540c532b284d29]*/
+{
return treebuilder_handle_data(self, data);
}
-static PyObject*
-treebuilder_end(TreeBuilderObject* self, PyObject* args)
-{
- PyObject* tag;
- if (!PyArg_ParseTuple(args, "O:end", &tag))
- return NULL;
+/*[clinic input]
+_elementtree.TreeBuilder.end
+
+ tag: object
+ /
+[clinic start generated code]*/
+
+static PyObject *
+_elementtree_TreeBuilder_end(TreeBuilderObject *self, PyObject *tag)
+/*[clinic end generated code: output=9a98727cc691cd9d input=22dc3674236f5745]*/
+{
return treebuilder_handle_end(self, tag);
}
@@ -2659,75 +2689,34 @@ treebuilder_done(TreeBuilderObject* self)
return res;
}
-static PyObject*
-treebuilder_close(TreeBuilderObject* self, PyObject* args)
-{
- if (!PyArg_ParseTuple(args, ":close"))
- return NULL;
+/*[clinic input]
+_elementtree.TreeBuilder.close
+[clinic start generated code]*/
+
+static PyObject *
+_elementtree_TreeBuilder_close_impl(TreeBuilderObject *self)
+/*[clinic end generated code: output=b441fee3202f61ee input=f7c9c65dc718de14]*/
+{
return treebuilder_done(self);
}
-static PyObject*
-treebuilder_start(TreeBuilderObject* self, PyObject* args)
-{
- PyObject* tag;
- PyObject* attrib = Py_None;
- if (!PyArg_ParseTuple(args, "O|O:start", &tag, &attrib))
- return NULL;
+/*[clinic input]
+_elementtree.TreeBuilder.start
- return treebuilder_handle_start(self, tag, attrib);
-}
+ tag: object
+ attrs: object = None
+ /
-static PyMethodDef treebuilder_methods[] = {
- {"data", (PyCFunction) treebuilder_data, METH_VARARGS},
- {"start", (PyCFunction) treebuilder_start, METH_VARARGS},
- {"end", (PyCFunction) treebuilder_end, METH_VARARGS},
- {"close", (PyCFunction) treebuilder_close, METH_VARARGS},
- {NULL, NULL}
-};
+[clinic start generated code]*/
-static PyTypeObject TreeBuilder_Type = {
- PyVarObject_HEAD_INIT(NULL, 0)
- "xml.etree.ElementTree.TreeBuilder", sizeof(TreeBuilderObject), 0,
- /* methods */
- (destructor)treebuilder_dealloc, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- 0, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC,
- /* tp_flags */
- 0, /* tp_doc */
- (traverseproc)treebuilder_gc_traverse, /* tp_traverse */
- (inquiry)treebuilder_gc_clear, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- treebuilder_methods, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- 0, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)treebuilder_init, /* tp_init */
- PyType_GenericAlloc, /* tp_alloc */
- treebuilder_new, /* tp_new */
- 0, /* tp_free */
-};
+static PyObject *
+_elementtree_TreeBuilder_start_impl(TreeBuilderObject *self, PyObject *tag,
+ PyObject *attrs)
+/*[clinic end generated code: output=e7e9dc2861349411 input=95fc1758dd042c65]*/
+{
+ return treebuilder_handle_start(self, tag, attrs);
+}
/* ==================================================================== */
/* the expat interface */
@@ -2766,7 +2755,11 @@ typedef struct {
} XMLParserObject;
-static PyObject* xmlparser_doctype(XMLParserObject* self, PyObject* args);
+static PyObject*
+_elementtree_XMLParser_doctype(XMLParserObject* self, PyObject* args);
+static PyObject *
+_elementtree_XMLParser_doctype_impl(XMLParserObject *self, PyObject *name,
+ PyObject *pubid, PyObject *system);
/* helpers */
@@ -2844,12 +2837,13 @@ makeuniversal(XMLParserObject* self, const char* string)
* message string is the default for the given error_code.
*/
static void
-expat_set_error(enum XML_Error error_code, int line, int column, char *message)
+expat_set_error(enum XML_Error error_code, Py_ssize_t line, Py_ssize_t column,
+ const char *message)
{
PyObject *errmsg, *error, *position, *code;
elementtreestate *st = ET_STATE_GLOBAL;
- errmsg = PyUnicode_FromFormat("%s: line %d, column %d",
+ errmsg = PyUnicode_FromFormat("%s: line %zd, column %zd",
message ? message : EXPAT(ErrorString)(error_code),
line, column);
if (errmsg == NULL)
@@ -2873,7 +2867,7 @@ expat_set_error(enum XML_Error error_code, int line, int column, char *message)
}
Py_DECREF(code);
- position = Py_BuildValue("(ii)", line, column);
+ position = Py_BuildValue("(nn)", line, column);
if (!position) {
Py_DECREF(error);
return;
@@ -2957,8 +2951,10 @@ expat_start_handler(XMLParserObject* self, const XML_Char* tag_in,
/* attributes */
if (attrib_in[0]) {
attrib = PyDict_New();
- if (!attrib)
+ if (!attrib) {
+ Py_DECREF(tag);
return;
+ }
while (attrib_in[0] && attrib_in[1]) {
PyObject* key = makeuniversal(self, attrib_in[0]);
PyObject* value = PyUnicode_DecodeUTF8(attrib_in[1], strlen(attrib_in[1]), "strict");
@@ -2966,6 +2962,7 @@ expat_start_handler(XMLParserObject* self, const XML_Char* tag_in,
Py_XDECREF(value);
Py_XDECREF(key);
Py_DECREF(attrib);
+ Py_DECREF(tag);
return;
}
ok = PyDict_SetItem(attrib, key, value);
@@ -2973,6 +2970,7 @@ expat_start_handler(XMLParserObject* self, const XML_Char* tag_in,
Py_DECREF(key);
if (ok < 0) {
Py_DECREF(attrib);
+ Py_DECREF(tag);
return;
}
attrib_in += 2;
@@ -2980,8 +2978,10 @@ expat_start_handler(XMLParserObject* self, const XML_Char* tag_in,
} else {
/* Pass an empty dictionary on */
attrib = PyDict_New();
- if (!attrib)
+ if (!attrib) {
+ Py_DECREF(tag);
return;
+ }
}
if (TreeBuilder_CheckExact(self->target)) {
@@ -3169,8 +3169,9 @@ expat_start_doctype_handler(XMLParserObject *self,
!(PyCFunction_Check(parser_doctype) &&
PyCFunction_GET_SELF(parser_doctype) == self_pyobj &&
PyCFunction_GET_FUNCTION(parser_doctype) ==
- (PyCFunction) xmlparser_doctype)) {
- res = xmlparser_doctype(self, NULL);
+ (PyCFunction) _elementtree_XMLParser_doctype)) {
+ res = _elementtree_XMLParser_doctype_impl(self, doctype_name_obj,
+ pubid_obj, sysid_obj);
if (!res)
goto clear;
Py_DECREF(res);
@@ -3229,33 +3230,34 @@ xmlparser_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
return (PyObject *)self;
}
-static int
-xmlparser_init(PyObject *self, PyObject *args, PyObject *kwds)
-{
- XMLParserObject *self_xp = (XMLParserObject *)self;
- PyObject *target = NULL, *html = NULL;
- char *encoding = NULL;
- static char *kwlist[] = {"html", "target", "encoding", 0};
+/*[clinic input]
+_elementtree.XMLParser.__init__
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|OOz:XMLParser", kwlist,
- &html, &target, &encoding)) {
- return -1;
- }
+ html: object = NULL
+ target: object = NULL
+ encoding: str(accept={str, NoneType}) = NULL
- self_xp->entity = PyDict_New();
- if (!self_xp->entity)
+[clinic start generated code]*/
+
+static int
+_elementtree_XMLParser___init___impl(XMLParserObject *self, PyObject *html,
+ PyObject *target, const char *encoding)
+/*[clinic end generated code: output=d6a16c63dda54441 input=155bc5695baafffd]*/
+{
+ self->entity = PyDict_New();
+ if (!self->entity)
return -1;
- self_xp->names = PyDict_New();
- if (!self_xp->names) {
- Py_CLEAR(self_xp->entity);
+ self->names = PyDict_New();
+ if (!self->names) {
+ Py_CLEAR(self->entity);
return -1;
}
- self_xp->parser = EXPAT(ParserCreate_MM)(encoding, &ExpatMemoryHandler, "}");
- if (!self_xp->parser) {
- Py_CLEAR(self_xp->entity);
- Py_CLEAR(self_xp->names);
+ self->parser = EXPAT(ParserCreate_MM)(encoding, &ExpatMemoryHandler, "}");
+ if (!self->parser) {
+ Py_CLEAR(self->entity);
+ Py_CLEAR(self->names);
PyErr_NoMemory();
return -1;
}
@@ -3265,55 +3267,55 @@ xmlparser_init(PyObject *self, PyObject *args, PyObject *kwds)
} else {
target = treebuilder_new(&TreeBuilder_Type, NULL, NULL);
if (!target) {
- Py_CLEAR(self_xp->entity);
- Py_CLEAR(self_xp->names);
- EXPAT(ParserFree)(self_xp->parser);
+ Py_CLEAR(self->entity);
+ Py_CLEAR(self->names);
+ EXPAT(ParserFree)(self->parser);
return -1;
}
}
- self_xp->target = target;
+ self->target = target;
- self_xp->handle_start = PyObject_GetAttrString(target, "start");
- self_xp->handle_data = PyObject_GetAttrString(target, "data");
- self_xp->handle_end = PyObject_GetAttrString(target, "end");
- self_xp->handle_comment = PyObject_GetAttrString(target, "comment");
- self_xp->handle_pi = PyObject_GetAttrString(target, "pi");
- self_xp->handle_close = PyObject_GetAttrString(target, "close");
- self_xp->handle_doctype = PyObject_GetAttrString(target, "doctype");
+ self->handle_start = PyObject_GetAttrString(target, "start");
+ self->handle_data = PyObject_GetAttrString(target, "data");
+ self->handle_end = PyObject_GetAttrString(target, "end");
+ self->handle_comment = PyObject_GetAttrString(target, "comment");
+ self->handle_pi = PyObject_GetAttrString(target, "pi");
+ self->handle_close = PyObject_GetAttrString(target, "close");
+ self->handle_doctype = PyObject_GetAttrString(target, "doctype");
PyErr_Clear();
/* configure parser */
- EXPAT(SetUserData)(self_xp->parser, self_xp);
+ EXPAT(SetUserData)(self->parser, self);
EXPAT(SetElementHandler)(
- self_xp->parser,
+ self->parser,
(XML_StartElementHandler) expat_start_handler,
(XML_EndElementHandler) expat_end_handler
);
EXPAT(SetDefaultHandlerExpand)(
- self_xp->parser,
+ self->parser,
(XML_DefaultHandler) expat_default_handler
);
EXPAT(SetCharacterDataHandler)(
- self_xp->parser,
+ self->parser,
(XML_CharacterDataHandler) expat_data_handler
);
- if (self_xp->handle_comment)
+ if (self->handle_comment)
EXPAT(SetCommentHandler)(
- self_xp->parser,
+ self->parser,
(XML_CommentHandler) expat_comment_handler
);
- if (self_xp->handle_pi)
+ if (self->handle_pi)
EXPAT(SetProcessingInstructionHandler)(
- self_xp->parser,
+ self->parser,
(XML_ProcessingInstructionHandler) expat_pi_handler
);
EXPAT(SetStartDoctypeDeclHandler)(
- self_xp->parser,
+ self->parser,
(XML_StartDoctypeDeclHandler) expat_start_doctype_handler
);
EXPAT(SetUnknownEncodingHandler)(
- self_xp->parser,
+ self->parser,
EXPAT(DefaultUnknownEncodingHandler), NULL
);
@@ -3389,15 +3391,18 @@ expat_parse(XMLParserObject* self, const char* data, int data_len, int final)
Py_RETURN_NONE;
}
-static PyObject*
-xmlparser_close(XMLParserObject* self, PyObject* args)
+/*[clinic input]
+_elementtree.XMLParser.close
+
+[clinic start generated code]*/
+
+static PyObject *
+_elementtree_XMLParser_close_impl(XMLParserObject *self)
+/*[clinic end generated code: output=d68d375dd23bc7fb input=ca7909ca78c3abfe]*/
{
/* end feeding data to parser */
PyObject* res;
- if (!PyArg_ParseTuple(args, ":close"))
- return NULL;
-
res = expat_parse(self, "", 0, 1);
if (!res)
return NULL;
@@ -3415,15 +3420,24 @@ xmlparser_close(XMLParserObject* self, PyObject* args)
}
}
-static PyObject*
-xmlparser_feed(XMLParserObject* self, PyObject* arg)
+/*[clinic input]
+_elementtree.XMLParser.feed
+
+ data: object
+ /
+
+[clinic start generated code]*/
+
+static PyObject *
+_elementtree_XMLParser_feed(XMLParserObject *self, PyObject *data)
+/*[clinic end generated code: output=e42b6a78eec7446d input=fe231b6b8de3ce1f]*/
{
/* feed data to parser */
- if (PyUnicode_Check(arg)) {
+ if (PyUnicode_Check(data)) {
Py_ssize_t data_len;
- const char *data = PyUnicode_AsUTF8AndSize(arg, &data_len);
- if (data == NULL)
+ const char *data_ptr = PyUnicode_AsUTF8AndSize(data, &data_len);
+ if (data_ptr == NULL)
return NULL;
if (data_len > INT_MAX) {
PyErr_SetString(PyExc_OverflowError, "size does not fit in an int");
@@ -3431,12 +3445,12 @@ xmlparser_feed(XMLParserObject* self, PyObject* arg)
}
/* Explicitly set UTF-8 encoding. Return code ignored. */
(void)EXPAT(SetEncoding)(self->parser, "utf-8");
- return expat_parse(self, data, (int)data_len, 0);
+ return expat_parse(self, data_ptr, (int)data_len, 0);
}
else {
Py_buffer view;
PyObject *res;
- if (PyObject_GetBuffer(arg, &view, PyBUF_SIMPLE) < 0)
+ if (PyObject_GetBuffer(data, &view, PyBUF_SIMPLE) < 0)
return NULL;
if (view.len > INT_MAX) {
PyBuffer_Release(&view);
@@ -3449,8 +3463,17 @@ xmlparser_feed(XMLParserObject* self, PyObject* arg)
}
}
-static PyObject*
-xmlparser_parse_whole(XMLParserObject* self, PyObject* args)
+/*[clinic input]
+_elementtree.XMLParser._parse_whole
+
+ file: object
+ /
+
+[clinic start generated code]*/
+
+static PyObject *
+_elementtree_XMLParser__parse_whole(XMLParserObject *self, PyObject *file)
+/*[clinic end generated code: output=f797197bb818dda3 input=19ecc893b6f3e752]*/
{
/* (internal) parse the whole input, until end of stream */
PyObject* reader;
@@ -3458,11 +3481,7 @@ xmlparser_parse_whole(XMLParserObject* self, PyObject* args)
PyObject* temp;
PyObject* res;
- PyObject* fileobj;
- if (!PyArg_ParseTuple(args, "O:_parse", &fileobj))
- return NULL;
-
- reader = PyObject_GetAttrString(fileobj, "read");
+ reader = PyObject_GetAttrString(file, "read");
if (!reader)
return NULL;
@@ -3529,8 +3548,20 @@ xmlparser_parse_whole(XMLParserObject* self, PyObject* args)
return res;
}
-static PyObject*
-xmlparser_doctype(XMLParserObject *self, PyObject *args)
+/*[clinic input]
+_elementtree.XMLParser.doctype
+
+ name: object
+ pubid: object
+ system: object
+ /
+
+[clinic start generated code]*/
+
+static PyObject *
+_elementtree_XMLParser_doctype_impl(XMLParserObject *self, PyObject *name,
+ PyObject *pubid, PyObject *system)
+/*[clinic end generated code: output=10fb50c2afded88d input=84050276cca045e1]*/
{
if (PyErr_WarnEx(PyExc_DeprecationWarning,
"This method of XMLParser is deprecated. Define"
@@ -3541,19 +3572,25 @@ xmlparser_doctype(XMLParserObject *self, PyObject *args)
Py_RETURN_NONE;
}
-static PyObject*
-xmlparser_setevents(XMLParserObject *self, PyObject* args)
+/*[clinic input]
+_elementtree.XMLParser._setevents
+
+ events_queue: object(subclass_of='&PyList_Type')
+ events_to_report: object = None
+ /
+
+[clinic start generated code]*/
+
+static PyObject *
+_elementtree_XMLParser__setevents_impl(XMLParserObject *self,
+ PyObject *events_queue,
+ PyObject *events_to_report)
+/*[clinic end generated code: output=1440092922b13ed1 input=59db9742910c6174]*/
{
/* activate element event reporting */
- Py_ssize_t i, seqlen;
+ Py_ssize_t i;
TreeBuilderObject *target;
-
- PyObject *events_queue;
- PyObject *events_to_report = Py_None;
PyObject *events_seq;
- if (!PyArg_ParseTuple(args, "O!|O:_setevents", &PyList_Type, &events_queue,
- &events_to_report))
- return NULL;
if (!TreeBuilder_CheckExact(self->target)) {
PyErr_SetString(
@@ -3567,8 +3604,7 @@ xmlparser_setevents(XMLParserObject *self, PyObject* args)
target = (TreeBuilderObject*) self->target;
Py_INCREF(events_queue);
- Py_XDECREF(target->events);
- target->events = events_queue;
+ Py_XSETREF(target->events, events_queue);
/* clear out existing events */
Py_CLEAR(target->start_event_obj);
@@ -3587,46 +3623,41 @@ xmlparser_setevents(XMLParserObject *self, PyObject* args)
return NULL;
}
- seqlen = PySequence_Size(events_seq);
- for (i = 0; i < seqlen; ++i) {
+ for (i = 0; i < PySequence_Size(events_seq); ++i) {
PyObject *event_name_obj = PySequence_Fast_GET_ITEM(events_seq, i);
char *event_name = NULL;
if (PyUnicode_Check(event_name_obj)) {
- event_name = _PyUnicode_AsString(event_name_obj);
+ event_name = PyUnicode_AsUTF8(event_name_obj);
} else if (PyBytes_Check(event_name_obj)) {
event_name = PyBytes_AS_STRING(event_name_obj);
}
-
if (event_name == NULL) {
Py_DECREF(events_seq);
PyErr_Format(PyExc_ValueError, "invalid events sequence");
return NULL;
- } else if (strcmp(event_name, "start") == 0) {
- Py_INCREF(event_name_obj);
- target->start_event_obj = event_name_obj;
+ }
+
+ Py_INCREF(event_name_obj);
+ if (strcmp(event_name, "start") == 0) {
+ Py_XSETREF(target->start_event_obj, event_name_obj);
} else if (strcmp(event_name, "end") == 0) {
- Py_INCREF(event_name_obj);
- Py_XDECREF(target->end_event_obj);
- target->end_event_obj = event_name_obj;
+ Py_XSETREF(target->end_event_obj, event_name_obj);
} else if (strcmp(event_name, "start-ns") == 0) {
- Py_INCREF(event_name_obj);
- Py_XDECREF(target->start_ns_event_obj);
- target->start_ns_event_obj = event_name_obj;
+ Py_XSETREF(target->start_ns_event_obj, event_name_obj);
EXPAT(SetNamespaceDeclHandler)(
self->parser,
(XML_StartNamespaceDeclHandler) expat_start_ns_handler,
(XML_EndNamespaceDeclHandler) expat_end_ns_handler
);
} else if (strcmp(event_name, "end-ns") == 0) {
- Py_INCREF(event_name_obj);
- Py_XDECREF(target->end_ns_event_obj);
- target->end_ns_event_obj = event_name_obj;
+ Py_XSETREF(target->end_ns_event_obj, event_name_obj);
EXPAT(SetNamespaceDeclHandler)(
self->parser,
(XML_StartNamespaceDeclHandler) expat_start_ns_handler,
(XML_EndNamespaceDeclHandler) expat_end_ns_handler
);
} else {
+ Py_DECREF(event_name_obj);
Py_DECREF(events_seq);
PyErr_Format(PyExc_ValueError, "unknown event '%s'", event_name);
return NULL;
@@ -3637,15 +3668,6 @@ xmlparser_setevents(XMLParserObject *self, PyObject* args)
Py_RETURN_NONE;
}
-static PyMethodDef xmlparser_methods[] = {
- {"feed", (PyCFunction) xmlparser_feed, METH_O},
- {"close", (PyCFunction) xmlparser_close, METH_VARARGS},
- {"_parse_whole", (PyCFunction) xmlparser_parse_whole, METH_VARARGS},
- {"_setevents", (PyCFunction) xmlparser_setevents, METH_VARARGS},
- {"doctype", (PyCFunction) xmlparser_doctype, METH_VARARGS},
- {NULL, NULL}
-};
-
static PyObject*
xmlparser_getattro(XMLParserObject* self, PyObject* nameobj)
{
@@ -3670,6 +3692,152 @@ xmlparser_getattro(XMLParserObject* self, PyObject* nameobj)
return PyObject_GenericGetAttr((PyObject*) self, nameobj);
}
+#include "clinic/_elementtree.c.h"
+
+static PyMethodDef element_methods[] = {
+
+ _ELEMENTTREE_ELEMENT_CLEAR_METHODDEF
+
+ _ELEMENTTREE_ELEMENT_GET_METHODDEF
+ _ELEMENTTREE_ELEMENT_SET_METHODDEF
+
+ _ELEMENTTREE_ELEMENT_FIND_METHODDEF
+ _ELEMENTTREE_ELEMENT_FINDTEXT_METHODDEF
+ _ELEMENTTREE_ELEMENT_FINDALL_METHODDEF
+
+ _ELEMENTTREE_ELEMENT_APPEND_METHODDEF
+ _ELEMENTTREE_ELEMENT_EXTEND_METHODDEF
+ _ELEMENTTREE_ELEMENT_INSERT_METHODDEF
+ _ELEMENTTREE_ELEMENT_REMOVE_METHODDEF
+
+ _ELEMENTTREE_ELEMENT_ITER_METHODDEF
+ _ELEMENTTREE_ELEMENT_ITERTEXT_METHODDEF
+ _ELEMENTTREE_ELEMENT_ITERFIND_METHODDEF
+
+ {"getiterator", (PyCFunction)_elementtree_Element_iter, METH_VARARGS|METH_KEYWORDS, _elementtree_Element_iter__doc__},
+ _ELEMENTTREE_ELEMENT_GETCHILDREN_METHODDEF
+
+ _ELEMENTTREE_ELEMENT_ITEMS_METHODDEF
+ _ELEMENTTREE_ELEMENT_KEYS_METHODDEF
+
+ _ELEMENTTREE_ELEMENT_MAKEELEMENT_METHODDEF
+
+ _ELEMENTTREE_ELEMENT___COPY___METHODDEF
+ _ELEMENTTREE_ELEMENT___DEEPCOPY___METHODDEF
+ _ELEMENTTREE_ELEMENT___SIZEOF___METHODDEF
+ _ELEMENTTREE_ELEMENT___GETSTATE___METHODDEF
+ _ELEMENTTREE_ELEMENT___SETSTATE___METHODDEF
+
+ {NULL, NULL}
+};
+
+static PyMappingMethods element_as_mapping = {
+ (lenfunc) element_length,
+ (binaryfunc) element_subscr,
+ (objobjargproc) element_ass_subscr,
+};
+
+static PyTypeObject Element_Type = {
+ PyVarObject_HEAD_INIT(NULL, 0)
+ "xml.etree.ElementTree.Element", sizeof(ElementObject), 0,
+ /* methods */
+ (destructor)element_dealloc, /* tp_dealloc */
+ 0, /* tp_print */
+ 0, /* tp_getattr */
+ 0, /* tp_setattr */
+ 0, /* tp_reserved */
+ (reprfunc)element_repr, /* tp_repr */
+ 0, /* tp_as_number */
+ &element_as_sequence, /* tp_as_sequence */
+ &element_as_mapping, /* tp_as_mapping */
+ 0, /* tp_hash */
+ 0, /* tp_call */
+ 0, /* tp_str */
+ (getattrofunc)element_getattro, /* tp_getattro */
+ (setattrofunc)element_setattro, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC,
+ /* tp_flags */
+ 0, /* tp_doc */
+ (traverseproc)element_gc_traverse, /* tp_traverse */
+ (inquiry)element_gc_clear, /* tp_clear */
+ 0, /* tp_richcompare */
+ offsetof(ElementObject, weakreflist), /* tp_weaklistoffset */
+ 0, /* tp_iter */
+ 0, /* tp_iternext */
+ element_methods, /* tp_methods */
+ 0, /* tp_members */
+ 0, /* tp_getset */
+ 0, /* tp_base */
+ 0, /* tp_dict */
+ 0, /* tp_descr_get */
+ 0, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)element_init, /* tp_init */
+ PyType_GenericAlloc, /* tp_alloc */
+ element_new, /* tp_new */
+ 0, /* tp_free */
+};
+
+static PyMethodDef treebuilder_methods[] = {
+ _ELEMENTTREE_TREEBUILDER_DATA_METHODDEF
+ _ELEMENTTREE_TREEBUILDER_START_METHODDEF
+ _ELEMENTTREE_TREEBUILDER_END_METHODDEF
+ _ELEMENTTREE_TREEBUILDER_CLOSE_METHODDEF
+ {NULL, NULL}
+};
+
+static PyTypeObject TreeBuilder_Type = {
+ PyVarObject_HEAD_INIT(NULL, 0)
+ "xml.etree.ElementTree.TreeBuilder", sizeof(TreeBuilderObject), 0,
+ /* methods */
+ (destructor)treebuilder_dealloc, /* tp_dealloc */
+ 0, /* tp_print */
+ 0, /* tp_getattr */
+ 0, /* tp_setattr */
+ 0, /* tp_reserved */
+ 0, /* tp_repr */
+ 0, /* tp_as_number */
+ 0, /* tp_as_sequence */
+ 0, /* tp_as_mapping */
+ 0, /* tp_hash */
+ 0, /* tp_call */
+ 0, /* tp_str */
+ 0, /* tp_getattro */
+ 0, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC,
+ /* tp_flags */
+ 0, /* tp_doc */
+ (traverseproc)treebuilder_gc_traverse, /* tp_traverse */
+ (inquiry)treebuilder_gc_clear, /* tp_clear */
+ 0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ 0, /* tp_iter */
+ 0, /* tp_iternext */
+ treebuilder_methods, /* tp_methods */
+ 0, /* tp_members */
+ 0, /* tp_getset */
+ 0, /* tp_base */
+ 0, /* tp_dict */
+ 0, /* tp_descr_get */
+ 0, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ _elementtree_TreeBuilder___init__, /* tp_init */
+ PyType_GenericAlloc, /* tp_alloc */
+ treebuilder_new, /* tp_new */
+ 0, /* tp_free */
+};
+
+static PyMethodDef xmlparser_methods[] = {
+ _ELEMENTTREE_XMLPARSER_FEED_METHODDEF
+ _ELEMENTTREE_XMLPARSER_CLOSE_METHODDEF
+ _ELEMENTTREE_XMLPARSER__PARSE_WHOLE_METHODDEF
+ _ELEMENTTREE_XMLPARSER__SETEVENTS_METHODDEF
+ _ELEMENTTREE_XMLPARSER_DOCTYPE_METHODDEF
+ {NULL, NULL}
+};
+
static PyTypeObject XMLParser_Type = {
PyVarObject_HEAD_INIT(NULL, 0)
"xml.etree.ElementTree.XMLParser", sizeof(XMLParserObject), 0,
@@ -3706,7 +3874,7 @@ static PyTypeObject XMLParser_Type = {
0, /* tp_descr_get */
0, /* tp_descr_set */
0, /* tp_dictoffset */
- (initproc)xmlparser_init, /* tp_init */
+ _elementtree_XMLParser___init__, /* tp_init */
PyType_GenericAlloc, /* tp_alloc */
xmlparser_new, /* tp_new */
0, /* tp_free */
@@ -3773,7 +3941,7 @@ PyInit__elementtree(void)
if (expat_capi) {
/* check that it's usable */
if (strcmp(expat_capi->magic, PyExpat_CAPI_MAGIC) != 0 ||
- expat_capi->size < sizeof(struct PyExpat_CAPI) ||
+ (size_t)expat_capi->size < sizeof(struct PyExpat_CAPI) ||
expat_capi->MAJOR_VERSION != XML_MAJOR_VERSION ||
expat_capi->MINOR_VERSION != XML_MINOR_VERSION ||
expat_capi->MICRO_VERSION != XML_MICRO_VERSION) {
diff --git a/Modules/_functoolsmodule.c b/Modules/_functoolsmodule.c
index 24da67741b..1aa457162d 100644
--- a/Modules/_functoolsmodule.c
+++ b/Modules/_functoolsmodule.c
@@ -25,7 +25,7 @@ static PyTypeObject partial_type;
static PyObject *
partial_new(PyTypeObject *type, PyObject *args, PyObject *kw)
{
- PyObject *func;
+ PyObject *func, *pargs, *nargs, *pkw;
partialobject *pto;
if (PyTuple_GET_SIZE(args) < 1) {
@@ -34,7 +34,18 @@ partial_new(PyTypeObject *type, PyObject *args, PyObject *kw)
return NULL;
}
+ pargs = pkw = NULL;
func = PyTuple_GET_ITEM(args, 0);
+ if (Py_TYPE(func) == &partial_type && type == &partial_type) {
+ partialobject *part = (partialobject *)func;
+ if (part->dict == NULL) {
+ pargs = part->args;
+ pkw = part->kw;
+ func = part->fn;
+ assert(PyTuple_Check(pargs));
+ assert(PyDict_Check(pkw));
+ }
+ }
if (!PyCallable_Check(func)) {
PyErr_SetString(PyExc_TypeError,
"the first argument must be callable");
@@ -48,22 +59,54 @@ partial_new(PyTypeObject *type, PyObject *args, PyObject *kw)
pto->fn = func;
Py_INCREF(func);
- pto->args = PyTuple_GetSlice(args, 1, PY_SSIZE_T_MAX);
- if (pto->args == NULL) {
- pto->kw = NULL;
+
+ nargs = PyTuple_GetSlice(args, 1, PY_SSIZE_T_MAX);
+ if (nargs == NULL) {
Py_DECREF(pto);
return NULL;
}
- pto->kw = (kw != NULL) ? PyDict_Copy(kw) : PyDict_New();
+ if (pargs == NULL || PyTuple_GET_SIZE(pargs) == 0) {
+ pto->args = nargs;
+ Py_INCREF(nargs);
+ }
+ else if (PyTuple_GET_SIZE(nargs) == 0) {
+ pto->args = pargs;
+ Py_INCREF(pargs);
+ }
+ else {
+ pto->args = PySequence_Concat(pargs, nargs);
+ if (pto->args == NULL) {
+ Py_DECREF(nargs);
+ Py_DECREF(pto);
+ return NULL;
+ }
+ assert(PyTuple_Check(pto->args));
+ }
+ Py_DECREF(nargs);
+
+ if (pkw == NULL || PyDict_Size(pkw) == 0) {
+ if (kw == NULL) {
+ pto->kw = PyDict_New();
+ }
+ else {
+ Py_INCREF(kw);
+ pto->kw = kw;
+ }
+ }
+ else {
+ pto->kw = PyDict_Copy(pkw);
+ if (kw != NULL && pto->kw != NULL) {
+ if (PyDict_Merge(pto->kw, kw, 1) != 0) {
+ Py_DECREF(pto);
+ return NULL;
+ }
+ }
+ }
if (pto->kw == NULL) {
Py_DECREF(pto);
return NULL;
}
-
- pto->weakreflist = NULL;
- pto->dict = NULL;
-
return (PyObject *)pto;
}
@@ -84,11 +127,11 @@ static PyObject *
partial_call(partialobject *pto, PyObject *args, PyObject *kw)
{
PyObject *ret;
- PyObject *argappl = NULL, *kwappl = NULL;
+ PyObject *argappl, *kwappl;
assert (PyCallable_Check(pto->fn));
assert (PyTuple_Check(pto->args));
- assert (pto->kw == Py_None || PyDict_Check(pto->kw));
+ assert (PyDict_Check(pto->kw));
if (PyTuple_GET_SIZE(pto->args) == 0) {
argappl = args;
@@ -100,11 +143,12 @@ partial_call(partialobject *pto, PyObject *args, PyObject *kw)
argappl = PySequence_Concat(pto->args, args);
if (argappl == NULL)
return NULL;
+ assert(PyTuple_Check(argappl));
}
- if (pto->kw == Py_None) {
+ if (PyDict_Size(pto->kw) == 0) {
kwappl = kw;
- Py_XINCREF(kw);
+ Py_XINCREF(kwappl);
} else {
kwappl = PyDict_Copy(pto->kw);
if (kwappl == NULL) {
@@ -163,6 +207,7 @@ partial_repr(partialobject *pto)
PyObject *arglist;
PyObject *tmp;
Py_ssize_t i, n;
+ PyObject *key, *value;
arglist = PyUnicode_FromString("");
if (arglist == NULL) {
@@ -180,17 +225,14 @@ partial_repr(partialobject *pto)
arglist = tmp;
}
/* Pack keyword arguments */
- assert (pto->kw == Py_None || PyDict_Check(pto->kw));
- if (pto->kw != Py_None) {
- PyObject *key, *value;
- for (i = 0; PyDict_Next(pto->kw, &i, &key, &value);) {
- tmp = PyUnicode_FromFormat("%U, %U=%R", arglist,
- key, value);
- Py_DECREF(arglist);
- if (tmp == NULL)
- return NULL;
- arglist = tmp;
- }
+ assert (PyDict_Check(pto->kw));
+ for (i = 0; PyDict_Next(pto->kw, &i, &key, &value);) {
+ tmp = PyUnicode_FromFormat("%U, %U=%R", arglist,
+ key, value);
+ Py_DECREF(arglist);
+ if (tmp == NULL)
+ return NULL;
+ arglist = tmp;
}
result = PyUnicode_FromFormat("%s(%R%U)", Py_TYPE(pto)->tp_name,
pto->fn, arglist);
@@ -217,25 +259,45 @@ static PyObject *
partial_setstate(partialobject *pto, PyObject *state)
{
PyObject *fn, *fnargs, *kw, *dict;
- if (!PyArg_ParseTuple(state, "OOOO",
- &fn, &fnargs, &kw, &dict))
+
+ if (!PyTuple_Check(state) ||
+ !PyArg_ParseTuple(state, "OOOO", &fn, &fnargs, &kw, &dict) ||
+ !PyCallable_Check(fn) ||
+ !PyTuple_Check(fnargs) ||
+ (kw != Py_None && !PyDict_Check(kw)))
+ {
+ PyErr_SetString(PyExc_TypeError, "invalid partial state");
+ return NULL;
+ }
+
+ if(!PyTuple_CheckExact(fnargs))
+ fnargs = PySequence_Tuple(fnargs);
+ else
+ Py_INCREF(fnargs);
+ if (fnargs == NULL)
+ return NULL;
+
+ if (kw == Py_None)
+ kw = PyDict_New();
+ else if(!PyDict_CheckExact(kw))
+ kw = PyDict_Copy(kw);
+ else
+ Py_INCREF(kw);
+ if (kw == NULL) {
+ Py_DECREF(fnargs);
return NULL;
- Py_XDECREF(pto->fn);
- Py_XDECREF(pto->args);
- Py_XDECREF(pto->kw);
- Py_XDECREF(pto->dict);
- pto->fn = fn;
- pto->args = fnargs;
- pto->kw = kw;
- if (dict != Py_None) {
- pto->dict = dict;
- Py_INCREF(dict);
- } else {
- pto->dict = NULL;
}
+
Py_INCREF(fn);
- Py_INCREF(fnargs);
- Py_INCREF(kw);
+ if (dict == Py_None)
+ dict = NULL;
+ else
+ Py_INCREF(dict);
+
+ Py_SETREF(pto->fn, fn);
+ Py_SETREF(pto->args, fnargs);
+ Py_SETREF(pto->kw, kw);
+ Py_XSETREF(pto->dict, dict);
Py_RETURN_NONE;
}
@@ -536,6 +598,587 @@ For example, reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) calculates\n\
of the sequence in the calculation, and serves as a default when the\n\
sequence is empty.");
+/* lru_cache object **********************************************************/
+
+/* this object is used delimit args and keywords in the cache keys */
+static PyObject *kwd_mark = NULL;
+
+struct lru_list_elem;
+struct lru_cache_object;
+
+typedef struct lru_list_elem {
+ PyObject_HEAD
+ struct lru_list_elem *prev, *next; /* borrowed links */
+ Py_hash_t hash;
+ PyObject *key, *result;
+} lru_list_elem;
+
+static void
+lru_list_elem_dealloc(lru_list_elem *link)
+{
+ _PyObject_GC_UNTRACK(link);
+ Py_XDECREF(link->key);
+ Py_XDECREF(link->result);
+ PyObject_GC_Del(link);
+}
+
+static int
+lru_list_elem_traverse(lru_list_elem *link, visitproc visit, void *arg)
+{
+ Py_VISIT(link->key);
+ Py_VISIT(link->result);
+ return 0;
+}
+
+static int
+lru_list_elem_clear(lru_list_elem *link)
+{
+ Py_CLEAR(link->key);
+ Py_CLEAR(link->result);
+ return 0;
+}
+
+static PyTypeObject lru_list_elem_type = {
+ PyVarObject_HEAD_INIT(&PyType_Type, 0)
+ "functools._lru_list_elem", /* tp_name */
+ sizeof(lru_list_elem), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ /* methods */
+ (destructor)lru_list_elem_dealloc, /* tp_dealloc */
+ 0, /* tp_print */
+ 0, /* tp_getattr */
+ 0, /* tp_setattr */
+ 0, /* tp_reserved */
+ 0, /* tp_repr */
+ 0, /* tp_as_number */
+ 0, /* tp_as_sequence */
+ 0, /* tp_as_mapping */
+ 0, /* tp_hash */
+ 0, /* tp_call */
+ 0, /* tp_str */
+ 0, /* tp_getattro */
+ 0, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */
+ 0, /* tp_doc */
+ (traverseproc)lru_list_elem_traverse, /* tp_traverse */
+ (inquiry)lru_list_elem_clear, /* tp_clear */
+};
+
+
+typedef PyObject *(*lru_cache_ternaryfunc)(struct lru_cache_object *, PyObject *, PyObject *);
+
+typedef struct lru_cache_object {
+ lru_list_elem root; /* includes PyObject_HEAD */
+ Py_ssize_t maxsize;
+ PyObject *maxsize_O;
+ PyObject *func;
+ lru_cache_ternaryfunc wrapper;
+ PyObject *cache;
+ PyObject *cache_info_type;
+ Py_ssize_t misses, hits;
+ int typed;
+ PyObject *dict;
+ int full;
+} lru_cache_object;
+
+static PyTypeObject lru_cache_type;
+
+static PyObject *
+lru_cache_make_key(PyObject *args, PyObject *kwds, int typed)
+{
+ PyObject *key, *sorted_items;
+ Py_ssize_t key_size, pos, key_pos;
+
+ /* short path, key will match args anyway, which is a tuple */
+ if (!typed && !kwds) {
+ Py_INCREF(args);
+ return args;
+ }
+
+ if (kwds && PyDict_Size(kwds) > 0) {
+ sorted_items = PyDict_Items(kwds);
+ if (!sorted_items)
+ return NULL;
+ if (PyList_Sort(sorted_items) < 0) {
+ Py_DECREF(sorted_items);
+ return NULL;
+ }
+ } else
+ sorted_items = NULL;
+
+ key_size = PyTuple_GET_SIZE(args);
+ if (sorted_items)
+ key_size += PyList_GET_SIZE(sorted_items);
+ if (typed)
+ key_size *= 2;
+ if (sorted_items)
+ key_size++;
+
+ key = PyTuple_New(key_size);
+ if (key == NULL)
+ goto done;
+
+ key_pos = 0;
+ for (pos = 0; pos < PyTuple_GET_SIZE(args); ++pos) {
+ PyObject *item = PyTuple_GET_ITEM(args, pos);
+ Py_INCREF(item);
+ PyTuple_SET_ITEM(key, key_pos++, item);
+ }
+ if (sorted_items) {
+ Py_INCREF(kwd_mark);
+ PyTuple_SET_ITEM(key, key_pos++, kwd_mark);
+ for (pos = 0; pos < PyList_GET_SIZE(sorted_items); ++pos) {
+ PyObject *item = PyList_GET_ITEM(sorted_items, pos);
+ Py_INCREF(item);
+ PyTuple_SET_ITEM(key, key_pos++, item);
+ }
+ }
+ if (typed) {
+ for (pos = 0; pos < PyTuple_GET_SIZE(args); ++pos) {
+ PyObject *item = (PyObject *)Py_TYPE(PyTuple_GET_ITEM(args, pos));
+ Py_INCREF(item);
+ PyTuple_SET_ITEM(key, key_pos++, item);
+ }
+ if (sorted_items) {
+ for (pos = 0; pos < PyList_GET_SIZE(sorted_items); ++pos) {
+ PyObject *tp_items = PyList_GET_ITEM(sorted_items, pos);
+ PyObject *item = (PyObject *)Py_TYPE(PyTuple_GET_ITEM(tp_items, 1));
+ Py_INCREF(item);
+ PyTuple_SET_ITEM(key, key_pos++, item);
+ }
+ }
+ }
+ assert(key_pos == key_size);
+
+done:
+ if (sorted_items)
+ Py_DECREF(sorted_items);
+ return key;
+}
+
+static PyObject *
+uncached_lru_cache_wrapper(lru_cache_object *self, PyObject *args, PyObject *kwds)
+{
+ PyObject *result = PyObject_Call(self->func, args, kwds);
+ if (!result)
+ return NULL;
+ self->misses++;
+ return result;
+}
+
+static PyObject *
+infinite_lru_cache_wrapper(lru_cache_object *self, PyObject *args, PyObject *kwds)
+{
+ PyObject *result;
+ Py_hash_t hash;
+ PyObject *key = lru_cache_make_key(args, kwds, self->typed);
+ if (!key)
+ return NULL;
+ hash = PyObject_Hash(key);
+ if (hash == -1)
+ return NULL;
+ result = _PyDict_GetItem_KnownHash(self->cache, key, hash);
+ if (result) {
+ Py_INCREF(result);
+ self->hits++;
+ Py_DECREF(key);
+ return result;
+ }
+ if (PyErr_Occurred()) {
+ Py_DECREF(key);
+ return NULL;
+ }
+ result = PyObject_Call(self->func, args, kwds);
+ if (!result) {
+ Py_DECREF(key);
+ return NULL;
+ }
+ if (_PyDict_SetItem_KnownHash(self->cache, key, result, hash) < 0) {
+ Py_DECREF(result);
+ Py_DECREF(key);
+ return NULL;
+ }
+ Py_DECREF(key);
+ self->misses++;
+ return result;
+}
+
+static void
+lru_cache_extricate_link(lru_list_elem *link)
+{
+ link->prev->next = link->next;
+ link->next->prev = link->prev;
+}
+
+static void
+lru_cache_append_link(lru_cache_object *self, lru_list_elem *link)
+{
+ lru_list_elem *root = &self->root;
+ lru_list_elem *last = root->prev;
+ last->next = root->prev = link;
+ link->prev = last;
+ link->next = root;
+}
+
+static PyObject *
+bounded_lru_cache_wrapper(lru_cache_object *self, PyObject *args, PyObject *kwds)
+{
+ lru_list_elem *link;
+ PyObject *key, *result;
+ Py_hash_t hash;
+
+ key = lru_cache_make_key(args, kwds, self->typed);
+ if (!key)
+ return NULL;
+ hash = PyObject_Hash(key);
+ if (hash == -1)
+ return NULL;
+ link = (lru_list_elem *)_PyDict_GetItem_KnownHash(self->cache, key, hash);
+ if (link) {
+ lru_cache_extricate_link(link);
+ lru_cache_append_link(self, link);
+ self->hits++;
+ result = link->result;
+ Py_INCREF(result);
+ Py_DECREF(key);
+ return result;
+ }
+ if (PyErr_Occurred()) {
+ Py_DECREF(key);
+ return NULL;
+ }
+ result = PyObject_Call(self->func, args, kwds);
+ if (!result) {
+ Py_DECREF(key);
+ return NULL;
+ }
+ if (self->full && self->root.next != &self->root) {
+ /* Use the oldest item to store the new key and result. */
+ PyObject *oldkey, *oldresult;
+ /* Extricate the oldest item. */
+ link = self->root.next;
+ lru_cache_extricate_link(link);
+ /* Remove it from the cache.
+ The cache dict holds one reference to the link,
+ and the linked list holds yet one reference to it. */
+ if (_PyDict_DelItem_KnownHash(self->cache, link->key,
+ link->hash) < 0) {
+ lru_cache_append_link(self, link);
+ Py_DECREF(key);
+ Py_DECREF(result);
+ return NULL;
+ }
+ /* Keep a reference to the old key and old result to
+ prevent their ref counts from going to zero during the
+ update. That will prevent potentially arbitrary object
+ clean-up code (i.e. __del__) from running while we're
+ still adjusting the links. */
+ oldkey = link->key;
+ oldresult = link->result;
+
+ link->hash = hash;
+ link->key = key;
+ link->result = result;
+ if (_PyDict_SetItem_KnownHash(self->cache, key, (PyObject *)link,
+ hash) < 0) {
+ Py_DECREF(link);
+ Py_DECREF(oldkey);
+ Py_DECREF(oldresult);
+ return NULL;
+ }
+ lru_cache_append_link(self, link);
+ Py_INCREF(result); /* for return */
+ Py_DECREF(oldkey);
+ Py_DECREF(oldresult);
+ } else {
+ /* Put result in a new link at the front of the queue. */
+ link = (lru_list_elem *)PyObject_GC_New(lru_list_elem,
+ &lru_list_elem_type);
+ if (link == NULL) {
+ Py_DECREF(key);
+ Py_DECREF(result);
+ return NULL;
+ }
+
+ link->hash = hash;
+ link->key = key;
+ link->result = result;
+ _PyObject_GC_TRACK(link);
+ if (_PyDict_SetItem_KnownHash(self->cache, key, (PyObject *)link,
+ hash) < 0) {
+ Py_DECREF(link);
+ return NULL;
+ }
+ lru_cache_append_link(self, link);
+ Py_INCREF(result); /* for return */
+ self->full = (PyDict_Size(self->cache) >= self->maxsize);
+ }
+ self->misses++;
+ return result;
+}
+
+static PyObject *
+lru_cache_new(PyTypeObject *type, PyObject *args, PyObject *kw)
+{
+ PyObject *func, *maxsize_O, *cache_info_type, *cachedict;
+ int typed;
+ lru_cache_object *obj;
+ Py_ssize_t maxsize;
+ PyObject *(*wrapper)(lru_cache_object *, PyObject *, PyObject *);
+ static char *keywords[] = {"user_function", "maxsize", "typed",
+ "cache_info_type", NULL};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kw, "OOpO:lru_cache", keywords,
+ &func, &maxsize_O, &typed,
+ &cache_info_type)) {
+ return NULL;
+ }
+
+ if (!PyCallable_Check(func)) {
+ PyErr_SetString(PyExc_TypeError,
+ "the first argument must be callable");
+ return NULL;
+ }
+
+ /* select the caching function, and make/inc maxsize_O */
+ if (maxsize_O == Py_None) {
+ wrapper = infinite_lru_cache_wrapper;
+ /* use this only to initialize lru_cache_object attribute maxsize */
+ maxsize = -1;
+ } else if (PyIndex_Check(maxsize_O)) {
+ maxsize = PyNumber_AsSsize_t(maxsize_O, PyExc_OverflowError);
+ if (maxsize == -1 && PyErr_Occurred())
+ return NULL;
+ if (maxsize == 0)
+ wrapper = uncached_lru_cache_wrapper;
+ else
+ wrapper = bounded_lru_cache_wrapper;
+ } else {
+ PyErr_SetString(PyExc_TypeError, "maxsize should be integer or None");
+ return NULL;
+ }
+
+ if (!(cachedict = PyDict_New()))
+ return NULL;
+
+ obj = (lru_cache_object *)type->tp_alloc(type, 0);
+ if (obj == NULL) {
+ Py_DECREF(cachedict);
+ return NULL;
+ }
+
+ obj->cache = cachedict;
+ obj->root.prev = &obj->root;
+ obj->root.next = &obj->root;
+ obj->maxsize = maxsize;
+ Py_INCREF(maxsize_O);
+ obj->maxsize_O = maxsize_O;
+ Py_INCREF(func);
+ obj->func = func;
+ obj->wrapper = wrapper;
+ obj->misses = obj->hits = 0;
+ obj->typed = typed;
+ Py_INCREF(cache_info_type);
+ obj->cache_info_type = cache_info_type;
+
+ return (PyObject *)obj;
+}
+
+static lru_list_elem *
+lru_cache_unlink_list(lru_cache_object *self)
+{
+ lru_list_elem *root = &self->root;
+ lru_list_elem *link = root->next;
+ if (link == root)
+ return NULL;
+ root->prev->next = NULL;
+ root->next = root->prev = root;
+ return link;
+}
+
+static void
+lru_cache_clear_list(lru_list_elem *link)
+{
+ while (link != NULL) {
+ lru_list_elem *next = link->next;
+ Py_DECREF(link);
+ link = next;
+ }
+}
+
+static void
+lru_cache_dealloc(lru_cache_object *obj)
+{
+ lru_list_elem *list = lru_cache_unlink_list(obj);
+ Py_XDECREF(obj->maxsize_O);
+ Py_XDECREF(obj->func);
+ Py_XDECREF(obj->cache);
+ Py_XDECREF(obj->dict);
+ Py_XDECREF(obj->cache_info_type);
+ lru_cache_clear_list(list);
+ Py_TYPE(obj)->tp_free(obj);
+}
+
+static PyObject *
+lru_cache_call(lru_cache_object *self, PyObject *args, PyObject *kwds)
+{
+ return self->wrapper(self, args, kwds);
+}
+
+static PyObject *
+lru_cache_descr_get(PyObject *self, PyObject *obj, PyObject *type)
+{
+ if (obj == Py_None || obj == NULL) {
+ Py_INCREF(self);
+ return self;
+ }
+ return PyMethod_New(self, obj);
+}
+
+static PyObject *
+lru_cache_cache_info(lru_cache_object *self, PyObject *unused)
+{
+ return PyObject_CallFunction(self->cache_info_type, "nnOn",
+ self->hits, self->misses, self->maxsize_O,
+ PyDict_Size(self->cache));
+}
+
+static PyObject *
+lru_cache_cache_clear(lru_cache_object *self, PyObject *unused)
+{
+ lru_list_elem *list = lru_cache_unlink_list(self);
+ self->hits = self->misses = 0;
+ self->full = 0;
+ PyDict_Clear(self->cache);
+ lru_cache_clear_list(list);
+ Py_RETURN_NONE;
+}
+
+static PyObject *
+lru_cache_reduce(PyObject *self, PyObject *unused)
+{
+ return PyObject_GetAttrString(self, "__qualname__");
+}
+
+static PyObject *
+lru_cache_copy(PyObject *self, PyObject *unused)
+{
+ Py_INCREF(self);
+ return self;
+}
+
+static PyObject *
+lru_cache_deepcopy(PyObject *self, PyObject *unused)
+{
+ Py_INCREF(self);
+ return self;
+}
+
+static int
+lru_cache_tp_traverse(lru_cache_object *self, visitproc visit, void *arg)
+{
+ lru_list_elem *link = self->root.next;
+ while (link != &self->root) {
+ lru_list_elem *next = link->next;
+ Py_VISIT(link);
+ link = next;
+ }
+ Py_VISIT(self->maxsize_O);
+ Py_VISIT(self->func);
+ Py_VISIT(self->cache);
+ Py_VISIT(self->cache_info_type);
+ Py_VISIT(self->dict);
+ return 0;
+}
+
+static int
+lru_cache_tp_clear(lru_cache_object *self)
+{
+ lru_list_elem *list = lru_cache_unlink_list(self);
+ Py_CLEAR(self->maxsize_O);
+ Py_CLEAR(self->func);
+ Py_CLEAR(self->cache);
+ Py_CLEAR(self->cache_info_type);
+ Py_CLEAR(self->dict);
+ lru_cache_clear_list(list);
+ return 0;
+}
+
+
+PyDoc_STRVAR(lru_cache_doc,
+"Create a cached callable that wraps another function.\n\
+\n\
+user_function: the function being cached\n\
+\n\
+maxsize: 0 for no caching\n\
+ None for unlimited cache size\n\
+ n for a bounded cache\n\
+\n\
+typed: False cache f(3) and f(3.0) as identical calls\n\
+ True cache f(3) and f(3.0) as distinct calls\n\
+\n\
+cache_info_type: namedtuple class with the fields:\n\
+ hits misses currsize maxsize\n"
+);
+
+static PyMethodDef lru_cache_methods[] = {
+ {"cache_info", (PyCFunction)lru_cache_cache_info, METH_NOARGS},
+ {"cache_clear", (PyCFunction)lru_cache_cache_clear, METH_NOARGS},
+ {"__reduce__", (PyCFunction)lru_cache_reduce, METH_NOARGS},
+ {"__copy__", (PyCFunction)lru_cache_copy, METH_VARARGS},
+ {"__deepcopy__", (PyCFunction)lru_cache_deepcopy, METH_VARARGS},
+ {NULL}
+};
+
+static PyGetSetDef lru_cache_getsetlist[] = {
+ {"__dict__", PyObject_GenericGetDict, PyObject_GenericSetDict},
+ {NULL}
+};
+
+static PyTypeObject lru_cache_type = {
+ PyVarObject_HEAD_INIT(NULL, 0)
+ "functools._lru_cache_wrapper", /* tp_name */
+ sizeof(lru_cache_object), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ /* methods */
+ (destructor)lru_cache_dealloc, /* tp_dealloc */
+ 0, /* tp_print */
+ 0, /* tp_getattr */
+ 0, /* tp_setattr */
+ 0, /* tp_reserved */
+ 0, /* tp_repr */
+ 0, /* tp_as_number */
+ 0, /* tp_as_sequence */
+ 0, /* tp_as_mapping */
+ 0, /* tp_hash */
+ (ternaryfunc)lru_cache_call, /* tp_call */
+ 0, /* tp_str */
+ 0, /* tp_getattro */
+ 0, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
+ /* tp_flags */
+ lru_cache_doc, /* tp_doc */
+ (traverseproc)lru_cache_tp_traverse,/* tp_traverse */
+ (inquiry)lru_cache_tp_clear, /* tp_clear */
+ 0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ 0, /* tp_iter */
+ 0, /* tp_iternext */
+ lru_cache_methods, /* tp_methods */
+ 0, /* tp_members */
+ lru_cache_getsetlist, /* tp_getset */
+ 0, /* tp_base */
+ 0, /* tp_dict */
+ lru_cache_descr_get, /* tp_descr_get */
+ 0, /* tp_descr_set */
+ offsetof(lru_cache_object, dict), /* tp_dictoffset */
+ 0, /* tp_init */
+ 0, /* tp_alloc */
+ lru_cache_new, /* tp_new */
+};
+
/* module level code ********************************************************/
PyDoc_STRVAR(module_doc,
@@ -548,6 +1191,11 @@ static PyMethodDef module_methods[] = {
{NULL, NULL} /* sentinel */
};
+static void
+module_free(void *m)
+{
+ Py_CLEAR(kwd_mark);
+}
static struct PyModuleDef _functoolsmodule = {
PyModuleDef_HEAD_INIT,
@@ -558,7 +1206,7 @@ static struct PyModuleDef _functoolsmodule = {
NULL,
NULL,
NULL,
- NULL
+ module_free,
};
PyMODINIT_FUNC
@@ -569,6 +1217,7 @@ PyInit__functools(void)
char *name;
PyTypeObject *typelist[] = {
&partial_type,
+ &lru_cache_type,
NULL
};
@@ -576,6 +1225,12 @@ PyInit__functools(void)
if (m == NULL)
return NULL;
+ kwd_mark = PyObject_CallObject((PyObject *)&PyBaseObject_Type, NULL);
+ if (!kwd_mark) {
+ Py_DECREF(m);
+ return NULL;
+ }
+
for (i=0 ; typelist[i] != NULL ; i++) {
if (PyType_Ready(typelist[i]) < 0) {
Py_DECREF(m);
diff --git a/Modules/_gdbmmodule.c b/Modules/_gdbmmodule.c
index 229e16e627..f070a14007 100644
--- a/Modules/_gdbmmodule.c
+++ b/Modules/_gdbmmodule.c
@@ -16,17 +16,23 @@
extern const char * gdbm_strerror(gdbm_error);
#endif
+/*[clinic input]
+module _gdbm
+class _gdbm.gdbm "dbmobject *" "&Dbmtype"
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=113927c6170729b2]*/
+
PyDoc_STRVAR(gdbmmodule__doc__,
"This module provides an interface to the GNU DBM (GDBM) library.\n\
\n\
This module is quite similar to the dbm module, but uses GDBM instead to\n\
-provide some additional functionality. Please note that the file formats\n\
-created by GDBM and dbm are incompatible. \n\
+provide some additional functionality. Please note that the file formats\n\
+created by GDBM and dbm are incompatible.\n\
\n\
GDBM objects behave like mappings (dictionaries), except that keys and\n\
-values are always strings. Printing a GDBM object doesn't print the\n\
-keys and values, and the items() and values() methods are not\n\
-supported.");
+values are always immutable bytes-like objects or strings. Printing\n\
+a GDBM object doesn't print the keys and values, and the items() and\n\
+values() methods are not supported.");
typedef struct {
PyObject_HEAD
@@ -36,6 +42,8 @@ typedef struct {
static PyTypeObject Dbmtype;
+#include "clinic/_gdbmmodule.c.h"
+
#define is_dbmobject(v) (Py_TYPE(v) == &Dbmtype)
#define check_dbmobject_open(v) if ((v)->di_dbm == NULL) \
{ PyErr_SetString(DbmError, "GDBM object has already been closed"); \
@@ -48,15 +56,15 @@ static PyObject *DbmError;
PyDoc_STRVAR(gdbm_object__doc__,
"This object represents a GDBM database.\n\
GDBM objects behave like mappings (dictionaries), except that keys and\n\
-values are always strings. Printing a GDBM object doesn't print the\n\
-keys and values, and the items() and values() methods are not\n\
-supported.\n\
+values are always immutable bytes-like objects or strings. Printing\n\
+a GDBM object doesn't print the keys and values, and the items() and\n\
+values() methods are not supported.\n\
\n\
GDBM objects also support additional operations such as firstkey,\n\
nextkey, reorganize, and sync.");
static PyObject *
-newdbmobject(char *file, int flags, int mode)
+newdbmobject(const char *file, int flags, int mode)
{
dbmobject *dp;
@@ -65,7 +73,7 @@ newdbmobject(char *file, int flags, int mode)
return NULL;
dp->di_size = -1;
errno = 0;
- if ((dp->di_dbm = gdbm_open(file, 0, flags, mode, NULL)) == 0) {
+ if ((dp->di_dbm = gdbm_open((char *)file, 0, flags, mode, NULL)) == 0) {
if (errno != 0)
PyErr_SetFromErrno(DbmError);
else
@@ -135,24 +143,27 @@ dbm_subscript(dbmobject *dp, PyObject *key)
return v;
}
-PyDoc_STRVAR(dbm_get__doc__,
-"get(key[, default]) -> value\n\
-Get the value for key, or default if not present; if not given,\n\
-default is None.");
+/*[clinic input]
+_gdbm.gdbm.get
+
+ key: object
+ default: object = None
+ /
+
+Get the value for key, or default if not present.
+[clinic start generated code]*/
static PyObject *
-dbm_get(dbmobject *dp, PyObject *args)
+_gdbm_gdbm_get_impl(dbmobject *self, PyObject *key, PyObject *default_value)
+/*[clinic end generated code: output=19b7c585ad4f554a input=a9c20423f34c17b6]*/
{
- PyObject *v, *res;
- PyObject *def = Py_None;
+ PyObject *res;
- if (!PyArg_UnpackTuple(args, "get", 1, 2, &v, &def))
- return NULL;
- res = dbm_subscript(dp, v);
+ res = dbm_subscript(self, key);
if (res == NULL && PyErr_ExceptionMatches(PyExc_KeyError)) {
PyErr_Clear();
- Py_INCREF(def);
- return def;
+ Py_INCREF(default_value);
+ return default_value;
}
return res;
}
@@ -198,25 +209,29 @@ dbm_ass_sub(dbmobject *dp, PyObject *v, PyObject *w)
return 0;
}
-PyDoc_STRVAR(dbm_setdefault__doc__,
-"setdefault(key[, default]) -> value\n\
-Get value for key, or set it to default and return default if not present;\n\
-if not given, default is None.");
+/*[clinic input]
+_gdbm.gdbm.setdefault
+
+ key: object
+ default: object = None
+ /
+
+Get value for key, or set it to default and return default if not present.
+[clinic start generated code]*/
static PyObject *
-dbm_setdefault(dbmobject *dp, PyObject *args)
+_gdbm_gdbm_setdefault_impl(dbmobject *self, PyObject *key,
+ PyObject *default_value)
+/*[clinic end generated code: output=88760ee520329012 input=0db46b69e9680171]*/
{
- PyObject *v, *res;
- PyObject *def = Py_None;
+ PyObject *res;
- if (!PyArg_UnpackTuple(args, "setdefault", 1, 2, &v, &def))
- return NULL;
- res = dbm_subscript(dp, v);
+ res = dbm_subscript(self, key);
if (res == NULL && PyErr_ExceptionMatches(PyExc_KeyError)) {
PyErr_Clear();
- if (dbm_ass_sub(dp, v, def) < 0)
+ if (dbm_ass_sub(self, key, default_value) < 0)
return NULL;
- return dbm_subscript(dp, v);
+ return dbm_subscript(self, key);
}
return res;
}
@@ -227,43 +242,49 @@ static PyMappingMethods dbm_as_mapping = {
(objobjargproc)dbm_ass_sub, /*mp_ass_subscript*/
};
-PyDoc_STRVAR(dbm_close__doc__,
-"close() -> None\n\
-Closes the database.");
+/*[clinic input]
+_gdbm.gdbm.close
+
+Close the database.
+[clinic start generated code]*/
static PyObject *
-dbm_close(dbmobject *dp, PyObject *unused)
+_gdbm_gdbm_close_impl(dbmobject *self)
+/*[clinic end generated code: output=23512a594598b563 input=0a203447379b45fd]*/
{
- if (dp->di_dbm)
- gdbm_close(dp->di_dbm);
- dp->di_dbm = NULL;
+ if (self->di_dbm)
+ gdbm_close(self->di_dbm);
+ self->di_dbm = NULL;
Py_INCREF(Py_None);
return Py_None;
}
/* XXX Should return a set or a set view */
-PyDoc_STRVAR(dbm_keys__doc__,
-"keys() -> list_of_keys\n\
-Get a list of all keys in the database.");
+/*[clinic input]
+_gdbm.gdbm.keys
+
+Get a list of all keys in the database.
+[clinic start generated code]*/
static PyObject *
-dbm_keys(dbmobject *dp, PyObject *unused)
+_gdbm_gdbm_keys_impl(dbmobject *self)
+/*[clinic end generated code: output=cb4b1776c3645dcc input=1832ee0a3132cfaf]*/
{
PyObject *v, *item;
datum key, nextkey;
int err;
- if (dp == NULL || !is_dbmobject(dp)) {
+ if (self == NULL || !is_dbmobject(self)) {
PyErr_BadInternalCall();
return NULL;
}
- check_dbmobject_open(dp);
+ check_dbmobject_open(self);
v = PyList_New(0);
if (v == NULL)
return NULL;
- key = gdbm_firstkey(dp->di_dbm);
+ key = gdbm_firstkey(self->di_dbm);
while (key.dptr) {
item = PyBytes_FromStringAndSize(key.dptr, key.dsize);
if (item == NULL) {
@@ -278,7 +299,7 @@ dbm_keys(dbmobject *dp, PyObject *unused)
Py_DECREF(v);
return NULL;
}
- nextkey = gdbm_nextkey(dp->di_dbm, key);
+ nextkey = gdbm_nextkey(self->di_dbm, key);
free(key.dptr);
key = nextkey;
}
@@ -329,21 +350,25 @@ static PySequenceMethods dbm_as_sequence = {
0, /* sq_inplace_repeat */
};
-PyDoc_STRVAR(dbm_firstkey__doc__,
-"firstkey() -> key\n\
-It's possible to loop over every key in the database using this method\n\
-and the nextkey() method. The traversal is ordered by GDBM's internal\n\
-hash values, and won't be sorted by the key values. This method\n\
-returns the starting key.");
+/*[clinic input]
+_gdbm.gdbm.firstkey
+
+Return the starting key for the traversal.
+
+It's possible to loop over every key in the database using this method
+and the nextkey() method. The traversal is ordered by GDBM's internal
+hash values, and won't be sorted by the key values.
+[clinic start generated code]*/
static PyObject *
-dbm_firstkey(dbmobject *dp, PyObject *unused)
+_gdbm_gdbm_firstkey_impl(dbmobject *self)
+/*[clinic end generated code: output=9ff85628d84b65d2 input=0dbd6a335d69bba0]*/
{
PyObject *v;
datum key;
- check_dbmobject_open(dp);
- key = gdbm_firstkey(dp->di_dbm);
+ check_dbmobject_open(self);
+ key = gdbm_firstkey(self->di_dbm);
if (key.dptr) {
v = PyBytes_FromStringAndSize(key.dptr, key.dsize);
free(key.dptr);
@@ -355,27 +380,35 @@ dbm_firstkey(dbmobject *dp, PyObject *unused)
}
}
-PyDoc_STRVAR(dbm_nextkey__doc__,
-"nextkey(key) -> next_key\n\
-Returns the key that follows key in the traversal.\n\
-The following code prints every key in the database db, without having\n\
-to create a list in memory that contains them all:\n\
-\n\
- k = db.firstkey()\n\
- while k != None:\n\
- print k\n\
- k = db.nextkey(k)");
+/*[clinic input]
+_gdbm.gdbm.nextkey
+
+ key: str(accept={str, robuffer}, zeroes=True)
+ /
+
+Returns the key that follows key in the traversal.
+
+The following code prints every key in the database db, without having
+to create a list in memory that contains them all:
+
+ k = db.firstkey()
+ while k != None:
+ print(k)
+ k = db.nextkey(k)
+[clinic start generated code]*/
static PyObject *
-dbm_nextkey(dbmobject *dp, PyObject *args)
+_gdbm_gdbm_nextkey_impl(dbmobject *self, const char *key,
+ Py_ssize_clean_t key_length)
+/*[clinic end generated code: output=192ab892de6eb2f6 input=1f1606943614e36f]*/
{
PyObject *v;
- datum key, nextkey;
+ datum dbm_key, nextkey;
- if (!PyArg_ParseTuple(args, "s#:nextkey", &key.dptr, &key.dsize))
- return NULL;
- check_dbmobject_open(dp);
- nextkey = gdbm_nextkey(dp->di_dbm, key);
+ dbm_key.dptr = (char *)key;
+ dbm_key.dsize = key_length;
+ check_dbmobject_open(self);
+ nextkey = gdbm_nextkey(self->di_dbm, dbm_key);
if (nextkey.dptr) {
v = PyBytes_FromStringAndSize(nextkey.dptr, nextkey.dsize);
free(nextkey.dptr);
@@ -387,20 +420,25 @@ dbm_nextkey(dbmobject *dp, PyObject *args)
}
}
-PyDoc_STRVAR(dbm_reorganize__doc__,
-"reorganize() -> None\n\
-If you have carried out a lot of deletions and would like to shrink\n\
-the space used by the GDBM file, this routine will reorganize the\n\
-database. GDBM will not shorten the length of a database file except\n\
-by using this reorganization; otherwise, deleted file space will be\n\
-kept and reused as new (key,value) pairs are added.");
+/*[clinic input]
+_gdbm.gdbm.reorganize
+
+Reorganize the database.
+
+If you have carried out a lot of deletions and would like to shrink
+the space used by the GDBM file, this routine will reorganize the
+database. GDBM will not shorten the length of a database file except
+by using this reorganization; otherwise, deleted file space will be
+kept and reused as new (key,value) pairs are added.
+[clinic start generated code]*/
static PyObject *
-dbm_reorganize(dbmobject *dp, PyObject *unused)
+_gdbm_gdbm_reorganize_impl(dbmobject *self)
+/*[clinic end generated code: output=38d9624df92e961d input=f6bea85bcfd40dd2]*/
{
- check_dbmobject_open(dp);
+ check_dbmobject_open(self);
errno = 0;
- if (gdbm_reorganize(dp->di_dbm) < 0) {
+ if (gdbm_reorganize(self->di_dbm) < 0) {
if (errno != 0)
PyErr_SetFromErrno(DbmError);
else
@@ -411,16 +449,21 @@ dbm_reorganize(dbmobject *dp, PyObject *unused)
return Py_None;
}
-PyDoc_STRVAR(dbm_sync__doc__,
-"sync() -> None\n\
-When the database has been opened in fast mode, this method forces\n\
-any unwritten data to be written to the disk.");
+/*[clinic input]
+_gdbm.gdbm.sync
+
+Flush the database to the disk file.
+
+When the database has been opened in fast mode, this method forces
+any unwritten data to be written to the disk.
+[clinic start generated code]*/
static PyObject *
-dbm_sync(dbmobject *dp, PyObject *unused)
+_gdbm_gdbm_sync_impl(dbmobject *self)
+/*[clinic end generated code: output=488b15f47028f125 input=2a47d2c9e153ab8a]*/
{
- check_dbmobject_open(dp);
- gdbm_sync(dp->di_dbm);
+ check_dbmobject_open(self);
+ gdbm_sync(self->di_dbm);
Py_INCREF(Py_None);
return Py_None;
}
@@ -440,14 +483,15 @@ dbm__exit__(PyObject *self, PyObject *args)
}
static PyMethodDef dbm_methods[] = {
- {"close", (PyCFunction)dbm_close, METH_NOARGS, dbm_close__doc__},
- {"keys", (PyCFunction)dbm_keys, METH_NOARGS, dbm_keys__doc__},
- {"firstkey", (PyCFunction)dbm_firstkey,METH_NOARGS, dbm_firstkey__doc__},
- {"nextkey", (PyCFunction)dbm_nextkey, METH_VARARGS, dbm_nextkey__doc__},
- {"reorganize",(PyCFunction)dbm_reorganize,METH_NOARGS, dbm_reorganize__doc__},
- {"sync", (PyCFunction)dbm_sync, METH_NOARGS, dbm_sync__doc__},
- {"get", (PyCFunction)dbm_get, METH_VARARGS, dbm_get__doc__},
- {"setdefault",(PyCFunction)dbm_setdefault,METH_VARARGS, dbm_setdefault__doc__},
+ _GDBM_GDBM_CLOSE_METHODDEF
+ _GDBM_GDBM_KEYS_METHODDEF
+ _GDBM_GDBM_FIRSTKEY_METHODDEF
+ _GDBM_GDBM_NEXTKEY_METHODDEF
+ _GDBM_GDBM_REORGANIZE_METHODDEF
+ _GDBM_GDBM_SYNC_METHODDEF
+ _GDBM_GDBM_GET_METHODDEF
+ _GDBM_GDBM_GET_METHODDEF
+ _GDBM_GDBM_SETDEFAULT_METHODDEF
{"__enter__", dbm__enter__, METH_NOARGS, NULL},
{"__exit__", dbm__exit__, METH_VARARGS, NULL},
{NULL, NULL} /* sentinel */
@@ -486,40 +530,44 @@ static PyTypeObject Dbmtype = {
/* ----------------------------------------------------------------- */
-PyDoc_STRVAR(dbmopen__doc__,
-"open(filename, [flags, [mode]]) -> dbm_object\n\
-Open a dbm database and return a dbm object. The filename argument is\n\
-the name of the database file.\n\
-\n\
-The optional flags argument can be 'r' (to open an existing database\n\
-for reading only -- default), 'w' (to open an existing database for\n\
-reading and writing), 'c' (which creates the database if it doesn't\n\
-exist), or 'n' (which always creates a new empty database).\n\
-\n\
-Some versions of gdbm support additional flags which must be\n\
-appended to one of the flags described above. The module constant\n\
-'open_flags' is a string of valid additional flags. The 'f' flag\n\
-opens the database in fast mode; altered data will not automatically\n\
-be written to the disk after every change. This results in faster\n\
-writes to the database, but may result in an inconsistent database\n\
-if the program crashes while the database is still open. Use the\n\
-sync() method to force any unwritten data to be written to the disk.\n\
-The 's' flag causes all database operations to be synchronized to\n\
-disk. The 'u' flag disables locking of the database file.\n\
-\n\
-The optional mode argument is the Unix mode of the file, used only\n\
-when the database has to be created. It defaults to octal 0666. ");
+/*[clinic input]
+_gdbm.open as dbmopen
+ filename as name: str
+ flags: str="r"
+ mode: int(py_default="0o666") = 0o666
+ /
+
+Open a dbm database and return a dbm object.
+
+The filename argument is the name of the database file.
+
+The optional flags argument can be 'r' (to open an existing database
+for reading only -- default), 'w' (to open an existing database for
+reading and writing), 'c' (which creates the database if it doesn't
+exist), or 'n' (which always creates a new empty database).
+
+Some versions of gdbm support additional flags which must be
+appended to one of the flags described above. The module constant
+'open_flags' is a string of valid additional flags. The 'f' flag
+opens the database in fast mode; altered data will not automatically
+be written to the disk after every change. This results in faster
+writes to the database, but may result in an inconsistent database
+if the program crashes while the database is still open. Use the
+sync() method to force any unwritten data to be written to the disk.
+The 's' flag causes all database operations to be synchronized to
+disk. The 'u' flag disables locking of the database file.
+
+The optional mode argument is the Unix mode of the file, used only
+when the database has to be created. It defaults to octal 0o666.
+[clinic start generated code]*/
static PyObject *
-dbmopen(PyObject *self, PyObject *args)
+dbmopen_impl(PyModuleDef *module, const char *name, const char *flags,
+ int mode)
+/*[clinic end generated code: output=365b31415c03ccd4 input=55563cd60e51984a]*/
{
- char *name;
- char *flags = "r";
int iflags;
- int mode = 0666;
- if (!PyArg_ParseTuple(args, "s|si:open", &name, &flags, &mode))
- return NULL;
switch (flags[0]) {
case 'r':
iflags = GDBM_READER;
@@ -580,7 +628,7 @@ static char dbmmodule_open_flags[] = "rwcn"
;
static PyMethodDef dbmmodule_methods[] = {
- { "open", (PyCFunction)dbmopen, METH_VARARGS, dbmopen__doc__},
+ DBMOPEN_METHODDEF
{ 0, 0 },
};
diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c
index 5b0a7be12b..44765acf31 100644
--- a/Modules/_hashopenssl.c
+++ b/Modules/_hashopenssl.c
@@ -16,6 +16,7 @@
#include "Python.h"
#include "structmember.h"
#include "hashlib.h"
+#include "pystrhex.h"
/* EVP is the preferred interface to hashing in OpenSSL */
@@ -31,10 +32,6 @@
#define HASH_OBJ_CONSTRUCTOR 0
#endif
-/* Minimum OpenSSL version needed to support sha224 and higher. */
-#if defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x00908000)
-#define _OPENSSL_SUPPORTS_SHA2
-#endif
typedef struct {
PyObject_HEAD
@@ -56,12 +53,10 @@ static PyTypeObject EVPtype;
DEFINE_CONSTS_FOR_NEW(md5)
DEFINE_CONSTS_FOR_NEW(sha1)
-#ifdef _OPENSSL_SUPPORTS_SHA2
DEFINE_CONSTS_FOR_NEW(sha224)
DEFINE_CONSTS_FOR_NEW(sha256)
DEFINE_CONSTS_FOR_NEW(sha384)
DEFINE_CONSTS_FOR_NEW(sha512)
-#endif
static EVPobject *
@@ -163,9 +158,7 @@ EVP_hexdigest(EVPobject *self, PyObject *unused)
{
unsigned char digest[EVP_MAX_MD_SIZE];
EVP_MD_CTX temp_ctx;
- PyObject *retval;
- char *hex_digest;
- unsigned int i, j, digest_size;
+ unsigned int digest_size;
/* Get the raw (binary) digest value */
locked_EVP_MD_CTX_copy(&temp_ctx, self);
@@ -174,22 +167,7 @@ EVP_hexdigest(EVPobject *self, PyObject *unused)
EVP_MD_CTX_cleanup(&temp_ctx);
- /* Allocate a new buffer */
- hex_digest = PyMem_Malloc(digest_size * 2 + 1);
- if (!hex_digest)
- return PyErr_NoMemory();
-
- /* Make hex version of the digest */
- for(i=j=0; i<digest_size; i++) {
- unsigned char c;
- c = (digest[i] >> 4) & 0xf;
- hex_digest[j++] = Py_hexdigits[c];
- c = (digest[i] & 0xf);
- hex_digest[j++] = Py_hexdigits[c];
- }
- retval = PyUnicode_FromStringAndSize(hex_digest, digest_size * 2);
- PyMem_Free(hex_digest);
- return retval;
+ return _Py_strhex((const char *)digest, digest_size);
}
PyDoc_STRVAR(EVP_update__doc__,
@@ -798,12 +776,10 @@ generate_hash_name_list(void)
GEN_CONSTRUCTOR(md5)
GEN_CONSTRUCTOR(sha1)
-#ifdef _OPENSSL_SUPPORTS_SHA2
GEN_CONSTRUCTOR(sha224)
GEN_CONSTRUCTOR(sha256)
GEN_CONSTRUCTOR(sha384)
GEN_CONSTRUCTOR(sha512)
-#endif
/* List of functions exported by this module */
@@ -815,12 +791,10 @@ static struct PyMethodDef EVP_functions[] = {
#endif
CONSTRUCTOR_METH_DEF(md5),
CONSTRUCTOR_METH_DEF(sha1),
-#ifdef _OPENSSL_SUPPORTS_SHA2
CONSTRUCTOR_METH_DEF(sha224),
CONSTRUCTOR_METH_DEF(sha256),
CONSTRUCTOR_METH_DEF(sha384),
CONSTRUCTOR_METH_DEF(sha512),
-#endif
{NULL, NULL} /* Sentinel */
};
@@ -877,11 +851,9 @@ PyInit__hashlib(void)
/* these constants are used by the convenience constructors */
INIT_CONSTRUCTOR_CONSTANTS(md5);
INIT_CONSTRUCTOR_CONSTANTS(sha1);
-#ifdef _OPENSSL_SUPPORTS_SHA2
INIT_CONSTRUCTOR_CONSTANTS(sha224);
INIT_CONSTRUCTOR_CONSTANTS(sha256);
INIT_CONSTRUCTOR_CONSTANTS(sha384);
INIT_CONSTRUCTOR_CONSTANTS(sha512);
-#endif
return m;
}
diff --git a/Modules/_heapqmodule.c b/Modules/_heapqmodule.c
index 04845f165a..136abf5985 100644
--- a/Modules/_heapqmodule.c
+++ b/Modules/_heapqmodule.c
@@ -9,9 +9,9 @@ annotated by François Pinard, and converted to C by Raymond Hettinger.
#include "Python.h"
static int
-_siftdown(PyListObject *heap, Py_ssize_t startpos, Py_ssize_t pos)
+siftdown(PyListObject *heap, Py_ssize_t startpos, Py_ssize_t pos)
{
- PyObject *newitem, *parent;
+ PyObject *newitem, *parent, **arr;
Py_ssize_t parentpos, size;
int cmp;
@@ -24,12 +24,13 @@ _siftdown(PyListObject *heap, Py_ssize_t startpos, Py_ssize_t pos)
/* Follow the path to the root, moving parents down until finding
a place newitem fits. */
- newitem = PyList_GET_ITEM(heap, pos);
+ arr = _PyList_ITEMS(heap);
+ newitem = arr[pos];
while (pos > startpos) {
parentpos = (pos - 1) >> 1;
- parent = PyList_GET_ITEM(heap, parentpos);
+ parent = arr[parentpos];
cmp = PyObject_RichCompareBool(newitem, parent, Py_LT);
- if (cmp == -1)
+ if (cmp < 0)
return -1;
if (size != PyList_GET_SIZE(heap)) {
PyErr_SetString(PyExc_RuntimeError,
@@ -38,20 +39,21 @@ _siftdown(PyListObject *heap, Py_ssize_t startpos, Py_ssize_t pos)
}
if (cmp == 0)
break;
- parent = PyList_GET_ITEM(heap, parentpos);
- newitem = PyList_GET_ITEM(heap, pos);
- PyList_SET_ITEM(heap, parentpos, newitem);
- PyList_SET_ITEM(heap, pos, parent);
+ arr = _PyList_ITEMS(heap);
+ parent = arr[parentpos];
+ newitem = arr[pos];
+ arr[parentpos] = newitem;
+ arr[pos] = parent;
pos = parentpos;
}
return 0;
}
static int
-_siftup(PyListObject *heap, Py_ssize_t pos)
+siftup(PyListObject *heap, Py_ssize_t pos)
{
- Py_ssize_t startpos, endpos, childpos, rightpos, limit;
- PyObject *tmp1, *tmp2;
+ Py_ssize_t startpos, endpos, childpos, limit;
+ PyObject *tmp1, *tmp2, **arr;
int cmp;
assert(PyList_Check(heap));
@@ -63,20 +65,19 @@ _siftup(PyListObject *heap, Py_ssize_t pos)
}
/* Bubble up the smaller child until hitting a leaf. */
+ arr = _PyList_ITEMS(heap);
limit = endpos / 2; /* smallest pos that has no child */
while (pos < limit) {
/* Set childpos to index of smaller child. */
childpos = 2*pos + 1; /* leftmost child position */
- rightpos = childpos + 1;
- if (rightpos < endpos) {
+ if (childpos + 1 < endpos) {
cmp = PyObject_RichCompareBool(
- PyList_GET_ITEM(heap, childpos),
- PyList_GET_ITEM(heap, rightpos),
+ arr[childpos],
+ arr[childpos + 1],
Py_LT);
- if (cmp == -1)
+ if (cmp < 0)
return -1;
- if (cmp == 0)
- childpos = rightpos;
+ childpos += ((unsigned)cmp ^ 1); /* increment when cmp==0 */
if (endpos != PyList_GET_SIZE(heap)) {
PyErr_SetString(PyExc_RuntimeError,
"list changed size during iteration");
@@ -84,14 +85,15 @@ _siftup(PyListObject *heap, Py_ssize_t pos)
}
}
/* Move the smaller child up. */
- tmp1 = PyList_GET_ITEM(heap, childpos);
- tmp2 = PyList_GET_ITEM(heap, pos);
- PyList_SET_ITEM(heap, childpos, tmp2);
- PyList_SET_ITEM(heap, pos, tmp1);
+ arr = _PyList_ITEMS(heap);
+ tmp1 = arr[childpos];
+ tmp2 = arr[pos];
+ arr[childpos] = tmp2;
+ arr[pos] = tmp1;
pos = childpos;
}
/* Bubble it up to its final resting place (by sifting its parents down). */
- return _siftdown(heap, startpos, pos);
+ return siftdown(heap, startpos, pos);
}
static PyObject *
@@ -107,20 +109,19 @@ heappush(PyObject *self, PyObject *args)
return NULL;
}
- if (PyList_Append(heap, item) == -1)
+ if (PyList_Append(heap, item))
return NULL;
- if (_siftdown((PyListObject *)heap, 0, PyList_GET_SIZE(heap)-1) == -1)
+ if (siftdown((PyListObject *)heap, 0, PyList_GET_SIZE(heap)-1))
return NULL;
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
PyDoc_STRVAR(heappush_doc,
"heappush(heap, item) -> None. Push item onto heap, maintaining the heap invariant.");
static PyObject *
-heappop(PyObject *self, PyObject *heap)
+heappop_internal(PyObject *heap, int siftup_func(PyListObject *, Py_ssize_t))
{
PyObject *lastelt, *returnitem;
Py_ssize_t n;
@@ -130,7 +131,7 @@ heappop(PyObject *self, PyObject *heap)
return NULL;
}
- /* # raises appropriate IndexError if heap is empty */
+ /* raises IndexError if the heap is empty */
n = PyList_GET_SIZE(heap);
if (n == 0) {
PyErr_SetString(PyExc_IndexError, "index out of range");
@@ -139,7 +140,7 @@ heappop(PyObject *self, PyObject *heap)
lastelt = PyList_GET_ITEM(heap, n-1) ;
Py_INCREF(lastelt);
- if (PyList_SetSlice(heap, n-1, n, NULL) < 0) {
+ if (PyList_SetSlice(heap, n-1, n, NULL)) {
Py_DECREF(lastelt);
return NULL;
}
@@ -149,18 +150,24 @@ heappop(PyObject *self, PyObject *heap)
return lastelt;
returnitem = PyList_GET_ITEM(heap, 0);
PyList_SET_ITEM(heap, 0, lastelt);
- if (_siftup((PyListObject *)heap, 0) == -1) {
+ if (siftup_func((PyListObject *)heap, 0)) {
Py_DECREF(returnitem);
return NULL;
}
return returnitem;
}
+static PyObject *
+heappop(PyObject *self, PyObject *heap)
+{
+ return heappop_internal(heap, siftup);
+}
+
PyDoc_STRVAR(heappop_doc,
"Pop the smallest item off the heap, maintaining the heap invariant.");
static PyObject *
-heapreplace(PyObject *self, PyObject *args)
+heapreplace_internal(PyObject *args, int siftup_func(PyListObject *, Py_ssize_t))
{
PyObject *heap, *item, *returnitem;
@@ -172,7 +179,7 @@ heapreplace(PyObject *self, PyObject *args)
return NULL;
}
- if (PyList_GET_SIZE(heap) < 1) {
+ if (PyList_GET_SIZE(heap) == 0) {
PyErr_SetString(PyExc_IndexError, "index out of range");
return NULL;
}
@@ -180,13 +187,19 @@ heapreplace(PyObject *self, PyObject *args)
returnitem = PyList_GET_ITEM(heap, 0);
Py_INCREF(item);
PyList_SET_ITEM(heap, 0, item);
- if (_siftup((PyListObject *)heap, 0) == -1) {
+ if (siftup_func((PyListObject *)heap, 0)) {
Py_DECREF(returnitem);
return NULL;
}
return returnitem;
}
+static PyObject *
+heapreplace(PyObject *self, PyObject *args)
+{
+ return heapreplace_internal(args, siftup);
+}
+
PyDoc_STRVAR(heapreplace_doc,
"heapreplace(heap, item) -> value. Pop and return the current smallest value, and add the new item.\n\
\n\
@@ -211,13 +224,13 @@ heappushpop(PyObject *self, PyObject *args)
return NULL;
}
- if (PyList_GET_SIZE(heap) < 1) {
+ if (PyList_GET_SIZE(heap) == 0) {
Py_INCREF(item);
return item;
}
cmp = PyObject_RichCompareBool(PyList_GET_ITEM(heap, 0), item, Py_LT);
- if (cmp == -1)
+ if (cmp < 0)
return NULL;
if (cmp == 0) {
Py_INCREF(item);
@@ -232,7 +245,7 @@ heappushpop(PyObject *self, PyObject *args)
returnitem = PyList_GET_ITEM(heap, 0);
Py_INCREF(item);
PyList_SET_ITEM(heap, 0, item);
- if (_siftup((PyListObject *)heap, 0) == -1) {
+ if (siftup((PyListObject *)heap, 0)) {
Py_DECREF(returnitem);
return NULL;
}
@@ -244,8 +257,73 @@ PyDoc_STRVAR(heappushpop_doc,
from the heap. The combined action runs more efficiently than\n\
heappush() followed by a separate call to heappop().");
+static Py_ssize_t
+keep_top_bit(Py_ssize_t n)
+{
+ int i = 0;
+
+ while (n > 1) {
+ n >>= 1;
+ i++;
+ }
+ return n << i;
+}
+
+/* Cache friendly version of heapify()
+ -----------------------------------
+
+ Build-up a heap in O(n) time by performing siftup() operations
+ on nodes whose children are already heaps.
+
+ The simplest way is to sift the nodes in reverse order from
+ n//2-1 to 0 inclusive. The downside is that children may be
+ out of cache by the time their parent is reached.
+
+ A better way is to not wait for the children to go out of cache.
+ Once a sibling pair of child nodes have been sifted, immediately
+ sift their parent node (while the children are still in cache).
+
+ Both ways build child heaps before their parents, so both ways
+ do the exact same number of comparisons and produce exactly
+ the same heap. The only difference is that the traversal
+ order is optimized for cache efficiency.
+*/
+
static PyObject *
-heapify(PyObject *self, PyObject *heap)
+cache_friendly_heapify(PyObject *heap, int siftup_func(PyListObject *, Py_ssize_t))
+{
+ Py_ssize_t i, j, m, mhalf, leftmost;
+
+ m = PyList_GET_SIZE(heap) >> 1; /* index of first childless node */
+ leftmost = keep_top_bit(m + 1) - 1; /* leftmost node in row of m */
+ mhalf = m >> 1; /* parent of first childless node */
+
+ for (i = leftmost - 1 ; i >= mhalf ; i--) {
+ j = i;
+ while (1) {
+ if (siftup_func((PyListObject *)heap, j))
+ return NULL;
+ if (!(j & 1))
+ break;
+ j >>= 1;
+ }
+ }
+
+ for (i = m - 1 ; i >= leftmost ; i--) {
+ j = i;
+ while (1) {
+ if (siftup_func((PyListObject *)heap, j))
+ return NULL;
+ if (!(j & 1))
+ break;
+ j >>= 1;
+ }
+ }
+ Py_RETURN_NONE;
+}
+
+static PyObject *
+heapify_internal(PyObject *heap, int siftup_func(PyListObject *, Py_ssize_t))
{
Py_ssize_t i, n;
@@ -254,7 +332,14 @@ heapify(PyObject *self, PyObject *heap)
return NULL;
}
+ /* For heaps likely to be bigger than L1 cache, we use the cache
+ friendly heapify function. For smaller heaps that fit entirely
+ in cache, we prefer the simpler algorithm with less branching.
+ */
n = PyList_GET_SIZE(heap);
+ if (n > 2500)
+ return cache_friendly_heapify(heap, siftup_func);
+
/* Transform bottom-up. The largest index there's any point to
looking at is the largest with a child index in-range, so must
have 2*i + 1 < n, or i < (n-1)/2. If n is even = 2*j, this is
@@ -262,142 +347,68 @@ heapify(PyObject *self, PyObject *heap)
n is odd = 2*j+1, this is (2*j+1-1)/2 = j so j-1 is the largest,
and that's again n//2-1.
*/
- for (i=n/2-1 ; i>=0 ; i--)
- if(_siftup((PyListObject *)heap, i) == -1)
+ for (i = n/2 - 1 ; i >= 0 ; i--)
+ if (siftup_func((PyListObject *)heap, i))
return NULL;
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
-PyDoc_STRVAR(heapify_doc,
-"Transform list into a heap, in-place, in O(len(heap)) time.");
-
static PyObject *
-nlargest(PyObject *self, PyObject *args)
+heapify(PyObject *self, PyObject *heap)
{
- PyObject *heap=NULL, *elem, *iterable, *sol, *it, *oldelem;
- Py_ssize_t i, n;
- int cmp;
-
- if (!PyArg_ParseTuple(args, "nO:nlargest", &n, &iterable))
- return NULL;
-
- it = PyObject_GetIter(iterable);
- if (it == NULL)
- return NULL;
-
- heap = PyList_New(0);
- if (heap == NULL)
- goto fail;
-
- for (i=0 ; i<n ; i++ ){
- elem = PyIter_Next(it);
- if (elem == NULL) {
- if (PyErr_Occurred())
- goto fail;
- else
- goto sortit;
- }
- if (PyList_Append(heap, elem) == -1) {
- Py_DECREF(elem);
- goto fail;
- }
- Py_DECREF(elem);
- }
- if (PyList_GET_SIZE(heap) == 0)
- goto sortit;
-
- for (i=n/2-1 ; i>=0 ; i--)
- if(_siftup((PyListObject *)heap, i) == -1)
- goto fail;
-
- sol = PyList_GET_ITEM(heap, 0);
- while (1) {
- elem = PyIter_Next(it);
- if (elem == NULL) {
- if (PyErr_Occurred())
- goto fail;
- else
- goto sortit;
- }
- cmp = PyObject_RichCompareBool(sol, elem, Py_LT);
- if (cmp == -1) {
- Py_DECREF(elem);
- goto fail;
- }
- if (cmp == 0) {
- Py_DECREF(elem);
- continue;
- }
- oldelem = PyList_GET_ITEM(heap, 0);
- PyList_SET_ITEM(heap, 0, elem);
- Py_DECREF(oldelem);
- if (_siftup((PyListObject *)heap, 0) == -1)
- goto fail;
- sol = PyList_GET_ITEM(heap, 0);
- }
-sortit:
- if (PyList_Sort(heap) == -1)
- goto fail;
- if (PyList_Reverse(heap) == -1)
- goto fail;
- Py_DECREF(it);
- return heap;
-
-fail:
- Py_DECREF(it);
- Py_XDECREF(heap);
- return NULL;
+ return heapify_internal(heap, siftup);
}
-PyDoc_STRVAR(nlargest_doc,
-"Find the n largest elements in a dataset.\n\
-\n\
-Equivalent to: sorted(iterable, reverse=True)[:n]\n");
+PyDoc_STRVAR(heapify_doc,
+"Transform list into a heap, in-place, in O(len(heap)) time.");
static int
-_siftdownmax(PyListObject *heap, Py_ssize_t startpos, Py_ssize_t pos)
+siftdown_max(PyListObject *heap, Py_ssize_t startpos, Py_ssize_t pos)
{
- PyObject *newitem, *parent;
+ PyObject *newitem, *parent, **arr;
+ Py_ssize_t parentpos, size;
int cmp;
- Py_ssize_t parentpos;
assert(PyList_Check(heap));
- if (pos >= PyList_GET_SIZE(heap)) {
+ size = PyList_GET_SIZE(heap);
+ if (pos >= size) {
PyErr_SetString(PyExc_IndexError, "index out of range");
return -1;
}
- newitem = PyList_GET_ITEM(heap, pos);
- Py_INCREF(newitem);
/* Follow the path to the root, moving parents down until finding
a place newitem fits. */
- while (pos > startpos){
+ arr = _PyList_ITEMS(heap);
+ newitem = arr[pos];
+ while (pos > startpos) {
parentpos = (pos - 1) >> 1;
- parent = PyList_GET_ITEM(heap, parentpos);
+ parent = arr[parentpos];
cmp = PyObject_RichCompareBool(parent, newitem, Py_LT);
- if (cmp == -1) {
- Py_DECREF(newitem);
+ if (cmp < 0)
+ return -1;
+ if (size != PyList_GET_SIZE(heap)) {
+ PyErr_SetString(PyExc_RuntimeError,
+ "list changed size during iteration");
return -1;
}
if (cmp == 0)
break;
- Py_INCREF(parent);
- Py_DECREF(PyList_GET_ITEM(heap, pos));
- PyList_SET_ITEM(heap, pos, parent);
+ arr = _PyList_ITEMS(heap);
+ parent = arr[parentpos];
+ newitem = arr[pos];
+ arr[parentpos] = newitem;
+ arr[pos] = parent;
pos = parentpos;
}
- Py_DECREF(PyList_GET_ITEM(heap, pos));
- PyList_SET_ITEM(heap, pos, newitem);
return 0;
}
static int
-_siftupmax(PyListObject *heap, Py_ssize_t pos)
+siftup_max(PyListObject *heap, Py_ssize_t pos)
{
- Py_ssize_t startpos, endpos, childpos, rightpos, limit;
+ Py_ssize_t startpos, endpos, childpos, limit;
+ PyObject *tmp1, *tmp2, **arr;
int cmp;
- PyObject *newitem, *tmp;
assert(PyList_Check(heap));
endpos = PyList_GET_SIZE(heap);
@@ -406,125 +417,62 @@ _siftupmax(PyListObject *heap, Py_ssize_t pos)
PyErr_SetString(PyExc_IndexError, "index out of range");
return -1;
}
- newitem = PyList_GET_ITEM(heap, pos);
- Py_INCREF(newitem);
/* Bubble up the smaller child until hitting a leaf. */
+ arr = _PyList_ITEMS(heap);
limit = endpos / 2; /* smallest pos that has no child */
while (pos < limit) {
/* Set childpos to index of smaller child. */
childpos = 2*pos + 1; /* leftmost child position */
- rightpos = childpos + 1;
- if (rightpos < endpos) {
+ if (childpos + 1 < endpos) {
cmp = PyObject_RichCompareBool(
- PyList_GET_ITEM(heap, rightpos),
- PyList_GET_ITEM(heap, childpos),
+ arr[childpos + 1],
+ arr[childpos],
Py_LT);
- if (cmp == -1) {
- Py_DECREF(newitem);
+ if (cmp < 0)
+ return -1;
+ childpos += ((unsigned)cmp ^ 1); /* increment when cmp==0 */
+ if (endpos != PyList_GET_SIZE(heap)) {
+ PyErr_SetString(PyExc_RuntimeError,
+ "list changed size during iteration");
return -1;
}
- if (cmp == 0)
- childpos = rightpos;
}
/* Move the smaller child up. */
- tmp = PyList_GET_ITEM(heap, childpos);
- Py_INCREF(tmp);
- Py_DECREF(PyList_GET_ITEM(heap, pos));
- PyList_SET_ITEM(heap, pos, tmp);
+ arr = _PyList_ITEMS(heap);
+ tmp1 = arr[childpos];
+ tmp2 = arr[pos];
+ arr[childpos] = tmp2;
+ arr[pos] = tmp1;
pos = childpos;
}
-
- /* The leaf at pos is empty now. Put newitem there, and bubble
- it up to its final resting place (by sifting its parents down). */
- Py_DECREF(PyList_GET_ITEM(heap, pos));
- PyList_SET_ITEM(heap, pos, newitem);
- return _siftdownmax(heap, startpos, pos);
+ /* Bubble it up to its final resting place (by sifting its parents down). */
+ return siftdown_max(heap, startpos, pos);
}
static PyObject *
-nsmallest(PyObject *self, PyObject *args)
+heappop_max(PyObject *self, PyObject *heap)
{
- PyObject *heap=NULL, *elem, *iterable, *los, *it, *oldelem;
- Py_ssize_t i, n;
- int cmp;
-
- if (!PyArg_ParseTuple(args, "nO:nsmallest", &n, &iterable))
- return NULL;
+ return heappop_internal(heap, siftup_max);
+}
- it = PyObject_GetIter(iterable);
- if (it == NULL)
- return NULL;
+PyDoc_STRVAR(heappop_max_doc, "Maxheap variant of heappop.");
- heap = PyList_New(0);
- if (heap == NULL)
- goto fail;
-
- for (i=0 ; i<n ; i++ ){
- elem = PyIter_Next(it);
- if (elem == NULL) {
- if (PyErr_Occurred())
- goto fail;
- else
- goto sortit;
- }
- if (PyList_Append(heap, elem) == -1) {
- Py_DECREF(elem);
- goto fail;
- }
- Py_DECREF(elem);
- }
- n = PyList_GET_SIZE(heap);
- if (n == 0)
- goto sortit;
-
- for (i=n/2-1 ; i>=0 ; i--)
- if(_siftupmax((PyListObject *)heap, i) == -1)
- goto fail;
-
- los = PyList_GET_ITEM(heap, 0);
- while (1) {
- elem = PyIter_Next(it);
- if (elem == NULL) {
- if (PyErr_Occurred())
- goto fail;
- else
- goto sortit;
- }
- cmp = PyObject_RichCompareBool(elem, los, Py_LT);
- if (cmp == -1) {
- Py_DECREF(elem);
- goto fail;
- }
- if (cmp == 0) {
- Py_DECREF(elem);
- continue;
- }
-
- oldelem = PyList_GET_ITEM(heap, 0);
- PyList_SET_ITEM(heap, 0, elem);
- Py_DECREF(oldelem);
- if (_siftupmax((PyListObject *)heap, 0) == -1)
- goto fail;
- los = PyList_GET_ITEM(heap, 0);
- }
+static PyObject *
+heapreplace_max(PyObject *self, PyObject *args)
+{
+ return heapreplace_internal(args, siftup_max);
+}
-sortit:
- if (PyList_Sort(heap) == -1)
- goto fail;
- Py_DECREF(it);
- return heap;
+PyDoc_STRVAR(heapreplace_max_doc, "Maxheap variant of heapreplace");
-fail:
- Py_DECREF(it);
- Py_XDECREF(heap);
- return NULL;
+static PyObject *
+heapify_max(PyObject *self, PyObject *heap)
+{
+ return heapify_internal(heap, siftup_max);
}
-PyDoc_STRVAR(nsmallest_doc,
-"Find the n smallest elements in a dataset.\n\
-\n\
-Equivalent to: sorted(iterable)[:n]\n");
+PyDoc_STRVAR(heapify_max_doc, "Maxheap variant of heapify.");
static PyMethodDef heapq_methods[] = {
{"heappush", (PyCFunction)heappush,
@@ -537,10 +485,12 @@ static PyMethodDef heapq_methods[] = {
METH_VARARGS, heapreplace_doc},
{"heapify", (PyCFunction)heapify,
METH_O, heapify_doc},
- {"nlargest", (PyCFunction)nlargest,
- METH_VARARGS, nlargest_doc},
- {"nsmallest", (PyCFunction)nsmallest,
- METH_VARARGS, nsmallest_doc},
+ {"_heappop_max", (PyCFunction)heappop_max,
+ METH_O, heappop_max_doc},
+ {"_heapreplace_max",(PyCFunction)heapreplace_max,
+ METH_VARARGS, heapreplace_max_doc},
+ {"_heapify_max", (PyCFunction)heapify_max,
+ METH_O, heapify_max_doc},
{NULL, NULL} /* sentinel */
};
@@ -600,7 +550,7 @@ representation for a tournament. The numbers below are `k', not a[k]:\n\
\n\
\n\
In the tree above, each cell `k' is topping `2*k+1' and `2*k+2'. In\n\
-an usual binary tournament we see in sports, each cell is the winner\n\
+a usual binary tournament we see in sports, each cell is the winner\n\
over the two cells it tops, and we can trace the winner down the tree\n\
to see all opponents s/he had. However, in many computer applications\n\
of such tournaments, we do not need to trace the history of a winner.\n\
diff --git a/Modules/_io/_iomodule.c b/Modules/_io/_iomodule.c
index 44116d8864..ec68170258 100644
--- a/Modules/_io/_iomodule.c
+++ b/Modules/_io/_iomodule.c
@@ -93,140 +93,145 @@ PyDoc_STRVAR(module_doc,
/*
* The main open() function
*/
-PyDoc_STRVAR(open_doc,
-"open(file, mode='r', buffering=-1, encoding=None,\n"
-" errors=None, newline=None, closefd=True, opener=None) -> file object\n"
-"\n"
-"Open file and return a stream. Raise IOError upon failure.\n"
-"\n"
-"file is either a text or byte string giving the name (and the path\n"
-"if the file isn't in the current working directory) of the file to\n"
-"be opened or an integer file descriptor of the file to be\n"
-"wrapped. (If a file descriptor is given, it is closed when the\n"
-"returned I/O object is closed, unless closefd is set to False.)\n"
-"\n"
-"mode is an optional string that specifies the mode in which the file\n"
-"is opened. It defaults to 'r' which means open for reading in text\n"
-"mode. Other common values are 'w' for writing (truncating the file if\n"
-"it already exists), 'x' for creating and writing to a new file, and\n"
-"'a' for appending (which on some Unix systems, means that all writes\n"
-"append to the end of the file regardless of the current seek position).\n"
-"In text mode, if encoding is not specified the encoding used is platform\n"
-"dependent: locale.getpreferredencoding(False) is called to get the\n"
-"current locale encoding. (For reading and writing raw bytes use binary\n"
-"mode and leave encoding unspecified.) The available modes are:\n"
-"\n"
-"========= ===============================================================\n"
-"Character Meaning\n"
-"--------- ---------------------------------------------------------------\n"
-"'r' open for reading (default)\n"
-"'w' open for writing, truncating the file first\n"
-"'x' create a new file and open it for writing\n"
-"'a' open for writing, appending to the end of the file if it exists\n"
-"'b' binary mode\n"
-"'t' text mode (default)\n"
-"'+' open a disk file for updating (reading and writing)\n"
-"'U' universal newline mode (deprecated)\n"
-"========= ===============================================================\n"
-"\n"
-"The default mode is 'rt' (open for reading text). For binary random\n"
-"access, the mode 'w+b' opens and truncates the file to 0 bytes, while\n"
-"'r+b' opens the file without truncation. The 'x' mode implies 'w' and\n"
-"raises an `FileExistsError` if the file already exists.\n"
-"\n"
-"Python distinguishes between files opened in binary and text modes,\n"
-"even when the underlying operating system doesn't. Files opened in\n"
-"binary mode (appending 'b' to the mode argument) return contents as\n"
-"bytes objects without any decoding. In text mode (the default, or when\n"
-"'t' is appended to the mode argument), the contents of the file are\n"
-"returned as strings, the bytes having been first decoded using a\n"
-"platform-dependent encoding or using the specified encoding if given.\n"
-"\n"
-"'U' mode is deprecated and will raise an exception in future versions\n"
-"of Python. It has no effect in Python 3. Use newline to control\n"
-"universal newlines mode.\n"
-"\n"
-"buffering is an optional integer used to set the buffering policy.\n"
-"Pass 0 to switch buffering off (only allowed in binary mode), 1 to select\n"
-"line buffering (only usable in text mode), and an integer > 1 to indicate\n"
-"the size of a fixed-size chunk buffer. When no buffering argument is\n"
-"given, the default buffering policy works as follows:\n"
-"\n"
-"* Binary files are buffered in fixed-size chunks; the size of the buffer\n"
-" is chosen using a heuristic trying to determine the underlying device's\n"
-" \"block size\" and falling back on `io.DEFAULT_BUFFER_SIZE`.\n"
-" On many systems, the buffer will typically be 4096 or 8192 bytes long.\n"
-"\n"
-"* \"Interactive\" text files (files for which isatty() returns True)\n"
-" use line buffering. Other text files use the policy described above\n"
-" for binary files.\n"
-"\n"
-"encoding is the name of the encoding used to decode or encode the\n"
-"file. This should only be used in text mode. The default encoding is\n"
-"platform dependent, but any encoding supported by Python can be\n"
-"passed. See the codecs module for the list of supported encodings.\n"
-"\n"
-"errors is an optional string that specifies how encoding errors are to\n"
-"be handled---this argument should not be used in binary mode. Pass\n"
-"'strict' to raise a ValueError exception if there is an encoding error\n"
-"(the default of None has the same effect), or pass 'ignore' to ignore\n"
-"errors. (Note that ignoring encoding errors can lead to data loss.)\n"
-"See the documentation for codecs.register or run 'help(codecs.Codec)'\n"
-"for a list of the permitted encoding error strings.\n"
-"\n"
-"newline controls how universal newlines works (it only applies to text\n"
-"mode). It can be None, '', '\\n', '\\r', and '\\r\\n'. It works as\n"
-"follows:\n"
-"\n"
-"* On input, if newline is None, universal newlines mode is\n"
-" enabled. Lines in the input can end in '\\n', '\\r', or '\\r\\n', and\n"
-" these are translated into '\\n' before being returned to the\n"
-" caller. If it is '', universal newline mode is enabled, but line\n"
-" endings are returned to the caller untranslated. If it has any of\n"
-" the other legal values, input lines are only terminated by the given\n"
-" string, and the line ending is returned to the caller untranslated.\n"
-"\n"
-"* On output, if newline is None, any '\\n' characters written are\n"
-" translated to the system default line separator, os.linesep. If\n"
-" newline is '' or '\\n', no translation takes place. If newline is any\n"
-" of the other legal values, any '\\n' characters written are translated\n"
-" to the given string.\n"
-"\n"
-"If closefd is False, the underlying file descriptor will be kept open\n"
-"when the file is closed. This does not work when a file name is given\n"
-"and must be True in that case.\n"
-"\n"
-"A custom opener can be used by passing a callable as *opener*. The\n"
-"underlying file descriptor for the file object is then obtained by\n"
-"calling *opener* with (*file*, *flags*). *opener* must return an open\n"
-"file descriptor (passing os.open as *opener* results in functionality\n"
-"similar to passing None).\n"
-"\n"
-"open() returns a file object whose type depends on the mode, and\n"
-"through which the standard file operations such as reading and writing\n"
-"are performed. When open() is used to open a file in a text mode ('w',\n"
-"'r', 'wt', 'rt', etc.), it returns a TextIOWrapper. When used to open\n"
-"a file in a binary mode, the returned class varies: in read binary\n"
-"mode, it returns a BufferedReader; in write binary and append binary\n"
-"modes, it returns a BufferedWriter, and in read/write mode, it returns\n"
-"a BufferedRandom.\n"
-"\n"
-"It is also possible to use a string or bytearray as a file for both\n"
-"reading and writing. For strings StringIO can be used like a file\n"
-"opened in a text mode, and for bytes a BytesIO can be used like a file\n"
-"opened in a binary mode.\n"
- );
+/*[clinic input]
+module _io
+
+_io.open
+ file: object
+ mode: str = "r"
+ buffering: int = -1
+ encoding: str(accept={str, NoneType}) = NULL
+ errors: str(accept={str, NoneType}) = NULL
+ newline: str(accept={str, NoneType}) = NULL
+ closefd: int(c_default="1") = True
+ opener: object = None
+
+Open file and return a stream. Raise IOError upon failure.
+
+file is either a text or byte string giving the name (and the path
+if the file isn't in the current working directory) of the file to
+be opened or an integer file descriptor of the file to be
+wrapped. (If a file descriptor is given, it is closed when the
+returned I/O object is closed, unless closefd is set to False.)
+
+mode is an optional string that specifies the mode in which the file
+is opened. It defaults to 'r' which means open for reading in text
+mode. Other common values are 'w' for writing (truncating the file if
+it already exists), 'x' for creating and writing to a new file, and
+'a' for appending (which on some Unix systems, means that all writes
+append to the end of the file regardless of the current seek position).
+In text mode, if encoding is not specified the encoding used is platform
+dependent: locale.getpreferredencoding(False) is called to get the
+current locale encoding. (For reading and writing raw bytes use binary
+mode and leave encoding unspecified.) The available modes are:
+
+========= ===============================================================
+Character Meaning
+--------- ---------------------------------------------------------------
+'r' open for reading (default)
+'w' open for writing, truncating the file first
+'x' create a new file and open it for writing
+'a' open for writing, appending to the end of the file if it exists
+'b' binary mode
+'t' text mode (default)
+'+' open a disk file for updating (reading and writing)
+'U' universal newline mode (deprecated)
+========= ===============================================================
+
+The default mode is 'rt' (open for reading text). For binary random
+access, the mode 'w+b' opens and truncates the file to 0 bytes, while
+'r+b' opens the file without truncation. The 'x' mode implies 'w' and
+raises an `FileExistsError` if the file already exists.
+
+Python distinguishes between files opened in binary and text modes,
+even when the underlying operating system doesn't. Files opened in
+binary mode (appending 'b' to the mode argument) return contents as
+bytes objects without any decoding. In text mode (the default, or when
+'t' is appended to the mode argument), the contents of the file are
+returned as strings, the bytes having been first decoded using a
+platform-dependent encoding or using the specified encoding if given.
+
+'U' mode is deprecated and will raise an exception in future versions
+of Python. It has no effect in Python 3. Use newline to control
+universal newlines mode.
+
+buffering is an optional integer used to set the buffering policy.
+Pass 0 to switch buffering off (only allowed in binary mode), 1 to select
+line buffering (only usable in text mode), and an integer > 1 to indicate
+the size of a fixed-size chunk buffer. When no buffering argument is
+given, the default buffering policy works as follows:
+
+* Binary files are buffered in fixed-size chunks; the size of the buffer
+ is chosen using a heuristic trying to determine the underlying device's
+ "block size" and falling back on `io.DEFAULT_BUFFER_SIZE`.
+ On many systems, the buffer will typically be 4096 or 8192 bytes long.
+
+* "Interactive" text files (files for which isatty() returns True)
+ use line buffering. Other text files use the policy described above
+ for binary files.
+
+encoding is the name of the encoding used to decode or encode the
+file. This should only be used in text mode. The default encoding is
+platform dependent, but any encoding supported by Python can be
+passed. See the codecs module for the list of supported encodings.
+
+errors is an optional string that specifies how encoding errors are to
+be handled---this argument should not be used in binary mode. Pass
+'strict' to raise a ValueError exception if there is an encoding error
+(the default of None has the same effect), or pass 'ignore' to ignore
+errors. (Note that ignoring encoding errors can lead to data loss.)
+See the documentation for codecs.register or run 'help(codecs.Codec)'
+for a list of the permitted encoding error strings.
+
+newline controls how universal newlines works (it only applies to text
+mode). It can be None, '', '\n', '\r', and '\r\n'. It works as
+follows:
+
+* On input, if newline is None, universal newlines mode is
+ enabled. Lines in the input can end in '\n', '\r', or '\r\n', and
+ these are translated into '\n' before being returned to the
+ caller. If it is '', universal newline mode is enabled, but line
+ endings are returned to the caller untranslated. If it has any of
+ the other legal values, input lines are only terminated by the given
+ string, and the line ending is returned to the caller untranslated.
+
+* On output, if newline is None, any '\n' characters written are
+ translated to the system default line separator, os.linesep. If
+ newline is '' or '\n', no translation takes place. If newline is any
+ of the other legal values, any '\n' characters written are translated
+ to the given string.
+
+If closefd is False, the underlying file descriptor will be kept open
+when the file is closed. This does not work when a file name is given
+and must be True in that case.
+
+A custom opener can be used by passing a callable as *opener*. The
+underlying file descriptor for the file object is then obtained by
+calling *opener* with (*file*, *flags*). *opener* must return an open
+file descriptor (passing os.open as *opener* results in functionality
+similar to passing None).
+
+open() returns a file object whose type depends on the mode, and
+through which the standard file operations such as reading and writing
+are performed. When open() is used to open a file in a text mode ('w',
+'r', 'wt', 'rt', etc.), it returns a TextIOWrapper. When used to open
+a file in a binary mode, the returned class varies: in read binary
+mode, it returns a BufferedReader; in write binary and append binary
+modes, it returns a BufferedWriter, and in read/write mode, it returns
+a BufferedRandom.
+
+It is also possible to use a string or bytearray as a file for both
+reading and writing. For strings StringIO can be used like a file
+opened in a text mode, and for bytes a BytesIO can be used like a file
+opened in a binary mode.
+[clinic start generated code]*/
static PyObject *
-io_open(PyObject *self, PyObject *args, PyObject *kwds)
+_io_open_impl(PyModuleDef *module, PyObject *file, const char *mode,
+ int buffering, const char *encoding, const char *errors,
+ const char *newline, int closefd, PyObject *opener)
+/*[clinic end generated code: output=7615d0d746eb14d2 input=f4e1ca75223987bc]*/
{
- char *kwlist[] = {"file", "mode", "buffering",
- "encoding", "errors", "newline",
- "closefd", "opener", NULL};
- PyObject *file, *opener = Py_None;
- char *mode = "r";
- int buffering = -1, closefd = 1;
- char *encoding = NULL, *errors = NULL, *newline = NULL;
unsigned i;
int creating = 0, reading = 0, writing = 0, appending = 0, updating = 0;
@@ -237,18 +242,11 @@ io_open(PyObject *self, PyObject *args, PyObject *kwds)
PyObject *raw, *modeobj = NULL, *buffer, *wrapper, *result = NULL;
+ _Py_IDENTIFIER(_blksize);
_Py_IDENTIFIER(isatty);
- _Py_IDENTIFIER(fileno);
_Py_IDENTIFIER(mode);
_Py_IDENTIFIER(close);
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|sizzziO:open", kwlist,
- &file, &mode, &buffering,
- &encoding, &errors, &newline,
- &closefd, &opener)) {
- return NULL;
- }
-
if (!PyUnicode_Check(file) &&
!PyBytes_Check(file) &&
!PyNumber_Check(file)) {
@@ -380,24 +378,14 @@ io_open(PyObject *self, PyObject *args, PyObject *kwds)
line_buffering = 0;
if (buffering < 0) {
- buffering = DEFAULT_BUFFER_SIZE;
-#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
- {
- struct stat st;
- long fileno;
- PyObject *res = _PyObject_CallMethodId(raw, &PyId_fileno, NULL);
- if (res == NULL)
- goto error;
-
- fileno = PyLong_AsLong(res);
- Py_DECREF(res);
- if (fileno == -1 && PyErr_Occurred())
- goto error;
-
- if (fstat(fileno, &st) >= 0 && st.st_blksize > 1)
- buffering = st.st_blksize;
- }
-#endif
+ PyObject *blksize_obj;
+ blksize_obj = _PyObject_GetAttrId(raw, &PyId__blksize);
+ if (blksize_obj == NULL)
+ goto error;
+ buffering = PyLong_AsLong(blksize_obj);
+ Py_DECREF(blksize_obj);
+ if (buffering == -1 && PyErr_Occurred())
+ goto error;
}
if (buffering < 0) {
PyErr_SetString(PyExc_ValueError,
@@ -621,8 +609,10 @@ iomodule_free(PyObject *mod) {
* Module definition
*/
+#include "clinic/_iomodule.c.h"
+
static PyMethodDef module_methods[] = {
- {"open", (PyCFunction)io_open, METH_VARARGS|METH_KEYWORDS, open_doc},
+ _IO_OPEN_METHODDEF
{NULL, NULL}
};
diff --git a/Modules/_io/_iomodule.h b/Modules/_io/_iomodule.h
index 140f2608ce..0c6eae26b7 100644
--- a/Modules/_io/_iomodule.h
+++ b/Modules/_io/_iomodule.h
@@ -74,7 +74,7 @@ extern int _PyIO_trap_eintr(void);
* Offset type for positioning.
*/
-/* Printing a variable of type off_t (with e.g., PyString_FromFormat)
+/* Printing a variable of type off_t (with e.g., PyUnicode_FromFormat)
correctly and without producing compiler warnings is surprisingly painful.
We identify an integer type whose size matches off_t and then: (1) cast the
off_t to that integer type and (2) use the appropriate conversion
diff --git a/Modules/_io/bufferedio.c b/Modules/_io/bufferedio.c
index 365bb85c74..6d67751c7d 100644
--- a/Modules/_io/bufferedio.c
+++ b/Modules/_io/bufferedio.c
@@ -13,6 +13,24 @@
#include "pythread.h"
#include "_iomodule.h"
+/*[clinic input]
+module _io
+class _io._BufferedIOBase "PyObject *" "&PyBufferedIOBase_Type"
+class _io._Buffered "buffered *" "&PyBufferedIOBase_Type"
+class _io.BufferedReader "buffered *" "&PyBufferedReader_Type"
+class _io.BufferedWriter "buffered *" "&PyBufferedWriter_Type"
+class _io.BufferedRWPair "rwpair *" "&PyBufferedRWPair_Type"
+class _io.BufferedRandom "buffered *" "&PyBufferedRandom_Type"
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=59460b9c5639984d]*/
+
+/*[python input]
+class io_ssize_t_converter(CConverter):
+ type = 'Py_ssize_t'
+ converter = '_PyIO_ConvertSsize_t'
+[python start generated code]*/
+/*[python end generated code: output=da39a3ee5e6b4b0d input=d0a811d3cbfd1b33]*/
+
_Py_IDENTIFIER(close);
_Py_IDENTIFIER(_dealloc_warn);
_Py_IDENTIFIER(flush);
@@ -24,6 +42,7 @@ _Py_IDENTIFIER(read);
_Py_IDENTIFIER(read1);
_Py_IDENTIFIER(readable);
_Py_IDENTIFIER(readinto);
+_Py_IDENTIFIER(readinto1);
_Py_IDENTIFIER(writable);
_Py_IDENTIFIER(write);
@@ -47,45 +66,63 @@ PyDoc_STRVAR(bufferediobase_doc,
);
static PyObject *
-bufferediobase_readinto(PyObject *self, PyObject *args)
+_bufferediobase_readinto_generic(PyObject *self, Py_buffer *buffer, char readinto1)
{
- Py_buffer buf;
Py_ssize_t len;
PyObject *data;
- if (!PyArg_ParseTuple(args, "w*:readinto", &buf)) {
- return NULL;
- }
-
- data = _PyObject_CallMethodId(self, &PyId_read, "n", buf.len);
+ data = _PyObject_CallMethodId(self,
+ readinto1 ? &PyId_read1 : &PyId_read,
+ "n", buffer->len);
if (data == NULL)
- goto error;
+ return NULL;
if (!PyBytes_Check(data)) {
Py_DECREF(data);
PyErr_SetString(PyExc_TypeError, "read() should return bytes");
- goto error;
+ return NULL;
}
len = Py_SIZE(data);
- if (len > buf.len) {
+ if (len > buffer->len) {
PyErr_Format(PyExc_ValueError,
"read() returned too much data: "
"%zd bytes requested, %zd returned",
- buf.len, len);
+ buffer->len, len);
Py_DECREF(data);
- goto error;
+ return NULL;
}
- memcpy(buf.buf, PyBytes_AS_STRING(data), len);
+ memcpy(buffer->buf, PyBytes_AS_STRING(data), len);
- PyBuffer_Release(&buf);
Py_DECREF(data);
return PyLong_FromSsize_t(len);
+}
- error:
- PyBuffer_Release(&buf);
- return NULL;
+/*[clinic input]
+_io._BufferedIOBase.readinto
+ buffer: Py_buffer(accept={rwbuffer})
+ /
+[clinic start generated code]*/
+
+static PyObject *
+_io__BufferedIOBase_readinto_impl(PyObject *self, Py_buffer *buffer)
+/*[clinic end generated code: output=8c8cda6684af8038 input=00a6b9a38f29830a]*/
+{
+ return _bufferediobase_readinto_generic(self, buffer, 0);
+}
+
+/*[clinic input]
+_io._BufferedIOBase.readinto1
+ buffer: Py_buffer(accept={rwbuffer})
+ /
+[clinic start generated code]*/
+
+static PyObject *
+_io__BufferedIOBase_readinto1_impl(PyObject *self, Py_buffer *buffer)
+/*[clinic end generated code: output=358623e4fd2b69d3 input=ebad75b4aadfb9be]*/
+{
+ return _bufferediobase_readinto_generic(self, buffer, 1);
}
static PyObject *
@@ -97,14 +134,18 @@ bufferediobase_unsupported(const char *message)
return NULL;
}
-PyDoc_STRVAR(bufferediobase_detach_doc,
- "Disconnect this buffer from its underlying raw stream and return it.\n"
- "\n"
- "After the raw stream has been detached, the buffer is in an unusable\n"
- "state.\n");
+/*[clinic input]
+_io._BufferedIOBase.detach
+
+Disconnect this buffer from its underlying raw stream and return it.
+
+After the raw stream has been detached, the buffer is in an unusable
+state.
+[clinic start generated code]*/
static PyObject *
-bufferediobase_detach(PyObject *self)
+_io__BufferedIOBase_detach_impl(PyObject *self)
+/*[clinic end generated code: output=754977c8d10ed88c input=822427fb58fe4169]*/
{
return bufferediobase_unsupported("detach");
}
@@ -149,8 +190,8 @@ bufferediobase_read1(PyObject *self, PyObject *args)
PyDoc_STRVAR(bufferediobase_write_doc,
"Write the given buffer to the IO stream.\n"
"\n"
- "Returns the number of bytes written, which is never less than\n"
- "len(b).\n"
+ "Returns the number of bytes written, which is always the length of b\n"
+ "in bytes.\n"
"\n"
"Raises BlockingIOError if the buffer is full and the\n"
"underlying raw stream cannot accept more data at the moment.\n");
@@ -162,68 +203,6 @@ bufferediobase_write(PyObject *self, PyObject *args)
}
-static PyMethodDef bufferediobase_methods[] = {
- {"detach", (PyCFunction)bufferediobase_detach, METH_NOARGS, bufferediobase_detach_doc},
- {"read", bufferediobase_read, METH_VARARGS, bufferediobase_read_doc},
- {"read1", bufferediobase_read1, METH_VARARGS, bufferediobase_read1_doc},
- {"readinto", bufferediobase_readinto, METH_VARARGS, NULL},
- {"write", bufferediobase_write, METH_VARARGS, bufferediobase_write_doc},
- {NULL, NULL}
-};
-
-PyTypeObject PyBufferedIOBase_Type = {
- PyVarObject_HEAD_INIT(NULL, 0)
- "_io._BufferedIOBase", /*tp_name*/
- 0, /*tp_basicsize*/
- 0, /*tp_itemsize*/
- 0, /*tp_dealloc*/
- 0, /*tp_print*/
- 0, /*tp_getattr*/
- 0, /*tp_setattr*/
- 0, /*tp_compare */
- 0, /*tp_repr*/
- 0, /*tp_as_number*/
- 0, /*tp_as_sequence*/
- 0, /*tp_as_mapping*/
- 0, /*tp_hash */
- 0, /*tp_call*/
- 0, /*tp_str*/
- 0, /*tp_getattro*/
- 0, /*tp_setattro*/
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE
- | Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
- bufferediobase_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- bufferediobase_methods, /* tp_methods */
- 0, /* tp_members */
- 0, /* tp_getset */
- &PyIOBase_Type, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- 0, /* tp_init */
- 0, /* tp_alloc */
- 0, /* tp_new */
- 0, /* tp_free */
- 0, /* tp_is_gc */
- 0, /* tp_bases */
- 0, /* tp_mro */
- 0, /* tp_cache */
- 0, /* tp_subclasses */
- 0, /* tp_weaklist */
- 0, /* tp_del */
- 0, /* tp_version_tag */
- 0, /* tp_finalize */
-};
-
-
typedef struct {
PyObject_HEAD
@@ -318,7 +297,7 @@ _enter_buffered_busy(buffered *self)
* Note that non-daemon threads have already exited here, so this
* shouldn't affect carefully written threaded I/O code.
*/
- st = PyThread_acquire_lock_timed(self->lock, 1e6, 0);
+ st = PyThread_acquire_lock_timed(self->lock, (PY_TIMEOUT_T)1e6, 0);
}
Py_END_ALLOW_THREADS
if (relax_locking && st != PY_LOCK_ACQUIRED) {
@@ -444,7 +423,7 @@ buffered_sizeof(buffered *self, void *unused)
{
Py_ssize_t res;
- res = sizeof(buffered);
+ res = _PyObject_SIZE(Py_TYPE(self));
if (self->buffer)
res += self->buffer_size;
return PyLong_FromSsize_t(res);
@@ -683,11 +662,7 @@ static void
_set_BlockingIOError(char *msg, Py_ssize_t written)
{
PyObject *err;
-#ifdef Py_DEBUG
- /* in debug mode, PyEval_EvalFrameEx() fails with an assertion error
- if an exception is set when it is called */
PyErr_Clear();
-#endif
err = PyObject_CallFunction(PyExc_BlockingIOError, "isn",
errno, msg, written);
if (err)
@@ -882,19 +857,22 @@ buffered_flush(buffered *self, PyObject *args)
return res;
}
+/*[clinic input]
+_io._Buffered.peek
+ size: Py_ssize_t = 0
+ /
+
+[clinic start generated code]*/
+
static PyObject *
-buffered_peek(buffered *self, PyObject *args)
+_io__Buffered_peek_impl(buffered *self, Py_ssize_t size)
+/*[clinic end generated code: output=ba7a097ca230102b input=37ffb97d06ff4adb]*/
{
- Py_ssize_t n = 0;
PyObject *res = NULL;
CHECK_INITIALIZED(self)
CHECK_CLOSED(self, "peek of closed file")
- if (!PyArg_ParseTuple(args, "|n:peek", &n)) {
- return NULL;
- }
-
if (!ENTER_BUFFERED(self))
return NULL;
@@ -911,16 +889,19 @@ end:
return res;
}
+/*[clinic input]
+_io._Buffered.read
+ size as n: io_ssize_t = -1
+ /
+[clinic start generated code]*/
+
static PyObject *
-buffered_read(buffered *self, PyObject *args)
+_io__Buffered_read_impl(buffered *self, Py_ssize_t n)
+/*[clinic end generated code: output=f41c78bb15b9bbe9 input=c0939ec7f9e9354f]*/
{
- Py_ssize_t n = -1;
PyObject *res;
CHECK_INITIALIZED(self)
- if (!PyArg_ParseTuple(args, "|O&:read", &_PyIO_ConvertSsize_t, &n)) {
- return NULL;
- }
if (n < -1) {
PyErr_SetString(PyExc_ValueError,
"read length must be positive or -1");
@@ -949,17 +930,20 @@ buffered_read(buffered *self, PyObject *args)
return res;
}
+/*[clinic input]
+_io._Buffered.read1
+ size as n: Py_ssize_t
+ /
+[clinic start generated code]*/
+
static PyObject *
-buffered_read1(buffered *self, PyObject *args)
+_io__Buffered_read1_impl(buffered *self, Py_ssize_t n)
+/*[clinic end generated code: output=bcc4fb4e54d103a3 input=8d2869c18b983184]*/
{
- Py_ssize_t n, have, r;
+ Py_ssize_t have, r;
PyObject *res = NULL;
CHECK_INITIALIZED(self)
- if (!PyArg_ParseTuple(args, "n:read1", &n)) {
- return NULL;
- }
-
if (n < 0) {
PyErr_SetString(PyExc_ValueError,
"read length must be positive");
@@ -1003,32 +987,27 @@ buffered_read1(buffered *self, PyObject *args)
}
static PyObject *
-buffered_readinto(buffered *self, PyObject *args)
+_buffered_readinto_generic(buffered *self, Py_buffer *buffer, char readinto1)
{
- Py_buffer buf;
Py_ssize_t n, written = 0, remaining;
PyObject *res = NULL;
CHECK_INITIALIZED(self)
- if (!PyArg_ParseTuple(args, "w*:readinto", &buf))
- return NULL;
-
n = Py_SAFE_DOWNCAST(READAHEAD(self), Py_off_t, Py_ssize_t);
if (n > 0) {
- if (n >= buf.len) {
- memcpy(buf.buf, self->buffer + self->pos, buf.len);
- self->pos += buf.len;
- res = PyLong_FromSsize_t(buf.len);
- goto end_unlocked;
+ if (n >= buffer->len) {
+ memcpy(buffer->buf, self->buffer + self->pos, buffer->len);
+ self->pos += buffer->len;
+ return PyLong_FromSsize_t(buffer->len);
}
- memcpy(buf.buf, self->buffer + self->pos, n);
+ memcpy(buffer->buf, self->buffer + self->pos, n);
self->pos += n;
written = n;
}
if (!ENTER_BUFFERED(self))
- goto end_unlocked;
+ return NULL;
if (self->writable) {
res = buffered_flush_and_rewind_unlocked(self);
@@ -1040,26 +1019,32 @@ buffered_readinto(buffered *self, PyObject *args)
_bufferedreader_reset_buf(self);
self->pos = 0;
- for (remaining = buf.len - written;
+ for (remaining = buffer->len - written;
remaining > 0;
written += n, remaining -= n) {
/* If remaining bytes is larger than internal buffer size, copy
* directly into caller's buffer. */
if (remaining > self->buffer_size) {
- n = _bufferedreader_raw_read(self, (char *) buf.buf + written,
+ n = _bufferedreader_raw_read(self, (char *) buffer->buf + written,
remaining);
}
- else {
+
+ /* In readinto1 mode, we do not want to fill the internal
+ buffer if we already have some data to return */
+ else if (!(readinto1 && written)) {
n = _bufferedreader_fill_buffer(self);
if (n > 0) {
if (n > remaining)
n = remaining;
- memcpy((char *) buf.buf + written,
+ memcpy((char *) buffer->buf + written,
self->buffer + self->pos, n);
self->pos += n;
continue; /* short circuit */
}
}
+ else
+ n = 0;
+
if (n == 0 || (n == -2 && written > 0))
break;
if (n < 0) {
@@ -1069,16 +1054,47 @@ buffered_readinto(buffered *self, PyObject *args)
}
goto end;
}
+
+ /* At most one read in readinto1 mode */
+ if (readinto1) {
+ written += n;
+ break;
+ }
}
res = PyLong_FromSsize_t(written);
end:
LEAVE_BUFFERED(self);
-end_unlocked:
- PyBuffer_Release(&buf);
return res;
}
+/*[clinic input]
+_io._Buffered.readinto
+ buffer: Py_buffer(accept={rwbuffer})
+ /
+[clinic start generated code]*/
+
+static PyObject *
+_io__Buffered_readinto_impl(buffered *self, Py_buffer *buffer)
+/*[clinic end generated code: output=bcb376580b1d8170 input=ed6b98b7a20a3008]*/
+{
+ return _buffered_readinto_generic(self, buffer, 0);
+}
+
+/*[clinic input]
+_io._Buffered.readinto1
+ buffer: Py_buffer(accept={rwbuffer})
+ /
+[clinic start generated code]*/
+
+static PyObject *
+_io__Buffered_readinto1_impl(buffered *self, Py_buffer *buffer)
+/*[clinic end generated code: output=6e5c6ac5868205d6 input=4455c5d55fdf1687]*/
+{
+ return _buffered_readinto_generic(self, buffer, 1);
+}
+
+
static PyObject *
_buffered_readline(buffered *self, Py_ssize_t limit)
{
@@ -1180,8 +1196,7 @@ found:
Py_CLEAR(res);
goto end;
}
- Py_CLEAR(res);
- res = _PyBytes_Join(_PyIO_empty_bytes, chunks);
+ Py_XSETREF(res, _PyBytes_Join(_PyIO_empty_bytes, chunks));
end:
LEAVE_BUFFERED(self)
@@ -1190,15 +1205,18 @@ end_unlocked:
return res;
}
+/*[clinic input]
+_io._Buffered.readline
+ size: io_ssize_t = -1
+ /
+[clinic start generated code]*/
+
static PyObject *
-buffered_readline(buffered *self, PyObject *args)
+_io__Buffered_readline_impl(buffered *self, Py_ssize_t size)
+/*[clinic end generated code: output=24dd2aa6e33be83c input=ff1e0df821cb4e5c]*/
{
- Py_ssize_t limit = -1;
-
CHECK_INITIALIZED(self)
- if (!PyArg_ParseTuple(args, "|O&:readline", &_PyIO_ConvertSsize_t, &limit))
- return NULL;
- return _buffered_readline(self, limit);
+ return _buffered_readline(self, size);
}
@@ -1216,17 +1234,21 @@ buffered_tell(buffered *self, PyObject *args)
return PyLong_FromOff_t(pos);
}
+/*[clinic input]
+_io._Buffered.seek
+ target as targetobj: object
+ whence: int = 0
+ /
+[clinic start generated code]*/
+
static PyObject *
-buffered_seek(buffered *self, PyObject *args)
+_io__Buffered_seek_impl(buffered *self, PyObject *targetobj, int whence)
+/*[clinic end generated code: output=7ae0e8dc46efdefb input=a9c4920bfcba6163]*/
{
Py_off_t target, n;
- int whence = 0;
- PyObject *targetobj, *res = NULL;
+ PyObject *res = NULL;
CHECK_INITIALIZED(self)
- if (!PyArg_ParseTuple(args, "O|i:seek", &targetobj, &whence)) {
- return NULL;
- }
/* Do some error checking instead of trusting OS 'seek()'
** error detection, just in case.
@@ -1308,17 +1330,19 @@ end:
return res;
}
+/*[clinic input]
+_io._Buffered.truncate
+ pos: object = None
+ /
+[clinic start generated code]*/
+
static PyObject *
-buffered_truncate(buffered *self, PyObject *args)
+_io__Buffered_truncate_impl(buffered *self, PyObject *pos)
+/*[clinic end generated code: output=667ca03c60c270de input=8a1be34d57cca2d3]*/
{
- PyObject *pos = Py_None;
PyObject *res = NULL;
CHECK_INITIALIZED(self)
- if (!PyArg_ParseTuple(args, "|O:truncate", &pos)) {
- return NULL;
- }
-
if (!ENTER_BUFFERED(self))
return NULL;
@@ -1403,35 +1427,32 @@ buffered_repr(buffered *self)
* class BufferedReader
*/
-PyDoc_STRVAR(bufferedreader_doc,
- "Create a new buffered reader using the given readable raw IO object.");
-
static void _bufferedreader_reset_buf(buffered *self)
{
self->read_end = -1;
}
+/*[clinic input]
+_io.BufferedReader.__init__
+ raw: object
+ buffer_size: Py_ssize_t(c_default="DEFAULT_BUFFER_SIZE") = DEFAULT_BUFFER_SIZE
+
+Create a new buffered reader using the given readable raw IO object.
+[clinic start generated code]*/
+
static int
-bufferedreader_init(buffered *self, PyObject *args, PyObject *kwds)
+_io_BufferedReader___init___impl(buffered *self, PyObject *raw,
+ Py_ssize_t buffer_size)
+/*[clinic end generated code: output=cddcfefa0ed294c4 input=fb887e06f11b4e48]*/
{
- char *kwlist[] = {"raw", "buffer_size", NULL};
- Py_ssize_t buffer_size = DEFAULT_BUFFER_SIZE;
- PyObject *raw;
-
self->ok = 0;
self->detached = 0;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|n:BufferedReader", kwlist,
- &raw, &buffer_size)) {
- return -1;
- }
-
if (_PyIOBase_check_readable(raw, Py_True) == NULL)
return -1;
- Py_CLEAR(self->raw);
Py_INCREF(raw);
- self->raw = raw;
+ Py_XSETREF(self->raw, raw);
self->buffer_size = buffer_size;
self->readable = 1;
self->writable = 0;
@@ -1746,111 +1767,12 @@ _bufferedreader_peek_unlocked(buffered *self)
self->pos = 0;
return PyBytes_FromStringAndSize(self->buffer, r);
}
-
-static PyMethodDef bufferedreader_methods[] = {
- /* BufferedIOMixin methods */
- {"detach", (PyCFunction)buffered_detach, METH_NOARGS},
- {"flush", (PyCFunction)buffered_simple_flush, METH_NOARGS},
- {"close", (PyCFunction)buffered_close, METH_NOARGS},
- {"seekable", (PyCFunction)buffered_seekable, METH_NOARGS},
- {"readable", (PyCFunction)buffered_readable, METH_NOARGS},
- {"writable", (PyCFunction)buffered_writable, METH_NOARGS},
- {"fileno", (PyCFunction)buffered_fileno, METH_NOARGS},
- {"isatty", (PyCFunction)buffered_isatty, METH_NOARGS},
- {"_dealloc_warn", (PyCFunction)buffered_dealloc_warn, METH_O},
- {"__getstate__", (PyCFunction)buffered_getstate, METH_NOARGS},
-
- {"read", (PyCFunction)buffered_read, METH_VARARGS},
- {"peek", (PyCFunction)buffered_peek, METH_VARARGS},
- {"read1", (PyCFunction)buffered_read1, METH_VARARGS},
- {"readinto", (PyCFunction)buffered_readinto, METH_VARARGS},
- {"readline", (PyCFunction)buffered_readline, METH_VARARGS},
- {"seek", (PyCFunction)buffered_seek, METH_VARARGS},
- {"tell", (PyCFunction)buffered_tell, METH_NOARGS},
- {"truncate", (PyCFunction)buffered_truncate, METH_VARARGS},
- {"__sizeof__", (PyCFunction)buffered_sizeof, METH_NOARGS},
- {NULL, NULL}
-};
-
-static PyMemberDef bufferedreader_members[] = {
- {"raw", T_OBJECT, offsetof(buffered, raw), READONLY},
- {"_finalizing", T_BOOL, offsetof(buffered, finalizing), 0},
- {NULL}
-};
-
-static PyGetSetDef bufferedreader_getset[] = {
- {"closed", (getter)buffered_closed_get, NULL, NULL},
- {"name", (getter)buffered_name_get, NULL, NULL},
- {"mode", (getter)buffered_mode_get, NULL, NULL},
- {NULL}
-};
-
-
-PyTypeObject PyBufferedReader_Type = {
- PyVarObject_HEAD_INIT(NULL, 0)
- "_io.BufferedReader", /*tp_name*/
- sizeof(buffered), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- (destructor)buffered_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- 0, /*tp_getattr*/
- 0, /*tp_setattr*/
- 0, /*tp_compare */
- (reprfunc)buffered_repr, /*tp_repr*/
- 0, /*tp_as_number*/
- 0, /*tp_as_sequence*/
- 0, /*tp_as_mapping*/
- 0, /*tp_hash */
- 0, /*tp_call*/
- 0, /*tp_str*/
- 0, /*tp_getattro*/
- 0, /*tp_setattro*/
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE
- | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
- bufferedreader_doc, /* tp_doc */
- (traverseproc)buffered_traverse, /* tp_traverse */
- (inquiry)buffered_clear, /* tp_clear */
- 0, /* tp_richcompare */
- offsetof(buffered, weakreflist), /*tp_weaklistoffset*/
- 0, /* tp_iter */
- (iternextfunc)buffered_iternext, /* tp_iternext */
- bufferedreader_methods, /* tp_methods */
- bufferedreader_members, /* tp_members */
- bufferedreader_getset, /* tp_getset */
- 0, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- offsetof(buffered, dict), /* tp_dictoffset */
- (initproc)bufferedreader_init, /* tp_init */
- 0, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
- 0, /* tp_free */
- 0, /* tp_is_gc */
- 0, /* tp_bases */
- 0, /* tp_mro */
- 0, /* tp_cache */
- 0, /* tp_subclasses */
- 0, /* tp_weaklist */
- 0, /* tp_del */
- 0, /* tp_version_tag */
- 0, /* tp_finalize */
-};
/*
* class BufferedWriter
*/
-PyDoc_STRVAR(bufferedwriter_doc,
- "A buffer for a writeable sequential RawIO object.\n"
- "\n"
- "The constructor creates a BufferedWriter for the given writeable raw\n"
- "stream. If the buffer_size is not given, it defaults to\n"
- "DEFAULT_BUFFER_SIZE.\n"
- );
-
static void
_bufferedwriter_reset_buf(buffered *self)
{
@@ -1858,27 +1780,31 @@ _bufferedwriter_reset_buf(buffered *self)
self->write_end = -1;
}
+/*[clinic input]
+_io.BufferedWriter.__init__
+ raw: object
+ buffer_size: Py_ssize_t(c_default="DEFAULT_BUFFER_SIZE") = DEFAULT_BUFFER_SIZE
+
+A buffer for a writeable sequential RawIO object.
+
+The constructor creates a BufferedWriter for the given writeable raw
+stream. If the buffer_size is not given, it defaults to
+DEFAULT_BUFFER_SIZE.
+[clinic start generated code]*/
+
static int
-bufferedwriter_init(buffered *self, PyObject *args, PyObject *kwds)
+_io_BufferedWriter___init___impl(buffered *self, PyObject *raw,
+ Py_ssize_t buffer_size)
+/*[clinic end generated code: output=c8942a020c0dee64 input=914be9b95e16007b]*/
{
- char *kwlist[] = {"raw", "buffer_size", NULL};
- Py_ssize_t buffer_size = DEFAULT_BUFFER_SIZE;
- PyObject *raw;
-
self->ok = 0;
self->detached = 0;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|n:BufferedWriter", kwlist,
- &raw, &buffer_size)) {
- return -1;
- }
-
if (_PyIOBase_check_writable(raw, Py_True) == NULL)
return -1;
- Py_CLEAR(self->raw);
Py_INCREF(raw);
- self->raw = raw;
+ Py_XSETREF(self->raw, raw);
self->readable = 0;
self->writable = 1;
@@ -1993,29 +1919,28 @@ error:
return NULL;
}
+/*[clinic input]
+_io.BufferedWriter.write
+ buffer: Py_buffer
+ /
+[clinic start generated code]*/
+
static PyObject *
-bufferedwriter_write(buffered *self, PyObject *args)
+_io_BufferedWriter_write_impl(buffered *self, Py_buffer *buffer)
+/*[clinic end generated code: output=7f8d1365759bfc6b input=dd87dd85fc7f8850]*/
{
PyObject *res = NULL;
- Py_buffer buf;
Py_ssize_t written, avail, remaining;
Py_off_t offset;
CHECK_INITIALIZED(self)
- if (!PyArg_ParseTuple(args, "y*:write", &buf)) {
- return NULL;
- }
-
if (IS_CLOSED(self)) {
PyErr_SetString(PyExc_ValueError, "write to closed file");
- PyBuffer_Release(&buf);
return NULL;
}
- if (!ENTER_BUFFERED(self)) {
- PyBuffer_Release(&buf);
+ if (!ENTER_BUFFERED(self))
return NULL;
- }
/* Fast path: the data to write can be fully buffered. */
if (!VALID_READ_BUFFER(self) && !VALID_WRITE_BUFFER(self)) {
@@ -2023,15 +1948,15 @@ bufferedwriter_write(buffered *self, PyObject *args)
self->raw_pos = 0;
}
avail = Py_SAFE_DOWNCAST(self->buffer_size - self->pos, Py_off_t, Py_ssize_t);
- if (buf.len <= avail) {
- memcpy(self->buffer + self->pos, buf.buf, buf.len);
+ if (buffer->len <= avail) {
+ memcpy(self->buffer + self->pos, buffer->buf, buffer->len);
if (!VALID_WRITE_BUFFER(self) || self->write_pos > self->pos) {
self->write_pos = self->pos;
}
- ADJUST_POSITION(self, self->pos + buf.len);
+ ADJUST_POSITION(self, self->pos + buffer->len);
if (self->pos > self->write_end)
self->write_end = self->pos;
- written = buf.len;
+ written = buffer->len;
goto end;
}
@@ -2054,17 +1979,17 @@ bufferedwriter_write(buffered *self, PyObject *args)
self->write_pos = 0;
avail = Py_SAFE_DOWNCAST(self->buffer_size - self->write_end,
Py_off_t, Py_ssize_t);
- if (buf.len <= avail) {
+ if (buffer->len <= avail) {
/* Everything can be buffered */
PyErr_Clear();
- memcpy(self->buffer + self->write_end, buf.buf, buf.len);
- self->write_end += buf.len;
- self->pos += buf.len;
- written = buf.len;
+ memcpy(self->buffer + self->write_end, buffer->buf, buffer->len);
+ self->write_end += buffer->len;
+ self->pos += buffer->len;
+ written = buffer->len;
goto end;
}
/* Buffer as much as possible. */
- memcpy(self->buffer + self->write_end, buf.buf, avail);
+ memcpy(self->buffer + self->write_end, buffer->buf, avail);
self->write_end += avail;
self->pos += avail;
/* XXX Modifying the existing exception e using the pointer w
@@ -2090,11 +2015,11 @@ bufferedwriter_write(buffered *self, PyObject *args)
}
/* Then write buf itself. At this point the buffer has been emptied. */
- remaining = buf.len;
+ remaining = buffer->len;
written = 0;
while (remaining > self->buffer_size) {
Py_ssize_t n = _bufferedwriter_raw_write(
- self, (char *) buf.buf + written, buf.len - written);
+ self, (char *) buffer->buf + written, buffer->len - written);
if (n == -1) {
goto error;
} else if (n == -2) {
@@ -2102,7 +2027,7 @@ bufferedwriter_write(buffered *self, PyObject *args)
if (remaining > self->buffer_size) {
/* Can't buffer everything, still buffer as much as possible */
memcpy(self->buffer,
- (char *) buf.buf + written, self->buffer_size);
+ (char *) buffer->buf + written, self->buffer_size);
self->raw_pos = 0;
ADJUST_POSITION(self, self->buffer_size);
self->write_end = self->buffer_size;
@@ -2125,7 +2050,7 @@ bufferedwriter_write(buffered *self, PyObject *args)
if (self->readable)
_bufferedreader_reset_buf(self);
if (remaining > 0) {
- memcpy(self->buffer, (char *) buf.buf + written, remaining);
+ memcpy(self->buffer, (char *) buffer->buf + written, remaining);
written += remaining;
}
self->write_pos = 0;
@@ -2139,96 +2064,8 @@ end:
error:
LEAVE_BUFFERED(self)
- PyBuffer_Release(&buf);
return res;
}
-
-static PyMethodDef bufferedwriter_methods[] = {
- /* BufferedIOMixin methods */
- {"close", (PyCFunction)buffered_close, METH_NOARGS},
- {"detach", (PyCFunction)buffered_detach, METH_NOARGS},
- {"seekable", (PyCFunction)buffered_seekable, METH_NOARGS},
- {"readable", (PyCFunction)buffered_readable, METH_NOARGS},
- {"writable", (PyCFunction)buffered_writable, METH_NOARGS},
- {"fileno", (PyCFunction)buffered_fileno, METH_NOARGS},
- {"isatty", (PyCFunction)buffered_isatty, METH_NOARGS},
- {"_dealloc_warn", (PyCFunction)buffered_dealloc_warn, METH_O},
- {"__getstate__", (PyCFunction)buffered_getstate, METH_NOARGS},
-
- {"write", (PyCFunction)bufferedwriter_write, METH_VARARGS},
- {"truncate", (PyCFunction)buffered_truncate, METH_VARARGS},
- {"flush", (PyCFunction)buffered_flush, METH_NOARGS},
- {"seek", (PyCFunction)buffered_seek, METH_VARARGS},
- {"tell", (PyCFunction)buffered_tell, METH_NOARGS},
- {"__sizeof__", (PyCFunction)buffered_sizeof, METH_NOARGS},
- {NULL, NULL}
-};
-
-static PyMemberDef bufferedwriter_members[] = {
- {"raw", T_OBJECT, offsetof(buffered, raw), READONLY},
- {"_finalizing", T_BOOL, offsetof(buffered, finalizing), 0},
- {NULL}
-};
-
-static PyGetSetDef bufferedwriter_getset[] = {
- {"closed", (getter)buffered_closed_get, NULL, NULL},
- {"name", (getter)buffered_name_get, NULL, NULL},
- {"mode", (getter)buffered_mode_get, NULL, NULL},
- {NULL}
-};
-
-
-PyTypeObject PyBufferedWriter_Type = {
- PyVarObject_HEAD_INIT(NULL, 0)
- "_io.BufferedWriter", /*tp_name*/
- sizeof(buffered), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- (destructor)buffered_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- 0, /*tp_getattr*/
- 0, /*tp_setattr*/
- 0, /*tp_compare */
- (reprfunc)buffered_repr, /*tp_repr*/
- 0, /*tp_as_number*/
- 0, /*tp_as_sequence*/
- 0, /*tp_as_mapping*/
- 0, /*tp_hash */
- 0, /*tp_call*/
- 0, /*tp_str*/
- 0, /*tp_getattro*/
- 0, /*tp_setattro*/
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE
- | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
- bufferedwriter_doc, /* tp_doc */
- (traverseproc)buffered_traverse, /* tp_traverse */
- (inquiry)buffered_clear, /* tp_clear */
- 0, /* tp_richcompare */
- offsetof(buffered, weakreflist), /*tp_weaklistoffset*/
- 0, /* tp_iter */
- 0, /* tp_iternext */
- bufferedwriter_methods, /* tp_methods */
- bufferedwriter_members, /* tp_members */
- bufferedwriter_getset, /* tp_getset */
- 0, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- offsetof(buffered, dict), /* tp_dictoffset */
- (initproc)bufferedwriter_init, /* tp_init */
- 0, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
- 0, /* tp_free */
- 0, /* tp_is_gc */
- 0, /* tp_bases */
- 0, /* tp_mro */
- 0, /* tp_cache */
- 0, /* tp_subclasses */
- 0, /* tp_weaklist */
- 0, /* tp_del */
- 0, /* tp_version_tag */
- 0, /* tp_finalize */
-};
@@ -2236,18 +2073,6 @@ PyTypeObject PyBufferedWriter_Type = {
* BufferedRWPair
*/
-PyDoc_STRVAR(bufferedrwpair_doc,
- "A buffered reader and writer object together.\n"
- "\n"
- "A buffered reader object and buffered writer object put together to\n"
- "form a sequential IO object that can read and write. This is typically\n"
- "used with a socket or two-way pipe.\n"
- "\n"
- "reader and writer are RawIOBase objects that are readable and\n"
- "writeable respectively. If the buffer_size is omitted it defaults to\n"
- "DEFAULT_BUFFER_SIZE.\n"
- );
-
/* XXX The usefulness of this (compared to having two separate IO objects) is
* questionable.
*/
@@ -2260,17 +2085,29 @@ typedef struct {
PyObject *weakreflist;
} rwpair;
-static int
-bufferedrwpair_init(rwpair *self, PyObject *args, PyObject *kwds)
-{
- PyObject *reader, *writer;
- Py_ssize_t buffer_size = DEFAULT_BUFFER_SIZE;
+/*[clinic input]
+_io.BufferedRWPair.__init__
+ reader: object
+ writer: object
+ buffer_size: Py_ssize_t(c_default="DEFAULT_BUFFER_SIZE") = DEFAULT_BUFFER_SIZE
+ /
- if (!PyArg_ParseTuple(args, "OO|n:BufferedRWPair", &reader, &writer,
- &buffer_size)) {
- return -1;
- }
+A buffered reader and writer object together.
+
+A buffered reader object and buffered writer object put together to
+form a sequential IO object that can read and write. This is typically
+used with a socket or two-way pipe.
+
+reader and writer are RawIOBase objects that are readable and
+writeable respectively. If the buffer_size is omitted it defaults to
+DEFAULT_BUFFER_SIZE.
+[clinic start generated code]*/
+static int
+_io_BufferedRWPair___init___impl(rwpair *self, PyObject *reader,
+ PyObject *writer, Py_ssize_t buffer_size)
+/*[clinic end generated code: output=327e73d1aee8f984 input=620d42d71f33a031]*/
+{
if (_PyIOBase_check_readable(reader, Py_True) == NULL)
return -1;
if (_PyIOBase_check_writable(writer, Py_True) == NULL)
@@ -2365,6 +2202,12 @@ bufferedrwpair_readinto(rwpair *self, PyObject *args)
}
static PyObject *
+bufferedrwpair_readinto1(rwpair *self, PyObject *args)
+{
+ return _forward_call(self->reader, &PyId_readinto1, args);
+}
+
+static PyObject *
bufferedrwpair_write(rwpair *self, PyObject *args)
{
return _forward_call(self->writer, &PyId_write, args);
@@ -2429,12 +2272,310 @@ bufferedrwpair_closed_get(rwpair *self, void *context)
}
return PyObject_GetAttr((PyObject *) self->writer, _PyIO_str_closed);
}
+
+
+
+/*
+ * BufferedRandom
+ */
+
+/*[clinic input]
+_io.BufferedRandom.__init__
+ raw: object
+ buffer_size: Py_ssize_t(c_default="DEFAULT_BUFFER_SIZE") = DEFAULT_BUFFER_SIZE
+
+A buffered interface to random access streams.
+
+The constructor creates a reader and writer for a seekable stream,
+raw, given in the first argument. If the buffer_size is omitted it
+defaults to DEFAULT_BUFFER_SIZE.
+[clinic start generated code]*/
+
+static int
+_io_BufferedRandom___init___impl(buffered *self, PyObject *raw,
+ Py_ssize_t buffer_size)
+/*[clinic end generated code: output=d3d64eb0f64e64a3 input=a4e818fb86d0e50c]*/
+{
+ self->ok = 0;
+ self->detached = 0;
+
+ if (_PyIOBase_check_seekable(raw, Py_True) == NULL)
+ return -1;
+ if (_PyIOBase_check_readable(raw, Py_True) == NULL)
+ return -1;
+ if (_PyIOBase_check_writable(raw, Py_True) == NULL)
+ return -1;
+
+ Py_INCREF(raw);
+ Py_XSETREF(self->raw, raw);
+ self->buffer_size = buffer_size;
+ self->readable = 1;
+ self->writable = 1;
+
+ if (_buffered_init(self) < 0)
+ return -1;
+ _bufferedreader_reset_buf(self);
+ _bufferedwriter_reset_buf(self);
+ self->pos = 0;
+
+ self->fast_closed_checks = (Py_TYPE(self) == &PyBufferedRandom_Type &&
+ Py_TYPE(raw) == &PyFileIO_Type);
+
+ self->ok = 1;
+ return 0;
+}
+
+#include "clinic/bufferedio.c.h"
+
+
+static PyMethodDef bufferediobase_methods[] = {
+ _IO__BUFFEREDIOBASE_DETACH_METHODDEF
+ {"read", bufferediobase_read, METH_VARARGS, bufferediobase_read_doc},
+ {"read1", bufferediobase_read1, METH_VARARGS, bufferediobase_read1_doc},
+ _IO__BUFFEREDIOBASE_READINTO_METHODDEF
+ _IO__BUFFEREDIOBASE_READINTO1_METHODDEF
+ {"write", bufferediobase_write, METH_VARARGS, bufferediobase_write_doc},
+ {NULL, NULL}
+};
+
+PyTypeObject PyBufferedIOBase_Type = {
+ PyVarObject_HEAD_INIT(NULL, 0)
+ "_io._BufferedIOBase", /*tp_name*/
+ 0, /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ 0, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ 0, /*tp_compare */
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash */
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE
+ | Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
+ bufferediobase_doc, /* tp_doc */
+ 0, /* tp_traverse */
+ 0, /* tp_clear */
+ 0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ 0, /* tp_iter */
+ 0, /* tp_iternext */
+ bufferediobase_methods, /* tp_methods */
+ 0, /* tp_members */
+ 0, /* tp_getset */
+ &PyIOBase_Type, /* tp_base */
+ 0, /* tp_dict */
+ 0, /* tp_descr_get */
+ 0, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ 0, /* tp_init */
+ 0, /* tp_alloc */
+ 0, /* tp_new */
+ 0, /* tp_free */
+ 0, /* tp_is_gc */
+ 0, /* tp_bases */
+ 0, /* tp_mro */
+ 0, /* tp_cache */
+ 0, /* tp_subclasses */
+ 0, /* tp_weaklist */
+ 0, /* tp_del */
+ 0, /* tp_version_tag */
+ 0, /* tp_finalize */
+};
+
+
+static PyMethodDef bufferedreader_methods[] = {
+ /* BufferedIOMixin methods */
+ {"detach", (PyCFunction)buffered_detach, METH_NOARGS},
+ {"flush", (PyCFunction)buffered_simple_flush, METH_NOARGS},
+ {"close", (PyCFunction)buffered_close, METH_NOARGS},
+ {"seekable", (PyCFunction)buffered_seekable, METH_NOARGS},
+ {"readable", (PyCFunction)buffered_readable, METH_NOARGS},
+ {"fileno", (PyCFunction)buffered_fileno, METH_NOARGS},
+ {"isatty", (PyCFunction)buffered_isatty, METH_NOARGS},
+ {"_dealloc_warn", (PyCFunction)buffered_dealloc_warn, METH_O},
+ {"__getstate__", (PyCFunction)buffered_getstate, METH_NOARGS},
+
+ _IO__BUFFERED_READ_METHODDEF
+ _IO__BUFFERED_PEEK_METHODDEF
+ _IO__BUFFERED_READ1_METHODDEF
+ _IO__BUFFERED_READINTO_METHODDEF
+ _IO__BUFFERED_READINTO1_METHODDEF
+ _IO__BUFFERED_READLINE_METHODDEF
+ _IO__BUFFERED_SEEK_METHODDEF
+ {"tell", (PyCFunction)buffered_tell, METH_NOARGS},
+ _IO__BUFFERED_TRUNCATE_METHODDEF
+ {"__sizeof__", (PyCFunction)buffered_sizeof, METH_NOARGS},
+ {NULL, NULL}
+};
+
+static PyMemberDef bufferedreader_members[] = {
+ {"raw", T_OBJECT, offsetof(buffered, raw), READONLY},
+ {"_finalizing", T_BOOL, offsetof(buffered, finalizing), 0},
+ {NULL}
+};
+
+static PyGetSetDef bufferedreader_getset[] = {
+ {"closed", (getter)buffered_closed_get, NULL, NULL},
+ {"name", (getter)buffered_name_get, NULL, NULL},
+ {"mode", (getter)buffered_mode_get, NULL, NULL},
+ {NULL}
+};
+
+
+PyTypeObject PyBufferedReader_Type = {
+ PyVarObject_HEAD_INIT(NULL, 0)
+ "_io.BufferedReader", /*tp_name*/
+ sizeof(buffered), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ (destructor)buffered_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ 0, /*tp_compare */
+ (reprfunc)buffered_repr, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash */
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE
+ | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
+ _io_BufferedReader___init____doc__, /* tp_doc */
+ (traverseproc)buffered_traverse, /* tp_traverse */
+ (inquiry)buffered_clear, /* tp_clear */
+ 0, /* tp_richcompare */
+ offsetof(buffered, weakreflist), /*tp_weaklistoffset*/
+ 0, /* tp_iter */
+ (iternextfunc)buffered_iternext, /* tp_iternext */
+ bufferedreader_methods, /* tp_methods */
+ bufferedreader_members, /* tp_members */
+ bufferedreader_getset, /* tp_getset */
+ 0, /* tp_base */
+ 0, /* tp_dict */
+ 0, /* tp_descr_get */
+ 0, /* tp_descr_set */
+ offsetof(buffered, dict), /* tp_dictoffset */
+ _io_BufferedReader___init__, /* tp_init */
+ 0, /* tp_alloc */
+ PyType_GenericNew, /* tp_new */
+ 0, /* tp_free */
+ 0, /* tp_is_gc */
+ 0, /* tp_bases */
+ 0, /* tp_mro */
+ 0, /* tp_cache */
+ 0, /* tp_subclasses */
+ 0, /* tp_weaklist */
+ 0, /* tp_del */
+ 0, /* tp_version_tag */
+ 0, /* tp_finalize */
+};
+
+
+static PyMethodDef bufferedwriter_methods[] = {
+ /* BufferedIOMixin methods */
+ {"close", (PyCFunction)buffered_close, METH_NOARGS},
+ {"detach", (PyCFunction)buffered_detach, METH_NOARGS},
+ {"seekable", (PyCFunction)buffered_seekable, METH_NOARGS},
+ {"writable", (PyCFunction)buffered_writable, METH_NOARGS},
+ {"fileno", (PyCFunction)buffered_fileno, METH_NOARGS},
+ {"isatty", (PyCFunction)buffered_isatty, METH_NOARGS},
+ {"_dealloc_warn", (PyCFunction)buffered_dealloc_warn, METH_O},
+ {"__getstate__", (PyCFunction)buffered_getstate, METH_NOARGS},
+
+ _IO_BUFFEREDWRITER_WRITE_METHODDEF
+ _IO__BUFFERED_TRUNCATE_METHODDEF
+ {"flush", (PyCFunction)buffered_flush, METH_NOARGS},
+ _IO__BUFFERED_SEEK_METHODDEF
+ {"tell", (PyCFunction)buffered_tell, METH_NOARGS},
+ {"__sizeof__", (PyCFunction)buffered_sizeof, METH_NOARGS},
+ {NULL, NULL}
+};
+
+static PyMemberDef bufferedwriter_members[] = {
+ {"raw", T_OBJECT, offsetof(buffered, raw), READONLY},
+ {"_finalizing", T_BOOL, offsetof(buffered, finalizing), 0},
+ {NULL}
+};
+
+static PyGetSetDef bufferedwriter_getset[] = {
+ {"closed", (getter)buffered_closed_get, NULL, NULL},
+ {"name", (getter)buffered_name_get, NULL, NULL},
+ {"mode", (getter)buffered_mode_get, NULL, NULL},
+ {NULL}
+};
+
+
+PyTypeObject PyBufferedWriter_Type = {
+ PyVarObject_HEAD_INIT(NULL, 0)
+ "_io.BufferedWriter", /*tp_name*/
+ sizeof(buffered), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ (destructor)buffered_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ 0, /*tp_compare */
+ (reprfunc)buffered_repr, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash */
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE
+ | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
+ _io_BufferedWriter___init____doc__, /* tp_doc */
+ (traverseproc)buffered_traverse, /* tp_traverse */
+ (inquiry)buffered_clear, /* tp_clear */
+ 0, /* tp_richcompare */
+ offsetof(buffered, weakreflist), /*tp_weaklistoffset*/
+ 0, /* tp_iter */
+ 0, /* tp_iternext */
+ bufferedwriter_methods, /* tp_methods */
+ bufferedwriter_members, /* tp_members */
+ bufferedwriter_getset, /* tp_getset */
+ 0, /* tp_base */
+ 0, /* tp_dict */
+ 0, /* tp_descr_get */
+ 0, /* tp_descr_set */
+ offsetof(buffered, dict), /* tp_dictoffset */
+ _io_BufferedWriter___init__, /* tp_init */
+ 0, /* tp_alloc */
+ PyType_GenericNew, /* tp_new */
+ 0, /* tp_free */
+ 0, /* tp_is_gc */
+ 0, /* tp_bases */
+ 0, /* tp_mro */
+ 0, /* tp_cache */
+ 0, /* tp_subclasses */
+ 0, /* tp_weaklist */
+ 0, /* tp_del */
+ 0, /* tp_version_tag */
+ 0, /* tp_finalize */
+};
+
static PyMethodDef bufferedrwpair_methods[] = {
{"read", (PyCFunction)bufferedrwpair_read, METH_VARARGS},
{"peek", (PyCFunction)bufferedrwpair_peek, METH_VARARGS},
{"read1", (PyCFunction)bufferedrwpair_read1, METH_VARARGS},
{"readinto", (PyCFunction)bufferedrwpair_readinto, METH_VARARGS},
+ {"readinto1", (PyCFunction)bufferedrwpair_readinto1, METH_VARARGS},
{"write", (PyCFunction)bufferedrwpair_write, METH_VARARGS},
{"flush", (PyCFunction)bufferedrwpair_flush, METH_NOARGS},
@@ -2477,7 +2618,7 @@ PyTypeObject PyBufferedRWPair_Type = {
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE
| Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, /* tp_flags */
- bufferedrwpair_doc, /* tp_doc */
+ _io_BufferedRWPair___init____doc__, /* tp_doc */
(traverseproc)bufferedrwpair_traverse, /* tp_traverse */
(inquiry)bufferedrwpair_clear, /* tp_clear */
0, /* tp_richcompare */
@@ -2492,7 +2633,7 @@ PyTypeObject PyBufferedRWPair_Type = {
0, /* tp_descr_get */
0, /* tp_descr_set */
offsetof(rwpair, dict), /* tp_dictoffset */
- (initproc)bufferedrwpair_init, /* tp_init */
+ _io_BufferedRWPair___init__, /* tp_init */
0, /* tp_alloc */
PyType_GenericNew, /* tp_new */
0, /* tp_free */
@@ -2506,62 +2647,7 @@ PyTypeObject PyBufferedRWPair_Type = {
0, /* tp_version_tag */
0, /* tp_finalize */
};
-
-
-/*
- * BufferedRandom
- */
-
-PyDoc_STRVAR(bufferedrandom_doc,
- "A buffered interface to random access streams.\n"
- "\n"
- "The constructor creates a reader and writer for a seekable stream,\n"
- "raw, given in the first argument. If the buffer_size is omitted it\n"
- "defaults to DEFAULT_BUFFER_SIZE.\n"
- );
-
-static int
-bufferedrandom_init(buffered *self, PyObject *args, PyObject *kwds)
-{
- char *kwlist[] = {"raw", "buffer_size", NULL};
- Py_ssize_t buffer_size = DEFAULT_BUFFER_SIZE;
- PyObject *raw;
-
- self->ok = 0;
- self->detached = 0;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|n:BufferedRandom", kwlist,
- &raw, &buffer_size)) {
- return -1;
- }
-
- if (_PyIOBase_check_seekable(raw, Py_True) == NULL)
- return -1;
- if (_PyIOBase_check_readable(raw, Py_True) == NULL)
- return -1;
- if (_PyIOBase_check_writable(raw, Py_True) == NULL)
- return -1;
-
- Py_CLEAR(self->raw);
- Py_INCREF(raw);
- self->raw = raw;
- self->buffer_size = buffer_size;
- self->readable = 1;
- self->writable = 1;
-
- if (_buffered_init(self) < 0)
- return -1;
- _bufferedreader_reset_buf(self);
- _bufferedwriter_reset_buf(self);
- self->pos = 0;
-
- self->fast_closed_checks = (Py_TYPE(self) == &PyBufferedRandom_Type &&
- Py_TYPE(raw) == &PyFileIO_Type);
-
- self->ok = 1;
- return 0;
-}
static PyMethodDef bufferedrandom_methods[] = {
/* BufferedIOMixin methods */
@@ -2577,15 +2663,16 @@ static PyMethodDef bufferedrandom_methods[] = {
{"flush", (PyCFunction)buffered_flush, METH_NOARGS},
- {"seek", (PyCFunction)buffered_seek, METH_VARARGS},
+ _IO__BUFFERED_SEEK_METHODDEF
{"tell", (PyCFunction)buffered_tell, METH_NOARGS},
- {"truncate", (PyCFunction)buffered_truncate, METH_VARARGS},
- {"read", (PyCFunction)buffered_read, METH_VARARGS},
- {"read1", (PyCFunction)buffered_read1, METH_VARARGS},
- {"readinto", (PyCFunction)buffered_readinto, METH_VARARGS},
- {"readline", (PyCFunction)buffered_readline, METH_VARARGS},
- {"peek", (PyCFunction)buffered_peek, METH_VARARGS},
- {"write", (PyCFunction)bufferedwriter_write, METH_VARARGS},
+ _IO__BUFFERED_TRUNCATE_METHODDEF
+ _IO__BUFFERED_READ_METHODDEF
+ _IO__BUFFERED_READ1_METHODDEF
+ _IO__BUFFERED_READINTO_METHODDEF
+ _IO__BUFFERED_READINTO1_METHODDEF
+ _IO__BUFFERED_READLINE_METHODDEF
+ _IO__BUFFERED_PEEK_METHODDEF
+ _IO_BUFFEREDWRITER_WRITE_METHODDEF
{"__sizeof__", (PyCFunction)buffered_sizeof, METH_NOARGS},
{NULL, NULL}
};
@@ -2626,7 +2713,7 @@ PyTypeObject PyBufferedRandom_Type = {
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE
| Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
- bufferedrandom_doc, /* tp_doc */
+ _io_BufferedRandom___init____doc__, /* tp_doc */
(traverseproc)buffered_traverse, /* tp_traverse */
(inquiry)buffered_clear, /* tp_clear */
0, /* tp_richcompare */
@@ -2641,7 +2728,7 @@ PyTypeObject PyBufferedRandom_Type = {
0, /* tp_descr_get */
0, /* tp_descr_set */
offsetof(buffered, dict), /*tp_dictoffset*/
- (initproc)bufferedrandom_init, /* tp_init */
+ _io_BufferedRandom___init__, /* tp_init */
0, /* tp_alloc */
PyType_GenericNew, /* tp_new */
0, /* tp_free */
diff --git a/Modules/_io/bytesio.c b/Modules/_io/bytesio.c
index b55ab72e00..9e5d78b166 100644
--- a/Modules/_io/bytesio.c
+++ b/Modules/_io/bytesio.c
@@ -2,12 +2,17 @@
#include "structmember.h" /* for offsetof() */
#include "_iomodule.h"
+/*[clinic input]
+module _io
+class _io.BytesIO "bytesio *" "&PyBytesIO_Type"
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=7f50ec034f5c0b26]*/
+
typedef struct {
PyObject_HEAD
- char *buf;
+ PyObject *buf;
Py_ssize_t pos;
Py_ssize_t string_size;
- size_t buf_size;
PyObject *dict;
PyObject *weakreflist;
Py_ssize_t exports;
@@ -18,6 +23,12 @@ typedef struct {
bytesio *source;
} bytesiobuf;
+/* The bytesio object can be in three states:
+ * Py_REFCNT(buf) == 1, exports == 0.
+ * Py_REFCNT(buf) > 1. exports == 0,
+ first modification or export causes the internal buffer copying.
+ * exports > 0. Py_REFCNT(buf) == 1, any modifications are forbidden.
+*/
#define CHECK_CLOSED(self) \
if ((self)->buf == NULL) { \
@@ -33,40 +44,64 @@ typedef struct {
return NULL; \
}
+#define SHARED_BUF(self) (Py_REFCNT((self)->buf) > 1)
+
/* Internal routine to get a line from the buffer of a BytesIO
object. Returns the length between the current position to the
next newline character. */
static Py_ssize_t
-get_line(bytesio *self, char **output)
+scan_eol(bytesio *self, Py_ssize_t len)
{
- char *n;
- const char *str_end;
- Py_ssize_t len;
+ const char *start, *n;
+ Py_ssize_t maxlen;
assert(self->buf != NULL);
+ assert(self->pos >= 0);
- /* Move to the end of the line, up to the end of the string, s. */
- str_end = self->buf + self->string_size;
- for (n = self->buf + self->pos;
- n < str_end && *n != '\n';
- n++);
-
- /* Skip the newline character */
- if (n < str_end)
- n++;
-
- /* Get the length from the current position to the end of the line. */
- len = n - (self->buf + self->pos);
- *output = self->buf + self->pos;
+ if (self->pos >= self->string_size)
+ return 0;
+ /* Move to the end of the line, up to the end of the string, s. */
+ maxlen = self->string_size - self->pos;
+ if (len < 0 || len > maxlen)
+ len = maxlen;
+
+ if (len) {
+ start = PyBytes_AS_STRING(self->buf) + self->pos;
+ n = memchr(start, '\n', len);
+ if (n)
+ /* Get the length from the current position to the end of
+ the line. */
+ len = n - start + 1;
+ }
assert(len >= 0);
assert(self->pos < PY_SSIZE_T_MAX - len);
- self->pos += len;
return len;
}
+/* Internal routine for detaching the shared buffer of BytesIO objects.
+ The caller should ensure that the 'size' argument is non-negative and
+ not lesser than self->string_size. Returns 0 on success, -1 otherwise. */
+static int
+unshare_buffer(bytesio *self, size_t size)
+{
+ PyObject *new_buf, *old_buf;
+ assert(SHARED_BUF(self));
+ assert(self->exports == 0);
+ assert(size >= (size_t)self->string_size);
+ new_buf = PyBytes_FromStringAndSize(NULL, size);
+ if (new_buf == NULL)
+ return -1;
+ memcpy(PyBytes_AS_STRING(new_buf), PyBytes_AS_STRING(self->buf),
+ self->string_size);
+ old_buf = self->buf;
+ self->buf = new_buf;
+ Py_DECREF(old_buf);
+ return 0;
+}
+
/* Internal routine for changing the size of the buffer of BytesIO objects.
The caller should ensure that the 'size' argument is non-negative. Returns
0 on success, -1 otherwise. */
@@ -75,8 +110,7 @@ resize_buffer(bytesio *self, size_t size)
{
/* Here, unsigned types are used to avoid dealing with signed integer
overflow, which is undefined in C. */
- size_t alloc = self->buf_size;
- char *new_buf = NULL;
+ size_t alloc = PyBytes_GET_SIZE(self->buf);
assert(self->buf != NULL);
@@ -104,13 +138,15 @@ resize_buffer(bytesio *self, size_t size)
if (alloc > ((size_t)-1) / sizeof(char))
goto overflow;
- new_buf = (char *)PyMem_Realloc(self->buf, alloc * sizeof(char));
- if (new_buf == NULL) {
- PyErr_NoMemory();
- return -1;
+
+ if (SHARED_BUF(self)) {
+ if (unshare_buffer(self, alloc) < 0)
+ return -1;
+ }
+ else {
+ if (_PyBytes_Resize(&self->buf, alloc) < 0)
+ return -1;
}
- self->buf_size = alloc;
- self->buf = new_buf;
return 0;
@@ -125,12 +161,18 @@ resize_buffer(bytesio *self, size_t size)
static Py_ssize_t
write_bytes(bytesio *self, const char *bytes, Py_ssize_t len)
{
+ size_t endpos;
assert(self->buf != NULL);
assert(self->pos >= 0);
assert(len >= 0);
- if ((size_t)self->pos + len > self->buf_size) {
- if (resize_buffer(self, (size_t)self->pos + len) < 0)
+ endpos = (size_t)self->pos + len;
+ if (endpos > (size_t)PyBytes_GET_SIZE(self->buf)) {
+ if (resize_buffer(self, endpos) < 0)
+ return -1;
+ }
+ else if (SHARED_BUF(self)) {
+ if (unshare_buffer(self, Py_MAX(endpos, (size_t)self->string_size)) < 0)
return -1;
}
@@ -143,18 +185,18 @@ write_bytes(bytesio *self, const char *bytes, Py_ssize_t len)
| | <--to pad-->|<---to write---> |
0 buf position
*/
- memset(self->buf + self->string_size, '\0',
+ memset(PyBytes_AS_STRING(self->buf) + self->string_size, '\0',
(self->pos - self->string_size) * sizeof(char));
}
/* Copy the data to the internal buffer, overwriting some of the existing
data if self->pos < self->string_size. */
- memcpy(self->buf + self->pos, bytes, len);
- self->pos += len;
+ memcpy(PyBytes_AS_STRING(self->buf) + self->pos, bytes, len);
+ self->pos = endpos;
/* Set the new length of the internal string if it has changed. */
- if (self->string_size < self->pos) {
- self->string_size = self->pos;
+ if ((size_t)self->string_size < endpos) {
+ self->string_size = endpos;
}
return len;
@@ -171,40 +213,71 @@ bytesio_get_closed(bytesio *self)
}
}
-PyDoc_STRVAR(readable_doc,
-"readable() -> bool. Returns True if the IO object can be read.");
+/*[clinic input]
+_io.BytesIO.readable
+
+Returns True if the IO object can be read.
+[clinic start generated code]*/
+
+static PyObject *
+_io_BytesIO_readable_impl(bytesio *self)
+/*[clinic end generated code: output=4e93822ad5b62263 input=96c5d0cccfb29f5c]*/
+{
+ CHECK_CLOSED(self);
+ Py_RETURN_TRUE;
+}
-PyDoc_STRVAR(writable_doc,
-"writable() -> bool. Returns True if the IO object can be written.");
+/*[clinic input]
+_io.BytesIO.writable
-PyDoc_STRVAR(seekable_doc,
-"seekable() -> bool. Returns True if the IO object can be seeked.");
+Returns True if the IO object can be written.
+[clinic start generated code]*/
-/* Generic getter for the writable, readable and seekable properties */
static PyObject *
-return_not_closed(bytesio *self)
+_io_BytesIO_writable_impl(bytesio *self)
+/*[clinic end generated code: output=64ff6a254b1150b8 input=700eed808277560a]*/
{
CHECK_CLOSED(self);
Py_RETURN_TRUE;
}
-PyDoc_STRVAR(flush_doc,
-"flush() -> None. Does nothing.");
+/*[clinic input]
+_io.BytesIO.seekable
+
+Returns True if the IO object can be seeked.
+[clinic start generated code]*/
+
+static PyObject *
+_io_BytesIO_seekable_impl(bytesio *self)
+/*[clinic end generated code: output=6b417f46dcc09b56 input=9421f65627a344dd]*/
+{
+ CHECK_CLOSED(self);
+ Py_RETURN_TRUE;
+}
+
+/*[clinic input]
+_io.BytesIO.flush
+
+Does nothing.
+[clinic start generated code]*/
static PyObject *
-bytesio_flush(bytesio *self)
+_io_BytesIO_flush_impl(bytesio *self)
+/*[clinic end generated code: output=187e3d781ca134a0 input=561ea490be4581a7]*/
{
CHECK_CLOSED(self);
Py_RETURN_NONE;
}
-PyDoc_STRVAR(getbuffer_doc,
-"getbuffer() -> bytes.\n"
-"\n"
-"Get a read-write view over the contents of the BytesIO object.");
+/*[clinic input]
+_io.BytesIO.getbuffer
+
+Get a read-write view over the contents of the BytesIO object.
+[clinic start generated code]*/
static PyObject *
-bytesio_getbuffer(bytesio *self)
+_io_BytesIO_getbuffer_impl(bytesio *self)
+/*[clinic end generated code: output=72cd7c6e13aa09ed input=8f738ef615865176]*/
{
PyTypeObject *type = &_PyBytesIOBuffer_Type;
bytesiobuf *buf;
@@ -222,59 +295,104 @@ bytesio_getbuffer(bytesio *self)
return view;
}
-PyDoc_STRVAR(getval_doc,
-"getvalue() -> bytes.\n"
-"\n"
-"Retrieve the entire contents of the BytesIO object.");
+/*[clinic input]
+_io.BytesIO.getvalue
+
+Retrieve the entire contents of the BytesIO object.
+[clinic start generated code]*/
static PyObject *
-bytesio_getvalue(bytesio *self)
+_io_BytesIO_getvalue_impl(bytesio *self)
+/*[clinic end generated code: output=b3f6a3233c8fd628 input=4b403ac0af3973ed]*/
{
CHECK_CLOSED(self);
- return PyBytes_FromStringAndSize(self->buf, self->string_size);
+ if (self->string_size <= 1 || self->exports > 0)
+ return PyBytes_FromStringAndSize(PyBytes_AS_STRING(self->buf),
+ self->string_size);
+
+ if (self->string_size != PyBytes_GET_SIZE(self->buf)) {
+ if (SHARED_BUF(self)) {
+ if (unshare_buffer(self, self->string_size) < 0)
+ return NULL;
+ }
+ else {
+ if (_PyBytes_Resize(&self->buf, self->string_size) < 0)
+ return NULL;
+ }
+ }
+ Py_INCREF(self->buf);
+ return self->buf;
}
-PyDoc_STRVAR(isatty_doc,
-"isatty() -> False.\n"
-"\n"
-"Always returns False since BytesIO objects are not connected\n"
-"to a tty-like device.");
+/*[clinic input]
+_io.BytesIO.isatty
+
+Always returns False.
+
+BytesIO objects are not connected to a TTY-like device.
+[clinic start generated code]*/
static PyObject *
-bytesio_isatty(bytesio *self)
+_io_BytesIO_isatty_impl(bytesio *self)
+/*[clinic end generated code: output=df67712e669f6c8f input=6f97f0985d13f827]*/
{
CHECK_CLOSED(self);
Py_RETURN_FALSE;
}
-PyDoc_STRVAR(tell_doc,
-"tell() -> current file position, an integer\n");
+/*[clinic input]
+_io.BytesIO.tell
+
+Current file position, an integer.
+[clinic start generated code]*/
static PyObject *
-bytesio_tell(bytesio *self)
+_io_BytesIO_tell_impl(bytesio *self)
+/*[clinic end generated code: output=b54b0f93cd0e5e1d input=b106adf099cb3657]*/
{
CHECK_CLOSED(self);
return PyLong_FromSsize_t(self->pos);
}
-PyDoc_STRVAR(read_doc,
-"read([size]) -> read at most size bytes, returned as a bytes object.\n"
-"\n"
-"If the size argument is negative, read until EOF is reached.\n"
-"Return an empty bytes object at EOF.");
+static PyObject *
+read_bytes(bytesio *self, Py_ssize_t size)
+{
+ char *output;
+
+ assert(self->buf != NULL);
+ assert(size <= self->string_size);
+ if (size > 1 &&
+ self->pos == 0 && size == PyBytes_GET_SIZE(self->buf) &&
+ self->exports == 0) {
+ self->pos += size;
+ Py_INCREF(self->buf);
+ return self->buf;
+ }
+
+ output = PyBytes_AS_STRING(self->buf) + self->pos;
+ self->pos += size;
+ return PyBytes_FromStringAndSize(output, size);
+}
+
+/*[clinic input]
+_io.BytesIO.read
+ size as arg: object = None
+ /
+
+Read at most size bytes, returned as a bytes object.
+
+If the size argument is negative, read until EOF is reached.
+Return an empty bytes object at EOF.
+[clinic start generated code]*/
static PyObject *
-bytesio_read(bytesio *self, PyObject *args)
+_io_BytesIO_read_impl(bytesio *self, PyObject *arg)
+/*[clinic end generated code: output=85dacb535c1e1781 input=cc7ba4a797bb1555]*/
{
Py_ssize_t size, n;
- char *output;
- PyObject *arg = Py_None;
CHECK_CLOSED(self);
- if (!PyArg_ParseTuple(args, "|O:read", &arg))
- return NULL;
-
if (PyLong_Check(arg)) {
size = PyLong_AsSsize_t(arg);
if (size == -1 && PyErr_Occurred())
@@ -298,52 +416,48 @@ bytesio_read(bytesio *self, PyObject *args)
size = 0;
}
- assert(self->buf != NULL);
- output = self->buf + self->pos;
- self->pos += size;
-
- return PyBytes_FromStringAndSize(output, size);
+ return read_bytes(self, size);
}
-PyDoc_STRVAR(read1_doc,
-"read1(size) -> read at most size bytes, returned as a bytes object.\n"
-"\n"
-"If the size argument is negative or omitted, read until EOF is reached.\n"
-"Return an empty bytes object at EOF.");
+/*[clinic input]
+_io.BytesIO.read1
+ size: object
+ /
+
+Read at most size bytes, returned as a bytes object.
+
+If the size argument is negative or omitted, read until EOF is reached.
+Return an empty bytes object at EOF.
+[clinic start generated code]*/
static PyObject *
-bytesio_read1(bytesio *self, PyObject *n)
+_io_BytesIO_read1(bytesio *self, PyObject *size)
+/*[clinic end generated code: output=16021f5d0ac3d4e2 input=d4f40bb8f2f99418]*/
{
- PyObject *arg, *res;
-
- arg = PyTuple_Pack(1, n);
- if (arg == NULL)
- return NULL;
- res = bytesio_read(self, arg);
- Py_DECREF(arg);
- return res;
+ return _io_BytesIO_read_impl(self, size);
}
-PyDoc_STRVAR(readline_doc,
-"readline([size]) -> next line from the file, as a bytes object.\n"
-"\n"
-"Retain newline. A non-negative size argument limits the maximum\n"
-"number of bytes to return (an incomplete line may be returned then).\n"
-"Return an empty bytes object at EOF.\n");
+/*[clinic input]
+_io.BytesIO.readline
+ size as arg: object = None
+ /
+
+Next line from the file, as a bytes object.
+
+Retain newline. A non-negative size argument limits the maximum
+number of bytes to return (an incomplete line may be returned then).
+Return an empty bytes object at EOF.
+[clinic start generated code]*/
static PyObject *
-bytesio_readline(bytesio *self, PyObject *args)
+_io_BytesIO_readline_impl(bytesio *self, PyObject *arg)
+/*[clinic end generated code: output=1c2115534a4f9276 input=ca31f06de6eab257]*/
{
Py_ssize_t size, n;
- char *output;
- PyObject *arg = Py_None;
CHECK_CLOSED(self);
- if (!PyArg_ParseTuple(args, "|O:readline", &arg))
- return NULL;
-
if (PyLong_Check(arg)) {
size = PyLong_AsSsize_t(arg);
if (size == -1 && PyErr_Occurred())
@@ -359,37 +473,33 @@ bytesio_readline(bytesio *self, PyObject *args)
return NULL;
}
- n = get_line(self, &output);
+ n = scan_eol(self, size);
- if (size >= 0 && size < n) {
- size = n - size;
- n -= size;
- self->pos -= size;
- }
-
- return PyBytes_FromStringAndSize(output, n);
+ return read_bytes(self, n);
}
-PyDoc_STRVAR(readlines_doc,
-"readlines([size]) -> list of strings, each a line from the file.\n"
-"\n"
-"Call readline() repeatedly and return a list of the lines so read.\n"
-"The optional size argument, if given, is an approximate bound on the\n"
-"total number of bytes in the lines returned.\n");
+/*[clinic input]
+_io.BytesIO.readlines
+ size as arg: object = None
+ /
+
+List of bytes objects, each a line from the file.
+
+Call readline() repeatedly and return a list of the lines so read.
+The optional size argument, if given, is an approximate bound on the
+total number of bytes in the lines returned.
+[clinic start generated code]*/
static PyObject *
-bytesio_readlines(bytesio *self, PyObject *args)
+_io_BytesIO_readlines_impl(bytesio *self, PyObject *arg)
+/*[clinic end generated code: output=09b8e34c880808ff input=691aa1314f2c2a87]*/
{
Py_ssize_t maxsize, size, n;
PyObject *result, *line;
char *output;
- PyObject *arg = Py_None;
CHECK_CLOSED(self);
- if (!PyArg_ParseTuple(args, "|O:readlines", &arg))
- return NULL;
-
if (PyLong_Check(arg)) {
maxsize = PyLong_AsSsize_t(arg);
if (maxsize == -1 && PyErr_Occurred())
@@ -410,7 +520,9 @@ bytesio_readlines(bytesio *self, PyObject *args)
if (!result)
return NULL;
- while ((n = get_line(self, &output)) != 0) {
+ output = PyBytes_AS_STRING(self->buf) + self->pos;
+ while ((n = scan_eol(self, -1)) != 0) {
+ self->pos += n;
line = PyBytes_FromStringAndSize(output, n);
if (!line)
goto on_error;
@@ -422,6 +534,7 @@ bytesio_readlines(bytesio *self, PyObject *args)
size += n;
if (maxsize > 0 && size >= maxsize)
break;
+ output += n;
}
return result;
@@ -430,25 +543,27 @@ bytesio_readlines(bytesio *self, PyObject *args)
return NULL;
}
-PyDoc_STRVAR(readinto_doc,
-"readinto(bytearray) -> int. Read up to len(b) bytes into b.\n"
-"\n"
-"Returns number of bytes read (0 for EOF), or None if the object\n"
-"is set not to block as has no data to read.");
+/*[clinic input]
+_io.BytesIO.readinto
+ buffer: Py_buffer(accept={rwbuffer})
+ /
+
+Read bytes into buffer.
+
+Returns number of bytes read (0 for EOF), or None if the object
+is set not to block and has no data to read.
+[clinic start generated code]*/
static PyObject *
-bytesio_readinto(bytesio *self, PyObject *arg)
+_io_BytesIO_readinto_impl(bytesio *self, Py_buffer *buffer)
+/*[clinic end generated code: output=a5d407217dcf0639 input=1424d0fdce857919]*/
{
- Py_buffer buffer;
Py_ssize_t len, n;
CHECK_CLOSED(self);
- if (!PyArg_Parse(arg, "w*", &buffer))
- return NULL;
-
/* adjust invalid sizes */
- len = buffer.len;
+ len = buffer->len;
n = self->string_size - self->pos;
if (len > n) {
len = n;
@@ -456,33 +571,34 @@ bytesio_readinto(bytesio *self, PyObject *arg)
len = 0;
}
- memcpy(buffer.buf, self->buf + self->pos, len);
+ memcpy(buffer->buf, PyBytes_AS_STRING(self->buf) + self->pos, len);
assert(self->pos + len < PY_SSIZE_T_MAX);
assert(len >= 0);
self->pos += len;
- PyBuffer_Release(&buffer);
return PyLong_FromSsize_t(len);
}
-PyDoc_STRVAR(truncate_doc,
-"truncate([size]) -> int. Truncate the file to at most size bytes.\n"
-"\n"
-"Size defaults to the current file position, as returned by tell().\n"
-"The current file position is unchanged. Returns the new size.\n");
+/*[clinic input]
+_io.BytesIO.truncate
+ size as arg: object = None
+ /
+
+Truncate the file to at most size bytes.
+
+Size defaults to the current file position, as returned by tell().
+The current file position is unchanged. Returns the new size.
+[clinic start generated code]*/
static PyObject *
-bytesio_truncate(bytesio *self, PyObject *args)
+_io_BytesIO_truncate_impl(bytesio *self, PyObject *arg)
+/*[clinic end generated code: output=81e6be60e67ddd66 input=11ed1966835462ba]*/
{
Py_ssize_t size;
- PyObject *arg = Py_None;
CHECK_CLOSED(self);
CHECK_EXPORTS(self);
- if (!PyArg_ParseTuple(args, "|O:truncate", &arg))
- return NULL;
-
if (PyLong_Check(arg)) {
size = PyLong_AsSsize_t(arg);
if (size == -1 && PyErr_Occurred())
@@ -516,49 +632,49 @@ bytesio_truncate(bytesio *self, PyObject *args)
static PyObject *
bytesio_iternext(bytesio *self)
{
- char *next;
Py_ssize_t n;
CHECK_CLOSED(self);
- n = get_line(self, &next);
+ n = scan_eol(self, -1);
- if (!next || n == 0)
+ if (n == 0)
return NULL;
- return PyBytes_FromStringAndSize(next, n);
+ return read_bytes(self, n);
}
-PyDoc_STRVAR(seek_doc,
-"seek(pos[, whence]) -> int. Change stream position.\n"
-"\n"
-"Seek to byte offset pos relative to position indicated by whence:\n"
-" 0 Start of stream (the default). pos should be >= 0;\n"
-" 1 Current position - pos may be negative;\n"
-" 2 End of stream - pos usually negative.\n"
-"Returns the new absolute position.");
+/*[clinic input]
+_io.BytesIO.seek
+ pos: Py_ssize_t
+ whence: int = 0
+ /
+
+Change stream position.
+
+Seek to byte offset pos relative to position indicated by whence:
+ 0 Start of stream (the default). pos should be >= 0;
+ 1 Current position - pos may be negative;
+ 2 End of stream - pos usually negative.
+Returns the new absolute position.
+[clinic start generated code]*/
static PyObject *
-bytesio_seek(bytesio *self, PyObject *args)
+_io_BytesIO_seek_impl(bytesio *self, Py_ssize_t pos, int whence)
+/*[clinic end generated code: output=c26204a68e9190e4 input=1e875e6ebc652948]*/
{
- Py_ssize_t pos;
- int mode = 0;
-
CHECK_CLOSED(self);
- if (!PyArg_ParseTuple(args, "n|i:seek", &pos, &mode))
- return NULL;
-
- if (pos < 0 && mode == 0) {
+ if (pos < 0 && whence == 0) {
PyErr_Format(PyExc_ValueError,
"negative seek value %zd", pos);
return NULL;
}
- /* mode 0: offset relative to beginning of the string.
- mode 1: offset relative to current position.
- mode 2: offset relative the end of the string. */
- if (mode == 1) {
+ /* whence = 0: offset relative to beginning of the string.
+ whence = 1: offset relative to current position.
+ whence = 2: offset relative the end of the string. */
+ if (whence == 1) {
if (pos > PY_SSIZE_T_MAX - self->pos) {
PyErr_SetString(PyExc_OverflowError,
"new position too large");
@@ -566,7 +682,7 @@ bytesio_seek(bytesio *self, PyObject *args)
}
pos += self->pos;
}
- else if (mode == 2) {
+ else if (whence == 2) {
if (pos > PY_SSIZE_T_MAX - self->string_size) {
PyErr_SetString(PyExc_OverflowError,
"new position too large");
@@ -574,9 +690,9 @@ bytesio_seek(bytesio *self, PyObject *args)
}
pos += self->string_size;
}
- else if (mode != 0) {
+ else if (whence != 0) {
PyErr_Format(PyExc_ValueError,
- "invalid whence (%i, should be 0, 1 or 2)", mode);
+ "invalid whence (%i, should be 0, 1 or 2)", whence);
return NULL;
}
@@ -587,54 +703,63 @@ bytesio_seek(bytesio *self, PyObject *args)
return PyLong_FromSsize_t(self->pos);
}
-PyDoc_STRVAR(write_doc,
-"write(bytes) -> int. Write bytes to file.\n"
-"\n"
-"Return the number of bytes written.");
+/*[clinic input]
+_io.BytesIO.write
+ b: object
+ /
+
+Write bytes to file.
+
+Return the number of bytes written.
+[clinic start generated code]*/
static PyObject *
-bytesio_write(bytesio *self, PyObject *obj)
+_io_BytesIO_write(bytesio *self, PyObject *b)
+/*[clinic end generated code: output=53316d99800a0b95 input=f5ec7c8c64ed720a]*/
{
Py_ssize_t n = 0;
Py_buffer buf;
- PyObject *result = NULL;
CHECK_CLOSED(self);
CHECK_EXPORTS(self);
- if (PyObject_GetBuffer(obj, &buf, PyBUF_CONTIG_RO) < 0)
+ if (PyObject_GetBuffer(b, &buf, PyBUF_CONTIG_RO) < 0)
return NULL;
if (buf.len != 0)
n = write_bytes(self, buf.buf, buf.len);
- if (n >= 0)
- result = PyLong_FromSsize_t(n);
PyBuffer_Release(&buf);
- return result;
+ return n >= 0 ? PyLong_FromSsize_t(n) : NULL;
}
-PyDoc_STRVAR(writelines_doc,
-"writelines(lines) -> None. Write bytes objects to the file.\n"
-"\n"
-"Note that newlines are not added. The argument can be any iterable\n"
-"object producing bytes objects. This is equivalent to calling write() for\n"
-"each bytes object.");
+/*[clinic input]
+_io.BytesIO.writelines
+ lines: object
+ /
+
+Write lines to the file.
+
+Note that newlines are not added. lines can be any iterable object
+producing bytes-like objects. This is equivalent to calling write() for
+each element.
+[clinic start generated code]*/
static PyObject *
-bytesio_writelines(bytesio *self, PyObject *v)
+_io_BytesIO_writelines(bytesio *self, PyObject *lines)
+/*[clinic end generated code: output=7f33aa3271c91752 input=e972539176fc8fc1]*/
{
PyObject *it, *item;
PyObject *ret;
CHECK_CLOSED(self);
- it = PyObject_GetIter(v);
+ it = PyObject_GetIter(lines);
if (it == NULL)
return NULL;
while ((item = PyIter_Next(it)) != NULL) {
- ret = bytesio_write(self, item);
+ ret = _io_BytesIO_write(self, item);
Py_DECREF(item);
if (ret == NULL) {
Py_DECREF(it);
@@ -651,17 +776,18 @@ bytesio_writelines(bytesio *self, PyObject *v)
Py_RETURN_NONE;
}
-PyDoc_STRVAR(close_doc,
-"close() -> None. Disable all I/O operations.");
+/*[clinic input]
+_io.BytesIO.close
+
+Disable all I/O operations.
+[clinic start generated code]*/
static PyObject *
-bytesio_close(bytesio *self)
+_io_BytesIO_close_impl(bytesio *self)
+/*[clinic end generated code: output=1471bb9411af84a0 input=37e1f55556e61f60]*/
{
CHECK_EXPORTS(self);
- if (self->buf != NULL) {
- PyMem_Free(self->buf);
- self->buf = NULL;
- }
+ Py_CLEAR(self->buf);
Py_RETURN_NONE;
}
@@ -683,7 +809,7 @@ bytesio_close(bytesio *self)
static PyObject *
bytesio_getstate(bytesio *self)
{
- PyObject *initvalue = bytesio_getvalue(self);
+ PyObject *initvalue = _io_BytesIO_getvalue_impl(self);
PyObject *dict;
PyObject *state;
@@ -733,7 +859,7 @@ bytesio_setstate(bytesio *self, PyObject *state)
/* Set the value of the internal buffer. If state[0] does not support the
buffer protocol, bytesio_write will raise the appropriate TypeError. */
- result = bytesio_write(self, PyTuple_GET_ITEM(state, 0));
+ result = _io_BytesIO_write(self, PyTuple_GET_ITEM(state, 0));
if (result == NULL)
return NULL;
Py_DECREF(result);
@@ -791,10 +917,7 @@ bytesio_dealloc(bytesio *self)
"deallocated BytesIO object has exported buffers");
PyErr_Print();
}
- if (self->buf != NULL) {
- PyMem_Free(self->buf);
- self->buf = NULL;
- }
+ Py_CLEAR(self->buf);
Py_CLEAR(self->dict);
if (self->weakreflist != NULL)
PyObject_ClearWeakRefs((PyObject *) self);
@@ -814,7 +937,7 @@ bytesio_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
/* tp_alloc initializes all the fields to zero. So we don't have to
initialize them here. */
- self->buf = (char *)PyMem_Malloc(0);
+ self->buf = PyBytes_FromStringAndSize(NULL, 0);
if (self->buf == NULL) {
Py_DECREF(self);
return PyErr_NoMemory();
@@ -823,27 +946,40 @@ bytesio_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
return (PyObject *)self;
}
-static int
-bytesio_init(bytesio *self, PyObject *args, PyObject *kwds)
-{
- char *kwlist[] = {"initial_bytes", NULL};
- PyObject *initvalue = NULL;
+/*[clinic input]
+_io.BytesIO.__init__
+ initial_bytes as initvalue: object(c_default="NULL") = b''
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O:BytesIO", kwlist,
- &initvalue))
- return -1;
+Buffered I/O implementation using an in-memory bytes buffer.
+[clinic start generated code]*/
+static int
+_io_BytesIO___init___impl(bytesio *self, PyObject *initvalue)
+/*[clinic end generated code: output=65c0c51e24c5b621 input=aac7f31b67bf0fb6]*/
+{
/* In case, __init__ is called multiple times. */
self->string_size = 0;
self->pos = 0;
+ if (self->exports > 0) {
+ PyErr_SetString(PyExc_BufferError,
+ "Existing exports of data: object cannot be re-sized");
+ return -1;
+ }
if (initvalue && initvalue != Py_None) {
- PyObject *res;
- res = bytesio_write(self, initvalue);
- if (res == NULL)
- return -1;
- Py_DECREF(res);
- self->pos = 0;
+ if (PyBytes_CheckExact(initvalue)) {
+ Py_INCREF(initvalue);
+ Py_XSETREF(self->buf, initvalue);
+ self->string_size = PyBytes_GET_SIZE(initvalue);
+ }
+ else {
+ PyObject *res;
+ res = _io_BytesIO_write(self, initvalue);
+ if (res == NULL)
+ return -1;
+ Py_DECREF(res);
+ self->pos = 0;
+ }
}
return 0;
@@ -854,9 +990,9 @@ bytesio_sizeof(bytesio *self, void *unused)
{
Py_ssize_t res;
- res = sizeof(bytesio);
- if (self->buf)
- res += self->buf_size;
+ res = _PyObject_SIZE(Py_TYPE(self));
+ if (self->buf && !SHARED_BUF(self))
+ res += _PySys_GetSizeOf(self->buf);
return PyLong_FromSsize_t(res);
}
@@ -875,6 +1011,8 @@ bytesio_clear(bytesio *self)
}
+#include "clinic/bytesio.c.h"
+
static PyGetSetDef bytesio_getsetlist[] = {
{"closed", (getter)bytesio_get_closed, NULL,
"True if the file is closed."},
@@ -882,36 +1020,30 @@ static PyGetSetDef bytesio_getsetlist[] = {
};
static struct PyMethodDef bytesio_methods[] = {
- {"readable", (PyCFunction)return_not_closed, METH_NOARGS, readable_doc},
- {"seekable", (PyCFunction)return_not_closed, METH_NOARGS, seekable_doc},
- {"writable", (PyCFunction)return_not_closed, METH_NOARGS, writable_doc},
- {"close", (PyCFunction)bytesio_close, METH_NOARGS, close_doc},
- {"flush", (PyCFunction)bytesio_flush, METH_NOARGS, flush_doc},
- {"isatty", (PyCFunction)bytesio_isatty, METH_NOARGS, isatty_doc},
- {"tell", (PyCFunction)bytesio_tell, METH_NOARGS, tell_doc},
- {"write", (PyCFunction)bytesio_write, METH_O, write_doc},
- {"writelines", (PyCFunction)bytesio_writelines, METH_O, writelines_doc},
- {"read1", (PyCFunction)bytesio_read1, METH_O, read1_doc},
- {"readinto", (PyCFunction)bytesio_readinto, METH_O, readinto_doc},
- {"readline", (PyCFunction)bytesio_readline, METH_VARARGS, readline_doc},
- {"readlines", (PyCFunction)bytesio_readlines, METH_VARARGS, readlines_doc},
- {"read", (PyCFunction)bytesio_read, METH_VARARGS, read_doc},
- {"getbuffer", (PyCFunction)bytesio_getbuffer, METH_NOARGS, getbuffer_doc},
- {"getvalue", (PyCFunction)bytesio_getvalue, METH_NOARGS, getval_doc},
- {"seek", (PyCFunction)bytesio_seek, METH_VARARGS, seek_doc},
- {"truncate", (PyCFunction)bytesio_truncate, METH_VARARGS, truncate_doc},
+ _IO_BYTESIO_READABLE_METHODDEF
+ _IO_BYTESIO_SEEKABLE_METHODDEF
+ _IO_BYTESIO_WRITABLE_METHODDEF
+ _IO_BYTESIO_CLOSE_METHODDEF
+ _IO_BYTESIO_FLUSH_METHODDEF
+ _IO_BYTESIO_ISATTY_METHODDEF
+ _IO_BYTESIO_TELL_METHODDEF
+ _IO_BYTESIO_WRITE_METHODDEF
+ _IO_BYTESIO_WRITELINES_METHODDEF
+ _IO_BYTESIO_READ1_METHODDEF
+ _IO_BYTESIO_READINTO_METHODDEF
+ _IO_BYTESIO_READLINE_METHODDEF
+ _IO_BYTESIO_READLINES_METHODDEF
+ _IO_BYTESIO_READ_METHODDEF
+ _IO_BYTESIO_GETBUFFER_METHODDEF
+ _IO_BYTESIO_GETVALUE_METHODDEF
+ _IO_BYTESIO_SEEK_METHODDEF
+ _IO_BYTESIO_TRUNCATE_METHODDEF
{"__getstate__", (PyCFunction)bytesio_getstate, METH_NOARGS, NULL},
{"__setstate__", (PyCFunction)bytesio_setstate, METH_O, NULL},
{"__sizeof__", (PyCFunction)bytesio_sizeof, METH_NOARGS, NULL},
{NULL, NULL} /* sentinel */
};
-PyDoc_STRVAR(bytesio_doc,
-"BytesIO([buffer]) -> object\n"
-"\n"
-"Create a buffered I/O implementation using an in-memory bytes\n"
-"buffer, ready for reading and writing.");
-
PyTypeObject PyBytesIO_Type = {
PyVarObject_HEAD_INIT(NULL, 0)
"_io.BytesIO", /*tp_name*/
@@ -934,7 +1066,7 @@ PyTypeObject PyBytesIO_Type = {
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE |
Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- bytesio_doc, /*tp_doc*/
+ _io_BytesIO___init____doc__, /*tp_doc*/
(traverseproc)bytesio_traverse, /*tp_traverse*/
(inquiry)bytesio_clear, /*tp_clear*/
0, /*tp_richcompare*/
@@ -949,7 +1081,7 @@ PyTypeObject PyBytesIO_Type = {
0, /*tp_descr_get*/
0, /*tp_descr_set*/
offsetof(bytesio, dict), /*tp_dictoffset*/
- (initproc)bytesio_init, /*tp_init*/
+ _io_BytesIO___init__, /*tp_init*/
0, /*tp_alloc*/
bytesio_new, /*tp_new*/
};
@@ -964,18 +1096,24 @@ PyTypeObject PyBytesIO_Type = {
static int
bytesiobuf_getbuffer(bytesiobuf *obj, Py_buffer *view, int flags)
{
- int ret;
bytesio *b = (bytesio *) obj->source;
+
if (view == NULL) {
- b->exports++;
- return 0;
+ PyErr_SetString(PyExc_BufferError,
+ "bytesiobuf_getbuffer: view==NULL argument is obsolete");
+ return -1;
}
- ret = PyBuffer_FillInfo(view, (PyObject*)obj, b->buf, b->string_size,
- 0, flags);
- if (ret >= 0) {
- b->exports++;
+ if (SHARED_BUF(b)) {
+ if (unshare_buffer(b, b->string_size) < 0)
+ return -1;
}
- return ret;
+
+ /* cannot fail if view != NULL and readonly == 0 */
+ (void)PyBuffer_FillInfo(view, (PyObject*)obj,
+ PyBytes_AS_STRING(b->buf), b->string_size,
+ 0, flags);
+ b->exports++;
+ return 0;
}
static void
diff --git a/Modules/_io/clinic/_iomodule.c.h b/Modules/_io/clinic/_iomodule.c.h
new file mode 100644
index 0000000000..a3abb93cc7
--- /dev/null
+++ b/Modules/_io/clinic/_iomodule.c.h
@@ -0,0 +1,159 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(_io_open__doc__,
+"open($module, /, file, mode=\'r\', buffering=-1, encoding=None,\n"
+" errors=None, newline=None, closefd=True, opener=None)\n"
+"--\n"
+"\n"
+"Open file and return a stream. Raise IOError upon failure.\n"
+"\n"
+"file is either a text or byte string giving the name (and the path\n"
+"if the file isn\'t in the current working directory) of the file to\n"
+"be opened or an integer file descriptor of the file to be\n"
+"wrapped. (If a file descriptor is given, it is closed when the\n"
+"returned I/O object is closed, unless closefd is set to False.)\n"
+"\n"
+"mode is an optional string that specifies the mode in which the file\n"
+"is opened. It defaults to \'r\' which means open for reading in text\n"
+"mode. Other common values are \'w\' for writing (truncating the file if\n"
+"it already exists), \'x\' for creating and writing to a new file, and\n"
+"\'a\' for appending (which on some Unix systems, means that all writes\n"
+"append to the end of the file regardless of the current seek position).\n"
+"In text mode, if encoding is not specified the encoding used is platform\n"
+"dependent: locale.getpreferredencoding(False) is called to get the\n"
+"current locale encoding. (For reading and writing raw bytes use binary\n"
+"mode and leave encoding unspecified.) The available modes are:\n"
+"\n"
+"========= ===============================================================\n"
+"Character Meaning\n"
+"--------- ---------------------------------------------------------------\n"
+"\'r\' open for reading (default)\n"
+"\'w\' open for writing, truncating the file first\n"
+"\'x\' create a new file and open it for writing\n"
+"\'a\' open for writing, appending to the end of the file if it exists\n"
+"\'b\' binary mode\n"
+"\'t\' text mode (default)\n"
+"\'+\' open a disk file for updating (reading and writing)\n"
+"\'U\' universal newline mode (deprecated)\n"
+"========= ===============================================================\n"
+"\n"
+"The default mode is \'rt\' (open for reading text). For binary random\n"
+"access, the mode \'w+b\' opens and truncates the file to 0 bytes, while\n"
+"\'r+b\' opens the file without truncation. The \'x\' mode implies \'w\' and\n"
+"raises an `FileExistsError` if the file already exists.\n"
+"\n"
+"Python distinguishes between files opened in binary and text modes,\n"
+"even when the underlying operating system doesn\'t. Files opened in\n"
+"binary mode (appending \'b\' to the mode argument) return contents as\n"
+"bytes objects without any decoding. In text mode (the default, or when\n"
+"\'t\' is appended to the mode argument), the contents of the file are\n"
+"returned as strings, the bytes having been first decoded using a\n"
+"platform-dependent encoding or using the specified encoding if given.\n"
+"\n"
+"\'U\' mode is deprecated and will raise an exception in future versions\n"
+"of Python. It has no effect in Python 3. Use newline to control\n"
+"universal newlines mode.\n"
+"\n"
+"buffering is an optional integer used to set the buffering policy.\n"
+"Pass 0 to switch buffering off (only allowed in binary mode), 1 to select\n"
+"line buffering (only usable in text mode), and an integer > 1 to indicate\n"
+"the size of a fixed-size chunk buffer. When no buffering argument is\n"
+"given, the default buffering policy works as follows:\n"
+"\n"
+"* Binary files are buffered in fixed-size chunks; the size of the buffer\n"
+" is chosen using a heuristic trying to determine the underlying device\'s\n"
+" \"block size\" and falling back on `io.DEFAULT_BUFFER_SIZE`.\n"
+" On many systems, the buffer will typically be 4096 or 8192 bytes long.\n"
+"\n"
+"* \"Interactive\" text files (files for which isatty() returns True)\n"
+" use line buffering. Other text files use the policy described above\n"
+" for binary files.\n"
+"\n"
+"encoding is the name of the encoding used to decode or encode the\n"
+"file. This should only be used in text mode. The default encoding is\n"
+"platform dependent, but any encoding supported by Python can be\n"
+"passed. See the codecs module for the list of supported encodings.\n"
+"\n"
+"errors is an optional string that specifies how encoding errors are to\n"
+"be handled---this argument should not be used in binary mode. Pass\n"
+"\'strict\' to raise a ValueError exception if there is an encoding error\n"
+"(the default of None has the same effect), or pass \'ignore\' to ignore\n"
+"errors. (Note that ignoring encoding errors can lead to data loss.)\n"
+"See the documentation for codecs.register or run \'help(codecs.Codec)\'\n"
+"for a list of the permitted encoding error strings.\n"
+"\n"
+"newline controls how universal newlines works (it only applies to text\n"
+"mode). It can be None, \'\', \'\\n\', \'\\r\', and \'\\r\\n\'. It works as\n"
+"follows:\n"
+"\n"
+"* On input, if newline is None, universal newlines mode is\n"
+" enabled. Lines in the input can end in \'\\n\', \'\\r\', or \'\\r\\n\', and\n"
+" these are translated into \'\\n\' before being returned to the\n"
+" caller. If it is \'\', universal newline mode is enabled, but line\n"
+" endings are returned to the caller untranslated. If it has any of\n"
+" the other legal values, input lines are only terminated by the given\n"
+" string, and the line ending is returned to the caller untranslated.\n"
+"\n"
+"* On output, if newline is None, any \'\\n\' characters written are\n"
+" translated to the system default line separator, os.linesep. If\n"
+" newline is \'\' or \'\\n\', no translation takes place. If newline is any\n"
+" of the other legal values, any \'\\n\' characters written are translated\n"
+" to the given string.\n"
+"\n"
+"If closefd is False, the underlying file descriptor will be kept open\n"
+"when the file is closed. This does not work when a file name is given\n"
+"and must be True in that case.\n"
+"\n"
+"A custom opener can be used by passing a callable as *opener*. The\n"
+"underlying file descriptor for the file object is then obtained by\n"
+"calling *opener* with (*file*, *flags*). *opener* must return an open\n"
+"file descriptor (passing os.open as *opener* results in functionality\n"
+"similar to passing None).\n"
+"\n"
+"open() returns a file object whose type depends on the mode, and\n"
+"through which the standard file operations such as reading and writing\n"
+"are performed. When open() is used to open a file in a text mode (\'w\',\n"
+"\'r\', \'wt\', \'rt\', etc.), it returns a TextIOWrapper. When used to open\n"
+"a file in a binary mode, the returned class varies: in read binary\n"
+"mode, it returns a BufferedReader; in write binary and append binary\n"
+"modes, it returns a BufferedWriter, and in read/write mode, it returns\n"
+"a BufferedRandom.\n"
+"\n"
+"It is also possible to use a string or bytearray as a file for both\n"
+"reading and writing. For strings StringIO can be used like a file\n"
+"opened in a text mode, and for bytes a BytesIO can be used like a file\n"
+"opened in a binary mode.");
+
+#define _IO_OPEN_METHODDEF \
+ {"open", (PyCFunction)_io_open, METH_VARARGS|METH_KEYWORDS, _io_open__doc__},
+
+static PyObject *
+_io_open_impl(PyModuleDef *module, PyObject *file, const char *mode,
+ int buffering, const char *encoding, const char *errors,
+ const char *newline, int closefd, PyObject *opener);
+
+static PyObject *
+_io_open(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"file", "mode", "buffering", "encoding", "errors", "newline", "closefd", "opener", NULL};
+ PyObject *file;
+ const char *mode = "r";
+ int buffering = -1;
+ const char *encoding = NULL;
+ const char *errors = NULL;
+ const char *newline = NULL;
+ int closefd = 1;
+ PyObject *opener = Py_None;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|sizzziO:open", _keywords,
+ &file, &mode, &buffering, &encoding, &errors, &newline, &closefd, &opener))
+ goto exit;
+ return_value = _io_open_impl(module, file, mode, buffering, encoding, errors, newline, closefd, opener);
+
+exit:
+ return return_value;
+}
+/*[clinic end generated code: output=97cdc09bf68a8064 input=a9049054013a1b77]*/
diff --git a/Modules/_io/clinic/bufferedio.c.h b/Modules/_io/clinic/bufferedio.c.h
new file mode 100644
index 0000000000..437e275730
--- /dev/null
+++ b/Modules/_io/clinic/bufferedio.c.h
@@ -0,0 +1,454 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(_io__BufferedIOBase_readinto__doc__,
+"readinto($self, buffer, /)\n"
+"--\n"
+"\n");
+
+#define _IO__BUFFEREDIOBASE_READINTO_METHODDEF \
+ {"readinto", (PyCFunction)_io__BufferedIOBase_readinto, METH_O, _io__BufferedIOBase_readinto__doc__},
+
+static PyObject *
+_io__BufferedIOBase_readinto_impl(PyObject *self, Py_buffer *buffer);
+
+static PyObject *
+_io__BufferedIOBase_readinto(PyObject *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_buffer buffer = {NULL, NULL};
+
+ if (!PyArg_Parse(arg, "w*:readinto", &buffer))
+ goto exit;
+ return_value = _io__BufferedIOBase_readinto_impl(self, &buffer);
+
+exit:
+ /* Cleanup for buffer */
+ if (buffer.obj)
+ PyBuffer_Release(&buffer);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_io__BufferedIOBase_readinto1__doc__,
+"readinto1($self, buffer, /)\n"
+"--\n"
+"\n");
+
+#define _IO__BUFFEREDIOBASE_READINTO1_METHODDEF \
+ {"readinto1", (PyCFunction)_io__BufferedIOBase_readinto1, METH_O, _io__BufferedIOBase_readinto1__doc__},
+
+static PyObject *
+_io__BufferedIOBase_readinto1_impl(PyObject *self, Py_buffer *buffer);
+
+static PyObject *
+_io__BufferedIOBase_readinto1(PyObject *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_buffer buffer = {NULL, NULL};
+
+ if (!PyArg_Parse(arg, "w*:readinto1", &buffer))
+ goto exit;
+ return_value = _io__BufferedIOBase_readinto1_impl(self, &buffer);
+
+exit:
+ /* Cleanup for buffer */
+ if (buffer.obj)
+ PyBuffer_Release(&buffer);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_io__BufferedIOBase_detach__doc__,
+"detach($self, /)\n"
+"--\n"
+"\n"
+"Disconnect this buffer from its underlying raw stream and return it.\n"
+"\n"
+"After the raw stream has been detached, the buffer is in an unusable\n"
+"state.");
+
+#define _IO__BUFFEREDIOBASE_DETACH_METHODDEF \
+ {"detach", (PyCFunction)_io__BufferedIOBase_detach, METH_NOARGS, _io__BufferedIOBase_detach__doc__},
+
+static PyObject *
+_io__BufferedIOBase_detach_impl(PyObject *self);
+
+static PyObject *
+_io__BufferedIOBase_detach(PyObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io__BufferedIOBase_detach_impl(self);
+}
+
+PyDoc_STRVAR(_io__Buffered_peek__doc__,
+"peek($self, size=0, /)\n"
+"--\n"
+"\n");
+
+#define _IO__BUFFERED_PEEK_METHODDEF \
+ {"peek", (PyCFunction)_io__Buffered_peek, METH_VARARGS, _io__Buffered_peek__doc__},
+
+static PyObject *
+_io__Buffered_peek_impl(buffered *self, Py_ssize_t size);
+
+static PyObject *
+_io__Buffered_peek(buffered *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_ssize_t size = 0;
+
+ if (!PyArg_ParseTuple(args, "|n:peek",
+ &size))
+ goto exit;
+ return_value = _io__Buffered_peek_impl(self, size);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io__Buffered_read__doc__,
+"read($self, size=-1, /)\n"
+"--\n"
+"\n");
+
+#define _IO__BUFFERED_READ_METHODDEF \
+ {"read", (PyCFunction)_io__Buffered_read, METH_VARARGS, _io__Buffered_read__doc__},
+
+static PyObject *
+_io__Buffered_read_impl(buffered *self, Py_ssize_t n);
+
+static PyObject *
+_io__Buffered_read(buffered *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_ssize_t n = -1;
+
+ if (!PyArg_ParseTuple(args, "|O&:read",
+ _PyIO_ConvertSsize_t, &n))
+ goto exit;
+ return_value = _io__Buffered_read_impl(self, n);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io__Buffered_read1__doc__,
+"read1($self, size, /)\n"
+"--\n"
+"\n");
+
+#define _IO__BUFFERED_READ1_METHODDEF \
+ {"read1", (PyCFunction)_io__Buffered_read1, METH_O, _io__Buffered_read1__doc__},
+
+static PyObject *
+_io__Buffered_read1_impl(buffered *self, Py_ssize_t n);
+
+static PyObject *
+_io__Buffered_read1(buffered *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_ssize_t n;
+
+ if (!PyArg_Parse(arg, "n:read1", &n))
+ goto exit;
+ return_value = _io__Buffered_read1_impl(self, n);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io__Buffered_readinto__doc__,
+"readinto($self, buffer, /)\n"
+"--\n"
+"\n");
+
+#define _IO__BUFFERED_READINTO_METHODDEF \
+ {"readinto", (PyCFunction)_io__Buffered_readinto, METH_O, _io__Buffered_readinto__doc__},
+
+static PyObject *
+_io__Buffered_readinto_impl(buffered *self, Py_buffer *buffer);
+
+static PyObject *
+_io__Buffered_readinto(buffered *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_buffer buffer = {NULL, NULL};
+
+ if (!PyArg_Parse(arg, "w*:readinto", &buffer))
+ goto exit;
+ return_value = _io__Buffered_readinto_impl(self, &buffer);
+
+exit:
+ /* Cleanup for buffer */
+ if (buffer.obj)
+ PyBuffer_Release(&buffer);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_io__Buffered_readinto1__doc__,
+"readinto1($self, buffer, /)\n"
+"--\n"
+"\n");
+
+#define _IO__BUFFERED_READINTO1_METHODDEF \
+ {"readinto1", (PyCFunction)_io__Buffered_readinto1, METH_O, _io__Buffered_readinto1__doc__},
+
+static PyObject *
+_io__Buffered_readinto1_impl(buffered *self, Py_buffer *buffer);
+
+static PyObject *
+_io__Buffered_readinto1(buffered *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_buffer buffer = {NULL, NULL};
+
+ if (!PyArg_Parse(arg, "w*:readinto1", &buffer))
+ goto exit;
+ return_value = _io__Buffered_readinto1_impl(self, &buffer);
+
+exit:
+ /* Cleanup for buffer */
+ if (buffer.obj)
+ PyBuffer_Release(&buffer);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_io__Buffered_readline__doc__,
+"readline($self, size=-1, /)\n"
+"--\n"
+"\n");
+
+#define _IO__BUFFERED_READLINE_METHODDEF \
+ {"readline", (PyCFunction)_io__Buffered_readline, METH_VARARGS, _io__Buffered_readline__doc__},
+
+static PyObject *
+_io__Buffered_readline_impl(buffered *self, Py_ssize_t size);
+
+static PyObject *
+_io__Buffered_readline(buffered *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_ssize_t size = -1;
+
+ if (!PyArg_ParseTuple(args, "|O&:readline",
+ _PyIO_ConvertSsize_t, &size))
+ goto exit;
+ return_value = _io__Buffered_readline_impl(self, size);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io__Buffered_seek__doc__,
+"seek($self, target, whence=0, /)\n"
+"--\n"
+"\n");
+
+#define _IO__BUFFERED_SEEK_METHODDEF \
+ {"seek", (PyCFunction)_io__Buffered_seek, METH_VARARGS, _io__Buffered_seek__doc__},
+
+static PyObject *
+_io__Buffered_seek_impl(buffered *self, PyObject *targetobj, int whence);
+
+static PyObject *
+_io__Buffered_seek(buffered *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *targetobj;
+ int whence = 0;
+
+ if (!PyArg_ParseTuple(args, "O|i:seek",
+ &targetobj, &whence))
+ goto exit;
+ return_value = _io__Buffered_seek_impl(self, targetobj, whence);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io__Buffered_truncate__doc__,
+"truncate($self, pos=None, /)\n"
+"--\n"
+"\n");
+
+#define _IO__BUFFERED_TRUNCATE_METHODDEF \
+ {"truncate", (PyCFunction)_io__Buffered_truncate, METH_VARARGS, _io__Buffered_truncate__doc__},
+
+static PyObject *
+_io__Buffered_truncate_impl(buffered *self, PyObject *pos);
+
+static PyObject *
+_io__Buffered_truncate(buffered *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *pos = Py_None;
+
+ if (!PyArg_UnpackTuple(args, "truncate",
+ 0, 1,
+ &pos))
+ goto exit;
+ return_value = _io__Buffered_truncate_impl(self, pos);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io_BufferedReader___init____doc__,
+"BufferedReader(raw, buffer_size=DEFAULT_BUFFER_SIZE)\n"
+"--\n"
+"\n"
+"Create a new buffered reader using the given readable raw IO object.");
+
+static int
+_io_BufferedReader___init___impl(buffered *self, PyObject *raw,
+ Py_ssize_t buffer_size);
+
+static int
+_io_BufferedReader___init__(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ int return_value = -1;
+ static char *_keywords[] = {"raw", "buffer_size", NULL};
+ PyObject *raw;
+ Py_ssize_t buffer_size = DEFAULT_BUFFER_SIZE;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|n:BufferedReader", _keywords,
+ &raw, &buffer_size))
+ goto exit;
+ return_value = _io_BufferedReader___init___impl((buffered *)self, raw, buffer_size);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io_BufferedWriter___init____doc__,
+"BufferedWriter(raw, buffer_size=DEFAULT_BUFFER_SIZE)\n"
+"--\n"
+"\n"
+"A buffer for a writeable sequential RawIO object.\n"
+"\n"
+"The constructor creates a BufferedWriter for the given writeable raw\n"
+"stream. If the buffer_size is not given, it defaults to\n"
+"DEFAULT_BUFFER_SIZE.");
+
+static int
+_io_BufferedWriter___init___impl(buffered *self, PyObject *raw,
+ Py_ssize_t buffer_size);
+
+static int
+_io_BufferedWriter___init__(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ int return_value = -1;
+ static char *_keywords[] = {"raw", "buffer_size", NULL};
+ PyObject *raw;
+ Py_ssize_t buffer_size = DEFAULT_BUFFER_SIZE;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|n:BufferedWriter", _keywords,
+ &raw, &buffer_size))
+ goto exit;
+ return_value = _io_BufferedWriter___init___impl((buffered *)self, raw, buffer_size);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io_BufferedWriter_write__doc__,
+"write($self, buffer, /)\n"
+"--\n"
+"\n");
+
+#define _IO_BUFFEREDWRITER_WRITE_METHODDEF \
+ {"write", (PyCFunction)_io_BufferedWriter_write, METH_O, _io_BufferedWriter_write__doc__},
+
+static PyObject *
+_io_BufferedWriter_write_impl(buffered *self, Py_buffer *buffer);
+
+static PyObject *
+_io_BufferedWriter_write(buffered *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_buffer buffer = {NULL, NULL};
+
+ if (!PyArg_Parse(arg, "y*:write", &buffer))
+ goto exit;
+ return_value = _io_BufferedWriter_write_impl(self, &buffer);
+
+exit:
+ /* Cleanup for buffer */
+ if (buffer.obj)
+ PyBuffer_Release(&buffer);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_io_BufferedRWPair___init____doc__,
+"BufferedRWPair(reader, writer, buffer_size=DEFAULT_BUFFER_SIZE, /)\n"
+"--\n"
+"\n"
+"A buffered reader and writer object together.\n"
+"\n"
+"A buffered reader object and buffered writer object put together to\n"
+"form a sequential IO object that can read and write. This is typically\n"
+"used with a socket or two-way pipe.\n"
+"\n"
+"reader and writer are RawIOBase objects that are readable and\n"
+"writeable respectively. If the buffer_size is omitted it defaults to\n"
+"DEFAULT_BUFFER_SIZE.");
+
+static int
+_io_BufferedRWPair___init___impl(rwpair *self, PyObject *reader,
+ PyObject *writer, Py_ssize_t buffer_size);
+
+static int
+_io_BufferedRWPair___init__(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ int return_value = -1;
+ PyObject *reader;
+ PyObject *writer;
+ Py_ssize_t buffer_size = DEFAULT_BUFFER_SIZE;
+
+ if ((Py_TYPE(self) == &PyBufferedRWPair_Type) &&
+ !_PyArg_NoKeywords("BufferedRWPair", kwargs))
+ goto exit;
+ if (!PyArg_ParseTuple(args, "OO|n:BufferedRWPair",
+ &reader, &writer, &buffer_size))
+ goto exit;
+ return_value = _io_BufferedRWPair___init___impl((rwpair *)self, reader, writer, buffer_size);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io_BufferedRandom___init____doc__,
+"BufferedRandom(raw, buffer_size=DEFAULT_BUFFER_SIZE)\n"
+"--\n"
+"\n"
+"A buffered interface to random access streams.\n"
+"\n"
+"The constructor creates a reader and writer for a seekable stream,\n"
+"raw, given in the first argument. If the buffer_size is omitted it\n"
+"defaults to DEFAULT_BUFFER_SIZE.");
+
+static int
+_io_BufferedRandom___init___impl(buffered *self, PyObject *raw,
+ Py_ssize_t buffer_size);
+
+static int
+_io_BufferedRandom___init__(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ int return_value = -1;
+ static char *_keywords[] = {"raw", "buffer_size", NULL};
+ PyObject *raw;
+ Py_ssize_t buffer_size = DEFAULT_BUFFER_SIZE;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|n:BufferedRandom", _keywords,
+ &raw, &buffer_size))
+ goto exit;
+ return_value = _io_BufferedRandom___init___impl((buffered *)self, raw, buffer_size);
+
+exit:
+ return return_value;
+}
+/*[clinic end generated code: output=2bbb5e239b4ffe6f input=a9049054013a1b77]*/
diff --git a/Modules/_io/clinic/bytesio.c.h b/Modules/_io/clinic/bytesio.c.h
new file mode 100644
index 0000000000..5f2abb03a7
--- /dev/null
+++ b/Modules/_io/clinic/bytesio.c.h
@@ -0,0 +1,422 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(_io_BytesIO_readable__doc__,
+"readable($self, /)\n"
+"--\n"
+"\n"
+"Returns True if the IO object can be read.");
+
+#define _IO_BYTESIO_READABLE_METHODDEF \
+ {"readable", (PyCFunction)_io_BytesIO_readable, METH_NOARGS, _io_BytesIO_readable__doc__},
+
+static PyObject *
+_io_BytesIO_readable_impl(bytesio *self);
+
+static PyObject *
+_io_BytesIO_readable(bytesio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_BytesIO_readable_impl(self);
+}
+
+PyDoc_STRVAR(_io_BytesIO_writable__doc__,
+"writable($self, /)\n"
+"--\n"
+"\n"
+"Returns True if the IO object can be written.");
+
+#define _IO_BYTESIO_WRITABLE_METHODDEF \
+ {"writable", (PyCFunction)_io_BytesIO_writable, METH_NOARGS, _io_BytesIO_writable__doc__},
+
+static PyObject *
+_io_BytesIO_writable_impl(bytesio *self);
+
+static PyObject *
+_io_BytesIO_writable(bytesio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_BytesIO_writable_impl(self);
+}
+
+PyDoc_STRVAR(_io_BytesIO_seekable__doc__,
+"seekable($self, /)\n"
+"--\n"
+"\n"
+"Returns True if the IO object can be seeked.");
+
+#define _IO_BYTESIO_SEEKABLE_METHODDEF \
+ {"seekable", (PyCFunction)_io_BytesIO_seekable, METH_NOARGS, _io_BytesIO_seekable__doc__},
+
+static PyObject *
+_io_BytesIO_seekable_impl(bytesio *self);
+
+static PyObject *
+_io_BytesIO_seekable(bytesio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_BytesIO_seekable_impl(self);
+}
+
+PyDoc_STRVAR(_io_BytesIO_flush__doc__,
+"flush($self, /)\n"
+"--\n"
+"\n"
+"Does nothing.");
+
+#define _IO_BYTESIO_FLUSH_METHODDEF \
+ {"flush", (PyCFunction)_io_BytesIO_flush, METH_NOARGS, _io_BytesIO_flush__doc__},
+
+static PyObject *
+_io_BytesIO_flush_impl(bytesio *self);
+
+static PyObject *
+_io_BytesIO_flush(bytesio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_BytesIO_flush_impl(self);
+}
+
+PyDoc_STRVAR(_io_BytesIO_getbuffer__doc__,
+"getbuffer($self, /)\n"
+"--\n"
+"\n"
+"Get a read-write view over the contents of the BytesIO object.");
+
+#define _IO_BYTESIO_GETBUFFER_METHODDEF \
+ {"getbuffer", (PyCFunction)_io_BytesIO_getbuffer, METH_NOARGS, _io_BytesIO_getbuffer__doc__},
+
+static PyObject *
+_io_BytesIO_getbuffer_impl(bytesio *self);
+
+static PyObject *
+_io_BytesIO_getbuffer(bytesio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_BytesIO_getbuffer_impl(self);
+}
+
+PyDoc_STRVAR(_io_BytesIO_getvalue__doc__,
+"getvalue($self, /)\n"
+"--\n"
+"\n"
+"Retrieve the entire contents of the BytesIO object.");
+
+#define _IO_BYTESIO_GETVALUE_METHODDEF \
+ {"getvalue", (PyCFunction)_io_BytesIO_getvalue, METH_NOARGS, _io_BytesIO_getvalue__doc__},
+
+static PyObject *
+_io_BytesIO_getvalue_impl(bytesio *self);
+
+static PyObject *
+_io_BytesIO_getvalue(bytesio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_BytesIO_getvalue_impl(self);
+}
+
+PyDoc_STRVAR(_io_BytesIO_isatty__doc__,
+"isatty($self, /)\n"
+"--\n"
+"\n"
+"Always returns False.\n"
+"\n"
+"BytesIO objects are not connected to a TTY-like device.");
+
+#define _IO_BYTESIO_ISATTY_METHODDEF \
+ {"isatty", (PyCFunction)_io_BytesIO_isatty, METH_NOARGS, _io_BytesIO_isatty__doc__},
+
+static PyObject *
+_io_BytesIO_isatty_impl(bytesio *self);
+
+static PyObject *
+_io_BytesIO_isatty(bytesio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_BytesIO_isatty_impl(self);
+}
+
+PyDoc_STRVAR(_io_BytesIO_tell__doc__,
+"tell($self, /)\n"
+"--\n"
+"\n"
+"Current file position, an integer.");
+
+#define _IO_BYTESIO_TELL_METHODDEF \
+ {"tell", (PyCFunction)_io_BytesIO_tell, METH_NOARGS, _io_BytesIO_tell__doc__},
+
+static PyObject *
+_io_BytesIO_tell_impl(bytesio *self);
+
+static PyObject *
+_io_BytesIO_tell(bytesio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_BytesIO_tell_impl(self);
+}
+
+PyDoc_STRVAR(_io_BytesIO_read__doc__,
+"read($self, size=None, /)\n"
+"--\n"
+"\n"
+"Read at most size bytes, returned as a bytes object.\n"
+"\n"
+"If the size argument is negative, read until EOF is reached.\n"
+"Return an empty bytes object at EOF.");
+
+#define _IO_BYTESIO_READ_METHODDEF \
+ {"read", (PyCFunction)_io_BytesIO_read, METH_VARARGS, _io_BytesIO_read__doc__},
+
+static PyObject *
+_io_BytesIO_read_impl(bytesio *self, PyObject *arg);
+
+static PyObject *
+_io_BytesIO_read(bytesio *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *arg = Py_None;
+
+ if (!PyArg_UnpackTuple(args, "read",
+ 0, 1,
+ &arg))
+ goto exit;
+ return_value = _io_BytesIO_read_impl(self, arg);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io_BytesIO_read1__doc__,
+"read1($self, size, /)\n"
+"--\n"
+"\n"
+"Read at most size bytes, returned as a bytes object.\n"
+"\n"
+"If the size argument is negative or omitted, read until EOF is reached.\n"
+"Return an empty bytes object at EOF.");
+
+#define _IO_BYTESIO_READ1_METHODDEF \
+ {"read1", (PyCFunction)_io_BytesIO_read1, METH_O, _io_BytesIO_read1__doc__},
+
+PyDoc_STRVAR(_io_BytesIO_readline__doc__,
+"readline($self, size=None, /)\n"
+"--\n"
+"\n"
+"Next line from the file, as a bytes object.\n"
+"\n"
+"Retain newline. A non-negative size argument limits the maximum\n"
+"number of bytes to return (an incomplete line may be returned then).\n"
+"Return an empty bytes object at EOF.");
+
+#define _IO_BYTESIO_READLINE_METHODDEF \
+ {"readline", (PyCFunction)_io_BytesIO_readline, METH_VARARGS, _io_BytesIO_readline__doc__},
+
+static PyObject *
+_io_BytesIO_readline_impl(bytesio *self, PyObject *arg);
+
+static PyObject *
+_io_BytesIO_readline(bytesio *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *arg = Py_None;
+
+ if (!PyArg_UnpackTuple(args, "readline",
+ 0, 1,
+ &arg))
+ goto exit;
+ return_value = _io_BytesIO_readline_impl(self, arg);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io_BytesIO_readlines__doc__,
+"readlines($self, size=None, /)\n"
+"--\n"
+"\n"
+"List of bytes objects, each a line from the file.\n"
+"\n"
+"Call readline() repeatedly and return a list of the lines so read.\n"
+"The optional size argument, if given, is an approximate bound on the\n"
+"total number of bytes in the lines returned.");
+
+#define _IO_BYTESIO_READLINES_METHODDEF \
+ {"readlines", (PyCFunction)_io_BytesIO_readlines, METH_VARARGS, _io_BytesIO_readlines__doc__},
+
+static PyObject *
+_io_BytesIO_readlines_impl(bytesio *self, PyObject *arg);
+
+static PyObject *
+_io_BytesIO_readlines(bytesio *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *arg = Py_None;
+
+ if (!PyArg_UnpackTuple(args, "readlines",
+ 0, 1,
+ &arg))
+ goto exit;
+ return_value = _io_BytesIO_readlines_impl(self, arg);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io_BytesIO_readinto__doc__,
+"readinto($self, buffer, /)\n"
+"--\n"
+"\n"
+"Read bytes into buffer.\n"
+"\n"
+"Returns number of bytes read (0 for EOF), or None if the object\n"
+"is set not to block and has no data to read.");
+
+#define _IO_BYTESIO_READINTO_METHODDEF \
+ {"readinto", (PyCFunction)_io_BytesIO_readinto, METH_O, _io_BytesIO_readinto__doc__},
+
+static PyObject *
+_io_BytesIO_readinto_impl(bytesio *self, Py_buffer *buffer);
+
+static PyObject *
+_io_BytesIO_readinto(bytesio *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_buffer buffer = {NULL, NULL};
+
+ if (!PyArg_Parse(arg, "w*:readinto", &buffer))
+ goto exit;
+ return_value = _io_BytesIO_readinto_impl(self, &buffer);
+
+exit:
+ /* Cleanup for buffer */
+ if (buffer.obj)
+ PyBuffer_Release(&buffer);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_io_BytesIO_truncate__doc__,
+"truncate($self, size=None, /)\n"
+"--\n"
+"\n"
+"Truncate the file to at most size bytes.\n"
+"\n"
+"Size defaults to the current file position, as returned by tell().\n"
+"The current file position is unchanged. Returns the new size.");
+
+#define _IO_BYTESIO_TRUNCATE_METHODDEF \
+ {"truncate", (PyCFunction)_io_BytesIO_truncate, METH_VARARGS, _io_BytesIO_truncate__doc__},
+
+static PyObject *
+_io_BytesIO_truncate_impl(bytesio *self, PyObject *arg);
+
+static PyObject *
+_io_BytesIO_truncate(bytesio *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *arg = Py_None;
+
+ if (!PyArg_UnpackTuple(args, "truncate",
+ 0, 1,
+ &arg))
+ goto exit;
+ return_value = _io_BytesIO_truncate_impl(self, arg);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io_BytesIO_seek__doc__,
+"seek($self, pos, whence=0, /)\n"
+"--\n"
+"\n"
+"Change stream position.\n"
+"\n"
+"Seek to byte offset pos relative to position indicated by whence:\n"
+" 0 Start of stream (the default). pos should be >= 0;\n"
+" 1 Current position - pos may be negative;\n"
+" 2 End of stream - pos usually negative.\n"
+"Returns the new absolute position.");
+
+#define _IO_BYTESIO_SEEK_METHODDEF \
+ {"seek", (PyCFunction)_io_BytesIO_seek, METH_VARARGS, _io_BytesIO_seek__doc__},
+
+static PyObject *
+_io_BytesIO_seek_impl(bytesio *self, Py_ssize_t pos, int whence);
+
+static PyObject *
+_io_BytesIO_seek(bytesio *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_ssize_t pos;
+ int whence = 0;
+
+ if (!PyArg_ParseTuple(args, "n|i:seek",
+ &pos, &whence))
+ goto exit;
+ return_value = _io_BytesIO_seek_impl(self, pos, whence);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io_BytesIO_write__doc__,
+"write($self, b, /)\n"
+"--\n"
+"\n"
+"Write bytes to file.\n"
+"\n"
+"Return the number of bytes written.");
+
+#define _IO_BYTESIO_WRITE_METHODDEF \
+ {"write", (PyCFunction)_io_BytesIO_write, METH_O, _io_BytesIO_write__doc__},
+
+PyDoc_STRVAR(_io_BytesIO_writelines__doc__,
+"writelines($self, lines, /)\n"
+"--\n"
+"\n"
+"Write lines to the file.\n"
+"\n"
+"Note that newlines are not added. lines can be any iterable object\n"
+"producing bytes-like objects. This is equivalent to calling write() for\n"
+"each element.");
+
+#define _IO_BYTESIO_WRITELINES_METHODDEF \
+ {"writelines", (PyCFunction)_io_BytesIO_writelines, METH_O, _io_BytesIO_writelines__doc__},
+
+PyDoc_STRVAR(_io_BytesIO_close__doc__,
+"close($self, /)\n"
+"--\n"
+"\n"
+"Disable all I/O operations.");
+
+#define _IO_BYTESIO_CLOSE_METHODDEF \
+ {"close", (PyCFunction)_io_BytesIO_close, METH_NOARGS, _io_BytesIO_close__doc__},
+
+static PyObject *
+_io_BytesIO_close_impl(bytesio *self);
+
+static PyObject *
+_io_BytesIO_close(bytesio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_BytesIO_close_impl(self);
+}
+
+PyDoc_STRVAR(_io_BytesIO___init____doc__,
+"BytesIO(initial_bytes=b\'\')\n"
+"--\n"
+"\n"
+"Buffered I/O implementation using an in-memory bytes buffer.");
+
+static int
+_io_BytesIO___init___impl(bytesio *self, PyObject *initvalue);
+
+static int
+_io_BytesIO___init__(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ int return_value = -1;
+ static char *_keywords[] = {"initial_bytes", NULL};
+ PyObject *initvalue = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:BytesIO", _keywords,
+ &initvalue))
+ goto exit;
+ return_value = _io_BytesIO___init___impl((bytesio *)self, initvalue);
+
+exit:
+ return return_value;
+}
+/*[clinic end generated code: output=60ce2c6272718431 input=a9049054013a1b77]*/
diff --git a/Modules/_io/clinic/fileio.c.h b/Modules/_io/clinic/fileio.c.h
new file mode 100644
index 0000000000..10420082ac
--- /dev/null
+++ b/Modules/_io/clinic/fileio.c.h
@@ -0,0 +1,367 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(_io_FileIO_close__doc__,
+"close($self, /)\n"
+"--\n"
+"\n"
+"Close the file.\n"
+"\n"
+"A closed file cannot be used for further I/O operations. close() may be\n"
+"called more than once without error.");
+
+#define _IO_FILEIO_CLOSE_METHODDEF \
+ {"close", (PyCFunction)_io_FileIO_close, METH_NOARGS, _io_FileIO_close__doc__},
+
+static PyObject *
+_io_FileIO_close_impl(fileio *self);
+
+static PyObject *
+_io_FileIO_close(fileio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_FileIO_close_impl(self);
+}
+
+PyDoc_STRVAR(_io_FileIO___init____doc__,
+"FileIO(file, mode=\'r\', closefd=True, opener=None)\n"
+"--\n"
+"\n"
+"Open a file.\n"
+"\n"
+"The mode can be \'r\' (default), \'w\', \'x\' or \'a\' for reading,\n"
+"writing, exclusive creation or appending. The file will be created if it\n"
+"doesn\'t exist when opened for writing or appending; it will be truncated\n"
+"when opened for writing. A FileExistsError will be raised if it already\n"
+"exists when opened for creating. Opening a file for creating implies\n"
+"writing so this mode behaves in a similar way to \'w\'.Add a \'+\' to the mode\n"
+"to allow simultaneous reading and writing. A custom opener can be used by\n"
+"passing a callable as *opener*. The underlying file descriptor for the file\n"
+"object is then obtained by calling opener with (*name*, *flags*).\n"
+"*opener* must return an open file descriptor (passing os.open as *opener*\n"
+"results in functionality similar to passing None).");
+
+static int
+_io_FileIO___init___impl(fileio *self, PyObject *nameobj, const char *mode,
+ int closefd, PyObject *opener);
+
+static int
+_io_FileIO___init__(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ int return_value = -1;
+ static char *_keywords[] = {"file", "mode", "closefd", "opener", NULL};
+ PyObject *nameobj;
+ const char *mode = "r";
+ int closefd = 1;
+ PyObject *opener = Py_None;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|siO:FileIO", _keywords,
+ &nameobj, &mode, &closefd, &opener))
+ goto exit;
+ return_value = _io_FileIO___init___impl((fileio *)self, nameobj, mode, closefd, opener);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io_FileIO_fileno__doc__,
+"fileno($self, /)\n"
+"--\n"
+"\n"
+"Return the underlying file descriptor (an integer).");
+
+#define _IO_FILEIO_FILENO_METHODDEF \
+ {"fileno", (PyCFunction)_io_FileIO_fileno, METH_NOARGS, _io_FileIO_fileno__doc__},
+
+static PyObject *
+_io_FileIO_fileno_impl(fileio *self);
+
+static PyObject *
+_io_FileIO_fileno(fileio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_FileIO_fileno_impl(self);
+}
+
+PyDoc_STRVAR(_io_FileIO_readable__doc__,
+"readable($self, /)\n"
+"--\n"
+"\n"
+"True if file was opened in a read mode.");
+
+#define _IO_FILEIO_READABLE_METHODDEF \
+ {"readable", (PyCFunction)_io_FileIO_readable, METH_NOARGS, _io_FileIO_readable__doc__},
+
+static PyObject *
+_io_FileIO_readable_impl(fileio *self);
+
+static PyObject *
+_io_FileIO_readable(fileio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_FileIO_readable_impl(self);
+}
+
+PyDoc_STRVAR(_io_FileIO_writable__doc__,
+"writable($self, /)\n"
+"--\n"
+"\n"
+"True if file was opened in a write mode.");
+
+#define _IO_FILEIO_WRITABLE_METHODDEF \
+ {"writable", (PyCFunction)_io_FileIO_writable, METH_NOARGS, _io_FileIO_writable__doc__},
+
+static PyObject *
+_io_FileIO_writable_impl(fileio *self);
+
+static PyObject *
+_io_FileIO_writable(fileio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_FileIO_writable_impl(self);
+}
+
+PyDoc_STRVAR(_io_FileIO_seekable__doc__,
+"seekable($self, /)\n"
+"--\n"
+"\n"
+"True if file supports random-access.");
+
+#define _IO_FILEIO_SEEKABLE_METHODDEF \
+ {"seekable", (PyCFunction)_io_FileIO_seekable, METH_NOARGS, _io_FileIO_seekable__doc__},
+
+static PyObject *
+_io_FileIO_seekable_impl(fileio *self);
+
+static PyObject *
+_io_FileIO_seekable(fileio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_FileIO_seekable_impl(self);
+}
+
+PyDoc_STRVAR(_io_FileIO_readinto__doc__,
+"readinto($self, buffer, /)\n"
+"--\n"
+"\n"
+"Same as RawIOBase.readinto().");
+
+#define _IO_FILEIO_READINTO_METHODDEF \
+ {"readinto", (PyCFunction)_io_FileIO_readinto, METH_O, _io_FileIO_readinto__doc__},
+
+static PyObject *
+_io_FileIO_readinto_impl(fileio *self, Py_buffer *buffer);
+
+static PyObject *
+_io_FileIO_readinto(fileio *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_buffer buffer = {NULL, NULL};
+
+ if (!PyArg_Parse(arg, "w*:readinto", &buffer))
+ goto exit;
+ return_value = _io_FileIO_readinto_impl(self, &buffer);
+
+exit:
+ /* Cleanup for buffer */
+ if (buffer.obj)
+ PyBuffer_Release(&buffer);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_io_FileIO_readall__doc__,
+"readall($self, /)\n"
+"--\n"
+"\n"
+"Read all data from the file, returned as bytes.\n"
+"\n"
+"In non-blocking mode, returns as much as is immediately available,\n"
+"or None if no data is available. Return an empty bytes object at EOF.");
+
+#define _IO_FILEIO_READALL_METHODDEF \
+ {"readall", (PyCFunction)_io_FileIO_readall, METH_NOARGS, _io_FileIO_readall__doc__},
+
+static PyObject *
+_io_FileIO_readall_impl(fileio *self);
+
+static PyObject *
+_io_FileIO_readall(fileio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_FileIO_readall_impl(self);
+}
+
+PyDoc_STRVAR(_io_FileIO_read__doc__,
+"read($self, size=-1, /)\n"
+"--\n"
+"\n"
+"Read at most size bytes, returned as bytes.\n"
+"\n"
+"Only makes one system call, so less data may be returned than requested.\n"
+"In non-blocking mode, returns None if no data is available.\n"
+"Return an empty bytes object at EOF.");
+
+#define _IO_FILEIO_READ_METHODDEF \
+ {"read", (PyCFunction)_io_FileIO_read, METH_VARARGS, _io_FileIO_read__doc__},
+
+static PyObject *
+_io_FileIO_read_impl(fileio *self, Py_ssize_t size);
+
+static PyObject *
+_io_FileIO_read(fileio *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_ssize_t size = -1;
+
+ if (!PyArg_ParseTuple(args, "|O&:read",
+ _PyIO_ConvertSsize_t, &size))
+ goto exit;
+ return_value = _io_FileIO_read_impl(self, size);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io_FileIO_write__doc__,
+"write($self, b, /)\n"
+"--\n"
+"\n"
+"Write buffer b to file, return number of bytes written.\n"
+"\n"
+"Only makes one system call, so not all of the data may be written.\n"
+"The number of bytes actually written is returned. In non-blocking mode,\n"
+"returns None if the write would block.");
+
+#define _IO_FILEIO_WRITE_METHODDEF \
+ {"write", (PyCFunction)_io_FileIO_write, METH_O, _io_FileIO_write__doc__},
+
+static PyObject *
+_io_FileIO_write_impl(fileio *self, Py_buffer *b);
+
+static PyObject *
+_io_FileIO_write(fileio *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_buffer b = {NULL, NULL};
+
+ if (!PyArg_Parse(arg, "y*:write", &b))
+ goto exit;
+ return_value = _io_FileIO_write_impl(self, &b);
+
+exit:
+ /* Cleanup for b */
+ if (b.obj)
+ PyBuffer_Release(&b);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_io_FileIO_seek__doc__,
+"seek($self, pos, whence=0, /)\n"
+"--\n"
+"\n"
+"Move to new file position and return the file position.\n"
+"\n"
+"Argument offset is a byte count. Optional argument whence defaults to\n"
+"SEEK_SET or 0 (offset from start of file, offset should be >= 0); other values\n"
+"are SEEK_CUR or 1 (move relative to current position, positive or negative),\n"
+"and SEEK_END or 2 (move relative to end of file, usually negative, although\n"
+"many platforms allow seeking beyond the end of a file).\n"
+"\n"
+"Note that not all file objects are seekable.");
+
+#define _IO_FILEIO_SEEK_METHODDEF \
+ {"seek", (PyCFunction)_io_FileIO_seek, METH_VARARGS, _io_FileIO_seek__doc__},
+
+static PyObject *
+_io_FileIO_seek_impl(fileio *self, PyObject *pos, int whence);
+
+static PyObject *
+_io_FileIO_seek(fileio *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *pos;
+ int whence = 0;
+
+ if (!PyArg_ParseTuple(args, "O|i:seek",
+ &pos, &whence))
+ goto exit;
+ return_value = _io_FileIO_seek_impl(self, pos, whence);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io_FileIO_tell__doc__,
+"tell($self, /)\n"
+"--\n"
+"\n"
+"Current file position.\n"
+"\n"
+"Can raise OSError for non seekable files.");
+
+#define _IO_FILEIO_TELL_METHODDEF \
+ {"tell", (PyCFunction)_io_FileIO_tell, METH_NOARGS, _io_FileIO_tell__doc__},
+
+static PyObject *
+_io_FileIO_tell_impl(fileio *self);
+
+static PyObject *
+_io_FileIO_tell(fileio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_FileIO_tell_impl(self);
+}
+
+#if defined(HAVE_FTRUNCATE)
+
+PyDoc_STRVAR(_io_FileIO_truncate__doc__,
+"truncate($self, size=None, /)\n"
+"--\n"
+"\n"
+"Truncate the file to at most size bytes and return the truncated size.\n"
+"\n"
+"Size defaults to the current file position, as returned by tell().\n"
+"The current file position is changed to the value of size.");
+
+#define _IO_FILEIO_TRUNCATE_METHODDEF \
+ {"truncate", (PyCFunction)_io_FileIO_truncate, METH_VARARGS, _io_FileIO_truncate__doc__},
+
+static PyObject *
+_io_FileIO_truncate_impl(fileio *self, PyObject *posobj);
+
+static PyObject *
+_io_FileIO_truncate(fileio *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *posobj = NULL;
+
+ if (!PyArg_UnpackTuple(args, "truncate",
+ 0, 1,
+ &posobj))
+ goto exit;
+ return_value = _io_FileIO_truncate_impl(self, posobj);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_FTRUNCATE) */
+
+PyDoc_STRVAR(_io_FileIO_isatty__doc__,
+"isatty($self, /)\n"
+"--\n"
+"\n"
+"True if the file is connected to a TTY device.");
+
+#define _IO_FILEIO_ISATTY_METHODDEF \
+ {"isatty", (PyCFunction)_io_FileIO_isatty, METH_NOARGS, _io_FileIO_isatty__doc__},
+
+static PyObject *
+_io_FileIO_isatty_impl(fileio *self);
+
+static PyObject *
+_io_FileIO_isatty(fileio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_FileIO_isatty_impl(self);
+}
+
+#ifndef _IO_FILEIO_TRUNCATE_METHODDEF
+ #define _IO_FILEIO_TRUNCATE_METHODDEF
+#endif /* !defined(_IO_FILEIO_TRUNCATE_METHODDEF) */
+/*[clinic end generated code: output=dcbc39b466598492 input=a9049054013a1b77]*/
diff --git a/Modules/_io/clinic/iobase.c.h b/Modules/_io/clinic/iobase.c.h
new file mode 100644
index 0000000000..9762f11222
--- /dev/null
+++ b/Modules/_io/clinic/iobase.c.h
@@ -0,0 +1,279 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(_io__IOBase_tell__doc__,
+"tell($self, /)\n"
+"--\n"
+"\n"
+"Return current stream position.");
+
+#define _IO__IOBASE_TELL_METHODDEF \
+ {"tell", (PyCFunction)_io__IOBase_tell, METH_NOARGS, _io__IOBase_tell__doc__},
+
+static PyObject *
+_io__IOBase_tell_impl(PyObject *self);
+
+static PyObject *
+_io__IOBase_tell(PyObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io__IOBase_tell_impl(self);
+}
+
+PyDoc_STRVAR(_io__IOBase_flush__doc__,
+"flush($self, /)\n"
+"--\n"
+"\n"
+"Flush write buffers, if applicable.\n"
+"\n"
+"This is not implemented for read-only and non-blocking streams.");
+
+#define _IO__IOBASE_FLUSH_METHODDEF \
+ {"flush", (PyCFunction)_io__IOBase_flush, METH_NOARGS, _io__IOBase_flush__doc__},
+
+static PyObject *
+_io__IOBase_flush_impl(PyObject *self);
+
+static PyObject *
+_io__IOBase_flush(PyObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io__IOBase_flush_impl(self);
+}
+
+PyDoc_STRVAR(_io__IOBase_close__doc__,
+"close($self, /)\n"
+"--\n"
+"\n"
+"Flush and close the IO object.\n"
+"\n"
+"This method has no effect if the file is already closed.");
+
+#define _IO__IOBASE_CLOSE_METHODDEF \
+ {"close", (PyCFunction)_io__IOBase_close, METH_NOARGS, _io__IOBase_close__doc__},
+
+static PyObject *
+_io__IOBase_close_impl(PyObject *self);
+
+static PyObject *
+_io__IOBase_close(PyObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io__IOBase_close_impl(self);
+}
+
+PyDoc_STRVAR(_io__IOBase_seekable__doc__,
+"seekable($self, /)\n"
+"--\n"
+"\n"
+"Return whether object supports random access.\n"
+"\n"
+"If False, seek(), tell() and truncate() will raise OSError.\n"
+"This method may need to do a test seek().");
+
+#define _IO__IOBASE_SEEKABLE_METHODDEF \
+ {"seekable", (PyCFunction)_io__IOBase_seekable, METH_NOARGS, _io__IOBase_seekable__doc__},
+
+static PyObject *
+_io__IOBase_seekable_impl(PyObject *self);
+
+static PyObject *
+_io__IOBase_seekable(PyObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io__IOBase_seekable_impl(self);
+}
+
+PyDoc_STRVAR(_io__IOBase_readable__doc__,
+"readable($self, /)\n"
+"--\n"
+"\n"
+"Return whether object was opened for reading.\n"
+"\n"
+"If False, read() will raise OSError.");
+
+#define _IO__IOBASE_READABLE_METHODDEF \
+ {"readable", (PyCFunction)_io__IOBase_readable, METH_NOARGS, _io__IOBase_readable__doc__},
+
+static PyObject *
+_io__IOBase_readable_impl(PyObject *self);
+
+static PyObject *
+_io__IOBase_readable(PyObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io__IOBase_readable_impl(self);
+}
+
+PyDoc_STRVAR(_io__IOBase_writable__doc__,
+"writable($self, /)\n"
+"--\n"
+"\n"
+"Return whether object was opened for writing.\n"
+"\n"
+"If False, write() will raise OSError.");
+
+#define _IO__IOBASE_WRITABLE_METHODDEF \
+ {"writable", (PyCFunction)_io__IOBase_writable, METH_NOARGS, _io__IOBase_writable__doc__},
+
+static PyObject *
+_io__IOBase_writable_impl(PyObject *self);
+
+static PyObject *
+_io__IOBase_writable(PyObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io__IOBase_writable_impl(self);
+}
+
+PyDoc_STRVAR(_io__IOBase_fileno__doc__,
+"fileno($self, /)\n"
+"--\n"
+"\n"
+"Returns underlying file descriptor if one exists.\n"
+"\n"
+"OSError is raised if the IO object does not use a file descriptor.");
+
+#define _IO__IOBASE_FILENO_METHODDEF \
+ {"fileno", (PyCFunction)_io__IOBase_fileno, METH_NOARGS, _io__IOBase_fileno__doc__},
+
+static PyObject *
+_io__IOBase_fileno_impl(PyObject *self);
+
+static PyObject *
+_io__IOBase_fileno(PyObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io__IOBase_fileno_impl(self);
+}
+
+PyDoc_STRVAR(_io__IOBase_isatty__doc__,
+"isatty($self, /)\n"
+"--\n"
+"\n"
+"Return whether this is an \'interactive\' stream.\n"
+"\n"
+"Return False if it can\'t be determined.");
+
+#define _IO__IOBASE_ISATTY_METHODDEF \
+ {"isatty", (PyCFunction)_io__IOBase_isatty, METH_NOARGS, _io__IOBase_isatty__doc__},
+
+static PyObject *
+_io__IOBase_isatty_impl(PyObject *self);
+
+static PyObject *
+_io__IOBase_isatty(PyObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io__IOBase_isatty_impl(self);
+}
+
+PyDoc_STRVAR(_io__IOBase_readline__doc__,
+"readline($self, size=-1, /)\n"
+"--\n"
+"\n"
+"Read and return a line from the stream.\n"
+"\n"
+"If size is specified, at most size bytes will be read.\n"
+"\n"
+"The line terminator is always b\'\\n\' for binary files; for text\n"
+"files, the newlines argument to open can be used to select the line\n"
+"terminator(s) recognized.");
+
+#define _IO__IOBASE_READLINE_METHODDEF \
+ {"readline", (PyCFunction)_io__IOBase_readline, METH_VARARGS, _io__IOBase_readline__doc__},
+
+static PyObject *
+_io__IOBase_readline_impl(PyObject *self, Py_ssize_t limit);
+
+static PyObject *
+_io__IOBase_readline(PyObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_ssize_t limit = -1;
+
+ if (!PyArg_ParseTuple(args, "|O&:readline",
+ _PyIO_ConvertSsize_t, &limit))
+ goto exit;
+ return_value = _io__IOBase_readline_impl(self, limit);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io__IOBase_readlines__doc__,
+"readlines($self, hint=-1, /)\n"
+"--\n"
+"\n"
+"Return a list of lines from the stream.\n"
+"\n"
+"hint can be specified to control the number of lines read: no more\n"
+"lines will be read if the total size (in bytes/characters) of all\n"
+"lines so far exceeds hint.");
+
+#define _IO__IOBASE_READLINES_METHODDEF \
+ {"readlines", (PyCFunction)_io__IOBase_readlines, METH_VARARGS, _io__IOBase_readlines__doc__},
+
+static PyObject *
+_io__IOBase_readlines_impl(PyObject *self, Py_ssize_t hint);
+
+static PyObject *
+_io__IOBase_readlines(PyObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_ssize_t hint = -1;
+
+ if (!PyArg_ParseTuple(args, "|O&:readlines",
+ _PyIO_ConvertSsize_t, &hint))
+ goto exit;
+ return_value = _io__IOBase_readlines_impl(self, hint);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io__IOBase_writelines__doc__,
+"writelines($self, lines, /)\n"
+"--\n"
+"\n");
+
+#define _IO__IOBASE_WRITELINES_METHODDEF \
+ {"writelines", (PyCFunction)_io__IOBase_writelines, METH_O, _io__IOBase_writelines__doc__},
+
+PyDoc_STRVAR(_io__RawIOBase_read__doc__,
+"read($self, size=-1, /)\n"
+"--\n"
+"\n");
+
+#define _IO__RAWIOBASE_READ_METHODDEF \
+ {"read", (PyCFunction)_io__RawIOBase_read, METH_VARARGS, _io__RawIOBase_read__doc__},
+
+static PyObject *
+_io__RawIOBase_read_impl(PyObject *self, Py_ssize_t n);
+
+static PyObject *
+_io__RawIOBase_read(PyObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_ssize_t n = -1;
+
+ if (!PyArg_ParseTuple(args, "|n:read",
+ &n))
+ goto exit;
+ return_value = _io__RawIOBase_read_impl(self, n);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io__RawIOBase_readall__doc__,
+"readall($self, /)\n"
+"--\n"
+"\n"
+"Read until EOF, using multiple read() call.");
+
+#define _IO__RAWIOBASE_READALL_METHODDEF \
+ {"readall", (PyCFunction)_io__RawIOBase_readall, METH_NOARGS, _io__RawIOBase_readall__doc__},
+
+static PyObject *
+_io__RawIOBase_readall_impl(PyObject *self);
+
+static PyObject *
+_io__RawIOBase_readall(PyObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io__RawIOBase_readall_impl(self);
+}
+/*[clinic end generated code: output=b874952f5cc248a4 input=a9049054013a1b77]*/
diff --git a/Modules/_io/clinic/stringio.c.h b/Modules/_io/clinic/stringio.c.h
new file mode 100644
index 0000000000..a8e32a3376
--- /dev/null
+++ b/Modules/_io/clinic/stringio.c.h
@@ -0,0 +1,286 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(_io_StringIO_getvalue__doc__,
+"getvalue($self, /)\n"
+"--\n"
+"\n"
+"Retrieve the entire contents of the object.");
+
+#define _IO_STRINGIO_GETVALUE_METHODDEF \
+ {"getvalue", (PyCFunction)_io_StringIO_getvalue, METH_NOARGS, _io_StringIO_getvalue__doc__},
+
+static PyObject *
+_io_StringIO_getvalue_impl(stringio *self);
+
+static PyObject *
+_io_StringIO_getvalue(stringio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_StringIO_getvalue_impl(self);
+}
+
+PyDoc_STRVAR(_io_StringIO_tell__doc__,
+"tell($self, /)\n"
+"--\n"
+"\n"
+"Tell the current file position.");
+
+#define _IO_STRINGIO_TELL_METHODDEF \
+ {"tell", (PyCFunction)_io_StringIO_tell, METH_NOARGS, _io_StringIO_tell__doc__},
+
+static PyObject *
+_io_StringIO_tell_impl(stringio *self);
+
+static PyObject *
+_io_StringIO_tell(stringio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_StringIO_tell_impl(self);
+}
+
+PyDoc_STRVAR(_io_StringIO_read__doc__,
+"read($self, size=None, /)\n"
+"--\n"
+"\n"
+"Read at most size characters, returned as a string.\n"
+"\n"
+"If the argument is negative or omitted, read until EOF\n"
+"is reached. Return an empty string at EOF.");
+
+#define _IO_STRINGIO_READ_METHODDEF \
+ {"read", (PyCFunction)_io_StringIO_read, METH_VARARGS, _io_StringIO_read__doc__},
+
+static PyObject *
+_io_StringIO_read_impl(stringio *self, PyObject *arg);
+
+static PyObject *
+_io_StringIO_read(stringio *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *arg = Py_None;
+
+ if (!PyArg_UnpackTuple(args, "read",
+ 0, 1,
+ &arg))
+ goto exit;
+ return_value = _io_StringIO_read_impl(self, arg);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io_StringIO_readline__doc__,
+"readline($self, size=None, /)\n"
+"--\n"
+"\n"
+"Read until newline or EOF.\n"
+"\n"
+"Returns an empty string if EOF is hit immediately.");
+
+#define _IO_STRINGIO_READLINE_METHODDEF \
+ {"readline", (PyCFunction)_io_StringIO_readline, METH_VARARGS, _io_StringIO_readline__doc__},
+
+static PyObject *
+_io_StringIO_readline_impl(stringio *self, PyObject *arg);
+
+static PyObject *
+_io_StringIO_readline(stringio *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *arg = Py_None;
+
+ if (!PyArg_UnpackTuple(args, "readline",
+ 0, 1,
+ &arg))
+ goto exit;
+ return_value = _io_StringIO_readline_impl(self, arg);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io_StringIO_truncate__doc__,
+"truncate($self, pos=None, /)\n"
+"--\n"
+"\n"
+"Truncate size to pos.\n"
+"\n"
+"The pos argument defaults to the current file position, as\n"
+"returned by tell(). The current file position is unchanged.\n"
+"Returns the new absolute position.");
+
+#define _IO_STRINGIO_TRUNCATE_METHODDEF \
+ {"truncate", (PyCFunction)_io_StringIO_truncate, METH_VARARGS, _io_StringIO_truncate__doc__},
+
+static PyObject *
+_io_StringIO_truncate_impl(stringio *self, PyObject *arg);
+
+static PyObject *
+_io_StringIO_truncate(stringio *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *arg = Py_None;
+
+ if (!PyArg_UnpackTuple(args, "truncate",
+ 0, 1,
+ &arg))
+ goto exit;
+ return_value = _io_StringIO_truncate_impl(self, arg);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io_StringIO_seek__doc__,
+"seek($self, pos, whence=0, /)\n"
+"--\n"
+"\n"
+"Change stream position.\n"
+"\n"
+"Seek to character offset pos relative to position indicated by whence:\n"
+" 0 Start of stream (the default). pos should be >= 0;\n"
+" 1 Current position - pos must be 0;\n"
+" 2 End of stream - pos must be 0.\n"
+"Returns the new absolute position.");
+
+#define _IO_STRINGIO_SEEK_METHODDEF \
+ {"seek", (PyCFunction)_io_StringIO_seek, METH_VARARGS, _io_StringIO_seek__doc__},
+
+static PyObject *
+_io_StringIO_seek_impl(stringio *self, Py_ssize_t pos, int whence);
+
+static PyObject *
+_io_StringIO_seek(stringio *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_ssize_t pos;
+ int whence = 0;
+
+ if (!PyArg_ParseTuple(args, "n|i:seek",
+ &pos, &whence))
+ goto exit;
+ return_value = _io_StringIO_seek_impl(self, pos, whence);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io_StringIO_write__doc__,
+"write($self, s, /)\n"
+"--\n"
+"\n"
+"Write string to file.\n"
+"\n"
+"Returns the number of characters written, which is always equal to\n"
+"the length of the string.");
+
+#define _IO_STRINGIO_WRITE_METHODDEF \
+ {"write", (PyCFunction)_io_StringIO_write, METH_O, _io_StringIO_write__doc__},
+
+PyDoc_STRVAR(_io_StringIO_close__doc__,
+"close($self, /)\n"
+"--\n"
+"\n"
+"Close the IO object.\n"
+"\n"
+"Attempting any further operation after the object is closed\n"
+"will raise a ValueError.\n"
+"\n"
+"This method has no effect if the file is already closed.");
+
+#define _IO_STRINGIO_CLOSE_METHODDEF \
+ {"close", (PyCFunction)_io_StringIO_close, METH_NOARGS, _io_StringIO_close__doc__},
+
+static PyObject *
+_io_StringIO_close_impl(stringio *self);
+
+static PyObject *
+_io_StringIO_close(stringio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_StringIO_close_impl(self);
+}
+
+PyDoc_STRVAR(_io_StringIO___init____doc__,
+"StringIO(initial_value=\'\', newline=\'\\n\')\n"
+"--\n"
+"\n"
+"Text I/O implementation using an in-memory buffer.\n"
+"\n"
+"The initial_value argument sets the value of object. The newline\n"
+"argument is like the one of TextIOWrapper\'s constructor.");
+
+static int
+_io_StringIO___init___impl(stringio *self, PyObject *value,
+ PyObject *newline_obj);
+
+static int
+_io_StringIO___init__(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ int return_value = -1;
+ static char *_keywords[] = {"initial_value", "newline", NULL};
+ PyObject *value = NULL;
+ PyObject *newline_obj = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:StringIO", _keywords,
+ &value, &newline_obj))
+ goto exit;
+ return_value = _io_StringIO___init___impl((stringio *)self, value, newline_obj);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io_StringIO_readable__doc__,
+"readable($self, /)\n"
+"--\n"
+"\n"
+"Returns True if the IO object can be read.");
+
+#define _IO_STRINGIO_READABLE_METHODDEF \
+ {"readable", (PyCFunction)_io_StringIO_readable, METH_NOARGS, _io_StringIO_readable__doc__},
+
+static PyObject *
+_io_StringIO_readable_impl(stringio *self);
+
+static PyObject *
+_io_StringIO_readable(stringio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_StringIO_readable_impl(self);
+}
+
+PyDoc_STRVAR(_io_StringIO_writable__doc__,
+"writable($self, /)\n"
+"--\n"
+"\n"
+"Returns True if the IO object can be written.");
+
+#define _IO_STRINGIO_WRITABLE_METHODDEF \
+ {"writable", (PyCFunction)_io_StringIO_writable, METH_NOARGS, _io_StringIO_writable__doc__},
+
+static PyObject *
+_io_StringIO_writable_impl(stringio *self);
+
+static PyObject *
+_io_StringIO_writable(stringio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_StringIO_writable_impl(self);
+}
+
+PyDoc_STRVAR(_io_StringIO_seekable__doc__,
+"seekable($self, /)\n"
+"--\n"
+"\n"
+"Returns True if the IO object can be seeked.");
+
+#define _IO_STRINGIO_SEEKABLE_METHODDEF \
+ {"seekable", (PyCFunction)_io_StringIO_seekable, METH_NOARGS, _io_StringIO_seekable__doc__},
+
+static PyObject *
+_io_StringIO_seekable_impl(stringio *self);
+
+static PyObject *
+_io_StringIO_seekable(stringio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_StringIO_seekable_impl(self);
+}
+/*[clinic end generated code: output=f061cf3a20cd14ed input=a9049054013a1b77]*/
diff --git a/Modules/_io/clinic/textio.c.h b/Modules/_io/clinic/textio.c.h
new file mode 100644
index 0000000000..dc7e8c7584
--- /dev/null
+++ b/Modules/_io/clinic/textio.c.h
@@ -0,0 +1,456 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(_io_IncrementalNewlineDecoder___init____doc__,
+"IncrementalNewlineDecoder(decoder, translate, errors=\'strict\')\n"
+"--\n"
+"\n"
+"Codec used when reading a file in universal newlines mode.\n"
+"\n"
+"It wraps another incremental decoder, translating \\r\\n and \\r into \\n.\n"
+"It also records the types of newlines encountered. When used with\n"
+"translate=False, it ensures that the newline sequence is returned in\n"
+"one piece. When used with decoder=None, it expects unicode strings as\n"
+"decode input and translates newlines without first invoking an external\n"
+"decoder.");
+
+static int
+_io_IncrementalNewlineDecoder___init___impl(nldecoder_object *self,
+ PyObject *decoder, int translate,
+ PyObject *errors);
+
+static int
+_io_IncrementalNewlineDecoder___init__(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ int return_value = -1;
+ static char *_keywords[] = {"decoder", "translate", "errors", NULL};
+ PyObject *decoder;
+ int translate;
+ PyObject *errors = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "Oi|O:IncrementalNewlineDecoder", _keywords,
+ &decoder, &translate, &errors))
+ goto exit;
+ return_value = _io_IncrementalNewlineDecoder___init___impl((nldecoder_object *)self, decoder, translate, errors);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io_IncrementalNewlineDecoder_decode__doc__,
+"decode($self, /, input, final=False)\n"
+"--\n"
+"\n");
+
+#define _IO_INCREMENTALNEWLINEDECODER_DECODE_METHODDEF \
+ {"decode", (PyCFunction)_io_IncrementalNewlineDecoder_decode, METH_VARARGS|METH_KEYWORDS, _io_IncrementalNewlineDecoder_decode__doc__},
+
+static PyObject *
+_io_IncrementalNewlineDecoder_decode_impl(nldecoder_object *self,
+ PyObject *input, int final);
+
+static PyObject *
+_io_IncrementalNewlineDecoder_decode(nldecoder_object *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"input", "final", NULL};
+ PyObject *input;
+ int final = 0;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|i:decode", _keywords,
+ &input, &final))
+ goto exit;
+ return_value = _io_IncrementalNewlineDecoder_decode_impl(self, input, final);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io_IncrementalNewlineDecoder_getstate__doc__,
+"getstate($self, /)\n"
+"--\n"
+"\n");
+
+#define _IO_INCREMENTALNEWLINEDECODER_GETSTATE_METHODDEF \
+ {"getstate", (PyCFunction)_io_IncrementalNewlineDecoder_getstate, METH_NOARGS, _io_IncrementalNewlineDecoder_getstate__doc__},
+
+static PyObject *
+_io_IncrementalNewlineDecoder_getstate_impl(nldecoder_object *self);
+
+static PyObject *
+_io_IncrementalNewlineDecoder_getstate(nldecoder_object *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_IncrementalNewlineDecoder_getstate_impl(self);
+}
+
+PyDoc_STRVAR(_io_IncrementalNewlineDecoder_setstate__doc__,
+"setstate($self, state, /)\n"
+"--\n"
+"\n");
+
+#define _IO_INCREMENTALNEWLINEDECODER_SETSTATE_METHODDEF \
+ {"setstate", (PyCFunction)_io_IncrementalNewlineDecoder_setstate, METH_O, _io_IncrementalNewlineDecoder_setstate__doc__},
+
+PyDoc_STRVAR(_io_IncrementalNewlineDecoder_reset__doc__,
+"reset($self, /)\n"
+"--\n"
+"\n");
+
+#define _IO_INCREMENTALNEWLINEDECODER_RESET_METHODDEF \
+ {"reset", (PyCFunction)_io_IncrementalNewlineDecoder_reset, METH_NOARGS, _io_IncrementalNewlineDecoder_reset__doc__},
+
+static PyObject *
+_io_IncrementalNewlineDecoder_reset_impl(nldecoder_object *self);
+
+static PyObject *
+_io_IncrementalNewlineDecoder_reset(nldecoder_object *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_IncrementalNewlineDecoder_reset_impl(self);
+}
+
+PyDoc_STRVAR(_io_TextIOWrapper___init____doc__,
+"TextIOWrapper(buffer, encoding=None, errors=None, newline=None,\n"
+" line_buffering=False, write_through=False)\n"
+"--\n"
+"\n"
+"Character and line based layer over a BufferedIOBase object, buffer.\n"
+"\n"
+"encoding gives the name of the encoding that the stream will be\n"
+"decoded or encoded with. It defaults to locale.getpreferredencoding(False).\n"
+"\n"
+"errors determines the strictness of encoding and decoding (see\n"
+"help(codecs.Codec) or the documentation for codecs.register) and\n"
+"defaults to \"strict\".\n"
+"\n"
+"newline controls how line endings are handled. It can be None, \'\',\n"
+"\'\\n\', \'\\r\', and \'\\r\\n\'. It works as follows:\n"
+"\n"
+"* On input, if newline is None, universal newlines mode is\n"
+" enabled. Lines in the input can end in \'\\n\', \'\\r\', or \'\\r\\n\', and\n"
+" these are translated into \'\\n\' before being returned to the\n"
+" caller. If it is \'\', universal newline mode is enabled, but line\n"
+" endings are returned to the caller untranslated. If it has any of\n"
+" the other legal values, input lines are only terminated by the given\n"
+" string, and the line ending is returned to the caller untranslated.\n"
+"\n"
+"* On output, if newline is None, any \'\\n\' characters written are\n"
+" translated to the system default line separator, os.linesep. If\n"
+" newline is \'\' or \'\\n\', no translation takes place. If newline is any\n"
+" of the other legal values, any \'\\n\' characters written are translated\n"
+" to the given string.\n"
+"\n"
+"If line_buffering is True, a call to flush is implied when a call to\n"
+"write contains a newline character.");
+
+static int
+_io_TextIOWrapper___init___impl(textio *self, PyObject *buffer,
+ const char *encoding, const char *errors,
+ const char *newline, int line_buffering,
+ int write_through);
+
+static int
+_io_TextIOWrapper___init__(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ int return_value = -1;
+ static char *_keywords[] = {"buffer", "encoding", "errors", "newline", "line_buffering", "write_through", NULL};
+ PyObject *buffer;
+ const char *encoding = NULL;
+ const char *errors = NULL;
+ const char *newline = NULL;
+ int line_buffering = 0;
+ int write_through = 0;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|zzzii:TextIOWrapper", _keywords,
+ &buffer, &encoding, &errors, &newline, &line_buffering, &write_through))
+ goto exit;
+ return_value = _io_TextIOWrapper___init___impl((textio *)self, buffer, encoding, errors, newline, line_buffering, write_through);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io_TextIOWrapper_detach__doc__,
+"detach($self, /)\n"
+"--\n"
+"\n");
+
+#define _IO_TEXTIOWRAPPER_DETACH_METHODDEF \
+ {"detach", (PyCFunction)_io_TextIOWrapper_detach, METH_NOARGS, _io_TextIOWrapper_detach__doc__},
+
+static PyObject *
+_io_TextIOWrapper_detach_impl(textio *self);
+
+static PyObject *
+_io_TextIOWrapper_detach(textio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_TextIOWrapper_detach_impl(self);
+}
+
+PyDoc_STRVAR(_io_TextIOWrapper_write__doc__,
+"write($self, text, /)\n"
+"--\n"
+"\n");
+
+#define _IO_TEXTIOWRAPPER_WRITE_METHODDEF \
+ {"write", (PyCFunction)_io_TextIOWrapper_write, METH_O, _io_TextIOWrapper_write__doc__},
+
+static PyObject *
+_io_TextIOWrapper_write_impl(textio *self, PyObject *text);
+
+static PyObject *
+_io_TextIOWrapper_write(textio *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ PyObject *text;
+
+ if (!PyArg_Parse(arg, "U:write", &text))
+ goto exit;
+ return_value = _io_TextIOWrapper_write_impl(self, text);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io_TextIOWrapper_read__doc__,
+"read($self, size=-1, /)\n"
+"--\n"
+"\n");
+
+#define _IO_TEXTIOWRAPPER_READ_METHODDEF \
+ {"read", (PyCFunction)_io_TextIOWrapper_read, METH_VARARGS, _io_TextIOWrapper_read__doc__},
+
+static PyObject *
+_io_TextIOWrapper_read_impl(textio *self, Py_ssize_t n);
+
+static PyObject *
+_io_TextIOWrapper_read(textio *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_ssize_t n = -1;
+
+ if (!PyArg_ParseTuple(args, "|O&:read",
+ _PyIO_ConvertSsize_t, &n))
+ goto exit;
+ return_value = _io_TextIOWrapper_read_impl(self, n);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io_TextIOWrapper_readline__doc__,
+"readline($self, size=-1, /)\n"
+"--\n"
+"\n");
+
+#define _IO_TEXTIOWRAPPER_READLINE_METHODDEF \
+ {"readline", (PyCFunction)_io_TextIOWrapper_readline, METH_VARARGS, _io_TextIOWrapper_readline__doc__},
+
+static PyObject *
+_io_TextIOWrapper_readline_impl(textio *self, Py_ssize_t size);
+
+static PyObject *
+_io_TextIOWrapper_readline(textio *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_ssize_t size = -1;
+
+ if (!PyArg_ParseTuple(args, "|n:readline",
+ &size))
+ goto exit;
+ return_value = _io_TextIOWrapper_readline_impl(self, size);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io_TextIOWrapper_seek__doc__,
+"seek($self, cookie, whence=0, /)\n"
+"--\n"
+"\n");
+
+#define _IO_TEXTIOWRAPPER_SEEK_METHODDEF \
+ {"seek", (PyCFunction)_io_TextIOWrapper_seek, METH_VARARGS, _io_TextIOWrapper_seek__doc__},
+
+static PyObject *
+_io_TextIOWrapper_seek_impl(textio *self, PyObject *cookieObj, int whence);
+
+static PyObject *
+_io_TextIOWrapper_seek(textio *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *cookieObj;
+ int whence = 0;
+
+ if (!PyArg_ParseTuple(args, "O|i:seek",
+ &cookieObj, &whence))
+ goto exit;
+ return_value = _io_TextIOWrapper_seek_impl(self, cookieObj, whence);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io_TextIOWrapper_tell__doc__,
+"tell($self, /)\n"
+"--\n"
+"\n");
+
+#define _IO_TEXTIOWRAPPER_TELL_METHODDEF \
+ {"tell", (PyCFunction)_io_TextIOWrapper_tell, METH_NOARGS, _io_TextIOWrapper_tell__doc__},
+
+static PyObject *
+_io_TextIOWrapper_tell_impl(textio *self);
+
+static PyObject *
+_io_TextIOWrapper_tell(textio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_TextIOWrapper_tell_impl(self);
+}
+
+PyDoc_STRVAR(_io_TextIOWrapper_truncate__doc__,
+"truncate($self, pos=None, /)\n"
+"--\n"
+"\n");
+
+#define _IO_TEXTIOWRAPPER_TRUNCATE_METHODDEF \
+ {"truncate", (PyCFunction)_io_TextIOWrapper_truncate, METH_VARARGS, _io_TextIOWrapper_truncate__doc__},
+
+static PyObject *
+_io_TextIOWrapper_truncate_impl(textio *self, PyObject *pos);
+
+static PyObject *
+_io_TextIOWrapper_truncate(textio *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *pos = Py_None;
+
+ if (!PyArg_UnpackTuple(args, "truncate",
+ 0, 1,
+ &pos))
+ goto exit;
+ return_value = _io_TextIOWrapper_truncate_impl(self, pos);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_io_TextIOWrapper_fileno__doc__,
+"fileno($self, /)\n"
+"--\n"
+"\n");
+
+#define _IO_TEXTIOWRAPPER_FILENO_METHODDEF \
+ {"fileno", (PyCFunction)_io_TextIOWrapper_fileno, METH_NOARGS, _io_TextIOWrapper_fileno__doc__},
+
+static PyObject *
+_io_TextIOWrapper_fileno_impl(textio *self);
+
+static PyObject *
+_io_TextIOWrapper_fileno(textio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_TextIOWrapper_fileno_impl(self);
+}
+
+PyDoc_STRVAR(_io_TextIOWrapper_seekable__doc__,
+"seekable($self, /)\n"
+"--\n"
+"\n");
+
+#define _IO_TEXTIOWRAPPER_SEEKABLE_METHODDEF \
+ {"seekable", (PyCFunction)_io_TextIOWrapper_seekable, METH_NOARGS, _io_TextIOWrapper_seekable__doc__},
+
+static PyObject *
+_io_TextIOWrapper_seekable_impl(textio *self);
+
+static PyObject *
+_io_TextIOWrapper_seekable(textio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_TextIOWrapper_seekable_impl(self);
+}
+
+PyDoc_STRVAR(_io_TextIOWrapper_readable__doc__,
+"readable($self, /)\n"
+"--\n"
+"\n");
+
+#define _IO_TEXTIOWRAPPER_READABLE_METHODDEF \
+ {"readable", (PyCFunction)_io_TextIOWrapper_readable, METH_NOARGS, _io_TextIOWrapper_readable__doc__},
+
+static PyObject *
+_io_TextIOWrapper_readable_impl(textio *self);
+
+static PyObject *
+_io_TextIOWrapper_readable(textio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_TextIOWrapper_readable_impl(self);
+}
+
+PyDoc_STRVAR(_io_TextIOWrapper_writable__doc__,
+"writable($self, /)\n"
+"--\n"
+"\n");
+
+#define _IO_TEXTIOWRAPPER_WRITABLE_METHODDEF \
+ {"writable", (PyCFunction)_io_TextIOWrapper_writable, METH_NOARGS, _io_TextIOWrapper_writable__doc__},
+
+static PyObject *
+_io_TextIOWrapper_writable_impl(textio *self);
+
+static PyObject *
+_io_TextIOWrapper_writable(textio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_TextIOWrapper_writable_impl(self);
+}
+
+PyDoc_STRVAR(_io_TextIOWrapper_isatty__doc__,
+"isatty($self, /)\n"
+"--\n"
+"\n");
+
+#define _IO_TEXTIOWRAPPER_ISATTY_METHODDEF \
+ {"isatty", (PyCFunction)_io_TextIOWrapper_isatty, METH_NOARGS, _io_TextIOWrapper_isatty__doc__},
+
+static PyObject *
+_io_TextIOWrapper_isatty_impl(textio *self);
+
+static PyObject *
+_io_TextIOWrapper_isatty(textio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_TextIOWrapper_isatty_impl(self);
+}
+
+PyDoc_STRVAR(_io_TextIOWrapper_flush__doc__,
+"flush($self, /)\n"
+"--\n"
+"\n");
+
+#define _IO_TEXTIOWRAPPER_FLUSH_METHODDEF \
+ {"flush", (PyCFunction)_io_TextIOWrapper_flush, METH_NOARGS, _io_TextIOWrapper_flush__doc__},
+
+static PyObject *
+_io_TextIOWrapper_flush_impl(textio *self);
+
+static PyObject *
+_io_TextIOWrapper_flush(textio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_TextIOWrapper_flush_impl(self);
+}
+
+PyDoc_STRVAR(_io_TextIOWrapper_close__doc__,
+"close($self, /)\n"
+"--\n"
+"\n");
+
+#define _IO_TEXTIOWRAPPER_CLOSE_METHODDEF \
+ {"close", (PyCFunction)_io_TextIOWrapper_close, METH_NOARGS, _io_TextIOWrapper_close__doc__},
+
+static PyObject *
+_io_TextIOWrapper_close_impl(textio *self);
+
+static PyObject *
+_io_TextIOWrapper_close(textio *self, PyObject *Py_UNUSED(ignored))
+{
+ return _io_TextIOWrapper_close_impl(self);
+}
+/*[clinic end generated code: output=690608f85aab8ba5 input=a9049054013a1b77]*/
diff --git a/Modules/_io/fileio.c b/Modules/_io/fileio.c
index 74508a7f42..919cf502dc 100644
--- a/Modules/_io/fileio.c
+++ b/Modules/_io/fileio.c
@@ -43,6 +43,19 @@
#define SMALLCHUNK BUFSIZ
#endif
+/*[clinic input]
+module _io
+class _io.FileIO "fileio *" "&PyFileIO_Type"
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=1c77708b41fda70c]*/
+
+/*[python input]
+class io_ssize_t_converter(CConverter):
+ type = 'Py_ssize_t'
+ converter = '_PyIO_ConvertSsize_t'
+[python start generated code]*/
+/*[python end generated code: output=da39a3ee5e6b4b0d input=d0a811d3cbfd1b33]*/
+
typedef struct {
PyObject_HEAD
int fd;
@@ -53,6 +66,7 @@ typedef struct {
signed int seekable : 2; /* -1 means unknown */
unsigned int closefd : 1;
char finalizing;
+ unsigned int blksize;
PyObject *weakreflist;
PyObject *dict;
} fileio;
@@ -106,9 +120,11 @@ internal_close(fileio *self)
/* fd is accessible and someone else may have closed it */
if (_PyVerify_fd(fd)) {
Py_BEGIN_ALLOW_THREADS
+ _Py_BEGIN_SUPPRESS_IPH
err = close(fd);
if (err < 0)
save_errno = errno;
+ _Py_END_SUPPRESS_IPH
Py_END_ALLOW_THREADS
} else {
save_errno = errno;
@@ -123,8 +139,18 @@ internal_close(fileio *self)
return 0;
}
+/*[clinic input]
+_io.FileIO.close
+
+Close the file.
+
+A closed file cannot be used for further I/O operations. close() may be
+called more than once without error.
+[clinic start generated code]*/
+
static PyObject *
-fileio_close(fileio *self)
+_io_FileIO_close_impl(fileio *self)
+/*[clinic end generated code: output=7737a319ef3bad0b input=f35231760d54a522]*/
{
PyObject *res;
PyObject *exc, *val, *tb;
@@ -168,6 +194,7 @@ fileio_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
self->writable = 0;
self->appending = 0;
self->seekable = -1;
+ self->blksize = 0;
self->closefd = 1;
self->weakreflist = NULL;
}
@@ -175,57 +202,40 @@ fileio_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
return (PyObject *) self;
}
-/* On Unix, open will succeed for directories.
- In Python, there should be no file objects referring to
- directories, so we need a check. */
-
-static int
-dircheck(fileio* self, PyObject *nameobj)
-{
-#if defined(HAVE_FSTAT) && defined(S_ISDIR) && defined(EISDIR)
- struct stat buf;
- if (self->fd < 0)
- return 0;
- if (fstat(self->fd, &buf) == 0 && S_ISDIR(buf.st_mode)) {
- errno = EISDIR;
- PyErr_SetFromErrnoWithFilenameObject(PyExc_IOError, nameobj);
- return -1;
- }
-#endif
- return 0;
-}
-
-static int
-check_fd(int fd)
-{
-#if defined(HAVE_FSTAT)
- struct stat buf;
- if (!_PyVerify_fd(fd) || (fstat(fd, &buf) < 0 && errno == EBADF)) {
- PyObject *exc;
- char *msg = strerror(EBADF);
- exc = PyObject_CallFunction(PyExc_OSError, "(is)",
- EBADF, msg);
- PyErr_SetObject(PyExc_OSError, exc);
- Py_XDECREF(exc);
- return -1;
- }
-#endif
- return 0;
-}
-
#ifdef O_CLOEXEC
extern int _Py_open_cloexec_works;
#endif
+/*[clinic input]
+_io.FileIO.__init__
+ file as nameobj: object
+ mode: str = "r"
+ closefd: int(c_default="1") = True
+ opener: object = None
+
+Open a file.
+
+The mode can be 'r' (default), 'w', 'x' or 'a' for reading,
+writing, exclusive creation or appending. The file will be created if it
+doesn't exist when opened for writing or appending; it will be truncated
+when opened for writing. A FileExistsError will be raised if it already
+exists when opened for creating. Opening a file for creating implies
+writing so this mode behaves in a similar way to 'w'.Add a '+' to the mode
+to allow simultaneous reading and writing. A custom opener can be used by
+passing a callable as *opener*. The underlying file descriptor for the file
+object is then obtained by calling opener with (*name*, *flags*).
+*opener* must return an open file descriptor (passing os.open as *opener*
+results in functionality similar to passing None).
+[clinic start generated code]*/
+
static int
-fileio_init(PyObject *oself, PyObject *args, PyObject *kwds)
+_io_FileIO___init___impl(fileio *self, PyObject *nameobj, const char *mode,
+ int closefd, PyObject *opener)
+/*[clinic end generated code: output=23413f68e6484bbd input=193164e293d6c097]*/
{
- fileio *self = (fileio *) oself;
- static char *kwlist[] = {"file", "mode", "closefd", "opener", NULL};
const char *name = NULL;
- PyObject *nameobj, *stringobj = NULL, *opener = Py_None;
- char *mode = "r";
- char *s;
+ PyObject *stringobj = NULL;
+ const char *s;
#ifdef MS_WINDOWS
Py_UNICODE *widename = NULL;
#endif
@@ -233,15 +243,17 @@ fileio_init(PyObject *oself, PyObject *args, PyObject *kwds)
int rwa = 0, plus = 0;
int flags = 0;
int fd = -1;
- int closefd = 1;
int fd_is_own = 0;
#ifdef O_CLOEXEC
int *atomic_flag_works = &_Py_open_cloexec_works;
#elif !defined(MS_WINDOWS)
int *atomic_flag_works = NULL;
#endif
+ struct _Py_stat_struct fdfstat;
+ int fstat_result;
+ int async_err = 0;
- assert(PyFileIO_Check(oself));
+ assert(PyFileIO_Check(self));
if (self->fd >= 0) {
if (self->closefd) {
/* Have to close the existing file first. */
@@ -252,11 +264,6 @@ fileio_init(PyObject *oself, PyObject *args, PyObject *kwds)
self->fd = -1;
}
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|siO:fileio",
- kwlist, &nameobj, &mode, &closefd,
- &opener))
- return -1;
-
if (PyFloat_Check(nameobj)) {
PyErr_SetString(PyExc_TypeError,
"integer argument expected, got float");
@@ -280,7 +287,7 @@ fileio_init(PyObject *oself, PyObject *args, PyObject *kwds)
if (widename == NULL)
return -1;
if (wcslen(widename) != length) {
- PyErr_SetString(PyExc_TypeError, "embedded NUL character");
+ PyErr_SetString(PyExc_ValueError, "embedded null character");
return -1;
}
} else
@@ -366,8 +373,6 @@ fileio_init(PyObject *oself, PyObject *args, PyObject *kwds)
#endif
if (fd >= 0) {
- if (check_fd(fd))
- goto error;
self->fd = fd;
self->closefd = closefd;
}
@@ -381,15 +386,20 @@ fileio_init(PyObject *oself, PyObject *args, PyObject *kwds)
errno = 0;
if (opener == Py_None) {
- Py_BEGIN_ALLOW_THREADS
+ do {
+ Py_BEGIN_ALLOW_THREADS
#ifdef MS_WINDOWS
- if (widename != NULL)
- self->fd = _wopen(widename, flags, 0666);
- else
+ if (widename != NULL)
+ self->fd = _wopen(widename, flags, 0666);
+ else
#endif
- self->fd = open(name, flags, 0666);
+ self->fd = open(name, flags, 0666);
+ Py_END_ALLOW_THREADS
+ } while (self->fd < 0 && errno == EINTR &&
+ !(async_err = PyErr_CheckSignals()));
- Py_END_ALLOW_THREADS
+ if (async_err)
+ goto error;
}
else {
PyObject *fdobj;
@@ -411,7 +421,13 @@ fileio_init(PyObject *oself, PyObject *args, PyObject *kwds)
self->fd = _PyLong_AsInt(fdobj);
Py_DECREF(fdobj);
- if (self->fd == -1) {
+ if (self->fd < 0) {
+ if (!PyErr_Occurred()) {
+ /* The opener returned a negative but didn't set an
+ exception. See issue #27066 */
+ PyErr_Format(PyExc_ValueError,
+ "opener returned %d", self->fd);
+ }
goto error;
}
}
@@ -427,8 +443,41 @@ fileio_init(PyObject *oself, PyObject *args, PyObject *kwds)
goto error;
#endif
}
- if (dircheck(self, nameobj) < 0)
- goto error;
+
+ self->blksize = DEFAULT_BUFFER_SIZE;
+ Py_BEGIN_ALLOW_THREADS
+ fstat_result = _Py_fstat_noraise(self->fd, &fdfstat);
+ Py_END_ALLOW_THREADS
+ if (fstat_result < 0) {
+ /* Tolerate fstat() errors other than EBADF. See Issue #25717, where
+ an anonymous file on a Virtual Box shared folder filesystem would
+ raise ENOENT. */
+#ifdef MS_WINDOWS
+ if (GetLastError() == ERROR_INVALID_HANDLE) {
+ PyErr_SetFromWindowsErr(0);
+#else
+ if (errno == EBADF) {
+ PyErr_SetFromErrno(PyExc_OSError);
+#endif
+ goto error;
+ }
+ }
+ else {
+#if defined(S_ISDIR) && defined(EISDIR)
+ /* On Unix, open will succeed for directories.
+ In Python, there should be no file objects referring to
+ directories, so we need a check. */
+ if (S_ISDIR(fdfstat.st_mode)) {
+ errno = EISDIR;
+ PyErr_SetFromErrnoWithFilenameObject(PyExc_IOError, nameobj);
+ goto error;
+ }
+#endif /* defined(S_ISDIR) */
+#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
+ if (fdfstat.st_blksize > 1)
+ self->blksize = fdfstat.st_blksize;
+#endif /* HAVE_STRUCT_STAT_ST_BLKSIZE */
+ }
#if defined(MS_WINDOWS) || defined(__CYGWIN__)
/* don't translate newlines (\r\n <=> \n) */
@@ -506,32 +555,60 @@ err_mode(char *action)
return NULL;
}
+/*[clinic input]
+_io.FileIO.fileno
+
+Return the underlying file descriptor (an integer).
+[clinic start generated code]*/
+
static PyObject *
-fileio_fileno(fileio *self)
+_io_FileIO_fileno_impl(fileio *self)
+/*[clinic end generated code: output=a9626ce5398ece90 input=0b9b2de67335ada3]*/
{
if (self->fd < 0)
return err_closed();
return PyLong_FromLong((long) self->fd);
}
+/*[clinic input]
+_io.FileIO.readable
+
+True if file was opened in a read mode.
+[clinic start generated code]*/
+
static PyObject *
-fileio_readable(fileio *self)
+_io_FileIO_readable_impl(fileio *self)
+/*[clinic end generated code: output=640744a6150fe9ba input=a3fdfed6eea721c5]*/
{
if (self->fd < 0)
return err_closed();
return PyBool_FromLong((long) self->readable);
}
+/*[clinic input]
+_io.FileIO.writable
+
+True if file was opened in a write mode.
+[clinic start generated code]*/
+
static PyObject *
-fileio_writable(fileio *self)
+_io_FileIO_writable_impl(fileio *self)
+/*[clinic end generated code: output=96cefc5446e89977 input=c204a808ca2e1748]*/
{
if (self->fd < 0)
return err_closed();
return PyBool_FromLong((long) self->writable);
}
+/*[clinic input]
+_io.FileIO.seekable
+
+True if file supports random-access.
+[clinic start generated code]*/
+
static PyObject *
-fileio_seekable(fileio *self)
+_io_FileIO_seekable_impl(fileio *self)
+/*[clinic end generated code: output=47909ca0a42e9287 input=c8e5554d2fd63c7f]*/
{
if (self->fd < 0)
return err_closed();
@@ -548,11 +625,19 @@ fileio_seekable(fileio *self)
return PyBool_FromLong((long) self->seekable);
}
+/*[clinic input]
+_io.FileIO.readinto
+ buffer: Py_buffer(accept={rwbuffer})
+ /
+
+Same as RawIOBase.readinto().
+[clinic start generated code]*/
+
static PyObject *
-fileio_readinto(fileio *self, PyObject *args)
+_io_FileIO_readinto_impl(fileio *self, Py_buffer *buffer)
+/*[clinic end generated code: output=b01a5a22c8415cb4 input=4721d7b68b154eaf]*/
{
- Py_buffer pbuf;
- Py_ssize_t n, len;
+ Py_ssize_t n;
int err;
if (self->fd < 0)
@@ -560,48 +645,21 @@ fileio_readinto(fileio *self, PyObject *args)
if (!self->readable)
return err_mode("reading");
- if (!PyArg_ParseTuple(args, "w*", &pbuf))
- return NULL;
-
- if (_PyVerify_fd(self->fd)) {
- len = pbuf.len;
- Py_BEGIN_ALLOW_THREADS
- errno = 0;
-#ifdef MS_WINDOWS
- if (len > INT_MAX)
- len = INT_MAX;
- n = read(self->fd, pbuf.buf, (int)len);
-#else
- n = read(self->fd, pbuf.buf, len);
-#endif
- Py_END_ALLOW_THREADS
- } else
- n = -1;
+ n = _Py_read(self->fd, buffer->buf, buffer->len);
+ /* copy errno because PyBuffer_Release() can indirectly modify it */
err = errno;
- PyBuffer_Release(&pbuf);
- if (n < 0) {
- if (err == EAGAIN)
+
+ if (n == -1) {
+ if (err == EAGAIN) {
+ PyErr_Clear();
Py_RETURN_NONE;
- errno = err;
- PyErr_SetFromErrno(PyExc_IOError);
+ }
return NULL;
}
return PyLong_FromSsize_t(n);
}
-#ifndef HAVE_FSTAT
-
-static PyObject *
-fileio_readall(fileio *self)
-{
- _Py_IDENTIFIER(readall);
- return _PyObject_CallMethodId((PyObject*)&PyRawIOBase_Type,
- &PyId_readall, "O", self);
-}
-
-#else
-
static size_t
new_buffersize(fileio *self, size_t currentsize)
{
@@ -621,10 +679,20 @@ new_buffersize(fileio *self, size_t currentsize)
return addend + currentsize;
}
+/*[clinic input]
+_io.FileIO.readall
+
+Read all data from the file, returned as bytes.
+
+In non-blocking mode, returns as much as is immediately available,
+or None if no data is available. Return an empty bytes object at EOF.
+[clinic start generated code]*/
+
static PyObject *
-fileio_readall(fileio *self)
+_io_FileIO_readall_impl(fileio *self)
+/*[clinic end generated code: output=faa0292b213b4022 input=dbdc137f55602834]*/
{
- struct stat st;
+ struct _Py_stat_struct status;
Py_off_t pos, end;
PyObject *result;
Py_ssize_t bytes_read = 0;
@@ -636,13 +704,16 @@ fileio_readall(fileio *self)
if (!_PyVerify_fd(self->fd))
return PyErr_SetFromErrno(PyExc_IOError);
+ _Py_BEGIN_SUPPRESS_IPH
#ifdef MS_WINDOWS
pos = _lseeki64(self->fd, 0L, SEEK_CUR);
#else
pos = lseek(self->fd, 0L, SEEK_CUR);
#endif
- if (fstat(self->fd, &st) == 0)
- end = st.st_size;
+ _Py_END_SUPPRESS_IPH
+
+ if (_Py_fstat_noraise(self->fd, &status) == 0)
+ end = status.st_size;
else
end = (Py_off_t)-1;
@@ -676,35 +747,22 @@ fileio_readall(fileio *self)
return NULL;
}
}
- Py_BEGIN_ALLOW_THREADS
- errno = 0;
- n = bufsize - bytes_read;
-#ifdef MS_WINDOWS
- if (n > INT_MAX)
- n = INT_MAX;
- n = read(self->fd, PyBytes_AS_STRING(result) + bytes_read, (int)n);
-#else
- n = read(self->fd, PyBytes_AS_STRING(result) + bytes_read, n);
-#endif
- Py_END_ALLOW_THREADS
+
+ n = _Py_read(self->fd,
+ PyBytes_AS_STRING(result) + bytes_read,
+ bufsize - bytes_read);
+
if (n == 0)
break;
- if (n < 0) {
- if (errno == EINTR) {
- if (PyErr_CheckSignals()) {
- Py_DECREF(result);
- return NULL;
- }
- continue;
- }
+ if (n == -1) {
if (errno == EAGAIN) {
+ PyErr_Clear();
if (bytes_read > 0)
break;
Py_DECREF(result);
Py_RETURN_NONE;
}
Py_DECREF(result);
- PyErr_SetFromErrno(PyExc_IOError);
return NULL;
}
bytes_read += n;
@@ -718,14 +776,24 @@ fileio_readall(fileio *self)
return result;
}
-#endif /* HAVE_FSTAT */
+/*[clinic input]
+_io.FileIO.read
+ size: io_ssize_t = -1
+ /
+
+Read at most size bytes, returned as bytes.
+
+Only makes one system call, so less data may be returned than requested.
+In non-blocking mode, returns None if no data is available.
+Return an empty bytes object at EOF.
+[clinic start generated code]*/
static PyObject *
-fileio_read(fileio *self, PyObject *args)
+_io_FileIO_read_impl(fileio *self, Py_ssize_t size)
+/*[clinic end generated code: output=42528d39dd0ca641 input=5c6caa5490c13a9b]*/
{
char *ptr;
Py_ssize_t n;
- Py_ssize_t size = -1;
PyObject *bytes;
if (self->fd < 0)
@@ -733,41 +801,29 @@ fileio_read(fileio *self, PyObject *args)
if (!self->readable)
return err_mode("reading");
- if (!PyArg_ParseTuple(args, "|O&", &_PyIO_ConvertSsize_t, &size))
- return NULL;
-
- if (size < 0) {
- return fileio_readall(self);
- }
+ if (size < 0)
+ return _io_FileIO_readall_impl(self);
#ifdef MS_WINDOWS
+ /* On Windows, the count parameter of read() is an int */
if (size > INT_MAX)
size = INT_MAX;
#endif
+
bytes = PyBytes_FromStringAndSize(NULL, size);
if (bytes == NULL)
return NULL;
ptr = PyBytes_AS_STRING(bytes);
- if (_PyVerify_fd(self->fd)) {
- Py_BEGIN_ALLOW_THREADS
- errno = 0;
-#ifdef MS_WINDOWS
- n = read(self->fd, ptr, (int)size);
-#else
- n = read(self->fd, ptr, size);
-#endif
- Py_END_ALLOW_THREADS
- } else
- n = -1;
-
- if (n < 0) {
+ n = _Py_read(self->fd, ptr, size);
+ if (n == -1) {
+ /* copy errno because Py_DECREF() can indirectly modify it */
int err = errno;
Py_DECREF(bytes);
- if (err == EAGAIN)
+ if (err == EAGAIN) {
+ PyErr_Clear();
Py_RETURN_NONE;
- errno = err;
- PyErr_SetFromErrno(PyExc_IOError);
+ }
return NULL;
}
@@ -781,11 +837,23 @@ fileio_read(fileio *self, PyObject *args)
return (PyObject *) bytes;
}
+/*[clinic input]
+_io.FileIO.write
+ b: Py_buffer
+ /
+
+Write buffer b to file, return number of bytes written.
+
+Only makes one system call, so not all of the data may be written.
+The number of bytes actually written is returned. In non-blocking mode,
+returns None if the write would block.
+[clinic start generated code]*/
+
static PyObject *
-fileio_write(fileio *self, PyObject *args)
+_io_FileIO_write_impl(fileio *self, Py_buffer *b)
+/*[clinic end generated code: output=b4059db3d363a2f7 input=6e7908b36f0ce74f]*/
{
- Py_buffer pbuf;
- Py_ssize_t n, len;
+ Py_ssize_t n;
int err;
if (self->fd < 0)
@@ -793,39 +861,15 @@ fileio_write(fileio *self, PyObject *args)
if (!self->writable)
return err_mode("writing");
- if (!PyArg_ParseTuple(args, "y*", &pbuf))
- return NULL;
-
- if (_PyVerify_fd(self->fd)) {
- Py_BEGIN_ALLOW_THREADS
- errno = 0;
- len = pbuf.len;
-#ifdef MS_WINDOWS
- if (len > 32767 && isatty(self->fd)) {
- /* Issue #11395: the Windows console returns an error (12: not
- enough space error) on writing into stdout if stdout mode is
- binary and the length is greater than 66,000 bytes (or less,
- depending on heap usage). */
- len = 32767;
- }
- else if (len > INT_MAX)
- len = INT_MAX;
- n = write(self->fd, pbuf.buf, (int)len);
-#else
- n = write(self->fd, pbuf.buf, len);
-#endif
- Py_END_ALLOW_THREADS
- } else
- n = -1;
+ n = _Py_write(self->fd, b->buf, b->len);
+ /* copy errno because PyBuffer_Release() can indirectly modify it */
err = errno;
- PyBuffer_Release(&pbuf);
-
if (n < 0) {
- if (err == EAGAIN)
+ if (err == EAGAIN) {
+ PyErr_Clear();
Py_RETURN_NONE;
- errno = err;
- PyErr_SetFromErrno(PyExc_IOError);
+ }
return NULL;
}
@@ -873,11 +917,13 @@ portable_lseek(int fd, PyObject *posobj, int whence)
if (_PyVerify_fd(fd)) {
Py_BEGIN_ALLOW_THREADS
+ _Py_BEGIN_SUPPRESS_IPH
#ifdef MS_WINDOWS
res = _lseeki64(fd, pos, whence);
#else
res = lseek(fd, pos, whence);
#endif
+ _Py_END_SUPPRESS_IPH
Py_END_ALLOW_THREADS
} else
res = -1;
@@ -891,23 +937,44 @@ portable_lseek(int fd, PyObject *posobj, int whence)
#endif
}
+/*[clinic input]
+_io.FileIO.seek
+ pos: object
+ whence: int = 0
+ /
+
+Move to new file position and return the file position.
+
+Argument offset is a byte count. Optional argument whence defaults to
+SEEK_SET or 0 (offset from start of file, offset should be >= 0); other values
+are SEEK_CUR or 1 (move relative to current position, positive or negative),
+and SEEK_END or 2 (move relative to end of file, usually negative, although
+many platforms allow seeking beyond the end of a file).
+
+Note that not all file objects are seekable.
+[clinic start generated code]*/
+
static PyObject *
-fileio_seek(fileio *self, PyObject *args)
+_io_FileIO_seek_impl(fileio *self, PyObject *pos, int whence)
+/*[clinic end generated code: output=c976acdf054e6655 input=0439194b0774d454]*/
{
- PyObject *posobj;
- int whence = 0;
-
if (self->fd < 0)
return err_closed();
- if (!PyArg_ParseTuple(args, "O|i", &posobj, &whence))
- return NULL;
-
- return portable_lseek(self->fd, posobj, whence);
+ return portable_lseek(self->fd, pos, whence);
}
+/*[clinic input]
+_io.FileIO.tell
+
+Current file position.
+
+Can raise OSError for non seekable files.
+[clinic start generated code]*/
+
static PyObject *
-fileio_tell(fileio *self, PyObject *args)
+_io_FileIO_tell_impl(fileio *self)
+/*[clinic end generated code: output=ffe2147058809d0b input=807e24ead4cec2f9]*/
{
if (self->fd < 0)
return err_closed();
@@ -916,13 +983,22 @@ fileio_tell(fileio *self, PyObject *args)
}
#ifdef HAVE_FTRUNCATE
+/*[clinic input]
+_io.FileIO.truncate
+ size as posobj: object = NULL
+ /
+
+Truncate the file to at most size bytes and return the truncated size.
+
+Size defaults to the current file position, as returned by tell().
+The current file position is changed to the value of size.
+[clinic start generated code]*/
+
static PyObject *
-fileio_truncate(fileio *self, PyObject *args)
+_io_FileIO_truncate_impl(fileio *self, PyObject *posobj)
+/*[clinic end generated code: output=e49ca7a916c176fa input=9026af44686b7318]*/
{
- PyObject *posobj = NULL; /* the new size wanted by the user */
-#ifndef MS_WINDOWS
Py_off_t pos;
-#endif
int ret;
int fd;
@@ -932,9 +1008,6 @@ fileio_truncate(fileio *self, PyObject *args)
if (!self->writable)
return err_mode("writing");
- if (!PyArg_ParseTuple(args, "|O", &posobj))
- return NULL;
-
if (posobj == Py_None || posobj == NULL) {
/* Get the current position. */
posobj = portable_lseek(fd, NULL, 1);
@@ -945,52 +1018,6 @@ fileio_truncate(fileio *self, PyObject *args)
Py_INCREF(posobj);
}
-#ifdef MS_WINDOWS
- /* MS _chsize doesn't work if newsize doesn't fit in 32 bits,
- so don't even try using it. */
- {
- PyObject *oldposobj, *tempposobj;
- HANDLE hFile;
-
- /* we save the file pointer position */
- oldposobj = portable_lseek(fd, NULL, 1);
- if (oldposobj == NULL) {
- Py_DECREF(posobj);
- return NULL;
- }
-
- /* we then move to the truncation position */
- tempposobj = portable_lseek(fd, posobj, 0);
- if (tempposobj == NULL) {
- Py_DECREF(oldposobj);
- Py_DECREF(posobj);
- return NULL;
- }
- Py_DECREF(tempposobj);
-
- /* Truncate. Note that this may grow the file! */
- Py_BEGIN_ALLOW_THREADS
- errno = 0;
- hFile = (HANDLE)_get_osfhandle(fd);
- ret = hFile == (HANDLE)-1; /* testing for INVALID_HANDLE value */
- if (ret == 0) {
- ret = SetEndOfFile(hFile) == 0;
- if (ret)
- errno = EACCES;
- }
- Py_END_ALLOW_THREADS
-
- /* we restore the file pointer position in any case */
- tempposobj = portable_lseek(fd, oldposobj, 0);
- Py_DECREF(oldposobj);
- if (tempposobj == NULL) {
- Py_DECREF(posobj);
- return NULL;
- }
- Py_DECREF(tempposobj);
- }
-#else
-
#if defined(HAVE_LARGEFILE_SUPPORT)
pos = PyLong_AsLongLong(posobj);
#else
@@ -1002,12 +1029,16 @@ fileio_truncate(fileio *self, PyObject *args)
}
Py_BEGIN_ALLOW_THREADS
+ _Py_BEGIN_SUPPRESS_IPH
errno = 0;
+#ifdef MS_WINDOWS
+ ret = _chsize_s(fd, pos);
+#else
ret = ftruncate(fd, pos);
+#endif
+ _Py_END_SUPPRESS_IPH
Py_END_ALLOW_THREADS
-#endif /* !MS_WINDOWS */
-
if (ret != 0) {
Py_DECREF(posobj);
PyErr_SetFromErrno(PyExc_IOError);
@@ -1057,26 +1088,40 @@ fileio_repr(fileio *self)
PyErr_Clear();
else
return NULL;
- res = PyUnicode_FromFormat("<_io.FileIO fd=%d mode='%s'>",
- self->fd, mode_string(self));
+ res = PyUnicode_FromFormat(
+ "<_io.FileIO fd=%d mode='%s' closefd=%s>",
+ self->fd, mode_string(self), self->closefd ? "True" : "False");
}
else {
- res = PyUnicode_FromFormat("<_io.FileIO name=%R mode='%s'>",
- nameobj, mode_string(self));
+ res = PyUnicode_FromFormat(
+ "<_io.FileIO name=%R mode='%s' closefd=%s>",
+ nameobj, mode_string(self), self->closefd ? "True" : "False");
Py_DECREF(nameobj);
}
return res;
}
+/*[clinic input]
+_io.FileIO.isatty
+
+True if the file is connected to a TTY device.
+[clinic start generated code]*/
+
static PyObject *
-fileio_isatty(fileio *self)
+_io_FileIO_isatty_impl(fileio *self)
+/*[clinic end generated code: output=932c39924e9a8070 input=cd94ca1f5e95e843]*/
{
long res;
if (self->fd < 0)
return err_closed();
Py_BEGIN_ALLOW_THREADS
- res = isatty(self->fd);
+ _Py_BEGIN_SUPPRESS_IPH
+ if (_PyVerify_fd(self->fd))
+ res = isatty(self->fd);
+ else
+ res = 0;
+ _Py_END_SUPPRESS_IPH
Py_END_ALLOW_THREADS
return PyBool_FromLong(res);
}
@@ -1089,110 +1134,22 @@ fileio_getstate(fileio *self)
return NULL;
}
-
-PyDoc_STRVAR(fileio_doc,
-"file(name: str[, mode: str][, opener: None]) -> file IO object\n"
-"\n"
-"Open a file. The mode can be 'r' (default), 'w', 'x' or 'a' for reading,\n"
-"writing, exclusive creation or appending. The file will be created if it\n"
-"doesn't exist when opened for writing or appending; it will be truncated\n"
-"when opened for writing. A FileExistsError will be raised if it already\n"
-"exists when opened for creating. Opening a file for creating implies\n"
-"writing so this mode behaves in a similar way to 'w'.Add a '+' to the mode\n"
-"to allow simultaneous reading and writing. A custom opener can be used by\n"
-"passing a callable as *opener*. The underlying file descriptor for the file\n"
-"object is then obtained by calling opener with (*name*, *flags*).\n"
-"*opener* must return an open file descriptor (passing os.open as *opener*\n"
-"results in functionality similar to passing None).");
-
-PyDoc_STRVAR(read_doc,
-"read(size: int) -> bytes. read at most size bytes, returned as bytes.\n"
-"\n"
-"Only makes one system call, so less data may be returned than requested\n"
-"In non-blocking mode, returns None if no data is available.\n"
-"Return an empty bytes object at EOF.");
-
-PyDoc_STRVAR(readall_doc,
-"readall() -> bytes. read all data from the file, returned as bytes.\n"
-"\n"
-"In non-blocking mode, returns as much as is immediately available,\n"
-"or None if no data is available. Return an empty bytes object at EOF.");
-
-PyDoc_STRVAR(write_doc,
-"write(b: bytes) -> int. Write bytes b to file, return number written.\n"
-"\n"
-"Only makes one system call, so not all of the data may be written.\n"
-"The number of bytes actually written is returned. In non-blocking mode,\n"
-"returns None if the write would block."
-);
-
-PyDoc_STRVAR(fileno_doc,
-"fileno() -> int. Return the underlying file descriptor (an integer).");
-
-PyDoc_STRVAR(seek_doc,
-"seek(offset: int[, whence: int]) -> int. Move to new file position and\n"
-"return the file position.\n"
-"\n"
-"Argument offset is a byte count. Optional argument whence defaults to\n"
-"SEEK_SET or 0 (offset from start of file, offset should be >= 0); other values\n"
-"are SEEK_CUR or 1 (move relative to current position, positive or negative),\n"
-"and SEEK_END or 2 (move relative to end of file, usually negative, although\n"
-"many platforms allow seeking beyond the end of a file).\n"
-"\n"
-"Note that not all file objects are seekable.");
-
-#ifdef HAVE_FTRUNCATE
-PyDoc_STRVAR(truncate_doc,
-"truncate([size: int]) -> int. Truncate the file to at most size bytes\n"
-"and return the truncated size.\n"
-"\n"
-"Size defaults to the current file position, as returned by tell().\n"
-"The current file position is changed to the value of size.");
-#endif
-
-PyDoc_STRVAR(tell_doc,
-"tell() -> int. Current file position.\n"
-"\n"
-"Can raise OSError for non seekable files."
-);
-
-PyDoc_STRVAR(readinto_doc,
-"readinto() -> Same as RawIOBase.readinto().");
-
-PyDoc_STRVAR(close_doc,
-"close() -> None. Close the file.\n"
-"\n"
-"A closed file cannot be used for further I/O operations. close() may be\n"
-"called more than once without error.");
-
-PyDoc_STRVAR(isatty_doc,
-"isatty() -> bool. True if the file is connected to a TTY device.");
-
-PyDoc_STRVAR(seekable_doc,
-"seekable() -> bool. True if file supports random-access.");
-
-PyDoc_STRVAR(readable_doc,
-"readable() -> bool. True if file was opened in a read mode.");
-
-PyDoc_STRVAR(writable_doc,
-"writable() -> bool. True if file was opened in a write mode.");
+#include "clinic/fileio.c.h"
static PyMethodDef fileio_methods[] = {
- {"read", (PyCFunction)fileio_read, METH_VARARGS, read_doc},
- {"readall", (PyCFunction)fileio_readall, METH_NOARGS, readall_doc},
- {"readinto", (PyCFunction)fileio_readinto, METH_VARARGS, readinto_doc},
- {"write", (PyCFunction)fileio_write, METH_VARARGS, write_doc},
- {"seek", (PyCFunction)fileio_seek, METH_VARARGS, seek_doc},
- {"tell", (PyCFunction)fileio_tell, METH_VARARGS, tell_doc},
-#ifdef HAVE_FTRUNCATE
- {"truncate", (PyCFunction)fileio_truncate, METH_VARARGS, truncate_doc},
-#endif
- {"close", (PyCFunction)fileio_close, METH_NOARGS, close_doc},
- {"seekable", (PyCFunction)fileio_seekable, METH_NOARGS, seekable_doc},
- {"readable", (PyCFunction)fileio_readable, METH_NOARGS, readable_doc},
- {"writable", (PyCFunction)fileio_writable, METH_NOARGS, writable_doc},
- {"fileno", (PyCFunction)fileio_fileno, METH_NOARGS, fileno_doc},
- {"isatty", (PyCFunction)fileio_isatty, METH_NOARGS, isatty_doc},
+ _IO_FILEIO_READ_METHODDEF
+ _IO_FILEIO_READALL_METHODDEF
+ _IO_FILEIO_READINTO_METHODDEF
+ _IO_FILEIO_WRITE_METHODDEF
+ _IO_FILEIO_SEEK_METHODDEF
+ _IO_FILEIO_TELL_METHODDEF
+ _IO_FILEIO_TRUNCATE_METHODDEF
+ _IO_FILEIO_CLOSE_METHODDEF
+ _IO_FILEIO_SEEKABLE_METHODDEF
+ _IO_FILEIO_READABLE_METHODDEF
+ _IO_FILEIO_WRITABLE_METHODDEF
+ _IO_FILEIO_FILENO_METHODDEF
+ _IO_FILEIO_ISATTY_METHODDEF
{"_dealloc_warn", (PyCFunction)fileio_dealloc_warn, METH_O, NULL},
{"__getstate__", (PyCFunction)fileio_getstate, METH_NOARGS, NULL},
{NULL, NULL} /* sentinel */
@@ -1227,6 +1184,7 @@ static PyGetSetDef fileio_getsetlist[] = {
};
static PyMemberDef fileio_members[] = {
+ {"_blksize", T_UINT, offsetof(fileio, blksize), 0},
{"_finalizing", T_BOOL, offsetof(fileio, finalizing), 0},
{NULL}
};
@@ -1253,7 +1211,7 @@ PyTypeObject PyFileIO_Type = {
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE
| Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, /* tp_flags */
- fileio_doc, /* tp_doc */
+ _io_FileIO___init____doc__, /* tp_doc */
(traverseproc)fileio_traverse, /* tp_traverse */
(inquiry)fileio_clear, /* tp_clear */
0, /* tp_richcompare */
@@ -1268,7 +1226,7 @@ PyTypeObject PyFileIO_Type = {
0, /* tp_descr_get */
0, /* tp_descr_set */
offsetof(fileio, dict), /* tp_dictoffset */
- fileio_init, /* tp_init */
+ _io_FileIO___init__, /* tp_init */
PyType_GenericAlloc, /* tp_alloc */
fileio_new, /* tp_new */
PyObject_GC_Del, /* tp_free */
diff --git a/Modules/_io/iobase.c b/Modules/_io/iobase.c
index ef06b43ca6..212b0ddcfc 100644
--- a/Modules/_io/iobase.c
+++ b/Modules/_io/iobase.c
@@ -13,6 +13,20 @@
#include "structmember.h"
#include "_iomodule.h"
+/*[clinic input]
+module _io
+class _io._IOBase "PyObject *" "&PyIOBase_Type"
+class _io._RawIOBase "PyObject *" "&PyRawIOBase_Type"
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=d29a4d076c2b211c]*/
+
+/*[python input]
+class io_ssize_t_converter(CConverter):
+ type = 'Py_ssize_t'
+ converter = '_PyIO_ConvertSsize_t'
+[python start generated code]*/
+/*[python end generated code: output=da39a3ee5e6b4b0d input=d0a811d3cbfd1b33]*/
+
/*
* IOBase class, an abstract class
*/
@@ -39,8 +53,9 @@ PyDoc_STRVAR(iobase_doc,
"called.\n"
"\n"
"The basic type used for binary data read from or written to a file is\n"
- "bytes. bytearrays are accepted too, and in some cases (such as\n"
- "readinto) needed. Text I/O classes work with str data.\n"
+ "bytes. Other bytes-like objects are accepted as method arguments too.\n"
+ "In some cases (such as readinto), a writable object is required. Text\n"
+ "I/O classes work with str data.\n"
"\n"
"Note that calling any method (except additional calls to close(),\n"
"which are ignored) on a closed stream should raise a ValueError.\n"
@@ -96,11 +111,15 @@ iobase_seek(PyObject *self, PyObject *args)
return iobase_unsupported("seek");
}
-PyDoc_STRVAR(iobase_tell_doc,
- "Return current stream position.");
+/*[clinic input]
+_io._IOBase.tell
+
+Return current stream position.
+[clinic start generated code]*/
static PyObject *
-iobase_tell(PyObject *self, PyObject *args)
+_io__IOBase_tell_impl(PyObject *self)
+/*[clinic end generated code: output=89a1c0807935abe2 input=04e615fec128801f]*/
{
_Py_IDENTIFIER(seek);
@@ -121,13 +140,17 @@ iobase_truncate(PyObject *self, PyObject *args)
/* Flush and close methods */
-PyDoc_STRVAR(iobase_flush_doc,
- "Flush write buffers, if applicable.\n"
- "\n"
- "This is not implemented for read-only and non-blocking streams.\n");
+/*[clinic input]
+_io._IOBase.flush
+
+Flush write buffers, if applicable.
+
+This is not implemented for read-only and non-blocking streams.
+[clinic start generated code]*/
static PyObject *
-iobase_flush(PyObject *self, PyObject *args)
+_io__IOBase_flush_impl(PyObject *self)
+/*[clinic end generated code: output=7cef4b4d54656a3b input=773be121abe270aa]*/
{
/* XXX Should this return the number of bytes written??? */
if (IS_CLOSED(self)) {
@@ -137,11 +160,6 @@ iobase_flush(PyObject *self, PyObject *args)
Py_RETURN_NONE;
}
-PyDoc_STRVAR(iobase_close_doc,
- "Flush and close the IO object.\n"
- "\n"
- "This method has no effect if the file is already closed.\n");
-
static int
iobase_closed(PyObject *self)
{
@@ -180,8 +198,17 @@ _PyIOBase_check_closed(PyObject *self, PyObject *args)
`__IOBase_closed` and call flush() by itself, but it is redundant with
whatever behaviour a non-trivial derived class will implement. */
+/*[clinic input]
+_io._IOBase.close
+
+Flush and close the IO object.
+
+This method has no effect if the file is already closed.
+[clinic start generated code]*/
+
static PyObject *
-iobase_close(PyObject *self, PyObject *args)
+_io__IOBase_close_impl(PyObject *self)
+/*[clinic end generated code: output=63c6a6f57d783d6d input=f4494d5c31dbc6b7]*/
{
PyObject *res;
@@ -304,14 +331,18 @@ iobase_dealloc(iobase *self)
/* Inquiry methods */
-PyDoc_STRVAR(iobase_seekable_doc,
- "Return whether object supports random access.\n"
- "\n"
- "If False, seek(), tell() and truncate() will raise UnsupportedOperation.\n"
- "This method may need to do a test seek().");
+/*[clinic input]
+_io._IOBase.seekable
+
+Return whether object supports random access.
+
+If False, seek(), tell() and truncate() will raise OSError.
+This method may need to do a test seek().
+[clinic start generated code]*/
static PyObject *
-iobase_seekable(PyObject *self, PyObject *args)
+_io__IOBase_seekable_impl(PyObject *self)
+/*[clinic end generated code: output=4c24c67f5f32a43d input=b976622f7fdf3063]*/
{
Py_RETURN_FALSE;
}
@@ -333,13 +364,17 @@ _PyIOBase_check_seekable(PyObject *self, PyObject *args)
return res;
}
-PyDoc_STRVAR(iobase_readable_doc,
- "Return whether object was opened for reading.\n"
- "\n"
- "If False, read() will raise UnsupportedOperation.");
+/*[clinic input]
+_io._IOBase.readable
+
+Return whether object was opened for reading.
+
+If False, read() will raise OSError.
+[clinic start generated code]*/
static PyObject *
-iobase_readable(PyObject *self, PyObject *args)
+_io__IOBase_readable_impl(PyObject *self)
+/*[clinic end generated code: output=e48089250686388b input=285b3b866a0ec35f]*/
{
Py_RETURN_FALSE;
}
@@ -362,13 +397,17 @@ _PyIOBase_check_readable(PyObject *self, PyObject *args)
return res;
}
-PyDoc_STRVAR(iobase_writable_doc,
- "Return whether object was opened for writing.\n"
- "\n"
- "If False, write() will raise UnsupportedOperation.");
+/*[clinic input]
+_io._IOBase.writable
+
+Return whether object was opened for writing.
+
+If False, write() will raise OSError.
+[clinic start generated code]*/
static PyObject *
-iobase_writable(PyObject *self, PyObject *args)
+_io__IOBase_writable_impl(PyObject *self)
+/*[clinic end generated code: output=406001d0985be14f input=9dcac18a013a05b5]*/
{
Py_RETURN_FALSE;
}
@@ -413,24 +452,32 @@ iobase_exit(PyObject *self, PyObject *args)
/* XXX Should these be present even if unimplemented? */
-PyDoc_STRVAR(iobase_fileno_doc,
- "Returns underlying file descriptor if one exists.\n"
- "\n"
- "An IOError is raised if the IO object does not use a file descriptor.\n");
+/*[clinic input]
+_io._IOBase.fileno
+
+Returns underlying file descriptor if one exists.
+
+OSError is raised if the IO object does not use a file descriptor.
+[clinic start generated code]*/
static PyObject *
-iobase_fileno(PyObject *self, PyObject *args)
+_io__IOBase_fileno_impl(PyObject *self)
+/*[clinic end generated code: output=7cc0973f0f5f3b73 input=4e37028947dc1cc8]*/
{
return iobase_unsupported("fileno");
}
-PyDoc_STRVAR(iobase_isatty_doc,
- "Return whether this is an 'interactive' stream.\n"
- "\n"
- "Return False if it can't be determined.\n");
+/*[clinic input]
+_io._IOBase.isatty
+
+Return whether this is an 'interactive' stream.
+
+Return False if it can't be determined.
+[clinic start generated code]*/
static PyObject *
-iobase_isatty(PyObject *self, PyObject *args)
+_io__IOBase_isatty_impl(PyObject *self)
+/*[clinic end generated code: output=60cab77cede41cdd input=9ef76530d368458b]*/
{
if (_PyIOBase_check_closed(self, Py_True) == NULL)
return NULL;
@@ -439,30 +486,31 @@ iobase_isatty(PyObject *self, PyObject *args)
/* Readline(s) and writelines */
-PyDoc_STRVAR(iobase_readline_doc,
- "Read and return a line from the stream.\n"
- "\n"
- "If limit is specified, at most limit bytes will be read.\n"
- "\n"
- "The line terminator is always b'\\n' for binary files; for text\n"
- "files, the newlines argument to open can be used to select the line\n"
- "terminator(s) recognized.\n");
+/*[clinic input]
+_io._IOBase.readline
+ size as limit: io_ssize_t = -1
+ /
+
+Read and return a line from the stream.
+
+If size is specified, at most size bytes will be read.
+
+The line terminator is always b'\n' for binary files; for text
+files, the newlines argument to open can be used to select the line
+terminator(s) recognized.
+[clinic start generated code]*/
static PyObject *
-iobase_readline(PyObject *self, PyObject *args)
+_io__IOBase_readline_impl(PyObject *self, Py_ssize_t limit)
+/*[clinic end generated code: output=4479f79b58187840 input=df4cc8884f553cab]*/
{
/* For backwards compatibility, a (slowish) readline(). */
- Py_ssize_t limit = -1;
int has_peek = 0;
PyObject *buffer, *result;
Py_ssize_t old_size = -1;
_Py_IDENTIFIER(peek);
- if (!PyArg_ParseTuple(args, "|O&:readline", &_PyIO_ConvertSsize_t, &limit)) {
- return NULL;
- }
-
if (_PyObject_HasAttrId(self, &PyId_peek))
has_peek = 1;
@@ -585,23 +633,25 @@ iobase_iternext(PyObject *self)
return line;
}
-PyDoc_STRVAR(iobase_readlines_doc,
- "Return a list of lines from the stream.\n"
- "\n"
- "hint can be specified to control the number of lines read: no more\n"
- "lines will be read if the total size (in bytes/characters) of all\n"
- "lines so far exceeds hint.");
+/*[clinic input]
+_io._IOBase.readlines
+ hint: io_ssize_t = -1
+ /
+
+Return a list of lines from the stream.
+
+hint can be specified to control the number of lines read: no more
+lines will be read if the total size (in bytes/characters) of all
+lines so far exceeds hint.
+[clinic start generated code]*/
static PyObject *
-iobase_readlines(PyObject *self, PyObject *args)
+_io__IOBase_readlines_impl(PyObject *self, Py_ssize_t hint)
+/*[clinic end generated code: output=2f50421677fa3dea input=1961c4a95e96e661]*/
{
- Py_ssize_t hint = -1, length = 0;
+ Py_ssize_t length = 0;
PyObject *result;
- if (!PyArg_ParseTuple(args, "|O&:readlines", &_PyIO_ConvertSsize_t, &hint)) {
- return NULL;
- }
-
result = PyList_New(0);
if (result == NULL)
return NULL;
@@ -646,14 +696,17 @@ iobase_readlines(PyObject *self, PyObject *args)
return result;
}
+/*[clinic input]
+_io._IOBase.writelines
+ lines: object
+ /
+[clinic start generated code]*/
+
static PyObject *
-iobase_writelines(PyObject *self, PyObject *args)
+_io__IOBase_writelines(PyObject *self, PyObject *lines)
+/*[clinic end generated code: output=976eb0a9b60a6628 input=432e729a8450b3cb]*/
{
- PyObject *lines, *iter, *res;
-
- if (!PyArg_ParseTuple(args, "O:writelines", &lines)) {
- return NULL;
- }
+ PyObject *iter, *res;
if (_PyIOBase_check_closed(self, Py_True) == NULL)
return NULL;
@@ -688,31 +741,33 @@ iobase_writelines(PyObject *self, PyObject *args)
Py_RETURN_NONE;
}
+#include "clinic/iobase.c.h"
+
static PyMethodDef iobase_methods[] = {
{"seek", iobase_seek, METH_VARARGS, iobase_seek_doc},
- {"tell", iobase_tell, METH_NOARGS, iobase_tell_doc},
+ _IO__IOBASE_TELL_METHODDEF
{"truncate", iobase_truncate, METH_VARARGS, iobase_truncate_doc},
- {"flush", iobase_flush, METH_NOARGS, iobase_flush_doc},
- {"close", iobase_close, METH_NOARGS, iobase_close_doc},
+ _IO__IOBASE_FLUSH_METHODDEF
+ _IO__IOBASE_CLOSE_METHODDEF
- {"seekable", iobase_seekable, METH_NOARGS, iobase_seekable_doc},
- {"readable", iobase_readable, METH_NOARGS, iobase_readable_doc},
- {"writable", iobase_writable, METH_NOARGS, iobase_writable_doc},
+ _IO__IOBASE_SEEKABLE_METHODDEF
+ _IO__IOBASE_READABLE_METHODDEF
+ _IO__IOBASE_WRITABLE_METHODDEF
{"_checkClosed", _PyIOBase_check_closed, METH_NOARGS},
{"_checkSeekable", _PyIOBase_check_seekable, METH_NOARGS},
{"_checkReadable", _PyIOBase_check_readable, METH_NOARGS},
{"_checkWritable", _PyIOBase_check_writable, METH_NOARGS},
- {"fileno", iobase_fileno, METH_NOARGS, iobase_fileno_doc},
- {"isatty", iobase_isatty, METH_NOARGS, iobase_isatty_doc},
+ _IO__IOBASE_FILENO_METHODDEF
+ _IO__IOBASE_ISATTY_METHODDEF
{"__enter__", iobase_enter, METH_NOARGS},
{"__exit__", iobase_exit, METH_VARARGS},
- {"readline", iobase_readline, METH_VARARGS, iobase_readline_doc},
- {"readlines", iobase_readlines, METH_VARARGS, iobase_readlines_doc},
- {"writelines", iobase_writelines, METH_VARARGS},
+ _IO__IOBASE_READLINE_METHODDEF
+ _IO__IOBASE_READLINES_METHODDEF
+ _IO__IOBASE_WRITELINES_METHODDEF
{NULL, NULL}
};
@@ -795,16 +850,18 @@ PyDoc_STRVAR(rawiobase_doc,
* either.)
*/
+/*[clinic input]
+_io._RawIOBase.read
+ size as n: Py_ssize_t = -1
+ /
+[clinic start generated code]*/
+
static PyObject *
-rawiobase_read(PyObject *self, PyObject *args)
+_io__RawIOBase_read_impl(PyObject *self, Py_ssize_t n)
+/*[clinic end generated code: output=6cdeb731e3c9f13c input=b6d0dcf6417d1374]*/
{
- Py_ssize_t n = -1;
PyObject *b, *res;
- if (!PyArg_ParseTuple(args, "|n:read", &n)) {
- return NULL;
- }
-
if (n < 0) {
_Py_IDENTIFIER(readall);
@@ -836,11 +893,15 @@ rawiobase_read(PyObject *self, PyObject *args)
}
-PyDoc_STRVAR(rawiobase_readall_doc,
- "Read until EOF, using multiple read() call.");
+/*[clinic input]
+_io._RawIOBase.readall
+
+Read until EOF, using multiple read() call.
+[clinic start generated code]*/
static PyObject *
-rawiobase_readall(PyObject *self, PyObject *args)
+_io__RawIOBase_readall_impl(PyObject *self)
+/*[clinic end generated code: output=1987b9ce929425a0 input=688874141213622a]*/
{
int r;
PyObject *chunks = PyList_New(0);
@@ -892,9 +953,25 @@ rawiobase_readall(PyObject *self, PyObject *args)
return result;
}
+static PyObject *
+rawiobase_readinto(PyObject *self, PyObject *args)
+{
+ PyErr_SetNone(PyExc_NotImplementedError);
+ return NULL;
+}
+
+static PyObject *
+rawiobase_write(PyObject *self, PyObject *args)
+{
+ PyErr_SetNone(PyExc_NotImplementedError);
+ return NULL;
+}
+
static PyMethodDef rawiobase_methods[] = {
- {"read", rawiobase_read, METH_VARARGS},
- {"readall", rawiobase_readall, METH_NOARGS, rawiobase_readall_doc},
+ _IO__RAWIOBASE_READ_METHODDEF
+ _IO__RAWIOBASE_READALL_METHODDEF
+ {"readinto", rawiobase_readinto, METH_VARARGS},
+ {"write", rawiobase_write, METH_VARARGS},
{NULL, NULL}
};
diff --git a/Modules/_io/stringio.c b/Modules/_io/stringio.c
index 95fb703eb0..06b4144578 100644
--- a/Modules/_io/stringio.c
+++ b/Modules/_io/stringio.c
@@ -11,6 +11,12 @@
#define STATE_REALIZED 1
#define STATE_ACCUMULATING 2
+/*[clinic input]
+module _io
+class _io.StringIO "stringio *" "&PyStringIO_Type"
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=c17bc0f42165cd7d]*/
+
typedef struct {
PyObject_HEAD
Py_UCS4 *buf;
@@ -39,6 +45,8 @@ typedef struct {
PyObject *weakreflist;
} stringio;
+static int _io_StringIO___init__(PyObject *self, PyObject *args, PyObject *kwargs);
+
#define CHECK_INITIALIZED(self) \
if (self->ok <= 0) { \
PyErr_SetString(PyExc_ValueError, \
@@ -58,12 +66,6 @@ typedef struct {
return NULL; \
}
-PyDoc_STRVAR(stringio_doc,
- "Text I/O implementation using an in-memory buffer.\n"
- "\n"
- "The initial_value argument sets the value of object. The newline\n"
- "argument is like the one of TextIOWrapper's constructor.");
-
/* Internal routine for changing the size, in terms of characters, of the
buffer of StringIO objects. The caller should ensure that the 'size'
@@ -264,11 +266,15 @@ fail:
return -1;
}
-PyDoc_STRVAR(stringio_getvalue_doc,
- "Retrieve the entire contents of the object.");
+/*[clinic input]
+_io.StringIO.getvalue
+
+Retrieve the entire contents of the object.
+[clinic start generated code]*/
static PyObject *
-stringio_getvalue(stringio *self)
+_io_StringIO_getvalue_impl(stringio *self)
+/*[clinic end generated code: output=27b6a7bfeaebce01 input=d23cb81d6791cf88]*/
{
CHECK_INITIALIZED(self);
CHECK_CLOSED(self);
@@ -278,33 +284,40 @@ stringio_getvalue(stringio *self)
self->string_size);
}
-PyDoc_STRVAR(stringio_tell_doc,
- "Tell the current file position.");
+/*[clinic input]
+_io.StringIO.tell
+
+Tell the current file position.
+[clinic start generated code]*/
static PyObject *
-stringio_tell(stringio *self)
+_io_StringIO_tell_impl(stringio *self)
+/*[clinic end generated code: output=2e87ac67b116c77b input=ec866ebaff02f405]*/
{
CHECK_INITIALIZED(self);
CHECK_CLOSED(self);
return PyLong_FromSsize_t(self->pos);
}
-PyDoc_STRVAR(stringio_read_doc,
- "Read at most n characters, returned as a string.\n"
- "\n"
- "If the argument is negative or omitted, read until EOF\n"
- "is reached. Return an empty string at EOF.\n");
+/*[clinic input]
+_io.StringIO.read
+ size as arg: object = None
+ /
+
+Read at most size characters, returned as a string.
+
+If the argument is negative or omitted, read until EOF
+is reached. Return an empty string at EOF.
+[clinic start generated code]*/
static PyObject *
-stringio_read(stringio *self, PyObject *args)
+_io_StringIO_read_impl(stringio *self, PyObject *arg)
+/*[clinic end generated code: output=3676864773746f68 input=9a319015f6f3965c]*/
{
Py_ssize_t size, n;
Py_UCS4 *output;
- PyObject *arg = Py_None;
CHECK_INITIALIZED(self);
- if (!PyArg_ParseTuple(args, "|O:read", &arg))
- return NULL;
CHECK_CLOSED(self);
if (PyNumber_Check(arg)) {
@@ -373,20 +386,23 @@ _stringio_readline(stringio *self, Py_ssize_t limit)
return PyUnicode_FromKindAndData(PyUnicode_4BYTE_KIND, start, len);
}
-PyDoc_STRVAR(stringio_readline_doc,
- "Read until newline or EOF.\n"
- "\n"
- "Returns an empty string if EOF is hit immediately.\n");
+/*[clinic input]
+_io.StringIO.readline
+ size as arg: object = None
+ /
+
+Read until newline or EOF.
+
+Returns an empty string if EOF is hit immediately.
+[clinic start generated code]*/
static PyObject *
-stringio_readline(stringio *self, PyObject *args)
+_io_StringIO_readline_impl(stringio *self, PyObject *arg)
+/*[clinic end generated code: output=99fdcac03a3dee81 input=e0e0ed4042040176]*/
{
- PyObject *arg = Py_None;
Py_ssize_t limit = -1;
CHECK_INITIALIZED(self);
- if (!PyArg_ParseTuple(args, "|O:readline", &arg))
- return NULL;
CHECK_CLOSED(self);
ENSURE_REALIZED(self);
@@ -441,22 +457,25 @@ stringio_iternext(stringio *self)
return line;
}
-PyDoc_STRVAR(stringio_truncate_doc,
- "Truncate size to pos.\n"
- "\n"
- "The pos argument defaults to the current file position, as\n"
- "returned by tell(). The current file position is unchanged.\n"
- "Returns the new absolute position.\n");
+/*[clinic input]
+_io.StringIO.truncate
+ pos as arg: object = None
+ /
+
+Truncate size to pos.
+
+The pos argument defaults to the current file position, as
+returned by tell(). The current file position is unchanged.
+Returns the new absolute position.
+[clinic start generated code]*/
static PyObject *
-stringio_truncate(stringio *self, PyObject *args)
+_io_StringIO_truncate_impl(stringio *self, PyObject *arg)
+/*[clinic end generated code: output=6072439c2b01d306 input=748619a494ba53ad]*/
{
Py_ssize_t size;
- PyObject *arg = Py_None;
CHECK_INITIALIZED(self);
- if (!PyArg_ParseTuple(args, "|O:truncate", &arg))
- return NULL;
CHECK_CLOSED(self);
if (PyNumber_Check(arg)) {
@@ -490,49 +509,51 @@ stringio_truncate(stringio *self, PyObject *args)
return PyLong_FromSsize_t(size);
}
-PyDoc_STRVAR(stringio_seek_doc,
- "Change stream position.\n"
- "\n"
- "Seek to character offset pos relative to position indicated by whence:\n"
- " 0 Start of stream (the default). pos should be >= 0;\n"
- " 1 Current position - pos must be 0;\n"
- " 2 End of stream - pos must be 0.\n"
- "Returns the new absolute position.\n");
+/*[clinic input]
+_io.StringIO.seek
+ pos: Py_ssize_t
+ whence: int = 0
+ /
+
+Change stream position.
+
+Seek to character offset pos relative to position indicated by whence:
+ 0 Start of stream (the default). pos should be >= 0;
+ 1 Current position - pos must be 0;
+ 2 End of stream - pos must be 0.
+Returns the new absolute position.
+[clinic start generated code]*/
static PyObject *
-stringio_seek(stringio *self, PyObject *args)
+_io_StringIO_seek_impl(stringio *self, Py_ssize_t pos, int whence)
+/*[clinic end generated code: output=e9e0ac9a8ae71c25 input=e3855b24e7cae06a]*/
{
- Py_ssize_t pos;
- int mode = 0;
-
CHECK_INITIALIZED(self);
- if (!PyArg_ParseTuple(args, "n|i:seek", &pos, &mode))
- return NULL;
CHECK_CLOSED(self);
- if (mode != 0 && mode != 1 && mode != 2) {
+ if (whence != 0 && whence != 1 && whence != 2) {
PyErr_Format(PyExc_ValueError,
- "Invalid whence (%i, should be 0, 1 or 2)", mode);
+ "Invalid whence (%i, should be 0, 1 or 2)", whence);
return NULL;
}
- else if (pos < 0 && mode == 0) {
+ else if (pos < 0 && whence == 0) {
PyErr_Format(PyExc_ValueError,
"Negative seek position %zd", pos);
return NULL;
}
- else if (mode != 0 && pos != 0) {
+ else if (whence != 0 && pos != 0) {
PyErr_SetString(PyExc_IOError,
"Can't do nonzero cur-relative seeks");
return NULL;
}
- /* mode 0: offset relative to beginning of the string.
- mode 1: no change to current position.
- mode 2: change position to end of file. */
- if (mode == 1) {
+ /* whence = 0: offset relative to beginning of the string.
+ whence = 1: no change to current position.
+ whence = 2: change position to end of file. */
+ if (whence == 1) {
pos = self->pos;
}
- else if (mode == 2) {
+ else if (whence == 2) {
pos = self->string_size;
}
@@ -541,14 +562,20 @@ stringio_seek(stringio *self, PyObject *args)
return PyLong_FromSsize_t(self->pos);
}
-PyDoc_STRVAR(stringio_write_doc,
- "Write string to file.\n"
- "\n"
- "Returns the number of characters written, which is always equal to\n"
- "the length of the string.\n");
+/*[clinic input]
+_io.StringIO.write
+ s as obj: object
+ /
+
+Write string to file.
+
+Returns the number of characters written, which is always equal to
+the length of the string.
+[clinic start generated code]*/
static PyObject *
-stringio_write(stringio *self, PyObject *obj)
+_io_StringIO_write(stringio *self, PyObject *obj)
+/*[clinic end generated code: output=0deaba91a15b94da input=cf96f3b16586e669]*/
{
Py_ssize_t size;
@@ -569,14 +596,20 @@ stringio_write(stringio *self, PyObject *obj)
return PyLong_FromSsize_t(size);
}
-PyDoc_STRVAR(stringio_close_doc,
- "Close the IO object. Attempting any further operation after the\n"
- "object is closed will raise a ValueError.\n"
- "\n"
- "This method has no effect if the file is already closed.\n");
+/*[clinic input]
+_io.StringIO.close
+
+Close the IO object.
+
+Attempting any further operation after the object is closed
+will raise a ValueError.
+
+This method has no effect if the file is already closed.
+[clinic start generated code]*/
static PyObject *
-stringio_close(stringio *self)
+_io_StringIO_close_impl(stringio *self)
+/*[clinic end generated code: output=04399355cbe518f1 input=cbc10b45f35d6d46]*/
{
self->closed = 1;
/* Free up some memory */
@@ -644,23 +677,27 @@ stringio_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
return (PyObject *)self;
}
+/*[clinic input]
+_io.StringIO.__init__
+ initial_value as value: object(c_default="NULL") = ''
+ newline as newline_obj: object(c_default="NULL") = '\n'
+
+Text I/O implementation using an in-memory buffer.
+
+The initial_value argument sets the value of object. The newline
+argument is like the one of TextIOWrapper's constructor.
+[clinic start generated code]*/
+
static int
-stringio_init(stringio *self, PyObject *args, PyObject *kwds)
+_io_StringIO___init___impl(stringio *self, PyObject *value,
+ PyObject *newline_obj)
+/*[clinic end generated code: output=a421ea023b22ef4e input=cee2d9181b2577a3]*/
{
- char *kwlist[] = {"initial_value", "newline", NULL};
- PyObject *value = NULL;
- PyObject *newline_obj = NULL;
char *newline = "\n";
Py_ssize_t value_len;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|OO:__init__", kwlist,
- &value, &newline_obj))
- return -1;
-
- /* Parse the newline argument. This used to be done with the 'z'
- specifier, however this allowed any object with the buffer interface to
- be converted. Thus we have to parse it manually since we only want to
- allow unicode objects or None. */
+ /* Parse the newline argument. We only want to allow unicode objects or
+ None. */
if (newline_obj == Py_None) {
newline = NULL;
}
@@ -761,33 +798,45 @@ stringio_init(stringio *self, PyObject *args, PyObject *kwds)
/* Properties and pseudo-properties */
-PyDoc_STRVAR(stringio_readable_doc,
-"readable() -> bool. Returns True if the IO object can be read.");
+/*[clinic input]
+_io.StringIO.readable
-PyDoc_STRVAR(stringio_writable_doc,
-"writable() -> bool. Returns True if the IO object can be written.");
-
-PyDoc_STRVAR(stringio_seekable_doc,
-"seekable() -> bool. Returns True if the IO object can be seeked.");
+Returns True if the IO object can be read.
+[clinic start generated code]*/
static PyObject *
-stringio_seekable(stringio *self, PyObject *args)
+_io_StringIO_readable_impl(stringio *self)
+/*[clinic end generated code: output=b19d44dd8b1ceb99 input=39ce068b224c21ad]*/
{
CHECK_INITIALIZED(self);
CHECK_CLOSED(self);
Py_RETURN_TRUE;
}
+/*[clinic input]
+_io.StringIO.writable
+
+Returns True if the IO object can be written.
+[clinic start generated code]*/
+
static PyObject *
-stringio_readable(stringio *self, PyObject *args)
+_io_StringIO_writable_impl(stringio *self)
+/*[clinic end generated code: output=13e4dd77187074ca input=7a691353aac38835]*/
{
CHECK_INITIALIZED(self);
CHECK_CLOSED(self);
Py_RETURN_TRUE;
}
+/*[clinic input]
+_io.StringIO.seekable
+
+Returns True if the IO object can be seeked.
+[clinic start generated code]*/
+
static PyObject *
-stringio_writable(stringio *self, PyObject *args)
+_io_StringIO_seekable_impl(stringio *self)
+/*[clinic end generated code: output=4d20b4641c756879 input=4c606d05b32952e6]*/
{
CHECK_INITIALIZED(self);
CHECK_CLOSED(self);
@@ -809,7 +858,7 @@ stringio_writable(stringio *self, PyObject *args)
static PyObject *
stringio_getstate(stringio *self)
{
- PyObject *initvalue = stringio_getvalue(self);
+ PyObject *initvalue = _io_StringIO_getvalue_impl(self);
PyObject *dict;
PyObject *state;
@@ -857,15 +906,15 @@ stringio_setstate(stringio *self, PyObject *state)
initarg = PyTuple_GetSlice(state, 0, 2);
if (initarg == NULL)
return NULL;
- if (stringio_init(self, initarg, NULL) < 0) {
+ if (_io_StringIO___init__((PyObject *)self, initarg, NULL) < 0) {
Py_DECREF(initarg);
return NULL;
}
Py_DECREF(initarg);
/* Restore the buffer state. Even if __init__ did initialize the buffer,
- we have to initialize it again since __init__ may translates the
- newlines in the inital_value string. We clearly do not want that
+ we have to initialize it again since __init__ may translate the
+ newlines in the initial_value string. We clearly do not want that
because the string value in the state tuple has already been translated
once by __init__. So we do not take any chance and replace object's
buffer completely. */
@@ -959,19 +1008,21 @@ stringio_newlines(stringio *self, void *context)
return PyObject_GetAttr(self->decoder, _PyIO_str_newlines);
}
+#include "clinic/stringio.c.h"
+
static struct PyMethodDef stringio_methods[] = {
- {"close", (PyCFunction)stringio_close, METH_NOARGS, stringio_close_doc},
- {"getvalue", (PyCFunction)stringio_getvalue, METH_NOARGS, stringio_getvalue_doc},
- {"read", (PyCFunction)stringio_read, METH_VARARGS, stringio_read_doc},
- {"readline", (PyCFunction)stringio_readline, METH_VARARGS, stringio_readline_doc},
- {"tell", (PyCFunction)stringio_tell, METH_NOARGS, stringio_tell_doc},
- {"truncate", (PyCFunction)stringio_truncate, METH_VARARGS, stringio_truncate_doc},
- {"seek", (PyCFunction)stringio_seek, METH_VARARGS, stringio_seek_doc},
- {"write", (PyCFunction)stringio_write, METH_O, stringio_write_doc},
-
- {"seekable", (PyCFunction)stringio_seekable, METH_NOARGS, stringio_seekable_doc},
- {"readable", (PyCFunction)stringio_readable, METH_NOARGS, stringio_readable_doc},
- {"writable", (PyCFunction)stringio_writable, METH_NOARGS, stringio_writable_doc},
+ _IO_STRINGIO_CLOSE_METHODDEF
+ _IO_STRINGIO_GETVALUE_METHODDEF
+ _IO_STRINGIO_READ_METHODDEF
+ _IO_STRINGIO_READLINE_METHODDEF
+ _IO_STRINGIO_TELL_METHODDEF
+ _IO_STRINGIO_TRUNCATE_METHODDEF
+ _IO_STRINGIO_SEEK_METHODDEF
+ _IO_STRINGIO_WRITE_METHODDEF
+
+ _IO_STRINGIO_SEEKABLE_METHODDEF
+ _IO_STRINGIO_READABLE_METHODDEF
+ _IO_STRINGIO_WRITABLE_METHODDEF
{"__getstate__", (PyCFunction)stringio_getstate, METH_NOARGS},
{"__setstate__", (PyCFunction)stringio_setstate, METH_O},
@@ -1013,7 +1064,7 @@ PyTypeObject PyStringIO_Type = {
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE
| Py_TPFLAGS_HAVE_GC, /*tp_flags*/
- stringio_doc, /*tp_doc*/
+ _io_StringIO___init____doc__, /*tp_doc*/
(traverseproc)stringio_traverse, /*tp_traverse*/
(inquiry)stringio_clear, /*tp_clear*/
0, /*tp_richcompare*/
@@ -1028,7 +1079,7 @@ PyTypeObject PyStringIO_Type = {
0, /*tp_descr_get*/
0, /*tp_descr_set*/
offsetof(stringio, dict), /*tp_dictoffset*/
- (initproc)stringio_init, /*tp_init*/
+ _io_StringIO___init__, /*tp_init*/
0, /*tp_alloc*/
stringio_new, /*tp_new*/
};
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
index 0c1b13ec29..063caa6067 100644
--- a/Modules/_io/textio.c
+++ b/Modules/_io/textio.c
@@ -11,6 +11,20 @@
#include "structmember.h"
#include "_iomodule.h"
+/*[clinic input]
+module _io
+class _io.IncrementalNewlineDecoder "nldecoder_object *" "&PyIncrementalNewlineDecoder_Type"
+class _io.TextIOWrapper "textio *" "&TextIOWrapper_TYpe"
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=2097a4fc85670c26]*/
+
+/*[python input]
+class io_ssize_t_converter(CConverter):
+ type = 'Py_ssize_t'
+ converter = '_PyIO_ConvertSsize_t'
+[python start generated code]*/
+/*[python end generated code: output=da39a3ee5e6b4b0d input=d0a811d3cbfd1b33]*/
+
_Py_IDENTIFIER(close);
_Py_IDENTIFIER(_dealloc_warn);
_Py_IDENTIFIER(decode);
@@ -210,38 +224,37 @@ PyTypeObject PyTextIOBase_Type = {
/* IncrementalNewlineDecoder */
-PyDoc_STRVAR(incrementalnewlinedecoder_doc,
- "Codec used when reading a file in universal newlines mode. It wraps\n"
- "another incremental decoder, translating \\r\\n and \\r into \\n. It also\n"
- "records the types of newlines encountered. When used with\n"
- "translate=False, it ensures that the newline sequence is returned in\n"
- "one piece. When used with decoder=None, it expects unicode strings as\n"
- "decode input and translates newlines without first invoking an external\n"
- "decoder.\n"
- );
-
typedef struct {
PyObject_HEAD
PyObject *decoder;
PyObject *errors;
- signed int pendingcr: 1;
- signed int translate: 1;
+ unsigned int pendingcr: 1;
+ unsigned int translate: 1;
unsigned int seennl: 3;
} nldecoder_object;
-static int
-incrementalnewlinedecoder_init(nldecoder_object *self,
- PyObject *args, PyObject *kwds)
-{
- PyObject *decoder;
- int translate;
- PyObject *errors = NULL;
- char *kwlist[] = {"decoder", "translate", "errors", NULL};
+/*[clinic input]
+_io.IncrementalNewlineDecoder.__init__
+ decoder: object
+ translate: int
+ errors: object(c_default="NULL") = "strict"
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "Oi|O:IncrementalNewlineDecoder",
- kwlist, &decoder, &translate, &errors))
- return -1;
+Codec used when reading a file in universal newlines mode.
+
+It wraps another incremental decoder, translating \r\n and \r into \n.
+It also records the types of newlines encountered. When used with
+translate=False, it ensures that the newline sequence is returned in
+one piece. When used with decoder=None, it expects unicode strings as
+decode input and translates newlines without first invoking an external
+decoder.
+[clinic start generated code]*/
+static int
+_io_IncrementalNewlineDecoder___init___impl(nldecoder_object *self,
+ PyObject *decoder, int translate,
+ PyObject *errors)
+/*[clinic end generated code: output=fbd04d443e764ec2 input=89db6b19c6b126bf]*/
+{
self->decoder = decoder;
Py_INCREF(decoder);
@@ -495,22 +508,27 @@ _PyIncrementalNewlineDecoder_decode(PyObject *myself,
return NULL;
}
+/*[clinic input]
+_io.IncrementalNewlineDecoder.decode
+ input: object
+ final: int(c_default="0") = False
+[clinic start generated code]*/
+
static PyObject *
-incrementalnewlinedecoder_decode(nldecoder_object *self,
- PyObject *args, PyObject *kwds)
+_io_IncrementalNewlineDecoder_decode_impl(nldecoder_object *self,
+ PyObject *input, int final)
+/*[clinic end generated code: output=0d486755bb37a66e input=d65677385bfd6827]*/
{
- char *kwlist[] = {"input", "final", NULL};
- PyObject *input;
- int final = 0;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|i:IncrementalNewlineDecoder",
- kwlist, &input, &final))
- return NULL;
return _PyIncrementalNewlineDecoder_decode((PyObject *) self, input, final);
}
+/*[clinic input]
+_io.IncrementalNewlineDecoder.getstate
+[clinic start generated code]*/
+
static PyObject *
-incrementalnewlinedecoder_getstate(nldecoder_object *self, PyObject *args)
+_io_IncrementalNewlineDecoder_getstate_impl(nldecoder_object *self)
+/*[clinic end generated code: output=f0d2c9c136f4e0d0 input=f8ff101825e32e7f]*/
{
PyObject *buffer;
unsigned PY_LONG_LONG flag;
@@ -520,7 +538,7 @@ incrementalnewlinedecoder_getstate(nldecoder_object *self, PyObject *args)
_PyIO_str_getstate, NULL);
if (state == NULL)
return NULL;
- if (!PyArg_Parse(state, "(OK)", &buffer, &flag)) {
+ if (!PyArg_ParseTuple(state, "OK", &buffer, &flag)) {
Py_DECREF(state);
return NULL;
}
@@ -537,16 +555,24 @@ incrementalnewlinedecoder_getstate(nldecoder_object *self, PyObject *args)
return Py_BuildValue("NK", buffer, flag);
}
+/*[clinic input]
+_io.IncrementalNewlineDecoder.setstate
+ state: object
+ /
+[clinic start generated code]*/
+
static PyObject *
-incrementalnewlinedecoder_setstate(nldecoder_object *self, PyObject *state)
+_io_IncrementalNewlineDecoder_setstate(nldecoder_object *self,
+ PyObject *state)
+/*[clinic end generated code: output=c10c622508b576cb input=c53fb505a76dbbe2]*/
{
PyObject *buffer;
unsigned PY_LONG_LONG flag;
- if (!PyArg_Parse(state, "(OK)", &buffer, &flag))
+ if (!PyArg_ParseTuple(state, "OK", &buffer, &flag))
return NULL;
- self->pendingcr = (int) flag & 1;
+ self->pendingcr = (int) (flag & 1);
flag >>= 1;
if (self->decoder != Py_None)
@@ -556,8 +582,13 @@ incrementalnewlinedecoder_setstate(nldecoder_object *self, PyObject *state)
Py_RETURN_NONE;
}
+/*[clinic input]
+_io.IncrementalNewlineDecoder.reset
+[clinic start generated code]*/
+
static PyObject *
-incrementalnewlinedecoder_reset(nldecoder_object *self, PyObject *args)
+_io_IncrementalNewlineDecoder_reset_impl(nldecoder_object *self)
+/*[clinic end generated code: output=32fa40c7462aa8ff input=728678ddaea776df]*/
{
self->seennl = 0;
self->pendingcr = 0;
@@ -591,95 +622,8 @@ incrementalnewlinedecoder_newlines_get(nldecoder_object *self, void *context)
}
-
-static PyMethodDef incrementalnewlinedecoder_methods[] = {
- {"decode", (PyCFunction)incrementalnewlinedecoder_decode, METH_VARARGS|METH_KEYWORDS},
- {"getstate", (PyCFunction)incrementalnewlinedecoder_getstate, METH_NOARGS},
- {"setstate", (PyCFunction)incrementalnewlinedecoder_setstate, METH_O},
- {"reset", (PyCFunction)incrementalnewlinedecoder_reset, METH_NOARGS},
- {NULL}
-};
-
-static PyGetSetDef incrementalnewlinedecoder_getset[] = {
- {"newlines", (getter)incrementalnewlinedecoder_newlines_get, NULL, NULL},
- {NULL}
-};
-
-PyTypeObject PyIncrementalNewlineDecoder_Type = {
- PyVarObject_HEAD_INIT(NULL, 0)
- "_io.IncrementalNewlineDecoder", /*tp_name*/
- sizeof(nldecoder_object), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- (destructor)incrementalnewlinedecoder_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- 0, /*tp_getattr*/
- 0, /*tp_setattr*/
- 0, /*tp_compare */
- 0, /*tp_repr*/
- 0, /*tp_as_number*/
- 0, /*tp_as_sequence*/
- 0, /*tp_as_mapping*/
- 0, /*tp_hash */
- 0, /*tp_call*/
- 0, /*tp_str*/
- 0, /*tp_getattro*/
- 0, /*tp_setattro*/
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
- incrementalnewlinedecoder_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /*tp_weaklistoffset*/
- 0, /* tp_iter */
- 0, /* tp_iternext */
- incrementalnewlinedecoder_methods, /* tp_methods */
- 0, /* tp_members */
- incrementalnewlinedecoder_getset, /* tp_getset */
- 0, /* tp_base */
- 0, /* tp_dict */
- 0, /* tp_descr_get */
- 0, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)incrementalnewlinedecoder_init, /* tp_init */
- 0, /* tp_alloc */
- PyType_GenericNew, /* tp_new */
-};
-
-
/* TextIOWrapper */
-PyDoc_STRVAR(textiowrapper_doc,
- "Character and line based layer over a BufferedIOBase object, buffer.\n"
- "\n"
- "encoding gives the name of the encoding that the stream will be\n"
- "decoded or encoded with. It defaults to locale.getpreferredencoding(False).\n"
- "\n"
- "errors determines the strictness of encoding and decoding (see\n"
- "help(codecs.Codec) or the documentation for codecs.register) and\n"
- "defaults to \"strict\".\n"
- "\n"
- "newline controls how line endings are handled. It can be None, '',\n"
- "'\\n', '\\r', and '\\r\\n'. It works as follows:\n"
- "\n"
- "* On input, if newline is None, universal newlines mode is\n"
- " enabled. Lines in the input can end in '\\n', '\\r', or '\\r\\n', and\n"
- " these are translated into '\\n' before being returned to the\n"
- " caller. If it is '', universal newline mode is enabled, but line\n"
- " endings are returned to the caller untranslated. If it has any of\n"
- " the other legal values, input lines are only terminated by the given\n"
- " string, and the line ending is returned to the caller untranslated.\n"
- "\n"
- "* On output, if newline is None, any '\\n' characters written are\n"
- " translated to the system default line separator, os.linesep. If\n"
- " newline is '' or '\\n', no translation takes place. If newline is any\n"
- " of the other legal values, any '\\n' characters written are translated\n"
- " to the given string.\n"
- "\n"
- "If line_buffering is True, a call to flush is implied when a call to\n"
- "write contains a newline character."
- );
-
typedef PyObject *
(*encodefunc_t)(PyObject *, PyObject *);
@@ -742,7 +686,6 @@ typedef struct
PyObject *dict;
} textio;
-
/* A couple of specialized cases in order to bypass the slow incremental
encoding methods for the most popular encodings. */
@@ -843,28 +786,59 @@ static encodefuncentry encodefuncs[] = {
};
+/*[clinic input]
+_io.TextIOWrapper.__init__
+ buffer: object
+ encoding: str(accept={str, NoneType}) = NULL
+ errors: str(accept={str, NoneType}) = NULL
+ newline: str(accept={str, NoneType}) = NULL
+ line_buffering: int(c_default="0") = False
+ write_through: int(c_default="0") = False
+
+Character and line based layer over a BufferedIOBase object, buffer.
+
+encoding gives the name of the encoding that the stream will be
+decoded or encoded with. It defaults to locale.getpreferredencoding(False).
+
+errors determines the strictness of encoding and decoding (see
+help(codecs.Codec) or the documentation for codecs.register) and
+defaults to "strict".
+
+newline controls how line endings are handled. It can be None, '',
+'\n', '\r', and '\r\n'. It works as follows:
+
+* On input, if newline is None, universal newlines mode is
+ enabled. Lines in the input can end in '\n', '\r', or '\r\n', and
+ these are translated into '\n' before being returned to the
+ caller. If it is '', universal newline mode is enabled, but line
+ endings are returned to the caller untranslated. If it has any of
+ the other legal values, input lines are only terminated by the given
+ string, and the line ending is returned to the caller untranslated.
+
+* On output, if newline is None, any '\n' characters written are
+ translated to the system default line separator, os.linesep. If
+ newline is '' or '\n', no translation takes place. If newline is any
+ of the other legal values, any '\n' characters written are translated
+ to the given string.
+
+If line_buffering is True, a call to flush is implied when a call to
+write contains a newline character.
+[clinic start generated code]*/
+
static int
-textiowrapper_init(textio *self, PyObject *args, PyObject *kwds)
-{
- char *kwlist[] = {"buffer", "encoding", "errors",
- "newline", "line_buffering", "write_through",
- NULL};
- PyObject *buffer, *raw, *codec_info = NULL;
- char *encoding = NULL;
- char *errors = NULL;
- char *newline = NULL;
- int line_buffering = 0, write_through = 0;
+_io_TextIOWrapper___init___impl(textio *self, PyObject *buffer,
+ const char *encoding, const char *errors,
+ const char *newline, int line_buffering,
+ int write_through)
+/*[clinic end generated code: output=56a83402ce2a8381 input=3126cb3101a2c99b]*/
+{
+ PyObject *raw, *codec_info = NULL;
_PyIO_State *state = NULL;
-
PyObject *res;
int r;
self->ok = 0;
self->detached = 0;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|zzzii:fileio",
- kwlist, &buffer, &encoding, &errors,
- &newline, &line_buffering, &write_through))
- return -1;
if (newline && newline[0] != '\0'
&& !(newline[0] == '\n' && newline[1] == '\0')
@@ -1021,8 +995,7 @@ textiowrapper_init(textio *self, PyObject *args, PyObject *kwds)
"Oi", self->decoder, (int)self->readtranslate);
if (incrementalDecoder == NULL)
goto error;
- Py_CLEAR(self->decoder);
- self->decoder = incrementalDecoder;
+ Py_XSETREF(self->decoder, incrementalDecoder);
}
}
@@ -1244,8 +1217,13 @@ textiowrapper_closed_get(textio *self, void *context);
}
+/*[clinic input]
+_io.TextIOWrapper.detach
+[clinic start generated code]*/
+
static PyObject *
-textiowrapper_detach(textio *self)
+_io_TextIOWrapper_detach_impl(textio *self)
+/*[clinic end generated code: output=7ba3715cd032d5f2 input=e5a71fbda9e1d9f9]*/
{
PyObject *buffer, *res;
CHECK_ATTACHED(self);
@@ -1290,25 +1268,26 @@ _textiowrapper_writeflush(textio *self)
return 0;
}
+/*[clinic input]
+_io.TextIOWrapper.write
+ text: unicode
+ /
+[clinic start generated code]*/
+
static PyObject *
-textiowrapper_write(textio *self, PyObject *args)
+_io_TextIOWrapper_write_impl(textio *self, PyObject *text)
+/*[clinic end generated code: output=d2deb0d50771fcec input=fdf19153584a0e44]*/
{
PyObject *ret;
- PyObject *text; /* owned reference */
PyObject *b;
Py_ssize_t textlen;
int haslf = 0;
int needflush = 0, text_needflush = 0;
- CHECK_ATTACHED(self);
-
- if (!PyArg_ParseTuple(args, "U:write", &text)) {
- return NULL;
- }
-
if (PyUnicode_READY(text) == -1)
return NULL;
+ CHECK_ATTACHED(self);
CHECK_CLOSED(self);
if (self->encoder == NULL)
@@ -1394,8 +1373,7 @@ textiowrapper_write(textio *self, PyObject *args)
static void
textiowrapper_set_decoded_chars(textio *self, PyObject *chars)
{
- Py_CLEAR(self->decoded_chars);
- self->decoded_chars = chars;
+ Py_XSETREF(self->decoded_chars, chars);
self->decoded_chars_used = 0;
}
@@ -1441,6 +1419,7 @@ textiowrapper_read_chunk(textio *self, Py_ssize_t size_hint)
PyObject *dec_buffer = NULL;
PyObject *dec_flags = NULL;
PyObject *input_chunk = NULL;
+ Py_buffer input_chunk_buf;
PyObject *decoded_chars, *chunk_size;
Py_ssize_t nbytes, nchars;
int eof;
@@ -1468,7 +1447,16 @@ textiowrapper_read_chunk(textio *self, Py_ssize_t size_hint)
/* Given this, we know there was a valid snapshot point
* len(dec_buffer) bytes ago with decoder state (b'', dec_flags).
*/
- if (PyArg_Parse(state, "(OO)", &dec_buffer, &dec_flags) < 0) {
+ if (PyArg_ParseTuple(state, "OO", &dec_buffer, &dec_flags) < 0) {
+ Py_DECREF(state);
+ return -1;
+ }
+
+ if (!PyBytes_Check(dec_buffer)) {
+ PyErr_Format(PyExc_TypeError,
+ "decoder getstate() should have returned a bytes "
+ "object, not '%.200s'",
+ Py_TYPE(dec_buffer)->tp_name);
Py_DECREF(state);
return -1;
}
@@ -1484,23 +1472,24 @@ textiowrapper_read_chunk(textio *self, Py_ssize_t size_hint)
chunk_size = PyLong_FromSsize_t(Py_MAX(self->chunk_size, size_hint));
if (chunk_size == NULL)
goto fail;
+
input_chunk = PyObject_CallMethodObjArgs(self->buffer,
(self->has_read1 ? _PyIO_str_read1: _PyIO_str_read),
chunk_size, NULL);
Py_DECREF(chunk_size);
if (input_chunk == NULL)
goto fail;
- if (!PyBytes_Check(input_chunk)) {
+
+ if (PyObject_GetBuffer(input_chunk, &input_chunk_buf, 0) != 0) {
PyErr_Format(PyExc_TypeError,
- "underlying %s() should have returned a bytes object, "
+ "underlying %s() should have returned a bytes-like object, "
"not '%.200s'", (self->has_read1 ? "read1": "read"),
Py_TYPE(input_chunk)->tp_name);
goto fail;
}
- nbytes = PyBytes_Size(input_chunk);
+ nbytes = input_chunk_buf.len;
eof = (nbytes == 0);
-
if (Py_TYPE(self->decoder) == &PyIncrementalNewlineDecoder_Type) {
decoded_chars = _PyIncrementalNewlineDecoder_decode(
self->decoder, input_chunk, eof);
@@ -1509,6 +1498,7 @@ textiowrapper_read_chunk(textio *self, Py_ssize_t size_hint)
decoded_chars = PyObject_CallMethodObjArgs(self->decoder,
_PyIO_str_decode, input_chunk, eof ? Py_True : Py_False, NULL);
}
+ PyBuffer_Release(&input_chunk_buf);
if (check_decoded(decoded_chars) < 0)
goto fail;
@@ -1525,20 +1515,13 @@ textiowrapper_read_chunk(textio *self, Py_ssize_t size_hint)
/* At the snapshot point, len(dec_buffer) bytes before the read, the
* next input to be decoded is dec_buffer + input_chunk.
*/
- PyObject *next_input = PyNumber_Add(dec_buffer, input_chunk);
- if (next_input == NULL)
- goto fail;
- if (!PyBytes_Check(next_input)) {
- PyErr_Format(PyExc_TypeError,
- "decoder getstate() should have returned a bytes "
- "object, not '%.200s'",
- Py_TYPE(next_input)->tp_name);
- Py_DECREF(next_input);
+ PyObject *next_input = dec_buffer;
+ PyBytes_Concat(&next_input, input_chunk);
+ if (next_input == NULL) {
+ dec_buffer = NULL; /* Reference lost to PyBytes_Concat */
goto fail;
}
- Py_DECREF(dec_buffer);
- Py_CLEAR(self->snapshot);
- self->snapshot = Py_BuildValue("NN", dec_flags, next_input);
+ Py_XSETREF(self->snapshot, Py_BuildValue("NN", dec_flags, next_input));
}
Py_DECREF(input_chunk);
@@ -1551,17 +1534,19 @@ textiowrapper_read_chunk(textio *self, Py_ssize_t size_hint)
return -1;
}
+/*[clinic input]
+_io.TextIOWrapper.read
+ size as n: io_ssize_t = -1
+ /
+[clinic start generated code]*/
+
static PyObject *
-textiowrapper_read(textio *self, PyObject *args)
+_io_TextIOWrapper_read_impl(textio *self, Py_ssize_t n)
+/*[clinic end generated code: output=7e651ce6cc6a25a6 input=8c09398424085cca]*/
{
- Py_ssize_t n = -1;
PyObject *result = NULL, *chunks = NULL;
CHECK_ATTACHED(self);
-
- if (!PyArg_ParseTuple(args, "|O&:read", &_PyIO_ConvertSsize_t, &n))
- return NULL;
-
CHECK_CLOSED(self);
if (self->decoder == NULL)
@@ -1642,8 +1627,7 @@ textiowrapper_read(textio *self, PyObject *args)
if (chunks != NULL) {
if (result != NULL && PyList_Append(chunks, result) < 0)
goto fail;
- Py_CLEAR(result);
- result = PyUnicode_Join(_PyIO_empty_str, chunks);
+ Py_XSETREF(result, PyUnicode_Join(_PyIO_empty_str, chunks));
if (result == NULL)
goto fail;
Py_CLEAR(chunks);
@@ -1725,7 +1709,7 @@ _PyIO_find_line_ending(
else {
/* Non-universal mode. */
Py_ssize_t readnl_len = PyUnicode_GET_LENGTH(readnl);
- char *nl = PyUnicode_DATA(readnl);
+ Py_UCS1 *nl = PyUnicode_1BYTE_DATA(readnl);
/* Assume that readnl is an ASCII character. */
assert(PyUnicode_KIND(readnl) == PyUnicode_1BYTE_KIND);
if (readnl_len == 1) {
@@ -1927,16 +1911,18 @@ _textiowrapper_readline(textio *self, Py_ssize_t limit)
return NULL;
}
+/*[clinic input]
+_io.TextIOWrapper.readline
+ size: Py_ssize_t = -1
+ /
+[clinic start generated code]*/
+
static PyObject *
-textiowrapper_readline(textio *self, PyObject *args)
+_io_TextIOWrapper_readline_impl(textio *self, Py_ssize_t size)
+/*[clinic end generated code: output=344afa98804e8b25 input=56c7172483b36db6]*/
{
- Py_ssize_t limit = -1;
-
CHECK_ATTACHED(self);
- if (!PyArg_ParseTuple(args, "|n:readline", &limit)) {
- return NULL;
- }
- return _textiowrapper_readline(self, limit);
+ return _textiowrapper_readline(self, size);
}
/* Seek and Tell */
@@ -2068,19 +2054,23 @@ _textiowrapper_encoder_setstate(textio *self, cookie_type *cookie)
self, cookie->start_pos == 0 && cookie->dec_flags == 0);
}
+/*[clinic input]
+_io.TextIOWrapper.seek
+ cookie as cookieObj: object
+ whence: int = 0
+ /
+[clinic start generated code]*/
+
static PyObject *
-textiowrapper_seek(textio *self, PyObject *args)
+_io_TextIOWrapper_seek_impl(textio *self, PyObject *cookieObj, int whence)
+/*[clinic end generated code: output=0a15679764e2d04d input=0458abeb3d7842be]*/
{
- PyObject *cookieObj, *posobj;
+ PyObject *posobj;
cookie_type cookie;
- int whence = 0;
PyObject *res;
int cmp;
CHECK_ATTACHED(self);
-
- if (!PyArg_ParseTuple(args, "O|i:seek", &cookieObj, &whence))
- return NULL;
CHECK_CLOSED(self);
Py_INCREF(cookieObj);
@@ -2252,8 +2242,13 @@ textiowrapper_seek(textio *self, PyObject *args)
}
+/*[clinic input]
+_io.TextIOWrapper.tell
+[clinic start generated code]*/
+
static PyObject *
-textiowrapper_tell(textio *self, PyObject *args)
+_io_TextIOWrapper_tell_impl(textio *self)
+/*[clinic end generated code: output=4f168c08bf34ad5f input=9a2caf88c24f9ddf]*/
{
PyObject *res;
PyObject *posobj = NULL;
@@ -2263,7 +2258,6 @@ textiowrapper_tell(textio *self, PyObject *args)
Py_ssize_t skip_bytes, skip_back;
PyObject *saved_state = NULL;
char *input, *input_end;
- char *dec_buffer;
Py_ssize_t dec_buffer_len;
int dec_flags;
@@ -2306,7 +2300,7 @@ textiowrapper_tell(textio *self, PyObject *args)
goto fail;
/* Skip backward to the snapshot point (see _read_chunk). */
- if (!PyArg_Parse(self->snapshot, "(iO)", &cookie.dec_flags, &next_input))
+ if (!PyArg_ParseTuple(self->snapshot, "iO", &cookie.dec_flags, &next_input))
goto fail;
assert (PyBytes_Check(next_input));
@@ -2328,14 +2322,24 @@ textiowrapper_tell(textio *self, PyObject *args)
goto fail;
#define DECODER_GETSTATE() do { \
+ PyObject *dec_buffer; \
PyObject *_state = PyObject_CallMethodObjArgs(self->decoder, \
_PyIO_str_getstate, NULL); \
if (_state == NULL) \
goto fail; \
- if (!PyArg_Parse(_state, "(y#i)", &dec_buffer, &dec_buffer_len, &dec_flags)) { \
+ if (!PyArg_ParseTuple(_state, "Oi", &dec_buffer, &dec_flags)) { \
Py_DECREF(_state); \
goto fail; \
} \
+ if (!PyBytes_Check(dec_buffer)) { \
+ PyErr_Format(PyExc_TypeError, \
+ "decoder getstate() should have returned a bytes " \
+ "object, not '%.200s'", \
+ Py_TYPE(dec_buffer)->tp_name); \
+ Py_DECREF(_state); \
+ goto fail; \
+ } \
+ dec_buffer_len = PyBytes_GET_SIZE(dec_buffer); \
Py_DECREF(_state); \
} while (0)
@@ -2460,16 +2464,19 @@ fail:
return NULL;
}
+/*[clinic input]
+_io.TextIOWrapper.truncate
+ pos: object = None
+ /
+[clinic start generated code]*/
+
static PyObject *
-textiowrapper_truncate(textio *self, PyObject *args)
+_io_TextIOWrapper_truncate_impl(textio *self, PyObject *pos)
+/*[clinic end generated code: output=90ec2afb9bb7745f input=56ec8baa65aea377]*/
{
- PyObject *pos = Py_None;
PyObject *res;
CHECK_ATTACHED(self)
- if (!PyArg_ParseTuple(args, "|O:truncate", &pos)) {
- return NULL;
- }
res = PyObject_CallMethodObjArgs((PyObject *) self, _PyIO_str_flush, NULL);
if (res == NULL)
@@ -2534,36 +2541,61 @@ error:
/* Inquiries */
+/*[clinic input]
+_io.TextIOWrapper.fileno
+[clinic start generated code]*/
+
static PyObject *
-textiowrapper_fileno(textio *self, PyObject *args)
+_io_TextIOWrapper_fileno_impl(textio *self)
+/*[clinic end generated code: output=21490a4c3da13e6c input=c488ca83d0069f9b]*/
{
CHECK_ATTACHED(self);
return _PyObject_CallMethodId(self->buffer, &PyId_fileno, NULL);
}
+/*[clinic input]
+_io.TextIOWrapper.seekable
+[clinic start generated code]*/
+
static PyObject *
-textiowrapper_seekable(textio *self, PyObject *args)
+_io_TextIOWrapper_seekable_impl(textio *self)
+/*[clinic end generated code: output=ab223dbbcffc0f00 input=8b005ca06e1fca13]*/
{
CHECK_ATTACHED(self);
return _PyObject_CallMethodId(self->buffer, &PyId_seekable, NULL);
}
+/*[clinic input]
+_io.TextIOWrapper.readable
+[clinic start generated code]*/
+
static PyObject *
-textiowrapper_readable(textio *self, PyObject *args)
+_io_TextIOWrapper_readable_impl(textio *self)
+/*[clinic end generated code: output=72ff7ba289a8a91b input=0704ea7e01b0d3eb]*/
{
CHECK_ATTACHED(self);
return _PyObject_CallMethodId(self->buffer, &PyId_readable, NULL);
}
+/*[clinic input]
+_io.TextIOWrapper.writable
+[clinic start generated code]*/
+
static PyObject *
-textiowrapper_writable(textio *self, PyObject *args)
+_io_TextIOWrapper_writable_impl(textio *self)
+/*[clinic end generated code: output=a728c71790d03200 input=c41740bc9d8636e8]*/
{
CHECK_ATTACHED(self);
return _PyObject_CallMethodId(self->buffer, &PyId_writable, NULL);
}
+/*[clinic input]
+_io.TextIOWrapper.isatty
+[clinic start generated code]*/
+
static PyObject *
-textiowrapper_isatty(textio *self, PyObject *args)
+_io_TextIOWrapper_isatty_impl(textio *self)
+/*[clinic end generated code: output=12be1a35bace882e input=fb68d9f2c99bbfff]*/
{
CHECK_ATTACHED(self);
return _PyObject_CallMethodId(self->buffer, &PyId_isatty, NULL);
@@ -2577,8 +2609,13 @@ textiowrapper_getstate(textio *self, PyObject *args)
return NULL;
}
+/*[clinic input]
+_io.TextIOWrapper.flush
+[clinic start generated code]*/
+
static PyObject *
-textiowrapper_flush(textio *self, PyObject *args)
+_io_TextIOWrapper_flush_impl(textio *self)
+/*[clinic end generated code: output=59de9165f9c2e4d2 input=928c60590694ab85]*/
{
CHECK_ATTACHED(self);
CHECK_CLOSED(self);
@@ -2588,8 +2625,13 @@ textiowrapper_flush(textio *self, PyObject *args)
return _PyObject_CallMethodId(self->buffer, &PyId_flush, NULL);
}
+/*[clinic input]
+_io.TextIOWrapper.close
+[clinic start generated code]*/
+
static PyObject *
-textiowrapper_close(textio *self, PyObject *args)
+_io_TextIOWrapper_close_impl(textio *self)
+/*[clinic end generated code: output=056ccf8b4876e4f4 input=9c2114315eae1948]*/
{
PyObject *res;
int r;
@@ -2733,24 +2775,81 @@ textiowrapper_chunk_size_set(textio *self, PyObject *arg, void *context)
return 0;
}
+#include "clinic/textio.c.h"
+
+static PyMethodDef incrementalnewlinedecoder_methods[] = {
+ _IO_INCREMENTALNEWLINEDECODER_DECODE_METHODDEF
+ _IO_INCREMENTALNEWLINEDECODER_GETSTATE_METHODDEF
+ _IO_INCREMENTALNEWLINEDECODER_SETSTATE_METHODDEF
+ _IO_INCREMENTALNEWLINEDECODER_RESET_METHODDEF
+ {NULL}
+};
+
+static PyGetSetDef incrementalnewlinedecoder_getset[] = {
+ {"newlines", (getter)incrementalnewlinedecoder_newlines_get, NULL, NULL},
+ {NULL}
+};
+
+PyTypeObject PyIncrementalNewlineDecoder_Type = {
+ PyVarObject_HEAD_INIT(NULL, 0)
+ "_io.IncrementalNewlineDecoder", /*tp_name*/
+ sizeof(nldecoder_object), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ (destructor)incrementalnewlinedecoder_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ 0, /*tp_compare */
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash */
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
+ _io_IncrementalNewlineDecoder___init____doc__, /* tp_doc */
+ 0, /* tp_traverse */
+ 0, /* tp_clear */
+ 0, /* tp_richcompare */
+ 0, /*tp_weaklistoffset*/
+ 0, /* tp_iter */
+ 0, /* tp_iternext */
+ incrementalnewlinedecoder_methods, /* tp_methods */
+ 0, /* tp_members */
+ incrementalnewlinedecoder_getset, /* tp_getset */
+ 0, /* tp_base */
+ 0, /* tp_dict */
+ 0, /* tp_descr_get */
+ 0, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ _io_IncrementalNewlineDecoder___init__, /* tp_init */
+ 0, /* tp_alloc */
+ PyType_GenericNew, /* tp_new */
+};
+
+
static PyMethodDef textiowrapper_methods[] = {
- {"detach", (PyCFunction)textiowrapper_detach, METH_NOARGS},
- {"write", (PyCFunction)textiowrapper_write, METH_VARARGS},
- {"read", (PyCFunction)textiowrapper_read, METH_VARARGS},
- {"readline", (PyCFunction)textiowrapper_readline, METH_VARARGS},
- {"flush", (PyCFunction)textiowrapper_flush, METH_NOARGS},
- {"close", (PyCFunction)textiowrapper_close, METH_NOARGS},
-
- {"fileno", (PyCFunction)textiowrapper_fileno, METH_NOARGS},
- {"seekable", (PyCFunction)textiowrapper_seekable, METH_NOARGS},
- {"readable", (PyCFunction)textiowrapper_readable, METH_NOARGS},
- {"writable", (PyCFunction)textiowrapper_writable, METH_NOARGS},
- {"isatty", (PyCFunction)textiowrapper_isatty, METH_NOARGS},
+ _IO_TEXTIOWRAPPER_DETACH_METHODDEF
+ _IO_TEXTIOWRAPPER_WRITE_METHODDEF
+ _IO_TEXTIOWRAPPER_READ_METHODDEF
+ _IO_TEXTIOWRAPPER_READLINE_METHODDEF
+ _IO_TEXTIOWRAPPER_FLUSH_METHODDEF
+ _IO_TEXTIOWRAPPER_CLOSE_METHODDEF
+
+ _IO_TEXTIOWRAPPER_FILENO_METHODDEF
+ _IO_TEXTIOWRAPPER_SEEKABLE_METHODDEF
+ _IO_TEXTIOWRAPPER_READABLE_METHODDEF
+ _IO_TEXTIOWRAPPER_WRITABLE_METHODDEF
+ _IO_TEXTIOWRAPPER_ISATTY_METHODDEF
{"__getstate__", (PyCFunction)textiowrapper_getstate, METH_NOARGS},
- {"seek", (PyCFunction)textiowrapper_seek, METH_VARARGS},
- {"tell", (PyCFunction)textiowrapper_tell, METH_NOARGS},
- {"truncate", (PyCFunction)textiowrapper_truncate, METH_VARARGS},
+ _IO_TEXTIOWRAPPER_SEEK_METHODDEF
+ _IO_TEXTIOWRAPPER_TELL_METHODDEF
+ _IO_TEXTIOWRAPPER_TRUNCATE_METHODDEF
{NULL, NULL}
};
@@ -2796,7 +2895,7 @@ PyTypeObject PyTextIOWrapper_Type = {
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE
| Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
- textiowrapper_doc, /* tp_doc */
+ _io_TextIOWrapper___init____doc__, /* tp_doc */
(traverseproc)textiowrapper_traverse, /* tp_traverse */
(inquiry)textiowrapper_clear, /* tp_clear */
0, /* tp_richcompare */
@@ -2811,7 +2910,7 @@ PyTypeObject PyTextIOWrapper_Type = {
0, /* tp_descr_get */
0, /* tp_descr_set */
offsetof(textio, dict), /*tp_dictoffset*/
- (initproc)textiowrapper_init, /* tp_init */
+ _io_TextIOWrapper___init__, /* tp_init */
0, /* tp_alloc */
PyType_GenericNew, /* tp_new */
0, /* tp_free */
diff --git a/Modules/_json.c b/Modules/_json.c
index dded2c965b..f82af347cb 100644
--- a/Modules/_json.c
+++ b/Modules/_json.c
@@ -47,7 +47,7 @@ typedef struct _PyEncoderObject {
PyObject *item_separator;
PyObject *sort_keys;
PyObject *skipkeys;
- int fast_encode;
+ PyCFunction fast_encode;
int allow_nan;
} PyEncoderObject;
@@ -116,8 +116,6 @@ raise_errmsg(char *msg, PyObject *s, Py_ssize_t end);
static PyObject *
encoder_encode_string(PyEncoderObject *s, PyObject *obj);
static PyObject *
-encoder_encode_long(PyEncoderObject* s UNUSED, PyObject *obj);
-static PyObject *
encoder_encode_float(PyEncoderObject *s, PyObject *obj);
#define S_CHAR(c) (c >= ' ' && c <= '~' && c != '\\' && c != '"')
@@ -225,26 +223,122 @@ ascii_escape_unicode(PyObject *pystr)
return rval;
}
+static PyObject *
+escape_unicode(PyObject *pystr)
+{
+ /* Take a PyUnicode pystr and return a new escaped PyUnicode */
+ Py_ssize_t i;
+ Py_ssize_t input_chars;
+ Py_ssize_t output_size;
+ Py_ssize_t chars;
+ PyObject *rval;
+ void *input;
+ int kind;
+ Py_UCS4 maxchar;
+
+ if (PyUnicode_READY(pystr) == -1)
+ return NULL;
+
+ maxchar = PyUnicode_MAX_CHAR_VALUE(pystr);
+ input_chars = PyUnicode_GET_LENGTH(pystr);
+ input = PyUnicode_DATA(pystr);
+ kind = PyUnicode_KIND(pystr);
+
+ /* Compute the output size */
+ for (i = 0, output_size = 2; i < input_chars; i++) {
+ Py_UCS4 c = PyUnicode_READ(kind, input, i);
+ Py_ssize_t d;
+ switch (c) {
+ case '\\': case '"': case '\b': case '\f':
+ case '\n': case '\r': case '\t':
+ d = 2;
+ break;
+ default:
+ if (c <= 0x1f)
+ d = 6;
+ else
+ d = 1;
+ }
+ if (output_size > PY_SSIZE_T_MAX - d) {
+ PyErr_SetString(PyExc_OverflowError, "string is too long to escape");
+ return NULL;
+ }
+ output_size += d;
+ }
+
+ rval = PyUnicode_New(output_size, maxchar);
+ if (rval == NULL)
+ return NULL;
+
+ kind = PyUnicode_KIND(rval);
+
+#define ENCODE_OUTPUT do { \
+ chars = 0; \
+ output[chars++] = '"'; \
+ for (i = 0; i < input_chars; i++) { \
+ Py_UCS4 c = PyUnicode_READ(kind, input, i); \
+ switch (c) { \
+ case '\\': output[chars++] = '\\'; output[chars++] = c; break; \
+ case '"': output[chars++] = '\\'; output[chars++] = c; break; \
+ case '\b': output[chars++] = '\\'; output[chars++] = 'b'; break; \
+ case '\f': output[chars++] = '\\'; output[chars++] = 'f'; break; \
+ case '\n': output[chars++] = '\\'; output[chars++] = 'n'; break; \
+ case '\r': output[chars++] = '\\'; output[chars++] = 'r'; break; \
+ case '\t': output[chars++] = '\\'; output[chars++] = 't'; break; \
+ default: \
+ if (c <= 0x1f) { \
+ output[chars++] = '\\'; \
+ output[chars++] = 'u'; \
+ output[chars++] = '0'; \
+ output[chars++] = '0'; \
+ output[chars++] = Py_hexdigits[(c >> 4) & 0xf]; \
+ output[chars++] = Py_hexdigits[(c ) & 0xf]; \
+ } else { \
+ output[chars++] = c; \
+ } \
+ } \
+ } \
+ output[chars++] = '"'; \
+ } while (0)
+
+ if (kind == PyUnicode_1BYTE_KIND) {
+ Py_UCS1 *output = PyUnicode_1BYTE_DATA(rval);
+ ENCODE_OUTPUT;
+ } else if (kind == PyUnicode_2BYTE_KIND) {
+ Py_UCS2 *output = PyUnicode_2BYTE_DATA(rval);
+ ENCODE_OUTPUT;
+ } else {
+ Py_UCS4 *output = PyUnicode_4BYTE_DATA(rval);
+ assert(kind == PyUnicode_4BYTE_KIND);
+ ENCODE_OUTPUT;
+ }
+#undef ENCODE_OUTPUT
+
+#ifdef Py_DEBUG
+ assert(_PyUnicode_CheckConsistency(rval, 1));
+#endif
+ return rval;
+}
+
static void
raise_errmsg(char *msg, PyObject *s, Py_ssize_t end)
{
- /* Use the Python function json.decoder.errmsg to raise a nice
- looking ValueError exception */
- static PyObject *errmsg_fn = NULL;
- PyObject *pymsg;
- if (errmsg_fn == NULL) {
+ /* Use JSONDecodeError exception to raise a nice looking ValueError subclass */
+ static PyObject *JSONDecodeError = NULL;
+ PyObject *exc;
+ if (JSONDecodeError == NULL) {
PyObject *decoder = PyImport_ImportModule("json.decoder");
if (decoder == NULL)
return;
- errmsg_fn = PyObject_GetAttrString(decoder, "errmsg");
+ JSONDecodeError = PyObject_GetAttrString(decoder, "JSONDecodeError");
Py_DECREF(decoder);
- if (errmsg_fn == NULL)
+ if (JSONDecodeError == NULL)
return;
}
- pymsg = PyObject_CallFunction(errmsg_fn, "(zOn)", msg, s, end);
- if (pymsg) {
- PyErr_SetObject(PyExc_ValueError, pymsg);
- Py_DECREF(pymsg);
+ exc = PyObject_CallFunction(JSONDecodeError, "(zOn)", msg, s, end);
+ if (exc) {
+ PyErr_SetObject(JSONDecodeError, exc);
+ Py_DECREF(exc);
}
}
@@ -537,6 +631,31 @@ py_encode_basestring_ascii(PyObject* self UNUSED, PyObject *pystr)
return rval;
}
+
+PyDoc_STRVAR(pydoc_encode_basestring,
+ "encode_basestring(string) -> string\n"
+ "\n"
+ "Return a JSON representation of a Python string"
+);
+
+static PyObject *
+py_encode_basestring(PyObject* self UNUSED, PyObject *pystr)
+{
+ PyObject *rval;
+ /* Return a JSON representation of a Python string */
+ /* METH_O */
+ if (PyUnicode_Check(pystr)) {
+ rval = escape_unicode(pystr);
+ }
+ else {
+ PyErr_Format(PyExc_TypeError,
+ "first argument must be a string, not %.80s",
+ Py_TYPE(pystr)->tp_name);
+ return NULL;
+ }
+ return rval;
+}
+
static void
scanner_dealloc(PyObject *self)
{
@@ -715,7 +834,7 @@ bail:
static PyObject *
_parse_array_unicode(PyScannerObject *s, PyObject *pystr, Py_ssize_t idx, Py_ssize_t *next_idx_ptr) {
- /* Read a JSON array from PyString pystr.
+ /* Read a JSON array from PyUnicode pystr.
idx is the index of the first character after the opening brace.
*next_idx_ptr is a return-by-reference index to the first character after
the closing brace.
@@ -787,8 +906,8 @@ bail:
}
static PyObject *
-_parse_constant(PyScannerObject *s, char *constant, Py_ssize_t idx, Py_ssize_t *next_idx_ptr) {
- /* Read a JSON constant from PyString pystr.
+_parse_constant(PyScannerObject *s, const char *constant, Py_ssize_t idx, Py_ssize_t *next_idx_ptr) {
+ /* Read a JSON constant.
constant is the constant string that was found
("NaN", "Infinity", "-Infinity").
idx is the index of the first character of the constant
@@ -820,7 +939,7 @@ _match_number_unicode(PyScannerObject *s, PyObject *pystr, Py_ssize_t start, Py_
the number.
Returns a new PyObject representation of that number:
- PyInt, PyLong, or PyFloat.
+ PyLong, or PyFloat.
May return other types if parse_int or parse_float are set
*/
void *str;
@@ -1244,7 +1363,14 @@ encoder_init(PyObject *self, PyObject *args, PyObject *kwds)
s->item_separator = item_separator;
s->sort_keys = sort_keys;
s->skipkeys = skipkeys;
- s->fast_encode = (PyCFunction_Check(s->encoder) && PyCFunction_GetFunction(s->encoder) == (PyCFunction)py_encode_basestring_ascii);
+ s->fast_encode = NULL;
+ if (PyCFunction_Check(s->encoder)) {
+ PyCFunction f = PyCFunction_GetFunction(s->encoder);
+ if (f == (PyCFunction)py_encode_basestring_ascii ||
+ f == (PyCFunction)py_encode_basestring) {
+ s->fast_encode = f;
+ }
+ }
s->allow_nan = allow_nan;
Py_INCREF(s->markers);
@@ -1317,38 +1443,9 @@ _encoded_const(PyObject *obj)
}
static PyObject *
-encoder_encode_long(PyEncoderObject* s UNUSED, PyObject *obj)
-{
- /* Return the JSON representation of a PyLong and PyLong subclasses.
- Calls int() on PyLong subclasses in case the str() was changed.
- Added specifically to deal with IntEnum. See Issue18264. */
- PyObject *encoded, *longobj;
- if (PyLong_CheckExact(obj)) {
- encoded = PyObject_Str(obj);
- }
- else {
- longobj = PyNumber_Long(obj);
- if (longobj == NULL) {
- PyErr_SetString(
- PyExc_ValueError,
- "Unable to coerce int subclass to int"
- );
- return NULL;
- }
- encoded = PyObject_Str(longobj);
- Py_DECREF(longobj);
- }
- return encoded;
-}
-
-
-static PyObject *
encoder_encode_float(PyEncoderObject *s, PyObject *obj)
{
- /* Return the JSON representation of a PyFloat.
- Modified to call float() on float subclasses in case the subclass
- changes the repr. See Issue18264. */
- PyObject *encoded, *floatobj;
+ /* Return the JSON representation of a PyFloat. */
double i = PyFloat_AS_DOUBLE(obj);
if (!Py_IS_FINITE(i)) {
if (!s->allow_nan) {
@@ -1368,24 +1465,7 @@ encoder_encode_float(PyEncoderObject *s, PyObject *obj)
return PyUnicode_FromString("NaN");
}
}
- /* coerce float subclasses to float (primarily for Enum) */
- if (PyFloat_CheckExact(obj)) {
- /* Use a better float format here? */
- encoded = PyObject_Repr(obj);
- }
- else {
- floatobj = PyNumber_Float(obj);
- if (floatobj == NULL) {
- PyErr_SetString(
- PyExc_ValueError,
- "Unable to coerce float subclass to float"
- );
- return NULL;
- }
- encoded = PyObject_Repr(floatobj);
- Py_DECREF(floatobj);
- }
- return encoded;
+ return PyFloat_Type.tp_repr(obj);
}
static PyObject *
@@ -1393,7 +1473,7 @@ encoder_encode_string(PyEncoderObject *s, PyObject *obj)
{
/* Return the JSON representation of a string */
if (s->fast_encode)
- return py_encode_basestring_ascii(NULL, obj);
+ return s->fast_encode(NULL, obj);
else
return PyObject_CallFunctionObjArgs(s->encoder, obj, NULL);
}
@@ -1429,7 +1509,7 @@ encoder_listencode_obj(PyEncoderObject *s, _PyAccu *acc,
return _steal_accumulate(acc, encoded);
}
else if (PyLong_Check(obj)) {
- PyObject *encoded = encoder_encode_long(s, obj);
+ PyObject *encoded = PyLong_Type.tp_str(obj);
if (encoded == NULL)
return -1;
return _steal_accumulate(acc, encoded);
@@ -1594,7 +1674,7 @@ encoder_listencode_dict(PyEncoderObject *s, _PyAccu *acc,
goto bail;
}
else if (PyLong_Check(key)) {
- kstr = encoder_encode_long(s, key);
+ kstr = PyLong_Type.tp_str(key);
if (kstr == NULL) {
goto bail;
}
@@ -1840,6 +1920,10 @@ static PyMethodDef speedups_methods[] = {
(PyCFunction)py_encode_basestring_ascii,
METH_O,
pydoc_encode_basestring_ascii},
+ {"encode_basestring",
+ (PyCFunction)py_encode_basestring,
+ METH_O,
+ pydoc_encode_basestring},
{"scanstring",
(PyCFunction)py_scanstring,
METH_VARARGS,
@@ -1862,7 +1946,7 @@ static struct PyModuleDef jsonmodule = {
NULL
};
-PyObject*
+PyMODINIT_FUNC
PyInit__json(void)
{
PyObject *m = PyModule_Create(&jsonmodule);
diff --git a/Modules/_lsprof.c b/Modules/_lsprof.c
index 0137d95443..66e534f2a8 100644
--- a/Modules/_lsprof.c
+++ b/Modules/_lsprof.c
@@ -202,6 +202,8 @@ normalizeUserObj(PyObject *obj)
*/
PyObject *self = fn->m_self;
PyObject *name = PyUnicode_FromString(fn->m_ml->ml_name);
+ PyObject *modname = fn->m_module;
+
if (name != NULL) {
PyObject *mo = _PyType_Lookup(Py_TYPE(self), name);
Py_XINCREF(mo);
@@ -213,9 +215,14 @@ normalizeUserObj(PyObject *obj)
return res;
}
}
+ /* Otherwise, use __module__ */
PyErr_Clear();
- return PyUnicode_FromFormat("<built-in method %s>",
- fn->m_ml->ml_name);
+ if (modname != NULL && PyUnicode_Check(modname))
+ return PyUnicode_FromFormat("<built-in method %S.%s>",
+ modname, fn->m_ml->ml_name);
+ else
+ return PyUnicode_FromFormat("<built-in method %s>",
+ fn->m_ml->ml_name);
}
}
diff --git a/Modules/_lzmamodule.c b/Modules/_lzmamodule.c
index c43676ab75..846dc0e8ec 100644
--- a/Modules/_lzmamodule.c
+++ b/Modules/_lzmamodule.c
@@ -66,6 +66,9 @@ typedef struct {
int check;
char eof;
PyObject *unused_data;
+ char needs_input;
+ uint8_t *input_buffer;
+ size_t input_buffer_size;
#ifdef WITH_THREAD
PyThread_type_lock lock;
#endif
@@ -142,10 +145,15 @@ PyLzma_Free(void *opaque, void *ptr)
#endif
static int
-grow_buffer(PyObject **buf)
+grow_buffer(PyObject **buf, Py_ssize_t max_length)
{
- size_t size = PyBytes_GET_SIZE(*buf);
- return _PyBytes_Resize(buf, size + (size >> 3) + 6);
+ Py_ssize_t size = PyBytes_GET_SIZE(*buf);
+ Py_ssize_t newsize = size + (size >> 3) + 6;
+
+ if (max_length > 0 && newsize > max_length)
+ newsize = max_length;
+
+ return _PyBytes_Resize(buf, newsize);
}
@@ -470,12 +478,11 @@ error:
/*[clinic input]
-output preset file
module _lzma
class _lzma.LZMACompressor "Compressor *" "&Compressor_type"
class _lzma.LZMADecompressor "Decompressor *" "&Decompressor_type"
[clinic start generated code]*/
-/*[clinic end generated code: output=da39a3ee5e6b4b0d input=f17afc786525d6c2]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=2c14bbe05ff0c147]*/
#include "clinic/_lzmamodule.c.h"
@@ -504,7 +511,7 @@ class lzma_filter_converter(CConverter):
static PyObject *
compress(Compressor *c, uint8_t *data, size_t len, lzma_action action)
{
- size_t data_size = 0;
+ Py_ssize_t data_size = 0;
PyObject *result;
result = PyBytes_FromStringAndSize(NULL, INITIAL_BUFFER_SIZE);
@@ -527,7 +534,7 @@ compress(Compressor *c, uint8_t *data, size_t len, lzma_action action)
(action == LZMA_FINISH && lzret == LZMA_STREAM_END)) {
break;
} else if (c->lzs.avail_out == 0) {
- if (grow_buffer(&result) == -1)
+ if (grow_buffer(&result, -1) == -1)
goto error;
c->lzs.next_out = (uint8_t *)PyBytes_AS_STRING(result) + data_size;
c->lzs.avail_out = PyBytes_GET_SIZE(result) - data_size;
@@ -698,7 +705,7 @@ _lzma.LZMACompressor.__init__
check: int(c_default="-1") = unspecified
The integrity check to use. For FORMAT_XZ, the default
- is CHECK_CRC64. FORMAT_ALONE and FORMAT_RAW do not suport integrity
+ is CHECK_CRC64. FORMAT_ALONE and FORMAT_RAW do not support integrity
checks; for these formats, check must be omitted, or be CHECK_NONE.
preset: object = None
@@ -888,25 +895,33 @@ static PyTypeObject Compressor_type = {
/* LZMADecompressor class. */
-static PyObject *
-decompress(Decompressor *d, uint8_t *data, size_t len)
+/* Decompress data of length d->lzs.avail_in in d->lzs.next_in. The output
+ buffer is allocated dynamically and returned. At most max_length bytes are
+ returned, so some of the input may not be consumed. d->lzs.next_in and
+ d->lzs.avail_in are updated to reflect the consumed input. */
+static PyObject*
+decompress_buf(Decompressor *d, Py_ssize_t max_length)
{
- size_t data_size = 0;
+ Py_ssize_t data_size = 0;
PyObject *result;
+ lzma_stream *lzs = &d->lzs;
- result = PyBytes_FromStringAndSize(NULL, INITIAL_BUFFER_SIZE);
+ if (max_length < 0 || max_length >= INITIAL_BUFFER_SIZE)
+ result = PyBytes_FromStringAndSize(NULL, INITIAL_BUFFER_SIZE);
+ else
+ result = PyBytes_FromStringAndSize(NULL, max_length);
if (result == NULL)
return NULL;
- d->lzs.next_in = data;
- d->lzs.avail_in = len;
- d->lzs.next_out = (uint8_t *)PyBytes_AS_STRING(result);
- d->lzs.avail_out = PyBytes_GET_SIZE(result);
+
+ lzs->next_out = (uint8_t *)PyBytes_AS_STRING(result);
+ lzs->avail_out = PyBytes_GET_SIZE(result);
+
for (;;) {
lzma_ret lzret;
Py_BEGIN_ALLOW_THREADS
- lzret = lzma_code(&d->lzs, LZMA_RUN);
- data_size = (char *)d->lzs.next_out - PyBytes_AS_STRING(result);
+ lzret = lzma_code(lzs, LZMA_RUN);
+ data_size = (char *)lzs->next_out - PyBytes_AS_STRING(result);
Py_END_ALLOW_THREADS
if (catch_lzma_error(lzret))
goto error;
@@ -914,26 +929,130 @@ decompress(Decompressor *d, uint8_t *data, size_t len)
d->check = lzma_get_check(&d->lzs);
if (lzret == LZMA_STREAM_END) {
d->eof = 1;
- if (d->lzs.avail_in > 0) {
- Py_CLEAR(d->unused_data);
- d->unused_data = PyBytes_FromStringAndSize(
- (char *)d->lzs.next_in, d->lzs.avail_in);
- if (d->unused_data == NULL)
- goto error;
- }
break;
- } else if (d->lzs.avail_in == 0) {
+ } else if (lzs->avail_in == 0) {
break;
- } else if (d->lzs.avail_out == 0) {
- if (grow_buffer(&result) == -1)
+ } else if (lzs->avail_out == 0) {
+ if (data_size == max_length)
+ break;
+ if (grow_buffer(&result, max_length) == -1)
goto error;
- d->lzs.next_out = (uint8_t *)PyBytes_AS_STRING(result) + data_size;
- d->lzs.avail_out = PyBytes_GET_SIZE(result) - data_size;
+ lzs->next_out = (uint8_t *)PyBytes_AS_STRING(result) + data_size;
+ lzs->avail_out = PyBytes_GET_SIZE(result) - data_size;
}
}
if (data_size != PyBytes_GET_SIZE(result))
if (_PyBytes_Resize(&result, data_size) == -1)
goto error;
+
+ return result;
+
+error:
+ Py_XDECREF(result);
+ return NULL;
+}
+
+static PyObject *
+decompress(Decompressor *d, uint8_t *data, size_t len, Py_ssize_t max_length)
+{
+ char input_buffer_in_use;
+ PyObject *result;
+ lzma_stream *lzs = &d->lzs;
+
+ /* Prepend unconsumed input if necessary */
+ if (lzs->next_in != NULL) {
+ size_t avail_now, avail_total;
+
+ /* Number of bytes we can append to input buffer */
+ avail_now = (d->input_buffer + d->input_buffer_size)
+ - (lzs->next_in + lzs->avail_in);
+
+ /* Number of bytes we can append if we move existing
+ contents to beginning of buffer (overwriting
+ consumed input) */
+ avail_total = d->input_buffer_size - lzs->avail_in;
+
+ if (avail_total < len) {
+ size_t offset = lzs->next_in - d->input_buffer;
+ uint8_t *tmp;
+ size_t new_size = d->input_buffer_size + len - avail_now;
+
+ /* Assign to temporary variable first, so we don't
+ lose address of allocated buffer if realloc fails */
+ tmp = PyMem_Realloc(d->input_buffer, new_size);
+ if (tmp == NULL) {
+ PyErr_SetNone(PyExc_MemoryError);
+ return NULL;
+ }
+ d->input_buffer = tmp;
+ d->input_buffer_size = new_size;
+
+ lzs->next_in = d->input_buffer + offset;
+ }
+ else if (avail_now < len) {
+ memmove(d->input_buffer, lzs->next_in,
+ lzs->avail_in);
+ lzs->next_in = d->input_buffer;
+ }
+ memcpy((void*)(lzs->next_in + lzs->avail_in), data, len);
+ lzs->avail_in += len;
+ input_buffer_in_use = 1;
+ }
+ else {
+ lzs->next_in = data;
+ lzs->avail_in = len;
+ input_buffer_in_use = 0;
+ }
+
+ result = decompress_buf(d, max_length);
+ if(result == NULL)
+ return NULL;
+
+ if (d->eof) {
+ d->needs_input = 0;
+ if (lzs->avail_in > 0) {
+ Py_XSETREF(d->unused_data,
+ PyBytes_FromStringAndSize((char *)lzs->next_in, lzs->avail_in));
+ if (d->unused_data == NULL)
+ goto error;
+ }
+ }
+ else if (lzs->avail_in == 0) {
+ lzs->next_in = NULL;
+ d->needs_input = 1;
+ }
+ else {
+ d->needs_input = 0;
+
+ /* If we did not use the input buffer, we now have
+ to copy the tail from the caller's buffer into the
+ input buffer */
+ if (!input_buffer_in_use) {
+
+ /* Discard buffer if it's too small
+ (resizing it may needlessly copy the current contents) */
+ if (d->input_buffer != NULL &&
+ d->input_buffer_size < lzs->avail_in) {
+ PyMem_Free(d->input_buffer);
+ d->input_buffer = NULL;
+ }
+
+ /* Allocate if necessary */
+ if (d->input_buffer == NULL) {
+ d->input_buffer = PyMem_Malloc(lzs->avail_in);
+ if (d->input_buffer == NULL) {
+ PyErr_SetNone(PyExc_MemoryError);
+ goto error;
+ }
+ d->input_buffer_size = lzs->avail_in;
+ }
+
+ /* Copy tail */
+ memcpy(d->input_buffer, lzs->next_in, lzs->avail_in);
+ lzs->next_in = d->input_buffer;
+ }
+ }
+
return result;
error:
@@ -946,20 +1065,28 @@ _lzma.LZMADecompressor.decompress
self: self(type="Decompressor *")
data: Py_buffer
- /
+ max_length: Py_ssize_t=-1
+
+Decompress *data*, returning uncompressed data as bytes.
-Provide data to the decompressor object.
+If *max_length* is nonnegative, returns at most *max_length* bytes of
+decompressed data. If this limit is reached and further output can be
+produced, *self.needs_input* will be set to ``False``. In this case, the next
+call to *decompress()* may provide *data* as b'' to obtain more of the output.
-Returns a chunk of decompressed data if possible, or b'' otherwise.
+If all of the input data was decompressed and returned (either because this
+was less than *max_length* bytes, or because *max_length* was negative),
+*self.needs_input* will be set to True.
-Attempting to decompress data after the end of stream is reached
-raises an EOFError. Any data found after the end of the stream
-is ignored and saved in the unused_data attribute.
+Attempting to decompress data after the end of stream is reached raises an
+EOFError. Any data found after the end of the stream is ignored and saved in
+the unused_data attribute.
[clinic start generated code]*/
static PyObject *
-_lzma_LZMADecompressor_decompress_impl(Decompressor *self, Py_buffer *data)
-/*[clinic end generated code: output=d86e78da7ff0ff21 input=50c4768b821bf0ef]*/
+_lzma_LZMADecompressor_decompress_impl(Decompressor *self, Py_buffer *data,
+ Py_ssize_t max_length)
+/*[clinic end generated code: output=ef4e20ec7122241d input=f2bb902cc1caf203]*/
{
PyObject *result = NULL;
@@ -967,7 +1094,7 @@ _lzma_LZMADecompressor_decompress_impl(Decompressor *self, Py_buffer *data)
if (self->eof)
PyErr_SetString(PyExc_EOFError, "Already at end of stream");
else
- result = decompress(self, data->buf, data->len);
+ result = decompress(self, data->buf, data->len, max_length);
RELEASE_LOCK(self);
return result;
}
@@ -1023,8 +1150,9 @@ For one-shot decompression, use the decompress() function instead.
[clinic start generated code]*/
static int
-_lzma_LZMADecompressor___init___impl(Decompressor *self, int format, PyObject *memlimit, PyObject *filters)
-/*[clinic end generated code: output=9b119f6f2cc2d7a8 input=458ca6132ef29801]*/
+_lzma_LZMADecompressor___init___impl(Decompressor *self, int format,
+ PyObject *memlimit, PyObject *filters)
+/*[clinic end generated code: output=3e1821f8aa36564c input=458ca6132ef29801]*/
{
const uint32_t decoder_flags = LZMA_TELL_ANY_CHECK | LZMA_TELL_NO_CHECK;
uint64_t memlimit_ = UINT64_MAX;
@@ -1055,6 +1183,7 @@ _lzma_LZMADecompressor___init___impl(Decompressor *self, int format, PyObject *m
self->alloc.alloc = PyLzma_Malloc;
self->alloc.free = PyLzma_Free;
self->lzs.allocator = &self->alloc;
+ self->lzs.next_in = NULL;
#ifdef WITH_THREAD
self->lock = PyThread_allocate_lock();
@@ -1065,6 +1194,9 @@ _lzma_LZMADecompressor___init___impl(Decompressor *self, int format, PyObject *m
#endif
self->check = LZMA_CHECK_UNKNOWN;
+ self->needs_input = 1;
+ self->input_buffer = NULL;
+ self->input_buffer_size = 0;
self->unused_data = PyBytes_FromStringAndSize(NULL, 0);
if (self->unused_data == NULL)
goto error;
@@ -1113,6 +1245,9 @@ error:
static void
Decompressor_dealloc(Decompressor *self)
{
+ if(self->input_buffer != NULL)
+ PyMem_Free(self->input_buffer);
+
lzma_end(&self->lzs);
Py_CLEAR(self->unused_data);
#ifdef WITH_THREAD
@@ -1134,6 +1269,9 @@ PyDoc_STRVAR(Decompressor_check_doc,
PyDoc_STRVAR(Decompressor_eof_doc,
"True if the end-of-stream marker has been reached.");
+PyDoc_STRVAR(Decompressor_needs_input_doc,
+"True if more input is needed before more decompressed data can be produced.");
+
PyDoc_STRVAR(Decompressor_unused_data_doc,
"Data found after the end of the compressed stream.");
@@ -1142,6 +1280,8 @@ static PyMemberDef Decompressor_members[] = {
Decompressor_check_doc},
{"eof", T_BOOL, offsetof(Decompressor, eof), READONLY,
Decompressor_eof_doc},
+ {"needs_input", T_BOOL, offsetof(Decompressor, needs_input), READONLY,
+ Decompressor_needs_input_doc},
{"unused_data", T_OBJECT_EX, offsetof(Decompressor, unused_data), READONLY,
Decompressor_unused_data_doc},
{NULL}
@@ -1260,8 +1400,9 @@ The result does not include the filter ID itself, only the options.
[clinic start generated code]*/
static PyObject *
-_lzma__decode_filter_properties_impl(PyModuleDef *module, lzma_vli filter_id, Py_buffer *encoded_props)
-/*[clinic end generated code: output=235f7f5345d48744 input=246410800782160c]*/
+_lzma__decode_filter_properties_impl(PyModuleDef *module, lzma_vli filter_id,
+ Py_buffer *encoded_props)
+/*[clinic end generated code: output=af248f570746668b input=246410800782160c]*/
{
lzma_filter filter;
lzma_ret lzret;
diff --git a/Modules/_opcode.c b/Modules/_opcode.c
index fee388f596..663bb21a5f 100644
--- a/Modules/_opcode.c
+++ b/Modules/_opcode.c
@@ -6,6 +6,8 @@ module _opcode
[clinic start generated code]*/
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=117442e66eb376e6]*/
+#include "clinic/_opcode.c.h"
+
/*[clinic input]
_opcode.stack_effect -> int
@@ -17,42 +19,9 @@ _opcode.stack_effect -> int
Compute the stack effect of the opcode.
[clinic start generated code]*/
-PyDoc_STRVAR(_opcode_stack_effect__doc__,
-"stack_effect($module, opcode, oparg=None, /)\n"
-"--\n"
-"\n"
-"Compute the stack effect of the opcode.");
-
-#define _OPCODE_STACK_EFFECT_METHODDEF \
- {"stack_effect", (PyCFunction)_opcode_stack_effect, METH_VARARGS, _opcode_stack_effect__doc__},
-
-static int
-_opcode_stack_effect_impl(PyModuleDef *module, int opcode, PyObject *oparg);
-
-static PyObject *
-_opcode_stack_effect(PyModuleDef *module, PyObject *args)
-{
- PyObject *return_value = NULL;
- int opcode;
- PyObject *oparg = Py_None;
- int _return_value;
-
- if (!PyArg_ParseTuple(args,
- "i|O:stack_effect",
- &opcode, &oparg))
- goto exit;
- _return_value = _opcode_stack_effect_impl(module, opcode, oparg);
- if ((_return_value == -1) && PyErr_Occurred())
- goto exit;
- return_value = PyLong_FromLong((long)_return_value);
-
-exit:
- return return_value;
-}
-
static int
_opcode_stack_effect_impl(PyModuleDef *module, int opcode, PyObject *oparg)
-/*[clinic end generated code: output=9e1133f8d587bc67 input=2d0a9ee53c0418f5]*/
+/*[clinic end generated code: output=1fcafd5596c6b050 input=2d0a9ee53c0418f5]*/
{
int effect;
int oparg_int = 0;
diff --git a/Modules/_operator.c b/Modules/_operator.c
index adeb99e90a..eb4f3a34ed 100644
--- a/Modules/_operator.c
+++ b/Modules/_operator.c
@@ -69,6 +69,7 @@ spami(truth , PyObject_IsTrue)
spam2(op_add , PyNumber_Add)
spam2(op_sub , PyNumber_Subtract)
spam2(op_mul , PyNumber_Multiply)
+spam2(op_matmul , PyNumber_MatrixMultiply)
spam2(op_floordiv , PyNumber_FloorDivide)
spam2(op_truediv , PyNumber_TrueDivide)
spam2(op_mod , PyNumber_Remainder)
@@ -86,6 +87,7 @@ spam2(op_or_ , PyNumber_Or)
spam2(op_iadd , PyNumber_InPlaceAdd)
spam2(op_isub , PyNumber_InPlaceSubtract)
spam2(op_imul , PyNumber_InPlaceMultiply)
+spam2(op_imatmul , PyNumber_InPlaceMatrixMultiply)
spam2(op_ifloordiv , PyNumber_InPlaceFloorDivide)
spam2(op_itruediv , PyNumber_InPlaceTrueDivide)
spam2(op_imod , PyNumber_InPlaceRemainder)
@@ -239,7 +241,7 @@ PyDoc_STRVAR(compare_digest__doc__,
"Return 'a == b'. This function uses an approach designed to prevent\n"
"timing analysis, making it appropriate for cryptography.\n"
"a and b must both be of the same type: either str (ASCII only),\n"
-"or any type that supports the buffer protocol (e.g. bytes).\n"
+"or any bytes-like object.\n"
"\n"
"Note: If a and b are of different lengths, or if an error occurs,\n"
"a timing attack could theoretically reveal information about the\n"
@@ -343,6 +345,7 @@ spam2o(index, "index(a) -- Same as a.__index__()")
spam2(add, "add(a, b) -- Same as a + b.")
spam2(sub, "sub(a, b) -- Same as a - b.")
spam2(mul, "mul(a, b) -- Same as a * b.")
+spam2(matmul, "matmul(a, b) -- Same as a @ b.")
spam2(floordiv, "floordiv(a, b) -- Same as a // b.")
spam2(truediv, "truediv(a, b) -- Same as a / b.")
spam2(mod, "mod(a, b) -- Same as a % b.")
@@ -360,6 +363,7 @@ spam2(or_, "or_(a, b) -- Same as a | b.")
spam2(iadd, "a = iadd(a, b) -- Same as a += b.")
spam2(isub, "a = isub(a, b) -- Same as a -= b.")
spam2(imul, "a = imul(a, b) -- Same as a *= b.")
+spam2(imatmul, "a = imatmul(a, b) -- Same as a @= b.")
spam2(ifloordiv, "a = ifloordiv(a, b) -- Same as a //= b.")
spam2(itruediv, "a = itruediv(a, b) -- Same as a /= b")
spam2(imod, "a = imod(a, b) -- Same as a %= b.")
@@ -456,6 +460,8 @@ itemgetter_call(itemgetterobject *ig, PyObject *args, PyObject *kw)
PyObject *obj, *result;
Py_ssize_t i, nitems=ig->nitems;
+ if (kw != NULL && !_PyArg_NoKeywords("itemgetter", kw))
+ return NULL;
if (!PyArg_UnpackTuple(args, "itemgetter", 1, 1, &obj))
return NULL;
if (nitems == 1)
@@ -481,6 +487,41 @@ itemgetter_call(itemgetterobject *ig, PyObject *args, PyObject *kw)
return result;
}
+static PyObject *
+itemgetter_repr(itemgetterobject *ig)
+{
+ PyObject *repr;
+ const char *reprfmt;
+
+ int status = Py_ReprEnter((PyObject *)ig);
+ if (status != 0) {
+ if (status < 0)
+ return NULL;
+ return PyUnicode_FromFormat("%s(...)", Py_TYPE(ig)->tp_name);
+ }
+
+ reprfmt = ig->nitems == 1 ? "%s(%R)" : "%s%R";
+ repr = PyUnicode_FromFormat(reprfmt, Py_TYPE(ig)->tp_name, ig->item);
+ Py_ReprLeave((PyObject *)ig);
+ return repr;
+}
+
+static PyObject *
+itemgetter_reduce(itemgetterobject *ig)
+{
+ if (ig->nitems == 1)
+ return Py_BuildValue("O(O)", Py_TYPE(ig), ig->item);
+ return PyTuple_Pack(2, Py_TYPE(ig), ig->item);
+}
+
+PyDoc_STRVAR(reduce_doc, "Return state information for pickling");
+
+static PyMethodDef itemgetter_methods[] = {
+ {"__reduce__", (PyCFunction)itemgetter_reduce, METH_NOARGS,
+ reduce_doc},
+ {NULL}
+};
+
PyDoc_STRVAR(itemgetter_doc,
"itemgetter(item, ...) --> itemgetter object\n\
\n\
@@ -499,7 +540,7 @@ static PyTypeObject itemgetter_type = {
0, /* tp_getattr */
0, /* tp_setattr */
0, /* tp_reserved */
- 0, /* tp_repr */
+ (reprfunc)itemgetter_repr, /* tp_repr */
0, /* tp_as_number */
0, /* tp_as_sequence */
0, /* tp_as_mapping */
@@ -517,7 +558,7 @@ static PyTypeObject itemgetter_type = {
0, /* tp_weaklistoffset */
0, /* tp_iter */
0, /* tp_iternext */
- 0, /* tp_methods */
+ itemgetter_methods, /* tp_methods */
0, /* tp_members */
0, /* tp_getset */
0, /* tp_base */
@@ -708,6 +749,8 @@ attrgetter_call(attrgetterobject *ag, PyObject *args, PyObject *kw)
PyObject *obj, *result;
Py_ssize_t i, nattrs=ag->nattrs;
+ if (kw != NULL && !_PyArg_NoKeywords("attrgetter", kw))
+ return NULL;
if (!PyArg_UnpackTuple(args, "attrgetter", 1, 1, &obj))
return NULL;
if (ag->nattrs == 1) /* ag->attr is always a tuple */
@@ -733,6 +776,93 @@ attrgetter_call(attrgetterobject *ag, PyObject *args, PyObject *kw)
return result;
}
+static PyObject *
+dotjoinattr(PyObject *attr, PyObject **attrsep)
+{
+ if (PyTuple_CheckExact(attr)) {
+ if (*attrsep == NULL) {
+ *attrsep = PyUnicode_FromString(".");
+ if (*attrsep == NULL)
+ return NULL;
+ }
+ return PyUnicode_Join(*attrsep, attr);
+ } else {
+ Py_INCREF(attr);
+ return attr;
+ }
+}
+
+static PyObject *
+attrgetter_args(attrgetterobject *ag)
+{
+ Py_ssize_t i;
+ PyObject *attrsep = NULL;
+ PyObject *attrstrings = PyTuple_New(ag->nattrs);
+ if (attrstrings == NULL)
+ return NULL;
+
+ for (i = 0; i < ag->nattrs; ++i) {
+ PyObject *attr = PyTuple_GET_ITEM(ag->attr, i);
+ PyObject *attrstr = dotjoinattr(attr, &attrsep);
+ if (attrstr == NULL) {
+ Py_XDECREF(attrsep);
+ Py_DECREF(attrstrings);
+ return NULL;
+ }
+ PyTuple_SET_ITEM(attrstrings, i, attrstr);
+ }
+ Py_XDECREF(attrsep);
+ return attrstrings;
+}
+
+static PyObject *
+attrgetter_repr(attrgetterobject *ag)
+{
+ PyObject *repr = NULL;
+ int status = Py_ReprEnter((PyObject *)ag);
+ if (status != 0) {
+ if (status < 0)
+ return NULL;
+ return PyUnicode_FromFormat("%s(...)", Py_TYPE(ag)->tp_name);
+ }
+
+ if (ag->nattrs == 1) {
+ PyObject *attrsep = NULL;
+ PyObject *attr = dotjoinattr(PyTuple_GET_ITEM(ag->attr, 0), &attrsep);
+ if (attr != NULL) {
+ repr = PyUnicode_FromFormat("%s(%R)", Py_TYPE(ag)->tp_name, attr);
+ Py_DECREF(attr);
+ }
+ Py_XDECREF(attrsep);
+ }
+ else {
+ PyObject *attrstrings = attrgetter_args(ag);
+ if (attrstrings != NULL) {
+ repr = PyUnicode_FromFormat("%s%R",
+ Py_TYPE(ag)->tp_name, attrstrings);
+ Py_DECREF(attrstrings);
+ }
+ }
+ Py_ReprLeave((PyObject *)ag);
+ return repr;
+}
+
+static PyObject *
+attrgetter_reduce(attrgetterobject *ag)
+{
+ PyObject *attrstrings = attrgetter_args(ag);
+ if (attrstrings == NULL)
+ return NULL;
+
+ return Py_BuildValue("ON", Py_TYPE(ag), attrstrings);
+}
+
+static PyMethodDef attrgetter_methods[] = {
+ {"__reduce__", (PyCFunction)attrgetter_reduce, METH_NOARGS,
+ reduce_doc},
+ {NULL}
+};
+
PyDoc_STRVAR(attrgetter_doc,
"attrgetter(attr, ...) --> attrgetter object\n\
\n\
@@ -753,7 +883,7 @@ static PyTypeObject attrgetter_type = {
0, /* tp_getattr */
0, /* tp_setattr */
0, /* tp_reserved */
- 0, /* tp_repr */
+ (reprfunc)attrgetter_repr, /* tp_repr */
0, /* tp_as_number */
0, /* tp_as_sequence */
0, /* tp_as_mapping */
@@ -771,7 +901,7 @@ static PyTypeObject attrgetter_type = {
0, /* tp_weaklistoffset */
0, /* tp_iter */
0, /* tp_iternext */
- 0, /* tp_methods */
+ attrgetter_methods, /* tp_methods */
0, /* tp_members */
0, /* tp_getset */
0, /* tp_base */
@@ -809,6 +939,13 @@ methodcaller_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
return NULL;
}
+ name = PyTuple_GET_ITEM(args, 0);
+ if (!PyUnicode_Check(name)) {
+ PyErr_SetString(PyExc_TypeError,
+ "method name must be a string");
+ return NULL;
+ }
+
/* create methodcallerobject structure */
mc = PyObject_GC_New(methodcallerobject, &methodcaller_type);
if (mc == NULL)
@@ -821,8 +958,8 @@ methodcaller_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
}
mc->args = newargs;
- name = PyTuple_GET_ITEM(args, 0);
Py_INCREF(name);
+ PyUnicode_InternInPlace(&name);
mc->name = name;
Py_XINCREF(kwds);
@@ -855,6 +992,8 @@ methodcaller_call(methodcallerobject *mc, PyObject *args, PyObject *kw)
{
PyObject *method, *obj, *result;
+ if (kw != NULL && !_PyArg_NoKeywords("methodcaller", kw))
+ return NULL;
if (!PyArg_UnpackTuple(args, "methodcaller", 1, 1, &obj))
return NULL;
method = PyObject_GetAttr(obj, mc->name);
@@ -865,6 +1004,142 @@ methodcaller_call(methodcallerobject *mc, PyObject *args, PyObject *kw)
return result;
}
+static PyObject *
+methodcaller_repr(methodcallerobject *mc)
+{
+ PyObject *argreprs, *repr = NULL, *sep, *joinedargreprs;
+ Py_ssize_t numtotalargs, numposargs, numkwdargs, i;
+ int status = Py_ReprEnter((PyObject *)mc);
+ if (status != 0) {
+ if (status < 0)
+ return NULL;
+ return PyUnicode_FromFormat("%s(...)", Py_TYPE(mc)->tp_name);
+ }
+
+ if (mc->kwds != NULL) {
+ numkwdargs = PyDict_Size(mc->kwds);
+ if (numkwdargs < 0) {
+ Py_ReprLeave((PyObject *)mc);
+ return NULL;
+ }
+ } else {
+ numkwdargs = 0;
+ }
+
+ numposargs = PyTuple_GET_SIZE(mc->args);
+ numtotalargs = numposargs + numkwdargs;
+
+ if (numtotalargs == 0) {
+ repr = PyUnicode_FromFormat("%s(%R)", Py_TYPE(mc)->tp_name, mc->name);
+ Py_ReprLeave((PyObject *)mc);
+ return repr;
+ }
+
+ argreprs = PyTuple_New(numtotalargs);
+ if (argreprs == NULL) {
+ Py_ReprLeave((PyObject *)mc);
+ return NULL;
+ }
+
+ for (i = 0; i < numposargs; ++i) {
+ PyObject *onerepr = PyObject_Repr(PyTuple_GET_ITEM(mc->args, i));
+ if (onerepr == NULL)
+ goto done;
+ PyTuple_SET_ITEM(argreprs, i, onerepr);
+ }
+
+ if (numkwdargs != 0) {
+ PyObject *key, *value;
+ Py_ssize_t pos = 0;
+ while (PyDict_Next(mc->kwds, &pos, &key, &value)) {
+ PyObject *onerepr = PyUnicode_FromFormat("%U=%R", key, value);
+ if (onerepr == NULL)
+ goto done;
+ if (i >= numtotalargs) {
+ i = -1;
+ break;
+ }
+ PyTuple_SET_ITEM(argreprs, i, onerepr);
+ ++i;
+ }
+ if (i != numtotalargs) {
+ PyErr_SetString(PyExc_RuntimeError,
+ "keywords dict changed size during iteration");
+ goto done;
+ }
+ }
+
+ sep = PyUnicode_FromString(", ");
+ if (sep == NULL)
+ goto done;
+
+ joinedargreprs = PyUnicode_Join(sep, argreprs);
+ Py_DECREF(sep);
+ if (joinedargreprs == NULL)
+ goto done;
+
+ repr = PyUnicode_FromFormat("%s(%R, %U)", Py_TYPE(mc)->tp_name,
+ mc->name, joinedargreprs);
+ Py_DECREF(joinedargreprs);
+
+done:
+ Py_DECREF(argreprs);
+ Py_ReprLeave((PyObject *)mc);
+ return repr;
+}
+
+static PyObject *
+methodcaller_reduce(methodcallerobject *mc)
+{
+ PyObject *newargs;
+ if (!mc->kwds || PyDict_Size(mc->kwds) == 0) {
+ Py_ssize_t i;
+ Py_ssize_t callargcount = PyTuple_GET_SIZE(mc->args);
+ newargs = PyTuple_New(1 + callargcount);
+ if (newargs == NULL)
+ return NULL;
+ Py_INCREF(mc->name);
+ PyTuple_SET_ITEM(newargs, 0, mc->name);
+ for (i = 0; i < callargcount; ++i) {
+ PyObject *arg = PyTuple_GET_ITEM(mc->args, i);
+ Py_INCREF(arg);
+ PyTuple_SET_ITEM(newargs, i + 1, arg);
+ }
+ return Py_BuildValue("ON", Py_TYPE(mc), newargs);
+ }
+ else {
+ PyObject *functools;
+ PyObject *partial;
+ PyObject *constructor;
+ _Py_IDENTIFIER(partial);
+ functools = PyImport_ImportModule("functools");
+ if (!functools)
+ return NULL;
+ partial = _PyObject_GetAttrId(functools, &PyId_partial);
+ Py_DECREF(functools);
+ if (!partial)
+ return NULL;
+ newargs = PyTuple_New(2);
+ if (newargs == NULL) {
+ Py_DECREF(partial);
+ return NULL;
+ }
+ Py_INCREF(Py_TYPE(mc));
+ PyTuple_SET_ITEM(newargs, 0, (PyObject *)Py_TYPE(mc));
+ Py_INCREF(mc->name);
+ PyTuple_SET_ITEM(newargs, 1, mc->name);
+ constructor = PyObject_Call(partial, newargs, mc->kwds);
+ Py_DECREF(newargs);
+ Py_DECREF(partial);
+ return Py_BuildValue("NO", constructor, mc->args);
+ }
+}
+
+static PyMethodDef methodcaller_methods[] = {
+ {"__reduce__", (PyCFunction)methodcaller_reduce, METH_NOARGS,
+ reduce_doc},
+ {NULL}
+};
PyDoc_STRVAR(methodcaller_doc,
"methodcaller(name, ...) --> methodcaller object\n\
\n\
@@ -884,7 +1159,7 @@ static PyTypeObject methodcaller_type = {
0, /* tp_getattr */
0, /* tp_setattr */
0, /* tp_reserved */
- 0, /* tp_repr */
+ (reprfunc)methodcaller_repr, /* tp_repr */
0, /* tp_as_number */
0, /* tp_as_sequence */
0, /* tp_as_mapping */
@@ -902,7 +1177,7 @@ static PyTypeObject methodcaller_type = {
0, /* tp_weaklistoffset */
0, /* tp_iter */
0, /* tp_iternext */
- 0, /* tp_methods */
+ methodcaller_methods, /* tp_methods */
0, /* tp_members */
0, /* tp_getset */
0, /* tp_base */
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
index c357dcc219..e52da37dd3 100644
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -5,14 +5,13 @@ PyDoc_STRVAR(pickle_module_doc,
"Optimized C implementation for the Python pickle module.");
/*[clinic input]
-output preset file
module _pickle
class _pickle.Pickler "PicklerObject *" "&Pickler_Type"
class _pickle.PicklerMemoProxy "PicklerMemoProxyObject *" "&PicklerMemoProxyType"
class _pickle.Unpickler "UnpicklerObject *" "&Unpickler_Type"
class _pickle.UnpicklerMemoProxy "UnpicklerMemoProxyObject *" "&UnpicklerMemoProxyType"
[clinic start generated code]*/
-/*[clinic end generated code: output=da39a3ee5e6b4b0d input=11c45248a41dd3fc]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=4b3e113468a58e6c]*/
/* Bump this when new opcodes are added to the pickle protocol. */
enum {
@@ -152,6 +151,8 @@ typedef struct {
/* codecs.encode, used for saving bytes in older protocols */
PyObject *codecs_encode;
+ /* builtins.getattr, used for saving nested names with protocol < 4 */
+ PyObject *getattr;
} PickleState;
/* Forward declaration of the _pickle module definition. */
@@ -188,16 +189,26 @@ _Pickle_ClearState(PickleState *st)
Py_CLEAR(st->name_mapping_3to2);
Py_CLEAR(st->import_mapping_3to2);
Py_CLEAR(st->codecs_encode);
+ Py_CLEAR(st->getattr);
}
/* Initialize the given pickle module state. */
static int
_Pickle_InitState(PickleState *st)
{
+ PyObject *builtins;
PyObject *copyreg = NULL;
PyObject *compat_pickle = NULL;
PyObject *codecs = NULL;
+ builtins = PyEval_GetBuiltins();
+ if (builtins == NULL)
+ goto error;
+ st->getattr = PyDict_GetItemString(builtins, "getattr");
+ if (st->getattr == NULL)
+ goto error;
+ Py_INCREF(st->getattr);
+
copyreg = PyImport_ImportModule("copyreg");
if (!copyreg)
goto error;
@@ -420,12 +431,12 @@ static int
Pdata_grow(Pdata *self)
{
PyObject **data = self->data;
- Py_ssize_t allocated = self->allocated;
- Py_ssize_t new_allocated;
+ size_t allocated = (size_t)self->allocated;
+ size_t new_allocated;
new_allocated = (allocated >> 3) + 6;
/* check for integer overflow */
- if (new_allocated > PY_SSIZE_T_MAX - allocated)
+ if (new_allocated > (size_t)PY_SSIZE_T_MAX - allocated)
goto nomemory;
new_allocated += allocated;
PyMem_RESIZE(data, PyObject *, new_allocated);
@@ -433,7 +444,7 @@ Pdata_grow(Pdata *self)
goto nomemory;
self->data = data;
- self->allocated = new_allocated;
+ self->allocated = (Py_ssize_t)new_allocated;
return 0;
nomemory:
@@ -539,7 +550,7 @@ typedef struct PicklerObject {
int bin; /* Boolean, true if proto > 0 */
int framing; /* True when framing is enabled, proto >= 4 */
Py_ssize_t frame_start; /* Position in output_buffer where the
- where the current frame begins. -1 if there
+ current frame begins. -1 if there
is no frame currently open. */
Py_ssize_t buf_size; /* Size of the current buffered pickle data */
@@ -835,9 +846,8 @@ PyMemoTable_Set(PyMemoTable *self, PyObject *key, Py_ssize_t value)
static int
_Pickler_ClearBuffer(PicklerObject *self)
{
- Py_CLEAR(self->output_buffer);
- self->output_buffer =
- PyBytes_FromStringAndSize(NULL, self->max_output_len);
+ Py_XSETREF(self->output_buffer,
+ PyBytes_FromStringAndSize(NULL, self->max_output_len));
if (self->output_buffer == NULL)
return -1;
self->output_len = 0;
@@ -848,7 +858,7 @@ _Pickler_ClearBuffer(PicklerObject *self)
static void
_write_size64(char *out, size_t value)
{
- int i;
+ size_t i;
assert(sizeof(size_t) <= 8);
@@ -1086,7 +1096,7 @@ _Unpickler_SkipConsumed(UnpicklerObject *self)
return 0;
assert(self->peek); /* otherwise we did something wrong */
- /* This makes an useless copy... */
+ /* This makes a useless copy... */
r = PyObject_CallFunction(self->read, "n", consumed);
if (r == NULL)
return -1;
@@ -1459,7 +1469,7 @@ memo_get(PicklerObject *self, PyObject *key)
pdata[1] = (unsigned char)(*value & 0xff);
len = 2;
}
- else if (*value <= 0xffffffffL) {
+ else if ((size_t)*value <= 0xffffffffUL) {
pdata[0] = LONG_BINGET;
pdata[1] = (unsigned char)(*value & 0xff);
pdata[2] = (unsigned char)((*value >> 8) & 0xff);
@@ -1516,7 +1526,7 @@ memo_put(PicklerObject *self, PyObject *obj)
pdata[1] = (unsigned char)idx;
len = 2;
}
- else if (idx <= 0xffffffffL) {
+ else if ((size_t)idx <= 0xffffffffUL) {
pdata[0] = LONG_BINPUT;
pdata[1] = (unsigned char)(idx & 0xff);
pdata[2] = (unsigned char)((idx >> 8) & 0xff);
@@ -1538,66 +1548,101 @@ memo_put(PicklerObject *self, PyObject *obj)
}
static PyObject *
-getattribute(PyObject *obj, PyObject *name, int allow_qualname) {
- PyObject *dotted_path;
- Py_ssize_t i;
+get_dotted_path(PyObject *obj, PyObject *name) {
_Py_static_string(PyId_dot, ".");
_Py_static_string(PyId_locals, "<locals>");
+ PyObject *dotted_path;
+ Py_ssize_t i, n;
dotted_path = PyUnicode_Split(name, _PyUnicode_FromId(&PyId_dot), -1);
- if (dotted_path == NULL) {
- return NULL;
- }
- assert(Py_SIZE(dotted_path) >= 1);
- if (!allow_qualname && Py_SIZE(dotted_path) > 1) {
- PyErr_Format(PyExc_AttributeError,
- "Can't get qualified attribute %R on %R;"
- "use protocols >= 4 to enable support",
- name, obj);
- Py_DECREF(dotted_path);
+ if (dotted_path == NULL)
return NULL;
- }
- Py_INCREF(obj);
- for (i = 0; i < Py_SIZE(dotted_path); i++) {
+ n = PyList_GET_SIZE(dotted_path);
+ assert(n >= 1);
+ for (i = 0; i < n; i++) {
PyObject *subpath = PyList_GET_ITEM(dotted_path, i);
- PyObject *tmp;
PyObject *result = PyUnicode_RichCompare(
subpath, _PyUnicode_FromId(&PyId_locals), Py_EQ);
int is_equal = (result == Py_True);
assert(PyBool_Check(result));
Py_DECREF(result);
if (is_equal) {
- PyErr_Format(PyExc_AttributeError,
- "Can't get local attribute %R on %R", name, obj);
+ if (obj == NULL)
+ PyErr_Format(PyExc_AttributeError,
+ "Can't pickle local object %R", name);
+ else
+ PyErr_Format(PyExc_AttributeError,
+ "Can't pickle local attribute %R on %R", name, obj);
Py_DECREF(dotted_path);
- Py_DECREF(obj);
return NULL;
}
- tmp = PyObject_GetAttr(obj, subpath);
- Py_DECREF(obj);
- if (tmp == NULL) {
- if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
- PyErr_Clear();
- PyErr_Format(PyExc_AttributeError,
- "Can't get attribute %R on %R", name, obj);
- }
- Py_DECREF(dotted_path);
+ }
+ return dotted_path;
+}
+
+static PyObject *
+get_deep_attribute(PyObject *obj, PyObject *names, PyObject **pparent)
+{
+ Py_ssize_t i, n;
+ PyObject *parent = NULL;
+
+ assert(PyList_CheckExact(names));
+ Py_INCREF(obj);
+ n = PyList_GET_SIZE(names);
+ for (i = 0; i < n; i++) {
+ PyObject *name = PyList_GET_ITEM(names, i);
+ Py_XDECREF(parent);
+ parent = obj;
+ obj = PyObject_GetAttr(parent, name);
+ if (obj == NULL) {
+ Py_DECREF(parent);
return NULL;
}
- obj = tmp;
}
- Py_DECREF(dotted_path);
+ if (pparent != NULL)
+ *pparent = parent;
+ else
+ Py_XDECREF(parent);
return obj;
}
+static void
+reformat_attribute_error(PyObject *obj, PyObject *name)
+{
+ if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
+ PyErr_Clear();
+ PyErr_Format(PyExc_AttributeError,
+ "Can't get attribute %R on %R", name, obj);
+ }
+}
+
+
+static PyObject *
+getattribute(PyObject *obj, PyObject *name, int allow_qualname)
+{
+ PyObject *dotted_path, *attr;
+
+ if (allow_qualname) {
+ dotted_path = get_dotted_path(obj, name);
+ if (dotted_path == NULL)
+ return NULL;
+ attr = get_deep_attribute(obj, dotted_path, NULL);
+ Py_DECREF(dotted_path);
+ }
+ else
+ attr = PyObject_GetAttr(obj, name);
+ if (attr == NULL)
+ reformat_attribute_error(obj, name);
+ return attr;
+}
+
static PyObject *
-whichmodule(PyObject *global, PyObject *global_name, int allow_qualname)
+whichmodule(PyObject *global, PyObject *dotted_path)
{
PyObject *module_name;
PyObject *modules_dict;
PyObject *module;
- PyObject *obj;
- Py_ssize_t i, j;
+ Py_ssize_t i;
_Py_IDENTIFIER(__module__);
_Py_IDENTIFIER(modules);
_Py_IDENTIFIER(__main__);
@@ -1619,6 +1664,7 @@ whichmodule(PyObject *global, PyObject *global_name, int allow_qualname)
}
assert(module_name == NULL);
+ /* Fallback on walking sys.modules */
modules_dict = _PySys_GetObjectId(&PyId_modules);
if (modules_dict == NULL) {
PyErr_SetString(PyExc_RuntimeError, "unable to get sys.modules");
@@ -1626,31 +1672,28 @@ whichmodule(PyObject *global, PyObject *global_name, int allow_qualname)
}
i = 0;
- while ((j = PyDict_Next(modules_dict, &i, &module_name, &module))) {
- PyObject *result = PyUnicode_RichCompare(
- module_name, _PyUnicode_FromId(&PyId___main__), Py_EQ);
- int is_equal = (result == Py_True);
- assert(PyBool_Check(result));
- Py_DECREF(result);
- if (is_equal)
+ while (PyDict_Next(modules_dict, &i, &module_name, &module)) {
+ PyObject *candidate;
+ if (PyUnicode_Check(module_name) &&
+ !PyUnicode_CompareWithASCIIString(module_name, "__main__"))
continue;
if (module == Py_None)
continue;
- obj = getattribute(module, global_name, allow_qualname);
- if (obj == NULL) {
+ candidate = get_deep_attribute(module, dotted_path, NULL);
+ if (candidate == NULL) {
if (!PyErr_ExceptionMatches(PyExc_AttributeError))
return NULL;
PyErr_Clear();
continue;
}
- if (obj == global) {
- Py_DECREF(obj);
+ if (candidate == global) {
Py_INCREF(module_name);
+ Py_DECREF(candidate);
return module_name;
}
- Py_DECREF(obj);
+ Py_DECREF(candidate);
}
/* If no module is found, use __main__. */
@@ -1936,7 +1979,7 @@ save_float(PicklerObject *self, PyObject *obj)
if (_Pickler_Write(self, &op, 1) < 0)
goto done;
- buf = PyOS_double_to_string(x, 'g', 17, 0, NULL);
+ buf = PyOS_double_to_string(x, 'r', 0, Py_DTSF_ADD_DOT_0, NULL);
if (!buf) {
PyErr_NoMemory();
goto done;
@@ -2016,7 +2059,7 @@ save_bytes(PicklerObject *self, PyObject *obj)
header[1] = (unsigned char)size;
len = 2;
}
- else if (size <= 0xffffffffL) {
+ else if ((size_t)size <= 0xffffffffUL) {
header[0] = BINBYTES;
header[1] = (unsigned char)(size & 0xff);
header[2] = (unsigned char)((size >> 8) & 0xff);
@@ -2053,9 +2096,10 @@ save_bytes(PicklerObject *self, PyObject *obj)
static PyObject *
raw_unicode_escape(PyObject *obj)
{
- PyObject *repr, *result;
+ PyObject *repr;
char *p;
- Py_ssize_t i, size, expandsize;
+ Py_ssize_t i, size;
+ size_t expandsize;
void *data;
unsigned int kind;
@@ -2070,15 +2114,16 @@ raw_unicode_escape(PyObject *obj)
else
expandsize = 6;
- if (size > PY_SSIZE_T_MAX / expandsize)
+ if ((size_t)size > (size_t)PY_SSIZE_T_MAX / expandsize)
return PyErr_NoMemory();
- repr = PyByteArray_FromStringAndSize(NULL, expandsize * size);
+ repr = PyBytes_FromStringAndSize(NULL, expandsize * size);
if (repr == NULL)
return NULL;
if (size == 0)
- goto done;
+ return repr;
+ assert(Py_REFCNT(repr) == 1);
- p = PyByteArray_AS_STRING(repr);
+ p = PyBytes_AS_STRING(repr);
for (i=0; i < size; i++) {
Py_UCS4 ch = PyUnicode_READ(kind, data, i);
/* Map 32-bit characters to '\Uxxxxxxxx' */
@@ -2107,12 +2152,10 @@ raw_unicode_escape(PyObject *obj)
else
*p++ = (char) ch;
}
- size = p - PyByteArray_AS_STRING(repr);
-
-done:
- result = PyBytes_FromStringAndSize(PyByteArray_AS_STRING(repr), size);
- Py_DECREF(repr);
- return result;
+ size = p - PyBytes_AS_STRING(repr);
+ if (_PyBytes_Resize(&repr, size) < 0)
+ return NULL;
+ return repr;
}
static int
@@ -2121,12 +2164,13 @@ write_utf8(PicklerObject *self, char *data, Py_ssize_t size)
char header[9];
Py_ssize_t len;
+ assert(size >= 0);
if (size <= 0xff && self->proto >= 4) {
header[0] = SHORT_BINUNICODE;
header[1] = (unsigned char)(size & 0xff);
len = 2;
}
- else if (size <= 0xffffffffUL) {
+ else if ((size_t)size <= 0xffffffffUL) {
header[0] = BINUNICODE;
header[1] = (unsigned char)(size & 0xff);
header[2] = (unsigned char)((size >> 8) & 0xff);
@@ -3044,9 +3088,8 @@ fix_imports(PyObject **module_name, PyObject **global_name)
Py_TYPE(item)->tp_name);
return -1;
}
- Py_CLEAR(*module_name);
Py_INCREF(item);
- *module_name = item;
+ Py_XSETREF(*module_name, item);
}
else if (PyErr_Occurred()) {
return -1;
@@ -3061,6 +3104,9 @@ save_global(PicklerObject *self, PyObject *obj, PyObject *name)
PyObject *global_name = NULL;
PyObject *module_name = NULL;
PyObject *module = NULL;
+ PyObject *parent = NULL;
+ PyObject *dotted_path = NULL;
+ PyObject *lastname = NULL;
PyObject *cls;
PickleState *st = _Pickle_GetGlobalState();
int status = 0;
@@ -3074,13 +3120,11 @@ save_global(PicklerObject *self, PyObject *obj, PyObject *name)
global_name = name;
}
else {
- if (self->proto >= 4) {
- global_name = _PyObject_GetAttrId(obj, &PyId___qualname__);
- if (global_name == NULL) {
- if (!PyErr_ExceptionMatches(PyExc_AttributeError))
- goto error;
- PyErr_Clear();
- }
+ global_name = _PyObject_GetAttrId(obj, &PyId___qualname__);
+ if (global_name == NULL) {
+ if (!PyErr_ExceptionMatches(PyExc_AttributeError))
+ goto error;
+ PyErr_Clear();
}
if (global_name == NULL) {
global_name = _PyObject_GetAttrId(obj, &PyId___name__);
@@ -3089,7 +3133,10 @@ save_global(PicklerObject *self, PyObject *obj, PyObject *name)
}
}
- module_name = whichmodule(obj, global_name, self->proto >= 4);
+ dotted_path = get_dotted_path(module, global_name);
+ if (dotted_path == NULL)
+ goto error;
+ module_name = whichmodule(obj, dotted_path);
if (module_name == NULL)
goto error;
@@ -3108,7 +3155,10 @@ save_global(PicklerObject *self, PyObject *obj, PyObject *name)
obj, module_name);
goto error;
}
- cls = getattribute(module, global_name, self->proto >= 4);
+ lastname = PyList_GET_ITEM(dotted_path, PyList_GET_SIZE(dotted_path)-1);
+ Py_INCREF(lastname);
+ cls = get_deep_attribute(module, dotted_path, &parent);
+ Py_CLEAR(dotted_path);
if (cls == NULL) {
PyErr_Format(st->PicklingError,
"Can't pickle %R: attribute lookup %S on %S failed",
@@ -3195,6 +3245,11 @@ save_global(PicklerObject *self, PyObject *obj, PyObject *name)
}
else {
gen_global:
+ if (parent == module) {
+ Py_INCREF(lastname);
+ Py_DECREF(global_name);
+ global_name = lastname;
+ }
if (self->proto >= 4) {
const char stack_global_op = STACK_GLOBAL;
@@ -3206,6 +3261,15 @@ save_global(PicklerObject *self, PyObject *obj, PyObject *name)
if (_Pickler_Write(self, &stack_global_op, 1) < 0)
goto error;
}
+ else if (parent != module) {
+ PickleState *st = _Pickle_GetGlobalState();
+ PyObject *reduce_value = Py_BuildValue("(O(OO))",
+ st->getattr, parent, lastname);
+ status = save_reduce(self, reduce_value, NULL);
+ Py_DECREF(reduce_value);
+ if (status < 0)
+ goto error;
+ }
else {
/* Generate a normal global opcode if we are using a pickle
protocol < 4, or if the object is not registered in the
@@ -3284,6 +3348,9 @@ save_global(PicklerObject *self, PyObject *obj, PyObject *name)
Py_XDECREF(module_name);
Py_XDECREF(global_name);
Py_XDECREF(module);
+ Py_XDECREF(parent);
+ Py_XDECREF(dotted_path);
+ Py_XDECREF(lastname);
return status;
}
@@ -3463,20 +3530,19 @@ save_reduce(PicklerObject *self, PyObject *args, PyObject *obj)
}
PyErr_Clear();
}
- else if (self->proto >= 4) {
- _Py_IDENTIFIER(__newobj_ex__);
- use_newobj_ex = PyUnicode_Check(name) &&
- PyUnicode_Compare(
- name, _PyUnicode_FromId(&PyId___newobj_ex__)) == 0;
- Py_DECREF(name);
- }
- else {
- _Py_IDENTIFIER(__newobj__);
- use_newobj = PyUnicode_Check(name) &&
- PyUnicode_Compare(
- name, _PyUnicode_FromId(&PyId___newobj__)) == 0;
- Py_DECREF(name);
+ else if (PyUnicode_Check(name)) {
+ if (self->proto >= 4) {
+ _Py_IDENTIFIER(__newobj_ex__);
+ use_newobj_ex = PyUnicode_Compare(
+ name, _PyUnicode_FromId(&PyId___newobj_ex__)) == 0;
+ }
+ if (!use_newobj_ex) {
+ _Py_IDENTIFIER(__newobj__);
+ use_newobj = PyUnicode_Compare(
+ name, _PyUnicode_FromId(&PyId___newobj__)) == 0;
+ }
}
+ Py_XDECREF(name);
}
if (use_newobj_ex) {
@@ -3561,7 +3627,7 @@ save_reduce(PicklerObject *self, PyObject *args, PyObject *obj)
>>> pickle.dumps(1+2j)
Traceback (most recent call last):
...
- RuntimeError: maximum recursion depth exceeded
+ RecursionError: maximum recursion depth exceeded
Removing the complex class from copyreg.dispatch_table made the
__reduce_ex__() method emit another complex object:
@@ -3947,7 +4013,7 @@ _pickle_Pickler___sizeof___impl(PicklerObject *self)
{
Py_ssize_t res, s;
- res = sizeof(PicklerObject);
+ res = _PyObject_SIZE(Py_TYPE(self));
if (self->memo != NULL) {
res += sizeof(PyMemoTable);
res += self->memo->mt_allocated * sizeof(PyMemoEntry);
@@ -4041,8 +4107,9 @@ to map the new Python 3 names to the old module names used in Python
[clinic start generated code]*/
static int
-_pickle_Pickler___init___impl(PicklerObject *self, PyObject *file, PyObject *protocol, int fix_imports)
-/*[clinic end generated code: output=56e229f3b1f4332f input=4faabdbc763c2389]*/
+_pickle_Pickler___init___impl(PicklerObject *self, PyObject *file,
+ PyObject *protocol, int fix_imports)
+/*[clinic end generated code: output=b5f31078dab17fb0 input=4faabdbc763c2389]*/
{
_Py_IDENTIFIER(persistent_id);
_Py_IDENTIFIER(dispatch_table);
@@ -4562,14 +4629,14 @@ calc_binsize(char *bytes, int nbytes)
/* s contains x bytes of a little-endian integer. Return its value as a
* C int. Obscure: when x is 1 or 2, this is an unsigned little-endian
- * int, but when x is 4 it's a signed one. This is an historical source
+ * int, but when x is 4 it's a signed one. This is a historical source
* of x-platform bugs.
*/
static long
calc_binint(char *bytes, int nbytes)
{
unsigned char *s = (unsigned char *)bytes;
- int i;
+ Py_ssize_t i;
long x = 0;
for (i = 0; i < nbytes; i++) {
@@ -4915,7 +4982,7 @@ load_counted_binunicode(UnpicklerObject *self, int nbytes)
}
static int
-load_counted_tuple(UnpicklerObject *self, int len)
+load_counted_tuple(UnpicklerObject *self, Py_ssize_t len)
{
PyObject *tuple;
@@ -6249,8 +6316,10 @@ needed. Both arguments passed are str objects.
[clinic start generated code]*/
static PyObject *
-_pickle_Unpickler_find_class_impl(UnpicklerObject *self, PyObject *module_name, PyObject *global_name)
-/*[clinic end generated code: output=64c77437e088e188 input=e2e6a865de093ef4]*/
+_pickle_Unpickler_find_class_impl(UnpicklerObject *self,
+ PyObject *module_name,
+ PyObject *global_name)
+/*[clinic end generated code: output=becc08d7f9ed41e3 input=e2e6a865de093ef4]*/
{
PyObject *global;
PyObject *modules_dict;
@@ -6347,7 +6416,7 @@ _pickle_Unpickler___sizeof___impl(UnpicklerObject *self)
{
Py_ssize_t res;
- res = sizeof(UnpicklerObject);
+ res = _PyObject_SIZE(Py_TYPE(self));
if (self->memo != NULL)
res += self->memo_size * sizeof(PyObject *);
if (self->marks != NULL)
@@ -6451,7 +6520,7 @@ binary file object opened for reading, an io.BytesIO object, or any
other custom object that meets this interface.
Optional keyword arguments are *fix_imports*, *encoding* and *errors*,
-which are used to control compatiblity support for pickle stream
+which are used to control compatibility support for pickle stream
generated by Python 2. If *fix_imports* is True, pickle will try to
map the old Python 2 names to the new names used in Python 3. The
*encoding* and *errors* tell pickle how to decode 8-bit string
@@ -6461,8 +6530,10 @@ string instances as bytes objects.
[clinic start generated code]*/
static int
-_pickle_Unpickler___init___impl(UnpicklerObject *self, PyObject *file, int fix_imports, const char *encoding, const char *errors)
-/*[clinic end generated code: output=b9ed1d84d315f3b5 input=04ece661aa884837]*/
+_pickle_Unpickler___init___impl(UnpicklerObject *self, PyObject *file,
+ int fix_imports, const char *encoding,
+ const char *errors)
+/*[clinic end generated code: output=e2c8ce748edc57b0 input=f9b7da04f5f4f335]*/
{
_Py_IDENTIFIER(persistent_load);
@@ -6890,8 +6961,9 @@ to map the new Python 3 names to the old module names used in Python
[clinic start generated code]*/
static PyObject *
-_pickle_dump_impl(PyModuleDef *module, PyObject *obj, PyObject *file, PyObject *protocol, int fix_imports)
-/*[clinic end generated code: output=a606e626d553850d input=830f8a64cef6f042]*/
+_pickle_dump_impl(PyModuleDef *module, PyObject *obj, PyObject *file,
+ PyObject *protocol, int fix_imports)
+/*[clinic end generated code: output=0de7dff89c406816 input=830f8a64cef6f042]*/
{
PicklerObject *pickler = _Pickler_New();
@@ -6943,8 +7015,9 @@ Python 2, so that the pickle data stream is readable with Python 2.
[clinic start generated code]*/
static PyObject *
-_pickle_dumps_impl(PyModuleDef *module, PyObject *obj, PyObject *protocol, int fix_imports)
-/*[clinic end generated code: output=777f0deefe5b88ee input=293dbeda181580b7]*/
+_pickle_dumps_impl(PyModuleDef *module, PyObject *obj, PyObject *protocol,
+ int fix_imports)
+/*[clinic end generated code: output=daa380db56fe07b9 input=293dbeda181580b7]*/
{
PyObject *result;
PicklerObject *pickler = _Pickler_New();
@@ -6993,7 +7066,7 @@ binary file object opened for reading, an io.BytesIO object, or any
other custom object that meets this interface.
Optional keyword arguments are *fix_imports*, *encoding* and *errors*,
-which are used to control compatiblity support for pickle stream
+which are used to control compatibility support for pickle stream
generated by Python 2. If *fix_imports* is True, pickle will try to
map the old Python 2 names to the new names used in Python 3. The
*encoding* and *errors* tell pickle how to decode 8-bit string
@@ -7003,8 +7076,9 @@ string instances as bytes objects.
[clinic start generated code]*/
static PyObject *
-_pickle_load_impl(PyModuleDef *module, PyObject *file, int fix_imports, const char *encoding, const char *errors)
-/*[clinic end generated code: output=568c61356c172654 input=2df7c7a1e6742204]*/
+_pickle_load_impl(PyModuleDef *module, PyObject *file, int fix_imports,
+ const char *encoding, const char *errors)
+/*[clinic end generated code: output=798f1c57cb2b4eb1 input=01b44dd3fc07afa7]*/
{
PyObject *result;
UnpicklerObject *unpickler = _Unpickler_New();
@@ -7046,7 +7120,7 @@ protocol argument is needed. Bytes past the pickled object's
representation are ignored.
Optional keyword arguments are *fix_imports*, *encoding* and *errors*,
-which are used to control compatiblity support for pickle stream
+which are used to control compatibility support for pickle stream
generated by Python 2. If *fix_imports* is True, pickle will try to
map the old Python 2 names to the new names used in Python 3. The
*encoding* and *errors* tell pickle how to decode 8-bit string
@@ -7056,8 +7130,9 @@ string instances as bytes objects.
[clinic start generated code]*/
static PyObject *
-_pickle_loads_impl(PyModuleDef *module, PyObject *data, int fix_imports, const char *encoding, const char *errors)
-/*[clinic end generated code: output=0b3845ad110b2522 input=f57f0fdaa2b4cb8b]*/
+_pickle_loads_impl(PyModuleDef *module, PyObject *data, int fix_imports,
+ const char *encoding, const char *errors)
+/*[clinic end generated code: output=61e9cdb01e36a736 input=70605948a719feb9]*/
{
PyObject *result;
UnpicklerObject *unpickler = _Unpickler_New();
@@ -7119,6 +7194,7 @@ pickle_traverse(PyObject *m, visitproc visit, void *arg)
Py_VISIT(st->name_mapping_3to2);
Py_VISIT(st->import_mapping_3to2);
Py_VISIT(st->codecs_encode);
+ Py_VISIT(st->getattr);
return 0;
}
diff --git a/Modules/_posixsubprocess.c b/Modules/_posixsubprocess.c
index 1490223d3f..8bedab5c27 100644
--- a/Modules/_posixsubprocess.c
+++ b/Modules/_posixsubprocess.c
@@ -117,10 +117,11 @@ _sanity_check_python_fd_sequence(PyObject *fd_sequence)
for (seq_idx = 0; seq_idx < seq_len; ++seq_idx) {
PyObject* py_fd = PySequence_Fast_GET_ITEM(fd_sequence, seq_idx);
long iter_fd = PyLong_AsLong(py_fd);
- if (iter_fd < 0 || iter_fd < prev_fd || iter_fd > INT_MAX) {
+ if (iter_fd < 0 || iter_fd <= prev_fd || iter_fd > INT_MAX) {
/* Negative, overflow, not a Long, unsorted, too big for a fd. */
return 1;
}
+ prev_fd = iter_fd;
}
return 0;
}
@@ -272,7 +273,7 @@ _close_open_fds_safe(int start_fd, PyObject* py_fds_to_keep)
{
int fd_dir_fd;
- fd_dir_fd = _Py_open(FD_DIR, O_RDONLY);
+ fd_dir_fd = _Py_open_noraise(FD_DIR, O_RDONLY);
if (fd_dir_fd == -1) {
/* No way to get a list of open fds. */
_close_fds_by_brute_force(start_fd, py_fds_to_keep);
@@ -400,7 +401,7 @@ child_exec(char *const exec_array[],
PyObject *preexec_fn,
PyObject *preexec_fn_args_tuple)
{
- int i, saved_errno, unused, reached_preexec = 0;
+ int i, saved_errno, reached_preexec = 0;
PyObject *result;
const char* err_msg = "";
/* Buffer large enough to hold a hex integer. We can't malloc. */
@@ -514,28 +515,29 @@ error:
saved_errno = errno;
/* Report the posix error to our parent process. */
/* We ignore all write() return values as the total size of our writes is
- * less than PIPEBUF and we cannot do anything about an error anyways. */
+ less than PIPEBUF and we cannot do anything about an error anyways.
+ Use _Py_write_noraise() to retry write() if it is interrupted by a
+ signal (fails with EINTR). */
if (saved_errno) {
char *cur;
- unused = write(errpipe_write, "OSError:", 8);
+ _Py_write_noraise(errpipe_write, "OSError:", 8);
cur = hex_errno + sizeof(hex_errno);
while (saved_errno != 0 && cur > hex_errno) {
- *--cur = "0123456789ABCDEF"[saved_errno % 16];
+ *--cur = Py_hexdigits[saved_errno % 16];
saved_errno /= 16;
}
- unused = write(errpipe_write, cur, hex_errno + sizeof(hex_errno) - cur);
- unused = write(errpipe_write, ":", 1);
+ _Py_write_noraise(errpipe_write, cur, hex_errno + sizeof(hex_errno) - cur);
+ _Py_write_noraise(errpipe_write, ":", 1);
if (!reached_preexec) {
/* Indicate to the parent that the error happened before exec(). */
- unused = write(errpipe_write, "noexec", 6);
+ _Py_write_noraise(errpipe_write, "noexec", 6);
}
/* We can't call strerror(saved_errno). It is not async signal safe.
* The parent process will look the error message up. */
} else {
- unused = write(errpipe_write, "SubprocessError:0:", 18);
- unused = write(errpipe_write, err_msg, strlen(err_msg));
+ _Py_write_noraise(errpipe_write, "SubprocessError:0:", 18);
+ _Py_write_noraise(errpipe_write, err_msg, strlen(err_msg));
}
- if (unused) return; /* silly? yes! avoids gcc compiler warning. */
}
@@ -556,7 +558,9 @@ subprocess_fork_exec(PyObject* self, PyObject *args)
int need_to_reenable_gc = 0;
char *const *exec_array, *const *argv = NULL, *const *envp = NULL;
Py_ssize_t arg_num;
+#ifdef WITH_THREAD
int import_lock_held = 0;
+#endif
if (!PyArg_ParseTuple(
args, "OOpOOOiiiiiiiiiiO:fork_exec",
@@ -651,8 +655,10 @@ subprocess_fork_exec(PyObject* self, PyObject *args)
preexec_fn_args_tuple = PyTuple_New(0);
if (!preexec_fn_args_tuple)
goto cleanup;
+#ifdef WITH_THREAD
_PyImport_AcquireLock();
import_lock_held = 1;
+#endif
}
if (cwd_obj != Py_None) {
@@ -695,13 +701,15 @@ subprocess_fork_exec(PyObject* self, PyObject *args)
/* Capture the errno exception before errno can be clobbered. */
PyErr_SetFromErrno(PyExc_OSError);
}
- if (preexec_fn != Py_None &&
- _PyImport_ReleaseLock() < 0 && !PyErr_Occurred()) {
+#ifdef WITH_THREAD
+ if (preexec_fn != Py_None
+ && _PyImport_ReleaseLock() < 0 && !PyErr_Occurred()) {
PyErr_SetString(PyExc_RuntimeError,
"not holding the import lock");
pid = -1;
}
import_lock_held = 0;
+#endif
/* Parent process */
if (envp)
@@ -723,8 +731,10 @@ subprocess_fork_exec(PyObject* self, PyObject *args)
return PyLong_FromPid(pid);
cleanup:
+#ifdef WITH_THREAD
if (import_lock_held)
_PyImport_ReleaseLock();
+#endif
if (envp)
_Py_FreeCharPArray(envp);
if (argv)
diff --git a/Modules/_randommodule.c b/Modules/_randommodule.c
index 416e266f0b..95ad4a429a 100644
--- a/Modules/_randommodule.c
+++ b/Modules/_randommodule.c
@@ -69,17 +69,21 @@
#include "Python.h"
#include <time.h> /* for seeding to current time */
+#ifndef PY_UINT32_T
+# error "Failed to find an exact-width 32-bit integer type"
+#endif
+
/* Period parameters -- These are all magic. Don't change. */
#define N 624
#define M 397
-#define MATRIX_A 0x9908b0dfUL /* constant vector a */
-#define UPPER_MASK 0x80000000UL /* most significant w-r bits */
-#define LOWER_MASK 0x7fffffffUL /* least significant r bits */
+#define MATRIX_A 0x9908b0dfU /* constant vector a */
+#define UPPER_MASK 0x80000000U /* most significant w-r bits */
+#define LOWER_MASK 0x7fffffffU /* least significant r bits */
typedef struct {
PyObject_HEAD
- unsigned long state[N];
int index;
+ PY_UINT32_T state[N];
} RandomObject;
static PyTypeObject Random_Type;
@@ -91,13 +95,13 @@ static PyTypeObject Random_Type;
/* generates a random number on [0,0xffffffff]-interval */
-static unsigned long
+static PY_UINT32_T
genrand_int32(RandomObject *self)
{
- unsigned long y;
- static unsigned long mag01[2]={0x0UL, MATRIX_A};
+ PY_UINT32_T y;
+ static PY_UINT32_T mag01[2]={0x0U, MATRIX_A};
/* mag01[x] = x * MATRIX_A for x=0,1 */
- unsigned long *mt;
+ PY_UINT32_T *mt;
mt = self->state;
if (self->index >= N) { /* generate N words at one time */
@@ -105,22 +109,22 @@ genrand_int32(RandomObject *self)
for (kk=0;kk<N-M;kk++) {
y = (mt[kk]&UPPER_MASK)|(mt[kk+1]&LOWER_MASK);
- mt[kk] = mt[kk+M] ^ (y >> 1) ^ mag01[y & 0x1UL];
+ mt[kk] = mt[kk+M] ^ (y >> 1) ^ mag01[y & 0x1U];
}
for (;kk<N-1;kk++) {
y = (mt[kk]&UPPER_MASK)|(mt[kk+1]&LOWER_MASK);
- mt[kk] = mt[kk+(M-N)] ^ (y >> 1) ^ mag01[y & 0x1UL];
+ mt[kk] = mt[kk+(M-N)] ^ (y >> 1) ^ mag01[y & 0x1U];
}
y = (mt[N-1]&UPPER_MASK)|(mt[0]&LOWER_MASK);
- mt[N-1] = mt[M-1] ^ (y >> 1) ^ mag01[y & 0x1UL];
+ mt[N-1] = mt[M-1] ^ (y >> 1) ^ mag01[y & 0x1U];
self->index = 0;
}
y = mt[self->index++];
y ^= (y >> 11);
- y ^= (y << 7) & 0x9d2c5680UL;
- y ^= (y << 15) & 0xefc60000UL;
+ y ^= (y << 7) & 0x9d2c5680U;
+ y ^= (y << 15) & 0xefc60000U;
y ^= (y >> 18);
return y;
}
@@ -137,28 +141,26 @@ genrand_int32(RandomObject *self)
static PyObject *
random_random(RandomObject *self)
{
- unsigned long a=genrand_int32(self)>>5, b=genrand_int32(self)>>6;
+ PY_UINT32_T a=genrand_int32(self)>>5, b=genrand_int32(self)>>6;
return PyFloat_FromDouble((a*67108864.0+b)*(1.0/9007199254740992.0));
}
/* initializes mt[N] with a seed */
static void
-init_genrand(RandomObject *self, unsigned long s)
+init_genrand(RandomObject *self, PY_UINT32_T s)
{
int mti;
- unsigned long *mt;
+ PY_UINT32_T *mt;
mt = self->state;
- mt[0]= s & 0xffffffffUL;
+ mt[0]= s;
for (mti=1; mti<N; mti++) {
mt[mti] =
- (1812433253UL * (mt[mti-1] ^ (mt[mti-1] >> 30)) + mti);
+ (1812433253U * (mt[mti-1] ^ (mt[mti-1] >> 30)) + mti);
/* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */
/* In the previous versions, MSBs of the seed affect */
/* only MSBs of the array mt[]. */
/* 2002/01/09 modified by Makoto Matsumoto */
- mt[mti] &= 0xffffffffUL;
- /* for >32 bit machines */
}
self->index = mti;
return;
@@ -168,32 +170,30 @@ init_genrand(RandomObject *self, unsigned long s)
/* init_key is the array for initializing keys */
/* key_length is its length */
static PyObject *
-init_by_array(RandomObject *self, unsigned long init_key[], size_t key_length)
+init_by_array(RandomObject *self, PY_UINT32_T init_key[], size_t key_length)
{
size_t i, j, k; /* was signed in the original code. RDH 12/16/2002 */
- unsigned long *mt;
+ PY_UINT32_T *mt;
mt = self->state;
- init_genrand(self, 19650218UL);
+ init_genrand(self, 19650218U);
i=1; j=0;
k = (N>key_length ? N : key_length);
for (; k; k--) {
- mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1664525UL))
- + init_key[j] + (unsigned long)j; /* non linear */
- mt[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */
+ mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1664525U))
+ + init_key[j] + (PY_UINT32_T)j; /* non linear */
i++; j++;
if (i>=N) { mt[0] = mt[N-1]; i=1; }
if (j>=key_length) j=0;
}
for (k=N-1; k; k--) {
- mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1566083941UL))
- - (unsigned long)i; /* non linear */
- mt[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */
+ mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1566083941U))
+ - (PY_UINT32_T)i; /* non linear */
i++;
if (i>=N) { mt[0] = mt[N-1]; i=1; }
}
- mt[0] = 0x80000000UL; /* MSB is 1; assuring non-zero initial array */
+ mt[0] = 0x80000000U; /* MSB is 1; assuring non-zero initial array */
Py_INCREF(Py_None);
return Py_None;
}
@@ -208,9 +208,8 @@ random_seed(RandomObject *self, PyObject *args)
{
PyObject *result = NULL; /* guilty until proved innocent */
PyObject *n = NULL;
- unsigned long *key = NULL;
- unsigned char *key_as_bytes = NULL;
- size_t bits, keyused, i;
+ PY_UINT32_T *key = NULL;
+ size_t bits, keyused;
int res;
PyObject *arg = NULL;
@@ -221,7 +220,7 @@ random_seed(RandomObject *self, PyObject *args)
time_t now;
time(&now);
- init_genrand(self, (unsigned long)now);
+ init_genrand(self, (PY_UINT32_T)now);
Py_INCREF(Py_None);
return Py_None;
}
@@ -249,35 +248,31 @@ random_seed(RandomObject *self, PyObject *args)
keyused = bits == 0 ? 1 : (bits - 1) / 32 + 1;
/* Convert seed to byte sequence. */
- key_as_bytes = (unsigned char *)PyMem_Malloc((size_t)4 * keyused);
- if (key_as_bytes == NULL) {
+ key = (PY_UINT32_T *)PyMem_Malloc((size_t)4 * keyused);
+ if (key == NULL) {
PyErr_NoMemory();
goto Done;
}
res = _PyLong_AsByteArray((PyLongObject *)n,
- key_as_bytes, keyused * 4,
- 1, /* little-endian */
+ (unsigned char *)key, keyused * 4,
+ PY_LITTLE_ENDIAN,
0); /* unsigned */
if (res == -1) {
- PyMem_Free(key_as_bytes);
+ PyMem_Free(key);
goto Done;
}
- /* Fill array of unsigned longs from byte sequence. */
- key = (unsigned long *)PyMem_Malloc(sizeof(unsigned long) * keyused);
- if (key == NULL) {
- PyErr_NoMemory();
- PyMem_Free(key_as_bytes);
- goto Done;
- }
- for (i = 0; i < keyused; i++) {
- key[i] =
- ((unsigned long)key_as_bytes[4*i + 0] << 0) +
- ((unsigned long)key_as_bytes[4*i + 1] << 8) +
- ((unsigned long)key_as_bytes[4*i + 2] << 16) +
- ((unsigned long)key_as_bytes[4*i + 3] << 24);
+#if PY_BIG_ENDIAN
+ {
+ size_t i, j;
+ /* Reverse an array. */
+ for (i = 0, j = keyused - 1; i < j; i++, j--) {
+ PY_UINT32_T tmp = key[i];
+ key[i] = key[j];
+ key[j] = tmp;
+ }
}
- PyMem_Free(key_as_bytes);
+#endif
result = init_by_array(self, key, keyused);
Done:
Py_XDECREF(n);
@@ -334,7 +329,7 @@ random_setstate(RandomObject *self, PyObject *state)
element = PyLong_AsUnsignedLong(PyTuple_GET_ITEM(state, i));
if (element == (unsigned long)-1 && PyErr_Occurred())
return NULL;
- self->state[i] = element & 0xffffffffUL; /* Make sure we get sane state */
+ self->state[i] = (PY_UINT32_T)element;
}
index = PyLong_AsLong(PyTuple_GET_ITEM(state, i));
@@ -353,9 +348,9 @@ random_setstate(RandomObject *self, PyObject *state)
static PyObject *
random_getrandbits(RandomObject *self, PyObject *args)
{
- int k, i, bytes;
- unsigned long r;
- unsigned char *bytearray;
+ int k, i, words;
+ PY_UINT32_T r;
+ PY_UINT32_T *wordarray;
PyObject *result;
if (!PyArg_ParseTuple(args, "i:getrandbits", &k))
@@ -370,27 +365,30 @@ random_getrandbits(RandomObject *self, PyObject *args)
if (k <= 32) /* Fast path */
return PyLong_FromUnsignedLong(genrand_int32(self) >> (32 - k));
- bytes = ((k - 1) / 32 + 1) * 4;
- bytearray = (unsigned char *)PyMem_Malloc(bytes);
- if (bytearray == NULL) {
+ words = (k - 1) / 32 + 1;
+ wordarray = (PY_UINT32_T *)PyMem_Malloc(words * 4);
+ if (wordarray == NULL) {
PyErr_NoMemory();
return NULL;
}
- /* Fill-out whole words, byte-by-byte to avoid endianness issues */
- for (i=0 ; i<bytes ; i+=4, k-=32) {
+ /* Fill-out bits of long integer, by 32-bit words, from least significant
+ to most significant. */
+#if PY_LITTLE_ENDIAN
+ for (i = 0; i < words; i++, k -= 32)
+#else
+ for (i = words - 1; i >= 0; i--, k -= 32)
+#endif
+ {
r = genrand_int32(self);
if (k < 32)
- r >>= (32 - k);
- bytearray[i+0] = (unsigned char)r;
- bytearray[i+1] = (unsigned char)(r >> 8);
- bytearray[i+2] = (unsigned char)(r >> 16);
- bytearray[i+3] = (unsigned char)(r >> 24);
+ r >>= (32 - k); /* Drop least significant bits */
+ wordarray[i] = r;
}
- /* little endian order to match bytearray assignment order */
- result = _PyLong_FromByteArray(bytearray, bytes, 1, 0);
- PyMem_Free(bytearray);
+ result = _PyLong_FromByteArray((unsigned char *)wordarray, words * 4,
+ PY_LITTLE_ENDIAN, 0 /* unsigned */);
+ PyMem_Free(wordarray);
return result;
}
diff --git a/Modules/_scproxy.c b/Modules/_scproxy.c
index 3b2a38ea32..66b6e3439f 100644
--- a/Modules/_scproxy.c
+++ b/Modules/_scproxy.c
@@ -249,7 +249,7 @@ static struct PyModuleDef mod_module = {
extern "C" {
#endif
-PyObject*
+PyMODINIT_FUNC
PyInit__scproxy(void)
{
return PyModule_Create(&mod_module);
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c
index d3903286c8..7570624e04 100644
--- a/Modules/_sqlite/connection.c
+++ b/Modules/_sqlite/connection.c
@@ -204,8 +204,8 @@ void pysqlite_flush_statement_cache(pysqlite_Connection* self)
node = node->next;
}
- Py_DECREF(self->statement_cache);
- self->statement_cache = (pysqlite_Cache*)PyObject_CallFunction((PyObject*)&pysqlite_CacheType, "O", self);
+ Py_SETREF(self->statement_cache,
+ (pysqlite_Cache *)PyObject_CallFunction((PyObject *)&pysqlite_CacheType, "O", self));
Py_DECREF(self);
self->statement_cache->decref_factory = 0;
}
@@ -318,9 +318,8 @@ PyObject* pysqlite_connection_cursor(pysqlite_Connection* self, PyObject* args,
_pysqlite_drop_unused_cursor_references(self);
if (cursor && self->row_factory != Py_None) {
- Py_XDECREF(((pysqlite_Cursor*)cursor)->row_factory);
Py_INCREF(self->row_factory);
- ((pysqlite_Cursor*)cursor)->row_factory = self->row_factory;
+ Py_XSETREF(((pysqlite_Cursor *)cursor)->row_factory, self->row_factory);
}
return cursor;
@@ -795,8 +794,7 @@ static void _pysqlite_drop_unused_statement_references(pysqlite_Connection* self
}
}
- Py_DECREF(self->statements);
- self->statements = new_list;
+ Py_SETREF(self->statements, new_list);
}
static void _pysqlite_drop_unused_cursor_references(pysqlite_Connection* self)
@@ -827,8 +825,7 @@ static void _pysqlite_drop_unused_cursor_references(pysqlite_Connection* self)
}
}
- Py_DECREF(self->cursors);
- self->cursors = new_list;
+ Py_SETREF(self->cursors, new_list);
}
PyObject* pysqlite_connection_create_function(pysqlite_Connection* self, PyObject* args, PyObject* kwargs)
@@ -1241,6 +1238,9 @@ PyObject* pysqlite_connection_call(pysqlite_Connection* self, PyObject* args, Py
return NULL;
}
+ if (!_PyArg_NoKeywords(MODULE_NAME ".Connection()", kwargs))
+ return NULL;
+
if (!PyArg_ParseTuple(args, "O", &sql))
return NULL;
diff --git a/Modules/_sqlite/connection.h b/Modules/_sqlite/connection.h
index 0c9734caf7..fbd9063779 100644
--- a/Modules/_sqlite/connection.h
+++ b/Modules/_sqlite/connection.h
@@ -52,7 +52,7 @@ typedef struct
* first get called with count=0? */
double timeout_started;
- /* None for autocommit, otherwise a PyString with the isolation level */
+ /* None for autocommit, otherwise a PyUnicode with the isolation level */
PyObject* isolation_level;
/* NULL for autocommit, otherwise a string with the BEGIN statement; will be
diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c
index db96b02519..300da2878e 100644
--- a/Modules/_sqlite/cursor.c
+++ b/Modules/_sqlite/cursor.c
@@ -46,7 +46,7 @@ static pysqlite_StatementKind detect_statement_type(const char* statement)
dst = buf;
*dst = 0;
- while (Py_ISALPHA(*src) && dst - buf < sizeof(buf) - 2) {
+ while (Py_ISALPHA(*src) && (dst - buf) < ((Py_ssize_t)sizeof(buf) - 2)) {
*dst++ = Py_TOLOWER(*src++);
}
@@ -170,8 +170,7 @@ int pysqlite_build_row_cast_map(pysqlite_Cursor* self)
return 0;
}
- Py_XDECREF(self->row_cast_map);
- self->row_cast_map = PyList_New(0);
+ Py_XSETREF(self->row_cast_map, PyList_New(0));
for (i = 0; i < sqlite3_column_count(self->statement->st); i++) {
converter = NULL;
@@ -334,11 +333,7 @@ PyObject* _pysqlite_fetch_one_row(pysqlite_Cursor* self)
if (self->connection->text_factory == (PyObject*)&PyUnicode_Type) {
converted = PyUnicode_FromStringAndSize(val_str, nbytes);
if (!converted) {
-#ifdef Py_DEBUG
- /* in debug mode, type_call() fails with an assertion
- error if an exception is set when it is called */
PyErr_Clear();
-#endif
colname = sqlite3_column_name(self->statement->st, i);
if (!colname) {
colname = "<unknown column name>";
@@ -514,9 +509,8 @@ PyObject* _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject*
goto error;
/* reset description and rowcount */
- Py_DECREF(self->description);
Py_INCREF(Py_None);
- self->description = Py_None;
+ Py_SETREF(self->description, Py_None);
self->rowcount = -1L;
func_args = PyTuple_New(1);
@@ -530,10 +524,10 @@ PyObject* _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject*
if (self->statement) {
(void)pysqlite_statement_reset(self->statement);
- Py_DECREF(self->statement);
}
- self->statement = (pysqlite_Statement*)pysqlite_cache_get(self->connection->statement_cache, func_args);
+ Py_XSETREF(self->statement,
+ (pysqlite_Statement *)pysqlite_cache_get(self->connection->statement_cache, func_args));
Py_DECREF(func_args);
if (!self->statement) {
@@ -541,8 +535,8 @@ PyObject* _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject*
}
if (self->statement->in_use) {
- Py_DECREF(self->statement);
- self->statement = PyObject_New(pysqlite_Statement, &pysqlite_StatementType);
+ Py_SETREF(self->statement,
+ PyObject_New(pysqlite_Statement, &pysqlite_StatementType));
if (!self->statement) {
goto error;
}
@@ -658,8 +652,7 @@ PyObject* _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject*
numcols = sqlite3_column_count(self->statement->st);
Py_END_ALLOW_THREADS
- Py_DECREF(self->description);
- self->description = PyTuple_New(numcols);
+ Py_SETREF(self->description, PyTuple_New(numcols));
if (!self->description) {
goto error;
}
diff --git a/Modules/_sqlite/microprotocols.h b/Modules/_sqlite/microprotocols.h
index 3a9944fc79..6941716c4c 100644
--- a/Modules/_sqlite/microprotocols.h
+++ b/Modules/_sqlite/microprotocols.h
@@ -48,7 +48,7 @@ extern PyObject *pysqlite_microprotocols_adapt(
PyObject *obj, PyObject *proto, PyObject *alt);
extern PyObject *
- pysqlite_adapt(pysqlite_Cursor* self, PyObject *args);
+ pysqlite_adapt(pysqlite_Cursor* self, PyObject *args);
#define pysqlite_adapt_doc \
"adapt(obj, protocol, alternate) -> adapt obj to given protocol. Non-standard."
diff --git a/Modules/_sqlite/row.c b/Modules/_sqlite/row.c
index ee73446006..07584e30e5 100644
--- a/Modules/_sqlite/row.c
+++ b/Modules/_sqlite/row.c
@@ -142,8 +142,7 @@ PyObject* pysqlite_row_subscript(pysqlite_Row* self, PyObject* idx)
return NULL;
}
else if (PySlice_Check(idx)) {
- PyErr_SetString(PyExc_ValueError, "slices not implemented, yet");
- return NULL;
+ return PyObject_GetItem(self->data, idx);
}
else {
PyErr_SetString(PyExc_IndexError, "Index must be int or string");
@@ -159,7 +158,7 @@ Py_ssize_t pysqlite_row_length(pysqlite_Row* self, PyObject* args, PyObject* kwa
PyObject* pysqlite_row_keys(pysqlite_Row* self, PyObject* args, PyObject* kwargs)
{
PyObject* list;
- int nitems, i;
+ Py_ssize_t nitems, i;
list = PyList_New(0);
if (!list) {
diff --git a/Modules/_sre.c b/Modules/_sre.c
index d6fcda18b6..150229dfbb 100644
--- a/Modules/_sre.c
+++ b/Modules/_sre.c
@@ -97,48 +97,25 @@ static char copyright[] =
/* -------------------------------------------------------------------- */
/* search engine state */
-/* default character predicates (run sre_chars.py to regenerate tables) */
-
-#define SRE_DIGIT_MASK 1
-#define SRE_SPACE_MASK 2
-#define SRE_LINEBREAK_MASK 4
-#define SRE_ALNUM_MASK 8
-#define SRE_WORD_MASK 16
-
-/* FIXME: this assumes ASCII. create tables in init_sre() instead */
-
-static char sre_char_info[128] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 6, 2,
-2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0,
-0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25, 25, 25, 25, 25, 25,
-25, 25, 0, 0, 0, 0, 0, 0, 0, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 0, 0,
-0, 0, 16, 0, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 0, 0, 0, 0, 0 };
-
-static char sre_char_lower[128] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
-10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
-27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
-44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
-61, 62, 63, 64, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107,
-108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
-122, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
-106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
-120, 121, 122, 123, 124, 125, 126, 127 };
-
#define SRE_IS_DIGIT(ch)\
- ((ch) < 128 ? (sre_char_info[(ch)] & SRE_DIGIT_MASK) : 0)
+ ((ch) < 128 && Py_ISDIGIT(ch))
#define SRE_IS_SPACE(ch)\
- ((ch) < 128 ? (sre_char_info[(ch)] & SRE_SPACE_MASK) : 0)
+ ((ch) < 128 && Py_ISSPACE(ch))
#define SRE_IS_LINEBREAK(ch)\
- ((ch) < 128 ? (sre_char_info[(ch)] & SRE_LINEBREAK_MASK) : 0)
+ ((ch) == '\n')
#define SRE_IS_ALNUM(ch)\
- ((ch) < 128 ? (sre_char_info[(ch)] & SRE_ALNUM_MASK) : 0)
+ ((ch) < 128 && Py_ISALNUM(ch))
#define SRE_IS_WORD(ch)\
- ((ch) < 128 ? (sre_char_info[(ch)] & SRE_WORD_MASK) : 0)
+ ((ch) < 128 && (Py_ISALNUM(ch) || (ch) == '_'))
static unsigned int sre_lower(unsigned int ch)
{
- return ((ch) < 128 ? (unsigned int)sre_char_lower[ch] : ch);
+ return ((ch) < 128 ? Py_TOLOWER(ch) : ch);
+}
+
+static unsigned int sre_upper(unsigned int ch)
+{
+ return ((ch) < 128 ? Py_TOUPPER(ch) : ch);
}
/* locale-specific character predicates */
@@ -152,6 +129,11 @@ static unsigned int sre_lower_locale(unsigned int ch)
return ((ch) < 256 ? (unsigned int)tolower((ch)) : ch);
}
+static unsigned int sre_upper_locale(unsigned int ch)
+{
+ return ((ch) < 256 ? (unsigned int)toupper((ch)) : ch);
+}
+
/* unicode-specific character predicates */
#define SRE_UNI_IS_DIGIT(ch) Py_UNICODE_ISDECIMAL(ch)
@@ -165,6 +147,11 @@ static unsigned int sre_lower_unicode(unsigned int ch)
return (unsigned int) Py_UNICODE_TOLOWER(ch);
}
+static unsigned int sre_upper_unicode(unsigned int ch)
+{
+ return (unsigned int) Py_UNICODE_TOUPPER(ch);
+}
+
LOCAL(int)
sre_category(SRE_CODE category, unsigned int ch)
{
@@ -271,25 +258,50 @@ data_stack_grow(SRE_STATE* state, Py_ssize_t size)
/* see sre.h for object declarations */
static PyObject*pattern_new_match(PatternObject*, SRE_STATE*, Py_ssize_t);
-static PyObject*pattern_scanner(PatternObject*, PyObject*, PyObject* kw);
+static PyObject *pattern_scanner(PatternObject *, PyObject *, Py_ssize_t, Py_ssize_t);
-static PyObject *
-sre_codesize(PyObject* self, PyObject *unused)
+
+/*[clinic input]
+module _sre
+class _sre.SRE_Pattern "PatternObject *" "&Pattern_Type"
+class _sre.SRE_Match "MatchObject *" "&Match_Type"
+class _sre.SRE_Scanner "ScannerObject *" "&Scanner_Type"
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=b0230ec19a0deac8]*/
+
+static PyTypeObject Pattern_Type;
+static PyTypeObject Match_Type;
+static PyTypeObject Scanner_Type;
+
+/*[clinic input]
+_sre.getcodesize -> int
+[clinic start generated code]*/
+
+static int
+_sre_getcodesize_impl(PyModuleDef *module)
+/*[clinic end generated code: output=794f1f98ef4883e5 input=bd6f6ecf4916bb2b]*/
{
- return PyLong_FromSize_t(sizeof(SRE_CODE));
+ return sizeof(SRE_CODE);
}
-static PyObject *
-sre_getlower(PyObject* self, PyObject* args)
+/*[clinic input]
+_sre.getlower -> int
+
+ character: int
+ flags: int
+ /
+
+[clinic start generated code]*/
+
+static int
+_sre_getlower_impl(PyModuleDef *module, int character, int flags)
+/*[clinic end generated code: output=5fc3616ae2a4c306 input=087d2f1c44bbca6f]*/
{
- int character, flags;
- if (!PyArg_ParseTuple(args, "ii", &character, &flags))
- return NULL;
if (flags & SRE_FLAG_LOCALE)
- return Py_BuildValue("i", sre_lower_locale(character));
+ return sre_lower_locale(character);
if (flags & SRE_FLAG_UNICODE)
- return Py_BuildValue("i", sre_lower_unicode(character));
- return Py_BuildValue("i", sre_lower(character));
+ return sre_lower_unicode(character);
+ return sre_lower(character);
}
LOCAL(void)
@@ -328,7 +340,7 @@ getstring(PyObject* string, Py_ssize_t* p_length,
/* get pointer to byte string buffer */
if (PyObject_GetBuffer(string, view, PyBUF_SIMPLE) != 0) {
- PyErr_SetString(PyExc_TypeError, "expected string or buffer");
+ PyErr_SetString(PyExc_TypeError, "expected string or bytes-like object");
return NULL;
}
@@ -357,6 +369,11 @@ state_init(SRE_STATE* state, PatternObject* pattern, PyObject* string,
memset(state, 0, sizeof(SRE_STATE));
+ state->mark = PyMem_New(void *, pattern->groups * 2);
+ if (!state->mark) {
+ PyErr_NoMemory();
+ goto err;
+ }
state->lastmark = -1;
state->lastindex = -1;
@@ -367,12 +384,12 @@ state_init(SRE_STATE* state, PatternObject* pattern, PyObject* string,
if (isbytes && pattern->isbytes == 0) {
PyErr_SetString(PyExc_TypeError,
- "can't use a string pattern on a bytes-like object");
+ "cannot use a string pattern on a bytes-like object");
goto err;
}
if (!isbytes && pattern->isbytes > 0) {
PyErr_SetString(PyExc_TypeError,
- "can't use a bytes pattern on a string-like object");
+ "cannot use a bytes pattern on a string-like object");
goto err;
}
@@ -400,15 +417,23 @@ state_init(SRE_STATE* state, PatternObject* pattern, PyObject* string,
state->pos = start;
state->endpos = end;
- if (pattern->flags & SRE_FLAG_LOCALE)
+ if (pattern->flags & SRE_FLAG_LOCALE) {
state->lower = sre_lower_locale;
- else if (pattern->flags & SRE_FLAG_UNICODE)
+ state->upper = sre_upper_locale;
+ }
+ else if (pattern->flags & SRE_FLAG_UNICODE) {
state->lower = sre_lower_unicode;
- else
+ state->upper = sre_upper_unicode;
+ }
+ else {
state->lower = sre_lower;
+ state->upper = sre_upper;
+ }
return string;
err:
+ PyMem_Del(state->mark);
+ state->mark = NULL;
if (state->buffer.buf)
PyBuffer_Release(&state->buffer);
return NULL;
@@ -421,6 +446,8 @@ state_fini(SRE_STATE* state)
PyBuffer_Release(&state->buffer);
Py_XDECREF(state->string);
data_stack_dealloc(state);
+ PyMem_Del(state->mark);
+ state->mark = NULL;
}
/* calculate offset from start of string */
@@ -473,8 +500,9 @@ pattern_error(Py_ssize_t status)
{
switch (status) {
case SRE_ERROR_RECURSION_LIMIT:
+ /* This error code seems to be unused. */
PyErr_SetString(
- PyExc_RuntimeError,
+ PyExc_RecursionError,
"maximum recursion limit exceeded"
);
break;
@@ -550,26 +578,32 @@ fix_string_param(PyObject *string, PyObject *string2, const char *oldname)
return string;
}
+/*[clinic input]
+_sre.SRE_Pattern.match
+
+ string: object = NULL
+ pos: Py_ssize_t = 0
+ endpos: Py_ssize_t(c_default="PY_SSIZE_T_MAX") = sys.maxsize
+ *
+ pattern: object = NULL
+
+Matches zero or more characters at the beginning of the string.
+[clinic start generated code]*/
+
static PyObject *
-pattern_match(PatternObject *self, PyObject *args, PyObject *kwargs)
+_sre_SRE_Pattern_match_impl(PatternObject *self, PyObject *string,
+ Py_ssize_t pos, Py_ssize_t endpos,
+ PyObject *pattern)
+/*[clinic end generated code: output=74b4b1da3bb2d84e input=3d079aa99979b81d]*/
{
- static char *_keywords[] = {"string", "pos", "endpos", "pattern", NULL};
- PyObject *string = NULL;
- Py_ssize_t pos = 0;
- Py_ssize_t endpos = PY_SSIZE_T_MAX;
- PyObject *pattern = NULL;
SRE_STATE state;
Py_ssize_t status;
+ PyObject *match;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "|Onn$O:match", _keywords,
- &string, &pos, &endpos, &pattern))
- return NULL;
string = fix_string_param(string, pattern, "pattern");
if (!string)
return NULL;
- string = state_init(&state, (PatternObject *)self, string, pos, endpos);
- if (!string)
+ if (!state_init(&state, (PatternObject *)self, string, pos, endpos))
return NULL;
state.ptr = state.start;
@@ -579,34 +613,43 @@ pattern_match(PatternObject *self, PyObject *args, PyObject *kwargs)
status = sre_match(&state, PatternObject_GetCode(self), 0);
TRACE(("|%p|%p|END\n", PatternObject_GetCode(self), state.ptr));
- if (PyErr_Occurred())
+ if (PyErr_Occurred()) {
+ state_fini(&state);
return NULL;
+ }
+ match = pattern_new_match(self, &state, status);
state_fini(&state);
-
- return (PyObject *)pattern_new_match(self, &state, status);
+ return match;
}
-static PyObject*
-pattern_fullmatch(PatternObject* self, PyObject* args, PyObject* kw)
+/*[clinic input]
+_sre.SRE_Pattern.fullmatch
+
+ string: object = NULL
+ pos: Py_ssize_t = 0
+ endpos: Py_ssize_t(c_default="PY_SSIZE_T_MAX") = sys.maxsize
+ *
+ pattern: object = NULL
+
+Matches against all of the string
+[clinic start generated code]*/
+
+static PyObject *
+_sre_SRE_Pattern_fullmatch_impl(PatternObject *self, PyObject *string,
+ Py_ssize_t pos, Py_ssize_t endpos,
+ PyObject *pattern)
+/*[clinic end generated code: output=1c98bc5da744ea94 input=d4228606cc12580f]*/
{
SRE_STATE state;
Py_ssize_t status;
+ PyObject *match;
- PyObject *string = NULL, *string2 = NULL;
- Py_ssize_t start = 0;
- Py_ssize_t end = PY_SSIZE_T_MAX;
- static char* kwlist[] = { "string", "pos", "endpos", "pattern", NULL };
- if (!PyArg_ParseTupleAndKeywords(args, kw, "|Onn$O:fullmatch", kwlist,
- &string, &start, &end, &string2))
- return NULL;
-
- string = fix_string_param(string, string2, "pattern");
+ string = fix_string_param(string, pattern, "pattern");
if (!string)
return NULL;
- string = state_init(&state, self, string, start, end);
- if (!string)
+ if (!state_init(&state, self, string, pos, endpos))
return NULL;
state.ptr = state.start;
@@ -616,34 +659,45 @@ pattern_fullmatch(PatternObject* self, PyObject* args, PyObject* kw)
status = sre_match(&state, PatternObject_GetCode(self), 1);
TRACE(("|%p|%p|END\n", PatternObject_GetCode(self), state.ptr));
- if (PyErr_Occurred())
+ if (PyErr_Occurred()) {
+ state_fini(&state);
return NULL;
+ }
+ match = pattern_new_match(self, &state, status);
state_fini(&state);
-
- return pattern_new_match(self, &state, status);
+ return match;
}
-static PyObject*
-pattern_search(PatternObject* self, PyObject* args, PyObject* kw)
+/*[clinic input]
+_sre.SRE_Pattern.search
+
+ string: object = NULL
+ pos: Py_ssize_t = 0
+ endpos: Py_ssize_t(c_default="PY_SSIZE_T_MAX") = sys.maxsize
+ *
+ pattern: object = NULL
+
+Scan through string looking for a match, and return a corresponding match object instance.
+
+Return None if no position in the string matches.
+[clinic start generated code]*/
+
+static PyObject *
+_sre_SRE_Pattern_search_impl(PatternObject *self, PyObject *string,
+ Py_ssize_t pos, Py_ssize_t endpos,
+ PyObject *pattern)
+/*[clinic end generated code: output=3839394a18e5ea4f input=dab42720f4be3a4b]*/
{
SRE_STATE state;
Py_ssize_t status;
+ PyObject *match;
- PyObject *string = NULL, *string2 = NULL;
- Py_ssize_t start = 0;
- Py_ssize_t end = PY_SSIZE_T_MAX;
- static char* kwlist[] = { "string", "pos", "endpos", "pattern", NULL };
- if (!PyArg_ParseTupleAndKeywords(args, kw, "|Onn$O:search", kwlist,
- &string, &start, &end, &string2))
- return NULL;
-
- string = fix_string_param(string, string2, "pattern");
+ string = fix_string_param(string, pattern, "pattern");
if (!string)
return NULL;
- string = state_init(&state, self, string, start, end);
- if (!string)
+ if (!state_init(&state, self, string, pos, endpos))
return NULL;
TRACE(("|%p|%p|SEARCH\n", PatternObject_GetCode(self), state.ptr));
@@ -652,12 +706,14 @@ pattern_search(PatternObject* self, PyObject* args, PyObject* kw)
TRACE(("|%p|%p|END\n", PatternObject_GetCode(self), state.ptr));
- state_fini(&state);
-
- if (PyErr_Occurred())
+ if (PyErr_Occurred()) {
+ state_fini(&state);
return NULL;
+ }
- return pattern_new_match(self, &state, status);
+ match = pattern_new_match(self, &state, status);
+ state_fini(&state);
+ return match;
}
static PyObject*
@@ -700,35 +756,40 @@ deepcopy(PyObject** object, PyObject* memo)
if (!copy)
return 0;
- Py_DECREF(*object);
- *object = copy;
+ Py_SETREF(*object, copy);
return 1; /* success */
}
#endif
-static PyObject*
-pattern_findall(PatternObject* self, PyObject* args, PyObject* kw)
+/*[clinic input]
+_sre.SRE_Pattern.findall
+
+ string: object = NULL
+ pos: Py_ssize_t = 0
+ endpos: Py_ssize_t(c_default="PY_SSIZE_T_MAX") = sys.maxsize
+ *
+ source: object = NULL
+
+Return a list of all non-overlapping matches of pattern in string.
+[clinic start generated code]*/
+
+static PyObject *
+_sre_SRE_Pattern_findall_impl(PatternObject *self, PyObject *string,
+ Py_ssize_t pos, Py_ssize_t endpos,
+ PyObject *source)
+/*[clinic end generated code: output=51295498b300639d input=df688355c056b9de]*/
{
SRE_STATE state;
PyObject* list;
Py_ssize_t status;
Py_ssize_t i, b, e;
- PyObject *string = NULL, *string2 = NULL;
- Py_ssize_t start = 0;
- Py_ssize_t end = PY_SSIZE_T_MAX;
- static char* kwlist[] = { "string", "pos", "endpos", "source", NULL };
- if (!PyArg_ParseTupleAndKeywords(args, kw, "|Onn$O:findall", kwlist,
- &string, &start, &end, &string2))
- return NULL;
-
- string = fix_string_param(string, string2, "source");
+ string = fix_string_param(string, source, "source");
if (!string)
return NULL;
- string = state_init(&state, self, string, start, end);
- if (!string)
+ if (!state_init(&state, self, string, pos, endpos))
return NULL;
list = PyList_New(0);
@@ -808,14 +869,28 @@ error:
}
-static PyObject*
-pattern_finditer(PatternObject* pattern, PyObject* args, PyObject* kw)
+/*[clinic input]
+_sre.SRE_Pattern.finditer
+
+ string: object
+ pos: Py_ssize_t = 0
+ endpos: Py_ssize_t(c_default="PY_SSIZE_T_MAX") = sys.maxsize
+
+Return an iterator over all non-overlapping matches for the RE pattern in string.
+
+For each match, the iterator returns a match object.
+[clinic start generated code]*/
+
+static PyObject *
+_sre_SRE_Pattern_finditer_impl(PatternObject *self, PyObject *string,
+ Py_ssize_t pos, Py_ssize_t endpos)
+/*[clinic end generated code: output=0bbb1a0aeb38bb14 input=612aab69e9fe08e4]*/
{
PyObject* scanner;
PyObject* search;
PyObject* iterator;
- scanner = pattern_scanner(pattern, args, kw);
+ scanner = pattern_scanner(self, string, pos, endpos);
if (!scanner)
return NULL;
@@ -830,8 +905,38 @@ pattern_finditer(PatternObject* pattern, PyObject* args, PyObject* kw)
return iterator;
}
-static PyObject*
-pattern_split(PatternObject* self, PyObject* args, PyObject* kw)
+/*[clinic input]
+_sre.SRE_Pattern.scanner
+
+ string: object
+ pos: Py_ssize_t = 0
+ endpos: Py_ssize_t(c_default="PY_SSIZE_T_MAX") = sys.maxsize
+
+[clinic start generated code]*/
+
+static PyObject *
+_sre_SRE_Pattern_scanner_impl(PatternObject *self, PyObject *string,
+ Py_ssize_t pos, Py_ssize_t endpos)
+/*[clinic end generated code: output=54ea548aed33890b input=3aacdbde77a3a637]*/
+{
+ return pattern_scanner(self, string, pos, endpos);
+}
+
+/*[clinic input]
+_sre.SRE_Pattern.split
+
+ string: object = NULL
+ maxsplit: Py_ssize_t = 0
+ *
+ source: object = NULL
+
+Split string by the occurrences of pattern.
+[clinic start generated code]*/
+
+static PyObject *
+_sre_SRE_Pattern_split_impl(PatternObject *self, PyObject *string,
+ Py_ssize_t maxsplit, PyObject *source)
+/*[clinic end generated code: output=20bac2ff55b9f84c input=41e0b2e35e599d7b]*/
{
SRE_STATE state;
PyObject* list;
@@ -841,19 +946,24 @@ pattern_split(PatternObject* self, PyObject* args, PyObject* kw)
Py_ssize_t i;
void* last;
- PyObject *string = NULL, *string2 = NULL;
- Py_ssize_t maxsplit = 0;
- static char* kwlist[] = { "string", "maxsplit", "source", NULL };
- if (!PyArg_ParseTupleAndKeywords(args, kw, "|On$O:split", kwlist,
- &string, &maxsplit, &string2))
- return NULL;
-
- string = fix_string_param(string, string2, "source");
+ string = fix_string_param(string, source, "source");
if (!string)
return NULL;
- string = state_init(&state, self, string, 0, PY_SSIZE_T_MAX);
- if (!string)
+ assert(self->codesize != 0);
+ if (self->code[0] != SRE_OP_INFO || self->code[3] == 0) {
+ if (self->code[0] == SRE_OP_INFO && self->code[4] == 0) {
+ PyErr_SetString(PyExc_ValueError,
+ "split() requires a non-empty pattern match.");
+ return NULL;
+ }
+ if (PyErr_WarnEx(PyExc_FutureWarning,
+ "split() requires a non-empty pattern match.",
+ 1) < 0)
+ return NULL;
+ }
+
+ if (!state_init(&state, self, string, 0, PY_SSIZE_T_MAX))
return NULL;
list = PyList_New(0);
@@ -997,8 +1107,7 @@ pattern_subx(PatternObject* self, PyObject* ptemplate, PyObject* string,
}
}
- string = state_init(&state, self, string, 0, PY_SSIZE_T_MAX);
- if (!string) {
+ if (!state_init(&state, self, string, 0, PY_SSIZE_T_MAX)) {
Py_DECREF(filter);
return NULL;
}
@@ -1140,36 +1249,50 @@ error:
}
-static PyObject*
-pattern_sub(PatternObject* self, PyObject* args, PyObject* kw)
-{
- PyObject* ptemplate;
- PyObject* string;
- Py_ssize_t count = 0;
- static char* kwlist[] = { "repl", "string", "count", NULL };
- if (!PyArg_ParseTupleAndKeywords(args, kw, "OO|n:sub", kwlist,
- &ptemplate, &string, &count))
- return NULL;
+/*[clinic input]
+_sre.SRE_Pattern.sub
- return pattern_subx(self, ptemplate, string, count, 0);
+ repl: object
+ string: object
+ count: Py_ssize_t = 0
+
+Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl.
+[clinic start generated code]*/
+
+static PyObject *
+_sre_SRE_Pattern_sub_impl(PatternObject *self, PyObject *repl,
+ PyObject *string, Py_ssize_t count)
+/*[clinic end generated code: output=1dbf2ec3479cba00 input=c53d70be0b3caf86]*/
+{
+ return pattern_subx(self, repl, string, count, 0);
}
-static PyObject*
-pattern_subn(PatternObject* self, PyObject* args, PyObject* kw)
-{
- PyObject* ptemplate;
- PyObject* string;
- Py_ssize_t count = 0;
- static char* kwlist[] = { "repl", "string", "count", NULL };
- if (!PyArg_ParseTupleAndKeywords(args, kw, "OO|n:subn", kwlist,
- &ptemplate, &string, &count))
- return NULL;
+/*[clinic input]
+_sre.SRE_Pattern.subn
+
+ repl: object
+ string: object
+ count: Py_ssize_t = 0
- return pattern_subx(self, ptemplate, string, count, 1);
+Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl.
+[clinic start generated code]*/
+
+static PyObject *
+_sre_SRE_Pattern_subn_impl(PatternObject *self, PyObject *repl,
+ PyObject *string, Py_ssize_t count)
+/*[clinic end generated code: output=0d9522cd529e9728 input=e7342d7ce6083577]*/
+{
+ return pattern_subx(self, repl, string, count, 1);
}
-static PyObject*
-pattern_copy(PatternObject* self, PyObject *unused)
+/*[clinic input]
+_sre.SRE_Pattern.__copy__
+
+[clinic start generated code]*/
+
+static PyObject *
+_sre_SRE_Pattern___copy___impl(PatternObject *self)
+/*[clinic end generated code: output=85dedc2db1bd8694 input=a730a59d863bc9f5]*/
{
#ifdef USE_BUILTIN_COPY
PatternObject* copy;
@@ -1196,8 +1319,16 @@ pattern_copy(PatternObject* self, PyObject *unused)
#endif
}
-static PyObject*
-pattern_deepcopy(PatternObject* self, PyObject* memo)
+/*[clinic input]
+_sre.SRE_Pattern.__deepcopy__
+
+ memo: object
+
+[clinic start generated code]*/
+
+static PyObject *
+_sre_SRE_Pattern___deepcopy___impl(PatternObject *self, PyObject *memo)
+/*[clinic end generated code: output=75efe69bd12c5d7d input=3959719482c07f70]*/
{
#ifdef USE_BUILTIN_COPY
PatternObject* copy;
@@ -1238,7 +1369,7 @@ pattern_repr(PatternObject *obj)
};
PyObject *result = NULL;
PyObject *flag_items;
- int i;
+ size_t i;
int flags = obj->flags;
/* Omit re.UNICODE for valid string patterns. */
@@ -1299,131 +1430,40 @@ done:
return result;
}
-PyDoc_STRVAR(pattern_match_doc,
-"match(string[, pos[, endpos]]) -> match object or None.\n\
- Matches zero or more characters at the beginning of the string");
-
-PyDoc_STRVAR(pattern_fullmatch_doc,
-"fullmatch(string[, pos[, endpos]]) -> match object or None.\n\
- Matches against all of the string");
-
-PyDoc_STRVAR(pattern_search_doc,
-"search(string[, pos[, endpos]]) -> match object or None.\n\
- Scan through string looking for a match, and return a corresponding\n\
- match object instance. Return None if no position in the string matches.");
-
-PyDoc_STRVAR(pattern_split_doc,
-"split(string[, maxsplit = 0]) -> list.\n\
- Split string by the occurrences of pattern.");
-
-PyDoc_STRVAR(pattern_findall_doc,
-"findall(string[, pos[, endpos]]) -> list.\n\
- Return a list of all non-overlapping matches of pattern in string.");
-
-PyDoc_STRVAR(pattern_finditer_doc,
-"finditer(string[, pos[, endpos]]) -> iterator.\n\
- Return an iterator over all non-overlapping matches for the \n\
- RE pattern in string. For each match, the iterator returns a\n\
- match object.");
-
-PyDoc_STRVAR(pattern_sub_doc,
-"sub(repl, string[, count = 0]) -> newstring.\n\
- Return the string obtained by replacing the leftmost non-overlapping\n\
- occurrences of pattern in string by the replacement repl.");
-
-PyDoc_STRVAR(pattern_subn_doc,
-"subn(repl, string[, count = 0]) -> (newstring, number of subs)\n\
- Return the tuple (new_string, number_of_subs_made) found by replacing\n\
- the leftmost non-overlapping occurrences of pattern with the\n\
- replacement repl.");
-
PyDoc_STRVAR(pattern_doc, "Compiled regular expression objects");
-static PyMethodDef pattern_methods[] = {
- {"match", (PyCFunction) pattern_match, METH_VARARGS|METH_KEYWORDS,
- pattern_match_doc},
- {"fullmatch", (PyCFunction) pattern_fullmatch, METH_VARARGS|METH_KEYWORDS,
- pattern_fullmatch_doc},
- {"search", (PyCFunction) pattern_search, METH_VARARGS|METH_KEYWORDS,
- pattern_search_doc},
- {"sub", (PyCFunction) pattern_sub, METH_VARARGS|METH_KEYWORDS,
- pattern_sub_doc},
- {"subn", (PyCFunction) pattern_subn, METH_VARARGS|METH_KEYWORDS,
- pattern_subn_doc},
- {"split", (PyCFunction) pattern_split, METH_VARARGS|METH_KEYWORDS,
- pattern_split_doc},
- {"findall", (PyCFunction) pattern_findall, METH_VARARGS|METH_KEYWORDS,
- pattern_findall_doc},
- {"finditer", (PyCFunction) pattern_finditer, METH_VARARGS|METH_KEYWORDS,
- pattern_finditer_doc},
- {"scanner", (PyCFunction) pattern_scanner, METH_VARARGS|METH_KEYWORDS},
- {"__copy__", (PyCFunction) pattern_copy, METH_NOARGS},
- {"__deepcopy__", (PyCFunction) pattern_deepcopy, METH_O},
- {NULL, NULL}
-};
+/* PatternObject's 'groupindex' method. */
+static PyObject *
+pattern_groupindex(PatternObject *self)
+{
+ return PyDictProxy_New(self->groupindex);
+}
-#define PAT_OFF(x) offsetof(PatternObject, x)
-static PyMemberDef pattern_members[] = {
- {"pattern", T_OBJECT, PAT_OFF(pattern), READONLY},
- {"flags", T_INT, PAT_OFF(flags), READONLY},
- {"groups", T_PYSSIZET, PAT_OFF(groups), READONLY},
- {"groupindex", T_OBJECT, PAT_OFF(groupindex), READONLY},
- {NULL} /* Sentinel */
-};
+static int _validate(PatternObject *self); /* Forward */
-static PyTypeObject Pattern_Type = {
- PyVarObject_HEAD_INIT(NULL, 0)
- "_" SRE_MODULE ".SRE_Pattern",
- sizeof(PatternObject), sizeof(SRE_CODE),
- (destructor)pattern_dealloc, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)pattern_repr, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
- pattern_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- offsetof(PatternObject, weakreflist), /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- pattern_methods, /* tp_methods */
- pattern_members, /* tp_members */
-};
+/*[clinic input]
+_sre.compile
-static int _validate(PatternObject *self); /* Forward */
+ pattern: object
+ flags: int
+ code: object(subclass_of='&PyList_Type')
+ groups: Py_ssize_t
+ groupindex: object
+ indexgroup: object
+
+[clinic start generated code]*/
static PyObject *
-_compile(PyObject* self_, PyObject* args)
+_sre_compile_impl(PyModuleDef *module, PyObject *pattern, int flags,
+ PyObject *code, Py_ssize_t groups, PyObject *groupindex,
+ PyObject *indexgroup)
+/*[clinic end generated code: output=3004b293730bf309 input=7d059ec8ae1edb85]*/
{
/* "compile" pattern descriptor to pattern object */
PatternObject* self;
Py_ssize_t i, n;
- PyObject* pattern;
- int flags = 0;
- PyObject* code;
- Py_ssize_t groups = 0;
- PyObject* groupindex = NULL;
- PyObject* indexgroup = NULL;
-
- if (!PyArg_ParseTuple(args, "OiO!|nOO", &pattern, &flags,
- &PyList_Type, &code, &groups,
- &groupindex, &indexgroup))
- return NULL;
-
n = PyList_GET_SIZE(code);
/* coverity[ampersand_in_size] */
self = PyObject_NEW_VAR(PatternObject, &Pattern_Type, n);
@@ -1579,6 +1619,7 @@ _validate_charset(SRE_CODE *code, SRE_CODE *end)
break;
case SRE_OP_RANGE:
+ case SRE_OP_RANGE_IGNORE:
GET_ARG;
GET_ARG;
break;
@@ -1935,10 +1976,9 @@ _validate_inner(SRE_CODE *code, SRE_CODE *end, Py_ssize_t groups)
static int
_validate_outer(SRE_CODE *code, SRE_CODE *end, Py_ssize_t groups)
{
- if (groups < 0 || groups > 100 || code >= end || end[-1] != SRE_OP_SUCCESS)
+ if (groups < 0 || (size_t)groups > SRE_MAXGROUPS ||
+ code >= end || end[-1] != SRE_OP_SUCCESS)
FAIL;
- if (groups == 0) /* fix for simplejson */
- groups = 100; /* 100 groups should always be safe */
return _validate_inner(code, end-1, groups);
}
@@ -2036,13 +2076,22 @@ match_getslice(MatchObject* self, PyObject* index, PyObject* def)
return match_getslice_by_index(self, match_getindex(self, index), def);
}
-static PyObject*
-match_expand(MatchObject* self, PyObject* ptemplate)
+/*[clinic input]
+_sre.SRE_Match.expand
+
+ template: object
+
+Return the string obtained by doing backslash substitution on the string template, as done by the sub() method.
+[clinic start generated code]*/
+
+static PyObject *
+_sre_SRE_Match_expand_impl(MatchObject *self, PyObject *template)
+/*[clinic end generated code: output=931b58ccc323c3a1 input=4bfdb22c2f8b146a]*/
{
/* delegate to Python code */
return call(
SRE_PY_MODULE, "_expand",
- PyTuple_Pack(3, self->pattern, self, ptemplate)
+ PyTuple_Pack(3, self->pattern, self, template)
);
}
@@ -2081,24 +2130,29 @@ match_group(MatchObject* self, PyObject* args)
return result;
}
-static PyObject*
-match_groups(MatchObject* self, PyObject* args, PyObject* kw)
+/*[clinic input]
+_sre.SRE_Match.groups
+
+ default: object = None
+ Is used for groups that did not participate in the match.
+
+Return a tuple containing all the subgroups of the match, from 1.
+[clinic start generated code]*/
+
+static PyObject *
+_sre_SRE_Match_groups_impl(MatchObject *self, PyObject *default_value)
+/*[clinic end generated code: output=daf8e2641537238a input=bb069ef55dabca91]*/
{
PyObject* result;
Py_ssize_t index;
- PyObject* def = Py_None;
- static char* kwlist[] = { "default", NULL };
- if (!PyArg_ParseTupleAndKeywords(args, kw, "|O:groups", kwlist, &def))
- return NULL;
-
result = PyTuple_New(self->groups-1);
if (!result)
return NULL;
for (index = 1; index < self->groups; index++) {
PyObject* item;
- item = match_getslice_by_index(self, index, def);
+ item = match_getslice_by_index(self, index, default_value);
if (!item) {
Py_DECREF(result);
return NULL;
@@ -2109,18 +2163,23 @@ match_groups(MatchObject* self, PyObject* args, PyObject* kw)
return result;
}
-static PyObject*
-match_groupdict(MatchObject* self, PyObject* args, PyObject* kw)
+/*[clinic input]
+_sre.SRE_Match.groupdict
+
+ default: object = None
+ Is used for groups that did not participate in the match.
+
+Return a dictionary containing all the named subgroups of the match, keyed by the subgroup name.
+[clinic start generated code]*/
+
+static PyObject *
+_sre_SRE_Match_groupdict_impl(MatchObject *self, PyObject *default_value)
+/*[clinic end generated code: output=29917c9073e41757 input=0ded7960b23780aa]*/
{
PyObject* result;
PyObject* keys;
Py_ssize_t index;
- PyObject* def = Py_None;
- static char* kwlist[] = { "default", NULL };
- if (!PyArg_ParseTupleAndKeywords(args, kw, "|O:groupdict", kwlist, &def))
- return NULL;
-
result = PyDict_New();
if (!result || !self->pattern->groupindex)
return result;
@@ -2136,7 +2195,7 @@ match_groupdict(MatchObject* self, PyObject* args, PyObject* kw)
key = PyList_GET_ITEM(keys, index);
if (!key)
goto failed;
- value = match_getslice(self, key, def);
+ value = match_getslice(self, key, default_value);
if (!value) {
Py_DECREF(key);
goto failed;
@@ -2157,50 +2216,58 @@ failed:
return NULL;
}
-static PyObject*
-match_start(MatchObject* self, PyObject* args)
-{
- Py_ssize_t index;
+/*[clinic input]
+_sre.SRE_Match.start -> Py_ssize_t
- PyObject* index_ = NULL;
- if (!PyArg_UnpackTuple(args, "start", 0, 1, &index_))
- return NULL;
+ group: object(c_default="NULL") = 0
+ /
- index = match_getindex(self, index_);
+Return index of the start of the substring matched by group.
+[clinic start generated code]*/
+
+static Py_ssize_t
+_sre_SRE_Match_start_impl(MatchObject *self, PyObject *group)
+/*[clinic end generated code: output=3f6e7f9df2fb5201 input=ced8e4ed4b33ee6c]*/
+{
+ Py_ssize_t index = match_getindex(self, group);
if (index < 0 || index >= self->groups) {
PyErr_SetString(
PyExc_IndexError,
"no such group"
);
- return NULL;
+ return -1;
}
/* mark is -1 if group is undefined */
- return PyLong_FromSsize_t(self->mark[index*2]);
+ return self->mark[index*2];
}
-static PyObject*
-match_end(MatchObject* self, PyObject* args)
-{
- Py_ssize_t index;
+/*[clinic input]
+_sre.SRE_Match.end -> Py_ssize_t
- PyObject* index_ = NULL;
- if (!PyArg_UnpackTuple(args, "end", 0, 1, &index_))
- return NULL;
+ group: object(c_default="NULL") = 0
+ /
+
+Return index of the end of the substring matched by group.
+[clinic start generated code]*/
- index = match_getindex(self, index_);
+static Py_ssize_t
+_sre_SRE_Match_end_impl(MatchObject *self, PyObject *group)
+/*[clinic end generated code: output=f4240b09911f7692 input=1b799560c7f3d7e6]*/
+{
+ Py_ssize_t index = match_getindex(self, group);
if (index < 0 || index >= self->groups) {
PyErr_SetString(
PyExc_IndexError,
"no such group"
);
- return NULL;
+ return -1;
}
/* mark is -1 if group is undefined */
- return PyLong_FromSsize_t(self->mark[index*2+1]);
+ return self->mark[index*2+1];
}
LOCAL(PyObject*)
@@ -2230,16 +2297,20 @@ _pair(Py_ssize_t i1, Py_ssize_t i2)
return NULL;
}
-static PyObject*
-match_span(MatchObject* self, PyObject* args)
-{
- Py_ssize_t index;
+/*[clinic input]
+_sre.SRE_Match.span
- PyObject* index_ = NULL;
- if (!PyArg_UnpackTuple(args, "span", 0, 1, &index_))
- return NULL;
+ group: object(c_default="NULL") = 0
+ /
- index = match_getindex(self, index_);
+For MatchObject m, return the 2-tuple (m.start(group), m.end(group)).
+[clinic start generated code]*/
+
+static PyObject *
+_sre_SRE_Match_span_impl(MatchObject *self, PyObject *group)
+/*[clinic end generated code: output=f02ae40594d14fe6 input=49092b6008d176d3]*/
+{
+ Py_ssize_t index = match_getindex(self, group);
if (index < 0 || index >= self->groups) {
PyErr_SetString(
@@ -2279,8 +2350,14 @@ match_regs(MatchObject* self)
return regs;
}
-static PyObject*
-match_copy(MatchObject* self, PyObject *unused)
+/*[clinic input]
+_sre.SRE_Match.__copy__
+
+[clinic start generated code]*/
+
+static PyObject *
+_sre_SRE_Match___copy___impl(MatchObject *self)
+/*[clinic end generated code: output=a779c5fc8b5b4eb4 input=3bb4d30b6baddb5b]*/
{
#ifdef USE_BUILTIN_COPY
MatchObject* copy;
@@ -2310,8 +2387,16 @@ match_copy(MatchObject* self, PyObject *unused)
#endif
}
-static PyObject*
-match_deepcopy(MatchObject* self, PyObject* memo)
+/*[clinic input]
+_sre.SRE_Match.__deepcopy__
+
+ memo: object
+
+[clinic start generated code]*/
+
+static PyObject *
+_sre_SRE_Match___deepcopy___impl(MatchObject *self, PyObject *memo)
+/*[clinic end generated code: output=2b657578eb03f4a3 input=b65b72489eac64cc]*/
{
#ifdef USE_BUILTIN_COPY
MatchObject* copy;
@@ -2342,50 +2427,6 @@ PyDoc_STRVAR(match_group_doc,
Return subgroup(s) of the match by indices or names.\n\
For 0 returns the entire match.");
-PyDoc_STRVAR(match_start_doc,
-"start([group=0]) -> int.\n\
- Return index of the start of the substring matched by group.");
-
-PyDoc_STRVAR(match_end_doc,
-"end([group=0]) -> int.\n\
- Return index of the end of the substring matched by group.");
-
-PyDoc_STRVAR(match_span_doc,
-"span([group]) -> tuple.\n\
- For MatchObject m, return the 2-tuple (m.start(group), m.end(group)).");
-
-PyDoc_STRVAR(match_groups_doc,
-"groups([default=None]) -> tuple.\n\
- Return a tuple containing all the subgroups of the match, from 1.\n\
- The default argument is used for groups\n\
- that did not participate in the match");
-
-PyDoc_STRVAR(match_groupdict_doc,
-"groupdict([default=None]) -> dict.\n\
- Return a dictionary containing all the named subgroups of the match,\n\
- keyed by the subgroup name. The default argument is used for groups\n\
- that did not participate in the match");
-
-PyDoc_STRVAR(match_expand_doc,
-"expand(template) -> str.\n\
- Return the string obtained by doing backslash substitution\n\
- on the string template, as done by the sub() method.");
-
-static PyMethodDef match_methods[] = {
- {"group", (PyCFunction) match_group, METH_VARARGS, match_group_doc},
- {"start", (PyCFunction) match_start, METH_VARARGS, match_start_doc},
- {"end", (PyCFunction) match_end, METH_VARARGS, match_end_doc},
- {"span", (PyCFunction) match_span, METH_VARARGS, match_span_doc},
- {"groups", (PyCFunction) match_groups, METH_VARARGS|METH_KEYWORDS,
- match_groups_doc},
- {"groupdict", (PyCFunction) match_groupdict, METH_VARARGS|METH_KEYWORDS,
- match_groupdict_doc},
- {"expand", (PyCFunction) match_expand, METH_O, match_expand_doc},
- {"__copy__", (PyCFunction) match_copy, METH_NOARGS},
- {"__deepcopy__", (PyCFunction) match_deepcopy, METH_O},
- {NULL, NULL}
-};
-
static PyObject *
match_lastindex_get(MatchObject *self)
{
@@ -2436,57 +2477,6 @@ match_repr(MatchObject *self)
}
-static PyGetSetDef match_getset[] = {
- {"lastindex", (getter)match_lastindex_get, (setter)NULL},
- {"lastgroup", (getter)match_lastgroup_get, (setter)NULL},
- {"regs", (getter)match_regs_get, (setter)NULL},
- {NULL}
-};
-
-#define MATCH_OFF(x) offsetof(MatchObject, x)
-static PyMemberDef match_members[] = {
- {"string", T_OBJECT, MATCH_OFF(string), READONLY},
- {"re", T_OBJECT, MATCH_OFF(pattern), READONLY},
- {"pos", T_PYSSIZET, MATCH_OFF(pos), READONLY},
- {"endpos", T_PYSSIZET, MATCH_OFF(endpos), READONLY},
- {NULL}
-};
-
-/* FIXME: implement setattr("string", None) as a special case (to
- detach the associated string, if any */
-
-static PyTypeObject Match_Type = {
- PyVarObject_HEAD_INIT(NULL,0)
- "_" SRE_MODULE ".SRE_Match",
- sizeof(MatchObject), sizeof(Py_ssize_t),
- (destructor)match_dealloc, /* tp_dealloc */
- 0, /* tp_print */
- 0, /* tp_getattr */
- 0, /* tp_setattr */
- 0, /* tp_reserved */
- (reprfunc)match_repr, /* tp_repr */
- 0, /* tp_as_number */
- 0, /* tp_as_sequence */
- 0, /* tp_as_mapping */
- 0, /* tp_hash */
- 0, /* tp_call */
- 0, /* tp_str */
- 0, /* tp_getattro */
- 0, /* tp_setattro */
- 0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
- match_doc, /* tp_doc */
- 0, /* tp_traverse */
- 0, /* tp_clear */
- 0, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- 0, /* tp_iter */
- 0, /* tp_iternext */
- match_methods, /* tp_methods */
- match_members, /* tp_members */
- match_getset, /* tp_getset */
-};
-
static PyObject*
pattern_new_match(PatternObject* pattern, SRE_STATE* state, Py_ssize_t status)
{
@@ -2562,8 +2552,14 @@ scanner_dealloc(ScannerObject* self)
PyObject_DEL(self);
}
-static PyObject*
-scanner_match(ScannerObject* self, PyObject *unused)
+/*[clinic input]
+_sre.SRE_Scanner.match
+
+[clinic start generated code]*/
+
+static PyObject *
+_sre_SRE_Scanner_match_impl(ScannerObject *self)
+/*[clinic end generated code: output=936b30c63d4b81eb input=881a0154f8c13d9a]*/
{
SRE_STATE* state = &self->state;
PyObject* match;
@@ -2596,8 +2592,14 @@ scanner_match(ScannerObject* self, PyObject *unused)
}
-static PyObject*
-scanner_search(ScannerObject* self, PyObject *unused)
+/*[clinic input]
+_sre.SRE_Scanner.search
+
+[clinic start generated code]*/
+
+static PyObject *
+_sre_SRE_Scanner_search_impl(ScannerObject *self)
+/*[clinic end generated code: output=7dc211986088f025 input=161223ee92ef9270]*/
{
SRE_STATE* state = &self->state;
PyObject* match;
@@ -2629,9 +2631,160 @@ scanner_search(ScannerObject* self, PyObject *unused)
return match;
}
+static PyObject *
+pattern_scanner(PatternObject *self, PyObject *string, Py_ssize_t pos, Py_ssize_t endpos)
+{
+ ScannerObject* scanner;
+
+ /* create scanner object */
+ scanner = PyObject_NEW(ScannerObject, &Scanner_Type);
+ if (!scanner)
+ return NULL;
+ scanner->pattern = NULL;
+
+ /* create search state object */
+ if (!state_init(&scanner->state, self, string, pos, endpos)) {
+ Py_DECREF(scanner);
+ return NULL;
+ }
+
+ Py_INCREF(self);
+ scanner->pattern = (PyObject*) self;
+
+ return (PyObject*) scanner;
+}
+
+#include "clinic/_sre.c.h"
+
+static PyMethodDef pattern_methods[] = {
+ _SRE_SRE_PATTERN_MATCH_METHODDEF
+ _SRE_SRE_PATTERN_FULLMATCH_METHODDEF
+ _SRE_SRE_PATTERN_SEARCH_METHODDEF
+ _SRE_SRE_PATTERN_SUB_METHODDEF
+ _SRE_SRE_PATTERN_SUBN_METHODDEF
+ _SRE_SRE_PATTERN_FINDALL_METHODDEF
+ _SRE_SRE_PATTERN_SPLIT_METHODDEF
+ _SRE_SRE_PATTERN_FINDITER_METHODDEF
+ _SRE_SRE_PATTERN_SCANNER_METHODDEF
+ _SRE_SRE_PATTERN___COPY___METHODDEF
+ _SRE_SRE_PATTERN___DEEPCOPY___METHODDEF
+ {NULL, NULL}
+};
+
+static PyGetSetDef pattern_getset[] = {
+ {"groupindex", (getter)pattern_groupindex, (setter)NULL,
+ "A dictionary mapping group names to group numbers."},
+ {NULL} /* Sentinel */
+};
+
+#define PAT_OFF(x) offsetof(PatternObject, x)
+static PyMemberDef pattern_members[] = {
+ {"pattern", T_OBJECT, PAT_OFF(pattern), READONLY},
+ {"flags", T_INT, PAT_OFF(flags), READONLY},
+ {"groups", T_PYSSIZET, PAT_OFF(groups), READONLY},
+ {NULL} /* Sentinel */
+};
+
+static PyTypeObject Pattern_Type = {
+ PyVarObject_HEAD_INIT(NULL, 0)
+ "_" SRE_MODULE ".SRE_Pattern",
+ sizeof(PatternObject), sizeof(SRE_CODE),
+ (destructor)pattern_dealloc, /* tp_dealloc */
+ 0, /* tp_print */
+ 0, /* tp_getattr */
+ 0, /* tp_setattr */
+ 0, /* tp_reserved */
+ (reprfunc)pattern_repr, /* tp_repr */
+ 0, /* tp_as_number */
+ 0, /* tp_as_sequence */
+ 0, /* tp_as_mapping */
+ 0, /* tp_hash */
+ 0, /* tp_call */
+ 0, /* tp_str */
+ 0, /* tp_getattro */
+ 0, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT, /* tp_flags */
+ pattern_doc, /* tp_doc */
+ 0, /* tp_traverse */
+ 0, /* tp_clear */
+ 0, /* tp_richcompare */
+ offsetof(PatternObject, weakreflist), /* tp_weaklistoffset */
+ 0, /* tp_iter */
+ 0, /* tp_iternext */
+ pattern_methods, /* tp_methods */
+ pattern_members, /* tp_members */
+ pattern_getset, /* tp_getset */
+};
+
+
+static PyMethodDef match_methods[] = {
+ {"group", (PyCFunction) match_group, METH_VARARGS, match_group_doc},
+ _SRE_SRE_MATCH_START_METHODDEF
+ _SRE_SRE_MATCH_END_METHODDEF
+ _SRE_SRE_MATCH_SPAN_METHODDEF
+ _SRE_SRE_MATCH_GROUPS_METHODDEF
+ _SRE_SRE_MATCH_GROUPDICT_METHODDEF
+ _SRE_SRE_MATCH_EXPAND_METHODDEF
+ _SRE_SRE_MATCH___COPY___METHODDEF
+ _SRE_SRE_MATCH___DEEPCOPY___METHODDEF
+ {NULL, NULL}
+};
+
+static PyGetSetDef match_getset[] = {
+ {"lastindex", (getter)match_lastindex_get, (setter)NULL},
+ {"lastgroup", (getter)match_lastgroup_get, (setter)NULL},
+ {"regs", (getter)match_regs_get, (setter)NULL},
+ {NULL}
+};
+
+#define MATCH_OFF(x) offsetof(MatchObject, x)
+static PyMemberDef match_members[] = {
+ {"string", T_OBJECT, MATCH_OFF(string), READONLY},
+ {"re", T_OBJECT, MATCH_OFF(pattern), READONLY},
+ {"pos", T_PYSSIZET, MATCH_OFF(pos), READONLY},
+ {"endpos", T_PYSSIZET, MATCH_OFF(endpos), READONLY},
+ {NULL}
+};
+
+/* FIXME: implement setattr("string", None) as a special case (to
+ detach the associated string, if any */
+
+static PyTypeObject Match_Type = {
+ PyVarObject_HEAD_INIT(NULL,0)
+ "_" SRE_MODULE ".SRE_Match",
+ sizeof(MatchObject), sizeof(Py_ssize_t),
+ (destructor)match_dealloc, /* tp_dealloc */
+ 0, /* tp_print */
+ 0, /* tp_getattr */
+ 0, /* tp_setattr */
+ 0, /* tp_reserved */
+ (reprfunc)match_repr, /* tp_repr */
+ 0, /* tp_as_number */
+ 0, /* tp_as_sequence */
+ 0, /* tp_as_mapping */
+ 0, /* tp_hash */
+ 0, /* tp_call */
+ 0, /* tp_str */
+ 0, /* tp_getattro */
+ 0, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT, /* tp_flags */
+ match_doc, /* tp_doc */
+ 0, /* tp_traverse */
+ 0, /* tp_clear */
+ 0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ 0, /* tp_iter */
+ 0, /* tp_iternext */
+ match_methods, /* tp_methods */
+ match_members, /* tp_members */
+ match_getset, /* tp_getset */
+};
+
static PyMethodDef scanner_methods[] = {
- {"match", (PyCFunction) scanner_match, METH_NOARGS},
- {"search", (PyCFunction) scanner_search, METH_NOARGS},
+ _SRE_SRE_SCANNER_MATCH_METHODDEF
+ _SRE_SRE_SCANNER_SEARCH_METHODDEF
{NULL, NULL}
};
@@ -2673,47 +2826,10 @@ static PyTypeObject Scanner_Type = {
0, /* tp_getset */
};
-static PyObject*
-pattern_scanner(PatternObject* pattern, PyObject* args, PyObject* kw)
-{
- /* create search state object */
-
- ScannerObject* self;
-
- PyObject *string = NULL, *string2 = NULL;
- Py_ssize_t start = 0;
- Py_ssize_t end = PY_SSIZE_T_MAX;
- static char* kwlist[] = { "string", "pos", "endpos", "source", NULL };
- if (!PyArg_ParseTupleAndKeywords(args, kw, "|Onn$O:scanner", kwlist,
- &string, &start, &end, &string2))
- return NULL;
-
- string = fix_string_param(string, string2, "source");
- if (!string)
- return NULL;
-
- /* create scanner object */
- self = PyObject_NEW(ScannerObject, &Scanner_Type);
- if (!self)
- return NULL;
- self->pattern = NULL;
-
- string = state_init(&self->state, pattern, string, start, end);
- if (!string) {
- Py_DECREF(self);
- return NULL;
- }
-
- Py_INCREF(pattern);
- self->pattern = (PyObject*) pattern;
-
- return (PyObject*) self;
-}
-
static PyMethodDef _functions[] = {
- {"compile", _compile, METH_VARARGS},
- {"getcodesize", sre_codesize, METH_NOARGS},
- {"getlower", sre_getlower, METH_VARARGS},
+ _SRE_COMPILE_METHODDEF
+ _SRE_GETCODESIZE_METHODDEF
+ _SRE_GETLOWER_METHODDEF
{NULL, NULL}
};
@@ -2763,6 +2879,12 @@ PyMODINIT_FUNC PyInit__sre(void)
Py_DECREF(x);
}
+ x = PyLong_FromUnsignedLong(SRE_MAXGROUPS);
+ if (x) {
+ PyDict_SetItemString(d, "MAXGROUPS", x);
+ Py_DECREF(x);
+ }
+
x = PyUnicode_FromString(copyright);
if (x) {
PyDict_SetItemString(d, "copyright", x);
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index 02971a7515..1117b5561c 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -64,6 +64,7 @@ static PySocketModule_APIObject PySocketModule;
#include "openssl/ssl.h"
#include "openssl/err.h"
#include "openssl/rand.h"
+#include "openssl/bio.h"
/* SSL error object */
static PyObject *PySSLErrorObject;
@@ -108,6 +109,10 @@ struct py_ssl_library_code {
# define HAVE_SNI 0
#endif
+#ifdef TLSEXT_TYPE_application_layer_protocol_negotiation
+# define HAVE_ALPN
+#endif
+
enum py_ssl_error {
/* these mirror ssl.h */
PY_SSL_ERROR_NONE,
@@ -161,13 +166,6 @@ static unsigned int _ssl_locks_count = 0;
#define X509_NAME_MAXLEN 256
-/* RAND_* APIs got added to OpenSSL in 0.9.5 */
-#if OPENSSL_VERSION_NUMBER >= 0x0090500fL
-# define HAVE_OPENSSL_RAND 1
-#else
-# undef HAVE_OPENSSL_RAND
-#endif
-
/* SSL_CTX_clear_options() and SSL_clear_options() were first added in
* OpenSSL 0.9.8m but do not appear in some 0.9.9-dev versions such the
* 0.9.9 from "May 2008" that NetBSD 5.0 uses. */
@@ -181,36 +179,18 @@ static unsigned int _ssl_locks_count = 0;
* older SSL, but let's be safe */
#define PySSL_CB_MAXLEN 128
-/* SSL_get_finished got added to OpenSSL in 0.9.5 */
-#if OPENSSL_VERSION_NUMBER >= 0x0090500fL
-# define HAVE_OPENSSL_FINISHED 1
-#else
-# define HAVE_OPENSSL_FINISHED 0
-#endif
-
-/* ECDH support got added to OpenSSL in 0.9.8 */
-#if OPENSSL_VERSION_NUMBER < 0x0090800fL && !defined(OPENSSL_NO_ECDH)
-# define OPENSSL_NO_ECDH
-#endif
-
-/* compression support got added to OpenSSL in 0.9.8 */
-#if OPENSSL_VERSION_NUMBER < 0x0090800fL && !defined(OPENSSL_NO_COMP)
-# define OPENSSL_NO_COMP
-#endif
-
-/* X509_VERIFY_PARAM got added to OpenSSL in 0.9.8 */
-#if OPENSSL_VERSION_NUMBER >= 0x0090800fL
-# define HAVE_OPENSSL_VERIFY_PARAM
-#endif
-
typedef struct {
PyObject_HEAD
SSL_CTX *ctx;
#ifdef OPENSSL_NPN_NEGOTIATED
- char *npn_protocols;
+ unsigned char *npn_protocols;
int npn_protocols_len;
#endif
+#ifdef HAVE_ALPN
+ unsigned char *alpn_protocols;
+ int alpn_protocols_len;
+#endif
#ifndef OPENSSL_NO_TLSEXT
PyObject *set_hostname;
#endif
@@ -226,20 +206,35 @@ typedef struct {
char shutdown_seen_zero;
char handshake_done;
enum py_ssl_server_or_client socket_type;
+ PyObject *owner; /* Python level "owner" passed to servername callback */
+ PyObject *server_hostname;
} PySSLSocket;
+typedef struct {
+ PyObject_HEAD
+ BIO *bio;
+ int eof_written;
+} PySSLMemoryBIO;
+
static PyTypeObject PySSLContext_Type;
static PyTypeObject PySSLSocket_Type;
+static PyTypeObject PySSLMemoryBIO_Type;
+
+/*[clinic input]
+module _ssl
+class _ssl._SSLContext "PySSLContext *" "&PySSLContext_Type"
+class _ssl._SSLSocket "PySSLSocket *" "&PySSLSocket_Type"
+class _ssl.MemoryBIO "PySSLMemoryBIO *" "&PySSLMemoryBIO_Type"
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=7bf7cb832638e2e1]*/
-static PyObject *PySSL_SSLwrite(PySSLSocket *self, PyObject *args);
-static PyObject *PySSL_SSLread(PySSLSocket *self, PyObject *args);
-static int check_socket_and_wait_for_timeout(PySocketSockObject *s,
- int writing);
-static PyObject *PySSL_peercert(PySSLSocket *self, PyObject *args);
-static PyObject *PySSL_cipher(PySSLSocket *self);
+#include "clinic/_ssl.c.h"
+
+static int PySSL_select(PySocketSockObject *s, int writing, _PyTime_t timeout);
#define PySSLContext_Check(v) (Py_TYPE(v) == &PySSLContext_Type)
#define PySSLSocket_Check(v) (Py_TYPE(v) == &PySSLSocket_Type)
+#define PySSLMemoryBIO_Check(v) (Py_TYPE(v) == &PySSLMemoryBIO_Type)
typedef enum {
SOCKET_IS_NONBLOCKING,
@@ -251,11 +246,16 @@ typedef enum {
} timeout_state;
/* Wrap error strings with filename and line # */
-#define STRINGIFY1(x) #x
-#define STRINGIFY2(x) STRINGIFY1(x)
#define ERRSTR1(x,y,z) (x ":" y ": " z)
-#define ERRSTR(x) ERRSTR1("_ssl.c", STRINGIFY2(__LINE__), x)
+#define ERRSTR(x) ERRSTR1("_ssl.c", Py_STRINGIFY(__LINE__), x)
+
+/* Get the socket from a PySSLSocket, if it has one */
+#define GET_SOCKET(obj) ((obj)->Socket ? \
+ (PySocketSockObject *) PyWeakref_GetObject((obj)->Socket) : NULL)
+/* If sock is NULL, use a timeout of 0 second */
+#define GET_SOCKET_TIMEOUT(sock) \
+ ((sock != NULL) ? (sock)->sock_timeout : 0)
/*
* SSL errors.
@@ -419,13 +419,12 @@ PySSL_SetError(PySSLSocket *obj, int ret, char *filename, int lineno)
case SSL_ERROR_SYSCALL:
{
if (e == 0) {
- PySocketSockObject *s
- = (PySocketSockObject *) PyWeakref_GetObject(obj->Socket);
+ PySocketSockObject *s = GET_SOCKET(obj);
if (ret == 0 || (((PyObject *)s) == Py_None)) {
p = PY_SSL_ERROR_EOF;
type = PySSLEOFErrorObject;
errstr = "EOF occurred in violation of protocol";
- } else if (ret == -1) {
+ } else if (s && ret == -1) {
/* underlying BIO reported an I/O error */
Py_INCREF(s);
ERR_clear_error();
@@ -479,10 +478,12 @@ _setSSLError (char *errstr, int errcode, char *filename, int lineno) {
static PySSLSocket *
newPySSLSocket(PySSLContext *sslctx, PySocketSockObject *sock,
enum py_ssl_server_or_client socket_type,
- char *server_hostname)
+ char *server_hostname,
+ PySSLMemoryBIO *inbio, PySSLMemoryBIO *outbio)
{
PySSLSocket *self;
SSL_CTX *ctx = sslctx->ctx;
+ PyObject *hostname;
long mode;
self = PyObject_New(PySSLSocket, &PySSLSocket_Type);
@@ -495,6 +496,18 @@ newPySSLSocket(PySSLContext *sslctx, PySocketSockObject *sock,
self->ctx = sslctx;
self->shutdown_seen_zero = 0;
self->handshake_done = 0;
+ self->owner = NULL;
+ if (server_hostname != NULL) {
+ hostname = PyUnicode_Decode(server_hostname, strlen(server_hostname),
+ "idna", "strict");
+ if (hostname == NULL) {
+ Py_DECREF(self);
+ return NULL;
+ }
+ self->server_hostname = hostname;
+ } else
+ self->server_hostname = NULL;
+
Py_INCREF(sslctx);
/* Make sure the SSL error state is initialized */
@@ -504,8 +517,17 @@ newPySSLSocket(PySSLContext *sslctx, PySocketSockObject *sock,
PySSL_BEGIN_ALLOW_THREADS
self->ssl = SSL_new(ctx);
PySSL_END_ALLOW_THREADS
- SSL_set_app_data(self->ssl,self);
- SSL_set_fd(self->ssl, Py_SAFE_DOWNCAST(sock->sock_fd, SOCKET_T, int));
+ SSL_set_app_data(self->ssl, self);
+ if (sock) {
+ SSL_set_fd(self->ssl, Py_SAFE_DOWNCAST(sock->sock_fd, SOCKET_T, int));
+ } else {
+ /* BIOs are reference counted and SSL_set_bio borrows our reference.
+ * To prevent a double free in memory_bio_dealloc() we need to take an
+ * extra reference here. */
+ CRYPTO_add(&inbio->bio->references, 1, CRYPTO_LOCK_BIO);
+ CRYPTO_add(&outbio->bio->references, 1, CRYPTO_LOCK_BIO);
+ SSL_set_bio(self->ssl, inbio->bio, outbio->bio);
+ }
mode = SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER;
#ifdef SSL_MODE_AUTO_RETRY
mode |= SSL_MODE_AUTO_RETRY;
@@ -520,7 +542,7 @@ newPySSLSocket(PySSLContext *sslctx, PySocketSockObject *sock,
/* If the socket is in non-blocking mode or timeout mode, set the BIO
* to non-blocking mode (blocking is the default)
*/
- if (sock->sock_timeout >= 0.0) {
+ if (sock && sock->sock_timeout >= 0) {
BIO_set_nbio(SSL_get_rbio(self->ssl), 1);
BIO_set_nbio(SSL_get_wbio(self->ssl), 1);
}
@@ -533,35 +555,52 @@ newPySSLSocket(PySSLContext *sslctx, PySocketSockObject *sock,
PySSL_END_ALLOW_THREADS
self->socket_type = socket_type;
- self->Socket = PyWeakref_NewRef((PyObject *) sock, NULL);
- if (self->Socket == NULL) {
- Py_DECREF(self);
- return NULL;
+ if (sock != NULL) {
+ self->Socket = PyWeakref_NewRef((PyObject *) sock, NULL);
+ if (self->Socket == NULL) {
+ Py_DECREF(self);
+ Py_XDECREF(self->server_hostname);
+ return NULL;
+ }
}
return self;
}
/* SSL object methods */
-static PyObject *PySSL_SSLdo_handshake(PySSLSocket *self)
+/*[clinic input]
+_ssl._SSLSocket.do_handshake
+[clinic start generated code]*/
+
+static PyObject *
+_ssl__SSLSocket_do_handshake_impl(PySSLSocket *self)
+/*[clinic end generated code: output=6c0898a8936548f6 input=d2d737de3df018c8]*/
{
int ret;
int err;
int sockstate, nonblocking;
- PySocketSockObject *sock
- = (PySocketSockObject *) PyWeakref_GetObject(self->Socket);
+ PySocketSockObject *sock = GET_SOCKET(self);
+ _PyTime_t timeout, deadline = 0;
+ int has_timeout;
+
+ if (sock) {
+ if (((PyObject*)sock) == Py_None) {
+ _setSSLError("Underlying socket connection gone",
+ PY_SSL_ERROR_NO_SOCKET, __FILE__, __LINE__);
+ return NULL;
+ }
+ Py_INCREF(sock);
- if (((PyObject*)sock) == Py_None) {
- _setSSLError("Underlying socket connection gone",
- PY_SSL_ERROR_NO_SOCKET, __FILE__, __LINE__);
- return NULL;
+ /* just in case the blocking state of the socket has been changed */
+ nonblocking = (sock->sock_timeout >= 0);
+ BIO_set_nbio(SSL_get_rbio(self->ssl), nonblocking);
+ BIO_set_nbio(SSL_get_wbio(self->ssl), nonblocking);
}
- Py_INCREF(sock);
- /* just in case the blocking state of the socket has been changed */
- nonblocking = (sock->sock_timeout >= 0.0);
- BIO_set_nbio(SSL_get_rbio(self->ssl), nonblocking);
- BIO_set_nbio(SSL_get_wbio(self->ssl), nonblocking);
+ timeout = GET_SOCKET_TIMEOUT(sock);
+ has_timeout = (timeout > 0);
+ if (has_timeout)
+ deadline = _PyTime_GetMonotonicClock() + timeout;
/* Actually negotiate SSL connection */
/* XXX If SSL_do_handshake() returns 0, it's also a failure. */
@@ -570,15 +609,21 @@ static PyObject *PySSL_SSLdo_handshake(PySSLSocket *self)
ret = SSL_do_handshake(self->ssl);
err = SSL_get_error(self->ssl, ret);
PySSL_END_ALLOW_THREADS
+
if (PyErr_CheckSignals())
goto error;
+
+ if (has_timeout)
+ timeout = deadline - _PyTime_GetMonotonicClock();
+
if (err == SSL_ERROR_WANT_READ) {
- sockstate = check_socket_and_wait_for_timeout(sock, 0);
+ sockstate = PySSL_select(sock, 0, timeout);
} else if (err == SSL_ERROR_WANT_WRITE) {
- sockstate = check_socket_and_wait_for_timeout(sock, 1);
+ sockstate = PySSL_select(sock, 1, timeout);
} else {
sockstate = SOCKET_OPERATION_OK;
}
+
if (sockstate == SOCKET_HAS_TIMED_OUT) {
PyErr_SetString(PySocketModule.timeout_error,
ERRSTR("The handshake operation timed out"));
@@ -595,7 +640,7 @@ static PyObject *PySSL_SSLdo_handshake(PySSLSocket *self)
break;
}
} while (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE);
- Py_DECREF(sock);
+ Py_XDECREF(sock);
if (ret < 1)
return PySSL_SetError(self, ret, __FILE__, __LINE__);
@@ -610,7 +655,7 @@ static PyObject *PySSL_SSLdo_handshake(PySSLSocket *self)
return Py_None;
error:
- Py_DECREF(sock);
+ Py_XDECREF(sock);
return NULL;
}
@@ -779,12 +824,7 @@ _get_peer_alt_names (X509 *certificate) {
char buf[2048];
char *vptr;
int len;
- /* Issue #2973: ASN1_item_d2i() API changed in OpenSSL 0.9.6m */
-#if OPENSSL_VERSION_NUMBER >= 0x009060dfL
const unsigned char *p;
-#else
- unsigned char *p;
-#endif
if (certificate == NULL)
return peer_alt_names;
@@ -1273,25 +1313,28 @@ _certificate_to_der(X509 *certificate)
return retval;
}
-static PyObject *
-PySSL_test_decode_certificate (PyObject *mod, PyObject *args) {
+/*[clinic input]
+_ssl._test_decode_cert
+ path: object(converter="PyUnicode_FSConverter")
+ /
+
+[clinic start generated code]*/
+static PyObject *
+_ssl__test_decode_cert_impl(PyModuleDef *module, PyObject *path)
+/*[clinic end generated code: output=679e01db282804e9 input=cdeaaf02d4346628]*/
+{
PyObject *retval = NULL;
- PyObject *filename;
X509 *x=NULL;
BIO *cert;
- if (!PyArg_ParseTuple(args, "O&:test_decode_certificate",
- PyUnicode_FSConverter, &filename))
- return NULL;
-
if ((cert=BIO_new(BIO_s_file())) == NULL) {
PyErr_SetString(PySSLErrorObject,
"Can't malloc memory to read file");
goto fail0;
}
- if (BIO_read_filename(cert, PyBytes_AsString(filename)) <= 0) {
+ if (BIO_read_filename(cert, PyBytes_AsString(path)) <= 0) {
PyErr_SetString(PySSLErrorObject,
"Can't open file");
goto fail0;
@@ -1308,20 +1351,33 @@ PySSL_test_decode_certificate (PyObject *mod, PyObject *args) {
X509_free(x);
fail0:
- Py_DECREF(filename);
+ Py_DECREF(path);
if (cert != NULL) BIO_free(cert);
return retval;
}
+/*[clinic input]
+_ssl._SSLSocket.peer_certificate
+ der as binary_mode: bool = False
+ /
+
+Returns the certificate for the peer.
+
+If no certificate was provided, returns None. If a certificate was
+provided, but not validated, returns an empty dictionary. Otherwise
+returns a dict containing information about the peer certificate.
+
+If the optional argument is True, returns a DER-encoded copy of the
+peer certificate, or None if no certificate was provided. This will
+return the certificate even if it wasn't validated.
+[clinic start generated code]*/
+
static PyObject *
-PySSL_peercert(PySSLSocket *self, PyObject *args)
+_ssl__SSLSocket_peer_certificate_impl(PySSLSocket *self, int binary_mode)
+/*[clinic end generated code: output=f0dc3e4d1d818a1d input=8281bd1d193db843]*/
{
int verification;
- int binary_mode = 0;
-
- if (!PyArg_ParseTuple(args, "|p:peer_certificate", &binary_mode))
- return NULL;
if (!self->handshake_done) {
PyErr_SetString(PyExc_ValueError,
@@ -1343,68 +1399,123 @@ PySSL_peercert(PySSLSocket *self, PyObject *args)
}
}
-PyDoc_STRVAR(PySSL_peercert_doc,
-"peer_certificate([der=False]) -> certificate\n\
-\n\
-Returns the certificate for the peer. If no certificate was provided,\n\
-returns None. If a certificate was provided, but not validated, returns\n\
-an empty dictionary. Otherwise returns a dict containing information\n\
-about the peer certificate.\n\
-\n\
-If the optional argument is True, returns a DER-encoded copy of the\n\
-peer certificate, or None if no certificate was provided. This will\n\
-return the certificate even if it wasn't validated.");
-
-static PyObject *PySSL_cipher (PySSLSocket *self) {
-
- PyObject *retval, *v;
- const SSL_CIPHER *current;
- char *cipher_name;
- char *cipher_protocol;
-
- if (self->ssl == NULL)
- Py_RETURN_NONE;
- current = SSL_get_current_cipher(self->ssl);
- if (current == NULL)
- Py_RETURN_NONE;
-
- retval = PyTuple_New(3);
+static PyObject *
+cipher_to_tuple(const SSL_CIPHER *cipher)
+{
+ const char *cipher_name, *cipher_protocol;
+ PyObject *v, *retval = PyTuple_New(3);
if (retval == NULL)
return NULL;
- cipher_name = (char *) SSL_CIPHER_get_name(current);
+ cipher_name = SSL_CIPHER_get_name(cipher);
if (cipher_name == NULL) {
Py_INCREF(Py_None);
PyTuple_SET_ITEM(retval, 0, Py_None);
} else {
v = PyUnicode_FromString(cipher_name);
if (v == NULL)
- goto fail0;
+ goto fail;
PyTuple_SET_ITEM(retval, 0, v);
}
- cipher_protocol = (char *) SSL_CIPHER_get_version(current);
+
+ cipher_protocol = SSL_CIPHER_get_version(cipher);
if (cipher_protocol == NULL) {
Py_INCREF(Py_None);
PyTuple_SET_ITEM(retval, 1, Py_None);
} else {
v = PyUnicode_FromString(cipher_protocol);
if (v == NULL)
- goto fail0;
+ goto fail;
PyTuple_SET_ITEM(retval, 1, v);
}
- v = PyLong_FromLong(SSL_CIPHER_get_bits(current, NULL));
+
+ v = PyLong_FromLong(SSL_CIPHER_get_bits(cipher, NULL));
if (v == NULL)
- goto fail0;
+ goto fail;
PyTuple_SET_ITEM(retval, 2, v);
+
return retval;
- fail0:
+ fail:
Py_DECREF(retval);
return NULL;
}
+/*[clinic input]
+_ssl._SSLSocket.shared_ciphers
+[clinic start generated code]*/
+
+static PyObject *
+_ssl__SSLSocket_shared_ciphers_impl(PySSLSocket *self)
+/*[clinic end generated code: output=3d174ead2e42c4fd input=0bfe149da8fe6306]*/
+{
+ SSL_SESSION *sess = SSL_get_session(self->ssl);
+ STACK_OF(SSL_CIPHER) *ciphers;
+ int i;
+ PyObject *res;
+
+ if (!sess || !sess->ciphers)
+ Py_RETURN_NONE;
+ ciphers = sess->ciphers;
+ res = PyList_New(sk_SSL_CIPHER_num(ciphers));
+ if (!res)
+ return NULL;
+ for (i = 0; i < sk_SSL_CIPHER_num(ciphers); i++) {
+ PyObject *tup = cipher_to_tuple(sk_SSL_CIPHER_value(ciphers, i));
+ if (!tup) {
+ Py_DECREF(res);
+ return NULL;
+ }
+ PyList_SET_ITEM(res, i, tup);
+ }
+ return res;
+}
+
+/*[clinic input]
+_ssl._SSLSocket.cipher
+[clinic start generated code]*/
+
+static PyObject *
+_ssl__SSLSocket_cipher_impl(PySSLSocket *self)
+/*[clinic end generated code: output=376417c16d0e5815 input=548fb0e27243796d]*/
+{
+ const SSL_CIPHER *current;
+
+ if (self->ssl == NULL)
+ Py_RETURN_NONE;
+ current = SSL_get_current_cipher(self->ssl);
+ if (current == NULL)
+ Py_RETURN_NONE;
+ return cipher_to_tuple(current);
+}
+
+/*[clinic input]
+_ssl._SSLSocket.version
+[clinic start generated code]*/
+
+static PyObject *
+_ssl__SSLSocket_version_impl(PySSLSocket *self)
+/*[clinic end generated code: output=178aed33193b2cdb input=900186a503436fd6]*/
+{
+ const char *version;
+
+ if (self->ssl == NULL)
+ Py_RETURN_NONE;
+ version = SSL_get_version(self->ssl);
+ if (!strcmp(version, "unknown"))
+ Py_RETURN_NONE;
+ return PyUnicode_FromString(version);
+}
+
#ifdef OPENSSL_NPN_NEGOTIATED
-static PyObject *PySSL_selected_npn_protocol(PySSLSocket *self) {
+/*[clinic input]
+_ssl._SSLSocket.selected_npn_protocol
+[clinic start generated code]*/
+
+static PyObject *
+_ssl__SSLSocket_selected_npn_protocol_impl(PySSLSocket *self)
+/*[clinic end generated code: output=b91d494cd207ecf6 input=c28fde139204b826]*/
+{
const unsigned char *out;
unsigned int outlen;
@@ -1413,11 +1524,38 @@ static PyObject *PySSL_selected_npn_protocol(PySSLSocket *self) {
if (out == NULL)
Py_RETURN_NONE;
- return PyUnicode_FromStringAndSize((char *) out, outlen);
+ return PyUnicode_FromStringAndSize((char *)out, outlen);
}
#endif
-static PyObject *PySSL_compression(PySSLSocket *self) {
+#ifdef HAVE_ALPN
+/*[clinic input]
+_ssl._SSLSocket.selected_alpn_protocol
+[clinic start generated code]*/
+
+static PyObject *
+_ssl__SSLSocket_selected_alpn_protocol_impl(PySSLSocket *self)
+/*[clinic end generated code: output=ec33688b303d250f input=442de30e35bc2913]*/
+{
+ const unsigned char *out;
+ unsigned int outlen;
+
+ SSL_get0_alpn_selected(self->ssl, &out, &outlen);
+
+ if (out == NULL)
+ Py_RETURN_NONE;
+ return PyUnicode_FromStringAndSize((char *)out, outlen);
+}
+#endif
+
+/*[clinic input]
+_ssl._SSLSocket.compression
+[clinic start generated code]*/
+
+static PyObject *
+_ssl__SSLSocket_compression_impl(PySSLSocket *self)
+/*[clinic end generated code: output=bd16cb1bb4646ae7 input=5d059d0a2bbc32c8]*/
+{
#ifdef OPENSSL_NO_COMP
Py_RETURN_NONE;
#else
@@ -1451,8 +1589,7 @@ static int PySSL_set_context(PySSLSocket *self, PyObject *value,
return -1;
#else
Py_INCREF(value);
- Py_DECREF(self->ctx);
- self->ctx = (PySSLContext *) value;
+ Py_SETREF(self->ctx, (PySSLContext *)value);
SSL_set_SSL_CTX(self->ssl, self->ctx->ctx);
#endif
} else {
@@ -1472,6 +1609,53 @@ on the SSLContext to change the certificate information associated with the\n\
SSLSocket before the cryptographic exchange handshake messages\n");
+static PyObject *
+PySSL_get_server_side(PySSLSocket *self, void *c)
+{
+ return PyBool_FromLong(self->socket_type == PY_SSL_SERVER);
+}
+
+PyDoc_STRVAR(PySSL_get_server_side_doc,
+"Whether this is a server-side socket.");
+
+static PyObject *
+PySSL_get_server_hostname(PySSLSocket *self, void *c)
+{
+ if (self->server_hostname == NULL)
+ Py_RETURN_NONE;
+ Py_INCREF(self->server_hostname);
+ return self->server_hostname;
+}
+
+PyDoc_STRVAR(PySSL_get_server_hostname_doc,
+"The currently set server hostname (for SNI).");
+
+static PyObject *
+PySSL_get_owner(PySSLSocket *self, void *c)
+{
+ PyObject *owner;
+
+ if (self->owner == NULL)
+ Py_RETURN_NONE;
+
+ owner = PyWeakref_GetObject(self->owner);
+ Py_INCREF(owner);
+ return owner;
+}
+
+static int
+PySSL_set_owner(PySSLSocket *self, PyObject *value, void *c)
+{
+ Py_XSETREF(self->owner, PyWeakref_NewRef(value, NULL));
+ if (self->owner == NULL)
+ return -1;
+ return 0;
+}
+
+PyDoc_STRVAR(PySSL_get_owner_doc,
+"The Python-level owner of this object.\
+Passed as \"self\" in servername callback.");
+
static void PySSL_dealloc(PySSLSocket *self)
{
@@ -1481,6 +1665,8 @@ static void PySSL_dealloc(PySSLSocket *self)
SSL_free(self->ssl);
Py_XDECREF(self->Socket);
Py_XDECREF(self->ctx);
+ Py_XDECREF(self->server_hostname);
+ Py_XDECREF(self->owner);
PyObject_Del(self);
}
@@ -1490,17 +1676,27 @@ static void PySSL_dealloc(PySSLSocket *self)
*/
static int
-check_socket_and_wait_for_timeout(PySocketSockObject *s, int writing)
+PySSL_select(PySocketSockObject *s, int writing, _PyTime_t timeout)
{
+ int rc;
+#ifdef HAVE_POLL
+ struct pollfd pollfd;
+ _PyTime_t ms;
+#else
+ int nfds;
fd_set fds;
struct timeval tv;
- int rc;
+#endif
/* Nothing to do unless we're in timeout mode (not non-blocking) */
- if (s->sock_timeout < 0.0)
- return SOCKET_IS_BLOCKING;
- else if (s->sock_timeout == 0.0)
+ if ((s == NULL) || (timeout == 0))
return SOCKET_IS_NONBLOCKING;
+ else if (timeout < 0) {
+ if (s->sock_timeout > 0)
+ return SOCKET_HAS_TIMED_OUT;
+ else
+ return SOCKET_IS_BLOCKING;
+ }
/* Guard against closed socket */
if (s->sock_fd < 0)
@@ -1509,85 +1705,91 @@ check_socket_and_wait_for_timeout(PySocketSockObject *s, int writing)
/* Prefer poll, if available, since you can poll() any fd
* which can't be done with select(). */
#ifdef HAVE_POLL
- {
- struct pollfd pollfd;
- int timeout;
+ pollfd.fd = s->sock_fd;
+ pollfd.events = writing ? POLLOUT : POLLIN;
- pollfd.fd = s->sock_fd;
- pollfd.events = writing ? POLLOUT : POLLIN;
-
- /* s->sock_timeout is in seconds, timeout in ms */
- timeout = (int)(s->sock_timeout * 1000 + 0.5);
- PySSL_BEGIN_ALLOW_THREADS
- rc = poll(&pollfd, 1, timeout);
- PySSL_END_ALLOW_THREADS
-
- goto normal_return;
- }
-#endif
+ /* timeout is in seconds, poll() uses milliseconds */
+ ms = (int)_PyTime_AsMilliseconds(timeout, _PyTime_ROUND_CEILING);
+ assert(ms <= INT_MAX);
+ PySSL_BEGIN_ALLOW_THREADS
+ rc = poll(&pollfd, 1, (int)ms);
+ PySSL_END_ALLOW_THREADS
+#else
/* Guard against socket too large for select*/
if (!_PyIsSelectable_fd(s->sock_fd))
return SOCKET_TOO_LARGE_FOR_SELECT;
- /* Construct the arguments to select */
- tv.tv_sec = (int)s->sock_timeout;
- tv.tv_usec = (int)((s->sock_timeout - tv.tv_sec) * 1e6);
+ _PyTime_AsTimeval_noraise(timeout, &tv, _PyTime_ROUND_CEILING);
+
FD_ZERO(&fds);
FD_SET(s->sock_fd, &fds);
- /* See if the socket is ready */
+ /* Wait until the socket becomes ready */
PySSL_BEGIN_ALLOW_THREADS
+ nfds = Py_SAFE_DOWNCAST(s->sock_fd+1, SOCKET_T, int);
if (writing)
- rc = select(Py_SAFE_DOWNCAST(s->sock_fd+1, SOCKET_T, int),
- NULL, &fds, NULL, &tv);
+ rc = select(nfds, NULL, &fds, NULL, &tv);
else
- rc = select(Py_SAFE_DOWNCAST(s->sock_fd+1, SOCKET_T, int),
- &fds, NULL, NULL, &tv);
+ rc = select(nfds, &fds, NULL, NULL, &tv);
PySSL_END_ALLOW_THREADS
-
-#ifdef HAVE_POLL
-normal_return:
#endif
+
/* Return SOCKET_TIMED_OUT on timeout, SOCKET_OPERATION_OK otherwise
(when we are able to write or when there's something to read) */
return rc == 0 ? SOCKET_HAS_TIMED_OUT : SOCKET_OPERATION_OK;
}
-static PyObject *PySSL_SSLwrite(PySSLSocket *self, PyObject *args)
+/*[clinic input]
+_ssl._SSLSocket.write
+ b: Py_buffer
+ /
+
+Writes the bytes-like object b into the SSL object.
+
+Returns the number of bytes written.
+[clinic start generated code]*/
+
+static PyObject *
+_ssl__SSLSocket_write_impl(PySSLSocket *self, Py_buffer *b)
+/*[clinic end generated code: output=aa7a6be5527358d8 input=77262d994fe5100a]*/
{
- Py_buffer buf;
int len;
int sockstate;
int err;
int nonblocking;
- PySocketSockObject *sock
- = (PySocketSockObject *) PyWeakref_GetObject(self->Socket);
-
- if (((PyObject*)sock) == Py_None) {
- _setSSLError("Underlying socket connection gone",
- PY_SSL_ERROR_NO_SOCKET, __FILE__, __LINE__);
- return NULL;
- }
- Py_INCREF(sock);
-
- if (!PyArg_ParseTuple(args, "y*:write", &buf)) {
- Py_DECREF(sock);
- return NULL;
+ PySocketSockObject *sock = GET_SOCKET(self);
+ _PyTime_t timeout, deadline = 0;
+ int has_timeout;
+
+ if (sock != NULL) {
+ if (((PyObject*)sock) == Py_None) {
+ _setSSLError("Underlying socket connection gone",
+ PY_SSL_ERROR_NO_SOCKET, __FILE__, __LINE__);
+ return NULL;
+ }
+ Py_INCREF(sock);
}
- if (buf.len > INT_MAX) {
+ if (b->len > INT_MAX) {
PyErr_Format(PyExc_OverflowError,
"string longer than %d bytes", INT_MAX);
goto error;
}
- /* just in case the blocking state of the socket has been changed */
- nonblocking = (sock->sock_timeout >= 0.0);
- BIO_set_nbio(SSL_get_rbio(self->ssl), nonblocking);
- BIO_set_nbio(SSL_get_wbio(self->ssl), nonblocking);
+ if (sock != NULL) {
+ /* just in case the blocking state of the socket has been changed */
+ nonblocking = (sock->sock_timeout >= 0);
+ BIO_set_nbio(SSL_get_rbio(self->ssl), nonblocking);
+ BIO_set_nbio(SSL_get_wbio(self->ssl), nonblocking);
+ }
- sockstate = check_socket_and_wait_for_timeout(sock, 1);
+ timeout = GET_SOCKET_TIMEOUT(sock);
+ has_timeout = (timeout > 0);
+ if (has_timeout)
+ deadline = _PyTime_GetMonotonicClock() + timeout;
+
+ sockstate = PySSL_select(sock, 1, timeout);
if (sockstate == SOCKET_HAS_TIMED_OUT) {
PyErr_SetString(PySocketModule.timeout_error,
"The write operation timed out");
@@ -1601,21 +1803,27 @@ static PyObject *PySSL_SSLwrite(PySSLSocket *self, PyObject *args)
"Underlying socket too large for select().");
goto error;
}
+
do {
PySSL_BEGIN_ALLOW_THREADS
- len = SSL_write(self->ssl, buf.buf, (int)buf.len);
+ len = SSL_write(self->ssl, b->buf, (int)b->len);
err = SSL_get_error(self->ssl, len);
PySSL_END_ALLOW_THREADS
- if (PyErr_CheckSignals()) {
+
+ if (PyErr_CheckSignals())
goto error;
- }
+
+ if (has_timeout)
+ timeout = deadline - _PyTime_GetMonotonicClock();
+
if (err == SSL_ERROR_WANT_READ) {
- sockstate = check_socket_and_wait_for_timeout(sock, 0);
+ sockstate = PySSL_select(sock, 0, timeout);
} else if (err == SSL_ERROR_WANT_WRITE) {
- sockstate = check_socket_and_wait_for_timeout(sock, 1);
+ sockstate = PySSL_select(sock, 1, timeout);
} else {
sockstate = SOCKET_OPERATION_OK;
}
+
if (sockstate == SOCKET_HAS_TIMED_OUT) {
PyErr_SetString(PySocketModule.timeout_error,
"The write operation timed out");
@@ -1629,26 +1837,26 @@ static PyObject *PySSL_SSLwrite(PySSLSocket *self, PyObject *args)
}
} while (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE);
- Py_DECREF(sock);
- PyBuffer_Release(&buf);
+ Py_XDECREF(sock);
if (len > 0)
return PyLong_FromLong(len);
else
return PySSL_SetError(self, len, __FILE__, __LINE__);
error:
- Py_DECREF(sock);
- PyBuffer_Release(&buf);
+ Py_XDECREF(sock);
return NULL;
}
-PyDoc_STRVAR(PySSL_SSLwrite_doc,
-"write(s) -> len\n\
-\n\
-Writes the string s into the SSL object. Returns the number\n\
-of bytes written.");
+/*[clinic input]
+_ssl._SSLSocket.pending
-static PyObject *PySSL_SSLpending(PySSLSocket *self)
+Returns the number of already decrypted bytes available for read, pending on the connection.
+[clinic start generated code]*/
+
+static PyObject *
+_ssl__SSLSocket_pending_impl(PySSLSocket *self)
+/*[clinic end generated code: output=983d9fecdc308a83 input=2b77487d6dfd597f]*/
{
int count = 0;
@@ -1661,49 +1869,57 @@ static PyObject *PySSL_SSLpending(PySSLSocket *self)
return PyLong_FromLong(count);
}
-PyDoc_STRVAR(PySSL_SSLpending_doc,
-"pending() -> count\n\
-\n\
-Returns the number of already decrypted bytes available for read,\n\
-pending on the connection.\n");
+/*[clinic input]
+_ssl._SSLSocket.read
+ size as len: int
+ [
+ buffer: Py_buffer(accept={rwbuffer})
+ ]
+ /
-static PyObject *PySSL_SSLread(PySSLSocket *self, PyObject *args)
+Read up to size bytes from the SSL socket.
+[clinic start generated code]*/
+
+static PyObject *
+_ssl__SSLSocket_read_impl(PySSLSocket *self, int len, int group_right_1,
+ Py_buffer *buffer)
+/*[clinic end generated code: output=00097776cec2a0af input=ff157eb918d0905b]*/
{
PyObject *dest = NULL;
- Py_buffer buf;
char *mem;
- int len, count;
- int buf_passed = 0;
+ int count;
int sockstate;
int err;
int nonblocking;
- PySocketSockObject *sock
- = (PySocketSockObject *) PyWeakref_GetObject(self->Socket);
+ PySocketSockObject *sock = GET_SOCKET(self);
+ _PyTime_t timeout, deadline = 0;
+ int has_timeout;
- if (((PyObject*)sock) == Py_None) {
- _setSSLError("Underlying socket connection gone",
- PY_SSL_ERROR_NO_SOCKET, __FILE__, __LINE__);
+ if (!group_right_1 && len < 0) {
+ PyErr_SetString(PyExc_ValueError, "size should not be negative");
return NULL;
}
- Py_INCREF(sock);
- buf.obj = NULL;
- buf.buf = NULL;
- if (!PyArg_ParseTuple(args, "i|w*:read", &len, &buf))
- goto error;
+ if (sock != NULL) {
+ if (((PyObject*)sock) == Py_None) {
+ _setSSLError("Underlying socket connection gone",
+ PY_SSL_ERROR_NO_SOCKET, __FILE__, __LINE__);
+ return NULL;
+ }
+ Py_INCREF(sock);
+ }
- if ((buf.buf == NULL) && (buf.obj == NULL)) {
+ if (!group_right_1) {
dest = PyBytes_FromStringAndSize(NULL, len);
if (dest == NULL)
goto error;
mem = PyBytes_AS_STRING(dest);
}
else {
- buf_passed = 1;
- mem = buf.buf;
- if (len <= 0 || len > buf.len) {
- len = (int) buf.len;
- if (buf.len != len) {
+ mem = buffer->buf;
+ if (len <= 0 || len > buffer->len) {
+ len = (int) buffer->len;
+ if (buffer->len != len) {
PyErr_SetString(PyExc_OverflowError,
"maximum length can't fit in a C 'int'");
goto error;
@@ -1711,31 +1927,43 @@ static PyObject *PySSL_SSLread(PySSLSocket *self, PyObject *args)
}
}
- /* just in case the blocking state of the socket has been changed */
- nonblocking = (sock->sock_timeout >= 0.0);
- BIO_set_nbio(SSL_get_rbio(self->ssl), nonblocking);
- BIO_set_nbio(SSL_get_wbio(self->ssl), nonblocking);
+ if (sock != NULL) {
+ /* just in case the blocking state of the socket has been changed */
+ nonblocking = (sock->sock_timeout >= 0);
+ BIO_set_nbio(SSL_get_rbio(self->ssl), nonblocking);
+ BIO_set_nbio(SSL_get_wbio(self->ssl), nonblocking);
+ }
+
+ timeout = GET_SOCKET_TIMEOUT(sock);
+ has_timeout = (timeout > 0);
+ if (has_timeout)
+ deadline = _PyTime_GetMonotonicClock() + timeout;
do {
PySSL_BEGIN_ALLOW_THREADS
count = SSL_read(self->ssl, mem, len);
err = SSL_get_error(self->ssl, count);
PySSL_END_ALLOW_THREADS
+
if (PyErr_CheckSignals())
goto error;
+
+ if (has_timeout)
+ timeout = deadline - _PyTime_GetMonotonicClock();
+
if (err == SSL_ERROR_WANT_READ) {
- sockstate = check_socket_and_wait_for_timeout(sock, 0);
+ sockstate = PySSL_select(sock, 0, timeout);
} else if (err == SSL_ERROR_WANT_WRITE) {
- sockstate = check_socket_and_wait_for_timeout(sock, 1);
- } else if ((err == SSL_ERROR_ZERO_RETURN) &&
- (SSL_get_shutdown(self->ssl) ==
- SSL_RECEIVED_SHUTDOWN))
+ sockstate = PySSL_select(sock, 1, timeout);
+ } else if (err == SSL_ERROR_ZERO_RETURN &&
+ SSL_get_shutdown(self->ssl) == SSL_RECEIVED_SHUTDOWN)
{
count = 0;
goto done;
- } else {
- sockstate = SOCKET_OPERATION_OK;
}
+ else
+ sockstate = SOCKET_OPERATION_OK;
+
if (sockstate == SOCKET_HAS_TIMED_OUT) {
PyErr_SetString(PySocketModule.timeout_error,
"The read operation timed out");
@@ -1744,55 +1972,66 @@ static PyObject *PySSL_SSLread(PySSLSocket *self, PyObject *args)
break;
}
} while (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE);
+
if (count <= 0) {
PySSL_SetError(self, count, __FILE__, __LINE__);
goto error;
}
done:
- Py_DECREF(sock);
- if (!buf_passed) {
+ Py_XDECREF(sock);
+ if (!group_right_1) {
_PyBytes_Resize(&dest, count);
return dest;
}
else {
- PyBuffer_Release(&buf);
return PyLong_FromLong(count);
}
error:
- Py_DECREF(sock);
- if (!buf_passed)
+ Py_XDECREF(sock);
+ if (!group_right_1)
Py_XDECREF(dest);
- else
- PyBuffer_Release(&buf);
return NULL;
}
-PyDoc_STRVAR(PySSL_SSLread_doc,
-"read([len]) -> string\n\
-\n\
-Read up to len bytes from the SSL socket.");
+/*[clinic input]
+_ssl._SSLSocket.shutdown
+
+Does the SSL shutdown handshake with the remote end.
-static PyObject *PySSL_SSLshutdown(PySSLSocket *self)
+Returns the underlying socket object.
+[clinic start generated code]*/
+
+static PyObject *
+_ssl__SSLSocket_shutdown_impl(PySSLSocket *self)
+/*[clinic end generated code: output=ca1aa7ed9d25ca42 input=ede2cc1a2ddf0ee4]*/
{
int err, ssl_err, sockstate, nonblocking;
int zeros = 0;
- PySocketSockObject *sock
- = (PySocketSockObject *) PyWeakref_GetObject(self->Socket);
+ PySocketSockObject *sock = GET_SOCKET(self);
+ _PyTime_t timeout, deadline = 0;
+ int has_timeout;
+
+ if (sock != NULL) {
+ /* Guard against closed socket */
+ if ((((PyObject*)sock) == Py_None) || (sock->sock_fd < 0)) {
+ _setSSLError("Underlying socket connection gone",
+ PY_SSL_ERROR_NO_SOCKET, __FILE__, __LINE__);
+ return NULL;
+ }
+ Py_INCREF(sock);
- /* Guard against closed socket */
- if ((((PyObject*)sock) == Py_None) || (sock->sock_fd < 0)) {
- _setSSLError("Underlying socket connection gone",
- PY_SSL_ERROR_NO_SOCKET, __FILE__, __LINE__);
- return NULL;
+ /* Just in case the blocking state of the socket has been changed */
+ nonblocking = (sock->sock_timeout >= 0);
+ BIO_set_nbio(SSL_get_rbio(self->ssl), nonblocking);
+ BIO_set_nbio(SSL_get_wbio(self->ssl), nonblocking);
}
- Py_INCREF(sock);
- /* Just in case the blocking state of the socket has been changed */
- nonblocking = (sock->sock_timeout >= 0.0);
- BIO_set_nbio(SSL_get_rbio(self->ssl), nonblocking);
- BIO_set_nbio(SSL_get_wbio(self->ssl), nonblocking);
+ timeout = GET_SOCKET_TIMEOUT(sock);
+ has_timeout = (timeout > 0);
+ if (has_timeout)
+ deadline = _PyTime_GetMonotonicClock() + timeout;
while (1) {
PySSL_BEGIN_ALLOW_THREADS
@@ -1808,6 +2047,7 @@ static PyObject *PySSL_SSLshutdown(PySSLSocket *self)
SSL_set_read_ahead(self->ssl, 0);
err = SSL_shutdown(self->ssl);
PySSL_END_ALLOW_THREADS
+
/* If err == 1, a secure shutdown with SSL_shutdown() is complete */
if (err > 0)
break;
@@ -1822,14 +2062,18 @@ static PyObject *PySSL_SSLshutdown(PySSLSocket *self)
continue;
}
+ if (has_timeout)
+ timeout = deadline - _PyTime_GetMonotonicClock();
+
/* Possibly retry shutdown until timeout or failure */
ssl_err = SSL_get_error(self->ssl, err);
if (ssl_err == SSL_ERROR_WANT_READ)
- sockstate = check_socket_and_wait_for_timeout(sock, 0);
+ sockstate = PySSL_select(sock, 0, timeout);
else if (ssl_err == SSL_ERROR_WANT_WRITE)
- sockstate = check_socket_and_wait_for_timeout(sock, 1);
+ sockstate = PySSL_select(sock, 1, timeout);
else
break;
+
if (sockstate == SOCKET_HAS_TIMED_OUT) {
if (ssl_err == SSL_ERROR_WANT_READ)
PyErr_SetString(PySocketModule.timeout_error,
@@ -1850,27 +2094,31 @@ static PyObject *PySSL_SSLshutdown(PySSLSocket *self)
}
if (err < 0) {
- Py_DECREF(sock);
+ Py_XDECREF(sock);
return PySSL_SetError(self, err, __FILE__, __LINE__);
}
- else
+ if (sock)
/* It's already INCREF'ed */
return (PyObject *) sock;
+ else
+ Py_RETURN_NONE;
error:
- Py_DECREF(sock);
+ Py_XDECREF(sock);
return NULL;
}
-PyDoc_STRVAR(PySSL_SSLshutdown_doc,
-"shutdown(s) -> socket\n\
-\n\
-Does the SSL shutdown handshake with the remote end, and returns\n\
-the underlying socket object.");
+/*[clinic input]
+_ssl._SSLSocket.tls_unique_cb
+
+Returns the 'tls-unique' channel binding data, as defined by RFC 5929.
+
+If the TLS handshake is not yet complete, None is returned.
+[clinic start generated code]*/
-#if HAVE_OPENSSL_FINISHED
static PyObject *
-PySSL_tls_unique_cb(PySSLSocket *self)
+_ssl__SSLSocket_tls_unique_cb_impl(PySSLSocket *self)
+/*[clinic end generated code: output=f3a832d603f586af input=439525c7b3d8d34d]*/
{
PyObject *retval = NULL;
char buf[PySSL_CB_MAXLEN];
@@ -1894,42 +2142,32 @@ PySSL_tls_unique_cb(PySSLSocket *self)
return retval;
}
-PyDoc_STRVAR(PySSL_tls_unique_cb_doc,
-"tls_unique_cb() -> bytes\n\
-\n\
-Returns the 'tls-unique' channel binding data, as defined by RFC 5929.\n\
-\n\
-If the TLS handshake is not yet complete, None is returned");
-
-#endif /* HAVE_OPENSSL_FINISHED */
-
static PyGetSetDef ssl_getsetlist[] = {
{"context", (getter) PySSL_get_context,
(setter) PySSL_set_context, PySSL_set_context_doc},
+ {"server_side", (getter) PySSL_get_server_side, NULL,
+ PySSL_get_server_side_doc},
+ {"server_hostname", (getter) PySSL_get_server_hostname, NULL,
+ PySSL_get_server_hostname_doc},
+ {"owner", (getter) PySSL_get_owner, (setter) PySSL_set_owner,
+ PySSL_get_owner_doc},
{NULL}, /* sentinel */
};
static PyMethodDef PySSLMethods[] = {
- {"do_handshake", (PyCFunction)PySSL_SSLdo_handshake, METH_NOARGS},
- {"write", (PyCFunction)PySSL_SSLwrite, METH_VARARGS,
- PySSL_SSLwrite_doc},
- {"read", (PyCFunction)PySSL_SSLread, METH_VARARGS,
- PySSL_SSLread_doc},
- {"pending", (PyCFunction)PySSL_SSLpending, METH_NOARGS,
- PySSL_SSLpending_doc},
- {"peer_certificate", (PyCFunction)PySSL_peercert, METH_VARARGS,
- PySSL_peercert_doc},
- {"cipher", (PyCFunction)PySSL_cipher, METH_NOARGS},
-#ifdef OPENSSL_NPN_NEGOTIATED
- {"selected_npn_protocol", (PyCFunction)PySSL_selected_npn_protocol, METH_NOARGS},
-#endif
- {"compression", (PyCFunction)PySSL_compression, METH_NOARGS},
- {"shutdown", (PyCFunction)PySSL_SSLshutdown, METH_NOARGS,
- PySSL_SSLshutdown_doc},
-#if HAVE_OPENSSL_FINISHED
- {"tls_unique_cb", (PyCFunction)PySSL_tls_unique_cb, METH_NOARGS,
- PySSL_tls_unique_cb_doc},
-#endif
+ _SSL__SSLSOCKET_DO_HANDSHAKE_METHODDEF
+ _SSL__SSLSOCKET_WRITE_METHODDEF
+ _SSL__SSLSOCKET_READ_METHODDEF
+ _SSL__SSLSOCKET_PENDING_METHODDEF
+ _SSL__SSLSOCKET_PEER_CERTIFICATE_METHODDEF
+ _SSL__SSLSOCKET_CIPHER_METHODDEF
+ _SSL__SSLSOCKET_SHARED_CIPHERS_METHODDEF
+ _SSL__SSLSOCKET_VERSION_METHODDEF
+ _SSL__SSLSOCKET_SELECTED_NPN_PROTOCOL_METHODDEF
+ _SSL__SSLSOCKET_SELECTED_ALPN_PROTOCOL_METHODDEF
+ _SSL__SSLSOCKET_COMPRESSION_METHODDEF
+ _SSL__SSLSOCKET_SHUTDOWN_METHODDEF
+ _SSL__SSLSOCKET_TLS_UNIQUE_CB_METHODDEF
{NULL, NULL}
};
@@ -1972,19 +2210,23 @@ static PyTypeObject PySSLSocket_Type = {
* _SSLContext objects
*/
+/*[clinic input]
+@classmethod
+_ssl._SSLContext.__new__
+ protocol as proto_version: int
+ /
+[clinic start generated code]*/
+
static PyObject *
-context_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+_ssl__SSLContext_impl(PyTypeObject *type, int proto_version)
+/*[clinic end generated code: output=2cf0d7a0741b6bd1 input=8d58a805b95fc534]*/
{
- char *kwlist[] = {"protocol", NULL};
PySSLContext *self;
- int proto_version = PY_SSL_VERSION_SSL23;
long options;
SSL_CTX *ctx = NULL;
-
- if (!PyArg_ParseTupleAndKeywords(
- args, kwds, "i:_SSLContext", kwlist,
- &proto_version))
- return NULL;
+#if defined(SSL_MODE_RELEASE_BUFFERS)
+ unsigned long libver;
+#endif
PySSL_BEGIN_ALLOW_THREADS
if (proto_version == PY_SSL_VERSION_TLS1)
@@ -2030,6 +2272,9 @@ context_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
#ifdef OPENSSL_NPN_NEGOTIATED
self->npn_protocols = NULL;
#endif
+#ifdef HAVE_ALPN
+ self->alpn_protocols = NULL;
+#endif
#ifndef OPENSSL_NO_TLSEXT
self->set_hostname = NULL;
#endif
@@ -2044,6 +2289,22 @@ context_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
options |= SSL_OP_NO_SSLv3;
SSL_CTX_set_options(self->ctx, options);
+#if defined(SSL_MODE_RELEASE_BUFFERS)
+ /* Set SSL_MODE_RELEASE_BUFFERS. This potentially greatly reduces memory
+ usage for no cost at all. However, don't do this for OpenSSL versions
+ between 1.0.1 and 1.0.1h or 1.0.0 and 1.0.0m, which are affected by CVE
+ 2014-0198. I can't find exactly which beta fixed this CVE, so be
+ conservative and assume it wasn't fixed until release. We do this check
+ at runtime to avoid problems from the dynamic linker.
+ See #25672 for more on this. */
+ libver = SSLeay();
+ if (!(libver >= 0x10001000UL && libver < 0x1000108fUL) &&
+ !(libver >= 0x10000000UL && libver < 0x100000dfUL)) {
+ SSL_CTX_set_mode(self->ctx, SSL_MODE_RELEASE_BUFFERS);
+ }
+#endif
+
+
#ifndef OPENSSL_NO_ECDH
/* Allow automatic ECDH curve selection (on OpenSSL 1.0.2+), or use
prime256v1 by default. This is Apache mod_ssl's initialization
@@ -2100,20 +2361,25 @@ context_dealloc(PySSLContext *self)
context_clear(self);
SSL_CTX_free(self->ctx);
#ifdef OPENSSL_NPN_NEGOTIATED
- PyMem_Free(self->npn_protocols);
+ PyMem_FREE(self->npn_protocols);
+#endif
+#ifdef HAVE_ALPN
+ PyMem_FREE(self->alpn_protocols);
#endif
Py_TYPE(self)->tp_free(self);
}
+/*[clinic input]
+_ssl._SSLContext.set_ciphers
+ cipherlist: str
+ /
+[clinic start generated code]*/
+
static PyObject *
-set_ciphers(PySSLContext *self, PyObject *args)
+_ssl__SSLContext_set_ciphers_impl(PySSLContext *self, const char *cipherlist)
+/*[clinic end generated code: output=3a3162f3557c0f3f input=a7ac931b9f3ca7fc]*/
{
- int ret;
- const char *cipherlist;
-
- if (!PyArg_ParseTuple(args, "s:set_ciphers", &cipherlist))
- return NULL;
- ret = SSL_CTX_set_cipher_list(self->ctx, cipherlist);
+ int ret = SSL_CTX_set_cipher_list(self->ctx, cipherlist);
if (ret == 0) {
/* Clearing the error queue is necessary on some OpenSSL versions,
otherwise the error will be reported again when another SSL call
@@ -2127,6 +2393,30 @@ set_ciphers(PySSLContext *self, PyObject *args)
}
#ifdef OPENSSL_NPN_NEGOTIATED
+static int
+do_protocol_selection(int alpn, unsigned char **out, unsigned char *outlen,
+ const unsigned char *server_protocols, unsigned int server_protocols_len,
+ const unsigned char *client_protocols, unsigned int client_protocols_len)
+{
+ int ret;
+ if (client_protocols == NULL) {
+ client_protocols = (unsigned char *)"";
+ client_protocols_len = 0;
+ }
+ if (server_protocols == NULL) {
+ server_protocols = (unsigned char *)"";
+ server_protocols_len = 0;
+ }
+
+ ret = SSL_select_next_proto(out, outlen,
+ server_protocols, server_protocols_len,
+ client_protocols, client_protocols_len);
+ if (alpn && ret != OPENSSL_NPN_NEGOTIATED)
+ return SSL_TLSEXT_ERR_NOACK;
+
+ return SSL_TLSEXT_ERR_OK;
+}
+
/* this callback gets passed to SSL_CTX_set_next_protos_advertise_cb */
static int
_advertiseNPN_cb(SSL *s,
@@ -2136,10 +2426,10 @@ _advertiseNPN_cb(SSL *s,
PySSLContext *ssl_ctx = (PySSLContext *) args;
if (ssl_ctx->npn_protocols == NULL) {
- *data = (unsigned char *) "";
+ *data = (unsigned char *)"";
*len = 0;
} else {
- *data = (unsigned char *) ssl_ctx->npn_protocols;
+ *data = ssl_ctx->npn_protocols;
*len = ssl_ctx->npn_protocols_len;
}
@@ -2152,46 +2442,30 @@ _selectNPN_cb(SSL *s,
const unsigned char *server, unsigned int server_len,
void *args)
{
- PySSLContext *ssl_ctx = (PySSLContext *) args;
-
- unsigned char *client = (unsigned char *) ssl_ctx->npn_protocols;
- int client_len;
-
- if (client == NULL) {
- client = (unsigned char *) "";
- client_len = 0;
- } else {
- client_len = ssl_ctx->npn_protocols_len;
- }
-
- SSL_select_next_proto(out, outlen,
- server, server_len,
- client, client_len);
-
- return SSL_TLSEXT_ERR_OK;
+ PySSLContext *ctx = (PySSLContext *)args;
+ return do_protocol_selection(0, out, outlen, server, server_len,
+ ctx->npn_protocols, ctx->npn_protocols_len);
}
#endif
+/*[clinic input]
+_ssl._SSLContext._set_npn_protocols
+ protos: Py_buffer
+ /
+[clinic start generated code]*/
+
static PyObject *
-_set_npn_protocols(PySSLContext *self, PyObject *args)
+_ssl__SSLContext__set_npn_protocols_impl(PySSLContext *self,
+ Py_buffer *protos)
+/*[clinic end generated code: output=72b002c3324390c6 input=319fcb66abf95bd7]*/
{
#ifdef OPENSSL_NPN_NEGOTIATED
- Py_buffer protos;
-
- if (!PyArg_ParseTuple(args, "y*:set_npn_protocols", &protos))
- return NULL;
-
- if (self->npn_protocols != NULL) {
- PyMem_Free(self->npn_protocols);
- }
-
- self->npn_protocols = PyMem_Malloc(protos.len);
- if (self->npn_protocols == NULL) {
- PyBuffer_Release(&protos);
+ PyMem_Free(self->npn_protocols);
+ self->npn_protocols = PyMem_Malloc(protos->len);
+ if (self->npn_protocols == NULL)
return PyErr_NoMemory();
- }
- memcpy(self->npn_protocols, protos.buf, protos.len);
- self->npn_protocols_len = (int) protos.len;
+ memcpy(self->npn_protocols, protos->buf, protos->len);
+ self->npn_protocols_len = (int) protos->len;
/* set both server and client callbacks, because the context can
* be used to create both types of sockets */
@@ -2202,7 +2476,6 @@ _set_npn_protocols(PySSLContext *self, PyObject *args)
_selectNPN_cb,
self);
- PyBuffer_Release(&protos);
Py_RETURN_NONE;
#else
PyErr_SetString(PyExc_NotImplementedError,
@@ -2211,6 +2484,51 @@ _set_npn_protocols(PySSLContext *self, PyObject *args)
#endif
}
+#ifdef HAVE_ALPN
+static int
+_selectALPN_cb(SSL *s,
+ const unsigned char **out, unsigned char *outlen,
+ const unsigned char *client_protocols, unsigned int client_protocols_len,
+ void *args)
+{
+ PySSLContext *ctx = (PySSLContext *)args;
+ return do_protocol_selection(1, (unsigned char **)out, outlen,
+ ctx->alpn_protocols, ctx->alpn_protocols_len,
+ client_protocols, client_protocols_len);
+}
+#endif
+
+/*[clinic input]
+_ssl._SSLContext._set_alpn_protocols
+ protos: Py_buffer
+ /
+[clinic start generated code]*/
+
+static PyObject *
+_ssl__SSLContext__set_alpn_protocols_impl(PySSLContext *self,
+ Py_buffer *protos)
+/*[clinic end generated code: output=87599a7f76651a9b input=9bba964595d519be]*/
+{
+#ifdef HAVE_ALPN
+ PyMem_FREE(self->alpn_protocols);
+ self->alpn_protocols = PyMem_Malloc(protos->len);
+ if (!self->alpn_protocols)
+ return PyErr_NoMemory();
+ memcpy(self->alpn_protocols, protos->buf, protos->len);
+ self->alpn_protocols_len = protos->len;
+
+ if (SSL_CTX_set_alpn_protos(self->ctx, self->alpn_protocols, self->alpn_protocols_len))
+ return PyErr_NoMemory();
+ SSL_CTX_set_alpn_select_cb(self->ctx, _selectALPN_cb, self);
+
+ Py_RETURN_NONE;
+#else
+ PyErr_SetString(PyExc_NotImplementedError,
+ "The ALPN extension requires OpenSSL 1.0.2 or later.");
+ return NULL;
+#endif
+}
+
static PyObject *
get_verify_mode(PySSLContext *self, void *c)
{
@@ -2254,7 +2572,6 @@ set_verify_mode(PySSLContext *self, PyObject *arg, void *c)
return 0;
}
-#ifdef HAVE_OPENSSL_VERIFY_PARAM
static PyObject *
get_verify_flags(PySSLContext *self, void *c)
{
@@ -2292,7 +2609,6 @@ set_verify_flags(PySSLContext *self, PyObject *arg, void *c)
}
return 0;
}
-#endif
static PyObject *
get_options(PySSLContext *self, void *c)
@@ -2449,11 +2765,19 @@ error:
return -1;
}
+/*[clinic input]
+_ssl._SSLContext.load_cert_chain
+ certfile: object
+ keyfile: object = NULL
+ password: object = NULL
+
+[clinic start generated code]*/
+
static PyObject *
-load_cert_chain(PySSLContext *self, PyObject *args, PyObject *kwds)
+_ssl__SSLContext_load_cert_chain_impl(PySSLContext *self, PyObject *certfile,
+ PyObject *keyfile, PyObject *password)
+/*[clinic end generated code: output=9480bc1c380e2095 input=7cf9ac673cbee6fc]*/
{
- char *kwlist[] = {"certfile", "keyfile", "password", NULL};
- PyObject *certfile, *keyfile = NULL, *password = NULL;
PyObject *certfile_bytes = NULL, *keyfile_bytes = NULL;
pem_password_cb *orig_passwd_cb = self->ctx->default_passwd_callback;
void *orig_passwd_userdata = self->ctx->default_passwd_callback_userdata;
@@ -2462,10 +2786,6 @@ load_cert_chain(PySSLContext *self, PyObject *args, PyObject *kwds)
errno = 0;
ERR_clear_error();
- if (!PyArg_ParseTupleAndKeywords(args, kwds,
- "O|OO:load_cert_chain", kwlist,
- &certfile, &keyfile, &password))
- return NULL;
if (keyfile == Py_None)
keyfile = NULL;
if (!PyUnicode_FSConverter(certfile, &certfile_bytes)) {
@@ -2633,21 +2953,26 @@ _add_ca_certs(PySSLContext *self, void *data, Py_ssize_t len,
}
+/*[clinic input]
+_ssl._SSLContext.load_verify_locations
+ cafile: object = NULL
+ capath: object = NULL
+ cadata: object = NULL
+
+[clinic start generated code]*/
+
static PyObject *
-load_verify_locations(PySSLContext *self, PyObject *args, PyObject *kwds)
+_ssl__SSLContext_load_verify_locations_impl(PySSLContext *self,
+ PyObject *cafile,
+ PyObject *capath,
+ PyObject *cadata)
+/*[clinic end generated code: output=454c7e41230ca551 input=997f1fb3a784ef88]*/
{
- char *kwlist[] = {"cafile", "capath", "cadata", NULL};
- PyObject *cafile = NULL, *capath = NULL, *cadata = NULL;
PyObject *cafile_bytes = NULL, *capath_bytes = NULL;
const char *cafile_buf = NULL, *capath_buf = NULL;
int r = 0, ok = 1;
errno = 0;
- if (!PyArg_ParseTupleAndKeywords(args, kwds,
- "|OOO:load_verify_locations", kwlist,
- &cafile, &capath, &cadata))
- return NULL;
-
if (cafile == Py_None)
cafile = NULL;
if (capath == Py_None)
@@ -2744,18 +3069,24 @@ load_verify_locations(PySSLContext *self, PyObject *args, PyObject *kwds)
}
}
+/*[clinic input]
+_ssl._SSLContext.load_dh_params
+ path as filepath: object
+ /
+
+[clinic start generated code]*/
+
static PyObject *
-load_dh_params(PySSLContext *self, PyObject *filepath)
+_ssl__SSLContext_load_dh_params(PySSLContext *self, PyObject *filepath)
+/*[clinic end generated code: output=1c8e57a38e055af0 input=c8871f3c796ae1d6]*/
{
FILE *f;
DH *dh;
f = _Py_fopen_obj(filepath, "rb");
- if (f == NULL) {
- if (!PyErr_Occurred())
- PyErr_SetFromErrnoWithFilenameObject(PyExc_OSError, filepath);
+ if (f == NULL)
return NULL;
- }
+
errno = 0;
PySSL_BEGIN_ALLOW_THREADS
dh = PEM_read_DHparams(f, NULL, NULL, NULL);
@@ -2777,38 +3108,76 @@ load_dh_params(PySSLContext *self, PyObject *filepath)
Py_RETURN_NONE;
}
+/*[clinic input]
+_ssl._SSLContext._wrap_socket
+ sock: object(subclass_of="PySocketModule.Sock_Type")
+ server_side: int
+ server_hostname as hostname_obj: object = None
+
+[clinic start generated code]*/
+
static PyObject *
-context_wrap_socket(PySSLContext *self, PyObject *args, PyObject *kwds)
+_ssl__SSLContext__wrap_socket_impl(PySSLContext *self, PyObject *sock,
+ int server_side, PyObject *hostname_obj)
+/*[clinic end generated code: output=6973e4b60995e933 input=83859b9156ddfc63]*/
{
- char *kwlist[] = {"sock", "server_side", "server_hostname", NULL};
- PySocketSockObject *sock;
- int server_side = 0;
char *hostname = NULL;
- PyObject *hostname_obj, *res;
+ PyObject *res;
/* server_hostname is either None (or absent), or to be encoded
using the idna encoding. */
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!i|O!:_wrap_socket", kwlist,
- PySocketModule.Sock_Type,
- &sock, &server_side,
- Py_TYPE(Py_None), &hostname_obj)) {
- PyErr_Clear();
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!iet:_wrap_socket", kwlist,
- PySocketModule.Sock_Type,
- &sock, &server_side,
- "idna", &hostname))
+ if (hostname_obj != Py_None) {
+ if (!PyArg_Parse(hostname_obj, "et", "idna", &hostname))
return NULL;
}
- res = (PyObject *) newPySSLSocket(self, sock, server_side,
- hostname);
+ res = (PyObject *) newPySSLSocket(self, (PySocketSockObject *)sock,
+ server_side, hostname,
+ NULL, NULL);
if (hostname != NULL)
PyMem_Free(hostname);
return res;
}
+/*[clinic input]
+_ssl._SSLContext._wrap_bio
+ incoming: object(subclass_of="&PySSLMemoryBIO_Type", type="PySSLMemoryBIO *")
+ outgoing: object(subclass_of="&PySSLMemoryBIO_Type", type="PySSLMemoryBIO *")
+ server_side: int
+ server_hostname as hostname_obj: object = None
+
+[clinic start generated code]*/
+
static PyObject *
-session_stats(PySSLContext *self, PyObject *unused)
+_ssl__SSLContext__wrap_bio_impl(PySSLContext *self, PySSLMemoryBIO *incoming,
+ PySSLMemoryBIO *outgoing, int server_side,
+ PyObject *hostname_obj)
+/*[clinic end generated code: output=4fe4ba75ad95940d input=17725ecdac0bf220]*/
+{
+ char *hostname = NULL;
+ PyObject *res;
+
+ /* server_hostname is either None (or absent), or to be encoded
+ using the idna encoding. */
+ if (hostname_obj != Py_None) {
+ if (!PyArg_Parse(hostname_obj, "et", "idna", &hostname))
+ return NULL;
+ }
+
+ res = (PyObject *) newPySSLSocket(self, NULL, server_side, hostname,
+ incoming, outgoing);
+
+ PyMem_Free(hostname);
+ return res;
+}
+
+/*[clinic input]
+_ssl._SSLContext.session_stats
+[clinic start generated code]*/
+
+static PyObject *
+_ssl__SSLContext_session_stats_impl(PySSLContext *self)
+/*[clinic end generated code: output=0d96411c42893bfb input=7e0a81fb11102c8b]*/
{
int r;
PyObject *value, *stats = PyDict_New();
@@ -2846,8 +3215,13 @@ error:
return NULL;
}
+/*[clinic input]
+_ssl._SSLContext.set_default_verify_paths
+[clinic start generated code]*/
+
static PyObject *
-set_default_verify_paths(PySSLContext *self, PyObject *unused)
+_ssl__SSLContext_set_default_verify_paths_impl(PySSLContext *self)
+/*[clinic end generated code: output=0bee74e6e09deaaa input=35f3408021463d74]*/
{
if (!SSL_CTX_set_default_verify_paths(self->ctx)) {
_setSSLError(NULL, 0, __FILE__, __LINE__);
@@ -2857,8 +3231,16 @@ set_default_verify_paths(PySSLContext *self, PyObject *unused)
}
#ifndef OPENSSL_NO_ECDH
+/*[clinic input]
+_ssl._SSLContext.set_ecdh_curve
+ name: object
+ /
+
+[clinic start generated code]*/
+
static PyObject *
-set_ecdh_curve(PySSLContext *self, PyObject *name)
+_ssl__SSLContext_set_ecdh_curve(PySSLContext *self, PyObject *name)
+/*[clinic end generated code: output=23022c196e40d7d2 input=c2bafb6f6e34726b]*/
{
PyObject *name_bytes;
int nid;
@@ -2913,11 +3295,25 @@ _servername_callback(SSL *s, int *al, void *args)
ssl = SSL_get_app_data(s);
assert(PySSLSocket_Check(ssl));
- ssl_socket = PyWeakref_GetObject(ssl->Socket);
+
+ /* The servername callback expects an argument that represents the current
+ * SSL connection and that has a .context attribute that can be changed to
+ * identify the requested hostname. Since the official API is the Python
+ * level API we want to pass the callback a Python level object rather than
+ * a _ssl.SSLSocket instance. If there's an "owner" (typically an
+ * SSLObject) that will be passed. Otherwise if there's a socket then that
+ * will be passed. If both do not exist only then the C-level object is
+ * passed. */
+ if (ssl->owner)
+ ssl_socket = PyWeakref_GetObject(ssl->owner);
+ else if (ssl->Socket)
+ ssl_socket = PyWeakref_GetObject(ssl->Socket);
+ else
+ ssl_socket = (PyObject *) ssl;
+
Py_INCREF(ssl_socket);
- if (ssl_socket == Py_None) {
+ if (ssl_socket == Py_None)
goto error;
- }
if (servername == NULL) {
result = PyObject_CallFunctionObjArgs(ssl_ctx->set_hostname, ssl_socket,
@@ -2978,25 +3374,23 @@ error:
}
#endif
-PyDoc_STRVAR(PySSL_set_servername_callback_doc,
-"set_servername_callback(method)\n\
-\n\
-This sets a callback that will be called when a server name is provided by\n\
-the SSL/TLS client in the SNI extension.\n\
-\n\
-If the argument is None then the callback is disabled. The method is called\n\
-with the SSLSocket, the server name as a string, and the SSLContext object.\n\
-See RFC 6066 for details of the SNI extension.");
+/*[clinic input]
+_ssl._SSLContext.set_servername_callback
+ method as cb: object
+ /
+
+Set a callback that will be called when a server name is provided by the SSL/TLS client in the SNI extension.
+
+If the argument is None then the callback is disabled. The method is called
+with the SSLSocket, the server name as a string, and the SSLContext object.
+See RFC 6066 for details of the SNI extension.
+[clinic start generated code]*/
static PyObject *
-set_servername_callback(PySSLContext *self, PyObject *args)
+_ssl__SSLContext_set_servername_callback(PySSLContext *self, PyObject *cb)
+/*[clinic end generated code: output=3439a1b2d5d3b7ea input=a2a83620197d602b]*/
{
#if HAVE_SNI && !defined(OPENSSL_NO_TLSEXT)
- PyObject *cb;
-
- if (!PyArg_ParseTuple(args, "O", &cb))
- return NULL;
-
Py_CLEAR(self->set_hostname);
if (cb == Py_None) {
SSL_CTX_set_tlsext_servername_callback(self->ctx, NULL);
@@ -3023,17 +3417,21 @@ set_servername_callback(PySSLContext *self, PyObject *args)
#endif
}
-PyDoc_STRVAR(PySSL_get_stats_doc,
-"cert_store_stats() -> {'crl': int, 'x509_ca': int, 'x509': int}\n\
-\n\
-Returns quantities of loaded X.509 certificates. X.509 certificates with a\n\
-CA extension and certificate revocation lists inside the context's cert\n\
-store.\n\
-NOTE: Certificates in a capath directory aren't loaded unless they have\n\
-been used at least once.");
+/*[clinic input]
+_ssl._SSLContext.cert_store_stats
+
+Returns quantities of loaded X.509 certificates.
+
+X.509 certificates with a CA extension and certificate revocation lists
+inside the context's cert store.
+
+NOTE: Certificates in a capath directory aren't loaded unless they have
+been used at least once.
+[clinic start generated code]*/
static PyObject *
-cert_store_stats(PySSLContext *self)
+_ssl__SSLContext_cert_store_stats_impl(PySSLContext *self)
+/*[clinic end generated code: output=5f356f4d9cca874d input=eb40dd0f6d0e40cf]*/
{
X509_STORE *store;
X509_OBJECT *obj;
@@ -3066,27 +3464,26 @@ cert_store_stats(PySSLContext *self)
"x509_ca", ca);
}
-PyDoc_STRVAR(PySSL_get_ca_certs_doc,
-"get_ca_certs(binary_form=False) -> list of loaded certificate\n\
-\n\
-Returns a list of dicts with information of loaded CA certs. If the\n\
-optional argument is True, returns a DER-encoded copy of the CA certificate.\n\
-NOTE: Certificates in a capath directory aren't loaded unless they have\n\
-been used at least once.");
+/*[clinic input]
+_ssl._SSLContext.get_ca_certs
+ binary_form: bool = False
+
+Returns a list of dicts with information of loaded CA certs.
+
+If the optional argument is True, returns a DER-encoded copy of the CA
+certificate.
+
+NOTE: Certificates in a capath directory aren't loaded unless they have
+been used at least once.
+[clinic start generated code]*/
static PyObject *
-get_ca_certs(PySSLContext *self, PyObject *args, PyObject *kwds)
+_ssl__SSLContext_get_ca_certs_impl(PySSLContext *self, int binary_form)
+/*[clinic end generated code: output=0d58f148f37e2938 input=6887b5a09b7f9076]*/
{
- char *kwlist[] = {"binary_form", NULL};
X509_STORE *store;
PyObject *ci = NULL, *rlist = NULL;
int i;
- int binary_mode = 0;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|p:get_ca_certs",
- kwlist, &binary_mode)) {
- return NULL;
- }
if ((rlist = PyList_New(0)) == NULL) {
return NULL;
@@ -3107,7 +3504,7 @@ get_ca_certs(PySSLContext *self, PyObject *args, PyObject *kwds)
if (!X509_check_ca(cert)) {
continue;
}
- if (binary_mode) {
+ if (binary_form) {
ci = _certificate_to_der(cert);
} else {
ci = _decode_certificate(cert);
@@ -3134,42 +3531,28 @@ static PyGetSetDef context_getsetlist[] = {
(setter) set_check_hostname, NULL},
{"options", (getter) get_options,
(setter) set_options, NULL},
-#ifdef HAVE_OPENSSL_VERIFY_PARAM
{"verify_flags", (getter) get_verify_flags,
(setter) set_verify_flags, NULL},
-#endif
{"verify_mode", (getter) get_verify_mode,
(setter) set_verify_mode, NULL},
{NULL}, /* sentinel */
};
static struct PyMethodDef context_methods[] = {
- {"_wrap_socket", (PyCFunction) context_wrap_socket,
- METH_VARARGS | METH_KEYWORDS, NULL},
- {"set_ciphers", (PyCFunction) set_ciphers,
- METH_VARARGS, NULL},
- {"_set_npn_protocols", (PyCFunction) _set_npn_protocols,
- METH_VARARGS, NULL},
- {"load_cert_chain", (PyCFunction) load_cert_chain,
- METH_VARARGS | METH_KEYWORDS, NULL},
- {"load_dh_params", (PyCFunction) load_dh_params,
- METH_O, NULL},
- {"load_verify_locations", (PyCFunction) load_verify_locations,
- METH_VARARGS | METH_KEYWORDS, NULL},
- {"session_stats", (PyCFunction) session_stats,
- METH_NOARGS, NULL},
- {"set_default_verify_paths", (PyCFunction) set_default_verify_paths,
- METH_NOARGS, NULL},
-#ifndef OPENSSL_NO_ECDH
- {"set_ecdh_curve", (PyCFunction) set_ecdh_curve,
- METH_O, NULL},
-#endif
- {"set_servername_callback", (PyCFunction) set_servername_callback,
- METH_VARARGS, PySSL_set_servername_callback_doc},
- {"cert_store_stats", (PyCFunction) cert_store_stats,
- METH_NOARGS, PySSL_get_stats_doc},
- {"get_ca_certs", (PyCFunction) get_ca_certs,
- METH_VARARGS | METH_KEYWORDS, PySSL_get_ca_certs_doc},
+ _SSL__SSLCONTEXT__WRAP_SOCKET_METHODDEF
+ _SSL__SSLCONTEXT__WRAP_BIO_METHODDEF
+ _SSL__SSLCONTEXT_SET_CIPHERS_METHODDEF
+ _SSL__SSLCONTEXT__SET_ALPN_PROTOCOLS_METHODDEF
+ _SSL__SSLCONTEXT__SET_NPN_PROTOCOLS_METHODDEF
+ _SSL__SSLCONTEXT_LOAD_CERT_CHAIN_METHODDEF
+ _SSL__SSLCONTEXT_LOAD_DH_PARAMS_METHODDEF
+ _SSL__SSLCONTEXT_LOAD_VERIFY_LOCATIONS_METHODDEF
+ _SSL__SSLCONTEXT_SESSION_STATS_METHODDEF
+ _SSL__SSLCONTEXT_SET_DEFAULT_VERIFY_PATHS_METHODDEF
+ _SSL__SSLCONTEXT_SET_ECDH_CURVE_METHODDEF
+ _SSL__SSLCONTEXT_SET_SERVERNAME_CALLBACK_METHODDEF
+ _SSL__SSLCONTEXT_CERT_STORE_STATS_METHODDEF
+ _SSL__SSLCONTEXT_GET_CA_CERTS_METHODDEF
{NULL, NULL} /* sentinel */
};
@@ -3211,23 +3594,252 @@ static PyTypeObject PySSLContext_Type = {
0, /*tp_dictoffset*/
0, /*tp_init*/
0, /*tp_alloc*/
- context_new, /*tp_new*/
+ _ssl__SSLContext, /*tp_new*/
};
+/*
+ * MemoryBIO objects
+ */
+
+/*[clinic input]
+@classmethod
+_ssl.MemoryBIO.__new__
+
+[clinic start generated code]*/
+
+static PyObject *
+_ssl_MemoryBIO_impl(PyTypeObject *type)
+/*[clinic end generated code: output=8820a58db78330ac input=26d22e4909ecb1b5]*/
+{
+ BIO *bio;
+ PySSLMemoryBIO *self;
+
+ bio = BIO_new(BIO_s_mem());
+ if (bio == NULL) {
+ PyErr_SetString(PySSLErrorObject,
+ "failed to allocate BIO");
+ return NULL;
+ }
+ /* Since our BIO is non-blocking an empty read() does not indicate EOF,
+ * just that no data is currently available. The SSL routines should retry
+ * the read, which we can achieve by calling BIO_set_retry_read(). */
+ BIO_set_retry_read(bio);
+ BIO_set_mem_eof_return(bio, -1);
+
+ assert(type != NULL && type->tp_alloc != NULL);
+ self = (PySSLMemoryBIO *) type->tp_alloc(type, 0);
+ if (self == NULL) {
+ BIO_free(bio);
+ return NULL;
+ }
+ self->bio = bio;
+ self->eof_written = 0;
+
+ return (PyObject *) self;
+}
+
+static void
+memory_bio_dealloc(PySSLMemoryBIO *self)
+{
+ BIO_free(self->bio);
+ Py_TYPE(self)->tp_free(self);
+}
+
+static PyObject *
+memory_bio_get_pending(PySSLMemoryBIO *self, void *c)
+{
+ return PyLong_FromLong(BIO_ctrl_pending(self->bio));
+}
+
+PyDoc_STRVAR(PySSL_memory_bio_pending_doc,
+"The number of bytes pending in the memory BIO.");
+
+static PyObject *
+memory_bio_get_eof(PySSLMemoryBIO *self, void *c)
+{
+ return PyBool_FromLong((BIO_ctrl_pending(self->bio) == 0)
+ && self->eof_written);
+}
+
+PyDoc_STRVAR(PySSL_memory_bio_eof_doc,
+"Whether the memory BIO is at EOF.");
+
+/*[clinic input]
+_ssl.MemoryBIO.read
+ size as len: int = -1
+ /
+
+Read up to size bytes from the memory BIO.
+
+If size is not specified, read the entire buffer.
+If the return value is an empty bytes instance, this means either
+EOF or that no data is available. Use the "eof" property to
+distinguish between the two.
+[clinic start generated code]*/
+
+static PyObject *
+_ssl_MemoryBIO_read_impl(PySSLMemoryBIO *self, int len)
+/*[clinic end generated code: output=a657aa1e79cd01b3 input=574d7be06a902366]*/
+{
+ int avail, nbytes;
+ PyObject *result;
+
+ avail = BIO_ctrl_pending(self->bio);
+ if ((len < 0) || (len > avail))
+ len = avail;
+
+ result = PyBytes_FromStringAndSize(NULL, len);
+ if ((result == NULL) || (len == 0))
+ return result;
+
+ nbytes = BIO_read(self->bio, PyBytes_AS_STRING(result), len);
+ /* There should never be any short reads but check anyway. */
+ if ((nbytes < len) && (_PyBytes_Resize(&result, len) < 0)) {
+ Py_DECREF(result);
+ return NULL;
+ }
+
+ return result;
+}
+
+/*[clinic input]
+_ssl.MemoryBIO.write
+ b: Py_buffer
+ /
+
+Writes the bytes b into the memory BIO.
+
+Returns the number of bytes written.
+[clinic start generated code]*/
+
+static PyObject *
+_ssl_MemoryBIO_write_impl(PySSLMemoryBIO *self, Py_buffer *b)
+/*[clinic end generated code: output=156ec59110d75935 input=e45757b3e17c4808]*/
+{
+ int nbytes;
+
+ if (b->len > INT_MAX) {
+ PyErr_Format(PyExc_OverflowError,
+ "string longer than %d bytes", INT_MAX);
+ return NULL;
+ }
+
+ if (self->eof_written) {
+ PyErr_SetString(PySSLErrorObject,
+ "cannot write() after write_eof()");
+ return NULL;
+ }
+
+ nbytes = BIO_write(self->bio, b->buf, b->len);
+ if (nbytes < 0) {
+ _setSSLError(NULL, 0, __FILE__, __LINE__);
+ return NULL;
+ }
+
+ return PyLong_FromLong(nbytes);
+}
+
+/*[clinic input]
+_ssl.MemoryBIO.write_eof
+
+Write an EOF marker to the memory BIO.
+
+When all data has been read, the "eof" property will be True.
+[clinic start generated code]*/
+
+static PyObject *
+_ssl_MemoryBIO_write_eof_impl(PySSLMemoryBIO *self)
+/*[clinic end generated code: output=d4106276ccd1ed34 input=56a945f1d29e8bd6]*/
+{
+ self->eof_written = 1;
+ /* After an EOF is written, a zero return from read() should be a real EOF
+ * i.e. it should not be retried. Clear the SHOULD_RETRY flag. */
+ BIO_clear_retry_flags(self->bio);
+ BIO_set_mem_eof_return(self->bio, 0);
+
+ Py_RETURN_NONE;
+}
+
+static PyGetSetDef memory_bio_getsetlist[] = {
+ {"pending", (getter) memory_bio_get_pending, NULL,
+ PySSL_memory_bio_pending_doc},
+ {"eof", (getter) memory_bio_get_eof, NULL,
+ PySSL_memory_bio_eof_doc},
+ {NULL}, /* sentinel */
+};
+
+static struct PyMethodDef memory_bio_methods[] = {
+ _SSL_MEMORYBIO_READ_METHODDEF
+ _SSL_MEMORYBIO_WRITE_METHODDEF
+ _SSL_MEMORYBIO_WRITE_EOF_METHODDEF
+ {NULL, NULL} /* sentinel */
+};
+
+static PyTypeObject PySSLMemoryBIO_Type = {
+ PyVarObject_HEAD_INIT(NULL, 0)
+ "_ssl.MemoryBIO", /*tp_name*/
+ sizeof(PySSLMemoryBIO), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ (destructor)memory_bio_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ 0, /*tp_reserved*/
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT, /*tp_flags*/
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ memory_bio_methods, /*tp_methods*/
+ 0, /*tp_members*/
+ memory_bio_getsetlist, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ _ssl_MemoryBIO, /*tp_new*/
+};
-#ifdef HAVE_OPENSSL_RAND
/* helper routines for seeding the SSL PRNG */
+/*[clinic input]
+_ssl.RAND_add
+ string as view: Py_buffer(accept={str, buffer})
+ entropy: double
+ /
+
+Mix string into the OpenSSL PRNG state.
+
+entropy (a float) is a lower bound on the entropy contained in
+string. See RFC 1750.
+[clinic start generated code]*/
+
static PyObject *
-PySSL_RAND_add(PyObject *self, PyObject *args)
+_ssl_RAND_add_impl(PyModuleDef *module, Py_buffer *view, double entropy)
+/*[clinic end generated code: output=0f8d5c8cce328958 input=580c85e6a3a4fe29]*/
{
- char *buf;
+ const char *buf;
Py_ssize_t len, written;
- double entropy;
- if (!PyArg_ParseTuple(args, "s#d:RAND_add", &buf, &len, &entropy))
- return NULL;
+ buf = (const char *)view->buf;
+ len = view->len;
do {
written = Py_MIN(len, INT_MAX);
RAND_add(buf, (int)written, entropy);
@@ -3238,12 +3850,6 @@ PySSL_RAND_add(PyObject *self, PyObject *args)
return Py_None;
}
-PyDoc_STRVAR(PySSL_RAND_add_doc,
-"RAND_add(string, entropy)\n\
-\n\
-Mix string into the OpenSSL PRNG state. entropy (a float) is a lower\n\
-bound on the entropy contained in string. See RFC 1750.");
-
static PyObject *
PySSL_RAND(int len, int pseudo)
{
@@ -3283,60 +3889,72 @@ PySSL_RAND(int len, int pseudo)
return NULL;
}
+/*[clinic input]
+_ssl.RAND_bytes
+ n: int
+ /
+
+Generate n cryptographically strong pseudo-random bytes.
+[clinic start generated code]*/
+
static PyObject *
-PySSL_RAND_bytes(PyObject *self, PyObject *args)
+_ssl_RAND_bytes_impl(PyModuleDef *module, int n)
+/*[clinic end generated code: output=7d8741bdc1d435f3 input=678ddf2872dfebfc]*/
{
- int len;
- if (!PyArg_ParseTuple(args, "i:RAND_bytes", &len))
- return NULL;
- return PySSL_RAND(len, 0);
+ return PySSL_RAND(n, 0);
}
-PyDoc_STRVAR(PySSL_RAND_bytes_doc,
-"RAND_bytes(n) -> bytes\n\
-\n\
-Generate n cryptographically strong pseudo-random bytes.");
+/*[clinic input]
+_ssl.RAND_pseudo_bytes
+ n: int
+ /
+
+Generate n pseudo-random bytes.
+
+Return a pair (bytes, is_cryptographic). is_cryptographic is True
+if the bytes generated are cryptographically strong.
+[clinic start generated code]*/
static PyObject *
-PySSL_RAND_pseudo_bytes(PyObject *self, PyObject *args)
+_ssl_RAND_pseudo_bytes_impl(PyModuleDef *module, int n)
+/*[clinic end generated code: output=dd673813107f3875 input=58312bd53f9bbdd0]*/
{
- int len;
- if (!PyArg_ParseTuple(args, "i:RAND_pseudo_bytes", &len))
- return NULL;
- return PySSL_RAND(len, 1);
+ return PySSL_RAND(n, 1);
}
-PyDoc_STRVAR(PySSL_RAND_pseudo_bytes_doc,
-"RAND_pseudo_bytes(n) -> (bytes, is_cryptographic)\n\
-\n\
-Generate n pseudo-random bytes. is_cryptographic is True if the bytes\
-generated are cryptographically strong.");
+/*[clinic input]
+_ssl.RAND_status
+
+Returns 1 if the OpenSSL PRNG has been seeded with enough data and 0 if not.
+
+It is necessary to seed the PRNG with RAND_add() on some platforms before
+using the ssl() function.
+[clinic start generated code]*/
static PyObject *
-PySSL_RAND_status(PyObject *self)
+_ssl_RAND_status_impl(PyModuleDef *module)
+/*[clinic end generated code: output=7f7ef57bc7dd1d1c input=8a774b02d1dc81f3]*/
{
return PyLong_FromLong(RAND_status());
}
-PyDoc_STRVAR(PySSL_RAND_status_doc,
-"RAND_status() -> 0 or 1\n\
-\n\
-Returns 1 if the OpenSSL PRNG has been seeded with enough data and 0 if not.\n\
-It is necessary to seed the PRNG with RAND_add() on some platforms before\n\
-using the ssl() function.");
-
#ifdef HAVE_RAND_EGD
-static PyObject *
-PySSL_RAND_egd(PyObject *self, PyObject *args)
-{
- PyObject *path;
- int bytes;
+/*[clinic input]
+_ssl.RAND_egd
+ path: object(converter="PyUnicode_FSConverter")
+ /
- if (!PyArg_ParseTuple(args, "O&:RAND_egd",
- PyUnicode_FSConverter, &path))
- return NULL;
+Queries the entropy gather daemon (EGD) on the socket named by 'path'.
+
+Returns number of bytes read. Raises SSLError if connection to EGD
+fails or if it does not provide enough data to seed PRNG.
+[clinic start generated code]*/
- bytes = RAND_egd(PyBytes_AsString(path));
+static PyObject *
+_ssl_RAND_egd_impl(PyModuleDef *module, PyObject *path)
+/*[clinic end generated code: output=8e728e501e28541b input=1aeb7eb948312195]*/
+{
+ int bytes = RAND_egd(PyBytes_AsString(path));
Py_DECREF(path);
if (bytes == -1) {
PyErr_SetString(PySSLErrorObject,
@@ -3346,27 +3964,21 @@ PySSL_RAND_egd(PyObject *self, PyObject *args)
}
return PyLong_FromLong(bytes);
}
-
-PyDoc_STRVAR(PySSL_RAND_egd_doc,
-"RAND_egd(path) -> bytes\n\
-\n\
-Queries the entropy gather daemon (EGD) on the socket named by 'path'.\n\
-Returns number of bytes read. Raises SSLError if connection to EGD\n\
-fails or if it does not provide enough data to seed PRNG.");
#endif /* HAVE_RAND_EGD */
-#endif /* HAVE_OPENSSL_RAND */
-PyDoc_STRVAR(PySSL_get_default_verify_paths_doc,
-"get_default_verify_paths() -> tuple\n\
-\n\
-Return search paths and environment vars that are used by SSLContext's\n\
-set_default_verify_paths() to load default CAs. The values are\n\
-'cert_file_env', 'cert_file', 'cert_dir_env', 'cert_dir'.");
+/*[clinic input]
+_ssl.get_default_verify_paths
+
+Return search paths and environment vars that are used by SSLContext's set_default_verify_paths() to load default CAs.
+
+The values are 'cert_file_env', 'cert_file', 'cert_dir_env', 'cert_dir'.
+[clinic start generated code]*/
static PyObject *
-PySSL_get_default_verify_paths(PyObject *self)
+_ssl_get_default_verify_paths_impl(PyModuleDef *module)
+/*[clinic end generated code: output=5a2820ce7e3304d3 input=5210c953d98c3eb5]*/
{
PyObject *ofile_env = NULL;
PyObject *ofile = NULL;
@@ -3425,26 +4037,24 @@ asn1obj2py(ASN1_OBJECT *obj)
}
}
-PyDoc_STRVAR(PySSL_txt2obj_doc,
-"txt2obj(txt, name=False) -> (nid, shortname, longname, oid)\n\
-\n\
-Lookup NID, short name, long name and OID of an ASN1_OBJECT. By default\n\
-objects are looked up by OID. With name=True short and long name are also\n\
-matched.");
+/*[clinic input]
+_ssl.txt2obj
+ txt: str
+ name: bool = False
-static PyObject*
-PySSL_txt2obj(PyObject *self, PyObject *args, PyObject *kwds)
+Lookup NID, short name, long name and OID of an ASN1_OBJECT.
+
+By default objects are looked up by OID. With name=True short and
+long name are also matched.
+[clinic start generated code]*/
+
+static PyObject *
+_ssl_txt2obj_impl(PyModuleDef *module, const char *txt, int name)
+/*[clinic end generated code: output=2ae2c30531b8809f input=1c1e7d0aa7c48602]*/
{
- char *kwlist[] = {"txt", "name", NULL};
PyObject *result = NULL;
- char *txt;
- int name = 0;
ASN1_OBJECT *obj;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|p:txt2obj",
- kwlist, &txt, &name)) {
- return NULL;
- }
obj = OBJ_txt2obj(txt, name ? 0 : 1);
if (obj == NULL) {
PyErr_Format(PyExc_ValueError, "unknown object '%.100s'", txt);
@@ -3455,21 +4065,21 @@ PySSL_txt2obj(PyObject *self, PyObject *args, PyObject *kwds)
return result;
}
-PyDoc_STRVAR(PySSL_nid2obj_doc,
-"nid2obj(nid) -> (nid, shortname, longname, oid)\n\
-\n\
-Lookup NID, short name, long name and OID of an ASN1_OBJECT by NID.");
+/*[clinic input]
+_ssl.nid2obj
+ nid: int
+ /
-static PyObject*
-PySSL_nid2obj(PyObject *self, PyObject *args)
+Lookup NID, short name, long name and OID of an ASN1_OBJECT by NID.
+[clinic start generated code]*/
+
+static PyObject *
+_ssl_nid2obj_impl(PyModuleDef *module, int nid)
+/*[clinic end generated code: output=8db1df89e44badb8 input=51787a3bee7d8f98]*/
{
PyObject *result = NULL;
- int nid;
ASN1_OBJECT *obj;
- if (!PyArg_ParseTuple(args, "i:nid2obj", &nid)) {
- return NULL;
- }
if (nid < NID_undef) {
PyErr_SetString(PyExc_ValueError, "NID must be positive.");
return NULL;
@@ -3569,30 +4179,28 @@ parseKeyUsage(PCCERT_CONTEXT pCertCtx, DWORD flags)
return retval;
}
-PyDoc_STRVAR(PySSL_enum_certificates_doc,
-"enum_certificates(store_name) -> []\n\
-\n\
-Retrieve certificates from Windows' cert store. store_name may be one of\n\
-'CA', 'ROOT' or 'MY'. The system may provide more cert storages, too.\n\
-The function returns a list of (bytes, encoding_type, trust) tuples. The\n\
-encoding_type flag can be interpreted with X509_ASN_ENCODING or\n\
-PKCS_7_ASN_ENCODING. The trust setting is either a set of OIDs or the\n\
-boolean True.");
+/*[clinic input]
+_ssl.enum_certificates
+ store_name: str
+
+Retrieve certificates from Windows' cert store.
+
+store_name may be one of 'CA', 'ROOT' or 'MY'. The system may provide
+more cert storages, too. The function returns a list of (bytes,
+encoding_type, trust) tuples. The encoding_type flag can be interpreted
+with X509_ASN_ENCODING or PKCS_7_ASN_ENCODING. The trust setting is either
+a set of OIDs or the boolean True.
+[clinic start generated code]*/
static PyObject *
-PySSL_enum_certificates(PyObject *self, PyObject *args, PyObject *kwds)
+_ssl_enum_certificates_impl(PyModuleDef *module, const char *store_name)
+/*[clinic end generated code: output=cc4ebc10b8adacfc input=915f60d70461ea4e]*/
{
- char *kwlist[] = {"store_name", NULL};
- char *store_name;
HCERTSTORE hStore = NULL;
PCCERT_CONTEXT pCertCtx = NULL;
PyObject *keyusage = NULL, *cert = NULL, *enc = NULL, *tup = NULL;
PyObject *result = NULL;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "s:enum_certificates",
- kwlist, &store_name)) {
- return NULL;
- }
result = PyList_New(0);
if (result == NULL) {
return NULL;
@@ -3660,29 +4268,27 @@ PySSL_enum_certificates(PyObject *self, PyObject *args, PyObject *kwds)
return result;
}
-PyDoc_STRVAR(PySSL_enum_crls_doc,
-"enum_crls(store_name) -> []\n\
-\n\
-Retrieve CRLs from Windows' cert store. store_name may be one of\n\
-'CA', 'ROOT' or 'MY'. The system may provide more cert storages, too.\n\
-The function returns a list of (bytes, encoding_type) tuples. The\n\
-encoding_type flag can be interpreted with X509_ASN_ENCODING or\n\
-PKCS_7_ASN_ENCODING.");
+/*[clinic input]
+_ssl.enum_crls
+ store_name: str
+
+Retrieve CRLs from Windows' cert store.
+
+store_name may be one of 'CA', 'ROOT' or 'MY'. The system may provide
+more cert storages, too. The function returns a list of (bytes,
+encoding_type) tuples. The encoding_type flag can be interpreted with
+X509_ASN_ENCODING or PKCS_7_ASN_ENCODING.
+[clinic start generated code]*/
static PyObject *
-PySSL_enum_crls(PyObject *self, PyObject *args, PyObject *kwds)
+_ssl_enum_crls_impl(PyModuleDef *module, const char *store_name)
+/*[clinic end generated code: output=763490a2aa1c50d5 input=a1f1d7629f1c5d3d]*/
{
- char *kwlist[] = {"store_name", NULL};
- char *store_name;
HCERTSTORE hStore = NULL;
PCCRL_CONTEXT pCrlCtx = NULL;
PyObject *crl = NULL, *enc = NULL, *tup = NULL;
PyObject *result = NULL;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "s:enum_crls",
- kwlist, &store_name)) {
- return NULL;
- }
result = PyList_New(0);
if (result == NULL) {
return NULL;
@@ -3742,36 +4348,18 @@ PySSL_enum_crls(PyObject *self, PyObject *args, PyObject *kwds)
#endif /* _MSC_VER */
/* List of functions exported by this module. */
-
static PyMethodDef PySSL_methods[] = {
- {"_test_decode_cert", PySSL_test_decode_certificate,
- METH_VARARGS},
-#ifdef HAVE_OPENSSL_RAND
- {"RAND_add", PySSL_RAND_add, METH_VARARGS,
- PySSL_RAND_add_doc},
- {"RAND_bytes", PySSL_RAND_bytes, METH_VARARGS,
- PySSL_RAND_bytes_doc},
- {"RAND_pseudo_bytes", PySSL_RAND_pseudo_bytes, METH_VARARGS,
- PySSL_RAND_pseudo_bytes_doc},
-#ifdef HAVE_RAND_EGD
- {"RAND_egd", PySSL_RAND_egd, METH_VARARGS,
- PySSL_RAND_egd_doc},
-#endif
- {"RAND_status", (PyCFunction)PySSL_RAND_status, METH_NOARGS,
- PySSL_RAND_status_doc},
-#endif
- {"get_default_verify_paths", (PyCFunction)PySSL_get_default_verify_paths,
- METH_NOARGS, PySSL_get_default_verify_paths_doc},
-#ifdef _MSC_VER
- {"enum_certificates", (PyCFunction)PySSL_enum_certificates,
- METH_VARARGS | METH_KEYWORDS, PySSL_enum_certificates_doc},
- {"enum_crls", (PyCFunction)PySSL_enum_crls,
- METH_VARARGS | METH_KEYWORDS, PySSL_enum_crls_doc},
-#endif
- {"txt2obj", (PyCFunction)PySSL_txt2obj,
- METH_VARARGS | METH_KEYWORDS, PySSL_txt2obj_doc},
- {"nid2obj", (PyCFunction)PySSL_nid2obj,
- METH_VARARGS, PySSL_nid2obj_doc},
+ _SSL__TEST_DECODE_CERT_METHODDEF
+ _SSL_RAND_ADD_METHODDEF
+ _SSL_RAND_BYTES_METHODDEF
+ _SSL_RAND_PSEUDO_BYTES_METHODDEF
+ _SSL_RAND_EGD_METHODDEF
+ _SSL_RAND_STATUS_METHODDEF
+ _SSL_GET_DEFAULT_VERIFY_PATHS_METHODDEF
+ _SSL_ENUM_CERTIFICATES_METHODDEF
+ _SSL_ENUM_CRLS_METHODDEF
+ _SSL_TXT2OBJ_METHODDEF
+ _SSL_NID2OBJ_METHODDEF
{NULL, NULL} /* Sentinel */
};
@@ -3911,6 +4499,8 @@ PyInit__ssl(void)
return NULL;
if (PyType_Ready(&PySSLSocket_Type) < 0)
return NULL;
+ if (PyType_Ready(&PySSLMemoryBIO_Type) < 0)
+ return NULL;
m = PyModule_Create(&_sslmodule);
if (m == NULL)
@@ -3974,6 +4564,9 @@ PyInit__ssl(void)
if (PyDict_SetItemString(d, "_SSLSocket",
(PyObject *)&PySSLSocket_Type) != 0)
return NULL;
+ if (PyDict_SetItemString(d, "MemoryBIO",
+ (PyObject *)&PySSLMemoryBIO_Type) != 0)
+ return NULL;
PyModule_AddIntConstant(m, "SSL_ERROR_ZERO_RETURN",
PY_SSL_ERROR_ZERO_RETURN);
PyModule_AddIntConstant(m, "SSL_ERROR_WANT_READ",
@@ -4114,11 +4707,7 @@ PyInit__ssl(void)
Py_INCREF(r);
PyModule_AddObject(m, "HAS_SNI", r);
-#if HAVE_OPENSSL_FINISHED
r = Py_True;
-#else
- r = Py_False;
-#endif
Py_INCREF(r);
PyModule_AddObject(m, "HAS_TLS_UNIQUE", r);
@@ -4138,6 +4727,14 @@ PyInit__ssl(void)
Py_INCREF(r);
PyModule_AddObject(m, "HAS_NPN", r);
+#ifdef HAVE_ALPN
+ r = Py_True;
+#else
+ r = Py_False;
+#endif
+ Py_INCREF(r);
+ PyModule_AddObject(m, "HAS_ALPN", r);
+
/* Mappings for error codes */
err_codes_to_names = PyDict_New();
err_names_to_codes = PyDict_New();
diff --git a/Modules/_stat.c b/Modules/_stat.c
index a301fa8840..f6cb303500 100644
--- a/Modules/_stat.c
+++ b/Modules/_stat.c
@@ -27,9 +27,21 @@ extern "C" {
#endif /* HAVE_SYS_STAT_H */
#ifdef MS_WINDOWS
+#include <windows.h>
typedef unsigned short mode_t;
+
+/* FILE_ATTRIBUTE_INTEGRITY_STREAM and FILE_ATTRIBUTE_NO_SCRUB_DATA
+ are not present in VC2010, so define them manually */
+#ifndef FILE_ATTRIBUTE_INTEGRITY_STREAM
+# define FILE_ATTRIBUTE_INTEGRITY_STREAM 0x8000
+#endif
+
+#ifndef FILE_ATTRIBUTE_NO_SCRUB_DATA
+# define FILE_ATTRIBUTE_NO_SCRUB_DATA 0x20000
#endif
+#endif /* MS_WINDOWS */
+
/* From Python's stat.py */
#ifndef S_IMODE
# define S_IMODE 07777
@@ -473,6 +485,10 @@ ST_SIZE\n\
ST_ATIME\n\
ST_MTIME\n\
ST_CTIME\n\
+\n"
+
+"FILE_ATTRIBUTE_*: Windows file attribute constants\n\
+ (only present on Windows)\n\
");
@@ -555,6 +571,26 @@ PyInit__stat(void)
if (PyModule_AddIntConstant(m, "ST_MTIME", 8)) return NULL;
if (PyModule_AddIntConstant(m, "ST_CTIME", 9)) return NULL;
+#ifdef MS_WINDOWS
+ if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_ARCHIVE)) return NULL;
+ if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_COMPRESSED)) return NULL;
+ if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_DEVICE)) return NULL;
+ if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_DIRECTORY)) return NULL;
+ if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_ENCRYPTED)) return NULL;
+ if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_HIDDEN)) return NULL;
+ if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_INTEGRITY_STREAM)) return NULL;
+ if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_NORMAL)) return NULL;
+ if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_NOT_CONTENT_INDEXED)) return NULL;
+ if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_NO_SCRUB_DATA)) return NULL;
+ if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_OFFLINE)) return NULL;
+ if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_READONLY)) return NULL;
+ if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_REPARSE_POINT)) return NULL;
+ if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_SPARSE_FILE)) return NULL;
+ if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_SYSTEM)) return NULL;
+ if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_TEMPORARY)) return NULL;
+ if (PyModule_AddIntMacro(m, FILE_ATTRIBUTE_VIRTUAL)) return NULL;
+#endif
+
return m;
}
diff --git a/Modules/_struct.c b/Modules/_struct.c
index ad9959e1e5..f965541a5b 100644
--- a/Modules/_struct.c
+++ b/Modules/_struct.c
@@ -85,8 +85,6 @@ typedef struct { char c; _Bool x; } s_bool;
#define BOOL_ALIGN 0
#endif
-#define STRINGIFY(x) #x
-
#ifdef __powerc
#pragma options align=reset
#endif
@@ -546,8 +544,8 @@ np_short(char *p, PyObject *v, const formatdef *f)
return -1;
if (x < SHRT_MIN || x > SHRT_MAX){
PyErr_SetString(StructError,
- "short format requires " STRINGIFY(SHRT_MIN)
- " <= number <= " STRINGIFY(SHRT_MAX));
+ "short format requires " Py_STRINGIFY(SHRT_MIN)
+ " <= number <= " Py_STRINGIFY(SHRT_MAX));
return -1;
}
y = (short)x;
@@ -564,7 +562,8 @@ np_ushort(char *p, PyObject *v, const formatdef *f)
return -1;
if (x < 0 || x > USHRT_MAX){
PyErr_SetString(StructError,
- "ushort format requires 0 <= number <= " STRINGIFY(USHRT_MAX));
+ "ushort format requires 0 <= number <= "
+ Py_STRINGIFY(USHRT_MAX));
return -1;
}
y = (unsigned short)x;
@@ -1264,7 +1263,8 @@ prepare_s(PyStructObject *self)
const char *s;
const char *fmt;
char c;
- Py_ssize_t size, len, ncodes, num, itemsize;
+ Py_ssize_t size, len, num, itemsize;
+ size_t ncodes;
fmt = PyBytes_AS_STRING(self->s_format);
@@ -1320,7 +1320,7 @@ prepare_s(PyStructObject *self)
}
/* check for overflow */
- if ((ncodes + 1) > (PY_SSIZE_T_MAX / sizeof(formatcode))) {
+ if ((ncodes + 1) > ((size_t)PY_SSIZE_T_MAX / sizeof(formatcode))) {
PyErr_NoMemory();
return -1;
}
@@ -1437,8 +1437,7 @@ s_init(PyObject *self, PyObject *args, PyObject *kwds)
return -1;
}
- Py_CLEAR(soself->s_format);
- soself->s_format = o_format;
+ Py_XSETREF(soself->s_format, o_format);
ret = prepare_s(soself);
return ret;
@@ -1498,8 +1497,8 @@ PyDoc_STRVAR(s_unpack__doc__,
"S.unpack(buffer) -> (v1, v2, ...)\n\
\n\
Return a tuple containing values unpacked according to the format\n\
-string S.format. Requires len(buffer) == S.size. See help(struct)\n\
-for more on format strings.");
+string S.format. The buffer's size in bytes must be S.size. See\n\
+help(struct) for more on format strings.");
static PyObject *
s_unpack(PyObject *self, PyObject *input)
@@ -1528,8 +1527,8 @@ PyDoc_STRVAR(s_unpack_from__doc__,
"S.unpack_from(buffer, offset=0) -> (v1, v2, ...)\n\
\n\
Return a tuple containing values unpacked according to the format\n\
-string S.format. Requires len(buffer[offset:]) >= S.size. See\n\
-help(struct) for more on format strings.");
+string S.format. The buffer's size in bytes, minus offset, must be at\n\
+least S.size. See help(struct) for more on format strings.");
static PyObject *
s_unpack_from(PyObject *self, PyObject *args, PyObject *kwds)
@@ -1924,7 +1923,7 @@ s_sizeof(PyStructObject *self, void *unused)
Py_ssize_t size;
formatcode *code;
- size = sizeof(PyStructObject) + sizeof(formatcode);
+ size = _PyObject_SIZE(Py_TYPE(self)) + sizeof(formatcode);
for (code = self->s_codes; code->fmtdef != NULL; code++)
size += sizeof(formatcode);
return PyLong_FromSsize_t(size);
@@ -2131,8 +2130,8 @@ PyDoc_STRVAR(unpack_doc,
"unpack(fmt, buffer) -> (v1, v2, ...)\n\
\n\
Return a tuple containing values unpacked according to the format string\n\
-fmt. Requires len(buffer) == calcsize(fmt). See help(struct) for more\n\
-on format strings.");
+fmt. The buffer's size in bytes must be calcsize(fmt). See help(struct)\n\
+for more on format strings.");
static PyObject *
unpack(PyObject *self, PyObject *args)
@@ -2154,8 +2153,8 @@ PyDoc_STRVAR(unpack_from_doc,
"unpack_from(fmt, buffer, offset=0) -> (v1, v2, ...)\n\
\n\
Return a tuple containing values unpacked according to the format string\n\
-fmt. Requires len(buffer[offset:]) >= calcsize(fmt). See help(struct)\n\
-for more on format strings.");
+fmt. The buffer's size, minus offset, must be at least calcsize(fmt).\n\
+See help(struct) for more on format strings.");
static PyObject *
unpack_from(PyObject *self, PyObject *args, PyObject *kwds)
diff --git a/Modules/_testbuffer.c b/Modules/_testbuffer.c
index 176df7c5ba..43db8a8e53 100644
--- a/Modules/_testbuffer.c
+++ b/Modules/_testbuffer.c
@@ -190,7 +190,7 @@ ndbuf_delete(NDArrayObject *nd, ndbuf_t *elt)
elt->prev->next = elt->next;
else
nd->head = elt->next;
-
+
if (elt->next)
elt->next->prev = elt->prev;
@@ -767,7 +767,7 @@ out:
+-----------------+-----------+-------------+----------------+
| base.readonly | 0 | OK | OK |
+-----------------+-----------+-------------+----------------+
- | base.format | NULL | OK | OK |
+ | base.format | NULL | OK | OK |
+-----------------+-----------+-------------+----------------+
| base.ndim | 1 | 1 | OK |
+-----------------+-----------+-------------+----------------+
@@ -1510,6 +1510,19 @@ ndarray_getbuf(NDArrayObject *self, Py_buffer *view, int flags)
view->shape = NULL;
}
+ /* Ascertain that the new buffer has the same contiguity as the exporter */
+ if (ND_C_CONTIGUOUS(baseflags) != PyBuffer_IsContiguous(view, 'C') ||
+ /* skip cast to 1-d */
+ (view->format != NULL && view->shape != NULL &&
+ ND_FORTRAN_CONTIGUOUS(baseflags) != PyBuffer_IsContiguous(view, 'F')) ||
+ /* cast to 1-d */
+ (view->format == NULL && view->shape == NULL &&
+ !PyBuffer_IsContiguous(view, 'F'))) {
+ PyErr_SetString(PyExc_BufferError,
+ "ndarray: contiguity mismatch in getbuf()");
+ return -1;
+ }
+
view->obj = (PyObject *)self;
Py_INCREF(view->obj);
self->head->exports++;
@@ -2005,7 +2018,7 @@ ndarray_get_obj(NDArrayObject *self, void *closure)
{
Py_buffer *base = &self->head->base;
- if (base->obj == NULL) {
+ if (base->obj == NULL) {
Py_RETURN_NONE;
}
Py_INCREF(base->obj);
@@ -2206,6 +2219,8 @@ ndarray_add_suboffsets(PyObject *self, PyObject *dummy)
for (i = 0; i < base->ndim; i++)
base->suboffsets[i] = -1;
+ nd->head->flags &= ~(ND_C|ND_FORTRAN);
+
Py_RETURN_NONE;
}
@@ -2469,13 +2484,12 @@ arraycmp(const Py_ssize_t *a1, const Py_ssize_t *a2, const Py_ssize_t *shape,
{
Py_ssize_t i;
- if (ndim == 1 && shape && shape[0] == 1) {
- /* This is for comparing strides: For example, the array
- [175], shape=[1], strides=[-5] is considered contiguous. */
- return 1;
- }
for (i = 0; i < ndim; i++) {
+ if (shape && shape[i] <= 1) {
+ /* strides can differ if the dimension is less than 2 */
+ continue;
+ }
if (a1[i] != a2[i]) {
return 0;
}
@@ -2544,7 +2558,7 @@ result:
PyBuffer_Release(&v1);
PyBuffer_Release(&v2);
- ret = equal ? Py_True : Py_False;
+ ret = equal ? Py_True : Py_False;
Py_INCREF(ret);
return ret;
}
@@ -2555,30 +2569,35 @@ is_contiguous(PyObject *self, PyObject *args)
PyObject *obj;
PyObject *order;
PyObject *ret = NULL;
- Py_buffer view;
+ Py_buffer view, *base;
char ord;
if (!PyArg_ParseTuple(args, "OO", &obj, &order)) {
return NULL;
}
- if (PyObject_GetBuffer(obj, &view, PyBUF_FULL_RO) < 0) {
- PyErr_SetString(PyExc_TypeError,
- "is_contiguous: object does not implement the buffer "
- "protocol");
+ ord = get_ascii_order(order);
+ if (ord == CHAR_MAX) {
return NULL;
}
- ord = get_ascii_order(order);
- if (ord == CHAR_MAX) {
- goto release;
+ if (NDArray_Check(obj)) {
+ /* Skip the buffer protocol to check simple etc. buffers directly. */
+ base = &((NDArrayObject *)obj)->head->base;
+ ret = PyBuffer_IsContiguous(base, ord) ? Py_True : Py_False;
+ }
+ else {
+ if (PyObject_GetBuffer(obj, &view, PyBUF_FULL_RO) < 0) {
+ PyErr_SetString(PyExc_TypeError,
+ "is_contiguous: object does not implement the buffer "
+ "protocol");
+ return NULL;
+ }
+ ret = PyBuffer_IsContiguous(&view, ord) ? Py_True : Py_False;
+ PyBuffer_Release(&view);
}
- ret = PyBuffer_IsContiguous(&view, ord) ? Py_True : Py_False;
Py_INCREF(ret);
-
-release:
- PyBuffer_Release(&view);
return ret;
}
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index 8ebe9709b7..3810e944ce 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -12,6 +12,11 @@
#include "structmember.h"
#include "datetime.h"
#include "marshal.h"
+#include <signal.h>
+
+#ifdef MS_WINDOWS
+# include <winsock2.h> /* struct timeval */
+#endif
#ifdef WITH_THREAD
#include "pythread.h"
@@ -68,6 +73,10 @@ test_config(PyObject *self)
static PyObject*
test_sizeof_c_types(PyObject *self)
{
+#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wtype-limits"
+#endif
#define CHECK_SIZEOF(TYPE, EXPECTED) \
if (EXPECTED != sizeof(TYPE)) { \
PyErr_Format(TestError, \
@@ -125,6 +134,9 @@ test_sizeof_c_types(PyObject *self)
#undef IS_SIGNED
#undef CHECK_SIGNESS
#undef CHECK_SIZEOF
+#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))
+#pragma GCC diagnostic pop
+#endif
}
@@ -860,6 +872,120 @@ test_L_code(PyObject *self)
#endif /* ifdef HAVE_LONG_LONG */
+static PyObject *
+return_none(void *unused)
+{
+ Py_RETURN_NONE;
+}
+
+static PyObject *
+raise_error(void *unused)
+{
+ PyErr_SetNone(PyExc_ValueError);
+ return NULL;
+}
+
+static int
+test_buildvalue_N_error(const char *fmt)
+{
+ PyObject *arg, *res;
+
+ arg = PyList_New(0);
+ if (arg == NULL) {
+ return -1;
+ }
+
+ Py_INCREF(arg);
+ res = Py_BuildValue(fmt, return_none, NULL, arg);
+ if (res == NULL) {
+ return -1;
+ }
+ Py_DECREF(res);
+ if (Py_REFCNT(arg) != 1) {
+ PyErr_Format(TestError, "test_buildvalue_N: "
+ "arg was not decrefed in successful "
+ "Py_BuildValue(\"%s\")", fmt);
+ return -1;
+ }
+
+ Py_INCREF(arg);
+ res = Py_BuildValue(fmt, raise_error, NULL, arg);
+ if (res != NULL || !PyErr_Occurred()) {
+ PyErr_Format(TestError, "test_buildvalue_N: "
+ "Py_BuildValue(\"%s\") didn't complain", fmt);
+ return -1;
+ }
+ PyErr_Clear();
+ if (Py_REFCNT(arg) != 1) {
+ PyErr_Format(TestError, "test_buildvalue_N: "
+ "arg was not decrefed in failed "
+ "Py_BuildValue(\"%s\")", fmt);
+ return -1;
+ }
+ Py_DECREF(arg);
+ return 0;
+}
+
+static PyObject *
+test_buildvalue_N(PyObject *self, PyObject *noargs)
+{
+ PyObject *arg, *res;
+
+ arg = PyList_New(0);
+ if (arg == NULL) {
+ return NULL;
+ }
+ Py_INCREF(arg);
+ res = Py_BuildValue("N", arg);
+ if (res == NULL) {
+ return NULL;
+ }
+ if (res != arg) {
+ return raiseTestError("test_buildvalue_N",
+ "Py_BuildValue(\"N\") returned wrong result");
+ }
+ if (Py_REFCNT(arg) != 2) {
+ return raiseTestError("test_buildvalue_N",
+ "arg was not decrefed in Py_BuildValue(\"N\")");
+ }
+ Py_DECREF(res);
+ Py_DECREF(arg);
+
+ if (test_buildvalue_N_error("O&N") < 0)
+ return NULL;
+ if (test_buildvalue_N_error("(O&N)") < 0)
+ return NULL;
+ if (test_buildvalue_N_error("[O&N]") < 0)
+ return NULL;
+ if (test_buildvalue_N_error("{O&N}") < 0)
+ return NULL;
+ if (test_buildvalue_N_error("{()O&(())N}") < 0)
+ return NULL;
+
+ Py_RETURN_NONE;
+}
+
+
+static PyObject *
+get_args(PyObject *self, PyObject *args)
+{
+ if (args == NULL) {
+ args = Py_None;
+ }
+ Py_INCREF(args);
+ return args;
+}
+
+static PyObject *
+get_kwargs(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ if (kwargs == NULL) {
+ kwargs = Py_None;
+ }
+ Py_INCREF(kwargs);
+ return kwargs;
+}
+
/* Test tuple argument processing */
static PyObject *
getargs_tuple(PyObject *self, PyObject *args)
@@ -1071,12 +1197,78 @@ test_k_code(PyObject *self)
}
static PyObject *
+getargs_f(PyObject *self, PyObject *args)
+{
+ float f;
+ if (!PyArg_ParseTuple(args, "f", &f))
+ return NULL;
+ return PyFloat_FromDouble(f);
+}
+
+static PyObject *
+getargs_d(PyObject *self, PyObject *args)
+{
+ double d;
+ if (!PyArg_ParseTuple(args, "d", &d))
+ return NULL;
+ return PyFloat_FromDouble(d);
+}
+
+static PyObject *
+getargs_D(PyObject *self, PyObject *args)
+{
+ Py_complex cval;
+ if (!PyArg_ParseTuple(args, "D", &cval))
+ return NULL;
+ return PyComplex_FromCComplex(cval);
+}
+
+static PyObject *
+getargs_S(PyObject *self, PyObject *args)
+{
+ PyObject *obj;
+ if (!PyArg_ParseTuple(args, "S", &obj))
+ return NULL;
+ Py_INCREF(obj);
+ return obj;
+}
+
+static PyObject *
+getargs_Y(PyObject *self, PyObject *args)
+{
+ PyObject *obj;
+ if (!PyArg_ParseTuple(args, "Y", &obj))
+ return NULL;
+ Py_INCREF(obj);
+ return obj;
+}
+
+static PyObject *
+getargs_U(PyObject *self, PyObject *args)
+{
+ PyObject *obj;
+ if (!PyArg_ParseTuple(args, "U", &obj))
+ return NULL;
+ Py_INCREF(obj);
+ return obj;
+}
+
+static PyObject *
getargs_c(PyObject *self, PyObject *args)
{
char c;
if (!PyArg_ParseTuple(args, "c", &c))
return NULL;
- return PyBytes_FromStringAndSize(&c, 1);
+ return PyLong_FromLong((unsigned char)c);
+}
+
+static PyObject *
+getargs_C(PyObject *self, PyObject *args)
+{
+ int c;
+ if (!PyArg_ParseTuple(args, "C", &c))
+ return NULL;
+ return PyLong_FromLong(c);
}
static PyObject *
@@ -1231,6 +1423,84 @@ getargs_Z_hash(PyObject *self, PyObject *args)
Py_RETURN_NONE;
}
+static PyObject *
+getargs_es(PyObject *self, PyObject *args)
+{
+ PyObject *arg, *result;
+ const char *encoding = NULL;
+ char *str;
+
+ if (!PyArg_ParseTuple(args, "O|s", &arg, &encoding))
+ return NULL;
+ if (!PyArg_Parse(arg, "es", encoding, &str))
+ return NULL;
+ result = PyBytes_FromString(str);
+ PyMem_Free(str);
+ return result;
+}
+
+static PyObject *
+getargs_et(PyObject *self, PyObject *args)
+{
+ PyObject *arg, *result;
+ const char *encoding = NULL;
+ char *str;
+
+ if (!PyArg_ParseTuple(args, "O|s", &arg, &encoding))
+ return NULL;
+ if (!PyArg_Parse(arg, "et", encoding, &str))
+ return NULL;
+ result = PyBytes_FromString(str);
+ PyMem_Free(str);
+ return result;
+}
+
+static PyObject *
+getargs_es_hash(PyObject *self, PyObject *args)
+{
+ PyObject *arg, *result;
+ const char *encoding = NULL;
+ PyByteArrayObject *buffer = NULL;
+ char *str = NULL;
+ Py_ssize_t size;
+
+ if (!PyArg_ParseTuple(args, "O|sY", &arg, &encoding, &buffer))
+ return NULL;
+ if (buffer != NULL) {
+ str = PyByteArray_AS_STRING(buffer);
+ size = PyByteArray_GET_SIZE(buffer);
+ }
+ if (!PyArg_Parse(arg, "es#", encoding, &str, &size))
+ return NULL;
+ result = PyBytes_FromStringAndSize(str, size);
+ if (buffer == NULL)
+ PyMem_Free(str);
+ return result;
+}
+
+static PyObject *
+getargs_et_hash(PyObject *self, PyObject *args)
+{
+ PyObject *arg, *result;
+ const char *encoding = NULL;
+ PyByteArrayObject *buffer = NULL;
+ char *str = NULL;
+ Py_ssize_t size;
+
+ if (!PyArg_ParseTuple(args, "O|sY", &arg, &encoding, &buffer))
+ return NULL;
+ if (buffer != NULL) {
+ str = PyByteArray_AS_STRING(buffer);
+ size = PyByteArray_GET_SIZE(buffer);
+ }
+ if (!PyArg_Parse(arg, "et#", encoding, &str, &size))
+ return NULL;
+ result = PyBytes_FromStringAndSize(str, size);
+ if (buffer == NULL)
+ PyMem_Free(str);
+ return result;
+}
+
/* Test the s and z codes for PyArg_ParseTuple.
*/
static PyObject *
@@ -1719,7 +1989,7 @@ test_long_numbits(PyObject *self)
{-0xffffL, 16, -1},
{0xfffffffL, 28, 1},
{-0xfffffffL, 28, -1}};
- int i;
+ size_t i;
for (i = 0; i < Py_ARRAY_LENGTH(testcases); ++i) {
size_t nbits;
@@ -2480,7 +2750,7 @@ make_memoryview_from_NULL_pointer(PyObject *self)
return NULL;
return PyMemoryView_FromBuffer(&info);
}
-
+
static PyObject *
test_from_contiguous(PyObject* self, PyObject *noargs)
{
@@ -2531,6 +2801,58 @@ test_from_contiguous(PyObject* self, PyObject *noargs)
Py_RETURN_NONE;
}
+#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__GNUC__)
+extern PyTypeObject _PyBytesIOBuffer_Type;
+
+static PyObject *
+test_pep3118_obsolete_write_locks(PyObject* self, PyObject *noargs)
+{
+ PyTypeObject *type = &_PyBytesIOBuffer_Type;
+ PyObject *b;
+ char *dummy[1];
+ int ret, match;
+
+ /* PyBuffer_FillInfo() */
+ ret = PyBuffer_FillInfo(NULL, NULL, dummy, 1, 0, PyBUF_SIMPLE);
+ match = PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_BufferError);
+ PyErr_Clear();
+ if (ret != -1 || match == 0)
+ goto error;
+
+ /* bytesiobuf_getbuffer() */
+ b = type->tp_alloc(type, 0);
+ if (b == NULL) {
+ return NULL;
+ }
+
+ ret = PyObject_GetBuffer(b, NULL, PyBUF_SIMPLE);
+ Py_DECREF(b);
+ match = PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_BufferError);
+ PyErr_Clear();
+ if (ret != -1 || match == 0)
+ goto error;
+
+ Py_RETURN_NONE;
+
+error:
+ PyErr_SetString(TestError,
+ "test_pep3118_obsolete_write_locks: failure");
+ return NULL;
+}
+#endif
+
+/* This tests functions that historically supported write locks. It is
+ wrong to call getbuffer() with view==NULL and a compliant getbufferproc
+ is entitled to segfault in that case. */
+static PyObject *
+getbuffer_with_null_view(PyObject* self, PyObject *obj)
+{
+ if (PyObject_GetBuffer(obj, NULL, PyBUF_SIMPLE) < 0)
+ return NULL;
+
+ Py_RETURN_NONE;
+}
+
/* Test that the fatal error from not having a current thread doesn't
cause an infinite loop. Run via Lib/test/test_capi.py */
static PyObject *
@@ -2582,7 +2904,7 @@ run_in_subinterp(PyObject *self, PyObject *args)
static int
check_time_rounding(int round)
{
- if (round != _PyTime_ROUND_DOWN && round != _PyTime_ROUND_UP) {
+ if (round != _PyTime_ROUND_FLOOR && round != _PyTime_ROUND_CEILING) {
PyErr_SetString(PyExc_ValueError, "invalid rounding");
return -1;
}
@@ -2715,6 +3037,21 @@ with_tp_del(PyObject *self, PyObject *args)
return obj;
}
+static PyMethodDef ml;
+
+static PyObject *
+create_cfunction(PyObject *self, PyObject *args)
+{
+ return PyCFunction_NewEx(&ml, self, NULL);
+}
+
+static PyMethodDef ml = {
+ "create_cfunction",
+ create_cfunction,
+ METH_NOARGS,
+ NULL
+};
+
static PyObject *
_test_incref(PyObject *ob)
{
@@ -2773,6 +3110,20 @@ test_pymem_alloc0(PyObject *self)
{
void *ptr;
+ ptr = PyMem_RawMalloc(0);
+ if (ptr == NULL) {
+ PyErr_SetString(PyExc_RuntimeError, "PyMem_RawMalloc(0) returns NULL");
+ return NULL;
+ }
+ PyMem_RawFree(ptr);
+
+ ptr = PyMem_RawCalloc(0, 0);
+ if (ptr == NULL) {
+ PyErr_SetString(PyExc_RuntimeError, "PyMem_RawCalloc(0, 0) returns NULL");
+ return NULL;
+ }
+ PyMem_RawFree(ptr);
+
ptr = PyMem_Malloc(0);
if (ptr == NULL) {
PyErr_SetString(PyExc_RuntimeError, "PyMem_Malloc(0) returns NULL");
@@ -2780,6 +3131,13 @@ test_pymem_alloc0(PyObject *self)
}
PyMem_Free(ptr);
+ ptr = PyMem_Calloc(0, 0);
+ if (ptr == NULL) {
+ PyErr_SetString(PyExc_RuntimeError, "PyMem_Calloc(0, 0) returns NULL");
+ return NULL;
+ }
+ PyMem_Free(ptr);
+
ptr = PyObject_Malloc(0);
if (ptr == NULL) {
PyErr_SetString(PyExc_RuntimeError, "PyObject_Malloc(0) returns NULL");
@@ -2787,13 +3145,22 @@ test_pymem_alloc0(PyObject *self)
}
PyObject_Free(ptr);
+ ptr = PyObject_Calloc(0, 0);
+ if (ptr == NULL) {
+ PyErr_SetString(PyExc_RuntimeError, "PyObject_Calloc(0, 0) returns NULL");
+ return NULL;
+ }
+ PyObject_Free(ptr);
+
Py_RETURN_NONE;
}
typedef struct {
- PyMemAllocator alloc;
+ PyMemAllocatorEx alloc;
size_t malloc_size;
+ size_t calloc_nelem;
+ size_t calloc_elsize;
void *realloc_ptr;
size_t realloc_new_size;
void *free_ptr;
@@ -2806,6 +3173,14 @@ static void* hook_malloc (void* ctx, size_t size)
return hook->alloc.malloc(hook->alloc.ctx, size);
}
+static void* hook_calloc (void* ctx, size_t nelem, size_t elsize)
+{
+ alloc_hook_t *hook = (alloc_hook_t *)ctx;
+ hook->calloc_nelem = nelem;
+ hook->calloc_elsize = elsize;
+ return hook->alloc.calloc(hook->alloc.ctx, nelem, elsize);
+}
+
static void* hook_realloc (void* ctx, void* ptr, size_t new_size)
{
alloc_hook_t *hook = (alloc_hook_t *)ctx;
@@ -2827,17 +3202,15 @@ test_setallocators(PyMemAllocatorDomain domain)
PyObject *res = NULL;
const char *error_msg;
alloc_hook_t hook;
- PyMemAllocator alloc;
- size_t size, size2;
+ PyMemAllocatorEx alloc;
+ size_t size, size2, nelem, elsize;
void *ptr, *ptr2;
- hook.malloc_size = 0;
- hook.realloc_ptr = NULL;
- hook.realloc_new_size = 0;
- hook.free_ptr = NULL;
+ memset(&hook, 0, sizeof(hook));
alloc.ctx = &hook;
alloc.malloc = &hook_malloc;
+ alloc.calloc = &hook_calloc;
alloc.realloc = &hook_realloc;
alloc.free = &hook_free;
PyMem_GetAllocator(domain, &hook.alloc);
@@ -2894,6 +3267,33 @@ test_setallocators(PyMemAllocatorDomain domain)
goto fail;
}
+ nelem = 2;
+ elsize = 5;
+ switch(domain)
+ {
+ case PYMEM_DOMAIN_RAW: ptr = PyMem_RawCalloc(nelem, elsize); break;
+ case PYMEM_DOMAIN_MEM: ptr = PyMem_Calloc(nelem, elsize); break;
+ case PYMEM_DOMAIN_OBJ: ptr = PyObject_Calloc(nelem, elsize); break;
+ default: ptr = NULL; break;
+ }
+
+ if (ptr == NULL) {
+ error_msg = "calloc failed";
+ goto fail;
+ }
+
+ if (hook.calloc_nelem != nelem || hook.calloc_elsize != elsize) {
+ error_msg = "calloc invalid nelem or elsize";
+ goto fail;
+ }
+
+ switch(domain)
+ {
+ case PYMEM_DOMAIN_RAW: PyMem_RawFree(ptr); break;
+ case PYMEM_DOMAIN_MEM: PyMem_Free(ptr); break;
+ case PYMEM_DOMAIN_OBJ: PyObject_Free(ptr); break;
+ }
+
Py_INCREF(Py_None);
res = Py_None;
goto finally;
@@ -2953,6 +3353,12 @@ PyDoc_STRVAR(docstring_with_signature,
"This docstring has a valid signature."
);
+PyDoc_STRVAR(docstring_with_signature_but_no_doc,
+"docstring_with_signature_but_no_doc($module, /, sig)\n"
+"--\n"
+"\n"
+);
+
PyDoc_STRVAR(docstring_with_signature_and_extra_newlines,
"docstring_with_signature_and_extra_newlines($module, /, parameter)\n"
"--\n"
@@ -3063,6 +3469,24 @@ exit:
}
#endif /* WITH_THREAD */
+static PyObject*
+test_raise_signal(PyObject* self, PyObject *args)
+{
+ int signum, err;
+
+ if (PyArg_ParseTuple(args, "i:raise_signal", &signum) < 0)
+ return NULL;
+
+ err = raise(signum);
+ if (err)
+ return PyErr_SetFromErrno(PyExc_OSError);
+
+ if (PyErr_CheckSignals() < 0)
+ return NULL;
+
+ Py_RETURN_NONE;
+}
+
/* marshal */
static PyObject*
@@ -3216,6 +3640,151 @@ pymarshal_read_object_from_file(PyObject* self, PyObject *args)
return Py_BuildValue("Nl", obj, pos);
}
+static PyObject*
+return_null_without_error(PyObject *self, PyObject *args)
+{
+ /* invalid call: return NULL without setting an error,
+ * _Py_CheckFunctionResult() must detect such bug at runtime. */
+ PyErr_Clear();
+ return NULL;
+}
+
+static PyObject*
+return_result_with_error(PyObject *self, PyObject *args)
+{
+ /* invalid call: return a result with an error set,
+ * _Py_CheckFunctionResult() must detect such bug at runtime. */
+ PyErr_SetNone(PyExc_ValueError);
+ Py_RETURN_NONE;
+}
+
+static PyObject *
+test_pytime_fromseconds(PyObject *self, PyObject *args)
+{
+ int seconds;
+ _PyTime_t ts;
+
+ if (!PyArg_ParseTuple(args, "i", &seconds))
+ return NULL;
+ ts = _PyTime_FromSeconds(seconds);
+ return _PyTime_AsNanosecondsObject(ts);
+}
+
+static PyObject *
+test_pytime_fromsecondsobject(PyObject *self, PyObject *args)
+{
+ PyObject *obj;
+ int round;
+ _PyTime_t ts;
+
+ if (!PyArg_ParseTuple(args, "Oi", &obj, &round))
+ return NULL;
+ if (check_time_rounding(round) < 0)
+ return NULL;
+ if (_PyTime_FromSecondsObject(&ts, obj, round) == -1)
+ return NULL;
+ return _PyTime_AsNanosecondsObject(ts);
+}
+
+static PyObject *
+test_pytime_assecondsdouble(PyObject *self, PyObject *args)
+{
+ PY_LONG_LONG ns;
+ _PyTime_t ts;
+ double d;
+
+ if (!PyArg_ParseTuple(args, "L", &ns))
+ return NULL;
+ ts = _PyTime_FromNanoseconds(ns);
+ d = _PyTime_AsSecondsDouble(ts);
+ return PyFloat_FromDouble(d);
+}
+
+static PyObject *
+test_PyTime_AsTimeval(PyObject *self, PyObject *args)
+{
+ PY_LONG_LONG ns;
+ int round;
+ _PyTime_t t;
+ struct timeval tv;
+ PyObject *seconds;
+
+ if (!PyArg_ParseTuple(args, "Li", &ns, &round))
+ return NULL;
+ if (check_time_rounding(round) < 0)
+ return NULL;
+ t = _PyTime_FromNanoseconds(ns);
+ if (_PyTime_AsTimeval(t, &tv, round) < 0)
+ return NULL;
+
+ seconds = PyLong_FromLong((PY_LONG_LONG)tv.tv_sec);
+ if (seconds == NULL)
+ return NULL;
+ return Py_BuildValue("Nl", seconds, tv.tv_usec);
+}
+
+#ifdef HAVE_CLOCK_GETTIME
+static PyObject *
+test_PyTime_AsTimespec(PyObject *self, PyObject *args)
+{
+ PY_LONG_LONG ns;
+ _PyTime_t t;
+ struct timespec ts;
+
+ if (!PyArg_ParseTuple(args, "L", &ns))
+ return NULL;
+ t = _PyTime_FromNanoseconds(ns);
+ if (_PyTime_AsTimespec(t, &ts) == -1)
+ return NULL;
+ return Py_BuildValue("Nl", _PyLong_FromTime_t(ts.tv_sec), ts.tv_nsec);
+}
+#endif
+
+static PyObject *
+test_PyTime_AsMilliseconds(PyObject *self, PyObject *args)
+{
+ PY_LONG_LONG ns;
+ int round;
+ _PyTime_t t, ms;
+
+ if (!PyArg_ParseTuple(args, "Li", &ns, &round))
+ return NULL;
+ if (check_time_rounding(round) < 0)
+ return NULL;
+ t = _PyTime_FromNanoseconds(ns);
+ ms = _PyTime_AsMilliseconds(t, round);
+ /* This conversion rely on the fact that _PyTime_t is a number of
+ nanoseconds */
+ return _PyTime_AsNanosecondsObject(ms);
+}
+
+static PyObject *
+test_PyTime_AsMicroseconds(PyObject *self, PyObject *args)
+{
+ PY_LONG_LONG ns;
+ int round;
+ _PyTime_t t, ms;
+
+ if (!PyArg_ParseTuple(args, "Li", &ns, &round))
+ return NULL;
+ if (check_time_rounding(round) < 0)
+ return NULL;
+ t = _PyTime_FromNanoseconds(ns);
+ ms = _PyTime_AsMicroseconds(t, round);
+ /* This conversion rely on the fact that _PyTime_t is a number of
+ nanoseconds */
+ return _PyTime_AsNanosecondsObject(ms);
+}
+
+static PyObject*
+get_recursion_depth(PyObject *self, PyObject *args)
+{
+ PyThreadState *tstate = PyThreadState_GET();
+
+ /* substract one to ignore the frame of the get_recursion_depth() call */
+ return PyLong_FromLong(tstate->recursion_depth - 1);
+}
+
static PyMethodDef TestMethods[] = {
{"raise_exception", raise_exception, METH_VARARGS},
@@ -3249,6 +3818,13 @@ static PyMethodDef TestMethods[] = {
{"test_unicode_compare_with_ascii", (PyCFunction)test_unicode_compare_with_ascii, METH_NOARGS},
{"test_capsule", (PyCFunction)test_capsule, METH_NOARGS},
{"test_from_contiguous", (PyCFunction)test_from_contiguous, METH_NOARGS},
+#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__GNUC__)
+ {"test_pep3118_obsolete_write_locks", (PyCFunction)test_pep3118_obsolete_write_locks, METH_NOARGS},
+#endif
+ {"getbuffer_with_null_view", getbuffer_with_null_view, METH_O},
+ {"test_buildvalue_N", test_buildvalue_N, METH_NOARGS},
+ {"get_args", get_args, METH_VARARGS},
+ {"get_kwargs", (PyCFunction)get_kwargs, METH_VARARGS|METH_KEYWORDS},
{"getargs_tuple", getargs_tuple, METH_VARARGS},
{"getargs_keywords", (PyCFunction)getargs_keywords,
METH_VARARGS|METH_KEYWORDS},
@@ -3272,7 +3848,14 @@ static PyMethodDef TestMethods[] = {
(PyCFunction)test_long_long_and_overflow, METH_NOARGS},
{"test_L_code", (PyCFunction)test_L_code, METH_NOARGS},
#endif
+ {"getargs_f", getargs_f, METH_VARARGS},
+ {"getargs_d", getargs_d, METH_VARARGS},
+ {"getargs_D", getargs_D, METH_VARARGS},
+ {"getargs_S", getargs_S, METH_VARARGS},
+ {"getargs_Y", getargs_Y, METH_VARARGS},
+ {"getargs_U", getargs_U, METH_VARARGS},
{"getargs_c", getargs_c, METH_VARARGS},
+ {"getargs_C", getargs_C, METH_VARARGS},
{"getargs_s", getargs_s, METH_VARARGS},
{"getargs_s_star", getargs_s_star, METH_VARARGS},
{"getargs_s_hash", getargs_s_hash, METH_VARARGS},
@@ -3287,6 +3870,10 @@ static PyMethodDef TestMethods[] = {
{"getargs_Z", getargs_Z, METH_VARARGS},
{"getargs_Z_hash", getargs_Z_hash, METH_VARARGS},
{"getargs_w_star", getargs_w_star, METH_VARARGS},
+ {"getargs_es", getargs_es, METH_VARARGS},
+ {"getargs_et", getargs_et, METH_VARARGS},
+ {"getargs_es_hash", getargs_es_hash, METH_VARARGS},
+ {"getargs_et_hash", getargs_et_hash, METH_VARARGS},
{"codec_incrementalencoder",
(PyCFunction)codec_incrementalencoder, METH_VARARGS},
{"codec_incrementaldecoder",
@@ -3322,6 +3909,7 @@ static PyMethodDef TestMethods[] = {
{"pytime_object_to_timeval", test_pytime_object_to_timeval, METH_VARARGS},
{"pytime_object_to_timespec", test_pytime_object_to_timespec, METH_VARARGS},
{"with_tp_del", with_tp_del, METH_VARARGS},
+ {"create_cfunction", create_cfunction, METH_NOARGS},
{"test_pymem_alloc0",
(PyCFunction)test_pymem_alloc0, METH_NOARGS},
{"test_pymem_setrawallocators",
@@ -3347,12 +3935,17 @@ static PyMethodDef TestMethods[] = {
{"docstring_with_signature",
(PyCFunction)test_with_docstring, METH_NOARGS,
docstring_with_signature},
+ {"docstring_with_signature_but_no_doc",
+ (PyCFunction)test_with_docstring, METH_NOARGS,
+ docstring_with_signature_but_no_doc},
{"docstring_with_signature_and_extra_newlines",
(PyCFunction)test_with_docstring, METH_NOARGS,
docstring_with_signature_and_extra_newlines},
{"docstring_with_signature_with_defaults",
(PyCFunction)test_with_docstring, METH_NOARGS,
docstring_with_signature_with_defaults},
+ {"raise_signal",
+ (PyCFunction)test_raise_signal, METH_VARARGS},
#ifdef WITH_THREAD
{"call_in_temporary_c_thread", call_in_temporary_c_thread, METH_O,
PyDoc_STR("set_error_class(error_class) -> None")},
@@ -3369,6 +3962,20 @@ static PyMethodDef TestMethods[] = {
pymarshal_read_last_object_from_file, METH_VARARGS},
{"pymarshal_read_object_from_file",
pymarshal_read_object_from_file, METH_VARARGS},
+ {"return_null_without_error",
+ return_null_without_error, METH_NOARGS},
+ {"return_result_with_error",
+ return_result_with_error, METH_NOARGS},
+ {"PyTime_FromSeconds", test_pytime_fromseconds, METH_VARARGS},
+ {"PyTime_FromSecondsObject", test_pytime_fromsecondsobject, METH_VARARGS},
+ {"PyTime_AsSecondsDouble", test_pytime_assecondsdouble, METH_VARARGS},
+ {"PyTime_AsTimeval", test_PyTime_AsTimeval, METH_VARARGS},
+#ifdef HAVE_CLOCK_GETTIME
+ {"PyTime_AsTimespec", test_PyTime_AsTimespec, METH_VARARGS},
+#endif
+ {"PyTime_AsMilliseconds", test_PyTime_AsMilliseconds, METH_VARARGS},
+ {"PyTime_AsMicroseconds", test_PyTime_AsMicroseconds, METH_VARARGS},
+ {"get_recursion_depth", get_recursion_depth, METH_NOARGS},
{NULL, NULL} /* sentinel */
};
@@ -3528,6 +4135,201 @@ static PyTypeObject test_structmembersType = {
};
+typedef struct {
+ PyObject_HEAD
+} matmulObject;
+
+static PyObject *
+matmulType_matmul(PyObject *self, PyObject *other)
+{
+ return Py_BuildValue("(sOO)", "matmul", self, other);
+}
+
+static PyObject *
+matmulType_imatmul(PyObject *self, PyObject *other)
+{
+ return Py_BuildValue("(sOO)", "imatmul", self, other);
+}
+
+static void
+matmulType_dealloc(PyObject *self)
+{
+ Py_TYPE(self)->tp_free(self);
+}
+
+static PyNumberMethods matmulType_as_number = {
+ 0, /* nb_add */
+ 0, /* nb_subtract */
+ 0, /* nb_multiply */
+ 0, /* nb_remainde r*/
+ 0, /* nb_divmod */
+ 0, /* nb_power */
+ 0, /* nb_negative */
+ 0, /* tp_positive */
+ 0, /* tp_absolute */
+ 0, /* tp_bool */
+ 0, /* nb_invert */
+ 0, /* nb_lshift */
+ 0, /* nb_rshift */
+ 0, /* nb_and */
+ 0, /* nb_xor */
+ 0, /* nb_or */
+ 0, /* nb_int */
+ 0, /* nb_reserved */
+ 0, /* nb_float */
+ 0, /* nb_inplace_add */
+ 0, /* nb_inplace_subtract */
+ 0, /* nb_inplace_multiply */
+ 0, /* nb_inplace_remainder */
+ 0, /* nb_inplace_power */
+ 0, /* nb_inplace_lshift */
+ 0, /* nb_inplace_rshift */
+ 0, /* nb_inplace_and */
+ 0, /* nb_inplace_xor */
+ 0, /* nb_inplace_or */
+ 0, /* nb_floor_divide */
+ 0, /* nb_true_divide */
+ 0, /* nb_inplace_floor_divide */
+ 0, /* nb_inplace_true_divide */
+ 0, /* nb_index */
+ matmulType_matmul, /* nb_matrix_multiply */
+ matmulType_imatmul /* nb_matrix_inplace_multiply */
+};
+
+static PyTypeObject matmulType = {
+ PyVarObject_HEAD_INIT(NULL, 0)
+ "matmulType",
+ sizeof(matmulObject), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ matmulType_dealloc, /* destructor tp_dealloc */
+ 0, /* tp_print */
+ 0, /* tp_getattr */
+ 0, /* tp_setattr */
+ 0, /* tp_reserved */
+ 0, /* tp_repr */
+ &matmulType_as_number, /* tp_as_number */
+ 0, /* tp_as_sequence */
+ 0, /* tp_as_mapping */
+ 0, /* tp_hash */
+ 0, /* tp_call */
+ 0, /* tp_str */
+ PyObject_GenericGetAttr, /* tp_getattro */
+ PyObject_GenericSetAttr, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ 0, /* tp_flags */
+ "C level type with matrix operations defined",
+ 0, /* traverseproc tp_traverse */
+ 0, /* tp_clear */
+ 0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ 0, /* tp_iter */
+ 0, /* tp_iternext */
+ 0, /* tp_methods */
+ 0, /* tp_members */
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ PyType_GenericNew, /* tp_new */
+ PyObject_Del, /* tp_free */
+};
+
+
+typedef struct {
+ PyObject_HEAD
+ PyObject *ao_iterator;
+} awaitObject;
+
+
+static PyObject *
+awaitObject_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+{
+ PyObject *v;
+ awaitObject *ao;
+
+ if (!PyArg_UnpackTuple(args, "awaitObject", 1, 1, &v))
+ return NULL;
+
+ ao = (awaitObject *)type->tp_alloc(type, 0);
+ if (ao == NULL) {
+ return NULL;
+ }
+
+ Py_INCREF(v);
+ ao->ao_iterator = v;
+
+ return (PyObject *)ao;
+}
+
+
+static void
+awaitObject_dealloc(awaitObject *ao)
+{
+ Py_CLEAR(ao->ao_iterator);
+ Py_TYPE(ao)->tp_free(ao);
+}
+
+
+static PyObject *
+awaitObject_await(awaitObject *ao)
+{
+ Py_INCREF(ao->ao_iterator);
+ return ao->ao_iterator;
+}
+
+static PyAsyncMethods awaitType_as_async = {
+ (unaryfunc)awaitObject_await, /* am_await */
+ 0, /* am_aiter */
+ 0 /* am_anext */
+};
+
+
+static PyTypeObject awaitType = {
+ PyVarObject_HEAD_INIT(NULL, 0)
+ "awaitType",
+ sizeof(awaitObject), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)awaitObject_dealloc, /* destructor tp_dealloc */
+ 0, /* tp_print */
+ 0, /* tp_getattr */
+ 0, /* tp_setattr */
+ &awaitType_as_async, /* tp_as_async */
+ 0, /* tp_repr */
+ 0, /* tp_as_number */
+ 0, /* tp_as_sequence */
+ 0, /* tp_as_mapping */
+ 0, /* tp_hash */
+ 0, /* tp_call */
+ 0, /* tp_str */
+ PyObject_GenericGetAttr, /* tp_getattro */
+ PyObject_GenericSetAttr, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ 0, /* tp_flags */
+ "C level type with tp_as_async",
+ 0, /* traverseproc tp_traverse */
+ 0, /* tp_clear */
+ 0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ 0, /* tp_iter */
+ 0, /* tp_iternext */
+ 0, /* tp_methods */
+ 0, /* tp_members */
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ awaitObject_new, /* tp_new */
+ PyObject_Del, /* tp_free */
+};
+
static struct PyModuleDef _testcapimodule = {
PyModuleDef_HEAD_INIT,
@@ -3541,6 +4343,9 @@ static struct PyModuleDef _testcapimodule = {
NULL
};
+/* Per PEP 489, this module will not be converted to multi-phase initialization
+ */
+
PyMODINIT_FUNC
PyInit__testcapi(void)
{
@@ -3557,6 +4362,15 @@ PyInit__testcapi(void)
/* don't use a name starting with "test", since we don't want
test_capi to automatically call this */
PyModule_AddObject(m, "_test_structmembersType", (PyObject *)&test_structmembersType);
+ if (PyType_Ready(&matmulType) < 0)
+ return NULL;
+ Py_INCREF(&matmulType);
+ PyModule_AddObject(m, "matmulType", (PyObject *)&matmulType);
+
+ if (PyType_Ready(&awaitType) < 0)
+ return NULL;
+ Py_INCREF(&awaitType);
+ PyModule_AddObject(m, "awaitType", (PyObject *)&awaitType);
PyModule_AddObject(m, "CHAR_MAX", PyLong_FromLong(CHAR_MAX));
PyModule_AddObject(m, "CHAR_MIN", PyLong_FromLong(CHAR_MIN));
diff --git a/Modules/_testmultiphase.c b/Modules/_testmultiphase.c
new file mode 100644
index 0000000000..2005205d33
--- /dev/null
+++ b/Modules/_testmultiphase.c
@@ -0,0 +1,594 @@
+
+/* Testing module for multi-phase initialization of extension modules (PEP 489)
+ */
+
+#include "Python.h"
+
+/* Example objects */
+typedef struct {
+ PyObject_HEAD
+ PyObject *x_attr; /* Attributes dictionary */
+} ExampleObject;
+
+/* Example methods */
+
+static int
+Example_traverse(ExampleObject *self, visitproc visit, void *arg)
+{
+ Py_VISIT(self->x_attr);
+ return 0;
+}
+
+static int
+Example_finalize(ExampleObject *self)
+{
+ Py_CLEAR(self->x_attr);
+ return 0;
+}
+
+static PyObject *
+Example_demo(ExampleObject *self, PyObject *args)
+{
+ PyObject *o = NULL;
+ if (!PyArg_ParseTuple(args, "|O:demo", &o))
+ return NULL;
+ if (o != NULL && PyUnicode_Check(o)) {
+ Py_INCREF(o);
+ return o;
+ }
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+
+static PyMethodDef Example_methods[] = {
+ {"demo", (PyCFunction)Example_demo, METH_VARARGS,
+ PyDoc_STR("demo() -> None")},
+ {NULL, NULL} /* sentinel */
+};
+
+static PyObject *
+Example_getattro(ExampleObject *self, PyObject *name)
+{
+ if (self->x_attr != NULL) {
+ PyObject *v = PyDict_GetItem(self->x_attr, name);
+ if (v != NULL) {
+ Py_INCREF(v);
+ return v;
+ }
+ }
+ return PyObject_GenericGetAttr((PyObject *)self, name);
+}
+
+static int
+Example_setattr(ExampleObject *self, char *name, PyObject *v)
+{
+ if (self->x_attr == NULL) {
+ self->x_attr = PyDict_New();
+ if (self->x_attr == NULL)
+ return -1;
+ }
+ if (v == NULL) {
+ int rv = PyDict_DelItemString(self->x_attr, name);
+ if (rv < 0)
+ PyErr_SetString(PyExc_AttributeError,
+ "delete non-existing Example attribute");
+ return rv;
+ }
+ else
+ return PyDict_SetItemString(self->x_attr, name, v);
+}
+
+static PyType_Slot Example_Type_slots[] = {
+ {Py_tp_doc, "The Example type"},
+ {Py_tp_finalize, Example_finalize},
+ {Py_tp_traverse, Example_traverse},
+ {Py_tp_getattro, Example_getattro},
+ {Py_tp_setattr, Example_setattr},
+ {Py_tp_methods, Example_methods},
+ {0, 0},
+};
+
+static PyType_Spec Example_Type_spec = {
+ "_testimportexec.Example",
+ sizeof(ExampleObject),
+ 0,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
+ Example_Type_slots
+};
+
+/* Function of two integers returning integer */
+
+PyDoc_STRVAR(testexport_foo_doc,
+"foo(i,j)\n\
+\n\
+Return the sum of i and j.");
+
+static PyObject *
+testexport_foo(PyObject *self, PyObject *args)
+{
+ long i, j;
+ long res;
+ if (!PyArg_ParseTuple(args, "ll:foo", &i, &j))
+ return NULL;
+ res = i + j;
+ return PyLong_FromLong(res);
+}
+
+/* Test that PyState registration fails */
+
+PyDoc_STRVAR(call_state_registration_func_doc,
+"register_state(0): call PyState_FindModule()\n\
+register_state(1): call PyState_AddModule()\n\
+register_state(2): call PyState_RemoveModule()");
+
+static PyObject *
+call_state_registration_func(PyObject *mod, PyObject *args)
+{
+ int i, ret;
+ PyModuleDef *def = PyModule_GetDef(mod);
+ if (def == NULL) {
+ return NULL;
+ }
+ if (!PyArg_ParseTuple(args, "i:call_state_registration_func", &i))
+ return NULL;
+ switch (i) {
+ case 0:
+ mod = PyState_FindModule(def);
+ if (mod == NULL) {
+ Py_RETURN_NONE;
+ }
+ return mod;
+ case 1:
+ ret = PyState_AddModule(mod, def);
+ if (ret != 0) {
+ return NULL;
+ }
+ break;
+ case 2:
+ ret = PyState_RemoveModule(def);
+ if (ret != 0) {
+ return NULL;
+ }
+ break;
+ }
+ Py_RETURN_NONE;
+}
+
+
+static PyType_Slot Str_Type_slots[] = {
+ {Py_tp_base, NULL}, /* filled out in module exec function */
+ {0, 0},
+};
+
+static PyType_Spec Str_Type_spec = {
+ "_testimportexec.Str",
+ 0,
+ 0,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ Str_Type_slots
+};
+
+static PyMethodDef testexport_methods[] = {
+ {"foo", testexport_foo, METH_VARARGS,
+ testexport_foo_doc},
+ {"call_state_registration_func", call_state_registration_func,
+ METH_VARARGS, call_state_registration_func_doc},
+ {NULL, NULL} /* sentinel */
+};
+
+static int execfunc(PyObject *m)
+{
+ PyObject *temp = NULL;
+
+ /* Due to cross platform compiler issues the slots must be filled
+ * here. It's required for portability to Windows without requiring
+ * C++. */
+ Str_Type_slots[0].pfunc = &PyUnicode_Type;
+
+ /* Add a custom type */
+ temp = PyType_FromSpec(&Example_Type_spec);
+ if (temp == NULL)
+ goto fail;
+ if (PyModule_AddObject(m, "Example", temp) != 0)
+ goto fail;
+
+ /* Add an exception type */
+ temp = PyErr_NewException("_testimportexec.error", NULL, NULL);
+ if (temp == NULL)
+ goto fail;
+ if (PyModule_AddObject(m, "error", temp) != 0)
+ goto fail;
+
+ /* Add Str */
+ temp = PyType_FromSpec(&Str_Type_spec);
+ if (temp == NULL)
+ goto fail;
+ if (PyModule_AddObject(m, "Str", temp) != 0)
+ goto fail;
+
+ if (PyModule_AddIntConstant(m, "int_const", 1969) != 0)
+ goto fail;
+
+ if (PyModule_AddStringConstant(m, "str_const", "something different") != 0)
+ goto fail;
+
+ return 0;
+ fail:
+ return -1;
+}
+
+/* Helper for module definitions; there'll be a lot of them */
+#define TEST_MODULE_DEF(name, slots, methods) { \
+ PyModuleDef_HEAD_INIT, /* m_base */ \
+ name, /* m_name */ \
+ PyDoc_STR("Test module " name), /* m_doc */ \
+ 0, /* m_size */ \
+ methods, /* m_methods */ \
+ slots, /* m_slots */ \
+ NULL, /* m_traverse */ \
+ NULL, /* m_clear */ \
+ NULL, /* m_free */ \
+}
+
+PyModuleDef_Slot main_slots[] = {
+ {Py_mod_exec, execfunc},
+ {0, NULL},
+};
+
+static PyModuleDef main_def = TEST_MODULE_DEF("main", main_slots, testexport_methods);
+
+PyMODINIT_FUNC
+PyInit__testmultiphase(PyObject *spec)
+{
+ return PyModuleDef_Init(&main_def);
+}
+
+
+/**** Importing a non-module object ****/
+
+static PyModuleDef def_nonmodule;
+
+/* Create a SimpleNamespace(three=3) */
+static PyObject*
+createfunc_nonmodule(PyObject *spec, PyModuleDef *def)
+{
+ PyObject *dct, *ns, *three;
+
+ if (def != &def_nonmodule) {
+ PyErr_SetString(PyExc_SystemError, "def does not match");
+ return NULL;
+ }
+
+ dct = PyDict_New();
+ if (dct == NULL)
+ return NULL;
+
+ three = PyLong_FromLong(3);
+ if (three == NULL) {
+ Py_DECREF(dct);
+ return NULL;
+ }
+ PyDict_SetItemString(dct, "three", three);
+ Py_DECREF(three);
+
+ ns = _PyNamespace_New(dct);
+ Py_DECREF(dct);
+ return ns;
+}
+
+static PyModuleDef_Slot slots_create_nonmodule[] = {
+ {Py_mod_create, createfunc_nonmodule},
+ {0, NULL},
+};
+
+static PyModuleDef def_nonmodule = TEST_MODULE_DEF(
+ "_testmultiphase_nonmodule", slots_create_nonmodule, NULL);
+
+PyMODINIT_FUNC
+PyInit__testmultiphase_nonmodule(PyObject *spec)
+{
+ return PyModuleDef_Init(&def_nonmodule);
+}
+
+/**** Non-ASCII-named modules ****/
+
+static PyModuleDef def_nonascii_latin = { \
+ PyModuleDef_HEAD_INIT, /* m_base */
+ "_testmultiphase_nonascii_latin", /* m_name */
+ PyDoc_STR("Module named in Czech"), /* m_doc */
+ 0, /* m_size */
+ NULL, /* m_methods */
+ NULL, /* m_slots */
+ NULL, /* m_traverse */
+ NULL, /* m_clear */
+ NULL, /* m_free */
+};
+
+PyMODINIT_FUNC
+PyInitU__testmultiphase_zkouka_naten_evc07gi8e(PyObject *spec)
+{
+ return PyModuleDef_Init(&def_nonascii_latin);
+}
+
+static PyModuleDef def_nonascii_kana = { \
+ PyModuleDef_HEAD_INIT, /* m_base */
+ "_testmultiphase_nonascii_kana", /* m_name */
+ PyDoc_STR("Module named in Japanese"), /* m_doc */
+ 0, /* m_size */
+ NULL, /* m_methods */
+ NULL, /* m_slots */
+ NULL, /* m_traverse */
+ NULL, /* m_clear */
+ NULL, /* m_free */
+};
+
+PyMODINIT_FUNC
+PyInitU_eckzbwbhc6jpgzcx415x(PyObject *spec)
+{
+ return PyModuleDef_Init(&def_nonascii_kana);
+}
+
+/*** Module with a single-character name ***/
+
+PyMODINIT_FUNC
+PyInit_x(PyObject *spec)
+{
+ return PyModuleDef_Init(&main_def);
+}
+
+/**** Testing NULL slots ****/
+
+static PyModuleDef null_slots_def = TEST_MODULE_DEF(
+ "_testmultiphase_null_slots", NULL, NULL);
+
+PyMODINIT_FUNC
+PyInit__testmultiphase_null_slots(PyObject *spec)
+{
+ return PyModuleDef_Init(&null_slots_def);
+}
+
+/**** Problematic modules ****/
+
+static PyModuleDef_Slot slots_bad_large[] = {
+ {_Py_mod_LAST_SLOT + 1, NULL},
+ {0, NULL},
+};
+
+static PyModuleDef def_bad_large = TEST_MODULE_DEF(
+ "_testmultiphase_bad_slot_large", slots_bad_large, NULL);
+
+PyMODINIT_FUNC
+PyInit__testmultiphase_bad_slot_large(PyObject *spec)
+{
+ return PyModuleDef_Init(&def_bad_large);
+}
+
+static PyModuleDef_Slot slots_bad_negative[] = {
+ {-1, NULL},
+ {0, NULL},
+};
+
+static PyModuleDef def_bad_negative = TEST_MODULE_DEF(
+ "_testmultiphase_bad_slot_negative", slots_bad_negative, NULL);
+
+PyMODINIT_FUNC
+PyInit__testmultiphase_bad_slot_negative(PyObject *spec)
+{
+ return PyModuleDef_Init(&def_bad_negative);
+}
+
+static PyModuleDef def_create_int_with_state = { \
+ PyModuleDef_HEAD_INIT, /* m_base */
+ "create_with_state", /* m_name */
+ PyDoc_STR("Not a PyModuleObject object, but requests per-module state"),
+ 10, /* m_size */
+ NULL, /* m_methods */
+ slots_create_nonmodule, /* m_slots */
+ NULL, /* m_traverse */
+ NULL, /* m_clear */
+ NULL, /* m_free */
+};
+
+PyMODINIT_FUNC
+PyInit__testmultiphase_create_int_with_state(PyObject *spec)
+{
+ return PyModuleDef_Init(&def_create_int_with_state);
+}
+
+
+static PyModuleDef def_negative_size = { \
+ PyModuleDef_HEAD_INIT, /* m_base */
+ "negative_size", /* m_name */
+ PyDoc_STR("PyModuleDef with negative m_size"),
+ -1, /* m_size */
+ NULL, /* m_methods */
+ slots_create_nonmodule, /* m_slots */
+ NULL, /* m_traverse */
+ NULL, /* m_clear */
+ NULL, /* m_free */
+};
+
+PyMODINIT_FUNC
+PyInit__testmultiphase_negative_size(PyObject *spec)
+{
+ return PyModuleDef_Init(&def_negative_size);
+}
+
+
+static PyModuleDef uninitialized_def = TEST_MODULE_DEF("main", main_slots, testexport_methods);
+
+PyMODINIT_FUNC
+PyInit__testmultiphase_export_uninitialized(PyObject *spec)
+{
+ return (PyObject*) &uninitialized_def;
+}
+
+PyMODINIT_FUNC
+PyInit__testmultiphase_export_null(PyObject *spec)
+{
+ return NULL;
+}
+
+PyMODINIT_FUNC
+PyInit__testmultiphase_export_raise(PyObject *spec)
+{
+ PyErr_SetString(PyExc_SystemError, "bad export function");
+ return NULL;
+}
+
+PyMODINIT_FUNC
+PyInit__testmultiphase_export_unreported_exception(PyObject *spec)
+{
+ PyErr_SetString(PyExc_SystemError, "bad export function");
+ return PyModuleDef_Init(&main_def);
+}
+
+static PyObject*
+createfunc_null(PyObject *spec, PyModuleDef *def)
+{
+ return NULL;
+}
+
+PyModuleDef_Slot slots_create_null[] = {
+ {Py_mod_create, createfunc_null},
+ {0, NULL},
+};
+
+static PyModuleDef def_create_null = TEST_MODULE_DEF(
+ "_testmultiphase_create_null", slots_create_null, NULL);
+
+PyMODINIT_FUNC
+PyInit__testmultiphase_create_null(PyObject *spec)
+{
+ return PyModuleDef_Init(&def_create_null);
+}
+
+static PyObject*
+createfunc_raise(PyObject *spec, PyModuleDef *def)
+{
+ PyErr_SetString(PyExc_SystemError, "bad create function");
+ return NULL;
+}
+
+static PyModuleDef_Slot slots_create_raise[] = {
+ {Py_mod_create, createfunc_raise},
+ {0, NULL},
+};
+
+static PyModuleDef def_create_raise = TEST_MODULE_DEF(
+ "_testmultiphase_create_null", slots_create_raise, NULL);
+
+PyMODINIT_FUNC
+PyInit__testmultiphase_create_raise(PyObject *spec)
+{
+ return PyModuleDef_Init(&def_create_raise);
+}
+
+static PyObject*
+createfunc_unreported_exception(PyObject *spec, PyModuleDef *def)
+{
+ PyErr_SetString(PyExc_SystemError, "bad create function");
+ return PyModule_New("foo");
+}
+
+static PyModuleDef_Slot slots_create_unreported_exception[] = {
+ {Py_mod_create, createfunc_unreported_exception},
+ {0, NULL},
+};
+
+static PyModuleDef def_create_unreported_exception = TEST_MODULE_DEF(
+ "_testmultiphase_create_unreported_exception", slots_create_unreported_exception, NULL);
+
+PyMODINIT_FUNC
+PyInit__testmultiphase_create_unreported_exception(PyObject *spec)
+{
+ return PyModuleDef_Init(&def_create_unreported_exception);
+}
+
+static PyModuleDef_Slot slots_nonmodule_with_exec_slots[] = {
+ {Py_mod_create, createfunc_nonmodule},
+ {Py_mod_exec, execfunc},
+ {0, NULL},
+};
+
+static PyModuleDef def_nonmodule_with_exec_slots = TEST_MODULE_DEF(
+ "_testmultiphase_nonmodule_with_exec_slots", slots_nonmodule_with_exec_slots, NULL);
+
+PyMODINIT_FUNC
+PyInit__testmultiphase_nonmodule_with_exec_slots(PyObject *spec)
+{
+ return PyModuleDef_Init(&def_nonmodule_with_exec_slots);
+}
+
+static int
+execfunc_err(PyObject *mod)
+{
+ return -1;
+}
+
+static PyModuleDef_Slot slots_exec_err[] = {
+ {Py_mod_exec, execfunc_err},
+ {0, NULL},
+};
+
+static PyModuleDef def_exec_err = TEST_MODULE_DEF(
+ "_testmultiphase_exec_err", slots_exec_err, NULL);
+
+PyMODINIT_FUNC
+PyInit__testmultiphase_exec_err(PyObject *spec)
+{
+ return PyModuleDef_Init(&def_exec_err);
+}
+
+static int
+execfunc_raise(PyObject *spec)
+{
+ PyErr_SetString(PyExc_SystemError, "bad exec function");
+ return -1;
+}
+
+static PyModuleDef_Slot slots_exec_raise[] = {
+ {Py_mod_exec, execfunc_raise},
+ {0, NULL},
+};
+
+static PyModuleDef def_exec_raise = TEST_MODULE_DEF(
+ "_testmultiphase_exec_raise", slots_exec_raise, NULL);
+
+PyMODINIT_FUNC
+PyInit__testmultiphase_exec_raise(PyObject *mod)
+{
+ return PyModuleDef_Init(&def_exec_raise);
+}
+
+static int
+execfunc_unreported_exception(PyObject *mod)
+{
+ PyErr_SetString(PyExc_SystemError, "bad exec function");
+ return 0;
+}
+
+static PyModuleDef_Slot slots_exec_unreported_exception[] = {
+ {Py_mod_exec, execfunc_unreported_exception},
+ {0, NULL},
+};
+
+static PyModuleDef def_exec_unreported_exception = TEST_MODULE_DEF(
+ "_testmultiphase_exec_unreported_exception", slots_exec_unreported_exception, NULL);
+
+PyMODINIT_FUNC
+PyInit__testmultiphase_exec_unreported_exception(PyObject *spec)
+{
+ return PyModuleDef_Init(&def_exec_unreported_exception);
+}
+
+/*** Helper for imp test ***/
+
+static PyModuleDef imp_dummy_def = TEST_MODULE_DEF("imp_dummy", main_slots, testexport_methods);
+
+PyMODINIT_FUNC
+PyInit_imp_dummy(PyObject *spec)
+{
+ return PyModuleDef_Init(&imp_dummy_def);
+}
diff --git a/Modules/_threadmodule.c b/Modules/_threadmodule.c
index f80f76a638..968181cd8a 100644
--- a/Modules/_threadmodule.c
+++ b/Modules/_threadmodule.c
@@ -49,21 +49,18 @@ lock_dealloc(lockobject *self)
* timeout.
*/
static PyLockStatus
-acquire_timed(PyThread_type_lock lock, PY_TIMEOUT_T microseconds)
+acquire_timed(PyThread_type_lock lock, _PyTime_t timeout)
{
PyLockStatus r;
- _PyTime_timeval curtime;
- _PyTime_timeval endtime;
-
-
- if (microseconds > 0) {
- _PyTime_gettimeofday(&endtime);
- endtime.tv_sec += microseconds / (1000 * 1000);
- endtime.tv_usec += microseconds % (1000 * 1000);
- }
+ _PyTime_t endtime = 0;
+ _PyTime_t microseconds;
+ if (timeout > 0)
+ endtime = _PyTime_GetMonotonicClock() + timeout;
do {
+ microseconds = _PyTime_AsMicroseconds(timeout, _PyTime_ROUND_CEILING);
+
/* first a simple non-blocking try without releasing the GIL */
r = PyThread_acquire_lock_timed(lock, 0, 0);
if (r == PY_LOCK_FAILURE && microseconds != 0) {
@@ -82,14 +79,12 @@ acquire_timed(PyThread_type_lock lock, PY_TIMEOUT_T microseconds)
/* If we're using a timeout, recompute the timeout after processing
* signals, since those can take time. */
- if (microseconds > 0) {
- _PyTime_gettimeofday(&curtime);
- microseconds = ((endtime.tv_sec - curtime.tv_sec) * 1000000 +
- (endtime.tv_usec - curtime.tv_usec));
+ if (timeout > 0) {
+ timeout = endtime - _PyTime_GetMonotonicClock();
/* Check for negative values, since those mean block forever.
*/
- if (microseconds <= 0) {
+ if (timeout < 0) {
r = PY_LOCK_FAILURE;
}
}
@@ -99,44 +94,61 @@ acquire_timed(PyThread_type_lock lock, PY_TIMEOUT_T microseconds)
return r;
}
-static PyObject *
-lock_PyThread_acquire_lock(lockobject *self, PyObject *args, PyObject *kwds)
+static int
+lock_acquire_parse_args(PyObject *args, PyObject *kwds,
+ _PyTime_t *timeout)
{
char *kwlist[] = {"blocking", "timeout", NULL};
int blocking = 1;
- double timeout = -1;
- PY_TIMEOUT_T microseconds;
- PyLockStatus r;
+ PyObject *timeout_obj = NULL;
+ const _PyTime_t unset_timeout = _PyTime_FromSeconds(-1);
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|id:acquire", kwlist,
- &blocking, &timeout))
- return NULL;
+ *timeout = unset_timeout ;
- if (!blocking && timeout != -1) {
- PyErr_SetString(PyExc_ValueError, "can't specify a timeout "
- "for a non-blocking call");
- return NULL;
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|iO:acquire", kwlist,
+ &blocking, &timeout_obj))
+ return -1;
+
+ if (timeout_obj
+ && _PyTime_FromSecondsObject(timeout,
+ timeout_obj, _PyTime_ROUND_CEILING) < 0)
+ return -1;
+
+ if (!blocking && *timeout != unset_timeout ) {
+ PyErr_SetString(PyExc_ValueError,
+ "can't specify a timeout for a non-blocking call");
+ return -1;
}
- if (timeout < 0 && timeout != -1) {
- PyErr_SetString(PyExc_ValueError, "timeout value must be "
- "strictly positive");
- return NULL;
+ if (*timeout < 0 && *timeout != unset_timeout) {
+ PyErr_SetString(PyExc_ValueError,
+ "timeout value must be positive");
+ return -1;
}
if (!blocking)
- microseconds = 0;
- else if (timeout == -1)
- microseconds = -1;
- else {
- timeout *= 1e6;
- if (timeout >= (double) PY_TIMEOUT_MAX) {
+ *timeout = 0;
+ else if (*timeout != unset_timeout) {
+ _PyTime_t microseconds;
+
+ microseconds = _PyTime_AsMicroseconds(*timeout, _PyTime_ROUND_CEILING);
+ if (microseconds >= PY_TIMEOUT_MAX) {
PyErr_SetString(PyExc_OverflowError,
"timeout value is too large");
- return NULL;
+ return -1;
}
- microseconds = (PY_TIMEOUT_T) timeout;
}
+ return 0;
+}
+
+static PyObject *
+lock_PyThread_acquire_lock(lockobject *self, PyObject *args, PyObject *kwds)
+{
+ _PyTime_t timeout;
+ PyLockStatus r;
- r = acquire_timed(self->lock_lock, microseconds);
+ if (lock_acquire_parse_args(args, kwds, &timeout) < 0)
+ return NULL;
+
+ r = acquire_timed(self->lock_lock, timeout);
if (r == PY_LOCK_INTR) {
return NULL;
}
@@ -147,7 +159,7 @@ lock_PyThread_acquire_lock(lockobject *self, PyObject *args, PyObject *kwds)
}
PyDoc_STRVAR(acquire_doc,
-"acquire([wait]) -> bool\n\
+"acquire(blocking=True, timeout=-1) -> bool\n\
(acquire_lock() is an obsolete synonym)\n\
\n\
Lock the lock. Without argument, this blocks if the lock is already\n\
@@ -192,6 +204,13 @@ PyDoc_STRVAR(locked_doc,
\n\
Return whether the lock is in the locked state.");
+static PyObject *
+lock_repr(lockobject *self)
+{
+ return PyUnicode_FromFormat("<%s %s object at %p>",
+ self->locked ? "locked" : "unlocked", Py_TYPE(self)->tp_name, self);
+}
+
static PyMethodDef lock_methods[] = {
{"acquire_lock", (PyCFunction)lock_PyThread_acquire_lock,
METH_VARARGS | METH_KEYWORDS, acquire_doc},
@@ -223,7 +242,7 @@ static PyTypeObject Locktype = {
0, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_reserved*/
- 0, /*tp_repr*/
+ (reprfunc)lock_repr, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
@@ -274,41 +293,13 @@ rlock_dealloc(rlockobject *self)
static PyObject *
rlock_acquire(rlockobject *self, PyObject *args, PyObject *kwds)
{
- char *kwlist[] = {"blocking", "timeout", NULL};
- int blocking = 1;
- double timeout = -1;
- PY_TIMEOUT_T microseconds;
+ _PyTime_t timeout;
long tid;
PyLockStatus r = PY_LOCK_ACQUIRED;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|id:acquire", kwlist,
- &blocking, &timeout))
+ if (lock_acquire_parse_args(args, kwds, &timeout) < 0)
return NULL;
- if (!blocking && timeout != -1) {
- PyErr_SetString(PyExc_ValueError, "can't specify a timeout "
- "for a non-blocking call");
- return NULL;
- }
- if (timeout < 0 && timeout != -1) {
- PyErr_SetString(PyExc_ValueError, "timeout value must be "
- "strictly positive");
- return NULL;
- }
- if (!blocking)
- microseconds = 0;
- else if (timeout == -1)
- microseconds = -1;
- else {
- timeout *= 1e6;
- if (timeout >= (double) PY_TIMEOUT_MAX) {
- PyErr_SetString(PyExc_OverflowError,
- "timeout value is too large");
- return NULL;
- }
- microseconds = (PY_TIMEOUT_T) timeout;
- }
-
tid = PyThread_get_thread_ident();
if (self->rlock_count > 0 && tid == self->rlock_owner) {
unsigned long count = self->rlock_count + 1;
@@ -320,7 +311,7 @@ rlock_acquire(rlockobject *self, PyObject *args, PyObject *kwds)
self->rlock_count = count;
Py_RETURN_TRUE;
}
- r = acquire_timed(self->rlock_lock, microseconds);
+ r = acquire_timed(self->rlock_lock, timeout);
if (r == PY_LOCK_ACQUIRED) {
assert(self->rlock_count == 0);
self->rlock_owner = tid;
@@ -475,8 +466,10 @@ rlock_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
static PyObject *
rlock_repr(rlockobject *self)
{
- return PyUnicode_FromFormat("<%s owner=%ld count=%lu>",
- Py_TYPE(self)->tp_name, self->rlock_owner, self->rlock_count);
+ return PyUnicode_FromFormat("<%s %s object owner=%ld count=%lu at %p>",
+ self->rlock_count ? "locked" : "unlocked",
+ Py_TYPE(self)->tp_name, self->rlock_owner,
+ self->rlock_count, self);
}
@@ -1141,7 +1134,8 @@ PyDoc_STRVAR(allocate_doc,
"allocate_lock() -> lock object\n\
(allocate() is an obsolete synonym)\n\
\n\
-Create a new lock object. See help(LockType) for information about locks.");
+Create a new lock object. See help(type(threading.Lock())) for\n\
+information about locks.");
static PyObject *
thread_get_ident(PyObject *self)
@@ -1333,7 +1327,7 @@ The 'threading' module provides a more convenient interface.");
PyDoc_STRVAR(lock_doc,
"A lock object is a synchronization primitive. To create a lock,\n\
-call the PyThread_allocate_lock() function. Methods are:\n\
+call threading.Lock(). Methods are:\n\
\n\
acquire() -- lock the lock, possibly blocking until it can be obtained\n\
release() -- unlock of the lock\n\
@@ -1359,7 +1353,9 @@ static struct PyModuleDef threadmodule = {
PyMODINIT_FUNC
PyInit__thread(void)
{
- PyObject *m, *d, *timeout_max;
+ PyObject *m, *d, *v;
+ double time_max;
+ double timeout_max;
/* Initialize types: */
if (PyType_Ready(&localdummytype) < 0)
@@ -1376,10 +1372,14 @@ PyInit__thread(void)
if (m == NULL)
return NULL;
- timeout_max = PyFloat_FromDouble(PY_TIMEOUT_MAX / 1000000);
- if (!timeout_max)
+ timeout_max = PY_TIMEOUT_MAX / 1000000;
+ time_max = floor(_PyTime_AsSecondsDouble(_PyTime_MAX));
+ timeout_max = Py_MIN(timeout_max, time_max);
+
+ v = PyFloat_FromDouble(timeout_max);
+ if (!v)
return NULL;
- if (PyModule_AddObject(m, "TIMEOUT_MAX", timeout_max) < 0)
+ if (PyModule_AddObject(m, "TIMEOUT_MAX", v) < 0)
return NULL;
/* Add a symbolic constant */
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index 52025bb16f..cf56fa836a 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -9,8 +9,8 @@ Copyright (C) 1994 Steen Lumholt.
/* TCL/TK VERSION INFO:
- Only Tcl/Tk 8.3.1 and later are supported. Older versions are not
- supported. Use Python 2.6 or older if you cannot upgrade your
+ Only Tcl/Tk 8.4 and later are supported. Older versions are not
+ supported. Use Python 3.4 or older if you cannot upgrade your
Tcl/Tk libraries.
*/
@@ -21,6 +21,7 @@ Copyright (C) 1994 Steen Lumholt.
*/
+#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include <ctype.h>
@@ -36,13 +37,6 @@ Copyright (C) 1994 Steen Lumholt.
#define CHECK_SIZE(size, elemsize) \
((size_t)(size) <= Py_MIN((size_t)INT_MAX, UINT_MAX / (size_t)(elemsize)))
-/* Starting with Tcl 8.4, many APIs offer const-correctness. Unfortunately,
- making _tkinter correct for this API means to break earlier
- versions. USE_COMPAT_CONST allows to make _tkinter work with both 8.4 and
- earlier versions. Once Tcl releases before 8.4 don't need to be supported
- anymore, this should go. */
-#define USE_COMPAT_CONST
-
/* If Tcl is compiled for threads, we must also define TCL_THREAD. We define
it always; if Tcl is not threaded, the thread functions in
Tcl are empty. */
@@ -58,15 +52,8 @@ Copyright (C) 1994 Steen Lumholt.
#include "tkinter.h"
-/* For Tcl 8.2 and 8.3, CONST* is not defined (except on Cygwin). */
-#ifndef CONST84_RETURN
-#define CONST84_RETURN
-#undef CONST
-#define CONST
-#endif
-
-#if TK_HEX_VERSION < 0x08030201
-#error "Tk older than 8.3.1 not supported"
+#if TK_HEX_VERSION < 0x08040200
+#error "Tk older than 8.4 not supported"
#endif
#if TK_HEX_VERSION >= 0x08050208 && TK_HEX_VERSION < 0x08060000 || \
@@ -114,7 +101,65 @@ Copyright (C) 1994 Steen Lumholt.
#ifdef MS_WINDOWS
#include <conio.h>
#define WAIT_FOR_STDIN
+
+static PyObject *
+_get_tcl_lib_path()
+{
+ static PyObject *tcl_library_path = NULL;
+ static int already_checked = 0;
+
+ if (already_checked == 0) {
+ PyObject *prefix;
+ struct stat stat_buf;
+ int stat_return_value;
+
+ prefix = PyUnicode_FromWideChar(Py_GetPrefix(), -1);
+ if (prefix == NULL) {
+ return NULL;
+ }
+
+ /* Check expected location for an installed Python first */
+ tcl_library_path = PyUnicode_FromString("\\tcl\\tcl" TCL_VERSION);
+ if (tcl_library_path == NULL) {
+ return NULL;
+ }
+ tcl_library_path = PyUnicode_Concat(prefix, tcl_library_path);
+ if (tcl_library_path == NULL) {
+ return NULL;
+ }
+ stat_return_value = _Py_stat(tcl_library_path, &stat_buf);
+ if (stat_return_value == -2) {
+ return NULL;
+ }
+ if (stat_return_value == -1) {
+ /* install location doesn't exist, reset errno and see if
+ we're a repository build */
+ errno = 0;
+#ifdef Py_TCLTK_DIR
+ tcl_library_path = PyUnicode_FromString(
+ Py_TCLTK_DIR "\\lib\\tcl" TCL_VERSION);
+ if (tcl_library_path == NULL) {
+ return NULL;
+ }
+ stat_return_value = _Py_stat(tcl_library_path, &stat_buf);
+ if (stat_return_value == -2) {
+ return NULL;
+ }
+ if (stat_return_value == -1) {
+ /* tcltkDir for a repository build doesn't exist either,
+ reset errno and leave Tcl to its own devices */
+ errno = 0;
+ tcl_library_path = NULL;
+ }
+#else
+ tcl_library_path = NULL;
#endif
+ }
+ already_checked = 1;
+ }
+ return tcl_library_path;
+}
+#endif /* MS_WINDOWS */
#ifdef WITH_THREAD
@@ -385,10 +430,10 @@ unicodeFromTclObj(Tcl_Obj *value)
static PyObject *
-Split(char *list)
+Split(const char *list)
{
int argc;
- char **argv;
+ const char **argv;
PyObject *v;
if (list == NULL) {
@@ -432,7 +477,7 @@ static PyObject *
SplitObj(PyObject *arg)
{
if (PyTuple_Check(arg)) {
- int i, size;
+ Py_ssize_t i, size;
PyObject *elem, *newelem, *result;
size = PyTuple_Size(arg);
@@ -448,7 +493,7 @@ SplitObj(PyObject *arg)
return NULL;
}
if (!result) {
- int k;
+ Py_ssize_t k;
if (newelem == elem) {
Py_DECREF(newelem);
continue;
@@ -468,9 +513,29 @@ SplitObj(PyObject *arg)
return result;
/* Fall through, returning arg. */
}
+ else if (PyList_Check(arg)) {
+ Py_ssize_t i, size;
+ PyObject *elem, *newelem, *result;
+
+ size = PyList_GET_SIZE(arg);
+ result = PyTuple_New(size);
+ if (!result)
+ return NULL;
+ /* Recursively invoke SplitObj for all list items. */
+ for(i = 0; i < size; i++) {
+ elem = PyList_GET_ITEM(arg, i);
+ newelem = SplitObj(elem);
+ if (!newelem) {
+ Py_XDECREF(result);
+ return NULL;
+ }
+ PyTuple_SetItem(result, i, newelem);
+ }
+ return result;
+ }
else if (PyUnicode_Check(arg)) {
int argc;
- char **argv;
+ const char **argv;
char *list = PyUnicode_AsUTF8(arg);
if (list == NULL ||
@@ -485,7 +550,7 @@ SplitObj(PyObject *arg)
}
else if (PyBytes_Check(arg)) {
int argc;
- char **argv;
+ const char **argv;
char *list = PyBytes_AsString(arg);
if (Tcl_SplitList((Tcl_Interp *)NULL, list, &argc, &argv) != TCL_OK) {
@@ -502,6 +567,14 @@ SplitObj(PyObject *arg)
}
+/*[clinic input]
+module _tkinter
+class _tkinter.tkapp "TkappObject *" "&Tkapp_Type_spec"
+class _tkinter.Tcl_Obj "PyTclObject *" "&PyTclObject_Type_spec"
+class _tkinter.tktimertoken "TkttObject *" "&Tktt_Type_spec"
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=b1ebf15c162ee229]*/
+
/**** Tkapp Object ****/
#ifndef WITH_APPINIT
@@ -552,8 +625,9 @@ static void EnableEventHook(void); /* Forward */
static void DisableEventHook(void); /* Forward */
static TkappObject *
-Tkapp_New(char *screenName, char *className,
- int interactive, int wantobjects, int wantTk, int sync, char *use)
+Tkapp_New(const char *screenName, const char *className,
+ int interactive, int wantobjects, int wantTk, int sync,
+ const char *use)
{
TkappObject *v;
char *argv0;
@@ -610,7 +684,7 @@ Tkapp_New(char *screenName, char *className,
Tcl_SetVar(v->interp, "tcl_interactive", "0", TCL_GLOBAL_ONLY);
/* This is used to get the application class for Tk 4.1 and up */
- argv0 = (char*)attemptckalloc(strlen(className) + 1);
+ argv0 = (char*)PyMem_Malloc(strlen(className) + 1);
if (!argv0) {
PyErr_NoMemory();
Py_DECREF(v);
@@ -621,7 +695,7 @@ Tkapp_New(char *screenName, char *className,
if (Py_ISUPPER(Py_CHARMASK(argv0[0])))
argv0[0] = Py_TOLOWER(Py_CHARMASK(argv0[0]));
Tcl_SetVar(v->interp, "argv0", argv0, TCL_GLOBAL_ONLY);
- ckfree(argv0);
+ PyMem_Free(argv0);
if (! wantTk) {
Tcl_SetVar(v->interp,
@@ -637,14 +711,14 @@ Tkapp_New(char *screenName, char *className,
/* some initial arguments need to be in argv */
if (sync || use) {
char *args;
- int len = 0;
+ Py_ssize_t len = 0;
if (sync)
len += sizeof "-sync";
if (use)
- len += strlen(use) + sizeof "-use ";
+ len += strlen(use) + sizeof "-use "; /* never overflows */
- args = (char*)attemptckalloc(len);
+ args = (char*)PyMem_Malloc(len);
if (!args) {
PyErr_NoMemory();
Py_DECREF(v);
@@ -662,8 +736,35 @@ Tkapp_New(char *screenName, char *className,
}
Tcl_SetVar(v->interp, "argv", args, TCL_GLOBAL_ONLY);
- ckfree(args);
+ PyMem_Free(args);
+ }
+
+#ifdef MS_WINDOWS
+ {
+ PyObject *str_path;
+ PyObject *utf8_path;
+ DWORD ret;
+
+ ret = GetEnvironmentVariableW(L"TCL_LIBRARY", NULL, 0);
+ if (!ret && GetLastError() == ERROR_ENVVAR_NOT_FOUND) {
+ str_path = _get_tcl_lib_path();
+ if (str_path == NULL && PyErr_Occurred()) {
+ return NULL;
+ }
+ if (str_path != NULL) {
+ utf8_path = PyUnicode_AsUTF8String(str_path);
+ if (utf8_path == NULL) {
+ return NULL;
+ }
+ Tcl_SetVar(v->interp,
+ "tcl_library",
+ PyBytes_AsString(utf8_path),
+ TCL_GLOBAL_ONLY);
+ Py_DECREF(utf8_path);
+ }
+ }
}
+#endif
if (Tcl_AppInit(v->interp) != TCL_OK) {
PyObject *result = Tkinter_Error((PyObject *)v);
@@ -929,9 +1030,14 @@ AsObj(PyObject *value)
{
Tcl_Obj *result;
- if (PyBytes_Check(value))
+ if (PyBytes_Check(value)) {
+ if (PyBytes_GET_SIZE(value) >= INT_MAX) {
+ PyErr_SetString(PyExc_OverflowError, "bytes object is too long");
+ return NULL;
+ }
return Tcl_NewByteArrayObj((unsigned char *)PyBytes_AS_STRING(value),
- PyBytes_GET_SIZE(value));
+ (int)PyBytes_GET_SIZE(value));
+ }
if (PyBool_Check(value))
return Tcl_NewBooleanObj(PyObject_IsTrue(value));
@@ -970,24 +1076,28 @@ AsObj(PyObject *value)
if (PyFloat_Check(value))
return Tcl_NewDoubleObj(PyFloat_AS_DOUBLE(value));
- if (PyTuple_Check(value)) {
+ if (PyTuple_Check(value) || PyList_Check(value)) {
Tcl_Obj **argv;
Py_ssize_t size, i;
- size = PyTuple_Size(value);
+ size = PySequence_Fast_GET_SIZE(value);
if (size == 0)
return Tcl_NewListObj(0, NULL);
if (!CHECK_SIZE(size, sizeof(Tcl_Obj *))) {
- PyErr_SetString(PyExc_OverflowError, "tuple is too long");
+ PyErr_SetString(PyExc_OverflowError,
+ PyTuple_Check(value) ? "tuple is too long" :
+ "list is too long");
return NULL;
}
- argv = (Tcl_Obj **) attemptckalloc(((size_t)size) * sizeof(Tcl_Obj *));
- if(!argv)
- return 0;
+ argv = (Tcl_Obj **) PyMem_Malloc(((size_t)size) * sizeof(Tcl_Obj *));
+ if (!argv) {
+ PyErr_NoMemory();
+ return NULL;
+ }
for (i = 0; i < size; i++)
- argv[i] = AsObj(PyTuple_GetItem(value,i));
- result = Tcl_NewListObj(PyTuple_Size(value), argv);
- ckfree(FREECAST argv);
+ argv[i] = AsObj(PySequence_Fast_GET_ITEM(value,i));
+ result = Tcl_NewListObj((int)size, argv);
+ PyMem_Free(argv);
return result;
}
@@ -1012,9 +1122,9 @@ AsObj(PyObject *value)
}
kind = PyUnicode_KIND(value);
if (kind == sizeof(Tcl_UniChar))
- return Tcl_NewUnicodeObj(inbuf, size);
+ return Tcl_NewUnicodeObj(inbuf, (int)size);
allocsize = ((size_t)size) * sizeof(Tcl_UniChar);
- outbuf = (Tcl_UniChar*)attemptckalloc(allocsize);
+ outbuf = (Tcl_UniChar*)PyMem_Malloc(allocsize);
/* Else overflow occurred, and we take the next exit */
if (!outbuf) {
PyErr_NoMemory();
@@ -1031,14 +1141,14 @@ AsObj(PyObject *value)
"character U+%x is above the range "
"(U+0000-U+FFFF) allowed by Tcl",
ch);
- ckfree(FREECAST outbuf);
+ PyMem_Free(outbuf);
return NULL;
}
#endif
outbuf[i] = ch;
}
- result = Tcl_NewUnicodeObj(outbuf, size);
- ckfree(FREECAST outbuf);
+ result = Tcl_NewUnicodeObj(outbuf, (int)size);
+ PyMem_Free(outbuf);
return result;
}
@@ -1067,7 +1177,6 @@ fromBoolean(PyObject* tkapp, Tcl_Obj *value)
return PyBool_FromLong(boolValue);
}
-#ifdef TCL_WIDE_INT_TYPE
static PyObject*
fromWideIntObj(PyObject* tkapp, Tcl_Obj *value)
{
@@ -1084,7 +1193,6 @@ fromWideIntObj(PyObject* tkapp, Tcl_Obj *value)
}
return NULL;
}
-#endif
#ifdef HAVE_LIBTOMMAMTH
static PyObject*
@@ -1157,7 +1265,6 @@ FromObj(PyObject* tkapp, Tcl_Obj *value)
fall through to wideInt handling. */
}
-#ifdef TCL_WIDE_INT_TYPE
if (value->typePtr == app->IntType ||
value->typePtr == app->WideIntType) {
result = fromWideIntObj(tkapp, value);
@@ -1167,7 +1274,6 @@ FromObj(PyObject* tkapp, Tcl_Obj *value)
/* If there is an error in the wideInt conversion,
fall through to bignum handling. */
}
-#endif
#ifdef HAVE_LIBTOMMAMTH
if (value->typePtr == app->IntType ||
@@ -1258,7 +1364,7 @@ Tkapp_CallDeallocArgs(Tcl_Obj** objv, Tcl_Obj** objStore, int objc)
for (i = 0; i < objc; i++)
Tcl_DecrRefCount(objv[i]);
if (objv != objStore)
- ckfree(FREECAST objv);
+ PyMem_Free(objv);
}
/* Convert Python objects to Tcl objects. This must happen in the
@@ -1272,7 +1378,7 @@ Tkapp_CallArgs(PyObject *args, Tcl_Obj** objStore, int *pobjc)
if (args == NULL)
/* do nothing */;
- else if (!PyTuple_Check(args)) {
+ else if (!(PyTuple_Check(args) || PyList_Check(args))) {
objv[0] = AsObj(args);
if (objv[0] == 0)
goto finally;
@@ -1280,14 +1386,16 @@ Tkapp_CallArgs(PyObject *args, Tcl_Obj** objStore, int *pobjc)
Tcl_IncrRefCount(objv[0]);
}
else {
- objc = PyTuple_Size(args);
+ objc = PySequence_Fast_GET_SIZE(args);
if (objc > ARGSZ) {
if (!CHECK_SIZE(objc, sizeof(Tcl_Obj *))) {
- PyErr_SetString(PyExc_OverflowError, "tuple is too long");
+ PyErr_SetString(PyExc_OverflowError,
+ PyTuple_Check(args) ? "tuple is too long" :
+ "list is too long");
return NULL;
}
- objv = (Tcl_Obj **)attemptckalloc(((size_t)objc) * sizeof(Tcl_Obj *));
+ objv = (Tcl_Obj **)PyMem_Malloc(((size_t)objc) * sizeof(Tcl_Obj *));
if (objv == NULL) {
PyErr_NoMemory();
objc = 0;
@@ -1296,7 +1404,7 @@ Tkapp_CallArgs(PyObject *args, Tcl_Obj** objStore, int *pobjc)
}
for (i = 0; i < objc; i++) {
- PyObject *v = PyTuple_GetItem(args, i);
+ PyObject *v = PySequence_Fast_GET_ITEM(args, i);
if (v == Py_None) {
objc = i;
break;
@@ -1311,10 +1419,10 @@ Tkapp_CallArgs(PyObject *args, Tcl_Obj** objStore, int *pobjc)
Tcl_IncrRefCount(objv[i]);
}
}
- *pobjc = objc;
+ *pobjc = (int)objc;
return objv;
finally:
- Tkapp_CallDeallocArgs(objv, objStore, objc);
+ Tkapp_CallDeallocArgs(objv, objStore, (int)objc);
return NULL;
}
@@ -1474,16 +1582,21 @@ Tkapp_Call(PyObject *selfptr, PyObject *args)
}
+/*[clinic input]
+_tkinter.tkapp.eval
+
+ script: str
+ /
+
+[clinic start generated code]*/
+
static PyObject *
-Tkapp_Eval(PyObject *self, PyObject *args)
+_tkinter_tkapp_eval_impl(TkappObject *self, const char *script)
+/*[clinic end generated code: output=24b79831f700dea0 input=481484123a455f22]*/
{
- char *script;
PyObject *res = NULL;
int err;
- if (!PyArg_ParseTuple(args, "s:eval", &script))
- return NULL;
-
CHECK_STRING_LENGTH(script);
CHECK_TCL_APPARTMENT;
@@ -1491,23 +1604,28 @@ Tkapp_Eval(PyObject *self, PyObject *args)
err = Tcl_Eval(Tkapp_Interp(self), script);
ENTER_OVERLAP
if (err == TCL_ERROR)
- res = Tkinter_Error(self);
+ res = Tkinter_Error((PyObject *)self);
else
res = unicodeFromTclString(Tkapp_Result(self));
LEAVE_OVERLAP_TCL
return res;
}
+/*[clinic input]
+_tkinter.tkapp.evalfile
+
+ fileName: str
+ /
+
+[clinic start generated code]*/
+
static PyObject *
-Tkapp_EvalFile(PyObject *self, PyObject *args)
+_tkinter_tkapp_evalfile_impl(TkappObject *self, const char *fileName)
+/*[clinic end generated code: output=63be88dcee4f11d3 input=873ab707e5e947e1]*/
{
- char *fileName;
PyObject *res = NULL;
int err;
- if (!PyArg_ParseTuple(args, "s:evalfile", &fileName))
- return NULL;
-
CHECK_STRING_LENGTH(fileName);
CHECK_TCL_APPARTMENT;
@@ -1515,23 +1633,28 @@ Tkapp_EvalFile(PyObject *self, PyObject *args)
err = Tcl_EvalFile(Tkapp_Interp(self), fileName);
ENTER_OVERLAP
if (err == TCL_ERROR)
- res = Tkinter_Error(self);
+ res = Tkinter_Error((PyObject *)self);
else
res = unicodeFromTclString(Tkapp_Result(self));
LEAVE_OVERLAP_TCL
return res;
}
+/*[clinic input]
+_tkinter.tkapp.record
+
+ script: str
+ /
+
+[clinic start generated code]*/
+
static PyObject *
-Tkapp_Record(PyObject *self, PyObject *args)
+_tkinter_tkapp_record_impl(TkappObject *self, const char *script)
+/*[clinic end generated code: output=0ffe08a0061730df input=c0b0db5a21412cac]*/
{
- char *script;
PyObject *res = NULL;
int err;
- if (!PyArg_ParseTuple(args, "s:record", &script))
- return NULL;
-
CHECK_STRING_LENGTH(script);
CHECK_TCL_APPARTMENT;
@@ -1539,20 +1662,25 @@ Tkapp_Record(PyObject *self, PyObject *args)
err = Tcl_RecordAndEval(Tkapp_Interp(self), script, TCL_NO_EVAL);
ENTER_OVERLAP
if (err == TCL_ERROR)
- res = Tkinter_Error(self);
+ res = Tkinter_Error((PyObject *)self);
else
res = unicodeFromTclString(Tkapp_Result(self));
LEAVE_OVERLAP_TCL
return res;
}
+/*[clinic input]
+_tkinter.tkapp.adderrinfo
+
+ msg: str
+ /
+
+[clinic start generated code]*/
+
static PyObject *
-Tkapp_AddErrorInfo(PyObject *self, PyObject *args)
+_tkinter_tkapp_adderrinfo_impl(TkappObject *self, const char *msg)
+/*[clinic end generated code: output=0e222ee2050eb357 input=4971399317d4c136]*/
{
- char *msg;
-
- if (!PyArg_ParseTuple(args, "s:adderrorinfo", &msg))
- return NULL;
CHECK_STRING_LENGTH(msg);
CHECK_TCL_APPARTMENT;
@@ -1585,6 +1713,15 @@ typedef struct VarEvent {
} VarEvent;
#endif
+/*[python]
+
+class varname_converter(CConverter):
+ type = 'const char *'
+ converter = 'varname_converter'
+
+[python]*/
+/*[python checksum: da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
+
static int
varname_converter(PyObject *in, void *_out)
{
@@ -1596,8 +1733,8 @@ varname_converter(PyObject *in, void *_out)
return 0;
}
s = PyBytes_AsString(in);
- if (strlen(s) != PyBytes_Size(in)) {
- PyErr_SetString(PyExc_ValueError, "null byte in bytes object");
+ if (strlen(s) != (size_t)PyBytes_Size(in)) {
+ PyErr_SetString(PyExc_ValueError, "embedded null byte");
return 0;
}
*out = s;
@@ -1613,8 +1750,8 @@ varname_converter(PyObject *in, void *_out)
PyErr_SetString(PyExc_OverflowError, "string is too long");
return 0;
}
- if (strlen(s) != size) {
- PyErr_SetString(PyExc_ValueError, "null character in string");
+ if (strlen(s) != (size_t)size) {
+ PyErr_SetString(PyExc_ValueError, "embedded null character");
return 0;
}
*out = s;
@@ -1667,7 +1804,6 @@ var_invoke(EventFunc func, PyObject *selfptr, PyObject *args, int flags)
#ifdef WITH_THREAD
TkappObject *self = (TkappObject*)selfptr;
if (self->threaded && self->thread_id != Tcl_GetCurrentThread()) {
- TkappObject *self = (TkappObject*)selfptr;
VarEvent *ev;
PyObject *res, *exc_type, *exc_val;
Tcl_Condition cond = NULL;
@@ -1862,31 +1998,39 @@ Tkapp_GlobalUnsetVar(PyObject *self, PyObject *args)
/** Tcl to Python **/
+/*[clinic input]
+_tkinter.tkapp.getint
+
+ arg: object
+ /
+
+[clinic start generated code]*/
+
static PyObject *
-Tkapp_GetInt(PyObject *self, PyObject *args)
+_tkinter_tkapp_getint(TkappObject *self, PyObject *arg)
+/*[clinic end generated code: output=88cf293fae307cfe input=034026997c5b91f8]*/
{
char *s;
-#if defined(TCL_WIDE_INT_TYPE) || defined(HAVE_LIBTOMMAMTH)
Tcl_Obj *value;
PyObject *result;
-#else
- int intValue;
-#endif
- if (PyTuple_Size(args) == 1) {
- PyObject* o = PyTuple_GetItem(args, 0);
- if (PyLong_Check(o)) {
- Py_INCREF(o);
- return o;
- }
+ if (PyLong_Check(arg)) {
+ Py_INCREF(arg);
+ return arg;
+ }
+
+ if (PyTclObject_Check(arg)) {
+ value = ((PyTclObject*)arg)->value;
+ Tcl_IncrRefCount(value);
+ }
+ else {
+ if (!PyArg_Parse(arg, "s:getint", &s))
+ return NULL;
+ CHECK_STRING_LENGTH(s);
+ value = Tcl_NewStringObj(s, -1);
+ if (value == NULL)
+ return Tkinter_Error((PyObject *)self);
}
- if (!PyArg_ParseTuple(args, "s:getint", &s))
- return NULL;
- CHECK_STRING_LENGTH(s);
-#if defined(TCL_WIDE_INT_TYPE) || defined(HAVE_LIBTOMMAMTH)
- value = Tcl_NewStringObj(s, -1);
- if (value == NULL)
- return Tkinter_Error(self);
/* Don't use Tcl_GetInt() because it returns ambiguous result for value
in ranges -2**32..-2**31-1 and 2**31..2**32-1 (on 32-bit platform).
@@ -1894,43 +2038,67 @@ Tkapp_GetInt(PyObject *self, PyObject *args)
value in ranges -2**64..-2**63-1 and 2**63..2**64-1 (on 32-bit platform).
*/
#ifdef HAVE_LIBTOMMAMTH
- result = fromBignumObj(self, value);
+ result = fromBignumObj((PyObject *)self, value);
#else
- result = fromWideIntObj(self, value);
+ result = fromWideIntObj((PyObject *)self, value);
#endif
Tcl_DecrRefCount(value);
if (result != NULL || PyErr_Occurred())
return result;
-#else
- if (Tcl_GetInt(Tkapp_Interp(self), s, &intValue) == TCL_OK)
- return PyLong_FromLong(intValue);
-#endif
- return Tkinter_Error(self);
+ return Tkinter_Error((PyObject *)self);
}
+/*[clinic input]
+_tkinter.tkapp.getdouble
+
+ arg: object
+ /
+
+[clinic start generated code]*/
+
static PyObject *
-Tkapp_GetDouble(PyObject *self, PyObject *args)
+_tkinter_tkapp_getdouble(TkappObject *self, PyObject *arg)
+/*[clinic end generated code: output=c52b138bd8b956b9 input=22015729ce9ef7f8]*/
{
char *s;
double v;
- if (PyTuple_Size(args) == 1) {
- PyObject *o = PyTuple_GetItem(args, 0);
- if (PyFloat_Check(o)) {
- Py_INCREF(o);
- return o;
- }
+ if (PyFloat_Check(arg)) {
+ Py_INCREF(arg);
+ return arg;
}
- if (!PyArg_ParseTuple(args, "s:getdouble", &s))
+
+ if (PyNumber_Check(arg)) {
+ return PyNumber_Float(arg);
+ }
+
+ if (PyTclObject_Check(arg)) {
+ if (Tcl_GetDoubleFromObj(Tkapp_Interp(self),
+ ((PyTclObject*)arg)->value,
+ &v) == TCL_ERROR)
+ return Tkinter_Error((PyObject *)self);
+ return PyFloat_FromDouble(v);
+ }
+
+ if (!PyArg_Parse(arg, "s:getdouble", &s))
return NULL;
CHECK_STRING_LENGTH(s);
if (Tcl_GetDouble(Tkapp_Interp(self), s, &v) == TCL_ERROR)
- return Tkinter_Error(self);
- return Py_BuildValue("d", v);
+ return Tkinter_Error((PyObject *)self);
+ return PyFloat_FromDouble(v);
}
+/*[clinic input]
+_tkinter.tkapp.getboolean
+
+ arg: object
+ /
+
+[clinic start generated code]*/
+
static PyObject *
-Tkapp_GetBoolean(PyObject *self, PyObject *arg)
+_tkinter_tkapp_getboolean(TkappObject *self, PyObject *arg)
+/*[clinic end generated code: output=726a9ae445821d91 input=7f11248ef8f8776e]*/
{
char *s;
int v;
@@ -1943,7 +2111,7 @@ Tkapp_GetBoolean(PyObject *self, PyObject *arg)
if (Tcl_GetBooleanFromObj(Tkapp_Interp(self),
((PyTclObject*)arg)->value,
&v) == TCL_ERROR)
- return Tkinter_Error(self);
+ return Tkinter_Error((PyObject *)self);
return PyBool_FromLong(v);
}
@@ -1951,20 +2119,25 @@ Tkapp_GetBoolean(PyObject *self, PyObject *arg)
return NULL;
CHECK_STRING_LENGTH(s);
if (Tcl_GetBoolean(Tkapp_Interp(self), s, &v) == TCL_ERROR)
- return Tkinter_Error(self);
+ return Tkinter_Error((PyObject *)self);
return PyBool_FromLong(v);
}
+/*[clinic input]
+_tkinter.tkapp.exprstring
+
+ s: str
+ /
+
+[clinic start generated code]*/
+
static PyObject *
-Tkapp_ExprString(PyObject *self, PyObject *args)
+_tkinter_tkapp_exprstring_impl(TkappObject *self, const char *s)
+/*[clinic end generated code: output=beda323d3ed0abb1 input=fa78f751afb2f21b]*/
{
- char *s;
PyObject *res = NULL;
int retval;
- if (!PyArg_ParseTuple(args, "s:exprstring", &s))
- return NULL;
-
CHECK_STRING_LENGTH(s);
CHECK_TCL_APPARTMENT;
@@ -1972,24 +2145,29 @@ Tkapp_ExprString(PyObject *self, PyObject *args)
retval = Tcl_ExprString(Tkapp_Interp(self), s);
ENTER_OVERLAP
if (retval == TCL_ERROR)
- res = Tkinter_Error(self);
+ res = Tkinter_Error((PyObject *)self);
else
res = unicodeFromTclString(Tkapp_Result(self));
LEAVE_OVERLAP_TCL
return res;
}
+/*[clinic input]
+_tkinter.tkapp.exprlong
+
+ s: str
+ /
+
+[clinic start generated code]*/
+
static PyObject *
-Tkapp_ExprLong(PyObject *self, PyObject *args)
+_tkinter_tkapp_exprlong_impl(TkappObject *self, const char *s)
+/*[clinic end generated code: output=5d6a46b63c6ebcf9 input=11bd7eee0c57b4dc]*/
{
- char *s;
PyObject *res = NULL;
int retval;
long v;
- if (!PyArg_ParseTuple(args, "s:exprlong", &s))
- return NULL;
-
CHECK_STRING_LENGTH(s);
CHECK_TCL_APPARTMENT;
@@ -1997,23 +2175,29 @@ Tkapp_ExprLong(PyObject *self, PyObject *args)
retval = Tcl_ExprLong(Tkapp_Interp(self), s, &v);
ENTER_OVERLAP
if (retval == TCL_ERROR)
- res = Tkinter_Error(self);
+ res = Tkinter_Error((PyObject *)self);
else
- res = Py_BuildValue("l", v);
+ res = PyLong_FromLong(v);
LEAVE_OVERLAP_TCL
return res;
}
+/*[clinic input]
+_tkinter.tkapp.exprdouble
+
+ s: str
+ /
+
+[clinic start generated code]*/
+
static PyObject *
-Tkapp_ExprDouble(PyObject *self, PyObject *args)
+_tkinter_tkapp_exprdouble_impl(TkappObject *self, const char *s)
+/*[clinic end generated code: output=ff78df1081ea4158 input=ff02bc11798832d5]*/
{
- char *s;
PyObject *res = NULL;
double v;
int retval;
- if (!PyArg_ParseTuple(args, "s:exprdouble", &s))
- return NULL;
CHECK_STRING_LENGTH(s);
CHECK_TCL_APPARTMENT;
PyFPE_START_PROTECT("Tkapp_ExprDouble", return 0)
@@ -2022,61 +2206,74 @@ Tkapp_ExprDouble(PyObject *self, PyObject *args)
ENTER_OVERLAP
PyFPE_END_PROTECT(retval)
if (retval == TCL_ERROR)
- res = Tkinter_Error(self);
+ res = Tkinter_Error((PyObject *)self);
else
- res = Py_BuildValue("d", v);
+ res = PyFloat_FromDouble(v);
LEAVE_OVERLAP_TCL
return res;
}
+/*[clinic input]
+_tkinter.tkapp.exprboolean
+
+ s: str
+ /
+
+[clinic start generated code]*/
+
static PyObject *
-Tkapp_ExprBoolean(PyObject *self, PyObject *args)
+_tkinter_tkapp_exprboolean_impl(TkappObject *self, const char *s)
+/*[clinic end generated code: output=8b28038c22887311 input=c8c66022bdb8d5d3]*/
{
- char *s;
PyObject *res = NULL;
int retval;
int v;
- if (!PyArg_ParseTuple(args, "s:exprboolean", &s))
- return NULL;
CHECK_STRING_LENGTH(s);
CHECK_TCL_APPARTMENT;
ENTER_TCL
retval = Tcl_ExprBoolean(Tkapp_Interp(self), s, &v);
ENTER_OVERLAP
if (retval == TCL_ERROR)
- res = Tkinter_Error(self);
+ res = Tkinter_Error((PyObject *)self);
else
- res = Py_BuildValue("i", v);
+ res = PyLong_FromLong(v);
LEAVE_OVERLAP_TCL
return res;
}
+/*[clinic input]
+_tkinter.tkapp.splitlist
+
+ arg: object
+ /
+
+[clinic start generated code]*/
+
static PyObject *
-Tkapp_SplitList(PyObject *self, PyObject *args)
+_tkinter_tkapp_splitlist(TkappObject *self, PyObject *arg)
+/*[clinic end generated code: output=13b51d34386d36fb input=2b2e13351e3c0b53]*/
{
char *list;
int argc;
- char **argv;
- PyObject *arg, *v;
+ const char **argv;
+ PyObject *v;
int i;
- if (!PyArg_ParseTuple(args, "O:splitlist", &arg))
- return NULL;
if (PyTclObject_Check(arg)) {
int objc;
Tcl_Obj **objv;
if (Tcl_ListObjGetElements(Tkapp_Interp(self),
((PyTclObject*)arg)->value,
&objc, &objv) == TCL_ERROR) {
- return Tkinter_Error(self);
+ return Tkinter_Error((PyObject *)self);
}
if (!(v = PyTuple_New(objc)))
return NULL;
for (i = 0; i < objc; i++) {
- PyObject *s = FromObj(self, objv[i]);
+ PyObject *s = FromObj((PyObject*)self, objv[i]);
if (!s || PyTuple_SetItem(v, i, s)) {
Py_DECREF(v);
return NULL;
@@ -2088,15 +2285,18 @@ Tkapp_SplitList(PyObject *self, PyObject *args)
Py_INCREF(arg);
return arg;
}
+ if (PyList_Check(arg)) {
+ return PySequence_Tuple(arg);
+ }
- if (!PyArg_ParseTuple(args, "et:splitlist", "utf-8", &list))
+ if (!PyArg_Parse(arg, "et:splitlist", "utf-8", &list))
return NULL;
CHECK_STRING_LENGTH(list);
if (Tcl_SplitList(Tkapp_Interp(self), list,
&argc, &argv) == TCL_ERROR) {
PyMem_Free(list);
- return Tkinter_Error(self);
+ return Tkinter_Error((PyObject *)self);
}
if (!(v = PyTuple_New(argc)))
@@ -2117,14 +2317,21 @@ Tkapp_SplitList(PyObject *self, PyObject *args)
return v;
}
+/*[clinic input]
+_tkinter.tkapp.split
+
+ arg: object
+ /
+
+[clinic start generated code]*/
+
static PyObject *
-Tkapp_Split(PyObject *self, PyObject *args)
+_tkinter_tkapp_split(TkappObject *self, PyObject *arg)
+/*[clinic end generated code: output=e08ad832363facfd input=a1c78349eacaa140]*/
{
- PyObject *arg, *v;
+ PyObject *v;
char *list;
- if (!PyArg_ParseTuple(args, "O:split", &arg))
- return NULL;
if (PyTclObject_Check(arg)) {
Tcl_Obj *value = ((PyTclObject*)arg)->value;
int objc;
@@ -2132,16 +2339,16 @@ Tkapp_Split(PyObject *self, PyObject *args)
int i;
if (Tcl_ListObjGetElements(Tkapp_Interp(self), value,
&objc, &objv) == TCL_ERROR) {
- return FromObj(self, value);
+ return FromObj((PyObject*)self, value);
}
if (objc == 0)
return PyUnicode_FromString("");
if (objc == 1)
- return FromObj(self, objv[0]);
+ return FromObj((PyObject*)self, objv[0]);
if (!(v = PyTuple_New(objc)))
return NULL;
for (i = 0; i < objc; i++) {
- PyObject *s = FromObj(self, objv[i]);
+ PyObject *s = FromObj((PyObject*)self, objv[i]);
if (!s || PyTuple_SetItem(v, i, s)) {
Py_DECREF(v);
return NULL;
@@ -2149,10 +2356,10 @@ Tkapp_Split(PyObject *self, PyObject *args)
}
return v;
}
- if (PyTuple_Check(arg))
+ if (PyTuple_Check(arg) || PyList_Check(arg))
return SplitObj(arg);
- if (!PyArg_ParseTuple(args, "et:split", "utf-8", &list))
+ if (!PyArg_Parse(arg, "et:split", "utf-8", &list))
return NULL;
CHECK_STRING_LENGTH(list);
v = Split(list);
@@ -2183,7 +2390,7 @@ PythonCmd_Error(Tcl_Interp *interp)
* function or method.
*/
static int
-PythonCmd(ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
+PythonCmd(ClientData clientData, Tcl_Interp *interp, int argc, const char *argv[])
{
PythonCmd_ClientData *data = (PythonCmd_ClientData *)clientData;
PyObject *func, *arg, *res;
@@ -2252,7 +2459,7 @@ TCL_DECLARE_MUTEX(command_mutex)
typedef struct CommandEvent{
Tcl_Event ev;
Tcl_Interp* interp;
- char *name;
+ const char *name;
int create;
int *status;
ClientData *data;
@@ -2275,18 +2482,25 @@ Tkapp_CommandProc(CommandEvent *ev, int flags)
}
#endif
+/*[clinic input]
+_tkinter.tkapp.createcommand
+
+ self: self(type="TkappObject *")
+ name: str
+ func: object
+ /
+
+[clinic start generated code]*/
+
static PyObject *
-Tkapp_CreateCommand(PyObject *selfptr, PyObject *args)
+_tkinter_tkapp_createcommand_impl(TkappObject *self, const char *name,
+ PyObject *func)
+/*[clinic end generated code: output=2a1c79a4ee2af410 input=2bc2c046a0914234]*/
{
- TkappObject *self = (TkappObject*)selfptr;
PythonCmd_ClientData *data;
- char *cmdName;
- PyObject *func;
int err;
- if (!PyArg_ParseTuple(args, "sO:createcommand", &cmdName, &func))
- return NULL;
- CHECK_STRING_LENGTH(cmdName);
+ CHECK_STRING_LENGTH(name);
if (!PyCallable_Check(func)) {
PyErr_SetString(PyExc_TypeError, "command not callable");
return NULL;
@@ -2303,7 +2517,7 @@ Tkapp_CreateCommand(PyObject *selfptr, PyObject *args)
return PyErr_NoMemory();
Py_INCREF(self);
Py_INCREF(func);
- data->self = selfptr;
+ data->self = (PyObject *) self;
data->func = func;
#ifdef WITH_THREAD
if (self->threaded && self->thread_id != Tcl_GetCurrentThread()) {
@@ -2317,7 +2531,7 @@ Tkapp_CreateCommand(PyObject *selfptr, PyObject *args)
ev->ev.proc = (Tcl_EventProc*)Tkapp_CommandProc;
ev->interp = self->interp;
ev->create = 1;
- ev->name = cmdName;
+ ev->name = name;
ev->data = (ClientData)data;
ev->status = &err;
ev->done = &cond;
@@ -2329,7 +2543,7 @@ Tkapp_CreateCommand(PyObject *selfptr, PyObject *args)
{
ENTER_TCL
err = Tcl_CreateCommand(
- Tkapp_Interp(self), cmdName, PythonCmd,
+ Tkapp_Interp(self), name, PythonCmd,
(ClientData)data, PythonCmdDelete) == NULL;
LEAVE_TCL
}
@@ -2344,16 +2558,22 @@ Tkapp_CreateCommand(PyObject *selfptr, PyObject *args)
+/*[clinic input]
+_tkinter.tkapp.deletecommand
+
+ self: self(type="TkappObject *")
+ name: str
+ /
+
+[clinic start generated code]*/
+
static PyObject *
-Tkapp_DeleteCommand(PyObject *selfptr, PyObject *args)
+_tkinter_tkapp_deletecommand_impl(TkappObject *self, const char *name)
+/*[clinic end generated code: output=a67e8cb5845e0d2d input=b6306468f10b219c]*/
{
- TkappObject *self = (TkappObject*)selfptr;
- char *cmdName;
int err;
- if (!PyArg_ParseTuple(args, "s:deletecommand", &cmdName))
- return NULL;
- CHECK_STRING_LENGTH(cmdName);
+ CHECK_STRING_LENGTH(name);
#ifdef WITH_THREAD
if (self->threaded && self->thread_id != Tcl_GetCurrentThread()) {
@@ -2367,7 +2587,7 @@ Tkapp_DeleteCommand(PyObject *selfptr, PyObject *args)
ev->ev.proc = (Tcl_EventProc*)Tkapp_CommandProc;
ev->interp = self->interp;
ev->create = 0;
- ev->name = cmdName;
+ ev->name = name;
ev->status = &err;
ev->done = &cond;
Tkapp_ThreadSend(self, (Tcl_Event*)ev, &cond,
@@ -2378,7 +2598,7 @@ Tkapp_DeleteCommand(PyObject *selfptr, PyObject *args)
#endif
{
ENTER_TCL
- err = Tcl_DeleteCommand(self->interp, cmdName);
+ err = Tcl_DeleteCommand(self->interp, name);
LEAVE_TCL
}
if (err == -1) {
@@ -2459,17 +2679,23 @@ FileHandler(ClientData clientData, int mask)
LEAVE_PYTHON
}
+/*[clinic input]
+_tkinter.tkapp.createfilehandler
+
+ file: object
+ mask: int
+ func: object
+ /
+
+[clinic start generated code]*/
+
static PyObject *
-Tkapp_CreateFileHandler(PyObject *self, PyObject *args)
- /* args is (file, mask, func) */
+_tkinter_tkapp_createfilehandler_impl(TkappObject *self, PyObject *file,
+ int mask, PyObject *func)
+/*[clinic end generated code: output=f73ce82de801c353 input=84943a5286e47947]*/
{
FileHandler_ClientData *data;
- PyObject *file, *func;
- int mask, tfile;
-
- if (!PyArg_ParseTuple(args, "OiO:createfilehandler",
- &file, &mask, &func))
- return NULL;
+ int tfile;
CHECK_TCL_APPARTMENT;
@@ -2492,15 +2718,20 @@ Tkapp_CreateFileHandler(PyObject *self, PyObject *args)
Py_RETURN_NONE;
}
+/*[clinic input]
+_tkinter.tkapp.deletefilehandler
+
+ file: object
+ /
+
+[clinic start generated code]*/
+
static PyObject *
-Tkapp_DeleteFileHandler(PyObject *self, PyObject *args)
+_tkinter_tkapp_deletefilehandler(TkappObject *self, PyObject *file)
+/*[clinic end generated code: output=b53cc96ebf9476fd input=abbec19d66312e2a]*/
{
- PyObject *file;
int tfile;
- if (!PyArg_ParseTuple(args, "O:deletefilehandler", &file))
- return NULL;
-
CHECK_TCL_APPARTMENT;
tfile = PyObject_AsFileDescriptor(file);
@@ -2528,14 +2759,20 @@ typedef struct {
PyObject *func;
} TkttObject;
+/*[clinic input]
+_tkinter.tktimertoken.deletetimerhandler
+
+ self: self(type="TkttObject *")
+
+[clinic start generated code]*/
+
static PyObject *
-Tktt_DeleteTimerHandler(PyObject *self, PyObject *args)
+_tkinter_tktimertoken_deletetimerhandler_impl(TkttObject *self)
+/*[clinic end generated code: output=bd7fe17f328cfa55 input=25ba5dd594e52084]*/
{
- TkttObject *v = (TkttObject *)self;
+ TkttObject *v = self;
PyObject *func = v->func;
- if (!PyArg_ParseTuple(args, ":deletetimerhandler"))
- return NULL;
if (v->token != NULL) {
Tcl_DeleteTimerHandler(v->token);
v->token = NULL;
@@ -2548,12 +2785,6 @@ Tktt_DeleteTimerHandler(PyObject *self, PyObject *args)
Py_RETURN_NONE;
}
-static PyMethodDef Tktt_methods[] =
-{
- {"deletetimerhandler", Tktt_DeleteTimerHandler, METH_VARARGS},
- {NULL, NULL}
-};
-
static TkttObject *
Tktt_New(PyObject *func)
{
@@ -2595,22 +2826,6 @@ Tktt_Repr(PyObject *self)
v->func == NULL ? ", handler deleted" : "");
}
-static PyType_Slot Tktt_Type_slots[] = {
- {Py_tp_dealloc, Tktt_Dealloc},
- {Py_tp_repr, Tktt_Repr},
- {Py_tp_methods, Tktt_methods},
- {0, 0}
-};
-
-static PyType_Spec Tktt_Type_spec = {
- "_tkinter.tktimertoken",
- sizeof(TkttObject),
- 0,
- Py_TPFLAGS_DEFAULT,
- Tktt_Type_slots,
-};
-
-
/** Timer Handler **/
static void
@@ -2641,16 +2856,22 @@ TimerHandler(ClientData clientData)
LEAVE_PYTHON
}
+/*[clinic input]
+_tkinter.tkapp.createtimerhandler
+
+ milliseconds: int
+ func: object
+ /
+
+[clinic start generated code]*/
+
static PyObject *
-Tkapp_CreateTimerHandler(PyObject *self, PyObject *args)
+_tkinter_tkapp_createtimerhandler_impl(TkappObject *self, int milliseconds,
+ PyObject *func)
+/*[clinic end generated code: output=2da5959b9d031911 input=ba6729f32f0277a5]*/
{
- int milliseconds;
- PyObject *func;
TkttObject *v;
- if (!PyArg_ParseTuple(args, "iO:createtimerhandler",
- &milliseconds, &func))
- return NULL;
if (!PyCallable_Check(func)) {
PyErr_SetString(PyExc_TypeError, "bad argument list");
return NULL;
@@ -2670,18 +2891,23 @@ Tkapp_CreateTimerHandler(PyObject *self, PyObject *args)
/** Event Loop **/
+/*[clinic input]
+_tkinter.tkapp.mainloop
+
+ self: self(type="TkappObject *")
+ threshold: int = 0
+ /
+
+[clinic start generated code]*/
+
static PyObject *
-Tkapp_MainLoop(PyObject *selfptr, PyObject *args)
+_tkinter_tkapp_mainloop_impl(TkappObject *self, int threshold)
+/*[clinic end generated code: output=0ba8eabbe57841b0 input=ad57c9c1dd2b9470]*/
{
- int threshold = 0;
- TkappObject *self = (TkappObject*)selfptr;
#ifdef WITH_THREAD
PyThreadState *tstate = PyThreadState_Get();
#endif
- if (!PyArg_ParseTuple(args, "|i:mainloop", &threshold))
- return NULL;
-
CHECK_TCL_APPARTMENT;
self->dispatching = 1;
@@ -2733,44 +2959,56 @@ Tkapp_MainLoop(PyObject *selfptr, PyObject *args)
Py_RETURN_NONE;
}
+/*[clinic input]
+_tkinter.tkapp.dooneevent
+
+ flags: int = 0
+ /
+
+[clinic start generated code]*/
+
static PyObject *
-Tkapp_DoOneEvent(PyObject *self, PyObject *args)
+_tkinter_tkapp_dooneevent_impl(TkappObject *self, int flags)
+/*[clinic end generated code: output=27c6b2aa464cac29 input=6542b928e364b793]*/
{
- int flags = 0;
int rv;
- if (!PyArg_ParseTuple(args, "|i:dooneevent", &flags))
- return NULL;
-
ENTER_TCL
rv = Tcl_DoOneEvent(flags);
LEAVE_TCL
- return Py_BuildValue("i", rv);
+ return PyLong_FromLong(rv);
}
+/*[clinic input]
+_tkinter.tkapp.quit
+[clinic start generated code]*/
+
static PyObject *
-Tkapp_Quit(PyObject *self, PyObject *args)
+_tkinter_tkapp_quit_impl(TkappObject *self)
+/*[clinic end generated code: output=7f21eeff481f754f input=e03020dc38aff23c]*/
{
-
- if (!PyArg_ParseTuple(args, ":quit"))
- return NULL;
-
quitMainLoop = 1;
Py_RETURN_NONE;
}
+/*[clinic input]
+_tkinter.tkapp.interpaddr
+[clinic start generated code]*/
+
static PyObject *
-Tkapp_InterpAddr(PyObject *self, PyObject *args)
+_tkinter_tkapp_interpaddr_impl(TkappObject *self)
+/*[clinic end generated code: output=6caaae3273b3c95a input=2dd32cbddb55a111]*/
{
-
- if (!PyArg_ParseTuple(args, ":interpaddr"))
- return NULL;
-
return PyLong_FromVoidPtr(Tkapp_Interp(self));
}
+/*[clinic input]
+_tkinter.tkapp.loadtk
+[clinic start generated code]*/
+
static PyObject *
-Tkapp_TkInit(PyObject *self, PyObject *args)
+_tkinter_tkapp_loadtk_impl(TkappObject *self)
+/*[clinic end generated code: output=e9e10a954ce46d2a input=b5e82afedd6354f0]*/
{
Tcl_Interp *interp = Tkapp_Interp(self);
const char * _tk_exists = NULL;
@@ -2796,7 +3034,7 @@ Tkapp_TkInit(PyObject *self, PyObject *args)
if (err == TCL_ERROR) {
/* This sets an exception, but we cannot return right
away because we need to exit the overlap first. */
- Tkinter_Error(self);
+ Tkinter_Error((PyObject *)self);
} else {
_tk_exists = Tkapp_Result(self);
}
@@ -2831,57 +3069,21 @@ Tkapp_WantObjects(PyObject *self, PyObject *args)
Py_RETURN_NONE;
}
-static PyObject *
-Tkapp_WillDispatch(PyObject *self, PyObject *args)
-{
-
- ((TkappObject*)self)->dispatching = 1;
-
- Py_RETURN_NONE;
-}
+/*[clinic input]
+_tkinter.tkapp.willdispatch
+ self: self(type="TkappObject *")
-/**** Tkapp Method List ****/
+[clinic start generated code]*/
-static PyMethodDef Tkapp_methods[] =
+static PyObject *
+_tkinter_tkapp_willdispatch_impl(TkappObject *self)
+/*[clinic end generated code: output=0e3f46d244642155 input=2630699767808970]*/
{
- {"willdispatch", Tkapp_WillDispatch, METH_NOARGS},
- {"wantobjects", Tkapp_WantObjects, METH_VARARGS},
- {"call", Tkapp_Call, METH_VARARGS},
- {"eval", Tkapp_Eval, METH_VARARGS},
- {"evalfile", Tkapp_EvalFile, METH_VARARGS},
- {"record", Tkapp_Record, METH_VARARGS},
- {"adderrorinfo", Tkapp_AddErrorInfo, METH_VARARGS},
- {"setvar", Tkapp_SetVar, METH_VARARGS},
- {"globalsetvar", Tkapp_GlobalSetVar, METH_VARARGS},
- {"getvar", Tkapp_GetVar, METH_VARARGS},
- {"globalgetvar", Tkapp_GlobalGetVar, METH_VARARGS},
- {"unsetvar", Tkapp_UnsetVar, METH_VARARGS},
- {"globalunsetvar", Tkapp_GlobalUnsetVar, METH_VARARGS},
- {"getint", Tkapp_GetInt, METH_VARARGS},
- {"getdouble", Tkapp_GetDouble, METH_VARARGS},
- {"getboolean", Tkapp_GetBoolean, METH_O},
- {"exprstring", Tkapp_ExprString, METH_VARARGS},
- {"exprlong", Tkapp_ExprLong, METH_VARARGS},
- {"exprdouble", Tkapp_ExprDouble, METH_VARARGS},
- {"exprboolean", Tkapp_ExprBoolean, METH_VARARGS},
- {"splitlist", Tkapp_SplitList, METH_VARARGS},
- {"split", Tkapp_Split, METH_VARARGS},
- {"createcommand", Tkapp_CreateCommand, METH_VARARGS},
- {"deletecommand", Tkapp_DeleteCommand, METH_VARARGS},
-#ifdef HAVE_CREATEFILEHANDLER
- {"createfilehandler", Tkapp_CreateFileHandler, METH_VARARGS},
- {"deletefilehandler", Tkapp_DeleteFileHandler, METH_VARARGS},
-#endif
- {"createtimerhandler", Tkapp_CreateTimerHandler, METH_VARARGS},
- {"mainloop", Tkapp_MainLoop, METH_VARARGS},
- {"dooneevent", Tkapp_DoOneEvent, METH_VARARGS},
- {"quit", Tkapp_Quit, METH_VARARGS},
- {"interpaddr", Tkapp_InterpAddr, METH_VARARGS},
- {"loadtk", Tkapp_TkInit, METH_NOARGS},
- {NULL, NULL}
-};
+ self->dispatching = 1;
+ Py_RETURN_NONE;
+}
/**** Tkapp Type Methods ****/
@@ -2899,41 +3101,26 @@ Tkapp_Dealloc(PyObject *self)
DisableEventHook();
}
-static PyType_Slot Tkapp_Type_slots[] = {
- {Py_tp_dealloc, Tkapp_Dealloc},
- {Py_tp_methods, Tkapp_methods},
- {0, 0}
-};
-
-
-static PyType_Spec Tkapp_Type_spec = {
- "_tkinter.tkapp",
- sizeof(TkappObject),
- 0,
- Py_TPFLAGS_DEFAULT,
- Tkapp_Type_slots,
-};
-
/**** Tkinter Module ****/
typedef struct {
PyObject* tuple;
- int size; /* current size */
- int maxsize; /* allocated size */
+ Py_ssize_t size; /* current size */
+ Py_ssize_t maxsize; /* allocated size */
} FlattenContext;
static int
-_bump(FlattenContext* context, int size)
+_bump(FlattenContext* context, Py_ssize_t size)
{
/* expand tuple to hold (at least) size new items.
return true if successful, false if an exception was raised */
- int maxsize = context->maxsize * 2;
+ Py_ssize_t maxsize = context->maxsize * 2; /* never overflows */
if (maxsize < context->size + size)
- maxsize = context->size + size;
+ maxsize = context->size + size; /* never overflows */
context->maxsize = maxsize;
@@ -2945,41 +3132,21 @@ _flatten1(FlattenContext* context, PyObject* item, int depth)
{
/* add tuple or list to argument tuple (recursively) */
- int i, size;
+ Py_ssize_t i, size;
if (depth > 1000) {
PyErr_SetString(PyExc_ValueError,
"nesting too deep in _flatten");
return 0;
- } else if (PyList_Check(item)) {
- size = PyList_GET_SIZE(item);
+ } else if (PyTuple_Check(item) || PyList_Check(item)) {
+ size = PySequence_Fast_GET_SIZE(item);
/* preallocate (assume no nesting) */
if (context->size + size > context->maxsize &&
!_bump(context, size))
return 0;
/* copy items to output tuple */
for (i = 0; i < size; i++) {
- PyObject *o = PyList_GET_ITEM(item, i);
- if (PyList_Check(o) || PyTuple_Check(o)) {
- if (!_flatten1(context, o, depth + 1))
- return 0;
- } else if (o != Py_None) {
- if (context->size + 1 > context->maxsize &&
- !_bump(context, 1))
- return 0;
- Py_INCREF(o);
- PyTuple_SET_ITEM(context->tuple,
- context->size++, o);
- }
- }
- } else if (PyTuple_Check(item)) {
- /* same, for tuples */
- size = PyTuple_GET_SIZE(item);
- if (context->size + size > context->maxsize &&
- !_bump(context, size))
- return 0;
- for (i = 0; i < size; i++) {
- PyObject *o = PyTuple_GET_ITEM(item, i);
+ PyObject *o = PySequence_Fast_GET_ITEM(item, i);
if (PyList_Check(o) || PyTuple_Check(o)) {
if (!_flatten1(context, o, depth + 1))
return 0;
@@ -2999,14 +3166,19 @@ _flatten1(FlattenContext* context, PyObject* item, int depth)
return 1;
}
+/*[clinic input]
+_tkinter._flatten
+
+ item: object
+ /
+
+[clinic start generated code]*/
+
static PyObject *
-Tkinter_Flatten(PyObject* self, PyObject* args)
+_tkinter__flatten(PyModuleDef *module, PyObject *item)
+/*[clinic end generated code: output=9505049ec74c3480 input=6b9c12260aa1157f]*/
{
FlattenContext context;
- PyObject* item;
-
- if (!PyArg_ParseTuple(args, "O:_flatten", &item))
- return NULL;
context.maxsize = PySequence_Size(item);
if (context.maxsize < 0)
@@ -3029,26 +3201,33 @@ Tkinter_Flatten(PyObject* self, PyObject* args)
return context.tuple;
}
+/*[clinic input]
+_tkinter.create
+
+ screenName: str(accept={str, NoneType}) = NULL
+ baseName: str = NULL
+ className: str = "Tk"
+ interactive: int(c_default="0") = False
+ wantobjects: int(c_default="0") = False
+ wantTk: int(c_default="1") = True
+ if false, then Tk_Init() doesn't get called
+ sync: int(c_default="0") = False
+ if true, then pass -sync to wish
+ use: str(accept={str, NoneType}) = NULL
+ if not None, then pass -use to wish
+ /
+
+[clinic start generated code]*/
+
static PyObject *
-Tkinter_Create(PyObject *self, PyObject *args)
-{
- char *screenName = NULL;
- char *baseName = NULL; /* XXX this is not used anymore;
- try getting rid of it. */
- char *className = NULL;
- int interactive = 0;
- int wantobjects = 0;
- int wantTk = 1; /* If false, then Tk_Init() doesn't get called */
- int sync = 0; /* pass -sync to wish */
- char *use = NULL; /* pass -use to wish */
-
- className = "Tk";
-
- if (!PyArg_ParseTuple(args, "|zssiiiiz:create",
- &screenName, &baseName, &className,
- &interactive, &wantobjects, &wantTk,
- &sync, &use))
- return NULL;
+_tkinter_create_impl(PyModuleDef *module, const char *screenName,
+ const char *baseName, const char *className,
+ int interactive, int wantobjects, int wantTk, int sync,
+ const char *use)
+/*[clinic end generated code: output=b8847800fc3b27eb input=0d522aad1cb0ca0e]*/
+{
+ /* XXX baseName is not used anymore;
+ * try getting rid of it. */
CHECK_STRING_LENGTH(screenName);
CHECK_STRING_LENGTH(baseName);
CHECK_STRING_LENGTH(className);
@@ -3059,12 +3238,21 @@ Tkinter_Create(PyObject *self, PyObject *args)
sync, use);
}
+/*[clinic input]
+_tkinter.setbusywaitinterval
+
+ new_val: int
+ /
+
+Set the busy-wait interval in milliseconds between successive calls to Tcl_DoOneEvent in a threaded Python interpreter.
+
+It should be set to a divisor of the maximum time between frames in an animation.
+[clinic start generated code]*/
+
static PyObject *
-Tkinter_setbusywaitinterval(PyObject *self, PyObject *args)
+_tkinter_setbusywaitinterval_impl(PyModuleDef *module, int new_val)
+/*[clinic end generated code: output=0b9d7ef7940461ea input=deca1d6f9e6dae47]*/
{
- int new_val;
- if (!PyArg_ParseTuple(args, "i:setbusywaitinterval", &new_val))
- return NULL;
if (new_val < 0) {
PyErr_SetString(PyExc_ValueError,
"busywaitinterval must be >= 0");
@@ -3074,34 +3262,103 @@ Tkinter_setbusywaitinterval(PyObject *self, PyObject *args)
Py_RETURN_NONE;
}
-static char setbusywaitinterval_doc[] =
-"setbusywaitinterval(n) -> None\n\
-\n\
-Set the busy-wait interval in milliseconds between successive\n\
-calls to Tcl_DoOneEvent in a threaded Python interpreter.\n\
-It should be set to a divisor of the maximum time between\n\
-frames in an animation.";
+/*[clinic input]
+_tkinter.getbusywaitinterval -> int
-static PyObject *
-Tkinter_getbusywaitinterval(PyObject *self, PyObject *args)
+Return the current busy-wait interval between successive calls to Tcl_DoOneEvent in a threaded Python interpreter.
+[clinic start generated code]*/
+
+static int
+_tkinter_getbusywaitinterval_impl(PyModuleDef *module)
+/*[clinic end generated code: output=9d09eee026e96971 input=a695878d2d576a84]*/
{
- return PyLong_FromLong(Tkinter_busywaitinterval);
+ return Tkinter_busywaitinterval;
}
-static char getbusywaitinterval_doc[] =
-"getbusywaitinterval() -> int\n\
-\n\
-Return the current busy-wait interval between successive\n\
-calls to Tcl_DoOneEvent in a threaded Python interpreter.";
+#include "clinic/_tkinter.c.h"
+
+static PyMethodDef Tktt_methods[] =
+{
+ _TKINTER_TKTIMERTOKEN_DELETETIMERHANDLER_METHODDEF
+ {NULL, NULL}
+};
+
+static PyType_Slot Tktt_Type_slots[] = {
+ {Py_tp_dealloc, Tktt_Dealloc},
+ {Py_tp_repr, Tktt_Repr},
+ {Py_tp_methods, Tktt_methods},
+ {0, 0}
+};
+
+static PyType_Spec Tktt_Type_spec = {
+ "_tkinter.tktimertoken",
+ sizeof(TkttObject),
+ 0,
+ Py_TPFLAGS_DEFAULT,
+ Tktt_Type_slots,
+};
+
+
+/**** Tkapp Method List ****/
+
+static PyMethodDef Tkapp_methods[] =
+{
+ _TKINTER_TKAPP_WILLDISPATCH_METHODDEF
+ {"wantobjects", Tkapp_WantObjects, METH_VARARGS},
+ {"call", Tkapp_Call, METH_VARARGS},
+ _TKINTER_TKAPP_EVAL_METHODDEF
+ _TKINTER_TKAPP_EVALFILE_METHODDEF
+ _TKINTER_TKAPP_RECORD_METHODDEF
+ _TKINTER_TKAPP_ADDERRINFO_METHODDEF
+ {"setvar", Tkapp_SetVar, METH_VARARGS},
+ {"globalsetvar", Tkapp_GlobalSetVar, METH_VARARGS},
+ {"getvar", Tkapp_GetVar, METH_VARARGS},
+ {"globalgetvar", Tkapp_GlobalGetVar, METH_VARARGS},
+ {"unsetvar", Tkapp_UnsetVar, METH_VARARGS},
+ {"globalunsetvar", Tkapp_GlobalUnsetVar, METH_VARARGS},
+ _TKINTER_TKAPP_GETINT_METHODDEF
+ _TKINTER_TKAPP_GETDOUBLE_METHODDEF
+ _TKINTER_TKAPP_GETBOOLEAN_METHODDEF
+ _TKINTER_TKAPP_EXPRSTRING_METHODDEF
+ _TKINTER_TKAPP_EXPRLONG_METHODDEF
+ _TKINTER_TKAPP_EXPRDOUBLE_METHODDEF
+ _TKINTER_TKAPP_EXPRBOOLEAN_METHODDEF
+ _TKINTER_TKAPP_SPLITLIST_METHODDEF
+ _TKINTER_TKAPP_SPLIT_METHODDEF
+ _TKINTER_TKAPP_CREATECOMMAND_METHODDEF
+ _TKINTER_TKAPP_DELETECOMMAND_METHODDEF
+ _TKINTER_TKAPP_CREATEFILEHANDLER_METHODDEF
+ _TKINTER_TKAPP_DELETEFILEHANDLER_METHODDEF
+ _TKINTER_TKAPP_CREATETIMERHANDLER_METHODDEF
+ _TKINTER_TKAPP_MAINLOOP_METHODDEF
+ _TKINTER_TKAPP_DOONEEVENT_METHODDEF
+ _TKINTER_TKAPP_QUIT_METHODDEF
+ _TKINTER_TKAPP_INTERPADDR_METHODDEF
+ _TKINTER_TKAPP_LOADTK_METHODDEF
+ {NULL, NULL}
+};
+
+static PyType_Slot Tkapp_Type_slots[] = {
+ {Py_tp_dealloc, Tkapp_Dealloc},
+ {Py_tp_methods, Tkapp_methods},
+ {0, 0}
+};
+
+
+static PyType_Spec Tkapp_Type_spec = {
+ "_tkinter.tkapp",
+ sizeof(TkappObject),
+ 0,
+ Py_TPFLAGS_DEFAULT,
+ Tkapp_Type_slots,
+};
static PyMethodDef moduleMethods[] =
{
- {"_flatten", Tkinter_Flatten, METH_VARARGS},
- {"create", Tkinter_Create, METH_VARARGS},
- {"setbusywaitinterval",Tkinter_setbusywaitinterval, METH_VARARGS,
- setbusywaitinterval_doc},
- {"getbusywaitinterval",(PyCFunction)Tkinter_getbusywaitinterval,
- METH_NOARGS, getbusywaitinterval_doc},
+ _TKINTER__FLATTEN_METHODDEF
+ _TKINTER_CREATE_METHODDEF
+ _TKINTER_SETBUSYWAITINTERVAL_METHODDEF
+ _TKINTER_GETBUSYWAITINTERVAL_METHODDEF
{NULL, NULL}
};
@@ -3294,6 +3551,7 @@ PyInit__tkinter(void)
Py_DECREF(m);
return NULL;
}
+ ((PyTypeObject *)o)->tp_new = NULL;
if (PyModule_AddObject(m, "TkappType", o)) {
Py_DECREF(o);
Py_DECREF(m);
@@ -3306,6 +3564,7 @@ PyInit__tkinter(void)
Py_DECREF(m);
return NULL;
}
+ ((PyTypeObject *)o)->tp_new = NULL;
if (PyModule_AddObject(m, "TkttType", o)) {
Py_DECREF(o);
Py_DECREF(m);
@@ -3318,6 +3577,7 @@ PyInit__tkinter(void)
Py_DECREF(m);
return NULL;
}
+ ((PyTypeObject *)o)->tp_new = NULL;
if (PyModule_AddObject(m, "Tcl_Obj", o)) {
Py_DECREF(o);
Py_DECREF(m);
@@ -3345,8 +3605,40 @@ PyInit__tkinter(void)
uexe = PyUnicode_FromWideChar(Py_GetProgramName(), -1);
if (uexe) {
cexe = PyUnicode_EncodeFSDefault(uexe);
- if (cexe)
+ if (cexe) {
+#ifdef MS_WINDOWS
+ int set_var = 0;
+ PyObject *str_path;
+ wchar_t *wcs_path;
+ DWORD ret;
+
+ ret = GetEnvironmentVariableW(L"TCL_LIBRARY", NULL, 0);
+
+ if (!ret && GetLastError() == ERROR_ENVVAR_NOT_FOUND) {
+ str_path = _get_tcl_lib_path();
+ if (str_path == NULL && PyErr_Occurred()) {
+ return NULL;
+ }
+ if (str_path != NULL) {
+ wcs_path = PyUnicode_AsWideCharString(str_path, NULL);
+ if (wcs_path == NULL) {
+ return NULL;
+ }
+ SetEnvironmentVariableW(L"TCL_LIBRARY", wcs_path);
+ set_var = 1;
+ }
+ }
+
Tcl_FindExecutable(PyBytes_AsString(cexe));
+
+ if (set_var) {
+ SetEnvironmentVariableW(L"TCL_LIBRARY", NULL);
+ PyMem_Free(wcs_path);
+ }
+#else
+ Tcl_FindExecutable(PyBytes_AsString(cexe));
+#endif /* MS_WINDOWS */
+ }
Py_XDECREF(cexe);
Py_DECREF(uexe);
}
diff --git a/Modules/_tracemalloc.c b/Modules/_tracemalloc.c
index 409f4dbdd5..796ac0fa33 100644
--- a/Modules/_tracemalloc.c
+++ b/Modules/_tracemalloc.c
@@ -16,14 +16,11 @@ static void raw_free(void *ptr);
# define TRACE_DEBUG
#endif
-#define _STR(VAL) #VAL
-#define STR(VAL) _STR(VAL)
-
/* Protected by the GIL */
static struct {
- PyMemAllocator mem;
- PyMemAllocator raw;
- PyMemAllocator obj;
+ PyMemAllocatorEx mem;
+ PyMemAllocatorEx raw;
+ PyMemAllocatorEx obj;
} allocators;
static struct {
@@ -69,7 +66,7 @@ _declspec(align(4))
#endif
{
PyObject *filename;
- int lineno;
+ unsigned int lineno;
} frame_t;
typedef struct {
@@ -82,7 +79,7 @@ typedef struct {
(sizeof(traceback_t) + sizeof(frame_t) * (NFRAME - 1))
#define MAX_NFRAME \
- ((INT_MAX - sizeof(traceback_t)) / sizeof(frame_t) + 1)
+ ((INT_MAX - (int)sizeof(traceback_t)) / (int)sizeof(frame_t) + 1)
static PyObject *unknown_filename = NULL;
static traceback_t tracemalloc_empty_traceback;
@@ -192,7 +189,7 @@ get_reentrant(void)
static void
set_reentrant(int reentrant)
{
- assert(!reentrant || !get_reentrant());
+ assert(reentrant != tracemalloc_reentrant);
tracemalloc_reentrant = reentrant;
}
#endif
@@ -269,12 +266,13 @@ tracemalloc_get_frame(PyFrameObject *pyframe, frame_t *frame)
PyCodeObject *code;
PyObject *filename;
_Py_hashtable_entry_t *entry;
+ int lineno;
frame->filename = unknown_filename;
- frame->lineno = PyFrame_GetLineNumber(pyframe);
- assert(frame->lineno >= 0);
- if (frame->lineno < 0)
- frame->lineno = 0;
+ lineno = PyFrame_GetLineNumber(pyframe);
+ if (lineno < 0)
+ lineno = 0;
+ frame->lineno = (unsigned int)lineno;
code = pyframe->f_code;
if (code == NULL) {
@@ -298,7 +296,7 @@ tracemalloc_get_frame(PyFrameObject *pyframe, frame_t *frame)
if (!PyUnicode_Check(filename)) {
#ifdef TRACE_DEBUG
- tracemalloc_error("filename is not an unicode string");
+ tracemalloc_error("filename is not a unicode string");
#endif
return;
}
@@ -378,7 +376,6 @@ traceback_get_frames(traceback_t *traceback)
for (pyframe = tstate->frame; pyframe != NULL; pyframe = pyframe->f_back) {
tracemalloc_get_frame(pyframe, &traceback->frames[traceback->nframe]);
assert(traceback->frames[traceback->nframe].filename != NULL);
- assert(traceback->frames[traceback->nframe].lineno >= 0);
traceback->nframe++;
if (traceback->nframe == tracemalloc_config.max_nframe)
break;
@@ -476,17 +473,22 @@ tracemalloc_remove_trace(void *ptr)
}
static void*
-tracemalloc_malloc(void *ctx, size_t size)
+tracemalloc_alloc(int use_calloc, void *ctx, size_t nelem, size_t elsize)
{
- PyMemAllocator *alloc = (PyMemAllocator *)ctx;
+ PyMemAllocatorEx *alloc = (PyMemAllocatorEx *)ctx;
void *ptr;
- ptr = alloc->malloc(alloc->ctx, size);
+ assert(elsize == 0 || nelem <= PY_SIZE_MAX / elsize);
+
+ if (use_calloc)
+ ptr = alloc->calloc(alloc->ctx, nelem, elsize);
+ else
+ ptr = alloc->malloc(alloc->ctx, nelem * elsize);
if (ptr == NULL)
return NULL;
TABLES_LOCK();
- if (tracemalloc_add_trace(ptr, size) < 0) {
+ if (tracemalloc_add_trace(ptr, nelem * elsize) < 0) {
/* Failed to allocate a trace for the new memory block */
TABLES_UNLOCK();
alloc->free(alloc->ctx, ptr);
@@ -499,7 +501,7 @@ tracemalloc_malloc(void *ctx, size_t size)
static void*
tracemalloc_realloc(void *ctx, void *ptr, size_t new_size)
{
- PyMemAllocator *alloc = (PyMemAllocator *)ctx;
+ PyMemAllocatorEx *alloc = (PyMemAllocatorEx *)ctx;
void *ptr2;
ptr2 = alloc->realloc(alloc->ctx, ptr, new_size);
@@ -517,7 +519,7 @@ tracemalloc_realloc(void *ctx, void *ptr, size_t new_size)
the caller, because realloc() may already have shrinked the
memory block and so removed bytes.
- This case is very unlikely: an hash entry has just been
+ This case is very unlikely: a hash entry has just been
released, so the hash table should have at least one free entry.
The GIL and the table lock ensures that only one thread is
@@ -544,7 +546,7 @@ tracemalloc_realloc(void *ctx, void *ptr, size_t new_size)
static void
tracemalloc_free(void *ctx, void *ptr)
{
- PyMemAllocator *alloc = (PyMemAllocator *)ctx;
+ PyMemAllocatorEx *alloc = (PyMemAllocatorEx *)ctx;
if (ptr == NULL)
return;
@@ -560,13 +562,16 @@ tracemalloc_free(void *ctx, void *ptr)
}
static void*
-tracemalloc_malloc_gil(void *ctx, size_t size)
+tracemalloc_alloc_gil(int use_calloc, void *ctx, size_t nelem, size_t elsize)
{
void *ptr;
if (get_reentrant()) {
- PyMemAllocator *alloc = (PyMemAllocator *)ctx;
- return alloc->malloc(alloc->ctx, size);
+ PyMemAllocatorEx *alloc = (PyMemAllocatorEx *)ctx;
+ if (use_calloc)
+ return alloc->calloc(alloc->ctx, nelem, elsize);
+ else
+ return alloc->malloc(alloc->ctx, nelem * elsize);
}
/* Ignore reentrant call. PyObjet_Malloc() calls PyMem_Malloc() for
@@ -574,13 +579,25 @@ tracemalloc_malloc_gil(void *ctx, size_t size)
allocation twice. */
set_reentrant(1);
- ptr = tracemalloc_malloc(ctx, size);
+ ptr = tracemalloc_alloc(use_calloc, ctx, nelem, elsize);
set_reentrant(0);
return ptr;
}
static void*
+tracemalloc_malloc_gil(void *ctx, size_t size)
+{
+ return tracemalloc_alloc_gil(0, ctx, 1, size);
+}
+
+static void*
+tracemalloc_calloc_gil(void *ctx, size_t nelem, size_t elsize)
+{
+ return tracemalloc_alloc_gil(1, ctx, nelem, elsize);
+}
+
+static void*
tracemalloc_realloc_gil(void *ctx, void *ptr, size_t new_size)
{
void *ptr2;
@@ -590,7 +607,7 @@ tracemalloc_realloc_gil(void *ctx, void *ptr, size_t new_size)
Example: PyMem_RawRealloc() is called internally by pymalloc
(_PyObject_Malloc() and _PyObject_Realloc()) to allocate a new
arena (new_arena()). */
- PyMemAllocator *alloc = (PyMemAllocator *)ctx;
+ PyMemAllocatorEx *alloc = (PyMemAllocatorEx *)ctx;
ptr2 = alloc->realloc(alloc->ctx, ptr, new_size);
if (ptr2 != NULL && ptr != NULL) {
@@ -614,7 +631,7 @@ tracemalloc_realloc_gil(void *ctx, void *ptr, size_t new_size)
#ifdef TRACE_RAW_MALLOC
static void*
-tracemalloc_raw_malloc(void *ctx, size_t size)
+tracemalloc_raw_alloc(int use_calloc, void *ctx, size_t nelem, size_t elsize)
{
#ifdef WITH_THREAD
PyGILState_STATE gil_state;
@@ -622,8 +639,11 @@ tracemalloc_raw_malloc(void *ctx, size_t size)
void *ptr;
if (get_reentrant()) {
- PyMemAllocator *alloc = (PyMemAllocator *)ctx;
- return alloc->malloc(alloc->ctx, size);
+ PyMemAllocatorEx *alloc = (PyMemAllocatorEx *)ctx;
+ if (use_calloc)
+ return alloc->calloc(alloc->ctx, nelem, elsize);
+ else
+ return alloc->malloc(alloc->ctx, nelem * elsize);
}
/* Ignore reentrant call. PyGILState_Ensure() may call PyMem_RawMalloc()
@@ -633,10 +653,10 @@ tracemalloc_raw_malloc(void *ctx, size_t size)
#ifdef WITH_THREAD
gil_state = PyGILState_Ensure();
- ptr = tracemalloc_malloc(ctx, size);
+ ptr = tracemalloc_alloc(use_calloc, ctx, nelem, elsize);
PyGILState_Release(gil_state);
#else
- ptr = tracemalloc_malloc(ctx, size);
+ ptr = tracemalloc_alloc(use_calloc, ctx, nelem, elsize);
#endif
set_reentrant(0);
@@ -644,6 +664,18 @@ tracemalloc_raw_malloc(void *ctx, size_t size)
}
static void*
+tracemalloc_raw_malloc(void *ctx, size_t size)
+{
+ return tracemalloc_raw_alloc(0, ctx, 1, size);
+}
+
+static void*
+tracemalloc_raw_calloc(void *ctx, size_t nelem, size_t elsize)
+{
+ return tracemalloc_raw_alloc(1, ctx, nelem, elsize);
+}
+
+static void*
tracemalloc_raw_realloc(void *ctx, void *ptr, size_t new_size)
{
#ifdef WITH_THREAD
@@ -653,7 +685,7 @@ tracemalloc_raw_realloc(void *ctx, void *ptr, size_t new_size)
if (get_reentrant()) {
/* Reentrant call to PyMem_RawRealloc(). */
- PyMemAllocator *alloc = (PyMemAllocator *)ctx;
+ PyMemAllocatorEx *alloc = (PyMemAllocatorEx *)ctx;
ptr2 = alloc->realloc(alloc->ctx, ptr, new_size);
@@ -708,10 +740,6 @@ tracemalloc_clear_traces(void)
assert(PyGILState_Check());
#endif
- /* Disable also reentrant calls to tracemalloc_malloc() to not add a new
- trace while we are clearing traces */
- assert(get_reentrant());
-
TABLES_LOCK();
_Py_hashtable_clear(tracemalloc_traces);
tracemalloc_traced_memory = 0;
@@ -791,11 +819,6 @@ tracemalloc_init(void)
tracemalloc_empty_traceback.frames[0].lineno = 0;
tracemalloc_empty_traceback.hash = traceback_hash(&tracemalloc_empty_traceback);
- /* Disable tracing allocations until hooks are installed. Set
- also the reentrant flag to detect bugs: fail with an assertion error
- if set_reentrant(1) is called while tracing is disabled. */
- set_reentrant(1);
-
tracemalloc_config.initialized = TRACEMALLOC_INITIALIZED;
return 0;
}
@@ -831,7 +854,7 @@ tracemalloc_deinit(void)
static int
tracemalloc_start(int max_nframe)
{
- PyMemAllocator alloc;
+ PyMemAllocatorEx alloc;
size_t size;
if (tracemalloc_init() < 0)
@@ -856,6 +879,7 @@ tracemalloc_start(int max_nframe)
#ifdef TRACE_RAW_MALLOC
alloc.malloc = tracemalloc_raw_malloc;
+ alloc.calloc = tracemalloc_raw_calloc;
alloc.realloc = tracemalloc_raw_realloc;
alloc.free = tracemalloc_free;
@@ -865,6 +889,7 @@ tracemalloc_start(int max_nframe)
#endif
alloc.malloc = tracemalloc_malloc_gil;
+ alloc.calloc = tracemalloc_calloc_gil;
alloc.realloc = tracemalloc_realloc_gil;
alloc.free = tracemalloc_free;
@@ -878,7 +903,6 @@ tracemalloc_start(int max_nframe)
/* everything is ready: start tracing Python memory allocations */
tracemalloc_config.tracing = 1;
- set_reentrant(0);
return 0;
}
@@ -892,10 +916,6 @@ tracemalloc_stop(void)
/* stop tracing Python memory allocations */
tracemalloc_config.tracing = 0;
- /* set the reentrant flag to detect bugs: fail with an assertion error if
- set_reentrant(1) is called while tracing is disabled. */
- set_reentrant(1);
-
/* unregister the hook on memory allocators */
#ifdef TRACE_RAW_MALLOC
PyMem_SetAllocator(PYMEM_DOMAIN_RAW, &allocators.raw);
@@ -909,15 +929,6 @@ tracemalloc_stop(void)
tracemalloc_traceback = NULL;
}
-static PyObject*
-lineno_as_obj(int lineno)
-{
- if (lineno >= 0)
- return PyLong_FromLong(lineno);
- else
- Py_RETURN_NONE;
-}
-
PyDoc_STRVAR(tracemalloc_is_tracing_doc,
"is_tracing()->bool\n"
"\n"
@@ -962,8 +973,7 @@ frame_to_pyobject(frame_t *frame)
Py_INCREF(frame->filename);
PyTuple_SET_ITEM(frame_obj, 0, frame->filename);
- assert(frame->lineno >= 0);
- lineno_obj = lineno_as_obj(frame->lineno);
+ lineno_obj = PyLong_FromUnsignedLong(frame->lineno);
if (lineno_obj == NULL) {
Py_DECREF(frame_obj);
return NULL;
@@ -1195,7 +1205,7 @@ py_tracemalloc_start(PyObject *self, PyObject *args)
if (nframe < 1 || nframe > MAX_NFRAME) {
PyErr_Format(PyExc_ValueError,
"the number of frames must be in range [1; %i]",
- (int)MAX_NFRAME);
+ MAX_NFRAME);
return NULL;
}
nframe_int = Py_SAFE_DOWNCAST(nframe, Py_ssize_t, int);
diff --git a/Modules/_weakref.c b/Modules/_weakref.c
index da589314ea..7c99d7e786 100644
--- a/Modules/_weakref.c
+++ b/Modules/_weakref.c
@@ -9,6 +9,8 @@ module _weakref
[clinic start generated code]*/
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=ffec73b85846596d]*/
+#include "clinic/_weakref.c.h"
+
/*[clinic input]
_weakref.getweakrefcount -> Py_ssize_t
@@ -19,36 +21,9 @@ _weakref.getweakrefcount -> Py_ssize_t
Return the number of weak references to 'object'.
[clinic start generated code]*/
-PyDoc_STRVAR(_weakref_getweakrefcount__doc__,
-"getweakrefcount($module, object, /)\n"
-"--\n"
-"\n"
-"Return the number of weak references to \'object\'.");
-
-#define _WEAKREF_GETWEAKREFCOUNT_METHODDEF \
- {"getweakrefcount", (PyCFunction)_weakref_getweakrefcount, METH_O, _weakref_getweakrefcount__doc__},
-
-static Py_ssize_t
-_weakref_getweakrefcount_impl(PyModuleDef *module, PyObject *object);
-
-static PyObject *
-_weakref_getweakrefcount(PyModuleDef *module, PyObject *object)
-{
- PyObject *return_value = NULL;
- Py_ssize_t _return_value;
-
- _return_value = _weakref_getweakrefcount_impl(module, object);
- if ((_return_value == -1) && PyErr_Occurred())
- goto exit;
- return_value = PyLong_FromSsize_t(_return_value);
-
-exit:
- return return_value;
-}
-
static Py_ssize_t
_weakref_getweakrefcount_impl(PyModuleDef *module, PyObject *object)
-/*[clinic end generated code: output=032eedbfd7d69e10 input=cedb69711b6a2507]*/
+/*[clinic end generated code: output=6a6ad0b98285e468 input=cedb69711b6a2507]*/
{
PyWeakReference **list;
diff --git a/Modules/_winapi.c b/Modules/_winapi.c
index d472c9ee53..3e7f18741f 100644
--- a/Modules/_winapi.c
+++ b/Modules/_winapi.c
@@ -40,6 +40,7 @@
#define WINDOWS_LEAN_AND_MEAN
#include "windows.h"
#include <crtdbg.h>
+#include "winreparse.h"
#if defined(MS_WIN32) && !defined(MS_WIN64)
#define HANDLE_TO_PYNUM(handle) \
@@ -57,8 +58,6 @@
#define F_HANDLE F_POINTER
#define F_DWORD "k"
-#define F_BOOL "i"
-#define F_UINT "I"
#define T_HANDLE T_POINTER
@@ -146,17 +145,68 @@ overlapped_dealloc(OverlappedObject *self)
PyObject_Del(self);
}
+/*[clinic input]
+module _winapi
+class _winapi.Overlapped "OverlappedObject *" "&OverlappedType"
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=c13d3f5fd1dabb84]*/
+
+/*[python input]
+def create_converter(type_, format_unit):
+ name = type_ + '_converter'
+ # registered upon creation by CConverter's metaclass
+ type(name, (CConverter,), {'type': type_, 'format_unit': format_unit})
+
+# format unit differs between platforms for these
+create_converter('HANDLE', '" F_HANDLE "')
+create_converter('HMODULE', '" F_HANDLE "')
+create_converter('LPSECURITY_ATTRIBUTES', '" F_POINTER "')
+
+create_converter('BOOL', 'i') # F_BOOL used previously (always 'i')
+create_converter('DWORD', 'k') # F_DWORD is always "k" (which is much shorter)
+create_converter('LPCTSTR', 's')
+create_converter('LPWSTR', 'u')
+create_converter('UINT', 'I') # F_UINT used previously (always 'I')
+
+class HANDLE_return_converter(CReturnConverter):
+ type = 'HANDLE'
+
+ def render(self, function, data):
+ self.declare(data)
+ self.err_occurred_if("_return_value == INVALID_HANDLE_VALUE", data)
+ data.return_conversion.append(
+ 'if (_return_value == NULL)\n Py_RETURN_NONE;\n')
+ data.return_conversion.append(
+ 'return_value = HANDLE_TO_PYNUM(_return_value);\n')
+
+class DWORD_return_converter(CReturnConverter):
+ type = 'DWORD'
+
+ def render(self, function, data):
+ self.declare(data)
+ self.err_occurred_if("_return_value == DWORD_MAX", data)
+ data.return_conversion.append(
+ 'return_value = Py_BuildValue("k", _return_value);\n')
+[python start generated code]*/
+/*[python end generated code: output=da39a3ee5e6b4b0d input=374076979596ebba]*/
+
+#include "clinic/_winapi.c.h"
+
+/*[clinic input]
+_winapi.Overlapped.GetOverlappedResult
+
+ wait: bool
+ /
+[clinic start generated code]*/
+
static PyObject *
-overlapped_GetOverlappedResult(OverlappedObject *self, PyObject *waitobj)
+_winapi_Overlapped_GetOverlappedResult_impl(OverlappedObject *self, int wait)
+/*[clinic end generated code: output=bdd0c1ed6518cd03 input=194505ee8e0e3565]*/
{
- int wait;
BOOL res;
DWORD transferred = 0;
DWORD err;
- wait = PyObject_IsTrue(waitobj);
- if (wait < 0)
- return NULL;
Py_BEGIN_ALLOW_THREADS
res = GetOverlappedResult(self->handle, &self->overlapped, &transferred,
wait != 0);
@@ -185,8 +235,13 @@ overlapped_GetOverlappedResult(OverlappedObject *self, PyObject *waitobj)
return Py_BuildValue("II", (unsigned) transferred, (unsigned) err);
}
+/*[clinic input]
+_winapi.Overlapped.getbuffer
+[clinic start generated code]*/
+
static PyObject *
-overlapped_getbuffer(OverlappedObject *self)
+_winapi_Overlapped_getbuffer_impl(OverlappedObject *self)
+/*[clinic end generated code: output=95a3eceefae0f748 input=347fcfd56b4ceabd]*/
{
PyObject *res;
if (!self->completed) {
@@ -200,8 +255,13 @@ overlapped_getbuffer(OverlappedObject *self)
return res;
}
+/*[clinic input]
+_winapi.Overlapped.cancel
+[clinic start generated code]*/
+
static PyObject *
-overlapped_cancel(OverlappedObject *self)
+_winapi_Overlapped_cancel_impl(OverlappedObject *self)
+/*[clinic end generated code: output=fcb9ab5df4ebdae5 input=cbf3da142290039f]*/
{
BOOL res = TRUE;
@@ -222,10 +282,9 @@ overlapped_cancel(OverlappedObject *self)
}
static PyMethodDef overlapped_methods[] = {
- {"GetOverlappedResult", (PyCFunction) overlapped_GetOverlappedResult,
- METH_O, NULL},
- {"getbuffer", (PyCFunction) overlapped_getbuffer, METH_NOARGS, NULL},
- {"cancel", (PyCFunction) overlapped_cancel, METH_NOARGS, NULL},
+ _WINAPI_OVERLAPPED_GETOVERLAPPEDRESULT_METHODDEF
+ _WINAPI_OVERLAPPED_GETBUFFER_METHODDEF
+ _WINAPI_OVERLAPPED_CANCEL_METHODDEF
{NULL}
};
@@ -299,22 +358,23 @@ new_overlapped(HANDLE handle)
/* -------------------------------------------------------------------- */
/* windows API functions */
-PyDoc_STRVAR(CloseHandle_doc,
-"CloseHandle(handle) -> None\n\
-\n\
-Close handle.");
+/*[clinic input]
+_winapi.CloseHandle
+
+ handle: HANDLE
+ /
+
+Close handle.
+[clinic start generated code]*/
static PyObject *
-winapi_CloseHandle(PyObject *self, PyObject *args)
+_winapi_CloseHandle_impl(PyModuleDef *module, HANDLE handle)
+/*[clinic end generated code: output=0548595c71cb4bf7 input=7f0e4ac36e0352b8]*/
{
- HANDLE hObject;
BOOL success;
- if (!PyArg_ParseTuple(args, F_HANDLE ":CloseHandle", &hObject))
- return NULL;
-
Py_BEGIN_ALLOW_THREADS
- success = CloseHandle(hObject);
+ success = CloseHandle(handle);
Py_END_ALLOW_THREADS
if (!success)
@@ -323,28 +383,29 @@ winapi_CloseHandle(PyObject *self, PyObject *args)
Py_RETURN_NONE;
}
+/*[clinic input]
+_winapi.ConnectNamedPipe
+
+ handle: HANDLE
+ overlapped as use_overlapped: int(c_default='0') = False
+[clinic start generated code]*/
+
static PyObject *
-winapi_ConnectNamedPipe(PyObject *self, PyObject *args, PyObject *kwds)
+_winapi_ConnectNamedPipe_impl(PyModuleDef *module, HANDLE handle,
+ int use_overlapped)
+/*[clinic end generated code: output=fed3b165d1bca95a input=edc83da007ebf3be]*/
{
- HANDLE hNamedPipe;
- int use_overlapped = 0;
BOOL success;
OverlappedObject *overlapped = NULL;
- static char *kwlist[] = {"handle", "overlapped", NULL};
-
- if (!PyArg_ParseTupleAndKeywords(args, kwds,
- F_HANDLE "|" F_BOOL, kwlist,
- &hNamedPipe, &use_overlapped))
- return NULL;
if (use_overlapped) {
- overlapped = new_overlapped(hNamedPipe);
+ overlapped = new_overlapped(handle);
if (!overlapped)
return NULL;
}
Py_BEGIN_ALLOW_THREADS
- success = ConnectNamedPipe(hNamedPipe,
+ success = ConnectNamedPipe(handle,
overlapped ? &overlapped->overlapped : NULL);
Py_END_ALLOW_THREADS
@@ -368,94 +429,238 @@ winapi_ConnectNamedPipe(PyObject *self, PyObject *args, PyObject *kwds)
Py_RETURN_NONE;
}
-static PyObject *
-winapi_CreateFile(PyObject *self, PyObject *args)
+/*[clinic input]
+_winapi.CreateFile -> HANDLE
+
+ file_name: LPCTSTR
+ desired_access: DWORD
+ share_mode: DWORD
+ security_attributes: LPSECURITY_ATTRIBUTES
+ creation_disposition: DWORD
+ flags_and_attributes: DWORD
+ template_file: HANDLE
+ /
+[clinic start generated code]*/
+
+static HANDLE
+_winapi_CreateFile_impl(PyModuleDef *module, LPCTSTR file_name,
+ DWORD desired_access, DWORD share_mode,
+ LPSECURITY_ATTRIBUTES security_attributes,
+ DWORD creation_disposition,
+ DWORD flags_and_attributes, HANDLE template_file)
+/*[clinic end generated code: output=c6e1d78f8affd10c input=6423c3e40372dbd5]*/
{
- LPCTSTR lpFileName;
- DWORD dwDesiredAccess;
- DWORD dwShareMode;
- LPSECURITY_ATTRIBUTES lpSecurityAttributes;
- DWORD dwCreationDisposition;
- DWORD dwFlagsAndAttributes;
- HANDLE hTemplateFile;
HANDLE handle;
- if (!PyArg_ParseTuple(args, "s" F_DWORD F_DWORD F_POINTER
- F_DWORD F_DWORD F_HANDLE,
- &lpFileName, &dwDesiredAccess, &dwShareMode,
- &lpSecurityAttributes, &dwCreationDisposition,
- &dwFlagsAndAttributes, &hTemplateFile))
- return NULL;
-
Py_BEGIN_ALLOW_THREADS
- handle = CreateFile(lpFileName, dwDesiredAccess,
- dwShareMode, lpSecurityAttributes,
- dwCreationDisposition,
- dwFlagsAndAttributes, hTemplateFile);
+ handle = CreateFile(file_name, desired_access,
+ share_mode, security_attributes,
+ creation_disposition,
+ flags_and_attributes, template_file);
Py_END_ALLOW_THREADS
if (handle == INVALID_HANDLE_VALUE)
- return PyErr_SetFromWindowsErr(0);
+ PyErr_SetFromWindowsErr(0);
- return Py_BuildValue(F_HANDLE, handle);
+ return handle;
}
+/*[clinic input]
+_winapi.CreateJunction
+
+ src_path: LPWSTR
+ dst_path: LPWSTR
+ /
+[clinic start generated code]*/
+
static PyObject *
-winapi_CreateNamedPipe(PyObject *self, PyObject *args)
+_winapi_CreateJunction_impl(PyModuleDef *module, LPWSTR src_path,
+ LPWSTR dst_path)
+/*[clinic end generated code: output=eccae9364e46f6da input=8cd1f9964b6e3d36]*/
{
- LPCTSTR lpName;
- DWORD dwOpenMode;
- DWORD dwPipeMode;
- DWORD nMaxInstances;
- DWORD nOutBufferSize;
- DWORD nInBufferSize;
- DWORD nDefaultTimeOut;
- LPSECURITY_ATTRIBUTES lpSecurityAttributes;
- HANDLE handle;
+ /* Privilege adjustment */
+ HANDLE token = NULL;
+ TOKEN_PRIVILEGES tp;
+
+ /* Reparse data buffer */
+ const USHORT prefix_len = 4;
+ USHORT print_len = 0;
+ USHORT rdb_size = 0;
+ PREPARSE_DATA_BUFFER rdb = NULL;
+
+ /* Junction point creation */
+ HANDLE junction = NULL;
+ DWORD ret = 0;
+
+ if (src_path == NULL || dst_path == NULL)
+ return PyErr_SetFromWindowsErr(ERROR_INVALID_PARAMETER);
+
+ if (wcsncmp(src_path, L"\\??\\", prefix_len) == 0)
+ return PyErr_SetFromWindowsErr(ERROR_INVALID_PARAMETER);
+
+ /* Adjust privileges to allow rewriting directory entry as a
+ junction point. */
+ if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &token))
+ goto cleanup;
+
+ if (!LookupPrivilegeValue(NULL, SE_RESTORE_NAME, &tp.Privileges[0].Luid))
+ goto cleanup;
+
+ tp.PrivilegeCount = 1;
+ tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
+ if (!AdjustTokenPrivileges(token, FALSE, &tp, sizeof(TOKEN_PRIVILEGES),
+ NULL, NULL))
+ goto cleanup;
+
+ if (GetFileAttributesW(src_path) == INVALID_FILE_ATTRIBUTES)
+ goto cleanup;
+
+ /* Store the absolute link target path length in print_len. */
+ print_len = (USHORT)GetFullPathNameW(src_path, 0, NULL, NULL);
+ if (print_len == 0)
+ goto cleanup;
+
+ /* NUL terminator should not be part of print_len. */
+ --print_len;
+
+ /* REPARSE_DATA_BUFFER usage is heavily under-documented, especially for
+ junction points. Here's what I've learned along the way:
+ - A junction point has two components: a print name and a substitute
+ name. They both describe the link target, but the substitute name is
+ the physical target and the print name is shown in directory listings.
+ - The print name must be a native name, prefixed with "\??\".
+ - Both names are stored after each other in the same buffer (the
+ PathBuffer) and both must be NUL-terminated.
+ - There are four members defining their respective offset and length
+ inside PathBuffer: SubstituteNameOffset, SubstituteNameLength,
+ PrintNameOffset and PrintNameLength.
+ - The total size we need to allocate for the REPARSE_DATA_BUFFER, thus,
+ is the sum of:
+ - the fixed header size (REPARSE_DATA_BUFFER_HEADER_SIZE)
+ - the size of the MountPointReparseBuffer member without the PathBuffer
+ - the size of the prefix ("\??\") in bytes
+ - the size of the print name in bytes
+ - the size of the substitute name in bytes
+ - the size of two NUL terminators in bytes */
+ rdb_size = REPARSE_DATA_BUFFER_HEADER_SIZE +
+ sizeof(rdb->MountPointReparseBuffer) -
+ sizeof(rdb->MountPointReparseBuffer.PathBuffer) +
+ /* Two +1's for NUL terminators. */
+ (prefix_len + print_len + 1 + print_len + 1) * sizeof(WCHAR);
+ rdb = (PREPARSE_DATA_BUFFER)PyMem_RawMalloc(rdb_size);
+ if (rdb == NULL)
+ goto cleanup;
+
+ memset(rdb, 0, rdb_size);
+ rdb->ReparseTag = IO_REPARSE_TAG_MOUNT_POINT;
+ rdb->ReparseDataLength = rdb_size - REPARSE_DATA_BUFFER_HEADER_SIZE;
+ rdb->MountPointReparseBuffer.SubstituteNameOffset = 0;
+ rdb->MountPointReparseBuffer.SubstituteNameLength =
+ (prefix_len + print_len) * sizeof(WCHAR);
+ rdb->MountPointReparseBuffer.PrintNameOffset =
+ rdb->MountPointReparseBuffer.SubstituteNameLength + sizeof(WCHAR);
+ rdb->MountPointReparseBuffer.PrintNameLength = print_len * sizeof(WCHAR);
+
+ /* Store the full native path of link target at the substitute name
+ offset (0). */
+ wcscpy(rdb->MountPointReparseBuffer.PathBuffer, L"\\??\\");
+ if (GetFullPathNameW(src_path, print_len + 1,
+ rdb->MountPointReparseBuffer.PathBuffer + prefix_len,
+ NULL) == 0)
+ goto cleanup;
+
+ /* Copy everything but the native prefix to the print name offset. */
+ wcscpy(rdb->MountPointReparseBuffer.PathBuffer +
+ prefix_len + print_len + 1,
+ rdb->MountPointReparseBuffer.PathBuffer + prefix_len);
+
+ /* Create a directory for the junction point. */
+ if (!CreateDirectoryW(dst_path, NULL))
+ goto cleanup;
+
+ junction = CreateFileW(dst_path, GENERIC_READ | GENERIC_WRITE, 0, NULL,
+ OPEN_EXISTING,
+ FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS, NULL);
+ if (junction == INVALID_HANDLE_VALUE)
+ goto cleanup;
+
+ /* Make the directory entry a junction point. */
+ if (!DeviceIoControl(junction, FSCTL_SET_REPARSE_POINT, rdb, rdb_size,
+ NULL, 0, &ret, NULL))
+ goto cleanup;
+
+cleanup:
+ ret = GetLastError();
+
+ CloseHandle(token);
+ CloseHandle(junction);
+ PyMem_RawFree(rdb);
+
+ if (ret != 0)
+ return PyErr_SetFromWindowsErr(ret);
- if (!PyArg_ParseTuple(args, "s" F_DWORD F_DWORD F_DWORD
- F_DWORD F_DWORD F_DWORD F_POINTER,
- &lpName, &dwOpenMode, &dwPipeMode,
- &nMaxInstances, &nOutBufferSize,
- &nInBufferSize, &nDefaultTimeOut,
- &lpSecurityAttributes))
- return NULL;
+ Py_RETURN_NONE;
+}
+
+/*[clinic input]
+_winapi.CreateNamedPipe -> HANDLE
+
+ name: LPCTSTR
+ open_mode: DWORD
+ pipe_mode: DWORD
+ max_instances: DWORD
+ out_buffer_size: DWORD
+ in_buffer_size: DWORD
+ default_timeout: DWORD
+ security_attributes: LPSECURITY_ATTRIBUTES
+ /
+[clinic start generated code]*/
+
+static HANDLE
+_winapi_CreateNamedPipe_impl(PyModuleDef *module, LPCTSTR name,
+ DWORD open_mode, DWORD pipe_mode,
+ DWORD max_instances, DWORD out_buffer_size,
+ DWORD in_buffer_size, DWORD default_timeout,
+ LPSECURITY_ATTRIBUTES security_attributes)
+/*[clinic end generated code: output=44ca2a06a219b523 input=5a73530b84d8bc37]*/
+{
+ HANDLE handle;
Py_BEGIN_ALLOW_THREADS
- handle = CreateNamedPipe(lpName, dwOpenMode, dwPipeMode,
- nMaxInstances, nOutBufferSize,
- nInBufferSize, nDefaultTimeOut,
- lpSecurityAttributes);
+ handle = CreateNamedPipe(name, open_mode, pipe_mode,
+ max_instances, out_buffer_size,
+ in_buffer_size, default_timeout,
+ security_attributes);
Py_END_ALLOW_THREADS
if (handle == INVALID_HANDLE_VALUE)
- return PyErr_SetFromWindowsErr(0);
+ PyErr_SetFromWindowsErr(0);
- return Py_BuildValue(F_HANDLE, handle);
+ return handle;
}
-PyDoc_STRVAR(CreatePipe_doc,
-"CreatePipe(pipe_attrs, size) -> (read_handle, write_handle)\n\
-\n\
-Create an anonymous pipe, and return handles to the read and\n\
-write ends of the pipe.\n\
-\n\
-pipe_attrs is ignored internally and can be None.");
+/*[clinic input]
+_winapi.CreatePipe
+
+ pipe_attrs: object
+ Ignored internally, can be None.
+ size: DWORD
+ /
+
+Create an anonymous pipe.
+
+Returns a 2-tuple of handles, to the read and write ends of the pipe.
+[clinic start generated code]*/
static PyObject *
-winapi_CreatePipe(PyObject* self, PyObject* args)
+_winapi_CreatePipe_impl(PyModuleDef *module, PyObject *pipe_attrs,
+ DWORD size)
+/*[clinic end generated code: output=fef99f3b4222bc78 input=c4f2cfa56ef68d90]*/
{
HANDLE read_pipe;
HANDLE write_pipe;
BOOL result;
- PyObject* pipe_attributes; /* ignored */
- DWORD size;
-
- if (! PyArg_ParseTuple(args, "O" F_DWORD ":CreatePipe",
- &pipe_attributes, &size))
- return NULL;
-
Py_BEGIN_ALLOW_THREADS
result = CreatePipe(&read_pipe, &write_pipe, NULL, size);
Py_END_ALLOW_THREADS
@@ -586,20 +791,36 @@ getenvironment(PyObject* environment)
return NULL;
}
-PyDoc_STRVAR(CreateProcess_doc,
-"CreateProcess(app_name, cmd_line, proc_attrs, thread_attrs,\n\
- inherit, flags, env_mapping, curdir,\n\
- startup_info) -> (proc_handle, thread_handle,\n\
- pid, tid)\n\
-\n\
-Create a new process and its primary thread. The return\n\
-value is a tuple of the process handle, thread handle,\n\
-process ID, and thread ID.\n\
-\n\
-proc_attrs and thread_attrs are ignored internally and can be None.");
+/*[clinic input]
+_winapi.CreateProcess
+
+ application_name: Py_UNICODE(accept={str, NoneType})
+ command_line: Py_UNICODE(accept={str, NoneType})
+ proc_attrs: object
+ Ignored internally, can be None.
+ thread_attrs: object
+ Ignored internally, can be None.
+ inherit_handles: BOOL
+ creation_flags: DWORD
+ env_mapping: object
+ current_directory: Py_UNICODE(accept={str, NoneType})
+ startup_info: object
+ /
+
+Create a new process and its primary thread.
+
+The return value is a tuple of the process handle, thread handle,
+process ID, and thread ID.
+[clinic start generated code]*/
static PyObject *
-winapi_CreateProcess(PyObject* self, PyObject* args)
+_winapi_CreateProcess_impl(PyModuleDef *module, Py_UNICODE *application_name,
+ Py_UNICODE *command_line, PyObject *proc_attrs,
+ PyObject *thread_attrs, BOOL inherit_handles,
+ DWORD creation_flags, PyObject *env_mapping,
+ Py_UNICODE *current_directory,
+ PyObject *startup_info)
+/*[clinic end generated code: output=874bb350ff9ed4ef input=4a43b05038d639bb]*/
{
BOOL result;
PROCESS_INFORMATION pi;
@@ -607,28 +828,6 @@ winapi_CreateProcess(PyObject* self, PyObject* args)
PyObject* environment;
wchar_t *wenvironment;
- wchar_t* application_name;
- wchar_t* command_line;
- PyObject* process_attributes; /* ignored */
- PyObject* thread_attributes; /* ignored */
- BOOL inherit_handles;
- DWORD creation_flags;
- PyObject* env_mapping;
- wchar_t* current_directory;
- PyObject* startup_info;
-
- if (! PyArg_ParseTuple(args, "ZZOO" F_BOOL F_DWORD "OZO:CreateProcess",
- &application_name,
- &command_line,
- &process_attributes,
- &thread_attributes,
- &inherit_handles,
- &creation_flags,
- &env_mapping,
- &current_directory,
- &startup_info))
- return NULL;
-
ZeroMemory(&si, sizeof(si));
si.cb = sizeof(si);
@@ -682,41 +881,36 @@ winapi_CreateProcess(PyObject* self, PyObject* args)
pi.dwThreadId);
}
-PyDoc_STRVAR(DuplicateHandle_doc,
-"DuplicateHandle(source_proc_handle, source_handle,\n\
- target_proc_handle, target_handle, access,\n\
- inherit[, options]) -> handle\n\
-\n\
-Return a duplicate handle object.\n\
-\n\
-The duplicate handle refers to the same object as the original\n\
-handle. Therefore, any changes to the object are reflected\n\
-through both handles.");
+/*[clinic input]
+_winapi.DuplicateHandle -> HANDLE
-static PyObject *
-winapi_DuplicateHandle(PyObject* self, PyObject* args)
+ source_process_handle: HANDLE
+ source_handle: HANDLE
+ target_process_handle: HANDLE
+ desired_access: DWORD
+ inherit_handle: BOOL
+ options: DWORD = 0
+ /
+
+Return a duplicate handle object.
+
+The duplicate handle refers to the same object as the original
+handle. Therefore, any changes to the object are reflected
+through both handles.
+[clinic start generated code]*/
+
+static HANDLE
+_winapi_DuplicateHandle_impl(PyModuleDef *module,
+ HANDLE source_process_handle,
+ HANDLE source_handle,
+ HANDLE target_process_handle,
+ DWORD desired_access, BOOL inherit_handle,
+ DWORD options)
+/*[clinic end generated code: output=0799515b68b5237b input=b933e3f2356a8c12]*/
{
HANDLE target_handle;
BOOL result;
- HANDLE source_process_handle;
- HANDLE source_handle;
- HANDLE target_process_handle;
- DWORD desired_access;
- BOOL inherit_handle;
- DWORD options = 0;
-
- if (! PyArg_ParseTuple(args,
- F_HANDLE F_HANDLE F_HANDLE F_DWORD F_BOOL F_DWORD
- ":DuplicateHandle",
- &source_process_handle,
- &source_handle,
- &target_process_handle,
- &desired_access,
- &inherit_handle,
- &options))
- return NULL;
-
Py_BEGIN_ALLOW_THREADS
result = DuplicateHandle(
source_process_handle,
@@ -729,98 +923,111 @@ winapi_DuplicateHandle(PyObject* self, PyObject* args)
);
Py_END_ALLOW_THREADS
- if (! result)
- return PyErr_SetFromWindowsErr(GetLastError());
+ if (! result) {
+ PyErr_SetFromWindowsErr(GetLastError());
+ return INVALID_HANDLE_VALUE;
+ }
- return HANDLE_TO_PYNUM(target_handle);
+ return target_handle;
}
-static PyObject *
-winapi_ExitProcess(PyObject *self, PyObject *args)
-{
- UINT uExitCode;
+/*[clinic input]
+_winapi.ExitProcess
- if (!PyArg_ParseTuple(args, F_UINT, &uExitCode))
- return NULL;
+ ExitCode: UINT
+ /
+
+[clinic start generated code]*/
+static PyObject *
+_winapi_ExitProcess_impl(PyModuleDef *module, UINT ExitCode)
+/*[clinic end generated code: output=25f3b499c24cedc8 input=4f05466a9406c558]*/
+{
#if defined(Py_DEBUG)
SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOALIGNMENTFAULTEXCEPT|
SEM_NOGPFAULTERRORBOX|SEM_NOOPENFILEERRORBOX);
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
#endif
- ExitProcess(uExitCode);
+ ExitProcess(ExitCode);
return NULL;
}
-PyDoc_STRVAR(GetCurrentProcess_doc,
-"GetCurrentProcess() -> handle\n\
-\n\
-Return a handle object for the current process.");
+/*[clinic input]
+_winapi.GetCurrentProcess -> HANDLE
-static PyObject *
-winapi_GetCurrentProcess(PyObject* self, PyObject* args)
-{
- if (! PyArg_ParseTuple(args, ":GetCurrentProcess"))
- return NULL;
+Return a handle object for the current process.
+[clinic start generated code]*/
- return HANDLE_TO_PYNUM(GetCurrentProcess());
+static HANDLE
+_winapi_GetCurrentProcess_impl(PyModuleDef *module)
+/*[clinic end generated code: output=be29ac3ad5f8291e input=b213403fd4b96b41]*/
+{
+ return GetCurrentProcess();
}
-PyDoc_STRVAR(GetExitCodeProcess_doc,
-"GetExitCodeProcess(handle) -> Exit code\n\
-\n\
-Return the termination status of the specified process.");
+/*[clinic input]
+_winapi.GetExitCodeProcess -> DWORD
-static PyObject *
-winapi_GetExitCodeProcess(PyObject* self, PyObject* args)
+ process: HANDLE
+ /
+
+Return the termination status of the specified process.
+[clinic start generated code]*/
+
+static DWORD
+_winapi_GetExitCodeProcess_impl(PyModuleDef *module, HANDLE process)
+/*[clinic end generated code: output=0b10f0848a410f65 input=61b6bfc7dc2ee374]*/
{
DWORD exit_code;
BOOL result;
- HANDLE process;
- if (! PyArg_ParseTuple(args, F_HANDLE ":GetExitCodeProcess", &process))
- return NULL;
-
result = GetExitCodeProcess(process, &exit_code);
- if (! result)
- return PyErr_SetFromWindowsErr(GetLastError());
+ if (! result) {
+ PyErr_SetFromWindowsErr(GetLastError());
+ exit_code = DWORD_MAX;
+ }
- return PyLong_FromUnsignedLong(exit_code);
+ return exit_code;
}
-static PyObject *
-winapi_GetLastError(PyObject *self, PyObject *args)
+/*[clinic input]
+_winapi.GetLastError -> DWORD
+[clinic start generated code]*/
+
+static DWORD
+_winapi_GetLastError_impl(PyModuleDef *module)
+/*[clinic end generated code: output=0ea00d8e67bdd056 input=62d47fb9bce038ba]*/
{
- return Py_BuildValue(F_DWORD, GetLastError());
+ return GetLastError();
}
-PyDoc_STRVAR(GetModuleFileName_doc,
-"GetModuleFileName(module) -> path\n\
-\n\
-Return the fully-qualified path for the file that contains\n\
-the specified module. The module must have been loaded by the\n\
-current process.\n\
-\n\
-The module parameter should be a handle to the loaded module\n\
-whose path is being requested. If this parameter is 0, \n\
-GetModuleFileName retrieves the path of the executable file\n\
-of the current process.");
+/*[clinic input]
+_winapi.GetModuleFileName
+
+ module_handle: HMODULE
+ /
+
+Return the fully-qualified path for the file that contains module.
+
+The module must have been loaded by the current process.
+
+The module parameter should be a handle to the loaded module
+whose path is being requested. If this parameter is 0,
+GetModuleFileName retrieves the path of the executable file
+of the current process.
+[clinic start generated code]*/
static PyObject *
-winapi_GetModuleFileName(PyObject* self, PyObject* args)
+_winapi_GetModuleFileName_impl(PyModuleDef *module, HMODULE module_handle)
+/*[clinic end generated code: output=90063dc63bdbfa18 input=6d66ff7deca5d11f]*/
{
BOOL result;
- HMODULE module;
WCHAR filename[MAX_PATH];
- if (! PyArg_ParseTuple(args, F_HANDLE ":GetModuleFileName",
- &module))
- return NULL;
-
- result = GetModuleFileNameW(module, filename, MAX_PATH);
+ result = GetModuleFileNameW(module_handle, filename, MAX_PATH);
filename[MAX_PATH-1] = '\0';
if (! result)
@@ -829,83 +1036,96 @@ winapi_GetModuleFileName(PyObject* self, PyObject* args)
return PyUnicode_FromWideChar(filename, wcslen(filename));
}
-PyDoc_STRVAR(GetStdHandle_doc,
-"GetStdHandle(handle) -> integer\n\
-\n\
-Return a handle to the specified standard device\n\
-(STD_INPUT_HANDLE, STD_OUTPUT_HANDLE, STD_ERROR_HANDLE).\n\
-The integer associated with the handle object is returned.");
+/*[clinic input]
+_winapi.GetStdHandle -> HANDLE
-static PyObject *
-winapi_GetStdHandle(PyObject* self, PyObject* args)
+ std_handle: DWORD
+ One of STD_INPUT_HANDLE, STD_OUTPUT_HANDLE, or STD_ERROR_HANDLE.
+ /
+
+Return a handle to the specified standard device.
+
+The integer associated with the handle object is returned.
+[clinic start generated code]*/
+
+static HANDLE
+_winapi_GetStdHandle_impl(PyModuleDef *module, DWORD std_handle)
+/*[clinic end generated code: output=5f5ca28b28c6fad2 input=07016b06a2fc8826]*/
{
HANDLE handle;
- DWORD std_handle;
-
- if (! PyArg_ParseTuple(args, F_DWORD ":GetStdHandle", &std_handle))
- return NULL;
Py_BEGIN_ALLOW_THREADS
handle = GetStdHandle(std_handle);
Py_END_ALLOW_THREADS
if (handle == INVALID_HANDLE_VALUE)
- return PyErr_SetFromWindowsErr(GetLastError());
+ PyErr_SetFromWindowsErr(GetLastError());
- if (! handle) {
- Py_INCREF(Py_None);
- return Py_None;
- }
-
- /* note: returns integer, not handle object */
- return HANDLE_TO_PYNUM(handle);
+ return handle;
}
-PyDoc_STRVAR(GetVersion_doc,
-"GetVersion() -> version\n\
-\n\
-Return the version number of the current operating system.");
+/*[clinic input]
+_winapi.GetVersion -> long
-static PyObject *
-winapi_GetVersion(PyObject* self, PyObject* args)
-{
- if (! PyArg_ParseTuple(args, ":GetVersion"))
- return NULL;
+Return the version number of the current operating system.
+[clinic start generated code]*/
+
+static long
+_winapi_GetVersion_impl(PyModuleDef *module)
+/*[clinic end generated code: output=95a2f8ad3b948ca8 input=e21dff8d0baeded2]*/
+/* Disable deprecation warnings about GetVersionEx as the result is
+ being passed straight through to the caller, who is responsible for
+ using it correctly. */
+#pragma warning(push)
+#pragma warning(disable:4996)
- return PyLong_FromUnsignedLong(GetVersion());
+{
+ return GetVersion();
}
-static PyObject *
-winapi_OpenProcess(PyObject *self, PyObject *args)
+#pragma warning(pop)
+
+/*[clinic input]
+_winapi.OpenProcess -> HANDLE
+
+ desired_access: DWORD
+ inherit_handle: BOOL
+ process_id: DWORD
+ /
+[clinic start generated code]*/
+
+static HANDLE
+_winapi_OpenProcess_impl(PyModuleDef *module, DWORD desired_access,
+ BOOL inherit_handle, DWORD process_id)
+/*[clinic end generated code: output=6bc52eda82a3d226 input=ec98c4cf4ea2ec36]*/
{
- DWORD dwDesiredAccess;
- BOOL bInheritHandle;
- DWORD dwProcessId;
HANDLE handle;
- if (!PyArg_ParseTuple(args, F_DWORD F_BOOL F_DWORD,
- &dwDesiredAccess, &bInheritHandle, &dwProcessId))
- return NULL;
-
- handle = OpenProcess(dwDesiredAccess, bInheritHandle, dwProcessId);
- if (handle == NULL)
- return PyErr_SetFromWindowsErr(0);
+ handle = OpenProcess(desired_access, inherit_handle, process_id);
+ if (handle == NULL) {
+ PyErr_SetFromWindowsErr(0);
+ handle = INVALID_HANDLE_VALUE;
+ }
- return Py_BuildValue(F_HANDLE, handle);
+ return handle;
}
+/*[clinic input]
+_winapi.PeekNamedPipe
+
+ handle: HANDLE
+ size: int = 0
+ /
+[clinic start generated code]*/
+
static PyObject *
-winapi_PeekNamedPipe(PyObject *self, PyObject *args)
+_winapi_PeekNamedPipe_impl(PyModuleDef *module, HANDLE handle, int size)
+/*[clinic end generated code: output=e6c908e2fb63c798 input=c7aa53bfbce69d70]*/
{
- HANDLE handle;
- int size = 0;
PyObject *buf = NULL;
DWORD nread, navail, nleft;
BOOL ret;
- if (!PyArg_ParseTuple(args, F_HANDLE "|i:PeekNamedPipe" , &handle, &size))
- return NULL;
-
if (size < 0) {
PyErr_SetString(PyExc_ValueError, "negative size");
return NULL;
@@ -938,23 +1158,24 @@ winapi_PeekNamedPipe(PyObject *self, PyObject *args)
}
}
+/*[clinic input]
+_winapi.ReadFile
+
+ handle: HANDLE
+ size: int
+ overlapped as use_overlapped: int(c_default='0') = False
+[clinic start generated code]*/
+
static PyObject *
-winapi_ReadFile(PyObject *self, PyObject *args, PyObject *kwds)
+_winapi_ReadFile_impl(PyModuleDef *module, HANDLE handle, int size,
+ int use_overlapped)
+/*[clinic end generated code: output=d7695db4db97b135 input=8dd810194e86ac7d]*/
{
- HANDLE handle;
- int size;
DWORD nread;
PyObject *buf;
BOOL ret;
- int use_overlapped = 0;
DWORD err;
OverlappedObject *overlapped = NULL;
- static char *kwlist[] = {"handle", "size", "overlapped", NULL};
-
- if (!PyArg_ParseTupleAndKeywords(args, kwds,
- F_HANDLE "i|i:ReadFile", kwlist,
- &handle, &size, &use_overlapped))
- return NULL;
buf = PyBytes_FromStringAndSize(NULL, size);
if (!buf)
@@ -997,18 +1218,27 @@ winapi_ReadFile(PyObject *self, PyObject *args, PyObject *kwds)
return Py_BuildValue("NI", buf, err);
}
+/*[clinic input]
+_winapi.SetNamedPipeHandleState
+
+ named_pipe: HANDLE
+ mode: object
+ max_collection_count: object
+ collect_data_timeout: object
+ /
+[clinic start generated code]*/
+
static PyObject *
-winapi_SetNamedPipeHandleState(PyObject *self, PyObject *args)
+_winapi_SetNamedPipeHandleState_impl(PyModuleDef *module, HANDLE named_pipe,
+ PyObject *mode,
+ PyObject *max_collection_count,
+ PyObject *collect_data_timeout)
+/*[clinic end generated code: output=25aa3c28dee223ce input=9142d72163d0faa6]*/
{
- HANDLE hNamedPipe;
- PyObject *oArgs[3];
+ PyObject *oArgs[3] = {mode, max_collection_count, collect_data_timeout};
DWORD dwArgs[3], *pArgs[3] = {NULL, NULL, NULL};
int i;
- if (!PyArg_ParseTuple(args, F_HANDLE "OOO",
- &hNamedPipe, &oArgs[0], &oArgs[1], &oArgs[2]))
- return NULL;
-
PyErr_Clear();
for (i = 0 ; i < 3 ; i++) {
@@ -1020,49 +1250,54 @@ winapi_SetNamedPipeHandleState(PyObject *self, PyObject *args)
}
}
- if (!SetNamedPipeHandleState(hNamedPipe, pArgs[0], pArgs[1], pArgs[2]))
+ if (!SetNamedPipeHandleState(named_pipe, pArgs[0], pArgs[1], pArgs[2]))
return PyErr_SetFromWindowsErr(0);
Py_RETURN_NONE;
}
-PyDoc_STRVAR(TerminateProcess_doc,
-"TerminateProcess(handle, exit_code) -> None\n\
-\n\
-Terminate the specified process and all of its threads.");
+
+/*[clinic input]
+_winapi.TerminateProcess
+
+ handle: HANDLE
+ exit_code: UINT
+ /
+
+Terminate the specified process and all of its threads.
+[clinic start generated code]*/
static PyObject *
-winapi_TerminateProcess(PyObject* self, PyObject* args)
+_winapi_TerminateProcess_impl(PyModuleDef *module, HANDLE handle,
+ UINT exit_code)
+/*[clinic end generated code: output=937c1bb6219aca8b input=d6bc0aa1ee3bb4df]*/
{
BOOL result;
- HANDLE process;
- UINT exit_code;
- if (! PyArg_ParseTuple(args, F_HANDLE F_UINT ":TerminateProcess",
- &process, &exit_code))
- return NULL;
-
- result = TerminateProcess(process, exit_code);
+ result = TerminateProcess(handle, exit_code);
if (! result)
return PyErr_SetFromWindowsErr(GetLastError());
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
+/*[clinic input]
+_winapi.WaitNamedPipe
+
+ name: LPCTSTR
+ timeout: DWORD
+ /
+[clinic start generated code]*/
+
static PyObject *
-winapi_WaitNamedPipe(PyObject *self, PyObject *args)
+_winapi_WaitNamedPipe_impl(PyModuleDef *module, LPCTSTR name, DWORD timeout)
+/*[clinic end generated code: output=5bca5e02f448c9d7 input=36fc781291b1862c]*/
{
- LPCTSTR lpNamedPipeName;
- DWORD nTimeOut;
BOOL success;
- if (!PyArg_ParseTuple(args, "s" F_DWORD, &lpNamedPipeName, &nTimeOut))
- return NULL;
-
Py_BEGIN_ALLOW_THREADS
- success = WaitNamedPipe(lpNamedPipeName, nTimeOut);
+ success = WaitNamedPipe(name, timeout);
Py_END_ALLOW_THREADS
if (!success)
@@ -1071,21 +1306,25 @@ winapi_WaitNamedPipe(PyObject *self, PyObject *args)
Py_RETURN_NONE;
}
+/*[clinic input]
+_winapi.WaitForMultipleObjects
+
+ handle_seq: object
+ wait_flag: BOOL
+ milliseconds: DWORD(c_default='INFINITE') = _winapi.INFINITE
+ /
+[clinic start generated code]*/
+
static PyObject *
-winapi_WaitForMultipleObjects(PyObject* self, PyObject* args)
+_winapi_WaitForMultipleObjects_impl(PyModuleDef *module,
+ PyObject *handle_seq, BOOL wait_flag,
+ DWORD milliseconds)
+/*[clinic end generated code: output=acb440728d06d130 input=36f76ca057cd28a0]*/
{
DWORD result;
- PyObject *handle_seq;
HANDLE handles[MAXIMUM_WAIT_OBJECTS];
HANDLE sigint_event = NULL;
Py_ssize_t nhandles, i;
- BOOL wait_flag;
- DWORD milliseconds = INFINITE;
-
- if (!PyArg_ParseTuple(args, "O" F_BOOL "|" F_DWORD
- ":WaitForMultipleObjects",
- &handle_seq, &wait_flag, &milliseconds))
- return NULL;
if (!PySequence_Check(handle_seq)) {
PyErr_Format(PyExc_TypeError,
@@ -1139,53 +1378,57 @@ winapi_WaitForMultipleObjects(PyObject* self, PyObject* args)
return PyLong_FromLong((int) result);
}
-PyDoc_STRVAR(WaitForSingleObject_doc,
-"WaitForSingleObject(handle, timeout) -> result\n\
-\n\
-Wait until the specified object is in the signaled state or\n\
-the time-out interval elapses. The timeout value is specified\n\
-in milliseconds.");
+/*[clinic input]
+_winapi.WaitForSingleObject -> long
-static PyObject *
-winapi_WaitForSingleObject(PyObject* self, PyObject* args)
+ handle: HANDLE
+ milliseconds: DWORD
+ /
+
+Wait for a single object.
+
+Wait until the specified object is in the signaled state or
+the time-out interval elapses. The timeout value is specified
+in milliseconds.
+[clinic start generated code]*/
+
+static long
+_winapi_WaitForSingleObject_impl(PyModuleDef *module, HANDLE handle,
+ DWORD milliseconds)
+/*[clinic end generated code: output=34ae40c269749c48 input=443d1ab076edc7b1]*/
{
DWORD result;
- HANDLE handle;
- DWORD milliseconds;
- if (! PyArg_ParseTuple(args, F_HANDLE F_DWORD ":WaitForSingleObject",
- &handle,
- &milliseconds))
- return NULL;
-
Py_BEGIN_ALLOW_THREADS
result = WaitForSingleObject(handle, milliseconds);
Py_END_ALLOW_THREADS
- if (result == WAIT_FAILED)
- return PyErr_SetFromWindowsErr(GetLastError());
+ if (result == WAIT_FAILED) {
+ PyErr_SetFromWindowsErr(GetLastError());
+ return -1;
+ }
- return PyLong_FromUnsignedLong(result);
+ return result;
}
+/*[clinic input]
+_winapi.WriteFile
+
+ handle: HANDLE
+ buffer: object
+ overlapped as use_overlapped: int(c_default='0') = False
+[clinic start generated code]*/
+
static PyObject *
-winapi_WriteFile(PyObject *self, PyObject *args, PyObject *kwds)
+_winapi_WriteFile_impl(PyModuleDef *module, HANDLE handle, PyObject *buffer,
+ int use_overlapped)
+/*[clinic end generated code: output=65e70ea41f4d2a1d input=51846a5af52053fd]*/
{
- HANDLE handle;
Py_buffer _buf, *buf;
- PyObject *bufobj;
DWORD len, written;
BOOL ret;
- int use_overlapped = 0;
DWORD err;
OverlappedObject *overlapped = NULL;
- static char *kwlist[] = {"handle", "buffer", "overlapped", NULL};
-
- /* First get handle and use_overlapped to know which Py_buffer to use */
- if (!PyArg_ParseTupleAndKeywords(args, kwds,
- F_HANDLE "O|i:WriteFile", kwlist,
- &handle, &bufobj, &use_overlapped))
- return NULL;
if (use_overlapped) {
overlapped = new_overlapped(handle);
@@ -1196,7 +1439,7 @@ winapi_WriteFile(PyObject *self, PyObject *args, PyObject *kwds)
else
buf = &_buf;
- if (!PyArg_Parse(bufobj, "y*", buf)) {
+ if (!PyArg_Parse(buffer, "y*", buf)) {
Py_XDECREF(overlapped);
return NULL;
}
@@ -1229,52 +1472,30 @@ winapi_WriteFile(PyObject *self, PyObject *args, PyObject *kwds)
static PyMethodDef winapi_functions[] = {
- {"CloseHandle", winapi_CloseHandle, METH_VARARGS,
- CloseHandle_doc},
- {"ConnectNamedPipe", (PyCFunction)winapi_ConnectNamedPipe,
- METH_VARARGS | METH_KEYWORDS, ""},
- {"CreateFile", winapi_CreateFile, METH_VARARGS,
- ""},
- {"CreateNamedPipe", winapi_CreateNamedPipe, METH_VARARGS,
- ""},
- {"CreatePipe", winapi_CreatePipe, METH_VARARGS,
- CreatePipe_doc},
- {"CreateProcess", winapi_CreateProcess, METH_VARARGS,
- CreateProcess_doc},
- {"DuplicateHandle", winapi_DuplicateHandle, METH_VARARGS,
- DuplicateHandle_doc},
- {"ExitProcess", winapi_ExitProcess, METH_VARARGS,
- ""},
- {"GetCurrentProcess", winapi_GetCurrentProcess, METH_VARARGS,
- GetCurrentProcess_doc},
- {"GetExitCodeProcess", winapi_GetExitCodeProcess, METH_VARARGS,
- GetExitCodeProcess_doc},
- {"GetLastError", winapi_GetLastError, METH_NOARGS,
- GetCurrentProcess_doc},
- {"GetModuleFileName", winapi_GetModuleFileName, METH_VARARGS,
- GetModuleFileName_doc},
- {"GetStdHandle", winapi_GetStdHandle, METH_VARARGS,
- GetStdHandle_doc},
- {"GetVersion", winapi_GetVersion, METH_VARARGS,
- GetVersion_doc},
- {"OpenProcess", winapi_OpenProcess, METH_VARARGS,
- ""},
- {"PeekNamedPipe", winapi_PeekNamedPipe, METH_VARARGS,
- ""},
- {"ReadFile", (PyCFunction)winapi_ReadFile, METH_VARARGS | METH_KEYWORDS,
- ""},
- {"SetNamedPipeHandleState", winapi_SetNamedPipeHandleState, METH_VARARGS,
- ""},
- {"TerminateProcess", winapi_TerminateProcess, METH_VARARGS,
- TerminateProcess_doc},
- {"WaitNamedPipe", winapi_WaitNamedPipe, METH_VARARGS,
- ""},
- {"WaitForMultipleObjects", winapi_WaitForMultipleObjects, METH_VARARGS,
- ""},
- {"WaitForSingleObject", winapi_WaitForSingleObject, METH_VARARGS,
- WaitForSingleObject_doc},
- {"WriteFile", (PyCFunction)winapi_WriteFile, METH_VARARGS | METH_KEYWORDS,
- ""},
+ _WINAPI_CLOSEHANDLE_METHODDEF
+ _WINAPI_CONNECTNAMEDPIPE_METHODDEF
+ _WINAPI_CREATEFILE_METHODDEF
+ _WINAPI_CREATENAMEDPIPE_METHODDEF
+ _WINAPI_CREATEPIPE_METHODDEF
+ _WINAPI_CREATEPROCESS_METHODDEF
+ _WINAPI_CREATEJUNCTION_METHODDEF
+ _WINAPI_DUPLICATEHANDLE_METHODDEF
+ _WINAPI_EXITPROCESS_METHODDEF
+ _WINAPI_GETCURRENTPROCESS_METHODDEF
+ _WINAPI_GETEXITCODEPROCESS_METHODDEF
+ _WINAPI_GETLASTERROR_METHODDEF
+ _WINAPI_GETMODULEFILENAME_METHODDEF
+ _WINAPI_GETSTDHANDLE_METHODDEF
+ _WINAPI_GETVERSION_METHODDEF
+ _WINAPI_OPENPROCESS_METHODDEF
+ _WINAPI_PEEKNAMEDPIPE_METHODDEF
+ _WINAPI_READFILE_METHODDEF
+ _WINAPI_SETNAMEDPIPEHANDLESTATE_METHODDEF
+ _WINAPI_TERMINATEPROCESS_METHODDEF
+ _WINAPI_WAITNAMEDPIPE_METHODDEF
+ _WINAPI_WAITFORMULTIPLEOBJECTS_METHODDEF
+ _WINAPI_WAITFORSINGLEOBJECT_METHODDEF
+ _WINAPI_WRITEFILE_METHODDEF
{NULL, NULL}
};
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c
index 5ab1ab6836..f73c599365 100644
--- a/Modules/arraymodule.c
+++ b/Modules/arraymodule.c
@@ -15,6 +15,11 @@
#endif /* HAVE_SYS_TYPES_H */
#endif /* !STDC_HEADERS */
+/*[clinic input]
+module array
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=7d1b8d7f5958fd83]*/
+
struct arrayobject; /* Forward */
/* All possible arraydescr values are defined in the vector "descriptors"
@@ -42,6 +47,63 @@ typedef struct arrayobject {
static PyTypeObject Arraytype;
+typedef struct {
+ PyObject_HEAD
+ Py_ssize_t index;
+ arrayobject *ao;
+ PyObject* (*getitem)(struct arrayobject *, Py_ssize_t);
+} arrayiterobject;
+
+static PyTypeObject PyArrayIter_Type;
+
+#define PyArrayIter_Check(op) PyObject_TypeCheck(op, &PyArrayIter_Type)
+
+enum machine_format_code {
+ UNKNOWN_FORMAT = -1,
+ /* UNKNOWN_FORMAT is used to indicate that the machine format for an
+ * array type code cannot be interpreted. When this occurs, a list of
+ * Python objects is used to represent the content of the array
+ * instead of using the memory content of the array directly. In that
+ * case, the array_reconstructor mechanism is bypassed completely, and
+ * the standard array constructor is used instead.
+ *
+ * This is will most likely occur when the machine doesn't use IEEE
+ * floating-point numbers.
+ */
+
+ UNSIGNED_INT8 = 0,
+ SIGNED_INT8 = 1,
+ UNSIGNED_INT16_LE = 2,
+ UNSIGNED_INT16_BE = 3,
+ SIGNED_INT16_LE = 4,
+ SIGNED_INT16_BE = 5,
+ UNSIGNED_INT32_LE = 6,
+ UNSIGNED_INT32_BE = 7,
+ SIGNED_INT32_LE = 8,
+ SIGNED_INT32_BE = 9,
+ UNSIGNED_INT64_LE = 10,
+ UNSIGNED_INT64_BE = 11,
+ SIGNED_INT64_LE = 12,
+ SIGNED_INT64_BE = 13,
+ IEEE_754_FLOAT_LE = 14,
+ IEEE_754_FLOAT_BE = 15,
+ IEEE_754_DOUBLE_LE = 16,
+ IEEE_754_DOUBLE_BE = 17,
+ UTF16_LE = 18,
+ UTF16_BE = 19,
+ UTF32_LE = 20,
+ UTF32_BE = 21
+};
+#define MACHINE_FORMAT_CODE_MIN 0
+#define MACHINE_FORMAT_CODE_MAX 21
+
+
+/*
+ * Must come after arrayobject, arrayiterobject,
+ * and enum machine_code_type definitions.
+ */
+#include "clinic/arraymodule.c.h"
+
#define array_Check(op) PyObject_TypeCheck(op, &Arraytype)
#define array_CheckExact(op) (Py_TYPE(op) == &Arraytype)
@@ -471,6 +533,10 @@ static struct arraydescr descriptors[] = {
/****************************************************************************
Implementations of array object methods.
****************************************************************************/
+/*[clinic input]
+class array.array "arrayobject *" "&Arraytype"
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=ad43d37e942a8854]*/
static PyObject *
newarrayobject(PyTypeObject *type, Py_ssize_t size, struct arraydescr *descr)
@@ -684,16 +750,35 @@ array_slice(arrayobject *a, Py_ssize_t ilow, Py_ssize_t ihigh)
return (PyObject *)np;
}
+
+/*[clinic input]
+array.array.__copy__
+
+Return a copy of the array.
+[clinic start generated code]*/
+
static PyObject *
-array_copy(arrayobject *a, PyObject *unused)
+array_array___copy___impl(arrayobject *self)
+/*[clinic end generated code: output=dec7c3f925d9619e input=ad1ee5b086965f09]*/
{
- return array_slice(a, 0, Py_SIZE(a));
+ return array_slice(self, 0, Py_SIZE(self));
}
-PyDoc_STRVAR(copy_doc,
-"copy(array)\n\
-\n\
- Return a copy of the array.");
+/*[clinic input]
+array.array.__deepcopy__
+
+ unused: object
+ /
+
+Return a copy of the array.
+[clinic start generated code]*/
+
+static PyObject *
+array_array___deepcopy__(arrayobject *self, PyObject *unused)
+/*[clinic end generated code: output=1ec748d8e14a9faa input=2405ecb4933748c4]*/
+{
+ return array_array___copy___impl(self);
+}
static PyObject *
array_concat(arrayobject *a, PyObject *bb)
@@ -961,8 +1046,18 @@ ins(arrayobject *self, Py_ssize_t where, PyObject *v)
return Py_None;
}
+/*[clinic input]
+array.array.count
+
+ v: object
+ /
+
+Return number of occurrences of v in the array.
+[clinic start generated code]*/
+
static PyObject *
-array_count(arrayobject *self, PyObject *v)
+array_array_count(arrayobject *self, PyObject *v)
+/*[clinic end generated code: output=3dd3624bf7135a3a input=d9bce9d65e39d1f5]*/
{
Py_ssize_t count = 0;
Py_ssize_t i;
@@ -984,13 +1079,19 @@ array_count(arrayobject *self, PyObject *v)
return PyLong_FromSsize_t(count);
}
-PyDoc_STRVAR(count_doc,
-"count(x)\n\
-\n\
-Return number of occurrences of x in the array.");
+
+/*[clinic input]
+array.array.index
+
+ v: object
+ /
+
+Return index of first occurrence of v in the array.
+[clinic start generated code]*/
static PyObject *
-array_index(arrayobject *self, PyObject *v)
+array_array_index(arrayobject *self, PyObject *v)
+/*[clinic end generated code: output=d48498d325602167 input=cf619898c6649d08]*/
{
Py_ssize_t i;
@@ -1013,11 +1114,6 @@ array_index(arrayobject *self, PyObject *v)
return NULL;
}
-PyDoc_STRVAR(index_doc,
-"index(x)\n\
-\n\
-Return index of first occurrence of x in the array.");
-
static int
array_contains(arrayobject *self, PyObject *v)
{
@@ -1034,8 +1130,18 @@ array_contains(arrayobject *self, PyObject *v)
return cmp;
}
+/*[clinic input]
+array.array.remove
+
+ v: object
+ /
+
+Remove the first occurrence of v in the array.
+[clinic start generated code]*/
+
static PyObject *
-array_remove(arrayobject *self, PyObject *v)
+array_array_remove(arrayobject *self, PyObject *v)
+/*[clinic end generated code: output=bef06be9fdf9dceb input=0b1e5aed25590027]*/
{
int i;
@@ -1062,18 +1168,23 @@ array_remove(arrayobject *self, PyObject *v)
return NULL;
}
-PyDoc_STRVAR(remove_doc,
-"remove(x)\n\
-\n\
-Remove the first occurrence of x in the array.");
+/*[clinic input]
+array.array.pop
+
+ i: Py_ssize_t = -1
+ /
+
+Return the i-th element and delete it from the array.
+
+i defaults to -1.
+[clinic start generated code]*/
static PyObject *
-array_pop(arrayobject *self, PyObject *args)
+array_array_pop_impl(arrayobject *self, Py_ssize_t i)
+/*[clinic end generated code: output=bc1f0c54fe5308e4 input=8e5feb4c1a11cd44]*/
{
- Py_ssize_t i = -1;
PyObject *v;
- if (!PyArg_ParseTuple(args, "|n:pop", &i))
- return NULL;
+
if (Py_SIZE(self) == 0) {
/* Special-case most common failure cause */
PyErr_SetString(PyExc_IndexError, "pop from empty array");
@@ -1095,13 +1206,18 @@ array_pop(arrayobject *self, PyObject *args)
return v;
}
-PyDoc_STRVAR(pop_doc,
-"pop([i])\n\
-\n\
-Return the i-th element and delete it from the array. i defaults to -1.");
+/*[clinic input]
+array.array.extend
+
+ bb: object
+ /
+
+Append items to the end of the array.
+[clinic start generated code]*/
static PyObject *
-array_extend(arrayobject *self, PyObject *bb)
+array_array_extend(arrayobject *self, PyObject *bb)
+/*[clinic end generated code: output=bbddbc8e8bef871d input=43be86aba5c31e44]*/
{
if (array_do_extend(self, bb) == -1)
return NULL;
@@ -1109,29 +1225,35 @@ array_extend(arrayobject *self, PyObject *bb)
return Py_None;
}
-PyDoc_STRVAR(extend_doc,
-"extend(array or iterable)\n\
-\n\
- Append items to the end of the array.");
+/*[clinic input]
+array.array.insert
+
+ i: Py_ssize_t
+ v: object
+ /
+
+Insert a new item v into the array before position i.
+[clinic start generated code]*/
static PyObject *
-array_insert(arrayobject *self, PyObject *args)
+array_array_insert_impl(arrayobject *self, Py_ssize_t i, PyObject *v)
+/*[clinic end generated code: output=5a3648e278348564 input=5577d1b4383e9313]*/
{
- Py_ssize_t i;
- PyObject *v;
- if (!PyArg_ParseTuple(args, "nO:insert", &i, &v))
- return NULL;
return ins(self, i, v);
}
-PyDoc_STRVAR(insert_doc,
-"insert(i,x)\n\
-\n\
-Insert a new item x into the array before position i.");
+/*[clinic input]
+array.array.buffer_info
+Return a tuple (address, length) giving the current memory address and the length in items of the buffer used to hold array's contents.
+
+The length should be multiplied by the itemsize attribute to calculate
+the buffer length in bytes.
+[clinic start generated code]*/
static PyObject *
-array_buffer_info(arrayobject *self, PyObject *unused)
+array_array_buffer_info_impl(arrayobject *self)
+/*[clinic end generated code: output=9b2a4ec3ae7e98e7 input=a58bae5c6e1ac6a6]*/
{
PyObject *retval = NULL, *v;
@@ -1156,29 +1278,34 @@ array_buffer_info(arrayobject *self, PyObject *unused)
return retval;
}
-PyDoc_STRVAR(buffer_info_doc,
-"buffer_info() -> (address, length)\n\
-\n\
-Return a tuple (address, length) giving the current memory address and\n\
-the length in items of the buffer used to hold array's contents\n\
-The length should be multiplied by the itemsize attribute to calculate\n\
-the buffer length in bytes.");
+/*[clinic input]
+array.array.append
+
+ v: object
+ /
+Append new value v to the end of the array.
+[clinic start generated code]*/
static PyObject *
-array_append(arrayobject *self, PyObject *v)
+array_array_append(arrayobject *self, PyObject *v)
+/*[clinic end generated code: output=745a0669bf8db0e2 input=0b98d9d78e78f0fa]*/
{
return ins(self, Py_SIZE(self), v);
}
-PyDoc_STRVAR(append_doc,
-"append(x)\n\
-\n\
-Append new value x to the end of the array.");
+/*[clinic input]
+array.array.byteswap
+
+Byteswap all items of the array.
+If the items in the array are not 1, 2, 4, or 8 bytes in size, RuntimeError is
+raised.
+[clinic start generated code]*/
static PyObject *
-array_byteswap(arrayobject *self, PyObject *unused)
+array_array_byteswap_impl(arrayobject *self)
+/*[clinic end generated code: output=5f8236cbdf0d90b5 input=6a85591b950a0186]*/
{
char *p;
Py_ssize_t i;
@@ -1228,14 +1355,15 @@ array_byteswap(arrayobject *self, PyObject *unused)
return Py_None;
}
-PyDoc_STRVAR(byteswap_doc,
-"byteswap()\n\
-\n\
-Byteswap all items of the array. If the items in the array are not 1, 2,\n\
-4, or 8 bytes in size, RuntimeError is raised.");
+/*[clinic input]
+array.array.reverse
+
+Reverse the order of the items in the array.
+[clinic start generated code]*/
static PyObject *
-array_reverse(arrayobject *self, PyObject *unused)
+array_array_reverse_impl(arrayobject *self)
+/*[clinic end generated code: output=c04868b36f6f4089 input=cd904f01b27d966a]*/
{
Py_ssize_t itemsize = self->ob_descr->itemsize;
char *p, *q;
@@ -1261,27 +1389,26 @@ array_reverse(arrayobject *self, PyObject *unused)
return Py_None;
}
-PyDoc_STRVAR(reverse_doc,
-"reverse()\n\
-\n\
-Reverse the order of the items in the array.");
+/*[clinic input]
+array.array.fromfile
+ f: object
+ n: Py_ssize_t
+ /
-/* Forward */
-static PyObject *array_frombytes(arrayobject *self, PyObject *args);
+Read n objects from the file object f and append them to the end of the array.
+[clinic start generated code]*/
static PyObject *
-array_fromfile(arrayobject *self, PyObject *args)
+array_array_fromfile_impl(arrayobject *self, PyObject *f, Py_ssize_t n)
+/*[clinic end generated code: output=ec9f600e10f53510 input=e188afe8e58adf40]*/
{
- PyObject *f, *b, *res;
+ PyObject *b, *res;
Py_ssize_t itemsize = self->ob_descr->itemsize;
- Py_ssize_t n, nbytes;
+ Py_ssize_t nbytes;
_Py_IDENTIFIER(read);
int not_enough_bytes;
- if (!PyArg_ParseTuple(args, "On:fromfile", &f, &n))
- return NULL;
-
if (n < 0) {
PyErr_SetString(PyExc_ValueError, "negative count");
return NULL;
@@ -1305,13 +1432,8 @@ array_fromfile(arrayobject *self, PyObject *args)
not_enough_bytes = (PyBytes_GET_SIZE(b) != nbytes);
- args = Py_BuildValue("(O)", b);
+ res = array_array_frombytes(self, b);
Py_DECREF(b);
- if (args == NULL)
- return NULL;
-
- res = array_frombytes(self, args);
- Py_DECREF(args);
if (res == NULL)
return NULL;
@@ -1325,15 +1447,18 @@ array_fromfile(arrayobject *self, PyObject *args)
return res;
}
-PyDoc_STRVAR(fromfile_doc,
-"fromfile(f, n)\n\
-\n\
-Read n objects from the file object f and append them to the end of the\n\
-array.");
+/*[clinic input]
+array.array.tofile
+ f: object
+ /
+
+Write all items (as machine values) to the file object f.
+[clinic start generated code]*/
static PyObject *
-array_tofile(arrayobject *self, PyObject *f)
+array_array_tofile(arrayobject *self, PyObject *f)
+/*[clinic end generated code: output=3a2cfa8128df0777 input=b0669a484aab0831]*/
{
Py_ssize_t nbytes = Py_SIZE(self) * self->ob_descr->itemsize;
/* Write 64K blocks at a time */
@@ -1368,14 +1493,18 @@ array_tofile(arrayobject *self, PyObject *f)
return Py_None;
}
-PyDoc_STRVAR(tofile_doc,
-"tofile(f)\n\
-\n\
-Write all items (as machine values) to the file object f.");
+/*[clinic input]
+array.array.fromlist
+ list: object
+ /
+
+Append items to array from list.
+[clinic start generated code]*/
static PyObject *
-array_fromlist(arrayobject *self, PyObject *list)
+array_array_fromlist(arrayobject *self, PyObject *list)
+/*[clinic end generated code: output=26411c2d228a3e3f input=be2605a96c49680f]*/
{
Py_ssize_t n;
@@ -1402,13 +1531,15 @@ array_fromlist(arrayobject *self, PyObject *list)
return Py_None;
}
-PyDoc_STRVAR(fromlist_doc,
-"fromlist(list)\n\
-\n\
-Append items to array from list.");
+/*[clinic input]
+array.array.tolist
+
+Convert array to an ordinary list with the same items.
+[clinic start generated code]*/
static PyObject *
-array_tolist(arrayobject *self, PyObject *unused)
+array_array_tolist_impl(arrayobject *self)
+/*[clinic end generated code: output=00b60cc9eab8ef89 input=a8d7784a94f86b53]*/
{
PyObject *list = PyList_New(Py_SIZE(self));
Py_ssize_t i;
@@ -1429,11 +1560,6 @@ error:
return NULL;
}
-PyDoc_STRVAR(tolist_doc,
-"tolist() -> list\n\
-\n\
-Convert array to an ordinary list with the same items.");
-
static PyObject *
frombytes(arrayobject *self, Py_buffer *buffer)
{
@@ -1471,47 +1597,52 @@ frombytes(arrayobject *self, Py_buffer *buffer)
return Py_None;
}
+/*[clinic input]
+array.array.fromstring
+
+ buffer: Py_buffer(accept={str, buffer})
+ /
+
+Appends items from the string, interpreting it as an array of machine values, as if it had been read from a file using the fromfile() method).
+
+This method is deprecated. Use frombytes instead.
+[clinic start generated code]*/
+
static PyObject *
-array_fromstring(arrayobject *self, PyObject *args)
+array_array_fromstring_impl(arrayobject *self, Py_buffer *buffer)
+/*[clinic end generated code: output=31c4baa779df84ce input=a3341a512e11d773]*/
{
- Py_buffer buffer;
if (PyErr_WarnEx(PyExc_DeprecationWarning,
"fromstring() is deprecated. Use frombytes() instead.", 2) != 0)
return NULL;
- if (!PyArg_ParseTuple(args, "s*:fromstring", &buffer))
- return NULL;
- else
- return frombytes(self, &buffer);
+ return frombytes(self, buffer);
}
-PyDoc_STRVAR(fromstring_doc,
-"fromstring(string)\n\
-\n\
-Appends items from the string, interpreting it as an array of machine\n\
-values, as if it had been read from a file using the fromfile() method).\n\
-\n\
-This method is deprecated. Use frombytes instead.");
+/*[clinic input]
+array.array.frombytes
+ buffer: Py_buffer
+ /
+
+Appends items from the string, interpreting it as an array of machine values, as if it had been read from a file using the fromfile() method).
+[clinic start generated code]*/
static PyObject *
-array_frombytes(arrayobject *self, PyObject *args)
+array_array_frombytes_impl(arrayobject *self, Py_buffer *buffer)
+/*[clinic end generated code: output=d9842c8f7510a516 input=2bbf2b53ebfcc988]*/
{
- Py_buffer buffer;
- if (!PyArg_ParseTuple(args, "y*:frombytes", &buffer))
- return NULL;
- else
- return frombytes(self, &buffer);
+ return frombytes(self, buffer);
}
-PyDoc_STRVAR(frombytes_doc,
-"frombytes(bytestring)\n\
-\n\
-Appends items from the string, interpreting it as an array of machine\n\
-values, as if it had been read from a file using the fromfile() method).");
+/*[clinic input]
+array.array.tobytes
+Convert the array to an array of machine values and return the bytes representation.
+[clinic start generated code]*/
static PyObject *
-array_tobytes(arrayobject *self, PyObject *unused)
+array_array_tobytes_impl(arrayobject *self)
+/*[clinic end generated code: output=87318e4edcdc2bb6 input=90ee495f96de34f5]*/
{
if (Py_SIZE(self) <= PY_SSIZE_T_MAX / self->ob_descr->itemsize) {
return PyBytes_FromStringAndSize(self->ob_item,
@@ -1521,40 +1652,44 @@ array_tobytes(arrayobject *self, PyObject *unused)
}
}
-PyDoc_STRVAR(tobytes_doc,
-"tobytes() -> bytes\n\
-\n\
-Convert the array to an array of machine values and return the bytes\n\
-representation.");
+/*[clinic input]
+array.array.tostring
+Convert the array to an array of machine values and return the bytes representation.
+
+This method is deprecated. Use tobytes instead.
+[clinic start generated code]*/
static PyObject *
-array_tostring(arrayobject *self, PyObject *unused)
+array_array_tostring_impl(arrayobject *self)
+/*[clinic end generated code: output=7d6bd92745a2c8f3 input=b6c0ddee7b30457e]*/
{
if (PyErr_WarnEx(PyExc_DeprecationWarning,
"tostring() is deprecated. Use tobytes() instead.", 2) != 0)
return NULL;
- return array_tobytes(self, unused);
+ return array_array_tobytes_impl(self);
}
-PyDoc_STRVAR(tostring_doc,
-"tostring() -> bytes\n\
-\n\
-Convert the array to an array of machine values and return the bytes\n\
-representation.\n\
-\n\
-This method is deprecated. Use tobytes instead.");
+/*[clinic input]
+array.array.fromunicode
+
+ ustr: Py_UNICODE(zeroes=True)
+ /
+Extends this array with data from the unicode string ustr.
+
+The array must be a unicode type array; otherwise a ValueError is raised.
+Use array.frombytes(ustr.encode(...)) to append Unicode data to an array of
+some other type.
+[clinic start generated code]*/
static PyObject *
-array_fromunicode(arrayobject *self, PyObject *args)
+array_array_fromunicode_impl(arrayobject *self, Py_UNICODE *ustr,
+ Py_ssize_clean_t ustr_length)
+/*[clinic end generated code: output=ebb72fc16975e06d input=150f00566ffbca6e]*/
{
- Py_UNICODE *ustr;
- Py_ssize_t n;
char typecode;
- if (!PyArg_ParseTuple(args, "u#:fromunicode", &ustr, &n))
- return NULL;
typecode = self->ob_descr->typecode;
if (typecode != 'u') {
PyErr_SetString(PyExc_ValueError,
@@ -1562,29 +1697,30 @@ array_fromunicode(arrayobject *self, PyObject *args)
"unicode type arrays");
return NULL;
}
- if (n > 0) {
+ if (ustr_length > 0) {
Py_ssize_t old_size = Py_SIZE(self);
- if (array_resize(self, old_size + n) == -1)
+ if (array_resize(self, old_size + ustr_length) == -1)
return NULL;
memcpy(self->ob_item + old_size * sizeof(Py_UNICODE),
- ustr, n * sizeof(Py_UNICODE));
+ ustr, ustr_length * sizeof(Py_UNICODE));
}
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
-PyDoc_STRVAR(fromunicode_doc,
-"fromunicode(ustr)\n\
-\n\
-Extends this array with data from the unicode string ustr.\n\
-The array must be a unicode type array; otherwise a ValueError\n\
-is raised. Use array.frombytes(ustr.encode(...)) to\n\
-append Unicode data to an array of some other type.");
+/*[clinic input]
+array.array.tounicode
+
+Extends this array with data from the unicode string ustr.
+Convert the array to a unicode string. The array must be a unicode type array;
+otherwise a ValueError is raised. Use array.tobytes().decode() to obtain a
+unicode string from an array of some other type.
+[clinic start generated code]*/
static PyObject *
-array_tounicode(arrayobject *self, PyObject *unused)
+array_array_tounicode_impl(arrayobject *self)
+/*[clinic end generated code: output=08e442378336e1ef input=127242eebe70b66d]*/
{
char typecode;
typecode = self->ob_descr->typecode;
@@ -1596,70 +1732,24 @@ array_tounicode(arrayobject *self, PyObject *unused)
return PyUnicode_FromUnicode((Py_UNICODE *) self->ob_item, Py_SIZE(self));
}
-PyDoc_STRVAR(tounicode_doc,
-"tounicode() -> unicode\n\
-\n\
-Convert the array to a unicode string. The array must be\n\
-a unicode type array; otherwise a ValueError is raised. Use\n\
-array.tobytes().decode() to obtain a unicode string from\n\
-an array of some other type.");
+/*[clinic input]
+array.array.__sizeof__
+Size of the array in memory, in bytes.
+[clinic start generated code]*/
static PyObject *
-array_sizeof(arrayobject *self, PyObject *unused)
+array_array___sizeof___impl(arrayobject *self)
+/*[clinic end generated code: output=d8e1c61ebbe3eaed input=805586565bf2b3c6]*/
{
Py_ssize_t res;
- res = sizeof(arrayobject) + self->allocated * self->ob_descr->itemsize;
+ res = _PyObject_SIZE(Py_TYPE(self)) + self->allocated * self->ob_descr->itemsize;
return PyLong_FromSsize_t(res);
}
-PyDoc_STRVAR(sizeof_doc,
-"__sizeof__() -> int\n\
-\n\
-Size of the array in memory, in bytes.");
-
/*********************** Pickling support ************************/
-enum machine_format_code {
- UNKNOWN_FORMAT = -1,
- /* UNKNOWN_FORMAT is used to indicate that the machine format for an
- * array type code cannot be interpreted. When this occurs, a list of
- * Python objects is used to represent the content of the array
- * instead of using the memory content of the array directly. In that
- * case, the array_reconstructor mechanism is bypassed completely, and
- * the standard array constructor is used instead.
- *
- * This is will most likely occur when the machine doesn't use IEEE
- * floating-point numbers.
- */
-
- UNSIGNED_INT8 = 0,
- SIGNED_INT8 = 1,
- UNSIGNED_INT16_LE = 2,
- UNSIGNED_INT16_BE = 3,
- SIGNED_INT16_LE = 4,
- SIGNED_INT16_BE = 5,
- UNSIGNED_INT32_LE = 6,
- UNSIGNED_INT32_BE = 7,
- SIGNED_INT32_LE = 8,
- SIGNED_INT32_BE = 9,
- UNSIGNED_INT64_LE = 10,
- UNSIGNED_INT64_BE = 11,
- SIGNED_INT64_LE = 12,
- SIGNED_INT64_BE = 13,
- IEEE_754_FLOAT_LE = 14,
- IEEE_754_FLOAT_BE = 15,
- IEEE_754_DOUBLE_LE = 16,
- IEEE_754_DOUBLE_BE = 17,
- UTF16_LE = 18,
- UTF16_BE = 19,
- UTF32_LE = 20,
- UTF32_BE = 21
-};
-#define MACHINE_FORMAT_CODE_MIN 0
-#define MACHINE_FORMAT_CODE_MAX 21
-
static const struct mformatdescr {
size_t size;
int is_signed;
@@ -1835,21 +1925,29 @@ make_array(PyTypeObject *arraytype, char typecode, PyObject *items)
* This functions is a special constructor used when unpickling an array. It
* provides a portable way to rebuild an array from its memory representation.
*/
+/*[clinic input]
+array._array_reconstructor
+
+ arraytype: object(type="PyTypeObject *")
+ typecode: int(accept={str})
+ mformat_code: int(type="enum machine_format_code")
+ items: object
+ /
+
+Internal. Used for pickling support.
+[clinic start generated code]*/
+
static PyObject *
-array_reconstructor(PyObject *self, PyObject *args)
+array__array_reconstructor_impl(PyModuleDef *module, PyTypeObject *arraytype,
+ int typecode,
+ enum machine_format_code mformat_code,
+ PyObject *items)
+/*[clinic end generated code: output=6ecbf0e8e4d92ab9 input=2464dc8f4c7736b5]*/
{
- PyTypeObject *arraytype;
- PyObject *items;
PyObject *converted_items;
PyObject *result;
- int typecode;
- enum machine_format_code mformat_code;
struct arraydescr *descr;
- if (!PyArg_ParseTuple(args, "OCiO:array._array_reconstructor",
- &arraytype, &typecode, &mformat_code, &items))
- return NULL;
-
if (!PyType_Check(arraytype)) {
PyErr_Format(PyExc_TypeError,
"first argument must a type object, not %.200s",
@@ -1992,7 +2090,7 @@ array_reconstructor(PyObject *self, PyObject *args)
* that fits better. This may result in an array with narrower
* or wider elements.
*
- * For example, if a 32-bit machine pickles a L-code array of
+ * For example, if a 32-bit machine pickles an L-code array of
* unsigned longs, then the array will be unpickled by 64-bit
* machine as an I-code array of unsigned ints.
*
@@ -2000,7 +2098,7 @@ array_reconstructor(PyObject *self, PyObject *args)
*/
for (descr = descriptors; descr->typecode != '\0'; descr++) {
if (descr->is_integer_type &&
- descr->itemsize == mf_descr.size &&
+ (size_t)descr->itemsize == mf_descr.size &&
descr->is_signed == mf_descr.is_signed)
typecode = descr->typecode;
}
@@ -2038,13 +2136,23 @@ array_reconstructor(PyObject *self, PyObject *args)
return result;
}
+/*[clinic input]
+array.array.__reduce_ex__
+
+ value: object
+ /
+
+Return state information for pickling.
+[clinic start generated code]*/
+
static PyObject *
-array_reduce_ex(arrayobject *array, PyObject *value)
+array_array___reduce_ex__(arrayobject *self, PyObject *value)
+/*[clinic end generated code: output=051e0a6175d0eddb input=c36c3f85de7df6cd]*/
{
PyObject *dict;
PyObject *result;
PyObject *array_str;
- int typecode = array->ob_descr->typecode;
+ int typecode = self->ob_descr->typecode;
int mformat_code;
static PyObject *array_reconstructor = NULL;
long protocol;
@@ -2072,7 +2180,7 @@ array_reduce_ex(arrayobject *array, PyObject *value)
if (protocol == -1 && PyErr_Occurred())
return NULL;
- dict = _PyObject_GetAttrId((PyObject *)array, &PyId___dict__);
+ dict = _PyObject_GetAttrId((PyObject *)self, &PyId___dict__);
if (dict == NULL) {
if (!PyErr_ExceptionMatches(PyExc_AttributeError))
return NULL;
@@ -2095,32 +2203,30 @@ array_reduce_ex(arrayobject *array, PyObject *value)
* coercing unicode objects to bytes in array_reconstructor.
*/
PyObject *list;
- list = array_tolist(array, NULL);
+ list = array_array_tolist_impl(self);
if (list == NULL) {
Py_DECREF(dict);
return NULL;
}
result = Py_BuildValue(
- "O(CO)O", Py_TYPE(array), typecode, list, dict);
+ "O(CO)O", Py_TYPE(self), typecode, list, dict);
Py_DECREF(list);
Py_DECREF(dict);
return result;
}
- array_str = array_tobytes(array, NULL);
+ array_str = array_array_tobytes_impl(self);
if (array_str == NULL) {
Py_DECREF(dict);
return NULL;
}
result = Py_BuildValue(
- "O(OCiN)O", array_reconstructor, Py_TYPE(array), typecode,
+ "O(OCiN)O", array_reconstructor, Py_TYPE(self), typecode,
mformat_code, array_str, dict);
Py_DECREF(dict);
return result;
}
-PyDoc_STRVAR(reduce_doc, "Return state information for pickling.");
-
static PyObject *
array_get_typecode(arrayobject *a, void *closure)
{
@@ -2143,55 +2249,31 @@ static PyGetSetDef array_getsets [] = {
};
static PyMethodDef array_methods[] = {
- {"append", (PyCFunction)array_append, METH_O,
- append_doc},
- {"buffer_info", (PyCFunction)array_buffer_info, METH_NOARGS,
- buffer_info_doc},
- {"byteswap", (PyCFunction)array_byteswap, METH_NOARGS,
- byteswap_doc},
- {"__copy__", (PyCFunction)array_copy, METH_NOARGS,
- copy_doc},
- {"count", (PyCFunction)array_count, METH_O,
- count_doc},
- {"__deepcopy__", (PyCFunction)array_copy, METH_O,
- copy_doc},
- {"extend", (PyCFunction)array_extend, METH_O,
- extend_doc},
- {"fromfile", (PyCFunction)array_fromfile, METH_VARARGS,
- fromfile_doc},
- {"fromlist", (PyCFunction)array_fromlist, METH_O,
- fromlist_doc},
- {"fromstring", (PyCFunction)array_fromstring, METH_VARARGS,
- fromstring_doc},
- {"frombytes", (PyCFunction)array_frombytes, METH_VARARGS,
- frombytes_doc},
- {"fromunicode", (PyCFunction)array_fromunicode, METH_VARARGS,
- fromunicode_doc},
- {"index", (PyCFunction)array_index, METH_O,
- index_doc},
- {"insert", (PyCFunction)array_insert, METH_VARARGS,
- insert_doc},
- {"pop", (PyCFunction)array_pop, METH_VARARGS,
- pop_doc},
- {"__reduce_ex__", (PyCFunction)array_reduce_ex, METH_O,
- reduce_doc},
- {"remove", (PyCFunction)array_remove, METH_O,
- remove_doc},
- {"reverse", (PyCFunction)array_reverse, METH_NOARGS,
- reverse_doc},
- {"tofile", (PyCFunction)array_tofile, METH_O,
- tofile_doc},
- {"tolist", (PyCFunction)array_tolist, METH_NOARGS,
- tolist_doc},
- {"tostring", (PyCFunction)array_tostring, METH_NOARGS,
- tostring_doc},
- {"tobytes", (PyCFunction)array_tobytes, METH_NOARGS,
- tobytes_doc},
- {"tounicode", (PyCFunction)array_tounicode, METH_NOARGS,
- tounicode_doc},
- {"__sizeof__", (PyCFunction)array_sizeof, METH_NOARGS,
- sizeof_doc},
- {NULL, NULL} /* sentinel */
+ ARRAY_ARRAY_APPEND_METHODDEF
+ ARRAY_ARRAY_BUFFER_INFO_METHODDEF
+ ARRAY_ARRAY_BYTESWAP_METHODDEF
+ ARRAY_ARRAY___COPY___METHODDEF
+ ARRAY_ARRAY_COUNT_METHODDEF
+ ARRAY_ARRAY___DEEPCOPY___METHODDEF
+ ARRAY_ARRAY_EXTEND_METHODDEF
+ ARRAY_ARRAY_FROMFILE_METHODDEF
+ ARRAY_ARRAY_FROMLIST_METHODDEF
+ ARRAY_ARRAY_FROMSTRING_METHODDEF
+ ARRAY_ARRAY_FROMBYTES_METHODDEF
+ ARRAY_ARRAY_FROMUNICODE_METHODDEF
+ ARRAY_ARRAY_INDEX_METHODDEF
+ ARRAY_ARRAY_INSERT_METHODDEF
+ ARRAY_ARRAY_POP_METHODDEF
+ ARRAY_ARRAY___REDUCE_EX___METHODDEF
+ ARRAY_ARRAY_REMOVE_METHODDEF
+ ARRAY_ARRAY_REVERSE_METHODDEF
+ ARRAY_ARRAY_TOFILE_METHODDEF
+ ARRAY_ARRAY_TOLIST_METHODDEF
+ ARRAY_ARRAY_TOSTRING_METHODDEF
+ ARRAY_ARRAY_TOBYTES_METHODDEF
+ ARRAY_ARRAY_TOUNICODE_METHODDEF
+ ARRAY_ARRAY___SIZEOF___METHODDEF
+ {NULL, NULL} /* sentinel */
};
static PyObject *
@@ -2207,9 +2289,9 @@ array_repr(arrayobject *a)
return PyUnicode_FromFormat("array('%c')", (int)typecode);
}
if (typecode == 'u') {
- v = array_tounicode(a, NULL);
+ v = array_array_tounicode_impl(a);
} else {
- v = array_tolist(a, NULL);
+ v = array_array_tolist_impl(a);
}
if (v == NULL)
return NULL;
@@ -2446,7 +2528,11 @@ static const void *emptybuf = "";
static int
array_buffer_getbuf(arrayobject *self, Py_buffer *view, int flags)
{
- if (view==NULL) goto finish;
+ if (view == NULL) {
+ PyErr_SetString(PyExc_BufferError,
+ "array_buffer_getbuf: view==NULL argument is obsolete");
+ return -1;
+ }
view->buf = (void *)self->ob_item;
view->obj = (PyObject*)self;
@@ -2476,7 +2562,6 @@ array_buffer_getbuf(arrayobject *self, Py_buffer *view, int flags)
#endif
}
- finish:
self->ob_exports++;
return 0;
}
@@ -2586,15 +2671,9 @@ array_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
}
else if (initial != NULL && (PyByteArray_Check(initial) ||
PyBytes_Check(initial))) {
- PyObject *t_initial, *v;
- t_initial = PyTuple_Pack(1, initial);
- if (t_initial == NULL) {
- Py_DECREF(a);
- return NULL;
- }
- v = array_frombytes((arrayobject *)a,
- t_initial);
- Py_DECREF(t_initial);
+ PyObject *v;
+ v = array_array_frombytes((arrayobject *)a,
+ initial);
if (v == NULL) {
Py_DECREF(a);
return NULL;
@@ -2766,16 +2845,10 @@ static PyTypeObject Arraytype = {
/*********************** Array Iterator **************************/
-typedef struct {
- PyObject_HEAD
- Py_ssize_t index;
- arrayobject *ao;
- PyObject * (*getitem)(struct arrayobject *, Py_ssize_t);
-} arrayiterobject;
-
-static PyTypeObject PyArrayIter_Type;
-
-#define PyArrayIter_Check(op) PyObject_TypeCheck(op, &PyArrayIter_Type)
+/*[clinic input]
+class array.arrayiterator "arrayiterobject *" "&PyArrayIter_Type"
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=5aefd2d74d8c8e30]*/
static PyObject *
array_iter(arrayobject *ao)
@@ -2823,33 +2896,47 @@ arrayiter_traverse(arrayiterobject *it, visitproc visit, void *arg)
return 0;
}
+/*[clinic input]
+array.arrayiterator.__reduce__
+
+Return state information for pickling.
+[clinic start generated code]*/
+
static PyObject *
-arrayiter_reduce(arrayiterobject *it)
+array_arrayiterator___reduce___impl(arrayiterobject *self)
+/*[clinic end generated code: output=7898a52e8e66e016 input=a062ea1e9951417a]*/
{
return Py_BuildValue("N(O)n", _PyObject_GetBuiltin("iter"),
- it->ao, it->index);
+ self->ao, self->index);
}
+/*[clinic input]
+array.arrayiterator.__setstate__
+
+ state: object
+ /
+
+Set state information for unpickling.
+[clinic start generated code]*/
+
static PyObject *
-arrayiter_setstate(arrayiterobject *it, PyObject *state)
+array_arrayiterator___setstate__(arrayiterobject *self, PyObject *state)
+/*[clinic end generated code: output=397da9904e443cbe input=f47d5ceda19e787b]*/
{
Py_ssize_t index = PyLong_AsSsize_t(state);
if (index == -1 && PyErr_Occurred())
return NULL;
if (index < 0)
index = 0;
- else if (index > Py_SIZE(it->ao))
- index = Py_SIZE(it->ao); /* iterator exhausted */
- it->index = index;
+ else if (index > Py_SIZE(self->ao))
+ index = Py_SIZE(self->ao); /* iterator exhausted */
+ self->index = index;
Py_RETURN_NONE;
}
-PyDoc_STRVAR(setstate_doc, "Set state information for unpickling.");
static PyMethodDef arrayiter_methods[] = {
- {"__reduce__", (PyCFunction)arrayiter_reduce, METH_NOARGS,
- reduce_doc},
- {"__setstate__", (PyCFunction)arrayiter_setstate, METH_O,
- setstate_doc},
+ ARRAY_ARRAYITERATOR___REDUCE___METHODDEF
+ ARRAY_ARRAYITERATOR___SETSTATE___METHODDEF
{NULL, NULL} /* sentinel */
};
@@ -2890,39 +2977,21 @@ static PyTypeObject PyArrayIter_Type = {
/* No functions in array module. */
static PyMethodDef a_methods[] = {
- {"_array_reconstructor", array_reconstructor, METH_VARARGS,
- PyDoc_STR("Internal. Used for pickling support.")},
+ ARRAY__ARRAY_RECONSTRUCTOR_METHODDEF
{NULL, NULL, 0, NULL} /* Sentinel */
};
-static struct PyModuleDef arraymodule = {
- PyModuleDef_HEAD_INIT,
- "array",
- module_doc,
- -1,
- a_methods,
- NULL,
- NULL,
- NULL,
- NULL
-};
-
-
-PyMODINIT_FUNC
-PyInit_array(void)
+static int
+array_modexec(PyObject *m)
{
- PyObject *m;
char buffer[Py_ARRAY_LENGTH(descriptors)], *p;
PyObject *typecodes;
Py_ssize_t size = 0;
struct arraydescr *descr;
if (PyType_Ready(&Arraytype) < 0)
- return NULL;
+ return -1;
Py_TYPE(&PyArrayIter_Type) = &PyType_Type;
- m = PyModule_Create(&arraymodule);
- if (m == NULL)
- return NULL;
Py_INCREF((PyObject *)&Arraytype);
PyModule_AddObject(m, "ArrayType", (PyObject *)&Arraytype);
@@ -2945,5 +3014,30 @@ PyInit_array(void)
Py_DECREF(m);
m = NULL;
}
- return m;
+ return 0;
+}
+
+static PyModuleDef_Slot arrayslots[] = {
+ {Py_mod_exec, array_modexec},
+ {0, NULL}
+};
+
+
+static struct PyModuleDef arraymodule = {
+ PyModuleDef_HEAD_INIT,
+ "array",
+ module_doc,
+ 0,
+ a_methods,
+ arrayslots,
+ NULL,
+ NULL,
+ NULL
+};
+
+
+PyMODINIT_FUNC
+PyInit_array(void)
+{
+ return PyModuleDef_Init(&arraymodule);
}
diff --git a/Modules/atexitmodule.c b/Modules/atexitmodule.c
index b9c344ac3d..3cdf2d7e56 100644
--- a/Modules/atexitmodule.c
+++ b/Modules/atexitmodule.c
@@ -60,7 +60,7 @@ atexit_cleanup(atexitmodule_state *modstate)
modstate->ncallbacks = 0;
}
-/* Installed into pythonrun.c's atexit mechanism */
+/* Installed into pylifecycle.c's atexit mechanism */
static void
atexit_callfuncs(void)
@@ -94,7 +94,7 @@ atexit_callfuncs(void)
if (exc_type) {
Py_DECREF(exc_type);
Py_XDECREF(exc_value);
- Py_XDECREF(exc_tb);
+ Py_XDECREF(exc_tb);
}
PyErr_Fetch(&exc_type, &exc_value, &exc_tb);
if (!PyErr_ExceptionMatches(PyExc_SystemExit)) {
@@ -147,7 +147,7 @@ atexit_register(PyObject *self, PyObject *args, PyObject *kwargs)
if (PyTuple_GET_SIZE(args) == 0) {
PyErr_SetString(PyExc_TypeError,
"register() takes at least 1 argument (0 given)");
- return NULL;
+ return NULL;
}
func = PyTuple_GET_ITEM(args, 0);
@@ -159,7 +159,7 @@ atexit_register(PyObject *self, PyObject *args, PyObject *kwargs)
new_callback = PyMem_Malloc(sizeof(atexit_callback));
if (new_callback == NULL)
- return PyErr_NoMemory();
+ return PyErr_NoMemory();
new_callback->args = PyTuple_GetSlice(args, 1, PyTuple_GET_SIZE(args));
if (new_callback->args == NULL) {
@@ -336,7 +336,7 @@ PyInit_atexit(void)
modstate = GET_ATEXIT_STATE(m);
modstate->callback_len = 32;
modstate->ncallbacks = 0;
- modstate->atexit_callbacks = PyMem_New(atexit_callback*,
+ modstate->atexit_callbacks = PyMem_New(atexit_callback*,
modstate->callback_len);
if (modstate->atexit_callbacks == NULL)
return NULL;
diff --git a/Modules/audioop.c b/Modules/audioop.c
index 9a5d8c16bb..306937e404 100644
--- a/Modules/audioop.c
+++ b/Modules/audioop.c
@@ -46,7 +46,7 @@ fbound(double val, double minval, double maxval)
*/
#define BIAS 0x84 /* define the add-in bias for 16 bit samples */
#define CLIP 32635
-#define SIGN_BIT (0x80) /* Sign bit for a A-law byte. */
+#define SIGN_BIT (0x80) /* Sign bit for an A-law byte. */
#define QUANT_MASK (0xf) /* Quantization field mask. */
#define SEG_SHIFT (4) /* Left shift for segment number. */
#define SEG_MASK (0x70) /* Segment field mask. */
@@ -217,7 +217,7 @@ static PyInt16 _st_alaw2linear16[256] = {
};
/*
- * linear2alaw() accepts an 13-bit signed integer and encodes it as A-law data
+ * linear2alaw() accepts a 13-bit signed integer and encodes it as A-law data
* stored in an unsigned char. This function should only be called with
* the data shifted such that it only contains information in the lower
* 13-bits.
@@ -391,10 +391,9 @@ audioop_check_parameters(Py_ssize_t len, int size)
}
/*[clinic input]
-output preset file
module audioop
[clinic start generated code]*/
-/*[clinic end generated code: output=da39a3ee5e6b4b0d input=5619f935f269199a]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=8fa8f6611be3591a]*/
/*[clinic input]
audioop.getsample
@@ -408,8 +407,9 @@ Return the value of sample index from the fragment.
[clinic start generated code]*/
static PyObject *
-audioop_getsample_impl(PyModuleDef *module, Py_buffer *fragment, int width, Py_ssize_t index)
-/*[clinic end generated code: output=f4482497e6f6e78f input=88edbe2871393549]*/
+audioop_getsample_impl(PyModuleDef *module, Py_buffer *fragment, int width,
+ Py_ssize_t index)
+/*[clinic end generated code: output=3995e189fdc8ec16 input=88edbe2871393549]*/
{
int val;
@@ -594,8 +594,9 @@ Try to match reference as well as possible to a portion of fragment.
[clinic start generated code]*/
static PyObject *
-audioop_findfit_impl(PyModuleDef *module, Py_buffer *fragment, Py_buffer *reference)
-/*[clinic end generated code: output=505fd04d4244db31 input=62c305605e183c9a]*/
+audioop_findfit_impl(PyModuleDef *module, Py_buffer *fragment,
+ Py_buffer *reference)
+/*[clinic end generated code: output=609eedf5d823d6dd input=62c305605e183c9a]*/
{
const short *cp1, *cp2;
Py_ssize_t len1, len2;
@@ -662,8 +663,9 @@ Return a factor F such that rms(add(fragment, mul(reference, -F))) is minimal.
[clinic start generated code]*/
static PyObject *
-audioop_findfactor_impl(PyModuleDef *module, Py_buffer *fragment, Py_buffer *reference)
-/*[clinic end generated code: output=ddf35a1e57575ce4 input=816680301d012b21]*/
+audioop_findfactor_impl(PyModuleDef *module, Py_buffer *fragment,
+ Py_buffer *reference)
+/*[clinic end generated code: output=5566a8c55de54f99 input=816680301d012b21]*/
{
const short *cp1, *cp2;
Py_ssize_t len;
@@ -703,8 +705,9 @@ Search fragment for a slice of specified number of samples with maximum energy.
[clinic start generated code]*/
static PyObject *
-audioop_findmax_impl(PyModuleDef *module, Py_buffer *fragment, Py_ssize_t length)
-/*[clinic end generated code: output=21d0c2a1e5655134 input=2f304801ed42383c]*/
+audioop_findmax_impl(PyModuleDef *module, Py_buffer *fragment,
+ Py_ssize_t length)
+/*[clinic end generated code: output=01fe796fad2573bb input=2f304801ed42383c]*/
{
const short *cp1;
Py_ssize_t len1;
@@ -897,8 +900,9 @@ Return a fragment that has all samples in the original fragment multiplied by th
[clinic start generated code]*/
static PyObject *
-audioop_mul_impl(PyModuleDef *module, Py_buffer *fragment, int width, double factor)
-/*[clinic end generated code: output=a697ebbd5852d38f input=c726667baa157d3c]*/
+audioop_mul_impl(PyModuleDef *module, Py_buffer *fragment, int width,
+ double factor)
+/*[clinic end generated code: output=1c7c31191ac86b10 input=c726667baa157d3c]*/
{
signed char *ncp;
Py_ssize_t i;
@@ -938,8 +942,9 @@ Convert a stereo fragment to a mono fragment.
[clinic start generated code]*/
static PyObject *
-audioop_tomono_impl(PyModuleDef *module, Py_buffer *fragment, int width, double lfactor, double rfactor)
-/*[clinic end generated code: output=436e7710521661dd input=c4ec949b3f4dddfa]*/
+audioop_tomono_impl(PyModuleDef *module, Py_buffer *fragment, int width,
+ double lfactor, double rfactor)
+/*[clinic end generated code: output=553f547c5e29e3b6 input=c4ec949b3f4dddfa]*/
{
signed char *cp, *ncp;
Py_ssize_t len, i;
@@ -986,8 +991,9 @@ Generate a stereo fragment from a mono fragment.
[clinic start generated code]*/
static PyObject *
-audioop_tostereo_impl(PyModuleDef *module, Py_buffer *fragment, int width, double lfactor, double rfactor)
-/*[clinic end generated code: output=6ff50681c87f4c1c input=27b6395ebfdff37a]*/
+audioop_tostereo_impl(PyModuleDef *module, Py_buffer *fragment, int width,
+ double lfactor, double rfactor)
+/*[clinic end generated code: output=697bb6ba41e9dd2c input=27b6395ebfdff37a]*/
{
signed char *ncp;
Py_ssize_t i;
@@ -1033,8 +1039,9 @@ Return a fragment which is the addition of the two samples passed as parameters.
[clinic start generated code]*/
static PyObject *
-audioop_add_impl(PyModuleDef *module, Py_buffer *fragment1, Py_buffer *fragment2, int width)
-/*[clinic end generated code: output=f9218bf9ea75c3f1 input=4a8d4bae4c1605c7]*/
+audioop_add_impl(PyModuleDef *module, Py_buffer *fragment1,
+ Py_buffer *fragment2, int width)
+/*[clinic end generated code: output=fe6c12f143e0b027 input=4a8d4bae4c1605c7]*/
{
signed char *ncp;
Py_ssize_t i;
@@ -1091,8 +1098,9 @@ Return a fragment that is the original fragment with a bias added to each sample
[clinic start generated code]*/
static PyObject *
-audioop_bias_impl(PyModuleDef *module, Py_buffer *fragment, int width, int bias)
-/*[clinic end generated code: output=8ec80b3f5d510a51 input=2b5cce5c3bb4838c]*/
+audioop_bias_impl(PyModuleDef *module, Py_buffer *fragment, int width,
+ int bias)
+/*[clinic end generated code: output=ac1f4dda20a01c26 input=2b5cce5c3bb4838c]*/
{
signed char *ncp;
Py_ssize_t i;
@@ -1218,8 +1226,9 @@ Convert samples between 1-, 2-, 3- and 4-byte formats.
[clinic start generated code]*/
static PyObject *
-audioop_lin2lin_impl(PyModuleDef *module, Py_buffer *fragment, int width, int newwidth)
-/*[clinic end generated code: output=3f9468a74472a93e input=5ce08c8aa2f24d96]*/
+audioop_lin2lin_impl(PyModuleDef *module, Py_buffer *fragment, int width,
+ int newwidth)
+/*[clinic end generated code: output=cb6ca950d1df9898 input=5ce08c8aa2f24d96]*/
{
unsigned char *ncp;
Py_ssize_t i, j;
@@ -1275,8 +1284,10 @@ Convert the frame rate of the input fragment.
[clinic start generated code]*/
static PyObject *
-audioop_ratecv_impl(PyModuleDef *module, Py_buffer *fragment, int width, int nchannels, int inrate, int outrate, PyObject *state, int weightA, int weightB)
-/*[clinic end generated code: output=5585dddc4b5ff236 input=aff3acdc94476191]*/
+audioop_ratecv_impl(PyModuleDef *module, Py_buffer *fragment, int width,
+ int nchannels, int inrate, int outrate, PyObject *state,
+ int weightA, int weightB)
+/*[clinic end generated code: output=59e1787bfa49b9d9 input=aff3acdc94476191]*/
{
char *cp, *ncp;
Py_ssize_t len;
@@ -1602,8 +1613,9 @@ Convert samples to 4 bit Intel/DVI ADPCM encoding.
[clinic start generated code]*/
static PyObject *
-audioop_lin2adpcm_impl(PyModuleDef *module, Py_buffer *fragment, int width, PyObject *state)
-/*[clinic end generated code: output=4654c29d2731fafe input=12919d549b90c90a]*/
+audioop_lin2adpcm_impl(PyModuleDef *module, Py_buffer *fragment, int width,
+ PyObject *state)
+/*[clinic end generated code: output=93f0996f592b5ce5 input=12919d549b90c90a]*/
{
signed char *ncp;
Py_ssize_t i;
@@ -1729,8 +1741,9 @@ Decode an Intel/DVI ADPCM coded fragment to a linear fragment.
[clinic start generated code]*/
static PyObject *
-audioop_adpcm2lin_impl(PyModuleDef *module, Py_buffer *fragment, int width, PyObject *state)
-/*[clinic end generated code: output=371965cdcc0aa69b input=f5221144f5ca9ef0]*/
+audioop_adpcm2lin_impl(PyModuleDef *module, Py_buffer *fragment, int width,
+ PyObject *state)
+/*[clinic end generated code: output=236cf6dc2c829181 input=f5221144f5ca9ef0]*/
{
signed char *cp;
signed char *ncp;
diff --git a/Modules/binascii.c b/Modules/binascii.c
index ea14d3c027..d920d23871 100644
--- a/Modules/binascii.c
+++ b/Modules/binascii.c
@@ -56,6 +56,7 @@
#define PY_SSIZE_T_CLEAN
#include "Python.h"
+#include "pystrhex.h"
#ifdef USE_ZLIB_CRC32
#include "zlib.h"
#endif
@@ -184,10 +185,9 @@ static unsigned short crctab_hqx[256] = {
};
/*[clinic input]
-output preset file
module binascii
[clinic start generated code]*/
-/*[clinic end generated code: output=da39a3ee5e6b4b0d input=44c6f840ce708f0c]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=de89fb46bcaf3fec]*/
/*[python input]
@@ -1118,33 +1118,7 @@ static PyObject *
binascii_b2a_hex_impl(PyModuleDef *module, Py_buffer *data)
/*[clinic end generated code: output=179318922c2f8fda input=96423cfa299ff3b1]*/
{
- char* argbuf;
- Py_ssize_t arglen;
- PyObject *retval;
- char* retbuf;
- Py_ssize_t i, j;
-
- argbuf = data->buf;
- arglen = data->len;
-
- assert(arglen >= 0);
- if (arglen > PY_SSIZE_T_MAX / 2)
- return PyErr_NoMemory();
-
- retval = PyBytes_FromStringAndSize(NULL, arglen*2);
- if (!retval)
- return NULL;
- retbuf = PyBytes_AS_STRING(retval);
-
- /* make hex version of string, taken from shamodule.c */
- for (i=j=0; i < arglen; i++) {
- unsigned char c;
- c = (argbuf[i] >> 4) & 0xf;
- retbuf[j++] = Py_hexdigits[c];
- c = argbuf[i] & 0xf;
- retbuf[j++] = Py_hexdigits[c];
- }
- return retval;
+ return _Py_strhex_bytes((const char *)data->buf, data->len);
}
/*[clinic input]
@@ -1159,7 +1133,7 @@ static PyObject *
binascii_hexlify_impl(PyModuleDef *module, Py_buffer *data)
/*[clinic end generated code: output=6098440091fb61dc input=2e3afae7f083f061]*/
{
- return binascii_b2a_hex_impl(module, data);
+ return _Py_strhex_bytes((const char *)data->buf, data->len);
}
static int
@@ -1382,8 +1356,9 @@ are both encoded. When quotetabs is set, space and tabs are encoded.
[clinic start generated code]*/
static PyObject *
-binascii_b2a_qp_impl(PyModuleDef *module, Py_buffer *data, int quotetabs, int istext, int header)
-/*[clinic end generated code: output=ff2991ba640fff3e input=7f2a9aaa008e92b2]*/
+binascii_b2a_qp_impl(PyModuleDef *module, Py_buffer *data, int quotetabs,
+ int istext, int header)
+/*[clinic end generated code: output=a87ca9ccb94e2a9f input=7f2a9aaa008e92b2]*/
{
Py_ssize_t in, out;
unsigned char *databuf, *odata;
diff --git a/Modules/cjkcodecs/_codecs_iso2022.c b/Modules/cjkcodecs/_codecs_iso2022.c
index 5c401aaf8e..1ce4218f30 100644
--- a/Modules/cjkcodecs/_codecs_iso2022.c
+++ b/Modules/cjkcodecs/_codecs_iso2022.c
@@ -292,7 +292,7 @@ iso2022processesc(const void *config, MultibyteCodec_State *state,
const unsigned char **inbuf, Py_ssize_t *inleft)
{
unsigned char charset, designation;
- Py_ssize_t i, esclen;
+ Py_ssize_t i, esclen = 0;
for (i = 1;i < MAX_ESCSEQLEN;i++) {
if (i >= *inleft)
@@ -307,10 +307,9 @@ iso2022processesc(const void *config, MultibyteCodec_State *state,
}
}
- if (i >= MAX_ESCSEQLEN)
- return 1; /* unterminated escape sequence */
-
switch (esclen) {
+ case 0:
+ return 1; /* unterminated escape sequence */
case 3:
if (INBYTE2 == '$') {
charset = INBYTE3 | CHARSET_DBCS;
diff --git a/Modules/cjkcodecs/cjkcodecs.h b/Modules/cjkcodecs/cjkcodecs.h
index d15ccfbb07..b72a3f0028 100644
--- a/Modules/cjkcodecs/cjkcodecs.h
+++ b/Modules/cjkcodecs/cjkcodecs.h
@@ -328,22 +328,26 @@ find_pairencmap(ucs2_t body, ucs2_t modifier,
min = 0;
max = haystacksize;
- for (pos = haystacksize >> 1; min != max; pos = (min + max) >> 1)
+ for (pos = haystacksize >> 1; min != max; pos = (min + max) >> 1) {
if (value < haystack[pos].uniseq) {
- if (max == pos) break;
- else max = pos;
+ if (max != pos) {
+ max = pos;
+ continue;
+ }
}
else if (value > haystack[pos].uniseq) {
- if (min == pos) break;
- else min = pos;
+ if (min != pos) {
+ min = pos;
+ continue;
+ }
}
- else
- break;
+ break;
+ }
- if (value == haystack[pos].uniseq)
- return haystack[pos].code;
- else
- return DBCINV;
+ if (value == haystack[pos].uniseq) {
+ return haystack[pos].code;
+ }
+ return DBCINV;
}
#endif
@@ -362,7 +366,7 @@ importmap(const char *modname, const char *symbol,
if (mod == NULL)
return -1;
- o = PyObject_GetAttrString(mod, (char*)symbol);
+ o = PyObject_GetAttrString(mod, symbol);
if (o == NULL)
goto errorexit;
else if (!PyCapsule_IsValid(o, PyMultibyteCodec_CAPSULE_NAME)) {
@@ -401,7 +405,7 @@ errorexit:
NULL, \
NULL \
}; \
- PyObject* \
+ PyMODINIT_FUNC \
PyInit__codecs_##loc(void) \
{ \
PyObject *m = PyModule_Create(&__module); \
diff --git a/Modules/cjkcodecs/clinic/multibytecodec.c.h b/Modules/cjkcodecs/clinic/multibytecodec.c.h
new file mode 100644
index 0000000000..8a47ff88a6
--- /dev/null
+++ b/Modules/cjkcodecs/clinic/multibytecodec.c.h
@@ -0,0 +1,320 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(_multibytecodec_MultibyteCodec_encode__doc__,
+"encode($self, /, input, errors=None)\n"
+"--\n"
+"\n"
+"Return an encoded string version of `input\'.\n"
+"\n"
+"\'errors\' may be given to set a different error handling scheme. Default is\n"
+"\'strict\' meaning that encoding errors raise a UnicodeEncodeError. Other possible\n"
+"values are \'ignore\', \'replace\' and \'xmlcharrefreplace\' as well as any other name\n"
+"registered with codecs.register_error that can handle UnicodeEncodeErrors.");
+
+#define _MULTIBYTECODEC_MULTIBYTECODEC_ENCODE_METHODDEF \
+ {"encode", (PyCFunction)_multibytecodec_MultibyteCodec_encode, METH_VARARGS|METH_KEYWORDS, _multibytecodec_MultibyteCodec_encode__doc__},
+
+static PyObject *
+_multibytecodec_MultibyteCodec_encode_impl(MultibyteCodecObject *self,
+ PyObject *input,
+ const char *errors);
+
+static PyObject *
+_multibytecodec_MultibyteCodec_encode(MultibyteCodecObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"input", "errors", NULL};
+ PyObject *input;
+ const char *errors = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|z:encode", _keywords,
+ &input, &errors))
+ goto exit;
+ return_value = _multibytecodec_MultibyteCodec_encode_impl(self, input, errors);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_multibytecodec_MultibyteCodec_decode__doc__,
+"decode($self, /, input, errors=None)\n"
+"--\n"
+"\n"
+"Decodes \'input\'.\n"
+"\n"
+"\'errors\' may be given to set a different error handling scheme. Default is\n"
+"\'strict\' meaning that encoding errors raise a UnicodeDecodeError. Other possible\n"
+"values are \'ignore\' and \'replace\' as well as any other name registered with\n"
+"codecs.register_error that is able to handle UnicodeDecodeErrors.\"");
+
+#define _MULTIBYTECODEC_MULTIBYTECODEC_DECODE_METHODDEF \
+ {"decode", (PyCFunction)_multibytecodec_MultibyteCodec_decode, METH_VARARGS|METH_KEYWORDS, _multibytecodec_MultibyteCodec_decode__doc__},
+
+static PyObject *
+_multibytecodec_MultibyteCodec_decode_impl(MultibyteCodecObject *self,
+ Py_buffer *input,
+ const char *errors);
+
+static PyObject *
+_multibytecodec_MultibyteCodec_decode(MultibyteCodecObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"input", "errors", NULL};
+ Py_buffer input = {NULL, NULL};
+ const char *errors = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "y*|z:decode", _keywords,
+ &input, &errors))
+ goto exit;
+ return_value = _multibytecodec_MultibyteCodec_decode_impl(self, &input, errors);
+
+exit:
+ /* Cleanup for input */
+ if (input.obj)
+ PyBuffer_Release(&input);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_multibytecodec_MultibyteIncrementalEncoder_encode__doc__,
+"encode($self, /, input, final=False)\n"
+"--\n"
+"\n");
+
+#define _MULTIBYTECODEC_MULTIBYTEINCREMENTALENCODER_ENCODE_METHODDEF \
+ {"encode", (PyCFunction)_multibytecodec_MultibyteIncrementalEncoder_encode, METH_VARARGS|METH_KEYWORDS, _multibytecodec_MultibyteIncrementalEncoder_encode__doc__},
+
+static PyObject *
+_multibytecodec_MultibyteIncrementalEncoder_encode_impl(MultibyteIncrementalEncoderObject *self,
+ PyObject *input,
+ int final);
+
+static PyObject *
+_multibytecodec_MultibyteIncrementalEncoder_encode(MultibyteIncrementalEncoderObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"input", "final", NULL};
+ PyObject *input;
+ int final = 0;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|i:encode", _keywords,
+ &input, &final))
+ goto exit;
+ return_value = _multibytecodec_MultibyteIncrementalEncoder_encode_impl(self, input, final);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_multibytecodec_MultibyteIncrementalEncoder_reset__doc__,
+"reset($self, /)\n"
+"--\n"
+"\n");
+
+#define _MULTIBYTECODEC_MULTIBYTEINCREMENTALENCODER_RESET_METHODDEF \
+ {"reset", (PyCFunction)_multibytecodec_MultibyteIncrementalEncoder_reset, METH_NOARGS, _multibytecodec_MultibyteIncrementalEncoder_reset__doc__},
+
+static PyObject *
+_multibytecodec_MultibyteIncrementalEncoder_reset_impl(MultibyteIncrementalEncoderObject *self);
+
+static PyObject *
+_multibytecodec_MultibyteIncrementalEncoder_reset(MultibyteIncrementalEncoderObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _multibytecodec_MultibyteIncrementalEncoder_reset_impl(self);
+}
+
+PyDoc_STRVAR(_multibytecodec_MultibyteIncrementalDecoder_decode__doc__,
+"decode($self, /, input, final=False)\n"
+"--\n"
+"\n");
+
+#define _MULTIBYTECODEC_MULTIBYTEINCREMENTALDECODER_DECODE_METHODDEF \
+ {"decode", (PyCFunction)_multibytecodec_MultibyteIncrementalDecoder_decode, METH_VARARGS|METH_KEYWORDS, _multibytecodec_MultibyteIncrementalDecoder_decode__doc__},
+
+static PyObject *
+_multibytecodec_MultibyteIncrementalDecoder_decode_impl(MultibyteIncrementalDecoderObject *self,
+ Py_buffer *input,
+ int final);
+
+static PyObject *
+_multibytecodec_MultibyteIncrementalDecoder_decode(MultibyteIncrementalDecoderObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"input", "final", NULL};
+ Py_buffer input = {NULL, NULL};
+ int final = 0;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "y*|i:decode", _keywords,
+ &input, &final))
+ goto exit;
+ return_value = _multibytecodec_MultibyteIncrementalDecoder_decode_impl(self, &input, final);
+
+exit:
+ /* Cleanup for input */
+ if (input.obj)
+ PyBuffer_Release(&input);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_multibytecodec_MultibyteIncrementalDecoder_reset__doc__,
+"reset($self, /)\n"
+"--\n"
+"\n");
+
+#define _MULTIBYTECODEC_MULTIBYTEINCREMENTALDECODER_RESET_METHODDEF \
+ {"reset", (PyCFunction)_multibytecodec_MultibyteIncrementalDecoder_reset, METH_NOARGS, _multibytecodec_MultibyteIncrementalDecoder_reset__doc__},
+
+static PyObject *
+_multibytecodec_MultibyteIncrementalDecoder_reset_impl(MultibyteIncrementalDecoderObject *self);
+
+static PyObject *
+_multibytecodec_MultibyteIncrementalDecoder_reset(MultibyteIncrementalDecoderObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _multibytecodec_MultibyteIncrementalDecoder_reset_impl(self);
+}
+
+PyDoc_STRVAR(_multibytecodec_MultibyteStreamReader_read__doc__,
+"read($self, sizeobj=None, /)\n"
+"--\n"
+"\n");
+
+#define _MULTIBYTECODEC_MULTIBYTESTREAMREADER_READ_METHODDEF \
+ {"read", (PyCFunction)_multibytecodec_MultibyteStreamReader_read, METH_VARARGS, _multibytecodec_MultibyteStreamReader_read__doc__},
+
+static PyObject *
+_multibytecodec_MultibyteStreamReader_read_impl(MultibyteStreamReaderObject *self,
+ PyObject *sizeobj);
+
+static PyObject *
+_multibytecodec_MultibyteStreamReader_read(MultibyteStreamReaderObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *sizeobj = Py_None;
+
+ if (!PyArg_UnpackTuple(args, "read",
+ 0, 1,
+ &sizeobj))
+ goto exit;
+ return_value = _multibytecodec_MultibyteStreamReader_read_impl(self, sizeobj);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_multibytecodec_MultibyteStreamReader_readline__doc__,
+"readline($self, sizeobj=None, /)\n"
+"--\n"
+"\n");
+
+#define _MULTIBYTECODEC_MULTIBYTESTREAMREADER_READLINE_METHODDEF \
+ {"readline", (PyCFunction)_multibytecodec_MultibyteStreamReader_readline, METH_VARARGS, _multibytecodec_MultibyteStreamReader_readline__doc__},
+
+static PyObject *
+_multibytecodec_MultibyteStreamReader_readline_impl(MultibyteStreamReaderObject *self,
+ PyObject *sizeobj);
+
+static PyObject *
+_multibytecodec_MultibyteStreamReader_readline(MultibyteStreamReaderObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *sizeobj = Py_None;
+
+ if (!PyArg_UnpackTuple(args, "readline",
+ 0, 1,
+ &sizeobj))
+ goto exit;
+ return_value = _multibytecodec_MultibyteStreamReader_readline_impl(self, sizeobj);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_multibytecodec_MultibyteStreamReader_readlines__doc__,
+"readlines($self, sizehintobj=None, /)\n"
+"--\n"
+"\n");
+
+#define _MULTIBYTECODEC_MULTIBYTESTREAMREADER_READLINES_METHODDEF \
+ {"readlines", (PyCFunction)_multibytecodec_MultibyteStreamReader_readlines, METH_VARARGS, _multibytecodec_MultibyteStreamReader_readlines__doc__},
+
+static PyObject *
+_multibytecodec_MultibyteStreamReader_readlines_impl(MultibyteStreamReaderObject *self,
+ PyObject *sizehintobj);
+
+static PyObject *
+_multibytecodec_MultibyteStreamReader_readlines(MultibyteStreamReaderObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *sizehintobj = Py_None;
+
+ if (!PyArg_UnpackTuple(args, "readlines",
+ 0, 1,
+ &sizehintobj))
+ goto exit;
+ return_value = _multibytecodec_MultibyteStreamReader_readlines_impl(self, sizehintobj);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_multibytecodec_MultibyteStreamReader_reset__doc__,
+"reset($self, /)\n"
+"--\n"
+"\n");
+
+#define _MULTIBYTECODEC_MULTIBYTESTREAMREADER_RESET_METHODDEF \
+ {"reset", (PyCFunction)_multibytecodec_MultibyteStreamReader_reset, METH_NOARGS, _multibytecodec_MultibyteStreamReader_reset__doc__},
+
+static PyObject *
+_multibytecodec_MultibyteStreamReader_reset_impl(MultibyteStreamReaderObject *self);
+
+static PyObject *
+_multibytecodec_MultibyteStreamReader_reset(MultibyteStreamReaderObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _multibytecodec_MultibyteStreamReader_reset_impl(self);
+}
+
+PyDoc_STRVAR(_multibytecodec_MultibyteStreamWriter_write__doc__,
+"write($self, strobj, /)\n"
+"--\n"
+"\n");
+
+#define _MULTIBYTECODEC_MULTIBYTESTREAMWRITER_WRITE_METHODDEF \
+ {"write", (PyCFunction)_multibytecodec_MultibyteStreamWriter_write, METH_O, _multibytecodec_MultibyteStreamWriter_write__doc__},
+
+PyDoc_STRVAR(_multibytecodec_MultibyteStreamWriter_writelines__doc__,
+"writelines($self, lines, /)\n"
+"--\n"
+"\n");
+
+#define _MULTIBYTECODEC_MULTIBYTESTREAMWRITER_WRITELINES_METHODDEF \
+ {"writelines", (PyCFunction)_multibytecodec_MultibyteStreamWriter_writelines, METH_O, _multibytecodec_MultibyteStreamWriter_writelines__doc__},
+
+PyDoc_STRVAR(_multibytecodec_MultibyteStreamWriter_reset__doc__,
+"reset($self, /)\n"
+"--\n"
+"\n");
+
+#define _MULTIBYTECODEC_MULTIBYTESTREAMWRITER_RESET_METHODDEF \
+ {"reset", (PyCFunction)_multibytecodec_MultibyteStreamWriter_reset, METH_NOARGS, _multibytecodec_MultibyteStreamWriter_reset__doc__},
+
+static PyObject *
+_multibytecodec_MultibyteStreamWriter_reset_impl(MultibyteStreamWriterObject *self);
+
+static PyObject *
+_multibytecodec_MultibyteStreamWriter_reset(MultibyteStreamWriterObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _multibytecodec_MultibyteStreamWriter_reset_impl(self);
+}
+
+PyDoc_STRVAR(_multibytecodec___create_codec__doc__,
+"__create_codec($module, arg, /)\n"
+"--\n"
+"\n");
+
+#define _MULTIBYTECODEC___CREATE_CODEC_METHODDEF \
+ {"__create_codec", (PyCFunction)_multibytecodec___create_codec, METH_O, _multibytecodec___create_codec__doc__},
+/*[clinic end generated code: output=eebb21e18c3043d1 input=a9049054013a1b77]*/
diff --git a/Modules/cjkcodecs/multibytecodec.c b/Modules/cjkcodecs/multibytecodec.c
index e0d9b678c2..e1cdb2c495 100644
--- a/Modules/cjkcodecs/multibytecodec.c
+++ b/Modules/cjkcodecs/multibytecodec.c
@@ -8,6 +8,13 @@
#include "Python.h"
#include "structmember.h"
#include "multibytecodec.h"
+#include "clinic/multibytecodec.c.h"
+
+/*[clinic input]
+module _multibytecodec
+class _multibytecodec.MultibyteCodec "MultibyteCodecObject *" "&MultibyteCodec_Type"
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=6ad689546cbb5450]*/
typedef struct {
PyObject *inobj;
@@ -22,27 +29,7 @@ typedef struct {
_PyUnicodeWriter writer;
} MultibyteDecodeBuffer;
-PyDoc_STRVAR(MultibyteCodec_Encode__doc__,
-"I.encode(unicode[, errors]) -> (string, length consumed)\n\
-\n\
-Return an encoded string version of `unicode'. errors may be given to\n\
-set a different error handling scheme. Default is 'strict' meaning that\n\
-encoding errors raise a UnicodeEncodeError. Other possible values are\n\
-'ignore', 'replace' and 'xmlcharrefreplace' as well as any other name\n\
-registered with codecs.register_error that can handle UnicodeEncodeErrors.");
-
-PyDoc_STRVAR(MultibyteCodec_Decode__doc__,
-"I.decode(string[, errors]) -> (unicodeobject, length consumed)\n\
-\n\
-Decodes `string' using I, an MultibyteCodec instance. errors may be given\n\
-to set a different error handling scheme. Default is 'strict' meaning\n\
-that encoding errors raise a UnicodeDecodeError. Other possible values\n\
-are 'ignore' and 'replace' as well as any other name registered with\n\
-codecs.register_error that is able to handle UnicodeDecodeErrors.");
-
-static char *codeckwarglist[] = {"input", "errors", NULL};
static char *incnewkwarglist[] = {"errors", NULL};
-static char *incrementalkwarglist[] = {"input", "final", NULL};
static char *streamkwarglist[] = {"stream", "errors", NULL};
static PyObject *multibytecodec_encode(MultibyteCodec *,
@@ -553,26 +540,37 @@ errorexit:
return NULL;
}
+/*[clinic input]
+_multibytecodec.MultibyteCodec.encode
+
+ input: object
+ errors: str(accept={str, NoneType}) = NULL
+
+Return an encoded string version of `input'.
+
+'errors' may be given to set a different error handling scheme. Default is
+'strict' meaning that encoding errors raise a UnicodeEncodeError. Other possible
+values are 'ignore', 'replace' and 'xmlcharrefreplace' as well as any other name
+registered with codecs.register_error that can handle UnicodeEncodeErrors.
+[clinic start generated code]*/
+
static PyObject *
-MultibyteCodec_Encode(MultibyteCodecObject *self,
- PyObject *args, PyObject *kwargs)
+_multibytecodec_MultibyteCodec_encode_impl(MultibyteCodecObject *self,
+ PyObject *input,
+ const char *errors)
+/*[clinic end generated code: output=7b26652045ba56a9 input=05f6ced3c8dd0582]*/
{
MultibyteCodec_State state;
- PyObject *errorcb, *r, *arg, *ucvt;
- const char *errors = NULL;
+ PyObject *errorcb, *r, *ucvt;
Py_ssize_t datalen;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|z:encode",
- codeckwarglist, &arg, &errors))
- return NULL;
-
- if (PyUnicode_Check(arg))
+ if (PyUnicode_Check(input))
ucvt = NULL;
else {
- arg = ucvt = PyObject_Str(arg);
- if (arg == NULL)
+ input = ucvt = PyObject_Str(input);
+ if (input == NULL)
return NULL;
- else if (!PyUnicode_Check(arg)) {
+ else if (!PyUnicode_Check(input)) {
PyErr_SetString(PyExc_TypeError,
"couldn't convert the object to unicode.");
Py_DECREF(ucvt);
@@ -580,11 +578,11 @@ MultibyteCodec_Encode(MultibyteCodecObject *self,
}
}
- if (PyUnicode_READY(arg) < 0) {
+ if (PyUnicode_READY(input) < 0) {
Py_XDECREF(ucvt);
return NULL;
}
- datalen = PyUnicode_GET_LENGTH(arg);
+ datalen = PyUnicode_GET_LENGTH(input);
errorcb = internal_error_callback(errors);
if (errorcb == NULL) {
@@ -596,7 +594,7 @@ MultibyteCodec_Encode(MultibyteCodecObject *self,
self->codec->encinit(&state, self->codec->config) != 0)
goto errorexit;
r = multibytecodec_encode(self->codec, &state,
- arg, NULL, errorcb,
+ input, NULL, errorcb,
MBENC_FLUSH | MBENC_RESET);
if (r == NULL)
goto errorexit;
@@ -611,31 +609,41 @@ errorexit:
return NULL;
}
+/*[clinic input]
+_multibytecodec.MultibyteCodec.decode
+
+ input: Py_buffer
+ errors: str(accept={str, NoneType}) = NULL
+
+Decodes 'input'.
+
+'errors' may be given to set a different error handling scheme. Default is
+'strict' meaning that encoding errors raise a UnicodeDecodeError. Other possible
+values are 'ignore' and 'replace' as well as any other name registered with
+codecs.register_error that is able to handle UnicodeDecodeErrors."
+[clinic start generated code]*/
+
static PyObject *
-MultibyteCodec_Decode(MultibyteCodecObject *self,
- PyObject *args, PyObject *kwargs)
+_multibytecodec_MultibyteCodec_decode_impl(MultibyteCodecObject *self,
+ Py_buffer *input,
+ const char *errors)
+/*[clinic end generated code: output=ff419f65bad6cc77 input=a7d45f87f75e5e02]*/
{
MultibyteCodec_State state;
MultibyteDecodeBuffer buf;
PyObject *errorcb, *res;
- Py_buffer pdata;
- const char *data, *errors = NULL;
+ const char *data;
Py_ssize_t datalen;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "y*|z:decode",
- codeckwarglist, &pdata, &errors))
- return NULL;
- data = pdata.buf;
- datalen = pdata.len;
+ data = input->buf;
+ datalen = input->len;
errorcb = internal_error_callback(errors);
if (errorcb == NULL) {
- PyBuffer_Release(&pdata);
return NULL;
}
if (datalen == 0) {
- PyBuffer_Release(&pdata);
ERROR_DECREF(errorcb);
return make_tuple(PyUnicode_New(0, 0), 0);
}
@@ -668,13 +676,11 @@ MultibyteCodec_Decode(MultibyteCodecObject *self,
if (res == NULL)
goto errorexit;
- PyBuffer_Release(&pdata);
Py_XDECREF(buf.excobj);
ERROR_DECREF(errorcb);
return make_tuple(res, datalen);
errorexit:
- PyBuffer_Release(&pdata);
ERROR_DECREF(errorcb);
Py_XDECREF(buf.excobj);
_PyUnicodeWriter_Dealloc(&buf.writer);
@@ -683,13 +689,9 @@ errorexit:
}
static struct PyMethodDef multibytecodec_methods[] = {
- {"encode", (PyCFunction)MultibyteCodec_Encode,
- METH_VARARGS | METH_KEYWORDS,
- MultibyteCodec_Encode__doc__},
- {"decode", (PyCFunction)MultibyteCodec_Decode,
- METH_VARARGS | METH_KEYWORDS,
- MultibyteCodec_Decode__doc__},
- {NULL, NULL},
+ _MULTIBYTECODEC_MULTIBYTECODEC_ENCODE_METHODDEF
+ _MULTIBYTECODEC_MULTIBYTECODEC_DECODE_METHODDEF
+ {NULL, NULL},
};
static void
@@ -791,8 +793,7 @@ encoder_encode_stateful(MultibyteStatefulEncoderContext *ctx,
ctx->errors, final ? MBENC_FLUSH | MBENC_RESET : 0);
if (r == NULL) {
/* recover the original pending buffer */
- Py_CLEAR(ctx->pending);
- ctx->pending = origpending;
+ Py_XSETREF(ctx->pending, origpending);
origpending = NULL;
goto errorexit;
}
@@ -873,26 +874,34 @@ decoder_feed_buffer(MultibyteStatefulDecoderContext *ctx,
}
-/**
- * MultibyteIncrementalEncoder object
- */
+/*[clinic input]
+ class _multibytecodec.MultibyteIncrementalEncoder "MultibyteIncrementalEncoderObject *" "&MultibyteIncrementalEncoder_Type"
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=3be82909cd08924d]*/
-static PyObject *
-mbiencoder_encode(MultibyteIncrementalEncoderObject *self,
- PyObject *args, PyObject *kwargs)
-{
- PyObject *data;
- int final = 0;
+/*[clinic input]
+_multibytecodec.MultibyteIncrementalEncoder.encode
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|i:encode",
- incrementalkwarglist, &data, &final))
- return NULL;
+ input: object
+ final: int(c_default="0") = False
+[clinic start generated code]*/
- return encoder_encode_stateful(STATEFUL_ECTX(self), data, final);
+static PyObject *
+_multibytecodec_MultibyteIncrementalEncoder_encode_impl(MultibyteIncrementalEncoderObject *self,
+ PyObject *input,
+ int final)
+/*[clinic end generated code: output=123361b6c505e2c1 input=a345c688fa664f92]*/
+{
+ return encoder_encode_stateful(STATEFUL_ECTX(self), input, final);
}
+/*[clinic input]
+_multibytecodec.MultibyteIncrementalEncoder.reset
+[clinic start generated code]*/
+
static PyObject *
-mbiencoder_reset(MultibyteIncrementalEncoderObject *self)
+_multibytecodec_MultibyteIncrementalEncoder_reset_impl(MultibyteIncrementalEncoderObject *self)
+/*[clinic end generated code: output=b4125d8f537a253f input=930f06760707b6ea]*/
{
/* Longest output: 4 bytes (b'\x0F\x1F(B') with ISO 2022 */
unsigned char buffer[4], *outbuf;
@@ -909,11 +918,9 @@ mbiencoder_reset(MultibyteIncrementalEncoderObject *self)
}
static struct PyMethodDef mbiencoder_methods[] = {
- {"encode", (PyCFunction)mbiencoder_encode,
- METH_VARARGS | METH_KEYWORDS, NULL},
- {"reset", (PyCFunction)mbiencoder_reset,
- METH_NOARGS, NULL},
- {NULL, NULL},
+ _MULTIBYTECODEC_MULTIBYTEINCREMENTALENCODER_ENCODE_METHODDEF
+ _MULTIBYTECODEC_MULTIBYTEINCREMENTALENCODER_RESET_METHODDEF
+ {NULL, NULL},
};
static PyObject *
@@ -1024,26 +1031,31 @@ static PyTypeObject MultibyteIncrementalEncoder_Type = {
};
-/**
- * MultibyteIncrementalDecoder object
- */
+/*[clinic input]
+ class _multibytecodec.MultibyteIncrementalDecoder "MultibyteIncrementalDecoderObject *" "&MultibyteIncrementalDecoder_Type"
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=f6003faaf2cea692]*/
+
+/*[clinic input]
+_multibytecodec.MultibyteIncrementalDecoder.decode
+
+ input: Py_buffer
+ final: int(c_default="0") = False
+[clinic start generated code]*/
static PyObject *
-mbidecoder_decode(MultibyteIncrementalDecoderObject *self,
- PyObject *args, PyObject *kwargs)
+_multibytecodec_MultibyteIncrementalDecoder_decode_impl(MultibyteIncrementalDecoderObject *self,
+ Py_buffer *input,
+ int final)
+/*[clinic end generated code: output=b9b9090e8a9ce2ba input=576631c61906d39d]*/
{
MultibyteDecodeBuffer buf;
char *data, *wdata = NULL;
- Py_buffer pdata;
Py_ssize_t wsize, size, origpending;
- int final = 0;
PyObject *res;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "y*|i:decode",
- incrementalkwarglist, &pdata, &final))
- return NULL;
- data = pdata.buf;
- size = pdata.len;
+ data = input->buf;
+ size = input->len;
_PyUnicodeWriter_Init(&buf.writer);
buf.excobj = NULL;
@@ -1094,14 +1106,12 @@ mbidecoder_decode(MultibyteIncrementalDecoderObject *self,
if (res == NULL)
goto errorexit;
- PyBuffer_Release(&pdata);
if (wdata != data)
PyMem_Del(wdata);
Py_XDECREF(buf.excobj);
return res;
errorexit:
- PyBuffer_Release(&pdata);
if (wdata != NULL && wdata != data)
PyMem_Del(wdata);
Py_XDECREF(buf.excobj);
@@ -1109,8 +1119,13 @@ errorexit:
return NULL;
}
+/*[clinic input]
+_multibytecodec.MultibyteIncrementalDecoder.reset
+[clinic start generated code]*/
+
static PyObject *
-mbidecoder_reset(MultibyteIncrementalDecoderObject *self)
+_multibytecodec_MultibyteIncrementalDecoder_reset_impl(MultibyteIncrementalDecoderObject *self)
+/*[clinic end generated code: output=da423b1782c23ed1 input=3b63b3be85b2fb45]*/
{
if (self->codec->decreset != NULL &&
self->codec->decreset(&self->state, self->codec->config) != 0)
@@ -1121,11 +1136,9 @@ mbidecoder_reset(MultibyteIncrementalDecoderObject *self)
}
static struct PyMethodDef mbidecoder_methods[] = {
- {"decode", (PyCFunction)mbidecoder_decode,
- METH_VARARGS | METH_KEYWORDS, NULL},
- {"reset", (PyCFunction)mbidecoder_reset,
- METH_NOARGS, NULL},
- {NULL, NULL},
+ _MULTIBYTECODEC_MULTIBYTEINCREMENTALDECODER_DECODE_METHODDEF
+ _MULTIBYTECODEC_MULTIBYTEINCREMENTALDECODER_RESET_METHODDEF
+ {NULL, NULL},
};
static PyObject *
@@ -1236,9 +1249,10 @@ static PyTypeObject MultibyteIncrementalDecoder_Type = {
};
-/**
- * MultibyteStreamReader object
- */
+/*[clinic input]
+ class _multibytecodec.MultibyteStreamReader "MultibyteStreamReaderObject *" "MultibyteStreamReader_Type"
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=d323634b74976f09]*/
static PyObject *
mbstreamreader_iread(MultibyteStreamReaderObject *self,
@@ -1260,10 +1274,10 @@ mbstreamreader_iread(MultibyteStreamReaderObject *self,
if (sizehint < 0)
cres = PyObject_CallMethod(self->stream,
- (char *)method, NULL);
+ method, NULL);
else
cres = PyObject_CallMethod(self->stream,
- (char *)method, "i", sizehint);
+ method, "i", sizehint);
if (cres == NULL)
goto errorexit;
@@ -1345,16 +1359,21 @@ errorexit:
return NULL;
}
+/*[clinic input]
+ _multibytecodec.MultibyteStreamReader.read
+
+ sizeobj: object = None
+ /
+[clinic start generated code]*/
+
static PyObject *
-mbstreamreader_read(MultibyteStreamReaderObject *self, PyObject *args)
+_multibytecodec_MultibyteStreamReader_read_impl(MultibyteStreamReaderObject *self,
+ PyObject *sizeobj)
+/*[clinic end generated code: output=35621eb75355d5b8 input=015b0d3ff2fca485]*/
{
- PyObject *sizeobj = NULL;
Py_ssize_t size;
- if (!PyArg_UnpackTuple(args, "read", 0, 1, &sizeobj))
- return NULL;
-
- if (sizeobj == Py_None || sizeobj == NULL)
+ if (sizeobj == Py_None)
size = -1;
else if (PyLong_Check(sizeobj))
size = PyLong_AsSsize_t(sizeobj);
@@ -1369,16 +1388,21 @@ mbstreamreader_read(MultibyteStreamReaderObject *self, PyObject *args)
return mbstreamreader_iread(self, "read", size);
}
+/*[clinic input]
+ _multibytecodec.MultibyteStreamReader.readline
+
+ sizeobj: object = None
+ /
+[clinic start generated code]*/
+
static PyObject *
-mbstreamreader_readline(MultibyteStreamReaderObject *self, PyObject *args)
+_multibytecodec_MultibyteStreamReader_readline_impl(MultibyteStreamReaderObject *self,
+ PyObject *sizeobj)
+/*[clinic end generated code: output=4fbfaae1ed457a11 input=41ccc64f9bb0cec3]*/
{
- PyObject *sizeobj = NULL;
Py_ssize_t size;
- if (!PyArg_UnpackTuple(args, "readline", 0, 1, &sizeobj))
- return NULL;
-
- if (sizeobj == Py_None || sizeobj == NULL)
+ if (sizeobj == Py_None)
size = -1;
else if (PyLong_Check(sizeobj))
size = PyLong_AsSsize_t(sizeobj);
@@ -1393,16 +1417,22 @@ mbstreamreader_readline(MultibyteStreamReaderObject *self, PyObject *args)
return mbstreamreader_iread(self, "readline", size);
}
+/*[clinic input]
+ _multibytecodec.MultibyteStreamReader.readlines
+
+ sizehintobj: object = None
+ /
+[clinic start generated code]*/
+
static PyObject *
-mbstreamreader_readlines(MultibyteStreamReaderObject *self, PyObject *args)
+_multibytecodec_MultibyteStreamReader_readlines_impl(MultibyteStreamReaderObject *self,
+ PyObject *sizehintobj)
+/*[clinic end generated code: output=e7c4310768ed2ad4 input=54932f5d4d88e880]*/
{
- PyObject *sizehintobj = NULL, *r, *sr;
+ PyObject *r, *sr;
Py_ssize_t sizehint;
- if (!PyArg_UnpackTuple(args, "readlines", 0, 1, &sizehintobj))
- return NULL;
-
- if (sizehintobj == Py_None || sizehintobj == NULL)
+ if (sizehintobj == Py_None)
sizehint = -1;
else if (PyLong_Check(sizehintobj))
sizehint = PyLong_AsSsize_t(sizehintobj);
@@ -1423,8 +1453,13 @@ mbstreamreader_readlines(MultibyteStreamReaderObject *self, PyObject *args)
return sr;
}
+/*[clinic input]
+ _multibytecodec.MultibyteStreamReader.reset
+[clinic start generated code]*/
+
static PyObject *
-mbstreamreader_reset(MultibyteStreamReaderObject *self)
+_multibytecodec_MultibyteStreamReader_reset_impl(MultibyteStreamReaderObject *self)
+/*[clinic end generated code: output=138490370a680abc input=5d4140db84b5e1e2]*/
{
if (self->codec->decreset != NULL &&
self->codec->decreset(&self->state, self->codec->config) != 0)
@@ -1435,14 +1470,10 @@ mbstreamreader_reset(MultibyteStreamReaderObject *self)
}
static struct PyMethodDef mbstreamreader_methods[] = {
- {"read", (PyCFunction)mbstreamreader_read,
- METH_VARARGS, NULL},
- {"readline", (PyCFunction)mbstreamreader_readline,
- METH_VARARGS, NULL},
- {"readlines", (PyCFunction)mbstreamreader_readlines,
- METH_VARARGS, NULL},
- {"reset", (PyCFunction)mbstreamreader_reset,
- METH_NOARGS, NULL},
+ _MULTIBYTECODEC_MULTIBYTESTREAMREADER_READ_METHODDEF
+ _MULTIBYTECODEC_MULTIBYTESTREAMREADER_READLINE_METHODDEF
+ _MULTIBYTECODEC_MULTIBYTESTREAMREADER_READLINES_METHODDEF
+ _MULTIBYTECODEC_MULTIBYTESTREAMREADER_RESET_METHODDEF
{NULL, NULL},
};
@@ -1565,9 +1596,10 @@ static PyTypeObject MultibyteStreamReader_Type = {
};
-/**
- * MultibyteStreamWriter object
- */
+/*[clinic input]
+ class _multibytecodec.MultibyteStreamWriter "MultibyteStreamWriterObject *" "&MultibyteStreamWriter_Type"
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=cde22780a215d6ac]*/
static int
mbstreamwriter_iwrite(MultibyteStreamWriterObject *self,
@@ -1588,8 +1620,17 @@ mbstreamwriter_iwrite(MultibyteStreamWriterObject *self,
return 0;
}
+/*[clinic input]
+ _multibytecodec.MultibyteStreamWriter.write
+
+ strobj: object
+ /
+[clinic start generated code]*/
+
static PyObject *
-mbstreamwriter_write(MultibyteStreamWriterObject *self, PyObject *strobj)
+_multibytecodec_MultibyteStreamWriter_write(MultibyteStreamWriterObject *self,
+ PyObject *strobj)
+/*[clinic end generated code: output=e13ae841c895251e input=551dc4c018c10a2b]*/
{
if (mbstreamwriter_iwrite(self, strobj))
return NULL;
@@ -1597,8 +1638,17 @@ mbstreamwriter_write(MultibyteStreamWriterObject *self, PyObject *strobj)
Py_RETURN_NONE;
}
+/*[clinic input]
+ _multibytecodec.MultibyteStreamWriter.writelines
+
+ lines: object
+ /
+[clinic start generated code]*/
+
static PyObject *
-mbstreamwriter_writelines(MultibyteStreamWriterObject *self, PyObject *lines)
+_multibytecodec_MultibyteStreamWriter_writelines(MultibyteStreamWriterObject *self,
+ PyObject *lines)
+/*[clinic end generated code: output=e5c4285ac8e7d522 input=57797fe7008d4e96]*/
{
PyObject *strobj;
int i, r;
@@ -1624,8 +1674,13 @@ mbstreamwriter_writelines(MultibyteStreamWriterObject *self, PyObject *lines)
Py_RETURN_NONE;
}
+/*[clinic input]
+ _multibytecodec.MultibyteStreamWriter.reset
+[clinic start generated code]*/
+
static PyObject *
-mbstreamwriter_reset(MultibyteStreamWriterObject *self)
+_multibytecodec_MultibyteStreamWriter_reset_impl(MultibyteStreamWriterObject *self)
+/*[clinic end generated code: output=8f54a4d9b03db5ff input=b56dbcbaf35cc10c]*/
{
PyObject *pwrt;
@@ -1727,13 +1782,10 @@ mbstreamwriter_dealloc(MultibyteStreamWriterObject *self)
}
static struct PyMethodDef mbstreamwriter_methods[] = {
- {"write", (PyCFunction)mbstreamwriter_write,
- METH_O, NULL},
- {"writelines", (PyCFunction)mbstreamwriter_writelines,
- METH_O, NULL},
- {"reset", (PyCFunction)mbstreamwriter_reset,
- METH_NOARGS, NULL},
- {NULL, NULL},
+ _MULTIBYTECODEC_MULTIBYTESTREAMWRITER_WRITE_METHODDEF
+ _MULTIBYTECODEC_MULTIBYTESTREAMWRITER_WRITELINES_METHODDEF
+ _MULTIBYTECODEC_MULTIBYTESTREAMWRITER_RESET_METHODDEF
+ {NULL, NULL},
};
static PyMemberDef mbstreamwriter_members[] = {
@@ -1787,12 +1839,16 @@ static PyTypeObject MultibyteStreamWriter_Type = {
};
-/**
- * Exposed factory function
- */
+/*[clinic input]
+_multibytecodec.__create_codec
+
+ arg: object
+ /
+[clinic start generated code]*/
static PyObject *
-__create_codec(PyObject *ignore, PyObject *arg)
+_multibytecodec___create_codec(PyModuleDef *module, PyObject *arg)
+/*[clinic end generated code: output=fbe74f6510640163 input=6840b2a6b183fcfa]*/
{
MultibyteCodecObject *self;
MultibyteCodec *codec;
@@ -1815,7 +1871,7 @@ __create_codec(PyObject *ignore, PyObject *arg)
}
static struct PyMethodDef __methods[] = {
- {"__create_codec", (PyCFunction)__create_codec, METH_O},
+ _MULTIBYTECODEC___CREATE_CODEC_METHODDEF
{NULL, NULL},
};
diff --git a/Modules/clinic/_bz2module.c.h b/Modules/clinic/_bz2module.c.h
index 8a201a08de..3ed8303e95 100644
--- a/Modules/clinic/_bz2module.c.h
+++ b/Modules/clinic/_bz2module.c.h
@@ -14,20 +14,18 @@ PyDoc_STRVAR(_bz2_BZ2Compressor_compress__doc__,
"flush() method to finish the compression process.");
#define _BZ2_BZ2COMPRESSOR_COMPRESS_METHODDEF \
- {"compress", (PyCFunction)_bz2_BZ2Compressor_compress, METH_VARARGS, _bz2_BZ2Compressor_compress__doc__},
+ {"compress", (PyCFunction)_bz2_BZ2Compressor_compress, METH_O, _bz2_BZ2Compressor_compress__doc__},
static PyObject *
_bz2_BZ2Compressor_compress_impl(BZ2Compressor *self, Py_buffer *data);
static PyObject *
-_bz2_BZ2Compressor_compress(BZ2Compressor *self, PyObject *args)
+_bz2_BZ2Compressor_compress(BZ2Compressor *self, PyObject *arg)
{
PyObject *return_value = NULL;
Py_buffer data = {NULL, NULL};
- if (!PyArg_ParseTuple(args,
- "y*:compress",
- &data))
+ if (!PyArg_Parse(arg, "y*:compress", &data))
goto exit;
return_value = _bz2_BZ2Compressor_compress_impl(self, &data);
@@ -84,8 +82,7 @@ _bz2_BZ2Compressor___init__(PyObject *self, PyObject *args, PyObject *kwargs)
if ((Py_TYPE(self) == &BZ2Compressor_Type) &&
!_PyArg_NoKeywords("BZ2Compressor", kwargs))
goto exit;
- if (!PyArg_ParseTuple(args,
- "|i:BZ2Compressor",
+ if (!PyArg_ParseTuple(args, "|i:BZ2Compressor",
&compresslevel))
goto exit;
return_value = _bz2_BZ2Compressor___init___impl((BZ2Compressor *)self, compresslevel);
@@ -95,34 +92,43 @@ exit:
}
PyDoc_STRVAR(_bz2_BZ2Decompressor_decompress__doc__,
-"decompress($self, data, /)\n"
+"decompress($self, /, data, max_length=-1)\n"
"--\n"
"\n"
-"Provide data to the decompressor object.\n"
+"Decompress *data*, returning uncompressed data as bytes.\n"
"\n"
-"Returns a chunk of decompressed data if possible, or b\'\' otherwise.\n"
+"If *max_length* is nonnegative, returns at most *max_length* bytes of\n"
+"decompressed data. If this limit is reached and further output can be\n"
+"produced, *self.needs_input* will be set to ``False``. In this case, the next\n"
+"call to *decompress()* may provide *data* as b\'\' to obtain more of the output.\n"
"\n"
-"Attempting to decompress data after the end of stream is reached\n"
-"raises an EOFError. Any data found after the end of the stream\n"
-"is ignored and saved in the unused_data attribute.");
+"If all of the input data was decompressed and returned (either because this\n"
+"was less than *max_length* bytes, or because *max_length* was negative),\n"
+"*self.needs_input* will be set to True.\n"
+"\n"
+"Attempting to decompress data after the end of stream is reached raises an\n"
+"EOFError. Any data found after the end of the stream is ignored and saved in\n"
+"the unused_data attribute.");
#define _BZ2_BZ2DECOMPRESSOR_DECOMPRESS_METHODDEF \
- {"decompress", (PyCFunction)_bz2_BZ2Decompressor_decompress, METH_VARARGS, _bz2_BZ2Decompressor_decompress__doc__},
+ {"decompress", (PyCFunction)_bz2_BZ2Decompressor_decompress, METH_VARARGS|METH_KEYWORDS, _bz2_BZ2Decompressor_decompress__doc__},
static PyObject *
-_bz2_BZ2Decompressor_decompress_impl(BZ2Decompressor *self, Py_buffer *data);
+_bz2_BZ2Decompressor_decompress_impl(BZ2Decompressor *self, Py_buffer *data,
+ Py_ssize_t max_length);
static PyObject *
-_bz2_BZ2Decompressor_decompress(BZ2Decompressor *self, PyObject *args)
+_bz2_BZ2Decompressor_decompress(BZ2Decompressor *self, PyObject *args, PyObject *kwargs)
{
PyObject *return_value = NULL;
+ static char *_keywords[] = {"data", "max_length", NULL};
Py_buffer data = {NULL, NULL};
+ Py_ssize_t max_length = -1;
- if (!PyArg_ParseTuple(args,
- "y*:decompress",
- &data))
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "y*|n:decompress", _keywords,
+ &data, &max_length))
goto exit;
- return_value = _bz2_BZ2Decompressor_decompress_impl(self, &data);
+ return_value = _bz2_BZ2Decompressor_decompress_impl(self, &data, max_length);
exit:
/* Cleanup for data */
@@ -159,4 +165,4 @@ _bz2_BZ2Decompressor___init__(PyObject *self, PyObject *args, PyObject *kwargs)
exit:
return return_value;
}
-/*[clinic end generated code: output=21ca4405519a0931 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=fef29b76b3314fc7 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/_codecsmodule.c.h b/Modules/clinic/_codecsmodule.c.h
new file mode 100644
index 0000000000..e94be1176e
--- /dev/null
+++ b/Modules/clinic/_codecsmodule.c.h
@@ -0,0 +1,1396 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(_codecs_register__doc__,
+"register($module, search_function, /)\n"
+"--\n"
+"\n"
+"Register a codec search function.\n"
+"\n"
+"Search functions are expected to take one argument, the encoding name in\n"
+"all lower case letters, and either return None, or a tuple of functions\n"
+"(encoder, decoder, stream_reader, stream_writer) (or a CodecInfo object).");
+
+#define _CODECS_REGISTER_METHODDEF \
+ {"register", (PyCFunction)_codecs_register, METH_O, _codecs_register__doc__},
+
+PyDoc_STRVAR(_codecs_lookup__doc__,
+"lookup($module, encoding, /)\n"
+"--\n"
+"\n"
+"Looks up a codec tuple in the Python codec registry and returns a CodecInfo object.");
+
+#define _CODECS_LOOKUP_METHODDEF \
+ {"lookup", (PyCFunction)_codecs_lookup, METH_O, _codecs_lookup__doc__},
+
+static PyObject *
+_codecs_lookup_impl(PyModuleDef *module, const char *encoding);
+
+static PyObject *
+_codecs_lookup(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ const char *encoding;
+
+ if (!PyArg_Parse(arg, "s:lookup", &encoding))
+ goto exit;
+ return_value = _codecs_lookup_impl(module, encoding);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_encode__doc__,
+"encode($module, /, obj, encoding=\'utf-8\', errors=\'strict\')\n"
+"--\n"
+"\n"
+"Encodes obj using the codec registered for encoding.\n"
+"\n"
+"The default encoding is \'utf-8\'. errors may be given to set a\n"
+"different error handling scheme. Default is \'strict\' meaning that encoding\n"
+"errors raise a ValueError. Other possible values are \'ignore\', \'replace\'\n"
+"and \'backslashreplace\' as well as any other name registered with\n"
+"codecs.register_error that can handle ValueErrors.");
+
+#define _CODECS_ENCODE_METHODDEF \
+ {"encode", (PyCFunction)_codecs_encode, METH_VARARGS|METH_KEYWORDS, _codecs_encode__doc__},
+
+static PyObject *
+_codecs_encode_impl(PyModuleDef *module, PyObject *obj, const char *encoding,
+ const char *errors);
+
+static PyObject *
+_codecs_encode(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"obj", "encoding", "errors", NULL};
+ PyObject *obj;
+ const char *encoding = NULL;
+ const char *errors = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|ss:encode", _keywords,
+ &obj, &encoding, &errors))
+ goto exit;
+ return_value = _codecs_encode_impl(module, obj, encoding, errors);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_decode__doc__,
+"decode($module, /, obj, encoding=\'utf-8\', errors=\'strict\')\n"
+"--\n"
+"\n"
+"Decodes obj using the codec registered for encoding.\n"
+"\n"
+"Default encoding is \'utf-8\'. errors may be given to set a\n"
+"different error handling scheme. Default is \'strict\' meaning that encoding\n"
+"errors raise a ValueError. Other possible values are \'ignore\', \'replace\'\n"
+"and \'backslashreplace\' as well as any other name registered with\n"
+"codecs.register_error that can handle ValueErrors.");
+
+#define _CODECS_DECODE_METHODDEF \
+ {"decode", (PyCFunction)_codecs_decode, METH_VARARGS|METH_KEYWORDS, _codecs_decode__doc__},
+
+static PyObject *
+_codecs_decode_impl(PyModuleDef *module, PyObject *obj, const char *encoding,
+ const char *errors);
+
+static PyObject *
+_codecs_decode(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"obj", "encoding", "errors", NULL};
+ PyObject *obj;
+ const char *encoding = NULL;
+ const char *errors = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|ss:decode", _keywords,
+ &obj, &encoding, &errors))
+ goto exit;
+ return_value = _codecs_decode_impl(module, obj, encoding, errors);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs__forget_codec__doc__,
+"_forget_codec($module, encoding, /)\n"
+"--\n"
+"\n"
+"Purge the named codec from the internal codec lookup cache");
+
+#define _CODECS__FORGET_CODEC_METHODDEF \
+ {"_forget_codec", (PyCFunction)_codecs__forget_codec, METH_O, _codecs__forget_codec__doc__},
+
+static PyObject *
+_codecs__forget_codec_impl(PyModuleDef *module, const char *encoding);
+
+static PyObject *
+_codecs__forget_codec(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ const char *encoding;
+
+ if (!PyArg_Parse(arg, "s:_forget_codec", &encoding))
+ goto exit;
+ return_value = _codecs__forget_codec_impl(module, encoding);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_escape_decode__doc__,
+"escape_decode($module, data, errors=None, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_ESCAPE_DECODE_METHODDEF \
+ {"escape_decode", (PyCFunction)_codecs_escape_decode, METH_VARARGS, _codecs_escape_decode__doc__},
+
+static PyObject *
+_codecs_escape_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors);
+
+static PyObject *
+_codecs_escape_decode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_buffer data = {NULL, NULL};
+ const char *errors = NULL;
+
+ if (!PyArg_ParseTuple(args, "s*|z:escape_decode",
+ &data, &errors))
+ goto exit;
+ return_value = _codecs_escape_decode_impl(module, &data, errors);
+
+exit:
+ /* Cleanup for data */
+ if (data.obj)
+ PyBuffer_Release(&data);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_escape_encode__doc__,
+"escape_encode($module, data, errors=None, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_ESCAPE_ENCODE_METHODDEF \
+ {"escape_encode", (PyCFunction)_codecs_escape_encode, METH_VARARGS, _codecs_escape_encode__doc__},
+
+static PyObject *
+_codecs_escape_encode_impl(PyModuleDef *module, PyObject *data,
+ const char *errors);
+
+static PyObject *
+_codecs_escape_encode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *data;
+ const char *errors = NULL;
+
+ if (!PyArg_ParseTuple(args, "O!|z:escape_encode",
+ &PyBytes_Type, &data, &errors))
+ goto exit;
+ return_value = _codecs_escape_encode_impl(module, data, errors);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_unicode_internal_decode__doc__,
+"unicode_internal_decode($module, obj, errors=None, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_UNICODE_INTERNAL_DECODE_METHODDEF \
+ {"unicode_internal_decode", (PyCFunction)_codecs_unicode_internal_decode, METH_VARARGS, _codecs_unicode_internal_decode__doc__},
+
+static PyObject *
+_codecs_unicode_internal_decode_impl(PyModuleDef *module, PyObject *obj,
+ const char *errors);
+
+static PyObject *
+_codecs_unicode_internal_decode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *obj;
+ const char *errors = NULL;
+
+ if (!PyArg_ParseTuple(args, "O|z:unicode_internal_decode",
+ &obj, &errors))
+ goto exit;
+ return_value = _codecs_unicode_internal_decode_impl(module, obj, errors);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_utf_7_decode__doc__,
+"utf_7_decode($module, data, errors=None, final=False, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_UTF_7_DECODE_METHODDEF \
+ {"utf_7_decode", (PyCFunction)_codecs_utf_7_decode, METH_VARARGS, _codecs_utf_7_decode__doc__},
+
+static PyObject *
+_codecs_utf_7_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors, int final);
+
+static PyObject *
+_codecs_utf_7_decode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_buffer data = {NULL, NULL};
+ const char *errors = NULL;
+ int final = 0;
+
+ if (!PyArg_ParseTuple(args, "y*|zi:utf_7_decode",
+ &data, &errors, &final))
+ goto exit;
+ return_value = _codecs_utf_7_decode_impl(module, &data, errors, final);
+
+exit:
+ /* Cleanup for data */
+ if (data.obj)
+ PyBuffer_Release(&data);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_utf_8_decode__doc__,
+"utf_8_decode($module, data, errors=None, final=False, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_UTF_8_DECODE_METHODDEF \
+ {"utf_8_decode", (PyCFunction)_codecs_utf_8_decode, METH_VARARGS, _codecs_utf_8_decode__doc__},
+
+static PyObject *
+_codecs_utf_8_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors, int final);
+
+static PyObject *
+_codecs_utf_8_decode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_buffer data = {NULL, NULL};
+ const char *errors = NULL;
+ int final = 0;
+
+ if (!PyArg_ParseTuple(args, "y*|zi:utf_8_decode",
+ &data, &errors, &final))
+ goto exit;
+ return_value = _codecs_utf_8_decode_impl(module, &data, errors, final);
+
+exit:
+ /* Cleanup for data */
+ if (data.obj)
+ PyBuffer_Release(&data);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_utf_16_decode__doc__,
+"utf_16_decode($module, data, errors=None, final=False, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_UTF_16_DECODE_METHODDEF \
+ {"utf_16_decode", (PyCFunction)_codecs_utf_16_decode, METH_VARARGS, _codecs_utf_16_decode__doc__},
+
+static PyObject *
+_codecs_utf_16_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors, int final);
+
+static PyObject *
+_codecs_utf_16_decode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_buffer data = {NULL, NULL};
+ const char *errors = NULL;
+ int final = 0;
+
+ if (!PyArg_ParseTuple(args, "y*|zi:utf_16_decode",
+ &data, &errors, &final))
+ goto exit;
+ return_value = _codecs_utf_16_decode_impl(module, &data, errors, final);
+
+exit:
+ /* Cleanup for data */
+ if (data.obj)
+ PyBuffer_Release(&data);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_utf_16_le_decode__doc__,
+"utf_16_le_decode($module, data, errors=None, final=False, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_UTF_16_LE_DECODE_METHODDEF \
+ {"utf_16_le_decode", (PyCFunction)_codecs_utf_16_le_decode, METH_VARARGS, _codecs_utf_16_le_decode__doc__},
+
+static PyObject *
+_codecs_utf_16_le_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors, int final);
+
+static PyObject *
+_codecs_utf_16_le_decode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_buffer data = {NULL, NULL};
+ const char *errors = NULL;
+ int final = 0;
+
+ if (!PyArg_ParseTuple(args, "y*|zi:utf_16_le_decode",
+ &data, &errors, &final))
+ goto exit;
+ return_value = _codecs_utf_16_le_decode_impl(module, &data, errors, final);
+
+exit:
+ /* Cleanup for data */
+ if (data.obj)
+ PyBuffer_Release(&data);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_utf_16_be_decode__doc__,
+"utf_16_be_decode($module, data, errors=None, final=False, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_UTF_16_BE_DECODE_METHODDEF \
+ {"utf_16_be_decode", (PyCFunction)_codecs_utf_16_be_decode, METH_VARARGS, _codecs_utf_16_be_decode__doc__},
+
+static PyObject *
+_codecs_utf_16_be_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors, int final);
+
+static PyObject *
+_codecs_utf_16_be_decode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_buffer data = {NULL, NULL};
+ const char *errors = NULL;
+ int final = 0;
+
+ if (!PyArg_ParseTuple(args, "y*|zi:utf_16_be_decode",
+ &data, &errors, &final))
+ goto exit;
+ return_value = _codecs_utf_16_be_decode_impl(module, &data, errors, final);
+
+exit:
+ /* Cleanup for data */
+ if (data.obj)
+ PyBuffer_Release(&data);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_utf_16_ex_decode__doc__,
+"utf_16_ex_decode($module, data, errors=None, byteorder=0, final=False,\n"
+" /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_UTF_16_EX_DECODE_METHODDEF \
+ {"utf_16_ex_decode", (PyCFunction)_codecs_utf_16_ex_decode, METH_VARARGS, _codecs_utf_16_ex_decode__doc__},
+
+static PyObject *
+_codecs_utf_16_ex_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors, int byteorder, int final);
+
+static PyObject *
+_codecs_utf_16_ex_decode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_buffer data = {NULL, NULL};
+ const char *errors = NULL;
+ int byteorder = 0;
+ int final = 0;
+
+ if (!PyArg_ParseTuple(args, "y*|zii:utf_16_ex_decode",
+ &data, &errors, &byteorder, &final))
+ goto exit;
+ return_value = _codecs_utf_16_ex_decode_impl(module, &data, errors, byteorder, final);
+
+exit:
+ /* Cleanup for data */
+ if (data.obj)
+ PyBuffer_Release(&data);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_utf_32_decode__doc__,
+"utf_32_decode($module, data, errors=None, final=False, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_UTF_32_DECODE_METHODDEF \
+ {"utf_32_decode", (PyCFunction)_codecs_utf_32_decode, METH_VARARGS, _codecs_utf_32_decode__doc__},
+
+static PyObject *
+_codecs_utf_32_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors, int final);
+
+static PyObject *
+_codecs_utf_32_decode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_buffer data = {NULL, NULL};
+ const char *errors = NULL;
+ int final = 0;
+
+ if (!PyArg_ParseTuple(args, "y*|zi:utf_32_decode",
+ &data, &errors, &final))
+ goto exit;
+ return_value = _codecs_utf_32_decode_impl(module, &data, errors, final);
+
+exit:
+ /* Cleanup for data */
+ if (data.obj)
+ PyBuffer_Release(&data);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_utf_32_le_decode__doc__,
+"utf_32_le_decode($module, data, errors=None, final=False, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_UTF_32_LE_DECODE_METHODDEF \
+ {"utf_32_le_decode", (PyCFunction)_codecs_utf_32_le_decode, METH_VARARGS, _codecs_utf_32_le_decode__doc__},
+
+static PyObject *
+_codecs_utf_32_le_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors, int final);
+
+static PyObject *
+_codecs_utf_32_le_decode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_buffer data = {NULL, NULL};
+ const char *errors = NULL;
+ int final = 0;
+
+ if (!PyArg_ParseTuple(args, "y*|zi:utf_32_le_decode",
+ &data, &errors, &final))
+ goto exit;
+ return_value = _codecs_utf_32_le_decode_impl(module, &data, errors, final);
+
+exit:
+ /* Cleanup for data */
+ if (data.obj)
+ PyBuffer_Release(&data);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_utf_32_be_decode__doc__,
+"utf_32_be_decode($module, data, errors=None, final=False, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_UTF_32_BE_DECODE_METHODDEF \
+ {"utf_32_be_decode", (PyCFunction)_codecs_utf_32_be_decode, METH_VARARGS, _codecs_utf_32_be_decode__doc__},
+
+static PyObject *
+_codecs_utf_32_be_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors, int final);
+
+static PyObject *
+_codecs_utf_32_be_decode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_buffer data = {NULL, NULL};
+ const char *errors = NULL;
+ int final = 0;
+
+ if (!PyArg_ParseTuple(args, "y*|zi:utf_32_be_decode",
+ &data, &errors, &final))
+ goto exit;
+ return_value = _codecs_utf_32_be_decode_impl(module, &data, errors, final);
+
+exit:
+ /* Cleanup for data */
+ if (data.obj)
+ PyBuffer_Release(&data);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_utf_32_ex_decode__doc__,
+"utf_32_ex_decode($module, data, errors=None, byteorder=0, final=False,\n"
+" /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_UTF_32_EX_DECODE_METHODDEF \
+ {"utf_32_ex_decode", (PyCFunction)_codecs_utf_32_ex_decode, METH_VARARGS, _codecs_utf_32_ex_decode__doc__},
+
+static PyObject *
+_codecs_utf_32_ex_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors, int byteorder, int final);
+
+static PyObject *
+_codecs_utf_32_ex_decode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_buffer data = {NULL, NULL};
+ const char *errors = NULL;
+ int byteorder = 0;
+ int final = 0;
+
+ if (!PyArg_ParseTuple(args, "y*|zii:utf_32_ex_decode",
+ &data, &errors, &byteorder, &final))
+ goto exit;
+ return_value = _codecs_utf_32_ex_decode_impl(module, &data, errors, byteorder, final);
+
+exit:
+ /* Cleanup for data */
+ if (data.obj)
+ PyBuffer_Release(&data);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_unicode_escape_decode__doc__,
+"unicode_escape_decode($module, data, errors=None, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_UNICODE_ESCAPE_DECODE_METHODDEF \
+ {"unicode_escape_decode", (PyCFunction)_codecs_unicode_escape_decode, METH_VARARGS, _codecs_unicode_escape_decode__doc__},
+
+static PyObject *
+_codecs_unicode_escape_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors);
+
+static PyObject *
+_codecs_unicode_escape_decode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_buffer data = {NULL, NULL};
+ const char *errors = NULL;
+
+ if (!PyArg_ParseTuple(args, "s*|z:unicode_escape_decode",
+ &data, &errors))
+ goto exit;
+ return_value = _codecs_unicode_escape_decode_impl(module, &data, errors);
+
+exit:
+ /* Cleanup for data */
+ if (data.obj)
+ PyBuffer_Release(&data);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_raw_unicode_escape_decode__doc__,
+"raw_unicode_escape_decode($module, data, errors=None, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_RAW_UNICODE_ESCAPE_DECODE_METHODDEF \
+ {"raw_unicode_escape_decode", (PyCFunction)_codecs_raw_unicode_escape_decode, METH_VARARGS, _codecs_raw_unicode_escape_decode__doc__},
+
+static PyObject *
+_codecs_raw_unicode_escape_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors);
+
+static PyObject *
+_codecs_raw_unicode_escape_decode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_buffer data = {NULL, NULL};
+ const char *errors = NULL;
+
+ if (!PyArg_ParseTuple(args, "s*|z:raw_unicode_escape_decode",
+ &data, &errors))
+ goto exit;
+ return_value = _codecs_raw_unicode_escape_decode_impl(module, &data, errors);
+
+exit:
+ /* Cleanup for data */
+ if (data.obj)
+ PyBuffer_Release(&data);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_latin_1_decode__doc__,
+"latin_1_decode($module, data, errors=None, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_LATIN_1_DECODE_METHODDEF \
+ {"latin_1_decode", (PyCFunction)_codecs_latin_1_decode, METH_VARARGS, _codecs_latin_1_decode__doc__},
+
+static PyObject *
+_codecs_latin_1_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors);
+
+static PyObject *
+_codecs_latin_1_decode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_buffer data = {NULL, NULL};
+ const char *errors = NULL;
+
+ if (!PyArg_ParseTuple(args, "y*|z:latin_1_decode",
+ &data, &errors))
+ goto exit;
+ return_value = _codecs_latin_1_decode_impl(module, &data, errors);
+
+exit:
+ /* Cleanup for data */
+ if (data.obj)
+ PyBuffer_Release(&data);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_ascii_decode__doc__,
+"ascii_decode($module, data, errors=None, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_ASCII_DECODE_METHODDEF \
+ {"ascii_decode", (PyCFunction)_codecs_ascii_decode, METH_VARARGS, _codecs_ascii_decode__doc__},
+
+static PyObject *
+_codecs_ascii_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors);
+
+static PyObject *
+_codecs_ascii_decode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_buffer data = {NULL, NULL};
+ const char *errors = NULL;
+
+ if (!PyArg_ParseTuple(args, "y*|z:ascii_decode",
+ &data, &errors))
+ goto exit;
+ return_value = _codecs_ascii_decode_impl(module, &data, errors);
+
+exit:
+ /* Cleanup for data */
+ if (data.obj)
+ PyBuffer_Release(&data);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_charmap_decode__doc__,
+"charmap_decode($module, data, errors=None, mapping=None, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_CHARMAP_DECODE_METHODDEF \
+ {"charmap_decode", (PyCFunction)_codecs_charmap_decode, METH_VARARGS, _codecs_charmap_decode__doc__},
+
+static PyObject *
+_codecs_charmap_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors, PyObject *mapping);
+
+static PyObject *
+_codecs_charmap_decode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_buffer data = {NULL, NULL};
+ const char *errors = NULL;
+ PyObject *mapping = NULL;
+
+ if (!PyArg_ParseTuple(args, "y*|zO:charmap_decode",
+ &data, &errors, &mapping))
+ goto exit;
+ return_value = _codecs_charmap_decode_impl(module, &data, errors, mapping);
+
+exit:
+ /* Cleanup for data */
+ if (data.obj)
+ PyBuffer_Release(&data);
+
+ return return_value;
+}
+
+#if defined(HAVE_MBCS)
+
+PyDoc_STRVAR(_codecs_mbcs_decode__doc__,
+"mbcs_decode($module, data, errors=None, final=False, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_MBCS_DECODE_METHODDEF \
+ {"mbcs_decode", (PyCFunction)_codecs_mbcs_decode, METH_VARARGS, _codecs_mbcs_decode__doc__},
+
+static PyObject *
+_codecs_mbcs_decode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors, int final);
+
+static PyObject *
+_codecs_mbcs_decode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_buffer data = {NULL, NULL};
+ const char *errors = NULL;
+ int final = 0;
+
+ if (!PyArg_ParseTuple(args, "y*|zi:mbcs_decode",
+ &data, &errors, &final))
+ goto exit;
+ return_value = _codecs_mbcs_decode_impl(module, &data, errors, final);
+
+exit:
+ /* Cleanup for data */
+ if (data.obj)
+ PyBuffer_Release(&data);
+
+ return return_value;
+}
+
+#endif /* defined(HAVE_MBCS) */
+
+#if defined(HAVE_MBCS)
+
+PyDoc_STRVAR(_codecs_code_page_decode__doc__,
+"code_page_decode($module, codepage, data, errors=None, final=False, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_CODE_PAGE_DECODE_METHODDEF \
+ {"code_page_decode", (PyCFunction)_codecs_code_page_decode, METH_VARARGS, _codecs_code_page_decode__doc__},
+
+static PyObject *
+_codecs_code_page_decode_impl(PyModuleDef *module, int codepage,
+ Py_buffer *data, const char *errors, int final);
+
+static PyObject *
+_codecs_code_page_decode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int codepage;
+ Py_buffer data = {NULL, NULL};
+ const char *errors = NULL;
+ int final = 0;
+
+ if (!PyArg_ParseTuple(args, "iy*|zi:code_page_decode",
+ &codepage, &data, &errors, &final))
+ goto exit;
+ return_value = _codecs_code_page_decode_impl(module, codepage, &data, errors, final);
+
+exit:
+ /* Cleanup for data */
+ if (data.obj)
+ PyBuffer_Release(&data);
+
+ return return_value;
+}
+
+#endif /* defined(HAVE_MBCS) */
+
+PyDoc_STRVAR(_codecs_readbuffer_encode__doc__,
+"readbuffer_encode($module, data, errors=None, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_READBUFFER_ENCODE_METHODDEF \
+ {"readbuffer_encode", (PyCFunction)_codecs_readbuffer_encode, METH_VARARGS, _codecs_readbuffer_encode__doc__},
+
+static PyObject *
+_codecs_readbuffer_encode_impl(PyModuleDef *module, Py_buffer *data,
+ const char *errors);
+
+static PyObject *
+_codecs_readbuffer_encode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_buffer data = {NULL, NULL};
+ const char *errors = NULL;
+
+ if (!PyArg_ParseTuple(args, "s*|z:readbuffer_encode",
+ &data, &errors))
+ goto exit;
+ return_value = _codecs_readbuffer_encode_impl(module, &data, errors);
+
+exit:
+ /* Cleanup for data */
+ if (data.obj)
+ PyBuffer_Release(&data);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_unicode_internal_encode__doc__,
+"unicode_internal_encode($module, obj, errors=None, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_UNICODE_INTERNAL_ENCODE_METHODDEF \
+ {"unicode_internal_encode", (PyCFunction)_codecs_unicode_internal_encode, METH_VARARGS, _codecs_unicode_internal_encode__doc__},
+
+static PyObject *
+_codecs_unicode_internal_encode_impl(PyModuleDef *module, PyObject *obj,
+ const char *errors);
+
+static PyObject *
+_codecs_unicode_internal_encode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *obj;
+ const char *errors = NULL;
+
+ if (!PyArg_ParseTuple(args, "O|z:unicode_internal_encode",
+ &obj, &errors))
+ goto exit;
+ return_value = _codecs_unicode_internal_encode_impl(module, obj, errors);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_utf_7_encode__doc__,
+"utf_7_encode($module, str, errors=None, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_UTF_7_ENCODE_METHODDEF \
+ {"utf_7_encode", (PyCFunction)_codecs_utf_7_encode, METH_VARARGS, _codecs_utf_7_encode__doc__},
+
+static PyObject *
+_codecs_utf_7_encode_impl(PyModuleDef *module, PyObject *str,
+ const char *errors);
+
+static PyObject *
+_codecs_utf_7_encode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *str;
+ const char *errors = NULL;
+
+ if (!PyArg_ParseTuple(args, "O|z:utf_7_encode",
+ &str, &errors))
+ goto exit;
+ return_value = _codecs_utf_7_encode_impl(module, str, errors);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_utf_8_encode__doc__,
+"utf_8_encode($module, str, errors=None, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_UTF_8_ENCODE_METHODDEF \
+ {"utf_8_encode", (PyCFunction)_codecs_utf_8_encode, METH_VARARGS, _codecs_utf_8_encode__doc__},
+
+static PyObject *
+_codecs_utf_8_encode_impl(PyModuleDef *module, PyObject *str,
+ const char *errors);
+
+static PyObject *
+_codecs_utf_8_encode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *str;
+ const char *errors = NULL;
+
+ if (!PyArg_ParseTuple(args, "O|z:utf_8_encode",
+ &str, &errors))
+ goto exit;
+ return_value = _codecs_utf_8_encode_impl(module, str, errors);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_utf_16_encode__doc__,
+"utf_16_encode($module, str, errors=None, byteorder=0, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_UTF_16_ENCODE_METHODDEF \
+ {"utf_16_encode", (PyCFunction)_codecs_utf_16_encode, METH_VARARGS, _codecs_utf_16_encode__doc__},
+
+static PyObject *
+_codecs_utf_16_encode_impl(PyModuleDef *module, PyObject *str,
+ const char *errors, int byteorder);
+
+static PyObject *
+_codecs_utf_16_encode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *str;
+ const char *errors = NULL;
+ int byteorder = 0;
+
+ if (!PyArg_ParseTuple(args, "O|zi:utf_16_encode",
+ &str, &errors, &byteorder))
+ goto exit;
+ return_value = _codecs_utf_16_encode_impl(module, str, errors, byteorder);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_utf_16_le_encode__doc__,
+"utf_16_le_encode($module, str, errors=None, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_UTF_16_LE_ENCODE_METHODDEF \
+ {"utf_16_le_encode", (PyCFunction)_codecs_utf_16_le_encode, METH_VARARGS, _codecs_utf_16_le_encode__doc__},
+
+static PyObject *
+_codecs_utf_16_le_encode_impl(PyModuleDef *module, PyObject *str,
+ const char *errors);
+
+static PyObject *
+_codecs_utf_16_le_encode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *str;
+ const char *errors = NULL;
+
+ if (!PyArg_ParseTuple(args, "O|z:utf_16_le_encode",
+ &str, &errors))
+ goto exit;
+ return_value = _codecs_utf_16_le_encode_impl(module, str, errors);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_utf_16_be_encode__doc__,
+"utf_16_be_encode($module, str, errors=None, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_UTF_16_BE_ENCODE_METHODDEF \
+ {"utf_16_be_encode", (PyCFunction)_codecs_utf_16_be_encode, METH_VARARGS, _codecs_utf_16_be_encode__doc__},
+
+static PyObject *
+_codecs_utf_16_be_encode_impl(PyModuleDef *module, PyObject *str,
+ const char *errors);
+
+static PyObject *
+_codecs_utf_16_be_encode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *str;
+ const char *errors = NULL;
+
+ if (!PyArg_ParseTuple(args, "O|z:utf_16_be_encode",
+ &str, &errors))
+ goto exit;
+ return_value = _codecs_utf_16_be_encode_impl(module, str, errors);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_utf_32_encode__doc__,
+"utf_32_encode($module, str, errors=None, byteorder=0, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_UTF_32_ENCODE_METHODDEF \
+ {"utf_32_encode", (PyCFunction)_codecs_utf_32_encode, METH_VARARGS, _codecs_utf_32_encode__doc__},
+
+static PyObject *
+_codecs_utf_32_encode_impl(PyModuleDef *module, PyObject *str,
+ const char *errors, int byteorder);
+
+static PyObject *
+_codecs_utf_32_encode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *str;
+ const char *errors = NULL;
+ int byteorder = 0;
+
+ if (!PyArg_ParseTuple(args, "O|zi:utf_32_encode",
+ &str, &errors, &byteorder))
+ goto exit;
+ return_value = _codecs_utf_32_encode_impl(module, str, errors, byteorder);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_utf_32_le_encode__doc__,
+"utf_32_le_encode($module, str, errors=None, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_UTF_32_LE_ENCODE_METHODDEF \
+ {"utf_32_le_encode", (PyCFunction)_codecs_utf_32_le_encode, METH_VARARGS, _codecs_utf_32_le_encode__doc__},
+
+static PyObject *
+_codecs_utf_32_le_encode_impl(PyModuleDef *module, PyObject *str,
+ const char *errors);
+
+static PyObject *
+_codecs_utf_32_le_encode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *str;
+ const char *errors = NULL;
+
+ if (!PyArg_ParseTuple(args, "O|z:utf_32_le_encode",
+ &str, &errors))
+ goto exit;
+ return_value = _codecs_utf_32_le_encode_impl(module, str, errors);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_utf_32_be_encode__doc__,
+"utf_32_be_encode($module, str, errors=None, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_UTF_32_BE_ENCODE_METHODDEF \
+ {"utf_32_be_encode", (PyCFunction)_codecs_utf_32_be_encode, METH_VARARGS, _codecs_utf_32_be_encode__doc__},
+
+static PyObject *
+_codecs_utf_32_be_encode_impl(PyModuleDef *module, PyObject *str,
+ const char *errors);
+
+static PyObject *
+_codecs_utf_32_be_encode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *str;
+ const char *errors = NULL;
+
+ if (!PyArg_ParseTuple(args, "O|z:utf_32_be_encode",
+ &str, &errors))
+ goto exit;
+ return_value = _codecs_utf_32_be_encode_impl(module, str, errors);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_unicode_escape_encode__doc__,
+"unicode_escape_encode($module, str, errors=None, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_UNICODE_ESCAPE_ENCODE_METHODDEF \
+ {"unicode_escape_encode", (PyCFunction)_codecs_unicode_escape_encode, METH_VARARGS, _codecs_unicode_escape_encode__doc__},
+
+static PyObject *
+_codecs_unicode_escape_encode_impl(PyModuleDef *module, PyObject *str,
+ const char *errors);
+
+static PyObject *
+_codecs_unicode_escape_encode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *str;
+ const char *errors = NULL;
+
+ if (!PyArg_ParseTuple(args, "O|z:unicode_escape_encode",
+ &str, &errors))
+ goto exit;
+ return_value = _codecs_unicode_escape_encode_impl(module, str, errors);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_raw_unicode_escape_encode__doc__,
+"raw_unicode_escape_encode($module, str, errors=None, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_RAW_UNICODE_ESCAPE_ENCODE_METHODDEF \
+ {"raw_unicode_escape_encode", (PyCFunction)_codecs_raw_unicode_escape_encode, METH_VARARGS, _codecs_raw_unicode_escape_encode__doc__},
+
+static PyObject *
+_codecs_raw_unicode_escape_encode_impl(PyModuleDef *module, PyObject *str,
+ const char *errors);
+
+static PyObject *
+_codecs_raw_unicode_escape_encode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *str;
+ const char *errors = NULL;
+
+ if (!PyArg_ParseTuple(args, "O|z:raw_unicode_escape_encode",
+ &str, &errors))
+ goto exit;
+ return_value = _codecs_raw_unicode_escape_encode_impl(module, str, errors);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_latin_1_encode__doc__,
+"latin_1_encode($module, str, errors=None, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_LATIN_1_ENCODE_METHODDEF \
+ {"latin_1_encode", (PyCFunction)_codecs_latin_1_encode, METH_VARARGS, _codecs_latin_1_encode__doc__},
+
+static PyObject *
+_codecs_latin_1_encode_impl(PyModuleDef *module, PyObject *str,
+ const char *errors);
+
+static PyObject *
+_codecs_latin_1_encode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *str;
+ const char *errors = NULL;
+
+ if (!PyArg_ParseTuple(args, "O|z:latin_1_encode",
+ &str, &errors))
+ goto exit;
+ return_value = _codecs_latin_1_encode_impl(module, str, errors);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_ascii_encode__doc__,
+"ascii_encode($module, str, errors=None, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_ASCII_ENCODE_METHODDEF \
+ {"ascii_encode", (PyCFunction)_codecs_ascii_encode, METH_VARARGS, _codecs_ascii_encode__doc__},
+
+static PyObject *
+_codecs_ascii_encode_impl(PyModuleDef *module, PyObject *str,
+ const char *errors);
+
+static PyObject *
+_codecs_ascii_encode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *str;
+ const char *errors = NULL;
+
+ if (!PyArg_ParseTuple(args, "O|z:ascii_encode",
+ &str, &errors))
+ goto exit;
+ return_value = _codecs_ascii_encode_impl(module, str, errors);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_charmap_encode__doc__,
+"charmap_encode($module, str, errors=None, mapping=None, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_CHARMAP_ENCODE_METHODDEF \
+ {"charmap_encode", (PyCFunction)_codecs_charmap_encode, METH_VARARGS, _codecs_charmap_encode__doc__},
+
+static PyObject *
+_codecs_charmap_encode_impl(PyModuleDef *module, PyObject *str,
+ const char *errors, PyObject *mapping);
+
+static PyObject *
+_codecs_charmap_encode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *str;
+ const char *errors = NULL;
+ PyObject *mapping = NULL;
+
+ if (!PyArg_ParseTuple(args, "O|zO:charmap_encode",
+ &str, &errors, &mapping))
+ goto exit;
+ return_value = _codecs_charmap_encode_impl(module, str, errors, mapping);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_charmap_build__doc__,
+"charmap_build($module, map, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_CHARMAP_BUILD_METHODDEF \
+ {"charmap_build", (PyCFunction)_codecs_charmap_build, METH_O, _codecs_charmap_build__doc__},
+
+static PyObject *
+_codecs_charmap_build_impl(PyModuleDef *module, PyObject *map);
+
+static PyObject *
+_codecs_charmap_build(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ PyObject *map;
+
+ if (!PyArg_Parse(arg, "U:charmap_build", &map))
+ goto exit;
+ return_value = _codecs_charmap_build_impl(module, map);
+
+exit:
+ return return_value;
+}
+
+#if defined(HAVE_MBCS)
+
+PyDoc_STRVAR(_codecs_mbcs_encode__doc__,
+"mbcs_encode($module, str, errors=None, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_MBCS_ENCODE_METHODDEF \
+ {"mbcs_encode", (PyCFunction)_codecs_mbcs_encode, METH_VARARGS, _codecs_mbcs_encode__doc__},
+
+static PyObject *
+_codecs_mbcs_encode_impl(PyModuleDef *module, PyObject *str,
+ const char *errors);
+
+static PyObject *
+_codecs_mbcs_encode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *str;
+ const char *errors = NULL;
+
+ if (!PyArg_ParseTuple(args, "O|z:mbcs_encode",
+ &str, &errors))
+ goto exit;
+ return_value = _codecs_mbcs_encode_impl(module, str, errors);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_MBCS) */
+
+#if defined(HAVE_MBCS)
+
+PyDoc_STRVAR(_codecs_code_page_encode__doc__,
+"code_page_encode($module, code_page, str, errors=None, /)\n"
+"--\n"
+"\n");
+
+#define _CODECS_CODE_PAGE_ENCODE_METHODDEF \
+ {"code_page_encode", (PyCFunction)_codecs_code_page_encode, METH_VARARGS, _codecs_code_page_encode__doc__},
+
+static PyObject *
+_codecs_code_page_encode_impl(PyModuleDef *module, int code_page,
+ PyObject *str, const char *errors);
+
+static PyObject *
+_codecs_code_page_encode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int code_page;
+ PyObject *str;
+ const char *errors = NULL;
+
+ if (!PyArg_ParseTuple(args, "iO|z:code_page_encode",
+ &code_page, &str, &errors))
+ goto exit;
+ return_value = _codecs_code_page_encode_impl(module, code_page, str, errors);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_MBCS) */
+
+PyDoc_STRVAR(_codecs_register_error__doc__,
+"register_error($module, errors, handler, /)\n"
+"--\n"
+"\n"
+"Register the specified error handler under the name errors.\n"
+"\n"
+"handler must be a callable object, that will be called with an exception\n"
+"instance containing information about the location of the encoding/decoding\n"
+"error and must return a (replacement, new position) tuple.");
+
+#define _CODECS_REGISTER_ERROR_METHODDEF \
+ {"register_error", (PyCFunction)_codecs_register_error, METH_VARARGS, _codecs_register_error__doc__},
+
+static PyObject *
+_codecs_register_error_impl(PyModuleDef *module, const char *errors,
+ PyObject *handler);
+
+static PyObject *
+_codecs_register_error(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ const char *errors;
+ PyObject *handler;
+
+ if (!PyArg_ParseTuple(args, "sO:register_error",
+ &errors, &handler))
+ goto exit;
+ return_value = _codecs_register_error_impl(module, errors, handler);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_codecs_lookup_error__doc__,
+"lookup_error($module, name, /)\n"
+"--\n"
+"\n"
+"lookup_error(errors) -> handler\n"
+"\n"
+"Return the error handler for the specified error handling name or raise a\n"
+"LookupError, if no handler exists under this name.");
+
+#define _CODECS_LOOKUP_ERROR_METHODDEF \
+ {"lookup_error", (PyCFunction)_codecs_lookup_error, METH_O, _codecs_lookup_error__doc__},
+
+static PyObject *
+_codecs_lookup_error_impl(PyModuleDef *module, const char *name);
+
+static PyObject *
+_codecs_lookup_error(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ const char *name;
+
+ if (!PyArg_Parse(arg, "s:lookup_error", &name))
+ goto exit;
+ return_value = _codecs_lookup_error_impl(module, name);
+
+exit:
+ return return_value;
+}
+
+#ifndef _CODECS_MBCS_DECODE_METHODDEF
+ #define _CODECS_MBCS_DECODE_METHODDEF
+#endif /* !defined(_CODECS_MBCS_DECODE_METHODDEF) */
+
+#ifndef _CODECS_CODE_PAGE_DECODE_METHODDEF
+ #define _CODECS_CODE_PAGE_DECODE_METHODDEF
+#endif /* !defined(_CODECS_CODE_PAGE_DECODE_METHODDEF) */
+
+#ifndef _CODECS_MBCS_ENCODE_METHODDEF
+ #define _CODECS_MBCS_ENCODE_METHODDEF
+#endif /* !defined(_CODECS_MBCS_ENCODE_METHODDEF) */
+
+#ifndef _CODECS_CODE_PAGE_ENCODE_METHODDEF
+ #define _CODECS_CODE_PAGE_ENCODE_METHODDEF
+#endif /* !defined(_CODECS_CODE_PAGE_ENCODE_METHODDEF) */
+/*[clinic end generated code: output=9c9967048027c1c7 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/_cryptmodule.c.h b/Modules/clinic/_cryptmodule.c.h
new file mode 100644
index 0000000000..b8ec31e003
--- /dev/null
+++ b/Modules/clinic/_cryptmodule.c.h
@@ -0,0 +1,37 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(crypt_crypt__doc__,
+"crypt($module, word, salt, /)\n"
+"--\n"
+"\n"
+"Hash a *word* with the given *salt* and return the hashed password.\n"
+"\n"
+"*word* will usually be a user\'s password. *salt* (either a random 2 or 16\n"
+"character string, possibly prefixed with $digit$ to indicate the method)\n"
+"will be used to perturb the encryption algorithm and produce distinct\n"
+"results for a given *word*.");
+
+#define CRYPT_CRYPT_METHODDEF \
+ {"crypt", (PyCFunction)crypt_crypt, METH_VARARGS, crypt_crypt__doc__},
+
+static PyObject *
+crypt_crypt_impl(PyModuleDef *module, const char *word, const char *salt);
+
+static PyObject *
+crypt_crypt(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ const char *word;
+ const char *salt;
+
+ if (!PyArg_ParseTuple(args, "ss:crypt",
+ &word, &salt))
+ goto exit;
+ return_value = crypt_crypt_impl(module, word, salt);
+
+exit:
+ return return_value;
+}
+/*[clinic end generated code: output=22c295c9bce018c4 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/_cursesmodule.c.h b/Modules/clinic/_cursesmodule.c.h
new file mode 100644
index 0000000000..5e11742499
--- /dev/null
+++ b/Modules/clinic/_cursesmodule.c.h
@@ -0,0 +1,71 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(curses_window_addch__doc__,
+"addch([y, x,] ch, [attr])\n"
+"Paint character ch at (y, x) with attributes attr.\n"
+"\n"
+" y\n"
+" Y-coordinate.\n"
+" x\n"
+" X-coordinate.\n"
+" ch\n"
+" Character to add.\n"
+" attr\n"
+" Attributes for the character.\n"
+"\n"
+"Paint character ch at (y, x) with attributes attr,\n"
+"overwriting any character previously painted at that location.\n"
+"By default, the character position and attributes are the\n"
+"current settings for the window object.");
+
+#define CURSES_WINDOW_ADDCH_METHODDEF \
+ {"addch", (PyCFunction)curses_window_addch, METH_VARARGS, curses_window_addch__doc__},
+
+static PyObject *
+curses_window_addch_impl(PyCursesWindowObject *self, int group_left_1, int y,
+ int x, PyObject *ch, int group_right_1, long attr);
+
+static PyObject *
+curses_window_addch(PyCursesWindowObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int group_left_1 = 0;
+ int y = 0;
+ int x = 0;
+ PyObject *ch;
+ int group_right_1 = 0;
+ long attr = 0;
+
+ switch (PyTuple_GET_SIZE(args)) {
+ case 1:
+ if (!PyArg_ParseTuple(args, "O:addch", &ch))
+ goto exit;
+ break;
+ case 2:
+ if (!PyArg_ParseTuple(args, "Ol:addch", &ch, &attr))
+ goto exit;
+ group_right_1 = 1;
+ break;
+ case 3:
+ if (!PyArg_ParseTuple(args, "iiO:addch", &y, &x, &ch))
+ goto exit;
+ group_left_1 = 1;
+ break;
+ case 4:
+ if (!PyArg_ParseTuple(args, "iiOl:addch", &y, &x, &ch, &attr))
+ goto exit;
+ group_right_1 = 1;
+ group_left_1 = 1;
+ break;
+ default:
+ PyErr_SetString(PyExc_TypeError, "curses.window.addch requires 1 to 4 arguments");
+ goto exit;
+ }
+ return_value = curses_window_addch_impl(self, group_left_1, y, x, ch, group_right_1, attr);
+
+exit:
+ return return_value;
+}
+/*[clinic end generated code: output=982b1e709577f3ec input=a9049054013a1b77]*/
diff --git a/Modules/clinic/_datetimemodule.c.h b/Modules/clinic/_datetimemodule.c.h
new file mode 100644
index 0000000000..688c903e2f
--- /dev/null
+++ b/Modules/clinic/_datetimemodule.c.h
@@ -0,0 +1,37 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(datetime_datetime_now__doc__,
+"now($type, /, tz=None)\n"
+"--\n"
+"\n"
+"Returns new datetime object representing current time local to tz.\n"
+"\n"
+" tz\n"
+" Timezone object.\n"
+"\n"
+"If no tz is specified, uses local timezone.");
+
+#define DATETIME_DATETIME_NOW_METHODDEF \
+ {"now", (PyCFunction)datetime_datetime_now, METH_VARARGS|METH_KEYWORDS|METH_CLASS, datetime_datetime_now__doc__},
+
+static PyObject *
+datetime_datetime_now_impl(PyTypeObject *type, PyObject *tz);
+
+static PyObject *
+datetime_datetime_now(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"tz", NULL};
+ PyObject *tz = Py_None;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:now", _keywords,
+ &tz))
+ goto exit;
+ return_value = datetime_datetime_now_impl(type, tz);
+
+exit:
+ return return_value;
+}
+/*[clinic end generated code: output=7f45c670d6e4953a input=a9049054013a1b77]*/
diff --git a/Modules/clinic/_dbmmodule.c.h b/Modules/clinic/_dbmmodule.c.h
new file mode 100644
index 0000000000..8474e02828
--- /dev/null
+++ b/Modules/clinic/_dbmmodule.c.h
@@ -0,0 +1,141 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(_dbm_dbm_close__doc__,
+"close($self, /)\n"
+"--\n"
+"\n"
+"Close the database.");
+
+#define _DBM_DBM_CLOSE_METHODDEF \
+ {"close", (PyCFunction)_dbm_dbm_close, METH_NOARGS, _dbm_dbm_close__doc__},
+
+static PyObject *
+_dbm_dbm_close_impl(dbmobject *self);
+
+static PyObject *
+_dbm_dbm_close(dbmobject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _dbm_dbm_close_impl(self);
+}
+
+PyDoc_STRVAR(_dbm_dbm_keys__doc__,
+"keys($self, /)\n"
+"--\n"
+"\n"
+"Return a list of all keys in the database.");
+
+#define _DBM_DBM_KEYS_METHODDEF \
+ {"keys", (PyCFunction)_dbm_dbm_keys, METH_NOARGS, _dbm_dbm_keys__doc__},
+
+static PyObject *
+_dbm_dbm_keys_impl(dbmobject *self);
+
+static PyObject *
+_dbm_dbm_keys(dbmobject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _dbm_dbm_keys_impl(self);
+}
+
+PyDoc_STRVAR(_dbm_dbm_get__doc__,
+"get($self, key, default=b\'\', /)\n"
+"--\n"
+"\n"
+"Return the value for key if present, otherwise default.");
+
+#define _DBM_DBM_GET_METHODDEF \
+ {"get", (PyCFunction)_dbm_dbm_get, METH_VARARGS, _dbm_dbm_get__doc__},
+
+static PyObject *
+_dbm_dbm_get_impl(dbmobject *self, const char *key,
+ Py_ssize_clean_t key_length, PyObject *default_value);
+
+static PyObject *
+_dbm_dbm_get(dbmobject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ const char *key;
+ Py_ssize_clean_t key_length;
+ PyObject *default_value = NULL;
+
+ if (!PyArg_ParseTuple(args, "s#|O:get",
+ &key, &key_length, &default_value))
+ goto exit;
+ return_value = _dbm_dbm_get_impl(self, key, key_length, default_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_dbm_dbm_setdefault__doc__,
+"setdefault($self, key, default=b\'\', /)\n"
+"--\n"
+"\n"
+"Return the value for key if present, otherwise default.\n"
+"\n"
+"If key is not in the database, it is inserted with default as the value.");
+
+#define _DBM_DBM_SETDEFAULT_METHODDEF \
+ {"setdefault", (PyCFunction)_dbm_dbm_setdefault, METH_VARARGS, _dbm_dbm_setdefault__doc__},
+
+static PyObject *
+_dbm_dbm_setdefault_impl(dbmobject *self, const char *key,
+ Py_ssize_clean_t key_length,
+ PyObject *default_value);
+
+static PyObject *
+_dbm_dbm_setdefault(dbmobject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ const char *key;
+ Py_ssize_clean_t key_length;
+ PyObject *default_value = NULL;
+
+ if (!PyArg_ParseTuple(args, "s#|O:setdefault",
+ &key, &key_length, &default_value))
+ goto exit;
+ return_value = _dbm_dbm_setdefault_impl(self, key, key_length, default_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(dbmopen__doc__,
+"open($module, filename, flags=\'r\', mode=0o666, /)\n"
+"--\n"
+"\n"
+"Return a database object.\n"
+"\n"
+" filename\n"
+" The filename to open.\n"
+" flags\n"
+" How to open the file. \"r\" for reading, \"w\" for writing, etc.\n"
+" mode\n"
+" If creating a new file, the mode bits for the new file\n"
+" (e.g. os.O_RDWR).");
+
+#define DBMOPEN_METHODDEF \
+ {"open", (PyCFunction)dbmopen, METH_VARARGS, dbmopen__doc__},
+
+static PyObject *
+dbmopen_impl(PyModuleDef *module, const char *filename, const char *flags,
+ int mode);
+
+static PyObject *
+dbmopen(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ const char *filename;
+ const char *flags = "r";
+ int mode = 438;
+
+ if (!PyArg_ParseTuple(args, "s|si:open",
+ &filename, &flags, &mode))
+ goto exit;
+ return_value = dbmopen_impl(module, filename, flags, mode);
+
+exit:
+ return return_value;
+}
+/*[clinic end generated code: output=1d92e81b28c558d0 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/_elementtree.c.h b/Modules/clinic/_elementtree.c.h
new file mode 100644
index 0000000000..86b4c4cec7
--- /dev/null
+++ b/Modules/clinic/_elementtree.c.h
@@ -0,0 +1,679 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(_elementtree_Element_append__doc__,
+"append($self, subelement, /)\n"
+"--\n"
+"\n");
+
+#define _ELEMENTTREE_ELEMENT_APPEND_METHODDEF \
+ {"append", (PyCFunction)_elementtree_Element_append, METH_O, _elementtree_Element_append__doc__},
+
+static PyObject *
+_elementtree_Element_append_impl(ElementObject *self, PyObject *subelement);
+
+static PyObject *
+_elementtree_Element_append(ElementObject *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ PyObject *subelement;
+
+ if (!PyArg_Parse(arg, "O!:append", &Element_Type, &subelement))
+ goto exit;
+ return_value = _elementtree_Element_append_impl(self, subelement);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_elementtree_Element_clear__doc__,
+"clear($self, /)\n"
+"--\n"
+"\n");
+
+#define _ELEMENTTREE_ELEMENT_CLEAR_METHODDEF \
+ {"clear", (PyCFunction)_elementtree_Element_clear, METH_NOARGS, _elementtree_Element_clear__doc__},
+
+static PyObject *
+_elementtree_Element_clear_impl(ElementObject *self);
+
+static PyObject *
+_elementtree_Element_clear(ElementObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _elementtree_Element_clear_impl(self);
+}
+
+PyDoc_STRVAR(_elementtree_Element___copy____doc__,
+"__copy__($self, /)\n"
+"--\n"
+"\n");
+
+#define _ELEMENTTREE_ELEMENT___COPY___METHODDEF \
+ {"__copy__", (PyCFunction)_elementtree_Element___copy__, METH_NOARGS, _elementtree_Element___copy____doc__},
+
+static PyObject *
+_elementtree_Element___copy___impl(ElementObject *self);
+
+static PyObject *
+_elementtree_Element___copy__(ElementObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _elementtree_Element___copy___impl(self);
+}
+
+PyDoc_STRVAR(_elementtree_Element___deepcopy____doc__,
+"__deepcopy__($self, memo, /)\n"
+"--\n"
+"\n");
+
+#define _ELEMENTTREE_ELEMENT___DEEPCOPY___METHODDEF \
+ {"__deepcopy__", (PyCFunction)_elementtree_Element___deepcopy__, METH_O, _elementtree_Element___deepcopy____doc__},
+
+PyDoc_STRVAR(_elementtree_Element___sizeof____doc__,
+"__sizeof__($self, /)\n"
+"--\n"
+"\n");
+
+#define _ELEMENTTREE_ELEMENT___SIZEOF___METHODDEF \
+ {"__sizeof__", (PyCFunction)_elementtree_Element___sizeof__, METH_NOARGS, _elementtree_Element___sizeof____doc__},
+
+static Py_ssize_t
+_elementtree_Element___sizeof___impl(ElementObject *self);
+
+static PyObject *
+_elementtree_Element___sizeof__(ElementObject *self, PyObject *Py_UNUSED(ignored))
+{
+ PyObject *return_value = NULL;
+ Py_ssize_t _return_value;
+
+ _return_value = _elementtree_Element___sizeof___impl(self);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromSsize_t(_return_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_elementtree_Element___getstate____doc__,
+"__getstate__($self, /)\n"
+"--\n"
+"\n");
+
+#define _ELEMENTTREE_ELEMENT___GETSTATE___METHODDEF \
+ {"__getstate__", (PyCFunction)_elementtree_Element___getstate__, METH_NOARGS, _elementtree_Element___getstate____doc__},
+
+static PyObject *
+_elementtree_Element___getstate___impl(ElementObject *self);
+
+static PyObject *
+_elementtree_Element___getstate__(ElementObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _elementtree_Element___getstate___impl(self);
+}
+
+PyDoc_STRVAR(_elementtree_Element___setstate____doc__,
+"__setstate__($self, state, /)\n"
+"--\n"
+"\n");
+
+#define _ELEMENTTREE_ELEMENT___SETSTATE___METHODDEF \
+ {"__setstate__", (PyCFunction)_elementtree_Element___setstate__, METH_O, _elementtree_Element___setstate____doc__},
+
+PyDoc_STRVAR(_elementtree_Element_extend__doc__,
+"extend($self, elements, /)\n"
+"--\n"
+"\n");
+
+#define _ELEMENTTREE_ELEMENT_EXTEND_METHODDEF \
+ {"extend", (PyCFunction)_elementtree_Element_extend, METH_O, _elementtree_Element_extend__doc__},
+
+PyDoc_STRVAR(_elementtree_Element_find__doc__,
+"find($self, /, path, namespaces=None)\n"
+"--\n"
+"\n");
+
+#define _ELEMENTTREE_ELEMENT_FIND_METHODDEF \
+ {"find", (PyCFunction)_elementtree_Element_find, METH_VARARGS|METH_KEYWORDS, _elementtree_Element_find__doc__},
+
+static PyObject *
+_elementtree_Element_find_impl(ElementObject *self, PyObject *path,
+ PyObject *namespaces);
+
+static PyObject *
+_elementtree_Element_find(ElementObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", "namespaces", NULL};
+ PyObject *path;
+ PyObject *namespaces = Py_None;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:find", _keywords,
+ &path, &namespaces))
+ goto exit;
+ return_value = _elementtree_Element_find_impl(self, path, namespaces);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_elementtree_Element_findtext__doc__,
+"findtext($self, /, path, default=None, namespaces=None)\n"
+"--\n"
+"\n");
+
+#define _ELEMENTTREE_ELEMENT_FINDTEXT_METHODDEF \
+ {"findtext", (PyCFunction)_elementtree_Element_findtext, METH_VARARGS|METH_KEYWORDS, _elementtree_Element_findtext__doc__},
+
+static PyObject *
+_elementtree_Element_findtext_impl(ElementObject *self, PyObject *path,
+ PyObject *default_value,
+ PyObject *namespaces);
+
+static PyObject *
+_elementtree_Element_findtext(ElementObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", "default", "namespaces", NULL};
+ PyObject *path;
+ PyObject *default_value = Py_None;
+ PyObject *namespaces = Py_None;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:findtext", _keywords,
+ &path, &default_value, &namespaces))
+ goto exit;
+ return_value = _elementtree_Element_findtext_impl(self, path, default_value, namespaces);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_elementtree_Element_findall__doc__,
+"findall($self, /, path, namespaces=None)\n"
+"--\n"
+"\n");
+
+#define _ELEMENTTREE_ELEMENT_FINDALL_METHODDEF \
+ {"findall", (PyCFunction)_elementtree_Element_findall, METH_VARARGS|METH_KEYWORDS, _elementtree_Element_findall__doc__},
+
+static PyObject *
+_elementtree_Element_findall_impl(ElementObject *self, PyObject *path,
+ PyObject *namespaces);
+
+static PyObject *
+_elementtree_Element_findall(ElementObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", "namespaces", NULL};
+ PyObject *path;
+ PyObject *namespaces = Py_None;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:findall", _keywords,
+ &path, &namespaces))
+ goto exit;
+ return_value = _elementtree_Element_findall_impl(self, path, namespaces);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_elementtree_Element_iterfind__doc__,
+"iterfind($self, /, path, namespaces=None)\n"
+"--\n"
+"\n");
+
+#define _ELEMENTTREE_ELEMENT_ITERFIND_METHODDEF \
+ {"iterfind", (PyCFunction)_elementtree_Element_iterfind, METH_VARARGS|METH_KEYWORDS, _elementtree_Element_iterfind__doc__},
+
+static PyObject *
+_elementtree_Element_iterfind_impl(ElementObject *self, PyObject *path,
+ PyObject *namespaces);
+
+static PyObject *
+_elementtree_Element_iterfind(ElementObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", "namespaces", NULL};
+ PyObject *path;
+ PyObject *namespaces = Py_None;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:iterfind", _keywords,
+ &path, &namespaces))
+ goto exit;
+ return_value = _elementtree_Element_iterfind_impl(self, path, namespaces);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_elementtree_Element_get__doc__,
+"get($self, /, key, default=None)\n"
+"--\n"
+"\n");
+
+#define _ELEMENTTREE_ELEMENT_GET_METHODDEF \
+ {"get", (PyCFunction)_elementtree_Element_get, METH_VARARGS|METH_KEYWORDS, _elementtree_Element_get__doc__},
+
+static PyObject *
+_elementtree_Element_get_impl(ElementObject *self, PyObject *key,
+ PyObject *default_value);
+
+static PyObject *
+_elementtree_Element_get(ElementObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"key", "default", NULL};
+ PyObject *key;
+ PyObject *default_value = Py_None;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:get", _keywords,
+ &key, &default_value))
+ goto exit;
+ return_value = _elementtree_Element_get_impl(self, key, default_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_elementtree_Element_getchildren__doc__,
+"getchildren($self, /)\n"
+"--\n"
+"\n");
+
+#define _ELEMENTTREE_ELEMENT_GETCHILDREN_METHODDEF \
+ {"getchildren", (PyCFunction)_elementtree_Element_getchildren, METH_NOARGS, _elementtree_Element_getchildren__doc__},
+
+static PyObject *
+_elementtree_Element_getchildren_impl(ElementObject *self);
+
+static PyObject *
+_elementtree_Element_getchildren(ElementObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _elementtree_Element_getchildren_impl(self);
+}
+
+PyDoc_STRVAR(_elementtree_Element_iter__doc__,
+"iter($self, /, tag=None)\n"
+"--\n"
+"\n");
+
+#define _ELEMENTTREE_ELEMENT_ITER_METHODDEF \
+ {"iter", (PyCFunction)_elementtree_Element_iter, METH_VARARGS|METH_KEYWORDS, _elementtree_Element_iter__doc__},
+
+static PyObject *
+_elementtree_Element_iter_impl(ElementObject *self, PyObject *tag);
+
+static PyObject *
+_elementtree_Element_iter(ElementObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"tag", NULL};
+ PyObject *tag = Py_None;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:iter", _keywords,
+ &tag))
+ goto exit;
+ return_value = _elementtree_Element_iter_impl(self, tag);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_elementtree_Element_itertext__doc__,
+"itertext($self, /)\n"
+"--\n"
+"\n");
+
+#define _ELEMENTTREE_ELEMENT_ITERTEXT_METHODDEF \
+ {"itertext", (PyCFunction)_elementtree_Element_itertext, METH_NOARGS, _elementtree_Element_itertext__doc__},
+
+static PyObject *
+_elementtree_Element_itertext_impl(ElementObject *self);
+
+static PyObject *
+_elementtree_Element_itertext(ElementObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _elementtree_Element_itertext_impl(self);
+}
+
+PyDoc_STRVAR(_elementtree_Element_insert__doc__,
+"insert($self, index, subelement, /)\n"
+"--\n"
+"\n");
+
+#define _ELEMENTTREE_ELEMENT_INSERT_METHODDEF \
+ {"insert", (PyCFunction)_elementtree_Element_insert, METH_VARARGS, _elementtree_Element_insert__doc__},
+
+static PyObject *
+_elementtree_Element_insert_impl(ElementObject *self, Py_ssize_t index,
+ PyObject *subelement);
+
+static PyObject *
+_elementtree_Element_insert(ElementObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_ssize_t index;
+ PyObject *subelement;
+
+ if (!PyArg_ParseTuple(args, "nO!:insert",
+ &index, &Element_Type, &subelement))
+ goto exit;
+ return_value = _elementtree_Element_insert_impl(self, index, subelement);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_elementtree_Element_items__doc__,
+"items($self, /)\n"
+"--\n"
+"\n");
+
+#define _ELEMENTTREE_ELEMENT_ITEMS_METHODDEF \
+ {"items", (PyCFunction)_elementtree_Element_items, METH_NOARGS, _elementtree_Element_items__doc__},
+
+static PyObject *
+_elementtree_Element_items_impl(ElementObject *self);
+
+static PyObject *
+_elementtree_Element_items(ElementObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _elementtree_Element_items_impl(self);
+}
+
+PyDoc_STRVAR(_elementtree_Element_keys__doc__,
+"keys($self, /)\n"
+"--\n"
+"\n");
+
+#define _ELEMENTTREE_ELEMENT_KEYS_METHODDEF \
+ {"keys", (PyCFunction)_elementtree_Element_keys, METH_NOARGS, _elementtree_Element_keys__doc__},
+
+static PyObject *
+_elementtree_Element_keys_impl(ElementObject *self);
+
+static PyObject *
+_elementtree_Element_keys(ElementObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _elementtree_Element_keys_impl(self);
+}
+
+PyDoc_STRVAR(_elementtree_Element_makeelement__doc__,
+"makeelement($self, tag, attrib, /)\n"
+"--\n"
+"\n");
+
+#define _ELEMENTTREE_ELEMENT_MAKEELEMENT_METHODDEF \
+ {"makeelement", (PyCFunction)_elementtree_Element_makeelement, METH_VARARGS, _elementtree_Element_makeelement__doc__},
+
+static PyObject *
+_elementtree_Element_makeelement_impl(ElementObject *self, PyObject *tag,
+ PyObject *attrib);
+
+static PyObject *
+_elementtree_Element_makeelement(ElementObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *tag;
+ PyObject *attrib;
+
+ if (!PyArg_UnpackTuple(args, "makeelement",
+ 2, 2,
+ &tag, &attrib))
+ goto exit;
+ return_value = _elementtree_Element_makeelement_impl(self, tag, attrib);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_elementtree_Element_remove__doc__,
+"remove($self, subelement, /)\n"
+"--\n"
+"\n");
+
+#define _ELEMENTTREE_ELEMENT_REMOVE_METHODDEF \
+ {"remove", (PyCFunction)_elementtree_Element_remove, METH_O, _elementtree_Element_remove__doc__},
+
+static PyObject *
+_elementtree_Element_remove_impl(ElementObject *self, PyObject *subelement);
+
+static PyObject *
+_elementtree_Element_remove(ElementObject *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ PyObject *subelement;
+
+ if (!PyArg_Parse(arg, "O!:remove", &Element_Type, &subelement))
+ goto exit;
+ return_value = _elementtree_Element_remove_impl(self, subelement);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_elementtree_Element_set__doc__,
+"set($self, key, value, /)\n"
+"--\n"
+"\n");
+
+#define _ELEMENTTREE_ELEMENT_SET_METHODDEF \
+ {"set", (PyCFunction)_elementtree_Element_set, METH_VARARGS, _elementtree_Element_set__doc__},
+
+static PyObject *
+_elementtree_Element_set_impl(ElementObject *self, PyObject *key,
+ PyObject *value);
+
+static PyObject *
+_elementtree_Element_set(ElementObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *key;
+ PyObject *value;
+
+ if (!PyArg_UnpackTuple(args, "set",
+ 2, 2,
+ &key, &value))
+ goto exit;
+ return_value = _elementtree_Element_set_impl(self, key, value);
+
+exit:
+ return return_value;
+}
+
+static int
+_elementtree_TreeBuilder___init___impl(TreeBuilderObject *self,
+ PyObject *element_factory);
+
+static int
+_elementtree_TreeBuilder___init__(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ int return_value = -1;
+ static char *_keywords[] = {"element_factory", NULL};
+ PyObject *element_factory = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:TreeBuilder", _keywords,
+ &element_factory))
+ goto exit;
+ return_value = _elementtree_TreeBuilder___init___impl((TreeBuilderObject *)self, element_factory);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_elementtree_TreeBuilder_data__doc__,
+"data($self, data, /)\n"
+"--\n"
+"\n");
+
+#define _ELEMENTTREE_TREEBUILDER_DATA_METHODDEF \
+ {"data", (PyCFunction)_elementtree_TreeBuilder_data, METH_O, _elementtree_TreeBuilder_data__doc__},
+
+PyDoc_STRVAR(_elementtree_TreeBuilder_end__doc__,
+"end($self, tag, /)\n"
+"--\n"
+"\n");
+
+#define _ELEMENTTREE_TREEBUILDER_END_METHODDEF \
+ {"end", (PyCFunction)_elementtree_TreeBuilder_end, METH_O, _elementtree_TreeBuilder_end__doc__},
+
+PyDoc_STRVAR(_elementtree_TreeBuilder_close__doc__,
+"close($self, /)\n"
+"--\n"
+"\n");
+
+#define _ELEMENTTREE_TREEBUILDER_CLOSE_METHODDEF \
+ {"close", (PyCFunction)_elementtree_TreeBuilder_close, METH_NOARGS, _elementtree_TreeBuilder_close__doc__},
+
+static PyObject *
+_elementtree_TreeBuilder_close_impl(TreeBuilderObject *self);
+
+static PyObject *
+_elementtree_TreeBuilder_close(TreeBuilderObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _elementtree_TreeBuilder_close_impl(self);
+}
+
+PyDoc_STRVAR(_elementtree_TreeBuilder_start__doc__,
+"start($self, tag, attrs=None, /)\n"
+"--\n"
+"\n");
+
+#define _ELEMENTTREE_TREEBUILDER_START_METHODDEF \
+ {"start", (PyCFunction)_elementtree_TreeBuilder_start, METH_VARARGS, _elementtree_TreeBuilder_start__doc__},
+
+static PyObject *
+_elementtree_TreeBuilder_start_impl(TreeBuilderObject *self, PyObject *tag,
+ PyObject *attrs);
+
+static PyObject *
+_elementtree_TreeBuilder_start(TreeBuilderObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *tag;
+ PyObject *attrs = Py_None;
+
+ if (!PyArg_UnpackTuple(args, "start",
+ 1, 2,
+ &tag, &attrs))
+ goto exit;
+ return_value = _elementtree_TreeBuilder_start_impl(self, tag, attrs);
+
+exit:
+ return return_value;
+}
+
+static int
+_elementtree_XMLParser___init___impl(XMLParserObject *self, PyObject *html,
+ PyObject *target, const char *encoding);
+
+static int
+_elementtree_XMLParser___init__(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ int return_value = -1;
+ static char *_keywords[] = {"html", "target", "encoding", NULL};
+ PyObject *html = NULL;
+ PyObject *target = NULL;
+ const char *encoding = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OOz:XMLParser", _keywords,
+ &html, &target, &encoding))
+ goto exit;
+ return_value = _elementtree_XMLParser___init___impl((XMLParserObject *)self, html, target, encoding);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_elementtree_XMLParser_close__doc__,
+"close($self, /)\n"
+"--\n"
+"\n");
+
+#define _ELEMENTTREE_XMLPARSER_CLOSE_METHODDEF \
+ {"close", (PyCFunction)_elementtree_XMLParser_close, METH_NOARGS, _elementtree_XMLParser_close__doc__},
+
+static PyObject *
+_elementtree_XMLParser_close_impl(XMLParserObject *self);
+
+static PyObject *
+_elementtree_XMLParser_close(XMLParserObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _elementtree_XMLParser_close_impl(self);
+}
+
+PyDoc_STRVAR(_elementtree_XMLParser_feed__doc__,
+"feed($self, data, /)\n"
+"--\n"
+"\n");
+
+#define _ELEMENTTREE_XMLPARSER_FEED_METHODDEF \
+ {"feed", (PyCFunction)_elementtree_XMLParser_feed, METH_O, _elementtree_XMLParser_feed__doc__},
+
+PyDoc_STRVAR(_elementtree_XMLParser__parse_whole__doc__,
+"_parse_whole($self, file, /)\n"
+"--\n"
+"\n");
+
+#define _ELEMENTTREE_XMLPARSER__PARSE_WHOLE_METHODDEF \
+ {"_parse_whole", (PyCFunction)_elementtree_XMLParser__parse_whole, METH_O, _elementtree_XMLParser__parse_whole__doc__},
+
+PyDoc_STRVAR(_elementtree_XMLParser_doctype__doc__,
+"doctype($self, name, pubid, system, /)\n"
+"--\n"
+"\n");
+
+#define _ELEMENTTREE_XMLPARSER_DOCTYPE_METHODDEF \
+ {"doctype", (PyCFunction)_elementtree_XMLParser_doctype, METH_VARARGS, _elementtree_XMLParser_doctype__doc__},
+
+static PyObject *
+_elementtree_XMLParser_doctype_impl(XMLParserObject *self, PyObject *name,
+ PyObject *pubid, PyObject *system);
+
+static PyObject *
+_elementtree_XMLParser_doctype(XMLParserObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *name;
+ PyObject *pubid;
+ PyObject *system;
+
+ if (!PyArg_UnpackTuple(args, "doctype",
+ 3, 3,
+ &name, &pubid, &system))
+ goto exit;
+ return_value = _elementtree_XMLParser_doctype_impl(self, name, pubid, system);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_elementtree_XMLParser__setevents__doc__,
+"_setevents($self, events_queue, events_to_report=None, /)\n"
+"--\n"
+"\n");
+
+#define _ELEMENTTREE_XMLPARSER__SETEVENTS_METHODDEF \
+ {"_setevents", (PyCFunction)_elementtree_XMLParser__setevents, METH_VARARGS, _elementtree_XMLParser__setevents__doc__},
+
+static PyObject *
+_elementtree_XMLParser__setevents_impl(XMLParserObject *self,
+ PyObject *events_queue,
+ PyObject *events_to_report);
+
+static PyObject *
+_elementtree_XMLParser__setevents(XMLParserObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *events_queue;
+ PyObject *events_to_report = Py_None;
+
+ if (!PyArg_ParseTuple(args, "O!|O:_setevents",
+ &PyList_Type, &events_queue, &events_to_report))
+ goto exit;
+ return_value = _elementtree_XMLParser__setevents_impl(self, events_queue, events_to_report);
+
+exit:
+ return return_value;
+}
+/*[clinic end generated code: output=25b8bf7e7f2151ca input=a9049054013a1b77]*/
diff --git a/Modules/clinic/_gdbmmodule.c.h b/Modules/clinic/_gdbmmodule.c.h
new file mode 100644
index 0000000000..110ad9a539
--- /dev/null
+++ b/Modules/clinic/_gdbmmodule.c.h
@@ -0,0 +1,253 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(_gdbm_gdbm_get__doc__,
+"get($self, key, default=None, /)\n"
+"--\n"
+"\n"
+"Get the value for key, or default if not present.");
+
+#define _GDBM_GDBM_GET_METHODDEF \
+ {"get", (PyCFunction)_gdbm_gdbm_get, METH_VARARGS, _gdbm_gdbm_get__doc__},
+
+static PyObject *
+_gdbm_gdbm_get_impl(dbmobject *self, PyObject *key, PyObject *default_value);
+
+static PyObject *
+_gdbm_gdbm_get(dbmobject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *key;
+ PyObject *default_value = Py_None;
+
+ if (!PyArg_UnpackTuple(args, "get",
+ 1, 2,
+ &key, &default_value))
+ goto exit;
+ return_value = _gdbm_gdbm_get_impl(self, key, default_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_gdbm_gdbm_setdefault__doc__,
+"setdefault($self, key, default=None, /)\n"
+"--\n"
+"\n"
+"Get value for key, or set it to default and return default if not present.");
+
+#define _GDBM_GDBM_SETDEFAULT_METHODDEF \
+ {"setdefault", (PyCFunction)_gdbm_gdbm_setdefault, METH_VARARGS, _gdbm_gdbm_setdefault__doc__},
+
+static PyObject *
+_gdbm_gdbm_setdefault_impl(dbmobject *self, PyObject *key,
+ PyObject *default_value);
+
+static PyObject *
+_gdbm_gdbm_setdefault(dbmobject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *key;
+ PyObject *default_value = Py_None;
+
+ if (!PyArg_UnpackTuple(args, "setdefault",
+ 1, 2,
+ &key, &default_value))
+ goto exit;
+ return_value = _gdbm_gdbm_setdefault_impl(self, key, default_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_gdbm_gdbm_close__doc__,
+"close($self, /)\n"
+"--\n"
+"\n"
+"Close the database.");
+
+#define _GDBM_GDBM_CLOSE_METHODDEF \
+ {"close", (PyCFunction)_gdbm_gdbm_close, METH_NOARGS, _gdbm_gdbm_close__doc__},
+
+static PyObject *
+_gdbm_gdbm_close_impl(dbmobject *self);
+
+static PyObject *
+_gdbm_gdbm_close(dbmobject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _gdbm_gdbm_close_impl(self);
+}
+
+PyDoc_STRVAR(_gdbm_gdbm_keys__doc__,
+"keys($self, /)\n"
+"--\n"
+"\n"
+"Get a list of all keys in the database.");
+
+#define _GDBM_GDBM_KEYS_METHODDEF \
+ {"keys", (PyCFunction)_gdbm_gdbm_keys, METH_NOARGS, _gdbm_gdbm_keys__doc__},
+
+static PyObject *
+_gdbm_gdbm_keys_impl(dbmobject *self);
+
+static PyObject *
+_gdbm_gdbm_keys(dbmobject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _gdbm_gdbm_keys_impl(self);
+}
+
+PyDoc_STRVAR(_gdbm_gdbm_firstkey__doc__,
+"firstkey($self, /)\n"
+"--\n"
+"\n"
+"Return the starting key for the traversal.\n"
+"\n"
+"It\'s possible to loop over every key in the database using this method\n"
+"and the nextkey() method. The traversal is ordered by GDBM\'s internal\n"
+"hash values, and won\'t be sorted by the key values.");
+
+#define _GDBM_GDBM_FIRSTKEY_METHODDEF \
+ {"firstkey", (PyCFunction)_gdbm_gdbm_firstkey, METH_NOARGS, _gdbm_gdbm_firstkey__doc__},
+
+static PyObject *
+_gdbm_gdbm_firstkey_impl(dbmobject *self);
+
+static PyObject *
+_gdbm_gdbm_firstkey(dbmobject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _gdbm_gdbm_firstkey_impl(self);
+}
+
+PyDoc_STRVAR(_gdbm_gdbm_nextkey__doc__,
+"nextkey($self, key, /)\n"
+"--\n"
+"\n"
+"Returns the key that follows key in the traversal.\n"
+"\n"
+"The following code prints every key in the database db, without having\n"
+"to create a list in memory that contains them all:\n"
+"\n"
+" k = db.firstkey()\n"
+" while k != None:\n"
+" print(k)\n"
+" k = db.nextkey(k)");
+
+#define _GDBM_GDBM_NEXTKEY_METHODDEF \
+ {"nextkey", (PyCFunction)_gdbm_gdbm_nextkey, METH_O, _gdbm_gdbm_nextkey__doc__},
+
+static PyObject *
+_gdbm_gdbm_nextkey_impl(dbmobject *self, const char *key,
+ Py_ssize_clean_t key_length);
+
+static PyObject *
+_gdbm_gdbm_nextkey(dbmobject *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ const char *key;
+ Py_ssize_clean_t key_length;
+
+ if (!PyArg_Parse(arg, "s#:nextkey", &key, &key_length))
+ goto exit;
+ return_value = _gdbm_gdbm_nextkey_impl(self, key, key_length);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_gdbm_gdbm_reorganize__doc__,
+"reorganize($self, /)\n"
+"--\n"
+"\n"
+"Reorganize the database.\n"
+"\n"
+"If you have carried out a lot of deletions and would like to shrink\n"
+"the space used by the GDBM file, this routine will reorganize the\n"
+"database. GDBM will not shorten the length of a database file except\n"
+"by using this reorganization; otherwise, deleted file space will be\n"
+"kept and reused as new (key,value) pairs are added.");
+
+#define _GDBM_GDBM_REORGANIZE_METHODDEF \
+ {"reorganize", (PyCFunction)_gdbm_gdbm_reorganize, METH_NOARGS, _gdbm_gdbm_reorganize__doc__},
+
+static PyObject *
+_gdbm_gdbm_reorganize_impl(dbmobject *self);
+
+static PyObject *
+_gdbm_gdbm_reorganize(dbmobject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _gdbm_gdbm_reorganize_impl(self);
+}
+
+PyDoc_STRVAR(_gdbm_gdbm_sync__doc__,
+"sync($self, /)\n"
+"--\n"
+"\n"
+"Flush the database to the disk file.\n"
+"\n"
+"When the database has been opened in fast mode, this method forces\n"
+"any unwritten data to be written to the disk.");
+
+#define _GDBM_GDBM_SYNC_METHODDEF \
+ {"sync", (PyCFunction)_gdbm_gdbm_sync, METH_NOARGS, _gdbm_gdbm_sync__doc__},
+
+static PyObject *
+_gdbm_gdbm_sync_impl(dbmobject *self);
+
+static PyObject *
+_gdbm_gdbm_sync(dbmobject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _gdbm_gdbm_sync_impl(self);
+}
+
+PyDoc_STRVAR(dbmopen__doc__,
+"open($module, filename, flags=\'r\', mode=0o666, /)\n"
+"--\n"
+"\n"
+"Open a dbm database and return a dbm object.\n"
+"\n"
+"The filename argument is the name of the database file.\n"
+"\n"
+"The optional flags argument can be \'r\' (to open an existing database\n"
+"for reading only -- default), \'w\' (to open an existing database for\n"
+"reading and writing), \'c\' (which creates the database if it doesn\'t\n"
+"exist), or \'n\' (which always creates a new empty database).\n"
+"\n"
+"Some versions of gdbm support additional flags which must be\n"
+"appended to one of the flags described above. The module constant\n"
+"\'open_flags\' is a string of valid additional flags. The \'f\' flag\n"
+"opens the database in fast mode; altered data will not automatically\n"
+"be written to the disk after every change. This results in faster\n"
+"writes to the database, but may result in an inconsistent database\n"
+"if the program crashes while the database is still open. Use the\n"
+"sync() method to force any unwritten data to be written to the disk.\n"
+"The \'s\' flag causes all database operations to be synchronized to\n"
+"disk. The \'u\' flag disables locking of the database file.\n"
+"\n"
+"The optional mode argument is the Unix mode of the file, used only\n"
+"when the database has to be created. It defaults to octal 0o666.");
+
+#define DBMOPEN_METHODDEF \
+ {"open", (PyCFunction)dbmopen, METH_VARARGS, dbmopen__doc__},
+
+static PyObject *
+dbmopen_impl(PyModuleDef *module, const char *name, const char *flags,
+ int mode);
+
+static PyObject *
+dbmopen(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ const char *name;
+ const char *flags = "r";
+ int mode = 438;
+
+ if (!PyArg_ParseTuple(args, "s|si:open",
+ &name, &flags, &mode))
+ goto exit;
+ return_value = dbmopen_impl(module, name, flags, mode);
+
+exit:
+ return return_value;
+}
+/*[clinic end generated code: output=d3d8d871bcccb68a input=a9049054013a1b77]*/
diff --git a/Modules/clinic/_lzmamodule.c.h b/Modules/clinic/_lzmamodule.c.h
index c1ad8824af..59d9d51026 100644
--- a/Modules/clinic/_lzmamodule.c.h
+++ b/Modules/clinic/_lzmamodule.c.h
@@ -14,20 +14,18 @@ PyDoc_STRVAR(_lzma_LZMACompressor_compress__doc__,
"flush() method to finish the compression process.");
#define _LZMA_LZMACOMPRESSOR_COMPRESS_METHODDEF \
- {"compress", (PyCFunction)_lzma_LZMACompressor_compress, METH_VARARGS, _lzma_LZMACompressor_compress__doc__},
+ {"compress", (PyCFunction)_lzma_LZMACompressor_compress, METH_O, _lzma_LZMACompressor_compress__doc__},
static PyObject *
_lzma_LZMACompressor_compress_impl(Compressor *self, Py_buffer *data);
static PyObject *
-_lzma_LZMACompressor_compress(Compressor *self, PyObject *args)
+_lzma_LZMACompressor_compress(Compressor *self, PyObject *arg)
{
PyObject *return_value = NULL;
Py_buffer data = {NULL, NULL};
- if (!PyArg_ParseTuple(args,
- "y*:compress",
- &data))
+ if (!PyArg_Parse(arg, "y*:compress", &data))
goto exit;
return_value = _lzma_LZMACompressor_compress_impl(self, &data);
@@ -62,34 +60,43 @@ _lzma_LZMACompressor_flush(Compressor *self, PyObject *Py_UNUSED(ignored))
}
PyDoc_STRVAR(_lzma_LZMADecompressor_decompress__doc__,
-"decompress($self, data, /)\n"
+"decompress($self, /, data, max_length=-1)\n"
"--\n"
"\n"
-"Provide data to the decompressor object.\n"
+"Decompress *data*, returning uncompressed data as bytes.\n"
"\n"
-"Returns a chunk of decompressed data if possible, or b\'\' otherwise.\n"
+"If *max_length* is nonnegative, returns at most *max_length* bytes of\n"
+"decompressed data. If this limit is reached and further output can be\n"
+"produced, *self.needs_input* will be set to ``False``. In this case, the next\n"
+"call to *decompress()* may provide *data* as b\'\' to obtain more of the output.\n"
"\n"
-"Attempting to decompress data after the end of stream is reached\n"
-"raises an EOFError. Any data found after the end of the stream\n"
-"is ignored and saved in the unused_data attribute.");
+"If all of the input data was decompressed and returned (either because this\n"
+"was less than *max_length* bytes, or because *max_length* was negative),\n"
+"*self.needs_input* will be set to True.\n"
+"\n"
+"Attempting to decompress data after the end of stream is reached raises an\n"
+"EOFError. Any data found after the end of the stream is ignored and saved in\n"
+"the unused_data attribute.");
#define _LZMA_LZMADECOMPRESSOR_DECOMPRESS_METHODDEF \
- {"decompress", (PyCFunction)_lzma_LZMADecompressor_decompress, METH_VARARGS, _lzma_LZMADecompressor_decompress__doc__},
+ {"decompress", (PyCFunction)_lzma_LZMADecompressor_decompress, METH_VARARGS|METH_KEYWORDS, _lzma_LZMADecompressor_decompress__doc__},
static PyObject *
-_lzma_LZMADecompressor_decompress_impl(Decompressor *self, Py_buffer *data);
+_lzma_LZMADecompressor_decompress_impl(Decompressor *self, Py_buffer *data,
+ Py_ssize_t max_length);
static PyObject *
-_lzma_LZMADecompressor_decompress(Decompressor *self, PyObject *args)
+_lzma_LZMADecompressor_decompress(Decompressor *self, PyObject *args, PyObject *kwargs)
{
PyObject *return_value = NULL;
+ static char *_keywords[] = {"data", "max_length", NULL};
Py_buffer data = {NULL, NULL};
+ Py_ssize_t max_length = -1;
- if (!PyArg_ParseTuple(args,
- "y*:decompress",
- &data))
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "y*|n:decompress", _keywords,
+ &data, &max_length))
goto exit;
- return_value = _lzma_LZMADecompressor_decompress_impl(self, &data);
+ return_value = _lzma_LZMADecompressor_decompress_impl(self, &data, max_length);
exit:
/* Cleanup for data */
@@ -123,7 +130,8 @@ PyDoc_STRVAR(_lzma_LZMADecompressor___init____doc__,
"For one-shot decompression, use the decompress() function instead.");
static int
-_lzma_LZMADecompressor___init___impl(Decompressor *self, int format, PyObject *memlimit, PyObject *filters);
+_lzma_LZMADecompressor___init___impl(Decompressor *self, int format,
+ PyObject *memlimit, PyObject *filters);
static int
_lzma_LZMADecompressor___init__(PyObject *self, PyObject *args, PyObject *kwargs)
@@ -134,8 +142,7 @@ _lzma_LZMADecompressor___init__(PyObject *self, PyObject *args, PyObject *kwargs
PyObject *memlimit = Py_None;
PyObject *filters = Py_None;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "|iOO:LZMADecompressor", _keywords,
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|iOO:LZMADecompressor", _keywords,
&format, &memlimit, &filters))
goto exit;
return_value = _lzma_LZMADecompressor___init___impl((Decompressor *)self, format, memlimit, filters);
@@ -153,20 +160,18 @@ PyDoc_STRVAR(_lzma_is_check_supported__doc__,
"Always returns True for CHECK_NONE and CHECK_CRC32.");
#define _LZMA_IS_CHECK_SUPPORTED_METHODDEF \
- {"is_check_supported", (PyCFunction)_lzma_is_check_supported, METH_VARARGS, _lzma_is_check_supported__doc__},
+ {"is_check_supported", (PyCFunction)_lzma_is_check_supported, METH_O, _lzma_is_check_supported__doc__},
static PyObject *
_lzma_is_check_supported_impl(PyModuleDef *module, int check_id);
static PyObject *
-_lzma_is_check_supported(PyModuleDef *module, PyObject *args)
+_lzma_is_check_supported(PyModuleDef *module, PyObject *arg)
{
PyObject *return_value = NULL;
int check_id;
- if (!PyArg_ParseTuple(args,
- "i:is_check_supported",
- &check_id))
+ if (!PyArg_Parse(arg, "i:is_check_supported", &check_id))
goto exit;
return_value = _lzma_is_check_supported_impl(module, check_id);
@@ -183,20 +188,18 @@ PyDoc_STRVAR(_lzma__encode_filter_properties__doc__,
"The result does not include the filter ID itself, only the options.");
#define _LZMA__ENCODE_FILTER_PROPERTIES_METHODDEF \
- {"_encode_filter_properties", (PyCFunction)_lzma__encode_filter_properties, METH_VARARGS, _lzma__encode_filter_properties__doc__},
+ {"_encode_filter_properties", (PyCFunction)_lzma__encode_filter_properties, METH_O, _lzma__encode_filter_properties__doc__},
static PyObject *
_lzma__encode_filter_properties_impl(PyModuleDef *module, lzma_filter filter);
static PyObject *
-_lzma__encode_filter_properties(PyModuleDef *module, PyObject *args)
+_lzma__encode_filter_properties(PyModuleDef *module, PyObject *arg)
{
PyObject *return_value = NULL;
lzma_filter filter = {LZMA_VLI_UNKNOWN, NULL};
- if (!PyArg_ParseTuple(args,
- "O&:_encode_filter_properties",
- lzma_filter_converter, &filter))
+ if (!PyArg_Parse(arg, "O&:_encode_filter_properties", lzma_filter_converter, &filter))
goto exit;
return_value = _lzma__encode_filter_properties_impl(module, filter);
@@ -220,7 +223,8 @@ PyDoc_STRVAR(_lzma__decode_filter_properties__doc__,
{"_decode_filter_properties", (PyCFunction)_lzma__decode_filter_properties, METH_VARARGS, _lzma__decode_filter_properties__doc__},
static PyObject *
-_lzma__decode_filter_properties_impl(PyModuleDef *module, lzma_vli filter_id, Py_buffer *encoded_props);
+_lzma__decode_filter_properties_impl(PyModuleDef *module, lzma_vli filter_id,
+ Py_buffer *encoded_props);
static PyObject *
_lzma__decode_filter_properties(PyModuleDef *module, PyObject *args)
@@ -229,8 +233,7 @@ _lzma__decode_filter_properties(PyModuleDef *module, PyObject *args)
lzma_vli filter_id;
Py_buffer encoded_props = {NULL, NULL};
- if (!PyArg_ParseTuple(args,
- "O&y*:_decode_filter_properties",
+ if (!PyArg_ParseTuple(args, "O&y*:_decode_filter_properties",
lzma_vli_converter, &filter_id, &encoded_props))
goto exit;
return_value = _lzma__decode_filter_properties_impl(module, filter_id, &encoded_props);
@@ -242,4 +245,4 @@ exit:
return return_value;
}
-/*[clinic end generated code: output=808fec8216ac712b input=a9049054013a1b77]*/
+/*[clinic end generated code: output=2d3e0842be3d3fe1 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/_opcode.c.h b/Modules/clinic/_opcode.c.h
new file mode 100644
index 0000000000..196a2eefd3
--- /dev/null
+++ b/Modules/clinic/_opcode.c.h
@@ -0,0 +1,36 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(_opcode_stack_effect__doc__,
+"stack_effect($module, opcode, oparg=None, /)\n"
+"--\n"
+"\n"
+"Compute the stack effect of the opcode.");
+
+#define _OPCODE_STACK_EFFECT_METHODDEF \
+ {"stack_effect", (PyCFunction)_opcode_stack_effect, METH_VARARGS, _opcode_stack_effect__doc__},
+
+static int
+_opcode_stack_effect_impl(PyModuleDef *module, int opcode, PyObject *oparg);
+
+static PyObject *
+_opcode_stack_effect(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int opcode;
+ PyObject *oparg = Py_None;
+ int _return_value;
+
+ if (!PyArg_ParseTuple(args, "i|O:stack_effect",
+ &opcode, &oparg))
+ goto exit;
+ _return_value = _opcode_stack_effect_impl(module, opcode, oparg);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromLong((long)_return_value);
+
+exit:
+ return return_value;
+}
+/*[clinic end generated code: output=8ee7cb735705e8b3 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/_pickle.c.h b/Modules/clinic/_pickle.c.h
index c0c54d2023..ab4d205620 100644
--- a/Modules/clinic/_pickle.c.h
+++ b/Modules/clinic/_pickle.c.h
@@ -85,7 +85,8 @@ PyDoc_STRVAR(_pickle_Pickler___init____doc__,
"2, so that the pickle data stream is readable with Python 2.");
static int
-_pickle_Pickler___init___impl(PicklerObject *self, PyObject *file, PyObject *protocol, int fix_imports);
+_pickle_Pickler___init___impl(PicklerObject *self, PyObject *file,
+ PyObject *protocol, int fix_imports);
static int
_pickle_Pickler___init__(PyObject *self, PyObject *args, PyObject *kwargs)
@@ -96,8 +97,7 @@ _pickle_Pickler___init__(PyObject *self, PyObject *args, PyObject *kwargs)
PyObject *protocol = NULL;
int fix_imports = 1;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|Op:Pickler", _keywords,
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|Op:Pickler", _keywords,
&file, &protocol, &fix_imports))
goto exit;
return_value = _pickle_Pickler___init___impl((PicklerObject *)self, file, protocol, fix_imports);
@@ -199,7 +199,9 @@ PyDoc_STRVAR(_pickle_Unpickler_find_class__doc__,
{"find_class", (PyCFunction)_pickle_Unpickler_find_class, METH_VARARGS, _pickle_Unpickler_find_class__doc__},
static PyObject *
-_pickle_Unpickler_find_class_impl(UnpicklerObject *self, PyObject *module_name, PyObject *global_name);
+_pickle_Unpickler_find_class_impl(UnpicklerObject *self,
+ PyObject *module_name,
+ PyObject *global_name);
static PyObject *
_pickle_Unpickler_find_class(UnpicklerObject *self, PyObject *args)
@@ -262,7 +264,7 @@ PyDoc_STRVAR(_pickle_Unpickler___init____doc__,
"other custom object that meets this interface.\n"
"\n"
"Optional keyword arguments are *fix_imports*, *encoding* and *errors*,\n"
-"which are used to control compatiblity support for pickle stream\n"
+"which are used to control compatibility support for pickle stream\n"
"generated by Python 2. If *fix_imports* is True, pickle will try to\n"
"map the old Python 2 names to the new names used in Python 3. The\n"
"*encoding* and *errors* tell pickle how to decode 8-bit string\n"
@@ -271,7 +273,9 @@ PyDoc_STRVAR(_pickle_Unpickler___init____doc__,
"string instances as bytes objects.");
static int
-_pickle_Unpickler___init___impl(UnpicklerObject *self, PyObject *file, int fix_imports, const char *encoding, const char *errors);
+_pickle_Unpickler___init___impl(UnpicklerObject *self, PyObject *file,
+ int fix_imports, const char *encoding,
+ const char *errors);
static int
_pickle_Unpickler___init__(PyObject *self, PyObject *args, PyObject *kwargs)
@@ -283,8 +287,7 @@ _pickle_Unpickler___init__(PyObject *self, PyObject *args, PyObject *kwargs)
const char *encoding = "ASCII";
const char *errors = "strict";
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|$pss:Unpickler", _keywords,
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|$pss:Unpickler", _keywords,
&file, &fix_imports, &encoding, &errors))
goto exit;
return_value = _pickle_Unpickler___init___impl((UnpicklerObject *)self, file, fix_imports, encoding, errors);
@@ -377,7 +380,8 @@ PyDoc_STRVAR(_pickle_dump__doc__,
{"dump", (PyCFunction)_pickle_dump, METH_VARARGS|METH_KEYWORDS, _pickle_dump__doc__},
static PyObject *
-_pickle_dump_impl(PyModuleDef *module, PyObject *obj, PyObject *file, PyObject *protocol, int fix_imports);
+_pickle_dump_impl(PyModuleDef *module, PyObject *obj, PyObject *file,
+ PyObject *protocol, int fix_imports);
static PyObject *
_pickle_dump(PyModuleDef *module, PyObject *args, PyObject *kwargs)
@@ -389,8 +393,7 @@ _pickle_dump(PyModuleDef *module, PyObject *args, PyObject *kwargs)
PyObject *protocol = NULL;
int fix_imports = 1;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "OO|O$p:dump", _keywords,
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O$p:dump", _keywords,
&obj, &file, &protocol, &fix_imports))
goto exit;
return_value = _pickle_dump_impl(module, obj, file, protocol, fix_imports);
@@ -421,7 +424,8 @@ PyDoc_STRVAR(_pickle_dumps__doc__,
{"dumps", (PyCFunction)_pickle_dumps, METH_VARARGS|METH_KEYWORDS, _pickle_dumps__doc__},
static PyObject *
-_pickle_dumps_impl(PyModuleDef *module, PyObject *obj, PyObject *protocol, int fix_imports);
+_pickle_dumps_impl(PyModuleDef *module, PyObject *obj, PyObject *protocol,
+ int fix_imports);
static PyObject *
_pickle_dumps(PyModuleDef *module, PyObject *args, PyObject *kwargs)
@@ -432,8 +436,7 @@ _pickle_dumps(PyModuleDef *module, PyObject *args, PyObject *kwargs)
PyObject *protocol = NULL;
int fix_imports = 1;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|O$p:dumps", _keywords,
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O$p:dumps", _keywords,
&obj, &protocol, &fix_imports))
goto exit;
return_value = _pickle_dumps_impl(module, obj, protocol, fix_imports);
@@ -463,7 +466,7 @@ PyDoc_STRVAR(_pickle_load__doc__,
"other custom object that meets this interface.\n"
"\n"
"Optional keyword arguments are *fix_imports*, *encoding* and *errors*,\n"
-"which are used to control compatiblity support for pickle stream\n"
+"which are used to control compatibility support for pickle stream\n"
"generated by Python 2. If *fix_imports* is True, pickle will try to\n"
"map the old Python 2 names to the new names used in Python 3. The\n"
"*encoding* and *errors* tell pickle how to decode 8-bit string\n"
@@ -475,7 +478,8 @@ PyDoc_STRVAR(_pickle_load__doc__,
{"load", (PyCFunction)_pickle_load, METH_VARARGS|METH_KEYWORDS, _pickle_load__doc__},
static PyObject *
-_pickle_load_impl(PyModuleDef *module, PyObject *file, int fix_imports, const char *encoding, const char *errors);
+_pickle_load_impl(PyModuleDef *module, PyObject *file, int fix_imports,
+ const char *encoding, const char *errors);
static PyObject *
_pickle_load(PyModuleDef *module, PyObject *args, PyObject *kwargs)
@@ -487,8 +491,7 @@ _pickle_load(PyModuleDef *module, PyObject *args, PyObject *kwargs)
const char *encoding = "ASCII";
const char *errors = "strict";
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|$pss:load", _keywords,
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|$pss:load", _keywords,
&file, &fix_imports, &encoding, &errors))
goto exit;
return_value = _pickle_load_impl(module, file, fix_imports, encoding, errors);
@@ -509,7 +512,7 @@ PyDoc_STRVAR(_pickle_loads__doc__,
"representation are ignored.\n"
"\n"
"Optional keyword arguments are *fix_imports*, *encoding* and *errors*,\n"
-"which are used to control compatiblity support for pickle stream\n"
+"which are used to control compatibility support for pickle stream\n"
"generated by Python 2. If *fix_imports* is True, pickle will try to\n"
"map the old Python 2 names to the new names used in Python 3. The\n"
"*encoding* and *errors* tell pickle how to decode 8-bit string\n"
@@ -521,7 +524,8 @@ PyDoc_STRVAR(_pickle_loads__doc__,
{"loads", (PyCFunction)_pickle_loads, METH_VARARGS|METH_KEYWORDS, _pickle_loads__doc__},
static PyObject *
-_pickle_loads_impl(PyModuleDef *module, PyObject *data, int fix_imports, const char *encoding, const char *errors);
+_pickle_loads_impl(PyModuleDef *module, PyObject *data, int fix_imports,
+ const char *encoding, const char *errors);
static PyObject *
_pickle_loads(PyModuleDef *module, PyObject *args, PyObject *kwargs)
@@ -533,8 +537,7 @@ _pickle_loads(PyModuleDef *module, PyObject *args, PyObject *kwargs)
const char *encoding = "ASCII";
const char *errors = "strict";
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O|$pss:loads", _keywords,
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|$pss:loads", _keywords,
&data, &fix_imports, &encoding, &errors))
goto exit;
return_value = _pickle_loads_impl(module, data, fix_imports, encoding, errors);
@@ -542,4 +545,4 @@ _pickle_loads(PyModuleDef *module, PyObject *args, PyObject *kwargs)
exit:
return return_value;
}
-/*[clinic end generated code: output=1ba210152e2261d8 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=a7169d4fbbeef827 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/_sre.c.h b/Modules/clinic/_sre.c.h
new file mode 100644
index 0000000000..6de470847e
--- /dev/null
+++ b/Modules/clinic/_sre.c.h
@@ -0,0 +1,693 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(_sre_getcodesize__doc__,
+"getcodesize($module, /)\n"
+"--\n"
+"\n");
+
+#define _SRE_GETCODESIZE_METHODDEF \
+ {"getcodesize", (PyCFunction)_sre_getcodesize, METH_NOARGS, _sre_getcodesize__doc__},
+
+static int
+_sre_getcodesize_impl(PyModuleDef *module);
+
+static PyObject *
+_sre_getcodesize(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ PyObject *return_value = NULL;
+ int _return_value;
+
+ _return_value = _sre_getcodesize_impl(module);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromLong((long)_return_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_sre_getlower__doc__,
+"getlower($module, character, flags, /)\n"
+"--\n"
+"\n");
+
+#define _SRE_GETLOWER_METHODDEF \
+ {"getlower", (PyCFunction)_sre_getlower, METH_VARARGS, _sre_getlower__doc__},
+
+static int
+_sre_getlower_impl(PyModuleDef *module, int character, int flags);
+
+static PyObject *
+_sre_getlower(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int character;
+ int flags;
+ int _return_value;
+
+ if (!PyArg_ParseTuple(args, "ii:getlower",
+ &character, &flags))
+ goto exit;
+ _return_value = _sre_getlower_impl(module, character, flags);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromLong((long)_return_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_sre_SRE_Pattern_match__doc__,
+"match($self, /, string=None, pos=0, endpos=sys.maxsize, *, pattern=None)\n"
+"--\n"
+"\n"
+"Matches zero or more characters at the beginning of the string.");
+
+#define _SRE_SRE_PATTERN_MATCH_METHODDEF \
+ {"match", (PyCFunction)_sre_SRE_Pattern_match, METH_VARARGS|METH_KEYWORDS, _sre_SRE_Pattern_match__doc__},
+
+static PyObject *
+_sre_SRE_Pattern_match_impl(PatternObject *self, PyObject *string,
+ Py_ssize_t pos, Py_ssize_t endpos,
+ PyObject *pattern);
+
+static PyObject *
+_sre_SRE_Pattern_match(PatternObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"string", "pos", "endpos", "pattern", NULL};
+ PyObject *string = NULL;
+ Py_ssize_t pos = 0;
+ Py_ssize_t endpos = PY_SSIZE_T_MAX;
+ PyObject *pattern = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|Onn$O:match", _keywords,
+ &string, &pos, &endpos, &pattern))
+ goto exit;
+ return_value = _sre_SRE_Pattern_match_impl(self, string, pos, endpos, pattern);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_sre_SRE_Pattern_fullmatch__doc__,
+"fullmatch($self, /, string=None, pos=0, endpos=sys.maxsize, *,\n"
+" pattern=None)\n"
+"--\n"
+"\n"
+"Matches against all of the string");
+
+#define _SRE_SRE_PATTERN_FULLMATCH_METHODDEF \
+ {"fullmatch", (PyCFunction)_sre_SRE_Pattern_fullmatch, METH_VARARGS|METH_KEYWORDS, _sre_SRE_Pattern_fullmatch__doc__},
+
+static PyObject *
+_sre_SRE_Pattern_fullmatch_impl(PatternObject *self, PyObject *string,
+ Py_ssize_t pos, Py_ssize_t endpos,
+ PyObject *pattern);
+
+static PyObject *
+_sre_SRE_Pattern_fullmatch(PatternObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"string", "pos", "endpos", "pattern", NULL};
+ PyObject *string = NULL;
+ Py_ssize_t pos = 0;
+ Py_ssize_t endpos = PY_SSIZE_T_MAX;
+ PyObject *pattern = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|Onn$O:fullmatch", _keywords,
+ &string, &pos, &endpos, &pattern))
+ goto exit;
+ return_value = _sre_SRE_Pattern_fullmatch_impl(self, string, pos, endpos, pattern);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_sre_SRE_Pattern_search__doc__,
+"search($self, /, string=None, pos=0, endpos=sys.maxsize, *,\n"
+" pattern=None)\n"
+"--\n"
+"\n"
+"Scan through string looking for a match, and return a corresponding match object instance.\n"
+"\n"
+"Return None if no position in the string matches.");
+
+#define _SRE_SRE_PATTERN_SEARCH_METHODDEF \
+ {"search", (PyCFunction)_sre_SRE_Pattern_search, METH_VARARGS|METH_KEYWORDS, _sre_SRE_Pattern_search__doc__},
+
+static PyObject *
+_sre_SRE_Pattern_search_impl(PatternObject *self, PyObject *string,
+ Py_ssize_t pos, Py_ssize_t endpos,
+ PyObject *pattern);
+
+static PyObject *
+_sre_SRE_Pattern_search(PatternObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"string", "pos", "endpos", "pattern", NULL};
+ PyObject *string = NULL;
+ Py_ssize_t pos = 0;
+ Py_ssize_t endpos = PY_SSIZE_T_MAX;
+ PyObject *pattern = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|Onn$O:search", _keywords,
+ &string, &pos, &endpos, &pattern))
+ goto exit;
+ return_value = _sre_SRE_Pattern_search_impl(self, string, pos, endpos, pattern);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_sre_SRE_Pattern_findall__doc__,
+"findall($self, /, string=None, pos=0, endpos=sys.maxsize, *,\n"
+" source=None)\n"
+"--\n"
+"\n"
+"Return a list of all non-overlapping matches of pattern in string.");
+
+#define _SRE_SRE_PATTERN_FINDALL_METHODDEF \
+ {"findall", (PyCFunction)_sre_SRE_Pattern_findall, METH_VARARGS|METH_KEYWORDS, _sre_SRE_Pattern_findall__doc__},
+
+static PyObject *
+_sre_SRE_Pattern_findall_impl(PatternObject *self, PyObject *string,
+ Py_ssize_t pos, Py_ssize_t endpos,
+ PyObject *source);
+
+static PyObject *
+_sre_SRE_Pattern_findall(PatternObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"string", "pos", "endpos", "source", NULL};
+ PyObject *string = NULL;
+ Py_ssize_t pos = 0;
+ Py_ssize_t endpos = PY_SSIZE_T_MAX;
+ PyObject *source = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|Onn$O:findall", _keywords,
+ &string, &pos, &endpos, &source))
+ goto exit;
+ return_value = _sre_SRE_Pattern_findall_impl(self, string, pos, endpos, source);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_sre_SRE_Pattern_finditer__doc__,
+"finditer($self, /, string, pos=0, endpos=sys.maxsize)\n"
+"--\n"
+"\n"
+"Return an iterator over all non-overlapping matches for the RE pattern in string.\n"
+"\n"
+"For each match, the iterator returns a match object.");
+
+#define _SRE_SRE_PATTERN_FINDITER_METHODDEF \
+ {"finditer", (PyCFunction)_sre_SRE_Pattern_finditer, METH_VARARGS|METH_KEYWORDS, _sre_SRE_Pattern_finditer__doc__},
+
+static PyObject *
+_sre_SRE_Pattern_finditer_impl(PatternObject *self, PyObject *string,
+ Py_ssize_t pos, Py_ssize_t endpos);
+
+static PyObject *
+_sre_SRE_Pattern_finditer(PatternObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"string", "pos", "endpos", NULL};
+ PyObject *string;
+ Py_ssize_t pos = 0;
+ Py_ssize_t endpos = PY_SSIZE_T_MAX;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|nn:finditer", _keywords,
+ &string, &pos, &endpos))
+ goto exit;
+ return_value = _sre_SRE_Pattern_finditer_impl(self, string, pos, endpos);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_sre_SRE_Pattern_scanner__doc__,
+"scanner($self, /, string, pos=0, endpos=sys.maxsize)\n"
+"--\n"
+"\n");
+
+#define _SRE_SRE_PATTERN_SCANNER_METHODDEF \
+ {"scanner", (PyCFunction)_sre_SRE_Pattern_scanner, METH_VARARGS|METH_KEYWORDS, _sre_SRE_Pattern_scanner__doc__},
+
+static PyObject *
+_sre_SRE_Pattern_scanner_impl(PatternObject *self, PyObject *string,
+ Py_ssize_t pos, Py_ssize_t endpos);
+
+static PyObject *
+_sre_SRE_Pattern_scanner(PatternObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"string", "pos", "endpos", NULL};
+ PyObject *string;
+ Py_ssize_t pos = 0;
+ Py_ssize_t endpos = PY_SSIZE_T_MAX;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|nn:scanner", _keywords,
+ &string, &pos, &endpos))
+ goto exit;
+ return_value = _sre_SRE_Pattern_scanner_impl(self, string, pos, endpos);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_sre_SRE_Pattern_split__doc__,
+"split($self, /, string=None, maxsplit=0, *, source=None)\n"
+"--\n"
+"\n"
+"Split string by the occurrences of pattern.");
+
+#define _SRE_SRE_PATTERN_SPLIT_METHODDEF \
+ {"split", (PyCFunction)_sre_SRE_Pattern_split, METH_VARARGS|METH_KEYWORDS, _sre_SRE_Pattern_split__doc__},
+
+static PyObject *
+_sre_SRE_Pattern_split_impl(PatternObject *self, PyObject *string,
+ Py_ssize_t maxsplit, PyObject *source);
+
+static PyObject *
+_sre_SRE_Pattern_split(PatternObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"string", "maxsplit", "source", NULL};
+ PyObject *string = NULL;
+ Py_ssize_t maxsplit = 0;
+ PyObject *source = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|On$O:split", _keywords,
+ &string, &maxsplit, &source))
+ goto exit;
+ return_value = _sre_SRE_Pattern_split_impl(self, string, maxsplit, source);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_sre_SRE_Pattern_sub__doc__,
+"sub($self, /, repl, string, count=0)\n"
+"--\n"
+"\n"
+"Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl.");
+
+#define _SRE_SRE_PATTERN_SUB_METHODDEF \
+ {"sub", (PyCFunction)_sre_SRE_Pattern_sub, METH_VARARGS|METH_KEYWORDS, _sre_SRE_Pattern_sub__doc__},
+
+static PyObject *
+_sre_SRE_Pattern_sub_impl(PatternObject *self, PyObject *repl,
+ PyObject *string, Py_ssize_t count);
+
+static PyObject *
+_sre_SRE_Pattern_sub(PatternObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"repl", "string", "count", NULL};
+ PyObject *repl;
+ PyObject *string;
+ Py_ssize_t count = 0;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|n:sub", _keywords,
+ &repl, &string, &count))
+ goto exit;
+ return_value = _sre_SRE_Pattern_sub_impl(self, repl, string, count);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_sre_SRE_Pattern_subn__doc__,
+"subn($self, /, repl, string, count=0)\n"
+"--\n"
+"\n"
+"Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl.");
+
+#define _SRE_SRE_PATTERN_SUBN_METHODDEF \
+ {"subn", (PyCFunction)_sre_SRE_Pattern_subn, METH_VARARGS|METH_KEYWORDS, _sre_SRE_Pattern_subn__doc__},
+
+static PyObject *
+_sre_SRE_Pattern_subn_impl(PatternObject *self, PyObject *repl,
+ PyObject *string, Py_ssize_t count);
+
+static PyObject *
+_sre_SRE_Pattern_subn(PatternObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"repl", "string", "count", NULL};
+ PyObject *repl;
+ PyObject *string;
+ Py_ssize_t count = 0;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|n:subn", _keywords,
+ &repl, &string, &count))
+ goto exit;
+ return_value = _sre_SRE_Pattern_subn_impl(self, repl, string, count);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_sre_SRE_Pattern___copy____doc__,
+"__copy__($self, /)\n"
+"--\n"
+"\n");
+
+#define _SRE_SRE_PATTERN___COPY___METHODDEF \
+ {"__copy__", (PyCFunction)_sre_SRE_Pattern___copy__, METH_NOARGS, _sre_SRE_Pattern___copy____doc__},
+
+static PyObject *
+_sre_SRE_Pattern___copy___impl(PatternObject *self);
+
+static PyObject *
+_sre_SRE_Pattern___copy__(PatternObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _sre_SRE_Pattern___copy___impl(self);
+}
+
+PyDoc_STRVAR(_sre_SRE_Pattern___deepcopy____doc__,
+"__deepcopy__($self, /, memo)\n"
+"--\n"
+"\n");
+
+#define _SRE_SRE_PATTERN___DEEPCOPY___METHODDEF \
+ {"__deepcopy__", (PyCFunction)_sre_SRE_Pattern___deepcopy__, METH_VARARGS|METH_KEYWORDS, _sre_SRE_Pattern___deepcopy____doc__},
+
+static PyObject *
+_sre_SRE_Pattern___deepcopy___impl(PatternObject *self, PyObject *memo);
+
+static PyObject *
+_sre_SRE_Pattern___deepcopy__(PatternObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"memo", NULL};
+ PyObject *memo;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:__deepcopy__", _keywords,
+ &memo))
+ goto exit;
+ return_value = _sre_SRE_Pattern___deepcopy___impl(self, memo);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_sre_compile__doc__,
+"compile($module, /, pattern, flags, code, groups, groupindex,\n"
+" indexgroup)\n"
+"--\n"
+"\n");
+
+#define _SRE_COMPILE_METHODDEF \
+ {"compile", (PyCFunction)_sre_compile, METH_VARARGS|METH_KEYWORDS, _sre_compile__doc__},
+
+static PyObject *
+_sre_compile_impl(PyModuleDef *module, PyObject *pattern, int flags,
+ PyObject *code, Py_ssize_t groups, PyObject *groupindex,
+ PyObject *indexgroup);
+
+static PyObject *
+_sre_compile(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"pattern", "flags", "code", "groups", "groupindex", "indexgroup", NULL};
+ PyObject *pattern;
+ int flags;
+ PyObject *code;
+ Py_ssize_t groups;
+ PyObject *groupindex;
+ PyObject *indexgroup;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO!nOO:compile", _keywords,
+ &pattern, &flags, &PyList_Type, &code, &groups, &groupindex, &indexgroup))
+ goto exit;
+ return_value = _sre_compile_impl(module, pattern, flags, code, groups, groupindex, indexgroup);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_sre_SRE_Match_expand__doc__,
+"expand($self, /, template)\n"
+"--\n"
+"\n"
+"Return the string obtained by doing backslash substitution on the string template, as done by the sub() method.");
+
+#define _SRE_SRE_MATCH_EXPAND_METHODDEF \
+ {"expand", (PyCFunction)_sre_SRE_Match_expand, METH_VARARGS|METH_KEYWORDS, _sre_SRE_Match_expand__doc__},
+
+static PyObject *
+_sre_SRE_Match_expand_impl(MatchObject *self, PyObject *template);
+
+static PyObject *
+_sre_SRE_Match_expand(MatchObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"template", NULL};
+ PyObject *template;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:expand", _keywords,
+ &template))
+ goto exit;
+ return_value = _sre_SRE_Match_expand_impl(self, template);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_sre_SRE_Match_groups__doc__,
+"groups($self, /, default=None)\n"
+"--\n"
+"\n"
+"Return a tuple containing all the subgroups of the match, from 1.\n"
+"\n"
+" default\n"
+" Is used for groups that did not participate in the match.");
+
+#define _SRE_SRE_MATCH_GROUPS_METHODDEF \
+ {"groups", (PyCFunction)_sre_SRE_Match_groups, METH_VARARGS|METH_KEYWORDS, _sre_SRE_Match_groups__doc__},
+
+static PyObject *
+_sre_SRE_Match_groups_impl(MatchObject *self, PyObject *default_value);
+
+static PyObject *
+_sre_SRE_Match_groups(MatchObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"default", NULL};
+ PyObject *default_value = Py_None;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:groups", _keywords,
+ &default_value))
+ goto exit;
+ return_value = _sre_SRE_Match_groups_impl(self, default_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_sre_SRE_Match_groupdict__doc__,
+"groupdict($self, /, default=None)\n"
+"--\n"
+"\n"
+"Return a dictionary containing all the named subgroups of the match, keyed by the subgroup name.\n"
+"\n"
+" default\n"
+" Is used for groups that did not participate in the match.");
+
+#define _SRE_SRE_MATCH_GROUPDICT_METHODDEF \
+ {"groupdict", (PyCFunction)_sre_SRE_Match_groupdict, METH_VARARGS|METH_KEYWORDS, _sre_SRE_Match_groupdict__doc__},
+
+static PyObject *
+_sre_SRE_Match_groupdict_impl(MatchObject *self, PyObject *default_value);
+
+static PyObject *
+_sre_SRE_Match_groupdict(MatchObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"default", NULL};
+ PyObject *default_value = Py_None;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:groupdict", _keywords,
+ &default_value))
+ goto exit;
+ return_value = _sre_SRE_Match_groupdict_impl(self, default_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_sre_SRE_Match_start__doc__,
+"start($self, group=0, /)\n"
+"--\n"
+"\n"
+"Return index of the start of the substring matched by group.");
+
+#define _SRE_SRE_MATCH_START_METHODDEF \
+ {"start", (PyCFunction)_sre_SRE_Match_start, METH_VARARGS, _sre_SRE_Match_start__doc__},
+
+static Py_ssize_t
+_sre_SRE_Match_start_impl(MatchObject *self, PyObject *group);
+
+static PyObject *
+_sre_SRE_Match_start(MatchObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *group = NULL;
+ Py_ssize_t _return_value;
+
+ if (!PyArg_UnpackTuple(args, "start",
+ 0, 1,
+ &group))
+ goto exit;
+ _return_value = _sre_SRE_Match_start_impl(self, group);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromSsize_t(_return_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_sre_SRE_Match_end__doc__,
+"end($self, group=0, /)\n"
+"--\n"
+"\n"
+"Return index of the end of the substring matched by group.");
+
+#define _SRE_SRE_MATCH_END_METHODDEF \
+ {"end", (PyCFunction)_sre_SRE_Match_end, METH_VARARGS, _sre_SRE_Match_end__doc__},
+
+static Py_ssize_t
+_sre_SRE_Match_end_impl(MatchObject *self, PyObject *group);
+
+static PyObject *
+_sre_SRE_Match_end(MatchObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *group = NULL;
+ Py_ssize_t _return_value;
+
+ if (!PyArg_UnpackTuple(args, "end",
+ 0, 1,
+ &group))
+ goto exit;
+ _return_value = _sre_SRE_Match_end_impl(self, group);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromSsize_t(_return_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_sre_SRE_Match_span__doc__,
+"span($self, group=0, /)\n"
+"--\n"
+"\n"
+"For MatchObject m, return the 2-tuple (m.start(group), m.end(group)).");
+
+#define _SRE_SRE_MATCH_SPAN_METHODDEF \
+ {"span", (PyCFunction)_sre_SRE_Match_span, METH_VARARGS, _sre_SRE_Match_span__doc__},
+
+static PyObject *
+_sre_SRE_Match_span_impl(MatchObject *self, PyObject *group);
+
+static PyObject *
+_sre_SRE_Match_span(MatchObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *group = NULL;
+
+ if (!PyArg_UnpackTuple(args, "span",
+ 0, 1,
+ &group))
+ goto exit;
+ return_value = _sre_SRE_Match_span_impl(self, group);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_sre_SRE_Match___copy____doc__,
+"__copy__($self, /)\n"
+"--\n"
+"\n");
+
+#define _SRE_SRE_MATCH___COPY___METHODDEF \
+ {"__copy__", (PyCFunction)_sre_SRE_Match___copy__, METH_NOARGS, _sre_SRE_Match___copy____doc__},
+
+static PyObject *
+_sre_SRE_Match___copy___impl(MatchObject *self);
+
+static PyObject *
+_sre_SRE_Match___copy__(MatchObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _sre_SRE_Match___copy___impl(self);
+}
+
+PyDoc_STRVAR(_sre_SRE_Match___deepcopy____doc__,
+"__deepcopy__($self, /, memo)\n"
+"--\n"
+"\n");
+
+#define _SRE_SRE_MATCH___DEEPCOPY___METHODDEF \
+ {"__deepcopy__", (PyCFunction)_sre_SRE_Match___deepcopy__, METH_VARARGS|METH_KEYWORDS, _sre_SRE_Match___deepcopy____doc__},
+
+static PyObject *
+_sre_SRE_Match___deepcopy___impl(MatchObject *self, PyObject *memo);
+
+static PyObject *
+_sre_SRE_Match___deepcopy__(MatchObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"memo", NULL};
+ PyObject *memo;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:__deepcopy__", _keywords,
+ &memo))
+ goto exit;
+ return_value = _sre_SRE_Match___deepcopy___impl(self, memo);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_sre_SRE_Scanner_match__doc__,
+"match($self, /)\n"
+"--\n"
+"\n");
+
+#define _SRE_SRE_SCANNER_MATCH_METHODDEF \
+ {"match", (PyCFunction)_sre_SRE_Scanner_match, METH_NOARGS, _sre_SRE_Scanner_match__doc__},
+
+static PyObject *
+_sre_SRE_Scanner_match_impl(ScannerObject *self);
+
+static PyObject *
+_sre_SRE_Scanner_match(ScannerObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _sre_SRE_Scanner_match_impl(self);
+}
+
+PyDoc_STRVAR(_sre_SRE_Scanner_search__doc__,
+"search($self, /)\n"
+"--\n"
+"\n");
+
+#define _SRE_SRE_SCANNER_SEARCH_METHODDEF \
+ {"search", (PyCFunction)_sre_SRE_Scanner_search, METH_NOARGS, _sre_SRE_Scanner_search__doc__},
+
+static PyObject *
+_sre_SRE_Scanner_search_impl(ScannerObject *self);
+
+static PyObject *
+_sre_SRE_Scanner_search(ScannerObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _sre_SRE_Scanner_search_impl(self);
+}
+/*[clinic end generated code: output=d1d73ab2c5008bd4 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/_ssl.c.h b/Modules/clinic/_ssl.c.h
new file mode 100644
index 0000000000..4dbc5d0010
--- /dev/null
+++ b/Modules/clinic/_ssl.c.h
@@ -0,0 +1,1105 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(_ssl__SSLSocket_do_handshake__doc__,
+"do_handshake($self, /)\n"
+"--\n"
+"\n");
+
+#define _SSL__SSLSOCKET_DO_HANDSHAKE_METHODDEF \
+ {"do_handshake", (PyCFunction)_ssl__SSLSocket_do_handshake, METH_NOARGS, _ssl__SSLSocket_do_handshake__doc__},
+
+static PyObject *
+_ssl__SSLSocket_do_handshake_impl(PySSLSocket *self);
+
+static PyObject *
+_ssl__SSLSocket_do_handshake(PySSLSocket *self, PyObject *Py_UNUSED(ignored))
+{
+ return _ssl__SSLSocket_do_handshake_impl(self);
+}
+
+PyDoc_STRVAR(_ssl__test_decode_cert__doc__,
+"_test_decode_cert($module, path, /)\n"
+"--\n"
+"\n");
+
+#define _SSL__TEST_DECODE_CERT_METHODDEF \
+ {"_test_decode_cert", (PyCFunction)_ssl__test_decode_cert, METH_O, _ssl__test_decode_cert__doc__},
+
+static PyObject *
+_ssl__test_decode_cert_impl(PyModuleDef *module, PyObject *path);
+
+static PyObject *
+_ssl__test_decode_cert(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ PyObject *path;
+
+ if (!PyArg_Parse(arg, "O&:_test_decode_cert", PyUnicode_FSConverter, &path))
+ goto exit;
+ return_value = _ssl__test_decode_cert_impl(module, path);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_ssl__SSLSocket_peer_certificate__doc__,
+"peer_certificate($self, der=False, /)\n"
+"--\n"
+"\n"
+"Returns the certificate for the peer.\n"
+"\n"
+"If no certificate was provided, returns None. If a certificate was\n"
+"provided, but not validated, returns an empty dictionary. Otherwise\n"
+"returns a dict containing information about the peer certificate.\n"
+"\n"
+"If the optional argument is True, returns a DER-encoded copy of the\n"
+"peer certificate, or None if no certificate was provided. This will\n"
+"return the certificate even if it wasn\'t validated.");
+
+#define _SSL__SSLSOCKET_PEER_CERTIFICATE_METHODDEF \
+ {"peer_certificate", (PyCFunction)_ssl__SSLSocket_peer_certificate, METH_VARARGS, _ssl__SSLSocket_peer_certificate__doc__},
+
+static PyObject *
+_ssl__SSLSocket_peer_certificate_impl(PySSLSocket *self, int binary_mode);
+
+static PyObject *
+_ssl__SSLSocket_peer_certificate(PySSLSocket *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int binary_mode = 0;
+
+ if (!PyArg_ParseTuple(args, "|p:peer_certificate",
+ &binary_mode))
+ goto exit;
+ return_value = _ssl__SSLSocket_peer_certificate_impl(self, binary_mode);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_ssl__SSLSocket_shared_ciphers__doc__,
+"shared_ciphers($self, /)\n"
+"--\n"
+"\n");
+
+#define _SSL__SSLSOCKET_SHARED_CIPHERS_METHODDEF \
+ {"shared_ciphers", (PyCFunction)_ssl__SSLSocket_shared_ciphers, METH_NOARGS, _ssl__SSLSocket_shared_ciphers__doc__},
+
+static PyObject *
+_ssl__SSLSocket_shared_ciphers_impl(PySSLSocket *self);
+
+static PyObject *
+_ssl__SSLSocket_shared_ciphers(PySSLSocket *self, PyObject *Py_UNUSED(ignored))
+{
+ return _ssl__SSLSocket_shared_ciphers_impl(self);
+}
+
+PyDoc_STRVAR(_ssl__SSLSocket_cipher__doc__,
+"cipher($self, /)\n"
+"--\n"
+"\n");
+
+#define _SSL__SSLSOCKET_CIPHER_METHODDEF \
+ {"cipher", (PyCFunction)_ssl__SSLSocket_cipher, METH_NOARGS, _ssl__SSLSocket_cipher__doc__},
+
+static PyObject *
+_ssl__SSLSocket_cipher_impl(PySSLSocket *self);
+
+static PyObject *
+_ssl__SSLSocket_cipher(PySSLSocket *self, PyObject *Py_UNUSED(ignored))
+{
+ return _ssl__SSLSocket_cipher_impl(self);
+}
+
+PyDoc_STRVAR(_ssl__SSLSocket_version__doc__,
+"version($self, /)\n"
+"--\n"
+"\n");
+
+#define _SSL__SSLSOCKET_VERSION_METHODDEF \
+ {"version", (PyCFunction)_ssl__SSLSocket_version, METH_NOARGS, _ssl__SSLSocket_version__doc__},
+
+static PyObject *
+_ssl__SSLSocket_version_impl(PySSLSocket *self);
+
+static PyObject *
+_ssl__SSLSocket_version(PySSLSocket *self, PyObject *Py_UNUSED(ignored))
+{
+ return _ssl__SSLSocket_version_impl(self);
+}
+
+#if defined(OPENSSL_NPN_NEGOTIATED)
+
+PyDoc_STRVAR(_ssl__SSLSocket_selected_npn_protocol__doc__,
+"selected_npn_protocol($self, /)\n"
+"--\n"
+"\n");
+
+#define _SSL__SSLSOCKET_SELECTED_NPN_PROTOCOL_METHODDEF \
+ {"selected_npn_protocol", (PyCFunction)_ssl__SSLSocket_selected_npn_protocol, METH_NOARGS, _ssl__SSLSocket_selected_npn_protocol__doc__},
+
+static PyObject *
+_ssl__SSLSocket_selected_npn_protocol_impl(PySSLSocket *self);
+
+static PyObject *
+_ssl__SSLSocket_selected_npn_protocol(PySSLSocket *self, PyObject *Py_UNUSED(ignored))
+{
+ return _ssl__SSLSocket_selected_npn_protocol_impl(self);
+}
+
+#endif /* defined(OPENSSL_NPN_NEGOTIATED) */
+
+#if defined(HAVE_ALPN)
+
+PyDoc_STRVAR(_ssl__SSLSocket_selected_alpn_protocol__doc__,
+"selected_alpn_protocol($self, /)\n"
+"--\n"
+"\n");
+
+#define _SSL__SSLSOCKET_SELECTED_ALPN_PROTOCOL_METHODDEF \
+ {"selected_alpn_protocol", (PyCFunction)_ssl__SSLSocket_selected_alpn_protocol, METH_NOARGS, _ssl__SSLSocket_selected_alpn_protocol__doc__},
+
+static PyObject *
+_ssl__SSLSocket_selected_alpn_protocol_impl(PySSLSocket *self);
+
+static PyObject *
+_ssl__SSLSocket_selected_alpn_protocol(PySSLSocket *self, PyObject *Py_UNUSED(ignored))
+{
+ return _ssl__SSLSocket_selected_alpn_protocol_impl(self);
+}
+
+#endif /* defined(HAVE_ALPN) */
+
+PyDoc_STRVAR(_ssl__SSLSocket_compression__doc__,
+"compression($self, /)\n"
+"--\n"
+"\n");
+
+#define _SSL__SSLSOCKET_COMPRESSION_METHODDEF \
+ {"compression", (PyCFunction)_ssl__SSLSocket_compression, METH_NOARGS, _ssl__SSLSocket_compression__doc__},
+
+static PyObject *
+_ssl__SSLSocket_compression_impl(PySSLSocket *self);
+
+static PyObject *
+_ssl__SSLSocket_compression(PySSLSocket *self, PyObject *Py_UNUSED(ignored))
+{
+ return _ssl__SSLSocket_compression_impl(self);
+}
+
+PyDoc_STRVAR(_ssl__SSLSocket_write__doc__,
+"write($self, b, /)\n"
+"--\n"
+"\n"
+"Writes the bytes-like object b into the SSL object.\n"
+"\n"
+"Returns the number of bytes written.");
+
+#define _SSL__SSLSOCKET_WRITE_METHODDEF \
+ {"write", (PyCFunction)_ssl__SSLSocket_write, METH_O, _ssl__SSLSocket_write__doc__},
+
+static PyObject *
+_ssl__SSLSocket_write_impl(PySSLSocket *self, Py_buffer *b);
+
+static PyObject *
+_ssl__SSLSocket_write(PySSLSocket *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_buffer b = {NULL, NULL};
+
+ if (!PyArg_Parse(arg, "y*:write", &b))
+ goto exit;
+ return_value = _ssl__SSLSocket_write_impl(self, &b);
+
+exit:
+ /* Cleanup for b */
+ if (b.obj)
+ PyBuffer_Release(&b);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_ssl__SSLSocket_pending__doc__,
+"pending($self, /)\n"
+"--\n"
+"\n"
+"Returns the number of already decrypted bytes available for read, pending on the connection.");
+
+#define _SSL__SSLSOCKET_PENDING_METHODDEF \
+ {"pending", (PyCFunction)_ssl__SSLSocket_pending, METH_NOARGS, _ssl__SSLSocket_pending__doc__},
+
+static PyObject *
+_ssl__SSLSocket_pending_impl(PySSLSocket *self);
+
+static PyObject *
+_ssl__SSLSocket_pending(PySSLSocket *self, PyObject *Py_UNUSED(ignored))
+{
+ return _ssl__SSLSocket_pending_impl(self);
+}
+
+PyDoc_STRVAR(_ssl__SSLSocket_read__doc__,
+"read(size, [buffer])\n"
+"Read up to size bytes from the SSL socket.");
+
+#define _SSL__SSLSOCKET_READ_METHODDEF \
+ {"read", (PyCFunction)_ssl__SSLSocket_read, METH_VARARGS, _ssl__SSLSocket_read__doc__},
+
+static PyObject *
+_ssl__SSLSocket_read_impl(PySSLSocket *self, int len, int group_right_1,
+ Py_buffer *buffer);
+
+static PyObject *
+_ssl__SSLSocket_read(PySSLSocket *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int len;
+ int group_right_1 = 0;
+ Py_buffer buffer = {NULL, NULL};
+
+ switch (PyTuple_GET_SIZE(args)) {
+ case 1:
+ if (!PyArg_ParseTuple(args, "i:read", &len))
+ goto exit;
+ break;
+ case 2:
+ if (!PyArg_ParseTuple(args, "iw*:read", &len, &buffer))
+ goto exit;
+ group_right_1 = 1;
+ break;
+ default:
+ PyErr_SetString(PyExc_TypeError, "_ssl._SSLSocket.read requires 1 to 2 arguments");
+ goto exit;
+ }
+ return_value = _ssl__SSLSocket_read_impl(self, len, group_right_1, &buffer);
+
+exit:
+ /* Cleanup for buffer */
+ if (buffer.obj)
+ PyBuffer_Release(&buffer);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_ssl__SSLSocket_shutdown__doc__,
+"shutdown($self, /)\n"
+"--\n"
+"\n"
+"Does the SSL shutdown handshake with the remote end.\n"
+"\n"
+"Returns the underlying socket object.");
+
+#define _SSL__SSLSOCKET_SHUTDOWN_METHODDEF \
+ {"shutdown", (PyCFunction)_ssl__SSLSocket_shutdown, METH_NOARGS, _ssl__SSLSocket_shutdown__doc__},
+
+static PyObject *
+_ssl__SSLSocket_shutdown_impl(PySSLSocket *self);
+
+static PyObject *
+_ssl__SSLSocket_shutdown(PySSLSocket *self, PyObject *Py_UNUSED(ignored))
+{
+ return _ssl__SSLSocket_shutdown_impl(self);
+}
+
+PyDoc_STRVAR(_ssl__SSLSocket_tls_unique_cb__doc__,
+"tls_unique_cb($self, /)\n"
+"--\n"
+"\n"
+"Returns the \'tls-unique\' channel binding data, as defined by RFC 5929.\n"
+"\n"
+"If the TLS handshake is not yet complete, None is returned.");
+
+#define _SSL__SSLSOCKET_TLS_UNIQUE_CB_METHODDEF \
+ {"tls_unique_cb", (PyCFunction)_ssl__SSLSocket_tls_unique_cb, METH_NOARGS, _ssl__SSLSocket_tls_unique_cb__doc__},
+
+static PyObject *
+_ssl__SSLSocket_tls_unique_cb_impl(PySSLSocket *self);
+
+static PyObject *
+_ssl__SSLSocket_tls_unique_cb(PySSLSocket *self, PyObject *Py_UNUSED(ignored))
+{
+ return _ssl__SSLSocket_tls_unique_cb_impl(self);
+}
+
+static PyObject *
+_ssl__SSLContext_impl(PyTypeObject *type, int proto_version);
+
+static PyObject *
+_ssl__SSLContext(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ int proto_version;
+
+ if ((type == &PySSLContext_Type) &&
+ !_PyArg_NoKeywords("_SSLContext", kwargs))
+ goto exit;
+ if (!PyArg_ParseTuple(args, "i:_SSLContext",
+ &proto_version))
+ goto exit;
+ return_value = _ssl__SSLContext_impl(type, proto_version);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_ssl__SSLContext_set_ciphers__doc__,
+"set_ciphers($self, cipherlist, /)\n"
+"--\n"
+"\n");
+
+#define _SSL__SSLCONTEXT_SET_CIPHERS_METHODDEF \
+ {"set_ciphers", (PyCFunction)_ssl__SSLContext_set_ciphers, METH_O, _ssl__SSLContext_set_ciphers__doc__},
+
+static PyObject *
+_ssl__SSLContext_set_ciphers_impl(PySSLContext *self, const char *cipherlist);
+
+static PyObject *
+_ssl__SSLContext_set_ciphers(PySSLContext *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ const char *cipherlist;
+
+ if (!PyArg_Parse(arg, "s:set_ciphers", &cipherlist))
+ goto exit;
+ return_value = _ssl__SSLContext_set_ciphers_impl(self, cipherlist);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_ssl__SSLContext__set_npn_protocols__doc__,
+"_set_npn_protocols($self, protos, /)\n"
+"--\n"
+"\n");
+
+#define _SSL__SSLCONTEXT__SET_NPN_PROTOCOLS_METHODDEF \
+ {"_set_npn_protocols", (PyCFunction)_ssl__SSLContext__set_npn_protocols, METH_O, _ssl__SSLContext__set_npn_protocols__doc__},
+
+static PyObject *
+_ssl__SSLContext__set_npn_protocols_impl(PySSLContext *self,
+ Py_buffer *protos);
+
+static PyObject *
+_ssl__SSLContext__set_npn_protocols(PySSLContext *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_buffer protos = {NULL, NULL};
+
+ if (!PyArg_Parse(arg, "y*:_set_npn_protocols", &protos))
+ goto exit;
+ return_value = _ssl__SSLContext__set_npn_protocols_impl(self, &protos);
+
+exit:
+ /* Cleanup for protos */
+ if (protos.obj)
+ PyBuffer_Release(&protos);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_ssl__SSLContext__set_alpn_protocols__doc__,
+"_set_alpn_protocols($self, protos, /)\n"
+"--\n"
+"\n");
+
+#define _SSL__SSLCONTEXT__SET_ALPN_PROTOCOLS_METHODDEF \
+ {"_set_alpn_protocols", (PyCFunction)_ssl__SSLContext__set_alpn_protocols, METH_O, _ssl__SSLContext__set_alpn_protocols__doc__},
+
+static PyObject *
+_ssl__SSLContext__set_alpn_protocols_impl(PySSLContext *self,
+ Py_buffer *protos);
+
+static PyObject *
+_ssl__SSLContext__set_alpn_protocols(PySSLContext *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_buffer protos = {NULL, NULL};
+
+ if (!PyArg_Parse(arg, "y*:_set_alpn_protocols", &protos))
+ goto exit;
+ return_value = _ssl__SSLContext__set_alpn_protocols_impl(self, &protos);
+
+exit:
+ /* Cleanup for protos */
+ if (protos.obj)
+ PyBuffer_Release(&protos);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_ssl__SSLContext_load_cert_chain__doc__,
+"load_cert_chain($self, /, certfile, keyfile=None, password=None)\n"
+"--\n"
+"\n");
+
+#define _SSL__SSLCONTEXT_LOAD_CERT_CHAIN_METHODDEF \
+ {"load_cert_chain", (PyCFunction)_ssl__SSLContext_load_cert_chain, METH_VARARGS|METH_KEYWORDS, _ssl__SSLContext_load_cert_chain__doc__},
+
+static PyObject *
+_ssl__SSLContext_load_cert_chain_impl(PySSLContext *self, PyObject *certfile,
+ PyObject *keyfile, PyObject *password);
+
+static PyObject *
+_ssl__SSLContext_load_cert_chain(PySSLContext *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"certfile", "keyfile", "password", NULL};
+ PyObject *certfile;
+ PyObject *keyfile = NULL;
+ PyObject *password = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:load_cert_chain", _keywords,
+ &certfile, &keyfile, &password))
+ goto exit;
+ return_value = _ssl__SSLContext_load_cert_chain_impl(self, certfile, keyfile, password);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_ssl__SSLContext_load_verify_locations__doc__,
+"load_verify_locations($self, /, cafile=None, capath=None, cadata=None)\n"
+"--\n"
+"\n");
+
+#define _SSL__SSLCONTEXT_LOAD_VERIFY_LOCATIONS_METHODDEF \
+ {"load_verify_locations", (PyCFunction)_ssl__SSLContext_load_verify_locations, METH_VARARGS|METH_KEYWORDS, _ssl__SSLContext_load_verify_locations__doc__},
+
+static PyObject *
+_ssl__SSLContext_load_verify_locations_impl(PySSLContext *self,
+ PyObject *cafile,
+ PyObject *capath,
+ PyObject *cadata);
+
+static PyObject *
+_ssl__SSLContext_load_verify_locations(PySSLContext *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"cafile", "capath", "cadata", NULL};
+ PyObject *cafile = NULL;
+ PyObject *capath = NULL;
+ PyObject *cadata = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OOO:load_verify_locations", _keywords,
+ &cafile, &capath, &cadata))
+ goto exit;
+ return_value = _ssl__SSLContext_load_verify_locations_impl(self, cafile, capath, cadata);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_ssl__SSLContext_load_dh_params__doc__,
+"load_dh_params($self, path, /)\n"
+"--\n"
+"\n");
+
+#define _SSL__SSLCONTEXT_LOAD_DH_PARAMS_METHODDEF \
+ {"load_dh_params", (PyCFunction)_ssl__SSLContext_load_dh_params, METH_O, _ssl__SSLContext_load_dh_params__doc__},
+
+PyDoc_STRVAR(_ssl__SSLContext__wrap_socket__doc__,
+"_wrap_socket($self, /, sock, server_side, server_hostname=None)\n"
+"--\n"
+"\n");
+
+#define _SSL__SSLCONTEXT__WRAP_SOCKET_METHODDEF \
+ {"_wrap_socket", (PyCFunction)_ssl__SSLContext__wrap_socket, METH_VARARGS|METH_KEYWORDS, _ssl__SSLContext__wrap_socket__doc__},
+
+static PyObject *
+_ssl__SSLContext__wrap_socket_impl(PySSLContext *self, PyObject *sock,
+ int server_side, PyObject *hostname_obj);
+
+static PyObject *
+_ssl__SSLContext__wrap_socket(PySSLContext *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"sock", "server_side", "server_hostname", NULL};
+ PyObject *sock;
+ int server_side;
+ PyObject *hostname_obj = Py_None;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!i|O:_wrap_socket", _keywords,
+ PySocketModule.Sock_Type, &sock, &server_side, &hostname_obj))
+ goto exit;
+ return_value = _ssl__SSLContext__wrap_socket_impl(self, sock, server_side, hostname_obj);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_ssl__SSLContext__wrap_bio__doc__,
+"_wrap_bio($self, /, incoming, outgoing, server_side,\n"
+" server_hostname=None)\n"
+"--\n"
+"\n");
+
+#define _SSL__SSLCONTEXT__WRAP_BIO_METHODDEF \
+ {"_wrap_bio", (PyCFunction)_ssl__SSLContext__wrap_bio, METH_VARARGS|METH_KEYWORDS, _ssl__SSLContext__wrap_bio__doc__},
+
+static PyObject *
+_ssl__SSLContext__wrap_bio_impl(PySSLContext *self, PySSLMemoryBIO *incoming,
+ PySSLMemoryBIO *outgoing, int server_side,
+ PyObject *hostname_obj);
+
+static PyObject *
+_ssl__SSLContext__wrap_bio(PySSLContext *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"incoming", "outgoing", "server_side", "server_hostname", NULL};
+ PySSLMemoryBIO *incoming;
+ PySSLMemoryBIO *outgoing;
+ int server_side;
+ PyObject *hostname_obj = Py_None;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!O!i|O:_wrap_bio", _keywords,
+ &PySSLMemoryBIO_Type, &incoming, &PySSLMemoryBIO_Type, &outgoing, &server_side, &hostname_obj))
+ goto exit;
+ return_value = _ssl__SSLContext__wrap_bio_impl(self, incoming, outgoing, server_side, hostname_obj);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_ssl__SSLContext_session_stats__doc__,
+"session_stats($self, /)\n"
+"--\n"
+"\n");
+
+#define _SSL__SSLCONTEXT_SESSION_STATS_METHODDEF \
+ {"session_stats", (PyCFunction)_ssl__SSLContext_session_stats, METH_NOARGS, _ssl__SSLContext_session_stats__doc__},
+
+static PyObject *
+_ssl__SSLContext_session_stats_impl(PySSLContext *self);
+
+static PyObject *
+_ssl__SSLContext_session_stats(PySSLContext *self, PyObject *Py_UNUSED(ignored))
+{
+ return _ssl__SSLContext_session_stats_impl(self);
+}
+
+PyDoc_STRVAR(_ssl__SSLContext_set_default_verify_paths__doc__,
+"set_default_verify_paths($self, /)\n"
+"--\n"
+"\n");
+
+#define _SSL__SSLCONTEXT_SET_DEFAULT_VERIFY_PATHS_METHODDEF \
+ {"set_default_verify_paths", (PyCFunction)_ssl__SSLContext_set_default_verify_paths, METH_NOARGS, _ssl__SSLContext_set_default_verify_paths__doc__},
+
+static PyObject *
+_ssl__SSLContext_set_default_verify_paths_impl(PySSLContext *self);
+
+static PyObject *
+_ssl__SSLContext_set_default_verify_paths(PySSLContext *self, PyObject *Py_UNUSED(ignored))
+{
+ return _ssl__SSLContext_set_default_verify_paths_impl(self);
+}
+
+#if !defined(OPENSSL_NO_ECDH)
+
+PyDoc_STRVAR(_ssl__SSLContext_set_ecdh_curve__doc__,
+"set_ecdh_curve($self, name, /)\n"
+"--\n"
+"\n");
+
+#define _SSL__SSLCONTEXT_SET_ECDH_CURVE_METHODDEF \
+ {"set_ecdh_curve", (PyCFunction)_ssl__SSLContext_set_ecdh_curve, METH_O, _ssl__SSLContext_set_ecdh_curve__doc__},
+
+#endif /* !defined(OPENSSL_NO_ECDH) */
+
+PyDoc_STRVAR(_ssl__SSLContext_set_servername_callback__doc__,
+"set_servername_callback($self, method, /)\n"
+"--\n"
+"\n"
+"Set a callback that will be called when a server name is provided by the SSL/TLS client in the SNI extension.\n"
+"\n"
+"If the argument is None then the callback is disabled. The method is called\n"
+"with the SSLSocket, the server name as a string, and the SSLContext object.\n"
+"See RFC 6066 for details of the SNI extension.");
+
+#define _SSL__SSLCONTEXT_SET_SERVERNAME_CALLBACK_METHODDEF \
+ {"set_servername_callback", (PyCFunction)_ssl__SSLContext_set_servername_callback, METH_O, _ssl__SSLContext_set_servername_callback__doc__},
+
+PyDoc_STRVAR(_ssl__SSLContext_cert_store_stats__doc__,
+"cert_store_stats($self, /)\n"
+"--\n"
+"\n"
+"Returns quantities of loaded X.509 certificates.\n"
+"\n"
+"X.509 certificates with a CA extension and certificate revocation lists\n"
+"inside the context\'s cert store.\n"
+"\n"
+"NOTE: Certificates in a capath directory aren\'t loaded unless they have\n"
+"been used at least once.");
+
+#define _SSL__SSLCONTEXT_CERT_STORE_STATS_METHODDEF \
+ {"cert_store_stats", (PyCFunction)_ssl__SSLContext_cert_store_stats, METH_NOARGS, _ssl__SSLContext_cert_store_stats__doc__},
+
+static PyObject *
+_ssl__SSLContext_cert_store_stats_impl(PySSLContext *self);
+
+static PyObject *
+_ssl__SSLContext_cert_store_stats(PySSLContext *self, PyObject *Py_UNUSED(ignored))
+{
+ return _ssl__SSLContext_cert_store_stats_impl(self);
+}
+
+PyDoc_STRVAR(_ssl__SSLContext_get_ca_certs__doc__,
+"get_ca_certs($self, /, binary_form=False)\n"
+"--\n"
+"\n"
+"Returns a list of dicts with information of loaded CA certs.\n"
+"\n"
+"If the optional argument is True, returns a DER-encoded copy of the CA\n"
+"certificate.\n"
+"\n"
+"NOTE: Certificates in a capath directory aren\'t loaded unless they have\n"
+"been used at least once.");
+
+#define _SSL__SSLCONTEXT_GET_CA_CERTS_METHODDEF \
+ {"get_ca_certs", (PyCFunction)_ssl__SSLContext_get_ca_certs, METH_VARARGS|METH_KEYWORDS, _ssl__SSLContext_get_ca_certs__doc__},
+
+static PyObject *
+_ssl__SSLContext_get_ca_certs_impl(PySSLContext *self, int binary_form);
+
+static PyObject *
+_ssl__SSLContext_get_ca_certs(PySSLContext *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"binary_form", NULL};
+ int binary_form = 0;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|p:get_ca_certs", _keywords,
+ &binary_form))
+ goto exit;
+ return_value = _ssl__SSLContext_get_ca_certs_impl(self, binary_form);
+
+exit:
+ return return_value;
+}
+
+static PyObject *
+_ssl_MemoryBIO_impl(PyTypeObject *type);
+
+static PyObject *
+_ssl_MemoryBIO(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+
+ if ((type == &PySSLMemoryBIO_Type) &&
+ !_PyArg_NoPositional("MemoryBIO", args))
+ goto exit;
+ if ((type == &PySSLMemoryBIO_Type) &&
+ !_PyArg_NoKeywords("MemoryBIO", kwargs))
+ goto exit;
+ return_value = _ssl_MemoryBIO_impl(type);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_ssl_MemoryBIO_read__doc__,
+"read($self, size=-1, /)\n"
+"--\n"
+"\n"
+"Read up to size bytes from the memory BIO.\n"
+"\n"
+"If size is not specified, read the entire buffer.\n"
+"If the return value is an empty bytes instance, this means either\n"
+"EOF or that no data is available. Use the \"eof\" property to\n"
+"distinguish between the two.");
+
+#define _SSL_MEMORYBIO_READ_METHODDEF \
+ {"read", (PyCFunction)_ssl_MemoryBIO_read, METH_VARARGS, _ssl_MemoryBIO_read__doc__},
+
+static PyObject *
+_ssl_MemoryBIO_read_impl(PySSLMemoryBIO *self, int len);
+
+static PyObject *
+_ssl_MemoryBIO_read(PySSLMemoryBIO *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int len = -1;
+
+ if (!PyArg_ParseTuple(args, "|i:read",
+ &len))
+ goto exit;
+ return_value = _ssl_MemoryBIO_read_impl(self, len);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_ssl_MemoryBIO_write__doc__,
+"write($self, b, /)\n"
+"--\n"
+"\n"
+"Writes the bytes b into the memory BIO.\n"
+"\n"
+"Returns the number of bytes written.");
+
+#define _SSL_MEMORYBIO_WRITE_METHODDEF \
+ {"write", (PyCFunction)_ssl_MemoryBIO_write, METH_O, _ssl_MemoryBIO_write__doc__},
+
+static PyObject *
+_ssl_MemoryBIO_write_impl(PySSLMemoryBIO *self, Py_buffer *b);
+
+static PyObject *
+_ssl_MemoryBIO_write(PySSLMemoryBIO *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_buffer b = {NULL, NULL};
+
+ if (!PyArg_Parse(arg, "y*:write", &b))
+ goto exit;
+ return_value = _ssl_MemoryBIO_write_impl(self, &b);
+
+exit:
+ /* Cleanup for b */
+ if (b.obj)
+ PyBuffer_Release(&b);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_ssl_MemoryBIO_write_eof__doc__,
+"write_eof($self, /)\n"
+"--\n"
+"\n"
+"Write an EOF marker to the memory BIO.\n"
+"\n"
+"When all data has been read, the \"eof\" property will be True.");
+
+#define _SSL_MEMORYBIO_WRITE_EOF_METHODDEF \
+ {"write_eof", (PyCFunction)_ssl_MemoryBIO_write_eof, METH_NOARGS, _ssl_MemoryBIO_write_eof__doc__},
+
+static PyObject *
+_ssl_MemoryBIO_write_eof_impl(PySSLMemoryBIO *self);
+
+static PyObject *
+_ssl_MemoryBIO_write_eof(PySSLMemoryBIO *self, PyObject *Py_UNUSED(ignored))
+{
+ return _ssl_MemoryBIO_write_eof_impl(self);
+}
+
+PyDoc_STRVAR(_ssl_RAND_add__doc__,
+"RAND_add($module, string, entropy, /)\n"
+"--\n"
+"\n"
+"Mix string into the OpenSSL PRNG state.\n"
+"\n"
+"entropy (a float) is a lower bound on the entropy contained in\n"
+"string. See RFC 1750.");
+
+#define _SSL_RAND_ADD_METHODDEF \
+ {"RAND_add", (PyCFunction)_ssl_RAND_add, METH_VARARGS, _ssl_RAND_add__doc__},
+
+static PyObject *
+_ssl_RAND_add_impl(PyModuleDef *module, Py_buffer *view, double entropy);
+
+static PyObject *
+_ssl_RAND_add(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_buffer view = {NULL, NULL};
+ double entropy;
+
+ if (!PyArg_ParseTuple(args, "s*d:RAND_add",
+ &view, &entropy))
+ goto exit;
+ return_value = _ssl_RAND_add_impl(module, &view, entropy);
+
+exit:
+ /* Cleanup for view */
+ if (view.obj)
+ PyBuffer_Release(&view);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(_ssl_RAND_bytes__doc__,
+"RAND_bytes($module, n, /)\n"
+"--\n"
+"\n"
+"Generate n cryptographically strong pseudo-random bytes.");
+
+#define _SSL_RAND_BYTES_METHODDEF \
+ {"RAND_bytes", (PyCFunction)_ssl_RAND_bytes, METH_O, _ssl_RAND_bytes__doc__},
+
+static PyObject *
+_ssl_RAND_bytes_impl(PyModuleDef *module, int n);
+
+static PyObject *
+_ssl_RAND_bytes(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int n;
+
+ if (!PyArg_Parse(arg, "i:RAND_bytes", &n))
+ goto exit;
+ return_value = _ssl_RAND_bytes_impl(module, n);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_ssl_RAND_pseudo_bytes__doc__,
+"RAND_pseudo_bytes($module, n, /)\n"
+"--\n"
+"\n"
+"Generate n pseudo-random bytes.\n"
+"\n"
+"Return a pair (bytes, is_cryptographic). is_cryptographic is True\n"
+"if the bytes generated are cryptographically strong.");
+
+#define _SSL_RAND_PSEUDO_BYTES_METHODDEF \
+ {"RAND_pseudo_bytes", (PyCFunction)_ssl_RAND_pseudo_bytes, METH_O, _ssl_RAND_pseudo_bytes__doc__},
+
+static PyObject *
+_ssl_RAND_pseudo_bytes_impl(PyModuleDef *module, int n);
+
+static PyObject *
+_ssl_RAND_pseudo_bytes(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int n;
+
+ if (!PyArg_Parse(arg, "i:RAND_pseudo_bytes", &n))
+ goto exit;
+ return_value = _ssl_RAND_pseudo_bytes_impl(module, n);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_ssl_RAND_status__doc__,
+"RAND_status($module, /)\n"
+"--\n"
+"\n"
+"Returns 1 if the OpenSSL PRNG has been seeded with enough data and 0 if not.\n"
+"\n"
+"It is necessary to seed the PRNG with RAND_add() on some platforms before\n"
+"using the ssl() function.");
+
+#define _SSL_RAND_STATUS_METHODDEF \
+ {"RAND_status", (PyCFunction)_ssl_RAND_status, METH_NOARGS, _ssl_RAND_status__doc__},
+
+static PyObject *
+_ssl_RAND_status_impl(PyModuleDef *module);
+
+static PyObject *
+_ssl_RAND_status(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return _ssl_RAND_status_impl(module);
+}
+
+#if defined(HAVE_RAND_EGD)
+
+PyDoc_STRVAR(_ssl_RAND_egd__doc__,
+"RAND_egd($module, path, /)\n"
+"--\n"
+"\n"
+"Queries the entropy gather daemon (EGD) on the socket named by \'path\'.\n"
+"\n"
+"Returns number of bytes read. Raises SSLError if connection to EGD\n"
+"fails or if it does not provide enough data to seed PRNG.");
+
+#define _SSL_RAND_EGD_METHODDEF \
+ {"RAND_egd", (PyCFunction)_ssl_RAND_egd, METH_O, _ssl_RAND_egd__doc__},
+
+static PyObject *
+_ssl_RAND_egd_impl(PyModuleDef *module, PyObject *path);
+
+static PyObject *
+_ssl_RAND_egd(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ PyObject *path;
+
+ if (!PyArg_Parse(arg, "O&:RAND_egd", PyUnicode_FSConverter, &path))
+ goto exit;
+ return_value = _ssl_RAND_egd_impl(module, path);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_RAND_EGD) */
+
+PyDoc_STRVAR(_ssl_get_default_verify_paths__doc__,
+"get_default_verify_paths($module, /)\n"
+"--\n"
+"\n"
+"Return search paths and environment vars that are used by SSLContext\'s set_default_verify_paths() to load default CAs.\n"
+"\n"
+"The values are \'cert_file_env\', \'cert_file\', \'cert_dir_env\', \'cert_dir\'.");
+
+#define _SSL_GET_DEFAULT_VERIFY_PATHS_METHODDEF \
+ {"get_default_verify_paths", (PyCFunction)_ssl_get_default_verify_paths, METH_NOARGS, _ssl_get_default_verify_paths__doc__},
+
+static PyObject *
+_ssl_get_default_verify_paths_impl(PyModuleDef *module);
+
+static PyObject *
+_ssl_get_default_verify_paths(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return _ssl_get_default_verify_paths_impl(module);
+}
+
+PyDoc_STRVAR(_ssl_txt2obj__doc__,
+"txt2obj($module, /, txt, name=False)\n"
+"--\n"
+"\n"
+"Lookup NID, short name, long name and OID of an ASN1_OBJECT.\n"
+"\n"
+"By default objects are looked up by OID. With name=True short and\n"
+"long name are also matched.");
+
+#define _SSL_TXT2OBJ_METHODDEF \
+ {"txt2obj", (PyCFunction)_ssl_txt2obj, METH_VARARGS|METH_KEYWORDS, _ssl_txt2obj__doc__},
+
+static PyObject *
+_ssl_txt2obj_impl(PyModuleDef *module, const char *txt, int name);
+
+static PyObject *
+_ssl_txt2obj(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"txt", "name", NULL};
+ const char *txt;
+ int name = 0;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|p:txt2obj", _keywords,
+ &txt, &name))
+ goto exit;
+ return_value = _ssl_txt2obj_impl(module, txt, name);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_ssl_nid2obj__doc__,
+"nid2obj($module, nid, /)\n"
+"--\n"
+"\n"
+"Lookup NID, short name, long name and OID of an ASN1_OBJECT by NID.");
+
+#define _SSL_NID2OBJ_METHODDEF \
+ {"nid2obj", (PyCFunction)_ssl_nid2obj, METH_O, _ssl_nid2obj__doc__},
+
+static PyObject *
+_ssl_nid2obj_impl(PyModuleDef *module, int nid);
+
+static PyObject *
+_ssl_nid2obj(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int nid;
+
+ if (!PyArg_Parse(arg, "i:nid2obj", &nid))
+ goto exit;
+ return_value = _ssl_nid2obj_impl(module, nid);
+
+exit:
+ return return_value;
+}
+
+#if defined(_MSC_VER)
+
+PyDoc_STRVAR(_ssl_enum_certificates__doc__,
+"enum_certificates($module, /, store_name)\n"
+"--\n"
+"\n"
+"Retrieve certificates from Windows\' cert store.\n"
+"\n"
+"store_name may be one of \'CA\', \'ROOT\' or \'MY\'. The system may provide\n"
+"more cert storages, too. The function returns a list of (bytes,\n"
+"encoding_type, trust) tuples. The encoding_type flag can be interpreted\n"
+"with X509_ASN_ENCODING or PKCS_7_ASN_ENCODING. The trust setting is either\n"
+"a set of OIDs or the boolean True.");
+
+#define _SSL_ENUM_CERTIFICATES_METHODDEF \
+ {"enum_certificates", (PyCFunction)_ssl_enum_certificates, METH_VARARGS|METH_KEYWORDS, _ssl_enum_certificates__doc__},
+
+static PyObject *
+_ssl_enum_certificates_impl(PyModuleDef *module, const char *store_name);
+
+static PyObject *
+_ssl_enum_certificates(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"store_name", NULL};
+ const char *store_name;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s:enum_certificates", _keywords,
+ &store_name))
+ goto exit;
+ return_value = _ssl_enum_certificates_impl(module, store_name);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(_MSC_VER) */
+
+#if defined(_MSC_VER)
+
+PyDoc_STRVAR(_ssl_enum_crls__doc__,
+"enum_crls($module, /, store_name)\n"
+"--\n"
+"\n"
+"Retrieve CRLs from Windows\' cert store.\n"
+"\n"
+"store_name may be one of \'CA\', \'ROOT\' or \'MY\'. The system may provide\n"
+"more cert storages, too. The function returns a list of (bytes,\n"
+"encoding_type) tuples. The encoding_type flag can be interpreted with\n"
+"X509_ASN_ENCODING or PKCS_7_ASN_ENCODING.");
+
+#define _SSL_ENUM_CRLS_METHODDEF \
+ {"enum_crls", (PyCFunction)_ssl_enum_crls, METH_VARARGS|METH_KEYWORDS, _ssl_enum_crls__doc__},
+
+static PyObject *
+_ssl_enum_crls_impl(PyModuleDef *module, const char *store_name);
+
+static PyObject *
+_ssl_enum_crls(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"store_name", NULL};
+ const char *store_name;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s:enum_crls", _keywords,
+ &store_name))
+ goto exit;
+ return_value = _ssl_enum_crls_impl(module, store_name);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(_MSC_VER) */
+
+#ifndef _SSL__SSLSOCKET_SELECTED_NPN_PROTOCOL_METHODDEF
+ #define _SSL__SSLSOCKET_SELECTED_NPN_PROTOCOL_METHODDEF
+#endif /* !defined(_SSL__SSLSOCKET_SELECTED_NPN_PROTOCOL_METHODDEF) */
+
+#ifndef _SSL__SSLSOCKET_SELECTED_ALPN_PROTOCOL_METHODDEF
+ #define _SSL__SSLSOCKET_SELECTED_ALPN_PROTOCOL_METHODDEF
+#endif /* !defined(_SSL__SSLSOCKET_SELECTED_ALPN_PROTOCOL_METHODDEF) */
+
+#ifndef _SSL__SSLCONTEXT_SET_ECDH_CURVE_METHODDEF
+ #define _SSL__SSLCONTEXT_SET_ECDH_CURVE_METHODDEF
+#endif /* !defined(_SSL__SSLCONTEXT_SET_ECDH_CURVE_METHODDEF) */
+
+#ifndef _SSL_RAND_EGD_METHODDEF
+ #define _SSL_RAND_EGD_METHODDEF
+#endif /* !defined(_SSL_RAND_EGD_METHODDEF) */
+
+#ifndef _SSL_ENUM_CERTIFICATES_METHODDEF
+ #define _SSL_ENUM_CERTIFICATES_METHODDEF
+#endif /* !defined(_SSL_ENUM_CERTIFICATES_METHODDEF) */
+
+#ifndef _SSL_ENUM_CRLS_METHODDEF
+ #define _SSL_ENUM_CRLS_METHODDEF
+#endif /* !defined(_SSL_ENUM_CRLS_METHODDEF) */
+/*[clinic end generated code: output=a14999cb565a69a2 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/_tkinter.c.h b/Modules/clinic/_tkinter.c.h
new file mode 100644
index 0000000000..7917dec9c4
--- /dev/null
+++ b/Modules/clinic/_tkinter.c.h
@@ -0,0 +1,624 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(_tkinter_tkapp_eval__doc__,
+"eval($self, script, /)\n"
+"--\n"
+"\n");
+
+#define _TKINTER_TKAPP_EVAL_METHODDEF \
+ {"eval", (PyCFunction)_tkinter_tkapp_eval, METH_O, _tkinter_tkapp_eval__doc__},
+
+static PyObject *
+_tkinter_tkapp_eval_impl(TkappObject *self, const char *script);
+
+static PyObject *
+_tkinter_tkapp_eval(TkappObject *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ const char *script;
+
+ if (!PyArg_Parse(arg, "s:eval", &script))
+ goto exit;
+ return_value = _tkinter_tkapp_eval_impl(self, script);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_tkinter_tkapp_evalfile__doc__,
+"evalfile($self, fileName, /)\n"
+"--\n"
+"\n");
+
+#define _TKINTER_TKAPP_EVALFILE_METHODDEF \
+ {"evalfile", (PyCFunction)_tkinter_tkapp_evalfile, METH_O, _tkinter_tkapp_evalfile__doc__},
+
+static PyObject *
+_tkinter_tkapp_evalfile_impl(TkappObject *self, const char *fileName);
+
+static PyObject *
+_tkinter_tkapp_evalfile(TkappObject *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ const char *fileName;
+
+ if (!PyArg_Parse(arg, "s:evalfile", &fileName))
+ goto exit;
+ return_value = _tkinter_tkapp_evalfile_impl(self, fileName);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_tkinter_tkapp_record__doc__,
+"record($self, script, /)\n"
+"--\n"
+"\n");
+
+#define _TKINTER_TKAPP_RECORD_METHODDEF \
+ {"record", (PyCFunction)_tkinter_tkapp_record, METH_O, _tkinter_tkapp_record__doc__},
+
+static PyObject *
+_tkinter_tkapp_record_impl(TkappObject *self, const char *script);
+
+static PyObject *
+_tkinter_tkapp_record(TkappObject *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ const char *script;
+
+ if (!PyArg_Parse(arg, "s:record", &script))
+ goto exit;
+ return_value = _tkinter_tkapp_record_impl(self, script);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_tkinter_tkapp_adderrinfo__doc__,
+"adderrinfo($self, msg, /)\n"
+"--\n"
+"\n");
+
+#define _TKINTER_TKAPP_ADDERRINFO_METHODDEF \
+ {"adderrinfo", (PyCFunction)_tkinter_tkapp_adderrinfo, METH_O, _tkinter_tkapp_adderrinfo__doc__},
+
+static PyObject *
+_tkinter_tkapp_adderrinfo_impl(TkappObject *self, const char *msg);
+
+static PyObject *
+_tkinter_tkapp_adderrinfo(TkappObject *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ const char *msg;
+
+ if (!PyArg_Parse(arg, "s:adderrinfo", &msg))
+ goto exit;
+ return_value = _tkinter_tkapp_adderrinfo_impl(self, msg);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_tkinter_tkapp_getint__doc__,
+"getint($self, arg, /)\n"
+"--\n"
+"\n");
+
+#define _TKINTER_TKAPP_GETINT_METHODDEF \
+ {"getint", (PyCFunction)_tkinter_tkapp_getint, METH_O, _tkinter_tkapp_getint__doc__},
+
+PyDoc_STRVAR(_tkinter_tkapp_getdouble__doc__,
+"getdouble($self, arg, /)\n"
+"--\n"
+"\n");
+
+#define _TKINTER_TKAPP_GETDOUBLE_METHODDEF \
+ {"getdouble", (PyCFunction)_tkinter_tkapp_getdouble, METH_O, _tkinter_tkapp_getdouble__doc__},
+
+PyDoc_STRVAR(_tkinter_tkapp_getboolean__doc__,
+"getboolean($self, arg, /)\n"
+"--\n"
+"\n");
+
+#define _TKINTER_TKAPP_GETBOOLEAN_METHODDEF \
+ {"getboolean", (PyCFunction)_tkinter_tkapp_getboolean, METH_O, _tkinter_tkapp_getboolean__doc__},
+
+PyDoc_STRVAR(_tkinter_tkapp_exprstring__doc__,
+"exprstring($self, s, /)\n"
+"--\n"
+"\n");
+
+#define _TKINTER_TKAPP_EXPRSTRING_METHODDEF \
+ {"exprstring", (PyCFunction)_tkinter_tkapp_exprstring, METH_O, _tkinter_tkapp_exprstring__doc__},
+
+static PyObject *
+_tkinter_tkapp_exprstring_impl(TkappObject *self, const char *s);
+
+static PyObject *
+_tkinter_tkapp_exprstring(TkappObject *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ const char *s;
+
+ if (!PyArg_Parse(arg, "s:exprstring", &s))
+ goto exit;
+ return_value = _tkinter_tkapp_exprstring_impl(self, s);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_tkinter_tkapp_exprlong__doc__,
+"exprlong($self, s, /)\n"
+"--\n"
+"\n");
+
+#define _TKINTER_TKAPP_EXPRLONG_METHODDEF \
+ {"exprlong", (PyCFunction)_tkinter_tkapp_exprlong, METH_O, _tkinter_tkapp_exprlong__doc__},
+
+static PyObject *
+_tkinter_tkapp_exprlong_impl(TkappObject *self, const char *s);
+
+static PyObject *
+_tkinter_tkapp_exprlong(TkappObject *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ const char *s;
+
+ if (!PyArg_Parse(arg, "s:exprlong", &s))
+ goto exit;
+ return_value = _tkinter_tkapp_exprlong_impl(self, s);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_tkinter_tkapp_exprdouble__doc__,
+"exprdouble($self, s, /)\n"
+"--\n"
+"\n");
+
+#define _TKINTER_TKAPP_EXPRDOUBLE_METHODDEF \
+ {"exprdouble", (PyCFunction)_tkinter_tkapp_exprdouble, METH_O, _tkinter_tkapp_exprdouble__doc__},
+
+static PyObject *
+_tkinter_tkapp_exprdouble_impl(TkappObject *self, const char *s);
+
+static PyObject *
+_tkinter_tkapp_exprdouble(TkappObject *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ const char *s;
+
+ if (!PyArg_Parse(arg, "s:exprdouble", &s))
+ goto exit;
+ return_value = _tkinter_tkapp_exprdouble_impl(self, s);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_tkinter_tkapp_exprboolean__doc__,
+"exprboolean($self, s, /)\n"
+"--\n"
+"\n");
+
+#define _TKINTER_TKAPP_EXPRBOOLEAN_METHODDEF \
+ {"exprboolean", (PyCFunction)_tkinter_tkapp_exprboolean, METH_O, _tkinter_tkapp_exprboolean__doc__},
+
+static PyObject *
+_tkinter_tkapp_exprboolean_impl(TkappObject *self, const char *s);
+
+static PyObject *
+_tkinter_tkapp_exprboolean(TkappObject *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ const char *s;
+
+ if (!PyArg_Parse(arg, "s:exprboolean", &s))
+ goto exit;
+ return_value = _tkinter_tkapp_exprboolean_impl(self, s);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_tkinter_tkapp_splitlist__doc__,
+"splitlist($self, arg, /)\n"
+"--\n"
+"\n");
+
+#define _TKINTER_TKAPP_SPLITLIST_METHODDEF \
+ {"splitlist", (PyCFunction)_tkinter_tkapp_splitlist, METH_O, _tkinter_tkapp_splitlist__doc__},
+
+PyDoc_STRVAR(_tkinter_tkapp_split__doc__,
+"split($self, arg, /)\n"
+"--\n"
+"\n");
+
+#define _TKINTER_TKAPP_SPLIT_METHODDEF \
+ {"split", (PyCFunction)_tkinter_tkapp_split, METH_O, _tkinter_tkapp_split__doc__},
+
+PyDoc_STRVAR(_tkinter_tkapp_createcommand__doc__,
+"createcommand($self, name, func, /)\n"
+"--\n"
+"\n");
+
+#define _TKINTER_TKAPP_CREATECOMMAND_METHODDEF \
+ {"createcommand", (PyCFunction)_tkinter_tkapp_createcommand, METH_VARARGS, _tkinter_tkapp_createcommand__doc__},
+
+static PyObject *
+_tkinter_tkapp_createcommand_impl(TkappObject *self, const char *name,
+ PyObject *func);
+
+static PyObject *
+_tkinter_tkapp_createcommand(TkappObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ const char *name;
+ PyObject *func;
+
+ if (!PyArg_ParseTuple(args, "sO:createcommand",
+ &name, &func))
+ goto exit;
+ return_value = _tkinter_tkapp_createcommand_impl(self, name, func);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_tkinter_tkapp_deletecommand__doc__,
+"deletecommand($self, name, /)\n"
+"--\n"
+"\n");
+
+#define _TKINTER_TKAPP_DELETECOMMAND_METHODDEF \
+ {"deletecommand", (PyCFunction)_tkinter_tkapp_deletecommand, METH_O, _tkinter_tkapp_deletecommand__doc__},
+
+static PyObject *
+_tkinter_tkapp_deletecommand_impl(TkappObject *self, const char *name);
+
+static PyObject *
+_tkinter_tkapp_deletecommand(TkappObject *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ const char *name;
+
+ if (!PyArg_Parse(arg, "s:deletecommand", &name))
+ goto exit;
+ return_value = _tkinter_tkapp_deletecommand_impl(self, name);
+
+exit:
+ return return_value;
+}
+
+#if defined(HAVE_CREATEFILEHANDLER)
+
+PyDoc_STRVAR(_tkinter_tkapp_createfilehandler__doc__,
+"createfilehandler($self, file, mask, func, /)\n"
+"--\n"
+"\n");
+
+#define _TKINTER_TKAPP_CREATEFILEHANDLER_METHODDEF \
+ {"createfilehandler", (PyCFunction)_tkinter_tkapp_createfilehandler, METH_VARARGS, _tkinter_tkapp_createfilehandler__doc__},
+
+static PyObject *
+_tkinter_tkapp_createfilehandler_impl(TkappObject *self, PyObject *file,
+ int mask, PyObject *func);
+
+static PyObject *
+_tkinter_tkapp_createfilehandler(TkappObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *file;
+ int mask;
+ PyObject *func;
+
+ if (!PyArg_ParseTuple(args, "OiO:createfilehandler",
+ &file, &mask, &func))
+ goto exit;
+ return_value = _tkinter_tkapp_createfilehandler_impl(self, file, mask, func);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_CREATEFILEHANDLER) */
+
+#if defined(HAVE_CREATEFILEHANDLER)
+
+PyDoc_STRVAR(_tkinter_tkapp_deletefilehandler__doc__,
+"deletefilehandler($self, file, /)\n"
+"--\n"
+"\n");
+
+#define _TKINTER_TKAPP_DELETEFILEHANDLER_METHODDEF \
+ {"deletefilehandler", (PyCFunction)_tkinter_tkapp_deletefilehandler, METH_O, _tkinter_tkapp_deletefilehandler__doc__},
+
+#endif /* defined(HAVE_CREATEFILEHANDLER) */
+
+PyDoc_STRVAR(_tkinter_tktimertoken_deletetimerhandler__doc__,
+"deletetimerhandler($self, /)\n"
+"--\n"
+"\n");
+
+#define _TKINTER_TKTIMERTOKEN_DELETETIMERHANDLER_METHODDEF \
+ {"deletetimerhandler", (PyCFunction)_tkinter_tktimertoken_deletetimerhandler, METH_NOARGS, _tkinter_tktimertoken_deletetimerhandler__doc__},
+
+static PyObject *
+_tkinter_tktimertoken_deletetimerhandler_impl(TkttObject *self);
+
+static PyObject *
+_tkinter_tktimertoken_deletetimerhandler(TkttObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _tkinter_tktimertoken_deletetimerhandler_impl(self);
+}
+
+PyDoc_STRVAR(_tkinter_tkapp_createtimerhandler__doc__,
+"createtimerhandler($self, milliseconds, func, /)\n"
+"--\n"
+"\n");
+
+#define _TKINTER_TKAPP_CREATETIMERHANDLER_METHODDEF \
+ {"createtimerhandler", (PyCFunction)_tkinter_tkapp_createtimerhandler, METH_VARARGS, _tkinter_tkapp_createtimerhandler__doc__},
+
+static PyObject *
+_tkinter_tkapp_createtimerhandler_impl(TkappObject *self, int milliseconds,
+ PyObject *func);
+
+static PyObject *
+_tkinter_tkapp_createtimerhandler(TkappObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int milliseconds;
+ PyObject *func;
+
+ if (!PyArg_ParseTuple(args, "iO:createtimerhandler",
+ &milliseconds, &func))
+ goto exit;
+ return_value = _tkinter_tkapp_createtimerhandler_impl(self, milliseconds, func);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_tkinter_tkapp_mainloop__doc__,
+"mainloop($self, threshold=0, /)\n"
+"--\n"
+"\n");
+
+#define _TKINTER_TKAPP_MAINLOOP_METHODDEF \
+ {"mainloop", (PyCFunction)_tkinter_tkapp_mainloop, METH_VARARGS, _tkinter_tkapp_mainloop__doc__},
+
+static PyObject *
+_tkinter_tkapp_mainloop_impl(TkappObject *self, int threshold);
+
+static PyObject *
+_tkinter_tkapp_mainloop(TkappObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int threshold = 0;
+
+ if (!PyArg_ParseTuple(args, "|i:mainloop",
+ &threshold))
+ goto exit;
+ return_value = _tkinter_tkapp_mainloop_impl(self, threshold);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_tkinter_tkapp_dooneevent__doc__,
+"dooneevent($self, flags=0, /)\n"
+"--\n"
+"\n");
+
+#define _TKINTER_TKAPP_DOONEEVENT_METHODDEF \
+ {"dooneevent", (PyCFunction)_tkinter_tkapp_dooneevent, METH_VARARGS, _tkinter_tkapp_dooneevent__doc__},
+
+static PyObject *
+_tkinter_tkapp_dooneevent_impl(TkappObject *self, int flags);
+
+static PyObject *
+_tkinter_tkapp_dooneevent(TkappObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int flags = 0;
+
+ if (!PyArg_ParseTuple(args, "|i:dooneevent",
+ &flags))
+ goto exit;
+ return_value = _tkinter_tkapp_dooneevent_impl(self, flags);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_tkinter_tkapp_quit__doc__,
+"quit($self, /)\n"
+"--\n"
+"\n");
+
+#define _TKINTER_TKAPP_QUIT_METHODDEF \
+ {"quit", (PyCFunction)_tkinter_tkapp_quit, METH_NOARGS, _tkinter_tkapp_quit__doc__},
+
+static PyObject *
+_tkinter_tkapp_quit_impl(TkappObject *self);
+
+static PyObject *
+_tkinter_tkapp_quit(TkappObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _tkinter_tkapp_quit_impl(self);
+}
+
+PyDoc_STRVAR(_tkinter_tkapp_interpaddr__doc__,
+"interpaddr($self, /)\n"
+"--\n"
+"\n");
+
+#define _TKINTER_TKAPP_INTERPADDR_METHODDEF \
+ {"interpaddr", (PyCFunction)_tkinter_tkapp_interpaddr, METH_NOARGS, _tkinter_tkapp_interpaddr__doc__},
+
+static PyObject *
+_tkinter_tkapp_interpaddr_impl(TkappObject *self);
+
+static PyObject *
+_tkinter_tkapp_interpaddr(TkappObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _tkinter_tkapp_interpaddr_impl(self);
+}
+
+PyDoc_STRVAR(_tkinter_tkapp_loadtk__doc__,
+"loadtk($self, /)\n"
+"--\n"
+"\n");
+
+#define _TKINTER_TKAPP_LOADTK_METHODDEF \
+ {"loadtk", (PyCFunction)_tkinter_tkapp_loadtk, METH_NOARGS, _tkinter_tkapp_loadtk__doc__},
+
+static PyObject *
+_tkinter_tkapp_loadtk_impl(TkappObject *self);
+
+static PyObject *
+_tkinter_tkapp_loadtk(TkappObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _tkinter_tkapp_loadtk_impl(self);
+}
+
+PyDoc_STRVAR(_tkinter_tkapp_willdispatch__doc__,
+"willdispatch($self, /)\n"
+"--\n"
+"\n");
+
+#define _TKINTER_TKAPP_WILLDISPATCH_METHODDEF \
+ {"willdispatch", (PyCFunction)_tkinter_tkapp_willdispatch, METH_NOARGS, _tkinter_tkapp_willdispatch__doc__},
+
+static PyObject *
+_tkinter_tkapp_willdispatch_impl(TkappObject *self);
+
+static PyObject *
+_tkinter_tkapp_willdispatch(TkappObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _tkinter_tkapp_willdispatch_impl(self);
+}
+
+PyDoc_STRVAR(_tkinter__flatten__doc__,
+"_flatten($module, item, /)\n"
+"--\n"
+"\n");
+
+#define _TKINTER__FLATTEN_METHODDEF \
+ {"_flatten", (PyCFunction)_tkinter__flatten, METH_O, _tkinter__flatten__doc__},
+
+PyDoc_STRVAR(_tkinter_create__doc__,
+"create($module, screenName=None, baseName=None, className=\'Tk\',\n"
+" interactive=False, wantobjects=False, wantTk=True, sync=False,\n"
+" use=None, /)\n"
+"--\n"
+"\n"
+"\n"
+"\n"
+" wantTk\n"
+" if false, then Tk_Init() doesn\'t get called\n"
+" sync\n"
+" if true, then pass -sync to wish\n"
+" use\n"
+" if not None, then pass -use to wish");
+
+#define _TKINTER_CREATE_METHODDEF \
+ {"create", (PyCFunction)_tkinter_create, METH_VARARGS, _tkinter_create__doc__},
+
+static PyObject *
+_tkinter_create_impl(PyModuleDef *module, const char *screenName,
+ const char *baseName, const char *className,
+ int interactive, int wantobjects, int wantTk, int sync,
+ const char *use);
+
+static PyObject *
+_tkinter_create(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ const char *screenName = NULL;
+ const char *baseName = NULL;
+ const char *className = "Tk";
+ int interactive = 0;
+ int wantobjects = 0;
+ int wantTk = 1;
+ int sync = 0;
+ const char *use = NULL;
+
+ if (!PyArg_ParseTuple(args, "|zssiiiiz:create",
+ &screenName, &baseName, &className, &interactive, &wantobjects, &wantTk, &sync, &use))
+ goto exit;
+ return_value = _tkinter_create_impl(module, screenName, baseName, className, interactive, wantobjects, wantTk, sync, use);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_tkinter_setbusywaitinterval__doc__,
+"setbusywaitinterval($module, new_val, /)\n"
+"--\n"
+"\n"
+"Set the busy-wait interval in milliseconds between successive calls to Tcl_DoOneEvent in a threaded Python interpreter.\n"
+"\n"
+"It should be set to a divisor of the maximum time between frames in an animation.");
+
+#define _TKINTER_SETBUSYWAITINTERVAL_METHODDEF \
+ {"setbusywaitinterval", (PyCFunction)_tkinter_setbusywaitinterval, METH_O, _tkinter_setbusywaitinterval__doc__},
+
+static PyObject *
+_tkinter_setbusywaitinterval_impl(PyModuleDef *module, int new_val);
+
+static PyObject *
+_tkinter_setbusywaitinterval(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int new_val;
+
+ if (!PyArg_Parse(arg, "i:setbusywaitinterval", &new_val))
+ goto exit;
+ return_value = _tkinter_setbusywaitinterval_impl(module, new_val);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_tkinter_getbusywaitinterval__doc__,
+"getbusywaitinterval($module, /)\n"
+"--\n"
+"\n"
+"Return the current busy-wait interval between successive calls to Tcl_DoOneEvent in a threaded Python interpreter.");
+
+#define _TKINTER_GETBUSYWAITINTERVAL_METHODDEF \
+ {"getbusywaitinterval", (PyCFunction)_tkinter_getbusywaitinterval, METH_NOARGS, _tkinter_getbusywaitinterval__doc__},
+
+static int
+_tkinter_getbusywaitinterval_impl(PyModuleDef *module);
+
+static PyObject *
+_tkinter_getbusywaitinterval(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ PyObject *return_value = NULL;
+ int _return_value;
+
+ _return_value = _tkinter_getbusywaitinterval_impl(module);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromLong((long)_return_value);
+
+exit:
+ return return_value;
+}
+
+#ifndef _TKINTER_TKAPP_CREATEFILEHANDLER_METHODDEF
+ #define _TKINTER_TKAPP_CREATEFILEHANDLER_METHODDEF
+#endif /* !defined(_TKINTER_TKAPP_CREATEFILEHANDLER_METHODDEF) */
+
+#ifndef _TKINTER_TKAPP_DELETEFILEHANDLER_METHODDEF
+ #define _TKINTER_TKAPP_DELETEFILEHANDLER_METHODDEF
+#endif /* !defined(_TKINTER_TKAPP_DELETEFILEHANDLER_METHODDEF) */
+/*[clinic end generated code: output=6dd667b91cf8addd input=a9049054013a1b77]*/
diff --git a/Modules/clinic/_weakref.c.h b/Modules/clinic/_weakref.c.h
new file mode 100644
index 0000000000..87c701c52f
--- /dev/null
+++ b/Modules/clinic/_weakref.c.h
@@ -0,0 +1,31 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(_weakref_getweakrefcount__doc__,
+"getweakrefcount($module, object, /)\n"
+"--\n"
+"\n"
+"Return the number of weak references to \'object\'.");
+
+#define _WEAKREF_GETWEAKREFCOUNT_METHODDEF \
+ {"getweakrefcount", (PyCFunction)_weakref_getweakrefcount, METH_O, _weakref_getweakrefcount__doc__},
+
+static Py_ssize_t
+_weakref_getweakrefcount_impl(PyModuleDef *module, PyObject *object);
+
+static PyObject *
+_weakref_getweakrefcount(PyModuleDef *module, PyObject *object)
+{
+ PyObject *return_value = NULL;
+ Py_ssize_t _return_value;
+
+ _return_value = _weakref_getweakrefcount_impl(module, object);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromSsize_t(_return_value);
+
+exit:
+ return return_value;
+}
+/*[clinic end generated code: output=4da9aade63eed77f input=a9049054013a1b77]*/
diff --git a/Modules/clinic/_winapi.c.h b/Modules/clinic/_winapi.c.h
new file mode 100644
index 0000000000..34518e836b
--- /dev/null
+++ b/Modules/clinic/_winapi.c.h
@@ -0,0 +1,854 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(_winapi_Overlapped_GetOverlappedResult__doc__,
+"GetOverlappedResult($self, wait, /)\n"
+"--\n"
+"\n");
+
+#define _WINAPI_OVERLAPPED_GETOVERLAPPEDRESULT_METHODDEF \
+ {"GetOverlappedResult", (PyCFunction)_winapi_Overlapped_GetOverlappedResult, METH_O, _winapi_Overlapped_GetOverlappedResult__doc__},
+
+static PyObject *
+_winapi_Overlapped_GetOverlappedResult_impl(OverlappedObject *self, int wait);
+
+static PyObject *
+_winapi_Overlapped_GetOverlappedResult(OverlappedObject *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int wait;
+
+ if (!PyArg_Parse(arg, "p:GetOverlappedResult", &wait))
+ goto exit;
+ return_value = _winapi_Overlapped_GetOverlappedResult_impl(self, wait);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_winapi_Overlapped_getbuffer__doc__,
+"getbuffer($self, /)\n"
+"--\n"
+"\n");
+
+#define _WINAPI_OVERLAPPED_GETBUFFER_METHODDEF \
+ {"getbuffer", (PyCFunction)_winapi_Overlapped_getbuffer, METH_NOARGS, _winapi_Overlapped_getbuffer__doc__},
+
+static PyObject *
+_winapi_Overlapped_getbuffer_impl(OverlappedObject *self);
+
+static PyObject *
+_winapi_Overlapped_getbuffer(OverlappedObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _winapi_Overlapped_getbuffer_impl(self);
+}
+
+PyDoc_STRVAR(_winapi_Overlapped_cancel__doc__,
+"cancel($self, /)\n"
+"--\n"
+"\n");
+
+#define _WINAPI_OVERLAPPED_CANCEL_METHODDEF \
+ {"cancel", (PyCFunction)_winapi_Overlapped_cancel, METH_NOARGS, _winapi_Overlapped_cancel__doc__},
+
+static PyObject *
+_winapi_Overlapped_cancel_impl(OverlappedObject *self);
+
+static PyObject *
+_winapi_Overlapped_cancel(OverlappedObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return _winapi_Overlapped_cancel_impl(self);
+}
+
+PyDoc_STRVAR(_winapi_CloseHandle__doc__,
+"CloseHandle($module, handle, /)\n"
+"--\n"
+"\n"
+"Close handle.");
+
+#define _WINAPI_CLOSEHANDLE_METHODDEF \
+ {"CloseHandle", (PyCFunction)_winapi_CloseHandle, METH_O, _winapi_CloseHandle__doc__},
+
+static PyObject *
+_winapi_CloseHandle_impl(PyModuleDef *module, HANDLE handle);
+
+static PyObject *
+_winapi_CloseHandle(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ HANDLE handle;
+
+ if (!PyArg_Parse(arg, "" F_HANDLE ":CloseHandle", &handle))
+ goto exit;
+ return_value = _winapi_CloseHandle_impl(module, handle);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_winapi_ConnectNamedPipe__doc__,
+"ConnectNamedPipe($module, /, handle, overlapped=False)\n"
+"--\n"
+"\n");
+
+#define _WINAPI_CONNECTNAMEDPIPE_METHODDEF \
+ {"ConnectNamedPipe", (PyCFunction)_winapi_ConnectNamedPipe, METH_VARARGS|METH_KEYWORDS, _winapi_ConnectNamedPipe__doc__},
+
+static PyObject *
+_winapi_ConnectNamedPipe_impl(PyModuleDef *module, HANDLE handle,
+ int use_overlapped);
+
+static PyObject *
+_winapi_ConnectNamedPipe(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"handle", "overlapped", NULL};
+ HANDLE handle;
+ int use_overlapped = 0;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "" F_HANDLE "|i:ConnectNamedPipe", _keywords,
+ &handle, &use_overlapped))
+ goto exit;
+ return_value = _winapi_ConnectNamedPipe_impl(module, handle, use_overlapped);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_winapi_CreateFile__doc__,
+"CreateFile($module, file_name, desired_access, share_mode,\n"
+" security_attributes, creation_disposition,\n"
+" flags_and_attributes, template_file, /)\n"
+"--\n"
+"\n");
+
+#define _WINAPI_CREATEFILE_METHODDEF \
+ {"CreateFile", (PyCFunction)_winapi_CreateFile, METH_VARARGS, _winapi_CreateFile__doc__},
+
+static HANDLE
+_winapi_CreateFile_impl(PyModuleDef *module, LPCTSTR file_name,
+ DWORD desired_access, DWORD share_mode,
+ LPSECURITY_ATTRIBUTES security_attributes,
+ DWORD creation_disposition,
+ DWORD flags_and_attributes, HANDLE template_file);
+
+static PyObject *
+_winapi_CreateFile(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ LPCTSTR file_name;
+ DWORD desired_access;
+ DWORD share_mode;
+ LPSECURITY_ATTRIBUTES security_attributes;
+ DWORD creation_disposition;
+ DWORD flags_and_attributes;
+ HANDLE template_file;
+ HANDLE _return_value;
+
+ if (!PyArg_ParseTuple(args, "skk" F_POINTER "kk" F_HANDLE ":CreateFile",
+ &file_name, &desired_access, &share_mode, &security_attributes, &creation_disposition, &flags_and_attributes, &template_file))
+ goto exit;
+ _return_value = _winapi_CreateFile_impl(module, file_name, desired_access, share_mode, security_attributes, creation_disposition, flags_and_attributes, template_file);
+ if ((_return_value == INVALID_HANDLE_VALUE) && PyErr_Occurred())
+ goto exit;
+ if (_return_value == NULL)
+ Py_RETURN_NONE;
+ return_value = HANDLE_TO_PYNUM(_return_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_winapi_CreateJunction__doc__,
+"CreateJunction($module, src_path, dst_path, /)\n"
+"--\n"
+"\n");
+
+#define _WINAPI_CREATEJUNCTION_METHODDEF \
+ {"CreateJunction", (PyCFunction)_winapi_CreateJunction, METH_VARARGS, _winapi_CreateJunction__doc__},
+
+static PyObject *
+_winapi_CreateJunction_impl(PyModuleDef *module, LPWSTR src_path,
+ LPWSTR dst_path);
+
+static PyObject *
+_winapi_CreateJunction(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ LPWSTR src_path;
+ LPWSTR dst_path;
+
+ if (!PyArg_ParseTuple(args, "uu:CreateJunction",
+ &src_path, &dst_path))
+ goto exit;
+ return_value = _winapi_CreateJunction_impl(module, src_path, dst_path);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_winapi_CreateNamedPipe__doc__,
+"CreateNamedPipe($module, name, open_mode, pipe_mode, max_instances,\n"
+" out_buffer_size, in_buffer_size, default_timeout,\n"
+" security_attributes, /)\n"
+"--\n"
+"\n");
+
+#define _WINAPI_CREATENAMEDPIPE_METHODDEF \
+ {"CreateNamedPipe", (PyCFunction)_winapi_CreateNamedPipe, METH_VARARGS, _winapi_CreateNamedPipe__doc__},
+
+static HANDLE
+_winapi_CreateNamedPipe_impl(PyModuleDef *module, LPCTSTR name,
+ DWORD open_mode, DWORD pipe_mode,
+ DWORD max_instances, DWORD out_buffer_size,
+ DWORD in_buffer_size, DWORD default_timeout,
+ LPSECURITY_ATTRIBUTES security_attributes);
+
+static PyObject *
+_winapi_CreateNamedPipe(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ LPCTSTR name;
+ DWORD open_mode;
+ DWORD pipe_mode;
+ DWORD max_instances;
+ DWORD out_buffer_size;
+ DWORD in_buffer_size;
+ DWORD default_timeout;
+ LPSECURITY_ATTRIBUTES security_attributes;
+ HANDLE _return_value;
+
+ if (!PyArg_ParseTuple(args, "skkkkkk" F_POINTER ":CreateNamedPipe",
+ &name, &open_mode, &pipe_mode, &max_instances, &out_buffer_size, &in_buffer_size, &default_timeout, &security_attributes))
+ goto exit;
+ _return_value = _winapi_CreateNamedPipe_impl(module, name, open_mode, pipe_mode, max_instances, out_buffer_size, in_buffer_size, default_timeout, security_attributes);
+ if ((_return_value == INVALID_HANDLE_VALUE) && PyErr_Occurred())
+ goto exit;
+ if (_return_value == NULL)
+ Py_RETURN_NONE;
+ return_value = HANDLE_TO_PYNUM(_return_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_winapi_CreatePipe__doc__,
+"CreatePipe($module, pipe_attrs, size, /)\n"
+"--\n"
+"\n"
+"Create an anonymous pipe.\n"
+"\n"
+" pipe_attrs\n"
+" Ignored internally, can be None.\n"
+"\n"
+"Returns a 2-tuple of handles, to the read and write ends of the pipe.");
+
+#define _WINAPI_CREATEPIPE_METHODDEF \
+ {"CreatePipe", (PyCFunction)_winapi_CreatePipe, METH_VARARGS, _winapi_CreatePipe__doc__},
+
+static PyObject *
+_winapi_CreatePipe_impl(PyModuleDef *module, PyObject *pipe_attrs,
+ DWORD size);
+
+static PyObject *
+_winapi_CreatePipe(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *pipe_attrs;
+ DWORD size;
+
+ if (!PyArg_ParseTuple(args, "Ok:CreatePipe",
+ &pipe_attrs, &size))
+ goto exit;
+ return_value = _winapi_CreatePipe_impl(module, pipe_attrs, size);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_winapi_CreateProcess__doc__,
+"CreateProcess($module, application_name, command_line, proc_attrs,\n"
+" thread_attrs, inherit_handles, creation_flags,\n"
+" env_mapping, current_directory, startup_info, /)\n"
+"--\n"
+"\n"
+"Create a new process and its primary thread.\n"
+"\n"
+" proc_attrs\n"
+" Ignored internally, can be None.\n"
+" thread_attrs\n"
+" Ignored internally, can be None.\n"
+"\n"
+"The return value is a tuple of the process handle, thread handle,\n"
+"process ID, and thread ID.");
+
+#define _WINAPI_CREATEPROCESS_METHODDEF \
+ {"CreateProcess", (PyCFunction)_winapi_CreateProcess, METH_VARARGS, _winapi_CreateProcess__doc__},
+
+static PyObject *
+_winapi_CreateProcess_impl(PyModuleDef *module, Py_UNICODE *application_name,
+ Py_UNICODE *command_line, PyObject *proc_attrs,
+ PyObject *thread_attrs, BOOL inherit_handles,
+ DWORD creation_flags, PyObject *env_mapping,
+ Py_UNICODE *current_directory,
+ PyObject *startup_info);
+
+static PyObject *
+_winapi_CreateProcess(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_UNICODE *application_name;
+ Py_UNICODE *command_line;
+ PyObject *proc_attrs;
+ PyObject *thread_attrs;
+ BOOL inherit_handles;
+ DWORD creation_flags;
+ PyObject *env_mapping;
+ Py_UNICODE *current_directory;
+ PyObject *startup_info;
+
+ if (!PyArg_ParseTuple(args, "ZZOOikOZO:CreateProcess",
+ &application_name, &command_line, &proc_attrs, &thread_attrs, &inherit_handles, &creation_flags, &env_mapping, &current_directory, &startup_info))
+ goto exit;
+ return_value = _winapi_CreateProcess_impl(module, application_name, command_line, proc_attrs, thread_attrs, inherit_handles, creation_flags, env_mapping, current_directory, startup_info);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_winapi_DuplicateHandle__doc__,
+"DuplicateHandle($module, source_process_handle, source_handle,\n"
+" target_process_handle, desired_access, inherit_handle,\n"
+" options=0, /)\n"
+"--\n"
+"\n"
+"Return a duplicate handle object.\n"
+"\n"
+"The duplicate handle refers to the same object as the original\n"
+"handle. Therefore, any changes to the object are reflected\n"
+"through both handles.");
+
+#define _WINAPI_DUPLICATEHANDLE_METHODDEF \
+ {"DuplicateHandle", (PyCFunction)_winapi_DuplicateHandle, METH_VARARGS, _winapi_DuplicateHandle__doc__},
+
+static HANDLE
+_winapi_DuplicateHandle_impl(PyModuleDef *module,
+ HANDLE source_process_handle,
+ HANDLE source_handle,
+ HANDLE target_process_handle,
+ DWORD desired_access, BOOL inherit_handle,
+ DWORD options);
+
+static PyObject *
+_winapi_DuplicateHandle(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ HANDLE source_process_handle;
+ HANDLE source_handle;
+ HANDLE target_process_handle;
+ DWORD desired_access;
+ BOOL inherit_handle;
+ DWORD options = 0;
+ HANDLE _return_value;
+
+ if (!PyArg_ParseTuple(args, "" F_HANDLE "" F_HANDLE "" F_HANDLE "ki|k:DuplicateHandle",
+ &source_process_handle, &source_handle, &target_process_handle, &desired_access, &inherit_handle, &options))
+ goto exit;
+ _return_value = _winapi_DuplicateHandle_impl(module, source_process_handle, source_handle, target_process_handle, desired_access, inherit_handle, options);
+ if ((_return_value == INVALID_HANDLE_VALUE) && PyErr_Occurred())
+ goto exit;
+ if (_return_value == NULL)
+ Py_RETURN_NONE;
+ return_value = HANDLE_TO_PYNUM(_return_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_winapi_ExitProcess__doc__,
+"ExitProcess($module, ExitCode, /)\n"
+"--\n"
+"\n");
+
+#define _WINAPI_EXITPROCESS_METHODDEF \
+ {"ExitProcess", (PyCFunction)_winapi_ExitProcess, METH_O, _winapi_ExitProcess__doc__},
+
+static PyObject *
+_winapi_ExitProcess_impl(PyModuleDef *module, UINT ExitCode);
+
+static PyObject *
+_winapi_ExitProcess(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ UINT ExitCode;
+
+ if (!PyArg_Parse(arg, "I:ExitProcess", &ExitCode))
+ goto exit;
+ return_value = _winapi_ExitProcess_impl(module, ExitCode);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_winapi_GetCurrentProcess__doc__,
+"GetCurrentProcess($module, /)\n"
+"--\n"
+"\n"
+"Return a handle object for the current process.");
+
+#define _WINAPI_GETCURRENTPROCESS_METHODDEF \
+ {"GetCurrentProcess", (PyCFunction)_winapi_GetCurrentProcess, METH_NOARGS, _winapi_GetCurrentProcess__doc__},
+
+static HANDLE
+_winapi_GetCurrentProcess_impl(PyModuleDef *module);
+
+static PyObject *
+_winapi_GetCurrentProcess(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ PyObject *return_value = NULL;
+ HANDLE _return_value;
+
+ _return_value = _winapi_GetCurrentProcess_impl(module);
+ if ((_return_value == INVALID_HANDLE_VALUE) && PyErr_Occurred())
+ goto exit;
+ if (_return_value == NULL)
+ Py_RETURN_NONE;
+ return_value = HANDLE_TO_PYNUM(_return_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_winapi_GetExitCodeProcess__doc__,
+"GetExitCodeProcess($module, process, /)\n"
+"--\n"
+"\n"
+"Return the termination status of the specified process.");
+
+#define _WINAPI_GETEXITCODEPROCESS_METHODDEF \
+ {"GetExitCodeProcess", (PyCFunction)_winapi_GetExitCodeProcess, METH_O, _winapi_GetExitCodeProcess__doc__},
+
+static DWORD
+_winapi_GetExitCodeProcess_impl(PyModuleDef *module, HANDLE process);
+
+static PyObject *
+_winapi_GetExitCodeProcess(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ HANDLE process;
+ DWORD _return_value;
+
+ if (!PyArg_Parse(arg, "" F_HANDLE ":GetExitCodeProcess", &process))
+ goto exit;
+ _return_value = _winapi_GetExitCodeProcess_impl(module, process);
+ if ((_return_value == DWORD_MAX) && PyErr_Occurred())
+ goto exit;
+ return_value = Py_BuildValue("k", _return_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_winapi_GetLastError__doc__,
+"GetLastError($module, /)\n"
+"--\n"
+"\n");
+
+#define _WINAPI_GETLASTERROR_METHODDEF \
+ {"GetLastError", (PyCFunction)_winapi_GetLastError, METH_NOARGS, _winapi_GetLastError__doc__},
+
+static DWORD
+_winapi_GetLastError_impl(PyModuleDef *module);
+
+static PyObject *
+_winapi_GetLastError(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ PyObject *return_value = NULL;
+ DWORD _return_value;
+
+ _return_value = _winapi_GetLastError_impl(module);
+ if ((_return_value == DWORD_MAX) && PyErr_Occurred())
+ goto exit;
+ return_value = Py_BuildValue("k", _return_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_winapi_GetModuleFileName__doc__,
+"GetModuleFileName($module, module_handle, /)\n"
+"--\n"
+"\n"
+"Return the fully-qualified path for the file that contains module.\n"
+"\n"
+"The module must have been loaded by the current process.\n"
+"\n"
+"The module parameter should be a handle to the loaded module\n"
+"whose path is being requested. If this parameter is 0,\n"
+"GetModuleFileName retrieves the path of the executable file\n"
+"of the current process.");
+
+#define _WINAPI_GETMODULEFILENAME_METHODDEF \
+ {"GetModuleFileName", (PyCFunction)_winapi_GetModuleFileName, METH_O, _winapi_GetModuleFileName__doc__},
+
+static PyObject *
+_winapi_GetModuleFileName_impl(PyModuleDef *module, HMODULE module_handle);
+
+static PyObject *
+_winapi_GetModuleFileName(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ HMODULE module_handle;
+
+ if (!PyArg_Parse(arg, "" F_HANDLE ":GetModuleFileName", &module_handle))
+ goto exit;
+ return_value = _winapi_GetModuleFileName_impl(module, module_handle);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_winapi_GetStdHandle__doc__,
+"GetStdHandle($module, std_handle, /)\n"
+"--\n"
+"\n"
+"Return a handle to the specified standard device.\n"
+"\n"
+" std_handle\n"
+" One of STD_INPUT_HANDLE, STD_OUTPUT_HANDLE, or STD_ERROR_HANDLE.\n"
+"\n"
+"The integer associated with the handle object is returned.");
+
+#define _WINAPI_GETSTDHANDLE_METHODDEF \
+ {"GetStdHandle", (PyCFunction)_winapi_GetStdHandle, METH_O, _winapi_GetStdHandle__doc__},
+
+static HANDLE
+_winapi_GetStdHandle_impl(PyModuleDef *module, DWORD std_handle);
+
+static PyObject *
+_winapi_GetStdHandle(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ DWORD std_handle;
+ HANDLE _return_value;
+
+ if (!PyArg_Parse(arg, "k:GetStdHandle", &std_handle))
+ goto exit;
+ _return_value = _winapi_GetStdHandle_impl(module, std_handle);
+ if ((_return_value == INVALID_HANDLE_VALUE) && PyErr_Occurred())
+ goto exit;
+ if (_return_value == NULL)
+ Py_RETURN_NONE;
+ return_value = HANDLE_TO_PYNUM(_return_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_winapi_GetVersion__doc__,
+"GetVersion($module, /)\n"
+"--\n"
+"\n"
+"Return the version number of the current operating system.");
+
+#define _WINAPI_GETVERSION_METHODDEF \
+ {"GetVersion", (PyCFunction)_winapi_GetVersion, METH_NOARGS, _winapi_GetVersion__doc__},
+
+static long
+_winapi_GetVersion_impl(PyModuleDef *module);
+
+static PyObject *
+_winapi_GetVersion(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ PyObject *return_value = NULL;
+ long _return_value;
+
+ _return_value = _winapi_GetVersion_impl(module);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromLong(_return_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_winapi_OpenProcess__doc__,
+"OpenProcess($module, desired_access, inherit_handle, process_id, /)\n"
+"--\n"
+"\n");
+
+#define _WINAPI_OPENPROCESS_METHODDEF \
+ {"OpenProcess", (PyCFunction)_winapi_OpenProcess, METH_VARARGS, _winapi_OpenProcess__doc__},
+
+static HANDLE
+_winapi_OpenProcess_impl(PyModuleDef *module, DWORD desired_access,
+ BOOL inherit_handle, DWORD process_id);
+
+static PyObject *
+_winapi_OpenProcess(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ DWORD desired_access;
+ BOOL inherit_handle;
+ DWORD process_id;
+ HANDLE _return_value;
+
+ if (!PyArg_ParseTuple(args, "kik:OpenProcess",
+ &desired_access, &inherit_handle, &process_id))
+ goto exit;
+ _return_value = _winapi_OpenProcess_impl(module, desired_access, inherit_handle, process_id);
+ if ((_return_value == INVALID_HANDLE_VALUE) && PyErr_Occurred())
+ goto exit;
+ if (_return_value == NULL)
+ Py_RETURN_NONE;
+ return_value = HANDLE_TO_PYNUM(_return_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_winapi_PeekNamedPipe__doc__,
+"PeekNamedPipe($module, handle, size=0, /)\n"
+"--\n"
+"\n");
+
+#define _WINAPI_PEEKNAMEDPIPE_METHODDEF \
+ {"PeekNamedPipe", (PyCFunction)_winapi_PeekNamedPipe, METH_VARARGS, _winapi_PeekNamedPipe__doc__},
+
+static PyObject *
+_winapi_PeekNamedPipe_impl(PyModuleDef *module, HANDLE handle, int size);
+
+static PyObject *
+_winapi_PeekNamedPipe(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ HANDLE handle;
+ int size = 0;
+
+ if (!PyArg_ParseTuple(args, "" F_HANDLE "|i:PeekNamedPipe",
+ &handle, &size))
+ goto exit;
+ return_value = _winapi_PeekNamedPipe_impl(module, handle, size);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_winapi_ReadFile__doc__,
+"ReadFile($module, /, handle, size, overlapped=False)\n"
+"--\n"
+"\n");
+
+#define _WINAPI_READFILE_METHODDEF \
+ {"ReadFile", (PyCFunction)_winapi_ReadFile, METH_VARARGS|METH_KEYWORDS, _winapi_ReadFile__doc__},
+
+static PyObject *
+_winapi_ReadFile_impl(PyModuleDef *module, HANDLE handle, int size,
+ int use_overlapped);
+
+static PyObject *
+_winapi_ReadFile(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"handle", "size", "overlapped", NULL};
+ HANDLE handle;
+ int size;
+ int use_overlapped = 0;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "" F_HANDLE "i|i:ReadFile", _keywords,
+ &handle, &size, &use_overlapped))
+ goto exit;
+ return_value = _winapi_ReadFile_impl(module, handle, size, use_overlapped);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_winapi_SetNamedPipeHandleState__doc__,
+"SetNamedPipeHandleState($module, named_pipe, mode,\n"
+" max_collection_count, collect_data_timeout, /)\n"
+"--\n"
+"\n");
+
+#define _WINAPI_SETNAMEDPIPEHANDLESTATE_METHODDEF \
+ {"SetNamedPipeHandleState", (PyCFunction)_winapi_SetNamedPipeHandleState, METH_VARARGS, _winapi_SetNamedPipeHandleState__doc__},
+
+static PyObject *
+_winapi_SetNamedPipeHandleState_impl(PyModuleDef *module, HANDLE named_pipe,
+ PyObject *mode,
+ PyObject *max_collection_count,
+ PyObject *collect_data_timeout);
+
+static PyObject *
+_winapi_SetNamedPipeHandleState(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ HANDLE named_pipe;
+ PyObject *mode;
+ PyObject *max_collection_count;
+ PyObject *collect_data_timeout;
+
+ if (!PyArg_ParseTuple(args, "" F_HANDLE "OOO:SetNamedPipeHandleState",
+ &named_pipe, &mode, &max_collection_count, &collect_data_timeout))
+ goto exit;
+ return_value = _winapi_SetNamedPipeHandleState_impl(module, named_pipe, mode, max_collection_count, collect_data_timeout);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_winapi_TerminateProcess__doc__,
+"TerminateProcess($module, handle, exit_code, /)\n"
+"--\n"
+"\n"
+"Terminate the specified process and all of its threads.");
+
+#define _WINAPI_TERMINATEPROCESS_METHODDEF \
+ {"TerminateProcess", (PyCFunction)_winapi_TerminateProcess, METH_VARARGS, _winapi_TerminateProcess__doc__},
+
+static PyObject *
+_winapi_TerminateProcess_impl(PyModuleDef *module, HANDLE handle,
+ UINT exit_code);
+
+static PyObject *
+_winapi_TerminateProcess(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ HANDLE handle;
+ UINT exit_code;
+
+ if (!PyArg_ParseTuple(args, "" F_HANDLE "I:TerminateProcess",
+ &handle, &exit_code))
+ goto exit;
+ return_value = _winapi_TerminateProcess_impl(module, handle, exit_code);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_winapi_WaitNamedPipe__doc__,
+"WaitNamedPipe($module, name, timeout, /)\n"
+"--\n"
+"\n");
+
+#define _WINAPI_WAITNAMEDPIPE_METHODDEF \
+ {"WaitNamedPipe", (PyCFunction)_winapi_WaitNamedPipe, METH_VARARGS, _winapi_WaitNamedPipe__doc__},
+
+static PyObject *
+_winapi_WaitNamedPipe_impl(PyModuleDef *module, LPCTSTR name, DWORD timeout);
+
+static PyObject *
+_winapi_WaitNamedPipe(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ LPCTSTR name;
+ DWORD timeout;
+
+ if (!PyArg_ParseTuple(args, "sk:WaitNamedPipe",
+ &name, &timeout))
+ goto exit;
+ return_value = _winapi_WaitNamedPipe_impl(module, name, timeout);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_winapi_WaitForMultipleObjects__doc__,
+"WaitForMultipleObjects($module, handle_seq, wait_flag,\n"
+" milliseconds=_winapi.INFINITE, /)\n"
+"--\n"
+"\n");
+
+#define _WINAPI_WAITFORMULTIPLEOBJECTS_METHODDEF \
+ {"WaitForMultipleObjects", (PyCFunction)_winapi_WaitForMultipleObjects, METH_VARARGS, _winapi_WaitForMultipleObjects__doc__},
+
+static PyObject *
+_winapi_WaitForMultipleObjects_impl(PyModuleDef *module,
+ PyObject *handle_seq, BOOL wait_flag,
+ DWORD milliseconds);
+
+static PyObject *
+_winapi_WaitForMultipleObjects(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *handle_seq;
+ BOOL wait_flag;
+ DWORD milliseconds = INFINITE;
+
+ if (!PyArg_ParseTuple(args, "Oi|k:WaitForMultipleObjects",
+ &handle_seq, &wait_flag, &milliseconds))
+ goto exit;
+ return_value = _winapi_WaitForMultipleObjects_impl(module, handle_seq, wait_flag, milliseconds);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_winapi_WaitForSingleObject__doc__,
+"WaitForSingleObject($module, handle, milliseconds, /)\n"
+"--\n"
+"\n"
+"Wait for a single object.\n"
+"\n"
+"Wait until the specified object is in the signaled state or\n"
+"the time-out interval elapses. The timeout value is specified\n"
+"in milliseconds.");
+
+#define _WINAPI_WAITFORSINGLEOBJECT_METHODDEF \
+ {"WaitForSingleObject", (PyCFunction)_winapi_WaitForSingleObject, METH_VARARGS, _winapi_WaitForSingleObject__doc__},
+
+static long
+_winapi_WaitForSingleObject_impl(PyModuleDef *module, HANDLE handle,
+ DWORD milliseconds);
+
+static PyObject *
+_winapi_WaitForSingleObject(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ HANDLE handle;
+ DWORD milliseconds;
+ long _return_value;
+
+ if (!PyArg_ParseTuple(args, "" F_HANDLE "k:WaitForSingleObject",
+ &handle, &milliseconds))
+ goto exit;
+ _return_value = _winapi_WaitForSingleObject_impl(module, handle, milliseconds);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromLong(_return_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_winapi_WriteFile__doc__,
+"WriteFile($module, /, handle, buffer, overlapped=False)\n"
+"--\n"
+"\n");
+
+#define _WINAPI_WRITEFILE_METHODDEF \
+ {"WriteFile", (PyCFunction)_winapi_WriteFile, METH_VARARGS|METH_KEYWORDS, _winapi_WriteFile__doc__},
+
+static PyObject *
+_winapi_WriteFile_impl(PyModuleDef *module, HANDLE handle, PyObject *buffer,
+ int use_overlapped);
+
+static PyObject *
+_winapi_WriteFile(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"handle", "buffer", "overlapped", NULL};
+ HANDLE handle;
+ PyObject *buffer;
+ int use_overlapped = 0;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "" F_HANDLE "O|i:WriteFile", _keywords,
+ &handle, &buffer, &use_overlapped))
+ goto exit;
+ return_value = _winapi_WriteFile_impl(module, handle, buffer, use_overlapped);
+
+exit:
+ return return_value;
+}
+/*[clinic end generated code: output=98771c6584056d19 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/arraymodule.c.h b/Modules/clinic/arraymodule.c.h
new file mode 100644
index 0000000000..fdf247e2ca
--- /dev/null
+++ b/Modules/clinic/arraymodule.c.h
@@ -0,0 +1,499 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(array_array___copy____doc__,
+"__copy__($self, /)\n"
+"--\n"
+"\n"
+"Return a copy of the array.");
+
+#define ARRAY_ARRAY___COPY___METHODDEF \
+ {"__copy__", (PyCFunction)array_array___copy__, METH_NOARGS, array_array___copy____doc__},
+
+static PyObject *
+array_array___copy___impl(arrayobject *self);
+
+static PyObject *
+array_array___copy__(arrayobject *self, PyObject *Py_UNUSED(ignored))
+{
+ return array_array___copy___impl(self);
+}
+
+PyDoc_STRVAR(array_array___deepcopy____doc__,
+"__deepcopy__($self, unused, /)\n"
+"--\n"
+"\n"
+"Return a copy of the array.");
+
+#define ARRAY_ARRAY___DEEPCOPY___METHODDEF \
+ {"__deepcopy__", (PyCFunction)array_array___deepcopy__, METH_O, array_array___deepcopy____doc__},
+
+PyDoc_STRVAR(array_array_count__doc__,
+"count($self, v, /)\n"
+"--\n"
+"\n"
+"Return number of occurrences of v in the array.");
+
+#define ARRAY_ARRAY_COUNT_METHODDEF \
+ {"count", (PyCFunction)array_array_count, METH_O, array_array_count__doc__},
+
+PyDoc_STRVAR(array_array_index__doc__,
+"index($self, v, /)\n"
+"--\n"
+"\n"
+"Return index of first occurrence of v in the array.");
+
+#define ARRAY_ARRAY_INDEX_METHODDEF \
+ {"index", (PyCFunction)array_array_index, METH_O, array_array_index__doc__},
+
+PyDoc_STRVAR(array_array_remove__doc__,
+"remove($self, v, /)\n"
+"--\n"
+"\n"
+"Remove the first occurrence of v in the array.");
+
+#define ARRAY_ARRAY_REMOVE_METHODDEF \
+ {"remove", (PyCFunction)array_array_remove, METH_O, array_array_remove__doc__},
+
+PyDoc_STRVAR(array_array_pop__doc__,
+"pop($self, i=-1, /)\n"
+"--\n"
+"\n"
+"Return the i-th element and delete it from the array.\n"
+"\n"
+"i defaults to -1.");
+
+#define ARRAY_ARRAY_POP_METHODDEF \
+ {"pop", (PyCFunction)array_array_pop, METH_VARARGS, array_array_pop__doc__},
+
+static PyObject *
+array_array_pop_impl(arrayobject *self, Py_ssize_t i);
+
+static PyObject *
+array_array_pop(arrayobject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_ssize_t i = -1;
+
+ if (!PyArg_ParseTuple(args, "|n:pop",
+ &i))
+ goto exit;
+ return_value = array_array_pop_impl(self, i);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(array_array_extend__doc__,
+"extend($self, bb, /)\n"
+"--\n"
+"\n"
+"Append items to the end of the array.");
+
+#define ARRAY_ARRAY_EXTEND_METHODDEF \
+ {"extend", (PyCFunction)array_array_extend, METH_O, array_array_extend__doc__},
+
+PyDoc_STRVAR(array_array_insert__doc__,
+"insert($self, i, v, /)\n"
+"--\n"
+"\n"
+"Insert a new item v into the array before position i.");
+
+#define ARRAY_ARRAY_INSERT_METHODDEF \
+ {"insert", (PyCFunction)array_array_insert, METH_VARARGS, array_array_insert__doc__},
+
+static PyObject *
+array_array_insert_impl(arrayobject *self, Py_ssize_t i, PyObject *v);
+
+static PyObject *
+array_array_insert(arrayobject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_ssize_t i;
+ PyObject *v;
+
+ if (!PyArg_ParseTuple(args, "nO:insert",
+ &i, &v))
+ goto exit;
+ return_value = array_array_insert_impl(self, i, v);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(array_array_buffer_info__doc__,
+"buffer_info($self, /)\n"
+"--\n"
+"\n"
+"Return a tuple (address, length) giving the current memory address and the length in items of the buffer used to hold array\'s contents.\n"
+"\n"
+"The length should be multiplied by the itemsize attribute to calculate\n"
+"the buffer length in bytes.");
+
+#define ARRAY_ARRAY_BUFFER_INFO_METHODDEF \
+ {"buffer_info", (PyCFunction)array_array_buffer_info, METH_NOARGS, array_array_buffer_info__doc__},
+
+static PyObject *
+array_array_buffer_info_impl(arrayobject *self);
+
+static PyObject *
+array_array_buffer_info(arrayobject *self, PyObject *Py_UNUSED(ignored))
+{
+ return array_array_buffer_info_impl(self);
+}
+
+PyDoc_STRVAR(array_array_append__doc__,
+"append($self, v, /)\n"
+"--\n"
+"\n"
+"Append new value v to the end of the array.");
+
+#define ARRAY_ARRAY_APPEND_METHODDEF \
+ {"append", (PyCFunction)array_array_append, METH_O, array_array_append__doc__},
+
+PyDoc_STRVAR(array_array_byteswap__doc__,
+"byteswap($self, /)\n"
+"--\n"
+"\n"
+"Byteswap all items of the array.\n"
+"\n"
+"If the items in the array are not 1, 2, 4, or 8 bytes in size, RuntimeError is\n"
+"raised.");
+
+#define ARRAY_ARRAY_BYTESWAP_METHODDEF \
+ {"byteswap", (PyCFunction)array_array_byteswap, METH_NOARGS, array_array_byteswap__doc__},
+
+static PyObject *
+array_array_byteswap_impl(arrayobject *self);
+
+static PyObject *
+array_array_byteswap(arrayobject *self, PyObject *Py_UNUSED(ignored))
+{
+ return array_array_byteswap_impl(self);
+}
+
+PyDoc_STRVAR(array_array_reverse__doc__,
+"reverse($self, /)\n"
+"--\n"
+"\n"
+"Reverse the order of the items in the array.");
+
+#define ARRAY_ARRAY_REVERSE_METHODDEF \
+ {"reverse", (PyCFunction)array_array_reverse, METH_NOARGS, array_array_reverse__doc__},
+
+static PyObject *
+array_array_reverse_impl(arrayobject *self);
+
+static PyObject *
+array_array_reverse(arrayobject *self, PyObject *Py_UNUSED(ignored))
+{
+ return array_array_reverse_impl(self);
+}
+
+PyDoc_STRVAR(array_array_fromfile__doc__,
+"fromfile($self, f, n, /)\n"
+"--\n"
+"\n"
+"Read n objects from the file object f and append them to the end of the array.");
+
+#define ARRAY_ARRAY_FROMFILE_METHODDEF \
+ {"fromfile", (PyCFunction)array_array_fromfile, METH_VARARGS, array_array_fromfile__doc__},
+
+static PyObject *
+array_array_fromfile_impl(arrayobject *self, PyObject *f, Py_ssize_t n);
+
+static PyObject *
+array_array_fromfile(arrayobject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *f;
+ Py_ssize_t n;
+
+ if (!PyArg_ParseTuple(args, "On:fromfile",
+ &f, &n))
+ goto exit;
+ return_value = array_array_fromfile_impl(self, f, n);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(array_array_tofile__doc__,
+"tofile($self, f, /)\n"
+"--\n"
+"\n"
+"Write all items (as machine values) to the file object f.");
+
+#define ARRAY_ARRAY_TOFILE_METHODDEF \
+ {"tofile", (PyCFunction)array_array_tofile, METH_O, array_array_tofile__doc__},
+
+PyDoc_STRVAR(array_array_fromlist__doc__,
+"fromlist($self, list, /)\n"
+"--\n"
+"\n"
+"Append items to array from list.");
+
+#define ARRAY_ARRAY_FROMLIST_METHODDEF \
+ {"fromlist", (PyCFunction)array_array_fromlist, METH_O, array_array_fromlist__doc__},
+
+PyDoc_STRVAR(array_array_tolist__doc__,
+"tolist($self, /)\n"
+"--\n"
+"\n"
+"Convert array to an ordinary list with the same items.");
+
+#define ARRAY_ARRAY_TOLIST_METHODDEF \
+ {"tolist", (PyCFunction)array_array_tolist, METH_NOARGS, array_array_tolist__doc__},
+
+static PyObject *
+array_array_tolist_impl(arrayobject *self);
+
+static PyObject *
+array_array_tolist(arrayobject *self, PyObject *Py_UNUSED(ignored))
+{
+ return array_array_tolist_impl(self);
+}
+
+PyDoc_STRVAR(array_array_fromstring__doc__,
+"fromstring($self, buffer, /)\n"
+"--\n"
+"\n"
+"Appends items from the string, interpreting it as an array of machine values, as if it had been read from a file using the fromfile() method).\n"
+"\n"
+"This method is deprecated. Use frombytes instead.");
+
+#define ARRAY_ARRAY_FROMSTRING_METHODDEF \
+ {"fromstring", (PyCFunction)array_array_fromstring, METH_O, array_array_fromstring__doc__},
+
+static PyObject *
+array_array_fromstring_impl(arrayobject *self, Py_buffer *buffer);
+
+static PyObject *
+array_array_fromstring(arrayobject *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_buffer buffer = {NULL, NULL};
+
+ if (!PyArg_Parse(arg, "s*:fromstring", &buffer))
+ goto exit;
+ return_value = array_array_fromstring_impl(self, &buffer);
+
+exit:
+ /* Cleanup for buffer */
+ if (buffer.obj)
+ PyBuffer_Release(&buffer);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(array_array_frombytes__doc__,
+"frombytes($self, buffer, /)\n"
+"--\n"
+"\n"
+"Appends items from the string, interpreting it as an array of machine values, as if it had been read from a file using the fromfile() method).");
+
+#define ARRAY_ARRAY_FROMBYTES_METHODDEF \
+ {"frombytes", (PyCFunction)array_array_frombytes, METH_O, array_array_frombytes__doc__},
+
+static PyObject *
+array_array_frombytes_impl(arrayobject *self, Py_buffer *buffer);
+
+static PyObject *
+array_array_frombytes(arrayobject *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_buffer buffer = {NULL, NULL};
+
+ if (!PyArg_Parse(arg, "y*:frombytes", &buffer))
+ goto exit;
+ return_value = array_array_frombytes_impl(self, &buffer);
+
+exit:
+ /* Cleanup for buffer */
+ if (buffer.obj)
+ PyBuffer_Release(&buffer);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(array_array_tobytes__doc__,
+"tobytes($self, /)\n"
+"--\n"
+"\n"
+"Convert the array to an array of machine values and return the bytes representation.");
+
+#define ARRAY_ARRAY_TOBYTES_METHODDEF \
+ {"tobytes", (PyCFunction)array_array_tobytes, METH_NOARGS, array_array_tobytes__doc__},
+
+static PyObject *
+array_array_tobytes_impl(arrayobject *self);
+
+static PyObject *
+array_array_tobytes(arrayobject *self, PyObject *Py_UNUSED(ignored))
+{
+ return array_array_tobytes_impl(self);
+}
+
+PyDoc_STRVAR(array_array_tostring__doc__,
+"tostring($self, /)\n"
+"--\n"
+"\n"
+"Convert the array to an array of machine values and return the bytes representation.\n"
+"\n"
+"This method is deprecated. Use tobytes instead.");
+
+#define ARRAY_ARRAY_TOSTRING_METHODDEF \
+ {"tostring", (PyCFunction)array_array_tostring, METH_NOARGS, array_array_tostring__doc__},
+
+static PyObject *
+array_array_tostring_impl(arrayobject *self);
+
+static PyObject *
+array_array_tostring(arrayobject *self, PyObject *Py_UNUSED(ignored))
+{
+ return array_array_tostring_impl(self);
+}
+
+PyDoc_STRVAR(array_array_fromunicode__doc__,
+"fromunicode($self, ustr, /)\n"
+"--\n"
+"\n"
+"Extends this array with data from the unicode string ustr.\n"
+"\n"
+"The array must be a unicode type array; otherwise a ValueError is raised.\n"
+"Use array.frombytes(ustr.encode(...)) to append Unicode data to an array of\n"
+"some other type.");
+
+#define ARRAY_ARRAY_FROMUNICODE_METHODDEF \
+ {"fromunicode", (PyCFunction)array_array_fromunicode, METH_O, array_array_fromunicode__doc__},
+
+static PyObject *
+array_array_fromunicode_impl(arrayobject *self, Py_UNICODE *ustr,
+ Py_ssize_clean_t ustr_length);
+
+static PyObject *
+array_array_fromunicode(arrayobject *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_UNICODE *ustr;
+ Py_ssize_clean_t ustr_length;
+
+ if (!PyArg_Parse(arg, "u#:fromunicode", &ustr, &ustr_length))
+ goto exit;
+ return_value = array_array_fromunicode_impl(self, ustr, ustr_length);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(array_array_tounicode__doc__,
+"tounicode($self, /)\n"
+"--\n"
+"\n"
+"Extends this array with data from the unicode string ustr.\n"
+"\n"
+"Convert the array to a unicode string. The array must be a unicode type array;\n"
+"otherwise a ValueError is raised. Use array.tobytes().decode() to obtain a\n"
+"unicode string from an array of some other type.");
+
+#define ARRAY_ARRAY_TOUNICODE_METHODDEF \
+ {"tounicode", (PyCFunction)array_array_tounicode, METH_NOARGS, array_array_tounicode__doc__},
+
+static PyObject *
+array_array_tounicode_impl(arrayobject *self);
+
+static PyObject *
+array_array_tounicode(arrayobject *self, PyObject *Py_UNUSED(ignored))
+{
+ return array_array_tounicode_impl(self);
+}
+
+PyDoc_STRVAR(array_array___sizeof____doc__,
+"__sizeof__($self, /)\n"
+"--\n"
+"\n"
+"Size of the array in memory, in bytes.");
+
+#define ARRAY_ARRAY___SIZEOF___METHODDEF \
+ {"__sizeof__", (PyCFunction)array_array___sizeof__, METH_NOARGS, array_array___sizeof____doc__},
+
+static PyObject *
+array_array___sizeof___impl(arrayobject *self);
+
+static PyObject *
+array_array___sizeof__(arrayobject *self, PyObject *Py_UNUSED(ignored))
+{
+ return array_array___sizeof___impl(self);
+}
+
+PyDoc_STRVAR(array__array_reconstructor__doc__,
+"_array_reconstructor($module, arraytype, typecode, mformat_code, items,\n"
+" /)\n"
+"--\n"
+"\n"
+"Internal. Used for pickling support.");
+
+#define ARRAY__ARRAY_RECONSTRUCTOR_METHODDEF \
+ {"_array_reconstructor", (PyCFunction)array__array_reconstructor, METH_VARARGS, array__array_reconstructor__doc__},
+
+static PyObject *
+array__array_reconstructor_impl(PyModuleDef *module, PyTypeObject *arraytype,
+ int typecode,
+ enum machine_format_code mformat_code,
+ PyObject *items);
+
+static PyObject *
+array__array_reconstructor(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyTypeObject *arraytype;
+ int typecode;
+ enum machine_format_code mformat_code;
+ PyObject *items;
+
+ if (!PyArg_ParseTuple(args, "OCiO:_array_reconstructor",
+ &arraytype, &typecode, &mformat_code, &items))
+ goto exit;
+ return_value = array__array_reconstructor_impl(module, arraytype, typecode, mformat_code, items);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(array_array___reduce_ex____doc__,
+"__reduce_ex__($self, value, /)\n"
+"--\n"
+"\n"
+"Return state information for pickling.");
+
+#define ARRAY_ARRAY___REDUCE_EX___METHODDEF \
+ {"__reduce_ex__", (PyCFunction)array_array___reduce_ex__, METH_O, array_array___reduce_ex____doc__},
+
+PyDoc_STRVAR(array_arrayiterator___reduce____doc__,
+"__reduce__($self, /)\n"
+"--\n"
+"\n"
+"Return state information for pickling.");
+
+#define ARRAY_ARRAYITERATOR___REDUCE___METHODDEF \
+ {"__reduce__", (PyCFunction)array_arrayiterator___reduce__, METH_NOARGS, array_arrayiterator___reduce____doc__},
+
+static PyObject *
+array_arrayiterator___reduce___impl(arrayiterobject *self);
+
+static PyObject *
+array_arrayiterator___reduce__(arrayiterobject *self, PyObject *Py_UNUSED(ignored))
+{
+ return array_arrayiterator___reduce___impl(self);
+}
+
+PyDoc_STRVAR(array_arrayiterator___setstate____doc__,
+"__setstate__($self, state, /)\n"
+"--\n"
+"\n"
+"Set state information for unpickling.");
+
+#define ARRAY_ARRAYITERATOR___SETSTATE___METHODDEF \
+ {"__setstate__", (PyCFunction)array_arrayiterator___setstate__, METH_O, array_arrayiterator___setstate____doc__},
+/*[clinic end generated code: output=d2e82c65ea841cfc input=a9049054013a1b77]*/
diff --git a/Modules/clinic/audioop.c.h b/Modules/clinic/audioop.c.h
index 40ef5e2dc4..3ee29666cc 100644
--- a/Modules/clinic/audioop.c.h
+++ b/Modules/clinic/audioop.c.h
@@ -12,7 +12,8 @@ PyDoc_STRVAR(audioop_getsample__doc__,
{"getsample", (PyCFunction)audioop_getsample, METH_VARARGS, audioop_getsample__doc__},
static PyObject *
-audioop_getsample_impl(PyModuleDef *module, Py_buffer *fragment, int width, Py_ssize_t index);
+audioop_getsample_impl(PyModuleDef *module, Py_buffer *fragment, int width,
+ Py_ssize_t index);
static PyObject *
audioop_getsample(PyModuleDef *module, PyObject *args)
@@ -22,8 +23,7 @@ audioop_getsample(PyModuleDef *module, PyObject *args)
int width;
Py_ssize_t index;
- if (!PyArg_ParseTuple(args,
- "y*in:getsample",
+ if (!PyArg_ParseTuple(args, "y*in:getsample",
&fragment, &width, &index))
goto exit;
return_value = audioop_getsample_impl(module, &fragment, width, index);
@@ -55,8 +55,7 @@ audioop_max(PyModuleDef *module, PyObject *args)
Py_buffer fragment = {NULL, NULL};
int width;
- if (!PyArg_ParseTuple(args,
- "y*i:max",
+ if (!PyArg_ParseTuple(args, "y*i:max",
&fragment, &width))
goto exit;
return_value = audioop_max_impl(module, &fragment, width);
@@ -88,8 +87,7 @@ audioop_minmax(PyModuleDef *module, PyObject *args)
Py_buffer fragment = {NULL, NULL};
int width;
- if (!PyArg_ParseTuple(args,
- "y*i:minmax",
+ if (!PyArg_ParseTuple(args, "y*i:minmax",
&fragment, &width))
goto exit;
return_value = audioop_minmax_impl(module, &fragment, width);
@@ -121,8 +119,7 @@ audioop_avg(PyModuleDef *module, PyObject *args)
Py_buffer fragment = {NULL, NULL};
int width;
- if (!PyArg_ParseTuple(args,
- "y*i:avg",
+ if (!PyArg_ParseTuple(args, "y*i:avg",
&fragment, &width))
goto exit;
return_value = audioop_avg_impl(module, &fragment, width);
@@ -154,8 +151,7 @@ audioop_rms(PyModuleDef *module, PyObject *args)
Py_buffer fragment = {NULL, NULL};
int width;
- if (!PyArg_ParseTuple(args,
- "y*i:rms",
+ if (!PyArg_ParseTuple(args, "y*i:rms",
&fragment, &width))
goto exit;
return_value = audioop_rms_impl(module, &fragment, width);
@@ -178,7 +174,8 @@ PyDoc_STRVAR(audioop_findfit__doc__,
{"findfit", (PyCFunction)audioop_findfit, METH_VARARGS, audioop_findfit__doc__},
static PyObject *
-audioop_findfit_impl(PyModuleDef *module, Py_buffer *fragment, Py_buffer *reference);
+audioop_findfit_impl(PyModuleDef *module, Py_buffer *fragment,
+ Py_buffer *reference);
static PyObject *
audioop_findfit(PyModuleDef *module, PyObject *args)
@@ -187,8 +184,7 @@ audioop_findfit(PyModuleDef *module, PyObject *args)
Py_buffer fragment = {NULL, NULL};
Py_buffer reference = {NULL, NULL};
- if (!PyArg_ParseTuple(args,
- "y*y*:findfit",
+ if (!PyArg_ParseTuple(args, "y*y*:findfit",
&fragment, &reference))
goto exit;
return_value = audioop_findfit_impl(module, &fragment, &reference);
@@ -214,7 +210,8 @@ PyDoc_STRVAR(audioop_findfactor__doc__,
{"findfactor", (PyCFunction)audioop_findfactor, METH_VARARGS, audioop_findfactor__doc__},
static PyObject *
-audioop_findfactor_impl(PyModuleDef *module, Py_buffer *fragment, Py_buffer *reference);
+audioop_findfactor_impl(PyModuleDef *module, Py_buffer *fragment,
+ Py_buffer *reference);
static PyObject *
audioop_findfactor(PyModuleDef *module, PyObject *args)
@@ -223,8 +220,7 @@ audioop_findfactor(PyModuleDef *module, PyObject *args)
Py_buffer fragment = {NULL, NULL};
Py_buffer reference = {NULL, NULL};
- if (!PyArg_ParseTuple(args,
- "y*y*:findfactor",
+ if (!PyArg_ParseTuple(args, "y*y*:findfactor",
&fragment, &reference))
goto exit;
return_value = audioop_findfactor_impl(module, &fragment, &reference);
@@ -250,7 +246,8 @@ PyDoc_STRVAR(audioop_findmax__doc__,
{"findmax", (PyCFunction)audioop_findmax, METH_VARARGS, audioop_findmax__doc__},
static PyObject *
-audioop_findmax_impl(PyModuleDef *module, Py_buffer *fragment, Py_ssize_t length);
+audioop_findmax_impl(PyModuleDef *module, Py_buffer *fragment,
+ Py_ssize_t length);
static PyObject *
audioop_findmax(PyModuleDef *module, PyObject *args)
@@ -259,8 +256,7 @@ audioop_findmax(PyModuleDef *module, PyObject *args)
Py_buffer fragment = {NULL, NULL};
Py_ssize_t length;
- if (!PyArg_ParseTuple(args,
- "y*n:findmax",
+ if (!PyArg_ParseTuple(args, "y*n:findmax",
&fragment, &length))
goto exit;
return_value = audioop_findmax_impl(module, &fragment, length);
@@ -292,8 +288,7 @@ audioop_avgpp(PyModuleDef *module, PyObject *args)
Py_buffer fragment = {NULL, NULL};
int width;
- if (!PyArg_ParseTuple(args,
- "y*i:avgpp",
+ if (!PyArg_ParseTuple(args, "y*i:avgpp",
&fragment, &width))
goto exit;
return_value = audioop_avgpp_impl(module, &fragment, width);
@@ -325,8 +320,7 @@ audioop_maxpp(PyModuleDef *module, PyObject *args)
Py_buffer fragment = {NULL, NULL};
int width;
- if (!PyArg_ParseTuple(args,
- "y*i:maxpp",
+ if (!PyArg_ParseTuple(args, "y*i:maxpp",
&fragment, &width))
goto exit;
return_value = audioop_maxpp_impl(module, &fragment, width);
@@ -358,8 +352,7 @@ audioop_cross(PyModuleDef *module, PyObject *args)
Py_buffer fragment = {NULL, NULL};
int width;
- if (!PyArg_ParseTuple(args,
- "y*i:cross",
+ if (!PyArg_ParseTuple(args, "y*i:cross",
&fragment, &width))
goto exit;
return_value = audioop_cross_impl(module, &fragment, width);
@@ -382,7 +375,8 @@ PyDoc_STRVAR(audioop_mul__doc__,
{"mul", (PyCFunction)audioop_mul, METH_VARARGS, audioop_mul__doc__},
static PyObject *
-audioop_mul_impl(PyModuleDef *module, Py_buffer *fragment, int width, double factor);
+audioop_mul_impl(PyModuleDef *module, Py_buffer *fragment, int width,
+ double factor);
static PyObject *
audioop_mul(PyModuleDef *module, PyObject *args)
@@ -392,8 +386,7 @@ audioop_mul(PyModuleDef *module, PyObject *args)
int width;
double factor;
- if (!PyArg_ParseTuple(args,
- "y*id:mul",
+ if (!PyArg_ParseTuple(args, "y*id:mul",
&fragment, &width, &factor))
goto exit;
return_value = audioop_mul_impl(module, &fragment, width, factor);
@@ -416,7 +409,8 @@ PyDoc_STRVAR(audioop_tomono__doc__,
{"tomono", (PyCFunction)audioop_tomono, METH_VARARGS, audioop_tomono__doc__},
static PyObject *
-audioop_tomono_impl(PyModuleDef *module, Py_buffer *fragment, int width, double lfactor, double rfactor);
+audioop_tomono_impl(PyModuleDef *module, Py_buffer *fragment, int width,
+ double lfactor, double rfactor);
static PyObject *
audioop_tomono(PyModuleDef *module, PyObject *args)
@@ -427,8 +421,7 @@ audioop_tomono(PyModuleDef *module, PyObject *args)
double lfactor;
double rfactor;
- if (!PyArg_ParseTuple(args,
- "y*idd:tomono",
+ if (!PyArg_ParseTuple(args, "y*idd:tomono",
&fragment, &width, &lfactor, &rfactor))
goto exit;
return_value = audioop_tomono_impl(module, &fragment, width, lfactor, rfactor);
@@ -451,7 +444,8 @@ PyDoc_STRVAR(audioop_tostereo__doc__,
{"tostereo", (PyCFunction)audioop_tostereo, METH_VARARGS, audioop_tostereo__doc__},
static PyObject *
-audioop_tostereo_impl(PyModuleDef *module, Py_buffer *fragment, int width, double lfactor, double rfactor);
+audioop_tostereo_impl(PyModuleDef *module, Py_buffer *fragment, int width,
+ double lfactor, double rfactor);
static PyObject *
audioop_tostereo(PyModuleDef *module, PyObject *args)
@@ -462,8 +456,7 @@ audioop_tostereo(PyModuleDef *module, PyObject *args)
double lfactor;
double rfactor;
- if (!PyArg_ParseTuple(args,
- "y*idd:tostereo",
+ if (!PyArg_ParseTuple(args, "y*idd:tostereo",
&fragment, &width, &lfactor, &rfactor))
goto exit;
return_value = audioop_tostereo_impl(module, &fragment, width, lfactor, rfactor);
@@ -486,7 +479,8 @@ PyDoc_STRVAR(audioop_add__doc__,
{"add", (PyCFunction)audioop_add, METH_VARARGS, audioop_add__doc__},
static PyObject *
-audioop_add_impl(PyModuleDef *module, Py_buffer *fragment1, Py_buffer *fragment2, int width);
+audioop_add_impl(PyModuleDef *module, Py_buffer *fragment1,
+ Py_buffer *fragment2, int width);
static PyObject *
audioop_add(PyModuleDef *module, PyObject *args)
@@ -496,8 +490,7 @@ audioop_add(PyModuleDef *module, PyObject *args)
Py_buffer fragment2 = {NULL, NULL};
int width;
- if (!PyArg_ParseTuple(args,
- "y*y*i:add",
+ if (!PyArg_ParseTuple(args, "y*y*i:add",
&fragment1, &fragment2, &width))
goto exit;
return_value = audioop_add_impl(module, &fragment1, &fragment2, width);
@@ -523,7 +516,8 @@ PyDoc_STRVAR(audioop_bias__doc__,
{"bias", (PyCFunction)audioop_bias, METH_VARARGS, audioop_bias__doc__},
static PyObject *
-audioop_bias_impl(PyModuleDef *module, Py_buffer *fragment, int width, int bias);
+audioop_bias_impl(PyModuleDef *module, Py_buffer *fragment, int width,
+ int bias);
static PyObject *
audioop_bias(PyModuleDef *module, PyObject *args)
@@ -533,8 +527,7 @@ audioop_bias(PyModuleDef *module, PyObject *args)
int width;
int bias;
- if (!PyArg_ParseTuple(args,
- "y*ii:bias",
+ if (!PyArg_ParseTuple(args, "y*ii:bias",
&fragment, &width, &bias))
goto exit;
return_value = audioop_bias_impl(module, &fragment, width, bias);
@@ -566,8 +559,7 @@ audioop_reverse(PyModuleDef *module, PyObject *args)
Py_buffer fragment = {NULL, NULL};
int width;
- if (!PyArg_ParseTuple(args,
- "y*i:reverse",
+ if (!PyArg_ParseTuple(args, "y*i:reverse",
&fragment, &width))
goto exit;
return_value = audioop_reverse_impl(module, &fragment, width);
@@ -599,8 +591,7 @@ audioop_byteswap(PyModuleDef *module, PyObject *args)
Py_buffer fragment = {NULL, NULL};
int width;
- if (!PyArg_ParseTuple(args,
- "y*i:byteswap",
+ if (!PyArg_ParseTuple(args, "y*i:byteswap",
&fragment, &width))
goto exit;
return_value = audioop_byteswap_impl(module, &fragment, width);
@@ -623,7 +614,8 @@ PyDoc_STRVAR(audioop_lin2lin__doc__,
{"lin2lin", (PyCFunction)audioop_lin2lin, METH_VARARGS, audioop_lin2lin__doc__},
static PyObject *
-audioop_lin2lin_impl(PyModuleDef *module, Py_buffer *fragment, int width, int newwidth);
+audioop_lin2lin_impl(PyModuleDef *module, Py_buffer *fragment, int width,
+ int newwidth);
static PyObject *
audioop_lin2lin(PyModuleDef *module, PyObject *args)
@@ -633,8 +625,7 @@ audioop_lin2lin(PyModuleDef *module, PyObject *args)
int width;
int newwidth;
- if (!PyArg_ParseTuple(args,
- "y*ii:lin2lin",
+ if (!PyArg_ParseTuple(args, "y*ii:lin2lin",
&fragment, &width, &newwidth))
goto exit;
return_value = audioop_lin2lin_impl(module, &fragment, width, newwidth);
@@ -658,7 +649,9 @@ PyDoc_STRVAR(audioop_ratecv__doc__,
{"ratecv", (PyCFunction)audioop_ratecv, METH_VARARGS, audioop_ratecv__doc__},
static PyObject *
-audioop_ratecv_impl(PyModuleDef *module, Py_buffer *fragment, int width, int nchannels, int inrate, int outrate, PyObject *state, int weightA, int weightB);
+audioop_ratecv_impl(PyModuleDef *module, Py_buffer *fragment, int width,
+ int nchannels, int inrate, int outrate, PyObject *state,
+ int weightA, int weightB);
static PyObject *
audioop_ratecv(PyModuleDef *module, PyObject *args)
@@ -673,8 +666,7 @@ audioop_ratecv(PyModuleDef *module, PyObject *args)
int weightA = 1;
int weightB = 0;
- if (!PyArg_ParseTuple(args,
- "y*iiiiO|ii:ratecv",
+ if (!PyArg_ParseTuple(args, "y*iiiiO|ii:ratecv",
&fragment, &width, &nchannels, &inrate, &outrate, &state, &weightA, &weightB))
goto exit;
return_value = audioop_ratecv_impl(module, &fragment, width, nchannels, inrate, outrate, state, weightA, weightB);
@@ -706,8 +698,7 @@ audioop_lin2ulaw(PyModuleDef *module, PyObject *args)
Py_buffer fragment = {NULL, NULL};
int width;
- if (!PyArg_ParseTuple(args,
- "y*i:lin2ulaw",
+ if (!PyArg_ParseTuple(args, "y*i:lin2ulaw",
&fragment, &width))
goto exit;
return_value = audioop_lin2ulaw_impl(module, &fragment, width);
@@ -739,8 +730,7 @@ audioop_ulaw2lin(PyModuleDef *module, PyObject *args)
Py_buffer fragment = {NULL, NULL};
int width;
- if (!PyArg_ParseTuple(args,
- "y*i:ulaw2lin",
+ if (!PyArg_ParseTuple(args, "y*i:ulaw2lin",
&fragment, &width))
goto exit;
return_value = audioop_ulaw2lin_impl(module, &fragment, width);
@@ -772,8 +762,7 @@ audioop_lin2alaw(PyModuleDef *module, PyObject *args)
Py_buffer fragment = {NULL, NULL};
int width;
- if (!PyArg_ParseTuple(args,
- "y*i:lin2alaw",
+ if (!PyArg_ParseTuple(args, "y*i:lin2alaw",
&fragment, &width))
goto exit;
return_value = audioop_lin2alaw_impl(module, &fragment, width);
@@ -805,8 +794,7 @@ audioop_alaw2lin(PyModuleDef *module, PyObject *args)
Py_buffer fragment = {NULL, NULL};
int width;
- if (!PyArg_ParseTuple(args,
- "y*i:alaw2lin",
+ if (!PyArg_ParseTuple(args, "y*i:alaw2lin",
&fragment, &width))
goto exit;
return_value = audioop_alaw2lin_impl(module, &fragment, width);
@@ -829,7 +817,8 @@ PyDoc_STRVAR(audioop_lin2adpcm__doc__,
{"lin2adpcm", (PyCFunction)audioop_lin2adpcm, METH_VARARGS, audioop_lin2adpcm__doc__},
static PyObject *
-audioop_lin2adpcm_impl(PyModuleDef *module, Py_buffer *fragment, int width, PyObject *state);
+audioop_lin2adpcm_impl(PyModuleDef *module, Py_buffer *fragment, int width,
+ PyObject *state);
static PyObject *
audioop_lin2adpcm(PyModuleDef *module, PyObject *args)
@@ -839,8 +828,7 @@ audioop_lin2adpcm(PyModuleDef *module, PyObject *args)
int width;
PyObject *state;
- if (!PyArg_ParseTuple(args,
- "y*iO:lin2adpcm",
+ if (!PyArg_ParseTuple(args, "y*iO:lin2adpcm",
&fragment, &width, &state))
goto exit;
return_value = audioop_lin2adpcm_impl(module, &fragment, width, state);
@@ -863,7 +851,8 @@ PyDoc_STRVAR(audioop_adpcm2lin__doc__,
{"adpcm2lin", (PyCFunction)audioop_adpcm2lin, METH_VARARGS, audioop_adpcm2lin__doc__},
static PyObject *
-audioop_adpcm2lin_impl(PyModuleDef *module, Py_buffer *fragment, int width, PyObject *state);
+audioop_adpcm2lin_impl(PyModuleDef *module, Py_buffer *fragment, int width,
+ PyObject *state);
static PyObject *
audioop_adpcm2lin(PyModuleDef *module, PyObject *args)
@@ -873,8 +862,7 @@ audioop_adpcm2lin(PyModuleDef *module, PyObject *args)
int width;
PyObject *state;
- if (!PyArg_ParseTuple(args,
- "y*iO:adpcm2lin",
+ if (!PyArg_ParseTuple(args, "y*iO:adpcm2lin",
&fragment, &width, &state))
goto exit;
return_value = audioop_adpcm2lin_impl(module, &fragment, width, state);
@@ -886,4 +874,4 @@ exit:
return return_value;
}
-/*[clinic end generated code: output=be840bba5d40c2ce input=a9049054013a1b77]*/
+/*[clinic end generated code: output=a076e1b213a8727b input=a9049054013a1b77]*/
diff --git a/Modules/clinic/binascii.c.h b/Modules/clinic/binascii.c.h
index ef646ddddc..e348beebaa 100644
--- a/Modules/clinic/binascii.c.h
+++ b/Modules/clinic/binascii.c.h
@@ -9,20 +9,18 @@ PyDoc_STRVAR(binascii_a2b_uu__doc__,
"Decode a line of uuencoded data.");
#define BINASCII_A2B_UU_METHODDEF \
- {"a2b_uu", (PyCFunction)binascii_a2b_uu, METH_VARARGS, binascii_a2b_uu__doc__},
+ {"a2b_uu", (PyCFunction)binascii_a2b_uu, METH_O, binascii_a2b_uu__doc__},
static PyObject *
binascii_a2b_uu_impl(PyModuleDef *module, Py_buffer *data);
static PyObject *
-binascii_a2b_uu(PyModuleDef *module, PyObject *args)
+binascii_a2b_uu(PyModuleDef *module, PyObject *arg)
{
PyObject *return_value = NULL;
Py_buffer data = {NULL, NULL};
- if (!PyArg_ParseTuple(args,
- "O&:a2b_uu",
- ascii_buffer_converter, &data))
+ if (!PyArg_Parse(arg, "O&:a2b_uu", ascii_buffer_converter, &data))
goto exit;
return_value = binascii_a2b_uu_impl(module, &data);
@@ -41,20 +39,18 @@ PyDoc_STRVAR(binascii_b2a_uu__doc__,
"Uuencode line of data.");
#define BINASCII_B2A_UU_METHODDEF \
- {"b2a_uu", (PyCFunction)binascii_b2a_uu, METH_VARARGS, binascii_b2a_uu__doc__},
+ {"b2a_uu", (PyCFunction)binascii_b2a_uu, METH_O, binascii_b2a_uu__doc__},
static PyObject *
binascii_b2a_uu_impl(PyModuleDef *module, Py_buffer *data);
static PyObject *
-binascii_b2a_uu(PyModuleDef *module, PyObject *args)
+binascii_b2a_uu(PyModuleDef *module, PyObject *arg)
{
PyObject *return_value = NULL;
Py_buffer data = {NULL, NULL};
- if (!PyArg_ParseTuple(args,
- "y*:b2a_uu",
- &data))
+ if (!PyArg_Parse(arg, "y*:b2a_uu", &data))
goto exit;
return_value = binascii_b2a_uu_impl(module, &data);
@@ -73,20 +69,18 @@ PyDoc_STRVAR(binascii_a2b_base64__doc__,
"Decode a line of base64 data.");
#define BINASCII_A2B_BASE64_METHODDEF \
- {"a2b_base64", (PyCFunction)binascii_a2b_base64, METH_VARARGS, binascii_a2b_base64__doc__},
+ {"a2b_base64", (PyCFunction)binascii_a2b_base64, METH_O, binascii_a2b_base64__doc__},
static PyObject *
binascii_a2b_base64_impl(PyModuleDef *module, Py_buffer *data);
static PyObject *
-binascii_a2b_base64(PyModuleDef *module, PyObject *args)
+binascii_a2b_base64(PyModuleDef *module, PyObject *arg)
{
PyObject *return_value = NULL;
Py_buffer data = {NULL, NULL};
- if (!PyArg_ParseTuple(args,
- "O&:a2b_base64",
- ascii_buffer_converter, &data))
+ if (!PyArg_Parse(arg, "O&:a2b_base64", ascii_buffer_converter, &data))
goto exit;
return_value = binascii_a2b_base64_impl(module, &data);
@@ -105,20 +99,18 @@ PyDoc_STRVAR(binascii_b2a_base64__doc__,
"Base64-code line of data.");
#define BINASCII_B2A_BASE64_METHODDEF \
- {"b2a_base64", (PyCFunction)binascii_b2a_base64, METH_VARARGS, binascii_b2a_base64__doc__},
+ {"b2a_base64", (PyCFunction)binascii_b2a_base64, METH_O, binascii_b2a_base64__doc__},
static PyObject *
binascii_b2a_base64_impl(PyModuleDef *module, Py_buffer *data);
static PyObject *
-binascii_b2a_base64(PyModuleDef *module, PyObject *args)
+binascii_b2a_base64(PyModuleDef *module, PyObject *arg)
{
PyObject *return_value = NULL;
Py_buffer data = {NULL, NULL};
- if (!PyArg_ParseTuple(args,
- "y*:b2a_base64",
- &data))
+ if (!PyArg_Parse(arg, "y*:b2a_base64", &data))
goto exit;
return_value = binascii_b2a_base64_impl(module, &data);
@@ -137,20 +129,18 @@ PyDoc_STRVAR(binascii_a2b_hqx__doc__,
"Decode .hqx coding.");
#define BINASCII_A2B_HQX_METHODDEF \
- {"a2b_hqx", (PyCFunction)binascii_a2b_hqx, METH_VARARGS, binascii_a2b_hqx__doc__},
+ {"a2b_hqx", (PyCFunction)binascii_a2b_hqx, METH_O, binascii_a2b_hqx__doc__},
static PyObject *
binascii_a2b_hqx_impl(PyModuleDef *module, Py_buffer *data);
static PyObject *
-binascii_a2b_hqx(PyModuleDef *module, PyObject *args)
+binascii_a2b_hqx(PyModuleDef *module, PyObject *arg)
{
PyObject *return_value = NULL;
Py_buffer data = {NULL, NULL};
- if (!PyArg_ParseTuple(args,
- "O&:a2b_hqx",
- ascii_buffer_converter, &data))
+ if (!PyArg_Parse(arg, "O&:a2b_hqx", ascii_buffer_converter, &data))
goto exit;
return_value = binascii_a2b_hqx_impl(module, &data);
@@ -169,20 +159,18 @@ PyDoc_STRVAR(binascii_rlecode_hqx__doc__,
"Binhex RLE-code binary data.");
#define BINASCII_RLECODE_HQX_METHODDEF \
- {"rlecode_hqx", (PyCFunction)binascii_rlecode_hqx, METH_VARARGS, binascii_rlecode_hqx__doc__},
+ {"rlecode_hqx", (PyCFunction)binascii_rlecode_hqx, METH_O, binascii_rlecode_hqx__doc__},
static PyObject *
binascii_rlecode_hqx_impl(PyModuleDef *module, Py_buffer *data);
static PyObject *
-binascii_rlecode_hqx(PyModuleDef *module, PyObject *args)
+binascii_rlecode_hqx(PyModuleDef *module, PyObject *arg)
{
PyObject *return_value = NULL;
Py_buffer data = {NULL, NULL};
- if (!PyArg_ParseTuple(args,
- "y*:rlecode_hqx",
- &data))
+ if (!PyArg_Parse(arg, "y*:rlecode_hqx", &data))
goto exit;
return_value = binascii_rlecode_hqx_impl(module, &data);
@@ -201,20 +189,18 @@ PyDoc_STRVAR(binascii_b2a_hqx__doc__,
"Encode .hqx data.");
#define BINASCII_B2A_HQX_METHODDEF \
- {"b2a_hqx", (PyCFunction)binascii_b2a_hqx, METH_VARARGS, binascii_b2a_hqx__doc__},
+ {"b2a_hqx", (PyCFunction)binascii_b2a_hqx, METH_O, binascii_b2a_hqx__doc__},
static PyObject *
binascii_b2a_hqx_impl(PyModuleDef *module, Py_buffer *data);
static PyObject *
-binascii_b2a_hqx(PyModuleDef *module, PyObject *args)
+binascii_b2a_hqx(PyModuleDef *module, PyObject *arg)
{
PyObject *return_value = NULL;
Py_buffer data = {NULL, NULL};
- if (!PyArg_ParseTuple(args,
- "y*:b2a_hqx",
- &data))
+ if (!PyArg_Parse(arg, "y*:b2a_hqx", &data))
goto exit;
return_value = binascii_b2a_hqx_impl(module, &data);
@@ -233,20 +219,18 @@ PyDoc_STRVAR(binascii_rledecode_hqx__doc__,
"Decode hexbin RLE-coded string.");
#define BINASCII_RLEDECODE_HQX_METHODDEF \
- {"rledecode_hqx", (PyCFunction)binascii_rledecode_hqx, METH_VARARGS, binascii_rledecode_hqx__doc__},
+ {"rledecode_hqx", (PyCFunction)binascii_rledecode_hqx, METH_O, binascii_rledecode_hqx__doc__},
static PyObject *
binascii_rledecode_hqx_impl(PyModuleDef *module, Py_buffer *data);
static PyObject *
-binascii_rledecode_hqx(PyModuleDef *module, PyObject *args)
+binascii_rledecode_hqx(PyModuleDef *module, PyObject *arg)
{
PyObject *return_value = NULL;
Py_buffer data = {NULL, NULL};
- if (!PyArg_ParseTuple(args,
- "y*:rledecode_hqx",
- &data))
+ if (!PyArg_Parse(arg, "y*:rledecode_hqx", &data))
goto exit;
return_value = binascii_rledecode_hqx_impl(module, &data);
@@ -278,12 +262,11 @@ binascii_crc_hqx(PyModuleDef *module, PyObject *args)
unsigned int crc;
unsigned int _return_value;
- if (!PyArg_ParseTuple(args,
- "y*I:crc_hqx",
+ if (!PyArg_ParseTuple(args, "y*I:crc_hqx",
&data, &crc))
goto exit;
_return_value = binascii_crc_hqx_impl(module, &data, crc);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == (unsigned int)-1) && PyErr_Occurred())
goto exit;
return_value = PyLong_FromUnsignedLong((unsigned long)_return_value);
@@ -315,12 +298,11 @@ binascii_crc32(PyModuleDef *module, PyObject *args)
unsigned int crc = 0;
unsigned int _return_value;
- if (!PyArg_ParseTuple(args,
- "y*|I:crc32",
+ if (!PyArg_ParseTuple(args, "y*|I:crc32",
&data, &crc))
goto exit;
_return_value = binascii_crc32_impl(module, &data, crc);
- if ((_return_value == -1) && PyErr_Occurred())
+ if ((_return_value == (unsigned int)-1) && PyErr_Occurred())
goto exit;
return_value = PyLong_FromUnsignedLong((unsigned long)_return_value);
@@ -342,20 +324,18 @@ PyDoc_STRVAR(binascii_b2a_hex__doc__,
"available as \"hexlify()\".");
#define BINASCII_B2A_HEX_METHODDEF \
- {"b2a_hex", (PyCFunction)binascii_b2a_hex, METH_VARARGS, binascii_b2a_hex__doc__},
+ {"b2a_hex", (PyCFunction)binascii_b2a_hex, METH_O, binascii_b2a_hex__doc__},
static PyObject *
binascii_b2a_hex_impl(PyModuleDef *module, Py_buffer *data);
static PyObject *
-binascii_b2a_hex(PyModuleDef *module, PyObject *args)
+binascii_b2a_hex(PyModuleDef *module, PyObject *arg)
{
PyObject *return_value = NULL;
Py_buffer data = {NULL, NULL};
- if (!PyArg_ParseTuple(args,
- "y*:b2a_hex",
- &data))
+ if (!PyArg_Parse(arg, "y*:b2a_hex", &data))
goto exit;
return_value = binascii_b2a_hex_impl(module, &data);
@@ -376,20 +356,18 @@ PyDoc_STRVAR(binascii_hexlify__doc__,
"The return value is a bytes object.");
#define BINASCII_HEXLIFY_METHODDEF \
- {"hexlify", (PyCFunction)binascii_hexlify, METH_VARARGS, binascii_hexlify__doc__},
+ {"hexlify", (PyCFunction)binascii_hexlify, METH_O, binascii_hexlify__doc__},
static PyObject *
binascii_hexlify_impl(PyModuleDef *module, Py_buffer *data);
static PyObject *
-binascii_hexlify(PyModuleDef *module, PyObject *args)
+binascii_hexlify(PyModuleDef *module, PyObject *arg)
{
PyObject *return_value = NULL;
Py_buffer data = {NULL, NULL};
- if (!PyArg_ParseTuple(args,
- "y*:hexlify",
- &data))
+ if (!PyArg_Parse(arg, "y*:hexlify", &data))
goto exit;
return_value = binascii_hexlify_impl(module, &data);
@@ -411,20 +389,18 @@ PyDoc_STRVAR(binascii_a2b_hex__doc__,
"This function is also available as \"unhexlify()\".");
#define BINASCII_A2B_HEX_METHODDEF \
- {"a2b_hex", (PyCFunction)binascii_a2b_hex, METH_VARARGS, binascii_a2b_hex__doc__},
+ {"a2b_hex", (PyCFunction)binascii_a2b_hex, METH_O, binascii_a2b_hex__doc__},
static PyObject *
binascii_a2b_hex_impl(PyModuleDef *module, Py_buffer *hexstr);
static PyObject *
-binascii_a2b_hex(PyModuleDef *module, PyObject *args)
+binascii_a2b_hex(PyModuleDef *module, PyObject *arg)
{
PyObject *return_value = NULL;
Py_buffer hexstr = {NULL, NULL};
- if (!PyArg_ParseTuple(args,
- "O&:a2b_hex",
- ascii_buffer_converter, &hexstr))
+ if (!PyArg_Parse(arg, "O&:a2b_hex", ascii_buffer_converter, &hexstr))
goto exit;
return_value = binascii_a2b_hex_impl(module, &hexstr);
@@ -445,20 +421,18 @@ PyDoc_STRVAR(binascii_unhexlify__doc__,
"hexstr must contain an even number of hex digits (upper or lower case).");
#define BINASCII_UNHEXLIFY_METHODDEF \
- {"unhexlify", (PyCFunction)binascii_unhexlify, METH_VARARGS, binascii_unhexlify__doc__},
+ {"unhexlify", (PyCFunction)binascii_unhexlify, METH_O, binascii_unhexlify__doc__},
static PyObject *
binascii_unhexlify_impl(PyModuleDef *module, Py_buffer *hexstr);
static PyObject *
-binascii_unhexlify(PyModuleDef *module, PyObject *args)
+binascii_unhexlify(PyModuleDef *module, PyObject *arg)
{
PyObject *return_value = NULL;
Py_buffer hexstr = {NULL, NULL};
- if (!PyArg_ParseTuple(args,
- "O&:unhexlify",
- ascii_buffer_converter, &hexstr))
+ if (!PyArg_Parse(arg, "O&:unhexlify", ascii_buffer_converter, &hexstr))
goto exit;
return_value = binascii_unhexlify_impl(module, &hexstr);
@@ -490,8 +464,7 @@ binascii_a2b_qp(PyModuleDef *module, PyObject *args, PyObject *kwargs)
Py_buffer data = {NULL, NULL};
int header = 0;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O&|i:a2b_qp", _keywords,
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&|i:a2b_qp", _keywords,
ascii_buffer_converter, &data, &header))
goto exit;
return_value = binascii_a2b_qp_impl(module, &data, header);
@@ -518,7 +491,8 @@ PyDoc_STRVAR(binascii_b2a_qp__doc__,
{"b2a_qp", (PyCFunction)binascii_b2a_qp, METH_VARARGS|METH_KEYWORDS, binascii_b2a_qp__doc__},
static PyObject *
-binascii_b2a_qp_impl(PyModuleDef *module, Py_buffer *data, int quotetabs, int istext, int header);
+binascii_b2a_qp_impl(PyModuleDef *module, Py_buffer *data, int quotetabs,
+ int istext, int header);
static PyObject *
binascii_b2a_qp(PyModuleDef *module, PyObject *args, PyObject *kwargs)
@@ -530,8 +504,7 @@ binascii_b2a_qp(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int istext = 1;
int header = 0;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "y*|iii:b2a_qp", _keywords,
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "y*|iii:b2a_qp", _keywords,
&data, &quotetabs, &istext, &header))
goto exit;
return_value = binascii_b2a_qp_impl(module, &data, quotetabs, istext, header);
@@ -543,4 +516,4 @@ exit:
return return_value;
}
-/*[clinic end generated code: output=22761b36f4f9e5bb input=a9049054013a1b77]*/
+/*[clinic end generated code: output=b1a3cbf7660ebaa5 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/cmathmodule.c.h b/Modules/clinic/cmathmodule.c.h
new file mode 100644
index 0000000000..7d61649783
--- /dev/null
+++ b/Modules/clinic/cmathmodule.c.h
@@ -0,0 +1,860 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(cmath_acos__doc__,
+"acos($module, z, /)\n"
+"--\n"
+"\n"
+"Return the arc cosine of z.");
+
+#define CMATH_ACOS_METHODDEF \
+ {"acos", (PyCFunction)cmath_acos, METH_O, cmath_acos__doc__},
+
+static Py_complex
+cmath_acos_impl(PyModuleDef *module, Py_complex z);
+
+static PyObject *
+cmath_acos(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_complex z;
+ Py_complex _return_value;
+
+ if (!PyArg_Parse(arg, "D:acos", &z))
+ goto exit;
+ /* modifications for z */
+ errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
+ _return_value = cmath_acos_impl(module, z);
+ PyFPE_END_PROTECT(_return_value);
+ if (errno == EDOM) {
+ PyErr_SetString(PyExc_ValueError, "math domain error");
+ goto exit;
+ }
+ else if (errno == ERANGE) {
+ PyErr_SetString(PyExc_OverflowError, "math range error");
+ goto exit;
+ }
+ else {
+ return_value = PyComplex_FromCComplex(_return_value);
+ }
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(cmath_acosh__doc__,
+"acosh($module, z, /)\n"
+"--\n"
+"\n"
+"Return the inverse hyperbolic cosine of z.");
+
+#define CMATH_ACOSH_METHODDEF \
+ {"acosh", (PyCFunction)cmath_acosh, METH_O, cmath_acosh__doc__},
+
+static Py_complex
+cmath_acosh_impl(PyModuleDef *module, Py_complex z);
+
+static PyObject *
+cmath_acosh(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_complex z;
+ Py_complex _return_value;
+
+ if (!PyArg_Parse(arg, "D:acosh", &z))
+ goto exit;
+ /* modifications for z */
+ errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
+ _return_value = cmath_acosh_impl(module, z);
+ PyFPE_END_PROTECT(_return_value);
+ if (errno == EDOM) {
+ PyErr_SetString(PyExc_ValueError, "math domain error");
+ goto exit;
+ }
+ else if (errno == ERANGE) {
+ PyErr_SetString(PyExc_OverflowError, "math range error");
+ goto exit;
+ }
+ else {
+ return_value = PyComplex_FromCComplex(_return_value);
+ }
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(cmath_asin__doc__,
+"asin($module, z, /)\n"
+"--\n"
+"\n"
+"Return the arc sine of z.");
+
+#define CMATH_ASIN_METHODDEF \
+ {"asin", (PyCFunction)cmath_asin, METH_O, cmath_asin__doc__},
+
+static Py_complex
+cmath_asin_impl(PyModuleDef *module, Py_complex z);
+
+static PyObject *
+cmath_asin(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_complex z;
+ Py_complex _return_value;
+
+ if (!PyArg_Parse(arg, "D:asin", &z))
+ goto exit;
+ /* modifications for z */
+ errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
+ _return_value = cmath_asin_impl(module, z);
+ PyFPE_END_PROTECT(_return_value);
+ if (errno == EDOM) {
+ PyErr_SetString(PyExc_ValueError, "math domain error");
+ goto exit;
+ }
+ else if (errno == ERANGE) {
+ PyErr_SetString(PyExc_OverflowError, "math range error");
+ goto exit;
+ }
+ else {
+ return_value = PyComplex_FromCComplex(_return_value);
+ }
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(cmath_asinh__doc__,
+"asinh($module, z, /)\n"
+"--\n"
+"\n"
+"Return the inverse hyperbolic sine of z.");
+
+#define CMATH_ASINH_METHODDEF \
+ {"asinh", (PyCFunction)cmath_asinh, METH_O, cmath_asinh__doc__},
+
+static Py_complex
+cmath_asinh_impl(PyModuleDef *module, Py_complex z);
+
+static PyObject *
+cmath_asinh(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_complex z;
+ Py_complex _return_value;
+
+ if (!PyArg_Parse(arg, "D:asinh", &z))
+ goto exit;
+ /* modifications for z */
+ errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
+ _return_value = cmath_asinh_impl(module, z);
+ PyFPE_END_PROTECT(_return_value);
+ if (errno == EDOM) {
+ PyErr_SetString(PyExc_ValueError, "math domain error");
+ goto exit;
+ }
+ else if (errno == ERANGE) {
+ PyErr_SetString(PyExc_OverflowError, "math range error");
+ goto exit;
+ }
+ else {
+ return_value = PyComplex_FromCComplex(_return_value);
+ }
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(cmath_atan__doc__,
+"atan($module, z, /)\n"
+"--\n"
+"\n"
+"Return the arc tangent of z.");
+
+#define CMATH_ATAN_METHODDEF \
+ {"atan", (PyCFunction)cmath_atan, METH_O, cmath_atan__doc__},
+
+static Py_complex
+cmath_atan_impl(PyModuleDef *module, Py_complex z);
+
+static PyObject *
+cmath_atan(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_complex z;
+ Py_complex _return_value;
+
+ if (!PyArg_Parse(arg, "D:atan", &z))
+ goto exit;
+ /* modifications for z */
+ errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
+ _return_value = cmath_atan_impl(module, z);
+ PyFPE_END_PROTECT(_return_value);
+ if (errno == EDOM) {
+ PyErr_SetString(PyExc_ValueError, "math domain error");
+ goto exit;
+ }
+ else if (errno == ERANGE) {
+ PyErr_SetString(PyExc_OverflowError, "math range error");
+ goto exit;
+ }
+ else {
+ return_value = PyComplex_FromCComplex(_return_value);
+ }
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(cmath_atanh__doc__,
+"atanh($module, z, /)\n"
+"--\n"
+"\n"
+"Return the inverse hyperbolic tangent of z.");
+
+#define CMATH_ATANH_METHODDEF \
+ {"atanh", (PyCFunction)cmath_atanh, METH_O, cmath_atanh__doc__},
+
+static Py_complex
+cmath_atanh_impl(PyModuleDef *module, Py_complex z);
+
+static PyObject *
+cmath_atanh(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_complex z;
+ Py_complex _return_value;
+
+ if (!PyArg_Parse(arg, "D:atanh", &z))
+ goto exit;
+ /* modifications for z */
+ errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
+ _return_value = cmath_atanh_impl(module, z);
+ PyFPE_END_PROTECT(_return_value);
+ if (errno == EDOM) {
+ PyErr_SetString(PyExc_ValueError, "math domain error");
+ goto exit;
+ }
+ else if (errno == ERANGE) {
+ PyErr_SetString(PyExc_OverflowError, "math range error");
+ goto exit;
+ }
+ else {
+ return_value = PyComplex_FromCComplex(_return_value);
+ }
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(cmath_cos__doc__,
+"cos($module, z, /)\n"
+"--\n"
+"\n"
+"Return the cosine of z.");
+
+#define CMATH_COS_METHODDEF \
+ {"cos", (PyCFunction)cmath_cos, METH_O, cmath_cos__doc__},
+
+static Py_complex
+cmath_cos_impl(PyModuleDef *module, Py_complex z);
+
+static PyObject *
+cmath_cos(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_complex z;
+ Py_complex _return_value;
+
+ if (!PyArg_Parse(arg, "D:cos", &z))
+ goto exit;
+ /* modifications for z */
+ errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
+ _return_value = cmath_cos_impl(module, z);
+ PyFPE_END_PROTECT(_return_value);
+ if (errno == EDOM) {
+ PyErr_SetString(PyExc_ValueError, "math domain error");
+ goto exit;
+ }
+ else if (errno == ERANGE) {
+ PyErr_SetString(PyExc_OverflowError, "math range error");
+ goto exit;
+ }
+ else {
+ return_value = PyComplex_FromCComplex(_return_value);
+ }
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(cmath_cosh__doc__,
+"cosh($module, z, /)\n"
+"--\n"
+"\n"
+"Return the hyperbolic cosine of z.");
+
+#define CMATH_COSH_METHODDEF \
+ {"cosh", (PyCFunction)cmath_cosh, METH_O, cmath_cosh__doc__},
+
+static Py_complex
+cmath_cosh_impl(PyModuleDef *module, Py_complex z);
+
+static PyObject *
+cmath_cosh(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_complex z;
+ Py_complex _return_value;
+
+ if (!PyArg_Parse(arg, "D:cosh", &z))
+ goto exit;
+ /* modifications for z */
+ errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
+ _return_value = cmath_cosh_impl(module, z);
+ PyFPE_END_PROTECT(_return_value);
+ if (errno == EDOM) {
+ PyErr_SetString(PyExc_ValueError, "math domain error");
+ goto exit;
+ }
+ else if (errno == ERANGE) {
+ PyErr_SetString(PyExc_OverflowError, "math range error");
+ goto exit;
+ }
+ else {
+ return_value = PyComplex_FromCComplex(_return_value);
+ }
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(cmath_exp__doc__,
+"exp($module, z, /)\n"
+"--\n"
+"\n"
+"Return the exponential value e**z.");
+
+#define CMATH_EXP_METHODDEF \
+ {"exp", (PyCFunction)cmath_exp, METH_O, cmath_exp__doc__},
+
+static Py_complex
+cmath_exp_impl(PyModuleDef *module, Py_complex z);
+
+static PyObject *
+cmath_exp(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_complex z;
+ Py_complex _return_value;
+
+ if (!PyArg_Parse(arg, "D:exp", &z))
+ goto exit;
+ /* modifications for z */
+ errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
+ _return_value = cmath_exp_impl(module, z);
+ PyFPE_END_PROTECT(_return_value);
+ if (errno == EDOM) {
+ PyErr_SetString(PyExc_ValueError, "math domain error");
+ goto exit;
+ }
+ else if (errno == ERANGE) {
+ PyErr_SetString(PyExc_OverflowError, "math range error");
+ goto exit;
+ }
+ else {
+ return_value = PyComplex_FromCComplex(_return_value);
+ }
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(cmath_log10__doc__,
+"log10($module, z, /)\n"
+"--\n"
+"\n"
+"Return the base-10 logarithm of z.");
+
+#define CMATH_LOG10_METHODDEF \
+ {"log10", (PyCFunction)cmath_log10, METH_O, cmath_log10__doc__},
+
+static Py_complex
+cmath_log10_impl(PyModuleDef *module, Py_complex z);
+
+static PyObject *
+cmath_log10(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_complex z;
+ Py_complex _return_value;
+
+ if (!PyArg_Parse(arg, "D:log10", &z))
+ goto exit;
+ /* modifications for z */
+ errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
+ _return_value = cmath_log10_impl(module, z);
+ PyFPE_END_PROTECT(_return_value);
+ if (errno == EDOM) {
+ PyErr_SetString(PyExc_ValueError, "math domain error");
+ goto exit;
+ }
+ else if (errno == ERANGE) {
+ PyErr_SetString(PyExc_OverflowError, "math range error");
+ goto exit;
+ }
+ else {
+ return_value = PyComplex_FromCComplex(_return_value);
+ }
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(cmath_sin__doc__,
+"sin($module, z, /)\n"
+"--\n"
+"\n"
+"Return the sine of z.");
+
+#define CMATH_SIN_METHODDEF \
+ {"sin", (PyCFunction)cmath_sin, METH_O, cmath_sin__doc__},
+
+static Py_complex
+cmath_sin_impl(PyModuleDef *module, Py_complex z);
+
+static PyObject *
+cmath_sin(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_complex z;
+ Py_complex _return_value;
+
+ if (!PyArg_Parse(arg, "D:sin", &z))
+ goto exit;
+ /* modifications for z */
+ errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
+ _return_value = cmath_sin_impl(module, z);
+ PyFPE_END_PROTECT(_return_value);
+ if (errno == EDOM) {
+ PyErr_SetString(PyExc_ValueError, "math domain error");
+ goto exit;
+ }
+ else if (errno == ERANGE) {
+ PyErr_SetString(PyExc_OverflowError, "math range error");
+ goto exit;
+ }
+ else {
+ return_value = PyComplex_FromCComplex(_return_value);
+ }
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(cmath_sinh__doc__,
+"sinh($module, z, /)\n"
+"--\n"
+"\n"
+"Return the hyperbolic sine of z.");
+
+#define CMATH_SINH_METHODDEF \
+ {"sinh", (PyCFunction)cmath_sinh, METH_O, cmath_sinh__doc__},
+
+static Py_complex
+cmath_sinh_impl(PyModuleDef *module, Py_complex z);
+
+static PyObject *
+cmath_sinh(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_complex z;
+ Py_complex _return_value;
+
+ if (!PyArg_Parse(arg, "D:sinh", &z))
+ goto exit;
+ /* modifications for z */
+ errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
+ _return_value = cmath_sinh_impl(module, z);
+ PyFPE_END_PROTECT(_return_value);
+ if (errno == EDOM) {
+ PyErr_SetString(PyExc_ValueError, "math domain error");
+ goto exit;
+ }
+ else if (errno == ERANGE) {
+ PyErr_SetString(PyExc_OverflowError, "math range error");
+ goto exit;
+ }
+ else {
+ return_value = PyComplex_FromCComplex(_return_value);
+ }
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(cmath_sqrt__doc__,
+"sqrt($module, z, /)\n"
+"--\n"
+"\n"
+"Return the square root of z.");
+
+#define CMATH_SQRT_METHODDEF \
+ {"sqrt", (PyCFunction)cmath_sqrt, METH_O, cmath_sqrt__doc__},
+
+static Py_complex
+cmath_sqrt_impl(PyModuleDef *module, Py_complex z);
+
+static PyObject *
+cmath_sqrt(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_complex z;
+ Py_complex _return_value;
+
+ if (!PyArg_Parse(arg, "D:sqrt", &z))
+ goto exit;
+ /* modifications for z */
+ errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
+ _return_value = cmath_sqrt_impl(module, z);
+ PyFPE_END_PROTECT(_return_value);
+ if (errno == EDOM) {
+ PyErr_SetString(PyExc_ValueError, "math domain error");
+ goto exit;
+ }
+ else if (errno == ERANGE) {
+ PyErr_SetString(PyExc_OverflowError, "math range error");
+ goto exit;
+ }
+ else {
+ return_value = PyComplex_FromCComplex(_return_value);
+ }
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(cmath_tan__doc__,
+"tan($module, z, /)\n"
+"--\n"
+"\n"
+"Return the tangent of z.");
+
+#define CMATH_TAN_METHODDEF \
+ {"tan", (PyCFunction)cmath_tan, METH_O, cmath_tan__doc__},
+
+static Py_complex
+cmath_tan_impl(PyModuleDef *module, Py_complex z);
+
+static PyObject *
+cmath_tan(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_complex z;
+ Py_complex _return_value;
+
+ if (!PyArg_Parse(arg, "D:tan", &z))
+ goto exit;
+ /* modifications for z */
+ errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
+ _return_value = cmath_tan_impl(module, z);
+ PyFPE_END_PROTECT(_return_value);
+ if (errno == EDOM) {
+ PyErr_SetString(PyExc_ValueError, "math domain error");
+ goto exit;
+ }
+ else if (errno == ERANGE) {
+ PyErr_SetString(PyExc_OverflowError, "math range error");
+ goto exit;
+ }
+ else {
+ return_value = PyComplex_FromCComplex(_return_value);
+ }
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(cmath_tanh__doc__,
+"tanh($module, z, /)\n"
+"--\n"
+"\n"
+"Return the hyperbolic tangent of z.");
+
+#define CMATH_TANH_METHODDEF \
+ {"tanh", (PyCFunction)cmath_tanh, METH_O, cmath_tanh__doc__},
+
+static Py_complex
+cmath_tanh_impl(PyModuleDef *module, Py_complex z);
+
+static PyObject *
+cmath_tanh(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_complex z;
+ Py_complex _return_value;
+
+ if (!PyArg_Parse(arg, "D:tanh", &z))
+ goto exit;
+ /* modifications for z */
+ errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
+ _return_value = cmath_tanh_impl(module, z);
+ PyFPE_END_PROTECT(_return_value);
+ if (errno == EDOM) {
+ PyErr_SetString(PyExc_ValueError, "math domain error");
+ goto exit;
+ }
+ else if (errno == ERANGE) {
+ PyErr_SetString(PyExc_OverflowError, "math range error");
+ goto exit;
+ }
+ else {
+ return_value = PyComplex_FromCComplex(_return_value);
+ }
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(cmath_log__doc__,
+"log($module, x, y_obj=None, /)\n"
+"--\n"
+"\n"
+"The logarithm of z to the given base.\n"
+"\n"
+"If the base not specified, returns the natural logarithm (base e) of z.");
+
+#define CMATH_LOG_METHODDEF \
+ {"log", (PyCFunction)cmath_log, METH_VARARGS, cmath_log__doc__},
+
+static PyObject *
+cmath_log_impl(PyModuleDef *module, Py_complex x, PyObject *y_obj);
+
+static PyObject *
+cmath_log(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_complex x;
+ PyObject *y_obj = NULL;
+
+ if (!PyArg_ParseTuple(args, "D|O:log",
+ &x, &y_obj))
+ goto exit;
+ return_value = cmath_log_impl(module, x, y_obj);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(cmath_phase__doc__,
+"phase($module, z, /)\n"
+"--\n"
+"\n"
+"Return argument, also known as the phase angle, of a complex.");
+
+#define CMATH_PHASE_METHODDEF \
+ {"phase", (PyCFunction)cmath_phase, METH_O, cmath_phase__doc__},
+
+static PyObject *
+cmath_phase_impl(PyModuleDef *module, Py_complex z);
+
+static PyObject *
+cmath_phase(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_complex z;
+
+ if (!PyArg_Parse(arg, "D:phase", &z))
+ goto exit;
+ return_value = cmath_phase_impl(module, z);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(cmath_polar__doc__,
+"polar($module, z, /)\n"
+"--\n"
+"\n"
+"Convert a complex from rectangular coordinates to polar coordinates.\n"
+"\n"
+"r is the distance from 0 and phi the phase angle.");
+
+#define CMATH_POLAR_METHODDEF \
+ {"polar", (PyCFunction)cmath_polar, METH_O, cmath_polar__doc__},
+
+static PyObject *
+cmath_polar_impl(PyModuleDef *module, Py_complex z);
+
+static PyObject *
+cmath_polar(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_complex z;
+
+ if (!PyArg_Parse(arg, "D:polar", &z))
+ goto exit;
+ return_value = cmath_polar_impl(module, z);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(cmath_rect__doc__,
+"rect($module, r, phi, /)\n"
+"--\n"
+"\n"
+"Convert from polar coordinates to rectangular coordinates.");
+
+#define CMATH_RECT_METHODDEF \
+ {"rect", (PyCFunction)cmath_rect, METH_VARARGS, cmath_rect__doc__},
+
+static PyObject *
+cmath_rect_impl(PyModuleDef *module, double r, double phi);
+
+static PyObject *
+cmath_rect(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ double r;
+ double phi;
+
+ if (!PyArg_ParseTuple(args, "dd:rect",
+ &r, &phi))
+ goto exit;
+ return_value = cmath_rect_impl(module, r, phi);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(cmath_isfinite__doc__,
+"isfinite($module, z, /)\n"
+"--\n"
+"\n"
+"Return True if both the real and imaginary parts of z are finite, else False.");
+
+#define CMATH_ISFINITE_METHODDEF \
+ {"isfinite", (PyCFunction)cmath_isfinite, METH_O, cmath_isfinite__doc__},
+
+static PyObject *
+cmath_isfinite_impl(PyModuleDef *module, Py_complex z);
+
+static PyObject *
+cmath_isfinite(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_complex z;
+
+ if (!PyArg_Parse(arg, "D:isfinite", &z))
+ goto exit;
+ return_value = cmath_isfinite_impl(module, z);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(cmath_isnan__doc__,
+"isnan($module, z, /)\n"
+"--\n"
+"\n"
+"Checks if the real or imaginary part of z not a number (NaN).");
+
+#define CMATH_ISNAN_METHODDEF \
+ {"isnan", (PyCFunction)cmath_isnan, METH_O, cmath_isnan__doc__},
+
+static PyObject *
+cmath_isnan_impl(PyModuleDef *module, Py_complex z);
+
+static PyObject *
+cmath_isnan(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_complex z;
+
+ if (!PyArg_Parse(arg, "D:isnan", &z))
+ goto exit;
+ return_value = cmath_isnan_impl(module, z);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(cmath_isinf__doc__,
+"isinf($module, z, /)\n"
+"--\n"
+"\n"
+"Checks if the real or imaginary part of z is infinite.");
+
+#define CMATH_ISINF_METHODDEF \
+ {"isinf", (PyCFunction)cmath_isinf, METH_O, cmath_isinf__doc__},
+
+static PyObject *
+cmath_isinf_impl(PyModuleDef *module, Py_complex z);
+
+static PyObject *
+cmath_isinf(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_complex z;
+
+ if (!PyArg_Parse(arg, "D:isinf", &z))
+ goto exit;
+ return_value = cmath_isinf_impl(module, z);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(cmath_isclose__doc__,
+"isclose($module, /, a, b, *, rel_tol=1e-09, abs_tol=0.0)\n"
+"--\n"
+"\n"
+"Determine whether two complex numbers are close in value.\n"
+"\n"
+" rel_tol\n"
+" maximum difference for being considered \"close\", relative to the\n"
+" magnitude of the input values\n"
+" abs_tol\n"
+" maximum difference for being considered \"close\", regardless of the\n"
+" magnitude of the input values\n"
+"\n"
+"Return True if a is close in value to b, and False otherwise.\n"
+"\n"
+"For the values to be considered close, the difference between them must be\n"
+"smaller than at least one of the tolerances.\n"
+"\n"
+"-inf, inf and NaN behave similarly to the IEEE 754 Standard. That is, NaN is\n"
+"not close to anything, even itself. inf and -inf are only close to themselves.");
+
+#define CMATH_ISCLOSE_METHODDEF \
+ {"isclose", (PyCFunction)cmath_isclose, METH_VARARGS|METH_KEYWORDS, cmath_isclose__doc__},
+
+static int
+cmath_isclose_impl(PyModuleDef *module, Py_complex a, Py_complex b,
+ double rel_tol, double abs_tol);
+
+static PyObject *
+cmath_isclose(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"a", "b", "rel_tol", "abs_tol", NULL};
+ Py_complex a;
+ Py_complex b;
+ double rel_tol = 1e-09;
+ double abs_tol = 0.0;
+ int _return_value;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "DD|$dd:isclose", _keywords,
+ &a, &b, &rel_tol, &abs_tol))
+ goto exit;
+ _return_value = cmath_isclose_impl(module, a, b, rel_tol, abs_tol);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyBool_FromLong((long)_return_value);
+
+exit:
+ return return_value;
+}
+/*[clinic end generated code: output=229e9c48c9d27362 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/fcntlmodule.c.h b/Modules/clinic/fcntlmodule.c.h
new file mode 100644
index 0000000000..d9a151797e
--- /dev/null
+++ b/Modules/clinic/fcntlmodule.c.h
@@ -0,0 +1,185 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(fcntl_fcntl__doc__,
+"fcntl($module, fd, cmd, arg=0, /)\n"
+"--\n"
+"\n"
+"Perform the operation `cmd` on file descriptor fd.\n"
+"\n"
+"The values used for `cmd` are operating system dependent, and are available\n"
+"as constants in the fcntl module, using the same names as used in\n"
+"the relevant C header files. The argument arg is optional, and\n"
+"defaults to 0; it may be an int or a string. If arg is given as a string,\n"
+"the return value of fcntl is a string of that length, containing the\n"
+"resulting value put in the arg buffer by the operating system. The length\n"
+"of the arg string is not allowed to exceed 1024 bytes. If the arg given\n"
+"is an integer or if none is specified, the result value is an integer\n"
+"corresponding to the return value of the fcntl call in the C code.");
+
+#define FCNTL_FCNTL_METHODDEF \
+ {"fcntl", (PyCFunction)fcntl_fcntl, METH_VARARGS, fcntl_fcntl__doc__},
+
+static PyObject *
+fcntl_fcntl_impl(PyModuleDef *module, int fd, int code, PyObject *arg);
+
+static PyObject *
+fcntl_fcntl(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int fd;
+ int code;
+ PyObject *arg = NULL;
+
+ if (!PyArg_ParseTuple(args, "O&i|O:fcntl",
+ conv_descriptor, &fd, &code, &arg))
+ goto exit;
+ return_value = fcntl_fcntl_impl(module, fd, code, arg);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(fcntl_ioctl__doc__,
+"ioctl($module, fd, request, arg=0, mutate_flag=True, /)\n"
+"--\n"
+"\n"
+"Perform the operation `request` on file descriptor `fd`.\n"
+"\n"
+"The values used for `request` are operating system dependent, and are available\n"
+"as constants in the fcntl or termios library modules, using the same names as\n"
+"used in the relevant C header files.\n"
+"\n"
+"The argument `arg` is optional, and defaults to 0; it may be an int or a\n"
+"buffer containing character data (most likely a string or an array).\n"
+"\n"
+"If the argument is a mutable buffer (such as an array) and if the\n"
+"mutate_flag argument (which is only allowed in this case) is true then the\n"
+"buffer is (in effect) passed to the operating system and changes made by\n"
+"the OS will be reflected in the contents of the buffer after the call has\n"
+"returned. The return value is the integer returned by the ioctl system\n"
+"call.\n"
+"\n"
+"If the argument is a mutable buffer and the mutable_flag argument is false,\n"
+"the behavior is as if a string had been passed.\n"
+"\n"
+"If the argument is an immutable buffer (most likely a string) then a copy\n"
+"of the buffer is passed to the operating system and the return value is a\n"
+"string of the same length containing whatever the operating system put in\n"
+"the buffer. The length of the arg buffer in this case is not allowed to\n"
+"exceed 1024 bytes.\n"
+"\n"
+"If the arg given is an integer or if none is specified, the result value is\n"
+"an integer corresponding to the return value of the ioctl call in the C\n"
+"code.");
+
+#define FCNTL_IOCTL_METHODDEF \
+ {"ioctl", (PyCFunction)fcntl_ioctl, METH_VARARGS, fcntl_ioctl__doc__},
+
+static PyObject *
+fcntl_ioctl_impl(PyModuleDef *module, int fd, unsigned int code,
+ PyObject *ob_arg, int mutate_arg);
+
+static PyObject *
+fcntl_ioctl(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int fd;
+ unsigned int code;
+ PyObject *ob_arg = NULL;
+ int mutate_arg = 1;
+
+ if (!PyArg_ParseTuple(args, "O&I|Op:ioctl",
+ conv_descriptor, &fd, &code, &ob_arg, &mutate_arg))
+ goto exit;
+ return_value = fcntl_ioctl_impl(module, fd, code, ob_arg, mutate_arg);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(fcntl_flock__doc__,
+"flock($module, fd, operation, /)\n"
+"--\n"
+"\n"
+"Perform the lock operation `operation` on file descriptor `fd`.\n"
+"\n"
+"See the Unix manual page for flock(2) for details (On some systems, this\n"
+"function is emulated using fcntl()).");
+
+#define FCNTL_FLOCK_METHODDEF \
+ {"flock", (PyCFunction)fcntl_flock, METH_VARARGS, fcntl_flock__doc__},
+
+static PyObject *
+fcntl_flock_impl(PyModuleDef *module, int fd, int code);
+
+static PyObject *
+fcntl_flock(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int fd;
+ int code;
+
+ if (!PyArg_ParseTuple(args, "O&i:flock",
+ conv_descriptor, &fd, &code))
+ goto exit;
+ return_value = fcntl_flock_impl(module, fd, code);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(fcntl_lockf__doc__,
+"lockf($module, fd, cmd, len=0, start=0, whence=0, /)\n"
+"--\n"
+"\n"
+"A wrapper around the fcntl() locking calls.\n"
+"\n"
+"`fd` is the file descriptor of the file to lock or unlock, and operation is one\n"
+"of the following values:\n"
+"\n"
+" LOCK_UN - unlock\n"
+" LOCK_SH - acquire a shared lock\n"
+" LOCK_EX - acquire an exclusive lock\n"
+"\n"
+"When operation is LOCK_SH or LOCK_EX, it can also be bitwise ORed with\n"
+"LOCK_NB to avoid blocking on lock acquisition. If LOCK_NB is used and the\n"
+"lock cannot be acquired, an OSError will be raised and the exception will\n"
+"have an errno attribute set to EACCES or EAGAIN (depending on the operating\n"
+"system -- for portability, check for either value).\n"
+"\n"
+"`len` is the number of bytes to lock, with the default meaning to lock to\n"
+"EOF. `start` is the byte offset, relative to `whence`, to that the lock\n"
+"starts. `whence` is as with fileobj.seek(), specifically:\n"
+"\n"
+" 0 - relative to the start of the file (SEEK_SET)\n"
+" 1 - relative to the current buffer position (SEEK_CUR)\n"
+" 2 - relative to the end of the file (SEEK_END)");
+
+#define FCNTL_LOCKF_METHODDEF \
+ {"lockf", (PyCFunction)fcntl_lockf, METH_VARARGS, fcntl_lockf__doc__},
+
+static PyObject *
+fcntl_lockf_impl(PyModuleDef *module, int fd, int code, PyObject *lenobj,
+ PyObject *startobj, int whence);
+
+static PyObject *
+fcntl_lockf(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int fd;
+ int code;
+ PyObject *lenobj = NULL;
+ PyObject *startobj = NULL;
+ int whence = 0;
+
+ if (!PyArg_ParseTuple(args, "O&i|OOi:lockf",
+ conv_descriptor, &fd, &code, &lenobj, &startobj, &whence))
+ goto exit;
+ return_value = fcntl_lockf_impl(module, fd, code, lenobj, startobj, whence);
+
+exit:
+ return return_value;
+}
+/*[clinic end generated code: output=b7d6e8fc2ad09c48 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/grpmodule.c.h b/Modules/clinic/grpmodule.c.h
new file mode 100644
index 0000000000..eb5b59d29b
--- /dev/null
+++ b/Modules/clinic/grpmodule.c.h
@@ -0,0 +1,85 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(grp_getgrgid__doc__,
+"getgrgid($module, /, id)\n"
+"--\n"
+"\n"
+"Return the group database entry for the given numeric group ID.\n"
+"\n"
+"If id is not valid, raise KeyError.");
+
+#define GRP_GETGRGID_METHODDEF \
+ {"getgrgid", (PyCFunction)grp_getgrgid, METH_VARARGS|METH_KEYWORDS, grp_getgrgid__doc__},
+
+static PyObject *
+grp_getgrgid_impl(PyModuleDef *module, PyObject *id);
+
+static PyObject *
+grp_getgrgid(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"id", NULL};
+ PyObject *id;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:getgrgid", _keywords,
+ &id))
+ goto exit;
+ return_value = grp_getgrgid_impl(module, id);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(grp_getgrnam__doc__,
+"getgrnam($module, /, name)\n"
+"--\n"
+"\n"
+"Return the group database entry for the given group name.\n"
+"\n"
+"If name is not valid, raise KeyError.");
+
+#define GRP_GETGRNAM_METHODDEF \
+ {"getgrnam", (PyCFunction)grp_getgrnam, METH_VARARGS|METH_KEYWORDS, grp_getgrnam__doc__},
+
+static PyObject *
+grp_getgrnam_impl(PyModuleDef *module, PyObject *name);
+
+static PyObject *
+grp_getgrnam(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"name", NULL};
+ PyObject *name;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "U:getgrnam", _keywords,
+ &name))
+ goto exit;
+ return_value = grp_getgrnam_impl(module, name);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(grp_getgrall__doc__,
+"getgrall($module, /)\n"
+"--\n"
+"\n"
+"Return a list of all available group entries, in arbitrary order.\n"
+"\n"
+"An entry whose name starts with \'+\' or \'-\' represents an instruction\n"
+"to use YP/NIS and may not be accessible via getgrnam or getgrgid.");
+
+#define GRP_GETGRALL_METHODDEF \
+ {"getgrall", (PyCFunction)grp_getgrall, METH_NOARGS, grp_getgrall__doc__},
+
+static PyObject *
+grp_getgrall_impl(PyModuleDef *module);
+
+static PyObject *
+grp_getgrall(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return grp_getgrall_impl(module);
+}
+/*[clinic end generated code: output=5191c25600afb1bd input=a9049054013a1b77]*/
diff --git a/Modules/clinic/md5module.c.h b/Modules/clinic/md5module.c.h
new file mode 100644
index 0000000000..f5a3117f10
--- /dev/null
+++ b/Modules/clinic/md5module.c.h
@@ -0,0 +1,95 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(MD5Type_copy__doc__,
+"copy($self, /)\n"
+"--\n"
+"\n"
+"Return a copy of the hash object.");
+
+#define MD5TYPE_COPY_METHODDEF \
+ {"copy", (PyCFunction)MD5Type_copy, METH_NOARGS, MD5Type_copy__doc__},
+
+static PyObject *
+MD5Type_copy_impl(MD5object *self);
+
+static PyObject *
+MD5Type_copy(MD5object *self, PyObject *Py_UNUSED(ignored))
+{
+ return MD5Type_copy_impl(self);
+}
+
+PyDoc_STRVAR(MD5Type_digest__doc__,
+"digest($self, /)\n"
+"--\n"
+"\n"
+"Return the digest value as a string of binary data.");
+
+#define MD5TYPE_DIGEST_METHODDEF \
+ {"digest", (PyCFunction)MD5Type_digest, METH_NOARGS, MD5Type_digest__doc__},
+
+static PyObject *
+MD5Type_digest_impl(MD5object *self);
+
+static PyObject *
+MD5Type_digest(MD5object *self, PyObject *Py_UNUSED(ignored))
+{
+ return MD5Type_digest_impl(self);
+}
+
+PyDoc_STRVAR(MD5Type_hexdigest__doc__,
+"hexdigest($self, /)\n"
+"--\n"
+"\n"
+"Return the digest value as a string of hexadecimal digits.");
+
+#define MD5TYPE_HEXDIGEST_METHODDEF \
+ {"hexdigest", (PyCFunction)MD5Type_hexdigest, METH_NOARGS, MD5Type_hexdigest__doc__},
+
+static PyObject *
+MD5Type_hexdigest_impl(MD5object *self);
+
+static PyObject *
+MD5Type_hexdigest(MD5object *self, PyObject *Py_UNUSED(ignored))
+{
+ return MD5Type_hexdigest_impl(self);
+}
+
+PyDoc_STRVAR(MD5Type_update__doc__,
+"update($self, obj, /)\n"
+"--\n"
+"\n"
+"Update this hash object\'s state with the provided string.");
+
+#define MD5TYPE_UPDATE_METHODDEF \
+ {"update", (PyCFunction)MD5Type_update, METH_O, MD5Type_update__doc__},
+
+PyDoc_STRVAR(_md5_md5__doc__,
+"md5($module, /, string=b\'\')\n"
+"--\n"
+"\n"
+"Return a new MD5 hash object; optionally initialized with a string.");
+
+#define _MD5_MD5_METHODDEF \
+ {"md5", (PyCFunction)_md5_md5, METH_VARARGS|METH_KEYWORDS, _md5_md5__doc__},
+
+static PyObject *
+_md5_md5_impl(PyModuleDef *module, PyObject *string);
+
+static PyObject *
+_md5_md5(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"string", NULL};
+ PyObject *string = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:md5", _keywords,
+ &string))
+ goto exit;
+ return_value = _md5_md5_impl(module, string);
+
+exit:
+ return return_value;
+}
+/*[clinic end generated code: output=0f803ded701aca54 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/posixmodule.c.h b/Modules/clinic/posixmodule.c.h
new file mode 100644
index 0000000000..9ef702a297
--- /dev/null
+++ b/Modules/clinic/posixmodule.c.h
@@ -0,0 +1,5791 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(os_stat__doc__,
+"stat($module, /, path, *, dir_fd=None, follow_symlinks=True)\n"
+"--\n"
+"\n"
+"Perform a stat system call on the given path.\n"
+"\n"
+" path\n"
+" Path to be examined; can be string, bytes, or open-file-descriptor int.\n"
+" dir_fd\n"
+" If not None, it should be a file descriptor open to a directory,\n"
+" and path should be a relative string; path will then be relative to\n"
+" that directory.\n"
+" follow_symlinks\n"
+" If False, and the last element of the path is a symbolic link,\n"
+" stat will examine the symbolic link itself instead of the file\n"
+" the link points to.\n"
+"\n"
+"dir_fd and follow_symlinks may not be implemented\n"
+" on your platform. If they are unavailable, using them will raise a\n"
+" NotImplementedError.\n"
+"\n"
+"It\'s an error to use dir_fd or follow_symlinks when specifying path as\n"
+" an open file descriptor.");
+
+#define OS_STAT_METHODDEF \
+ {"stat", (PyCFunction)os_stat, METH_VARARGS|METH_KEYWORDS, os_stat__doc__},
+
+static PyObject *
+os_stat_impl(PyModuleDef *module, path_t *path, int dir_fd,
+ int follow_symlinks);
+
+static PyObject *
+os_stat(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", "dir_fd", "follow_symlinks", NULL};
+ path_t path = PATH_T_INITIALIZE("stat", "path", 0, 1);
+ int dir_fd = DEFAULT_DIR_FD;
+ int follow_symlinks = 1;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&|$O&p:stat", _keywords,
+ path_converter, &path, FSTATAT_DIR_FD_CONVERTER, &dir_fd, &follow_symlinks))
+ goto exit;
+ return_value = os_stat_impl(module, &path, dir_fd, follow_symlinks);
+
+exit:
+ /* Cleanup for path */
+ path_cleanup(&path);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(os_lstat__doc__,
+"lstat($module, /, path, *, dir_fd=None)\n"
+"--\n"
+"\n"
+"Perform a stat system call on the given path, without following symbolic links.\n"
+"\n"
+"Like stat(), but do not follow symbolic links.\n"
+"Equivalent to stat(path, follow_symlinks=False).");
+
+#define OS_LSTAT_METHODDEF \
+ {"lstat", (PyCFunction)os_lstat, METH_VARARGS|METH_KEYWORDS, os_lstat__doc__},
+
+static PyObject *
+os_lstat_impl(PyModuleDef *module, path_t *path, int dir_fd);
+
+static PyObject *
+os_lstat(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", "dir_fd", NULL};
+ path_t path = PATH_T_INITIALIZE("lstat", "path", 0, 0);
+ int dir_fd = DEFAULT_DIR_FD;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&|$O&:lstat", _keywords,
+ path_converter, &path, FSTATAT_DIR_FD_CONVERTER, &dir_fd))
+ goto exit;
+ return_value = os_lstat_impl(module, &path, dir_fd);
+
+exit:
+ /* Cleanup for path */
+ path_cleanup(&path);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(os_access__doc__,
+"access($module, /, path, mode, *, dir_fd=None, effective_ids=False,\n"
+" follow_symlinks=True)\n"
+"--\n"
+"\n"
+"Use the real uid/gid to test for access to a path.\n"
+"\n"
+" path\n"
+" Path to be tested; can be string, bytes, or open-file-descriptor int.\n"
+" mode\n"
+" Operating-system mode bitfield. Can be F_OK to test existence,\n"
+" or the inclusive-OR of R_OK, W_OK, and X_OK.\n"
+" dir_fd\n"
+" If not None, it should be a file descriptor open to a directory,\n"
+" and path should be relative; path will then be relative to that\n"
+" directory.\n"
+" effective_ids\n"
+" If True, access will use the effective uid/gid instead of\n"
+" the real uid/gid.\n"
+" follow_symlinks\n"
+" If False, and the last element of the path is a symbolic link,\n"
+" access will examine the symbolic link itself instead of the file\n"
+" the link points to.\n"
+"\n"
+"dir_fd, effective_ids, and follow_symlinks may not be implemented\n"
+" on your platform. If they are unavailable, using them will raise a\n"
+" NotImplementedError.\n"
+"\n"
+"Note that most operations will use the effective uid/gid, therefore this\n"
+" routine can be used in a suid/sgid environment to test if the invoking user\n"
+" has the specified access to the path.");
+
+#define OS_ACCESS_METHODDEF \
+ {"access", (PyCFunction)os_access, METH_VARARGS|METH_KEYWORDS, os_access__doc__},
+
+static int
+os_access_impl(PyModuleDef *module, path_t *path, int mode, int dir_fd,
+ int effective_ids, int follow_symlinks);
+
+static PyObject *
+os_access(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", "mode", "dir_fd", "effective_ids", "follow_symlinks", NULL};
+ path_t path = PATH_T_INITIALIZE("access", "path", 0, 1);
+ int mode;
+ int dir_fd = DEFAULT_DIR_FD;
+ int effective_ids = 0;
+ int follow_symlinks = 1;
+ int _return_value;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&i|$O&pp:access", _keywords,
+ path_converter, &path, &mode, FACCESSAT_DIR_FD_CONVERTER, &dir_fd, &effective_ids, &follow_symlinks))
+ goto exit;
+ _return_value = os_access_impl(module, &path, mode, dir_fd, effective_ids, follow_symlinks);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyBool_FromLong((long)_return_value);
+
+exit:
+ /* Cleanup for path */
+ path_cleanup(&path);
+
+ return return_value;
+}
+
+#if defined(HAVE_TTYNAME)
+
+PyDoc_STRVAR(os_ttyname__doc__,
+"ttyname($module, fd, /)\n"
+"--\n"
+"\n"
+"Return the name of the terminal device connected to \'fd\'.\n"
+"\n"
+" fd\n"
+" Integer file descriptor handle.");
+
+#define OS_TTYNAME_METHODDEF \
+ {"ttyname", (PyCFunction)os_ttyname, METH_O, os_ttyname__doc__},
+
+static char *
+os_ttyname_impl(PyModuleDef *module, int fd);
+
+static PyObject *
+os_ttyname(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int fd;
+ char *_return_value;
+
+ if (!PyArg_Parse(arg, "i:ttyname", &fd))
+ goto exit;
+ _return_value = os_ttyname_impl(module, fd);
+ if (_return_value == NULL)
+ goto exit;
+ return_value = PyUnicode_DecodeFSDefault(_return_value);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_TTYNAME) */
+
+#if defined(HAVE_CTERMID)
+
+PyDoc_STRVAR(os_ctermid__doc__,
+"ctermid($module, /)\n"
+"--\n"
+"\n"
+"Return the name of the controlling terminal for this process.");
+
+#define OS_CTERMID_METHODDEF \
+ {"ctermid", (PyCFunction)os_ctermid, METH_NOARGS, os_ctermid__doc__},
+
+static PyObject *
+os_ctermid_impl(PyModuleDef *module);
+
+static PyObject *
+os_ctermid(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return os_ctermid_impl(module);
+}
+
+#endif /* defined(HAVE_CTERMID) */
+
+PyDoc_STRVAR(os_chdir__doc__,
+"chdir($module, /, path)\n"
+"--\n"
+"\n"
+"Change the current working directory to the specified path.\n"
+"\n"
+"path may always be specified as a string.\n"
+"On some platforms, path may also be specified as an open file descriptor.\n"
+" If this functionality is unavailable, using it raises an exception.");
+
+#define OS_CHDIR_METHODDEF \
+ {"chdir", (PyCFunction)os_chdir, METH_VARARGS|METH_KEYWORDS, os_chdir__doc__},
+
+static PyObject *
+os_chdir_impl(PyModuleDef *module, path_t *path);
+
+static PyObject *
+os_chdir(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", NULL};
+ path_t path = PATH_T_INITIALIZE("chdir", "path", 0, PATH_HAVE_FCHDIR);
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&:chdir", _keywords,
+ path_converter, &path))
+ goto exit;
+ return_value = os_chdir_impl(module, &path);
+
+exit:
+ /* Cleanup for path */
+ path_cleanup(&path);
+
+ return return_value;
+}
+
+#if defined(HAVE_FCHDIR)
+
+PyDoc_STRVAR(os_fchdir__doc__,
+"fchdir($module, /, fd)\n"
+"--\n"
+"\n"
+"Change to the directory of the given file descriptor.\n"
+"\n"
+"fd must be opened on a directory, not a file.\n"
+"Equivalent to os.chdir(fd).");
+
+#define OS_FCHDIR_METHODDEF \
+ {"fchdir", (PyCFunction)os_fchdir, METH_VARARGS|METH_KEYWORDS, os_fchdir__doc__},
+
+static PyObject *
+os_fchdir_impl(PyModuleDef *module, int fd);
+
+static PyObject *
+os_fchdir(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"fd", NULL};
+ int fd;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&:fchdir", _keywords,
+ fildes_converter, &fd))
+ goto exit;
+ return_value = os_fchdir_impl(module, fd);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_FCHDIR) */
+
+PyDoc_STRVAR(os_chmod__doc__,
+"chmod($module, /, path, mode, *, dir_fd=None, follow_symlinks=True)\n"
+"--\n"
+"\n"
+"Change the access permissions of a file.\n"
+"\n"
+" path\n"
+" Path to be modified. May always be specified as a str or bytes.\n"
+" On some platforms, path may also be specified as an open file descriptor.\n"
+" If this functionality is unavailable, using it raises an exception.\n"
+" mode\n"
+" Operating-system mode bitfield.\n"
+" dir_fd\n"
+" If not None, it should be a file descriptor open to a directory,\n"
+" and path should be relative; path will then be relative to that\n"
+" directory.\n"
+" follow_symlinks\n"
+" If False, and the last element of the path is a symbolic link,\n"
+" chmod will modify the symbolic link itself instead of the file\n"
+" the link points to.\n"
+"\n"
+"It is an error to use dir_fd or follow_symlinks when specifying path as\n"
+" an open file descriptor.\n"
+"dir_fd and follow_symlinks may not be implemented on your platform.\n"
+" If they are unavailable, using them will raise a NotImplementedError.");
+
+#define OS_CHMOD_METHODDEF \
+ {"chmod", (PyCFunction)os_chmod, METH_VARARGS|METH_KEYWORDS, os_chmod__doc__},
+
+static PyObject *
+os_chmod_impl(PyModuleDef *module, path_t *path, int mode, int dir_fd,
+ int follow_symlinks);
+
+static PyObject *
+os_chmod(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", "mode", "dir_fd", "follow_symlinks", NULL};
+ path_t path = PATH_T_INITIALIZE("chmod", "path", 0, PATH_HAVE_FCHMOD);
+ int mode;
+ int dir_fd = DEFAULT_DIR_FD;
+ int follow_symlinks = 1;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&i|$O&p:chmod", _keywords,
+ path_converter, &path, &mode, FCHMODAT_DIR_FD_CONVERTER, &dir_fd, &follow_symlinks))
+ goto exit;
+ return_value = os_chmod_impl(module, &path, mode, dir_fd, follow_symlinks);
+
+exit:
+ /* Cleanup for path */
+ path_cleanup(&path);
+
+ return return_value;
+}
+
+#if defined(HAVE_FCHMOD)
+
+PyDoc_STRVAR(os_fchmod__doc__,
+"fchmod($module, /, fd, mode)\n"
+"--\n"
+"\n"
+"Change the access permissions of the file given by file descriptor fd.\n"
+"\n"
+"Equivalent to os.chmod(fd, mode).");
+
+#define OS_FCHMOD_METHODDEF \
+ {"fchmod", (PyCFunction)os_fchmod, METH_VARARGS|METH_KEYWORDS, os_fchmod__doc__},
+
+static PyObject *
+os_fchmod_impl(PyModuleDef *module, int fd, int mode);
+
+static PyObject *
+os_fchmod(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"fd", "mode", NULL};
+ int fd;
+ int mode;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ii:fchmod", _keywords,
+ &fd, &mode))
+ goto exit;
+ return_value = os_fchmod_impl(module, fd, mode);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_FCHMOD) */
+
+#if defined(HAVE_LCHMOD)
+
+PyDoc_STRVAR(os_lchmod__doc__,
+"lchmod($module, /, path, mode)\n"
+"--\n"
+"\n"
+"Change the access permissions of a file, without following symbolic links.\n"
+"\n"
+"If path is a symlink, this affects the link itself rather than the target.\n"
+"Equivalent to chmod(path, mode, follow_symlinks=False).\"");
+
+#define OS_LCHMOD_METHODDEF \
+ {"lchmod", (PyCFunction)os_lchmod, METH_VARARGS|METH_KEYWORDS, os_lchmod__doc__},
+
+static PyObject *
+os_lchmod_impl(PyModuleDef *module, path_t *path, int mode);
+
+static PyObject *
+os_lchmod(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", "mode", NULL};
+ path_t path = PATH_T_INITIALIZE("lchmod", "path", 0, 0);
+ int mode;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&i:lchmod", _keywords,
+ path_converter, &path, &mode))
+ goto exit;
+ return_value = os_lchmod_impl(module, &path, mode);
+
+exit:
+ /* Cleanup for path */
+ path_cleanup(&path);
+
+ return return_value;
+}
+
+#endif /* defined(HAVE_LCHMOD) */
+
+#if defined(HAVE_CHFLAGS)
+
+PyDoc_STRVAR(os_chflags__doc__,
+"chflags($module, /, path, flags, follow_symlinks=True)\n"
+"--\n"
+"\n"
+"Set file flags.\n"
+"\n"
+"If follow_symlinks is False, and the last element of the path is a symbolic\n"
+" link, chflags will change flags on the symbolic link itself instead of the\n"
+" file the link points to.\n"
+"follow_symlinks may not be implemented on your platform. If it is\n"
+"unavailable, using it will raise a NotImplementedError.");
+
+#define OS_CHFLAGS_METHODDEF \
+ {"chflags", (PyCFunction)os_chflags, METH_VARARGS|METH_KEYWORDS, os_chflags__doc__},
+
+static PyObject *
+os_chflags_impl(PyModuleDef *module, path_t *path, unsigned long flags,
+ int follow_symlinks);
+
+static PyObject *
+os_chflags(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", "flags", "follow_symlinks", NULL};
+ path_t path = PATH_T_INITIALIZE("chflags", "path", 0, 0);
+ unsigned long flags;
+ int follow_symlinks = 1;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&k|p:chflags", _keywords,
+ path_converter, &path, &flags, &follow_symlinks))
+ goto exit;
+ return_value = os_chflags_impl(module, &path, flags, follow_symlinks);
+
+exit:
+ /* Cleanup for path */
+ path_cleanup(&path);
+
+ return return_value;
+}
+
+#endif /* defined(HAVE_CHFLAGS) */
+
+#if defined(HAVE_LCHFLAGS)
+
+PyDoc_STRVAR(os_lchflags__doc__,
+"lchflags($module, /, path, flags)\n"
+"--\n"
+"\n"
+"Set file flags.\n"
+"\n"
+"This function will not follow symbolic links.\n"
+"Equivalent to chflags(path, flags, follow_symlinks=False).");
+
+#define OS_LCHFLAGS_METHODDEF \
+ {"lchflags", (PyCFunction)os_lchflags, METH_VARARGS|METH_KEYWORDS, os_lchflags__doc__},
+
+static PyObject *
+os_lchflags_impl(PyModuleDef *module, path_t *path, unsigned long flags);
+
+static PyObject *
+os_lchflags(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", "flags", NULL};
+ path_t path = PATH_T_INITIALIZE("lchflags", "path", 0, 0);
+ unsigned long flags;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&k:lchflags", _keywords,
+ path_converter, &path, &flags))
+ goto exit;
+ return_value = os_lchflags_impl(module, &path, flags);
+
+exit:
+ /* Cleanup for path */
+ path_cleanup(&path);
+
+ return return_value;
+}
+
+#endif /* defined(HAVE_LCHFLAGS) */
+
+#if defined(HAVE_CHROOT)
+
+PyDoc_STRVAR(os_chroot__doc__,
+"chroot($module, /, path)\n"
+"--\n"
+"\n"
+"Change root directory to path.");
+
+#define OS_CHROOT_METHODDEF \
+ {"chroot", (PyCFunction)os_chroot, METH_VARARGS|METH_KEYWORDS, os_chroot__doc__},
+
+static PyObject *
+os_chroot_impl(PyModuleDef *module, path_t *path);
+
+static PyObject *
+os_chroot(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", NULL};
+ path_t path = PATH_T_INITIALIZE("chroot", "path", 0, 0);
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&:chroot", _keywords,
+ path_converter, &path))
+ goto exit;
+ return_value = os_chroot_impl(module, &path);
+
+exit:
+ /* Cleanup for path */
+ path_cleanup(&path);
+
+ return return_value;
+}
+
+#endif /* defined(HAVE_CHROOT) */
+
+#if defined(HAVE_FSYNC)
+
+PyDoc_STRVAR(os_fsync__doc__,
+"fsync($module, /, fd)\n"
+"--\n"
+"\n"
+"Force write of fd to disk.");
+
+#define OS_FSYNC_METHODDEF \
+ {"fsync", (PyCFunction)os_fsync, METH_VARARGS|METH_KEYWORDS, os_fsync__doc__},
+
+static PyObject *
+os_fsync_impl(PyModuleDef *module, int fd);
+
+static PyObject *
+os_fsync(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"fd", NULL};
+ int fd;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&:fsync", _keywords,
+ fildes_converter, &fd))
+ goto exit;
+ return_value = os_fsync_impl(module, fd);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_FSYNC) */
+
+#if defined(HAVE_SYNC)
+
+PyDoc_STRVAR(os_sync__doc__,
+"sync($module, /)\n"
+"--\n"
+"\n"
+"Force write of everything to disk.");
+
+#define OS_SYNC_METHODDEF \
+ {"sync", (PyCFunction)os_sync, METH_NOARGS, os_sync__doc__},
+
+static PyObject *
+os_sync_impl(PyModuleDef *module);
+
+static PyObject *
+os_sync(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return os_sync_impl(module);
+}
+
+#endif /* defined(HAVE_SYNC) */
+
+#if defined(HAVE_FDATASYNC)
+
+PyDoc_STRVAR(os_fdatasync__doc__,
+"fdatasync($module, /, fd)\n"
+"--\n"
+"\n"
+"Force write of fd to disk without forcing update of metadata.");
+
+#define OS_FDATASYNC_METHODDEF \
+ {"fdatasync", (PyCFunction)os_fdatasync, METH_VARARGS|METH_KEYWORDS, os_fdatasync__doc__},
+
+static PyObject *
+os_fdatasync_impl(PyModuleDef *module, int fd);
+
+static PyObject *
+os_fdatasync(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"fd", NULL};
+ int fd;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&:fdatasync", _keywords,
+ fildes_converter, &fd))
+ goto exit;
+ return_value = os_fdatasync_impl(module, fd);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_FDATASYNC) */
+
+#if defined(HAVE_CHOWN)
+
+PyDoc_STRVAR(os_chown__doc__,
+"chown($module, /, path, uid, gid, *, dir_fd=None, follow_symlinks=True)\n"
+"--\n"
+"\n"
+"Change the owner and group id of path to the numeric uid and gid.\\\n"
+"\n"
+" path\n"
+" Path to be examined; can be string, bytes, or open-file-descriptor int.\n"
+" dir_fd\n"
+" If not None, it should be a file descriptor open to a directory,\n"
+" and path should be relative; path will then be relative to that\n"
+" directory.\n"
+" follow_symlinks\n"
+" If False, and the last element of the path is a symbolic link,\n"
+" stat will examine the symbolic link itself instead of the file\n"
+" the link points to.\n"
+"\n"
+"path may always be specified as a string.\n"
+"On some platforms, path may also be specified as an open file descriptor.\n"
+" If this functionality is unavailable, using it raises an exception.\n"
+"If dir_fd is not None, it should be a file descriptor open to a directory,\n"
+" and path should be relative; path will then be relative to that directory.\n"
+"If follow_symlinks is False, and the last element of the path is a symbolic\n"
+" link, chown will modify the symbolic link itself instead of the file the\n"
+" link points to.\n"
+"It is an error to use dir_fd or follow_symlinks when specifying path as\n"
+" an open file descriptor.\n"
+"dir_fd and follow_symlinks may not be implemented on your platform.\n"
+" If they are unavailable, using them will raise a NotImplementedError.");
+
+#define OS_CHOWN_METHODDEF \
+ {"chown", (PyCFunction)os_chown, METH_VARARGS|METH_KEYWORDS, os_chown__doc__},
+
+static PyObject *
+os_chown_impl(PyModuleDef *module, path_t *path, uid_t uid, gid_t gid,
+ int dir_fd, int follow_symlinks);
+
+static PyObject *
+os_chown(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", "uid", "gid", "dir_fd", "follow_symlinks", NULL};
+ path_t path = PATH_T_INITIALIZE("chown", "path", 0, PATH_HAVE_FCHOWN);
+ uid_t uid;
+ gid_t gid;
+ int dir_fd = DEFAULT_DIR_FD;
+ int follow_symlinks = 1;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&O&|$O&p:chown", _keywords,
+ path_converter, &path, _Py_Uid_Converter, &uid, _Py_Gid_Converter, &gid, FCHOWNAT_DIR_FD_CONVERTER, &dir_fd, &follow_symlinks))
+ goto exit;
+ return_value = os_chown_impl(module, &path, uid, gid, dir_fd, follow_symlinks);
+
+exit:
+ /* Cleanup for path */
+ path_cleanup(&path);
+
+ return return_value;
+}
+
+#endif /* defined(HAVE_CHOWN) */
+
+#if defined(HAVE_FCHOWN)
+
+PyDoc_STRVAR(os_fchown__doc__,
+"fchown($module, /, fd, uid, gid)\n"
+"--\n"
+"\n"
+"Change the owner and group id of the file specified by file descriptor.\n"
+"\n"
+"Equivalent to os.chown(fd, uid, gid).");
+
+#define OS_FCHOWN_METHODDEF \
+ {"fchown", (PyCFunction)os_fchown, METH_VARARGS|METH_KEYWORDS, os_fchown__doc__},
+
+static PyObject *
+os_fchown_impl(PyModuleDef *module, int fd, uid_t uid, gid_t gid);
+
+static PyObject *
+os_fchown(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"fd", "uid", "gid", NULL};
+ int fd;
+ uid_t uid;
+ gid_t gid;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "iO&O&:fchown", _keywords,
+ &fd, _Py_Uid_Converter, &uid, _Py_Gid_Converter, &gid))
+ goto exit;
+ return_value = os_fchown_impl(module, fd, uid, gid);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_FCHOWN) */
+
+#if defined(HAVE_LCHOWN)
+
+PyDoc_STRVAR(os_lchown__doc__,
+"lchown($module, /, path, uid, gid)\n"
+"--\n"
+"\n"
+"Change the owner and group id of path to the numeric uid and gid.\n"
+"\n"
+"This function will not follow symbolic links.\n"
+"Equivalent to os.chown(path, uid, gid, follow_symlinks=False).");
+
+#define OS_LCHOWN_METHODDEF \
+ {"lchown", (PyCFunction)os_lchown, METH_VARARGS|METH_KEYWORDS, os_lchown__doc__},
+
+static PyObject *
+os_lchown_impl(PyModuleDef *module, path_t *path, uid_t uid, gid_t gid);
+
+static PyObject *
+os_lchown(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", "uid", "gid", NULL};
+ path_t path = PATH_T_INITIALIZE("lchown", "path", 0, 0);
+ uid_t uid;
+ gid_t gid;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&O&:lchown", _keywords,
+ path_converter, &path, _Py_Uid_Converter, &uid, _Py_Gid_Converter, &gid))
+ goto exit;
+ return_value = os_lchown_impl(module, &path, uid, gid);
+
+exit:
+ /* Cleanup for path */
+ path_cleanup(&path);
+
+ return return_value;
+}
+
+#endif /* defined(HAVE_LCHOWN) */
+
+PyDoc_STRVAR(os_getcwd__doc__,
+"getcwd($module, /)\n"
+"--\n"
+"\n"
+"Return a unicode string representing the current working directory.");
+
+#define OS_GETCWD_METHODDEF \
+ {"getcwd", (PyCFunction)os_getcwd, METH_NOARGS, os_getcwd__doc__},
+
+static PyObject *
+os_getcwd_impl(PyModuleDef *module);
+
+static PyObject *
+os_getcwd(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return os_getcwd_impl(module);
+}
+
+PyDoc_STRVAR(os_getcwdb__doc__,
+"getcwdb($module, /)\n"
+"--\n"
+"\n"
+"Return a bytes string representing the current working directory.");
+
+#define OS_GETCWDB_METHODDEF \
+ {"getcwdb", (PyCFunction)os_getcwdb, METH_NOARGS, os_getcwdb__doc__},
+
+static PyObject *
+os_getcwdb_impl(PyModuleDef *module);
+
+static PyObject *
+os_getcwdb(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return os_getcwdb_impl(module);
+}
+
+#if defined(HAVE_LINK)
+
+PyDoc_STRVAR(os_link__doc__,
+"link($module, /, src, dst, *, src_dir_fd=None, dst_dir_fd=None,\n"
+" follow_symlinks=True)\n"
+"--\n"
+"\n"
+"Create a hard link to a file.\n"
+"\n"
+"If either src_dir_fd or dst_dir_fd is not None, it should be a file\n"
+" descriptor open to a directory, and the respective path string (src or dst)\n"
+" should be relative; the path will then be relative to that directory.\n"
+"If follow_symlinks is False, and the last element of src is a symbolic\n"
+" link, link will create a link to the symbolic link itself instead of the\n"
+" file the link points to.\n"
+"src_dir_fd, dst_dir_fd, and follow_symlinks may not be implemented on your\n"
+" platform. If they are unavailable, using them will raise a\n"
+" NotImplementedError.");
+
+#define OS_LINK_METHODDEF \
+ {"link", (PyCFunction)os_link, METH_VARARGS|METH_KEYWORDS, os_link__doc__},
+
+static PyObject *
+os_link_impl(PyModuleDef *module, path_t *src, path_t *dst, int src_dir_fd,
+ int dst_dir_fd, int follow_symlinks);
+
+static PyObject *
+os_link(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"src", "dst", "src_dir_fd", "dst_dir_fd", "follow_symlinks", NULL};
+ path_t src = PATH_T_INITIALIZE("link", "src", 0, 0);
+ path_t dst = PATH_T_INITIALIZE("link", "dst", 0, 0);
+ int src_dir_fd = DEFAULT_DIR_FD;
+ int dst_dir_fd = DEFAULT_DIR_FD;
+ int follow_symlinks = 1;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&|$O&O&p:link", _keywords,
+ path_converter, &src, path_converter, &dst, dir_fd_converter, &src_dir_fd, dir_fd_converter, &dst_dir_fd, &follow_symlinks))
+ goto exit;
+ return_value = os_link_impl(module, &src, &dst, src_dir_fd, dst_dir_fd, follow_symlinks);
+
+exit:
+ /* Cleanup for src */
+ path_cleanup(&src);
+ /* Cleanup for dst */
+ path_cleanup(&dst);
+
+ return return_value;
+}
+
+#endif /* defined(HAVE_LINK) */
+
+PyDoc_STRVAR(os_listdir__doc__,
+"listdir($module, /, path=None)\n"
+"--\n"
+"\n"
+"Return a list containing the names of the files in the directory.\n"
+"\n"
+"path can be specified as either str or bytes. If path is bytes,\n"
+" the filenames returned will also be bytes; in all other circumstances\n"
+" the filenames returned will be str.\n"
+"If path is None, uses the path=\'.\'.\n"
+"On some platforms, path may also be specified as an open file descriptor;\\\n"
+" the file descriptor must refer to a directory.\n"
+" If this functionality is unavailable, using it raises NotImplementedError.\n"
+"\n"
+"The list is in arbitrary order. It does not include the special\n"
+"entries \'.\' and \'..\' even if they are present in the directory.");
+
+#define OS_LISTDIR_METHODDEF \
+ {"listdir", (PyCFunction)os_listdir, METH_VARARGS|METH_KEYWORDS, os_listdir__doc__},
+
+static PyObject *
+os_listdir_impl(PyModuleDef *module, path_t *path);
+
+static PyObject *
+os_listdir(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", NULL};
+ path_t path = PATH_T_INITIALIZE("listdir", "path", 1, PATH_HAVE_FDOPENDIR);
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O&:listdir", _keywords,
+ path_converter, &path))
+ goto exit;
+ return_value = os_listdir_impl(module, &path);
+
+exit:
+ /* Cleanup for path */
+ path_cleanup(&path);
+
+ return return_value;
+}
+
+#if defined(MS_WINDOWS)
+
+PyDoc_STRVAR(os__getfullpathname__doc__,
+"_getfullpathname($module, path, /)\n"
+"--\n"
+"\n");
+
+#define OS__GETFULLPATHNAME_METHODDEF \
+ {"_getfullpathname", (PyCFunction)os__getfullpathname, METH_O, os__getfullpathname__doc__},
+
+static PyObject *
+os__getfullpathname_impl(PyModuleDef *module, path_t *path);
+
+static PyObject *
+os__getfullpathname(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ path_t path = PATH_T_INITIALIZE("_getfullpathname", "path", 0, 0);
+
+ if (!PyArg_Parse(arg, "O&:_getfullpathname", path_converter, &path))
+ goto exit;
+ return_value = os__getfullpathname_impl(module, &path);
+
+exit:
+ /* Cleanup for path */
+ path_cleanup(&path);
+
+ return return_value;
+}
+
+#endif /* defined(MS_WINDOWS) */
+
+#if defined(MS_WINDOWS)
+
+PyDoc_STRVAR(os__getfinalpathname__doc__,
+"_getfinalpathname($module, path, /)\n"
+"--\n"
+"\n"
+"A helper function for samepath on windows.");
+
+#define OS__GETFINALPATHNAME_METHODDEF \
+ {"_getfinalpathname", (PyCFunction)os__getfinalpathname, METH_O, os__getfinalpathname__doc__},
+
+static PyObject *
+os__getfinalpathname_impl(PyModuleDef *module, PyObject *path);
+
+static PyObject *
+os__getfinalpathname(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ PyObject *path;
+
+ if (!PyArg_Parse(arg, "U:_getfinalpathname", &path))
+ goto exit;
+ return_value = os__getfinalpathname_impl(module, path);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(MS_WINDOWS) */
+
+#if defined(MS_WINDOWS)
+
+PyDoc_STRVAR(os__isdir__doc__,
+"_isdir($module, path, /)\n"
+"--\n"
+"\n");
+
+#define OS__ISDIR_METHODDEF \
+ {"_isdir", (PyCFunction)os__isdir, METH_O, os__isdir__doc__},
+
+static PyObject *
+os__isdir_impl(PyModuleDef *module, path_t *path);
+
+static PyObject *
+os__isdir(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ path_t path = PATH_T_INITIALIZE("_isdir", "path", 0, 0);
+
+ if (!PyArg_Parse(arg, "O&:_isdir", path_converter, &path))
+ goto exit;
+ return_value = os__isdir_impl(module, &path);
+
+exit:
+ /* Cleanup for path */
+ path_cleanup(&path);
+
+ return return_value;
+}
+
+#endif /* defined(MS_WINDOWS) */
+
+#if defined(MS_WINDOWS)
+
+PyDoc_STRVAR(os__getvolumepathname__doc__,
+"_getvolumepathname($module, /, path)\n"
+"--\n"
+"\n"
+"A helper function for ismount on Win32.");
+
+#define OS__GETVOLUMEPATHNAME_METHODDEF \
+ {"_getvolumepathname", (PyCFunction)os__getvolumepathname, METH_VARARGS|METH_KEYWORDS, os__getvolumepathname__doc__},
+
+static PyObject *
+os__getvolumepathname_impl(PyModuleDef *module, PyObject *path);
+
+static PyObject *
+os__getvolumepathname(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", NULL};
+ PyObject *path;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "U:_getvolumepathname", _keywords,
+ &path))
+ goto exit;
+ return_value = os__getvolumepathname_impl(module, path);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(MS_WINDOWS) */
+
+PyDoc_STRVAR(os_mkdir__doc__,
+"mkdir($module, /, path, mode=511, *, dir_fd=None)\n"
+"--\n"
+"\n"
+"Create a directory.\n"
+"\n"
+"If dir_fd is not None, it should be a file descriptor open to a directory,\n"
+" and path should be relative; path will then be relative to that directory.\n"
+"dir_fd may not be implemented on your platform.\n"
+" If it is unavailable, using it will raise a NotImplementedError.\n"
+"\n"
+"The mode argument is ignored on Windows.");
+
+#define OS_MKDIR_METHODDEF \
+ {"mkdir", (PyCFunction)os_mkdir, METH_VARARGS|METH_KEYWORDS, os_mkdir__doc__},
+
+static PyObject *
+os_mkdir_impl(PyModuleDef *module, path_t *path, int mode, int dir_fd);
+
+static PyObject *
+os_mkdir(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", "mode", "dir_fd", NULL};
+ path_t path = PATH_T_INITIALIZE("mkdir", "path", 0, 0);
+ int mode = 511;
+ int dir_fd = DEFAULT_DIR_FD;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&|i$O&:mkdir", _keywords,
+ path_converter, &path, &mode, MKDIRAT_DIR_FD_CONVERTER, &dir_fd))
+ goto exit;
+ return_value = os_mkdir_impl(module, &path, mode, dir_fd);
+
+exit:
+ /* Cleanup for path */
+ path_cleanup(&path);
+
+ return return_value;
+}
+
+#if defined(HAVE_NICE)
+
+PyDoc_STRVAR(os_nice__doc__,
+"nice($module, increment, /)\n"
+"--\n"
+"\n"
+"Add increment to the priority of process and return the new priority.");
+
+#define OS_NICE_METHODDEF \
+ {"nice", (PyCFunction)os_nice, METH_O, os_nice__doc__},
+
+static PyObject *
+os_nice_impl(PyModuleDef *module, int increment);
+
+static PyObject *
+os_nice(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int increment;
+
+ if (!PyArg_Parse(arg, "i:nice", &increment))
+ goto exit;
+ return_value = os_nice_impl(module, increment);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_NICE) */
+
+#if defined(HAVE_GETPRIORITY)
+
+PyDoc_STRVAR(os_getpriority__doc__,
+"getpriority($module, /, which, who)\n"
+"--\n"
+"\n"
+"Return program scheduling priority.");
+
+#define OS_GETPRIORITY_METHODDEF \
+ {"getpriority", (PyCFunction)os_getpriority, METH_VARARGS|METH_KEYWORDS, os_getpriority__doc__},
+
+static PyObject *
+os_getpriority_impl(PyModuleDef *module, int which, int who);
+
+static PyObject *
+os_getpriority(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"which", "who", NULL};
+ int which;
+ int who;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ii:getpriority", _keywords,
+ &which, &who))
+ goto exit;
+ return_value = os_getpriority_impl(module, which, who);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_GETPRIORITY) */
+
+#if defined(HAVE_SETPRIORITY)
+
+PyDoc_STRVAR(os_setpriority__doc__,
+"setpriority($module, /, which, who, priority)\n"
+"--\n"
+"\n"
+"Set program scheduling priority.");
+
+#define OS_SETPRIORITY_METHODDEF \
+ {"setpriority", (PyCFunction)os_setpriority, METH_VARARGS|METH_KEYWORDS, os_setpriority__doc__},
+
+static PyObject *
+os_setpriority_impl(PyModuleDef *module, int which, int who, int priority);
+
+static PyObject *
+os_setpriority(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"which", "who", "priority", NULL};
+ int which;
+ int who;
+ int priority;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "iii:setpriority", _keywords,
+ &which, &who, &priority))
+ goto exit;
+ return_value = os_setpriority_impl(module, which, who, priority);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SETPRIORITY) */
+
+PyDoc_STRVAR(os_rename__doc__,
+"rename($module, /, src, dst, *, src_dir_fd=None, dst_dir_fd=None)\n"
+"--\n"
+"\n"
+"Rename a file or directory.\n"
+"\n"
+"If either src_dir_fd or dst_dir_fd is not None, it should be a file\n"
+" descriptor open to a directory, and the respective path string (src or dst)\n"
+" should be relative; the path will then be relative to that directory.\n"
+"src_dir_fd and dst_dir_fd, may not be implemented on your platform.\n"
+" If they are unavailable, using them will raise a NotImplementedError.");
+
+#define OS_RENAME_METHODDEF \
+ {"rename", (PyCFunction)os_rename, METH_VARARGS|METH_KEYWORDS, os_rename__doc__},
+
+static PyObject *
+os_rename_impl(PyModuleDef *module, path_t *src, path_t *dst, int src_dir_fd,
+ int dst_dir_fd);
+
+static PyObject *
+os_rename(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"src", "dst", "src_dir_fd", "dst_dir_fd", NULL};
+ path_t src = PATH_T_INITIALIZE("rename", "src", 0, 0);
+ path_t dst = PATH_T_INITIALIZE("rename", "dst", 0, 0);
+ int src_dir_fd = DEFAULT_DIR_FD;
+ int dst_dir_fd = DEFAULT_DIR_FD;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&|$O&O&:rename", _keywords,
+ path_converter, &src, path_converter, &dst, dir_fd_converter, &src_dir_fd, dir_fd_converter, &dst_dir_fd))
+ goto exit;
+ return_value = os_rename_impl(module, &src, &dst, src_dir_fd, dst_dir_fd);
+
+exit:
+ /* Cleanup for src */
+ path_cleanup(&src);
+ /* Cleanup for dst */
+ path_cleanup(&dst);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(os_replace__doc__,
+"replace($module, /, src, dst, *, src_dir_fd=None, dst_dir_fd=None)\n"
+"--\n"
+"\n"
+"Rename a file or directory, overwriting the destination.\n"
+"\n"
+"If either src_dir_fd or dst_dir_fd is not None, it should be a file\n"
+" descriptor open to a directory, and the respective path string (src or dst)\n"
+" should be relative; the path will then be relative to that directory.\n"
+"src_dir_fd and dst_dir_fd, may not be implemented on your platform.\n"
+" If they are unavailable, using them will raise a NotImplementedError.\"");
+
+#define OS_REPLACE_METHODDEF \
+ {"replace", (PyCFunction)os_replace, METH_VARARGS|METH_KEYWORDS, os_replace__doc__},
+
+static PyObject *
+os_replace_impl(PyModuleDef *module, path_t *src, path_t *dst,
+ int src_dir_fd, int dst_dir_fd);
+
+static PyObject *
+os_replace(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"src", "dst", "src_dir_fd", "dst_dir_fd", NULL};
+ path_t src = PATH_T_INITIALIZE("replace", "src", 0, 0);
+ path_t dst = PATH_T_INITIALIZE("replace", "dst", 0, 0);
+ int src_dir_fd = DEFAULT_DIR_FD;
+ int dst_dir_fd = DEFAULT_DIR_FD;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&|$O&O&:replace", _keywords,
+ path_converter, &src, path_converter, &dst, dir_fd_converter, &src_dir_fd, dir_fd_converter, &dst_dir_fd))
+ goto exit;
+ return_value = os_replace_impl(module, &src, &dst, src_dir_fd, dst_dir_fd);
+
+exit:
+ /* Cleanup for src */
+ path_cleanup(&src);
+ /* Cleanup for dst */
+ path_cleanup(&dst);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(os_rmdir__doc__,
+"rmdir($module, /, path, *, dir_fd=None)\n"
+"--\n"
+"\n"
+"Remove a directory.\n"
+"\n"
+"If dir_fd is not None, it should be a file descriptor open to a directory,\n"
+" and path should be relative; path will then be relative to that directory.\n"
+"dir_fd may not be implemented on your platform.\n"
+" If it is unavailable, using it will raise a NotImplementedError.");
+
+#define OS_RMDIR_METHODDEF \
+ {"rmdir", (PyCFunction)os_rmdir, METH_VARARGS|METH_KEYWORDS, os_rmdir__doc__},
+
+static PyObject *
+os_rmdir_impl(PyModuleDef *module, path_t *path, int dir_fd);
+
+static PyObject *
+os_rmdir(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", "dir_fd", NULL};
+ path_t path = PATH_T_INITIALIZE("rmdir", "path", 0, 0);
+ int dir_fd = DEFAULT_DIR_FD;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&|$O&:rmdir", _keywords,
+ path_converter, &path, UNLINKAT_DIR_FD_CONVERTER, &dir_fd))
+ goto exit;
+ return_value = os_rmdir_impl(module, &path, dir_fd);
+
+exit:
+ /* Cleanup for path */
+ path_cleanup(&path);
+
+ return return_value;
+}
+
+#if defined(HAVE_SYSTEM) && defined(MS_WINDOWS)
+
+PyDoc_STRVAR(os_system__doc__,
+"system($module, /, command)\n"
+"--\n"
+"\n"
+"Execute the command in a subshell.");
+
+#define OS_SYSTEM_METHODDEF \
+ {"system", (PyCFunction)os_system, METH_VARARGS|METH_KEYWORDS, os_system__doc__},
+
+static long
+os_system_impl(PyModuleDef *module, Py_UNICODE *command);
+
+static PyObject *
+os_system(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"command", NULL};
+ Py_UNICODE *command;
+ long _return_value;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "u:system", _keywords,
+ &command))
+ goto exit;
+ _return_value = os_system_impl(module, command);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromLong(_return_value);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SYSTEM) && defined(MS_WINDOWS) */
+
+#if defined(HAVE_SYSTEM) && !defined(MS_WINDOWS)
+
+PyDoc_STRVAR(os_system__doc__,
+"system($module, /, command)\n"
+"--\n"
+"\n"
+"Execute the command in a subshell.");
+
+#define OS_SYSTEM_METHODDEF \
+ {"system", (PyCFunction)os_system, METH_VARARGS|METH_KEYWORDS, os_system__doc__},
+
+static long
+os_system_impl(PyModuleDef *module, PyObject *command);
+
+static PyObject *
+os_system(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"command", NULL};
+ PyObject *command = NULL;
+ long _return_value;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&:system", _keywords,
+ PyUnicode_FSConverter, &command))
+ goto exit;
+ _return_value = os_system_impl(module, command);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromLong(_return_value);
+
+exit:
+ /* Cleanup for command */
+ Py_XDECREF(command);
+
+ return return_value;
+}
+
+#endif /* defined(HAVE_SYSTEM) && !defined(MS_WINDOWS) */
+
+PyDoc_STRVAR(os_umask__doc__,
+"umask($module, mask, /)\n"
+"--\n"
+"\n"
+"Set the current numeric umask and return the previous umask.");
+
+#define OS_UMASK_METHODDEF \
+ {"umask", (PyCFunction)os_umask, METH_O, os_umask__doc__},
+
+static PyObject *
+os_umask_impl(PyModuleDef *module, int mask);
+
+static PyObject *
+os_umask(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int mask;
+
+ if (!PyArg_Parse(arg, "i:umask", &mask))
+ goto exit;
+ return_value = os_umask_impl(module, mask);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(os_unlink__doc__,
+"unlink($module, /, path, *, dir_fd=None)\n"
+"--\n"
+"\n"
+"Remove a file (same as remove()).\n"
+"\n"
+"If dir_fd is not None, it should be a file descriptor open to a directory,\n"
+" and path should be relative; path will then be relative to that directory.\n"
+"dir_fd may not be implemented on your platform.\n"
+" If it is unavailable, using it will raise a NotImplementedError.");
+
+#define OS_UNLINK_METHODDEF \
+ {"unlink", (PyCFunction)os_unlink, METH_VARARGS|METH_KEYWORDS, os_unlink__doc__},
+
+static PyObject *
+os_unlink_impl(PyModuleDef *module, path_t *path, int dir_fd);
+
+static PyObject *
+os_unlink(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", "dir_fd", NULL};
+ path_t path = PATH_T_INITIALIZE("unlink", "path", 0, 0);
+ int dir_fd = DEFAULT_DIR_FD;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&|$O&:unlink", _keywords,
+ path_converter, &path, UNLINKAT_DIR_FD_CONVERTER, &dir_fd))
+ goto exit;
+ return_value = os_unlink_impl(module, &path, dir_fd);
+
+exit:
+ /* Cleanup for path */
+ path_cleanup(&path);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(os_remove__doc__,
+"remove($module, /, path, *, dir_fd=None)\n"
+"--\n"
+"\n"
+"Remove a file (same as unlink()).\n"
+"\n"
+"If dir_fd is not None, it should be a file descriptor open to a directory,\n"
+" and path should be relative; path will then be relative to that directory.\n"
+"dir_fd may not be implemented on your platform.\n"
+" If it is unavailable, using it will raise a NotImplementedError.");
+
+#define OS_REMOVE_METHODDEF \
+ {"remove", (PyCFunction)os_remove, METH_VARARGS|METH_KEYWORDS, os_remove__doc__},
+
+static PyObject *
+os_remove_impl(PyModuleDef *module, path_t *path, int dir_fd);
+
+static PyObject *
+os_remove(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", "dir_fd", NULL};
+ path_t path = PATH_T_INITIALIZE("remove", "path", 0, 0);
+ int dir_fd = DEFAULT_DIR_FD;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&|$O&:remove", _keywords,
+ path_converter, &path, UNLINKAT_DIR_FD_CONVERTER, &dir_fd))
+ goto exit;
+ return_value = os_remove_impl(module, &path, dir_fd);
+
+exit:
+ /* Cleanup for path */
+ path_cleanup(&path);
+
+ return return_value;
+}
+
+#if defined(HAVE_UNAME)
+
+PyDoc_STRVAR(os_uname__doc__,
+"uname($module, /)\n"
+"--\n"
+"\n"
+"Return an object identifying the current operating system.\n"
+"\n"
+"The object behaves like a named tuple with the following fields:\n"
+" (sysname, nodename, release, version, machine)");
+
+#define OS_UNAME_METHODDEF \
+ {"uname", (PyCFunction)os_uname, METH_NOARGS, os_uname__doc__},
+
+static PyObject *
+os_uname_impl(PyModuleDef *module);
+
+static PyObject *
+os_uname(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return os_uname_impl(module);
+}
+
+#endif /* defined(HAVE_UNAME) */
+
+PyDoc_STRVAR(os_utime__doc__,
+"utime($module, /, path, times=None, *, ns=None, dir_fd=None,\n"
+" follow_symlinks=True)\n"
+"--\n"
+"\n"
+"Set the access and modified time of path.\n"
+"\n"
+"path may always be specified as a string.\n"
+"On some platforms, path may also be specified as an open file descriptor.\n"
+" If this functionality is unavailable, using it raises an exception.\n"
+"\n"
+"If times is not None, it must be a tuple (atime, mtime);\n"
+" atime and mtime should be expressed as float seconds since the epoch.\n"
+"If ns is specified, it must be a tuple (atime_ns, mtime_ns);\n"
+" atime_ns and mtime_ns should be expressed as integer nanoseconds\n"
+" since the epoch.\n"
+"If times is None and ns is unspecified, utime uses the current time.\n"
+"Specifying tuples for both times and ns is an error.\n"
+"\n"
+"If dir_fd is not None, it should be a file descriptor open to a directory,\n"
+" and path should be relative; path will then be relative to that directory.\n"
+"If follow_symlinks is False, and the last element of the path is a symbolic\n"
+" link, utime will modify the symbolic link itself instead of the file the\n"
+" link points to.\n"
+"It is an error to use dir_fd or follow_symlinks when specifying path\n"
+" as an open file descriptor.\n"
+"dir_fd and follow_symlinks may not be available on your platform.\n"
+" If they are unavailable, using them will raise a NotImplementedError.");
+
+#define OS_UTIME_METHODDEF \
+ {"utime", (PyCFunction)os_utime, METH_VARARGS|METH_KEYWORDS, os_utime__doc__},
+
+static PyObject *
+os_utime_impl(PyModuleDef *module, path_t *path, PyObject *times,
+ PyObject *ns, int dir_fd, int follow_symlinks);
+
+static PyObject *
+os_utime(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", "times", "ns", "dir_fd", "follow_symlinks", NULL};
+ path_t path = PATH_T_INITIALIZE("utime", "path", 0, PATH_UTIME_HAVE_FD);
+ PyObject *times = NULL;
+ PyObject *ns = NULL;
+ int dir_fd = DEFAULT_DIR_FD;
+ int follow_symlinks = 1;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&|O$OO&p:utime", _keywords,
+ path_converter, &path, &times, &ns, FUTIMENSAT_DIR_FD_CONVERTER, &dir_fd, &follow_symlinks))
+ goto exit;
+ return_value = os_utime_impl(module, &path, times, ns, dir_fd, follow_symlinks);
+
+exit:
+ /* Cleanup for path */
+ path_cleanup(&path);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(os__exit__doc__,
+"_exit($module, /, status)\n"
+"--\n"
+"\n"
+"Exit to the system with specified status, without normal exit processing.");
+
+#define OS__EXIT_METHODDEF \
+ {"_exit", (PyCFunction)os__exit, METH_VARARGS|METH_KEYWORDS, os__exit__doc__},
+
+static PyObject *
+os__exit_impl(PyModuleDef *module, int status);
+
+static PyObject *
+os__exit(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"status", NULL};
+ int status;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:_exit", _keywords,
+ &status))
+ goto exit;
+ return_value = os__exit_impl(module, status);
+
+exit:
+ return return_value;
+}
+
+#if defined(HAVE_EXECV)
+
+PyDoc_STRVAR(os_execv__doc__,
+"execv($module, path, argv, /)\n"
+"--\n"
+"\n"
+"Execute an executable path with arguments, replacing current process.\n"
+"\n"
+" path\n"
+" Path of executable file.\n"
+" argv\n"
+" Tuple or list of strings.");
+
+#define OS_EXECV_METHODDEF \
+ {"execv", (PyCFunction)os_execv, METH_VARARGS, os_execv__doc__},
+
+static PyObject *
+os_execv_impl(PyModuleDef *module, PyObject *path, PyObject *argv);
+
+static PyObject *
+os_execv(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *path = NULL;
+ PyObject *argv;
+
+ if (!PyArg_ParseTuple(args, "O&O:execv",
+ PyUnicode_FSConverter, &path, &argv))
+ goto exit;
+ return_value = os_execv_impl(module, path, argv);
+
+exit:
+ /* Cleanup for path */
+ Py_XDECREF(path);
+
+ return return_value;
+}
+
+#endif /* defined(HAVE_EXECV) */
+
+#if defined(HAVE_EXECV)
+
+PyDoc_STRVAR(os_execve__doc__,
+"execve($module, /, path, argv, env)\n"
+"--\n"
+"\n"
+"Execute an executable path with arguments, replacing current process.\n"
+"\n"
+" path\n"
+" Path of executable file.\n"
+" argv\n"
+" Tuple or list of strings.\n"
+" env\n"
+" Dictionary of strings mapping to strings.");
+
+#define OS_EXECVE_METHODDEF \
+ {"execve", (PyCFunction)os_execve, METH_VARARGS|METH_KEYWORDS, os_execve__doc__},
+
+static PyObject *
+os_execve_impl(PyModuleDef *module, path_t *path, PyObject *argv,
+ PyObject *env);
+
+static PyObject *
+os_execve(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", "argv", "env", NULL};
+ path_t path = PATH_T_INITIALIZE("execve", "path", 0, PATH_HAVE_FEXECVE);
+ PyObject *argv;
+ PyObject *env;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&OO:execve", _keywords,
+ path_converter, &path, &argv, &env))
+ goto exit;
+ return_value = os_execve_impl(module, &path, argv, env);
+
+exit:
+ /* Cleanup for path */
+ path_cleanup(&path);
+
+ return return_value;
+}
+
+#endif /* defined(HAVE_EXECV) */
+
+#if defined(HAVE_SPAWNV)
+
+PyDoc_STRVAR(os_spawnv__doc__,
+"spawnv($module, mode, path, argv, /)\n"
+"--\n"
+"\n"
+"Execute the program specified by path in a new process.\n"
+"\n"
+" mode\n"
+" Mode of process creation.\n"
+" path\n"
+" Path of executable file.\n"
+" argv\n"
+" Tuple or list of strings.");
+
+#define OS_SPAWNV_METHODDEF \
+ {"spawnv", (PyCFunction)os_spawnv, METH_VARARGS, os_spawnv__doc__},
+
+static PyObject *
+os_spawnv_impl(PyModuleDef *module, int mode, PyObject *path, PyObject *argv);
+
+static PyObject *
+os_spawnv(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int mode;
+ PyObject *path = NULL;
+ PyObject *argv;
+
+ if (!PyArg_ParseTuple(args, "iO&O:spawnv",
+ &mode, PyUnicode_FSConverter, &path, &argv))
+ goto exit;
+ return_value = os_spawnv_impl(module, mode, path, argv);
+
+exit:
+ /* Cleanup for path */
+ Py_XDECREF(path);
+
+ return return_value;
+}
+
+#endif /* defined(HAVE_SPAWNV) */
+
+#if defined(HAVE_SPAWNV)
+
+PyDoc_STRVAR(os_spawnve__doc__,
+"spawnve($module, mode, path, argv, env, /)\n"
+"--\n"
+"\n"
+"Execute the program specified by path in a new process.\n"
+"\n"
+" mode\n"
+" Mode of process creation.\n"
+" path\n"
+" Path of executable file.\n"
+" argv\n"
+" Tuple or list of strings.\n"
+" env\n"
+" Dictionary of strings mapping to strings.");
+
+#define OS_SPAWNVE_METHODDEF \
+ {"spawnve", (PyCFunction)os_spawnve, METH_VARARGS, os_spawnve__doc__},
+
+static PyObject *
+os_spawnve_impl(PyModuleDef *module, int mode, PyObject *path,
+ PyObject *argv, PyObject *env);
+
+static PyObject *
+os_spawnve(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int mode;
+ PyObject *path = NULL;
+ PyObject *argv;
+ PyObject *env;
+
+ if (!PyArg_ParseTuple(args, "iO&OO:spawnve",
+ &mode, PyUnicode_FSConverter, &path, &argv, &env))
+ goto exit;
+ return_value = os_spawnve_impl(module, mode, path, argv, env);
+
+exit:
+ /* Cleanup for path */
+ Py_XDECREF(path);
+
+ return return_value;
+}
+
+#endif /* defined(HAVE_SPAWNV) */
+
+#if defined(HAVE_FORK1)
+
+PyDoc_STRVAR(os_fork1__doc__,
+"fork1($module, /)\n"
+"--\n"
+"\n"
+"Fork a child process with a single multiplexed (i.e., not bound) thread.\n"
+"\n"
+"Return 0 to child process and PID of child to parent process.");
+
+#define OS_FORK1_METHODDEF \
+ {"fork1", (PyCFunction)os_fork1, METH_NOARGS, os_fork1__doc__},
+
+static PyObject *
+os_fork1_impl(PyModuleDef *module);
+
+static PyObject *
+os_fork1(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return os_fork1_impl(module);
+}
+
+#endif /* defined(HAVE_FORK1) */
+
+#if defined(HAVE_FORK)
+
+PyDoc_STRVAR(os_fork__doc__,
+"fork($module, /)\n"
+"--\n"
+"\n"
+"Fork a child process.\n"
+"\n"
+"Return 0 to child process and PID of child to parent process.");
+
+#define OS_FORK_METHODDEF \
+ {"fork", (PyCFunction)os_fork, METH_NOARGS, os_fork__doc__},
+
+static PyObject *
+os_fork_impl(PyModuleDef *module);
+
+static PyObject *
+os_fork(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return os_fork_impl(module);
+}
+
+#endif /* defined(HAVE_FORK) */
+
+#if defined(HAVE_SCHED_H) && defined(HAVE_SCHED_GET_PRIORITY_MAX)
+
+PyDoc_STRVAR(os_sched_get_priority_max__doc__,
+"sched_get_priority_max($module, /, policy)\n"
+"--\n"
+"\n"
+"Get the maximum scheduling priority for policy.");
+
+#define OS_SCHED_GET_PRIORITY_MAX_METHODDEF \
+ {"sched_get_priority_max", (PyCFunction)os_sched_get_priority_max, METH_VARARGS|METH_KEYWORDS, os_sched_get_priority_max__doc__},
+
+static PyObject *
+os_sched_get_priority_max_impl(PyModuleDef *module, int policy);
+
+static PyObject *
+os_sched_get_priority_max(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"policy", NULL};
+ int policy;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:sched_get_priority_max", _keywords,
+ &policy))
+ goto exit;
+ return_value = os_sched_get_priority_max_impl(module, policy);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SCHED_H) && defined(HAVE_SCHED_GET_PRIORITY_MAX) */
+
+#if defined(HAVE_SCHED_H) && defined(HAVE_SCHED_GET_PRIORITY_MAX)
+
+PyDoc_STRVAR(os_sched_get_priority_min__doc__,
+"sched_get_priority_min($module, /, policy)\n"
+"--\n"
+"\n"
+"Get the minimum scheduling priority for policy.");
+
+#define OS_SCHED_GET_PRIORITY_MIN_METHODDEF \
+ {"sched_get_priority_min", (PyCFunction)os_sched_get_priority_min, METH_VARARGS|METH_KEYWORDS, os_sched_get_priority_min__doc__},
+
+static PyObject *
+os_sched_get_priority_min_impl(PyModuleDef *module, int policy);
+
+static PyObject *
+os_sched_get_priority_min(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"policy", NULL};
+ int policy;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:sched_get_priority_min", _keywords,
+ &policy))
+ goto exit;
+ return_value = os_sched_get_priority_min_impl(module, policy);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SCHED_H) && defined(HAVE_SCHED_GET_PRIORITY_MAX) */
+
+#if defined(HAVE_SCHED_H) && defined(HAVE_SCHED_SETSCHEDULER)
+
+PyDoc_STRVAR(os_sched_getscheduler__doc__,
+"sched_getscheduler($module, pid, /)\n"
+"--\n"
+"\n"
+"Get the scheduling policy for the process identifiedy by pid.\n"
+"\n"
+"Passing 0 for pid returns the scheduling policy for the calling process.");
+
+#define OS_SCHED_GETSCHEDULER_METHODDEF \
+ {"sched_getscheduler", (PyCFunction)os_sched_getscheduler, METH_O, os_sched_getscheduler__doc__},
+
+static PyObject *
+os_sched_getscheduler_impl(PyModuleDef *module, pid_t pid);
+
+static PyObject *
+os_sched_getscheduler(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ pid_t pid;
+
+ if (!PyArg_Parse(arg, "" _Py_PARSE_PID ":sched_getscheduler", &pid))
+ goto exit;
+ return_value = os_sched_getscheduler_impl(module, pid);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SCHED_H) && defined(HAVE_SCHED_SETSCHEDULER) */
+
+#if defined(HAVE_SCHED_H) && (defined(HAVE_SCHED_SETSCHEDULER) || defined(HAVE_SCHED_SETPARAM))
+
+PyDoc_STRVAR(os_sched_param__doc__,
+"sched_param(sched_priority)\n"
+"--\n"
+"\n"
+"Current has only one field: sched_priority\");\n"
+"\n"
+" sched_priority\n"
+" A scheduling parameter.");
+
+static PyObject *
+os_sched_param_impl(PyTypeObject *type, PyObject *sched_priority);
+
+static PyObject *
+os_sched_param(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"sched_priority", NULL};
+ PyObject *sched_priority;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:sched_param", _keywords,
+ &sched_priority))
+ goto exit;
+ return_value = os_sched_param_impl(type, sched_priority);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SCHED_H) && (defined(HAVE_SCHED_SETSCHEDULER) || defined(HAVE_SCHED_SETPARAM)) */
+
+#if defined(HAVE_SCHED_H) && defined(HAVE_SCHED_SETSCHEDULER)
+
+PyDoc_STRVAR(os_sched_setscheduler__doc__,
+"sched_setscheduler($module, pid, policy, param, /)\n"
+"--\n"
+"\n"
+"Set the scheduling policy for the process identified by pid.\n"
+"\n"
+"If pid is 0, the calling process is changed.\n"
+"param is an instance of sched_param.");
+
+#define OS_SCHED_SETSCHEDULER_METHODDEF \
+ {"sched_setscheduler", (PyCFunction)os_sched_setscheduler, METH_VARARGS, os_sched_setscheduler__doc__},
+
+static PyObject *
+os_sched_setscheduler_impl(PyModuleDef *module, pid_t pid, int policy,
+ struct sched_param *param);
+
+static PyObject *
+os_sched_setscheduler(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ pid_t pid;
+ int policy;
+ struct sched_param param;
+
+ if (!PyArg_ParseTuple(args, "" _Py_PARSE_PID "iO&:sched_setscheduler",
+ &pid, &policy, convert_sched_param, &param))
+ goto exit;
+ return_value = os_sched_setscheduler_impl(module, pid, policy, &param);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SCHED_H) && defined(HAVE_SCHED_SETSCHEDULER) */
+
+#if defined(HAVE_SCHED_H) && defined(HAVE_SCHED_SETPARAM)
+
+PyDoc_STRVAR(os_sched_getparam__doc__,
+"sched_getparam($module, pid, /)\n"
+"--\n"
+"\n"
+"Returns scheduling parameters for the process identified by pid.\n"
+"\n"
+"If pid is 0, returns parameters for the calling process.\n"
+"Return value is an instance of sched_param.");
+
+#define OS_SCHED_GETPARAM_METHODDEF \
+ {"sched_getparam", (PyCFunction)os_sched_getparam, METH_O, os_sched_getparam__doc__},
+
+static PyObject *
+os_sched_getparam_impl(PyModuleDef *module, pid_t pid);
+
+static PyObject *
+os_sched_getparam(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ pid_t pid;
+
+ if (!PyArg_Parse(arg, "" _Py_PARSE_PID ":sched_getparam", &pid))
+ goto exit;
+ return_value = os_sched_getparam_impl(module, pid);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SCHED_H) && defined(HAVE_SCHED_SETPARAM) */
+
+#if defined(HAVE_SCHED_H) && defined(HAVE_SCHED_SETPARAM)
+
+PyDoc_STRVAR(os_sched_setparam__doc__,
+"sched_setparam($module, pid, param, /)\n"
+"--\n"
+"\n"
+"Set scheduling parameters for the process identified by pid.\n"
+"\n"
+"If pid is 0, sets parameters for the calling process.\n"
+"param should be an instance of sched_param.");
+
+#define OS_SCHED_SETPARAM_METHODDEF \
+ {"sched_setparam", (PyCFunction)os_sched_setparam, METH_VARARGS, os_sched_setparam__doc__},
+
+static PyObject *
+os_sched_setparam_impl(PyModuleDef *module, pid_t pid,
+ struct sched_param *param);
+
+static PyObject *
+os_sched_setparam(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ pid_t pid;
+ struct sched_param param;
+
+ if (!PyArg_ParseTuple(args, "" _Py_PARSE_PID "O&:sched_setparam",
+ &pid, convert_sched_param, &param))
+ goto exit;
+ return_value = os_sched_setparam_impl(module, pid, &param);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SCHED_H) && defined(HAVE_SCHED_SETPARAM) */
+
+#if defined(HAVE_SCHED_H) && defined(HAVE_SCHED_RR_GET_INTERVAL)
+
+PyDoc_STRVAR(os_sched_rr_get_interval__doc__,
+"sched_rr_get_interval($module, pid, /)\n"
+"--\n"
+"\n"
+"Return the round-robin quantum for the process identified by pid, in seconds.\n"
+"\n"
+"Value returned is a float.");
+
+#define OS_SCHED_RR_GET_INTERVAL_METHODDEF \
+ {"sched_rr_get_interval", (PyCFunction)os_sched_rr_get_interval, METH_O, os_sched_rr_get_interval__doc__},
+
+static double
+os_sched_rr_get_interval_impl(PyModuleDef *module, pid_t pid);
+
+static PyObject *
+os_sched_rr_get_interval(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ pid_t pid;
+ double _return_value;
+
+ if (!PyArg_Parse(arg, "" _Py_PARSE_PID ":sched_rr_get_interval", &pid))
+ goto exit;
+ _return_value = os_sched_rr_get_interval_impl(module, pid);
+ if ((_return_value == -1.0) && PyErr_Occurred())
+ goto exit;
+ return_value = PyFloat_FromDouble(_return_value);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SCHED_H) && defined(HAVE_SCHED_RR_GET_INTERVAL) */
+
+#if defined(HAVE_SCHED_H)
+
+PyDoc_STRVAR(os_sched_yield__doc__,
+"sched_yield($module, /)\n"
+"--\n"
+"\n"
+"Voluntarily relinquish the CPU.");
+
+#define OS_SCHED_YIELD_METHODDEF \
+ {"sched_yield", (PyCFunction)os_sched_yield, METH_NOARGS, os_sched_yield__doc__},
+
+static PyObject *
+os_sched_yield_impl(PyModuleDef *module);
+
+static PyObject *
+os_sched_yield(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return os_sched_yield_impl(module);
+}
+
+#endif /* defined(HAVE_SCHED_H) */
+
+#if defined(HAVE_SCHED_H) && defined(HAVE_SCHED_SETAFFINITY)
+
+PyDoc_STRVAR(os_sched_setaffinity__doc__,
+"sched_setaffinity($module, pid, mask, /)\n"
+"--\n"
+"\n"
+"Set the CPU affinity of the process identified by pid to mask.\n"
+"\n"
+"mask should be an iterable of integers identifying CPUs.");
+
+#define OS_SCHED_SETAFFINITY_METHODDEF \
+ {"sched_setaffinity", (PyCFunction)os_sched_setaffinity, METH_VARARGS, os_sched_setaffinity__doc__},
+
+static PyObject *
+os_sched_setaffinity_impl(PyModuleDef *module, pid_t pid, PyObject *mask);
+
+static PyObject *
+os_sched_setaffinity(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ pid_t pid;
+ PyObject *mask;
+
+ if (!PyArg_ParseTuple(args, "" _Py_PARSE_PID "O:sched_setaffinity",
+ &pid, &mask))
+ goto exit;
+ return_value = os_sched_setaffinity_impl(module, pid, mask);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SCHED_H) && defined(HAVE_SCHED_SETAFFINITY) */
+
+#if defined(HAVE_SCHED_H) && defined(HAVE_SCHED_SETAFFINITY)
+
+PyDoc_STRVAR(os_sched_getaffinity__doc__,
+"sched_getaffinity($module, pid, /)\n"
+"--\n"
+"\n"
+"Return the affinity of the process identified by pid.\n"
+"\n"
+"The affinity is returned as a set of CPU identifiers.");
+
+#define OS_SCHED_GETAFFINITY_METHODDEF \
+ {"sched_getaffinity", (PyCFunction)os_sched_getaffinity, METH_O, os_sched_getaffinity__doc__},
+
+static PyObject *
+os_sched_getaffinity_impl(PyModuleDef *module, pid_t pid);
+
+static PyObject *
+os_sched_getaffinity(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ pid_t pid;
+
+ if (!PyArg_Parse(arg, "" _Py_PARSE_PID ":sched_getaffinity", &pid))
+ goto exit;
+ return_value = os_sched_getaffinity_impl(module, pid);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SCHED_H) && defined(HAVE_SCHED_SETAFFINITY) */
+
+#if (defined(HAVE_OPENPTY) || defined(HAVE__GETPTY) || defined(HAVE_DEV_PTMX))
+
+PyDoc_STRVAR(os_openpty__doc__,
+"openpty($module, /)\n"
+"--\n"
+"\n"
+"Open a pseudo-terminal.\n"
+"\n"
+"Return a tuple of (master_fd, slave_fd) containing open file descriptors\n"
+"for both the master and slave ends.");
+
+#define OS_OPENPTY_METHODDEF \
+ {"openpty", (PyCFunction)os_openpty, METH_NOARGS, os_openpty__doc__},
+
+static PyObject *
+os_openpty_impl(PyModuleDef *module);
+
+static PyObject *
+os_openpty(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return os_openpty_impl(module);
+}
+
+#endif /* (defined(HAVE_OPENPTY) || defined(HAVE__GETPTY) || defined(HAVE_DEV_PTMX)) */
+
+#if defined(HAVE_FORKPTY)
+
+PyDoc_STRVAR(os_forkpty__doc__,
+"forkpty($module, /)\n"
+"--\n"
+"\n"
+"Fork a new process with a new pseudo-terminal as controlling tty.\n"
+"\n"
+"Returns a tuple of (pid, master_fd).\n"
+"Like fork(), return pid of 0 to the child process,\n"
+"and pid of child to the parent process.\n"
+"To both, return fd of newly opened pseudo-terminal.");
+
+#define OS_FORKPTY_METHODDEF \
+ {"forkpty", (PyCFunction)os_forkpty, METH_NOARGS, os_forkpty__doc__},
+
+static PyObject *
+os_forkpty_impl(PyModuleDef *module);
+
+static PyObject *
+os_forkpty(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return os_forkpty_impl(module);
+}
+
+#endif /* defined(HAVE_FORKPTY) */
+
+#if defined(HAVE_GETEGID)
+
+PyDoc_STRVAR(os_getegid__doc__,
+"getegid($module, /)\n"
+"--\n"
+"\n"
+"Return the current process\'s effective group id.");
+
+#define OS_GETEGID_METHODDEF \
+ {"getegid", (PyCFunction)os_getegid, METH_NOARGS, os_getegid__doc__},
+
+static PyObject *
+os_getegid_impl(PyModuleDef *module);
+
+static PyObject *
+os_getegid(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return os_getegid_impl(module);
+}
+
+#endif /* defined(HAVE_GETEGID) */
+
+#if defined(HAVE_GETEUID)
+
+PyDoc_STRVAR(os_geteuid__doc__,
+"geteuid($module, /)\n"
+"--\n"
+"\n"
+"Return the current process\'s effective user id.");
+
+#define OS_GETEUID_METHODDEF \
+ {"geteuid", (PyCFunction)os_geteuid, METH_NOARGS, os_geteuid__doc__},
+
+static PyObject *
+os_geteuid_impl(PyModuleDef *module);
+
+static PyObject *
+os_geteuid(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return os_geteuid_impl(module);
+}
+
+#endif /* defined(HAVE_GETEUID) */
+
+#if defined(HAVE_GETGID)
+
+PyDoc_STRVAR(os_getgid__doc__,
+"getgid($module, /)\n"
+"--\n"
+"\n"
+"Return the current process\'s group id.");
+
+#define OS_GETGID_METHODDEF \
+ {"getgid", (PyCFunction)os_getgid, METH_NOARGS, os_getgid__doc__},
+
+static PyObject *
+os_getgid_impl(PyModuleDef *module);
+
+static PyObject *
+os_getgid(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return os_getgid_impl(module);
+}
+
+#endif /* defined(HAVE_GETGID) */
+
+PyDoc_STRVAR(os_getpid__doc__,
+"getpid($module, /)\n"
+"--\n"
+"\n"
+"Return the current process id.");
+
+#define OS_GETPID_METHODDEF \
+ {"getpid", (PyCFunction)os_getpid, METH_NOARGS, os_getpid__doc__},
+
+static PyObject *
+os_getpid_impl(PyModuleDef *module);
+
+static PyObject *
+os_getpid(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return os_getpid_impl(module);
+}
+
+#if defined(HAVE_GETGROUPS)
+
+PyDoc_STRVAR(os_getgroups__doc__,
+"getgroups($module, /)\n"
+"--\n"
+"\n"
+"Return list of supplemental group IDs for the process.");
+
+#define OS_GETGROUPS_METHODDEF \
+ {"getgroups", (PyCFunction)os_getgroups, METH_NOARGS, os_getgroups__doc__},
+
+static PyObject *
+os_getgroups_impl(PyModuleDef *module);
+
+static PyObject *
+os_getgroups(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return os_getgroups_impl(module);
+}
+
+#endif /* defined(HAVE_GETGROUPS) */
+
+#if defined(HAVE_GETPGID)
+
+PyDoc_STRVAR(os_getpgid__doc__,
+"getpgid($module, /, pid)\n"
+"--\n"
+"\n"
+"Call the system call getpgid(), and return the result.");
+
+#define OS_GETPGID_METHODDEF \
+ {"getpgid", (PyCFunction)os_getpgid, METH_VARARGS|METH_KEYWORDS, os_getpgid__doc__},
+
+static PyObject *
+os_getpgid_impl(PyModuleDef *module, pid_t pid);
+
+static PyObject *
+os_getpgid(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"pid", NULL};
+ pid_t pid;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "" _Py_PARSE_PID ":getpgid", _keywords,
+ &pid))
+ goto exit;
+ return_value = os_getpgid_impl(module, pid);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_GETPGID) */
+
+#if defined(HAVE_GETPGRP)
+
+PyDoc_STRVAR(os_getpgrp__doc__,
+"getpgrp($module, /)\n"
+"--\n"
+"\n"
+"Return the current process group id.");
+
+#define OS_GETPGRP_METHODDEF \
+ {"getpgrp", (PyCFunction)os_getpgrp, METH_NOARGS, os_getpgrp__doc__},
+
+static PyObject *
+os_getpgrp_impl(PyModuleDef *module);
+
+static PyObject *
+os_getpgrp(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return os_getpgrp_impl(module);
+}
+
+#endif /* defined(HAVE_GETPGRP) */
+
+#if defined(HAVE_SETPGRP)
+
+PyDoc_STRVAR(os_setpgrp__doc__,
+"setpgrp($module, /)\n"
+"--\n"
+"\n"
+"Make the current process the leader of its process group.");
+
+#define OS_SETPGRP_METHODDEF \
+ {"setpgrp", (PyCFunction)os_setpgrp, METH_NOARGS, os_setpgrp__doc__},
+
+static PyObject *
+os_setpgrp_impl(PyModuleDef *module);
+
+static PyObject *
+os_setpgrp(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return os_setpgrp_impl(module);
+}
+
+#endif /* defined(HAVE_SETPGRP) */
+
+#if defined(HAVE_GETPPID)
+
+PyDoc_STRVAR(os_getppid__doc__,
+"getppid($module, /)\n"
+"--\n"
+"\n"
+"Return the parent\'s process id.\n"
+"\n"
+"If the parent process has already exited, Windows machines will still\n"
+"return its id; others systems will return the id of the \'init\' process (1).");
+
+#define OS_GETPPID_METHODDEF \
+ {"getppid", (PyCFunction)os_getppid, METH_NOARGS, os_getppid__doc__},
+
+static PyObject *
+os_getppid_impl(PyModuleDef *module);
+
+static PyObject *
+os_getppid(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return os_getppid_impl(module);
+}
+
+#endif /* defined(HAVE_GETPPID) */
+
+#if defined(HAVE_GETLOGIN)
+
+PyDoc_STRVAR(os_getlogin__doc__,
+"getlogin($module, /)\n"
+"--\n"
+"\n"
+"Return the actual login name.");
+
+#define OS_GETLOGIN_METHODDEF \
+ {"getlogin", (PyCFunction)os_getlogin, METH_NOARGS, os_getlogin__doc__},
+
+static PyObject *
+os_getlogin_impl(PyModuleDef *module);
+
+static PyObject *
+os_getlogin(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return os_getlogin_impl(module);
+}
+
+#endif /* defined(HAVE_GETLOGIN) */
+
+#if defined(HAVE_GETUID)
+
+PyDoc_STRVAR(os_getuid__doc__,
+"getuid($module, /)\n"
+"--\n"
+"\n"
+"Return the current process\'s user id.");
+
+#define OS_GETUID_METHODDEF \
+ {"getuid", (PyCFunction)os_getuid, METH_NOARGS, os_getuid__doc__},
+
+static PyObject *
+os_getuid_impl(PyModuleDef *module);
+
+static PyObject *
+os_getuid(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return os_getuid_impl(module);
+}
+
+#endif /* defined(HAVE_GETUID) */
+
+#if defined(HAVE_KILL)
+
+PyDoc_STRVAR(os_kill__doc__,
+"kill($module, pid, signal, /)\n"
+"--\n"
+"\n"
+"Kill a process with a signal.");
+
+#define OS_KILL_METHODDEF \
+ {"kill", (PyCFunction)os_kill, METH_VARARGS, os_kill__doc__},
+
+static PyObject *
+os_kill_impl(PyModuleDef *module, pid_t pid, Py_ssize_t signal);
+
+static PyObject *
+os_kill(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ pid_t pid;
+ Py_ssize_t signal;
+
+ if (!PyArg_ParseTuple(args, "" _Py_PARSE_PID "n:kill",
+ &pid, &signal))
+ goto exit;
+ return_value = os_kill_impl(module, pid, signal);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_KILL) */
+
+#if defined(HAVE_KILLPG)
+
+PyDoc_STRVAR(os_killpg__doc__,
+"killpg($module, pgid, signal, /)\n"
+"--\n"
+"\n"
+"Kill a process group with a signal.");
+
+#define OS_KILLPG_METHODDEF \
+ {"killpg", (PyCFunction)os_killpg, METH_VARARGS, os_killpg__doc__},
+
+static PyObject *
+os_killpg_impl(PyModuleDef *module, pid_t pgid, int signal);
+
+static PyObject *
+os_killpg(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ pid_t pgid;
+ int signal;
+
+ if (!PyArg_ParseTuple(args, "" _Py_PARSE_PID "i:killpg",
+ &pgid, &signal))
+ goto exit;
+ return_value = os_killpg_impl(module, pgid, signal);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_KILLPG) */
+
+#if defined(HAVE_PLOCK)
+
+PyDoc_STRVAR(os_plock__doc__,
+"plock($module, op, /)\n"
+"--\n"
+"\n"
+"Lock program segments into memory.\");");
+
+#define OS_PLOCK_METHODDEF \
+ {"plock", (PyCFunction)os_plock, METH_O, os_plock__doc__},
+
+static PyObject *
+os_plock_impl(PyModuleDef *module, int op);
+
+static PyObject *
+os_plock(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int op;
+
+ if (!PyArg_Parse(arg, "i:plock", &op))
+ goto exit;
+ return_value = os_plock_impl(module, op);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_PLOCK) */
+
+#if defined(HAVE_SETUID)
+
+PyDoc_STRVAR(os_setuid__doc__,
+"setuid($module, uid, /)\n"
+"--\n"
+"\n"
+"Set the current process\'s user id.");
+
+#define OS_SETUID_METHODDEF \
+ {"setuid", (PyCFunction)os_setuid, METH_O, os_setuid__doc__},
+
+static PyObject *
+os_setuid_impl(PyModuleDef *module, uid_t uid);
+
+static PyObject *
+os_setuid(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ uid_t uid;
+
+ if (!PyArg_Parse(arg, "O&:setuid", _Py_Uid_Converter, &uid))
+ goto exit;
+ return_value = os_setuid_impl(module, uid);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SETUID) */
+
+#if defined(HAVE_SETEUID)
+
+PyDoc_STRVAR(os_seteuid__doc__,
+"seteuid($module, euid, /)\n"
+"--\n"
+"\n"
+"Set the current process\'s effective user id.");
+
+#define OS_SETEUID_METHODDEF \
+ {"seteuid", (PyCFunction)os_seteuid, METH_O, os_seteuid__doc__},
+
+static PyObject *
+os_seteuid_impl(PyModuleDef *module, uid_t euid);
+
+static PyObject *
+os_seteuid(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ uid_t euid;
+
+ if (!PyArg_Parse(arg, "O&:seteuid", _Py_Uid_Converter, &euid))
+ goto exit;
+ return_value = os_seteuid_impl(module, euid);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SETEUID) */
+
+#if defined(HAVE_SETEGID)
+
+PyDoc_STRVAR(os_setegid__doc__,
+"setegid($module, egid, /)\n"
+"--\n"
+"\n"
+"Set the current process\'s effective group id.");
+
+#define OS_SETEGID_METHODDEF \
+ {"setegid", (PyCFunction)os_setegid, METH_O, os_setegid__doc__},
+
+static PyObject *
+os_setegid_impl(PyModuleDef *module, gid_t egid);
+
+static PyObject *
+os_setegid(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ gid_t egid;
+
+ if (!PyArg_Parse(arg, "O&:setegid", _Py_Gid_Converter, &egid))
+ goto exit;
+ return_value = os_setegid_impl(module, egid);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SETEGID) */
+
+#if defined(HAVE_SETREUID)
+
+PyDoc_STRVAR(os_setreuid__doc__,
+"setreuid($module, ruid, euid, /)\n"
+"--\n"
+"\n"
+"Set the current process\'s real and effective user ids.");
+
+#define OS_SETREUID_METHODDEF \
+ {"setreuid", (PyCFunction)os_setreuid, METH_VARARGS, os_setreuid__doc__},
+
+static PyObject *
+os_setreuid_impl(PyModuleDef *module, uid_t ruid, uid_t euid);
+
+static PyObject *
+os_setreuid(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ uid_t ruid;
+ uid_t euid;
+
+ if (!PyArg_ParseTuple(args, "O&O&:setreuid",
+ _Py_Uid_Converter, &ruid, _Py_Uid_Converter, &euid))
+ goto exit;
+ return_value = os_setreuid_impl(module, ruid, euid);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SETREUID) */
+
+#if defined(HAVE_SETREGID)
+
+PyDoc_STRVAR(os_setregid__doc__,
+"setregid($module, rgid, egid, /)\n"
+"--\n"
+"\n"
+"Set the current process\'s real and effective group ids.");
+
+#define OS_SETREGID_METHODDEF \
+ {"setregid", (PyCFunction)os_setregid, METH_VARARGS, os_setregid__doc__},
+
+static PyObject *
+os_setregid_impl(PyModuleDef *module, gid_t rgid, gid_t egid);
+
+static PyObject *
+os_setregid(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ gid_t rgid;
+ gid_t egid;
+
+ if (!PyArg_ParseTuple(args, "O&O&:setregid",
+ _Py_Gid_Converter, &rgid, _Py_Gid_Converter, &egid))
+ goto exit;
+ return_value = os_setregid_impl(module, rgid, egid);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SETREGID) */
+
+#if defined(HAVE_SETGID)
+
+PyDoc_STRVAR(os_setgid__doc__,
+"setgid($module, gid, /)\n"
+"--\n"
+"\n"
+"Set the current process\'s group id.");
+
+#define OS_SETGID_METHODDEF \
+ {"setgid", (PyCFunction)os_setgid, METH_O, os_setgid__doc__},
+
+static PyObject *
+os_setgid_impl(PyModuleDef *module, gid_t gid);
+
+static PyObject *
+os_setgid(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ gid_t gid;
+
+ if (!PyArg_Parse(arg, "O&:setgid", _Py_Gid_Converter, &gid))
+ goto exit;
+ return_value = os_setgid_impl(module, gid);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SETGID) */
+
+#if defined(HAVE_SETGROUPS)
+
+PyDoc_STRVAR(os_setgroups__doc__,
+"setgroups($module, groups, /)\n"
+"--\n"
+"\n"
+"Set the groups of the current process to list.");
+
+#define OS_SETGROUPS_METHODDEF \
+ {"setgroups", (PyCFunction)os_setgroups, METH_O, os_setgroups__doc__},
+
+#endif /* defined(HAVE_SETGROUPS) */
+
+#if defined(HAVE_WAIT3)
+
+PyDoc_STRVAR(os_wait3__doc__,
+"wait3($module, /, options)\n"
+"--\n"
+"\n"
+"Wait for completion of a child process.\n"
+"\n"
+"Returns a tuple of information about the child process:\n"
+" (pid, status, rusage)");
+
+#define OS_WAIT3_METHODDEF \
+ {"wait3", (PyCFunction)os_wait3, METH_VARARGS|METH_KEYWORDS, os_wait3__doc__},
+
+static PyObject *
+os_wait3_impl(PyModuleDef *module, int options);
+
+static PyObject *
+os_wait3(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"options", NULL};
+ int options;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:wait3", _keywords,
+ &options))
+ goto exit;
+ return_value = os_wait3_impl(module, options);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_WAIT3) */
+
+#if defined(HAVE_WAIT4)
+
+PyDoc_STRVAR(os_wait4__doc__,
+"wait4($module, /, pid, options)\n"
+"--\n"
+"\n"
+"Wait for completion of a specific child process.\n"
+"\n"
+"Returns a tuple of information about the child process:\n"
+" (pid, status, rusage)");
+
+#define OS_WAIT4_METHODDEF \
+ {"wait4", (PyCFunction)os_wait4, METH_VARARGS|METH_KEYWORDS, os_wait4__doc__},
+
+static PyObject *
+os_wait4_impl(PyModuleDef *module, pid_t pid, int options);
+
+static PyObject *
+os_wait4(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"pid", "options", NULL};
+ pid_t pid;
+ int options;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "" _Py_PARSE_PID "i:wait4", _keywords,
+ &pid, &options))
+ goto exit;
+ return_value = os_wait4_impl(module, pid, options);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_WAIT4) */
+
+#if (defined(HAVE_WAITID) && !defined(__APPLE__))
+
+PyDoc_STRVAR(os_waitid__doc__,
+"waitid($module, idtype, id, options, /)\n"
+"--\n"
+"\n"
+"Returns the result of waiting for a process or processes.\n"
+"\n"
+" idtype\n"
+" Must be one of be P_PID, P_PGID or P_ALL.\n"
+" id\n"
+" The id to wait on.\n"
+" options\n"
+" Constructed from the ORing of one or more of WEXITED, WSTOPPED\n"
+" or WCONTINUED and additionally may be ORed with WNOHANG or WNOWAIT.\n"
+"\n"
+"Returns either waitid_result or None if WNOHANG is specified and there are\n"
+"no children in a waitable state.");
+
+#define OS_WAITID_METHODDEF \
+ {"waitid", (PyCFunction)os_waitid, METH_VARARGS, os_waitid__doc__},
+
+static PyObject *
+os_waitid_impl(PyModuleDef *module, idtype_t idtype, id_t id, int options);
+
+static PyObject *
+os_waitid(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ idtype_t idtype;
+ id_t id;
+ int options;
+
+ if (!PyArg_ParseTuple(args, "i" _Py_PARSE_PID "i:waitid",
+ &idtype, &id, &options))
+ goto exit;
+ return_value = os_waitid_impl(module, idtype, id, options);
+
+exit:
+ return return_value;
+}
+
+#endif /* (defined(HAVE_WAITID) && !defined(__APPLE__)) */
+
+#if defined(HAVE_WAITPID)
+
+PyDoc_STRVAR(os_waitpid__doc__,
+"waitpid($module, pid, options, /)\n"
+"--\n"
+"\n"
+"Wait for completion of a given child process.\n"
+"\n"
+"Returns a tuple of information regarding the child process:\n"
+" (pid, status)\n"
+"\n"
+"The options argument is ignored on Windows.");
+
+#define OS_WAITPID_METHODDEF \
+ {"waitpid", (PyCFunction)os_waitpid, METH_VARARGS, os_waitpid__doc__},
+
+static PyObject *
+os_waitpid_impl(PyModuleDef *module, pid_t pid, int options);
+
+static PyObject *
+os_waitpid(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ pid_t pid;
+ int options;
+
+ if (!PyArg_ParseTuple(args, "" _Py_PARSE_PID "i:waitpid",
+ &pid, &options))
+ goto exit;
+ return_value = os_waitpid_impl(module, pid, options);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_WAITPID) */
+
+#if defined(HAVE_CWAIT)
+
+PyDoc_STRVAR(os_waitpid__doc__,
+"waitpid($module, pid, options, /)\n"
+"--\n"
+"\n"
+"Wait for completion of a given process.\n"
+"\n"
+"Returns a tuple of information regarding the process:\n"
+" (pid, status << 8)\n"
+"\n"
+"The options argument is ignored on Windows.");
+
+#define OS_WAITPID_METHODDEF \
+ {"waitpid", (PyCFunction)os_waitpid, METH_VARARGS, os_waitpid__doc__},
+
+static PyObject *
+os_waitpid_impl(PyModuleDef *module, Py_intptr_t pid, int options);
+
+static PyObject *
+os_waitpid(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_intptr_t pid;
+ int options;
+
+ if (!PyArg_ParseTuple(args, "" _Py_PARSE_INTPTR "i:waitpid",
+ &pid, &options))
+ goto exit;
+ return_value = os_waitpid_impl(module, pid, options);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_CWAIT) */
+
+#if defined(HAVE_WAIT)
+
+PyDoc_STRVAR(os_wait__doc__,
+"wait($module, /)\n"
+"--\n"
+"\n"
+"Wait for completion of a child process.\n"
+"\n"
+"Returns a tuple of information about the child process:\n"
+" (pid, status)");
+
+#define OS_WAIT_METHODDEF \
+ {"wait", (PyCFunction)os_wait, METH_NOARGS, os_wait__doc__},
+
+static PyObject *
+os_wait_impl(PyModuleDef *module);
+
+static PyObject *
+os_wait(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return os_wait_impl(module);
+}
+
+#endif /* defined(HAVE_WAIT) */
+
+#if defined(HAVE_SYMLINK)
+
+PyDoc_STRVAR(os_symlink__doc__,
+"symlink($module, /, src, dst, target_is_directory=False, *, dir_fd=None)\n"
+"--\n"
+"\n"
+"Create a symbolic link pointing to src named dst.\n"
+"\n"
+"target_is_directory is required on Windows if the target is to be\n"
+" interpreted as a directory. (On Windows, symlink requires\n"
+" Windows 6.0 or greater, and raises a NotImplementedError otherwise.)\n"
+" target_is_directory is ignored on non-Windows platforms.\n"
+"\n"
+"If dir_fd is not None, it should be a file descriptor open to a directory,\n"
+" and path should be relative; path will then be relative to that directory.\n"
+"dir_fd may not be implemented on your platform.\n"
+" If it is unavailable, using it will raise a NotImplementedError.");
+
+#define OS_SYMLINK_METHODDEF \
+ {"symlink", (PyCFunction)os_symlink, METH_VARARGS|METH_KEYWORDS, os_symlink__doc__},
+
+static PyObject *
+os_symlink_impl(PyModuleDef *module, path_t *src, path_t *dst,
+ int target_is_directory, int dir_fd);
+
+static PyObject *
+os_symlink(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"src", "dst", "target_is_directory", "dir_fd", NULL};
+ path_t src = PATH_T_INITIALIZE("symlink", "src", 0, 0);
+ path_t dst = PATH_T_INITIALIZE("symlink", "dst", 0, 0);
+ int target_is_directory = 0;
+ int dir_fd = DEFAULT_DIR_FD;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&|p$O&:symlink", _keywords,
+ path_converter, &src, path_converter, &dst, &target_is_directory, SYMLINKAT_DIR_FD_CONVERTER, &dir_fd))
+ goto exit;
+ return_value = os_symlink_impl(module, &src, &dst, target_is_directory, dir_fd);
+
+exit:
+ /* Cleanup for src */
+ path_cleanup(&src);
+ /* Cleanup for dst */
+ path_cleanup(&dst);
+
+ return return_value;
+}
+
+#endif /* defined(HAVE_SYMLINK) */
+
+#if defined(HAVE_TIMES)
+
+PyDoc_STRVAR(os_times__doc__,
+"times($module, /)\n"
+"--\n"
+"\n"
+"Return a collection containing process timing information.\n"
+"\n"
+"The object returned behaves like a named tuple with these fields:\n"
+" (utime, stime, cutime, cstime, elapsed_time)\n"
+"All fields are floating point numbers.");
+
+#define OS_TIMES_METHODDEF \
+ {"times", (PyCFunction)os_times, METH_NOARGS, os_times__doc__},
+
+static PyObject *
+os_times_impl(PyModuleDef *module);
+
+static PyObject *
+os_times(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return os_times_impl(module);
+}
+
+#endif /* defined(HAVE_TIMES) */
+
+#if defined(HAVE_GETSID)
+
+PyDoc_STRVAR(os_getsid__doc__,
+"getsid($module, pid, /)\n"
+"--\n"
+"\n"
+"Call the system call getsid(pid) and return the result.");
+
+#define OS_GETSID_METHODDEF \
+ {"getsid", (PyCFunction)os_getsid, METH_O, os_getsid__doc__},
+
+static PyObject *
+os_getsid_impl(PyModuleDef *module, pid_t pid);
+
+static PyObject *
+os_getsid(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ pid_t pid;
+
+ if (!PyArg_Parse(arg, "" _Py_PARSE_PID ":getsid", &pid))
+ goto exit;
+ return_value = os_getsid_impl(module, pid);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_GETSID) */
+
+#if defined(HAVE_SETSID)
+
+PyDoc_STRVAR(os_setsid__doc__,
+"setsid($module, /)\n"
+"--\n"
+"\n"
+"Call the system call setsid().");
+
+#define OS_SETSID_METHODDEF \
+ {"setsid", (PyCFunction)os_setsid, METH_NOARGS, os_setsid__doc__},
+
+static PyObject *
+os_setsid_impl(PyModuleDef *module);
+
+static PyObject *
+os_setsid(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return os_setsid_impl(module);
+}
+
+#endif /* defined(HAVE_SETSID) */
+
+#if defined(HAVE_SETPGID)
+
+PyDoc_STRVAR(os_setpgid__doc__,
+"setpgid($module, pid, pgrp, /)\n"
+"--\n"
+"\n"
+"Call the system call setpgid(pid, pgrp).");
+
+#define OS_SETPGID_METHODDEF \
+ {"setpgid", (PyCFunction)os_setpgid, METH_VARARGS, os_setpgid__doc__},
+
+static PyObject *
+os_setpgid_impl(PyModuleDef *module, pid_t pid, pid_t pgrp);
+
+static PyObject *
+os_setpgid(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ pid_t pid;
+ pid_t pgrp;
+
+ if (!PyArg_ParseTuple(args, "" _Py_PARSE_PID "" _Py_PARSE_PID ":setpgid",
+ &pid, &pgrp))
+ goto exit;
+ return_value = os_setpgid_impl(module, pid, pgrp);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SETPGID) */
+
+#if defined(HAVE_TCGETPGRP)
+
+PyDoc_STRVAR(os_tcgetpgrp__doc__,
+"tcgetpgrp($module, fd, /)\n"
+"--\n"
+"\n"
+"Return the process group associated with the terminal specified by fd.");
+
+#define OS_TCGETPGRP_METHODDEF \
+ {"tcgetpgrp", (PyCFunction)os_tcgetpgrp, METH_O, os_tcgetpgrp__doc__},
+
+static PyObject *
+os_tcgetpgrp_impl(PyModuleDef *module, int fd);
+
+static PyObject *
+os_tcgetpgrp(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int fd;
+
+ if (!PyArg_Parse(arg, "i:tcgetpgrp", &fd))
+ goto exit;
+ return_value = os_tcgetpgrp_impl(module, fd);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_TCGETPGRP) */
+
+#if defined(HAVE_TCSETPGRP)
+
+PyDoc_STRVAR(os_tcsetpgrp__doc__,
+"tcsetpgrp($module, fd, pgid, /)\n"
+"--\n"
+"\n"
+"Set the process group associated with the terminal specified by fd.");
+
+#define OS_TCSETPGRP_METHODDEF \
+ {"tcsetpgrp", (PyCFunction)os_tcsetpgrp, METH_VARARGS, os_tcsetpgrp__doc__},
+
+static PyObject *
+os_tcsetpgrp_impl(PyModuleDef *module, int fd, pid_t pgid);
+
+static PyObject *
+os_tcsetpgrp(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int fd;
+ pid_t pgid;
+
+ if (!PyArg_ParseTuple(args, "i" _Py_PARSE_PID ":tcsetpgrp",
+ &fd, &pgid))
+ goto exit;
+ return_value = os_tcsetpgrp_impl(module, fd, pgid);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_TCSETPGRP) */
+
+PyDoc_STRVAR(os_open__doc__,
+"open($module, /, path, flags, mode=511, *, dir_fd=None)\n"
+"--\n"
+"\n"
+"Open a file for low level IO. Returns a file descriptor (integer).\n"
+"\n"
+"If dir_fd is not None, it should be a file descriptor open to a directory,\n"
+" and path should be relative; path will then be relative to that directory.\n"
+"dir_fd may not be implemented on your platform.\n"
+" If it is unavailable, using it will raise a NotImplementedError.");
+
+#define OS_OPEN_METHODDEF \
+ {"open", (PyCFunction)os_open, METH_VARARGS|METH_KEYWORDS, os_open__doc__},
+
+static int
+os_open_impl(PyModuleDef *module, path_t *path, int flags, int mode,
+ int dir_fd);
+
+static PyObject *
+os_open(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", "flags", "mode", "dir_fd", NULL};
+ path_t path = PATH_T_INITIALIZE("open", "path", 0, 0);
+ int flags;
+ int mode = 511;
+ int dir_fd = DEFAULT_DIR_FD;
+ int _return_value;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&i|i$O&:open", _keywords,
+ path_converter, &path, &flags, &mode, OPENAT_DIR_FD_CONVERTER, &dir_fd))
+ goto exit;
+ _return_value = os_open_impl(module, &path, flags, mode, dir_fd);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromLong((long)_return_value);
+
+exit:
+ /* Cleanup for path */
+ path_cleanup(&path);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(os_close__doc__,
+"close($module, /, fd)\n"
+"--\n"
+"\n"
+"Close a file descriptor.");
+
+#define OS_CLOSE_METHODDEF \
+ {"close", (PyCFunction)os_close, METH_VARARGS|METH_KEYWORDS, os_close__doc__},
+
+static PyObject *
+os_close_impl(PyModuleDef *module, int fd);
+
+static PyObject *
+os_close(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"fd", NULL};
+ int fd;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:close", _keywords,
+ &fd))
+ goto exit;
+ return_value = os_close_impl(module, fd);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(os_closerange__doc__,
+"closerange($module, fd_low, fd_high, /)\n"
+"--\n"
+"\n"
+"Closes all file descriptors in [fd_low, fd_high), ignoring errors.");
+
+#define OS_CLOSERANGE_METHODDEF \
+ {"closerange", (PyCFunction)os_closerange, METH_VARARGS, os_closerange__doc__},
+
+static PyObject *
+os_closerange_impl(PyModuleDef *module, int fd_low, int fd_high);
+
+static PyObject *
+os_closerange(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int fd_low;
+ int fd_high;
+
+ if (!PyArg_ParseTuple(args, "ii:closerange",
+ &fd_low, &fd_high))
+ goto exit;
+ return_value = os_closerange_impl(module, fd_low, fd_high);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(os_dup__doc__,
+"dup($module, fd, /)\n"
+"--\n"
+"\n"
+"Return a duplicate of a file descriptor.");
+
+#define OS_DUP_METHODDEF \
+ {"dup", (PyCFunction)os_dup, METH_O, os_dup__doc__},
+
+static int
+os_dup_impl(PyModuleDef *module, int fd);
+
+static PyObject *
+os_dup(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int fd;
+ int _return_value;
+
+ if (!PyArg_Parse(arg, "i:dup", &fd))
+ goto exit;
+ _return_value = os_dup_impl(module, fd);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromLong((long)_return_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(os_dup2__doc__,
+"dup2($module, /, fd, fd2, inheritable=True)\n"
+"--\n"
+"\n"
+"Duplicate file descriptor.");
+
+#define OS_DUP2_METHODDEF \
+ {"dup2", (PyCFunction)os_dup2, METH_VARARGS|METH_KEYWORDS, os_dup2__doc__},
+
+static PyObject *
+os_dup2_impl(PyModuleDef *module, int fd, int fd2, int inheritable);
+
+static PyObject *
+os_dup2(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"fd", "fd2", "inheritable", NULL};
+ int fd;
+ int fd2;
+ int inheritable = 1;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ii|p:dup2", _keywords,
+ &fd, &fd2, &inheritable))
+ goto exit;
+ return_value = os_dup2_impl(module, fd, fd2, inheritable);
+
+exit:
+ return return_value;
+}
+
+#if defined(HAVE_LOCKF)
+
+PyDoc_STRVAR(os_lockf__doc__,
+"lockf($module, fd, command, length, /)\n"
+"--\n"
+"\n"
+"Apply, test or remove a POSIX lock on an open file descriptor.\n"
+"\n"
+" fd\n"
+" An open file descriptor.\n"
+" command\n"
+" One of F_LOCK, F_TLOCK, F_ULOCK or F_TEST.\n"
+" length\n"
+" The number of bytes to lock, starting at the current position.");
+
+#define OS_LOCKF_METHODDEF \
+ {"lockf", (PyCFunction)os_lockf, METH_VARARGS, os_lockf__doc__},
+
+static PyObject *
+os_lockf_impl(PyModuleDef *module, int fd, int command, Py_off_t length);
+
+static PyObject *
+os_lockf(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int fd;
+ int command;
+ Py_off_t length;
+
+ if (!PyArg_ParseTuple(args, "iiO&:lockf",
+ &fd, &command, Py_off_t_converter, &length))
+ goto exit;
+ return_value = os_lockf_impl(module, fd, command, length);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_LOCKF) */
+
+PyDoc_STRVAR(os_lseek__doc__,
+"lseek($module, fd, position, how, /)\n"
+"--\n"
+"\n"
+"Set the position of a file descriptor. Return the new position.\n"
+"\n"
+"Return the new cursor position in number of bytes\n"
+"relative to the beginning of the file.");
+
+#define OS_LSEEK_METHODDEF \
+ {"lseek", (PyCFunction)os_lseek, METH_VARARGS, os_lseek__doc__},
+
+static Py_off_t
+os_lseek_impl(PyModuleDef *module, int fd, Py_off_t position, int how);
+
+static PyObject *
+os_lseek(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int fd;
+ Py_off_t position;
+ int how;
+ Py_off_t _return_value;
+
+ if (!PyArg_ParseTuple(args, "iO&i:lseek",
+ &fd, Py_off_t_converter, &position, &how))
+ goto exit;
+ _return_value = os_lseek_impl(module, fd, position, how);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromPy_off_t(_return_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(os_read__doc__,
+"read($module, fd, length, /)\n"
+"--\n"
+"\n"
+"Read from a file descriptor. Returns a bytes object.");
+
+#define OS_READ_METHODDEF \
+ {"read", (PyCFunction)os_read, METH_VARARGS, os_read__doc__},
+
+static PyObject *
+os_read_impl(PyModuleDef *module, int fd, Py_ssize_t length);
+
+static PyObject *
+os_read(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int fd;
+ Py_ssize_t length;
+
+ if (!PyArg_ParseTuple(args, "in:read",
+ &fd, &length))
+ goto exit;
+ return_value = os_read_impl(module, fd, length);
+
+exit:
+ return return_value;
+}
+
+#if defined(HAVE_READV)
+
+PyDoc_STRVAR(os_readv__doc__,
+"readv($module, fd, buffers, /)\n"
+"--\n"
+"\n"
+"Read from a file descriptor fd into an iterable of buffers.\n"
+"\n"
+"The buffers should be mutable buffers accepting bytes.\n"
+"readv will transfer data into each buffer until it is full\n"
+"and then move on to the next buffer in the sequence to hold\n"
+"the rest of the data.\n"
+"\n"
+"readv returns the total number of bytes read,\n"
+"which may be less than the total capacity of all the buffers.");
+
+#define OS_READV_METHODDEF \
+ {"readv", (PyCFunction)os_readv, METH_VARARGS, os_readv__doc__},
+
+static Py_ssize_t
+os_readv_impl(PyModuleDef *module, int fd, PyObject *buffers);
+
+static PyObject *
+os_readv(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int fd;
+ PyObject *buffers;
+ Py_ssize_t _return_value;
+
+ if (!PyArg_ParseTuple(args, "iO:readv",
+ &fd, &buffers))
+ goto exit;
+ _return_value = os_readv_impl(module, fd, buffers);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromSsize_t(_return_value);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_READV) */
+
+#if defined(HAVE_PREAD)
+
+PyDoc_STRVAR(os_pread__doc__,
+"pread($module, fd, length, offset, /)\n"
+"--\n"
+"\n"
+"Read a number of bytes from a file descriptor starting at a particular offset.\n"
+"\n"
+"Read length bytes from file descriptor fd, starting at offset bytes from\n"
+"the beginning of the file. The file offset remains unchanged.");
+
+#define OS_PREAD_METHODDEF \
+ {"pread", (PyCFunction)os_pread, METH_VARARGS, os_pread__doc__},
+
+static PyObject *
+os_pread_impl(PyModuleDef *module, int fd, int length, Py_off_t offset);
+
+static PyObject *
+os_pread(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int fd;
+ int length;
+ Py_off_t offset;
+
+ if (!PyArg_ParseTuple(args, "iiO&:pread",
+ &fd, &length, Py_off_t_converter, &offset))
+ goto exit;
+ return_value = os_pread_impl(module, fd, length, offset);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_PREAD) */
+
+PyDoc_STRVAR(os_write__doc__,
+"write($module, fd, data, /)\n"
+"--\n"
+"\n"
+"Write a bytes object to a file descriptor.");
+
+#define OS_WRITE_METHODDEF \
+ {"write", (PyCFunction)os_write, METH_VARARGS, os_write__doc__},
+
+static Py_ssize_t
+os_write_impl(PyModuleDef *module, int fd, Py_buffer *data);
+
+static PyObject *
+os_write(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int fd;
+ Py_buffer data = {NULL, NULL};
+ Py_ssize_t _return_value;
+
+ if (!PyArg_ParseTuple(args, "iy*:write",
+ &fd, &data))
+ goto exit;
+ _return_value = os_write_impl(module, fd, &data);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromSsize_t(_return_value);
+
+exit:
+ /* Cleanup for data */
+ if (data.obj)
+ PyBuffer_Release(&data);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(os_fstat__doc__,
+"fstat($module, /, fd)\n"
+"--\n"
+"\n"
+"Perform a stat system call on the given file descriptor.\n"
+"\n"
+"Like stat(), but for an open file descriptor.\n"
+"Equivalent to os.stat(fd).");
+
+#define OS_FSTAT_METHODDEF \
+ {"fstat", (PyCFunction)os_fstat, METH_VARARGS|METH_KEYWORDS, os_fstat__doc__},
+
+static PyObject *
+os_fstat_impl(PyModuleDef *module, int fd);
+
+static PyObject *
+os_fstat(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"fd", NULL};
+ int fd;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:fstat", _keywords,
+ &fd))
+ goto exit;
+ return_value = os_fstat_impl(module, fd);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(os_isatty__doc__,
+"isatty($module, fd, /)\n"
+"--\n"
+"\n"
+"Return True if the fd is connected to a terminal.\n"
+"\n"
+"Return True if the file descriptor is an open file descriptor\n"
+"connected to the slave end of a terminal.");
+
+#define OS_ISATTY_METHODDEF \
+ {"isatty", (PyCFunction)os_isatty, METH_O, os_isatty__doc__},
+
+static int
+os_isatty_impl(PyModuleDef *module, int fd);
+
+static PyObject *
+os_isatty(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int fd;
+ int _return_value;
+
+ if (!PyArg_Parse(arg, "i:isatty", &fd))
+ goto exit;
+ _return_value = os_isatty_impl(module, fd);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyBool_FromLong((long)_return_value);
+
+exit:
+ return return_value;
+}
+
+#if defined(HAVE_PIPE)
+
+PyDoc_STRVAR(os_pipe__doc__,
+"pipe($module, /)\n"
+"--\n"
+"\n"
+"Create a pipe.\n"
+"\n"
+"Returns a tuple of two file descriptors:\n"
+" (read_fd, write_fd)");
+
+#define OS_PIPE_METHODDEF \
+ {"pipe", (PyCFunction)os_pipe, METH_NOARGS, os_pipe__doc__},
+
+static PyObject *
+os_pipe_impl(PyModuleDef *module);
+
+static PyObject *
+os_pipe(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return os_pipe_impl(module);
+}
+
+#endif /* defined(HAVE_PIPE) */
+
+#if defined(HAVE_PIPE2)
+
+PyDoc_STRVAR(os_pipe2__doc__,
+"pipe2($module, flags, /)\n"
+"--\n"
+"\n"
+"Create a pipe with flags set atomically.\n"
+"\n"
+"Returns a tuple of two file descriptors:\n"
+" (read_fd, write_fd)\n"
+"\n"
+"flags can be constructed by ORing together one or more of these values:\n"
+"O_NONBLOCK, O_CLOEXEC.");
+
+#define OS_PIPE2_METHODDEF \
+ {"pipe2", (PyCFunction)os_pipe2, METH_O, os_pipe2__doc__},
+
+static PyObject *
+os_pipe2_impl(PyModuleDef *module, int flags);
+
+static PyObject *
+os_pipe2(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int flags;
+
+ if (!PyArg_Parse(arg, "i:pipe2", &flags))
+ goto exit;
+ return_value = os_pipe2_impl(module, flags);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_PIPE2) */
+
+#if defined(HAVE_WRITEV)
+
+PyDoc_STRVAR(os_writev__doc__,
+"writev($module, fd, buffers, /)\n"
+"--\n"
+"\n"
+"Iterate over buffers, and write the contents of each to a file descriptor.\n"
+"\n"
+"Returns the total number of bytes written.\n"
+"buffers must be a sequence of bytes-like objects.");
+
+#define OS_WRITEV_METHODDEF \
+ {"writev", (PyCFunction)os_writev, METH_VARARGS, os_writev__doc__},
+
+static Py_ssize_t
+os_writev_impl(PyModuleDef *module, int fd, PyObject *buffers);
+
+static PyObject *
+os_writev(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int fd;
+ PyObject *buffers;
+ Py_ssize_t _return_value;
+
+ if (!PyArg_ParseTuple(args, "iO:writev",
+ &fd, &buffers))
+ goto exit;
+ _return_value = os_writev_impl(module, fd, buffers);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromSsize_t(_return_value);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_WRITEV) */
+
+#if defined(HAVE_PWRITE)
+
+PyDoc_STRVAR(os_pwrite__doc__,
+"pwrite($module, fd, buffer, offset, /)\n"
+"--\n"
+"\n"
+"Write bytes to a file descriptor starting at a particular offset.\n"
+"\n"
+"Write buffer to fd, starting at offset bytes from the beginning of\n"
+"the file. Returns the number of bytes writte. Does not change the\n"
+"current file offset.");
+
+#define OS_PWRITE_METHODDEF \
+ {"pwrite", (PyCFunction)os_pwrite, METH_VARARGS, os_pwrite__doc__},
+
+static Py_ssize_t
+os_pwrite_impl(PyModuleDef *module, int fd, Py_buffer *buffer,
+ Py_off_t offset);
+
+static PyObject *
+os_pwrite(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int fd;
+ Py_buffer buffer = {NULL, NULL};
+ Py_off_t offset;
+ Py_ssize_t _return_value;
+
+ if (!PyArg_ParseTuple(args, "iy*O&:pwrite",
+ &fd, &buffer, Py_off_t_converter, &offset))
+ goto exit;
+ _return_value = os_pwrite_impl(module, fd, &buffer, offset);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromSsize_t(_return_value);
+
+exit:
+ /* Cleanup for buffer */
+ if (buffer.obj)
+ PyBuffer_Release(&buffer);
+
+ return return_value;
+}
+
+#endif /* defined(HAVE_PWRITE) */
+
+#if defined(HAVE_MKFIFO)
+
+PyDoc_STRVAR(os_mkfifo__doc__,
+"mkfifo($module, /, path, mode=438, *, dir_fd=None)\n"
+"--\n"
+"\n"
+"Create a \"fifo\" (a POSIX named pipe).\n"
+"\n"
+"If dir_fd is not None, it should be a file descriptor open to a directory,\n"
+" and path should be relative; path will then be relative to that directory.\n"
+"dir_fd may not be implemented on your platform.\n"
+" If it is unavailable, using it will raise a NotImplementedError.");
+
+#define OS_MKFIFO_METHODDEF \
+ {"mkfifo", (PyCFunction)os_mkfifo, METH_VARARGS|METH_KEYWORDS, os_mkfifo__doc__},
+
+static PyObject *
+os_mkfifo_impl(PyModuleDef *module, path_t *path, int mode, int dir_fd);
+
+static PyObject *
+os_mkfifo(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", "mode", "dir_fd", NULL};
+ path_t path = PATH_T_INITIALIZE("mkfifo", "path", 0, 0);
+ int mode = 438;
+ int dir_fd = DEFAULT_DIR_FD;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&|i$O&:mkfifo", _keywords,
+ path_converter, &path, &mode, MKFIFOAT_DIR_FD_CONVERTER, &dir_fd))
+ goto exit;
+ return_value = os_mkfifo_impl(module, &path, mode, dir_fd);
+
+exit:
+ /* Cleanup for path */
+ path_cleanup(&path);
+
+ return return_value;
+}
+
+#endif /* defined(HAVE_MKFIFO) */
+
+#if (defined(HAVE_MKNOD) && defined(HAVE_MAKEDEV))
+
+PyDoc_STRVAR(os_mknod__doc__,
+"mknod($module, /, path, mode=384, device=0, *, dir_fd=None)\n"
+"--\n"
+"\n"
+"Create a node in the file system.\n"
+"\n"
+"Create a node in the file system (file, device special file or named pipe)\n"
+"at path. mode specifies both the permissions to use and the\n"
+"type of node to be created, being combined (bitwise OR) with one of\n"
+"S_IFREG, S_IFCHR, S_IFBLK, and S_IFIFO. If S_IFCHR or S_IFBLK is set on mode,\n"
+"device defines the newly created device special file (probably using\n"
+"os.makedev()). Otherwise device is ignored.\n"
+"\n"
+"If dir_fd is not None, it should be a file descriptor open to a directory,\n"
+" and path should be relative; path will then be relative to that directory.\n"
+"dir_fd may not be implemented on your platform.\n"
+" If it is unavailable, using it will raise a NotImplementedError.");
+
+#define OS_MKNOD_METHODDEF \
+ {"mknod", (PyCFunction)os_mknod, METH_VARARGS|METH_KEYWORDS, os_mknod__doc__},
+
+static PyObject *
+os_mknod_impl(PyModuleDef *module, path_t *path, int mode, dev_t device,
+ int dir_fd);
+
+static PyObject *
+os_mknod(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", "mode", "device", "dir_fd", NULL};
+ path_t path = PATH_T_INITIALIZE("mknod", "path", 0, 0);
+ int mode = 384;
+ dev_t device = 0;
+ int dir_fd = DEFAULT_DIR_FD;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&|iO&$O&:mknod", _keywords,
+ path_converter, &path, &mode, _Py_Dev_Converter, &device, MKNODAT_DIR_FD_CONVERTER, &dir_fd))
+ goto exit;
+ return_value = os_mknod_impl(module, &path, mode, device, dir_fd);
+
+exit:
+ /* Cleanup for path */
+ path_cleanup(&path);
+
+ return return_value;
+}
+
+#endif /* (defined(HAVE_MKNOD) && defined(HAVE_MAKEDEV)) */
+
+#if defined(HAVE_DEVICE_MACROS)
+
+PyDoc_STRVAR(os_major__doc__,
+"major($module, device, /)\n"
+"--\n"
+"\n"
+"Extracts a device major number from a raw device number.");
+
+#define OS_MAJOR_METHODDEF \
+ {"major", (PyCFunction)os_major, METH_O, os_major__doc__},
+
+static unsigned int
+os_major_impl(PyModuleDef *module, dev_t device);
+
+static PyObject *
+os_major(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ dev_t device;
+ unsigned int _return_value;
+
+ if (!PyArg_Parse(arg, "O&:major", _Py_Dev_Converter, &device))
+ goto exit;
+ _return_value = os_major_impl(module, device);
+ if ((_return_value == (unsigned int)-1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromUnsignedLong((unsigned long)_return_value);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_DEVICE_MACROS) */
+
+#if defined(HAVE_DEVICE_MACROS)
+
+PyDoc_STRVAR(os_minor__doc__,
+"minor($module, device, /)\n"
+"--\n"
+"\n"
+"Extracts a device minor number from a raw device number.");
+
+#define OS_MINOR_METHODDEF \
+ {"minor", (PyCFunction)os_minor, METH_O, os_minor__doc__},
+
+static unsigned int
+os_minor_impl(PyModuleDef *module, dev_t device);
+
+static PyObject *
+os_minor(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ dev_t device;
+ unsigned int _return_value;
+
+ if (!PyArg_Parse(arg, "O&:minor", _Py_Dev_Converter, &device))
+ goto exit;
+ _return_value = os_minor_impl(module, device);
+ if ((_return_value == (unsigned int)-1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromUnsignedLong((unsigned long)_return_value);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_DEVICE_MACROS) */
+
+#if defined(HAVE_DEVICE_MACROS)
+
+PyDoc_STRVAR(os_makedev__doc__,
+"makedev($module, major, minor, /)\n"
+"--\n"
+"\n"
+"Composes a raw device number from the major and minor device numbers.");
+
+#define OS_MAKEDEV_METHODDEF \
+ {"makedev", (PyCFunction)os_makedev, METH_VARARGS, os_makedev__doc__},
+
+static dev_t
+os_makedev_impl(PyModuleDef *module, int major, int minor);
+
+static PyObject *
+os_makedev(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int major;
+ int minor;
+ dev_t _return_value;
+
+ if (!PyArg_ParseTuple(args, "ii:makedev",
+ &major, &minor))
+ goto exit;
+ _return_value = os_makedev_impl(module, major, minor);
+ if ((_return_value == (dev_t)-1) && PyErr_Occurred())
+ goto exit;
+ return_value = _PyLong_FromDev(_return_value);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_DEVICE_MACROS) */
+
+#if (defined HAVE_FTRUNCATE || defined MS_WINDOWS)
+
+PyDoc_STRVAR(os_ftruncate__doc__,
+"ftruncate($module, fd, length, /)\n"
+"--\n"
+"\n"
+"Truncate a file, specified by file descriptor, to a specific length.");
+
+#define OS_FTRUNCATE_METHODDEF \
+ {"ftruncate", (PyCFunction)os_ftruncate, METH_VARARGS, os_ftruncate__doc__},
+
+static PyObject *
+os_ftruncate_impl(PyModuleDef *module, int fd, Py_off_t length);
+
+static PyObject *
+os_ftruncate(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int fd;
+ Py_off_t length;
+
+ if (!PyArg_ParseTuple(args, "iO&:ftruncate",
+ &fd, Py_off_t_converter, &length))
+ goto exit;
+ return_value = os_ftruncate_impl(module, fd, length);
+
+exit:
+ return return_value;
+}
+
+#endif /* (defined HAVE_FTRUNCATE || defined MS_WINDOWS) */
+
+#if (defined HAVE_TRUNCATE || defined MS_WINDOWS)
+
+PyDoc_STRVAR(os_truncate__doc__,
+"truncate($module, /, path, length)\n"
+"--\n"
+"\n"
+"Truncate a file, specified by path, to a specific length.\n"
+"\n"
+"On some platforms, path may also be specified as an open file descriptor.\n"
+" If this functionality is unavailable, using it raises an exception.");
+
+#define OS_TRUNCATE_METHODDEF \
+ {"truncate", (PyCFunction)os_truncate, METH_VARARGS|METH_KEYWORDS, os_truncate__doc__},
+
+static PyObject *
+os_truncate_impl(PyModuleDef *module, path_t *path, Py_off_t length);
+
+static PyObject *
+os_truncate(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", "length", NULL};
+ path_t path = PATH_T_INITIALIZE("truncate", "path", 0, PATH_HAVE_FTRUNCATE);
+ Py_off_t length;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&:truncate", _keywords,
+ path_converter, &path, Py_off_t_converter, &length))
+ goto exit;
+ return_value = os_truncate_impl(module, &path, length);
+
+exit:
+ /* Cleanup for path */
+ path_cleanup(&path);
+
+ return return_value;
+}
+
+#endif /* (defined HAVE_TRUNCATE || defined MS_WINDOWS) */
+
+#if (defined(HAVE_POSIX_FALLOCATE) && !defined(POSIX_FADVISE_AIX_BUG))
+
+PyDoc_STRVAR(os_posix_fallocate__doc__,
+"posix_fallocate($module, fd, offset, length, /)\n"
+"--\n"
+"\n"
+"Ensure a file has allocated at least a particular number of bytes on disk.\n"
+"\n"
+"Ensure that the file specified by fd encompasses a range of bytes\n"
+"starting at offset bytes from the beginning and continuing for length bytes.");
+
+#define OS_POSIX_FALLOCATE_METHODDEF \
+ {"posix_fallocate", (PyCFunction)os_posix_fallocate, METH_VARARGS, os_posix_fallocate__doc__},
+
+static PyObject *
+os_posix_fallocate_impl(PyModuleDef *module, int fd, Py_off_t offset,
+ Py_off_t length);
+
+static PyObject *
+os_posix_fallocate(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int fd;
+ Py_off_t offset;
+ Py_off_t length;
+
+ if (!PyArg_ParseTuple(args, "iO&O&:posix_fallocate",
+ &fd, Py_off_t_converter, &offset, Py_off_t_converter, &length))
+ goto exit;
+ return_value = os_posix_fallocate_impl(module, fd, offset, length);
+
+exit:
+ return return_value;
+}
+
+#endif /* (defined(HAVE_POSIX_FALLOCATE) && !defined(POSIX_FADVISE_AIX_BUG)) */
+
+#if (defined(HAVE_POSIX_FADVISE) && !defined(POSIX_FADVISE_AIX_BUG))
+
+PyDoc_STRVAR(os_posix_fadvise__doc__,
+"posix_fadvise($module, fd, offset, length, advice, /)\n"
+"--\n"
+"\n"
+"Announce an intention to access data in a specific pattern.\n"
+"\n"
+"Announce an intention to access data in a specific pattern, thus allowing\n"
+"the kernel to make optimizations.\n"
+"The advice applies to the region of the file specified by fd starting at\n"
+"offset and continuing for length bytes.\n"
+"advice is one of POSIX_FADV_NORMAL, POSIX_FADV_SEQUENTIAL,\n"
+"POSIX_FADV_RANDOM, POSIX_FADV_NOREUSE, POSIX_FADV_WILLNEED, or\n"
+"POSIX_FADV_DONTNEED.");
+
+#define OS_POSIX_FADVISE_METHODDEF \
+ {"posix_fadvise", (PyCFunction)os_posix_fadvise, METH_VARARGS, os_posix_fadvise__doc__},
+
+static PyObject *
+os_posix_fadvise_impl(PyModuleDef *module, int fd, Py_off_t offset,
+ Py_off_t length, int advice);
+
+static PyObject *
+os_posix_fadvise(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int fd;
+ Py_off_t offset;
+ Py_off_t length;
+ int advice;
+
+ if (!PyArg_ParseTuple(args, "iO&O&i:posix_fadvise",
+ &fd, Py_off_t_converter, &offset, Py_off_t_converter, &length, &advice))
+ goto exit;
+ return_value = os_posix_fadvise_impl(module, fd, offset, length, advice);
+
+exit:
+ return return_value;
+}
+
+#endif /* (defined(HAVE_POSIX_FADVISE) && !defined(POSIX_FADVISE_AIX_BUG)) */
+
+#if defined(HAVE_PUTENV) && defined(MS_WINDOWS)
+
+PyDoc_STRVAR(os_putenv__doc__,
+"putenv($module, name, value, /)\n"
+"--\n"
+"\n"
+"Change or add an environment variable.");
+
+#define OS_PUTENV_METHODDEF \
+ {"putenv", (PyCFunction)os_putenv, METH_VARARGS, os_putenv__doc__},
+
+static PyObject *
+os_putenv_impl(PyModuleDef *module, PyObject *name, PyObject *value);
+
+static PyObject *
+os_putenv(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *name;
+ PyObject *value;
+
+ if (!PyArg_ParseTuple(args, "UU:putenv",
+ &name, &value))
+ goto exit;
+ return_value = os_putenv_impl(module, name, value);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_PUTENV) && defined(MS_WINDOWS) */
+
+#if defined(HAVE_PUTENV) && !defined(MS_WINDOWS)
+
+PyDoc_STRVAR(os_putenv__doc__,
+"putenv($module, name, value, /)\n"
+"--\n"
+"\n"
+"Change or add an environment variable.");
+
+#define OS_PUTENV_METHODDEF \
+ {"putenv", (PyCFunction)os_putenv, METH_VARARGS, os_putenv__doc__},
+
+static PyObject *
+os_putenv_impl(PyModuleDef *module, PyObject *name, PyObject *value);
+
+static PyObject *
+os_putenv(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *name = NULL;
+ PyObject *value = NULL;
+
+ if (!PyArg_ParseTuple(args, "O&O&:putenv",
+ PyUnicode_FSConverter, &name, PyUnicode_FSConverter, &value))
+ goto exit;
+ return_value = os_putenv_impl(module, name, value);
+
+exit:
+ /* Cleanup for name */
+ Py_XDECREF(name);
+ /* Cleanup for value */
+ Py_XDECREF(value);
+
+ return return_value;
+}
+
+#endif /* defined(HAVE_PUTENV) && !defined(MS_WINDOWS) */
+
+#if defined(HAVE_UNSETENV)
+
+PyDoc_STRVAR(os_unsetenv__doc__,
+"unsetenv($module, name, /)\n"
+"--\n"
+"\n"
+"Delete an environment variable.");
+
+#define OS_UNSETENV_METHODDEF \
+ {"unsetenv", (PyCFunction)os_unsetenv, METH_O, os_unsetenv__doc__},
+
+static PyObject *
+os_unsetenv_impl(PyModuleDef *module, PyObject *name);
+
+static PyObject *
+os_unsetenv(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ PyObject *name = NULL;
+
+ if (!PyArg_Parse(arg, "O&:unsetenv", PyUnicode_FSConverter, &name))
+ goto exit;
+ return_value = os_unsetenv_impl(module, name);
+
+exit:
+ /* Cleanup for name */
+ Py_XDECREF(name);
+
+ return return_value;
+}
+
+#endif /* defined(HAVE_UNSETENV) */
+
+PyDoc_STRVAR(os_strerror__doc__,
+"strerror($module, code, /)\n"
+"--\n"
+"\n"
+"Translate an error code to a message string.");
+
+#define OS_STRERROR_METHODDEF \
+ {"strerror", (PyCFunction)os_strerror, METH_O, os_strerror__doc__},
+
+static PyObject *
+os_strerror_impl(PyModuleDef *module, int code);
+
+static PyObject *
+os_strerror(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int code;
+
+ if (!PyArg_Parse(arg, "i:strerror", &code))
+ goto exit;
+ return_value = os_strerror_impl(module, code);
+
+exit:
+ return return_value;
+}
+
+#if defined(HAVE_SYS_WAIT_H) && defined(WCOREDUMP)
+
+PyDoc_STRVAR(os_WCOREDUMP__doc__,
+"WCOREDUMP($module, status, /)\n"
+"--\n"
+"\n"
+"Return True if the process returning status was dumped to a core file.");
+
+#define OS_WCOREDUMP_METHODDEF \
+ {"WCOREDUMP", (PyCFunction)os_WCOREDUMP, METH_O, os_WCOREDUMP__doc__},
+
+static int
+os_WCOREDUMP_impl(PyModuleDef *module, int status);
+
+static PyObject *
+os_WCOREDUMP(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int status;
+ int _return_value;
+
+ if (!PyArg_Parse(arg, "i:WCOREDUMP", &status))
+ goto exit;
+ _return_value = os_WCOREDUMP_impl(module, status);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyBool_FromLong((long)_return_value);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SYS_WAIT_H) && defined(WCOREDUMP) */
+
+#if defined(HAVE_SYS_WAIT_H) && defined(WIFCONTINUED)
+
+PyDoc_STRVAR(os_WIFCONTINUED__doc__,
+"WIFCONTINUED($module, /, status)\n"
+"--\n"
+"\n"
+"Return True if a particular process was continued from a job control stop.\n"
+"\n"
+"Return True if the process returning status was continued from a\n"
+"job control stop.");
+
+#define OS_WIFCONTINUED_METHODDEF \
+ {"WIFCONTINUED", (PyCFunction)os_WIFCONTINUED, METH_VARARGS|METH_KEYWORDS, os_WIFCONTINUED__doc__},
+
+static int
+os_WIFCONTINUED_impl(PyModuleDef *module, int status);
+
+static PyObject *
+os_WIFCONTINUED(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"status", NULL};
+ int status;
+ int _return_value;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:WIFCONTINUED", _keywords,
+ &status))
+ goto exit;
+ _return_value = os_WIFCONTINUED_impl(module, status);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyBool_FromLong((long)_return_value);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SYS_WAIT_H) && defined(WIFCONTINUED) */
+
+#if defined(HAVE_SYS_WAIT_H) && defined(WIFSTOPPED)
+
+PyDoc_STRVAR(os_WIFSTOPPED__doc__,
+"WIFSTOPPED($module, /, status)\n"
+"--\n"
+"\n"
+"Return True if the process returning status was stopped.");
+
+#define OS_WIFSTOPPED_METHODDEF \
+ {"WIFSTOPPED", (PyCFunction)os_WIFSTOPPED, METH_VARARGS|METH_KEYWORDS, os_WIFSTOPPED__doc__},
+
+static int
+os_WIFSTOPPED_impl(PyModuleDef *module, int status);
+
+static PyObject *
+os_WIFSTOPPED(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"status", NULL};
+ int status;
+ int _return_value;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:WIFSTOPPED", _keywords,
+ &status))
+ goto exit;
+ _return_value = os_WIFSTOPPED_impl(module, status);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyBool_FromLong((long)_return_value);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SYS_WAIT_H) && defined(WIFSTOPPED) */
+
+#if defined(HAVE_SYS_WAIT_H) && defined(WIFSIGNALED)
+
+PyDoc_STRVAR(os_WIFSIGNALED__doc__,
+"WIFSIGNALED($module, /, status)\n"
+"--\n"
+"\n"
+"Return True if the process returning status was terminated by a signal.");
+
+#define OS_WIFSIGNALED_METHODDEF \
+ {"WIFSIGNALED", (PyCFunction)os_WIFSIGNALED, METH_VARARGS|METH_KEYWORDS, os_WIFSIGNALED__doc__},
+
+static int
+os_WIFSIGNALED_impl(PyModuleDef *module, int status);
+
+static PyObject *
+os_WIFSIGNALED(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"status", NULL};
+ int status;
+ int _return_value;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:WIFSIGNALED", _keywords,
+ &status))
+ goto exit;
+ _return_value = os_WIFSIGNALED_impl(module, status);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyBool_FromLong((long)_return_value);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SYS_WAIT_H) && defined(WIFSIGNALED) */
+
+#if defined(HAVE_SYS_WAIT_H) && defined(WIFEXITED)
+
+PyDoc_STRVAR(os_WIFEXITED__doc__,
+"WIFEXITED($module, /, status)\n"
+"--\n"
+"\n"
+"Return True if the process returning status exited via the exit() system call.");
+
+#define OS_WIFEXITED_METHODDEF \
+ {"WIFEXITED", (PyCFunction)os_WIFEXITED, METH_VARARGS|METH_KEYWORDS, os_WIFEXITED__doc__},
+
+static int
+os_WIFEXITED_impl(PyModuleDef *module, int status);
+
+static PyObject *
+os_WIFEXITED(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"status", NULL};
+ int status;
+ int _return_value;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:WIFEXITED", _keywords,
+ &status))
+ goto exit;
+ _return_value = os_WIFEXITED_impl(module, status);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyBool_FromLong((long)_return_value);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SYS_WAIT_H) && defined(WIFEXITED) */
+
+#if defined(HAVE_SYS_WAIT_H) && defined(WEXITSTATUS)
+
+PyDoc_STRVAR(os_WEXITSTATUS__doc__,
+"WEXITSTATUS($module, /, status)\n"
+"--\n"
+"\n"
+"Return the process return code from status.");
+
+#define OS_WEXITSTATUS_METHODDEF \
+ {"WEXITSTATUS", (PyCFunction)os_WEXITSTATUS, METH_VARARGS|METH_KEYWORDS, os_WEXITSTATUS__doc__},
+
+static int
+os_WEXITSTATUS_impl(PyModuleDef *module, int status);
+
+static PyObject *
+os_WEXITSTATUS(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"status", NULL};
+ int status;
+ int _return_value;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:WEXITSTATUS", _keywords,
+ &status))
+ goto exit;
+ _return_value = os_WEXITSTATUS_impl(module, status);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromLong((long)_return_value);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SYS_WAIT_H) && defined(WEXITSTATUS) */
+
+#if defined(HAVE_SYS_WAIT_H) && defined(WTERMSIG)
+
+PyDoc_STRVAR(os_WTERMSIG__doc__,
+"WTERMSIG($module, /, status)\n"
+"--\n"
+"\n"
+"Return the signal that terminated the process that provided the status value.");
+
+#define OS_WTERMSIG_METHODDEF \
+ {"WTERMSIG", (PyCFunction)os_WTERMSIG, METH_VARARGS|METH_KEYWORDS, os_WTERMSIG__doc__},
+
+static int
+os_WTERMSIG_impl(PyModuleDef *module, int status);
+
+static PyObject *
+os_WTERMSIG(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"status", NULL};
+ int status;
+ int _return_value;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:WTERMSIG", _keywords,
+ &status))
+ goto exit;
+ _return_value = os_WTERMSIG_impl(module, status);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromLong((long)_return_value);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SYS_WAIT_H) && defined(WTERMSIG) */
+
+#if defined(HAVE_SYS_WAIT_H) && defined(WSTOPSIG)
+
+PyDoc_STRVAR(os_WSTOPSIG__doc__,
+"WSTOPSIG($module, /, status)\n"
+"--\n"
+"\n"
+"Return the signal that stopped the process that provided the status value.");
+
+#define OS_WSTOPSIG_METHODDEF \
+ {"WSTOPSIG", (PyCFunction)os_WSTOPSIG, METH_VARARGS|METH_KEYWORDS, os_WSTOPSIG__doc__},
+
+static int
+os_WSTOPSIG_impl(PyModuleDef *module, int status);
+
+static PyObject *
+os_WSTOPSIG(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"status", NULL};
+ int status;
+ int _return_value;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:WSTOPSIG", _keywords,
+ &status))
+ goto exit;
+ _return_value = os_WSTOPSIG_impl(module, status);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromLong((long)_return_value);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SYS_WAIT_H) && defined(WSTOPSIG) */
+
+#if (defined(HAVE_FSTATVFS) && defined(HAVE_SYS_STATVFS_H))
+
+PyDoc_STRVAR(os_fstatvfs__doc__,
+"fstatvfs($module, fd, /)\n"
+"--\n"
+"\n"
+"Perform an fstatvfs system call on the given fd.\n"
+"\n"
+"Equivalent to statvfs(fd).");
+
+#define OS_FSTATVFS_METHODDEF \
+ {"fstatvfs", (PyCFunction)os_fstatvfs, METH_O, os_fstatvfs__doc__},
+
+static PyObject *
+os_fstatvfs_impl(PyModuleDef *module, int fd);
+
+static PyObject *
+os_fstatvfs(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int fd;
+
+ if (!PyArg_Parse(arg, "i:fstatvfs", &fd))
+ goto exit;
+ return_value = os_fstatvfs_impl(module, fd);
+
+exit:
+ return return_value;
+}
+
+#endif /* (defined(HAVE_FSTATVFS) && defined(HAVE_SYS_STATVFS_H)) */
+
+#if (defined(HAVE_STATVFS) && defined(HAVE_SYS_STATVFS_H))
+
+PyDoc_STRVAR(os_statvfs__doc__,
+"statvfs($module, /, path)\n"
+"--\n"
+"\n"
+"Perform a statvfs system call on the given path.\n"
+"\n"
+"path may always be specified as a string.\n"
+"On some platforms, path may also be specified as an open file descriptor.\n"
+" If this functionality is unavailable, using it raises an exception.");
+
+#define OS_STATVFS_METHODDEF \
+ {"statvfs", (PyCFunction)os_statvfs, METH_VARARGS|METH_KEYWORDS, os_statvfs__doc__},
+
+static PyObject *
+os_statvfs_impl(PyModuleDef *module, path_t *path);
+
+static PyObject *
+os_statvfs(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", NULL};
+ path_t path = PATH_T_INITIALIZE("statvfs", "path", 0, PATH_HAVE_FSTATVFS);
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&:statvfs", _keywords,
+ path_converter, &path))
+ goto exit;
+ return_value = os_statvfs_impl(module, &path);
+
+exit:
+ /* Cleanup for path */
+ path_cleanup(&path);
+
+ return return_value;
+}
+
+#endif /* (defined(HAVE_STATVFS) && defined(HAVE_SYS_STATVFS_H)) */
+
+#if defined(MS_WINDOWS)
+
+PyDoc_STRVAR(os__getdiskusage__doc__,
+"_getdiskusage($module, /, path)\n"
+"--\n"
+"\n"
+"Return disk usage statistics about the given path as a (total, free) tuple.");
+
+#define OS__GETDISKUSAGE_METHODDEF \
+ {"_getdiskusage", (PyCFunction)os__getdiskusage, METH_VARARGS|METH_KEYWORDS, os__getdiskusage__doc__},
+
+static PyObject *
+os__getdiskusage_impl(PyModuleDef *module, Py_UNICODE *path);
+
+static PyObject *
+os__getdiskusage(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", NULL};
+ Py_UNICODE *path;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "u:_getdiskusage", _keywords,
+ &path))
+ goto exit;
+ return_value = os__getdiskusage_impl(module, path);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(MS_WINDOWS) */
+
+#if defined(HAVE_FPATHCONF)
+
+PyDoc_STRVAR(os_fpathconf__doc__,
+"fpathconf($module, fd, name, /)\n"
+"--\n"
+"\n"
+"Return the configuration limit name for the file descriptor fd.\n"
+"\n"
+"If there is no limit, return -1.");
+
+#define OS_FPATHCONF_METHODDEF \
+ {"fpathconf", (PyCFunction)os_fpathconf, METH_VARARGS, os_fpathconf__doc__},
+
+static long
+os_fpathconf_impl(PyModuleDef *module, int fd, int name);
+
+static PyObject *
+os_fpathconf(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int fd;
+ int name;
+ long _return_value;
+
+ if (!PyArg_ParseTuple(args, "iO&:fpathconf",
+ &fd, conv_path_confname, &name))
+ goto exit;
+ _return_value = os_fpathconf_impl(module, fd, name);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromLong(_return_value);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_FPATHCONF) */
+
+#if defined(HAVE_PATHCONF)
+
+PyDoc_STRVAR(os_pathconf__doc__,
+"pathconf($module, /, path, name)\n"
+"--\n"
+"\n"
+"Return the configuration limit name for the file or directory path.\n"
+"\n"
+"If there is no limit, return -1.\n"
+"On some platforms, path may also be specified as an open file descriptor.\n"
+" If this functionality is unavailable, using it raises an exception.");
+
+#define OS_PATHCONF_METHODDEF \
+ {"pathconf", (PyCFunction)os_pathconf, METH_VARARGS|METH_KEYWORDS, os_pathconf__doc__},
+
+static long
+os_pathconf_impl(PyModuleDef *module, path_t *path, int name);
+
+static PyObject *
+os_pathconf(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", "name", NULL};
+ path_t path = PATH_T_INITIALIZE("pathconf", "path", 0, PATH_HAVE_FPATHCONF);
+ int name;
+ long _return_value;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&:pathconf", _keywords,
+ path_converter, &path, conv_path_confname, &name))
+ goto exit;
+ _return_value = os_pathconf_impl(module, &path, name);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromLong(_return_value);
+
+exit:
+ /* Cleanup for path */
+ path_cleanup(&path);
+
+ return return_value;
+}
+
+#endif /* defined(HAVE_PATHCONF) */
+
+#if defined(HAVE_CONFSTR)
+
+PyDoc_STRVAR(os_confstr__doc__,
+"confstr($module, name, /)\n"
+"--\n"
+"\n"
+"Return a string-valued system configuration variable.");
+
+#define OS_CONFSTR_METHODDEF \
+ {"confstr", (PyCFunction)os_confstr, METH_O, os_confstr__doc__},
+
+static PyObject *
+os_confstr_impl(PyModuleDef *module, int name);
+
+static PyObject *
+os_confstr(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int name;
+
+ if (!PyArg_Parse(arg, "O&:confstr", conv_confstr_confname, &name))
+ goto exit;
+ return_value = os_confstr_impl(module, name);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_CONFSTR) */
+
+#if defined(HAVE_SYSCONF)
+
+PyDoc_STRVAR(os_sysconf__doc__,
+"sysconf($module, name, /)\n"
+"--\n"
+"\n"
+"Return an integer-valued system configuration variable.");
+
+#define OS_SYSCONF_METHODDEF \
+ {"sysconf", (PyCFunction)os_sysconf, METH_O, os_sysconf__doc__},
+
+static long
+os_sysconf_impl(PyModuleDef *module, int name);
+
+static PyObject *
+os_sysconf(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int name;
+ long _return_value;
+
+ if (!PyArg_Parse(arg, "O&:sysconf", conv_sysconf_confname, &name))
+ goto exit;
+ _return_value = os_sysconf_impl(module, name);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromLong(_return_value);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SYSCONF) */
+
+PyDoc_STRVAR(os_abort__doc__,
+"abort($module, /)\n"
+"--\n"
+"\n"
+"Abort the interpreter immediately.\n"
+"\n"
+"This function \'dumps core\' or otherwise fails in the hardest way possible\n"
+"on the hosting operating system. This function never returns.");
+
+#define OS_ABORT_METHODDEF \
+ {"abort", (PyCFunction)os_abort, METH_NOARGS, os_abort__doc__},
+
+static PyObject *
+os_abort_impl(PyModuleDef *module);
+
+static PyObject *
+os_abort(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return os_abort_impl(module);
+}
+
+#if defined(HAVE_GETLOADAVG)
+
+PyDoc_STRVAR(os_getloadavg__doc__,
+"getloadavg($module, /)\n"
+"--\n"
+"\n"
+"Return average recent system load information.\n"
+"\n"
+"Return the number of processes in the system run queue averaged over\n"
+"the last 1, 5, and 15 minutes as a tuple of three floats.\n"
+"Raises OSError if the load average was unobtainable.");
+
+#define OS_GETLOADAVG_METHODDEF \
+ {"getloadavg", (PyCFunction)os_getloadavg, METH_NOARGS, os_getloadavg__doc__},
+
+static PyObject *
+os_getloadavg_impl(PyModuleDef *module);
+
+static PyObject *
+os_getloadavg(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return os_getloadavg_impl(module);
+}
+
+#endif /* defined(HAVE_GETLOADAVG) */
+
+PyDoc_STRVAR(os_device_encoding__doc__,
+"device_encoding($module, /, fd)\n"
+"--\n"
+"\n"
+"Return a string describing the encoding of a terminal\'s file descriptor.\n"
+"\n"
+"The file descriptor must be attached to a terminal.\n"
+"If the device is not a terminal, return None.");
+
+#define OS_DEVICE_ENCODING_METHODDEF \
+ {"device_encoding", (PyCFunction)os_device_encoding, METH_VARARGS|METH_KEYWORDS, os_device_encoding__doc__},
+
+static PyObject *
+os_device_encoding_impl(PyModuleDef *module, int fd);
+
+static PyObject *
+os_device_encoding(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"fd", NULL};
+ int fd;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:device_encoding", _keywords,
+ &fd))
+ goto exit;
+ return_value = os_device_encoding_impl(module, fd);
+
+exit:
+ return return_value;
+}
+
+#if defined(HAVE_SETRESUID)
+
+PyDoc_STRVAR(os_setresuid__doc__,
+"setresuid($module, ruid, euid, suid, /)\n"
+"--\n"
+"\n"
+"Set the current process\'s real, effective, and saved user ids.");
+
+#define OS_SETRESUID_METHODDEF \
+ {"setresuid", (PyCFunction)os_setresuid, METH_VARARGS, os_setresuid__doc__},
+
+static PyObject *
+os_setresuid_impl(PyModuleDef *module, uid_t ruid, uid_t euid, uid_t suid);
+
+static PyObject *
+os_setresuid(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ uid_t ruid;
+ uid_t euid;
+ uid_t suid;
+
+ if (!PyArg_ParseTuple(args, "O&O&O&:setresuid",
+ _Py_Uid_Converter, &ruid, _Py_Uid_Converter, &euid, _Py_Uid_Converter, &suid))
+ goto exit;
+ return_value = os_setresuid_impl(module, ruid, euid, suid);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SETRESUID) */
+
+#if defined(HAVE_SETRESGID)
+
+PyDoc_STRVAR(os_setresgid__doc__,
+"setresgid($module, rgid, egid, sgid, /)\n"
+"--\n"
+"\n"
+"Set the current process\'s real, effective, and saved group ids.");
+
+#define OS_SETRESGID_METHODDEF \
+ {"setresgid", (PyCFunction)os_setresgid, METH_VARARGS, os_setresgid__doc__},
+
+static PyObject *
+os_setresgid_impl(PyModuleDef *module, gid_t rgid, gid_t egid, gid_t sgid);
+
+static PyObject *
+os_setresgid(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ gid_t rgid;
+ gid_t egid;
+ gid_t sgid;
+
+ if (!PyArg_ParseTuple(args, "O&O&O&:setresgid",
+ _Py_Gid_Converter, &rgid, _Py_Gid_Converter, &egid, _Py_Gid_Converter, &sgid))
+ goto exit;
+ return_value = os_setresgid_impl(module, rgid, egid, sgid);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SETRESGID) */
+
+#if defined(HAVE_GETRESUID)
+
+PyDoc_STRVAR(os_getresuid__doc__,
+"getresuid($module, /)\n"
+"--\n"
+"\n"
+"Return a tuple of the current process\'s real, effective, and saved user ids.");
+
+#define OS_GETRESUID_METHODDEF \
+ {"getresuid", (PyCFunction)os_getresuid, METH_NOARGS, os_getresuid__doc__},
+
+static PyObject *
+os_getresuid_impl(PyModuleDef *module);
+
+static PyObject *
+os_getresuid(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return os_getresuid_impl(module);
+}
+
+#endif /* defined(HAVE_GETRESUID) */
+
+#if defined(HAVE_GETRESGID)
+
+PyDoc_STRVAR(os_getresgid__doc__,
+"getresgid($module, /)\n"
+"--\n"
+"\n"
+"Return a tuple of the current process\'s real, effective, and saved group ids.");
+
+#define OS_GETRESGID_METHODDEF \
+ {"getresgid", (PyCFunction)os_getresgid, METH_NOARGS, os_getresgid__doc__},
+
+static PyObject *
+os_getresgid_impl(PyModuleDef *module);
+
+static PyObject *
+os_getresgid(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return os_getresgid_impl(module);
+}
+
+#endif /* defined(HAVE_GETRESGID) */
+
+#if defined(USE_XATTRS)
+
+PyDoc_STRVAR(os_getxattr__doc__,
+"getxattr($module, /, path, attribute, *, follow_symlinks=True)\n"
+"--\n"
+"\n"
+"Return the value of extended attribute attribute on path.\n"
+"\n"
+"path may be either a string or an open file descriptor.\n"
+"If follow_symlinks is False, and the last element of the path is a symbolic\n"
+" link, getxattr will examine the symbolic link itself instead of the file\n"
+" the link points to.");
+
+#define OS_GETXATTR_METHODDEF \
+ {"getxattr", (PyCFunction)os_getxattr, METH_VARARGS|METH_KEYWORDS, os_getxattr__doc__},
+
+static PyObject *
+os_getxattr_impl(PyModuleDef *module, path_t *path, path_t *attribute,
+ int follow_symlinks);
+
+static PyObject *
+os_getxattr(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", "attribute", "follow_symlinks", NULL};
+ path_t path = PATH_T_INITIALIZE("getxattr", "path", 0, 1);
+ path_t attribute = PATH_T_INITIALIZE("getxattr", "attribute", 0, 0);
+ int follow_symlinks = 1;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&|$p:getxattr", _keywords,
+ path_converter, &path, path_converter, &attribute, &follow_symlinks))
+ goto exit;
+ return_value = os_getxattr_impl(module, &path, &attribute, follow_symlinks);
+
+exit:
+ /* Cleanup for path */
+ path_cleanup(&path);
+ /* Cleanup for attribute */
+ path_cleanup(&attribute);
+
+ return return_value;
+}
+
+#endif /* defined(USE_XATTRS) */
+
+#if defined(USE_XATTRS)
+
+PyDoc_STRVAR(os_setxattr__doc__,
+"setxattr($module, /, path, attribute, value, flags=0, *,\n"
+" follow_symlinks=True)\n"
+"--\n"
+"\n"
+"Set extended attribute attribute on path to value.\n"
+"\n"
+"path may be either a string or an open file descriptor.\n"
+"If follow_symlinks is False, and the last element of the path is a symbolic\n"
+" link, setxattr will modify the symbolic link itself instead of the file\n"
+" the link points to.");
+
+#define OS_SETXATTR_METHODDEF \
+ {"setxattr", (PyCFunction)os_setxattr, METH_VARARGS|METH_KEYWORDS, os_setxattr__doc__},
+
+static PyObject *
+os_setxattr_impl(PyModuleDef *module, path_t *path, path_t *attribute,
+ Py_buffer *value, int flags, int follow_symlinks);
+
+static PyObject *
+os_setxattr(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", "attribute", "value", "flags", "follow_symlinks", NULL};
+ path_t path = PATH_T_INITIALIZE("setxattr", "path", 0, 1);
+ path_t attribute = PATH_T_INITIALIZE("setxattr", "attribute", 0, 0);
+ Py_buffer value = {NULL, NULL};
+ int flags = 0;
+ int follow_symlinks = 1;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&y*|i$p:setxattr", _keywords,
+ path_converter, &path, path_converter, &attribute, &value, &flags, &follow_symlinks))
+ goto exit;
+ return_value = os_setxattr_impl(module, &path, &attribute, &value, flags, follow_symlinks);
+
+exit:
+ /* Cleanup for path */
+ path_cleanup(&path);
+ /* Cleanup for attribute */
+ path_cleanup(&attribute);
+ /* Cleanup for value */
+ if (value.obj)
+ PyBuffer_Release(&value);
+
+ return return_value;
+}
+
+#endif /* defined(USE_XATTRS) */
+
+#if defined(USE_XATTRS)
+
+PyDoc_STRVAR(os_removexattr__doc__,
+"removexattr($module, /, path, attribute, *, follow_symlinks=True)\n"
+"--\n"
+"\n"
+"Remove extended attribute attribute on path.\n"
+"\n"
+"path may be either a string or an open file descriptor.\n"
+"If follow_symlinks is False, and the last element of the path is a symbolic\n"
+" link, removexattr will modify the symbolic link itself instead of the file\n"
+" the link points to.");
+
+#define OS_REMOVEXATTR_METHODDEF \
+ {"removexattr", (PyCFunction)os_removexattr, METH_VARARGS|METH_KEYWORDS, os_removexattr__doc__},
+
+static PyObject *
+os_removexattr_impl(PyModuleDef *module, path_t *path, path_t *attribute,
+ int follow_symlinks);
+
+static PyObject *
+os_removexattr(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", "attribute", "follow_symlinks", NULL};
+ path_t path = PATH_T_INITIALIZE("removexattr", "path", 0, 1);
+ path_t attribute = PATH_T_INITIALIZE("removexattr", "attribute", 0, 0);
+ int follow_symlinks = 1;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&|$p:removexattr", _keywords,
+ path_converter, &path, path_converter, &attribute, &follow_symlinks))
+ goto exit;
+ return_value = os_removexattr_impl(module, &path, &attribute, follow_symlinks);
+
+exit:
+ /* Cleanup for path */
+ path_cleanup(&path);
+ /* Cleanup for attribute */
+ path_cleanup(&attribute);
+
+ return return_value;
+}
+
+#endif /* defined(USE_XATTRS) */
+
+#if defined(USE_XATTRS)
+
+PyDoc_STRVAR(os_listxattr__doc__,
+"listxattr($module, /, path=None, *, follow_symlinks=True)\n"
+"--\n"
+"\n"
+"Return a list of extended attributes on path.\n"
+"\n"
+"path may be either None, a string, or an open file descriptor.\n"
+"if path is None, listxattr will examine the current directory.\n"
+"If follow_symlinks is False, and the last element of the path is a symbolic\n"
+" link, listxattr will examine the symbolic link itself instead of the file\n"
+" the link points to.");
+
+#define OS_LISTXATTR_METHODDEF \
+ {"listxattr", (PyCFunction)os_listxattr, METH_VARARGS|METH_KEYWORDS, os_listxattr__doc__},
+
+static PyObject *
+os_listxattr_impl(PyModuleDef *module, path_t *path, int follow_symlinks);
+
+static PyObject *
+os_listxattr(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"path", "follow_symlinks", NULL};
+ path_t path = PATH_T_INITIALIZE("listxattr", "path", 1, 1);
+ int follow_symlinks = 1;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O&$p:listxattr", _keywords,
+ path_converter, &path, &follow_symlinks))
+ goto exit;
+ return_value = os_listxattr_impl(module, &path, follow_symlinks);
+
+exit:
+ /* Cleanup for path */
+ path_cleanup(&path);
+
+ return return_value;
+}
+
+#endif /* defined(USE_XATTRS) */
+
+PyDoc_STRVAR(os_urandom__doc__,
+"urandom($module, size, /)\n"
+"--\n"
+"\n"
+"Return a bytes object containing random bytes suitable for cryptographic use.");
+
+#define OS_URANDOM_METHODDEF \
+ {"urandom", (PyCFunction)os_urandom, METH_O, os_urandom__doc__},
+
+static PyObject *
+os_urandom_impl(PyModuleDef *module, Py_ssize_t size);
+
+static PyObject *
+os_urandom(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_ssize_t size;
+
+ if (!PyArg_Parse(arg, "n:urandom", &size))
+ goto exit;
+ return_value = os_urandom_impl(module, size);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(os_cpu_count__doc__,
+"cpu_count($module, /)\n"
+"--\n"
+"\n"
+"Return the number of CPUs in the system; return None if indeterminable.");
+
+#define OS_CPU_COUNT_METHODDEF \
+ {"cpu_count", (PyCFunction)os_cpu_count, METH_NOARGS, os_cpu_count__doc__},
+
+static PyObject *
+os_cpu_count_impl(PyModuleDef *module);
+
+static PyObject *
+os_cpu_count(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return os_cpu_count_impl(module);
+}
+
+PyDoc_STRVAR(os_get_inheritable__doc__,
+"get_inheritable($module, fd, /)\n"
+"--\n"
+"\n"
+"Get the close-on-exe flag of the specified file descriptor.");
+
+#define OS_GET_INHERITABLE_METHODDEF \
+ {"get_inheritable", (PyCFunction)os_get_inheritable, METH_O, os_get_inheritable__doc__},
+
+static int
+os_get_inheritable_impl(PyModuleDef *module, int fd);
+
+static PyObject *
+os_get_inheritable(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int fd;
+ int _return_value;
+
+ if (!PyArg_Parse(arg, "i:get_inheritable", &fd))
+ goto exit;
+ _return_value = os_get_inheritable_impl(module, fd);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyBool_FromLong((long)_return_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(os_set_inheritable__doc__,
+"set_inheritable($module, fd, inheritable, /)\n"
+"--\n"
+"\n"
+"Set the inheritable flag of the specified file descriptor.");
+
+#define OS_SET_INHERITABLE_METHODDEF \
+ {"set_inheritable", (PyCFunction)os_set_inheritable, METH_VARARGS, os_set_inheritable__doc__},
+
+static PyObject *
+os_set_inheritable_impl(PyModuleDef *module, int fd, int inheritable);
+
+static PyObject *
+os_set_inheritable(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int fd;
+ int inheritable;
+
+ if (!PyArg_ParseTuple(args, "ii:set_inheritable",
+ &fd, &inheritable))
+ goto exit;
+ return_value = os_set_inheritable_impl(module, fd, inheritable);
+
+exit:
+ return return_value;
+}
+
+#if defined(MS_WINDOWS)
+
+PyDoc_STRVAR(os_get_handle_inheritable__doc__,
+"get_handle_inheritable($module, handle, /)\n"
+"--\n"
+"\n"
+"Get the close-on-exe flag of the specified file descriptor.");
+
+#define OS_GET_HANDLE_INHERITABLE_METHODDEF \
+ {"get_handle_inheritable", (PyCFunction)os_get_handle_inheritable, METH_O, os_get_handle_inheritable__doc__},
+
+static int
+os_get_handle_inheritable_impl(PyModuleDef *module, Py_intptr_t handle);
+
+static PyObject *
+os_get_handle_inheritable(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_intptr_t handle;
+ int _return_value;
+
+ if (!PyArg_Parse(arg, "" _Py_PARSE_INTPTR ":get_handle_inheritable", &handle))
+ goto exit;
+ _return_value = os_get_handle_inheritable_impl(module, handle);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyBool_FromLong((long)_return_value);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(MS_WINDOWS) */
+
+#if defined(MS_WINDOWS)
+
+PyDoc_STRVAR(os_set_handle_inheritable__doc__,
+"set_handle_inheritable($module, handle, inheritable, /)\n"
+"--\n"
+"\n"
+"Set the inheritable flag of the specified handle.");
+
+#define OS_SET_HANDLE_INHERITABLE_METHODDEF \
+ {"set_handle_inheritable", (PyCFunction)os_set_handle_inheritable, METH_VARARGS, os_set_handle_inheritable__doc__},
+
+static PyObject *
+os_set_handle_inheritable_impl(PyModuleDef *module, Py_intptr_t handle,
+ int inheritable);
+
+static PyObject *
+os_set_handle_inheritable(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_intptr_t handle;
+ int inheritable;
+
+ if (!PyArg_ParseTuple(args, "" _Py_PARSE_INTPTR "p:set_handle_inheritable",
+ &handle, &inheritable))
+ goto exit;
+ return_value = os_set_handle_inheritable_impl(module, handle, inheritable);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(MS_WINDOWS) */
+
+#ifndef OS_TTYNAME_METHODDEF
+ #define OS_TTYNAME_METHODDEF
+#endif /* !defined(OS_TTYNAME_METHODDEF) */
+
+#ifndef OS_CTERMID_METHODDEF
+ #define OS_CTERMID_METHODDEF
+#endif /* !defined(OS_CTERMID_METHODDEF) */
+
+#ifndef OS_FCHDIR_METHODDEF
+ #define OS_FCHDIR_METHODDEF
+#endif /* !defined(OS_FCHDIR_METHODDEF) */
+
+#ifndef OS_FCHMOD_METHODDEF
+ #define OS_FCHMOD_METHODDEF
+#endif /* !defined(OS_FCHMOD_METHODDEF) */
+
+#ifndef OS_LCHMOD_METHODDEF
+ #define OS_LCHMOD_METHODDEF
+#endif /* !defined(OS_LCHMOD_METHODDEF) */
+
+#ifndef OS_CHFLAGS_METHODDEF
+ #define OS_CHFLAGS_METHODDEF
+#endif /* !defined(OS_CHFLAGS_METHODDEF) */
+
+#ifndef OS_LCHFLAGS_METHODDEF
+ #define OS_LCHFLAGS_METHODDEF
+#endif /* !defined(OS_LCHFLAGS_METHODDEF) */
+
+#ifndef OS_CHROOT_METHODDEF
+ #define OS_CHROOT_METHODDEF
+#endif /* !defined(OS_CHROOT_METHODDEF) */
+
+#ifndef OS_FSYNC_METHODDEF
+ #define OS_FSYNC_METHODDEF
+#endif /* !defined(OS_FSYNC_METHODDEF) */
+
+#ifndef OS_SYNC_METHODDEF
+ #define OS_SYNC_METHODDEF
+#endif /* !defined(OS_SYNC_METHODDEF) */
+
+#ifndef OS_FDATASYNC_METHODDEF
+ #define OS_FDATASYNC_METHODDEF
+#endif /* !defined(OS_FDATASYNC_METHODDEF) */
+
+#ifndef OS_CHOWN_METHODDEF
+ #define OS_CHOWN_METHODDEF
+#endif /* !defined(OS_CHOWN_METHODDEF) */
+
+#ifndef OS_FCHOWN_METHODDEF
+ #define OS_FCHOWN_METHODDEF
+#endif /* !defined(OS_FCHOWN_METHODDEF) */
+
+#ifndef OS_LCHOWN_METHODDEF
+ #define OS_LCHOWN_METHODDEF
+#endif /* !defined(OS_LCHOWN_METHODDEF) */
+
+#ifndef OS_LINK_METHODDEF
+ #define OS_LINK_METHODDEF
+#endif /* !defined(OS_LINK_METHODDEF) */
+
+#ifndef OS__GETFULLPATHNAME_METHODDEF
+ #define OS__GETFULLPATHNAME_METHODDEF
+#endif /* !defined(OS__GETFULLPATHNAME_METHODDEF) */
+
+#ifndef OS__GETFINALPATHNAME_METHODDEF
+ #define OS__GETFINALPATHNAME_METHODDEF
+#endif /* !defined(OS__GETFINALPATHNAME_METHODDEF) */
+
+#ifndef OS__ISDIR_METHODDEF
+ #define OS__ISDIR_METHODDEF
+#endif /* !defined(OS__ISDIR_METHODDEF) */
+
+#ifndef OS__GETVOLUMEPATHNAME_METHODDEF
+ #define OS__GETVOLUMEPATHNAME_METHODDEF
+#endif /* !defined(OS__GETVOLUMEPATHNAME_METHODDEF) */
+
+#ifndef OS_NICE_METHODDEF
+ #define OS_NICE_METHODDEF
+#endif /* !defined(OS_NICE_METHODDEF) */
+
+#ifndef OS_GETPRIORITY_METHODDEF
+ #define OS_GETPRIORITY_METHODDEF
+#endif /* !defined(OS_GETPRIORITY_METHODDEF) */
+
+#ifndef OS_SETPRIORITY_METHODDEF
+ #define OS_SETPRIORITY_METHODDEF
+#endif /* !defined(OS_SETPRIORITY_METHODDEF) */
+
+#ifndef OS_SYSTEM_METHODDEF
+ #define OS_SYSTEM_METHODDEF
+#endif /* !defined(OS_SYSTEM_METHODDEF) */
+
+#ifndef OS_UNAME_METHODDEF
+ #define OS_UNAME_METHODDEF
+#endif /* !defined(OS_UNAME_METHODDEF) */
+
+#ifndef OS_EXECV_METHODDEF
+ #define OS_EXECV_METHODDEF
+#endif /* !defined(OS_EXECV_METHODDEF) */
+
+#ifndef OS_EXECVE_METHODDEF
+ #define OS_EXECVE_METHODDEF
+#endif /* !defined(OS_EXECVE_METHODDEF) */
+
+#ifndef OS_SPAWNV_METHODDEF
+ #define OS_SPAWNV_METHODDEF
+#endif /* !defined(OS_SPAWNV_METHODDEF) */
+
+#ifndef OS_SPAWNVE_METHODDEF
+ #define OS_SPAWNVE_METHODDEF
+#endif /* !defined(OS_SPAWNVE_METHODDEF) */
+
+#ifndef OS_FORK1_METHODDEF
+ #define OS_FORK1_METHODDEF
+#endif /* !defined(OS_FORK1_METHODDEF) */
+
+#ifndef OS_FORK_METHODDEF
+ #define OS_FORK_METHODDEF
+#endif /* !defined(OS_FORK_METHODDEF) */
+
+#ifndef OS_SCHED_GET_PRIORITY_MAX_METHODDEF
+ #define OS_SCHED_GET_PRIORITY_MAX_METHODDEF
+#endif /* !defined(OS_SCHED_GET_PRIORITY_MAX_METHODDEF) */
+
+#ifndef OS_SCHED_GET_PRIORITY_MIN_METHODDEF
+ #define OS_SCHED_GET_PRIORITY_MIN_METHODDEF
+#endif /* !defined(OS_SCHED_GET_PRIORITY_MIN_METHODDEF) */
+
+#ifndef OS_SCHED_GETSCHEDULER_METHODDEF
+ #define OS_SCHED_GETSCHEDULER_METHODDEF
+#endif /* !defined(OS_SCHED_GETSCHEDULER_METHODDEF) */
+
+#ifndef OS_SCHED_SETSCHEDULER_METHODDEF
+ #define OS_SCHED_SETSCHEDULER_METHODDEF
+#endif /* !defined(OS_SCHED_SETSCHEDULER_METHODDEF) */
+
+#ifndef OS_SCHED_GETPARAM_METHODDEF
+ #define OS_SCHED_GETPARAM_METHODDEF
+#endif /* !defined(OS_SCHED_GETPARAM_METHODDEF) */
+
+#ifndef OS_SCHED_SETPARAM_METHODDEF
+ #define OS_SCHED_SETPARAM_METHODDEF
+#endif /* !defined(OS_SCHED_SETPARAM_METHODDEF) */
+
+#ifndef OS_SCHED_RR_GET_INTERVAL_METHODDEF
+ #define OS_SCHED_RR_GET_INTERVAL_METHODDEF
+#endif /* !defined(OS_SCHED_RR_GET_INTERVAL_METHODDEF) */
+
+#ifndef OS_SCHED_YIELD_METHODDEF
+ #define OS_SCHED_YIELD_METHODDEF
+#endif /* !defined(OS_SCHED_YIELD_METHODDEF) */
+
+#ifndef OS_SCHED_SETAFFINITY_METHODDEF
+ #define OS_SCHED_SETAFFINITY_METHODDEF
+#endif /* !defined(OS_SCHED_SETAFFINITY_METHODDEF) */
+
+#ifndef OS_SCHED_GETAFFINITY_METHODDEF
+ #define OS_SCHED_GETAFFINITY_METHODDEF
+#endif /* !defined(OS_SCHED_GETAFFINITY_METHODDEF) */
+
+#ifndef OS_OPENPTY_METHODDEF
+ #define OS_OPENPTY_METHODDEF
+#endif /* !defined(OS_OPENPTY_METHODDEF) */
+
+#ifndef OS_FORKPTY_METHODDEF
+ #define OS_FORKPTY_METHODDEF
+#endif /* !defined(OS_FORKPTY_METHODDEF) */
+
+#ifndef OS_GETEGID_METHODDEF
+ #define OS_GETEGID_METHODDEF
+#endif /* !defined(OS_GETEGID_METHODDEF) */
+
+#ifndef OS_GETEUID_METHODDEF
+ #define OS_GETEUID_METHODDEF
+#endif /* !defined(OS_GETEUID_METHODDEF) */
+
+#ifndef OS_GETGID_METHODDEF
+ #define OS_GETGID_METHODDEF
+#endif /* !defined(OS_GETGID_METHODDEF) */
+
+#ifndef OS_GETGROUPS_METHODDEF
+ #define OS_GETGROUPS_METHODDEF
+#endif /* !defined(OS_GETGROUPS_METHODDEF) */
+
+#ifndef OS_GETPGID_METHODDEF
+ #define OS_GETPGID_METHODDEF
+#endif /* !defined(OS_GETPGID_METHODDEF) */
+
+#ifndef OS_GETPGRP_METHODDEF
+ #define OS_GETPGRP_METHODDEF
+#endif /* !defined(OS_GETPGRP_METHODDEF) */
+
+#ifndef OS_SETPGRP_METHODDEF
+ #define OS_SETPGRP_METHODDEF
+#endif /* !defined(OS_SETPGRP_METHODDEF) */
+
+#ifndef OS_GETPPID_METHODDEF
+ #define OS_GETPPID_METHODDEF
+#endif /* !defined(OS_GETPPID_METHODDEF) */
+
+#ifndef OS_GETLOGIN_METHODDEF
+ #define OS_GETLOGIN_METHODDEF
+#endif /* !defined(OS_GETLOGIN_METHODDEF) */
+
+#ifndef OS_GETUID_METHODDEF
+ #define OS_GETUID_METHODDEF
+#endif /* !defined(OS_GETUID_METHODDEF) */
+
+#ifndef OS_KILL_METHODDEF
+ #define OS_KILL_METHODDEF
+#endif /* !defined(OS_KILL_METHODDEF) */
+
+#ifndef OS_KILLPG_METHODDEF
+ #define OS_KILLPG_METHODDEF
+#endif /* !defined(OS_KILLPG_METHODDEF) */
+
+#ifndef OS_PLOCK_METHODDEF
+ #define OS_PLOCK_METHODDEF
+#endif /* !defined(OS_PLOCK_METHODDEF) */
+
+#ifndef OS_SETUID_METHODDEF
+ #define OS_SETUID_METHODDEF
+#endif /* !defined(OS_SETUID_METHODDEF) */
+
+#ifndef OS_SETEUID_METHODDEF
+ #define OS_SETEUID_METHODDEF
+#endif /* !defined(OS_SETEUID_METHODDEF) */
+
+#ifndef OS_SETEGID_METHODDEF
+ #define OS_SETEGID_METHODDEF
+#endif /* !defined(OS_SETEGID_METHODDEF) */
+
+#ifndef OS_SETREUID_METHODDEF
+ #define OS_SETREUID_METHODDEF
+#endif /* !defined(OS_SETREUID_METHODDEF) */
+
+#ifndef OS_SETREGID_METHODDEF
+ #define OS_SETREGID_METHODDEF
+#endif /* !defined(OS_SETREGID_METHODDEF) */
+
+#ifndef OS_SETGID_METHODDEF
+ #define OS_SETGID_METHODDEF
+#endif /* !defined(OS_SETGID_METHODDEF) */
+
+#ifndef OS_SETGROUPS_METHODDEF
+ #define OS_SETGROUPS_METHODDEF
+#endif /* !defined(OS_SETGROUPS_METHODDEF) */
+
+#ifndef OS_WAIT3_METHODDEF
+ #define OS_WAIT3_METHODDEF
+#endif /* !defined(OS_WAIT3_METHODDEF) */
+
+#ifndef OS_WAIT4_METHODDEF
+ #define OS_WAIT4_METHODDEF
+#endif /* !defined(OS_WAIT4_METHODDEF) */
+
+#ifndef OS_WAITID_METHODDEF
+ #define OS_WAITID_METHODDEF
+#endif /* !defined(OS_WAITID_METHODDEF) */
+
+#ifndef OS_WAITPID_METHODDEF
+ #define OS_WAITPID_METHODDEF
+#endif /* !defined(OS_WAITPID_METHODDEF) */
+
+#ifndef OS_WAIT_METHODDEF
+ #define OS_WAIT_METHODDEF
+#endif /* !defined(OS_WAIT_METHODDEF) */
+
+#ifndef OS_SYMLINK_METHODDEF
+ #define OS_SYMLINK_METHODDEF
+#endif /* !defined(OS_SYMLINK_METHODDEF) */
+
+#ifndef OS_TIMES_METHODDEF
+ #define OS_TIMES_METHODDEF
+#endif /* !defined(OS_TIMES_METHODDEF) */
+
+#ifndef OS_GETSID_METHODDEF
+ #define OS_GETSID_METHODDEF
+#endif /* !defined(OS_GETSID_METHODDEF) */
+
+#ifndef OS_SETSID_METHODDEF
+ #define OS_SETSID_METHODDEF
+#endif /* !defined(OS_SETSID_METHODDEF) */
+
+#ifndef OS_SETPGID_METHODDEF
+ #define OS_SETPGID_METHODDEF
+#endif /* !defined(OS_SETPGID_METHODDEF) */
+
+#ifndef OS_TCGETPGRP_METHODDEF
+ #define OS_TCGETPGRP_METHODDEF
+#endif /* !defined(OS_TCGETPGRP_METHODDEF) */
+
+#ifndef OS_TCSETPGRP_METHODDEF
+ #define OS_TCSETPGRP_METHODDEF
+#endif /* !defined(OS_TCSETPGRP_METHODDEF) */
+
+#ifndef OS_LOCKF_METHODDEF
+ #define OS_LOCKF_METHODDEF
+#endif /* !defined(OS_LOCKF_METHODDEF) */
+
+#ifndef OS_READV_METHODDEF
+ #define OS_READV_METHODDEF
+#endif /* !defined(OS_READV_METHODDEF) */
+
+#ifndef OS_PREAD_METHODDEF
+ #define OS_PREAD_METHODDEF
+#endif /* !defined(OS_PREAD_METHODDEF) */
+
+#ifndef OS_PIPE_METHODDEF
+ #define OS_PIPE_METHODDEF
+#endif /* !defined(OS_PIPE_METHODDEF) */
+
+#ifndef OS_PIPE2_METHODDEF
+ #define OS_PIPE2_METHODDEF
+#endif /* !defined(OS_PIPE2_METHODDEF) */
+
+#ifndef OS_WRITEV_METHODDEF
+ #define OS_WRITEV_METHODDEF
+#endif /* !defined(OS_WRITEV_METHODDEF) */
+
+#ifndef OS_PWRITE_METHODDEF
+ #define OS_PWRITE_METHODDEF
+#endif /* !defined(OS_PWRITE_METHODDEF) */
+
+#ifndef OS_MKFIFO_METHODDEF
+ #define OS_MKFIFO_METHODDEF
+#endif /* !defined(OS_MKFIFO_METHODDEF) */
+
+#ifndef OS_MKNOD_METHODDEF
+ #define OS_MKNOD_METHODDEF
+#endif /* !defined(OS_MKNOD_METHODDEF) */
+
+#ifndef OS_MAJOR_METHODDEF
+ #define OS_MAJOR_METHODDEF
+#endif /* !defined(OS_MAJOR_METHODDEF) */
+
+#ifndef OS_MINOR_METHODDEF
+ #define OS_MINOR_METHODDEF
+#endif /* !defined(OS_MINOR_METHODDEF) */
+
+#ifndef OS_MAKEDEV_METHODDEF
+ #define OS_MAKEDEV_METHODDEF
+#endif /* !defined(OS_MAKEDEV_METHODDEF) */
+
+#ifndef OS_FTRUNCATE_METHODDEF
+ #define OS_FTRUNCATE_METHODDEF
+#endif /* !defined(OS_FTRUNCATE_METHODDEF) */
+
+#ifndef OS_TRUNCATE_METHODDEF
+ #define OS_TRUNCATE_METHODDEF
+#endif /* !defined(OS_TRUNCATE_METHODDEF) */
+
+#ifndef OS_POSIX_FALLOCATE_METHODDEF
+ #define OS_POSIX_FALLOCATE_METHODDEF
+#endif /* !defined(OS_POSIX_FALLOCATE_METHODDEF) */
+
+#ifndef OS_POSIX_FADVISE_METHODDEF
+ #define OS_POSIX_FADVISE_METHODDEF
+#endif /* !defined(OS_POSIX_FADVISE_METHODDEF) */
+
+#ifndef OS_PUTENV_METHODDEF
+ #define OS_PUTENV_METHODDEF
+#endif /* !defined(OS_PUTENV_METHODDEF) */
+
+#ifndef OS_UNSETENV_METHODDEF
+ #define OS_UNSETENV_METHODDEF
+#endif /* !defined(OS_UNSETENV_METHODDEF) */
+
+#ifndef OS_WCOREDUMP_METHODDEF
+ #define OS_WCOREDUMP_METHODDEF
+#endif /* !defined(OS_WCOREDUMP_METHODDEF) */
+
+#ifndef OS_WIFCONTINUED_METHODDEF
+ #define OS_WIFCONTINUED_METHODDEF
+#endif /* !defined(OS_WIFCONTINUED_METHODDEF) */
+
+#ifndef OS_WIFSTOPPED_METHODDEF
+ #define OS_WIFSTOPPED_METHODDEF
+#endif /* !defined(OS_WIFSTOPPED_METHODDEF) */
+
+#ifndef OS_WIFSIGNALED_METHODDEF
+ #define OS_WIFSIGNALED_METHODDEF
+#endif /* !defined(OS_WIFSIGNALED_METHODDEF) */
+
+#ifndef OS_WIFEXITED_METHODDEF
+ #define OS_WIFEXITED_METHODDEF
+#endif /* !defined(OS_WIFEXITED_METHODDEF) */
+
+#ifndef OS_WEXITSTATUS_METHODDEF
+ #define OS_WEXITSTATUS_METHODDEF
+#endif /* !defined(OS_WEXITSTATUS_METHODDEF) */
+
+#ifndef OS_WTERMSIG_METHODDEF
+ #define OS_WTERMSIG_METHODDEF
+#endif /* !defined(OS_WTERMSIG_METHODDEF) */
+
+#ifndef OS_WSTOPSIG_METHODDEF
+ #define OS_WSTOPSIG_METHODDEF
+#endif /* !defined(OS_WSTOPSIG_METHODDEF) */
+
+#ifndef OS_FSTATVFS_METHODDEF
+ #define OS_FSTATVFS_METHODDEF
+#endif /* !defined(OS_FSTATVFS_METHODDEF) */
+
+#ifndef OS_STATVFS_METHODDEF
+ #define OS_STATVFS_METHODDEF
+#endif /* !defined(OS_STATVFS_METHODDEF) */
+
+#ifndef OS__GETDISKUSAGE_METHODDEF
+ #define OS__GETDISKUSAGE_METHODDEF
+#endif /* !defined(OS__GETDISKUSAGE_METHODDEF) */
+
+#ifndef OS_FPATHCONF_METHODDEF
+ #define OS_FPATHCONF_METHODDEF
+#endif /* !defined(OS_FPATHCONF_METHODDEF) */
+
+#ifndef OS_PATHCONF_METHODDEF
+ #define OS_PATHCONF_METHODDEF
+#endif /* !defined(OS_PATHCONF_METHODDEF) */
+
+#ifndef OS_CONFSTR_METHODDEF
+ #define OS_CONFSTR_METHODDEF
+#endif /* !defined(OS_CONFSTR_METHODDEF) */
+
+#ifndef OS_SYSCONF_METHODDEF
+ #define OS_SYSCONF_METHODDEF
+#endif /* !defined(OS_SYSCONF_METHODDEF) */
+
+#ifndef OS_GETLOADAVG_METHODDEF
+ #define OS_GETLOADAVG_METHODDEF
+#endif /* !defined(OS_GETLOADAVG_METHODDEF) */
+
+#ifndef OS_SETRESUID_METHODDEF
+ #define OS_SETRESUID_METHODDEF
+#endif /* !defined(OS_SETRESUID_METHODDEF) */
+
+#ifndef OS_SETRESGID_METHODDEF
+ #define OS_SETRESGID_METHODDEF
+#endif /* !defined(OS_SETRESGID_METHODDEF) */
+
+#ifndef OS_GETRESUID_METHODDEF
+ #define OS_GETRESUID_METHODDEF
+#endif /* !defined(OS_GETRESUID_METHODDEF) */
+
+#ifndef OS_GETRESGID_METHODDEF
+ #define OS_GETRESGID_METHODDEF
+#endif /* !defined(OS_GETRESGID_METHODDEF) */
+
+#ifndef OS_GETXATTR_METHODDEF
+ #define OS_GETXATTR_METHODDEF
+#endif /* !defined(OS_GETXATTR_METHODDEF) */
+
+#ifndef OS_SETXATTR_METHODDEF
+ #define OS_SETXATTR_METHODDEF
+#endif /* !defined(OS_SETXATTR_METHODDEF) */
+
+#ifndef OS_REMOVEXATTR_METHODDEF
+ #define OS_REMOVEXATTR_METHODDEF
+#endif /* !defined(OS_REMOVEXATTR_METHODDEF) */
+
+#ifndef OS_LISTXATTR_METHODDEF
+ #define OS_LISTXATTR_METHODDEF
+#endif /* !defined(OS_LISTXATTR_METHODDEF) */
+
+#ifndef OS_GET_HANDLE_INHERITABLE_METHODDEF
+ #define OS_GET_HANDLE_INHERITABLE_METHODDEF
+#endif /* !defined(OS_GET_HANDLE_INHERITABLE_METHODDEF) */
+
+#ifndef OS_SET_HANDLE_INHERITABLE_METHODDEF
+ #define OS_SET_HANDLE_INHERITABLE_METHODDEF
+#endif /* !defined(OS_SET_HANDLE_INHERITABLE_METHODDEF) */
+/*[clinic end generated code: output=95824c52fd034654 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/pwdmodule.c.h b/Modules/clinic/pwdmodule.c.h
new file mode 100644
index 0000000000..9de2e4ff2a
--- /dev/null
+++ b/Modules/clinic/pwdmodule.c.h
@@ -0,0 +1,71 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(pwd_getpwuid__doc__,
+"getpwuid($module, uidobj, /)\n"
+"--\n"
+"\n"
+"Return the password database entry for the given numeric user ID.\n"
+"\n"
+"See `help(pwd)` for more on password database entries.");
+
+#define PWD_GETPWUID_METHODDEF \
+ {"getpwuid", (PyCFunction)pwd_getpwuid, METH_O, pwd_getpwuid__doc__},
+
+PyDoc_STRVAR(pwd_getpwnam__doc__,
+"getpwnam($module, arg, /)\n"
+"--\n"
+"\n"
+"Return the password database entry for the given user name.\n"
+"\n"
+"See `help(pwd)` for more on password database entries.");
+
+#define PWD_GETPWNAM_METHODDEF \
+ {"getpwnam", (PyCFunction)pwd_getpwnam, METH_O, pwd_getpwnam__doc__},
+
+static PyObject *
+pwd_getpwnam_impl(PyModuleDef *module, PyObject *arg);
+
+static PyObject *
+pwd_getpwnam(PyModuleDef *module, PyObject *arg_)
+{
+ PyObject *return_value = NULL;
+ PyObject *arg;
+
+ if (!PyArg_Parse(arg_, "U:getpwnam", &arg))
+ goto exit;
+ return_value = pwd_getpwnam_impl(module, arg);
+
+exit:
+ return return_value;
+}
+
+#if defined(HAVE_GETPWENT)
+
+PyDoc_STRVAR(pwd_getpwall__doc__,
+"getpwall($module, /)\n"
+"--\n"
+"\n"
+"Return a list of all available password database entries, in arbitrary order.\n"
+"\n"
+"See help(pwd) for more on password database entries.");
+
+#define PWD_GETPWALL_METHODDEF \
+ {"getpwall", (PyCFunction)pwd_getpwall, METH_NOARGS, pwd_getpwall__doc__},
+
+static PyObject *
+pwd_getpwall_impl(PyModuleDef *module);
+
+static PyObject *
+pwd_getpwall(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return pwd_getpwall_impl(module);
+}
+
+#endif /* defined(HAVE_GETPWENT) */
+
+#ifndef PWD_GETPWALL_METHODDEF
+ #define PWD_GETPWALL_METHODDEF
+#endif /* !defined(PWD_GETPWALL_METHODDEF) */
+/*[clinic end generated code: output=2ed0ecf34fd3f98f input=a9049054013a1b77]*/
diff --git a/Modules/clinic/pyexpat.c.h b/Modules/clinic/pyexpat.c.h
new file mode 100644
index 0000000000..379c5db637
--- /dev/null
+++ b/Modules/clinic/pyexpat.c.h
@@ -0,0 +1,284 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(pyexpat_xmlparser_Parse__doc__,
+"Parse($self, data, isfinal=False, /)\n"
+"--\n"
+"\n"
+"Parse XML data.\n"
+"\n"
+"`isfinal\' should be true at end of input.");
+
+#define PYEXPAT_XMLPARSER_PARSE_METHODDEF \
+ {"Parse", (PyCFunction)pyexpat_xmlparser_Parse, METH_VARARGS, pyexpat_xmlparser_Parse__doc__},
+
+static PyObject *
+pyexpat_xmlparser_Parse_impl(xmlparseobject *self, PyObject *data,
+ int isfinal);
+
+static PyObject *
+pyexpat_xmlparser_Parse(xmlparseobject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *data;
+ int isfinal = 0;
+
+ if (!PyArg_ParseTuple(args, "O|i:Parse",
+ &data, &isfinal))
+ goto exit;
+ return_value = pyexpat_xmlparser_Parse_impl(self, data, isfinal);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(pyexpat_xmlparser_ParseFile__doc__,
+"ParseFile($self, file, /)\n"
+"--\n"
+"\n"
+"Parse XML data from file-like object.");
+
+#define PYEXPAT_XMLPARSER_PARSEFILE_METHODDEF \
+ {"ParseFile", (PyCFunction)pyexpat_xmlparser_ParseFile, METH_O, pyexpat_xmlparser_ParseFile__doc__},
+
+PyDoc_STRVAR(pyexpat_xmlparser_SetBase__doc__,
+"SetBase($self, base, /)\n"
+"--\n"
+"\n"
+"Set the base URL for the parser.");
+
+#define PYEXPAT_XMLPARSER_SETBASE_METHODDEF \
+ {"SetBase", (PyCFunction)pyexpat_xmlparser_SetBase, METH_O, pyexpat_xmlparser_SetBase__doc__},
+
+static PyObject *
+pyexpat_xmlparser_SetBase_impl(xmlparseobject *self, const char *base);
+
+static PyObject *
+pyexpat_xmlparser_SetBase(xmlparseobject *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ const char *base;
+
+ if (!PyArg_Parse(arg, "s:SetBase", &base))
+ goto exit;
+ return_value = pyexpat_xmlparser_SetBase_impl(self, base);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(pyexpat_xmlparser_GetBase__doc__,
+"GetBase($self, /)\n"
+"--\n"
+"\n"
+"Return base URL string for the parser.");
+
+#define PYEXPAT_XMLPARSER_GETBASE_METHODDEF \
+ {"GetBase", (PyCFunction)pyexpat_xmlparser_GetBase, METH_NOARGS, pyexpat_xmlparser_GetBase__doc__},
+
+static PyObject *
+pyexpat_xmlparser_GetBase_impl(xmlparseobject *self);
+
+static PyObject *
+pyexpat_xmlparser_GetBase(xmlparseobject *self, PyObject *Py_UNUSED(ignored))
+{
+ return pyexpat_xmlparser_GetBase_impl(self);
+}
+
+PyDoc_STRVAR(pyexpat_xmlparser_GetInputContext__doc__,
+"GetInputContext($self, /)\n"
+"--\n"
+"\n"
+"Return the untranslated text of the input that caused the current event.\n"
+"\n"
+"If the event was generated by a large amount of text (such as a start tag\n"
+"for an element with many attributes), not all of the text may be available.");
+
+#define PYEXPAT_XMLPARSER_GETINPUTCONTEXT_METHODDEF \
+ {"GetInputContext", (PyCFunction)pyexpat_xmlparser_GetInputContext, METH_NOARGS, pyexpat_xmlparser_GetInputContext__doc__},
+
+static PyObject *
+pyexpat_xmlparser_GetInputContext_impl(xmlparseobject *self);
+
+static PyObject *
+pyexpat_xmlparser_GetInputContext(xmlparseobject *self, PyObject *Py_UNUSED(ignored))
+{
+ return pyexpat_xmlparser_GetInputContext_impl(self);
+}
+
+PyDoc_STRVAR(pyexpat_xmlparser_ExternalEntityParserCreate__doc__,
+"ExternalEntityParserCreate($self, context, encoding=None, /)\n"
+"--\n"
+"\n"
+"Create a parser for parsing an external entity based on the information passed to the ExternalEntityRefHandler.");
+
+#define PYEXPAT_XMLPARSER_EXTERNALENTITYPARSERCREATE_METHODDEF \
+ {"ExternalEntityParserCreate", (PyCFunction)pyexpat_xmlparser_ExternalEntityParserCreate, METH_VARARGS, pyexpat_xmlparser_ExternalEntityParserCreate__doc__},
+
+static PyObject *
+pyexpat_xmlparser_ExternalEntityParserCreate_impl(xmlparseobject *self,
+ const char *context,
+ const char *encoding);
+
+static PyObject *
+pyexpat_xmlparser_ExternalEntityParserCreate(xmlparseobject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ const char *context;
+ const char *encoding = NULL;
+
+ if (!PyArg_ParseTuple(args, "z|s:ExternalEntityParserCreate",
+ &context, &encoding))
+ goto exit;
+ return_value = pyexpat_xmlparser_ExternalEntityParserCreate_impl(self, context, encoding);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(pyexpat_xmlparser_SetParamEntityParsing__doc__,
+"SetParamEntityParsing($self, flag, /)\n"
+"--\n"
+"\n"
+"Controls parsing of parameter entities (including the external DTD subset).\n"
+"\n"
+"Possible flag values are XML_PARAM_ENTITY_PARSING_NEVER,\n"
+"XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE and\n"
+"XML_PARAM_ENTITY_PARSING_ALWAYS. Returns true if setting the flag\n"
+"was successful.");
+
+#define PYEXPAT_XMLPARSER_SETPARAMENTITYPARSING_METHODDEF \
+ {"SetParamEntityParsing", (PyCFunction)pyexpat_xmlparser_SetParamEntityParsing, METH_O, pyexpat_xmlparser_SetParamEntityParsing__doc__},
+
+static PyObject *
+pyexpat_xmlparser_SetParamEntityParsing_impl(xmlparseobject *self, int flag);
+
+static PyObject *
+pyexpat_xmlparser_SetParamEntityParsing(xmlparseobject *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int flag;
+
+ if (!PyArg_Parse(arg, "i:SetParamEntityParsing", &flag))
+ goto exit;
+ return_value = pyexpat_xmlparser_SetParamEntityParsing_impl(self, flag);
+
+exit:
+ return return_value;
+}
+
+#if (XML_COMBINED_VERSION >= 19505)
+
+PyDoc_STRVAR(pyexpat_xmlparser_UseForeignDTD__doc__,
+"UseForeignDTD($self, flag=True, /)\n"
+"--\n"
+"\n"
+"Allows the application to provide an artificial external subset if one is not specified as part of the document instance.\n"
+"\n"
+"This readily allows the use of a \'default\' document type controlled by the\n"
+"application, while still getting the advantage of providing document type\n"
+"information to the parser. \'flag\' defaults to True if not provided.");
+
+#define PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF \
+ {"UseForeignDTD", (PyCFunction)pyexpat_xmlparser_UseForeignDTD, METH_VARARGS, pyexpat_xmlparser_UseForeignDTD__doc__},
+
+static PyObject *
+pyexpat_xmlparser_UseForeignDTD_impl(xmlparseobject *self, int flag);
+
+static PyObject *
+pyexpat_xmlparser_UseForeignDTD(xmlparseobject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int flag = 1;
+
+ if (!PyArg_ParseTuple(args, "|p:UseForeignDTD",
+ &flag))
+ goto exit;
+ return_value = pyexpat_xmlparser_UseForeignDTD_impl(self, flag);
+
+exit:
+ return return_value;
+}
+
+#endif /* (XML_COMBINED_VERSION >= 19505) */
+
+PyDoc_STRVAR(pyexpat_xmlparser___dir____doc__,
+"__dir__($self, /)\n"
+"--\n"
+"\n");
+
+#define PYEXPAT_XMLPARSER___DIR___METHODDEF \
+ {"__dir__", (PyCFunction)pyexpat_xmlparser___dir__, METH_NOARGS, pyexpat_xmlparser___dir____doc__},
+
+static PyObject *
+pyexpat_xmlparser___dir___impl(xmlparseobject *self);
+
+static PyObject *
+pyexpat_xmlparser___dir__(xmlparseobject *self, PyObject *Py_UNUSED(ignored))
+{
+ return pyexpat_xmlparser___dir___impl(self);
+}
+
+PyDoc_STRVAR(pyexpat_ParserCreate__doc__,
+"ParserCreate($module, /, encoding=None, namespace_separator=None,\n"
+" intern=None)\n"
+"--\n"
+"\n"
+"Return a new XML parser object.");
+
+#define PYEXPAT_PARSERCREATE_METHODDEF \
+ {"ParserCreate", (PyCFunction)pyexpat_ParserCreate, METH_VARARGS|METH_KEYWORDS, pyexpat_ParserCreate__doc__},
+
+static PyObject *
+pyexpat_ParserCreate_impl(PyModuleDef *module, const char *encoding,
+ const char *namespace_separator, PyObject *intern);
+
+static PyObject *
+pyexpat_ParserCreate(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"encoding", "namespace_separator", "intern", NULL};
+ const char *encoding = NULL;
+ const char *namespace_separator = NULL;
+ PyObject *intern = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|zzO:ParserCreate", _keywords,
+ &encoding, &namespace_separator, &intern))
+ goto exit;
+ return_value = pyexpat_ParserCreate_impl(module, encoding, namespace_separator, intern);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(pyexpat_ErrorString__doc__,
+"ErrorString($module, code, /)\n"
+"--\n"
+"\n"
+"Returns string error for given number.");
+
+#define PYEXPAT_ERRORSTRING_METHODDEF \
+ {"ErrorString", (PyCFunction)pyexpat_ErrorString, METH_O, pyexpat_ErrorString__doc__},
+
+static PyObject *
+pyexpat_ErrorString_impl(PyModuleDef *module, long code);
+
+static PyObject *
+pyexpat_ErrorString(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ long code;
+
+ if (!PyArg_Parse(arg, "l:ErrorString", &code))
+ goto exit;
+ return_value = pyexpat_ErrorString_impl(module, code);
+
+exit:
+ return return_value;
+}
+
+#ifndef PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF
+ #define PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF
+#endif /* !defined(PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF) */
+/*[clinic end generated code: output=bf4d99c9702d8a6c input=a9049054013a1b77]*/
diff --git a/Modules/clinic/sha1module.c.h b/Modules/clinic/sha1module.c.h
new file mode 100644
index 0000000000..fa865baec8
--- /dev/null
+++ b/Modules/clinic/sha1module.c.h
@@ -0,0 +1,95 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(SHA1Type_copy__doc__,
+"copy($self, /)\n"
+"--\n"
+"\n"
+"Return a copy of the hash object.");
+
+#define SHA1TYPE_COPY_METHODDEF \
+ {"copy", (PyCFunction)SHA1Type_copy, METH_NOARGS, SHA1Type_copy__doc__},
+
+static PyObject *
+SHA1Type_copy_impl(SHA1object *self);
+
+static PyObject *
+SHA1Type_copy(SHA1object *self, PyObject *Py_UNUSED(ignored))
+{
+ return SHA1Type_copy_impl(self);
+}
+
+PyDoc_STRVAR(SHA1Type_digest__doc__,
+"digest($self, /)\n"
+"--\n"
+"\n"
+"Return the digest value as a string of binary data.");
+
+#define SHA1TYPE_DIGEST_METHODDEF \
+ {"digest", (PyCFunction)SHA1Type_digest, METH_NOARGS, SHA1Type_digest__doc__},
+
+static PyObject *
+SHA1Type_digest_impl(SHA1object *self);
+
+static PyObject *
+SHA1Type_digest(SHA1object *self, PyObject *Py_UNUSED(ignored))
+{
+ return SHA1Type_digest_impl(self);
+}
+
+PyDoc_STRVAR(SHA1Type_hexdigest__doc__,
+"hexdigest($self, /)\n"
+"--\n"
+"\n"
+"Return the digest value as a string of hexadecimal digits.");
+
+#define SHA1TYPE_HEXDIGEST_METHODDEF \
+ {"hexdigest", (PyCFunction)SHA1Type_hexdigest, METH_NOARGS, SHA1Type_hexdigest__doc__},
+
+static PyObject *
+SHA1Type_hexdigest_impl(SHA1object *self);
+
+static PyObject *
+SHA1Type_hexdigest(SHA1object *self, PyObject *Py_UNUSED(ignored))
+{
+ return SHA1Type_hexdigest_impl(self);
+}
+
+PyDoc_STRVAR(SHA1Type_update__doc__,
+"update($self, obj, /)\n"
+"--\n"
+"\n"
+"Update this hash object\'s state with the provided string.");
+
+#define SHA1TYPE_UPDATE_METHODDEF \
+ {"update", (PyCFunction)SHA1Type_update, METH_O, SHA1Type_update__doc__},
+
+PyDoc_STRVAR(_sha1_sha1__doc__,
+"sha1($module, /, string=b\'\')\n"
+"--\n"
+"\n"
+"Return a new SHA1 hash object; optionally initialized with a string.");
+
+#define _SHA1_SHA1_METHODDEF \
+ {"sha1", (PyCFunction)_sha1_sha1, METH_VARARGS|METH_KEYWORDS, _sha1_sha1__doc__},
+
+static PyObject *
+_sha1_sha1_impl(PyModuleDef *module, PyObject *string);
+
+static PyObject *
+_sha1_sha1(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"string", NULL};
+ PyObject *string = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:sha1", _keywords,
+ &string))
+ goto exit;
+ return_value = _sha1_sha1_impl(module, string);
+
+exit:
+ return return_value;
+}
+/*[clinic end generated code: output=be19102f3120490a input=a9049054013a1b77]*/
diff --git a/Modules/clinic/sha256module.c.h b/Modules/clinic/sha256module.c.h
new file mode 100644
index 0000000000..c5fe188a9c
--- /dev/null
+++ b/Modules/clinic/sha256module.c.h
@@ -0,0 +1,123 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(SHA256Type_copy__doc__,
+"copy($self, /)\n"
+"--\n"
+"\n"
+"Return a copy of the hash object.");
+
+#define SHA256TYPE_COPY_METHODDEF \
+ {"copy", (PyCFunction)SHA256Type_copy, METH_NOARGS, SHA256Type_copy__doc__},
+
+static PyObject *
+SHA256Type_copy_impl(SHAobject *self);
+
+static PyObject *
+SHA256Type_copy(SHAobject *self, PyObject *Py_UNUSED(ignored))
+{
+ return SHA256Type_copy_impl(self);
+}
+
+PyDoc_STRVAR(SHA256Type_digest__doc__,
+"digest($self, /)\n"
+"--\n"
+"\n"
+"Return the digest value as a string of binary data.");
+
+#define SHA256TYPE_DIGEST_METHODDEF \
+ {"digest", (PyCFunction)SHA256Type_digest, METH_NOARGS, SHA256Type_digest__doc__},
+
+static PyObject *
+SHA256Type_digest_impl(SHAobject *self);
+
+static PyObject *
+SHA256Type_digest(SHAobject *self, PyObject *Py_UNUSED(ignored))
+{
+ return SHA256Type_digest_impl(self);
+}
+
+PyDoc_STRVAR(SHA256Type_hexdigest__doc__,
+"hexdigest($self, /)\n"
+"--\n"
+"\n"
+"Return the digest value as a string of hexadecimal digits.");
+
+#define SHA256TYPE_HEXDIGEST_METHODDEF \
+ {"hexdigest", (PyCFunction)SHA256Type_hexdigest, METH_NOARGS, SHA256Type_hexdigest__doc__},
+
+static PyObject *
+SHA256Type_hexdigest_impl(SHAobject *self);
+
+static PyObject *
+SHA256Type_hexdigest(SHAobject *self, PyObject *Py_UNUSED(ignored))
+{
+ return SHA256Type_hexdigest_impl(self);
+}
+
+PyDoc_STRVAR(SHA256Type_update__doc__,
+"update($self, obj, /)\n"
+"--\n"
+"\n"
+"Update this hash object\'s state with the provided string.");
+
+#define SHA256TYPE_UPDATE_METHODDEF \
+ {"update", (PyCFunction)SHA256Type_update, METH_O, SHA256Type_update__doc__},
+
+PyDoc_STRVAR(_sha256_sha256__doc__,
+"sha256($module, /, string=b\'\')\n"
+"--\n"
+"\n"
+"Return a new SHA-256 hash object; optionally initialized with a string.");
+
+#define _SHA256_SHA256_METHODDEF \
+ {"sha256", (PyCFunction)_sha256_sha256, METH_VARARGS|METH_KEYWORDS, _sha256_sha256__doc__},
+
+static PyObject *
+_sha256_sha256_impl(PyModuleDef *module, PyObject *string);
+
+static PyObject *
+_sha256_sha256(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"string", NULL};
+ PyObject *string = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:sha256", _keywords,
+ &string))
+ goto exit;
+ return_value = _sha256_sha256_impl(module, string);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_sha256_sha224__doc__,
+"sha224($module, /, string=b\'\')\n"
+"--\n"
+"\n"
+"Return a new SHA-224 hash object; optionally initialized with a string.");
+
+#define _SHA256_SHA224_METHODDEF \
+ {"sha224", (PyCFunction)_sha256_sha224, METH_VARARGS|METH_KEYWORDS, _sha256_sha224__doc__},
+
+static PyObject *
+_sha256_sha224_impl(PyModuleDef *module, PyObject *string);
+
+static PyObject *
+_sha256_sha224(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"string", NULL};
+ PyObject *string = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:sha224", _keywords,
+ &string))
+ goto exit;
+ return_value = _sha256_sha224_impl(module, string);
+
+exit:
+ return return_value;
+}
+/*[clinic end generated code: output=354cedf3b632c7b2 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/sha512module.c.h b/Modules/clinic/sha512module.c.h
new file mode 100644
index 0000000000..c308739d44
--- /dev/null
+++ b/Modules/clinic/sha512module.c.h
@@ -0,0 +1,171 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+#if defined(PY_LONG_LONG)
+
+PyDoc_STRVAR(SHA512Type_copy__doc__,
+"copy($self, /)\n"
+"--\n"
+"\n"
+"Return a copy of the hash object.");
+
+#define SHA512TYPE_COPY_METHODDEF \
+ {"copy", (PyCFunction)SHA512Type_copy, METH_NOARGS, SHA512Type_copy__doc__},
+
+static PyObject *
+SHA512Type_copy_impl(SHAobject *self);
+
+static PyObject *
+SHA512Type_copy(SHAobject *self, PyObject *Py_UNUSED(ignored))
+{
+ return SHA512Type_copy_impl(self);
+}
+
+#endif /* defined(PY_LONG_LONG) */
+
+#if defined(PY_LONG_LONG)
+
+PyDoc_STRVAR(SHA512Type_digest__doc__,
+"digest($self, /)\n"
+"--\n"
+"\n"
+"Return the digest value as a string of binary data.");
+
+#define SHA512TYPE_DIGEST_METHODDEF \
+ {"digest", (PyCFunction)SHA512Type_digest, METH_NOARGS, SHA512Type_digest__doc__},
+
+static PyObject *
+SHA512Type_digest_impl(SHAobject *self);
+
+static PyObject *
+SHA512Type_digest(SHAobject *self, PyObject *Py_UNUSED(ignored))
+{
+ return SHA512Type_digest_impl(self);
+}
+
+#endif /* defined(PY_LONG_LONG) */
+
+#if defined(PY_LONG_LONG)
+
+PyDoc_STRVAR(SHA512Type_hexdigest__doc__,
+"hexdigest($self, /)\n"
+"--\n"
+"\n"
+"Return the digest value as a string of hexadecimal digits.");
+
+#define SHA512TYPE_HEXDIGEST_METHODDEF \
+ {"hexdigest", (PyCFunction)SHA512Type_hexdigest, METH_NOARGS, SHA512Type_hexdigest__doc__},
+
+static PyObject *
+SHA512Type_hexdigest_impl(SHAobject *self);
+
+static PyObject *
+SHA512Type_hexdigest(SHAobject *self, PyObject *Py_UNUSED(ignored))
+{
+ return SHA512Type_hexdigest_impl(self);
+}
+
+#endif /* defined(PY_LONG_LONG) */
+
+#if defined(PY_LONG_LONG)
+
+PyDoc_STRVAR(SHA512Type_update__doc__,
+"update($self, obj, /)\n"
+"--\n"
+"\n"
+"Update this hash object\'s state with the provided string.");
+
+#define SHA512TYPE_UPDATE_METHODDEF \
+ {"update", (PyCFunction)SHA512Type_update, METH_O, SHA512Type_update__doc__},
+
+#endif /* defined(PY_LONG_LONG) */
+
+#if defined(PY_LONG_LONG)
+
+PyDoc_STRVAR(_sha512_sha512__doc__,
+"sha512($module, /, string=b\'\')\n"
+"--\n"
+"\n"
+"Return a new SHA-512 hash object; optionally initialized with a string.");
+
+#define _SHA512_SHA512_METHODDEF \
+ {"sha512", (PyCFunction)_sha512_sha512, METH_VARARGS|METH_KEYWORDS, _sha512_sha512__doc__},
+
+static PyObject *
+_sha512_sha512_impl(PyModuleDef *module, PyObject *string);
+
+static PyObject *
+_sha512_sha512(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"string", NULL};
+ PyObject *string = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:sha512", _keywords,
+ &string))
+ goto exit;
+ return_value = _sha512_sha512_impl(module, string);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(PY_LONG_LONG) */
+
+#if defined(PY_LONG_LONG)
+
+PyDoc_STRVAR(_sha512_sha384__doc__,
+"sha384($module, /, string=b\'\')\n"
+"--\n"
+"\n"
+"Return a new SHA-384 hash object; optionally initialized with a string.");
+
+#define _SHA512_SHA384_METHODDEF \
+ {"sha384", (PyCFunction)_sha512_sha384, METH_VARARGS|METH_KEYWORDS, _sha512_sha384__doc__},
+
+static PyObject *
+_sha512_sha384_impl(PyModuleDef *module, PyObject *string);
+
+static PyObject *
+_sha512_sha384(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"string", NULL};
+ PyObject *string = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:sha384", _keywords,
+ &string))
+ goto exit;
+ return_value = _sha512_sha384_impl(module, string);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(PY_LONG_LONG) */
+
+#ifndef SHA512TYPE_COPY_METHODDEF
+ #define SHA512TYPE_COPY_METHODDEF
+#endif /* !defined(SHA512TYPE_COPY_METHODDEF) */
+
+#ifndef SHA512TYPE_DIGEST_METHODDEF
+ #define SHA512TYPE_DIGEST_METHODDEF
+#endif /* !defined(SHA512TYPE_DIGEST_METHODDEF) */
+
+#ifndef SHA512TYPE_HEXDIGEST_METHODDEF
+ #define SHA512TYPE_HEXDIGEST_METHODDEF
+#endif /* !defined(SHA512TYPE_HEXDIGEST_METHODDEF) */
+
+#ifndef SHA512TYPE_UPDATE_METHODDEF
+ #define SHA512TYPE_UPDATE_METHODDEF
+#endif /* !defined(SHA512TYPE_UPDATE_METHODDEF) */
+
+#ifndef _SHA512_SHA512_METHODDEF
+ #define _SHA512_SHA512_METHODDEF
+#endif /* !defined(_SHA512_SHA512_METHODDEF) */
+
+#ifndef _SHA512_SHA384_METHODDEF
+ #define _SHA512_SHA384_METHODDEF
+#endif /* !defined(_SHA512_SHA384_METHODDEF) */
+/*[clinic end generated code: output=1c7d385731fee7c0 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/signalmodule.c.h b/Modules/clinic/signalmodule.c.h
new file mode 100644
index 0000000000..ec07ef1f8e
--- /dev/null
+++ b/Modules/clinic/signalmodule.c.h
@@ -0,0 +1,432 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+#if defined(HAVE_ALARM)
+
+PyDoc_STRVAR(signal_alarm__doc__,
+"alarm($module, seconds, /)\n"
+"--\n"
+"\n"
+"Arrange for SIGALRM to arrive after the given number of seconds.");
+
+#define SIGNAL_ALARM_METHODDEF \
+ {"alarm", (PyCFunction)signal_alarm, METH_O, signal_alarm__doc__},
+
+static long
+signal_alarm_impl(PyModuleDef *module, int seconds);
+
+static PyObject *
+signal_alarm(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int seconds;
+ long _return_value;
+
+ if (!PyArg_Parse(arg, "i:alarm", &seconds))
+ goto exit;
+ _return_value = signal_alarm_impl(module, seconds);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromLong(_return_value);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_ALARM) */
+
+#if defined(HAVE_PAUSE)
+
+PyDoc_STRVAR(signal_pause__doc__,
+"pause($module, /)\n"
+"--\n"
+"\n"
+"Wait until a signal arrives.");
+
+#define SIGNAL_PAUSE_METHODDEF \
+ {"pause", (PyCFunction)signal_pause, METH_NOARGS, signal_pause__doc__},
+
+static PyObject *
+signal_pause_impl(PyModuleDef *module);
+
+static PyObject *
+signal_pause(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return signal_pause_impl(module);
+}
+
+#endif /* defined(HAVE_PAUSE) */
+
+PyDoc_STRVAR(signal_signal__doc__,
+"signal($module, signalnum, handler, /)\n"
+"--\n"
+"\n"
+"Set the action for the given signal.\n"
+"\n"
+"The action can be SIG_DFL, SIG_IGN, or a callable Python object.\n"
+"The previous action is returned. See getsignal() for possible return values.\n"
+"\n"
+"*** IMPORTANT NOTICE ***\n"
+"A signal handler function is called with two arguments:\n"
+"the first is the signal number, the second is the interrupted stack frame.");
+
+#define SIGNAL_SIGNAL_METHODDEF \
+ {"signal", (PyCFunction)signal_signal, METH_VARARGS, signal_signal__doc__},
+
+static PyObject *
+signal_signal_impl(PyModuleDef *module, int signalnum, PyObject *handler);
+
+static PyObject *
+signal_signal(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int signalnum;
+ PyObject *handler;
+
+ if (!PyArg_ParseTuple(args, "iO:signal",
+ &signalnum, &handler))
+ goto exit;
+ return_value = signal_signal_impl(module, signalnum, handler);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(signal_getsignal__doc__,
+"getsignal($module, signalnum, /)\n"
+"--\n"
+"\n"
+"Return the current action for the given signal.\n"
+"\n"
+"The return value can be:\n"
+" SIG_IGN -- if the signal is being ignored\n"
+" SIG_DFL -- if the default action for the signal is in effect\n"
+" None -- if an unknown handler is in effect\n"
+" anything else -- the callable Python object used as a handler");
+
+#define SIGNAL_GETSIGNAL_METHODDEF \
+ {"getsignal", (PyCFunction)signal_getsignal, METH_O, signal_getsignal__doc__},
+
+static PyObject *
+signal_getsignal_impl(PyModuleDef *module, int signalnum);
+
+static PyObject *
+signal_getsignal(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int signalnum;
+
+ if (!PyArg_Parse(arg, "i:getsignal", &signalnum))
+ goto exit;
+ return_value = signal_getsignal_impl(module, signalnum);
+
+exit:
+ return return_value;
+}
+
+#if defined(HAVE_SIGINTERRUPT)
+
+PyDoc_STRVAR(signal_siginterrupt__doc__,
+"siginterrupt($module, signalnum, flag, /)\n"
+"--\n"
+"\n"
+"Change system call restart behaviour.\n"
+"\n"
+"If flag is False, system calls will be restarted when interrupted by\n"
+"signal sig, else system calls will be interrupted.");
+
+#define SIGNAL_SIGINTERRUPT_METHODDEF \
+ {"siginterrupt", (PyCFunction)signal_siginterrupt, METH_VARARGS, signal_siginterrupt__doc__},
+
+static PyObject *
+signal_siginterrupt_impl(PyModuleDef *module, int signalnum, int flag);
+
+static PyObject *
+signal_siginterrupt(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int signalnum;
+ int flag;
+
+ if (!PyArg_ParseTuple(args, "ii:siginterrupt",
+ &signalnum, &flag))
+ goto exit;
+ return_value = signal_siginterrupt_impl(module, signalnum, flag);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SIGINTERRUPT) */
+
+#if defined(HAVE_SETITIMER)
+
+PyDoc_STRVAR(signal_setitimer__doc__,
+"setitimer($module, which, seconds, interval=0.0, /)\n"
+"--\n"
+"\n"
+"Sets given itimer (one of ITIMER_REAL, ITIMER_VIRTUAL or ITIMER_PROF).\n"
+"\n"
+"The timer will fire after value seconds and after that every interval seconds.\n"
+"The itimer can be cleared by setting seconds to zero.\n"
+"\n"
+"Returns old values as a tuple: (delay, interval).");
+
+#define SIGNAL_SETITIMER_METHODDEF \
+ {"setitimer", (PyCFunction)signal_setitimer, METH_VARARGS, signal_setitimer__doc__},
+
+static PyObject *
+signal_setitimer_impl(PyModuleDef *module, int which, double seconds,
+ double interval);
+
+static PyObject *
+signal_setitimer(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int which;
+ double seconds;
+ double interval = 0.0;
+
+ if (!PyArg_ParseTuple(args, "id|d:setitimer",
+ &which, &seconds, &interval))
+ goto exit;
+ return_value = signal_setitimer_impl(module, which, seconds, interval);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SETITIMER) */
+
+#if defined(HAVE_GETITIMER)
+
+PyDoc_STRVAR(signal_getitimer__doc__,
+"getitimer($module, which, /)\n"
+"--\n"
+"\n"
+"Returns current value of given itimer.");
+
+#define SIGNAL_GETITIMER_METHODDEF \
+ {"getitimer", (PyCFunction)signal_getitimer, METH_O, signal_getitimer__doc__},
+
+static PyObject *
+signal_getitimer_impl(PyModuleDef *module, int which);
+
+static PyObject *
+signal_getitimer(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int which;
+
+ if (!PyArg_Parse(arg, "i:getitimer", &which))
+ goto exit;
+ return_value = signal_getitimer_impl(module, which);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_GETITIMER) */
+
+#if defined(PYPTHREAD_SIGMASK)
+
+PyDoc_STRVAR(signal_pthread_sigmask__doc__,
+"pthread_sigmask($module, how, mask, /)\n"
+"--\n"
+"\n"
+"Fetch and/or change the signal mask of the calling thread.");
+
+#define SIGNAL_PTHREAD_SIGMASK_METHODDEF \
+ {"pthread_sigmask", (PyCFunction)signal_pthread_sigmask, METH_VARARGS, signal_pthread_sigmask__doc__},
+
+static PyObject *
+signal_pthread_sigmask_impl(PyModuleDef *module, int how, PyObject *mask);
+
+static PyObject *
+signal_pthread_sigmask(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int how;
+ PyObject *mask;
+
+ if (!PyArg_ParseTuple(args, "iO:pthread_sigmask",
+ &how, &mask))
+ goto exit;
+ return_value = signal_pthread_sigmask_impl(module, how, mask);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(PYPTHREAD_SIGMASK) */
+
+#if defined(HAVE_SIGPENDING)
+
+PyDoc_STRVAR(signal_sigpending__doc__,
+"sigpending($module, /)\n"
+"--\n"
+"\n"
+"Examine pending signals.\n"
+"\n"
+"Returns a set of signal numbers that are pending for delivery to\n"
+"the calling thread.");
+
+#define SIGNAL_SIGPENDING_METHODDEF \
+ {"sigpending", (PyCFunction)signal_sigpending, METH_NOARGS, signal_sigpending__doc__},
+
+static PyObject *
+signal_sigpending_impl(PyModuleDef *module);
+
+static PyObject *
+signal_sigpending(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return signal_sigpending_impl(module);
+}
+
+#endif /* defined(HAVE_SIGPENDING) */
+
+#if defined(HAVE_SIGWAIT)
+
+PyDoc_STRVAR(signal_sigwait__doc__,
+"sigwait($module, sigset, /)\n"
+"--\n"
+"\n"
+"Wait for a signal.\n"
+"\n"
+"Suspend execution of the calling thread until the delivery of one of the\n"
+"signals specified in the signal set sigset. The function accepts the signal\n"
+"and returns the signal number.");
+
+#define SIGNAL_SIGWAIT_METHODDEF \
+ {"sigwait", (PyCFunction)signal_sigwait, METH_O, signal_sigwait__doc__},
+
+#endif /* defined(HAVE_SIGWAIT) */
+
+#if defined(HAVE_SIGWAITINFO)
+
+PyDoc_STRVAR(signal_sigwaitinfo__doc__,
+"sigwaitinfo($module, sigset, /)\n"
+"--\n"
+"\n"
+"Wait synchronously until one of the signals in *sigset* is delivered.\n"
+"\n"
+"Returns a struct_siginfo containing information about the signal.");
+
+#define SIGNAL_SIGWAITINFO_METHODDEF \
+ {"sigwaitinfo", (PyCFunction)signal_sigwaitinfo, METH_O, signal_sigwaitinfo__doc__},
+
+#endif /* defined(HAVE_SIGWAITINFO) */
+
+#if defined(HAVE_SIGTIMEDWAIT)
+
+PyDoc_STRVAR(signal_sigtimedwait__doc__,
+"sigtimedwait($module, sigset, timeout, /)\n"
+"--\n"
+"\n"
+"Like sigwaitinfo(), but with a timeout.\n"
+"\n"
+"The timeout is specified in seconds, with floating point numbers allowed.");
+
+#define SIGNAL_SIGTIMEDWAIT_METHODDEF \
+ {"sigtimedwait", (PyCFunction)signal_sigtimedwait, METH_VARARGS, signal_sigtimedwait__doc__},
+
+static PyObject *
+signal_sigtimedwait_impl(PyModuleDef *module, PyObject *sigset,
+ PyObject *timeout_obj);
+
+static PyObject *
+signal_sigtimedwait(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *sigset;
+ PyObject *timeout_obj;
+
+ if (!PyArg_UnpackTuple(args, "sigtimedwait",
+ 2, 2,
+ &sigset, &timeout_obj))
+ goto exit;
+ return_value = signal_sigtimedwait_impl(module, sigset, timeout_obj);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_SIGTIMEDWAIT) */
+
+#if (defined(HAVE_PTHREAD_KILL) && defined(WITH_THREAD))
+
+PyDoc_STRVAR(signal_pthread_kill__doc__,
+"pthread_kill($module, thread_id, signalnum, /)\n"
+"--\n"
+"\n"
+"Send a signal to a thread.");
+
+#define SIGNAL_PTHREAD_KILL_METHODDEF \
+ {"pthread_kill", (PyCFunction)signal_pthread_kill, METH_VARARGS, signal_pthread_kill__doc__},
+
+static PyObject *
+signal_pthread_kill_impl(PyModuleDef *module, long thread_id, int signalnum);
+
+static PyObject *
+signal_pthread_kill(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ long thread_id;
+ int signalnum;
+
+ if (!PyArg_ParseTuple(args, "li:pthread_kill",
+ &thread_id, &signalnum))
+ goto exit;
+ return_value = signal_pthread_kill_impl(module, thread_id, signalnum);
+
+exit:
+ return return_value;
+}
+
+#endif /* (defined(HAVE_PTHREAD_KILL) && defined(WITH_THREAD)) */
+
+#ifndef SIGNAL_ALARM_METHODDEF
+ #define SIGNAL_ALARM_METHODDEF
+#endif /* !defined(SIGNAL_ALARM_METHODDEF) */
+
+#ifndef SIGNAL_PAUSE_METHODDEF
+ #define SIGNAL_PAUSE_METHODDEF
+#endif /* !defined(SIGNAL_PAUSE_METHODDEF) */
+
+#ifndef SIGNAL_SIGINTERRUPT_METHODDEF
+ #define SIGNAL_SIGINTERRUPT_METHODDEF
+#endif /* !defined(SIGNAL_SIGINTERRUPT_METHODDEF) */
+
+#ifndef SIGNAL_SETITIMER_METHODDEF
+ #define SIGNAL_SETITIMER_METHODDEF
+#endif /* !defined(SIGNAL_SETITIMER_METHODDEF) */
+
+#ifndef SIGNAL_GETITIMER_METHODDEF
+ #define SIGNAL_GETITIMER_METHODDEF
+#endif /* !defined(SIGNAL_GETITIMER_METHODDEF) */
+
+#ifndef SIGNAL_PTHREAD_SIGMASK_METHODDEF
+ #define SIGNAL_PTHREAD_SIGMASK_METHODDEF
+#endif /* !defined(SIGNAL_PTHREAD_SIGMASK_METHODDEF) */
+
+#ifndef SIGNAL_SIGPENDING_METHODDEF
+ #define SIGNAL_SIGPENDING_METHODDEF
+#endif /* !defined(SIGNAL_SIGPENDING_METHODDEF) */
+
+#ifndef SIGNAL_SIGWAIT_METHODDEF
+ #define SIGNAL_SIGWAIT_METHODDEF
+#endif /* !defined(SIGNAL_SIGWAIT_METHODDEF) */
+
+#ifndef SIGNAL_SIGWAITINFO_METHODDEF
+ #define SIGNAL_SIGWAITINFO_METHODDEF
+#endif /* !defined(SIGNAL_SIGWAITINFO_METHODDEF) */
+
+#ifndef SIGNAL_SIGTIMEDWAIT_METHODDEF
+ #define SIGNAL_SIGTIMEDWAIT_METHODDEF
+#endif /* !defined(SIGNAL_SIGTIMEDWAIT_METHODDEF) */
+
+#ifndef SIGNAL_PTHREAD_KILL_METHODDEF
+ #define SIGNAL_PTHREAD_KILL_METHODDEF
+#endif /* !defined(SIGNAL_PTHREAD_KILL_METHODDEF) */
+/*[clinic end generated code: output=b99278c16c40ea43 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/spwdmodule.c.h b/Modules/clinic/spwdmodule.c.h
new file mode 100644
index 0000000000..c0d18db589
--- /dev/null
+++ b/Modules/clinic/spwdmodule.c.h
@@ -0,0 +1,68 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+#if defined(HAVE_GETSPNAM)
+
+PyDoc_STRVAR(spwd_getspnam__doc__,
+"getspnam($module, arg, /)\n"
+"--\n"
+"\n"
+"Return the shadow password database entry for the given user name.\n"
+"\n"
+"See `help(spwd)` for more on shadow password database entries.");
+
+#define SPWD_GETSPNAM_METHODDEF \
+ {"getspnam", (PyCFunction)spwd_getspnam, METH_O, spwd_getspnam__doc__},
+
+static PyObject *
+spwd_getspnam_impl(PyModuleDef *module, PyObject *arg);
+
+static PyObject *
+spwd_getspnam(PyModuleDef *module, PyObject *arg_)
+{
+ PyObject *return_value = NULL;
+ PyObject *arg;
+
+ if (!PyArg_Parse(arg_, "U:getspnam", &arg))
+ goto exit;
+ return_value = spwd_getspnam_impl(module, arg);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_GETSPNAM) */
+
+#if defined(HAVE_GETSPENT)
+
+PyDoc_STRVAR(spwd_getspall__doc__,
+"getspall($module, /)\n"
+"--\n"
+"\n"
+"Return a list of all available shadow password database entries, in arbitrary order.\n"
+"\n"
+"See `help(spwd)` for more on shadow password database entries.");
+
+#define SPWD_GETSPALL_METHODDEF \
+ {"getspall", (PyCFunction)spwd_getspall, METH_NOARGS, spwd_getspall__doc__},
+
+static PyObject *
+spwd_getspall_impl(PyModuleDef *module);
+
+static PyObject *
+spwd_getspall(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return spwd_getspall_impl(module);
+}
+
+#endif /* defined(HAVE_GETSPENT) */
+
+#ifndef SPWD_GETSPNAM_METHODDEF
+ #define SPWD_GETSPNAM_METHODDEF
+#endif /* !defined(SPWD_GETSPNAM_METHODDEF) */
+
+#ifndef SPWD_GETSPALL_METHODDEF
+ #define SPWD_GETSPALL_METHODDEF
+#endif /* !defined(SPWD_GETSPALL_METHODDEF) */
+/*[clinic end generated code: output=6c178830413f7763 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/unicodedata.c.h b/Modules/clinic/unicodedata.c.h
new file mode 100644
index 0000000000..d520c1e3dd
--- /dev/null
+++ b/Modules/clinic/unicodedata.c.h
@@ -0,0 +1,368 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(unicodedata_UCD_decimal__doc__,
+"decimal($self, chr, default=None, /)\n"
+"--\n"
+"\n"
+"Converts a Unicode character into its equivalent decimal value.\n"
+"\n"
+"Returns the decimal value assigned to the character chr as integer.\n"
+"If no such value is defined, default is returned, or, if not given,\n"
+"ValueError is raised.");
+
+#define UNICODEDATA_UCD_DECIMAL_METHODDEF \
+ {"decimal", (PyCFunction)unicodedata_UCD_decimal, METH_VARARGS, unicodedata_UCD_decimal__doc__},
+
+static PyObject *
+unicodedata_UCD_decimal_impl(PyObject *self, int chr,
+ PyObject *default_value);
+
+static PyObject *
+unicodedata_UCD_decimal(PyObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int chr;
+ PyObject *default_value = NULL;
+
+ if (!PyArg_ParseTuple(args, "C|O:decimal",
+ &chr, &default_value))
+ goto exit;
+ return_value = unicodedata_UCD_decimal_impl(self, chr, default_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(unicodedata_UCD_digit__doc__,
+"digit($self, chr, default=None, /)\n"
+"--\n"
+"\n"
+"Converts a Unicode character into its equivalent digit value.\n"
+"\n"
+"Returns the digit value assigned to the character chr as integer.\n"
+"If no such value is defined, default is returned, or, if not given,\n"
+"ValueError is raised.");
+
+#define UNICODEDATA_UCD_DIGIT_METHODDEF \
+ {"digit", (PyCFunction)unicodedata_UCD_digit, METH_VARARGS, unicodedata_UCD_digit__doc__},
+
+static PyObject *
+unicodedata_UCD_digit_impl(PyObject *self, int chr, PyObject *default_value);
+
+static PyObject *
+unicodedata_UCD_digit(PyObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int chr;
+ PyObject *default_value = NULL;
+
+ if (!PyArg_ParseTuple(args, "C|O:digit",
+ &chr, &default_value))
+ goto exit;
+ return_value = unicodedata_UCD_digit_impl(self, chr, default_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(unicodedata_UCD_numeric__doc__,
+"numeric($self, chr, default=None, /)\n"
+"--\n"
+"\n"
+"Converts a Unicode character into its equivalent numeric value.\n"
+"\n"
+"Returns the numeric value assigned to the character chr as float.\n"
+"If no such value is defined, default is returned, or, if not given,\n"
+"ValueError is raised.");
+
+#define UNICODEDATA_UCD_NUMERIC_METHODDEF \
+ {"numeric", (PyCFunction)unicodedata_UCD_numeric, METH_VARARGS, unicodedata_UCD_numeric__doc__},
+
+static PyObject *
+unicodedata_UCD_numeric_impl(PyObject *self, int chr,
+ PyObject *default_value);
+
+static PyObject *
+unicodedata_UCD_numeric(PyObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int chr;
+ PyObject *default_value = NULL;
+
+ if (!PyArg_ParseTuple(args, "C|O:numeric",
+ &chr, &default_value))
+ goto exit;
+ return_value = unicodedata_UCD_numeric_impl(self, chr, default_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(unicodedata_UCD_category__doc__,
+"category($self, chr, /)\n"
+"--\n"
+"\n"
+"Returns the general category assigned to the character chr as string.");
+
+#define UNICODEDATA_UCD_CATEGORY_METHODDEF \
+ {"category", (PyCFunction)unicodedata_UCD_category, METH_O, unicodedata_UCD_category__doc__},
+
+static PyObject *
+unicodedata_UCD_category_impl(PyObject *self, int chr);
+
+static PyObject *
+unicodedata_UCD_category(PyObject *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int chr;
+
+ if (!PyArg_Parse(arg, "C:category", &chr))
+ goto exit;
+ return_value = unicodedata_UCD_category_impl(self, chr);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(unicodedata_UCD_bidirectional__doc__,
+"bidirectional($self, chr, /)\n"
+"--\n"
+"\n"
+"Returns the bidirectional class assigned to the character chr as string.\n"
+"\n"
+"If no such value is defined, an empty string is returned.");
+
+#define UNICODEDATA_UCD_BIDIRECTIONAL_METHODDEF \
+ {"bidirectional", (PyCFunction)unicodedata_UCD_bidirectional, METH_O, unicodedata_UCD_bidirectional__doc__},
+
+static PyObject *
+unicodedata_UCD_bidirectional_impl(PyObject *self, int chr);
+
+static PyObject *
+unicodedata_UCD_bidirectional(PyObject *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int chr;
+
+ if (!PyArg_Parse(arg, "C:bidirectional", &chr))
+ goto exit;
+ return_value = unicodedata_UCD_bidirectional_impl(self, chr);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(unicodedata_UCD_combining__doc__,
+"combining($self, chr, /)\n"
+"--\n"
+"\n"
+"Returns the canonical combining class assigned to the character chr as integer.\n"
+"\n"
+"Returns 0 if no combining class is defined.");
+
+#define UNICODEDATA_UCD_COMBINING_METHODDEF \
+ {"combining", (PyCFunction)unicodedata_UCD_combining, METH_O, unicodedata_UCD_combining__doc__},
+
+static int
+unicodedata_UCD_combining_impl(PyObject *self, int chr);
+
+static PyObject *
+unicodedata_UCD_combining(PyObject *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int chr;
+ int _return_value;
+
+ if (!PyArg_Parse(arg, "C:combining", &chr))
+ goto exit;
+ _return_value = unicodedata_UCD_combining_impl(self, chr);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromLong((long)_return_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(unicodedata_UCD_mirrored__doc__,
+"mirrored($self, chr, /)\n"
+"--\n"
+"\n"
+"Returns the mirrored property assigned to the character chr as integer.\n"
+"\n"
+"Returns 1 if the character has been identified as a \"mirrored\"\n"
+"character in bidirectional text, 0 otherwise.");
+
+#define UNICODEDATA_UCD_MIRRORED_METHODDEF \
+ {"mirrored", (PyCFunction)unicodedata_UCD_mirrored, METH_O, unicodedata_UCD_mirrored__doc__},
+
+static int
+unicodedata_UCD_mirrored_impl(PyObject *self, int chr);
+
+static PyObject *
+unicodedata_UCD_mirrored(PyObject *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int chr;
+ int _return_value;
+
+ if (!PyArg_Parse(arg, "C:mirrored", &chr))
+ goto exit;
+ _return_value = unicodedata_UCD_mirrored_impl(self, chr);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromLong((long)_return_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(unicodedata_UCD_east_asian_width__doc__,
+"east_asian_width($self, chr, /)\n"
+"--\n"
+"\n"
+"Returns the east asian width assigned to the character chr as string.");
+
+#define UNICODEDATA_UCD_EAST_ASIAN_WIDTH_METHODDEF \
+ {"east_asian_width", (PyCFunction)unicodedata_UCD_east_asian_width, METH_O, unicodedata_UCD_east_asian_width__doc__},
+
+static PyObject *
+unicodedata_UCD_east_asian_width_impl(PyObject *self, int chr);
+
+static PyObject *
+unicodedata_UCD_east_asian_width(PyObject *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int chr;
+
+ if (!PyArg_Parse(arg, "C:east_asian_width", &chr))
+ goto exit;
+ return_value = unicodedata_UCD_east_asian_width_impl(self, chr);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(unicodedata_UCD_decomposition__doc__,
+"decomposition($self, chr, /)\n"
+"--\n"
+"\n"
+"Returns the character decomposition mapping assigned to the character chr as string.\n"
+"\n"
+"An empty string is returned in case no such mapping is defined.");
+
+#define UNICODEDATA_UCD_DECOMPOSITION_METHODDEF \
+ {"decomposition", (PyCFunction)unicodedata_UCD_decomposition, METH_O, unicodedata_UCD_decomposition__doc__},
+
+static PyObject *
+unicodedata_UCD_decomposition_impl(PyObject *self, int chr);
+
+static PyObject *
+unicodedata_UCD_decomposition(PyObject *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int chr;
+
+ if (!PyArg_Parse(arg, "C:decomposition", &chr))
+ goto exit;
+ return_value = unicodedata_UCD_decomposition_impl(self, chr);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(unicodedata_UCD_normalize__doc__,
+"normalize($self, form, unistr, /)\n"
+"--\n"
+"\n"
+"Return the normal form \'form\' for the Unicode string unistr.\n"
+"\n"
+"Valid values for form are \'NFC\', \'NFKC\', \'NFD\', and \'NFKD\'.");
+
+#define UNICODEDATA_UCD_NORMALIZE_METHODDEF \
+ {"normalize", (PyCFunction)unicodedata_UCD_normalize, METH_VARARGS, unicodedata_UCD_normalize__doc__},
+
+static PyObject *
+unicodedata_UCD_normalize_impl(PyObject *self, const char *form,
+ PyObject *input);
+
+static PyObject *
+unicodedata_UCD_normalize(PyObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ const char *form;
+ PyObject *input;
+
+ if (!PyArg_ParseTuple(args, "sO!:normalize",
+ &form, &PyUnicode_Type, &input))
+ goto exit;
+ return_value = unicodedata_UCD_normalize_impl(self, form, input);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(unicodedata_UCD_name__doc__,
+"name($self, chr, default=None, /)\n"
+"--\n"
+"\n"
+"Returns the name assigned to the character chr as a string.\n"
+"\n"
+"If no name is defined, default is returned, or, if not given,\n"
+"ValueError is raised.");
+
+#define UNICODEDATA_UCD_NAME_METHODDEF \
+ {"name", (PyCFunction)unicodedata_UCD_name, METH_VARARGS, unicodedata_UCD_name__doc__},
+
+static PyObject *
+unicodedata_UCD_name_impl(PyObject *self, int chr, PyObject *default_value);
+
+static PyObject *
+unicodedata_UCD_name(PyObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int chr;
+ PyObject *default_value = NULL;
+
+ if (!PyArg_ParseTuple(args, "C|O:name",
+ &chr, &default_value))
+ goto exit;
+ return_value = unicodedata_UCD_name_impl(self, chr, default_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(unicodedata_UCD_lookup__doc__,
+"lookup($self, name, /)\n"
+"--\n"
+"\n"
+"Look up character by name.\n"
+"\n"
+"If a character with the given name is found, return the\n"
+"corresponding character. If not found, KeyError is raised.");
+
+#define UNICODEDATA_UCD_LOOKUP_METHODDEF \
+ {"lookup", (PyCFunction)unicodedata_UCD_lookup, METH_O, unicodedata_UCD_lookup__doc__},
+
+static PyObject *
+unicodedata_UCD_lookup_impl(PyObject *self, const char *name,
+ Py_ssize_clean_t name_length);
+
+static PyObject *
+unicodedata_UCD_lookup(PyObject *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ const char *name;
+ Py_ssize_clean_t name_length;
+
+ if (!PyArg_Parse(arg, "s#:lookup", &name, &name_length))
+ goto exit;
+ return_value = unicodedata_UCD_lookup_impl(self, name, name_length);
+
+exit:
+ return return_value;
+}
+/*[clinic end generated code: output=4f8da33c6bc6efc9 input=a9049054013a1b77]*/
diff --git a/Modules/clinic/zlibmodule.c.h b/Modules/clinic/zlibmodule.c.h
index f54a805377..602ae1df82 100644
--- a/Modules/clinic/zlibmodule.c.h
+++ b/Modules/clinic/zlibmodule.c.h
@@ -26,8 +26,7 @@ zlib_compress(PyModuleDef *module, PyObject *args)
Py_buffer bytes = {NULL, NULL};
int level = Z_DEFAULT_COMPRESSION;
- if (!PyArg_ParseTuple(args,
- "y*|i:compress",
+ if (!PyArg_ParseTuple(args, "y*|i:compress",
&bytes, &level))
goto exit;
return_value = zlib_compress_impl(module, &bytes, level);
@@ -49,7 +48,7 @@ PyDoc_STRVAR(zlib_decompress__doc__,
" data\n"
" Compressed data.\n"
" wbits\n"
-" The window buffer size.\n"
+" The window buffer size and container format.\n"
" bufsize\n"
" The initial output buffer size.");
@@ -57,7 +56,8 @@ PyDoc_STRVAR(zlib_decompress__doc__,
{"decompress", (PyCFunction)zlib_decompress, METH_VARARGS, zlib_decompress__doc__},
static PyObject *
-zlib_decompress_impl(PyModuleDef *module, Py_buffer *data, int wbits, unsigned int bufsize);
+zlib_decompress_impl(PyModuleDef *module, Py_buffer *data, int wbits,
+ unsigned int bufsize);
static PyObject *
zlib_decompress(PyModuleDef *module, PyObject *args)
@@ -67,9 +67,8 @@ zlib_decompress(PyModuleDef *module, PyObject *args)
int wbits = MAX_WBITS;
unsigned int bufsize = DEF_BUF_SIZE;
- if (!PyArg_ParseTuple(args,
- "y*|iO&:decompress",
- &data, &wbits, uint_converter, &bufsize))
+ if (!PyArg_ParseTuple(args, "y*|iO&:decompress",
+ &data, &wbits, capped_uint_converter, &bufsize))
goto exit;
return_value = zlib_decompress_impl(module, &data, wbits, bufsize);
@@ -90,12 +89,16 @@ PyDoc_STRVAR(zlib_compressobj__doc__,
"Return a compressor object.\n"
"\n"
" level\n"
-" The compression level (an integer in the range 0-9; default is 6).\n"
-" Higher compression levels are slower, but produce smaller results.\n"
+" The compression level (an integer in the range 0-9 or -1; default is\n"
+" currently equivalent to 6). Higher compression levels are slower,\n"
+" but produce smaller results.\n"
" method\n"
" The compression algorithm. If given, this must be DEFLATED.\n"
" wbits\n"
-" The base two logarithm of the window size (range: 8..15).\n"
+" +9 to +15: The base-two logarithm of the window size. Include a zlib\n"
+" container.\n"
+" -9 to -15: Generate a raw stream.\n"
+" +25 to +31: Include a gzip container.\n"
" memLevel\n"
" Controls the amount of memory used for internal compression state.\n"
" Valid values range from 1 to 9. Higher values result in higher memory\n"
@@ -111,7 +114,8 @@ PyDoc_STRVAR(zlib_compressobj__doc__,
{"compressobj", (PyCFunction)zlib_compressobj, METH_VARARGS|METH_KEYWORDS, zlib_compressobj__doc__},
static PyObject *
-zlib_compressobj_impl(PyModuleDef *module, int level, int method, int wbits, int memLevel, int strategy, Py_buffer *zdict);
+zlib_compressobj_impl(PyModuleDef *module, int level, int method, int wbits,
+ int memLevel, int strategy, Py_buffer *zdict);
static PyObject *
zlib_compressobj(PyModuleDef *module, PyObject *args, PyObject *kwargs)
@@ -125,8 +129,7 @@ zlib_compressobj(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int strategy = Z_DEFAULT_STRATEGY;
Py_buffer zdict = {NULL, NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "|iiiiiy*:compressobj", _keywords,
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|iiiiiy*:compressobj", _keywords,
&level, &method, &wbits, &memLevel, &strategy, &zdict))
goto exit;
return_value = zlib_compressobj_impl(module, level, method, wbits, memLevel, strategy, &zdict);
@@ -146,7 +149,7 @@ PyDoc_STRVAR(zlib_decompressobj__doc__,
"Return a decompressor object.\n"
"\n"
" wbits\n"
-" The window buffer size.\n"
+" The window buffer size and container format.\n"
" zdict\n"
" The predefined compression dictionary. This must be the same\n"
" dictionary as used by the compressor that produced the input data.");
@@ -165,8 +168,7 @@ zlib_decompressobj(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int wbits = MAX_WBITS;
PyObject *zdict = NULL;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "|iO:decompressobj", _keywords,
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|iO:decompressobj", _keywords,
&wbits, &zdict))
goto exit;
return_value = zlib_decompressobj_impl(module, wbits, zdict);
@@ -189,20 +191,18 @@ PyDoc_STRVAR(zlib_Compress_compress__doc__,
"Call the flush() method to clear these buffers.");
#define ZLIB_COMPRESS_COMPRESS_METHODDEF \
- {"compress", (PyCFunction)zlib_Compress_compress, METH_VARARGS, zlib_Compress_compress__doc__},
+ {"compress", (PyCFunction)zlib_Compress_compress, METH_O, zlib_Compress_compress__doc__},
static PyObject *
zlib_Compress_compress_impl(compobject *self, Py_buffer *data);
static PyObject *
-zlib_Compress_compress(compobject *self, PyObject *args)
+zlib_Compress_compress(compobject *self, PyObject *arg)
{
PyObject *return_value = NULL;
Py_buffer data = {NULL, NULL};
- if (!PyArg_ParseTuple(args,
- "y*:compress",
- &data))
+ if (!PyArg_Parse(arg, "y*:compress", &data))
goto exit;
return_value = zlib_Compress_compress_impl(self, &data);
@@ -235,7 +235,8 @@ PyDoc_STRVAR(zlib_Decompress_decompress__doc__,
{"decompress", (PyCFunction)zlib_Decompress_decompress, METH_VARARGS, zlib_Decompress_decompress__doc__},
static PyObject *
-zlib_Decompress_decompress_impl(compobject *self, Py_buffer *data, unsigned int max_length);
+zlib_Decompress_decompress_impl(compobject *self, Py_buffer *data,
+ unsigned int max_length);
static PyObject *
zlib_Decompress_decompress(compobject *self, PyObject *args)
@@ -244,9 +245,8 @@ zlib_Decompress_decompress(compobject *self, PyObject *args)
Py_buffer data = {NULL, NULL};
unsigned int max_length = 0;
- if (!PyArg_ParseTuple(args,
- "y*|O&:decompress",
- &data, uint_converter, &max_length))
+ if (!PyArg_ParseTuple(args, "y*|O&:decompress",
+ &data, capped_uint_converter, &max_length))
goto exit;
return_value = zlib_Decompress_decompress_impl(self, &data, max_length);
@@ -282,8 +282,7 @@ zlib_Compress_flush(compobject *self, PyObject *args)
PyObject *return_value = NULL;
int mode = Z_FINISH;
- if (!PyArg_ParseTuple(args,
- "|i:flush",
+ if (!PyArg_ParseTuple(args, "|i:flush",
&mode))
goto exit;
return_value = zlib_Compress_flush_impl(self, mode);
@@ -314,10 +313,6 @@ zlib_Compress_copy(compobject *self, PyObject *Py_UNUSED(ignored))
#endif /* defined(HAVE_ZLIB_COPY) */
-#ifndef ZLIB_COMPRESS_COPY_METHODDEF
- #define ZLIB_COMPRESS_COPY_METHODDEF
-#endif /* !defined(ZLIB_COMPRESS_COPY_METHODDEF) */
-
#if defined(HAVE_ZLIB_COPY)
PyDoc_STRVAR(zlib_Decompress_copy__doc__,
@@ -340,10 +335,6 @@ zlib_Decompress_copy(compobject *self, PyObject *Py_UNUSED(ignored))
#endif /* defined(HAVE_ZLIB_COPY) */
-#ifndef ZLIB_DECOMPRESS_COPY_METHODDEF
- #define ZLIB_DECOMPRESS_COPY_METHODDEF
-#endif /* !defined(ZLIB_DECOMPRESS_COPY_METHODDEF) */
-
PyDoc_STRVAR(zlib_Decompress_flush__doc__,
"flush($self, length=zlib.DEF_BUF_SIZE, /)\n"
"--\n"
@@ -365,9 +356,8 @@ zlib_Decompress_flush(compobject *self, PyObject *args)
PyObject *return_value = NULL;
unsigned int length = DEF_BUF_SIZE;
- if (!PyArg_ParseTuple(args,
- "|O&:flush",
- uint_converter, &length))
+ if (!PyArg_ParseTuple(args, "|O&:flush",
+ capped_uint_converter, &length))
goto exit;
return_value = zlib_Decompress_flush_impl(self, length);
@@ -399,8 +389,7 @@ zlib_adler32(PyModuleDef *module, PyObject *args)
Py_buffer data = {NULL, NULL};
unsigned int value = 1;
- if (!PyArg_ParseTuple(args,
- "y*|I:adler32",
+ if (!PyArg_ParseTuple(args, "y*|I:adler32",
&data, &value))
goto exit;
return_value = zlib_adler32_impl(module, &data, value);
@@ -437,8 +426,7 @@ zlib_crc32(PyModuleDef *module, PyObject *args)
Py_buffer data = {NULL, NULL};
unsigned int value = 0;
- if (!PyArg_ParseTuple(args,
- "y*|I:crc32",
+ if (!PyArg_ParseTuple(args, "y*|I:crc32",
&data, &value))
goto exit;
return_value = zlib_crc32_impl(module, &data, value);
@@ -450,4 +438,8 @@ exit:
return return_value;
}
-/*[clinic end generated code: output=bc9473721ca7c962 input=a9049054013a1b77]*/
+
+#ifndef ZLIB_COMPRESS_COPY_METHODDEF
+ #define ZLIB_COMPRESS_COPY_METHODDEF
+#endif /* !defined(ZLIB_COMPRESS_COPY_METHODDEF) */
+/*[clinic end generated code: output=f31627b314a7bd2f input=a9049054013a1b77]*/
diff --git a/Modules/cmathmodule.c b/Modules/cmathmodule.c
index b341c343e1..82ea589e73 100644
--- a/Modules/cmathmodule.c
+++ b/Modules/cmathmodule.c
@@ -8,6 +8,40 @@
float.h. We assume that FLT_RADIX is either 2 or 16. */
#include <float.h>
+#include "clinic/cmathmodule.c.h"
+/*[clinic input]
+module cmath
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=308d6839f4a46333]*/
+
+/*[python input]
+class Py_complex_protected_converter(Py_complex_converter):
+ def modify(self):
+ return 'errno = 0; PyFPE_START_PROTECT("complex function", goto exit);'
+
+
+class Py_complex_protected_return_converter(CReturnConverter):
+ type = "Py_complex"
+
+ def render(self, function, data):
+ self.declare(data)
+ data.return_conversion.append("""
+PyFPE_END_PROTECT(_return_value);
+if (errno == EDOM) {
+ PyErr_SetString(PyExc_ValueError, "math domain error");
+ goto exit;
+}
+else if (errno == ERANGE) {
+ PyErr_SetString(PyExc_OverflowError, "math range error");
+ goto exit;
+}
+else {
+ return_value = PyComplex_FromCComplex(_return_value);
+}
+""".strip())
+[python start generated code]*/
+/*[python end generated code: output=da39a3ee5e6b4b0d input=345daa075b1028e7]*/
+
#if (FLT_RADIX != 2 && FLT_RADIX != 16)
#error "Modules/cmathmodule.c expects FLT_RADIX to be 2 or 16"
#endif
@@ -48,12 +82,12 @@
#define CM_SCALE_DOWN (-(CM_SCALE_UP+1)/2)
/* forward declarations */
-static Py_complex c_asinh(Py_complex);
-static Py_complex c_atanh(Py_complex);
-static Py_complex c_cosh(Py_complex);
-static Py_complex c_sinh(Py_complex);
-static Py_complex c_sqrt(Py_complex);
-static Py_complex c_tanh(Py_complex);
+static Py_complex cmath_asinh_impl(PyModuleDef *, Py_complex);
+static Py_complex cmath_atanh_impl(PyModuleDef *, Py_complex);
+static Py_complex cmath_cosh_impl(PyModuleDef *, Py_complex);
+static Py_complex cmath_sinh_impl(PyModuleDef *, Py_complex);
+static Py_complex cmath_sqrt_impl(PyModuleDef *, Py_complex);
+static Py_complex cmath_tanh_impl(PyModuleDef *, Py_complex);
static PyObject * math_error(void);
/* Code to deal with special values (infinities, NaNs, etc.). */
@@ -123,8 +157,18 @@ special_type(double d)
static Py_complex acos_special_values[7][7];
+/*[clinic input]
+cmath.acos -> Py_complex_protected
+
+ z: Py_complex_protected
+ /
+
+Return the arc cosine of z.
+[clinic start generated code]*/
+
static Py_complex
-c_acos(Py_complex z)
+cmath_acos_impl(PyModuleDef *module, Py_complex z)
+/*[clinic end generated code: output=7c1dd21ff818db6b input=bd6cbd78ae851927]*/
{
Py_complex s1, s2, r;
@@ -145,10 +189,10 @@ c_acos(Py_complex z)
} else {
s1.real = 1.-z.real;
s1.imag = -z.imag;
- s1 = c_sqrt(s1);
+ s1 = cmath_sqrt_impl(module, s1);
s2.real = 1.+z.real;
s2.imag = z.imag;
- s2 = c_sqrt(s2);
+ s2 = cmath_sqrt_impl(module, s2);
r.real = 2.*atan2(s1.real, s2.real);
r.imag = m_asinh(s2.real*s1.imag - s2.imag*s1.real);
}
@@ -156,16 +200,18 @@ c_acos(Py_complex z)
return r;
}
-PyDoc_STRVAR(c_acos_doc,
-"acos(x)\n"
-"\n"
-"Return the arc cosine of x.");
-
static Py_complex acosh_special_values[7][7];
+/*[clinic input]
+cmath.acosh = cmath.acos
+
+Return the inverse hyperbolic cosine of z.
+[clinic start generated code]*/
+
static Py_complex
-c_acosh(Py_complex z)
+cmath_acosh_impl(PyModuleDef *module, Py_complex z)
+/*[clinic end generated code: output=c23c776429def981 input=3f61bee7d703e53c]*/
{
Py_complex s1, s2, r;
@@ -178,10 +224,10 @@ c_acosh(Py_complex z)
} else {
s1.real = z.real - 1.;
s1.imag = z.imag;
- s1 = c_sqrt(s1);
+ s1 = cmath_sqrt_impl(module, s1);
s2.real = z.real + 1.;
s2.imag = z.imag;
- s2 = c_sqrt(s2);
+ s2 = cmath_sqrt_impl(module, s2);
r.real = m_asinh(s1.real*s2.real + s1.imag*s2.imag);
r.imag = 2.*atan2(s1.imag, s2.real);
}
@@ -189,35 +235,38 @@ c_acosh(Py_complex z)
return r;
}
-PyDoc_STRVAR(c_acosh_doc,
-"acosh(x)\n"
-"\n"
-"Return the inverse hyperbolic cosine of x.");
+/*[clinic input]
+cmath.asin = cmath.acos
+Return the arc sine of z.
+[clinic start generated code]*/
static Py_complex
-c_asin(Py_complex z)
+cmath_asin_impl(PyModuleDef *module, Py_complex z)
+/*[clinic end generated code: output=42d2346d46690826 input=be0bf0cfdd5239c5]*/
{
/* asin(z) = -i asinh(iz) */
Py_complex s, r;
s.real = -z.imag;
s.imag = z.real;
- s = c_asinh(s);
+ s = cmath_asinh_impl(module, s);
r.real = s.imag;
r.imag = -s.real;
return r;
}
-PyDoc_STRVAR(c_asin_doc,
-"asin(x)\n"
-"\n"
-"Return the arc sine of x.");
-
static Py_complex asinh_special_values[7][7];
+/*[clinic input]
+cmath.asinh = cmath.acos
+
+Return the inverse hyperbolic sine of z.
+[clinic start generated code]*/
+
static Py_complex
-c_asinh(Py_complex z)
+cmath_asinh_impl(PyModuleDef *module, Py_complex z)
+/*[clinic end generated code: output=0c6664823c7b1b35 input=5c09448fcfc89a79]*/
{
Py_complex s1, s2, r;
@@ -235,10 +284,10 @@ c_asinh(Py_complex z)
} else {
s1.real = 1.+z.imag;
s1.imag = -z.real;
- s1 = c_sqrt(s1);
+ s1 = cmath_sqrt_impl(module, s1);
s2.real = 1.-z.imag;
s2.imag = z.real;
- s2 = c_sqrt(s2);
+ s2 = cmath_sqrt_impl(module, s2);
r.real = m_asinh(s1.real*s2.imag-s2.real*s1.imag);
r.imag = atan2(z.imag, s1.real*s2.real-s1.imag*s2.imag);
}
@@ -246,20 +295,22 @@ c_asinh(Py_complex z)
return r;
}
-PyDoc_STRVAR(c_asinh_doc,
-"asinh(x)\n"
-"\n"
-"Return the inverse hyperbolic sine of x.");
+/*[clinic input]
+cmath.atan = cmath.acos
+
+Return the arc tangent of z.
+[clinic start generated code]*/
static Py_complex
-c_atan(Py_complex z)
+cmath_atan_impl(PyModuleDef *module, Py_complex z)
+/*[clinic end generated code: output=b7d44f02c6a5c3b5 input=3b21ff7d5eac632a]*/
{
/* atan(z) = -i atanh(iz) */
Py_complex s, r;
s.real = -z.imag;
s.imag = z.real;
- s = c_atanh(s);
+ s = cmath_atanh_impl(module, s);
r.real = s.imag;
r.imag = -s.real;
return r;
@@ -295,16 +346,18 @@ c_atan2(Py_complex z)
return atan2(z.imag, z.real);
}
-PyDoc_STRVAR(c_atan_doc,
-"atan(x)\n"
-"\n"
-"Return the arc tangent of x.");
-
static Py_complex atanh_special_values[7][7];
+/*[clinic input]
+cmath.atanh = cmath.acos
+
+Return the inverse hyperbolic tangent of z.
+[clinic start generated code]*/
+
static Py_complex
-c_atanh(Py_complex z)
+cmath_atanh_impl(PyModuleDef *module, Py_complex z)
+/*[clinic end generated code: output=279e0b9fefc8da7c input=2b3fdb82fb34487b]*/
{
Py_complex r;
double ay, h;
@@ -313,7 +366,7 @@ c_atanh(Py_complex z)
/* Reduce to case where z.real >= 0., using atanh(z) = -atanh(-z). */
if (z.real < 0.) {
- return c_neg(c_atanh(c_neg(z)));
+ return _Py_c_neg(cmath_atanh_impl(module, _Py_c_neg(z)));
}
ay = fabs(z.imag);
@@ -350,34 +403,38 @@ c_atanh(Py_complex z)
return r;
}
-PyDoc_STRVAR(c_atanh_doc,
-"atanh(x)\n"
-"\n"
-"Return the inverse hyperbolic tangent of x.");
+/*[clinic input]
+cmath.cos = cmath.acos
+
+Return the cosine of z.
+[clinic start generated code]*/
static Py_complex
-c_cos(Py_complex z)
+cmath_cos_impl(PyModuleDef *module, Py_complex z)
+/*[clinic end generated code: output=9d1cdc1b5e761667 input=6022e39b77127ac7]*/
{
/* cos(z) = cosh(iz) */
Py_complex r;
r.real = -z.imag;
r.imag = z.real;
- r = c_cosh(r);
+ r = cmath_cosh_impl(module, r);
return r;
}
-PyDoc_STRVAR(c_cos_doc,
-"cos(x)\n"
-"\n"
-"Return the cosine of x.");
-
/* cosh(infinity + i*y) needs to be dealt with specially */
static Py_complex cosh_special_values[7][7];
+/*[clinic input]
+cmath.cosh = cmath.acos
+
+Return the hyperbolic cosine of z.
+[clinic start generated code]*/
+
static Py_complex
-c_cosh(Py_complex z)
+cmath_cosh_impl(PyModuleDef *module, Py_complex z)
+/*[clinic end generated code: output=f3b5d3282b3024d3 input=d6b66339e9cc332b]*/
{
Py_complex r;
double x_minus_one;
@@ -426,18 +483,20 @@ c_cosh(Py_complex z)
return r;
}
-PyDoc_STRVAR(c_cosh_doc,
-"cosh(x)\n"
-"\n"
-"Return the hyperbolic cosine of x.");
-
/* exp(infinity + i*y) and exp(-infinity + i*y) need special treatment for
finite y */
static Py_complex exp_special_values[7][7];
+/*[clinic input]
+cmath.exp = cmath.acos
+
+Return the exponential value e**z.
+[clinic start generated code]*/
+
static Py_complex
-c_exp(Py_complex z)
+cmath_exp_impl(PyModuleDef *module, Py_complex z)
+/*[clinic end generated code: output=6f8825eb2bcad9ba input=8b9e6cf8a92174c3]*/
{
Py_complex r;
double l;
@@ -486,12 +545,6 @@ c_exp(Py_complex z)
return r;
}
-PyDoc_STRVAR(c_exp_doc,
-"exp(x)\n"
-"\n"
-"Return the exponential value e**x.");
-
-
static Py_complex log_special_values[7][7];
static Py_complex
@@ -564,8 +617,15 @@ c_log(Py_complex z)
}
+/*[clinic input]
+cmath.log10 = cmath.acos
+
+Return the base-10 logarithm of z.
+[clinic start generated code]*/
+
static Py_complex
-c_log10(Py_complex z)
+cmath_log10_impl(PyModuleDef *module, Py_complex z)
+/*[clinic end generated code: output=c7c426ca0e782341 input=cff5644f73c1519c]*/
{
Py_complex r;
int errno_save;
@@ -578,36 +638,40 @@ c_log10(Py_complex z)
return r;
}
-PyDoc_STRVAR(c_log10_doc,
-"log10(x)\n"
-"\n"
-"Return the base-10 logarithm of x.");
+/*[clinic input]
+cmath.sin = cmath.acos
+
+Return the sine of z.
+[clinic start generated code]*/
static Py_complex
-c_sin(Py_complex z)
+cmath_sin_impl(PyModuleDef *module, Py_complex z)
+/*[clinic end generated code: output=e7f5e2b253825ac7 input=2d3519842a8b4b85]*/
{
/* sin(z) = -i sin(iz) */
Py_complex s, r;
s.real = -z.imag;
s.imag = z.real;
- s = c_sinh(s);
+ s = cmath_sinh_impl(module, s);
r.real = s.imag;
r.imag = -s.real;
return r;
}
-PyDoc_STRVAR(c_sin_doc,
-"sin(x)\n"
-"\n"
-"Return the sine of x.");
-
/* sinh(infinity + i*y) needs to be dealt with specially */
static Py_complex sinh_special_values[7][7];
+/*[clinic input]
+cmath.sinh = cmath.acos
+
+Return the hyperbolic sine of z.
+[clinic start generated code]*/
+
static Py_complex
-c_sinh(Py_complex z)
+cmath_sinh_impl(PyModuleDef *module, Py_complex z)
+/*[clinic end generated code: output=d71fff8298043a95 input=d2d3fc8c1ddfd2dd]*/
{
Py_complex r;
double x_minus_one;
@@ -655,16 +719,18 @@ c_sinh(Py_complex z)
return r;
}
-PyDoc_STRVAR(c_sinh_doc,
-"sinh(x)\n"
-"\n"
-"Return the hyperbolic sine of x.");
-
static Py_complex sqrt_special_values[7][7];
+/*[clinic input]
+cmath.sqrt = cmath.acos
+
+Return the square root of z.
+[clinic start generated code]*/
+
static Py_complex
-c_sqrt(Py_complex z)
+cmath_sqrt_impl(PyModuleDef *module, Py_complex z)
+/*[clinic end generated code: output=b6bda283d0c5a7b4 input=7088b166fc9a58c7]*/
{
/*
Method: use symmetries to reduce to the case when x = z.real and y
@@ -730,36 +796,40 @@ c_sqrt(Py_complex z)
return r;
}
-PyDoc_STRVAR(c_sqrt_doc,
-"sqrt(x)\n"
-"\n"
-"Return the square root of x.");
+/*[clinic input]
+cmath.tan = cmath.acos
+
+Return the tangent of z.
+[clinic start generated code]*/
static Py_complex
-c_tan(Py_complex z)
+cmath_tan_impl(PyModuleDef *module, Py_complex z)
+/*[clinic end generated code: output=df374bacf36d99b4 input=fc167e528767888e]*/
{
/* tan(z) = -i tanh(iz) */
Py_complex s, r;
s.real = -z.imag;
s.imag = z.real;
- s = c_tanh(s);
+ s = cmath_tanh_impl(module, s);
r.real = s.imag;
r.imag = -s.real;
return r;
}
-PyDoc_STRVAR(c_tan_doc,
-"tan(x)\n"
-"\n"
-"Return the tangent of x.");
-
/* tanh(infinity + i*y) needs to be dealt with specially */
static Py_complex tanh_special_values[7][7];
+/*[clinic input]
+cmath.tanh = cmath.acos
+
+Return the hyperbolic tangent of z.
+[clinic start generated code]*/
+
static Py_complex
-c_tanh(Py_complex z)
+cmath_tanh_impl(PyModuleDef *module, Py_complex z)
+/*[clinic end generated code: output=f578773d27a18e96 input=22f67f9dc6d29685]*/
{
/* Formula:
@@ -822,27 +892,35 @@ c_tanh(Py_complex z)
return r;
}
-PyDoc_STRVAR(c_tanh_doc,
-"tanh(x)\n"
-"\n"
-"Return the hyperbolic tangent of x.");
+/*[clinic input]
+cmath.log
+
+ x: Py_complex
+ y_obj: object = NULL
+ /
+
+The logarithm of z to the given base.
+
+If the base not specified, returns the natural logarithm (base e) of z.
+[clinic start generated code]*/
static PyObject *
-cmath_log(PyObject *self, PyObject *args)
+cmath_log_impl(PyModuleDef *module, Py_complex x, PyObject *y_obj)
+/*[clinic end generated code: output=35e2a1e5229b5a46 input=ee0e823a7c6e68ea]*/
{
- Py_complex x;
Py_complex y;
- if (!PyArg_ParseTuple(args, "D|D", &x, &y))
- return NULL;
-
errno = 0;
PyFPE_START_PROTECT("complex function", return 0)
x = c_log(x);
- if (PyTuple_GET_SIZE(args) == 2) {
+ if (y_obj != NULL) {
+ y = PyComplex_AsCComplex(y_obj);
+ if (PyErr_Occurred()) {
+ return NULL;
+ }
y = c_log(y);
- x = c_quot(x, y);
+ x = _Py_c_quot(x, y);
}
PyFPE_END_PROTECT(x)
if (errno != 0)
@@ -850,10 +928,6 @@ cmath_log(PyObject *self, PyObject *args)
return PyComplex_FromCComplex(x);
}
-PyDoc_STRVAR(cmath_log_doc,
-"log(x[, base]) -> the logarithm of x to the given base.\n\
-If the base not specified, returns the natural logarithm (base e) of x.");
-
/* And now the glue to make them available from Python: */
@@ -869,57 +943,22 @@ math_error(void)
return NULL;
}
-static PyObject *
-math_1(PyObject *args, Py_complex (*func)(Py_complex))
-{
- Py_complex x,r ;
- if (!PyArg_ParseTuple(args, "D", &x))
- return NULL;
- errno = 0;
- PyFPE_START_PROTECT("complex function", return 0);
- r = (*func)(x);
- PyFPE_END_PROTECT(r);
- if (errno == EDOM) {
- PyErr_SetString(PyExc_ValueError, "math domain error");
- return NULL;
- }
- else if (errno == ERANGE) {
- PyErr_SetString(PyExc_OverflowError, "math range error");
- return NULL;
- }
- else {
- return PyComplex_FromCComplex(r);
- }
-}
-#define FUNC1(stubname, func) \
- static PyObject * stubname(PyObject *self, PyObject *args) { \
- return math_1(args, func); \
- }
+/*[clinic input]
+cmath.phase
-FUNC1(cmath_acos, c_acos)
-FUNC1(cmath_acosh, c_acosh)
-FUNC1(cmath_asin, c_asin)
-FUNC1(cmath_asinh, c_asinh)
-FUNC1(cmath_atan, c_atan)
-FUNC1(cmath_atanh, c_atanh)
-FUNC1(cmath_cos, c_cos)
-FUNC1(cmath_cosh, c_cosh)
-FUNC1(cmath_exp, c_exp)
-FUNC1(cmath_log10, c_log10)
-FUNC1(cmath_sin, c_sin)
-FUNC1(cmath_sinh, c_sinh)
-FUNC1(cmath_sqrt, c_sqrt)
-FUNC1(cmath_tan, c_tan)
-FUNC1(cmath_tanh, c_tanh)
+ z: Py_complex
+ /
+
+Return argument, also known as the phase angle, of a complex.
+[clinic start generated code]*/
static PyObject *
-cmath_phase(PyObject *self, PyObject *args)
+cmath_phase_impl(PyModuleDef *module, Py_complex z)
+/*[clinic end generated code: output=e09eaf373cb624c3 input=5cf75228ba94b69d]*/
{
- Py_complex z;
double phi;
- if (!PyArg_ParseTuple(args, "D:phase", &z))
- return NULL;
+
errno = 0;
PyFPE_START_PROTECT("arg function", return 0)
phi = c_atan2(z);
@@ -930,21 +969,27 @@ cmath_phase(PyObject *self, PyObject *args)
return PyFloat_FromDouble(phi);
}
-PyDoc_STRVAR(cmath_phase_doc,
-"phase(z) -> float\n\n\
-Return argument, also known as the phase angle, of a complex.");
+/*[clinic input]
+cmath.polar
+
+ z: Py_complex
+ /
+
+Convert a complex from rectangular coordinates to polar coordinates.
+
+r is the distance from 0 and phi the phase angle.
+[clinic start generated code]*/
static PyObject *
-cmath_polar(PyObject *self, PyObject *args)
+cmath_polar_impl(PyModuleDef *module, Py_complex z)
+/*[clinic end generated code: output=07d41b16c877875a input=26c353574fd1a861]*/
{
- Py_complex z;
double r, phi;
- if (!PyArg_ParseTuple(args, "D:polar", &z))
- return NULL;
+
errno = 0;
PyFPE_START_PROTECT("polar function", return 0)
phi = c_atan2(z); /* should not cause any exception */
- r = c_abs(z); /* sets errno to ERANGE on overflow */
+ r = _Py_c_abs(z); /* sets errno to ERANGE on overflow */
PyFPE_END_PROTECT(r)
if (errno != 0)
return math_error();
@@ -952,11 +997,6 @@ cmath_polar(PyObject *self, PyObject *args)
return Py_BuildValue("dd", r, phi);
}
-PyDoc_STRVAR(cmath_polar_doc,
-"polar(z) -> r: float, phi: float\n\n\
-Convert a complex from rectangular coordinates to polar coordinates. r is\n\
-the distance from 0 and phi the phase angle.");
-
/*
rect() isn't covered by the C99 standard, but it's not too hard to
figure out 'spirit of C99' rules for special value handing:
@@ -970,13 +1010,21 @@ the distance from 0 and phi the phase angle.");
static Py_complex rect_special_values[7][7];
+/*[clinic input]
+cmath.rect
+
+ r: double
+ phi: double
+ /
+
+Convert from polar coordinates to rectangular coordinates.
+[clinic start generated code]*/
+
static PyObject *
-cmath_rect(PyObject *self, PyObject *args)
+cmath_rect_impl(PyModuleDef *module, double r, double phi)
+/*[clinic end generated code: output=d97a8749bd63e9d5 input=24c5646d147efd69]*/
{
Py_complex z;
- double r, phi;
- if (!PyArg_ParseTuple(args, "dd:rect", &r, &phi))
- return NULL;
errno = 0;
PyFPE_START_PROTECT("rect function", return 0)
@@ -1027,79 +1075,143 @@ cmath_rect(PyObject *self, PyObject *args)
return PyComplex_FromCComplex(z);
}
-PyDoc_STRVAR(cmath_rect_doc,
-"rect(r, phi) -> z: complex\n\n\
-Convert from polar coordinates to rectangular coordinates.");
+/*[clinic input]
+cmath.isfinite = cmath.polar
+
+Return True if both the real and imaginary parts of z are finite, else False.
+[clinic start generated code]*/
static PyObject *
-cmath_isfinite(PyObject *self, PyObject *args)
+cmath_isfinite_impl(PyModuleDef *module, Py_complex z)
+/*[clinic end generated code: output=8f6682fa93de45d6 input=848e7ee701895815]*/
{
- Py_complex z;
- if (!PyArg_ParseTuple(args, "D:isfinite", &z))
- return NULL;
return PyBool_FromLong(Py_IS_FINITE(z.real) && Py_IS_FINITE(z.imag));
}
-PyDoc_STRVAR(cmath_isfinite_doc,
-"isfinite(z) -> bool\n\
-Return True if both the real and imaginary parts of z are finite, else False.");
+/*[clinic input]
+cmath.isnan = cmath.polar
+
+Checks if the real or imaginary part of z not a number (NaN).
+[clinic start generated code]*/
static PyObject *
-cmath_isnan(PyObject *self, PyObject *args)
+cmath_isnan_impl(PyModuleDef *module, Py_complex z)
+/*[clinic end generated code: output=b85fe8c2047718ee input=71799f5d284c9baf]*/
{
- Py_complex z;
- if (!PyArg_ParseTuple(args, "D:isnan", &z))
- return NULL;
return PyBool_FromLong(Py_IS_NAN(z.real) || Py_IS_NAN(z.imag));
}
-PyDoc_STRVAR(cmath_isnan_doc,
-"isnan(z) -> bool\n\
-Checks if the real or imaginary part of z not a number (NaN)");
+/*[clinic input]
+cmath.isinf = cmath.polar
+
+Checks if the real or imaginary part of z is infinite.
+[clinic start generated code]*/
static PyObject *
-cmath_isinf(PyObject *self, PyObject *args)
+cmath_isinf_impl(PyModuleDef *module, Py_complex z)
+/*[clinic end generated code: output=8ca9c6109e468bf4 input=363df155c7181329]*/
{
- Py_complex z;
- if (!PyArg_ParseTuple(args, "D:isinf", &z))
- return NULL;
return PyBool_FromLong(Py_IS_INFINITY(z.real) ||
Py_IS_INFINITY(z.imag));
}
-PyDoc_STRVAR(cmath_isinf_doc,
-"isinf(z) -> bool\n\
-Checks if the real or imaginary part of z is infinite.");
+/*[clinic input]
+cmath.isclose -> bool
+
+ a: Py_complex
+ b: Py_complex
+ *
+ rel_tol: double = 1e-09
+ maximum difference for being considered "close", relative to the
+ magnitude of the input values
+ abs_tol: double = 0.0
+ maximum difference for being considered "close", regardless of the
+ magnitude of the input values
+
+Determine whether two complex numbers are close in value.
+
+Return True if a is close in value to b, and False otherwise.
+
+For the values to be considered close, the difference between them must be
+smaller than at least one of the tolerances.
+
+-inf, inf and NaN behave similarly to the IEEE 754 Standard. That is, NaN is
+not close to anything, even itself. inf and -inf are only close to themselves.
+[clinic start generated code]*/
+
+static int
+cmath_isclose_impl(PyModuleDef *module, Py_complex a, Py_complex b,
+ double rel_tol, double abs_tol)
+/*[clinic end generated code: output=da0c535fb54e2310 input=df9636d7de1d4ac3]*/
+{
+ double diff;
+
+ /* sanity check on the inputs */
+ if (rel_tol < 0.0 || abs_tol < 0.0 ) {
+ PyErr_SetString(PyExc_ValueError,
+ "tolerances must be non-negative");
+ return -1;
+ }
+
+ if ( (a.real == b.real) && (a.imag == b.imag) ) {
+ /* short circuit exact equality -- needed to catch two infinities of
+ the same sign. And perhaps speeds things up a bit sometimes.
+ */
+ return 1;
+ }
+
+ /* This catches the case of two infinities of opposite sign, or
+ one infinity and one finite number. Two infinities of opposite
+ sign would otherwise have an infinite relative tolerance.
+ Two infinities of the same sign are caught by the equality check
+ above.
+ */
+ if (Py_IS_INFINITY(a.real) || Py_IS_INFINITY(a.imag) ||
+ Py_IS_INFINITY(b.real) || Py_IS_INFINITY(b.imag)) {
+ return 0;
+ }
+
+ /* now do the regular computation
+ this is essentially the "weak" test from the Boost library
+ */
+
+ diff = _Py_c_abs(_Py_c_diff(a, b));
+
+ return (((diff <= rel_tol * _Py_c_abs(b)) ||
+ (diff <= rel_tol * _Py_c_abs(a))) ||
+ (diff <= abs_tol));
+}
PyDoc_STRVAR(module_doc,
"This module is always available. It provides access to mathematical\n"
"functions for complex numbers.");
static PyMethodDef cmath_methods[] = {
- {"acos", cmath_acos, METH_VARARGS, c_acos_doc},
- {"acosh", cmath_acosh, METH_VARARGS, c_acosh_doc},
- {"asin", cmath_asin, METH_VARARGS, c_asin_doc},
- {"asinh", cmath_asinh, METH_VARARGS, c_asinh_doc},
- {"atan", cmath_atan, METH_VARARGS, c_atan_doc},
- {"atanh", cmath_atanh, METH_VARARGS, c_atanh_doc},
- {"cos", cmath_cos, METH_VARARGS, c_cos_doc},
- {"cosh", cmath_cosh, METH_VARARGS, c_cosh_doc},
- {"exp", cmath_exp, METH_VARARGS, c_exp_doc},
- {"isfinite", cmath_isfinite, METH_VARARGS, cmath_isfinite_doc},
- {"isinf", cmath_isinf, METH_VARARGS, cmath_isinf_doc},
- {"isnan", cmath_isnan, METH_VARARGS, cmath_isnan_doc},
- {"log", cmath_log, METH_VARARGS, cmath_log_doc},
- {"log10", cmath_log10, METH_VARARGS, c_log10_doc},
- {"phase", cmath_phase, METH_VARARGS, cmath_phase_doc},
- {"polar", cmath_polar, METH_VARARGS, cmath_polar_doc},
- {"rect", cmath_rect, METH_VARARGS, cmath_rect_doc},
- {"sin", cmath_sin, METH_VARARGS, c_sin_doc},
- {"sinh", cmath_sinh, METH_VARARGS, c_sinh_doc},
- {"sqrt", cmath_sqrt, METH_VARARGS, c_sqrt_doc},
- {"tan", cmath_tan, METH_VARARGS, c_tan_doc},
- {"tanh", cmath_tanh, METH_VARARGS, c_tanh_doc},
- {NULL, NULL} /* sentinel */
+ CMATH_ACOS_METHODDEF
+ CMATH_ACOSH_METHODDEF
+ CMATH_ASIN_METHODDEF
+ CMATH_ASINH_METHODDEF
+ CMATH_ATAN_METHODDEF
+ CMATH_ATANH_METHODDEF
+ CMATH_COS_METHODDEF
+ CMATH_COSH_METHODDEF
+ CMATH_EXP_METHODDEF
+ CMATH_ISCLOSE_METHODDEF
+ CMATH_ISFINITE_METHODDEF
+ CMATH_ISINF_METHODDEF
+ CMATH_ISNAN_METHODDEF
+ CMATH_LOG_METHODDEF
+ CMATH_LOG10_METHODDEF
+ CMATH_PHASE_METHODDEF
+ CMATH_POLAR_METHODDEF
+ CMATH_RECT_METHODDEF
+ CMATH_SIN_METHODDEF
+ CMATH_SINH_METHODDEF
+ CMATH_SQRT_METHODDEF
+ CMATH_TAN_METHODDEF
+ CMATH_TANH_METHODDEF
+ {NULL, NULL} /* sentinel */
};
diff --git a/Modules/config.c.in b/Modules/config.c.in
index 7a24e2dc89..7b77199c2e 100644
--- a/Modules/config.c.in
+++ b/Modules/config.c.in
@@ -13,7 +13,7 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
/* !!! !!! !!! This file is edited by the makesetup script !!! !!! !!! */
/* This file contains the table of built-in modules.
- See init_builtin() in import.c. */
+ See create_builtin() in import.c. */
#include "Python.h"
diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c
index 1493f8d885..f1fda481fc 100644
--- a/Modules/faulthandler.c
+++ b/Modules/faulthandler.c
@@ -5,7 +5,13 @@
#include <frameobject.h>
#include <signal.h>
#if defined(HAVE_PTHREAD_SIGMASK) && !defined(HAVE_BROKEN_PTHREAD_SIGMASK)
-#include <pthread.h>
+# include <pthread.h>
+#endif
+#ifdef MS_WINDOWS
+# include <windows.h>
+#endif
+#ifdef HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
#endif
/* Allocate at maximum 100 MB of the stack to raise the stack overflow */
@@ -22,9 +28,7 @@
# define FAULTHANDLER_USER
#endif
-/* cast size_t to int because write() takes an int on Windows
- (anyway, the length is smaller than 30 characters) */
-#define PUTS(fd, str) write(fd, str, (int)strlen(str))
+#define PUTS(fd, str) _Py_write_noraise(fd, str, strlen(str))
_Py_IDENTIFIER(enable);
_Py_IDENTIFIER(fileno);
@@ -127,32 +131,46 @@ static stack_t stack;
call its flush() method.
If file is NULL or Py_None, use sys.stderr as the new file.
+ If file is an integer, it will be treated as file descriptor.
- On success, return the new file and write the file descriptor into *p_fd.
- On error, return NULL. */
+ On success, return the file descriptor and write the new file into *file_ptr.
+ On error, return -1. */
-static PyObject*
-faulthandler_get_fileno(PyObject *file, int *p_fd)
+static int
+faulthandler_get_fileno(PyObject **file_ptr)
{
PyObject *result;
long fd_long;
int fd;
+ PyObject *file = *file_ptr;
if (file == NULL || file == Py_None) {
file = _PySys_GetObjectId(&PyId_stderr);
if (file == NULL) {
PyErr_SetString(PyExc_RuntimeError, "unable to get sys.stderr");
- return NULL;
+ return -1;
}
if (file == Py_None) {
PyErr_SetString(PyExc_RuntimeError, "sys.stderr is None");
- return NULL;
+ return -1;
+ }
+ }
+ else if (PyLong_Check(file)) {
+ fd = _PyLong_AsInt(file);
+ if (fd == -1 && PyErr_Occurred())
+ return -1;
+ if (fd < 0 || !_PyVerify_fd(fd)) {
+ PyErr_SetString(PyExc_ValueError,
+ "file is not a valid file descripter");
+ return -1;
}
+ *file_ptr = NULL;
+ return fd;
}
result = _PyObject_CallMethodId(file, &PyId_fileno, "");
if (result == NULL)
- return NULL;
+ return -1;
fd = -1;
if (PyLong_Check(result)) {
@@ -165,7 +183,7 @@ faulthandler_get_fileno(PyObject *file, int *p_fd)
if (fd == -1) {
PyErr_SetString(PyExc_RuntimeError,
"file.fileno() is not a valid file descriptor");
- return NULL;
+ return -1;
}
result = _PyObject_CallMethodId(file, &PyId_flush, "");
@@ -175,8 +193,8 @@ faulthandler_get_fileno(PyObject *file, int *p_fd)
/* ignore flush() error */
PyErr_Clear();
}
- *p_fd = fd;
- return file;
+ *file_ptr = file;
+ return fd;
}
/* Get the state of the current thread: only call this function if the current
@@ -193,6 +211,42 @@ get_thread_state(void)
return tstate;
}
+static void
+faulthandler_dump_traceback(int fd, int all_threads,
+ PyInterpreterState *interp)
+{
+ static volatile int reentrant = 0;
+ PyThreadState *tstate;
+
+ if (reentrant)
+ return;
+
+ reentrant = 1;
+
+#ifdef WITH_THREAD
+ /* SIGSEGV, SIGFPE, SIGABRT, SIGBUS and SIGILL are synchronous signals and
+ are thus delivered to the thread that caused the fault. Get the Python
+ thread state of the current thread.
+
+ PyThreadState_Get() doesn't give the state of the thread that caused the
+ fault if the thread released the GIL, and so this function cannot be
+ used. Read the thread local storage (TLS) instead: call
+ PyGILState_GetThisThreadState(). */
+ tstate = PyGILState_GetThisThreadState();
+#else
+ tstate = PyThreadState_Get();
+#endif
+
+ if (all_threads)
+ _Py_DumpTracebackThreads(fd, interp, tstate);
+ else {
+ if (tstate != NULL)
+ _Py_DumpTraceback(fd, tstate);
+ }
+
+ reentrant = 0;
+}
+
static PyObject*
faulthandler_dump_traceback_py(PyObject *self,
PyObject *args, PyObject *kwargs)
@@ -209,8 +263,8 @@ faulthandler_dump_traceback_py(PyObject *self,
&file, &all_threads))
return NULL;
- file = faulthandler_get_fileno(file, &fd);
- if (file == NULL)
+ fd = faulthandler_get_fileno(&file);
+ if (fd < 0)
return NULL;
tstate = get_thread_state();
@@ -227,6 +281,10 @@ faulthandler_dump_traceback_py(PyObject *self,
else {
_Py_DumpTraceback(fd, tstate);
}
+
+ if (PyErr_CheckSignals())
+ return NULL;
+
Py_RETURN_NONE;
}
@@ -250,7 +308,6 @@ faulthandler_fatal_error(int signum)
const int fd = fatal_error.fd;
unsigned int i;
fault_handler_t *handler = NULL;
- PyThreadState *tstate;
int save_errno = errno;
if (!fatal_error.enabled)
@@ -278,26 +335,8 @@ faulthandler_fatal_error(int signum)
PUTS(fd, handler->name);
PUTS(fd, "\n\n");
-#ifdef WITH_THREAD
- /* SIGSEGV, SIGFPE, SIGABRT, SIGBUS and SIGILL are synchronous signals and
- are thus delivered to the thread that caused the fault. Get the Python
- thread state of the current thread.
-
- PyThreadState_Get() doesn't give the state of the thread that caused the
- fault if the thread released the GIL, and so this function cannot be
- used. Read the thread local storage (TLS) instead: call
- PyGILState_GetThisThreadState(). */
- tstate = PyGILState_GetThisThreadState();
-#else
- tstate = PyThreadState_Get();
-#endif
-
- if (fatal_error.all_threads)
- _Py_DumpTracebackThreads(fd, fatal_error.interp, tstate);
- else {
- if (tstate != NULL)
- _Py_DumpTraceback(fd, tstate);
- }
+ faulthandler_dump_traceback(fd, fatal_error.all_threads,
+ fatal_error.interp);
errno = save_errno;
#ifdef MS_WINDOWS
@@ -333,17 +372,16 @@ faulthandler_enable(PyObject *self, PyObject *args, PyObject *kwargs)
"|Oi:enable", kwlist, &file, &all_threads))
return NULL;
- file = faulthandler_get_fileno(file, &fd);
- if (file == NULL)
+ fd = faulthandler_get_fileno(&file);
+ if (fd < 0)
return NULL;
tstate = get_thread_state();
if (tstate == NULL)
return NULL;
- Py_XDECREF(fatal_error.file);
- Py_INCREF(file);
- fatal_error.file = file;
+ Py_XINCREF(file);
+ Py_XSETREF(fatal_error.file, file);
fatal_error.fd = fd;
fatal_error.all_threads = all_threads;
fatal_error.interp = tstate->interp;
@@ -452,9 +490,9 @@ faulthandler_thread(void *unused)
assert(st == PY_LOCK_FAILURE);
/* get the thread holding the GIL, NULL if no thread hold the GIL */
- current = _Py_atomic_load_relaxed(&_PyThreadState_Current);
+ current = _PyThreadState_UncheckedGet();
- write(thread.fd, thread.header, (int)thread.header_len);
+ _Py_write_noraise(thread.fd, thread.header, (int)thread.header_len);
errmsg = _Py_DumpTracebackThreads(thread.fd, thread.interp, current);
ok = (errmsg == NULL);
@@ -547,8 +585,8 @@ faulthandler_dump_traceback_later(PyObject *self,
if (tstate == NULL)
return NULL;
- file = faulthandler_get_fileno(file, &fd);
- if (file == NULL)
+ fd = faulthandler_get_fileno(&file);
+ if (fd < 0)
return NULL;
/* format the timeout */
@@ -560,9 +598,8 @@ faulthandler_dump_traceback_later(PyObject *self,
/* Cancel previous thread, if running */
cancel_dump_traceback_later();
- Py_XDECREF(thread.file);
- Py_INCREF(file);
- thread.file = file;
+ Py_XINCREF(file);
+ Py_XSETREF(thread.file, file);
thread.fd = fd;
thread.timeout_us = timeout_us;
thread.repeat = repeat;
@@ -640,28 +677,14 @@ static void
faulthandler_user(int signum)
{
user_signal_t *user;
- PyThreadState *tstate;
int save_errno = errno;
user = &user_signals[signum];
if (!user->enabled)
return;
-#ifdef WITH_THREAD
- /* PyThreadState_Get() doesn't give the state of the current thread if
- the thread doesn't hold the GIL. Read the thread local storage (TLS)
- instead: call PyGILState_GetThisThreadState(). */
- tstate = PyGILState_GetThisThreadState();
-#else
- tstate = PyThreadState_Get();
-#endif
+ faulthandler_dump_traceback(user->fd, user->all_threads, user->interp);
- if (user->all_threads)
- _Py_DumpTracebackThreads(user->fd, user->interp, tstate);
- else {
- if (tstate != NULL)
- _Py_DumpTraceback(user->fd, tstate);
- }
#ifdef HAVE_SIGACTION
if (user->chain) {
(void)sigaction(signum, &user->previous, NULL);
@@ -731,8 +754,8 @@ faulthandler_register_py(PyObject *self,
if (tstate == NULL)
return NULL;
- file = faulthandler_get_fileno(file, &fd);
- if (file == NULL)
+ fd = faulthandler_get_fileno(&file);
+ if (fd < 0)
return NULL;
if (user_signals == NULL) {
@@ -753,9 +776,8 @@ faulthandler_register_py(PyObject *self,
user->previous = previous;
}
- Py_XDECREF(user->file);
- Py_INCREF(file);
- user->file = file;
+ Py_XINCREF(file);
+ Py_XSETREF(user->file, file);
user->fd = fd;
user->all_threads = all_threads;
user->chain = chain;
@@ -804,12 +826,41 @@ faulthandler_unregister_py(PyObject *self, PyObject *args)
#endif /* FAULTHANDLER_USER */
+static void
+faulthandler_suppress_crash_report(void)
+{
+#ifdef MS_WINDOWS
+ UINT mode;
+
+ /* Configure Windows to not display the Windows Error Reporting dialog */
+ mode = SetErrorMode(SEM_NOGPFAULTERRORBOX);
+ SetErrorMode(mode | SEM_NOGPFAULTERRORBOX);
+#endif
+
+#ifdef HAVE_SYS_RESOURCE_H
+ struct rlimit rl;
+
+ /* Disable creation of core dump */
+ if (getrlimit(RLIMIT_CORE, &rl) != 0) {
+ rl.rlim_cur = 0;
+ setrlimit(RLIMIT_CORE, &rl);
+ }
+#endif
+
+#ifdef _MSC_VER
+ /* Visual Studio: configure abort() to not display an error message nor
+ open a popup asking to report the fault. */
+ _set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT);
+#endif
+}
+
static PyObject *
faulthandler_read_null(PyObject *self, PyObject *args)
{
volatile int *x;
volatile int y;
+ faulthandler_suppress_crash_report();
x = NULL;
y = *x;
return PyLong_FromLong(y);
@@ -819,6 +870,7 @@ faulthandler_read_null(PyObject *self, PyObject *args)
static void
faulthandler_raise_sigsegv(void)
{
+ faulthandler_suppress_crash_report();
#if defined(MS_WINDOWS)
/* For SIGSEGV, faulthandler_fatal_error() restores the previous signal
handler and then gives back the execution flow to the program (without
@@ -861,6 +913,7 @@ faulthandler_sigfpe(PyObject *self, PyObject *args)
/* Do an integer division by zero: raise a SIGFPE on Intel CPU, but not on
PowerPC. Use volatile to disable compile-time optimizations. */
volatile int x = 1, y = 0, z;
+ faulthandler_suppress_crash_report();
z = x / y;
/* If the division by zero didn't raise a SIGFPE (e.g. on PowerPC),
raise it manually. */
@@ -873,40 +926,27 @@ faulthandler_sigfpe(PyObject *self, PyObject *args)
static PyObject *
faulthandler_sigabrt(PyObject *self, PyObject *args)
{
-#ifdef _MSC_VER
- /* Visual Studio: configure abort() to not display an error message nor
- open a popup asking to report the fault. */
- _set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT);
-#endif
+ faulthandler_suppress_crash_report();
abort();
Py_RETURN_NONE;
}
-#ifdef SIGBUS
-static PyObject *
-faulthandler_sigbus(PyObject *self, PyObject *args)
-{
- raise(SIGBUS);
- Py_RETURN_NONE;
-}
-#endif
-
-#ifdef SIGILL
-static PyObject *
-faulthandler_sigill(PyObject *self, PyObject *args)
-{
- raise(SIGILL);
- Py_RETURN_NONE;
-}
-#endif
-
static PyObject *
faulthandler_fatal_error_py(PyObject *self, PyObject *args)
{
char *message;
- if (!PyArg_ParseTuple(args, "y:fatal_error", &message))
+ int release_gil = 0;
+ if (!PyArg_ParseTuple(args, "y|i:fatal_error", &message, &release_gil))
return NULL;
- Py_FatalError(message);
+ faulthandler_suppress_crash_report();
+ if (release_gil) {
+ Py_BEGIN_ALLOW_THREADS
+ Py_FatalError(message);
+ Py_END_ALLOW_THREADS
+ }
+ else {
+ Py_FatalError(message);
+ }
Py_RETURN_NONE;
}
@@ -939,6 +979,7 @@ faulthandler_stack_overflow(PyObject *self)
Py_uintptr_t sp = (Py_uintptr_t)&depth;
Py_uintptr_t stop;
+ faulthandler_suppress_crash_report();
depth = 0;
stop = stack_overflow(sp - STACK_OVERFLOW_MAX_SIZE,
sp + STACK_OVERFLOW_MAX_SIZE,
@@ -1010,7 +1051,7 @@ static PyMethodDef module_methods[] = {
{"register",
(PyCFunction)faulthandler_register_py, METH_VARARGS|METH_KEYWORDS,
PyDoc_STR("register(signum, file=sys.stderr, all_threads=True, chain=False): "
- "register an handler for the signal 'signum': dump the "
+ "register a handler for the signal 'signum': dump the "
"traceback of the current thread, or of all threads if "
"all_threads is True, into file")},
{"unregister",
@@ -1028,14 +1069,6 @@ static PyMethodDef module_methods[] = {
PyDoc_STR("_sigabrt(): raise a SIGABRT signal")},
{"_sigfpe", (PyCFunction)faulthandler_sigfpe, METH_NOARGS,
PyDoc_STR("_sigfpe(): raise a SIGFPE signal")},
-#ifdef SIGBUS
- {"_sigbus", (PyCFunction)faulthandler_sigbus, METH_NOARGS,
- PyDoc_STR("_sigbus(): raise a SIGBUS signal")},
-#endif
-#ifdef SIGILL
- {"_sigill", (PyCFunction)faulthandler_sigill, METH_NOARGS,
- PyDoc_STR("_sigill(): raise a SIGILL signal")},
-#endif
{"_fatal_error", faulthandler_fatal_error_py, METH_VARARGS,
PyDoc_STR("_fatal_error(message): call Py_FatalError(message)")},
#if defined(HAVE_SIGALTSTACK) && defined(HAVE_SIGACTION)
diff --git a/Modules/fcntlmodule.c b/Modules/fcntlmodule.c
index 9325940965..4e6eb72780 100644
--- a/Modules/fcntlmodule.c
+++ b/Modules/fcntlmodule.c
@@ -15,6 +15,11 @@
#include <stropts.h>
#endif
+/*[clinic input]
+module fcntl
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=124b58387c158179]*/
+
static int
conv_descriptor(PyObject *object, int *target)
{
@@ -26,48 +31,72 @@ conv_descriptor(PyObject *object, int *target)
return 1;
}
+/* Must come after conv_descriptor definition. */
+#include "clinic/fcntlmodule.c.h"
+
+/*[clinic input]
+fcntl.fcntl
+
+ fd: object(type='int', converter='conv_descriptor')
+ cmd as code: int
+ arg: object(c_default='NULL') = 0
+ /
-/* fcntl(fd, op, [arg]) */
+Perform the operation `cmd` on file descriptor fd.
+
+The values used for `cmd` are operating system dependent, and are available
+as constants in the fcntl module, using the same names as used in
+the relevant C header files. The argument arg is optional, and
+defaults to 0; it may be an int or a string. If arg is given as a string,
+the return value of fcntl is a string of that length, containing the
+resulting value put in the arg buffer by the operating system. The length
+of the arg string is not allowed to exceed 1024 bytes. If the arg given
+is an integer or if none is specified, the result value is an integer
+corresponding to the return value of the fcntl call in the C code.
+[clinic start generated code]*/
static PyObject *
-fcntl_fcntl(PyObject *self, PyObject *args)
+fcntl_fcntl_impl(PyModuleDef *module, int fd, int code, PyObject *arg)
+/*[clinic end generated code: output=afc5bfa74a03ef0d input=8cefbe59b29efbe2]*/
{
- int fd;
- int code;
- int arg;
+ unsigned int int_arg = 0;
int ret;
char *str;
Py_ssize_t len;
char buf[1024];
- if (PyArg_ParseTuple(args, "O&is#:fcntl",
- conv_descriptor, &fd, &code, &str, &len)) {
- if (len > sizeof buf) {
- PyErr_SetString(PyExc_ValueError,
- "fcntl string arg too long");
- return NULL;
+ if (arg != NULL) {
+ int parse_result;
+
+ if (PyArg_Parse(arg, "s#", &str, &len)) {
+ if ((size_t)len > sizeof buf) {
+ PyErr_SetString(PyExc_ValueError,
+ "fcntl string arg too long");
+ return NULL;
+ }
+ memcpy(buf, str, len);
+ Py_BEGIN_ALLOW_THREADS
+ ret = fcntl(fd, code, buf);
+ Py_END_ALLOW_THREADS
+ if (ret < 0) {
+ PyErr_SetFromErrno(PyExc_IOError);
+ return NULL;
+ }
+ return PyBytes_FromStringAndSize(buf, len);
}
- memcpy(buf, str, len);
- Py_BEGIN_ALLOW_THREADS
- ret = fcntl(fd, code, buf);
- Py_END_ALLOW_THREADS
- if (ret < 0) {
- PyErr_SetFromErrno(PyExc_IOError);
- return NULL;
+
+ PyErr_Clear();
+ parse_result = PyArg_Parse(arg,
+ "I;fcntl requires a file or file descriptor,"
+ " an integer and optionally a third integer or a string",
+ &int_arg);
+ if (!parse_result) {
+ return NULL;
}
- return PyBytes_FromStringAndSize(buf, len);
}
- PyErr_Clear();
- arg = 0;
- if (!PyArg_ParseTuple(args,
- "O&i|I;fcntl requires a file or file descriptor,"
- " an integer and optionally a third integer or a string",
- conv_descriptor, &fd, &code, &arg)) {
- return NULL;
- }
Py_BEGIN_ALLOW_THREADS
- ret = fcntl(fd, code, arg);
+ ret = fcntl(fd, code, (int)int_arg);
Py_END_ALLOW_THREADS
if (ret < 0) {
PyErr_SetFromErrno(PyExc_IOError);
@@ -76,33 +105,54 @@ fcntl_fcntl(PyObject *self, PyObject *args)
return PyLong_FromLong((long)ret);
}
-PyDoc_STRVAR(fcntl_doc,
-"fcntl(fd, op, [arg])\n\
-\n\
-Perform the operation op on file descriptor fd. The values used\n\
-for op are operating system dependent, and are available\n\
-as constants in the fcntl module, using the same names as used in\n\
-the relevant C header files. The argument arg is optional, and\n\
-defaults to 0; it may be an int or a string. If arg is given as a string,\n\
-the return value of fcntl is a string of that length, containing the\n\
-resulting value put in the arg buffer by the operating system. The length\n\
-of the arg string is not allowed to exceed 1024 bytes. If the arg given\n\
-is an integer or if none is specified, the result value is an integer\n\
-corresponding to the return value of the fcntl call in the C code.");
+/*[clinic input]
+fcntl.ioctl
+
+ fd: object(type='int', converter='conv_descriptor')
+ request as code: unsigned_int(bitwise=True)
+ arg as ob_arg: object(c_default='NULL') = 0
+ mutate_flag as mutate_arg: bool = True
+ /
-/* ioctl(fd, op, [arg]) */
+Perform the operation `request` on file descriptor `fd`.
+
+The values used for `request` are operating system dependent, and are available
+as constants in the fcntl or termios library modules, using the same names as
+used in the relevant C header files.
+
+The argument `arg` is optional, and defaults to 0; it may be an int or a
+buffer containing character data (most likely a string or an array).
+
+If the argument is a mutable buffer (such as an array) and if the
+mutate_flag argument (which is only allowed in this case) is true then the
+buffer is (in effect) passed to the operating system and changes made by
+the OS will be reflected in the contents of the buffer after the call has
+returned. The return value is the integer returned by the ioctl system
+call.
+
+If the argument is a mutable buffer and the mutable_flag argument is false,
+the behavior is as if a string had been passed.
+
+If the argument is an immutable buffer (most likely a string) then a copy
+of the buffer is passed to the operating system and the return value is a
+string of the same length containing whatever the operating system put in
+the buffer. The length of the arg buffer in this case is not allowed to
+exceed 1024 bytes.
+
+If the arg given is an integer or if none is specified, the result value is
+an integer corresponding to the return value of the ioctl call in the C
+code.
+[clinic start generated code]*/
static PyObject *
-fcntl_ioctl(PyObject *self, PyObject *args)
+fcntl_ioctl_impl(PyModuleDef *module, int fd, unsigned int code,
+ PyObject *ob_arg, int mutate_arg)
+/*[clinic end generated code: output=102faa0f7ebe2210 input=ede70c433cccbbb2]*/
{
#define IOCTL_BUFSZ 1024
- int fd;
- /* In PyArg_ParseTuple below, we use the unsigned non-checked 'I'
- format for the 'code' parameter because Python turns 0x8000000
- into either a large positive number (PyLong or PyInt on 64-bit
- platforms) or a negative number on others (32-bit PyInt)
- whereas the system expects it to be a 32bit bit field value
+ /* We use the unsigned non-checked 'I' format for the 'code' parameter
+ because the system expects it to be a 32bit bit field value
regardless of it being passed as an int or unsigned long on
various platforms. See the termios.TIOCSWINSZ constant across
platforms for an example of this.
@@ -111,101 +161,98 @@ fcntl_ioctl(PyObject *self, PyObject *args)
in their unsigned long ioctl codes this will break and need
special casing based on the platform being built on.
*/
- unsigned int code;
- int arg;
+ int arg = 0;
int ret;
Py_buffer pstr;
char *str;
Py_ssize_t len;
- int mutate_arg = 1;
char buf[IOCTL_BUFSZ+1]; /* argument plus NUL byte */
- if (PyArg_ParseTuple(args, "O&Iw*|i:ioctl",
- conv_descriptor, &fd, &code,
- &pstr, &mutate_arg)) {
- char *arg;
- str = pstr.buf;
- len = pstr.len;
-
- if (mutate_arg) {
- if (len <= IOCTL_BUFSZ) {
- memcpy(buf, str, len);
- buf[len] = '\0';
- arg = buf;
+ if (ob_arg != NULL) {
+ if (PyArg_Parse(ob_arg, "w*:ioctl", &pstr)) {
+ char *arg;
+ str = pstr.buf;
+ len = pstr.len;
+
+ if (mutate_arg) {
+ if (len <= IOCTL_BUFSZ) {
+ memcpy(buf, str, len);
+ buf[len] = '\0';
+ arg = buf;
+ }
+ else {
+ arg = str;
+ }
+ }
+ else {
+ if (len > IOCTL_BUFSZ) {
+ PyBuffer_Release(&pstr);
+ PyErr_SetString(PyExc_ValueError,
+ "ioctl string arg too long");
+ return NULL;
+ }
+ else {
+ memcpy(buf, str, len);
+ buf[len] = '\0';
+ arg = buf;
+ }
+ }
+ if (buf == arg) {
+ Py_BEGIN_ALLOW_THREADS /* think array.resize() */
+ ret = ioctl(fd, code, arg);
+ Py_END_ALLOW_THREADS
+ }
+ else {
+ ret = ioctl(fd, code, arg);
+ }
+ if (mutate_arg && (len <= IOCTL_BUFSZ)) {
+ memcpy(str, buf, len);
+ }
+ PyBuffer_Release(&pstr); /* No further access to str below this point */
+ if (ret < 0) {
+ PyErr_SetFromErrno(PyExc_IOError);
+ return NULL;
+ }
+ if (mutate_arg) {
+ return PyLong_FromLong(ret);
}
else {
- arg = str;
+ return PyBytes_FromStringAndSize(buf, len);
}
}
- else {
+
+ PyErr_Clear();
+ if (PyArg_Parse(ob_arg, "s*:ioctl", &pstr)) {
+ str = pstr.buf;
+ len = pstr.len;
if (len > IOCTL_BUFSZ) {
PyBuffer_Release(&pstr);
PyErr_SetString(PyExc_ValueError,
- "ioctl string arg too long");
+ "ioctl string arg too long");
return NULL;
}
- else {
- memcpy(buf, str, len);
- buf[len] = '\0';
- arg = buf;
- }
- }
- if (buf == arg) {
- Py_BEGIN_ALLOW_THREADS /* think array.resize() */
- ret = ioctl(fd, code, arg);
+ memcpy(buf, str, len);
+ buf[len] = '\0';
+ Py_BEGIN_ALLOW_THREADS
+ ret = ioctl(fd, code, buf);
Py_END_ALLOW_THREADS
- }
- else {
- ret = ioctl(fd, code, arg);
- }
- if (mutate_arg && (len <= IOCTL_BUFSZ)) {
- memcpy(str, buf, len);
- }
- PyBuffer_Release(&pstr); /* No further access to str below this point */
- if (ret < 0) {
- PyErr_SetFromErrno(PyExc_IOError);
- return NULL;
- }
- if (mutate_arg) {
- return PyLong_FromLong(ret);
- }
- else {
+ if (ret < 0) {
+ PyBuffer_Release(&pstr);
+ PyErr_SetFromErrno(PyExc_IOError);
+ return NULL;
+ }
+ PyBuffer_Release(&pstr);
return PyBytes_FromStringAndSize(buf, len);
}
- }
- PyErr_Clear();
- if (PyArg_ParseTuple(args, "O&Is*:ioctl",
- conv_descriptor, &fd, &code, &pstr)) {
- str = pstr.buf;
- len = pstr.len;
- if (len > IOCTL_BUFSZ) {
- PyBuffer_Release(&pstr);
- PyErr_SetString(PyExc_ValueError,
- "ioctl string arg too long");
- return NULL;
+ PyErr_Clear();
+ if (!PyArg_Parse(ob_arg,
+ "i;ioctl requires a file or file descriptor,"
+ " an integer and optionally an integer or buffer argument",
+ &arg)) {
+ return NULL;
}
- memcpy(buf, str, len);
- buf[len] = '\0';
- Py_BEGIN_ALLOW_THREADS
- ret = ioctl(fd, code, buf);
- Py_END_ALLOW_THREADS
- if (ret < 0) {
- PyBuffer_Release(&pstr);
- PyErr_SetFromErrno(PyExc_IOError);
- return NULL;
- }
- PyBuffer_Release(&pstr);
- return PyBytes_FromStringAndSize(buf, len);
- }
-
- PyErr_Clear();
- arg = 0;
- if (!PyArg_ParseTuple(args,
- "O&I|i;ioctl requires a file or file descriptor,"
- " an integer and optionally an integer or buffer argument",
- conv_descriptor, &fd, &code, &arg)) {
- return NULL;
+ // Fall-through to outside the 'if' statement.
}
Py_BEGIN_ALLOW_THREADS
ret = ioctl(fd, code, arg);
@@ -218,52 +265,25 @@ fcntl_ioctl(PyObject *self, PyObject *args)
#undef IOCTL_BUFSZ
}
-PyDoc_STRVAR(ioctl_doc,
-"ioctl(fd, op[, arg[, mutate_flag]])\n\
-\n\
-Perform the operation op on file descriptor fd. The values used for op\n\
-are operating system dependent, and are available as constants in the\n\
-fcntl or termios library modules, using the same names as used in the\n\
-relevant C header files.\n\
-\n\
-The argument arg is optional, and defaults to 0; it may be an int or a\n\
-buffer containing character data (most likely a string or an array). \n\
-\n\
-If the argument is a mutable buffer (such as an array) and if the\n\
-mutate_flag argument (which is only allowed in this case) is true then the\n\
-buffer is (in effect) passed to the operating system and changes made by\n\
-the OS will be reflected in the contents of the buffer after the call has\n\
-returned. The return value is the integer returned by the ioctl system\n\
-call.\n\
-\n\
-If the argument is a mutable buffer and the mutable_flag argument is not\n\
-passed or is false, the behavior is as if a string had been passed. This\n\
-behavior will change in future releases of Python.\n\
-\n\
-If the argument is an immutable buffer (most likely a string) then a copy\n\
-of the buffer is passed to the operating system and the return value is a\n\
-string of the same length containing whatever the operating system put in\n\
-the buffer. The length of the arg buffer in this case is not allowed to\n\
-exceed 1024 bytes.\n\
-\n\
-If the arg given is an integer or if none is specified, the result value is\n\
-an integer corresponding to the return value of the ioctl call in the C\n\
-code.");
-
-
-/* flock(fd, operation) */
+/*[clinic input]
+fcntl.flock
+
+ fd: object(type='int', converter='conv_descriptor')
+ operation as code: int
+ /
+
+Perform the lock operation `operation` on file descriptor `fd`.
+
+See the Unix manual page for flock(2) for details (On some systems, this
+function is emulated using fcntl()).
+[clinic start generated code]*/
static PyObject *
-fcntl_flock(PyObject *self, PyObject *args)
+fcntl_flock_impl(PyModuleDef *module, int fd, int code)
+/*[clinic end generated code: output=c9035133a7dbfc96 input=b70a0a41ca22a8a0]*/
{
- int fd;
- int code;
int ret;
- if (!PyArg_ParseTuple(args, "O&i:flock",
- conv_descriptor, &fd, &code))
- return NULL;
-
#ifdef HAVE_FLOCK
Py_BEGIN_ALLOW_THREADS
ret = flock(fd, code);
@@ -299,29 +319,50 @@ fcntl_flock(PyObject *self, PyObject *args)
PyErr_SetFromErrno(PyExc_IOError);
return NULL;
}
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
-PyDoc_STRVAR(flock_doc,
-"flock(fd, operation)\n\
-\n\
-Perform the lock operation op on file descriptor fd. See the Unix \n\
-manual page for flock(2) for details. (On some systems, this function is\n\
-emulated using fcntl().)");
+/*[clinic input]
+fcntl.lockf
+
+ fd: object(type='int', converter='conv_descriptor')
+ cmd as code: int
+ len as lenobj: object(c_default='NULL') = 0
+ start as startobj: object(c_default='NULL') = 0
+ whence: int = 0
+ /
+
+A wrapper around the fcntl() locking calls.
+
+`fd` is the file descriptor of the file to lock or unlock, and operation is one
+of the following values:
+
+ LOCK_UN - unlock
+ LOCK_SH - acquire a shared lock
+ LOCK_EX - acquire an exclusive lock
+
+When operation is LOCK_SH or LOCK_EX, it can also be bitwise ORed with
+LOCK_NB to avoid blocking on lock acquisition. If LOCK_NB is used and the
+lock cannot be acquired, an OSError will be raised and the exception will
+have an errno attribute set to EACCES or EAGAIN (depending on the operating
+system -- for portability, check for either value).
+
+`len` is the number of bytes to lock, with the default meaning to lock to
+EOF. `start` is the byte offset, relative to `whence`, to that the lock
+starts. `whence` is as with fileobj.seek(), specifically:
+
+ 0 - relative to the start of the file (SEEK_SET)
+ 1 - relative to the current buffer position (SEEK_CUR)
+ 2 - relative to the end of the file (SEEK_END)
+[clinic start generated code]*/
-/* lockf(fd, operation) */
static PyObject *
-fcntl_lockf(PyObject *self, PyObject *args)
+fcntl_lockf_impl(PyModuleDef *module, int fd, int code, PyObject *lenobj,
+ PyObject *startobj, int whence)
+/*[clinic end generated code: output=31af35eba08b9af7 input=3a5dc01b04371f1a]*/
{
- int fd, code, ret, whence = 0;
- PyObject *lenobj = NULL, *startobj = NULL;
-
- if (!PyArg_ParseTuple(args, "O&i|OOi:lockf",
- conv_descriptor, &fd, &code,
- &lenobj, &startobj, &whence))
- return NULL;
+ int ret;
#ifndef LOCK_SH
#define LOCK_SH 1 /* shared lock */
@@ -374,43 +415,17 @@ fcntl_lockf(PyObject *self, PyObject *args)
PyErr_SetFromErrno(PyExc_IOError);
return NULL;
}
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
-PyDoc_STRVAR(lockf_doc,
-"lockf (fd, operation, length=0, start=0, whence=0)\n\
-\n\
-This is essentially a wrapper around the fcntl() locking calls. fd is the\n\
-file descriptor of the file to lock or unlock, and operation is one of the\n\
-following values:\n\
-\n\
- LOCK_UN - unlock\n\
- LOCK_SH - acquire a shared lock\n\
- LOCK_EX - acquire an exclusive lock\n\
-\n\
-When operation is LOCK_SH or LOCK_EX, it can also be bitwise ORed with\n\
-LOCK_NB to avoid blocking on lock acquisition. If LOCK_NB is used and the\n\
-lock cannot be acquired, an IOError will be raised and the exception will\n\
-have an errno attribute set to EACCES or EAGAIN (depending on the operating\n\
-system -- for portability, check for either value).\n\
-\n\
-length is the number of bytes to lock, with the default meaning to lock to\n\
-EOF. start is the byte offset, relative to whence, to that the lock\n\
-starts. whence is as with fileobj.seek(), specifically:\n\
-\n\
- 0 - relative to the start of the file (SEEK_SET)\n\
- 1 - relative to the current buffer position (SEEK_CUR)\n\
- 2 - relative to the end of the file (SEEK_END)");
-
/* List of functions */
static PyMethodDef fcntl_methods[] = {
- {"fcntl", fcntl_fcntl, METH_VARARGS, fcntl_doc},
- {"ioctl", fcntl_ioctl, METH_VARARGS, ioctl_doc},
- {"flock", fcntl_flock, METH_VARARGS, flock_doc},
- {"lockf", fcntl_lockf, METH_VARARGS, lockf_doc},
- {NULL, NULL} /* sentinel */
+ FCNTL_FCNTL_METHODDEF
+ FCNTL_IOCTL_METHODDEF
+ FCNTL_FLOCK_METHODDEF
+ FCNTL_LOCKF_METHODDEF
+ {NULL, NULL} /* sentinel */
};
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c
index 9bb3666e1a..cb7222db89 100644
--- a/Modules/gcmodule.c
+++ b/Modules/gcmodule.c
@@ -25,6 +25,7 @@
#include "Python.h"
#include "frameobject.h" /* for PyFrame_ClearFreeList */
+#include "pytime.h" /* for _PyTime_GetMonotonicClock() */
/* Get an object's GC head */
#define AS_GC(o) ((PyGC_Head *)(o)-1)
@@ -166,7 +167,6 @@ static Py_ssize_t long_lived_pending = 0;
DEBUG_UNCOLLECTABLE | \
DEBUG_SAVEALL
static int debug;
-static PyObject *tmod = NULL;
/* Running stats per generation */
struct gc_generation_stats {
@@ -894,26 +894,6 @@ clear_freelists(void)
(void)PySet_ClearFreeList();
}
-static double
-get_time(void)
-{
- double result = 0;
- if (tmod != NULL) {
- _Py_IDENTIFIER(time);
-
- PyObject *f = _PyObject_CallMethodId(tmod, &PyId_time, NULL);
- if (f == NULL) {
- PyErr_Clear();
- }
- else {
- if (PyFloat_Check(f))
- result = PyFloat_AsDouble(f);
- Py_DECREF(f);
- }
- }
- return result;
-}
-
/* This is the main function. Read this to understand how the
* collection process works. */
static Py_ssize_t
@@ -928,7 +908,8 @@ collect(int generation, Py_ssize_t *n_collected, Py_ssize_t *n_uncollectable,
PyGC_Head unreachable; /* non-problematic unreachable trash */
PyGC_Head finalizers; /* objects with, & reachable from, __del__ */
PyGC_Head *gc;
- double t1 = 0.0;
+ _PyTime_t t1 = 0; /* initialize to prevent a compiler warning */
+
struct gc_generation_stats *stats = &generation_stats[generation];
if (debug & DEBUG_STATS) {
@@ -936,9 +917,10 @@ collect(int generation, Py_ssize_t *n_collected, Py_ssize_t *n_uncollectable,
generation);
PySys_WriteStderr("gc: objects in each generation:");
for (i = 0; i < NUM_GENERATIONS; i++)
- PySys_WriteStderr(" %" PY_FORMAT_SIZE_T "d",
+ PySys_FormatStderr(" %zd",
gc_list_size(GEN_HEAD(i)));
- t1 = get_time();
+ t1 = _PyTime_GetMonotonicClock();
+
PySys_WriteStderr("\n");
}
@@ -1042,19 +1024,16 @@ collect(int generation, Py_ssize_t *n_collected, Py_ssize_t *n_uncollectable,
debug_cycle("uncollectable", FROM_GC(gc));
}
if (debug & DEBUG_STATS) {
- double t2 = get_time();
+ _PyTime_t t2 = _PyTime_GetMonotonicClock();
+
if (m == 0 && n == 0)
PySys_WriteStderr("gc: done");
else
- PySys_WriteStderr(
- "gc: done, "
- "%" PY_FORMAT_SIZE_T "d unreachable, "
- "%" PY_FORMAT_SIZE_T "d uncollectable",
+ PySys_FormatStderr(
+ "gc: done, %zd unreachable, %zd uncollectable",
n+m, n);
- if (t1 && t2) {
- PySys_WriteStderr(", %.4fs elapsed", t2-t1);
- }
- PySys_WriteStderr(".\n");
+ PySys_WriteStderr(", %.4fs elapsed\n",
+ _PyTime_AsSecondsDouble(t2 - t1));
}
/* Append instances in the uncollectable set to a Python
@@ -1581,18 +1560,6 @@ PyInit_gc(void)
if (PyModule_AddObject(m, "callbacks", callbacks) < 0)
return NULL;
- /* Importing can't be done in collect() because collect()
- * can be called via PyGC_Collect() in Py_Finalize().
- * This wouldn't be a problem, except that <initialized> is
- * reset to 0 before calling collect which trips up
- * the import and triggers an assertion.
- */
- if (tmod == NULL) {
- tmod = PyImport_ImportModuleNoBlock("time");
- if (tmod == NULL)
- PyErr_Clear();
- }
-
#define ADD_INT(NAME) if (PyModule_AddIntConstant(m, #NAME, NAME) < 0) return NULL
ADD_INT(DEBUG_STATS);
ADD_INT(DEBUG_COLLECTABLE);
@@ -1681,7 +1648,6 @@ void
_PyGC_Fini(void)
{
Py_CLEAR(callbacks);
- Py_CLEAR(tmod);
}
/* for debugging */
@@ -1715,15 +1681,19 @@ PyObject_GC_UnTrack(void *op)
_PyObject_GC_UNTRACK(op);
}
-PyObject *
-_PyObject_GC_Malloc(size_t basicsize)
+static PyObject *
+_PyObject_GC_Alloc(int use_calloc, size_t basicsize)
{
PyObject *op;
PyGC_Head *g;
+ size_t size;
if (basicsize > PY_SSIZE_T_MAX - sizeof(PyGC_Head))
return PyErr_NoMemory();
- g = (PyGC_Head *)PyObject_MALLOC(
- sizeof(PyGC_Head) + basicsize);
+ size = sizeof(PyGC_Head) + basicsize;
+ if (use_calloc)
+ g = (PyGC_Head *)PyObject_Calloc(1, size);
+ else
+ g = (PyGC_Head *)PyObject_Malloc(size);
if (g == NULL)
return PyErr_NoMemory();
g->gc.gc_refs = 0;
@@ -1743,6 +1713,18 @@ _PyObject_GC_Malloc(size_t basicsize)
}
PyObject *
+_PyObject_GC_Malloc(size_t basicsize)
+{
+ return _PyObject_GC_Alloc(0, basicsize);
+}
+
+PyObject *
+_PyObject_GC_Calloc(size_t basicsize)
+{
+ return _PyObject_GC_Alloc(1, basicsize);
+}
+
+PyObject *
_PyObject_GC_New(PyTypeObject *tp)
{
PyObject *op = _PyObject_GC_Malloc(_PyObject_SIZE(tp));
diff --git a/Modules/getaddrinfo.c b/Modules/getaddrinfo.c
index e2a2edf82d..d8167eaf7c 100644
--- a/Modules/getaddrinfo.c
+++ b/Modules/getaddrinfo.c
@@ -15,14 +15,14 @@
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
- * GAI_ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
- * FOR GAI_ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON GAI_ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN GAI_ANY WAY
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
diff --git a/Modules/getpath.c b/Modules/getpath.c
index 13e3817260..18deb60dfa 100644
--- a/Modules/getpath.c
+++ b/Modules/getpath.c
@@ -101,25 +101,8 @@
#endif
-#ifndef VERSION
-#define VERSION "2.1"
-#endif
-
-#ifndef VPATH
-#define VPATH "."
-#endif
-
-#ifndef PREFIX
-# define PREFIX "/usr/local"
-#endif
-
-#ifndef EXEC_PREFIX
-#define EXEC_PREFIX PREFIX
-#endif
-
-#ifndef PYTHONPATH
-#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
+#if !defined(PREFIX) || !defined(EXEC_PREFIX) || !defined(VERSION) || !defined(VPATH)
+#error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined"
#endif
#ifndef LANDMARK
@@ -131,6 +114,23 @@ static wchar_t exec_prefix[MAXPATHLEN+1];
static wchar_t progpath[MAXPATHLEN+1];
static wchar_t *module_search_path = NULL;
+/* Get file status. Encode the path to the locale encoding. */
+
+static int
+_Py_wstat(const wchar_t* path, struct stat *buf)
+{
+ int err;
+ char *fname;
+ fname = Py_EncodeLocale(path, NULL);
+ if (fname == NULL) {
+ errno = EINVAL;
+ return -1;
+ }
+ err = stat(fname, buf);
+ PyMem_Free(fname);
+ return err;
+}
+
static void
reduce(wchar_t *dir)
{
@@ -153,14 +153,14 @@ isfile(wchar_t *filename) /* Is file, not directory */
static int
-ismodule(wchar_t *filename) /* Is module -- check for .pyc/.pyo too */
+ismodule(wchar_t *filename) /* Is module -- check for .pyc too */
{
if (isfile(filename))
return 1;
/* Check for the compiled version of prefix. */
if (wcslen(filename) < MAXPATHLEN) {
- wcscat(filename, Py_OptimizeFlag ? L"o" : L"c");
+ wcscat(filename, L"c");
if (isfile(filename))
return 1;
}
@@ -336,7 +336,7 @@ search_for_prefix(wchar_t *argv0_path, wchar_t *home, wchar_t *_prefix,
joinpath(prefix, L"Modules/Setup");
if (isfile(prefix)) {
/* Check VPATH to see if argv0_path is in the build directory. */
- vpath = _Py_char2wchar(VPATH, NULL);
+ vpath = Py_DecodeLocale(VPATH, NULL);
if (vpath != NULL) {
wcsncpy(prefix, argv0_path, MAXPATHLEN);
prefix[MAXPATHLEN] = L'\0';
@@ -491,10 +491,10 @@ calculate_path(void)
wchar_t *_pythonpath, *_prefix, *_exec_prefix;
wchar_t *lib_python;
- _pythonpath = _Py_char2wchar(PYTHONPATH, NULL);
- _prefix = _Py_char2wchar(PREFIX, NULL);
- _exec_prefix = _Py_char2wchar(EXEC_PREFIX, NULL);
- lib_python = _Py_char2wchar("lib/python" VERSION, NULL);
+ _pythonpath = Py_DecodeLocale(PYTHONPATH, NULL);
+ _prefix = Py_DecodeLocale(PREFIX, NULL);
+ _exec_prefix = Py_DecodeLocale(EXEC_PREFIX, NULL);
+ lib_python = Py_DecodeLocale("lib/python" VERSION, NULL);
if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) {
Py_FatalError(
@@ -503,7 +503,7 @@ calculate_path(void)
}
if (_path) {
- path_buffer = _Py_char2wchar(_path, NULL);
+ path_buffer = Py_DecodeLocale(_path, NULL);
path = path_buffer;
}
@@ -584,7 +584,7 @@ calculate_path(void)
** be running the interpreter in the build directory, so we use the
** build-directory-specific logic to find Lib and such.
*/
- wchar_t* wbuf = _Py_char2wchar(modPath, NULL);
+ wchar_t* wbuf = Py_DecodeLocale(modPath, NULL);
if (wbuf == NULL) {
Py_FatalError("Cannot decode framework location");
}
@@ -709,7 +709,7 @@ calculate_path(void)
if (_rtpypath && _rtpypath[0] != '\0') {
size_t rtpypath_len;
- rtpypath = _Py_char2wchar(_rtpypath, &rtpypath_len);
+ rtpypath = Py_DecodeLocale(_rtpypath, &rtpypath_len);
if (rtpypath != NULL)
bufsz += rtpypath_len + 1;
}
@@ -874,4 +874,3 @@ Py_GetProgramFullPath(void)
#ifdef __cplusplus
}
#endif
-
diff --git a/Modules/grpmodule.c b/Modules/grpmodule.c
index da78253ccb..403e434697 100644
--- a/Modules/grpmodule.c
+++ b/Modules/grpmodule.c
@@ -6,6 +6,12 @@
#include <grp.h>
+#include "clinic/grpmodule.c.h"
+/*[clinic input]
+module grp
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=cade63f2ed1bd9f8]*/
+
static PyStructSequence_Field struct_group_type_fields[] = {
{"gr_name", "group name"},
{"gr_passwd", "password"},
@@ -76,14 +82,25 @@ mkgrent(struct group *p)
return v;
}
+/*[clinic input]
+grp.getgrgid
+
+ id: object
+
+Return the group database entry for the given numeric group ID.
+
+If id is not valid, raise KeyError.
+[clinic start generated code]*/
+
static PyObject *
-grp_getgrgid(PyObject *self, PyObject *pyo_id)
+grp_getgrgid_impl(PyModuleDef *module, PyObject *id)
+/*[clinic end generated code: output=8a11f5fdeb8c78a0 input=15fa0e2ccf5cda25]*/
{
PyObject *py_int_id;
gid_t gid;
struct group *p;
- py_int_id = PyNumber_Long(pyo_id);
+ py_int_id = PyNumber_Long(id);
if (!py_int_id)
return NULL;
if (!_Py_Gid_Converter(py_int_id, &gid)) {
@@ -103,22 +120,31 @@ grp_getgrgid(PyObject *self, PyObject *pyo_id)
return mkgrent(p);
}
+/*[clinic input]
+grp.getgrnam
+
+ name: unicode
+
+Return the group database entry for the given group name.
+
+If name is not valid, raise KeyError.
+[clinic start generated code]*/
+
static PyObject *
-grp_getgrnam(PyObject *self, PyObject *args)
+grp_getgrnam_impl(PyModuleDef *module, PyObject *name)
+/*[clinic end generated code: output=cd47511f4854da8e input=08ded29affa3c863]*/
{
- char *name;
+ char *name_chars;
struct group *p;
- PyObject *arg, *bytes, *retval = NULL;
+ PyObject *bytes, *retval = NULL;
- if (!PyArg_ParseTuple(args, "U:getgrnam", &arg))
- return NULL;
- if ((bytes = PyUnicode_EncodeFSDefault(arg)) == NULL)
+ if ((bytes = PyUnicode_EncodeFSDefault(name)) == NULL)
return NULL;
- if (PyBytes_AsStringAndSize(bytes, &name, NULL) == -1)
+ if (PyBytes_AsStringAndSize(bytes, &name_chars, NULL) == -1)
goto out;
- if ((p = getgrnam(name)) == NULL) {
- PyErr_Format(PyExc_KeyError, "getgrnam(): name not found: %s", name);
+ if ((p = getgrnam(name_chars)) == NULL) {
+ PyErr_Format(PyExc_KeyError, "getgrnam(): name not found: %s", name_chars);
goto out;
}
retval = mkgrent(p);
@@ -127,8 +153,18 @@ out:
return retval;
}
+/*[clinic input]
+grp.getgrall
+
+Return a list of all available group entries, in arbitrary order.
+
+An entry whose name starts with '+' or '-' represents an instruction
+to use YP/NIS and may not be accessible via getgrnam or getgrgid.
+[clinic start generated code]*/
+
static PyObject *
-grp_getgrall(PyObject *self, PyObject *ignore)
+grp_getgrall_impl(PyModuleDef *module)
+/*[clinic end generated code: output=add9037a20c202de input=d7df76c825c367df]*/
{
PyObject *d;
struct group *p;
@@ -151,20 +187,10 @@ grp_getgrall(PyObject *self, PyObject *ignore)
}
static PyMethodDef grp_methods[] = {
- {"getgrgid", grp_getgrgid, METH_O,
- "getgrgid(id) -> (gr_name,gr_passwd,gr_gid,gr_mem)\n\
-Return the group database entry for the given numeric group ID. If\n\
-id is not valid, raise KeyError."},
- {"getgrnam", grp_getgrnam, METH_VARARGS,
- "getgrnam(name) -> (gr_name,gr_passwd,gr_gid,gr_mem)\n\
-Return the group database entry for the given group name. If\n\
-name is not valid, raise KeyError."},
- {"getgrall", grp_getgrall, METH_NOARGS,
- "getgrall() -> list of tuples\n\
-Return a list of all available group entries, in arbitrary order.\n\
-An entry whose name starts with '+' or '-' represents an instruction\n\
-to use YP/NIS and may not be accessible via getgrnam or getgrgid."},
- {NULL, NULL} /* sentinel */
+ GRP_GETGRGID_METHODDEF
+ GRP_GETGRNAM_METHODDEF
+ GRP_GETGRALL_METHODDEF
+ {NULL, NULL}
};
PyDoc_STRVAR(grp__doc__,
diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c
index 55d88a8c9f..409922a643 100644
--- a/Modules/itertoolsmodule.c
+++ b/Modules/itertoolsmodule.c
@@ -157,15 +157,12 @@ groupby_setstate(groupbyobject *lz, PyObject *state)
PyObject *currkey, *currvalue, *tgtkey;
if (!PyArg_ParseTuple(state, "OOO", &currkey, &currvalue, &tgtkey))
return NULL;
- Py_CLEAR(lz->currkey);
- lz->currkey = currkey;
- Py_INCREF(lz->currkey);
- Py_CLEAR(lz->currvalue);
- lz->currvalue = currvalue;
- Py_INCREF(lz->currvalue);
- Py_CLEAR(lz->tgtkey);
- lz->tgtkey = tgtkey;
- Py_INCREF(lz->tgtkey);
+ Py_INCREF(currkey);
+ Py_XSETREF(lz->currkey, currkey);
+ Py_INCREF(currvalue);
+ Py_XSETREF(lz->currvalue, currvalue);
+ Py_INCREF(tgtkey);
+ Py_XSETREF(lz->tgtkey, tgtkey);
Py_RETURN_NONE;
}
@@ -634,8 +631,7 @@ tee_next(teeobject *to)
link = teedataobject_jumplink(to->dataobj);
if (link == NULL)
return NULL;
- Py_DECREF(to->dataobj);
- to->dataobj = (teedataobject *)link;
+ Py_SETREF(to->dataobj, (teedataobject *)link);
to->index = 0;
}
value = teedataobject_getitem(to->dataobj, to->index);
@@ -746,9 +742,8 @@ tee_setstate(teeobject *to, PyObject *state)
PyErr_SetString(PyExc_ValueError, "Index out of range");
return NULL;
}
- Py_CLEAR(to->dataobj);
- to->dataobj = tdo;
- Py_INCREF(to->dataobj);
+ Py_INCREF(tdo);
+ Py_XSETREF(to->dataobj, tdo);
to->index = index;
Py_RETURN_NONE;
}
@@ -973,9 +968,8 @@ cycle_setstate(cycleobject *lz, PyObject *state)
int firstpass;
if (!PyArg_ParseTuple(state, "Oi", &saved, &firstpass))
return NULL;
- Py_CLEAR(lz->saved);
- lz->saved = saved;
- Py_XINCREF(lz->saved);
+ Py_XINCREF(saved);
+ Py_XSETREF(lz->saved, saved);
lz->firstpass = firstpass != 0;
Py_RETURN_NONE;
}
@@ -1900,12 +1894,10 @@ chain_setstate(chainobject *lz, PyObject *state)
if (! PyArg_ParseTuple(state, "O|O", &source, &active))
return NULL;
- Py_CLEAR(lz->source);
- lz->source = source;
- Py_INCREF(lz->source);
- Py_CLEAR(lz->active);
- lz->active = active;
- Py_XINCREF(lz->active);
+ Py_INCREF(source);
+ Py_XSETREF(lz->source, source);
+ Py_XINCREF(active);
+ Py_XSETREF(lz->active, active);
Py_RETURN_NONE;
}
@@ -2087,7 +2079,7 @@ product_sizeof(productobject *lz, void *unused)
{
Py_ssize_t res;
- res = sizeof(productobject);
+ res = _PyObject_SIZE(Py_TYPE(lz));
res += PyTuple_GET_SIZE(lz->pools) * sizeof(Py_ssize_t);
return PyLong_FromSsize_t(res);
}
@@ -2261,8 +2253,7 @@ product_setstate(productobject *lz, PyObject *state)
Py_INCREF(element);
PyTuple_SET_ITEM(result, i, element);
}
- Py_CLEAR(lz->result);
- lz->result = result;
+ Py_XSETREF(lz->result, result);
Py_RETURN_NONE;
}
@@ -2418,7 +2409,7 @@ combinations_sizeof(combinationsobject *co, void *unused)
{
Py_ssize_t res;
- res = sizeof(combinationsobject);
+ res = _PyObject_SIZE(Py_TYPE(co));
res += co->r * sizeof(Py_ssize_t);
return PyLong_FromSsize_t(res);
}
@@ -2584,8 +2575,7 @@ combinations_setstate(combinationsobject *lz, PyObject *state)
PyTuple_SET_ITEM(result, i, element);
}
- Py_CLEAR(lz->result);
- lz->result = result;
+ Py_XSETREF(lz->result, result);
Py_RETURN_NONE;
}
@@ -2759,7 +2749,7 @@ cwr_sizeof(cwrobject *co, void *unused)
{
Py_ssize_t res;
- res = sizeof(cwrobject);
+ res = _PyObject_SIZE(Py_TYPE(co));
res += co->r * sizeof(Py_ssize_t);
return PyLong_FromSsize_t(res);
}
@@ -2915,8 +2905,7 @@ cwr_setstate(cwrobject *lz, PyObject *state)
Py_INCREF(element);
PyTuple_SET_ITEM(result, i, element);
}
- Py_CLEAR(lz->result);
- lz->result = result;
+ Py_XSETREF(lz->result, result);
Py_RETURN_NONE;
}
@@ -3108,7 +3097,7 @@ permutations_sizeof(permutationsobject *po, void *unused)
{
Py_ssize_t res;
- res = sizeof(permutationsobject);
+ res = _PyObject_SIZE(Py_TYPE(po));
res += PyTuple_GET_SIZE(po->pool) * sizeof(Py_ssize_t);
res += po->r * sizeof(Py_ssize_t);
return PyLong_FromSsize_t(res);
@@ -3309,8 +3298,7 @@ permutations_setstate(permutationsobject *po, PyObject *state)
Py_INCREF(element);
PyTuple_SET_ITEM(result, i, element);
}
- Py_CLEAR(po->result);
- po->result = result;
+ Py_XSETREF(po->result, result);
Py_RETURN_NONE;
}
@@ -3472,6 +3460,23 @@ accumulate_next(accumulateobject *lz)
static PyObject *
accumulate_reduce(accumulateobject *lz)
{
+ if (lz->total == Py_None) {
+ PyObject *it;
+
+ if (PyType_Ready(&chain_type) < 0)
+ return NULL;
+ if (PyType_Ready(&islice_type) < 0)
+ return NULL;
+ it = PyObject_CallFunction((PyObject *)&chain_type, "(O)O",
+ lz->total, lz->it);
+ if (it == NULL)
+ return NULL;
+ it = PyObject_CallFunction((PyObject *)Py_TYPE(lz), "NO",
+ it, lz->binop ? lz->binop : Py_None);
+ if (it == NULL)
+ return NULL;
+ return Py_BuildValue("O(NiO)", &islice_type, it, 1, Py_None);
+ }
return Py_BuildValue("O(OO)O", Py_TYPE(lz),
lz->it, lz->binop?lz->binop:Py_None,
lz->total?lz->total:Py_None);
@@ -3480,9 +3485,8 @@ accumulate_reduce(accumulateobject *lz)
static PyObject *
accumulate_setstate(accumulateobject *lz, PyObject *state)
{
- Py_CLEAR(lz->total);
- lz->total = state;
- Py_INCREF(lz->total);
+ Py_INCREF(state);
+ Py_XSETREF(lz->total, state);
Py_RETURN_NONE;
}
@@ -3882,7 +3886,7 @@ typedef struct {
fast_mode: when cnt an integer < PY_SSIZE_T_MAX and no step is specified.
- assert(cnt != PY_SSIZE_T_MAX && long_cnt == NULL && long_step==PyInt(1));
+ assert(cnt != PY_SSIZE_T_MAX && long_cnt == NULL && long_step==PyLong(1));
Advances with: cnt += 1
When count hits Y_SSIZE_T_MAX, switch to slow_mode.
@@ -4463,9 +4467,8 @@ zip_longest_reduce(ziplongestobject *lz)
static PyObject *
zip_longest_setstate(ziplongestobject *lz, PyObject *state)
{
- Py_CLEAR(lz->fillvalue);
- lz->fillvalue = state;
- Py_INCREF(lz->fillvalue);
+ Py_INCREF(state);
+ Py_XSETREF(lz->fillvalue, state);
Py_RETURN_NONE;
}
@@ -4480,7 +4483,7 @@ static PyMethodDef zip_longest_methods[] = {
PyDoc_STRVAR(zip_longest_doc,
"zip_longest(iter1 [,iter2 [...]], [fillvalue=None]) --> zip_longest object\n\
\n\
-Return an zip_longest object whose .__next__() method returns a tuple where\n\
+Return a zip_longest object whose .__next__() method returns a tuple where\n\
the i-th element comes from the i-th iterable argument. The .__next__()\n\
method continues until the longest iterable in the argument sequence\n\
is exhausted and then it raises StopIteration. When the shorter iterables\n\
diff --git a/Modules/ld_so_aix.in b/Modules/ld_so_aix.in
index 86a9f7e15e..add6b3efab 100644
--- a/Modules/ld_so_aix.in
+++ b/Modules/ld_so_aix.in
@@ -5,14 +5,14 @@
# TYPE: executable, uses makexp_aix
# SYSTEM: AIX
#
-# DESCRIPTION: Creates a shareable .o from a set of pre-compiled
+# DESCRIPTION: Creates a shareable .o from a set of pre-compiled
# (unshared) .o files
#
# USAGE: ld_so_aix [CC] [arguments]
#
# ARGUMENTS: Same as for "ld". The following arguments are processed
# or supplied by this script (those marked with an asterisk
-# can be overriden from command line):
+# can be overridden from command line):
#
# Argument Default value
# (*) -o [OutputFileName] -o shr.o
@@ -46,7 +46,7 @@
# 4. Uncommenting the "echo" lines gives detailed output
# about the commands executed in the script.
#
-#
+#
# HISTORY: Oct-1996 -- Support added for multiple .o files --
# -- and optional arguments processing. --
# Chris Myers (myers@tc.cornell.edu), Keith Kwok
@@ -85,7 +85,7 @@ if test ! -n "$*"; then
fi
# Default import file for Python
-# Can be overriden by providing a -bI: argument.
+# Can be overridden by providing a -bI: argument.
impfile="./python.exp"
# Parse arguments
@@ -132,7 +132,7 @@ do
done
if test "$objfile" = "libpython@VERSION@@ABIFLAGS@.so"; then
- ldsocoremode="true"
+ ldsocoremode="true"
fi
if test -z "$objs"; then
@@ -156,7 +156,7 @@ if test -z "$expfile"; then
fi
# Default entry symbol for Python modules = init[modulename]
-# Can be overriden by providing a -e argument.
+# Can be overridden by providing a -e argument.
if test -z "$entry"; then
entry=PyInit_`echo $filename | sed "s/module.*//"`
fi
diff --git a/Modules/main.c b/Modules/main.c
index 87a21d7c30..e4c955e011 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -9,7 +9,6 @@
#include <windows.h>
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
-#define PATH_MAX MAXPATHLEN
#endif
#endif
@@ -86,11 +85,11 @@ file : program read from script file\n\
arg ...: arguments passed to program in sys.argv[1:]\n\n\
Other environment variables:\n\
PYTHONSTARTUP: file executed on interactive startup (no default)\n\
-PYTHONPATH : '%c'-separated list of directories prefixed to the\n\
+PYTHONPATH : '%lc'-separated list of directories prefixed to the\n\
default module search path. The result is sys.path.\n\
";
static char *usage_5 =
-"PYTHONHOME : alternate <prefix> directory (or <prefix>%c<exec_prefix>).\n"
+"PYTHONHOME : alternate <prefix> directory (or <prefix>%lc<exec_prefix>).\n"
" The default module search path uses %s.\n"
"PYTHONCASEOK : ignore case in 'import' statements (Windows).\n"
"PYTHONIOENCODING: Encoding[:errors] used for stdin/stdout/stderr.\n"
@@ -115,8 +114,8 @@ usage(int exitcode, wchar_t* program)
fputs(usage_1, f);
fputs(usage_2, f);
fputs(usage_3, f);
- fprintf(f, usage_4, DELIM);
- fprintf(f, usage_5, DELIM, PYTHONHOMEHELP);
+ fprintf(f, usage_4, (wint_t)DELIM);
+ fprintf(f, usage_5, (wint_t)DELIM, PYTHONHOMEHELP);
fputs(usage_6, f);
}
return exitcode;
@@ -343,6 +342,8 @@ Py_Main(int argc, wchar_t **argv)
int version = 0;
int saw_unbuffered_flag = 0;
PyCompilerFlags cf;
+ PyObject *warning_option = NULL;
+ PyObject *warning_options = NULL;
cf.cf_flags = 0;
@@ -465,7 +466,15 @@ Py_Main(int argc, wchar_t **argv)
break;
case 'W':
- PySys_AddWarnOption(_PyOS_optarg);
+ if (warning_options == NULL)
+ warning_options = PyList_New(0);
+ if (warning_options == NULL)
+ Py_FatalError("failure in handling of -W argument");
+ warning_option = PyUnicode_FromWideChar(_PyOS_optarg, -1);
+ if (warning_option == NULL)
+ Py_FatalError("failure in handling of -W argument");
+ PyList_Append(warning_options, warning_option);
+ Py_DECREF(warning_option);
break;
case 'X':
@@ -511,16 +520,16 @@ Py_Main(int argc, wchar_t **argv)
#ifdef MS_WINDOWS
if (!Py_IgnoreEnvironmentFlag && (wp = _wgetenv(L"PYTHONWARNINGS")) &&
*wp != L'\0') {
- wchar_t *buf, *warning;
+ wchar_t *buf, *warning, *context = NULL;
buf = (wchar_t *)PyMem_RawMalloc((wcslen(wp) + 1) * sizeof(wchar_t));
if (buf == NULL)
Py_FatalError(
"not enough memory to copy PYTHONWARNINGS");
wcscpy(buf, wp);
- for (warning = wcstok(buf, L",");
+ for (warning = wcstok_s(buf, L",", &context);
warning != NULL;
- warning = wcstok(NULL, L",")) {
+ warning = wcstok_s(NULL, L",", &context)) {
PySys_AddWarnOption(warning);
}
PyMem_RawFree(buf);
@@ -559,6 +568,12 @@ Py_Main(int argc, wchar_t **argv)
PyMem_RawFree(buf);
}
#endif
+ if (warning_options != NULL) {
+ Py_ssize_t i;
+ for (i = 0; i < PyList_GET_SIZE(warning_options); i++) {
+ PySys_AddWarnOptionUnicode(PyList_GET_ITEM(warning_options, i));
+ }
+ }
if (command == NULL && module == NULL && _PyOS_optind < argc &&
wcscmp(argv[_PyOS_optind], L"-") != 0)
@@ -631,7 +646,7 @@ Py_Main(int argc, wchar_t **argv)
/* Used by Mac/Tools/pythonw.c to forward
* the argv0 of the stub executable
*/
- wchar_t* wbuf = _Py_char2wchar(pyvenv_launcher, NULL);
+ wchar_t* wbuf = Py_DecodeLocale(pyvenv_launcher, NULL);
if (wbuf == NULL) {
Py_FatalError("Cannot decode __PYVENV_LAUNCHER__");
@@ -652,6 +667,7 @@ Py_Main(int argc, wchar_t **argv)
Py_SetProgramName(argv[0]);
#endif
Py_Initialize();
+ Py_XDECREF(warning_options);
if (!Py_QuietFlag && (Py_VerboseFlag ||
(command == NULL && filename == NULL &&
@@ -713,7 +729,7 @@ Py_Main(int argc, wchar_t **argv)
char *cfilename_buffer;
const char *cfilename;
int err = errno;
- cfilename_buffer = _Py_wchar2char(filename, NULL);
+ cfilename_buffer = Py_EncodeLocale(filename, NULL);
if (cfilename_buffer != NULL)
cfilename = cfilename_buffer;
else
@@ -736,11 +752,12 @@ Py_Main(int argc, wchar_t **argv)
}
}
{
- /* XXX: does this work on Win/Win64? (see posix_fstat) */
- struct stat sb;
- if (fstat(fileno(fp), &sb) == 0 &&
+ struct _Py_stat_struct sb;
+ if (_Py_fstat_noraise(fileno(fp), &sb) == 0 &&
S_ISDIR(sb.st_mode)) {
- fprintf(stderr, "%ls: '%ls' is a directory, cannot continue\n", argv[0], filename);
+ fprintf(stderr,
+ "%ls: '%ls' is a directory, cannot continue\n",
+ argv[0], filename);
fclose(fp);
return 1;
}
diff --git a/Modules/makesetup b/Modules/makesetup
index 8b5cc28bba..90db42e4b2 100755
--- a/Modules/makesetup
+++ b/Modules/makesetup
@@ -266,7 +266,7 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' |
*) sed -e "
1i$NL/* Generated automatically from $config by makesetup. */
/MARKER 1/i$NL$EXTDECLS
-
+
/MARKER 2/i$NL$INITBITS
" $config >config.c
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c
index 243e2a333b..7ebf8e84c2 100644
--- a/Modules/mathmodule.c
+++ b/Modules/mathmodule.c
@@ -223,6 +223,35 @@ lanczos_sum(double x)
return num/den;
}
+/* Constant for +infinity, generated in the same way as float('inf'). */
+
+static double
+m_inf(void)
+{
+#ifndef PY_NO_SHORT_FLOAT_REPR
+ return _Py_dg_infinity(0);
+#else
+ return Py_HUGE_VAL;
+#endif
+}
+
+/* Constant nan value, generated in the same way as float('nan'). */
+/* We don't currently assume that Py_NAN is defined everywhere. */
+
+#if !defined(PY_NO_SHORT_FLOAT_REPR) || defined(Py_NAN)
+
+static double
+m_nan(void)
+{
+#ifndef PY_NO_SHORT_FLOAT_REPR
+ return _Py_dg_stdnan(0);
+#else
+ return Py_NAN;
+#endif
+}
+
+#endif
+
static double
m_tgamma(double x)
{
@@ -371,9 +400,8 @@ m_lgamma(double x)
Implementations of the error function erf(x) and the complementary error
function erfc(x).
- Method: following 'Numerical Recipes' by Flannery, Press et. al. (2nd ed.,
- Cambridge University Press), we use a series approximation for erf for
- small x, and a continued fraction approximation for erfc(x) for larger x;
+ Method: we use a series approximation for erf for small x, and a continued
+ fraction approximation for erfc(x) for larger x;
combined with the relations erf(-x) = -erf(x) and erfc(x) = 1.0 - erf(x),
this gives us erf(x) and erfc(x) for all x.
@@ -656,6 +684,33 @@ m_log10(double x)
}
+static PyObject *
+math_gcd(PyObject *self, PyObject *args)
+{
+ PyObject *a, *b, *g;
+
+ if (!PyArg_ParseTuple(args, "OO:gcd", &a, &b))
+ return NULL;
+
+ a = PyNumber_Index(a);
+ if (a == NULL)
+ return NULL;
+ b = PyNumber_Index(b);
+ if (b == NULL) {
+ Py_DECREF(a);
+ return NULL;
+ }
+ g = _PyLong_GCD(a, b);
+ Py_DECREF(a);
+ Py_DECREF(b);
+ return g;
+}
+
+PyDoc_STRVAR(math_gcd_doc,
+"gcd(x, y) -> int\n\
+greatest common divisor of x and y");
+
+
/* Call is_error when errno != 0, and where x is the result libm
* returned. is_error will usually set up an exception and return
* true (1), but may return false (0) without setting up an exception.
@@ -902,8 +957,8 @@ static PyObject * math_ceil(PyObject *self, PyObject *number) {
}
PyDoc_STRVAR(math_ceil_doc,
- "ceil(x)\n\nReturn the ceiling of x as an int.\n"
- "This is the smallest integral value >= x.");
+ "ceil(x)\n\nReturn the ceiling of x as an Integral.\n"
+ "This is the smallest integer >= x.");
FUNC2(copysign, copysign,
"copysign(x, y)\n\nReturn a float with the magnitude (absolute value) "
@@ -942,8 +997,8 @@ static PyObject * math_floor(PyObject *self, PyObject *number) {
}
PyDoc_STRVAR(math_floor_doc,
- "floor(x)\n\nReturn the floor of x as an int.\n"
- "This is the largest integral value <= x.");
+ "floor(x)\n\nReturn the floor of x as an Integral.\n"
+ "This is the largest integer <= x.");
FUNC1A(gamma, m_tgamma,
"gamma(x)\n\nGamma function at x.")
@@ -1010,7 +1065,7 @@ _fsum_realloc(double **p_ptr, Py_ssize_t n,
Py_ssize_t m = *m_ptr;
m += m; /* double */
- if (n < m && m < (PY_SSIZE_T_MAX / sizeof(double))) {
+ if (n < m && (size_t)m < ((size_t)PY_SSIZE_T_MAX / sizeof(double))) {
double *p = *p_ptr;
if (p == ps) {
v = PyMem_Malloc(sizeof(double) * m);
@@ -1408,6 +1463,7 @@ static PyObject *
math_factorial(PyObject *self, PyObject *arg)
{
long x;
+ int overflow;
PyObject *result, *odd_part, *two_valuation;
if (PyFloat_Check(arg)) {
@@ -1421,15 +1477,22 @@ math_factorial(PyObject *self, PyObject *arg)
lx = PyLong_FromDouble(dx);
if (lx == NULL)
return NULL;
- x = PyLong_AsLong(lx);
+ x = PyLong_AsLongAndOverflow(lx, &overflow);
Py_DECREF(lx);
}
else
- x = PyLong_AsLong(arg);
+ x = PyLong_AsLongAndOverflow(arg, &overflow);
- if (x == -1 && PyErr_Occurred())
+ if (x == -1 && PyErr_Occurred()) {
return NULL;
- if (x < 0) {
+ }
+ else if (overflow == 1) {
+ PyErr_Format(PyExc_OverflowError,
+ "factorial() argument should not exceed %ld",
+ LONG_MAX);
+ return NULL;
+ }
+ else if (overflow == -1 || x < 0) {
PyErr_SetString(PyExc_ValueError,
"factorial() not defined for negative values");
return NULL;
@@ -1926,6 +1989,83 @@ PyDoc_STRVAR(math_isinf_doc,
"isinf(x) -> bool\n\n\
Return True if x is a positive or negative infinity, and False otherwise.");
+static PyObject *
+math_isclose(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ double a, b;
+ double rel_tol = 1e-9;
+ double abs_tol = 0.0;
+ double diff = 0.0;
+ long result = 0;
+
+ static char *keywords[] = {"a", "b", "rel_tol", "abs_tol", NULL};
+
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "dd|$dd:isclose",
+ keywords,
+ &a, &b, &rel_tol, &abs_tol
+ ))
+ return NULL;
+
+ /* sanity check on the inputs */
+ if (rel_tol < 0.0 || abs_tol < 0.0 ) {
+ PyErr_SetString(PyExc_ValueError,
+ "tolerances must be non-negative");
+ return NULL;
+ }
+
+ if ( a == b ) {
+ /* short circuit exact equality -- needed to catch two infinities of
+ the same sign. And perhaps speeds things up a bit sometimes.
+ */
+ Py_RETURN_TRUE;
+ }
+
+ /* This catches the case of two infinities of opposite sign, or
+ one infinity and one finite number. Two infinities of opposite
+ sign would otherwise have an infinite relative tolerance.
+ Two infinities of the same sign are caught by the equality check
+ above.
+ */
+
+ if (Py_IS_INFINITY(a) || Py_IS_INFINITY(b)) {
+ Py_RETURN_FALSE;
+ }
+
+ /* now do the regular computation
+ this is essentially the "weak" test from the Boost library
+ */
+
+ diff = fabs(b - a);
+
+ result = (((diff <= fabs(rel_tol * b)) ||
+ (diff <= fabs(rel_tol * a))) ||
+ (diff <= abs_tol));
+
+ return PyBool_FromLong(result);
+}
+
+PyDoc_STRVAR(math_isclose_doc,
+"isclose(a, b, *, rel_tol=1e-09, abs_tol=0.0) -> bool\n"
+"\n"
+"Determine whether two floating point numbers are close in value.\n"
+"\n"
+" rel_tol\n"
+" maximum difference for being considered \"close\", relative to the\n"
+" magnitude of the input values\n"
+" abs_tol\n"
+" maximum difference for being considered \"close\", regardless of the\n"
+" magnitude of the input values\n"
+"\n"
+"Return True if a is close in value to b, and False otherwise.\n"
+"\n"
+"For the values to be considered close, the difference between them\n"
+"must be smaller than at least one of the tolerances.\n"
+"\n"
+"-inf, inf and NaN behave similarly to the IEEE 754 Standard. That\n"
+"is, NaN is not close to anything, even itself. inf and -inf are\n"
+"only close to themselves.");
+
static PyMethodDef math_methods[] = {
{"acos", math_acos, METH_O, math_acos_doc},
{"acosh", math_acosh, METH_O, math_acosh_doc},
@@ -1950,7 +2090,10 @@ static PyMethodDef math_methods[] = {
{"frexp", math_frexp, METH_O, math_frexp_doc},
{"fsum", math_fsum, METH_O, math_fsum_doc},
{"gamma", math_gamma, METH_O, math_gamma_doc},
+ {"gcd", math_gcd, METH_VARARGS, math_gcd_doc},
{"hypot", math_hypot, METH_VARARGS, math_hypot_doc},
+ {"isclose", (PyCFunction) math_isclose, METH_VARARGS | METH_KEYWORDS,
+ math_isclose_doc},
{"isfinite", math_isfinite, METH_O, math_isfinite_doc},
{"isinf", math_isinf, METH_O, math_isinf_doc},
{"isnan", math_isnan, METH_O, math_isnan_doc},
@@ -2001,7 +2144,11 @@ PyInit_math(void)
PyModule_AddObject(m, "pi", PyFloat_FromDouble(Py_MATH_PI));
PyModule_AddObject(m, "e", PyFloat_FromDouble(Py_MATH_E));
+ PyModule_AddObject(m, "inf", PyFloat_FromDouble(m_inf()));
+#if !defined(PY_NO_SHORT_FLOAT_REPR) || defined(Py_NAN)
+ PyModule_AddObject(m, "nan", PyFloat_FromDouble(m_nan()));
+#endif
- finally:
+ finally:
return m;
}
diff --git a/Modules/md5module.c b/Modules/md5module.c
index 5cb3d36c9b..a9ebc8cc51 100644
--- a/Modules/md5module.c
+++ b/Modules/md5module.c
@@ -18,7 +18,13 @@
#include "Python.h"
#include "hashlib.h"
+#include "pystrhex.h"
+/*[clinic input]
+module _md5
+class MD5Type "MD5object *" "&PyType_Type"
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=6e5261719957a912]*/
/* Some useful types */
@@ -48,6 +54,7 @@ typedef struct {
struct md5_state hash_state;
} MD5object;
+#include "clinic/md5module.c.h"
/* ------------------------------------------------------------------------
*
@@ -332,30 +339,34 @@ MD5_dealloc(PyObject *ptr)
/* External methods for a hash object */
-PyDoc_STRVAR(MD5_copy__doc__, "Return a copy of the hash object.");
+/*[clinic input]
+MD5Type.copy
+
+Return a copy of the hash object.
+[clinic start generated code]*/
static PyObject *
-MD5_copy(MD5object *self, PyObject *unused)
+MD5Type_copy_impl(MD5object *self)
+/*[clinic end generated code: output=596eb36852f02071 input=2c09e6d2493f3079]*/
{
MD5object *newobj;
- if (Py_TYPE(self) == &MD5type) {
- if ( (newobj = newMD5object())==NULL)
- return NULL;
- } else {
- if ( (newobj = newMD5object())==NULL)
- return NULL;
- }
+ if ((newobj = newMD5object())==NULL)
+ return NULL;
newobj->hash_state = self->hash_state;
return (PyObject *)newobj;
}
-PyDoc_STRVAR(MD5_digest__doc__,
-"Return the digest value as a string of binary data.");
+/*[clinic input]
+MD5Type.digest
+
+Return the digest value as a string of binary data.
+[clinic start generated code]*/
static PyObject *
-MD5_digest(MD5object *self, PyObject *unused)
+MD5Type_digest_impl(MD5object *self)
+/*[clinic end generated code: output=eb691dc4190a07ec input=7b96e65389412a34]*/
{
unsigned char digest[MD5_DIGESTSIZE];
struct md5_state temp;
@@ -365,54 +376,41 @@ MD5_digest(MD5object *self, PyObject *unused)
return PyBytes_FromStringAndSize((const char *)digest, MD5_DIGESTSIZE);
}
-PyDoc_STRVAR(MD5_hexdigest__doc__,
-"Return the digest value as a string of hexadecimal digits.");
+/*[clinic input]
+MD5Type.hexdigest
+
+Return the digest value as a string of hexadecimal digits.
+[clinic start generated code]*/
static PyObject *
-MD5_hexdigest(MD5object *self, PyObject *unused)
+MD5Type_hexdigest_impl(MD5object *self)
+/*[clinic end generated code: output=17badced1f3ac932 input=b60b19de644798dd]*/
{
unsigned char digest[MD5_DIGESTSIZE];
struct md5_state temp;
- PyObject *retval;
- Py_UCS1 *hex_digest;
- int i, j;
/* Get the raw (binary) digest value */
temp = self->hash_state;
md5_done(&temp, digest);
- /* Create a new string */
- retval = PyUnicode_New(MD5_DIGESTSIZE * 2, 127);
- if (!retval)
- return NULL;
- hex_digest = PyUnicode_1BYTE_DATA(retval);
-
- /* Make hex version of the digest */
- for(i=j=0; i<MD5_DIGESTSIZE; i++) {
- unsigned char c;
- c = (digest[i] >> 4) & 0xf;
- hex_digest[j++] = Py_hexdigits[c];
- c = (digest[i] & 0xf);
- hex_digest[j++] = Py_hexdigits[c];
- }
-#ifdef Py_DEBUG
- assert(_PyUnicode_CheckConsistency(retval, 1));
-#endif
- return retval;
+ return _Py_strhex((const char*)digest, MD5_DIGESTSIZE);
}
-PyDoc_STRVAR(MD5_update__doc__,
-"Update this hash object's state with the provided string.");
+/*[clinic input]
+MD5Type.update
+
+ obj: object
+ /
+
+Update this hash object's state with the provided string.
+[clinic start generated code]*/
static PyObject *
-MD5_update(MD5object *self, PyObject *args)
+MD5Type_update(MD5object *self, PyObject *obj)
+/*[clinic end generated code: output=f6ad168416338423 input=6e1efcd9ecf17032]*/
{
- PyObject *obj;
Py_buffer buf;
- if (!PyArg_ParseTuple(args, "O:update", &obj))
- return NULL;
-
GET_BUFFER_VIEW_OR_ERROUT(obj, &buf);
md5_process(&self->hash_state, buf.buf, buf.len);
@@ -423,10 +421,10 @@ MD5_update(MD5object *self, PyObject *args)
}
static PyMethodDef MD5_methods[] = {
- {"copy", (PyCFunction)MD5_copy, METH_NOARGS, MD5_copy__doc__},
- {"digest", (PyCFunction)MD5_digest, METH_NOARGS, MD5_digest__doc__},
- {"hexdigest", (PyCFunction)MD5_hexdigest, METH_NOARGS, MD5_hexdigest__doc__},
- {"update", (PyCFunction)MD5_update, METH_VARARGS, MD5_update__doc__},
+ MD5TYPE_COPY_METHODDEF
+ MD5TYPE_DIGEST_METHODDEF
+ MD5TYPE_HEXDIGEST_METHODDEF
+ MD5TYPE_UPDATE_METHODDEF
{NULL, NULL} /* sentinel */
};
@@ -502,27 +500,26 @@ static PyTypeObject MD5type = {
/* The single module-level function: new() */
-PyDoc_STRVAR(MD5_new__doc__,
-"Return a new MD5 hash object; optionally initialized with a string.");
+/*[clinic input]
+_md5.md5
+
+ string: object(c_default="NULL") = b''
+
+Return a new MD5 hash object; optionally initialized with a string.
+[clinic start generated code]*/
static PyObject *
-MD5_new(PyObject *self, PyObject *args, PyObject *kwdict)
+_md5_md5_impl(PyModuleDef *module, PyObject *string)
+/*[clinic end generated code: output=3527436a2090b956 input=d12ef8f72d684f7b]*/
{
- static char *kwlist[] = {"string", NULL};
MD5object *new;
- PyObject *data_obj = NULL;
Py_buffer buf;
- if (!PyArg_ParseTupleAndKeywords(args, kwdict, "|O:new", kwlist,
- &data_obj)) {
- return NULL;
- }
-
- if (data_obj)
- GET_BUFFER_VIEW_OR_ERROUT(data_obj, &buf);
+ if (string)
+ GET_BUFFER_VIEW_OR_ERROUT(string, &buf);
if ((new = newMD5object()) == NULL) {
- if (data_obj)
+ if (string)
PyBuffer_Release(&buf);
return NULL;
}
@@ -531,11 +528,11 @@ MD5_new(PyObject *self, PyObject *args, PyObject *kwdict)
if (PyErr_Occurred()) {
Py_DECREF(new);
- if (data_obj)
+ if (string)
PyBuffer_Release(&buf);
return NULL;
}
- if (data_obj) {
+ if (string) {
md5_process(&new->hash_state, buf.buf, buf.len);
PyBuffer_Release(&buf);
}
@@ -547,7 +544,7 @@ MD5_new(PyObject *self, PyObject *args, PyObject *kwdict)
/* List of functions exported by this module */
static struct PyMethodDef MD5_functions[] = {
- {"md5", (PyCFunction)MD5_new, METH_VARARGS|METH_KEYWORDS, MD5_new__doc__},
+ _MD5_MD5_METHODDEF
{NULL, NULL} /* Sentinel */
};
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c
index a0cceebf55..bb98a99427 100644
--- a/Modules/mmapmodule.c
+++ b/Modules/mmapmodule.c
@@ -301,16 +301,17 @@ mmap_gfind(mmap_object *self,
{
Py_ssize_t start = self->pos;
Py_ssize_t end = self->size;
- const char *needle;
- Py_ssize_t len;
+ Py_buffer view;
CHECK_VALID(NULL);
- if (!PyArg_ParseTuple(args, reverse ? "y#|nn:rfind" : "y#|nn:find",
- &needle, &len, &start, &end)) {
+ if (!PyArg_ParseTuple(args, reverse ? "y*|nn:rfind" : "y*|nn:find",
+ &view, &start, &end)) {
return NULL;
} else {
const char *p, *start_p, *end_p;
int sign = reverse ? -1 : 1;
+ const char *needle = view.buf;
+ Py_ssize_t len = view.len;
if (start < 0)
start += self->size;
@@ -335,9 +336,11 @@ mmap_gfind(mmap_object *self,
for (i = 0; i < len && needle[i] == p[i]; ++i)
/* nothing */;
if (i == len) {
+ PyBuffer_Release(&view);
return PyLong_FromSsize_t(p - self->data);
}
}
+ PyBuffer_Release(&view);
return PyLong_FromLong(-1);
}
}
@@ -385,22 +388,25 @@ static PyObject *
mmap_write_method(mmap_object *self,
PyObject *args)
{
- Py_ssize_t length;
- char *data;
+ Py_buffer data;
CHECK_VALID(NULL);
- if (!PyArg_ParseTuple(args, "y#:write", &data, &length))
+ if (!PyArg_ParseTuple(args, "y*:write", &data))
return(NULL);
- if (!is_writable(self))
+ if (!is_writable(self)) {
+ PyBuffer_Release(&data);
return NULL;
+ }
- if ((self->pos + length) > self->size) {
+ if ((self->pos + data.len) > self->size) {
PyErr_SetString(PyExc_ValueError, "data out of range");
+ PyBuffer_Release(&data);
return NULL;
}
- memcpy(self->data+self->pos, data, length);
- self->pos = self->pos+length;
+ memcpy(self->data + self->pos, data.buf, data.len);
+ self->pos = self->pos + data.len;
+ PyBuffer_Release(&data);
Py_INCREF(Py_None);
return Py_None;
}
@@ -459,15 +465,13 @@ mmap_size_method(mmap_object *self,
#ifdef UNIX
{
- struct stat buf;
- if (-1 == fstat(self->fd, &buf)) {
- PyErr_SetFromErrno(PyExc_OSError);
+ struct _Py_stat_struct status;
+ if (_Py_fstat(self->fd, &status) == -1)
return NULL;
- }
#ifdef HAVE_LARGEFILE_SUPPORT
- return PyLong_FromLongLong(buf.st_size);
+ return PyLong_FromLongLong(status.st_size);
#else
- return PyLong_FromLong(buf.st_size);
+ return PyLong_FromLong(status.st_size);
#endif
}
#endif /* UNIX */
@@ -715,7 +719,7 @@ mmap__sizeof__method(mmap_object *self, void *unused)
{
Py_ssize_t res;
- res = sizeof(mmap_object);
+ res = _PyObject_SIZE(Py_TYPE(self));
if (self->tagname)
res += strlen(self->tagname) + 1;
return PyLong_FromSsize_t(res);
@@ -1106,9 +1110,7 @@ _GetMapSize(PyObject *o, const char* param)
static PyObject *
new_mmap_object(PyTypeObject *type, PyObject *args, PyObject *kwdict)
{
-#ifdef HAVE_FSTAT
- struct stat st;
-#endif
+ struct _Py_stat_struct status;
mmap_object *m_obj;
PyObject *map_size_obj = NULL;
Py_ssize_t map_size;
@@ -1173,32 +1175,31 @@ new_mmap_object(PyTypeObject *type, PyObject *args, PyObject *kwdict)
if (fd != -1)
(void)fcntl(fd, F_FULLFSYNC);
#endif
-#ifdef HAVE_FSTAT
- if (fd != -1 && fstat(fd, &st) == 0 && S_ISREG(st.st_mode)) {
+ if (fd != -1 && _Py_fstat_noraise(fd, &status) == 0
+ && S_ISREG(status.st_mode)) {
if (map_size == 0) {
- if (st.st_size == 0) {
+ if (status.st_size == 0) {
PyErr_SetString(PyExc_ValueError,
"cannot mmap an empty file");
return NULL;
}
- if (offset >= st.st_size) {
+ if (offset >= status.st_size) {
PyErr_SetString(PyExc_ValueError,
"mmap offset is greater than file size");
return NULL;
}
- if (st.st_size - offset > PY_SSIZE_T_MAX) {
+ if (status.st_size - offset > PY_SSIZE_T_MAX) {
PyErr_SetString(PyExc_ValueError,
"mmap length is too large");
return NULL;
}
- map_size = (Py_ssize_t) (st.st_size - offset);
- } else if (offset + (size_t)map_size > st.st_size) {
+ map_size = (Py_ssize_t) (status.st_size - offset);
+ } else if (offset + map_size > status.st_size) {
PyErr_SetString(PyExc_ValueError,
"mmap length is greater than file size");
return NULL;
}
}
-#endif
m_obj = (mmap_object *)type->tp_alloc(type, 0);
if (m_obj == NULL) {return NULL;}
m_obj->data = NULL;
@@ -1221,7 +1222,6 @@ new_mmap_object(PyTypeObject *type, PyObject *args, PyObject *kwdict)
fd = devzero = _Py_open("/dev/zero", O_RDWR);
if (devzero == -1) {
Py_DECREF(m_obj);
- PyErr_SetFromErrno(PyExc_OSError);
return NULL;
}
#endif
@@ -1325,11 +1325,13 @@ new_mmap_object(PyTypeObject *type, PyObject *args, PyObject *kwdict)
*/
if (fileno != -1 && fileno != 0) {
/* Ensure that fileno is within the CRT's valid range */
- if (_PyVerify_fd(fileno) == 0) {
+ if (!_PyVerify_fd(fileno)) {
PyErr_SetFromErrno(PyExc_OSError);
return NULL;
}
+ _Py_BEGIN_SUPPRESS_IPH
fh = (HANDLE)_get_osfhandle(fileno);
+ _Py_END_SUPPRESS_IPH
if (fh==(HANDLE)-1) {
PyErr_SetFromErrno(PyExc_OSError);
return NULL;
diff --git a/Modules/nismodule.c b/Modules/nismodule.c
index 0af495fa53..64eb5dbc3d 100644
--- a/Modules/nismodule.c
+++ b/Modules/nismodule.c
@@ -456,8 +456,8 @@ static struct PyModuleDef nismodule = {
NULL
};
-PyObject*
-PyInit_nis (void)
+PyMODINIT_FUNC
+PyInit_nis(void)
{
PyObject *m, *d;
m = PyModule_Create(&nismodule);
diff --git a/Modules/ossaudiodev.c b/Modules/ossaudiodev.c
index 2d0dd098d8..d2fd5c81d1 100644
--- a/Modules/ossaudiodev.c
+++ b/Modules/ossaudiodev.c
@@ -19,6 +19,7 @@
* $Id$
*/
+#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "structmember.h"
@@ -51,8 +52,8 @@ typedef struct {
char *devicename; /* name of the device file */
int fd; /* file descriptor */
int mode; /* file mode (O_RDONLY, etc.) */
- int icount; /* input count */
- int ocount; /* output count */
+ Py_ssize_t icount; /* input count */
+ Py_ssize_t ocount; /* output count */
uint32_t afmts; /* audio formats supported by hardware */
} oss_audio_t;
@@ -116,11 +117,8 @@ newossobject(PyObject *arg)
provides a special ioctl() for non-blocking read/write, which is
exposed via oss_nonblock() below. */
fd = _Py_open(devicename, imode|O_NONBLOCK);
-
- if (fd == -1) {
- PyErr_SetFromErrnoWithFilename(PyExc_IOError, devicename);
+ if (fd == -1)
return NULL;
- }
/* And (try to) put it back in blocking mode so we get the
expected write() semantics. */
@@ -180,10 +178,8 @@ newossmixerobject(PyObject *arg)
}
fd = _Py_open(devicename, O_RDWR);
- if (fd == -1) {
- PyErr_SetFromErrnoWithFilename(PyExc_IOError, devicename);
+ if (fd == -1)
return NULL;
- }
if ((self = PyObject_New(oss_mixer_t, &OSSMixerType)) == NULL) {
close(fd);
@@ -404,29 +400,25 @@ oss_post(oss_audio_t *self, PyObject *args)
static PyObject *
oss_read(oss_audio_t *self, PyObject *args)
{
- int size, count;
- char *cp;
+ Py_ssize_t size, count;
PyObject *rv;
if (!_is_fd_valid(self->fd))
return NULL;
- if (!PyArg_ParseTuple(args, "i:read", &size))
+ if (!PyArg_ParseTuple(args, "n:read", &size))
return NULL;
+
rv = PyBytes_FromStringAndSize(NULL, size);
if (rv == NULL)
return NULL;
- cp = PyBytes_AS_STRING(rv);
- Py_BEGIN_ALLOW_THREADS
- count = read(self->fd, cp, size);
- Py_END_ALLOW_THREADS
-
- if (count < 0) {
- PyErr_SetFromErrno(PyExc_IOError);
+ count = _Py_read(self->fd, PyBytes_AS_STRING(rv), size);
+ if (count == -1) {
Py_DECREF(rv);
return NULL;
}
+
self->icount += count;
_PyBytes_Resize(&rv, count);
return rv;
@@ -435,33 +427,32 @@ oss_read(oss_audio_t *self, PyObject *args)
static PyObject *
oss_write(oss_audio_t *self, PyObject *args)
{
- char *cp;
- int rv, size;
+ Py_buffer data;
+ Py_ssize_t rv;
if (!_is_fd_valid(self->fd))
return NULL;
- if (!PyArg_ParseTuple(args, "y#:write", &cp, &size)) {
+ if (!PyArg_ParseTuple(args, "y*:write", &data)) {
return NULL;
}
- Py_BEGIN_ALLOW_THREADS
- rv = write(self->fd, cp, size);
- Py_END_ALLOW_THREADS
+ rv = _Py_write(self->fd, data.buf, data.len);
+ PyBuffer_Release(&data);
+ if (rv == -1)
+ return NULL;
- if (rv == -1) {
- return PyErr_SetFromErrno(PyExc_IOError);
- } else {
- self->ocount += rv;
- }
+ self->ocount += rv;
return PyLong_FromLong(rv);
}
static PyObject *
oss_writeall(oss_audio_t *self, PyObject *args)
{
- char *cp;
- int rv, size;
+ Py_buffer data;
+ const char *cp;
+ Py_ssize_t size;
+ Py_ssize_t rv;
fd_set write_set_fds;
int select_rv;
@@ -475,41 +466,50 @@ oss_writeall(oss_audio_t *self, PyObject *args)
if (!_is_fd_valid(self->fd))
return NULL;
- if (!PyArg_ParseTuple(args, "y#:write", &cp, &size))
+ if (!PyArg_ParseTuple(args, "y*:writeall", &data))
return NULL;
if (!_PyIsSelectable_fd(self->fd)) {
PyErr_SetString(PyExc_ValueError,
"file descriptor out of range for select");
+ PyBuffer_Release(&data);
return NULL;
}
/* use select to wait for audio device to be available */
FD_ZERO(&write_set_fds);
FD_SET(self->fd, &write_set_fds);
+ cp = (const char *)data.buf;
+ size = data.len;
while (size > 0) {
Py_BEGIN_ALLOW_THREADS
select_rv = select(self->fd+1, NULL, &write_set_fds, NULL, NULL);
Py_END_ALLOW_THREADS
- assert(select_rv != 0); /* no timeout, can't expire */
- if (select_rv == -1)
+
+ assert(select_rv != 0); /* no timeout, can't expire */
+ if (select_rv == -1) {
+ PyBuffer_Release(&data);
return PyErr_SetFromErrno(PyExc_IOError);
+ }
- Py_BEGIN_ALLOW_THREADS
- rv = write(self->fd, cp, size);
- Py_END_ALLOW_THREADS
+ rv = _Py_write(self->fd, cp, Py_MIN(size, INT_MAX));
if (rv == -1) {
- if (errno == EAGAIN) { /* buffer is full, try again */
- errno = 0;
+ /* buffer is full, try again */
+ if (errno == EAGAIN) {
+ PyErr_Clear();
continue;
- } else /* it's a real error */
- return PyErr_SetFromErrno(PyExc_IOError);
- } else { /* wrote rv bytes */
- self->ocount += rv;
- size -= rv;
- cp += rv;
+ }
+ /* it's a real error */
+ PyBuffer_Release(&data);
+ return NULL;
}
+
+ /* wrote rv bytes */
+ self->ocount += rv;
+ size -= rv;
+ cp += rv;
}
+ PyBuffer_Release(&data);
Py_INCREF(Py_None);
return Py_None;
}
diff --git a/Modules/overlapped.c b/Modules/overlapped.c
index ef77c8875a..f85e5bc736 100644
--- a/Modules/overlapped.c
+++ b/Modules/overlapped.c
@@ -23,6 +23,12 @@
# define T_POINTER T_ULONGLONG
#endif
+/* Compatibility with Python 3.3 */
+#if PY_VERSION_HEX < 0x03040000
+# define PyMem_RawMalloc PyMem_Malloc
+# define PyMem_RawFree PyMem_Free
+#endif
+
#define F_HANDLE F_POINTER
#define F_ULONG_PTR F_POINTER
#define F_DWORD "k"
@@ -238,7 +244,7 @@ PostToQueueCallback(PVOID lpParameter, BOOL TimerOrWaitFired)
PostQueuedCompletionStatus(p->CompletionPort, TimerOrWaitFired,
0, p->Overlapped);
/* ignore possible error! */
- PyMem_Free(p);
+ PyMem_RawFree(p);
}
PyDoc_STRVAR(
@@ -262,7 +268,10 @@ overlapped_RegisterWaitWithQueue(PyObject *self, PyObject *args)
&Milliseconds))
return NULL;
- pdata = PyMem_Malloc(sizeof(struct PostCallbackData));
+ /* Use PyMem_RawMalloc() rather than PyMem_Malloc(), since
+ PostToQueueCallback() will call PyMem_Free() from a new C thread
+ which doesn't hold the GIL. */
+ pdata = PyMem_RawMalloc(sizeof(struct PostCallbackData));
if (pdata == NULL)
return SetFromWindowsErr(0);
@@ -273,7 +282,7 @@ overlapped_RegisterWaitWithQueue(PyObject *self, PyObject *args)
pdata, Milliseconds,
WT_EXECUTEINWAITTHREAD | WT_EXECUTEONLYONCE))
{
- PyMem_Free(pdata);
+ PyMem_RawFree(pdata);
return SetFromWindowsErr(0);
}
diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c
index 36e9893da8..6471b8ee99 100644
--- a/Modules/parsermodule.c
+++ b/Modules/parsermodule.c
@@ -23,6 +23,11 @@
* that lint detects are gone, but there are still warnings with
* Py_[X]DECREF() and Py_[X]INCREF() macros. The lint annotations
* look like "NOTE(...)".
+ *
+ * To debug parser errors like
+ * "parser.ParserError: Expected node type 12, got 333."
+ * decode symbol numbers using the automatically-generated files
+ * Lib/symbol.h and Include/token.h.
*/
#include "Python.h" /* general Python API */
@@ -392,7 +397,7 @@ parser_sizeof(PyST_Object *st, void *unused)
{
Py_ssize_t res;
- res = sizeof(PyST_Object) + _PyNode_SizeOf(st->st_node);
+ res = _PyObject_SIZE(Py_TYPE(st)) + _PyNode_SizeOf(st->st_node);
return PyLong_FromSsize_t(res);
}
@@ -1036,6 +1041,8 @@ VALIDATER(testlist_comp); VALIDATER(yield_expr);
VALIDATER(or_test);
VALIDATER(test_nocond); VALIDATER(lambdef_nocond);
VALIDATER(yield_arg);
+VALIDATER(async_funcdef); VALIDATER(async_stmt);
+VALIDATER(atom_expr);
#undef VALIDATER
@@ -1087,30 +1094,56 @@ validate_terminal(node *terminal, int type, char *string)
return (res);
}
+/* X (',' X) [','] */
+static int
+validate_repeating_list_variable(node *tree,
+ int list_node_type,
+ int (*validate_child_func_inc)(node *, int *),
+ int *pos,
+ const char *const list_node_type_name)
+{
+ int nch = NCH(tree);
+ int res = (nch && validate_ntype(tree, list_node_type));
-/* X (',' X) [',']
- */
+ if (!res && !PyErr_Occurred()) {
+ /* Unconditionally raise. */
+ (void) validate_numnodes(tree, 1, list_node_type_name);
+ }
+ else {
+ for ( ; res && *pos < nch; ) {
+ res = validate_child_func_inc(tree, pos);
+ if (!res || *pos >= nch)
+ break;
+ res = validate_comma(CHILD(tree, (*pos)++));
+ }
+ }
+ return res;
+}
+
+/* X (',' X) [','] */
static int
-validate_repeating_list(node *tree, int ntype, int (*vfunc)(node *),
- const char *const name)
+validate_repeating_list(node *tree,
+ int list_node_type,
+ int (*validate_child_func)(node *),
+ const char *const list_node_type_name)
{
int nch = NCH(tree);
- int res = (nch && validate_ntype(tree, ntype)
- && vfunc(CHILD(tree, 0)));
+ int res = (nch && validate_ntype(tree, list_node_type));
+ int pos = 0;
- if (!res && !PyErr_Occurred())
- (void) validate_numnodes(tree, 1, name);
+ if (!res && !PyErr_Occurred()) {
+ /* Unconditionally raise. */
+ (void) validate_numnodes(tree, 1, list_node_type_name);
+ }
else {
- if (is_even(nch))
- res = validate_comma(CHILD(tree, --nch));
- if (res && nch > 1) {
- int pos = 1;
- for ( ; res && pos < nch; pos += 2)
- res = (validate_comma(CHILD(tree, pos))
- && vfunc(CHILD(tree, pos + 1)));
+ for ( ; res && pos < nch; ) {
+ res = validate_child_func(CHILD(tree, pos++));
+ if (!res || pos >= nch)
+ break;
+ res = validate_comma(CHILD(tree, pos++));
}
}
- return (res);
+ return res;
}
@@ -1577,6 +1610,7 @@ validate_compound_stmt(node *tree)
|| (ntype == try_stmt)
|| (ntype == with_stmt)
|| (ntype == funcdef)
+ || (ntype == async_stmt)
|| (ntype == classdef)
|| (ntype == decorated))
res = validate_node(tree);
@@ -2409,27 +2443,60 @@ validate_factor(node *tree)
/* power:
*
- * power: atom trailer* ('**' factor)*
+ * power: atom_expr trailer* ['**' factor]
*/
static int
validate_power(node *tree)
{
- int pos = 1;
int nch = NCH(tree);
int res = (validate_ntype(tree, power) && (nch >= 1)
- && validate_atom(CHILD(tree, 0)));
+ && validate_atom_expr(CHILD(tree, 0)));
- while (res && (pos < nch) && (TYPE(CHILD(tree, pos)) == trailer))
- res = validate_trailer(CHILD(tree, pos++));
- if (res && (pos < nch)) {
- if (!is_even(nch - pos)) {
+ if (nch > 1) {
+ if (nch != 3) {
err_string("illegal number of nodes for 'power'");
return (0);
}
- for ( ; res && (pos < (nch - 1)); pos += 2)
- res = (validate_doublestar(CHILD(tree, pos))
- && validate_factor(CHILD(tree, pos + 1)));
+ res = (validate_doublestar(CHILD(tree, 1))
+ && validate_factor(CHILD(tree, 2)));
}
+
+ return (res);
+}
+
+
+/* atom_expr:
+ *
+ * atom_expr: [AWAIT] atom trailer*
+ */
+static int
+validate_atom_expr(node *tree)
+{
+ int start = 0;
+ int nch = NCH(tree);
+ int res;
+ int pos;
+
+ res = validate_ntype(tree, atom_expr) && (nch >= 1);
+ if (!res) {
+ return (res);
+ }
+
+ if (TYPE(CHILD(tree, 0)) == AWAIT) {
+ start = 1;
+ if (nch < 2) {
+ err_string("illegal number of nodes for 'atom_expr'");
+ return (0);
+ }
+ }
+
+ res = validate_atom(CHILD(tree, start));
+ if (res) {
+ pos = start + 1;
+ while (res && (pos < nch) && (TYPE(CHILD(tree, pos)) == trailer))
+ res = validate_trailer(CHILD(tree, pos++));
+ }
+
return (res);
}
@@ -2493,39 +2560,28 @@ validate_atom(node *tree)
/* testlist_comp:
- * test ( comp_for | (',' test)* [','] )
+ * (test|star_expr) ( comp_for | (',' (test|star_expr))* [','] )
*/
static int
validate_testlist_comp(node *tree)
{
int nch = NCH(tree);
- int ok = nch;
+ int ok;
- if (nch == 0)
+ if (nch == 0) {
err_string("missing child nodes of testlist_comp");
- else {
- ok = validate_test_or_star_expr(CHILD(tree, 0));
+ return 0;
}
- /*
- * comp_for | (',' test)* [',']
- */
- if (nch == 2 && TYPE(CHILD(tree, 1)) == comp_for)
- ok = validate_comp_for(CHILD(tree, 1));
+ if (nch == 2 && TYPE(CHILD(tree, 1)) == comp_for) {
+ ok = (validate_test(CHILD(tree, 0))
+ && validate_comp_for(CHILD(tree, 1)));
+ }
else {
- /* (',' test)* [','] */
- int i = 1;
- while (ok && nch - i >= 2) {
- ok = (validate_comma(CHILD(tree, i))
- && validate_test_or_star_expr(CHILD(tree, i+1)));
- i += 2;
- }
- if (ok && i == nch-1)
- ok = validate_comma(CHILD(tree, i));
- else if (i != nch) {
- ok = 0;
- err_string("illegal trailing nodes for testlist_comp");
- }
+ ok = validate_repeating_list(tree,
+ testlist_comp,
+ validate_test_or_star_expr,
+ "testlist_comp");
}
return ok;
}
@@ -2638,6 +2694,55 @@ validate_funcdef(node *tree)
return res;
}
+/* async_funcdef: ASYNC funcdef */
+
+static int
+validate_async_funcdef(node *tree)
+{
+ int nch = NCH(tree);
+ int res = validate_ntype(tree, async_funcdef);
+ if (res) {
+ if (nch == 2) {
+ res = (validate_ntype(CHILD(tree, 0), ASYNC)
+ && validate_funcdef(CHILD(tree, 1)));
+ }
+ else {
+ res = 0;
+ err_string("illegal number of children for async_funcdef");
+ }
+ }
+ return res;
+}
+
+
+/* async_stmt: ASYNC (funcdef | with_stmt | for_stmt) */
+
+static int
+validate_async_stmt(node *tree)
+{
+ int nch = NCH(tree);
+ int res = (validate_ntype(tree, async_stmt)
+ && validate_ntype(CHILD(tree, 0), ASYNC));
+
+ if (nch != 2) {
+ res = 0;
+ err_string("illegal number of children for async_stmt");
+ } else {
+ if (TYPE(CHILD(tree, 1)) == funcdef) {
+ res = validate_funcdef(CHILD(tree, 1));
+ }
+ else if (TYPE(CHILD(tree, 1)) == with_stmt) {
+ res = validate_with_stmt(CHILD(tree, 1));
+ }
+ else if (TYPE(CHILD(tree, 1)) == for_stmt) {
+ res = validate_for(CHILD(tree, 1));
+ }
+ }
+
+ return res;
+}
+
+
/* decorated
* decorators (classdef | funcdef)
@@ -2732,9 +2837,6 @@ validate_arglist(node *tree)
}
ok = 1;
if (nch-i > 0) {
- /*
- * argument | '*' test [',' '**' test] | '**' test
- */
int sym = TYPE(CHILD(tree, i));
if (sym == argument) {
@@ -2745,30 +2847,7 @@ validate_arglist(node *tree)
ok = 0;
}
}
- else if (sym == STAR) {
- ok = validate_star(CHILD(tree, i));
- if (ok && (nch-i == 2))
- ok = validate_test(CHILD(tree, i+1));
- else if (ok && (nch-i == 5))
- ok = (validate_test(CHILD(tree, i+1))
- && validate_comma(CHILD(tree, i+2))
- && validate_doublestar(CHILD(tree, i+3))
- && validate_test(CHILD(tree, i+4)));
- else {
- err_string("illegal use of '*' in arglist");
- ok = 0;
- }
- }
- else if (sym == DOUBLESTAR) {
- if (nch-i == 2)
- ok = (validate_doublestar(CHILD(tree, i))
- && validate_test(CHILD(tree, i+1)));
- else {
- err_string("illegal use of '**' in arglist");
- ok = 0;
- }
- }
- else {
+ else {
err_string("illegal arglist specification");
ok = 0;
}
@@ -2778,9 +2857,10 @@ validate_arglist(node *tree)
-/* argument:
- *
- * [test '='] test [comp_for]
+/* argument: ( test [comp_for] |
+ * test '=' test |
+ * '**' test |
+ * '*' test )
*/
static int
validate_argument(node *tree)
@@ -2788,14 +2868,27 @@ validate_argument(node *tree)
int nch = NCH(tree);
int res = (validate_ntype(tree, argument)
&& ((nch == 1) || (nch == 2) || (nch == 3)));
- if (res)
- res = validate_test(CHILD(tree, 0));
- if (res && (nch == 2))
- res = validate_comp_for(CHILD(tree, 1));
- else if (res && (nch == 3))
- res = (validate_equal(CHILD(tree, 1))
- && validate_test(CHILD(tree, 2)));
+ if (res) {
+ if (TYPE(CHILD(tree, 0)) == DOUBLESTAR) {
+ res = validate_test(CHILD(tree, 1));
+ }
+ else if (TYPE(CHILD(tree, 0)) == STAR) {
+ res = validate_test(CHILD(tree, 1));
+ }
+ else if (nch == 1) {
+ res = validate_test(CHILD(tree, 0));
+ }
+ else if (nch == 2) {
+ res = (validate_test(CHILD(tree, 0))
+ && validate_comp_for(CHILD(tree, 1)));
+ }
+ else if (res && (nch == 3)) {
+ res = (validate_test(CHILD(tree, 0))
+ && validate_equal(CHILD(tree, 1))
+ && validate_test(CHILD(tree, 2)));
+ }
+ }
return (res);
}
@@ -2948,11 +3041,44 @@ validate_exprlist(node *tree)
validate_expr_or_star_expr, "exprlist"));
}
+/* Incrementing validate functions returns nonzero iff success (like other
+ * validate functions, and advance *i by the length of the matched pattern. */
+
+/* test ':' test */
+static int
+validate_test_colon_test_inc(node *tree, int *i)
+{
+ return (validate_test(CHILD(tree, (*i)++))
+ && validate_colon(CHILD(tree, (*i)++))
+ && validate_test(CHILD(tree, (*i)++)));
+}
+
+/* test ':' test | '**' expr */
+static int
+validate_dict_element_inc(node *tree, int *i)
+{
+ int nch = NCH(tree);
+ int res = 0;
+ if (nch - *i >= 2) {
+ if (TYPE(CHILD(tree, *i+1)) == COLON) {
+ /* test ':' test */
+ res = validate_test_colon_test_inc(tree, i);
+ } else {
+ /* '**' expr */
+ res = (validate_doublestar(CHILD(tree, (*i)++))
+ && validate_expr(CHILD(tree, (*i)++)));
+ }
+ }
+ return res;
+}
+
/*
* dictorsetmaker:
*
- * (test ':' test (comp_for | (',' test ':' test)* [','])) |
- * (test (comp_for | (',' test)* [',']))
+ * ( ((test ':' test | '**' expr)
+ * (comp_for | (',' (test ':' test | '**' expr))* [','])) |
+ * ((test | '*' test)
+ * (comp_for | (',' (test | '*' test))* [','])) )
*/
static int
validate_dictorsetmaker(node *tree)
@@ -2966,65 +3092,44 @@ validate_dictorsetmaker(node *tree)
return 0;
if (nch - i < 1) {
+ /* Unconditionally raise. */
(void) validate_numnodes(tree, 1, "dictorsetmaker");
return 0;
}
- res = validate_test(CHILD(tree, i++));
- if (!res)
- return 0;
-
- if (nch - i >= 2 && TYPE(CHILD(tree, i)) == COLON) {
+ if (nch - i >= 2
+ && ((TYPE(CHILD(tree, i+1)) == COLON) ||
+ (TYPE(CHILD(tree, i)) == DOUBLESTAR))) {
/* Dictionary display or dictionary comprehension. */
- res = (validate_colon(CHILD(tree, i++))
- && validate_test(CHILD(tree, i++)));
- if (!res)
- return 0;
-
- if (nch - i >= 1 && TYPE(CHILD(tree, i)) == comp_for) {
+ if (nch - i >= 4 && TYPE(CHILD(tree, i+3)) == comp_for) {
/* Dictionary comprehension. */
- res = validate_comp_for(CHILD(tree, i++));
+ res = (validate_test_colon_test_inc(tree, &i)
+ && validate_comp_for(CHILD(tree, i++)));
if (!res)
return 0;
- }
- else {
+ } else {
/* Dictionary display. */
- while (nch - i >= 4) {
- res = (validate_comma(CHILD(tree, i++))
- && validate_test(CHILD(tree, i++))
- && validate_colon(CHILD(tree, i++))
- && validate_test(CHILD(tree, i++)));
- if (!res)
- return 0;
- }
- if (nch - i == 1) {
- res = validate_comma(CHILD(tree, i++));
- if (!res)
- return 0;
- }
+ return validate_repeating_list_variable(
+ tree,
+ dictorsetmaker,
+ validate_dict_element_inc,
+ &i,
+ "dictorsetmaker");
}
- }
- else {
+ } else {
/* Set display or set comprehension. */
- if (nch - i >= 1 && TYPE(CHILD(tree, i)) == comp_for) {
+ if (nch - i >= 2 && TYPE(CHILD(tree, i + 1)) == comp_for) {
/* Set comprehension. */
- res = validate_comp_for(CHILD(tree, i++));
+ res = (validate_test(CHILD(tree, i++))
+ && validate_comp_for(CHILD(tree, i++)));
if (!res)
return 0;
- }
- else {
+ } else {
/* Set display. */
- while (nch - i >= 2) {
- res = (validate_comma(CHILD(tree, i++))
- && validate_test(CHILD(tree, i++)));
- if (!res)
- return 0;
- }
- if (nch - i == 1) {
- res = validate_comma(CHILD(tree, i++));
- if (!res)
- return 0;
- }
+ return validate_repeating_list(tree,
+ dictorsetmaker,
+ validate_test_or_star_expr,
+ "dictorsetmaker");
}
}
@@ -3068,6 +3173,12 @@ validate_node(node *tree)
/*
* Definition nodes.
*/
+ case async_funcdef:
+ res = validate_async_funcdef(tree);
+ break;
+ case async_stmt:
+ res = validate_async_stmt(tree);
+ break;
case funcdef:
res = validate_funcdef(tree);
break;
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 7c937e0553..e5f58ab06b 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -6,7 +6,7 @@
functions are either unimplemented or implemented differently. The source
assumes that for Windows NT, the macro 'MS_WINDOWS' is defined independent
of the compiler used. Different compilers define their own feature
- test macro, e.g. '__BORLANDC__' or '_MSC_VER'. */
+ test macro, e.g. '_MSC_VER'. */
@@ -25,10 +25,15 @@
#define PY_SSIZE_T_CLEAN
#include "Python.h"
+#include "structmember.h"
#ifndef MS_WINDOWS
#include "posixmodule.h"
+#else
+#include "winreparse.h"
#endif
+#include <stdio.h> /* needed for ctermid() */
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -141,13 +146,6 @@ corresponding Unix manual entries for more information on calls.");
#define HAVE_SYSTEM 1
#include <process.h>
#else
-#ifdef __BORLANDC__ /* Borland compiler */
-#define HAVE_EXECV 1
-#define HAVE_OPENDIR 1
-#define HAVE_PIPE 1
-#define HAVE_SYSTEM 1
-#define HAVE_WAIT 1
-#else
#ifdef _MSC_VER /* Microsoft compiler */
#define HAVE_GETPPID 1
#define HAVE_GETLOGIN 1
@@ -177,14 +175,14 @@ corresponding Unix manual entries for more information on calls.");
#define HAVE_WAIT 1
#define HAVE_TTYNAME 1
#endif /* _MSC_VER */
-#endif /* __BORLANDC__ */
#endif /* ! __WATCOMC__ || __QNX__ */
/*[clinic input]
+# one of the few times we lie about this name!
module os
[clinic start generated code]*/
-/*[clinic end generated code: output=da39a3ee5e6b4b0d input=8cff096d1133288f]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=94a0f0f978acae17]*/
#ifndef _MSC_VER
@@ -211,11 +209,7 @@ extern int rmdir(char *);
extern int chdir(const char *);
extern int rmdir(const char *);
#endif
-#ifdef __BORLANDC__
-extern int chmod(const char *, int);
-#else
extern int chmod(const char *, mode_t);
-#endif
/*#ifdef HAVE_FCHMOD
extern int fchmod(int, mode_t);
#endif*/
@@ -301,6 +295,9 @@ extern int lstat(const char *, struct stat *);
#ifndef IO_REPARSE_TAG_SYMLINK
#define IO_REPARSE_TAG_SYMLINK (0xA000000CL)
#endif
+#ifndef IO_REPARSE_TAG_MOUNT_POINT
+#define IO_REPARSE_TAG_MOUNT_POINT (0xA0000003L)
+#endif
#include "osdefs.h"
#include <malloc.h>
#include <windows.h>
@@ -356,8 +353,8 @@ static int win32_can_symlink = 0;
#ifdef MS_WINDOWS
# define STAT win32_stat
# define LSTAT win32_lstat
-# define FSTAT win32_fstat
-# define STRUCT_STAT struct win32_stat
+# define FSTAT _Py_fstat_noraise
+# define STRUCT_STAT struct _Py_stat_struct
#else
# define STAT stat
# define LSTAT lstat
@@ -378,6 +375,20 @@ static int win32_can_symlink = 0;
#define DWORD_MAX 4294967295U
+#ifdef MS_WINDOWS
+#define INITFUNC PyInit_nt
+#define MODNAME "nt"
+#else
+#define INITFUNC PyInit_posix
+#define MODNAME "posix"
+#endif
+
+#ifdef MS_WINDOWS
+/* defined in fileutils.c */
+PyAPI_FUNC(void) _Py_time_t_to_FILE_TIME(time_t, int, FILETIME *);
+PyAPI_FUNC(void) _Py_attribute_data_to_stat(BY_HANDLE_FILE_INFORMATION *,
+ ULONG, struct _Py_stat_struct *);
+#endif
#ifdef MS_WINDOWS
static int
@@ -701,7 +712,6 @@ dir_fd_converter(PyObject *o, void *p)
}
-
/*
* A PyArg_ParseTuple "converter" function
* that handles filesystem paths in the manner
@@ -797,8 +807,8 @@ typedef struct {
PyObject *cleanup;
} path_t;
-#define PATH_T_INITIALIZE(function_name, nullable, allow_fd) \
- {function_name, NULL, nullable, allow_fd, NULL, NULL, 0, 0, NULL, NULL}
+#define PATH_T_INITIALIZE(function_name, argument_name, nullable, allow_fd) \
+ {function_name, argument_name, nullable, allow_fd, NULL, NULL, -1, 0, NULL, NULL}
static void
path_cleanup(path_t *path) {
@@ -859,7 +869,7 @@ path_converter(PyObject *o, void *p) {
return 0;
}
if (wcslen(wide) != length) {
- FORMAT_EXCEPTION(PyExc_TypeError, "embedded null character");
+ FORMAT_EXCEPTION(PyExc_ValueError, "embedded null character");
Py_DECREF(unicode);
return 0;
}
@@ -925,8 +935,8 @@ path_converter(PyObject *o, void *p) {
#endif
narrow = PyBytes_AS_STRING(bytes);
- if (length != strlen(narrow)) {
- FORMAT_EXCEPTION(PyExc_ValueError, "embedded NUL character in %s");
+ if ((size_t)length != strlen(narrow)) {
+ FORMAT_EXCEPTION(PyExc_ValueError, "embedded null character in %s");
Py_DECREF(bytes);
return 0;
}
@@ -1027,97 +1037,46 @@ dir_fd_and_follow_symlinks_invalid(char *function_name, int dir_fd,
return 0;
}
-/* A helper used by a number of POSIX-only functions */
-#ifndef MS_WINDOWS
+#ifdef MS_WINDOWS
+ typedef PY_LONG_LONG Py_off_t;
+#else
+ typedef off_t Py_off_t;
+#endif
+
static int
-_parse_off_t(PyObject* arg, void* addr)
+Py_off_t_converter(PyObject *arg, void *addr)
{
-#if !defined(HAVE_LARGEFILE_SUPPORT)
- *((off_t*)addr) = PyLong_AsLong(arg);
+#ifdef HAVE_LARGEFILE_SUPPORT
+ *((Py_off_t *)addr) = PyLong_AsLongLong(arg);
#else
- *((off_t*)addr) = PyLong_AsLongLong(arg);
+ *((Py_off_t *)addr) = PyLong_AsLong(arg);
#endif
if (PyErr_Occurred())
return 0;
return 1;
}
+
+static PyObject *
+PyLong_FromPy_off_t(Py_off_t offset)
+{
+#ifdef HAVE_LARGEFILE_SUPPORT
+ return PyLong_FromLongLong(offset);
+#else
+ return PyLong_FromLong(offset);
#endif
+}
-#if defined _MSC_VER && _MSC_VER >= 1400
-/* Microsoft CRT in VS2005 and higher will verify that a filehandle is
- * valid and raise an assertion if it isn't.
- * Normally, an invalid fd is likely to be a C program error and therefore
- * an assertion can be useful, but it does contradict the POSIX standard
- * which for write(2) states:
- * "Otherwise, -1 shall be returned and errno set to indicate the error."
- * "[EBADF] The fildes argument is not a valid file descriptor open for
- * writing."
- * Furthermore, python allows the user to enter any old integer
- * as a fd and should merely raise a python exception on error.
- * The Microsoft CRT doesn't provide an official way to check for the
- * validity of a file descriptor, but we can emulate its internal behaviour
- * by using the exported __pinfo data member and knowledge of the
- * internal structures involved.
- * The structures below must be updated for each version of visual studio
- * according to the file internal.h in the CRT source, until MS comes
- * up with a less hacky way to do this.
- * (all of this is to avoid globally modifying the CRT behaviour using
- * _set_invalid_parameter_handler() and _CrtSetReportMode())
- */
-/* The actual size of the structure is determined at runtime.
- * Only the first items must be present.
- */
-typedef struct {
- intptr_t osfhnd;
- char osfile;
-} my_ioinfo;
-extern __declspec(dllimport) char * __pioinfo[];
+#if defined _MSC_VER && _MSC_VER >= 1400 && _MSC_VER < 1900
+/* Legacy implementation of _PyVerify_fd_dup2 while transitioning to
+ * MSVC 14.0. This should eventually be removed. (issue23524)
+ */
#define IOINFO_L2E 5
-#define IOINFO_ARRAY_ELTS (1 << IOINFO_L2E)
#define IOINFO_ARRAYS 64
+#define IOINFO_ARRAY_ELTS (1 << IOINFO_L2E)
#define _NHANDLE_ (IOINFO_ARRAYS * IOINFO_ARRAY_ELTS)
-#define FOPEN 0x01
#define _NO_CONSOLE_FILENO (intptr_t)-2
-/* This function emulates what the windows CRT does to validate file handles */
-int
-_PyVerify_fd(int fd)
-{
- const int i1 = fd >> IOINFO_L2E;
- const int i2 = fd & ((1 << IOINFO_L2E) - 1);
-
- static size_t sizeof_ioinfo = 0;
-
- /* Determine the actual size of the ioinfo structure,
- * as used by the CRT loaded in memory
- */
- if (sizeof_ioinfo == 0 && __pioinfo[0] != NULL) {
- sizeof_ioinfo = _msize(__pioinfo[0]) / IOINFO_ARRAY_ELTS;
- }
- if (sizeof_ioinfo == 0) {
- /* This should not happen... */
- goto fail;
- }
-
- /* See that it isn't a special CLEAR fileno */
- if (fd != _NO_CONSOLE_FILENO) {
- /* Microsoft CRT would check that 0<=fd<_nhandle but we can't do that. Instead
- * we check pointer validity and other info
- */
- if (0 <= i1 && i1 < IOINFO_ARRAYS && __pioinfo[i1] != NULL) {
- /* finally, check that the file is open */
- my_ioinfo* info = (my_ioinfo*)(__pioinfo[i1] + i2 * sizeof_ioinfo);
- if (info->osfile & FOPEN) {
- return 1;
- }
- }
- }
- fail:
- errno = EBADF;
- return 0;
-}
-
/* the special case of checking dup2. The target fd must be in a sensible range */
static int
_PyVerify_fd_dup2(int fd1, int fd2)
@@ -1132,46 +1091,10 @@ _PyVerify_fd_dup2(int fd1, int fd2)
return 0;
}
#else
-/* dummy version. _PyVerify_fd() is already defined in fileobject.h */
-#define _PyVerify_fd_dup2(A, B) (1)
+#define _PyVerify_fd_dup2(fd1, fd2) (_PyVerify_fd(fd1) && (fd2) >= 0)
#endif
#ifdef MS_WINDOWS
-/* The following structure was copied from
- http://msdn.microsoft.com/en-us/library/ms791514.aspx as the required
- include doesn't seem to be present in the Windows SDK (at least as included
- with Visual Studio Express). */
-typedef struct _REPARSE_DATA_BUFFER {
- ULONG ReparseTag;
- USHORT ReparseDataLength;
- USHORT Reserved;
- union {
- struct {
- USHORT SubstituteNameOffset;
- USHORT SubstituteNameLength;
- USHORT PrintNameOffset;
- USHORT PrintNameLength;
- ULONG Flags;
- WCHAR PathBuffer[1];
- } SymbolicLinkReparseBuffer;
-
- struct {
- USHORT SubstituteNameOffset;
- USHORT SubstituteNameLength;
- USHORT PrintNameOffset;
- USHORT PrintNameLength;
- WCHAR PathBuffer[1];
- } MountPointReparseBuffer;
-
- struct {
- UCHAR DataBuffer[1];
- } GenericReparseBuffer;
- };
-} REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;
-
-#define REPARSE_DATA_BUFFER_HEADER_SIZE FIELD_OFFSET(REPARSE_DATA_BUFFER,\
- GenericReparseBuffer)
-#define MAXIMUM_REPARSE_DATA_BUFFER_SIZE ( 16 * 1024 )
static int
win32_get_reparse_tag(HANDLE reparse_point_handle, ULONG *reparse_tag)
@@ -1356,47 +1279,37 @@ path_error2(path_t *path, path_t *path2)
/* POSIX generic methods */
-static PyObject *
-posix_fildes(PyObject *fdobj, int (*func)(int))
+static int
+fildes_converter(PyObject *o, void *p)
{
int fd;
- int res;
- fd = PyObject_AsFileDescriptor(fdobj);
+ int *pointer = (int *)p;
+ fd = PyObject_AsFileDescriptor(o);
if (fd < 0)
- return NULL;
- if (!_PyVerify_fd(fd))
- return posix_error();
- Py_BEGIN_ALLOW_THREADS
- res = (*func)(fd);
- Py_END_ALLOW_THREADS
- if (res < 0)
- return posix_error();
- Py_INCREF(Py_None);
- return Py_None;
+ return 0;
+ *pointer = fd;
+ return 1;
}
static PyObject *
-posix_1str(const char *func_name, PyObject *args, char *format,
- int (*func)(const char*))
+posix_fildes_fd(int fd, int (*func)(int))
{
- path_t path;
int res;
- memset(&path, 0, sizeof(path));
- path.function_name = func_name;
- if (!PyArg_ParseTuple(args, format,
- path_converter, &path))
- return NULL;
- Py_BEGIN_ALLOW_THREADS
- res = (*func)(path.narrow);
- Py_END_ALLOW_THREADS
- if (res < 0) {
- path_error(&path);
- path_cleanup(&path);
- return NULL;
- }
- path_cleanup(&path);
- Py_INCREF(Py_None);
- return Py_None;
+ int async_err = 0;
+
+ if (!_PyVerify_fd(fd))
+ return posix_error();
+
+ do {
+ Py_BEGIN_ALLOW_THREADS
+ _Py_BEGIN_SUPPRESS_IPH
+ res = (*func)(fd);
+ _Py_END_SUPPRESS_IPH
+ Py_END_ALLOW_THREADS
+ } while (res != 0 && errno == EINTR && !(async_err = PyErr_CheckSignals()));
+ if (res != 0)
+ return (!async_err) ? posix_error() : NULL;
+ Py_RETURN_NONE;
}
@@ -1434,16 +1347,16 @@ win32_chdir(LPCSTR path)
static BOOL __stdcall
win32_wchdir(LPCWSTR path)
{
- wchar_t _new_path[MAX_PATH], *new_path = _new_path;
+ wchar_t path_buf[MAX_PATH], *new_path = path_buf;
int result;
wchar_t env[4] = L"=x:";
if(!SetCurrentDirectoryW(path))
return FALSE;
- result = GetCurrentDirectoryW(Py_ARRAY_LENGTH(new_path), new_path);
+ result = GetCurrentDirectoryW(Py_ARRAY_LENGTH(path_buf), new_path);
if (!result)
return FALSE;
- if (result > Py_ARRAY_LENGTH(new_path)) {
+ if (result > Py_ARRAY_LENGTH(path_buf)) {
new_path = PyMem_RawMalloc(result * sizeof(wchar_t));
if (!new_path) {
SetLastError(ERROR_OUTOFMEMORY);
@@ -1461,7 +1374,7 @@ win32_wchdir(LPCWSTR path)
return TRUE;
env[1] = new_path[0];
result = SetEnvironmentVariableW(env, new_path);
- if (new_path != _new_path)
+ if (new_path != path_buf)
PyMem_RawFree(new_path);
return result;
}
@@ -1475,89 +1388,7 @@ win32_wchdir(LPCWSTR path)
Therefore, we implement our own stat, based on the Win32 API directly.
*/
#define HAVE_STAT_NSEC 1
-
-struct win32_stat{
- unsigned long st_dev;
- __int64 st_ino;
- unsigned short st_mode;
- int st_nlink;
- int st_uid;
- int st_gid;
- unsigned long st_rdev;
- __int64 st_size;
- time_t st_atime;
- int st_atime_nsec;
- time_t st_mtime;
- int st_mtime_nsec;
- time_t st_ctime;
- int st_ctime_nsec;
-};
-
-static __int64 secs_between_epochs = 11644473600; /* Seconds between 1.1.1601 and 1.1.1970 */
-
-static void
-FILE_TIME_to_time_t_nsec(FILETIME *in_ptr, time_t *time_out, int* nsec_out)
-{
- /* XXX endianness. Shouldn't matter, as all Windows implementations are little-endian */
- /* Cannot simply cast and dereference in_ptr,
- since it might not be aligned properly */
- __int64 in;
- memcpy(&in, in_ptr, sizeof(in));
- *nsec_out = (int)(in % 10000000) * 100; /* FILETIME is in units of 100 nsec. */
- *time_out = Py_SAFE_DOWNCAST((in / 10000000) - secs_between_epochs, __int64, time_t);
-}
-
-static void
-time_t_to_FILE_TIME(time_t time_in, int nsec_in, FILETIME *out_ptr)
-{
- /* XXX endianness */
- __int64 out;
- out = time_in + secs_between_epochs;
- out = out * 10000000 + nsec_in / 100;
- memcpy(out_ptr, &out, sizeof(out));
-}
-
-/* Below, we *know* that ugo+r is 0444 */
-#if _S_IREAD != 0400
-#error Unsupported C library
-#endif
-static int
-attributes_to_mode(DWORD attr)
-{
- int m = 0;
- if (attr & FILE_ATTRIBUTE_DIRECTORY)
- m |= _S_IFDIR | 0111; /* IFEXEC for user,group,other */
- else
- m |= _S_IFREG;
- if (attr & FILE_ATTRIBUTE_READONLY)
- m |= 0444;
- else
- m |= 0666;
- return m;
-}
-
-static int
-attribute_data_to_stat(BY_HANDLE_FILE_INFORMATION *info, ULONG reparse_tag, struct win32_stat *result)
-{
- memset(result, 0, sizeof(*result));
- result->st_mode = attributes_to_mode(info->dwFileAttributes);
- result->st_size = (((__int64)info->nFileSizeHigh)<<32) + info->nFileSizeLow;
- result->st_dev = info->dwVolumeSerialNumber;
- result->st_rdev = result->st_dev;
- FILE_TIME_to_time_t_nsec(&info->ftCreationTime, &result->st_ctime, &result->st_ctime_nsec);
- FILE_TIME_to_time_t_nsec(&info->ftLastWriteTime, &result->st_mtime, &result->st_mtime_nsec);
- FILE_TIME_to_time_t_nsec(&info->ftLastAccessTime, &result->st_atime, &result->st_atime_nsec);
- result->st_nlink = info->nNumberOfLinks;
- result->st_ino = (((__int64)info->nFileIndexHigh)<<32) + info->nFileIndexLow;
- if (reparse_tag == IO_REPARSE_TAG_SYMLINK) {
- /* first clear the S_IFMT bits */
- result->st_mode ^= (result->st_mode & S_IFMT);
- /* now set the bits that make this a symlink */
- result->st_mode |= S_IFLNK;
- }
-
- return 0;
-}
+#define HAVE_STRUCT_STAT_ST_FILE_ATTRIBUTES 1
static BOOL
attributes_from_dir(LPCSTR pszFile, BY_HANDLE_FILE_INFORMATION *info, ULONG *reparse_tag)
@@ -1582,6 +1413,25 @@ attributes_from_dir(LPCSTR pszFile, BY_HANDLE_FILE_INFORMATION *info, ULONG *rep
return TRUE;
}
+static void
+find_data_to_file_info_w(WIN32_FIND_DATAW *pFileData,
+ BY_HANDLE_FILE_INFORMATION *info,
+ ULONG *reparse_tag)
+{
+ memset(info, 0, sizeof(*info));
+ info->dwFileAttributes = pFileData->dwFileAttributes;
+ info->ftCreationTime = pFileData->ftCreationTime;
+ info->ftLastAccessTime = pFileData->ftLastAccessTime;
+ info->ftLastWriteTime = pFileData->ftLastWriteTime;
+ info->nFileSizeHigh = pFileData->nFileSizeHigh;
+ info->nFileSizeLow = pFileData->nFileSizeLow;
+/* info->nNumberOfLinks = 1; */
+ if (pFileData->dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)
+ *reparse_tag = pFileData->dwReserved0;
+ else
+ *reparse_tag = 0;
+}
+
static BOOL
attributes_from_dir_w(LPCWSTR pszFile, BY_HANDLE_FILE_INFORMATION *info, ULONG *reparse_tag)
{
@@ -1591,45 +1441,10 @@ attributes_from_dir_w(LPCWSTR pszFile, BY_HANDLE_FILE_INFORMATION *info, ULONG *
if (hFindFile == INVALID_HANDLE_VALUE)
return FALSE;
FindClose(hFindFile);
- memset(info, 0, sizeof(*info));
- *reparse_tag = 0;
- info->dwFileAttributes = FileData.dwFileAttributes;
- info->ftCreationTime = FileData.ftCreationTime;
- info->ftLastAccessTime = FileData.ftLastAccessTime;
- info->ftLastWriteTime = FileData.ftLastWriteTime;
- info->nFileSizeHigh = FileData.nFileSizeHigh;
- info->nFileSizeLow = FileData.nFileSizeLow;
-/* info->nNumberOfLinks = 1; */
- if (FileData.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)
- *reparse_tag = FileData.dwReserved0;
+ find_data_to_file_info_w(&FileData, info, reparse_tag);
return TRUE;
}
-/* Grab GetFinalPathNameByHandle dynamically from kernel32 */
-static int has_GetFinalPathNameByHandle = -1;
-static DWORD (CALLBACK *Py_GetFinalPathNameByHandleW)(HANDLE, LPWSTR, DWORD,
- DWORD);
-static int
-check_GetFinalPathNameByHandle()
-{
- HINSTANCE hKernel32;
- DWORD (CALLBACK *Py_GetFinalPathNameByHandleA)(HANDLE, LPSTR, DWORD,
- DWORD);
-
- /* only recheck */
- if (-1 == has_GetFinalPathNameByHandle)
- {
- hKernel32 = GetModuleHandleW(L"KERNEL32");
- *(FARPROC*)&Py_GetFinalPathNameByHandleA = GetProcAddress(hKernel32,
- "GetFinalPathNameByHandleA");
- *(FARPROC*)&Py_GetFinalPathNameByHandleW = GetProcAddress(hKernel32,
- "GetFinalPathNameByHandleW");
- has_GetFinalPathNameByHandle = Py_GetFinalPathNameByHandleA &&
- Py_GetFinalPathNameByHandleW;
- }
- return has_GetFinalPathNameByHandle;
-}
-
static BOOL
get_target_path(HANDLE hdl, wchar_t **target_path)
{
@@ -1638,8 +1453,8 @@ get_target_path(HANDLE hdl, wchar_t **target_path)
/* We have a good handle to the target, use it to determine
the target path name (then we'll call lstat on it). */
- buf_size = Py_GetFinalPathNameByHandleW(hdl, 0, 0,
- VOLUME_NAME_DOS);
+ buf_size = GetFinalPathNameByHandleW(hdl, 0, 0,
+ VOLUME_NAME_DOS);
if(!buf_size)
return FALSE;
@@ -1649,7 +1464,7 @@ get_target_path(HANDLE hdl, wchar_t **target_path)
return FALSE;
}
- result_length = Py_GetFinalPathNameByHandleW(hdl,
+ result_length = GetFinalPathNameByHandleW(hdl,
buf, buf_size, VOLUME_NAME_DOS);
if(!result_length) {
@@ -1669,10 +1484,10 @@ get_target_path(HANDLE hdl, wchar_t **target_path)
}
static int
-win32_xstat_impl_w(const wchar_t *path, struct win32_stat *result,
+win32_xstat_impl_w(const wchar_t *path, struct _Py_stat_struct *result,
BOOL traverse);
static int
-win32_xstat_impl(const char *path, struct win32_stat *result,
+win32_xstat_impl(const char *path, struct _Py_stat_struct *result,
BOOL traverse)
{
int code;
@@ -1682,12 +1497,6 @@ win32_xstat_impl(const char *path, struct win32_stat *result,
wchar_t *target_path;
const char *dot;
- if(!check_GetFinalPathNameByHandle()) {
- /* If the OS doesn't have GetFinalPathNameByHandle, don't
- traverse reparse point. */
- traverse = FALSE;
- }
-
hFile = CreateFileA(
path,
FILE_READ_ATTRIBUTES, /* desired access */
@@ -1755,7 +1564,7 @@ win32_xstat_impl(const char *path, struct win32_stat *result,
} else
CloseHandle(hFile);
}
- attribute_data_to_stat(&info, reparse_tag, result);
+ _Py_attribute_data_to_stat(&info, reparse_tag, result);
/* Set S_IEXEC if it is an .exe, .bat, ... */
dot = strrchr(path, '.');
@@ -1768,7 +1577,7 @@ win32_xstat_impl(const char *path, struct win32_stat *result,
}
static int
-win32_xstat_impl_w(const wchar_t *path, struct win32_stat *result,
+win32_xstat_impl_w(const wchar_t *path, struct _Py_stat_struct *result,
BOOL traverse)
{
int code;
@@ -1778,12 +1587,6 @@ win32_xstat_impl_w(const wchar_t *path, struct win32_stat *result,
wchar_t *target_path;
const wchar_t *dot;
- if(!check_GetFinalPathNameByHandle()) {
- /* If the OS doesn't have GetFinalPathNameByHandle, don't
- traverse reparse point. */
- traverse = FALSE;
- }
-
hFile = CreateFileW(
path,
FILE_READ_ATTRIBUTES, /* desired access */
@@ -1851,7 +1654,7 @@ win32_xstat_impl_w(const wchar_t *path, struct win32_stat *result,
} else
CloseHandle(hFile);
}
- attribute_data_to_stat(&info, reparse_tag, result);
+ _Py_attribute_data_to_stat(&info, reparse_tag, result);
/* Set S_IEXEC if it is an .exe, .bat, ... */
dot = wcsrchr(path, '.');
@@ -1864,7 +1667,7 @@ win32_xstat_impl_w(const wchar_t *path, struct win32_stat *result,
}
static int
-win32_xstat(const char *path, struct win32_stat *result, BOOL traverse)
+win32_xstat(const char *path, struct _Py_stat_struct *result, BOOL traverse)
{
/* Protocol violation: we explicitly clear errno, instead of
setting it to a POSIX error. Callers should use GetLastError. */
@@ -1874,7 +1677,7 @@ win32_xstat(const char *path, struct win32_stat *result, BOOL traverse)
}
static int
-win32_xstat_w(const wchar_t *path, struct win32_stat *result, BOOL traverse)
+win32_xstat_w(const wchar_t *path, struct _Py_stat_struct *result, BOOL traverse)
{
/* Protocol violation: we explicitly clear errno, instead of
setting it to a POSIX error. Callers should use GetLastError. */
@@ -1896,80 +1699,29 @@ win32_xstat_w(const wchar_t *path, struct win32_stat *result, BOOL traverse)
The _w represent Unicode equivalents of the aforementioned ANSI functions. */
static int
-win32_lstat(const char* path, struct win32_stat *result)
+win32_lstat(const char* path, struct _Py_stat_struct *result)
{
return win32_xstat(path, result, FALSE);
}
static int
-win32_lstat_w(const wchar_t* path, struct win32_stat *result)
+win32_lstat_w(const wchar_t* path, struct _Py_stat_struct *result)
{
return win32_xstat_w(path, result, FALSE);
}
static int
-win32_stat(const char* path, struct win32_stat *result)
+win32_stat(const char* path, struct _Py_stat_struct *result)
{
return win32_xstat(path, result, TRUE);
}
static int
-win32_stat_w(const wchar_t* path, struct win32_stat *result)
+win32_stat_w(const wchar_t* path, struct _Py_stat_struct *result)
{
return win32_xstat_w(path, result, TRUE);
}
-static int
-win32_fstat(int file_number, struct win32_stat *result)
-{
- BY_HANDLE_FILE_INFORMATION info;
- HANDLE h;
- int type;
-
- if (!_PyVerify_fd(file_number))
- h = INVALID_HANDLE_VALUE;
- else
- h = (HANDLE)_get_osfhandle(file_number);
-
- /* Protocol violation: we explicitly clear errno, instead of
- setting it to a POSIX error. Callers should use GetLastError. */
- errno = 0;
-
- if (h == INVALID_HANDLE_VALUE) {
- /* This is really a C library error (invalid file handle).
- We set the Win32 error to the closes one matching. */
- SetLastError(ERROR_INVALID_HANDLE);
- return -1;
- }
- memset(result, 0, sizeof(*result));
-
- type = GetFileType(h);
- if (type == FILE_TYPE_UNKNOWN) {
- DWORD error = GetLastError();
- if (error != 0) {
- return -1;
- }
- /* else: valid but unknown file */
- }
-
- if (type != FILE_TYPE_DISK) {
- if (type == FILE_TYPE_CHAR)
- result->st_mode = _S_IFCHR;
- else if (type == FILE_TYPE_PIPE)
- result->st_mode = _S_IFIFO;
- return 0;
- }
-
- if (!GetFileInformationByHandle(h, &info)) {
- return -1;
- }
-
- attribute_data_to_stat(&info, 0, result);
- /* specific to fstat() */
- result->st_ino = (((__int64)info.nFileIndexHigh)<<32) + info.nFileIndexLow;
- return 0;
-}
-
#endif /* MS_WINDOWS */
PyDoc_STRVAR(stat_result__doc__,
@@ -2019,6 +1771,9 @@ static PyStructSequence_Field stat_result_fields[] = {
#ifdef HAVE_STRUCT_STAT_ST_BIRTHTIME
{"st_birthtime", "time of creation"},
#endif
+#ifdef HAVE_STRUCT_STAT_ST_FILE_ATTRIBUTES
+ {"st_file_attributes", "Windows file attribute bits"},
+#endif
{0}
};
@@ -2058,6 +1813,12 @@ static PyStructSequence_Field stat_result_fields[] = {
#define ST_BIRTHTIME_IDX ST_GEN_IDX
#endif
+#ifdef HAVE_STRUCT_STAT_ST_FILE_ATTRIBUTES
+#define ST_FILE_ATTRIBUTES_IDX (ST_BIRTHTIME_IDX+1)
+#else
+#define ST_FILE_ATTRIBUTES_IDX ST_BIRTHTIME_IDX
+#endif
+
static PyStructSequence_Desc stat_result_desc = {
"stat_result", /* name */
stat_result__doc__, /* doc */
@@ -2159,10 +1920,12 @@ static int _stat_float_times = 1;
PyDoc_STRVAR(stat_float_times__doc__,
"stat_float_times([newval]) -> oldval\n\n\
Determine whether os.[lf]stat represents time stamps as float objects.\n\
-If newval is True, future calls to stat() return floats, if it is False,\n\
-future calls return ints. \n\
-If newval is omitted, return the current setting.\n");
+\n\
+If value is True, future calls to stat() return floats; if it is False,\n\
+future calls return ints.\n\
+If value is omitted, return the current setting.\n");
+/* AC 3.5: the public default value should be None, not ready for that yet */
static PyObject*
stat_float_times(PyObject* self, PyObject *args)
{
@@ -2322,6 +2085,10 @@ _pystat_fromstructstat(STRUCT_STAT *st)
PyStructSequence_SET_ITEM(v, ST_FLAGS_IDX,
PyLong_FromLong((long)st->st_flags));
#endif
+#ifdef HAVE_STRUCT_STAT_ST_FILE_ATTRIBUTES
+ PyStructSequence_SET_ITEM(v, ST_FILE_ATTRIBUTES_IDX,
+ PyLong_FromUnsignedLong(st->st_file_attributes));
+#endif
if (PyErr_Occurred()) {
Py_DECREF(v);
@@ -2385,12 +2152,181 @@ posix_do_stat(char *function_name, path_t *path,
return _pystat_fromstructstat(&st);
}
+/*[python input]
+
+for s in """
+
+FACCESSAT
+FCHMODAT
+FCHOWNAT
+FSTATAT
+LINKAT
+MKDIRAT
+MKFIFOAT
+MKNODAT
+OPENAT
+READLINKAT
+SYMLINKAT
+UNLINKAT
+
+""".strip().split():
+ s = s.strip()
+ print("""
+#ifdef HAVE_{s}
+ #define {s}_DIR_FD_CONVERTER dir_fd_converter
+#else
+ #define {s}_DIR_FD_CONVERTER dir_fd_unavailable
+#endif
+""".rstrip().format(s=s))
+
+for s in """
+
+FCHDIR
+FCHMOD
+FCHOWN
+FDOPENDIR
+FEXECVE
+FPATHCONF
+FSTATVFS
+FTRUNCATE
+
+""".strip().split():
+ s = s.strip()
+ print("""
+#ifdef HAVE_{s}
+ #define PATH_HAVE_{s} 1
+#else
+ #define PATH_HAVE_{s} 0
+#endif
+
+""".rstrip().format(s=s))
+[python start generated code]*/
+
+#ifdef HAVE_FACCESSAT
+ #define FACCESSAT_DIR_FD_CONVERTER dir_fd_converter
+#else
+ #define FACCESSAT_DIR_FD_CONVERTER dir_fd_unavailable
+#endif
+
+#ifdef HAVE_FCHMODAT
+ #define FCHMODAT_DIR_FD_CONVERTER dir_fd_converter
+#else
+ #define FCHMODAT_DIR_FD_CONVERTER dir_fd_unavailable
+#endif
+
+#ifdef HAVE_FCHOWNAT
+ #define FCHOWNAT_DIR_FD_CONVERTER dir_fd_converter
+#else
+ #define FCHOWNAT_DIR_FD_CONVERTER dir_fd_unavailable
+#endif
+
#ifdef HAVE_FSTATAT
- #define OS_STAT_DIR_FD_CONVERTER dir_fd_converter
+ #define FSTATAT_DIR_FD_CONVERTER dir_fd_converter
+#else
+ #define FSTATAT_DIR_FD_CONVERTER dir_fd_unavailable
+#endif
+
+#ifdef HAVE_LINKAT
+ #define LINKAT_DIR_FD_CONVERTER dir_fd_converter
+#else
+ #define LINKAT_DIR_FD_CONVERTER dir_fd_unavailable
+#endif
+
+#ifdef HAVE_MKDIRAT
+ #define MKDIRAT_DIR_FD_CONVERTER dir_fd_converter
+#else
+ #define MKDIRAT_DIR_FD_CONVERTER dir_fd_unavailable
+#endif
+
+#ifdef HAVE_MKFIFOAT
+ #define MKFIFOAT_DIR_FD_CONVERTER dir_fd_converter
+#else
+ #define MKFIFOAT_DIR_FD_CONVERTER dir_fd_unavailable
+#endif
+
+#ifdef HAVE_MKNODAT
+ #define MKNODAT_DIR_FD_CONVERTER dir_fd_converter
+#else
+ #define MKNODAT_DIR_FD_CONVERTER dir_fd_unavailable
+#endif
+
+#ifdef HAVE_OPENAT
+ #define OPENAT_DIR_FD_CONVERTER dir_fd_converter
+#else
+ #define OPENAT_DIR_FD_CONVERTER dir_fd_unavailable
+#endif
+
+#ifdef HAVE_READLINKAT
+ #define READLINKAT_DIR_FD_CONVERTER dir_fd_converter
+#else
+ #define READLINKAT_DIR_FD_CONVERTER dir_fd_unavailable
+#endif
+
+#ifdef HAVE_SYMLINKAT
+ #define SYMLINKAT_DIR_FD_CONVERTER dir_fd_converter
+#else
+ #define SYMLINKAT_DIR_FD_CONVERTER dir_fd_unavailable
+#endif
+
+#ifdef HAVE_UNLINKAT
+ #define UNLINKAT_DIR_FD_CONVERTER dir_fd_converter
+#else
+ #define UNLINKAT_DIR_FD_CONVERTER dir_fd_unavailable
+#endif
+
+#ifdef HAVE_FCHDIR
+ #define PATH_HAVE_FCHDIR 1
+#else
+ #define PATH_HAVE_FCHDIR 0
+#endif
+
+#ifdef HAVE_FCHMOD
+ #define PATH_HAVE_FCHMOD 1
+#else
+ #define PATH_HAVE_FCHMOD 0
+#endif
+
+#ifdef HAVE_FCHOWN
+ #define PATH_HAVE_FCHOWN 1
+#else
+ #define PATH_HAVE_FCHOWN 0
+#endif
+
+#ifdef HAVE_FDOPENDIR
+ #define PATH_HAVE_FDOPENDIR 1
#else
- #define OS_STAT_DIR_FD_CONVERTER dir_fd_unavailable
+ #define PATH_HAVE_FDOPENDIR 0
#endif
+#ifdef HAVE_FEXECVE
+ #define PATH_HAVE_FEXECVE 1
+#else
+ #define PATH_HAVE_FEXECVE 0
+#endif
+
+#ifdef HAVE_FPATHCONF
+ #define PATH_HAVE_FPATHCONF 1
+#else
+ #define PATH_HAVE_FPATHCONF 0
+#endif
+
+#ifdef HAVE_FSTATVFS
+ #define PATH_HAVE_FSTATVFS 1
+#else
+ #define PATH_HAVE_FSTATVFS 0
+#endif
+
+#ifdef HAVE_FTRUNCATE
+ #define PATH_HAVE_FTRUNCATE 1
+#else
+ #define PATH_HAVE_FTRUNCATE 0
+#endif
+/*[python end generated code: output=4bd4f6f7d41267f1 input=80b4c890b6774ea5]*/
+
+#ifdef MS_WINDOWS
+ #undef PATH_HAVE_FTRUNCATE
+ #define PATH_HAVE_FTRUNCATE 1
+#endif
/*[python input]
@@ -2405,22 +2341,25 @@ class path_t_converter(CConverter):
def converter_init(self, *, allow_fd=False, nullable=False):
# right now path_t doesn't support default values.
# to support a default value, you'll need to override initialize().
- if self.default is not unspecified:
+ if self.default not in (unspecified, None):
fail("Can't specify a default to the path_t converter!")
- if self.c_default is not None:
- fail("Can't specify a c_default to the path_t converter!")
+ if self.c_default not in (None, 'Py_None'):
+ raise RuntimeError("Can't specify a c_default to the path_t converter!")
self.nullable = nullable
self.allow_fd = allow_fd
def pre_render(self):
def strify(value):
+ if isinstance(value, str):
+ return value
return str(int(bool(value)))
# add self.py_name here when merging with posixmodule conversion
- self.c_default = 'PATH_T_INITIALIZE("{}", {}, {})'.format(
+ self.c_default = 'PATH_T_INITIALIZE("{}", "{}", {}, {})'.format(
self.function.name,
+ self.name,
strify(self.nullable),
strify(self.allow_fd),
)
@@ -2431,15 +2370,87 @@ class path_t_converter(CConverter):
class dir_fd_converter(CConverter):
type = 'int'
- converter = 'OS_STAT_DIR_FD_CONVERTER'
- def converter_init(self):
+ def converter_init(self, requires=None):
if self.default in (unspecified, None):
self.c_default = 'DEFAULT_DIR_FD'
+ if isinstance(requires, str):
+ self.converter = requires.upper() + '_DIR_FD_CONVERTER'
+ else:
+ self.converter = 'dir_fd_converter'
+class fildes_converter(CConverter):
+ type = 'int'
+ converter = 'fildes_converter'
+
+class uid_t_converter(CConverter):
+ type = "uid_t"
+ converter = '_Py_Uid_Converter'
+
+class gid_t_converter(CConverter):
+ type = "gid_t"
+ converter = '_Py_Gid_Converter'
+
+class dev_t_converter(CConverter):
+ type = 'dev_t'
+ converter = '_Py_Dev_Converter'
+
+class dev_t_return_converter(unsigned_long_return_converter):
+ type = 'dev_t'
+ conversion_fn = '_PyLong_FromDev'
+ unsigned_cast = '(dev_t)'
+
+class FSConverter_converter(CConverter):
+ type = 'PyObject *'
+ converter = 'PyUnicode_FSConverter'
+ def converter_init(self):
+ if self.default is not unspecified:
+ fail("FSConverter_converter does not support default values")
+ self.c_default = 'NULL'
+
+ def cleanup(self):
+ return "Py_XDECREF(" + self.name + ");\n"
+
+class pid_t_converter(CConverter):
+ type = 'pid_t'
+ format_unit = '" _Py_PARSE_PID "'
+
+class idtype_t_converter(int_converter):
+ type = 'idtype_t'
+
+class id_t_converter(CConverter):
+ type = 'id_t'
+ format_unit = '" _Py_PARSE_PID "'
+
+class Py_intptr_t_converter(CConverter):
+ type = 'Py_intptr_t'
+ format_unit = '" _Py_PARSE_INTPTR "'
+
+class Py_off_t_converter(CConverter):
+ type = 'Py_off_t'
+ converter = 'Py_off_t_converter'
+
+class Py_off_t_return_converter(long_return_converter):
+ type = 'Py_off_t'
+ conversion_fn = 'PyLong_FromPy_off_t'
+
+class path_confname_converter(CConverter):
+ type="int"
+ converter="conv_path_confname"
+
+class confstr_confname_converter(path_confname_converter):
+ converter='conv_confstr_confname'
+
+class sysconf_confname_converter(path_confname_converter):
+ converter="conv_sysconf_confname"
+
+class sched_param_converter(CConverter):
+ type = 'struct sched_param'
+ converter = 'convert_sched_param'
+ impl_by_reference = True;
[python start generated code]*/
-/*[python end generated code: output=da39a3ee5e6b4b0d input=5c9f456f53244fc3]*/
+/*[python end generated code: output=da39a3ee5e6b4b0d input=affe68316f160401]*/
/*[clinic input]
@@ -2450,7 +2461,7 @@ os.stat
*
- dir_fd : dir_fd = None
+ dir_fd : dir_fd(requires='fstatat') = None
If not None, it should be a file descriptor open to a directory,
and path should be a relative string; path will then be relative to
that directory.
@@ -2471,103 +2482,41 @@ It's an error to use dir_fd or follow_symlinks when specifying path as
[clinic start generated code]*/
-PyDoc_STRVAR(os_stat__doc__,
-"stat($module, /, path, *, dir_fd=None, follow_symlinks=True)\n"
-"--\n"
-"\n"
-"Perform a stat system call on the given path.\n"
-"\n"
-" path\n"
-" Path to be examined; can be string, bytes, or open-file-descriptor int.\n"
-" dir_fd\n"
-" If not None, it should be a file descriptor open to a directory,\n"
-" and path should be a relative string; path will then be relative to\n"
-" that directory.\n"
-" follow_symlinks\n"
-" If False, and the last element of the path is a symbolic link,\n"
-" stat will examine the symbolic link itself instead of the file\n"
-" the link points to.\n"
-"\n"
-"dir_fd and follow_symlinks may not be implemented\n"
-" on your platform. If they are unavailable, using them will raise a\n"
-" NotImplementedError.\n"
-"\n"
-"It\'s an error to use dir_fd or follow_symlinks when specifying path as\n"
-" an open file descriptor.");
-
-#define OS_STAT_METHODDEF \
- {"stat", (PyCFunction)os_stat, METH_VARARGS|METH_KEYWORDS, os_stat__doc__},
-
-static PyObject *
-os_stat_impl(PyModuleDef *module, path_t *path, int dir_fd, int follow_symlinks);
-
static PyObject *
-os_stat(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+os_stat_impl(PyModuleDef *module, path_t *path, int dir_fd,
+ int follow_symlinks)
+/*[clinic end generated code: output=e4f7569f95d523ca input=099d356c306fa24a]*/
{
- PyObject *return_value = NULL;
- static char *_keywords[] = {"path", "dir_fd", "follow_symlinks", NULL};
- path_t path = PATH_T_INITIALIZE("stat", 0, 1);
- int dir_fd = DEFAULT_DIR_FD;
- int follow_symlinks = 1;
+ return posix_do_stat("stat", path, dir_fd, follow_symlinks);
+}
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O&|$O&p:stat", _keywords,
- path_converter, &path, OS_STAT_DIR_FD_CONVERTER, &dir_fd, &follow_symlinks))
- goto exit;
- return_value = os_stat_impl(module, &path, dir_fd, follow_symlinks);
-exit:
- /* Cleanup for path */
- path_cleanup(&path);
+/*[clinic input]
+os.lstat
- return return_value;
-}
+ path : path_t
-static PyObject *
-os_stat_impl(PyModuleDef *module, path_t *path, int dir_fd, int follow_symlinks)
-/*[clinic end generated code: output=f1dcaa5e24db9882 input=5ae155bd475fd20a]*/
-{
- return posix_do_stat("stat", path, dir_fd, follow_symlinks);
-}
+ *
+
+ dir_fd : dir_fd(requires='fstatat') = None
-PyDoc_STRVAR(posix_lstat__doc__,
-"lstat(path, *, dir_fd=None) -> stat result\n\n\
-Like stat(), but do not follow symbolic links.\n\
-Equivalent to stat(path, follow_symlinks=False).");
+Perform a stat system call on the given path, without following symbolic links.
+
+Like stat(), but do not follow symbolic links.
+Equivalent to stat(path, follow_symlinks=False).
+[clinic start generated code]*/
static PyObject *
-posix_lstat(PyObject *self, PyObject *args, PyObject *kwargs)
+os_lstat_impl(PyModuleDef *module, path_t *path, int dir_fd)
+/*[clinic end generated code: output=7a748e333fcb39bd input=0b7474765927b925]*/
{
- static char *keywords[] = {"path", "dir_fd", NULL};
- path_t path;
- int dir_fd = DEFAULT_DIR_FD;
int follow_symlinks = 0;
- PyObject *return_value;
-
- memset(&path, 0, sizeof(path));
- path.function_name = "lstat";
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&|$O&:lstat", keywords,
- path_converter, &path,
-#ifdef HAVE_FSTATAT
- dir_fd_converter, &dir_fd
-#else
- dir_fd_unavailable, &dir_fd
-#endif
- ))
- return NULL;
- return_value = posix_do_stat("lstat", &path, dir_fd, follow_symlinks);
- path_cleanup(&path);
- return return_value;
+ return posix_do_stat("lstat", path, dir_fd, follow_symlinks);
}
-#ifdef HAVE_FACCESSAT
- #define OS_ACCESS_DIR_FD_CONVERTER dir_fd_converter
-#else
- #define OS_ACCESS_DIR_FD_CONVERTER dir_fd_unavailable
-#endif
/*[clinic input]
-os.access
+os.access -> bool
path: path_t(allow_fd=True)
Path to be tested; can be string, bytes, or open-file-descriptor int.
@@ -2578,7 +2527,7 @@ os.access
*
- dir_fd : dir_fd = None
+ dir_fd : dir_fd(requires='faccessat') = None
If not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that
directory.
@@ -2605,73 +2554,12 @@ Note that most operations will use the effective uid/gid, therefore this
[clinic start generated code]*/
-PyDoc_STRVAR(os_access__doc__,
-"access($module, /, path, mode, *, dir_fd=None, effective_ids=False,\n"
-" follow_symlinks=True)\n"
-"--\n"
-"\n"
-"Use the real uid/gid to test for access to a path.\n"
-"\n"
-" path\n"
-" Path to be tested; can be string, bytes, or open-file-descriptor int.\n"
-" mode\n"
-" Operating-system mode bitfield. Can be F_OK to test existence,\n"
-" or the inclusive-OR of R_OK, W_OK, and X_OK.\n"
-" dir_fd\n"
-" If not None, it should be a file descriptor open to a directory,\n"
-" and path should be relative; path will then be relative to that\n"
-" directory.\n"
-" effective_ids\n"
-" If True, access will use the effective uid/gid instead of\n"
-" the real uid/gid.\n"
-" follow_symlinks\n"
-" If False, and the last element of the path is a symbolic link,\n"
-" access will examine the symbolic link itself instead of the file\n"
-" the link points to.\n"
-"\n"
-"dir_fd, effective_ids, and follow_symlinks may not be implemented\n"
-" on your platform. If they are unavailable, using them will raise a\n"
-" NotImplementedError.\n"
-"\n"
-"Note that most operations will use the effective uid/gid, therefore this\n"
-" routine can be used in a suid/sgid environment to test if the invoking user\n"
-" has the specified access to the path.");
-
-#define OS_ACCESS_METHODDEF \
- {"access", (PyCFunction)os_access, METH_VARARGS|METH_KEYWORDS, os_access__doc__},
-
-static PyObject *
-os_access_impl(PyModuleDef *module, path_t *path, int mode, int dir_fd, int effective_ids, int follow_symlinks);
-
-static PyObject *
-os_access(PyModuleDef *module, PyObject *args, PyObject *kwargs)
-{
- PyObject *return_value = NULL;
- static char *_keywords[] = {"path", "mode", "dir_fd", "effective_ids", "follow_symlinks", NULL};
- path_t path = PATH_T_INITIALIZE("access", 0, 1);
- int mode;
- int dir_fd = DEFAULT_DIR_FD;
- int effective_ids = 0;
- int follow_symlinks = 1;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O&i|$O&pp:access", _keywords,
- path_converter, &path, &mode, OS_STAT_DIR_FD_CONVERTER, &dir_fd, &effective_ids, &follow_symlinks))
- goto exit;
- return_value = os_access_impl(module, &path, mode, dir_fd, effective_ids, follow_symlinks);
-
-exit:
- /* Cleanup for path */
- path_cleanup(&path);
-
- return return_value;
-}
-
-static PyObject *
-os_access_impl(PyModuleDef *module, path_t *path, int mode, int dir_fd, int effective_ids, int follow_symlinks)
-/*[clinic end generated code: output=a6ed4f151be9df0f input=2e2e7594371f5b7e]*/
+static int
+os_access_impl(PyModuleDef *module, path_t *path, int mode, int dir_fd,
+ int effective_ids, int follow_symlinks)
+/*[clinic end generated code: output=abaa53340210088d input=b75a756797af45ec]*/
{
- PyObject *return_value = NULL;
+ int return_value;
#ifdef MS_WINDOWS
DWORD attr;
@@ -2681,11 +2569,11 @@ os_access_impl(PyModuleDef *module, path_t *path, int mode, int dir_fd, int effe
#ifndef HAVE_FACCESSAT
if (follow_symlinks_specified("access", follow_symlinks))
- goto exit;
+ return -1;
if (effective_ids) {
argument_unavailable_error("access", "effective_ids");
- goto exit;
+ return -1;
}
#endif
@@ -2705,11 +2593,10 @@ os_access_impl(PyModuleDef *module, path_t *path, int mode, int dir_fd, int effe
* * or it's a directory.
* (Directories cannot be read-only on Windows.)
*/
- return_value = PyBool_FromLong(
- (attr != INVALID_FILE_ATTRIBUTES) &&
+ return_value = (attr != INVALID_FILE_ATTRIBUTES) &&
(!(mode & 2) ||
!(attr & FILE_ATTRIBUTE_READONLY) ||
- (attr & FILE_ATTRIBUTE_DIRECTORY)));
+ (attr & FILE_ATTRIBUTE_DIRECTORY));
#else
Py_BEGIN_ALLOW_THREADS
@@ -2728,12 +2615,9 @@ os_access_impl(PyModuleDef *module, path_t *path, int mode, int dir_fd, int effe
#endif
result = access(path->narrow, mode);
Py_END_ALLOW_THREADS
- return_value = PyBool_FromLong(!result);
+ return_value = !result;
#endif
-#ifndef HAVE_FACCESSAT
-exit:
-#endif
return return_value;
}
@@ -2752,7 +2636,6 @@ exit:
#ifdef HAVE_TTYNAME
-
/*[clinic input]
os.ttyname -> DecodeFSDefault
@@ -2764,44 +2647,9 @@ os.ttyname -> DecodeFSDefault
Return the name of the terminal device connected to 'fd'.
[clinic start generated code]*/
-PyDoc_STRVAR(os_ttyname__doc__,
-"ttyname($module, fd, /)\n"
-"--\n"
-"\n"
-"Return the name of the terminal device connected to \'fd\'.\n"
-"\n"
-" fd\n"
-" Integer file descriptor handle.");
-
-#define OS_TTYNAME_METHODDEF \
- {"ttyname", (PyCFunction)os_ttyname, METH_VARARGS, os_ttyname__doc__},
-
-static char *
-os_ttyname_impl(PyModuleDef *module, int fd);
-
-static PyObject *
-os_ttyname(PyModuleDef *module, PyObject *args)
-{
- PyObject *return_value = NULL;
- int fd;
- char *_return_value;
-
- if (!PyArg_ParseTuple(args,
- "i:ttyname",
- &fd))
- goto exit;
- _return_value = os_ttyname_impl(module, fd);
- if (_return_value == NULL)
- goto exit;
- return_value = PyUnicode_DecodeFSDefault(_return_value);
-
-exit:
- return return_value;
-}
-
static char *
os_ttyname_impl(PyModuleDef *module, int fd)
-/*[clinic end generated code: output=cee7bc4cffec01a2 input=5f72ca83e76b3b45]*/
+/*[clinic end generated code: output=03ad3d5ccaef75c3 input=5f72ca83e76b3b45]*/
{
char *ret;
@@ -2810,17 +2658,18 @@ os_ttyname_impl(PyModuleDef *module, int fd)
posix_error();
return ret;
}
-#else
-#define OS_TTYNAME_METHODDEF
#endif
#ifdef HAVE_CTERMID
-PyDoc_STRVAR(posix_ctermid__doc__,
-"ctermid() -> string\n\n\
-Return the name of the controlling terminal for this process.");
+/*[clinic input]
+os.ctermid
+
+Return the name of the controlling terminal for this process.
+[clinic start generated code]*/
static PyObject *
-posix_ctermid(PyObject *self, PyObject *noargs)
+os_ctermid_impl(PyModuleDef *module)
+/*[clinic end generated code: output=1b73788201e0aebd input=3b87fdd52556382d]*/
{
char *ret;
char buffer[L_ctermid];
@@ -2834,106 +2683,112 @@ posix_ctermid(PyObject *self, PyObject *noargs)
return posix_error();
return PyUnicode_DecodeFSDefault(buffer);
}
-#endif
+#endif /* HAVE_CTERMID */
-PyDoc_STRVAR(posix_chdir__doc__,
-"chdir(path)\n\n\
-Change the current working directory to the specified path.\n\
-\n\
-path may always be specified as a string.\n\
-On some platforms, path may also be specified as an open file descriptor.\n\
- If this functionality is unavailable, using it raises an exception.");
+
+/*[clinic input]
+os.chdir
+
+ path: path_t(allow_fd='PATH_HAVE_FCHDIR')
+
+Change the current working directory to the specified path.
+
+path may always be specified as a string.
+On some platforms, path may also be specified as an open file descriptor.
+ If this functionality is unavailable, using it raises an exception.
+[clinic start generated code]*/
static PyObject *
-posix_chdir(PyObject *self, PyObject *args, PyObject *kwargs)
+os_chdir_impl(PyModuleDef *module, path_t *path)
+/*[clinic end generated code: output=7358e3a20fb5aa93 input=1a4a15b4d12cb15d]*/
{
- path_t path;
int result;
- PyObject *return_value = NULL;
- static char *keywords[] = {"path", NULL};
-
- memset(&path, 0, sizeof(path));
- path.function_name = "chdir";
-#ifdef HAVE_FCHDIR
- path.allow_fd = 1;
-#endif
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&:chdir", keywords,
- path_converter, &path
- ))
- return NULL;
Py_BEGIN_ALLOW_THREADS
#ifdef MS_WINDOWS
- if (path.wide)
- result = win32_wchdir(path.wide);
+ if (path->wide)
+ result = win32_wchdir(path->wide);
else
- result = win32_chdir(path.narrow);
+ result = win32_chdir(path->narrow);
result = !result; /* on unix, success = 0, on windows, success = !0 */
#else
#ifdef HAVE_FCHDIR
- if (path.fd != -1)
- result = fchdir(path.fd);
+ if (path->fd != -1)
+ result = fchdir(path->fd);
else
#endif
- result = chdir(path.narrow);
+ result = chdir(path->narrow);
#endif
Py_END_ALLOW_THREADS
if (result) {
- return_value = path_error(&path);
- goto exit;
+ return path_error(path);
}
- return_value = Py_None;
- Py_INCREF(Py_None);
-
-exit:
- path_cleanup(&path);
- return return_value;
+ Py_RETURN_NONE;
}
+
#ifdef HAVE_FCHDIR
-PyDoc_STRVAR(posix_fchdir__doc__,
-"fchdir(fd)\n\n\
-Change to the directory of the given file descriptor. fd must be\n\
-opened on a directory, not a file. Equivalent to os.chdir(fd).");
+/*[clinic input]
+os.fchdir
+
+ fd: fildes
+
+Change to the directory of the given file descriptor.
+
+fd must be opened on a directory, not a file.
+Equivalent to os.chdir(fd).
+
+[clinic start generated code]*/
static PyObject *
-posix_fchdir(PyObject *self, PyObject *fdobj)
+os_fchdir_impl(PyModuleDef *module, int fd)
+/*[clinic end generated code: output=361d30df6b2d3418 input=18e816479a2fa985]*/
{
- return posix_fildes(fdobj, fchdir);
+ return posix_fildes_fd(fd, fchdir);
}
#endif /* HAVE_FCHDIR */
-PyDoc_STRVAR(posix_chmod__doc__,
-"chmod(path, mode, *, dir_fd=None, follow_symlinks=True)\n\n\
-Change the access permissions of a file.\n\
-\n\
-path may always be specified as a string.\n\
-On some platforms, path may also be specified as an open file descriptor.\n\
- If this functionality is unavailable, using it raises an exception.\n\
-If dir_fd is not None, it should be a file descriptor open to a directory,\n\
- and path should be relative; path will then be relative to that directory.\n\
-If follow_symlinks is False, and the last element of the path is a symbolic\n\
- link, chmod will modify the symbolic link itself instead of the file the\n\
- link points to.\n\
-It is an error to use dir_fd or follow_symlinks when specifying path as\n\
- an open file descriptor.\n\
-dir_fd and follow_symlinks may not be implemented on your platform.\n\
- If they are unavailable, using them will raise a NotImplementedError.");
+/*[clinic input]
+os.chmod
+
+ path: path_t(allow_fd='PATH_HAVE_FCHMOD')
+ Path to be modified. May always be specified as a str or bytes.
+ On some platforms, path may also be specified as an open file descriptor.
+ If this functionality is unavailable, using it raises an exception.
+
+ mode: int
+ Operating-system mode bitfield.
+
+ *
+
+ dir_fd : dir_fd(requires='fchmodat') = None
+ If not None, it should be a file descriptor open to a directory,
+ and path should be relative; path will then be relative to that
+ directory.
+
+ follow_symlinks: bool = True
+ If False, and the last element of the path is a symbolic link,
+ chmod will modify the symbolic link itself instead of the file
+ the link points to.
+
+Change the access permissions of a file.
+
+It is an error to use dir_fd or follow_symlinks when specifying path as
+ an open file descriptor.
+dir_fd and follow_symlinks may not be implemented on your platform.
+ If they are unavailable, using them will raise a NotImplementedError.
+
+[clinic start generated code]*/
static PyObject *
-posix_chmod(PyObject *self, PyObject *args, PyObject *kwargs)
+os_chmod_impl(PyModuleDef *module, path_t *path, int mode, int dir_fd,
+ int follow_symlinks)
+/*[clinic end generated code: output=05e7f73b1a843ba2 input=7f1618e5e15cc196]*/
{
- path_t path;
- int mode;
- int dir_fd = DEFAULT_DIR_FD;
- int follow_symlinks = 1;
int result;
- PyObject *return_value = NULL;
- static char *keywords[] = {"path", "mode", "dir_fd",
- "follow_symlinks", NULL};
#ifdef MS_WINDOWS
DWORD attr;
@@ -2943,33 +2798,17 @@ posix_chmod(PyObject *self, PyObject *args, PyObject *kwargs)
int fchmodat_nofollow_unsupported = 0;
#endif
- memset(&path, 0, sizeof(path));
- path.function_name = "chmod";
-#ifdef HAVE_FCHMOD
- path.allow_fd = 1;
-#endif
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&i|$O&p:chmod", keywords,
- path_converter, &path,
- &mode,
-#ifdef HAVE_FCHMODAT
- dir_fd_converter, &dir_fd,
-#else
- dir_fd_unavailable, &dir_fd,
-#endif
- &follow_symlinks))
- return NULL;
-
#if !(defined(HAVE_FCHMODAT) || defined(HAVE_LCHMOD))
if (follow_symlinks_specified("chmod", follow_symlinks))
- goto exit;
+ return NULL;
#endif
#ifdef MS_WINDOWS
Py_BEGIN_ALLOW_THREADS
- if (path.wide)
- attr = GetFileAttributesW(path.wide);
+ if (path->wide)
+ attr = GetFileAttributesW(path->wide);
else
- attr = GetFileAttributesA(path.narrow);
+ attr = GetFileAttributesA(path->narrow);
if (attr == INVALID_FILE_ATTRIBUTES)
result = 0;
else {
@@ -2977,27 +2816,26 @@ posix_chmod(PyObject *self, PyObject *args, PyObject *kwargs)
attr &= ~FILE_ATTRIBUTE_READONLY;
else
attr |= FILE_ATTRIBUTE_READONLY;
- if (path.wide)
- result = SetFileAttributesW(path.wide, attr);
+ if (path->wide)
+ result = SetFileAttributesW(path->wide, attr);
else
- result = SetFileAttributesA(path.narrow, attr);
+ result = SetFileAttributesA(path->narrow, attr);
}
Py_END_ALLOW_THREADS
if (!result) {
- return_value = path_error(&path);
- goto exit;
+ return path_error(path);
}
#else /* MS_WINDOWS */
Py_BEGIN_ALLOW_THREADS
#ifdef HAVE_FCHMOD
- if (path.fd != -1)
- result = fchmod(path.fd, mode);
+ if (path->fd != -1)
+ result = fchmod(path->fd, mode);
else
#endif
#ifdef HAVE_LCHMOD
if ((!follow_symlinks) && (dir_fd == DEFAULT_DIR_FD))
- result = lchmod(path.narrow, mode);
+ result = lchmod(path->narrow, mode);
else
#endif
#ifdef HAVE_FCHMODAT
@@ -3012,7 +2850,7 @@ posix_chmod(PyObject *self, PyObject *args, PyObject *kwargs)
* support dir_fd and follow_symlinks=False. (Hopefully.)
* Until then, we need to be careful what exception we raise.
*/
- result = fchmodat(dir_fd, path.narrow, mode,
+ result = fchmodat(dir_fd, path->narrow, mode,
follow_symlinks ? 0 : AT_SYMLINK_NOFOLLOW);
/*
* But wait! We can't throw the exception without allowing threads,
@@ -3025,7 +2863,7 @@ posix_chmod(PyObject *self, PyObject *args, PyObject *kwargs)
}
else
#endif
- result = chmod(path.narrow, mode);
+ result = chmod(path->narrow, mode);
Py_END_ALLOW_THREADS
if (result) {
@@ -3039,272 +2877,289 @@ posix_chmod(PyObject *self, PyObject *args, PyObject *kwargs)
}
else
#endif
- return_value = path_error(&path);
- goto exit;
+ return path_error(path);
}
#endif
- Py_INCREF(Py_None);
- return_value = Py_None;
-exit:
- path_cleanup(&path);
- return return_value;
+ Py_RETURN_NONE;
}
#ifdef HAVE_FCHMOD
-PyDoc_STRVAR(posix_fchmod__doc__,
-"fchmod(fd, mode)\n\n\
-Change the access permissions of the file given by file\n\
-descriptor fd. Equivalent to os.chmod(fd, mode).");
+/*[clinic input]
+os.fchmod
+
+ fd: int
+ mode: int
+
+Change the access permissions of the file given by file descriptor fd.
+
+Equivalent to os.chmod(fd, mode).
+[clinic start generated code]*/
static PyObject *
-posix_fchmod(PyObject *self, PyObject *args)
+os_fchmod_impl(PyModuleDef *module, int fd, int mode)
+/*[clinic end generated code: output=2ee31ca226d1ed33 input=8ab11975ca01ee5b]*/
{
- int fd, mode, res;
- if (!PyArg_ParseTuple(args, "ii:fchmod", &fd, &mode))
- return NULL;
- Py_BEGIN_ALLOW_THREADS
- res = fchmod(fd, mode);
- Py_END_ALLOW_THREADS
- if (res < 0)
- return posix_error();
+ int res;
+ int async_err = 0;
+
+ do {
+ Py_BEGIN_ALLOW_THREADS
+ res = fchmod(fd, mode);
+ Py_END_ALLOW_THREADS
+ } while (res != 0 && errno == EINTR && !(async_err = PyErr_CheckSignals()));
+ if (res != 0)
+ return (!async_err) ? posix_error() : NULL;
+
Py_RETURN_NONE;
}
#endif /* HAVE_FCHMOD */
+
#ifdef HAVE_LCHMOD
-PyDoc_STRVAR(posix_lchmod__doc__,
-"lchmod(path, mode)\n\n\
-Change the access permissions of a file. If path is a symlink, this\n\
-affects the link itself rather than the target.\n\
-Equivalent to chmod(path, mode, follow_symlinks=False).");
+/*[clinic input]
+os.lchmod
+
+ path: path_t
+ mode: int
+
+Change the access permissions of a file, without following symbolic links.
+
+If path is a symlink, this affects the link itself rather than the target.
+Equivalent to chmod(path, mode, follow_symlinks=False)."
+[clinic start generated code]*/
static PyObject *
-posix_lchmod(PyObject *self, PyObject *args)
+os_lchmod_impl(PyModuleDef *module, path_t *path, int mode)
+/*[clinic end generated code: output=7c0cc46588d89e46 input=90c5663c7465d24f]*/
{
- path_t path;
- int i;
int res;
- memset(&path, 0, sizeof(path));
- path.function_name = "lchmod";
- if (!PyArg_ParseTuple(args, "O&i:lchmod",
- path_converter, &path, &i))
- return NULL;
Py_BEGIN_ALLOW_THREADS
- res = lchmod(path.narrow, i);
+ res = lchmod(path->narrow, mode);
Py_END_ALLOW_THREADS
if (res < 0) {
- path_error(&path);
- path_cleanup(&path);
+ path_error(path);
return NULL;
}
- path_cleanup(&path);
Py_RETURN_NONE;
}
#endif /* HAVE_LCHMOD */
#ifdef HAVE_CHFLAGS
-PyDoc_STRVAR(posix_chflags__doc__,
-"chflags(path, flags, *, follow_symlinks=True)\n\n\
-Set file flags.\n\
-\n\
-If follow_symlinks is False, and the last element of the path is a symbolic\n\
- link, chflags will change flags on the symbolic link itself instead of the\n\
- file the link points to.\n\
-follow_symlinks may not be implemented on your platform. If it is\n\
-unavailable, using it will raise a NotImplementedError.");
+/*[clinic input]
+os.chflags
+
+ path: path_t
+ flags: unsigned_long(bitwise=True)
+ follow_symlinks: bool=True
+
+Set file flags.
+
+If follow_symlinks is False, and the last element of the path is a symbolic
+ link, chflags will change flags on the symbolic link itself instead of the
+ file the link points to.
+follow_symlinks may not be implemented on your platform. If it is
+unavailable, using it will raise a NotImplementedError.
+
+[clinic start generated code]*/
static PyObject *
-posix_chflags(PyObject *self, PyObject *args, PyObject *kwargs)
+os_chflags_impl(PyModuleDef *module, path_t *path, unsigned long flags,
+ int follow_symlinks)
+/*[clinic end generated code: output=ff2d6e73534a95b9 input=0327e29feb876236]*/
{
- path_t path;
- unsigned long flags;
- int follow_symlinks = 1;
int result;
- PyObject *return_value = NULL;
- static char *keywords[] = {"path", "flags", "follow_symlinks", NULL};
-
- memset(&path, 0, sizeof(path));
- path.function_name = "chflags";
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&k|$i:chflags", keywords,
- path_converter, &path,
- &flags, &follow_symlinks))
- return NULL;
#ifndef HAVE_LCHFLAGS
if (follow_symlinks_specified("chflags", follow_symlinks))
- goto exit;
+ return NULL;
#endif
Py_BEGIN_ALLOW_THREADS
#ifdef HAVE_LCHFLAGS
if (!follow_symlinks)
- result = lchflags(path.narrow, flags);
+ result = lchflags(path->narrow, flags);
else
#endif
- result = chflags(path.narrow, flags);
+ result = chflags(path->narrow, flags);
Py_END_ALLOW_THREADS
- if (result) {
- return_value = path_error(&path);
- goto exit;
- }
-
- return_value = Py_None;
- Py_INCREF(Py_None);
+ if (result)
+ return path_error(path);
-exit:
- path_cleanup(&path);
- return return_value;
+ Py_RETURN_NONE;
}
#endif /* HAVE_CHFLAGS */
+
#ifdef HAVE_LCHFLAGS
-PyDoc_STRVAR(posix_lchflags__doc__,
-"lchflags(path, flags)\n\n\
-Set file flags.\n\
-This function will not follow symbolic links.\n\
-Equivalent to chflags(path, flags, follow_symlinks=False).");
+/*[clinic input]
+os.lchflags
+
+ path: path_t
+ flags: unsigned_long(bitwise=True)
+
+Set file flags.
+
+This function will not follow symbolic links.
+Equivalent to chflags(path, flags, follow_symlinks=False).
+[clinic start generated code]*/
static PyObject *
-posix_lchflags(PyObject *self, PyObject *args)
+os_lchflags_impl(PyModuleDef *module, path_t *path, unsigned long flags)
+/*[clinic end generated code: output=6741322fb949661b input=f9f82ea8b585ca9d]*/
{
- path_t path;
- unsigned long flags;
int res;
- memset(&path, 0, sizeof(path));
- path.function_name = "lchflags";
- if (!PyArg_ParseTuple(args, "O&k:lchflags",
- path_converter, &path, &flags))
- return NULL;
Py_BEGIN_ALLOW_THREADS
- res = lchflags(path.narrow, flags);
+ res = lchflags(path->narrow, flags);
Py_END_ALLOW_THREADS
if (res < 0) {
- path_error(&path);
- path_cleanup(&path);
- return NULL;
+ return path_error(path);
}
- path_cleanup(&path);
Py_RETURN_NONE;
}
#endif /* HAVE_LCHFLAGS */
+
#ifdef HAVE_CHROOT
-PyDoc_STRVAR(posix_chroot__doc__,
-"chroot(path)\n\n\
-Change root directory to path.");
+/*[clinic input]
+os.chroot
+ path: path_t
+
+Change root directory to path.
+
+[clinic start generated code]*/
static PyObject *
-posix_chroot(PyObject *self, PyObject *args)
+os_chroot_impl(PyModuleDef *module, path_t *path)
+/*[clinic end generated code: output=b6dbfabe74ecaa9d input=14822965652c3dc3]*/
{
- return posix_1str("chroot", args, "O&:chroot", chroot);
+ int res;
+ Py_BEGIN_ALLOW_THREADS
+ res = chroot(path->narrow);
+ Py_END_ALLOW_THREADS
+ if (res < 0)
+ return path_error(path);
+ Py_RETURN_NONE;
}
-#endif
+#endif /* HAVE_CHROOT */
+
#ifdef HAVE_FSYNC
-PyDoc_STRVAR(posix_fsync__doc__,
-"fsync(fildes)\n\n\
-force write of file with filedescriptor to disk.");
+/*[clinic input]
+os.fsync
+
+ fd: fildes
+
+Force write of fd to disk.
+[clinic start generated code]*/
static PyObject *
-posix_fsync(PyObject *self, PyObject *fdobj)
+os_fsync_impl(PyModuleDef *module, int fd)
+/*[clinic end generated code: output=83a350851064aea7 input=21c3645c056967f2]*/
{
- return posix_fildes(fdobj, fsync);
+ return posix_fildes_fd(fd, fsync);
}
#endif /* HAVE_FSYNC */
+
#ifdef HAVE_SYNC
-PyDoc_STRVAR(posix_sync__doc__,
-"sync()\n\n\
-Force write of everything to disk.");
+/*[clinic input]
+os.sync
+
+Force write of everything to disk.
+[clinic start generated code]*/
static PyObject *
-posix_sync(PyObject *self, PyObject *noargs)
+os_sync_impl(PyModuleDef *module)
+/*[clinic end generated code: output=ba524f656c201c40 input=84749fe5e9b404ff]*/
{
Py_BEGIN_ALLOW_THREADS
sync();
Py_END_ALLOW_THREADS
Py_RETURN_NONE;
}
-#endif
+#endif /* HAVE_SYNC */
-#ifdef HAVE_FDATASYNC
+#ifdef HAVE_FDATASYNC
#ifdef __hpux
extern int fdatasync(int); /* On HP-UX, in libc but not in unistd.h */
#endif
-PyDoc_STRVAR(posix_fdatasync__doc__,
-"fdatasync(fildes)\n\n\
-force write of file with filedescriptor to disk.\n\
- does not force update of metadata.");
+/*[clinic input]
+os.fdatasync
+
+ fd: fildes
+
+Force write of fd to disk without forcing update of metadata.
+[clinic start generated code]*/
static PyObject *
-posix_fdatasync(PyObject *self, PyObject *fdobj)
+os_fdatasync_impl(PyModuleDef *module, int fd)
+/*[clinic end generated code: output=e0f04a3aff515b75 input=bc74791ee54dd291]*/
{
- return posix_fildes(fdobj, fdatasync);
+ return posix_fildes_fd(fd, fdatasync);
}
#endif /* HAVE_FDATASYNC */
#ifdef HAVE_CHOWN
-PyDoc_STRVAR(posix_chown__doc__,
-"chown(path, uid, gid, *, dir_fd=None, follow_symlinks=True)\n\n\
-Change the owner and group id of path to the numeric uid and gid.\n\
-\n\
-path may always be specified as a string.\n\
-On some platforms, path may also be specified as an open file descriptor.\n\
- If this functionality is unavailable, using it raises an exception.\n\
-If dir_fd is not None, it should be a file descriptor open to a directory,\n\
- and path should be relative; path will then be relative to that directory.\n\
-If follow_symlinks is False, and the last element of the path is a symbolic\n\
- link, chown will modify the symbolic link itself instead of the file the\n\
- link points to.\n\
-It is an error to use dir_fd or follow_symlinks when specifying path as\n\
- an open file descriptor.\n\
-dir_fd and follow_symlinks may not be implemented on your platform.\n\
- If they are unavailable, using them will raise a NotImplementedError.");
+/*[clinic input]
+os.chown
+
+ path : path_t(allow_fd='PATH_HAVE_FCHOWN')
+ Path to be examined; can be string, bytes, or open-file-descriptor int.
+
+ uid: uid_t
+
+ gid: gid_t
+
+ *
+
+ dir_fd : dir_fd(requires='fchownat') = None
+ If not None, it should be a file descriptor open to a directory,
+ and path should be relative; path will then be relative to that
+ directory.
+
+ follow_symlinks: bool = True
+ If False, and the last element of the path is a symbolic link,
+ stat will examine the symbolic link itself instead of the file
+ the link points to.
+
+Change the owner and group id of path to the numeric uid and gid.\
+
+path may always be specified as a string.
+On some platforms, path may also be specified as an open file descriptor.
+ If this functionality is unavailable, using it raises an exception.
+If dir_fd is not None, it should be a file descriptor open to a directory,
+ and path should be relative; path will then be relative to that directory.
+If follow_symlinks is False, and the last element of the path is a symbolic
+ link, chown will modify the symbolic link itself instead of the file the
+ link points to.
+It is an error to use dir_fd or follow_symlinks when specifying path as
+ an open file descriptor.
+dir_fd and follow_symlinks may not be implemented on your platform.
+ If they are unavailable, using them will raise a NotImplementedError.
+
+[clinic start generated code]*/
static PyObject *
-posix_chown(PyObject *self, PyObject *args, PyObject *kwargs)
+os_chown_impl(PyModuleDef *module, path_t *path, uid_t uid, gid_t gid,
+ int dir_fd, int follow_symlinks)
+/*[clinic end generated code: output=e0a4559f394dbd91 input=a61cc35574814d5d]*/
{
- path_t path;
- uid_t uid;
- gid_t gid;
- int dir_fd = DEFAULT_DIR_FD;
- int follow_symlinks = 1;
int result;
- PyObject *return_value = NULL;
- static char *keywords[] = {"path", "uid", "gid", "dir_fd",
- "follow_symlinks", NULL};
-
- memset(&path, 0, sizeof(path));
- path.function_name = "chown";
-#ifdef HAVE_FCHOWN
- path.allow_fd = 1;
-#endif
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&O&|$O&p:chown", keywords,
- path_converter, &path,
- _Py_Uid_Converter, &uid,
- _Py_Gid_Converter, &gid,
-#ifdef HAVE_FCHOWNAT
- dir_fd_converter, &dir_fd,
-#else
- dir_fd_unavailable, &dir_fd,
-#endif
- &follow_symlinks))
- return NULL;
#if !(defined(HAVE_LCHOWN) || defined(HAVE_FCHOWNAT))
if (follow_symlinks_specified("chown", follow_symlinks))
- goto exit;
+ return NULL;
#endif
- if (dir_fd_and_fd_invalid("chown", dir_fd, path.fd) ||
- fd_and_follow_symlinks_invalid("chown", path.fd, follow_symlinks))
- goto exit;
+ if (dir_fd_and_fd_invalid("chown", dir_fd, path->fd) ||
+ fd_and_follow_symlinks_invalid("chown", path->fd, follow_symlinks))
+ return NULL;
#ifdef __APPLE__
/*
@@ -3315,102 +3170,98 @@ posix_chown(PyObject *self, PyObject *args, PyObject *kwargs)
*/
if ((!follow_symlinks) && (lchown == NULL)) {
follow_symlinks_specified("chown", follow_symlinks);
- goto exit;
+ return NULL;
}
#endif
Py_BEGIN_ALLOW_THREADS
#ifdef HAVE_FCHOWN
- if (path.fd != -1)
- result = fchown(path.fd, uid, gid);
+ if (path->fd != -1)
+ result = fchown(path->fd, uid, gid);
else
#endif
#ifdef HAVE_LCHOWN
if ((!follow_symlinks) && (dir_fd == DEFAULT_DIR_FD))
- result = lchown(path.narrow, uid, gid);
+ result = lchown(path->narrow, uid, gid);
else
#endif
#ifdef HAVE_FCHOWNAT
if ((dir_fd != DEFAULT_DIR_FD) || (!follow_symlinks))
- result = fchownat(dir_fd, path.narrow, uid, gid,
+ result = fchownat(dir_fd, path->narrow, uid, gid,
follow_symlinks ? 0 : AT_SYMLINK_NOFOLLOW);
else
#endif
- result = chown(path.narrow, uid, gid);
+ result = chown(path->narrow, uid, gid);
Py_END_ALLOW_THREADS
- if (result) {
- return_value = path_error(&path);
- goto exit;
- }
-
- return_value = Py_None;
- Py_INCREF(Py_None);
+ if (result)
+ return path_error(path);
-exit:
- path_cleanup(&path);
- return return_value;
+ Py_RETURN_NONE;
}
#endif /* HAVE_CHOWN */
+
#ifdef HAVE_FCHOWN
-PyDoc_STRVAR(posix_fchown__doc__,
-"fchown(fd, uid, gid)\n\n\
-Change the owner and group id of the file given by file descriptor\n\
-fd to the numeric uid and gid. Equivalent to os.chown(fd, uid, gid).");
+/*[clinic input]
+os.fchown
+
+ fd: int
+ uid: uid_t
+ gid: gid_t
+
+Change the owner and group id of the file specified by file descriptor.
+
+Equivalent to os.chown(fd, uid, gid).
+
+[clinic start generated code]*/
static PyObject *
-posix_fchown(PyObject *self, PyObject *args)
+os_fchown_impl(PyModuleDef *module, int fd, uid_t uid, gid_t gid)
+/*[clinic end generated code: output=7545abf8f6086d76 input=3af544ba1b13a0d7]*/
{
- int fd;
- uid_t uid;
- gid_t gid;
int res;
- if (!PyArg_ParseTuple(args, "iO&O&:fchown", &fd,
- _Py_Uid_Converter, &uid,
- _Py_Gid_Converter, &gid))
- return NULL;
- Py_BEGIN_ALLOW_THREADS
- res = fchown(fd, uid, gid);
- Py_END_ALLOW_THREADS
- if (res < 0)
- return posix_error();
+ int async_err = 0;
+
+ do {
+ Py_BEGIN_ALLOW_THREADS
+ res = fchown(fd, uid, gid);
+ Py_END_ALLOW_THREADS
+ } while (res != 0 && errno == EINTR && !(async_err = PyErr_CheckSignals()));
+ if (res != 0)
+ return (!async_err) ? posix_error() : NULL;
+
Py_RETURN_NONE;
}
#endif /* HAVE_FCHOWN */
+
#ifdef HAVE_LCHOWN
-PyDoc_STRVAR(posix_lchown__doc__,
-"lchown(path, uid, gid)\n\n\
-Change the owner and group id of path to the numeric uid and gid.\n\
-This function will not follow symbolic links.\n\
-Equivalent to os.chown(path, uid, gid, follow_symlinks=False).");
+/*[clinic input]
+os.lchown
+
+ path : path_t
+ uid: uid_t
+ gid: gid_t
+
+Change the owner and group id of path to the numeric uid and gid.
+
+This function will not follow symbolic links.
+Equivalent to os.chown(path, uid, gid, follow_symlinks=False).
+[clinic start generated code]*/
static PyObject *
-posix_lchown(PyObject *self, PyObject *args)
+os_lchown_impl(PyModuleDef *module, path_t *path, uid_t uid, gid_t gid)
+/*[clinic end generated code: output=bb0d2da1579ac275 input=b1c6014d563a7161]*/
{
- path_t path;
- uid_t uid;
- gid_t gid;
int res;
- memset(&path, 0, sizeof(path));
- path.function_name = "lchown";
- if (!PyArg_ParseTuple(args, "O&O&O&:lchown",
- path_converter, &path,
- _Py_Uid_Converter, &uid,
- _Py_Gid_Converter, &gid))
- return NULL;
Py_BEGIN_ALLOW_THREADS
- res = lchown(path.narrow, uid, gid);
+ res = lchown(path->narrow, uid, gid);
Py_END_ALLOW_THREADS
if (res < 0) {
- path_error(&path);
- path_cleanup(&path);
- return NULL;
+ return path_error(path);
}
- path_cleanup(&path);
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
#endif /* HAVE_LCHOWN */
@@ -3487,148 +3338,125 @@ posix_getcwd(int use_bytes)
return obj;
}
-PyDoc_STRVAR(posix_getcwd__doc__,
-"getcwd() -> path\n\n\
-Return a unicode string representing the current working directory.");
+
+/*[clinic input]
+os.getcwd
+
+Return a unicode string representing the current working directory.
+[clinic start generated code]*/
static PyObject *
-posix_getcwd_unicode(PyObject *self)
+os_getcwd_impl(PyModuleDef *module)
+/*[clinic end generated code: output=efe3a8c0121525ea input=f069211bb70e3d39]*/
{
return posix_getcwd(0);
}
-PyDoc_STRVAR(posix_getcwdb__doc__,
-"getcwdb() -> path\n\n\
-Return a bytes string representing the current working directory.");
+
+/*[clinic input]
+os.getcwdb
+
+Return a bytes string representing the current working directory.
+[clinic start generated code]*/
static PyObject *
-posix_getcwd_bytes(PyObject *self)
+os_getcwdb_impl(PyModuleDef *module)
+/*[clinic end generated code: output=7fce42ee4b2a296a input=f6f6a378dad3d9cb]*/
{
return posix_getcwd(1);
}
+
#if ((!defined(HAVE_LINK)) && defined(MS_WINDOWS))
#define HAVE_LINK 1
#endif
#ifdef HAVE_LINK
-PyDoc_STRVAR(posix_link__doc__,
-"link(src, dst, *, src_dir_fd=None, dst_dir_fd=None, follow_symlinks=True)\n\n\
-Create a hard link to a file.\n\
-\n\
-If either src_dir_fd or dst_dir_fd is not None, it should be a file\n\
- descriptor open to a directory, and the respective path string (src or dst)\n\
- should be relative; the path will then be relative to that directory.\n\
-If follow_symlinks is False, and the last element of src is a symbolic\n\
- link, link will create a link to the symbolic link itself instead of the\n\
- file the link points to.\n\
-src_dir_fd, dst_dir_fd, and follow_symlinks may not be implemented on your\n\
- platform. If they are unavailable, using them will raise a\n\
- NotImplementedError.");
-
-static PyObject *
-posix_link(PyObject *self, PyObject *args, PyObject *kwargs)
-{
- path_t src, dst;
- int src_dir_fd = DEFAULT_DIR_FD;
- int dst_dir_fd = DEFAULT_DIR_FD;
- int follow_symlinks = 1;
- PyObject *return_value = NULL;
- static char *keywords[] = {"src", "dst", "src_dir_fd", "dst_dir_fd",
- "follow_symlinks", NULL};
+/*[clinic input]
+
+os.link
+
+ src : path_t
+ dst : path_t
+ *
+ src_dir_fd : dir_fd = None
+ dst_dir_fd : dir_fd = None
+ follow_symlinks: bool = True
+
+Create a hard link to a file.
+
+If either src_dir_fd or dst_dir_fd is not None, it should be a file
+ descriptor open to a directory, and the respective path string (src or dst)
+ should be relative; the path will then be relative to that directory.
+If follow_symlinks is False, and the last element of src is a symbolic
+ link, link will create a link to the symbolic link itself instead of the
+ file the link points to.
+src_dir_fd, dst_dir_fd, and follow_symlinks may not be implemented on your
+ platform. If they are unavailable, using them will raise a
+ NotImplementedError.
+[clinic start generated code]*/
+
+static PyObject *
+os_link_impl(PyModuleDef *module, path_t *src, path_t *dst, int src_dir_fd,
+ int dst_dir_fd, int follow_symlinks)
+/*[clinic end generated code: output=f47a7e88f7b391b6 input=b0095ebbcbaa7e04]*/
+{
#ifdef MS_WINDOWS
BOOL result;
#else
int result;
#endif
- memset(&src, 0, sizeof(src));
- memset(&dst, 0, sizeof(dst));
- src.function_name = "link";
- dst.function_name = "link";
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&|O&O&p:link", keywords,
- path_converter, &src,
- path_converter, &dst,
- dir_fd_converter, &src_dir_fd,
- dir_fd_converter, &dst_dir_fd,
- &follow_symlinks))
- return NULL;
-
#ifndef HAVE_LINKAT
if ((src_dir_fd != DEFAULT_DIR_FD) || (dst_dir_fd != DEFAULT_DIR_FD)) {
argument_unavailable_error("link", "src_dir_fd and dst_dir_fd");
- goto exit;
+ return NULL;
}
#endif
- if ((src.narrow && dst.wide) || (src.wide && dst.narrow)) {
+ if ((src->narrow && dst->wide) || (src->wide && dst->narrow)) {
PyErr_SetString(PyExc_NotImplementedError,
"link: src and dst must be the same type");
- goto exit;
+ return NULL;
}
#ifdef MS_WINDOWS
Py_BEGIN_ALLOW_THREADS
- if (src.wide)
- result = CreateHardLinkW(dst.wide, src.wide, NULL);
+ if (src->wide)
+ result = CreateHardLinkW(dst->wide, src->wide, NULL);
else
- result = CreateHardLinkA(dst.narrow, src.narrow, NULL);
+ result = CreateHardLinkA(dst->narrow, src->narrow, NULL);
Py_END_ALLOW_THREADS
- if (!result) {
- return_value = path_error2(&src, &dst);
- goto exit;
- }
+ if (!result)
+ return path_error2(src, dst);
#else
Py_BEGIN_ALLOW_THREADS
#ifdef HAVE_LINKAT
if ((src_dir_fd != DEFAULT_DIR_FD) ||
(dst_dir_fd != DEFAULT_DIR_FD) ||
(!follow_symlinks))
- result = linkat(src_dir_fd, src.narrow,
- dst_dir_fd, dst.narrow,
+ result = linkat(src_dir_fd, src->narrow,
+ dst_dir_fd, dst->narrow,
follow_symlinks ? AT_SYMLINK_FOLLOW : 0);
else
#endif
- result = link(src.narrow, dst.narrow);
+ result = link(src->narrow, dst->narrow);
Py_END_ALLOW_THREADS
- if (result) {
- return_value = path_error2(&src, &dst);
- goto exit;
- }
+ if (result)
+ return path_error2(src, dst);
#endif
- return_value = Py_None;
- Py_INCREF(Py_None);
-
-exit:
- path_cleanup(&src);
- path_cleanup(&dst);
- return return_value;
+ Py_RETURN_NONE;
}
#endif
-
-PyDoc_STRVAR(posix_listdir__doc__,
-"listdir(path='.') -> list_of_filenames\n\n\
-Return a list containing the names of the files in the directory.\n\
-The list is in arbitrary order. It does not include the special\n\
-entries '.' and '..' even if they are present in the directory.\n\
-\n\
-path can be specified as either str or bytes. If path is bytes,\n\
- the filenames returned will also be bytes; in all other circumstances\n\
- the filenames returned will be str.\n\
-On some platforms, path may also be specified as an open file descriptor;\n\
- the file descriptor must refer to a directory.\n\
- If this functionality is unavailable, using it raises NotImplementedError.");
-
#if defined(MS_WINDOWS) && !defined(HAVE_OPENDIR)
static PyObject *
_listdir_windows_no_opendir(path_t *path, PyObject *list)
{
- static char *keywords[] = {"path", NULL};
PyObject *v;
HANDLE hFindFile = INVALID_HANDLE_VALUE;
BOOL result;
@@ -3887,123 +3715,117 @@ exit:
} /* end of _posix_listdir */
#endif /* which OS */
-static PyObject *
-posix_listdir(PyObject *self, PyObject *args, PyObject *kwargs)
-{
- path_t path;
- PyObject *list = NULL;
- static char *keywords[] = {"path", NULL};
- PyObject *return_value;
- memset(&path, 0, sizeof(path));
- path.function_name = "listdir";
- path.nullable = 1;
-#ifdef HAVE_FDOPENDIR
- path.allow_fd = 1;
- path.fd = -1;
-#endif
+/*[clinic input]
+os.listdir
+
+ path : path_t(nullable=True, allow_fd='PATH_HAVE_FDOPENDIR') = None
+
+Return a list containing the names of the files in the directory.
+
+path can be specified as either str or bytes. If path is bytes,
+ the filenames returned will also be bytes; in all other circumstances
+ the filenames returned will be str.
+If path is None, uses the path='.'.
+On some platforms, path may also be specified as an open file descriptor;\
+ the file descriptor must refer to a directory.
+ If this functionality is unavailable, using it raises NotImplementedError.
+
+The list is in arbitrary order. It does not include the special
+entries '.' and '..' even if they are present in the directory.
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O&:listdir", keywords,
- path_converter, &path)) {
- return NULL;
- }
+[clinic start generated code]*/
+
+static PyObject *
+os_listdir_impl(PyModuleDef *module, path_t *path)
+/*[clinic end generated code: output=1fbe67c1f780c8b7 input=09e300416e3cd729]*/
+{
#if defined(MS_WINDOWS) && !defined(HAVE_OPENDIR)
- return_value = _listdir_windows_no_opendir(&path, list);
+ return _listdir_windows_no_opendir(path, NULL);
#else
- return_value = _posix_listdir(&path, list);
+ return _posix_listdir(path, NULL);
#endif
- path_cleanup(&path);
- return return_value;
}
#ifdef MS_WINDOWS
/* A helper function for abspath on win32 */
+/*[clinic input]
+os._getfullpathname
+
+ path: path_t
+ /
+
+[clinic start generated code]*/
+
static PyObject *
-posix__getfullpathname(PyObject *self, PyObject *args)
+os__getfullpathname_impl(PyModuleDef *module, path_t *path)
+/*[clinic end generated code: output=b90b1f103b08773f input=332ed537c29d0a3e]*/
{
- const char *path;
- char outbuf[MAX_PATH];
- char *temp;
- PyObject *po;
-
- if (PyArg_ParseTuple(args, "U|:_getfullpathname", &po))
+ if (!path->narrow)
{
- wchar_t *wpath;
wchar_t woutbuf[MAX_PATH], *woutbufp = woutbuf;
wchar_t *wtemp;
DWORD result;
PyObject *v;
- wpath = PyUnicode_AsUnicode(po);
- if (wpath == NULL)
- return NULL;
- result = GetFullPathNameW(wpath,
+ result = GetFullPathNameW(path->wide,
Py_ARRAY_LENGTH(woutbuf),
woutbuf, &wtemp);
if (result > Py_ARRAY_LENGTH(woutbuf)) {
woutbufp = PyMem_New(wchar_t, result);
if (!woutbufp)
return PyErr_NoMemory();
- result = GetFullPathNameW(wpath, result, woutbufp, &wtemp);
+ result = GetFullPathNameW(path->wide, result, woutbufp, &wtemp);
}
if (result)
v = PyUnicode_FromWideChar(woutbufp, wcslen(woutbufp));
else
- v = win32_error_object("GetFullPathNameW", po);
+ v = win32_error_object("GetFullPathNameW", path->object);
if (woutbufp != woutbuf)
PyMem_Free(woutbufp);
return v;
}
- /* Drop the argument parsing error as narrow strings
- are also valid. */
- PyErr_Clear();
+ else {
+ char outbuf[MAX_PATH];
+ char *temp;
- if (!PyArg_ParseTuple (args, "y:_getfullpathname",
- &path))
- return NULL;
- if (win32_warn_bytes_api())
- return NULL;
- if (!GetFullPathName(path, Py_ARRAY_LENGTH(outbuf),
- outbuf, &temp)) {
- win32_error("GetFullPathName", path);
- return NULL;
- }
- if (PyUnicode_Check(PyTuple_GetItem(args, 0))) {
- return PyUnicode_Decode(outbuf, strlen(outbuf),
- Py_FileSystemDefaultEncoding, NULL);
+ if (!GetFullPathName(path->narrow, Py_ARRAY_LENGTH(outbuf),
+ outbuf, &temp)) {
+ win32_error_object("GetFullPathName", path->object);
+ return NULL;
+ }
+ return PyBytes_FromString(outbuf);
}
- return PyBytes_FromString(outbuf);
-} /* end of posix__getfullpathname */
+}
+
+
+/*[clinic input]
+os._getfinalpathname
+ path: unicode
+ /
+A helper function for samepath on windows.
+[clinic start generated code]*/
-/* A helper function for samepath on windows */
static PyObject *
-posix__getfinalpathname(PyObject *self, PyObject *args)
+os__getfinalpathname_impl(PyModuleDef *module, PyObject *path)
+/*[clinic end generated code: output=8be81a5f51a34bcf input=71d5e89334891bf4]*/
{
HANDLE hFile;
int buf_size;
wchar_t *target_path;
int result_length;
- PyObject *po, *result;
- wchar_t *path;
+ PyObject *result;
+ wchar_t *path_wchar;
- if (!PyArg_ParseTuple(args, "U|:_getfinalpathname", &po))
+ path_wchar = PyUnicode_AsUnicode(path);
+ if (path_wchar == NULL)
return NULL;
- path = PyUnicode_AsUnicode(po);
- if (path == NULL)
- return NULL;
-
- if(!check_GetFinalPathNameByHandle()) {
- /* If the OS doesn't have GetFinalPathNameByHandle, return a
- NotImplementedError. */
- return PyErr_Format(PyExc_NotImplementedError,
- "GetFinalPathNameByHandle not available on this platform");
- }
hFile = CreateFileW(
- path,
+ path_wchar,
0, /* desired access */
0, /* share mode */
NULL, /* security attributes */
@@ -4013,89 +3835,84 @@ posix__getfinalpathname(PyObject *self, PyObject *args)
NULL);
if(hFile == INVALID_HANDLE_VALUE)
- return win32_error_object("CreateFileW", po);
+ return win32_error_object("CreateFileW", path);
/* We have a good handle to the target, use it to determine the
target path name. */
- buf_size = Py_GetFinalPathNameByHandleW(hFile, 0, 0, VOLUME_NAME_NT);
+ buf_size = GetFinalPathNameByHandleW(hFile, 0, 0, VOLUME_NAME_NT);
if(!buf_size)
- return win32_error_object("GetFinalPathNameByHandle", po);
+ return win32_error_object("GetFinalPathNameByHandle", path);
target_path = PyMem_New(wchar_t, buf_size+1);
if(!target_path)
return PyErr_NoMemory();
- result_length = Py_GetFinalPathNameByHandleW(hFile, target_path,
- buf_size, VOLUME_NAME_DOS);
+ result_length = GetFinalPathNameByHandleW(hFile, target_path,
+ buf_size, VOLUME_NAME_DOS);
if(!result_length)
- return win32_error_object("GetFinalPathNamyByHandle", po);
+ return win32_error_object("GetFinalPathNamyByHandle", path);
if(!CloseHandle(hFile))
- return win32_error_object("CloseHandle", po);
+ return win32_error_object("CloseHandle", path);
target_path[result_length] = 0;
result = PyUnicode_FromWideChar(target_path, result_length);
PyMem_Free(target_path);
return result;
-
-} /* end of posix__getfinalpathname */
+}
PyDoc_STRVAR(posix__isdir__doc__,
"Return true if the pathname refers to an existing directory.");
+/*[clinic input]
+os._isdir
+
+ path: path_t
+ /
+
+[clinic start generated code]*/
+
static PyObject *
-posix__isdir(PyObject *self, PyObject *args)
+os__isdir_impl(PyModuleDef *module, path_t *path)
+/*[clinic end generated code: output=f17b2d4e1994b0ff input=e794f12faab62a2a]*/
{
- const char *path;
- PyObject *po;
DWORD attributes;
- if (PyArg_ParseTuple(args, "U|:_isdir", &po)) {
- wchar_t *wpath = PyUnicode_AsUnicode(po);
- if (wpath == NULL)
- return NULL;
-
- attributes = GetFileAttributesW(wpath);
- if (attributes == INVALID_FILE_ATTRIBUTES)
- Py_RETURN_FALSE;
- goto check;
- }
- /* Drop the argument parsing error as narrow strings
- are also valid. */
- PyErr_Clear();
+ if (!path->narrow)
+ attributes = GetFileAttributesW(path->wide);
+ else
+ attributes = GetFileAttributesA(path->narrow);
- if (!PyArg_ParseTuple(args, "y:_isdir", &path))
- return NULL;
- if (win32_warn_bytes_api())
- return NULL;
- attributes = GetFileAttributesA(path);
if (attributes == INVALID_FILE_ATTRIBUTES)
Py_RETURN_FALSE;
-check:
if (attributes & FILE_ATTRIBUTE_DIRECTORY)
Py_RETURN_TRUE;
else
Py_RETURN_FALSE;
}
-PyDoc_STRVAR(posix__getvolumepathname__doc__,
-"Return volume mount point of the specified path.");
-/* A helper function for ismount on windows */
+/*[clinic input]
+os._getvolumepathname
+
+ path: unicode
+
+A helper function for ismount on Win32.
+[clinic start generated code]*/
+
static PyObject *
-posix__getvolumepathname(PyObject *self, PyObject *args)
+os__getvolumepathname_impl(PyModuleDef *module, PyObject *path)
+/*[clinic end generated code: output=79a0ba729f956dbe input=7eacadc40acbda6b]*/
{
- PyObject *po, *result;
- wchar_t *path, *mountpath=NULL;
+ PyObject *result;
+ wchar_t *path_wchar, *mountpath=NULL;
size_t buflen;
BOOL ret;
- if (!PyArg_ParseTuple(args, "U|:_getvolumepathname", &po))
- return NULL;
- path = PyUnicode_AsUnicodeAndSize(po, &buflen);
- if (path == NULL)
+ path_wchar = PyUnicode_AsUnicodeAndSize(path, &buflen);
+ if (path_wchar == NULL)
return NULL;
buflen += 1;
@@ -4112,12 +3929,12 @@ posix__getvolumepathname(PyObject *self, PyObject *args)
return PyErr_NoMemory();
Py_BEGIN_ALLOW_THREADS
- ret = GetVolumePathNameW(path, mountpath,
+ ret = GetVolumePathNameW(path_wchar, mountpath,
Py_SAFE_DOWNCAST(buflen, size_t, DWORD));
Py_END_ALLOW_THREADS
if (!ret) {
- result = win32_error_object("_getvolumepathname", po);
+ result = win32_error_object("_getvolumepathname", path);
goto exit;
}
result = PyUnicode_FromWideChar(mountpath, wcslen(mountpath));
@@ -4126,78 +3943,66 @@ exit:
PyMem_Free(mountpath);
return result;
}
-/* end of posix__getvolumepathname */
#endif /* MS_WINDOWS */
-PyDoc_STRVAR(posix_mkdir__doc__,
-"mkdir(path, mode=0o777, *, dir_fd=None)\n\n\
-Create a directory.\n\
-\n\
-If dir_fd is not None, it should be a file descriptor open to a directory,\n\
- and path should be relative; path will then be relative to that directory.\n\
-dir_fd may not be implemented on your platform.\n\
- If it is unavailable, using it will raise a NotImplementedError.\n\
-\n\
-The mode argument is ignored on Windows.");
+
+/*[clinic input]
+os.mkdir
+
+ path : path_t
+
+ mode: int = 0o777
+
+ *
+
+ dir_fd : dir_fd(requires='mkdirat') = None
+
+# "mkdir(path, mode=0o777, *, dir_fd=None)\n\n\
+
+Create a directory.
+
+If dir_fd is not None, it should be a file descriptor open to a directory,
+ and path should be relative; path will then be relative to that directory.
+dir_fd may not be implemented on your platform.
+ If it is unavailable, using it will raise a NotImplementedError.
+
+The mode argument is ignored on Windows.
+[clinic start generated code]*/
static PyObject *
-posix_mkdir(PyObject *self, PyObject *args, PyObject *kwargs)
+os_mkdir_impl(PyModuleDef *module, path_t *path, int mode, int dir_fd)
+/*[clinic end generated code: output=8bf1f738873ef2c5 input=e965f68377e9b1ce]*/
{
- path_t path;
- int mode = 0777;
- int dir_fd = DEFAULT_DIR_FD;
- static char *keywords[] = {"path", "mode", "dir_fd", NULL};
- PyObject *return_value = NULL;
int result;
- memset(&path, 0, sizeof(path));
- path.function_name = "mkdir";
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&|i$O&:mkdir", keywords,
- path_converter, &path, &mode,
-#ifdef HAVE_MKDIRAT
- dir_fd_converter, &dir_fd
-#else
- dir_fd_unavailable, &dir_fd
-#endif
- ))
- return NULL;
-
#ifdef MS_WINDOWS
Py_BEGIN_ALLOW_THREADS
- if (path.wide)
- result = CreateDirectoryW(path.wide, NULL);
+ if (path->wide)
+ result = CreateDirectoryW(path->wide, NULL);
else
- result = CreateDirectoryA(path.narrow, NULL);
+ result = CreateDirectoryA(path->narrow, NULL);
Py_END_ALLOW_THREADS
- if (!result) {
- return_value = path_error(&path);
- goto exit;
- }
+ if (!result)
+ return path_error(path);
#else
Py_BEGIN_ALLOW_THREADS
#if HAVE_MKDIRAT
if (dir_fd != DEFAULT_DIR_FD)
- result = mkdirat(dir_fd, path.narrow, mode);
+ result = mkdirat(dir_fd, path->narrow, mode);
else
#endif
#if ( defined(__WATCOMC__) || defined(PYCC_VACPP) ) && !defined(__QNX__)
- result = mkdir(path.narrow);
+ result = mkdir(path->narrow);
#else
- result = mkdir(path.narrow, mode);
+ result = mkdir(path->narrow, mode);
#endif
Py_END_ALLOW_THREADS
- if (result < 0) {
- return_value = path_error(&path);
- goto exit;
- }
+ if (result < 0)
+ return path_error(path);
#endif
- return_value = Py_None;
- Py_INCREF(Py_None);
-exit:
- path_cleanup(&path);
- return return_value;
+ Py_RETURN_NONE;
}
@@ -4208,17 +4013,20 @@ exit:
#ifdef HAVE_NICE
-PyDoc_STRVAR(posix_nice__doc__,
-"nice(inc) -> new_priority\n\n\
-Decrease the priority of process by inc and return the new priority.");
+/*[clinic input]
+os.nice
+
+ increment: int
+ /
+
+Add increment to the priority of process and return the new priority.
+[clinic start generated code]*/
static PyObject *
-posix_nice(PyObject *self, PyObject *args)
+os_nice_impl(PyModuleDef *module, int increment)
+/*[clinic end generated code: output=8870418a3fc07b51 input=864be2d402a21da2]*/
{
- int increment, value;
-
- if (!PyArg_ParseTuple(args, "i:nice", &increment))
- return NULL;
+ int value;
/* There are two flavours of 'nice': one that returns the new
priority (as required by almost all standards out there) and the
@@ -4245,17 +4053,21 @@ posix_nice(PyObject *self, PyObject *args)
#ifdef HAVE_GETPRIORITY
-PyDoc_STRVAR(posix_getpriority__doc__,
-"getpriority(which, who) -> current_priority\n\n\
-Get program scheduling priority.");
+/*[clinic input]
+os.getpriority
+
+ which: int
+ who: int
+
+Return program scheduling priority.
+[clinic start generated code]*/
static PyObject *
-posix_getpriority(PyObject *self, PyObject *args)
+os_getpriority_impl(PyModuleDef *module, int which, int who)
+/*[clinic end generated code: output=4759937aa5b67ed6 input=9be615d40e2544ef]*/
{
- int which, who, retval;
+ int retval;
- if (!PyArg_ParseTuple(args, "ii", &which, &who))
- return NULL;
errno = 0;
retval = getpriority(which, who);
if (errno != 0)
@@ -4266,18 +4078,23 @@ posix_getpriority(PyObject *self, PyObject *args)
#ifdef HAVE_SETPRIORITY
-PyDoc_STRVAR(posix_setpriority__doc__,
-"setpriority(which, who, prio) -> None\n\n\
-Set program scheduling priority.");
+/*[clinic input]
+os.setpriority
+
+ which: int
+ who: int
+ priority: int
+
+Set program scheduling priority.
+[clinic start generated code]*/
static PyObject *
-posix_setpriority(PyObject *self, PyObject *args)
+os_setpriority_impl(PyModuleDef *module, int which, int who, int priority)
+/*[clinic end generated code: output=6497d3301547e7d5 input=710ccbf65b9dc513]*/
{
- int which, who, prio, retval;
+ int retval;
- if (!PyArg_ParseTuple(args, "iii", &which, &who, &prio))
- return NULL;
- retval = setpriority(which, who, prio);
+ retval = setpriority(which, who, priority);
if (retval == -1)
return posix_error();
Py_RETURN_NONE;
@@ -4286,17 +4103,10 @@ posix_setpriority(PyObject *self, PyObject *args)
static PyObject *
-internal_rename(PyObject *args, PyObject *kwargs, int is_replace)
+internal_rename(path_t *src, path_t *dst, int src_dir_fd, int dst_dir_fd, int is_replace)
{
char *function_name = is_replace ? "replace" : "rename";
- path_t src;
- path_t dst;
- int src_dir_fd = DEFAULT_DIR_FD;
- int dst_dir_fd = DEFAULT_DIR_FD;
int dir_fd_specified;
- PyObject *return_value = NULL;
- char format[24];
- static char *keywords[] = {"src", "dst", "src_dir_fd", "dst_dir_fd", NULL};
#ifdef MS_WINDOWS
BOOL result;
@@ -4305,210 +4115,200 @@ internal_rename(PyObject *args, PyObject *kwargs, int is_replace)
int result;
#endif
- memset(&src, 0, sizeof(src));
- memset(&dst, 0, sizeof(dst));
- src.function_name = function_name;
- dst.function_name = function_name;
- strcpy(format, "O&O&|$O&O&:");
- strcat(format, function_name);
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, format, keywords,
- path_converter, &src,
- path_converter, &dst,
- dir_fd_converter, &src_dir_fd,
- dir_fd_converter, &dst_dir_fd))
- return NULL;
-
dir_fd_specified = (src_dir_fd != DEFAULT_DIR_FD) ||
(dst_dir_fd != DEFAULT_DIR_FD);
#ifndef HAVE_RENAMEAT
if (dir_fd_specified) {
argument_unavailable_error(function_name, "src_dir_fd and dst_dir_fd");
- goto exit;
+ return NULL;
}
#endif
- if ((src.narrow && dst.wide) || (src.wide && dst.narrow)) {
+ if ((src->narrow && dst->wide) || (src->wide && dst->narrow)) {
PyErr_Format(PyExc_ValueError,
"%s: src and dst must be the same type", function_name);
- goto exit;
+ return NULL;
}
#ifdef MS_WINDOWS
Py_BEGIN_ALLOW_THREADS
- if (src.wide)
- result = MoveFileExW(src.wide, dst.wide, flags);
+ if (src->wide)
+ result = MoveFileExW(src->wide, dst->wide, flags);
else
- result = MoveFileExA(src.narrow, dst.narrow, flags);
+ result = MoveFileExA(src->narrow, dst->narrow, flags);
Py_END_ALLOW_THREADS
- if (!result) {
- return_value = path_error2(&src, &dst);
- goto exit;
- }
+ if (!result)
+ return path_error2(src, dst);
#else
Py_BEGIN_ALLOW_THREADS
#ifdef HAVE_RENAMEAT
if (dir_fd_specified)
- result = renameat(src_dir_fd, src.narrow, dst_dir_fd, dst.narrow);
+ result = renameat(src_dir_fd, src->narrow, dst_dir_fd, dst->narrow);
else
#endif
- result = rename(src.narrow, dst.narrow);
+ result = rename(src->narrow, dst->narrow);
Py_END_ALLOW_THREADS
- if (result) {
- return_value = path_error2(&src, &dst);
- goto exit;
- }
+ if (result)
+ return path_error2(src, dst);
#endif
-
- Py_INCREF(Py_None);
- return_value = Py_None;
-exit:
- path_cleanup(&src);
- path_cleanup(&dst);
- return return_value;
+ Py_RETURN_NONE;
}
-PyDoc_STRVAR(posix_rename__doc__,
-"rename(src, dst, *, src_dir_fd=None, dst_dir_fd=None)\n\n\
-Rename a file or directory.\n\
-\n\
-If either src_dir_fd or dst_dir_fd is not None, it should be a file\n\
- descriptor open to a directory, and the respective path string (src or dst)\n\
- should be relative; the path will then be relative to that directory.\n\
-src_dir_fd and dst_dir_fd, may not be implemented on your platform.\n\
- If they are unavailable, using them will raise a NotImplementedError.");
+
+/*[clinic input]
+os.rename
+
+ src : path_t
+ dst : path_t
+ *
+ src_dir_fd : dir_fd = None
+ dst_dir_fd : dir_fd = None
+
+Rename a file or directory.
+
+If either src_dir_fd or dst_dir_fd is not None, it should be a file
+ descriptor open to a directory, and the respective path string (src or dst)
+ should be relative; the path will then be relative to that directory.
+src_dir_fd and dst_dir_fd, may not be implemented on your platform.
+ If they are unavailable, using them will raise a NotImplementedError.
+[clinic start generated code]*/
static PyObject *
-posix_rename(PyObject *self, PyObject *args, PyObject *kwargs)
+os_rename_impl(PyModuleDef *module, path_t *src, path_t *dst, int src_dir_fd,
+ int dst_dir_fd)
+/*[clinic end generated code: output=08033bb2ec27fb5f input=faa61c847912c850]*/
{
- return internal_rename(args, kwargs, 0);
+ return internal_rename(src, dst, src_dir_fd, dst_dir_fd, 0);
}
-PyDoc_STRVAR(posix_replace__doc__,
-"replace(src, dst, *, src_dir_fd=None, dst_dir_fd=None)\n\n\
-Rename a file or directory, overwriting the destination.\n\
-\n\
-If either src_dir_fd or dst_dir_fd is not None, it should be a file\n\
- descriptor open to a directory, and the respective path string (src or dst)\n\
- should be relative; the path will then be relative to that directory.\n\
-src_dir_fd and dst_dir_fd, may not be implemented on your platform.\n\
- If they are unavailable, using them will raise a NotImplementedError.");
+
+/*[clinic input]
+os.replace = os.rename
+
+Rename a file or directory, overwriting the destination.
+
+If either src_dir_fd or dst_dir_fd is not None, it should be a file
+ descriptor open to a directory, and the respective path string (src or dst)
+ should be relative; the path will then be relative to that directory.
+src_dir_fd and dst_dir_fd, may not be implemented on your platform.
+ If they are unavailable, using them will raise a NotImplementedError."
+[clinic start generated code]*/
static PyObject *
-posix_replace(PyObject *self, PyObject *args, PyObject *kwargs)
+os_replace_impl(PyModuleDef *module, path_t *src, path_t *dst,
+ int src_dir_fd, int dst_dir_fd)
+/*[clinic end generated code: output=131d012eed8d3b8b input=25515dfb107c8421]*/
{
- return internal_rename(args, kwargs, 1);
+ return internal_rename(src, dst, src_dir_fd, dst_dir_fd, 1);
}
-PyDoc_STRVAR(posix_rmdir__doc__,
-"rmdir(path, *, dir_fd=None)\n\n\
-Remove a directory.\n\
-\n\
-If dir_fd is not None, it should be a file descriptor open to a directory,\n\
- and path should be relative; path will then be relative to that directory.\n\
-dir_fd may not be implemented on your platform.\n\
- If it is unavailable, using it will raise a NotImplementedError.");
+
+/*[clinic input]
+os.rmdir
+
+ path: path_t
+ *
+ dir_fd: dir_fd(requires='unlinkat') = None
+
+Remove a directory.
+
+If dir_fd is not None, it should be a file descriptor open to a directory,
+ and path should be relative; path will then be relative to that directory.
+dir_fd may not be implemented on your platform.
+ If it is unavailable, using it will raise a NotImplementedError.
+[clinic start generated code]*/
static PyObject *
-posix_rmdir(PyObject *self, PyObject *args, PyObject *kwargs)
+os_rmdir_impl(PyModuleDef *module, path_t *path, int dir_fd)
+/*[clinic end generated code: output=cabadec80d5a77c7 input=38c8b375ca34a7e2]*/
{
- path_t path;
- int dir_fd = DEFAULT_DIR_FD;
- static char *keywords[] = {"path", "dir_fd", NULL};
int result;
- PyObject *return_value = NULL;
-
- memset(&path, 0, sizeof(path));
- path.function_name = "rmdir";
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&|$O&:rmdir", keywords,
- path_converter, &path,
-#ifdef HAVE_UNLINKAT
- dir_fd_converter, &dir_fd
-#else
- dir_fd_unavailable, &dir_fd
-#endif
- ))
- return NULL;
Py_BEGIN_ALLOW_THREADS
#ifdef MS_WINDOWS
- if (path.wide)
- result = RemoveDirectoryW(path.wide);
+ if (path->wide)
+ result = RemoveDirectoryW(path->wide);
else
- result = RemoveDirectoryA(path.narrow);
+ result = RemoveDirectoryA(path->narrow);
result = !result; /* Windows, success=1, UNIX, success=0 */
#else
#ifdef HAVE_UNLINKAT
if (dir_fd != DEFAULT_DIR_FD)
- result = unlinkat(dir_fd, path.narrow, AT_REMOVEDIR);
+ result = unlinkat(dir_fd, path->narrow, AT_REMOVEDIR);
else
#endif
- result = rmdir(path.narrow);
+ result = rmdir(path->narrow);
#endif
Py_END_ALLOW_THREADS
- if (result) {
- return_value = path_error(&path);
- goto exit;
- }
-
- return_value = Py_None;
- Py_INCREF(Py_None);
+ if (result)
+ return path_error(path);
-exit:
- path_cleanup(&path);
- return return_value;
+ Py_RETURN_NONE;
}
#ifdef HAVE_SYSTEM
-PyDoc_STRVAR(posix_system__doc__,
-"system(command) -> exit_status\n\n\
-Execute the command (a string) in a subshell.");
-
-static PyObject *
-posix_system(PyObject *self, PyObject *args)
-{
- long sts;
#ifdef MS_WINDOWS
- wchar_t *command;
- if (!PyArg_ParseTuple(args, "u:system", &command))
- return NULL;
+/*[clinic input]
+os.system -> long
+
+ command: Py_UNICODE
+Execute the command in a subshell.
+[clinic start generated code]*/
+
+static long
+os_system_impl(PyModuleDef *module, Py_UNICODE *command)
+/*[clinic end generated code: output=4c3bd5abcd9c29e7 input=303f5ce97df606b0]*/
+{
+ long result;
Py_BEGIN_ALLOW_THREADS
- sts = _wsystem(command);
+ result = _wsystem(command);
Py_END_ALLOW_THREADS
-#else
- PyObject *command_obj;
- char *command;
- if (!PyArg_ParseTuple(args, "O&:system",
- PyUnicode_FSConverter, &command_obj))
- return NULL;
+ return result;
+}
+#else /* MS_WINDOWS */
+/*[clinic input]
+os.system -> long
- command = PyBytes_AsString(command_obj);
+ command: FSConverter
+
+Execute the command in a subshell.
+[clinic start generated code]*/
+
+static long
+os_system_impl(PyModuleDef *module, PyObject *command)
+/*[clinic end generated code: output=800f775e10b7be55 input=86a58554ba6094af]*/
+{
+ long result;
+ char *bytes = PyBytes_AsString(command);
Py_BEGIN_ALLOW_THREADS
- sts = system(command);
+ result = system(bytes);
Py_END_ALLOW_THREADS
- Py_DECREF(command_obj);
-#endif
- return PyLong_FromLong(sts);
+ return result;
}
#endif
+#endif /* HAVE_SYSTEM */
-PyDoc_STRVAR(posix_umask__doc__,
-"umask(new_mask) -> old_mask\n\n\
-Set the current numeric umask and return the previous umask.");
+/*[clinic input]
+os.umask
+
+ mask: int
+ /
+
+Set the current numeric umask and return the previous umask.
+[clinic start generated code]*/
static PyObject *
-posix_umask(PyObject *self, PyObject *args)
+os_umask_impl(PyModuleDef *module, int mask)
+/*[clinic end generated code: output=9e1fe3c9f14d6a05 input=ab6bfd9b24d8a7e8]*/
{
- int i;
- if (!PyArg_ParseTuple(args, "i:umask", &i))
- return NULL;
- i = (int)umask(i);
+ int i = (int)umask(mask);
if (i < 0)
return posix_error();
return PyLong_FromLong((long)i);
@@ -4537,7 +4337,10 @@ BOOL WINAPI Py_DeleteFileW(LPCWSTR lpFileName)
find_data_handle = FindFirstFileW(lpFileName, &find_data);
if(find_data_handle != INVALID_HANDLE_VALUE) {
- is_link = find_data.dwReserved0 == IO_REPARSE_TAG_SYMLINK;
+ /* IO_REPARSE_TAG_SYMLINK if it is a symlink and
+ IO_REPARSE_TAG_MOUNT_POINT if it is a junction point. */
+ is_link = find_data.dwReserved0 == IO_REPARSE_TAG_SYMLINK ||
+ find_data.dwReserved0 == IO_REPARSE_TAG_MOUNT_POINT;
FindClose(find_data_handle);
}
}
@@ -4550,81 +4353,73 @@ BOOL WINAPI Py_DeleteFileW(LPCWSTR lpFileName)
}
#endif /* MS_WINDOWS */
-PyDoc_STRVAR(posix_unlink__doc__,
-"unlink(path, *, dir_fd=None)\n\n\
-Remove a file (same as remove()).\n\
-\n\
-If dir_fd is not None, it should be a file descriptor open to a directory,\n\
- and path should be relative; path will then be relative to that directory.\n\
-dir_fd may not be implemented on your platform.\n\
- If it is unavailable, using it will raise a NotImplementedError.");
-PyDoc_STRVAR(posix_remove__doc__,
-"remove(path, *, dir_fd=None)\n\n\
-Remove a file (same as unlink()).\n\
-\n\
-If dir_fd is not None, it should be a file descriptor open to a directory,\n\
- and path should be relative; path will then be relative to that directory.\n\
-dir_fd may not be implemented on your platform.\n\
- If it is unavailable, using it will raise a NotImplementedError.");
+/*[clinic input]
+os.unlink
+
+ path: path_t
+ *
+ dir_fd: dir_fd(requires='unlinkat')=None
+
+Remove a file (same as remove()).
+
+If dir_fd is not None, it should be a file descriptor open to a directory,
+ and path should be relative; path will then be relative to that directory.
+dir_fd may not be implemented on your platform.
+ If it is unavailable, using it will raise a NotImplementedError.
+
+[clinic start generated code]*/
static PyObject *
-posix_unlink(PyObject *self, PyObject *args, PyObject *kwargs)
+os_unlink_impl(PyModuleDef *module, path_t *path, int dir_fd)
+/*[clinic end generated code: output=474afd5cd09b237e input=d7bcde2b1b2a2552]*/
{
- path_t path;
- int dir_fd = DEFAULT_DIR_FD;
- static char *keywords[] = {"path", "dir_fd", NULL};
int result;
- PyObject *return_value = NULL;
-
- memset(&path, 0, sizeof(path));
- path.function_name = "unlink";
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&|$O&:unlink", keywords,
- path_converter, &path,
-#ifdef HAVE_UNLINKAT
- dir_fd_converter, &dir_fd
-#else
- dir_fd_unavailable, &dir_fd
-#endif
- ))
- return NULL;
Py_BEGIN_ALLOW_THREADS
+ _Py_BEGIN_SUPPRESS_IPH
#ifdef MS_WINDOWS
- if (path.wide)
- result = Py_DeleteFileW(path.wide);
+ if (path->wide)
+ result = Py_DeleteFileW(path->wide);
else
- result = DeleteFileA(path.narrow);
+ result = DeleteFileA(path->narrow);
result = !result; /* Windows, success=1, UNIX, success=0 */
#else
#ifdef HAVE_UNLINKAT
if (dir_fd != DEFAULT_DIR_FD)
- result = unlinkat(dir_fd, path.narrow, 0);
+ result = unlinkat(dir_fd, path->narrow, 0);
else
#endif /* HAVE_UNLINKAT */
- result = unlink(path.narrow);
+ result = unlink(path->narrow);
#endif
+ _Py_END_SUPPRESS_IPH
Py_END_ALLOW_THREADS
- if (result) {
- return_value = path_error(&path);
- goto exit;
- }
-
- return_value = Py_None;
- Py_INCREF(Py_None);
+ if (result)
+ return path_error(path);
-exit:
- path_cleanup(&path);
- return return_value;
+ Py_RETURN_NONE;
}
-PyDoc_STRVAR(posix_uname__doc__,
-"uname() -> uname_result\n\n\
-Return an object identifying the current operating system.\n\
-The object behaves like a named tuple with the following fields:\n\
- (sysname, nodename, release, version, machine)");
+/*[clinic input]
+os.remove = os.unlink
+
+Remove a file (same as unlink()).
+
+If dir_fd is not None, it should be a file descriptor open to a directory,
+ and path should be relative; path will then be relative to that directory.
+dir_fd may not be implemented on your platform.
+ If it is unavailable, using it will raise a NotImplementedError.
+[clinic start generated code]*/
+
+static PyObject *
+os_remove_impl(PyModuleDef *module, path_t *path, int dir_fd)
+/*[clinic end generated code: output=d0d5149e64832b9e input=e05c5ab55cd30983]*/
+{
+ return os_unlink_impl(module, path, dir_fd);
+}
+
static PyStructSequence_Field uname_result_fields[] = {
{"sysname", "operating system name"},
@@ -4654,8 +4449,19 @@ static PyTypeObject UnameResultType;
#ifdef HAVE_UNAME
+/*[clinic input]
+os.uname
+
+Return an object identifying the current operating system.
+
+The object behaves like a named tuple with the following fields:
+ (sysname, nodename, release, version, machine)
+
+[clinic start generated code]*/
+
static PyObject *
-posix_uname(PyObject *self, PyObject *noargs)
+os_uname_impl(PyModuleDef *module)
+/*[clinic end generated code: output=01e1421b757e753f input=e68bd246db3043ed]*/
{
struct utsname u;
int res;
@@ -4694,31 +4500,6 @@ posix_uname(PyObject *self, PyObject *noargs)
#endif /* HAVE_UNAME */
-PyDoc_STRVAR(posix_utime__doc__,
-"utime(path, times=None, *[, ns], dir_fd=None, follow_symlinks=True)\n\
-Set the access and modified time of path.\n\
-\n\
-path may always be specified as a string.\n\
-On some platforms, path may also be specified as an open file descriptor.\n\
- If this functionality is unavailable, using it raises an exception.\n\
-\n\
-If times is not None, it must be a tuple (atime, mtime);\n\
- atime and mtime should be expressed as float seconds since the epoch.\n\
-If ns is specified, it must be a tuple (atime_ns, mtime_ns);\n\
- atime_ns and mtime_ns should be expressed as integer nanoseconds\n\
- since the epoch.\n\
-If times is None and ns is unspecified, utime uses the current time.\n\
-Specifying tuples for both times and ns is an error.\n\
-\n\
-If dir_fd is not None, it should be a file descriptor open to a directory,\n\
- and path should be relative; path will then be relative to that directory.\n\
-If follow_symlinks is False, and the last element of the path is a symbolic\n\
- link, utime will modify the symbolic link itself instead of the file the\n\
- link points to.\n\
-It is an error to use dir_fd or follow_symlinks when specifying path\n\
- as an open file descriptor.\n\
-dir_fd and follow_symlinks may not be available on your platform.\n\
- If they are unavailable, using them will raise a NotImplementedError.");
typedef struct {
int now;
@@ -4802,6 +4583,9 @@ utime_dir_fd(utime_t *ut, int dir_fd, char *path, int follow_symlinks)
#endif
}
+ #define FUTIMENSAT_DIR_FD_CONVERTER dir_fd_converter
+#else
+ #define FUTIMENSAT_DIR_FD_CONVERTER dir_fd_unavailable
#endif
#if defined(HAVE_FUTIMES) || defined(HAVE_FUTIMENS)
@@ -4818,6 +4602,9 @@ utime_fd(utime_t *ut, int fd)
#endif
}
+ #define PATH_UTIME_HAVE_FD 1
+#else
+ #define PATH_UTIME_HAVE_FD 0
#endif
@@ -4883,19 +4670,50 @@ exit:
return result;
}
-static PyObject *
-posix_utime(PyObject *self, PyObject *args, PyObject *kwargs)
-{
- path_t path;
- PyObject *times = NULL;
- PyObject *ns = NULL;
- int dir_fd = DEFAULT_DIR_FD;
- int follow_symlinks = 1;
- char *keywords[] = {"path", "times", "ns", "dir_fd",
- "follow_symlinks", NULL};
- utime_t utime;
+/*[clinic input]
+os.utime
+
+ path: path_t(allow_fd='PATH_UTIME_HAVE_FD')
+ times: object = NULL
+ *
+ ns: object = NULL
+ dir_fd: dir_fd(requires='futimensat') = None
+ follow_symlinks: bool=True
+
+# "utime(path, times=None, *[, ns], dir_fd=None, follow_symlinks=True)\n\
+
+Set the access and modified time of path.
+
+path may always be specified as a string.
+On some platforms, path may also be specified as an open file descriptor.
+ If this functionality is unavailable, using it raises an exception.
+
+If times is not None, it must be a tuple (atime, mtime);
+ atime and mtime should be expressed as float seconds since the epoch.
+If ns is specified, it must be a tuple (atime_ns, mtime_ns);
+ atime_ns and mtime_ns should be expressed as integer nanoseconds
+ since the epoch.
+If times is None and ns is unspecified, utime uses the current time.
+Specifying tuples for both times and ns is an error.
+
+If dir_fd is not None, it should be a file descriptor open to a directory,
+ and path should be relative; path will then be relative to that directory.
+If follow_symlinks is False, and the last element of the path is a symbolic
+ link, utime will modify the symbolic link itself instead of the file the
+ link points to.
+It is an error to use dir_fd or follow_symlinks when specifying path
+ as an open file descriptor.
+dir_fd and follow_symlinks may not be available on your platform.
+ If they are unavailable, using them will raise a NotImplementedError.
+[clinic start generated code]*/
+
+static PyObject *
+os_utime_impl(PyModuleDef *module, path_t *path, PyObject *times,
+ PyObject *ns, int dir_fd, int follow_symlinks)
+/*[clinic end generated code: output=31f3434e560ba2f0 input=081cdc54ca685385]*/
+{
#ifdef MS_WINDOWS
HANDLE hFile;
FILETIME atime, mtime;
@@ -4904,25 +4722,9 @@ posix_utime(PyObject *self, PyObject *args, PyObject *kwargs)
#endif
PyObject *return_value = NULL;
+ utime_t utime;
- memset(&path, 0, sizeof(path));
- path.function_name = "utime";
memset(&utime, 0, sizeof(utime_t));
-#if defined(HAVE_FUTIMES) || defined(HAVE_FUTIMENS)
- path.allow_fd = 1;
-#endif
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "O&|O$OO&p:utime", keywords,
- path_converter, &path,
- &times, &ns,
-#if defined(HAVE_FUTIMESAT) || defined(HAVE_UTIMENSAT)
- dir_fd_converter, &dir_fd,
-#else
- dir_fd_unavailable, &dir_fd,
-#endif
- &follow_symlinks
- ))
- return NULL;
if (times && (times != Py_None) && ns) {
PyErr_SetString(PyExc_ValueError,
@@ -4942,9 +4744,9 @@ posix_utime(PyObject *self, PyObject *args, PyObject *kwargs)
}
utime.now = 0;
if (_PyTime_ObjectToTimespec(PyTuple_GET_ITEM(times, 0),
- &a_sec, &a_nsec, _PyTime_ROUND_DOWN) == -1 ||
+ &a_sec, &a_nsec, _PyTime_ROUND_FLOOR) == -1 ||
_PyTime_ObjectToTimespec(PyTuple_GET_ITEM(times, 1),
- &m_sec, &m_nsec, _PyTime_ROUND_DOWN) == -1) {
+ &m_sec, &m_nsec, _PyTime_ROUND_FLOOR) == -1) {
goto exit;
}
utime.atime_s = a_sec;
@@ -4976,9 +4778,9 @@ posix_utime(PyObject *self, PyObject *args, PyObject *kwargs)
goto exit;
#endif
- if (path_and_dir_fd_invalid("utime", &path, dir_fd) ||
- dir_fd_and_fd_invalid("utime", dir_fd, path.fd) ||
- fd_and_follow_symlinks_invalid("utime", path.fd, follow_symlinks))
+ if (path_and_dir_fd_invalid("utime", path, dir_fd) ||
+ dir_fd_and_fd_invalid("utime", dir_fd, path->fd) ||
+ fd_and_follow_symlinks_invalid("utime", path->fd, follow_symlinks))
goto exit;
#if !defined(HAVE_UTIMENSAT)
@@ -4992,17 +4794,17 @@ posix_utime(PyObject *self, PyObject *args, PyObject *kwargs)
#ifdef MS_WINDOWS
Py_BEGIN_ALLOW_THREADS
- if (path.wide)
- hFile = CreateFileW(path.wide, FILE_WRITE_ATTRIBUTES, 0,
+ if (path->wide)
+ hFile = CreateFileW(path->wide, FILE_WRITE_ATTRIBUTES, 0,
NULL, OPEN_EXISTING,
FILE_FLAG_BACKUP_SEMANTICS, NULL);
else
- hFile = CreateFileA(path.narrow, FILE_WRITE_ATTRIBUTES, 0,
+ hFile = CreateFileA(path->narrow, FILE_WRITE_ATTRIBUTES, 0,
NULL, OPEN_EXISTING,
FILE_FLAG_BACKUP_SEMANTICS, NULL);
Py_END_ALLOW_THREADS
if (hFile == INVALID_HANDLE_VALUE) {
- path_error(&path);
+ path_error(path);
goto exit;
}
@@ -5011,8 +4813,8 @@ posix_utime(PyObject *self, PyObject *args, PyObject *kwargs)
atime = mtime;
}
else {
- time_t_to_FILE_TIME(utime.atime_s, utime.atime_ns, &atime);
- time_t_to_FILE_TIME(utime.mtime_s, utime.mtime_ns, &mtime);
+ _Py_time_t_to_FILE_TIME(utime.atime_s, utime.atime_ns, &atime);
+ _Py_time_t_to_FILE_TIME(utime.mtime_s, utime.mtime_ns, &mtime);
}
if (!SetFileTime(hFile, NULL, &atime, &mtime)) {
/* Avoid putting the file name into the error here,
@@ -5027,23 +4829,23 @@ posix_utime(PyObject *self, PyObject *args, PyObject *kwargs)
#if UTIME_HAVE_NOFOLLOW_SYMLINKS
if ((!follow_symlinks) && (dir_fd == DEFAULT_DIR_FD))
- result = utime_nofollow_symlinks(&utime, path.narrow);
+ result = utime_nofollow_symlinks(&utime, path->narrow);
else
#endif
#if defined(HAVE_FUTIMESAT) || defined(HAVE_UTIMENSAT)
if ((dir_fd != DEFAULT_DIR_FD) || (!follow_symlinks))
- result = utime_dir_fd(&utime, dir_fd, path.narrow, follow_symlinks);
+ result = utime_dir_fd(&utime, dir_fd, path->narrow, follow_symlinks);
else
#endif
#if defined(HAVE_FUTIMES) || defined(HAVE_FUTIMENS)
- if (path.fd != -1)
- result = utime_fd(&utime, path.fd);
+ if (path->fd != -1)
+ result = utime_fd(&utime, path->fd);
else
#endif
- result = utime_default(&utime, path.narrow);
+ result = utime_default(&utime, path->narrow);
Py_END_ALLOW_THREADS
@@ -5059,7 +4861,6 @@ posix_utime(PyObject *self, PyObject *args, PyObject *kwargs)
return_value = Py_None;
exit:
- path_cleanup(&path);
#ifdef MS_WINDOWS
if (hFile != INVALID_HANDLE_VALUE)
CloseHandle(hFile);
@@ -5069,17 +4870,20 @@ exit:
/* Process operations */
-PyDoc_STRVAR(posix__exit__doc__,
-"_exit(status)\n\n\
-Exit to the system with specified status, without normal exit processing.");
+
+/*[clinic input]
+os._exit
+
+ status: int
+
+Exit to the system with specified status, without normal exit processing.
+[clinic start generated code]*/
static PyObject *
-posix__exit(PyObject *self, PyObject *args)
+os__exit_impl(PyModuleDef *module, int status)
+/*[clinic end generated code: output=472a3cbaf68f3621 input=5e6d57556b0c4a62]*/
{
- int sts;
- if (!PyArg_ParseTuple(args, "i:_exit", &sts))
- return NULL;
- _exit(sts);
+ _exit(status);
return NULL; /* Make gcc -Wall happy */
}
@@ -5217,96 +5021,83 @@ fail:
}
#endif
+
#ifdef HAVE_EXECV
-PyDoc_STRVAR(posix_execv__doc__,
-"execv(path, args)\n\n\
-Execute an executable path with arguments, replacing current process.\n\
-\n\
- path: path of executable file\n\
- args: tuple or list of strings");
+/*[clinic input]
+os.execv
+
+ path: FSConverter
+ Path of executable file.
+ argv: object
+ Tuple or list of strings.
+ /
+
+Execute an executable path with arguments, replacing current process.
+[clinic start generated code]*/
static PyObject *
-posix_execv(PyObject *self, PyObject *args)
+os_execv_impl(PyModuleDef *module, PyObject *path, PyObject *argv)
+/*[clinic end generated code: output=9221f08143146fff input=96041559925e5229]*/
{
- PyObject *opath;
- char *path;
- PyObject *argv;
+ char *path_char;
char **argvlist;
Py_ssize_t argc;
/* execv has two arguments: (path, argv), where
argv is a list or tuple of strings. */
- if (!PyArg_ParseTuple(args, "O&O:execv",
- PyUnicode_FSConverter,
- &opath, &argv))
- return NULL;
- path = PyBytes_AsString(opath);
+ path_char = PyBytes_AsString(path);
if (!PyList_Check(argv) && !PyTuple_Check(argv)) {
PyErr_SetString(PyExc_TypeError,
"execv() arg 2 must be a tuple or list");
- Py_DECREF(opath);
return NULL;
}
argc = PySequence_Size(argv);
if (argc < 1) {
PyErr_SetString(PyExc_ValueError, "execv() arg 2 must not be empty");
- Py_DECREF(opath);
return NULL;
}
argvlist = parse_arglist(argv, &argc);
if (argvlist == NULL) {
- Py_DECREF(opath);
return NULL;
}
- execv(path, argvlist);
+ execv(path_char, argvlist);
/* If we get here it's definitely an error */
free_string_array(argvlist, argc);
- Py_DECREF(opath);
return posix_error();
}
-PyDoc_STRVAR(posix_execve__doc__,
-"execve(path, args, env)\n\n\
-Execute a path with arguments and environment, replacing current process.\n\
-\n\
- path: path of executable file\n\
- args: tuple or list of arguments\n\
- env: dictionary of strings mapping to strings\n\
-\n\
-On some platforms, you may specify an open file descriptor for path;\n\
- execve will execute the program the file descriptor is open to.\n\
- If this functionality is unavailable, using it raises NotImplementedError.");
+
+/*[clinic input]
+os.execve
+
+ path: path_t(allow_fd='PATH_HAVE_FEXECVE')
+ Path of executable file.
+ argv: object
+ Tuple or list of strings.
+ env: object
+ Dictionary of strings mapping to strings.
+
+Execute an executable path with arguments, replacing current process.
+[clinic start generated code]*/
static PyObject *
-posix_execve(PyObject *self, PyObject *args, PyObject *kwargs)
+os_execve_impl(PyModuleDef *module, path_t *path, PyObject *argv,
+ PyObject *env)
+/*[clinic end generated code: output=181884fcdb21508e input=626804fa092606d9]*/
{
- path_t path;
- PyObject *argv, *env;
char **argvlist = NULL;
char **envlist;
Py_ssize_t argc, envc;
- static char *keywords[] = {"path", "argv", "environment", NULL};
/* execve has three arguments: (path, argv, env), where
argv is a list or tuple of strings and env is a dictionary
like posix.environ. */
- memset(&path, 0, sizeof(path));
- path.function_name = "execve";
-#ifdef HAVE_FEXECVE
- path.allow_fd = 1;
-#endif
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&OO:execve", keywords,
- path_converter, &path,
- &argv, &env
- ))
- return NULL;
-
if (!PyList_Check(argv) && !PyTuple_Check(argv)) {
PyErr_SetString(PyExc_TypeError,
"execve: argv must be a tuple or list");
@@ -5329,15 +5120,15 @@ posix_execve(PyObject *self, PyObject *args, PyObject *kwargs)
goto fail;
#ifdef HAVE_FEXECVE
- if (path.fd > -1)
- fexecve(path.fd, argvlist, envlist);
+ if (path->fd > -1)
+ fexecve(path->fd, argvlist, envlist);
else
#endif
- execve(path.narrow, argvlist, envlist);
+ execve(path->narrow, argvlist, envlist);
/* If we get here it's definitely an error */
- path_error(&path);
+ path_error(path);
while (--envc >= 0)
PyMem_DEL(envlist[envc]);
@@ -5345,29 +5136,33 @@ posix_execve(PyObject *self, PyObject *args, PyObject *kwargs)
fail:
if (argvlist)
free_string_array(argvlist, argc);
- path_cleanup(&path);
return NULL;
}
#endif /* HAVE_EXECV */
#ifdef HAVE_SPAWNV
-PyDoc_STRVAR(posix_spawnv__doc__,
-"spawnv(mode, path, args)\n\n\
-Execute the program 'path' in a new process.\n\
-\n\
- mode: mode of process creation\n\
- path: path of executable file\n\
- args: tuple or list of strings");
+/*[clinic input]
+os.spawnv
+
+ mode: int
+ Mode of process creation.
+ path: FSConverter
+ Path of executable file.
+ argv: object
+ Tuple or list of strings.
+ /
+
+Execute the program specified by path in a new process.
+[clinic start generated code]*/
static PyObject *
-posix_spawnv(PyObject *self, PyObject *args)
+os_spawnv_impl(PyModuleDef *module, int mode, PyObject *path, PyObject *argv)
+/*[clinic end generated code: output=140a7945484c8cc5 input=042c91dfc1e6debc]*/
{
- PyObject *opath;
- char *path;
- PyObject *argv;
+ char *path_char;
char **argvlist;
- int mode, i;
+ int i;
Py_ssize_t argc;
Py_intptr_t spawnval;
PyObject *(*getitem)(PyObject *, Py_ssize_t);
@@ -5375,11 +5170,7 @@ posix_spawnv(PyObject *self, PyObject *args)
/* spawnv has three arguments: (mode, path, argv), where
argv is a list or tuple of strings. */
- if (!PyArg_ParseTuple(args, "iO&O:spawnv", &mode,
- PyUnicode_FSConverter,
- &opath, &argv))
- return NULL;
- path = PyBytes_AsString(opath);
+ path_char = PyBytes_AsString(path);
if (PyList_Check(argv)) {
argc = PyList_Size(argv);
getitem = PyList_GetItem;
@@ -5391,13 +5182,11 @@ posix_spawnv(PyObject *self, PyObject *args)
else {
PyErr_SetString(PyExc_TypeError,
"spawnv() arg 2 must be a tuple or list");
- Py_DECREF(opath);
return NULL;
}
argvlist = PyMem_NEW(char *, argc+1);
if (argvlist == NULL) {
- Py_DECREF(opath);
return PyErr_NoMemory();
}
for (i = 0; i < argc; i++) {
@@ -5407,7 +5196,6 @@ posix_spawnv(PyObject *self, PyObject *args)
PyErr_SetString(
PyExc_TypeError,
"spawnv() arg 2 must contain only strings");
- Py_DECREF(opath);
return NULL;
}
}
@@ -5417,11 +5205,10 @@ posix_spawnv(PyObject *self, PyObject *args)
mode = _P_OVERLAY;
Py_BEGIN_ALLOW_THREADS
- spawnval = _spawnv(mode, path, argvlist);
+ spawnval = _spawnv(mode, path_char, argvlist);
Py_END_ALLOW_THREADS
free_string_array(argvlist, argc);
- Py_DECREF(opath);
if (spawnval == -1)
return posix_error();
@@ -5430,25 +5217,31 @@ posix_spawnv(PyObject *self, PyObject *args)
}
-PyDoc_STRVAR(posix_spawnve__doc__,
-"spawnve(mode, path, args, env)\n\n\
-Execute the program 'path' in a new process.\n\
-\n\
- mode: mode of process creation\n\
- path: path of executable file\n\
- args: tuple or list of arguments\n\
- env: dictionary of strings mapping to strings");
+/*[clinic input]
+os.spawnve
+
+ mode: int
+ Mode of process creation.
+ path: FSConverter
+ Path of executable file.
+ argv: object
+ Tuple or list of strings.
+ env: object
+ Dictionary of strings mapping to strings.
+ /
+
+Execute the program specified by path in a new process.
+[clinic start generated code]*/
static PyObject *
-posix_spawnve(PyObject *self, PyObject *args)
+os_spawnve_impl(PyModuleDef *module, int mode, PyObject *path,
+ PyObject *argv, PyObject *env)
+/*[clinic end generated code: output=e7f5f0703610531f input=02362fd937963f8f]*/
{
- PyObject *opath;
- char *path;
- PyObject *argv, *env;
+ char *path_char;
char **argvlist;
char **envlist;
PyObject *res = NULL;
- int mode;
Py_ssize_t argc, i, envc;
Py_intptr_t spawnval;
PyObject *(*getitem)(PyObject *, Py_ssize_t);
@@ -5458,11 +5251,7 @@ posix_spawnve(PyObject *self, PyObject *args)
argv is a list or tuple of strings and env is a dictionary
like posix.environ. */
- if (!PyArg_ParseTuple(args, "iO&OO:spawnve", &mode,
- PyUnicode_FSConverter,
- &opath, &argv, &env))
- return NULL;
- path = PyBytes_AsString(opath);
+ path_char = PyBytes_AsString(path);
if (PyList_Check(argv)) {
argc = PyList_Size(argv);
getitem = PyList_GetItem;
@@ -5506,7 +5295,7 @@ posix_spawnve(PyObject *self, PyObject *args)
mode = _P_OVERLAY;
Py_BEGIN_ALLOW_THREADS
- spawnval = _spawnve(mode, path, argvlist, envlist);
+ spawnval = _spawnve(mode, path_char, argvlist, envlist);
Py_END_ALLOW_THREADS
if (spawnval == -1)
@@ -5520,7 +5309,6 @@ posix_spawnve(PyObject *self, PyObject *args)
fail_1:
free_string_array(argvlist, lastarg);
fail_0:
- Py_DECREF(opath);
return res;
}
@@ -5528,14 +5316,17 @@ posix_spawnve(PyObject *self, PyObject *args)
#ifdef HAVE_FORK1
-PyDoc_STRVAR(posix_fork1__doc__,
-"fork1() -> pid\n\n\
-Fork a child process with a single multiplexed (i.e., not bound) thread.\n\
-\n\
-Return 0 to child process and PID of child to parent process.");
+/*[clinic input]
+os.fork1
+
+Fork a child process with a single multiplexed (i.e., not bound) thread.
+
+Return 0 to child process and PID of child to parent process.
+[clinic start generated code]*/
static PyObject *
-posix_fork1(PyObject *self, PyObject *noargs)
+os_fork1_impl(PyModuleDef *module)
+/*[clinic end generated code: output=e27b4f66419c9dcf input=12db02167893926e]*/
{
pid_t pid;
int result = 0;
@@ -5558,17 +5349,21 @@ posix_fork1(PyObject *self, PyObject *noargs)
}
return PyLong_FromPid(pid);
}
-#endif
+#endif /* HAVE_FORK1 */
#ifdef HAVE_FORK
-PyDoc_STRVAR(posix_fork__doc__,
-"fork() -> pid\n\n\
-Fork a child process.\n\
-Return 0 to child process and PID of child to parent process.");
+/*[clinic input]
+os.fork
+
+Fork a child process.
+
+Return 0 to child process and PID of child to parent process.
+[clinic start generated code]*/
static PyObject *
-posix_fork(PyObject *self, PyObject *noargs)
+os_fork_impl(PyModuleDef *module)
+/*[clinic end generated code: output=898b1ecd3498ba12 input=13c956413110eeaa]*/
{
pid_t pid;
int result = 0;
@@ -5591,92 +5386,106 @@ posix_fork(PyObject *self, PyObject *noargs)
}
return PyLong_FromPid(pid);
}
-#endif
+#endif /* HAVE_FORK */
-#ifdef HAVE_SCHED_H
+#ifdef HAVE_SCHED_H
#ifdef HAVE_SCHED_GET_PRIORITY_MAX
+/*[clinic input]
+os.sched_get_priority_max
-PyDoc_STRVAR(posix_sched_get_priority_max__doc__,
-"sched_get_priority_max(policy)\n\n\
-Get the maximum scheduling priority for *policy*.");
+ policy: int
+
+Get the maximum scheduling priority for policy.
+[clinic start generated code]*/
static PyObject *
-posix_sched_get_priority_max(PyObject *self, PyObject *args)
+os_sched_get_priority_max_impl(PyModuleDef *module, int policy)
+/*[clinic end generated code: output=a6a30fa5071f2d81 input=2097b7998eca6874]*/
{
- int policy, max;
+ int max;
- if (!PyArg_ParseTuple(args, "i:sched_get_priority_max", &policy))
- return NULL;
max = sched_get_priority_max(policy);
if (max < 0)
return posix_error();
return PyLong_FromLong(max);
}
-PyDoc_STRVAR(posix_sched_get_priority_min__doc__,
-"sched_get_priority_min(policy)\n\n\
-Get the minimum scheduling priority for *policy*.");
+
+/*[clinic input]
+os.sched_get_priority_min
+
+ policy: int
+
+Get the minimum scheduling priority for policy.
+[clinic start generated code]*/
static PyObject *
-posix_sched_get_priority_min(PyObject *self, PyObject *args)
+os_sched_get_priority_min_impl(PyModuleDef *module, int policy)
+/*[clinic end generated code: output=5ca3ed6bc43e9b20 input=21bc8fa0d70983bf]*/
{
- int policy, min;
-
- if (!PyArg_ParseTuple(args, "i:sched_get_priority_min", &policy))
- return NULL;
- min = sched_get_priority_min(policy);
+ int min = sched_get_priority_min(policy);
if (min < 0)
return posix_error();
return PyLong_FromLong(min);
}
-
#endif /* HAVE_SCHED_GET_PRIORITY_MAX */
+
#ifdef HAVE_SCHED_SETSCHEDULER
+/*[clinic input]
+os.sched_getscheduler
+ pid: pid_t
+ /
-PyDoc_STRVAR(posix_sched_getscheduler__doc__,
-"sched_getscheduler(pid)\n\n\
-Get the scheduling policy for the process with a PID of *pid*.\n\
-Passing a PID of 0 returns the scheduling policy for the calling process.");
+Get the scheduling policy for the process identifiedy by pid.
+
+Passing 0 for pid returns the scheduling policy for the calling process.
+[clinic start generated code]*/
static PyObject *
-posix_sched_getscheduler(PyObject *self, PyObject *args)
+os_sched_getscheduler_impl(PyModuleDef *module, pid_t pid)
+/*[clinic end generated code: output=8cd63c15caf54fa9 input=5f14cfd1f189e1a0]*/
{
- pid_t pid;
int policy;
- if (!PyArg_ParseTuple(args, _Py_PARSE_PID ":sched_getscheduler", &pid))
- return NULL;
policy = sched_getscheduler(pid);
if (policy < 0)
return posix_error();
return PyLong_FromLong(policy);
}
+#endif /* HAVE_SCHED_SETSCHEDULER */
-#endif
#if defined(HAVE_SCHED_SETSCHEDULER) || defined(HAVE_SCHED_SETPARAM)
+/*[clinic input]
+class os.sched_param "PyObject *" "&SchedParamType"
+
+@classmethod
+os.sched_param.__new__
+
+ sched_priority: object
+ A scheduling parameter.
+
+Current has only one field: sched_priority");
+[clinic start generated code]*/
static PyObject *
-sched_param_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
+os_sched_param_impl(PyTypeObject *type, PyObject *sched_priority)
+/*[clinic end generated code: output=48f4067d60f48c13 input=73a4c22f7071fc62]*/
{
- PyObject *res, *priority;
- static char *kwlist[] = {"sched_priority", NULL};
+ PyObject *res;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:sched_param", kwlist, &priority))
- return NULL;
res = PyStructSequence_New(type);
if (!res)
return NULL;
- Py_INCREF(priority);
- PyStructSequence_SET_ITEM(res, 0, priority);
+ Py_INCREF(sched_priority);
+ PyStructSequence_SET_ITEM(res, 0, sched_priority);
return res;
}
-PyDoc_STRVAR(sched_param__doc__,
-"sched_param(sched_priority): A scheduling parameter.\n\n\
-Current has only one field: sched_priority");
+
+PyDoc_VAR(os_sched_param__doc__);
static PyStructSequence_Field sched_param_fields[] = {
{"sched_priority", "the scheduling priority"},
@@ -5685,7 +5494,7 @@ static PyStructSequence_Field sched_param_fields[] = {
static PyStructSequence_Desc sched_param_desc = {
"sched_param", /* name */
- sched_param__doc__, /* doc */
+ os_sched_param__doc__, /* doc */
sched_param_fields,
1
};
@@ -5709,118 +5518,134 @@ convert_sched_param(PyObject *param, struct sched_param *res)
res->sched_priority = Py_SAFE_DOWNCAST(priority, long, int);
return 1;
}
+#endif /* defined(HAVE_SCHED_SETSCHEDULER) || defined(HAVE_SCHED_SETPARAM) */
-#endif
#ifdef HAVE_SCHED_SETSCHEDULER
+/*[clinic input]
+os.sched_setscheduler
-PyDoc_STRVAR(posix_sched_setscheduler__doc__,
-"sched_setscheduler(pid, policy, param)\n\n\
-Set the scheduling policy, *policy*, for *pid*.\n\
-If *pid* is 0, the calling process is changed.\n\
-*param* is an instance of sched_param.");
+ pid: pid_t
+ policy: int
+ param: sched_param
+ /
-static PyObject *
-posix_sched_setscheduler(PyObject *self, PyObject *args)
-{
- pid_t pid;
- int policy;
- struct sched_param param;
+Set the scheduling policy for the process identified by pid.
- if (!PyArg_ParseTuple(args, _Py_PARSE_PID "iO&:sched_setscheduler",
- &pid, &policy, &convert_sched_param, &param))
- return NULL;
+If pid is 0, the calling process is changed.
+param is an instance of sched_param.
+[clinic start generated code]*/
+static PyObject *
+os_sched_setscheduler_impl(PyModuleDef *module, pid_t pid, int policy,
+ struct sched_param *param)
+/*[clinic end generated code: output=37053e5c528c35c9 input=c581f9469a5327dd]*/
+{
/*
** sched_setscheduler() returns 0 in Linux, but the previous
** scheduling policy under Solaris/Illumos, and others.
** On error, -1 is returned in all Operating Systems.
*/
- if (sched_setscheduler(pid, policy, &param) == -1)
+ if (sched_setscheduler(pid, policy, param) == -1)
return posix_error();
Py_RETURN_NONE;
}
+#endif /* HAVE_SCHED_SETSCHEDULER*/
-#endif
#ifdef HAVE_SCHED_SETPARAM
+/*[clinic input]
+os.sched_getparam
+ pid: pid_t
+ /
-PyDoc_STRVAR(posix_sched_getparam__doc__,
-"sched_getparam(pid) -> sched_param\n\n\
-Returns scheduling parameters for the process with *pid* as an instance of the\n\
-sched_param class. A PID of 0 means the calling process.");
+Returns scheduling parameters for the process identified by pid.
+
+If pid is 0, returns parameters for the calling process.
+Return value is an instance of sched_param.
+[clinic start generated code]*/
static PyObject *
-posix_sched_getparam(PyObject *self, PyObject *args)
+os_sched_getparam_impl(PyModuleDef *module, pid_t pid)
+/*[clinic end generated code: output=f42c5bd2604ecd08 input=18a1ef9c2efae296]*/
{
- pid_t pid;
struct sched_param param;
- PyObject *res, *priority;
+ PyObject *result;
+ PyObject *priority;
- if (!PyArg_ParseTuple(args, _Py_PARSE_PID ":sched_getparam", &pid))
- return NULL;
if (sched_getparam(pid, &param))
return posix_error();
- res = PyStructSequence_New(&SchedParamType);
- if (!res)
+ result = PyStructSequence_New(&SchedParamType);
+ if (!result)
return NULL;
priority = PyLong_FromLong(param.sched_priority);
if (!priority) {
- Py_DECREF(res);
+ Py_DECREF(result);
return NULL;
}
- PyStructSequence_SET_ITEM(res, 0, priority);
- return res;
+ PyStructSequence_SET_ITEM(result, 0, priority);
+ return result;
}
-PyDoc_STRVAR(posix_sched_setparam__doc__,
-"sched_setparam(pid, param)\n\n\
-Set scheduling parameters for a process with PID *pid*.\n\
-A PID of 0 means the calling process.");
+
+/*[clinic input]
+os.sched_setparam
+ pid: pid_t
+ param: sched_param
+ /
+
+Set scheduling parameters for the process identified by pid.
+
+If pid is 0, sets parameters for the calling process.
+param should be an instance of sched_param.
+[clinic start generated code]*/
static PyObject *
-posix_sched_setparam(PyObject *self, PyObject *args)
+os_sched_setparam_impl(PyModuleDef *module, pid_t pid,
+ struct sched_param *param)
+/*[clinic end generated code: output=b7a3c589436cec9b input=6b8d6dfcecdc21bd]*/
{
- pid_t pid;
- struct sched_param param;
-
- if (!PyArg_ParseTuple(args, _Py_PARSE_PID "O&:sched_setparam",
- &pid, &convert_sched_param, &param))
- return NULL;
- if (sched_setparam(pid, &param))
+ if (sched_setparam(pid, param))
return posix_error();
Py_RETURN_NONE;
}
+#endif /* HAVE_SCHED_SETPARAM */
-#endif
#ifdef HAVE_SCHED_RR_GET_INTERVAL
+/*[clinic input]
+os.sched_rr_get_interval -> double
+ pid: pid_t
+ /
-PyDoc_STRVAR(posix_sched_rr_get_interval__doc__,
-"sched_rr_get_interval(pid) -> float\n\n\
-Return the round-robin quantum for the process with PID *pid* in seconds.");
+Return the round-robin quantum for the process identified by pid, in seconds.
-static PyObject *
-posix_sched_rr_get_interval(PyObject *self, PyObject *args)
+Value returned is a float.
+[clinic start generated code]*/
+
+static double
+os_sched_rr_get_interval_impl(PyModuleDef *module, pid_t pid)
+/*[clinic end generated code: output=7adc137a86dea581 input=2a973da15cca6fae]*/
{
- pid_t pid;
struct timespec interval;
-
- if (!PyArg_ParseTuple(args, _Py_PARSE_PID ":sched_rr_get_interval", &pid))
- return NULL;
- if (sched_rr_get_interval(pid, &interval))
- return posix_error();
- return PyFloat_FromDouble((double)interval.tv_sec + 1e-9*interval.tv_nsec);
+ if (sched_rr_get_interval(pid, &interval)) {
+ posix_error();
+ return -1.0;
+ }
+ return (double)interval.tv_sec + 1e-9*interval.tv_nsec;
}
+#endif /* HAVE_SCHED_RR_GET_INTERVAL */
-#endif
-PyDoc_STRVAR(posix_sched_yield__doc__,
-"sched_yield()\n\n\
-Voluntarily relinquish the CPU.");
+/*[clinic input]
+os.sched_yield
+
+Voluntarily relinquish the CPU.
+[clinic start generated code]*/
static PyObject *
-posix_sched_yield(PyObject *self, PyObject *noargs)
+os_sched_yield_impl(PyModuleDef *module)
+/*[clinic end generated code: output=d7bd51869c4cb6a8 input=e54d6f98189391d4]*/
{
if (sched_yield())
return posix_error();
@@ -5828,39 +5653,41 @@ posix_sched_yield(PyObject *self, PyObject *noargs)
}
#ifdef HAVE_SCHED_SETAFFINITY
-
/* The minimum number of CPUs allocated in a cpu_set_t */
static const int NCPUS_START = sizeof(unsigned long) * CHAR_BIT;
-PyDoc_STRVAR(posix_sched_setaffinity__doc__,
-"sched_setaffinity(pid, cpu_set)\n\n\
-Set the affinity of the process with PID *pid* to *cpu_set*.");
+/*[clinic input]
+os.sched_setaffinity
+ pid: pid_t
+ mask : object
+ /
+
+Set the CPU affinity of the process identified by pid to mask.
+
+mask should be an iterable of integers identifying CPUs.
+[clinic start generated code]*/
static PyObject *
-posix_sched_setaffinity(PyObject *self, PyObject *args)
+os_sched_setaffinity_impl(PyModuleDef *module, pid_t pid, PyObject *mask)
+/*[clinic end generated code: output=582bcbf40d3253a9 input=a0791a597c7085ba]*/
{
- pid_t pid;
int ncpus;
size_t setsize;
- cpu_set_t *mask = NULL;
- PyObject *iterable, *iterator = NULL, *item;
+ cpu_set_t *cpu_set = NULL;
+ PyObject *iterator = NULL, *item;
- if (!PyArg_ParseTuple(args, _Py_PARSE_PID "O:sched_setaffinity",
- &pid, &iterable))
- return NULL;
-
- iterator = PyObject_GetIter(iterable);
+ iterator = PyObject_GetIter(mask);
if (iterator == NULL)
return NULL;
ncpus = NCPUS_START;
setsize = CPU_ALLOC_SIZE(ncpus);
- mask = CPU_ALLOC(ncpus);
- if (mask == NULL) {
+ cpu_set = CPU_ALLOC(ncpus);
+ if (cpu_set == NULL) {
PyErr_NoMemory();
goto error;
}
- CPU_ZERO_S(setsize, mask);
+ CPU_ZERO_S(setsize, cpu_set);
while ((item = PyIter_Next(iterator))) {
long cpu;
@@ -5901,48 +5728,50 @@ posix_sched_setaffinity(PyObject *self, PyObject *args)
}
newsetsize = CPU_ALLOC_SIZE(newncpus);
CPU_ZERO_S(newsetsize, newmask);
- memcpy(newmask, mask, setsize);
- CPU_FREE(mask);
+ memcpy(newmask, cpu_set, setsize);
+ CPU_FREE(cpu_set);
setsize = newsetsize;
- mask = newmask;
+ cpu_set = newmask;
ncpus = newncpus;
}
- CPU_SET_S(cpu, setsize, mask);
+ CPU_SET_S(cpu, setsize, cpu_set);
}
Py_CLEAR(iterator);
- if (sched_setaffinity(pid, setsize, mask)) {
+ if (sched_setaffinity(pid, setsize, cpu_set)) {
posix_error();
goto error;
}
- CPU_FREE(mask);
+ CPU_FREE(cpu_set);
Py_RETURN_NONE;
error:
- if (mask)
- CPU_FREE(mask);
+ if (cpu_set)
+ CPU_FREE(cpu_set);
Py_XDECREF(iterator);
return NULL;
}
-PyDoc_STRVAR(posix_sched_getaffinity__doc__,
-"sched_getaffinity(pid, ncpus) -> cpu_set\n\n\
-Return the affinity of the process with PID *pid*.\n\
-The returned cpu_set will be of size *ncpus*.");
+
+/*[clinic input]
+os.sched_getaffinity
+ pid: pid_t
+ /
+
+Return the affinity of the process identified by pid.
+
+The affinity is returned as a set of CPU identifiers.
+[clinic start generated code]*/
static PyObject *
-posix_sched_getaffinity(PyObject *self, PyObject *args)
+os_sched_getaffinity_impl(PyModuleDef *module, pid_t pid)
+/*[clinic end generated code: output=b431a8f310e369e7 input=eaf161936874b8a1]*/
{
- pid_t pid;
int cpu, ncpus, count;
size_t setsize;
cpu_set_t *mask = NULL;
PyObject *res = NULL;
- if (!PyArg_ParseTuple(args, _Py_PARSE_PID ":sched_getaffinity",
- &pid))
- return NULL;
-
ncpus = NCPUS_START;
while (1) {
setsize = CPU_ALLOC_SIZE(ncpus);
@@ -5992,6 +5821,7 @@ error:
#endif /* HAVE_SCHED_H */
+
/* AIX uses /dev/ptc but is otherwise the same as /dev/ptmx */
/* IRIX has both /dev/ptc and /dev/ptmx, use ptmx */
#if defined(HAVE_DEV_PTC) && !defined(HAVE_DEV_PTMX)
@@ -6018,13 +5848,20 @@ error:
#endif
#endif /* defined(HAVE_OPENPTY) || defined(HAVE_FORKPTY) || defined(HAVE_DEV_PTMX */
+
#if defined(HAVE_OPENPTY) || defined(HAVE__GETPTY) || defined(HAVE_DEV_PTMX)
-PyDoc_STRVAR(posix_openpty__doc__,
-"openpty() -> (master_fd, slave_fd)\n\n\
-Open a pseudo-terminal, returning open fd's for both master and slave end.\n");
+/*[clinic input]
+os.openpty
+
+Open a pseudo-terminal.
+
+Return a tuple of (master_fd, slave_fd) containing open file descriptors
+for both the master and slave ends.
+[clinic start generated code]*/
static PyObject *
-posix_openpty(PyObject *self, PyObject *noargs)
+os_openpty_impl(PyModuleDef *module)
+/*[clinic end generated code: output=358e571c1ba135ee input=f3d99fd99e762907]*/
{
int master_fd = -1, slave_fd = -1;
#ifndef HAVE_OPENPTY
@@ -6055,7 +5892,7 @@ posix_openpty(PyObject *self, PyObject *noargs)
slave_fd = _Py_open(slave_name, O_RDWR);
if (slave_fd < 0)
- goto posix_error;
+ goto error;
#else
master_fd = open(DEV_PTY_FILE, O_RDWR | O_NOCTTY); /* open master */
@@ -6083,8 +5920,8 @@ posix_openpty(PyObject *self, PyObject *noargs)
goto posix_error;
slave_fd = _Py_open(slave_name, O_RDWR | O_NOCTTY); /* open slave */
- if (slave_fd < 0)
- goto posix_error;
+ if (slave_fd == -1)
+ goto error;
if (_Py_set_inheritable(master_fd, 0, NULL) < 0)
goto posix_error;
@@ -6102,9 +5939,7 @@ posix_openpty(PyObject *self, PyObject *noargs)
posix_error:
posix_error();
-#if defined(HAVE_OPENPTY) || defined(HAVE__GETPTY)
error:
-#endif
if (master_fd != -1)
close(master_fd);
if (slave_fd != -1)
@@ -6113,15 +5948,22 @@ error:
}
#endif /* defined(HAVE_OPENPTY) || defined(HAVE__GETPTY) || defined(HAVE_DEV_PTMX) */
+
#ifdef HAVE_FORKPTY
-PyDoc_STRVAR(posix_forkpty__doc__,
-"forkpty() -> (pid, master_fd)\n\n\
-Fork a new process with a new pseudo-terminal as controlling tty.\n\n\
-Like fork(), return 0 as pid to child process, and PID of child to parent.\n\
-To both, return fd of newly opened pseudo-terminal.\n");
+/*[clinic input]
+os.forkpty
+
+Fork a new process with a new pseudo-terminal as controlling tty.
+
+Returns a tuple of (pid, master_fd).
+Like fork(), return pid of 0 to the child process,
+and pid of child to the parent process.
+To both, return fd of newly opened pseudo-terminal.
+[clinic start generated code]*/
static PyObject *
-posix_forkpty(PyObject *self, PyObject *noargs)
+os_forkpty_impl(PyModuleDef *module)
+/*[clinic end generated code: output=a11b8391dce3cb57 input=f1f7f4bae3966010]*/
{
int master_fd = -1, result = 0;
pid_t pid;
@@ -6145,59 +5987,73 @@ posix_forkpty(PyObject *self, PyObject *noargs)
}
return Py_BuildValue("(Ni)", PyLong_FromPid(pid), master_fd);
}
-#endif
+#endif /* HAVE_FORKPTY */
#ifdef HAVE_GETEGID
-PyDoc_STRVAR(posix_getegid__doc__,
-"getegid() -> egid\n\n\
-Return the current process's effective group id.");
+/*[clinic input]
+os.getegid
+
+Return the current process's effective group id.
+[clinic start generated code]*/
static PyObject *
-posix_getegid(PyObject *self, PyObject *noargs)
+os_getegid_impl(PyModuleDef *module)
+/*[clinic end generated code: output=90f433a8c0b1d919 input=1596f79ad1107d5d]*/
{
return _PyLong_FromGid(getegid());
}
-#endif
+#endif /* HAVE_GETEGID */
#ifdef HAVE_GETEUID
-PyDoc_STRVAR(posix_geteuid__doc__,
-"geteuid() -> euid\n\n\
-Return the current process's effective user id.");
+/*[clinic input]
+os.geteuid
+
+Return the current process's effective user id.
+[clinic start generated code]*/
static PyObject *
-posix_geteuid(PyObject *self, PyObject *noargs)
+os_geteuid_impl(PyModuleDef *module)
+/*[clinic end generated code: output=1a532c4a66874357 input=4644c662d3bd9f19]*/
{
return _PyLong_FromUid(geteuid());
}
-#endif
+#endif /* HAVE_GETEUID */
#ifdef HAVE_GETGID
-PyDoc_STRVAR(posix_getgid__doc__,
-"getgid() -> gid\n\n\
-Return the current process's group id.");
+/*[clinic input]
+os.getgid
+
+Return the current process's group id.
+[clinic start generated code]*/
static PyObject *
-posix_getgid(PyObject *self, PyObject *noargs)
+os_getgid_impl(PyModuleDef *module)
+/*[clinic end generated code: output=91a22021b74ea46b input=58796344cd87c0f6]*/
{
return _PyLong_FromGid(getgid());
}
-#endif
+#endif /* HAVE_GETGID */
-PyDoc_STRVAR(posix_getpid__doc__,
-"getpid() -> pid\n\n\
-Return the current process id");
+/*[clinic input]
+os.getpid
+
+Return the current process id.
+[clinic start generated code]*/
static PyObject *
-posix_getpid(PyObject *self, PyObject *noargs)
+os_getpid_impl(PyModuleDef *module)
+/*[clinic end generated code: output=8fbf3a934ee09e62 input=5a9a00f0ab68aa00]*/
{
return PyLong_FromPid(getpid());
}
#ifdef HAVE_GETGROUPLIST
+
+/* AC 3.5: funny apple logic below */
PyDoc_STRVAR(posix_getgrouplist__doc__,
"getgrouplist(user, group) -> list of groups to which a user belongs\n\n\
Returns a list of groups to which a user belongs.\n\n\
@@ -6270,15 +6126,19 @@ posix_getgrouplist(PyObject *self, PyObject *args)
return list;
}
-#endif
+#endif /* HAVE_GETGROUPLIST */
+
#ifdef HAVE_GETGROUPS
-PyDoc_STRVAR(posix_getgroups__doc__,
-"getgroups() -> list of group IDs\n\n\
-Return list of supplemental group IDs for the process.");
+/*[clinic input]
+os.getgroups
+
+Return list of supplemental group IDs for the process.
+[clinic start generated code]*/
static PyObject *
-posix_getgroups(PyObject *self, PyObject *noargs)
+os_getgroups_impl(PyModuleDef *module)
+/*[clinic end generated code: output=6e7c4fd2db6d5c60 input=d3f109412e6a155c]*/
{
PyObject *result = NULL;
@@ -6377,7 +6237,7 @@ posix_getgroups(PyObject *self, PyObject *noargs)
return result;
}
-#endif
+#endif /* HAVE_GETGROUPS */
#ifdef HAVE_INITGROUPS
PyDoc_STRVAR(posix_initgroups__doc__,
@@ -6386,6 +6246,7 @@ Call the system initgroups() to initialize the group access list with all of\n\
the groups of which the specified username is a member, plus the specified\n\
group id.");
+/* AC 3.5: funny apple logic */
static PyObject *
posix_initgroups(PyObject *self, PyObject *args)
{
@@ -6418,20 +6279,23 @@ posix_initgroups(PyObject *self, PyObject *args)
Py_INCREF(Py_None);
return Py_None;
}
-#endif
+#endif /* HAVE_INITGROUPS */
+
#ifdef HAVE_GETPGID
-PyDoc_STRVAR(posix_getpgid__doc__,
-"getpgid(pid) -> pgid\n\n\
-Call the system call getpgid().");
+/*[clinic input]
+os.getpgid
+
+ pid: pid_t
+
+Call the system call getpgid(), and return the result.
+[clinic start generated code]*/
static PyObject *
-posix_getpgid(PyObject *self, PyObject *args)
+os_getpgid_impl(PyModuleDef *module, pid_t pid)
+/*[clinic end generated code: output=70e713b4d54b7c61 input=39d710ae3baaf1c7]*/
{
- pid_t pid, pgid;
- if (!PyArg_ParseTuple(args, _Py_PARSE_PID ":getpgid", &pid))
- return NULL;
- pgid = getpgid(pid);
+ pid_t pgid = getpgid(pid);
if (pgid < 0)
return posix_error();
return PyLong_FromPid(pgid);
@@ -6440,12 +6304,15 @@ posix_getpgid(PyObject *self, PyObject *args)
#ifdef HAVE_GETPGRP
-PyDoc_STRVAR(posix_getpgrp__doc__,
-"getpgrp() -> pgrp\n\n\
-Return the current process group id.");
+/*[clinic input]
+os.getpgrp
+
+Return the current process group id.
+[clinic start generated code]*/
static PyObject *
-posix_getpgrp(PyObject *self, PyObject *noargs)
+os_getpgrp_impl(PyModuleDef *module)
+/*[clinic end generated code: output=cf3403585846811f input=6846fb2bb9a3705e]*/
{
#ifdef GETPGRP_HAVE_ARG
return PyLong_FromPid(getpgrp(0));
@@ -6457,12 +6324,15 @@ posix_getpgrp(PyObject *self, PyObject *noargs)
#ifdef HAVE_SETPGRP
-PyDoc_STRVAR(posix_setpgrp__doc__,
-"setpgrp()\n\n\
-Make this process the process group leader.");
+/*[clinic input]
+os.setpgrp
+
+Make the current process the leader of its process group.
+[clinic start generated code]*/
static PyObject *
-posix_setpgrp(PyObject *self, PyObject *noargs)
+os_setpgrp_impl(PyModuleDef *module)
+/*[clinic end generated code: output=59650f55a963d7ac input=1f0619fcb5731e7e]*/
{
#ifdef SETPGRP_HAVE_ARG
if (setpgrp(0, 0) < 0)
@@ -6473,7 +6343,6 @@ posix_setpgrp(PyObject *self, PyObject *noargs)
Py_INCREF(Py_None);
return Py_None;
}
-
#endif /* HAVE_SETPGRP */
#ifdef HAVE_GETPPID
@@ -6520,14 +6389,19 @@ win32_getppid()
}
#endif /*MS_WINDOWS*/
-PyDoc_STRVAR(posix_getppid__doc__,
-"getppid() -> ppid\n\n\
-Return the parent's process id. If the parent process has already exited,\n\
-Windows machines will still return its id; others systems will return the id\n\
-of the 'init' process (1).");
+
+/*[clinic input]
+os.getppid
+
+Return the parent's process id.
+
+If the parent process has already exited, Windows machines will still
+return its id; others systems will return the id of the 'init' process (1).
+[clinic start generated code]*/
static PyObject *
-posix_getppid(PyObject *self, PyObject *noargs)
+os_getppid_impl(PyModuleDef *module)
+/*[clinic end generated code: output=4e49c8e7a8738cd2 input=e637cb87539c030e]*/
{
#ifdef MS_WINDOWS
return win32_getppid();
@@ -6539,12 +6413,15 @@ posix_getppid(PyObject *self, PyObject *noargs)
#ifdef HAVE_GETLOGIN
-PyDoc_STRVAR(posix_getlogin__doc__,
-"getlogin() -> string\n\n\
-Return the actual login name.");
+/*[clinic input]
+os.getlogin
+
+Return the actual login name.
+[clinic start generated code]*/
static PyObject *
-posix_getlogin(PyObject *self, PyObject *noargs)
+os_getlogin_impl(PyModuleDef *module)
+/*[clinic end generated code: output=037ebdb3e4b5dac1 input=2a21ab1e917163df]*/
{
PyObject *result = NULL;
#ifdef MS_WINDOWS
@@ -6577,77 +6454,54 @@ posix_getlogin(PyObject *self, PyObject *noargs)
}
#endif /* HAVE_GETLOGIN */
+
#ifdef HAVE_GETUID
-PyDoc_STRVAR(posix_getuid__doc__,
-"getuid() -> uid\n\n\
-Return the current process's user id.");
+/*[clinic input]
+os.getuid
+
+Return the current process's user id.
+[clinic start generated code]*/
static PyObject *
-posix_getuid(PyObject *self, PyObject *noargs)
+os_getuid_impl(PyModuleDef *module)
+/*[clinic end generated code: output=03a8b894cefb3fa5 input=b53c8b35f110a516]*/
{
return _PyLong_FromUid(getuid());
}
-#endif
+#endif /* HAVE_GETUID */
+
+#ifdef MS_WINDOWS
+#define HAVE_KILL
+#endif /* MS_WINDOWS */
#ifdef HAVE_KILL
-PyDoc_STRVAR(posix_kill__doc__,
-"kill(pid, sig)\n\n\
-Kill a process with a signal.");
+/*[clinic input]
+os.kill
-static PyObject *
-posix_kill(PyObject *self, PyObject *args)
-{
- pid_t pid;
- int sig;
- if (!PyArg_ParseTuple(args, _Py_PARSE_PID "i:kill", &pid, &sig))
- return NULL;
- if (kill(pid, sig) == -1)
- return posix_error();
- Py_INCREF(Py_None);
- return Py_None;
-}
-#endif
+ pid: pid_t
+ signal: Py_ssize_t
+ /
-#ifdef HAVE_KILLPG
-PyDoc_STRVAR(posix_killpg__doc__,
-"killpg(pgid, sig)\n\n\
-Kill a process group with a signal.");
+Kill a process with a signal.
+[clinic start generated code]*/
static PyObject *
-posix_killpg(PyObject *self, PyObject *args)
+os_kill_impl(PyModuleDef *module, pid_t pid, Py_ssize_t signal)
+/*[clinic end generated code: output=74f907dd00a83c26 input=61a36b86ca275ab9]*/
+#ifndef MS_WINDOWS
{
- int sig;
- pid_t pgid;
- /* XXX some man pages make the `pgid` parameter an int, others
- a pid_t. Since getpgrp() returns a pid_t, we assume killpg should
- take the same type. Moreover, pid_t is always at least as wide as
- int (else compilation of this module fails), which is safe. */
- if (!PyArg_ParseTuple(args, _Py_PARSE_PID "i:killpg", &pgid, &sig))
- return NULL;
- if (killpg(pgid, sig) == -1)
+ if (kill(pid, (int)signal) == -1)
return posix_error();
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
-#endif
-
-#ifdef MS_WINDOWS
-PyDoc_STRVAR(win32_kill__doc__,
-"kill(pid, sig)\n\n\
-Kill a process with a signal.");
-
-static PyObject *
-win32_kill(PyObject *self, PyObject *args)
+#else /* !MS_WINDOWS */
{
PyObject *result;
- pid_t pid;
- DWORD sig, err;
+ DWORD sig = (DWORD)signal;
+ DWORD err;
HANDLE handle;
- if (!PyArg_ParseTuple(args, _Py_PARSE_PID "k:kill", &pid, &sig))
- return NULL;
-
/* Console processes which share a common console can be sent CTRL+C or
CTRL+BREAK events, provided they handle said events. */
if (sig == CTRL_C_EVENT || sig == CTRL_BREAK_EVENT) {
@@ -6678,103 +6532,138 @@ win32_kill(PyObject *self, PyObject *args)
CloseHandle(handle);
return result;
}
-#endif /* MS_WINDOWS */
+#endif /* !MS_WINDOWS */
+#endif /* HAVE_KILL */
-#ifdef HAVE_PLOCK
+#ifdef HAVE_KILLPG
+/*[clinic input]
+os.killpg
+
+ pgid: pid_t
+ signal: int
+ /
+
+Kill a process group with a signal.
+[clinic start generated code]*/
+
+static PyObject *
+os_killpg_impl(PyModuleDef *module, pid_t pgid, int signal)
+/*[clinic end generated code: output=3434a766ef945f93 input=38b5449eb8faec19]*/
+{
+ /* XXX some man pages make the `pgid` parameter an int, others
+ a pid_t. Since getpgrp() returns a pid_t, we assume killpg should
+ take the same type. Moreover, pid_t is always at least as wide as
+ int (else compilation of this module fails), which is safe. */
+ if (killpg(pgid, signal) == -1)
+ return posix_error();
+ Py_RETURN_NONE;
+}
+#endif /* HAVE_KILLPG */
+
+
+#ifdef HAVE_PLOCK
#ifdef HAVE_SYS_LOCK_H
#include <sys/lock.h>
#endif
-PyDoc_STRVAR(posix_plock__doc__,
-"plock(op)\n\n\
+/*[clinic input]
+os.plock
+ op: int
+ /
+
Lock program segments into memory.");
+[clinic start generated code]*/
static PyObject *
-posix_plock(PyObject *self, PyObject *args)
+os_plock_impl(PyModuleDef *module, int op)
+/*[clinic end generated code: output=5cb851f81b914984 input=e6e5e348e1525f60]*/
{
- int op;
- if (!PyArg_ParseTuple(args, "i:plock", &op))
- return NULL;
if (plock(op) == -1)
return posix_error();
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
-#endif
+#endif /* HAVE_PLOCK */
+
#ifdef HAVE_SETUID
-PyDoc_STRVAR(posix_setuid__doc__,
-"setuid(uid)\n\n\
-Set the current process's user id.");
+/*[clinic input]
+os.setuid
+
+ uid: uid_t
+ /
+
+Set the current process's user id.
+[clinic start generated code]*/
static PyObject *
-posix_setuid(PyObject *self, PyObject *args)
+os_setuid_impl(PyModuleDef *module, uid_t uid)
+/*[clinic end generated code: output=941ea9a8d1e5d565 input=c921a3285aa22256]*/
{
- uid_t uid;
- if (!PyArg_ParseTuple(args, "O&:setuid", _Py_Uid_Converter, &uid))
- return NULL;
if (setuid(uid) < 0)
return posix_error();
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
#endif /* HAVE_SETUID */
#ifdef HAVE_SETEUID
-PyDoc_STRVAR(posix_seteuid__doc__,
-"seteuid(uid)\n\n\
-Set the current process's effective user id.");
+/*[clinic input]
+os.seteuid
+
+ euid: uid_t
+ /
+
+Set the current process's effective user id.
+[clinic start generated code]*/
static PyObject *
-posix_seteuid (PyObject *self, PyObject *args)
+os_seteuid_impl(PyModuleDef *module, uid_t euid)
+/*[clinic end generated code: output=66f4f6823a648d6d input=ba93d927e4781aa9]*/
{
- uid_t euid;
- if (!PyArg_ParseTuple(args, "O&:seteuid", _Py_Uid_Converter, &euid))
- return NULL;
- if (seteuid(euid) < 0) {
+ if (seteuid(euid) < 0)
return posix_error();
- } else {
- Py_INCREF(Py_None);
- return Py_None;
- }
+ Py_RETURN_NONE;
}
#endif /* HAVE_SETEUID */
+
#ifdef HAVE_SETEGID
-PyDoc_STRVAR(posix_setegid__doc__,
-"setegid(gid)\n\n\
-Set the current process's effective group id.");
+/*[clinic input]
+os.setegid
+
+ egid: gid_t
+ /
+
+Set the current process's effective group id.
+[clinic start generated code]*/
static PyObject *
-posix_setegid (PyObject *self, PyObject *args)
+os_setegid_impl(PyModuleDef *module, gid_t egid)
+/*[clinic end generated code: output=ca094a69a081a60f input=4080526d0ccd6ce3]*/
{
- gid_t egid;
- if (!PyArg_ParseTuple(args, "O&:setegid", _Py_Gid_Converter, &egid))
- return NULL;
- if (setegid(egid) < 0) {
+ if (setegid(egid) < 0)
return posix_error();
- } else {
- Py_INCREF(Py_None);
- return Py_None;
- }
+ Py_RETURN_NONE;
}
#endif /* HAVE_SETEGID */
+
#ifdef HAVE_SETREUID
-PyDoc_STRVAR(posix_setreuid__doc__,
-"setreuid(ruid, euid)\n\n\
-Set the current process's real and effective user ids.");
+/*[clinic input]
+os.setreuid
+
+ ruid: uid_t
+ euid: uid_t
+ /
+
+Set the current process's real and effective user ids.
+[clinic start generated code]*/
static PyObject *
-posix_setreuid (PyObject *self, PyObject *args)
+os_setreuid_impl(PyModuleDef *module, uid_t ruid, uid_t euid)
+/*[clinic end generated code: output=b2938c3e73d27ec7 input=0ca8978de663880c]*/
{
- uid_t ruid, euid;
- if (!PyArg_ParseTuple(args, "O&O&:setreuid",
- _Py_Uid_Converter, &ruid,
- _Py_Uid_Converter, &euid))
- return NULL;
if (setreuid(ruid, euid) < 0) {
return posix_error();
} else {
@@ -6784,53 +6673,62 @@ posix_setreuid (PyObject *self, PyObject *args)
}
#endif /* HAVE_SETREUID */
+
#ifdef HAVE_SETREGID
-PyDoc_STRVAR(posix_setregid__doc__,
-"setregid(rgid, egid)\n\n\
-Set the current process's real and effective group ids.");
+/*[clinic input]
+os.setregid
+
+ rgid: gid_t
+ egid: gid_t
+ /
+
+Set the current process's real and effective group ids.
+[clinic start generated code]*/
static PyObject *
-posix_setregid (PyObject *self, PyObject *args)
+os_setregid_impl(PyModuleDef *module, gid_t rgid, gid_t egid)
+/*[clinic end generated code: output=db18f1839ababe3d input=c59499f72846db78]*/
{
- gid_t rgid, egid;
- if (!PyArg_ParseTuple(args, "O&O&:setregid",
- _Py_Gid_Converter, &rgid,
- _Py_Gid_Converter, &egid))
- return NULL;
- if (setregid(rgid, egid) < 0) {
+ if (setregid(rgid, egid) < 0)
return posix_error();
- } else {
- Py_INCREF(Py_None);
- return Py_None;
- }
+ Py_RETURN_NONE;
}
#endif /* HAVE_SETREGID */
+
#ifdef HAVE_SETGID
-PyDoc_STRVAR(posix_setgid__doc__,
-"setgid(gid)\n\n\
-Set the current process's group id.");
+/*[clinic input]
+os.setgid
+ gid: gid_t
+ /
+
+Set the current process's group id.
+[clinic start generated code]*/
static PyObject *
-posix_setgid(PyObject *self, PyObject *args)
+os_setgid_impl(PyModuleDef *module, gid_t gid)
+/*[clinic end generated code: output=756cb42c6abd9d87 input=27d30c4059045dc6]*/
{
- gid_t gid;
- if (!PyArg_ParseTuple(args, "O&:setgid", _Py_Gid_Converter, &gid))
- return NULL;
if (setgid(gid) < 0)
return posix_error();
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
#endif /* HAVE_SETGID */
+
#ifdef HAVE_SETGROUPS
-PyDoc_STRVAR(posix_setgroups__doc__,
-"setgroups(list)\n\n\
-Set the groups of the current process to list.");
+/*[clinic input]
+os.setgroups
+
+ groups: object
+ /
+
+Set the groups of the current process to list.
+[clinic start generated code]*/
static PyObject *
-posix_setgroups(PyObject *self, PyObject *groups)
+os_setgroups(PyModuleDef *module, PyObject *groups)
+/*[clinic end generated code: output=7945c2e3cc817c58 input=fa742ca3daf85a7e]*/
{
int i, len;
gid_t grouplist[MAX_GROUPS];
@@ -6931,83 +6829,114 @@ wait_helper(pid_t pid, int status, struct rusage *ru)
}
#endif /* HAVE_WAIT3 || HAVE_WAIT4 */
+
#ifdef HAVE_WAIT3
-PyDoc_STRVAR(posix_wait3__doc__,
-"wait3(options) -> (pid, status, rusage)\n\n\
-Wait for completion of a child process.");
+/*[clinic input]
+os.wait3
+
+ options: int
+Wait for completion of a child process.
+
+Returns a tuple of information about the child process:
+ (pid, status, rusage)
+[clinic start generated code]*/
static PyObject *
-posix_wait3(PyObject *self, PyObject *args)
+os_wait3_impl(PyModuleDef *module, int options)
+/*[clinic end generated code: output=e18af4924dc54945 input=8ac4c56956b61710]*/
{
pid_t pid;
- int options;
struct rusage ru;
+ int async_err = 0;
WAIT_TYPE status;
WAIT_STATUS_INT(status) = 0;
- if (!PyArg_ParseTuple(args, "i:wait3", &options))
- return NULL;
-
- Py_BEGIN_ALLOW_THREADS
- pid = wait3(&status, options, &ru);
- Py_END_ALLOW_THREADS
+ do {
+ Py_BEGIN_ALLOW_THREADS
+ pid = wait3(&status, options, &ru);
+ Py_END_ALLOW_THREADS
+ } while (pid < 0 && errno == EINTR && !(async_err = PyErr_CheckSignals()));
+ if (pid < 0)
+ return (!async_err) ? posix_error() : NULL;
return wait_helper(pid, WAIT_STATUS_INT(status), &ru);
}
#endif /* HAVE_WAIT3 */
+
#ifdef HAVE_WAIT4
-PyDoc_STRVAR(posix_wait4__doc__,
-"wait4(pid, options) -> (pid, status, rusage)\n\n\
-Wait for completion of a given child process.");
+/*[clinic input]
+
+os.wait4
+
+ pid: pid_t
+ options: int
+
+Wait for completion of a specific child process.
+
+Returns a tuple of information about the child process:
+ (pid, status, rusage)
+[clinic start generated code]*/
static PyObject *
-posix_wait4(PyObject *self, PyObject *args)
+os_wait4_impl(PyModuleDef *module, pid_t pid, int options)
+/*[clinic end generated code: output=714f19e6ff01e099 input=d11deed0750600ba]*/
{
- pid_t pid;
- int options;
+ pid_t res;
struct rusage ru;
+ int async_err = 0;
WAIT_TYPE status;
WAIT_STATUS_INT(status) = 0;
- if (!PyArg_ParseTuple(args, _Py_PARSE_PID "i:wait4", &pid, &options))
- return NULL;
-
- Py_BEGIN_ALLOW_THREADS
- pid = wait4(pid, &status, options, &ru);
- Py_END_ALLOW_THREADS
+ do {
+ Py_BEGIN_ALLOW_THREADS
+ res = wait4(pid, &status, options, &ru);
+ Py_END_ALLOW_THREADS
+ } while (res < 0 && errno == EINTR && !(async_err = PyErr_CheckSignals()));
+ if (res < 0)
+ return (!async_err) ? posix_error() : NULL;
- return wait_helper(pid, WAIT_STATUS_INT(status), &ru);
+ return wait_helper(res, WAIT_STATUS_INT(status), &ru);
}
#endif /* HAVE_WAIT4 */
+
#if defined(HAVE_WAITID) && !defined(__APPLE__)
-PyDoc_STRVAR(posix_waitid__doc__,
-"waitid(idtype, id, options) -> waitid_result\n\n\
-Wait for the completion of one or more child processes.\n\n\
-idtype can be P_PID, P_PGID or P_ALL.\n\
-id specifies the pid to wait on.\n\
-options is constructed from the ORing of one or more of WEXITED, WSTOPPED\n\
-or WCONTINUED and additionally may be ORed with WNOHANG or WNOWAIT.\n\
-Returns either waitid_result or None if WNOHANG is specified and there are\n\
-no children in a waitable state.");
+/*[clinic input]
+os.waitid
+
+ idtype: idtype_t
+ Must be one of be P_PID, P_PGID or P_ALL.
+ id: id_t
+ The id to wait on.
+ options: int
+ Constructed from the ORing of one or more of WEXITED, WSTOPPED
+ or WCONTINUED and additionally may be ORed with WNOHANG or WNOWAIT.
+ /
+
+Returns the result of waiting for a process or processes.
+
+Returns either waitid_result or None if WNOHANG is specified and there are
+no children in a waitable state.
+[clinic start generated code]*/
static PyObject *
-posix_waitid(PyObject *self, PyObject *args)
+os_waitid_impl(PyModuleDef *module, idtype_t idtype, id_t id, int options)
+/*[clinic end generated code: output=5c0192750e22fa2e input=d8e7f76e052b7920]*/
{
PyObject *result;
- idtype_t idtype;
- id_t id;
- int options, res;
+ int res;
+ int async_err = 0;
siginfo_t si;
si.si_pid = 0;
- if (!PyArg_ParseTuple(args, "i" _Py_PARSE_PID "i:waitid", &idtype, &id, &options))
- return NULL;
- Py_BEGIN_ALLOW_THREADS
- res = waitid(idtype, id, &si, options);
- Py_END_ALLOW_THREADS
- if (res == -1)
- return posix_error();
+
+ do {
+ Py_BEGIN_ALLOW_THREADS
+ res = waitid(idtype, id, &si, options);
+ Py_END_ALLOW_THREADS
+ } while (res < 0 && errno == EINTR && !(async_err = PyErr_CheckSignals()));
+ if (res < 0)
+ return (!async_err) ? posix_error() : NULL;
if (si.si_pid == 0)
Py_RETURN_NONE;
@@ -7028,79 +6957,111 @@ posix_waitid(PyObject *self, PyObject *args)
return result;
}
-#endif
+#endif /* defined(HAVE_WAITID) && !defined(__APPLE__) */
-#ifdef HAVE_WAITPID
-PyDoc_STRVAR(posix_waitpid__doc__,
-"waitpid(pid, options) -> (pid, status)\n\n\
-Wait for completion of a given child process.");
+
+#if defined(HAVE_WAITPID)
+/*[clinic input]
+os.waitpid
+ pid: pid_t
+ options: int
+ /
+
+Wait for completion of a given child process.
+
+Returns a tuple of information regarding the child process:
+ (pid, status)
+
+The options argument is ignored on Windows.
+[clinic start generated code]*/
static PyObject *
-posix_waitpid(PyObject *self, PyObject *args)
+os_waitpid_impl(PyModuleDef *module, pid_t pid, int options)
+/*[clinic end generated code: output=5e3593353d54b15b input=0bf1666b8758fda3]*/
{
- pid_t pid;
- int options;
+ pid_t res;
+ int async_err = 0;
WAIT_TYPE status;
WAIT_STATUS_INT(status) = 0;
- if (!PyArg_ParseTuple(args, _Py_PARSE_PID "i:waitpid", &pid, &options))
- return NULL;
- Py_BEGIN_ALLOW_THREADS
- pid = waitpid(pid, &status, options);
- Py_END_ALLOW_THREADS
- if (pid == -1)
- return posix_error();
+ do {
+ Py_BEGIN_ALLOW_THREADS
+ res = waitpid(pid, &status, options);
+ Py_END_ALLOW_THREADS
+ } while (res < 0 && errno == EINTR && !(async_err = PyErr_CheckSignals()));
+ if (res < 0)
+ return (!async_err) ? posix_error() : NULL;
- return Py_BuildValue("Ni", PyLong_FromPid(pid), WAIT_STATUS_INT(status));
+ return Py_BuildValue("Ni", PyLong_FromPid(res), WAIT_STATUS_INT(status));
}
-
#elif defined(HAVE_CWAIT)
-
/* MS C has a variant of waitpid() that's usable for most purposes. */
-PyDoc_STRVAR(posix_waitpid__doc__,
-"waitpid(pid, options) -> (pid, status << 8)\n\n"
-"Wait for completion of a given process. options is ignored on Windows.");
+/*[clinic input]
+os.waitpid
+ pid: Py_intptr_t
+ options: int
+ /
+
+Wait for completion of a given process.
+
+Returns a tuple of information regarding the process:
+ (pid, status << 8)
+
+The options argument is ignored on Windows.
+[clinic start generated code]*/
static PyObject *
-posix_waitpid(PyObject *self, PyObject *args)
+os_waitpid_impl(PyModuleDef *module, Py_intptr_t pid, int options)
+/*[clinic end generated code: output=fc1d520db019625f input=444c8f51cca5b862]*/
{
- Py_intptr_t pid;
- int status, options;
+ int status;
+ Py_intptr_t res;
+ int async_err = 0;
- if (!PyArg_ParseTuple(args, _Py_PARSE_INTPTR "i:waitpid", &pid, &options))
- return NULL;
- Py_BEGIN_ALLOW_THREADS
- pid = _cwait(&status, pid, options);
- Py_END_ALLOW_THREADS
- if (pid == -1)
- return posix_error();
+ do {
+ Py_BEGIN_ALLOW_THREADS
+ res = _cwait(&status, pid, options);
+ Py_END_ALLOW_THREADS
+ } while (res < 0 && errno == EINTR && !(async_err = PyErr_CheckSignals()));
+ if (res < 0)
+ return (!async_err) ? posix_error() : NULL;
/* shift the status left a byte so this is more like the POSIX waitpid */
- return Py_BuildValue(_Py_PARSE_INTPTR "i", pid, status << 8);
+ return Py_BuildValue(_Py_PARSE_INTPTR "i", res, status << 8);
}
-#endif /* HAVE_WAITPID || HAVE_CWAIT */
+#endif
+
#ifdef HAVE_WAIT
-PyDoc_STRVAR(posix_wait__doc__,
-"wait() -> (pid, status)\n\n\
-Wait for completion of a child process.");
+/*[clinic input]
+os.wait
+
+Wait for completion of a child process.
+
+Returns a tuple of information about the child process:
+ (pid, status)
+[clinic start generated code]*/
static PyObject *
-posix_wait(PyObject *self, PyObject *noargs)
+os_wait_impl(PyModuleDef *module)
+/*[clinic end generated code: output=4a7f4978393e0654 input=03b0182d4a4700ce]*/
{
pid_t pid;
+ int async_err = 0;
WAIT_TYPE status;
WAIT_STATUS_INT(status) = 0;
- Py_BEGIN_ALLOW_THREADS
- pid = wait(&status);
- Py_END_ALLOW_THREADS
- if (pid == -1)
- return posix_error();
+ do {
+ Py_BEGIN_ALLOW_THREADS
+ pid = wait(&status);
+ Py_END_ALLOW_THREADS
+ } while (pid < 0 && errno == EINTR && !(async_err = PyErr_CheckSignals()));
+ if (pid < 0)
+ return (!async_err) ? posix_error() : NULL;
return Py_BuildValue("Ni", PyLong_FromPid(pid), WAIT_STATUS_INT(status));
}
-#endif
+#endif /* HAVE_WAIT */
#if defined(HAVE_READLINK) || defined(MS_WINDOWS)
@@ -7116,6 +7077,7 @@ dir_fd may not be implemented on your platform.\n\
#ifdef HAVE_READLINK
+/* AC 3.5: merge win32 and not together */
static PyObject *
posix_readlink(PyObject *self, PyObject *args, PyObject *kwargs)
{
@@ -7130,12 +7092,7 @@ posix_readlink(PyObject *self, PyObject *args, PyObject *kwargs)
path.function_name = "readlink";
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&|$O&:readlink", keywords,
path_converter, &path,
-#ifdef HAVE_READLINKAT
- dir_fd_converter, &dir_fd
-#else
- dir_fd_unavailable, &dir_fd
-#endif
- ))
+ READLINKAT_DIR_FD_CONVERTER, &dir_fd))
return NULL;
Py_BEGIN_ALLOW_THREADS
@@ -7161,23 +7118,86 @@ exit:
return return_value;
}
-
#endif /* HAVE_READLINK */
+#if !defined(HAVE_READLINK) && defined(MS_WINDOWS)
+
+static PyObject *
+win_readlink(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ wchar_t *path;
+ DWORD n_bytes_returned;
+ DWORD io_result;
+ PyObject *po, *result;
+ int dir_fd;
+ HANDLE reparse_point_handle;
+
+ char target_buffer[MAXIMUM_REPARSE_DATA_BUFFER_SIZE];
+ REPARSE_DATA_BUFFER *rdb = (REPARSE_DATA_BUFFER *)target_buffer;
+ wchar_t *print_name;
+
+ static char *keywords[] = {"path", "dir_fd", NULL};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "U|$O&:readlink", keywords,
+ &po,
+ dir_fd_unavailable, &dir_fd
+ ))
+ return NULL;
+
+ path = PyUnicode_AsUnicode(po);
+ if (path == NULL)
+ return NULL;
+
+ /* First get a handle to the reparse point */
+ Py_BEGIN_ALLOW_THREADS
+ reparse_point_handle = CreateFileW(
+ path,
+ 0,
+ 0,
+ 0,
+ OPEN_EXISTING,
+ FILE_FLAG_OPEN_REPARSE_POINT|FILE_FLAG_BACKUP_SEMANTICS,
+ 0);
+ Py_END_ALLOW_THREADS
+
+ if (reparse_point_handle==INVALID_HANDLE_VALUE)
+ return win32_error_object("readlink", po);
+
+ Py_BEGIN_ALLOW_THREADS
+ /* New call DeviceIoControl to read the reparse point */
+ io_result = DeviceIoControl(
+ reparse_point_handle,
+ FSCTL_GET_REPARSE_POINT,
+ 0, 0, /* in buffer */
+ target_buffer, sizeof(target_buffer),
+ &n_bytes_returned,
+ 0 /* we're not using OVERLAPPED_IO */
+ );
+ CloseHandle(reparse_point_handle);
+ Py_END_ALLOW_THREADS
+
+ if (io_result==0)
+ return win32_error_object("readlink", po);
+
+ if (rdb->ReparseTag != IO_REPARSE_TAG_SYMLINK)
+ {
+ PyErr_SetString(PyExc_ValueError,
+ "not a symbolic link");
+ return NULL;
+ }
+ print_name = rdb->SymbolicLinkReparseBuffer.PathBuffer +
+ rdb->SymbolicLinkReparseBuffer.PrintNameOffset;
+
+ result = PyUnicode_FromWideChar(print_name,
+ rdb->SymbolicLinkReparseBuffer.PrintNameLength/2);
+ return result;
+}
+
+#endif /* !defined(HAVE_READLINK) && defined(MS_WINDOWS) */
+
+
#ifdef HAVE_SYMLINK
-PyDoc_STRVAR(posix_symlink__doc__,
-"symlink(src, dst, target_is_directory=False, *, dir_fd=None)\n\n\
-Create a symbolic link pointing to src named dst.\n\n\
-target_is_directory is required on Windows if the target is to be\n\
- interpreted as a directory. (On Windows, symlink requires\n\
- Windows 6.0 or greater, and raises a NotImplementedError otherwise.)\n\
- target_is_directory is ignored on non-Windows platforms.\n\
-\n\
-If dir_fd is not None, it should be a file descriptor open to a directory,\n\
- and path should be relative; path will then be relative to that directory.\n\
-dir_fd may not be implemented on your platform.\n\
- If it is unavailable, using it will raise a NotImplementedError.");
#if defined(MS_WINDOWS)
@@ -7323,189 +7343,102 @@ _check_dirA(char *src, char *dest)
&& src_info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY
);
}
-
#endif
+
+/*[clinic input]
+os.symlink
+ src: path_t
+ dst: path_t
+ target_is_directory: bool = False
+ *
+ dir_fd: dir_fd(requires='symlinkat')=None
+
+# "symlink(src, dst, target_is_directory=False, *, dir_fd=None)\n\n\
+
+Create a symbolic link pointing to src named dst.
+
+target_is_directory is required on Windows if the target is to be
+ interpreted as a directory. (On Windows, symlink requires
+ Windows 6.0 or greater, and raises a NotImplementedError otherwise.)
+ target_is_directory is ignored on non-Windows platforms.
+
+If dir_fd is not None, it should be a file descriptor open to a directory,
+ and path should be relative; path will then be relative to that directory.
+dir_fd may not be implemented on your platform.
+ If it is unavailable, using it will raise a NotImplementedError.
+
+[clinic start generated code]*/
+
static PyObject *
-posix_symlink(PyObject *self, PyObject *args, PyObject *kwargs)
+os_symlink_impl(PyModuleDef *module, path_t *src, path_t *dst,
+ int target_is_directory, int dir_fd)
+/*[clinic end generated code: output=a01b4bcf32403ccd input=e820ec4472547bc3]*/
{
- path_t src;
- path_t dst;
- int dir_fd = DEFAULT_DIR_FD;
- int target_is_directory = 0;
- static char *keywords[] = {"src", "dst", "target_is_directory",
- "dir_fd", NULL};
- PyObject *return_value;
#ifdef MS_WINDOWS
DWORD result;
#else
int result;
#endif
- memset(&src, 0, sizeof(src));
- src.function_name = "symlink";
- src.argument_name = "src";
- memset(&dst, 0, sizeof(dst));
- dst.function_name = "symlink";
- dst.argument_name = "dst";
-
#ifdef MS_WINDOWS
if (!check_CreateSymbolicLink()) {
PyErr_SetString(PyExc_NotImplementedError,
"CreateSymbolicLink functions not found");
- return NULL;
+ return NULL;
}
if (!win32_can_symlink) {
PyErr_SetString(PyExc_OSError, "symbolic link privilege not held");
- return NULL;
+ return NULL;
}
#endif
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&|i$O&:symlink",
- keywords,
- path_converter, &src,
- path_converter, &dst,
- &target_is_directory,
-#ifdef HAVE_SYMLINKAT
- dir_fd_converter, &dir_fd
-#else
- dir_fd_unavailable, &dir_fd
-#endif
- ))
- return NULL;
-
- if ((src.narrow && dst.wide) || (src.wide && dst.narrow)) {
+ if ((src->narrow && dst->wide) || (src->wide && dst->narrow)) {
PyErr_SetString(PyExc_ValueError,
"symlink: src and dst must be the same type");
- return_value = NULL;
- goto exit;
+ return NULL;
}
#ifdef MS_WINDOWS
Py_BEGIN_ALLOW_THREADS
- if (dst.wide) {
+ if (dst->wide) {
/* if src is a directory, ensure target_is_directory==1 */
- target_is_directory |= _check_dirW(src.wide, dst.wide);
- result = Py_CreateSymbolicLinkW(dst.wide, src.wide,
+ target_is_directory |= _check_dirW(src->wide, dst->wide);
+ result = Py_CreateSymbolicLinkW(dst->wide, src->wide,
target_is_directory);
}
else {
/* if src is a directory, ensure target_is_directory==1 */
- target_is_directory |= _check_dirA(src.narrow, dst.narrow);
- result = Py_CreateSymbolicLinkA(dst.narrow, src.narrow,
+ target_is_directory |= _check_dirA(src->narrow, dst->narrow);
+ result = Py_CreateSymbolicLinkA(dst->narrow, src->narrow,
target_is_directory);
}
Py_END_ALLOW_THREADS
- if (!result) {
- return_value = path_error2(&src, &dst);
- goto exit;
- }
+ if (!result)
+ return path_error2(src, dst);
#else
Py_BEGIN_ALLOW_THREADS
#if HAVE_SYMLINKAT
if (dir_fd != DEFAULT_DIR_FD)
- result = symlinkat(src.narrow, dir_fd, dst.narrow);
+ result = symlinkat(src->narrow, dir_fd, dst->narrow);
else
#endif
- result = symlink(src.narrow, dst.narrow);
+ result = symlink(src->narrow, dst->narrow);
Py_END_ALLOW_THREADS
- if (result) {
- return_value = path_error2(&src, &dst);
- goto exit;
- }
+ if (result)
+ return path_error2(src, dst);
#endif
- return_value = Py_None;
- Py_INCREF(Py_None);
- goto exit; /* silence "unused label" warning */
-exit:
- path_cleanup(&src);
- path_cleanup(&dst);
- return return_value;
+ Py_RETURN_NONE;
}
-
#endif /* HAVE_SYMLINK */
-#if !defined(HAVE_READLINK) && defined(MS_WINDOWS)
-
-static PyObject *
-win_readlink(PyObject *self, PyObject *args, PyObject *kwargs)
-{
- wchar_t *path;
- DWORD n_bytes_returned;
- DWORD io_result;
- PyObject *po, *result;
- int dir_fd;
- HANDLE reparse_point_handle;
-
- char target_buffer[MAXIMUM_REPARSE_DATA_BUFFER_SIZE];
- REPARSE_DATA_BUFFER *rdb = (REPARSE_DATA_BUFFER *)target_buffer;
- wchar_t *print_name;
-
- static char *keywords[] = {"path", "dir_fd", NULL};
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "U|$O&:readlink", keywords,
- &po,
- dir_fd_unavailable, &dir_fd
- ))
- return NULL;
-
- path = PyUnicode_AsUnicode(po);
- if (path == NULL)
- return NULL;
-
- /* First get a handle to the reparse point */
- Py_BEGIN_ALLOW_THREADS
- reparse_point_handle = CreateFileW(
- path,
- 0,
- 0,
- 0,
- OPEN_EXISTING,
- FILE_FLAG_OPEN_REPARSE_POINT|FILE_FLAG_BACKUP_SEMANTICS,
- 0);
- Py_END_ALLOW_THREADS
-
- if (reparse_point_handle==INVALID_HANDLE_VALUE)
- return win32_error_object("readlink", po);
-
- Py_BEGIN_ALLOW_THREADS
- /* New call DeviceIoControl to read the reparse point */
- io_result = DeviceIoControl(
- reparse_point_handle,
- FSCTL_GET_REPARSE_POINT,
- 0, 0, /* in buffer */
- target_buffer, sizeof(target_buffer),
- &n_bytes_returned,
- 0 /* we're not using OVERLAPPED_IO */
- );
- CloseHandle(reparse_point_handle);
- Py_END_ALLOW_THREADS
-
- if (io_result==0)
- return win32_error_object("readlink", po);
-
- if (rdb->ReparseTag != IO_REPARSE_TAG_SYMLINK)
- {
- PyErr_SetString(PyExc_ValueError,
- "not a symbolic link");
- return NULL;
- }
- print_name = rdb->SymbolicLinkReparseBuffer.PathBuffer +
- rdb->SymbolicLinkReparseBuffer.PrintNameOffset;
-
- result = PyUnicode_FromWideChar(print_name,
- rdb->SymbolicLinkReparseBuffer.PrintNameLength/2);
- return result;
-}
-
-#endif /* !defined(HAVE_READLINK) && defined(MS_WINDOWS) */
static PyStructSequence_Field times_result_fields[] = {
@@ -7571,15 +7504,26 @@ build_times_result(double user, double system,
return value;
}
-PyDoc_STRVAR(posix_times__doc__,
-"times() -> times_result\n\n\
-Return an object containing floating point numbers indicating process\n\
-times. The object behaves like a named tuple with these fields:\n\
- (utime, stime, cutime, cstime, elapsed_time)");
-#if defined(MS_WINDOWS)
+#ifndef MS_WINDOWS
+#define NEED_TICKS_PER_SECOND
+static long ticks_per_second = -1;
+#endif /* MS_WINDOWS */
+
+/*[clinic input]
+os.times
+
+Return a collection containing process timing information.
+
+The object returned behaves like a named tuple with these fields:
+ (utime, stime, cutime, cstime, elapsed_time)
+All fields are floating point numbers.
+[clinic start generated code]*/
+
static PyObject *
-posix_times(PyObject *self, PyObject *noargs)
+os_times_impl(PyModuleDef *module)
+/*[clinic end generated code: output=df0a63ebe6e6f091 input=2bf9df3d6ab2e48b]*/
+#ifdef MS_WINDOWS
{
FILETIME create, exit, kernel, user;
HANDLE hProc;
@@ -7599,12 +7543,10 @@ posix_times(PyObject *self, PyObject *noargs)
(double)0,
(double)0);
}
-#else /* Not Windows */
-#define NEED_TICKS_PER_SECOND
-static long ticks_per_second = -1;
-static PyObject *
-posix_times(PyObject *self, PyObject *noargs)
+#else /* MS_WINDOWS */
{
+
+
struct tms t;
clock_t c;
errno = 0;
@@ -7618,23 +7560,25 @@ posix_times(PyObject *self, PyObject *noargs)
(double)t.tms_cstime / ticks_per_second,
(double)c / ticks_per_second);
}
-#endif
-
+#endif /* MS_WINDOWS */
#endif /* HAVE_TIMES */
#ifdef HAVE_GETSID
-PyDoc_STRVAR(posix_getsid__doc__,
-"getsid(pid) -> sid\n\n\
-Call the system call getsid().");
+/*[clinic input]
+os.getsid
+
+ pid: pid_t
+ /
+
+Call the system call getsid(pid) and return the result.
+[clinic start generated code]*/
static PyObject *
-posix_getsid(PyObject *self, PyObject *args)
+os_getsid_impl(PyModuleDef *module, pid_t pid)
+/*[clinic end generated code: output=a074f80c0e6bfb38 input=eeb2b923a30ce04e]*/
{
- pid_t pid;
int sid;
- if (!PyArg_ParseTuple(args, _Py_PARSE_PID ":getsid", &pid))
- return NULL;
sid = getsid(pid);
if (sid < 0)
return posix_error();
@@ -7644,53 +7588,60 @@ posix_getsid(PyObject *self, PyObject *args)
#ifdef HAVE_SETSID
-PyDoc_STRVAR(posix_setsid__doc__,
-"setsid()\n\n\
-Call the system call setsid().");
+/*[clinic input]
+os.setsid
+
+Call the system call setsid().
+[clinic start generated code]*/
static PyObject *
-posix_setsid(PyObject *self, PyObject *noargs)
+os_setsid_impl(PyModuleDef *module)
+/*[clinic end generated code: output=398fc152ae327330 input=5fff45858e2f0776]*/
{
if (setsid() < 0)
return posix_error();
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
#endif /* HAVE_SETSID */
+
#ifdef HAVE_SETPGID
-PyDoc_STRVAR(posix_setpgid__doc__,
-"setpgid(pid, pgrp)\n\n\
-Call the system call setpgid().");
+/*[clinic input]
+os.setpgid
+
+ pid: pid_t
+ pgrp: pid_t
+ /
+
+Call the system call setpgid(pid, pgrp).
+[clinic start generated code]*/
static PyObject *
-posix_setpgid(PyObject *self, PyObject *args)
+os_setpgid_impl(PyModuleDef *module, pid_t pid, pid_t pgrp)
+/*[clinic end generated code: output=7079a8e932912841 input=fceb395eca572e1a]*/
{
- pid_t pid;
- int pgrp;
- if (!PyArg_ParseTuple(args, _Py_PARSE_PID "i:setpgid", &pid, &pgrp))
- return NULL;
if (setpgid(pid, pgrp) < 0)
return posix_error();
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
#endif /* HAVE_SETPGID */
#ifdef HAVE_TCGETPGRP
-PyDoc_STRVAR(posix_tcgetpgrp__doc__,
-"tcgetpgrp(fd) -> pgid\n\n\
-Return the process group associated with the terminal given by a fd.");
+/*[clinic input]
+os.tcgetpgrp
+
+ fd: int
+ /
+
+Return the process group associated with the terminal specified by fd.
+[clinic start generated code]*/
static PyObject *
-posix_tcgetpgrp(PyObject *self, PyObject *args)
+os_tcgetpgrp_impl(PyModuleDef *module, int fd)
+/*[clinic end generated code: output=ebb6dc5f111c7dc0 input=7f6c18eac10ada86]*/
{
- int fd;
- pid_t pgid;
- if (!PyArg_ParseTuple(args, "i:tcgetpgrp", &fd))
- return NULL;
- pgid = tcgetpgrp(fd);
+ pid_t pgid = tcgetpgrp(fd);
if (pgid < 0)
return posix_error();
return PyLong_FromPid(pgid);
@@ -7699,21 +7650,23 @@ posix_tcgetpgrp(PyObject *self, PyObject *args)
#ifdef HAVE_TCSETPGRP
-PyDoc_STRVAR(posix_tcsetpgrp__doc__,
-"tcsetpgrp(fd, pgid)\n\n\
-Set the process group associated with the terminal given by a fd.");
+/*[clinic input]
+os.tcsetpgrp
+
+ fd: int
+ pgid: pid_t
+ /
+
+Set the process group associated with the terminal specified by fd.
+[clinic start generated code]*/
static PyObject *
-posix_tcsetpgrp(PyObject *self, PyObject *args)
+os_tcsetpgrp_impl(PyModuleDef *module, int fd, pid_t pgid)
+/*[clinic end generated code: output=3e4b05177462cd22 input=5bdc997c6a619020]*/
{
- int fd;
- pid_t pgid;
- if (!PyArg_ParseTuple(args, "i" _Py_PARSE_PID ":tcsetpgrp", &fd, &pgid))
- return NULL;
if (tcsetpgrp(fd, pgid) < 0)
return posix_error();
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
#endif /* HAVE_TCSETPGRP */
@@ -7723,158 +7676,166 @@ posix_tcsetpgrp(PyObject *self, PyObject *args)
extern int _Py_open_cloexec_works;
#endif
-PyDoc_STRVAR(posix_open__doc__,
-"open(path, flags, mode=0o777, *, dir_fd=None)\n\n\
-Open a file for low level IO. Returns a file handle (integer).\n\
-\n\
-If dir_fd is not None, it should be a file descriptor open to a directory,\n\
- and path should be relative; path will then be relative to that directory.\n\
-dir_fd may not be implemented on your platform.\n\
- If it is unavailable, using it will raise a NotImplementedError.");
-static PyObject *
-posix_open(PyObject *self, PyObject *args, PyObject *kwargs)
+/*[clinic input]
+os.open -> int
+ path: path_t
+ flags: int
+ mode: int = 0o777
+ *
+ dir_fd: dir_fd(requires='openat') = None
+
+# "open(path, flags, mode=0o777, *, dir_fd=None)\n\n\
+
+Open a file for low level IO. Returns a file descriptor (integer).
+
+If dir_fd is not None, it should be a file descriptor open to a directory,
+ and path should be relative; path will then be relative to that directory.
+dir_fd may not be implemented on your platform.
+ If it is unavailable, using it will raise a NotImplementedError.
+[clinic start generated code]*/
+
+static int
+os_open_impl(PyModuleDef *module, path_t *path, int flags, int mode,
+ int dir_fd)
+/*[clinic end generated code: output=47e8cc63559f5ddd input=ad8623b29acd2934]*/
{
- path_t path;
- int flags;
- int mode = 0777;
- int dir_fd = DEFAULT_DIR_FD;
int fd;
- PyObject *return_value = NULL;
- static char *keywords[] = {"path", "flags", "mode", "dir_fd", NULL};
+ int async_err = 0;
+
#ifdef O_CLOEXEC
int *atomic_flag_works = &_Py_open_cloexec_works;
#elif !defined(MS_WINDOWS)
int *atomic_flag_works = NULL;
#endif
- memset(&path, 0, sizeof(path));
- path.function_name = "open";
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&i|i$O&:open", keywords,
- path_converter, &path,
- &flags, &mode,
-#ifdef HAVE_OPENAT
- dir_fd_converter, &dir_fd
-#else
- dir_fd_unavailable, &dir_fd
-#endif
- ))
- return NULL;
-
#ifdef MS_WINDOWS
flags |= O_NOINHERIT;
#elif defined(O_CLOEXEC)
flags |= O_CLOEXEC;
#endif
- Py_BEGIN_ALLOW_THREADS
+ _Py_BEGIN_SUPPRESS_IPH
+ do {
+ Py_BEGIN_ALLOW_THREADS
#ifdef MS_WINDOWS
- if (path.wide)
- fd = _wopen(path.wide, flags, mode);
- else
+ if (path->wide)
+ fd = _wopen(path->wide, flags, mode);
+ else
#endif
#ifdef HAVE_OPENAT
- if (dir_fd != DEFAULT_DIR_FD)
- fd = openat(dir_fd, path.narrow, flags, mode);
- else
+ if (dir_fd != DEFAULT_DIR_FD)
+ fd = openat(dir_fd, path->narrow, flags, mode);
+ else
#endif
- fd = open(path.narrow, flags, mode);
- Py_END_ALLOW_THREADS
+ fd = open(path->narrow, flags, mode);
+ Py_END_ALLOW_THREADS
+ } while (fd < 0 && errno == EINTR && !(async_err = PyErr_CheckSignals()));
+ _Py_END_SUPPRESS_IPH
- if (fd == -1) {
- PyErr_SetFromErrnoWithFilenameObject(PyExc_OSError, path.object);
- goto exit;
+ if (fd < 0) {
+ if (!async_err)
+ PyErr_SetFromErrnoWithFilenameObject(PyExc_OSError, path->object);
+ return -1;
}
#ifndef MS_WINDOWS
if (_Py_set_inheritable(fd, 0, atomic_flag_works) < 0) {
close(fd);
- goto exit;
+ return -1;
}
#endif
- return_value = PyLong_FromLong((long)fd);
-
-exit:
- path_cleanup(&path);
- return return_value;
+ return fd;
}
-PyDoc_STRVAR(posix_close__doc__,
-"close(fd)\n\n\
-Close a file descriptor (for low level IO).");
-/*
-The underscore at end of function name avoids a name clash with the libc
-function posix_close.
-*/
+/*[clinic input]
+os.close
+
+ fd: int
+
+Close a file descriptor.
+[clinic start generated code]*/
+
static PyObject *
-posix_close_(PyObject *self, PyObject *args)
+os_close_impl(PyModuleDef *module, int fd)
+/*[clinic end generated code: output=47bf2ea536445a26 input=2bc42451ca5c3223]*/
{
- int fd, res;
- if (!PyArg_ParseTuple(args, "i:close", &fd))
- return NULL;
+ int res;
if (!_PyVerify_fd(fd))
return posix_error();
+ /* We do not want to retry upon EINTR: see http://lwn.net/Articles/576478/
+ * and http://linux.derkeiler.com/Mailing-Lists/Kernel/2005-09/3000.html
+ * for more details.
+ */
Py_BEGIN_ALLOW_THREADS
+ _Py_BEGIN_SUPPRESS_IPH
res = close(fd);
+ _Py_END_SUPPRESS_IPH
Py_END_ALLOW_THREADS
if (res < 0)
return posix_error();
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
-PyDoc_STRVAR(posix_closerange__doc__,
-"closerange(fd_low, fd_high)\n\n\
-Closes all file descriptors in [fd_low, fd_high), ignoring errors.");
+/*[clinic input]
+os.closerange
+
+ fd_low: int
+ fd_high: int
+ /
+
+Closes all file descriptors in [fd_low, fd_high), ignoring errors.
+[clinic start generated code]*/
static PyObject *
-posix_closerange(PyObject *self, PyObject *args)
+os_closerange_impl(PyModuleDef *module, int fd_low, int fd_high)
+/*[clinic end generated code: output=70e6adb95220ba96 input=5855a3d053ebd4ec]*/
{
- int fd_from, fd_to, i;
- if (!PyArg_ParseTuple(args, "ii:closerange", &fd_from, &fd_to))
- return NULL;
+ int i;
Py_BEGIN_ALLOW_THREADS
- for (i = fd_from; i < fd_to; i++)
+ _Py_BEGIN_SUPPRESS_IPH
+ for (i = fd_low; i < fd_high; i++)
if (_PyVerify_fd(i))
close(i);
+ _Py_END_SUPPRESS_IPH
Py_END_ALLOW_THREADS
Py_RETURN_NONE;
}
-PyDoc_STRVAR(posix_dup__doc__,
-"dup(fd) -> fd2\n\n\
-Return a duplicate of a file descriptor.");
-
-static PyObject *
-posix_dup(PyObject *self, PyObject *args)
-{
- int fd;
+/*[clinic input]
+os.dup -> int
- if (!PyArg_ParseTuple(args, "i:dup", &fd))
- return NULL;
+ fd: int
+ /
- fd = _Py_dup(fd);
- if (fd == -1)
- return NULL;
+Return a duplicate of a file descriptor.
+[clinic start generated code]*/
- return PyLong_FromLong((long)fd);
+static int
+os_dup_impl(PyModuleDef *module, int fd)
+/*[clinic end generated code: output=f4bbac8c7652d05e input=6f10f7ea97f7852a]*/
+{
+ return _Py_dup(fd);
}
-PyDoc_STRVAR(posix_dup2__doc__,
-"dup2(old_fd, new_fd)\n\n\
-Duplicate file descriptor.");
+/*[clinic input]
+os.dup2
+ fd: int
+ fd2: int
+ inheritable: bool=True
+
+Duplicate file descriptor.
+[clinic start generated code]*/
static PyObject *
-posix_dup2(PyObject *self, PyObject *args, PyObject *kwargs)
+os_dup2_impl(PyModuleDef *module, int fd, int fd2, int inheritable)
+/*[clinic end generated code: output=9a099d95881a7923 input=76e96f511be0352f]*/
{
- static char *keywords[] = {"fd", "fd2", "inheritable", NULL};
- int fd, fd2;
- int inheritable = 1;
int res;
#if defined(HAVE_DUP3) && \
!(defined(HAVE_FCNTL_H) && defined(F_DUP2FD_CLOEXEC))
@@ -7882,16 +7843,18 @@ posix_dup2(PyObject *self, PyObject *args, PyObject *kwargs)
int dup3_works = -1;
#endif
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ii|i:dup2", keywords,
- &fd, &fd2, &inheritable))
- return NULL;
-
if (!_PyVerify_fd_dup2(fd, fd2))
return posix_error();
+ /* dup2() can fail with EINTR if the target FD is already open, because it
+ * then has to be closed. See os_close_impl() for why we don't handle EINTR
+ * upon close(), and therefore below.
+ */
#ifdef MS_WINDOWS
Py_BEGIN_ALLOW_THREADS
+ _Py_BEGIN_SUPPRESS_IPH
res = dup2(fd, fd2);
+ _Py_END_SUPPRESS_IPH
Py_END_ALLOW_THREADS
if (res < 0)
return posix_error();
@@ -7946,30 +7909,34 @@ posix_dup2(PyObject *self, PyObject *args, PyObject *kwargs)
#endif
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
+
#ifdef HAVE_LOCKF
-PyDoc_STRVAR(posix_lockf__doc__,
-"lockf(fd, cmd, len)\n\n\
-Apply, test or remove a POSIX lock on an open file descriptor.\n\n\
-fd is an open file descriptor.\n\
-cmd specifies the command to use - one of F_LOCK, F_TLOCK, F_ULOCK or\n\
-F_TEST.\n\
-len specifies the section of the file to lock.");
+/*[clinic input]
+os.lockf
+
+ fd: int
+ An open file descriptor.
+ command: int
+ One of F_LOCK, F_TLOCK, F_ULOCK or F_TEST.
+ length: Py_off_t
+ The number of bytes to lock, starting at the current position.
+ /
+
+Apply, test or remove a POSIX lock on an open file descriptor.
+
+[clinic start generated code]*/
static PyObject *
-posix_lockf(PyObject *self, PyObject *args)
+os_lockf_impl(PyModuleDef *module, int fd, int command, Py_off_t length)
+/*[clinic end generated code: output=25ff778f9e2fbf1b input=65da41d2106e9b79]*/
{
- int fd, cmd, res;
- off_t len;
- if (!PyArg_ParseTuple(args, "iiO&:lockf",
- &fd, &cmd, _parse_off_t, &len))
- return NULL;
+ int res;
Py_BEGIN_ALLOW_THREADS
- res = lockf(fd, cmd, len);
+ res = lockf(fd, command, length);
Py_END_ALLOW_THREADS
if (res < 0)
@@ -7977,95 +7944,105 @@ posix_lockf(PyObject *self, PyObject *args)
Py_RETURN_NONE;
}
-#endif
+#endif /* HAVE_LOCKF */
-PyDoc_STRVAR(posix_lseek__doc__,
-"lseek(fd, pos, how) -> newpos\n\n\
-Set the current position of a file descriptor.\n\
-Return the new cursor position in bytes, starting from the beginning.");
+/*[clinic input]
+os.lseek -> Py_off_t
-static PyObject *
-posix_lseek(PyObject *self, PyObject *args)
+ fd: int
+ position: Py_off_t
+ how: int
+ /
+
+Set the position of a file descriptor. Return the new position.
+
+Return the new cursor position in number of bytes
+relative to the beginning of the file.
+[clinic start generated code]*/
+
+static Py_off_t
+os_lseek_impl(PyModuleDef *module, int fd, Py_off_t position, int how)
+/*[clinic end generated code: output=65d4ab96d664998c input=902654ad3f96a6d3]*/
{
- int fd, how;
-#ifdef MS_WINDOWS
- PY_LONG_LONG pos, res;
-#else
- off_t pos, res;
-#endif
- PyObject *posobj;
- if (!PyArg_ParseTuple(args, "iOi:lseek", &fd, &posobj, &how))
- return NULL;
+ Py_off_t result;
+
+ if (!_PyVerify_fd(fd)) {
+ posix_error();
+ return -1;
+ }
#ifdef SEEK_SET
/* Turn 0, 1, 2 into SEEK_{SET,CUR,END} */
switch (how) {
- case 0: how = SEEK_SET; break;
- case 1: how = SEEK_CUR; break;
- case 2: how = SEEK_END; break;
+ case 0: how = SEEK_SET; break;
+ case 1: how = SEEK_CUR; break;
+ case 2: how = SEEK_END; break;
}
#endif /* SEEK_END */
-#if !defined(HAVE_LARGEFILE_SUPPORT)
- pos = PyLong_AsLong(posobj);
-#else
- pos = PyLong_AsLongLong(posobj);
-#endif
if (PyErr_Occurred())
- return NULL;
+ return -1;
- if (!_PyVerify_fd(fd))
- return posix_error();
+ if (!_PyVerify_fd(fd)) {
+ posix_error();
+ return -1;
+ }
Py_BEGIN_ALLOW_THREADS
+ _Py_BEGIN_SUPPRESS_IPH
#ifdef MS_WINDOWS
- res = _lseeki64(fd, pos, how);
+ result = _lseeki64(fd, position, how);
#else
- res = lseek(fd, pos, how);
+ result = lseek(fd, position, how);
#endif
+ _Py_END_SUPPRESS_IPH
Py_END_ALLOW_THREADS
- if (res < 0)
- return posix_error();
+ if (result < 0)
+ posix_error();
-#if !defined(HAVE_LARGEFILE_SUPPORT)
- return PyLong_FromLong(res);
-#else
- return PyLong_FromLongLong(res);
-#endif
+ return result;
}
-PyDoc_STRVAR(posix_read__doc__,
-"read(fd, buffersize) -> bytes\n\n\
-Read a file descriptor.");
+/*[clinic input]
+os.read
+ fd: int
+ length: Py_ssize_t
+ /
+
+Read from a file descriptor. Returns a bytes object.
+[clinic start generated code]*/
static PyObject *
-posix_read(PyObject *self, PyObject *args)
+os_read_impl(PyModuleDef *module, int fd, Py_ssize_t length)
+/*[clinic end generated code: output=be24f44178455e8b input=1df2eaa27c0bf1d3]*/
{
- int fd, size;
Py_ssize_t n;
PyObject *buffer;
- if (!PyArg_ParseTuple(args, "ii:read", &fd, &size))
- return NULL;
- if (size < 0) {
+
+ if (length < 0) {
errno = EINVAL;
return posix_error();
}
- buffer = PyBytes_FromStringAndSize((char *)NULL, size);
+
+#ifdef MS_WINDOWS
+ /* On Windows, the count parameter of read() is an int */
+ if (length > INT_MAX)
+ length = INT_MAX;
+#endif
+
+ buffer = PyBytes_FromStringAndSize((char *)NULL, length);
if (buffer == NULL)
return NULL;
- if (!_PyVerify_fd(fd)) {
- Py_DECREF(buffer);
- return posix_error();
- }
- Py_BEGIN_ALLOW_THREADS
- n = read(fd, PyBytes_AS_STRING(buffer), size);
- Py_END_ALLOW_THREADS
- if (n < 0) {
+
+ n = _Py_read(fd, PyBytes_AS_STRING(buffer), length);
+ if (n == -1) {
Py_DECREF(buffer);
- return posix_error();
+ return NULL;
}
- if (n != size)
+
+ if (n != length)
_PyBytes_Resize(&buffer, n);
+
return buffer;
}
@@ -8127,120 +8104,135 @@ iov_cleanup(struct iovec *iov, Py_buffer *buf, int cnt)
}
#endif
+
#ifdef HAVE_READV
-PyDoc_STRVAR(posix_readv__doc__,
-"readv(fd, buffers) -> bytesread\n\n\
-Read from a file descriptor fd into a number of mutable, bytes-like\n\
-objects (\"buffers\"). readv will transfer data into each buffer\n\
-until it is full and then move on to the next buffer in the sequence\n\
-to hold the rest of the data.\n\n\
-readv returns the total number of bytes read (which may be less than\n\
-the total capacity of all the buffers.");
+/*[clinic input]
+os.readv -> Py_ssize_t
-static PyObject *
-posix_readv(PyObject *self, PyObject *args)
+ fd: int
+ buffers: object
+ /
+
+Read from a file descriptor fd into an iterable of buffers.
+
+The buffers should be mutable buffers accepting bytes.
+readv will transfer data into each buffer until it is full
+and then move on to the next buffer in the sequence to hold
+the rest of the data.
+
+readv returns the total number of bytes read,
+which may be less than the total capacity of all the buffers.
+[clinic start generated code]*/
+
+static Py_ssize_t
+os_readv_impl(PyModuleDef *module, int fd, PyObject *buffers)
+/*[clinic end generated code: output=00fc56ff1800059f input=e679eb5dbfa0357d]*/
{
- int fd, cnt;
+ int cnt;
Py_ssize_t n;
- PyObject *seq;
+ int async_err = 0;
struct iovec *iov;
Py_buffer *buf;
- if (!PyArg_ParseTuple(args, "iO:readv", &fd, &seq))
- return NULL;
- if (!PySequence_Check(seq)) {
+ if (!PySequence_Check(buffers)) {
PyErr_SetString(PyExc_TypeError,
"readv() arg 2 must be a sequence");
- return NULL;
+ return -1;
}
- cnt = PySequence_Size(seq);
- if (iov_setup(&iov, &buf, seq, cnt, PyBUF_WRITABLE) < 0)
- return NULL;
+ cnt = PySequence_Size(buffers);
- Py_BEGIN_ALLOW_THREADS
- n = readv(fd, iov, cnt);
- Py_END_ALLOW_THREADS
+ if (iov_setup(&iov, &buf, buffers, cnt, PyBUF_WRITABLE) < 0)
+ return -1;
+
+ do {
+ Py_BEGIN_ALLOW_THREADS
+ n = readv(fd, iov, cnt);
+ Py_END_ALLOW_THREADS
+ } while (n < 0 && errno == EINTR && !(async_err = PyErr_CheckSignals()));
iov_cleanup(iov, buf, cnt);
- if (n < 0)
- return posix_error();
+ if (n < 0) {
+ if (!async_err)
+ posix_error();
+ return -1;
+ }
- return PyLong_FromSsize_t(n);
+ return n;
}
-#endif
+#endif /* HAVE_READV */
+
#ifdef HAVE_PREAD
-PyDoc_STRVAR(posix_pread__doc__,
-"pread(fd, buffersize, offset) -> string\n\n\
-Read from a file descriptor, fd, at a position of offset. It will read up\n\
-to buffersize number of bytes. The file offset remains unchanged.");
+/*[clinic input]
+# TODO length should be size_t! but Python doesn't support parsing size_t yet.
+os.pread
+
+ fd: int
+ length: int
+ offset: Py_off_t
+ /
+
+Read a number of bytes from a file descriptor starting at a particular offset.
+
+Read length bytes from file descriptor fd, starting at offset bytes from
+the beginning of the file. The file offset remains unchanged.
+[clinic start generated code]*/
static PyObject *
-posix_pread(PyObject *self, PyObject *args)
+os_pread_impl(PyModuleDef *module, int fd, int length, Py_off_t offset)
+/*[clinic end generated code: output=90d1fed87f68fa33 input=084948dcbaa35d4c]*/
{
- int fd, size;
- off_t offset;
Py_ssize_t n;
+ int async_err = 0;
PyObject *buffer;
- if (!PyArg_ParseTuple(args, "iiO&:pread", &fd, &size, _parse_off_t, &offset))
- return NULL;
- if (size < 0) {
+ if (length < 0) {
errno = EINVAL;
return posix_error();
}
- buffer = PyBytes_FromStringAndSize((char *)NULL, size);
+ buffer = PyBytes_FromStringAndSize((char *)NULL, length);
if (buffer == NULL)
return NULL;
if (!_PyVerify_fd(fd)) {
Py_DECREF(buffer);
return posix_error();
}
- Py_BEGIN_ALLOW_THREADS
- n = pread(fd, PyBytes_AS_STRING(buffer), size, offset);
- Py_END_ALLOW_THREADS
+
+ do {
+ Py_BEGIN_ALLOW_THREADS
+ _Py_BEGIN_SUPPRESS_IPH
+ n = pread(fd, PyBytes_AS_STRING(buffer), length, offset);
+ _Py_END_SUPPRESS_IPH
+ Py_END_ALLOW_THREADS
+ } while (n < 0 && errno == EINTR && !(async_err = PyErr_CheckSignals()));
+
if (n < 0) {
Py_DECREF(buffer);
- return posix_error();
+ return (!async_err) ? posix_error() : NULL;
}
- if (n != size)
+ if (n != length)
_PyBytes_Resize(&buffer, n);
return buffer;
}
-#endif
+#endif /* HAVE_PREAD */
-PyDoc_STRVAR(posix_write__doc__,
-"write(fd, data) -> byteswritten\n\n\
-Write bytes to a file descriptor.");
-static PyObject *
-posix_write(PyObject *self, PyObject *args)
-{
- Py_buffer pbuf;
- int fd;
- Py_ssize_t size, len;
+/*[clinic input]
+os.write -> Py_ssize_t
- if (!PyArg_ParseTuple(args, "iy*:write", &fd, &pbuf))
- return NULL;
- if (!_PyVerify_fd(fd)) {
- PyBuffer_Release(&pbuf);
- return posix_error();
- }
- len = pbuf.len;
- Py_BEGIN_ALLOW_THREADS
-#ifdef MS_WINDOWS
- if (len > INT_MAX)
- len = INT_MAX;
- size = write(fd, pbuf.buf, (int)len);
-#else
- size = write(fd, pbuf.buf, len);
-#endif
- Py_END_ALLOW_THREADS
- PyBuffer_Release(&pbuf);
- if (size < 0)
- return posix_error();
- return PyLong_FromSsize_t(size);
+ fd: int
+ data: Py_buffer
+ /
+
+Write a bytes object to a file descriptor.
+[clinic start generated code]*/
+
+static Py_ssize_t
+os_write_impl(PyModuleDef *module, int fd, Py_buffer *data)
+/*[clinic end generated code: output=58845c93c9ee1dda input=3207e28963234f3c]*/
+{
+ return _Py_write(fd, data->buf, data->len);
}
#ifdef HAVE_SENDFILE
@@ -8250,11 +8242,13 @@ sendfile(out, in, offset, count[, headers][, trailers], flags=0)\n\
-> byteswritten\n\
Copy count bytes from file descriptor in to file descriptor out.");
+/* AC 3.5: don't bother converting, has optional group*/
static PyObject *
posix_sendfile(PyObject *self, PyObject *args, PyObject *kwdict)
{
int in, out;
Py_ssize_t ret;
+ int async_err = 0;
off_t offset;
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__APPLE__)
@@ -8276,10 +8270,10 @@ posix_sendfile(PyObject *self, PyObject *args, PyObject *kwdict)
#ifdef __APPLE__
if (!PyArg_ParseTupleAndKeywords(args, kwdict, "iiO&O&|OOi:sendfile",
- keywords, &out, &in, _parse_off_t, &offset, _parse_off_t, &sbytes,
+ keywords, &out, &in, Py_off_t_converter, &offset, Py_off_t_converter, &sbytes,
#else
if (!PyArg_ParseTupleAndKeywords(args, kwdict, "iiO&n|OOi:sendfile",
- keywords, &out, &in, _parse_off_t, &offset, &len,
+ keywords, &out, &in, Py_off_t_converter, &offset, &len,
#endif
&headers, &trailers, &flags))
return NULL;
@@ -8318,13 +8312,17 @@ posix_sendfile(PyObject *self, PyObject *args, PyObject *kwdict)
}
}
- Py_BEGIN_ALLOW_THREADS
+ _Py_BEGIN_SUPPRESS_IPH
+ do {
+ Py_BEGIN_ALLOW_THREADS
#ifdef __APPLE__
- ret = sendfile(in, out, offset, &sbytes, &sf, flags);
+ ret = sendfile(in, out, offset, &sbytes, &sf, flags);
#else
- ret = sendfile(in, out, offset, len, &sf, &sbytes, flags);
+ ret = sendfile(in, out, offset, len, &sf, &sbytes, flags);
#endif
- Py_END_ALLOW_THREADS
+ Py_END_ALLOW_THREADS
+ } while (ret < 0 && errno == EINTR && !(async_err = PyErr_CheckSignals()));
+ _Py_END_SUPPRESS_IPH
if (sf.headers != NULL)
iov_cleanup(sf.headers, hbuf, sf.hdr_cnt);
@@ -8343,7 +8341,7 @@ posix_sendfile(PyObject *self, PyObject *args, PyObject *kwdict)
return posix_error();
}
}
- return posix_error();
+ return (!async_err) ? posix_error() : NULL;
}
goto done;
@@ -8364,76 +8362,106 @@ done:
return NULL;
#ifdef linux
if (offobj == Py_None) {
- Py_BEGIN_ALLOW_THREADS
- ret = sendfile(out, in, NULL, count);
- Py_END_ALLOW_THREADS
+ do {
+ Py_BEGIN_ALLOW_THREADS
+ ret = sendfile(out, in, NULL, count);
+ Py_END_ALLOW_THREADS
+ } while (ret < 0 && errno == EINTR && !(async_err = PyErr_CheckSignals()));
if (ret < 0)
- return posix_error();
+ return (!async_err) ? posix_error() : NULL;
return Py_BuildValue("n", ret);
}
#endif
- if (!_parse_off_t(offobj, &offset))
+ if (!Py_off_t_converter(offobj, &offset))
return NULL;
- Py_BEGIN_ALLOW_THREADS
- ret = sendfile(out, in, &offset, count);
- Py_END_ALLOW_THREADS
+
+ do {
+ Py_BEGIN_ALLOW_THREADS
+ ret = sendfile(out, in, &offset, count);
+ Py_END_ALLOW_THREADS
+ } while (ret < 0 && errno == EINTR && !(async_err = PyErr_CheckSignals()));
if (ret < 0)
- return posix_error();
+ return (!async_err) ? posix_error() : NULL;
return Py_BuildValue("n", ret);
#endif
}
-#endif
+#endif /* HAVE_SENDFILE */
-PyDoc_STRVAR(posix_fstat__doc__,
-"fstat(fd) -> stat result\n\n\
-Like stat(), but for an open file descriptor.\n\
-Equivalent to stat(fd=fd).");
+
+/*[clinic input]
+os.fstat
+
+ fd : int
+
+Perform a stat system call on the given file descriptor.
+
+Like stat(), but for an open file descriptor.
+Equivalent to os.stat(fd).
+[clinic start generated code]*/
static PyObject *
-posix_fstat(PyObject *self, PyObject *args)
+os_fstat_impl(PyModuleDef *module, int fd)
+/*[clinic end generated code: output=d71fe98bf042b626 input=27e0e0ebbe5600c9]*/
{
- int fd;
STRUCT_STAT st;
int res;
- if (!PyArg_ParseTuple(args, "i:fstat", &fd))
- return NULL;
- Py_BEGIN_ALLOW_THREADS
- res = FSTAT(fd, &st);
- Py_END_ALLOW_THREADS
+ int async_err = 0;
+
+ do {
+ Py_BEGIN_ALLOW_THREADS
+ res = FSTAT(fd, &st);
+ Py_END_ALLOW_THREADS
+ } while (res != 0 && errno == EINTR && !(async_err = PyErr_CheckSignals()));
if (res != 0) {
#ifdef MS_WINDOWS
return PyErr_SetFromWindowsErr(0);
#else
- return posix_error();
+ return (!async_err) ? posix_error() : NULL;
#endif
}
return _pystat_fromstructstat(&st);
}
-PyDoc_STRVAR(posix_isatty__doc__,
-"isatty(fd) -> bool\n\n\
-Return True if the file descriptor 'fd' is an open file descriptor\n\
-connected to the slave end of a terminal.");
-static PyObject *
-posix_isatty(PyObject *self, PyObject *args)
+/*[clinic input]
+os.isatty -> bool
+ fd: int
+ /
+
+Return True if the fd is connected to a terminal.
+
+Return True if the file descriptor is an open file descriptor
+connected to the slave end of a terminal.
+[clinic start generated code]*/
+
+static int
+os_isatty_impl(PyModuleDef *module, int fd)
+/*[clinic end generated code: output=acec9d3c29d16d33 input=08ce94aa1eaf7b5e]*/
{
- int fd;
- if (!PyArg_ParseTuple(args, "i:isatty", &fd))
- return NULL;
+ int return_value;
if (!_PyVerify_fd(fd))
- return PyBool_FromLong(0);
- return PyBool_FromLong(isatty(fd));
+ return 0;
+ _Py_BEGIN_SUPPRESS_IPH
+ return_value = isatty(fd);
+ _Py_END_SUPPRESS_IPH
+ return return_value;
}
+
#ifdef HAVE_PIPE
-PyDoc_STRVAR(posix_pipe__doc__,
-"pipe() -> (read_end, write_end)\n\n\
-Create a pipe.");
+/*[clinic input]
+os.pipe
+
+Create a pipe.
+
+Returns a tuple of two file descriptors:
+ (read_fd, write_fd)
+[clinic start generated code]*/
static PyObject *
-posix_pipe(PyObject *self, PyObject *noargs)
+os_pipe_impl(PyModuleDef *module)
+/*[clinic end generated code: output=6b0cd3f868ec3c40 input=02535e8c8fa6c4d4]*/
{
int fds[2];
#ifdef MS_WINDOWS
@@ -8501,25 +8529,30 @@ posix_pipe(PyObject *self, PyObject *noargs)
}
#endif /* HAVE_PIPE */
+
#ifdef HAVE_PIPE2
-PyDoc_STRVAR(posix_pipe2__doc__,
-"pipe2(flags) -> (read_end, write_end)\n\n\
-Create a pipe with flags set atomically.\n\
-flags can be constructed by ORing together one or more of these values:\n\
-O_NONBLOCK, O_CLOEXEC.\n\
-");
+/*[clinic input]
+os.pipe2
+
+ flags: int
+ /
+
+Create a pipe with flags set atomically.
+
+Returns a tuple of two file descriptors:
+ (read_fd, write_fd)
+
+flags can be constructed by ORing together one or more of these values:
+O_NONBLOCK, O_CLOEXEC.
+[clinic start generated code]*/
static PyObject *
-posix_pipe2(PyObject *self, PyObject *arg)
+os_pipe2_impl(PyModuleDef *module, int flags)
+/*[clinic end generated code: output=c15b6075d0c6b2e7 input=f261b6e7e63c6817]*/
{
- int flags;
int fds[2];
int res;
- flags = _PyLong_AsInt(arg);
- if (flags == -1 && PyErr_Occurred())
- return NULL;
-
res = pipe2(fds, flags);
if (res != 0)
return posix_error();
@@ -8527,306 +8560,340 @@ posix_pipe2(PyObject *self, PyObject *arg)
}
#endif /* HAVE_PIPE2 */
+
#ifdef HAVE_WRITEV
-PyDoc_STRVAR(posix_writev__doc__,
-"writev(fd, buffers) -> byteswritten\n\n\
-Write the contents of *buffers* to file descriptor *fd*. *buffers*\n\
-must be a sequence of bytes-like objects.\n\n\
-writev writes the contents of each object to the file descriptor\n\
-and returns the total number of bytes written.");
+/*[clinic input]
+os.writev -> Py_ssize_t
+ fd: int
+ buffers: object
+ /
-static PyObject *
-posix_writev(PyObject *self, PyObject *args)
+Iterate over buffers, and write the contents of each to a file descriptor.
+
+Returns the total number of bytes written.
+buffers must be a sequence of bytes-like objects.
+[clinic start generated code]*/
+
+static Py_ssize_t
+os_writev_impl(PyModuleDef *module, int fd, PyObject *buffers)
+/*[clinic end generated code: output=a48925dbf2d5c238 input=5b8d17fe4189d2fe]*/
{
- int fd, cnt;
- Py_ssize_t res;
- PyObject *seq;
+ int cnt;
+ Py_ssize_t result;
+ int async_err = 0;
struct iovec *iov;
Py_buffer *buf;
- if (!PyArg_ParseTuple(args, "iO:writev", &fd, &seq))
- return NULL;
- if (!PySequence_Check(seq)) {
+
+ if (!PySequence_Check(buffers)) {
PyErr_SetString(PyExc_TypeError,
"writev() arg 2 must be a sequence");
- return NULL;
+ return -1;
}
- cnt = PySequence_Size(seq);
+ cnt = PySequence_Size(buffers);
- if (iov_setup(&iov, &buf, seq, cnt, PyBUF_SIMPLE) < 0) {
- return NULL;
+ if (iov_setup(&iov, &buf, buffers, cnt, PyBUF_SIMPLE) < 0) {
+ return -1;
}
- Py_BEGIN_ALLOW_THREADS
- res = writev(fd, iov, cnt);
- Py_END_ALLOW_THREADS
+ do {
+ Py_BEGIN_ALLOW_THREADS
+ result = writev(fd, iov, cnt);
+ Py_END_ALLOW_THREADS
+ } while (result < 0 && errno == EINTR && !(async_err = PyErr_CheckSignals()));
iov_cleanup(iov, buf, cnt);
- if (res < 0)
- return posix_error();
+ if (result < 0 && !async_err)
+ posix_error();
- return PyLong_FromSsize_t(res);
+ return result;
}
-#endif
+#endif /* HAVE_WRITEV */
+
#ifdef HAVE_PWRITE
-PyDoc_STRVAR(posix_pwrite__doc__,
-"pwrite(fd, string, offset) -> byteswritten\n\n\
-Write string to a file descriptor, fd, from offset, leaving the file\n\
-offset unchanged.");
+/*[clinic input]
+os.pwrite -> Py_ssize_t
-static PyObject *
-posix_pwrite(PyObject *self, PyObject *args)
+ fd: int
+ buffer: Py_buffer
+ offset: Py_off_t
+ /
+
+Write bytes to a file descriptor starting at a particular offset.
+
+Write buffer to fd, starting at offset bytes from the beginning of
+the file. Returns the number of bytes writte. Does not change the
+current file offset.
+[clinic start generated code]*/
+
+static Py_ssize_t
+os_pwrite_impl(PyModuleDef *module, int fd, Py_buffer *buffer,
+ Py_off_t offset)
+/*[clinic end generated code: output=93aabdb40e17d325 input=19903f1b3dd26377]*/
{
- Py_buffer pbuf;
- int fd;
- off_t offset;
Py_ssize_t size;
-
- if (!PyArg_ParseTuple(args, "iy*O&:pwrite", &fd, &pbuf, _parse_off_t, &offset))
- return NULL;
+ int async_err = 0;
if (!_PyVerify_fd(fd)) {
- PyBuffer_Release(&pbuf);
- return posix_error();
+ posix_error();
+ return -1;
}
- Py_BEGIN_ALLOW_THREADS
- size = pwrite(fd, pbuf.buf, (size_t)pbuf.len, offset);
- Py_END_ALLOW_THREADS
- PyBuffer_Release(&pbuf);
- if (size < 0)
- return posix_error();
- return PyLong_FromSsize_t(size);
+
+ do {
+ Py_BEGIN_ALLOW_THREADS
+ _Py_BEGIN_SUPPRESS_IPH
+ size = pwrite(fd, buffer->buf, (size_t)buffer->len, offset);
+ _Py_END_SUPPRESS_IPH
+ Py_END_ALLOW_THREADS
+ } while (size < 0 && errno == EINTR && !(async_err = PyErr_CheckSignals()));
+
+ if (size < 0 && !async_err)
+ posix_error();
+ return size;
}
-#endif
+#endif /* HAVE_PWRITE */
+
#ifdef HAVE_MKFIFO
-PyDoc_STRVAR(posix_mkfifo__doc__,
-"mkfifo(path, mode=0o666, *, dir_fd=None)\n\n\
-Create a FIFO (a POSIX named pipe).\n\
-\n\
-If dir_fd is not None, it should be a file descriptor open to a directory,\n\
- and path should be relative; path will then be relative to that directory.\n\
-dir_fd may not be implemented on your platform.\n\
- If it is unavailable, using it will raise a NotImplementedError.");
+/*[clinic input]
+os.mkfifo
+
+ path: path_t
+ mode: int=0o666
+ *
+ dir_fd: dir_fd(requires='mkfifoat')=None
+
+Create a "fifo" (a POSIX named pipe).
+
+If dir_fd is not None, it should be a file descriptor open to a directory,
+ and path should be relative; path will then be relative to that directory.
+dir_fd may not be implemented on your platform.
+ If it is unavailable, using it will raise a NotImplementedError.
+[clinic start generated code]*/
static PyObject *
-posix_mkfifo(PyObject *self, PyObject *args, PyObject *kwargs)
+os_mkfifo_impl(PyModuleDef *module, path_t *path, int mode, int dir_fd)
+/*[clinic end generated code: output=8f5f5e72c630049a input=73032e98a36e0e19]*/
{
- path_t path;
- int mode = 0666;
- int dir_fd = DEFAULT_DIR_FD;
int result;
- PyObject *return_value = NULL;
- static char *keywords[] = {"path", "mode", "dir_fd", NULL};
+ int async_err = 0;
- memset(&path, 0, sizeof(path));
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&|i$O&:mkfifo", keywords,
- path_converter, &path,
- &mode,
+ do {
+ Py_BEGIN_ALLOW_THREADS
#ifdef HAVE_MKFIFOAT
- dir_fd_converter, &dir_fd
-#else
- dir_fd_unavailable, &dir_fd
+ if (dir_fd != DEFAULT_DIR_FD)
+ result = mkfifoat(dir_fd, path->narrow, mode);
+ else
#endif
- ))
- return NULL;
+ result = mkfifo(path->narrow, mode);
+ Py_END_ALLOW_THREADS
+ } while (result != 0 && errno == EINTR &&
+ !(async_err = PyErr_CheckSignals()));
+ if (result != 0)
+ return (!async_err) ? posix_error() : NULL;
- Py_BEGIN_ALLOW_THREADS
-#ifdef HAVE_MKFIFOAT
- if (dir_fd != DEFAULT_DIR_FD)
- result = mkfifoat(dir_fd, path.narrow, mode);
- else
-#endif
- result = mkfifo(path.narrow, mode);
- Py_END_ALLOW_THREADS
+ Py_RETURN_NONE;
+}
+#endif /* HAVE_MKFIFO */
- if (result < 0) {
- return_value = posix_error();
- goto exit;
- }
- return_value = Py_None;
- Py_INCREF(Py_None);
+#if defined(HAVE_MKNOD) && defined(HAVE_MAKEDEV)
+/*[clinic input]
+os.mknod
-exit:
- path_cleanup(&path);
- return return_value;
-}
-#endif
+ path: path_t
+ mode: int=0o600
+ device: dev_t=0
+ *
+ dir_fd: dir_fd(requires='mknodat')=None
-#if defined(HAVE_MKNOD) && defined(HAVE_MAKEDEV)
-PyDoc_STRVAR(posix_mknod__doc__,
-"mknod(path, mode=0o600, device=0, *, dir_fd=None)\n\n\
-Create a filesystem node (file, device special file or named pipe)\n\
-named path. mode specifies both the permissions to use and the\n\
-type of node to be created, being combined (bitwise OR) with one of\n\
-S_IFREG, S_IFCHR, S_IFBLK, and S_IFIFO. For S_IFCHR and S_IFBLK,\n\
-device defines the newly created device special file (probably using\n\
-os.makedev()), otherwise it is ignored.\n\
-\n\
-If dir_fd is not None, it should be a file descriptor open to a directory,\n\
- and path should be relative; path will then be relative to that directory.\n\
-dir_fd may not be implemented on your platform.\n\
- If it is unavailable, using it will raise a NotImplementedError.");
+Create a node in the file system.
+Create a node in the file system (file, device special file or named pipe)
+at path. mode specifies both the permissions to use and the
+type of node to be created, being combined (bitwise OR) with one of
+S_IFREG, S_IFCHR, S_IFBLK, and S_IFIFO. If S_IFCHR or S_IFBLK is set on mode,
+device defines the newly created device special file (probably using
+os.makedev()). Otherwise device is ignored.
+
+If dir_fd is not None, it should be a file descriptor open to a directory,
+ and path should be relative; path will then be relative to that directory.
+dir_fd may not be implemented on your platform.
+ If it is unavailable, using it will raise a NotImplementedError.
+[clinic start generated code]*/
static PyObject *
-posix_mknod(PyObject *self, PyObject *args, PyObject *kwargs)
+os_mknod_impl(PyModuleDef *module, path_t *path, int mode, dev_t device,
+ int dir_fd)
+/*[clinic end generated code: output=5151a8a9f754d272 input=ee44531551a4d83b]*/
{
- path_t path;
- int mode = 0666;
- dev_t device = 0;
- int dir_fd = DEFAULT_DIR_FD;
int result;
- PyObject *return_value = NULL;
- static char *keywords[] = {"path", "mode", "device", "dir_fd", NULL};
+ int async_err = 0;
- memset(&path, 0, sizeof(path));
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&|iO&$O&:mknod", keywords,
- path_converter, &path,
- &mode, _Py_Dev_Converter, &device,
+ do {
+ Py_BEGIN_ALLOW_THREADS
#ifdef HAVE_MKNODAT
- dir_fd_converter, &dir_fd
-#else
- dir_fd_unavailable, &dir_fd
+ if (dir_fd != DEFAULT_DIR_FD)
+ result = mknodat(dir_fd, path->narrow, mode, device);
+ else
#endif
- ))
- return NULL;
+ result = mknod(path->narrow, mode, device);
+ Py_END_ALLOW_THREADS
+ } while (result != 0 && errno == EINTR &&
+ !(async_err = PyErr_CheckSignals()));
+ if (result != 0)
+ return (!async_err) ? posix_error() : NULL;
- Py_BEGIN_ALLOW_THREADS
-#ifdef HAVE_MKNODAT
- if (dir_fd != DEFAULT_DIR_FD)
- result = mknodat(dir_fd, path.narrow, mode, device);
- else
-#endif
- result = mknod(path.narrow, mode, device);
- Py_END_ALLOW_THREADS
+ Py_RETURN_NONE;
+}
+#endif /* defined(HAVE_MKNOD) && defined(HAVE_MAKEDEV) */
- if (result < 0) {
- return_value = posix_error();
- goto exit;
- }
- return_value = Py_None;
- Py_INCREF(Py_None);
+#ifdef HAVE_DEVICE_MACROS
+/*[clinic input]
+os.major -> unsigned_int
-exit:
- path_cleanup(&path);
- return return_value;
-}
-#endif
+ device: dev_t
+ /
-#ifdef HAVE_DEVICE_MACROS
-PyDoc_STRVAR(posix_major__doc__,
-"major(device) -> major number\n\
-Extracts a device major number from a raw device number.");
+Extracts a device major number from a raw device number.
+[clinic start generated code]*/
-static PyObject *
-posix_major(PyObject *self, PyObject *args)
+static unsigned int
+os_major_impl(PyModuleDef *module, dev_t device)
+/*[clinic end generated code: output=ba55693ab49bac34 input=1e16a4d30c4d4462]*/
{
- dev_t device;
- if (!PyArg_ParseTuple(args, "O&:major", _Py_Dev_Converter, &device))
- return NULL;
- return PyLong_FromLong((long)major(device));
+ return major(device);
}
-PyDoc_STRVAR(posix_minor__doc__,
-"minor(device) -> minor number\n\
-Extracts a device minor number from a raw device number.");
-static PyObject *
-posix_minor(PyObject *self, PyObject *args)
+/*[clinic input]
+os.minor -> unsigned_int
+
+ device: dev_t
+ /
+
+Extracts a device minor number from a raw device number.
+[clinic start generated code]*/
+
+static unsigned int
+os_minor_impl(PyModuleDef *module, dev_t device)
+/*[clinic end generated code: output=2867219ebf274e27 input=0842c6d23f24c65e]*/
{
- dev_t device;
- if (!PyArg_ParseTuple(args, "O&:minor", _Py_Dev_Converter, &device))
- return NULL;
- return PyLong_FromLong((long)minor(device));
+ return minor(device);
}
-PyDoc_STRVAR(posix_makedev__doc__,
-"makedev(major, minor) -> device number\n\
-Composes a raw device number from the major and minor device numbers.");
-static PyObject *
-posix_makedev(PyObject *self, PyObject *args)
+/*[clinic input]
+os.makedev -> dev_t
+
+ major: int
+ minor: int
+ /
+
+Composes a raw device number from the major and minor device numbers.
+[clinic start generated code]*/
+
+static dev_t
+os_makedev_impl(PyModuleDef *module, int major, int minor)
+/*[clinic end generated code: output=7cb6264352437660 input=4b9fd8fc73cbe48f]*/
{
- int major, minor;
- if (!PyArg_ParseTuple(args, "ii:makedev", &major, &minor))
- return NULL;
- return _PyLong_FromDev(makedev(major, minor));
+ return makedev(major, minor);
}
-#endif /* device macros */
+#endif /* HAVE_DEVICE_MACROS */
-#ifdef HAVE_FTRUNCATE
-PyDoc_STRVAR(posix_ftruncate__doc__,
-"ftruncate(fd, length)\n\n\
-Truncate a file to a specified length.");
+#if defined HAVE_FTRUNCATE || defined MS_WINDOWS
+/*[clinic input]
+os.ftruncate
+
+ fd: int
+ length: Py_off_t
+ /
+
+Truncate a file, specified by file descriptor, to a specific length.
+[clinic start generated code]*/
static PyObject *
-posix_ftruncate(PyObject *self, PyObject *args)
+os_ftruncate_impl(PyModuleDef *module, int fd, Py_off_t length)
+/*[clinic end generated code: output=3666f401d76bf834 input=63b43641e52818f2]*/
{
- int fd;
- off_t length;
- int res;
-
- if (!PyArg_ParseTuple(args, "iO&:ftruncate", &fd, _parse_off_t, &length))
- return NULL;
+ int result;
+ int async_err = 0;
- Py_BEGIN_ALLOW_THREADS
- res = ftruncate(fd, length);
- Py_END_ALLOW_THREADS
- if (res < 0)
+ if (!_PyVerify_fd(fd))
return posix_error();
- Py_INCREF(Py_None);
- return Py_None;
-}
+
+ do {
+ Py_BEGIN_ALLOW_THREADS
+ _Py_BEGIN_SUPPRESS_IPH
+#ifdef MS_WINDOWS
+ result = _chsize_s(fd, length);
+#else
+ result = ftruncate(fd, length);
#endif
+ _Py_END_SUPPRESS_IPH
+ Py_END_ALLOW_THREADS
+ } while (result != 0 && errno == EINTR &&
+ !(async_err = PyErr_CheckSignals()));
+ if (result != 0)
+ return (!async_err) ? posix_error() : NULL;
+ Py_RETURN_NONE;
+}
+#endif /* HAVE_FTRUNCATE || MS_WINDOWS */
-#ifdef HAVE_TRUNCATE
-PyDoc_STRVAR(posix_truncate__doc__,
-"truncate(path, length)\n\n\
-Truncate the file given by path to length bytes.\n\
-On some platforms, path may also be specified as an open file descriptor.\n\
- If this functionality is unavailable, using it raises an exception.");
+
+#if defined HAVE_TRUNCATE || defined MS_WINDOWS
+/*[clinic input]
+os.truncate
+ path: path_t(allow_fd='PATH_HAVE_FTRUNCATE')
+ length: Py_off_t
+
+Truncate a file, specified by path, to a specific length.
+
+On some platforms, path may also be specified as an open file descriptor.
+ If this functionality is unavailable, using it raises an exception.
+[clinic start generated code]*/
static PyObject *
-posix_truncate(PyObject *self, PyObject *args, PyObject *kwargs)
+os_truncate_impl(PyModuleDef *module, path_t *path, Py_off_t length)
+/*[clinic end generated code: output=f60a9e08370e9e2e input=77229cf0b50a9b77]*/
{
- path_t path;
- off_t length;
- int res;
- PyObject *result = NULL;
- static char *keywords[] = {"path", "length", NULL};
-
- memset(&path, 0, sizeof(path));
- path.function_name = "truncate";
-#ifdef HAVE_FTRUNCATE
- path.allow_fd = 1;
+ int result;
+#ifdef MS_WINDOWS
+ int fd;
#endif
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&:truncate", keywords,
- path_converter, &path,
- _parse_off_t, &length))
- return NULL;
+
+ if (path->fd != -1)
+ return os_ftruncate_impl(module, path->fd, length);
Py_BEGIN_ALLOW_THREADS
-#ifdef HAVE_FTRUNCATE
- if (path.fd != -1)
- res = ftruncate(path.fd, length);
+ _Py_BEGIN_SUPPRESS_IPH
+#ifdef MS_WINDOWS
+ if (path->wide)
+ fd = _wopen(path->wide, _O_WRONLY | _O_BINARY | _O_NOINHERIT);
else
-#endif
- res = truncate(path.narrow, length);
- Py_END_ALLOW_THREADS
- if (res < 0)
- result = path_error(&path);
+ fd = _open(path->narrow, _O_WRONLY | _O_BINARY | _O_NOINHERIT);
+ if (fd < 0)
+ result = -1;
else {
- Py_INCREF(Py_None);
- result = Py_None;
+ result = _chsize_s(fd, length);
+ close(fd);
+ if (result < 0)
+ errno = result;
}
- path_cleanup(&path);
- return result;
-}
+#else
+ result = truncate(path->narrow, length);
#endif
+ _Py_END_SUPPRESS_IPH
+ Py_END_ALLOW_THREADS
+ if (result < 0)
+ return path_error(path);
+
+ Py_RETURN_NONE;
+}
+#endif /* HAVE_TRUNCATE || MS_WINDOWS */
+
/* Issue #22396: On 32-bit AIX platform, the prototypes of os.posix_fadvise()
and os.posix_fallocate() in system headers are wrong if _LARGE_FILES is
@@ -8836,186 +8903,211 @@ posix_truncate(PyObject *self, PyObject *args, PyObject *kwargs)
# define POSIX_FADVISE_AIX_BUG
#endif
+
#if defined(HAVE_POSIX_FALLOCATE) && !defined(POSIX_FADVISE_AIX_BUG)
-PyDoc_STRVAR(posix_posix_fallocate__doc__,
-"posix_fallocate(fd, offset, len)\n\n\
-Ensures that enough disk space is allocated for the file specified by fd\n\
-starting from offset and continuing for len bytes.");
+/*[clinic input]
+os.posix_fallocate
+
+ fd: int
+ offset: Py_off_t
+ length: Py_off_t
+ /
+
+Ensure a file has allocated at least a particular number of bytes on disk.
+
+Ensure that the file specified by fd encompasses a range of bytes
+starting at offset bytes from the beginning and continuing for length bytes.
+[clinic start generated code]*/
static PyObject *
-posix_posix_fallocate(PyObject *self, PyObject *args)
+os_posix_fallocate_impl(PyModuleDef *module, int fd, Py_off_t offset,
+ Py_off_t length)
+/*[clinic end generated code: output=7f6f87a8c751e1b4 input=d7a2ef0ab2ca52fb]*/
{
- off_t len, offset;
- int res, fd;
-
- if (!PyArg_ParseTuple(args, "iO&O&:posix_fallocate",
- &fd, _parse_off_t, &offset, _parse_off_t, &len))
- return NULL;
+ int result;
+ int async_err = 0;
- Py_BEGIN_ALLOW_THREADS
- res = posix_fallocate(fd, offset, len);
- Py_END_ALLOW_THREADS
- if (res != 0) {
- errno = res;
- return posix_error();
- }
+ do {
+ Py_BEGIN_ALLOW_THREADS
+ result = posix_fallocate(fd, offset, length);
+ Py_END_ALLOW_THREADS
+ } while (result != 0 && errno == EINTR &&
+ !(async_err = PyErr_CheckSignals()));
+ if (result != 0)
+ return (!async_err) ? posix_error() : NULL;
Py_RETURN_NONE;
}
-#endif
+#endif /* HAVE_POSIX_FALLOCATE) && !POSIX_FADVISE_AIX_BUG */
+
#if defined(HAVE_POSIX_FADVISE) && !defined(POSIX_FADVISE_AIX_BUG)
-PyDoc_STRVAR(posix_posix_fadvise__doc__,
-"posix_fadvise(fd, offset, len, advice)\n\n\
-Announces an intention to access data in a specific pattern thus allowing\n\
-the kernel to make optimizations.\n\
-The advice applies to the region of the file specified by fd starting at\n\
-offset and continuing for len bytes.\n\
-advice is one of POSIX_FADV_NORMAL, POSIX_FADV_SEQUENTIAL,\n\
-POSIX_FADV_RANDOM, POSIX_FADV_NOREUSE, POSIX_FADV_WILLNEED or\n\
-POSIX_FADV_DONTNEED.");
+/*[clinic input]
+os.posix_fadvise
+
+ fd: int
+ offset: Py_off_t
+ length: Py_off_t
+ advice: int
+ /
+
+Announce an intention to access data in a specific pattern.
+
+Announce an intention to access data in a specific pattern, thus allowing
+the kernel to make optimizations.
+The advice applies to the region of the file specified by fd starting at
+offset and continuing for length bytes.
+advice is one of POSIX_FADV_NORMAL, POSIX_FADV_SEQUENTIAL,
+POSIX_FADV_RANDOM, POSIX_FADV_NOREUSE, POSIX_FADV_WILLNEED, or
+POSIX_FADV_DONTNEED.
+[clinic start generated code]*/
static PyObject *
-posix_posix_fadvise(PyObject *self, PyObject *args)
+os_posix_fadvise_impl(PyModuleDef *module, int fd, Py_off_t offset,
+ Py_off_t length, int advice)
+/*[clinic end generated code: output=457ce6a67189e10d input=0fbe554edc2f04b5]*/
{
- off_t len, offset;
- int res, fd, advice;
-
- if (!PyArg_ParseTuple(args, "iO&O&i:posix_fadvise",
- &fd, _parse_off_t, &offset, _parse_off_t, &len, &advice))
- return NULL;
+ int result;
+ int async_err = 0;
- Py_BEGIN_ALLOW_THREADS
- res = posix_fadvise(fd, offset, len, advice);
- Py_END_ALLOW_THREADS
- if (res != 0) {
- errno = res;
- return posix_error();
- }
+ do {
+ Py_BEGIN_ALLOW_THREADS
+ result = posix_fadvise(fd, offset, length, advice);
+ Py_END_ALLOW_THREADS
+ } while (result != 0 && errno == EINTR &&
+ !(async_err = PyErr_CheckSignals()));
+ if (result != 0)
+ return (!async_err) ? posix_error() : NULL;
Py_RETURN_NONE;
}
-#endif
+#endif /* HAVE_POSIX_FADVISE && !POSIX_FADVISE_AIX_BUG */
#ifdef HAVE_PUTENV
-PyDoc_STRVAR(posix_putenv__doc__,
-"putenv(key, value)\n\n\
-Change or add an environment variable.");
/* Save putenv() parameters as values here, so we can collect them when they
* get re-set with another call for the same key. */
static PyObject *posix_putenv_garbage;
-static PyObject *
-posix_putenv(PyObject *self, PyObject *args)
+static void
+posix_putenv_garbage_setitem(PyObject *name, PyObject *value)
{
- PyObject *newstr = NULL;
+ /* Install the first arg and newstr in posix_putenv_garbage;
+ * this will cause previous value to be collected. This has to
+ * happen after the real putenv() call because the old value
+ * was still accessible until then. */
+ if (PyDict_SetItem(posix_putenv_garbage, name, value))
+ /* really not much we can do; just leak */
+ PyErr_Clear();
+ else
+ Py_DECREF(value);
+}
+
+
#ifdef MS_WINDOWS
- PyObject *os1, *os2;
- wchar_t *newenv;
+/*[clinic input]
+os.putenv
- if (!PyArg_ParseTuple(args,
- "UU:putenv",
- &os1, &os2))
- return NULL;
+ name: unicode
+ value: unicode
+ /
- newstr = PyUnicode_FromFormat("%U=%U", os1, os2);
- if (newstr == NULL) {
+Change or add an environment variable.
+[clinic start generated code]*/
+
+static PyObject *
+os_putenv_impl(PyModuleDef *module, PyObject *name, PyObject *value)
+/*[clinic end generated code: output=a2438cf95e5a0c1c input=ba586581c2e6105f]*/
+{
+ wchar_t *env;
+
+ PyObject *unicode = PyUnicode_FromFormat("%U=%U", name, value);
+ if (unicode == NULL) {
PyErr_NoMemory();
- goto error;
+ return NULL;
}
- if (_MAX_ENV < PyUnicode_GET_LENGTH(newstr)) {
+ if (_MAX_ENV < PyUnicode_GET_LENGTH(unicode)) {
PyErr_Format(PyExc_ValueError,
"the environment variable is longer than %u characters",
_MAX_ENV);
goto error;
}
- newenv = PyUnicode_AsUnicode(newstr);
- if (newenv == NULL)
+ env = PyUnicode_AsUnicode(unicode);
+ if (env == NULL)
goto error;
- if (_wputenv(newenv)) {
+ if (_wputenv(env)) {
posix_error();
goto error;
}
-#else
- PyObject *os1, *os2;
- char *s1, *s2;
- char *newenv;
-
- if (!PyArg_ParseTuple(args,
- "O&O&:putenv",
- PyUnicode_FSConverter, &os1,
- PyUnicode_FSConverter, &os2))
- return NULL;
- s1 = PyBytes_AsString(os1);
- s2 = PyBytes_AsString(os2);
- newstr = PyBytes_FromFormat("%s=%s", s1, s2);
- if (newstr == NULL) {
- PyErr_NoMemory();
- goto error;
- }
+ posix_putenv_garbage_setitem(name, unicode);
+ Py_RETURN_NONE;
- newenv = PyBytes_AS_STRING(newstr);
- if (putenv(newenv)) {
- posix_error();
- goto error;
- }
-#endif
+error:
+ Py_DECREF(unicode);
+ return NULL;
+}
+#else /* MS_WINDOWS */
+/*[clinic input]
+os.putenv
- /* Install the first arg and newstr in posix_putenv_garbage;
- * this will cause previous value to be collected. This has to
- * happen after the real putenv() call because the old value
- * was still accessible until then. */
- if (PyDict_SetItem(posix_putenv_garbage, os1, newstr)) {
- /* really not much we can do; just leak */
- PyErr_Clear();
+ name: FSConverter
+ value: FSConverter
+ /
+
+Change or add an environment variable.
+[clinic start generated code]*/
+
+static PyObject *
+os_putenv_impl(PyModuleDef *module, PyObject *name, PyObject *value)
+/*[clinic end generated code: output=a2438cf95e5a0c1c input=a97bc6152f688d31]*/
+{
+ PyObject *bytes = NULL;
+ char *env;
+ char *name_string = PyBytes_AsString(name);
+ char *value_string = PyBytes_AsString(value);
+
+ bytes = PyBytes_FromFormat("%s=%s", name_string, value_string);
+ if (bytes == NULL) {
+ PyErr_NoMemory();
+ return NULL;
}
- else {
- Py_DECREF(newstr);
+
+ env = PyBytes_AS_STRING(bytes);
+ if (putenv(env)) {
+ Py_DECREF(bytes);
+ return posix_error();
}
-#ifndef MS_WINDOWS
- Py_DECREF(os1);
- Py_DECREF(os2);
-#endif
+ posix_putenv_garbage_setitem(name, bytes);
Py_RETURN_NONE;
-
-error:
-#ifndef MS_WINDOWS
- Py_DECREF(os1);
- Py_DECREF(os2);
-#endif
- Py_XDECREF(newstr);
- return NULL;
}
-#endif /* putenv */
+#endif /* MS_WINDOWS */
+#endif /* HAVE_PUTENV */
+
#ifdef HAVE_UNSETENV
-PyDoc_STRVAR(posix_unsetenv__doc__,
-"unsetenv(key)\n\n\
-Delete an environment variable.");
+/*[clinic input]
+os.unsetenv
+ name: FSConverter
+ /
+
+Delete an environment variable.
+[clinic start generated code]*/
static PyObject *
-posix_unsetenv(PyObject *self, PyObject *args)
+os_unsetenv_impl(PyModuleDef *module, PyObject *name)
+/*[clinic end generated code: output=25994b57016a2dc9 input=2bb5288a599c7107]*/
{
- PyObject *name;
#ifndef HAVE_BROKEN_UNSETENV
int err;
#endif
- if (!PyArg_ParseTuple(args, "O&:unsetenv",
-
- PyUnicode_FSConverter, &name))
- return NULL;
-
#ifdef HAVE_BROKEN_UNSETENV
unsetenv(PyBytes_AS_STRING(name));
#else
err = unsetenv(PyBytes_AS_STRING(name));
- if (err) {
- Py_DECREF(name);
+ if (err)
return posix_error();
- }
#endif
/* Remove the key from posix_putenv_garbage;
@@ -9027,23 +9119,25 @@ posix_unsetenv(PyObject *self, PyObject *args)
/* really not much we can do; just leak */
PyErr_Clear();
}
- Py_DECREF(name);
Py_RETURN_NONE;
}
-#endif /* unsetenv */
+#endif /* HAVE_UNSETENV */
+
-PyDoc_STRVAR(posix_strerror__doc__,
-"strerror(code) -> string\n\n\
-Translate an error code to a message string.");
+/*[clinic input]
+os.strerror
+
+ code: int
+ /
+
+Translate an error code to a message string.
+[clinic start generated code]*/
static PyObject *
-posix_strerror(PyObject *self, PyObject *args)
+os_strerror_impl(PyModuleDef *module, int code)
+/*[clinic end generated code: output=0280c6af51e5c9fe input=75a8673d97915a91]*/
{
- int code;
- char *message;
- if (!PyArg_ParseTuple(args, "i:strerror", &code))
- return NULL;
- message = strerror(code);
+ char *message = strerror(code);
if (message == NULL) {
PyErr_SetString(PyExc_ValueError,
"strerror() argument out of range");
@@ -9054,155 +9148,168 @@ posix_strerror(PyObject *self, PyObject *args)
#ifdef HAVE_SYS_WAIT_H
-
#ifdef WCOREDUMP
-PyDoc_STRVAR(posix_WCOREDUMP__doc__,
-"WCOREDUMP(status) -> bool\n\n\
-Return True if the process returning 'status' was dumped to a core file.");
+/*[clinic input]
+os.WCOREDUMP -> bool
-static PyObject *
-posix_WCOREDUMP(PyObject *self, PyObject *args)
-{
- WAIT_TYPE status;
- WAIT_STATUS_INT(status) = 0;
+ status: int
+ /
- if (!PyArg_ParseTuple(args, "i:WCOREDUMP", &WAIT_STATUS_INT(status)))
- return NULL;
+Return True if the process returning status was dumped to a core file.
+[clinic start generated code]*/
- return PyBool_FromLong(WCOREDUMP(status));
+static int
+os_WCOREDUMP_impl(PyModuleDef *module, int status)
+/*[clinic end generated code: output=134f70bbe63fbf41 input=8b05e7ab38528d04]*/
+{
+ WAIT_TYPE wait_status;
+ WAIT_STATUS_INT(wait_status) = status;
+ return WCOREDUMP(wait_status);
}
#endif /* WCOREDUMP */
+
#ifdef WIFCONTINUED
-PyDoc_STRVAR(posix_WIFCONTINUED__doc__,
-"WIFCONTINUED(status) -> bool\n\n\
-Return True if the process returning 'status' was continued from a\n\
-job control stop.");
+/*[clinic input]
+os.WIFCONTINUED -> bool
-static PyObject *
-posix_WIFCONTINUED(PyObject *self, PyObject *args)
-{
- WAIT_TYPE status;
- WAIT_STATUS_INT(status) = 0;
+ status: int
- if (!PyArg_ParseTuple(args, "i:WCONTINUED", &WAIT_STATUS_INT(status)))
- return NULL;
+Return True if a particular process was continued from a job control stop.
+
+Return True if the process returning status was continued from a
+job control stop.
+[clinic start generated code]*/
- return PyBool_FromLong(WIFCONTINUED(status));
+static int
+os_WIFCONTINUED_impl(PyModuleDef *module, int status)
+/*[clinic end generated code: output=9cdd26543ebb6dcd input=e777e7d38eb25bd9]*/
+{
+ WAIT_TYPE wait_status;
+ WAIT_STATUS_INT(wait_status) = status;
+ return WIFCONTINUED(wait_status);
}
#endif /* WIFCONTINUED */
+
#ifdef WIFSTOPPED
-PyDoc_STRVAR(posix_WIFSTOPPED__doc__,
-"WIFSTOPPED(status) -> bool\n\n\
-Return True if the process returning 'status' was stopped.");
+/*[clinic input]
+os.WIFSTOPPED -> bool
-static PyObject *
-posix_WIFSTOPPED(PyObject *self, PyObject *args)
-{
- WAIT_TYPE status;
- WAIT_STATUS_INT(status) = 0;
+ status: int
- if (!PyArg_ParseTuple(args, "i:WIFSTOPPED", &WAIT_STATUS_INT(status)))
- return NULL;
+Return True if the process returning status was stopped.
+[clinic start generated code]*/
- return PyBool_FromLong(WIFSTOPPED(status));
+static int
+os_WIFSTOPPED_impl(PyModuleDef *module, int status)
+/*[clinic end generated code: output=73bf35e44994a724 input=043cb7f1289ef904]*/
+{
+ WAIT_TYPE wait_status;
+ WAIT_STATUS_INT(wait_status) = status;
+ return WIFSTOPPED(wait_status);
}
#endif /* WIFSTOPPED */
+
#ifdef WIFSIGNALED
-PyDoc_STRVAR(posix_WIFSIGNALED__doc__,
-"WIFSIGNALED(status) -> bool\n\n\
-Return True if the process returning 'status' was terminated by a signal.");
+/*[clinic input]
+os.WIFSIGNALED -> bool
-static PyObject *
-posix_WIFSIGNALED(PyObject *self, PyObject *args)
-{
- WAIT_TYPE status;
- WAIT_STATUS_INT(status) = 0;
+ status: int
- if (!PyArg_ParseTuple(args, "i:WIFSIGNALED", &WAIT_STATUS_INT(status)))
- return NULL;
+Return True if the process returning status was terminated by a signal.
+[clinic start generated code]*/
- return PyBool_FromLong(WIFSIGNALED(status));
+static int
+os_WIFSIGNALED_impl(PyModuleDef *module, int status)
+/*[clinic end generated code: output=2697975771872420 input=d55ba7cc9ce5dc43]*/
+{
+ WAIT_TYPE wait_status;
+ WAIT_STATUS_INT(wait_status) = status;
+ return WIFSIGNALED(wait_status);
}
#endif /* WIFSIGNALED */
+
#ifdef WIFEXITED
-PyDoc_STRVAR(posix_WIFEXITED__doc__,
-"WIFEXITED(status) -> bool\n\n\
-Return true if the process returning 'status' exited using the exit()\n\
-system call.");
+/*[clinic input]
+os.WIFEXITED -> bool
-static PyObject *
-posix_WIFEXITED(PyObject *self, PyObject *args)
-{
- WAIT_TYPE status;
- WAIT_STATUS_INT(status) = 0;
+ status: int
- if (!PyArg_ParseTuple(args, "i:WIFEXITED", &WAIT_STATUS_INT(status)))
- return NULL;
+Return True if the process returning status exited via the exit() system call.
+[clinic start generated code]*/
- return PyBool_FromLong(WIFEXITED(status));
+static int
+os_WIFEXITED_impl(PyModuleDef *module, int status)
+/*[clinic end generated code: output=ca8f8c61f0b8532e input=d63775a6791586c0]*/
+{
+ WAIT_TYPE wait_status;
+ WAIT_STATUS_INT(wait_status) = status;
+ return WIFEXITED(wait_status);
}
#endif /* WIFEXITED */
+
#ifdef WEXITSTATUS
-PyDoc_STRVAR(posix_WEXITSTATUS__doc__,
-"WEXITSTATUS(status) -> integer\n\n\
-Return the process return code from 'status'.");
+/*[clinic input]
+os.WEXITSTATUS -> int
-static PyObject *
-posix_WEXITSTATUS(PyObject *self, PyObject *args)
-{
- WAIT_TYPE status;
- WAIT_STATUS_INT(status) = 0;
+ status: int
- if (!PyArg_ParseTuple(args, "i:WEXITSTATUS", &WAIT_STATUS_INT(status)))
- return NULL;
+Return the process return code from status.
+[clinic start generated code]*/
- return Py_BuildValue("i", WEXITSTATUS(status));
+static int
+os_WEXITSTATUS_impl(PyModuleDef *module, int status)
+/*[clinic end generated code: output=ea54da23d9e0f6af input=e1fb4944e377585b]*/
+{
+ WAIT_TYPE wait_status;
+ WAIT_STATUS_INT(wait_status) = status;
+ return WEXITSTATUS(wait_status);
}
#endif /* WEXITSTATUS */
+
#ifdef WTERMSIG
-PyDoc_STRVAR(posix_WTERMSIG__doc__,
-"WTERMSIG(status) -> integer\n\n\
-Return the signal that terminated the process that provided the 'status'\n\
-value.");
+/*[clinic input]
+os.WTERMSIG -> int
-static PyObject *
-posix_WTERMSIG(PyObject *self, PyObject *args)
-{
- WAIT_TYPE status;
- WAIT_STATUS_INT(status) = 0;
+ status: int
- if (!PyArg_ParseTuple(args, "i:WTERMSIG", &WAIT_STATUS_INT(status)))
- return NULL;
+Return the signal that terminated the process that provided the status value.
+[clinic start generated code]*/
- return Py_BuildValue("i", WTERMSIG(status));
+static int
+os_WTERMSIG_impl(PyModuleDef *module, int status)
+/*[clinic end generated code: output=4d25367026cb852c input=727fd7f84ec3f243]*/
+{
+ WAIT_TYPE wait_status;
+ WAIT_STATUS_INT(wait_status) = status;
+ return WTERMSIG(wait_status);
}
#endif /* WTERMSIG */
+
#ifdef WSTOPSIG
-PyDoc_STRVAR(posix_WSTOPSIG__doc__,
-"WSTOPSIG(status) -> integer\n\n\
-Return the signal that stopped the process that provided\n\
-the 'status' value.");
+/*[clinic input]
+os.WSTOPSIG -> int
-static PyObject *
-posix_WSTOPSIG(PyObject *self, PyObject *args)
-{
- WAIT_TYPE status;
- WAIT_STATUS_INT(status) = 0;
+ status: int
- if (!PyArg_ParseTuple(args, "i:WSTOPSIG", &WAIT_STATUS_INT(status)))
- return NULL;
+Return the signal that stopped the process that provided the status value.
+[clinic start generated code]*/
- return Py_BuildValue("i", WSTOPSIG(status));
+static int
+os_WSTOPSIG_impl(PyModuleDef *module, int status)
+/*[clinic end generated code: output=54eb9c13b001adb4 input=46ebf1d1b293c5c1]*/
+{
+ WAIT_TYPE wait_status;
+ WAIT_STATUS_INT(wait_status) = status;
+ return WSTOPSIG(wait_status);
}
#endif /* WSTOPSIG */
-
#endif /* HAVE_SYS_WAIT_H */
@@ -9257,104 +9364,101 @@ _pystatvfs_fromstructstatvfs(struct statvfs st) {
return v;
}
-PyDoc_STRVAR(posix_fstatvfs__doc__,
-"fstatvfs(fd) -> statvfs result\n\n\
-Perform an fstatvfs system call on the given fd.\n\
-Equivalent to statvfs(fd).");
+
+/*[clinic input]
+os.fstatvfs
+ fd: int
+ /
+
+Perform an fstatvfs system call on the given fd.
+
+Equivalent to statvfs(fd).
+[clinic start generated code]*/
static PyObject *
-posix_fstatvfs(PyObject *self, PyObject *args)
+os_fstatvfs_impl(PyModuleDef *module, int fd)
+/*[clinic end generated code: output=584a94a754497ac0 input=d8122243ac50975e]*/
{
- int fd, res;
+ int result;
+ int async_err = 0;
struct statvfs st;
- if (!PyArg_ParseTuple(args, "i:fstatvfs", &fd))
- return NULL;
- Py_BEGIN_ALLOW_THREADS
- res = fstatvfs(fd, &st);
- Py_END_ALLOW_THREADS
- if (res != 0)
- return posix_error();
+ do {
+ Py_BEGIN_ALLOW_THREADS
+ result = fstatvfs(fd, &st);
+ Py_END_ALLOW_THREADS
+ } while (result != 0 && errno == EINTR &&
+ !(async_err = PyErr_CheckSignals()));
+ if (result != 0)
+ return (!async_err) ? posix_error() : NULL;
return _pystatvfs_fromstructstatvfs(st);
}
-#endif /* HAVE_FSTATVFS && HAVE_SYS_STATVFS_H */
+#endif /* defined(HAVE_FSTATVFS) && defined(HAVE_SYS_STATVFS_H) */
#if defined(HAVE_STATVFS) && defined(HAVE_SYS_STATVFS_H)
#include <sys/statvfs.h>
+/*[clinic input]
+os.statvfs
-PyDoc_STRVAR(posix_statvfs__doc__,
-"statvfs(path)\n\n\
-Perform a statvfs system call on the given path.\n\
-\n\
-path may always be specified as a string.\n\
-On some platforms, path may also be specified as an open file descriptor.\n\
- If this functionality is unavailable, using it raises an exception.");
+ path: path_t(allow_fd='PATH_HAVE_FSTATVFS')
+
+Perform a statvfs system call on the given path.
+
+path may always be specified as a string.
+On some platforms, path may also be specified as an open file descriptor.
+ If this functionality is unavailable, using it raises an exception.
+[clinic start generated code]*/
static PyObject *
-posix_statvfs(PyObject *self, PyObject *args, PyObject *kwargs)
+os_statvfs_impl(PyModuleDef *module, path_t *path)
+/*[clinic end generated code: output=5ced07a2cf931f41 input=3f5c35791c669bd9]*/
{
- static char *keywords[] = {"path", NULL};
- path_t path;
int result;
- PyObject *return_value = NULL;
struct statvfs st;
- memset(&path, 0, sizeof(path));
- path.function_name = "statvfs";
-#ifdef HAVE_FSTATVFS
- path.allow_fd = 1;
-#endif
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&:statvfs", keywords,
- path_converter, &path
- ))
- return NULL;
-
Py_BEGIN_ALLOW_THREADS
#ifdef HAVE_FSTATVFS
- if (path.fd != -1) {
+ if (path->fd != -1) {
#ifdef __APPLE__
/* handle weak-linking on Mac OS X 10.3 */
if (fstatvfs == NULL) {
- fd_specified("statvfs", path.fd);
- goto exit;
+ fd_specified("statvfs", path->fd);
+ return NULL;
}
#endif
- result = fstatvfs(path.fd, &st);
+ result = fstatvfs(path->fd, &st);
}
else
#endif
- result = statvfs(path.narrow, &st);
+ result = statvfs(path->narrow, &st);
Py_END_ALLOW_THREADS
if (result) {
- return_value = path_error(&path);
- goto exit;
+ return path_error(path);
}
- return_value = _pystatvfs_fromstructstatvfs(st);
-
-exit:
- path_cleanup(&path);
- return return_value;
+ return _pystatvfs_fromstructstatvfs(st);
}
-#endif /* HAVE_STATVFS */
+#endif /* defined(HAVE_STATVFS) && defined(HAVE_SYS_STATVFS_H) */
+
#ifdef MS_WINDOWS
-PyDoc_STRVAR(win32__getdiskusage__doc__,
-"_getdiskusage(path) -> (total, free)\n\n\
-Return disk usage statistics about the given path as (total, free) tuple.");
+/*[clinic input]
+os._getdiskusage
+
+ path: Py_UNICODE
+
+Return disk usage statistics about the given path as a (total, free) tuple.
+[clinic start generated code]*/
static PyObject *
-win32__getdiskusage(PyObject *self, PyObject *args)
+os__getdiskusage_impl(PyModuleDef *module, Py_UNICODE *path)
+/*[clinic end generated code: output=60a9cf33449db1dd input=6458133aed893c78]*/
{
BOOL retval;
ULARGE_INTEGER _, total, free;
- const wchar_t *path;
-
- if (! PyArg_ParseTuple(args, "u", &path))
- return NULL;
Py_BEGIN_ALLOW_THREADS
retval = GetDiskFreeSpaceExW(path, &_, &total, &free);
@@ -9364,7 +9468,7 @@ win32__getdiskusage(PyObject *self, PyObject *args)
return Py_BuildValue("(LL)", total.QuadPart, free.QuadPart);
}
-#endif
+#endif /* MS_WINDOWS */
/* This is used for fpathconf(), pathconf(), confstr() and sysconf().
@@ -9521,81 +9625,73 @@ conv_path_confname(PyObject *arg, int *valuep)
}
#endif
+
#ifdef HAVE_FPATHCONF
-PyDoc_STRVAR(posix_fpathconf__doc__,
-"fpathconf(fd, name) -> integer\n\n\
-Return the configuration limit name for the file descriptor fd.\n\
-If there is no limit, return -1.");
+/*[clinic input]
+os.fpathconf -> long
-static PyObject *
-posix_fpathconf(PyObject *self, PyObject *args)
+ fd: int
+ name: path_confname
+ /
+
+Return the configuration limit name for the file descriptor fd.
+
+If there is no limit, return -1.
+[clinic start generated code]*/
+
+static long
+os_fpathconf_impl(PyModuleDef *module, int fd, int name)
+/*[clinic end generated code: output=082b2922d4441de7 input=5942a024d3777810]*/
{
- PyObject *result = NULL;
- int name, fd;
+ long limit;
- if (PyArg_ParseTuple(args, "iO&:fpathconf", &fd,
- conv_path_confname, &name)) {
- long limit;
+ errno = 0;
+ limit = fpathconf(fd, name);
+ if (limit == -1 && errno != 0)
+ posix_error();
- errno = 0;
- limit = fpathconf(fd, name);
- if (limit == -1 && errno != 0)
- posix_error();
- else
- result = PyLong_FromLong(limit);
- }
- return result;
+ return limit;
}
-#endif
+#endif /* HAVE_FPATHCONF */
#ifdef HAVE_PATHCONF
-PyDoc_STRVAR(posix_pathconf__doc__,
-"pathconf(path, name) -> integer\n\n\
-Return the configuration limit name for the file or directory path.\n\
-If there is no limit, return -1.\n\
-On some platforms, path may also be specified as an open file descriptor.\n\
- If this functionality is unavailable, using it raises an exception.");
+/*[clinic input]
+os.pathconf -> long
+ path: path_t(allow_fd='PATH_HAVE_FPATHCONF')
+ name: path_confname
-static PyObject *
-posix_pathconf(PyObject *self, PyObject *args, PyObject *kwargs)
-{
- path_t path;
- PyObject *result = NULL;
- int name;
- static char *keywords[] = {"path", "name", NULL};
+Return the configuration limit name for the file or directory path.
- memset(&path, 0, sizeof(path));
- path.function_name = "pathconf";
-#ifdef HAVE_FPATHCONF
- path.allow_fd = 1;
-#endif
- if (PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&:pathconf", keywords,
- path_converter, &path,
- conv_path_confname, &name)) {
+If there is no limit, return -1.
+On some platforms, path may also be specified as an open file descriptor.
+ If this functionality is unavailable, using it raises an exception.
+[clinic start generated code]*/
+
+static long
+os_pathconf_impl(PyModuleDef *module, path_t *path, int name)
+/*[clinic end generated code: output=3713029e9501f5ab input=bc3e2a985af27e5e]*/
+{
long limit;
errno = 0;
#ifdef HAVE_FPATHCONF
- if (path.fd != -1)
- limit = fpathconf(path.fd, name);
+ if (path->fd != -1)
+ limit = fpathconf(path->fd, name);
else
#endif
- limit = pathconf(path.narrow, name);
+ limit = pathconf(path->narrow, name);
if (limit == -1 && errno != 0) {
if (errno == EINVAL)
/* could be a path or name problem */
posix_error();
else
- result = path_error(&path);
- }
- else
- result = PyLong_FromLong(limit);
+ path_error(path);
}
- path_cleanup(&path);
- return result;
+
+ return limit;
}
-#endif
+#endif /* HAVE_PATHCONF */
#ifdef HAVE_CONFSTR
static struct constdef posix_constants_confstr[] = {
@@ -9759,21 +9855,24 @@ conv_confstr_confname(PyObject *arg, int *valuep)
/ sizeof(struct constdef));
}
-PyDoc_STRVAR(posix_confstr__doc__,
-"confstr(name) -> string\n\n\
-Return a string-valued system configuration variable.");
+
+/*[clinic input]
+os.confstr
+
+ name: confstr_confname
+ /
+
+Return a string-valued system configuration variable.
+[clinic start generated code]*/
static PyObject *
-posix_confstr(PyObject *self, PyObject *args)
+os_confstr_impl(PyModuleDef *module, int name)
+/*[clinic end generated code: output=6ff79c9eed8c2daf input=18fb4d0567242e65]*/
{
PyObject *result = NULL;
- int name;
char buffer[255];
size_t len;
- if (!PyArg_ParseTuple(args, "O&:confstr", conv_confstr_confname, &name))
- return NULL;
-
errno = 0;
len = confstr(name, buffer, sizeof(buffer));
if (len == 0) {
@@ -9787,18 +9886,20 @@ posix_confstr(PyObject *self, PyObject *args)
}
if (len >= sizeof(buffer)) {
+ size_t len2;
char *buf = PyMem_Malloc(len);
if (buf == NULL)
return PyErr_NoMemory();
- confstr(name, buf, len);
- result = PyUnicode_DecodeFSDefaultAndSize(buf, len-1);
+ len2 = confstr(name, buf, len);
+ assert(len == len2);
+ result = PyUnicode_DecodeFSDefaultAndSize(buf, len2-1);
PyMem_Free(buf);
}
else
result = PyUnicode_DecodeFSDefaultAndSize(buffer, len-1);
return result;
}
-#endif
+#endif /* HAVE_CONFSTR */
#ifdef HAVE_SYSCONF
@@ -10305,29 +10406,28 @@ conv_sysconf_confname(PyObject *arg, int *valuep)
/ sizeof(struct constdef));
}
-PyDoc_STRVAR(posix_sysconf__doc__,
-"sysconf(name) -> integer\n\n\
-Return an integer-valued system configuration variable.");
-static PyObject *
-posix_sysconf(PyObject *self, PyObject *args)
-{
- PyObject *result = NULL;
- int name;
+/*[clinic input]
+os.sysconf -> long
+ name: sysconf_confname
+ /
- if (PyArg_ParseTuple(args, "O&:sysconf", conv_sysconf_confname, &name)) {
- long value;
+Return an integer-valued system configuration variable.
+[clinic start generated code]*/
- errno = 0;
- value = sysconf(name);
- if (value == -1 && errno != 0)
- posix_error();
- else
- result = PyLong_FromLong(value);
- }
- return result;
+static long
+os_sysconf_impl(PyModuleDef *module, int name)
+/*[clinic end generated code: output=ed567306f58d69c4 input=279e3430a33f29e4]*/
+{
+ long value;
+
+ errno = 0;
+ value = sysconf(name);
+ if (value == -1 && errno != 0)
+ posix_error();
+ return value;
}
-#endif
+#endif /* HAVE_SYSCONF */
/* This code is used to ensure that the tables of configuration value names
@@ -10404,13 +10504,18 @@ setup_confname_tables(PyObject *module)
}
-PyDoc_STRVAR(posix_abort__doc__,
-"abort() -> does not return!\n\n\
-Abort the interpreter immediately. This 'dumps core' or otherwise fails\n\
-in the hardest way possible on the hosting operating system.");
+/*[clinic input]
+os.abort
+
+Abort the interpreter immediately.
+
+This function 'dumps core' or otherwise fails in the hardest way possible
+on the hosting operating system. This function never returns.
+[clinic start generated code]*/
static PyObject *
-posix_abort(PyObject *self, PyObject *noargs)
+os_abort_impl(PyModuleDef *module)
+/*[clinic end generated code: output=486bb96647c299b3 input=cf2c7d98bc504047]*/
{
abort();
/*NOTREACHED*/
@@ -10419,9 +10524,11 @@ posix_abort(PyObject *self, PyObject *noargs)
}
#ifdef MS_WINDOWS
+/* AC 3.5: change to path_t? but that might change exceptions */
PyDoc_STRVAR(win32_startfile__doc__,
-"startfile(filepath [, operation]) - Start a file with its associated\n\
-application.\n\
+"startfile(filepath [, operation])\n\
+\n\
+Start a file with its associated application.\n\
\n\
When \"operation\" is not specified or \"open\", this acts like\n\
double-clicking the file in Explorer, or giving the file name as an\n\
@@ -10438,6 +10545,37 @@ The filepath is relative to the current directory. If you want to use\n\
an absolute path, make sure the first character is not a slash (\"/\");\n\
the underlying Win32 ShellExecute function doesn't work if it is.");
+/* Grab ShellExecute dynamically from shell32 */
+static int has_ShellExecute = -1;
+static HINSTANCE (CALLBACK *Py_ShellExecuteA)(HWND, LPCSTR, LPCSTR, LPCSTR,
+ LPCSTR, INT);
+static HINSTANCE (CALLBACK *Py_ShellExecuteW)(HWND, LPCWSTR, LPCWSTR, LPCWSTR,
+ LPCWSTR, INT);
+static int
+check_ShellExecute()
+{
+ HINSTANCE hShell32;
+
+ /* only recheck */
+ if (-1 == has_ShellExecute) {
+ Py_BEGIN_ALLOW_THREADS
+ hShell32 = LoadLibraryW(L"SHELL32");
+ Py_END_ALLOW_THREADS
+ if (hShell32) {
+ *(FARPROC*)&Py_ShellExecuteA = GetProcAddress(hShell32,
+ "ShellExecuteA");
+ *(FARPROC*)&Py_ShellExecuteW = GetProcAddress(hShell32,
+ "ShellExecuteW");
+ has_ShellExecute = Py_ShellExecuteA &&
+ Py_ShellExecuteW;
+ } else {
+ has_ShellExecute = 0;
+ }
+ }
+ return has_ShellExecute;
+}
+
+
static PyObject *
win32_startfile(PyObject *self, PyObject *args)
{
@@ -10448,6 +10586,14 @@ win32_startfile(PyObject *self, PyObject *args)
HINSTANCE rc;
PyObject *unipath, *uoperation = NULL;
+
+ if(!check_ShellExecute()) {
+ /* If the OS doesn't have ShellExecute, return a
+ NotImplementedError. */
+ return PyErr_Format(PyExc_NotImplementedError,
+ "startfile not available on this platform");
+ }
+
if (!PyArg_ParseTuple(args, "U|s:startfile",
&unipath, &operation)) {
PyErr_Clear();
@@ -10476,8 +10622,8 @@ win32_startfile(PyObject *self, PyObject *args)
woperation = NULL;
Py_BEGIN_ALLOW_THREADS
- rc = ShellExecuteW((HWND)0, woperation, wpath,
- NULL, NULL, SW_SHOWNORMAL);
+ rc = Py_ShellExecuteW((HWND)0, woperation, wpath,
+ NULL, NULL, SW_SHOWNORMAL);
Py_END_ALLOW_THREADS
Py_XDECREF(uoperation);
@@ -10499,8 +10645,8 @@ normal:
}
filepath = PyBytes_AsString(ofilepath);
Py_BEGIN_ALLOW_THREADS
- rc = ShellExecute((HWND)0, operation, filepath,
- NULL, NULL, SW_SHOWNORMAL);
+ rc = Py_ShellExecuteA((HWND)0, operation, filepath,
+ NULL, NULL, SW_SHOWNORMAL);
Py_END_ALLOW_THREADS
if (rc <= (HINSTANCE)32) {
PyObject *errval = win32_error("startfile", filepath);
@@ -10511,17 +10657,23 @@ normal:
Py_INCREF(Py_None);
return Py_None;
}
-#endif
+#endif /* MS_WINDOWS */
+
#ifdef HAVE_GETLOADAVG
-PyDoc_STRVAR(posix_getloadavg__doc__,
-"getloadavg() -> (float, float, float)\n\n\
-Return the number of processes in the system run queue averaged over\n\
-the last 1, 5, and 15 minutes or raises OSError if the load average\n\
-was unobtainable");
+/*[clinic input]
+os.getloadavg
+
+Return average recent system load information.
+
+Return the number of processes in the system run queue averaged over
+the last 1, 5, and 15 minutes as a tuple of three floats.
+Raises OSError if the load average was unobtainable.
+[clinic start generated code]*/
static PyObject *
-posix_getloadavg(PyObject *self, PyObject *noargs)
+os_getloadavg_impl(PyModuleDef *module)
+/*[clinic end generated code: output=2b64c5b675d74c14 input=3d6d826b76d8a34e]*/
{
double loadavg[3];
if (getloadavg(loadavg, 3)!=3) {
@@ -10530,72 +10682,83 @@ posix_getloadavg(PyObject *self, PyObject *noargs)
} else
return Py_BuildValue("ddd", loadavg[0], loadavg[1], loadavg[2]);
}
-#endif
+#endif /* HAVE_GETLOADAVG */
-PyDoc_STRVAR(device_encoding__doc__,
-"device_encoding(fd) -> str\n\n\
-Return a string describing the encoding of the device\n\
-if the output is a terminal; else return None.");
-static PyObject *
-device_encoding(PyObject *self, PyObject *args)
-{
- int fd;
+/*[clinic input]
+os.device_encoding
+ fd: int
- if (!PyArg_ParseTuple(args, "i:device_encoding", &fd))
- return NULL;
+Return a string describing the encoding of a terminal's file descriptor.
+The file descriptor must be attached to a terminal.
+If the device is not a terminal, return None.
+[clinic start generated code]*/
+
+static PyObject *
+os_device_encoding_impl(PyModuleDef *module, int fd)
+/*[clinic end generated code: output=34f14e33468419c1 input=9e1d4a42b66df312]*/
+{
return _Py_device_encoding(fd);
}
+
#ifdef HAVE_SETRESUID
-PyDoc_STRVAR(posix_setresuid__doc__,
-"setresuid(ruid, euid, suid)\n\n\
-Set the current process's real, effective, and saved user ids.");
+/*[clinic input]
+os.setresuid
-static PyObject*
-posix_setresuid (PyObject *self, PyObject *args)
+ ruid: uid_t
+ euid: uid_t
+ suid: uid_t
+ /
+
+Set the current process's real, effective, and saved user ids.
+[clinic start generated code]*/
+
+static PyObject *
+os_setresuid_impl(PyModuleDef *module, uid_t ruid, uid_t euid, uid_t suid)
+/*[clinic end generated code: output=92cc330812c6ed0f input=9e33cb79a82792f3]*/
{
- /* We assume uid_t is no larger than a long. */
- uid_t ruid, euid, suid;
- if (!PyArg_ParseTuple(args, "O&O&O&:setresuid",
- _Py_Uid_Converter, &ruid,
- _Py_Uid_Converter, &euid,
- _Py_Uid_Converter, &suid))
- return NULL;
if (setresuid(ruid, euid, suid) < 0)
return posix_error();
Py_RETURN_NONE;
}
-#endif
+#endif /* HAVE_SETRESUID */
+
#ifdef HAVE_SETRESGID
-PyDoc_STRVAR(posix_setresgid__doc__,
-"setresgid(rgid, egid, sgid)\n\n\
-Set the current process's real, effective, and saved group ids.");
+/*[clinic input]
+os.setresgid
-static PyObject*
-posix_setresgid (PyObject *self, PyObject *args)
+ rgid: gid_t
+ egid: gid_t
+ sgid: gid_t
+ /
+
+Set the current process's real, effective, and saved group ids.
+[clinic start generated code]*/
+
+static PyObject *
+os_setresgid_impl(PyModuleDef *module, gid_t rgid, gid_t egid, gid_t sgid)
+/*[clinic end generated code: output=e91dc4842a604429 input=33e9e0785ef426b1]*/
{
- gid_t rgid, egid, sgid;
- if (!PyArg_ParseTuple(args, "O&O&O&:setresgid",
- _Py_Gid_Converter, &rgid,
- _Py_Gid_Converter, &egid,
- _Py_Gid_Converter, &sgid))
- return NULL;
if (setresgid(rgid, egid, sgid) < 0)
return posix_error();
Py_RETURN_NONE;
}
-#endif
+#endif /* HAVE_SETRESGID */
+
#ifdef HAVE_GETRESUID
-PyDoc_STRVAR(posix_getresuid__doc__,
-"getresuid() -> (ruid, euid, suid)\n\n\
-Get tuple of the current process's real, effective, and saved user ids.");
+/*[clinic input]
+os.getresuid
-static PyObject*
-posix_getresuid (PyObject *self, PyObject *noargs)
+Return a tuple of the current process's real, effective, and saved user ids.
+[clinic start generated code]*/
+
+static PyObject *
+os_getresuid_impl(PyModuleDef *module)
+/*[clinic end generated code: output=9ddef62faae8e477 input=41ccfa8e1f6517ad]*/
{
uid_t ruid, euid, suid;
if (getresuid(&ruid, &euid, &suid) < 0)
@@ -10604,90 +10767,88 @@ posix_getresuid (PyObject *self, PyObject *noargs)
_PyLong_FromUid(euid),
_PyLong_FromUid(suid));
}
-#endif
+#endif /* HAVE_GETRESUID */
+
#ifdef HAVE_GETRESGID
-PyDoc_STRVAR(posix_getresgid__doc__,
-"getresgid() -> (rgid, egid, sgid)\n\n\
-Get tuple of the current process's real, effective, and saved group ids.");
+/*[clinic input]
+os.getresgid
-static PyObject*
-posix_getresgid (PyObject *self, PyObject *noargs)
+Return a tuple of the current process's real, effective, and saved group ids.
+[clinic start generated code]*/
+
+static PyObject *
+os_getresgid_impl(PyModuleDef *module)
+/*[clinic end generated code: output=e1a553cbcf16234c input=517e68db9ca32df6]*/
{
- uid_t rgid, egid, sgid;
+ gid_t rgid, egid, sgid;
if (getresgid(&rgid, &egid, &sgid) < 0)
return posix_error();
return Py_BuildValue("(NNN)", _PyLong_FromGid(rgid),
_PyLong_FromGid(egid),
_PyLong_FromGid(sgid));
}
-#endif
+#endif /* HAVE_GETRESGID */
+
#ifdef USE_XATTRS
+/*[clinic input]
+os.getxattr
-PyDoc_STRVAR(posix_getxattr__doc__,
-"getxattr(path, attribute, *, follow_symlinks=True) -> value\n\n\
-Return the value of extended attribute attribute on path.\n\
-\n\
-path may be either a string or an open file descriptor.\n\
-If follow_symlinks is False, and the last element of the path is a symbolic\n\
- link, getxattr will examine the symbolic link itself instead of the file\n\
- the link points to.");
+ path: path_t(allow_fd=True)
+ attribute: path_t
+ *
+ follow_symlinks: bool = True
+
+Return the value of extended attribute attribute on path.
+
+path may be either a string or an open file descriptor.
+If follow_symlinks is False, and the last element of the path is a symbolic
+ link, getxattr will examine the symbolic link itself instead of the file
+ the link points to.
+
+[clinic start generated code]*/
static PyObject *
-posix_getxattr(PyObject *self, PyObject *args, PyObject *kwargs)
+os_getxattr_impl(PyModuleDef *module, path_t *path, path_t *attribute,
+ int follow_symlinks)
+/*[clinic end generated code: output=cf2cede74bd5d412 input=8c8ea3bab78d89c2]*/
{
- path_t path;
- path_t attribute;
- int follow_symlinks = 1;
+ Py_ssize_t i;
PyObject *buffer = NULL;
- int i;
- static char *keywords[] = {"path", "attribute", "follow_symlinks", NULL};
- memset(&path, 0, sizeof(path));
- memset(&attribute, 0, sizeof(attribute));
- path.function_name = "getxattr";
- attribute.function_name = "getxattr";
- path.allow_fd = 1;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&|$p:getxattr", keywords,
- path_converter, &path,
- path_converter, &attribute,
- &follow_symlinks))
+ if (fd_and_follow_symlinks_invalid("getxattr", path->fd, follow_symlinks))
return NULL;
- if (fd_and_follow_symlinks_invalid("getxattr", path.fd, follow_symlinks))
- goto exit;
-
for (i = 0; ; i++) {
void *ptr;
ssize_t result;
static Py_ssize_t buffer_sizes[] = {128, XATTR_SIZE_MAX, 0};
Py_ssize_t buffer_size = buffer_sizes[i];
if (!buffer_size) {
- path_error(&path);
- goto exit;
+ path_error(path);
+ return NULL;
}
buffer = PyBytes_FromStringAndSize(NULL, buffer_size);
if (!buffer)
- goto exit;
+ return NULL;
ptr = PyBytes_AS_STRING(buffer);
Py_BEGIN_ALLOW_THREADS;
- if (path.fd >= 0)
- result = fgetxattr(path.fd, attribute.narrow, ptr, buffer_size);
+ if (path->fd >= 0)
+ result = fgetxattr(path->fd, attribute->narrow, ptr, buffer_size);
else if (follow_symlinks)
- result = getxattr(path.narrow, attribute.narrow, ptr, buffer_size);
+ result = getxattr(path->narrow, attribute->narrow, ptr, buffer_size);
else
- result = lgetxattr(path.narrow, attribute.narrow, ptr, buffer_size);
+ result = lgetxattr(path->narrow, attribute->narrow, ptr, buffer_size);
Py_END_ALLOW_THREADS;
if (result < 0) {
Py_DECREF(buffer);
- buffer = NULL;
if (errno == ERANGE)
continue;
- path_error(&path);
- goto exit;
+ path_error(path);
+ return NULL;
}
if (result != buffer_size) {
@@ -10697,168 +10858,134 @@ posix_getxattr(PyObject *self, PyObject *args, PyObject *kwargs)
break;
}
-exit:
- path_cleanup(&path);
- path_cleanup(&attribute);
return buffer;
}
-PyDoc_STRVAR(posix_setxattr__doc__,
-"setxattr(path, attribute, value, flags=0, *, follow_symlinks=True)\n\n\
-Set extended attribute attribute on path to value.\n\
-path may be either a string or an open file descriptor.\n\
-If follow_symlinks is False, and the last element of the path is a symbolic\n\
- link, setxattr will modify the symbolic link itself instead of the file\n\
- the link points to.");
+
+/*[clinic input]
+os.setxattr
+
+ path: path_t(allow_fd=True)
+ attribute: path_t
+ value: Py_buffer
+ flags: int = 0
+ *
+ follow_symlinks: bool = True
+
+Set extended attribute attribute on path to value.
+
+path may be either a string or an open file descriptor.
+If follow_symlinks is False, and the last element of the path is a symbolic
+ link, setxattr will modify the symbolic link itself instead of the file
+ the link points to.
+
+[clinic start generated code]*/
static PyObject *
-posix_setxattr(PyObject *self, PyObject *args, PyObject *kwargs)
+os_setxattr_impl(PyModuleDef *module, path_t *path, path_t *attribute,
+ Py_buffer *value, int flags, int follow_symlinks)
+/*[clinic end generated code: output=1b395ef82880fea0 input=f0d26833992015c2]*/
{
- path_t path;
- path_t attribute;
- Py_buffer value;
- int flags = 0;
- int follow_symlinks = 1;
- int result;
- PyObject *return_value = NULL;
- static char *keywords[] = {"path", "attribute", "value",
- "flags", "follow_symlinks", NULL};
+ ssize_t result;
- memset(&path, 0, sizeof(path));
- path.function_name = "setxattr";
- path.allow_fd = 1;
- memset(&attribute, 0, sizeof(attribute));
- memset(&value, 0, sizeof(value));
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&y*|i$p:setxattr",
- keywords,
- path_converter, &path,
- path_converter, &attribute,
- &value, &flags,
- &follow_symlinks))
+ if (fd_and_follow_symlinks_invalid("setxattr", path->fd, follow_symlinks))
return NULL;
- if (fd_and_follow_symlinks_invalid("setxattr", path.fd, follow_symlinks))
- goto exit;
-
Py_BEGIN_ALLOW_THREADS;
- if (path.fd > -1)
- result = fsetxattr(path.fd, attribute.narrow,
- value.buf, value.len, flags);
+ if (path->fd > -1)
+ result = fsetxattr(path->fd, attribute->narrow,
+ value->buf, value->len, flags);
else if (follow_symlinks)
- result = setxattr(path.narrow, attribute.narrow,
- value.buf, value.len, flags);
+ result = setxattr(path->narrow, attribute->narrow,
+ value->buf, value->len, flags);
else
- result = lsetxattr(path.narrow, attribute.narrow,
- value.buf, value.len, flags);
+ result = lsetxattr(path->narrow, attribute->narrow,
+ value->buf, value->len, flags);
Py_END_ALLOW_THREADS;
if (result) {
- return_value = path_error(&path);
- goto exit;
+ path_error(path);
+ return NULL;
}
- return_value = Py_None;
- Py_INCREF(return_value);
+ Py_RETURN_NONE;
+}
-exit:
- path_cleanup(&path);
- path_cleanup(&attribute);
- PyBuffer_Release(&value);
- return return_value;
-}
+/*[clinic input]
+os.removexattr
+
+ path: path_t(allow_fd=True)
+ attribute: path_t
+ *
+ follow_symlinks: bool = True
-PyDoc_STRVAR(posix_removexattr__doc__,
-"removexattr(path, attribute, *, follow_symlinks=True)\n\n\
-Remove extended attribute attribute on path.\n\
-path may be either a string or an open file descriptor.\n\
-If follow_symlinks is False, and the last element of the path is a symbolic\n\
- link, removexattr will modify the symbolic link itself instead of the file\n\
- the link points to.");
+Remove extended attribute attribute on path.
+
+path may be either a string or an open file descriptor.
+If follow_symlinks is False, and the last element of the path is a symbolic
+ link, removexattr will modify the symbolic link itself instead of the file
+ the link points to.
+
+[clinic start generated code]*/
static PyObject *
-posix_removexattr(PyObject *self, PyObject *args, PyObject *kwargs)
+os_removexattr_impl(PyModuleDef *module, path_t *path, path_t *attribute,
+ int follow_symlinks)
+/*[clinic end generated code: output=f92bb39ab992650d input=cdb54834161e3329]*/
{
- path_t path;
- path_t attribute;
- int follow_symlinks = 1;
- int result;
- PyObject *return_value = NULL;
- static char *keywords[] = {"path", "attribute", "follow_symlinks", NULL};
+ ssize_t result;
- memset(&path, 0, sizeof(path));
- path.function_name = "removexattr";
- memset(&attribute, 0, sizeof(attribute));
- attribute.function_name = "removexattr";
- path.allow_fd = 1;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&O&|$p:removexattr",
- keywords,
- path_converter, &path,
- path_converter, &attribute,
- &follow_symlinks))
+ if (fd_and_follow_symlinks_invalid("removexattr", path->fd, follow_symlinks))
return NULL;
- if (fd_and_follow_symlinks_invalid("removexattr", path.fd, follow_symlinks))
- goto exit;
-
Py_BEGIN_ALLOW_THREADS;
- if (path.fd > -1)
- result = fremovexattr(path.fd, attribute.narrow);
+ if (path->fd > -1)
+ result = fremovexattr(path->fd, attribute->narrow);
else if (follow_symlinks)
- result = removexattr(path.narrow, attribute.narrow);
+ result = removexattr(path->narrow, attribute->narrow);
else
- result = lremovexattr(path.narrow, attribute.narrow);
+ result = lremovexattr(path->narrow, attribute->narrow);
Py_END_ALLOW_THREADS;
if (result) {
- return_value = path_error(&path);
- goto exit;
+ return path_error(path);
}
- return_value = Py_None;
- Py_INCREF(return_value);
+ Py_RETURN_NONE;
+}
-exit:
- path_cleanup(&path);
- path_cleanup(&attribute);
- return return_value;
-}
+/*[clinic input]
+os.listxattr
-PyDoc_STRVAR(posix_listxattr__doc__,
-"listxattr(path='.', *, follow_symlinks=True)\n\n\
-Return a list of extended attributes on path.\n\
-\n\
-path may be either None, a string, or an open file descriptor.\n\
-if path is None, listxattr will examine the current directory.\n\
-If follow_symlinks is False, and the last element of the path is a symbolic\n\
- link, listxattr will examine the symbolic link itself instead of the file\n\
- the link points to.");
+ path: path_t(allow_fd=True, nullable=True) = None
+ *
+ follow_symlinks: bool = True
+
+Return a list of extended attributes on path.
+
+path may be either None, a string, or an open file descriptor.
+if path is None, listxattr will examine the current directory.
+If follow_symlinks is False, and the last element of the path is a symbolic
+ link, listxattr will examine the symbolic link itself instead of the file
+ the link points to.
+[clinic start generated code]*/
static PyObject *
-posix_listxattr(PyObject *self, PyObject *args, PyObject *kwargs)
+os_listxattr_impl(PyModuleDef *module, path_t *path, int follow_symlinks)
+/*[clinic end generated code: output=a87ad6ce56e42a4f input=08cca53ac0b07c13]*/
{
- path_t path;
- int follow_symlinks = 1;
Py_ssize_t i;
PyObject *result = NULL;
+ const char *name;
char *buffer = NULL;
- char *name;
- static char *keywords[] = {"path", "follow_symlinks", NULL};
- memset(&path, 0, sizeof(path));
- path.function_name = "listxattr";
- path.allow_fd = 1;
- path.fd = -1;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O&$p:listxattr", keywords,
- path_converter, &path,
- &follow_symlinks))
- return NULL;
-
- if (fd_and_follow_symlinks_invalid("listxattr", path.fd, follow_symlinks))
+ if (fd_and_follow_symlinks_invalid("listxattr", path->fd, follow_symlinks))
goto exit;
- name = path.narrow ? path.narrow : ".";
+ name = path->narrow ? path->narrow : ".";
+
for (i = 0; ; i++) {
char *start, *trace, *end;
ssize_t length;
@@ -10866,7 +10993,7 @@ posix_listxattr(PyObject *self, PyObject *args, PyObject *kwargs)
Py_ssize_t buffer_size = buffer_sizes[i];
if (!buffer_size) {
/* ERANGE */
- path_error(&path);
+ path_error(path);
break;
}
buffer = PyMem_MALLOC(buffer_size);
@@ -10876,8 +11003,8 @@ posix_listxattr(PyObject *self, PyObject *args, PyObject *kwargs)
}
Py_BEGIN_ALLOW_THREADS;
- if (path.fd > -1)
- length = flistxattr(path.fd, buffer, buffer_size);
+ if (path->fd > -1)
+ length = flistxattr(path->fd, buffer, buffer_size);
else if (follow_symlinks)
length = listxattr(name, buffer, buffer_size);
else
@@ -10890,7 +11017,7 @@ posix_listxattr(PyObject *self, PyObject *args, PyObject *kwargs)
buffer = NULL;
continue;
}
- path_error(&path);
+ path_error(path);
break;
}
@@ -10923,43 +11050,43 @@ posix_listxattr(PyObject *self, PyObject *args, PyObject *kwargs)
break;
}
exit:
- path_cleanup(&path);
if (buffer)
PyMem_FREE(buffer);
return result;
}
-
#endif /* USE_XATTRS */
-PyDoc_STRVAR(posix_urandom__doc__,
-"urandom(n) -> str\n\n\
-Return n random bytes suitable for cryptographic use.");
+/*[clinic input]
+os.urandom
+
+ size: Py_ssize_t
+ /
+
+Return a bytes object containing random bytes suitable for cryptographic use.
+[clinic start generated code]*/
static PyObject *
-posix_urandom(PyObject *self, PyObject *args)
+os_urandom_impl(PyModuleDef *module, Py_ssize_t size)
+/*[clinic end generated code: output=e0011f021501f03b input=4067cdb1b6776c29]*/
{
- Py_ssize_t size;
- PyObject *result;
- int ret;
+ PyObject *bytes;
+ int result;
- /* Read arguments */
- if (!PyArg_ParseTuple(args, "n:urandom", &size))
- return NULL;
if (size < 0)
return PyErr_Format(PyExc_ValueError,
"negative argument not allowed");
- result = PyBytes_FromStringAndSize(NULL, size);
- if (result == NULL)
+ bytes = PyBytes_FromStringAndSize(NULL, size);
+ if (bytes == NULL)
return NULL;
- ret = _PyOS_URandom(PyBytes_AS_STRING(result),
- PyBytes_GET_SIZE(result));
- if (ret == -1) {
- Py_DECREF(result);
+ result = _PyOS_URandom(PyBytes_AS_STRING(bytes),
+ PyBytes_GET_SIZE(bytes));
+ if (result == -1) {
+ Py_DECREF(bytes);
return NULL;
}
- return result;
+ return bytes;
}
/* Terminal size querying */
@@ -10983,6 +11110,7 @@ static PyStructSequence_Desc TerminalSize_desc = {
};
#if defined(TERMSIZE_USE_CONIO) || defined(TERMSIZE_USE_IOCTL)
+/* AC 3.5: fd should accept None */
PyDoc_STRVAR(termsize__doc__,
"Return the size of the terminal window as (columns, lines).\n" \
"\n" \
@@ -11068,13 +11196,16 @@ get_terminal_size(PyObject *self, PyObject *args)
}
#endif /* defined(TERMSIZE_USE_CONIO) || defined(TERMSIZE_USE_IOCTL) */
-PyDoc_STRVAR(posix_cpu_count__doc__,
-"cpu_count() -> integer\n\n\
-Return the number of CPUs in the system, or None if this value cannot be\n\
-established.");
+
+/*[clinic input]
+os.cpu_count
+
+Return the number of CPUs in the system; return None if indeterminable.
+[clinic start generated code]*/
static PyObject *
-posix_cpu_count(PyObject *self)
+os_cpu_count_impl(PyModuleDef *module)
+/*[clinic end generated code: output=c59ee7f6bce832b8 input=d55e2f8f3823a628]*/
{
int ncpu = 0;
#ifdef MS_WINDOWS
@@ -11103,111 +11234,950 @@ posix_cpu_count(PyObject *self)
Py_RETURN_NONE;
}
-PyDoc_STRVAR(get_inheritable__doc__,
- "get_inheritable(fd) -> bool\n" \
+
+/*[clinic input]
+os.get_inheritable -> bool
+
+ fd: int
+ /
+
+Get the close-on-exe flag of the specified file descriptor.
+[clinic start generated code]*/
+
+static int
+os_get_inheritable_impl(PyModuleDef *module, int fd)
+/*[clinic end generated code: output=36110bb36efaa21e input=89ac008dc9ab6b95]*/
+{
+ int return_value;
+ if (!_PyVerify_fd(fd)) {
+ posix_error();
+ return -1;
+ }
+
+ _Py_BEGIN_SUPPRESS_IPH
+ return_value = _Py_get_inheritable(fd);
+ _Py_END_SUPPRESS_IPH
+ return return_value;
+}
+
+
+/*[clinic input]
+os.set_inheritable
+ fd: int
+ inheritable: int
+ /
+
+Set the inheritable flag of the specified file descriptor.
+[clinic start generated code]*/
+
+static PyObject *
+os_set_inheritable_impl(PyModuleDef *module, int fd, int inheritable)
+/*[clinic end generated code: output=2ac5c6ce8623f045 input=9ceaead87a1e2402]*/
+{
+ int result;
+ if (!_PyVerify_fd(fd))
+ return posix_error();
+
+ _Py_BEGIN_SUPPRESS_IPH
+ result = _Py_set_inheritable(fd, inheritable, NULL);
+ _Py_END_SUPPRESS_IPH
+ if (result < 0)
+ return NULL;
+ Py_RETURN_NONE;
+}
+
+
+#ifdef MS_WINDOWS
+/*[clinic input]
+os.get_handle_inheritable -> bool
+ handle: Py_intptr_t
+ /
+
+Get the close-on-exe flag of the specified file descriptor.
+[clinic start generated code]*/
+
+static int
+os_get_handle_inheritable_impl(PyModuleDef *module, Py_intptr_t handle)
+/*[clinic end generated code: output=3b7b3e1b43f312b6 input=5f7759443aae3dc5]*/
+{
+ DWORD flags;
+
+ if (!GetHandleInformation((HANDLE)handle, &flags)) {
+ PyErr_SetFromWindowsErr(0);
+ return -1;
+ }
+
+ return flags & HANDLE_FLAG_INHERIT;
+}
+
+
+/*[clinic input]
+os.set_handle_inheritable
+ handle: Py_intptr_t
+ inheritable: bool
+ /
+
+Set the inheritable flag of the specified handle.
+[clinic start generated code]*/
+
+static PyObject *
+os_set_handle_inheritable_impl(PyModuleDef *module, Py_intptr_t handle,
+ int inheritable)
+/*[clinic end generated code: output=d2e111a96c9eb296 input=e64b2b2730469def]*/
+{
+ DWORD flags = inheritable ? HANDLE_FLAG_INHERIT : 0;
+ if (!SetHandleInformation((HANDLE)handle, HANDLE_FLAG_INHERIT, flags)) {
+ PyErr_SetFromWindowsErr(0);
+ return NULL;
+ }
+ Py_RETURN_NONE;
+}
+#endif /* MS_WINDOWS */
+
+#ifndef MS_WINDOWS
+PyDoc_STRVAR(get_blocking__doc__,
+ "get_blocking(fd) -> bool\n" \
"\n" \
- "Get the close-on-exe flag of the specified file descriptor.");
+ "Get the blocking mode of the file descriptor:\n" \
+ "False if the O_NONBLOCK flag is set, True if the flag is cleared.");
static PyObject*
-posix_get_inheritable(PyObject *self, PyObject *args)
+posix_get_blocking(PyObject *self, PyObject *args)
{
int fd;
- int inheritable;
+ int blocking;
- if (!PyArg_ParseTuple(args, "i:get_inheritable", &fd))
+ if (!PyArg_ParseTuple(args, "i:get_blocking", &fd))
return NULL;
if (!_PyVerify_fd(fd))
return posix_error();
- inheritable = _Py_get_inheritable(fd);
- if (inheritable < 0)
+ _Py_BEGIN_SUPPRESS_IPH
+ blocking = _Py_get_blocking(fd);
+ _Py_END_SUPPRESS_IPH
+ if (blocking < 0)
return NULL;
- return PyBool_FromLong(inheritable);
+ return PyBool_FromLong(blocking);
}
-PyDoc_STRVAR(set_inheritable__doc__,
- "set_inheritable(fd, inheritable)\n" \
+PyDoc_STRVAR(set_blocking__doc__,
+ "set_blocking(fd, blocking)\n" \
"\n" \
- "Set the inheritable flag of the specified file descriptor.");
+ "Set the blocking mode of the specified file descriptor.\n" \
+ "Set the O_NONBLOCK flag if blocking is False,\n" \
+ "clear the O_NONBLOCK flag otherwise.");
static PyObject*
-posix_set_inheritable(PyObject *self, PyObject *args)
+posix_set_blocking(PyObject *self, PyObject *args)
{
- int fd, inheritable;
+ int fd, blocking, result;
- if (!PyArg_ParseTuple(args, "ii:set_inheritable", &fd, &inheritable))
+ if (!PyArg_ParseTuple(args, "ii:set_blocking", &fd, &blocking))
return NULL;
if (!_PyVerify_fd(fd))
return posix_error();
- if (_Py_set_inheritable(fd, inheritable, NULL) < 0)
+ _Py_BEGIN_SUPPRESS_IPH
+ result = _Py_set_blocking(fd, blocking);
+ _Py_END_SUPPRESS_IPH
+ if (result < 0)
return NULL;
Py_RETURN_NONE;
}
+#endif /* !MS_WINDOWS */
+
+
+PyDoc_STRVAR(posix_scandir__doc__,
+"scandir(path='.') -> iterator of DirEntry objects for given path");
+static char *follow_symlinks_keywords[] = {"follow_symlinks", NULL};
+typedef struct {
+ PyObject_HEAD
+ PyObject *name;
+ PyObject *path;
+ PyObject *stat;
+ PyObject *lstat;
#ifdef MS_WINDOWS
-PyDoc_STRVAR(get_handle_inheritable__doc__,
- "get_handle_inheritable(fd) -> bool\n" \
- "\n" \
- "Get the close-on-exe flag of the specified file descriptor.");
+ struct _Py_stat_struct win32_lstat;
+ __int64 win32_file_index;
+ int got_file_index;
+#else /* POSIX */
+#ifdef HAVE_DIRENT_D_TYPE
+ unsigned char d_type;
+#endif
+ ino_t d_ino;
+#endif
+} DirEntry;
-static PyObject*
-posix_get_handle_inheritable(PyObject *self, PyObject *args)
+static void
+DirEntry_dealloc(DirEntry *entry)
{
- Py_intptr_t handle;
- DWORD flags;
+ Py_XDECREF(entry->name);
+ Py_XDECREF(entry->path);
+ Py_XDECREF(entry->stat);
+ Py_XDECREF(entry->lstat);
+ Py_TYPE(entry)->tp_free((PyObject *)entry);
+}
+
+/* Forward reference */
+static int
+DirEntry_test_mode(DirEntry *self, int follow_symlinks, unsigned short mode_bits);
- if (!PyArg_ParseTuple(args, _Py_PARSE_INTPTR ":get_handle_inheritable", &handle))
+/* Set exception and return -1 on error, 0 for False, 1 for True */
+static int
+DirEntry_is_symlink(DirEntry *self)
+{
+#ifdef MS_WINDOWS
+ return (self->win32_lstat.st_mode & S_IFMT) == S_IFLNK;
+#elif defined(HAVE_DIRENT_D_TYPE)
+ /* POSIX */
+ if (self->d_type != DT_UNKNOWN)
+ return self->d_type == DT_LNK;
+ else
+ return DirEntry_test_mode(self, 0, S_IFLNK);
+#else
+ /* POSIX without d_type */
+ return DirEntry_test_mode(self, 0, S_IFLNK);
+#endif
+}
+
+static PyObject *
+DirEntry_py_is_symlink(DirEntry *self)
+{
+ int result;
+
+ result = DirEntry_is_symlink(self);
+ if (result == -1)
return NULL;
+ return PyBool_FromLong(result);
+}
- if (!GetHandleInformation((HANDLE)handle, &flags)) {
- PyErr_SetFromWindowsErr(0);
+static PyObject *
+DirEntry_fetch_stat(DirEntry *self, int follow_symlinks)
+{
+ int result;
+ struct _Py_stat_struct st;
+
+#ifdef MS_WINDOWS
+ wchar_t *path;
+
+ path = PyUnicode_AsUnicode(self->path);
+ if (!path)
return NULL;
+
+ if (follow_symlinks)
+ result = win32_stat_w(path, &st);
+ else
+ result = win32_lstat_w(path, &st);
+
+ if (result != 0) {
+ return PyErr_SetExcFromWindowsErrWithFilenameObject(PyExc_OSError,
+ 0, self->path);
}
+#else /* POSIX */
+ PyObject *bytes;
+ char *path;
- return PyBool_FromLong(flags & HANDLE_FLAG_INHERIT);
+ if (!PyUnicode_FSConverter(self->path, &bytes))
+ return NULL;
+ path = PyBytes_AS_STRING(bytes);
+
+ if (follow_symlinks)
+ result = STAT(path, &st);
+ else
+ result = LSTAT(path, &st);
+ Py_DECREF(bytes);
+
+ if (result != 0)
+ return PyErr_SetFromErrnoWithFilenameObject(PyExc_OSError, self->path);
+#endif
+
+ return _pystat_fromstructstat(&st);
}
-PyDoc_STRVAR(set_handle_inheritable__doc__,
- "set_handle_inheritable(fd, inheritable)\n" \
- "\n" \
- "Set the inheritable flag of the specified handle.");
+static PyObject *
+DirEntry_get_lstat(DirEntry *self)
+{
+ if (!self->lstat) {
+#ifdef MS_WINDOWS
+ self->lstat = _pystat_fromstructstat(&self->win32_lstat);
+#else /* POSIX */
+ self->lstat = DirEntry_fetch_stat(self, 0);
+#endif
+ }
+ Py_XINCREF(self->lstat);
+ return self->lstat;
+}
-static PyObject*
-posix_set_handle_inheritable(PyObject *self, PyObject *args)
+static PyObject *
+DirEntry_get_stat(DirEntry *self, int follow_symlinks)
{
- int inheritable = 1;
- Py_intptr_t handle;
- DWORD flags;
+ if (!follow_symlinks)
+ return DirEntry_get_lstat(self);
- if (!PyArg_ParseTuple(args, _Py_PARSE_INTPTR "i:set_handle_inheritable",
- &handle, &inheritable))
+ if (!self->stat) {
+ int result = DirEntry_is_symlink(self);
+ if (result == -1)
+ return NULL;
+ else if (result)
+ self->stat = DirEntry_fetch_stat(self, 1);
+ else
+ self->stat = DirEntry_get_lstat(self);
+ }
+
+ Py_XINCREF(self->stat);
+ return self->stat;
+}
+
+static PyObject *
+DirEntry_stat(DirEntry *self, PyObject *args, PyObject *kwargs)
+{
+ int follow_symlinks = 1;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|$p:DirEntry.stat",
+ follow_symlinks_keywords, &follow_symlinks))
return NULL;
- if (inheritable)
- flags = HANDLE_FLAG_INHERIT;
- else
- flags = 0;
- if (!SetHandleInformation((HANDLE)handle, HANDLE_FLAG_INHERIT, flags)) {
- PyErr_SetFromWindowsErr(0);
+ return DirEntry_get_stat(self, follow_symlinks);
+}
+
+/* Set exception and return -1 on error, 0 for False, 1 for True */
+static int
+DirEntry_test_mode(DirEntry *self, int follow_symlinks, unsigned short mode_bits)
+{
+ PyObject *stat = NULL;
+ PyObject *st_mode = NULL;
+ long mode;
+ int result;
+#if defined(MS_WINDOWS) || defined(HAVE_DIRENT_D_TYPE)
+ int is_symlink;
+ int need_stat;
+#endif
+#ifdef MS_WINDOWS
+ unsigned long dir_bits;
+#endif
+ _Py_IDENTIFIER(st_mode);
+
+#ifdef MS_WINDOWS
+ is_symlink = (self->win32_lstat.st_mode & S_IFMT) == S_IFLNK;
+ need_stat = follow_symlinks && is_symlink;
+#elif defined(HAVE_DIRENT_D_TYPE)
+ is_symlink = self->d_type == DT_LNK;
+ need_stat = self->d_type == DT_UNKNOWN || (follow_symlinks && is_symlink);
+#endif
+
+#if defined(MS_WINDOWS) || defined(HAVE_DIRENT_D_TYPE)
+ if (need_stat) {
+#endif
+ stat = DirEntry_get_stat(self, follow_symlinks);
+ if (!stat) {
+ if (PyErr_ExceptionMatches(PyExc_FileNotFoundError)) {
+ /* If file doesn't exist (anymore), then return False
+ (i.e., say it's not a file/directory) */
+ PyErr_Clear();
+ return 0;
+ }
+ goto error;
+ }
+ st_mode = _PyObject_GetAttrId(stat, &PyId_st_mode);
+ if (!st_mode)
+ goto error;
+
+ mode = PyLong_AsLong(st_mode);
+ if (mode == -1 && PyErr_Occurred())
+ goto error;
+ Py_CLEAR(st_mode);
+ Py_CLEAR(stat);
+ result = (mode & S_IFMT) == mode_bits;
+#if defined(MS_WINDOWS) || defined(HAVE_DIRENT_D_TYPE)
+ }
+ else if (is_symlink) {
+ assert(mode_bits != S_IFLNK);
+ result = 0;
+ }
+ else {
+ assert(mode_bits == S_IFDIR || mode_bits == S_IFREG);
+#ifdef MS_WINDOWS
+ dir_bits = self->win32_lstat.st_file_attributes & FILE_ATTRIBUTE_DIRECTORY;
+ if (mode_bits == S_IFDIR)
+ result = dir_bits != 0;
+ else
+ result = dir_bits == 0;
+#else /* POSIX */
+ if (mode_bits == S_IFDIR)
+ result = self->d_type == DT_DIR;
+ else
+ result = self->d_type == DT_REG;
+#endif
+ }
+#endif
+
+ return result;
+
+error:
+ Py_XDECREF(st_mode);
+ Py_XDECREF(stat);
+ return -1;
+}
+
+static PyObject *
+DirEntry_py_test_mode(DirEntry *self, int follow_symlinks, unsigned short mode_bits)
+{
+ int result;
+
+ result = DirEntry_test_mode(self, follow_symlinks, mode_bits);
+ if (result == -1)
+ return NULL;
+ return PyBool_FromLong(result);
+}
+
+static PyObject *
+DirEntry_is_dir(DirEntry *self, PyObject *args, PyObject *kwargs)
+{
+ int follow_symlinks = 1;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|$p:DirEntry.is_dir",
+ follow_symlinks_keywords, &follow_symlinks))
return NULL;
+
+ return DirEntry_py_test_mode(self, follow_symlinks, S_IFDIR);
+}
+
+static PyObject *
+DirEntry_is_file(DirEntry *self, PyObject *args, PyObject *kwargs)
+{
+ int follow_symlinks = 1;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|$p:DirEntry.is_file",
+ follow_symlinks_keywords, &follow_symlinks))
+ return NULL;
+
+ return DirEntry_py_test_mode(self, follow_symlinks, S_IFREG);
+}
+
+static PyObject *
+DirEntry_inode(DirEntry *self)
+{
+#ifdef MS_WINDOWS
+ if (!self->got_file_index) {
+ wchar_t *path;
+ struct _Py_stat_struct stat;
+
+ path = PyUnicode_AsUnicode(self->path);
+ if (!path)
+ return NULL;
+
+ if (win32_lstat_w(path, &stat) != 0) {
+ return PyErr_SetExcFromWindowsErrWithFilenameObject(PyExc_OSError,
+ 0, self->path);
+ }
+
+ self->win32_file_index = stat.st_ino;
+ self->got_file_index = 1;
}
- Py_RETURN_NONE;
+ return PyLong_FromLongLong((PY_LONG_LONG)self->win32_file_index);
+#else /* POSIX */
+#ifdef HAVE_LARGEFILE_SUPPORT
+ return PyLong_FromLongLong((PY_LONG_LONG)self->d_ino);
+#else
+ return PyLong_FromLong((long)self->d_ino);
+#endif
+#endif
+}
+
+static PyObject *
+DirEntry_repr(DirEntry *self)
+{
+ return PyUnicode_FromFormat("<DirEntry %R>", self->name);
+}
+
+static PyMemberDef DirEntry_members[] = {
+ {"name", T_OBJECT_EX, offsetof(DirEntry, name), READONLY,
+ "the entry's base filename, relative to scandir() \"path\" argument"},
+ {"path", T_OBJECT_EX, offsetof(DirEntry, path), READONLY,
+ "the entry's full path name; equivalent to os.path.join(scandir_path, entry.name)"},
+ {NULL}
+};
+
+static PyMethodDef DirEntry_methods[] = {
+ {"is_dir", (PyCFunction)DirEntry_is_dir, METH_VARARGS | METH_KEYWORDS,
+ "return True if the entry is a directory; cached per entry"
+ },
+ {"is_file", (PyCFunction)DirEntry_is_file, METH_VARARGS | METH_KEYWORDS,
+ "return True if the entry is a file; cached per entry"
+ },
+ {"is_symlink", (PyCFunction)DirEntry_py_is_symlink, METH_NOARGS,
+ "return True if the entry is a symbolic link; cached per entry"
+ },
+ {"stat", (PyCFunction)DirEntry_stat, METH_VARARGS | METH_KEYWORDS,
+ "return stat_result object for the entry; cached per entry"
+ },
+ {"inode", (PyCFunction)DirEntry_inode, METH_NOARGS,
+ "return inode of the entry; cached per entry",
+ },
+ {NULL}
+};
+
+static PyTypeObject DirEntryType = {
+ PyVarObject_HEAD_INIT(NULL, 0)
+ MODNAME ".DirEntry", /* tp_name */
+ sizeof(DirEntry), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ /* methods */
+ (destructor)DirEntry_dealloc, /* tp_dealloc */
+ 0, /* tp_print */
+ 0, /* tp_getattr */
+ 0, /* tp_setattr */
+ 0, /* tp_compare */
+ (reprfunc)DirEntry_repr, /* tp_repr */
+ 0, /* tp_as_number */
+ 0, /* tp_as_sequence */
+ 0, /* tp_as_mapping */
+ 0, /* tp_hash */
+ 0, /* tp_call */
+ 0, /* tp_str */
+ 0, /* tp_getattro */
+ 0, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT, /* tp_flags */
+ 0, /* tp_doc */
+ 0, /* tp_traverse */
+ 0, /* tp_clear */
+ 0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ 0, /* tp_iter */
+ 0, /* tp_iternext */
+ DirEntry_methods, /* tp_methods */
+ DirEntry_members, /* tp_members */
+};
+
+#ifdef MS_WINDOWS
+
+static wchar_t *
+join_path_filenameW(wchar_t *path_wide, wchar_t* filename)
+{
+ Py_ssize_t path_len;
+ Py_ssize_t size;
+ wchar_t *result;
+ wchar_t ch;
+
+ if (!path_wide) { /* Default arg: "." */
+ path_wide = L".";
+ path_len = 1;
+ }
+ else {
+ path_len = wcslen(path_wide);
+ }
+
+ /* The +1's are for the path separator and the NUL */
+ size = path_len + 1 + wcslen(filename) + 1;
+ result = PyMem_New(wchar_t, size);
+ if (!result) {
+ PyErr_NoMemory();
+ return NULL;
+ }
+ wcscpy(result, path_wide);
+ if (path_len > 0) {
+ ch = result[path_len - 1];
+ if (ch != SEP && ch != ALTSEP && ch != L':')
+ result[path_len++] = SEP;
+ wcscpy(result + path_len, filename);
+ }
+ return result;
+}
+
+static PyObject *
+DirEntry_from_find_data(path_t *path, WIN32_FIND_DATAW *dataW)
+{
+ DirEntry *entry;
+ BY_HANDLE_FILE_INFORMATION file_info;
+ ULONG reparse_tag;
+ wchar_t *joined_path;
+
+ entry = PyObject_New(DirEntry, &DirEntryType);
+ if (!entry)
+ return NULL;
+ entry->name = NULL;
+ entry->path = NULL;
+ entry->stat = NULL;
+ entry->lstat = NULL;
+ entry->got_file_index = 0;
+
+ entry->name = PyUnicode_FromWideChar(dataW->cFileName, -1);
+ if (!entry->name)
+ goto error;
+
+ joined_path = join_path_filenameW(path->wide, dataW->cFileName);
+ if (!joined_path)
+ goto error;
+
+ entry->path = PyUnicode_FromWideChar(joined_path, -1);
+ PyMem_Free(joined_path);
+ if (!entry->path)
+ goto error;
+
+ find_data_to_file_info_w(dataW, &file_info, &reparse_tag);
+ _Py_attribute_data_to_stat(&file_info, reparse_tag, &entry->win32_lstat);
+
+ return (PyObject *)entry;
+
+error:
+ Py_DECREF(entry);
+ return NULL;
+}
+
+#else /* POSIX */
+
+static char *
+join_path_filename(char *path_narrow, char* filename, Py_ssize_t filename_len)
+{
+ Py_ssize_t path_len;
+ Py_ssize_t size;
+ char *result;
+
+ if (!path_narrow) { /* Default arg: "." */
+ path_narrow = ".";
+ path_len = 1;
+ }
+ else {
+ path_len = strlen(path_narrow);
+ }
+
+ if (filename_len == -1)
+ filename_len = strlen(filename);
+
+ /* The +1's are for the path separator and the NUL */
+ size = path_len + 1 + filename_len + 1;
+ result = PyMem_New(char, size);
+ if (!result) {
+ PyErr_NoMemory();
+ return NULL;
+ }
+ strcpy(result, path_narrow);
+ if (path_len > 0 && result[path_len - 1] != '/')
+ result[path_len++] = '/';
+ strcpy(result + path_len, filename);
+ return result;
+}
+
+static PyObject *
+DirEntry_from_posix_info(path_t *path, char *name, Py_ssize_t name_len,
+ ino_t d_ino
+#ifdef HAVE_DIRENT_D_TYPE
+ , unsigned char d_type
+#endif
+ )
+{
+ DirEntry *entry;
+ char *joined_path;
+
+ entry = PyObject_New(DirEntry, &DirEntryType);
+ if (!entry)
+ return NULL;
+ entry->name = NULL;
+ entry->path = NULL;
+ entry->stat = NULL;
+ entry->lstat = NULL;
+
+ joined_path = join_path_filename(path->narrow, name, name_len);
+ if (!joined_path)
+ goto error;
+
+ if (!path->narrow || !PyBytes_Check(path->object)) {
+ entry->name = PyUnicode_DecodeFSDefaultAndSize(name, name_len);
+ entry->path = PyUnicode_DecodeFSDefault(joined_path);
+ }
+ else {
+ entry->name = PyBytes_FromStringAndSize(name, name_len);
+ entry->path = PyBytes_FromString(joined_path);
+ }
+ PyMem_Free(joined_path);
+ if (!entry->name || !entry->path)
+ goto error;
+
+#ifdef HAVE_DIRENT_D_TYPE
+ entry->d_type = d_type;
+#endif
+ entry->d_ino = d_ino;
+
+ return (PyObject *)entry;
+
+error:
+ Py_XDECREF(entry);
+ return NULL;
+}
+
+#endif
+
+
+typedef struct {
+ PyObject_HEAD
+ path_t path;
+#ifdef MS_WINDOWS
+ HANDLE handle;
+ WIN32_FIND_DATAW file_data;
+ int first_time;
+#else /* POSIX */
+ DIR *dirp;
+#endif
+} ScandirIterator;
+
+#ifdef MS_WINDOWS
+
+static void
+ScandirIterator_close(ScandirIterator *iterator)
+{
+ HANDLE handle = iterator->handle;
+
+ if (handle == INVALID_HANDLE_VALUE)
+ return;
+
+ iterator->handle = INVALID_HANDLE_VALUE;
+ Py_BEGIN_ALLOW_THREADS
+ FindClose(handle);
+ Py_END_ALLOW_THREADS
}
-#endif /* MS_WINDOWS */
+static PyObject *
+ScandirIterator_iternext(ScandirIterator *iterator)
+{
+ WIN32_FIND_DATAW *file_data = &iterator->file_data;
+ BOOL success;
+ PyObject *entry;
+
+ /* Happens if the iterator is iterated twice */
+ if (iterator->handle == INVALID_HANDLE_VALUE)
+ return NULL;
+
+ while (1) {
+ if (!iterator->first_time) {
+ Py_BEGIN_ALLOW_THREADS
+ success = FindNextFileW(iterator->handle, file_data);
+ Py_END_ALLOW_THREADS
+ if (!success) {
+ /* Error or no more files */
+ if (GetLastError() != ERROR_NO_MORE_FILES)
+ path_error(&iterator->path);
+ break;
+ }
+ }
+ iterator->first_time = 0;
+
+ /* Skip over . and .. */
+ if (wcscmp(file_data->cFileName, L".") != 0 &&
+ wcscmp(file_data->cFileName, L"..") != 0) {
+ entry = DirEntry_from_find_data(&iterator->path, file_data);
+ if (!entry)
+ break;
+ return entry;
+ }
+
+ /* Loop till we get a non-dot directory or finish iterating */
+ }
+
+ /* Error or no more files */
+ ScandirIterator_close(iterator);
+ return NULL;
+}
+
+#else /* POSIX */
+
+static void
+ScandirIterator_close(ScandirIterator *iterator)
+{
+ DIR *dirp = iterator->dirp;
+
+ if (!dirp)
+ return;
+
+ iterator->dirp = NULL;
+ Py_BEGIN_ALLOW_THREADS
+ closedir(dirp);
+ Py_END_ALLOW_THREADS
+ return;
+}
+
+static PyObject *
+ScandirIterator_iternext(ScandirIterator *iterator)
+{
+ struct dirent *direntp;
+ Py_ssize_t name_len;
+ int is_dot;
+ PyObject *entry;
+
+ /* Happens if the iterator is iterated twice */
+ if (!iterator->dirp)
+ return NULL;
+
+ while (1) {
+ errno = 0;
+ Py_BEGIN_ALLOW_THREADS
+ direntp = readdir(iterator->dirp);
+ Py_END_ALLOW_THREADS
+
+ if (!direntp) {
+ /* Error or no more files */
+ if (errno != 0)
+ path_error(&iterator->path);
+ break;
+ }
+
+ /* Skip over . and .. */
+ name_len = NAMLEN(direntp);
+ is_dot = direntp->d_name[0] == '.' &&
+ (name_len == 1 || (direntp->d_name[1] == '.' && name_len == 2));
+ if (!is_dot) {
+ entry = DirEntry_from_posix_info(&iterator->path, direntp->d_name,
+ name_len, direntp->d_ino
+#ifdef HAVE_DIRENT_D_TYPE
+ , direntp->d_type
+#endif
+ );
+ if (!entry)
+ break;
+ return entry;
+ }
+
+ /* Loop till we get a non-dot directory or finish iterating */
+ }
+
+ /* Error or no more files */
+ ScandirIterator_close(iterator);
+ return NULL;
+}
+
+#endif
+
+static void
+ScandirIterator_dealloc(ScandirIterator *iterator)
+{
+ ScandirIterator_close(iterator);
+ Py_XDECREF(iterator->path.object);
+ path_cleanup(&iterator->path);
+ Py_TYPE(iterator)->tp_free((PyObject *)iterator);
+}
+
+static PyTypeObject ScandirIteratorType = {
+ PyVarObject_HEAD_INIT(NULL, 0)
+ MODNAME ".ScandirIterator", /* tp_name */
+ sizeof(ScandirIterator), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ /* methods */
+ (destructor)ScandirIterator_dealloc, /* tp_dealloc */
+ 0, /* tp_print */
+ 0, /* tp_getattr */
+ 0, /* tp_setattr */
+ 0, /* tp_compare */
+ 0, /* tp_repr */
+ 0, /* tp_as_number */
+ 0, /* tp_as_sequence */
+ 0, /* tp_as_mapping */
+ 0, /* tp_hash */
+ 0, /* tp_call */
+ 0, /* tp_str */
+ 0, /* tp_getattro */
+ 0, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT, /* tp_flags */
+ 0, /* tp_doc */
+ 0, /* tp_traverse */
+ 0, /* tp_clear */
+ 0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ PyObject_SelfIter, /* tp_iter */
+ (iternextfunc)ScandirIterator_iternext, /* tp_iternext */
+};
+
+static PyObject *
+posix_scandir(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ ScandirIterator *iterator;
+ static char *keywords[] = {"path", NULL};
+#ifdef MS_WINDOWS
+ wchar_t *path_strW;
+#else
+ char *path;
+#endif
+
+ iterator = PyObject_New(ScandirIterator, &ScandirIteratorType);
+ if (!iterator)
+ return NULL;
+ memset(&iterator->path, 0, sizeof(path_t));
+ iterator->path.function_name = "scandir";
+ iterator->path.nullable = 1;
+
+#ifdef MS_WINDOWS
+ iterator->handle = INVALID_HANDLE_VALUE;
+#else
+ iterator->dirp = NULL;
+#endif
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O&:scandir", keywords,
+ path_converter, &iterator->path))
+ goto error;
+
+ /* path_converter doesn't keep path.object around, so do it
+ manually for the lifetime of the iterator here (the refcount
+ is decremented in ScandirIterator_dealloc)
+ */
+ Py_XINCREF(iterator->path.object);
+
+#ifdef MS_WINDOWS
+ if (iterator->path.narrow) {
+ PyErr_SetString(PyExc_TypeError,
+ "os.scandir() doesn't support bytes path on Windows, use Unicode instead");
+ goto error;
+ }
+ iterator->first_time = 1;
+
+ path_strW = join_path_filenameW(iterator->path.wide, L"*.*");
+ if (!path_strW)
+ goto error;
+
+ Py_BEGIN_ALLOW_THREADS
+ iterator->handle = FindFirstFileW(path_strW, &iterator->file_data);
+ Py_END_ALLOW_THREADS
+
+ PyMem_Free(path_strW);
+
+ if (iterator->handle == INVALID_HANDLE_VALUE) {
+ path_error(&iterator->path);
+ goto error;
+ }
+#else /* POSIX */
+ if (iterator->path.narrow)
+ path = iterator->path.narrow;
+ else
+ path = ".";
+
+ errno = 0;
+ Py_BEGIN_ALLOW_THREADS
+ iterator->dirp = opendir(path);
+ Py_END_ALLOW_THREADS
+
+ if (!iterator->dirp) {
+ path_error(&iterator->path);
+ goto error;
+ }
+#endif
+
+ return (PyObject *)iterator;
+
+error:
+ Py_DECREF(iterator);
+ return NULL;
+}
+
+
+#include "clinic/posixmodule.c.h"
/*[clinic input]
dump buffer
[clinic start generated code]*/
-
-#ifndef OS_TTYNAME_METHODDEF
- #define OS_TTYNAME_METHODDEF
-#endif /* !defined(OS_TTYNAME_METHODDEF) */
-/*[clinic end generated code: output=5d071bbc8f49ea12 input=524ce2e021e4eba6]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=524ce2e021e4eba6]*/
static PyMethodDef posix_methods[] = {
@@ -11215,71 +12185,26 @@ static PyMethodDef posix_methods[] = {
OS_STAT_METHODDEF
OS_ACCESS_METHODDEF
OS_TTYNAME_METHODDEF
-
- {"chdir", (PyCFunction)posix_chdir,
- METH_VARARGS | METH_KEYWORDS,
- posix_chdir__doc__},
-#ifdef HAVE_CHFLAGS
- {"chflags", (PyCFunction)posix_chflags,
- METH_VARARGS | METH_KEYWORDS,
- posix_chflags__doc__},
-#endif /* HAVE_CHFLAGS */
- {"chmod", (PyCFunction)posix_chmod,
- METH_VARARGS | METH_KEYWORDS,
- posix_chmod__doc__},
-#ifdef HAVE_FCHMOD
- {"fchmod", posix_fchmod, METH_VARARGS, posix_fchmod__doc__},
-#endif /* HAVE_FCHMOD */
-#ifdef HAVE_CHOWN
- {"chown", (PyCFunction)posix_chown,
- METH_VARARGS | METH_KEYWORDS,
- posix_chown__doc__},
-#endif /* HAVE_CHOWN */
-#ifdef HAVE_LCHMOD
- {"lchmod", posix_lchmod, METH_VARARGS, posix_lchmod__doc__},
-#endif /* HAVE_LCHMOD */
-#ifdef HAVE_FCHOWN
- {"fchown", posix_fchown, METH_VARARGS, posix_fchown__doc__},
-#endif /* HAVE_FCHOWN */
-#ifdef HAVE_LCHFLAGS
- {"lchflags", posix_lchflags, METH_VARARGS, posix_lchflags__doc__},
-#endif /* HAVE_LCHFLAGS */
-#ifdef HAVE_LCHOWN
- {"lchown", posix_lchown, METH_VARARGS, posix_lchown__doc__},
-#endif /* HAVE_LCHOWN */
-#ifdef HAVE_CHROOT
- {"chroot", posix_chroot, METH_VARARGS, posix_chroot__doc__},
-#endif
-#ifdef HAVE_CTERMID
- {"ctermid", posix_ctermid, METH_NOARGS, posix_ctermid__doc__},
-#endif
- {"getcwd", (PyCFunction)posix_getcwd_unicode,
- METH_NOARGS, posix_getcwd__doc__},
- {"getcwdb", (PyCFunction)posix_getcwd_bytes,
- METH_NOARGS, posix_getcwdb__doc__},
-#if defined(HAVE_LINK) || defined(MS_WINDOWS)
- {"link", (PyCFunction)posix_link,
- METH_VARARGS | METH_KEYWORDS,
- posix_link__doc__},
-#endif /* HAVE_LINK */
- {"listdir", (PyCFunction)posix_listdir,
- METH_VARARGS | METH_KEYWORDS,
- posix_listdir__doc__},
- {"lstat", (PyCFunction)posix_lstat,
- METH_VARARGS | METH_KEYWORDS,
- posix_lstat__doc__},
- {"mkdir", (PyCFunction)posix_mkdir,
- METH_VARARGS | METH_KEYWORDS,
- posix_mkdir__doc__},
-#ifdef HAVE_NICE
- {"nice", posix_nice, METH_VARARGS, posix_nice__doc__},
-#endif /* HAVE_NICE */
-#ifdef HAVE_GETPRIORITY
- {"getpriority", posix_getpriority, METH_VARARGS, posix_getpriority__doc__},
-#endif /* HAVE_GETPRIORITY */
-#ifdef HAVE_SETPRIORITY
- {"setpriority", posix_setpriority, METH_VARARGS, posix_setpriority__doc__},
-#endif /* HAVE_SETPRIORITY */
+ OS_CHDIR_METHODDEF
+ OS_CHFLAGS_METHODDEF
+ OS_CHMOD_METHODDEF
+ OS_FCHMOD_METHODDEF
+ OS_LCHMOD_METHODDEF
+ OS_CHOWN_METHODDEF
+ OS_FCHOWN_METHODDEF
+ OS_LCHOWN_METHODDEF
+ OS_LCHFLAGS_METHODDEF
+ OS_CHROOT_METHODDEF
+ OS_CTERMID_METHODDEF
+ OS_GETCWD_METHODDEF
+ OS_GETCWDB_METHODDEF
+ OS_LINK_METHODDEF
+ OS_LISTDIR_METHODDEF
+ OS_LSTAT_METHODDEF
+ OS_MKDIR_METHODDEF
+ OS_NICE_METHODDEF
+ OS_GETPRIORITY_METHODDEF
+ OS_SETPRIORITY_METHODDEF
#ifdef HAVE_READLINK
{"readlink", (PyCFunction)posix_readlink,
METH_VARARGS | METH_KEYWORDS,
@@ -11290,376 +12215,162 @@ static PyMethodDef posix_methods[] = {
METH_VARARGS | METH_KEYWORDS,
readlink__doc__},
#endif /* !defined(HAVE_READLINK) && defined(MS_WINDOWS) */
- {"rename", (PyCFunction)posix_rename,
- METH_VARARGS | METH_KEYWORDS,
- posix_rename__doc__},
- {"replace", (PyCFunction)posix_replace,
- METH_VARARGS | METH_KEYWORDS,
- posix_replace__doc__},
- {"rmdir", (PyCFunction)posix_rmdir,
- METH_VARARGS | METH_KEYWORDS,
- posix_rmdir__doc__},
+ OS_RENAME_METHODDEF
+ OS_REPLACE_METHODDEF
+ OS_RMDIR_METHODDEF
{"stat_float_times", stat_float_times, METH_VARARGS, stat_float_times__doc__},
-#if defined(HAVE_SYMLINK)
- {"symlink", (PyCFunction)posix_symlink,
- METH_VARARGS | METH_KEYWORDS,
- posix_symlink__doc__},
-#endif /* HAVE_SYMLINK */
-#ifdef HAVE_SYSTEM
- {"system", posix_system, METH_VARARGS, posix_system__doc__},
-#endif
- {"umask", posix_umask, METH_VARARGS, posix_umask__doc__},
-#ifdef HAVE_UNAME
- {"uname", posix_uname, METH_NOARGS, posix_uname__doc__},
-#endif /* HAVE_UNAME */
- {"unlink", (PyCFunction)posix_unlink,
- METH_VARARGS | METH_KEYWORDS,
- posix_unlink__doc__},
- {"remove", (PyCFunction)posix_unlink,
- METH_VARARGS | METH_KEYWORDS,
- posix_remove__doc__},
- {"utime", (PyCFunction)posix_utime,
- METH_VARARGS | METH_KEYWORDS, posix_utime__doc__},
-#ifdef HAVE_TIMES
- {"times", posix_times, METH_NOARGS, posix_times__doc__},
-#endif /* HAVE_TIMES */
- {"_exit", posix__exit, METH_VARARGS, posix__exit__doc__},
-#ifdef HAVE_EXECV
- {"execv", posix_execv, METH_VARARGS, posix_execv__doc__},
- {"execve", (PyCFunction)posix_execve,
- METH_VARARGS | METH_KEYWORDS,
- posix_execve__doc__},
-#endif /* HAVE_EXECV */
-#ifdef HAVE_SPAWNV
- {"spawnv", posix_spawnv, METH_VARARGS, posix_spawnv__doc__},
- {"spawnve", posix_spawnve, METH_VARARGS, posix_spawnve__doc__},
-#endif /* HAVE_SPAWNV */
-#ifdef HAVE_FORK1
- {"fork1", posix_fork1, METH_NOARGS, posix_fork1__doc__},
-#endif /* HAVE_FORK1 */
-#ifdef HAVE_FORK
- {"fork", posix_fork, METH_NOARGS, posix_fork__doc__},
-#endif /* HAVE_FORK */
-#ifdef HAVE_SCHED_H
-#ifdef HAVE_SCHED_GET_PRIORITY_MAX
- {"sched_get_priority_max", posix_sched_get_priority_max, METH_VARARGS, posix_sched_get_priority_max__doc__},
- {"sched_get_priority_min", posix_sched_get_priority_min, METH_VARARGS, posix_sched_get_priority_min__doc__},
-#endif
-#ifdef HAVE_SCHED_SETPARAM
- {"sched_getparam", posix_sched_getparam, METH_VARARGS, posix_sched_getparam__doc__},
-#endif
-#ifdef HAVE_SCHED_SETSCHEDULER
- {"sched_getscheduler", posix_sched_getscheduler, METH_VARARGS, posix_sched_getscheduler__doc__},
-#endif
-#ifdef HAVE_SCHED_RR_GET_INTERVAL
- {"sched_rr_get_interval", posix_sched_rr_get_interval, METH_VARARGS, posix_sched_rr_get_interval__doc__},
-#endif
-#ifdef HAVE_SCHED_SETPARAM
- {"sched_setparam", posix_sched_setparam, METH_VARARGS, posix_sched_setparam__doc__},
-#endif
-#ifdef HAVE_SCHED_SETSCHEDULER
- {"sched_setscheduler", posix_sched_setscheduler, METH_VARARGS, posix_sched_setscheduler__doc__},
-#endif
- {"sched_yield", posix_sched_yield, METH_NOARGS, posix_sched_yield__doc__},
-#ifdef HAVE_SCHED_SETAFFINITY
- {"sched_setaffinity", posix_sched_setaffinity, METH_VARARGS, posix_sched_setaffinity__doc__},
- {"sched_getaffinity", posix_sched_getaffinity, METH_VARARGS, posix_sched_getaffinity__doc__},
-#endif
-#endif /* HAVE_SCHED_H */
-#if defined(HAVE_OPENPTY) || defined(HAVE__GETPTY) || defined(HAVE_DEV_PTMX)
- {"openpty", posix_openpty, METH_NOARGS, posix_openpty__doc__},
-#endif /* HAVE_OPENPTY || HAVE__GETPTY || HAVE_DEV_PTMX */
-#ifdef HAVE_FORKPTY
- {"forkpty", posix_forkpty, METH_NOARGS, posix_forkpty__doc__},
-#endif /* HAVE_FORKPTY */
-#ifdef HAVE_GETEGID
- {"getegid", posix_getegid, METH_NOARGS, posix_getegid__doc__},
-#endif /* HAVE_GETEGID */
-#ifdef HAVE_GETEUID
- {"geteuid", posix_geteuid, METH_NOARGS, posix_geteuid__doc__},
-#endif /* HAVE_GETEUID */
-#ifdef HAVE_GETGID
- {"getgid", posix_getgid, METH_NOARGS, posix_getgid__doc__},
-#endif /* HAVE_GETGID */
+ OS_SYMLINK_METHODDEF
+ OS_SYSTEM_METHODDEF
+ OS_UMASK_METHODDEF
+ OS_UNAME_METHODDEF
+ OS_UNLINK_METHODDEF
+ OS_REMOVE_METHODDEF
+ OS_UTIME_METHODDEF
+ OS_TIMES_METHODDEF
+ OS__EXIT_METHODDEF
+ OS_EXECV_METHODDEF
+ OS_EXECVE_METHODDEF
+ OS_SPAWNV_METHODDEF
+ OS_SPAWNVE_METHODDEF
+ OS_FORK1_METHODDEF
+ OS_FORK_METHODDEF
+ OS_SCHED_GET_PRIORITY_MAX_METHODDEF
+ OS_SCHED_GET_PRIORITY_MIN_METHODDEF
+ OS_SCHED_GETPARAM_METHODDEF
+ OS_SCHED_GETSCHEDULER_METHODDEF
+ OS_SCHED_RR_GET_INTERVAL_METHODDEF
+ OS_SCHED_SETPARAM_METHODDEF
+ OS_SCHED_SETSCHEDULER_METHODDEF
+ OS_SCHED_YIELD_METHODDEF
+ OS_SCHED_SETAFFINITY_METHODDEF
+ OS_SCHED_GETAFFINITY_METHODDEF
+ OS_OPENPTY_METHODDEF
+ OS_FORKPTY_METHODDEF
+ OS_GETEGID_METHODDEF
+ OS_GETEUID_METHODDEF
+ OS_GETGID_METHODDEF
#ifdef HAVE_GETGROUPLIST
{"getgrouplist", posix_getgrouplist, METH_VARARGS, posix_getgrouplist__doc__},
#endif
-#ifdef HAVE_GETGROUPS
- {"getgroups", posix_getgroups, METH_NOARGS, posix_getgroups__doc__},
-#endif
- {"getpid", posix_getpid, METH_NOARGS, posix_getpid__doc__},
-#ifdef HAVE_GETPGRP
- {"getpgrp", posix_getpgrp, METH_NOARGS, posix_getpgrp__doc__},
-#endif /* HAVE_GETPGRP */
-#ifdef HAVE_GETPPID
- {"getppid", posix_getppid, METH_NOARGS, posix_getppid__doc__},
-#endif /* HAVE_GETPPID */
-#ifdef HAVE_GETUID
- {"getuid", posix_getuid, METH_NOARGS, posix_getuid__doc__},
-#endif /* HAVE_GETUID */
-#ifdef HAVE_GETLOGIN
- {"getlogin", posix_getlogin, METH_NOARGS, posix_getlogin__doc__},
-#endif
-#ifdef HAVE_KILL
- {"kill", posix_kill, METH_VARARGS, posix_kill__doc__},
-#endif /* HAVE_KILL */
-#ifdef HAVE_KILLPG
- {"killpg", posix_killpg, METH_VARARGS, posix_killpg__doc__},
-#endif /* HAVE_KILLPG */
-#ifdef HAVE_PLOCK
- {"plock", posix_plock, METH_VARARGS, posix_plock__doc__},
-#endif /* HAVE_PLOCK */
+ OS_GETGROUPS_METHODDEF
+ OS_GETPID_METHODDEF
+ OS_GETPGRP_METHODDEF
+ OS_GETPPID_METHODDEF
+ OS_GETUID_METHODDEF
+ OS_GETLOGIN_METHODDEF
+ OS_KILL_METHODDEF
+ OS_KILLPG_METHODDEF
+ OS_PLOCK_METHODDEF
#ifdef MS_WINDOWS
{"startfile", win32_startfile, METH_VARARGS, win32_startfile__doc__},
- {"kill", win32_kill, METH_VARARGS, win32_kill__doc__},
#endif
-#ifdef HAVE_SETUID
- {"setuid", posix_setuid, METH_VARARGS, posix_setuid__doc__},
-#endif /* HAVE_SETUID */
-#ifdef HAVE_SETEUID
- {"seteuid", posix_seteuid, METH_VARARGS, posix_seteuid__doc__},
-#endif /* HAVE_SETEUID */
-#ifdef HAVE_SETEGID
- {"setegid", posix_setegid, METH_VARARGS, posix_setegid__doc__},
-#endif /* HAVE_SETEGID */
-#ifdef HAVE_SETREUID
- {"setreuid", posix_setreuid, METH_VARARGS, posix_setreuid__doc__},
-#endif /* HAVE_SETREUID */
-#ifdef HAVE_SETREGID
- {"setregid", posix_setregid, METH_VARARGS, posix_setregid__doc__},
-#endif /* HAVE_SETREGID */
-#ifdef HAVE_SETGID
- {"setgid", posix_setgid, METH_VARARGS, posix_setgid__doc__},
-#endif /* HAVE_SETGID */
-#ifdef HAVE_SETGROUPS
- {"setgroups", posix_setgroups, METH_O, posix_setgroups__doc__},
-#endif /* HAVE_SETGROUPS */
+ OS_SETUID_METHODDEF
+ OS_SETEUID_METHODDEF
+ OS_SETREUID_METHODDEF
+ OS_SETGID_METHODDEF
+ OS_SETEGID_METHODDEF
+ OS_SETREGID_METHODDEF
+ OS_SETGROUPS_METHODDEF
#ifdef HAVE_INITGROUPS
{"initgroups", posix_initgroups, METH_VARARGS, posix_initgroups__doc__},
#endif /* HAVE_INITGROUPS */
-#ifdef HAVE_GETPGID
- {"getpgid", posix_getpgid, METH_VARARGS, posix_getpgid__doc__},
-#endif /* HAVE_GETPGID */
-#ifdef HAVE_SETPGRP
- {"setpgrp", posix_setpgrp, METH_NOARGS, posix_setpgrp__doc__},
-#endif /* HAVE_SETPGRP */
-#ifdef HAVE_WAIT
- {"wait", posix_wait, METH_NOARGS, posix_wait__doc__},
-#endif /* HAVE_WAIT */
-#ifdef HAVE_WAIT3
- {"wait3", posix_wait3, METH_VARARGS, posix_wait3__doc__},
-#endif /* HAVE_WAIT3 */
-#ifdef HAVE_WAIT4
- {"wait4", posix_wait4, METH_VARARGS, posix_wait4__doc__},
-#endif /* HAVE_WAIT4 */
-#if defined(HAVE_WAITID) && !defined(__APPLE__)
- {"waitid", posix_waitid, METH_VARARGS, posix_waitid__doc__},
-#endif
-#if defined(HAVE_WAITPID) || defined(HAVE_CWAIT)
- {"waitpid", posix_waitpid, METH_VARARGS, posix_waitpid__doc__},
-#endif /* HAVE_WAITPID */
-#ifdef HAVE_GETSID
- {"getsid", posix_getsid, METH_VARARGS, posix_getsid__doc__},
-#endif /* HAVE_GETSID */
-#ifdef HAVE_SETSID
- {"setsid", posix_setsid, METH_NOARGS, posix_setsid__doc__},
-#endif /* HAVE_SETSID */
-#ifdef HAVE_SETPGID
- {"setpgid", posix_setpgid, METH_VARARGS, posix_setpgid__doc__},
-#endif /* HAVE_SETPGID */
-#ifdef HAVE_TCGETPGRP
- {"tcgetpgrp", posix_tcgetpgrp, METH_VARARGS, posix_tcgetpgrp__doc__},
-#endif /* HAVE_TCGETPGRP */
-#ifdef HAVE_TCSETPGRP
- {"tcsetpgrp", posix_tcsetpgrp, METH_VARARGS, posix_tcsetpgrp__doc__},
-#endif /* HAVE_TCSETPGRP */
- {"open", (PyCFunction)posix_open,\
- METH_VARARGS | METH_KEYWORDS,
- posix_open__doc__},
- {"close", posix_close_, METH_VARARGS, posix_close__doc__},
- {"closerange", posix_closerange, METH_VARARGS, posix_closerange__doc__},
- {"device_encoding", device_encoding, METH_VARARGS, device_encoding__doc__},
- {"dup", posix_dup, METH_VARARGS, posix_dup__doc__},
- {"dup2", (PyCFunction)posix_dup2,
- METH_VARARGS | METH_KEYWORDS, posix_dup2__doc__},
-#ifdef HAVE_LOCKF
- {"lockf", posix_lockf, METH_VARARGS, posix_lockf__doc__},
-#endif
- {"lseek", posix_lseek, METH_VARARGS, posix_lseek__doc__},
- {"read", posix_read, METH_VARARGS, posix_read__doc__},
-#ifdef HAVE_READV
- {"readv", posix_readv, METH_VARARGS, posix_readv__doc__},
-#endif
-#ifdef HAVE_PREAD
- {"pread", posix_pread, METH_VARARGS, posix_pread__doc__},
-#endif
- {"write", posix_write, METH_VARARGS, posix_write__doc__},
-#ifdef HAVE_WRITEV
- {"writev", posix_writev, METH_VARARGS, posix_writev__doc__},
-#endif
-#ifdef HAVE_PWRITE
- {"pwrite", posix_pwrite, METH_VARARGS, posix_pwrite__doc__},
-#endif
+ OS_GETPGID_METHODDEF
+ OS_SETPGRP_METHODDEF
+ OS_WAIT_METHODDEF
+ OS_WAIT3_METHODDEF
+ OS_WAIT4_METHODDEF
+ OS_WAITID_METHODDEF
+ OS_WAITPID_METHODDEF
+ OS_GETSID_METHODDEF
+ OS_SETSID_METHODDEF
+ OS_SETPGID_METHODDEF
+ OS_TCGETPGRP_METHODDEF
+ OS_TCSETPGRP_METHODDEF
+ OS_OPEN_METHODDEF
+ OS_CLOSE_METHODDEF
+ OS_CLOSERANGE_METHODDEF
+ OS_DEVICE_ENCODING_METHODDEF
+ OS_DUP_METHODDEF
+ OS_DUP2_METHODDEF
+ OS_LOCKF_METHODDEF
+ OS_LSEEK_METHODDEF
+ OS_READ_METHODDEF
+ OS_READV_METHODDEF
+ OS_PREAD_METHODDEF
+ OS_WRITE_METHODDEF
+ OS_WRITEV_METHODDEF
+ OS_PWRITE_METHODDEF
#ifdef HAVE_SENDFILE
{"sendfile", (PyCFunction)posix_sendfile, METH_VARARGS | METH_KEYWORDS,
posix_sendfile__doc__},
#endif
- {"fstat", posix_fstat, METH_VARARGS, posix_fstat__doc__},
- {"isatty", posix_isatty, METH_VARARGS, posix_isatty__doc__},
-#ifdef HAVE_PIPE
- {"pipe", posix_pipe, METH_NOARGS, posix_pipe__doc__},
-#endif
-#ifdef HAVE_PIPE2
- {"pipe2", posix_pipe2, METH_O, posix_pipe2__doc__},
-#endif
-#ifdef HAVE_MKFIFO
- {"mkfifo", (PyCFunction)posix_mkfifo,
- METH_VARARGS | METH_KEYWORDS,
- posix_mkfifo__doc__},
-#endif
-#if defined(HAVE_MKNOD) && defined(HAVE_MAKEDEV)
- {"mknod", (PyCFunction)posix_mknod,
- METH_VARARGS | METH_KEYWORDS,
- posix_mknod__doc__},
-#endif
-#ifdef HAVE_DEVICE_MACROS
- {"major", posix_major, METH_VARARGS, posix_major__doc__},
- {"minor", posix_minor, METH_VARARGS, posix_minor__doc__},
- {"makedev", posix_makedev, METH_VARARGS, posix_makedev__doc__},
-#endif
-#ifdef HAVE_FTRUNCATE
- {"ftruncate", posix_ftruncate, METH_VARARGS, posix_ftruncate__doc__},
-#endif
-#ifdef HAVE_TRUNCATE
- {"truncate", (PyCFunction)posix_truncate,
- METH_VARARGS | METH_KEYWORDS,
- posix_truncate__doc__},
-#endif
-#if defined(HAVE_POSIX_FALLOCATE) && !defined(POSIX_FADVISE_AIX_BUG)
- {"posix_fallocate", posix_posix_fallocate, METH_VARARGS, posix_posix_fallocate__doc__},
-#endif
-#if defined(HAVE_POSIX_FADVISE) && !defined(POSIX_FADVISE_AIX_BUG)
- {"posix_fadvise", posix_posix_fadvise, METH_VARARGS, posix_posix_fadvise__doc__},
-#endif
-#ifdef HAVE_PUTENV
- {"putenv", posix_putenv, METH_VARARGS, posix_putenv__doc__},
-#endif
-#ifdef HAVE_UNSETENV
- {"unsetenv", posix_unsetenv, METH_VARARGS, posix_unsetenv__doc__},
-#endif
- {"strerror", posix_strerror, METH_VARARGS, posix_strerror__doc__},
-#ifdef HAVE_FCHDIR
- {"fchdir", posix_fchdir, METH_O, posix_fchdir__doc__},
-#endif
-#ifdef HAVE_FSYNC
- {"fsync", posix_fsync, METH_O, posix_fsync__doc__},
-#endif
-#ifdef HAVE_SYNC
- {"sync", posix_sync, METH_NOARGS, posix_sync__doc__},
-#endif
-#ifdef HAVE_FDATASYNC
- {"fdatasync", posix_fdatasync, METH_O, posix_fdatasync__doc__},
-#endif
-#ifdef HAVE_SYS_WAIT_H
-#ifdef WCOREDUMP
- {"WCOREDUMP", posix_WCOREDUMP, METH_VARARGS, posix_WCOREDUMP__doc__},
-#endif /* WCOREDUMP */
-#ifdef WIFCONTINUED
- {"WIFCONTINUED",posix_WIFCONTINUED, METH_VARARGS, posix_WIFCONTINUED__doc__},
-#endif /* WIFCONTINUED */
-#ifdef WIFSTOPPED
- {"WIFSTOPPED", posix_WIFSTOPPED, METH_VARARGS, posix_WIFSTOPPED__doc__},
-#endif /* WIFSTOPPED */
-#ifdef WIFSIGNALED
- {"WIFSIGNALED", posix_WIFSIGNALED, METH_VARARGS, posix_WIFSIGNALED__doc__},
-#endif /* WIFSIGNALED */
-#ifdef WIFEXITED
- {"WIFEXITED", posix_WIFEXITED, METH_VARARGS, posix_WIFEXITED__doc__},
-#endif /* WIFEXITED */
-#ifdef WEXITSTATUS
- {"WEXITSTATUS", posix_WEXITSTATUS, METH_VARARGS, posix_WEXITSTATUS__doc__},
-#endif /* WEXITSTATUS */
-#ifdef WTERMSIG
- {"WTERMSIG", posix_WTERMSIG, METH_VARARGS, posix_WTERMSIG__doc__},
-#endif /* WTERMSIG */
-#ifdef WSTOPSIG
- {"WSTOPSIG", posix_WSTOPSIG, METH_VARARGS, posix_WSTOPSIG__doc__},
-#endif /* WSTOPSIG */
-#endif /* HAVE_SYS_WAIT_H */
-#if defined(HAVE_FSTATVFS) && defined(HAVE_SYS_STATVFS_H)
- {"fstatvfs", posix_fstatvfs, METH_VARARGS, posix_fstatvfs__doc__},
-#endif
-#if defined(HAVE_STATVFS) && defined(HAVE_SYS_STATVFS_H)
- {"statvfs", (PyCFunction)posix_statvfs,
- METH_VARARGS | METH_KEYWORDS,
- posix_statvfs__doc__},
-#endif
-#ifdef HAVE_CONFSTR
- {"confstr", posix_confstr, METH_VARARGS, posix_confstr__doc__},
-#endif
-#ifdef HAVE_SYSCONF
- {"sysconf", posix_sysconf, METH_VARARGS, posix_sysconf__doc__},
-#endif
-#ifdef HAVE_FPATHCONF
- {"fpathconf", posix_fpathconf, METH_VARARGS, posix_fpathconf__doc__},
-#endif
-#ifdef HAVE_PATHCONF
- {"pathconf", (PyCFunction)posix_pathconf,
- METH_VARARGS | METH_KEYWORDS,
- posix_pathconf__doc__},
-#endif
- {"abort", posix_abort, METH_NOARGS, posix_abort__doc__},
-#ifdef MS_WINDOWS
- {"_getfullpathname", posix__getfullpathname, METH_VARARGS, NULL},
- {"_getfinalpathname", posix__getfinalpathname, METH_VARARGS, NULL},
- {"_isdir", posix__isdir, METH_VARARGS, posix__isdir__doc__},
- {"_getdiskusage", win32__getdiskusage, METH_VARARGS, win32__getdiskusage__doc__},
- {"_getvolumepathname", posix__getvolumepathname, METH_VARARGS, posix__getvolumepathname__doc__},
-#endif
-#ifdef HAVE_GETLOADAVG
- {"getloadavg", posix_getloadavg, METH_NOARGS, posix_getloadavg__doc__},
-#endif
- {"urandom", posix_urandom, METH_VARARGS, posix_urandom__doc__},
-#ifdef HAVE_SETRESUID
- {"setresuid", posix_setresuid, METH_VARARGS, posix_setresuid__doc__},
-#endif
-#ifdef HAVE_SETRESGID
- {"setresgid", posix_setresgid, METH_VARARGS, posix_setresgid__doc__},
-#endif
-#ifdef HAVE_GETRESUID
- {"getresuid", posix_getresuid, METH_NOARGS, posix_getresuid__doc__},
-#endif
-#ifdef HAVE_GETRESGID
- {"getresgid", posix_getresgid, METH_NOARGS, posix_getresgid__doc__},
-#endif
+ OS_FSTAT_METHODDEF
+ OS_ISATTY_METHODDEF
+ OS_PIPE_METHODDEF
+ OS_PIPE2_METHODDEF
+ OS_MKFIFO_METHODDEF
+ OS_MKNOD_METHODDEF
+ OS_MAJOR_METHODDEF
+ OS_MINOR_METHODDEF
+ OS_MAKEDEV_METHODDEF
+ OS_FTRUNCATE_METHODDEF
+ OS_TRUNCATE_METHODDEF
+ OS_POSIX_FALLOCATE_METHODDEF
+ OS_POSIX_FADVISE_METHODDEF
+ OS_PUTENV_METHODDEF
+ OS_UNSETENV_METHODDEF
+ OS_STRERROR_METHODDEF
+ OS_FCHDIR_METHODDEF
+ OS_FSYNC_METHODDEF
+ OS_SYNC_METHODDEF
+ OS_FDATASYNC_METHODDEF
+ OS_WCOREDUMP_METHODDEF
+ OS_WIFCONTINUED_METHODDEF
+ OS_WIFSTOPPED_METHODDEF
+ OS_WIFSIGNALED_METHODDEF
+ OS_WIFEXITED_METHODDEF
+ OS_WEXITSTATUS_METHODDEF
+ OS_WTERMSIG_METHODDEF
+ OS_WSTOPSIG_METHODDEF
+ OS_FSTATVFS_METHODDEF
+ OS_STATVFS_METHODDEF
+ OS_CONFSTR_METHODDEF
+ OS_SYSCONF_METHODDEF
+ OS_FPATHCONF_METHODDEF
+ OS_PATHCONF_METHODDEF
+ OS_ABORT_METHODDEF
+ OS__GETFULLPATHNAME_METHODDEF
+ OS__ISDIR_METHODDEF
+ OS__GETDISKUSAGE_METHODDEF
+ OS__GETFINALPATHNAME_METHODDEF
+ OS__GETVOLUMEPATHNAME_METHODDEF
+ OS_GETLOADAVG_METHODDEF
+ OS_URANDOM_METHODDEF
+ OS_SETRESUID_METHODDEF
+ OS_SETRESGID_METHODDEF
+ OS_GETRESUID_METHODDEF
+ OS_GETRESGID_METHODDEF
+
+ OS_GETXATTR_METHODDEF
+ OS_SETXATTR_METHODDEF
+ OS_REMOVEXATTR_METHODDEF
+ OS_LISTXATTR_METHODDEF
-#ifdef USE_XATTRS
- {"setxattr", (PyCFunction)posix_setxattr,
- METH_VARARGS | METH_KEYWORDS,
- posix_setxattr__doc__},
- {"getxattr", (PyCFunction)posix_getxattr,
- METH_VARARGS | METH_KEYWORDS,
- posix_getxattr__doc__},
- {"removexattr", (PyCFunction)posix_removexattr,
- METH_VARARGS | METH_KEYWORDS,
- posix_removexattr__doc__},
- {"listxattr", (PyCFunction)posix_listxattr,
- METH_VARARGS | METH_KEYWORDS,
- posix_listxattr__doc__},
-#endif
#if defined(TERMSIZE_USE_CONIO) || defined(TERMSIZE_USE_IOCTL)
{"get_terminal_size", get_terminal_size, METH_VARARGS, termsize__doc__},
#endif
- {"cpu_count", (PyCFunction)posix_cpu_count,
- METH_NOARGS, posix_cpu_count__doc__},
- {"get_inheritable", posix_get_inheritable, METH_VARARGS, get_inheritable__doc__},
- {"set_inheritable", posix_set_inheritable, METH_VARARGS, set_inheritable__doc__},
-#ifdef MS_WINDOWS
- {"get_handle_inheritable", posix_get_handle_inheritable,
- METH_VARARGS, get_handle_inheritable__doc__},
- {"set_handle_inheritable", posix_set_handle_inheritable,
- METH_VARARGS, set_handle_inheritable__doc__},
+ OS_CPU_COUNT_METHODDEF
+ OS_GET_INHERITABLE_METHODDEF
+ OS_SET_INHERITABLE_METHODDEF
+ OS_GET_HANDLE_INHERITABLE_METHODDEF
+ OS_SET_HANDLE_INHERITABLE_METHODDEF
+#ifndef MS_WINDOWS
+ {"get_blocking", posix_get_blocking, METH_VARARGS, get_blocking__doc__},
+ {"set_blocking", posix_set_blocking, METH_VARARGS, set_blocking__doc__},
#endif
+ {"scandir", (PyCFunction)posix_scandir,
+ METH_VARARGS | METH_KEYWORDS,
+ posix_scandir__doc__},
{NULL, NULL} /* Sentinel */
};
@@ -12102,15 +12813,6 @@ all_ins(PyObject *m)
}
-#if (defined(_MSC_VER) || defined(__WATCOMC__) || defined(__BORLANDC__)) && !defined(__QNX__)
-#define INITFUNC PyInit_nt
-#define MODNAME "nt"
-
-#else
-#define INITFUNC PyInit_posix
-#define MODNAME "posix"
-#endif
-
static struct PyModuleDef posixmodule = {
PyModuleDef_HEAD_INIT,
MODNAME,
@@ -12170,7 +12872,7 @@ static char *have_functions[] = {
"HAVE_FSTATVFS",
#endif
-#ifdef HAVE_FTRUNCATE
+#if defined HAVE_FTRUNCATE || defined MS_WINDOWS
"HAVE_FTRUNCATE",
#endif
@@ -12324,13 +13026,19 @@ INITFUNC(void)
sched_param_desc.name = MODNAME ".sched_param";
if (PyStructSequence_InitType2(&SchedParamType, &sched_param_desc) < 0)
return NULL;
- SchedParamType.tp_new = sched_param_new;
+ SchedParamType.tp_new = os_sched_param;
#endif
/* initialize TerminalSize_info */
if (PyStructSequence_InitType2(&TerminalSizeType,
&TerminalSize_desc) < 0)
return NULL;
+
+ /* initialize scandir types */
+ if (PyType_Ready(&ScandirIteratorType) < 0)
+ return NULL;
+ if (PyType_Ready(&DirEntryType) < 0)
+ return NULL;
}
#if defined(HAVE_WAITID) && !defined(__APPLE__)
Py_INCREF((PyObject*) &WaitidResultType);
diff --git a/Modules/pwdmodule.c b/Modules/pwdmodule.c
index ebb8712018..281c30b26e 100644
--- a/Modules/pwdmodule.c
+++ b/Modules/pwdmodule.c
@@ -6,6 +6,12 @@
#include <pwd.h>
+#include "clinic/pwdmodule.c.h"
+/*[clinic input]
+module pwd
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=60f628ef356b97b6]*/
+
static PyStructSequence_Field struct_pwd_type_fields[] = {
{"pw_name", "user name"},
{"pw_passwd", "password"},
@@ -87,18 +93,25 @@ mkpwent(struct passwd *p)
return v;
}
-PyDoc_STRVAR(pwd_getpwuid__doc__,
-"getpwuid(uid) -> (pw_name,pw_passwd,pw_uid,\n\
- pw_gid,pw_gecos,pw_dir,pw_shell)\n\
-Return the password database entry for the given numeric user ID.\n\
-See help(pwd) for more on password database entries.");
+/*[clinic input]
+pwd.getpwuid
+
+ uidobj: object
+ /
+
+Return the password database entry for the given numeric user ID.
+
+See `help(pwd)` for more on password database entries.
+[clinic start generated code]*/
static PyObject *
-pwd_getpwuid(PyObject *self, PyObject *args)
+pwd_getpwuid(PyModuleDef *module, PyObject *uidobj)
+/*[clinic end generated code: output=cba29ae4c2bcb8e1 input=ae64d507a1c6d3e8]*/
{
uid_t uid;
struct passwd *p;
- if (!PyArg_ParseTuple(args, "O&:getpwuid", _Py_Uid_Converter, &uid)) {
+
+ if (!_Py_Uid_Converter(uidobj, &uid)) {
if (PyErr_ExceptionMatches(PyExc_OverflowError))
PyErr_Format(PyExc_KeyError,
"getpwuid(): uid not found");
@@ -116,21 +129,25 @@ pwd_getpwuid(PyObject *self, PyObject *args)
return mkpwent(p);
}
-PyDoc_STRVAR(pwd_getpwnam__doc__,
-"getpwnam(name) -> (pw_name,pw_passwd,pw_uid,\n\
- pw_gid,pw_gecos,pw_dir,pw_shell)\n\
-Return the password database entry for the given user name.\n\
-See help(pwd) for more on password database entries.");
+/*[clinic input]
+pwd.getpwnam
+
+ arg: unicode
+ /
+
+Return the password database entry for the given user name.
+
+See `help(pwd)` for more on password database entries.
+[clinic start generated code]*/
static PyObject *
-pwd_getpwnam(PyObject *self, PyObject *args)
+pwd_getpwnam_impl(PyModuleDef *module, PyObject *arg)
+/*[clinic end generated code: output=66848d42d386fca3 input=d5f7e700919b02d3]*/
{
char *name;
struct passwd *p;
- PyObject *arg, *bytes, *retval = NULL;
+ PyObject *bytes, *retval = NULL;
- if (!PyArg_ParseTuple(args, "U:getpwnam", &arg))
- return NULL;
if ((bytes = PyUnicode_EncodeFSDefault(arg)) == NULL)
return NULL;
if (PyBytes_AsStringAndSize(bytes, &name, NULL) == -1)
@@ -147,14 +164,17 @@ out:
}
#ifdef HAVE_GETPWENT
-PyDoc_STRVAR(pwd_getpwall__doc__,
-"getpwall() -> list_of_entries\n\
-Return a list of all available password database entries, \
-in arbitrary order.\n\
-See help(pwd) for more on password database entries.");
+/*[clinic input]
+pwd.getpwall
+
+Return a list of all available password database entries, in arbitrary order.
+
+See help(pwd) for more on password database entries.
+[clinic start generated code]*/
static PyObject *
-pwd_getpwall(PyObject *self)
+pwd_getpwall_impl(PyModuleDef *module)
+/*[clinic end generated code: output=ab30e37bf26d431d input=d7ecebfd90219b85]*/
{
PyObject *d;
struct passwd *p;
@@ -177,11 +197,10 @@ pwd_getpwall(PyObject *self)
#endif
static PyMethodDef pwd_methods[] = {
- {"getpwuid", pwd_getpwuid, METH_VARARGS, pwd_getpwuid__doc__},
- {"getpwnam", pwd_getpwnam, METH_VARARGS, pwd_getpwnam__doc__},
+ PWD_GETPWUID_METHODDEF
+ PWD_GETPWNAM_METHODDEF
#ifdef HAVE_GETPWENT
- {"getpwall", (PyCFunction)pwd_getpwall,
- METH_NOARGS, pwd_getpwall__doc__},
+ PWD_GETPWALL_METHODDEF
#endif
{NULL, NULL} /* sentinel */
};
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
index 6a901f756c..9a6da737fb 100644
--- a/Modules/pyexpat.c
+++ b/Modules/pyexpat.c
@@ -6,6 +6,13 @@
#include "pyexpat.h"
+/* Do not emit Clinic output to a file as that wreaks havoc with conditionally
+ included methods. */
+/*[clinic input]
+module pyexpat
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=b168d503a4490c15]*/
+
#define XML_COMBINED_VERSION (10000*XML_MAJOR_VERSION+100*XML_MINOR_VERSION+XML_MICRO_VERSION)
static XML_Memory_Handling_Suite ExpatMemoryHandler = {
@@ -61,6 +68,8 @@ typedef struct {
PyObject **handlers;
} xmlparseobject;
+#include "clinic/pyexpat.c.h"
+
#define CHARACTER_DATA_BUFFER_SIZE 8192
static PyTypeObject Xmlparsetype;
@@ -671,6 +680,11 @@ VOID_HANDLER(StartDoctypeDecl,
VOID_HANDLER(EndDoctypeDecl, (void *userData), ("()"))
/* ---------------------------------------------------------------- */
+/*[clinic input]
+class pyexpat.xmlparser "xmlparseobject *" "&Xmlparsetype"
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=2393162385232e1c]*/
+
static PyObject *
get_parse_result(xmlparseobject *self, int rv)
@@ -687,25 +701,30 @@ get_parse_result(xmlparseobject *self, int rv)
return PyLong_FromLong(rv);
}
-PyDoc_STRVAR(xmlparse_Parse__doc__,
-"Parse(data[, isfinal])\n\
-Parse XML data. `isfinal' should be true at end of input.");
-
#define MAX_CHUNK_SIZE (1 << 20)
+/*[clinic input]
+pyexpat.xmlparser.Parse
+
+ data: object
+ isfinal: int(c_default="0") = False
+ /
+
+Parse XML data.
+
+`isfinal' should be true at end of input.
+[clinic start generated code]*/
+
static PyObject *
-xmlparse_Parse(xmlparseobject *self, PyObject *args)
+pyexpat_xmlparser_Parse_impl(xmlparseobject *self, PyObject *data,
+ int isfinal)
+/*[clinic end generated code: output=f4db843dd1f4ed4b input=199d9e8e92ebbb4b]*/
{
- PyObject *data;
- int isFinal = 0;
const char *s;
Py_ssize_t slen;
Py_buffer view;
int rc;
- if (!PyArg_ParseTuple(args, "O|i:Parse", &data, &isFinal))
- return NULL;
-
if (PyUnicode_Check(data)) {
view.buf = NULL;
s = PyUnicode_AsUTF8AndSize(data, &slen);
@@ -729,7 +748,7 @@ xmlparse_Parse(xmlparseobject *self, PyObject *args)
slen -= MAX_CHUNK_SIZE;
}
assert(MAX_CHUNK_SIZE < INT_MAX && slen < INT_MAX);
- rc = XML_Parse(self->itself, s, (int)slen, isFinal);
+ rc = XML_Parse(self->itself, s, (int)slen, isfinal);
done:
if (view.buf != NULL)
@@ -780,18 +799,24 @@ error:
return -1;
}
-PyDoc_STRVAR(xmlparse_ParseFile__doc__,
-"ParseFile(file)\n\
-Parse XML data from file-like object.");
+/*[clinic input]
+pyexpat.xmlparser.ParseFile
+
+ file: object
+ /
+
+Parse XML data from file-like object.
+[clinic start generated code]*/
static PyObject *
-xmlparse_ParseFile(xmlparseobject *self, PyObject *f)
+pyexpat_xmlparser_ParseFile(xmlparseobject *self, PyObject *file)
+/*[clinic end generated code: output=2adc6a13100cc42b input=fbb5a12b6038d735]*/
{
int rv = 1;
PyObject *readmethod = NULL;
_Py_IDENTIFIER(read);
- readmethod = _PyObject_GetAttrId(f, &PyId_read);
+ readmethod = _PyObject_GetAttrId(file, &PyId_read);
if (readmethod == NULL) {
PyErr_SetString(PyExc_TypeError,
"argument must have 'read' attribute");
@@ -823,42 +848,50 @@ xmlparse_ParseFile(xmlparseobject *self, PyObject *f)
return get_parse_result(self, rv);
}
-PyDoc_STRVAR(xmlparse_SetBase__doc__,
-"SetBase(base_url)\n\
-Set the base URL for the parser.");
+/*[clinic input]
+pyexpat.xmlparser.SetBase
+
+ base: str
+ /
+
+Set the base URL for the parser.
+[clinic start generated code]*/
static PyObject *
-xmlparse_SetBase(xmlparseobject *self, PyObject *args)
+pyexpat_xmlparser_SetBase_impl(xmlparseobject *self, const char *base)
+/*[clinic end generated code: output=c212ddceb607b539 input=c684e5de895ee1a8]*/
{
- char *base;
-
- if (!PyArg_ParseTuple(args, "s:SetBase", &base))
- return NULL;
if (!XML_SetBase(self->itself, base)) {
return PyErr_NoMemory();
}
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
-PyDoc_STRVAR(xmlparse_GetBase__doc__,
-"GetBase() -> url\n\
-Return base URL string for the parser.");
+/*[clinic input]
+pyexpat.xmlparser.GetBase
+
+Return base URL string for the parser.
+[clinic start generated code]*/
static PyObject *
-xmlparse_GetBase(xmlparseobject *self, PyObject *unused)
+pyexpat_xmlparser_GetBase_impl(xmlparseobject *self)
+/*[clinic end generated code: output=2886cb21f9a8739a input=918d71c38009620e]*/
{
return Py_BuildValue("z", XML_GetBase(self->itself));
}
-PyDoc_STRVAR(xmlparse_GetInputContext__doc__,
-"GetInputContext() -> string\n\
-Return the untranslated text of the input that caused the current event.\n\
-If the event was generated by a large amount of text (such as a start tag\n\
-for an element with many attributes), not all of the text may be available.");
+/*[clinic input]
+pyexpat.xmlparser.GetInputContext
+
+Return the untranslated text of the input that caused the current event.
+
+If the event was generated by a large amount of text (such as a start tag
+for an element with many attributes), not all of the text may be available.
+[clinic start generated code]*/
static PyObject *
-xmlparse_GetInputContext(xmlparseobject *self, PyObject *unused)
+pyexpat_xmlparser_GetInputContext_impl(xmlparseobject *self)
+/*[clinic end generated code: output=a88026d683fc22cc input=034df8712db68379]*/
{
if (self->in_callback) {
int offset, size;
@@ -875,24 +908,25 @@ xmlparse_GetInputContext(xmlparseobject *self, PyObject *unused)
Py_RETURN_NONE;
}
-PyDoc_STRVAR(xmlparse_ExternalEntityParserCreate__doc__,
-"ExternalEntityParserCreate(context[, encoding])\n\
-Create a parser for parsing an external entity based on the\n\
-information passed to the ExternalEntityRefHandler.");
+/*[clinic input]
+pyexpat.xmlparser.ExternalEntityParserCreate
+
+ context: str(accept={str, NoneType})
+ encoding: str = NULL
+ /
+
+Create a parser for parsing an external entity based on the information passed to the ExternalEntityRefHandler.
+[clinic start generated code]*/
static PyObject *
-xmlparse_ExternalEntityParserCreate(xmlparseobject *self, PyObject *args)
+pyexpat_xmlparser_ExternalEntityParserCreate_impl(xmlparseobject *self,
+ const char *context,
+ const char *encoding)
+/*[clinic end generated code: output=535cda9d7a0fbcd6 input=b906714cc122c322]*/
{
- char *context;
- char *encoding = NULL;
xmlparseobject *new_parser;
int i;
- if (!PyArg_ParseTuple(args, "z|s:ExternalEntityParserCreate",
- &context, &encoding)) {
- return NULL;
- }
-
new_parser = PyObject_GC_New(xmlparseobject, &Xmlparsetype);
if (new_parser == NULL)
return NULL;
@@ -948,41 +982,49 @@ xmlparse_ExternalEntityParserCreate(xmlparseobject *self, PyObject *args)
return (PyObject *)new_parser;
}
-PyDoc_STRVAR(xmlparse_SetParamEntityParsing__doc__,
-"SetParamEntityParsing(flag) -> success\n\
-Controls parsing of parameter entities (including the external DTD\n\
-subset). Possible flag values are XML_PARAM_ENTITY_PARSING_NEVER,\n\
-XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE and\n\
-XML_PARAM_ENTITY_PARSING_ALWAYS. Returns true if setting the flag\n\
-was successful.");
+/*[clinic input]
+pyexpat.xmlparser.SetParamEntityParsing
-static PyObject*
-xmlparse_SetParamEntityParsing(xmlparseobject *p, PyObject* args)
+ flag: int
+ /
+
+Controls parsing of parameter entities (including the external DTD subset).
+
+Possible flag values are XML_PARAM_ENTITY_PARSING_NEVER,
+XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE and
+XML_PARAM_ENTITY_PARSING_ALWAYS. Returns true if setting the flag
+was successful.
+[clinic start generated code]*/
+
+static PyObject *
+pyexpat_xmlparser_SetParamEntityParsing_impl(xmlparseobject *self, int flag)
+/*[clinic end generated code: output=18668ee8e760d64c input=8aea19b4b15e9af1]*/
{
- int flag;
- if (!PyArg_ParseTuple(args, "i", &flag))
- return NULL;
- flag = XML_SetParamEntityParsing(p->itself, flag);
+ flag = XML_SetParamEntityParsing(self->itself, flag);
return PyLong_FromLong(flag);
}
#if XML_COMBINED_VERSION >= 19505
-PyDoc_STRVAR(xmlparse_UseForeignDTD__doc__,
-"UseForeignDTD([flag])\n\
-Allows the application to provide an artificial external subset if one is\n\
-not specified as part of the document instance. This readily allows the\n\
-use of a 'default' document type controlled by the application, while still\n\
-getting the advantage of providing document type information to the parser.\n\
-'flag' defaults to True if not provided.");
+/*[clinic input]
+pyexpat.xmlparser.UseForeignDTD
+
+ flag: bool = True
+ /
+
+Allows the application to provide an artificial external subset if one is not specified as part of the document instance.
+
+This readily allows the use of a 'default' document type controlled by the
+application, while still getting the advantage of providing document type
+information to the parser. 'flag' defaults to True if not provided.
+[clinic start generated code]*/
static PyObject *
-xmlparse_UseForeignDTD(xmlparseobject *self, PyObject *args)
+pyexpat_xmlparser_UseForeignDTD_impl(xmlparseobject *self, int flag)
+/*[clinic end generated code: output=cfaa9aa50bb0f65c input=78144c519d116a6e]*/
{
- int flag = 1;
enum XML_Error rc;
- if (!PyArg_ParseTuple(args, "|p:UseForeignDTD", &flag))
- return NULL;
+
rc = XML_UseForeignDTD(self->itself, flag ? XML_TRUE : XML_FALSE);
if (rc != XML_ERROR_NONE) {
return set_error(self, rc);
@@ -992,29 +1034,70 @@ xmlparse_UseForeignDTD(xmlparseobject *self, PyObject *args)
}
#endif
-static PyObject *xmlparse_dir(PyObject *self, PyObject* noargs);
+/*[clinic input]
+pyexpat.xmlparser.__dir__
+[clinic start generated code]*/
+
+static PyObject *
+pyexpat_xmlparser___dir___impl(xmlparseobject *self)
+/*[clinic end generated code: output=bc22451efb9e4d17 input=76aa455f2a661384]*/
+{
+#define APPEND(list, str) \
+ do { \
+ PyObject *o = PyUnicode_FromString(str); \
+ if (o != NULL) \
+ PyList_Append(list, o); \
+ Py_XDECREF(o); \
+ } while (0)
+
+ int i;
+ PyObject *rc = PyList_New(0);
+ if (!rc)
+ return NULL;
+ for (i = 0; handler_info[i].name != NULL; i++) {
+ PyObject *o = get_handler_name(&handler_info[i]);
+ if (o != NULL)
+ PyList_Append(rc, o);
+ Py_XDECREF(o);
+ }
+ APPEND(rc, "ErrorCode");
+ APPEND(rc, "ErrorLineNumber");
+ APPEND(rc, "ErrorColumnNumber");
+ APPEND(rc, "ErrorByteIndex");
+ APPEND(rc, "CurrentLineNumber");
+ APPEND(rc, "CurrentColumnNumber");
+ APPEND(rc, "CurrentByteIndex");
+ APPEND(rc, "buffer_size");
+ APPEND(rc, "buffer_text");
+ APPEND(rc, "buffer_used");
+ APPEND(rc, "namespace_prefixes");
+ APPEND(rc, "ordered_attributes");
+ APPEND(rc, "specified_attributes");
+ APPEND(rc, "intern");
+
+#undef APPEND
+
+ if (PyErr_Occurred()) {
+ Py_DECREF(rc);
+ rc = NULL;
+ }
+
+ return rc;
+}
static struct PyMethodDef xmlparse_methods[] = {
- {"Parse", (PyCFunction)xmlparse_Parse,
- METH_VARARGS, xmlparse_Parse__doc__},
- {"ParseFile", (PyCFunction)xmlparse_ParseFile,
- METH_O, xmlparse_ParseFile__doc__},
- {"SetBase", (PyCFunction)xmlparse_SetBase,
- METH_VARARGS, xmlparse_SetBase__doc__},
- {"GetBase", (PyCFunction)xmlparse_GetBase,
- METH_NOARGS, xmlparse_GetBase__doc__},
- {"ExternalEntityParserCreate", (PyCFunction)xmlparse_ExternalEntityParserCreate,
- METH_VARARGS, xmlparse_ExternalEntityParserCreate__doc__},
- {"SetParamEntityParsing", (PyCFunction)xmlparse_SetParamEntityParsing,
- METH_VARARGS, xmlparse_SetParamEntityParsing__doc__},
- {"GetInputContext", (PyCFunction)xmlparse_GetInputContext,
- METH_NOARGS, xmlparse_GetInputContext__doc__},
+ PYEXPAT_XMLPARSER_PARSE_METHODDEF
+ PYEXPAT_XMLPARSER_PARSEFILE_METHODDEF
+ PYEXPAT_XMLPARSER_SETBASE_METHODDEF
+ PYEXPAT_XMLPARSER_GETBASE_METHODDEF
+ PYEXPAT_XMLPARSER_GETINPUTCONTEXT_METHODDEF
+ PYEXPAT_XMLPARSER_EXTERNALENTITYPARSERCREATE_METHODDEF
+ PYEXPAT_XMLPARSER_SETPARAMENTITYPARSING_METHODDEF
#if XML_COMBINED_VERSION >= 19505
- {"UseForeignDTD", (PyCFunction)xmlparse_UseForeignDTD,
- METH_VARARGS, xmlparse_UseForeignDTD__doc__},
+ PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF
#endif
- {"__dir__", xmlparse_dir, METH_NOARGS},
- {NULL, NULL} /* sentinel */
+ PYEXPAT_XMLPARSER___DIR___METHODDEF
+ {NULL, NULL} /* sentinel */
};
/* ---------- */
@@ -1077,7 +1160,7 @@ PyUnknownEncodingHandler(void *encodingHandlerData,
static PyObject *
-newxmlparseobject(char *encoding, char *namespace_separator, PyObject *intern)
+newxmlparseobject(const char *encoding, const char *namespace_separator, PyObject *intern)
{
int i;
xmlparseobject *self;
@@ -1255,52 +1338,6 @@ xmlparse_getattro(xmlparseobject *self, PyObject *nameobj)
return PyObject_GenericGetAttr((PyObject*)self, nameobj);
}
-static PyObject *
-xmlparse_dir(PyObject *self, PyObject* noargs)
-{
-#define APPEND(list, str) \
- do { \
- PyObject *o = PyUnicode_FromString(str); \
- if (o != NULL) \
- PyList_Append(list, o); \
- Py_XDECREF(o); \
- } while (0)
-
- int i;
- PyObject *rc = PyList_New(0);
- if (!rc)
- return NULL;
- for (i = 0; handler_info[i].name != NULL; i++) {
- PyObject *o = get_handler_name(&handler_info[i]);
- if (o != NULL)
- PyList_Append(rc, o);
- Py_XDECREF(o);
- }
- APPEND(rc, "ErrorCode");
- APPEND(rc, "ErrorLineNumber");
- APPEND(rc, "ErrorColumnNumber");
- APPEND(rc, "ErrorByteIndex");
- APPEND(rc, "CurrentLineNumber");
- APPEND(rc, "CurrentColumnNumber");
- APPEND(rc, "CurrentByteIndex");
- APPEND(rc, "buffer_size");
- APPEND(rc, "buffer_text");
- APPEND(rc, "buffer_used");
- APPEND(rc, "namespace_prefixes");
- APPEND(rc, "ordered_attributes");
- APPEND(rc, "specified_attributes");
- APPEND(rc, "intern");
-
-#undef APPEND
-
- if (PyErr_Occurred()) {
- Py_DECREF(rc);
- rc = NULL;
- }
-
- return rc;
-}
-
static int
sethandler(xmlparseobject *self, PyObject *name, PyObject* v)
{
@@ -1512,24 +1549,24 @@ static PyTypeObject Xmlparsetype = {
/* End of code for xmlparser objects */
/* -------------------------------------------------------- */
-PyDoc_STRVAR(pyexpat_ParserCreate__doc__,
-"ParserCreate([encoding[, namespace_separator]]) -> parser\n\
-Return a new XML parser object.");
+/*[clinic input]
+pyexpat.ParserCreate
+
+ encoding: str(accept={str, NoneType}) = NULL
+ namespace_separator: str(accept={str, NoneType}) = NULL
+ intern: object = NULL
+
+Return a new XML parser object.
+[clinic start generated code]*/
static PyObject *
-pyexpat_ParserCreate(PyObject *notused, PyObject *args, PyObject *kw)
+pyexpat_ParserCreate_impl(PyModuleDef *module, const char *encoding,
+ const char *namespace_separator, PyObject *intern)
+/*[clinic end generated code: output=81fccd233e1743a8 input=23d29704acad385d]*/
{
- char *encoding = NULL;
- char *namespace_separator = NULL;
- PyObject *intern = NULL;
PyObject *result;
int intern_decref = 0;
- static char *kwlist[] = {"encoding", "namespace_separator",
- "intern", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kw, "|zzO:ParserCreate", kwlist,
- &encoding, &namespace_separator, &intern))
- return NULL;
if (namespace_separator != NULL
&& strlen(namespace_separator) > 1) {
PyErr_SetString(PyExc_ValueError,
@@ -1559,29 +1596,28 @@ pyexpat_ParserCreate(PyObject *notused, PyObject *args, PyObject *kw)
return result;
}
-PyDoc_STRVAR(pyexpat_ErrorString__doc__,
-"ErrorString(errno) -> string\n\
-Returns string error for given number.");
+/*[clinic input]
+pyexpat.ErrorString
+
+ code: long
+ /
+
+Returns string error for given number.
+[clinic start generated code]*/
static PyObject *
-pyexpat_ErrorString(PyObject *self, PyObject *args)
+pyexpat_ErrorString_impl(PyModuleDef *module, long code)
+/*[clinic end generated code: output=d87668108b6868e5 input=cc67de010d9e62b3]*/
{
- long code = 0;
-
- if (!PyArg_ParseTuple(args, "l:ErrorString", &code))
- return NULL;
return Py_BuildValue("z", XML_ErrorString((int)code));
}
/* List of methods defined in the module */
static struct PyMethodDef pyexpat_methods[] = {
- {"ParserCreate", (PyCFunction)pyexpat_ParserCreate,
- METH_VARARGS|METH_KEYWORDS, pyexpat_ParserCreate__doc__},
- {"ErrorString", (PyCFunction)pyexpat_ErrorString,
- METH_VARARGS, pyexpat_ErrorString__doc__},
-
- {NULL, (PyCFunction)NULL, 0, NULL} /* sentinel */
+ PYEXPAT_PARSERCREATE_METHODDEF
+ PYEXPAT_ERRORSTRING_METHODDEF
+ {NULL, NULL} /* sentinel */
};
/* Module docstring */
@@ -1599,16 +1635,6 @@ PyDoc_STRVAR(pyexpat_module_documentation,
#define MODULE_INITFUNC PyInit_pyexpat
#endif
-#ifndef PyMODINIT_FUNC
-# ifdef MS_WINDOWS
-# define PyMODINIT_FUNC __declspec(dllexport) void
-# else
-# define PyMODINIT_FUNC void
-# endif
-#endif
-
-PyMODINIT_FUNC MODULE_INITFUNC(void); /* avoid compiler warnings */
-
static struct PyModuleDef pyexpatmodule = {
PyModuleDef_HEAD_INIT,
MODULE_NAME,
@@ -1666,7 +1692,7 @@ MODULE_INITFUNC(void)
PyModule_AddObject(m, "XMLParserType", (PyObject *) &Xmlparsetype);
PyModule_AddStringConstant(m, "EXPAT_VERSION",
- (char *) XML_ExpatVersion());
+ XML_ExpatVersion());
{
XML_Expat_Version info = XML_ExpatVersionInfo();
PyModule_AddObject(m, "version_info",
@@ -1746,7 +1772,7 @@ MODULE_INITFUNC(void)
#define MYCONST(name) \
if (PyModule_AddStringConstant(errors_module, #name, \
- (char *)XML_ErrorString(name)) < 0) \
+ XML_ErrorString(name)) < 0) \
return NULL; \
tmpnum = PyLong_FromLong(name); \
if (tmpnum == NULL) return NULL; \
@@ -1957,3 +1983,8 @@ static struct HandlerInfo handler_info[] = {
{NULL, NULL, NULL} /* sentinel */
};
+
+/*[clinic input]
+dump buffer
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=524ce2e021e4eba6]*/
diff --git a/Modules/readline.c b/Modules/readline.c
index e9eabf5d98..8c00decd25 100644
--- a/Modules/readline.c
+++ b/Modules/readline.c
@@ -78,10 +78,12 @@ on_completion_display_matches_hook(char **matches,
static char *completer_word_break_characters;
typedef struct {
+ /* Specify hook functions in Python */
PyObject *completion_display_matches_hook;
PyObject *startup_hook;
PyObject *pre_input_hook;
- PyObject *completer;
+
+ PyObject *completer; /* Specify a word completer in Python */
PyObject *begidx;
PyObject *endidx;
} readlinestate;
@@ -147,7 +149,7 @@ parse_and_bind(PyObject *self, PyObject *args)
PyDoc_STRVAR(doc_parse_and_bind,
"parse_and_bind(string) -> None\n\
-Parse and execute single line of a readline init file.");
+Execute the init line provided in the string argument.");
/* Exported function to parse a readline init file */
@@ -172,7 +174,7 @@ read_init_file(PyObject *self, PyObject *args)
PyDoc_STRVAR(doc_read_init_file,
"read_init_file([filename]) -> None\n\
-Parse a readline initialization file.\n\
+Execute a readline initialization file.\n\
The default filename is the last filename used.");
@@ -237,6 +239,43 @@ Save a readline history file.\n\
The default filename is ~/.history.");
+#ifdef HAVE_RL_APPEND_HISTORY
+/* Exported function to save part of a readline history file */
+
+static PyObject *
+append_history_file(PyObject *self, PyObject *args)
+{
+ int nelements;
+ PyObject *filename_obj = Py_None, *filename_bytes;
+ char *filename;
+ int err;
+ if (!PyArg_ParseTuple(args, "i|O:append_history_file", &nelements, &filename_obj))
+ return NULL;
+ if (filename_obj != Py_None) {
+ if (!PyUnicode_FSConverter(filename_obj, &filename_bytes))
+ return NULL;
+ filename = PyBytes_AsString(filename_bytes);
+ } else {
+ filename_bytes = NULL;
+ filename = NULL;
+ }
+ errno = err = append_history(nelements, filename);
+ if (!err && _history_length >= 0)
+ history_truncate_file(filename, _history_length);
+ Py_XDECREF(filename_bytes);
+ errno = err;
+ if (errno)
+ return PyErr_SetFromErrno(PyExc_IOError);
+ Py_RETURN_NONE;
+}
+
+PyDoc_STRVAR(doc_append_history_file,
+"append_history_file(nelements[, filename]) -> None\n\
+Append the last nelements items of the history list to file.\n\
+The default filename is ~/.history.");
+#endif
+
+
/* Set history length */
static PyObject*
@@ -251,7 +290,7 @@ set_history_length(PyObject *self, PyObject *args)
PyDoc_STRVAR(set_history_length_doc,
"set_history_length(length) -> None\n\
-set the maximal number of items which will be written to\n\
+set the maximal number of lines which will be written to\n\
the history file. A negative length is used to inhibit\n\
history truncation.");
@@ -266,7 +305,7 @@ get_history_length(PyObject *self, PyObject *noarg)
PyDoc_STRVAR(get_history_length_doc,
"get_history_length() -> int\n\
-return the maximum number of items that will be written to\n\
+return the maximum number of lines that will be written to\n\
the history file.");
@@ -299,13 +338,6 @@ set_hook(const char *funcname, PyObject **hook_var, PyObject *args)
}
-/* Exported functions to specify hook functions in Python */
-
-
-#ifdef HAVE_RL_PRE_INPUT_HOOK
-
-#endif
-
static PyObject *
set_completion_display_matches_hook(PyObject *self, PyObject *args)
{
@@ -341,7 +373,7 @@ set_startup_hook(PyObject *self, PyObject *args)
PyDoc_STRVAR(doc_set_startup_hook,
"set_startup_hook([function]) -> None\n\
-Set or remove the startup_hook function.\n\
+Set or remove the function invoked by the rl_startup_hook callback.\n\
The function is called with no arguments just\n\
before readline prints the first prompt.");
@@ -358,7 +390,7 @@ set_pre_input_hook(PyObject *self, PyObject *args)
PyDoc_STRVAR(doc_set_pre_input_hook,
"set_pre_input_hook([function]) -> None\n\
-Set or remove the pre_input_hook function.\n\
+Set or remove the function invoked by the rl_pre_input_hook callback.\n\
The function is called with no arguments after the first prompt\n\
has been printed and just before readline starts reading input\n\
characters.");
@@ -366,14 +398,6 @@ characters.");
#endif
-/* Exported function to specify a word completer in Python */
-
-
-
-
-
-
-
/* Get the completion type for the scope of the tab-completion */
static PyObject *
get_completion_type(PyObject *self, PyObject *noarg)
@@ -397,7 +421,7 @@ get_begidx(PyObject *self, PyObject *noarg)
PyDoc_STRVAR(doc_get_begidx,
"get_begidx() -> int\n\
-get the beginning index of the readline tab-completion scope");
+get the beginning index of the completion scope");
/* Get the ending index for the scope of the tab-completion */
@@ -411,7 +435,7 @@ get_endidx(PyObject *self, PyObject *noarg)
PyDoc_STRVAR(doc_get_endidx,
"get_endidx() -> int\n\
-get the ending index of the readline tab-completion scope");
+get the ending index of the completion scope");
/* Set the tab-completion word-delimiters that readline uses */
@@ -440,7 +464,7 @@ set_completer_delims(PyObject *self, PyObject *args)
PyDoc_STRVAR(doc_set_completer_delims,
"set_completer_delims(string) -> None\n\
-set the readline word delimiters for tab-completion");
+set the word delimiters for completion");
/* _py_free_history_entry: Utility function to free a history entry. */
@@ -480,7 +504,7 @@ py_remove_history(PyObject *self, PyObject *args)
int entry_number;
HIST_ENTRY *entry;
- if (!PyArg_ParseTuple(args, "i:remove_history", &entry_number))
+ if (!PyArg_ParseTuple(args, "i:remove_history_item", &entry_number))
return NULL;
if (entry_number < 0) {
PyErr_SetString(PyExc_ValueError,
@@ -510,7 +534,7 @@ py_replace_history(PyObject *self, PyObject *args)
char *line;
HIST_ENTRY *old_entry;
- if (!PyArg_ParseTuple(args, "is:replace_history", &entry_number,
+ if (!PyArg_ParseTuple(args, "is:replace_history_item", &entry_number,
&line)) {
return NULL;
}
@@ -551,7 +575,7 @@ py_add_history(PyObject *self, PyObject *args)
PyDoc_STRVAR(doc_add_history,
"add_history(string) -> None\n\
-add a line to the history buffer");
+add an item to the history buffer");
/* Get the tab-completion word-delimiters that readline uses */
@@ -564,7 +588,7 @@ get_completer_delims(PyObject *self, PyObject *noarg)
PyDoc_STRVAR(doc_get_completer_delims,
"get_completer_delims() -> string\n\
-get the readline word delimiters for tab-completion");
+get the word delimiters for completion");
/* Set the completer function */
@@ -625,7 +649,7 @@ get_history_item(PyObject *self, PyObject *args)
int idx = 0;
HIST_ENTRY *hist_ent;
- if (!PyArg_ParseTuple(args, "i:index", &idx))
+ if (!PyArg_ParseTuple(args, "i:get_history_item", &idx))
return NULL;
#ifdef __APPLE__
if (using_libedit_emulation) {
@@ -717,7 +741,7 @@ insert_text(PyObject *self, PyObject *args)
PyDoc_STRVAR(doc_insert_text,
"insert_text(string) -> None\n\
-Insert text into the command line.");
+Insert text into the line buffer at the cursor position.");
/* Redisplay the line buffer */
@@ -748,6 +772,10 @@ static struct PyMethodDef readline_methods[] =
METH_VARARGS, doc_read_history_file},
{"write_history_file", write_history_file,
METH_VARARGS, doc_write_history_file},
+#ifdef HAVE_RL_APPEND_HISTORY
+ {"append_history_file", append_history_file,
+ METH_VARARGS, doc_append_history_file},
+#endif
{"get_history_item", get_history_item,
METH_VARARGS, doc_get_history_item},
{"get_current_history_length", (PyCFunction)get_current_history_length,
@@ -900,6 +928,26 @@ on_completion_display_matches_hook(char **matches,
#endif
+#ifdef HAVE_RL_RESIZE_TERMINAL
+static volatile sig_atomic_t sigwinch_received;
+static PyOS_sighandler_t sigwinch_ohandler;
+
+static void
+readline_sigwinch_handler(int signum)
+{
+ sigwinch_received = 1;
+ if (sigwinch_ohandler &&
+ sigwinch_ohandler != SIG_IGN && sigwinch_ohandler != SIG_DFL)
+ sigwinch_ohandler(signum);
+
+#ifndef HAVE_SIGACTION
+ /* If the handler was installed with signal() rather than sigaction(),
+ we need to reinstall it. */
+ PyOS_setsig(SIGWINCH, readline_sigwinch_handler);
+#endif
+}
+#endif
+
/* C function to call the Python completer. */
static char *
@@ -1005,6 +1053,10 @@ setup_readline(readlinestate *mod_state)
/* Bind both ESC-TAB and ESC-ESC to the completion function */
rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap);
rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap);
+#ifdef HAVE_RL_RESIZE_TERMINAL
+ /* Set up signal handler for window resize */
+ sigwinch_ohandler = PyOS_setsig(SIGWINCH, readline_sigwinch_handler);
+#endif
/* Set our hook functions */
rl_startup_hook = on_startup_hook;
#ifdef HAVE_RL_PRE_INPUT_HOOK
@@ -1023,7 +1075,7 @@ setup_readline(readlinestate *mod_state)
#ifndef __APPLE__
if (!isatty(STDOUT_FILENO)) {
- /* Issue #19884: stdout is no a terminal. Disable meta modifier
+ /* Issue #19884: stdout is not a terminal. Disable meta modifier
keys to not write the ANSI sequence "\033[1034h" into stdout. On
terminals supporting 8 bit characters like TERM=xterm-256color
(which is now the default Fedora since Fedora 18), the meta key is
@@ -1090,6 +1142,13 @@ readline_until_enter_or_signal(const char *prompt, int *signal)
struct timeval *timeoutp = NULL;
if (PyOS_InputHook)
timeoutp = &timeout;
+#ifdef HAVE_RL_RESIZE_TERMINAL
+ /* Update readline's view of the window size after SIGWINCH */
+ if (sigwinch_received) {
+ sigwinch_received = 0;
+ rl_resize_terminal();
+ }
+#endif
FD_SET(fileno(rl_instream), &selectset);
/* select resets selectset if no input was available */
has_input = select(fileno(rl_instream) + 1, &selectset,
@@ -1112,6 +1171,9 @@ readline_until_enter_or_signal(const char *prompt, int *signal)
#endif
if (s < 0) {
rl_free_line_state();
+#if defined(RL_READLINE_VERSION) && RL_READLINE_VERSION >= 0x0700
+ rl_callback_sigcleanup();
+#endif
rl_cleanup_after_signal();
rl_callback_handler_remove();
*signal = 1;
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
index 65fb6a4b38..00324a51bf 100644
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -193,51 +193,32 @@ select_select(PyObject *self, PyObject *args)
#endif /* SELECT_USES_HEAP */
PyObject *ifdlist, *ofdlist, *efdlist;
PyObject *ret = NULL;
- PyObject *tout = Py_None;
+ PyObject *timeout_obj = Py_None;
fd_set ifdset, ofdset, efdset;
struct timeval tv, *tvp;
int imax, omax, emax, max;
int n;
+ _PyTime_t timeout, deadline = 0;
/* convert arguments */
if (!PyArg_UnpackTuple(args, "select", 3, 4,
- &ifdlist, &ofdlist, &efdlist, &tout))
+ &ifdlist, &ofdlist, &efdlist, &timeout_obj))
return NULL;
- if (tout == Py_None)
- tvp = (struct timeval *)0;
- else if (!PyNumber_Check(tout)) {
- PyErr_SetString(PyExc_TypeError,
- "timeout must be a float or None");
- return NULL;
- }
+ if (timeout_obj == Py_None)
+ tvp = (struct timeval *)NULL;
else {
- /* On OpenBSD 5.4, timeval.tv_sec is a long.
- * Example: long is 64-bit, whereas time_t is 32-bit. */
- time_t sec;
- /* On OS X 64-bit, timeval.tv_usec is an int (and thus still 4
- bytes as required), but no longer defined by a long. */
- long usec;
- if (_PyTime_ObjectToTimeval(tout, &sec, &usec,
- _PyTime_ROUND_UP) == -1)
- return NULL;
-#ifdef MS_WINDOWS
- /* On Windows, timeval.tv_sec is a long (32 bit),
- * whereas time_t can be 64-bit. */
- assert(sizeof(tv.tv_sec) == sizeof(long));
-#if SIZEOF_TIME_T > SIZEOF_LONG
- if (sec > LONG_MAX) {
- PyErr_SetString(PyExc_OverflowError,
- "timeout is too large");
+ if (_PyTime_FromSecondsObject(&timeout, timeout_obj,
+ _PyTime_ROUND_CEILING) < 0) {
+ if (PyErr_ExceptionMatches(PyExc_TypeError)) {
+ PyErr_SetString(PyExc_TypeError,
+ "timeout must be a float or None");
+ }
return NULL;
}
-#endif
- tv.tv_sec = (long)sec;
-#else
- assert(sizeof(tv.tv_sec) >= sizeof(sec));
- tv.tv_sec = sec;
-#endif
- tv.tv_usec = usec;
+
+ if (_PyTime_AsTimeval(timeout, &tv, _PyTime_ROUND_CEILING) == -1)
+ return NULL;
if (tv.tv_sec < 0) {
PyErr_SetString(PyExc_ValueError, "timeout must be non-negative");
return NULL;
@@ -245,7 +226,6 @@ select_select(PyObject *self, PyObject *args)
tvp = &tv;
}
-
#ifdef SELECT_USES_HEAP
/* Allocate memory for the lists */
rfd2obj = PyMem_NEW(pylist, FD_SETSIZE + 1);
@@ -258,6 +238,7 @@ select_select(PyObject *self, PyObject *args)
return PyErr_NoMemory();
}
#endif /* SELECT_USES_HEAP */
+
/* Convert sequences to fd_sets, and get maximum fd number
* propagates the Python exception set in seq2set()
*/
@@ -270,13 +251,37 @@ select_select(PyObject *self, PyObject *args)
goto finally;
if ((emax=seq2set(efdlist, &efdset, efd2obj)) < 0)
goto finally;
+
max = imax;
if (omax > max) max = omax;
if (emax > max) max = emax;
- Py_BEGIN_ALLOW_THREADS
- n = select(max, &ifdset, &ofdset, &efdset, tvp);
- Py_END_ALLOW_THREADS
+ if (tvp)
+ deadline = _PyTime_GetMonotonicClock() + timeout;
+
+ do {
+ Py_BEGIN_ALLOW_THREADS
+ errno = 0;
+ n = select(max, &ifdset, &ofdset, &efdset, tvp);
+ Py_END_ALLOW_THREADS
+
+ if (errno != EINTR)
+ break;
+
+ /* select() was interrupted by a signal */
+ if (PyErr_CheckSignals())
+ goto finally;
+
+ if (tvp) {
+ timeout = deadline - _PyTime_GetMonotonicClock();
+ if (timeout < 0) {
+ n = 0;
+ break;
+ }
+ _PyTime_AsTimeval_noraise(timeout, &tv, _PyTime_ROUND_CEILING);
+ /* retry select() with the recomputed timeout */
+ }
+ } while (1);
#ifdef MS_WINDOWS
if (n == SOCKET_ERROR) {
@@ -516,30 +521,39 @@ any descriptors that have events or errors to report.");
static PyObject *
poll_poll(pollObject *self, PyObject *args)
{
- PyObject *result_list = NULL, *tout = NULL;
- int timeout = 0, poll_result, i, j;
+ PyObject *result_list = NULL, *timeout_obj = NULL;
+ int poll_result, i, j;
PyObject *value = NULL, *num = NULL;
+ _PyTime_t timeout, ms, deadline;
+ int async_err = 0;
- if (!PyArg_UnpackTuple(args, "poll", 0, 1, &tout)) {
+ if (!PyArg_ParseTuple(args, "|O:poll", &timeout_obj)) {
return NULL;
}
/* Check values for timeout */
- if (tout == NULL || tout == Py_None)
+ if (timeout_obj == NULL || timeout_obj == Py_None) {
timeout = -1;
- else if (!PyNumber_Check(tout)) {
- PyErr_SetString(PyExc_TypeError,
- "timeout must be an integer or None");
- return NULL;
+ ms = -1;
+ deadline = 0; /* initialize to prevent gcc warning */
}
else {
- tout = PyNumber_Long(tout);
- if (!tout)
+ if (_PyTime_FromMillisecondsObject(&timeout, timeout_obj,
+ _PyTime_ROUND_CEILING) < 0) {
+ if (PyErr_ExceptionMatches(PyExc_TypeError)) {
+ PyErr_SetString(PyExc_TypeError,
+ "timeout must be an integer or None");
+ }
return NULL;
- timeout = _PyLong_AsInt(tout);
- Py_DECREF(tout);
- if (timeout == -1 && PyErr_Occurred())
+ }
+
+ ms = _PyTime_AsMilliseconds(timeout, _PyTime_ROUND_CEILING);
+ if (ms < INT_MIN || ms > INT_MAX) {
+ PyErr_SetString(PyExc_OverflowError, "timeout is too large");
return NULL;
+ }
+
+ deadline = _PyTime_GetMonotonicClock() + timeout;
}
/* Avoid concurrent poll() invocation, issue 8865 */
@@ -557,14 +571,38 @@ poll_poll(pollObject *self, PyObject *args)
self->poll_running = 1;
/* call poll() */
- Py_BEGIN_ALLOW_THREADS
- poll_result = poll(self->ufds, self->ufd_len, timeout);
- Py_END_ALLOW_THREADS
+ async_err = 0;
+ do {
+ Py_BEGIN_ALLOW_THREADS
+ errno = 0;
+ poll_result = poll(self->ufds, self->ufd_len, (int)ms);
+ Py_END_ALLOW_THREADS
+
+ if (errno != EINTR)
+ break;
+
+ /* poll() was interrupted by a signal */
+ if (PyErr_CheckSignals()) {
+ async_err = 1;
+ break;
+ }
+
+ if (timeout >= 0) {
+ timeout = deadline - _PyTime_GetMonotonicClock();
+ if (timeout < 0) {
+ poll_result = 0;
+ break;
+ }
+ ms = _PyTime_AsMilliseconds(timeout, _PyTime_ROUND_CEILING);
+ /* retry poll() with the recomputed timeout */
+ }
+ } while (1);
self->poll_running = 0;
if (poll_result < 0) {
- PyErr_SetFromErrno(PyExc_OSError);
+ if (!async_err)
+ PyErr_SetFromErrno(PyExc_OSError);
return NULL;
}
@@ -573,41 +611,40 @@ poll_poll(pollObject *self, PyObject *args)
result_list = PyList_New(poll_result);
if (!result_list)
return NULL;
- else {
- for (i = 0, j = 0; j < poll_result; j++) {
- /* skip to the next fired descriptor */
- while (!self->ufds[i].revents) {
- i++;
- }
- /* if we hit a NULL return, set value to NULL
- and break out of loop; code at end will
- clean up result_list */
- value = PyTuple_New(2);
- if (value == NULL)
- goto error;
- num = PyLong_FromLong(self->ufds[i].fd);
- if (num == NULL) {
- Py_DECREF(value);
- goto error;
- }
- PyTuple_SET_ITEM(value, 0, num);
-
- /* The &0xffff is a workaround for AIX. 'revents'
- is a 16-bit short, and IBM assigned POLLNVAL
- to be 0x8000, so the conversion to int results
- in a negative number. See SF bug #923315. */
- num = PyLong_FromLong(self->ufds[i].revents & 0xffff);
- if (num == NULL) {
- Py_DECREF(value);
- goto error;
- }
- PyTuple_SET_ITEM(value, 1, num);
- if ((PyList_SetItem(result_list, j, value)) == -1) {
- Py_DECREF(value);
- goto error;
- }
+
+ for (i = 0, j = 0; j < poll_result; j++) {
+ /* skip to the next fired descriptor */
+ while (!self->ufds[i].revents) {
i++;
}
+ /* if we hit a NULL return, set value to NULL
+ and break out of loop; code at end will
+ clean up result_list */
+ value = PyTuple_New(2);
+ if (value == NULL)
+ goto error;
+ num = PyLong_FromLong(self->ufds[i].fd);
+ if (num == NULL) {
+ Py_DECREF(value);
+ goto error;
+ }
+ PyTuple_SET_ITEM(value, 0, num);
+
+ /* The &0xffff is a workaround for AIX. 'revents'
+ is a 16-bit short, and IBM assigned POLLNVAL
+ to be 0x8000, so the conversion to int results
+ in a negative number. See SF bug #923315. */
+ num = PyLong_FromLong(self->ufds[i].revents & 0xffff);
+ if (num == NULL) {
+ Py_DECREF(value);
+ goto error;
+ }
+ PyTuple_SET_ITEM(value, 1, num);
+ if ((PyList_SetItem(result_list, j, value)) == -1) {
+ Py_DECREF(value);
+ goto error;
+ }
+ i++;
}
return result_list;
@@ -718,14 +755,10 @@ static int devpoll_flush(devpollObject *self)
size = sizeof(struct pollfd)*self->n_fds;
self->n_fds = 0;
- Py_BEGIN_ALLOW_THREADS
- n = write(self->fd_devpoll, self->fds, size);
- Py_END_ALLOW_THREADS
-
- if (n == -1 ) {
- PyErr_SetFromErrno(PyExc_IOError);
+ n = _Py_write(self->fd_devpoll, self->fds, size);
+ if (n == -1)
return -1;
- }
+
if (n < size) {
/*
** Data writed to /dev/poll is a binary data structure. It is not
@@ -843,40 +876,38 @@ static PyObject *
devpoll_poll(devpollObject *self, PyObject *args)
{
struct dvpoll dvp;
- PyObject *result_list = NULL, *tout = NULL;
+ PyObject *result_list = NULL, *timeout_obj = NULL;
int poll_result, i;
- long timeout;
PyObject *value, *num1, *num2;
+ _PyTime_t timeout, ms, deadline = 0;
if (self->fd_devpoll < 0)
return devpoll_err_closed();
- if (!PyArg_UnpackTuple(args, "poll", 0, 1, &tout)) {
+ if (!PyArg_ParseTuple(args, "|O:poll", &timeout_obj)) {
return NULL;
}
/* Check values for timeout */
- if (tout == NULL || tout == Py_None)
+ if (timeout_obj == NULL || timeout_obj == Py_None) {
timeout = -1;
- else if (!PyNumber_Check(tout)) {
- PyErr_SetString(PyExc_TypeError,
- "timeout must be an integer or None");
- return NULL;
+ ms = -1;
}
else {
- tout = PyNumber_Long(tout);
- if (!tout)
- return NULL;
- timeout = PyLong_AsLong(tout);
- Py_DECREF(tout);
- if (timeout == -1 && PyErr_Occurred())
+ if (_PyTime_FromMillisecondsObject(&timeout, timeout_obj,
+ _PyTime_ROUND_CEILING) < 0) {
+ if (PyErr_ExceptionMatches(PyExc_TypeError)) {
+ PyErr_SetString(PyExc_TypeError,
+ "timeout must be an integer or None");
+ }
return NULL;
- }
+ }
- if ((timeout < -1) || (timeout > INT_MAX)) {
- PyErr_SetString(PyExc_OverflowError,
- "timeout is out of range");
- return NULL;
+ ms = _PyTime_AsMilliseconds(timeout, _PyTime_ROUND_CEILING);
+ if (ms < -1 || ms > INT_MAX) {
+ PyErr_SetString(PyExc_OverflowError, "timeout is too large");
+ return NULL;
+ }
}
if (devpoll_flush(self))
@@ -884,12 +915,36 @@ devpoll_poll(devpollObject *self, PyObject *args)
dvp.dp_fds = self->fds;
dvp.dp_nfds = self->max_n_fds;
- dvp.dp_timeout = timeout;
+ dvp.dp_timeout = (int)ms;
- /* call devpoll() */
- Py_BEGIN_ALLOW_THREADS
- poll_result = ioctl(self->fd_devpoll, DP_POLL, &dvp);
- Py_END_ALLOW_THREADS
+ if (timeout >= 0)
+ deadline = _PyTime_GetMonotonicClock() + timeout;
+
+ do {
+ /* call devpoll() */
+ Py_BEGIN_ALLOW_THREADS
+ errno = 0;
+ poll_result = ioctl(self->fd_devpoll, DP_POLL, &dvp);
+ Py_END_ALLOW_THREADS
+
+ if (errno != EINTR)
+ break;
+
+ /* devpoll() was interrupted by a signal */
+ if (PyErr_CheckSignals())
+ return NULL;
+
+ if (timeout >= 0) {
+ timeout = deadline - _PyTime_GetMonotonicClock();
+ if (timeout < 0) {
+ poll_result = 0;
+ break;
+ }
+ ms = _PyTime_AsMilliseconds(timeout, _PyTime_ROUND_CEILING);
+ dvp.dp_timeout = (int)ms;
+ /* retry devpoll() with the recomputed timeout */
+ }
+ } while (1);
if (poll_result < 0) {
PyErr_SetFromErrno(PyExc_IOError);
@@ -897,28 +952,26 @@ devpoll_poll(devpollObject *self, PyObject *args)
}
/* build the result list */
-
result_list = PyList_New(poll_result);
if (!result_list)
return NULL;
- else {
- for (i = 0; i < poll_result; i++) {
- num1 = PyLong_FromLong(self->fds[i].fd);
- num2 = PyLong_FromLong(self->fds[i].revents);
- if ((num1 == NULL) || (num2 == NULL)) {
- Py_XDECREF(num1);
- Py_XDECREF(num2);
- goto error;
- }
- value = PyTuple_Pack(2, num1, num2);
- Py_DECREF(num1);
- Py_DECREF(num2);
- if (value == NULL)
- goto error;
- if ((PyList_SetItem(result_list, i, value)) == -1) {
- Py_DECREF(value);
- goto error;
- }
+
+ for (i = 0; i < poll_result; i++) {
+ num1 = PyLong_FromLong(self->fds[i].fd);
+ num2 = PyLong_FromLong(self->fds[i].revents);
+ if ((num1 == NULL) || (num2 == NULL)) {
+ Py_XDECREF(num1);
+ Py_XDECREF(num2);
+ goto error;
+ }
+ value = PyTuple_Pack(2, num1, num2);
+ Py_DECREF(num1);
+ Py_DECREF(num2);
+ if (value == NULL)
+ goto error;
+ if ((PyList_SetItem(result_list, i, value)) == -1) {
+ Py_DECREF(value);
+ goto error;
}
}
@@ -1013,7 +1066,6 @@ newDevPollObject(void)
struct pollfd *fds;
struct rlimit limit;
- Py_BEGIN_ALLOW_THREADS
/*
** If we try to process more that getrlimit()
** fds, the kernel will give an error, so
@@ -1021,18 +1073,14 @@ newDevPollObject(void)
** value, because we can change rlimit() anytime.
*/
limit_result = getrlimit(RLIMIT_NOFILE, &limit);
- if (limit_result != -1)
- fd_devpoll = _Py_open("/dev/poll", O_RDWR);
- Py_END_ALLOW_THREADS
-
if (limit_result == -1) {
PyErr_SetFromErrno(PyExc_OSError);
return NULL;
}
- if (fd_devpoll == -1) {
- PyErr_SetFromErrnoWithFilename(PyExc_IOError, "/dev/poll");
+
+ fd_devpoll = _Py_open("/dev/poll", O_RDWR);
+ if (fd_devpoll == -1)
return NULL;
- }
fds = PyMem_NEW(struct pollfd, limit.rlim_cur);
if (fds == NULL) {
@@ -1390,7 +1438,7 @@ PyDoc_STRVAR(pyepoll_register_doc,
Registers a new fd or raises an OSError if the fd is already registered.\n\
fd is the target file descriptor of the operation.\n\
events is a bit set composed of the various EPOLL constants; the default\n\
-is EPOLL_IN | EPOLL_OUT | EPOLL_PRI.\n\
+is EPOLLIN | EPOLLOUT | EPOLLPRI.\n\
\n\
The epoll interface supports all file descriptors that support poll.");
@@ -1437,34 +1485,46 @@ fd is the target file descriptor of the operation.");
static PyObject *
pyepoll_poll(pyEpoll_Object *self, PyObject *args, PyObject *kwds)
{
- double dtimeout = -1.;
- int timeout;
+ static char *kwlist[] = {"timeout", "maxevents", NULL};
+ PyObject *timeout_obj = NULL;
int maxevents = -1;
int nfds, i;
PyObject *elist = NULL, *etuple = NULL;
struct epoll_event *evs = NULL;
- static char *kwlist[] = {"timeout", "maxevents", NULL};
+ _PyTime_t timeout, ms, deadline;
if (self->epfd < 0)
return pyepoll_err_closed();
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|di:poll", kwlist,
- &dtimeout, &maxevents)) {
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|Oi:poll", kwlist,
+ &timeout_obj, &maxevents)) {
return NULL;
}
- if (dtimeout < 0) {
+ if (timeout_obj == NULL || timeout_obj == Py_None) {
timeout = -1;
- }
- else if (dtimeout * 1000.0 > INT_MAX) {
- PyErr_SetString(PyExc_OverflowError,
- "timeout is too large");
- return NULL;
+ ms = -1;
+ deadline = 0; /* initialize to prevent gcc warning */
}
else {
- /* epoll_wait() has a resolution of 1 millisecond, round away from zero
- to wait *at least* dtimeout seconds. */
- timeout = (int)ceil(dtimeout * 1000.0);
+ /* epoll_wait() has a resolution of 1 millisecond, round towards
+ infinity to wait at least timeout seconds. */
+ if (_PyTime_FromSecondsObject(&timeout, timeout_obj,
+ _PyTime_ROUND_CEILING) < 0) {
+ if (PyErr_ExceptionMatches(PyExc_TypeError)) {
+ PyErr_SetString(PyExc_TypeError,
+ "timeout must be an integer or None");
+ }
+ return NULL;
+ }
+
+ ms = _PyTime_AsMilliseconds(timeout, _PyTime_ROUND_CEILING);
+ if (ms < INT_MIN || ms > INT_MAX) {
+ PyErr_SetString(PyExc_OverflowError, "timeout is too large");
+ return NULL;
+ }
+
+ deadline = _PyTime_GetMonotonicClock() + timeout;
}
if (maxevents == -1) {
@@ -1483,9 +1543,30 @@ pyepoll_poll(pyEpoll_Object *self, PyObject *args, PyObject *kwds)
return NULL;
}
- Py_BEGIN_ALLOW_THREADS
- nfds = epoll_wait(self->epfd, evs, maxevents, timeout);
- Py_END_ALLOW_THREADS
+ do {
+ Py_BEGIN_ALLOW_THREADS
+ errno = 0;
+ nfds = epoll_wait(self->epfd, evs, maxevents, (int)ms);
+ Py_END_ALLOW_THREADS
+
+ if (errno != EINTR)
+ break;
+
+ /* poll() was interrupted by a signal */
+ if (PyErr_CheckSignals())
+ goto error;
+
+ if (timeout >= 0) {
+ timeout = deadline - _PyTime_GetMonotonicClock();
+ if (timeout < 0) {
+ nfds = 0;
+ break;
+ }
+ ms = _PyTime_AsMilliseconds(timeout, _PyTime_ROUND_CEILING);
+ /* retry epoll_wait() with the recomputed timeout */
+ }
+ } while(1);
+
if (nfds < 0) {
PyErr_SetFromErrno(PyExc_OSError);
goto error;
@@ -2022,8 +2103,9 @@ kqueue_queue_control(kqueue_queue_Object *self, PyObject *args)
PyObject *result = NULL;
struct kevent *evl = NULL;
struct kevent *chl = NULL;
- struct timespec timeout;
+ struct timespec timeoutspec;
struct timespec *ptimeoutspec;
+ _PyTime_t timeout, deadline = 0;
if (self->kqfd < 0)
return kqueue_queue_err_closed();
@@ -2041,24 +2123,25 @@ kqueue_queue_control(kqueue_queue_Object *self, PyObject *args)
if (otimeout == Py_None || otimeout == NULL) {
ptimeoutspec = NULL;
}
- else if (PyNumber_Check(otimeout)) {
- if (_PyTime_ObjectToTimespec(otimeout, &timeout.tv_sec,
- &timeout.tv_nsec, _PyTime_ROUND_UP) == -1)
+ else {
+ if (_PyTime_FromSecondsObject(&timeout,
+ otimeout, _PyTime_ROUND_CEILING) < 0) {
+ PyErr_Format(PyExc_TypeError,
+ "timeout argument must be an number "
+ "or None, got %.200s",
+ Py_TYPE(otimeout)->tp_name);
return NULL;
+ }
- if (timeout.tv_sec < 0) {
+ if (_PyTime_AsTimespec(timeout, &timeoutspec) == -1)
+ return NULL;
+
+ if (timeoutspec.tv_sec < 0) {
PyErr_SetString(PyExc_ValueError,
"timeout must be positive or None");
return NULL;
}
- ptimeoutspec = &timeout;
- }
- else {
- PyErr_Format(PyExc_TypeError,
- "timeout argument must be an number "
- "or None, got %.200s",
- Py_TYPE(otimeout)->tp_name);
- return NULL;
+ ptimeoutspec = &timeoutspec;
}
if (ch != NULL && ch != Py_None) {
@@ -2103,10 +2186,34 @@ kqueue_queue_control(kqueue_queue_Object *self, PyObject *args)
}
}
- Py_BEGIN_ALLOW_THREADS
- gotevents = kevent(self->kqfd, chl, nchanges,
- evl, nevents, ptimeoutspec);
- Py_END_ALLOW_THREADS
+ if (ptimeoutspec)
+ deadline = _PyTime_GetMonotonicClock() + timeout;
+
+ do {
+ Py_BEGIN_ALLOW_THREADS
+ errno = 0;
+ gotevents = kevent(self->kqfd, chl, nchanges,
+ evl, nevents, ptimeoutspec);
+ Py_END_ALLOW_THREADS
+
+ if (errno != EINTR)
+ break;
+
+ /* kevent() was interrupted by a signal */
+ if (PyErr_CheckSignals())
+ goto error;
+
+ if (ptimeoutspec) {
+ timeout = deadline - _PyTime_GetMonotonicClock();
+ if (timeout < 0) {
+ gotevents = 0;
+ break;
+ }
+ if (_PyTime_AsTimespec(timeout, &timeoutspec) == -1)
+ goto error;
+ /* retry kevent() with the recomputed timeout */
+ }
+ } while (1);
if (gotevents == -1) {
PyErr_SetFromErrno(PyExc_OSError);
diff --git a/Modules/sha1module.c b/Modules/sha1module.c
index b44fe189d2..74b94ba270 100644
--- a/Modules/sha1module.c
+++ b/Modules/sha1module.c
@@ -18,7 +18,13 @@
#include "Python.h"
#include "hashlib.h"
+#include "pystrhex.h"
+/*[clinic input]
+module _sha1
+class SHA1Type "SHA1object *" "&PyType_Type"
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=3dc9a20d1becb759]*/
/* Some useful types */
@@ -48,6 +54,7 @@ typedef struct {
struct sha1_state hash_state;
} SHA1object;
+#include "clinic/sha1module.c.h"
/* ------------------------------------------------------------------------
*
@@ -309,10 +316,15 @@ SHA1_dealloc(PyObject *ptr)
/* External methods for a hash object */
-PyDoc_STRVAR(SHA1_copy__doc__, "Return a copy of the hash object.");
+/*[clinic input]
+SHA1Type.copy
+
+Return a copy of the hash object.
+[clinic start generated code]*/
static PyObject *
-SHA1_copy(SHA1object *self, PyObject *unused)
+SHA1Type_copy_impl(SHA1object *self)
+/*[clinic end generated code: output=b4e001264620f02a input=b7eae10df6f89b36]*/
{
SHA1object *newobj;
@@ -323,11 +335,15 @@ SHA1_copy(SHA1object *self, PyObject *unused)
return (PyObject *)newobj;
}
-PyDoc_STRVAR(SHA1_digest__doc__,
-"Return the digest value as a string of binary data.");
+/*[clinic input]
+SHA1Type.digest
+
+Return the digest value as a string of binary data.
+[clinic start generated code]*/
static PyObject *
-SHA1_digest(SHA1object *self, PyObject *unused)
+SHA1Type_digest_impl(SHA1object *self)
+/*[clinic end generated code: output=2f05302a7aa2b5cb input=205d47e1927fd009]*/
{
unsigned char digest[SHA1_DIGESTSIZE];
struct sha1_state temp;
@@ -337,54 +353,41 @@ SHA1_digest(SHA1object *self, PyObject *unused)
return PyBytes_FromStringAndSize((const char *)digest, SHA1_DIGESTSIZE);
}
-PyDoc_STRVAR(SHA1_hexdigest__doc__,
-"Return the digest value as a string of hexadecimal digits.");
+/*[clinic input]
+SHA1Type.hexdigest
+
+Return the digest value as a string of hexadecimal digits.
+[clinic start generated code]*/
static PyObject *
-SHA1_hexdigest(SHA1object *self, PyObject *unused)
+SHA1Type_hexdigest_impl(SHA1object *self)
+/*[clinic end generated code: output=4161fd71e68c6659 input=97691055c0c74ab0]*/
{
unsigned char digest[SHA1_DIGESTSIZE];
struct sha1_state temp;
- PyObject *retval;
- Py_UCS1 *hex_digest;
- int i, j;
/* Get the raw (binary) digest value */
temp = self->hash_state;
sha1_done(&temp, digest);
- /* Create a new string */
- retval = PyUnicode_New(SHA1_DIGESTSIZE * 2, 127);
- if (!retval)
- return NULL;
- hex_digest = PyUnicode_1BYTE_DATA(retval);
-
- /* Make hex version of the digest */
- for(i=j=0; i<SHA1_DIGESTSIZE; i++) {
- unsigned char c;
- c = (digest[i] >> 4) & 0xf;
- hex_digest[j++] = Py_hexdigits[c];
- c = (digest[i] & 0xf);
- hex_digest[j++] = Py_hexdigits[c];
- }
-#ifdef Py_DEBUG
- assert(_PyUnicode_CheckConsistency(retval, 1));
-#endif
- return retval;
+ return _Py_strhex((const char *)digest, SHA1_DIGESTSIZE);
}
-PyDoc_STRVAR(SHA1_update__doc__,
-"Update this hash object's state with the provided string.");
+/*[clinic input]
+SHA1Type.update
+
+ obj: object
+ /
+
+Update this hash object's state with the provided string.
+[clinic start generated code]*/
static PyObject *
-SHA1_update(SHA1object *self, PyObject *args)
+SHA1Type_update(SHA1object *self, PyObject *obj)
+/*[clinic end generated code: output=d9902f0e5015e9ae input=aad8e07812edbba3]*/
{
- PyObject *obj;
Py_buffer buf;
- if (!PyArg_ParseTuple(args, "O:update", &obj))
- return NULL;
-
GET_BUFFER_VIEW_OR_ERROUT(obj, &buf);
sha1_process(&self->hash_state, buf.buf, buf.len);
@@ -395,10 +398,10 @@ SHA1_update(SHA1object *self, PyObject *args)
}
static PyMethodDef SHA1_methods[] = {
- {"copy", (PyCFunction)SHA1_copy, METH_NOARGS, SHA1_copy__doc__},
- {"digest", (PyCFunction)SHA1_digest, METH_NOARGS, SHA1_digest__doc__},
- {"hexdigest", (PyCFunction)SHA1_hexdigest, METH_NOARGS, SHA1_hexdigest__doc__},
- {"update", (PyCFunction)SHA1_update, METH_VARARGS, SHA1_update__doc__},
+ SHA1TYPE_COPY_METHODDEF
+ SHA1TYPE_DIGEST_METHODDEF
+ SHA1TYPE_HEXDIGEST_METHODDEF
+ SHA1TYPE_UPDATE_METHODDEF
{NULL, NULL} /* sentinel */
};
@@ -474,27 +477,26 @@ static PyTypeObject SHA1type = {
/* The single module-level function: new() */
-PyDoc_STRVAR(SHA1_new__doc__,
-"Return a new SHA1 hash object; optionally initialized with a string.");
+/*[clinic input]
+_sha1.sha1
+
+ string: object(c_default="NULL") = b''
+
+Return a new SHA1 hash object; optionally initialized with a string.
+[clinic start generated code]*/
static PyObject *
-SHA1_new(PyObject *self, PyObject *args, PyObject *kwdict)
+_sha1_sha1_impl(PyModuleDef *module, PyObject *string)
+/*[clinic end generated code: output=3e4e841386b9e8db input=27ea54281d995ec2]*/
{
- static char *kwlist[] = {"string", NULL};
SHA1object *new;
- PyObject *data_obj = NULL;
Py_buffer buf;
- if (!PyArg_ParseTupleAndKeywords(args, kwdict, "|O:new", kwlist,
- &data_obj)) {
- return NULL;
- }
-
- if (data_obj)
- GET_BUFFER_VIEW_OR_ERROUT(data_obj, &buf);
+ if (string)
+ GET_BUFFER_VIEW_OR_ERROUT(string, &buf);
if ((new = newSHA1object()) == NULL) {
- if (data_obj)
+ if (string)
PyBuffer_Release(&buf);
return NULL;
}
@@ -503,11 +505,11 @@ SHA1_new(PyObject *self, PyObject *args, PyObject *kwdict)
if (PyErr_Occurred()) {
Py_DECREF(new);
- if (data_obj)
+ if (string)
PyBuffer_Release(&buf);
return NULL;
}
- if (data_obj) {
+ if (string) {
sha1_process(&new->hash_state, buf.buf, buf.len);
PyBuffer_Release(&buf);
}
@@ -519,7 +521,7 @@ SHA1_new(PyObject *self, PyObject *args, PyObject *kwdict)
/* List of functions exported by this module */
static struct PyMethodDef SHA1_functions[] = {
- {"sha1",(PyCFunction)SHA1_new, METH_VARARGS|METH_KEYWORDS,SHA1_new__doc__},
+ _SHA1_SHA1_METHODDEF
{NULL, NULL} /* Sentinel */
};
diff --git a/Modules/sha256module.c b/Modules/sha256module.c
index b05bfc172f..70c2b5b507 100644
--- a/Modules/sha256module.c
+++ b/Modules/sha256module.c
@@ -19,7 +19,13 @@
#include "Python.h"
#include "structmember.h"
#include "hashlib.h"
+#include "pystrhex.h"
+/*[clinic input]
+module _sha256
+class SHA256Type "SHAobject *" "&PyType_Type"
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=71a39174d4f0a744]*/
/* Some useful types */
@@ -47,6 +53,8 @@ typedef struct {
int digestsize;
} SHAobject;
+#include "clinic/sha256module.c.h"
+
/* When run on a little-endian CPU we need to perform byte reversal on an
array of longwords. */
@@ -92,7 +100,7 @@ static void SHAcopy(SHAobject *src, SHAobject *dest)
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
- * gurantee it works.
+ * guarantee it works.
*
* Tom St Denis, tomstdenis@iahu.ca, http://libtom.org
*/
@@ -393,10 +401,15 @@ SHA_dealloc(PyObject *ptr)
/* External methods for a hash object */
-PyDoc_STRVAR(SHA256_copy__doc__, "Return a copy of the hash object.");
+/*[clinic input]
+SHA256Type.copy
+
+Return a copy of the hash object.
+[clinic start generated code]*/
static PyObject *
-SHA256_copy(SHAobject *self, PyObject *unused)
+SHA256Type_copy_impl(SHAobject *self)
+/*[clinic end generated code: output=1a8bbd66a0c9c168 input=f58840a618d4f2a7]*/
{
SHAobject *newobj;
@@ -412,11 +425,15 @@ SHA256_copy(SHAobject *self, PyObject *unused)
return (PyObject *)newobj;
}
-PyDoc_STRVAR(SHA256_digest__doc__,
-"Return the digest value as a string of binary data.");
+/*[clinic input]
+SHA256Type.digest
+
+Return the digest value as a string of binary data.
+[clinic start generated code]*/
static PyObject *
-SHA256_digest(SHAobject *self, PyObject *unused)
+SHA256Type_digest_impl(SHAobject *self)
+/*[clinic end generated code: output=46616a5e909fbc3d input=1fb752e58954157d]*/
{
unsigned char digest[SHA_DIGESTSIZE];
SHAobject temp;
@@ -426,54 +443,41 @@ SHA256_digest(SHAobject *self, PyObject *unused)
return PyBytes_FromStringAndSize((const char *)digest, self->digestsize);
}
-PyDoc_STRVAR(SHA256_hexdigest__doc__,
-"Return the digest value as a string of hexadecimal digits.");
+/*[clinic input]
+SHA256Type.hexdigest
+
+Return the digest value as a string of hexadecimal digits.
+[clinic start generated code]*/
static PyObject *
-SHA256_hexdigest(SHAobject *self, PyObject *unused)
+SHA256Type_hexdigest_impl(SHAobject *self)
+/*[clinic end generated code: output=725f8a7041ae97f3 input=0cc4c714693010d1]*/
{
unsigned char digest[SHA_DIGESTSIZE];
SHAobject temp;
- PyObject *retval;
- Py_UCS1 *hex_digest;
- int i, j;
/* Get the raw (binary) digest value */
SHAcopy(self, &temp);
sha_final(digest, &temp);
- /* Create a new string */
- retval = PyUnicode_New(self->digestsize * 2, 127);
- if (!retval)
- return NULL;
- hex_digest = PyUnicode_1BYTE_DATA(retval);
-
- /* Make hex version of the digest */
- for(i=j=0; i<self->digestsize; i++) {
- unsigned char c;
- c = (digest[i] >> 4) & 0xf;
- hex_digest[j++] = Py_hexdigits[c];
- c = (digest[i] & 0xf);
- hex_digest[j++] = Py_hexdigits[c];
- }
-#ifdef Py_DEBUG
- assert(_PyUnicode_CheckConsistency(retval, 1));
-#endif
- return retval;
+ return _Py_strhex((const char *)digest, self->digestsize);
}
-PyDoc_STRVAR(SHA256_update__doc__,
-"Update this hash object's state with the provided string.");
+/*[clinic input]
+SHA256Type.update
+
+ obj: object
+ /
+
+Update this hash object's state with the provided string.
+[clinic start generated code]*/
static PyObject *
-SHA256_update(SHAobject *self, PyObject *args)
+SHA256Type_update(SHAobject *self, PyObject *obj)
+/*[clinic end generated code: output=0967fb2860c66af7 input=b2d449d5b30f0f5a]*/
{
- PyObject *obj;
Py_buffer buf;
- if (!PyArg_ParseTuple(args, "O:update", &obj))
- return NULL;
-
GET_BUFFER_VIEW_OR_ERROUT(obj, &buf);
sha_update(self, buf.buf, buf.len);
@@ -484,10 +488,10 @@ SHA256_update(SHAobject *self, PyObject *args)
}
static PyMethodDef SHA_methods[] = {
- {"copy", (PyCFunction)SHA256_copy, METH_NOARGS, SHA256_copy__doc__},
- {"digest", (PyCFunction)SHA256_digest, METH_NOARGS, SHA256_digest__doc__},
- {"hexdigest", (PyCFunction)SHA256_hexdigest, METH_NOARGS, SHA256_hexdigest__doc__},
- {"update", (PyCFunction)SHA256_update, METH_VARARGS, SHA256_update__doc__},
+ SHA256TYPE_COPY_METHODDEF
+ SHA256TYPE_DIGEST_METHODDEF
+ SHA256TYPE_HEXDIGEST_METHODDEF
+ SHA256TYPE_UPDATE_METHODDEF
{NULL, NULL} /* sentinel */
};
@@ -594,27 +598,26 @@ static PyTypeObject SHA256type = {
/* The single module-level function: new() */
-PyDoc_STRVAR(SHA256_new__doc__,
-"Return a new SHA-256 hash object; optionally initialized with a string.");
+/*[clinic input]
+_sha256.sha256
+
+ string: object(c_default="NULL") = b''
+
+Return a new SHA-256 hash object; optionally initialized with a string.
+[clinic start generated code]*/
static PyObject *
-SHA256_new(PyObject *self, PyObject *args, PyObject *kwdict)
+_sha256_sha256_impl(PyModuleDef *module, PyObject *string)
+/*[clinic end generated code: output=d70e6e2d97112844 input=09cce3fb855056b2]*/
{
- static char *kwlist[] = {"string", NULL};
SHAobject *new;
- PyObject *data_obj = NULL;
Py_buffer buf;
- if (!PyArg_ParseTupleAndKeywords(args, kwdict, "|O:new", kwlist,
- &data_obj)) {
- return NULL;
- }
-
- if (data_obj)
- GET_BUFFER_VIEW_OR_ERROUT(data_obj, &buf);
+ if (string)
+ GET_BUFFER_VIEW_OR_ERROUT(string, &buf);
if ((new = newSHA256object()) == NULL) {
- if (data_obj)
+ if (string)
PyBuffer_Release(&buf);
return NULL;
}
@@ -623,11 +626,11 @@ SHA256_new(PyObject *self, PyObject *args, PyObject *kwdict)
if (PyErr_Occurred()) {
Py_DECREF(new);
- if (data_obj)
+ if (string)
PyBuffer_Release(&buf);
return NULL;
}
- if (data_obj) {
+ if (string) {
sha_update(new, buf.buf, buf.len);
PyBuffer_Release(&buf);
}
@@ -635,27 +638,26 @@ SHA256_new(PyObject *self, PyObject *args, PyObject *kwdict)
return (PyObject *)new;
}
-PyDoc_STRVAR(SHA224_new__doc__,
-"Return a new SHA-224 hash object; optionally initialized with a string.");
+/*[clinic input]
+_sha256.sha224
+
+ string: object(c_default="NULL") = b''
+
+Return a new SHA-224 hash object; optionally initialized with a string.
+[clinic start generated code]*/
static PyObject *
-SHA224_new(PyObject *self, PyObject *args, PyObject *kwdict)
+_sha256_sha224_impl(PyModuleDef *module, PyObject *string)
+/*[clinic end generated code: output=f2822bf28416b42a input=27a04ba24c353a73]*/
{
- static char *kwlist[] = {"string", NULL};
SHAobject *new;
- PyObject *data_obj = NULL;
Py_buffer buf;
- if (!PyArg_ParseTupleAndKeywords(args, kwdict, "|O:new", kwlist,
- &data_obj)) {
- return NULL;
- }
-
- if (data_obj)
- GET_BUFFER_VIEW_OR_ERROUT(data_obj, &buf);
+ if (string)
+ GET_BUFFER_VIEW_OR_ERROUT(string, &buf);
if ((new = newSHA224object()) == NULL) {
- if (data_obj)
+ if (string)
PyBuffer_Release(&buf);
return NULL;
}
@@ -664,11 +666,11 @@ SHA224_new(PyObject *self, PyObject *args, PyObject *kwdict)
if (PyErr_Occurred()) {
Py_DECREF(new);
- if (data_obj)
+ if (string)
PyBuffer_Release(&buf);
return NULL;
}
- if (data_obj) {
+ if (string) {
sha_update(new, buf.buf, buf.len);
PyBuffer_Release(&buf);
}
@@ -680,8 +682,8 @@ SHA224_new(PyObject *self, PyObject *args, PyObject *kwdict)
/* List of functions exported by this module */
static struct PyMethodDef SHA_functions[] = {
- {"sha256", (PyCFunction)SHA256_new, METH_VARARGS|METH_KEYWORDS, SHA256_new__doc__},
- {"sha224", (PyCFunction)SHA224_new, METH_VARARGS|METH_KEYWORDS, SHA224_new__doc__},
+ _SHA256_SHA256_METHODDEF
+ _SHA256_SHA224_METHODDEF
{NULL, NULL} /* Sentinel */
};
diff --git a/Modules/sha512module.c b/Modules/sha512module.c
index 47c57e5c42..76942aa713 100644
--- a/Modules/sha512module.c
+++ b/Modules/sha512module.c
@@ -19,6 +19,13 @@
#include "Python.h"
#include "structmember.h"
#include "hashlib.h"
+#include "pystrhex.h"
+
+/*[clinic input]
+module _sha512
+class SHA512Type "SHAobject *" "&PyType_Type"
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=81a3ccde92bcfe8d]*/
#ifdef PY_LONG_LONG /* If no PY_LONG_LONG, don't compile anything! */
@@ -49,6 +56,8 @@ typedef struct {
int digestsize;
} SHAobject;
+#include "clinic/sha512module.c.h"
+
/* When run on a little-endian CPU we need to perform byte reversal on an
array of longwords. */
@@ -102,7 +111,7 @@ static void SHAcopy(SHAobject *src, SHAobject *dest)
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
- * gurantee it works.
+ * guarantee it works.
*
* Tom St Denis, tomstdenis@iahu.ca, http://libtom.org
*/
@@ -459,10 +468,15 @@ SHA512_dealloc(PyObject *ptr)
/* External methods for a hash object */
-PyDoc_STRVAR(SHA512_copy__doc__, "Return a copy of the hash object.");
+/*[clinic input]
+SHA512Type.copy
+
+Return a copy of the hash object.
+[clinic start generated code]*/
static PyObject *
-SHA512_copy(SHAobject *self, PyObject *unused)
+SHA512Type_copy_impl(SHAobject *self)
+/*[clinic end generated code: output=adea896ed3164821 input=9f5f31e6c457776a]*/
{
SHAobject *newobj;
@@ -478,11 +492,15 @@ SHA512_copy(SHAobject *self, PyObject *unused)
return (PyObject *)newobj;
}
-PyDoc_STRVAR(SHA512_digest__doc__,
-"Return the digest value as a string of binary data.");
+/*[clinic input]
+SHA512Type.digest
+
+Return the digest value as a string of binary data.
+[clinic start generated code]*/
static PyObject *
-SHA512_digest(SHAobject *self, PyObject *unused)
+SHA512Type_digest_impl(SHAobject *self)
+/*[clinic end generated code: output=1080bbeeef7dde1b input=60c2cede9e023018]*/
{
unsigned char digest[SHA_DIGESTSIZE];
SHAobject temp;
@@ -492,54 +510,41 @@ SHA512_digest(SHAobject *self, PyObject *unused)
return PyBytes_FromStringAndSize((const char *)digest, self->digestsize);
}
-PyDoc_STRVAR(SHA512_hexdigest__doc__,
-"Return the digest value as a string of hexadecimal digits.");
+/*[clinic input]
+SHA512Type.hexdigest
+
+Return the digest value as a string of hexadecimal digits.
+[clinic start generated code]*/
static PyObject *
-SHA512_hexdigest(SHAobject *self, PyObject *unused)
+SHA512Type_hexdigest_impl(SHAobject *self)
+/*[clinic end generated code: output=7373305b8601e18b input=498b877b25cbe0a2]*/
{
unsigned char digest[SHA_DIGESTSIZE];
SHAobject temp;
- PyObject *retval;
- Py_UCS1 *hex_digest;
- int i, j;
/* Get the raw (binary) digest value */
SHAcopy(self, &temp);
sha512_final(digest, &temp);
- /* Create a new string */
- retval = PyUnicode_New(self->digestsize * 2, 127);
- if (!retval)
- return NULL;
- hex_digest = PyUnicode_1BYTE_DATA(retval);
-
- /* Make hex version of the digest */
- for (i=j=0; i<self->digestsize; i++) {
- unsigned char c;
- c = (digest[i] >> 4) & 0xf;
- hex_digest[j++] = Py_hexdigits[c];
- c = (digest[i] & 0xf);
- hex_digest[j++] = Py_hexdigits[c];
- }
-#ifdef Py_DEBUG
- assert(_PyUnicode_CheckConsistency(retval, 1));
-#endif
- return retval;
+ return _Py_strhex((const char *)digest, self->digestsize);
}
-PyDoc_STRVAR(SHA512_update__doc__,
-"Update this hash object's state with the provided string.");
+/*[clinic input]
+SHA512Type.update
+
+ obj: object
+ /
+
+Update this hash object's state with the provided string.
+[clinic start generated code]*/
static PyObject *
-SHA512_update(SHAobject *self, PyObject *args)
+SHA512Type_update(SHAobject *self, PyObject *obj)
+/*[clinic end generated code: output=1cf333e73995a79e input=ded2b46656566283]*/
{
- PyObject *obj;
Py_buffer buf;
- if (!PyArg_ParseTuple(args, "O:update", &obj))
- return NULL;
-
GET_BUFFER_VIEW_OR_ERROUT(obj, &buf);
sha512_update(self, buf.buf, buf.len);
@@ -548,12 +553,16 @@ SHA512_update(SHAobject *self, PyObject *args)
Py_INCREF(Py_None);
return Py_None;
}
+/*[clinic input]
+dump buffer
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=524ce2e021e4eba6]*/
static PyMethodDef SHA_methods[] = {
- {"copy", (PyCFunction)SHA512_copy, METH_NOARGS, SHA512_copy__doc__},
- {"digest", (PyCFunction)SHA512_digest, METH_NOARGS, SHA512_digest__doc__},
- {"hexdigest", (PyCFunction)SHA512_hexdigest, METH_NOARGS, SHA512_hexdigest__doc__},
- {"update", (PyCFunction)SHA512_update, METH_VARARGS, SHA512_update__doc__},
+ SHA512TYPE_COPY_METHODDEF
+ SHA512TYPE_DIGEST_METHODDEF
+ SHA512TYPE_HEXDIGEST_METHODDEF
+ SHA512TYPE_UPDATE_METHODDEF
{NULL, NULL} /* sentinel */
};
@@ -660,27 +669,26 @@ static PyTypeObject SHA512type = {
/* The single module-level function: new() */
-PyDoc_STRVAR(SHA512_new__doc__,
-"Return a new SHA-512 hash object; optionally initialized with a string.");
+/*[clinic input]
+_sha512.sha512
+
+ string: object(c_default="NULL") = b''
+
+Return a new SHA-512 hash object; optionally initialized with a string.
+[clinic start generated code]*/
static PyObject *
-SHA512_new(PyObject *self, PyObject *args, PyObject *kwdict)
+_sha512_sha512_impl(PyModuleDef *module, PyObject *string)
+/*[clinic end generated code: output=da13bc0a94da6de3 input=e69bad9ae9b6a308]*/
{
- static char *kwlist[] = {"string", NULL};
SHAobject *new;
- PyObject *data_obj = NULL;
Py_buffer buf;
- if (!PyArg_ParseTupleAndKeywords(args, kwdict, "|O:new", kwlist,
- &data_obj)) {
- return NULL;
- }
-
- if (data_obj)
- GET_BUFFER_VIEW_OR_ERROUT(data_obj, &buf);
+ if (string)
+ GET_BUFFER_VIEW_OR_ERROUT(string, &buf);
if ((new = newSHA512object()) == NULL) {
- if (data_obj)
+ if (string)
PyBuffer_Release(&buf);
return NULL;
}
@@ -689,11 +697,11 @@ SHA512_new(PyObject *self, PyObject *args, PyObject *kwdict)
if (PyErr_Occurred()) {
Py_DECREF(new);
- if (data_obj)
+ if (string)
PyBuffer_Release(&buf);
return NULL;
}
- if (data_obj) {
+ if (string) {
sha512_update(new, buf.buf, buf.len);
PyBuffer_Release(&buf);
}
@@ -701,27 +709,26 @@ SHA512_new(PyObject *self, PyObject *args, PyObject *kwdict)
return (PyObject *)new;
}
-PyDoc_STRVAR(SHA384_new__doc__,
-"Return a new SHA-384 hash object; optionally initialized with a string.");
+/*[clinic input]
+_sha512.sha384
+
+ string: object(c_default="NULL") = b''
+
+Return a new SHA-384 hash object; optionally initialized with a string.
+[clinic start generated code]*/
static PyObject *
-SHA384_new(PyObject *self, PyObject *args, PyObject *kwdict)
+_sha512_sha384_impl(PyModuleDef *module, PyObject *string)
+/*[clinic end generated code: output=ac731aea5509174d input=c9327788d4ea4545]*/
{
- static char *kwlist[] = {"string", NULL};
SHAobject *new;
- PyObject *data_obj = NULL;
Py_buffer buf;
- if (!PyArg_ParseTupleAndKeywords(args, kwdict, "|O:new", kwlist,
- &data_obj)) {
- return NULL;
- }
-
- if (data_obj)
- GET_BUFFER_VIEW_OR_ERROUT(data_obj, &buf);
+ if (string)
+ GET_BUFFER_VIEW_OR_ERROUT(string, &buf);
if ((new = newSHA384object()) == NULL) {
- if (data_obj)
+ if (string)
PyBuffer_Release(&buf);
return NULL;
}
@@ -730,11 +737,11 @@ SHA384_new(PyObject *self, PyObject *args, PyObject *kwdict)
if (PyErr_Occurred()) {
Py_DECREF(new);
- if (data_obj)
+ if (string)
PyBuffer_Release(&buf);
return NULL;
}
- if (data_obj) {
+ if (string) {
sha512_update(new, buf.buf, buf.len);
PyBuffer_Release(&buf);
}
@@ -743,11 +750,16 @@ SHA384_new(PyObject *self, PyObject *args, PyObject *kwdict)
}
+/*[clinic input]
+dump buffer
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=524ce2e021e4eba6]*/
+
/* List of functions exported by this module */
static struct PyMethodDef SHA_functions[] = {
- {"sha512", (PyCFunction)SHA512_new, METH_VARARGS|METH_KEYWORDS, SHA512_new__doc__},
- {"sha384", (PyCFunction)SHA384_new, METH_VARARGS|METH_KEYWORDS, SHA384_new__doc__},
+ _SHA512_SHA512_METHODDEF
+ _SHA512_SHA384_METHODDEF
{NULL, NULL} /* Sentinel */
};
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c
index fedaddff35..da454de8d9 100644
--- a/Modules/signalmodule.c
+++ b/Modules/signalmodule.c
@@ -7,6 +7,9 @@
#ifndef MS_WINDOWS
#include "posixmodule.h"
#endif
+#ifdef MS_WINDOWS
+#include "socketmodule.h" /* needed for SOCKET_T */
+#endif
#ifdef MS_WINDOWS
#include <windows.h>
@@ -49,6 +52,13 @@
# endif
#endif
+#include "clinic/signalmodule.c.h"
+
+/*[clinic input]
+module signal
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=b0301a3bde5fe9d3]*/
+
/*
NOTES ON THE INTERACTION BETWEEN SIGNALS AND THREADS
@@ -87,7 +97,20 @@ static volatile struct {
PyObject *func;
} Handlers[NSIG];
+#ifdef MS_WINDOWS
+#define INVALID_FD ((SOCKET_T)-1)
+
+static volatile struct {
+ SOCKET_T fd;
+ int use_send;
+ int send_err_set;
+ int send_errno;
+ int send_win_error;
+} wakeup = {INVALID_FD, 0, 0};
+#else
+#define INVALID_FD (-1)
static volatile sig_atomic_t wakeup_fd = -1;
+#endif
/* Speed up sigcheck() when none tripped */
static volatile sig_atomic_t is_tripped = 0;
@@ -172,7 +195,7 @@ checksignals_witharg(void * unused)
}
static int
-report_wakeup_error(void *data)
+report_wakeup_write_error(void *data)
{
int save_errno = errno;
errno = (int) (Py_intptr_t) data;
@@ -184,25 +207,87 @@ report_wakeup_error(void *data)
return 0;
}
+#ifdef MS_WINDOWS
+static int
+report_wakeup_send_error(void* Py_UNUSED(data))
+{
+ PyObject *res;
+
+ if (wakeup.send_win_error) {
+ /* PyErr_SetExcFromWindowsErr() invokes FormatMessage() which
+ recognizes the error codes used by both GetLastError() and
+ WSAGetLastError */
+ res = PyErr_SetExcFromWindowsErr(PyExc_OSError, wakeup.send_win_error);
+ }
+ else {
+ errno = wakeup.send_errno;
+ res = PyErr_SetFromErrno(PyExc_OSError);
+ }
+
+ assert(res == NULL);
+ wakeup.send_err_set = 0;
+
+ PySys_WriteStderr("Exception ignored when trying to send to the "
+ "signal wakeup fd:\n");
+ PyErr_WriteUnraisable(NULL);
+
+ return 0;
+}
+#endif /* MS_WINDOWS */
+
static void
trip_signal(int sig_num)
{
unsigned char byte;
- int rc = 0;
+ int fd;
+ Py_ssize_t rc;
Handlers[sig_num].tripped = 1;
- if (wakeup_fd != -1) {
+
+#ifdef MS_WINDOWS
+ fd = Py_SAFE_DOWNCAST(wakeup.fd, SOCKET_T, int);
+#else
+ fd = wakeup_fd;
+#endif
+
+ if (fd != INVALID_FD) {
byte = (unsigned char)sig_num;
- while ((rc = write(wakeup_fd, &byte, 1)) == -1 && errno == EINTR);
- if (rc == -1)
- Py_AddPendingCall(report_wakeup_error, (void *) (Py_intptr_t) errno);
+#ifdef MS_WINDOWS
+ if (wakeup.use_send) {
+ do {
+ rc = send(fd, &byte, 1, 0);
+ } while (rc < 0 && errno == EINTR);
+
+ /* we only have a storage for one error in the wakeup structure */
+ if (rc < 0 && !wakeup.send_err_set) {
+ wakeup.send_err_set = 1;
+ wakeup.send_errno = errno;
+ wakeup.send_win_error = GetLastError();
+ Py_AddPendingCall(report_wakeup_send_error, NULL);
+ }
+ }
+ else
+#endif
+ {
+ byte = (unsigned char)sig_num;
+
+ /* _Py_write_noraise() retries write() if write() is interrupted by
+ a signal (fails with EINTR). */
+ rc = _Py_write_noraise(fd, &byte, 1);
+
+ if (rc < 0) {
+ Py_AddPendingCall(report_wakeup_write_error,
+ (void *)(Py_intptr_t)errno);
+ }
+ }
+ }
+
+ if (!is_tripped) {
+ /* Set is_tripped after setting .tripped, as it gets
+ cleared in PyErr_CheckSignals() before .tripped. */
+ is_tripped = 1;
+ Py_AddPendingCall(checksignals_witharg, NULL);
}
- if (is_tripped)
- return;
- /* Set is_tripped after setting .tripped, as it gets
- cleared in PyErr_CheckSignals() before .tripped. */
- is_tripped = 1;
- Py_AddPendingCall(checksignals_witharg, NULL);
}
static void
@@ -227,7 +312,7 @@ signal_handler(int sig_num)
if (sig_num != SIGCHLD)
#endif
/* If the handler was not set up with sigaction, reinstall it. See
- * Python/pythonrun.c for the implementation of PyOS_setsig which
+ * Python/pylifecycle.c for the implementation of PyOS_setsig which
* makes this true. See also issue8354. */
PyOS_setsig(sig_num, signal_handler);
#endif
@@ -244,25 +329,37 @@ signal_handler(int sig_num)
#ifdef HAVE_ALARM
-static PyObject *
-signal_alarm(PyObject *self, PyObject *args)
+
+/*[clinic input]
+signal.alarm -> long
+
+ seconds: int
+ /
+
+Arrange for SIGALRM to arrive after the given number of seconds.
+[clinic start generated code]*/
+
+static long
+signal_alarm_impl(PyModuleDef *module, int seconds)
+/*[clinic end generated code: output=f5f9badaab25d3e7 input=0d5e97e0e6f39e86]*/
{
- int t;
- if (!PyArg_ParseTuple(args, "i:alarm", &t))
- return NULL;
/* alarm() returns the number of seconds remaining */
- return PyLong_FromLong((long)alarm(t));
+ return (long)alarm(seconds);
}
-PyDoc_STRVAR(alarm_doc,
-"alarm(seconds)\n\
-\n\
-Arrange for SIGALRM to arrive after the given number of seconds.");
#endif
#ifdef HAVE_PAUSE
+
+/*[clinic input]
+signal.pause
+
+Wait until a signal arrives.
+[clinic start generated code]*/
+
static PyObject *
-signal_pause(PyObject *self)
+signal_pause_impl(PyModuleDef *module)
+/*[clinic end generated code: output=9245704caa63bbe9 input=f03de0f875752062]*/
{
Py_BEGIN_ALLOW_THREADS
(void)pause();
@@ -273,29 +370,38 @@ signal_pause(PyObject *self)
if (PyErr_CheckSignals())
return NULL;
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
-PyDoc_STRVAR(pause_doc,
-"pause()\n\
-\n\
-Wait until a signal arrives.");
#endif
+/*[clinic input]
+signal.signal
+
+ signalnum: int
+ handler: object
+ /
+
+Set the action for the given signal.
+
+The action can be SIG_DFL, SIG_IGN, or a callable Python object.
+The previous action is returned. See getsignal() for possible return values.
+
+*** IMPORTANT NOTICE ***
+A signal handler function is called with two arguments:
+the first is the signal number, the second is the interrupted stack frame.
+[clinic start generated code]*/
+
static PyObject *
-signal_signal(PyObject *self, PyObject *args)
+signal_signal_impl(PyModuleDef *module, int signalnum, PyObject *handler)
+/*[clinic end generated code: output=622d7d0beebea546 input=deee84af5fa0432c]*/
{
- PyObject *obj;
- int sig_num;
PyObject *old_handler;
void (*func)(int);
- if (!PyArg_ParseTuple(args, "iO:signal", &sig_num, &obj))
- return NULL;
#ifdef MS_WINDOWS
- /* Validate that sig_num is one of the allowable signals */
- switch (sig_num) {
+ /* Validate that signalnum is one of the allowable signals */
+ switch (signalnum) {
case SIGABRT: break;
#ifdef SIGBREAK
/* Issue #10003: SIGBREAK is not documented as permitted, but works
@@ -319,61 +425,63 @@ signal_signal(PyObject *self, PyObject *args)
return NULL;
}
#endif
- if (sig_num < 1 || sig_num >= NSIG) {
+ if (signalnum < 1 || signalnum >= NSIG) {
PyErr_SetString(PyExc_ValueError,
"signal number out of range");
return NULL;
}
- if (obj == IgnoreHandler)
+ if (handler == IgnoreHandler)
func = SIG_IGN;
- else if (obj == DefaultHandler)
+ else if (handler == DefaultHandler)
func = SIG_DFL;
- else if (!PyCallable_Check(obj)) {
+ else if (!PyCallable_Check(handler)) {
PyErr_SetString(PyExc_TypeError,
"signal handler must be signal.SIG_IGN, signal.SIG_DFL, or a callable object");
return NULL;
}
else
func = signal_handler;
- if (PyOS_setsig(sig_num, func) == SIG_ERR) {
+ if (PyOS_setsig(signalnum, func) == SIG_ERR) {
PyErr_SetFromErrno(PyExc_OSError);
return NULL;
}
- old_handler = Handlers[sig_num].func;
- Handlers[sig_num].tripped = 0;
- Py_INCREF(obj);
- Handlers[sig_num].func = obj;
+ old_handler = Handlers[signalnum].func;
+ Handlers[signalnum].tripped = 0;
+ Py_INCREF(handler);
+ Handlers[signalnum].func = handler;
if (old_handler != NULL)
return old_handler;
else
Py_RETURN_NONE;
}
-PyDoc_STRVAR(signal_doc,
-"signal(sig, action) -> action\n\
-\n\
-Set the action for the given signal. The action can be SIG_DFL,\n\
-SIG_IGN, or a callable Python object. The previous action is\n\
-returned. See getsignal() for possible return values.\n\
-\n\
-*** IMPORTANT NOTICE ***\n\
-A signal handler function is called with two arguments:\n\
-the first is the signal number, the second is the interrupted stack frame.");
+/*[clinic input]
+signal.getsignal
+
+ signalnum: int
+ /
+
+Return the current action for the given signal.
+
+The return value can be:
+ SIG_IGN -- if the signal is being ignored
+ SIG_DFL -- if the default action for the signal is in effect
+ None -- if an unknown handler is in effect
+ anything else -- the callable Python object used as a handler
+[clinic start generated code]*/
static PyObject *
-signal_getsignal(PyObject *self, PyObject *args)
+signal_getsignal_impl(PyModuleDef *module, int signalnum)
+/*[clinic end generated code: output=d50ec355757e360c input=ac23a00f19dfa509]*/
{
- int sig_num;
PyObject *old_handler;
- if (!PyArg_ParseTuple(args, "i:getsignal", &sig_num))
- return NULL;
- if (sig_num < 1 || sig_num >= NSIG) {
+ if (signalnum < 1 || signalnum >= NSIG) {
PyErr_SetString(PyExc_ValueError,
"signal number out of range");
return NULL;
}
- old_handler = Handlers[sig_num].func;
+ old_handler = Handlers[signalnum].func;
if (old_handler != NULL) {
Py_INCREF(old_handler);
return old_handler;
@@ -383,53 +491,65 @@ signal_getsignal(PyObject *self, PyObject *args)
}
}
-PyDoc_STRVAR(getsignal_doc,
-"getsignal(sig) -> action\n\
-\n\
-Return the current action for the given signal. The return value can be:\n\
-SIG_IGN -- if the signal is being ignored\n\
-SIG_DFL -- if the default action for the signal is in effect\n\
-None -- if an unknown handler is in effect\n\
-anything else -- the callable Python object used as a handler");
-
#ifdef HAVE_SIGINTERRUPT
-PyDoc_STRVAR(siginterrupt_doc,
-"siginterrupt(sig, flag) -> None\n\
-change system call restart behaviour: if flag is False, system calls\n\
-will be restarted when interrupted by signal sig, else system calls\n\
-will be interrupted.");
+
+/*[clinic input]
+signal.siginterrupt
+
+ signalnum: int
+ flag: int
+ /
+
+Change system call restart behaviour.
+
+If flag is False, system calls will be restarted when interrupted by
+signal sig, else system calls will be interrupted.
+[clinic start generated code]*/
static PyObject *
-signal_siginterrupt(PyObject *self, PyObject *args)
+signal_siginterrupt_impl(PyModuleDef *module, int signalnum, int flag)
+/*[clinic end generated code: output=5dcf8b031b0e8044 input=4160acacca3e2099]*/
{
- int sig_num;
- int flag;
-
- if (!PyArg_ParseTuple(args, "ii:siginterrupt", &sig_num, &flag))
- return NULL;
- if (sig_num < 1 || sig_num >= NSIG) {
+ if (signalnum < 1 || signalnum >= NSIG) {
PyErr_SetString(PyExc_ValueError,
"signal number out of range");
return NULL;
}
- if (siginterrupt(sig_num, flag)<0) {
+ if (siginterrupt(signalnum, flag)<0) {
PyErr_SetFromErrno(PyExc_OSError);
return NULL;
}
-
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
#endif
-static PyObject *
+
+static PyObject*
signal_set_wakeup_fd(PyObject *self, PyObject *args)
{
- struct stat buf;
+ struct _Py_stat_struct status;
+#ifdef MS_WINDOWS
+ PyObject *fdobj;
+ SOCKET_T sockfd, old_sockfd;
+ int res;
+ int res_size = sizeof res;
+ PyObject *mod;
+ int is_socket;
+
+ if (!PyArg_ParseTuple(args, "O:set_wakeup_fd", &fdobj))
+ return NULL;
+
+ sockfd = PyLong_AsSocket_t(fdobj);
+ if (sockfd == (SOCKET_T)(-1) && PyErr_Occurred())
+ return NULL;
+#else
int fd, old_fd;
+
if (!PyArg_ParseTuple(args, "i:set_wakeup_fd", &fd))
return NULL;
+#endif
+
#ifdef WITH_THREAD
if (PyThread_get_thread_ident() != main_thread) {
PyErr_SetString(PyExc_ValueError,
@@ -437,21 +557,90 @@ signal_set_wakeup_fd(PyObject *self, PyObject *args)
return NULL;
}
#endif
- if (fd != -1 && (!_PyVerify_fd(fd) || fstat(fd, &buf) != 0)) {
- PyErr_SetString(PyExc_ValueError, "invalid fd");
- return NULL;
+
+#ifdef MS_WINDOWS
+ is_socket = 0;
+ if (sockfd != INVALID_FD) {
+ /* Import the _socket module to call WSAStartup() */
+ mod = PyImport_ImportModuleNoBlock("_socket");
+ if (mod == NULL)
+ return NULL;
+ Py_DECREF(mod);
+
+ /* test the socket */
+ if (getsockopt(sockfd, SOL_SOCKET, SO_ERROR,
+ (char *)&res, &res_size) != 0) {
+ int fd, err;
+
+ err = WSAGetLastError();
+ if (err != WSAENOTSOCK) {
+ PyErr_SetExcFromWindowsErr(PyExc_OSError, err);
+ return NULL;
+ }
+
+ fd = (int)sockfd;
+ if ((SOCKET_T)fd != sockfd || !_PyVerify_fd(fd)) {
+ PyErr_SetString(PyExc_ValueError, "invalid fd");
+ return NULL;
+ }
+
+ if (_Py_fstat(fd, &status) != 0)
+ return NULL;
+
+ /* on Windows, a file cannot be set to non-blocking mode */
+ }
+ else {
+ is_socket = 1;
+
+ /* Windows does not provide a function to test if a socket
+ is in non-blocking mode */
+ }
}
+
+ old_sockfd = wakeup.fd;
+ wakeup.fd = sockfd;
+ wakeup.use_send = is_socket;
+
+ if (old_sockfd != INVALID_FD)
+ return PyLong_FromSocket_t(old_sockfd);
+ else
+ return PyLong_FromLong(-1);
+#else
+ if (fd != -1) {
+ int blocking;
+
+ if (!_PyVerify_fd(fd)) {
+ PyErr_SetString(PyExc_ValueError, "invalid fd");
+ return NULL;
+ }
+
+ if (_Py_fstat(fd, &status) != 0)
+ return NULL;
+
+ blocking = _Py_get_blocking(fd);
+ if (blocking < 0)
+ return NULL;
+ if (blocking) {
+ PyErr_Format(PyExc_ValueError,
+ "the fd %i must be in non-blocking mode",
+ fd);
+ return NULL;
+ }
+ }
+
old_fd = wakeup_fd;
wakeup_fd = fd;
+
return PyLong_FromLong(old_fd);
+#endif
}
PyDoc_STRVAR(set_wakeup_fd_doc,
"set_wakeup_fd(fd) -> fd\n\
\n\
-Sets the fd to be written to (with '\\0') when a signal\n\
+Sets the fd to be written to (with the signal number) when a signal\n\
comes in. A library can use this to wakeup select or poll.\n\
-The previous fd is returned.\n\
+The previous fd or -1 is returned.\n\
\n\
The fd must be non-blocking.");
@@ -459,71 +648,85 @@ The fd must be non-blocking.");
int
PySignal_SetWakeupFd(int fd)
{
- int old_fd = wakeup_fd;
+ int old_fd;
if (fd < 0)
fd = -1;
+
+#ifdef MS_WINDOWS
+ old_fd = Py_SAFE_DOWNCAST(wakeup.fd, SOCKET_T, int);
+ wakeup.fd = fd;
+#else
+ old_fd = wakeup_fd;
wakeup_fd = fd;
+#endif
return old_fd;
}
#ifdef HAVE_SETITIMER
+
+/*[clinic input]
+signal.setitimer
+
+ which: int
+ seconds: double
+ interval: double = 0.0
+ /
+
+Sets given itimer (one of ITIMER_REAL, ITIMER_VIRTUAL or ITIMER_PROF).
+
+The timer will fire after value seconds and after that every interval seconds.
+The itimer can be cleared by setting seconds to zero.
+
+Returns old values as a tuple: (delay, interval).
+[clinic start generated code]*/
+
static PyObject *
-signal_setitimer(PyObject *self, PyObject *args)
+signal_setitimer_impl(PyModuleDef *module, int which, double seconds,
+ double interval)
+/*[clinic end generated code: output=9a9227a27bd05988 input=0d27d417cfcbd51a]*/
{
- double first;
- double interval = 0;
- int which;
struct itimerval new, old;
- if(!PyArg_ParseTuple(args, "id|d:setitimer", &which, &first, &interval))
- return NULL;
-
- timeval_from_double(first, &new.it_value);
+ timeval_from_double(seconds, &new.it_value);
timeval_from_double(interval, &new.it_interval);
/* Let OS check "which" value */
if (setitimer(which, &new, &old) != 0) {
- PyErr_SetFromErrno(ItimerError);
- return NULL;
+ PyErr_SetFromErrno(ItimerError);
+ return NULL;
}
return itimer_retval(&old);
}
-PyDoc_STRVAR(setitimer_doc,
-"setitimer(which, seconds[, interval])\n\
-\n\
-Sets given itimer (one of ITIMER_REAL, ITIMER_VIRTUAL\n\
-or ITIMER_PROF) to fire after value seconds and after\n\
-that every interval seconds.\n\
-The itimer can be cleared by setting seconds to zero.\n\
-\n\
-Returns old values as a tuple: (delay, interval).");
#endif
#ifdef HAVE_GETITIMER
+
+/*[clinic input]
+signal.getitimer
+
+ which: int
+ /
+
+Returns current value of given itimer.
+[clinic start generated code]*/
+
static PyObject *
-signal_getitimer(PyObject *self, PyObject *args)
+signal_getitimer_impl(PyModuleDef *module, int which)
+/*[clinic end generated code: output=d1349ab18aadc569 input=f7d21d38f3490627]*/
{
- int which;
struct itimerval old;
- if (!PyArg_ParseTuple(args, "i:getitimer", &which))
- return NULL;
-
if (getitimer(which, &old) != 0) {
- PyErr_SetFromErrno(ItimerError);
- return NULL;
+ PyErr_SetFromErrno(ItimerError);
+ return NULL;
}
return itimer_retval(&old);
}
-PyDoc_STRVAR(getitimer_doc,
-"getitimer(which)\n\
-\n\
-Returns current value of given itimer.");
#endif
#if defined(PYPTHREAD_SIGMASK) || defined(HAVE_SIGWAIT) || \
@@ -614,21 +817,28 @@ sigset_to_set(sigset_t mask)
#endif
#ifdef PYPTHREAD_SIGMASK
+
+/*[clinic input]
+signal.pthread_sigmask
+
+ how: int
+ mask: object
+ /
+
+Fetch and/or change the signal mask of the calling thread.
+[clinic start generated code]*/
+
static PyObject *
-signal_pthread_sigmask(PyObject *self, PyObject *args)
+signal_pthread_sigmask_impl(PyModuleDef *module, int how, PyObject *mask)
+/*[clinic end generated code: output=b043a9f0eeb1e075 input=f3b7d7a61b7b8283]*/
{
- int how;
- PyObject *signals;
- sigset_t mask, previous;
+ sigset_t newmask, previous;
int err;
- if (!PyArg_ParseTuple(args, "iO:pthread_sigmask", &how, &signals))
- return NULL;
-
- if (iterable_to_sigset(signals, &mask))
+ if (iterable_to_sigset(mask, &newmask))
return NULL;
- err = pthread_sigmask(how, &mask, &previous);
+ err = pthread_sigmask(how, &newmask, &previous);
if (err != 0) {
errno = err;
PyErr_SetFromErrno(PyExc_OSError);
@@ -642,16 +852,23 @@ signal_pthread_sigmask(PyObject *self, PyObject *args)
return sigset_to_set(previous);
}
-PyDoc_STRVAR(signal_pthread_sigmask_doc,
-"pthread_sigmask(how, mask) -> old mask\n\
-\n\
-Fetch and/or change the signal mask of the calling thread.");
#endif /* #ifdef PYPTHREAD_SIGMASK */
#ifdef HAVE_SIGPENDING
+
+/*[clinic input]
+signal.sigpending
+
+Examine pending signals.
+
+Returns a set of signal numbers that are pending for delivery to
+the calling thread.
+[clinic start generated code]*/
+
static PyObject *
-signal_sigpending(PyObject *self)
+signal_sigpending_impl(PyModuleDef *module)
+/*[clinic end generated code: output=bf4ced803e7e51dd input=e0036c016f874e29]*/
{
int err;
sigset_t mask;
@@ -661,25 +878,32 @@ signal_sigpending(PyObject *self)
return sigset_to_set(mask);
}
-PyDoc_STRVAR(signal_sigpending_doc,
-"sigpending() -> list\n\
-\n\
-Examine pending signals.");
#endif /* #ifdef HAVE_SIGPENDING */
#ifdef HAVE_SIGWAIT
+
+/*[clinic input]
+signal.sigwait
+
+ sigset: object
+ /
+
+Wait for a signal.
+
+Suspend execution of the calling thread until the delivery of one of the
+signals specified in the signal set sigset. The function accepts the signal
+and returns the signal number.
+[clinic start generated code]*/
+
static PyObject *
-signal_sigwait(PyObject *self, PyObject *args)
+signal_sigwait(PyModuleDef *module, PyObject *sigset)
+/*[clinic end generated code: output=dae53048b0336a5c input=11af2d82d83c2e94]*/
{
- PyObject *signals;
sigset_t set;
int err, signum;
- if (!PyArg_ParseTuple(args, "O:sigwait", &signals))
- return NULL;
-
- if (iterable_to_sigset(signals, &set))
+ if (iterable_to_sigset(sigset, &set))
return NULL;
Py_BEGIN_ALLOW_THREADS
@@ -693,11 +917,8 @@ signal_sigwait(PyObject *self, PyObject *args)
return PyLong_FromLong(signum);
}
-PyDoc_STRVAR(signal_sigwait_doc,
-"sigwait(sigset) -> signum\n\
-\n\
-Wait a signal.");
-#endif /* #ifdef HAVE_SIGPENDING */
+#endif /* #ifdef HAVE_SIGWAIT */
+
#if defined(HAVE_SIGWAITINFO) || defined(HAVE_SIGTIMEDWAIT)
static int initialized;
@@ -752,100 +973,136 @@ fill_siginfo(siginfo_t *si)
#endif
#ifdef HAVE_SIGWAITINFO
+
+/*[clinic input]
+signal.sigwaitinfo
+
+ sigset: object
+ /
+
+Wait synchronously until one of the signals in *sigset* is delivered.
+
+Returns a struct_siginfo containing information about the signal.
+[clinic start generated code]*/
+
static PyObject *
-signal_sigwaitinfo(PyObject *self, PyObject *args)
+signal_sigwaitinfo(PyModuleDef *module, PyObject *sigset)
+/*[clinic end generated code: output=0bb53b07e5e926b5 input=f3779a74a991e171]*/
{
- PyObject *signals;
sigset_t set;
siginfo_t si;
int err;
+ int async_err = 0;
- if (!PyArg_ParseTuple(args, "O:sigwaitinfo", &signals))
+ if (iterable_to_sigset(sigset, &set))
return NULL;
- if (iterable_to_sigset(signals, &set))
- return NULL;
-
- Py_BEGIN_ALLOW_THREADS
- err = sigwaitinfo(&set, &si);
- Py_END_ALLOW_THREADS
+ do {
+ Py_BEGIN_ALLOW_THREADS
+ err = sigwaitinfo(&set, &si);
+ Py_END_ALLOW_THREADS
+ } while (err == -1
+ && errno == EINTR && !(async_err = PyErr_CheckSignals()));
if (err == -1)
- return PyErr_SetFromErrno(PyExc_OSError);
+ return (!async_err) ? PyErr_SetFromErrno(PyExc_OSError) : NULL;
return fill_siginfo(&si);
}
-PyDoc_STRVAR(signal_sigwaitinfo_doc,
-"sigwaitinfo(sigset) -> struct_siginfo\n\
-\n\
-Wait synchronously for a signal until one of the signals in *sigset* is\n\
-delivered.\n\
-Returns a struct_siginfo containing information about the signal.");
#endif /* #ifdef HAVE_SIGWAITINFO */
#ifdef HAVE_SIGTIMEDWAIT
+
+/*[clinic input]
+signal.sigtimedwait
+
+ sigset: object
+ timeout as timeout_obj: object
+ /
+
+Like sigwaitinfo(), but with a timeout.
+
+The timeout is specified in seconds, with floating point numbers allowed.
+[clinic start generated code]*/
+
static PyObject *
-signal_sigtimedwait(PyObject *self, PyObject *args)
+signal_sigtimedwait_impl(PyModuleDef *module, PyObject *sigset,
+ PyObject *timeout_obj)
+/*[clinic end generated code: output=c1960b5cea139929 input=53fd4ea3e3724eb8]*/
{
- PyObject *signals, *timeout;
- struct timespec buf;
+ struct timespec ts;
sigset_t set;
siginfo_t si;
- time_t tv_sec;
- long tv_nsec;
- int err;
+ int res;
+ _PyTime_t timeout, deadline, monotonic;
- if (!PyArg_ParseTuple(args, "OO:sigtimedwait",
- &signals, &timeout))
+ if (_PyTime_FromSecondsObject(&timeout,
+ timeout_obj, _PyTime_ROUND_CEILING) < 0)
return NULL;
- if (_PyTime_ObjectToTimespec(timeout, &tv_sec, &tv_nsec,
- _PyTime_ROUND_DOWN) == -1)
- return NULL;
- buf.tv_sec = tv_sec;
- buf.tv_nsec = tv_nsec;
-
- if (buf.tv_sec < 0 || buf.tv_nsec < 0) {
+ if (timeout < 0) {
PyErr_SetString(PyExc_ValueError, "timeout must be non-negative");
return NULL;
}
- if (iterable_to_sigset(signals, &set))
+ if (iterable_to_sigset(sigset, &set))
return NULL;
- Py_BEGIN_ALLOW_THREADS
- err = sigtimedwait(&set, &si, &buf);
- Py_END_ALLOW_THREADS
- if (err == -1) {
- if (errno == EAGAIN)
- Py_RETURN_NONE;
- else
- return PyErr_SetFromErrno(PyExc_OSError);
- }
+ deadline = _PyTime_GetMonotonicClock() + timeout;
+
+ do {
+ if (_PyTime_AsTimespec(timeout, &ts) < 0)
+ return NULL;
+
+ Py_BEGIN_ALLOW_THREADS
+ res = sigtimedwait(&set, &si, &ts);
+ Py_END_ALLOW_THREADS
+
+ if (res != -1)
+ break;
+
+ if (errno != EINTR) {
+ if (errno == EAGAIN)
+ Py_RETURN_NONE;
+ else
+ return PyErr_SetFromErrno(PyExc_OSError);
+ }
+
+ /* sigtimedwait() was interrupted by a signal (EINTR) */
+ if (PyErr_CheckSignals())
+ return NULL;
+
+ monotonic = _PyTime_GetMonotonicClock();
+ timeout = deadline - monotonic;
+ if (timeout < 0)
+ break;
+ } while (1);
return fill_siginfo(&si);
}
-PyDoc_STRVAR(signal_sigtimedwait_doc,
-"sigtimedwait(sigset, (timeout_sec, timeout_nsec)) -> struct_siginfo\n\
-\n\
-Like sigwaitinfo(), but with a timeout specified as a tuple of (seconds,\n\
-nanoseconds).");
#endif /* #ifdef HAVE_SIGTIMEDWAIT */
#if defined(HAVE_PTHREAD_KILL) && defined(WITH_THREAD)
+
+/*[clinic input]
+signal.pthread_kill
+
+ thread_id: long
+ signalnum: int
+ /
+
+Send a signal to a thread.
+[clinic start generated code]*/
+
static PyObject *
-signal_pthread_kill(PyObject *self, PyObject *args)
+signal_pthread_kill_impl(PyModuleDef *module, long thread_id, int signalnum)
+/*[clinic end generated code: output=35aed2713c756d7a input=77ed6a3b6f2a8122]*/
{
- long tid;
- int signum;
int err;
- if (!PyArg_ParseTuple(args, "li:pthread_kill", &tid, &signum))
- return NULL;
-
- err = pthread_kill((pthread_t)tid, signum);
+ err = pthread_kill((pthread_t)thread_id, signalnum);
if (err != 0) {
errno = err;
PyErr_SetFromErrno(PyExc_OSError);
@@ -859,62 +1116,29 @@ signal_pthread_kill(PyObject *self, PyObject *args)
Py_RETURN_NONE;
}
-PyDoc_STRVAR(signal_pthread_kill_doc,
-"pthread_kill(thread_id, signum)\n\
-\n\
-Send a signal to a thread.");
#endif /* #if defined(HAVE_PTHREAD_KILL) && defined(WITH_THREAD) */
-/* List of functions defined in the module */
+/* List of functions defined in the module -- some of the methoddefs are
+ defined to nothing if the corresponding C function is not available. */
static PyMethodDef signal_methods[] = {
-#ifdef HAVE_ALARM
- {"alarm", signal_alarm, METH_VARARGS, alarm_doc},
-#endif
-#ifdef HAVE_SETITIMER
- {"setitimer", signal_setitimer, METH_VARARGS, setitimer_doc},
-#endif
-#ifdef HAVE_GETITIMER
- {"getitimer", signal_getitimer, METH_VARARGS, getitimer_doc},
-#endif
- {"signal", signal_signal, METH_VARARGS, signal_doc},
- {"getsignal", signal_getsignal, METH_VARARGS, getsignal_doc},
+ {"default_int_handler", signal_default_int_handler, METH_VARARGS, default_int_handler_doc},
+ SIGNAL_ALARM_METHODDEF
+ SIGNAL_SETITIMER_METHODDEF
+ SIGNAL_GETITIMER_METHODDEF
+ SIGNAL_SIGNAL_METHODDEF
+ SIGNAL_GETSIGNAL_METHODDEF
{"set_wakeup_fd", signal_set_wakeup_fd, METH_VARARGS, set_wakeup_fd_doc},
-#ifdef HAVE_SIGINTERRUPT
- {"siginterrupt", signal_siginterrupt, METH_VARARGS, siginterrupt_doc},
-#endif
-#ifdef HAVE_PAUSE
- {"pause", (PyCFunction)signal_pause,
- METH_NOARGS, pause_doc},
-#endif
- {"default_int_handler", signal_default_int_handler,
- METH_VARARGS, default_int_handler_doc},
-#if defined(HAVE_PTHREAD_KILL) && defined(WITH_THREAD)
- {"pthread_kill", (PyCFunction)signal_pthread_kill,
- METH_VARARGS, signal_pthread_kill_doc},
-#endif
-#ifdef PYPTHREAD_SIGMASK
- {"pthread_sigmask", (PyCFunction)signal_pthread_sigmask,
- METH_VARARGS, signal_pthread_sigmask_doc},
-#endif
-#ifdef HAVE_SIGPENDING
- {"sigpending", (PyCFunction)signal_sigpending,
- METH_NOARGS, signal_sigpending_doc},
-#endif
-#ifdef HAVE_SIGWAIT
- {"sigwait", (PyCFunction)signal_sigwait,
- METH_VARARGS, signal_sigwait_doc},
-#endif
-#ifdef HAVE_SIGWAITINFO
- {"sigwaitinfo", (PyCFunction)signal_sigwaitinfo,
- METH_VARARGS, signal_sigwaitinfo_doc},
-#endif
-#ifdef HAVE_SIGTIMEDWAIT
- {"sigtimedwait", (PyCFunction)signal_sigtimedwait,
- METH_VARARGS, signal_sigtimedwait_doc},
-#endif
- {NULL, NULL} /* sentinel */
+ SIGNAL_SIGINTERRUPT_METHODDEF
+ SIGNAL_PAUSE_METHODDEF
+ SIGNAL_PTHREAD_KILL_METHODDEF
+ SIGNAL_PTHREAD_SIGMASK_METHODDEF
+ SIGNAL_SIGPENDING_METHODDEF
+ SIGNAL_SIGWAIT_METHODDEF
+ SIGNAL_SIGWAITINFO_METHODDEF
+ SIGNAL_SIGTIMEDWAIT_METHODDEF
+ {NULL, NULL} /* sentinel */
};
@@ -956,7 +1180,7 @@ the first is the signal number, the second is the interrupted stack frame.");
static struct PyModuleDef signalmodule = {
PyModuleDef_HEAD_INIT,
- "signal",
+ "_signal",
module_doc,
-1,
signal_methods,
@@ -967,7 +1191,7 @@ static struct PyModuleDef signalmodule = {
};
PyMODINIT_FUNC
-PyInit_signal(void)
+PyInit__signal(void)
{
PyObject *m, *d, *x;
int i;
@@ -1042,8 +1266,7 @@ PyInit_signal(void)
if (Handlers[SIGINT].func == DefaultHandler) {
/* Install default int handler */
Py_INCREF(IntHandler);
- Py_DECREF(Handlers[SIGINT].func);
- Handlers[SIGINT].func = IntHandler;
+ Py_SETREF(Handlers[SIGINT].func, IntHandler);
old_siginthandler = PyOS_setsig(SIGINT, signal_handler);
}
@@ -1380,7 +1603,7 @@ PyErr_SetInterrupt(void)
void
PyOS_InitInterrupts(void)
{
- PyObject *m = PyImport_ImportModule("signal");
+ PyObject *m = PyImport_ImportModule("_signal");
if (m) {
Py_DECREF(m);
}
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 23019ee9a7..8f571a2eb4 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -84,6 +84,11 @@ Local naming conventions:
*/
#ifdef __APPLE__
+#include <AvailabilityMacros.h>
+/* for getaddrinfo thread safety test on old versions of OS X */
+#ifndef MAC_OS_X_VERSION_10_5
+#define MAC_OS_X_VERSION_10_5 1050
+#endif
/*
* inet_aton is not available on OSX 10.3, yet we want to use a binary
* that was build on 10.4 or later to work on that release, weak linking
@@ -121,7 +126,7 @@ getpeername() -- return remote address [*]\n\
getsockname() -- return local address\n\
getsockopt(level, optname[, buflen]) -- get socket options\n\
gettimeout() -- return timeout or None\n\
-listen(n) -- start listening for incoming connections\n\
+listen([n]) -- start listening for incoming connections\n\
recv(buflen[, flags]) -- receive data\n\
recv_into(buffer[, nbytes[, flags]]) -- receive data (into a buffer)\n\
recvfrom(buflen[, flags]) -- receive data and sender\'s address\n\
@@ -179,15 +184,32 @@ if_indextoname(index) -- return the corresponding interface name\n\
# define USE_GETHOSTBYNAME_LOCK
#endif
-/* To use __FreeBSD_version */
+/* To use __FreeBSD_version, __OpenBSD__, and __NetBSD_Version__ */
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
/* On systems on which getaddrinfo() is believed to not be thread-safe,
- (this includes the getaddrinfo emulation) protect access with a lock. */
-#if defined(WITH_THREAD) && (defined(__APPLE__) || \
+ (this includes the getaddrinfo emulation) protect access with a lock.
+
+ getaddrinfo is thread-safe on Mac OS X 10.5 and later. Originally it was
+ a mix of code including an unsafe implementation from an old BSD's
+ libresolv. In 10.5 Apple reimplemented it as a safe IPC call to the
+ mDNSResponder process. 10.5 is the first be UNIX '03 certified, which
+ includes the requirement that getaddrinfo be thread-safe. See issue #25924.
+
+ It's thread-safe in OpenBSD starting with 5.4, released Nov 2013:
+ http://www.openbsd.org/plus54.html
+
+ It's thread-safe in NetBSD starting with 4.0, released Dec 2007:
+
+http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/net/getaddrinfo.c.diff?r1=1.82&r2=1.83
+ */
+#if defined(WITH_THREAD) && ( \
+ (defined(__APPLE__) && \
+ MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5) || \
(defined(__FreeBSD__) && __FreeBSD_version+0 < 503000) || \
- defined(__OpenBSD__) || defined(__NetBSD__) || \
+ (defined(__OpenBSD__) && OpenBSD+0 < 201311) || \
+ (defined(__NetBSD__) && __NetBSD_Version__+0 < 400000000) || \
!defined(HAVE_GETADDRINFO))
#define USE_GETADDRINFO_LOCK
#endif
@@ -284,14 +306,15 @@ if_indextoname(index) -- return the corresponding interface name\n\
# include <fcntl.h>
# endif
+#if defined(_MSC_VER) && _MSC_VER >= 1800
+/* Provides the IsWindows7SP1OrGreater() function */
+#include <VersionHelpers.h>
#endif
-#include <stddef.h>
-
-#ifndef offsetof
-# define offsetof(type, member) ((size_t)(&((type *)0)->member))
#endif
+#include <stddef.h>
+
#ifndef O_NONBLOCK
# define O_NONBLOCK O_NDELAY
#endif
@@ -459,7 +482,7 @@ static PyTypeObject sock_type;
#else
/* If there's no timeout left, we don't have to call select, so it's a safe,
* little white lie. */
-#define IS_SELECTABLE(s) (_PyIsSelectable_fd((s)->sock_fd) || (s)->sock_timeout <= 0.0)
+#define IS_SELECTABLE(s) (_PyIsSelectable_fd((s)->sock_fd) || (s)->sock_timeout <= 0)
#endif
static PyObject*
@@ -481,6 +504,19 @@ select_error(void)
#endif
#ifdef MS_WINDOWS
+# define GET_SOCK_ERROR WSAGetLastError()
+# define SET_SOCK_ERROR(err) WSASetLastError(err)
+# define SOCK_TIMEOUT_ERR WSAEWOULDBLOCK
+# define SOCK_INPROGRESS_ERR WSAEWOULDBLOCK
+#else
+# define GET_SOCK_ERROR errno
+# define SET_SOCK_ERROR(err) do { errno = err; } while (0)
+# define SOCK_TIMEOUT_ERR EWOULDBLOCK
+# define SOCK_INPROGRESS_ERR EINPROGRESS
+#endif
+
+
+#ifdef MS_WINDOWS
/* Does WSASocket() support the WSA_FLAG_NO_HANDLE_INHERIT flag? */
static int support_wsa_no_inherit = -1;
#endif
@@ -552,6 +588,9 @@ set_gaierror(int error)
static int
internal_setblocking(PySocketSockObject *s, int block)
{
+#ifdef MS_WINDOWS
+ u_long arg;
+#endif
#if !defined(MS_WINDOWS) \
&& !((defined(HAVE_SYS_IOCTL_H) && defined(FIONBIO)))
int delay_flag, new_delay_flag;
@@ -578,8 +617,8 @@ internal_setblocking(PySocketSockObject *s, int block)
fcntl(s->sock_fd, F_SETFL, new_delay_flag);
#endif
#else /* MS_WINDOWS */
- block = !block;
- ioctlsocket(s->sock_fd, FIONBIO, (u_long*)&block);
+ arg = !block;
+ ioctlsocket(s->sock_fd, FIONBIO, &arg);
#endif /* MS_WINDOWS */
Py_END_ALLOW_THREADS
@@ -587,60 +626,79 @@ internal_setblocking(PySocketSockObject *s, int block)
return 1;
}
-/* Do a select()/poll() on the socket, if necessary (sock_timeout > 0).
- The argument writing indicates the direction.
- This does not raise an exception; we'll let our caller do that
- after they've reacquired the interpreter lock.
- Returns 1 on timeout, -1 on error, 0 otherwise. */
static int
-internal_select_ex(PySocketSockObject *s, int writing, double interval)
+internal_select(PySocketSockObject *s, int writing, _PyTime_t interval,
+ int connect)
{
int n;
+#ifdef HAVE_POLL
+ struct pollfd pollfd;
+ _PyTime_t ms;
+#else
+ fd_set fds, efds;
+ struct timeval tv, *tvp;
+#endif
- /* Nothing to do unless we're in timeout mode (not non-blocking) */
- if (s->sock_timeout <= 0.0)
- return 0;
+#ifdef WITH_THREAD
+ /* must be called with the GIL held */
+ assert(PyGILState_Check());
+#endif
+
+ /* Error condition is for output only */
+ assert(!(connect && !writing));
/* Guard against closed socket */
if (s->sock_fd < 0)
return 0;
- /* Handling this condition here simplifies the select loops */
- if (interval < 0.0)
- return 1;
-
/* Prefer poll, if available, since you can poll() any fd
* which can't be done with select(). */
#ifdef HAVE_POLL
- {
- struct pollfd pollfd;
- int timeout;
+ pollfd.fd = s->sock_fd;
+ pollfd.events = writing ? POLLOUT : POLLIN;
+ if (connect) {
+ /* On Windows, the socket becomes writable on connection success,
+ but a connection failure is notified as an error. On POSIX, the
+ socket becomes writable on connection success or on connection
+ failure. */
+ pollfd.events |= POLLERR;
+ }
- pollfd.fd = s->sock_fd;
- pollfd.events = writing ? POLLOUT : POLLIN;
+ /* s->sock_timeout is in seconds, timeout in ms */
+ ms = _PyTime_AsMilliseconds(interval, _PyTime_ROUND_CEILING);
+ assert(ms <= INT_MAX);
- /* s->sock_timeout is in seconds, timeout in ms */
- timeout = (int)(interval * 1000 + 0.5);
- n = poll(&pollfd, 1, timeout);
- }
+ Py_BEGIN_ALLOW_THREADS;
+ n = poll(&pollfd, 1, (int)ms);
+ Py_END_ALLOW_THREADS;
#else
- {
- /* Construct the arguments to select */
- fd_set fds;
- struct timeval tv;
- tv.tv_sec = (int)interval;
- tv.tv_usec = (int)((interval - tv.tv_sec) * 1e6);
- FD_ZERO(&fds);
- FD_SET(s->sock_fd, &fds);
-
- /* See if the socket is ready */
- if (writing)
- n = select(Py_SAFE_DOWNCAST(s->sock_fd+1, SOCKET_T, int),
- NULL, &fds, NULL, &tv);
- else
- n = select(Py_SAFE_DOWNCAST(s->sock_fd+1, SOCKET_T, int),
- &fds, NULL, NULL, &tv);
+ if (interval >= 0) {
+ _PyTime_AsTimeval_noraise(interval, &tv, _PyTime_ROUND_CEILING);
+ tvp = &tv;
+ }
+ else
+ tvp = NULL;
+
+ FD_ZERO(&fds);
+ FD_SET(s->sock_fd, &fds);
+ FD_ZERO(&efds);
+ if (connect) {
+ /* On Windows, the socket becomes writable on connection success,
+ but a connection failure is notified as an error. On POSIX, the
+ socket becomes writable on connection success or on connection
+ failure. */
+ FD_SET(s->sock_fd, &efds);
}
+
+ /* See if the socket is ready */
+ Py_BEGIN_ALLOW_THREADS;
+ if (writing)
+ n = select(Py_SAFE_DOWNCAST(s->sock_fd+1, SOCKET_T, int),
+ NULL, &fds, &efds, tvp);
+ else
+ n = select(Py_SAFE_DOWNCAST(s->sock_fd+1, SOCKET_T, int),
+ &fds, NULL, &efds, tvp);
+ Py_END_ALLOW_THREADS;
#endif
if (n < 0)
@@ -650,56 +708,168 @@ internal_select_ex(PySocketSockObject *s, int writing, double interval)
return 0;
}
+/* Call a socket function.
+
+ On error, raise an exception and return -1 if err is set, or fill err and
+ return -1 otherwise. If a signal was received and the signal handler raised
+ an exception, return -1, and set err to -1 if err is set.
+
+ On success, return 0, and set err to 0 if err is set.
+
+ If the socket has a timeout, wait until the socket is ready before calling
+ the function: wait until the socket is writable if writing is nonzero, wait
+ until the socket received data otherwise.
+
+ If the socket function is interrupted by a signal (failed with EINTR): retry
+ the function, except if the signal handler raised an exception (PEP 475).
+
+ When the function is retried, recompute the timeout using a monotonic clock.
+
+ sock_call_ex() must be called with the GIL held. The socket function is
+ called with the GIL released. */
static int
-internal_select(PySocketSockObject *s, int writing)
+sock_call_ex(PySocketSockObject *s,
+ int writing,
+ int (*sock_func) (PySocketSockObject *s, void *data),
+ void *data,
+ int connect,
+ int *err,
+ _PyTime_t timeout)
{
- return internal_select_ex(s, writing, s->sock_timeout);
-}
+ int has_timeout = (timeout > 0);
+ _PyTime_t deadline = 0;
+ int deadline_initialized = 0;
+ int res;
-/*
- Two macros for automatic retry of select() in case of false positives
- (for example, select() could indicate a socket is ready for reading
- but the data then discarded by the OS because of a wrong checksum).
- Here is an example of use:
+#ifdef WITH_THREAD
+ /* sock_call() must be called with the GIL held. */
+ assert(PyGILState_Check());
+#endif
- BEGIN_SELECT_LOOP(s)
- Py_BEGIN_ALLOW_THREADS
- timeout = internal_select_ex(s, 0, interval);
- if (!timeout)
- outlen = recv(s->sock_fd, cbuf, len, flags);
- Py_END_ALLOW_THREADS
- if (timeout == 1) {
- PyErr_SetString(socket_timeout, "timed out");
+ /* outer loop to retry select() when select() is interrupted by a signal
+ or to retry select()+sock_func() on false positive (see above) */
+ while (1) {
+ /* For connect(), poll even for blocking socket. The connection
+ runs asynchronously. */
+ if (has_timeout || connect) {
+ if (has_timeout) {
+ _PyTime_t interval;
+
+ if (deadline_initialized) {
+ /* recompute the timeout */
+ interval = deadline - _PyTime_GetMonotonicClock();
+ }
+ else {
+ deadline_initialized = 1;
+ deadline = _PyTime_GetMonotonicClock() + timeout;
+ interval = timeout;
+ }
+
+ if (interval >= 0)
+ res = internal_select(s, writing, interval, connect);
+ else
+ res = 1;
+ }
+ else {
+ res = internal_select(s, writing, timeout, connect);
+ }
+
+ if (res == -1) {
+ if (err)
+ *err = GET_SOCK_ERROR;
+
+ if (CHECK_ERRNO(EINTR)) {
+ /* select() was interrupted by a signal */
+ if (PyErr_CheckSignals()) {
+ if (err)
+ *err = -1;
+ return -1;
+ }
+
+ /* retry select() */
+ continue;
+ }
+
+ /* select() failed */
+ s->errorhandler();
+ return -1;
+ }
+
+ if (res == 1) {
+ if (err)
+ *err = SOCK_TIMEOUT_ERR;
+ else
+ PyErr_SetString(socket_timeout, "timed out");
+ return -1;
+ }
+
+ /* the socket is ready */
+ }
+
+ /* inner loop to retry sock_func() when sock_func() is interrupted
+ by a signal */
+ while (1) {
+ Py_BEGIN_ALLOW_THREADS
+ res = sock_func(s, data);
+ Py_END_ALLOW_THREADS
+
+ if (res) {
+ /* sock_func() succeeded */
+ if (err)
+ *err = 0;
+ return 0;
+ }
+
+ if (err)
+ *err = GET_SOCK_ERROR;
+
+ if (!CHECK_ERRNO(EINTR))
+ break;
+
+ /* sock_func() was interrupted by a signal */
+ if (PyErr_CheckSignals()) {
+ if (err)
+ *err = -1;
+ return -1;
+ }
+
+ /* retry sock_func() */
+ }
+
+ if (s->sock_timeout > 0
+ && (CHECK_ERRNO(EWOULDBLOCK) || CHECK_ERRNO(EAGAIN))) {
+ /* False positive: sock_func() failed with EWOULDBLOCK or EAGAIN.
+
+ For example, select() could indicate a socket is ready for
+ reading, but the data then discarded by the OS because of a
+ wrong checksum.
+
+ Loop on select() to recheck for socket readyness. */
+ continue;
+ }
+
+ /* sock_func() failed */
+ if (!err)
+ s->errorhandler();
+ /* else: err was already set before */
return -1;
}
- END_SELECT_LOOP(s)
-*/
+}
+
+static int
+sock_call(PySocketSockObject *s,
+ int writing,
+ int (*func) (PySocketSockObject *s, void *data),
+ void *data)
+{
+ return sock_call_ex(s, writing, func, data, 0, NULL, s->sock_timeout);
+}
-#define BEGIN_SELECT_LOOP(s) \
- { \
- _PyTime_timeval now, deadline = {0, 0}; \
- double interval = s->sock_timeout; \
- int has_timeout = s->sock_timeout > 0.0; \
- if (has_timeout) { \
- _PyTime_gettimeofday(&now); \
- deadline = now; \
- _PyTime_ADD_SECONDS(deadline, s->sock_timeout); \
- } \
- while (1) { \
- errno = 0; \
-
-#define END_SELECT_LOOP(s) \
- if (!has_timeout || \
- (!CHECK_ERRNO(EWOULDBLOCK) && !CHECK_ERRNO(EAGAIN))) \
- break; \
- _PyTime_gettimeofday(&now); \
- interval = _PyTime_INTERVAL(now, deadline); \
- } \
- } \
/* Initialize a new socket object. */
-static double defaulttimeout = -1.0; /* Default timeout for new sockets */
+/* Default timeout for new sockets */
+static _PyTime_t defaulttimeout = _PYTIME_FROMSECONDS(-1);
static void
init_sockobject(PySocketSockObject *s,
@@ -713,12 +883,12 @@ init_sockobject(PySocketSockObject *s,
s->errorhandler = &set_error;
#ifdef SOCK_NONBLOCK
if (type & SOCK_NONBLOCK)
- s->sock_timeout = 0.0;
+ s->sock_timeout = 0;
else
#endif
{
s->sock_timeout = defaulttimeout;
- if (defaulttimeout >= 0.0)
+ if (defaulttimeout >= 0)
internal_setblocking(s, 0);
}
@@ -1214,6 +1384,71 @@ makesockaddr(SOCKET_T sockfd, struct sockaddr *addr, size_t addrlen, int proto)
}
}
+/* Helper for getsockaddrarg: bypass IDNA for ASCII-only host names
+ (in particular, numeric IP addresses). */
+struct maybe_idna {
+ PyObject *obj;
+ char *buf;
+};
+
+static void
+idna_cleanup(struct maybe_idna *data)
+{
+ Py_CLEAR(data->obj);
+}
+
+static int
+idna_converter(PyObject *obj, struct maybe_idna *data)
+{
+ size_t len;
+ PyObject *obj2, *obj3;
+ if (obj == NULL) {
+ idna_cleanup(data);
+ return 1;
+ }
+ data->obj = NULL;
+ len = -1;
+ if (PyBytes_Check(obj)) {
+ data->buf = PyBytes_AsString(obj);
+ len = PyBytes_Size(obj);
+ }
+ else if (PyByteArray_Check(obj)) {
+ data->buf = PyByteArray_AsString(obj);
+ len = PyByteArray_Size(obj);
+ }
+ else if (PyUnicode_Check(obj) && PyUnicode_READY(obj) == 0 && PyUnicode_IS_COMPACT_ASCII(obj)) {
+ data->buf = PyUnicode_DATA(obj);
+ len = PyUnicode_GET_LENGTH(obj);
+ }
+ else {
+ obj2 = PyUnicode_FromObject(obj);
+ if (!obj2) {
+ PyErr_Format(PyExc_TypeError, "string or unicode text buffer expected, not %s",
+ obj->ob_type->tp_name);
+ return 0;
+ }
+ obj3 = PyUnicode_AsEncodedString(obj2, "idna", NULL);
+ Py_DECREF(obj2);
+ if (!obj3) {
+ PyErr_SetString(PyExc_TypeError, "encoding of hostname failed");
+ return 0;
+ }
+ if (!PyBytes_Check(obj3)) {
+ Py_DECREF(obj3);
+ PyErr_SetString(PyExc_TypeError, "encoding of hostname failed to return bytes");
+ return 0;
+ }
+ data->obj = obj3;
+ data->buf = PyBytes_AS_STRING(obj3);
+ len = PyBytes_GET_SIZE(obj3);
+ }
+ if (strlen(data->buf) != len) {
+ Py_CLEAR(data->obj);
+ PyErr_SetString(PyExc_TypeError, "host name must not contain null character");
+ return 0;
+ }
+ return Py_CLEANUP_SUPPORTED;
+}
/* Parse a socket address argument according to the socket object's
address family. Return 1 if the address was in the proper format,
@@ -1230,8 +1465,7 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
case AF_UNIX:
{
struct sockaddr_un* addr;
- char *path;
- int len;
+ Py_buffer path;
int retval = 0;
/* PEP 383. Not using PyUnicode_FSConverter since we need to
@@ -1242,14 +1476,17 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
}
else
Py_INCREF(args);
- if (!PyArg_Parse(args, "y#", &path, &len))
- goto unix_out;
+ if (!PyArg_Parse(args, "y*", &path)) {
+ Py_DECREF(args);
+ return retval;
+ }
+ assert(path.len >= 0);
addr = (struct sockaddr_un*)addr_ret;
#ifdef linux
- if (len > 0 && path[0] == 0) {
+ if (path.len > 0 && *(const char *)path.buf == 0) {
/* Linux abstract namespace extension */
- if (len > sizeof addr->sun_path) {
+ if ((size_t)path.len > sizeof addr->sun_path) {
PyErr_SetString(PyExc_OSError,
"AF_UNIX path too long");
goto unix_out;
@@ -1259,18 +1496,19 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
#endif /* linux */
{
/* regular NULL-terminated string */
- if (len >= sizeof addr->sun_path) {
+ if ((size_t)path.len >= sizeof addr->sun_path) {
PyErr_SetString(PyExc_OSError,
"AF_UNIX path too long");
goto unix_out;
}
- addr->sun_path[len] = 0;
+ addr->sun_path[path.len] = 0;
}
addr->sun_family = s->sock_family;
- memcpy(addr->sun_path, path, len);
- *len_ret = len + offsetof(struct sockaddr_un, sun_path);
+ memcpy(addr->sun_path, path.buf, path.len);
+ *len_ret = path.len + offsetof(struct sockaddr_un, sun_path);
retval = 1;
unix_out:
+ PyBuffer_Release(&path);
Py_DECREF(args);
return retval;
}
@@ -1308,7 +1546,7 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
case AF_INET:
{
struct sockaddr_in* addr;
- char *host;
+ struct maybe_idna host = {NULL, NULL};
int port, result;
if (!PyTuple_Check(args)) {
PyErr_Format(
@@ -1318,13 +1556,13 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
Py_TYPE(args)->tp_name);
return 0;
}
- if (!PyArg_ParseTuple(args, "eti:getsockaddrarg",
- "idna", &host, &port))
+ if (!PyArg_ParseTuple(args, "O&i:getsockaddrarg",
+ idna_converter, &host, &port))
return 0;
addr=(struct sockaddr_in*)addr_ret;
- result = setipaddr(host, (struct sockaddr *)addr,
+ result = setipaddr(host.buf, (struct sockaddr *)addr,
sizeof(*addr), AF_INET);
- PyMem_Free(host);
+ idna_cleanup(&host);
if (result < 0)
return 0;
if (port < 0 || port > 0xffff) {
@@ -1343,7 +1581,7 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
case AF_INET6:
{
struct sockaddr_in6* addr;
- char *host;
+ struct maybe_idna host = {NULL, NULL};
int port, result;
unsigned int flowinfo, scope_id;
flowinfo = scope_id = 0;
@@ -1355,15 +1593,15 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
Py_TYPE(args)->tp_name);
return 0;
}
- if (!PyArg_ParseTuple(args, "eti|II",
- "idna", &host, &port, &flowinfo,
+ if (!PyArg_ParseTuple(args, "O&i|II",
+ idna_converter, &host, &port, &flowinfo,
&scope_id)) {
return 0;
}
addr = (struct sockaddr_in6*)addr_ret;
- result = setipaddr(host, (struct sockaddr *)addr,
+ result = setipaddr(host.buf, (struct sockaddr *)addr,
sizeof(*addr), AF_INET6);
- PyMem_Free(host);
+ idna_cleanup(&host);
if (result < 0)
return 0;
if (port < 0 || port > 0xffff) {
@@ -1492,8 +1730,7 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
int protoNumber;
int hatype = 0;
int pkttype = 0;
- char *haddr = NULL;
- unsigned int halen = 0;
+ Py_buffer haddr = {NULL, NULL};
if (!PyTuple_Check(args)) {
PyErr_Format(
@@ -1503,25 +1740,28 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
Py_TYPE(args)->tp_name);
return 0;
}
- if (!PyArg_ParseTuple(args, "si|iiy#", &interfaceName,
+ if (!PyArg_ParseTuple(args, "si|iiy*", &interfaceName,
&protoNumber, &pkttype, &hatype,
- &haddr, &halen))
+ &haddr))
return 0;
strncpy(ifr.ifr_name, interfaceName, sizeof(ifr.ifr_name));
ifr.ifr_name[(sizeof(ifr.ifr_name))-1] = '\0';
if (ioctl(s->sock_fd, SIOCGIFINDEX, &ifr) < 0) {
s->errorhandler();
+ PyBuffer_Release(&haddr);
return 0;
}
- if (halen > 8) {
- PyErr_SetString(PyExc_ValueError,
- "Hardware address must be 8 bytes or less");
- return 0;
+ if (haddr.buf && haddr.len > 8) {
+ PyErr_SetString(PyExc_ValueError,
+ "Hardware address must be 8 bytes or less");
+ PyBuffer_Release(&haddr);
+ return 0;
}
if (protoNumber < 0 || protoNumber > 0xffff) {
PyErr_SetString(
PyExc_OverflowError,
"getsockaddrarg: protoNumber must be 0-65535.");
+ PyBuffer_Release(&haddr);
return 0;
}
addr = (struct sockaddr_ll*)addr_ret;
@@ -1530,11 +1770,14 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
addr->sll_ifindex = ifr.ifr_ifindex;
addr->sll_pkttype = pkttype;
addr->sll_hatype = hatype;
- if (halen != 0) {
- memcpy(&addr->sll_addr, haddr, halen);
+ if (haddr.buf) {
+ memcpy(&addr->sll_addr, haddr.buf, haddr.len);
+ addr->sll_halen = haddr.len;
}
- addr->sll_halen = halen;
+ else
+ addr->sll_halen = 0;
*len_ret = sizeof *addr;
+ PyBuffer_Release(&haddr);
return 1;
}
#endif
@@ -1611,7 +1854,7 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
if (len == 0) {
ifr.ifr_ifindex = 0;
- } else if (len < sizeof(ifr.ifr_name)) {
+ } else if ((size_t)len < sizeof(ifr.ifr_name)) {
strncpy(ifr.ifr_name, PyBytes_AS_STRING(interfaceName), sizeof(ifr.ifr_name));
ifr.ifr_name[(sizeof(ifr.ifr_name))-1] = '\0';
if (ioctl(s->sock_fd, SIOCGIFINDEX, &ifr) < 0) {
@@ -1661,7 +1904,7 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
return 0;
}
- if (PyBytes_GET_SIZE(ctl_name) > sizeof(info.ctl_name)) {
+ if (PyBytes_GET_SIZE(ctl_name) > (Py_ssize_t)sizeof(info.ctl_name)) {
PyErr_SetString(PyExc_ValueError,
"provided string is too long");
Py_DECREF(ctl_name);
@@ -1896,8 +2139,15 @@ cmsg_min_space(struct msghdr *msg, struct cmsghdr *cmsgh, size_t space)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wtautological-compare"
#endif
+ #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wtype-limits"
+ #endif
if (msg->msg_controllen < 0)
return 0;
+ #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))
+ #pragma GCC diagnostic pop
+ #endif
#ifdef __clang__
#pragma clang diagnostic pop
#endif
@@ -1955,22 +2205,56 @@ get_cmsg_data_len(struct msghdr *msg, struct cmsghdr *cmsgh, size_t *data_len)
#endif /* CMSG_LEN */
+struct sock_accept {
+ socklen_t *addrlen;
+ sock_addr_t *addrbuf;
+ SOCKET_T result;
+};
+
+#if defined(HAVE_ACCEPT4) && defined(SOCK_CLOEXEC)
+/* accept4() is available on Linux 2.6.28+ and glibc 2.10 */
+static int accept4_works = -1;
+#endif
+
+static int
+sock_accept_impl(PySocketSockObject *s, void *data)
+{
+ struct sock_accept *ctx = data;
+
+#if defined(HAVE_ACCEPT4) && defined(SOCK_CLOEXEC)
+ if (accept4_works != 0) {
+ ctx->result = accept4(s->sock_fd, SAS2SA(ctx->addrbuf), ctx->addrlen,
+ SOCK_CLOEXEC);
+ if (ctx->result == INVALID_SOCKET && accept4_works == -1) {
+ /* On Linux older than 2.6.28, accept4() fails with ENOSYS */
+ accept4_works = (errno != ENOSYS);
+ }
+ }
+ if (accept4_works == 0)
+ ctx->result = accept(s->sock_fd, SAS2SA(ctx->addrbuf), ctx->addrlen);
+#else
+ ctx->result = accept(s->sock_fd, SAS2SA(ctx->addrbuf), ctx->addrlen);
+#endif
+
+#ifdef MS_WINDOWS
+ return (ctx->result != INVALID_SOCKET);
+#else
+ return (ctx->result >= 0);
+#endif
+}
+
/* s._accept() -> (fd, address) */
static PyObject *
sock_accept(PySocketSockObject *s)
{
sock_addr_t addrbuf;
- SOCKET_T newfd = INVALID_SOCKET;
+ SOCKET_T newfd;
socklen_t addrlen;
PyObject *sock = NULL;
PyObject *addr = NULL;
PyObject *res = NULL;
- int timeout;
-#if defined(HAVE_ACCEPT4) && defined(SOCK_CLOEXEC)
- /* accept4() is available on Linux 2.6.28+ and glibc 2.10 */
- static int accept4_works = -1;
-#endif
+ struct sock_accept ctx;
if (!getsockaddrlen(s, &addrlen))
return NULL;
@@ -1979,36 +2263,11 @@ sock_accept(PySocketSockObject *s)
if (!IS_SELECTABLE(s))
return select_error();
- BEGIN_SELECT_LOOP(s)
-
- Py_BEGIN_ALLOW_THREADS
- timeout = internal_select_ex(s, 0, interval);
- if (!timeout) {
-#if defined(HAVE_ACCEPT4) && defined(SOCK_CLOEXEC)
- if (accept4_works != 0) {
- newfd = accept4(s->sock_fd, SAS2SA(&addrbuf), &addrlen,
- SOCK_CLOEXEC);
- if (newfd == INVALID_SOCKET && accept4_works == -1) {
- /* On Linux older than 2.6.28, accept4() fails with ENOSYS */
- accept4_works = (errno != ENOSYS);
- }
- }
- if (accept4_works == 0)
- newfd = accept(s->sock_fd, SAS2SA(&addrbuf), &addrlen);
-#else
- newfd = accept(s->sock_fd, SAS2SA(&addrbuf), &addrlen);
-#endif
- }
- Py_END_ALLOW_THREADS
-
- if (timeout == 1) {
- PyErr_SetString(socket_timeout, "timed out");
+ ctx.addrlen = &addrlen;
+ ctx.addrbuf = &addrbuf;
+ if (sock_call(s, 0, sock_accept_impl, &ctx) < 0)
return NULL;
- }
- END_SELECT_LOOP(s)
-
- if (newfd == INVALID_SOCKET)
- return s->errorhandler();
+ newfd = ctx.result;
#ifdef MS_WINDOWS
if (!SetHandleInformation((HANDLE)newfd, HANDLE_FLAG_INHERIT, 0)) {
@@ -2069,7 +2328,7 @@ sock_setblocking(PySocketSockObject *s, PyObject *arg)
if (block == -1 && PyErr_Occurred())
return NULL;
- s->sock_timeout = block ? -1.0 : 0.0;
+ s->sock_timeout = _PyTime_FromSeconds(block ? -1 : 0);
internal_setblocking(s, block);
Py_INCREF(Py_None);
@@ -2083,6 +2342,47 @@ Set the socket to blocking (flag is true) or non-blocking (false).\n\
setblocking(True) is equivalent to settimeout(None);\n\
setblocking(False) is equivalent to settimeout(0.0).");
+static int
+socket_parse_timeout(_PyTime_t *timeout, PyObject *timeout_obj)
+{
+#ifdef MS_WINDOWS
+ struct timeval tv;
+#endif
+#ifndef HAVE_POLL
+ _PyTime_t ms;
+#endif
+ int overflow = 0;
+
+ if (timeout_obj == Py_None) {
+ *timeout = _PyTime_FromSeconds(-1);
+ return 0;
+ }
+
+ if (_PyTime_FromSecondsObject(timeout,
+ timeout_obj, _PyTime_ROUND_CEILING) < 0)
+ return -1;
+
+ if (*timeout < 0) {
+ PyErr_SetString(PyExc_ValueError, "Timeout value out of range");
+ return -1;
+ }
+
+#ifdef MS_WINDOWS
+ overflow |= (_PyTime_AsTimeval(*timeout, &tv, _PyTime_ROUND_CEILING) < 0);
+#endif
+#ifndef HAVE_POLL
+ ms = _PyTime_AsMilliseconds(*timeout, _PyTime_ROUND_CEILING);
+ overflow |= (ms > INT_MAX);
+#endif
+ if (overflow) {
+ PyErr_SetString(PyExc_OverflowError,
+ "timeout doesn't fit into C timeval");
+ return -1;
+ }
+
+ return 0;
+}
+
/* s.settimeout(timeout) method. Argument:
None -- no timeout, blocking mode; same as setblocking(True)
0.0 -- non-blocking mode; same as setblocking(False)
@@ -2092,22 +2392,13 @@ setblocking(False) is equivalent to settimeout(0.0).");
static PyObject *
sock_settimeout(PySocketSockObject *s, PyObject *arg)
{
- double timeout;
+ _PyTime_t timeout;
- if (arg == Py_None)
- timeout = -1.0;
- else {
- timeout = PyFloat_AsDouble(arg);
- if (timeout < 0.0) {
- if (!PyErr_Occurred())
- PyErr_SetString(PyExc_ValueError,
- "Timeout value out of range");
- return NULL;
- }
- }
+ if (socket_parse_timeout(&timeout, arg) < 0)
+ return NULL;
s->sock_timeout = timeout;
- internal_setblocking(s, timeout < 0.0);
+ internal_setblocking(s, timeout < 0);
Py_INCREF(Py_None);
return Py_None;
@@ -2126,12 +2417,14 @@ Setting a timeout of zero is the same as setblocking(0).");
static PyObject *
sock_gettimeout(PySocketSockObject *s)
{
- if (s->sock_timeout < 0.0) {
+ if (s->sock_timeout < 0) {
Py_INCREF(Py_None);
return Py_None;
}
- else
- return PyFloat_FromDouble(s->sock_timeout);
+ else {
+ double seconds = _PyTime_AsSecondsDouble(s->sock_timeout);
+ return PyFloat_FromDouble(seconds);
+ }
}
PyDoc_STRVAR(gettimeout_doc,
@@ -2152,22 +2445,22 @@ sock_setsockopt(PySocketSockObject *s, PyObject *args)
int level;
int optname;
int res;
- char *buf;
- int buflen;
+ Py_buffer optval;
int flag;
if (PyArg_ParseTuple(args, "iii:setsockopt",
&level, &optname, &flag)) {
- buf = (char *) &flag;
- buflen = sizeof flag;
+ res = setsockopt(s->sock_fd, level, optname,
+ (char*)&flag, sizeof flag);
}
else {
PyErr_Clear();
- if (!PyArg_ParseTuple(args, "iiy#:setsockopt",
- &level, &optname, &buf, &buflen))
+ if (!PyArg_ParseTuple(args, "iiy*:setsockopt",
+ &level, &optname, &optval))
return NULL;
+ res = setsockopt(s->sock_fd, level, optname, optval.buf, optval.len);
+ PyBuffer_Release(&optval);
}
- res = setsockopt(s->sock_fd, level, optname, (void *)buf, buflen);
if (res < 0)
return s->errorhandler();
Py_INCREF(Py_None);
@@ -2271,6 +2564,10 @@ sock_close(PySocketSockObject *s)
{
SOCKET_T fd;
+ /* We do not want to retry upon EINTR: see http://lwn.net/Articles/576478/
+ * and http://linux.derkeiler.com/Mailing-Lists/Kernel/2005-09/3000.html
+ * for more details.
+ */
if ((fd = s->sock_fd) != -1) {
s->sock_fd = -1;
Py_BEGIN_ALLOW_THREADS
@@ -2302,92 +2599,90 @@ The object cannot be used after this call, but the file descriptor\n\
can be reused for other purposes. The file descriptor is returned.");
static int
+sock_connect_impl(PySocketSockObject *s, void* Py_UNUSED(data))
+{
+ int err;
+ socklen_t size = sizeof err;
+
+ if (getsockopt(s->sock_fd, SOL_SOCKET, SO_ERROR, (void *)&err, &size)) {
+ /* getsockopt() failed */
+ return 0;
+ }
+
+ if (err == EISCONN)
+ return 1;
+ if (err != 0) {
+ /* sock_call_ex() uses GET_SOCK_ERROR() to get the error code */
+ SET_SOCK_ERROR(err);
+ return 0;
+ }
+ return 1;
+}
+
+static int
internal_connect(PySocketSockObject *s, struct sockaddr *addr, int addrlen,
- int *timeoutp)
+ int raise)
{
- int res, timeout;
+ int res, err, wait_connect;
- timeout = 0;
+ Py_BEGIN_ALLOW_THREADS
res = connect(s->sock_fd, addr, addrlen);
+ Py_END_ALLOW_THREADS
-#ifdef MS_WINDOWS
-
- if (s->sock_timeout > 0.0) {
- if (res < 0 && WSAGetLastError() == WSAEWOULDBLOCK &&
- IS_SELECTABLE(s)) {
- /* This is a mess. Best solution: trust select */
- fd_set fds;
- fd_set fds_exc;
- struct timeval tv;
- tv.tv_sec = (int)s->sock_timeout;
- tv.tv_usec = (int)((s->sock_timeout - tv.tv_sec) * 1e6);
- FD_ZERO(&fds);
- FD_SET(s->sock_fd, &fds);
- FD_ZERO(&fds_exc);
- FD_SET(s->sock_fd, &fds_exc);
- res = select(Py_SAFE_DOWNCAST(s->sock_fd+1, SOCKET_T, int),
- NULL, &fds, &fds_exc, &tv);
- if (res == 0) {
- res = WSAEWOULDBLOCK;
- timeout = 1;
- } else if (res > 0) {
- if (FD_ISSET(s->sock_fd, &fds))
- /* The socket is in the writable set - this
- means connected */
- res = 0;
- else {
- /* As per MS docs, we need to call getsockopt()
- to get the underlying error */
- int res_size = sizeof res;
- /* It must be in the exception set */
- assert(FD_ISSET(s->sock_fd, &fds_exc));
- if (0 == getsockopt(s->sock_fd, SOL_SOCKET, SO_ERROR,
- (char *)&res, &res_size))
- /* getsockopt also clears WSAGetLastError,
- so reset it back. */
- WSASetLastError(res);
- else
- res = WSAGetLastError();
- }
- }
- /* else if (res < 0) an error occurred */
- }
+ if (!res) {
+ /* connect() succeeded, the socket is connected */
+ return 0;
}
- if (res < 0)
- res = WSAGetLastError();
+ /* connect() failed */
-#else
+ /* save error, PyErr_CheckSignals() can replace it */
+ err = GET_SOCK_ERROR;
+ if (CHECK_ERRNO(EINTR)) {
+ if (PyErr_CheckSignals())
+ return -1;
- if (s->sock_timeout > 0.0) {
- if (res < 0 && errno == EINPROGRESS && IS_SELECTABLE(s)) {
- timeout = internal_select(s, 1);
- if (timeout == 0) {
- /* Bug #1019808: in case of an EINPROGRESS,
- use getsockopt(SO_ERROR) to get the real
- error. */
- socklen_t res_size = sizeof res;
- (void)getsockopt(s->sock_fd, SOL_SOCKET,
- SO_ERROR, &res, &res_size);
- if (res == EISCONN)
- res = 0;
- errno = res;
- }
- else if (timeout == -1) {
- res = errno; /* had error */
- }
- else
- res = EWOULDBLOCK; /* timed out */
- }
- }
+ /* Issue #23618: when connect() fails with EINTR, the connection is
+ running asynchronously.
- if (res < 0)
- res = errno;
+ If the socket is blocking or has a timeout, wait until the
+ connection completes, fails or timed out using select(), and then
+ get the connection status using getsockopt(SO_ERROR).
-#endif
- *timeoutp = timeout;
+ If the socket is non-blocking, raise InterruptedError. The caller is
+ responsible to wait until the connection completes, fails or timed
+ out (it's the case in asyncio for example). */
+ wait_connect = (s->sock_timeout != 0 && IS_SELECTABLE(s));
+ }
+ else {
+ wait_connect = (s->sock_timeout > 0 && err == SOCK_INPROGRESS_ERR
+ && IS_SELECTABLE(s));
+ }
- return res;
+ if (!wait_connect) {
+ if (raise) {
+ /* restore error, maybe replaced by PyErr_CheckSignals() */
+ SET_SOCK_ERROR(err);
+ s->errorhandler();
+ return -1;
+ }
+ else
+ return err;
+ }
+
+ if (raise) {
+ /* socket.connect() raises an exception on error */
+ if (sock_call_ex(s, 1, sock_connect_impl, NULL,
+ 1, NULL, s->sock_timeout) < 0)
+ return -1;
+ }
+ else {
+ /* socket.connect_ex() returns the error code on error */
+ if (sock_call_ex(s, 1, sock_connect_impl, NULL,
+ 1, &err, s->sock_timeout) < 0)
+ return err;
+ }
+ return 0;
}
/* s.connect(sockaddr) method */
@@ -2398,23 +2693,15 @@ sock_connect(PySocketSockObject *s, PyObject *addro)
sock_addr_t addrbuf;
int addrlen;
int res;
- int timeout;
if (!getsockaddrarg(s, addro, SAS2SA(&addrbuf), &addrlen))
return NULL;
- Py_BEGIN_ALLOW_THREADS
- res = internal_connect(s, SAS2SA(&addrbuf), addrlen, &timeout);
- Py_END_ALLOW_THREADS
-
- if (timeout == 1) {
- PyErr_SetString(socket_timeout, "timed out");
+ res = internal_connect(s, SAS2SA(&addrbuf), addrlen, 1);
+ if (res < 0)
return NULL;
- }
- if (res != 0)
- return s->errorhandler();
- Py_INCREF(Py_None);
- return Py_None;
+
+ Py_RETURN_NONE;
}
PyDoc_STRVAR(connect_doc,
@@ -2432,21 +2719,13 @@ sock_connect_ex(PySocketSockObject *s, PyObject *addro)
sock_addr_t addrbuf;
int addrlen;
int res;
- int timeout;
if (!getsockaddrarg(s, addro, SAS2SA(&addrbuf), &addrlen))
return NULL;
- Py_BEGIN_ALLOW_THREADS
- res = internal_connect(s, SAS2SA(&addrbuf), addrlen, &timeout);
- Py_END_ALLOW_THREADS
-
- /* Signals are not errors (though they may raise exceptions). Adapted
- from PyErr_SetFromErrnoWithFilenameObject(). */
-#ifdef EINTR
- if (res == EINTR && PyErr_CheckSignals())
+ res = internal_connect(s, SAS2SA(&addrbuf), addrlen, 0);
+ if (res < 0)
return NULL;
-#endif
return PyLong_FromLong((long) res);
}
@@ -2534,14 +2813,16 @@ info is a pair (hostaddr, port).");
/* s.listen(n) method */
static PyObject *
-sock_listen(PySocketSockObject *s, PyObject *arg)
+sock_listen(PySocketSockObject *s, PyObject *args)
{
- int backlog;
+ /* We try to choose a default backlog high enough to avoid connection drops
+ * for common workloads, yet not too high to limit resource usage. */
+ int backlog = Py_MIN(SOMAXCONN, 128);
int res;
- backlog = _PyLong_AsInt(arg);
- if (backlog == -1 && PyErr_Occurred())
+ if (!PyArg_ParseTuple(args, "|i:listen", &backlog))
return NULL;
+
Py_BEGIN_ALLOW_THREADS
/* To avoid problems on systems that don't allow a negative backlog
* (which doesn't make sense anyway) we force a minimum value of 0. */
@@ -2556,12 +2837,34 @@ sock_listen(PySocketSockObject *s, PyObject *arg)
}
PyDoc_STRVAR(listen_doc,
-"listen(backlog)\n\
+"listen([backlog])\n\
\n\
-Enable a server to accept connections. The backlog argument must be at\n\
-least 0 (if it is lower, it is set to 0); it specifies the number of\n\
+Enable a server to accept connections. If backlog is specified, it must be\n\
+at least 0 (if it is lower, it is set to 0); it specifies the number of\n\
unaccepted connections that the system will allow before refusing new\n\
-connections.");
+connections. If not specified, a default reasonable value is chosen.");
+
+struct sock_recv {
+ char *cbuf;
+ Py_ssize_t len;
+ int flags;
+ Py_ssize_t result;
+};
+
+static int
+sock_recv_impl(PySocketSockObject *s, void *data)
+{
+ struct sock_recv *ctx = data;
+
+#ifdef MS_WINDOWS
+ if (ctx->len > INT_MAX)
+ ctx->len = INT_MAX;
+ ctx->result = recv(s->sock_fd, ctx->cbuf, (int)ctx->len, ctx->flags);
+#else
+ ctx->result = recv(s->sock_fd, ctx->cbuf, ctx->len, ctx->flags);
+#endif
+ return (ctx->result >= 0);
+}
/*
@@ -2576,8 +2879,7 @@ connections.");
static Py_ssize_t
sock_recv_guts(PySocketSockObject *s, char* cbuf, Py_ssize_t len, int flags)
{
- Py_ssize_t outlen = -1;
- int timeout;
+ struct sock_recv ctx;
if (!IS_SELECTABLE(s)) {
select_error();
@@ -2588,32 +2890,13 @@ sock_recv_guts(PySocketSockObject *s, char* cbuf, Py_ssize_t len, int flags)
return 0;
}
- BEGIN_SELECT_LOOP(s)
- Py_BEGIN_ALLOW_THREADS
- timeout = internal_select_ex(s, 0, interval);
- if (!timeout) {
-#ifdef MS_WINDOWS
- if (len > INT_MAX)
- len = INT_MAX;
- outlen = recv(s->sock_fd, cbuf, (int)len, flags);
-#else
- outlen = recv(s->sock_fd, cbuf, len, flags);
-#endif
- }
- Py_END_ALLOW_THREADS
-
- if (timeout == 1) {
- PyErr_SetString(socket_timeout, "timed out");
+ ctx.cbuf = cbuf;
+ ctx.len = len;
+ ctx.flags = flags;
+ if (sock_call(s, 0, sock_recv_impl, &ctx) < 0)
return -1;
- }
- END_SELECT_LOOP(s)
- if (outlen < 0) {
- /* Note: the call to errorhandler() ALWAYS indirectly returned
- NULL, so ignore its return value */
- s->errorhandler();
- return -1;
- }
- return outlen;
+
+ return ctx.result;
}
@@ -2727,6 +3010,34 @@ is not specified (or 0), receive up to the size available in the given buffer.\n
\n\
See recv() for documentation about the flags.");
+struct sock_recvfrom {
+ char* cbuf;
+ Py_ssize_t len;
+ int flags;
+ socklen_t *addrlen;
+ sock_addr_t *addrbuf;
+ Py_ssize_t result;
+};
+
+static int
+sock_recvfrom_impl(PySocketSockObject *s, void *data)
+{
+ struct sock_recvfrom *ctx = data;
+
+ memset(ctx->addrbuf, 0, *ctx->addrlen);
+
+#ifdef MS_WINDOWS
+ if (ctx->len > INT_MAX)
+ ctx->len = INT_MAX;
+ ctx->result = recvfrom(s->sock_fd, ctx->cbuf, (int)ctx->len, ctx->flags,
+ SAS2SA(ctx->addrbuf), ctx->addrlen);
+#else
+ ctx->result = recvfrom(s->sock_fd, ctx->cbuf, ctx->len, ctx->flags,
+ SAS2SA(ctx->addrbuf), ctx->addrlen);
+#endif
+ return (ctx->result >= 0);
+}
+
/*
* This is the guts of the recvfrom() and recvfrom_into() methods, which reads
@@ -2744,9 +3055,8 @@ sock_recvfrom_guts(PySocketSockObject *s, char* cbuf, Py_ssize_t len, int flags,
PyObject** addr)
{
sock_addr_t addrbuf;
- int timeout;
- Py_ssize_t n = -1;
socklen_t addrlen;
+ struct sock_recvfrom ctx;
*addr = NULL;
@@ -2758,38 +3068,20 @@ sock_recvfrom_guts(PySocketSockObject *s, char* cbuf, Py_ssize_t len, int flags,
return -1;
}
- BEGIN_SELECT_LOOP(s)
- Py_BEGIN_ALLOW_THREADS
- memset(&addrbuf, 0, addrlen);
- timeout = internal_select_ex(s, 0, interval);
- if (!timeout) {
-#ifdef MS_WINDOWS
- if (len > INT_MAX)
- len = INT_MAX;
- n = recvfrom(s->sock_fd, cbuf, (int)len, flags,
- (void *) &addrbuf, &addrlen);
-#else
- n = recvfrom(s->sock_fd, cbuf, len, flags,
- SAS2SA(&addrbuf), &addrlen);
-#endif
- }
- Py_END_ALLOW_THREADS
-
- if (timeout == 1) {
- PyErr_SetString(socket_timeout, "timed out");
+ ctx.cbuf = cbuf;
+ ctx.len = len;
+ ctx.flags = flags;
+ ctx.addrbuf = &addrbuf;
+ ctx.addrlen = &addrlen;
+ if (sock_call(s, 0, sock_recvfrom_impl, &ctx) < 0)
return -1;
- }
- END_SELECT_LOOP(s)
- if (n < 0) {
- s->errorhandler();
- return -1;
- }
- if (!(*addr = makesockaddr(s->sock_fd, SAS2SA(&addrbuf),
- addrlen, s->sock_proto)))
+ *addr = makesockaddr(s->sock_fd, SAS2SA(&addrbuf), addrlen,
+ s->sock_proto);
+ if (*addr == NULL)
return -1;
- return n;
+ return ctx.result;
}
/* s.recvfrom(nbytes [,flags]) method */
@@ -2900,10 +3192,24 @@ PyDoc_STRVAR(recvfrom_into_doc,
\n\
Like recv_into(buffer[, nbytes[, flags]]) but also return the sender's address info.");
-
/* The sendmsg() and recvmsg[_into]() methods require a working
CMSG_LEN(). See the comment near get_CMSG_LEN(). */
#ifdef CMSG_LEN
+struct sock_recvmsg {
+ struct msghdr *msg;
+ int flags;
+ ssize_t result;
+};
+
+static int
+sock_recvmsg_impl(PySocketSockObject *s, void *data)
+{
+ struct sock_recvmsg *ctx = data;
+
+ ctx->result = recvmsg(s->sock_fd, ctx->msg, ctx->flags);
+ return (ctx->result >= 0);
+}
+
/*
* Call recvmsg() with the supplied iovec structures, flags, and
* ancillary data buffer size (controllen). Returns the tuple return
@@ -2919,8 +3225,6 @@ sock_recvmsg_guts(PySocketSockObject *s, struct iovec *iov, int iovlen,
int flags, Py_ssize_t controllen,
PyObject *(*makeval)(ssize_t, void *), void *makeval_data)
{
- ssize_t bytes_received = -1;
- int timeout;
sock_addr_t addrbuf;
socklen_t addrbuflen;
struct msghdr msg = {0};
@@ -2929,6 +3233,7 @@ sock_recvmsg_guts(PySocketSockObject *s, struct iovec *iov, int iovlen,
struct cmsghdr *cmsgh;
size_t cmsgdatalen = 0;
int cmsg_status;
+ struct sock_recvmsg ctx;
/* XXX: POSIX says that msg_name and msg_namelen "shall be
ignored" when the socket is connected (Linux fills them in
@@ -2955,28 +3260,17 @@ sock_recvmsg_guts(PySocketSockObject *s, struct iovec *iov, int iovlen,
goto finally;
}
- BEGIN_SELECT_LOOP(s)
- Py_BEGIN_ALLOW_THREADS;
msg.msg_name = SAS2SA(&addrbuf);
msg.msg_namelen = addrbuflen;
msg.msg_iov = iov;
msg.msg_iovlen = iovlen;
msg.msg_control = controlbuf;
msg.msg_controllen = controllen;
- timeout = internal_select_ex(s, 0, interval);
- if (!timeout)
- bytes_received = recvmsg(s->sock_fd, &msg, flags);
- Py_END_ALLOW_THREADS;
- if (timeout == 1) {
- PyErr_SetString(socket_timeout, "timed out");
- goto finally;
- }
- END_SELECT_LOOP(s)
- if (bytes_received < 0) {
- s->errorhandler();
+ ctx.msg = &msg;
+ ctx.flags = flags;
+ if (sock_call(s, 0, sock_recvmsg_impl, &ctx) < 0)
goto finally;
- }
/* Make list of (level, type, data) tuples from control messages. */
if ((cmsg_list = PyList_New(0)) == NULL)
@@ -3018,7 +3312,7 @@ sock_recvmsg_guts(PySocketSockObject *s, struct iovec *iov, int iovlen,
}
retval = Py_BuildValue("NOiN",
- (*makeval)(bytes_received, makeval_data),
+ (*makeval)(ctx.result, makeval_data),
cmsg_list,
(int)msg.msg_flags,
makesockaddr(s->sock_fd, SAS2SA(&addrbuf),
@@ -3226,15 +3520,36 @@ SCM_RIGHTS mechanism.");
#endif /* CMSG_LEN */
+struct sock_send {
+ char *buf;
+ Py_ssize_t len;
+ int flags;
+ Py_ssize_t result;
+};
+
+static int
+sock_send_impl(PySocketSockObject *s, void *data)
+{
+ struct sock_send *ctx = data;
+
+#ifdef MS_WINDOWS
+ if (ctx->len > INT_MAX)
+ ctx->len = INT_MAX;
+ ctx->result = send(s->sock_fd, ctx->buf, (int)ctx->len, ctx->flags);
+#else
+ ctx->result = send(s->sock_fd, ctx->buf, ctx->len, ctx->flags);
+#endif
+ return (ctx->result >= 0);
+}
+
/* s.send(data [,flags]) method */
static PyObject *
sock_send(PySocketSockObject *s, PyObject *args)
{
- char *buf;
- Py_ssize_t len, n = -1;
- int flags = 0, timeout;
+ int flags = 0;
Py_buffer pbuf;
+ struct sock_send ctx;
if (!PyArg_ParseTuple(args, "y*|i:send", &pbuf, &flags))
return NULL;
@@ -3243,33 +3558,16 @@ sock_send(PySocketSockObject *s, PyObject *args)
PyBuffer_Release(&pbuf);
return select_error();
}
- buf = pbuf.buf;
- len = pbuf.len;
-
- BEGIN_SELECT_LOOP(s)
- Py_BEGIN_ALLOW_THREADS
- timeout = internal_select_ex(s, 1, interval);
- if (!timeout) {
-#ifdef MS_WINDOWS
- if (len > INT_MAX)
- len = INT_MAX;
- n = send(s->sock_fd, buf, (int)len, flags);
-#else
- n = send(s->sock_fd, buf, len, flags);
-#endif
- }
- Py_END_ALLOW_THREADS
- if (timeout == 1) {
+ ctx.buf = pbuf.buf;
+ ctx.len = pbuf.len;
+ ctx.flags = flags;
+ if (sock_call(s, 1, sock_send_impl, &ctx) < 0) {
PyBuffer_Release(&pbuf);
- PyErr_SetString(socket_timeout, "timed out");
return NULL;
}
- END_SELECT_LOOP(s)
-
PyBuffer_Release(&pbuf);
- if (n < 0)
- return s->errorhandler();
- return PyLong_FromSsize_t(n);
+
+ return PyLong_FromSsize_t(ctx.result);
}
PyDoc_STRVAR(send_doc,
@@ -3286,9 +3584,15 @@ static PyObject *
sock_sendall(PySocketSockObject *s, PyObject *args)
{
char *buf;
- Py_ssize_t len, n = -1;
- int flags = 0, timeout, saved_errno;
+ Py_ssize_t len, n;
+ int flags = 0;
Py_buffer pbuf;
+ struct sock_send ctx;
+ int has_timeout = (s->sock_timeout > 0);
+ _PyTime_t interval = s->sock_timeout;
+ _PyTime_t deadline = 0;
+ int deadline_initialized = 0;
+ PyObject *res = NULL;
if (!PyArg_ParseTuple(args, "y*|i:sendall", &pbuf, &flags))
return NULL;
@@ -3301,50 +3605,47 @@ sock_sendall(PySocketSockObject *s, PyObject *args)
}
do {
- Py_BEGIN_ALLOW_THREADS
- timeout = internal_select(s, 1);
- n = -1;
- if (!timeout) {
-#ifdef MS_WINDOWS
- if (len > INT_MAX)
- len = INT_MAX;
- n = send(s->sock_fd, buf, (int)len, flags);
-#else
- n = send(s->sock_fd, buf, len, flags);
-#endif
- }
- Py_END_ALLOW_THREADS
- if (timeout == 1) {
- PyBuffer_Release(&pbuf);
- PyErr_SetString(socket_timeout, "timed out");
- return NULL;
+ if (has_timeout) {
+ if (deadline_initialized) {
+ /* recompute the timeout */
+ interval = deadline - _PyTime_GetMonotonicClock();
+ }
+ else {
+ deadline_initialized = 1;
+ deadline = _PyTime_GetMonotonicClock() + s->sock_timeout;
+ }
+
+ if (interval <= 0) {
+ PyErr_SetString(socket_timeout, "timed out");
+ goto done;
+ }
}
- /* PyErr_CheckSignals() might change errno */
- saved_errno = errno;
+
+ ctx.buf = buf;
+ ctx.len = len;
+ ctx.flags = flags;
+ if (sock_call_ex(s, 1, sock_send_impl, &ctx, 0, NULL, interval) < 0)
+ goto done;
+ n = ctx.result;
+ assert(n >= 0);
+
+ buf += n;
+ len -= n;
+
/* We must run our signal handlers before looping again.
send() can return a successful partial write when it is
interrupted, so we can't restrict ourselves to EINTR. */
- if (PyErr_CheckSignals()) {
- PyBuffer_Release(&pbuf);
- return NULL;
- }
- if (n < 0) {
- /* If interrupted, try again */
- if (saved_errno == EINTR)
- continue;
- else
- break;
- }
- buf += n;
- len -= n;
+ if (PyErr_CheckSignals())
+ goto done;
} while (len > 0);
PyBuffer_Release(&pbuf);
- if (n < 0)
- return s->errorhandler();
-
Py_INCREF(Py_None);
- return Py_None;
+ res = Py_None;
+
+done:
+ PyBuffer_Release(&pbuf);
+ return res;
}
PyDoc_STRVAR(sendall_doc,
@@ -3356,6 +3657,32 @@ until all data is sent. If an error occurs, it's impossible\n\
to tell how much data has been sent.");
+struct sock_sendto {
+ char *buf;
+ Py_ssize_t len;
+ int flags;
+ int addrlen;
+ sock_addr_t *addrbuf;
+ Py_ssize_t result;
+};
+
+static int
+sock_sendto_impl(PySocketSockObject *s, void *data)
+{
+ struct sock_sendto *ctx = data;
+
+#ifdef MS_WINDOWS
+ if (ctx->len > INT_MAX)
+ ctx->len = INT_MAX;
+ ctx->result = sendto(s->sock_fd, ctx->buf, (int)ctx->len, ctx->flags,
+ SAS2SA(ctx->addrbuf), ctx->addrlen);
+#else
+ ctx->result = sendto(s->sock_fd, ctx->buf, ctx->len, ctx->flags,
+ SAS2SA(ctx->addrbuf), ctx->addrlen);
+#endif
+ return (ctx->result >= 0);
+}
+
/* s.sendto(data, [flags,] sockaddr) method */
static PyObject *
@@ -3363,11 +3690,10 @@ sock_sendto(PySocketSockObject *s, PyObject *args)
{
Py_buffer pbuf;
PyObject *addro;
- char *buf;
- Py_ssize_t len, arglen;
+ Py_ssize_t arglen;
sock_addr_t addrbuf;
- int addrlen, flags, timeout;
- Py_ssize_t n = -1;
+ int addrlen, flags;
+ struct sock_sendto ctx;
flags = 0;
arglen = PyTuple_Size(args);
@@ -3388,9 +3714,6 @@ sock_sendto(PySocketSockObject *s, PyObject *args)
if (PyErr_Occurred())
return NULL;
- buf = pbuf.buf;
- len = pbuf.len;
-
if (!IS_SELECTABLE(s)) {
PyBuffer_Release(&pbuf);
return select_error();
@@ -3401,32 +3724,18 @@ sock_sendto(PySocketSockObject *s, PyObject *args)
return NULL;
}
- BEGIN_SELECT_LOOP(s)
- Py_BEGIN_ALLOW_THREADS
- timeout = internal_select_ex(s, 1, interval);
- if (!timeout) {
-#ifdef MS_WINDOWS
- if (len > INT_MAX)
- len = INT_MAX;
- n = sendto(s->sock_fd, buf, (int)len, flags,
- SAS2SA(&addrbuf), addrlen);
-#else
- n = sendto(s->sock_fd, buf, len, flags,
- SAS2SA(&addrbuf), addrlen);
-#endif
- }
- Py_END_ALLOW_THREADS
-
- if (timeout == 1) {
+ ctx.buf = pbuf.buf;
+ ctx.len = pbuf.len;
+ ctx.flags = flags;
+ ctx.addrlen = addrlen;
+ ctx.addrbuf = &addrbuf;
+ if (sock_call(s, 1, sock_sendto_impl, &ctx) < 0) {
PyBuffer_Release(&pbuf);
- PyErr_SetString(socket_timeout, "timed out");
return NULL;
}
- END_SELECT_LOOP(s)
PyBuffer_Release(&pbuf);
- if (n < 0)
- return s->errorhandler();
- return PyLong_FromSsize_t(n);
+
+ return PyLong_FromSsize_t(ctx.result);
}
PyDoc_STRVAR(sendto_doc,
@@ -3439,6 +3748,21 @@ For IP sockets, the address is a pair (hostaddr, port).");
/* The sendmsg() and recvmsg[_into]() methods require a working
CMSG_LEN(). See the comment near get_CMSG_LEN(). */
#ifdef CMSG_LEN
+struct sock_sendmsg {
+ struct msghdr *msg;
+ int flags;
+ ssize_t result;
+};
+
+static int
+sock_sendmsg_impl(PySocketSockObject *s, void *data)
+{
+ struct sock_sendmsg *ctx = data;
+
+ ctx->result = sendmsg(s->sock_fd, ctx->msg, ctx->flags);
+ return (ctx->result >= 0);
+}
+
/* s.sendmsg(buffers[, ancdata[, flags[, address]]]) method */
static PyObject *
@@ -3456,10 +3780,10 @@ sock_sendmsg(PySocketSockObject *s, PyObject *args)
} *cmsgs = NULL;
void *controlbuf = NULL;
size_t controllen, controllen_last;
- ssize_t bytes_sent = -1;
- int addrlen, timeout, flags = 0;
+ int addrlen, flags = 0;
PyObject *data_arg, *cmsg_arg = NULL, *addr_arg = NULL, *data_fast = NULL,
*cmsg_fast = NULL, *retval = NULL;
+ struct sock_sendmsg ctx;
if (!PyArg_ParseTuple(args, "O|OiO:sendmsg",
&data_arg, &cmsg_arg, &flags, &addr_arg))
@@ -3613,23 +3937,12 @@ sock_sendmsg(PySocketSockObject *s, PyObject *args)
goto finally;
}
- BEGIN_SELECT_LOOP(s)
- Py_BEGIN_ALLOW_THREADS;
- timeout = internal_select_ex(s, 1, interval);
- if (!timeout)
- bytes_sent = sendmsg(s->sock_fd, &msg, flags);
- Py_END_ALLOW_THREADS;
- if (timeout == 1) {
- PyErr_SetString(socket_timeout, "timed out");
+ ctx.msg = &msg;
+ ctx.flags = flags;
+ if (sock_call(s, 1, sock_sendmsg_impl, &ctx) < 0)
goto finally;
- }
- END_SELECT_LOOP(s)
- if (bytes_sent < 0) {
- s->errorhandler();
- goto finally;
- }
- retval = PyLong_FromSsize_t(bytes_sent);
+ retval = PyLong_FromSsize_t(ctx.result);
finally:
PyMem_Free(controlbuf);
@@ -3796,7 +4109,7 @@ static PyMethodDef sock_methods[] = {
{"share", (PyCFunction)sock_share, METH_VARARGS,
sock_share_doc},
#endif
- {"listen", (PyCFunction)sock_listen, METH_O,
+ {"listen", (PyCFunction)sock_listen, METH_VARARGS,
listen_doc},
{"recv", (PyCFunction)sock_recv, METH_VARARGS,
recv_doc},
@@ -3838,10 +4151,14 @@ static PyMemberDef sock_memberlist[] = {
{"family", T_INT, offsetof(PySocketSockObject, sock_family), READONLY, "the socket family"},
{"type", T_INT, offsetof(PySocketSockObject, sock_type), READONLY, "the socket type"},
{"proto", T_INT, offsetof(PySocketSockObject, sock_proto), READONLY, "the socket protocol"},
- {"timeout", T_DOUBLE, offsetof(PySocketSockObject, sock_timeout), READONLY, "the socket timeout"},
{0},
};
+static PyGetSetDef sock_getsetlist[] = {
+ {"timeout", (getter)sock_gettimeout, NULL, PyDoc_STR("the socket timeout")},
+ {NULL} /* sentinel */
+};
+
/* Deallocate a socket object in response to the last Py_DECREF().
First close the file description. */
@@ -3905,7 +4222,7 @@ sock_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
new = type->tp_alloc(type, 0);
if (new != NULL) {
((PySocketSockObject *)new)->sock_fd = -1;
- ((PySocketSockObject *)new)->sock_timeout = -1.0;
+ ((PySocketSockObject *)new)->sock_timeout = _PyTime_FromSeconds(-1);
((PySocketSockObject *)new)->errorhandler = &set_error;
}
return new;
@@ -4088,7 +4405,7 @@ static PyTypeObject sock_type = {
0, /* tp_iternext */
sock_methods, /* tp_methods */
sock_memberlist, /* tp_members */
- 0, /* tp_getset */
+ sock_getsetlist, /* tp_getset */
0, /* tp_base */
0, /* tp_dict */
0, /* tp_descr_get */
@@ -4224,16 +4541,30 @@ PyDoc_STRVAR(gethostbyname_doc,
Return the IP address (a string of the form '255.255.255.255') for a host.");
+static PyObject*
+sock_decode_hostname(const char *name)
+{
+#ifdef MS_WINDOWS
+ /* Issue #26227: gethostbyaddr() returns a string encoded
+ * to the ANSI code page */
+ return PyUnicode_DecodeFSDefault(name);
+#else
+ /* Decode from UTF-8 */
+ return PyUnicode_FromString(name);
+#endif
+}
+
/* Convenience function common to gethostbyname_ex and gethostbyaddr */
static PyObject *
-gethost_common(struct hostent *h, struct sockaddr *addr, int alen, int af)
+gethost_common(struct hostent *h, struct sockaddr *addr, size_t alen, int af)
{
char **pch;
PyObject *rtn_tuple = (PyObject *)NULL;
PyObject *name_list = (PyObject *)NULL;
PyObject *addr_list = (PyObject *)NULL;
PyObject *tmp;
+ PyObject *name;
if (h == NULL) {
/* Let's get real error message to return */
@@ -4342,7 +4673,10 @@ gethost_common(struct hostent *h, struct sockaddr *addr, int alen, int af)
goto err;
}
- rtn_tuple = Py_BuildValue("sOO", h->h_name, name_list, addr_list);
+ name = sock_decode_hostname(h->h_name);
+ if (name == NULL)
+ goto err;
+ rtn_tuple = Py_BuildValue("NOO", name, name_list, addr_list);
err:
Py_XDECREF(name_list);
@@ -4944,21 +5278,22 @@ Convert an IP address from 32-bit packed binary format to string format");
static PyObject*
socket_inet_ntoa(PyObject *self, PyObject *args)
{
- char *packed_str;
- int addr_len;
+ Py_buffer packed_ip;
struct in_addr packed_addr;
- if (!PyArg_ParseTuple(args, "y#:inet_ntoa", &packed_str, &addr_len)) {
+ if (!PyArg_ParseTuple(args, "y*:inet_ntoa", &packed_ip)) {
return NULL;
}
- if (addr_len != sizeof(packed_addr)) {
+ if (packed_ip.len != sizeof(packed_addr)) {
PyErr_SetString(PyExc_OSError,
"packed IP wrong length for inet_ntoa");
+ PyBuffer_Release(&packed_ip);
return NULL;
}
- memcpy(&packed_addr, packed_str, addr_len);
+ memcpy(&packed_addr, packed_ip.buf, packed_ip.len);
+ PyBuffer_Release(&packed_ip);
return PyUnicode_FromString(inet_ntoa(packed_addr));
}
@@ -5069,8 +5404,7 @@ static PyObject *
socket_inet_ntop(PyObject *self, PyObject *args)
{
int af;
- char* packed;
- int len;
+ Py_buffer packed_ip;
const char* retval;
#ifdef ENABLE_IPV6
char ip[Py_MAX(INET_ADDRSTRLEN, INET6_ADDRSTRLEN) + 1];
@@ -5081,31 +5415,35 @@ socket_inet_ntop(PyObject *self, PyObject *args)
/* Guarantee NUL-termination for PyUnicode_FromString() below */
memset((void *) &ip[0], '\0', sizeof(ip));
- if (!PyArg_ParseTuple(args, "iy#:inet_ntop", &af, &packed, &len)) {
+ if (!PyArg_ParseTuple(args, "iy*:inet_ntop", &af, &packed_ip)) {
return NULL;
}
if (af == AF_INET) {
- if (len != sizeof(struct in_addr)) {
+ if (packed_ip.len != sizeof(struct in_addr)) {
PyErr_SetString(PyExc_ValueError,
"invalid length of packed IP address string");
+ PyBuffer_Release(&packed_ip);
return NULL;
}
#ifdef ENABLE_IPV6
} else if (af == AF_INET6) {
- if (len != sizeof(struct in6_addr)) {
+ if (packed_ip.len != sizeof(struct in6_addr)) {
PyErr_SetString(PyExc_ValueError,
"invalid length of packed IP address string");
+ PyBuffer_Release(&packed_ip);
return NULL;
}
#endif
} else {
PyErr_Format(PyExc_ValueError,
"unknown address family %d", af);
+ PyBuffer_Release(&packed_ip);
return NULL;
}
- retval = inet_ntop(af, packed, ip, sizeof(ip));
+ retval = inet_ntop(af, packed_ip.buf, ip, sizeof(ip));
+ PyBuffer_Release(&packed_ip);
if (!retval) {
PyErr_SetFromErrno(PyExc_OSError);
return NULL;
@@ -5124,8 +5462,7 @@ static PyObject *
socket_inet_ntop(PyObject *self, PyObject *args)
{
int af;
- char* packed;
- int len;
+ Py_buffer packed_ip;
struct sockaddr_in6 addr;
DWORD addrlen, ret, retlen;
#ifdef ENABLE_IPV6
@@ -5137,38 +5474,42 @@ socket_inet_ntop(PyObject *self, PyObject *args)
/* Guarantee NUL-termination for PyUnicode_FromString() below */
memset((void *) &ip[0], '\0', sizeof(ip));
- if (!PyArg_ParseTuple(args, "iy#:inet_ntop", &af, &packed, &len)) {
+ if (!PyArg_ParseTuple(args, "iy*:inet_ntop", &af, &packed_ip)) {
return NULL;
}
if (af == AF_INET) {
struct sockaddr_in * addr4 = (struct sockaddr_in *)&addr;
- if (len != sizeof(struct in_addr)) {
+ if (packed_ip.len != sizeof(struct in_addr)) {
PyErr_SetString(PyExc_ValueError,
"invalid length of packed IP address string");
+ PyBuffer_Release(&packed_ip);
return NULL;
}
memset(addr4, 0, sizeof(struct sockaddr_in));
addr4->sin_family = AF_INET;
- memcpy(&(addr4->sin_addr), packed, sizeof(addr4->sin_addr));
+ memcpy(&(addr4->sin_addr), packed_ip.buf, sizeof(addr4->sin_addr));
addrlen = sizeof(struct sockaddr_in);
} else if (af == AF_INET6) {
- if (len != sizeof(struct in6_addr)) {
+ if (packed_ip.len != sizeof(struct in6_addr)) {
PyErr_SetString(PyExc_ValueError,
"invalid length of packed IP address string");
+ PyBuffer_Release(&packed_ip);
return NULL;
}
memset(&addr, 0, sizeof(addr));
addr.sin6_family = AF_INET6;
- memcpy(&(addr.sin6_addr), packed, sizeof(addr.sin6_addr));
+ memcpy(&(addr.sin6_addr), packed_ip.buf, sizeof(addr.sin6_addr));
addrlen = sizeof(addr);
} else {
PyErr_Format(PyExc_ValueError,
"unknown address family %d", af);
+ PyBuffer_Release(&packed_ip);
return NULL;
}
+ PyBuffer_Release(&packed_ip);
retlen = sizeof(ip);
ret = WSAAddressToStringA((struct sockaddr*)&addr, addrlen, NULL,
@@ -5321,6 +5662,7 @@ socket_getnameinfo(PyObject *self, PyObject *args)
struct addrinfo hints, *res = NULL;
int error;
PyObject *ret = (PyObject *)NULL;
+ PyObject *name;
flags = flowinfo = scope_id = 0;
if (!PyArg_ParseTuple(args, "Oi:getnameinfo", &sa, &flags))
@@ -5384,7 +5726,11 @@ socket_getnameinfo(PyObject *self, PyObject *args)
set_gaierror(error);
goto fail;
}
- ret = Py_BuildValue("ss", hbuf, pbuf);
+
+ name = sock_decode_hostname(hbuf);
+ if (name == NULL)
+ goto fail;
+ ret = Py_BuildValue("Ns", name, pbuf);
fail:
if (res)
@@ -5403,12 +5749,14 @@ Get host and port for a sockaddr.");
static PyObject *
socket_getdefaulttimeout(PyObject *self)
{
- if (defaulttimeout < 0.0) {
+ if (defaulttimeout < 0) {
Py_INCREF(Py_None);
return Py_None;
}
- else
- return PyFloat_FromDouble(defaulttimeout);
+ else {
+ double seconds = _PyTime_AsSecondsDouble(defaulttimeout);
+ return PyFloat_FromDouble(seconds);
+ }
}
PyDoc_STRVAR(getdefaulttimeout_doc,
@@ -5421,19 +5769,10 @@ When the socket module is first imported, the default is None.");
static PyObject *
socket_setdefaulttimeout(PyObject *self, PyObject *arg)
{
- double timeout;
+ _PyTime_t timeout;
- if (arg == Py_None)
- timeout = -1.0;
- else {
- timeout = PyFloat_AsDouble(arg);
- if (timeout < 0.0) {
- if (!PyErr_Occurred())
- PyErr_SetString(PyExc_ValueError,
- "Timeout value out of range");
- return NULL;
- }
- }
+ if (socket_parse_timeout(&timeout, arg) < 0)
+ return NULL;
defaulttimeout = timeout;
@@ -5780,11 +6119,15 @@ PyInit__socket(void)
#ifdef MS_WINDOWS
if (support_wsa_no_inherit == -1) {
+#if defined(_MSC_VER) && _MSC_VER >= 1800
+ support_wsa_no_inherit = IsWindows7SP1OrGreater();
+#else
DWORD version = GetVersion();
DWORD major = (DWORD)LOBYTE(LOWORD(version));
DWORD minor = (DWORD)HIBYTE(LOWORD(version));
/* need Windows 7 SP1, 2008 R2 SP1 or later */
- support_wsa_no_inherit = (major >= 6 && minor >= 1);
+ support_wsa_no_inherit = major > 6 || (major == 6 && minor >= 1);
+#endif
}
#endif
@@ -6183,6 +6526,9 @@ PyInit__socket(void)
#ifdef SO_PRIORITY
PyModule_AddIntMacro(m, SO_PRIORITY);
#endif
+#ifdef SO_MARK
+ PyModule_AddIntMacro(m, SO_MARK);
+#endif
/* Maximum number of connections for "listen" */
#ifdef SOMAXCONN
@@ -6320,6 +6666,9 @@ PyInit__socket(void)
PyModule_AddIntMacro(m, CAN_RAW_LOOPBACK);
PyModule_AddIntMacro(m, CAN_RAW_RECV_OWN_MSGS);
#endif
+#ifdef HAVE_LINUX_CAN_RAW_FD_FRAMES
+ PyModule_AddIntMacro(m, CAN_RAW_FD_FRAMES);
+#endif
#ifdef HAVE_LINUX_CAN_BCM_H
PyModule_AddIntMacro(m, CAN_BCM);
PyModule_AddIntConstant(m, "CAN_BCM_TX_SETUP", TX_SETUP);
diff --git a/Modules/socketmodule.h b/Modules/socketmodule.h
index b83f9af3bd..3cce927e0b 100644
--- a/Modules/socketmodule.h
+++ b/Modules/socketmodule.h
@@ -14,6 +14,13 @@
#else /* MS_WINDOWS */
# include <winsock2.h>
+/* Windows 'supports' CMSG_LEN, but does not follow the POSIX standard
+ * interface at all, so there is no point including the code that
+ * attempts to use it.
+ */
+# ifdef PySocket_BUILDING_SOCKET
+# undef CMSG_LEN
+# endif
# include <ws2tcpip.h>
/* VC6 is shipped with old platform headers, and does not have MSTcpIP.h
* Separate SDKs have all the functions we want, but older ones don't have
@@ -167,7 +174,7 @@ typedef struct {
PyObject *(*errorhandler)(void); /* Error handler; checks
errno, returns NULL and
sets a Python exception */
- double sock_timeout; /* Operation timeout in seconds;
+ _PyTime_t sock_timeout; /* Operation timeout in seconds;
0.0 means non-blocking */
} PySocketSockObject;
diff --git a/Modules/spwdmodule.c b/Modules/spwdmodule.c
index 68ea1b5ea4..49324d50f8 100644
--- a/Modules/spwdmodule.c
+++ b/Modules/spwdmodule.c
@@ -10,6 +10,12 @@
#include <shadow.h>
#endif
+#include "clinic/spwdmodule.c.h"
+
+/*[clinic input]
+module spwd
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=c0b841b90a6a07ce]*/
PyDoc_STRVAR(spwd__doc__,
"This module provides access to the Unix shadow password database.\n\
@@ -107,20 +113,25 @@ static PyObject *mkspent(struct spwd *p)
#ifdef HAVE_GETSPNAM
-PyDoc_STRVAR(spwd_getspnam__doc__,
-"getspnam(name) -> (sp_namp, sp_pwdp, sp_lstchg, sp_min, sp_max,\n\
- sp_warn, sp_inact, sp_expire, sp_flag)\n\
-Return the shadow password database entry for the given user name.\n\
-See spwd.__doc__ for more on shadow password database entries.");
+/*[clinic input]
+spwd.getspnam
+
+ arg: unicode
+ /
+
+Return the shadow password database entry for the given user name.
+
+See `help(spwd)` for more on shadow password database entries.
+[clinic start generated code]*/
-static PyObject* spwd_getspnam(PyObject *self, PyObject *args)
+static PyObject *
+spwd_getspnam_impl(PyModuleDef *module, PyObject *arg)
+/*[clinic end generated code: output=9f6bbe51a4eb3b21 input=dd89429e6167a00f]*/
{
char *name;
struct spwd *p;
- PyObject *arg, *bytes, *retval = NULL;
+ PyObject *bytes, *retval = NULL;
- if (!PyArg_ParseTuple(args, "U:getspnam", &arg))
- return NULL;
if ((bytes = PyUnicode_EncodeFSDefault(arg)) == NULL)
return NULL;
if (PyBytes_AsStringAndSize(bytes, &name, NULL) == -1)
@@ -139,14 +150,17 @@ out:
#ifdef HAVE_GETSPENT
-PyDoc_STRVAR(spwd_getspall__doc__,
-"getspall() -> list_of_entries\n\
-Return a list of all available shadow password database entries, \
-in arbitrary order.\n\
-See spwd.__doc__ for more on shadow password database entries.");
+/*[clinic input]
+spwd.getspall
+
+Return a list of all available shadow password database entries, in arbitrary order.
+
+See `help(spwd)` for more on shadow password database entries.
+[clinic start generated code]*/
static PyObject *
-spwd_getspall(PyObject *self, PyObject *args)
+spwd_getspall_impl(PyModuleDef *module)
+/*[clinic end generated code: output=b12d8ec7bdb29612 input=b2c84b7857d622bd]*/
{
PyObject *d;
struct spwd *p;
@@ -171,10 +185,10 @@ spwd_getspall(PyObject *self, PyObject *args)
static PyMethodDef spwd_methods[] = {
#ifdef HAVE_GETSPNAM
- {"getspnam", spwd_getspnam, METH_VARARGS, spwd_getspnam__doc__},
+ SPWD_GETSPNAM_METHODDEF
#endif
#ifdef HAVE_GETSPENT
- {"getspall", spwd_getspall, METH_NOARGS, spwd_getspall__doc__},
+ SPWD_GETSPALL_METHODDEF
#endif
{NULL, NULL} /* sentinel */
};
diff --git a/Modules/sre.h b/Modules/sre.h
index 42fe28d554..b632165a1f 100644
--- a/Modules/sre.h
+++ b/Modules/sre.h
@@ -18,8 +18,10 @@
#define SRE_CODE Py_UCS4
#if SIZEOF_SIZE_T > 4
# define SRE_MAXREPEAT (~(SRE_CODE)0)
+# define SRE_MAXGROUPS ((~(SRE_CODE)0) / 2)
#else
# define SRE_MAXREPEAT ((SRE_CODE)PY_SSIZE_T_MAX)
+# define SRE_MAXGROUPS ((SRE_CODE)PY_SSIZE_T_MAX / SIZEOF_SIZE_T / 2)
#endif
typedef struct {
@@ -52,9 +54,6 @@ typedef struct {
typedef unsigned int (*SRE_TOLOWER_HOOK)(unsigned int ch);
-/* FIXME: <fl> shouldn't be a constant, really... */
-#define SRE_MARK_SIZE 200
-
typedef struct SRE_REPEAT_T {
Py_ssize_t count;
SRE_CODE* pattern; /* points to REPEAT operator arguments */
@@ -76,7 +75,7 @@ typedef struct {
/* registers */
Py_ssize_t lastindex;
Py_ssize_t lastmark;
- void* mark[SRE_MARK_SIZE];
+ void** mark;
/* dynamically allocated stuff */
char* data_stack;
size_t data_stack_size;
@@ -85,7 +84,7 @@ typedef struct {
/* current repeat context */
SRE_REPEAT *repeat;
/* hooks */
- SRE_TOLOWER_HOOK lower;
+ SRE_TOLOWER_HOOK lower, upper;
} SRE_STATE;
typedef struct {
diff --git a/Modules/sre_constants.h b/Modules/sre_constants.h
index 5940d5a50f..6632442efe 100644
--- a/Modules/sre_constants.h
+++ b/Modules/sre_constants.h
@@ -11,7 +11,7 @@
* See the _sre.c file for information on usage and redistribution.
*/
-#define SRE_MAGIC 20031017
+#define SRE_MAGIC 20140917
#define SRE_OP_FAILURE 0
#define SRE_OP_SUCCESS 1
#define SRE_OP_ANY 2
@@ -44,6 +44,7 @@
#define SRE_OP_REPEAT_ONE 29
#define SRE_OP_SUBPATTERN 30
#define SRE_OP_MIN_REPEAT_ONE 31
+#define SRE_OP_RANGE_IGNORE 32
#define SRE_AT_BEGINNING 0
#define SRE_AT_BEGINNING_LINE 1
#define SRE_AT_BEGINNING_STRING 2
diff --git a/Modules/sre_lib.h b/Modules/sre_lib.h
index 1049de4226..128c71e340 100644
--- a/Modules/sre_lib.h
+++ b/Modules/sre_lib.h
@@ -101,7 +101,7 @@ SRE(at)(SRE_STATE* state, SRE_CHAR* ptr, SRE_CODE at)
}
LOCAL(int)
-SRE(charset)(SRE_CODE* set, SRE_CODE ch)
+SRE(charset)(SRE_STATE* state, SRE_CODE* set, SRE_CODE ch)
{
/* check if character is a member of the given set */
@@ -142,6 +142,20 @@ SRE(charset)(SRE_CODE* set, SRE_CODE ch)
set += 2;
break;
+ case SRE_OP_RANGE_IGNORE:
+ /* <RANGE_IGNORE> <lower> <upper> */
+ {
+ SRE_CODE uch;
+ /* ch is already lower cased */
+ if (set[0] <= ch && ch <= set[1])
+ return ok;
+ uch = state->upper(ch);
+ if (set[0] <= uch && uch <= set[1])
+ return ok;
+ set += 2;
+ break;
+ }
+
case SRE_OP_NEGATE:
ok = !ok;
break;
@@ -193,7 +207,7 @@ SRE(count)(SRE_STATE* state, SRE_CODE* pattern, Py_ssize_t maxcount)
case SRE_OP_IN:
/* repeated set */
TRACE(("|%p|%p|COUNT IN\n", pattern, ptr));
- while (ptr < end && SRE(charset)(pattern + 2, *ptr))
+ while (ptr < end && SRE(charset)(state, pattern + 2, *ptr))
ptr++;
break;
@@ -628,7 +642,8 @@ entrance:
/* match set member (or non_member) */
/* <IN> <skip> <set> */
TRACE(("|%p|%p|IN\n", ctx->pattern, ctx->ptr));
- if (ctx->ptr >= end || !SRE(charset)(ctx->pattern + 1, *ctx->ptr))
+ if (ctx->ptr >= end ||
+ !SRE(charset)(state, ctx->pattern + 1, *ctx->ptr))
RETURN_FAILURE;
ctx->pattern += ctx->pattern[0];
ctx->ptr++;
@@ -657,7 +672,7 @@ entrance:
case SRE_OP_IN_IGNORE:
TRACE(("|%p|%p|IN_IGNORE\n", ctx->pattern, ctx->ptr));
if (ctx->ptr >= end
- || !SRE(charset)(ctx->pattern+1,
+ || !SRE(charset)(state, ctx->pattern+1,
(SRE_CODE)state->lower(*ctx->ptr)))
RETURN_FAILURE;
ctx->pattern += ctx->pattern[0];
@@ -688,7 +703,8 @@ entrance:
continue;
if (ctx->pattern[1] == SRE_OP_IN &&
(ctx->ptr >= end ||
- !SRE(charset)(ctx->pattern + 3, (SRE_CODE) *ctx->ptr)))
+ !SRE(charset)(state, ctx->pattern + 3,
+ (SRE_CODE) *ctx->ptr)))
continue;
state->ptr = ctx->ptr;
DO_JUMP(JUMP_BRANCH, jump_branch, ctx->pattern+1);
@@ -1318,7 +1334,7 @@ SRE(search)(SRE_STATE* state, SRE_CODE* pattern)
/* pattern starts with a character from a known set */
end = (SRE_CHAR *)state->end;
for (;;) {
- while (ptr < end && !SRE(charset)(charset, *ptr))
+ while (ptr < end && !SRE(charset)(state, charset, *ptr))
ptr++;
if (ptr >= end)
return 0;
diff --git a/Modules/symtablemodule.c b/Modules/symtablemodule.c
index cdb4ffcbd8..f84cc78b73 100644
--- a/Modules/symtablemodule.c
+++ b/Modules/symtablemodule.c
@@ -84,9 +84,6 @@ PyInit__symtable(void)
PyModule_AddIntConstant(m, "TYPE_CLASS", ClassBlock);
PyModule_AddIntConstant(m, "TYPE_MODULE", ModuleBlock);
- PyModule_AddIntMacro(m, OPT_IMPORT_STAR);
- PyModule_AddIntMacro(m, OPT_TOPLEVEL);
-
PyModule_AddIntMacro(m, LOCAL);
PyModule_AddIntMacro(m, GLOBAL_EXPLICIT);
PyModule_AddIntMacro(m, GLOBAL_IMPLICIT);
diff --git a/Modules/timemodule.c b/Modules/timemodule.c
index d71b3ac872..d2caacdc6d 100644
--- a/Modules/timemodule.c
+++ b/Modules/timemodule.c
@@ -27,28 +27,13 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include "pythread.h"
-
-#if defined(__BORLANDC__)
-/* These overrides not needed for Win32 */
-#define timezone _timezone
-#define tzname _tzname
-#define daylight _daylight
-#endif /* __BORLANDC__ */
#endif /* MS_WINDOWS */
#endif /* !__WATCOMC__ || __QNX__ */
-#if defined(__APPLE__)
-#include <mach/mach_time.h>
-#endif
-
/* Forward declarations */
-static int floatsleep(double);
+static int pysleep(_PyTime_t);
static PyObject* floattime(_Py_clock_info_t *info);
-#ifdef MS_WINDOWS
-static OSVERSIONINFOEX winver;
-#endif
-
static PyObject *
time_time(PyObject *self, PyObject *unused)
{
@@ -92,12 +77,12 @@ floatclock(_Py_clock_info_t *info)
}
#endif /* HAVE_CLOCK */
-#if defined(MS_WINDOWS) && !defined(__BORLANDC__)
+#ifdef MS_WINDOWS
#define WIN32_PERF_COUNTER
/* Win32 has better clock replacement; we have our own version, due to Mark
Hammond and Tim Peters */
-static int
-win_perf_counter(_Py_clock_info_t *info, PyObject **result)
+static PyObject*
+win_perf_counter(_Py_clock_info_t *info)
{
static LONGLONG cpu_frequency = 0;
static LONGLONG ctrStart;
@@ -109,10 +94,8 @@ win_perf_counter(_Py_clock_info_t *info, PyObject **result)
QueryPerformanceCounter(&now);
ctrStart = now.QuadPart;
if (!QueryPerformanceFrequency(&freq) || freq.QuadPart == 0) {
- /* Unlikely to happen - this works on all intel
- machines at least! Revert to clock() */
- *result = NULL;
- return -1;
+ PyErr_SetFromWindowsErr(0);
+ return NULL;
}
cpu_frequency = freq.QuadPart;
}
@@ -124,10 +107,9 @@ win_perf_counter(_Py_clock_info_t *info, PyObject **result)
info->monotonic = 1;
info->adjustable = 0;
}
- *result = PyFloat_FromDouble(diff / (double)cpu_frequency);
- return 0;
+ return PyFloat_FromDouble(diff / (double)cpu_frequency);
}
-#endif
+#endif /* MS_WINDOWS */
#if defined(WIN32_PERF_COUNTER) || defined(HAVE_CLOCK)
#define PYCLOCK
@@ -135,11 +117,10 @@ static PyObject*
pyclock(_Py_clock_info_t *info)
{
#ifdef WIN32_PERF_COUNTER
- PyObject *res;
- if (win_perf_counter(info, &res) == 0)
- return res;
-#endif
+ return win_perf_counter(info);
+#else
return floatclock(info);
+#endif
}
static PyObject *
@@ -169,7 +150,7 @@ time_clock_gettime(PyObject *self, PyObject *args)
ret = clock_gettime((clockid_t)clk_id, &tp);
if (ret != 0) {
- PyErr_SetFromErrno(PyExc_IOError);
+ PyErr_SetFromErrno(PyExc_OSError);
return NULL;
}
return PyFloat_FromDouble(tp.tv_sec + tp.tv_nsec * 1e-9);
@@ -185,22 +166,22 @@ time_clock_settime(PyObject *self, PyObject *args)
{
int clk_id;
PyObject *obj;
- time_t tv_sec;
- long tv_nsec;
+ _PyTime_t t;
struct timespec tp;
int ret;
if (!PyArg_ParseTuple(args, "iO:clock_settime", &clk_id, &obj))
return NULL;
- if (_PyTime_ObjectToTimespec(obj, &tv_sec, &tv_nsec, _PyTime_ROUND_DOWN) == -1)
+ if (_PyTime_FromSecondsObject(&t, obj, _PyTime_ROUND_FLOOR) < 0)
+ return NULL;
+
+ if (_PyTime_AsTimespec(t, &tp) == -1)
return NULL;
- tp.tv_sec = tv_sec;
- tp.tv_nsec = tv_nsec;
ret = clock_settime((clockid_t)clk_id, &tp);
if (ret != 0) {
- PyErr_SetFromErrno(PyExc_IOError);
+ PyErr_SetFromErrno(PyExc_OSError);
return NULL;
}
Py_RETURN_NONE;
@@ -223,7 +204,7 @@ time_clock_getres(PyObject *self, PyObject *args)
ret = clock_getres((clockid_t)clk_id, &tp);
if (ret != 0) {
- PyErr_SetFromErrno(PyExc_IOError);
+ PyErr_SetFromErrno(PyExc_OSError);
return NULL;
}
@@ -237,17 +218,17 @@ Return the resolution (precision) of the specified clock clk_id.");
#endif /* HAVE_CLOCK_GETTIME */
static PyObject *
-time_sleep(PyObject *self, PyObject *args)
+time_sleep(PyObject *self, PyObject *obj)
{
- double secs;
- if (!PyArg_ParseTuple(args, "d:sleep", &secs))
+ _PyTime_t secs;
+ if (_PyTime_FromSecondsObject(&secs, obj, _PyTime_ROUND_CEILING))
return NULL;
if (secs < 0) {
PyErr_SetString(PyExc_ValueError,
"sleep length must be non-negative");
return NULL;
}
- if (floatsleep(secs) != 0)
+ if (pysleep(secs) != 0)
return NULL;
Py_INCREF(Py_None);
return Py_None;
@@ -341,7 +322,7 @@ parse_time_t_args(PyObject *args, char *format, time_t *pwhen)
whent = time(NULL);
}
else {
- if (_PyTime_ObjectToTime_t(ot, &whent, _PyTime_ROUND_DOWN) == -1)
+ if (_PyTime_ObjectToTime_t(ot, &whent, _PyTime_ROUND_FLOOR) == -1)
return 0;
}
*pwhen = whent;
@@ -629,21 +610,15 @@ time_strftime(PyObject *self, PyObject *args)
#if defined(MS_WINDOWS) && !defined(HAVE_WCSFTIME)
/* check that the format string contains only valid directives */
- for(outbuf = strchr(fmt, '%');
+ for (outbuf = strchr(fmt, '%');
outbuf != NULL;
outbuf = strchr(outbuf+2, '%'))
{
- if (outbuf[1]=='#')
+ if (outbuf[1] == '#')
++outbuf; /* not documented by python, */
- if (outbuf[1]=='\0' ||
- !strchr("aAbBcdHIjmMpSUwWxXyYzZ%", outbuf[1]))
- {
- PyErr_SetString(PyExc_ValueError, "Invalid format string");
- Py_DECREF(format);
- return NULL;
- }
- if ((outbuf[1] == 'y') && buf.tm_year < 0)
- {
+ if (outbuf[1] == '\0')
+ break;
+ if ((outbuf[1] == 'y') && buf.tm_year < 0) {
PyErr_SetString(PyExc_ValueError,
"format %y requires year >= 1900 on Windows");
Py_DECREF(format);
@@ -651,7 +626,7 @@ time_strftime(PyObject *self, PyObject *args)
}
}
#elif (defined(_AIX) || defined(sun)) && defined(HAVE_WCSFTIME)
- for(outbuf = wcschr(fmt, '%');
+ for (outbuf = wcschr(fmt, '%');
outbuf != NULL;
outbuf = wcschr(outbuf+2, '%'))
{
@@ -673,17 +648,24 @@ time_strftime(PyObject *self, PyObject *args)
* will be ahead of time...
*/
for (i = 1024; ; i += i) {
-#if defined _MSC_VER && _MSC_VER >= 1400 && defined(__STDC_SECURE_LIB__)
- int err;
-#endif
outbuf = (time_char *)PyMem_Malloc(i*sizeof(time_char));
if (outbuf == NULL) {
PyErr_NoMemory();
break;
}
+#if defined _MSC_VER && _MSC_VER >= 1400 && defined(__STDC_SECURE_LIB__)
+ errno = 0;
+#endif
+ _Py_BEGIN_SUPPRESS_IPH
buflen = format_time(outbuf, i, fmt, &buf);
+ _Py_END_SUPPRESS_IPH
#if defined _MSC_VER && _MSC_VER >= 1400 && defined(__STDC_SECURE_LIB__)
- err = errno;
+ /* VisualStudio .NET 2005 does this properly */
+ if (buflen == 0 && errno == EINVAL) {
+ PyErr_SetString(PyExc_ValueError, "Invalid format string");
+ PyMem_Free(outbuf);
+ break;
+ }
#endif
if (buflen > 0 || i >= 256 * fmtlen) {
/* If the buffer is 256 times as long as the format,
@@ -701,13 +683,6 @@ time_strftime(PyObject *self, PyObject *args)
break;
}
PyMem_Free(outbuf);
-#if defined _MSC_VER && _MSC_VER >= 1400 && defined(__STDC_SECURE_LIB__)
- /* VisualStudio .NET 2005 does this properly */
- if (buflen == 0 && err == EINVAL) {
- PyErr_SetString(PyExc_ValueError, "Invalid format string");
- break;
- }
-#endif
}
#ifdef HAVE_WCSFTIME
PyMem_Free(format);
@@ -905,122 +880,17 @@ the local timezone used by methods such as localtime, but this behaviour\n\
should not be relied on.");
#endif /* HAVE_WORKING_TZSET */
-#if defined(MS_WINDOWS) || defined(__APPLE__) \
- || (defined(HAVE_CLOCK_GETTIME) \
- && (defined(CLOCK_HIGHRES) || defined(CLOCK_MONOTONIC)))
-#define PYMONOTONIC
-#endif
-
-#ifdef PYMONOTONIC
-static PyObject*
+static PyObject *
pymonotonic(_Py_clock_info_t *info)
{
-#if defined(MS_WINDOWS)
- static ULONGLONG (*GetTickCount64) (void) = NULL;
- static ULONGLONG (CALLBACK *Py_GetTickCount64)(void);
- static int has_getickcount64 = -1;
- double result;
-
- if (has_getickcount64 == -1) {
- /* GetTickCount64() was added to Windows Vista */
- if (winver.dwMajorVersion >= 6) {
- HINSTANCE hKernel32;
- hKernel32 = GetModuleHandleW(L"KERNEL32");
- *(FARPROC*)&Py_GetTickCount64 = GetProcAddress(hKernel32,
- "GetTickCount64");
- has_getickcount64 = (Py_GetTickCount64 != NULL);
- }
- else
- has_getickcount64 = 0;
- }
-
- if (has_getickcount64) {
- ULONGLONG ticks;
- ticks = Py_GetTickCount64();
- result = (double)ticks * 1e-3;
- }
- else {
- static DWORD last_ticks = 0;
- static DWORD n_overflow = 0;
- DWORD ticks;
-
- ticks = GetTickCount();
- if (ticks < last_ticks)
- n_overflow++;
- last_ticks = ticks;
-
- result = ldexp(n_overflow, 32);
- result += ticks;
- result *= 1e-3;
- }
-
- if (info) {
- DWORD timeAdjustment, timeIncrement;
- BOOL isTimeAdjustmentDisabled, ok;
- if (has_getickcount64)
- info->implementation = "GetTickCount64()";
- else
- info->implementation = "GetTickCount()";
- info->monotonic = 1;
- ok = GetSystemTimeAdjustment(&timeAdjustment, &timeIncrement,
- &isTimeAdjustmentDisabled);
- if (!ok) {
- PyErr_SetFromWindowsErr(0);
- return NULL;
- }
- info->resolution = timeIncrement * 1e-7;
- info->adjustable = 0;
- }
- return PyFloat_FromDouble(result);
-
-#elif defined(__APPLE__)
- static mach_timebase_info_data_t timebase;
- uint64_t time;
- double secs;
-
- if (timebase.denom == 0) {
- /* According to the Technical Q&A QA1398, mach_timebase_info() cannot
- fail: https://developer.apple.com/library/mac/#qa/qa1398/ */
- (void)mach_timebase_info(&timebase);
- }
-
- time = mach_absolute_time();
- secs = (double)time * timebase.numer / timebase.denom * 1e-9;
- if (info) {
- info->implementation = "mach_absolute_time()";
- info->resolution = (double)timebase.numer / timebase.denom * 1e-9;
- info->monotonic = 1;
- info->adjustable = 0;
- }
- return PyFloat_FromDouble(secs);
-
-#elif defined(HAVE_CLOCK_GETTIME) && (defined(CLOCK_HIGHRES) || defined(CLOCK_MONOTONIC))
- struct timespec tp;
-#ifdef CLOCK_HIGHRES
- const clockid_t clk_id = CLOCK_HIGHRES;
- const char *function = "clock_gettime(CLOCK_HIGHRES)";
-#else
- const clockid_t clk_id = CLOCK_MONOTONIC;
- const char *function = "clock_gettime(CLOCK_MONOTONIC)";
-#endif
-
- if (clock_gettime(clk_id, &tp) != 0) {
- PyErr_SetFromErrno(PyExc_OSError);
+ _PyTime_t t;
+ double d;
+ if (_PyTime_GetMonotonicClockWithInfo(&t, info) < 0) {
+ assert(info != NULL);
return NULL;
}
-
- if (info) {
- struct timespec res;
- info->monotonic = 1;
- info->implementation = function;
- info->adjustable = 0;
- if (clock_getres(clk_id, &res) == 0)
- info->resolution = res.tv_sec + res.tv_nsec * 1e-9;
- else
- info->resolution = 1e-9;
- }
- return PyFloat_FromDouble(tp.tv_sec + tp.tv_nsec * 1e-9);
-#endif
+ d = _PyTime_AsSecondsDouble(t);
+ return PyFloat_FromDouble(d);
}
static PyObject *
@@ -1033,40 +903,15 @@ PyDoc_STRVAR(monotonic_doc,
"monotonic() -> float\n\
\n\
Monotonic clock, cannot go backward.");
-#endif /* PYMONOTONIC */
static PyObject*
perf_counter(_Py_clock_info_t *info)
{
-#if defined(WIN32_PERF_COUNTER) || defined(PYMONOTONIC)
- PyObject *res;
-#endif
-#if defined(WIN32_PERF_COUNTER)
- static int use_perf_counter = 1;
-#endif
-#ifdef PYMONOTONIC
- static int use_monotonic = 1;
-#endif
-
#ifdef WIN32_PERF_COUNTER
- if (use_perf_counter) {
- if (win_perf_counter(info, &res) == 0)
- return res;
- use_perf_counter = 0;
- }
-#endif
-
-#ifdef PYMONOTONIC
- if (use_monotonic) {
- res = pymonotonic(info);
- if (res != NULL)
- return res;
- use_monotonic = 0;
- PyErr_Clear();
- }
+ return win_perf_counter(info);
+#else
+ return pymonotonic(info);
#endif
-
- return floattime(info);
}
static PyObject *
@@ -1233,10 +1078,8 @@ time_get_clock_info(PyObject *self, PyObject *args)
else if (strcmp(name, "clock") == 0)
obj = pyclock(&info);
#endif
-#ifdef PYMONOTONIC
else if (strcmp(name, "monotonic") == 0)
obj = pymonotonic(&info);
-#endif
else if (strcmp(name, "perf_counter") == 0)
obj = perf_counter(&info);
else if (strcmp(name, "process_time") == 0)
@@ -1413,7 +1256,7 @@ static PyMethodDef time_methods[] = {
{"clock_settime", time_clock_settime, METH_VARARGS, clock_settime_doc},
{"clock_getres", time_clock_getres, METH_VARARGS, clock_getres_doc},
#endif
- {"sleep", time_sleep, METH_VARARGS, sleep_doc},
+ {"sleep", time_sleep, METH_O, sleep_doc},
{"gmtime", time_gmtime, METH_VARARGS, gmtime_doc},
{"localtime", time_localtime, METH_VARARGS, localtime_doc},
{"asctime", time_asctime, METH_VARARGS, asctime_doc},
@@ -1428,9 +1271,7 @@ static PyMethodDef time_methods[] = {
#ifdef HAVE_WORKING_TZSET
{"tzset", time_tzset, METH_NOARGS, tzset_doc},
#endif
-#ifdef PYMONOTONIC
{"monotonic", time_monotonic, METH_NOARGS, monotonic_doc},
-#endif
{"process_time", time_process_time, METH_NOARGS, process_time_doc},
{"perf_counter", time_perf_counter, METH_NOARGS, perf_counter_doc},
{"get_clock_info", time_get_clock_info, METH_VARARGS, get_clock_info_doc},
@@ -1512,15 +1353,6 @@ PyInit_time(void)
if (PyStructSequence_InitType2(&StructTimeType,
&struct_time_type_desc) < 0)
return NULL;
-
-#ifdef MS_WINDOWS
- winver.dwOSVersionInfoSize = sizeof(winver);
- if (!GetVersionEx((OSVERSIONINFO*)&winver)) {
- Py_DECREF(m);
- PyErr_SetFromWindowsErr(0);
- return NULL;
- }
-#endif
}
Py_INCREF(&StructTimeType);
#ifdef HAVE_STRUCT_TM_TM_ZONE
@@ -1536,109 +1368,93 @@ PyInit_time(void)
static PyObject*
floattime(_Py_clock_info_t *info)
{
- _PyTime_timeval t;
-#ifdef HAVE_CLOCK_GETTIME
- struct timespec tp;
- int ret;
-
- /* _PyTime_gettimeofday() does not use clock_gettime()
- because it would require to link Python to the rt (real-time)
- library, at least on Linux */
- ret = clock_gettime(CLOCK_REALTIME, &tp);
- if (ret == 0) {
- if (info) {
- struct timespec res;
- info->implementation = "clock_gettime(CLOCK_REALTIME)";
- info->monotonic = 0;
- info->adjustable = 1;
- if (clock_getres(CLOCK_REALTIME, &res) == 0)
- info->resolution = res.tv_sec + res.tv_nsec * 1e-9;
- else
- info->resolution = 1e-9;
- }
- return PyFloat_FromDouble(tp.tv_sec + tp.tv_nsec * 1e-9);
+ _PyTime_t t;
+ double d;
+ if (_PyTime_GetSystemClockWithInfo(&t, info) < 0) {
+ assert(info != NULL);
+ return NULL;
}
-#endif
- _PyTime_gettimeofday_info(&t, info);
- return PyFloat_FromDouble((double)t.tv_sec + t.tv_usec * 1e-6);
+ d = _PyTime_AsSecondsDouble(t);
+ return PyFloat_FromDouble(d);
}
-/* Implement floatsleep() for various platforms.
+/* Implement pysleep() for various platforms.
When interrupted (or when another error occurs), return -1 and
set an exception; else return 0. */
static int
-floatsleep(double secs)
+pysleep(_PyTime_t secs)
{
-/* XXX Should test for MS_WINDOWS first! */
-#if defined(HAVE_SELECT) && !defined(__EMX__)
- struct timeval t;
- double frac;
- int err;
-
- frac = fmod(secs, 1.0);
- secs = floor(secs);
- t.tv_sec = (long)secs;
- t.tv_usec = (long)(frac*1000000.0);
- Py_BEGIN_ALLOW_THREADS
- err = select(0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &t);
- Py_END_ALLOW_THREADS
- if (err != 0) {
-#ifdef EINTR
- if (errno == EINTR) {
- if (PyErr_CheckSignals())
- return -1;
- }
- else
+ _PyTime_t deadline, monotonic;
+#ifndef MS_WINDOWS
+ struct timeval timeout;
+ int err = 0;
+#else
+ _PyTime_t millisecs;
+ unsigned long ul_millis;
+ DWORD rc;
+ HANDLE hInterruptEvent;
#endif
- {
- PyErr_SetFromErrno(PyExc_IOError);
+
+ deadline = _PyTime_GetMonotonicClock() + secs;
+
+ do {
+#ifndef MS_WINDOWS
+ if (_PyTime_AsTimeval(secs, &timeout, _PyTime_ROUND_CEILING) < 0)
return -1;
- }
- }
-#elif defined(__WATCOMC__) && !defined(__QNX__)
- /* XXX Can't interrupt this sleep */
- Py_BEGIN_ALLOW_THREADS
- delay((int)(secs * 1000 + 0.5)); /* delay() uses milliseconds */
- Py_END_ALLOW_THREADS
-#elif defined(MS_WINDOWS)
- {
- double millisecs = secs * 1000.0;
- unsigned long ul_millis;
+ Py_BEGIN_ALLOW_THREADS
+ err = select(0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout);
+ Py_END_ALLOW_THREADS
+
+ if (err == 0)
+ break;
+
+ if (errno != EINTR) {
+ PyErr_SetFromErrno(PyExc_OSError);
+ return -1;
+ }
+#else
+ millisecs = _PyTime_AsMilliseconds(secs, _PyTime_ROUND_CEILING);
if (millisecs > (double)ULONG_MAX) {
PyErr_SetString(PyExc_OverflowError,
"sleep length is too large");
return -1;
}
- Py_BEGIN_ALLOW_THREADS
+
/* Allow sleep(0) to maintain win32 semantics, and as decreed
* by Guido, only the main thread can be interrupted.
*/
ul_millis = (unsigned long)millisecs;
- if (ul_millis == 0 || !_PyOS_IsMainThread())
+ if (ul_millis == 0 || !_PyOS_IsMainThread()) {
+ Py_BEGIN_ALLOW_THREADS
Sleep(ul_millis);
- else {
- DWORD rc;
- HANDLE hInterruptEvent = _PyOS_SigintEvent();
- ResetEvent(hInterruptEvent);
- rc = WaitForSingleObjectEx(hInterruptEvent, ul_millis, FALSE);
- if (rc == WAIT_OBJECT_0) {
- Py_BLOCK_THREADS
- errno = EINTR;
- PyErr_SetFromErrno(PyExc_IOError);
- return -1;
- }
+ Py_END_ALLOW_THREADS
+ break;
}
+
+ hInterruptEvent = _PyOS_SigintEvent();
+ ResetEvent(hInterruptEvent);
+
+ Py_BEGIN_ALLOW_THREADS
+ rc = WaitForSingleObjectEx(hInterruptEvent, ul_millis, FALSE);
Py_END_ALLOW_THREADS
- }
-#else
- /* XXX Can't interrupt this sleep */
- Py_BEGIN_ALLOW_THREADS
- sleep((int)secs);
- Py_END_ALLOW_THREADS
+
+ if (rc != WAIT_OBJECT_0)
+ break;
#endif
+ /* sleep was interrupted by SIGINT */
+ if (PyErr_CheckSignals())
+ return -1;
+
+ monotonic = _PyTime_GetMonotonicClock();
+ secs = deadline - monotonic;
+ if (secs < 0)
+ break;
+ /* retry with the recomputed delay */
+ } while (1);
+
return 0;
}
diff --git a/Modules/tkappinit.c b/Modules/tkappinit.c
index 2ed85949cb..7616d9d319 100644
--- a/Modules/tkappinit.c
+++ b/Modules/tkappinit.c
@@ -26,9 +26,6 @@ static int tk_load_failed;
int
Tcl_AppInit(Tcl_Interp *interp)
{
-#ifdef WITH_MOREBUTTONS
- Tk_Window main_window;
-#endif
const char *_tkinter_skip_tk_init;
#ifdef TKINTER_PROTECT_LOADTK
const char *_tkinter_tk_failed;
@@ -113,29 +110,13 @@ Tcl_AppInit(Tcl_Interp *interp)
return TCL_ERROR;
}
-#ifdef WITH_MOREBUTTONS
- main_window = Tk_MainWindow(interp);
-#else
Tk_MainWindow(interp);
-#endif
#ifdef TK_AQUA
TkMacOSXInitAppleEvents(interp);
TkMacOSXInitMenus(interp);
#endif
-#ifdef WITH_MOREBUTTONS
- {
- extern Tcl_CmdProc studButtonCmd;
- extern Tcl_CmdProc triButtonCmd;
-
- Tcl_CreateCommand(interp, "studbutton", studButtonCmd,
- (ClientData) main_window, NULL);
- Tcl_CreateCommand(interp, "tributton", triButtonCmd,
- (ClientData) main_window, NULL);
- }
-#endif
-
#ifdef WITH_PIL /* 0.2b5 and later -- not yet released as of May 14 */
{
extern void TkImaging_Init(Tcl_Interp *);
diff --git a/Modules/tkinter.h b/Modules/tkinter.h
index 3c55676c0f..cb5a806b0c 100644
--- a/Modules/tkinter.h
+++ b/Modules/tkinter.h
@@ -16,14 +16,6 @@
(TK_RELEASE_LEVEL << 8) | \
(TK_RELEASE_SERIAL << 0))
-/* TK_VERSION_HEX packs fields in wrong order, not suitable for comparing of
- * non-final releases. Left for backward compatibility.
- */
-#define TK_VERSION_HEX ((TK_MAJOR_VERSION << 24) | \
- (TK_MINOR_VERSION << 16) | \
- (TK_RELEASE_SERIAL << 8) | \
- (TK_RELEASE_LEVEL << 0))
-
/* Protect Tk 8.4.13 and older from a deadlock that happens when trying
* to load tk after a failed attempt. */
#if TK_HEX_VERSION < 0x0804020e
diff --git a/Modules/unicodedata.c b/Modules/unicodedata.c
index 507cef3ba1..fe4e90822a 100644
--- a/Modules/unicodedata.c
+++ b/Modules/unicodedata.c
@@ -73,6 +73,8 @@ typedef struct previous_version {
Py_UCS4 (*normalization)(Py_UCS4);
} PreviousDBVersion;
+#include "clinic/unicodedata.c.h"
+
#define get_old_record(self, v) ((((PreviousDBVersion*)self)->getrecord)(v))
static PyMemberDef DB_members[] = {
@@ -99,81 +101,31 @@ new_previous_version(const char*name, const change_record* (*getrecord)(Py_UCS4)
}
-static Py_UCS4 getuchar(PyUnicodeObject *obj)
-{
- if (PyUnicode_READY(obj))
- return (Py_UCS4)-1;
- if (PyUnicode_GET_LENGTH(obj) == 1) {
- if (PyUnicode_READY(obj))
- return (Py_UCS4)-1;
- return PyUnicode_READ_CHAR(obj, 0);
- }
- PyErr_SetString(PyExc_TypeError,
- "need a single Unicode character as parameter");
- return (Py_UCS4)-1;
-}
-
/* --- Module API --------------------------------------------------------- */
/*[clinic input]
-
unicodedata.UCD.decimal
- unichr: object(type='PyUnicodeObject *', subclass_of='&PyUnicode_Type')
+ self: self
+ chr: int(accept={str})
default: object=NULL
/
Converts a Unicode character into its equivalent decimal value.
-Returns the decimal value assigned to the Unicode character unichr
-as integer. If no such value is defined, default is returned, or, if
-not given, ValueError is raised.
+Returns the decimal value assigned to the character chr as integer.
+If no such value is defined, default is returned, or, if not given,
+ValueError is raised.
[clinic start generated code]*/
-PyDoc_STRVAR(unicodedata_UCD_decimal__doc__,
-"decimal($self, unichr, default=None, /)\n"
-"--\n"
-"\n"
-"Converts a Unicode character into its equivalent decimal value.\n"
-"\n"
-"Returns the decimal value assigned to the Unicode character unichr\n"
-"as integer. If no such value is defined, default is returned, or, if\n"
-"not given, ValueError is raised.");
-
-#define UNICODEDATA_UCD_DECIMAL_METHODDEF \
- {"decimal", (PyCFunction)unicodedata_UCD_decimal, METH_VARARGS, unicodedata_UCD_decimal__doc__},
-
-static PyObject *
-unicodedata_UCD_decimal_impl(PreviousDBVersion *self, PyUnicodeObject *unichr, PyObject *default_value);
-
-static PyObject *
-unicodedata_UCD_decimal(PreviousDBVersion *self, PyObject *args)
-{
- PyObject *return_value = NULL;
- PyUnicodeObject *unichr;
- PyObject *default_value = NULL;
-
- if (!PyArg_ParseTuple(args,
- "O!|O:decimal",
- &PyUnicode_Type, &unichr, &default_value))
- goto exit;
- return_value = unicodedata_UCD_decimal_impl(self, unichr, default_value);
-
-exit:
- return return_value;
-}
-
static PyObject *
-unicodedata_UCD_decimal_impl(PreviousDBVersion *self, PyUnicodeObject *unichr, PyObject *default_value)
-/*[clinic end generated code: output=8689669896d293df input=c25c9d2b4de076b1]*/
+unicodedata_UCD_decimal_impl(PyObject *self, int chr,
+ PyObject *default_value)
+/*[clinic end generated code: output=be23376e1a185231 input=933f8107993f23d0]*/
{
int have_old = 0;
long rc;
- Py_UCS4 c;
-
- c = getuchar(unichr);
- if (c == (Py_UCS4)-1)
- return NULL;
+ Py_UCS4 c = (Py_UCS4)chr;
if (self && UCD_Check(self)) {
const change_record *old = get_old_record(self, c);
@@ -204,61 +156,64 @@ unicodedata_UCD_decimal_impl(PreviousDBVersion *self, PyUnicodeObject *unichr, P
return PyLong_FromLong(rc);
}
-PyDoc_STRVAR(unicodedata_digit__doc__,
-"digit(unichr[, default])\n\
-\n\
-Returns the digit value assigned to the Unicode character unichr as\n\
-integer. If no such value is defined, default is returned, or, if\n\
-not given, ValueError is raised.");
+/*[clinic input]
+unicodedata.UCD.digit
+
+ self: self
+ chr: int(accept={str})
+ default: object=NULL
+ /
+
+Converts a Unicode character into its equivalent digit value.
+
+Returns the digit value assigned to the character chr as integer.
+If no such value is defined, default is returned, or, if not given,
+ValueError is raised.
+[clinic start generated code]*/
static PyObject *
-unicodedata_digit(PyObject *self, PyObject *args)
+unicodedata_UCD_digit_impl(PyObject *self, int chr, PyObject *default_value)
+/*[clinic end generated code: output=96e18c950171fd2f input=e27d6e4565cd29f2]*/
{
- PyUnicodeObject *v;
- PyObject *defobj = NULL;
long rc;
- Py_UCS4 c;
-
- if (!PyArg_ParseTuple(args, "O!|O:digit", &PyUnicode_Type, &v, &defobj))
- return NULL;
- c = getuchar(v);
- if (c == (Py_UCS4)-1)
- return NULL;
+ Py_UCS4 c = (Py_UCS4)chr;
rc = Py_UNICODE_TODIGIT(c);
if (rc < 0) {
- if (defobj == NULL) {
+ if (default_value == NULL) {
PyErr_SetString(PyExc_ValueError, "not a digit");
return NULL;
}
else {
- Py_INCREF(defobj);
- return defobj;
+ Py_INCREF(default_value);
+ return default_value;
}
}
return PyLong_FromLong(rc);
}
-PyDoc_STRVAR(unicodedata_numeric__doc__,
-"numeric(unichr[, default])\n\
-\n\
-Returns the numeric value assigned to the Unicode character unichr\n\
-as float. If no such value is defined, default is returned, or, if\n\
-not given, ValueError is raised.");
+/*[clinic input]
+unicodedata.UCD.numeric
+
+ self: self
+ chr: int(accept={str})
+ default: object=NULL
+ /
+
+Converts a Unicode character into its equivalent numeric value.
+
+Returns the numeric value assigned to the character chr as float.
+If no such value is defined, default is returned, or, if not given,
+ValueError is raised.
+[clinic start generated code]*/
static PyObject *
-unicodedata_numeric(PyObject *self, PyObject *args)
+unicodedata_UCD_numeric_impl(PyObject *self, int chr,
+ PyObject *default_value)
+/*[clinic end generated code: output=53ce281fe85b10c4 input=fdf5871a5542893c]*/
{
- PyUnicodeObject *v;
- PyObject *defobj = NULL;
int have_old = 0;
double rc;
- Py_UCS4 c;
-
- if (!PyArg_ParseTuple(args, "O!|O:numeric", &PyUnicode_Type, &v, &defobj))
- return NULL;
- c = getuchar(v);
- if (c == (Py_UCS4)-1)
- return NULL;
+ Py_UCS4 c = (Py_UCS4)chr;
if (self && UCD_Check(self)) {
const change_record *old = get_old_record(self, c);
@@ -276,37 +231,34 @@ unicodedata_numeric(PyObject *self, PyObject *args)
if (!have_old)
rc = Py_UNICODE_TONUMERIC(c);
if (rc == -1.0) {
- if (defobj == NULL) {
+ if (default_value == NULL) {
PyErr_SetString(PyExc_ValueError, "not a numeric character");
return NULL;
}
else {
- Py_INCREF(defobj);
- return defobj;
+ Py_INCREF(default_value);
+ return default_value;
}
}
return PyFloat_FromDouble(rc);
}
-PyDoc_STRVAR(unicodedata_category__doc__,
-"category(unichr)\n\
-\n\
-Returns the general category assigned to the Unicode character\n\
-unichr as string.");
+/*[clinic input]
+unicodedata.UCD.category
+
+ self: self
+ chr: int(accept={str})
+ /
+
+Returns the general category assigned to the character chr as string.
+[clinic start generated code]*/
static PyObject *
-unicodedata_category(PyObject *self, PyObject *args)
+unicodedata_UCD_category_impl(PyObject *self, int chr)
+/*[clinic end generated code: output=8571539ee2e6783a input=27d6f3d85050bc06]*/
{
- PyUnicodeObject *v;
int index;
- Py_UCS4 c;
-
- if (!PyArg_ParseTuple(args, "O!:category",
- &PyUnicode_Type, &v))
- return NULL;
- c = getuchar(v);
- if (c == (Py_UCS4)-1)
- return NULL;
+ Py_UCS4 c = (Py_UCS4)chr;
index = (int) _getrecord_ex(c)->category;
if (self && UCD_Check(self)) {
const change_record *old = get_old_record(self, c);
@@ -316,26 +268,24 @@ unicodedata_category(PyObject *self, PyObject *args)
return PyUnicode_FromString(_PyUnicode_CategoryNames[index]);
}
-PyDoc_STRVAR(unicodedata_bidirectional__doc__,
-"bidirectional(unichr)\n\
-\n\
-Returns the bidirectional class assigned to the Unicode character\n\
-unichr as string. If no such value is defined, an empty string is\n\
-returned.");
+/*[clinic input]
+unicodedata.UCD.bidirectional
+
+ self: self
+ chr: int(accept={str})
+ /
+
+Returns the bidirectional class assigned to the character chr as string.
+
+If no such value is defined, an empty string is returned.
+[clinic start generated code]*/
static PyObject *
-unicodedata_bidirectional(PyObject *self, PyObject *args)
+unicodedata_UCD_bidirectional_impl(PyObject *self, int chr)
+/*[clinic end generated code: output=d36310ce2039bb92 input=b3d8f42cebfcf475]*/
{
- PyUnicodeObject *v;
int index;
- Py_UCS4 c;
-
- if (!PyArg_ParseTuple(args, "O!:bidirectional",
- &PyUnicode_Type, &v))
- return NULL;
- c = getuchar(v);
- if (c == (Py_UCS4)-1)
- return NULL;
+ Py_UCS4 c = (Py_UCS4)chr;
index = (int) _getrecord_ex(c)->bidirectional;
if (self && UCD_Check(self)) {
const change_record *old = get_old_record(self, c);
@@ -347,55 +297,52 @@ unicodedata_bidirectional(PyObject *self, PyObject *args)
return PyUnicode_FromString(_PyUnicode_BidirectionalNames[index]);
}
-PyDoc_STRVAR(unicodedata_combining__doc__,
-"combining(unichr)\n\
-\n\
-Returns the canonical combining class assigned to the Unicode\n\
-character unichr as integer. Returns 0 if no combining class is\n\
-defined.");
+/*[clinic input]
+unicodedata.UCD.combining -> int
-static PyObject *
-unicodedata_combining(PyObject *self, PyObject *args)
+ self: self
+ chr: int(accept={str})
+ /
+
+Returns the canonical combining class assigned to the character chr as integer.
+
+Returns 0 if no combining class is defined.
+[clinic start generated code]*/
+
+static int
+unicodedata_UCD_combining_impl(PyObject *self, int chr)
+/*[clinic end generated code: output=cad056d0cb6a5920 input=9f2d6b2a95d0a22a]*/
{
- PyUnicodeObject *v;
int index;
- Py_UCS4 c;
-
- if (!PyArg_ParseTuple(args, "O!:combining",
- &PyUnicode_Type, &v))
- return NULL;
- c = getuchar(v);
- if (c == (Py_UCS4)-1)
- return NULL;
+ Py_UCS4 c = (Py_UCS4)chr;
index = (int) _getrecord_ex(c)->combining;
if (self && UCD_Check(self)) {
const change_record *old = get_old_record(self, c);
if (old->category_changed == 0)
index = 0; /* unassigned */
}
- return PyLong_FromLong(index);
+ return index;
}
-PyDoc_STRVAR(unicodedata_mirrored__doc__,
-"mirrored(unichr)\n\
-\n\
-Returns the mirrored property assigned to the Unicode character\n\
-unichr as integer. Returns 1 if the character has been identified as\n\
-a \"mirrored\" character in bidirectional text, 0 otherwise.");
+/*[clinic input]
+unicodedata.UCD.mirrored -> int
-static PyObject *
-unicodedata_mirrored(PyObject *self, PyObject *args)
+ self: self
+ chr: int(accept={str})
+ /
+
+Returns the mirrored property assigned to the character chr as integer.
+
+Returns 1 if the character has been identified as a "mirrored"
+character in bidirectional text, 0 otherwise.
+[clinic start generated code]*/
+
+static int
+unicodedata_UCD_mirrored_impl(PyObject *self, int chr)
+/*[clinic end generated code: output=2532dbf8121b50e6 input=5dd400d351ae6f3b]*/
{
- PyUnicodeObject *v;
int index;
- Py_UCS4 c;
-
- if (!PyArg_ParseTuple(args, "O!:mirrored",
- &PyUnicode_Type, &v))
- return NULL;
- c = getuchar(v);
- if (c == (Py_UCS4)-1)
- return NULL;
+ Py_UCS4 c = (Py_UCS4)chr;
index = (int) _getrecord_ex(c)->mirrored;
if (self && UCD_Check(self)) {
const change_record *old = get_old_record(self, c);
@@ -404,28 +351,25 @@ unicodedata_mirrored(PyObject *self, PyObject *args)
else if (old->mirrored_changed != 0xFF)
index = old->mirrored_changed;
}
- return PyLong_FromLong(index);
+ return index;
}
-PyDoc_STRVAR(unicodedata_east_asian_width__doc__,
-"east_asian_width(unichr)\n\
-\n\
-Returns the east asian width assigned to the Unicode character\n\
-unichr as string.");
+/*[clinic input]
+unicodedata.UCD.east_asian_width
+
+ self: self
+ chr: int(accept={str})
+ /
+
+Returns the east asian width assigned to the character chr as string.
+[clinic start generated code]*/
static PyObject *
-unicodedata_east_asian_width(PyObject *self, PyObject *args)
+unicodedata_UCD_east_asian_width_impl(PyObject *self, int chr)
+/*[clinic end generated code: output=484e8537d9ee8197 input=c4854798aab026e0]*/
{
- PyUnicodeObject *v;
int index;
- Py_UCS4 c;
-
- if (!PyArg_ParseTuple(args, "O!:east_asian_width",
- &PyUnicode_Type, &v))
- return NULL;
- c = getuchar(v);
- if (c == (Py_UCS4)-1)
- return NULL;
+ Py_UCS4 c = (Py_UCS4)chr;
index = (int) _getrecord_ex(c)->east_asian_width;
if (self && UCD_Check(self)) {
const change_record *old = get_old_record(self, c);
@@ -435,29 +379,27 @@ unicodedata_east_asian_width(PyObject *self, PyObject *args)
return PyUnicode_FromString(_PyUnicode_EastAsianWidthNames[index]);
}
-PyDoc_STRVAR(unicodedata_decomposition__doc__,
-"decomposition(unichr)\n\
-\n\
-Returns the character decomposition mapping assigned to the Unicode\n\
-character unichr as string. An empty string is returned in case no\n\
-such mapping is defined.");
+/*[clinic input]
+unicodedata.UCD.decomposition
+
+ self: self
+ chr: int(accept={str})
+ /
+
+Returns the character decomposition mapping assigned to the character chr as string.
+
+An empty string is returned in case no such mapping is defined.
+[clinic start generated code]*/
static PyObject *
-unicodedata_decomposition(PyObject *self, PyObject *args)
+unicodedata_UCD_decomposition_impl(PyObject *self, int chr)
+/*[clinic end generated code: output=7d699f3ec7565d27 input=e4c12459ad68507b]*/
{
- PyUnicodeObject *v;
char decomp[256];
int code, index, count;
size_t i;
unsigned int prefix_index;
- Py_UCS4 c;
-
- if (!PyArg_ParseTuple(args, "O!:decomposition",
- &PyUnicode_Type, &v))
- return NULL;
- c = getuchar(v);
- if (c == (Py_UCS4)-1)
- return NULL;
+ Py_UCS4 c = (Py_UCS4)chr;
code = (int)c;
@@ -858,22 +800,24 @@ is_normalized(PyObject *self, PyObject *input, int nfc, int k)
return 1; /* certainly normalized */
}
-PyDoc_STRVAR(unicodedata_normalize__doc__,
-"normalize(form, unistr)\n\
-\n\
-Return the normal form 'form' for the Unicode string unistr. Valid\n\
-values for form are 'NFC', 'NFKC', 'NFD', and 'NFKD'.");
+/*[clinic input]
+unicodedata.UCD.normalize
-static PyObject*
-unicodedata_normalize(PyObject *self, PyObject *args)
-{
- char *form;
- PyObject *input;
+ self: self
+ form: str
+ unistr as input: object(subclass_of='&PyUnicode_Type')
+ /
- if(!PyArg_ParseTuple(args, "sO!:normalize",
- &form, &PyUnicode_Type, &input))
- return NULL;
+Return the normal form 'form' for the Unicode string unistr.
+
+Valid values for form are 'NFC', 'NFKC', 'NFD', and 'NFKD'.
+[clinic start generated code]*/
+static PyObject *
+unicodedata_UCD_normalize_impl(PyObject *self, const char *form,
+ PyObject *input)
+/*[clinic end generated code: output=62d1f8870027efdc input=cd092e631cf11883]*/
+{
if (PyUnicode_READY(input) == -1)
return NULL;
@@ -977,10 +921,11 @@ is_unified_ideograph(Py_UCS4 code)
{
return
(0x3400 <= code && code <= 0x4DB5) || /* CJK Ideograph Extension A */
- (0x4E00 <= code && code <= 0x9FCC) || /* CJK Ideograph */
+ (0x4E00 <= code && code <= 0x9FD5) || /* CJK Ideograph */
(0x20000 <= code && code <= 0x2A6D6) || /* CJK Ideograph Extension B */
(0x2A700 <= code && code <= 0x2B734) || /* CJK Ideograph Extension C */
- (0x2B740 <= code && code <= 0x2B81D); /* CJK Ideograph Extension D */
+ (0x2B740 <= code && code <= 0x2B81D) || /* CJK Ideograph Extension D */
+ (0x2B820 <= code && code <= 0x2CEA1); /* CJK Ideograph Extension E */
}
/* macros used to determine if the given code point is in the PUA range that
@@ -1232,64 +1177,67 @@ static const _PyUnicode_Name_CAPI hashAPI =
/* -------------------------------------------------------------------- */
/* Python bindings */
-PyDoc_STRVAR(unicodedata_name__doc__,
-"name(unichr[, default])\n\
-Returns the name assigned to the Unicode character unichr as a\n\
-string. If no name is defined, default is returned, or, if not\n\
-given, ValueError is raised.");
+/*[clinic input]
+unicodedata.UCD.name
+
+ self: self
+ chr: int(accept={str})
+ default: object=NULL
+ /
+
+Returns the name assigned to the character chr as a string.
+
+If no name is defined, default is returned, or, if not given,
+ValueError is raised.
+[clinic start generated code]*/
static PyObject *
-unicodedata_name(PyObject* self, PyObject* args)
+unicodedata_UCD_name_impl(PyObject *self, int chr, PyObject *default_value)
+/*[clinic end generated code: output=6bbb37a326407707 input=3e0367f534de56d9]*/
{
char name[NAME_MAXLEN];
- Py_UCS4 c;
-
- PyUnicodeObject* v;
- PyObject* defobj = NULL;
- if (!PyArg_ParseTuple(args, "O!|O:name", &PyUnicode_Type, &v, &defobj))
- return NULL;
-
- c = getuchar(v);
- if (c == (Py_UCS4)-1)
- return NULL;
+ Py_UCS4 c = (Py_UCS4)chr;
if (!_getucname(self, c, name, sizeof(name), 0)) {
- if (defobj == NULL) {
+ if (default_value == NULL) {
PyErr_SetString(PyExc_ValueError, "no such name");
return NULL;
}
else {
- Py_INCREF(defobj);
- return defobj;
+ Py_INCREF(default_value);
+ return default_value;
}
}
return PyUnicode_FromString(name);
}
-PyDoc_STRVAR(unicodedata_lookup__doc__,
-"lookup(name)\n\
-\n\
-Look up character by name. If a character with the\n\
-given name is found, return the corresponding Unicode\n\
-character. If not found, KeyError is raised.");
+/*[clinic input]
+unicodedata.UCD.lookup
+
+ self: self
+ name: str(accept={str, robuffer}, zeroes=True)
+ /
+
+Look up character by name.
+
+If a character with the given name is found, return the
+corresponding character. If not found, KeyError is raised.
+[clinic start generated code]*/
static PyObject *
-unicodedata_lookup(PyObject* self, PyObject* args)
+unicodedata_UCD_lookup_impl(PyObject *self, const char *name,
+ Py_ssize_clean_t name_length)
+/*[clinic end generated code: output=765cb8186788e6be input=a557be0f8607a0d6]*/
{
Py_UCS4 code;
-
- char* name;
- Py_ssize_t namelen;
unsigned int index;
- if (!PyArg_ParseTuple(args, "s#:lookup", &name, &namelen))
- return NULL;
- if (namelen > INT_MAX) {
+ if (name_length > INT_MAX) {
PyErr_SetString(PyExc_KeyError, "name too long");
return NULL;
}
- if (!_getcode(self, name, (int)namelen, &code, 1)) {
+ if (!_getcode(self, name, (int)name_length, &code, 1)) {
PyErr_Format(PyExc_KeyError, "undefined character name '%s'", name);
return NULL;
}
@@ -1308,24 +1256,17 @@ unicodedata_lookup(PyObject* self, PyObject* args)
static PyMethodDef unicodedata_functions[] = {
UNICODEDATA_UCD_DECIMAL_METHODDEF
- {"digit", unicodedata_digit, METH_VARARGS, unicodedata_digit__doc__},
- {"numeric", unicodedata_numeric, METH_VARARGS, unicodedata_numeric__doc__},
- {"category", unicodedata_category, METH_VARARGS,
- unicodedata_category__doc__},
- {"bidirectional", unicodedata_bidirectional, METH_VARARGS,
- unicodedata_bidirectional__doc__},
- {"combining", unicodedata_combining, METH_VARARGS,
- unicodedata_combining__doc__},
- {"mirrored", unicodedata_mirrored, METH_VARARGS,
- unicodedata_mirrored__doc__},
- {"east_asian_width", unicodedata_east_asian_width, METH_VARARGS,
- unicodedata_east_asian_width__doc__},
- {"decomposition", unicodedata_decomposition, METH_VARARGS,
- unicodedata_decomposition__doc__},
- {"name", unicodedata_name, METH_VARARGS, unicodedata_name__doc__},
- {"lookup", unicodedata_lookup, METH_VARARGS, unicodedata_lookup__doc__},
- {"normalize", unicodedata_normalize, METH_VARARGS,
- unicodedata_normalize__doc__},
+ UNICODEDATA_UCD_DIGIT_METHODDEF
+ UNICODEDATA_UCD_NUMERIC_METHODDEF
+ UNICODEDATA_UCD_CATEGORY_METHODDEF
+ UNICODEDATA_UCD_BIDIRECTIONAL_METHODDEF
+ UNICODEDATA_UCD_COMBINING_METHODDEF
+ UNICODEDATA_UCD_MIRRORED_METHODDEF
+ UNICODEDATA_UCD_EAST_ASIAN_WIDTH_METHODDEF
+ UNICODEDATA_UCD_DECOMPOSITION_METHODDEF
+ UNICODEDATA_UCD_NAME_METHODDEF
+ UNICODEDATA_UCD_LOOKUP_METHODDEF
+ UNICODEDATA_UCD_NORMALIZE_METHODDEF
{NULL, NULL} /* sentinel */
};
diff --git a/Modules/unicodedata_db.h b/Modules/unicodedata_db.h
index ec11fa1da4..89d8768dd9 100644
--- a/Modules/unicodedata_db.h
+++ b/Modules/unicodedata_db.h
@@ -1,6 +1,6 @@
/* this file was generated by Tools/unicode/makeunicodedata.py 3.2 */
-#define UNIDATA_VERSION "6.3.0"
+#define UNIDATA_VERSION "8.0.0"
/* a list of unique database records */
const _PyUnicode_DatabaseRecord _PyUnicode_Database_Records[] = {
{0, 0, 0, 0, 0, 0},
@@ -323,7 +323,11 @@ const _PyUnicode_DatabaseRecord _PyUnicode_Database_Records[] = {
{27, 0, 19, 0, 1, 136},
{14, 0, 19, 0, 5, 0},
{8, 0, 19, 0, 5, 0},
+ {9, 0, 9, 0, 5, 0},
{9, 0, 4, 0, 5, 0},
+ {30, 0, 4, 0, 5, 0},
+ {1, 0, 4, 0, 5, 0},
+ {2, 0, 4, 0, 5, 0},
{9, 0, 12, 0, 5, 0},
{30, 0, 1, 0, 5, 170},
{5, 216, 1, 0, 5, 0},
@@ -335,8 +339,8 @@ const _PyUnicode_DatabaseRecord _PyUnicode_Database_Records[] = {
};
/* Reindexing of NFC first characters. */
-#define TOTAL_FIRST 372
-#define TOTAL_LAST 56
+#define TOTAL_FIRST 376
+#define TOTAL_LAST 62
struct reindex{int start;short count,index;};
static struct reindex nfc_first[] = {
{ 60, 2, 0},
@@ -546,6 +550,9 @@ static struct reindex nfc_first[] = {
{ 69787, 0, 368},
{ 69797, 0, 369},
{ 69937, 1, 370},
+ { 70471, 0, 372},
+ { 70841, 0, 373},
+ { 71096, 1, 374},
{0,0,0}
};
@@ -583,6 +590,12 @@ static struct reindex nfc_last[] = {
{ 12441, 1, 52},
{ 69818, 0, 54},
{ 69927, 0, 55},
+ { 70462, 0, 56},
+ { 70487, 0, 57},
+ { 70832, 0, 58},
+ { 70842, 0, 59},
+ { 70845, 0, 60},
+ { 71087, 0, 61},
{0,0,0}
};
@@ -714,36 +727,43 @@ static unsigned char index1[] = {
121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 122, 122, 123, 124,
- 125, 126, 127, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 84,
- 138, 139, 140, 141, 142, 84, 84, 84, 84, 84, 84, 143, 84, 144, 145, 146,
- 84, 147, 84, 148, 84, 84, 84, 149, 84, 84, 84, 150, 151, 152, 153, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 154, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 41, 41, 41, 41, 41, 41, 155, 84, 156,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 41, 41, 41, 41, 41, 41, 41, 41, 157, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 41, 41, 41, 41, 158, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 159, 160, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 161, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 78, 162, 163, 164, 165, 84, 166, 84, 167, 168, 169, 170, 171, 172,
- 173, 174, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 175, 176, 84, 84, 177, 178, 179,
- 180, 181, 84, 182, 183, 184, 185, 186, 187, 188, 189, 190, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 101, 101, 101,
+ 125, 126, 127, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
+ 138, 139, 140, 141, 142, 143, 144, 138, 41, 41, 145, 138, 146, 147, 148,
+ 149, 150, 151, 152, 153, 154, 155, 138, 138, 156, 138, 138, 138, 157,
+ 158, 159, 160, 161, 162, 163, 138, 138, 164, 138, 165, 166, 167, 168,
+ 138, 138, 169, 138, 138, 138, 170, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 41, 41, 41, 41, 41, 41, 41, 171, 172, 41, 173, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 41, 41, 41, 41, 41, 41, 41, 41, 174, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 41, 41, 41, 41, 175, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 41, 41, 41, 41, 176, 177, 178, 179, 138, 138, 138, 138, 138,
+ 138, 180, 181, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 182, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 183, 184, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 78, 185,
+ 186, 187, 188, 138, 189, 138, 190, 191, 192, 193, 194, 195, 196, 197, 78,
+ 78, 78, 78, 198, 199, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 200, 201, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 202, 203, 138, 138, 204, 205, 206, 207, 208, 138, 209, 210, 209, 209,
+ 211, 212, 209, 213, 214, 215, 216, 217, 218, 219, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 101, 101, 101, 101, 101, 101,
101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
@@ -767,359 +787,458 @@ static unsigned char index1[] = {
101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
- 101, 101, 101, 101, 101, 101, 101, 101, 191, 101, 101, 101, 101, 101,
+ 101, 101, 101, 101, 101, 220, 101, 101, 101, 101, 101, 101, 101, 101,
101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
- 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 192,
- 101, 193, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 122, 122, 122, 122, 194, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 195, 84, 196, 197, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
- 84, 84, 84, 84, 84, 84, 84, 84, 84, 121, 121, 121, 121, 121, 121, 121,
+ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 221, 101, 222, 101,
+ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
+ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
+ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
+ 101, 223, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 122, 122, 122, 122, 224, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 225, 138, 226, 227, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
@@ -1156,7 +1275,7 @@ static unsigned char index1[] = {
121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
- 198, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
+ 121, 121, 121, 121, 121, 121, 121, 228, 121, 121, 121, 121, 121, 121,
121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
@@ -1192,7 +1311,8 @@ static unsigned char index1[] = {
121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
- 121, 121, 121, 121, 121, 121, 121, 121, 198,
+ 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
+ 121, 228,
};
static unsigned short index2[] = {
@@ -1244,7 +1364,7 @@ static unsigned short index2[] = {
69, 59, 69, 69, 70, 60, 62, 62, 62, 60, 60, 60, 62, 62, 71, 60, 60, 60,
62, 62, 62, 62, 60, 61, 62, 62, 60, 72, 73, 73, 72, 73, 73, 72, 60, 60,
60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 44, 47, 44, 47, 74, 54, 44,
- 47, 0, 0, 51, 47, 47, 47, 75, 0, 0, 0, 0, 0, 58, 76, 38, 75, 38, 38, 38,
+ 47, 0, 0, 51, 47, 47, 47, 75, 44, 0, 0, 0, 0, 58, 76, 38, 75, 38, 38, 38,
0, 38, 0, 38, 38, 43, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
39, 39, 39, 39, 0, 39, 39, 39, 39, 39, 39, 39, 38, 38, 43, 43, 43, 43,
43, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
@@ -1267,97 +1387,98 @@ static unsigned short index2[] = {
38, 43, 38, 43, 38, 43, 44, 47, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43,
38, 43, 44, 47, 38, 43, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47,
44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47,
- 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47,
+ 44, 47, 44, 47, 44, 47, 0, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 0, 0, 53, 83, 83, 83, 83, 83, 83, 0, 47, 47, 47,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 0, 0, 53, 83, 83, 83, 83, 83, 83, 0,
47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
- 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 35,
- 0, 83, 84, 0, 0, 0, 0, 85, 0, 86, 81, 81, 81, 81, 86, 81, 81, 81, 87, 86,
- 81, 81, 81, 81, 81, 81, 86, 86, 86, 86, 86, 86, 81, 81, 86, 81, 81, 87,
- 88, 81, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 98, 99, 100, 101, 102,
- 103, 104, 105, 106, 104, 81, 86, 104, 97, 0, 0, 0, 0, 0, 0, 0, 0, 107,
- 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
- 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 0, 0, 0, 0,
- 0, 107, 107, 107, 104, 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 108, 108,
- 108, 108, 108, 0, 78, 78, 109, 110, 110, 111, 112, 113, 26, 26, 81, 81,
- 81, 81, 81, 81, 81, 81, 114, 115, 116, 113, 117, 0, 113, 113, 118, 118,
- 119, 119, 119, 119, 119, 118, 118, 118, 118, 118, 118, 118, 118, 118,
- 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118,
- 118, 118, 120, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 121,
- 122, 123, 114, 115, 116, 124, 125, 126, 126, 127, 86, 81, 81, 81, 81, 81,
- 86, 81, 81, 86, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 110,
- 129, 129, 113, 118, 118, 130, 118, 118, 118, 118, 131, 131, 131, 131,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 35, 0, 83, 84, 0, 0, 26, 26, 85, 0, 86, 81, 81, 81, 81, 86, 81,
+ 81, 81, 87, 86, 81, 81, 81, 81, 81, 81, 86, 86, 86, 86, 86, 86, 81, 81,
+ 86, 81, 81, 87, 88, 81, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 98, 99,
+ 100, 101, 102, 103, 104, 105, 106, 104, 81, 86, 104, 97, 0, 0, 0, 0, 0,
+ 0, 0, 0, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 0,
+ 0, 0, 0, 0, 107, 107, 107, 104, 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 108, 108, 108, 108, 108, 108, 78, 78, 109, 110, 110, 111, 112, 113, 26,
+ 26, 81, 81, 81, 81, 81, 81, 81, 81, 114, 115, 116, 113, 117, 0, 113, 113,
+ 118, 118, 119, 119, 119, 119, 119, 118, 118, 118, 118, 118, 118, 118,
118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118,
+ 118, 118, 118, 118, 120, 118, 118, 118, 118, 118, 118, 118, 118, 118,
+ 118, 121, 122, 123, 114, 115, 116, 124, 125, 126, 126, 127, 86, 81, 81,
+ 81, 81, 81, 86, 81, 81, 86, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+ 128, 110, 129, 129, 113, 118, 118, 130, 118, 118, 118, 118, 131, 131,
+ 131, 131, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118,
118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118,
118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118,
118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118,
118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118,
- 118, 119, 118, 119, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118,
- 118, 118, 118, 118, 118, 118, 119, 113, 118, 81, 81, 81, 81, 81, 81, 81,
- 108, 26, 81, 81, 81, 81, 86, 81, 120, 120, 81, 81, 26, 86, 81, 81, 86,
- 118, 118, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 118, 118,
- 118, 133, 133, 118, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
- 113, 113, 113, 113, 0, 117, 118, 134, 118, 118, 118, 118, 118, 118, 118,
+ 118, 118, 118, 119, 118, 119, 118, 118, 118, 118, 118, 118, 118, 118,
+ 118, 118, 118, 118, 118, 118, 118, 118, 119, 113, 118, 81, 81, 81, 81,
+ 81, 81, 81, 108, 26, 81, 81, 81, 81, 86, 81, 120, 120, 81, 81, 26, 86,
+ 81, 81, 86, 118, 118, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132,
+ 118, 118, 118, 133, 133, 118, 113, 113, 113, 113, 113, 113, 113, 113,
+ 113, 113, 113, 113, 113, 113, 0, 117, 118, 134, 118, 118, 118, 118, 118,
118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118,
- 118, 118, 118, 118, 118, 118, 118, 118, 118, 81, 86, 81, 81, 86, 81, 81,
- 86, 86, 86, 81, 86, 86, 81, 86, 81, 81, 81, 86, 81, 86, 81, 86, 81, 86,
- 81, 81, 0, 0, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118,
+ 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 81, 86, 81, 81,
+ 86, 81, 81, 86, 86, 86, 81, 86, 86, 81, 86, 81, 81, 81, 86, 81, 86, 81,
+ 86, 81, 86, 81, 81, 0, 0, 118, 118, 118, 118, 118, 118, 118, 118, 118,
118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118,
118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118,
118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118,
118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118,
118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118,
- 118, 118, 118, 118, 118, 118, 118, 135, 135, 135, 135, 135, 135, 135,
- 135, 135, 135, 135, 118, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 136,
- 136, 136, 136, 136, 136, 136, 136, 136, 136, 107, 107, 107, 107, 107,
+ 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 135, 135, 135, 135,
+ 135, 135, 135, 135, 135, 135, 135, 118, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 107, 107, 107,
107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
- 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 81,
- 81, 81, 81, 81, 81, 81, 86, 81, 137, 137, 26, 138, 138, 138, 137, 0, 0,
- 0, 0, 0, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
- 107, 107, 107, 107, 107, 107, 107, 107, 107, 81, 81, 81, 81, 137, 81, 81,
- 81, 81, 81, 81, 81, 81, 81, 137, 81, 81, 81, 137, 81, 81, 81, 81, 81, 0,
- 0, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
- 104, 0, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
- 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 86, 86, 86,
- 0, 0, 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 118, 0, 118,
+ 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 81, 81, 81, 81, 81, 81, 81, 86, 81, 137, 137, 26, 138, 138,
+ 138, 137, 0, 0, 0, 0, 0, 107, 107, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 81, 81,
+ 81, 81, 137, 81, 81, 81, 81, 81, 81, 81, 81, 81, 137, 81, 81, 81, 137,
+ 81, 81, 81, 81, 81, 0, 0, 104, 104, 104, 104, 104, 104, 104, 104, 104,
+ 104, 104, 104, 104, 104, 104, 0, 107, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 86, 86, 86, 0, 0, 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118,
118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81,
- 81, 86, 81, 81, 86, 81, 81, 81, 86, 86, 86, 121, 122, 123, 81, 81, 81,
- 86, 81, 81, 86, 86, 81, 81, 81, 81, 0, 135, 135, 135, 139, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 140, 48,
- 48, 48, 48, 48, 48, 48, 140, 48, 48, 140, 48, 48, 48, 48, 48, 135, 139,
- 141, 48, 139, 139, 139, 135, 135, 135, 135, 135, 135, 135, 135, 139, 139,
- 139, 139, 142, 139, 139, 48, 81, 86, 81, 81, 135, 135, 135, 143, 143,
- 143, 143, 143, 143, 143, 143, 48, 48, 135, 135, 83, 83, 144, 144, 144,
- 144, 144, 144, 144, 144, 144, 144, 83, 53, 48, 48, 48, 48, 48, 48, 0, 48,
- 48, 48, 48, 48, 48, 48, 0, 135, 139, 139, 0, 48, 48, 48, 48, 48, 48, 48,
- 48, 0, 0, 48, 48, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 48, 48, 48, 48, 48, 0,
- 48, 0, 0, 0, 48, 48, 48, 48, 0, 0, 145, 48, 146, 139, 139, 135, 135, 135,
- 135, 0, 0, 139, 139, 0, 0, 147, 147, 142, 48, 0, 0, 0, 0, 0, 0, 0, 0,
- 146, 0, 0, 0, 0, 143, 143, 0, 143, 48, 48, 135, 135, 0, 0, 144, 144, 144,
- 144, 144, 144, 144, 144, 144, 144, 48, 48, 85, 85, 148, 148, 148, 148,
- 148, 148, 80, 85, 0, 0, 0, 0, 0, 135, 135, 139, 0, 48, 48, 48, 48, 48,
- 48, 0, 0, 0, 0, 48, 48, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 48, 48, 48, 48,
- 48, 0, 48, 143, 0, 48, 143, 0, 48, 48, 0, 0, 145, 0, 139, 139, 139, 135,
- 135, 0, 0, 0, 0, 135, 135, 0, 0, 135, 135, 142, 0, 0, 0, 135, 0, 0, 0, 0,
- 0, 0, 0, 143, 143, 143, 48, 0, 143, 0, 0, 0, 0, 0, 0, 0, 144, 144, 144,
- 144, 144, 144, 144, 144, 144, 144, 135, 135, 48, 48, 48, 135, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 135, 135, 139, 0, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 0, 48, 48, 48, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 48, 48, 48, 48, 48, 0, 48,
- 48, 0, 48, 48, 48, 48, 48, 0, 0, 145, 48, 139, 139, 139, 135, 135, 135,
- 135, 135, 0, 135, 135, 139, 0, 139, 139, 142, 0, 0, 48, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 135, 135, 0, 0, 144, 144, 144, 144,
- 144, 144, 144, 144, 144, 144, 83, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 135, 139, 139, 0, 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 48, 48,
- 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 81, 81, 86, 81, 81, 86, 81,
+ 81, 81, 86, 86, 86, 121, 122, 123, 81, 81, 81, 86, 81, 81, 86, 86, 81,
+ 81, 81, 81, 81, 135, 135, 135, 139, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 140, 48, 48, 48, 48, 48, 48, 48,
+ 140, 48, 48, 140, 48, 48, 48, 48, 48, 135, 139, 141, 48, 139, 139, 139,
+ 135, 135, 135, 135, 135, 135, 135, 135, 139, 139, 139, 139, 142, 139,
+ 139, 48, 81, 86, 81, 81, 135, 135, 135, 143, 143, 143, 143, 143, 143,
+ 143, 143, 48, 48, 135, 135, 83, 83, 144, 144, 144, 144, 144, 144, 144,
+ 144, 144, 144, 83, 53, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 135, 139, 139, 0, 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 48,
+ 48, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 0, 48, 48, 48, 48, 48, 48, 48, 0, 48, 0, 0, 0,
+ 48, 48, 48, 48, 0, 0, 145, 48, 146, 139, 139, 135, 135, 135, 135, 0, 0,
+ 139, 139, 0, 0, 147, 147, 142, 48, 0, 0, 0, 0, 0, 0, 0, 0, 146, 0, 0, 0,
+ 0, 143, 143, 0, 143, 48, 48, 135, 135, 0, 0, 144, 144, 144, 144, 144,
+ 144, 144, 144, 144, 144, 48, 48, 85, 85, 148, 148, 148, 148, 148, 148,
+ 80, 85, 0, 0, 0, 0, 0, 135, 135, 139, 0, 48, 48, 48, 48, 48, 48, 0, 0, 0,
+ 0, 48, 48, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 48, 48, 48, 48, 48, 0, 48,
+ 143, 0, 48, 143, 0, 48, 48, 0, 0, 145, 0, 139, 139, 139, 135, 135, 0, 0,
+ 0, 0, 135, 135, 0, 0, 135, 135, 142, 0, 0, 0, 135, 0, 0, 0, 0, 0, 0, 0,
+ 143, 143, 143, 48, 0, 143, 0, 0, 0, 0, 0, 0, 0, 144, 144, 144, 144, 144,
+ 144, 144, 144, 144, 144, 135, 135, 48, 48, 48, 135, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 135, 135, 139, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 48,
+ 48, 48, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 0,
+ 48, 48, 48, 48, 48, 0, 0, 145, 48, 139, 139, 139, 135, 135, 135, 135,
+ 135, 0, 135, 135, 139, 0, 139, 139, 142, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 135, 135, 0, 0, 144, 144, 144, 144, 144,
+ 144, 144, 144, 144, 144, 83, 85, 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0,
+ 0, 0, 135, 139, 139, 0, 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 48, 48, 0,
+ 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 0, 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 0, 48, 48,
48, 48, 48, 0, 0, 145, 48, 146, 135, 139, 135, 135, 135, 135, 0, 0, 139,
147, 0, 0, 147, 147, 142, 0, 0, 0, 0, 0, 0, 0, 0, 149, 146, 0, 0, 0, 0,
@@ -1369,123 +1490,124 @@ static unsigned short index2[] = {
48, 0, 0, 0, 0, 146, 139, 135, 139, 139, 0, 0, 0, 139, 139, 139, 0, 147,
147, 147, 142, 0, 0, 48, 0, 0, 0, 0, 0, 0, 146, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 148,
- 148, 148, 26, 26, 26, 26, 26, 26, 85, 26, 0, 0, 0, 0, 0, 0, 139, 139,
+ 148, 148, 26, 26, 26, 26, 26, 26, 85, 26, 0, 0, 0, 0, 0, 135, 139, 139,
139, 0, 48, 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 48, 0, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 48, 48, 48, 0,
+ 48, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0,
0, 0, 48, 135, 135, 135, 139, 139, 139, 139, 0, 135, 135, 150, 0, 135,
- 135, 135, 142, 0, 0, 0, 0, 0, 0, 0, 151, 152, 0, 48, 48, 0, 0, 0, 0, 0,
+ 135, 135, 142, 0, 0, 0, 0, 0, 0, 0, 151, 152, 0, 48, 48, 48, 0, 0, 0, 0,
0, 48, 48, 135, 135, 0, 0, 144, 144, 144, 144, 144, 144, 144, 144, 144,
- 144, 0, 0, 0, 0, 0, 0, 0, 0, 153, 153, 153, 153, 153, 153, 153, 80, 0, 0,
+ 144, 0, 0, 0, 0, 0, 0, 0, 0, 153, 153, 153, 153, 153, 153, 153, 80, 0,
+ 135, 139, 139, 0, 48, 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 48, 0, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 48,
+ 48, 48, 0, 0, 145, 48, 139, 154, 147, 139, 146, 139, 139, 0, 154, 147,
+ 147, 0, 147, 147, 135, 142, 0, 0, 0, 0, 0, 0, 0, 146, 146, 0, 0, 0, 0, 0,
+ 0, 0, 48, 0, 48, 48, 135, 135, 0, 0, 144, 144, 144, 144, 144, 144, 144,
+ 144, 144, 144, 0, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 135,
139, 139, 0, 48, 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 48, 0, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 48, 48,
- 48, 0, 0, 145, 48, 139, 154, 147, 139, 146, 139, 139, 0, 154, 147, 147,
- 0, 147, 147, 135, 142, 0, 0, 0, 0, 0, 0, 0, 146, 146, 0, 0, 0, 0, 0, 0,
- 0, 48, 0, 48, 48, 135, 135, 0, 0, 144, 144, 144, 144, 144, 144, 144, 144,
- 144, 144, 0, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139,
- 139, 0, 48, 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 48, 0, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 0, 0, 48, 146, 139, 139, 135, 135, 135, 135, 0, 139, 139,
+ 139, 0, 147, 147, 147, 142, 48, 0, 0, 0, 0, 0, 0, 0, 0, 146, 0, 0, 0, 0,
+ 0, 0, 0, 48, 48, 48, 135, 135, 0, 0, 144, 144, 144, 144, 144, 144, 144,
+ 144, 144, 144, 148, 148, 148, 148, 148, 148, 0, 0, 0, 80, 48, 48, 48, 48,
+ 48, 48, 0, 0, 139, 139, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 0, 48, 0, 0, 48, 48, 48, 48, 48, 48, 48, 0,
+ 0, 0, 155, 0, 0, 0, 0, 146, 139, 139, 135, 135, 135, 0, 135, 0, 139, 139,
+ 147, 139, 147, 147, 147, 146, 0, 0, 0, 0, 0, 0, 144, 144, 144, 144, 144,
+ 144, 144, 144, 144, 144, 0, 0, 139, 139, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 0, 0, 48, 146, 139, 139, 135, 135, 135, 135, 0, 139, 139, 139, 0,
- 147, 147, 147, 142, 48, 0, 0, 0, 0, 0, 0, 0, 0, 146, 0, 0, 0, 0, 0, 0, 0,
- 0, 48, 48, 135, 135, 0, 0, 144, 144, 144, 144, 144, 144, 144, 144, 144,
- 144, 148, 148, 148, 148, 148, 148, 0, 0, 0, 80, 48, 48, 48, 48, 48, 48,
- 0, 0, 139, 139, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 0, 48, 0, 0, 48, 48, 48, 48, 48, 48, 48, 0, 0, 0,
- 155, 0, 0, 0, 0, 146, 139, 139, 135, 135, 135, 0, 135, 0, 139, 139, 147,
- 139, 147, 147, 147, 146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 139, 139, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 135, 48, 156, 135, 135, 135, 135, 157,
- 157, 142, 0, 0, 0, 0, 85, 48, 48, 48, 48, 48, 48, 53, 135, 158, 158, 158,
- 158, 135, 135, 135, 83, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
- 83, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 0, 48, 0, 0, 48, 48,
- 0, 48, 0, 0, 48, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 0, 48, 48, 48, 48, 48,
- 48, 48, 0, 48, 48, 48, 0, 48, 0, 48, 0, 0, 48, 48, 0, 48, 48, 48, 48,
- 135, 48, 156, 135, 135, 135, 135, 159, 159, 0, 135, 135, 48, 0, 0, 48,
- 48, 48, 48, 48, 0, 53, 0, 160, 160, 160, 160, 135, 135, 0, 0, 144, 144,
- 144, 144, 144, 144, 144, 144, 144, 144, 0, 0, 156, 156, 48, 48, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 48, 80, 80, 80, 83, 83, 83, 83, 83, 83, 83, 83, 161, 83,
- 83, 83, 83, 83, 83, 80, 83, 80, 80, 80, 86, 86, 80, 80, 80, 80, 80, 80,
- 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 148, 148, 148, 148,
- 148, 148, 148, 148, 148, 148, 80, 86, 80, 86, 80, 162, 163, 164, 163,
- 164, 139, 139, 48, 48, 48, 143, 48, 48, 48, 48, 0, 48, 48, 48, 48, 143,
- 48, 48, 48, 48, 143, 48, 48, 48, 48, 143, 48, 48, 48, 48, 143, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 143, 48, 48, 48, 0, 0, 0, 0, 165,
- 166, 167, 168, 167, 167, 169, 167, 169, 166, 166, 166, 166, 135, 139,
- 166, 167, 81, 81, 142, 83, 81, 81, 48, 48, 48, 48, 48, 135, 135, 135,
- 135, 135, 135, 167, 135, 135, 135, 135, 0, 135, 135, 135, 135, 167, 135,
- 135, 135, 135, 167, 135, 135, 135, 135, 167, 135, 135, 135, 135, 167,
- 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 167, 135,
- 135, 135, 0, 80, 80, 80, 80, 80, 80, 80, 80, 86, 80, 80, 80, 80, 80, 80,
- 0, 80, 80, 83, 83, 83, 83, 83, 80, 80, 80, 80, 83, 83, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 135, 48, 156,
+ 135, 135, 135, 135, 157, 157, 142, 0, 0, 0, 0, 85, 48, 48, 48, 48, 48,
+ 48, 53, 135, 158, 158, 158, 158, 135, 135, 135, 83, 144, 144, 144, 144,
+ 144, 144, 144, 144, 144, 144, 83, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 48, 48, 0, 48, 0, 0, 48, 48, 0, 48, 0, 0, 48, 0, 0, 0, 0, 0, 0, 48,
+ 48, 48, 48, 0, 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 48, 0, 48, 0, 48,
+ 0, 0, 48, 48, 0, 48, 48, 48, 48, 135, 48, 156, 135, 135, 135, 135, 159,
+ 159, 0, 135, 135, 48, 0, 0, 48, 48, 48, 48, 48, 0, 53, 0, 160, 160, 160,
+ 160, 135, 135, 0, 0, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 0,
+ 0, 156, 156, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 80, 80, 80, 83, 83, 83,
+ 83, 83, 83, 83, 83, 161, 83, 83, 83, 83, 83, 83, 80, 83, 80, 80, 80, 86,
+ 86, 80, 80, 80, 80, 80, 80, 144, 144, 144, 144, 144, 144, 144, 144, 144,
+ 144, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 80, 86, 80, 86,
+ 80, 162, 163, 164, 163, 164, 139, 139, 48, 48, 48, 143, 48, 48, 48, 48,
+ 0, 48, 48, 48, 48, 143, 48, 48, 48, 48, 143, 48, 48, 48, 48, 143, 48, 48,
+ 48, 48, 143, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 143, 48, 48,
+ 48, 0, 0, 0, 0, 165, 166, 167, 168, 167, 167, 169, 167, 169, 166, 166,
+ 166, 166, 135, 139, 166, 167, 81, 81, 142, 83, 81, 81, 48, 48, 48, 48,
+ 48, 135, 135, 135, 135, 135, 135, 167, 135, 135, 135, 135, 0, 135, 135,
+ 135, 135, 167, 135, 135, 135, 135, 167, 135, 135, 135, 135, 167, 135,
+ 135, 135, 135, 167, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
+ 135, 135, 167, 135, 135, 135, 0, 80, 80, 80, 80, 80, 80, 80, 80, 86, 80,
+ 80, 80, 80, 80, 80, 0, 80, 80, 83, 83, 83, 83, 83, 80, 80, 80, 80, 83,
+ 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 140, 48, 48, 48, 48, 139, 139, 135, 149, 135,
- 135, 139, 135, 135, 135, 135, 135, 145, 139, 142, 142, 139, 139, 135,
- 135, 48, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 83, 83, 83,
- 83, 83, 83, 48, 48, 48, 48, 48, 48, 139, 139, 135, 135, 48, 48, 48, 48,
- 135, 135, 135, 48, 139, 139, 139, 48, 48, 139, 139, 139, 139, 139, 139,
- 139, 48, 48, 48, 135, 135, 135, 135, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 135, 139, 139, 135, 135, 139, 139, 139, 139, 139, 139,
- 86, 48, 139, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 139, 139,
- 139, 135, 80, 80, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 140, 48, 48, 48, 48, 139,
+ 139, 135, 149, 135, 135, 139, 135, 135, 135, 135, 135, 145, 139, 142,
+ 142, 139, 139, 135, 135, 48, 144, 144, 144, 144, 144, 144, 144, 144, 144,
+ 144, 83, 83, 83, 83, 83, 83, 48, 48, 48, 48, 48, 48, 139, 139, 135, 135,
+ 48, 48, 48, 48, 135, 135, 135, 48, 139, 139, 139, 48, 48, 139, 139, 139,
+ 139, 139, 139, 139, 48, 48, 48, 135, 135, 135, 135, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 135, 139, 139, 135, 135, 139, 139, 139,
+ 139, 139, 139, 86, 48, 139, 144, 144, 144, 144, 144, 144, 144, 144, 144,
+ 144, 139, 139, 139, 135, 80, 80, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 0, 44, 0, 0, 0, 0, 0, 44, 0, 0, 48, 48, 48, 48,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 0, 44, 0, 0, 0, 0, 0, 44, 0, 0,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 83, 51, 48, 48, 48, 170, 170, 170, 170, 170, 170, 170, 170,
+ 48, 48, 48, 48, 48, 48, 48, 83, 51, 48, 48, 48, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
- 170, 170, 170, 170, 48, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
- 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 48, 48, 48, 48,
+ 170, 170, 170, 170, 170, 170, 170, 48, 171, 171, 171, 171, 171, 171, 171,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 171, 171, 171, 171, 171, 171,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 171, 171, 171, 171,
171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171,
- 171, 171, 171, 171, 171, 171, 171, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 171, 171, 171, 171, 171, 171, 171, 171, 171, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0,
- 48, 48, 48, 48, 0, 0, 48, 48, 48, 48, 48, 48, 48, 0, 48, 0, 48, 48, 48,
- 48, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 48, 48, 0, 0, 48, 48, 48, 48, 48,
+ 48, 0, 48, 48, 48, 48, 0, 0, 48, 48, 48, 48, 48, 48, 48, 0, 48, 0, 48,
+ 48, 48, 48, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 48, 48, 0, 0, 48, 48,
- 48, 48, 48, 48, 48, 0, 48, 0, 48, 48, 48, 48, 0, 0, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 48, 48, 0, 0, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 48,
- 48, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 81, 81,
- 81, 83, 83, 83, 83, 83, 83, 83, 83, 83, 148, 148, 148, 148, 148, 148,
- 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 0,
- 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 26, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 48, 48, 0, 0,
+ 48, 48, 48, 48, 48, 48, 48, 0, 48, 0, 48, 48, 48, 48, 0, 0, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 48,
+ 48, 48, 48, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 0,
+ 81, 81, 81, 83, 83, 83, 83, 83, 83, 83, 83, 83, 148, 148, 148, 148, 148,
+ 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
+ 148, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 0, 0, 0, 0, 0, 0, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 0, 0, 47, 47, 47, 47, 47, 47,
+ 0, 0, 84, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
@@ -1505,357 +1627,359 @@ static unsigned short index2[] = {
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 83, 83, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 172, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 163, 164,
+ 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 83, 83, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 172, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 163, 164, 0, 0, 0,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 83, 83, 83, 173, 173, 173, 48, 48, 48, 48, 48, 48,
+ 48, 48, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 0, 48, 48, 48, 48, 135, 135, 142, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 135, 135, 142, 83, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 135, 135, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 0, 48, 48, 48, 0, 135, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 83, 83, 83, 173, 173, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 48,
- 48, 48, 48, 135, 135, 142, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 135, 135,
- 142, 83, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 135, 135, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 48,
- 48, 48, 0, 135, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48,
+ 139, 135, 135, 135, 135, 135, 135, 135, 139, 139, 139, 139, 139, 139,
+ 139, 139, 135, 139, 139, 135, 135, 135, 135, 135, 135, 135, 135, 135,
+ 142, 135, 83, 83, 83, 53, 83, 83, 83, 85, 48, 81, 0, 0, 144, 144, 144,
+ 144, 144, 144, 144, 144, 144, 144, 0, 0, 0, 0, 0, 0, 153, 153, 153, 153,
+ 153, 153, 153, 153, 153, 153, 0, 0, 0, 0, 0, 0, 138, 138, 138, 138, 138,
+ 138, 84, 138, 138, 138, 138, 135, 135, 135, 174, 0, 144, 144, 144, 144,
+ 144, 144, 144, 144, 144, 144, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 53, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 135, 135, 139, 135, 135,
- 135, 135, 135, 135, 135, 139, 139, 139, 139, 139, 139, 139, 139, 135,
- 139, 139, 135, 135, 135, 135, 135, 135, 135, 135, 135, 142, 135, 83, 83,
- 83, 53, 83, 83, 83, 85, 48, 81, 0, 0, 144, 144, 144, 144, 144, 144, 144,
- 144, 144, 144, 0, 0, 0, 0, 0, 0, 153, 153, 153, 153, 153, 153, 153, 153,
- 153, 153, 0, 0, 0, 0, 0, 0, 138, 138, 138, 138, 138, 138, 84, 138, 138,
- 138, 138, 135, 135, 135, 174, 0, 144, 144, 144, 144, 144, 144, 144, 144,
- 144, 144, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 53, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 88, 48, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 88, 48,
- 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 135, 135, 135, 139, 139, 139, 139,
+ 135, 135, 139, 139, 139, 0, 0, 0, 0, 139, 139, 135, 139, 139, 139, 139,
+ 139, 139, 87, 81, 86, 0, 0, 0, 0, 26, 0, 0, 0, 138, 138, 144, 144, 144,
+ 144, 144, 144, 144, 144, 144, 144, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 0, 0, 0, 135, 135, 135, 139, 139, 139, 139, 135, 135, 139, 139,
- 139, 0, 0, 0, 0, 139, 139, 135, 139, 139, 139, 139, 139, 139, 87, 81, 86,
- 0, 0, 0, 0, 26, 0, 0, 0, 138, 138, 144, 144, 144, 144, 144, 144, 144,
- 144, 144, 144, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 48,
- 48, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 0, 0, 48, 48, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 0, 0, 0, 0, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
- 139, 139, 139, 139, 139, 139, 139, 48, 48, 48, 48, 48, 48, 48, 139, 139,
- 0, 0, 0, 0, 0, 0, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 148,
- 0, 0, 0, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 0, 0, 0, 0, 0, 0, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
+ 148, 0, 0, 0, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 81, 86, 139, 139, 135, 0, 0, 83, 83, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 81, 86, 139, 139, 135, 0, 0, 83, 83, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 139, 135, 139,
+ 135, 135, 135, 135, 135, 135, 135, 0, 142, 139, 135, 139, 139, 135, 135,
+ 135, 135, 135, 135, 135, 135, 139, 139, 139, 139, 139, 139, 135, 135, 81,
+ 81, 81, 81, 81, 81, 81, 81, 0, 0, 86, 144, 144, 144, 144, 144, 144, 144,
+ 144, 144, 144, 0, 0, 0, 0, 0, 0, 144, 144, 144, 144, 144, 144, 144, 144,
+ 144, 144, 0, 0, 0, 0, 0, 0, 83, 83, 83, 83, 83, 83, 83, 53, 83, 83, 83,
+ 83, 83, 83, 0, 0, 81, 81, 81, 81, 81, 86, 86, 86, 86, 86, 86, 81, 81, 86,
+ 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, 135, 135, 135,
+ 139, 48, 140, 48, 140, 48, 140, 48, 140, 48, 140, 48, 48, 48, 140, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 139, 135, 139, 135,
- 135, 135, 135, 135, 135, 135, 0, 142, 139, 135, 139, 139, 135, 135, 135,
- 135, 135, 135, 135, 135, 139, 139, 139, 139, 139, 139, 135, 135, 81, 81,
- 81, 81, 81, 81, 81, 81, 0, 0, 86, 144, 144, 144, 144, 144, 144, 144, 144,
- 144, 144, 0, 0, 0, 0, 0, 0, 144, 144, 144, 144, 144, 144, 144, 144, 144,
- 144, 0, 0, 0, 0, 0, 0, 83, 83, 83, 83, 83, 83, 83, 53, 83, 83, 83, 83,
- 83, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, 135, 135, 135, 139, 48, 140, 48,
- 140, 48, 140, 48, 140, 48, 140, 48, 48, 48, 140, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 145, 146, 135,
+ 135, 135, 135, 135, 147, 135, 147, 139, 139, 147, 147, 135, 147, 175, 48,
+ 48, 48, 48, 48, 48, 48, 0, 0, 0, 0, 144, 144, 144, 144, 144, 144, 144,
+ 144, 144, 144, 83, 83, 83, 83, 83, 83, 83, 80, 80, 80, 80, 80, 80, 80,
+ 80, 80, 80, 81, 86, 81, 81, 81, 81, 81, 81, 81, 80, 80, 80, 80, 80, 80,
+ 80, 80, 80, 0, 0, 0, 135, 135, 139, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 145, 146, 135, 135, 135, 135, 135,
- 147, 135, 147, 139, 139, 147, 147, 135, 147, 175, 48, 48, 48, 48, 48, 48,
- 48, 0, 0, 0, 0, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 83, 83,
- 83, 83, 83, 83, 83, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 81, 86, 81,
- 81, 81, 81, 81, 81, 81, 80, 80, 80, 80, 80, 80, 80, 80, 80, 0, 0, 0, 135,
- 135, 139, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 139, 135, 135,
- 135, 135, 139, 139, 135, 135, 175, 142, 139, 139, 48, 48, 144, 144, 144,
- 144, 144, 144, 144, 144, 144, 144, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 139, 135, 135, 135, 135, 139, 139, 135, 135, 175, 142, 135,
+ 135, 48, 48, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 145,
- 139, 135, 135, 139, 139, 139, 135, 139, 135, 135, 135, 175, 175, 0, 0, 0,
- 0, 0, 0, 0, 0, 83, 83, 83, 83, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 139, 139, 139, 139, 139, 139, 139, 139,
- 135, 135, 135, 135, 135, 135, 135, 135, 139, 139, 135, 145, 0, 0, 0, 83,
- 83, 83, 83, 83, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 0, 0,
- 0, 48, 48, 48, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 48, 48,
+ 48, 48, 48, 48, 48, 48, 145, 139, 135, 135, 139, 139, 139, 135, 139, 135,
+ 135, 135, 175, 175, 0, 0, 0, 0, 0, 0, 0, 0, 83, 83, 83, 83, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 53, 53, 53, 53, 53, 53, 83, 83,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 139, 139,
+ 139, 139, 139, 139, 139, 139, 135, 135, 135, 135, 135, 135, 135, 135,
+ 139, 139, 135, 145, 0, 0, 0, 83, 83, 83, 83, 83, 144, 144, 144, 144, 144,
+ 144, 144, 144, 144, 144, 0, 0, 0, 48, 48, 48, 144, 144, 144, 144, 144,
+ 144, 144, 144, 144, 144, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 53, 53, 53, 53, 53, 53, 83, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 83, 83, 83, 83, 83,
- 83, 83, 0, 0, 0, 0, 0, 0, 0, 0, 81, 81, 81, 83, 176, 86, 86, 86, 86, 86,
- 81, 81, 86, 86, 86, 86, 81, 139, 176, 176, 176, 176, 176, 176, 176, 48,
- 48, 48, 48, 86, 48, 48, 48, 48, 139, 139, 81, 48, 48, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 0, 0, 83, 83, 83, 83, 83, 83, 83, 83, 0, 0, 0, 0, 0, 0, 0, 0, 81, 81, 81,
+ 83, 176, 86, 86, 86, 86, 86, 81, 81, 86, 86, 86, 86, 81, 139, 176, 176,
+ 176, 176, 176, 176, 176, 48, 48, 48, 48, 86, 48, 48, 48, 48, 139, 139,
+ 81, 48, 48, 0, 81, 81, 0, 0, 0, 0, 0, 0, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
- 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 51, 51, 51, 53, 51, 51, 51, 51,
- 51, 51, 51, 51, 51, 51, 51, 53, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
- 51, 51, 51, 51, 51, 51, 51, 51, 53, 51, 51, 51, 51, 51, 51, 51, 51, 51,
+ 51, 51, 51, 53, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 53, 51, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 53, 51,
51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
- 51, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 51, 47, 47, 47,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 51, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
- 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 51, 51, 51, 51, 51,
+ 47, 47, 47, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
- 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 81, 81, 86, 81,
- 81, 81, 81, 81, 81, 81, 86, 81, 81, 177, 178, 86, 179, 81, 81, 81, 81,
+ 51, 51, 51, 51, 81, 81, 86, 81, 81, 81, 81, 81, 81, 81, 86, 81, 81, 177,
+ 178, 86, 179, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 180, 86,
- 81, 86, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43,
- 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43,
- 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43,
- 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43,
- 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43,
- 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43,
- 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43,
- 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43,
- 38, 43, 38, 43, 38, 43, 38, 43, 43, 43, 43, 43, 35, 181, 47, 47, 44, 47,
- 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43,
- 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43,
- 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43,
- 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43,
- 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43,
- 44, 47, 44, 47, 44, 47, 43, 43, 43, 43, 43, 43, 43, 43, 38, 38, 38, 38,
- 38, 38, 38, 38, 43, 43, 43, 43, 43, 43, 0, 0, 38, 38, 38, 38, 38, 38, 0,
- 0, 43, 43, 43, 43, 43, 43, 43, 43, 38, 38, 38, 38, 38, 38, 38, 38, 43,
+ 81, 81, 81, 81, 0, 0, 0, 0, 0, 0, 180, 86, 81, 86, 38, 43, 38, 43, 38,
+ 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38,
+ 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38,
+ 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38,
+ 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38,
+ 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38,
+ 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38,
+ 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38,
+ 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38,
+ 43, 43, 43, 43, 43, 35, 181, 47, 47, 44, 47, 38, 43, 38, 43, 38, 43, 38,
+ 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38,
+ 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38,
+ 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38,
+ 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 38,
+ 43, 38, 43, 38, 43, 38, 43, 38, 43, 38, 43, 44, 47, 44, 47, 44, 47, 43,
43, 43, 43, 43, 43, 43, 43, 38, 38, 38, 38, 38, 38, 38, 38, 43, 43, 43,
43, 43, 43, 0, 0, 38, 38, 38, 38, 38, 38, 0, 0, 43, 43, 43, 43, 43, 43,
- 43, 43, 0, 38, 0, 38, 0, 38, 0, 38, 43, 43, 43, 43, 43, 43, 43, 43, 38,
- 38, 38, 38, 38, 38, 38, 38, 43, 182, 43, 182, 43, 182, 43, 182, 43, 182,
- 43, 182, 43, 182, 0, 0, 43, 43, 43, 43, 43, 43, 43, 43, 183, 183, 183,
- 183, 183, 183, 183, 183, 43, 43, 43, 43, 43, 43, 43, 43, 183, 183, 183,
- 183, 183, 183, 183, 183, 43, 43, 43, 43, 43, 43, 43, 43, 183, 183, 183,
- 183, 183, 183, 183, 183, 43, 43, 43, 43, 43, 0, 43, 43, 38, 38, 38, 184,
- 183, 58, 182, 58, 58, 76, 43, 43, 43, 0, 43, 43, 38, 184, 38, 184, 183,
- 76, 76, 76, 43, 43, 43, 182, 0, 0, 43, 43, 38, 38, 38, 184, 0, 76, 76,
- 76, 43, 43, 43, 182, 43, 43, 43, 43, 38, 38, 38, 184, 38, 76, 185, 185,
- 0, 0, 43, 43, 43, 0, 43, 43, 38, 184, 38, 184, 183, 185, 58, 0, 186, 186,
- 187, 187, 187, 187, 187, 187, 187, 187, 187, 174, 174, 174, 188, 189,
- 190, 191, 84, 190, 190, 190, 22, 192, 193, 194, 195, 196, 193, 194, 195,
- 196, 22, 22, 22, 138, 197, 197, 197, 22, 198, 199, 200, 201, 202, 203,
- 204, 21, 205, 110, 205, 206, 207, 22, 192, 192, 138, 28, 36, 22, 192,
- 138, 197, 208, 208, 138, 138, 138, 209, 163, 164, 192, 192, 192, 138,
- 138, 138, 138, 138, 138, 138, 138, 78, 138, 208, 138, 138, 192, 138, 138,
- 138, 138, 138, 138, 138, 187, 174, 174, 174, 174, 174, 0, 210, 211, 212,
- 213, 174, 174, 174, 174, 174, 174, 214, 51, 0, 0, 34, 214, 214, 214, 214,
- 214, 215, 215, 216, 217, 218, 219, 214, 34, 34, 34, 34, 214, 214, 214,
- 214, 214, 215, 215, 216, 217, 218, 0, 51, 51, 51, 51, 51, 51, 51, 51, 51,
- 51, 51, 51, 51, 0, 0, 0, 85, 85, 85, 85, 85, 85, 85, 85, 220, 221, 85,
- 85, 23, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, 81, 176, 176,
- 81, 81, 81, 81, 176, 176, 176, 81, 81, 82, 82, 82, 82, 81, 82, 82, 82,
- 176, 176, 81, 86, 81, 176, 176, 86, 86, 86, 86, 81, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 222, 222, 49, 223, 26, 223, 222, 49, 26, 223, 35,
- 49, 49, 49, 35, 35, 49, 49, 49, 46, 26, 49, 223, 26, 78, 49, 49, 49, 49,
- 49, 26, 26, 222, 223, 223, 26, 49, 26, 224, 26, 49, 26, 184, 224, 49, 49,
- 225, 35, 49, 49, 44, 49, 35, 156, 156, 156, 156, 35, 26, 222, 35, 35, 49,
- 49, 226, 78, 78, 78, 78, 49, 35, 35, 35, 35, 26, 78, 26, 26, 47, 80, 227,
- 227, 227, 37, 37, 227, 227, 227, 227, 227, 227, 37, 37, 37, 37, 227, 228,
- 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 229, 229, 229,
- 229, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 229, 229, 229,
- 229, 229, 229, 173, 173, 173, 44, 47, 173, 173, 173, 173, 37, 0, 0, 0, 0,
- 0, 0, 40, 40, 40, 40, 40, 30, 30, 30, 30, 30, 230, 230, 26, 26, 26, 26,
- 78, 26, 26, 78, 26, 26, 78, 26, 26, 26, 26, 26, 26, 26, 230, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 30, 30, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 26, 231, 230, 230, 26, 26, 40, 26, 40,
+ 43, 43, 38, 38, 38, 38, 38, 38, 38, 38, 43, 43, 43, 43, 43, 43, 43, 43,
+ 38, 38, 38, 38, 38, 38, 38, 38, 43, 43, 43, 43, 43, 43, 0, 0, 38, 38, 38,
+ 38, 38, 38, 0, 0, 43, 43, 43, 43, 43, 43, 43, 43, 0, 38, 0, 38, 0, 38, 0,
+ 38, 43, 43, 43, 43, 43, 43, 43, 43, 38, 38, 38, 38, 38, 38, 38, 38, 43,
+ 182, 43, 182, 43, 182, 43, 182, 43, 182, 43, 182, 43, 182, 0, 0, 43, 43,
+ 43, 43, 43, 43, 43, 43, 183, 183, 183, 183, 183, 183, 183, 183, 43, 43,
+ 43, 43, 43, 43, 43, 43, 183, 183, 183, 183, 183, 183, 183, 183, 43, 43,
+ 43, 43, 43, 43, 43, 43, 183, 183, 183, 183, 183, 183, 183, 183, 43, 43,
+ 43, 43, 43, 0, 43, 43, 38, 38, 38, 184, 183, 58, 182, 58, 58, 76, 43, 43,
+ 43, 0, 43, 43, 38, 184, 38, 184, 183, 76, 76, 76, 43, 43, 43, 182, 0, 0,
+ 43, 43, 38, 38, 38, 184, 0, 76, 76, 76, 43, 43, 43, 182, 43, 43, 43, 43,
+ 38, 38, 38, 184, 38, 76, 185, 185, 0, 0, 43, 43, 43, 0, 43, 43, 38, 184,
+ 38, 184, 183, 185, 58, 0, 186, 186, 187, 187, 187, 187, 187, 187, 187,
+ 187, 187, 174, 174, 174, 188, 189, 190, 191, 84, 190, 190, 190, 22, 192,
+ 193, 194, 195, 196, 193, 194, 195, 196, 22, 22, 22, 138, 197, 197, 197,
+ 22, 198, 199, 200, 201, 202, 203, 204, 21, 205, 110, 205, 206, 207, 22,
+ 192, 192, 138, 28, 36, 22, 192, 138, 197, 208, 208, 138, 138, 138, 209,
+ 163, 164, 192, 192, 192, 138, 138, 138, 138, 138, 138, 138, 138, 78, 138,
+ 208, 138, 138, 192, 138, 138, 138, 138, 138, 138, 138, 187, 174, 174,
+ 174, 174, 174, 0, 210, 211, 212, 213, 174, 174, 174, 174, 174, 174, 214,
+ 51, 0, 0, 34, 214, 214, 214, 214, 214, 215, 215, 216, 217, 218, 219, 214,
+ 34, 34, 34, 34, 214, 214, 214, 214, 214, 215, 215, 216, 217, 218, 0, 51,
+ 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 85, 85, 85, 85,
+ 85, 85, 85, 85, 220, 221, 85, 85, 23, 85, 85, 85, 85, 85, 85, 85, 85, 85,
+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 81, 81, 176, 176, 81, 81, 81, 81, 176, 176, 176, 81, 81,
+ 82, 82, 82, 82, 81, 82, 82, 82, 176, 176, 81, 86, 81, 176, 176, 86, 86,
+ 86, 86, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 222, 222, 49,
+ 223, 26, 223, 222, 49, 26, 223, 35, 49, 49, 49, 35, 35, 49, 49, 49, 46,
+ 26, 49, 223, 26, 78, 49, 49, 49, 49, 49, 26, 26, 222, 223, 223, 26, 49,
+ 26, 224, 26, 49, 26, 184, 224, 49, 49, 225, 35, 49, 49, 44, 49, 35, 156,
+ 156, 156, 156, 35, 26, 222, 35, 35, 49, 49, 226, 78, 78, 78, 78, 49, 35,
+ 35, 35, 35, 26, 78, 26, 26, 47, 80, 227, 227, 227, 37, 37, 227, 227, 227,
+ 227, 227, 227, 37, 37, 37, 37, 227, 228, 228, 228, 228, 228, 228, 228,
+ 228, 228, 228, 228, 228, 229, 229, 229, 229, 228, 228, 228, 228, 228,
+ 228, 228, 228, 228, 228, 229, 229, 229, 229, 229, 229, 173, 173, 173, 44,
+ 47, 173, 173, 173, 173, 37, 26, 26, 0, 0, 0, 0, 40, 40, 40, 40, 40, 30,
+ 30, 30, 30, 30, 230, 230, 26, 26, 26, 26, 78, 26, 26, 78, 26, 26, 78, 26,
+ 26, 26, 26, 26, 26, 26, 230, 26, 26, 26, 26, 26, 26, 26, 26, 26, 30, 30,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 30, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 78, 78, 78, 78, 78,
- 78, 78, 78, 78, 78, 78, 78, 40, 232, 233, 233, 234, 78, 78, 40, 233, 234,
- 232, 233, 234, 232, 78, 40, 78, 233, 235, 236, 78, 233, 232, 78, 78, 78,
- 233, 232, 232, 233, 40, 233, 233, 232, 232, 40, 234, 40, 234, 40, 40, 40,
- 40, 233, 237, 226, 233, 226, 226, 232, 232, 232, 40, 40, 40, 40, 78, 232,
- 78, 232, 233, 233, 232, 232, 232, 234, 232, 232, 234, 232, 232, 234, 233,
- 234, 232, 232, 233, 78, 78, 78, 78, 78, 233, 232, 232, 232, 78, 78, 78,
- 78, 78, 78, 78, 78, 78, 232, 238, 40, 234, 78, 233, 233, 233, 233, 232,
- 232, 233, 233, 78, 230, 238, 238, 234, 234, 232, 232, 234, 234, 232, 232,
- 234, 234, 232, 232, 232, 232, 232, 232, 234, 234, 233, 233, 234, 234,
- 233, 233, 234, 234, 232, 232, 232, 78, 78, 232, 232, 232, 232, 78, 78,
- 40, 78, 78, 232, 40, 78, 78, 78, 78, 78, 78, 78, 78, 232, 232, 78, 40,
- 232, 232, 232, 232, 232, 232, 234, 234, 234, 234, 232, 232, 232, 232,
- 232, 232, 232, 232, 232, 78, 78, 78, 78, 78, 232, 233, 78, 78, 78, 78,
- 78, 78, 78, 78, 78, 232, 232, 232, 232, 232, 78, 78, 232, 232, 78, 78,
- 78, 78, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 234, 234, 234,
- 234, 232, 232, 232, 232, 232, 232, 234, 234, 234, 234, 78, 78, 232, 232,
- 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 26,
- 26, 26, 26, 26, 26, 26, 26, 163, 164, 163, 164, 26, 26, 26, 26, 26, 26,
- 30, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 232, 232, 26, 26,
- 26, 26, 26, 26, 26, 239, 240, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 231, 230, 230, 26, 26, 40, 26, 40, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 30, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 40,
+ 232, 233, 233, 234, 78, 78, 40, 233, 234, 232, 233, 234, 232, 78, 40, 78,
+ 233, 235, 236, 78, 233, 232, 78, 78, 78, 233, 232, 232, 233, 40, 233,
+ 233, 232, 232, 40, 234, 40, 234, 40, 40, 40, 40, 233, 237, 226, 233, 226,
+ 226, 232, 232, 232, 40, 40, 40, 40, 78, 232, 78, 232, 233, 233, 232, 232,
+ 232, 234, 232, 232, 234, 232, 232, 234, 233, 234, 232, 232, 233, 78, 78,
+ 78, 78, 78, 233, 232, 232, 232, 78, 78, 78, 78, 78, 78, 78, 78, 78, 232,
+ 238, 40, 234, 78, 233, 233, 233, 233, 232, 232, 233, 233, 78, 230, 238,
+ 238, 234, 234, 232, 232, 234, 234, 232, 232, 234, 234, 232, 232, 232,
+ 232, 232, 232, 234, 234, 233, 233, 234, 234, 233, 233, 234, 234, 232,
+ 232, 232, 78, 78, 232, 232, 232, 232, 78, 78, 40, 78, 78, 232, 40, 78,
+ 78, 78, 78, 78, 78, 78, 78, 232, 232, 78, 40, 232, 232, 232, 232, 232,
+ 232, 234, 234, 234, 234, 232, 232, 232, 232, 232, 232, 232, 232, 232, 78,
+ 78, 78, 78, 78, 232, 233, 78, 78, 78, 78, 78, 78, 78, 78, 78, 232, 232,
+ 232, 232, 232, 78, 78, 232, 232, 78, 78, 78, 78, 232, 232, 232, 232, 232,
+ 232, 232, 232, 232, 232, 234, 234, 234, 234, 232, 232, 232, 232, 232,
+ 232, 234, 234, 234, 234, 78, 78, 232, 232, 232, 232, 232, 232, 232, 232,
+ 232, 232, 232, 232, 232, 232, 232, 232, 26, 26, 26, 26, 26, 26, 26, 26,
+ 163, 164, 163, 164, 26, 26, 26, 26, 26, 26, 30, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 232, 232, 26, 26, 26, 26, 26, 26, 26, 239,
+ 240, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 80, 80, 80, 80, 80, 80,
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
- 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 26, 78, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 80, 26, 26, 26, 26, 26, 78, 78, 78, 78, 78, 78, 78,
- 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78,
+ 80, 80, 80, 80, 80, 80, 80, 80, 80, 26, 78, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 80,
+ 26, 26, 26, 26, 26, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78,
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 78, 78,
+ 78, 78, 78, 78, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 0, 0, 0, 0, 0, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 78, 78, 78, 78, 78, 78, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, 37, 37, 37, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, 37, 37, 37, 37, 37, 37, 37, 37,
37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
- 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 34,
- 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
- 34, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
+ 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 241, 241,
+ 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
- 241, 241, 241, 241, 241, 241, 241, 241, 227, 242, 242, 242, 242, 242,
- 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
- 242, 242, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ 241, 241, 241, 241, 241, 241, 227, 242, 242, 242, 242, 242, 242, 242,
+ 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 30,
30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 26, 26, 26, 26, 30, 30, 30, 30, 30, 30, 30, 30,
30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 26, 26, 30, 30, 30, 30, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 30, 30, 26, 30, 30, 30, 30, 30, 30, 30, 26, 26, 26, 26, 26, 26, 26, 26,
- 30, 30, 26, 26, 30, 40, 26, 26, 26, 26, 30, 30, 26, 26, 30, 40, 26, 26,
- 26, 26, 30, 30, 30, 26, 26, 30, 26, 26, 30, 30, 30, 30, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 30, 30, 30, 30, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 30, 26, 26, 26, 26, 26, 26, 26, 26, 78, 78,
- 78, 78, 78, 78, 78, 78, 26, 26, 26, 26, 26, 30, 30, 26, 26, 30, 26, 26,
- 26, 26, 30, 30, 26, 26, 26, 26, 30, 30, 26, 26, 26, 26, 26, 26, 30, 26,
- 30, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 30, 26,
- 30, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 30, 30, 26, 30, 30, 30,
- 26, 30, 30, 30, 30, 26, 30, 30, 26, 40, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 30, 30, 30, 26, 26, 26, 26, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ 30, 30, 30, 30, 30, 30, 30, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 26,
+ 26, 30, 30, 30, 30, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 30, 30, 26,
+ 30, 30, 30, 30, 30, 30, 30, 26, 26, 26, 26, 26, 26, 26, 26, 30, 30, 26,
+ 26, 30, 40, 26, 26, 26, 26, 30, 30, 26, 26, 30, 40, 26, 26, 26, 26, 30,
+ 30, 30, 26, 26, 30, 26, 26, 30, 30, 30, 30, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 30, 30, 30, 30, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 30, 26, 26, 26, 26, 26, 26, 26, 26, 78, 78, 78, 78, 78,
+ 78, 78, 78, 26, 26, 26, 26, 26, 30, 30, 26, 26, 30, 26, 26, 26, 26, 30,
+ 30, 26, 26, 26, 26, 30, 30, 26, 26, 26, 26, 26, 26, 30, 26, 30, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 30, 30, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 80, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 30, 30,
- 26, 26, 26, 26, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 26, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 26, 30,
- 26, 26, 26, 26, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 0, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 30, 26, 30, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 30, 30, 26, 30, 30, 30, 26, 30, 30,
+ 30, 30, 26, 30, 30, 26, 40, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 30,
+ 30, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 80, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 30, 30, 26, 26, 26,
+ 26, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 26, 30, 30, 30, 30, 30, 30,
+ 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 26, 30, 26, 26, 26,
+ 26, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ 30, 30, 30, 30, 30, 30, 30, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 30, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 163, 164, 163, 164, 163, 164, 163, 164, 163, 164,
- 163, 164, 163, 164, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 30, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 30, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 163, 164, 163, 164, 163, 164, 163, 164, 163, 164, 163, 164,
+ 163, 164, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 153, 153,
153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
- 153, 153, 153, 153, 153, 153, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 153, 153, 153, 153, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 232, 78, 78,
- 232, 232, 163, 164, 78, 232, 232, 78, 232, 232, 232, 78, 78, 78, 78, 78,
- 232, 232, 232, 232, 78, 78, 78, 78, 78, 232, 232, 232, 78, 78, 78, 232,
- 232, 232, 232, 9, 10, 9, 10, 9, 10, 9, 10, 163, 164, 78, 78, 78, 78, 78,
- 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 80, 80, 80, 80, 80, 80, 80,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 232, 78, 78, 232,
+ 232, 163, 164, 78, 232, 232, 78, 232, 232, 232, 78, 78, 78, 78, 78, 232,
+ 232, 232, 232, 78, 78, 78, 78, 78, 232, 232, 232, 78, 78, 78, 232, 232,
+ 232, 232, 9, 10, 9, 10, 9, 10, 9, 10, 163, 164, 78, 78, 78, 78, 78, 78,
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 80, 80, 80, 80, 80, 80, 80, 80,
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
- 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 78, 78, 78, 78, 78,
+ 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 78, 78, 78, 78, 78, 78,
78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78,
78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78,
78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78,
78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78,
78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78,
78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78,
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 163,
+ 164, 9, 10, 163, 164, 163, 164, 163, 164, 163, 164, 163, 164, 163, 164,
+ 163, 164, 163, 164, 163, 164, 78, 78, 232, 232, 232, 232, 232, 232, 232,
+ 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 78,
+ 78, 78, 78, 78, 78, 78, 78, 232, 78, 78, 78, 78, 78, 78, 78, 232, 232,
+ 232, 232, 232, 232, 78, 78, 78, 232, 78, 78, 78, 78, 232, 232, 232, 232,
+ 232, 78, 232, 232, 78, 78, 163, 164, 163, 164, 232, 78, 78, 78, 78, 232,
+ 78, 232, 232, 232, 78, 78, 232, 232, 78, 78, 78, 78, 78, 78, 78, 78, 78,
+ 78, 232, 232, 232, 232, 232, 232, 78, 78, 163, 164, 78, 78, 78, 78, 78,
+ 78, 78, 78, 78, 78, 78, 78, 232, 232, 226, 232, 232, 232, 232, 232, 232,
+ 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 78, 232, 232, 232, 232,
+ 78, 78, 232, 78, 232, 78, 78, 232, 78, 232, 232, 232, 232, 78, 78, 78,
+ 78, 78, 232, 232, 78, 78, 78, 78, 78, 78, 232, 232, 232, 78, 78, 78, 78,
78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78,
- 163, 164, 9, 10, 163, 164, 163, 164, 163, 164, 163, 164, 163, 164, 163,
- 164, 163, 164, 163, 164, 163, 164, 78, 78, 232, 232, 232, 232, 232, 232,
+ 78, 78, 232, 232, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 232, 232,
+ 78, 78, 78, 78, 232, 232, 232, 232, 78, 232, 232, 78, 78, 232, 226, 216,
+ 216, 78, 78, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
- 232, 78, 78, 78, 78, 78, 78, 78, 78, 232, 78, 78, 78, 78, 78, 78, 78,
- 232, 232, 232, 232, 232, 232, 78, 78, 78, 232, 78, 78, 78, 78, 232, 232,
- 232, 232, 232, 78, 232, 232, 78, 78, 163, 164, 163, 164, 232, 78, 78, 78,
- 78, 232, 78, 232, 232, 232, 78, 78, 232, 232, 78, 78, 78, 78, 78, 78, 78,
- 78, 78, 78, 232, 232, 232, 232, 232, 232, 78, 78, 163, 164, 78, 78, 78,
- 78, 78, 78, 78, 78, 78, 78, 78, 78, 232, 232, 226, 232, 232, 232, 232,
- 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 78, 232, 232,
- 232, 232, 78, 78, 232, 78, 232, 78, 78, 232, 78, 232, 232, 232, 232, 78,
- 78, 78, 78, 78, 232, 232, 78, 78, 78, 78, 78, 78, 232, 232, 232, 78, 78,
- 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78,
- 78, 78, 78, 78, 232, 232, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78,
- 232, 232, 78, 78, 78, 78, 232, 232, 232, 232, 78, 232, 232, 78, 78, 232,
- 226, 216, 216, 78, 78, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
+ 232, 232, 232, 78, 78, 232, 232, 232, 232, 232, 232, 232, 232, 78, 232,
232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
- 232, 232, 232, 232, 232, 78, 78, 232, 232, 232, 232, 232, 232, 232, 232,
- 78, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
- 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 78, 78, 78,
- 78, 78, 243, 78, 232, 78, 78, 78, 232, 232, 232, 232, 232, 78, 78, 78,
- 78, 78, 232, 232, 232, 78, 78, 78, 78, 232, 78, 78, 78, 232, 232, 232,
- 232, 232, 78, 232, 78, 78, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 78, 78, 78, 78,
+ 78, 243, 78, 232, 78, 78, 78, 232, 232, 232, 232, 232, 78, 78, 78, 78,
+ 78, 232, 232, 232, 78, 78, 78, 78, 232, 78, 78, 78, 232, 232, 232, 232,
+ 232, 78, 232, 78, 78, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 78,
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78,
+ 78, 78, 26, 26, 78, 78, 78, 78, 78, 78, 26, 26, 26, 26, 26, 26, 26, 26,
+ 30, 30, 30, 30, 30, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 0, 0, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78,
- 78, 78, 78, 78, 26, 26, 78, 78, 78, 78, 78, 78, 0, 0, 0, 26, 26, 26, 26,
- 26, 30, 30, 30, 30, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 0, 0, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 0, 0, 0, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 0, 26, 26, 26, 26, 26, 26, 26, 26, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 26, 26,
+ 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
- 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 0, 47, 47,
+ 44, 44, 44, 44, 44, 44, 0, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
- 47, 47, 47, 47, 47, 47, 47, 47, 47, 0, 44, 47, 44, 44, 44, 47, 47, 44,
- 47, 44, 47, 44, 47, 44, 44, 44, 44, 47, 44, 47, 47, 44, 47, 47, 47, 47,
- 47, 47, 51, 51, 44, 44, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47,
- 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47,
- 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47,
- 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47,
- 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47,
- 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 47, 26,
- 26, 26, 26, 26, 26, 44, 47, 44, 47, 81, 81, 81, 44, 47, 0, 0, 0, 0, 0,
- 138, 138, 138, 138, 153, 138, 138, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 0, 44, 47, 44, 44, 44, 47, 47, 44, 47, 44, 47, 44, 47, 44, 44, 44, 44,
+ 47, 44, 47, 47, 44, 47, 47, 47, 47, 47, 47, 51, 51, 44, 44, 44, 47, 44,
+ 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44,
+ 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44,
+ 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44,
+ 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44,
+ 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44,
+ 47, 44, 47, 44, 47, 44, 47, 47, 26, 26, 26, 26, 26, 26, 44, 47, 44, 47,
+ 81, 81, 81, 44, 47, 0, 0, 0, 0, 0, 138, 138, 138, 138, 153, 138, 138, 47,
47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
- 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 0, 47, 0, 0, 0, 0, 0, 47, 0,
- 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 0, 47, 0, 0, 0, 0, 0, 47, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 51, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 142, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48,
- 48, 48, 48, 48, 0, 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 48, 48, 48, 48,
- 48, 0, 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 48, 48, 48, 48, 48, 0, 48,
- 48, 48, 48, 48, 48, 48, 0, 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 48, 48,
- 48, 48, 48, 0, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 51, 83,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 142, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 48, 48, 48,
+ 48, 48, 0, 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 48, 48, 48, 48, 48, 0,
+ 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 48,
+ 48, 48, 48, 48, 0, 48, 48, 48, 48, 48, 48, 48, 0, 81, 81, 81, 81, 81, 81,
81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
- 138, 138, 28, 36, 28, 36, 138, 138, 138, 28, 36, 138, 28, 36, 138, 138,
- 138, 138, 138, 138, 138, 138, 138, 84, 138, 138, 84, 138, 28, 36, 138,
- 138, 28, 36, 163, 164, 163, 164, 163, 164, 163, 164, 138, 138, 138, 138,
- 138, 52, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 84, 84, 0, 0,
+ 81, 81, 81, 81, 81, 81, 81, 81, 138, 138, 28, 36, 28, 36, 138, 138, 138,
+ 28, 36, 138, 28, 36, 138, 138, 138, 138, 138, 138, 138, 138, 138, 84,
+ 138, 138, 84, 138, 28, 36, 138, 138, 28, 36, 163, 164, 163, 164, 163,
+ 164, 163, 164, 138, 138, 138, 138, 138, 52, 138, 138, 138, 138, 138, 138,
+ 138, 138, 138, 138, 84, 84, 138, 138, 138, 138, 84, 138, 195, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 244, 244, 244, 244,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 244, 244, 244, 244, 244, 244, 244, 244, 244,
244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244,
- 244, 244, 244, 244, 244, 244, 244, 244, 0, 244, 244, 244, 244, 245, 244,
+ 244, 244, 244, 0, 244, 244, 244, 244, 245, 244, 244, 244, 244, 244, 244,
244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244,
244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244,
244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244,
244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244,
244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244,
- 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 245, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 245, 245, 245, 245, 245, 245, 245, 245, 245,
+ 244, 244, 244, 244, 244, 244, 244, 245, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245,
245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245,
245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245,
245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245,
@@ -1870,81 +1994,81 @@ static unsigned short index2[] = {
245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245,
245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245,
245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, 245,
- 245, 245, 245, 245, 245, 245, 245, 245, 245, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 244, 244, 244, 244,
- 244, 244, 244, 244, 244, 244, 244, 244, 0, 0, 0, 0, 246, 247, 247, 247,
- 244, 248, 170, 249, 250, 251, 250, 251, 250, 251, 250, 251, 250, 251,
- 244, 244, 250, 251, 250, 251, 250, 251, 250, 251, 252, 253, 254, 254,
- 244, 249, 249, 249, 249, 249, 249, 249, 249, 249, 255, 256, 257, 258,
- 259, 259, 252, 248, 248, 248, 248, 248, 245, 244, 260, 260, 260, 248,
- 170, 247, 244, 26, 0, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 245, 245, 245, 245, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244,
+ 244, 244, 0, 0, 0, 0, 246, 247, 247, 247, 244, 248, 170, 249, 250, 251,
+ 250, 251, 250, 251, 250, 251, 250, 251, 244, 244, 250, 251, 250, 251,
+ 250, 251, 250, 251, 252, 253, 254, 254, 244, 249, 249, 249, 249, 249,
+ 249, 249, 249, 249, 255, 256, 257, 258, 259, 259, 252, 248, 248, 248,
+ 248, 248, 245, 244, 260, 260, 260, 248, 170, 247, 244, 26, 0, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 261, 170, 261, 170, 261,
170, 261, 170, 261, 170, 261, 170, 261, 170, 261, 170, 261, 170, 261,
- 170, 261, 170, 261, 170, 261, 170, 261, 170, 261, 170, 170, 261, 170,
- 261, 170, 261, 170, 170, 170, 170, 170, 170, 261, 261, 170, 261, 261,
- 170, 261, 261, 170, 261, 261, 170, 261, 261, 170, 170, 170, 170, 170,
+ 170, 261, 170, 261, 170, 170, 261, 170, 261, 170, 261, 170, 170, 170,
+ 170, 170, 170, 261, 261, 170, 261, 261, 170, 261, 261, 170, 261, 261,
+ 170, 261, 261, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 261, 170, 170, 0,
+ 0, 262, 262, 263, 263, 248, 264, 265, 252, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 261, 170, 261, 170, 261, 170, 261, 170, 261,
+ 170, 261, 170, 261, 170, 261, 170, 261, 170, 261, 170, 261, 170, 261,
+ 170, 170, 261, 170, 261, 170, 261, 170, 170, 170, 170, 170, 170, 261,
+ 261, 170, 261, 261, 170, 261, 261, 170, 261, 261, 170, 261, 261, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
- 170, 170, 170, 261, 170, 170, 0, 0, 262, 262, 263, 263, 248, 264, 265,
- 252, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 261, 170,
- 261, 170, 261, 170, 261, 170, 261, 170, 261, 170, 261, 170, 261, 170,
- 261, 170, 261, 170, 261, 170, 261, 170, 170, 261, 170, 261, 170, 261,
- 170, 170, 170, 170, 170, 170, 261, 261, 170, 261, 261, 170, 261, 261,
- 170, 261, 261, 170, 261, 261, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 261, 170, 170, 261, 261, 261, 261,
+ 247, 248, 248, 264, 265, 0, 0, 0, 0, 0, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
- 261, 170, 170, 261, 261, 261, 261, 247, 248, 248, 264, 265, 0, 0, 0, 0,
- 0, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
- 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 0, 0, 0,
+ 170, 170, 170, 170, 170, 170, 170, 0, 0, 0, 265, 265, 265, 265, 265, 265,
265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265,
265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265,
265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265,
265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265,
265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265,
265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 265,
- 265, 265, 265, 265, 265, 265, 265, 265, 265, 265, 0, 266, 266, 267, 267,
- 267, 267, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 170, 170,
+ 265, 265, 265, 265, 0, 266, 266, 267, 267, 267, 267, 268, 268, 268, 268,
+ 268, 268, 268, 268, 268, 268, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
- 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 0, 0, 0, 0, 0,
+ 170, 170, 170, 170, 170, 0, 0, 0, 0, 0, 244, 244, 244, 244, 244, 244,
244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244,
244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244,
- 244, 244, 244, 244, 244, 244, 244, 244, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
- 170, 170, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
+ 244, 244, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 268, 268, 268,
+ 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
+ 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 245, 245, 0,
+ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, 268, 268, 268, 268,
268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
- 268, 268, 268, 245, 245, 0, 267, 267, 267, 267, 267, 267, 267, 267, 267,
- 267, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
+ 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 269, 269,
+ 269, 269, 269, 269, 269, 269, 245, 270, 270, 270, 270, 270, 270, 270,
+ 270, 270, 270, 270, 270, 270, 270, 270, 268, 268, 268, 268, 268, 268,
268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
- 268, 268, 268, 269, 269, 269, 269, 269, 269, 269, 269, 245, 270, 270,
- 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 268,
+ 268, 268, 268, 268, 268, 268, 268, 268, 245, 245, 245, 266, 267, 267,
+ 267, 267, 267, 267, 267, 267, 267, 267, 268, 268, 268, 268, 268, 268,
268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
- 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 245,
- 245, 245, 266, 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, 268,
268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
+ 268, 268, 268, 268, 268, 270, 270, 270, 270, 270, 270, 270, 270, 270,
+ 270, 270, 270, 270, 270, 270, 268, 268, 268, 268, 268, 268, 268, 268,
+ 268, 268, 268, 268, 245, 245, 245, 245, 268, 268, 268, 268, 268, 268,
268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
- 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 270, 270, 270, 270,
- 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, 268, 268, 268,
- 268, 268, 268, 268, 268, 268, 268, 268, 268, 245, 245, 245, 245, 268,
268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
+ 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 0, 268,
268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
- 268, 268, 268, 268, 0, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
+ 268, 268, 268, 268, 268, 268, 245, 245, 245, 245, 268, 268, 268, 268,
268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
- 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 245, 245, 245,
- 245, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
+ 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 245, 245, 268,
268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
- 268, 268, 245, 245, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
- 268, 268, 268, 268, 268, 268, 268, 245, 170, 170, 170, 170, 170, 170,
+ 268, 268, 245, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
@@ -1957,21 +2081,20 @@ static unsigned short index2[] = {
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
- 170, 170, 170, 170, 170, 170, 170, 170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26,
+ 170, 170, 170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 26, 170, 170, 170, 170, 170, 170, 170,
+ 26, 26, 26, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
- 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
- 170, 170, 170, 170, 170, 170, 170, 170, 248, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 248, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
@@ -1979,14 +2102,15 @@ static unsigned short index2[] = {
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
- 170, 170, 0, 0, 0, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 0, 0, 0, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244,
244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244,
244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244,
244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244,
- 244, 244, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 244, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 53, 53, 53, 53, 53,
- 53, 83, 83, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 53, 138, 138,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 53, 53, 53, 53, 53, 53,
+ 83, 83, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 53, 138, 138,
138, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 144,
144, 144, 144, 144, 144, 144, 144, 144, 144, 48, 48, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 47, 44, 47, 44, 47, 44, 47,
@@ -1994,77 +2118,80 @@ static unsigned short index2[] = {
44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47,
44, 47, 48, 81, 82, 82, 82, 138, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
138, 52, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47,
- 44, 47, 44, 47, 44, 47, 44, 47, 0, 0, 0, 0, 0, 0, 0, 81, 48, 48, 48, 48,
+ 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 51, 51, 81, 81, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 173, 173, 173, 173, 173,
- 173, 173, 173, 173, 173, 81, 81, 83, 83, 83, 83, 83, 83, 0, 0, 0, 0, 0,
- 0, 0, 0, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
- 54, 54, 54, 54, 54, 54, 54, 52, 52, 52, 52, 52, 52, 52, 52, 52, 54, 54,
- 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 47, 47, 44, 47,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 81, 81, 83, 83, 83, 83, 83, 83, 0, 0,
+ 0, 0, 0, 0, 0, 0, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 54, 54, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 47, 47,
44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47,
44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47,
44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47,
- 44, 47, 44, 47, 44, 47, 51, 47, 47, 47, 47, 47, 47, 47, 47, 44, 47, 44,
- 47, 44, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 52, 271, 271, 44, 47, 44,
- 47, 0, 44, 47, 44, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 47, 44,
- 47, 44, 47, 44, 47, 44, 47, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 44, 47, 44, 47, 44, 47, 44, 47, 51, 47, 47, 47, 47, 47, 47, 47, 47, 44,
+ 47, 44, 47, 44, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 52, 271, 271, 44,
+ 47, 44, 47, 48, 44, 47, 44, 47, 47, 47, 44, 47, 44, 47, 44, 47, 44, 47,
+ 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 47, 44, 44, 44, 44, 0, 0, 44,
+ 44, 44, 44, 44, 47, 44, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 51, 47, 48, 48, 48, 48,
- 48, 48, 48, 135, 48, 48, 48, 142, 48, 48, 48, 48, 135, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 139, 139, 135, 135, 139, 26, 26, 26, 26, 0, 0, 0, 0, 148, 148, 148,
- 148, 148, 148, 80, 80, 85, 225, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,
+ 48, 51, 51, 47, 48, 48, 48, 48, 48, 48, 48, 135, 48, 48, 48, 142, 48, 48,
+ 48, 48, 135, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 139, 139, 135, 135, 139, 26, 26, 26, 26,
+ 0, 0, 0, 0, 148, 148, 148, 148, 148, 148, 80, 80, 85, 225, 0, 0, 0, 0, 0,
+ 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 138,
+ 138, 138, 138, 0, 0, 0, 0, 0, 0, 0, 0, 139, 139, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 138, 138, 138, 138, 0, 0, 0, 0,
- 0, 0, 0, 0, 139, 139, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 139, 139, 139, 139, 139, 139, 139, 139,
+ 139, 139, 139, 139, 139, 139, 139, 139, 142, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 83, 83, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 0, 0, 0, 0, 0,
+ 0, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
+ 81, 48, 48, 48, 48, 48, 48, 83, 83, 83, 48, 83, 48, 0, 0, 144, 144, 144,
+ 144, 144, 144, 144, 144, 144, 144, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
- 139, 139, 142, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 83, 144, 144, 144, 144,
- 144, 144, 144, 144, 144, 144, 0, 0, 0, 0, 0, 0, 81, 81, 81, 81, 81, 81,
- 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 48, 48, 48, 48, 48, 48,
- 83, 83, 83, 48, 0, 0, 0, 0, 144, 144, 144, 144, 144, 144, 144, 144, 144,
- 144, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 135, 135, 135, 135, 135, 86,
- 86, 86, 83, 83, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 135, 135, 135, 135, 135, 135, 135,
- 135, 135, 135, 135, 139, 175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 170,
+ 48, 135, 135, 135, 135, 135, 86, 86, 86, 83, 83, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 135,
+ 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 139, 175, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 83, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
- 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 0,
- 0, 0, 135, 135, 135, 139, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 170, 170, 170, 170, 170, 170, 0, 0, 0, 135, 135, 135, 139, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 145,
- 139, 139, 135, 135, 135, 135, 139, 139, 135, 139, 139, 139, 175, 83, 83,
- 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 0, 53, 144, 144, 144, 144,
- 144, 144, 144, 144, 144, 144, 0, 0, 0, 0, 83, 83, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 145, 139, 139, 135, 135, 135, 135, 139,
+ 139, 135, 139, 139, 139, 175, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 0, 53, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 0, 0, 0,
+ 0, 83, 83, 48, 48, 48, 48, 48, 135, 53, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 48, 48, 48, 48, 48,
+ 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 135, 135, 135, 135, 135, 135, 139, 139, 135, 135,
+ 48, 48, 48, 48, 48, 48, 135, 135, 135, 135, 135, 135, 139, 139, 135, 135,
139, 139, 135, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 135, 48, 48,
48, 48, 48, 48, 48, 48, 135, 139, 0, 0, 144, 144, 144, 144, 144, 144,
144, 144, 144, 144, 0, 0, 83, 83, 83, 83, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 53, 48, 48, 48, 48, 48, 48, 80, 80, 80,
- 48, 139, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 139, 135, 139, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 81,
- 48, 81, 81, 86, 48, 48, 81, 81, 48, 48, 48, 48, 48, 81, 81, 48, 81, 48,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 48, 48, 53, 83, 83, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 139, 135,
- 135, 139, 139, 83, 83, 48, 53, 53, 139, 142, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 48, 48, 48, 48, 48, 48, 0, 0, 48, 48, 48, 48, 48, 48, 0, 0, 48, 48,
- 48, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 0,
- 48, 48, 48, 48, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 81, 48, 81, 81, 86, 48, 48, 81, 81, 48, 48, 48, 48, 48, 81, 81, 48,
+ 81, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 48, 48, 53, 83, 83, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 139, 135, 135, 139, 139, 83, 83, 48, 53, 53, 139, 142, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 0, 0, 48, 48, 48, 48, 48, 48, 0, 0,
+ 48, 48, 48, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48,
+ 48, 48, 0, 48, 48, 48, 48, 48, 48, 48, 0, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 271,
+ 51, 51, 51, 51, 47, 47, 47, 47, 47, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 47, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 139, 139, 135, 139, 139, 135, 139, 139, 83, 139,
142, 0, 0, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 0, 0, 0, 0,
@@ -2159,7 +2286,7 @@ static unsigned short index2[] = {
131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
- 131, 131, 131, 131, 131, 131, 195, 279, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 131, 131, 131, 131, 131, 131, 279, 195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
@@ -2173,12 +2300,12 @@ static unsigned short index2[] = {
0, 0, 0, 0, 0, 0, 0, 0, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
131, 131, 280, 26, 0, 0, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
71, 71, 71, 71, 281, 281, 281, 281, 281, 281, 281, 282, 283, 281, 0, 0,
- 0, 0, 0, 0, 81, 81, 81, 81, 81, 81, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 281,
- 284, 284, 285, 285, 282, 283, 282, 283, 282, 283, 282, 283, 282, 283,
- 282, 283, 282, 283, 282, 283, 247, 247, 282, 283, 281, 281, 281, 281,
- 285, 285, 285, 286, 281, 286, 0, 281, 286, 281, 281, 284, 287, 288, 287,
- 288, 287, 288, 289, 281, 281, 290, 291, 292, 292, 293, 0, 281, 294, 289,
- 281, 0, 0, 0, 0, 131, 131, 131, 118, 131, 0, 131, 131, 131, 131, 131,
+ 0, 0, 0, 0, 81, 81, 81, 81, 81, 81, 81, 86, 86, 86, 86, 86, 86, 86, 81,
+ 81, 281, 284, 284, 285, 285, 282, 283, 282, 283, 282, 283, 282, 283, 282,
+ 283, 282, 283, 282, 283, 282, 283, 247, 247, 282, 283, 281, 281, 281,
+ 281, 285, 285, 285, 286, 281, 286, 0, 281, 286, 281, 281, 284, 287, 288,
+ 287, 288, 287, 288, 289, 281, 281, 290, 291, 292, 292, 293, 0, 281, 294,
+ 289, 281, 0, 0, 0, 0, 131, 131, 131, 118, 131, 0, 131, 131, 131, 131,
131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
@@ -2188,72 +2315,79 @@ static unsigned short index2[] = {
131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
- 131, 131, 131, 131, 0, 0, 174, 0, 295, 295, 296, 297, 296, 295, 295, 298,
- 299, 295, 300, 301, 302, 301, 301, 303, 303, 303, 303, 303, 303, 303,
- 303, 303, 303, 301, 295, 304, 305, 304, 295, 295, 306, 306, 306, 306,
+ 131, 131, 131, 131, 131, 0, 0, 174, 0, 295, 295, 296, 297, 296, 295, 295,
+ 298, 299, 295, 300, 301, 302, 301, 301, 303, 303, 303, 303, 303, 303,
+ 303, 303, 303, 303, 301, 295, 304, 305, 304, 295, 295, 306, 306, 306,
306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306,
- 306, 306, 306, 306, 306, 306, 306, 306, 298, 295, 299, 307, 308, 307,
- 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309,
- 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 298, 305,
- 299, 305, 298, 299, 310, 311, 312, 310, 310, 313, 313, 313, 313, 313,
- 313, 313, 313, 313, 313, 314, 313, 313, 313, 313, 313, 313, 313, 313,
+ 306, 306, 306, 306, 306, 306, 306, 306, 306, 298, 295, 299, 307, 308,
+ 307, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309,
+ 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, 298,
+ 305, 299, 305, 298, 299, 310, 311, 312, 310, 310, 313, 313, 313, 313,
+ 313, 313, 313, 313, 313, 313, 314, 313, 313, 313, 313, 313, 313, 313,
313, 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
313, 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
- 313, 313, 313, 313, 313, 313, 313, 313, 313, 314, 314, 313, 313, 313,
+ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, 314, 314, 313, 313,
313, 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
- 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, 0,
- 0, 0, 313, 313, 313, 313, 313, 313, 0, 0, 313, 313, 313, 313, 313, 313,
- 0, 0, 313, 313, 313, 313, 313, 313, 0, 0, 313, 313, 313, 0, 0, 0, 297,
- 297, 305, 307, 315, 297, 297, 0, 316, 317, 317, 317, 317, 316, 316, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 318, 318, 318, 26, 30, 0, 0, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 48,
+ 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
+ 313, 0, 0, 0, 313, 313, 313, 313, 313, 313, 0, 0, 313, 313, 313, 313,
+ 313, 313, 0, 0, 313, 313, 313, 313, 313, 313, 0, 0, 313, 313, 313, 0, 0,
+ 0, 297, 297, 305, 307, 315, 297, 297, 0, 316, 317, 317, 317, 317, 316,
+ 316, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 318, 318, 318, 26, 30, 0, 0, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 0, 48, 48, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 0, 0,
+ 48, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 0, 48, 48, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 0, 0, 0, 0, 0, 83, 138, 83, 0, 0, 0, 0, 148, 148, 148, 148, 148, 148,
+ 48, 48, 48, 48, 0, 0, 0, 0, 0, 83, 138, 83, 0, 0, 0, 0, 148, 148, 148,
148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
- 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 0, 0, 0, 80, 80,
- 80, 80, 80, 80, 80, 80, 80, 319, 319, 319, 319, 319, 319, 319, 319, 319,
+ 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 0,
+ 0, 0, 80, 80, 80, 80, 80, 80, 80, 80, 80, 319, 319, 319, 319, 319, 319,
319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319,
319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319,
319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319,
- 319, 319, 153, 153, 153, 153, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 153, 0, 0, 0, 0, 0, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 319, 319, 319, 319, 319, 153, 153, 153, 153, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 153, 153, 26, 0, 0, 0, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 80, 80, 80, 80,
+ 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
- 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 86, 0, 0,
+ 80, 80, 80, 80, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 0, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 320, 320, 320,
+ 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320,
+ 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 0, 0, 0, 0, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 148, 148, 148, 148, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 173, 48, 48, 48, 48, 48, 48, 48, 48, 173, 0, 0,
+ 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 0, 148, 148, 148, 148, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 173, 48,
- 48, 48, 48, 48, 48, 48, 48, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 81, 81, 81, 81, 81, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 0, 83, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 0, 83, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48,
- 48, 83, 173, 173, 173, 173, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,
+ 48, 48, 83, 173, 173, 173, 173, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 0, 0, 0, 0, 0, 0, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 44, 44, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
@@ -2266,359 +2400,564 @@ static unsigned short index2[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 107, 107, 107, 107, 107, 107, 0, 0, 107, 0, 107,
+ 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 107, 107, 107, 107, 107, 107, 0, 0, 107, 0,
107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
- 107, 0, 107, 107, 0, 0, 0, 107, 0, 0, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 0, 107, 107, 0, 0, 0, 107, 0, 0, 107, 107, 107, 107, 107, 107,
107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
- 107, 107, 0, 104, 320, 320, 320, 320, 320, 320, 320, 320, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
- 107, 107, 107, 107, 107, 107, 107, 107, 107, 320, 320, 320, 320, 320,
- 320, 0, 0, 0, 138, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 0, 104, 321, 321, 321, 321, 321, 321, 321, 321, 107, 107,
+ 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 107, 107, 107, 107, 322, 322, 321, 321, 321, 321, 321,
+ 321, 321, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
- 107, 0, 0, 0, 0, 0, 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 107, 107, 107, 107, 107, 0, 0, 0, 0, 0, 0, 0, 0, 321, 321, 321, 321, 321,
+ 321, 321, 321, 321, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 107, 107, 107, 107, 107, 0, 107, 107, 0, 0, 0, 0, 0, 321,
+ 321, 321, 321, 321, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 321, 321,
+ 321, 321, 321, 321, 0, 0, 0, 138, 107, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 107, 0, 0, 0, 0, 0, 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
- 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 0,
- 0, 0, 0, 0, 0, 107, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 107, 135, 135, 135, 0, 135, 135, 0, 0, 0, 0, 0, 135, 86, 135, 81, 107,
- 107, 107, 107, 0, 107, 107, 107, 0, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 0, 0, 0, 0, 321, 321, 107, 107, 321, 321, 321, 321, 321,
+ 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 0, 0, 321, 321,
+ 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321,
+ 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321,
+ 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321,
+ 321, 321, 107, 135, 135, 135, 0, 135, 135, 0, 0, 0, 0, 0, 135, 86, 135,
+ 81, 107, 107, 107, 107, 0, 107, 107, 107, 0, 107, 107, 107, 107, 107,
107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
- 107, 107, 107, 107, 107, 107, 0, 0, 0, 0, 81, 176, 86, 0, 0, 0, 0, 142,
- 320, 320, 320, 320, 320, 320, 320, 320, 0, 0, 0, 0, 0, 0, 0, 0, 104, 104,
- 104, 104, 104, 104, 104, 104, 104, 0, 0, 0, 0, 0, 0, 0, 107, 107, 107,
+ 107, 107, 107, 107, 107, 107, 107, 107, 0, 0, 0, 0, 81, 176, 86, 0, 0, 0,
+ 0, 142, 321, 321, 321, 321, 321, 321, 321, 321, 0, 0, 0, 0, 0, 0, 0, 0,
+ 104, 104, 104, 104, 104, 104, 104, 104, 104, 0, 0, 0, 0, 0, 0, 0, 107,
107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
- 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 320, 320,
- 104, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
+ 321, 321, 104, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
- 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 0, 0, 0,
- 138, 138, 138, 138, 138, 138, 138, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 107, 321, 321, 321, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 107, 107, 107,
+ 107, 107, 107, 107, 107, 322, 107, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 107, 107, 107, 81, 86, 0, 0, 0, 0, 321, 321, 321, 321,
+ 321, 104, 104, 104, 104, 104, 104, 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 107,
107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
- 107, 0, 0, 320, 320, 320, 320, 320, 320, 320, 320, 107, 107, 107, 107,
107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
- 107, 0, 0, 0, 0, 0, 320, 320, 320, 320, 320, 320, 320, 320, 107, 107,
107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 0, 0, 0, 138, 138,
+ 138, 138, 138, 138, 138, 107, 107, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 0, 0,
+ 321, 321, 321, 321, 321, 321, 321, 321, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 0, 0, 0,
+ 0, 0, 321, 321, 321, 321, 321, 321, 321, 321, 107, 107, 107, 107, 107,
+ 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 0, 0, 0,
+ 0, 0, 0, 0, 104, 104, 104, 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 321,
+ 321, 321, 321, 321, 321, 321, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 107, 107, 107, 107,
107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
- 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323,
+ 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323,
+ 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323,
+ 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 324, 324, 324, 324, 324, 324, 324, 324, 324, 324,
+ 324, 324, 324, 324, 324, 324, 324, 324, 324, 324, 324, 324, 324, 324,
+ 324, 324, 324, 324, 324, 324, 324, 324, 324, 324, 324, 324, 324, 324,
+ 324, 324, 324, 324, 324, 324, 324, 324, 324, 324, 324, 324, 324, 0, 0, 0,
+ 0, 0, 0, 0, 321, 321, 321, 321, 321, 321, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321,
- 321, 321, 321, 321, 321, 321, 321, 0, 139, 135, 139, 48, 48, 48, 48, 48,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 325, 325, 325, 325, 325, 325,
+ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325,
+ 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 325, 0, 139, 135, 139,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 135, 135, 135, 135, 135,
- 135, 135, 135, 135, 135, 135, 135, 135, 135, 142, 83, 83, 83, 83, 83, 83,
- 83, 0, 0, 0, 0, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
- 153, 153, 153, 153, 153, 153, 153, 153, 153, 144, 144, 144, 144, 144,
- 144, 144, 144, 144, 144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 135, 135, 139, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 140, 48, 140, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 140, 48, 48, 48, 48, 139, 139, 139, 135,
- 135, 135, 135, 139, 139, 142, 141, 83, 83, 188, 83, 83, 83, 83, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 0, 0,
- 0, 0, 0, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 0, 0, 0, 0, 0,
- 0, 81, 81, 81, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 135,
+ 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 142, 83,
+ 83, 83, 83, 83, 83, 83, 0, 0, 0, 0, 153, 153, 153, 153, 153, 153, 153,
+ 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 144,
+ 144, 144, 144, 144, 144, 144, 144, 144, 144, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 142, 135, 135, 139, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 140, 48, 140, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 140, 48, 48, 48, 48,
+ 139, 139, 139, 135, 135, 135, 135, 139, 139, 142, 141, 83, 83, 188, 83,
+ 83, 83, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 149, 135, 135, 135, 135, 139, 135, 150, 150, 135, 135,
- 135, 142, 142, 0, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 83,
- 83, 83, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, 135, 139, 48, 48,
+ 48, 48, 0, 0, 0, 0, 0, 0, 0, 144, 144, 144, 144, 144, 144, 144, 144, 144,
+ 144, 0, 0, 0, 0, 0, 0, 81, 81, 81, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 149, 135, 135, 135, 135, 139, 135,
+ 150, 150, 135, 135, 135, 142, 142, 0, 144, 144, 144, 144, 144, 144, 144,
+ 144, 144, 144, 83, 83, 83, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 145, 83,
+ 83, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, 135, 139, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 139, 139, 139, 135, 135, 135,
- 135, 135, 135, 135, 135, 135, 139, 175, 48, 48, 48, 48, 83, 83, 83, 83,
- 0, 0, 0, 0, 0, 0, 0, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 0,
+ 48, 48, 48, 48, 48, 48, 139, 139, 139, 135, 135, 135, 135, 135, 135, 135,
+ 135, 135, 139, 175, 48, 48, 48, 48, 83, 83, 83, 83, 83, 145, 135, 135,
+ 83, 0, 0, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 48, 83, 48,
+ 83, 83, 83, 0, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
+ 148, 148, 148, 148, 148, 148, 148, 148, 148, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 139, 139, 139, 135, 135, 135, 139,
+ 139, 135, 175, 145, 135, 83, 83, 83, 83, 83, 83, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 0, 48, 0, 48,
+ 48, 48, 48, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 83, 0, 0, 0, 0, 0, 0, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 135,
- 139, 135, 139, 139, 135, 135, 135, 135, 135, 135, 175, 145, 0, 0, 0, 0,
- 0, 0, 0, 0, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 0, 0, 0, 0,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 135, 139, 139, 139, 135, 135,
+ 135, 135, 135, 135, 145, 142, 0, 0, 0, 0, 0, 144, 144, 144, 144, 144,
+ 144, 144, 144, 144, 144, 0, 0, 0, 0, 0, 0, 135, 135, 139, 139, 0, 48, 48,
+ 48, 48, 48, 48, 48, 48, 0, 0, 48, 48, 0, 0, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 48, 48,
+ 48, 48, 48, 48, 48, 0, 48, 48, 0, 48, 48, 48, 48, 48, 0, 0, 145, 48, 146,
+ 139, 135, 139, 139, 139, 139, 0, 0, 139, 139, 0, 0, 147, 147, 175, 0, 0,
+ 48, 0, 0, 0, 0, 0, 0, 146, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 139, 139,
+ 0, 0, 81, 81, 81, 81, 81, 81, 81, 0, 0, 0, 81, 81, 81, 81, 81, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 146, 139, 139, 135, 135, 135, 135, 135, 135, 139, 149, 147, 147, 146,
+ 147, 135, 135, 139, 142, 145, 48, 48, 83, 48, 0, 0, 0, 0, 0, 0, 0, 0,
+ 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 146, 139,
+ 139, 135, 135, 135, 135, 0, 0, 139, 139, 147, 147, 135, 135, 139, 142,
+ 145, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83,
+ 83, 83, 83, 83, 83, 83, 48, 48, 48, 48, 135, 135, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 139, 139, 139, 135,
+ 135, 135, 135, 135, 135, 135, 135, 139, 139, 135, 139, 142, 135, 83, 83,
+ 83, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 144, 144, 144, 144, 144, 144,
+ 144, 144, 144, 144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 135, 139, 135, 139, 139, 135, 135, 135, 135, 135, 135,
+ 175, 145, 0, 0, 0, 0, 0, 0, 0, 0, 144, 144, 144, 144, 144, 144, 144, 144,
+ 144, 144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 0, 135,
+ 135, 135, 139, 139, 135, 135, 135, 135, 139, 135, 135, 135, 135, 142, 0,
+ 0, 0, 0, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 148, 148, 83,
+ 83, 83, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 144, 144, 144, 144,
+ 144, 144, 144, 144, 144, 144, 148, 148, 148, 148, 148, 148, 148, 148,
+ 148, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173,
+ 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 173, 173, 173, 173, 173, 173, 173, 173,
+ 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
- 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 83, 83, 83, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 173, 173, 173, 173, 173, 0, 83, 83, 83, 83, 83, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 48, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 48, 48, 48, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 0,
+ 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 144,
+ 144, 144, 144, 144, 144, 144, 144, 144, 144, 0, 0, 0, 0, 83, 83, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 176, 176, 176, 176, 176,
+ 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 81, 81, 81, 81, 81, 81, 81, 83, 83, 83, 83, 83, 80, 80, 80, 80,
+ 53, 53, 53, 53, 83, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 144, 144, 144, 144,
+ 144, 144, 144, 144, 144, 144, 0, 148, 148, 148, 148, 148, 148, 148, 0,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
- 48, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 139, 139, 139, 139, 139,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 48, 139, 139, 139, 139, 139, 139, 139, 139, 139,
139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
- 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, 135, 135, 135, 53, 53, 53,
- 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 139, 139, 139, 139, 139, 139, 139, 139, 139, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 135, 135, 135, 135, 53, 53, 53, 53, 53, 53, 53, 53,
+ 53, 53, 53, 53, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 170, 170, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 170, 170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 80,
- 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
- 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 0, 0, 0, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0,
+ 0, 80, 135, 176, 83, 174, 174, 174, 174, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
- 80, 80, 80, 80, 80, 80, 80, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 80, 80,
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
+ 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
- 0, 0, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
+ 80, 80, 80, 80, 80, 80, 80, 80, 80, 0, 0, 80, 80, 80, 80, 80, 80, 80, 80,
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
- 322, 322, 322, 322, 322, 322, 322, 323, 323, 176, 176, 176, 80, 80, 80,
- 324, 323, 323, 323, 323, 323, 174, 174, 174, 174, 174, 174, 174, 174, 86,
- 86, 86, 86, 86, 86, 86, 86, 80, 80, 81, 81, 81, 81, 81, 86, 86, 80, 80,
+ 80, 80, 80, 80, 80, 80, 80, 80, 80, 326, 326, 326, 326, 326, 326, 326,
+ 327, 327, 176, 176, 176, 80, 80, 80, 328, 327, 327, 327, 327, 327, 174,
+ 174, 174, 174, 174, 174, 174, 174, 86, 86, 86, 86, 86, 86, 86, 86, 80,
+ 80, 81, 81, 81, 81, 81, 86, 86, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
- 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 81, 81, 81, 81, 80, 80, 80, 80,
- 80, 80, 80, 80, 80, 80, 80, 80, 80, 322, 322, 322, 322, 322, 322, 80, 80,
+ 80, 80, 81, 81, 81, 81, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
+ 80, 326, 326, 326, 326, 326, 326, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
- 80, 80, 80, 80, 80, 80, 80, 80, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 26,
+ 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 81, 81, 81, 26, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 26, 26, 26, 26, 26, 81, 81, 81, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 148, 148, 148, 148, 148, 148, 148, 148, 148,
- 148, 148, 148, 148, 148, 148, 148, 148, 148, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 35, 35, 35, 35, 35, 35, 35, 0,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 49, 0,
- 49, 49, 0, 0, 49, 0, 0, 49, 49, 0, 0, 49, 49, 49, 49, 0, 49, 49, 49, 49,
- 49, 49, 49, 49, 35, 35, 35, 35, 0, 35, 0, 35, 35, 35, 35, 35, 35, 35, 0,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 49, 49, 0, 49, 49, 49, 49, 0, 0, 49,
- 49, 49, 49, 49, 49, 49, 49, 0, 49, 49, 49, 49, 49, 49, 49, 0, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 49, 49, 0, 49, 49, 49, 49, 0, 49, 49, 49, 49, 49, 0,
- 49, 0, 0, 0, 49, 49, 49, 49, 49, 49, 49, 0, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49, 49, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 49,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
+ 148, 148, 148, 148, 148, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 49, 49, 49, 49, 49, 35, 35, 35, 35, 35, 35, 35, 0, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 49, 0, 49, 49, 0, 0, 49, 0,
+ 0, 49, 49, 0, 0, 49, 49, 49, 49, 0, 49, 49, 49, 49, 49, 49, 49, 49, 35,
+ 35, 35, 35, 0, 35, 0, 35, 35, 35, 35, 35, 35, 35, 0, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 0, 0, 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 325,
+ 35, 35, 35, 35, 49, 49, 0, 49, 49, 49, 49, 0, 0, 49, 49, 49, 49, 49, 49,
+ 49, 49, 0, 49, 49, 49, 49, 49, 49, 49, 0, 35, 35, 35, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 226, 35, 35, 35, 35, 35, 35, 49, 49, 49, 49,
+ 49, 49, 0, 49, 49, 49, 49, 0, 49, 49, 49, 49, 49, 0, 49, 0, 0, 0, 49, 49,
+ 49, 49, 49, 49, 49, 0, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 325, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 226, 35, 35, 35, 35, 35, 35,
+ 49, 49, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 325, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 226, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
35, 35, 35, 35, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 325, 35, 35, 35, 35, 35, 35,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 35, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 226, 35, 35, 35, 35, 35, 35, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 325, 35, 35,
+ 35, 35, 35, 35, 0, 0, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 329, 35, 35, 35, 35, 35,
35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 226, 35, 35, 35, 35, 35, 35, 49, 35, 0, 0, 326, 326,
- 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326,
- 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326,
- 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, 326,
- 326, 326, 326, 326, 326, 326, 131, 131, 131, 131, 0, 131, 131, 131, 131,
- 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
- 131, 131, 131, 131, 131, 131, 131, 131, 131, 0, 131, 131, 0, 131, 0, 0,
- 131, 0, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 0, 131, 131,
- 131, 131, 0, 131, 0, 131, 0, 0, 0, 0, 0, 0, 131, 0, 0, 0, 0, 131, 0, 131,
- 0, 131, 0, 131, 131, 131, 0, 131, 131, 0, 131, 0, 0, 131, 0, 131, 0, 131,
- 0, 131, 0, 131, 0, 131, 131, 0, 131, 0, 0, 131, 131, 131, 131, 0, 131,
- 131, 131, 131, 131, 131, 131, 0, 131, 131, 131, 131, 0, 131, 131, 131,
- 131, 0, 131, 0, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 0, 131,
- 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
- 131, 131, 0, 0, 0, 0, 0, 131, 131, 131, 0, 131, 131, 131, 131, 131, 0,
- 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
- 131, 131, 131, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 35, 35, 226, 35, 35, 35, 35, 35, 35, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 329, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 226, 35, 35, 35, 35, 35, 35, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 329, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 226, 35, 35, 35, 35, 35, 35, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 329, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 226, 35, 35, 35,
+ 35, 35, 35, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 329, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 226, 35, 35, 35, 35, 35, 35, 49, 35, 0, 0, 330, 330, 330, 330, 330, 330,
+ 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330,
+ 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330,
+ 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330,
+ 330, 330, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
+ 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
+ 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
+ 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
+ 135, 80, 80, 80, 80, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
+ 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
+ 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
+ 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 80, 80, 80,
+ 80, 80, 80, 80, 80, 135, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
+ 80, 80, 135, 80, 80, 83, 83, 83, 83, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 135, 135, 135, 135, 135, 0, 135, 135, 135, 135, 135, 135,
+ 135, 135, 135, 135, 135, 135, 135, 135, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 107,
+ 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
+ 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 0,
+ 0, 321, 321, 321, 321, 321, 321, 321, 321, 321, 86, 86, 86, 86, 86, 86,
+ 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131, 131, 131, 131,
+ 0, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
+ 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 0, 131,
+ 131, 0, 131, 0, 0, 131, 0, 131, 131, 131, 131, 131, 131, 131, 131, 131,
+ 131, 0, 131, 131, 131, 131, 0, 131, 0, 131, 0, 0, 0, 0, 0, 0, 131, 0, 0,
+ 0, 0, 131, 0, 131, 0, 131, 0, 131, 131, 131, 0, 131, 131, 0, 131, 0, 0,
+ 131, 0, 131, 0, 131, 0, 131, 0, 131, 0, 131, 131, 0, 131, 0, 0, 131, 131,
+ 131, 131, 0, 131, 131, 131, 131, 131, 131, 131, 0, 131, 131, 131, 131, 0,
+ 131, 131, 131, 131, 0, 131, 0, 131, 131, 131, 131, 131, 131, 131, 131,
+ 131, 131, 0, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
+ 131, 131, 131, 131, 131, 0, 0, 0, 0, 0, 131, 131, 131, 0, 131, 131, 131,
+ 131, 131, 0, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
+ 131, 131, 131, 131, 131, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 26, 0, 0, 0, 0, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 0, 0, 0, 0, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 0, 0, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 0, 0, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 0, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 34, 34, 34, 34, 34, 34, 34, 34,
- 34, 34, 0, 0, 0, 0, 0, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
+ 26, 26, 26, 26, 26, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 0, 0, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 0, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 0, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 153, 153, 0, 0, 0, 241, 241, 241,
241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
- 241, 241, 241, 241, 241, 241, 327, 0, 241, 241, 241, 241, 241, 241, 241,
+ 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 331, 0,
241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
- 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 328, 328, 328,
- 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, 328,
- 328, 328, 328, 328, 328, 328, 328, 328, 328, 222, 222, 0, 0, 0, 0, 328,
- 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, 328,
- 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, 328,
- 328, 328, 328, 241, 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
+ 241, 241, 241, 241, 332, 332, 332, 332, 332, 332, 332, 332, 332, 332,
+ 332, 332, 332, 332, 332, 332, 332, 332, 332, 332, 332, 332, 332, 332,
+ 332, 332, 222, 222, 0, 0, 0, 0, 332, 332, 332, 332, 332, 332, 332, 332,
+ 332, 332, 332, 332, 332, 332, 332, 332, 332, 332, 332, 332, 332, 332,
+ 332, 332, 332, 332, 332, 332, 332, 332, 332, 332, 241, 332, 332, 332,
+ 332, 332, 332, 332, 332, 332, 332, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
- 80, 80, 80, 80, 80, 80, 80, 80, 80, 268, 268, 268, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 80, 80, 80, 80, 80, 80, 80,
+ 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
+ 268, 268, 268, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 268, 268, 268, 268,
268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
- 268, 268, 268, 268, 0, 0, 0, 0, 0, 268, 268, 268, 268, 268, 268, 268,
- 268, 268, 0, 0, 0, 0, 0, 0, 0, 268, 268, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 0, 0, 0, 0, 0,
+ 268, 268, 268, 268, 268, 268, 268, 268, 268, 0, 0, 0, 0, 0, 0, 0, 268,
+ 268, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 26,
- 26, 26, 26, 26, 0, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 0, 0, 0, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 0,
- 26, 26, 26, 26, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 0, 26, 0, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 54, 54,
+ 54, 54, 54, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 0, 26, 26, 26, 26, 0, 0, 0, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 0,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 0, 0, 26, 26, 26, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 26, 26, 26, 26, 26, 0, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 0, 0, 0, 0, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
- 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 0, 0, 0, 26, 26, 26, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 0, 0, 0, 0, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 0, 0, 0, 0, 0, 0, 0, 0, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 0, 0, 0, 0, 0, 0, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 0, 0, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 26, 26, 26, 26, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
- 170, 170, 170, 170, 170, 170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
- 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
- 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 0, 0, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
+ 170, 170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -3146,359 +3485,355 @@ static unsigned int decomp_data[] = {
50, 49, 26085, 770, 50, 50, 26085, 770, 50, 51, 26085, 770, 50, 52,
26085, 770, 50, 53, 26085, 770, 50, 54, 26085, 770, 50, 55, 26085, 770,
50, 56, 26085, 770, 50, 57, 26085, 770, 51, 48, 26085, 770, 51, 49,
- 26085, 778, 103, 97, 108, 259, 42863, 259, 294, 259, 339, 256, 35912,
- 256, 26356, 256, 36554, 256, 36040, 256, 28369, 256, 20018, 256, 21477,
- 256, 40860, 256, 40860, 256, 22865, 256, 37329, 256, 21895, 256, 22856,
- 256, 25078, 256, 30313, 256, 32645, 256, 34367, 256, 34746, 256, 35064,
- 256, 37007, 256, 27138, 256, 27931, 256, 28889, 256, 29662, 256, 33853,
- 256, 37226, 256, 39409, 256, 20098, 256, 21365, 256, 27396, 256, 29211,
- 256, 34349, 256, 40478, 256, 23888, 256, 28651, 256, 34253, 256, 35172,
- 256, 25289, 256, 33240, 256, 34847, 256, 24266, 256, 26391, 256, 28010,
- 256, 29436, 256, 37070, 256, 20358, 256, 20919, 256, 21214, 256, 25796,
- 256, 27347, 256, 29200, 256, 30439, 256, 32769, 256, 34310, 256, 34396,
- 256, 36335, 256, 38706, 256, 39791, 256, 40442, 256, 30860, 256, 31103,
- 256, 32160, 256, 33737, 256, 37636, 256, 40575, 256, 35542, 256, 22751,
- 256, 24324, 256, 31840, 256, 32894, 256, 29282, 256, 30922, 256, 36034,
- 256, 38647, 256, 22744, 256, 23650, 256, 27155, 256, 28122, 256, 28431,
- 256, 32047, 256, 32311, 256, 38475, 256, 21202, 256, 32907, 256, 20956,
- 256, 20940, 256, 31260, 256, 32190, 256, 33777, 256, 38517, 256, 35712,
- 256, 25295, 256, 27138, 256, 35582, 256, 20025, 256, 23527, 256, 24594,
- 256, 29575, 256, 30064, 256, 21271, 256, 30971, 256, 20415, 256, 24489,
- 256, 19981, 256, 27852, 256, 25976, 256, 32034, 256, 21443, 256, 22622,
- 256, 30465, 256, 33865, 256, 35498, 256, 27578, 256, 36784, 256, 27784,
- 256, 25342, 256, 33509, 256, 25504, 256, 30053, 256, 20142, 256, 20841,
- 256, 20937, 256, 26753, 256, 31975, 256, 33391, 256, 35538, 256, 37327,
- 256, 21237, 256, 21570, 256, 22899, 256, 24300, 256, 26053, 256, 28670,
- 256, 31018, 256, 38317, 256, 39530, 256, 40599, 256, 40654, 256, 21147,
- 256, 26310, 256, 27511, 256, 36706, 256, 24180, 256, 24976, 256, 25088,
- 256, 25754, 256, 28451, 256, 29001, 256, 29833, 256, 31178, 256, 32244,
- 256, 32879, 256, 36646, 256, 34030, 256, 36899, 256, 37706, 256, 21015,
- 256, 21155, 256, 21693, 256, 28872, 256, 35010, 256, 35498, 256, 24265,
- 256, 24565, 256, 25467, 256, 27566, 256, 31806, 256, 29557, 256, 20196,
- 256, 22265, 256, 23527, 256, 23994, 256, 24604, 256, 29618, 256, 29801,
- 256, 32666, 256, 32838, 256, 37428, 256, 38646, 256, 38728, 256, 38936,
- 256, 20363, 256, 31150, 256, 37300, 256, 38584, 256, 24801, 256, 20102,
- 256, 20698, 256, 23534, 256, 23615, 256, 26009, 256, 27138, 256, 29134,
- 256, 30274, 256, 34044, 256, 36988, 256, 40845, 256, 26248, 256, 38446,
- 256, 21129, 256, 26491, 256, 26611, 256, 27969, 256, 28316, 256, 29705,
- 256, 30041, 256, 30827, 256, 32016, 256, 39006, 256, 20845, 256, 25134,
- 256, 38520, 256, 20523, 256, 23833, 256, 28138, 256, 36650, 256, 24459,
- 256, 24900, 256, 26647, 256, 29575, 256, 38534, 256, 21033, 256, 21519,
- 256, 23653, 256, 26131, 256, 26446, 256, 26792, 256, 27877, 256, 29702,
- 256, 30178, 256, 32633, 256, 35023, 256, 35041, 256, 37324, 256, 38626,
- 256, 21311, 256, 28346, 256, 21533, 256, 29136, 256, 29848, 256, 34298,
- 256, 38563, 256, 40023, 256, 40607, 256, 26519, 256, 28107, 256, 33256,
- 256, 31435, 256, 31520, 256, 31890, 256, 29376, 256, 28825, 256, 35672,
- 256, 20160, 256, 33590, 256, 21050, 256, 20999, 256, 24230, 256, 25299,
- 256, 31958, 256, 23429, 256, 27934, 256, 26292, 256, 36667, 256, 34892,
- 256, 38477, 256, 35211, 256, 24275, 256, 20800, 256, 21952, 256, 22618,
- 256, 26228, 256, 20958, 256, 29482, 256, 30410, 256, 31036, 256, 31070,
- 256, 31077, 256, 31119, 256, 38742, 256, 31934, 256, 32701, 256, 34322,
- 256, 35576, 256, 36920, 256, 37117, 256, 39151, 256, 39164, 256, 39208,
- 256, 40372, 256, 37086, 256, 38583, 256, 20398, 256, 20711, 256, 20813,
- 256, 21193, 256, 21220, 256, 21329, 256, 21917, 256, 22022, 256, 22120,
- 256, 22592, 256, 22696, 256, 23652, 256, 23662, 256, 24724, 256, 24936,
- 256, 24974, 256, 25074, 256, 25935, 256, 26082, 256, 26257, 256, 26757,
- 256, 28023, 256, 28186, 256, 28450, 256, 29038, 256, 29227, 256, 29730,
- 256, 30865, 256, 31038, 256, 31049, 256, 31048, 256, 31056, 256, 31062,
- 256, 31069, 256, 31117, 256, 31118, 256, 31296, 256, 31361, 256, 31680,
- 256, 32244, 256, 32265, 256, 32321, 256, 32626, 256, 32773, 256, 33261,
- 256, 33401, 256, 33401, 256, 33879, 256, 35088, 256, 35222, 256, 35585,
- 256, 35641, 256, 36051, 256, 36104, 256, 36790, 256, 36920, 256, 38627,
- 256, 38911, 256, 38971, 256, 24693, 256, 148206, 256, 33304, 256, 20006,
- 256, 20917, 256, 20840, 256, 20352, 256, 20805, 256, 20864, 256, 21191,
- 256, 21242, 256, 21917, 256, 21845, 256, 21913, 256, 21986, 256, 22618,
- 256, 22707, 256, 22852, 256, 22868, 256, 23138, 256, 23336, 256, 24274,
- 256, 24281, 256, 24425, 256, 24493, 256, 24792, 256, 24910, 256, 24840,
- 256, 24974, 256, 24928, 256, 25074, 256, 25140, 256, 25540, 256, 25628,
- 256, 25682, 256, 25942, 256, 26228, 256, 26391, 256, 26395, 256, 26454,
- 256, 27513, 256, 27578, 256, 27969, 256, 28379, 256, 28363, 256, 28450,
- 256, 28702, 256, 29038, 256, 30631, 256, 29237, 256, 29359, 256, 29482,
- 256, 29809, 256, 29958, 256, 30011, 256, 30237, 256, 30239, 256, 30410,
- 256, 30427, 256, 30452, 256, 30538, 256, 30528, 256, 30924, 256, 31409,
- 256, 31680, 256, 31867, 256, 32091, 256, 32244, 256, 32574, 256, 32773,
- 256, 33618, 256, 33775, 256, 34681, 256, 35137, 256, 35206, 256, 35222,
- 256, 35519, 256, 35576, 256, 35531, 256, 35585, 256, 35582, 256, 35565,
- 256, 35641, 256, 35722, 256, 36104, 256, 36664, 256, 36978, 256, 37273,
- 256, 37494, 256, 38524, 256, 38627, 256, 38742, 256, 38875, 256, 38911,
- 256, 38923, 256, 38971, 256, 39698, 256, 40860, 256, 141386, 256, 141380,
- 256, 144341, 256, 15261, 256, 16408, 256, 16441, 256, 152137, 256,
- 154832, 256, 163539, 256, 40771, 256, 40846, 514, 102, 102, 514, 102,
- 105, 514, 102, 108, 770, 102, 102, 105, 770, 102, 102, 108, 514, 383,
- 116, 514, 115, 116, 514, 1396, 1398, 514, 1396, 1381, 514, 1396, 1387,
- 514, 1406, 1398, 514, 1396, 1389, 512, 1497, 1460, 512, 1522, 1463, 262,
- 1506, 262, 1488, 262, 1491, 262, 1492, 262, 1499, 262, 1500, 262, 1501,
- 262, 1512, 262, 1514, 262, 43, 512, 1513, 1473, 512, 1513, 1474, 512,
- 64329, 1473, 512, 64329, 1474, 512, 1488, 1463, 512, 1488, 1464, 512,
- 1488, 1468, 512, 1489, 1468, 512, 1490, 1468, 512, 1491, 1468, 512, 1492,
- 1468, 512, 1493, 1468, 512, 1494, 1468, 512, 1496, 1468, 512, 1497, 1468,
- 512, 1498, 1468, 512, 1499, 1468, 512, 1500, 1468, 512, 1502, 1468, 512,
- 1504, 1468, 512, 1505, 1468, 512, 1507, 1468, 512, 1508, 1468, 512, 1510,
- 1468, 512, 1511, 1468, 512, 1512, 1468, 512, 1513, 1468, 512, 1514, 1468,
- 512, 1493, 1465, 512, 1489, 1471, 512, 1499, 1471, 512, 1508, 1471, 514,
- 1488, 1500, 267, 1649, 268, 1649, 267, 1659, 268, 1659, 269, 1659, 270,
- 1659, 267, 1662, 268, 1662, 269, 1662, 270, 1662, 267, 1664, 268, 1664,
- 269, 1664, 270, 1664, 267, 1658, 268, 1658, 269, 1658, 270, 1658, 267,
- 1663, 268, 1663, 269, 1663, 270, 1663, 267, 1657, 268, 1657, 269, 1657,
- 270, 1657, 267, 1700, 268, 1700, 269, 1700, 270, 1700, 267, 1702, 268,
- 1702, 269, 1702, 270, 1702, 267, 1668, 268, 1668, 269, 1668, 270, 1668,
- 267, 1667, 268, 1667, 269, 1667, 270, 1667, 267, 1670, 268, 1670, 269,
- 1670, 270, 1670, 267, 1671, 268, 1671, 269, 1671, 270, 1671, 267, 1677,
- 268, 1677, 267, 1676, 268, 1676, 267, 1678, 268, 1678, 267, 1672, 268,
- 1672, 267, 1688, 268, 1688, 267, 1681, 268, 1681, 267, 1705, 268, 1705,
- 269, 1705, 270, 1705, 267, 1711, 268, 1711, 269, 1711, 270, 1711, 267,
- 1715, 268, 1715, 269, 1715, 270, 1715, 267, 1713, 268, 1713, 269, 1713,
- 270, 1713, 267, 1722, 268, 1722, 267, 1723, 268, 1723, 269, 1723, 270,
- 1723, 267, 1728, 268, 1728, 267, 1729, 268, 1729, 269, 1729, 270, 1729,
- 267, 1726, 268, 1726, 269, 1726, 270, 1726, 267, 1746, 268, 1746, 267,
- 1747, 268, 1747, 267, 1709, 268, 1709, 269, 1709, 270, 1709, 267, 1735,
- 268, 1735, 267, 1734, 268, 1734, 267, 1736, 268, 1736, 267, 1655, 267,
- 1739, 268, 1739, 267, 1733, 268, 1733, 267, 1737, 268, 1737, 267, 1744,
- 268, 1744, 269, 1744, 270, 1744, 269, 1609, 270, 1609, 523, 1574, 1575,
- 524, 1574, 1575, 523, 1574, 1749, 524, 1574, 1749, 523, 1574, 1608, 524,
- 1574, 1608, 523, 1574, 1735, 524, 1574, 1735, 523, 1574, 1734, 524, 1574,
- 1734, 523, 1574, 1736, 524, 1574, 1736, 523, 1574, 1744, 524, 1574, 1744,
- 525, 1574, 1744, 523, 1574, 1609, 524, 1574, 1609, 525, 1574, 1609, 267,
- 1740, 268, 1740, 269, 1740, 270, 1740, 523, 1574, 1580, 523, 1574, 1581,
- 523, 1574, 1605, 523, 1574, 1609, 523, 1574, 1610, 523, 1576, 1580, 523,
- 1576, 1581, 523, 1576, 1582, 523, 1576, 1605, 523, 1576, 1609, 523, 1576,
- 1610, 523, 1578, 1580, 523, 1578, 1581, 523, 1578, 1582, 523, 1578, 1605,
- 523, 1578, 1609, 523, 1578, 1610, 523, 1579, 1580, 523, 1579, 1605, 523,
- 1579, 1609, 523, 1579, 1610, 523, 1580, 1581, 523, 1580, 1605, 523, 1581,
- 1580, 523, 1581, 1605, 523, 1582, 1580, 523, 1582, 1581, 523, 1582, 1605,
- 523, 1587, 1580, 523, 1587, 1581, 523, 1587, 1582, 523, 1587, 1605, 523,
- 1589, 1581, 523, 1589, 1605, 523, 1590, 1580, 523, 1590, 1581, 523, 1590,
- 1582, 523, 1590, 1605, 523, 1591, 1581, 523, 1591, 1605, 523, 1592, 1605,
- 523, 1593, 1580, 523, 1593, 1605, 523, 1594, 1580, 523, 1594, 1605, 523,
- 1601, 1580, 523, 1601, 1581, 523, 1601, 1582, 523, 1601, 1605, 523, 1601,
- 1609, 523, 1601, 1610, 523, 1602, 1581, 523, 1602, 1605, 523, 1602, 1609,
- 523, 1602, 1610, 523, 1603, 1575, 523, 1603, 1580, 523, 1603, 1581, 523,
- 1603, 1582, 523, 1603, 1604, 523, 1603, 1605, 523, 1603, 1609, 523, 1603,
- 1610, 523, 1604, 1580, 523, 1604, 1581, 523, 1604, 1582, 523, 1604, 1605,
- 523, 1604, 1609, 523, 1604, 1610, 523, 1605, 1580, 523, 1605, 1581, 523,
- 1605, 1582, 523, 1605, 1605, 523, 1605, 1609, 523, 1605, 1610, 523, 1606,
- 1580, 523, 1606, 1581, 523, 1606, 1582, 523, 1606, 1605, 523, 1606, 1609,
- 523, 1606, 1610, 523, 1607, 1580, 523, 1607, 1605, 523, 1607, 1609, 523,
- 1607, 1610, 523, 1610, 1580, 523, 1610, 1581, 523, 1610, 1582, 523, 1610,
- 1605, 523, 1610, 1609, 523, 1610, 1610, 523, 1584, 1648, 523, 1585, 1648,
- 523, 1609, 1648, 779, 32, 1612, 1617, 779, 32, 1613, 1617, 779, 32, 1614,
- 1617, 779, 32, 1615, 1617, 779, 32, 1616, 1617, 779, 32, 1617, 1648, 524,
- 1574, 1585, 524, 1574, 1586, 524, 1574, 1605, 524, 1574, 1606, 524, 1574,
- 1609, 524, 1574, 1610, 524, 1576, 1585, 524, 1576, 1586, 524, 1576, 1605,
- 524, 1576, 1606, 524, 1576, 1609, 524, 1576, 1610, 524, 1578, 1585, 524,
- 1578, 1586, 524, 1578, 1605, 524, 1578, 1606, 524, 1578, 1609, 524, 1578,
- 1610, 524, 1579, 1585, 524, 1579, 1586, 524, 1579, 1605, 524, 1579, 1606,
- 524, 1579, 1609, 524, 1579, 1610, 524, 1601, 1609, 524, 1601, 1610, 524,
- 1602, 1609, 524, 1602, 1610, 524, 1603, 1575, 524, 1603, 1604, 524, 1603,
- 1605, 524, 1603, 1609, 524, 1603, 1610, 524, 1604, 1605, 524, 1604, 1609,
- 524, 1604, 1610, 524, 1605, 1575, 524, 1605, 1605, 524, 1606, 1585, 524,
- 1606, 1586, 524, 1606, 1605, 524, 1606, 1606, 524, 1606, 1609, 524, 1606,
- 1610, 524, 1609, 1648, 524, 1610, 1585, 524, 1610, 1586, 524, 1610, 1605,
- 524, 1610, 1606, 524, 1610, 1609, 524, 1610, 1610, 525, 1574, 1580, 525,
- 1574, 1581, 525, 1574, 1582, 525, 1574, 1605, 525, 1574, 1607, 525, 1576,
- 1580, 525, 1576, 1581, 525, 1576, 1582, 525, 1576, 1605, 525, 1576, 1607,
- 525, 1578, 1580, 525, 1578, 1581, 525, 1578, 1582, 525, 1578, 1605, 525,
- 1578, 1607, 525, 1579, 1605, 525, 1580, 1581, 525, 1580, 1605, 525, 1581,
- 1580, 525, 1581, 1605, 525, 1582, 1580, 525, 1582, 1605, 525, 1587, 1580,
- 525, 1587, 1581, 525, 1587, 1582, 525, 1587, 1605, 525, 1589, 1581, 525,
- 1589, 1582, 525, 1589, 1605, 525, 1590, 1580, 525, 1590, 1581, 525, 1590,
- 1582, 525, 1590, 1605, 525, 1591, 1581, 525, 1592, 1605, 525, 1593, 1580,
- 525, 1593, 1605, 525, 1594, 1580, 525, 1594, 1605, 525, 1601, 1580, 525,
- 1601, 1581, 525, 1601, 1582, 525, 1601, 1605, 525, 1602, 1581, 525, 1602,
- 1605, 525, 1603, 1580, 525, 1603, 1581, 525, 1603, 1582, 525, 1603, 1604,
- 525, 1603, 1605, 525, 1604, 1580, 525, 1604, 1581, 525, 1604, 1582, 525,
- 1604, 1605, 525, 1604, 1607, 525, 1605, 1580, 525, 1605, 1581, 525, 1605,
- 1582, 525, 1605, 1605, 525, 1606, 1580, 525, 1606, 1581, 525, 1606, 1582,
- 525, 1606, 1605, 525, 1606, 1607, 525, 1607, 1580, 525, 1607, 1605, 525,
- 1607, 1648, 525, 1610, 1580, 525, 1610, 1581, 525, 1610, 1582, 525, 1610,
- 1605, 525, 1610, 1607, 526, 1574, 1605, 526, 1574, 1607, 526, 1576, 1605,
- 526, 1576, 1607, 526, 1578, 1605, 526, 1578, 1607, 526, 1579, 1605, 526,
- 1579, 1607, 526, 1587, 1605, 526, 1587, 1607, 526, 1588, 1605, 526, 1588,
- 1607, 526, 1603, 1604, 526, 1603, 1605, 526, 1604, 1605, 526, 1606, 1605,
- 526, 1606, 1607, 526, 1610, 1605, 526, 1610, 1607, 782, 1600, 1614, 1617,
- 782, 1600, 1615, 1617, 782, 1600, 1616, 1617, 523, 1591, 1609, 523, 1591,
- 1610, 523, 1593, 1609, 523, 1593, 1610, 523, 1594, 1609, 523, 1594, 1610,
- 523, 1587, 1609, 523, 1587, 1610, 523, 1588, 1609, 523, 1588, 1610, 523,
- 1581, 1609, 523, 1581, 1610, 523, 1580, 1609, 523, 1580, 1610, 523, 1582,
- 1609, 523, 1582, 1610, 523, 1589, 1609, 523, 1589, 1610, 523, 1590, 1609,
- 523, 1590, 1610, 523, 1588, 1580, 523, 1588, 1581, 523, 1588, 1582, 523,
- 1588, 1605, 523, 1588, 1585, 523, 1587, 1585, 523, 1589, 1585, 523, 1590,
- 1585, 524, 1591, 1609, 524, 1591, 1610, 524, 1593, 1609, 524, 1593, 1610,
- 524, 1594, 1609, 524, 1594, 1610, 524, 1587, 1609, 524, 1587, 1610, 524,
- 1588, 1609, 524, 1588, 1610, 524, 1581, 1609, 524, 1581, 1610, 524, 1580,
- 1609, 524, 1580, 1610, 524, 1582, 1609, 524, 1582, 1610, 524, 1589, 1609,
- 524, 1589, 1610, 524, 1590, 1609, 524, 1590, 1610, 524, 1588, 1580, 524,
- 1588, 1581, 524, 1588, 1582, 524, 1588, 1605, 524, 1588, 1585, 524, 1587,
- 1585, 524, 1589, 1585, 524, 1590, 1585, 525, 1588, 1580, 525, 1588, 1581,
- 525, 1588, 1582, 525, 1588, 1605, 525, 1587, 1607, 525, 1588, 1607, 525,
- 1591, 1605, 526, 1587, 1580, 526, 1587, 1581, 526, 1587, 1582, 526, 1588,
- 1580, 526, 1588, 1581, 526, 1588, 1582, 526, 1591, 1605, 526, 1592, 1605,
- 524, 1575, 1611, 523, 1575, 1611, 781, 1578, 1580, 1605, 780, 1578, 1581,
- 1580, 781, 1578, 1581, 1580, 781, 1578, 1581, 1605, 781, 1578, 1582,
- 1605, 781, 1578, 1605, 1580, 781, 1578, 1605, 1581, 781, 1578, 1605,
- 1582, 780, 1580, 1605, 1581, 781, 1580, 1605, 1581, 780, 1581, 1605,
- 1610, 780, 1581, 1605, 1609, 781, 1587, 1581, 1580, 781, 1587, 1580,
- 1581, 780, 1587, 1580, 1609, 780, 1587, 1605, 1581, 781, 1587, 1605,
- 1581, 781, 1587, 1605, 1580, 780, 1587, 1605, 1605, 781, 1587, 1605,
- 1605, 780, 1589, 1581, 1581, 781, 1589, 1581, 1581, 780, 1589, 1605,
- 1605, 780, 1588, 1581, 1605, 781, 1588, 1581, 1605, 780, 1588, 1580,
- 1610, 780, 1588, 1605, 1582, 781, 1588, 1605, 1582, 780, 1588, 1605,
- 1605, 781, 1588, 1605, 1605, 780, 1590, 1581, 1609, 780, 1590, 1582,
- 1605, 781, 1590, 1582, 1605, 780, 1591, 1605, 1581, 781, 1591, 1605,
- 1581, 781, 1591, 1605, 1605, 780, 1591, 1605, 1610, 780, 1593, 1580,
- 1605, 780, 1593, 1605, 1605, 781, 1593, 1605, 1605, 780, 1593, 1605,
- 1609, 780, 1594, 1605, 1605, 780, 1594, 1605, 1610, 780, 1594, 1605,
- 1609, 780, 1601, 1582, 1605, 781, 1601, 1582, 1605, 780, 1602, 1605,
- 1581, 780, 1602, 1605, 1605, 780, 1604, 1581, 1605, 780, 1604, 1581,
- 1610, 780, 1604, 1581, 1609, 781, 1604, 1580, 1580, 780, 1604, 1580,
- 1580, 780, 1604, 1582, 1605, 781, 1604, 1582, 1605, 780, 1604, 1605,
- 1581, 781, 1604, 1605, 1581, 781, 1605, 1581, 1580, 781, 1605, 1581,
- 1605, 780, 1605, 1581, 1610, 781, 1605, 1580, 1581, 781, 1605, 1580,
- 1605, 781, 1605, 1582, 1580, 781, 1605, 1582, 1605, 781, 1605, 1580,
- 1582, 781, 1607, 1605, 1580, 781, 1607, 1605, 1605, 781, 1606, 1581,
- 1605, 780, 1606, 1581, 1609, 780, 1606, 1580, 1605, 781, 1606, 1580,
- 1605, 780, 1606, 1580, 1609, 780, 1606, 1605, 1610, 780, 1606, 1605,
- 1609, 780, 1610, 1605, 1605, 781, 1610, 1605, 1605, 780, 1576, 1582,
- 1610, 780, 1578, 1580, 1610, 780, 1578, 1580, 1609, 780, 1578, 1582,
- 1610, 780, 1578, 1582, 1609, 780, 1578, 1605, 1610, 780, 1578, 1605,
- 1609, 780, 1580, 1605, 1610, 780, 1580, 1581, 1609, 780, 1580, 1605,
- 1609, 780, 1587, 1582, 1609, 780, 1589, 1581, 1610, 780, 1588, 1581,
- 1610, 780, 1590, 1581, 1610, 780, 1604, 1580, 1610, 780, 1604, 1605,
- 1610, 780, 1610, 1581, 1610, 780, 1610, 1580, 1610, 780, 1610, 1605,
- 1610, 780, 1605, 1605, 1610, 780, 1602, 1605, 1610, 780, 1606, 1581,
- 1610, 781, 1602, 1605, 1581, 781, 1604, 1581, 1605, 780, 1593, 1605,
- 1610, 780, 1603, 1605, 1610, 781, 1606, 1580, 1581, 780, 1605, 1582,
- 1610, 781, 1604, 1580, 1605, 780, 1603, 1605, 1605, 780, 1604, 1580,
- 1605, 780, 1606, 1580, 1581, 780, 1580, 1581, 1610, 780, 1581, 1580,
- 1610, 780, 1605, 1580, 1610, 780, 1601, 1605, 1610, 780, 1576, 1581,
- 1610, 781, 1603, 1605, 1605, 781, 1593, 1580, 1605, 781, 1589, 1605,
- 1605, 780, 1587, 1582, 1610, 780, 1606, 1580, 1610, 779, 1589, 1604,
- 1746, 779, 1602, 1604, 1746, 1035, 1575, 1604, 1604, 1607, 1035, 1575,
- 1603, 1576, 1585, 1035, 1605, 1581, 1605, 1583, 1035, 1589, 1604, 1593,
- 1605, 1035, 1585, 1587, 1608, 1604, 1035, 1593, 1604, 1610, 1607, 1035,
- 1608, 1587, 1604, 1605, 779, 1589, 1604, 1609, 4619, 1589, 1604, 1609,
- 32, 1575, 1604, 1604, 1607, 32, 1593, 1604, 1610, 1607, 32, 1608, 1587,
- 1604, 1605, 2059, 1580, 1604, 32, 1580, 1604, 1575, 1604, 1607, 1035,
- 1585, 1740, 1575, 1604, 265, 44, 265, 12289, 265, 12290, 265, 58, 265,
- 59, 265, 33, 265, 63, 265, 12310, 265, 12311, 265, 8230, 265, 8229, 265,
- 8212, 265, 8211, 265, 95, 265, 95, 265, 40, 265, 41, 265, 123, 265, 125,
- 265, 12308, 265, 12309, 265, 12304, 265, 12305, 265, 12298, 265, 12299,
- 265, 12296, 265, 12297, 265, 12300, 265, 12301, 265, 12302, 265, 12303,
- 265, 91, 265, 93, 258, 8254, 258, 8254, 258, 8254, 258, 8254, 258, 95,
- 258, 95, 258, 95, 271, 44, 271, 12289, 271, 46, 271, 59, 271, 58, 271,
- 63, 271, 33, 271, 8212, 271, 40, 271, 41, 271, 123, 271, 125, 271, 12308,
- 271, 12309, 271, 35, 271, 38, 271, 42, 271, 43, 271, 45, 271, 60, 271,
- 62, 271, 61, 271, 92, 271, 36, 271, 37, 271, 64, 523, 32, 1611, 526,
- 1600, 1611, 523, 32, 1612, 523, 32, 1613, 523, 32, 1614, 526, 1600, 1614,
- 523, 32, 1615, 526, 1600, 1615, 523, 32, 1616, 526, 1600, 1616, 523, 32,
- 1617, 526, 1600, 1617, 523, 32, 1618, 526, 1600, 1618, 267, 1569, 267,
- 1570, 268, 1570, 267, 1571, 268, 1571, 267, 1572, 268, 1572, 267, 1573,
- 268, 1573, 267, 1574, 268, 1574, 269, 1574, 270, 1574, 267, 1575, 268,
- 1575, 267, 1576, 268, 1576, 269, 1576, 270, 1576, 267, 1577, 268, 1577,
- 267, 1578, 268, 1578, 269, 1578, 270, 1578, 267, 1579, 268, 1579, 269,
- 1579, 270, 1579, 267, 1580, 268, 1580, 269, 1580, 270, 1580, 267, 1581,
- 268, 1581, 269, 1581, 270, 1581, 267, 1582, 268, 1582, 269, 1582, 270,
- 1582, 267, 1583, 268, 1583, 267, 1584, 268, 1584, 267, 1585, 268, 1585,
- 267, 1586, 268, 1586, 267, 1587, 268, 1587, 269, 1587, 270, 1587, 267,
- 1588, 268, 1588, 269, 1588, 270, 1588, 267, 1589, 268, 1589, 269, 1589,
- 270, 1589, 267, 1590, 268, 1590, 269, 1590, 270, 1590, 267, 1591, 268,
- 1591, 269, 1591, 270, 1591, 267, 1592, 268, 1592, 269, 1592, 270, 1592,
- 267, 1593, 268, 1593, 269, 1593, 270, 1593, 267, 1594, 268, 1594, 269,
- 1594, 270, 1594, 267, 1601, 268, 1601, 269, 1601, 270, 1601, 267, 1602,
- 268, 1602, 269, 1602, 270, 1602, 267, 1603, 268, 1603, 269, 1603, 270,
- 1603, 267, 1604, 268, 1604, 269, 1604, 270, 1604, 267, 1605, 268, 1605,
- 269, 1605, 270, 1605, 267, 1606, 268, 1606, 269, 1606, 270, 1606, 267,
- 1607, 268, 1607, 269, 1607, 270, 1607, 267, 1608, 268, 1608, 267, 1609,
- 268, 1609, 267, 1610, 268, 1610, 269, 1610, 270, 1610, 523, 1604, 1570,
- 524, 1604, 1570, 523, 1604, 1571, 524, 1604, 1571, 523, 1604, 1573, 524,
- 1604, 1573, 523, 1604, 1575, 524, 1604, 1575, 264, 33, 264, 34, 264, 35,
- 264, 36, 264, 37, 264, 38, 264, 39, 264, 40, 264, 41, 264, 42, 264, 43,
- 264, 44, 264, 45, 264, 46, 264, 47, 264, 48, 264, 49, 264, 50, 264, 51,
- 264, 52, 264, 53, 264, 54, 264, 55, 264, 56, 264, 57, 264, 58, 264, 59,
- 264, 60, 264, 61, 264, 62, 264, 63, 264, 64, 264, 65, 264, 66, 264, 67,
- 264, 68, 264, 69, 264, 70, 264, 71, 264, 72, 264, 73, 264, 74, 264, 75,
- 264, 76, 264, 77, 264, 78, 264, 79, 264, 80, 264, 81, 264, 82, 264, 83,
- 264, 84, 264, 85, 264, 86, 264, 87, 264, 88, 264, 89, 264, 90, 264, 91,
- 264, 92, 264, 93, 264, 94, 264, 95, 264, 96, 264, 97, 264, 98, 264, 99,
- 264, 100, 264, 101, 264, 102, 264, 103, 264, 104, 264, 105, 264, 106,
- 264, 107, 264, 108, 264, 109, 264, 110, 264, 111, 264, 112, 264, 113,
- 264, 114, 264, 115, 264, 116, 264, 117, 264, 118, 264, 119, 264, 120,
- 264, 121, 264, 122, 264, 123, 264, 124, 264, 125, 264, 126, 264, 10629,
- 264, 10630, 272, 12290, 272, 12300, 272, 12301, 272, 12289, 272, 12539,
- 272, 12530, 272, 12449, 272, 12451, 272, 12453, 272, 12455, 272, 12457,
- 272, 12515, 272, 12517, 272, 12519, 272, 12483, 272, 12540, 272, 12450,
- 272, 12452, 272, 12454, 272, 12456, 272, 12458, 272, 12459, 272, 12461,
- 272, 12463, 272, 12465, 272, 12467, 272, 12469, 272, 12471, 272, 12473,
- 272, 12475, 272, 12477, 272, 12479, 272, 12481, 272, 12484, 272, 12486,
- 272, 12488, 272, 12490, 272, 12491, 272, 12492, 272, 12493, 272, 12494,
- 272, 12495, 272, 12498, 272, 12501, 272, 12504, 272, 12507, 272, 12510,
- 272, 12511, 272, 12512, 272, 12513, 272, 12514, 272, 12516, 272, 12518,
- 272, 12520, 272, 12521, 272, 12522, 272, 12523, 272, 12524, 272, 12525,
- 272, 12527, 272, 12531, 272, 12441, 272, 12442, 272, 12644, 272, 12593,
- 272, 12594, 272, 12595, 272, 12596, 272, 12597, 272, 12598, 272, 12599,
- 272, 12600, 272, 12601, 272, 12602, 272, 12603, 272, 12604, 272, 12605,
- 272, 12606, 272, 12607, 272, 12608, 272, 12609, 272, 12610, 272, 12611,
- 272, 12612, 272, 12613, 272, 12614, 272, 12615, 272, 12616, 272, 12617,
- 272, 12618, 272, 12619, 272, 12620, 272, 12621, 272, 12622, 272, 12623,
- 272, 12624, 272, 12625, 272, 12626, 272, 12627, 272, 12628, 272, 12629,
- 272, 12630, 272, 12631, 272, 12632, 272, 12633, 272, 12634, 272, 12635,
- 272, 12636, 272, 12637, 272, 12638, 272, 12639, 272, 12640, 272, 12641,
- 272, 12642, 272, 12643, 264, 162, 264, 163, 264, 172, 264, 175, 264, 166,
- 264, 165, 264, 8361, 272, 9474, 272, 8592, 272, 8593, 272, 8594, 272,
- 8595, 272, 9632, 272, 9675, 512, 69785, 69818, 512, 69787, 69818, 512,
- 69797, 69818, 512, 69937, 69927, 512, 69938, 69927, 512, 119127, 119141,
- 512, 119128, 119141, 512, 119135, 119150, 512, 119135, 119151, 512,
- 119135, 119152, 512, 119135, 119153, 512, 119135, 119154, 512, 119225,
- 119141, 512, 119226, 119141, 512, 119227, 119150, 512, 119228, 119150,
- 512, 119227, 119151, 512, 119228, 119151, 262, 65, 262, 66, 262, 67, 262,
- 68, 262, 69, 262, 70, 262, 71, 262, 72, 262, 73, 262, 74, 262, 75, 262,
- 76, 262, 77, 262, 78, 262, 79, 262, 80, 262, 81, 262, 82, 262, 83, 262,
- 84, 262, 85, 262, 86, 262, 87, 262, 88, 262, 89, 262, 90, 262, 97, 262,
- 98, 262, 99, 262, 100, 262, 101, 262, 102, 262, 103, 262, 104, 262, 105,
- 262, 106, 262, 107, 262, 108, 262, 109, 262, 110, 262, 111, 262, 112,
- 262, 113, 262, 114, 262, 115, 262, 116, 262, 117, 262, 118, 262, 119,
- 262, 120, 262, 121, 262, 122, 262, 65, 262, 66, 262, 67, 262, 68, 262,
- 69, 262, 70, 262, 71, 262, 72, 262, 73, 262, 74, 262, 75, 262, 76, 262,
- 77, 262, 78, 262, 79, 262, 80, 262, 81, 262, 82, 262, 83, 262, 84, 262,
- 85, 262, 86, 262, 87, 262, 88, 262, 89, 262, 90, 262, 97, 262, 98, 262,
- 99, 262, 100, 262, 101, 262, 102, 262, 103, 262, 105, 262, 106, 262, 107,
- 262, 108, 262, 109, 262, 110, 262, 111, 262, 112, 262, 113, 262, 114,
- 262, 115, 262, 116, 262, 117, 262, 118, 262, 119, 262, 120, 262, 121,
- 262, 122, 262, 65, 262, 66, 262, 67, 262, 68, 262, 69, 262, 70, 262, 71,
- 262, 72, 262, 73, 262, 74, 262, 75, 262, 76, 262, 77, 262, 78, 262, 79,
- 262, 80, 262, 81, 262, 82, 262, 83, 262, 84, 262, 85, 262, 86, 262, 87,
- 262, 88, 262, 89, 262, 90, 262, 97, 262, 98, 262, 99, 262, 100, 262, 101,
- 262, 102, 262, 103, 262, 104, 262, 105, 262, 106, 262, 107, 262, 108,
+ 26085, 778, 103, 97, 108, 259, 1098, 259, 1100, 259, 42863, 259, 294,
+ 259, 339, 259, 42791, 259, 43831, 259, 619, 259, 43858, 256, 35912, 256,
+ 26356, 256, 36554, 256, 36040, 256, 28369, 256, 20018, 256, 21477, 256,
+ 40860, 256, 40860, 256, 22865, 256, 37329, 256, 21895, 256, 22856, 256,
+ 25078, 256, 30313, 256, 32645, 256, 34367, 256, 34746, 256, 35064, 256,
+ 37007, 256, 27138, 256, 27931, 256, 28889, 256, 29662, 256, 33853, 256,
+ 37226, 256, 39409, 256, 20098, 256, 21365, 256, 27396, 256, 29211, 256,
+ 34349, 256, 40478, 256, 23888, 256, 28651, 256, 34253, 256, 35172, 256,
+ 25289, 256, 33240, 256, 34847, 256, 24266, 256, 26391, 256, 28010, 256,
+ 29436, 256, 37070, 256, 20358, 256, 20919, 256, 21214, 256, 25796, 256,
+ 27347, 256, 29200, 256, 30439, 256, 32769, 256, 34310, 256, 34396, 256,
+ 36335, 256, 38706, 256, 39791, 256, 40442, 256, 30860, 256, 31103, 256,
+ 32160, 256, 33737, 256, 37636, 256, 40575, 256, 35542, 256, 22751, 256,
+ 24324, 256, 31840, 256, 32894, 256, 29282, 256, 30922, 256, 36034, 256,
+ 38647, 256, 22744, 256, 23650, 256, 27155, 256, 28122, 256, 28431, 256,
+ 32047, 256, 32311, 256, 38475, 256, 21202, 256, 32907, 256, 20956, 256,
+ 20940, 256, 31260, 256, 32190, 256, 33777, 256, 38517, 256, 35712, 256,
+ 25295, 256, 27138, 256, 35582, 256, 20025, 256, 23527, 256, 24594, 256,
+ 29575, 256, 30064, 256, 21271, 256, 30971, 256, 20415, 256, 24489, 256,
+ 19981, 256, 27852, 256, 25976, 256, 32034, 256, 21443, 256, 22622, 256,
+ 30465, 256, 33865, 256, 35498, 256, 27578, 256, 36784, 256, 27784, 256,
+ 25342, 256, 33509, 256, 25504, 256, 30053, 256, 20142, 256, 20841, 256,
+ 20937, 256, 26753, 256, 31975, 256, 33391, 256, 35538, 256, 37327, 256,
+ 21237, 256, 21570, 256, 22899, 256, 24300, 256, 26053, 256, 28670, 256,
+ 31018, 256, 38317, 256, 39530, 256, 40599, 256, 40654, 256, 21147, 256,
+ 26310, 256, 27511, 256, 36706, 256, 24180, 256, 24976, 256, 25088, 256,
+ 25754, 256, 28451, 256, 29001, 256, 29833, 256, 31178, 256, 32244, 256,
+ 32879, 256, 36646, 256, 34030, 256, 36899, 256, 37706, 256, 21015, 256,
+ 21155, 256, 21693, 256, 28872, 256, 35010, 256, 35498, 256, 24265, 256,
+ 24565, 256, 25467, 256, 27566, 256, 31806, 256, 29557, 256, 20196, 256,
+ 22265, 256, 23527, 256, 23994, 256, 24604, 256, 29618, 256, 29801, 256,
+ 32666, 256, 32838, 256, 37428, 256, 38646, 256, 38728, 256, 38936, 256,
+ 20363, 256, 31150, 256, 37300, 256, 38584, 256, 24801, 256, 20102, 256,
+ 20698, 256, 23534, 256, 23615, 256, 26009, 256, 27138, 256, 29134, 256,
+ 30274, 256, 34044, 256, 36988, 256, 40845, 256, 26248, 256, 38446, 256,
+ 21129, 256, 26491, 256, 26611, 256, 27969, 256, 28316, 256, 29705, 256,
+ 30041, 256, 30827, 256, 32016, 256, 39006, 256, 20845, 256, 25134, 256,
+ 38520, 256, 20523, 256, 23833, 256, 28138, 256, 36650, 256, 24459, 256,
+ 24900, 256, 26647, 256, 29575, 256, 38534, 256, 21033, 256, 21519, 256,
+ 23653, 256, 26131, 256, 26446, 256, 26792, 256, 27877, 256, 29702, 256,
+ 30178, 256, 32633, 256, 35023, 256, 35041, 256, 37324, 256, 38626, 256,
+ 21311, 256, 28346, 256, 21533, 256, 29136, 256, 29848, 256, 34298, 256,
+ 38563, 256, 40023, 256, 40607, 256, 26519, 256, 28107, 256, 33256, 256,
+ 31435, 256, 31520, 256, 31890, 256, 29376, 256, 28825, 256, 35672, 256,
+ 20160, 256, 33590, 256, 21050, 256, 20999, 256, 24230, 256, 25299, 256,
+ 31958, 256, 23429, 256, 27934, 256, 26292, 256, 36667, 256, 34892, 256,
+ 38477, 256, 35211, 256, 24275, 256, 20800, 256, 21952, 256, 22618, 256,
+ 26228, 256, 20958, 256, 29482, 256, 30410, 256, 31036, 256, 31070, 256,
+ 31077, 256, 31119, 256, 38742, 256, 31934, 256, 32701, 256, 34322, 256,
+ 35576, 256, 36920, 256, 37117, 256, 39151, 256, 39164, 256, 39208, 256,
+ 40372, 256, 37086, 256, 38583, 256, 20398, 256, 20711, 256, 20813, 256,
+ 21193, 256, 21220, 256, 21329, 256, 21917, 256, 22022, 256, 22120, 256,
+ 22592, 256, 22696, 256, 23652, 256, 23662, 256, 24724, 256, 24936, 256,
+ 24974, 256, 25074, 256, 25935, 256, 26082, 256, 26257, 256, 26757, 256,
+ 28023, 256, 28186, 256, 28450, 256, 29038, 256, 29227, 256, 29730, 256,
+ 30865, 256, 31038, 256, 31049, 256, 31048, 256, 31056, 256, 31062, 256,
+ 31069, 256, 31117, 256, 31118, 256, 31296, 256, 31361, 256, 31680, 256,
+ 32244, 256, 32265, 256, 32321, 256, 32626, 256, 32773, 256, 33261, 256,
+ 33401, 256, 33401, 256, 33879, 256, 35088, 256, 35222, 256, 35585, 256,
+ 35641, 256, 36051, 256, 36104, 256, 36790, 256, 36920, 256, 38627, 256,
+ 38911, 256, 38971, 256, 24693, 256, 148206, 256, 33304, 256, 20006, 256,
+ 20917, 256, 20840, 256, 20352, 256, 20805, 256, 20864, 256, 21191, 256,
+ 21242, 256, 21917, 256, 21845, 256, 21913, 256, 21986, 256, 22618, 256,
+ 22707, 256, 22852, 256, 22868, 256, 23138, 256, 23336, 256, 24274, 256,
+ 24281, 256, 24425, 256, 24493, 256, 24792, 256, 24910, 256, 24840, 256,
+ 24974, 256, 24928, 256, 25074, 256, 25140, 256, 25540, 256, 25628, 256,
+ 25682, 256, 25942, 256, 26228, 256, 26391, 256, 26395, 256, 26454, 256,
+ 27513, 256, 27578, 256, 27969, 256, 28379, 256, 28363, 256, 28450, 256,
+ 28702, 256, 29038, 256, 30631, 256, 29237, 256, 29359, 256, 29482, 256,
+ 29809, 256, 29958, 256, 30011, 256, 30237, 256, 30239, 256, 30410, 256,
+ 30427, 256, 30452, 256, 30538, 256, 30528, 256, 30924, 256, 31409, 256,
+ 31680, 256, 31867, 256, 32091, 256, 32244, 256, 32574, 256, 32773, 256,
+ 33618, 256, 33775, 256, 34681, 256, 35137, 256, 35206, 256, 35222, 256,
+ 35519, 256, 35576, 256, 35531, 256, 35585, 256, 35582, 256, 35565, 256,
+ 35641, 256, 35722, 256, 36104, 256, 36664, 256, 36978, 256, 37273, 256,
+ 37494, 256, 38524, 256, 38627, 256, 38742, 256, 38875, 256, 38911, 256,
+ 38923, 256, 38971, 256, 39698, 256, 40860, 256, 141386, 256, 141380, 256,
+ 144341, 256, 15261, 256, 16408, 256, 16441, 256, 152137, 256, 154832,
+ 256, 163539, 256, 40771, 256, 40846, 514, 102, 102, 514, 102, 105, 514,
+ 102, 108, 770, 102, 102, 105, 770, 102, 102, 108, 514, 383, 116, 514,
+ 115, 116, 514, 1396, 1398, 514, 1396, 1381, 514, 1396, 1387, 514, 1406,
+ 1398, 514, 1396, 1389, 512, 1497, 1460, 512, 1522, 1463, 262, 1506, 262,
+ 1488, 262, 1491, 262, 1492, 262, 1499, 262, 1500, 262, 1501, 262, 1512,
+ 262, 1514, 262, 43, 512, 1513, 1473, 512, 1513, 1474, 512, 64329, 1473,
+ 512, 64329, 1474, 512, 1488, 1463, 512, 1488, 1464, 512, 1488, 1468, 512,
+ 1489, 1468, 512, 1490, 1468, 512, 1491, 1468, 512, 1492, 1468, 512, 1493,
+ 1468, 512, 1494, 1468, 512, 1496, 1468, 512, 1497, 1468, 512, 1498, 1468,
+ 512, 1499, 1468, 512, 1500, 1468, 512, 1502, 1468, 512, 1504, 1468, 512,
+ 1505, 1468, 512, 1507, 1468, 512, 1508, 1468, 512, 1510, 1468, 512, 1511,
+ 1468, 512, 1512, 1468, 512, 1513, 1468, 512, 1514, 1468, 512, 1493, 1465,
+ 512, 1489, 1471, 512, 1499, 1471, 512, 1508, 1471, 514, 1488, 1500, 267,
+ 1649, 268, 1649, 267, 1659, 268, 1659, 269, 1659, 270, 1659, 267, 1662,
+ 268, 1662, 269, 1662, 270, 1662, 267, 1664, 268, 1664, 269, 1664, 270,
+ 1664, 267, 1658, 268, 1658, 269, 1658, 270, 1658, 267, 1663, 268, 1663,
+ 269, 1663, 270, 1663, 267, 1657, 268, 1657, 269, 1657, 270, 1657, 267,
+ 1700, 268, 1700, 269, 1700, 270, 1700, 267, 1702, 268, 1702, 269, 1702,
+ 270, 1702, 267, 1668, 268, 1668, 269, 1668, 270, 1668, 267, 1667, 268,
+ 1667, 269, 1667, 270, 1667, 267, 1670, 268, 1670, 269, 1670, 270, 1670,
+ 267, 1671, 268, 1671, 269, 1671, 270, 1671, 267, 1677, 268, 1677, 267,
+ 1676, 268, 1676, 267, 1678, 268, 1678, 267, 1672, 268, 1672, 267, 1688,
+ 268, 1688, 267, 1681, 268, 1681, 267, 1705, 268, 1705, 269, 1705, 270,
+ 1705, 267, 1711, 268, 1711, 269, 1711, 270, 1711, 267, 1715, 268, 1715,
+ 269, 1715, 270, 1715, 267, 1713, 268, 1713, 269, 1713, 270, 1713, 267,
+ 1722, 268, 1722, 267, 1723, 268, 1723, 269, 1723, 270, 1723, 267, 1728,
+ 268, 1728, 267, 1729, 268, 1729, 269, 1729, 270, 1729, 267, 1726, 268,
+ 1726, 269, 1726, 270, 1726, 267, 1746, 268, 1746, 267, 1747, 268, 1747,
+ 267, 1709, 268, 1709, 269, 1709, 270, 1709, 267, 1735, 268, 1735, 267,
+ 1734, 268, 1734, 267, 1736, 268, 1736, 267, 1655, 267, 1739, 268, 1739,
+ 267, 1733, 268, 1733, 267, 1737, 268, 1737, 267, 1744, 268, 1744, 269,
+ 1744, 270, 1744, 269, 1609, 270, 1609, 523, 1574, 1575, 524, 1574, 1575,
+ 523, 1574, 1749, 524, 1574, 1749, 523, 1574, 1608, 524, 1574, 1608, 523,
+ 1574, 1735, 524, 1574, 1735, 523, 1574, 1734, 524, 1574, 1734, 523, 1574,
+ 1736, 524, 1574, 1736, 523, 1574, 1744, 524, 1574, 1744, 525, 1574, 1744,
+ 523, 1574, 1609, 524, 1574, 1609, 525, 1574, 1609, 267, 1740, 268, 1740,
+ 269, 1740, 270, 1740, 523, 1574, 1580, 523, 1574, 1581, 523, 1574, 1605,
+ 523, 1574, 1609, 523, 1574, 1610, 523, 1576, 1580, 523, 1576, 1581, 523,
+ 1576, 1582, 523, 1576, 1605, 523, 1576, 1609, 523, 1576, 1610, 523, 1578,
+ 1580, 523, 1578, 1581, 523, 1578, 1582, 523, 1578, 1605, 523, 1578, 1609,
+ 523, 1578, 1610, 523, 1579, 1580, 523, 1579, 1605, 523, 1579, 1609, 523,
+ 1579, 1610, 523, 1580, 1581, 523, 1580, 1605, 523, 1581, 1580, 523, 1581,
+ 1605, 523, 1582, 1580, 523, 1582, 1581, 523, 1582, 1605, 523, 1587, 1580,
+ 523, 1587, 1581, 523, 1587, 1582, 523, 1587, 1605, 523, 1589, 1581, 523,
+ 1589, 1605, 523, 1590, 1580, 523, 1590, 1581, 523, 1590, 1582, 523, 1590,
+ 1605, 523, 1591, 1581, 523, 1591, 1605, 523, 1592, 1605, 523, 1593, 1580,
+ 523, 1593, 1605, 523, 1594, 1580, 523, 1594, 1605, 523, 1601, 1580, 523,
+ 1601, 1581, 523, 1601, 1582, 523, 1601, 1605, 523, 1601, 1609, 523, 1601,
+ 1610, 523, 1602, 1581, 523, 1602, 1605, 523, 1602, 1609, 523, 1602, 1610,
+ 523, 1603, 1575, 523, 1603, 1580, 523, 1603, 1581, 523, 1603, 1582, 523,
+ 1603, 1604, 523, 1603, 1605, 523, 1603, 1609, 523, 1603, 1610, 523, 1604,
+ 1580, 523, 1604, 1581, 523, 1604, 1582, 523, 1604, 1605, 523, 1604, 1609,
+ 523, 1604, 1610, 523, 1605, 1580, 523, 1605, 1581, 523, 1605, 1582, 523,
+ 1605, 1605, 523, 1605, 1609, 523, 1605, 1610, 523, 1606, 1580, 523, 1606,
+ 1581, 523, 1606, 1582, 523, 1606, 1605, 523, 1606, 1609, 523, 1606, 1610,
+ 523, 1607, 1580, 523, 1607, 1605, 523, 1607, 1609, 523, 1607, 1610, 523,
+ 1610, 1580, 523, 1610, 1581, 523, 1610, 1582, 523, 1610, 1605, 523, 1610,
+ 1609, 523, 1610, 1610, 523, 1584, 1648, 523, 1585, 1648, 523, 1609, 1648,
+ 779, 32, 1612, 1617, 779, 32, 1613, 1617, 779, 32, 1614, 1617, 779, 32,
+ 1615, 1617, 779, 32, 1616, 1617, 779, 32, 1617, 1648, 524, 1574, 1585,
+ 524, 1574, 1586, 524, 1574, 1605, 524, 1574, 1606, 524, 1574, 1609, 524,
+ 1574, 1610, 524, 1576, 1585, 524, 1576, 1586, 524, 1576, 1605, 524, 1576,
+ 1606, 524, 1576, 1609, 524, 1576, 1610, 524, 1578, 1585, 524, 1578, 1586,
+ 524, 1578, 1605, 524, 1578, 1606, 524, 1578, 1609, 524, 1578, 1610, 524,
+ 1579, 1585, 524, 1579, 1586, 524, 1579, 1605, 524, 1579, 1606, 524, 1579,
+ 1609, 524, 1579, 1610, 524, 1601, 1609, 524, 1601, 1610, 524, 1602, 1609,
+ 524, 1602, 1610, 524, 1603, 1575, 524, 1603, 1604, 524, 1603, 1605, 524,
+ 1603, 1609, 524, 1603, 1610, 524, 1604, 1605, 524, 1604, 1609, 524, 1604,
+ 1610, 524, 1605, 1575, 524, 1605, 1605, 524, 1606, 1585, 524, 1606, 1586,
+ 524, 1606, 1605, 524, 1606, 1606, 524, 1606, 1609, 524, 1606, 1610, 524,
+ 1609, 1648, 524, 1610, 1585, 524, 1610, 1586, 524, 1610, 1605, 524, 1610,
+ 1606, 524, 1610, 1609, 524, 1610, 1610, 525, 1574, 1580, 525, 1574, 1581,
+ 525, 1574, 1582, 525, 1574, 1605, 525, 1574, 1607, 525, 1576, 1580, 525,
+ 1576, 1581, 525, 1576, 1582, 525, 1576, 1605, 525, 1576, 1607, 525, 1578,
+ 1580, 525, 1578, 1581, 525, 1578, 1582, 525, 1578, 1605, 525, 1578, 1607,
+ 525, 1579, 1605, 525, 1580, 1581, 525, 1580, 1605, 525, 1581, 1580, 525,
+ 1581, 1605, 525, 1582, 1580, 525, 1582, 1605, 525, 1587, 1580, 525, 1587,
+ 1581, 525, 1587, 1582, 525, 1587, 1605, 525, 1589, 1581, 525, 1589, 1582,
+ 525, 1589, 1605, 525, 1590, 1580, 525, 1590, 1581, 525, 1590, 1582, 525,
+ 1590, 1605, 525, 1591, 1581, 525, 1592, 1605, 525, 1593, 1580, 525, 1593,
+ 1605, 525, 1594, 1580, 525, 1594, 1605, 525, 1601, 1580, 525, 1601, 1581,
+ 525, 1601, 1582, 525, 1601, 1605, 525, 1602, 1581, 525, 1602, 1605, 525,
+ 1603, 1580, 525, 1603, 1581, 525, 1603, 1582, 525, 1603, 1604, 525, 1603,
+ 1605, 525, 1604, 1580, 525, 1604, 1581, 525, 1604, 1582, 525, 1604, 1605,
+ 525, 1604, 1607, 525, 1605, 1580, 525, 1605, 1581, 525, 1605, 1582, 525,
+ 1605, 1605, 525, 1606, 1580, 525, 1606, 1581, 525, 1606, 1582, 525, 1606,
+ 1605, 525, 1606, 1607, 525, 1607, 1580, 525, 1607, 1605, 525, 1607, 1648,
+ 525, 1610, 1580, 525, 1610, 1581, 525, 1610, 1582, 525, 1610, 1605, 525,
+ 1610, 1607, 526, 1574, 1605, 526, 1574, 1607, 526, 1576, 1605, 526, 1576,
+ 1607, 526, 1578, 1605, 526, 1578, 1607, 526, 1579, 1605, 526, 1579, 1607,
+ 526, 1587, 1605, 526, 1587, 1607, 526, 1588, 1605, 526, 1588, 1607, 526,
+ 1603, 1604, 526, 1603, 1605, 526, 1604, 1605, 526, 1606, 1605, 526, 1606,
+ 1607, 526, 1610, 1605, 526, 1610, 1607, 782, 1600, 1614, 1617, 782, 1600,
+ 1615, 1617, 782, 1600, 1616, 1617, 523, 1591, 1609, 523, 1591, 1610, 523,
+ 1593, 1609, 523, 1593, 1610, 523, 1594, 1609, 523, 1594, 1610, 523, 1587,
+ 1609, 523, 1587, 1610, 523, 1588, 1609, 523, 1588, 1610, 523, 1581, 1609,
+ 523, 1581, 1610, 523, 1580, 1609, 523, 1580, 1610, 523, 1582, 1609, 523,
+ 1582, 1610, 523, 1589, 1609, 523, 1589, 1610, 523, 1590, 1609, 523, 1590,
+ 1610, 523, 1588, 1580, 523, 1588, 1581, 523, 1588, 1582, 523, 1588, 1605,
+ 523, 1588, 1585, 523, 1587, 1585, 523, 1589, 1585, 523, 1590, 1585, 524,
+ 1591, 1609, 524, 1591, 1610, 524, 1593, 1609, 524, 1593, 1610, 524, 1594,
+ 1609, 524, 1594, 1610, 524, 1587, 1609, 524, 1587, 1610, 524, 1588, 1609,
+ 524, 1588, 1610, 524, 1581, 1609, 524, 1581, 1610, 524, 1580, 1609, 524,
+ 1580, 1610, 524, 1582, 1609, 524, 1582, 1610, 524, 1589, 1609, 524, 1589,
+ 1610, 524, 1590, 1609, 524, 1590, 1610, 524, 1588, 1580, 524, 1588, 1581,
+ 524, 1588, 1582, 524, 1588, 1605, 524, 1588, 1585, 524, 1587, 1585, 524,
+ 1589, 1585, 524, 1590, 1585, 525, 1588, 1580, 525, 1588, 1581, 525, 1588,
+ 1582, 525, 1588, 1605, 525, 1587, 1607, 525, 1588, 1607, 525, 1591, 1605,
+ 526, 1587, 1580, 526, 1587, 1581, 526, 1587, 1582, 526, 1588, 1580, 526,
+ 1588, 1581, 526, 1588, 1582, 526, 1591, 1605, 526, 1592, 1605, 524, 1575,
+ 1611, 523, 1575, 1611, 781, 1578, 1580, 1605, 780, 1578, 1581, 1580, 781,
+ 1578, 1581, 1580, 781, 1578, 1581, 1605, 781, 1578, 1582, 1605, 781,
+ 1578, 1605, 1580, 781, 1578, 1605, 1581, 781, 1578, 1605, 1582, 780,
+ 1580, 1605, 1581, 781, 1580, 1605, 1581, 780, 1581, 1605, 1610, 780,
+ 1581, 1605, 1609, 781, 1587, 1581, 1580, 781, 1587, 1580, 1581, 780,
+ 1587, 1580, 1609, 780, 1587, 1605, 1581, 781, 1587, 1605, 1581, 781,
+ 1587, 1605, 1580, 780, 1587, 1605, 1605, 781, 1587, 1605, 1605, 780,
+ 1589, 1581, 1581, 781, 1589, 1581, 1581, 780, 1589, 1605, 1605, 780,
+ 1588, 1581, 1605, 781, 1588, 1581, 1605, 780, 1588, 1580, 1610, 780,
+ 1588, 1605, 1582, 781, 1588, 1605, 1582, 780, 1588, 1605, 1605, 781,
+ 1588, 1605, 1605, 780, 1590, 1581, 1609, 780, 1590, 1582, 1605, 781,
+ 1590, 1582, 1605, 780, 1591, 1605, 1581, 781, 1591, 1605, 1581, 781,
+ 1591, 1605, 1605, 780, 1591, 1605, 1610, 780, 1593, 1580, 1605, 780,
+ 1593, 1605, 1605, 781, 1593, 1605, 1605, 780, 1593, 1605, 1609, 780,
+ 1594, 1605, 1605, 780, 1594, 1605, 1610, 780, 1594, 1605, 1609, 780,
+ 1601, 1582, 1605, 781, 1601, 1582, 1605, 780, 1602, 1605, 1581, 780,
+ 1602, 1605, 1605, 780, 1604, 1581, 1605, 780, 1604, 1581, 1610, 780,
+ 1604, 1581, 1609, 781, 1604, 1580, 1580, 780, 1604, 1580, 1580, 780,
+ 1604, 1582, 1605, 781, 1604, 1582, 1605, 780, 1604, 1605, 1581, 781,
+ 1604, 1605, 1581, 781, 1605, 1581, 1580, 781, 1605, 1581, 1605, 780,
+ 1605, 1581, 1610, 781, 1605, 1580, 1581, 781, 1605, 1580, 1605, 781,
+ 1605, 1582, 1580, 781, 1605, 1582, 1605, 781, 1605, 1580, 1582, 781,
+ 1607, 1605, 1580, 781, 1607, 1605, 1605, 781, 1606, 1581, 1605, 780,
+ 1606, 1581, 1609, 780, 1606, 1580, 1605, 781, 1606, 1580, 1605, 780,
+ 1606, 1580, 1609, 780, 1606, 1605, 1610, 780, 1606, 1605, 1609, 780,
+ 1610, 1605, 1605, 781, 1610, 1605, 1605, 780, 1576, 1582, 1610, 780,
+ 1578, 1580, 1610, 780, 1578, 1580, 1609, 780, 1578, 1582, 1610, 780,
+ 1578, 1582, 1609, 780, 1578, 1605, 1610, 780, 1578, 1605, 1609, 780,
+ 1580, 1605, 1610, 780, 1580, 1581, 1609, 780, 1580, 1605, 1609, 780,
+ 1587, 1582, 1609, 780, 1589, 1581, 1610, 780, 1588, 1581, 1610, 780,
+ 1590, 1581, 1610, 780, 1604, 1580, 1610, 780, 1604, 1605, 1610, 780,
+ 1610, 1581, 1610, 780, 1610, 1580, 1610, 780, 1610, 1605, 1610, 780,
+ 1605, 1605, 1610, 780, 1602, 1605, 1610, 780, 1606, 1581, 1610, 781,
+ 1602, 1605, 1581, 781, 1604, 1581, 1605, 780, 1593, 1605, 1610, 780,
+ 1603, 1605, 1610, 781, 1606, 1580, 1581, 780, 1605, 1582, 1610, 781,
+ 1604, 1580, 1605, 780, 1603, 1605, 1605, 780, 1604, 1580, 1605, 780,
+ 1606, 1580, 1581, 780, 1580, 1581, 1610, 780, 1581, 1580, 1610, 780,
+ 1605, 1580, 1610, 780, 1601, 1605, 1610, 780, 1576, 1581, 1610, 781,
+ 1603, 1605, 1605, 781, 1593, 1580, 1605, 781, 1589, 1605, 1605, 780,
+ 1587, 1582, 1610, 780, 1606, 1580, 1610, 779, 1589, 1604, 1746, 779,
+ 1602, 1604, 1746, 1035, 1575, 1604, 1604, 1607, 1035, 1575, 1603, 1576,
+ 1585, 1035, 1605, 1581, 1605, 1583, 1035, 1589, 1604, 1593, 1605, 1035,
+ 1585, 1587, 1608, 1604, 1035, 1593, 1604, 1610, 1607, 1035, 1608, 1587,
+ 1604, 1605, 779, 1589, 1604, 1609, 4619, 1589, 1604, 1609, 32, 1575,
+ 1604, 1604, 1607, 32, 1593, 1604, 1610, 1607, 32, 1608, 1587, 1604, 1605,
+ 2059, 1580, 1604, 32, 1580, 1604, 1575, 1604, 1607, 1035, 1585, 1740,
+ 1575, 1604, 265, 44, 265, 12289, 265, 12290, 265, 58, 265, 59, 265, 33,
+ 265, 63, 265, 12310, 265, 12311, 265, 8230, 265, 8229, 265, 8212, 265,
+ 8211, 265, 95, 265, 95, 265, 40, 265, 41, 265, 123, 265, 125, 265, 12308,
+ 265, 12309, 265, 12304, 265, 12305, 265, 12298, 265, 12299, 265, 12296,
+ 265, 12297, 265, 12300, 265, 12301, 265, 12302, 265, 12303, 265, 91, 265,
+ 93, 258, 8254, 258, 8254, 258, 8254, 258, 8254, 258, 95, 258, 95, 258,
+ 95, 271, 44, 271, 12289, 271, 46, 271, 59, 271, 58, 271, 63, 271, 33,
+ 271, 8212, 271, 40, 271, 41, 271, 123, 271, 125, 271, 12308, 271, 12309,
+ 271, 35, 271, 38, 271, 42, 271, 43, 271, 45, 271, 60, 271, 62, 271, 61,
+ 271, 92, 271, 36, 271, 37, 271, 64, 523, 32, 1611, 526, 1600, 1611, 523,
+ 32, 1612, 523, 32, 1613, 523, 32, 1614, 526, 1600, 1614, 523, 32, 1615,
+ 526, 1600, 1615, 523, 32, 1616, 526, 1600, 1616, 523, 32, 1617, 526,
+ 1600, 1617, 523, 32, 1618, 526, 1600, 1618, 267, 1569, 267, 1570, 268,
+ 1570, 267, 1571, 268, 1571, 267, 1572, 268, 1572, 267, 1573, 268, 1573,
+ 267, 1574, 268, 1574, 269, 1574, 270, 1574, 267, 1575, 268, 1575, 267,
+ 1576, 268, 1576, 269, 1576, 270, 1576, 267, 1577, 268, 1577, 267, 1578,
+ 268, 1578, 269, 1578, 270, 1578, 267, 1579, 268, 1579, 269, 1579, 270,
+ 1579, 267, 1580, 268, 1580, 269, 1580, 270, 1580, 267, 1581, 268, 1581,
+ 269, 1581, 270, 1581, 267, 1582, 268, 1582, 269, 1582, 270, 1582, 267,
+ 1583, 268, 1583, 267, 1584, 268, 1584, 267, 1585, 268, 1585, 267, 1586,
+ 268, 1586, 267, 1587, 268, 1587, 269, 1587, 270, 1587, 267, 1588, 268,
+ 1588, 269, 1588, 270, 1588, 267, 1589, 268, 1589, 269, 1589, 270, 1589,
+ 267, 1590, 268, 1590, 269, 1590, 270, 1590, 267, 1591, 268, 1591, 269,
+ 1591, 270, 1591, 267, 1592, 268, 1592, 269, 1592, 270, 1592, 267, 1593,
+ 268, 1593, 269, 1593, 270, 1593, 267, 1594, 268, 1594, 269, 1594, 270,
+ 1594, 267, 1601, 268, 1601, 269, 1601, 270, 1601, 267, 1602, 268, 1602,
+ 269, 1602, 270, 1602, 267, 1603, 268, 1603, 269, 1603, 270, 1603, 267,
+ 1604, 268, 1604, 269, 1604, 270, 1604, 267, 1605, 268, 1605, 269, 1605,
+ 270, 1605, 267, 1606, 268, 1606, 269, 1606, 270, 1606, 267, 1607, 268,
+ 1607, 269, 1607, 270, 1607, 267, 1608, 268, 1608, 267, 1609, 268, 1609,
+ 267, 1610, 268, 1610, 269, 1610, 270, 1610, 523, 1604, 1570, 524, 1604,
+ 1570, 523, 1604, 1571, 524, 1604, 1571, 523, 1604, 1573, 524, 1604, 1573,
+ 523, 1604, 1575, 524, 1604, 1575, 264, 33, 264, 34, 264, 35, 264, 36,
+ 264, 37, 264, 38, 264, 39, 264, 40, 264, 41, 264, 42, 264, 43, 264, 44,
+ 264, 45, 264, 46, 264, 47, 264, 48, 264, 49, 264, 50, 264, 51, 264, 52,
+ 264, 53, 264, 54, 264, 55, 264, 56, 264, 57, 264, 58, 264, 59, 264, 60,
+ 264, 61, 264, 62, 264, 63, 264, 64, 264, 65, 264, 66, 264, 67, 264, 68,
+ 264, 69, 264, 70, 264, 71, 264, 72, 264, 73, 264, 74, 264, 75, 264, 76,
+ 264, 77, 264, 78, 264, 79, 264, 80, 264, 81, 264, 82, 264, 83, 264, 84,
+ 264, 85, 264, 86, 264, 87, 264, 88, 264, 89, 264, 90, 264, 91, 264, 92,
+ 264, 93, 264, 94, 264, 95, 264, 96, 264, 97, 264, 98, 264, 99, 264, 100,
+ 264, 101, 264, 102, 264, 103, 264, 104, 264, 105, 264, 106, 264, 107,
+ 264, 108, 264, 109, 264, 110, 264, 111, 264, 112, 264, 113, 264, 114,
+ 264, 115, 264, 116, 264, 117, 264, 118, 264, 119, 264, 120, 264, 121,
+ 264, 122, 264, 123, 264, 124, 264, 125, 264, 126, 264, 10629, 264, 10630,
+ 272, 12290, 272, 12300, 272, 12301, 272, 12289, 272, 12539, 272, 12530,
+ 272, 12449, 272, 12451, 272, 12453, 272, 12455, 272, 12457, 272, 12515,
+ 272, 12517, 272, 12519, 272, 12483, 272, 12540, 272, 12450, 272, 12452,
+ 272, 12454, 272, 12456, 272, 12458, 272, 12459, 272, 12461, 272, 12463,
+ 272, 12465, 272, 12467, 272, 12469, 272, 12471, 272, 12473, 272, 12475,
+ 272, 12477, 272, 12479, 272, 12481, 272, 12484, 272, 12486, 272, 12488,
+ 272, 12490, 272, 12491, 272, 12492, 272, 12493, 272, 12494, 272, 12495,
+ 272, 12498, 272, 12501, 272, 12504, 272, 12507, 272, 12510, 272, 12511,
+ 272, 12512, 272, 12513, 272, 12514, 272, 12516, 272, 12518, 272, 12520,
+ 272, 12521, 272, 12522, 272, 12523, 272, 12524, 272, 12525, 272, 12527,
+ 272, 12531, 272, 12441, 272, 12442, 272, 12644, 272, 12593, 272, 12594,
+ 272, 12595, 272, 12596, 272, 12597, 272, 12598, 272, 12599, 272, 12600,
+ 272, 12601, 272, 12602, 272, 12603, 272, 12604, 272, 12605, 272, 12606,
+ 272, 12607, 272, 12608, 272, 12609, 272, 12610, 272, 12611, 272, 12612,
+ 272, 12613, 272, 12614, 272, 12615, 272, 12616, 272, 12617, 272, 12618,
+ 272, 12619, 272, 12620, 272, 12621, 272, 12622, 272, 12623, 272, 12624,
+ 272, 12625, 272, 12626, 272, 12627, 272, 12628, 272, 12629, 272, 12630,
+ 272, 12631, 272, 12632, 272, 12633, 272, 12634, 272, 12635, 272, 12636,
+ 272, 12637, 272, 12638, 272, 12639, 272, 12640, 272, 12641, 272, 12642,
+ 272, 12643, 264, 162, 264, 163, 264, 172, 264, 175, 264, 166, 264, 165,
+ 264, 8361, 272, 9474, 272, 8592, 272, 8593, 272, 8594, 272, 8595, 272,
+ 9632, 272, 9675, 512, 69785, 69818, 512, 69787, 69818, 512, 69797, 69818,
+ 512, 69937, 69927, 512, 69938, 69927, 512, 70471, 70462, 512, 70471,
+ 70487, 512, 70841, 70842, 512, 70841, 70832, 512, 70841, 70845, 512,
+ 71096, 71087, 512, 71097, 71087, 512, 119127, 119141, 512, 119128,
+ 119141, 512, 119135, 119150, 512, 119135, 119151, 512, 119135, 119152,
+ 512, 119135, 119153, 512, 119135, 119154, 512, 119225, 119141, 512,
+ 119226, 119141, 512, 119227, 119150, 512, 119228, 119150, 512, 119227,
+ 119151, 512, 119228, 119151, 262, 65, 262, 66, 262, 67, 262, 68, 262, 69,
+ 262, 70, 262, 71, 262, 72, 262, 73, 262, 74, 262, 75, 262, 76, 262, 77,
+ 262, 78, 262, 79, 262, 80, 262, 81, 262, 82, 262, 83, 262, 84, 262, 85,
+ 262, 86, 262, 87, 262, 88, 262, 89, 262, 90, 262, 97, 262, 98, 262, 99,
+ 262, 100, 262, 101, 262, 102, 262, 103, 262, 104, 262, 105, 262, 106,
+ 262, 107, 262, 108, 262, 109, 262, 110, 262, 111, 262, 112, 262, 113,
+ 262, 114, 262, 115, 262, 116, 262, 117, 262, 118, 262, 119, 262, 120,
+ 262, 121, 262, 122, 262, 65, 262, 66, 262, 67, 262, 68, 262, 69, 262, 70,
+ 262, 71, 262, 72, 262, 73, 262, 74, 262, 75, 262, 76, 262, 77, 262, 78,
+ 262, 79, 262, 80, 262, 81, 262, 82, 262, 83, 262, 84, 262, 85, 262, 86,
+ 262, 87, 262, 88, 262, 89, 262, 90, 262, 97, 262, 98, 262, 99, 262, 100,
+ 262, 101, 262, 102, 262, 103, 262, 105, 262, 106, 262, 107, 262, 108,
262, 109, 262, 110, 262, 111, 262, 112, 262, 113, 262, 114, 262, 115,
262, 116, 262, 117, 262, 118, 262, 119, 262, 120, 262, 121, 262, 122,
- 262, 65, 262, 67, 262, 68, 262, 71, 262, 74, 262, 75, 262, 78, 262, 79,
- 262, 80, 262, 81, 262, 83, 262, 84, 262, 85, 262, 86, 262, 87, 262, 88,
- 262, 89, 262, 90, 262, 97, 262, 98, 262, 99, 262, 100, 262, 102, 262,
- 104, 262, 105, 262, 106, 262, 107, 262, 108, 262, 109, 262, 110, 262,
- 112, 262, 113, 262, 114, 262, 115, 262, 116, 262, 117, 262, 118, 262,
- 119, 262, 120, 262, 121, 262, 122, 262, 65, 262, 66, 262, 67, 262, 68,
- 262, 69, 262, 70, 262, 71, 262, 72, 262, 73, 262, 74, 262, 75, 262, 76,
- 262, 77, 262, 78, 262, 79, 262, 80, 262, 81, 262, 82, 262, 83, 262, 84,
- 262, 85, 262, 86, 262, 87, 262, 88, 262, 89, 262, 90, 262, 97, 262, 98,
- 262, 99, 262, 100, 262, 101, 262, 102, 262, 103, 262, 104, 262, 105, 262,
- 106, 262, 107, 262, 108, 262, 109, 262, 110, 262, 111, 262, 112, 262,
- 113, 262, 114, 262, 115, 262, 116, 262, 117, 262, 118, 262, 119, 262,
- 120, 262, 121, 262, 122, 262, 65, 262, 66, 262, 68, 262, 69, 262, 70,
- 262, 71, 262, 74, 262, 75, 262, 76, 262, 77, 262, 78, 262, 79, 262, 80,
+ 262, 65, 262, 66, 262, 67, 262, 68, 262, 69, 262, 70, 262, 71, 262, 72,
+ 262, 73, 262, 74, 262, 75, 262, 76, 262, 77, 262, 78, 262, 79, 262, 80,
+ 262, 81, 262, 82, 262, 83, 262, 84, 262, 85, 262, 86, 262, 87, 262, 88,
+ 262, 89, 262, 90, 262, 97, 262, 98, 262, 99, 262, 100, 262, 101, 262,
+ 102, 262, 103, 262, 104, 262, 105, 262, 106, 262, 107, 262, 108, 262,
+ 109, 262, 110, 262, 111, 262, 112, 262, 113, 262, 114, 262, 115, 262,
+ 116, 262, 117, 262, 118, 262, 119, 262, 120, 262, 121, 262, 122, 262, 65,
+ 262, 67, 262, 68, 262, 71, 262, 74, 262, 75, 262, 78, 262, 79, 262, 80,
262, 81, 262, 83, 262, 84, 262, 85, 262, 86, 262, 87, 262, 88, 262, 89,
- 262, 97, 262, 98, 262, 99, 262, 100, 262, 101, 262, 102, 262, 103, 262,
- 104, 262, 105, 262, 106, 262, 107, 262, 108, 262, 109, 262, 110, 262,
- 111, 262, 112, 262, 113, 262, 114, 262, 115, 262, 116, 262, 117, 262,
- 118, 262, 119, 262, 120, 262, 121, 262, 122, 262, 65, 262, 66, 262, 68,
- 262, 69, 262, 70, 262, 71, 262, 73, 262, 74, 262, 75, 262, 76, 262, 77,
- 262, 79, 262, 83, 262, 84, 262, 85, 262, 86, 262, 87, 262, 88, 262, 89,
- 262, 97, 262, 98, 262, 99, 262, 100, 262, 101, 262, 102, 262, 103, 262,
- 104, 262, 105, 262, 106, 262, 107, 262, 108, 262, 109, 262, 110, 262,
- 111, 262, 112, 262, 113, 262, 114, 262, 115, 262, 116, 262, 117, 262,
- 118, 262, 119, 262, 120, 262, 121, 262, 122, 262, 65, 262, 66, 262, 67,
- 262, 68, 262, 69, 262, 70, 262, 71, 262, 72, 262, 73, 262, 74, 262, 75,
- 262, 76, 262, 77, 262, 78, 262, 79, 262, 80, 262, 81, 262, 82, 262, 83,
- 262, 84, 262, 85, 262, 86, 262, 87, 262, 88, 262, 89, 262, 90, 262, 97,
+ 262, 90, 262, 97, 262, 98, 262, 99, 262, 100, 262, 102, 262, 104, 262,
+ 105, 262, 106, 262, 107, 262, 108, 262, 109, 262, 110, 262, 112, 262,
+ 113, 262, 114, 262, 115, 262, 116, 262, 117, 262, 118, 262, 119, 262,
+ 120, 262, 121, 262, 122, 262, 65, 262, 66, 262, 67, 262, 68, 262, 69,
+ 262, 70, 262, 71, 262, 72, 262, 73, 262, 74, 262, 75, 262, 76, 262, 77,
+ 262, 78, 262, 79, 262, 80, 262, 81, 262, 82, 262, 83, 262, 84, 262, 85,
+ 262, 86, 262, 87, 262, 88, 262, 89, 262, 90, 262, 97, 262, 98, 262, 99,
+ 262, 100, 262, 101, 262, 102, 262, 103, 262, 104, 262, 105, 262, 106,
+ 262, 107, 262, 108, 262, 109, 262, 110, 262, 111, 262, 112, 262, 113,
+ 262, 114, 262, 115, 262, 116, 262, 117, 262, 118, 262, 119, 262, 120,
+ 262, 121, 262, 122, 262, 65, 262, 66, 262, 68, 262, 69, 262, 70, 262, 71,
+ 262, 74, 262, 75, 262, 76, 262, 77, 262, 78, 262, 79, 262, 80, 262, 81,
+ 262, 83, 262, 84, 262, 85, 262, 86, 262, 87, 262, 88, 262, 89, 262, 97,
+ 262, 98, 262, 99, 262, 100, 262, 101, 262, 102, 262, 103, 262, 104, 262,
+ 105, 262, 106, 262, 107, 262, 108, 262, 109, 262, 110, 262, 111, 262,
+ 112, 262, 113, 262, 114, 262, 115, 262, 116, 262, 117, 262, 118, 262,
+ 119, 262, 120, 262, 121, 262, 122, 262, 65, 262, 66, 262, 68, 262, 69,
+ 262, 70, 262, 71, 262, 73, 262, 74, 262, 75, 262, 76, 262, 77, 262, 79,
+ 262, 83, 262, 84, 262, 85, 262, 86, 262, 87, 262, 88, 262, 89, 262, 97,
262, 98, 262, 99, 262, 100, 262, 101, 262, 102, 262, 103, 262, 104, 262,
105, 262, 106, 262, 107, 262, 108, 262, 109, 262, 110, 262, 111, 262,
112, 262, 113, 262, 114, 262, 115, 262, 116, 262, 117, 262, 118, 262,
@@ -3536,33 +3871,15 @@ static unsigned int decomp_data[] = {
262, 89, 262, 90, 262, 97, 262, 98, 262, 99, 262, 100, 262, 101, 262,
102, 262, 103, 262, 104, 262, 105, 262, 106, 262, 107, 262, 108, 262,
109, 262, 110, 262, 111, 262, 112, 262, 113, 262, 114, 262, 115, 262,
- 116, 262, 117, 262, 118, 262, 119, 262, 120, 262, 121, 262, 122, 262,
- 305, 262, 567, 262, 913, 262, 914, 262, 915, 262, 916, 262, 917, 262,
- 918, 262, 919, 262, 920, 262, 921, 262, 922, 262, 923, 262, 924, 262,
- 925, 262, 926, 262, 927, 262, 928, 262, 929, 262, 1012, 262, 931, 262,
- 932, 262, 933, 262, 934, 262, 935, 262, 936, 262, 937, 262, 8711, 262,
- 945, 262, 946, 262, 947, 262, 948, 262, 949, 262, 950, 262, 951, 262,
- 952, 262, 953, 262, 954, 262, 955, 262, 956, 262, 957, 262, 958, 262,
- 959, 262, 960, 262, 961, 262, 962, 262, 963, 262, 964, 262, 965, 262,
- 966, 262, 967, 262, 968, 262, 969, 262, 8706, 262, 1013, 262, 977, 262,
- 1008, 262, 981, 262, 1009, 262, 982, 262, 913, 262, 914, 262, 915, 262,
- 916, 262, 917, 262, 918, 262, 919, 262, 920, 262, 921, 262, 922, 262,
- 923, 262, 924, 262, 925, 262, 926, 262, 927, 262, 928, 262, 929, 262,
- 1012, 262, 931, 262, 932, 262, 933, 262, 934, 262, 935, 262, 936, 262,
- 937, 262, 8711, 262, 945, 262, 946, 262, 947, 262, 948, 262, 949, 262,
- 950, 262, 951, 262, 952, 262, 953, 262, 954, 262, 955, 262, 956, 262,
- 957, 262, 958, 262, 959, 262, 960, 262, 961, 262, 962, 262, 963, 262,
- 964, 262, 965, 262, 966, 262, 967, 262, 968, 262, 969, 262, 8706, 262,
- 1013, 262, 977, 262, 1008, 262, 981, 262, 1009, 262, 982, 262, 913, 262,
- 914, 262, 915, 262, 916, 262, 917, 262, 918, 262, 919, 262, 920, 262,
- 921, 262, 922, 262, 923, 262, 924, 262, 925, 262, 926, 262, 927, 262,
- 928, 262, 929, 262, 1012, 262, 931, 262, 932, 262, 933, 262, 934, 262,
- 935, 262, 936, 262, 937, 262, 8711, 262, 945, 262, 946, 262, 947, 262,
- 948, 262, 949, 262, 950, 262, 951, 262, 952, 262, 953, 262, 954, 262,
- 955, 262, 956, 262, 957, 262, 958, 262, 959, 262, 960, 262, 961, 262,
- 962, 262, 963, 262, 964, 262, 965, 262, 966, 262, 967, 262, 968, 262,
- 969, 262, 8706, 262, 1013, 262, 977, 262, 1008, 262, 981, 262, 1009, 262,
- 982, 262, 913, 262, 914, 262, 915, 262, 916, 262, 917, 262, 918, 262,
+ 116, 262, 117, 262, 118, 262, 119, 262, 120, 262, 121, 262, 122, 262, 65,
+ 262, 66, 262, 67, 262, 68, 262, 69, 262, 70, 262, 71, 262, 72, 262, 73,
+ 262, 74, 262, 75, 262, 76, 262, 77, 262, 78, 262, 79, 262, 80, 262, 81,
+ 262, 82, 262, 83, 262, 84, 262, 85, 262, 86, 262, 87, 262, 88, 262, 89,
+ 262, 90, 262, 97, 262, 98, 262, 99, 262, 100, 262, 101, 262, 102, 262,
+ 103, 262, 104, 262, 105, 262, 106, 262, 107, 262, 108, 262, 109, 262,
+ 110, 262, 111, 262, 112, 262, 113, 262, 114, 262, 115, 262, 116, 262,
+ 117, 262, 118, 262, 119, 262, 120, 262, 121, 262, 122, 262, 305, 262,
+ 567, 262, 913, 262, 914, 262, 915, 262, 916, 262, 917, 262, 918, 262,
919, 262, 920, 262, 921, 262, 922, 262, 923, 262, 924, 262, 925, 262,
926, 262, 927, 262, 928, 262, 929, 262, 1012, 262, 931, 262, 932, 262,
933, 262, 934, 262, 935, 262, 936, 262, 937, 262, 8711, 262, 945, 262,
@@ -3578,339 +3895,546 @@ static unsigned int decomp_data[] = {
951, 262, 952, 262, 953, 262, 954, 262, 955, 262, 956, 262, 957, 262,
958, 262, 959, 262, 960, 262, 961, 262, 962, 262, 963, 262, 964, 262,
965, 262, 966, 262, 967, 262, 968, 262, 969, 262, 8706, 262, 1013, 262,
- 977, 262, 1008, 262, 981, 262, 1009, 262, 982, 262, 988, 262, 989, 262,
- 48, 262, 49, 262, 50, 262, 51, 262, 52, 262, 53, 262, 54, 262, 55, 262,
- 56, 262, 57, 262, 48, 262, 49, 262, 50, 262, 51, 262, 52, 262, 53, 262,
- 54, 262, 55, 262, 56, 262, 57, 262, 48, 262, 49, 262, 50, 262, 51, 262,
- 52, 262, 53, 262, 54, 262, 55, 262, 56, 262, 57, 262, 48, 262, 49, 262,
- 50, 262, 51, 262, 52, 262, 53, 262, 54, 262, 55, 262, 56, 262, 57, 262,
- 48, 262, 49, 262, 50, 262, 51, 262, 52, 262, 53, 262, 54, 262, 55, 262,
- 56, 262, 57, 262, 1575, 262, 1576, 262, 1580, 262, 1583, 262, 1608, 262,
- 1586, 262, 1581, 262, 1591, 262, 1610, 262, 1603, 262, 1604, 262, 1605,
- 262, 1606, 262, 1587, 262, 1593, 262, 1601, 262, 1589, 262, 1602, 262,
- 1585, 262, 1588, 262, 1578, 262, 1579, 262, 1582, 262, 1584, 262, 1590,
- 262, 1592, 262, 1594, 262, 1646, 262, 1722, 262, 1697, 262, 1647, 262,
- 1576, 262, 1580, 262, 1607, 262, 1581, 262, 1610, 262, 1603, 262, 1604,
- 262, 1605, 262, 1606, 262, 1587, 262, 1593, 262, 1601, 262, 1589, 262,
- 1602, 262, 1588, 262, 1578, 262, 1579, 262, 1582, 262, 1590, 262, 1594,
- 262, 1580, 262, 1581, 262, 1610, 262, 1604, 262, 1606, 262, 1587, 262,
- 1593, 262, 1589, 262, 1602, 262, 1588, 262, 1582, 262, 1590, 262, 1594,
- 262, 1722, 262, 1647, 262, 1576, 262, 1580, 262, 1607, 262, 1581, 262,
- 1591, 262, 1610, 262, 1603, 262, 1605, 262, 1606, 262, 1587, 262, 1593,
- 262, 1601, 262, 1589, 262, 1602, 262, 1588, 262, 1578, 262, 1579, 262,
- 1582, 262, 1590, 262, 1592, 262, 1594, 262, 1646, 262, 1697, 262, 1575,
- 262, 1576, 262, 1580, 262, 1583, 262, 1607, 262, 1608, 262, 1586, 262,
- 1581, 262, 1591, 262, 1610, 262, 1604, 262, 1605, 262, 1606, 262, 1587,
- 262, 1593, 262, 1601, 262, 1589, 262, 1602, 262, 1585, 262, 1588, 262,
- 1578, 262, 1579, 262, 1582, 262, 1584, 262, 1590, 262, 1592, 262, 1594,
- 262, 1576, 262, 1580, 262, 1583, 262, 1608, 262, 1586, 262, 1581, 262,
- 1591, 262, 1610, 262, 1604, 262, 1605, 262, 1606, 262, 1587, 262, 1593,
- 262, 1601, 262, 1589, 262, 1602, 262, 1585, 262, 1588, 262, 1578, 262,
- 1579, 262, 1582, 262, 1584, 262, 1590, 262, 1592, 262, 1594, 514, 48, 46,
- 514, 48, 44, 514, 49, 44, 514, 50, 44, 514, 51, 44, 514, 52, 44, 514, 53,
- 44, 514, 54, 44, 514, 55, 44, 514, 56, 44, 514, 57, 44, 770, 40, 65, 41,
- 770, 40, 66, 41, 770, 40, 67, 41, 770, 40, 68, 41, 770, 40, 69, 41, 770,
- 40, 70, 41, 770, 40, 71, 41, 770, 40, 72, 41, 770, 40, 73, 41, 770, 40,
- 74, 41, 770, 40, 75, 41, 770, 40, 76, 41, 770, 40, 77, 41, 770, 40, 78,
- 41, 770, 40, 79, 41, 770, 40, 80, 41, 770, 40, 81, 41, 770, 40, 82, 41,
- 770, 40, 83, 41, 770, 40, 84, 41, 770, 40, 85, 41, 770, 40, 86, 41, 770,
- 40, 87, 41, 770, 40, 88, 41, 770, 40, 89, 41, 770, 40, 90, 41, 770,
- 12308, 83, 12309, 263, 67, 263, 82, 519, 67, 68, 519, 87, 90, 266, 65,
- 266, 66, 266, 67, 266, 68, 266, 69, 266, 70, 266, 71, 266, 72, 266, 73,
- 266, 74, 266, 75, 266, 76, 266, 77, 266, 78, 266, 79, 266, 80, 266, 81,
- 266, 82, 266, 83, 266, 84, 266, 85, 266, 86, 266, 87, 266, 88, 266, 89,
- 266, 90, 522, 72, 86, 522, 77, 86, 522, 83, 68, 522, 83, 83, 778, 80, 80,
- 86, 522, 87, 67, 515, 77, 67, 515, 77, 68, 522, 68, 74, 522, 12411,
- 12363, 522, 12467, 12467, 266, 12469, 266, 25163, 266, 23383, 266, 21452,
- 266, 12487, 266, 20108, 266, 22810, 266, 35299, 266, 22825, 266, 20132,
- 266, 26144, 266, 28961, 266, 26009, 266, 21069, 266, 24460, 266, 20877,
- 266, 26032, 266, 21021, 266, 32066, 266, 29983, 266, 36009, 266, 22768,
- 266, 21561, 266, 28436, 266, 25237, 266, 25429, 266, 19968, 266, 19977,
- 266, 36938, 266, 24038, 266, 20013, 266, 21491, 266, 25351, 266, 36208,
- 266, 25171, 266, 31105, 266, 31354, 266, 21512, 266, 28288, 266, 26377,
- 266, 26376, 266, 30003, 266, 21106, 266, 21942, 770, 12308, 26412, 12309,
- 770, 12308, 19977, 12309, 770, 12308, 20108, 12309, 770, 12308, 23433,
- 12309, 770, 12308, 28857, 12309, 770, 12308, 25171, 12309, 770, 12308,
- 30423, 12309, 770, 12308, 21213, 12309, 770, 12308, 25943, 12309, 263,
- 24471, 263, 21487, 256, 20029, 256, 20024, 256, 20033, 256, 131362, 256,
- 20320, 256, 20398, 256, 20411, 256, 20482, 256, 20602, 256, 20633, 256,
- 20711, 256, 20687, 256, 13470, 256, 132666, 256, 20813, 256, 20820, 256,
- 20836, 256, 20855, 256, 132380, 256, 13497, 256, 20839, 256, 20877, 256,
- 132427, 256, 20887, 256, 20900, 256, 20172, 256, 20908, 256, 20917, 256,
- 168415, 256, 20981, 256, 20995, 256, 13535, 256, 21051, 256, 21062, 256,
- 21106, 256, 21111, 256, 13589, 256, 21191, 256, 21193, 256, 21220, 256,
- 21242, 256, 21253, 256, 21254, 256, 21271, 256, 21321, 256, 21329, 256,
- 21338, 256, 21363, 256, 21373, 256, 21375, 256, 21375, 256, 21375, 256,
- 133676, 256, 28784, 256, 21450, 256, 21471, 256, 133987, 256, 21483, 256,
- 21489, 256, 21510, 256, 21662, 256, 21560, 256, 21576, 256, 21608, 256,
- 21666, 256, 21750, 256, 21776, 256, 21843, 256, 21859, 256, 21892, 256,
- 21892, 256, 21913, 256, 21931, 256, 21939, 256, 21954, 256, 22294, 256,
- 22022, 256, 22295, 256, 22097, 256, 22132, 256, 20999, 256, 22766, 256,
- 22478, 256, 22516, 256, 22541, 256, 22411, 256, 22578, 256, 22577, 256,
- 22700, 256, 136420, 256, 22770, 256, 22775, 256, 22790, 256, 22810, 256,
- 22818, 256, 22882, 256, 136872, 256, 136938, 256, 23020, 256, 23067, 256,
- 23079, 256, 23000, 256, 23142, 256, 14062, 256, 14076, 256, 23304, 256,
- 23358, 256, 23358, 256, 137672, 256, 23491, 256, 23512, 256, 23527, 256,
- 23539, 256, 138008, 256, 23551, 256, 23558, 256, 24403, 256, 23586, 256,
- 14209, 256, 23648, 256, 23662, 256, 23744, 256, 23693, 256, 138724, 256,
- 23875, 256, 138726, 256, 23918, 256, 23915, 256, 23932, 256, 24033, 256,
- 24034, 256, 14383, 256, 24061, 256, 24104, 256, 24125, 256, 24169, 256,
- 14434, 256, 139651, 256, 14460, 256, 24240, 256, 24243, 256, 24246, 256,
- 24266, 256, 172946, 256, 24318, 256, 140081, 256, 140081, 256, 33281,
- 256, 24354, 256, 24354, 256, 14535, 256, 144056, 256, 156122, 256, 24418,
- 256, 24427, 256, 14563, 256, 24474, 256, 24525, 256, 24535, 256, 24569,
- 256, 24705, 256, 14650, 256, 14620, 256, 24724, 256, 141012, 256, 24775,
- 256, 24904, 256, 24908, 256, 24910, 256, 24908, 256, 24954, 256, 24974,
- 256, 25010, 256, 24996, 256, 25007, 256, 25054, 256, 25074, 256, 25078,
- 256, 25104, 256, 25115, 256, 25181, 256, 25265, 256, 25300, 256, 25424,
- 256, 142092, 256, 25405, 256, 25340, 256, 25448, 256, 25475, 256, 25572,
- 256, 142321, 256, 25634, 256, 25541, 256, 25513, 256, 14894, 256, 25705,
- 256, 25726, 256, 25757, 256, 25719, 256, 14956, 256, 25935, 256, 25964,
- 256, 143370, 256, 26083, 256, 26360, 256, 26185, 256, 15129, 256, 26257,
- 256, 15112, 256, 15076, 256, 20882, 256, 20885, 256, 26368, 256, 26268,
- 256, 32941, 256, 17369, 256, 26391, 256, 26395, 256, 26401, 256, 26462,
- 256, 26451, 256, 144323, 256, 15177, 256, 26618, 256, 26501, 256, 26706,
- 256, 26757, 256, 144493, 256, 26766, 256, 26655, 256, 26900, 256, 15261,
- 256, 26946, 256, 27043, 256, 27114, 256, 27304, 256, 145059, 256, 27355,
- 256, 15384, 256, 27425, 256, 145575, 256, 27476, 256, 15438, 256, 27506,
- 256, 27551, 256, 27578, 256, 27579, 256, 146061, 256, 138507, 256,
- 146170, 256, 27726, 256, 146620, 256, 27839, 256, 27853, 256, 27751, 256,
- 27926, 256, 27966, 256, 28023, 256, 27969, 256, 28009, 256, 28024, 256,
- 28037, 256, 146718, 256, 27956, 256, 28207, 256, 28270, 256, 15667, 256,
- 28363, 256, 28359, 256, 147153, 256, 28153, 256, 28526, 256, 147294, 256,
- 147342, 256, 28614, 256, 28729, 256, 28702, 256, 28699, 256, 15766, 256,
- 28746, 256, 28797, 256, 28791, 256, 28845, 256, 132389, 256, 28997, 256,
- 148067, 256, 29084, 256, 148395, 256, 29224, 256, 29237, 256, 29264, 256,
- 149000, 256, 29312, 256, 29333, 256, 149301, 256, 149524, 256, 29562,
- 256, 29579, 256, 16044, 256, 29605, 256, 16056, 256, 16056, 256, 29767,
- 256, 29788, 256, 29809, 256, 29829, 256, 29898, 256, 16155, 256, 29988,
- 256, 150582, 256, 30014, 256, 150674, 256, 30064, 256, 139679, 256,
- 30224, 256, 151457, 256, 151480, 256, 151620, 256, 16380, 256, 16392,
- 256, 30452, 256, 151795, 256, 151794, 256, 151833, 256, 151859, 256,
- 30494, 256, 30495, 256, 30495, 256, 30538, 256, 16441, 256, 30603, 256,
- 16454, 256, 16534, 256, 152605, 256, 30798, 256, 30860, 256, 30924, 256,
- 16611, 256, 153126, 256, 31062, 256, 153242, 256, 153285, 256, 31119,
- 256, 31211, 256, 16687, 256, 31296, 256, 31306, 256, 31311, 256, 153980,
- 256, 154279, 256, 154279, 256, 31470, 256, 16898, 256, 154539, 256,
- 31686, 256, 31689, 256, 16935, 256, 154752, 256, 31954, 256, 17056, 256,
- 31976, 256, 31971, 256, 32000, 256, 155526, 256, 32099, 256, 17153, 256,
- 32199, 256, 32258, 256, 32325, 256, 17204, 256, 156200, 256, 156231, 256,
- 17241, 256, 156377, 256, 32634, 256, 156478, 256, 32661, 256, 32762, 256,
- 32773, 256, 156890, 256, 156963, 256, 32864, 256, 157096, 256, 32880,
- 256, 144223, 256, 17365, 256, 32946, 256, 33027, 256, 17419, 256, 33086,
- 256, 23221, 256, 157607, 256, 157621, 256, 144275, 256, 144284, 256,
- 33281, 256, 33284, 256, 36766, 256, 17515, 256, 33425, 256, 33419, 256,
- 33437, 256, 21171, 256, 33457, 256, 33459, 256, 33469, 256, 33510, 256,
- 158524, 256, 33509, 256, 33565, 256, 33635, 256, 33709, 256, 33571, 256,
- 33725, 256, 33767, 256, 33879, 256, 33619, 256, 33738, 256, 33740, 256,
- 33756, 256, 158774, 256, 159083, 256, 158933, 256, 17707, 256, 34033,
- 256, 34035, 256, 34070, 256, 160714, 256, 34148, 256, 159532, 256, 17757,
- 256, 17761, 256, 159665, 256, 159954, 256, 17771, 256, 34384, 256, 34396,
- 256, 34407, 256, 34409, 256, 34473, 256, 34440, 256, 34574, 256, 34530,
- 256, 34681, 256, 34600, 256, 34667, 256, 34694, 256, 17879, 256, 34785,
- 256, 34817, 256, 17913, 256, 34912, 256, 34915, 256, 161383, 256, 35031,
- 256, 35038, 256, 17973, 256, 35066, 256, 13499, 256, 161966, 256, 162150,
- 256, 18110, 256, 18119, 256, 35488, 256, 35565, 256, 35722, 256, 35925,
- 256, 162984, 256, 36011, 256, 36033, 256, 36123, 256, 36215, 256, 163631,
- 256, 133124, 256, 36299, 256, 36284, 256, 36336, 256, 133342, 256, 36564,
- 256, 36664, 256, 165330, 256, 165357, 256, 37012, 256, 37105, 256, 37137,
- 256, 165678, 256, 37147, 256, 37432, 256, 37591, 256, 37592, 256, 37500,
- 256, 37881, 256, 37909, 256, 166906, 256, 38283, 256, 18837, 256, 38327,
- 256, 167287, 256, 18918, 256, 38595, 256, 23986, 256, 38691, 256, 168261,
- 256, 168474, 256, 19054, 256, 19062, 256, 38880, 256, 168970, 256, 19122,
- 256, 169110, 256, 38923, 256, 38923, 256, 38953, 256, 169398, 256, 39138,
- 256, 19251, 256, 39209, 256, 39335, 256, 39362, 256, 39422, 256, 19406,
- 256, 170800, 256, 39698, 256, 40000, 256, 40189, 256, 19662, 256, 19693,
- 256, 40295, 256, 172238, 256, 19704, 256, 172293, 256, 172558, 256,
- 172689, 256, 40635, 256, 19798, 256, 40697, 256, 40702, 256, 40709, 256,
- 40719, 256, 40726, 256, 40763, 256, 173568,
+ 977, 262, 1008, 262, 981, 262, 1009, 262, 982, 262, 913, 262, 914, 262,
+ 915, 262, 916, 262, 917, 262, 918, 262, 919, 262, 920, 262, 921, 262,
+ 922, 262, 923, 262, 924, 262, 925, 262, 926, 262, 927, 262, 928, 262,
+ 929, 262, 1012, 262, 931, 262, 932, 262, 933, 262, 934, 262, 935, 262,
+ 936, 262, 937, 262, 8711, 262, 945, 262, 946, 262, 947, 262, 948, 262,
+ 949, 262, 950, 262, 951, 262, 952, 262, 953, 262, 954, 262, 955, 262,
+ 956, 262, 957, 262, 958, 262, 959, 262, 960, 262, 961, 262, 962, 262,
+ 963, 262, 964, 262, 965, 262, 966, 262, 967, 262, 968, 262, 969, 262,
+ 8706, 262, 1013, 262, 977, 262, 1008, 262, 981, 262, 1009, 262, 982, 262,
+ 913, 262, 914, 262, 915, 262, 916, 262, 917, 262, 918, 262, 919, 262,
+ 920, 262, 921, 262, 922, 262, 923, 262, 924, 262, 925, 262, 926, 262,
+ 927, 262, 928, 262, 929, 262, 1012, 262, 931, 262, 932, 262, 933, 262,
+ 934, 262, 935, 262, 936, 262, 937, 262, 8711, 262, 945, 262, 946, 262,
+ 947, 262, 948, 262, 949, 262, 950, 262, 951, 262, 952, 262, 953, 262,
+ 954, 262, 955, 262, 956, 262, 957, 262, 958, 262, 959, 262, 960, 262,
+ 961, 262, 962, 262, 963, 262, 964, 262, 965, 262, 966, 262, 967, 262,
+ 968, 262, 969, 262, 8706, 262, 1013, 262, 977, 262, 1008, 262, 981, 262,
+ 1009, 262, 982, 262, 913, 262, 914, 262, 915, 262, 916, 262, 917, 262,
+ 918, 262, 919, 262, 920, 262, 921, 262, 922, 262, 923, 262, 924, 262,
+ 925, 262, 926, 262, 927, 262, 928, 262, 929, 262, 1012, 262, 931, 262,
+ 932, 262, 933, 262, 934, 262, 935, 262, 936, 262, 937, 262, 8711, 262,
+ 945, 262, 946, 262, 947, 262, 948, 262, 949, 262, 950, 262, 951, 262,
+ 952, 262, 953, 262, 954, 262, 955, 262, 956, 262, 957, 262, 958, 262,
+ 959, 262, 960, 262, 961, 262, 962, 262, 963, 262, 964, 262, 965, 262,
+ 966, 262, 967, 262, 968, 262, 969, 262, 8706, 262, 1013, 262, 977, 262,
+ 1008, 262, 981, 262, 1009, 262, 982, 262, 988, 262, 989, 262, 48, 262,
+ 49, 262, 50, 262, 51, 262, 52, 262, 53, 262, 54, 262, 55, 262, 56, 262,
+ 57, 262, 48, 262, 49, 262, 50, 262, 51, 262, 52, 262, 53, 262, 54, 262,
+ 55, 262, 56, 262, 57, 262, 48, 262, 49, 262, 50, 262, 51, 262, 52, 262,
+ 53, 262, 54, 262, 55, 262, 56, 262, 57, 262, 48, 262, 49, 262, 50, 262,
+ 51, 262, 52, 262, 53, 262, 54, 262, 55, 262, 56, 262, 57, 262, 48, 262,
+ 49, 262, 50, 262, 51, 262, 52, 262, 53, 262, 54, 262, 55, 262, 56, 262,
+ 57, 262, 1575, 262, 1576, 262, 1580, 262, 1583, 262, 1608, 262, 1586,
+ 262, 1581, 262, 1591, 262, 1610, 262, 1603, 262, 1604, 262, 1605, 262,
+ 1606, 262, 1587, 262, 1593, 262, 1601, 262, 1589, 262, 1602, 262, 1585,
+ 262, 1588, 262, 1578, 262, 1579, 262, 1582, 262, 1584, 262, 1590, 262,
+ 1592, 262, 1594, 262, 1646, 262, 1722, 262, 1697, 262, 1647, 262, 1576,
+ 262, 1580, 262, 1607, 262, 1581, 262, 1610, 262, 1603, 262, 1604, 262,
+ 1605, 262, 1606, 262, 1587, 262, 1593, 262, 1601, 262, 1589, 262, 1602,
+ 262, 1588, 262, 1578, 262, 1579, 262, 1582, 262, 1590, 262, 1594, 262,
+ 1580, 262, 1581, 262, 1610, 262, 1604, 262, 1606, 262, 1587, 262, 1593,
+ 262, 1589, 262, 1602, 262, 1588, 262, 1582, 262, 1590, 262, 1594, 262,
+ 1722, 262, 1647, 262, 1576, 262, 1580, 262, 1607, 262, 1581, 262, 1591,
+ 262, 1610, 262, 1603, 262, 1605, 262, 1606, 262, 1587, 262, 1593, 262,
+ 1601, 262, 1589, 262, 1602, 262, 1588, 262, 1578, 262, 1579, 262, 1582,
+ 262, 1590, 262, 1592, 262, 1594, 262, 1646, 262, 1697, 262, 1575, 262,
+ 1576, 262, 1580, 262, 1583, 262, 1607, 262, 1608, 262, 1586, 262, 1581,
+ 262, 1591, 262, 1610, 262, 1604, 262, 1605, 262, 1606, 262, 1587, 262,
+ 1593, 262, 1601, 262, 1589, 262, 1602, 262, 1585, 262, 1588, 262, 1578,
+ 262, 1579, 262, 1582, 262, 1584, 262, 1590, 262, 1592, 262, 1594, 262,
+ 1576, 262, 1580, 262, 1583, 262, 1608, 262, 1586, 262, 1581, 262, 1591,
+ 262, 1610, 262, 1604, 262, 1605, 262, 1606, 262, 1587, 262, 1593, 262,
+ 1601, 262, 1589, 262, 1602, 262, 1585, 262, 1588, 262, 1578, 262, 1579,
+ 262, 1582, 262, 1584, 262, 1590, 262, 1592, 262, 1594, 514, 48, 46, 514,
+ 48, 44, 514, 49, 44, 514, 50, 44, 514, 51, 44, 514, 52, 44, 514, 53, 44,
+ 514, 54, 44, 514, 55, 44, 514, 56, 44, 514, 57, 44, 770, 40, 65, 41, 770,
+ 40, 66, 41, 770, 40, 67, 41, 770, 40, 68, 41, 770, 40, 69, 41, 770, 40,
+ 70, 41, 770, 40, 71, 41, 770, 40, 72, 41, 770, 40, 73, 41, 770, 40, 74,
+ 41, 770, 40, 75, 41, 770, 40, 76, 41, 770, 40, 77, 41, 770, 40, 78, 41,
+ 770, 40, 79, 41, 770, 40, 80, 41, 770, 40, 81, 41, 770, 40, 82, 41, 770,
+ 40, 83, 41, 770, 40, 84, 41, 770, 40, 85, 41, 770, 40, 86, 41, 770, 40,
+ 87, 41, 770, 40, 88, 41, 770, 40, 89, 41, 770, 40, 90, 41, 770, 12308,
+ 83, 12309, 263, 67, 263, 82, 519, 67, 68, 519, 87, 90, 266, 65, 266, 66,
+ 266, 67, 266, 68, 266, 69, 266, 70, 266, 71, 266, 72, 266, 73, 266, 74,
+ 266, 75, 266, 76, 266, 77, 266, 78, 266, 79, 266, 80, 266, 81, 266, 82,
+ 266, 83, 266, 84, 266, 85, 266, 86, 266, 87, 266, 88, 266, 89, 266, 90,
+ 522, 72, 86, 522, 77, 86, 522, 83, 68, 522, 83, 83, 778, 80, 80, 86, 522,
+ 87, 67, 515, 77, 67, 515, 77, 68, 522, 68, 74, 522, 12411, 12363, 522,
+ 12467, 12467, 266, 12469, 266, 25163, 266, 23383, 266, 21452, 266, 12487,
+ 266, 20108, 266, 22810, 266, 35299, 266, 22825, 266, 20132, 266, 26144,
+ 266, 28961, 266, 26009, 266, 21069, 266, 24460, 266, 20877, 266, 26032,
+ 266, 21021, 266, 32066, 266, 29983, 266, 36009, 266, 22768, 266, 21561,
+ 266, 28436, 266, 25237, 266, 25429, 266, 19968, 266, 19977, 266, 36938,
+ 266, 24038, 266, 20013, 266, 21491, 266, 25351, 266, 36208, 266, 25171,
+ 266, 31105, 266, 31354, 266, 21512, 266, 28288, 266, 26377, 266, 26376,
+ 266, 30003, 266, 21106, 266, 21942, 770, 12308, 26412, 12309, 770, 12308,
+ 19977, 12309, 770, 12308, 20108, 12309, 770, 12308, 23433, 12309, 770,
+ 12308, 28857, 12309, 770, 12308, 25171, 12309, 770, 12308, 30423, 12309,
+ 770, 12308, 21213, 12309, 770, 12308, 25943, 12309, 263, 24471, 263,
+ 21487, 256, 20029, 256, 20024, 256, 20033, 256, 131362, 256, 20320, 256,
+ 20398, 256, 20411, 256, 20482, 256, 20602, 256, 20633, 256, 20711, 256,
+ 20687, 256, 13470, 256, 132666, 256, 20813, 256, 20820, 256, 20836, 256,
+ 20855, 256, 132380, 256, 13497, 256, 20839, 256, 20877, 256, 132427, 256,
+ 20887, 256, 20900, 256, 20172, 256, 20908, 256, 20917, 256, 168415, 256,
+ 20981, 256, 20995, 256, 13535, 256, 21051, 256, 21062, 256, 21106, 256,
+ 21111, 256, 13589, 256, 21191, 256, 21193, 256, 21220, 256, 21242, 256,
+ 21253, 256, 21254, 256, 21271, 256, 21321, 256, 21329, 256, 21338, 256,
+ 21363, 256, 21373, 256, 21375, 256, 21375, 256, 21375, 256, 133676, 256,
+ 28784, 256, 21450, 256, 21471, 256, 133987, 256, 21483, 256, 21489, 256,
+ 21510, 256, 21662, 256, 21560, 256, 21576, 256, 21608, 256, 21666, 256,
+ 21750, 256, 21776, 256, 21843, 256, 21859, 256, 21892, 256, 21892, 256,
+ 21913, 256, 21931, 256, 21939, 256, 21954, 256, 22294, 256, 22022, 256,
+ 22295, 256, 22097, 256, 22132, 256, 20999, 256, 22766, 256, 22478, 256,
+ 22516, 256, 22541, 256, 22411, 256, 22578, 256, 22577, 256, 22700, 256,
+ 136420, 256, 22770, 256, 22775, 256, 22790, 256, 22810, 256, 22818, 256,
+ 22882, 256, 136872, 256, 136938, 256, 23020, 256, 23067, 256, 23079, 256,
+ 23000, 256, 23142, 256, 14062, 256, 14076, 256, 23304, 256, 23358, 256,
+ 23358, 256, 137672, 256, 23491, 256, 23512, 256, 23527, 256, 23539, 256,
+ 138008, 256, 23551, 256, 23558, 256, 24403, 256, 23586, 256, 14209, 256,
+ 23648, 256, 23662, 256, 23744, 256, 23693, 256, 138724, 256, 23875, 256,
+ 138726, 256, 23918, 256, 23915, 256, 23932, 256, 24033, 256, 24034, 256,
+ 14383, 256, 24061, 256, 24104, 256, 24125, 256, 24169, 256, 14434, 256,
+ 139651, 256, 14460, 256, 24240, 256, 24243, 256, 24246, 256, 24266, 256,
+ 172946, 256, 24318, 256, 140081, 256, 140081, 256, 33281, 256, 24354,
+ 256, 24354, 256, 14535, 256, 144056, 256, 156122, 256, 24418, 256, 24427,
+ 256, 14563, 256, 24474, 256, 24525, 256, 24535, 256, 24569, 256, 24705,
+ 256, 14650, 256, 14620, 256, 24724, 256, 141012, 256, 24775, 256, 24904,
+ 256, 24908, 256, 24910, 256, 24908, 256, 24954, 256, 24974, 256, 25010,
+ 256, 24996, 256, 25007, 256, 25054, 256, 25074, 256, 25078, 256, 25104,
+ 256, 25115, 256, 25181, 256, 25265, 256, 25300, 256, 25424, 256, 142092,
+ 256, 25405, 256, 25340, 256, 25448, 256, 25475, 256, 25572, 256, 142321,
+ 256, 25634, 256, 25541, 256, 25513, 256, 14894, 256, 25705, 256, 25726,
+ 256, 25757, 256, 25719, 256, 14956, 256, 25935, 256, 25964, 256, 143370,
+ 256, 26083, 256, 26360, 256, 26185, 256, 15129, 256, 26257, 256, 15112,
+ 256, 15076, 256, 20882, 256, 20885, 256, 26368, 256, 26268, 256, 32941,
+ 256, 17369, 256, 26391, 256, 26395, 256, 26401, 256, 26462, 256, 26451,
+ 256, 144323, 256, 15177, 256, 26618, 256, 26501, 256, 26706, 256, 26757,
+ 256, 144493, 256, 26766, 256, 26655, 256, 26900, 256, 15261, 256, 26946,
+ 256, 27043, 256, 27114, 256, 27304, 256, 145059, 256, 27355, 256, 15384,
+ 256, 27425, 256, 145575, 256, 27476, 256, 15438, 256, 27506, 256, 27551,
+ 256, 27578, 256, 27579, 256, 146061, 256, 138507, 256, 146170, 256,
+ 27726, 256, 146620, 256, 27839, 256, 27853, 256, 27751, 256, 27926, 256,
+ 27966, 256, 28023, 256, 27969, 256, 28009, 256, 28024, 256, 28037, 256,
+ 146718, 256, 27956, 256, 28207, 256, 28270, 256, 15667, 256, 28363, 256,
+ 28359, 256, 147153, 256, 28153, 256, 28526, 256, 147294, 256, 147342,
+ 256, 28614, 256, 28729, 256, 28702, 256, 28699, 256, 15766, 256, 28746,
+ 256, 28797, 256, 28791, 256, 28845, 256, 132389, 256, 28997, 256, 148067,
+ 256, 29084, 256, 148395, 256, 29224, 256, 29237, 256, 29264, 256, 149000,
+ 256, 29312, 256, 29333, 256, 149301, 256, 149524, 256, 29562, 256, 29579,
+ 256, 16044, 256, 29605, 256, 16056, 256, 16056, 256, 29767, 256, 29788,
+ 256, 29809, 256, 29829, 256, 29898, 256, 16155, 256, 29988, 256, 150582,
+ 256, 30014, 256, 150674, 256, 30064, 256, 139679, 256, 30224, 256,
+ 151457, 256, 151480, 256, 151620, 256, 16380, 256, 16392, 256, 30452,
+ 256, 151795, 256, 151794, 256, 151833, 256, 151859, 256, 30494, 256,
+ 30495, 256, 30495, 256, 30538, 256, 16441, 256, 30603, 256, 16454, 256,
+ 16534, 256, 152605, 256, 30798, 256, 30860, 256, 30924, 256, 16611, 256,
+ 153126, 256, 31062, 256, 153242, 256, 153285, 256, 31119, 256, 31211,
+ 256, 16687, 256, 31296, 256, 31306, 256, 31311, 256, 153980, 256, 154279,
+ 256, 154279, 256, 31470, 256, 16898, 256, 154539, 256, 31686, 256, 31689,
+ 256, 16935, 256, 154752, 256, 31954, 256, 17056, 256, 31976, 256, 31971,
+ 256, 32000, 256, 155526, 256, 32099, 256, 17153, 256, 32199, 256, 32258,
+ 256, 32325, 256, 17204, 256, 156200, 256, 156231, 256, 17241, 256,
+ 156377, 256, 32634, 256, 156478, 256, 32661, 256, 32762, 256, 32773, 256,
+ 156890, 256, 156963, 256, 32864, 256, 157096, 256, 32880, 256, 144223,
+ 256, 17365, 256, 32946, 256, 33027, 256, 17419, 256, 33086, 256, 23221,
+ 256, 157607, 256, 157621, 256, 144275, 256, 144284, 256, 33281, 256,
+ 33284, 256, 36766, 256, 17515, 256, 33425, 256, 33419, 256, 33437, 256,
+ 21171, 256, 33457, 256, 33459, 256, 33469, 256, 33510, 256, 158524, 256,
+ 33509, 256, 33565, 256, 33635, 256, 33709, 256, 33571, 256, 33725, 256,
+ 33767, 256, 33879, 256, 33619, 256, 33738, 256, 33740, 256, 33756, 256,
+ 158774, 256, 159083, 256, 158933, 256, 17707, 256, 34033, 256, 34035,
+ 256, 34070, 256, 160714, 256, 34148, 256, 159532, 256, 17757, 256, 17761,
+ 256, 159665, 256, 159954, 256, 17771, 256, 34384, 256, 34396, 256, 34407,
+ 256, 34409, 256, 34473, 256, 34440, 256, 34574, 256, 34530, 256, 34681,
+ 256, 34600, 256, 34667, 256, 34694, 256, 17879, 256, 34785, 256, 34817,
+ 256, 17913, 256, 34912, 256, 34915, 256, 161383, 256, 35031, 256, 35038,
+ 256, 17973, 256, 35066, 256, 13499, 256, 161966, 256, 162150, 256, 18110,
+ 256, 18119, 256, 35488, 256, 35565, 256, 35722, 256, 35925, 256, 162984,
+ 256, 36011, 256, 36033, 256, 36123, 256, 36215, 256, 163631, 256, 133124,
+ 256, 36299, 256, 36284, 256, 36336, 256, 133342, 256, 36564, 256, 36664,
+ 256, 165330, 256, 165357, 256, 37012, 256, 37105, 256, 37137, 256,
+ 165678, 256, 37147, 256, 37432, 256, 37591, 256, 37592, 256, 37500, 256,
+ 37881, 256, 37909, 256, 166906, 256, 38283, 256, 18837, 256, 38327, 256,
+ 167287, 256, 18918, 256, 38595, 256, 23986, 256, 38691, 256, 168261, 256,
+ 168474, 256, 19054, 256, 19062, 256, 38880, 256, 168970, 256, 19122, 256,
+ 169110, 256, 38923, 256, 38923, 256, 38953, 256, 169398, 256, 39138, 256,
+ 19251, 256, 39209, 256, 39335, 256, 39362, 256, 39422, 256, 19406, 256,
+ 170800, 256, 39698, 256, 40000, 256, 40189, 256, 19662, 256, 19693, 256,
+ 40295, 256, 172238, 256, 19704, 256, 172293, 256, 172558, 256, 172689,
+ 256, 40635, 256, 19798, 256, 40697, 256, 40702, 256, 40709, 256, 40719,
+ 256, 40726, 256, 40763, 256, 173568,
};
/* index tables for the decomposition data */
-#define DECOMP_SHIFT 8
+#define DECOMP_SHIFT 7
static unsigned char decomp_index1[] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 16, 7, 17, 18, 19, 20, 21, 22, 23, 24, 7, 7, 7, 7, 7, 25,
- 7, 26, 27, 28, 29, 30, 31, 32, 33, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 34, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 35, 36, 37, 38, 39, 40,
- 41, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 42, 43, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 44, 7, 7, 45,
- 46, 47, 48, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 49, 7, 7, 50, 51, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 52, 53, 54, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 10, 11, 12, 0, 0, 0, 0, 13, 14, 15, 0,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 0, 42, 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44,
+ 45, 0, 0, 46, 0, 47, 0, 0, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 59, 60, 61, 0, 0, 0, 0, 0, 0, 62, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
+ 74, 75, 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 78, 0, 0, 0, 79, 0, 0, 80, 0,
+ 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 83, 0, 0, 0, 0, 84, 85,
+ 86, 87, 88, 89, 90, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 92, 93, 0, 0, 0, 0, 94, 95, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 98, 99, 100, 101, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
static unsigned short decomp_index2[] = {
@@ -3978,38 +4502,22 @@ static unsigned short decomp_index2[] = {
0, 0, 0, 0, 1066, 1069, 1072, 1075, 0, 0, 1078, 1081, 0, 0, 1084, 1087,
1090, 1093, 1096, 1099, 0, 0, 1102, 1105, 1108, 1111, 1114, 1117, 0, 0,
1120, 1123, 1126, 1129, 1132, 1135, 1138, 1141, 1144, 1147, 1150, 1153,
- 0, 0, 1156, 1159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1162, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1165, 1168, 1171, 1174,
- 1177, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 1180, 1183, 1186, 1189, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1192, 0, 1195, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1198, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1156, 1159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1162, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1165, 1168, 1171, 1174, 1177, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1180, 1183, 1186, 1189, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1192, 0, 1195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1198, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1201, 0, 0, 0,
@@ -4031,191 +4539,175 @@ static unsigned short decomp_index2[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1267, 0, 0, 1270, 1273, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1276, 1279, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1282, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1285, 1288, 1291, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 1267, 0, 0, 1270, 1273, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 1276, 1279, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1282, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1294, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 1285, 1288, 1291, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1297, 0, 0, 0, 0, 0, 0, 1300, 1303, 0, 1306, 1309, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1294, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1297, 0, 0, 0, 0, 0, 0, 1300, 1303, 0,
- 1306, 1309, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1312, 1315, 1318, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1312, 1315, 1318, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1321, 0, 1324, 1327, 1330, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1333, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1321, 0, 1324, 1327, 1330, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1333, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1336, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1339, 1342, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1345, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1347, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1350, 0, 0, 0, 0, 1353, 0, 0, 0, 0, 1356, 0, 0, 0, 0, 1359, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1362, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1365, 0,
+ 1368, 1371, 1374, 1377, 1380, 0, 0, 0, 0, 0, 0, 0, 1383, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1386, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1389, 0, 0, 0, 0, 1392, 0, 0, 0, 0, 1395, 0, 0, 0, 0, 1398, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1401, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1336, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1339, 1342, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1345, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1404,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1347, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1350, 0, 0, 0, 0, 1353, 0, 0, 0, 0,
- 1356, 0, 0, 0, 0, 1359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1362, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 1365, 0, 1368, 1371, 1374, 1377, 1380, 0, 0, 0, 0,
- 0, 0, 0, 1383, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1386,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 1389, 0, 0, 0, 0, 1392, 0, 0, 0, 0, 1395, 0,
- 0, 0, 0, 1398, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1401, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 1404, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 1407, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1409, 0, 1412, 0,
- 1415, 0, 1418, 0, 1421, 0, 0, 0, 1424, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 1427, 0, 1430, 0, 0, 1433, 1436, 0, 1439, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1442, 1444, 1446, 0, 1448, 1450, 1452,
- 1454, 1456, 1458, 1460, 1462, 1464, 1466, 1468, 0, 1470, 1472, 1474,
- 1476, 1478, 1480, 1482, 1484, 1486, 1488, 1490, 1492, 1494, 1496, 1498,
- 1500, 1502, 1504, 0, 1506, 1508, 1510, 1512, 1514, 1516, 1518, 1520,
- 1522, 1524, 1526, 1528, 1530, 1532, 1534, 1536, 1538, 1540, 1542, 1544,
- 1546, 1548, 1550, 1552, 1554, 1556, 1558, 1560, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 1562, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1564, 1566, 1568,
- 1570, 1572, 1574, 1576, 1578, 1580, 1582, 1584, 1586, 1588, 1590, 1592,
- 1594, 1596, 1598, 1600, 1602, 1604, 1606, 1608, 1610, 1612, 1614, 1616,
- 1618, 1620, 1622, 1624, 1626, 1628, 1630, 1632, 1634, 1636, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1638, 1641, 1644, 1647, 1650, 1653,
- 1656, 1659, 1662, 1665, 1668, 1671, 1674, 1677, 1680, 1683, 1686, 1689,
- 1692, 1695, 1698, 1701, 1704, 1707, 1710, 1713, 1716, 1719, 1722, 1725,
- 1728, 1731, 1734, 1737, 1740, 1743, 1746, 1749, 1752, 1755, 1758, 1761,
- 1764, 1767, 1770, 1773, 1776, 1779, 1782, 1785, 1788, 1791, 1794, 1797,
- 1800, 1803, 1806, 1809, 1812, 1815, 1818, 1821, 1824, 1827, 1830, 1833,
- 1836, 1839, 1842, 1845, 1848, 1851, 1854, 1857, 1860, 1863, 1866, 1869,
- 1872, 1875, 1878, 1881, 1884, 1887, 1890, 1893, 1896, 1899, 1902, 1905,
- 1908, 1911, 1914, 1917, 1920, 1923, 1926, 1929, 1932, 1935, 1938, 1941,
- 1944, 1947, 1950, 1953, 1956, 1959, 1962, 1965, 1968, 1971, 1974, 1977,
- 1980, 1983, 1986, 1989, 1992, 1995, 1998, 2001, 2004, 2007, 2010, 2013,
- 2016, 2019, 2022, 2025, 2028, 2031, 2034, 2037, 2040, 2043, 2046, 2049,
- 2052, 2055, 2058, 2061, 2064, 2067, 2070, 2073, 2076, 2079, 2082, 2085,
- 2088, 2091, 2094, 2097, 2100, 2103, 0, 0, 0, 0, 2106, 2109, 2112, 2115,
- 2118, 2121, 2124, 2127, 2130, 2133, 2136, 2139, 2142, 2145, 2148, 2151,
- 2154, 2157, 2160, 2163, 2166, 2169, 2172, 2175, 2178, 2181, 2184, 2187,
- 2190, 2193, 2196, 2199, 2202, 2205, 2208, 2211, 2214, 2217, 2220, 2223,
- 2226, 2229, 2232, 2235, 2238, 2241, 2244, 2247, 2250, 2253, 2256, 2259,
- 2262, 2265, 2268, 2271, 2274, 2277, 2280, 2283, 2286, 2289, 2292, 2295,
- 2298, 2301, 2304, 2307, 2310, 2313, 2316, 2319, 2322, 2325, 2328, 2331,
- 2334, 2337, 2340, 2343, 2346, 2349, 2352, 2355, 2358, 2361, 2364, 2367,
- 2370, 2373, 0, 0, 0, 0, 0, 0, 2376, 2379, 2382, 2385, 2388, 2391, 2394,
- 2397, 2400, 2403, 2406, 2409, 2412, 2415, 2418, 2421, 2424, 2427, 2430,
- 2433, 2436, 2439, 0, 0, 2442, 2445, 2448, 2451, 2454, 2457, 0, 0, 2460,
- 2463, 2466, 2469, 2472, 2475, 2478, 2481, 2484, 2487, 2490, 2493, 2496,
- 2499, 2502, 2505, 2508, 2511, 2514, 2517, 2520, 2523, 2526, 2529, 2532,
- 2535, 2538, 2541, 2544, 2547, 2550, 2553, 2556, 2559, 2562, 2565, 2568,
- 2571, 0, 0, 2574, 2577, 2580, 2583, 2586, 2589, 0, 0, 2592, 2595, 2598,
- 2601, 2604, 2607, 2610, 2613, 0, 2616, 0, 2619, 0, 2622, 0, 2625, 2628,
- 2631, 2634, 2637, 2640, 2643, 2646, 2649, 2652, 2655, 2658, 2661, 2664,
- 2667, 2670, 2673, 2676, 2679, 2681, 2684, 2686, 2689, 2691, 2694, 2696,
- 2699, 2701, 2704, 2706, 2709, 0, 0, 2711, 2714, 2717, 2720, 2723, 2726,
- 2729, 2732, 2735, 2738, 2741, 2744, 2747, 2750, 2753, 2756, 2759, 2762,
- 2765, 2768, 2771, 2774, 2777, 2780, 2783, 2786, 2789, 2792, 2795, 2798,
- 2801, 2804, 2807, 2810, 2813, 2816, 2819, 2822, 2825, 2828, 2831, 2834,
- 2837, 2840, 2843, 2846, 2849, 2852, 2855, 2858, 2861, 2864, 2867, 0,
- 2870, 2873, 2876, 2879, 2882, 2885, 2887, 2890, 2893, 2895, 2898, 2901,
- 2904, 2907, 2910, 0, 2913, 2916, 2919, 2922, 2924, 2927, 2929, 2932,
- 2935, 2938, 2941, 2944, 2947, 2950, 0, 0, 2952, 2955, 2958, 2961, 2964,
- 2967, 0, 2969, 2972, 2975, 2978, 2981, 2984, 2987, 2989, 2992, 2995,
- 2998, 3001, 3004, 3007, 3010, 3012, 3015, 3018, 3020, 0, 0, 3022, 3025,
- 3028, 0, 3031, 3034, 3037, 3040, 3042, 3045, 3047, 3050, 3052, 0, 3055,
- 3057, 3059, 3061, 3063, 3065, 3067, 3069, 3071, 3073, 3075, 0, 0, 0, 0,
- 0, 0, 3077, 0, 0, 0, 0, 0, 3079, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 3082, 3084, 3087, 0, 0, 0, 0, 0, 0, 0, 0, 3091, 0, 0, 0, 3093, 3096, 0,
- 3100, 3103, 0, 0, 0, 0, 3107, 0, 3110, 0, 0, 0, 0, 0, 0, 0, 0, 3113,
- 3116, 3119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3122, 0, 0, 0, 0, 0,
- 0, 0, 3127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3129, 3131,
- 0, 0, 3133, 3135, 3137, 3139, 3141, 3143, 3145, 3147, 3149, 3151, 3153,
- 3155, 3157, 3159, 3161, 3163, 3165, 3167, 3169, 3171, 3173, 3175, 3177,
- 3179, 3181, 3183, 3185, 0, 3187, 3189, 3191, 3193, 3195, 3197, 3199,
- 3201, 3203, 3205, 3207, 3209, 3211, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 3213, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3216, 3220, 3224,
- 3226, 0, 3229, 3233, 3237, 0, 3239, 3242, 3244, 3246, 3248, 3250, 3252,
- 3254, 3256, 3258, 3260, 0, 3262, 3264, 0, 0, 3267, 3269, 3271, 3273,
- 3275, 0, 0, 3277, 3280, 3284, 0, 3287, 0, 3289, 0, 3291, 0, 3293, 3295,
- 3297, 3299, 0, 3301, 3303, 3305, 0, 3307, 3309, 3311, 3313, 3315, 3317,
- 3319, 0, 3321, 3325, 3327, 3329, 3331, 3333, 0, 0, 0, 0, 3335, 3337,
- 3339, 3341, 3343, 0, 0, 0, 0, 0, 0, 3345, 3349, 3353, 3358, 3362, 3366,
- 3370, 3374, 3378, 3382, 3386, 3390, 3394, 3398, 3402, 3406, 3409, 3411,
- 3414, 3418, 3421, 3423, 3426, 3430, 3435, 3438, 3440, 3443, 3447, 3449,
- 3451, 3453, 3455, 3457, 3460, 3464, 3467, 3469, 3472, 3476, 3481, 3484,
- 3486, 3489, 3493, 3495, 3497, 3499, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3501, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3505, 3508, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3511, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3514,
- 3517, 3520, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 3523, 0, 0, 0, 0, 3526, 0, 0, 3529, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3532, 0, 3535,
- 0, 0, 0, 0, 0, 3538, 3541, 0, 3545, 3548, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 3552, 0, 0, 3555, 0, 0, 3558, 0, 3561, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3564, 0, 3567, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 3570, 3573, 3576, 3579, 3582, 0, 0, 3585, 3588,
- 0, 0, 3591, 3594, 0, 0, 0, 0, 0, 0, 3597, 3600, 0, 0, 3603, 3606, 0, 0,
- 3609, 3612, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3615, 3618, 3621, 3624, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3627,
- 3630, 3633, 3636, 0, 0, 0, 0, 0, 0, 3639, 3642, 3645, 3648, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 3651, 3653, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1407, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1409, 0, 1412, 0, 1415, 0, 1418, 0, 1421, 0, 0,
+ 0, 1424, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1427, 0, 1430,
+ 0, 0, 1433, 1436, 0, 1439, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1442, 1444, 1446, 0,
+ 1448, 1450, 1452, 1454, 1456, 1458, 1460, 1462, 1464, 1466, 1468, 0,
+ 1470, 1472, 1474, 1476, 1478, 1480, 1482, 1484, 1486, 1488, 1490, 1492,
+ 1494, 1496, 1498, 1500, 1502, 1504, 0, 1506, 1508, 1510, 1512, 1514,
+ 1516, 1518, 1520, 1522, 1524, 1526, 1528, 1530, 1532, 1534, 1536, 1538,
+ 1540, 1542, 1544, 1546, 1548, 1550, 1552, 1554, 1556, 1558, 1560, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1562, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1564, 1566, 1568, 1570, 1572, 1574, 1576, 1578, 1580, 1582, 1584, 1586,
+ 1588, 1590, 1592, 1594, 1596, 1598, 1600, 1602, 1604, 1606, 1608, 1610,
+ 1612, 1614, 1616, 1618, 1620, 1622, 1624, 1626, 1628, 1630, 1632, 1634,
+ 1636, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1638, 1641, 1644,
+ 1647, 1650, 1653, 1656, 1659, 1662, 1665, 1668, 1671, 1674, 1677, 1680,
+ 1683, 1686, 1689, 1692, 1695, 1698, 1701, 1704, 1707, 1710, 1713, 1716,
+ 1719, 1722, 1725, 1728, 1731, 1734, 1737, 1740, 1743, 1746, 1749, 1752,
+ 1755, 1758, 1761, 1764, 1767, 1770, 1773, 1776, 1779, 1782, 1785, 1788,
+ 1791, 1794, 1797, 1800, 1803, 1806, 1809, 1812, 1815, 1818, 1821, 1824,
+ 1827, 1830, 1833, 1836, 1839, 1842, 1845, 1848, 1851, 1854, 1857, 1860,
+ 1863, 1866, 1869, 1872, 1875, 1878, 1881, 1884, 1887, 1890, 1893, 1896,
+ 1899, 1902, 1905, 1908, 1911, 1914, 1917, 1920, 1923, 1926, 1929, 1932,
+ 1935, 1938, 1941, 1944, 1947, 1950, 1953, 1956, 1959, 1962, 1965, 1968,
+ 1971, 1974, 1977, 1980, 1983, 1986, 1989, 1992, 1995, 1998, 2001, 2004,
+ 2007, 2010, 2013, 2016, 2019, 2022, 2025, 2028, 2031, 2034, 2037, 2040,
+ 2043, 2046, 2049, 2052, 2055, 2058, 2061, 2064, 2067, 2070, 2073, 2076,
+ 2079, 2082, 2085, 2088, 2091, 2094, 2097, 2100, 2103, 0, 0, 0, 0, 2106,
+ 2109, 2112, 2115, 2118, 2121, 2124, 2127, 2130, 2133, 2136, 2139, 2142,
+ 2145, 2148, 2151, 2154, 2157, 2160, 2163, 2166, 2169, 2172, 2175, 2178,
+ 2181, 2184, 2187, 2190, 2193, 2196, 2199, 2202, 2205, 2208, 2211, 2214,
+ 2217, 2220, 2223, 2226, 2229, 2232, 2235, 2238, 2241, 2244, 2247, 2250,
+ 2253, 2256, 2259, 2262, 2265, 2268, 2271, 2274, 2277, 2280, 2283, 2286,
+ 2289, 2292, 2295, 2298, 2301, 2304, 2307, 2310, 2313, 2316, 2319, 2322,
+ 2325, 2328, 2331, 2334, 2337, 2340, 2343, 2346, 2349, 2352, 2355, 2358,
+ 2361, 2364, 2367, 2370, 2373, 0, 0, 0, 0, 0, 0, 2376, 2379, 2382, 2385,
+ 2388, 2391, 2394, 2397, 2400, 2403, 2406, 2409, 2412, 2415, 2418, 2421,
+ 2424, 2427, 2430, 2433, 2436, 2439, 0, 0, 2442, 2445, 2448, 2451, 2454,
+ 2457, 0, 0, 2460, 2463, 2466, 2469, 2472, 2475, 2478, 2481, 2484, 2487,
+ 2490, 2493, 2496, 2499, 2502, 2505, 2508, 2511, 2514, 2517, 2520, 2523,
+ 2526, 2529, 2532, 2535, 2538, 2541, 2544, 2547, 2550, 2553, 2556, 2559,
+ 2562, 2565, 2568, 2571, 0, 0, 2574, 2577, 2580, 2583, 2586, 2589, 0, 0,
+ 2592, 2595, 2598, 2601, 2604, 2607, 2610, 2613, 0, 2616, 0, 2619, 0,
+ 2622, 0, 2625, 2628, 2631, 2634, 2637, 2640, 2643, 2646, 2649, 2652,
+ 2655, 2658, 2661, 2664, 2667, 2670, 2673, 2676, 2679, 2681, 2684, 2686,
+ 2689, 2691, 2694, 2696, 2699, 2701, 2704, 2706, 2709, 0, 0, 2711, 2714,
+ 2717, 2720, 2723, 2726, 2729, 2732, 2735, 2738, 2741, 2744, 2747, 2750,
+ 2753, 2756, 2759, 2762, 2765, 2768, 2771, 2774, 2777, 2780, 2783, 2786,
+ 2789, 2792, 2795, 2798, 2801, 2804, 2807, 2810, 2813, 2816, 2819, 2822,
+ 2825, 2828, 2831, 2834, 2837, 2840, 2843, 2846, 2849, 2852, 2855, 2858,
+ 2861, 2864, 2867, 0, 2870, 2873, 2876, 2879, 2882, 2885, 2887, 2890,
+ 2893, 2895, 2898, 2901, 2904, 2907, 2910, 0, 2913, 2916, 2919, 2922,
+ 2924, 2927, 2929, 2932, 2935, 2938, 2941, 2944, 2947, 2950, 0, 0, 2952,
+ 2955, 2958, 2961, 2964, 2967, 0, 2969, 2972, 2975, 2978, 2981, 2984,
+ 2987, 2989, 2992, 2995, 2998, 3001, 3004, 3007, 3010, 3012, 3015, 3018,
+ 3020, 0, 0, 3022, 3025, 3028, 0, 3031, 3034, 3037, 3040, 3042, 3045,
+ 3047, 3050, 3052, 0, 3055, 3057, 3059, 3061, 3063, 3065, 3067, 3069,
+ 3071, 3073, 3075, 0, 0, 0, 0, 0, 0, 3077, 0, 0, 0, 0, 0, 3079, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 3082, 3084, 3087, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3091, 0, 0, 0, 3093, 3096, 0, 3100, 3103, 0, 0, 0, 0, 3107, 0, 3110, 0,
+ 0, 0, 0, 0, 0, 0, 0, 3113, 3116, 3119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 3122, 0, 0, 0, 0, 0, 0, 0, 3127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 3129, 3131, 0, 0, 3133, 3135, 3137, 3139, 3141, 3143,
+ 3145, 3147, 3149, 3151, 3153, 3155, 3157, 3159, 3161, 3163, 3165, 3167,
+ 3169, 3171, 3173, 3175, 3177, 3179, 3181, 3183, 3185, 0, 3187, 3189,
+ 3191, 3193, 3195, 3197, 3199, 3201, 3203, 3205, 3207, 3209, 3211, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 3213, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 3216, 3220, 3224, 3226, 0, 3229, 3233, 3237, 0, 3239, 3242, 3244,
+ 3246, 3248, 3250, 3252, 3254, 3256, 3258, 3260, 0, 3262, 3264, 0, 0,
+ 3267, 3269, 3271, 3273, 3275, 0, 0, 3277, 3280, 3284, 0, 3287, 0, 3289,
+ 0, 3291, 0, 3293, 3295, 3297, 3299, 0, 3301, 3303, 3305, 0, 3307, 3309,
+ 3311, 3313, 3315, 3317, 3319, 0, 3321, 3325, 3327, 3329, 3331, 3333, 0,
+ 0, 0, 0, 3335, 3337, 3339, 3341, 3343, 0, 0, 0, 0, 0, 0, 3345, 3349,
+ 3353, 3358, 3362, 3366, 3370, 3374, 3378, 3382, 3386, 3390, 3394, 3398,
+ 3402, 3406, 3409, 3411, 3414, 3418, 3421, 3423, 3426, 3430, 3435, 3438,
+ 3440, 3443, 3447, 3449, 3451, 3453, 3455, 3457, 3460, 3464, 3467, 3469,
+ 3472, 3476, 3481, 3484, 3486, 3489, 3493, 3495, 3497, 3499, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 3501, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3505, 3508, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3511,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 3514, 3517, 3520, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3523, 0, 0, 0, 0, 3526,
+ 0, 0, 3529, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 3532, 0, 3535, 0, 0, 0, 0, 0, 3538, 3541, 0, 3545, 3548, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3552, 0, 0, 3555, 0, 0, 3558,
+ 0, 3561, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 3564, 0, 3567, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3570, 3573, 3576, 3579,
+ 3582, 0, 0, 3585, 3588, 0, 0, 3591, 3594, 0, 0, 0, 0, 0, 0, 3597, 3600,
+ 0, 0, 3603, 3606, 0, 0, 3609, 3612, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3615,
+ 3618, 3621, 3624, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 3627, 3630, 3633, 3636, 0, 0, 0, 0, 0, 0, 3639, 3642,
+ 3645, 3648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3651, 3653, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -4256,23 +4748,7 @@ static unsigned short decomp_index2[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 4101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4101, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4103, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -4370,785 +4846,822 @@ static unsigned short decomp_index2[] = {
6530, 6533, 6536, 6539, 6542, 6545, 6548, 6551, 6554, 6558, 6562, 6566,
6570, 6574, 6578, 6582, 6586, 6590, 6594, 6598, 6602, 6606, 6610, 6614,
6618, 6622, 6626, 6630, 6634, 6638, 6642, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 6646, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 6648, 6650, 0, 0, 0, 0, 0, 0, 6652, 6654, 6656, 6658, 6660, 6662, 6664,
- 6666, 6668, 6670, 6672, 6674, 6676, 6678, 6680, 6682, 6684, 6686, 6688,
- 6690, 6692, 6694, 6696, 6698, 6700, 6702, 6704, 6706, 6708, 6710, 6712,
- 6714, 6716, 6718, 6720, 6722, 6724, 6726, 6728, 6730, 6732, 6734, 6736,
- 6738, 6740, 6742, 6744, 6746, 6748, 6750, 6752, 6754, 6756, 6758, 6760,
- 6762, 6764, 6766, 6768, 6770, 6772, 6774, 6776, 6778, 6780, 6782, 6784,
- 6786, 6788, 6790, 6792, 6794, 6796, 6798, 6800, 6802, 6804, 6806, 6808,
- 6810, 6812, 6814, 6816, 6818, 6820, 6822, 6824, 6826, 6828, 6830, 6832,
- 6834, 6836, 6838, 6840, 6842, 6844, 6846, 6848, 6850, 6852, 6854, 6856,
- 6858, 6860, 6862, 6864, 6866, 6868, 6870, 6872, 6874, 6876, 6878, 6880,
- 6882, 6884, 6886, 6888, 6890, 6892, 6894, 6896, 6898, 6900, 6902, 6904,
- 6906, 6908, 6910, 6912, 6914, 6916, 6918, 6920, 6922, 6924, 6926, 6928,
- 6930, 6932, 6934, 6936, 6938, 6940, 6942, 6944, 6946, 6948, 6950, 6952,
- 6954, 6956, 6958, 6960, 6962, 6964, 6966, 6968, 6970, 6972, 6974, 6976,
- 6978, 6980, 6982, 6984, 6986, 6988, 6990, 6992, 6994, 6996, 6998, 7000,
- 7002, 7004, 7006, 7008, 7010, 7012, 7014, 7016, 7018, 7020, 7022, 7024,
- 7026, 7028, 7030, 7032, 7034, 7036, 7038, 7040, 7042, 7044, 7046, 7048,
- 7050, 7052, 7054, 7056, 7058, 7060, 7062, 7064, 7066, 7068, 7070, 7072,
- 7074, 7076, 7078, 7080, 7082, 7084, 7086, 7088, 7090, 7092, 7094, 7096,
- 7098, 7100, 7102, 7104, 7106, 7108, 7110, 7112, 7114, 7116, 7118, 7120,
- 7122, 7124, 7126, 7128, 7130, 7132, 7134, 7136, 7138, 7140, 7142, 7144,
- 7146, 7148, 7150, 7152, 7154, 7156, 7158, 7160, 7162, 7164, 7166, 7168,
- 7170, 7172, 7174, 7176, 7178, 7180, 7182, 7184, 7186, 7188, 7190, 0, 0,
- 7192, 0, 7194, 0, 0, 7196, 7198, 7200, 7202, 7204, 7206, 7208, 7210,
- 7212, 7214, 0, 7216, 0, 7218, 0, 0, 7220, 7222, 0, 0, 0, 7224, 7226,
- 7228, 7230, 7232, 7234, 7236, 7238, 7240, 7242, 7244, 7246, 7248, 7250,
- 7252, 7254, 7256, 7258, 7260, 7262, 7264, 7266, 7268, 7270, 7272, 7274,
- 7276, 7278, 7280, 7282, 7284, 7286, 7288, 7290, 7292, 7294, 7296, 7298,
- 7300, 7302, 7304, 7306, 7308, 7310, 7312, 7314, 7316, 7318, 7320, 7322,
- 7324, 7326, 7328, 7330, 7332, 7334, 7336, 7338, 7340, 7342, 7344, 7346,
- 7348, 7350, 7352, 7354, 7356, 7358, 0, 0, 7360, 7362, 7364, 7366, 7368,
- 7370, 7372, 7374, 7376, 7378, 7380, 7382, 7384, 7386, 7388, 7390, 7392,
- 7394, 7396, 7398, 7400, 7402, 7404, 7406, 7408, 7410, 7412, 7414, 7416,
- 7418, 7420, 7422, 7424, 7426, 7428, 7430, 7432, 7434, 7436, 7438, 7440,
- 7442, 7444, 7446, 7448, 7450, 7452, 7454, 7456, 7458, 7460, 7462, 7464,
- 7466, 7468, 7470, 7472, 7474, 7476, 7478, 7480, 7482, 7484, 7486, 7488,
- 7490, 7492, 7494, 7496, 7498, 7500, 7502, 7504, 7506, 7508, 7510, 7512,
- 7514, 7516, 7518, 7520, 7522, 7524, 7526, 7528, 7530, 7532, 7534, 7536,
- 7538, 7540, 7542, 7544, 7546, 7548, 7550, 7552, 7554, 7556, 7558, 7560,
- 7562, 7564, 7566, 7568, 7570, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 7572, 7575, 7578, 7581, 7585, 7589, 7592, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 7595, 7598, 7601, 7604, 7607, 0, 0, 0, 0, 0, 7610, 0, 7613, 7616,
- 7618, 7620, 7622, 7624, 7626, 7628, 7630, 7632, 7634, 7636, 7639, 7642,
- 7645, 7648, 7651, 7654, 7657, 7660, 7663, 7666, 7669, 7672, 0, 7675,
- 7678, 7681, 7684, 7687, 0, 7690, 0, 7693, 7696, 0, 7699, 7702, 0, 7705,
- 7708, 7711, 7714, 7717, 7720, 7723, 7726, 7729, 7732, 7735, 7737, 7739,
- 7741, 7743, 7745, 7747, 7749, 7751, 7753, 7755, 7757, 7759, 7761, 7763,
- 7765, 7767, 7769, 7771, 7773, 7775, 7777, 7779, 7781, 7783, 7785, 7787,
- 7789, 7791, 7793, 7795, 7797, 7799, 7801, 7803, 7805, 7807, 7809, 7811,
- 7813, 7815, 7817, 7819, 7821, 7823, 7825, 7827, 7829, 7831, 7833, 7835,
- 7837, 7839, 7841, 7843, 7845, 7847, 7849, 7851, 7853, 7855, 7857, 7859,
- 7861, 7863, 7865, 7867, 7869, 7871, 7873, 7875, 7877, 7879, 7881, 7883,
- 7885, 7887, 7889, 7891, 7893, 7895, 7897, 7899, 7901, 7903, 7905, 7907,
- 7909, 7911, 7913, 7915, 7917, 7919, 7921, 7923, 7925, 7927, 7929, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 7931, 7933, 7935, 7937, 7939, 7941, 7943, 7945,
- 7947, 7949, 7951, 7953, 7955, 7957, 7959, 7961, 7963, 7965, 7967, 7969,
- 7971, 7973, 7975, 7977, 7980, 7983, 7986, 7989, 7992, 7995, 7998, 8001,
- 8004, 8007, 8010, 8013, 8016, 8019, 8022, 8025, 8028, 8031, 8033, 8035,
- 8037, 8039, 8042, 8045, 8048, 8051, 8054, 8057, 8060, 8063, 8066, 8069,
- 8072, 8075, 8078, 8081, 8084, 8087, 8090, 8093, 8096, 8099, 8102, 8105,
- 8108, 8111, 8114, 8117, 8120, 8123, 8126, 8129, 8132, 8135, 8138, 8141,
- 8144, 8147, 8150, 8153, 8156, 8159, 8162, 8165, 8168, 8171, 8174, 8177,
- 8180, 8183, 8186, 8189, 8192, 8195, 8198, 8201, 8204, 8207, 8210, 8213,
- 8216, 8219, 8222, 8225, 8228, 8231, 8234, 8237, 8240, 8243, 8246, 8249,
- 8252, 8255, 8258, 8261, 8264, 8267, 8270, 8273, 8276, 8279, 8282, 8285,
- 8288, 8291, 8294, 8297, 8300, 8303, 8306, 8309, 8312, 8315, 8318, 8321,
- 8325, 8329, 8333, 8337, 8341, 8345, 8348, 8351, 8354, 8357, 8360, 8363,
- 8366, 8369, 8372, 8375, 8378, 8381, 8384, 8387, 8390, 8393, 8396, 8399,
- 8402, 8405, 8408, 8411, 8414, 8417, 8420, 8423, 8426, 8429, 8432, 8435,
- 8438, 8441, 8444, 8447, 8450, 8453, 8456, 8459, 8462, 8465, 8468, 8471,
- 8474, 8477, 8480, 8483, 8486, 8489, 8492, 8495, 8498, 8501, 8504, 8507,
- 8510, 8513, 8516, 8519, 8522, 8525, 8528, 8531, 8534, 8537, 8540, 8543,
- 8546, 8549, 8552, 8555, 8558, 8561, 8564, 8567, 8570, 8573, 8576, 8579,
- 8582, 8585, 8588, 8591, 8594, 8597, 8600, 8603, 8606, 8609, 8612, 8615,
- 8618, 8621, 8624, 8627, 8630, 8633, 8636, 8639, 8642, 8645, 8648, 8651,
- 8654, 8657, 8660, 8663, 8666, 8669, 8672, 8675, 8678, 8681, 8684, 8687,
- 8690, 8693, 8696, 8699, 8702, 8705, 8708, 8711, 8714, 8717, 8720, 8723,
- 8726, 8729, 8732, 8735, 8738, 8741, 8744, 8747, 8750, 8753, 8756, 8759,
- 8762, 8765, 8768, 8771, 8775, 8779, 8783, 8786, 8789, 8792, 8795, 8798,
- 8801, 8804, 8807, 8810, 8813, 8816, 8819, 8822, 8825, 8828, 8831, 8834,
- 8837, 8840, 8843, 8846, 8849, 8852, 8855, 8858, 8861, 8864, 8867, 8870,
- 8873, 8876, 8879, 8882, 8885, 8888, 8891, 8894, 8897, 8900, 8903, 8906,
- 8909, 8912, 8915, 8918, 8921, 8924, 8927, 8930, 8933, 8936, 8939, 8942,
- 8945, 8948, 8951, 8954, 8957, 8960, 8963, 8966, 8969, 8972, 8975, 8978,
- 8981, 8984, 8987, 8990, 8993, 8996, 8999, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 9002, 9006, 9010, 9014, 9018, 9022, 9026, 9030,
- 9034, 9038, 9042, 9046, 9050, 9054, 9058, 9062, 9066, 9070, 9074, 9078,
- 9082, 9086, 9090, 9094, 9098, 9102, 9106, 9110, 9114, 9118, 9122, 9126,
- 9130, 9134, 9138, 9142, 9146, 9150, 9154, 9158, 9162, 9166, 9170, 9174,
- 9178, 9182, 9186, 9190, 9194, 9198, 9202, 9206, 9210, 9214, 9218, 9222,
- 9226, 9230, 9234, 9238, 9242, 9246, 9250, 9254, 0, 0, 9258, 9262, 9266,
- 9270, 9274, 9278, 9282, 9286, 9290, 9294, 9298, 9302, 9306, 9310, 9314,
- 9318, 9322, 9326, 9330, 9334, 9338, 9342, 9346, 9350, 9354, 9358, 9362,
- 9366, 9370, 9374, 9378, 9382, 9386, 9390, 9394, 9398, 9402, 9406, 9410,
- 9414, 9418, 9422, 9426, 9430, 9434, 9438, 9442, 9446, 9450, 9454, 9458,
- 9462, 9466, 9470, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9474,
- 9478, 9482, 9487, 9492, 9497, 9502, 9507, 9512, 9517, 9521, 9540, 9549,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9554, 9556,
- 9558, 9560, 9562, 9564, 9566, 9568, 9570, 9572, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9574, 9576, 9578, 9580, 9582,
- 9584, 9586, 9588, 9590, 9592, 9594, 9596, 9598, 9600, 9602, 9604, 9606,
- 9608, 9610, 9612, 9614, 0, 0, 9616, 9618, 9620, 9622, 9624, 9626, 9628,
- 9630, 9632, 9634, 9636, 9638, 0, 9640, 9642, 9644, 9646, 9648, 9650,
- 9652, 9654, 9656, 9658, 9660, 9662, 9664, 9666, 9668, 9670, 9672, 9674,
- 9676, 0, 9678, 9680, 9682, 9684, 0, 0, 0, 0, 9686, 9689, 9692, 0, 9695,
- 0, 9698, 9701, 9704, 9707, 9710, 9713, 9716, 9719, 9722, 9725, 9728,
- 9730, 9732, 9734, 9736, 9738, 9740, 9742, 9744, 9746, 9748, 9750, 9752,
- 9754, 9756, 9758, 9760, 9762, 9764, 9766, 9768, 9770, 9772, 9774, 9776,
- 9778, 9780, 9782, 9784, 9786, 9788, 9790, 9792, 9794, 9796, 9798, 9800,
- 9802, 9804, 9806, 9808, 9810, 9812, 9814, 9816, 9818, 9820, 9822, 9824,
- 9826, 9828, 9830, 9832, 9834, 9836, 9838, 9840, 9842, 9844, 9846, 9848,
- 9850, 9852, 9854, 9856, 9858, 9860, 9862, 9864, 9866, 9868, 9870, 9872,
- 9874, 9876, 9878, 9880, 9882, 9884, 9886, 9888, 9890, 9892, 9894, 9896,
- 9898, 9900, 9902, 9904, 9906, 9908, 9910, 9912, 9914, 9916, 9918, 9920,
- 9922, 9924, 9926, 9928, 9930, 9932, 9934, 9936, 9938, 9940, 9942, 9944,
- 9946, 9948, 9950, 9952, 9954, 9956, 9958, 9960, 9962, 9965, 9968, 9971,
- 9974, 9977, 9980, 9983, 0, 0, 0, 0, 9986, 9988, 9990, 9992, 9994, 9996,
- 9998, 10000, 10002, 10004, 10006, 10008, 10010, 10012, 10014, 10016,
- 10018, 10020, 10022, 10024, 10026, 10028, 10030, 10032, 10034, 10036,
- 10038, 10040, 10042, 10044, 10046, 10048, 10050, 10052, 10054, 10056,
- 10058, 10060, 10062, 10064, 10066, 10068, 10070, 10072, 10074, 10076,
- 10078, 10080, 10082, 10084, 10086, 10088, 10090, 10092, 10094, 10096,
- 10098, 10100, 10102, 10104, 10106, 10108, 10110, 10112, 10114, 10116,
- 10118, 10120, 10122, 10124, 10126, 10128, 10130, 10132, 10134, 10136,
- 10138, 10140, 10142, 10144, 10146, 10148, 10150, 10152, 10154, 10156,
- 10158, 10160, 10162, 10164, 10166, 10168, 10170, 10172, 10174, 10176,
- 10178, 10180, 10182, 10184, 10186, 10188, 10190, 10192, 10194, 10196,
- 10198, 10200, 10202, 10204, 10206, 10208, 10210, 10212, 10214, 10216,
- 10218, 10220, 10222, 10224, 10226, 10228, 10230, 10232, 10234, 10236,
- 10238, 10240, 10242, 10244, 10246, 10248, 10250, 10252, 10254, 10256,
- 10258, 10260, 10262, 10264, 10266, 10268, 10270, 10272, 10274, 10276,
- 10278, 10280, 10282, 10284, 10286, 10288, 10290, 10292, 10294, 10296,
- 10298, 10300, 10302, 10304, 10306, 10308, 10310, 10312, 10314, 10316,
- 10318, 10320, 10322, 10324, 10326, 10328, 10330, 10332, 10334, 10336,
- 10338, 10340, 10342, 10344, 10346, 10348, 10350, 10352, 10354, 10356,
- 10358, 10360, 10362, 10364, 0, 0, 0, 10366, 10368, 10370, 10372, 10374,
- 10376, 0, 0, 10378, 10380, 10382, 10384, 10386, 10388, 0, 0, 10390,
- 10392, 10394, 10396, 10398, 10400, 0, 0, 10402, 10404, 10406, 0, 0, 0,
- 10408, 10410, 10412, 10414, 10416, 10418, 10420, 0, 10422, 10424, 10426,
- 10428, 10430, 10432, 10434, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10436, 0, 10439, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 10442, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10445, 10448, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10451, 10454, 10457, 10460, 10463,
- 10466, 10469, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10472, 10475,
- 10478, 10481, 10484, 10487, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 10490, 10492, 10494, 10496, 10498, 10500, 10502, 10504, 10506, 10508,
- 10510, 10512, 10514, 10516, 10518, 10520, 10522, 10524, 10526, 10528,
- 10530, 10532, 10534, 10536, 10538, 10540, 10542, 10544, 10546, 10548,
- 10550, 10552, 10554, 10556, 10558, 10560, 10562, 10564, 10566, 10568,
- 10570, 10572, 10574, 10576, 10578, 10580, 10582, 10584, 10586, 10588,
- 10590, 10592, 10594, 10596, 10598, 10600, 10602, 10604, 10606, 10608,
- 10610, 10612, 10614, 10616, 10618, 10620, 10622, 10624, 10626, 10628,
- 10630, 10632, 10634, 10636, 10638, 10640, 10642, 10644, 10646, 10648,
- 10650, 10652, 10654, 10656, 10658, 0, 10660, 10662, 10664, 10666, 10668,
- 10670, 10672, 10674, 10676, 10678, 10680, 10682, 10684, 10686, 10688,
- 10690, 10692, 10694, 10696, 10698, 10700, 10702, 10704, 10706, 10708,
- 10710, 10712, 10714, 10716, 10718, 10720, 10722, 10724, 10726, 10728,
- 10730, 10732, 10734, 10736, 10738, 10740, 10742, 10744, 10746, 10748,
- 10750, 10752, 10754, 10756, 10758, 10760, 10762, 10764, 10766, 10768,
- 10770, 10772, 10774, 10776, 10778, 10780, 10782, 10784, 10786, 10788,
- 10790, 10792, 10794, 10796, 10798, 10800, 0, 10802, 10804, 0, 0, 10806,
- 0, 0, 10808, 10810, 0, 0, 10812, 10814, 10816, 10818, 0, 10820, 10822,
- 10824, 10826, 10828, 10830, 10832, 10834, 10836, 10838, 10840, 10842, 0,
- 10844, 0, 10846, 10848, 10850, 10852, 10854, 10856, 10858, 0, 10860,
- 10862, 10864, 10866, 10868, 10870, 10872, 10874, 10876, 10878, 10880,
- 10882, 10884, 10886, 10888, 10890, 10892, 10894, 10896, 10898, 10900,
- 10902, 10904, 10906, 10908, 10910, 10912, 10914, 10916, 10918, 10920,
- 10922, 10924, 10926, 10928, 10930, 10932, 10934, 10936, 10938, 10940,
- 10942, 10944, 10946, 10948, 10950, 10952, 10954, 10956, 10958, 10960,
- 10962, 10964, 10966, 10968, 10970, 10972, 10974, 10976, 10978, 10980,
- 10982, 10984, 10986, 10988, 0, 10990, 10992, 10994, 10996, 0, 0, 10998,
- 11000, 11002, 11004, 11006, 11008, 11010, 11012, 0, 11014, 11016, 11018,
- 11020, 11022, 11024, 11026, 0, 11028, 11030, 11032, 11034, 11036, 11038,
- 11040, 11042, 11044, 11046, 11048, 11050, 11052, 11054, 11056, 11058,
- 11060, 11062, 11064, 11066, 11068, 11070, 11072, 11074, 11076, 11078,
- 11080, 11082, 0, 11084, 11086, 11088, 11090, 0, 11092, 11094, 11096,
- 11098, 11100, 0, 11102, 0, 0, 0, 11104, 11106, 11108, 11110, 11112,
- 11114, 11116, 0, 11118, 11120, 11122, 11124, 11126, 11128, 11130, 11132,
- 11134, 11136, 11138, 11140, 11142, 11144, 11146, 11148, 11150, 11152,
- 11154, 11156, 11158, 11160, 11162, 11164, 11166, 11168, 11170, 11172,
- 11174, 11176, 11178, 11180, 11182, 11184, 11186, 11188, 11190, 11192,
- 11194, 11196, 11198, 11200, 11202, 11204, 11206, 11208, 11210, 11212,
- 11214, 11216, 11218, 11220, 11222, 11224, 11226, 11228, 11230, 11232,
- 11234, 11236, 11238, 11240, 11242, 11244, 11246, 11248, 11250, 11252,
- 11254, 11256, 11258, 11260, 11262, 11264, 11266, 11268, 11270, 11272,
- 11274, 11276, 11278, 11280, 11282, 11284, 11286, 11288, 11290, 11292,
- 11294, 11296, 11298, 11300, 11302, 11304, 11306, 11308, 11310, 11312,
- 11314, 11316, 11318, 11320, 11322, 11324, 11326, 11328, 11330, 11332,
- 11334, 11336, 11338, 11340, 11342, 11344, 11346, 11348, 11350, 11352,
- 11354, 11356, 11358, 11360, 11362, 11364, 11366, 11368, 11370, 11372,
- 11374, 11376, 11378, 11380, 11382, 11384, 11386, 11388, 11390, 11392,
- 11394, 11396, 11398, 11400, 11402, 11404, 11406, 11408, 11410, 11412,
- 11414, 11416, 11418, 11420, 11422, 11424, 11426, 11428, 11430, 11432,
- 11434, 11436, 11438, 11440, 11442, 11444, 11446, 11448, 11450, 11452,
- 11454, 11456, 11458, 11460, 11462, 11464, 11466, 11468, 11470, 11472,
- 11474, 11476, 11478, 11480, 11482, 11484, 11486, 11488, 11490, 11492,
- 11494, 11496, 11498, 11500, 11502, 11504, 11506, 11508, 11510, 11512,
- 11514, 11516, 11518, 11520, 11522, 11524, 11526, 11528, 11530, 11532,
- 11534, 11536, 11538, 11540, 11542, 11544, 11546, 11548, 11550, 11552,
- 11554, 11556, 11558, 11560, 11562, 11564, 11566, 11568, 11570, 11572,
- 11574, 11576, 11578, 11580, 11582, 11584, 11586, 11588, 11590, 11592,
- 11594, 11596, 11598, 11600, 11602, 11604, 11606, 11608, 11610, 11612,
- 11614, 11616, 11618, 11620, 11622, 11624, 11626, 11628, 11630, 11632,
- 11634, 11636, 11638, 11640, 11642, 11644, 11646, 11648, 11650, 11652,
- 11654, 11656, 11658, 11660, 11662, 11664, 11666, 11668, 11670, 11672,
- 11674, 11676, 11678, 11680, 11682, 11684, 11686, 11688, 11690, 11692,
- 11694, 11696, 11698, 11700, 11702, 11704, 11706, 11708, 11710, 11712,
- 11714, 11716, 11718, 11720, 11722, 11724, 11726, 11728, 11730, 11732,
- 11734, 11736, 11738, 11740, 11742, 11744, 11746, 11748, 11750, 11752,
- 11754, 11756, 11758, 11760, 11762, 11764, 11766, 11768, 11770, 11772,
- 11774, 11776, 11778, 11780, 11782, 11784, 11786, 11788, 11790, 11792,
- 11794, 11796, 0, 0, 11798, 11800, 11802, 11804, 11806, 11808, 11810,
- 11812, 11814, 11816, 11818, 11820, 11822, 11824, 11826, 11828, 11830,
- 11832, 11834, 11836, 11838, 11840, 11842, 11844, 11846, 11848, 11850,
- 11852, 11854, 11856, 11858, 11860, 11862, 11864, 11866, 11868, 11870,
- 11872, 11874, 11876, 11878, 11880, 11882, 11884, 11886, 11888, 11890,
- 11892, 11894, 11896, 11898, 11900, 11902, 11904, 11906, 11908, 11910,
- 11912, 11914, 11916, 11918, 11920, 11922, 11924, 11926, 11928, 11930,
- 11932, 11934, 11936, 11938, 11940, 11942, 11944, 11946, 11948, 11950,
- 11952, 11954, 11956, 11958, 11960, 11962, 11964, 11966, 11968, 11970,
- 11972, 11974, 11976, 11978, 11980, 11982, 11984, 11986, 11988, 11990,
- 11992, 11994, 11996, 11998, 12000, 12002, 12004, 12006, 12008, 12010,
- 12012, 12014, 12016, 12018, 12020, 12022, 12024, 12026, 12028, 12030,
- 12032, 12034, 12036, 12038, 12040, 12042, 12044, 12046, 12048, 12050,
- 12052, 12054, 12056, 12058, 12060, 12062, 12064, 12066, 12068, 12070,
- 12072, 12074, 12076, 12078, 12080, 12082, 12084, 12086, 12088, 12090,
- 12092, 12094, 12096, 12098, 12100, 12102, 12104, 12106, 12108, 12110,
- 12112, 12114, 12116, 12118, 12120, 12122, 12124, 12126, 12128, 12130,
- 12132, 12134, 12136, 12138, 12140, 12142, 12144, 12146, 12148, 12150,
- 12152, 12154, 12156, 12158, 12160, 12162, 12164, 12166, 12168, 12170,
- 12172, 12174, 12176, 12178, 12180, 12182, 12184, 12186, 12188, 12190,
- 12192, 12194, 12196, 12198, 12200, 12202, 12204, 12206, 12208, 12210,
- 12212, 12214, 12216, 12218, 12220, 12222, 12224, 12226, 12228, 12230,
- 12232, 12234, 12236, 12238, 12240, 12242, 12244, 12246, 12248, 12250,
- 12252, 12254, 12256, 12258, 12260, 12262, 12264, 12266, 12268, 12270,
- 12272, 12274, 12276, 12278, 12280, 12282, 12284, 12286, 12288, 12290,
- 12292, 12294, 12296, 12298, 12300, 12302, 12304, 12306, 12308, 12310,
- 12312, 12314, 12316, 12318, 12320, 12322, 12324, 12326, 12328, 12330,
- 12332, 12334, 12336, 12338, 12340, 12342, 12344, 12346, 12348, 12350,
- 12352, 12354, 12356, 12358, 12360, 12362, 12364, 12366, 12368, 12370,
- 12372, 12374, 12376, 12378, 12380, 0, 0, 12382, 12384, 12386, 12388,
- 12390, 12392, 12394, 12396, 12398, 12400, 12402, 12404, 12406, 12408,
- 12410, 12412, 12414, 12416, 12418, 12420, 12422, 12424, 12426, 12428,
- 12430, 12432, 12434, 12436, 12438, 12440, 12442, 12444, 12446, 12448,
- 12450, 12452, 12454, 12456, 12458, 12460, 12462, 12464, 12466, 12468,
- 12470, 12472, 12474, 12476, 12478, 12480, 12482, 12484, 12486, 12488, 0,
- 12490, 12492, 12494, 12496, 12498, 12500, 12502, 12504, 12506, 12508,
- 12510, 12512, 12514, 12516, 12518, 12520, 12522, 12524, 12526, 12528,
- 12530, 12532, 12534, 12536, 12538, 12540, 12542, 0, 12544, 12546, 0,
- 12548, 0, 0, 12550, 0, 12552, 12554, 12556, 12558, 12560, 12562, 12564,
- 12566, 12568, 12570, 0, 12572, 12574, 12576, 12578, 0, 12580, 0, 12582,
- 0, 0, 0, 0, 0, 0, 12584, 0, 0, 0, 0, 12586, 0, 12588, 0, 12590, 0, 12592,
- 12594, 12596, 0, 12598, 12600, 0, 12602, 0, 0, 12604, 0, 12606, 0, 12608,
- 0, 12610, 0, 12612, 0, 12614, 12616, 0, 12618, 0, 0, 12620, 12622, 12624,
- 12626, 0, 12628, 12630, 12632, 12634, 12636, 12638, 12640, 0, 12642,
- 12644, 12646, 12648, 0, 12650, 12652, 12654, 12656, 0, 12658, 0, 12660,
- 12662, 12664, 12666, 12668, 12670, 12672, 12674, 12676, 12678, 0, 12680,
- 12682, 12684, 12686, 12688, 12690, 12692, 12694, 12696, 12698, 12700,
- 12702, 12704, 12706, 12708, 12710, 12712, 0, 0, 0, 0, 0, 12714, 12716,
- 12718, 0, 12720, 12722, 12724, 12726, 12728, 0, 12730, 12732, 12734,
- 12736, 12738, 12740, 12742, 12744, 12746, 12748, 12750, 12752, 12754,
- 12756, 12758, 12760, 12762, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 12764, 12767, 12770, 12773, 12776, 12779, 12782, 12785,
- 12788, 12791, 12794, 0, 0, 0, 0, 0, 12797, 12801, 12805, 12809, 12813,
- 12817, 12821, 12825, 12829, 12833, 12837, 12841, 12845, 12849, 12853,
- 12857, 12861, 12865, 12869, 12873, 12877, 12881, 12885, 12889, 12893,
- 12897, 12901, 12905, 12907, 12909, 12912, 0, 12915, 12917, 12919, 12921,
- 12923, 12925, 12927, 12929, 12931, 12933, 12935, 12937, 12939, 12941,
- 12943, 12945, 12947, 12949, 12951, 12953, 12955, 12957, 12959, 12961,
- 12963, 12965, 12967, 12970, 12973, 12976, 12979, 12983, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12986, 12989,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12992, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 12995, 12998, 13001, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 13003, 13005, 13007, 13009, 13011, 13013, 13015, 13017, 13019, 13021,
- 13023, 13025, 13027, 13029, 13031, 13033, 13035, 13037, 13039, 13041,
- 13043, 13045, 13047, 13049, 13051, 13053, 13055, 13057, 13059, 13061,
- 13063, 13065, 13067, 13069, 13071, 13073, 13075, 13077, 13079, 13081,
- 13083, 13085, 13087, 0, 0, 0, 0, 0, 13089, 13093, 13097, 13101, 13105,
- 13109, 13113, 13117, 13121, 0, 0, 0, 0, 0, 0, 0, 13125, 13127, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 13129, 13131, 13133, 13135, 13137, 13139, 13141, 13143, 13145,
- 13147, 13149, 13151, 13153, 13155, 13157, 13159, 13161, 13163, 13165,
- 13167, 13169, 13171, 13173, 13175, 13177, 13179, 13181, 13183, 13185,
- 13187, 13189, 13191, 13193, 13195, 13197, 13199, 13201, 13203, 13205,
- 13207, 13209, 13211, 13213, 13215, 13217, 13219, 13221, 13223, 13225,
- 13227, 13229, 13231, 13233, 13235, 13237, 13239, 13241, 13243, 13245,
- 13247, 13249, 13251, 13253, 13255, 13257, 13259, 13261, 13263, 13265,
- 13267, 13269, 13271, 13273, 13275, 13277, 13279, 13281, 13283, 13285,
- 13287, 13289, 13291, 13293, 13295, 13297, 13299, 13301, 13303, 13305,
- 13307, 13309, 13311, 13313, 13315, 13317, 13319, 13321, 13323, 13325,
- 13327, 13329, 13331, 13333, 13335, 13337, 13339, 13341, 13343, 13345,
- 13347, 13349, 13351, 13353, 13355, 13357, 13359, 13361, 13363, 13365,
- 13367, 13369, 13371, 13373, 13375, 13377, 13379, 13381, 13383, 13385,
- 13387, 13389, 13391, 13393, 13395, 13397, 13399, 13401, 13403, 13405,
- 13407, 13409, 13411, 13413, 13415, 13417, 13419, 13421, 13423, 13425,
- 13427, 13429, 13431, 13433, 13435, 13437, 13439, 13441, 13443, 13445,
- 13447, 13449, 13451, 13453, 13455, 13457, 13459, 13461, 13463, 13465,
- 13467, 13469, 13471, 13473, 13475, 13477, 13479, 13481, 13483, 13485,
- 13487, 13489, 13491, 13493, 13495, 13497, 13499, 13501, 13503, 13505,
- 13507, 13509, 13511, 13513, 13515, 13517, 13519, 13521, 13523, 13525,
- 13527, 13529, 13531, 13533, 13535, 13537, 13539, 13541, 13543, 13545,
- 13547, 13549, 13551, 13553, 13555, 13557, 13559, 13561, 13563, 13565,
- 13567, 13569, 13571, 13573, 13575, 13577, 13579, 13581, 13583, 13585,
- 13587, 13589, 13591, 13593, 13595, 13597, 13599, 13601, 13603, 13605,
- 13607, 13609, 13611, 13613, 13615, 13617, 13619, 13621, 13623, 13625,
- 13627, 13629, 13631, 13633, 13635, 13637, 13639, 13641, 13643, 13645,
- 13647, 13649, 13651, 13653, 13655, 13657, 13659, 13661, 13663, 13665,
- 13667, 13669, 13671, 13673, 13675, 13677, 13679, 13681, 13683, 13685,
- 13687, 13689, 13691, 13693, 13695, 13697, 13699, 13701, 13703, 13705,
- 13707, 13709, 13711, 13713, 13715, 13717, 13719, 13721, 13723, 13725,
- 13727, 13729, 13731, 13733, 13735, 13737, 13739, 13741, 13743, 13745,
- 13747, 13749, 13751, 13753, 13755, 13757, 13759, 13761, 13763, 13765,
- 13767, 13769, 13771, 13773, 13775, 13777, 13779, 13781, 13783, 13785,
- 13787, 13789, 13791, 13793, 13795, 13797, 13799, 13801, 13803, 13805,
- 13807, 13809, 13811, 13813, 13815, 13817, 13819, 13821, 13823, 13825,
- 13827, 13829, 13831, 13833, 13835, 13837, 13839, 13841, 13843, 13845,
- 13847, 13849, 13851, 13853, 13855, 13857, 13859, 13861, 13863, 13865,
- 13867, 13869, 13871, 13873, 13875, 13877, 13879, 13881, 13883, 13885,
- 13887, 13889, 13891, 13893, 13895, 13897, 13899, 13901, 13903, 13905,
- 13907, 13909, 13911, 13913, 13915, 13917, 13919, 13921, 13923, 13925,
- 13927, 13929, 13931, 13933, 13935, 13937, 13939, 13941, 13943, 13945,
- 13947, 13949, 13951, 13953, 13955, 13957, 13959, 13961, 13963, 13965,
- 13967, 13969, 13971, 13973, 13975, 13977, 13979, 13981, 13983, 13985,
- 13987, 13989, 13991, 13993, 13995, 13997, 13999, 14001, 14003, 14005,
- 14007, 14009, 14011, 14013, 14015, 14017, 14019, 14021, 14023, 14025,
- 14027, 14029, 14031, 14033, 14035, 14037, 14039, 14041, 14043, 14045,
- 14047, 14049, 14051, 14053, 14055, 14057, 14059, 14061, 14063, 14065,
- 14067, 14069, 14071, 14073, 14075, 14077, 14079, 14081, 14083, 14085,
- 14087, 14089, 14091, 14093, 14095, 14097, 14099, 14101, 14103, 14105,
- 14107, 14109, 14111, 14113, 14115, 14117, 14119, 14121, 14123, 14125,
- 14127, 14129, 14131, 14133, 14135, 14137, 14139, 14141, 14143, 14145,
- 14147, 14149, 14151, 14153, 14155, 14157, 14159, 14161, 14163, 14165,
- 14167, 14169, 14171, 14173, 14175, 14177, 14179, 14181, 14183, 14185,
- 14187, 14189, 14191, 14193, 14195, 14197, 14199, 14201, 14203, 14205,
- 14207, 14209, 14211, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6646, 6648, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6650, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 6652, 6654, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6656, 6658, 6660, 6662, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 6664, 6666, 6668, 6670, 6672, 6674, 6676, 6678,
+ 6680, 6682, 6684, 6686, 6688, 6690, 6692, 6694, 6696, 6698, 6700, 6702,
+ 6704, 6706, 6708, 6710, 6712, 6714, 6716, 6718, 6720, 6722, 6724, 6726,
+ 6728, 6730, 6732, 6734, 6736, 6738, 6740, 6742, 6744, 6746, 6748, 6750,
+ 6752, 6754, 6756, 6758, 6760, 6762, 6764, 6766, 6768, 6770, 6772, 6774,
+ 6776, 6778, 6780, 6782, 6784, 6786, 6788, 6790, 6792, 6794, 6796, 6798,
+ 6800, 6802, 6804, 6806, 6808, 6810, 6812, 6814, 6816, 6818, 6820, 6822,
+ 6824, 6826, 6828, 6830, 6832, 6834, 6836, 6838, 6840, 6842, 6844, 6846,
+ 6848, 6850, 6852, 6854, 6856, 6858, 6860, 6862, 6864, 6866, 6868, 6870,
+ 6872, 6874, 6876, 6878, 6880, 6882, 6884, 6886, 6888, 6890, 6892, 6894,
+ 6896, 6898, 6900, 6902, 6904, 6906, 6908, 6910, 6912, 6914, 6916, 6918,
+ 6920, 6922, 6924, 6926, 6928, 6930, 6932, 6934, 6936, 6938, 6940, 6942,
+ 6944, 6946, 6948, 6950, 6952, 6954, 6956, 6958, 6960, 6962, 6964, 6966,
+ 6968, 6970, 6972, 6974, 6976, 6978, 6980, 6982, 6984, 6986, 6988, 6990,
+ 6992, 6994, 6996, 6998, 7000, 7002, 7004, 7006, 7008, 7010, 7012, 7014,
+ 7016, 7018, 7020, 7022, 7024, 7026, 7028, 7030, 7032, 7034, 7036, 7038,
+ 7040, 7042, 7044, 7046, 7048, 7050, 7052, 7054, 7056, 7058, 7060, 7062,
+ 7064, 7066, 7068, 7070, 7072, 7074, 7076, 7078, 7080, 7082, 7084, 7086,
+ 7088, 7090, 7092, 7094, 7096, 7098, 7100, 7102, 7104, 7106, 7108, 7110,
+ 7112, 7114, 7116, 7118, 7120, 7122, 7124, 7126, 7128, 7130, 7132, 7134,
+ 7136, 7138, 7140, 7142, 7144, 7146, 7148, 7150, 7152, 7154, 7156, 7158,
+ 7160, 7162, 7164, 7166, 7168, 7170, 7172, 7174, 7176, 7178, 7180, 7182,
+ 7184, 7186, 7188, 7190, 7192, 7194, 7196, 7198, 7200, 7202, 0, 0, 7204,
+ 0, 7206, 0, 0, 7208, 7210, 7212, 7214, 7216, 7218, 7220, 7222, 7224,
+ 7226, 0, 7228, 0, 7230, 0, 0, 7232, 7234, 0, 0, 0, 7236, 7238, 7240,
+ 7242, 7244, 7246, 7248, 7250, 7252, 7254, 7256, 7258, 7260, 7262, 7264,
+ 7266, 7268, 7270, 7272, 7274, 7276, 7278, 7280, 7282, 7284, 7286, 7288,
+ 7290, 7292, 7294, 7296, 7298, 7300, 7302, 7304, 7306, 7308, 7310, 7312,
+ 7314, 7316, 7318, 7320, 7322, 7324, 7326, 7328, 7330, 7332, 7334, 7336,
+ 7338, 7340, 7342, 7344, 7346, 7348, 7350, 7352, 7354, 7356, 7358, 7360,
+ 7362, 7364, 7366, 7368, 7370, 0, 0, 7372, 7374, 7376, 7378, 7380, 7382,
+ 7384, 7386, 7388, 7390, 7392, 7394, 7396, 7398, 7400, 7402, 7404, 7406,
+ 7408, 7410, 7412, 7414, 7416, 7418, 7420, 7422, 7424, 7426, 7428, 7430,
+ 7432, 7434, 7436, 7438, 7440, 7442, 7444, 7446, 7448, 7450, 7452, 7454,
+ 7456, 7458, 7460, 7462, 7464, 7466, 7468, 7470, 7472, 7474, 7476, 7478,
+ 7480, 7482, 7484, 7486, 7488, 7490, 7492, 7494, 7496, 7498, 7500, 7502,
+ 7504, 7506, 7508, 7510, 7512, 7514, 7516, 7518, 7520, 7522, 7524, 7526,
+ 7528, 7530, 7532, 7534, 7536, 7538, 7540, 7542, 7544, 7546, 7548, 7550,
+ 7552, 7554, 7556, 7558, 7560, 7562, 7564, 7566, 7568, 7570, 7572, 7574,
+ 7576, 7578, 7580, 7582, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7584,
+ 7587, 7590, 7593, 7597, 7601, 7604, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 7607, 7610, 7613, 7616, 7619, 0, 0, 0, 0, 0, 7622, 0, 7625, 7628, 7630,
+ 7632, 7634, 7636, 7638, 7640, 7642, 7644, 7646, 7648, 7651, 7654, 7657,
+ 7660, 7663, 7666, 7669, 7672, 7675, 7678, 7681, 7684, 0, 7687, 7690,
+ 7693, 7696, 7699, 0, 7702, 0, 7705, 7708, 0, 7711, 7714, 0, 7717, 7720,
+ 7723, 7726, 7729, 7732, 7735, 7738, 7741, 7744, 7747, 7749, 7751, 7753,
+ 7755, 7757, 7759, 7761, 7763, 7765, 7767, 7769, 7771, 7773, 7775, 7777,
+ 7779, 7781, 7783, 7785, 7787, 7789, 7791, 7793, 7795, 7797, 7799, 7801,
+ 7803, 7805, 7807, 7809, 7811, 7813, 7815, 7817, 7819, 7821, 7823, 7825,
+ 7827, 7829, 7831, 7833, 7835, 7837, 7839, 7841, 7843, 7845, 7847, 7849,
+ 7851, 7853, 7855, 7857, 7859, 7861, 7863, 7865, 7867, 7869, 7871, 7873,
+ 7875, 7877, 7879, 7881, 7883, 7885, 7887, 7889, 7891, 7893, 7895, 7897,
+ 7899, 7901, 7903, 7905, 7907, 7909, 7911, 7913, 7915, 7917, 7919, 7921,
+ 7923, 7925, 7927, 7929, 7931, 7933, 7935, 7937, 7939, 7941, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 7943, 7945, 7947, 7949, 7951, 7953, 7955, 7957, 7959,
+ 7961, 7963, 7965, 7967, 7969, 7971, 7973, 7975, 7977, 7979, 7981, 7983,
+ 7985, 7987, 7989, 7992, 7995, 7998, 8001, 8004, 8007, 8010, 8013, 8016,
+ 8019, 8022, 8025, 8028, 8031, 8034, 8037, 8040, 8043, 8045, 8047, 8049,
+ 8051, 8054, 8057, 8060, 8063, 8066, 8069, 8072, 8075, 8078, 8081, 8084,
+ 8087, 8090, 8093, 8096, 8099, 8102, 8105, 8108, 8111, 8114, 8117, 8120,
+ 8123, 8126, 8129, 8132, 8135, 8138, 8141, 8144, 8147, 8150, 8153, 8156,
+ 8159, 8162, 8165, 8168, 8171, 8174, 8177, 8180, 8183, 8186, 8189, 8192,
+ 8195, 8198, 8201, 8204, 8207, 8210, 8213, 8216, 8219, 8222, 8225, 8228,
+ 8231, 8234, 8237, 8240, 8243, 8246, 8249, 8252, 8255, 8258, 8261, 8264,
+ 8267, 8270, 8273, 8276, 8279, 8282, 8285, 8288, 8291, 8294, 8297, 8300,
+ 8303, 8306, 8309, 8312, 8315, 8318, 8321, 8324, 8327, 8330, 8333, 8337,
+ 8341, 8345, 8349, 8353, 8357, 8360, 8363, 8366, 8369, 8372, 8375, 8378,
+ 8381, 8384, 8387, 8390, 8393, 8396, 8399, 8402, 8405, 8408, 8411, 8414,
+ 8417, 8420, 8423, 8426, 8429, 8432, 8435, 8438, 8441, 8444, 8447, 8450,
+ 8453, 8456, 8459, 8462, 8465, 8468, 8471, 8474, 8477, 8480, 8483, 8486,
+ 8489, 8492, 8495, 8498, 8501, 8504, 8507, 8510, 8513, 8516, 8519, 8522,
+ 8525, 8528, 8531, 8534, 8537, 8540, 8543, 8546, 8549, 8552, 8555, 8558,
+ 8561, 8564, 8567, 8570, 8573, 8576, 8579, 8582, 8585, 8588, 8591, 8594,
+ 8597, 8600, 8603, 8606, 8609, 8612, 8615, 8618, 8621, 8624, 8627, 8630,
+ 8633, 8636, 8639, 8642, 8645, 8648, 8651, 8654, 8657, 8660, 8663, 8666,
+ 8669, 8672, 8675, 8678, 8681, 8684, 8687, 8690, 8693, 8696, 8699, 8702,
+ 8705, 8708, 8711, 8714, 8717, 8720, 8723, 8726, 8729, 8732, 8735, 8738,
+ 8741, 8744, 8747, 8750, 8753, 8756, 8759, 8762, 8765, 8768, 8771, 8774,
+ 8777, 8780, 8783, 8787, 8791, 8795, 8798, 8801, 8804, 8807, 8810, 8813,
+ 8816, 8819, 8822, 8825, 8828, 8831, 8834, 8837, 8840, 8843, 8846, 8849,
+ 8852, 8855, 8858, 8861, 8864, 8867, 8870, 8873, 8876, 8879, 8882, 8885,
+ 8888, 8891, 8894, 8897, 8900, 8903, 8906, 8909, 8912, 8915, 8918, 8921,
+ 8924, 8927, 8930, 8933, 8936, 8939, 8942, 8945, 8948, 8951, 8954, 8957,
+ 8960, 8963, 8966, 8969, 8972, 8975, 8978, 8981, 8984, 8987, 8990, 8993,
+ 8996, 8999, 9002, 9005, 9008, 9011, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 9014, 9018, 9022, 9026, 9030, 9034, 9038, 9042, 9046,
+ 9050, 9054, 9058, 9062, 9066, 9070, 9074, 9078, 9082, 9086, 9090, 9094,
+ 9098, 9102, 9106, 9110, 9114, 9118, 9122, 9126, 9130, 9134, 9138, 9142,
+ 9146, 9150, 9154, 9158, 9162, 9166, 9170, 9174, 9178, 9182, 9186, 9190,
+ 9194, 9198, 9202, 9206, 9210, 9214, 9218, 9222, 9226, 9230, 9234, 9238,
+ 9242, 9246, 9250, 9254, 9258, 9262, 9266, 0, 0, 9270, 9274, 9278, 9282,
+ 9286, 9290, 9294, 9298, 9302, 9306, 9310, 9314, 9318, 9322, 9326, 9330,
+ 9334, 9338, 9342, 9346, 9350, 9354, 9358, 9362, 9366, 9370, 9374, 9378,
+ 9382, 9386, 9390, 9394, 9398, 9402, 9406, 9410, 9414, 9418, 9422, 9426,
+ 9430, 9434, 9438, 9442, 9446, 9450, 9454, 9458, 9462, 9466, 9470, 9474,
+ 9478, 9482, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9486, 9490,
+ 9494, 9499, 9504, 9509, 9514, 9519, 9524, 9529, 9533, 9552, 9561, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9566, 9568, 9570,
+ 9572, 9574, 9576, 9578, 9580, 9582, 9584, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9586, 9588, 9590, 9592, 9594, 9596,
+ 9598, 9600, 9602, 9604, 9606, 9608, 9610, 9612, 9614, 9616, 9618, 9620,
+ 9622, 9624, 9626, 0, 0, 9628, 9630, 9632, 9634, 9636, 9638, 9640, 9642,
+ 9644, 9646, 9648, 9650, 0, 9652, 9654, 9656, 9658, 9660, 9662, 9664,
+ 9666, 9668, 9670, 9672, 9674, 9676, 9678, 9680, 9682, 9684, 9686, 9688,
+ 0, 9690, 9692, 9694, 9696, 0, 0, 0, 0, 9698, 9701, 9704, 0, 9707, 0,
+ 9710, 9713, 9716, 9719, 9722, 9725, 9728, 9731, 9734, 9737, 9740, 9742,
+ 9744, 9746, 9748, 9750, 9752, 9754, 9756, 9758, 9760, 9762, 9764, 9766,
+ 9768, 9770, 9772, 9774, 9776, 9778, 9780, 9782, 9784, 9786, 9788, 9790,
+ 9792, 9794, 9796, 9798, 9800, 9802, 9804, 9806, 9808, 9810, 9812, 9814,
+ 9816, 9818, 9820, 9822, 9824, 9826, 9828, 9830, 9832, 9834, 9836, 9838,
+ 9840, 9842, 9844, 9846, 9848, 9850, 9852, 9854, 9856, 9858, 9860, 9862,
+ 9864, 9866, 9868, 9870, 9872, 9874, 9876, 9878, 9880, 9882, 9884, 9886,
+ 9888, 9890, 9892, 9894, 9896, 9898, 9900, 9902, 9904, 9906, 9908, 9910,
+ 9912, 9914, 9916, 9918, 9920, 9922, 9924, 9926, 9928, 9930, 9932, 9934,
+ 9936, 9938, 9940, 9942, 9944, 9946, 9948, 9950, 9952, 9954, 9956, 9958,
+ 9960, 9962, 9964, 9966, 9968, 9970, 9972, 9974, 9977, 9980, 9983, 9986,
+ 9989, 9992, 9995, 0, 0, 0, 0, 9998, 10000, 10002, 10004, 10006, 10008,
+ 10010, 10012, 10014, 10016, 10018, 10020, 10022, 10024, 10026, 10028,
+ 10030, 10032, 10034, 10036, 10038, 10040, 10042, 10044, 10046, 10048,
+ 10050, 10052, 10054, 10056, 10058, 10060, 10062, 10064, 10066, 10068,
+ 10070, 10072, 10074, 10076, 10078, 10080, 10082, 10084, 10086, 10088,
+ 10090, 10092, 10094, 10096, 10098, 10100, 10102, 10104, 10106, 10108,
+ 10110, 10112, 10114, 10116, 10118, 10120, 10122, 10124, 10126, 10128,
+ 10130, 10132, 10134, 10136, 10138, 10140, 10142, 10144, 10146, 10148,
+ 10150, 10152, 10154, 10156, 10158, 10160, 10162, 10164, 10166, 10168,
+ 10170, 10172, 10174, 10176, 10178, 10180, 10182, 10184, 10186, 10188,
+ 10190, 10192, 10194, 10196, 10198, 10200, 10202, 10204, 10206, 10208,
+ 10210, 10212, 10214, 10216, 10218, 10220, 10222, 10224, 10226, 10228,
+ 10230, 10232, 10234, 10236, 10238, 10240, 10242, 10244, 10246, 10248,
+ 10250, 10252, 10254, 10256, 10258, 10260, 10262, 10264, 10266, 10268,
+ 10270, 10272, 10274, 10276, 10278, 10280, 10282, 10284, 10286, 10288,
+ 10290, 10292, 10294, 10296, 10298, 10300, 10302, 10304, 10306, 10308,
+ 10310, 10312, 10314, 10316, 10318, 10320, 10322, 10324, 10326, 10328,
+ 10330, 10332, 10334, 10336, 10338, 10340, 10342, 10344, 10346, 10348,
+ 10350, 10352, 10354, 10356, 10358, 10360, 10362, 10364, 10366, 10368,
+ 10370, 10372, 10374, 10376, 0, 0, 0, 10378, 10380, 10382, 10384, 10386,
+ 10388, 0, 0, 10390, 10392, 10394, 10396, 10398, 10400, 0, 0, 10402,
+ 10404, 10406, 10408, 10410, 10412, 0, 0, 10414, 10416, 10418, 0, 0, 0,
+ 10420, 10422, 10424, 10426, 10428, 10430, 10432, 0, 10434, 10436, 10438,
+ 10440, 10442, 10444, 10446, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 10448, 0, 10451, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 10454, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10457, 10460, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 10463, 10466, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10469,
+ 10472, 0, 10475, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 10478, 10481, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 10484, 10487, 10490, 10493, 10496, 10499, 10502, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10505, 10508, 10511, 10514, 10517,
+ 10520, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10523, 10525, 10527,
+ 10529, 10531, 10533, 10535, 10537, 10539, 10541, 10543, 10545, 10547,
+ 10549, 10551, 10553, 10555, 10557, 10559, 10561, 10563, 10565, 10567,
+ 10569, 10571, 10573, 10575, 10577, 10579, 10581, 10583, 10585, 10587,
+ 10589, 10591, 10593, 10595, 10597, 10599, 10601, 10603, 10605, 10607,
+ 10609, 10611, 10613, 10615, 10617, 10619, 10621, 10623, 10625, 10627,
+ 10629, 10631, 10633, 10635, 10637, 10639, 10641, 10643, 10645, 10647,
+ 10649, 10651, 10653, 10655, 10657, 10659, 10661, 10663, 10665, 10667,
+ 10669, 10671, 10673, 10675, 10677, 10679, 10681, 10683, 10685, 10687,
+ 10689, 10691, 0, 10693, 10695, 10697, 10699, 10701, 10703, 10705, 10707,
+ 10709, 10711, 10713, 10715, 10717, 10719, 10721, 10723, 10725, 10727,
+ 10729, 10731, 10733, 10735, 10737, 10739, 10741, 10743, 10745, 10747,
+ 10749, 10751, 10753, 10755, 10757, 10759, 10761, 10763, 10765, 10767,
+ 10769, 10771, 10773, 10775, 10777, 10779, 10781, 10783, 10785, 10787,
+ 10789, 10791, 10793, 10795, 10797, 10799, 10801, 10803, 10805, 10807,
+ 10809, 10811, 10813, 10815, 10817, 10819, 10821, 10823, 10825, 10827,
+ 10829, 10831, 10833, 0, 10835, 10837, 0, 0, 10839, 0, 0, 10841, 10843, 0,
+ 0, 10845, 10847, 10849, 10851, 0, 10853, 10855, 10857, 10859, 10861,
+ 10863, 10865, 10867, 10869, 10871, 10873, 10875, 0, 10877, 0, 10879,
+ 10881, 10883, 10885, 10887, 10889, 10891, 0, 10893, 10895, 10897, 10899,
+ 10901, 10903, 10905, 10907, 10909, 10911, 10913, 10915, 10917, 10919,
+ 10921, 10923, 10925, 10927, 10929, 10931, 10933, 10935, 10937, 10939,
+ 10941, 10943, 10945, 10947, 10949, 10951, 10953, 10955, 10957, 10959,
+ 10961, 10963, 10965, 10967, 10969, 10971, 10973, 10975, 10977, 10979,
+ 10981, 10983, 10985, 10987, 10989, 10991, 10993, 10995, 10997, 10999,
+ 11001, 11003, 11005, 11007, 11009, 11011, 11013, 11015, 11017, 11019,
+ 11021, 0, 11023, 11025, 11027, 11029, 0, 0, 11031, 11033, 11035, 11037,
+ 11039, 11041, 11043, 11045, 0, 11047, 11049, 11051, 11053, 11055, 11057,
+ 11059, 0, 11061, 11063, 11065, 11067, 11069, 11071, 11073, 11075, 11077,
+ 11079, 11081, 11083, 11085, 11087, 11089, 11091, 11093, 11095, 11097,
+ 11099, 11101, 11103, 11105, 11107, 11109, 11111, 11113, 11115, 0, 11117,
+ 11119, 11121, 11123, 0, 11125, 11127, 11129, 11131, 11133, 0, 11135, 0,
+ 0, 0, 11137, 11139, 11141, 11143, 11145, 11147, 11149, 0, 11151, 11153,
+ 11155, 11157, 11159, 11161, 11163, 11165, 11167, 11169, 11171, 11173,
+ 11175, 11177, 11179, 11181, 11183, 11185, 11187, 11189, 11191, 11193,
+ 11195, 11197, 11199, 11201, 11203, 11205, 11207, 11209, 11211, 11213,
+ 11215, 11217, 11219, 11221, 11223, 11225, 11227, 11229, 11231, 11233,
+ 11235, 11237, 11239, 11241, 11243, 11245, 11247, 11249, 11251, 11253,
+ 11255, 11257, 11259, 11261, 11263, 11265, 11267, 11269, 11271, 11273,
+ 11275, 11277, 11279, 11281, 11283, 11285, 11287, 11289, 11291, 11293,
+ 11295, 11297, 11299, 11301, 11303, 11305, 11307, 11309, 11311, 11313,
+ 11315, 11317, 11319, 11321, 11323, 11325, 11327, 11329, 11331, 11333,
+ 11335, 11337, 11339, 11341, 11343, 11345, 11347, 11349, 11351, 11353,
+ 11355, 11357, 11359, 11361, 11363, 11365, 11367, 11369, 11371, 11373,
+ 11375, 11377, 11379, 11381, 11383, 11385, 11387, 11389, 11391, 11393,
+ 11395, 11397, 11399, 11401, 11403, 11405, 11407, 11409, 11411, 11413,
+ 11415, 11417, 11419, 11421, 11423, 11425, 11427, 11429, 11431, 11433,
+ 11435, 11437, 11439, 11441, 11443, 11445, 11447, 11449, 11451, 11453,
+ 11455, 11457, 11459, 11461, 11463, 11465, 11467, 11469, 11471, 11473,
+ 11475, 11477, 11479, 11481, 11483, 11485, 11487, 11489, 11491, 11493,
+ 11495, 11497, 11499, 11501, 11503, 11505, 11507, 11509, 11511, 11513,
+ 11515, 11517, 11519, 11521, 11523, 11525, 11527, 11529, 11531, 11533,
+ 11535, 11537, 11539, 11541, 11543, 11545, 11547, 11549, 11551, 11553,
+ 11555, 11557, 11559, 11561, 11563, 11565, 11567, 11569, 11571, 11573,
+ 11575, 11577, 11579, 11581, 11583, 11585, 11587, 11589, 11591, 11593,
+ 11595, 11597, 11599, 11601, 11603, 11605, 11607, 11609, 11611, 11613,
+ 11615, 11617, 11619, 11621, 11623, 11625, 11627, 11629, 11631, 11633,
+ 11635, 11637, 11639, 11641, 11643, 11645, 11647, 11649, 11651, 11653,
+ 11655, 11657, 11659, 11661, 11663, 11665, 11667, 11669, 11671, 11673,
+ 11675, 11677, 11679, 11681, 11683, 11685, 11687, 11689, 11691, 11693,
+ 11695, 11697, 11699, 11701, 11703, 11705, 11707, 11709, 11711, 11713,
+ 11715, 11717, 11719, 11721, 11723, 11725, 11727, 11729, 11731, 11733,
+ 11735, 11737, 11739, 11741, 11743, 11745, 11747, 11749, 11751, 11753,
+ 11755, 11757, 11759, 11761, 11763, 11765, 11767, 11769, 11771, 11773,
+ 11775, 11777, 11779, 11781, 11783, 11785, 11787, 11789, 11791, 11793,
+ 11795, 11797, 11799, 11801, 11803, 11805, 11807, 11809, 11811, 11813,
+ 11815, 11817, 11819, 11821, 11823, 11825, 11827, 11829, 0, 0, 11831,
+ 11833, 11835, 11837, 11839, 11841, 11843, 11845, 11847, 11849, 11851,
+ 11853, 11855, 11857, 11859, 11861, 11863, 11865, 11867, 11869, 11871,
+ 11873, 11875, 11877, 11879, 11881, 11883, 11885, 11887, 11889, 11891,
+ 11893, 11895, 11897, 11899, 11901, 11903, 11905, 11907, 11909, 11911,
+ 11913, 11915, 11917, 11919, 11921, 11923, 11925, 11927, 11929, 11931,
+ 11933, 11935, 11937, 11939, 11941, 11943, 11945, 11947, 11949, 11951,
+ 11953, 11955, 11957, 11959, 11961, 11963, 11965, 11967, 11969, 11971,
+ 11973, 11975, 11977, 11979, 11981, 11983, 11985, 11987, 11989, 11991,
+ 11993, 11995, 11997, 11999, 12001, 12003, 12005, 12007, 12009, 12011,
+ 12013, 12015, 12017, 12019, 12021, 12023, 12025, 12027, 12029, 12031,
+ 12033, 12035, 12037, 12039, 12041, 12043, 12045, 12047, 12049, 12051,
+ 12053, 12055, 12057, 12059, 12061, 12063, 12065, 12067, 12069, 12071,
+ 12073, 12075, 12077, 12079, 12081, 12083, 12085, 12087, 12089, 12091,
+ 12093, 12095, 12097, 12099, 12101, 12103, 12105, 12107, 12109, 12111,
+ 12113, 12115, 12117, 12119, 12121, 12123, 12125, 12127, 12129, 12131,
+ 12133, 12135, 12137, 12139, 12141, 12143, 12145, 12147, 12149, 12151,
+ 12153, 12155, 12157, 12159, 12161, 12163, 12165, 12167, 12169, 12171,
+ 12173, 12175, 12177, 12179, 12181, 12183, 12185, 12187, 12189, 12191,
+ 12193, 12195, 12197, 12199, 12201, 12203, 12205, 12207, 12209, 12211,
+ 12213, 12215, 12217, 12219, 12221, 12223, 12225, 12227, 12229, 12231,
+ 12233, 12235, 12237, 12239, 12241, 12243, 12245, 12247, 12249, 12251,
+ 12253, 12255, 12257, 12259, 12261, 12263, 12265, 12267, 12269, 12271,
+ 12273, 12275, 12277, 12279, 12281, 12283, 12285, 12287, 12289, 12291,
+ 12293, 12295, 12297, 12299, 12301, 12303, 12305, 12307, 12309, 12311,
+ 12313, 12315, 12317, 12319, 12321, 12323, 12325, 12327, 12329, 12331,
+ 12333, 12335, 12337, 12339, 12341, 12343, 12345, 12347, 12349, 12351,
+ 12353, 12355, 12357, 12359, 12361, 12363, 12365, 12367, 12369, 12371,
+ 12373, 12375, 12377, 12379, 12381, 12383, 12385, 12387, 12389, 12391,
+ 12393, 12395, 12397, 12399, 12401, 12403, 12405, 12407, 12409, 12411,
+ 12413, 0, 0, 12415, 12417, 12419, 12421, 12423, 12425, 12427, 12429,
+ 12431, 12433, 12435, 12437, 12439, 12441, 12443, 12445, 12447, 12449,
+ 12451, 12453, 12455, 12457, 12459, 12461, 12463, 12465, 12467, 12469,
+ 12471, 12473, 12475, 12477, 12479, 12481, 12483, 12485, 12487, 12489,
+ 12491, 12493, 12495, 12497, 12499, 12501, 12503, 12505, 12507, 12509,
+ 12511, 12513, 12515, 12517, 12519, 12521, 0, 12523, 12525, 12527, 12529,
+ 12531, 12533, 12535, 12537, 12539, 12541, 12543, 12545, 12547, 12549,
+ 12551, 12553, 12555, 12557, 12559, 12561, 12563, 12565, 12567, 12569,
+ 12571, 12573, 12575, 0, 12577, 12579, 0, 12581, 0, 0, 12583, 0, 12585,
+ 12587, 12589, 12591, 12593, 12595, 12597, 12599, 12601, 12603, 0, 12605,
+ 12607, 12609, 12611, 0, 12613, 0, 12615, 0, 0, 0, 0, 0, 0, 12617, 0, 0,
+ 0, 0, 12619, 0, 12621, 0, 12623, 0, 12625, 12627, 12629, 0, 12631, 12633,
+ 0, 12635, 0, 0, 12637, 0, 12639, 0, 12641, 0, 12643, 0, 12645, 0, 12647,
+ 12649, 0, 12651, 0, 0, 12653, 12655, 12657, 12659, 0, 12661, 12663,
+ 12665, 12667, 12669, 12671, 12673, 0, 12675, 12677, 12679, 12681, 0,
+ 12683, 12685, 12687, 12689, 0, 12691, 0, 12693, 12695, 12697, 12699,
+ 12701, 12703, 12705, 12707, 12709, 12711, 0, 12713, 12715, 12717, 12719,
+ 12721, 12723, 12725, 12727, 12729, 12731, 12733, 12735, 12737, 12739,
+ 12741, 12743, 12745, 0, 0, 0, 0, 0, 12747, 12749, 12751, 0, 12753, 12755,
+ 12757, 12759, 12761, 0, 12763, 12765, 12767, 12769, 12771, 12773, 12775,
+ 12777, 12779, 12781, 12783, 12785, 12787, 12789, 12791, 12793, 12795, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12797, 12800,
+ 12803, 12806, 12809, 12812, 12815, 12818, 12821, 12824, 12827, 0, 0, 0,
+ 0, 0, 12830, 12834, 12838, 12842, 12846, 12850, 12854, 12858, 12862,
+ 12866, 12870, 12874, 12878, 12882, 12886, 12890, 12894, 12898, 12902,
+ 12906, 12910, 12914, 12918, 12922, 12926, 12930, 12934, 12938, 12940,
+ 12942, 12945, 0, 12948, 12950, 12952, 12954, 12956, 12958, 12960, 12962,
+ 12964, 12966, 12968, 12970, 12972, 12974, 12976, 12978, 12980, 12982,
+ 12984, 12986, 12988, 12990, 12992, 12994, 12996, 12998, 13000, 13003,
+ 13006, 13009, 13012, 13016, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13019, 13022, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 13025, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13028, 13031,
+ 13034, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13036, 13038, 13040, 13042,
+ 13044, 13046, 13048, 13050, 13052, 13054, 13056, 13058, 13060, 13062,
+ 13064, 13066, 13068, 13070, 13072, 13074, 13076, 13078, 13080, 13082,
+ 13084, 13086, 13088, 13090, 13092, 13094, 13096, 13098, 13100, 13102,
+ 13104, 13106, 13108, 13110, 13112, 13114, 13116, 13118, 13120, 0, 0, 0,
+ 0, 0, 13122, 13126, 13130, 13134, 13138, 13142, 13146, 13150, 13154, 0,
+ 0, 0, 0, 0, 0, 0, 13158, 13160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 13162, 13164, 13166, 13168, 13170, 13172, 13174,
+ 13176, 13178, 13180, 13182, 13184, 13186, 13188, 13190, 13192, 13194,
+ 13196, 13198, 13200, 13202, 13204, 13206, 13208, 13210, 13212, 13214,
+ 13216, 13218, 13220, 13222, 13224, 13226, 13228, 13230, 13232, 13234,
+ 13236, 13238, 13240, 13242, 13244, 13246, 13248, 13250, 13252, 13254,
+ 13256, 13258, 13260, 13262, 13264, 13266, 13268, 13270, 13272, 13274,
+ 13276, 13278, 13280, 13282, 13284, 13286, 13288, 13290, 13292, 13294,
+ 13296, 13298, 13300, 13302, 13304, 13306, 13308, 13310, 13312, 13314,
+ 13316, 13318, 13320, 13322, 13324, 13326, 13328, 13330, 13332, 13334,
+ 13336, 13338, 13340, 13342, 13344, 13346, 13348, 13350, 13352, 13354,
+ 13356, 13358, 13360, 13362, 13364, 13366, 13368, 13370, 13372, 13374,
+ 13376, 13378, 13380, 13382, 13384, 13386, 13388, 13390, 13392, 13394,
+ 13396, 13398, 13400, 13402, 13404, 13406, 13408, 13410, 13412, 13414,
+ 13416, 13418, 13420, 13422, 13424, 13426, 13428, 13430, 13432, 13434,
+ 13436, 13438, 13440, 13442, 13444, 13446, 13448, 13450, 13452, 13454,
+ 13456, 13458, 13460, 13462, 13464, 13466, 13468, 13470, 13472, 13474,
+ 13476, 13478, 13480, 13482, 13484, 13486, 13488, 13490, 13492, 13494,
+ 13496, 13498, 13500, 13502, 13504, 13506, 13508, 13510, 13512, 13514,
+ 13516, 13518, 13520, 13522, 13524, 13526, 13528, 13530, 13532, 13534,
+ 13536, 13538, 13540, 13542, 13544, 13546, 13548, 13550, 13552, 13554,
+ 13556, 13558, 13560, 13562, 13564, 13566, 13568, 13570, 13572, 13574,
+ 13576, 13578, 13580, 13582, 13584, 13586, 13588, 13590, 13592, 13594,
+ 13596, 13598, 13600, 13602, 13604, 13606, 13608, 13610, 13612, 13614,
+ 13616, 13618, 13620, 13622, 13624, 13626, 13628, 13630, 13632, 13634,
+ 13636, 13638, 13640, 13642, 13644, 13646, 13648, 13650, 13652, 13654,
+ 13656, 13658, 13660, 13662, 13664, 13666, 13668, 13670, 13672, 13674,
+ 13676, 13678, 13680, 13682, 13684, 13686, 13688, 13690, 13692, 13694,
+ 13696, 13698, 13700, 13702, 13704, 13706, 13708, 13710, 13712, 13714,
+ 13716, 13718, 13720, 13722, 13724, 13726, 13728, 13730, 13732, 13734,
+ 13736, 13738, 13740, 13742, 13744, 13746, 13748, 13750, 13752, 13754,
+ 13756, 13758, 13760, 13762, 13764, 13766, 13768, 13770, 13772, 13774,
+ 13776, 13778, 13780, 13782, 13784, 13786, 13788, 13790, 13792, 13794,
+ 13796, 13798, 13800, 13802, 13804, 13806, 13808, 13810, 13812, 13814,
+ 13816, 13818, 13820, 13822, 13824, 13826, 13828, 13830, 13832, 13834,
+ 13836, 13838, 13840, 13842, 13844, 13846, 13848, 13850, 13852, 13854,
+ 13856, 13858, 13860, 13862, 13864, 13866, 13868, 13870, 13872, 13874,
+ 13876, 13878, 13880, 13882, 13884, 13886, 13888, 13890, 13892, 13894,
+ 13896, 13898, 13900, 13902, 13904, 13906, 13908, 13910, 13912, 13914,
+ 13916, 13918, 13920, 13922, 13924, 13926, 13928, 13930, 13932, 13934,
+ 13936, 13938, 13940, 13942, 13944, 13946, 13948, 13950, 13952, 13954,
+ 13956, 13958, 13960, 13962, 13964, 13966, 13968, 13970, 13972, 13974,
+ 13976, 13978, 13980, 13982, 13984, 13986, 13988, 13990, 13992, 13994,
+ 13996, 13998, 14000, 14002, 14004, 14006, 14008, 14010, 14012, 14014,
+ 14016, 14018, 14020, 14022, 14024, 14026, 14028, 14030, 14032, 14034,
+ 14036, 14038, 14040, 14042, 14044, 14046, 14048, 14050, 14052, 14054,
+ 14056, 14058, 14060, 14062, 14064, 14066, 14068, 14070, 14072, 14074,
+ 14076, 14078, 14080, 14082, 14084, 14086, 14088, 14090, 14092, 14094,
+ 14096, 14098, 14100, 14102, 14104, 14106, 14108, 14110, 14112, 14114,
+ 14116, 14118, 14120, 14122, 14124, 14126, 14128, 14130, 14132, 14134,
+ 14136, 14138, 14140, 14142, 14144, 14146, 14148, 14150, 14152, 14154,
+ 14156, 14158, 14160, 14162, 14164, 14166, 14168, 14170, 14172, 14174,
+ 14176, 14178, 14180, 14182, 14184, 14186, 14188, 14190, 14192, 14194,
+ 14196, 14198, 14200, 14202, 14204, 14206, 14208, 14210, 14212, 14214,
+ 14216, 14218, 14220, 14222, 14224, 14226, 14228, 14230, 14232, 14234,
+ 14236, 14238, 14240, 14242, 14244, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
/* NFC pairs */
#define COMP_SHIFT 2
static unsigned short comp_index[] = {
- 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 4, 5, 6, 7, 8, 9,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 11, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13,
- 14, 15, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 18, 0, 19, 20, 21, 0, 0,
- 0, 0, 0, 0, 0, 22, 23, 24, 25, 26, 27, 28, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 31, 32, 0, 0, 33, 0, 0, 0, 0, 0, 0,
- 0, 0, 34, 35, 36, 0, 37, 38, 39, 0, 0, 0, 0, 0, 0, 0, 40, 41, 42, 43, 44,
- 45, 46, 0, 0, 0, 0, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 48, 0, 49, 0, 50, 51, 52, 0, 0, 0, 0, 0, 0, 0, 53, 0, 54, 0, 55, 56, 57,
- 0, 0, 0, 0, 0, 0, 0, 58, 59, 0, 0, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 62,
- 63, 0, 64, 65, 66, 0, 0, 0, 0, 0, 0, 0, 67, 68, 69, 70, 71, 72, 0, 0, 0,
- 0, 0, 0, 0, 0, 73, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 76, 77,
- 78, 79, 80, 81, 0, 0, 0, 0, 0, 0, 0, 82, 83, 84, 0, 85, 86, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 87, 88, 0, 89, 90, 91, 0, 0, 0, 0, 0, 0, 0, 92, 93, 94,
- 95, 96, 97, 98, 0, 0, 0, 0, 0, 0, 0, 99, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 101, 102, 0, 0, 103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 104, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 105, 106, 107, 0, 108, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 109, 110, 111, 0, 112, 0, 113, 0, 0, 0, 0, 0, 0, 0, 114, 115, 116,
- 117, 118, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 0, 121, 0, 122, 0, 0,
- 0, 0, 0, 0, 0, 123, 124, 125, 0, 0, 126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127,
- 128, 0, 129, 130, 131, 0, 0, 0, 0, 0, 0, 0, 132, 133, 134, 135, 136, 137,
- 138, 0, 0, 0, 0, 0, 0, 0, 0, 139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 140, 141, 142, 0, 0, 143, 0, 0, 0, 0, 0, 0, 0, 0, 144, 145, 146, 0, 147,
- 148, 149, 0, 0, 0, 0, 0, 0, 0, 150, 151, 152, 153, 154, 155, 156, 0, 0,
- 0, 0, 0, 0, 0, 157, 0, 158, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 159, 0, 160,
- 0, 161, 162, 163, 0, 0, 0, 0, 0, 0, 0, 164, 0, 165, 0, 166, 167, 168, 0,
- 0, 0, 0, 0, 0, 0, 169, 170, 0, 0, 171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172,
- 173, 174, 0, 175, 176, 177, 0, 0, 0, 0, 0, 0, 0, 178, 179, 180, 181, 182,
- 183, 0, 0, 0, 0, 0, 0, 0, 0, 184, 185, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 186, 187, 188, 189, 190, 191, 192, 0, 0, 0, 0, 0, 0, 0, 193, 194, 195,
- 0, 196, 197, 0, 0, 0, 0, 0, 0, 0, 0, 0, 198, 199, 0, 200, 201, 202, 0, 0,
- 0, 0, 0, 0, 0, 203, 204, 205, 206, 207, 208, 209, 0, 0, 0, 0, 0, 0, 0,
- 210, 0, 0, 0, 211, 0, 0, 0, 0, 0, 0, 0, 0, 0, 212, 213, 214, 0, 215, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 216, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217,
- 218, 219, 0, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221, 222, 223, 0, 224, 0,
- 225, 0, 0, 0, 0, 0, 0, 0, 226, 0, 0, 0, 0, 0, 0, 227, 0, 0, 0, 0, 0, 0,
- 228, 0, 229, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 230, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 231, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 232, 233,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 234, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 235, 0, 236, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 237, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 238, 0, 239, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 240, 241, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 242, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 243, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 244, 245,
- 246, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 247, 0, 248, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 249, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 250, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 251, 252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 253, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254, 0, 255, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 257, 0,
- 258, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 259, 260, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 261, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 262, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 263, 264, 265, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 266, 0, 267, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 268, 0, 269, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 270, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 271, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 272, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 273, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 274, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 275, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 276,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 277, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 278, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 279, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 280, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 281,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 282, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 283, 0, 284, 0, 285, 0, 0, 0, 0, 0, 0, 0, 0, 0, 286, 0, 287, 0,
- 288, 0, 0, 0, 0, 0, 0, 0, 0, 0, 289, 0, 290, 0, 291, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 292, 0, 293, 0, 294, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 295, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 297, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 298, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 299, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 300, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 301, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 302, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 303, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 304, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 305, 306, 0, 307,
- 0, 0, 0, 308, 0, 0, 0, 0, 0, 0, 309, 0, 0, 310, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 311, 0, 0, 312, 0, 0, 0, 313, 0, 0, 0, 0, 0, 0, 314, 315, 0, 316,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 317, 0, 0, 318, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 319, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 320, 321, 0, 322, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 323, 0, 0, 324, 0, 0, 0, 325, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 326, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 327, 0, 0,
- 0, 0, 0, 0, 328, 329, 0, 330, 0, 0, 0, 331, 0, 0, 0, 0, 0, 0, 332, 0, 0,
- 333, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 334, 0, 0, 335, 0, 0, 0, 336, 0, 0, 0,
- 0, 0, 0, 337, 338, 0, 339, 0, 0, 0, 340, 0, 0, 0, 0, 0, 0, 341, 0, 0,
- 342, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 343, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 344, 345, 0, 346, 0, 0, 0, 347, 0, 0, 0, 0, 0, 0, 348, 0, 0, 349,
- 0, 0, 0, 350, 0, 0, 0, 0, 0, 0, 351, 0, 0, 0, 0, 0, 0, 352, 0, 0, 0, 0,
- 0, 0, 353, 0, 0, 0, 0, 0, 0, 354, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 355, 0, 0, 0, 0, 0, 0, 356, 357, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 358, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 359, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 360, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 361, 362, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 363, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 364, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 365, 366, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 368, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 369, 370, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 371, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 372, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 373, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 374,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 375, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 376, 377, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 378, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 379, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 380,
- 381, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 382, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 383, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 384, 385, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 386, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 387, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 388, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 389, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 390,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 391, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 392, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 393, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 394, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 395, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 396, 397, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 398, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 399,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 401, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 402, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 403, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 404, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 405, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 406, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 407, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 408, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 409, 410, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 411, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 412, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 413,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 414, 415, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 416, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 417, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 418, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 419, 420, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 421, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 422, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 423, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 424, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 425, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 426, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 427, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 428, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 429, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 430, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 431, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 432, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 433, 0,
- 0, 434, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 435, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 436, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 437, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 438, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 439, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 440, 441, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 442, 443, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 444, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 445, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 446, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 447, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 448, 0, 0, 0, 0, 0, 0, 449, 0, 0, 0, 0, 0, 0, 450,
- 0, 0, 0, 0, 0, 0, 451, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 452, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 453, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 454, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 455, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 456, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 457, 0, 0,
- 0, 0, 0, 0, 458, 0, 0, 0, 0, 0, 0, 459, 0, 0, 0, 0, 0, 0, 460, 0, 0, 0,
- 0, 0, 0, 461, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 462, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 463, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 464,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 465, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 466, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 467, 0, 0, 0, 0, 0,
- 0, 468, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 469, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 470, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 471, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 472, 0, 0, 0, 0, 0, 0, 473, 0, 0, 0, 0,
- 0, 0, 474, 0, 0, 0, 0, 0, 0, 475, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 476, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 477, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 478, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 479, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 480, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 481, 0, 0, 0, 0, 0, 0, 482, 0, 0, 0, 0, 0, 0, 483, 0, 0, 0, 0, 0, 0, 484,
- 0, 0, 0, 0, 0, 0, 485, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 486, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 487, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 488, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 489, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 490, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 491, 0, 0,
- 0, 0, 0, 0, 492, 0, 0, 0, 0, 0, 0, 493, 0, 0, 0, 0, 0, 0, 494, 0, 0, 0,
- 0, 0, 0, 495, 0, 0, 0, 0, 0, 0, 496, 0, 0, 0, 0, 0, 0, 497, 0, 0, 0, 0,
- 0, 0, 498, 0, 0, 0, 0, 0, 0, 499, 0, 0, 0, 0, 0, 0, 500, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 501, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 502,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 503, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 504, 0, 0, 0, 0, 0, 0, 505, 0, 0, 0, 0, 0, 0, 506, 0, 0, 0, 0,
- 0, 0, 507, 0, 0, 0, 0, 0, 0, 508, 0, 0, 0, 0, 0, 0, 509, 0, 0, 0, 0, 0,
- 0, 510, 0, 0, 0, 0, 0, 0, 511, 0, 0, 0, 0, 0, 0, 512, 0, 0, 0, 0, 0, 0,
- 513, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 514, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 515, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 516, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 517, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 518, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 519, 0, 0, 0, 0, 0, 0, 520,
- 0, 0, 0, 0, 0, 0, 521, 0, 0, 0, 0, 0, 0, 522, 0, 0, 0, 0, 0, 0, 523, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 524, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 525, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 526, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 527, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 528, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 529, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 530, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 531, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 532, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 533, 0,
- 0, 0, 0, 0, 0, 534, 0, 0, 0, 0, 0, 0, 535, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 536, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 537, 0, 0, 0, 0, 0,
- 0, 538, 0, 0, 0, 0, 0, 0, 539, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 540,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 541, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 542, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 543, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 544, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 545,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 546, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 547, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 548, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 549, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 550,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 551, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 552, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 553, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 554, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 555,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 556, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 557, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 558, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 559, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 560,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 561, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 562, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 563, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 564, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 565,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 566, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 567, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 568, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 569, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 570,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 571, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 572, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 573, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 574, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 575,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 576, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 577, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 578, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 579, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 580,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 581, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 582, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 583, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 584, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 585, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 586, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 587, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 588, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 589, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 590, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 591, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 592, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 593, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 594, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 595, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 596, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 597, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 598, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 599, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 600, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 601, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 602, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 603, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 604, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 605, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 606, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 607, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 608, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 609, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 610, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 611, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 612, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 613, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 614, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 615, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 616, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 617, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 618, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 619, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 620, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 621, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 622, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 623, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 624, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 625, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 626, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 627, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 628, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 629, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 630, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 631, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 632, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 633,
+ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 4, 5,
+ 6, 7, 8, 9, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 12, 0, 13, 0, 0,
+ 0, 0, 0, 0, 0, 0, 14, 15, 16, 17, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 19, 20, 0, 21, 22, 23, 0, 0, 0, 0, 0, 0, 0, 0, 24, 25, 26, 27, 28, 29,
+ 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 32, 33, 34, 35, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, 38, 39, 0,
+ 40, 41, 42, 0, 0, 0, 0, 0, 0, 0, 0, 43, 44, 45, 46, 47, 0, 48, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 0, 0,
+ 51, 52, 53, 0, 54, 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, 56, 0, 57, 58, 59, 0,
+ 0, 0, 0, 0, 0, 0, 0, 60, 0, 61, 0, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 63, 64, 65, 0, 66, 67, 68, 0, 0, 0, 0, 0, 0, 0, 0, 69, 70, 71, 72, 73, 0,
+ 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 77, 0, 78, 79, 80, 81, 0, 82, 0, 0, 0, 0, 0, 0, 0, 0, 83, 84, 85,
+ 0, 86, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 89, 90, 91, 92, 93, 0, 0,
+ 0, 0, 0, 0, 0, 0, 94, 95, 96, 97, 98, 99, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 101, 0, 0, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 103, 104, 0, 0, 105, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 107, 108, 109, 0, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111, 112, 113,
+ 114, 115, 0, 0, 116, 0, 0, 0, 0, 0, 0, 0, 0, 117, 118, 119, 120, 121,
+ 122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, 124, 0, 0, 125, 0, 0, 0, 0,
+ 0, 0, 0, 0, 126, 127, 128, 0, 0, 129, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 130, 131, 132, 133, 134, 135, 0, 0, 0, 0, 0, 0, 0, 0, 136, 137, 138, 139,
+ 140, 141, 142, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 143, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 144, 145, 146, 0, 0, 147, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 148, 149, 150, 151, 152, 153, 154, 0, 0, 0, 0, 0, 0, 0, 0, 155, 156, 157,
+ 158, 159, 160, 161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 162, 0, 163, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 164, 0, 165, 0, 166, 167, 168, 0, 0, 0, 0, 0, 0,
+ 0, 0, 169, 0, 0, 170, 171, 172, 173, 174, 0, 0, 0, 0, 0, 0, 0, 0, 175,
+ 176, 0, 0, 177, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 178, 179, 180, 181, 182,
+ 183, 184, 185, 0, 0, 0, 0, 0, 0, 0, 0, 186, 187, 188, 189, 190, 191, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 192, 0, 193, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 194, 195, 196, 197, 198, 199, 200, 0, 0, 0, 0, 0, 0, 0, 0, 201, 202,
+ 203, 204, 205, 206, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 207, 208, 0, 209,
+ 210, 211, 0, 0, 0, 0, 0, 0, 0, 0, 212, 213, 214, 215, 216, 217, 218, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 219, 0, 0, 0, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 221, 222, 223, 0, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 226, 227, 228, 0, 229, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 230, 231, 232, 0, 233, 0, 234, 0, 0, 0, 0, 0, 0, 0, 0, 235,
+ 0, 0, 0, 0, 0, 0, 236, 0, 0, 0, 0, 0, 0, 0, 0, 237, 0, 238, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 239, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 241, 242, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 243, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 244, 245, 246, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 247, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 248, 249, 250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 251, 252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 253, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 255, 256, 0, 257, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 258, 0,
+ 259, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 260, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 261, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 262,
+ 263, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 264, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 265, 266, 267, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 268, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 269, 270, 271, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 272, 273, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 274, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 275, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 276, 277, 0, 278, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 279, 0, 280, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 281, 282,
+ 283, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 284, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 285, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 286,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 287, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 288, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 289, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 290, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 291, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 292,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 293, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 294, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 295, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 296, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 297, 298, 299, 0, 300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 301, 0, 302, 0, 303, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 304, 305, 306, 0, 307,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 308, 0, 309, 0, 310, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 311, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 312, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 313, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 314, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 315, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 316, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 317, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 318, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 319, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 320, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 321, 322, 0, 0,
+ 323, 0, 0, 324, 0, 0, 0, 0, 0, 0, 0, 0, 325, 0, 0, 326, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 327, 0, 0, 0, 328, 0, 0, 329, 0, 0, 0, 0, 0, 0, 0, 0, 330,
+ 331, 0, 332, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 333, 0, 0, 0, 334, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 335, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 336, 337, 338, 0, 339, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 340, 0, 0, 341,
+ 0, 0, 0, 342, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 343, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 344, 0, 0, 0, 0, 0, 0, 0, 345, 346, 0,
+ 0, 347, 0, 0, 348, 0, 0, 0, 0, 0, 0, 0, 0, 349, 0, 0, 350, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 351, 0, 0, 0, 352, 0, 0, 353, 0, 0, 0, 0, 0, 0, 0, 0,
+ 354, 355, 0, 356, 0, 0, 0, 357, 0, 0, 0, 0, 0, 0, 0, 358, 0, 0, 0, 359,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 360, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 361, 362, 363, 0, 364, 0, 0, 365, 0, 0, 0, 0, 0, 0, 0, 0, 366, 0,
+ 0, 367, 0, 0, 0, 368, 0, 0, 0, 0, 0, 0, 0, 369, 0, 0, 0, 0, 0, 0, 370, 0,
+ 0, 0, 0, 0, 0, 0, 0, 371, 0, 0, 0, 0, 0, 0, 372, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 373, 0, 0, 0, 0, 0, 0, 0, 0, 374, 375, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 376, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 377, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 378, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 379, 380, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 381, 382, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 383, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 384, 385, 386, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 387, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 388, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 389, 390, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 391, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 392, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 393, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 394, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 395, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 396, 397, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 398, 399, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 400, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 401, 402, 403, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 404, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 405, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 406, 407, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 408, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 409, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 410, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 411, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 412, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 413, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 414, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 415, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 416, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 417, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 418, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 419, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 420, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 421, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 422, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 424, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 425, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 426, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 427, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 428,
+ 429, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 430, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 431, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 432, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 433, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 434, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 435, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 436, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 437, 438, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 439, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 440, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 441, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 442, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 443, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 444, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 445, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 446, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 447, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 448, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 449, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 450, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 451, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 452, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 453, 0, 0, 0, 454, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 455, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 456, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 457, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 458, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 459, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 460, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 461, 462, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 463, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 464, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 465, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 466, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 467, 0, 0, 0, 0, 0, 0, 468, 0, 0, 0,
+ 0, 0, 0, 0, 0, 469, 0, 0, 0, 0, 0, 0, 470, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 471, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 472, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 473, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 474, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 475, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 476, 0, 0, 0, 0, 0, 0, 0, 477, 0, 0,
+ 0, 0, 0, 0, 478, 0, 0, 0, 0, 0, 0, 0, 0, 479, 0, 0, 0, 0, 0, 0, 480, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 481, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 482, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 483, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 484, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 485, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 486, 0, 0,
+ 0, 0, 0, 0, 0, 487, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 488, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 489, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 490, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 491, 0, 0,
+ 0, 0, 0, 0, 492, 0, 0, 0, 0, 0, 0, 0, 0, 493, 0, 0, 0, 0, 0, 0, 494, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 495, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 496, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 497, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 498, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 499, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 500, 0, 0,
+ 0, 0, 0, 0, 0, 501, 0, 0, 0, 0, 0, 0, 502, 0, 0, 0, 0, 0, 0, 0, 0, 503,
+ 0, 0, 0, 0, 0, 0, 504, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 505, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 506, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 507, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 508, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 509, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 510, 0, 0, 0, 0, 0, 0, 0, 511, 0, 0, 0, 0, 0, 0, 512, 0,
+ 0, 0, 0, 0, 0, 0, 0, 513, 0, 0, 0, 0, 0, 0, 514, 0, 0, 0, 0, 0, 0, 0,
+ 515, 0, 0, 0, 0, 0, 0, 516, 0, 0, 0, 0, 0, 0, 0, 0, 517, 0, 0, 0, 0, 0,
+ 0, 518, 0, 0, 0, 0, 0, 0, 0, 519, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 520, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 522, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 523, 0, 0, 0, 0, 0, 0, 524, 0, 0, 0, 0, 0, 0, 0, 0, 525, 0, 0, 0, 0,
+ 0, 0, 526, 0, 0, 0, 0, 0, 0, 0, 527, 0, 0, 0, 0, 0, 0, 528, 0, 0, 0, 0,
+ 0, 0, 0, 0, 529, 0, 0, 0, 0, 0, 0, 530, 0, 0, 0, 0, 0, 0, 0, 531, 0, 0,
+ 0, 0, 0, 0, 532, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 533, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 534, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 535, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 536, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 537, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 538, 0, 0, 0, 0, 0, 0, 0, 0, 539, 0, 0, 0, 0, 0, 0, 540, 0, 0,
+ 0, 0, 0, 0, 0, 541, 0, 0, 0, 0, 0, 0, 542, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 543, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 544, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 545, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 546, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 547, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 548, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 549, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 550, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 551, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 552, 0, 0, 0, 0, 0, 0, 0, 0, 553, 0, 0, 0, 0, 0, 0, 554, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 555, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 556, 0, 0, 0, 0, 0, 0, 0, 557, 0, 0, 0, 0, 0, 0, 558, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 559, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 560, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 561, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 562, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 563, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 564, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 565, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 566, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 567, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 568, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 569, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 570, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 571, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 572, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 573, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 574, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 575, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 576, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 577, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 578, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 579, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 580, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 581, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 582, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 583, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 584, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 585, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 586, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 587, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 588, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 589, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 590, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 591, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 592, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 593, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 594, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 595, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 596, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 597, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 598, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 599, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 600,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 601, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 602, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 603,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 604, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 605, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 606, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 607, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 608, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 609, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 610, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 611, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 612, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 613, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 614, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 615, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 616, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 617, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 618, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 619, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 620, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 621, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 622, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 623, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 624, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 625, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 626, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 627, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 628, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 629, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 630, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 631, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 632, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 633, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 634, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 635, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 636, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 637, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 638, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 639, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 640, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 641, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 642, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 643, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 644, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 645, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 646, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 647, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 648, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 649, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 650, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 651, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 652, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 653, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 654, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 655, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 656,
};
static unsigned int comp_data[] = {
- 0, 0, 0, 0, 0, 0, 0, 8814, 0, 0, 0, 8800, 0, 0, 0, 8815, 192, 193, 194,
- 195, 256, 258, 550, 196, 7842, 197, 0, 461, 512, 514, 0, 0, 0, 7840, 0,
- 7680, 0, 0, 260, 0, 0, 0, 7682, 0, 0, 7684, 0, 0, 0, 0, 7686, 0, 0, 262,
- 264, 0, 0, 0, 266, 0, 0, 0, 0, 268, 0, 199, 0, 0, 0, 0, 7690, 0, 0, 0, 0,
- 270, 0, 7692, 0, 0, 0, 7696, 0, 7698, 0, 0, 7694, 0, 200, 201, 202, 7868,
- 274, 276, 278, 203, 7866, 0, 0, 282, 516, 518, 0, 0, 0, 7864, 0, 0, 0,
- 552, 280, 7704, 0, 7706, 0, 0, 0, 0, 7710, 0, 0, 500, 284, 0, 7712, 286,
- 288, 0, 0, 0, 0, 486, 0, 290, 0, 0, 0, 0, 292, 0, 0, 0, 7714, 7718, 0, 0,
- 0, 542, 0, 7716, 0, 0, 0, 7720, 0, 0, 7722, 0, 0, 0, 204, 205, 206, 296,
- 298, 300, 304, 207, 7880, 0, 0, 463, 520, 522, 0, 0, 0, 7882, 0, 0, 0, 0,
- 302, 0, 0, 7724, 0, 0, 0, 0, 308, 0, 0, 7728, 0, 0, 0, 0, 0, 488, 0,
- 7730, 0, 0, 0, 310, 0, 0, 0, 0, 7732, 0, 0, 313, 0, 0, 0, 0, 0, 317, 0,
- 7734, 0, 0, 0, 315, 0, 7740, 0, 0, 7738, 0, 0, 7742, 0, 0, 0, 0, 7744, 0,
- 0, 7746, 0, 0, 504, 323, 0, 209, 0, 0, 7748, 0, 0, 0, 0, 327, 0, 7750, 0,
- 0, 0, 325, 0, 7754, 0, 0, 7752, 0, 210, 211, 212, 213, 332, 334, 558,
- 214, 7886, 0, 336, 465, 524, 526, 0, 0, 416, 7884, 0, 0, 0, 0, 490, 0, 0,
- 7764, 0, 0, 0, 0, 7766, 0, 0, 340, 0, 0, 0, 0, 7768, 0, 0, 0, 0, 344,
- 528, 530, 0, 0, 0, 7770, 0, 0, 0, 342, 0, 0, 0, 0, 7774, 0, 0, 346, 348,
- 0, 0, 0, 7776, 0, 0, 0, 0, 352, 0, 7778, 0, 0, 536, 350, 0, 0, 0, 0,
- 7786, 0, 0, 0, 0, 356, 0, 7788, 0, 0, 538, 354, 0, 7792, 0, 0, 7790, 0,
- 217, 218, 219, 360, 362, 364, 0, 220, 7910, 366, 368, 467, 532, 534, 0,
- 0, 431, 7908, 7794, 0, 0, 0, 370, 7798, 0, 7796, 0, 0, 0, 0, 0, 7804, 0,
- 7806, 0, 0, 7808, 7810, 372, 0, 0, 0, 7814, 7812, 0, 7816, 0, 0, 0, 0,
- 7818, 7820, 7922, 221, 374, 7928, 562, 0, 7822, 376, 7926, 0, 0, 0, 0,
- 7924, 0, 0, 0, 377, 7824, 0, 0, 0, 379, 0, 0, 0, 0, 381, 0, 7826, 0, 0,
- 0, 0, 7828, 0, 224, 225, 226, 227, 257, 259, 551, 228, 7843, 229, 0, 462,
- 513, 515, 0, 0, 0, 7841, 0, 7681, 0, 0, 261, 0, 0, 0, 7683, 0, 0, 7685,
- 0, 0, 0, 0, 7687, 0, 0, 263, 265, 0, 0, 0, 267, 0, 0, 0, 0, 269, 0, 231,
- 0, 0, 0, 0, 7691, 0, 0, 0, 0, 271, 0, 7693, 0, 0, 0, 7697, 0, 7699, 0, 0,
- 7695, 0, 232, 233, 234, 7869, 275, 277, 279, 235, 7867, 0, 0, 283, 517,
- 519, 0, 0, 0, 7865, 0, 0, 0, 553, 281, 7705, 0, 7707, 0, 0, 0, 0, 7711,
- 0, 0, 501, 285, 0, 7713, 287, 289, 0, 0, 0, 0, 487, 0, 291, 0, 0, 0, 0,
- 293, 0, 0, 0, 7715, 7719, 0, 0, 0, 543, 0, 7717, 0, 0, 0, 7721, 0, 0,
- 7723, 0, 7830, 0, 236, 237, 238, 297, 299, 301, 0, 239, 7881, 0, 0, 464,
- 521, 523, 0, 0, 0, 7883, 0, 0, 0, 0, 303, 0, 0, 7725, 0, 0, 0, 0, 309, 0,
- 0, 0, 0, 496, 0, 7729, 0, 0, 0, 0, 0, 489, 0, 7731, 0, 0, 0, 311, 0, 0,
- 0, 0, 7733, 0, 0, 314, 0, 0, 0, 0, 0, 318, 0, 7735, 0, 0, 0, 316, 0,
- 7741, 0, 0, 7739, 0, 0, 7743, 0, 0, 0, 0, 7745, 0, 0, 7747, 0, 0, 505,
- 324, 0, 241, 0, 0, 7749, 0, 0, 0, 0, 328, 0, 7751, 0, 0, 0, 326, 0, 7755,
- 0, 0, 7753, 0, 242, 243, 244, 245, 333, 335, 559, 246, 7887, 0, 337, 466,
- 525, 527, 0, 0, 417, 7885, 0, 0, 0, 0, 491, 0, 0, 7765, 0, 0, 0, 0, 7767,
- 0, 0, 341, 0, 0, 0, 0, 7769, 0, 0, 0, 0, 345, 529, 531, 0, 0, 0, 7771, 0,
- 0, 0, 343, 0, 0, 0, 0, 7775, 0, 0, 347, 349, 0, 0, 0, 7777, 0, 0, 0, 0,
- 353, 0, 7779, 0, 0, 537, 351, 0, 0, 0, 0, 7787, 7831, 0, 0, 0, 357, 0,
- 7789, 0, 0, 539, 355, 0, 7793, 0, 0, 7791, 0, 249, 250, 251, 361, 363,
- 365, 0, 252, 7911, 367, 369, 468, 533, 535, 0, 0, 432, 7909, 7795, 0, 0,
- 0, 371, 7799, 0, 7797, 0, 0, 0, 0, 0, 7805, 0, 7807, 0, 0, 7809, 7811,
- 373, 0, 0, 0, 7815, 7813, 0, 7832, 0, 0, 0, 7817, 0, 0, 0, 0, 7819, 7821,
- 7923, 253, 375, 7929, 563, 0, 7823, 255, 7927, 7833, 0, 0, 0, 7925, 0, 0,
- 0, 378, 7825, 0, 0, 0, 380, 0, 0, 0, 0, 382, 0, 7827, 0, 0, 0, 0, 7829,
- 0, 8173, 901, 0, 0, 8129, 0, 0, 0, 7846, 7844, 0, 7850, 7848, 0, 0, 0,
- 478, 0, 0, 0, 0, 506, 0, 0, 0, 508, 0, 0, 482, 0, 0, 0, 0, 7688, 0, 0,
- 7872, 7870, 0, 7876, 7874, 0, 0, 0, 0, 7726, 0, 0, 7890, 7888, 0, 7894,
- 7892, 0, 0, 0, 0, 7756, 0, 0, 556, 0, 0, 7758, 554, 0, 0, 0, 0, 510, 0,
- 0, 475, 471, 0, 0, 469, 0, 0, 0, 0, 0, 0, 473, 7847, 7845, 0, 7851, 7849,
- 0, 0, 0, 479, 0, 0, 0, 0, 507, 0, 0, 0, 509, 0, 0, 483, 0, 0, 0, 0, 7689,
- 0, 0, 7873, 7871, 0, 7877, 7875, 0, 0, 0, 0, 7727, 0, 0, 7891, 7889, 0,
- 7895, 7893, 0, 0, 0, 0, 7757, 0, 0, 557, 0, 0, 7759, 555, 0, 0, 0, 0,
- 511, 0, 0, 476, 472, 0, 0, 470, 0, 0, 0, 0, 0, 0, 474, 7856, 7854, 0,
- 7860, 7858, 0, 0, 0, 7857, 7855, 0, 7861, 7859, 0, 0, 0, 7700, 7702, 0,
- 0, 7701, 7703, 0, 0, 7760, 7762, 0, 0, 7761, 7763, 0, 0, 0, 0, 7780, 0,
- 0, 0, 7781, 0, 0, 0, 7782, 0, 0, 0, 7783, 0, 0, 7800, 0, 0, 0, 7801, 0,
- 0, 0, 0, 0, 7802, 0, 0, 0, 7803, 0, 0, 7835, 0, 7900, 7898, 0, 7904,
- 7902, 0, 0, 0, 0, 7906, 0, 0, 7901, 7899, 0, 7905, 7903, 0, 0, 0, 0,
- 7907, 0, 0, 7914, 7912, 0, 7918, 7916, 0, 0, 0, 0, 7920, 0, 0, 7915,
- 7913, 0, 7919, 7917, 0, 0, 0, 0, 7921, 0, 0, 0, 0, 0, 494, 492, 0, 0, 0,
- 493, 0, 0, 0, 480, 0, 0, 0, 481, 0, 0, 0, 0, 7708, 0, 0, 0, 7709, 0, 0,
- 560, 0, 0, 0, 561, 0, 0, 0, 0, 0, 0, 495, 8122, 902, 0, 0, 8121, 8120, 0,
- 0, 0, 0, 7944, 7945, 0, 8124, 0, 0, 8136, 904, 0, 0, 0, 0, 7960, 7961,
- 8138, 905, 0, 0, 0, 0, 7976, 7977, 0, 8140, 0, 0, 8154, 906, 0, 0, 8153,
- 8152, 0, 938, 0, 0, 7992, 7993, 8184, 908, 0, 0, 0, 0, 8008, 8009, 0, 0,
- 0, 8172, 8170, 910, 0, 0, 8169, 8168, 0, 939, 0, 0, 0, 8025, 8186, 911,
- 0, 0, 0, 0, 8040, 8041, 0, 8188, 0, 0, 0, 8116, 0, 0, 0, 8132, 0, 0,
- 8048, 940, 0, 0, 8113, 8112, 0, 0, 0, 0, 7936, 7937, 8118, 8115, 0, 0,
- 8050, 941, 0, 0, 0, 0, 7952, 7953, 8052, 942, 0, 0, 0, 0, 7968, 7969,
- 8134, 8131, 0, 0, 8054, 943, 0, 0, 8145, 8144, 0, 970, 0, 0, 7984, 7985,
- 8150, 0, 0, 0, 8056, 972, 0, 0, 0, 0, 8000, 8001, 0, 0, 8164, 8165, 8058,
- 973, 0, 0, 8161, 8160, 0, 971, 0, 0, 8016, 8017, 8166, 0, 0, 0, 8060,
- 974, 0, 0, 0, 0, 8032, 8033, 8182, 8179, 0, 0, 8146, 912, 0, 0, 8151, 0,
- 0, 0, 8162, 944, 0, 0, 8167, 0, 0, 0, 0, 8180, 0, 0, 0, 979, 0, 0, 0, 0,
- 0, 980, 0, 0, 0, 1031, 0, 1232, 0, 1234, 0, 1027, 0, 0, 1024, 0, 0, 0, 0,
- 1238, 0, 1025, 0, 1217, 0, 1244, 0, 0, 0, 1246, 1037, 0, 0, 0, 1250,
- 1049, 0, 1252, 0, 1036, 0, 0, 0, 0, 0, 1254, 1262, 1038, 0, 1264, 0, 0,
- 1266, 0, 0, 0, 0, 1268, 0, 0, 0, 1272, 0, 0, 0, 1260, 0, 1233, 0, 1235,
- 0, 1107, 0, 0, 1104, 0, 0, 0, 0, 1239, 0, 1105, 0, 1218, 0, 1245, 0, 0,
- 0, 1247, 1117, 0, 0, 0, 1251, 1081, 0, 1253, 0, 1116, 0, 0, 0, 0, 0,
- 1255, 1263, 1118, 0, 1265, 0, 0, 1267, 0, 0, 0, 0, 1269, 0, 0, 0, 1273,
- 0, 0, 0, 1261, 0, 0, 0, 1111, 1142, 0, 0, 0, 1143, 0, 0, 0, 0, 0, 0,
- 1242, 0, 0, 0, 1243, 0, 0, 0, 1258, 0, 0, 0, 1259, 0, 0, 1570, 1571,
- 1573, 0, 0, 0, 0, 0, 0, 1572, 0, 0, 0, 1574, 0, 0, 0, 1730, 0, 0, 0,
- 1747, 0, 0, 0, 1728, 0, 2345, 0, 0, 0, 2353, 0, 0, 0, 2356, 0, 0, 0, 0,
- 2507, 2508, 2891, 2888, 2892, 0, 2964, 0, 0, 0, 0, 0, 0, 3018, 3020, 0,
- 0, 0, 0, 0, 0, 3019, 0, 3144, 0, 0, 0, 0, 0, 3264, 0, 0, 3274, 3271,
- 3272, 0, 0, 0, 0, 0, 0, 3275, 0, 3402, 3404, 0, 0, 3403, 0, 0, 0, 0, 0,
- 3546, 3548, 3550, 0, 0, 0, 0, 0, 3549, 0, 0, 4134, 0, 0, 0, 0, 6918, 0,
- 0, 0, 6920, 0, 0, 0, 6922, 0, 0, 0, 6924, 0, 0, 0, 6926, 0, 0, 0, 6930,
- 0, 0, 0, 6971, 0, 0, 0, 6973, 0, 0, 0, 6976, 0, 0, 0, 6977, 0, 0, 0,
- 6979, 7736, 0, 0, 0, 7737, 0, 0, 0, 7772, 0, 0, 0, 7773, 0, 0, 0, 0, 0,
- 7784, 0, 0, 0, 7785, 0, 0, 0, 7852, 0, 0, 7862, 0, 0, 0, 0, 7853, 0, 0,
- 7863, 0, 0, 0, 0, 7878, 0, 0, 0, 7879, 0, 0, 0, 7896, 0, 0, 0, 7897, 0,
- 7938, 7940, 0, 0, 7942, 8064, 0, 0, 7939, 7941, 0, 0, 7943, 8065, 0, 0,
- 0, 8066, 0, 0, 0, 8067, 0, 0, 0, 8068, 0, 0, 0, 8069, 0, 0, 0, 8070, 0,
- 0, 0, 8071, 0, 0, 7946, 7948, 0, 0, 7950, 8072, 0, 0, 7947, 7949, 0, 0,
- 7951, 8073, 0, 0, 0, 8074, 0, 0, 0, 8075, 0, 0, 0, 8076, 0, 0, 0, 8077,
- 0, 0, 0, 8078, 0, 0, 0, 8079, 0, 0, 7954, 7956, 0, 0, 7955, 7957, 0, 0,
- 7962, 7964, 0, 0, 7963, 7965, 0, 0, 7970, 7972, 0, 0, 7974, 8080, 0, 0,
- 7971, 7973, 0, 0, 7975, 8081, 0, 0, 0, 8082, 0, 0, 0, 8083, 0, 0, 0,
- 8084, 0, 0, 0, 8085, 0, 0, 0, 8086, 0, 0, 0, 8087, 0, 0, 7978, 7980, 0,
- 0, 7982, 8088, 0, 0, 7979, 7981, 0, 0, 7983, 8089, 0, 0, 0, 8090, 0, 0,
- 0, 8091, 0, 0, 0, 8092, 0, 0, 0, 8093, 0, 0, 0, 8094, 0, 0, 0, 8095, 0,
- 0, 7986, 7988, 0, 0, 7990, 0, 0, 0, 7987, 7989, 0, 0, 7991, 0, 0, 0,
- 7994, 7996, 0, 0, 7998, 0, 0, 0, 7995, 7997, 0, 0, 7999, 0, 0, 0, 8002,
- 8004, 0, 0, 8003, 8005, 0, 0, 8010, 8012, 0, 0, 8011, 8013, 0, 0, 8018,
- 8020, 0, 0, 8022, 0, 0, 0, 8019, 8021, 0, 0, 8023, 0, 0, 0, 8027, 8029,
- 0, 0, 8031, 0, 0, 0, 8034, 8036, 0, 0, 8038, 8096, 0, 0, 8035, 8037, 0,
- 0, 8039, 8097, 0, 0, 0, 8098, 0, 0, 0, 8099, 0, 0, 0, 8100, 0, 0, 0,
- 8101, 0, 0, 0, 8102, 0, 0, 0, 8103, 0, 0, 8042, 8044, 0, 0, 8046, 8104,
- 0, 0, 8043, 8045, 0, 0, 8047, 8105, 0, 0, 0, 8106, 0, 0, 0, 8107, 0, 0,
- 0, 8108, 0, 0, 0, 8109, 0, 0, 0, 8110, 0, 0, 0, 8111, 0, 0, 0, 8114, 0,
- 0, 0, 8130, 0, 0, 0, 8178, 0, 0, 0, 8119, 0, 0, 8141, 8142, 0, 0, 8143,
- 0, 0, 0, 0, 8135, 0, 0, 0, 8183, 0, 0, 8157, 8158, 0, 0, 8159, 0, 0, 0,
- 0, 0, 0, 8602, 0, 0, 0, 8603, 0, 0, 0, 8622, 0, 0, 0, 8653, 0, 0, 0,
- 8655, 0, 0, 0, 8654, 0, 0, 0, 8708, 0, 0, 0, 8713, 0, 0, 0, 8716, 0, 0,
- 0, 8740, 0, 0, 0, 8742, 0, 0, 0, 8769, 0, 0, 0, 8772, 0, 0, 0, 8775, 0,
- 0, 0, 8777, 0, 0, 0, 8813, 0, 0, 0, 8802, 0, 0, 0, 8816, 0, 0, 0, 8817,
- 0, 0, 0, 8820, 0, 0, 0, 8821, 0, 0, 0, 8824, 0, 0, 0, 8825, 0, 0, 0,
- 8832, 0, 0, 0, 8833, 0, 0, 0, 8928, 0, 0, 0, 8929, 0, 0, 0, 8836, 0, 0,
- 0, 8837, 0, 0, 0, 8840, 0, 0, 0, 8841, 0, 0, 0, 8930, 0, 0, 0, 8931, 0,
- 0, 0, 8876, 0, 0, 0, 8877, 0, 0, 0, 8878, 0, 0, 0, 8879, 0, 0, 0, 8938,
- 0, 0, 0, 8939, 0, 0, 0, 8940, 0, 0, 0, 8941, 12436, 0, 0, 0, 12364, 0, 0,
- 0, 12366, 0, 0, 0, 12368, 0, 0, 0, 12370, 0, 0, 0, 12372, 0, 0, 0, 12374,
- 0, 0, 0, 12376, 0, 0, 0, 12378, 0, 0, 0, 12380, 0, 0, 0, 12382, 0, 0, 0,
- 12384, 0, 0, 0, 12386, 0, 0, 0, 12389, 0, 0, 0, 12391, 0, 0, 0, 12393, 0,
- 0, 0, 12400, 12401, 0, 0, 12403, 12404, 0, 0, 12406, 12407, 0, 0, 12409,
- 12410, 0, 0, 12412, 12413, 0, 0, 12446, 0, 0, 0, 12532, 0, 0, 0, 12460,
- 0, 0, 0, 12462, 0, 0, 0, 12464, 0, 0, 0, 12466, 0, 0, 0, 12468, 0, 0, 0,
- 12470, 0, 0, 0, 12472, 0, 0, 0, 12474, 0, 0, 0, 12476, 0, 0, 0, 12478, 0,
- 0, 0, 12480, 0, 0, 0, 12482, 0, 0, 0, 12485, 0, 0, 0, 12487, 0, 0, 0,
- 12489, 0, 0, 0, 12496, 12497, 0, 0, 12499, 12500, 0, 0, 12502, 12503, 0,
- 0, 12505, 12506, 0, 0, 12508, 12509, 0, 0, 12535, 0, 0, 0, 12536, 0, 0,
- 0, 12537, 0, 0, 0, 12538, 0, 0, 0, 12542, 0, 0, 0, 0, 0, 69786, 0, 0, 0,
- 69788, 0, 0, 0, 69803, 0, 0, 0, 0, 69934, 0, 0, 0, 69935,
+ 0, 0, 0, 0, 0, 0, 0, 8814, 0, 8800, 0, 0, 0, 0, 0, 8815, 0, 0, 192, 193,
+ 194, 195, 256, 258, 550, 196, 7842, 197, 0, 461, 512, 514, 0, 0, 0, 7840,
+ 0, 7680, 0, 0, 260, 0, 0, 0, 0, 0, 7682, 0, 0, 7684, 0, 0, 0, 0, 7686, 0,
+ 0, 0, 0, 262, 264, 0, 0, 0, 266, 0, 0, 0, 0, 268, 0, 0, 0, 0, 0, 199, 0,
+ 0, 7690, 0, 0, 0, 0, 270, 0, 7692, 0, 0, 0, 7696, 0, 7698, 0, 0, 7694, 0,
+ 0, 0, 200, 201, 202, 7868, 274, 276, 278, 203, 7866, 0, 0, 282, 516, 518,
+ 0, 0, 0, 7864, 0, 0, 0, 552, 280, 7704, 0, 7706, 0, 0, 7710, 0, 0, 0, 0,
+ 500, 284, 0, 7712, 286, 288, 0, 0, 0, 0, 486, 0, 0, 0, 0, 0, 290, 0, 0,
+ 292, 0, 0, 0, 7714, 7718, 0, 0, 0, 542, 0, 7716, 0, 0, 0, 7720, 0, 0,
+ 7722, 0, 0, 0, 0, 0, 204, 205, 206, 296, 298, 300, 304, 207, 7880, 0, 0,
+ 463, 520, 522, 0, 0, 0, 7882, 302, 0, 0, 7724, 0, 0, 308, 0, 0, 0, 0,
+ 7728, 0, 488, 0, 0, 0, 0, 0, 7730, 0, 0, 0, 310, 7732, 0, 0, 0, 0, 313,
+ 0, 0, 0, 0, 0, 317, 0, 7734, 0, 0, 0, 315, 0, 7740, 0, 0, 7738, 0, 0, 0,
+ 0, 7742, 7744, 0, 0, 0, 0, 0, 0, 7746, 504, 323, 0, 209, 0, 0, 7748, 0,
+ 0, 0, 0, 327, 0, 7750, 0, 0, 0, 325, 0, 7754, 0, 0, 7752, 0, 0, 0, 210,
+ 211, 212, 213, 332, 334, 558, 214, 7886, 0, 336, 465, 524, 526, 0, 0,
+ 416, 7884, 490, 0, 0, 0, 0, 7764, 0, 0, 0, 0, 7766, 0, 0, 0, 0, 340,
+ 7768, 0, 0, 0, 0, 344, 528, 530, 0, 0, 0, 7770, 0, 0, 0, 342, 7774, 0, 0,
+ 0, 0, 346, 348, 0, 0, 0, 7776, 0, 0, 0, 0, 352, 0, 7778, 0, 0, 536, 350,
+ 0, 0, 7786, 0, 0, 0, 0, 356, 0, 0, 0, 0, 0, 7788, 0, 0, 538, 354, 0,
+ 7792, 0, 0, 7790, 0, 0, 0, 217, 218, 219, 360, 362, 364, 0, 220, 7910,
+ 366, 368, 467, 532, 534, 0, 0, 431, 7908, 7794, 0, 0, 0, 370, 7798, 0,
+ 7796, 0, 0, 0, 7804, 0, 0, 0, 0, 0, 7806, 7808, 7810, 372, 0, 0, 0, 7814,
+ 7812, 0, 7816, 0, 0, 7818, 7820, 0, 0, 7922, 221, 374, 7928, 562, 0,
+ 7822, 376, 7926, 0, 0, 0, 0, 7924, 0, 0, 0, 0, 0, 377, 7824, 0, 0, 0,
+ 379, 0, 0, 0, 0, 381, 0, 0, 0, 0, 0, 7826, 7828, 0, 0, 0, 224, 225, 226,
+ 227, 257, 259, 551, 228, 7843, 229, 0, 462, 513, 515, 0, 0, 0, 7841, 0,
+ 7681, 0, 0, 261, 0, 7683, 0, 0, 0, 0, 0, 0, 7685, 7687, 0, 0, 0, 0, 263,
+ 265, 0, 0, 0, 267, 0, 0, 0, 0, 269, 0, 231, 0, 0, 7691, 0, 0, 0, 0, 271,
+ 0, 0, 0, 0, 0, 7693, 0, 0, 0, 7697, 0, 7699, 0, 0, 7695, 0, 0, 0, 232,
+ 233, 234, 7869, 275, 277, 279, 235, 7867, 0, 0, 283, 517, 519, 0, 0, 0,
+ 7865, 0, 0, 0, 553, 281, 7705, 0, 7707, 0, 0, 7711, 0, 0, 0, 0, 501, 285,
+ 0, 7713, 287, 289, 0, 0, 0, 0, 487, 0, 291, 0, 0, 293, 0, 0, 0, 7715,
+ 7719, 0, 0, 0, 543, 0, 0, 0, 0, 0, 7717, 0, 0, 0, 7721, 0, 0, 7723, 0,
+ 7830, 0, 0, 0, 236, 237, 238, 297, 299, 301, 0, 239, 7881, 0, 0, 464,
+ 521, 523, 0, 0, 0, 7883, 0, 0, 0, 0, 303, 0, 0, 7725, 0, 0, 309, 0, 0, 0,
+ 0, 496, 0, 0, 0, 7729, 0, 0, 0, 0, 0, 489, 0, 7731, 0, 0, 0, 311, 0, 0,
+ 0, 0, 7733, 0, 0, 0, 0, 314, 0, 318, 0, 0, 0, 0, 0, 7735, 0, 0, 0, 316,
+ 0, 7741, 0, 0, 7739, 0, 0, 0, 0, 7743, 0, 0, 0, 0, 7745, 0, 0, 7747, 0,
+ 0, 0, 0, 505, 324, 0, 241, 0, 0, 7749, 0, 0, 0, 0, 328, 0, 0, 0, 0, 0,
+ 7751, 0, 0, 0, 326, 0, 7755, 0, 0, 7753, 0, 0, 0, 242, 243, 244, 245,
+ 333, 335, 559, 246, 7887, 0, 337, 466, 525, 527, 0, 0, 417, 7885, 0, 0,
+ 0, 0, 491, 0, 0, 0, 0, 7765, 7767, 0, 0, 0, 0, 341, 0, 0, 0, 0, 7769, 0,
+ 0, 0, 0, 345, 529, 531, 0, 0, 0, 7771, 0, 0, 0, 343, 0, 0, 0, 0, 7775, 0,
+ 0, 0, 0, 347, 349, 0, 0, 0, 7777, 0, 0, 0, 0, 353, 0, 0, 0, 0, 0, 7779,
+ 0, 0, 537, 351, 0, 0, 7787, 7831, 0, 0, 0, 357, 0, 7789, 0, 0, 539, 355,
+ 0, 7793, 0, 0, 7791, 0, 0, 0, 249, 250, 251, 361, 363, 365, 0, 252, 7911,
+ 367, 369, 468, 533, 535, 0, 0, 432, 7909, 7795, 0, 0, 0, 371, 7799, 0,
+ 7797, 0, 0, 0, 7805, 0, 7807, 0, 0, 0, 0, 7809, 7811, 373, 0, 0, 0, 7815,
+ 7813, 0, 7832, 0, 0, 0, 7817, 0, 0, 7819, 7821, 0, 0, 7923, 253, 375,
+ 7929, 563, 0, 7823, 255, 7927, 7833, 0, 0, 0, 7925, 0, 378, 7825, 0, 0,
+ 0, 380, 0, 0, 0, 0, 382, 0, 7827, 0, 0, 0, 0, 7829, 0, 0, 0, 8173, 901,
+ 0, 0, 8129, 0, 7846, 7844, 0, 7850, 7848, 0, 0, 0, 0, 0, 478, 0, 0, 506,
+ 0, 0, 0, 0, 0, 508, 0, 0, 482, 0, 0, 7688, 0, 0, 0, 0, 7872, 7870, 0,
+ 7876, 0, 0, 0, 0, 7874, 0, 0, 7726, 0, 0, 0, 0, 7890, 7888, 0, 7894, 0,
+ 0, 0, 0, 7892, 0, 0, 7756, 0, 0, 556, 0, 0, 7758, 0, 0, 554, 0, 0, 510,
+ 0, 0, 0, 0, 475, 471, 0, 0, 469, 0, 0, 473, 0, 0, 7847, 7845, 0, 7851,
+ 7849, 0, 0, 0, 0, 0, 479, 0, 0, 507, 0, 0, 0, 0, 0, 509, 0, 0, 483, 0, 0,
+ 7689, 0, 0, 0, 0, 7873, 7871, 0, 7877, 0, 0, 0, 0, 7875, 0, 0, 7727, 0,
+ 0, 0, 0, 7891, 7889, 0, 7895, 0, 0, 0, 0, 7893, 0, 0, 7757, 0, 0, 557, 0,
+ 0, 7759, 0, 0, 555, 0, 0, 511, 0, 0, 0, 0, 476, 472, 0, 0, 470, 0, 0,
+ 474, 0, 0, 7856, 7854, 0, 7860, 7858, 0, 0, 0, 0, 0, 7857, 7855, 0, 7861,
+ 0, 0, 0, 0, 7859, 0, 7700, 7702, 0, 0, 0, 0, 7701, 7703, 7760, 7762, 0,
+ 0, 0, 0, 7761, 7763, 0, 0, 7780, 0, 7781, 0, 0, 0, 0, 0, 7782, 0, 7783,
+ 0, 0, 0, 0, 7800, 0, 0, 0, 0, 0, 7801, 0, 0, 0, 7802, 0, 7803, 0, 0, 0,
+ 0, 7835, 0, 0, 0, 7900, 7898, 0, 7904, 0, 0, 0, 0, 7902, 0, 0, 0, 0,
+ 7906, 7901, 7899, 0, 7905, 7903, 0, 0, 0, 0, 7907, 0, 0, 0, 0, 7914,
+ 7912, 0, 7918, 0, 0, 0, 0, 7916, 0, 0, 0, 0, 7920, 7915, 7913, 0, 7919,
+ 7917, 0, 0, 0, 0, 7921, 0, 0, 0, 494, 0, 0, 492, 0, 0, 0, 0, 0, 493, 0,
+ 480, 0, 0, 0, 0, 0, 481, 0, 0, 7708, 0, 0, 0, 0, 0, 7709, 560, 0, 0, 0,
+ 0, 0, 561, 0, 0, 0, 0, 495, 0, 0, 8122, 902, 0, 0, 8121, 8120, 7944,
+ 7945, 0, 0, 0, 0, 0, 8124, 8136, 904, 0, 0, 0, 0, 7960, 7961, 0, 0, 8138,
+ 905, 7976, 7977, 0, 0, 0, 0, 0, 8140, 8154, 906, 0, 0, 8153, 8152, 0,
+ 938, 0, 0, 7992, 7993, 0, 0, 8184, 908, 8008, 8009, 0, 0, 0, 0, 0, 8172,
+ 0, 0, 8170, 910, 0, 0, 8169, 8168, 0, 939, 0, 0, 0, 8025, 0, 0, 8186,
+ 911, 0, 0, 0, 0, 8040, 8041, 0, 8188, 0, 0, 0, 0, 0, 8116, 0, 8132, 0, 0,
+ 0, 0, 8048, 940, 0, 0, 8113, 8112, 7936, 7937, 0, 0, 0, 0, 8118, 8115,
+ 8050, 941, 0, 0, 0, 0, 7952, 7953, 0, 0, 8052, 942, 7968, 7969, 0, 0, 0,
+ 0, 8134, 8131, 8054, 943, 0, 0, 8145, 8144, 0, 970, 0, 0, 7984, 7985,
+ 8150, 0, 0, 0, 0, 0, 8056, 972, 8000, 8001, 0, 0, 0, 0, 8164, 8165, 0, 0,
+ 8058, 973, 0, 0, 8161, 8160, 0, 971, 0, 0, 8016, 8017, 0, 0, 0, 0, 8166,
+ 0, 8060, 974, 0, 0, 0, 0, 8032, 8033, 8182, 8179, 0, 0, 0, 0, 8146, 912,
+ 0, 0, 8151, 0, 8162, 944, 0, 0, 8167, 0, 0, 0, 0, 0, 0, 8180, 0, 979, 0,
+ 0, 0, 0, 0, 980, 0, 1031, 0, 0, 0, 1232, 0, 1234, 0, 0, 0, 1027, 1024, 0,
+ 0, 0, 0, 1238, 0, 1025, 0, 0, 0, 1217, 0, 1244, 0, 0, 0, 0, 0, 1246, 0,
+ 0, 1037, 0, 0, 0, 1250, 1049, 0, 1252, 0, 0, 0, 1036, 0, 0, 0, 1254, 0,
+ 0, 1262, 1038, 0, 1264, 0, 0, 1266, 0, 0, 1268, 0, 0, 0, 0, 0, 1272, 0,
+ 1260, 0, 0, 0, 1233, 0, 1235, 0, 0, 0, 1107, 1104, 0, 0, 0, 0, 1239, 0,
+ 1105, 0, 0, 0, 1218, 0, 1245, 0, 0, 0, 0, 0, 1247, 0, 0, 1117, 0, 0, 0,
+ 1251, 1081, 0, 1253, 0, 0, 0, 1116, 0, 0, 0, 1255, 0, 0, 1263, 1118, 0,
+ 1265, 0, 0, 1267, 0, 0, 1269, 0, 0, 0, 0, 0, 1273, 0, 1261, 0, 0, 0, 0,
+ 0, 1111, 0, 0, 1142, 0, 1143, 0, 0, 0, 0, 1242, 0, 0, 0, 0, 0, 1243, 0,
+ 1258, 0, 0, 0, 0, 0, 1259, 1570, 1571, 1573, 0, 0, 0, 0, 1572, 0, 1574,
+ 0, 0, 0, 0, 0, 1730, 0, 1747, 0, 0, 0, 0, 0, 1728, 0, 0, 0, 2345, 0,
+ 2353, 0, 0, 0, 0, 0, 2356, 0, 0, 2507, 2508, 0, 0, 2891, 2888, 2892, 0,
+ 0, 0, 2964, 0, 0, 0, 0, 3018, 3020, 0, 0, 0, 0, 3019, 0, 0, 0, 3144, 0,
+ 0, 0, 3264, 3274, 3271, 3272, 0, 0, 0, 0, 3275, 0, 0, 0, 3402, 3404, 0,
+ 0, 0, 0, 3403, 0, 0, 0, 3546, 3548, 3550, 0, 0, 0, 3549, 4134, 0, 0, 0,
+ 0, 0, 0, 6918, 0, 6920, 0, 0, 0, 0, 0, 6922, 0, 6924, 0, 0, 0, 0, 0,
+ 6926, 0, 6930, 0, 0, 0, 0, 0, 6971, 0, 6973, 0, 0, 0, 0, 0, 6976, 0,
+ 6977, 0, 0, 0, 0, 0, 6979, 0, 0, 7736, 0, 7737, 0, 0, 0, 0, 0, 7772, 0,
+ 7773, 0, 0, 0, 7784, 0, 0, 0, 0, 0, 7785, 0, 7852, 0, 0, 7862, 0, 0,
+ 7853, 0, 0, 7863, 0, 0, 7878, 0, 0, 0, 0, 0, 7879, 0, 7896, 0, 0, 0, 0,
+ 0, 7897, 0, 0, 0, 7938, 7940, 0, 0, 7942, 8064, 7939, 7941, 0, 0, 7943,
+ 8065, 0, 0, 0, 0, 0, 8066, 0, 8067, 0, 0, 0, 0, 0, 8068, 0, 8069, 0, 0,
+ 0, 0, 0, 8070, 0, 8071, 0, 0, 0, 0, 7946, 7948, 0, 0, 7950, 8072, 7947,
+ 7949, 0, 0, 7951, 8073, 0, 0, 0, 0, 0, 8074, 0, 8075, 0, 0, 0, 0, 0,
+ 8076, 0, 8077, 0, 0, 0, 0, 0, 8078, 0, 8079, 0, 0, 0, 0, 7954, 7956,
+ 7955, 7957, 0, 0, 0, 0, 7962, 7964, 7963, 7965, 0, 0, 0, 0, 7970, 7972,
+ 0, 0, 7974, 8080, 7971, 7973, 0, 0, 7975, 8081, 0, 0, 0, 0, 0, 8082, 0,
+ 8083, 0, 0, 0, 0, 0, 8084, 0, 8085, 0, 0, 0, 0, 0, 8086, 0, 8087, 0, 0,
+ 0, 0, 7978, 7980, 0, 0, 7982, 8088, 7979, 7981, 0, 0, 7983, 8089, 0, 0,
+ 0, 0, 0, 8090, 0, 8091, 0, 0, 0, 0, 0, 8092, 0, 8093, 0, 0, 0, 0, 0,
+ 8094, 0, 8095, 0, 0, 0, 0, 7986, 7988, 0, 0, 7990, 0, 7987, 7989, 0, 0,
+ 7991, 0, 0, 0, 0, 0, 7994, 7996, 0, 0, 7998, 0, 7995, 7997, 0, 0, 7999,
+ 0, 0, 0, 0, 0, 8002, 8004, 8003, 8005, 0, 0, 0, 0, 8010, 8012, 8011,
+ 8013, 0, 0, 0, 0, 8018, 8020, 0, 0, 8022, 0, 8019, 8021, 0, 0, 8023, 0,
+ 0, 0, 0, 0, 8027, 8029, 0, 0, 8031, 0, 8034, 8036, 0, 0, 8038, 8096, 0,
+ 0, 0, 0, 8035, 8037, 0, 0, 8039, 8097, 0, 8098, 0, 0, 0, 0, 0, 8099, 0,
+ 8100, 0, 0, 0, 0, 0, 8101, 0, 8102, 0, 0, 0, 0, 0, 8103, 8042, 8044, 0,
+ 0, 8046, 8104, 0, 0, 0, 0, 8043, 8045, 0, 0, 8047, 8105, 0, 8106, 0, 0,
+ 0, 0, 0, 8107, 0, 8108, 0, 0, 0, 0, 0, 8109, 0, 8110, 0, 0, 0, 0, 0,
+ 8111, 0, 8114, 0, 0, 0, 0, 0, 8130, 0, 8178, 0, 0, 0, 0, 0, 8119, 8141,
+ 8142, 0, 0, 8143, 0, 0, 0, 0, 0, 0, 8135, 0, 8183, 0, 0, 0, 0, 8157,
+ 8158, 0, 0, 8159, 0, 0, 0, 0, 8602, 0, 8603, 0, 0, 0, 0, 0, 8622, 0,
+ 8653, 0, 0, 0, 0, 0, 8655, 0, 8654, 0, 0, 0, 0, 0, 8708, 0, 8713, 0, 0,
+ 0, 0, 0, 8716, 0, 8740, 0, 0, 0, 0, 0, 8742, 0, 8769, 0, 0, 0, 0, 0,
+ 8772, 0, 8775, 0, 0, 0, 0, 0, 8777, 0, 8813, 0, 0, 0, 0, 0, 8802, 0,
+ 8816, 0, 0, 0, 0, 0, 8817, 0, 8820, 0, 0, 0, 0, 0, 8821, 0, 8824, 0, 0,
+ 0, 0, 0, 8825, 0, 8832, 0, 0, 0, 0, 0, 8833, 0, 8928, 0, 0, 0, 0, 0,
+ 8929, 0, 8836, 0, 0, 0, 0, 0, 8837, 0, 8840, 0, 0, 0, 0, 0, 8841, 0,
+ 8930, 0, 0, 0, 0, 0, 8931, 0, 8876, 0, 0, 0, 0, 0, 8877, 0, 8878, 0, 0,
+ 0, 0, 0, 8879, 0, 8938, 0, 0, 0, 0, 0, 8939, 0, 8940, 0, 0, 0, 0, 0,
+ 8941, 0, 0, 12436, 0, 12364, 0, 0, 0, 0, 0, 12366, 0, 12368, 0, 0, 0, 0,
+ 0, 12370, 0, 12372, 0, 0, 0, 0, 0, 12374, 0, 12376, 0, 0, 0, 0, 0, 12378,
+ 0, 12380, 0, 0, 0, 0, 0, 12382, 0, 12384, 0, 0, 0, 0, 0, 12386, 0, 12389,
+ 0, 0, 0, 0, 0, 12391, 0, 12393, 0, 0, 0, 0, 0, 12400, 12401, 12403,
+ 12404, 0, 0, 0, 0, 12406, 12407, 12409, 12410, 0, 0, 0, 0, 12412, 12413,
+ 12446, 0, 0, 0, 0, 0, 12532, 0, 12460, 0, 0, 0, 0, 0, 12462, 0, 12464, 0,
+ 0, 0, 0, 0, 12466, 0, 12468, 0, 0, 0, 0, 0, 12470, 0, 12472, 0, 0, 0, 0,
+ 0, 12474, 0, 12476, 0, 0, 0, 0, 0, 12478, 0, 12480, 0, 0, 0, 0, 0, 12482,
+ 0, 12485, 0, 0, 0, 0, 0, 12487, 0, 12489, 0, 0, 0, 0, 0, 12496, 12497,
+ 12499, 12500, 0, 0, 0, 0, 12502, 12503, 12505, 12506, 0, 0, 0, 0, 12508,
+ 12509, 12535, 0, 0, 0, 0, 0, 12536, 0, 12537, 0, 0, 0, 0, 0, 12538, 0,
+ 12542, 0, 0, 0, 69786, 0, 0, 0, 0, 0, 69788, 0, 69803, 0, 0, 0, 0, 0, 0,
+ 69934, 0, 69935, 0, 0, 70475, 70476, 0, 0, 70844, 70843, 70846, 0, 0,
+ 71098, 0, 0, 0, 0, 0, 71099,
};
static const change_record change_records_3_2_0[] = {
@@ -5183,6 +5696,7 @@ static const change_record change_records_3_2_0[] = {
{ 255, 7, 7, 255, 0 },
{ 255, 7, 8, 255, 0 },
{ 255, 7, 9, 255, 0 },
+ { 255, 19, 255, 255, 0 },
{ 1, 5, 255, 255, 0 },
{ 255, 10, 255, 255, 0 },
{ 18, 255, 255, 255, 0 },
@@ -5204,79 +5718,80 @@ static const change_record change_records_3_2_0[] = {
{ 255, 20, 255, 255, 0 },
{ 255, 255, 255, 255, 1e+16 },
{ 255, 255, 255, 255, 1e+20 },
- { 255, 19, 255, 255, 0 },
{ 255, 19, 255, 255, -1 },
{ 1, 255, 255, 0, 0 },
};
static unsigned char changes_3_2_0_index[] = {
0, 1, 2, 2, 3, 4, 5, 6, 2, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 23, 24, 2, 2, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
- 36, 2, 2, 2, 37, 38, 2, 39, 2, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
- 50, 2, 51, 2, 2, 52, 53, 54, 55, 56, 2, 57, 58, 59, 60, 2, 2, 61, 62, 63,
- 64, 65, 65, 2, 2, 2, 2, 66, 2, 67, 68, 69, 70, 71, 2, 2, 2, 72, 73, 74,
- 75, 76, 77, 78, 79, 80, 81, 2, 2, 2, 2, 2, 2, 82, 2, 2, 2, 2, 2, 83, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 84, 2, 85, 2, 2, 2, 2, 2, 2, 2, 2, 86,
- 87, 2, 2, 2, 2, 2, 2, 2, 88, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 89, 90,
+ 19, 20, 21, 22, 23, 24, 25, 2, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ 36, 37, 2, 2, 2, 38, 39, 2, 40, 2, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ 50, 51, 2, 52, 2, 2, 53, 54, 55, 56, 57, 2, 58, 59, 60, 61, 2, 2, 62, 63,
+ 64, 65, 66, 66, 2, 2, 2, 2, 67, 68, 69, 70, 71, 72, 73, 2, 2, 2, 74, 75,
+ 76, 77, 78, 79, 80, 81, 82, 83, 2, 2, 2, 2, 2, 2, 84, 2, 2, 2, 2, 2, 85,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 91, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 86, 2, 87, 2, 2, 2, 2, 2, 2, 2, 2,
+ 88, 89, 2, 2, 2, 2, 2, 2, 2, 90, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 91,
+ 92, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 93, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 92, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 93, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 94, 95, 2, 2, 2, 2, 2, 2, 2, 2, 96, 49, 49,
- 97, 98, 49, 99, 100, 101, 102, 103, 104, 105, 106, 107, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 94, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 95, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 96, 97, 2, 2, 2, 2, 2, 2, 2, 2, 98, 50, 50,
+ 99, 100, 50, 101, 102, 103, 104, 105, 106, 107, 108, 109, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 108, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 110, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 109, 110, 111, 112, 113, 114, 2, 2, 2, 115, 116, 2, 117, 118,
- 119, 120, 121, 122, 2, 123, 124, 125, 126, 127, 2, 2, 2, 2, 2, 2, 128, 2,
- 129, 130, 131, 2, 132, 2, 133, 2, 2, 2, 134, 2, 2, 2, 135, 136, 137, 138,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 139, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 49, 49, 49, 49, 49, 49, 140, 2, 141, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 49, 49, 49, 49, 49, 49, 49,
- 49, 142, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 111, 112, 113, 114, 115, 116, 2, 2, 117, 118, 119, 2, 120,
+ 121, 122, 123, 124, 125, 2, 126, 127, 128, 129, 130, 131, 2, 50, 50, 132,
+ 2, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 2, 2, 143, 2, 2, 2,
+ 144, 145, 146, 147, 148, 149, 150, 2, 2, 151, 2, 152, 153, 154, 155, 2,
+ 2, 156, 2, 2, 2, 157, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 50, 50, 50, 50, 50,
+ 50, 50, 158, 159, 50, 160, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 50, 50, 50, 50, 50, 50, 50, 50, 161, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 50, 50, 50, 50, 162, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 49, 49, 49, 49, 143, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 144, 145, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 50, 50, 50, 50, 163, 164, 165, 166, 2, 2, 2, 2, 2, 2, 167, 168,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 146, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 169, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 170, 171, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 147, 2, 148, 2, 149, 2, 2, 150, 2, 2, 2, 151, 152,
- 153, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 154, 155,
- 2, 2, 156, 157, 158, 159, 160, 2, 161, 162, 163, 164, 165, 166, 167, 148,
- 168, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 169, 170, 93, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 82, 171, 2, 172, 173, 2, 2, 2,
+ 2, 2, 2, 172, 173, 174, 2, 175, 2, 2, 176, 2, 2, 2, 177, 178, 179, 50,
+ 50, 50, 50, 50, 180, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 50, 181, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 182,
+ 183, 2, 2, 184, 185, 186, 187, 188, 2, 50, 50, 50, 50, 189, 190, 50, 191,
+ 192, 193, 194, 195, 196, 197, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 198,
+ 199, 95, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 84, 200, 2, 201,
+ 202, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 174, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 175, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 176, 2, 2, 2,
+ 2, 203, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 204, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 205, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 177, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 206, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
- 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 178, 49, 179, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
+ 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 207, 50, 208,
+ 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
+ 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
+ 50, 50, 50, 50, 50, 50, 50, 50, 209, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 203,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 174, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -5511,7 +6026,7 @@ static unsigned char changes_3_2_0_index[] = {
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 49, 180, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 50, 210, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -5575,7 +6090,7 @@ static unsigned char changes_3_2_0_index[] = {
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2,
};
static unsigned char changes_3_2_0_data[] = {
@@ -5611,7 +6126,7 @@ static unsigned char changes_3_2_0_data[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 10, 0, 9, 9, 0, 0, 0, 9, 9,
- 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 9, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -5623,16 +6138,16 @@ static unsigned char changes_3_2_0_data[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0,
9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9, 0, 9, 0, 9, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9,
9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -5660,16 +6175,16 @@ static unsigned char changes_3_2_0_data[] = {
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0,
9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -5685,7 +6200,7 @@ static unsigned char changes_3_2_0_data[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0,
@@ -5696,84 +6211,88 @@ static unsigned char changes_3_2_0_data[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9,
- 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0,
0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0,
+ 0, 0, 0, 0, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 20, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 9, 0, 0, 0, 0, 0, 0,
9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9,
+ 0, 0, 0, 9, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9,
9, 9, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 21, 21, 21, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 21, 21, 21, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9,
- 0, 0, 0, 0, 0, 9, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 0, 0, 0, 0, 9,
- 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0,
- 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9,
0, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9,
- 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 9, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0,
+ 9, 9, 9, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 9, 9, 0, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 0, 0, 0,
- 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 22, 23,
- 24, 25, 26, 27, 28, 29, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9,
+ 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 0, 0,
+ 0, 0, 0, 0, 0, 0, 22, 23, 24, 25, 26, 27, 28, 29, 30, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ 31, 31, 31, 31, 31, 31, 31, 9, 0, 0, 9, 9, 9, 9, 9, 9, 0, 0, 9, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -5781,66 +6300,69 @@ static unsigned char changes_3_2_0_data[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 21, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 21, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 32, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0,
+ 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9,
+ 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 0, 0, 0, 0, 9, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 9, 0, 0, 0, 9, 9, 9, 9, 9,
+ 9, 9, 0, 0, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 9, 9, 9, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0,
+ 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0,
+ 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9,
- 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0,
+ 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 0, 0,
+ 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
@@ -5850,125 +6372,129 @@ static unsigned char changes_3_2_0_data[] = {
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 9, 0, 9, 9, 9,
- 9, 0, 0, 0, 0, 0, 0, 35, 4, 0, 0, 36, 37, 38, 39, 40, 41, 1, 1, 0, 0, 0,
- 4, 35, 8, 6, 7, 36, 37, 38, 39, 40, 41, 1, 1, 0, 0, 0, 0, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9,
+ 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0,
+ 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 0, 9, 9, 9, 9,
+ 9, 9, 9, 0, 0, 0, 0, 0, 9, 0, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 36, 4, 0, 0,
+ 37, 38, 39, 40, 41, 42, 1, 1, 0, 0, 0, 4, 36, 8, 6, 7, 37, 38, 39, 40,
+ 41, 42, 1, 1, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 0, 0,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 9,
- 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 43, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 44, 44, 44,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 45, 45, 45, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 45, 46, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 47, 11, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
- 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
- 47, 47, 47, 47, 47, 47, 47, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 9, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 9, 0, 9, 0, 0, 0, 0, 9, 9, 9, 0, 9, 0, 0, 0, 0, 0, 0,
- 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 9, 0, 0, 0, 0,
+ 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 9, 0, 0, 0,
+ 0, 9, 9, 9, 0, 9, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9,
- 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 34, 34, 34, 34,
- 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
- 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
- 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
- 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
- 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
- 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
- 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 9, 9, 9, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9,
+ 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9, 0, 0, 0, 0, 0, 9, 0, 0, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9,
- 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9,
- 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9,
- 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 0, 9, 0, 0, 0, 0, 0, 9, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 0,
+ 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 0,
+ 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 0,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -5976,83 +6502,83 @@ static unsigned char changes_3_2_0_data[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 9, 9, 9, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 9, 9, 9, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -6061,35 +6587,36 @@ static unsigned char changes_3_2_0_data[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0,
+ 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -6097,303 +6624,426 @@ static unsigned char changes_3_2_0_data[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0,
- 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 9,
- 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9,
- 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 0, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 9, 9, 9, 9, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 0,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 19,
- 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 19,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0,
+ 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 19, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 9, 9, 9, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 47, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 21, 21, 21, 21, 21, 21, 0, 0, 0, 1, 1, 21, 21, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 21, 21, 21, 21, 21, 0, 0, 0, 1, 1, 21, 21,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 14, 14, 14, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 0, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 14, 14, 0, 0, 0, 0, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 0, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 0, 0, 0, 0, 0, 9, 9, 9, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 9, 9, 9, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0,
+ 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0,
+ 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 53, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 0, 0, 9,
- 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9,
- 0, 0, 0, 9, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 0, 0, 9, 0, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 0, 0, 0, 9,
+ 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 0, 0, 0, 0, 0, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 9, 9, 0,
+ 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 0, 9, 9, 0, 0,
- 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 9,
- 9, 9, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0,
+ 9, 9, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 0, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0,
+ 0, 0, 0, 9, 9, 9, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 9, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9,
+ 9, 9, 0, 9, 0, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0,
+ 0, 0, 0, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 0, 0, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 9, 9, 9, 9, 0, 9, 9, 0, 9, 9, 9, 9, 9, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 0, 0, 9, 9, 0, 0, 9, 9, 9, 0, 0, 9, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0,
+ 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 9, 9, 9, 9, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0,
+ 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9,
+ 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -6401,127 +7051,148 @@ static unsigned char changes_3_2_0_data[] = {
0, 0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0,
- 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 0, 9, 0, 0, 9, 0,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 0, 9, 0, 9, 0, 0, 0, 0, 0,
- 0, 9, 0, 0, 0, 0, 9, 0, 9, 0, 9, 0, 9, 9, 9, 0, 9, 9, 0, 9, 0, 0, 9, 0,
- 9, 0, 9, 0, 9, 0, 9, 0, 9, 9, 0, 9, 0, 0, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9,
- 9, 9, 0, 9, 9, 9, 9, 0, 9, 9, 9, 9, 0, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0,
- 9, 9, 9, 0, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 0, 9, 9, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 0,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 0, 9, 9, 0, 9, 0, 0, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9,
+ 9, 9, 9, 0, 9, 0, 9, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 9, 0, 9, 0, 9, 0,
+ 9, 9, 9, 0, 9, 9, 0, 9, 0, 0, 9, 0, 9, 0, 9, 0, 9, 0, 9, 0, 9, 9, 0, 9,
+ 0, 0, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 0, 9, 9, 9, 9,
+ 0, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 9, 9, 9, 0, 9, 9, 9, 9, 9, 0, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0,
+ 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0,
+ 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 0, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9,
- 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9,
- 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 9, 9, 9, 9, 0, 0, 0, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 9, 9, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0,
+ 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -6530,24 +7201,29 @@ static unsigned char changes_3_2_0_data[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
+ 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
+ 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
static const change_record* get_change_3_2_0(Py_UCS4 n)
diff --git a/Modules/unicodename_db.h b/Modules/unicodename_db.h
index 7ccb1261f5..d0f9cb4dbc 100644
--- a/Modules/unicodename_db.h
+++ b/Modules/unicodename_db.h
@@ -4,249 +4,265 @@
/* lexicon */
static unsigned char lexicon[] = {
- 76, 69, 84, 84, 69, 210, 87, 73, 84, 200, 83, 89, 76, 76, 65, 66, 76,
- 197, 83, 77, 65, 76, 204, 83, 73, 71, 206, 67, 65, 80, 73, 84, 65, 204,
- 76, 65, 84, 73, 206, 89, 201, 65, 82, 65, 66, 73, 195, 67, 74, 203, 77,
- 65, 84, 72, 69, 77, 65, 84, 73, 67, 65, 204, 69, 71, 89, 80, 84, 73, 65,
- 206, 72, 73, 69, 82, 79, 71, 76, 89, 80, 200, 67, 79, 77, 80, 65, 84, 73,
- 66, 73, 76, 73, 84, 217, 67, 85, 78, 69, 73, 70, 79, 82, 205, 83, 89, 77,
- 66, 79, 204, 70, 79, 82, 77, 128, 67, 65, 78, 65, 68, 73, 65, 206, 83,
- 89, 76, 76, 65, 66, 73, 67, 211, 66, 65, 77, 85, 205, 68, 73, 71, 73,
- 212, 65, 78, 196, 66, 79, 76, 196, 72, 65, 78, 71, 85, 204, 86, 79, 87,
- 69, 204, 71, 82, 69, 69, 203, 76, 73, 71, 65, 84, 85, 82, 197, 77, 85,
- 83, 73, 67, 65, 204, 69, 84, 72, 73, 79, 80, 73, 195, 84, 73, 77, 69,
- 211, 70, 79, 210, 73, 84, 65, 76, 73, 195, 67, 89, 82, 73, 76, 76, 73,
- 195, 82, 65, 68, 73, 67, 65, 204, 83, 65, 78, 83, 45, 83, 69, 82, 73,
- 198, 84, 65, 77, 73, 204, 67, 73, 82, 67, 76, 69, 196, 67, 79, 77, 66,
- 73, 78, 73, 78, 199, 84, 65, 201, 70, 73, 78, 65, 204, 86, 65, 201, 83,
- 81, 85, 65, 82, 197, 76, 69, 70, 212, 82, 73, 71, 72, 212, 86, 65, 82,
- 73, 65, 84, 73, 79, 206, 66, 82, 65, 73, 76, 76, 197, 80, 65, 84, 84, 69,
- 82, 206, 65, 66, 79, 86, 69, 128, 66, 89, 90, 65, 78, 84, 73, 78, 197,
- 83, 73, 71, 78, 128, 66, 69, 76, 79, 87, 128, 68, 79, 85, 66, 76, 197,
- 73, 83, 79, 76, 65, 84, 69, 196, 78, 85, 77, 66, 69, 210, 75, 65, 84, 65,
- 75, 65, 78, 193, 194, 77, 79, 68, 73, 70, 73, 69, 210, 68, 79, 212, 75,
- 65, 78, 71, 88, 201, 65, 128, 76, 73, 78, 69, 65, 210, 84, 73, 66, 69,
- 84, 65, 206, 79, 198, 73, 78, 73, 84, 73, 65, 204, 77, 69, 69, 205, 86,
- 69, 82, 84, 73, 67, 65, 204, 77, 89, 65, 78, 77, 65, 210, 85, 128, 75,
- 72, 77, 69, 210, 87, 72, 73, 84, 197, 65, 66, 79, 86, 197, 67, 65, 82,
- 82, 73, 69, 210, 73, 128, 65, 82, 82, 79, 87, 128, 89, 69, 200, 79, 128,
- 77, 65, 82, 75, 128, 65, 82, 82, 79, 215, 67, 79, 80, 84, 73, 195, 80,
- 72, 65, 83, 69, 45, 197, 77, 79, 78, 71, 79, 76, 73, 65, 206, 68, 69, 86,
- 65, 78, 65, 71, 65, 82, 201, 66, 76, 65, 67, 203, 84, 73, 76, 197, 83,
- 89, 77, 66, 79, 76, 128, 80, 65, 82, 69, 78, 84, 72, 69, 83, 73, 90, 69,
- 196, 84, 72, 65, 205, 74, 79, 78, 71, 83, 69, 79, 78, 199, 83, 84, 82,
- 79, 75, 69, 128, 83, 81, 85, 65, 82, 69, 196, 66, 79, 216, 72, 69, 66,
- 82, 69, 215, 77, 73, 65, 207, 80, 76, 85, 211, 82, 73, 71, 72, 84, 87,
- 65, 82, 68, 211, 71, 69, 79, 82, 71, 73, 65, 206, 68, 82, 65, 87, 73, 78,
- 71, 211, 67, 72, 79, 83, 69, 79, 78, 199, 72, 65, 76, 70, 87, 73, 68, 84,
- 200, 66, 65, 76, 73, 78, 69, 83, 197, 72, 79, 79, 75, 128, 213, 84, 87,
- 79, 128, 73, 68, 69, 79, 71, 82, 65, 205, 80, 72, 65, 83, 69, 45, 196,
- 65, 76, 67, 72, 69, 77, 73, 67, 65, 204, 65, 76, 69, 198, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 73, 195, 79, 78, 69, 128, 84, 79, 128, 84, 87, 207,
- 72, 69, 65, 86, 217, 79, 86, 69, 210, 67, 79, 78, 83, 79, 78, 65, 78,
- 212, 66, 82, 65, 72, 77, 201, 83, 67, 82, 73, 80, 212, 85, 208, 76, 79,
- 215, 72, 65, 200, 79, 78, 197, 68, 79, 87, 206, 72, 73, 71, 200, 70, 85,
- 76, 76, 87, 73, 68, 84, 200, 66, 82, 65, 67, 75, 69, 84, 128, 69, 81, 85,
- 65, 204, 84, 65, 199, 66, 65, 82, 128, 68, 79, 77, 73, 78, 207, 78, 85,
- 77, 69, 82, 73, 195, 70, 82, 65, 75, 84, 85, 210, 84, 72, 82, 69, 197,
- 67, 72, 65, 82, 65, 67, 84, 69, 210, 77, 65, 76, 65, 89, 65, 76, 65, 205,
- 80, 72, 65, 83, 69, 45, 195, 84, 79, 78, 197, 68, 79, 85, 66, 76, 69, 45,
- 83, 84, 82, 85, 67, 203, 76, 69, 70, 84, 87, 65, 82, 68, 211, 72, 73, 82,
- 65, 71, 65, 78, 193, 65, 67, 85, 84, 69, 128, 74, 85, 78, 71, 83, 69, 79,
- 78, 199, 71, 76, 65, 71, 79, 76, 73, 84, 73, 195, 66, 69, 78, 71, 65, 76,
- 201, 77, 69, 68, 73, 65, 204, 84, 69, 76, 85, 71, 213, 86, 79, 67, 65,
- 76, 73, 195, 65, 82, 77, 69, 78, 73, 65, 206, 74, 69, 69, 205, 78, 69,
- 71, 65, 84, 73, 86, 197, 73, 68, 69, 79, 71, 82, 65, 80, 200, 74, 65, 86,
- 65, 78, 69, 83, 197, 79, 82, 73, 89, 193, 84, 72, 82, 69, 69, 128, 87,
- 69, 83, 84, 45, 67, 82, 69, 197, 70, 79, 85, 82, 128, 72, 65, 128, 72,
- 65, 76, 198, 77, 65, 82, 203, 75, 65, 78, 78, 65, 68, 193, 78, 69, 215,
- 80, 72, 65, 83, 69, 45, 193, 84, 72, 65, 201, 67, 72, 69, 82, 79, 75, 69,
- 197, 68, 79, 84, 211, 71, 85, 74, 65, 82, 65, 84, 201, 67, 72, 65, 205,
- 76, 85, 197, 83, 72, 65, 82, 65, 68, 193, 83, 73, 78, 72, 65, 76, 193,
- 75, 65, 128, 82, 85, 78, 73, 195, 83, 65, 85, 82, 65, 83, 72, 84, 82,
- 193, 84, 69, 84, 82, 65, 71, 82, 65, 205, 68, 69, 83, 69, 82, 69, 212,
- 72, 65, 77, 90, 193, 83, 89, 82, 73, 65, 195, 84, 73, 76, 68, 69, 128,
- 71, 85, 82, 77, 85, 75, 72, 201, 77, 65, 128, 77, 65, 89, 69, 203, 77,
- 69, 69, 84, 69, 201, 78, 79, 84, 65, 84, 73, 79, 206, 70, 73, 86, 69,
- 128, 80, 65, 128, 89, 65, 128, 76, 73, 71, 72, 212, 83, 73, 88, 128, 69,
- 73, 71, 72, 84, 128, 76, 69, 80, 67, 72, 193, 78, 65, 128, 83, 69, 86,
- 69, 78, 128, 76, 79, 78, 199, 78, 73, 78, 69, 128, 84, 85, 82, 75, 73,
- 195, 72, 79, 82, 73, 90, 79, 78, 84, 65, 204, 79, 80, 69, 206, 82, 65,
- 128, 83, 65, 128, 83, 85, 78, 68, 65, 78, 69, 83, 197, 86, 73, 69, 212,
- 76, 65, 207, 90, 90, 89, 88, 128, 90, 90, 89, 84, 128, 90, 90, 89, 82,
- 88, 128, 90, 90, 89, 82, 128, 90, 90, 89, 80, 128, 90, 90, 89, 65, 128,
- 90, 90, 89, 128, 90, 90, 85, 88, 128, 90, 90, 85, 82, 88, 128, 90, 90,
- 85, 82, 128, 90, 90, 85, 80, 128, 90, 90, 85, 128, 90, 90, 83, 89, 65,
- 128, 90, 90, 83, 65, 128, 90, 90, 79, 88, 128, 90, 90, 79, 80, 128, 90,
- 90, 79, 128, 90, 90, 73, 88, 128, 90, 90, 73, 84, 128, 90, 90, 73, 80,
- 128, 90, 90, 73, 69, 88, 128, 90, 90, 73, 69, 84, 128, 90, 90, 73, 69,
- 80, 128, 90, 90, 73, 69, 128, 90, 90, 73, 128, 90, 90, 69, 88, 128, 90,
- 90, 69, 80, 128, 90, 90, 69, 69, 128, 90, 90, 69, 128, 90, 90, 65, 88,
- 128, 90, 90, 65, 84, 128, 90, 90, 65, 80, 128, 90, 90, 65, 65, 128, 90,
- 90, 65, 128, 90, 89, 71, 79, 83, 128, 90, 87, 83, 80, 128, 90, 87, 78,
- 74, 128, 90, 87, 78, 66, 83, 80, 128, 90, 87, 74, 128, 90, 87, 65, 82,
+ 76, 69, 84, 84, 69, 210, 83, 73, 71, 206, 87, 73, 84, 200, 83, 89, 76,
+ 76, 65, 66, 76, 197, 83, 77, 65, 76, 204, 67, 65, 80, 73, 84, 65, 204,
+ 72, 73, 69, 82, 79, 71, 76, 89, 80, 200, 76, 65, 84, 73, 206, 67, 85, 78,
+ 69, 73, 70, 79, 82, 205, 65, 82, 65, 66, 73, 195, 89, 201, 67, 74, 203,
+ 77, 65, 84, 72, 69, 77, 65, 84, 73, 67, 65, 204, 69, 71, 89, 80, 84, 73,
+ 65, 206, 67, 79, 77, 80, 65, 84, 73, 66, 73, 76, 73, 84, 217, 83, 89, 77,
+ 66, 79, 204, 68, 73, 71, 73, 212, 70, 79, 82, 77, 128, 67, 65, 78, 65,
+ 68, 73, 65, 206, 83, 89, 76, 76, 65, 66, 73, 67, 211, 83, 73, 71, 78, 87,
+ 82, 73, 84, 73, 78, 199, 86, 79, 87, 69, 204, 84, 73, 77, 69, 211, 66,
+ 65, 77, 85, 205, 65, 78, 196, 66, 79, 76, 196, 65, 78, 65, 84, 79, 76,
+ 73, 65, 206, 72, 65, 78, 71, 85, 204, 76, 73, 78, 69, 65, 210, 71, 82,
+ 69, 69, 203, 77, 85, 83, 73, 67, 65, 204, 76, 73, 71, 65, 84, 85, 82,
+ 197, 69, 84, 72, 73, 79, 80, 73, 195, 193, 70, 79, 210, 67, 89, 82, 73,
+ 76, 76, 73, 195, 73, 84, 65, 76, 73, 195, 67, 79, 77, 66, 73, 78, 73, 78,
+ 199, 82, 65, 68, 73, 67, 65, 204, 83, 65, 78, 83, 45, 83, 69, 82, 73,
+ 198, 78, 85, 77, 66, 69, 210, 67, 73, 82, 67, 76, 69, 196, 84, 65, 77,
+ 73, 204, 84, 65, 201, 70, 73, 78, 65, 204, 65, 82, 82, 79, 87, 128, 86,
+ 65, 201, 76, 69, 70, 212, 82, 73, 71, 72, 212, 83, 81, 85, 65, 82, 197,
+ 68, 79, 85, 66, 76, 197, 65, 82, 82, 79, 215, 83, 73, 71, 78, 128, 65,
+ 66, 79, 86, 69, 128, 66, 69, 76, 79, 87, 128, 86, 65, 82, 73, 65, 84, 73,
+ 79, 206, 66, 82, 65, 73, 76, 76, 197, 80, 65, 84, 84, 69, 82, 206, 66,
+ 89, 90, 65, 78, 84, 73, 78, 197, 87, 72, 73, 84, 197, 66, 76, 65, 67,
+ 203, 65, 128, 73, 83, 79, 76, 65, 84, 69, 196, 77, 79, 68, 73, 70, 73,
+ 69, 210, 194, 75, 65, 84, 65, 75, 65, 78, 193, 85, 128, 77, 89, 65, 78,
+ 77, 65, 210, 68, 79, 212, 75, 65, 78, 71, 88, 201, 75, 73, 75, 65, 75,
+ 85, 201, 77, 69, 78, 68, 197, 73, 128, 79, 198, 84, 73, 66, 69, 84, 65,
+ 206, 79, 128, 72, 69, 65, 86, 217, 86, 69, 82, 84, 73, 67, 65, 204, 73,
+ 78, 73, 84, 73, 65, 204, 77, 65, 82, 75, 128, 77, 69, 69, 205, 67, 79,
+ 80, 84, 73, 195, 75, 72, 77, 69, 210, 82, 73, 71, 72, 84, 87, 65, 82, 68,
+ 211, 65, 66, 79, 86, 197, 67, 65, 82, 82, 73, 69, 210, 89, 69, 200, 67,
+ 72, 69, 82, 79, 75, 69, 197, 80, 76, 85, 211, 68, 69, 86, 65, 78, 65, 71,
+ 65, 82, 201, 80, 72, 65, 83, 69, 45, 197, 77, 79, 78, 71, 79, 76, 73, 65,
+ 206, 83, 84, 82, 79, 75, 69, 128, 76, 69, 70, 84, 87, 65, 82, 68, 211,
+ 83, 89, 77, 66, 79, 76, 128, 66, 79, 216, 84, 73, 76, 197, 68, 85, 80,
+ 76, 79, 89, 65, 206, 77, 73, 68, 68, 76, 197, 80, 65, 82, 69, 78, 84, 72,
+ 69, 83, 73, 90, 69, 196, 83, 81, 85, 65, 82, 69, 196, 84, 72, 65, 205,
+ 79, 78, 69, 128, 213, 74, 79, 78, 71, 83, 69, 79, 78, 199, 84, 87, 79,
+ 128, 67, 79, 78, 83, 79, 78, 65, 78, 212, 72, 69, 66, 82, 69, 215, 77,
+ 73, 65, 207, 85, 208, 72, 79, 79, 75, 128, 71, 69, 79, 82, 71, 73, 65,
+ 206, 79, 86, 69, 210, 68, 82, 65, 87, 73, 78, 71, 211, 72, 77, 79, 78,
+ 199, 79, 78, 197, 80, 65, 72, 65, 87, 200, 84, 87, 207, 68, 79, 87, 206,
+ 73, 78, 68, 69, 216, 67, 72, 79, 83, 69, 79, 78, 199, 76, 79, 215, 86,
+ 79, 67, 65, 76, 73, 195, 84, 72, 82, 69, 197, 72, 65, 76, 70, 87, 73, 68,
+ 84, 200, 72, 65, 78, 68, 45, 70, 73, 83, 212, 77, 69, 82, 79, 73, 84, 73,
+ 195, 66, 65, 76, 73, 78, 69, 83, 197, 77, 65, 82, 203, 83, 67, 82, 73,
+ 80, 212, 73, 68, 69, 79, 71, 82, 65, 205, 80, 72, 65, 83, 69, 45, 196,
+ 84, 79, 128, 65, 76, 67, 72, 69, 77, 73, 67, 65, 204, 65, 76, 69, 198,
+ 72, 73, 71, 200, 73, 68, 69, 79, 71, 82, 65, 80, 72, 73, 195, 83, 73, 78,
+ 72, 65, 76, 193, 78, 85, 77, 69, 82, 73, 195, 66, 65, 82, 128, 84, 79,
+ 78, 197, 66, 82, 65, 72, 77, 201, 72, 85, 78, 71, 65, 82, 73, 65, 206,
+ 84, 72, 82, 69, 69, 128, 84, 72, 85, 77, 194, 70, 79, 85, 82, 128, 66,
+ 65, 82, 194, 72, 65, 200, 72, 65, 128, 78, 79, 82, 84, 200, 70, 85, 76,
+ 76, 87, 73, 68, 84, 200, 66, 82, 65, 67, 75, 69, 84, 128, 69, 81, 85, 65,
+ 204, 76, 73, 71, 72, 212, 84, 65, 199, 68, 79, 77, 73, 78, 207, 72, 65,
+ 76, 198, 76, 79, 78, 199, 77, 65, 76, 65, 89, 65, 76, 65, 205, 65, 67,
+ 85, 84, 69, 128, 70, 82, 65, 75, 84, 85, 210, 67, 72, 65, 82, 65, 67, 84,
+ 69, 210, 80, 72, 65, 83, 69, 45, 195, 68, 79, 85, 66, 76, 69, 45, 83, 84,
+ 82, 85, 67, 203, 70, 73, 86, 69, 128, 79, 80, 69, 206, 72, 73, 82, 65,
+ 71, 65, 78, 193, 75, 65, 128, 77, 69, 68, 73, 65, 204, 84, 69, 76, 85,
+ 71, 213, 74, 85, 78, 71, 83, 69, 79, 78, 199, 85, 80, 87, 65, 82, 68,
+ 211, 65, 82, 77, 69, 78, 73, 65, 206, 66, 69, 78, 71, 65, 76, 201, 71,
+ 76, 65, 71, 79, 76, 73, 84, 73, 195, 83, 72, 65, 82, 65, 68, 193, 78, 69,
+ 71, 65, 84, 73, 86, 197, 68, 79, 87, 78, 87, 65, 82, 68, 211, 74, 69, 69,
+ 205, 80, 65, 128, 83, 73, 68, 68, 72, 65, 205, 68, 79, 84, 211, 73, 68,
+ 69, 79, 71, 82, 65, 80, 200, 74, 65, 86, 65, 78, 69, 83, 197, 67, 85, 82,
+ 83, 73, 86, 197, 77, 65, 128, 79, 82, 73, 89, 193, 83, 128, 83, 73, 88,
+ 128, 87, 69, 83, 84, 45, 67, 82, 69, 197, 82, 85, 78, 73, 195, 89, 65,
+ 128, 69, 73, 71, 72, 84, 128, 75, 65, 78, 78, 65, 68, 193, 78, 65, 128,
+ 90, 90, 89, 88, 128, 90, 90, 89, 84, 128, 90, 90, 89, 82, 88, 128, 90,
+ 90, 89, 82, 128, 90, 90, 89, 80, 128, 90, 90, 89, 65, 128, 90, 90, 89,
+ 128, 90, 90, 85, 88, 128, 90, 90, 85, 82, 88, 128, 90, 90, 85, 82, 128,
+ 90, 90, 85, 80, 128, 90, 90, 85, 128, 90, 90, 83, 89, 65, 128, 90, 90,
+ 83, 65, 128, 90, 90, 79, 88, 128, 90, 90, 79, 80, 128, 90, 90, 79, 128,
+ 90, 90, 73, 88, 128, 90, 90, 73, 84, 128, 90, 90, 73, 80, 128, 90, 90,
+ 73, 69, 88, 128, 90, 90, 73, 69, 84, 128, 90, 90, 73, 69, 80, 128, 90,
+ 90, 73, 69, 128, 90, 90, 73, 128, 90, 90, 69, 88, 128, 90, 90, 69, 80,
+ 128, 90, 90, 69, 69, 128, 90, 90, 69, 128, 90, 90, 65, 88, 128, 90, 90,
+ 65, 84, 128, 90, 90, 65, 80, 128, 90, 90, 65, 65, 128, 90, 90, 65, 128,
+ 90, 89, 71, 79, 83, 128, 90, 87, 83, 80, 128, 90, 87, 78, 74, 128, 90,
+ 87, 78, 66, 83, 80, 128, 90, 87, 74, 128, 90, 87, 202, 90, 87, 65, 82,
65, 75, 65, 89, 128, 90, 87, 65, 128, 90, 85, 84, 128, 90, 85, 79, 88,
128, 90, 85, 79, 80, 128, 90, 85, 79, 128, 90, 85, 77, 128, 90, 85, 66,
- 85, 82, 128, 90, 85, 53, 128, 90, 85, 181, 90, 83, 72, 65, 128, 90, 82,
- 65, 128, 90, 81, 65, 80, 72, 193, 90, 79, 84, 128, 90, 79, 79, 128, 90,
- 79, 65, 128, 90, 76, 65, 77, 193, 90, 76, 65, 128, 90, 76, 193, 90, 74,
- 69, 128, 90, 73, 90, 50, 128, 90, 73, 81, 65, 65, 128, 90, 73, 78, 79,
- 82, 128, 90, 73, 76, 68, 69, 128, 90, 73, 71, 90, 65, 199, 90, 73, 71,
- 128, 90, 73, 68, 193, 90, 73, 66, 128, 90, 73, 194, 90, 73, 51, 128, 90,
- 201, 90, 72, 89, 88, 128, 90, 72, 89, 84, 128, 90, 72, 89, 82, 88, 128,
- 90, 72, 89, 82, 128, 90, 72, 89, 80, 128, 90, 72, 89, 128, 90, 72, 87,
- 69, 128, 90, 72, 87, 65, 128, 90, 72, 85, 88, 128, 90, 72, 85, 84, 128,
- 90, 72, 85, 82, 88, 128, 90, 72, 85, 82, 128, 90, 72, 85, 80, 128, 90,
- 72, 85, 79, 88, 128, 90, 72, 85, 79, 80, 128, 90, 72, 85, 79, 128, 90,
- 72, 85, 128, 90, 72, 79, 88, 128, 90, 72, 79, 84, 128, 90, 72, 79, 80,
- 128, 90, 72, 79, 79, 128, 90, 72, 79, 128, 90, 72, 73, 86, 69, 84, 69,
- 128, 90, 72, 73, 128, 90, 72, 69, 88, 128, 90, 72, 69, 84, 128, 90, 72,
- 69, 80, 128, 90, 72, 69, 69, 128, 90, 72, 69, 128, 90, 72, 197, 90, 72,
- 65, 88, 128, 90, 72, 65, 84, 128, 90, 72, 65, 82, 128, 90, 72, 65, 80,
- 128, 90, 72, 65, 73, 78, 128, 90, 72, 65, 65, 128, 90, 72, 65, 128, 90,
- 72, 128, 90, 69, 84, 65, 128, 90, 69, 82, 79, 128, 90, 69, 82, 207, 90,
- 69, 78, 128, 90, 69, 77, 76, 89, 65, 128, 90, 69, 77, 76, 74, 65, 128,
- 90, 69, 50, 128, 90, 197, 90, 65, 89, 78, 128, 90, 65, 89, 73, 78, 128,
- 90, 65, 89, 73, 206, 90, 65, 86, 73, 89, 65, 78, 73, 128, 90, 65, 84, 65,
- 128, 90, 65, 82, 81, 65, 128, 90, 65, 81, 69, 198, 90, 65, 77, 88, 128,
- 90, 65, 204, 90, 65, 73, 78, 128, 90, 65, 73, 206, 90, 65, 73, 128, 90,
- 65, 72, 128, 90, 65, 200, 90, 65, 71, 128, 90, 65, 69, 70, 128, 90, 48,
- 49, 54, 72, 128, 90, 48, 49, 54, 71, 128, 90, 48, 49, 54, 70, 128, 90,
- 48, 49, 54, 69, 128, 90, 48, 49, 54, 68, 128, 90, 48, 49, 54, 67, 128,
- 90, 48, 49, 54, 66, 128, 90, 48, 49, 54, 65, 128, 90, 48, 49, 54, 128,
- 90, 48, 49, 53, 73, 128, 90, 48, 49, 53, 72, 128, 90, 48, 49, 53, 71,
- 128, 90, 48, 49, 53, 70, 128, 90, 48, 49, 53, 69, 128, 90, 48, 49, 53,
- 68, 128, 90, 48, 49, 53, 67, 128, 90, 48, 49, 53, 66, 128, 90, 48, 49,
- 53, 65, 128, 90, 48, 49, 53, 128, 90, 48, 49, 52, 128, 90, 48, 49, 51,
- 128, 90, 48, 49, 50, 128, 90, 48, 49, 49, 128, 90, 48, 49, 48, 128, 90,
- 48, 48, 57, 128, 90, 48, 48, 56, 128, 90, 48, 48, 55, 128, 90, 48, 48,
- 54, 128, 90, 48, 48, 53, 65, 128, 90, 48, 48, 53, 128, 90, 48, 48, 52,
- 65, 128, 90, 48, 48, 52, 128, 90, 48, 48, 51, 66, 128, 90, 48, 48, 51,
- 65, 128, 90, 48, 48, 51, 128, 90, 48, 48, 50, 68, 128, 90, 48, 48, 50,
- 67, 128, 90, 48, 48, 50, 66, 128, 90, 48, 48, 50, 65, 128, 90, 48, 48,
- 50, 128, 90, 48, 48, 49, 128, 90, 128, 218, 89, 89, 88, 128, 89, 89, 84,
- 128, 89, 89, 82, 88, 128, 89, 89, 82, 128, 89, 89, 80, 128, 89, 89, 69,
- 128, 89, 89, 65, 65, 128, 89, 89, 65, 128, 89, 89, 128, 89, 87, 79, 79,
- 128, 89, 87, 79, 128, 89, 87, 73, 73, 128, 89, 87, 73, 128, 89, 87, 69,
- 128, 89, 87, 65, 65, 128, 89, 87, 65, 128, 89, 86, 128, 89, 85, 88, 128,
- 89, 85, 87, 79, 81, 128, 89, 85, 85, 75, 65, 76, 69, 65, 80, 73, 78, 84,
- 85, 128, 89, 85, 85, 128, 89, 85, 84, 128, 89, 85, 83, 128, 89, 85, 211,
- 89, 85, 82, 88, 128, 89, 85, 82, 128, 89, 85, 81, 128, 89, 85, 209, 89,
- 85, 80, 128, 89, 85, 79, 88, 128, 89, 85, 79, 84, 128, 89, 85, 79, 80,
- 128, 89, 85, 79, 77, 128, 89, 85, 79, 128, 89, 85, 78, 128, 89, 85, 77,
- 128, 89, 85, 69, 81, 128, 89, 85, 69, 128, 89, 85, 68, 72, 128, 89, 85,
- 68, 200, 89, 85, 65, 78, 128, 89, 85, 65, 69, 78, 128, 89, 85, 45, 89,
- 69, 79, 128, 89, 85, 45, 89, 69, 128, 89, 85, 45, 85, 128, 89, 85, 45,
- 79, 128, 89, 85, 45, 73, 128, 89, 85, 45, 69, 79, 128, 89, 85, 45, 69,
- 128, 89, 85, 45, 65, 69, 128, 89, 85, 45, 65, 128, 89, 85, 128, 89, 213,
- 89, 80, 83, 73, 76, 73, 128, 89, 80, 79, 82, 82, 79, 73, 128, 89, 80, 79,
- 75, 82, 73, 83, 73, 83, 128, 89, 80, 79, 75, 82, 73, 83, 73, 211, 89, 80,
- 79, 71, 69, 71, 82, 65, 77, 77, 69, 78, 73, 128, 89, 79, 89, 128, 89, 79,
- 88, 128, 89, 79, 85, 84, 72, 70, 85, 76, 78, 69, 83, 83, 128, 89, 79, 85,
- 84, 72, 70, 85, 204, 89, 79, 84, 128, 89, 79, 82, 73, 128, 89, 79, 81,
- 128, 89, 79, 209, 89, 79, 80, 128, 89, 79, 79, 128, 89, 79, 77, 79, 128,
- 89, 79, 71, 72, 128, 89, 79, 68, 72, 128, 89, 79, 68, 128, 89, 79, 196,
- 89, 79, 65, 128, 89, 79, 45, 89, 69, 79, 128, 89, 79, 45, 89, 65, 69,
- 128, 89, 79, 45, 89, 65, 128, 89, 79, 45, 79, 128, 89, 79, 45, 73, 128,
- 89, 79, 45, 69, 79, 128, 89, 79, 45, 65, 69, 128, 89, 79, 45, 65, 128,
- 89, 79, 128, 89, 207, 89, 73, 90, 69, 84, 128, 89, 73, 88, 128, 89, 73,
- 87, 78, 128, 89, 73, 84, 128, 89, 73, 80, 128, 89, 73, 78, 71, 128, 89,
- 73, 73, 128, 89, 73, 199, 89, 73, 69, 88, 128, 89, 73, 69, 84, 128, 89,
- 73, 69, 80, 128, 89, 73, 69, 69, 128, 89, 73, 69, 128, 89, 73, 68, 68,
- 73, 83, 200, 89, 73, 45, 85, 128, 89, 73, 128, 89, 70, 69, 83, 73, 83,
- 128, 89, 70, 69, 83, 73, 211, 89, 70, 69, 206, 89, 69, 89, 128, 89, 69,
- 87, 128, 89, 69, 85, 88, 128, 89, 69, 85, 82, 65, 69, 128, 89, 69, 85,
- 81, 128, 89, 69, 85, 77, 128, 89, 69, 85, 65, 69, 84, 128, 89, 69, 85,
- 65, 69, 128, 89, 69, 84, 73, 86, 128, 89, 69, 83, 84, 85, 128, 89, 69,
- 83, 73, 69, 85, 78, 71, 45, 83, 73, 79, 83, 128, 89, 69, 83, 73, 69, 85,
- 78, 71, 45, 80, 65, 78, 83, 73, 79, 83, 128, 89, 69, 83, 73, 69, 85, 78,
- 71, 45, 77, 73, 69, 85, 77, 128, 89, 69, 83, 73, 69, 85, 78, 71, 45, 72,
- 73, 69, 85, 72, 128, 89, 69, 83, 73, 69, 85, 78, 71, 128, 89, 69, 82, 85,
- 128, 89, 69, 82, 213, 89, 69, 82, 73, 128, 89, 69, 82, 65, 200, 89, 69,
- 82, 128, 89, 69, 79, 82, 73, 78, 72, 73, 69, 85, 72, 128, 89, 69, 79, 45,
- 89, 65, 128, 89, 69, 79, 45, 85, 128, 89, 69, 79, 45, 79, 128, 89, 69,
- 78, 73, 83, 69, 201, 89, 69, 78, 65, 80, 128, 89, 69, 78, 128, 89, 69,
- 206, 89, 69, 76, 76, 79, 87, 128, 89, 69, 76, 76, 79, 215, 89, 69, 72,
- 128, 89, 69, 69, 128, 89, 69, 65, 210, 89, 69, 65, 128, 89, 65, 90, 90,
- 128, 89, 65, 90, 72, 128, 89, 65, 90, 128, 89, 65, 89, 65, 78, 78, 65,
- 128, 89, 65, 89, 128, 89, 65, 87, 128, 89, 65, 86, 128, 89, 65, 85, 128,
- 89, 65, 84, 84, 128, 89, 65, 84, 73, 128, 89, 65, 84, 72, 128, 89, 65,
- 84, 128, 89, 65, 83, 83, 128, 89, 65, 83, 72, 128, 89, 65, 83, 128, 89,
- 65, 82, 82, 128, 89, 65, 82, 128, 89, 65, 210, 89, 65, 81, 128, 89, 65,
- 80, 128, 89, 65, 78, 83, 65, 89, 65, 128, 89, 65, 78, 71, 128, 89, 65,
- 78, 199, 89, 65, 78, 128, 89, 65, 77, 79, 75, 128, 89, 65, 77, 65, 75,
- 75, 65, 78, 128, 89, 65, 77, 128, 89, 65, 76, 128, 89, 65, 75, 72, 72,
- 128, 89, 65, 75, 72, 128, 89, 65, 75, 65, 83, 72, 128, 89, 65, 75, 128,
- 89, 65, 74, 85, 82, 86, 69, 68, 73, 195, 89, 65, 74, 128, 89, 65, 73,
- 128, 89, 65, 72, 72, 128, 89, 65, 72, 128, 89, 65, 71, 78, 128, 89, 65,
- 71, 72, 72, 128, 89, 65, 71, 72, 128, 89, 65, 71, 128, 89, 65, 70, 213,
- 89, 65, 70, 128, 89, 65, 69, 77, 77, 65, 69, 128, 89, 65, 68, 72, 128,
- 89, 65, 68, 68, 72, 128, 89, 65, 68, 68, 128, 89, 65, 68, 128, 89, 65,
- 67, 72, 128, 89, 65, 66, 72, 128, 89, 65, 66, 128, 89, 65, 65, 82, 85,
- 128, 89, 65, 65, 73, 128, 89, 65, 65, 68, 79, 128, 89, 65, 45, 89, 79,
- 128, 89, 65, 45, 85, 128, 89, 65, 45, 79, 128, 89, 48, 48, 56, 128, 89,
- 48, 48, 55, 128, 89, 48, 48, 54, 128, 89, 48, 48, 53, 128, 89, 48, 48,
- 52, 128, 89, 48, 48, 51, 128, 89, 48, 48, 50, 128, 89, 48, 48, 49, 65,
- 128, 89, 48, 48, 49, 128, 89, 45, 67, 82, 69, 197, 88, 89, 88, 128, 88,
- 89, 85, 128, 88, 89, 84, 128, 88, 89, 82, 88, 128, 88, 89, 82, 128, 88,
- 89, 80, 128, 88, 89, 79, 128, 88, 89, 73, 128, 88, 89, 69, 69, 128, 88,
- 89, 69, 128, 88, 89, 65, 65, 128, 88, 89, 65, 128, 88, 89, 128, 88, 87,
- 73, 128, 88, 87, 69, 69, 128, 88, 87, 69, 128, 88, 87, 65, 65, 128, 88,
- 87, 65, 128, 88, 86, 69, 128, 88, 86, 65, 128, 88, 85, 79, 88, 128, 88,
- 85, 79, 128, 88, 85, 128, 88, 83, 72, 65, 65, 89, 65, 84, 72, 73, 89, 65,
- 128, 88, 79, 88, 128, 88, 79, 84, 128, 88, 79, 82, 128, 88, 79, 80, 128,
- 88, 79, 65, 128, 88, 79, 128, 88, 73, 88, 128, 88, 73, 84, 128, 88, 73,
- 82, 79, 206, 88, 73, 80, 128, 88, 73, 69, 88, 128, 88, 73, 69, 84, 128,
- 88, 73, 69, 80, 128, 88, 73, 69, 128, 88, 73, 128, 88, 71, 128, 88, 69,
- 83, 84, 69, 211, 88, 69, 72, 128, 88, 69, 69, 128, 88, 69, 128, 88, 65,
- 78, 128, 88, 65, 65, 128, 88, 65, 128, 88, 48, 48, 56, 65, 128, 88, 48,
- 48, 56, 128, 88, 48, 48, 55, 128, 88, 48, 48, 54, 65, 128, 88, 48, 48,
- 54, 128, 88, 48, 48, 53, 128, 88, 48, 48, 52, 66, 128, 88, 48, 48, 52,
- 65, 128, 88, 48, 48, 52, 128, 88, 48, 48, 51, 128, 88, 48, 48, 50, 128,
- 88, 48, 48, 49, 128, 87, 90, 128, 87, 89, 78, 78, 128, 87, 89, 78, 206,
- 87, 86, 128, 87, 85, 80, 128, 87, 85, 79, 88, 128, 87, 85, 79, 80, 128,
- 87, 85, 79, 128, 87, 85, 78, 74, 207, 87, 85, 78, 128, 87, 85, 76, 85,
- 128, 87, 85, 76, 213, 87, 85, 69, 128, 87, 85, 65, 69, 84, 128, 87, 85,
- 65, 69, 78, 128, 87, 85, 128, 87, 82, 217, 87, 82, 79, 78, 71, 128, 87,
- 82, 73, 84, 73, 78, 199, 87, 82, 69, 78, 67, 72, 128, 87, 82, 69, 65, 84,
- 200, 87, 82, 65, 80, 80, 69, 196, 87, 82, 65, 80, 128, 87, 79, 88, 128,
- 87, 79, 82, 82, 73, 69, 196, 87, 79, 82, 75, 69, 82, 128, 87, 79, 82, 75,
- 128, 87, 79, 82, 203, 87, 79, 82, 68, 83, 80, 65, 67, 69, 128, 87, 79,
- 82, 196, 87, 79, 80, 128, 87, 79, 79, 78, 128, 87, 79, 79, 76, 128, 87,
- 79, 79, 68, 83, 45, 67, 82, 69, 197, 87, 79, 79, 68, 128, 87, 79, 78,
- 128, 87, 79, 206, 87, 79, 77, 69, 78, 211, 87, 79, 77, 69, 206, 87, 79,
- 77, 65, 78, 211, 87, 79, 77, 65, 78, 128, 87, 79, 77, 65, 206, 87, 79,
- 76, 79, 83, 79, 128, 87, 79, 76, 198, 87, 79, 69, 128, 87, 79, 65, 128,
- 87, 73, 84, 72, 79, 85, 212, 87, 73, 84, 72, 73, 78, 128, 87, 73, 78, 84,
- 69, 82, 128, 87, 73, 78, 75, 73, 78, 199, 87, 73, 78, 74, 65, 128, 87,
- 73, 78, 71, 83, 128, 87, 73, 78, 69, 128, 87, 73, 78, 197, 87, 73, 78,
- 68, 85, 128, 87, 73, 78, 68, 128, 87, 73, 78, 196, 87, 73, 78, 128, 87,
- 73, 71, 78, 89, 65, 78, 128, 87, 73, 71, 71, 76, 217, 87, 73, 68, 69, 45,
- 72, 69, 65, 68, 69, 196, 87, 73, 68, 197, 87, 73, 65, 78, 71, 87, 65, 65,
- 75, 128, 87, 73, 65, 78, 71, 128, 87, 72, 79, 76, 197, 87, 72, 73, 84,
- 69, 45, 70, 69, 65, 84, 72, 69, 82, 69, 196, 87, 72, 73, 84, 69, 128, 87,
- 72, 69, 69, 76, 69, 196, 87, 72, 69, 69, 76, 67, 72, 65, 73, 210, 87, 72,
- 69, 69, 76, 128, 87, 72, 69, 69, 204, 87, 72, 69, 65, 84, 128, 87, 72,
- 65, 76, 69, 128, 87, 71, 128, 87, 69, 88, 128, 87, 69, 85, 88, 128, 87,
- 69, 83, 84, 69, 82, 206, 87, 69, 83, 84, 128, 87, 69, 83, 212, 87, 69,
- 80, 128, 87, 69, 79, 128, 87, 69, 78, 128, 87, 69, 76, 76, 128, 87, 69,
- 73, 71, 72, 212, 87, 69, 73, 69, 82, 83, 84, 82, 65, 83, 211, 87, 69, 69,
- 78, 128, 87, 69, 68, 71, 69, 45, 84, 65, 73, 76, 69, 196, 87, 69, 68, 68,
- 73, 78, 71, 128, 87, 69, 65, 82, 217, 87, 69, 65, 80, 79, 78, 128, 87,
- 67, 128, 87, 66, 128, 87, 65, 89, 128, 87, 65, 217, 87, 65, 88, 73, 78,
- 199, 87, 65, 88, 128, 87, 65, 87, 45, 65, 89, 73, 78, 45, 82, 69, 83, 72,
- 128, 87, 65, 87, 128, 87, 65, 215, 87, 65, 86, 217, 87, 65, 86, 73, 78,
- 199, 87, 65, 86, 69, 83, 128, 87, 65, 86, 69, 128, 87, 65, 86, 197, 87,
- 65, 85, 128, 87, 65, 84, 84, 79, 128, 87, 65, 84, 69, 82, 77, 69, 76, 79,
- 78, 128, 87, 65, 84, 69, 82, 128, 87, 65, 84, 69, 210, 87, 65, 84, 67,
- 72, 128, 87, 65, 84, 128, 87, 65, 83, 84, 73, 78, 71, 128, 87, 65, 83,
- 83, 65, 76, 76, 65, 77, 128, 87, 65, 83, 76, 65, 128, 87, 65, 83, 76,
- 193, 87, 65, 83, 65, 76, 76, 65, 77, 128, 87, 65, 83, 65, 76, 76, 65,
- 205, 87, 65, 82, 78, 73, 78, 199, 87, 65, 80, 128, 87, 65, 78, 73, 78,
- 199, 87, 65, 78, 71, 75, 85, 79, 81, 128, 87, 65, 78, 68, 69, 82, 69, 82,
- 128, 87, 65, 78, 128, 87, 65, 76, 76, 128, 87, 65, 76, 75, 128, 87, 65,
- 76, 203, 87, 65, 73, 84, 73, 78, 71, 128, 87, 65, 73, 128, 87, 65, 69,
- 78, 128, 87, 65, 69, 128, 87, 65, 65, 86, 85, 128, 87, 48, 50, 53, 128,
+ 85, 82, 128, 90, 85, 53, 128, 90, 85, 181, 90, 213, 90, 83, 72, 65, 128,
+ 90, 82, 65, 128, 90, 81, 65, 80, 72, 193, 90, 79, 84, 128, 90, 79, 79,
+ 128, 90, 79, 65, 128, 90, 76, 65, 77, 193, 90, 76, 65, 128, 90, 76, 193,
+ 90, 74, 69, 128, 90, 73, 90, 50, 128, 90, 73, 81, 65, 65, 128, 90, 73,
+ 80, 80, 69, 82, 45, 77, 79, 85, 84, 200, 90, 73, 78, 79, 82, 128, 90, 73,
+ 76, 68, 69, 128, 90, 73, 71, 90, 65, 199, 90, 73, 71, 128, 90, 73, 68,
+ 193, 90, 73, 66, 128, 90, 73, 194, 90, 73, 51, 128, 90, 201, 90, 72, 89,
+ 88, 128, 90, 72, 89, 84, 128, 90, 72, 89, 82, 88, 128, 90, 72, 89, 82,
+ 128, 90, 72, 89, 80, 128, 90, 72, 89, 128, 90, 72, 87, 69, 128, 90, 72,
+ 87, 65, 128, 90, 72, 85, 88, 128, 90, 72, 85, 84, 128, 90, 72, 85, 82,
+ 88, 128, 90, 72, 85, 82, 128, 90, 72, 85, 80, 128, 90, 72, 85, 79, 88,
+ 128, 90, 72, 85, 79, 80, 128, 90, 72, 85, 79, 128, 90, 72, 85, 128, 90,
+ 72, 79, 88, 128, 90, 72, 79, 84, 128, 90, 72, 79, 80, 128, 90, 72, 79,
+ 79, 128, 90, 72, 79, 73, 128, 90, 72, 79, 128, 90, 72, 73, 86, 69, 84,
+ 69, 128, 90, 72, 73, 76, 128, 90, 72, 73, 128, 90, 72, 69, 88, 128, 90,
+ 72, 69, 84, 128, 90, 72, 69, 80, 128, 90, 72, 69, 69, 128, 90, 72, 69,
+ 128, 90, 72, 197, 90, 72, 65, 89, 73, 78, 128, 90, 72, 65, 88, 128, 90,
+ 72, 65, 84, 128, 90, 72, 65, 82, 128, 90, 72, 65, 80, 128, 90, 72, 65,
+ 73, 78, 128, 90, 72, 65, 65, 128, 90, 72, 65, 128, 90, 72, 128, 90, 69,
+ 84, 65, 128, 90, 69, 82, 79, 128, 90, 69, 82, 207, 90, 69, 78, 128, 90,
+ 69, 77, 76, 89, 65, 128, 90, 69, 77, 76, 74, 65, 128, 90, 69, 50, 128,
+ 90, 197, 90, 65, 89, 78, 128, 90, 65, 89, 73, 78, 128, 90, 65, 89, 73,
+ 206, 90, 65, 86, 73, 89, 65, 78, 73, 128, 90, 65, 84, 65, 128, 90, 65,
+ 82, 81, 65, 128, 90, 65, 82, 76, 128, 90, 65, 81, 69, 198, 90, 65, 77,
+ 88, 128, 90, 65, 204, 90, 65, 73, 78, 128, 90, 65, 73, 206, 90, 65, 73,
+ 128, 90, 65, 72, 128, 90, 65, 200, 90, 65, 71, 128, 90, 65, 69, 70, 128,
+ 90, 65, 55, 128, 90, 193, 90, 48, 49, 54, 72, 128, 90, 48, 49, 54, 71,
+ 128, 90, 48, 49, 54, 70, 128, 90, 48, 49, 54, 69, 128, 90, 48, 49, 54,
+ 68, 128, 90, 48, 49, 54, 67, 128, 90, 48, 49, 54, 66, 128, 90, 48, 49,
+ 54, 65, 128, 90, 48, 49, 54, 128, 90, 48, 49, 53, 73, 128, 90, 48, 49,
+ 53, 72, 128, 90, 48, 49, 53, 71, 128, 90, 48, 49, 53, 70, 128, 90, 48,
+ 49, 53, 69, 128, 90, 48, 49, 53, 68, 128, 90, 48, 49, 53, 67, 128, 90,
+ 48, 49, 53, 66, 128, 90, 48, 49, 53, 65, 128, 90, 48, 49, 53, 128, 90,
+ 48, 49, 52, 128, 90, 48, 49, 51, 128, 90, 48, 49, 50, 128, 90, 48, 49,
+ 49, 128, 90, 48, 49, 48, 128, 90, 48, 48, 57, 128, 90, 48, 48, 56, 128,
+ 90, 48, 48, 55, 128, 90, 48, 48, 54, 128, 90, 48, 48, 53, 65, 128, 90,
+ 48, 48, 53, 128, 90, 48, 48, 52, 65, 128, 90, 48, 48, 52, 128, 90, 48,
+ 48, 51, 66, 128, 90, 48, 48, 51, 65, 128, 90, 48, 48, 51, 128, 90, 48,
+ 48, 50, 68, 128, 90, 48, 48, 50, 67, 128, 90, 48, 48, 50, 66, 128, 90,
+ 48, 48, 50, 65, 128, 90, 48, 48, 50, 128, 90, 48, 48, 49, 128, 90, 128,
+ 218, 89, 89, 88, 128, 89, 89, 84, 128, 89, 89, 82, 88, 128, 89, 89, 82,
+ 128, 89, 89, 80, 128, 89, 89, 69, 128, 89, 89, 65, 65, 128, 89, 89, 65,
+ 128, 89, 89, 128, 89, 87, 79, 79, 128, 89, 87, 79, 128, 89, 87, 73, 73,
+ 128, 89, 87, 73, 128, 89, 87, 69, 128, 89, 87, 65, 65, 128, 89, 87, 65,
+ 128, 89, 86, 128, 89, 85, 88, 128, 89, 85, 87, 79, 81, 128, 89, 85, 85,
+ 75, 65, 76, 69, 65, 80, 73, 78, 84, 85, 128, 89, 85, 85, 128, 89, 85, 84,
+ 128, 89, 85, 83, 128, 89, 85, 211, 89, 85, 82, 88, 128, 89, 85, 82, 128,
+ 89, 85, 81, 128, 89, 85, 209, 89, 85, 80, 128, 89, 85, 79, 88, 128, 89,
+ 85, 79, 84, 128, 89, 85, 79, 80, 128, 89, 85, 79, 77, 128, 89, 85, 79,
+ 128, 89, 85, 78, 128, 89, 85, 77, 128, 89, 85, 74, 128, 89, 85, 69, 81,
+ 128, 89, 85, 69, 128, 89, 85, 68, 72, 128, 89, 85, 68, 200, 89, 85, 65,
+ 78, 128, 89, 85, 65, 69, 78, 128, 89, 85, 45, 89, 69, 79, 128, 89, 85,
+ 45, 89, 69, 128, 89, 85, 45, 85, 128, 89, 85, 45, 79, 128, 89, 85, 45,
+ 73, 128, 89, 85, 45, 69, 79, 128, 89, 85, 45, 69, 128, 89, 85, 45, 65,
+ 69, 128, 89, 85, 45, 65, 128, 89, 85, 128, 89, 213, 89, 82, 89, 128, 89,
+ 80, 83, 73, 76, 73, 128, 89, 80, 79, 82, 82, 79, 73, 128, 89, 80, 79, 75,
+ 82, 73, 83, 73, 83, 128, 89, 80, 79, 75, 82, 73, 83, 73, 211, 89, 80, 79,
+ 71, 69, 71, 82, 65, 77, 77, 69, 78, 73, 128, 89, 79, 89, 128, 89, 79, 88,
+ 128, 89, 79, 87, 68, 128, 89, 79, 85, 84, 72, 70, 85, 76, 78, 69, 83, 83,
+ 128, 89, 79, 85, 84, 72, 70, 85, 204, 89, 79, 84, 128, 89, 79, 82, 73,
+ 128, 89, 79, 81, 128, 89, 79, 209, 89, 79, 80, 128, 89, 79, 79, 128, 89,
+ 79, 77, 79, 128, 89, 79, 71, 72, 128, 89, 79, 68, 72, 128, 89, 79, 68,
+ 128, 89, 79, 196, 89, 79, 65, 128, 89, 79, 45, 89, 69, 79, 128, 89, 79,
+ 45, 89, 65, 69, 128, 89, 79, 45, 89, 65, 128, 89, 79, 45, 79, 128, 89,
+ 79, 45, 73, 128, 89, 79, 45, 69, 79, 128, 89, 79, 45, 65, 69, 128, 89,
+ 79, 45, 65, 128, 89, 79, 128, 89, 207, 89, 73, 90, 69, 84, 128, 89, 73,
+ 88, 128, 89, 73, 87, 78, 128, 89, 73, 84, 128, 89, 73, 80, 128, 89, 73,
+ 78, 71, 128, 89, 73, 73, 128, 89, 73, 199, 89, 73, 69, 88, 128, 89, 73,
+ 69, 84, 128, 89, 73, 69, 80, 128, 89, 73, 69, 69, 128, 89, 73, 69, 128,
+ 89, 73, 68, 68, 73, 83, 200, 89, 73, 45, 85, 128, 89, 73, 128, 89, 70,
+ 69, 83, 73, 83, 128, 89, 70, 69, 83, 73, 211, 89, 70, 69, 206, 89, 69,
+ 89, 128, 89, 69, 87, 128, 89, 69, 85, 88, 128, 89, 69, 85, 82, 65, 69,
+ 128, 89, 69, 85, 81, 128, 89, 69, 85, 77, 128, 89, 69, 85, 65, 69, 84,
+ 128, 89, 69, 85, 65, 69, 128, 89, 69, 84, 73, 86, 128, 89, 69, 83, 84,
+ 85, 128, 89, 69, 83, 73, 69, 85, 78, 71, 45, 83, 73, 79, 83, 128, 89, 69,
+ 83, 73, 69, 85, 78, 71, 45, 80, 65, 78, 83, 73, 79, 83, 128, 89, 69, 83,
+ 73, 69, 85, 78, 71, 45, 77, 73, 69, 85, 77, 128, 89, 69, 83, 73, 69, 85,
+ 78, 71, 45, 72, 73, 69, 85, 72, 128, 89, 69, 83, 73, 69, 85, 78, 71, 128,
+ 89, 69, 82, 85, 128, 89, 69, 82, 213, 89, 69, 82, 73, 128, 89, 69, 82,
+ 65, 200, 89, 69, 82, 128, 89, 69, 79, 82, 73, 78, 72, 73, 69, 85, 72,
+ 128, 89, 69, 79, 45, 89, 65, 128, 89, 69, 79, 45, 85, 128, 89, 69, 79,
+ 45, 79, 128, 89, 69, 78, 73, 83, 69, 201, 89, 69, 78, 65, 80, 128, 89,
+ 69, 78, 128, 89, 69, 206, 89, 69, 76, 76, 79, 87, 128, 89, 69, 76, 76,
+ 79, 215, 89, 69, 73, 78, 128, 89, 69, 72, 128, 89, 69, 69, 71, 128, 89,
+ 69, 69, 128, 89, 69, 65, 210, 89, 69, 65, 128, 89, 65, 90, 90, 128, 89,
+ 65, 90, 72, 128, 89, 65, 90, 128, 89, 65, 89, 68, 128, 89, 65, 89, 65,
+ 78, 78, 65, 128, 89, 65, 89, 128, 89, 65, 87, 78, 128, 89, 65, 87, 128,
+ 89, 65, 86, 128, 89, 65, 85, 128, 89, 65, 84, 84, 128, 89, 65, 84, 73,
+ 128, 89, 65, 84, 72, 128, 89, 65, 84, 128, 89, 65, 83, 83, 128, 89, 65,
+ 83, 72, 128, 89, 65, 83, 128, 89, 65, 82, 82, 128, 89, 65, 82, 128, 89,
+ 65, 210, 89, 65, 81, 128, 89, 65, 80, 128, 89, 65, 78, 83, 65, 89, 65,
+ 128, 89, 65, 78, 71, 128, 89, 65, 78, 199, 89, 65, 78, 128, 89, 65, 77,
+ 79, 75, 128, 89, 65, 77, 65, 75, 75, 65, 78, 128, 89, 65, 77, 128, 89,
+ 65, 76, 128, 89, 65, 75, 72, 72, 128, 89, 65, 75, 72, 128, 89, 65, 75,
+ 65, 83, 72, 128, 89, 65, 75, 128, 89, 65, 74, 85, 82, 86, 69, 68, 73,
+ 195, 89, 65, 74, 128, 89, 65, 73, 128, 89, 65, 72, 72, 128, 89, 65, 72,
+ 128, 89, 65, 71, 78, 128, 89, 65, 71, 72, 72, 128, 89, 65, 71, 72, 128,
+ 89, 65, 71, 128, 89, 65, 70, 213, 89, 65, 70, 128, 89, 65, 69, 77, 77,
+ 65, 69, 128, 89, 65, 68, 72, 128, 89, 65, 68, 68, 72, 128, 89, 65, 68,
+ 68, 128, 89, 65, 68, 128, 89, 65, 67, 72, 128, 89, 65, 66, 72, 128, 89,
+ 65, 66, 128, 89, 65, 65, 82, 85, 128, 89, 65, 65, 73, 128, 89, 65, 65,
+ 68, 79, 128, 89, 65, 45, 89, 79, 128, 89, 65, 45, 85, 128, 89, 65, 45,
+ 79, 128, 89, 48, 48, 56, 128, 89, 48, 48, 55, 128, 89, 48, 48, 54, 128,
+ 89, 48, 48, 53, 128, 89, 48, 48, 52, 128, 89, 48, 48, 51, 128, 89, 48,
+ 48, 50, 128, 89, 48, 48, 49, 65, 128, 89, 48, 48, 49, 128, 89, 45, 67,
+ 82, 69, 197, 88, 89, 88, 128, 88, 89, 85, 128, 88, 89, 84, 128, 88, 89,
+ 82, 88, 128, 88, 89, 82, 128, 88, 89, 80, 128, 88, 89, 79, 79, 74, 128,
+ 88, 89, 79, 79, 128, 88, 89, 79, 128, 88, 89, 73, 128, 88, 89, 69, 69,
+ 205, 88, 89, 69, 69, 128, 88, 89, 69, 128, 88, 89, 65, 65, 128, 88, 89,
+ 65, 128, 88, 89, 128, 88, 87, 73, 128, 88, 87, 69, 69, 128, 88, 87, 69,
+ 128, 88, 87, 65, 65, 128, 88, 87, 65, 128, 88, 87, 128, 88, 86, 69, 128,
+ 88, 86, 65, 128, 88, 85, 79, 88, 128, 88, 85, 79, 128, 88, 85, 128, 88,
+ 83, 72, 65, 65, 89, 65, 84, 72, 73, 89, 65, 128, 88, 79, 88, 128, 88, 79,
+ 84, 128, 88, 79, 82, 128, 88, 79, 80, 72, 128, 88, 79, 80, 128, 88, 79,
+ 65, 128, 88, 79, 128, 88, 73, 88, 128, 88, 73, 84, 128, 88, 73, 82, 79,
+ 206, 88, 73, 80, 128, 88, 73, 69, 88, 128, 88, 73, 69, 84, 128, 88, 73,
+ 69, 80, 128, 88, 73, 69, 128, 88, 73, 65, 66, 128, 88, 73, 128, 88, 71,
+ 128, 88, 69, 89, 78, 128, 88, 69, 83, 84, 69, 211, 88, 69, 72, 128, 88,
+ 69, 69, 128, 88, 69, 128, 88, 65, 85, 83, 128, 88, 65, 85, 128, 88, 65,
+ 80, 72, 128, 88, 65, 78, 128, 88, 65, 65, 128, 88, 65, 128, 88, 48, 48,
+ 56, 65, 128, 88, 48, 48, 56, 128, 88, 48, 48, 55, 128, 88, 48, 48, 54,
+ 65, 128, 88, 48, 48, 54, 128, 88, 48, 48, 53, 128, 88, 48, 48, 52, 66,
+ 128, 88, 48, 48, 52, 65, 128, 88, 48, 48, 52, 128, 88, 48, 48, 51, 128,
+ 88, 48, 48, 50, 128, 88, 48, 48, 49, 128, 88, 45, 216, 87, 90, 128, 87,
+ 89, 78, 78, 128, 87, 89, 78, 206, 87, 86, 73, 128, 87, 86, 69, 128, 87,
+ 86, 65, 128, 87, 86, 128, 87, 85, 80, 128, 87, 85, 79, 88, 128, 87, 85,
+ 79, 80, 128, 87, 85, 79, 128, 87, 85, 78, 74, 207, 87, 85, 78, 128, 87,
+ 85, 76, 85, 128, 87, 85, 76, 213, 87, 85, 73, 128, 87, 85, 69, 128, 87,
+ 85, 65, 69, 84, 128, 87, 85, 65, 69, 78, 128, 87, 85, 128, 87, 82, 217,
+ 87, 82, 79, 78, 71, 128, 87, 82, 73, 83, 212, 87, 82, 73, 78, 75, 76, 69,
+ 83, 128, 87, 82, 73, 78, 75, 76, 69, 211, 87, 82, 73, 78, 75, 76, 69, 68,
+ 128, 87, 82, 69, 78, 67, 72, 128, 87, 82, 69, 65, 84, 200, 87, 82, 65,
+ 80, 80, 69, 196, 87, 82, 65, 80, 128, 87, 79, 88, 128, 87, 79, 87, 128,
+ 87, 79, 82, 83, 72, 73, 80, 128, 87, 79, 82, 82, 73, 69, 196, 87, 79, 82,
+ 76, 196, 87, 79, 82, 75, 69, 82, 128, 87, 79, 82, 75, 128, 87, 79, 82,
+ 203, 87, 79, 82, 68, 83, 80, 65, 67, 69, 128, 87, 79, 82, 196, 87, 79,
+ 80, 128, 87, 79, 79, 78, 128, 87, 79, 79, 76, 128, 87, 79, 79, 68, 83,
+ 45, 67, 82, 69, 197, 87, 79, 79, 68, 128, 87, 79, 78, 128, 87, 79, 206,
+ 87, 79, 77, 69, 78, 211, 87, 79, 77, 69, 206, 87, 79, 77, 65, 78, 211,
+ 87, 79, 77, 65, 78, 128, 87, 79, 77, 65, 206, 87, 79, 76, 79, 83, 79,
+ 128, 87, 79, 76, 198, 87, 79, 69, 128, 87, 79, 65, 128, 87, 73, 84, 72,
+ 79, 85, 212, 87, 73, 84, 72, 73, 78, 128, 87, 73, 84, 72, 73, 206, 87,
+ 73, 82, 69, 196, 87, 73, 78, 84, 69, 82, 128, 87, 73, 78, 75, 73, 78,
+ 199, 87, 73, 78, 75, 128, 87, 73, 78, 74, 65, 128, 87, 73, 78, 71, 83,
+ 128, 87, 73, 78, 69, 128, 87, 73, 78, 197, 87, 73, 78, 68, 85, 128, 87,
+ 73, 78, 68, 79, 87, 128, 87, 73, 78, 68, 128, 87, 73, 78, 196, 87, 73,
+ 78, 128, 87, 73, 71, 78, 89, 65, 78, 128, 87, 73, 71, 71, 76, 217, 87,
+ 73, 71, 71, 76, 69, 83, 128, 87, 73, 68, 84, 72, 128, 87, 73, 68, 69, 78,
+ 73, 78, 199, 87, 73, 68, 69, 45, 72, 69, 65, 68, 69, 196, 87, 73, 68,
+ 197, 87, 73, 65, 78, 71, 87, 65, 65, 75, 128, 87, 73, 65, 78, 71, 128,
+ 87, 72, 79, 76, 197, 87, 72, 73, 84, 69, 45, 70, 69, 65, 84, 72, 69, 82,
+ 69, 196, 87, 72, 73, 84, 69, 128, 87, 72, 69, 69, 76, 69, 196, 87, 72,
+ 69, 69, 76, 67, 72, 65, 73, 210, 87, 72, 69, 69, 76, 128, 87, 72, 69, 69,
+ 204, 87, 72, 69, 65, 84, 128, 87, 72, 65, 76, 69, 128, 87, 72, 128, 87,
+ 71, 128, 87, 69, 88, 128, 87, 69, 85, 88, 128, 87, 69, 83, 84, 69, 82,
+ 206, 87, 69, 83, 84, 128, 87, 69, 83, 212, 87, 69, 80, 128, 87, 69, 79,
+ 128, 87, 69, 78, 128, 87, 69, 76, 76, 128, 87, 69, 73, 71, 72, 212, 87,
+ 69, 73, 69, 82, 83, 84, 82, 65, 83, 211, 87, 69, 73, 128, 87, 69, 69, 78,
+ 128, 87, 69, 68, 71, 69, 45, 84, 65, 73, 76, 69, 196, 87, 69, 68, 71, 69,
+ 128, 87, 69, 68, 68, 73, 78, 71, 128, 87, 69, 66, 128, 87, 69, 65, 82,
+ 217, 87, 69, 65, 80, 79, 78, 128, 87, 67, 128, 87, 66, 128, 87, 65, 89,
+ 128, 87, 65, 217, 87, 65, 88, 73, 78, 199, 87, 65, 88, 128, 87, 65, 87,
+ 45, 65, 89, 73, 78, 45, 82, 69, 83, 72, 128, 87, 65, 87, 128, 87, 65,
+ 215, 87, 65, 86, 217, 87, 65, 86, 73, 78, 199, 87, 65, 86, 69, 83, 128,
+ 87, 65, 86, 69, 128, 87, 65, 86, 197, 87, 65, 85, 128, 87, 65, 84, 84,
+ 79, 128, 87, 65, 84, 69, 82, 77, 69, 76, 79, 78, 128, 87, 65, 84, 69, 82,
+ 128, 87, 65, 84, 69, 210, 87, 65, 84, 67, 72, 128, 87, 65, 84, 128, 87,
+ 65, 83, 84, 73, 78, 71, 128, 87, 65, 83, 84, 69, 66, 65, 83, 75, 69, 84,
+ 128, 87, 65, 83, 83, 65, 76, 76, 65, 77, 128, 87, 65, 83, 76, 65, 128,
+ 87, 65, 83, 76, 193, 87, 65, 83, 65, 76, 76, 65, 77, 128, 87, 65, 83, 65,
+ 76, 76, 65, 205, 87, 65, 82, 78, 73, 78, 199, 87, 65, 82, 65, 78, 199,
+ 87, 65, 80, 128, 87, 65, 78, 73, 78, 199, 87, 65, 78, 71, 75, 85, 79, 81,
+ 128, 87, 65, 78, 68, 69, 82, 69, 82, 128, 87, 65, 78, 128, 87, 65, 76,
+ 76, 80, 76, 65, 78, 197, 87, 65, 76, 76, 128, 87, 65, 76, 204, 87, 65,
+ 76, 75, 128, 87, 65, 76, 203, 87, 65, 73, 84, 73, 78, 71, 128, 87, 65,
+ 73, 83, 84, 128, 87, 65, 73, 128, 87, 65, 69, 78, 128, 87, 65, 69, 128,
+ 87, 65, 68, 68, 65, 128, 87, 65, 65, 86, 85, 128, 87, 48, 50, 53, 128,
87, 48, 50, 52, 65, 128, 87, 48, 50, 52, 128, 87, 48, 50, 51, 128, 87,
48, 50, 50, 128, 87, 48, 50, 49, 128, 87, 48, 50, 48, 128, 87, 48, 49,
57, 128, 87, 48, 49, 56, 65, 128, 87, 48, 49, 56, 128, 87, 48, 49, 55,
@@ -258,100 +274,102 @@ static unsigned char lexicon[] = {
87, 48, 48, 52, 128, 87, 48, 48, 51, 65, 128, 87, 48, 48, 51, 128, 87,
48, 48, 50, 128, 87, 48, 48, 49, 128, 86, 90, 77, 69, 84, 128, 86, 89,
88, 128, 86, 89, 84, 128, 86, 89, 82, 88, 128, 86, 89, 82, 128, 86, 89,
- 80, 128, 86, 89, 128, 86, 87, 65, 128, 86, 85, 88, 128, 86, 85, 85, 128,
- 86, 85, 84, 128, 86, 85, 82, 88, 128, 86, 85, 82, 128, 86, 85, 80, 128,
- 86, 85, 76, 71, 65, 210, 86, 85, 69, 81, 128, 86, 84, 83, 128, 86, 84,
- 128, 86, 83, 57, 57, 128, 86, 83, 57, 56, 128, 86, 83, 57, 55, 128, 86,
- 83, 57, 54, 128, 86, 83, 57, 53, 128, 86, 83, 57, 52, 128, 86, 83, 57,
- 51, 128, 86, 83, 57, 50, 128, 86, 83, 57, 49, 128, 86, 83, 57, 48, 128,
- 86, 83, 57, 128, 86, 83, 56, 57, 128, 86, 83, 56, 56, 128, 86, 83, 56,
- 55, 128, 86, 83, 56, 54, 128, 86, 83, 56, 53, 128, 86, 83, 56, 52, 128,
- 86, 83, 56, 51, 128, 86, 83, 56, 50, 128, 86, 83, 56, 49, 128, 86, 83,
- 56, 48, 128, 86, 83, 56, 128, 86, 83, 55, 57, 128, 86, 83, 55, 56, 128,
- 86, 83, 55, 55, 128, 86, 83, 55, 54, 128, 86, 83, 55, 53, 128, 86, 83,
- 55, 52, 128, 86, 83, 55, 51, 128, 86, 83, 55, 50, 128, 86, 83, 55, 49,
- 128, 86, 83, 55, 48, 128, 86, 83, 55, 128, 86, 83, 54, 57, 128, 86, 83,
- 54, 56, 128, 86, 83, 54, 55, 128, 86, 83, 54, 54, 128, 86, 83, 54, 53,
- 128, 86, 83, 54, 52, 128, 86, 83, 54, 51, 128, 86, 83, 54, 50, 128, 86,
- 83, 54, 49, 128, 86, 83, 54, 48, 128, 86, 83, 54, 128, 86, 83, 53, 57,
- 128, 86, 83, 53, 56, 128, 86, 83, 53, 55, 128, 86, 83, 53, 54, 128, 86,
- 83, 53, 53, 128, 86, 83, 53, 52, 128, 86, 83, 53, 51, 128, 86, 83, 53,
- 50, 128, 86, 83, 53, 49, 128, 86, 83, 53, 48, 128, 86, 83, 53, 128, 86,
- 83, 52, 57, 128, 86, 83, 52, 56, 128, 86, 83, 52, 55, 128, 86, 83, 52,
- 54, 128, 86, 83, 52, 53, 128, 86, 83, 52, 52, 128, 86, 83, 52, 51, 128,
- 86, 83, 52, 50, 128, 86, 83, 52, 49, 128, 86, 83, 52, 48, 128, 86, 83,
- 52, 128, 86, 83, 51, 57, 128, 86, 83, 51, 56, 128, 86, 83, 51, 55, 128,
- 86, 83, 51, 54, 128, 86, 83, 51, 53, 128, 86, 83, 51, 52, 128, 86, 83,
- 51, 51, 128, 86, 83, 51, 50, 128, 86, 83, 51, 49, 128, 86, 83, 51, 48,
- 128, 86, 83, 51, 128, 86, 83, 50, 57, 128, 86, 83, 50, 56, 128, 86, 83,
- 50, 55, 128, 86, 83, 50, 54, 128, 86, 83, 50, 53, 54, 128, 86, 83, 50,
- 53, 53, 128, 86, 83, 50, 53, 52, 128, 86, 83, 50, 53, 51, 128, 86, 83,
- 50, 53, 50, 128, 86, 83, 50, 53, 49, 128, 86, 83, 50, 53, 48, 128, 86,
- 83, 50, 53, 128, 86, 83, 50, 52, 57, 128, 86, 83, 50, 52, 56, 128, 86,
- 83, 50, 52, 55, 128, 86, 83, 50, 52, 54, 128, 86, 83, 50, 52, 53, 128,
- 86, 83, 50, 52, 52, 128, 86, 83, 50, 52, 51, 128, 86, 83, 50, 52, 50,
- 128, 86, 83, 50, 52, 49, 128, 86, 83, 50, 52, 48, 128, 86, 83, 50, 52,
- 128, 86, 83, 50, 51, 57, 128, 86, 83, 50, 51, 56, 128, 86, 83, 50, 51,
- 55, 128, 86, 83, 50, 51, 54, 128, 86, 83, 50, 51, 53, 128, 86, 83, 50,
- 51, 52, 128, 86, 83, 50, 51, 51, 128, 86, 83, 50, 51, 50, 128, 86, 83,
- 50, 51, 49, 128, 86, 83, 50, 51, 48, 128, 86, 83, 50, 51, 128, 86, 83,
- 50, 50, 57, 128, 86, 83, 50, 50, 56, 128, 86, 83, 50, 50, 55, 128, 86,
- 83, 50, 50, 54, 128, 86, 83, 50, 50, 53, 128, 86, 83, 50, 50, 52, 128,
- 86, 83, 50, 50, 51, 128, 86, 83, 50, 50, 50, 128, 86, 83, 50, 50, 49,
- 128, 86, 83, 50, 50, 48, 128, 86, 83, 50, 50, 128, 86, 83, 50, 49, 57,
- 128, 86, 83, 50, 49, 56, 128, 86, 83, 50, 49, 55, 128, 86, 83, 50, 49,
- 54, 128, 86, 83, 50, 49, 53, 128, 86, 83, 50, 49, 52, 128, 86, 83, 50,
- 49, 51, 128, 86, 83, 50, 49, 50, 128, 86, 83, 50, 49, 49, 128, 86, 83,
- 50, 49, 48, 128, 86, 83, 50, 49, 128, 86, 83, 50, 48, 57, 128, 86, 83,
- 50, 48, 56, 128, 86, 83, 50, 48, 55, 128, 86, 83, 50, 48, 54, 128, 86,
- 83, 50, 48, 53, 128, 86, 83, 50, 48, 52, 128, 86, 83, 50, 48, 51, 128,
- 86, 83, 50, 48, 50, 128, 86, 83, 50, 48, 49, 128, 86, 83, 50, 48, 48,
- 128, 86, 83, 50, 48, 128, 86, 83, 50, 128, 86, 83, 49, 57, 57, 128, 86,
- 83, 49, 57, 56, 128, 86, 83, 49, 57, 55, 128, 86, 83, 49, 57, 54, 128,
- 86, 83, 49, 57, 53, 128, 86, 83, 49, 57, 52, 128, 86, 83, 49, 57, 51,
- 128, 86, 83, 49, 57, 50, 128, 86, 83, 49, 57, 49, 128, 86, 83, 49, 57,
- 48, 128, 86, 83, 49, 57, 128, 86, 83, 49, 56, 57, 128, 86, 83, 49, 56,
- 56, 128, 86, 83, 49, 56, 55, 128, 86, 83, 49, 56, 54, 128, 86, 83, 49,
- 56, 53, 128, 86, 83, 49, 56, 52, 128, 86, 83, 49, 56, 51, 128, 86, 83,
- 49, 56, 50, 128, 86, 83, 49, 56, 49, 128, 86, 83, 49, 56, 48, 128, 86,
- 83, 49, 56, 128, 86, 83, 49, 55, 57, 128, 86, 83, 49, 55, 56, 128, 86,
- 83, 49, 55, 55, 128, 86, 83, 49, 55, 54, 128, 86, 83, 49, 55, 53, 128,
- 86, 83, 49, 55, 52, 128, 86, 83, 49, 55, 51, 128, 86, 83, 49, 55, 50,
- 128, 86, 83, 49, 55, 49, 128, 86, 83, 49, 55, 48, 128, 86, 83, 49, 55,
- 128, 86, 83, 49, 54, 57, 128, 86, 83, 49, 54, 56, 128, 86, 83, 49, 54,
- 55, 128, 86, 83, 49, 54, 54, 128, 86, 83, 49, 54, 53, 128, 86, 83, 49,
- 54, 52, 128, 86, 83, 49, 54, 51, 128, 86, 83, 49, 54, 50, 128, 86, 83,
- 49, 54, 49, 128, 86, 83, 49, 54, 48, 128, 86, 83, 49, 54, 128, 86, 83,
- 49, 53, 57, 128, 86, 83, 49, 53, 56, 128, 86, 83, 49, 53, 55, 128, 86,
- 83, 49, 53, 54, 128, 86, 83, 49, 53, 53, 128, 86, 83, 49, 53, 52, 128,
- 86, 83, 49, 53, 51, 128, 86, 83, 49, 53, 50, 128, 86, 83, 49, 53, 49,
- 128, 86, 83, 49, 53, 48, 128, 86, 83, 49, 53, 128, 86, 83, 49, 52, 57,
- 128, 86, 83, 49, 52, 56, 128, 86, 83, 49, 52, 55, 128, 86, 83, 49, 52,
- 54, 128, 86, 83, 49, 52, 53, 128, 86, 83, 49, 52, 52, 128, 86, 83, 49,
- 52, 51, 128, 86, 83, 49, 52, 50, 128, 86, 83, 49, 52, 49, 128, 86, 83,
- 49, 52, 48, 128, 86, 83, 49, 52, 128, 86, 83, 49, 51, 57, 128, 86, 83,
- 49, 51, 56, 128, 86, 83, 49, 51, 55, 128, 86, 83, 49, 51, 54, 128, 86,
- 83, 49, 51, 53, 128, 86, 83, 49, 51, 52, 128, 86, 83, 49, 51, 51, 128,
- 86, 83, 49, 51, 50, 128, 86, 83, 49, 51, 49, 128, 86, 83, 49, 51, 48,
- 128, 86, 83, 49, 51, 128, 86, 83, 49, 50, 57, 128, 86, 83, 49, 50, 56,
- 128, 86, 83, 49, 50, 55, 128, 86, 83, 49, 50, 54, 128, 86, 83, 49, 50,
- 53, 128, 86, 83, 49, 50, 52, 128, 86, 83, 49, 50, 51, 128, 86, 83, 49,
- 50, 50, 128, 86, 83, 49, 50, 49, 128, 86, 83, 49, 50, 48, 128, 86, 83,
- 49, 50, 128, 86, 83, 49, 49, 57, 128, 86, 83, 49, 49, 56, 128, 86, 83,
- 49, 49, 55, 128, 86, 83, 49, 49, 54, 128, 86, 83, 49, 49, 53, 128, 86,
- 83, 49, 49, 52, 128, 86, 83, 49, 49, 51, 128, 86, 83, 49, 49, 50, 128,
- 86, 83, 49, 49, 49, 128, 86, 83, 49, 49, 48, 128, 86, 83, 49, 49, 128,
- 86, 83, 49, 48, 57, 128, 86, 83, 49, 48, 56, 128, 86, 83, 49, 48, 55,
- 128, 86, 83, 49, 48, 54, 128, 86, 83, 49, 48, 53, 128, 86, 83, 49, 48,
- 52, 128, 86, 83, 49, 48, 51, 128, 86, 83, 49, 48, 50, 128, 86, 83, 49,
- 48, 49, 128, 86, 83, 49, 48, 48, 128, 86, 83, 49, 48, 128, 86, 83, 49,
- 128, 86, 83, 128, 86, 82, 65, 67, 72, 89, 128, 86, 79, 88, 128, 86, 79,
- 87, 69, 76, 45, 67, 65, 82, 82, 73, 69, 210, 86, 79, 87, 128, 86, 79, 85,
- 128, 86, 79, 84, 128, 86, 79, 80, 128, 86, 79, 79, 128, 86, 79, 77, 128,
- 86, 79, 76, 85, 77, 197, 86, 79, 76, 84, 65, 71, 197, 86, 79, 76, 67, 65,
- 78, 79, 128, 86, 79, 73, 196, 86, 79, 73, 67, 73, 78, 71, 128, 86, 79,
- 73, 67, 69, 76, 69, 83, 211, 86, 79, 73, 67, 69, 196, 86, 79, 67, 65, 76,
- 73, 90, 65, 84, 73, 79, 206, 86, 79, 67, 65, 204, 86, 79, 128, 86, 73,
+ 80, 128, 86, 89, 128, 86, 87, 74, 128, 86, 87, 65, 128, 86, 85, 88, 128,
+ 86, 85, 85, 128, 86, 85, 84, 128, 86, 85, 82, 88, 128, 86, 85, 82, 128,
+ 86, 85, 80, 128, 86, 85, 76, 71, 65, 210, 86, 85, 69, 81, 128, 86, 84,
+ 83, 128, 86, 84, 128, 86, 83, 57, 57, 128, 86, 83, 57, 56, 128, 86, 83,
+ 57, 55, 128, 86, 83, 57, 54, 128, 86, 83, 57, 53, 128, 86, 83, 57, 52,
+ 128, 86, 83, 57, 51, 128, 86, 83, 57, 50, 128, 86, 83, 57, 49, 128, 86,
+ 83, 57, 48, 128, 86, 83, 57, 128, 86, 83, 56, 57, 128, 86, 83, 56, 56,
+ 128, 86, 83, 56, 55, 128, 86, 83, 56, 54, 128, 86, 83, 56, 53, 128, 86,
+ 83, 56, 52, 128, 86, 83, 56, 51, 128, 86, 83, 56, 50, 128, 86, 83, 56,
+ 49, 128, 86, 83, 56, 48, 128, 86, 83, 56, 128, 86, 83, 55, 57, 128, 86,
+ 83, 55, 56, 128, 86, 83, 55, 55, 128, 86, 83, 55, 54, 128, 86, 83, 55,
+ 53, 128, 86, 83, 55, 52, 128, 86, 83, 55, 51, 128, 86, 83, 55, 50, 128,
+ 86, 83, 55, 49, 128, 86, 83, 55, 48, 128, 86, 83, 55, 128, 86, 83, 54,
+ 57, 128, 86, 83, 54, 56, 128, 86, 83, 54, 55, 128, 86, 83, 54, 54, 128,
+ 86, 83, 54, 53, 128, 86, 83, 54, 52, 128, 86, 83, 54, 51, 128, 86, 83,
+ 54, 50, 128, 86, 83, 54, 49, 128, 86, 83, 54, 48, 128, 86, 83, 54, 128,
+ 86, 83, 53, 57, 128, 86, 83, 53, 56, 128, 86, 83, 53, 55, 128, 86, 83,
+ 53, 54, 128, 86, 83, 53, 53, 128, 86, 83, 53, 52, 128, 86, 83, 53, 51,
+ 128, 86, 83, 53, 50, 128, 86, 83, 53, 49, 128, 86, 83, 53, 48, 128, 86,
+ 83, 53, 128, 86, 83, 52, 57, 128, 86, 83, 52, 56, 128, 86, 83, 52, 55,
+ 128, 86, 83, 52, 54, 128, 86, 83, 52, 53, 128, 86, 83, 52, 52, 128, 86,
+ 83, 52, 51, 128, 86, 83, 52, 50, 128, 86, 83, 52, 49, 128, 86, 83, 52,
+ 48, 128, 86, 83, 52, 128, 86, 83, 51, 57, 128, 86, 83, 51, 56, 128, 86,
+ 83, 51, 55, 128, 86, 83, 51, 54, 128, 86, 83, 51, 53, 128, 86, 83, 51,
+ 52, 128, 86, 83, 51, 51, 128, 86, 83, 51, 50, 128, 86, 83, 51, 49, 128,
+ 86, 83, 51, 48, 128, 86, 83, 51, 128, 86, 83, 50, 57, 128, 86, 83, 50,
+ 56, 128, 86, 83, 50, 55, 128, 86, 83, 50, 54, 128, 86, 83, 50, 53, 54,
+ 128, 86, 83, 50, 53, 53, 128, 86, 83, 50, 53, 52, 128, 86, 83, 50, 53,
+ 51, 128, 86, 83, 50, 53, 50, 128, 86, 83, 50, 53, 49, 128, 86, 83, 50,
+ 53, 48, 128, 86, 83, 50, 53, 128, 86, 83, 50, 52, 57, 128, 86, 83, 50,
+ 52, 56, 128, 86, 83, 50, 52, 55, 128, 86, 83, 50, 52, 54, 128, 86, 83,
+ 50, 52, 53, 128, 86, 83, 50, 52, 52, 128, 86, 83, 50, 52, 51, 128, 86,
+ 83, 50, 52, 50, 128, 86, 83, 50, 52, 49, 128, 86, 83, 50, 52, 48, 128,
+ 86, 83, 50, 52, 128, 86, 83, 50, 51, 57, 128, 86, 83, 50, 51, 56, 128,
+ 86, 83, 50, 51, 55, 128, 86, 83, 50, 51, 54, 128, 86, 83, 50, 51, 53,
+ 128, 86, 83, 50, 51, 52, 128, 86, 83, 50, 51, 51, 128, 86, 83, 50, 51,
+ 50, 128, 86, 83, 50, 51, 49, 128, 86, 83, 50, 51, 48, 128, 86, 83, 50,
+ 51, 128, 86, 83, 50, 50, 57, 128, 86, 83, 50, 50, 56, 128, 86, 83, 50,
+ 50, 55, 128, 86, 83, 50, 50, 54, 128, 86, 83, 50, 50, 53, 128, 86, 83,
+ 50, 50, 52, 128, 86, 83, 50, 50, 51, 128, 86, 83, 50, 50, 50, 128, 86,
+ 83, 50, 50, 49, 128, 86, 83, 50, 50, 48, 128, 86, 83, 50, 50, 128, 86,
+ 83, 50, 49, 57, 128, 86, 83, 50, 49, 56, 128, 86, 83, 50, 49, 55, 128,
+ 86, 83, 50, 49, 54, 128, 86, 83, 50, 49, 53, 128, 86, 83, 50, 49, 52,
+ 128, 86, 83, 50, 49, 51, 128, 86, 83, 50, 49, 50, 128, 86, 83, 50, 49,
+ 49, 128, 86, 83, 50, 49, 48, 128, 86, 83, 50, 49, 128, 86, 83, 50, 48,
+ 57, 128, 86, 83, 50, 48, 56, 128, 86, 83, 50, 48, 55, 128, 86, 83, 50,
+ 48, 54, 128, 86, 83, 50, 48, 53, 128, 86, 83, 50, 48, 52, 128, 86, 83,
+ 50, 48, 51, 128, 86, 83, 50, 48, 50, 128, 86, 83, 50, 48, 49, 128, 86,
+ 83, 50, 48, 48, 128, 86, 83, 50, 48, 128, 86, 83, 50, 128, 86, 83, 49,
+ 57, 57, 128, 86, 83, 49, 57, 56, 128, 86, 83, 49, 57, 55, 128, 86, 83,
+ 49, 57, 54, 128, 86, 83, 49, 57, 53, 128, 86, 83, 49, 57, 52, 128, 86,
+ 83, 49, 57, 51, 128, 86, 83, 49, 57, 50, 128, 86, 83, 49, 57, 49, 128,
+ 86, 83, 49, 57, 48, 128, 86, 83, 49, 57, 128, 86, 83, 49, 56, 57, 128,
+ 86, 83, 49, 56, 56, 128, 86, 83, 49, 56, 55, 128, 86, 83, 49, 56, 54,
+ 128, 86, 83, 49, 56, 53, 128, 86, 83, 49, 56, 52, 128, 86, 83, 49, 56,
+ 51, 128, 86, 83, 49, 56, 50, 128, 86, 83, 49, 56, 49, 128, 86, 83, 49,
+ 56, 48, 128, 86, 83, 49, 56, 128, 86, 83, 49, 55, 57, 128, 86, 83, 49,
+ 55, 56, 128, 86, 83, 49, 55, 55, 128, 86, 83, 49, 55, 54, 128, 86, 83,
+ 49, 55, 53, 128, 86, 83, 49, 55, 52, 128, 86, 83, 49, 55, 51, 128, 86,
+ 83, 49, 55, 50, 128, 86, 83, 49, 55, 49, 128, 86, 83, 49, 55, 48, 128,
+ 86, 83, 49, 55, 128, 86, 83, 49, 54, 57, 128, 86, 83, 49, 54, 56, 128,
+ 86, 83, 49, 54, 55, 128, 86, 83, 49, 54, 54, 128, 86, 83, 49, 54, 53,
+ 128, 86, 83, 49, 54, 52, 128, 86, 83, 49, 54, 51, 128, 86, 83, 49, 54,
+ 50, 128, 86, 83, 49, 54, 49, 128, 86, 83, 49, 54, 48, 128, 86, 83, 49,
+ 54, 128, 86, 83, 49, 53, 57, 128, 86, 83, 49, 53, 56, 128, 86, 83, 49,
+ 53, 55, 128, 86, 83, 49, 53, 54, 128, 86, 83, 49, 53, 53, 128, 86, 83,
+ 49, 53, 52, 128, 86, 83, 49, 53, 51, 128, 86, 83, 49, 53, 50, 128, 86,
+ 83, 49, 53, 49, 128, 86, 83, 49, 53, 48, 128, 86, 83, 49, 53, 128, 86,
+ 83, 49, 52, 57, 128, 86, 83, 49, 52, 56, 128, 86, 83, 49, 52, 55, 128,
+ 86, 83, 49, 52, 54, 128, 86, 83, 49, 52, 53, 128, 86, 83, 49, 52, 52,
+ 128, 86, 83, 49, 52, 51, 128, 86, 83, 49, 52, 50, 128, 86, 83, 49, 52,
+ 49, 128, 86, 83, 49, 52, 48, 128, 86, 83, 49, 52, 128, 86, 83, 49, 51,
+ 57, 128, 86, 83, 49, 51, 56, 128, 86, 83, 49, 51, 55, 128, 86, 83, 49,
+ 51, 54, 128, 86, 83, 49, 51, 53, 128, 86, 83, 49, 51, 52, 128, 86, 83,
+ 49, 51, 51, 128, 86, 83, 49, 51, 50, 128, 86, 83, 49, 51, 49, 128, 86,
+ 83, 49, 51, 48, 128, 86, 83, 49, 51, 128, 86, 83, 49, 50, 57, 128, 86,
+ 83, 49, 50, 56, 128, 86, 83, 49, 50, 55, 128, 86, 83, 49, 50, 54, 128,
+ 86, 83, 49, 50, 53, 128, 86, 83, 49, 50, 52, 128, 86, 83, 49, 50, 51,
+ 128, 86, 83, 49, 50, 50, 128, 86, 83, 49, 50, 49, 128, 86, 83, 49, 50,
+ 48, 128, 86, 83, 49, 50, 128, 86, 83, 49, 49, 57, 128, 86, 83, 49, 49,
+ 56, 128, 86, 83, 49, 49, 55, 128, 86, 83, 49, 49, 54, 128, 86, 83, 49,
+ 49, 53, 128, 86, 83, 49, 49, 52, 128, 86, 83, 49, 49, 51, 128, 86, 83,
+ 49, 49, 50, 128, 86, 83, 49, 49, 49, 128, 86, 83, 49, 49, 48, 128, 86,
+ 83, 49, 49, 128, 86, 83, 49, 48, 57, 128, 86, 83, 49, 48, 56, 128, 86,
+ 83, 49, 48, 55, 128, 86, 83, 49, 48, 54, 128, 86, 83, 49, 48, 53, 128,
+ 86, 83, 49, 48, 52, 128, 86, 83, 49, 48, 51, 128, 86, 83, 49, 48, 50,
+ 128, 86, 83, 49, 48, 49, 128, 86, 83, 49, 48, 48, 128, 86, 83, 49, 48,
+ 128, 86, 83, 49, 128, 86, 83, 128, 86, 82, 65, 67, 72, 89, 128, 86, 79,
+ 88, 128, 86, 79, 87, 69, 76, 45, 67, 65, 82, 82, 73, 69, 210, 86, 79, 87,
+ 128, 86, 79, 85, 128, 86, 79, 84, 128, 86, 79, 211, 86, 79, 80, 128, 86,
+ 79, 79, 73, 128, 86, 79, 79, 128, 86, 79, 77, 128, 86, 79, 76, 85, 77,
+ 197, 86, 79, 76, 84, 65, 71, 197, 86, 79, 76, 76, 69, 89, 66, 65, 76, 76,
+ 128, 86, 79, 76, 67, 65, 78, 79, 128, 86, 79, 76, 65, 80, 85, 203, 86,
+ 79, 73, 196, 86, 79, 73, 67, 73, 78, 71, 128, 86, 79, 73, 67, 69, 76, 69,
+ 83, 211, 86, 79, 73, 67, 69, 196, 86, 79, 67, 65, 76, 73, 90, 65, 84, 73,
+ 79, 206, 86, 79, 67, 65, 204, 86, 79, 128, 86, 73, 89, 79, 128, 86, 73,
88, 128, 86, 73, 84, 82, 73, 79, 76, 45, 50, 128, 86, 73, 84, 82, 73, 79,
76, 128, 86, 73, 84, 65, 69, 45, 50, 128, 86, 73, 84, 65, 69, 128, 86,
73, 84, 128, 86, 73, 83, 73, 71, 79, 84, 72, 73, 195, 86, 73, 83, 65, 82,
@@ -360,123 +378,127 @@ static unsigned char lexicon[] = {
82, 71, 65, 128, 86, 73, 82, 65, 77, 65, 128, 86, 73, 80, 128, 86, 73,
79, 76, 73, 78, 128, 86, 73, 78, 69, 71, 65, 82, 45, 51, 128, 86, 73, 78,
69, 71, 65, 82, 45, 50, 128, 86, 73, 78, 69, 71, 65, 82, 128, 86, 73, 78,
- 69, 71, 65, 210, 86, 73, 78, 69, 128, 86, 73, 78, 128, 86, 73, 76, 76,
- 65, 71, 69, 128, 86, 73, 73, 128, 86, 73, 69, 88, 128, 86, 73, 69, 87,
- 73, 78, 199, 86, 73, 69, 87, 68, 65, 84, 193, 86, 73, 69, 84, 128, 86,
- 73, 69, 80, 128, 86, 73, 69, 128, 86, 73, 68, 74, 45, 50, 128, 86, 73,
- 68, 74, 128, 86, 73, 68, 69, 79, 67, 65, 83, 83, 69, 84, 84, 69, 128, 86,
- 73, 68, 69, 207, 86, 73, 68, 65, 128, 86, 73, 67, 84, 79, 82, 217, 86,
- 73, 66, 82, 65, 84, 73, 79, 206, 86, 73, 128, 86, 70, 65, 128, 86, 69,
- 88, 128, 86, 69, 87, 128, 86, 69, 215, 86, 69, 85, 88, 128, 86, 69, 85,
- 77, 128, 86, 69, 85, 65, 69, 80, 69, 78, 128, 86, 69, 85, 65, 69, 128,
- 86, 69, 83, 84, 65, 128, 86, 69, 83, 83, 69, 204, 86, 69, 82, 217, 86,
- 69, 82, 84, 73, 67, 65, 76, 76, 89, 128, 86, 69, 82, 84, 73, 67, 65, 76,
- 76, 217, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 54, 45, 48, 54, 128, 86,
- 69, 82, 84, 73, 67, 65, 76, 45, 48, 54, 45, 48, 53, 128, 86, 69, 82, 84,
- 73, 67, 65, 76, 45, 48, 54, 45, 48, 52, 128, 86, 69, 82, 84, 73, 67, 65,
- 76, 45, 48, 54, 45, 48, 51, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48,
- 54, 45, 48, 50, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 54, 45, 48,
- 49, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 54, 45, 48, 48, 128, 86,
- 69, 82, 84, 73, 67, 65, 76, 45, 48, 53, 45, 48, 54, 128, 86, 69, 82, 84,
- 73, 67, 65, 76, 45, 48, 53, 45, 48, 53, 128, 86, 69, 82, 84, 73, 67, 65,
- 76, 45, 48, 53, 45, 48, 52, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48,
- 53, 45, 48, 51, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 53, 45, 48,
- 50, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 53, 45, 48, 49, 128, 86,
- 69, 82, 84, 73, 67, 65, 76, 45, 48, 53, 45, 48, 48, 128, 86, 69, 82, 84,
- 73, 67, 65, 76, 45, 48, 52, 45, 48, 54, 128, 86, 69, 82, 84, 73, 67, 65,
- 76, 45, 48, 52, 45, 48, 53, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48,
- 52, 45, 48, 52, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 52, 45, 48,
- 51, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 52, 45, 48, 50, 128, 86,
- 69, 82, 84, 73, 67, 65, 76, 45, 48, 52, 45, 48, 49, 128, 86, 69, 82, 84,
- 73, 67, 65, 76, 45, 48, 52, 45, 48, 48, 128, 86, 69, 82, 84, 73, 67, 65,
- 76, 45, 48, 51, 45, 48, 54, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48,
- 51, 45, 48, 53, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 51, 45, 48,
- 52, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 51, 45, 48, 51, 128, 86,
- 69, 82, 84, 73, 67, 65, 76, 45, 48, 51, 45, 48, 50, 128, 86, 69, 82, 84,
- 73, 67, 65, 76, 45, 48, 51, 45, 48, 49, 128, 86, 69, 82, 84, 73, 67, 65,
- 76, 45, 48, 51, 45, 48, 48, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48,
- 50, 45, 48, 54, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 50, 45, 48,
- 53, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 50, 45, 48, 52, 128, 86,
- 69, 82, 84, 73, 67, 65, 76, 45, 48, 50, 45, 48, 51, 128, 86, 69, 82, 84,
- 73, 67, 65, 76, 45, 48, 50, 45, 48, 50, 128, 86, 69, 82, 84, 73, 67, 65,
- 76, 45, 48, 50, 45, 48, 49, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48,
- 50, 45, 48, 48, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 49, 45, 48,
- 54, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 49, 45, 48, 53, 128, 86,
- 69, 82, 84, 73, 67, 65, 76, 45, 48, 49, 45, 48, 52, 128, 86, 69, 82, 84,
- 73, 67, 65, 76, 45, 48, 49, 45, 48, 51, 128, 86, 69, 82, 84, 73, 67, 65,
- 76, 45, 48, 49, 45, 48, 50, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48,
- 49, 45, 48, 49, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 49, 45, 48,
- 48, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 48, 45, 48, 54, 128, 86,
- 69, 82, 84, 73, 67, 65, 76, 45, 48, 48, 45, 48, 53, 128, 86, 69, 82, 84,
- 73, 67, 65, 76, 45, 48, 48, 45, 48, 52, 128, 86, 69, 82, 84, 73, 67, 65,
- 76, 45, 48, 48, 45, 48, 51, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48,
- 48, 45, 48, 50, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 48, 45, 48,
- 49, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 48, 45, 48, 48, 128, 86,
- 69, 82, 84, 73, 67, 65, 76, 128, 86, 69, 82, 83, 73, 67, 76, 69, 128, 86,
- 69, 82, 83, 197, 86, 69, 82, 71, 69, 128, 86, 69, 82, 68, 73, 71, 82, 73,
- 83, 128, 86, 69, 80, 128, 86, 69, 78, 68, 128, 86, 69, 73, 76, 128, 86,
- 69, 72, 73, 67, 76, 69, 128, 86, 69, 72, 128, 86, 69, 200, 86, 69, 69,
- 128, 86, 69, 197, 86, 69, 68, 69, 128, 86, 69, 67, 84, 79, 210, 86, 65,
- 89, 65, 78, 78, 65, 128, 86, 65, 88, 128, 86, 65, 86, 128, 86, 65, 214,
- 86, 65, 85, 128, 86, 65, 84, 72, 89, 128, 86, 65, 84, 128, 86, 65, 83,
- 84, 78, 69, 83, 211, 86, 65, 83, 73, 83, 128, 86, 65, 82, 89, 211, 86,
- 65, 82, 73, 75, 65, 128, 86, 65, 82, 73, 65, 78, 212, 86, 65, 82, 73, 65,
- 128, 86, 65, 82, 73, 193, 86, 65, 82, 69, 73, 65, 201, 86, 65, 82, 69,
- 73, 193, 86, 65, 80, 79, 85, 82, 83, 128, 86, 65, 80, 128, 86, 65, 78,
- 69, 128, 86, 65, 77, 65, 71, 79, 77, 85, 75, 72, 65, 128, 86, 65, 77, 65,
- 71, 79, 77, 85, 75, 72, 193, 86, 65, 76, 76, 69, 89, 128, 86, 65, 73,
- 128, 86, 65, 72, 128, 86, 65, 65, 86, 85, 128, 86, 65, 65, 128, 86, 48,
- 52, 48, 65, 128, 86, 48, 52, 48, 128, 86, 48, 51, 57, 128, 86, 48, 51,
- 56, 128, 86, 48, 51, 55, 65, 128, 86, 48, 51, 55, 128, 86, 48, 51, 54,
- 128, 86, 48, 51, 53, 128, 86, 48, 51, 52, 128, 86, 48, 51, 51, 65, 128,
- 86, 48, 51, 51, 128, 86, 48, 51, 50, 128, 86, 48, 51, 49, 65, 128, 86,
- 48, 51, 49, 128, 86, 48, 51, 48, 65, 128, 86, 48, 51, 48, 128, 86, 48,
- 50, 57, 65, 128, 86, 48, 50, 57, 128, 86, 48, 50, 56, 65, 128, 86, 48,
- 50, 56, 128, 86, 48, 50, 55, 128, 86, 48, 50, 54, 128, 86, 48, 50, 53,
- 128, 86, 48, 50, 52, 128, 86, 48, 50, 51, 65, 128, 86, 48, 50, 51, 128,
- 86, 48, 50, 50, 128, 86, 48, 50, 49, 128, 86, 48, 50, 48, 76, 128, 86,
- 48, 50, 48, 75, 128, 86, 48, 50, 48, 74, 128, 86, 48, 50, 48, 73, 128,
- 86, 48, 50, 48, 72, 128, 86, 48, 50, 48, 71, 128, 86, 48, 50, 48, 70,
- 128, 86, 48, 50, 48, 69, 128, 86, 48, 50, 48, 68, 128, 86, 48, 50, 48,
- 67, 128, 86, 48, 50, 48, 66, 128, 86, 48, 50, 48, 65, 128, 86, 48, 50,
- 48, 128, 86, 48, 49, 57, 128, 86, 48, 49, 56, 128, 86, 48, 49, 55, 128,
- 86, 48, 49, 54, 128, 86, 48, 49, 53, 128, 86, 48, 49, 52, 128, 86, 48,
- 49, 51, 128, 86, 48, 49, 50, 66, 128, 86, 48, 49, 50, 65, 128, 86, 48,
- 49, 50, 128, 86, 48, 49, 49, 67, 128, 86, 48, 49, 49, 66, 128, 86, 48,
- 49, 49, 65, 128, 86, 48, 49, 49, 128, 86, 48, 49, 48, 128, 86, 48, 48,
- 57, 128, 86, 48, 48, 56, 128, 86, 48, 48, 55, 66, 128, 86, 48, 48, 55,
- 65, 128, 86, 48, 48, 55, 128, 86, 48, 48, 54, 128, 86, 48, 48, 53, 128,
- 86, 48, 48, 52, 128, 86, 48, 48, 51, 128, 86, 48, 48, 50, 65, 128, 86,
- 48, 48, 50, 128, 86, 48, 48, 49, 73, 128, 86, 48, 48, 49, 72, 128, 86,
- 48, 48, 49, 71, 128, 86, 48, 48, 49, 70, 128, 86, 48, 48, 49, 69, 128,
- 86, 48, 48, 49, 68, 128, 86, 48, 48, 49, 67, 128, 86, 48, 48, 49, 66,
- 128, 86, 48, 48, 49, 65, 128, 86, 48, 48, 49, 128, 85, 90, 85, 128, 85,
- 90, 51, 128, 85, 90, 179, 85, 89, 65, 78, 78, 65, 128, 85, 89, 128, 85,
- 85, 89, 65, 78, 78, 65, 128, 85, 85, 85, 85, 128, 85, 85, 85, 51, 128,
- 85, 85, 85, 50, 128, 85, 85, 69, 128, 85, 84, 85, 75, 73, 128, 85, 83,
- 83, 85, 51, 128, 85, 83, 83, 85, 128, 85, 83, 72, 88, 128, 85, 83, 72,
- 85, 77, 88, 128, 85, 83, 72, 69, 78, 78, 65, 128, 85, 83, 72, 50, 128,
- 85, 83, 72, 128, 85, 83, 200, 85, 83, 69, 196, 85, 83, 69, 45, 50, 128,
- 85, 83, 69, 45, 49, 128, 85, 83, 69, 128, 85, 83, 197, 85, 82, 85, 218,
- 85, 82, 85, 83, 128, 85, 82, 85, 68, 65, 128, 85, 82, 85, 68, 193, 85,
- 82, 85, 128, 85, 82, 213, 85, 82, 78, 128, 85, 82, 73, 78, 69, 128, 85,
- 82, 73, 51, 128, 85, 82, 73, 128, 85, 82, 65, 78, 85, 83, 128, 85, 82,
- 65, 128, 85, 82, 52, 128, 85, 82, 50, 128, 85, 82, 178, 85, 80, 87, 65,
- 82, 68, 83, 128, 85, 80, 87, 65, 82, 68, 211, 85, 80, 87, 65, 82, 68,
- 128, 85, 80, 87, 65, 82, 196, 85, 80, 84, 85, 82, 78, 128, 85, 80, 83,
- 73, 76, 79, 78, 128, 85, 80, 83, 73, 76, 79, 206, 85, 80, 82, 73, 71, 72,
- 212, 85, 80, 80, 69, 210, 85, 80, 65, 68, 72, 77, 65, 78, 73, 89, 65,
- 128, 85, 80, 45, 80, 79, 73, 78, 84, 73, 78, 199, 85, 79, 78, 128, 85,
- 78, 78, 128, 85, 78, 77, 65, 82, 82, 73, 69, 196, 85, 78, 75, 78, 79, 87,
- 78, 128, 85, 78, 73, 86, 69, 82, 83, 65, 204, 85, 78, 73, 84, 89, 128,
- 85, 78, 73, 84, 128, 85, 78, 73, 212, 85, 78, 73, 79, 78, 128, 85, 78,
- 73, 79, 206, 85, 78, 73, 70, 73, 69, 196, 85, 78, 68, 207, 85, 78, 68,
- 69, 82, 84, 73, 69, 128, 85, 78, 68, 69, 82, 76, 73, 78, 197, 85, 78, 68,
- 69, 82, 68, 79, 84, 128, 85, 78, 68, 69, 82, 66, 65, 82, 128, 85, 78, 68,
- 69, 210, 85, 78, 67, 73, 193, 85, 78, 65, 83, 80, 73, 82, 65, 84, 69, 68,
- 128, 85, 78, 65, 80, 128, 85, 78, 65, 77, 85, 83, 69, 196, 85, 78, 65,
- 128, 85, 206, 85, 77, 85, 77, 128, 85, 77, 85, 205, 85, 77, 66, 82, 69,
- 76, 76, 65, 128, 85, 77, 66, 82, 69, 76, 76, 193, 85, 77, 66, 73, 78,
+ 69, 71, 65, 210, 86, 73, 78, 69, 128, 86, 73, 78, 197, 86, 73, 78, 128,
+ 86, 73, 76, 76, 65, 71, 69, 128, 86, 73, 73, 128, 86, 73, 69, 88, 128,
+ 86, 73, 69, 87, 73, 78, 199, 86, 73, 69, 87, 68, 65, 84, 193, 86, 73, 69,
+ 84, 128, 86, 73, 69, 212, 86, 73, 69, 80, 128, 86, 73, 69, 128, 86, 73,
+ 68, 74, 45, 50, 128, 86, 73, 68, 74, 128, 86, 73, 68, 69, 79, 67, 65, 83,
+ 83, 69, 84, 84, 69, 128, 86, 73, 68, 69, 207, 86, 73, 68, 65, 128, 86,
+ 73, 67, 84, 79, 82, 217, 86, 73, 66, 82, 65, 84, 73, 79, 206, 86, 70, 65,
+ 128, 86, 69, 89, 90, 128, 86, 69, 88, 128, 86, 69, 87, 128, 86, 69, 215,
+ 86, 69, 85, 88, 128, 86, 69, 85, 77, 128, 86, 69, 85, 65, 69, 80, 69, 78,
+ 128, 86, 69, 85, 65, 69, 128, 86, 69, 83, 84, 65, 128, 86, 69, 83, 83,
+ 69, 204, 86, 69, 82, 217, 86, 69, 82, 84, 73, 67, 65, 76, 76, 89, 128,
+ 86, 69, 82, 84, 73, 67, 65, 76, 76, 217, 86, 69, 82, 84, 73, 67, 65, 76,
+ 45, 48, 54, 45, 48, 54, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 54,
+ 45, 48, 53, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 54, 45, 48, 52,
+ 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 54, 45, 48, 51, 128, 86, 69,
+ 82, 84, 73, 67, 65, 76, 45, 48, 54, 45, 48, 50, 128, 86, 69, 82, 84, 73,
+ 67, 65, 76, 45, 48, 54, 45, 48, 49, 128, 86, 69, 82, 84, 73, 67, 65, 76,
+ 45, 48, 54, 45, 48, 48, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 53,
+ 45, 48, 54, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 53, 45, 48, 53,
+ 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 53, 45, 48, 52, 128, 86, 69,
+ 82, 84, 73, 67, 65, 76, 45, 48, 53, 45, 48, 51, 128, 86, 69, 82, 84, 73,
+ 67, 65, 76, 45, 48, 53, 45, 48, 50, 128, 86, 69, 82, 84, 73, 67, 65, 76,
+ 45, 48, 53, 45, 48, 49, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 53,
+ 45, 48, 48, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 52, 45, 48, 54,
+ 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 52, 45, 48, 53, 128, 86, 69,
+ 82, 84, 73, 67, 65, 76, 45, 48, 52, 45, 48, 52, 128, 86, 69, 82, 84, 73,
+ 67, 65, 76, 45, 48, 52, 45, 48, 51, 128, 86, 69, 82, 84, 73, 67, 65, 76,
+ 45, 48, 52, 45, 48, 50, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 52,
+ 45, 48, 49, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 52, 45, 48, 48,
+ 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 51, 45, 48, 54, 128, 86, 69,
+ 82, 84, 73, 67, 65, 76, 45, 48, 51, 45, 48, 53, 128, 86, 69, 82, 84, 73,
+ 67, 65, 76, 45, 48, 51, 45, 48, 52, 128, 86, 69, 82, 84, 73, 67, 65, 76,
+ 45, 48, 51, 45, 48, 51, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 51,
+ 45, 48, 50, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 51, 45, 48, 49,
+ 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 51, 45, 48, 48, 128, 86, 69,
+ 82, 84, 73, 67, 65, 76, 45, 48, 50, 45, 48, 54, 128, 86, 69, 82, 84, 73,
+ 67, 65, 76, 45, 48, 50, 45, 48, 53, 128, 86, 69, 82, 84, 73, 67, 65, 76,
+ 45, 48, 50, 45, 48, 52, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 50,
+ 45, 48, 51, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 50, 45, 48, 50,
+ 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 50, 45, 48, 49, 128, 86, 69,
+ 82, 84, 73, 67, 65, 76, 45, 48, 50, 45, 48, 48, 128, 86, 69, 82, 84, 73,
+ 67, 65, 76, 45, 48, 49, 45, 48, 54, 128, 86, 69, 82, 84, 73, 67, 65, 76,
+ 45, 48, 49, 45, 48, 53, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 49,
+ 45, 48, 52, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 49, 45, 48, 51,
+ 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 49, 45, 48, 50, 128, 86, 69,
+ 82, 84, 73, 67, 65, 76, 45, 48, 49, 45, 48, 49, 128, 86, 69, 82, 84, 73,
+ 67, 65, 76, 45, 48, 49, 45, 48, 48, 128, 86, 69, 82, 84, 73, 67, 65, 76,
+ 45, 48, 48, 45, 48, 54, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 48,
+ 45, 48, 53, 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 48, 45, 48, 52,
+ 128, 86, 69, 82, 84, 73, 67, 65, 76, 45, 48, 48, 45, 48, 51, 128, 86, 69,
+ 82, 84, 73, 67, 65, 76, 45, 48, 48, 45, 48, 50, 128, 86, 69, 82, 84, 73,
+ 67, 65, 76, 45, 48, 48, 45, 48, 49, 128, 86, 69, 82, 84, 73, 67, 65, 76,
+ 45, 48, 48, 45, 48, 48, 128, 86, 69, 82, 84, 73, 67, 65, 76, 128, 86, 69,
+ 82, 83, 73, 67, 76, 69, 128, 86, 69, 82, 83, 197, 86, 69, 82, 71, 69,
+ 128, 86, 69, 82, 68, 73, 71, 82, 73, 83, 128, 86, 69, 82, 128, 86, 69,
+ 80, 128, 86, 69, 78, 68, 128, 86, 69, 73, 76, 128, 86, 69, 72, 73, 67,
+ 76, 69, 128, 86, 69, 72, 128, 86, 69, 200, 86, 69, 69, 128, 86, 69, 197,
+ 86, 69, 68, 69, 128, 86, 69, 67, 84, 79, 210, 86, 65, 89, 65, 78, 78, 65,
+ 128, 86, 65, 88, 128, 86, 65, 86, 128, 86, 65, 214, 86, 65, 85, 128, 86,
+ 65, 84, 72, 89, 128, 86, 65, 84, 128, 86, 65, 83, 84, 78, 69, 83, 211,
+ 86, 65, 83, 73, 83, 128, 86, 65, 82, 89, 211, 86, 65, 82, 73, 75, 65,
+ 128, 86, 65, 82, 73, 65, 78, 84, 128, 86, 65, 82, 73, 65, 78, 212, 86,
+ 65, 82, 73, 65, 128, 86, 65, 82, 73, 193, 86, 65, 82, 69, 73, 65, 201,
+ 86, 65, 82, 69, 73, 193, 86, 65, 80, 79, 85, 82, 83, 128, 86, 65, 80,
+ 128, 86, 65, 78, 69, 128, 86, 65, 77, 65, 71, 79, 77, 85, 75, 72, 65,
+ 128, 86, 65, 77, 65, 71, 79, 77, 85, 75, 72, 193, 86, 65, 76, 76, 69, 89,
+ 128, 86, 65, 74, 128, 86, 65, 73, 128, 86, 65, 72, 128, 86, 65, 200, 86,
+ 65, 65, 86, 85, 128, 86, 65, 65, 128, 86, 48, 52, 48, 65, 128, 86, 48,
+ 52, 48, 128, 86, 48, 51, 57, 128, 86, 48, 51, 56, 128, 86, 48, 51, 55,
+ 65, 128, 86, 48, 51, 55, 128, 86, 48, 51, 54, 128, 86, 48, 51, 53, 128,
+ 86, 48, 51, 52, 128, 86, 48, 51, 51, 65, 128, 86, 48, 51, 51, 128, 86,
+ 48, 51, 50, 128, 86, 48, 51, 49, 65, 128, 86, 48, 51, 49, 128, 86, 48,
+ 51, 48, 65, 128, 86, 48, 51, 48, 128, 86, 48, 50, 57, 65, 128, 86, 48,
+ 50, 57, 128, 86, 48, 50, 56, 65, 128, 86, 48, 50, 56, 128, 86, 48, 50,
+ 55, 128, 86, 48, 50, 54, 128, 86, 48, 50, 53, 128, 86, 48, 50, 52, 128,
+ 86, 48, 50, 51, 65, 128, 86, 48, 50, 51, 128, 86, 48, 50, 50, 128, 86,
+ 48, 50, 49, 128, 86, 48, 50, 48, 76, 128, 86, 48, 50, 48, 75, 128, 86,
+ 48, 50, 48, 74, 128, 86, 48, 50, 48, 73, 128, 86, 48, 50, 48, 72, 128,
+ 86, 48, 50, 48, 71, 128, 86, 48, 50, 48, 70, 128, 86, 48, 50, 48, 69,
+ 128, 86, 48, 50, 48, 68, 128, 86, 48, 50, 48, 67, 128, 86, 48, 50, 48,
+ 66, 128, 86, 48, 50, 48, 65, 128, 86, 48, 50, 48, 128, 86, 48, 49, 57,
+ 128, 86, 48, 49, 56, 128, 86, 48, 49, 55, 128, 86, 48, 49, 54, 128, 86,
+ 48, 49, 53, 128, 86, 48, 49, 52, 128, 86, 48, 49, 51, 128, 86, 48, 49,
+ 50, 66, 128, 86, 48, 49, 50, 65, 128, 86, 48, 49, 50, 128, 86, 48, 49,
+ 49, 67, 128, 86, 48, 49, 49, 66, 128, 86, 48, 49, 49, 65, 128, 86, 48,
+ 49, 49, 128, 86, 48, 49, 48, 128, 86, 48, 48, 57, 128, 86, 48, 48, 56,
+ 128, 86, 48, 48, 55, 66, 128, 86, 48, 48, 55, 65, 128, 86, 48, 48, 55,
+ 128, 86, 48, 48, 54, 128, 86, 48, 48, 53, 128, 86, 48, 48, 52, 128, 86,
+ 48, 48, 51, 128, 86, 48, 48, 50, 65, 128, 86, 48, 48, 50, 128, 86, 48,
+ 48, 49, 73, 128, 86, 48, 48, 49, 72, 128, 86, 48, 48, 49, 71, 128, 86,
+ 48, 48, 49, 70, 128, 86, 48, 48, 49, 69, 128, 86, 48, 48, 49, 68, 128,
+ 86, 48, 48, 49, 67, 128, 86, 48, 48, 49, 66, 128, 86, 48, 48, 49, 65,
+ 128, 86, 48, 48, 49, 128, 85, 90, 85, 128, 85, 90, 51, 128, 85, 90, 179,
+ 85, 89, 65, 78, 78, 65, 128, 85, 89, 128, 85, 87, 85, 128, 85, 85, 89,
+ 65, 78, 78, 65, 128, 85, 85, 85, 85, 128, 85, 85, 85, 51, 128, 85, 85,
+ 85, 50, 128, 85, 85, 69, 128, 85, 84, 85, 75, 73, 128, 85, 83, 83, 85,
+ 51, 128, 85, 83, 83, 85, 128, 85, 83, 72, 88, 128, 85, 83, 72, 85, 77,
+ 88, 128, 85, 83, 72, 69, 78, 78, 65, 128, 85, 83, 72, 50, 128, 85, 83,
+ 72, 128, 85, 83, 200, 85, 83, 69, 196, 85, 83, 69, 45, 50, 128, 85, 83,
+ 69, 45, 49, 128, 85, 83, 69, 128, 85, 83, 197, 85, 82, 85, 218, 85, 82,
+ 85, 83, 128, 85, 82, 85, 68, 65, 128, 85, 82, 85, 68, 193, 85, 82, 85,
+ 128, 85, 82, 213, 85, 82, 78, 128, 85, 82, 73, 78, 69, 128, 85, 82, 73,
+ 51, 128, 85, 82, 73, 128, 85, 82, 65, 78, 85, 83, 128, 85, 82, 65, 128,
+ 85, 82, 52, 128, 85, 82, 50, 128, 85, 82, 178, 85, 80, 87, 65, 82, 68,
+ 83, 128, 85, 80, 87, 65, 82, 68, 128, 85, 80, 87, 65, 82, 196, 85, 80,
+ 84, 85, 82, 78, 128, 85, 80, 83, 73, 76, 79, 78, 128, 85, 80, 83, 73, 76,
+ 79, 206, 85, 80, 83, 73, 68, 69, 45, 68, 79, 87, 206, 85, 80, 82, 73, 71,
+ 72, 212, 85, 80, 80, 69, 82, 128, 85, 80, 80, 69, 210, 85, 80, 65, 68,
+ 72, 77, 65, 78, 73, 89, 65, 128, 85, 80, 45, 80, 79, 73, 78, 84, 73, 78,
+ 199, 85, 79, 78, 128, 85, 78, 78, 128, 85, 78, 77, 65, 82, 82, 73, 69,
+ 196, 85, 78, 75, 78, 79, 87, 78, 128, 85, 78, 75, 128, 85, 78, 73, 86,
+ 69, 82, 83, 65, 204, 85, 78, 73, 84, 89, 128, 85, 78, 73, 84, 128, 85,
+ 78, 73, 212, 85, 78, 73, 79, 78, 128, 85, 78, 73, 79, 206, 85, 78, 73,
+ 70, 73, 69, 196, 85, 78, 73, 67, 79, 82, 206, 85, 78, 68, 207, 85, 78,
+ 68, 69, 82, 84, 73, 69, 128, 85, 78, 68, 69, 82, 76, 73, 78, 197, 85, 78,
+ 68, 69, 82, 68, 79, 84, 128, 85, 78, 68, 69, 82, 66, 65, 82, 128, 85, 78,
+ 68, 69, 82, 128, 85, 78, 68, 69, 210, 85, 78, 67, 73, 193, 85, 78, 67,
+ 69, 82, 84, 65, 73, 78, 84, 217, 85, 78, 65, 83, 80, 73, 82, 65, 84, 69,
+ 68, 128, 85, 78, 65, 80, 128, 85, 78, 65, 77, 85, 83, 69, 196, 85, 78,
+ 65, 128, 85, 206, 85, 77, 85, 77, 128, 85, 77, 85, 205, 85, 77, 66, 82,
+ 69, 76, 76, 65, 128, 85, 77, 66, 82, 69, 76, 76, 193, 85, 77, 66, 73, 78,
128, 85, 75, 85, 128, 85, 75, 82, 65, 73, 78, 73, 65, 206, 85, 75, 65,
82, 65, 128, 85, 75, 65, 82, 193, 85, 75, 128, 85, 73, 76, 76, 69, 65,
78, 78, 128, 85, 73, 71, 72, 85, 210, 85, 71, 65, 82, 73, 84, 73, 195,
@@ -499,505 +521,576 @@ static unsigned char lexicon[] = {
85, 48, 48, 57, 128, 85, 48, 48, 56, 128, 85, 48, 48, 55, 128, 85, 48,
48, 54, 66, 128, 85, 48, 48, 54, 65, 128, 85, 48, 48, 54, 128, 85, 48,
48, 53, 128, 85, 48, 48, 52, 128, 85, 48, 48, 51, 128, 85, 48, 48, 50,
- 128, 85, 48, 48, 49, 128, 85, 45, 73, 45, 73, 128, 85, 45, 69, 79, 45,
- 69, 85, 128, 85, 45, 66, 82, 74, 71, 85, 128, 84, 90, 85, 128, 84, 90,
- 79, 65, 128, 84, 90, 79, 128, 84, 90, 73, 210, 84, 90, 73, 128, 84, 90,
- 69, 69, 128, 84, 90, 69, 128, 84, 90, 65, 65, 128, 84, 90, 65, 128, 84,
- 90, 128, 84, 89, 210, 84, 89, 80, 69, 45, 183, 84, 89, 80, 69, 45, 182,
- 84, 89, 80, 69, 45, 181, 84, 89, 80, 69, 45, 180, 84, 89, 80, 69, 45,
- 179, 84, 89, 80, 69, 45, 178, 84, 89, 80, 69, 45, 177, 84, 89, 80, 197,
- 84, 89, 79, 128, 84, 89, 73, 128, 84, 89, 69, 128, 84, 89, 65, 128, 84,
- 87, 79, 79, 128, 84, 87, 79, 45, 87, 65, 217, 84, 87, 79, 45, 84, 72, 73,
- 82, 84, 89, 128, 84, 87, 79, 45, 76, 73, 78, 197, 84, 87, 79, 45, 72, 69,
- 65, 68, 69, 196, 84, 87, 79, 45, 69, 205, 84, 87, 73, 83, 84, 69, 196,
- 84, 87, 73, 73, 128, 84, 87, 73, 128, 84, 87, 69, 78, 84, 89, 45, 84, 87,
- 79, 128, 84, 87, 69, 78, 84, 89, 45, 84, 72, 82, 69, 69, 128, 84, 87, 69,
- 78, 84, 89, 45, 83, 73, 88, 128, 84, 87, 69, 78, 84, 89, 45, 83, 69, 86,
- 69, 78, 128, 84, 87, 69, 78, 84, 89, 45, 79, 78, 69, 128, 84, 87, 69, 78,
- 84, 89, 45, 78, 73, 78, 69, 128, 84, 87, 69, 78, 84, 89, 45, 70, 79, 85,
- 82, 128, 84, 87, 69, 78, 84, 89, 45, 70, 73, 86, 69, 128, 84, 87, 69, 78,
- 84, 89, 45, 69, 73, 71, 72, 84, 200, 84, 87, 69, 78, 84, 89, 45, 69, 73,
- 71, 72, 84, 128, 84, 87, 69, 78, 84, 89, 128, 84, 87, 69, 78, 84, 217,
- 84, 87, 69, 76, 86, 69, 45, 84, 72, 73, 82, 84, 89, 128, 84, 87, 69, 76,
- 86, 69, 128, 84, 87, 69, 76, 86, 197, 84, 87, 69, 128, 84, 87, 65, 65,
- 128, 84, 87, 65, 128, 84, 86, 82, 73, 68, 79, 128, 84, 86, 73, 77, 65,
- 68, 85, 210, 84, 85, 88, 128, 84, 85, 85, 77, 85, 128, 84, 85, 85, 128,
- 84, 85, 84, 84, 89, 128, 84, 85, 84, 69, 89, 65, 83, 65, 84, 128, 84, 85,
- 84, 128, 84, 85, 82, 88, 128, 84, 85, 82, 85, 128, 84, 85, 82, 84, 76,
- 69, 128, 84, 85, 82, 79, 50, 128, 84, 85, 82, 78, 83, 84, 73, 76, 69,
- 128, 84, 85, 82, 78, 69, 196, 84, 85, 82, 206, 84, 85, 82, 75, 73, 83,
- 200, 84, 85, 82, 66, 65, 78, 128, 84, 85, 82, 128, 84, 85, 80, 128, 84,
- 85, 79, 88, 128, 84, 85, 79, 84, 128, 84, 85, 79, 80, 128, 84, 85, 79,
- 128, 84, 85, 78, 78, 89, 128, 84, 85, 77, 69, 84, 69, 83, 128, 84, 85,
- 77, 65, 69, 128, 84, 85, 77, 128, 84, 85, 76, 73, 80, 128, 84, 85, 75,
- 87, 69, 78, 84, 73, 83, 128, 84, 85, 75, 128, 84, 85, 71, 82, 73, 203,
- 84, 85, 71, 50, 128, 84, 85, 71, 178, 84, 85, 65, 82, 69, 199, 84, 85,
- 65, 69, 80, 128, 84, 85, 65, 69, 128, 84, 213, 84, 84, 85, 85, 128, 84,
- 84, 85, 68, 68, 65, 71, 128, 84, 84, 85, 68, 68, 65, 65, 71, 128, 84, 84,
- 85, 128, 84, 84, 84, 72, 65, 128, 84, 84, 84, 65, 128, 84, 84, 83, 85,
- 128, 84, 84, 83, 79, 128, 84, 84, 83, 73, 128, 84, 84, 83, 69, 69, 128,
- 84, 84, 83, 69, 128, 84, 84, 83, 65, 128, 84, 84, 79, 79, 128, 84, 84,
- 73, 73, 128, 84, 84, 73, 128, 84, 84, 72, 87, 69, 128, 84, 84, 72, 85,
- 128, 84, 84, 72, 79, 79, 128, 84, 84, 72, 79, 128, 84, 84, 72, 73, 128,
- 84, 84, 72, 69, 69, 128, 84, 84, 72, 69, 128, 84, 84, 72, 65, 65, 128,
- 84, 84, 72, 128, 84, 84, 69, 72, 69, 72, 128, 84, 84, 69, 72, 69, 200,
- 84, 84, 69, 72, 128, 84, 84, 69, 200, 84, 84, 69, 69, 128, 84, 84, 65,
- 89, 65, 78, 78, 65, 128, 84, 84, 65, 85, 128, 84, 84, 65, 73, 128, 84,
- 84, 65, 65, 128, 84, 84, 50, 128, 84, 83, 87, 69, 128, 84, 83, 87, 65,
- 128, 84, 83, 86, 128, 84, 83, 83, 69, 128, 84, 83, 83, 65, 128, 84, 83,
- 72, 85, 71, 83, 128, 84, 83, 72, 79, 79, 75, 128, 84, 83, 72, 79, 79,
- 203, 84, 83, 72, 69, 83, 128, 84, 83, 72, 69, 71, 128, 84, 83, 72, 69,
- 199, 84, 83, 72, 69, 128, 84, 83, 72, 65, 128, 84, 83, 69, 82, 69, 128,
- 84, 83, 65, 68, 73, 128, 84, 83, 65, 68, 201, 84, 83, 65, 65, 68, 73, 89,
- 128, 84, 83, 65, 65, 128, 84, 83, 193, 84, 82, 89, 66, 76, 73, 79, 206,
- 84, 82, 85, 84, 72, 128, 84, 82, 85, 78, 75, 128, 84, 82, 85, 78, 67, 65,
- 84, 69, 196, 84, 82, 85, 77, 80, 69, 84, 128, 84, 82, 85, 69, 128, 84,
- 82, 85, 67, 75, 128, 84, 82, 79, 80, 73, 67, 65, 204, 84, 82, 79, 80, 72,
- 89, 128, 84, 82, 79, 77, 73, 75, 79, 83, 89, 78, 65, 71, 77, 65, 128, 84,
- 82, 79, 77, 73, 75, 79, 80, 83, 73, 70, 73, 83, 84, 79, 78, 128, 84, 82,
- 79, 77, 73, 75, 79, 80, 65, 82, 65, 75, 65, 76, 69, 83, 77, 65, 128, 84,
- 82, 79, 77, 73, 75, 79, 78, 128, 84, 82, 79, 77, 73, 75, 79, 206, 84, 82,
- 79, 77, 73, 75, 79, 76, 89, 71, 73, 83, 77, 65, 128, 84, 82, 79, 76, 76,
- 69, 89, 66, 85, 83, 128, 84, 82, 79, 75, 85, 84, 65, 83, 84, 201, 84, 82,
- 79, 69, 90, 69, 78, 73, 65, 206, 84, 82, 73, 85, 77, 80, 72, 128, 84, 82,
- 73, 84, 79, 211, 84, 82, 73, 84, 73, 77, 79, 82, 73, 79, 78, 128, 84, 82,
- 73, 83, 73, 77, 79, 85, 128, 84, 82, 73, 83, 69, 77, 69, 128, 84, 82, 73,
- 80, 79, 68, 128, 84, 82, 73, 80, 76, 73, 128, 84, 82, 73, 80, 76, 197,
- 84, 82, 73, 79, 206, 84, 82, 73, 73, 83, 65, 80, 128, 84, 82, 73, 71, 82,
- 65, 77, 77, 79, 211, 84, 82, 73, 71, 82, 65, 205, 84, 82, 73, 71, 79, 82,
- 71, 79, 78, 128, 84, 82, 73, 70, 79, 78, 73, 65, 83, 128, 84, 82, 73, 70,
- 79, 76, 73, 65, 84, 197, 84, 82, 73, 68, 69, 78, 84, 128, 84, 82, 73, 68,
- 69, 78, 212, 84, 82, 73, 67, 79, 76, 79, 78, 128, 84, 82, 73, 65, 78, 71,
- 85, 76, 65, 210, 84, 82, 73, 65, 78, 71, 76, 69, 45, 82, 79, 85, 78, 196,
- 84, 82, 73, 65, 78, 71, 76, 69, 45, 72, 69, 65, 68, 69, 196, 84, 82, 73,
- 65, 78, 71, 76, 69, 128, 84, 82, 73, 65, 78, 71, 76, 197, 84, 82, 73, 65,
- 128, 84, 82, 73, 128, 84, 82, 69, 83, 73, 76, 76, 79, 128, 84, 82, 69,
- 78, 68, 128, 84, 82, 69, 78, 196, 84, 82, 69, 77, 79, 76, 79, 45, 51,
- 128, 84, 82, 69, 77, 79, 76, 79, 45, 50, 128, 84, 82, 69, 77, 79, 76, 79,
- 45, 49, 128, 84, 82, 69, 69, 128, 84, 82, 69, 197, 84, 82, 69, 65, 68,
- 73, 78, 71, 128, 84, 82, 65, 89, 128, 84, 82, 65, 80, 69, 90, 73, 85, 77,
- 128, 84, 82, 65, 78, 83, 86, 69, 82, 83, 65, 204, 84, 82, 65, 78, 83, 80,
- 79, 83, 73, 84, 73, 79, 206, 84, 82, 65, 78, 83, 77, 73, 212, 84, 82, 65,
- 78, 83, 77, 73, 83, 83, 73, 79, 78, 128, 84, 82, 65, 78, 83, 77, 73, 83,
- 83, 73, 79, 206, 84, 82, 65, 77, 87, 65, 89, 128, 84, 82, 65, 77, 128,
- 84, 82, 65, 205, 84, 82, 65, 73, 78, 128, 84, 82, 65, 73, 206, 84, 82,
- 65, 73, 76, 73, 78, 199, 84, 82, 65, 70, 70, 73, 67, 128, 84, 82, 65, 70,
- 70, 73, 195, 84, 82, 65, 68, 197, 84, 82, 65, 67, 84, 79, 82, 128, 84,
- 82, 65, 67, 75, 128, 84, 82, 128, 84, 79, 88, 128, 84, 79, 87, 69, 82,
- 128, 84, 79, 85, 82, 78, 79, 73, 211, 84, 79, 84, 65, 204, 84, 79, 84,
- 128, 84, 79, 82, 84, 79, 73, 83, 197, 84, 79, 82, 67, 85, 76, 85, 83,
- 128, 84, 79, 82, 67, 85, 76, 85, 211, 84, 79, 82, 67, 72, 128, 84, 79,
- 81, 128, 84, 79, 80, 66, 65, 82, 128, 84, 79, 80, 45, 76, 73, 71, 72, 84,
- 69, 196, 84, 79, 80, 128, 84, 79, 208, 84, 79, 79, 84, 72, 128, 84, 79,
- 79, 78, 128, 84, 79, 78, 79, 83, 128, 84, 79, 78, 71, 85, 69, 128, 84,
- 79, 78, 71, 85, 197, 84, 79, 78, 71, 128, 84, 79, 78, 69, 45, 56, 128,
- 84, 79, 78, 69, 45, 55, 128, 84, 79, 78, 69, 45, 54, 128, 84, 79, 78, 69,
- 45, 53, 128, 84, 79, 78, 69, 45, 52, 128, 84, 79, 78, 69, 45, 51, 128,
- 84, 79, 78, 69, 45, 50, 128, 84, 79, 78, 69, 45, 49, 128, 84, 79, 78, 69,
- 128, 84, 79, 78, 65, 204, 84, 79, 77, 80, 73, 128, 84, 79, 77, 65, 84,
- 79, 128, 84, 79, 76, 79, 78, 71, 128, 84, 79, 75, 89, 207, 84, 79, 73,
- 76, 69, 84, 128, 84, 79, 71, 69, 84, 72, 69, 82, 128, 84, 79, 68, 207,
- 84, 79, 65, 78, 68, 65, 75, 72, 73, 65, 84, 128, 84, 79, 65, 128, 84, 78,
- 128, 84, 76, 86, 128, 84, 76, 85, 128, 84, 76, 79, 128, 84, 76, 73, 128,
- 84, 76, 72, 89, 65, 128, 84, 76, 72, 87, 69, 128, 84, 76, 72, 85, 128,
- 84, 76, 72, 79, 79, 128, 84, 76, 72, 79, 128, 84, 76, 72, 73, 128, 84,
- 76, 72, 69, 69, 128, 84, 76, 72, 69, 128, 84, 76, 72, 65, 128, 84, 76,
- 69, 69, 128, 84, 76, 65, 128, 84, 74, 69, 128, 84, 73, 88, 128, 84, 73,
- 87, 78, 128, 84, 73, 87, 65, 218, 84, 73, 84, 85, 65, 69, 80, 128, 84,
- 73, 84, 76, 79, 128, 84, 73, 84, 193, 84, 73, 84, 128, 84, 73, 82, 89,
- 65, 75, 128, 84, 73, 82, 84, 193, 84, 73, 82, 79, 78, 73, 65, 206, 84,
- 73, 82, 69, 196, 84, 73, 82, 128, 84, 73, 210, 84, 73, 80, 80, 73, 128,
- 84, 73, 80, 69, 72, 65, 128, 84, 73, 80, 128, 84, 73, 208, 84, 73, 78,
- 89, 128, 84, 73, 78, 217, 84, 73, 78, 78, 69, 128, 84, 73, 78, 67, 84,
- 85, 82, 69, 128, 84, 73, 78, 65, 71, 77, 65, 128, 84, 73, 77, 69, 83,
- 128, 84, 73, 77, 69, 210, 84, 73, 77, 69, 128, 84, 73, 76, 68, 197, 84,
- 73, 76, 128, 84, 73, 204, 84, 73, 75, 69, 85, 84, 45, 84, 72, 73, 69, 85,
- 84, 72, 128, 84, 73, 75, 69, 85, 84, 45, 83, 73, 79, 83, 45, 75, 73, 89,
- 69, 79, 75, 128, 84, 73, 75, 69, 85, 84, 45, 83, 73, 79, 83, 128, 84, 73,
- 75, 69, 85, 84, 45, 82, 73, 69, 85, 76, 128, 84, 73, 75, 69, 85, 84, 45,
- 80, 73, 69, 85, 80, 128, 84, 73, 75, 69, 85, 84, 45, 77, 73, 69, 85, 77,
- 128, 84, 73, 75, 69, 85, 84, 45, 75, 73, 89, 69, 79, 75, 128, 84, 73, 75,
- 69, 85, 84, 45, 67, 73, 69, 85, 67, 128, 84, 73, 75, 69, 85, 84, 45, 67,
- 72, 73, 69, 85, 67, 72, 128, 84, 73, 75, 69, 85, 84, 128, 84, 73, 75, 69,
- 85, 212, 84, 73, 71, 72, 84, 76, 89, 45, 67, 76, 79, 83, 69, 196, 84, 73,
- 71, 72, 212, 84, 73, 71, 69, 82, 128, 84, 73, 71, 69, 210, 84, 73, 70,
- 73, 78, 65, 71, 200, 84, 73, 69, 88, 128, 84, 73, 69, 80, 128, 84, 73,
- 197, 84, 73, 67, 75, 69, 84, 128, 84, 73, 67, 75, 128, 84, 73, 67, 203,
- 84, 73, 65, 82, 65, 128, 84, 72, 90, 128, 84, 72, 89, 79, 79, 205, 84,
- 72, 87, 79, 79, 128, 84, 72, 87, 79, 128, 84, 72, 87, 73, 73, 128, 84,
- 72, 87, 73, 128, 84, 72, 87, 69, 69, 128, 84, 72, 87, 65, 65, 128, 84,
- 72, 87, 65, 128, 84, 72, 85, 82, 211, 84, 72, 85, 82, 73, 83, 65, 218,
- 84, 72, 85, 78, 71, 128, 84, 72, 85, 78, 68, 69, 82, 83, 84, 79, 82, 77,
- 128, 84, 72, 85, 78, 68, 69, 82, 128, 84, 72, 85, 78, 68, 69, 210, 84,
- 72, 85, 77, 66, 211, 84, 72, 82, 79, 87, 73, 78, 199, 84, 72, 82, 79, 85,
- 71, 72, 128, 84, 72, 82, 79, 85, 71, 200, 84, 72, 82, 69, 69, 45, 84, 72,
- 73, 82, 84, 89, 128, 84, 72, 82, 69, 69, 45, 80, 69, 82, 45, 69, 205, 84,
- 72, 82, 69, 69, 45, 76, 73, 78, 197, 84, 72, 82, 69, 69, 45, 69, 205, 84,
- 72, 82, 69, 69, 45, 196, 84, 72, 82, 69, 65, 68, 128, 84, 72, 79, 85, 83,
- 65, 78, 68, 211, 84, 72, 79, 85, 83, 65, 78, 68, 128, 84, 72, 79, 85, 83,
- 65, 78, 196, 84, 72, 79, 85, 71, 72, 212, 84, 72, 79, 85, 128, 84, 72,
- 79, 82, 78, 128, 84, 72, 79, 82, 206, 84, 72, 79, 78, 71, 128, 84, 72,
- 79, 65, 128, 84, 72, 207, 84, 72, 73, 85, 84, 72, 128, 84, 72, 73, 84,
- 65, 128, 84, 72, 73, 82, 84, 89, 45, 83, 69, 67, 79, 78, 196, 84, 72, 73,
- 82, 84, 89, 45, 79, 78, 69, 128, 84, 72, 73, 82, 84, 217, 84, 72, 73, 82,
- 84, 69, 69, 78, 128, 84, 72, 73, 82, 84, 69, 69, 206, 84, 72, 73, 82, 68,
- 83, 128, 84, 72, 73, 82, 68, 211, 84, 72, 73, 82, 68, 128, 84, 72, 73,
- 82, 196, 84, 72, 73, 206, 84, 72, 73, 73, 128, 84, 72, 73, 71, 72, 128,
- 84, 72, 73, 69, 85, 84, 200, 84, 72, 69, 89, 128, 84, 72, 69, 84, 72, 69,
- 128, 84, 72, 69, 84, 72, 128, 84, 72, 69, 84, 65, 128, 84, 72, 69, 84,
- 193, 84, 72, 69, 83, 80, 73, 65, 206, 84, 72, 69, 83, 69, 79, 83, 128,
- 84, 72, 69, 83, 69, 79, 211, 84, 72, 69, 211, 84, 72, 69, 82, 77, 79, 68,
- 89, 78, 65, 77, 73, 67, 128, 84, 72, 69, 82, 69, 70, 79, 82, 69, 128, 84,
- 72, 69, 82, 197, 84, 72, 69, 206, 84, 72, 69, 77, 65, 84, 73, 83, 77, 79,
- 211, 84, 72, 69, 77, 65, 128, 84, 72, 69, 77, 193, 84, 72, 69, 72, 128,
- 84, 72, 69, 200, 84, 72, 197, 84, 72, 65, 87, 128, 84, 72, 65, 78, 84,
- 72, 65, 75, 72, 65, 84, 128, 84, 72, 65, 78, 78, 65, 128, 84, 72, 65, 78,
- 128, 84, 72, 65, 206, 84, 72, 65, 76, 128, 84, 72, 65, 204, 84, 72, 65,
- 72, 65, 78, 128, 84, 72, 65, 65, 78, 193, 84, 72, 65, 65, 76, 85, 128,
- 84, 72, 45, 67, 82, 69, 197, 84, 69, 88, 84, 128, 84, 69, 88, 128, 84,
- 69, 86, 73, 82, 128, 84, 69, 85, 84, 69, 85, 88, 128, 84, 69, 85, 84, 69,
- 85, 87, 69, 78, 128, 84, 69, 85, 84, 128, 84, 69, 85, 78, 128, 84, 69,
- 85, 65, 69, 81, 128, 84, 69, 85, 65, 69, 78, 128, 84, 69, 85, 128, 84,
- 69, 84, 82, 65, 83, 73, 77, 79, 85, 128, 84, 69, 84, 82, 65, 83, 69, 77,
- 69, 128, 84, 69, 84, 82, 65, 80, 76, 73, 128, 84, 69, 84, 82, 65, 70, 79,
- 78, 73, 65, 83, 128, 84, 69, 84, 72, 128, 84, 69, 84, 200, 84, 69, 84,
- 65, 82, 84, 79, 211, 84, 69, 84, 65, 82, 84, 73, 77, 79, 82, 73, 79, 78,
- 128, 84, 69, 84, 128, 84, 69, 212, 84, 69, 83, 83, 69, 82, 65, 128, 84,
- 69, 83, 83, 69, 82, 193, 84, 69, 83, 83, 65, 82, 79, 206, 84, 69, 83,
- 200, 84, 69, 82, 77, 73, 78, 65, 84, 79, 82, 128, 84, 69, 80, 128, 84,
- 69, 78, 85, 84, 79, 128, 84, 69, 78, 85, 128, 84, 69, 78, 213, 84, 69,
- 78, 84, 72, 128, 84, 69, 78, 84, 128, 84, 69, 78, 211, 84, 69, 78, 78,
- 73, 211, 84, 69, 78, 71, 197, 84, 69, 78, 45, 84, 72, 73, 82, 84, 89,
- 128, 84, 69, 78, 128, 84, 69, 206, 84, 69, 77, 80, 85, 211, 84, 69, 76,
- 85, 128, 84, 69, 76, 79, 85, 211, 84, 69, 76, 76, 69, 210, 84, 69, 76,
- 73, 83, 72, 193, 84, 69, 76, 69, 86, 73, 83, 73, 79, 78, 128, 84, 69, 76,
- 69, 83, 67, 79, 80, 69, 128, 84, 69, 76, 69, 80, 72, 79, 78, 69, 128, 84,
- 69, 76, 69, 80, 72, 79, 78, 197, 84, 69, 76, 69, 73, 65, 128, 84, 69, 76,
- 69, 71, 82, 65, 80, 200, 84, 69, 73, 87, 83, 128, 84, 69, 71, 69, 72,
- 128, 84, 69, 69, 69, 69, 128, 84, 69, 197, 84, 69, 68, 85, 78, 71, 128,
- 84, 69, 65, 82, 211, 84, 69, 65, 82, 68, 82, 79, 80, 45, 83, 80, 79, 75,
- 69, 196, 84, 69, 65, 82, 68, 82, 79, 80, 45, 83, 72, 65, 78, 75, 69, 196,
- 84, 69, 65, 82, 68, 82, 79, 80, 45, 66, 65, 82, 66, 69, 196, 84, 69, 65,
- 82, 45, 79, 70, 198, 84, 69, 65, 67, 85, 208, 84, 69, 45, 85, 128, 84,
- 69, 45, 50, 128, 84, 67, 72, 69, 72, 69, 72, 128, 84, 67, 72, 69, 72, 69,
- 200, 84, 67, 72, 69, 72, 128, 84, 67, 72, 69, 200, 84, 67, 72, 69, 128,
- 84, 195, 84, 65, 89, 128, 84, 65, 88, 73, 128, 84, 65, 88, 128, 84, 65,
- 87, 69, 76, 76, 69, 77, 69, 212, 84, 65, 87, 65, 128, 84, 65, 87, 128,
- 84, 65, 86, 73, 89, 65, 78, 73, 128, 84, 65, 86, 128, 84, 65, 214, 84,
- 65, 85, 82, 85, 83, 128, 84, 65, 213, 84, 65, 84, 87, 69, 69, 76, 128,
- 84, 65, 84, 87, 69, 69, 204, 84, 65, 84, 84, 79, 79, 69, 196, 84, 65, 84,
+ 128, 85, 48, 48, 49, 128, 85, 45, 83, 72, 65, 80, 69, 196, 85, 45, 73,
+ 45, 73, 128, 85, 45, 69, 79, 45, 69, 85, 128, 85, 45, 66, 82, 74, 71, 85,
+ 128, 84, 90, 85, 128, 84, 90, 79, 65, 128, 84, 90, 79, 128, 84, 90, 73,
+ 210, 84, 90, 73, 128, 84, 90, 69, 69, 128, 84, 90, 69, 128, 84, 90, 65,
+ 65, 128, 84, 90, 65, 128, 84, 90, 128, 84, 89, 210, 84, 89, 80, 69, 45,
+ 183, 84, 89, 80, 69, 45, 54, 128, 84, 89, 80, 69, 45, 182, 84, 89, 80,
+ 69, 45, 53, 128, 84, 89, 80, 69, 45, 181, 84, 89, 80, 69, 45, 52, 128,
+ 84, 89, 80, 69, 45, 180, 84, 89, 80, 69, 45, 51, 128, 84, 89, 80, 69, 45,
+ 179, 84, 89, 80, 69, 45, 178, 84, 89, 80, 69, 45, 49, 45, 50, 128, 84,
+ 89, 80, 69, 45, 177, 84, 89, 80, 197, 84, 89, 79, 128, 84, 89, 73, 128,
+ 84, 89, 69, 128, 84, 89, 65, 89, 128, 84, 89, 65, 128, 84, 88, 87, 86,
+ 128, 84, 88, 87, 214, 84, 88, 72, 69, 69, 202, 84, 87, 79, 79, 128, 84,
+ 87, 79, 45, 87, 65, 217, 84, 87, 79, 45, 84, 72, 73, 82, 84, 89, 128, 84,
+ 87, 79, 45, 76, 73, 78, 197, 84, 87, 79, 45, 72, 69, 65, 68, 69, 196, 84,
+ 87, 79, 45, 69, 205, 84, 87, 79, 45, 67, 73, 82, 67, 76, 197, 84, 87, 73,
+ 83, 84, 73, 78, 71, 128, 84, 87, 73, 83, 84, 69, 196, 84, 87, 73, 73,
+ 128, 84, 87, 73, 128, 84, 87, 69, 78, 84, 89, 45, 84, 87, 79, 128, 84,
+ 87, 69, 78, 84, 89, 45, 84, 72, 82, 69, 69, 128, 84, 87, 69, 78, 84, 89,
+ 45, 83, 73, 88, 128, 84, 87, 69, 78, 84, 89, 45, 83, 69, 86, 69, 78, 128,
+ 84, 87, 69, 78, 84, 89, 45, 79, 78, 69, 128, 84, 87, 69, 78, 84, 89, 45,
+ 78, 73, 78, 69, 128, 84, 87, 69, 78, 84, 89, 45, 70, 79, 85, 82, 128, 84,
+ 87, 69, 78, 84, 89, 45, 70, 73, 86, 69, 128, 84, 87, 69, 78, 84, 89, 45,
+ 69, 73, 71, 72, 84, 200, 84, 87, 69, 78, 84, 89, 45, 69, 73, 71, 72, 84,
+ 128, 84, 87, 69, 78, 84, 89, 128, 84, 87, 69, 78, 84, 217, 84, 87, 69,
+ 76, 86, 69, 45, 84, 72, 73, 82, 84, 89, 128, 84, 87, 69, 76, 86, 69, 128,
+ 84, 87, 69, 76, 86, 197, 84, 87, 69, 76, 70, 84, 72, 83, 128, 84, 87, 69,
+ 76, 70, 84, 72, 128, 84, 87, 69, 128, 84, 87, 65, 65, 128, 84, 87, 65,
+ 128, 84, 86, 82, 73, 68, 79, 128, 84, 86, 73, 77, 65, 68, 85, 210, 84,
+ 85, 88, 128, 84, 85, 85, 77, 85, 128, 84, 85, 85, 128, 84, 85, 84, 84,
+ 89, 128, 84, 85, 84, 69, 89, 65, 83, 65, 84, 128, 84, 85, 84, 128, 84,
+ 85, 82, 88, 128, 84, 85, 82, 85, 128, 84, 85, 82, 84, 76, 69, 128, 84,
+ 85, 82, 79, 50, 128, 84, 85, 82, 78, 83, 84, 73, 76, 69, 128, 84, 85, 82,
+ 78, 69, 196, 84, 85, 82, 206, 84, 85, 82, 75, 73, 83, 200, 84, 85, 82,
+ 75, 73, 195, 84, 85, 82, 75, 69, 89, 128, 84, 85, 82, 66, 65, 78, 128,
+ 84, 85, 82, 128, 84, 85, 80, 128, 84, 85, 79, 88, 128, 84, 85, 79, 84,
+ 128, 84, 85, 79, 80, 128, 84, 85, 79, 128, 84, 85, 78, 78, 89, 128, 84,
+ 85, 77, 69, 84, 69, 83, 128, 84, 85, 77, 65, 69, 128, 84, 85, 77, 128,
+ 84, 85, 205, 84, 85, 76, 73, 80, 128, 84, 85, 75, 87, 69, 78, 84, 73, 83,
+ 128, 84, 85, 75, 128, 84, 85, 71, 82, 73, 203, 84, 85, 71, 50, 128, 84,
+ 85, 71, 178, 84, 85, 66, 128, 84, 85, 65, 82, 69, 199, 84, 85, 65, 69,
+ 80, 128, 84, 85, 65, 69, 128, 84, 213, 84, 84, 85, 85, 128, 84, 84, 85,
+ 68, 68, 65, 71, 128, 84, 84, 85, 68, 68, 65, 65, 71, 128, 84, 84, 85,
+ 128, 84, 84, 84, 72, 65, 128, 84, 84, 84, 65, 128, 84, 84, 83, 85, 128,
+ 84, 84, 83, 79, 128, 84, 84, 83, 73, 128, 84, 84, 83, 69, 69, 128, 84,
+ 84, 83, 69, 128, 84, 84, 83, 65, 128, 84, 84, 79, 79, 128, 84, 84, 73,
+ 73, 128, 84, 84, 73, 128, 84, 84, 72, 87, 69, 128, 84, 84, 72, 85, 128,
+ 84, 84, 72, 79, 79, 128, 84, 84, 72, 79, 128, 84, 84, 72, 73, 128, 84,
+ 84, 72, 69, 69, 128, 84, 84, 72, 69, 128, 84, 84, 72, 65, 65, 128, 84,
+ 84, 72, 128, 84, 84, 69, 72, 69, 72, 128, 84, 84, 69, 72, 69, 200, 84,
+ 84, 69, 72, 128, 84, 84, 69, 200, 84, 84, 69, 69, 128, 84, 84, 65, 89,
+ 65, 78, 78, 65, 128, 84, 84, 65, 85, 128, 84, 84, 65, 73, 128, 84, 84,
+ 65, 65, 128, 84, 84, 50, 128, 84, 83, 87, 69, 128, 84, 83, 87, 66, 128,
+ 84, 83, 87, 65, 128, 84, 83, 86, 128, 84, 83, 83, 69, 128, 84, 83, 83,
+ 65, 128, 84, 83, 79, 214, 84, 83, 73, 85, 128, 84, 83, 72, 85, 71, 83,
+ 128, 84, 83, 72, 79, 79, 75, 128, 84, 83, 72, 79, 79, 203, 84, 83, 72,
+ 79, 79, 74, 128, 84, 83, 72, 69, 83, 128, 84, 83, 72, 69, 71, 128, 84,
+ 83, 72, 69, 199, 84, 83, 72, 69, 69, 74, 128, 84, 83, 72, 69, 128, 84,
+ 83, 72, 65, 194, 84, 83, 72, 65, 128, 84, 83, 69, 82, 69, 128, 84, 83,
+ 69, 69, 66, 128, 84, 83, 65, 68, 73, 128, 84, 83, 65, 68, 201, 84, 83,
+ 65, 66, 128, 84, 83, 65, 65, 68, 73, 89, 128, 84, 83, 65, 65, 128, 84,
+ 83, 193, 84, 82, 89, 66, 76, 73, 79, 206, 84, 82, 85, 84, 72, 128, 84,
+ 82, 85, 78, 75, 128, 84, 82, 85, 78, 67, 65, 84, 69, 196, 84, 82, 85, 77,
+ 80, 69, 84, 128, 84, 82, 85, 77, 80, 45, 57, 128, 84, 82, 85, 77, 80, 45,
+ 56, 128, 84, 82, 85, 77, 80, 45, 55, 128, 84, 82, 85, 77, 80, 45, 54,
+ 128, 84, 82, 85, 77, 80, 45, 53, 128, 84, 82, 85, 77, 80, 45, 52, 128,
+ 84, 82, 85, 77, 80, 45, 51, 128, 84, 82, 85, 77, 80, 45, 50, 49, 128, 84,
+ 82, 85, 77, 80, 45, 50, 48, 128, 84, 82, 85, 77, 80, 45, 50, 128, 84, 82,
+ 85, 77, 80, 45, 49, 57, 128, 84, 82, 85, 77, 80, 45, 49, 56, 128, 84, 82,
+ 85, 77, 80, 45, 49, 55, 128, 84, 82, 85, 77, 80, 45, 49, 54, 128, 84, 82,
+ 85, 77, 80, 45, 49, 53, 128, 84, 82, 85, 77, 80, 45, 49, 52, 128, 84, 82,
+ 85, 77, 80, 45, 49, 51, 128, 84, 82, 85, 77, 80, 45, 49, 50, 128, 84, 82,
+ 85, 77, 80, 45, 49, 49, 128, 84, 82, 85, 77, 80, 45, 49, 48, 128, 84, 82,
+ 85, 77, 80, 45, 49, 128, 84, 82, 85, 69, 128, 84, 82, 85, 67, 75, 128,
+ 84, 82, 79, 80, 73, 67, 65, 204, 84, 82, 79, 80, 72, 89, 128, 84, 82, 79,
+ 77, 73, 75, 79, 83, 89, 78, 65, 71, 77, 65, 128, 84, 82, 79, 77, 73, 75,
+ 79, 80, 83, 73, 70, 73, 83, 84, 79, 78, 128, 84, 82, 79, 77, 73, 75, 79,
+ 80, 65, 82, 65, 75, 65, 76, 69, 83, 77, 65, 128, 84, 82, 79, 77, 73, 75,
+ 79, 78, 128, 84, 82, 79, 77, 73, 75, 79, 206, 84, 82, 79, 77, 73, 75, 79,
+ 76, 89, 71, 73, 83, 77, 65, 128, 84, 82, 79, 76, 76, 69, 89, 66, 85, 83,
+ 128, 84, 82, 79, 75, 85, 84, 65, 83, 84, 201, 84, 82, 79, 69, 90, 69, 78,
+ 73, 65, 206, 84, 82, 73, 85, 77, 80, 72, 128, 84, 82, 73, 84, 79, 211,
+ 84, 82, 73, 84, 73, 77, 79, 82, 73, 79, 78, 128, 84, 82, 73, 83, 73, 77,
+ 79, 85, 128, 84, 82, 73, 83, 69, 77, 69, 128, 84, 82, 73, 80, 79, 68,
+ 128, 84, 82, 73, 80, 76, 73, 128, 84, 82, 73, 80, 76, 69, 128, 84, 82,
+ 73, 80, 76, 197, 84, 82, 73, 79, 206, 84, 82, 73, 76, 76, 73, 79, 78, 83,
+ 128, 84, 82, 73, 73, 83, 65, 80, 128, 84, 82, 73, 71, 82, 65, 77, 77, 79,
+ 211, 84, 82, 73, 71, 82, 65, 205, 84, 82, 73, 71, 79, 82, 71, 79, 78,
+ 128, 84, 82, 73, 70, 79, 78, 73, 65, 83, 128, 84, 82, 73, 70, 79, 76, 73,
+ 65, 84, 197, 84, 82, 73, 68, 69, 78, 84, 128, 84, 82, 73, 68, 69, 78,
+ 212, 84, 82, 73, 67, 79, 76, 79, 78, 128, 84, 82, 73, 65, 78, 71, 85, 76,
+ 65, 210, 84, 82, 73, 65, 78, 71, 76, 69, 45, 82, 79, 85, 78, 196, 84, 82,
+ 73, 65, 78, 71, 76, 69, 45, 72, 69, 65, 68, 69, 196, 84, 82, 73, 65, 78,
+ 71, 76, 69, 128, 84, 82, 73, 65, 78, 71, 76, 197, 84, 82, 73, 65, 128,
+ 84, 82, 73, 128, 84, 82, 69, 83, 73, 76, 76, 79, 128, 84, 82, 69, 78, 68,
+ 128, 84, 82, 69, 78, 196, 84, 82, 69, 77, 79, 76, 79, 45, 51, 128, 84,
+ 82, 69, 77, 79, 76, 79, 45, 50, 128, 84, 82, 69, 77, 79, 76, 79, 45, 49,
+ 128, 84, 82, 69, 69, 128, 84, 82, 69, 197, 84, 82, 69, 65, 68, 73, 78,
+ 71, 128, 84, 82, 65, 89, 128, 84, 82, 65, 86, 69, 76, 45, 87, 65, 76, 76,
+ 80, 76, 65, 78, 197, 84, 82, 65, 86, 69, 76, 45, 70, 76, 79, 79, 82, 80,
+ 76, 65, 78, 197, 84, 82, 65, 80, 69, 90, 73, 85, 77, 128, 84, 82, 65, 78,
+ 83, 86, 69, 82, 83, 65, 204, 84, 82, 65, 78, 83, 80, 79, 83, 73, 84, 73,
+ 79, 206, 84, 82, 65, 78, 83, 77, 73, 212, 84, 82, 65, 78, 83, 77, 73, 83,
+ 83, 73, 79, 78, 128, 84, 82, 65, 78, 83, 77, 73, 83, 83, 73, 79, 206, 84,
+ 82, 65, 77, 87, 65, 89, 128, 84, 82, 65, 77, 128, 84, 82, 65, 205, 84,
+ 82, 65, 73, 78, 128, 84, 82, 65, 73, 206, 84, 82, 65, 73, 76, 73, 78,
+ 199, 84, 82, 65, 70, 70, 73, 67, 128, 84, 82, 65, 70, 70, 73, 195, 84,
+ 82, 65, 68, 197, 84, 82, 65, 67, 84, 79, 82, 128, 84, 82, 65, 67, 75, 66,
+ 65, 76, 76, 128, 84, 82, 65, 67, 75, 128, 84, 82, 65, 128, 84, 82, 128,
+ 84, 79, 88, 128, 84, 79, 87, 69, 82, 128, 84, 79, 87, 65, 82, 68, 211,
+ 84, 79, 86, 128, 84, 79, 85, 82, 78, 79, 73, 211, 84, 79, 85, 67, 72, 84,
+ 79, 78, 197, 84, 79, 85, 67, 72, 73, 78, 199, 84, 79, 85, 67, 72, 69,
+ 211, 84, 79, 85, 67, 200, 84, 79, 84, 65, 204, 84, 79, 84, 128, 84, 79,
+ 83, 128, 84, 79, 82, 84, 79, 73, 83, 197, 84, 79, 82, 83, 79, 45, 87, 65,
+ 76, 76, 80, 76, 65, 78, 197, 84, 79, 82, 83, 79, 45, 70, 76, 79, 79, 82,
+ 80, 76, 65, 78, 197, 84, 79, 82, 83, 79, 128, 84, 79, 82, 78, 65, 68, 79,
+ 128, 84, 79, 82, 67, 85, 76, 85, 83, 128, 84, 79, 82, 67, 85, 76, 85,
+ 211, 84, 79, 82, 67, 72, 128, 84, 79, 81, 128, 84, 79, 80, 66, 65, 82,
+ 128, 84, 79, 80, 45, 76, 73, 71, 72, 84, 69, 196, 84, 79, 80, 128, 84,
+ 79, 208, 84, 79, 79, 84, 72, 128, 84, 79, 79, 78, 128, 84, 79, 78, 79,
+ 83, 128, 84, 79, 78, 71, 85, 69, 128, 84, 79, 78, 71, 85, 197, 84, 79,
+ 78, 71, 128, 84, 79, 78, 69, 45, 56, 128, 84, 79, 78, 69, 45, 55, 128,
+ 84, 79, 78, 69, 45, 54, 128, 84, 79, 78, 69, 45, 53, 128, 84, 79, 78, 69,
+ 45, 52, 128, 84, 79, 78, 69, 45, 51, 128, 84, 79, 78, 69, 45, 50, 128,
+ 84, 79, 78, 69, 45, 49, 128, 84, 79, 78, 69, 128, 84, 79, 78, 65, 204,
+ 84, 79, 77, 80, 73, 128, 84, 79, 77, 65, 84, 79, 128, 84, 79, 76, 79, 78,
+ 71, 128, 84, 79, 75, 89, 207, 84, 79, 73, 76, 69, 84, 128, 84, 79, 71,
+ 69, 84, 72, 69, 82, 128, 84, 79, 68, 207, 84, 79, 65, 78, 68, 65, 75, 72,
+ 73, 65, 84, 128, 84, 79, 65, 128, 84, 78, 128, 84, 76, 86, 128, 84, 76,
+ 85, 128, 84, 76, 79, 128, 84, 76, 73, 128, 84, 76, 72, 89, 65, 128, 84,
+ 76, 72, 87, 69, 128, 84, 76, 72, 85, 128, 84, 76, 72, 79, 79, 128, 84,
+ 76, 72, 79, 128, 84, 76, 72, 73, 128, 84, 76, 72, 69, 69, 128, 84, 76,
+ 72, 69, 128, 84, 76, 72, 65, 128, 84, 76, 69, 69, 128, 84, 76, 65, 128,
+ 84, 74, 69, 128, 84, 73, 88, 128, 84, 73, 87, 82, 128, 84, 73, 87, 78,
+ 128, 84, 73, 87, 65, 218, 84, 73, 84, 85, 65, 69, 80, 128, 84, 73, 84,
+ 76, 79, 128, 84, 73, 84, 76, 207, 84, 73, 84, 193, 84, 73, 84, 128, 84,
+ 73, 82, 89, 65, 75, 128, 84, 73, 82, 84, 193, 84, 73, 82, 79, 78, 73, 65,
+ 206, 84, 73, 82, 72, 85, 84, 193, 84, 73, 82, 69, 196, 84, 73, 82, 128,
+ 84, 73, 210, 84, 73, 80, 80, 73, 128, 84, 73, 80, 69, 72, 65, 128, 84,
+ 73, 80, 128, 84, 73, 208, 84, 73, 78, 89, 128, 84, 73, 78, 217, 84, 73,
+ 78, 78, 69, 128, 84, 73, 78, 67, 84, 85, 82, 69, 128, 84, 73, 78, 65, 71,
+ 77, 65, 128, 84, 73, 77, 69, 83, 128, 84, 73, 77, 69, 210, 84, 73, 77,
+ 69, 128, 84, 73, 76, 84, 73, 78, 71, 128, 84, 73, 76, 84, 73, 78, 199,
+ 84, 73, 76, 84, 128, 84, 73, 76, 69, 83, 128, 84, 73, 76, 68, 69, 128,
+ 84, 73, 76, 68, 197, 84, 73, 76, 128, 84, 73, 204, 84, 73, 75, 69, 85,
+ 84, 45, 84, 72, 73, 69, 85, 84, 72, 128, 84, 73, 75, 69, 85, 84, 45, 83,
+ 73, 79, 83, 45, 75, 73, 89, 69, 79, 75, 128, 84, 73, 75, 69, 85, 84, 45,
+ 83, 73, 79, 83, 128, 84, 73, 75, 69, 85, 84, 45, 82, 73, 69, 85, 76, 128,
+ 84, 73, 75, 69, 85, 84, 45, 80, 73, 69, 85, 80, 128, 84, 73, 75, 69, 85,
+ 84, 45, 77, 73, 69, 85, 77, 128, 84, 73, 75, 69, 85, 84, 45, 75, 73, 89,
+ 69, 79, 75, 128, 84, 73, 75, 69, 85, 84, 45, 67, 73, 69, 85, 67, 128, 84,
+ 73, 75, 69, 85, 84, 45, 67, 72, 73, 69, 85, 67, 72, 128, 84, 73, 75, 69,
+ 85, 84, 128, 84, 73, 75, 69, 85, 212, 84, 73, 71, 72, 84, 76, 89, 45, 67,
+ 76, 79, 83, 69, 196, 84, 73, 71, 72, 212, 84, 73, 71, 69, 82, 128, 84,
+ 73, 71, 69, 210, 84, 73, 70, 73, 78, 65, 71, 200, 84, 73, 69, 88, 128,
+ 84, 73, 69, 80, 128, 84, 73, 197, 84, 73, 67, 75, 69, 84, 83, 128, 84,
+ 73, 67, 75, 69, 84, 128, 84, 73, 67, 75, 128, 84, 73, 67, 203, 84, 73,
+ 65, 82, 65, 128, 84, 73, 50, 128, 84, 72, 90, 128, 84, 72, 89, 79, 79,
+ 205, 84, 72, 87, 79, 79, 128, 84, 72, 87, 79, 128, 84, 72, 87, 73, 73,
+ 128, 84, 72, 87, 73, 128, 84, 72, 87, 69, 69, 128, 84, 72, 87, 65, 65,
+ 128, 84, 72, 87, 65, 128, 84, 72, 85, 82, 211, 84, 72, 85, 82, 73, 83,
+ 65, 218, 84, 72, 85, 78, 71, 128, 84, 72, 85, 78, 68, 69, 82, 83, 84, 79,
+ 82, 77, 128, 84, 72, 85, 78, 68, 69, 82, 128, 84, 72, 85, 78, 68, 69,
+ 210, 84, 72, 85, 77, 66, 211, 84, 72, 85, 77, 66, 128, 84, 72, 82, 79,
+ 87, 73, 78, 199, 84, 72, 82, 79, 85, 71, 72, 128, 84, 72, 82, 79, 85, 71,
+ 200, 84, 72, 82, 69, 69, 45, 84, 72, 73, 82, 84, 89, 128, 84, 72, 82, 69,
+ 69, 45, 81, 85, 65, 82, 84, 69, 210, 84, 72, 82, 69, 69, 45, 80, 69, 82,
+ 45, 69, 205, 84, 72, 82, 69, 69, 45, 76, 73, 78, 197, 84, 72, 82, 69, 69,
+ 45, 69, 205, 84, 72, 82, 69, 69, 45, 196, 84, 72, 82, 69, 69, 45, 67, 73,
+ 82, 67, 76, 197, 84, 72, 82, 69, 65, 68, 128, 84, 72, 79, 85, 83, 65, 78,
+ 68, 83, 128, 84, 72, 79, 85, 83, 65, 78, 68, 211, 84, 72, 79, 85, 83, 65,
+ 78, 68, 128, 84, 72, 79, 85, 83, 65, 78, 196, 84, 72, 79, 85, 71, 72,
+ 212, 84, 72, 79, 85, 128, 84, 72, 79, 82, 78, 128, 84, 72, 79, 82, 206,
+ 84, 72, 79, 78, 71, 128, 84, 72, 79, 77, 128, 84, 72, 79, 74, 128, 84,
+ 72, 79, 65, 128, 84, 72, 207, 84, 72, 73, 85, 84, 72, 128, 84, 72, 73,
+ 84, 65, 128, 84, 72, 73, 82, 84, 89, 45, 83, 69, 67, 79, 78, 196, 84, 72,
+ 73, 82, 84, 89, 45, 79, 78, 69, 128, 84, 72, 73, 82, 84, 217, 84, 72, 73,
+ 82, 84, 69, 69, 78, 128, 84, 72, 73, 82, 84, 69, 69, 206, 84, 72, 73, 82,
+ 68, 83, 128, 84, 72, 73, 82, 68, 211, 84, 72, 73, 82, 68, 45, 83, 84, 65,
+ 71, 197, 84, 72, 73, 82, 68, 128, 84, 72, 73, 82, 196, 84, 72, 73, 78,
+ 75, 73, 78, 199, 84, 72, 73, 73, 128, 84, 72, 73, 71, 72, 128, 84, 72,
+ 73, 69, 85, 84, 200, 84, 72, 73, 67, 203, 84, 72, 73, 65, 66, 128, 84,
+ 72, 69, 89, 128, 84, 72, 69, 84, 72, 69, 128, 84, 72, 69, 84, 72, 128,
+ 84, 72, 69, 84, 65, 128, 84, 72, 69, 84, 193, 84, 72, 69, 83, 80, 73, 65,
+ 206, 84, 72, 69, 83, 69, 79, 83, 128, 84, 72, 69, 83, 69, 79, 211, 84,
+ 72, 69, 211, 84, 72, 69, 82, 77, 79, 77, 69, 84, 69, 82, 128, 84, 72, 69,
+ 82, 77, 79, 68, 89, 78, 65, 77, 73, 67, 128, 84, 72, 69, 82, 69, 70, 79,
+ 82, 69, 128, 84, 72, 69, 82, 197, 84, 72, 69, 206, 84, 72, 69, 77, 65,
+ 84, 73, 83, 77, 79, 211, 84, 72, 69, 77, 65, 128, 84, 72, 69, 77, 193,
+ 84, 72, 69, 72, 128, 84, 72, 69, 200, 84, 72, 69, 65, 128, 84, 72, 197,
+ 84, 72, 65, 87, 128, 84, 72, 65, 78, 84, 72, 65, 75, 72, 65, 84, 128, 84,
+ 72, 65, 78, 78, 65, 128, 84, 72, 65, 78, 128, 84, 72, 65, 206, 84, 72,
+ 65, 77, 69, 68, 72, 128, 84, 72, 65, 76, 128, 84, 72, 65, 204, 84, 72,
+ 65, 74, 128, 84, 72, 65, 201, 84, 72, 65, 72, 65, 78, 128, 84, 72, 65,
+ 65, 78, 193, 84, 72, 65, 65, 76, 85, 128, 84, 72, 45, 67, 82, 69, 197,
+ 84, 69, 88, 84, 128, 84, 69, 88, 212, 84, 69, 88, 128, 84, 69, 86, 73,
+ 82, 128, 84, 69, 85, 84, 69, 85, 88, 128, 84, 69, 85, 84, 69, 85, 87, 69,
+ 78, 128, 84, 69, 85, 84, 128, 84, 69, 85, 78, 128, 84, 69, 85, 65, 69,
+ 81, 128, 84, 69, 85, 65, 69, 78, 128, 84, 69, 85, 128, 84, 69, 84, 82,
+ 65, 83, 73, 77, 79, 85, 128, 84, 69, 84, 82, 65, 83, 69, 77, 69, 128, 84,
+ 69, 84, 82, 65, 80, 76, 73, 128, 84, 69, 84, 82, 65, 71, 82, 65, 205, 84,
+ 69, 84, 82, 65, 70, 79, 78, 73, 65, 83, 128, 84, 69, 84, 72, 128, 84, 69,
+ 84, 200, 84, 69, 84, 65, 82, 84, 79, 211, 84, 69, 84, 65, 82, 84, 73, 77,
+ 79, 82, 73, 79, 78, 128, 84, 69, 84, 128, 84, 69, 212, 84, 69, 83, 83,
+ 69, 82, 65, 128, 84, 69, 83, 83, 69, 82, 193, 84, 69, 83, 83, 65, 82, 79,
+ 206, 84, 69, 83, 200, 84, 69, 82, 77, 73, 78, 65, 84, 79, 82, 128, 84,
+ 69, 80, 128, 84, 69, 78, 85, 84, 79, 128, 84, 69, 78, 85, 128, 84, 69,
+ 78, 213, 84, 69, 78, 84, 72, 128, 84, 69, 78, 84, 128, 84, 69, 78, 83,
+ 69, 128, 84, 69, 78, 83, 197, 84, 69, 78, 83, 128, 84, 69, 78, 211, 84,
+ 69, 78, 78, 73, 211, 84, 69, 78, 71, 197, 84, 69, 78, 45, 84, 72, 73, 82,
+ 84, 89, 128, 84, 69, 78, 128, 84, 69, 206, 84, 69, 77, 80, 85, 211, 84,
+ 69, 76, 85, 128, 84, 69, 76, 79, 85, 211, 84, 69, 76, 76, 69, 210, 84,
+ 69, 76, 73, 83, 72, 193, 84, 69, 76, 69, 86, 73, 83, 73, 79, 78, 128, 84,
+ 69, 76, 69, 83, 67, 79, 80, 69, 128, 84, 69, 76, 69, 80, 72, 79, 78, 69,
+ 128, 84, 69, 76, 69, 80, 72, 79, 78, 197, 84, 69, 76, 69, 73, 65, 128,
+ 84, 69, 76, 69, 71, 82, 65, 80, 200, 84, 69, 75, 128, 84, 69, 73, 87, 83,
+ 128, 84, 69, 71, 69, 72, 128, 84, 69, 69, 84, 72, 128, 84, 69, 69, 84,
+ 200, 84, 69, 69, 78, 83, 128, 84, 69, 69, 69, 69, 128, 84, 69, 197, 84,
+ 69, 68, 85, 78, 71, 128, 84, 69, 65, 82, 211, 84, 69, 65, 82, 68, 82, 79,
+ 80, 45, 83, 80, 79, 75, 69, 196, 84, 69, 65, 82, 68, 82, 79, 80, 45, 83,
+ 72, 65, 78, 75, 69, 196, 84, 69, 65, 82, 68, 82, 79, 80, 45, 66, 65, 82,
+ 66, 69, 196, 84, 69, 65, 82, 45, 79, 70, 198, 84, 69, 65, 67, 85, 208,
+ 84, 69, 45, 85, 128, 84, 69, 45, 50, 128, 84, 67, 72, 69, 72, 69, 72,
+ 128, 84, 67, 72, 69, 72, 69, 200, 84, 67, 72, 69, 72, 128, 84, 67, 72,
+ 69, 200, 84, 67, 72, 69, 128, 84, 195, 84, 65, 89, 128, 84, 65, 88, 73,
+ 128, 84, 65, 88, 128, 84, 65, 87, 69, 76, 76, 69, 77, 69, 212, 84, 65,
+ 87, 65, 128, 84, 65, 87, 128, 84, 65, 86, 73, 89, 65, 78, 73, 128, 84,
+ 65, 86, 128, 84, 65, 214, 84, 65, 85, 82, 85, 83, 128, 84, 65, 85, 77,
+ 128, 84, 65, 213, 84, 65, 84, 87, 69, 69, 76, 128, 84, 65, 84, 87, 69,
+ 69, 204, 84, 65, 84, 84, 79, 79, 69, 196, 84, 65, 84, 128, 84, 65, 83,
128, 84, 65, 82, 85, 78, 71, 128, 84, 65, 82, 84, 65, 82, 45, 50, 128,
- 84, 65, 82, 84, 65, 82, 128, 84, 65, 81, 128, 84, 65, 80, 69, 82, 128,
- 84, 65, 80, 197, 84, 65, 80, 128, 84, 65, 79, 128, 84, 65, 78, 78, 69,
- 196, 84, 65, 78, 71, 69, 82, 73, 78, 69, 128, 84, 65, 78, 199, 84, 65,
- 78, 65, 66, 65, 84, 193, 84, 65, 78, 128, 84, 65, 77, 73, 78, 71, 128,
- 84, 65, 77, 128, 84, 65, 76, 76, 128, 84, 65, 76, 204, 84, 65, 76, 73,
- 78, 71, 128, 84, 65, 76, 73, 78, 199, 84, 65, 76, 69, 78, 84, 83, 128,
- 84, 65, 76, 69, 78, 212, 84, 65, 75, 82, 201, 84, 65, 75, 72, 65, 76, 76,
- 85, 83, 128, 84, 65, 75, 69, 128, 84, 65, 75, 52, 128, 84, 65, 75, 128,
- 84, 65, 73, 83, 89, 79, 85, 128, 84, 65, 73, 76, 76, 69, 83, 211, 84, 65,
- 73, 76, 128, 84, 65, 73, 204, 84, 65, 72, 128, 84, 65, 200, 84, 65, 71,
- 66, 65, 78, 87, 193, 84, 65, 71, 65, 76, 79, 199, 84, 65, 71, 128, 84,
- 65, 69, 206, 84, 65, 67, 75, 128, 84, 65, 67, 203, 84, 65, 66, 85, 76,
- 65, 84, 73, 79, 78, 128, 84, 65, 66, 85, 76, 65, 84, 73, 79, 206, 84, 65,
- 66, 83, 128, 84, 65, 66, 76, 69, 128, 84, 65, 66, 128, 84, 65, 194, 84,
- 65, 65, 83, 72, 65, 69, 128, 84, 65, 65, 81, 128, 84, 65, 65, 77, 128,
- 84, 65, 65, 76, 85, 74, 193, 84, 65, 65, 73, 128, 84, 65, 65, 70, 128,
- 84, 65, 50, 128, 84, 65, 45, 82, 79, 76, 128, 84, 65, 45, 50, 128, 84,
- 48, 51, 54, 128, 84, 48, 51, 53, 128, 84, 48, 51, 52, 128, 84, 48, 51,
- 51, 65, 128, 84, 48, 51, 51, 128, 84, 48, 51, 50, 65, 128, 84, 48, 51,
- 50, 128, 84, 48, 51, 49, 128, 84, 48, 51, 48, 128, 84, 48, 50, 57, 128,
- 84, 48, 50, 56, 128, 84, 48, 50, 55, 128, 84, 48, 50, 54, 128, 84, 48,
- 50, 53, 128, 84, 48, 50, 52, 128, 84, 48, 50, 51, 128, 84, 48, 50, 50,
- 128, 84, 48, 50, 49, 128, 84, 48, 50, 48, 128, 84, 48, 49, 57, 128, 84,
- 48, 49, 56, 128, 84, 48, 49, 55, 128, 84, 48, 49, 54, 65, 128, 84, 48,
- 49, 54, 128, 84, 48, 49, 53, 128, 84, 48, 49, 52, 128, 84, 48, 49, 51,
- 128, 84, 48, 49, 50, 128, 84, 48, 49, 49, 65, 128, 84, 48, 49, 49, 128,
- 84, 48, 49, 48, 128, 84, 48, 48, 57, 65, 128, 84, 48, 48, 57, 128, 84,
- 48, 48, 56, 65, 128, 84, 48, 48, 56, 128, 84, 48, 48, 55, 65, 128, 84,
- 48, 48, 55, 128, 84, 48, 48, 54, 128, 84, 48, 48, 53, 128, 84, 48, 48,
- 52, 128, 84, 48, 48, 51, 65, 128, 84, 48, 48, 51, 128, 84, 48, 48, 50,
- 128, 84, 48, 48, 49, 128, 84, 45, 83, 72, 73, 82, 84, 128, 83, 90, 90,
- 128, 83, 90, 87, 71, 128, 83, 90, 87, 65, 128, 83, 90, 85, 128, 83, 90,
- 79, 128, 83, 90, 73, 128, 83, 90, 69, 69, 128, 83, 90, 69, 128, 83, 90,
- 65, 65, 128, 83, 90, 65, 128, 83, 90, 128, 83, 89, 88, 128, 83, 89, 84,
- 128, 83, 89, 83, 84, 69, 205, 83, 89, 82, 88, 128, 83, 89, 82, 77, 65,
- 84, 73, 75, 73, 128, 83, 89, 82, 77, 65, 128, 83, 89, 82, 73, 78, 71, 69,
- 128, 83, 89, 82, 128, 83, 89, 80, 128, 83, 89, 79, 85, 87, 65, 128, 83,
- 89, 78, 69, 86, 77, 65, 128, 83, 89, 78, 68, 69, 83, 77, 79, 211, 83, 89,
- 78, 67, 72, 82, 79, 78, 79, 85, 211, 83, 89, 78, 65, 71, 77, 193, 83, 89,
- 78, 65, 70, 73, 128, 83, 89, 78, 128, 83, 89, 77, 77, 69, 84, 82, 89,
- 128, 83, 89, 77, 77, 69, 84, 82, 73, 195, 83, 89, 77, 66, 79, 76, 83,
- 128, 83, 89, 77, 66, 79, 76, 45, 57, 128, 83, 89, 77, 66, 79, 76, 45, 56,
- 128, 83, 89, 77, 66, 79, 76, 45, 55, 128, 83, 89, 77, 66, 79, 76, 45, 54,
- 128, 83, 89, 77, 66, 79, 76, 45, 53, 52, 128, 83, 89, 77, 66, 79, 76, 45,
- 53, 51, 128, 83, 89, 77, 66, 79, 76, 45, 53, 50, 128, 83, 89, 77, 66, 79,
- 76, 45, 53, 49, 128, 83, 89, 77, 66, 79, 76, 45, 53, 48, 128, 83, 89, 77,
- 66, 79, 76, 45, 53, 128, 83, 89, 77, 66, 79, 76, 45, 52, 57, 128, 83, 89,
- 77, 66, 79, 76, 45, 52, 56, 128, 83, 89, 77, 66, 79, 76, 45, 52, 55, 128,
- 83, 89, 77, 66, 79, 76, 45, 52, 53, 128, 83, 89, 77, 66, 79, 76, 45, 52,
- 51, 128, 83, 89, 77, 66, 79, 76, 45, 52, 50, 128, 83, 89, 77, 66, 79, 76,
- 45, 52, 48, 128, 83, 89, 77, 66, 79, 76, 45, 52, 128, 83, 89, 77, 66, 79,
- 76, 45, 51, 57, 128, 83, 89, 77, 66, 79, 76, 45, 51, 56, 128, 83, 89, 77,
- 66, 79, 76, 45, 51, 55, 128, 83, 89, 77, 66, 79, 76, 45, 51, 54, 128, 83,
- 89, 77, 66, 79, 76, 45, 51, 50, 128, 83, 89, 77, 66, 79, 76, 45, 51, 48,
- 128, 83, 89, 77, 66, 79, 76, 45, 51, 128, 83, 89, 77, 66, 79, 76, 45, 50,
- 57, 128, 83, 89, 77, 66, 79, 76, 45, 50, 55, 128, 83, 89, 77, 66, 79, 76,
- 45, 50, 54, 128, 83, 89, 77, 66, 79, 76, 45, 50, 53, 128, 83, 89, 77, 66,
- 79, 76, 45, 50, 52, 128, 83, 89, 77, 66, 79, 76, 45, 50, 51, 128, 83, 89,
- 77, 66, 79, 76, 45, 50, 50, 128, 83, 89, 77, 66, 79, 76, 45, 50, 49, 128,
- 83, 89, 77, 66, 79, 76, 45, 50, 48, 128, 83, 89, 77, 66, 79, 76, 45, 50,
- 128, 83, 89, 77, 66, 79, 76, 45, 49, 57, 128, 83, 89, 77, 66, 79, 76, 45,
- 49, 56, 128, 83, 89, 77, 66, 79, 76, 45, 49, 55, 128, 83, 89, 77, 66, 79,
- 76, 45, 49, 54, 128, 83, 89, 77, 66, 79, 76, 45, 49, 53, 128, 83, 89, 77,
- 66, 79, 76, 45, 49, 52, 128, 83, 89, 77, 66, 79, 76, 45, 49, 51, 128, 83,
- 89, 77, 66, 79, 76, 45, 49, 50, 128, 83, 89, 77, 66, 79, 76, 45, 49, 49,
- 128, 83, 89, 77, 66, 79, 76, 45, 49, 48, 128, 83, 89, 77, 66, 79, 76, 45,
- 49, 128, 83, 89, 76, 79, 84, 201, 83, 89, 128, 83, 87, 90, 128, 83, 87,
- 85, 78, 199, 83, 87, 79, 82, 68, 83, 128, 83, 87, 79, 82, 68, 128, 83,
- 87, 79, 79, 128, 83, 87, 79, 128, 83, 87, 73, 82, 204, 83, 87, 73, 77,
- 77, 73, 78, 71, 128, 83, 87, 73, 77, 77, 69, 82, 128, 83, 87, 73, 73,
- 128, 83, 87, 73, 128, 83, 87, 71, 128, 83, 87, 69, 69, 84, 128, 83, 87,
- 69, 69, 212, 83, 87, 69, 65, 84, 128, 83, 87, 69, 65, 212, 83, 87, 65,
- 83, 200, 83, 87, 65, 80, 80, 73, 78, 71, 128, 83, 87, 65, 65, 128, 83,
- 87, 128, 83, 86, 65, 83, 84, 201, 83, 86, 65, 82, 73, 84, 65, 128, 83,
- 86, 65, 82, 73, 84, 193, 83, 85, 88, 128, 83, 85, 85, 128, 83, 85, 84,
- 128, 83, 85, 83, 80, 69, 78, 83, 73, 79, 206, 83, 85, 83, 72, 73, 128,
- 83, 85, 82, 89, 65, 128, 83, 85, 82, 88, 128, 83, 85, 82, 82, 79, 85, 78,
- 68, 128, 83, 85, 82, 82, 79, 85, 78, 196, 83, 85, 82, 70, 69, 82, 128,
- 83, 85, 82, 70, 65, 67, 197, 83, 85, 82, 69, 128, 83, 85, 82, 65, 78, 71,
- 128, 83, 85, 82, 57, 128, 83, 85, 82, 128, 83, 85, 210, 83, 85, 80, 82,
- 65, 76, 73, 78, 69, 65, 210, 83, 85, 80, 69, 82, 86, 73, 83, 69, 128, 83,
- 85, 80, 69, 82, 83, 69, 84, 128, 83, 85, 80, 69, 82, 83, 69, 212, 83, 85,
- 80, 69, 82, 83, 67, 82, 73, 80, 212, 83, 85, 80, 69, 82, 73, 77, 80, 79,
- 83, 69, 196, 83, 85, 80, 69, 82, 70, 73, 88, 69, 196, 83, 85, 80, 69,
- 210, 83, 85, 80, 128, 83, 85, 79, 88, 128, 83, 85, 79, 80, 128, 83, 85,
- 79, 128, 83, 85, 78, 83, 69, 212, 83, 85, 78, 82, 73, 83, 69, 128, 83,
- 85, 78, 82, 73, 83, 197, 83, 85, 78, 71, 76, 65, 83, 83, 69, 83, 128, 83,
- 85, 78, 71, 128, 83, 85, 78, 70, 76, 79, 87, 69, 82, 128, 83, 85, 78,
- 128, 83, 85, 206, 83, 85, 77, 77, 69, 82, 128, 83, 85, 77, 77, 65, 84,
- 73, 79, 78, 128, 83, 85, 77, 77, 65, 84, 73, 79, 206, 83, 85, 77, 65, 83,
- 72, 128, 83, 85, 77, 128, 83, 85, 76, 70, 85, 82, 128, 83, 85, 75, 85,
- 78, 128, 83, 85, 75, 85, 206, 83, 85, 75, 85, 128, 83, 85, 75, 213, 83,
- 85, 73, 84, 65, 66, 76, 69, 128, 83, 85, 73, 84, 128, 83, 85, 72, 85, 82,
- 128, 83, 85, 69, 128, 83, 85, 68, 50, 128, 83, 85, 68, 128, 83, 85, 67,
- 67, 69, 69, 68, 83, 128, 83, 85, 67, 67, 69, 69, 68, 211, 83, 85, 67, 67,
- 69, 69, 68, 128, 83, 85, 67, 67, 69, 69, 196, 83, 85, 66, 85, 78, 73, 84,
- 128, 83, 85, 66, 83, 84, 73, 84, 85, 84, 73, 79, 206, 83, 85, 66, 83, 84,
- 73, 84, 85, 84, 69, 128, 83, 85, 66, 83, 84, 73, 84, 85, 84, 197, 83, 85,
- 66, 83, 69, 84, 128, 83, 85, 66, 83, 69, 212, 83, 85, 66, 83, 67, 82, 73,
- 80, 212, 83, 85, 66, 80, 85, 78, 67, 84, 73, 83, 128, 83, 85, 66, 76, 73,
- 78, 69, 65, 210, 83, 85, 66, 76, 73, 77, 65, 84, 73, 79, 78, 128, 83, 85,
- 66, 76, 73, 77, 65, 84, 69, 45, 51, 128, 83, 85, 66, 76, 73, 77, 65, 84,
- 69, 45, 50, 128, 83, 85, 66, 76, 73, 77, 65, 84, 69, 128, 83, 85, 66, 76,
- 73, 77, 65, 84, 197, 83, 85, 66, 74, 79, 73, 78, 69, 196, 83, 85, 66, 74,
- 69, 67, 84, 128, 83, 85, 66, 73, 84, 79, 128, 83, 85, 66, 71, 82, 79, 85,
- 80, 128, 83, 85, 66, 71, 82, 79, 85, 208, 83, 85, 66, 128, 83, 85, 65,
- 69, 84, 128, 83, 85, 65, 69, 78, 128, 83, 85, 65, 69, 128, 83, 85, 65,
- 128, 83, 213, 83, 84, 88, 128, 83, 84, 87, 65, 128, 83, 84, 85, 68, 89,
- 128, 83, 84, 85, 67, 75, 45, 79, 85, 212, 83, 84, 83, 128, 83, 84, 82,
- 79, 78, 199, 83, 84, 82, 79, 75, 69, 83, 128, 83, 84, 82, 79, 75, 69,
- 211, 83, 84, 82, 79, 75, 69, 45, 57, 128, 83, 84, 82, 79, 75, 69, 45, 56,
- 128, 83, 84, 82, 79, 75, 69, 45, 55, 128, 83, 84, 82, 79, 75, 69, 45, 54,
- 128, 83, 84, 82, 79, 75, 69, 45, 53, 128, 83, 84, 82, 79, 75, 69, 45, 52,
- 128, 83, 84, 82, 79, 75, 69, 45, 51, 128, 83, 84, 82, 79, 75, 69, 45, 50,
- 128, 83, 84, 82, 79, 75, 69, 45, 49, 49, 128, 83, 84, 82, 79, 75, 69, 45,
- 49, 48, 128, 83, 84, 82, 79, 75, 69, 45, 49, 128, 83, 84, 82, 79, 75,
- 197, 83, 84, 82, 73, 80, 69, 128, 83, 84, 82, 73, 78, 71, 128, 83, 84,
- 82, 73, 78, 199, 83, 84, 82, 73, 75, 69, 84, 72, 82, 79, 85, 71, 72, 128,
- 83, 84, 82, 73, 68, 69, 128, 83, 84, 82, 73, 67, 84, 76, 217, 83, 84, 82,
- 69, 84, 67, 72, 69, 196, 83, 84, 82, 69, 83, 211, 83, 84, 82, 69, 78, 71,
- 84, 72, 128, 83, 84, 82, 69, 65, 77, 69, 82, 128, 83, 84, 82, 65, 87, 66,
- 69, 82, 82, 89, 128, 83, 84, 82, 65, 84, 85, 77, 45, 50, 128, 83, 84, 82,
- 65, 84, 85, 77, 128, 83, 84, 82, 65, 84, 85, 205, 83, 84, 82, 65, 84, 73,
- 65, 206, 83, 84, 82, 65, 73, 78, 69, 82, 128, 83, 84, 82, 65, 73, 71, 72,
- 84, 78, 69, 83, 83, 128, 83, 84, 82, 65, 73, 71, 72, 212, 83, 84, 82, 65,
- 73, 70, 128, 83, 84, 82, 65, 71, 71, 73, 83, 77, 65, 84, 65, 128, 83, 84,
- 79, 86, 69, 128, 83, 84, 79, 82, 69, 128, 83, 84, 79, 80, 87, 65, 84, 67,
- 72, 128, 83, 84, 79, 80, 80, 73, 78, 71, 128, 83, 84, 79, 80, 80, 65, 71,
- 69, 128, 83, 84, 79, 80, 128, 83, 84, 79, 208, 83, 84, 79, 78, 69, 128,
- 83, 84, 79, 67, 75, 128, 83, 84, 73, 77, 77, 69, 128, 83, 84, 73, 76,
- 204, 83, 84, 73, 76, 197, 83, 84, 73, 71, 77, 65, 128, 83, 84, 69, 80,
- 128, 83, 84, 69, 77, 128, 83, 84, 69, 65, 77, 73, 78, 199, 83, 84, 69,
- 65, 77, 128, 83, 84, 69, 65, 205, 83, 84, 65, 86, 82, 79, 85, 128, 83,
- 84, 65, 86, 82, 79, 83, 128, 83, 84, 65, 86, 82, 79, 211, 83, 84, 65, 85,
- 82, 79, 83, 128, 83, 84, 65, 84, 85, 197, 83, 84, 65, 84, 73, 79, 78,
- 128, 83, 84, 65, 84, 69, 82, 83, 128, 83, 84, 65, 84, 69, 128, 83, 84,
- 65, 82, 212, 83, 84, 65, 82, 83, 128, 83, 84, 65, 82, 82, 69, 196, 83,
- 84, 65, 82, 75, 128, 83, 84, 65, 82, 128, 83, 84, 65, 210, 83, 84, 65,
- 78, 68, 83, 84, 73, 76, 76, 128, 83, 84, 65, 78, 68, 65, 82, 196, 83, 84,
- 65, 78, 68, 128, 83, 84, 65, 78, 128, 83, 84, 65, 76, 76, 73, 79, 78,
- 128, 83, 84, 65, 70, 70, 128, 83, 84, 65, 70, 198, 83, 84, 65, 67, 67,
- 65, 84, 79, 128, 83, 84, 65, 67, 67, 65, 84, 73, 83, 83, 73, 77, 79, 128,
- 83, 84, 50, 128, 83, 83, 89, 88, 128, 83, 83, 89, 84, 128, 83, 83, 89,
- 82, 88, 128, 83, 83, 89, 82, 128, 83, 83, 89, 80, 128, 83, 83, 89, 128,
- 83, 83, 85, 88, 128, 83, 83, 85, 85, 128, 83, 83, 85, 84, 128, 83, 83,
- 85, 80, 128, 83, 83, 79, 88, 128, 83, 83, 79, 84, 128, 83, 83, 79, 80,
- 128, 83, 83, 79, 79, 128, 83, 83, 79, 128, 83, 83, 73, 88, 128, 83, 83,
- 73, 84, 128, 83, 83, 73, 80, 128, 83, 83, 73, 73, 128, 83, 83, 73, 69,
- 88, 128, 83, 83, 73, 69, 80, 128, 83, 83, 73, 69, 128, 83, 83, 73, 128,
- 83, 83, 72, 69, 128, 83, 83, 69, 88, 128, 83, 83, 69, 80, 128, 83, 83,
- 69, 69, 128, 83, 83, 65, 88, 128, 83, 83, 65, 85, 128, 83, 83, 65, 84,
- 128, 83, 83, 65, 80, 128, 83, 83, 65, 78, 71, 89, 69, 79, 82, 73, 78, 72,
- 73, 69, 85, 72, 128, 83, 83, 65, 78, 71, 84, 73, 75, 69, 85, 84, 45, 80,
- 73, 69, 85, 80, 128, 83, 83, 65, 78, 71, 84, 73, 75, 69, 85, 84, 128, 83,
- 83, 65, 78, 71, 84, 72, 73, 69, 85, 84, 72, 128, 83, 83, 65, 78, 71, 83,
- 73, 79, 83, 45, 84, 73, 75, 69, 85, 84, 128, 83, 83, 65, 78, 71, 83, 73,
- 79, 83, 45, 80, 73, 69, 85, 80, 128, 83, 83, 65, 78, 71, 83, 73, 79, 83,
- 45, 75, 73, 89, 69, 79, 75, 128, 83, 83, 65, 78, 71, 83, 73, 79, 83, 128,
- 83, 83, 65, 78, 71, 82, 73, 69, 85, 76, 45, 75, 72, 73, 69, 85, 75, 72,
- 128, 83, 83, 65, 78, 71, 82, 73, 69, 85, 76, 128, 83, 83, 65, 78, 71, 80,
- 73, 69, 85, 80, 128, 83, 83, 65, 78, 71, 78, 73, 69, 85, 78, 128, 83, 83,
- 65, 78, 71, 77, 73, 69, 85, 77, 128, 83, 83, 65, 78, 71, 75, 73, 89, 69,
- 79, 75, 128, 83, 83, 65, 78, 71, 73, 69, 85, 78, 71, 128, 83, 83, 65, 78,
- 71, 72, 73, 69, 85, 72, 128, 83, 83, 65, 78, 71, 67, 73, 69, 85, 67, 45,
- 72, 73, 69, 85, 72, 128, 83, 83, 65, 78, 71, 67, 73, 69, 85, 67, 128, 83,
- 83, 65, 78, 71, 65, 82, 65, 69, 65, 128, 83, 83, 65, 73, 128, 83, 83, 65,
- 65, 128, 83, 83, 51, 128, 83, 83, 50, 128, 83, 82, 128, 83, 81, 85, 73,
- 83, 200, 83, 81, 85, 73, 82, 82, 69, 204, 83, 81, 85, 73, 71, 71, 76,
- 197, 83, 81, 85, 65, 212, 83, 81, 85, 65, 82, 69, 83, 128, 83, 81, 85,
- 65, 82, 69, 68, 128, 83, 81, 85, 65, 82, 69, 128, 83, 80, 87, 65, 128,
- 83, 80, 85, 78, 71, 211, 83, 80, 82, 79, 85, 84, 128, 83, 80, 82, 73, 78,
- 71, 83, 128, 83, 80, 82, 73, 78, 71, 128, 83, 80, 82, 69, 67, 72, 71, 69,
- 83, 65, 78, 199, 83, 80, 79, 85, 84, 73, 78, 199, 83, 80, 79, 84, 128,
- 83, 80, 79, 79, 78, 128, 83, 80, 76, 73, 84, 84, 73, 78, 199, 83, 80, 76,
- 65, 83, 72, 73, 78, 199, 83, 80, 73, 82, 73, 84, 85, 211, 83, 80, 73, 82,
- 73, 84, 128, 83, 80, 73, 82, 73, 212, 83, 80, 73, 82, 65, 78, 84, 128,
- 83, 80, 73, 82, 65, 76, 128, 83, 80, 73, 82, 65, 204, 83, 80, 73, 68, 69,
- 82, 217, 83, 80, 73, 67, 69, 128, 83, 80, 72, 69, 82, 73, 67, 65, 204,
+ 84, 65, 82, 84, 65, 82, 128, 84, 65, 82, 71, 69, 84, 128, 84, 65, 81,
+ 128, 84, 65, 80, 69, 82, 128, 84, 65, 80, 197, 84, 65, 80, 128, 84, 65,
+ 79, 128, 84, 65, 78, 78, 69, 196, 84, 65, 78, 71, 69, 82, 73, 78, 69,
+ 128, 84, 65, 78, 71, 69, 78, 84, 128, 84, 65, 78, 71, 69, 78, 212, 84,
+ 65, 78, 199, 84, 65, 78, 65, 66, 65, 84, 193, 84, 65, 78, 128, 84, 65,
+ 77, 73, 78, 71, 128, 84, 65, 77, 128, 84, 65, 76, 76, 128, 84, 65, 76,
+ 204, 84, 65, 76, 73, 78, 71, 128, 84, 65, 76, 73, 78, 199, 84, 65, 76,
+ 69, 78, 84, 83, 128, 84, 65, 76, 69, 78, 212, 84, 65, 75, 82, 201, 84,
+ 65, 75, 72, 65, 76, 76, 85, 83, 128, 84, 65, 75, 69, 128, 84, 65, 75, 52,
+ 128, 84, 65, 75, 180, 84, 65, 75, 128, 84, 65, 73, 83, 89, 79, 85, 128,
+ 84, 65, 73, 76, 76, 69, 83, 211, 84, 65, 73, 76, 128, 84, 65, 73, 204,
+ 84, 65, 72, 128, 84, 65, 200, 84, 65, 71, 66, 65, 78, 87, 193, 84, 65,
+ 71, 65, 76, 79, 199, 84, 65, 71, 128, 84, 65, 69, 206, 84, 65, 67, 79,
+ 128, 84, 65, 67, 75, 128, 84, 65, 67, 203, 84, 65, 66, 85, 76, 65, 84,
+ 73, 79, 78, 128, 84, 65, 66, 85, 76, 65, 84, 73, 79, 206, 84, 65, 66, 83,
+ 128, 84, 65, 66, 76, 69, 128, 84, 65, 66, 76, 197, 84, 65, 66, 128, 84,
+ 65, 194, 84, 65, 65, 83, 72, 65, 69, 128, 84, 65, 65, 81, 128, 84, 65,
+ 65, 77, 128, 84, 65, 65, 76, 85, 74, 193, 84, 65, 65, 73, 128, 84, 65,
+ 65, 70, 128, 84, 65, 50, 128, 84, 65, 45, 82, 79, 76, 128, 84, 65, 45,
+ 50, 128, 84, 48, 51, 54, 128, 84, 48, 51, 53, 128, 84, 48, 51, 52, 128,
+ 84, 48, 51, 51, 65, 128, 84, 48, 51, 51, 128, 84, 48, 51, 50, 65, 128,
+ 84, 48, 51, 50, 128, 84, 48, 51, 49, 128, 84, 48, 51, 48, 128, 84, 48,
+ 50, 57, 128, 84, 48, 50, 56, 128, 84, 48, 50, 55, 128, 84, 48, 50, 54,
+ 128, 84, 48, 50, 53, 128, 84, 48, 50, 52, 128, 84, 48, 50, 51, 128, 84,
+ 48, 50, 50, 128, 84, 48, 50, 49, 128, 84, 48, 50, 48, 128, 84, 48, 49,
+ 57, 128, 84, 48, 49, 56, 128, 84, 48, 49, 55, 128, 84, 48, 49, 54, 65,
+ 128, 84, 48, 49, 54, 128, 84, 48, 49, 53, 128, 84, 48, 49, 52, 128, 84,
+ 48, 49, 51, 128, 84, 48, 49, 50, 128, 84, 48, 49, 49, 65, 128, 84, 48,
+ 49, 49, 128, 84, 48, 49, 48, 128, 84, 48, 48, 57, 65, 128, 84, 48, 48,
+ 57, 128, 84, 48, 48, 56, 65, 128, 84, 48, 48, 56, 128, 84, 48, 48, 55,
+ 65, 128, 84, 48, 48, 55, 128, 84, 48, 48, 54, 128, 84, 48, 48, 53, 128,
+ 84, 48, 48, 52, 128, 84, 48, 48, 51, 65, 128, 84, 48, 48, 51, 128, 84,
+ 48, 48, 50, 128, 84, 48, 48, 49, 128, 84, 45, 83, 72, 73, 82, 84, 128,
+ 83, 90, 90, 128, 83, 90, 87, 71, 128, 83, 90, 87, 65, 128, 83, 90, 85,
+ 128, 83, 90, 79, 128, 83, 90, 73, 128, 83, 90, 69, 69, 128, 83, 90, 69,
+ 128, 83, 90, 65, 65, 128, 83, 90, 65, 128, 83, 90, 128, 83, 89, 88, 128,
+ 83, 89, 84, 128, 83, 89, 83, 84, 69, 205, 83, 89, 82, 88, 128, 83, 89,
+ 82, 77, 65, 84, 73, 75, 73, 128, 83, 89, 82, 77, 65, 128, 83, 89, 82, 73,
+ 78, 71, 69, 128, 83, 89, 82, 73, 65, 195, 83, 89, 82, 128, 83, 89, 80,
+ 128, 83, 89, 79, 85, 87, 65, 128, 83, 89, 78, 69, 86, 77, 65, 128, 83,
+ 89, 78, 68, 69, 83, 77, 79, 211, 83, 89, 78, 67, 72, 82, 79, 78, 79, 85,
+ 211, 83, 89, 78, 65, 71, 79, 71, 85, 69, 128, 83, 89, 78, 65, 71, 77,
+ 193, 83, 89, 78, 65, 70, 73, 128, 83, 89, 78, 128, 83, 89, 77, 77, 69,
+ 84, 82, 89, 128, 83, 89, 77, 77, 69, 84, 82, 73, 195, 83, 89, 77, 66, 79,
+ 76, 83, 128, 83, 89, 77, 66, 79, 76, 45, 57, 128, 83, 89, 77, 66, 79, 76,
+ 45, 56, 128, 83, 89, 77, 66, 79, 76, 45, 55, 128, 83, 89, 77, 66, 79, 76,
+ 45, 54, 128, 83, 89, 77, 66, 79, 76, 45, 53, 52, 128, 83, 89, 77, 66, 79,
+ 76, 45, 53, 51, 128, 83, 89, 77, 66, 79, 76, 45, 53, 50, 128, 83, 89, 77,
+ 66, 79, 76, 45, 53, 49, 128, 83, 89, 77, 66, 79, 76, 45, 53, 48, 128, 83,
+ 89, 77, 66, 79, 76, 45, 53, 128, 83, 89, 77, 66, 79, 76, 45, 52, 57, 128,
+ 83, 89, 77, 66, 79, 76, 45, 52, 56, 128, 83, 89, 77, 66, 79, 76, 45, 52,
+ 55, 128, 83, 89, 77, 66, 79, 76, 45, 52, 53, 128, 83, 89, 77, 66, 79, 76,
+ 45, 52, 51, 128, 83, 89, 77, 66, 79, 76, 45, 52, 50, 128, 83, 89, 77, 66,
+ 79, 76, 45, 52, 48, 128, 83, 89, 77, 66, 79, 76, 45, 52, 128, 83, 89, 77,
+ 66, 79, 76, 45, 51, 57, 128, 83, 89, 77, 66, 79, 76, 45, 51, 56, 128, 83,
+ 89, 77, 66, 79, 76, 45, 51, 55, 128, 83, 89, 77, 66, 79, 76, 45, 51, 54,
+ 128, 83, 89, 77, 66, 79, 76, 45, 51, 50, 128, 83, 89, 77, 66, 79, 76, 45,
+ 51, 48, 128, 83, 89, 77, 66, 79, 76, 45, 51, 128, 83, 89, 77, 66, 79, 76,
+ 45, 50, 57, 128, 83, 89, 77, 66, 79, 76, 45, 50, 55, 128, 83, 89, 77, 66,
+ 79, 76, 45, 50, 54, 128, 83, 89, 77, 66, 79, 76, 45, 50, 53, 128, 83, 89,
+ 77, 66, 79, 76, 45, 50, 52, 128, 83, 89, 77, 66, 79, 76, 45, 50, 51, 128,
+ 83, 89, 77, 66, 79, 76, 45, 50, 50, 128, 83, 89, 77, 66, 79, 76, 45, 50,
+ 49, 128, 83, 89, 77, 66, 79, 76, 45, 50, 48, 128, 83, 89, 77, 66, 79, 76,
+ 45, 50, 128, 83, 89, 77, 66, 79, 76, 45, 49, 57, 128, 83, 89, 77, 66, 79,
+ 76, 45, 49, 56, 128, 83, 89, 77, 66, 79, 76, 45, 49, 55, 128, 83, 89, 77,
+ 66, 79, 76, 45, 49, 54, 128, 83, 89, 77, 66, 79, 76, 45, 49, 53, 128, 83,
+ 89, 77, 66, 79, 76, 45, 49, 52, 128, 83, 89, 77, 66, 79, 76, 45, 49, 51,
+ 128, 83, 89, 77, 66, 79, 76, 45, 49, 50, 128, 83, 89, 77, 66, 79, 76, 45,
+ 49, 49, 128, 83, 89, 77, 66, 79, 76, 45, 49, 48, 128, 83, 89, 77, 66, 79,
+ 76, 45, 49, 128, 83, 89, 76, 79, 84, 201, 83, 89, 128, 83, 87, 90, 128,
+ 83, 87, 85, 78, 199, 83, 87, 79, 82, 68, 83, 128, 83, 87, 79, 82, 68,
+ 128, 83, 87, 79, 79, 128, 83, 87, 79, 128, 83, 87, 73, 82, 204, 83, 87,
+ 73, 77, 77, 73, 78, 71, 128, 83, 87, 73, 77, 77, 69, 82, 128, 83, 87, 73,
+ 73, 128, 83, 87, 73, 128, 83, 87, 71, 128, 83, 87, 69, 69, 84, 128, 83,
+ 87, 69, 69, 212, 83, 87, 69, 65, 84, 128, 83, 87, 69, 65, 212, 83, 87,
+ 65, 83, 200, 83, 87, 65, 80, 80, 73, 78, 71, 128, 83, 87, 65, 65, 128,
+ 83, 87, 128, 83, 86, 65, 83, 84, 201, 83, 86, 65, 82, 73, 84, 65, 128,
+ 83, 86, 65, 82, 73, 84, 193, 83, 85, 88, 128, 83, 85, 85, 128, 83, 85,
+ 84, 82, 193, 83, 85, 84, 128, 83, 85, 83, 80, 69, 78, 83, 73, 79, 206,
+ 83, 85, 83, 72, 73, 128, 83, 85, 82, 89, 65, 128, 83, 85, 82, 88, 128,
+ 83, 85, 82, 82, 79, 85, 78, 68, 128, 83, 85, 82, 82, 79, 85, 78, 196, 83,
+ 85, 82, 70, 69, 82, 128, 83, 85, 82, 70, 65, 67, 197, 83, 85, 82, 69,
+ 128, 83, 85, 82, 65, 78, 71, 128, 83, 85, 82, 57, 128, 83, 85, 82, 128,
+ 83, 85, 210, 83, 85, 80, 82, 65, 76, 73, 78, 69, 65, 210, 83, 85, 80, 69,
+ 82, 86, 73, 83, 69, 128, 83, 85, 80, 69, 82, 83, 69, 84, 128, 83, 85, 80,
+ 69, 82, 83, 69, 212, 83, 85, 80, 69, 82, 83, 67, 82, 73, 80, 212, 83, 85,
+ 80, 69, 82, 73, 77, 80, 79, 83, 69, 196, 83, 85, 80, 69, 82, 70, 73, 88,
+ 69, 196, 83, 85, 80, 69, 210, 83, 85, 80, 128, 83, 85, 79, 88, 128, 83,
+ 85, 79, 80, 128, 83, 85, 79, 128, 83, 85, 78, 83, 69, 212, 83, 85, 78,
+ 82, 73, 83, 69, 128, 83, 85, 78, 82, 73, 83, 197, 83, 85, 78, 71, 76, 65,
+ 83, 83, 69, 83, 128, 83, 85, 78, 71, 128, 83, 85, 78, 70, 76, 79, 87, 69,
+ 82, 128, 83, 85, 78, 68, 65, 78, 69, 83, 197, 83, 85, 78, 128, 83, 85,
+ 206, 83, 85, 77, 77, 69, 82, 128, 83, 85, 77, 77, 65, 84, 73, 79, 78,
+ 128, 83, 85, 77, 77, 65, 84, 73, 79, 206, 83, 85, 77, 65, 83, 72, 128,
+ 83, 85, 77, 128, 83, 85, 76, 70, 85, 82, 128, 83, 85, 75, 85, 78, 128,
+ 83, 85, 75, 85, 206, 83, 85, 75, 85, 128, 83, 85, 75, 213, 83, 85, 73,
+ 84, 65, 66, 76, 69, 128, 83, 85, 73, 84, 128, 83, 85, 73, 212, 83, 85,
+ 72, 85, 82, 128, 83, 85, 69, 128, 83, 85, 68, 50, 128, 83, 85, 68, 128,
+ 83, 85, 67, 75, 73, 78, 199, 83, 85, 67, 75, 69, 68, 128, 83, 85, 67,
+ 203, 83, 85, 67, 67, 69, 69, 68, 83, 128, 83, 85, 67, 67, 69, 69, 68,
+ 211, 83, 85, 67, 67, 69, 69, 68, 128, 83, 85, 67, 67, 69, 69, 196, 83,
+ 85, 66, 85, 78, 73, 84, 128, 83, 85, 66, 83, 84, 73, 84, 85, 84, 73, 79,
+ 206, 83, 85, 66, 83, 84, 73, 84, 85, 84, 69, 128, 83, 85, 66, 83, 84, 73,
+ 84, 85, 84, 197, 83, 85, 66, 83, 69, 84, 128, 83, 85, 66, 83, 69, 212,
+ 83, 85, 66, 83, 67, 82, 73, 80, 212, 83, 85, 66, 80, 85, 78, 67, 84, 73,
+ 83, 128, 83, 85, 66, 76, 73, 78, 69, 65, 210, 83, 85, 66, 76, 73, 77, 65,
+ 84, 73, 79, 78, 128, 83, 85, 66, 76, 73, 77, 65, 84, 69, 45, 51, 128, 83,
+ 85, 66, 76, 73, 77, 65, 84, 69, 45, 50, 128, 83, 85, 66, 76, 73, 77, 65,
+ 84, 69, 128, 83, 85, 66, 76, 73, 77, 65, 84, 197, 83, 85, 66, 74, 79, 73,
+ 78, 69, 196, 83, 85, 66, 74, 69, 67, 84, 128, 83, 85, 66, 73, 84, 79,
+ 128, 83, 85, 66, 71, 82, 79, 85, 80, 128, 83, 85, 66, 71, 82, 79, 85,
+ 208, 83, 85, 66, 128, 83, 85, 65, 77, 128, 83, 85, 65, 69, 84, 128, 83,
+ 85, 65, 69, 78, 128, 83, 85, 65, 69, 128, 83, 85, 65, 66, 128, 83, 85,
+ 65, 128, 83, 213, 83, 84, 88, 128, 83, 84, 87, 65, 128, 83, 84, 85, 68,
+ 89, 128, 83, 84, 85, 68, 73, 207, 83, 84, 85, 67, 75, 45, 79, 85, 212,
+ 83, 84, 83, 128, 83, 84, 82, 79, 78, 199, 83, 84, 82, 79, 75, 69, 83,
+ 128, 83, 84, 82, 79, 75, 69, 211, 83, 84, 82, 79, 75, 69, 45, 57, 128,
+ 83, 84, 82, 79, 75, 69, 45, 56, 128, 83, 84, 82, 79, 75, 69, 45, 55, 128,
+ 83, 84, 82, 79, 75, 69, 45, 54, 128, 83, 84, 82, 79, 75, 69, 45, 53, 128,
+ 83, 84, 82, 79, 75, 69, 45, 52, 128, 83, 84, 82, 79, 75, 69, 45, 51, 128,
+ 83, 84, 82, 79, 75, 69, 45, 50, 128, 83, 84, 82, 79, 75, 69, 45, 49, 49,
+ 128, 83, 84, 82, 79, 75, 69, 45, 49, 48, 128, 83, 84, 82, 79, 75, 69, 45,
+ 49, 128, 83, 84, 82, 79, 75, 197, 83, 84, 82, 73, 80, 69, 128, 83, 84,
+ 82, 73, 78, 71, 128, 83, 84, 82, 73, 78, 199, 83, 84, 82, 73, 75, 69, 84,
+ 72, 82, 79, 85, 71, 72, 128, 83, 84, 82, 73, 75, 197, 83, 84, 82, 73, 68,
+ 69, 128, 83, 84, 82, 73, 67, 84, 76, 217, 83, 84, 82, 69, 84, 67, 72, 69,
+ 196, 83, 84, 82, 69, 84, 67, 72, 128, 83, 84, 82, 69, 83, 211, 83, 84,
+ 82, 69, 78, 71, 84, 72, 128, 83, 84, 82, 69, 65, 77, 69, 82, 128, 83, 84,
+ 82, 65, 87, 66, 69, 82, 82, 89, 128, 83, 84, 82, 65, 84, 85, 77, 45, 50,
+ 128, 83, 84, 82, 65, 84, 85, 77, 128, 83, 84, 82, 65, 84, 85, 205, 83,
+ 84, 82, 65, 84, 73, 65, 206, 83, 84, 82, 65, 73, 78, 69, 82, 128, 83, 84,
+ 82, 65, 73, 71, 72, 84, 78, 69, 83, 83, 128, 83, 84, 82, 65, 73, 71, 72,
+ 84, 128, 83, 84, 82, 65, 73, 71, 72, 212, 83, 84, 82, 65, 73, 70, 128,
+ 83, 84, 82, 65, 71, 71, 73, 83, 77, 65, 84, 65, 128, 83, 84, 79, 86, 69,
+ 128, 83, 84, 79, 82, 69, 128, 83, 84, 79, 80, 87, 65, 84, 67, 72, 128,
+ 83, 84, 79, 80, 80, 73, 78, 71, 128, 83, 84, 79, 80, 80, 65, 71, 69, 128,
+ 83, 84, 79, 80, 128, 83, 84, 79, 208, 83, 84, 79, 78, 69, 128, 83, 84,
+ 79, 67, 75, 128, 83, 84, 79, 67, 203, 83, 84, 73, 82, 82, 85, 208, 83,
+ 84, 73, 77, 77, 69, 128, 83, 84, 73, 76, 204, 83, 84, 73, 76, 197, 83,
+ 84, 73, 71, 77, 65, 128, 83, 84, 73, 67, 75, 73, 78, 199, 83, 84, 73, 67,
+ 203, 83, 84, 69, 82, 69, 79, 128, 83, 84, 69, 80, 128, 83, 84, 69, 78,
+ 79, 71, 82, 65, 80, 72, 73, 195, 83, 84, 69, 77, 128, 83, 84, 69, 65, 77,
+ 73, 78, 199, 83, 84, 69, 65, 77, 128, 83, 84, 69, 65, 205, 83, 84, 65,
+ 86, 82, 79, 85, 128, 83, 84, 65, 86, 82, 79, 83, 128, 83, 84, 65, 86, 82,
+ 79, 211, 83, 84, 65, 85, 82, 79, 83, 128, 83, 84, 65, 84, 85, 197, 83,
+ 84, 65, 84, 73, 79, 78, 128, 83, 84, 65, 84, 69, 82, 83, 128, 83, 84, 65,
+ 84, 69, 128, 83, 84, 65, 82, 212, 83, 84, 65, 82, 83, 128, 83, 84, 65,
+ 82, 82, 69, 196, 83, 84, 65, 82, 75, 128, 83, 84, 65, 82, 128, 83, 84,
+ 65, 210, 83, 84, 65, 78, 68, 83, 84, 73, 76, 76, 128, 83, 84, 65, 78, 68,
+ 65, 82, 196, 83, 84, 65, 78, 68, 128, 83, 84, 65, 78, 128, 83, 84, 65,
+ 77, 80, 69, 196, 83, 84, 65, 76, 76, 73, 79, 78, 128, 83, 84, 65, 70, 70,
+ 128, 83, 84, 65, 70, 198, 83, 84, 65, 68, 73, 85, 77, 128, 83, 84, 65,
+ 67, 67, 65, 84, 79, 128, 83, 84, 65, 67, 67, 65, 84, 73, 83, 83, 73, 77,
+ 79, 128, 83, 84, 50, 128, 83, 83, 89, 88, 128, 83, 83, 89, 84, 128, 83,
+ 83, 89, 82, 88, 128, 83, 83, 89, 82, 128, 83, 83, 89, 80, 128, 83, 83,
+ 89, 128, 83, 83, 85, 88, 128, 83, 83, 85, 85, 128, 83, 83, 85, 84, 128,
+ 83, 83, 85, 80, 128, 83, 83, 79, 88, 128, 83, 83, 79, 84, 128, 83, 83,
+ 79, 80, 128, 83, 83, 79, 79, 128, 83, 83, 79, 128, 83, 83, 73, 88, 128,
+ 83, 83, 73, 84, 128, 83, 83, 73, 80, 128, 83, 83, 73, 73, 128, 83, 83,
+ 73, 69, 88, 128, 83, 83, 73, 69, 80, 128, 83, 83, 73, 69, 128, 83, 83,
+ 73, 128, 83, 83, 72, 73, 78, 128, 83, 83, 72, 69, 128, 83, 83, 69, 88,
+ 128, 83, 83, 69, 80, 128, 83, 83, 69, 69, 128, 83, 83, 65, 88, 128, 83,
+ 83, 65, 85, 128, 83, 83, 65, 84, 128, 83, 83, 65, 80, 128, 83, 83, 65,
+ 78, 71, 89, 69, 79, 82, 73, 78, 72, 73, 69, 85, 72, 128, 83, 83, 65, 78,
+ 71, 84, 73, 75, 69, 85, 84, 45, 80, 73, 69, 85, 80, 128, 83, 83, 65, 78,
+ 71, 84, 73, 75, 69, 85, 84, 128, 83, 83, 65, 78, 71, 84, 72, 73, 69, 85,
+ 84, 72, 128, 83, 83, 65, 78, 71, 83, 73, 79, 83, 45, 84, 73, 75, 69, 85,
+ 84, 128, 83, 83, 65, 78, 71, 83, 73, 79, 83, 45, 80, 73, 69, 85, 80, 128,
+ 83, 83, 65, 78, 71, 83, 73, 79, 83, 45, 75, 73, 89, 69, 79, 75, 128, 83,
+ 83, 65, 78, 71, 83, 73, 79, 83, 128, 83, 83, 65, 78, 71, 82, 73, 69, 85,
+ 76, 45, 75, 72, 73, 69, 85, 75, 72, 128, 83, 83, 65, 78, 71, 82, 73, 69,
+ 85, 76, 128, 83, 83, 65, 78, 71, 80, 73, 69, 85, 80, 128, 83, 83, 65, 78,
+ 71, 78, 73, 69, 85, 78, 128, 83, 83, 65, 78, 71, 77, 73, 69, 85, 77, 128,
+ 83, 83, 65, 78, 71, 75, 73, 89, 69, 79, 75, 128, 83, 83, 65, 78, 71, 73,
+ 69, 85, 78, 71, 128, 83, 83, 65, 78, 71, 72, 73, 69, 85, 72, 128, 83, 83,
+ 65, 78, 71, 67, 73, 69, 85, 67, 45, 72, 73, 69, 85, 72, 128, 83, 83, 65,
+ 78, 71, 67, 73, 69, 85, 67, 128, 83, 83, 65, 78, 71, 65, 82, 65, 69, 65,
+ 128, 83, 83, 65, 73, 128, 83, 83, 65, 65, 128, 83, 83, 51, 128, 83, 83,
+ 50, 128, 83, 82, 128, 83, 81, 85, 73, 83, 200, 83, 81, 85, 73, 82, 82,
+ 69, 204, 83, 81, 85, 73, 71, 71, 76, 197, 83, 81, 85, 69, 69, 90, 69, 68,
+ 128, 83, 81, 85, 69, 69, 90, 197, 83, 81, 85, 65, 212, 83, 81, 85, 65,
+ 82, 69, 83, 128, 83, 81, 85, 65, 82, 69, 68, 128, 83, 81, 85, 65, 82, 69,
+ 128, 83, 80, 89, 128, 83, 80, 87, 65, 128, 83, 80, 85, 78, 71, 211, 83,
+ 80, 82, 79, 85, 84, 128, 83, 80, 82, 73, 78, 71, 83, 128, 83, 80, 82, 73,
+ 78, 71, 128, 83, 80, 82, 69, 67, 72, 71, 69, 83, 65, 78, 199, 83, 80, 82,
+ 69, 65, 68, 128, 83, 80, 82, 69, 65, 196, 83, 80, 79, 85, 84, 73, 78,
+ 199, 83, 80, 79, 84, 128, 83, 80, 79, 82, 84, 211, 83, 80, 79, 79, 78,
+ 128, 83, 80, 76, 73, 84, 84, 73, 78, 199, 83, 80, 76, 73, 84, 128, 83,
+ 80, 76, 73, 212, 83, 80, 76, 65, 89, 69, 68, 128, 83, 80, 76, 65, 83, 72,
+ 73, 78, 199, 83, 80, 73, 82, 73, 84, 85, 211, 83, 80, 73, 82, 73, 84,
+ 128, 83, 80, 73, 82, 73, 212, 83, 80, 73, 82, 65, 78, 84, 128, 83, 80,
+ 73, 82, 65, 76, 128, 83, 80, 73, 82, 65, 204, 83, 80, 73, 78, 69, 128,
+ 83, 80, 73, 68, 69, 82, 217, 83, 80, 73, 68, 69, 82, 128, 83, 80, 73, 68,
+ 69, 210, 83, 80, 73, 67, 69, 128, 83, 80, 72, 69, 82, 73, 67, 65, 204,
83, 80, 69, 83, 77, 73, 76, 207, 83, 80, 69, 69, 68, 66, 79, 65, 84, 128,
83, 80, 69, 69, 67, 72, 128, 83, 80, 69, 69, 67, 200, 83, 80, 69, 67, 73,
- 65, 76, 128, 83, 80, 69, 65, 82, 128, 83, 80, 69, 65, 75, 69, 82, 128,
- 83, 80, 69, 65, 75, 69, 210, 83, 80, 69, 65, 75, 45, 78, 79, 45, 69, 86,
- 73, 204, 83, 80, 65, 84, 72, 73, 128, 83, 80, 65, 82, 75, 76, 73, 78,
- 199, 83, 80, 65, 82, 75, 76, 69, 83, 128, 83, 80, 65, 82, 75, 76, 69, 82,
- 128, 83, 80, 65, 82, 75, 76, 69, 128, 83, 80, 65, 71, 72, 69, 84, 84, 73,
- 128, 83, 80, 65, 68, 69, 83, 128, 83, 80, 65, 68, 197, 83, 80, 65, 67,
- 73, 78, 199, 83, 80, 65, 67, 197, 83, 80, 65, 128, 83, 79, 89, 128, 83,
- 79, 87, 73, 76, 207, 83, 79, 87, 128, 83, 79, 85, 84, 72, 69, 82, 206,
- 83, 79, 85, 84, 72, 45, 83, 76, 65, 86, 69, 217, 83, 79, 85, 84, 200, 83,
- 79, 85, 82, 67, 69, 128, 83, 79, 85, 78, 68, 128, 83, 79, 85, 78, 196,
- 83, 79, 85, 78, 65, 80, 128, 83, 79, 85, 128, 83, 79, 83, 128, 83, 79,
- 82, 193, 83, 79, 81, 128, 83, 79, 79, 206, 83, 79, 78, 74, 65, 77, 128,
- 83, 79, 78, 71, 128, 83, 79, 78, 128, 83, 79, 77, 80, 69, 78, 199, 83,
- 79, 77, 128, 83, 79, 76, 73, 68, 85, 83, 128, 83, 79, 76, 73, 68, 85,
- 211, 83, 79, 72, 128, 83, 79, 71, 68, 73, 65, 206, 83, 79, 70, 84, 87,
- 65, 82, 69, 45, 70, 85, 78, 67, 84, 73, 79, 206, 83, 79, 70, 84, 78, 69,
- 83, 83, 128, 83, 79, 70, 212, 83, 79, 198, 83, 79, 67, 73, 69, 84, 89,
- 128, 83, 79, 67, 67, 69, 210, 83, 79, 65, 80, 128, 83, 79, 65, 128, 83,
- 207, 83, 78, 79, 87, 77, 65, 78, 128, 83, 78, 79, 87, 77, 65, 206, 83,
- 78, 79, 87, 70, 76, 65, 75, 69, 128, 83, 78, 79, 87, 66, 79, 65, 82, 68,
- 69, 82, 128, 83, 78, 79, 87, 128, 83, 78, 79, 85, 84, 128, 83, 78, 79,
- 85, 212, 83, 78, 65, 208, 83, 78, 65, 75, 69, 128, 83, 78, 65, 75, 197,
- 83, 78, 65, 73, 76, 128, 83, 78, 193, 83, 77, 79, 75, 73, 78, 199, 83,
- 77, 73, 82, 75, 73, 78, 199, 83, 77, 73, 76, 73, 78, 199, 83, 77, 73, 76,
- 69, 128, 83, 77, 69, 65, 82, 128, 83, 77, 65, 83, 200, 83, 77, 65, 76,
- 76, 69, 210, 83, 77, 65, 76, 76, 128, 83, 76, 85, 82, 128, 83, 76, 79,
- 87, 76, 89, 128, 83, 76, 79, 215, 83, 76, 79, 86, 79, 128, 83, 76, 79,
- 212, 83, 76, 79, 80, 73, 78, 199, 83, 76, 79, 80, 69, 128, 83, 76, 73,
- 78, 71, 128, 83, 76, 73, 68, 73, 78, 71, 128, 83, 76, 73, 67, 69, 128,
- 83, 76, 73, 67, 197, 83, 76, 69, 69, 80, 217, 83, 76, 69, 69, 80, 73, 78,
+ 65, 76, 128, 83, 80, 69, 65, 82, 128, 83, 80, 69, 65, 75, 73, 78, 199,
+ 83, 80, 69, 65, 75, 69, 82, 128, 83, 80, 69, 65, 75, 69, 210, 83, 80, 69,
+ 65, 75, 45, 78, 79, 45, 69, 86, 73, 204, 83, 80, 65, 84, 72, 73, 128, 83,
+ 80, 65, 82, 75, 76, 73, 78, 199, 83, 80, 65, 82, 75, 76, 69, 83, 128, 83,
+ 80, 65, 82, 75, 76, 69, 82, 128, 83, 80, 65, 82, 75, 76, 69, 128, 83, 80,
+ 65, 71, 72, 69, 84, 84, 73, 128, 83, 80, 65, 68, 69, 83, 128, 83, 80, 65,
+ 68, 197, 83, 80, 65, 67, 73, 78, 199, 83, 80, 65, 67, 197, 83, 80, 65,
+ 128, 83, 79, 89, 128, 83, 79, 87, 73, 76, 207, 83, 79, 87, 128, 83, 79,
+ 85, 84, 72, 69, 82, 206, 83, 79, 85, 84, 72, 45, 83, 76, 65, 86, 69, 217,
+ 83, 79, 85, 84, 200, 83, 79, 85, 82, 67, 69, 128, 83, 79, 85, 78, 68,
+ 128, 83, 79, 85, 78, 196, 83, 79, 85, 78, 65, 80, 128, 83, 79, 85, 128,
+ 83, 79, 83, 128, 83, 79, 82, 193, 83, 79, 81, 128, 83, 79, 79, 206, 83,
+ 79, 78, 74, 65, 77, 128, 83, 79, 78, 71, 128, 83, 79, 78, 128, 83, 79,
+ 77, 80, 69, 78, 199, 83, 79, 77, 128, 83, 79, 76, 73, 68, 85, 83, 128,
+ 83, 79, 76, 73, 68, 85, 211, 83, 79, 76, 73, 196, 83, 79, 72, 128, 83,
+ 79, 71, 68, 73, 65, 206, 83, 79, 70, 84, 87, 65, 82, 69, 45, 70, 85, 78,
+ 67, 84, 73, 79, 206, 83, 79, 70, 84, 78, 69, 83, 83, 128, 83, 79, 70,
+ 212, 83, 79, 198, 83, 79, 67, 73, 69, 84, 89, 128, 83, 79, 67, 67, 69,
+ 210, 83, 79, 65, 80, 128, 83, 79, 65, 128, 83, 207, 83, 78, 79, 87, 77,
+ 65, 78, 128, 83, 78, 79, 87, 77, 65, 206, 83, 78, 79, 87, 70, 76, 65, 75,
+ 69, 128, 83, 78, 79, 87, 66, 79, 65, 82, 68, 69, 82, 128, 83, 78, 79, 87,
+ 128, 83, 78, 79, 215, 83, 78, 79, 85, 84, 128, 83, 78, 79, 85, 212, 83,
+ 78, 65, 208, 83, 78, 65, 75, 69, 128, 83, 78, 65, 75, 197, 83, 78, 65,
+ 73, 76, 128, 83, 78, 193, 83, 77, 79, 75, 73, 78, 199, 83, 77, 73, 82,
+ 75, 73, 78, 199, 83, 77, 73, 76, 73, 78, 199, 83, 77, 73, 76, 69, 128,
+ 83, 77, 73, 76, 197, 83, 77, 69, 65, 82, 128, 83, 77, 65, 83, 200, 83,
+ 77, 65, 76, 76, 69, 210, 83, 77, 65, 76, 76, 128, 83, 76, 85, 82, 128,
+ 83, 76, 79, 87, 76, 89, 128, 83, 76, 79, 87, 128, 83, 76, 79, 215, 83,
+ 76, 79, 86, 79, 128, 83, 76, 79, 212, 83, 76, 79, 80, 73, 78, 199, 83,
+ 76, 79, 80, 69, 128, 83, 76, 79, 65, 206, 83, 76, 73, 78, 71, 128, 83,
+ 76, 73, 71, 72, 84, 76, 217, 83, 76, 73, 68, 73, 78, 71, 128, 83, 76, 73,
+ 68, 69, 82, 128, 83, 76, 73, 67, 69, 128, 83, 76, 73, 67, 197, 83, 76,
+ 69, 85, 84, 200, 83, 76, 69, 69, 80, 217, 83, 76, 69, 69, 80, 73, 78,
199, 83, 76, 65, 86, 79, 78, 73, 195, 83, 76, 65, 86, 69, 128, 83, 76,
65, 83, 72, 128, 83, 76, 65, 83, 200, 83, 76, 65, 78, 84, 69, 196, 83,
75, 87, 65, 128, 83, 75, 87, 128, 83, 75, 85, 76, 76, 128, 83, 75, 85,
76, 204, 83, 75, 76, 73, 82, 79, 206, 83, 75, 73, 78, 128, 83, 75, 73,
69, 82, 128, 83, 75, 201, 83, 75, 69, 87, 69, 196, 83, 75, 65, 84, 69,
- 128, 83, 75, 128, 83, 74, 69, 128, 83, 73, 88, 84, 89, 45, 70, 79, 85,
- 82, 84, 200, 83, 73, 88, 84, 89, 128, 83, 73, 88, 84, 217, 83, 73, 88,
- 84, 72, 83, 128, 83, 73, 88, 84, 72, 211, 83, 73, 88, 84, 72, 128, 83,
- 73, 88, 84, 69, 69, 78, 84, 72, 83, 128, 83, 73, 88, 84, 69, 69, 78, 84,
- 72, 128, 83, 73, 88, 84, 69, 69, 78, 84, 200, 83, 73, 88, 84, 69, 69, 78,
- 128, 83, 73, 88, 84, 69, 69, 206, 83, 73, 88, 45, 84, 72, 73, 82, 84, 89,
- 128, 83, 73, 88, 45, 83, 84, 82, 73, 78, 199, 83, 73, 88, 45, 80, 69, 82,
- 45, 69, 205, 83, 73, 88, 45, 76, 73, 78, 197, 83, 73, 216, 83, 73, 84,
- 69, 128, 83, 73, 83, 65, 128, 83, 73, 82, 73, 78, 71, 85, 128, 83, 73,
- 79, 83, 45, 84, 72, 73, 69, 85, 84, 72, 128, 83, 73, 79, 83, 45, 83, 83,
- 65, 78, 71, 83, 73, 79, 83, 128, 83, 73, 79, 83, 45, 82, 73, 69, 85, 76,
- 128, 83, 73, 79, 83, 45, 80, 73, 69, 85, 80, 45, 75, 73, 89, 69, 79, 75,
- 128, 83, 73, 79, 83, 45, 80, 72, 73, 69, 85, 80, 72, 128, 83, 73, 79, 83,
- 45, 80, 65, 78, 83, 73, 79, 83, 128, 83, 73, 79, 83, 45, 78, 73, 69, 85,
- 78, 128, 83, 73, 79, 83, 45, 77, 73, 69, 85, 77, 128, 83, 73, 79, 83, 45,
- 75, 72, 73, 69, 85, 75, 72, 128, 83, 73, 79, 83, 45, 75, 65, 80, 89, 69,
- 79, 85, 78, 80, 73, 69, 85, 80, 128, 83, 73, 79, 83, 45, 73, 69, 85, 78,
- 71, 128, 83, 73, 79, 83, 45, 72, 73, 69, 85, 72, 128, 83, 73, 79, 83, 45,
- 67, 73, 69, 85, 67, 128, 83, 73, 79, 83, 45, 67, 72, 73, 69, 85, 67, 72,
- 128, 83, 73, 79, 211, 83, 73, 78, 75, 73, 78, 71, 128, 83, 73, 78, 71,
- 76, 69, 45, 83, 72, 73, 70, 84, 45, 51, 128, 83, 73, 78, 71, 76, 69, 45,
- 83, 72, 73, 70, 84, 45, 50, 128, 83, 73, 78, 71, 76, 69, 45, 76, 73, 78,
- 197, 83, 73, 78, 71, 76, 69, 128, 83, 73, 78, 71, 76, 197, 83, 73, 78,
- 71, 65, 65, 84, 128, 83, 73, 78, 197, 83, 73, 78, 68, 72, 201, 83, 73,
- 206, 83, 73, 77, 80, 76, 73, 70, 73, 69, 196, 83, 73, 77, 73, 76, 65, 82,
- 128, 83, 73, 77, 73, 76, 65, 210, 83, 73, 77, 65, 78, 83, 73, 211, 83,
- 73, 77, 65, 76, 85, 78, 71, 85, 206, 83, 73, 77, 65, 128, 83, 73, 76, 86,
- 69, 82, 128, 83, 73, 76, 75, 128, 83, 73, 76, 73, 81, 85, 193, 83, 73,
- 76, 72, 79, 85, 69, 84, 84, 69, 128, 83, 73, 76, 72, 79, 85, 69, 84, 84,
- 197, 83, 73, 76, 65, 51, 128, 83, 73, 75, 73, 128, 83, 73, 75, 50, 128,
- 83, 73, 75, 178, 83, 73, 71, 78, 83, 128, 83, 73, 71, 77, 65, 128, 83,
- 73, 71, 77, 193, 83, 73, 71, 69, 204, 83, 73, 71, 52, 128, 83, 73, 71,
- 180, 83, 73, 71, 128, 83, 73, 69, 69, 128, 83, 73, 68, 69, 87, 65, 89,
- 211, 83, 73, 67, 75, 78, 69, 83, 83, 128, 83, 73, 67, 75, 76, 69, 128,
- 83, 73, 66, 197, 83, 201, 83, 72, 89, 88, 128, 83, 72, 89, 84, 128, 83,
- 72, 89, 82, 88, 128, 83, 72, 89, 82, 128, 83, 72, 89, 80, 128, 83, 72,
- 89, 69, 128, 83, 72, 89, 65, 128, 83, 72, 89, 128, 83, 72, 87, 79, 89,
- 128, 83, 72, 87, 79, 79, 128, 83, 72, 87, 79, 128, 83, 72, 87, 73, 73,
- 128, 83, 72, 87, 73, 128, 83, 72, 87, 69, 128, 83, 72, 87, 65, 65, 128,
- 83, 72, 87, 65, 128, 83, 72, 85, 88, 128, 83, 72, 85, 85, 128, 83, 72,
- 85, 84, 128, 83, 72, 85, 82, 88, 128, 83, 72, 85, 82, 128, 83, 72, 85,
- 80, 128, 83, 72, 85, 79, 88, 128, 83, 72, 85, 79, 80, 128, 83, 72, 85,
- 79, 128, 83, 72, 85, 77, 128, 83, 72, 85, 70, 70, 76, 197, 83, 72, 85,
+ 128, 83, 75, 128, 83, 74, 69, 128, 83, 73, 90, 197, 83, 73, 88, 84, 89,
+ 45, 70, 79, 85, 82, 84, 200, 83, 73, 88, 84, 89, 128, 83, 73, 88, 84,
+ 217, 83, 73, 88, 84, 72, 83, 128, 83, 73, 88, 84, 72, 211, 83, 73, 88,
+ 84, 72, 128, 83, 73, 88, 84, 69, 69, 78, 84, 72, 83, 128, 83, 73, 88, 84,
+ 69, 69, 78, 84, 72, 128, 83, 73, 88, 84, 69, 69, 78, 84, 200, 83, 73, 88,
+ 84, 69, 69, 78, 128, 83, 73, 88, 84, 69, 69, 206, 83, 73, 88, 45, 84, 72,
+ 73, 82, 84, 89, 128, 83, 73, 88, 45, 83, 84, 82, 73, 78, 199, 83, 73, 88,
+ 45, 80, 69, 82, 45, 69, 205, 83, 73, 88, 45, 76, 73, 78, 197, 83, 73,
+ 216, 83, 73, 84, 69, 128, 83, 73, 83, 65, 128, 83, 73, 82, 73, 78, 71,
+ 85, 128, 83, 73, 79, 83, 45, 84, 72, 73, 69, 85, 84, 72, 128, 83, 73, 79,
+ 83, 45, 83, 83, 65, 78, 71, 83, 73, 79, 83, 128, 83, 73, 79, 83, 45, 82,
+ 73, 69, 85, 76, 128, 83, 73, 79, 83, 45, 80, 73, 69, 85, 80, 45, 75, 73,
+ 89, 69, 79, 75, 128, 83, 73, 79, 83, 45, 80, 72, 73, 69, 85, 80, 72, 128,
+ 83, 73, 79, 83, 45, 80, 65, 78, 83, 73, 79, 83, 128, 83, 73, 79, 83, 45,
+ 78, 73, 69, 85, 78, 128, 83, 73, 79, 83, 45, 77, 73, 69, 85, 77, 128, 83,
+ 73, 79, 83, 45, 75, 72, 73, 69, 85, 75, 72, 128, 83, 73, 79, 83, 45, 75,
+ 65, 80, 89, 69, 79, 85, 78, 80, 73, 69, 85, 80, 128, 83, 73, 79, 83, 45,
+ 73, 69, 85, 78, 71, 128, 83, 73, 79, 83, 45, 72, 73, 69, 85, 72, 128, 83,
+ 73, 79, 83, 45, 67, 73, 69, 85, 67, 128, 83, 73, 79, 83, 45, 67, 72, 73,
+ 69, 85, 67, 72, 128, 83, 73, 79, 211, 83, 73, 78, 85, 83, 79, 73, 196,
+ 83, 73, 78, 79, 76, 79, 71, 73, 67, 65, 204, 83, 73, 78, 75, 73, 78, 71,
+ 128, 83, 73, 78, 71, 76, 69, 45, 83, 72, 73, 70, 84, 45, 51, 128, 83, 73,
+ 78, 71, 76, 69, 45, 83, 72, 73, 70, 84, 45, 50, 128, 83, 73, 78, 71, 76,
+ 69, 45, 76, 73, 78, 197, 83, 73, 78, 71, 76, 69, 128, 83, 73, 78, 71, 76,
+ 197, 83, 73, 78, 71, 65, 65, 84, 128, 83, 73, 78, 197, 83, 73, 78, 68,
+ 72, 201, 83, 73, 206, 83, 73, 77, 85, 76, 84, 65, 78, 69, 79, 85, 83,
+ 128, 83, 73, 77, 85, 76, 84, 65, 78, 69, 79, 85, 211, 83, 73, 77, 80, 76,
+ 73, 70, 73, 69, 196, 83, 73, 77, 73, 76, 65, 82, 128, 83, 73, 77, 73, 76,
+ 65, 210, 83, 73, 77, 65, 78, 83, 73, 211, 83, 73, 77, 65, 76, 85, 78, 71,
+ 85, 206, 83, 73, 77, 65, 128, 83, 73, 76, 86, 69, 82, 128, 83, 73, 76,
+ 75, 128, 83, 73, 76, 73, 81, 85, 193, 83, 73, 76, 72, 79, 85, 69, 84, 84,
+ 69, 128, 83, 73, 76, 72, 79, 85, 69, 84, 84, 197, 83, 73, 76, 65, 51,
+ 128, 83, 73, 75, 73, 128, 83, 73, 75, 50, 128, 83, 73, 75, 178, 83, 73,
+ 71, 78, 83, 128, 83, 73, 71, 77, 65, 128, 83, 73, 71, 77, 193, 83, 73,
+ 71, 69, 204, 83, 73, 71, 52, 128, 83, 73, 71, 180, 83, 73, 71, 128, 83,
+ 73, 69, 69, 128, 83, 73, 68, 69, 87, 65, 89, 211, 83, 73, 68, 69, 128,
+ 83, 73, 68, 197, 83, 73, 68, 68, 72, 65, 77, 128, 83, 73, 67, 75, 78, 69,
+ 83, 83, 128, 83, 73, 67, 75, 76, 69, 128, 83, 73, 66, 197, 83, 73, 65,
+ 128, 83, 201, 83, 72, 89, 88, 128, 83, 72, 89, 84, 128, 83, 72, 89, 82,
+ 88, 128, 83, 72, 89, 82, 128, 83, 72, 89, 80, 128, 83, 72, 89, 69, 128,
+ 83, 72, 89, 65, 128, 83, 72, 89, 128, 83, 72, 87, 79, 89, 128, 83, 72,
+ 87, 79, 79, 128, 83, 72, 87, 79, 128, 83, 72, 87, 73, 73, 128, 83, 72,
+ 87, 73, 128, 83, 72, 87, 69, 128, 83, 72, 87, 197, 83, 72, 87, 65, 65,
+ 128, 83, 72, 87, 65, 128, 83, 72, 85, 88, 128, 83, 72, 85, 85, 128, 83,
+ 72, 85, 84, 84, 76, 69, 67, 79, 67, 75, 128, 83, 72, 85, 84, 128, 83, 72,
+ 85, 82, 88, 128, 83, 72, 85, 82, 128, 83, 72, 85, 80, 128, 83, 72, 85,
+ 79, 88, 128, 83, 72, 85, 79, 80, 128, 83, 72, 85, 79, 128, 83, 72, 85,
+ 77, 128, 83, 72, 85, 76, 128, 83, 72, 85, 70, 70, 76, 197, 83, 72, 85,
69, 81, 128, 83, 72, 85, 69, 78, 83, 72, 85, 69, 84, 128, 83, 72, 85, 66,
85, 82, 128, 83, 72, 85, 50, 128, 83, 72, 85, 178, 83, 72, 85, 128, 83,
72, 213, 83, 72, 84, 65, 80, 73, 67, 128, 83, 72, 84, 65, 128, 83, 72,
82, 73, 78, 69, 128, 83, 72, 82, 73, 77, 80, 128, 83, 72, 82, 73, 73,
- 128, 83, 72, 79, 89, 128, 83, 72, 79, 88, 128, 83, 72, 79, 87, 69, 82,
- 128, 83, 72, 79, 85, 76, 68, 69, 82, 69, 196, 83, 72, 79, 84, 128, 83,
- 72, 79, 82, 84, 83, 128, 83, 72, 79, 82, 84, 211, 83, 72, 79, 82, 84, 69,
- 78, 69, 82, 128, 83, 72, 79, 82, 84, 67, 65, 75, 69, 128, 83, 72, 79, 82,
- 84, 45, 84, 87, 73, 71, 45, 89, 82, 128, 83, 72, 79, 82, 84, 45, 84, 87,
- 73, 71, 45, 84, 89, 210, 83, 72, 79, 82, 84, 45, 84, 87, 73, 71, 45, 83,
- 79, 204, 83, 72, 79, 82, 84, 45, 84, 87, 73, 71, 45, 79, 83, 211, 83, 72,
- 79, 82, 84, 45, 84, 87, 73, 71, 45, 78, 65, 85, 196, 83, 72, 79, 82, 84,
- 45, 84, 87, 73, 71, 45, 77, 65, 68, 210, 83, 72, 79, 82, 84, 45, 84, 87,
- 73, 71, 45, 72, 65, 71, 65, 76, 204, 83, 72, 79, 82, 84, 45, 84, 87, 73,
- 71, 45, 66, 74, 65, 82, 75, 65, 206, 83, 72, 79, 82, 84, 45, 84, 87, 73,
- 71, 45, 65, 210, 83, 72, 79, 82, 84, 128, 83, 72, 79, 82, 212, 83, 72,
- 79, 81, 128, 83, 72, 79, 209, 83, 72, 79, 80, 128, 83, 72, 79, 79, 84,
- 73, 78, 199, 83, 72, 79, 79, 84, 128, 83, 72, 79, 79, 128, 83, 72, 79,
- 71, 201, 83, 72, 79, 199, 83, 72, 79, 69, 128, 83, 72, 79, 197, 83, 72,
- 79, 65, 128, 83, 72, 79, 128, 83, 72, 73, 89, 89, 65, 65, 76, 65, 65,
+ 128, 83, 72, 82, 73, 128, 83, 72, 79, 89, 128, 83, 72, 79, 88, 128, 83,
+ 72, 79, 87, 69, 82, 128, 83, 72, 79, 85, 76, 68, 69, 82, 69, 196, 83, 72,
+ 79, 85, 76, 68, 69, 210, 83, 72, 79, 84, 128, 83, 72, 79, 82, 84, 83,
+ 128, 83, 72, 79, 82, 84, 211, 83, 72, 79, 82, 84, 72, 65, 78, 196, 83,
+ 72, 79, 82, 84, 69, 78, 69, 82, 128, 83, 72, 79, 82, 84, 67, 65, 75, 69,
+ 128, 83, 72, 79, 82, 84, 45, 84, 87, 73, 71, 45, 89, 82, 128, 83, 72, 79,
+ 82, 84, 45, 84, 87, 73, 71, 45, 84, 89, 210, 83, 72, 79, 82, 84, 45, 84,
+ 87, 73, 71, 45, 83, 79, 204, 83, 72, 79, 82, 84, 45, 84, 87, 73, 71, 45,
+ 79, 83, 211, 83, 72, 79, 82, 84, 45, 84, 87, 73, 71, 45, 78, 65, 85, 196,
+ 83, 72, 79, 82, 84, 45, 84, 87, 73, 71, 45, 77, 65, 68, 210, 83, 72, 79,
+ 82, 84, 45, 84, 87, 73, 71, 45, 72, 65, 71, 65, 76, 204, 83, 72, 79, 82,
+ 84, 45, 84, 87, 73, 71, 45, 66, 74, 65, 82, 75, 65, 206, 83, 72, 79, 82,
+ 84, 45, 84, 87, 73, 71, 45, 65, 210, 83, 72, 79, 82, 84, 128, 83, 72, 79,
+ 82, 212, 83, 72, 79, 81, 128, 83, 72, 79, 209, 83, 72, 79, 80, 80, 73,
+ 78, 199, 83, 72, 79, 80, 128, 83, 72, 79, 79, 84, 73, 78, 199, 83, 72,
+ 79, 79, 84, 128, 83, 72, 79, 79, 73, 128, 83, 72, 79, 79, 128, 83, 72,
+ 79, 71, 201, 83, 72, 79, 199, 83, 72, 79, 69, 128, 83, 72, 79, 197, 83,
+ 72, 79, 65, 128, 83, 72, 79, 128, 83, 72, 73, 89, 89, 65, 65, 76, 65, 65,
128, 83, 72, 73, 84, 65, 128, 83, 72, 73, 84, 193, 83, 72, 73, 82, 212,
83, 72, 73, 82, 65, 69, 128, 83, 72, 73, 82, 128, 83, 72, 73, 210, 83,
- 72, 73, 81, 128, 83, 72, 73, 80, 128, 83, 72, 73, 78, 84, 207, 83, 72,
- 73, 78, 73, 71, 128, 83, 72, 73, 78, 68, 193, 83, 72, 73, 78, 128, 83,
- 72, 73, 206, 83, 72, 73, 77, 65, 128, 83, 72, 73, 77, 193, 83, 72, 73,
- 77, 128, 83, 72, 73, 205, 83, 72, 73, 73, 78, 128, 83, 72, 73, 73, 128,
- 83, 72, 73, 70, 212, 83, 72, 73, 69, 76, 68, 128, 83, 72, 73, 68, 128,
- 83, 72, 73, 196, 83, 72, 72, 65, 128, 83, 72, 72, 193, 83, 72, 69, 88,
- 128, 83, 72, 69, 86, 65, 128, 83, 72, 69, 85, 88, 128, 83, 72, 69, 85,
- 79, 81, 128, 83, 72, 69, 85, 65, 69, 81, 84, 85, 128, 83, 72, 69, 85, 65,
- 69, 81, 128, 83, 72, 69, 85, 65, 69, 128, 83, 72, 69, 84, 128, 83, 72,
- 69, 212, 83, 72, 69, 83, 72, 76, 65, 77, 128, 83, 72, 69, 83, 72, 73, 71,
- 128, 83, 72, 69, 83, 72, 73, 199, 83, 72, 69, 83, 72, 50, 128, 83, 72,
- 69, 83, 72, 128, 83, 72, 69, 81, 69, 204, 83, 72, 69, 80, 128, 83, 72,
- 69, 78, 128, 83, 72, 69, 76, 76, 128, 83, 72, 69, 76, 204, 83, 72, 69,
- 76, 70, 128, 83, 72, 69, 73, 128, 83, 72, 69, 71, 57, 128, 83, 72, 69,
- 69, 80, 128, 83, 72, 69, 69, 78, 85, 128, 83, 72, 69, 69, 78, 128, 83,
- 72, 69, 69, 206, 83, 72, 69, 69, 128, 83, 72, 69, 45, 71, 79, 65, 84,
- 128, 83, 72, 197, 83, 72, 67, 72, 65, 128, 83, 72, 65, 89, 128, 83, 72,
- 65, 88, 128, 83, 72, 65, 86, 73, 89, 65, 78, 73, 128, 83, 72, 65, 86, 73,
- 65, 206, 83, 72, 65, 86, 69, 196, 83, 72, 65, 85, 128, 83, 72, 65, 84,
- 128, 83, 72, 65, 82, 85, 128, 83, 72, 65, 82, 213, 83, 72, 65, 82, 80,
- 128, 83, 72, 65, 82, 208, 83, 72, 65, 82, 65, 128, 83, 72, 65, 82, 50,
- 128, 83, 72, 65, 82, 178, 83, 72, 65, 80, 73, 78, 71, 128, 83, 72, 65,
- 80, 69, 83, 128, 83, 72, 65, 80, 197, 83, 72, 65, 80, 128, 83, 72, 65,
- 78, 71, 128, 83, 72, 65, 78, 128, 83, 72, 65, 206, 83, 72, 65, 77, 82,
- 79, 67, 75, 128, 83, 72, 65, 76, 83, 72, 69, 76, 69, 84, 128, 83, 72, 65,
- 75, 84, 73, 128, 83, 72, 65, 73, 128, 83, 72, 65, 68, 79, 87, 69, 196,
- 83, 72, 65, 68, 69, 128, 83, 72, 65, 68, 68, 65, 128, 83, 72, 65, 68, 68,
- 193, 83, 72, 65, 68, 128, 83, 72, 65, 196, 83, 72, 65, 66, 54, 128, 83,
- 72, 65, 65, 128, 83, 72, 65, 54, 128, 83, 72, 65, 51, 128, 83, 72, 65,
- 179, 83, 71, 82, 193, 83, 71, 79, 210, 83, 71, 67, 128, 83, 71, 65, 215,
- 83, 71, 65, 194, 83, 71, 128, 83, 69, 88, 84, 85, 76, 193, 83, 69, 88,
+ 72, 73, 81, 128, 83, 72, 73, 78, 84, 207, 83, 72, 73, 78, 73, 71, 128,
+ 83, 72, 73, 78, 68, 193, 83, 72, 73, 206, 83, 72, 73, 77, 65, 128, 83,
+ 72, 73, 77, 193, 83, 72, 73, 77, 128, 83, 72, 73, 205, 83, 72, 73, 73,
+ 78, 128, 83, 72, 73, 73, 128, 83, 72, 73, 70, 212, 83, 72, 73, 69, 76,
+ 68, 128, 83, 72, 73, 68, 128, 83, 72, 73, 196, 83, 72, 72, 65, 128, 83,
+ 72, 72, 193, 83, 72, 69, 88, 128, 83, 72, 69, 86, 65, 128, 83, 72, 69,
+ 85, 88, 128, 83, 72, 69, 85, 79, 81, 128, 83, 72, 69, 85, 65, 69, 81, 84,
+ 85, 128, 83, 72, 69, 85, 65, 69, 81, 128, 83, 72, 69, 85, 65, 69, 128,
+ 83, 72, 69, 84, 128, 83, 72, 69, 212, 83, 72, 69, 83, 72, 76, 65, 77,
+ 128, 83, 72, 69, 83, 72, 73, 71, 128, 83, 72, 69, 83, 72, 73, 199, 83,
+ 72, 69, 83, 72, 50, 128, 83, 72, 69, 83, 72, 128, 83, 72, 69, 83, 200,
+ 83, 72, 69, 81, 69, 204, 83, 72, 69, 80, 128, 83, 72, 69, 78, 128, 83,
+ 72, 69, 76, 76, 128, 83, 72, 69, 76, 204, 83, 72, 69, 76, 70, 128, 83,
+ 72, 69, 73, 128, 83, 72, 69, 71, 57, 128, 83, 72, 69, 69, 80, 128, 83,
+ 72, 69, 69, 78, 85, 128, 83, 72, 69, 69, 78, 128, 83, 72, 69, 69, 206,
+ 83, 72, 69, 69, 128, 83, 72, 69, 45, 71, 79, 65, 84, 128, 83, 72, 197,
+ 83, 72, 67, 72, 79, 79, 73, 128, 83, 72, 67, 72, 65, 128, 83, 72, 65, 89,
+ 128, 83, 72, 65, 88, 128, 83, 72, 65, 86, 73, 89, 65, 78, 73, 128, 83,
+ 72, 65, 86, 73, 65, 206, 83, 72, 65, 86, 69, 196, 83, 72, 65, 85, 128,
+ 83, 72, 65, 84, 128, 83, 72, 65, 82, 85, 128, 83, 72, 65, 82, 213, 83,
+ 72, 65, 82, 80, 128, 83, 72, 65, 82, 208, 83, 72, 65, 82, 65, 128, 83,
+ 72, 65, 82, 50, 128, 83, 72, 65, 82, 178, 83, 72, 65, 80, 73, 78, 71,
+ 128, 83, 72, 65, 80, 69, 83, 128, 83, 72, 65, 80, 197, 83, 72, 65, 80,
+ 128, 83, 72, 65, 78, 71, 128, 83, 72, 65, 78, 128, 83, 72, 65, 206, 83,
+ 72, 65, 77, 82, 79, 67, 75, 128, 83, 72, 65, 76, 83, 72, 69, 76, 69, 84,
+ 128, 83, 72, 65, 75, 84, 73, 128, 83, 72, 65, 75, 73, 78, 71, 128, 83,
+ 72, 65, 75, 73, 78, 199, 83, 72, 65, 75, 128, 83, 72, 65, 73, 128, 83,
+ 72, 65, 70, 84, 128, 83, 72, 65, 70, 212, 83, 72, 65, 68, 79, 87, 69,
+ 196, 83, 72, 65, 68, 69, 196, 83, 72, 65, 68, 69, 128, 83, 72, 65, 68,
+ 68, 65, 128, 83, 72, 65, 68, 68, 193, 83, 72, 65, 68, 128, 83, 72, 65,
+ 196, 83, 72, 65, 66, 54, 128, 83, 72, 65, 65, 128, 83, 72, 65, 54, 128,
+ 83, 72, 65, 182, 83, 72, 65, 51, 128, 83, 72, 65, 179, 83, 71, 82, 193,
+ 83, 71, 79, 210, 83, 71, 67, 128, 83, 71, 65, 215, 83, 71, 65, 194, 83,
+ 71, 128, 83, 69, 89, 75, 128, 83, 69, 88, 84, 85, 76, 193, 83, 69, 88,
84, 73, 76, 69, 128, 83, 69, 88, 84, 65, 78, 211, 83, 69, 86, 69, 82, 65,
78, 67, 69, 128, 83, 69, 86, 69, 78, 84, 89, 128, 83, 69, 86, 69, 78, 84,
217, 83, 69, 86, 69, 78, 84, 72, 128, 83, 69, 86, 69, 78, 84, 69, 69, 78,
@@ -1007,1199 +1100,1364 @@ static unsigned char lexicon[] = {
78, 128, 83, 69, 83, 84, 69, 82, 84, 73, 85, 211, 83, 69, 83, 81, 85, 73,
81, 85, 65, 68, 82, 65, 84, 69, 128, 83, 69, 83, 65, 77, 197, 83, 69, 82,
86, 73, 67, 197, 83, 69, 82, 73, 70, 83, 128, 83, 69, 82, 73, 70, 211,
- 83, 69, 81, 85, 69, 78, 67, 197, 83, 69, 80, 84, 69, 77, 66, 69, 82, 128,
- 83, 69, 80, 65, 82, 65, 84, 79, 82, 128, 83, 69, 80, 65, 82, 65, 84, 79,
- 210, 83, 69, 78, 84, 79, 128, 83, 69, 78, 84, 73, 128, 83, 69, 77, 85,
- 78, 67, 73, 193, 83, 69, 77, 75, 65, 84, 72, 128, 83, 69, 77, 75, 128,
- 83, 69, 77, 73, 86, 79, 87, 69, 204, 83, 69, 77, 73, 83, 79, 70, 212, 83,
- 69, 77, 73, 83, 69, 88, 84, 73, 76, 69, 128, 83, 69, 77, 73, 77, 73, 78,
- 73, 77, 193, 83, 69, 77, 73, 68, 73, 82, 69, 67, 212, 83, 69, 77, 73, 67,
- 79, 76, 79, 78, 128, 83, 69, 77, 73, 67, 79, 76, 79, 206, 83, 69, 77, 73,
- 67, 73, 82, 67, 85, 76, 65, 210, 83, 69, 77, 73, 67, 73, 82, 67, 76, 197,
- 83, 69, 77, 73, 66, 82, 69, 86, 73, 211, 83, 69, 77, 73, 45, 86, 79, 73,
- 67, 69, 196, 83, 69, 76, 70, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 57,
- 57, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 57, 56, 128, 83, 69, 76, 69,
- 67, 84, 79, 82, 45, 57, 55, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 57,
- 54, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 57, 53, 128, 83, 69, 76, 69,
- 67, 84, 79, 82, 45, 57, 52, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 57,
- 51, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 57, 50, 128, 83, 69, 76, 69,
- 67, 84, 79, 82, 45, 57, 49, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 57,
- 48, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 57, 128, 83, 69, 76, 69, 67,
- 84, 79, 82, 45, 56, 57, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 56, 56,
- 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 56, 55, 128, 83, 69, 76, 69, 67,
- 84, 79, 82, 45, 56, 54, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 56, 53,
- 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 56, 52, 128, 83, 69, 76, 69, 67,
- 84, 79, 82, 45, 56, 51, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 56, 50,
- 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 56, 49, 128, 83, 69, 76, 69, 67,
- 84, 79, 82, 45, 56, 48, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 56, 128,
- 83, 69, 76, 69, 67, 84, 79, 82, 45, 55, 57, 128, 83, 69, 76, 69, 67, 84,
- 79, 82, 45, 55, 56, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 55, 55, 128,
- 83, 69, 76, 69, 67, 84, 79, 82, 45, 55, 54, 128, 83, 69, 76, 69, 67, 84,
- 79, 82, 45, 55, 53, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 55, 52, 128,
- 83, 69, 76, 69, 67, 84, 79, 82, 45, 55, 51, 128, 83, 69, 76, 69, 67, 84,
- 79, 82, 45, 55, 50, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 55, 49, 128,
- 83, 69, 76, 69, 67, 84, 79, 82, 45, 55, 48, 128, 83, 69, 76, 69, 67, 84,
- 79, 82, 45, 55, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 54, 57, 128, 83,
- 69, 76, 69, 67, 84, 79, 82, 45, 54, 56, 128, 83, 69, 76, 69, 67, 84, 79,
- 82, 45, 54, 55, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 54, 54, 128, 83,
- 69, 76, 69, 67, 84, 79, 82, 45, 54, 53, 128, 83, 69, 76, 69, 67, 84, 79,
- 82, 45, 54, 52, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 54, 51, 128, 83,
- 69, 76, 69, 67, 84, 79, 82, 45, 54, 50, 128, 83, 69, 76, 69, 67, 84, 79,
- 82, 45, 54, 49, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 54, 48, 128, 83,
- 69, 76, 69, 67, 84, 79, 82, 45, 54, 128, 83, 69, 76, 69, 67, 84, 79, 82,
- 45, 53, 57, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 53, 56, 128, 83, 69,
- 76, 69, 67, 84, 79, 82, 45, 53, 55, 128, 83, 69, 76, 69, 67, 84, 79, 82,
- 45, 53, 54, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 53, 53, 128, 83, 69,
- 76, 69, 67, 84, 79, 82, 45, 53, 52, 128, 83, 69, 76, 69, 67, 84, 79, 82,
- 45, 53, 51, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 53, 50, 128, 83, 69,
- 76, 69, 67, 84, 79, 82, 45, 53, 49, 128, 83, 69, 76, 69, 67, 84, 79, 82,
- 45, 53, 48, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 53, 128, 83, 69, 76,
- 69, 67, 84, 79, 82, 45, 52, 57, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45,
- 52, 56, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 52, 55, 128, 83, 69, 76,
- 69, 67, 84, 79, 82, 45, 52, 54, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45,
- 52, 53, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 52, 52, 128, 83, 69, 76,
- 69, 67, 84, 79, 82, 45, 52, 51, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45,
- 52, 50, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 52, 49, 128, 83, 69, 76,
- 69, 67, 84, 79, 82, 45, 52, 48, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45,
- 52, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 51, 57, 128, 83, 69, 76, 69,
- 67, 84, 79, 82, 45, 51, 56, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 51,
- 55, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 51, 54, 128, 83, 69, 76, 69,
- 67, 84, 79, 82, 45, 51, 53, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 51,
- 52, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 51, 51, 128, 83, 69, 76, 69,
- 67, 84, 79, 82, 45, 51, 50, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 51,
- 49, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 51, 48, 128, 83, 69, 76, 69,
- 67, 84, 79, 82, 45, 51, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 57,
- 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 56, 128, 83, 69, 76, 69, 67,
- 84, 79, 82, 45, 50, 55, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 54,
- 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 53, 54, 128, 83, 69, 76, 69,
- 67, 84, 79, 82, 45, 50, 53, 53, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45,
- 50, 53, 52, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 53, 51, 128, 83,
- 69, 76, 69, 67, 84, 79, 82, 45, 50, 53, 50, 128, 83, 69, 76, 69, 67, 84,
- 79, 82, 45, 50, 53, 49, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 53,
- 48, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 53, 128, 83, 69, 76, 69,
- 67, 84, 79, 82, 45, 50, 52, 57, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45,
- 50, 52, 56, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 52, 55, 128, 83,
- 69, 76, 69, 67, 84, 79, 82, 45, 50, 52, 54, 128, 83, 69, 76, 69, 67, 84,
- 79, 82, 45, 50, 52, 53, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 52,
- 52, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 52, 51, 128, 83, 69, 76,
- 69, 67, 84, 79, 82, 45, 50, 52, 50, 128, 83, 69, 76, 69, 67, 84, 79, 82,
- 45, 50, 52, 49, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 52, 48, 128,
- 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 52, 128, 83, 69, 76, 69, 67, 84,
- 79, 82, 45, 50, 51, 57, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 51,
- 56, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 51, 55, 128, 83, 69, 76,
- 69, 67, 84, 79, 82, 45, 50, 51, 54, 128, 83, 69, 76, 69, 67, 84, 79, 82,
- 45, 50, 51, 53, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 51, 52, 128,
- 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 51, 51, 128, 83, 69, 76, 69, 67,
- 84, 79, 82, 45, 50, 51, 50, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50,
- 51, 49, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 51, 48, 128, 83, 69,
- 76, 69, 67, 84, 79, 82, 45, 50, 51, 128, 83, 69, 76, 69, 67, 84, 79, 82,
- 45, 50, 50, 57, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 50, 56, 128,
- 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 50, 55, 128, 83, 69, 76, 69, 67,
- 84, 79, 82, 45, 50, 50, 54, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50,
- 50, 53, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 50, 52, 128, 83, 69,
- 76, 69, 67, 84, 79, 82, 45, 50, 50, 51, 128, 83, 69, 76, 69, 67, 84, 79,
- 82, 45, 50, 50, 50, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 50, 49,
- 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 50, 48, 128, 83, 69, 76, 69,
- 67, 84, 79, 82, 45, 50, 50, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50,
- 49, 57, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 49, 56, 128, 83, 69,
- 76, 69, 67, 84, 79, 82, 45, 50, 49, 55, 128, 83, 69, 76, 69, 67, 84, 79,
- 82, 45, 50, 49, 54, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 49, 53,
- 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 49, 52, 128, 83, 69, 76, 69,
- 67, 84, 79, 82, 45, 50, 49, 51, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45,
- 50, 49, 50, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 49, 49, 128, 83,
- 69, 76, 69, 67, 84, 79, 82, 45, 50, 49, 48, 128, 83, 69, 76, 69, 67, 84,
- 79, 82, 45, 50, 49, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 48, 57,
- 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 48, 56, 128, 83, 69, 76, 69,
- 67, 84, 79, 82, 45, 50, 48, 55, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45,
- 50, 48, 54, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 48, 53, 128, 83,
- 69, 76, 69, 67, 84, 79, 82, 45, 50, 48, 52, 128, 83, 69, 76, 69, 67, 84,
- 79, 82, 45, 50, 48, 51, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 48,
- 50, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 48, 49, 128, 83, 69, 76,
- 69, 67, 84, 79, 82, 45, 50, 48, 48, 128, 83, 69, 76, 69, 67, 84, 79, 82,
- 45, 50, 48, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 128, 83, 69, 76,
- 69, 67, 84, 79, 82, 45, 49, 57, 57, 128, 83, 69, 76, 69, 67, 84, 79, 82,
- 45, 49, 57, 56, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 57, 55, 128,
- 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 57, 54, 128, 83, 69, 76, 69, 67,
- 84, 79, 82, 45, 49, 57, 53, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49,
- 57, 52, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 57, 51, 128, 83, 69,
- 76, 69, 67, 84, 79, 82, 45, 49, 57, 50, 128, 83, 69, 76, 69, 67, 84, 79,
- 82, 45, 49, 57, 49, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 57, 48,
- 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 57, 128, 83, 69, 76, 69, 67,
- 84, 79, 82, 45, 49, 56, 57, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49,
- 56, 56, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 56, 55, 128, 83, 69,
- 76, 69, 67, 84, 79, 82, 45, 49, 56, 54, 128, 83, 69, 76, 69, 67, 84, 79,
- 82, 45, 49, 56, 53, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 56, 52,
- 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 56, 51, 128, 83, 69, 76, 69,
- 67, 84, 79, 82, 45, 49, 56, 50, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45,
- 49, 56, 49, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 56, 48, 128, 83,
- 69, 76, 69, 67, 84, 79, 82, 45, 49, 56, 128, 83, 69, 76, 69, 67, 84, 79,
- 82, 45, 49, 55, 57, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 55, 56,
- 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 55, 55, 128, 83, 69, 76, 69,
- 67, 84, 79, 82, 45, 49, 55, 54, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45,
- 49, 55, 53, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 55, 52, 128, 83,
- 69, 76, 69, 67, 84, 79, 82, 45, 49, 55, 51, 128, 83, 69, 76, 69, 67, 84,
- 79, 82, 45, 49, 55, 50, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 55,
- 49, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 55, 48, 128, 83, 69, 76,
- 69, 67, 84, 79, 82, 45, 49, 55, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45,
- 49, 54, 57, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 54, 56, 128, 83,
- 69, 76, 69, 67, 84, 79, 82, 45, 49, 54, 55, 128, 83, 69, 76, 69, 67, 84,
- 79, 82, 45, 49, 54, 54, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 54,
- 53, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 54, 52, 128, 83, 69, 76,
- 69, 67, 84, 79, 82, 45, 49, 54, 51, 128, 83, 69, 76, 69, 67, 84, 79, 82,
- 45, 49, 54, 50, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 54, 49, 128,
- 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 54, 48, 128, 83, 69, 76, 69, 67,
- 84, 79, 82, 45, 49, 54, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 53,
- 57, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 53, 56, 128, 83, 69, 76,
- 69, 67, 84, 79, 82, 45, 49, 53, 55, 128, 83, 69, 76, 69, 67, 84, 79, 82,
- 45, 49, 53, 54, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 53, 53, 128,
- 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 53, 52, 128, 83, 69, 76, 69, 67,
- 84, 79, 82, 45, 49, 53, 51, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49,
- 53, 50, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 53, 49, 128, 83, 69,
- 76, 69, 67, 84, 79, 82, 45, 49, 53, 48, 128, 83, 69, 76, 69, 67, 84, 79,
- 82, 45, 49, 53, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 52, 57, 128,
- 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 52, 56, 128, 83, 69, 76, 69, 67,
- 84, 79, 82, 45, 49, 52, 55, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49,
- 52, 54, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 52, 53, 128, 83, 69,
- 76, 69, 67, 84, 79, 82, 45, 49, 52, 52, 128, 83, 69, 76, 69, 67, 84, 79,
- 82, 45, 49, 52, 51, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 52, 50,
- 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 52, 49, 128, 83, 69, 76, 69,
- 67, 84, 79, 82, 45, 49, 52, 48, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45,
- 49, 52, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 51, 57, 128, 83, 69,
- 76, 69, 67, 84, 79, 82, 45, 49, 51, 56, 128, 83, 69, 76, 69, 67, 84, 79,
- 82, 45, 49, 51, 55, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 51, 54,
- 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 51, 53, 128, 83, 69, 76, 69,
- 67, 84, 79, 82, 45, 49, 51, 52, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45,
- 49, 51, 51, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 51, 50, 128, 83,
- 69, 76, 69, 67, 84, 79, 82, 45, 49, 51, 49, 128, 83, 69, 76, 69, 67, 84,
- 79, 82, 45, 49, 51, 48, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 51,
- 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 50, 57, 128, 83, 69, 76, 69,
- 67, 84, 79, 82, 45, 49, 50, 56, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45,
- 49, 50, 55, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 50, 54, 128, 83,
- 69, 76, 69, 67, 84, 79, 82, 45, 49, 50, 53, 128, 83, 69, 76, 69, 67, 84,
- 79, 82, 45, 49, 50, 52, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 50,
- 51, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 50, 50, 128, 83, 69, 76,
- 69, 67, 84, 79, 82, 45, 49, 50, 49, 128, 83, 69, 76, 69, 67, 84, 79, 82,
- 45, 49, 50, 48, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 50, 128, 83,
- 69, 76, 69, 67, 84, 79, 82, 45, 49, 49, 57, 128, 83, 69, 76, 69, 67, 84,
- 79, 82, 45, 49, 49, 56, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 49,
- 55, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 49, 54, 128, 83, 69, 76,
- 69, 67, 84, 79, 82, 45, 49, 49, 53, 128, 83, 69, 76, 69, 67, 84, 79, 82,
- 45, 49, 49, 52, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 49, 51, 128,
- 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 49, 50, 128, 83, 69, 76, 69, 67,
- 84, 79, 82, 45, 49, 49, 49, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49,
- 49, 48, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 49, 128, 83, 69, 76,
- 69, 67, 84, 79, 82, 45, 49, 48, 57, 128, 83, 69, 76, 69, 67, 84, 79, 82,
- 45, 49, 48, 56, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 48, 55, 128,
- 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 48, 54, 128, 83, 69, 76, 69, 67,
- 84, 79, 82, 45, 49, 48, 53, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49,
- 48, 52, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 48, 51, 128, 83, 69,
- 76, 69, 67, 84, 79, 82, 45, 49, 48, 50, 128, 83, 69, 76, 69, 67, 84, 79,
- 82, 45, 49, 48, 49, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 48, 48,
- 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 48, 128, 83, 69, 76, 69, 67,
- 84, 79, 82, 45, 49, 128, 83, 69, 76, 69, 67, 84, 79, 210, 83, 69, 76, 69,
- 67, 84, 69, 196, 83, 69, 73, 83, 77, 65, 128, 83, 69, 73, 83, 77, 193,
- 83, 69, 72, 128, 83, 69, 71, 79, 76, 128, 83, 69, 71, 78, 79, 128, 83,
- 69, 71, 77, 69, 78, 84, 128, 83, 69, 69, 78, 85, 128, 83, 69, 69, 78,
- 128, 83, 69, 69, 206, 83, 69, 69, 68, 76, 73, 78, 71, 128, 83, 69, 69,
- 45, 78, 79, 45, 69, 86, 73, 204, 83, 69, 67, 84, 79, 82, 128, 83, 69, 67,
- 84, 73, 79, 78, 128, 83, 69, 67, 84, 73, 79, 206, 83, 69, 67, 82, 69, 84,
- 128, 83, 69, 67, 79, 78, 68, 128, 83, 69, 66, 65, 84, 66, 69, 73, 212,
- 83, 69, 65, 84, 128, 83, 69, 65, 76, 128, 83, 69, 65, 71, 85, 76, 204,
- 83, 68, 79, 78, 199, 83, 68, 128, 83, 67, 87, 65, 128, 83, 67, 82, 85,
- 80, 76, 69, 128, 83, 67, 82, 79, 76, 76, 128, 83, 67, 82, 73, 80, 84,
- 128, 83, 67, 82, 69, 69, 78, 128, 83, 67, 82, 69, 69, 206, 83, 67, 82,
- 69, 65, 77, 73, 78, 199, 83, 67, 79, 82, 80, 73, 85, 83, 128, 83, 67, 79,
- 82, 69, 128, 83, 67, 73, 83, 83, 79, 82, 83, 128, 83, 67, 73, 128, 83,
- 67, 72, 87, 65, 128, 83, 67, 72, 87, 193, 83, 67, 72, 82, 79, 69, 68, 69,
- 82, 128, 83, 67, 72, 79, 79, 76, 128, 83, 67, 72, 79, 79, 204, 83, 67,
- 72, 79, 76, 65, 82, 128, 83, 67, 72, 69, 77, 193, 83, 67, 69, 80, 84, 69,
- 210, 83, 67, 65, 78, 68, 73, 67, 85, 83, 128, 83, 67, 65, 78, 68, 73, 67,
- 85, 211, 83, 67, 65, 206, 83, 67, 65, 76, 69, 83, 128, 83, 66, 85, 194,
- 83, 66, 82, 85, 204, 83, 65, 89, 73, 83, 201, 83, 65, 89, 65, 78, 78, 65,
- 128, 83, 65, 89, 128, 83, 65, 88, 79, 80, 72, 79, 78, 69, 128, 83, 65,
- 88, 73, 77, 65, 84, 65, 128, 83, 65, 87, 65, 78, 128, 83, 65, 87, 128,
- 83, 65, 86, 79, 85, 82, 73, 78, 199, 83, 65, 85, 73, 76, 128, 83, 65, 84,
- 85, 82, 78, 128, 83, 65, 84, 75, 65, 65, 78, 75, 85, 85, 128, 83, 65, 84,
- 75, 65, 65, 78, 128, 83, 65, 84, 69, 76, 76, 73, 84, 197, 83, 65, 84, 67,
- 72, 69, 76, 128, 83, 65, 84, 65, 78, 71, 65, 128, 83, 65, 83, 72, 128,
- 83, 65, 83, 65, 75, 128, 83, 65, 82, 73, 128, 83, 65, 82, 193, 83, 65,
- 82, 128, 83, 65, 81, 128, 83, 65, 80, 65, 128, 83, 65, 78, 89, 79, 79,
- 71, 193, 83, 65, 78, 89, 65, 75, 193, 83, 65, 78, 84, 73, 73, 77, 85,
- 128, 83, 65, 78, 78, 89, 65, 128, 83, 65, 78, 71, 65, 50, 128, 83, 65,
- 78, 68, 65, 76, 128, 83, 65, 78, 65, 72, 128, 83, 65, 78, 128, 83, 65,
- 77, 89, 79, 203, 83, 65, 77, 86, 65, 84, 128, 83, 65, 77, 80, 73, 128,
- 83, 65, 77, 80, 72, 65, 79, 128, 83, 65, 77, 75, 65, 128, 83, 65, 77, 69,
- 75, 72, 128, 83, 65, 77, 69, 75, 200, 83, 65, 77, 66, 65, 128, 83, 65,
- 77, 65, 82, 73, 84, 65, 206, 83, 65, 77, 128, 83, 65, 76, 84, 73, 82, 69,
- 128, 83, 65, 76, 84, 73, 76, 76, 79, 128, 83, 65, 76, 84, 45, 50, 128,
- 83, 65, 76, 84, 128, 83, 65, 76, 212, 83, 65, 76, 76, 65, 76, 76, 65, 72,
- 79, 213, 83, 65, 76, 76, 193, 83, 65, 76, 65, 205, 83, 65, 76, 65, 128,
- 83, 65, 76, 45, 65, 77, 77, 79, 78, 73, 65, 67, 128, 83, 65, 76, 128, 83,
- 65, 75, 79, 84, 128, 83, 65, 75, 69, 85, 65, 69, 128, 83, 65, 75, 197,
- 83, 65, 74, 68, 65, 72, 128, 83, 65, 73, 76, 66, 79, 65, 84, 128, 83, 65,
- 73, 76, 128, 83, 65, 73, 75, 85, 82, 85, 128, 83, 65, 72, 128, 83, 65,
- 71, 73, 84, 84, 65, 82, 73, 85, 83, 128, 83, 65, 71, 65, 128, 83, 65, 71,
- 128, 83, 65, 199, 83, 65, 70, 72, 65, 128, 83, 65, 68, 72, 69, 128, 83,
- 65, 68, 69, 128, 83, 65, 68, 128, 83, 65, 196, 83, 65, 67, 82, 73, 70,
- 73, 67, 73, 65, 204, 83, 65, 65, 73, 128, 83, 65, 65, 68, 72, 85, 128,
- 83, 65, 45, 73, 128, 83, 65, 45, 50, 128, 83, 48, 52, 54, 128, 83, 48,
- 52, 53, 128, 83, 48, 52, 52, 128, 83, 48, 52, 51, 128, 83, 48, 52, 50,
- 128, 83, 48, 52, 49, 128, 83, 48, 52, 48, 128, 83, 48, 51, 57, 128, 83,
- 48, 51, 56, 128, 83, 48, 51, 55, 128, 83, 48, 51, 54, 128, 83, 48, 51,
- 53, 65, 128, 83, 48, 51, 53, 128, 83, 48, 51, 52, 128, 83, 48, 51, 51,
- 128, 83, 48, 51, 50, 128, 83, 48, 51, 49, 128, 83, 48, 51, 48, 128, 83,
- 48, 50, 57, 128, 83, 48, 50, 56, 128, 83, 48, 50, 55, 128, 83, 48, 50,
- 54, 66, 128, 83, 48, 50, 54, 65, 128, 83, 48, 50, 54, 128, 83, 48, 50,
- 53, 128, 83, 48, 50, 52, 128, 83, 48, 50, 51, 128, 83, 48, 50, 50, 128,
- 83, 48, 50, 49, 128, 83, 48, 50, 48, 128, 83, 48, 49, 57, 128, 83, 48,
- 49, 56, 128, 83, 48, 49, 55, 65, 128, 83, 48, 49, 55, 128, 83, 48, 49,
- 54, 128, 83, 48, 49, 53, 128, 83, 48, 49, 52, 66, 128, 83, 48, 49, 52,
- 65, 128, 83, 48, 49, 52, 128, 83, 48, 49, 51, 128, 83, 48, 49, 50, 128,
- 83, 48, 49, 49, 128, 83, 48, 49, 48, 128, 83, 48, 48, 57, 128, 83, 48,
- 48, 56, 128, 83, 48, 48, 55, 128, 83, 48, 48, 54, 65, 128, 83, 48, 48,
- 54, 128, 83, 48, 48, 53, 128, 83, 48, 48, 52, 128, 83, 48, 48, 51, 128,
- 83, 48, 48, 50, 65, 128, 83, 48, 48, 50, 128, 83, 48, 48, 49, 128, 83,
- 45, 87, 128, 83, 45, 83, 72, 65, 80, 69, 196, 82, 89, 89, 128, 82, 89,
- 88, 128, 82, 89, 84, 128, 82, 89, 82, 88, 128, 82, 89, 82, 128, 82, 89,
- 80, 128, 82, 87, 79, 79, 128, 82, 87, 79, 128, 82, 87, 73, 73, 128, 82,
- 87, 73, 128, 82, 87, 69, 69, 128, 82, 87, 69, 128, 82, 87, 65, 72, 65,
- 128, 82, 87, 65, 65, 128, 82, 87, 65, 128, 82, 85, 88, 128, 82, 85, 85,
- 66, 85, 82, 85, 128, 82, 85, 85, 128, 82, 85, 84, 128, 82, 85, 83, 73,
- 128, 82, 85, 82, 88, 128, 82, 85, 82, 128, 82, 85, 80, 73, 73, 128, 82,
- 85, 80, 69, 197, 82, 85, 80, 128, 82, 85, 79, 88, 128, 82, 85, 79, 80,
- 128, 82, 85, 79, 128, 82, 85, 78, 79, 85, 84, 128, 82, 85, 78, 78, 73,
- 78, 199, 82, 85, 78, 78, 69, 82, 128, 82, 85, 78, 128, 82, 85, 77, 201,
- 82, 85, 77, 65, 201, 82, 85, 77, 128, 82, 85, 205, 82, 85, 76, 69, 82,
- 128, 82, 85, 76, 69, 45, 68, 69, 76, 65, 89, 69, 68, 128, 82, 85, 76, 69,
- 128, 82, 85, 75, 75, 65, 75, 72, 65, 128, 82, 85, 73, 83, 128, 82, 85,
- 71, 66, 217, 82, 85, 194, 82, 85, 65, 128, 82, 84, 72, 65, 78, 199, 82,
- 84, 65, 71, 83, 128, 82, 84, 65, 71, 211, 82, 82, 89, 88, 128, 82, 82,
- 89, 84, 128, 82, 82, 89, 82, 88, 128, 82, 82, 89, 82, 128, 82, 82, 89,
- 80, 128, 82, 82, 85, 88, 128, 82, 82, 85, 85, 128, 82, 82, 85, 84, 128,
- 82, 82, 85, 82, 88, 128, 82, 82, 85, 82, 128, 82, 82, 85, 80, 128, 82,
- 82, 85, 79, 88, 128, 82, 82, 85, 79, 128, 82, 82, 85, 128, 82, 82, 79,
- 88, 128, 82, 82, 79, 84, 128, 82, 82, 79, 80, 128, 82, 82, 79, 79, 128,
- 82, 82, 79, 128, 82, 82, 73, 73, 128, 82, 82, 73, 128, 82, 82, 69, 88,
- 128, 82, 82, 69, 84, 128, 82, 82, 69, 80, 128, 82, 82, 69, 72, 128, 82,
- 82, 69, 200, 82, 82, 69, 69, 128, 82, 82, 69, 128, 82, 82, 65, 88, 128,
- 82, 82, 65, 85, 128, 82, 82, 65, 73, 128, 82, 82, 65, 65, 128, 82, 82,
- 65, 128, 82, 79, 87, 66, 79, 65, 84, 128, 82, 79, 85, 78, 68, 69, 196,
- 82, 79, 85, 78, 68, 45, 84, 73, 80, 80, 69, 196, 82, 79, 84, 85, 78, 68,
- 65, 128, 82, 79, 84, 65, 84, 69, 196, 82, 79, 83, 72, 128, 82, 79, 83,
- 69, 84, 84, 69, 128, 82, 79, 83, 69, 128, 82, 79, 79, 84, 128, 82, 79,
- 79, 83, 84, 69, 82, 128, 82, 79, 79, 75, 128, 82, 79, 79, 70, 128, 82,
- 79, 77, 65, 206, 82, 79, 77, 128, 82, 79, 76, 76, 69, 210, 82, 79, 72,
- 73, 78, 71, 89, 193, 82, 79, 196, 82, 79, 67, 75, 69, 84, 128, 82, 79,
- 67, 203, 82, 79, 67, 128, 82, 79, 66, 65, 84, 128, 82, 79, 65, 83, 84,
- 69, 196, 82, 79, 65, 82, 128, 82, 79, 65, 128, 82, 78, 89, 73, 78, 199,
- 82, 78, 79, 79, 78, 128, 82, 78, 79, 79, 206, 82, 78, 65, 205, 82, 77,
- 84, 128, 82, 76, 79, 128, 82, 76, 77, 128, 82, 76, 73, 128, 82, 76, 69,
- 128, 82, 74, 69, 211, 82, 74, 69, 128, 82, 74, 197, 82, 73, 86, 69, 82,
- 128, 82, 73, 84, 85, 65, 76, 128, 82, 73, 84, 84, 79, 82, 85, 128, 82,
- 73, 84, 83, 73, 128, 82, 73, 83, 73, 78, 199, 82, 73, 83, 72, 128, 82,
- 73, 82, 65, 128, 82, 73, 80, 128, 82, 73, 78, 71, 211, 82, 73, 78, 70,
- 79, 82, 90, 65, 78, 68, 79, 128, 82, 73, 206, 82, 73, 77, 71, 66, 65,
- 128, 82, 73, 75, 82, 73, 75, 128, 82, 73, 71, 86, 69, 68, 73, 195, 82,
- 73, 71, 72, 84, 87, 65, 82, 68, 83, 128, 82, 73, 71, 72, 84, 72, 65, 78,
- 196, 82, 73, 71, 72, 84, 45, 84, 79, 45, 76, 69, 70, 212, 82, 73, 71, 72,
- 84, 45, 83, 73, 68, 197, 82, 73, 71, 72, 84, 45, 83, 72, 65, 68, 79, 87,
- 69, 196, 82, 73, 71, 72, 84, 45, 83, 72, 65, 68, 69, 196, 82, 73, 71, 72,
- 84, 45, 80, 79, 73, 78, 84, 73, 78, 199, 82, 73, 71, 72, 84, 45, 72, 65,
- 78, 68, 69, 196, 82, 73, 71, 72, 84, 45, 72, 65, 78, 196, 82, 73, 71, 72,
- 84, 45, 70, 65, 67, 73, 78, 199, 82, 73, 71, 72, 84, 128, 82, 73, 69, 85,
- 76, 45, 89, 69, 83, 73, 69, 85, 78, 71, 128, 82, 73, 69, 85, 76, 45, 89,
- 69, 79, 82, 73, 78, 72, 73, 69, 85, 72, 45, 72, 73, 69, 85, 72, 128, 82,
- 73, 69, 85, 76, 45, 89, 69, 79, 82, 73, 78, 72, 73, 69, 85, 72, 128, 82,
- 73, 69, 85, 76, 45, 84, 73, 75, 69, 85, 84, 45, 72, 73, 69, 85, 72, 128,
- 82, 73, 69, 85, 76, 45, 84, 73, 75, 69, 85, 84, 128, 82, 73, 69, 85, 76,
- 45, 84, 72, 73, 69, 85, 84, 72, 128, 82, 73, 69, 85, 76, 45, 83, 83, 65,
- 78, 71, 84, 73, 75, 69, 85, 84, 128, 82, 73, 69, 85, 76, 45, 83, 83, 65,
- 78, 71, 83, 73, 79, 83, 128, 82, 73, 69, 85, 76, 45, 83, 83, 65, 78, 71,
- 80, 73, 69, 85, 80, 128, 82, 73, 69, 85, 76, 45, 83, 83, 65, 78, 71, 75,
- 73, 89, 69, 79, 75, 128, 82, 73, 69, 85, 76, 45, 83, 73, 79, 83, 128, 82,
- 73, 69, 85, 76, 45, 80, 73, 69, 85, 80, 45, 84, 73, 75, 69, 85, 84, 128,
- 82, 73, 69, 85, 76, 45, 80, 73, 69, 85, 80, 45, 83, 73, 79, 83, 128, 82,
- 73, 69, 85, 76, 45, 80, 73, 69, 85, 80, 45, 80, 72, 73, 69, 85, 80, 72,
- 128, 82, 73, 69, 85, 76, 45, 80, 73, 69, 85, 80, 45, 72, 73, 69, 85, 72,
- 128, 82, 73, 69, 85, 76, 45, 80, 73, 69, 85, 80, 128, 82, 73, 69, 85, 76,
- 45, 80, 72, 73, 69, 85, 80, 72, 128, 82, 73, 69, 85, 76, 45, 80, 65, 78,
- 83, 73, 79, 83, 128, 82, 73, 69, 85, 76, 45, 78, 73, 69, 85, 78, 128, 82,
- 73, 69, 85, 76, 45, 77, 73, 69, 85, 77, 45, 83, 73, 79, 83, 128, 82, 73,
- 69, 85, 76, 45, 77, 73, 69, 85, 77, 45, 75, 73, 89, 69, 79, 75, 128, 82,
- 73, 69, 85, 76, 45, 77, 73, 69, 85, 77, 45, 72, 73, 69, 85, 72, 128, 82,
- 73, 69, 85, 76, 45, 77, 73, 69, 85, 77, 128, 82, 73, 69, 85, 76, 45, 75,
- 73, 89, 69, 79, 75, 45, 83, 73, 79, 83, 128, 82, 73, 69, 85, 76, 45, 75,
- 73, 89, 69, 79, 75, 45, 72, 73, 69, 85, 72, 128, 82, 73, 69, 85, 76, 45,
- 75, 73, 89, 69, 79, 75, 128, 82, 73, 69, 85, 76, 45, 75, 65, 80, 89, 69,
- 79, 85, 78, 80, 73, 69, 85, 80, 128, 82, 73, 69, 85, 76, 45, 72, 73, 69,
- 85, 72, 128, 82, 73, 69, 85, 76, 45, 67, 73, 69, 85, 67, 128, 82, 73, 69,
- 85, 204, 82, 73, 69, 76, 128, 82, 73, 69, 69, 128, 82, 73, 67, 69, 77,
- 128, 82, 73, 67, 69, 128, 82, 73, 67, 197, 82, 73, 66, 66, 79, 78, 128,
- 82, 73, 65, 204, 82, 72, 79, 84, 73, 195, 82, 72, 79, 128, 82, 72, 207,
- 82, 72, 65, 128, 82, 71, 89, 73, 78, 71, 83, 128, 82, 71, 89, 65, 78,
- 128, 82, 71, 89, 193, 82, 69, 86, 79, 76, 86, 73, 78, 199, 82, 69, 86,
- 79, 76, 85, 84, 73, 79, 78, 128, 82, 69, 86, 77, 65, 128, 82, 69, 86, 73,
- 65, 128, 82, 69, 86, 69, 82, 83, 69, 68, 128, 82, 69, 86, 69, 82, 83, 69,
- 196, 82, 69, 86, 69, 82, 83, 197, 82, 69, 85, 88, 128, 82, 69, 85, 128,
- 82, 69, 84, 85, 82, 78, 128, 82, 69, 84, 85, 82, 206, 82, 69, 84, 82, 79,
- 70, 76, 69, 216, 82, 69, 84, 82, 69, 65, 84, 128, 82, 69, 84, 79, 82, 84,
- 128, 82, 69, 83, 85, 80, 73, 78, 85, 83, 128, 82, 69, 83, 84, 82, 79, 79,
- 77, 128, 82, 69, 83, 84, 82, 73, 67, 84, 69, 196, 82, 69, 83, 84, 128,
- 82, 69, 83, 80, 79, 78, 83, 69, 128, 82, 69, 83, 79, 85, 82, 67, 69, 128,
- 82, 69, 83, 79, 76, 85, 84, 73, 79, 78, 128, 82, 69, 83, 73, 83, 84, 65,
- 78, 67, 69, 128, 82, 69, 83, 73, 68, 69, 78, 67, 69, 128, 82, 69, 83,
- 200, 82, 69, 82, 69, 78, 71, 71, 65, 78, 128, 82, 69, 82, 69, 75, 65, 78,
- 128, 82, 69, 80, 82, 69, 83, 69, 78, 84, 128, 82, 69, 80, 76, 65, 67, 69,
- 77, 69, 78, 212, 82, 69, 80, 72, 128, 82, 69, 80, 69, 84, 73, 84, 73, 79,
- 206, 82, 69, 80, 69, 65, 84, 69, 196, 82, 69, 80, 69, 65, 84, 128, 82,
- 69, 80, 69, 65, 212, 82, 69, 80, 65, 89, 65, 128, 82, 69, 80, 65, 128,
- 82, 69, 80, 193, 82, 69, 78, 84, 79, 71, 69, 78, 128, 82, 69, 78, 128,
- 82, 69, 206, 82, 69, 77, 85, 128, 82, 69, 77, 69, 68, 89, 128, 82, 69,
- 76, 73, 71, 73, 79, 78, 128, 82, 69, 76, 73, 69, 86, 69, 196, 82, 69, 76,
- 69, 65, 83, 69, 128, 82, 69, 76, 65, 84, 73, 79, 78, 65, 204, 82, 69, 76,
- 65, 84, 73, 79, 78, 128, 82, 69, 76, 65, 65, 128, 82, 69, 74, 65, 78,
- 199, 82, 69, 73, 196, 82, 69, 71, 85, 76, 85, 83, 45, 52, 128, 82, 69,
- 71, 85, 76, 85, 83, 45, 51, 128, 82, 69, 71, 85, 76, 85, 83, 45, 50, 128,
- 82, 69, 71, 85, 76, 85, 83, 128, 82, 69, 71, 85, 76, 85, 211, 82, 69, 71,
- 73, 83, 84, 69, 82, 69, 196, 82, 69, 71, 73, 79, 78, 65, 204, 82, 69, 71,
- 73, 65, 45, 50, 128, 82, 69, 71, 73, 65, 128, 82, 69, 70, 79, 82, 77, 69,
- 196, 82, 69, 70, 69, 82, 69, 78, 67, 197, 82, 69, 68, 85, 80, 76, 73, 67,
- 65, 84, 73, 79, 78, 128, 82, 69, 67, 89, 67, 76, 73, 78, 199, 82, 69, 67,
- 89, 67, 76, 69, 196, 82, 69, 67, 84, 73, 76, 73, 78, 69, 65, 210, 82, 69,
- 67, 84, 65, 78, 71, 85, 76, 65, 210, 82, 69, 67, 84, 65, 78, 71, 76, 69,
- 128, 82, 69, 67, 84, 65, 78, 71, 76, 197, 82, 69, 67, 82, 69, 65, 84, 73,
- 79, 78, 65, 204, 82, 69, 67, 79, 82, 68, 73, 78, 199, 82, 69, 67, 79, 82,
- 68, 69, 82, 128, 82, 69, 67, 79, 82, 196, 82, 69, 67, 69, 80, 84, 73, 86,
- 197, 82, 69, 67, 69, 73, 86, 69, 82, 128, 82, 69, 65, 76, 71, 65, 82, 45,
- 50, 128, 82, 69, 65, 76, 71, 65, 82, 128, 82, 69, 65, 72, 77, 85, 75,
- 128, 82, 69, 65, 67, 72, 128, 82, 68, 207, 82, 68, 69, 204, 82, 66, 65,
- 83, 193, 82, 65, 89, 83, 128, 82, 65, 89, 65, 78, 78, 65, 128, 82, 65,
- 84, 73, 79, 128, 82, 65, 84, 72, 65, 128, 82, 65, 84, 72, 193, 82, 65,
- 84, 65, 128, 82, 65, 84, 128, 82, 65, 83, 87, 65, 68, 73, 128, 82, 65,
- 83, 79, 85, 204, 82, 65, 83, 72, 65, 128, 82, 65, 81, 128, 82, 65, 80,
- 73, 83, 77, 65, 128, 82, 65, 78, 71, 197, 82, 65, 78, 65, 128, 82, 65,
- 78, 128, 82, 65, 77, 211, 82, 65, 77, 66, 65, 84, 128, 82, 65, 75, 72,
- 65, 78, 71, 128, 82, 65, 75, 65, 65, 82, 65, 65, 78, 83, 65, 89, 65, 128,
- 82, 65, 73, 83, 73, 78, 199, 82, 65, 73, 83, 69, 196, 82, 65, 73, 78, 66,
- 79, 87, 128, 82, 65, 73, 76, 87, 65, 89, 128, 82, 65, 73, 76, 87, 65,
- 217, 82, 65, 73, 76, 128, 82, 65, 73, 68, 207, 82, 65, 73, 68, 65, 128,
- 82, 65, 72, 77, 65, 84, 85, 76, 76, 65, 200, 82, 65, 72, 128, 82, 65, 70,
- 69, 128, 82, 65, 69, 77, 128, 82, 65, 68, 73, 79, 65, 67, 84, 73, 86,
- 197, 82, 65, 68, 73, 79, 128, 82, 65, 68, 73, 207, 82, 65, 68, 201, 82,
- 65, 68, 128, 82, 65, 196, 82, 65, 67, 81, 85, 69, 212, 82, 65, 67, 73,
- 78, 71, 128, 82, 65, 66, 66, 73, 84, 128, 82, 65, 66, 66, 73, 212, 82,
- 65, 66, 128, 82, 65, 65, 73, 128, 82, 65, 51, 128, 82, 65, 50, 128, 82,
- 65, 45, 50, 128, 82, 48, 50, 57, 128, 82, 48, 50, 56, 128, 82, 48, 50,
- 55, 128, 82, 48, 50, 54, 128, 82, 48, 50, 53, 128, 82, 48, 50, 52, 128,
- 82, 48, 50, 51, 128, 82, 48, 50, 50, 128, 82, 48, 50, 49, 128, 82, 48,
- 50, 48, 128, 82, 48, 49, 57, 128, 82, 48, 49, 56, 128, 82, 48, 49, 55,
- 128, 82, 48, 49, 54, 65, 128, 82, 48, 49, 54, 128, 82, 48, 49, 53, 128,
- 82, 48, 49, 52, 128, 82, 48, 49, 51, 128, 82, 48, 49, 50, 128, 82, 48,
- 49, 49, 128, 82, 48, 49, 48, 65, 128, 82, 48, 49, 48, 128, 82, 48, 48,
- 57, 128, 82, 48, 48, 56, 128, 82, 48, 48, 55, 128, 82, 48, 48, 54, 128,
- 82, 48, 48, 53, 128, 82, 48, 48, 52, 128, 82, 48, 48, 51, 66, 128, 82,
- 48, 48, 51, 65, 128, 82, 48, 48, 51, 128, 82, 48, 48, 50, 65, 128, 82,
- 48, 48, 50, 128, 82, 48, 48, 49, 128, 82, 45, 67, 82, 69, 197, 81, 89,
- 88, 128, 81, 89, 85, 128, 81, 89, 84, 128, 81, 89, 82, 88, 128, 81, 89,
- 82, 128, 81, 89, 80, 128, 81, 89, 79, 128, 81, 89, 73, 128, 81, 89, 69,
- 69, 128, 81, 89, 69, 128, 81, 89, 65, 65, 128, 81, 89, 65, 128, 81, 89,
- 128, 81, 87, 73, 128, 81, 87, 69, 69, 128, 81, 87, 69, 128, 81, 87, 65,
- 65, 128, 81, 87, 65, 128, 81, 85, 88, 128, 81, 85, 86, 128, 81, 85, 85,
- 86, 128, 81, 85, 85, 128, 81, 85, 84, 128, 81, 85, 83, 72, 83, 72, 65,
- 89, 65, 128, 81, 85, 82, 88, 128, 81, 85, 82, 128, 81, 85, 80, 128, 81,
- 85, 79, 88, 128, 81, 85, 79, 84, 197, 81, 85, 79, 84, 65, 84, 73, 79,
- 206, 81, 85, 79, 84, 128, 81, 85, 79, 80, 128, 81, 85, 79, 128, 81, 85,
- 75, 128, 81, 85, 73, 78, 84, 69, 83, 83, 69, 78, 67, 69, 128, 81, 85, 73,
- 78, 68, 73, 67, 69, 83, 73, 77, 193, 81, 85, 73, 78, 67, 85, 78, 88, 128,
- 81, 85, 73, 78, 65, 82, 73, 85, 211, 81, 85, 73, 76, 76, 128, 81, 85, 73,
- 67, 203, 81, 85, 73, 128, 81, 85, 70, 128, 81, 85, 69, 83, 84, 73, 79,
- 78, 69, 196, 81, 85, 69, 83, 84, 73, 79, 78, 128, 81, 85, 69, 83, 84, 73,
- 79, 206, 81, 85, 69, 69, 78, 128, 81, 85, 69, 69, 206, 81, 85, 69, 128,
- 81, 85, 66, 85, 84, 83, 128, 81, 85, 65, 84, 69, 82, 78, 73, 79, 206, 81,
- 85, 65, 82, 84, 69, 82, 83, 128, 81, 85, 65, 82, 84, 69, 82, 211, 81, 85,
- 65, 82, 84, 69, 82, 128, 81, 85, 65, 82, 84, 69, 210, 81, 85, 65, 78, 84,
- 73, 84, 217, 81, 85, 65, 68, 82, 85, 80, 76, 197, 81, 85, 65, 68, 82, 65,
- 78, 84, 128, 81, 85, 65, 68, 82, 65, 78, 212, 81, 85, 65, 68, 128, 81,
- 85, 65, 196, 81, 85, 65, 128, 81, 85, 128, 81, 208, 81, 79, 88, 128, 81,
- 79, 84, 128, 81, 79, 80, 72, 128, 81, 79, 80, 65, 128, 81, 79, 80, 128,
- 81, 79, 79, 128, 81, 79, 207, 81, 79, 70, 128, 81, 79, 198, 81, 79, 65,
- 128, 81, 79, 128, 81, 78, 128, 81, 73, 88, 128, 81, 73, 84, 83, 65, 128,
- 81, 73, 84, 128, 81, 73, 80, 128, 81, 73, 73, 128, 81, 73, 69, 88, 128,
- 81, 73, 69, 84, 128, 81, 73, 69, 80, 128, 81, 73, 69, 128, 81, 73, 128,
- 81, 72, 87, 73, 128, 81, 72, 87, 69, 69, 128, 81, 72, 87, 69, 128, 81,
- 72, 87, 65, 65, 128, 81, 72, 87, 65, 128, 81, 72, 85, 128, 81, 72, 79,
- 128, 81, 72, 73, 128, 81, 72, 69, 69, 128, 81, 72, 69, 128, 81, 72, 65,
- 65, 128, 81, 72, 65, 128, 81, 71, 65, 128, 81, 69, 84, 65, 78, 65, 128,
- 81, 69, 69, 128, 81, 69, 128, 81, 65, 85, 128, 81, 65, 84, 65, 78, 128,
- 81, 65, 82, 78, 69, 217, 81, 65, 82, 128, 81, 65, 81, 128, 81, 65, 80,
- 72, 128, 81, 65, 77, 65, 84, 83, 128, 81, 65, 77, 65, 84, 211, 81, 65,
- 76, 193, 81, 65, 73, 82, 84, 72, 82, 65, 128, 81, 65, 73, 128, 81, 65,
- 70, 128, 81, 65, 198, 81, 65, 68, 77, 65, 128, 81, 65, 65, 73, 128, 81,
- 65, 65, 70, 85, 128, 81, 65, 65, 70, 128, 81, 48, 48, 55, 128, 81, 48,
- 48, 54, 128, 81, 48, 48, 53, 128, 81, 48, 48, 52, 128, 81, 48, 48, 51,
- 128, 81, 48, 48, 50, 128, 81, 48, 48, 49, 128, 80, 90, 128, 80, 89, 88,
- 128, 80, 89, 84, 128, 80, 89, 82, 88, 128, 80, 89, 82, 128, 80, 89, 80,
- 128, 80, 89, 128, 80, 87, 79, 89, 128, 80, 87, 79, 79, 128, 80, 87, 79,
- 128, 80, 87, 207, 80, 87, 73, 73, 128, 80, 87, 73, 128, 80, 87, 69, 69,
- 128, 80, 87, 69, 128, 80, 87, 65, 65, 128, 80, 87, 128, 80, 86, 128, 80,
- 85, 88, 128, 80, 85, 85, 84, 128, 80, 85, 85, 128, 80, 85, 84, 82, 69,
- 70, 65, 67, 84, 73, 79, 78, 128, 80, 85, 84, 128, 80, 85, 212, 80, 85,
- 83, 72, 80, 73, 78, 128, 80, 85, 83, 72, 80, 73, 75, 65, 128, 80, 85, 83,
- 72, 73, 78, 199, 80, 85, 82, 88, 128, 80, 85, 82, 83, 69, 128, 80, 85,
- 82, 80, 76, 197, 80, 85, 82, 78, 65, 77, 65, 128, 80, 85, 82, 73, 84, 89,
- 128, 80, 85, 82, 73, 70, 89, 128, 80, 85, 82, 128, 80, 85, 81, 128, 80,
- 85, 80, 128, 80, 85, 79, 88, 128, 80, 85, 79, 80, 128, 80, 85, 79, 128,
- 80, 85, 78, 71, 65, 65, 77, 128, 80, 85, 78, 71, 128, 80, 85, 78, 67, 84,
- 85, 65, 84, 73, 79, 78, 128, 80, 85, 78, 67, 84, 85, 65, 84, 73, 79, 206,
- 80, 85, 77, 80, 128, 80, 85, 77, 128, 80, 85, 69, 128, 80, 85, 66, 76,
- 73, 195, 80, 85, 65, 81, 128, 80, 85, 65, 69, 128, 80, 85, 50, 128, 80,
- 85, 49, 128, 80, 85, 128, 80, 84, 72, 65, 72, 193, 80, 84, 69, 128, 80,
- 83, 73, 76, 201, 80, 83, 73, 70, 73, 83, 84, 79, 83, 89, 78, 65, 71, 77,
- 65, 128, 80, 83, 73, 70, 73, 83, 84, 79, 80, 65, 82, 65, 75, 65, 76, 69,
- 83, 77, 65, 128, 80, 83, 73, 70, 73, 83, 84, 79, 206, 80, 83, 73, 70, 73,
- 83, 84, 79, 76, 89, 71, 73, 83, 77, 65, 128, 80, 83, 73, 128, 80, 83,
+ 83, 69, 82, 73, 70, 128, 83, 69, 81, 85, 69, 78, 84, 73, 65, 76, 128, 83,
+ 69, 81, 85, 69, 78, 67, 197, 83, 69, 80, 84, 85, 80, 76, 197, 83, 69, 80,
+ 84, 69, 77, 66, 69, 82, 128, 83, 69, 80, 65, 82, 65, 84, 79, 82, 128, 83,
+ 69, 80, 65, 82, 65, 84, 79, 210, 83, 69, 78, 84, 79, 128, 83, 69, 78, 84,
+ 73, 128, 83, 69, 77, 85, 78, 67, 73, 193, 83, 69, 77, 75, 65, 84, 72,
+ 128, 83, 69, 77, 75, 128, 83, 69, 77, 73, 86, 79, 87, 69, 204, 83, 69,
+ 77, 73, 83, 79, 70, 212, 83, 69, 77, 73, 83, 69, 88, 84, 73, 76, 69, 128,
+ 83, 69, 77, 73, 77, 73, 78, 73, 77, 193, 83, 69, 77, 73, 68, 73, 82, 69,
+ 67, 212, 83, 69, 77, 73, 67, 79, 76, 79, 78, 128, 83, 69, 77, 73, 67, 79,
+ 76, 79, 206, 83, 69, 77, 73, 67, 73, 82, 67, 85, 76, 65, 210, 83, 69, 77,
+ 73, 67, 73, 82, 67, 76, 197, 83, 69, 77, 73, 66, 82, 69, 86, 73, 211, 83,
+ 69, 77, 73, 45, 86, 79, 73, 67, 69, 196, 83, 69, 76, 70, 128, 83, 69, 76,
+ 69, 67, 84, 79, 82, 45, 57, 57, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45,
+ 57, 56, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 57, 55, 128, 83, 69, 76,
+ 69, 67, 84, 79, 82, 45, 57, 54, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45,
+ 57, 53, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 57, 52, 128, 83, 69, 76,
+ 69, 67, 84, 79, 82, 45, 57, 51, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45,
+ 57, 50, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 57, 49, 128, 83, 69, 76,
+ 69, 67, 84, 79, 82, 45, 57, 48, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45,
+ 57, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 56, 57, 128, 83, 69, 76, 69,
+ 67, 84, 79, 82, 45, 56, 56, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 56,
+ 55, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 56, 54, 128, 83, 69, 76, 69,
+ 67, 84, 79, 82, 45, 56, 53, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 56,
+ 52, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 56, 51, 128, 83, 69, 76, 69,
+ 67, 84, 79, 82, 45, 56, 50, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 56,
+ 49, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 56, 48, 128, 83, 69, 76, 69,
+ 67, 84, 79, 82, 45, 56, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 55, 57,
+ 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 55, 56, 128, 83, 69, 76, 69, 67,
+ 84, 79, 82, 45, 55, 55, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 55, 54,
+ 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 55, 53, 128, 83, 69, 76, 69, 67,
+ 84, 79, 82, 45, 55, 52, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 55, 51,
+ 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 55, 50, 128, 83, 69, 76, 69, 67,
+ 84, 79, 82, 45, 55, 49, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 55, 48,
+ 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 55, 128, 83, 69, 76, 69, 67, 84,
+ 79, 82, 45, 54, 57, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 54, 56, 128,
+ 83, 69, 76, 69, 67, 84, 79, 82, 45, 54, 55, 128, 83, 69, 76, 69, 67, 84,
+ 79, 82, 45, 54, 54, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 54, 53, 128,
+ 83, 69, 76, 69, 67, 84, 79, 82, 45, 54, 52, 128, 83, 69, 76, 69, 67, 84,
+ 79, 82, 45, 54, 51, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 54, 50, 128,
+ 83, 69, 76, 69, 67, 84, 79, 82, 45, 54, 49, 128, 83, 69, 76, 69, 67, 84,
+ 79, 82, 45, 54, 48, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 54, 128, 83,
+ 69, 76, 69, 67, 84, 79, 82, 45, 53, 57, 128, 83, 69, 76, 69, 67, 84, 79,
+ 82, 45, 53, 56, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 53, 55, 128, 83,
+ 69, 76, 69, 67, 84, 79, 82, 45, 53, 54, 128, 83, 69, 76, 69, 67, 84, 79,
+ 82, 45, 53, 53, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 53, 52, 128, 83,
+ 69, 76, 69, 67, 84, 79, 82, 45, 53, 51, 128, 83, 69, 76, 69, 67, 84, 79,
+ 82, 45, 53, 50, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 53, 49, 128, 83,
+ 69, 76, 69, 67, 84, 79, 82, 45, 53, 48, 128, 83, 69, 76, 69, 67, 84, 79,
+ 82, 45, 53, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 52, 57, 128, 83, 69,
+ 76, 69, 67, 84, 79, 82, 45, 52, 56, 128, 83, 69, 76, 69, 67, 84, 79, 82,
+ 45, 52, 55, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 52, 54, 128, 83, 69,
+ 76, 69, 67, 84, 79, 82, 45, 52, 53, 128, 83, 69, 76, 69, 67, 84, 79, 82,
+ 45, 52, 52, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 52, 51, 128, 83, 69,
+ 76, 69, 67, 84, 79, 82, 45, 52, 50, 128, 83, 69, 76, 69, 67, 84, 79, 82,
+ 45, 52, 49, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 52, 48, 128, 83, 69,
+ 76, 69, 67, 84, 79, 82, 45, 52, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45,
+ 51, 57, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 51, 56, 128, 83, 69, 76,
+ 69, 67, 84, 79, 82, 45, 51, 55, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45,
+ 51, 54, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 51, 53, 128, 83, 69, 76,
+ 69, 67, 84, 79, 82, 45, 51, 52, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45,
+ 51, 51, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 51, 50, 128, 83, 69, 76,
+ 69, 67, 84, 79, 82, 45, 51, 49, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45,
+ 51, 48, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 51, 128, 83, 69, 76, 69,
+ 67, 84, 79, 82, 45, 50, 57, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50,
+ 56, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 55, 128, 83, 69, 76, 69,
+ 67, 84, 79, 82, 45, 50, 54, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50,
+ 53, 54, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 53, 53, 128, 83, 69,
+ 76, 69, 67, 84, 79, 82, 45, 50, 53, 52, 128, 83, 69, 76, 69, 67, 84, 79,
+ 82, 45, 50, 53, 51, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 53, 50,
+ 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 53, 49, 128, 83, 69, 76, 69,
+ 67, 84, 79, 82, 45, 50, 53, 48, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45,
+ 50, 53, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 52, 57, 128, 83, 69,
+ 76, 69, 67, 84, 79, 82, 45, 50, 52, 56, 128, 83, 69, 76, 69, 67, 84, 79,
+ 82, 45, 50, 52, 55, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 52, 54,
+ 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 52, 53, 128, 83, 69, 76, 69,
+ 67, 84, 79, 82, 45, 50, 52, 52, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45,
+ 50, 52, 51, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 52, 50, 128, 83,
+ 69, 76, 69, 67, 84, 79, 82, 45, 50, 52, 49, 128, 83, 69, 76, 69, 67, 84,
+ 79, 82, 45, 50, 52, 48, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 52,
+ 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 51, 57, 128, 83, 69, 76, 69,
+ 67, 84, 79, 82, 45, 50, 51, 56, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45,
+ 50, 51, 55, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 51, 54, 128, 83,
+ 69, 76, 69, 67, 84, 79, 82, 45, 50, 51, 53, 128, 83, 69, 76, 69, 67, 84,
+ 79, 82, 45, 50, 51, 52, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 51,
+ 51, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 51, 50, 128, 83, 69, 76,
+ 69, 67, 84, 79, 82, 45, 50, 51, 49, 128, 83, 69, 76, 69, 67, 84, 79, 82,
+ 45, 50, 51, 48, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 51, 128, 83,
+ 69, 76, 69, 67, 84, 79, 82, 45, 50, 50, 57, 128, 83, 69, 76, 69, 67, 84,
+ 79, 82, 45, 50, 50, 56, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 50,
+ 55, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 50, 54, 128, 83, 69, 76,
+ 69, 67, 84, 79, 82, 45, 50, 50, 53, 128, 83, 69, 76, 69, 67, 84, 79, 82,
+ 45, 50, 50, 52, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 50, 51, 128,
+ 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 50, 50, 128, 83, 69, 76, 69, 67,
+ 84, 79, 82, 45, 50, 50, 49, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50,
+ 50, 48, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 50, 128, 83, 69, 76,
+ 69, 67, 84, 79, 82, 45, 50, 49, 57, 128, 83, 69, 76, 69, 67, 84, 79, 82,
+ 45, 50, 49, 56, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 49, 55, 128,
+ 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 49, 54, 128, 83, 69, 76, 69, 67,
+ 84, 79, 82, 45, 50, 49, 53, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50,
+ 49, 52, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 49, 51, 128, 83, 69,
+ 76, 69, 67, 84, 79, 82, 45, 50, 49, 50, 128, 83, 69, 76, 69, 67, 84, 79,
+ 82, 45, 50, 49, 49, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 49, 48,
+ 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 49, 128, 83, 69, 76, 69, 67,
+ 84, 79, 82, 45, 50, 48, 57, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50,
+ 48, 56, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 48, 55, 128, 83, 69,
+ 76, 69, 67, 84, 79, 82, 45, 50, 48, 54, 128, 83, 69, 76, 69, 67, 84, 79,
+ 82, 45, 50, 48, 53, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 48, 52,
+ 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 48, 51, 128, 83, 69, 76, 69,
+ 67, 84, 79, 82, 45, 50, 48, 50, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45,
+ 50, 48, 49, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 50, 48, 48, 128, 83,
+ 69, 76, 69, 67, 84, 79, 82, 45, 50, 48, 128, 83, 69, 76, 69, 67, 84, 79,
+ 82, 45, 50, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 57, 57, 128, 83,
+ 69, 76, 69, 67, 84, 79, 82, 45, 49, 57, 56, 128, 83, 69, 76, 69, 67, 84,
+ 79, 82, 45, 49, 57, 55, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 57,
+ 54, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 57, 53, 128, 83, 69, 76,
+ 69, 67, 84, 79, 82, 45, 49, 57, 52, 128, 83, 69, 76, 69, 67, 84, 79, 82,
+ 45, 49, 57, 51, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 57, 50, 128,
+ 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 57, 49, 128, 83, 69, 76, 69, 67,
+ 84, 79, 82, 45, 49, 57, 48, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49,
+ 57, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 56, 57, 128, 83, 69, 76,
+ 69, 67, 84, 79, 82, 45, 49, 56, 56, 128, 83, 69, 76, 69, 67, 84, 79, 82,
+ 45, 49, 56, 55, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 56, 54, 128,
+ 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 56, 53, 128, 83, 69, 76, 69, 67,
+ 84, 79, 82, 45, 49, 56, 52, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49,
+ 56, 51, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 56, 50, 128, 83, 69,
+ 76, 69, 67, 84, 79, 82, 45, 49, 56, 49, 128, 83, 69, 76, 69, 67, 84, 79,
+ 82, 45, 49, 56, 48, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 56, 128,
+ 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 55, 57, 128, 83, 69, 76, 69, 67,
+ 84, 79, 82, 45, 49, 55, 56, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49,
+ 55, 55, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 55, 54, 128, 83, 69,
+ 76, 69, 67, 84, 79, 82, 45, 49, 55, 53, 128, 83, 69, 76, 69, 67, 84, 79,
+ 82, 45, 49, 55, 52, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 55, 51,
+ 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 55, 50, 128, 83, 69, 76, 69,
+ 67, 84, 79, 82, 45, 49, 55, 49, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45,
+ 49, 55, 48, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 55, 128, 83, 69,
+ 76, 69, 67, 84, 79, 82, 45, 49, 54, 57, 128, 83, 69, 76, 69, 67, 84, 79,
+ 82, 45, 49, 54, 56, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 54, 55,
+ 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 54, 54, 128, 83, 69, 76, 69,
+ 67, 84, 79, 82, 45, 49, 54, 53, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45,
+ 49, 54, 52, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 54, 51, 128, 83,
+ 69, 76, 69, 67, 84, 79, 82, 45, 49, 54, 50, 128, 83, 69, 76, 69, 67, 84,
+ 79, 82, 45, 49, 54, 49, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 54,
+ 48, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 54, 128, 83, 69, 76, 69,
+ 67, 84, 79, 82, 45, 49, 53, 57, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45,
+ 49, 53, 56, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 53, 55, 128, 83,
+ 69, 76, 69, 67, 84, 79, 82, 45, 49, 53, 54, 128, 83, 69, 76, 69, 67, 84,
+ 79, 82, 45, 49, 53, 53, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 53,
+ 52, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 53, 51, 128, 83, 69, 76,
+ 69, 67, 84, 79, 82, 45, 49, 53, 50, 128, 83, 69, 76, 69, 67, 84, 79, 82,
+ 45, 49, 53, 49, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 53, 48, 128,
+ 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 53, 128, 83, 69, 76, 69, 67, 84,
+ 79, 82, 45, 49, 52, 57, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 52,
+ 56, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 52, 55, 128, 83, 69, 76,
+ 69, 67, 84, 79, 82, 45, 49, 52, 54, 128, 83, 69, 76, 69, 67, 84, 79, 82,
+ 45, 49, 52, 53, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 52, 52, 128,
+ 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 52, 51, 128, 83, 69, 76, 69, 67,
+ 84, 79, 82, 45, 49, 52, 50, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49,
+ 52, 49, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 52, 48, 128, 83, 69,
+ 76, 69, 67, 84, 79, 82, 45, 49, 52, 128, 83, 69, 76, 69, 67, 84, 79, 82,
+ 45, 49, 51, 57, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 51, 56, 128,
+ 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 51, 55, 128, 83, 69, 76, 69, 67,
+ 84, 79, 82, 45, 49, 51, 54, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49,
+ 51, 53, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 51, 52, 128, 83, 69,
+ 76, 69, 67, 84, 79, 82, 45, 49, 51, 51, 128, 83, 69, 76, 69, 67, 84, 79,
+ 82, 45, 49, 51, 50, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 51, 49,
+ 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 51, 48, 128, 83, 69, 76, 69,
+ 67, 84, 79, 82, 45, 49, 51, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49,
+ 50, 57, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 50, 56, 128, 83, 69,
+ 76, 69, 67, 84, 79, 82, 45, 49, 50, 55, 128, 83, 69, 76, 69, 67, 84, 79,
+ 82, 45, 49, 50, 54, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 50, 53,
+ 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 50, 52, 128, 83, 69, 76, 69,
+ 67, 84, 79, 82, 45, 49, 50, 51, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45,
+ 49, 50, 50, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 50, 49, 128, 83,
+ 69, 76, 69, 67, 84, 79, 82, 45, 49, 50, 48, 128, 83, 69, 76, 69, 67, 84,
+ 79, 82, 45, 49, 50, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 49, 57,
+ 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 49, 56, 128, 83, 69, 76, 69,
+ 67, 84, 79, 82, 45, 49, 49, 55, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45,
+ 49, 49, 54, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 49, 53, 128, 83,
+ 69, 76, 69, 67, 84, 79, 82, 45, 49, 49, 52, 128, 83, 69, 76, 69, 67, 84,
+ 79, 82, 45, 49, 49, 51, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 49,
+ 50, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 49, 49, 128, 83, 69, 76,
+ 69, 67, 84, 79, 82, 45, 49, 49, 48, 128, 83, 69, 76, 69, 67, 84, 79, 82,
+ 45, 49, 49, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 48, 57, 128, 83,
+ 69, 76, 69, 67, 84, 79, 82, 45, 49, 48, 56, 128, 83, 69, 76, 69, 67, 84,
+ 79, 82, 45, 49, 48, 55, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 48,
+ 54, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 48, 53, 128, 83, 69, 76,
+ 69, 67, 84, 79, 82, 45, 49, 48, 52, 128, 83, 69, 76, 69, 67, 84, 79, 82,
+ 45, 49, 48, 51, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 48, 50, 128,
+ 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 48, 49, 128, 83, 69, 76, 69, 67,
+ 84, 79, 82, 45, 49, 48, 48, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49,
+ 48, 128, 83, 69, 76, 69, 67, 84, 79, 82, 45, 49, 128, 83, 69, 76, 69, 67,
+ 84, 79, 82, 128, 83, 69, 76, 69, 67, 84, 79, 210, 83, 69, 76, 69, 67, 84,
+ 69, 196, 83, 69, 73, 83, 77, 65, 128, 83, 69, 73, 83, 77, 193, 83, 69,
+ 72, 128, 83, 69, 71, 79, 76, 128, 83, 69, 71, 78, 79, 128, 83, 69, 71,
+ 77, 69, 78, 84, 128, 83, 69, 69, 86, 128, 83, 69, 69, 78, 85, 128, 83,
+ 69, 69, 78, 128, 83, 69, 69, 206, 83, 69, 69, 68, 76, 73, 78, 71, 128,
+ 83, 69, 69, 45, 78, 79, 45, 69, 86, 73, 204, 83, 69, 67, 84, 79, 82, 128,
+ 83, 69, 67, 84, 73, 79, 78, 128, 83, 69, 67, 84, 73, 79, 206, 83, 69, 67,
+ 82, 69, 84, 128, 83, 69, 67, 79, 78, 68, 128, 83, 69, 67, 65, 78, 84,
+ 128, 83, 69, 66, 65, 84, 66, 69, 73, 212, 83, 69, 65, 84, 128, 83, 69,
+ 65, 76, 128, 83, 69, 65, 71, 85, 76, 204, 83, 68, 79, 78, 199, 83, 68,
+ 128, 83, 67, 87, 65, 128, 83, 67, 82, 85, 80, 76, 69, 128, 83, 67, 82,
+ 79, 76, 76, 128, 83, 67, 82, 73, 80, 84, 128, 83, 67, 82, 69, 69, 78,
+ 128, 83, 67, 82, 69, 69, 206, 83, 67, 82, 69, 65, 77, 73, 78, 199, 83,
+ 67, 79, 82, 80, 73, 85, 83, 128, 83, 67, 79, 82, 80, 73, 79, 78, 128, 83,
+ 67, 79, 82, 69, 128, 83, 67, 73, 83, 83, 79, 82, 83, 128, 83, 67, 73,
+ 128, 83, 67, 72, 87, 65, 128, 83, 67, 72, 87, 193, 83, 67, 72, 82, 79,
+ 69, 68, 69, 82, 128, 83, 67, 72, 79, 79, 76, 128, 83, 67, 72, 79, 79,
+ 204, 83, 67, 72, 79, 76, 65, 82, 128, 83, 67, 72, 69, 77, 193, 83, 67,
+ 69, 80, 84, 69, 210, 83, 67, 65, 78, 68, 73, 67, 85, 83, 128, 83, 67, 65,
+ 78, 68, 73, 67, 85, 211, 83, 67, 65, 206, 83, 67, 65, 76, 69, 83, 128,
+ 83, 66, 85, 194, 83, 66, 82, 85, 204, 83, 65, 89, 73, 83, 201, 83, 65,
+ 89, 65, 78, 78, 65, 128, 83, 65, 89, 128, 83, 65, 88, 79, 80, 72, 79, 78,
+ 69, 128, 83, 65, 88, 73, 77, 65, 84, 65, 128, 83, 65, 87, 65, 78, 128,
+ 83, 65, 87, 128, 83, 65, 86, 79, 85, 82, 73, 78, 199, 83, 65, 85, 82, 65,
+ 83, 72, 84, 82, 193, 83, 65, 85, 73, 76, 128, 83, 65, 84, 85, 82, 78,
+ 128, 83, 65, 84, 75, 65, 65, 78, 75, 85, 85, 128, 83, 65, 84, 75, 65, 65,
+ 78, 128, 83, 65, 84, 69, 76, 76, 73, 84, 69, 128, 83, 65, 84, 69, 76, 76,
+ 73, 84, 197, 83, 65, 84, 67, 72, 69, 76, 128, 83, 65, 84, 65, 78, 71, 65,
+ 128, 83, 65, 83, 72, 128, 83, 65, 83, 65, 75, 128, 83, 65, 82, 73, 128,
+ 83, 65, 82, 193, 83, 65, 82, 128, 83, 65, 81, 128, 83, 65, 80, 65, 128,
+ 83, 65, 78, 89, 79, 79, 71, 193, 83, 65, 78, 89, 65, 75, 193, 83, 65, 78,
+ 84, 73, 73, 77, 85, 128, 83, 65, 78, 78, 89, 65, 128, 83, 65, 78, 71, 65,
+ 50, 128, 83, 65, 78, 68, 72, 201, 83, 65, 78, 68, 65, 76, 128, 83, 65,
+ 78, 65, 72, 128, 83, 65, 78, 128, 83, 65, 77, 89, 79, 203, 83, 65, 77,
+ 86, 65, 84, 128, 83, 65, 77, 80, 73, 128, 83, 65, 77, 80, 72, 65, 79,
+ 128, 83, 65, 77, 75, 65, 128, 83, 65, 77, 69, 75, 72, 128, 83, 65, 77,
+ 69, 75, 200, 83, 65, 77, 66, 65, 128, 83, 65, 77, 65, 82, 73, 84, 65,
+ 206, 83, 65, 77, 128, 83, 65, 76, 84, 73, 82, 69, 128, 83, 65, 76, 84,
+ 73, 76, 76, 79, 128, 83, 65, 76, 84, 45, 50, 128, 83, 65, 76, 84, 128,
+ 83, 65, 76, 212, 83, 65, 76, 76, 65, 76, 76, 65, 72, 79, 213, 83, 65, 76,
+ 76, 193, 83, 65, 76, 65, 205, 83, 65, 76, 65, 128, 83, 65, 76, 45, 65,
+ 77, 77, 79, 78, 73, 65, 67, 128, 83, 65, 76, 128, 83, 65, 75, 79, 84,
+ 128, 83, 65, 75, 72, 193, 83, 65, 75, 69, 85, 65, 69, 128, 83, 65, 75,
+ 197, 83, 65, 74, 68, 65, 72, 128, 83, 65, 73, 76, 66, 79, 65, 84, 128,
+ 83, 65, 73, 76, 128, 83, 65, 73, 75, 85, 82, 85, 128, 83, 65, 72, 128,
+ 83, 65, 71, 73, 84, 84, 65, 82, 73, 85, 83, 128, 83, 65, 71, 65, 128, 83,
+ 65, 71, 128, 83, 65, 199, 83, 65, 70, 72, 65, 128, 83, 65, 70, 69, 84,
+ 217, 83, 65, 68, 72, 69, 128, 83, 65, 68, 69, 128, 83, 65, 68, 128, 83,
+ 65, 196, 83, 65, 67, 82, 73, 70, 73, 67, 73, 65, 204, 83, 65, 65, 73,
+ 128, 83, 65, 65, 68, 72, 85, 128, 83, 65, 45, 73, 128, 83, 65, 45, 50,
+ 128, 83, 48, 52, 54, 128, 83, 48, 52, 53, 128, 83, 48, 52, 52, 128, 83,
+ 48, 52, 51, 128, 83, 48, 52, 50, 128, 83, 48, 52, 49, 128, 83, 48, 52,
+ 48, 128, 83, 48, 51, 57, 128, 83, 48, 51, 56, 128, 83, 48, 51, 55, 128,
+ 83, 48, 51, 54, 128, 83, 48, 51, 53, 65, 128, 83, 48, 51, 53, 128, 83,
+ 48, 51, 52, 128, 83, 48, 51, 51, 128, 83, 48, 51, 50, 128, 83, 48, 51,
+ 49, 128, 83, 48, 51, 48, 128, 83, 48, 50, 57, 128, 83, 48, 50, 56, 128,
+ 83, 48, 50, 55, 128, 83, 48, 50, 54, 66, 128, 83, 48, 50, 54, 65, 128,
+ 83, 48, 50, 54, 128, 83, 48, 50, 53, 128, 83, 48, 50, 52, 128, 83, 48,
+ 50, 51, 128, 83, 48, 50, 50, 128, 83, 48, 50, 49, 128, 83, 48, 50, 48,
+ 128, 83, 48, 49, 57, 128, 83, 48, 49, 56, 128, 83, 48, 49, 55, 65, 128,
+ 83, 48, 49, 55, 128, 83, 48, 49, 54, 128, 83, 48, 49, 53, 128, 83, 48,
+ 49, 52, 66, 128, 83, 48, 49, 52, 65, 128, 83, 48, 49, 52, 128, 83, 48,
+ 49, 51, 128, 83, 48, 49, 50, 128, 83, 48, 49, 49, 128, 83, 48, 49, 48,
+ 128, 83, 48, 48, 57, 128, 83, 48, 48, 56, 128, 83, 48, 48, 55, 128, 83,
+ 48, 48, 54, 65, 128, 83, 48, 48, 54, 128, 83, 48, 48, 53, 128, 83, 48,
+ 48, 52, 128, 83, 48, 48, 51, 128, 83, 48, 48, 50, 65, 128, 83, 48, 48,
+ 50, 128, 83, 48, 48, 49, 128, 83, 45, 87, 128, 83, 45, 83, 72, 65, 80,
+ 69, 196, 82, 89, 89, 128, 82, 89, 88, 128, 82, 89, 84, 128, 82, 89, 82,
+ 88, 128, 82, 89, 82, 128, 82, 89, 80, 128, 82, 87, 79, 79, 128, 82, 87,
+ 79, 128, 82, 87, 73, 73, 128, 82, 87, 73, 128, 82, 87, 69, 69, 128, 82,
+ 87, 69, 128, 82, 87, 65, 72, 65, 128, 82, 87, 65, 65, 128, 82, 87, 65,
+ 128, 82, 85, 88, 128, 82, 85, 85, 66, 85, 82, 85, 128, 82, 85, 85, 128,
+ 82, 85, 84, 128, 82, 85, 83, 73, 128, 82, 85, 82, 88, 128, 82, 85, 82,
+ 128, 82, 85, 80, 73, 73, 128, 82, 85, 80, 69, 197, 82, 85, 80, 128, 82,
+ 85, 79, 88, 128, 82, 85, 79, 80, 128, 82, 85, 79, 128, 82, 85, 78, 79,
+ 85, 84, 128, 82, 85, 78, 78, 73, 78, 199, 82, 85, 78, 78, 69, 82, 128,
+ 82, 85, 78, 128, 82, 85, 77, 201, 82, 85, 77, 65, 201, 82, 85, 77, 128,
+ 82, 85, 205, 82, 85, 76, 69, 82, 128, 82, 85, 76, 69, 45, 68, 69, 76, 65,
+ 89, 69, 68, 128, 82, 85, 76, 69, 128, 82, 85, 76, 65, 73, 128, 82, 85,
+ 75, 75, 65, 75, 72, 65, 128, 82, 85, 73, 83, 128, 82, 85, 71, 66, 217,
+ 82, 85, 68, 73, 77, 69, 78, 84, 193, 82, 85, 66, 76, 197, 82, 85, 194,
+ 82, 85, 65, 128, 82, 84, 72, 65, 78, 199, 82, 84, 65, 71, 83, 128, 82,
+ 84, 65, 71, 211, 82, 82, 89, 88, 128, 82, 82, 89, 84, 128, 82, 82, 89,
+ 82, 88, 128, 82, 82, 89, 82, 128, 82, 82, 89, 80, 128, 82, 82, 85, 88,
+ 128, 82, 82, 85, 85, 128, 82, 82, 85, 84, 128, 82, 82, 85, 82, 88, 128,
+ 82, 82, 85, 82, 128, 82, 82, 85, 80, 128, 82, 82, 85, 79, 88, 128, 82,
+ 82, 85, 79, 128, 82, 82, 85, 128, 82, 82, 82, 65, 128, 82, 82, 79, 88,
+ 128, 82, 82, 79, 84, 128, 82, 82, 79, 80, 128, 82, 82, 79, 79, 128, 82,
+ 82, 79, 128, 82, 82, 73, 73, 128, 82, 82, 73, 128, 82, 82, 69, 88, 128,
+ 82, 82, 69, 84, 128, 82, 82, 69, 80, 128, 82, 82, 69, 72, 128, 82, 82,
+ 69, 200, 82, 82, 69, 69, 128, 82, 82, 69, 128, 82, 82, 65, 88, 128, 82,
+ 82, 65, 85, 128, 82, 82, 65, 73, 128, 82, 82, 65, 65, 128, 82, 79, 87,
+ 66, 79, 65, 84, 128, 82, 79, 85, 78, 68, 69, 196, 82, 79, 85, 78, 68, 45,
+ 84, 73, 80, 80, 69, 196, 82, 79, 84, 85, 78, 68, 65, 128, 82, 79, 84, 65,
+ 84, 73, 79, 78, 83, 128, 82, 79, 84, 65, 84, 73, 79, 78, 45, 87, 65, 76,
+ 76, 80, 76, 65, 78, 197, 82, 79, 84, 65, 84, 73, 79, 78, 45, 70, 76, 79,
+ 79, 82, 80, 76, 65, 78, 197, 82, 79, 84, 65, 84, 73, 79, 78, 128, 82, 79,
+ 84, 65, 84, 73, 79, 206, 82, 79, 84, 65, 84, 69, 196, 82, 79, 83, 72,
+ 128, 82, 79, 83, 69, 84, 84, 69, 128, 82, 79, 83, 69, 128, 82, 79, 79,
+ 84, 128, 82, 79, 79, 83, 84, 69, 82, 128, 82, 79, 79, 75, 128, 82, 79,
+ 79, 70, 128, 82, 79, 77, 65, 78, 73, 65, 206, 82, 79, 77, 65, 206, 82,
+ 79, 77, 128, 82, 79, 76, 76, 73, 78, 199, 82, 79, 76, 76, 69, 210, 82,
+ 79, 76, 76, 69, 68, 45, 85, 208, 82, 79, 72, 73, 78, 71, 89, 193, 82, 79,
+ 71, 128, 82, 79, 196, 82, 79, 67, 75, 69, 84, 128, 82, 79, 67, 203, 82,
+ 79, 67, 128, 82, 79, 66, 79, 212, 82, 79, 66, 65, 84, 128, 82, 79, 65,
+ 83, 84, 69, 196, 82, 79, 65, 82, 128, 82, 79, 65, 128, 82, 78, 89, 73,
+ 78, 199, 82, 78, 79, 79, 78, 128, 82, 78, 79, 79, 206, 82, 78, 65, 205,
+ 82, 77, 84, 128, 82, 76, 79, 128, 82, 76, 77, 128, 82, 76, 73, 128, 82,
+ 76, 69, 128, 82, 74, 69, 211, 82, 74, 69, 128, 82, 74, 197, 82, 73, 86,
+ 69, 82, 128, 82, 73, 84, 85, 65, 76, 128, 82, 73, 84, 84, 79, 82, 85,
+ 128, 82, 73, 84, 83, 73, 128, 82, 73, 83, 73, 78, 199, 82, 73, 83, 72,
+ 128, 82, 73, 82, 65, 128, 82, 73, 80, 80, 76, 197, 82, 73, 80, 128, 82,
+ 73, 78, 71, 211, 82, 73, 78, 71, 73, 78, 199, 82, 73, 78, 70, 79, 82, 90,
+ 65, 78, 68, 79, 128, 82, 73, 206, 82, 73, 77, 71, 66, 65, 128, 82, 73,
+ 77, 128, 82, 73, 75, 82, 73, 75, 128, 82, 73, 71, 86, 69, 68, 73, 195,
+ 82, 73, 71, 72, 84, 87, 65, 82, 68, 83, 128, 82, 73, 71, 72, 84, 72, 65,
+ 78, 196, 82, 73, 71, 72, 84, 45, 84, 79, 45, 76, 69, 70, 212, 82, 73, 71,
+ 72, 84, 45, 83, 73, 68, 197, 82, 73, 71, 72, 84, 45, 83, 72, 65, 68, 79,
+ 87, 69, 196, 82, 73, 71, 72, 84, 45, 83, 72, 65, 68, 69, 196, 82, 73, 71,
+ 72, 84, 45, 80, 79, 73, 78, 84, 73, 78, 199, 82, 73, 71, 72, 84, 45, 76,
+ 73, 71, 72, 84, 69, 196, 82, 73, 71, 72, 84, 45, 72, 65, 78, 68, 69, 196,
+ 82, 73, 71, 72, 84, 45, 72, 65, 78, 196, 82, 73, 71, 72, 84, 45, 70, 65,
+ 67, 73, 78, 199, 82, 73, 71, 72, 84, 128, 82, 73, 69, 85, 76, 45, 89, 69,
+ 83, 73, 69, 85, 78, 71, 128, 82, 73, 69, 85, 76, 45, 89, 69, 79, 82, 73,
+ 78, 72, 73, 69, 85, 72, 45, 72, 73, 69, 85, 72, 128, 82, 73, 69, 85, 76,
+ 45, 89, 69, 79, 82, 73, 78, 72, 73, 69, 85, 72, 128, 82, 73, 69, 85, 76,
+ 45, 84, 73, 75, 69, 85, 84, 45, 72, 73, 69, 85, 72, 128, 82, 73, 69, 85,
+ 76, 45, 84, 73, 75, 69, 85, 84, 128, 82, 73, 69, 85, 76, 45, 84, 72, 73,
+ 69, 85, 84, 72, 128, 82, 73, 69, 85, 76, 45, 83, 83, 65, 78, 71, 84, 73,
+ 75, 69, 85, 84, 128, 82, 73, 69, 85, 76, 45, 83, 83, 65, 78, 71, 83, 73,
+ 79, 83, 128, 82, 73, 69, 85, 76, 45, 83, 83, 65, 78, 71, 80, 73, 69, 85,
+ 80, 128, 82, 73, 69, 85, 76, 45, 83, 83, 65, 78, 71, 75, 73, 89, 69, 79,
+ 75, 128, 82, 73, 69, 85, 76, 45, 83, 73, 79, 83, 128, 82, 73, 69, 85, 76,
+ 45, 80, 73, 69, 85, 80, 45, 84, 73, 75, 69, 85, 84, 128, 82, 73, 69, 85,
+ 76, 45, 80, 73, 69, 85, 80, 45, 83, 73, 79, 83, 128, 82, 73, 69, 85, 76,
+ 45, 80, 73, 69, 85, 80, 45, 80, 72, 73, 69, 85, 80, 72, 128, 82, 73, 69,
+ 85, 76, 45, 80, 73, 69, 85, 80, 45, 72, 73, 69, 85, 72, 128, 82, 73, 69,
+ 85, 76, 45, 80, 73, 69, 85, 80, 128, 82, 73, 69, 85, 76, 45, 80, 72, 73,
+ 69, 85, 80, 72, 128, 82, 73, 69, 85, 76, 45, 80, 65, 78, 83, 73, 79, 83,
+ 128, 82, 73, 69, 85, 76, 45, 78, 73, 69, 85, 78, 128, 82, 73, 69, 85, 76,
+ 45, 77, 73, 69, 85, 77, 45, 83, 73, 79, 83, 128, 82, 73, 69, 85, 76, 45,
+ 77, 73, 69, 85, 77, 45, 75, 73, 89, 69, 79, 75, 128, 82, 73, 69, 85, 76,
+ 45, 77, 73, 69, 85, 77, 45, 72, 73, 69, 85, 72, 128, 82, 73, 69, 85, 76,
+ 45, 77, 73, 69, 85, 77, 128, 82, 73, 69, 85, 76, 45, 75, 73, 89, 69, 79,
+ 75, 45, 83, 73, 79, 83, 128, 82, 73, 69, 85, 76, 45, 75, 73, 89, 69, 79,
+ 75, 45, 72, 73, 69, 85, 72, 128, 82, 73, 69, 85, 76, 45, 75, 73, 89, 69,
+ 79, 75, 128, 82, 73, 69, 85, 76, 45, 75, 65, 80, 89, 69, 79, 85, 78, 80,
+ 73, 69, 85, 80, 128, 82, 73, 69, 85, 76, 45, 72, 73, 69, 85, 72, 128, 82,
+ 73, 69, 85, 76, 45, 67, 73, 69, 85, 67, 128, 82, 73, 69, 85, 204, 82, 73,
+ 69, 76, 128, 82, 73, 69, 69, 128, 82, 73, 67, 69, 77, 128, 82, 73, 67,
+ 69, 128, 82, 73, 67, 197, 82, 73, 66, 66, 79, 78, 128, 82, 73, 66, 66,
+ 79, 206, 82, 73, 65, 204, 82, 72, 79, 84, 73, 195, 82, 72, 79, 128, 82,
+ 72, 207, 82, 72, 65, 128, 82, 72, 128, 82, 71, 89, 73, 78, 71, 83, 128,
+ 82, 71, 89, 65, 78, 128, 82, 71, 89, 193, 82, 69, 86, 79, 76, 86, 73, 78,
+ 199, 82, 69, 86, 79, 76, 85, 84, 73, 79, 78, 128, 82, 69, 86, 77, 65,
+ 128, 82, 69, 86, 73, 65, 128, 82, 69, 86, 69, 82, 83, 69, 68, 45, 83, 67,
+ 72, 87, 65, 128, 82, 69, 86, 69, 82, 83, 69, 68, 128, 82, 69, 86, 69, 82,
+ 83, 69, 196, 82, 69, 86, 69, 82, 83, 197, 82, 69, 85, 88, 128, 82, 69,
+ 85, 128, 82, 69, 84, 85, 82, 78, 128, 82, 69, 84, 85, 82, 206, 82, 69,
+ 84, 82, 79, 70, 76, 69, 216, 82, 69, 84, 82, 69, 65, 84, 128, 82, 69, 84,
+ 79, 82, 84, 128, 82, 69, 83, 85, 80, 73, 78, 85, 83, 128, 82, 69, 83, 84,
+ 82, 79, 79, 77, 128, 82, 69, 83, 84, 82, 73, 67, 84, 69, 196, 82, 69, 83,
+ 84, 128, 82, 69, 83, 80, 79, 78, 83, 69, 128, 82, 69, 83, 79, 85, 82, 67,
+ 69, 128, 82, 69, 83, 79, 76, 85, 84, 73, 79, 78, 128, 82, 69, 83, 73, 83,
+ 84, 65, 78, 67, 69, 128, 82, 69, 83, 73, 68, 69, 78, 67, 69, 128, 82, 69,
+ 83, 200, 82, 69, 82, 69, 78, 71, 71, 65, 78, 128, 82, 69, 82, 69, 75, 65,
+ 78, 128, 82, 69, 80, 82, 69, 83, 69, 78, 84, 128, 82, 69, 80, 76, 65, 67,
+ 69, 77, 69, 78, 212, 82, 69, 80, 72, 128, 82, 69, 80, 69, 84, 73, 84, 73,
+ 79, 206, 82, 69, 80, 69, 65, 84, 69, 196, 82, 69, 80, 69, 65, 84, 128,
+ 82, 69, 80, 69, 65, 212, 82, 69, 80, 65, 89, 65, 128, 82, 69, 80, 65,
+ 128, 82, 69, 80, 193, 82, 69, 78, 84, 79, 71, 69, 78, 128, 82, 69, 78,
+ 128, 82, 69, 206, 82, 69, 77, 85, 128, 82, 69, 77, 73, 78, 68, 69, 210,
+ 82, 69, 77, 69, 68, 89, 128, 82, 69, 76, 73, 71, 73, 79, 78, 128, 82, 69,
+ 76, 73, 69, 86, 69, 196, 82, 69, 76, 69, 65, 83, 69, 128, 82, 69, 76, 65,
+ 88, 69, 68, 128, 82, 69, 76, 65, 84, 73, 79, 78, 65, 204, 82, 69, 76, 65,
+ 84, 73, 79, 78, 128, 82, 69, 76, 65, 65, 128, 82, 69, 74, 65, 78, 199,
+ 82, 69, 73, 196, 82, 69, 73, 128, 82, 69, 71, 85, 76, 85, 83, 45, 52,
+ 128, 82, 69, 71, 85, 76, 85, 83, 45, 51, 128, 82, 69, 71, 85, 76, 85, 83,
+ 45, 50, 128, 82, 69, 71, 85, 76, 85, 83, 128, 82, 69, 71, 85, 76, 85,
+ 211, 82, 69, 71, 73, 83, 84, 69, 82, 69, 196, 82, 69, 71, 73, 79, 78, 65,
+ 204, 82, 69, 71, 73, 65, 45, 50, 128, 82, 69, 71, 73, 65, 128, 82, 69,
+ 70, 79, 82, 77, 69, 196, 82, 69, 70, 69, 82, 69, 78, 67, 197, 82, 69, 68,
+ 85, 80, 76, 73, 67, 65, 84, 73, 79, 78, 128, 82, 69, 67, 89, 67, 76, 73,
+ 78, 199, 82, 69, 67, 89, 67, 76, 69, 196, 82, 69, 67, 84, 73, 76, 73, 78,
+ 69, 65, 210, 82, 69, 67, 84, 65, 78, 71, 85, 76, 65, 210, 82, 69, 67, 84,
+ 65, 78, 71, 76, 69, 128, 82, 69, 67, 84, 65, 78, 71, 76, 197, 82, 69, 67,
+ 82, 69, 65, 84, 73, 79, 78, 65, 204, 82, 69, 67, 79, 82, 68, 73, 78, 199,
+ 82, 69, 67, 79, 82, 68, 69, 82, 128, 82, 69, 67, 79, 82, 68, 128, 82, 69,
+ 67, 79, 82, 196, 82, 69, 67, 73, 84, 65, 84, 73, 86, 197, 82, 69, 67, 69,
+ 80, 84, 73, 86, 197, 82, 69, 67, 69, 73, 86, 69, 82, 128, 82, 69, 67, 69,
+ 73, 86, 69, 210, 82, 69, 65, 76, 71, 65, 82, 45, 50, 128, 82, 69, 65, 76,
+ 71, 65, 82, 128, 82, 69, 65, 72, 77, 85, 75, 128, 82, 69, 65, 67, 72,
+ 128, 82, 68, 207, 82, 68, 69, 204, 82, 66, 65, 83, 193, 82, 65, 89, 83,
+ 128, 82, 65, 89, 211, 82, 65, 89, 65, 78, 78, 65, 128, 82, 65, 84, 73,
+ 79, 128, 82, 65, 84, 72, 65, 128, 82, 65, 84, 72, 193, 82, 65, 84, 65,
+ 128, 82, 65, 84, 128, 82, 65, 83, 87, 65, 68, 73, 128, 82, 65, 83, 79,
+ 85, 204, 82, 65, 83, 72, 65, 128, 82, 65, 81, 128, 82, 65, 80, 73, 83,
+ 77, 65, 128, 82, 65, 78, 71, 197, 82, 65, 78, 65, 128, 82, 65, 78, 128,
+ 82, 65, 77, 211, 82, 65, 77, 66, 65, 84, 128, 82, 65, 75, 72, 65, 78, 71,
+ 128, 82, 65, 75, 65, 65, 82, 65, 65, 78, 83, 65, 89, 65, 128, 82, 65, 73,
+ 83, 73, 78, 199, 82, 65, 73, 83, 69, 196, 82, 65, 73, 78, 66, 79, 87,
+ 128, 82, 65, 73, 76, 87, 65, 89, 128, 82, 65, 73, 76, 87, 65, 217, 82,
+ 65, 73, 76, 128, 82, 65, 73, 68, 207, 82, 65, 73, 68, 65, 128, 82, 65,
+ 72, 77, 65, 84, 85, 76, 76, 65, 200, 82, 65, 72, 128, 82, 65, 70, 69,
+ 128, 82, 65, 69, 77, 128, 82, 65, 68, 73, 79, 65, 67, 84, 73, 86, 197,
+ 82, 65, 68, 73, 79, 128, 82, 65, 68, 73, 207, 82, 65, 68, 201, 82, 65,
+ 68, 128, 82, 65, 196, 82, 65, 67, 81, 85, 69, 212, 82, 65, 67, 73, 78,
+ 71, 128, 82, 65, 67, 73, 78, 199, 82, 65, 66, 66, 73, 84, 128, 82, 65,
+ 66, 66, 73, 212, 82, 65, 66, 128, 82, 65, 65, 73, 128, 82, 65, 51, 128,
+ 82, 65, 50, 128, 82, 65, 45, 50, 128, 82, 48, 50, 57, 128, 82, 48, 50,
+ 56, 128, 82, 48, 50, 55, 128, 82, 48, 50, 54, 128, 82, 48, 50, 53, 128,
+ 82, 48, 50, 52, 128, 82, 48, 50, 51, 128, 82, 48, 50, 50, 128, 82, 48,
+ 50, 49, 128, 82, 48, 50, 48, 128, 82, 48, 49, 57, 128, 82, 48, 49, 56,
+ 128, 82, 48, 49, 55, 128, 82, 48, 49, 54, 65, 128, 82, 48, 49, 54, 128,
+ 82, 48, 49, 53, 128, 82, 48, 49, 52, 128, 82, 48, 49, 51, 128, 82, 48,
+ 49, 50, 128, 82, 48, 49, 49, 128, 82, 48, 49, 48, 65, 128, 82, 48, 49,
+ 48, 128, 82, 48, 48, 57, 128, 82, 48, 48, 56, 128, 82, 48, 48, 55, 128,
+ 82, 48, 48, 54, 128, 82, 48, 48, 53, 128, 82, 48, 48, 52, 128, 82, 48,
+ 48, 51, 66, 128, 82, 48, 48, 51, 65, 128, 82, 48, 48, 51, 128, 82, 48,
+ 48, 50, 65, 128, 82, 48, 48, 50, 128, 82, 48, 48, 49, 128, 82, 45, 67,
+ 82, 69, 197, 81, 89, 88, 128, 81, 89, 85, 128, 81, 89, 84, 128, 81, 89,
+ 82, 88, 128, 81, 89, 82, 128, 81, 89, 80, 128, 81, 89, 79, 128, 81, 89,
+ 73, 128, 81, 89, 69, 69, 128, 81, 89, 69, 128, 81, 89, 65, 65, 128, 81,
+ 89, 65, 128, 81, 89, 128, 81, 87, 73, 128, 81, 87, 69, 69, 128, 81, 87,
+ 69, 128, 81, 87, 65, 65, 128, 81, 87, 65, 128, 81, 85, 88, 128, 81, 85,
+ 86, 128, 81, 85, 85, 86, 128, 81, 85, 85, 128, 81, 85, 84, 128, 81, 85,
+ 83, 72, 83, 72, 65, 89, 65, 128, 81, 85, 82, 88, 128, 81, 85, 82, 128,
+ 81, 85, 80, 128, 81, 85, 79, 88, 128, 81, 85, 79, 84, 197, 81, 85, 79,
+ 84, 65, 84, 73, 79, 206, 81, 85, 79, 84, 128, 81, 85, 79, 80, 128, 81,
+ 85, 79, 128, 81, 85, 75, 128, 81, 85, 73, 78, 84, 69, 83, 83, 69, 78, 67,
+ 69, 128, 81, 85, 73, 78, 68, 73, 67, 69, 83, 73, 77, 193, 81, 85, 73, 78,
+ 67, 85, 78, 88, 128, 81, 85, 73, 78, 65, 82, 73, 85, 211, 81, 85, 73, 76,
+ 212, 81, 85, 73, 76, 76, 128, 81, 85, 73, 67, 203, 81, 85, 73, 128, 81,
+ 85, 70, 128, 81, 85, 69, 83, 84, 73, 79, 78, 69, 196, 81, 85, 69, 83, 84,
+ 73, 79, 78, 128, 81, 85, 69, 83, 84, 73, 79, 206, 81, 85, 69, 69, 78,
+ 128, 81, 85, 69, 69, 206, 81, 85, 69, 128, 81, 85, 66, 85, 84, 83, 128,
+ 81, 85, 65, 84, 69, 82, 78, 73, 79, 206, 81, 85, 65, 82, 84, 69, 82, 83,
+ 128, 81, 85, 65, 82, 84, 69, 82, 211, 81, 85, 65, 82, 84, 69, 82, 128,
+ 81, 85, 65, 78, 84, 73, 84, 217, 81, 85, 65, 68, 82, 85, 80, 76, 197, 81,
+ 85, 65, 68, 82, 65, 78, 84, 128, 81, 85, 65, 68, 82, 65, 78, 212, 81, 85,
+ 65, 68, 67, 79, 76, 79, 78, 128, 81, 85, 65, 68, 128, 81, 85, 65, 196,
+ 81, 85, 65, 128, 81, 85, 128, 81, 208, 81, 79, 88, 128, 81, 79, 84, 128,
+ 81, 79, 80, 72, 128, 81, 79, 80, 65, 128, 81, 79, 80, 128, 81, 79, 79,
+ 128, 81, 79, 207, 81, 79, 70, 128, 81, 79, 198, 81, 79, 65, 128, 81, 79,
+ 128, 81, 78, 128, 81, 73, 88, 128, 81, 73, 84, 83, 65, 128, 81, 73, 84,
+ 128, 81, 73, 80, 128, 81, 73, 73, 128, 81, 73, 69, 88, 128, 81, 73, 69,
+ 84, 128, 81, 73, 69, 80, 128, 81, 73, 69, 128, 81, 73, 128, 81, 72, 87,
+ 73, 128, 81, 72, 87, 69, 69, 128, 81, 72, 87, 69, 128, 81, 72, 87, 65,
+ 65, 128, 81, 72, 87, 65, 128, 81, 72, 85, 128, 81, 72, 79, 80, 72, 128,
+ 81, 72, 79, 128, 81, 72, 73, 128, 81, 72, 69, 69, 128, 81, 72, 69, 128,
+ 81, 72, 65, 85, 128, 81, 72, 65, 65, 128, 81, 72, 65, 128, 81, 71, 65,
+ 128, 81, 69, 84, 65, 78, 65, 128, 81, 69, 69, 128, 81, 69, 128, 81, 65,
+ 89, 128, 81, 65, 85, 128, 81, 65, 84, 65, 78, 128, 81, 65, 82, 78, 69,
+ 217, 81, 65, 82, 128, 81, 65, 81, 128, 81, 65, 80, 72, 128, 81, 65, 77,
+ 65, 84, 83, 128, 81, 65, 77, 65, 84, 211, 81, 65, 76, 193, 81, 65, 73,
+ 82, 84, 72, 82, 65, 128, 81, 65, 73, 128, 81, 65, 70, 128, 81, 65, 198,
+ 81, 65, 68, 77, 65, 128, 81, 65, 65, 73, 128, 81, 65, 65, 70, 85, 128,
+ 81, 65, 65, 70, 128, 81, 48, 48, 55, 128, 81, 48, 48, 54, 128, 81, 48,
+ 48, 53, 128, 81, 48, 48, 52, 128, 81, 48, 48, 51, 128, 81, 48, 48, 50,
+ 128, 81, 48, 48, 49, 128, 80, 90, 128, 80, 89, 88, 128, 80, 89, 84, 128,
+ 80, 89, 82, 88, 128, 80, 89, 82, 128, 80, 89, 80, 128, 80, 87, 79, 89,
+ 128, 80, 87, 79, 79, 128, 80, 87, 79, 128, 80, 87, 207, 80, 87, 73, 73,
+ 128, 80, 87, 73, 128, 80, 87, 69, 69, 128, 80, 87, 69, 128, 80, 87, 65,
+ 65, 128, 80, 87, 128, 80, 86, 128, 80, 85, 88, 128, 80, 85, 85, 84, 128,
+ 80, 85, 85, 128, 80, 85, 84, 82, 69, 70, 65, 67, 84, 73, 79, 78, 128, 80,
+ 85, 84, 128, 80, 85, 212, 80, 85, 83, 72, 80, 73, 78, 128, 80, 85, 83,
+ 72, 80, 73, 75, 65, 128, 80, 85, 83, 72, 73, 78, 199, 80, 85, 82, 88,
+ 128, 80, 85, 82, 83, 69, 128, 80, 85, 82, 80, 76, 197, 80, 85, 82, 78,
+ 65, 77, 65, 128, 80, 85, 82, 73, 84, 89, 128, 80, 85, 82, 73, 70, 89,
+ 128, 80, 85, 82, 128, 80, 85, 81, 128, 80, 85, 80, 128, 80, 85, 79, 88,
+ 128, 80, 85, 79, 80, 128, 80, 85, 79, 128, 80, 85, 78, 71, 65, 65, 77,
+ 128, 80, 85, 78, 71, 128, 80, 85, 78, 67, 84, 85, 65, 84, 73, 79, 78,
+ 128, 80, 85, 78, 67, 84, 85, 65, 84, 73, 79, 206, 80, 85, 77, 80, 128,
+ 80, 85, 77, 128, 80, 85, 70, 70, 69, 68, 128, 80, 85, 69, 128, 80, 85,
+ 67, 75, 128, 80, 85, 66, 76, 73, 195, 80, 85, 194, 80, 85, 65, 81, 128,
+ 80, 85, 65, 69, 128, 80, 85, 50, 128, 80, 85, 49, 128, 80, 85, 128, 80,
+ 84, 72, 65, 72, 193, 80, 84, 69, 128, 80, 83, 73, 76, 201, 80, 83, 73,
+ 70, 73, 83, 84, 79, 83, 89, 78, 65, 71, 77, 65, 128, 80, 83, 73, 70, 73,
+ 83, 84, 79, 80, 65, 82, 65, 75, 65, 76, 69, 83, 77, 65, 128, 80, 83, 73,
+ 70, 73, 83, 84, 79, 206, 80, 83, 73, 70, 73, 83, 84, 79, 76, 89, 71, 73,
+ 83, 77, 65, 128, 80, 83, 73, 128, 80, 83, 65, 76, 84, 69, 210, 80, 83,
128, 80, 82, 79, 86, 69, 128, 80, 82, 79, 84, 79, 86, 65, 82, 89, 211,
80, 82, 79, 84, 79, 211, 80, 82, 79, 84, 69, 67, 84, 69, 196, 80, 82, 79,
83, 71, 69, 71, 82, 65, 77, 77, 69, 78, 73, 128, 80, 82, 79, 80, 79, 82,
84, 73, 79, 78, 65, 204, 80, 82, 79, 80, 79, 82, 84, 73, 79, 78, 128, 80,
82, 79, 80, 69, 82, 84, 217, 80, 82, 79, 80, 69, 76, 76, 69, 210, 80, 82,
79, 79, 70, 128, 80, 82, 79, 76, 79, 78, 71, 69, 196, 80, 82, 79, 76, 65,
- 84, 73, 79, 78, 197, 80, 82, 79, 74, 69, 67, 84, 73, 86, 69, 128, 80, 82,
- 79, 74, 69, 67, 84, 73, 79, 78, 128, 80, 82, 79, 71, 82, 69, 83, 83, 128,
- 80, 82, 79, 71, 82, 65, 205, 80, 82, 79, 70, 79, 85, 78, 68, 128, 80, 82,
- 79, 68, 85, 67, 84, 128, 80, 82, 79, 68, 85, 67, 212, 80, 82, 73, 86, 65,
- 84, 69, 128, 80, 82, 73, 86, 65, 84, 197, 80, 82, 73, 86, 65, 67, 217,
- 80, 82, 73, 83, 72, 84, 72, 65, 77, 65, 84, 82, 193, 80, 82, 73, 78, 84,
- 83, 128, 80, 82, 73, 78, 84, 128, 80, 82, 73, 78, 212, 80, 82, 73, 78,
+ 84, 73, 79, 78, 197, 80, 82, 79, 74, 69, 67, 84, 79, 82, 128, 80, 82, 79,
+ 74, 69, 67, 84, 73, 86, 69, 128, 80, 82, 79, 74, 69, 67, 84, 73, 79, 78,
+ 128, 80, 82, 79, 72, 73, 66, 73, 84, 69, 196, 80, 82, 79, 71, 82, 69, 83,
+ 83, 128, 80, 82, 79, 71, 82, 65, 205, 80, 82, 79, 70, 79, 85, 78, 68,
+ 128, 80, 82, 79, 68, 85, 67, 84, 128, 80, 82, 79, 68, 85, 67, 212, 80,
+ 82, 73, 86, 65, 84, 69, 128, 80, 82, 73, 86, 65, 84, 197, 80, 82, 73, 86,
+ 65, 67, 217, 80, 82, 73, 83, 72, 84, 72, 65, 77, 65, 84, 82, 193, 80, 82,
+ 73, 78, 84, 83, 128, 80, 82, 73, 78, 84, 69, 82, 128, 80, 82, 73, 78, 84,
+ 69, 210, 80, 82, 73, 78, 84, 128, 80, 82, 73, 78, 212, 80, 82, 73, 78,
67, 69, 83, 83, 128, 80, 82, 73, 77, 69, 128, 80, 82, 73, 77, 197, 80,
- 82, 69, 86, 73, 79, 85, 211, 80, 82, 69, 83, 69, 84, 128, 80, 82, 69, 83,
- 69, 78, 84, 65, 84, 73, 79, 206, 80, 82, 69, 83, 67, 82, 73, 80, 84, 73,
- 79, 206, 80, 82, 69, 80, 79, 78, 68, 69, 82, 65, 78, 67, 69, 128, 80, 82,
- 69, 78, 75, 72, 65, 128, 80, 82, 69, 70, 65, 67, 197, 80, 82, 69, 67, 73,
- 80, 73, 84, 65, 84, 69, 128, 80, 82, 69, 67, 69, 68, 73, 78, 199, 80, 82,
- 69, 67, 69, 68, 69, 83, 128, 80, 82, 69, 67, 69, 68, 69, 211, 80, 82, 69,
- 67, 69, 68, 69, 196, 80, 82, 69, 67, 69, 68, 69, 128, 80, 82, 69, 67, 69,
- 68, 197, 80, 82, 65, 77, 45, 80, 73, 73, 128, 80, 82, 65, 77, 45, 80, 73,
- 201, 80, 82, 65, 77, 45, 77, 85, 79, 89, 128, 80, 82, 65, 77, 45, 77, 85,
- 79, 217, 80, 82, 65, 77, 45, 66, 85, 79, 78, 128, 80, 82, 65, 77, 45, 66,
- 85, 79, 206, 80, 82, 65, 77, 45, 66, 69, 73, 128, 80, 82, 65, 77, 45, 66,
- 69, 201, 80, 82, 65, 77, 128, 80, 82, 65, 205, 80, 82, 128, 80, 80, 86,
- 128, 80, 80, 77, 128, 80, 80, 65, 128, 80, 79, 89, 128, 80, 79, 88, 128,
- 80, 79, 87, 69, 82, 211, 80, 79, 87, 69, 82, 128, 80, 79, 87, 68, 69, 82,
- 69, 196, 80, 79, 87, 68, 69, 82, 128, 80, 79, 85, 78, 196, 80, 79, 85,
- 76, 84, 82, 217, 80, 79, 85, 67, 72, 128, 80, 79, 84, 65, 84, 79, 128,
- 80, 79, 84, 65, 66, 76, 197, 80, 79, 212, 80, 79, 83, 84, 80, 79, 83, 73,
- 84, 73, 79, 206, 80, 79, 83, 84, 66, 79, 88, 128, 80, 79, 83, 84, 65,
- 204, 80, 79, 83, 84, 128, 80, 79, 83, 212, 80, 79, 83, 83, 69, 83, 83,
- 73, 79, 78, 128, 80, 79, 82, 82, 69, 67, 84, 85, 83, 128, 80, 79, 82, 82,
- 69, 67, 84, 85, 211, 80, 79, 80, 80, 69, 82, 128, 80, 79, 80, 128, 80,
- 79, 208, 80, 79, 79, 68, 76, 69, 128, 80, 79, 79, 128, 80, 79, 78, 68,
- 79, 128, 80, 79, 206, 80, 79, 77, 77, 69, 69, 128, 80, 79, 77, 77, 69,
- 197, 80, 79, 76, 73, 83, 72, 128, 80, 79, 76, 73, 67, 197, 80, 79, 76,
- 201, 80, 79, 76, 69, 128, 80, 79, 76, 197, 80, 79, 75, 82, 89, 84, 73,
- 69, 128, 80, 79, 75, 79, 74, 73, 128, 80, 79, 73, 78, 84, 211, 80, 79,
- 73, 78, 84, 79, 128, 80, 79, 73, 78, 84, 69, 82, 128, 80, 79, 73, 78, 84,
- 69, 196, 80, 79, 73, 78, 84, 128, 80, 79, 73, 78, 212, 80, 79, 69, 84,
- 82, 217, 80, 79, 69, 84, 73, 195, 80, 79, 68, 65, 84, 85, 83, 128, 80,
- 79, 65, 128, 80, 79, 128, 80, 207, 80, 78, 69, 85, 77, 65, 84, 65, 128,
- 80, 76, 85, 84, 79, 128, 80, 76, 85, 83, 45, 77, 73, 78, 85, 211, 80, 76,
- 85, 83, 128, 80, 76, 85, 82, 65, 76, 128, 80, 76, 85, 77, 69, 196, 80,
- 76, 85, 77, 128, 80, 76, 85, 75, 128, 80, 76, 85, 71, 128, 80, 76, 85,
- 128, 80, 76, 79, 87, 128, 80, 76, 79, 80, 72, 85, 128, 80, 76, 69, 84,
- 72, 82, 79, 78, 128, 80, 76, 68, 128, 80, 76, 65, 89, 73, 78, 199, 80,
+ 82, 69, 86, 73, 79, 85, 211, 80, 82, 69, 83, 83, 69, 196, 80, 82, 69, 83,
+ 69, 84, 128, 80, 82, 69, 83, 69, 78, 84, 65, 84, 73, 79, 206, 80, 82, 69,
+ 83, 67, 82, 73, 80, 84, 73, 79, 206, 80, 82, 69, 80, 79, 78, 68, 69, 82,
+ 65, 78, 67, 69, 128, 80, 82, 69, 78, 75, 72, 65, 128, 80, 82, 69, 70, 65,
+ 67, 197, 80, 82, 69, 67, 73, 80, 73, 84, 65, 84, 69, 128, 80, 82, 69, 67,
+ 69, 68, 73, 78, 199, 80, 82, 69, 67, 69, 68, 69, 83, 128, 80, 82, 69, 67,
+ 69, 68, 69, 211, 80, 82, 69, 67, 69, 68, 69, 196, 80, 82, 69, 67, 69, 68,
+ 69, 128, 80, 82, 69, 67, 69, 68, 197, 80, 82, 65, 89, 69, 210, 80, 82,
+ 65, 77, 45, 80, 73, 73, 128, 80, 82, 65, 77, 45, 80, 73, 201, 80, 82, 65,
+ 77, 45, 77, 85, 79, 89, 128, 80, 82, 65, 77, 45, 77, 85, 79, 217, 80, 82,
+ 65, 77, 45, 66, 85, 79, 78, 128, 80, 82, 65, 77, 45, 66, 85, 79, 206, 80,
+ 82, 65, 77, 45, 66, 69, 73, 128, 80, 82, 65, 77, 45, 66, 69, 201, 80, 82,
+ 65, 77, 128, 80, 82, 65, 205, 80, 82, 128, 80, 80, 86, 128, 80, 80, 77,
+ 128, 80, 80, 65, 128, 80, 79, 89, 128, 80, 79, 88, 128, 80, 79, 87, 69,
+ 82, 211, 80, 79, 87, 69, 82, 128, 80, 79, 87, 68, 69, 82, 69, 196, 80,
+ 79, 87, 68, 69, 82, 128, 80, 79, 85, 78, 196, 80, 79, 85, 76, 84, 82,
+ 217, 80, 79, 85, 67, 72, 128, 80, 79, 84, 65, 84, 79, 128, 80, 79, 84,
+ 65, 66, 76, 197, 80, 79, 212, 80, 79, 83, 84, 80, 79, 83, 73, 84, 73, 79,
+ 206, 80, 79, 83, 84, 66, 79, 88, 128, 80, 79, 83, 84, 65, 204, 80, 79,
+ 83, 84, 128, 80, 79, 83, 212, 80, 79, 83, 83, 69, 83, 83, 73, 79, 78,
+ 128, 80, 79, 83, 73, 84, 73, 79, 78, 83, 128, 80, 79, 82, 84, 65, 66, 76,
+ 197, 80, 79, 82, 82, 69, 67, 84, 85, 83, 128, 80, 79, 82, 82, 69, 67, 84,
+ 85, 211, 80, 79, 80, 80, 73, 78, 199, 80, 79, 80, 80, 69, 82, 128, 80,
+ 79, 80, 67, 79, 82, 78, 128, 80, 79, 80, 128, 80, 79, 208, 80, 79, 79,
+ 68, 76, 69, 128, 80, 79, 79, 128, 80, 79, 78, 68, 79, 128, 80, 79, 206,
+ 80, 79, 77, 77, 69, 69, 128, 80, 79, 77, 77, 69, 197, 80, 79, 76, 73, 83,
+ 72, 128, 80, 79, 76, 73, 67, 197, 80, 79, 76, 201, 80, 79, 76, 69, 128,
+ 80, 79, 76, 197, 80, 79, 75, 82, 89, 84, 73, 69, 128, 80, 79, 75, 79, 74,
+ 73, 128, 80, 79, 73, 78, 84, 211, 80, 79, 73, 78, 84, 79, 128, 80, 79,
+ 73, 78, 84, 69, 82, 128, 80, 79, 73, 78, 84, 69, 196, 80, 79, 73, 78, 84,
+ 128, 80, 79, 73, 78, 212, 80, 79, 69, 84, 82, 217, 80, 79, 69, 84, 73,
+ 195, 80, 79, 68, 65, 84, 85, 83, 128, 80, 79, 67, 75, 69, 212, 80, 79,
+ 65, 128, 80, 79, 128, 80, 207, 80, 78, 69, 85, 77, 65, 84, 65, 128, 80,
+ 76, 85, 84, 79, 128, 80, 76, 85, 84, 65, 128, 80, 76, 85, 83, 45, 77, 73,
+ 78, 85, 211, 80, 76, 85, 83, 128, 80, 76, 85, 82, 65, 76, 128, 80, 76,
+ 85, 77, 69, 196, 80, 76, 85, 77, 128, 80, 76, 85, 75, 128, 80, 76, 85,
+ 71, 128, 80, 76, 85, 128, 80, 76, 79, 87, 128, 80, 76, 79, 80, 72, 85,
+ 128, 80, 76, 72, 65, 85, 128, 80, 76, 69, 84, 72, 82, 79, 78, 128, 80,
+ 76, 68, 128, 80, 76, 65, 89, 73, 78, 199, 80, 76, 65, 84, 69, 128, 80,
76, 65, 83, 84, 73, 67, 83, 128, 80, 76, 65, 78, 69, 128, 80, 76, 65, 78,
- 197, 80, 76, 65, 78, 67, 203, 80, 76, 65, 75, 128, 80, 76, 65, 71, 73,
- 79, 211, 80, 76, 65, 67, 69, 72, 79, 76, 68, 69, 210, 80, 76, 65, 67,
- 197, 80, 76, 65, 128, 80, 73, 90, 90, 73, 67, 65, 84, 79, 128, 80, 73,
- 90, 90, 65, 128, 80, 73, 88, 128, 80, 73, 87, 82, 128, 80, 73, 84, 67,
- 72, 70, 79, 82, 75, 128, 80, 73, 84, 67, 72, 70, 79, 82, 203, 80, 73, 84,
- 128, 80, 73, 83, 84, 79, 76, 128, 80, 73, 83, 69, 76, 69, 72, 128, 80,
- 73, 83, 67, 69, 83, 128, 80, 73, 82, 73, 71, 128, 80, 73, 82, 73, 199,
- 80, 73, 82, 73, 69, 69, 78, 128, 80, 73, 80, 73, 78, 71, 128, 80, 73, 80,
- 65, 69, 77, 71, 66, 73, 69, 69, 128, 80, 73, 80, 65, 69, 77, 66, 65, 128,
- 80, 73, 80, 128, 80, 73, 78, 87, 72, 69, 69, 204, 80, 73, 78, 69, 65, 80,
- 80, 76, 69, 128, 80, 73, 78, 197, 80, 73, 78, 65, 82, 66, 79, 82, 65, 83,
- 128, 80, 73, 76, 76, 128, 80, 73, 76, 197, 80, 73, 76, 67, 82, 79, 215,
- 80, 73, 75, 85, 82, 85, 128, 80, 73, 75, 79, 128, 80, 73, 71, 128, 80,
- 73, 199, 80, 73, 69, 88, 128, 80, 73, 69, 85, 80, 45, 84, 72, 73, 69, 85,
- 84, 72, 128, 80, 73, 69, 85, 80, 45, 83, 83, 65, 78, 71, 83, 73, 79, 83,
- 128, 80, 73, 69, 85, 80, 45, 83, 73, 79, 83, 45, 84, 73, 75, 69, 85, 84,
- 128, 80, 73, 69, 85, 80, 45, 83, 73, 79, 83, 45, 84, 72, 73, 69, 85, 84,
- 72, 128, 80, 73, 69, 85, 80, 45, 83, 73, 79, 83, 45, 80, 73, 69, 85, 80,
- 128, 80, 73, 69, 85, 80, 45, 83, 73, 79, 83, 45, 75, 73, 89, 69, 79, 75,
- 128, 80, 73, 69, 85, 80, 45, 83, 73, 79, 83, 45, 67, 73, 69, 85, 67, 128,
- 80, 73, 69, 85, 80, 45, 82, 73, 69, 85, 76, 45, 80, 72, 73, 69, 85, 80,
- 72, 128, 80, 73, 69, 85, 80, 45, 82, 73, 69, 85, 76, 128, 80, 73, 69, 85,
- 80, 45, 78, 73, 69, 85, 78, 128, 80, 73, 69, 85, 80, 45, 77, 73, 69, 85,
- 77, 128, 80, 73, 69, 85, 80, 45, 75, 72, 73, 69, 85, 75, 72, 128, 80, 73,
- 69, 85, 80, 45, 67, 73, 69, 85, 67, 128, 80, 73, 69, 85, 80, 45, 67, 72,
- 73, 69, 85, 67, 72, 128, 80, 73, 69, 85, 208, 80, 73, 69, 84, 128, 80,
- 73, 69, 80, 128, 80, 73, 69, 69, 84, 128, 80, 73, 69, 69, 81, 128, 80,
- 73, 69, 67, 69, 128, 80, 73, 69, 128, 80, 73, 67, 75, 69, 84, 128, 80,
- 73, 67, 75, 128, 80, 73, 65, 83, 85, 84, 79, 82, 85, 128, 80, 73, 65, 83,
- 77, 193, 80, 73, 65, 78, 79, 128, 80, 201, 80, 72, 87, 65, 128, 80, 72,
- 85, 84, 72, 65, 79, 128, 80, 72, 85, 210, 80, 72, 85, 78, 71, 128, 80,
- 72, 82, 65, 83, 69, 128, 80, 72, 79, 78, 69, 83, 128, 80, 72, 79, 69, 78,
- 73, 67, 73, 65, 206, 80, 72, 79, 65, 128, 80, 72, 79, 128, 80, 72, 207,
- 80, 72, 78, 65, 69, 203, 80, 72, 73, 78, 84, 72, 85, 128, 80, 72, 73, 76,
- 79, 83, 79, 80, 72, 69, 82, 211, 80, 72, 73, 76, 73, 80, 80, 73, 78, 197,
- 80, 72, 73, 69, 85, 80, 72, 45, 84, 72, 73, 69, 85, 84, 72, 128, 80, 72,
- 73, 69, 85, 80, 72, 45, 83, 73, 79, 83, 128, 80, 72, 73, 69, 85, 80, 72,
- 45, 80, 73, 69, 85, 80, 128, 80, 72, 73, 69, 85, 80, 72, 45, 72, 73, 69,
- 85, 72, 128, 80, 72, 73, 69, 85, 80, 200, 80, 72, 73, 128, 80, 72, 201,
- 80, 72, 69, 69, 128, 80, 72, 69, 128, 80, 72, 65, 83, 69, 45, 198, 80,
- 72, 65, 83, 69, 45, 194, 80, 72, 65, 82, 89, 78, 71, 69, 65, 204, 80, 72,
- 65, 82, 128, 80, 72, 65, 78, 128, 80, 72, 65, 77, 128, 80, 72, 65, 73,
- 83, 84, 79, 211, 80, 72, 65, 71, 83, 45, 80, 193, 80, 72, 65, 65, 82, 75,
- 65, 65, 128, 80, 72, 65, 65, 128, 80, 72, 65, 128, 80, 71, 128, 80, 70,
- 128, 80, 69, 85, 88, 128, 80, 69, 85, 84, 65, 69, 128, 80, 69, 85, 84,
- 128, 80, 69, 84, 65, 83, 84, 79, 75, 79, 85, 70, 73, 83, 77, 65, 128, 80,
- 69, 84, 65, 83, 84, 73, 128, 80, 69, 84, 65, 83, 77, 65, 128, 80, 69, 84,
- 65, 76, 76, 69, 196, 80, 69, 83, 79, 128, 80, 69, 83, 207, 80, 69, 83,
- 72, 50, 128, 80, 69, 83, 69, 84, 193, 80, 69, 211, 80, 69, 82, 84, 72,
- 207, 80, 69, 82, 83, 80, 69, 67, 84, 73, 86, 69, 128, 80, 69, 82, 83, 79,
- 78, 65, 204, 80, 69, 82, 83, 79, 78, 128, 80, 69, 82, 83, 79, 206, 80,
- 69, 82, 83, 73, 65, 206, 80, 69, 82, 83, 69, 86, 69, 82, 73, 78, 199, 80,
- 69, 82, 80, 69, 78, 68, 73, 67, 85, 76, 65, 82, 128, 80, 69, 82, 80, 69,
- 78, 68, 73, 67, 85, 76, 65, 210, 80, 69, 82, 77, 73, 84, 84, 69, 196, 80,
- 69, 82, 77, 65, 78, 69, 78, 212, 80, 69, 82, 73, 83, 80, 79, 77, 69, 78,
- 73, 128, 80, 69, 82, 73, 83, 80, 79, 77, 69, 78, 201, 80, 69, 82, 70, 79,
- 82, 77, 73, 78, 199, 80, 69, 82, 70, 69, 67, 84, 85, 205, 80, 69, 82, 70,
- 69, 67, 84, 65, 128, 80, 69, 82, 70, 69, 67, 84, 193, 80, 69, 82, 67, 85,
- 83, 83, 73, 86, 69, 128, 80, 69, 82, 67, 69, 78, 212, 80, 69, 80, 69, 84,
- 128, 80, 69, 80, 69, 212, 80, 69, 79, 82, 84, 200, 80, 69, 79, 80, 76,
- 69, 128, 80, 69, 78, 84, 65, 83, 69, 77, 69, 128, 80, 69, 78, 84, 65, 71,
- 82, 65, 77, 128, 80, 69, 78, 84, 65, 71, 79, 78, 128, 80, 69, 78, 83, 85,
- 128, 80, 69, 78, 83, 73, 86, 197, 80, 69, 78, 78, 217, 80, 69, 78, 73,
- 72, 73, 128, 80, 69, 78, 71, 85, 73, 78, 128, 80, 69, 78, 71, 75, 65, 76,
- 128, 80, 69, 78, 69, 84, 82, 65, 84, 73, 79, 78, 128, 80, 69, 78, 67, 73,
- 76, 128, 80, 69, 76, 65, 83, 84, 79, 78, 128, 80, 69, 76, 65, 83, 84, 79,
- 206, 80, 69, 73, 84, 72, 128, 80, 69, 72, 69, 72, 128, 80, 69, 72, 69,
- 200, 80, 69, 72, 128, 80, 69, 200, 80, 69, 69, 90, 73, 128, 80, 69, 69,
- 83, 72, 73, 128, 80, 69, 69, 80, 128, 80, 69, 69, 77, 128, 80, 69, 69,
- 128, 80, 69, 68, 69, 83, 84, 82, 73, 65, 78, 83, 128, 80, 69, 68, 69, 83,
- 84, 82, 73, 65, 78, 128, 80, 69, 68, 69, 83, 84, 65, 76, 128, 80, 69, 68,
- 69, 83, 84, 65, 204, 80, 69, 68, 65, 204, 80, 69, 65, 67, 72, 128, 80,
- 69, 65, 67, 69, 128, 80, 69, 65, 67, 197, 80, 68, 73, 128, 80, 68, 70,
- 128, 80, 68, 128, 80, 67, 128, 80, 65, 90, 69, 82, 128, 80, 65, 89, 69,
- 82, 79, 75, 128, 80, 65, 89, 65, 78, 78, 65, 128, 80, 65, 89, 128, 80,
- 65, 88, 128, 80, 65, 87, 78, 128, 80, 65, 215, 80, 65, 86, 73, 89, 65,
- 78, 73, 128, 80, 65, 85, 128, 80, 65, 84, 84, 69, 82, 78, 128, 80, 65,
- 84, 72, 65, 77, 65, 83, 65, 84, 128, 80, 65, 84, 200, 80, 65, 84, 65, 75,
- 128, 80, 65, 84, 65, 72, 128, 80, 65, 84, 128, 80, 65, 83, 85, 81, 128,
- 80, 65, 83, 83, 80, 79, 82, 212, 80, 65, 83, 83, 73, 86, 69, 45, 80, 85,
- 76, 76, 45, 85, 80, 45, 79, 85, 84, 80, 85, 212, 80, 65, 83, 83, 73, 86,
- 69, 45, 80, 85, 76, 76, 45, 68, 79, 87, 78, 45, 79, 85, 84, 80, 85, 212,
- 80, 65, 83, 72, 84, 65, 128, 80, 65, 83, 72, 65, 69, 128, 80, 65, 83, 69,
- 81, 128, 80, 65, 83, 65, 78, 71, 65, 206, 80, 65, 82, 85, 77, 128, 80,
- 65, 82, 84, 217, 80, 65, 82, 84, 78, 69, 82, 83, 72, 73, 208, 80, 65, 82,
- 84, 73, 65, 76, 76, 89, 45, 82, 69, 67, 89, 67, 76, 69, 196, 80, 65, 82,
- 84, 73, 65, 204, 80, 65, 82, 84, 72, 73, 65, 206, 80, 65, 82, 212, 80,
- 65, 82, 73, 67, 72, 79, 78, 128, 80, 65, 82, 69, 83, 84, 73, 71, 77, 69,
- 78, 79, 206, 80, 65, 82, 69, 82, 69, 78, 128, 80, 65, 82, 69, 78, 84, 72,
- 69, 83, 73, 83, 128, 80, 65, 82, 69, 78, 84, 72, 69, 83, 73, 211, 80, 65,
- 82, 65, 80, 72, 82, 65, 83, 197, 80, 65, 82, 65, 76, 76, 69, 76, 79, 71,
- 82, 65, 77, 128, 80, 65, 82, 65, 76, 76, 69, 76, 128, 80, 65, 82, 65, 76,
- 76, 69, 204, 80, 65, 82, 65, 75, 76, 73, 84, 73, 75, 73, 128, 80, 65, 82,
- 65, 75, 76, 73, 84, 73, 75, 201, 80, 65, 82, 65, 75, 65, 76, 69, 83, 77,
- 193, 80, 65, 82, 65, 71, 82, 65, 80, 72, 79, 83, 128, 80, 65, 82, 65, 71,
- 82, 65, 80, 72, 128, 80, 65, 82, 65, 71, 82, 65, 80, 200, 80, 65, 82, 65,
- 128, 80, 65, 82, 128, 80, 65, 80, 89, 82, 85, 83, 128, 80, 65, 80, 69,
- 82, 67, 76, 73, 80, 128, 80, 65, 80, 69, 210, 80, 65, 80, 128, 80, 65,
- 208, 80, 65, 207, 80, 65, 78, 89, 85, 75, 85, 128, 80, 65, 78, 89, 73,
- 75, 85, 128, 80, 65, 78, 89, 69, 67, 69, 75, 128, 80, 65, 78, 89, 65, 78,
- 71, 71, 65, 128, 80, 65, 78, 89, 65, 75, 82, 65, 128, 80, 65, 78, 84, 73,
- 128, 80, 65, 78, 83, 73, 79, 83, 45, 80, 73, 69, 85, 80, 128, 80, 65, 78,
- 83, 73, 79, 83, 45, 75, 65, 80, 89, 69, 79, 85, 78, 80, 73, 69, 85, 80,
- 128, 80, 65, 78, 79, 78, 71, 79, 78, 65, 78, 128, 80, 65, 78, 79, 76, 79,
- 78, 71, 128, 80, 65, 78, 71, 87, 73, 83, 65, 68, 128, 80, 65, 78, 71, 82,
- 65, 78, 71, 75, 69, 80, 128, 80, 65, 78, 71, 79, 76, 65, 84, 128, 80, 65,
- 78, 71, 76, 79, 78, 71, 128, 80, 65, 78, 71, 76, 65, 89, 65, 82, 128, 80,
- 65, 78, 71, 75, 79, 78, 128, 80, 65, 78, 71, 75, 65, 84, 128, 80, 65, 78,
- 71, 72, 85, 76, 85, 128, 80, 65, 78, 71, 128, 80, 65, 78, 69, 85, 76, 69,
- 85, 78, 71, 128, 80, 65, 78, 68, 193, 80, 65, 78, 65, 69, 76, 65, 69, 78,
- 71, 128, 80, 65, 78, 128, 80, 65, 77, 85, 78, 71, 75, 65, 72, 128, 80,
- 65, 77, 85, 68, 80, 79, 68, 128, 80, 65, 77, 83, 72, 65, 69, 128, 80, 65,
- 77, 80, 72, 89, 76, 73, 65, 206, 80, 65, 77, 73, 78, 71, 75, 65, 76, 128,
- 80, 65, 77, 69, 80, 69, 84, 128, 80, 65, 77, 69, 78, 69, 78, 71, 128, 80,
- 65, 77, 65, 68, 65, 128, 80, 65, 77, 65, 65, 69, 72, 128, 80, 65, 76, 85,
- 84, 65, 128, 80, 65, 76, 79, 67, 72, 75, 65, 128, 80, 65, 76, 205, 80,
- 65, 76, 76, 65, 87, 65, 128, 80, 65, 76, 76, 65, 83, 128, 80, 65, 76, 69,
- 84, 84, 69, 128, 80, 65, 76, 65, 85, 78, 199, 80, 65, 76, 65, 84, 65, 76,
- 73, 90, 69, 196, 80, 65, 76, 65, 84, 65, 76, 73, 90, 65, 84, 73, 79, 78,
- 128, 80, 65, 76, 65, 84, 65, 204, 80, 65, 75, 80, 65, 203, 80, 65, 73,
- 89, 65, 78, 78, 79, 73, 128, 80, 65, 73, 82, 84, 72, 82, 65, 128, 80, 65,
- 73, 82, 69, 196, 80, 65, 73, 128, 80, 65, 72, 76, 65, 86, 201, 80, 65,
- 72, 128, 80, 65, 71, 69, 82, 128, 80, 65, 71, 197, 80, 65, 68, 77, 193,
- 80, 65, 68, 68, 73, 78, 199, 80, 65, 68, 193, 80, 65, 68, 128, 80, 65,
- 67, 75, 73, 78, 71, 128, 80, 65, 67, 75, 65, 71, 69, 128, 80, 65, 65, 84,
- 85, 128, 80, 65, 65, 83, 69, 78, 84, 79, 128, 80, 65, 65, 82, 65, 69,
- 128, 80, 65, 65, 77, 128, 80, 65, 65, 73, 128, 80, 65, 65, 45, 80, 73,
- 76, 76, 65, 128, 80, 65, 65, 128, 80, 50, 128, 80, 48, 49, 49, 128, 80,
- 48, 49, 48, 128, 80, 48, 48, 57, 128, 80, 48, 48, 56, 128, 80, 48, 48,
- 55, 128, 80, 48, 48, 54, 128, 80, 48, 48, 53, 128, 80, 48, 48, 52, 128,
- 80, 48, 48, 51, 65, 128, 80, 48, 48, 51, 128, 80, 48, 48, 50, 128, 80,
- 48, 48, 49, 65, 128, 80, 48, 48, 49, 128, 79, 89, 82, 65, 78, 73, 83, 77,
- 193, 79, 89, 65, 78, 78, 65, 128, 79, 88, 73, 65, 128, 79, 88, 73, 193,
- 79, 88, 69, 73, 65, 201, 79, 88, 69, 73, 193, 79, 86, 69, 82, 82, 73, 68,
- 69, 128, 79, 86, 69, 82, 76, 79, 78, 199, 79, 86, 69, 82, 76, 73, 78, 69,
- 128, 79, 86, 69, 82, 76, 65, 89, 128, 79, 86, 69, 82, 76, 65, 80, 80, 73,
- 78, 199, 79, 86, 69, 82, 76, 65, 73, 68, 128, 79, 86, 69, 82, 66, 65, 82,
- 128, 79, 86, 65, 204, 79, 86, 128, 79, 85, 84, 76, 73, 78, 69, 196, 79,
- 85, 84, 76, 73, 78, 69, 128, 79, 85, 84, 69, 210, 79, 85, 84, 66, 79,
- 216, 79, 85, 78, 75, 73, 193, 79, 85, 78, 67, 69, 128, 79, 85, 78, 67,
- 197, 79, 84, 85, 128, 79, 84, 84, 65, 86, 193, 79, 84, 84, 128, 79, 84,
- 72, 65, 76, 65, 206, 79, 84, 72, 65, 76, 128, 79, 83, 77, 65, 78, 89,
- 193, 79, 83, 67, 128, 79, 82, 84, 72, 79, 71, 79, 78, 65, 204, 79, 82,
- 84, 72, 79, 68, 79, 216, 79, 82, 78, 65, 84, 197, 79, 82, 78, 65, 77, 69,
- 78, 84, 128, 79, 82, 78, 65, 77, 69, 78, 212, 79, 82, 75, 72, 79, 206,
- 79, 82, 73, 71, 73, 78, 65, 204, 79, 82, 73, 71, 73, 78, 128, 79, 82, 69,
- 45, 50, 128, 79, 82, 68, 73, 78, 65, 204, 79, 82, 68, 69, 210, 79, 82,
- 67, 72, 73, 68, 128, 79, 82, 65, 78, 71, 197, 79, 80, 84, 73, 79, 206,
- 79, 80, 84, 73, 67, 65, 204, 79, 80, 80, 82, 69, 83, 83, 73, 79, 78, 128,
- 79, 80, 80, 79, 83, 73, 84, 73, 79, 78, 128, 79, 80, 80, 79, 83, 73, 78,
- 199, 79, 80, 80, 79, 83, 69, 128, 79, 80, 72, 73, 85, 67, 72, 85, 83,
+ 67, 203, 80, 76, 65, 75, 128, 80, 76, 65, 71, 73, 79, 211, 80, 76, 65,
+ 67, 69, 72, 79, 76, 68, 69, 210, 80, 76, 65, 67, 197, 80, 76, 65, 128,
+ 80, 73, 90, 90, 73, 67, 65, 84, 79, 128, 80, 73, 90, 90, 65, 128, 80, 73,
+ 88, 128, 80, 73, 87, 82, 128, 80, 73, 84, 67, 72, 70, 79, 82, 75, 128,
+ 80, 73, 84, 67, 72, 70, 79, 82, 203, 80, 73, 84, 128, 80, 73, 83, 84, 79,
+ 76, 128, 80, 73, 83, 69, 76, 69, 72, 128, 80, 73, 83, 67, 69, 83, 128,
+ 80, 73, 82, 73, 71, 128, 80, 73, 82, 73, 199, 80, 73, 82, 73, 69, 69, 78,
+ 128, 80, 73, 82, 65, 67, 89, 128, 80, 73, 82, 50, 128, 80, 73, 80, 73,
+ 78, 71, 128, 80, 73, 80, 65, 69, 77, 71, 66, 73, 69, 69, 128, 80, 73, 80,
+ 65, 69, 77, 66, 65, 128, 80, 73, 80, 128, 80, 73, 78, 87, 72, 69, 69,
+ 204, 80, 73, 78, 69, 65, 80, 80, 76, 69, 128, 80, 73, 78, 197, 80, 73,
+ 78, 65, 82, 66, 79, 82, 65, 83, 128, 80, 73, 76, 76, 128, 80, 73, 76,
+ 197, 80, 73, 76, 67, 82, 79, 215, 80, 73, 75, 85, 82, 85, 128, 80, 73,
+ 75, 79, 128, 80, 73, 71, 128, 80, 73, 199, 80, 73, 69, 88, 128, 80, 73,
+ 69, 85, 80, 45, 84, 72, 73, 69, 85, 84, 72, 128, 80, 73, 69, 85, 80, 45,
+ 83, 83, 65, 78, 71, 83, 73, 79, 83, 128, 80, 73, 69, 85, 80, 45, 83, 73,
+ 79, 83, 45, 84, 73, 75, 69, 85, 84, 128, 80, 73, 69, 85, 80, 45, 83, 73,
+ 79, 83, 45, 84, 72, 73, 69, 85, 84, 72, 128, 80, 73, 69, 85, 80, 45, 83,
+ 73, 79, 83, 45, 80, 73, 69, 85, 80, 128, 80, 73, 69, 85, 80, 45, 83, 73,
+ 79, 83, 45, 75, 73, 89, 69, 79, 75, 128, 80, 73, 69, 85, 80, 45, 83, 73,
+ 79, 83, 45, 67, 73, 69, 85, 67, 128, 80, 73, 69, 85, 80, 45, 82, 73, 69,
+ 85, 76, 45, 80, 72, 73, 69, 85, 80, 72, 128, 80, 73, 69, 85, 80, 45, 82,
+ 73, 69, 85, 76, 128, 80, 73, 69, 85, 80, 45, 78, 73, 69, 85, 78, 128, 80,
+ 73, 69, 85, 80, 45, 77, 73, 69, 85, 77, 128, 80, 73, 69, 85, 80, 45, 75,
+ 72, 73, 69, 85, 75, 72, 128, 80, 73, 69, 85, 80, 45, 67, 73, 69, 85, 67,
+ 128, 80, 73, 69, 85, 80, 45, 67, 72, 73, 69, 85, 67, 72, 128, 80, 73, 69,
+ 85, 208, 80, 73, 69, 84, 128, 80, 73, 69, 80, 128, 80, 73, 69, 69, 84,
+ 128, 80, 73, 69, 69, 81, 128, 80, 73, 69, 67, 69, 128, 80, 73, 69, 128,
+ 80, 73, 67, 84, 85, 82, 69, 128, 80, 73, 67, 75, 69, 84, 128, 80, 73, 67,
+ 75, 128, 80, 73, 65, 83, 85, 84, 79, 82, 85, 128, 80, 73, 65, 83, 77,
+ 193, 80, 73, 65, 78, 79, 128, 80, 201, 80, 72, 87, 65, 128, 80, 72, 85,
+ 84, 72, 65, 79, 128, 80, 72, 85, 210, 80, 72, 85, 78, 71, 128, 80, 72,
+ 82, 65, 83, 69, 128, 80, 72, 79, 78, 69, 83, 128, 80, 72, 79, 69, 78, 73,
+ 67, 73, 65, 206, 80, 72, 79, 65, 128, 80, 72, 79, 128, 80, 72, 207, 80,
+ 72, 78, 65, 69, 203, 80, 72, 73, 78, 84, 72, 85, 128, 80, 72, 73, 76, 79,
+ 83, 79, 80, 72, 69, 82, 211, 80, 72, 73, 76, 73, 80, 80, 73, 78, 197, 80,
+ 72, 73, 69, 85, 80, 72, 45, 84, 72, 73, 69, 85, 84, 72, 128, 80, 72, 73,
+ 69, 85, 80, 72, 45, 83, 73, 79, 83, 128, 80, 72, 73, 69, 85, 80, 72, 45,
+ 80, 73, 69, 85, 80, 128, 80, 72, 73, 69, 85, 80, 72, 45, 72, 73, 69, 85,
+ 72, 128, 80, 72, 73, 69, 85, 80, 200, 80, 72, 73, 128, 80, 72, 201, 80,
+ 72, 69, 69, 128, 80, 72, 69, 128, 80, 72, 65, 83, 69, 45, 198, 80, 72,
+ 65, 83, 69, 45, 194, 80, 72, 65, 83, 69, 45, 193, 80, 72, 65, 82, 89, 78,
+ 71, 69, 65, 204, 80, 72, 65, 82, 128, 80, 72, 65, 78, 128, 80, 72, 65,
+ 77, 128, 80, 72, 65, 73, 83, 84, 79, 211, 80, 72, 65, 71, 83, 45, 80,
+ 193, 80, 72, 65, 66, 128, 80, 72, 65, 65, 82, 75, 65, 65, 128, 80, 72,
+ 65, 65, 128, 80, 72, 65, 128, 80, 71, 128, 80, 70, 128, 80, 69, 85, 88,
+ 128, 80, 69, 85, 84, 65, 69, 128, 80, 69, 85, 84, 128, 80, 69, 84, 65,
+ 83, 84, 79, 75, 79, 85, 70, 73, 83, 77, 65, 128, 80, 69, 84, 65, 83, 84,
+ 73, 128, 80, 69, 84, 65, 83, 77, 65, 128, 80, 69, 84, 65, 76, 76, 69,
+ 196, 80, 69, 83, 79, 128, 80, 69, 83, 207, 80, 69, 83, 72, 50, 128, 80,
+ 69, 83, 72, 178, 80, 69, 83, 69, 84, 193, 80, 69, 211, 80, 69, 82, 84,
+ 72, 207, 80, 69, 82, 83, 80, 69, 67, 84, 73, 86, 69, 128, 80, 69, 82, 83,
+ 79, 78, 65, 204, 80, 69, 82, 83, 79, 78, 128, 80, 69, 82, 83, 79, 206,
+ 80, 69, 82, 83, 73, 65, 206, 80, 69, 82, 83, 69, 86, 69, 82, 73, 78, 199,
+ 80, 69, 82, 80, 69, 78, 68, 73, 67, 85, 76, 65, 82, 128, 80, 69, 82, 80,
+ 69, 78, 68, 73, 67, 85, 76, 65, 210, 80, 69, 82, 78, 73, 206, 80, 69, 82,
+ 77, 73, 84, 84, 69, 196, 80, 69, 82, 77, 73, 195, 80, 69, 82, 77, 65, 78,
+ 69, 78, 212, 80, 69, 82, 73, 83, 80, 79, 77, 69, 78, 73, 128, 80, 69, 82,
+ 73, 83, 80, 79, 77, 69, 78, 201, 80, 69, 82, 70, 79, 82, 77, 73, 78, 199,
+ 80, 69, 82, 70, 69, 67, 84, 85, 205, 80, 69, 82, 70, 69, 67, 84, 65, 128,
+ 80, 69, 82, 70, 69, 67, 84, 193, 80, 69, 82, 67, 85, 83, 83, 73, 86, 69,
+ 128, 80, 69, 82, 67, 69, 78, 212, 80, 69, 80, 80, 69, 82, 128, 80, 69,
+ 80, 69, 84, 128, 80, 69, 80, 69, 212, 80, 69, 79, 82, 84, 200, 80, 69,
+ 79, 80, 76, 69, 128, 80, 69, 78, 84, 65, 83, 69, 77, 69, 128, 80, 69, 78,
+ 84, 65, 71, 82, 65, 77, 128, 80, 69, 78, 84, 65, 71, 79, 78, 128, 80, 69,
+ 78, 83, 85, 128, 80, 69, 78, 83, 73, 86, 197, 80, 69, 78, 78, 217, 80,
+ 69, 78, 78, 65, 78, 84, 128, 80, 69, 78, 73, 72, 73, 128, 80, 69, 78, 71,
+ 85, 73, 78, 128, 80, 69, 78, 71, 75, 65, 76, 128, 80, 69, 78, 69, 84, 82,
+ 65, 84, 73, 79, 78, 128, 80, 69, 78, 67, 73, 76, 128, 80, 69, 76, 65, 83,
+ 84, 79, 78, 128, 80, 69, 76, 65, 83, 84, 79, 206, 80, 69, 73, 84, 72,
+ 128, 80, 69, 72, 69, 72, 128, 80, 69, 72, 69, 200, 80, 69, 72, 128, 80,
+ 69, 200, 80, 69, 69, 90, 73, 128, 80, 69, 69, 83, 72, 73, 128, 80, 69,
+ 69, 80, 128, 80, 69, 69, 77, 128, 80, 69, 69, 73, 128, 80, 69, 69, 128,
+ 80, 69, 68, 69, 83, 84, 82, 73, 65, 78, 83, 128, 80, 69, 68, 69, 83, 84,
+ 82, 73, 65, 78, 128, 80, 69, 68, 69, 83, 84, 65, 76, 128, 80, 69, 68, 69,
+ 83, 84, 65, 204, 80, 69, 68, 65, 204, 80, 69, 65, 75, 211, 80, 69, 65,
+ 67, 72, 128, 80, 69, 65, 67, 69, 128, 80, 69, 65, 67, 197, 80, 68, 73,
+ 128, 80, 68, 70, 128, 80, 68, 128, 80, 67, 128, 80, 65, 90, 69, 82, 128,
+ 80, 65, 89, 69, 82, 79, 75, 128, 80, 65, 89, 65, 78, 78, 65, 128, 80, 65,
+ 89, 128, 80, 65, 88, 128, 80, 65, 87, 78, 128, 80, 65, 215, 80, 65, 86,
+ 73, 89, 65, 78, 73, 128, 80, 65, 85, 128, 80, 65, 213, 80, 65, 84, 84,
+ 69, 82, 78, 128, 80, 65, 84, 72, 65, 77, 65, 83, 65, 84, 128, 80, 65, 84,
+ 200, 80, 65, 84, 65, 75, 128, 80, 65, 84, 65, 72, 128, 80, 65, 84, 128,
+ 80, 65, 83, 85, 81, 128, 80, 65, 83, 83, 80, 79, 82, 212, 80, 65, 83, 83,
+ 73, 86, 69, 45, 80, 85, 76, 76, 45, 85, 80, 45, 79, 85, 84, 80, 85, 212,
+ 80, 65, 83, 83, 73, 86, 69, 45, 80, 85, 76, 76, 45, 68, 79, 87, 78, 45,
+ 79, 85, 84, 80, 85, 212, 80, 65, 83, 83, 69, 78, 71, 69, 210, 80, 65, 83,
+ 72, 84, 65, 128, 80, 65, 83, 72, 65, 69, 128, 80, 65, 83, 69, 81, 128,
+ 80, 65, 83, 65, 78, 71, 65, 206, 80, 65, 82, 85, 77, 128, 80, 65, 82, 84,
+ 217, 80, 65, 82, 84, 78, 69, 82, 83, 72, 73, 208, 80, 65, 82, 84, 73, 65,
+ 76, 76, 89, 45, 82, 69, 67, 89, 67, 76, 69, 196, 80, 65, 82, 84, 73, 65,
+ 204, 80, 65, 82, 84, 72, 73, 65, 206, 80, 65, 82, 212, 80, 65, 82, 75,
+ 128, 80, 65, 82, 73, 67, 72, 79, 78, 128, 80, 65, 82, 69, 83, 84, 73, 71,
+ 77, 69, 78, 79, 206, 80, 65, 82, 69, 82, 69, 78, 128, 80, 65, 82, 69, 78,
+ 84, 72, 69, 83, 73, 83, 128, 80, 65, 82, 69, 78, 84, 72, 69, 83, 73, 211,
+ 80, 65, 82, 69, 78, 84, 72, 69, 83, 69, 211, 80, 65, 82, 65, 80, 72, 82,
+ 65, 83, 197, 80, 65, 82, 65, 76, 76, 69, 76, 79, 71, 82, 65, 77, 128, 80,
+ 65, 82, 65, 76, 76, 69, 76, 128, 80, 65, 82, 65, 76, 76, 69, 204, 80, 65,
+ 82, 65, 75, 76, 73, 84, 73, 75, 73, 128, 80, 65, 82, 65, 75, 76, 73, 84,
+ 73, 75, 201, 80, 65, 82, 65, 75, 65, 76, 69, 83, 77, 193, 80, 65, 82, 65,
+ 71, 82, 65, 80, 72, 79, 83, 128, 80, 65, 82, 65, 71, 82, 65, 80, 72, 128,
+ 80, 65, 82, 65, 71, 82, 65, 80, 200, 80, 65, 82, 65, 128, 80, 65, 82,
+ 128, 80, 65, 80, 89, 82, 85, 83, 128, 80, 65, 80, 69, 82, 67, 76, 73, 80,
+ 83, 128, 80, 65, 80, 69, 82, 67, 76, 73, 80, 128, 80, 65, 80, 69, 210,
+ 80, 65, 80, 128, 80, 65, 208, 80, 65, 207, 80, 65, 78, 89, 85, 75, 85,
+ 128, 80, 65, 78, 89, 73, 75, 85, 128, 80, 65, 78, 89, 69, 67, 69, 75,
+ 128, 80, 65, 78, 89, 65, 78, 71, 71, 65, 128, 80, 65, 78, 89, 65, 75, 82,
+ 65, 128, 80, 65, 78, 84, 73, 128, 80, 65, 78, 83, 73, 79, 83, 45, 80, 73,
+ 69, 85, 80, 128, 80, 65, 78, 83, 73, 79, 83, 45, 75, 65, 80, 89, 69, 79,
+ 85, 78, 80, 73, 69, 85, 80, 128, 80, 65, 78, 79, 78, 71, 79, 78, 65, 78,
+ 128, 80, 65, 78, 79, 76, 79, 78, 71, 128, 80, 65, 78, 71, 87, 73, 83, 65,
+ 68, 128, 80, 65, 78, 71, 82, 65, 78, 71, 75, 69, 80, 128, 80, 65, 78, 71,
+ 79, 76, 65, 84, 128, 80, 65, 78, 71, 76, 79, 78, 71, 128, 80, 65, 78, 71,
+ 76, 65, 89, 65, 82, 128, 80, 65, 78, 71, 75, 79, 78, 128, 80, 65, 78, 71,
+ 75, 65, 84, 128, 80, 65, 78, 71, 72, 85, 76, 85, 128, 80, 65, 78, 71,
+ 128, 80, 65, 78, 69, 85, 76, 69, 85, 78, 71, 128, 80, 65, 78, 68, 193,
+ 80, 65, 78, 65, 69, 76, 65, 69, 78, 71, 128, 80, 65, 78, 128, 80, 65, 77,
+ 85, 78, 71, 75, 65, 72, 128, 80, 65, 77, 85, 68, 80, 79, 68, 128, 80, 65,
+ 77, 83, 72, 65, 69, 128, 80, 65, 77, 80, 72, 89, 76, 73, 65, 206, 80, 65,
+ 77, 73, 78, 71, 75, 65, 76, 128, 80, 65, 77, 69, 80, 69, 84, 128, 80, 65,
+ 77, 69, 78, 69, 78, 71, 128, 80, 65, 77, 65, 68, 65, 128, 80, 65, 77, 65,
+ 65, 69, 72, 128, 80, 65, 76, 85, 84, 65, 128, 80, 65, 76, 79, 67, 72, 75,
+ 65, 128, 80, 65, 76, 77, 89, 82, 69, 78, 197, 80, 65, 76, 205, 80, 65,
+ 76, 76, 65, 87, 65, 128, 80, 65, 76, 76, 65, 83, 128, 80, 65, 76, 69, 84,
+ 84, 69, 128, 80, 65, 76, 65, 85, 78, 199, 80, 65, 76, 65, 84, 65, 76, 73,
+ 90, 69, 196, 80, 65, 76, 65, 84, 65, 76, 73, 90, 65, 84, 73, 79, 78, 128,
+ 80, 65, 76, 65, 84, 65, 204, 80, 65, 75, 80, 65, 203, 80, 65, 73, 89, 65,
+ 78, 78, 79, 73, 128, 80, 65, 73, 82, 84, 72, 82, 65, 128, 80, 65, 73, 82,
+ 69, 196, 80, 65, 73, 78, 84, 66, 82, 85, 83, 72, 128, 80, 65, 73, 128,
+ 80, 65, 72, 76, 65, 86, 201, 80, 65, 72, 128, 80, 65, 71, 69, 83, 128,
+ 80, 65, 71, 69, 82, 128, 80, 65, 71, 197, 80, 65, 68, 77, 193, 80, 65,
+ 68, 68, 76, 197, 80, 65, 68, 68, 73, 78, 199, 80, 65, 68, 193, 80, 65,
+ 68, 128, 80, 65, 67, 75, 73, 78, 71, 128, 80, 65, 67, 75, 65, 71, 69,
+ 128, 80, 65, 65, 84, 85, 128, 80, 65, 65, 83, 69, 78, 84, 79, 128, 80,
+ 65, 65, 82, 65, 69, 128, 80, 65, 65, 77, 128, 80, 65, 65, 73, 128, 80,
+ 65, 65, 45, 80, 73, 76, 76, 65, 128, 80, 65, 65, 128, 80, 50, 128, 80,
+ 48, 49, 49, 128, 80, 48, 49, 48, 128, 80, 48, 48, 57, 128, 80, 48, 48,
+ 56, 128, 80, 48, 48, 55, 128, 80, 48, 48, 54, 128, 80, 48, 48, 53, 128,
+ 80, 48, 48, 52, 128, 80, 48, 48, 51, 65, 128, 80, 48, 48, 51, 128, 80,
+ 48, 48, 50, 128, 80, 48, 48, 49, 65, 128, 80, 48, 48, 49, 128, 79, 89,
+ 82, 65, 78, 73, 83, 77, 193, 79, 89, 65, 78, 78, 65, 128, 79, 88, 73, 65,
+ 128, 79, 88, 73, 193, 79, 88, 69, 73, 65, 201, 79, 88, 69, 73, 193, 79,
+ 86, 69, 82, 82, 73, 68, 69, 128, 79, 86, 69, 82, 76, 79, 78, 199, 79, 86,
+ 69, 82, 76, 73, 78, 69, 128, 79, 86, 69, 82, 76, 65, 89, 128, 79, 86, 69,
+ 82, 76, 65, 80, 80, 73, 78, 199, 79, 86, 69, 82, 76, 65, 80, 128, 79, 86,
+ 69, 82, 76, 65, 73, 68, 128, 79, 86, 69, 82, 66, 65, 82, 128, 79, 86, 65,
+ 76, 128, 79, 86, 65, 204, 79, 85, 84, 76, 73, 78, 69, 196, 79, 85, 84,
+ 76, 73, 78, 69, 128, 79, 85, 84, 69, 210, 79, 85, 84, 66, 79, 216, 79,
+ 85, 78, 75, 73, 193, 79, 85, 78, 67, 69, 128, 79, 85, 78, 67, 197, 79,
+ 84, 85, 128, 79, 84, 84, 65, 86, 193, 79, 84, 84, 128, 79, 84, 72, 69,
+ 82, 211, 79, 84, 72, 69, 210, 79, 84, 72, 65, 76, 65, 206, 79, 84, 72,
+ 65, 76, 128, 79, 83, 77, 65, 78, 89, 193, 79, 83, 67, 128, 79, 82, 84,
+ 72, 79, 71, 79, 78, 65, 204, 79, 82, 84, 72, 79, 68, 79, 216, 79, 82, 78,
+ 65, 84, 197, 79, 82, 78, 65, 77, 69, 78, 84, 83, 128, 79, 82, 78, 65, 77,
+ 69, 78, 84, 128, 79, 82, 78, 65, 77, 69, 78, 212, 79, 82, 75, 72, 79,
+ 206, 79, 82, 73, 71, 73, 78, 65, 204, 79, 82, 73, 71, 73, 78, 128, 79,
+ 82, 69, 45, 50, 128, 79, 82, 68, 73, 78, 65, 204, 79, 82, 68, 69, 210,
+ 79, 82, 67, 72, 73, 68, 128, 79, 82, 65, 78, 71, 197, 79, 80, 84, 73, 79,
+ 206, 79, 80, 84, 73, 67, 65, 204, 79, 80, 80, 82, 69, 83, 83, 73, 79, 78,
+ 128, 79, 80, 80, 79, 83, 73, 84, 73, 79, 78, 128, 79, 80, 80, 79, 83, 73,
+ 78, 199, 79, 80, 80, 79, 83, 69, 128, 79, 80, 72, 73, 85, 67, 72, 85, 83,
128, 79, 80, 69, 82, 65, 84, 79, 82, 128, 79, 80, 69, 82, 65, 84, 79,
210, 79, 80, 69, 82, 65, 84, 73, 78, 199, 79, 80, 69, 78, 73, 78, 199,
79, 80, 69, 78, 45, 80, 128, 79, 80, 69, 78, 45, 79, 85, 84, 76, 73, 78,
- 69, 196, 79, 80, 69, 78, 45, 72, 69, 65, 68, 69, 196, 79, 80, 69, 78, 45,
- 67, 73, 82, 67, 85, 73, 84, 45, 79, 85, 84, 80, 85, 212, 79, 79, 90, 69,
- 128, 79, 79, 89, 65, 78, 78, 65, 128, 79, 79, 85, 128, 79, 79, 77, 85,
- 128, 79, 79, 69, 128, 79, 79, 66, 79, 79, 70, 73, 76, 73, 128, 79, 78,
- 85, 128, 79, 78, 83, 85, 128, 79, 78, 78, 128, 79, 78, 75, 65, 82, 128,
- 79, 78, 69, 83, 69, 76, 70, 128, 79, 78, 69, 45, 87, 65, 217, 79, 78, 69,
- 45, 84, 72, 73, 82, 84, 89, 128, 79, 78, 69, 45, 76, 73, 78, 197, 79, 78,
- 67, 79, 77, 73, 78, 199, 79, 78, 65, 80, 128, 79, 77, 73, 83, 83, 73, 79,
- 206, 79, 77, 73, 67, 82, 79, 78, 128, 79, 77, 73, 67, 82, 79, 206, 79,
- 77, 69, 71, 65, 128, 79, 77, 69, 71, 193, 79, 77, 65, 76, 79, 78, 128,
- 79, 76, 73, 86, 69, 128, 79, 76, 73, 71, 79, 206, 79, 76, 68, 128, 79,
- 75, 84, 207, 79, 75, 65, 82, 65, 128, 79, 75, 65, 82, 193, 79, 74, 73,
- 66, 87, 65, 217, 79, 74, 69, 79, 78, 128, 79, 73, 76, 128, 79, 72, 77,
- 128, 79, 72, 205, 79, 71, 82, 69, 128, 79, 71, 79, 78, 69, 75, 128, 79,
- 71, 79, 78, 69, 203, 79, 71, 72, 65, 205, 79, 70, 70, 73, 67, 69, 82,
- 128, 79, 70, 70, 73, 67, 69, 128, 79, 70, 70, 73, 67, 197, 79, 70, 70,
- 128, 79, 69, 89, 128, 79, 69, 75, 128, 79, 68, 69, 78, 128, 79, 68, 196,
- 79, 67, 84, 79, 80, 85, 83, 128, 79, 67, 84, 79, 66, 69, 82, 128, 79, 67,
- 84, 69, 212, 79, 67, 210, 79, 67, 76, 79, 67, 75, 128, 79, 67, 67, 76,
- 85, 83, 73, 79, 78, 128, 79, 66, 83, 84, 82, 85, 67, 84, 73, 79, 78, 128,
- 79, 66, 79, 76, 211, 79, 66, 79, 204, 79, 66, 79, 70, 73, 76, 73, 128,
- 79, 66, 76, 73, 81, 85, 197, 79, 66, 74, 69, 67, 212, 79, 66, 69, 76, 85,
- 83, 128, 79, 66, 69, 76, 79, 83, 128, 79, 66, 128, 79, 65, 89, 128, 79,
- 65, 75, 128, 79, 65, 66, 79, 65, 70, 73, 76, 73, 128, 79, 193, 79, 48,
- 53, 49, 128, 79, 48, 53, 48, 66, 128, 79, 48, 53, 48, 65, 128, 79, 48,
- 53, 48, 128, 79, 48, 52, 57, 128, 79, 48, 52, 56, 128, 79, 48, 52, 55,
- 128, 79, 48, 52, 54, 128, 79, 48, 52, 53, 128, 79, 48, 52, 52, 128, 79,
- 48, 52, 51, 128, 79, 48, 52, 50, 128, 79, 48, 52, 49, 128, 79, 48, 52,
- 48, 128, 79, 48, 51, 57, 128, 79, 48, 51, 56, 128, 79, 48, 51, 55, 128,
- 79, 48, 51, 54, 68, 128, 79, 48, 51, 54, 67, 128, 79, 48, 51, 54, 66,
- 128, 79, 48, 51, 54, 65, 128, 79, 48, 51, 54, 128, 79, 48, 51, 53, 128,
- 79, 48, 51, 52, 128, 79, 48, 51, 51, 65, 128, 79, 48, 51, 51, 128, 79,
- 48, 51, 50, 128, 79, 48, 51, 49, 128, 79, 48, 51, 48, 65, 128, 79, 48,
- 51, 48, 128, 79, 48, 50, 57, 65, 128, 79, 48, 50, 57, 128, 79, 48, 50,
- 56, 128, 79, 48, 50, 55, 128, 79, 48, 50, 54, 128, 79, 48, 50, 53, 65,
- 128, 79, 48, 50, 53, 128, 79, 48, 50, 52, 65, 128, 79, 48, 50, 52, 128,
- 79, 48, 50, 51, 128, 79, 48, 50, 50, 128, 79, 48, 50, 49, 128, 79, 48,
- 50, 48, 65, 128, 79, 48, 50, 48, 128, 79, 48, 49, 57, 65, 128, 79, 48,
- 49, 57, 128, 79, 48, 49, 56, 128, 79, 48, 49, 55, 128, 79, 48, 49, 54,
- 128, 79, 48, 49, 53, 128, 79, 48, 49, 52, 128, 79, 48, 49, 51, 128, 79,
- 48, 49, 50, 128, 79, 48, 49, 49, 128, 79, 48, 49, 48, 67, 128, 79, 48,
- 49, 48, 66, 128, 79, 48, 49, 48, 65, 128, 79, 48, 49, 48, 128, 79, 48,
- 48, 57, 128, 79, 48, 48, 56, 128, 79, 48, 48, 55, 128, 79, 48, 48, 54,
- 70, 128, 79, 48, 48, 54, 69, 128, 79, 48, 48, 54, 68, 128, 79, 48, 48,
- 54, 67, 128, 79, 48, 48, 54, 66, 128, 79, 48, 48, 54, 65, 128, 79, 48,
- 48, 54, 128, 79, 48, 48, 53, 65, 128, 79, 48, 48, 53, 128, 79, 48, 48,
- 52, 128, 79, 48, 48, 51, 128, 79, 48, 48, 50, 128, 79, 48, 48, 49, 65,
- 128, 79, 48, 48, 49, 128, 79, 45, 89, 69, 128, 79, 45, 79, 45, 73, 128,
- 79, 45, 69, 128, 78, 90, 89, 88, 128, 78, 90, 89, 84, 128, 78, 90, 89,
- 82, 88, 128, 78, 90, 89, 82, 128, 78, 90, 89, 80, 128, 78, 90, 89, 128,
- 78, 90, 85, 88, 128, 78, 90, 85, 82, 88, 128, 78, 90, 85, 82, 128, 78,
- 90, 85, 81, 128, 78, 90, 85, 80, 128, 78, 90, 85, 79, 88, 128, 78, 90,
- 85, 79, 128, 78, 90, 85, 206, 78, 90, 85, 128, 78, 90, 79, 88, 128, 78,
- 90, 79, 80, 128, 78, 90, 73, 88, 128, 78, 90, 73, 84, 128, 78, 90, 73,
- 80, 128, 78, 90, 73, 69, 88, 128, 78, 90, 73, 69, 80, 128, 78, 90, 73,
- 69, 128, 78, 90, 73, 128, 78, 90, 69, 88, 128, 78, 90, 69, 85, 77, 128,
- 78, 90, 69, 128, 78, 90, 65, 88, 128, 78, 90, 65, 84, 128, 78, 90, 65,
- 81, 128, 78, 90, 65, 80, 128, 78, 90, 65, 128, 78, 90, 193, 78, 89, 87,
- 65, 128, 78, 89, 85, 88, 128, 78, 89, 85, 85, 128, 78, 89, 85, 84, 128,
- 78, 89, 85, 80, 128, 78, 89, 85, 79, 88, 128, 78, 89, 85, 79, 80, 128,
- 78, 89, 85, 79, 128, 78, 89, 85, 69, 128, 78, 89, 85, 128, 78, 89, 79,
- 88, 128, 78, 89, 79, 84, 128, 78, 89, 79, 80, 128, 78, 89, 79, 79, 128,
+ 69, 196, 79, 80, 69, 78, 45, 79, 128, 79, 80, 69, 78, 45, 207, 79, 80,
+ 69, 78, 45, 72, 69, 65, 68, 69, 196, 79, 80, 69, 78, 45, 67, 73, 82, 67,
+ 85, 73, 84, 45, 79, 85, 84, 80, 85, 212, 79, 80, 69, 78, 128, 79, 79, 90,
+ 69, 128, 79, 79, 89, 65, 78, 78, 65, 128, 79, 79, 85, 128, 79, 79, 77,
+ 85, 128, 79, 79, 72, 128, 79, 79, 69, 128, 79, 79, 66, 79, 79, 70, 73,
+ 76, 73, 128, 79, 78, 85, 128, 79, 78, 83, 85, 128, 79, 78, 78, 128, 79,
+ 78, 75, 65, 82, 128, 79, 78, 69, 83, 69, 76, 70, 128, 79, 78, 69, 45, 87,
+ 65, 217, 79, 78, 69, 45, 84, 72, 73, 82, 84, 89, 128, 79, 78, 69, 45, 76,
+ 73, 78, 197, 79, 78, 67, 79, 77, 73, 78, 199, 79, 78, 65, 80, 128, 79,
+ 77, 73, 83, 83, 73, 79, 206, 79, 77, 73, 67, 82, 79, 78, 128, 79, 77, 73,
+ 67, 82, 79, 206, 79, 77, 69, 71, 65, 128, 79, 77, 69, 71, 193, 79, 77,
+ 65, 76, 79, 78, 128, 79, 76, 73, 86, 69, 128, 79, 76, 73, 71, 79, 206,
+ 79, 76, 68, 128, 79, 75, 84, 207, 79, 75, 65, 82, 65, 128, 79, 75, 65,
+ 82, 193, 79, 74, 73, 66, 87, 65, 217, 79, 74, 69, 79, 78, 128, 79, 73,
+ 76, 128, 79, 73, 204, 79, 72, 77, 128, 79, 72, 205, 79, 71, 82, 69, 128,
+ 79, 71, 79, 78, 69, 75, 128, 79, 71, 79, 78, 69, 203, 79, 71, 72, 65,
+ 205, 79, 70, 70, 73, 67, 69, 82, 128, 79, 70, 70, 73, 67, 69, 128, 79,
+ 70, 70, 73, 67, 197, 79, 70, 70, 128, 79, 69, 89, 128, 79, 69, 75, 128,
+ 79, 69, 69, 128, 79, 68, 69, 78, 128, 79, 68, 68, 128, 79, 68, 196, 79,
+ 67, 84, 79, 80, 85, 83, 128, 79, 67, 84, 79, 66, 69, 82, 128, 79, 67, 84,
+ 69, 212, 79, 67, 84, 65, 71, 79, 78, 128, 79, 67, 210, 79, 67, 76, 79,
+ 67, 75, 128, 79, 67, 67, 76, 85, 83, 73, 79, 78, 128, 79, 66, 83, 84, 82,
+ 85, 67, 84, 73, 79, 78, 128, 79, 66, 79, 76, 211, 79, 66, 79, 204, 79,
+ 66, 79, 70, 73, 76, 73, 128, 79, 66, 76, 73, 81, 85, 197, 79, 66, 74, 69,
+ 67, 212, 79, 66, 69, 76, 85, 83, 128, 79, 66, 69, 76, 79, 83, 128, 79,
+ 66, 128, 79, 65, 89, 128, 79, 65, 75, 128, 79, 65, 66, 79, 65, 70, 73,
+ 76, 73, 128, 79, 193, 79, 48, 53, 49, 128, 79, 48, 53, 48, 66, 128, 79,
+ 48, 53, 48, 65, 128, 79, 48, 53, 48, 128, 79, 48, 52, 57, 128, 79, 48,
+ 52, 56, 128, 79, 48, 52, 55, 128, 79, 48, 52, 54, 128, 79, 48, 52, 53,
+ 128, 79, 48, 52, 52, 128, 79, 48, 52, 51, 128, 79, 48, 52, 50, 128, 79,
+ 48, 52, 49, 128, 79, 48, 52, 48, 128, 79, 48, 51, 57, 128, 79, 48, 51,
+ 56, 128, 79, 48, 51, 55, 128, 79, 48, 51, 54, 68, 128, 79, 48, 51, 54,
+ 67, 128, 79, 48, 51, 54, 66, 128, 79, 48, 51, 54, 65, 128, 79, 48, 51,
+ 54, 128, 79, 48, 51, 53, 128, 79, 48, 51, 52, 128, 79, 48, 51, 51, 65,
+ 128, 79, 48, 51, 51, 128, 79, 48, 51, 50, 128, 79, 48, 51, 49, 128, 79,
+ 48, 51, 48, 65, 128, 79, 48, 51, 48, 128, 79, 48, 50, 57, 65, 128, 79,
+ 48, 50, 57, 128, 79, 48, 50, 56, 128, 79, 48, 50, 55, 128, 79, 48, 50,
+ 54, 128, 79, 48, 50, 53, 65, 128, 79, 48, 50, 53, 128, 79, 48, 50, 52,
+ 65, 128, 79, 48, 50, 52, 128, 79, 48, 50, 51, 128, 79, 48, 50, 50, 128,
+ 79, 48, 50, 49, 128, 79, 48, 50, 48, 65, 128, 79, 48, 50, 48, 128, 79,
+ 48, 49, 57, 65, 128, 79, 48, 49, 57, 128, 79, 48, 49, 56, 128, 79, 48,
+ 49, 55, 128, 79, 48, 49, 54, 128, 79, 48, 49, 53, 128, 79, 48, 49, 52,
+ 128, 79, 48, 49, 51, 128, 79, 48, 49, 50, 128, 79, 48, 49, 49, 128, 79,
+ 48, 49, 48, 67, 128, 79, 48, 49, 48, 66, 128, 79, 48, 49, 48, 65, 128,
+ 79, 48, 49, 48, 128, 79, 48, 48, 57, 128, 79, 48, 48, 56, 128, 79, 48,
+ 48, 55, 128, 79, 48, 48, 54, 70, 128, 79, 48, 48, 54, 69, 128, 79, 48,
+ 48, 54, 68, 128, 79, 48, 48, 54, 67, 128, 79, 48, 48, 54, 66, 128, 79,
+ 48, 48, 54, 65, 128, 79, 48, 48, 54, 128, 79, 48, 48, 53, 65, 128, 79,
+ 48, 48, 53, 128, 79, 48, 48, 52, 128, 79, 48, 48, 51, 128, 79, 48, 48,
+ 50, 128, 79, 48, 48, 49, 65, 128, 79, 48, 48, 49, 128, 79, 45, 89, 69,
+ 128, 79, 45, 79, 45, 73, 128, 79, 45, 69, 128, 78, 90, 89, 88, 128, 78,
+ 90, 89, 84, 128, 78, 90, 89, 82, 88, 128, 78, 90, 89, 82, 128, 78, 90,
+ 89, 80, 128, 78, 90, 89, 128, 78, 90, 85, 88, 128, 78, 90, 85, 82, 88,
+ 128, 78, 90, 85, 82, 128, 78, 90, 85, 81, 128, 78, 90, 85, 80, 128, 78,
+ 90, 85, 79, 88, 128, 78, 90, 85, 79, 128, 78, 90, 85, 206, 78, 90, 85,
+ 128, 78, 90, 79, 88, 128, 78, 90, 79, 80, 128, 78, 90, 73, 88, 128, 78,
+ 90, 73, 84, 128, 78, 90, 73, 80, 128, 78, 90, 73, 69, 88, 128, 78, 90,
+ 73, 69, 80, 128, 78, 90, 73, 69, 128, 78, 90, 73, 128, 78, 90, 69, 88,
+ 128, 78, 90, 69, 85, 77, 128, 78, 90, 69, 128, 78, 90, 65, 88, 128, 78,
+ 90, 65, 84, 128, 78, 90, 65, 81, 128, 78, 90, 65, 80, 128, 78, 90, 65,
+ 128, 78, 90, 193, 78, 89, 87, 65, 128, 78, 89, 85, 88, 128, 78, 89, 85,
+ 85, 128, 78, 89, 85, 84, 128, 78, 89, 85, 80, 128, 78, 89, 85, 79, 88,
+ 128, 78, 89, 85, 79, 80, 128, 78, 89, 85, 79, 128, 78, 89, 85, 78, 128,
+ 78, 89, 85, 69, 128, 78, 89, 85, 128, 78, 89, 79, 88, 128, 78, 89, 79,
+ 84, 128, 78, 89, 79, 80, 128, 78, 89, 79, 79, 128, 78, 89, 79, 78, 128,
78, 89, 79, 65, 128, 78, 89, 79, 128, 78, 89, 74, 65, 128, 78, 89, 73,
88, 128, 78, 89, 73, 84, 128, 78, 89, 73, 212, 78, 89, 73, 211, 78, 89,
73, 210, 78, 89, 73, 80, 128, 78, 89, 73, 78, 45, 68, 79, 128, 78, 89,
- 73, 73, 128, 78, 89, 73, 69, 88, 128, 78, 89, 73, 69, 84, 128, 78, 89,
- 73, 69, 80, 128, 78, 89, 73, 69, 128, 78, 89, 73, 128, 78, 89, 201, 78,
- 89, 72, 65, 128, 78, 89, 69, 84, 128, 78, 89, 69, 212, 78, 89, 69, 72,
- 128, 78, 89, 69, 200, 78, 89, 69, 69, 128, 78, 89, 69, 128, 78, 89, 196,
- 78, 89, 67, 65, 128, 78, 89, 65, 85, 128, 78, 89, 65, 73, 128, 78, 89,
- 65, 72, 128, 78, 89, 65, 69, 77, 65, 69, 128, 78, 89, 65, 65, 128, 78,
- 87, 79, 79, 128, 78, 87, 79, 128, 78, 87, 73, 73, 128, 78, 87, 73, 128,
- 78, 87, 69, 128, 78, 87, 65, 65, 128, 78, 87, 65, 128, 78, 87, 128, 78,
- 86, 128, 78, 85, 88, 128, 78, 85, 85, 78, 128, 78, 85, 85, 128, 78, 85,
- 84, 73, 76, 76, 85, 128, 78, 85, 84, 128, 78, 85, 212, 78, 85, 82, 88,
- 128, 78, 85, 82, 128, 78, 85, 80, 128, 78, 85, 79, 88, 128, 78, 85, 79,
- 80, 128, 78, 85, 79, 128, 78, 85, 78, 85, 90, 128, 78, 85, 78, 85, 218,
- 78, 85, 78, 71, 128, 78, 85, 78, 65, 86, 85, 212, 78, 85, 78, 65, 86, 73,
- 203, 78, 85, 78, 128, 78, 85, 206, 78, 85, 77, 69, 82, 207, 78, 85, 77,
- 69, 82, 65, 84, 79, 210, 78, 85, 77, 69, 82, 65, 204, 78, 85, 77, 66, 69,
- 82, 83, 128, 78, 85, 77, 66, 69, 82, 128, 78, 85, 77, 128, 78, 85, 76,
- 76, 128, 78, 85, 76, 204, 78, 85, 76, 128, 78, 85, 75, 84, 65, 128, 78,
- 85, 69, 78, 71, 128, 78, 85, 69, 128, 78, 85, 66, 73, 65, 206, 78, 85,
- 65, 69, 128, 78, 85, 49, 49, 128, 78, 85, 49, 177, 78, 85, 48, 50, 50,
- 65, 128, 78, 85, 48, 50, 50, 128, 78, 85, 48, 50, 49, 128, 78, 85, 48,
- 50, 48, 128, 78, 85, 48, 49, 57, 128, 78, 85, 48, 49, 56, 65, 128, 78,
- 85, 48, 49, 56, 128, 78, 85, 48, 49, 55, 128, 78, 85, 48, 49, 54, 128,
- 78, 85, 48, 49, 53, 128, 78, 85, 48, 49, 52, 128, 78, 85, 48, 49, 51,
- 128, 78, 85, 48, 49, 50, 128, 78, 85, 48, 49, 49, 65, 128, 78, 85, 48,
- 49, 49, 128, 78, 85, 48, 49, 48, 65, 128, 78, 85, 48, 49, 48, 128, 78,
- 85, 48, 48, 57, 128, 78, 85, 48, 48, 56, 128, 78, 85, 48, 48, 55, 128,
- 78, 85, 48, 48, 54, 128, 78, 85, 48, 48, 53, 128, 78, 85, 48, 48, 52,
- 128, 78, 85, 48, 48, 51, 128, 78, 85, 48, 48, 50, 128, 78, 85, 48, 48,
- 49, 128, 78, 84, 85, 85, 128, 78, 84, 85, 77, 128, 78, 84, 213, 78, 84,
- 79, 81, 80, 69, 78, 128, 78, 84, 73, 69, 197, 78, 84, 69, 85, 78, 71, 66,
- 65, 128, 78, 84, 69, 85, 77, 128, 78, 84, 69, 78, 128, 78, 84, 69, 69,
- 128, 78, 84, 65, 80, 128, 78, 84, 65, 208, 78, 84, 65, 65, 128, 78, 83,
- 85, 79, 212, 78, 83, 85, 78, 128, 78, 83, 85, 77, 128, 78, 83, 79, 77,
- 128, 78, 83, 73, 69, 69, 84, 128, 78, 83, 73, 69, 69, 80, 128, 78, 83,
- 73, 69, 69, 128, 78, 83, 72, 85, 84, 128, 78, 83, 72, 85, 212, 78, 83,
- 72, 85, 79, 80, 128, 78, 83, 72, 85, 69, 128, 78, 83, 72, 73, 69, 69,
- 128, 78, 83, 72, 69, 69, 128, 78, 83, 72, 65, 81, 128, 78, 83, 72, 65,
- 128, 78, 83, 69, 85, 65, 69, 78, 128, 78, 83, 69, 78, 128, 78, 83, 65,
- 128, 78, 82, 89, 88, 128, 78, 82, 89, 84, 128, 78, 82, 89, 82, 88, 128,
- 78, 82, 89, 82, 128, 78, 82, 89, 80, 128, 78, 82, 89, 128, 78, 82, 85,
- 88, 128, 78, 82, 85, 84, 128, 78, 82, 85, 82, 88, 128, 78, 82, 85, 82,
- 128, 78, 82, 85, 80, 128, 78, 82, 85, 128, 78, 82, 79, 88, 128, 78, 82,
- 79, 80, 128, 78, 82, 79, 128, 78, 82, 69, 88, 128, 78, 82, 69, 84, 128,
- 78, 82, 69, 80, 128, 78, 82, 69, 128, 78, 82, 65, 88, 128, 78, 82, 65,
- 84, 128, 78, 82, 65, 80, 128, 78, 82, 65, 128, 78, 79, 89, 128, 78, 79,
- 88, 128, 78, 79, 86, 69, 77, 66, 69, 82, 128, 78, 79, 84, 84, 79, 128,
- 78, 79, 84, 69, 83, 128, 78, 79, 84, 69, 72, 69, 65, 68, 128, 78, 79, 84,
- 69, 72, 69, 65, 196, 78, 79, 84, 69, 66, 79, 79, 75, 128, 78, 79, 84, 69,
- 66, 79, 79, 203, 78, 79, 84, 69, 128, 78, 79, 84, 197, 78, 79, 84, 67,
- 72, 69, 196, 78, 79, 84, 67, 72, 128, 78, 79, 84, 128, 78, 79, 212, 78,
- 79, 83, 69, 128, 78, 79, 82, 84, 72, 87, 69, 83, 212, 78, 79, 82, 84, 72,
- 69, 82, 206, 78, 79, 82, 84, 200, 78, 79, 82, 77, 65, 204, 78, 79, 210,
- 78, 79, 80, 128, 78, 79, 79, 78, 85, 128, 78, 79, 79, 128, 78, 79, 78,
- 70, 79, 82, 75, 73, 78, 71, 128, 78, 79, 78, 45, 80, 79, 84, 65, 66, 76,
- 197, 78, 79, 78, 45, 74, 79, 73, 78, 69, 82, 128, 78, 79, 78, 45, 66, 82,
- 69, 65, 75, 73, 78, 199, 78, 79, 77, 73, 78, 65, 204, 78, 79, 75, 72, 85,
- 75, 128, 78, 79, 68, 69, 128, 78, 79, 65, 128, 78, 79, 45, 66, 82, 69,
- 65, 203, 78, 78, 85, 85, 128, 78, 78, 85, 128, 78, 78, 79, 79, 128, 78,
- 78, 79, 128, 78, 78, 78, 85, 85, 128, 78, 78, 78, 85, 128, 78, 78, 78,
- 79, 79, 128, 78, 78, 78, 79, 128, 78, 78, 78, 73, 73, 128, 78, 78, 78,
- 73, 128, 78, 78, 78, 69, 69, 128, 78, 78, 78, 69, 128, 78, 78, 78, 65,
- 85, 128, 78, 78, 78, 65, 73, 128, 78, 78, 78, 65, 65, 128, 78, 78, 78,
- 65, 128, 78, 78, 78, 128, 78, 78, 72, 65, 128, 78, 78, 71, 79, 79, 128,
- 78, 78, 71, 79, 128, 78, 78, 71, 73, 73, 128, 78, 78, 71, 73, 128, 78,
- 78, 71, 65, 65, 128, 78, 78, 71, 65, 128, 78, 78, 71, 128, 78, 78, 66,
- 83, 80, 128, 78, 77, 128, 78, 76, 48, 50, 48, 128, 78, 76, 48, 49, 57,
- 128, 78, 76, 48, 49, 56, 128, 78, 76, 48, 49, 55, 65, 128, 78, 76, 48,
- 49, 55, 128, 78, 76, 48, 49, 54, 128, 78, 76, 48, 49, 53, 128, 78, 76,
- 48, 49, 52, 128, 78, 76, 48, 49, 51, 128, 78, 76, 48, 49, 50, 128, 78,
- 76, 48, 49, 49, 128, 78, 76, 48, 49, 48, 128, 78, 76, 48, 48, 57, 128,
- 78, 76, 48, 48, 56, 128, 78, 76, 48, 48, 55, 128, 78, 76, 48, 48, 54,
- 128, 78, 76, 48, 48, 53, 65, 128, 78, 76, 48, 48, 53, 128, 78, 76, 48,
- 48, 52, 128, 78, 76, 48, 48, 51, 128, 78, 76, 48, 48, 50, 128, 78, 76,
- 48, 48, 49, 128, 78, 76, 128, 78, 75, 79, 77, 128, 78, 75, 207, 78, 75,
- 73, 78, 68, 73, 128, 78, 75, 65, 65, 82, 65, 69, 128, 78, 74, 89, 88,
- 128, 78, 74, 89, 84, 128, 78, 74, 89, 82, 88, 128, 78, 74, 89, 82, 128,
- 78, 74, 89, 80, 128, 78, 74, 89, 128, 78, 74, 85, 88, 128, 78, 74, 85,
- 82, 88, 128, 78, 74, 85, 82, 128, 78, 74, 85, 81, 65, 128, 78, 74, 85,
- 80, 128, 78, 74, 85, 79, 88, 128, 78, 74, 85, 79, 128, 78, 74, 85, 69,
- 81, 128, 78, 74, 85, 65, 69, 128, 78, 74, 85, 128, 78, 74, 79, 88, 128,
- 78, 74, 79, 84, 128, 78, 74, 79, 80, 128, 78, 74, 79, 79, 128, 78, 74,
- 79, 128, 78, 74, 73, 88, 128, 78, 74, 73, 84, 128, 78, 74, 73, 80, 128,
- 78, 74, 73, 69, 88, 128, 78, 74, 73, 69, 84, 128, 78, 74, 73, 69, 80,
- 128, 78, 74, 73, 69, 69, 128, 78, 74, 73, 69, 128, 78, 74, 73, 128, 78,
- 74, 201, 78, 74, 69, 85, 88, 128, 78, 74, 69, 85, 84, 128, 78, 74, 69,
- 85, 65, 69, 78, 65, 128, 78, 74, 69, 85, 65, 69, 77, 128, 78, 74, 69, 69,
- 69, 69, 128, 78, 74, 69, 69, 128, 78, 74, 69, 197, 78, 74, 69, 128, 78,
- 74, 65, 81, 128, 78, 74, 65, 80, 128, 78, 74, 65, 69, 77, 76, 73, 128,
- 78, 74, 65, 69, 77, 128, 78, 74, 65, 65, 128, 78, 73, 88, 128, 78, 73,
- 84, 82, 69, 128, 78, 73, 83, 65, 71, 128, 78, 73, 82, 85, 71, 85, 128,
- 78, 73, 80, 128, 78, 73, 78, 84, 72, 128, 78, 73, 78, 69, 84, 89, 128,
- 78, 73, 78, 69, 84, 217, 78, 73, 78, 69, 84, 69, 69, 78, 128, 78, 73, 78,
- 69, 84, 69, 69, 206, 78, 73, 78, 69, 45, 84, 72, 73, 82, 84, 89, 128, 78,
- 73, 78, 197, 78, 73, 78, 68, 65, 50, 128, 78, 73, 78, 68, 65, 178, 78,
- 73, 77, 128, 78, 73, 205, 78, 73, 75, 72, 65, 72, 73, 84, 128, 78, 73,
- 75, 65, 72, 73, 84, 128, 78, 73, 75, 65, 128, 78, 73, 72, 83, 72, 86, 65,
- 83, 65, 128, 78, 73, 71, 73, 68, 65, 77, 73, 78, 128, 78, 73, 71, 73, 68,
- 65, 69, 83, 72, 128, 78, 73, 71, 72, 84, 128, 78, 73, 71, 72, 212, 78,
- 73, 71, 71, 65, 72, 73, 84, 65, 128, 78, 73, 69, 88, 128, 78, 73, 69, 85,
- 78, 45, 84, 73, 75, 69, 85, 84, 128, 78, 73, 69, 85, 78, 45, 84, 72, 73,
- 69, 85, 84, 72, 128, 78, 73, 69, 85, 78, 45, 83, 73, 79, 83, 128, 78, 73,
- 69, 85, 78, 45, 82, 73, 69, 85, 76, 128, 78, 73, 69, 85, 78, 45, 80, 73,
- 69, 85, 80, 128, 78, 73, 69, 85, 78, 45, 80, 65, 78, 83, 73, 79, 83, 128,
- 78, 73, 69, 85, 78, 45, 75, 73, 89, 69, 79, 75, 128, 78, 73, 69, 85, 78,
- 45, 72, 73, 69, 85, 72, 128, 78, 73, 69, 85, 78, 45, 67, 73, 69, 85, 67,
- 128, 78, 73, 69, 85, 78, 45, 67, 72, 73, 69, 85, 67, 72, 128, 78, 73, 69,
- 85, 206, 78, 73, 69, 80, 128, 78, 73, 69, 128, 78, 73, 66, 128, 78, 73,
- 65, 128, 78, 73, 50, 128, 78, 72, 85, 69, 128, 78, 72, 74, 65, 128, 78,
- 72, 128, 78, 71, 89, 69, 128, 78, 71, 86, 69, 128, 78, 71, 85, 85, 128,
- 78, 71, 85, 79, 88, 128, 78, 71, 85, 79, 84, 128, 78, 71, 85, 79, 128,
- 78, 71, 85, 65, 69, 84, 128, 78, 71, 85, 65, 69, 128, 78, 71, 79, 88,
- 128, 78, 71, 79, 85, 128, 78, 71, 79, 213, 78, 71, 79, 84, 128, 78, 71,
- 79, 81, 128, 78, 71, 79, 80, 128, 78, 71, 79, 78, 128, 78, 71, 79, 77,
- 128, 78, 71, 79, 69, 72, 128, 78, 71, 79, 69, 200, 78, 71, 207, 78, 71,
- 75, 89, 69, 69, 128, 78, 71, 75, 87, 65, 69, 78, 128, 78, 71, 75, 85, 80,
- 128, 78, 71, 75, 85, 78, 128, 78, 71, 75, 85, 77, 128, 78, 71, 75, 85,
- 69, 78, 90, 69, 85, 77, 128, 78, 71, 75, 85, 197, 78, 71, 75, 73, 78, 68,
- 201, 78, 71, 75, 73, 69, 69, 128, 78, 71, 75, 69, 85, 88, 128, 78, 71,
- 75, 69, 85, 82, 73, 128, 78, 71, 75, 69, 85, 65, 69, 81, 128, 78, 71, 75,
- 69, 85, 65, 69, 77, 128, 78, 71, 75, 65, 81, 128, 78, 71, 75, 65, 80,
- 128, 78, 71, 75, 65, 65, 77, 73, 128, 78, 71, 75, 65, 128, 78, 71, 73,
- 69, 88, 128, 78, 71, 73, 69, 80, 128, 78, 71, 73, 69, 128, 78, 71, 72,
- 65, 128, 78, 71, 71, 87, 65, 69, 78, 128, 78, 71, 71, 85, 82, 65, 69,
- 128, 78, 71, 71, 85, 80, 128, 78, 71, 71, 85, 79, 81, 128, 78, 71, 71,
- 85, 79, 209, 78, 71, 71, 85, 79, 78, 128, 78, 71, 71, 85, 79, 77, 128,
- 78, 71, 71, 85, 77, 128, 78, 71, 71, 85, 69, 69, 84, 128, 78, 71, 71, 85,
- 65, 69, 83, 72, 65, 197, 78, 71, 71, 85, 65, 69, 206, 78, 71, 71, 85,
+ 73, 78, 128, 78, 89, 73, 73, 128, 78, 89, 73, 69, 88, 128, 78, 89, 73,
+ 69, 84, 128, 78, 89, 73, 69, 80, 128, 78, 89, 73, 69, 128, 78, 89, 73,
+ 128, 78, 89, 201, 78, 89, 72, 65, 128, 78, 89, 69, 84, 128, 78, 89, 69,
+ 212, 78, 89, 69, 78, 128, 78, 89, 69, 72, 128, 78, 89, 69, 200, 78, 89,
+ 69, 69, 128, 78, 89, 69, 128, 78, 89, 196, 78, 89, 67, 65, 128, 78, 89,
+ 65, 85, 128, 78, 89, 65, 73, 128, 78, 89, 65, 72, 128, 78, 89, 65, 69,
+ 77, 65, 69, 128, 78, 89, 65, 65, 128, 78, 87, 79, 79, 128, 78, 87, 79,
+ 128, 78, 87, 73, 73, 128, 78, 87, 73, 128, 78, 87, 69, 128, 78, 87, 65,
+ 65, 128, 78, 87, 65, 128, 78, 87, 128, 78, 86, 128, 78, 85, 88, 128, 78,
+ 85, 85, 78, 128, 78, 85, 85, 128, 78, 85, 84, 73, 76, 76, 85, 128, 78,
+ 85, 84, 128, 78, 85, 212, 78, 85, 82, 88, 128, 78, 85, 82, 128, 78, 85,
+ 80, 128, 78, 85, 79, 88, 128, 78, 85, 79, 80, 128, 78, 85, 79, 128, 78,
+ 85, 78, 85, 90, 128, 78, 85, 78, 85, 218, 78, 85, 78, 71, 128, 78, 85,
+ 78, 65, 86, 85, 212, 78, 85, 78, 65, 86, 73, 203, 78, 85, 78, 128, 78,
+ 85, 206, 78, 85, 77, 69, 82, 207, 78, 85, 77, 69, 82, 65, 84, 79, 210,
+ 78, 85, 77, 69, 82, 65, 204, 78, 85, 77, 66, 69, 82, 83, 128, 78, 85, 77,
+ 66, 69, 82, 128, 78, 85, 77, 128, 78, 85, 76, 76, 128, 78, 85, 76, 204,
+ 78, 85, 76, 128, 78, 85, 75, 84, 65, 128, 78, 85, 69, 78, 71, 128, 78,
+ 85, 69, 128, 78, 85, 66, 73, 65, 206, 78, 85, 65, 69, 128, 78, 85, 49,
+ 49, 128, 78, 85, 49, 177, 78, 85, 48, 50, 50, 65, 128, 78, 85, 48, 50,
+ 50, 128, 78, 85, 48, 50, 49, 128, 78, 85, 48, 50, 48, 128, 78, 85, 48,
+ 49, 57, 128, 78, 85, 48, 49, 56, 65, 128, 78, 85, 48, 49, 56, 128, 78,
+ 85, 48, 49, 55, 128, 78, 85, 48, 49, 54, 128, 78, 85, 48, 49, 53, 128,
+ 78, 85, 48, 49, 52, 128, 78, 85, 48, 49, 51, 128, 78, 85, 48, 49, 50,
+ 128, 78, 85, 48, 49, 49, 65, 128, 78, 85, 48, 49, 49, 128, 78, 85, 48,
+ 49, 48, 65, 128, 78, 85, 48, 49, 48, 128, 78, 85, 48, 48, 57, 128, 78,
+ 85, 48, 48, 56, 128, 78, 85, 48, 48, 55, 128, 78, 85, 48, 48, 54, 128,
+ 78, 85, 48, 48, 53, 128, 78, 85, 48, 48, 52, 128, 78, 85, 48, 48, 51,
+ 128, 78, 85, 48, 48, 50, 128, 78, 85, 48, 48, 49, 128, 78, 84, 88, 73,
+ 86, 128, 78, 84, 85, 85, 128, 78, 84, 85, 77, 128, 78, 84, 85, 74, 128,
+ 78, 84, 213, 78, 84, 83, 65, 85, 128, 78, 84, 79, 81, 80, 69, 78, 128,
+ 78, 84, 79, 71, 128, 78, 84, 79, 199, 78, 84, 73, 69, 197, 78, 84, 72,
+ 65, 85, 128, 78, 84, 69, 85, 78, 71, 66, 65, 128, 78, 84, 69, 85, 77,
+ 128, 78, 84, 69, 78, 128, 78, 84, 69, 69, 128, 78, 84, 65, 80, 128, 78,
+ 84, 65, 208, 78, 84, 65, 65, 128, 78, 83, 85, 79, 212, 78, 83, 85, 78,
+ 128, 78, 83, 85, 77, 128, 78, 83, 79, 77, 128, 78, 83, 73, 69, 69, 84,
+ 128, 78, 83, 73, 69, 69, 80, 128, 78, 83, 73, 69, 69, 128, 78, 83, 72,
+ 85, 84, 128, 78, 83, 72, 85, 212, 78, 83, 72, 85, 79, 80, 128, 78, 83,
+ 72, 85, 69, 128, 78, 83, 72, 73, 69, 69, 128, 78, 83, 72, 69, 69, 128,
+ 78, 83, 72, 65, 81, 128, 78, 83, 72, 65, 128, 78, 83, 69, 85, 65, 69, 78,
+ 128, 78, 83, 69, 78, 128, 78, 83, 65, 128, 78, 82, 89, 88, 128, 78, 82,
+ 89, 84, 128, 78, 82, 89, 82, 88, 128, 78, 82, 89, 82, 128, 78, 82, 89,
+ 80, 128, 78, 82, 89, 128, 78, 82, 85, 88, 128, 78, 82, 85, 84, 128, 78,
+ 82, 85, 82, 88, 128, 78, 82, 85, 82, 128, 78, 82, 85, 80, 128, 78, 82,
+ 85, 65, 128, 78, 82, 85, 128, 78, 82, 79, 88, 128, 78, 82, 79, 80, 128,
+ 78, 82, 79, 128, 78, 82, 69, 88, 128, 78, 82, 69, 84, 128, 78, 82, 69,
+ 211, 78, 82, 69, 80, 128, 78, 82, 69, 128, 78, 82, 65, 88, 128, 78, 82,
+ 65, 84, 128, 78, 82, 65, 80, 128, 78, 82, 65, 128, 78, 81, 73, 71, 128,
+ 78, 79, 89, 128, 78, 79, 88, 128, 78, 79, 87, 67, 128, 78, 79, 86, 69,
+ 77, 66, 69, 82, 128, 78, 79, 84, 84, 79, 128, 78, 79, 84, 69, 83, 128,
+ 78, 79, 84, 69, 72, 69, 65, 68, 128, 78, 79, 84, 69, 72, 69, 65, 196, 78,
+ 79, 84, 69, 66, 79, 79, 75, 128, 78, 79, 84, 69, 66, 79, 79, 203, 78, 79,
+ 84, 69, 128, 78, 79, 84, 197, 78, 79, 84, 67, 72, 69, 196, 78, 79, 84,
+ 67, 72, 128, 78, 79, 84, 65, 84, 73, 79, 206, 78, 79, 84, 128, 78, 79,
+ 212, 78, 79, 83, 69, 128, 78, 79, 83, 197, 78, 79, 82, 84, 72, 87, 69,
+ 83, 212, 78, 79, 82, 84, 72, 69, 82, 206, 78, 79, 82, 84, 72, 69, 65, 83,
+ 84, 45, 80, 79, 73, 78, 84, 73, 78, 199, 78, 79, 82, 77, 65, 204, 78, 79,
+ 82, 68, 73, 195, 78, 79, 210, 78, 79, 80, 128, 78, 79, 79, 78, 85, 128,
+ 78, 79, 79, 128, 78, 79, 78, 70, 79, 82, 75, 73, 78, 71, 128, 78, 79, 78,
+ 45, 80, 79, 84, 65, 66, 76, 197, 78, 79, 78, 45, 74, 79, 73, 78, 69, 82,
+ 128, 78, 79, 78, 45, 66, 82, 69, 65, 75, 73, 78, 199, 78, 79, 78, 128,
+ 78, 79, 77, 73, 78, 65, 204, 78, 79, 75, 72, 85, 75, 128, 78, 79, 68, 69,
+ 128, 78, 79, 65, 128, 78, 79, 45, 66, 82, 69, 65, 203, 78, 78, 85, 85,
+ 128, 78, 78, 85, 128, 78, 78, 79, 79, 128, 78, 78, 79, 128, 78, 78, 78,
+ 85, 85, 128, 78, 78, 78, 85, 128, 78, 78, 78, 79, 79, 128, 78, 78, 78,
+ 79, 128, 78, 78, 78, 73, 73, 128, 78, 78, 78, 73, 128, 78, 78, 78, 69,
+ 69, 128, 78, 78, 78, 69, 128, 78, 78, 78, 65, 85, 128, 78, 78, 78, 65,
+ 73, 128, 78, 78, 78, 65, 65, 128, 78, 78, 78, 65, 128, 78, 78, 78, 128,
+ 78, 78, 72, 65, 128, 78, 78, 71, 79, 79, 128, 78, 78, 71, 79, 128, 78,
+ 78, 71, 73, 73, 128, 78, 78, 71, 73, 128, 78, 78, 71, 65, 65, 128, 78,
+ 78, 71, 65, 128, 78, 78, 71, 128, 78, 78, 66, 83, 80, 128, 78, 77, 128,
+ 78, 76, 65, 85, 128, 78, 76, 48, 50, 48, 128, 78, 76, 48, 49, 57, 128,
+ 78, 76, 48, 49, 56, 128, 78, 76, 48, 49, 55, 65, 128, 78, 76, 48, 49, 55,
+ 128, 78, 76, 48, 49, 54, 128, 78, 76, 48, 49, 53, 128, 78, 76, 48, 49,
+ 52, 128, 78, 76, 48, 49, 51, 128, 78, 76, 48, 49, 50, 128, 78, 76, 48,
+ 49, 49, 128, 78, 76, 48, 49, 48, 128, 78, 76, 48, 48, 57, 128, 78, 76,
+ 48, 48, 56, 128, 78, 76, 48, 48, 55, 128, 78, 76, 48, 48, 54, 128, 78,
+ 76, 48, 48, 53, 65, 128, 78, 76, 48, 48, 53, 128, 78, 76, 48, 48, 52,
+ 128, 78, 76, 48, 48, 51, 128, 78, 76, 48, 48, 50, 128, 78, 76, 48, 48,
+ 49, 128, 78, 76, 128, 78, 75, 79, 77, 128, 78, 75, 207, 78, 75, 73, 78,
+ 68, 73, 128, 78, 75, 65, 85, 128, 78, 75, 65, 65, 82, 65, 69, 128, 78,
+ 74, 89, 88, 128, 78, 74, 89, 84, 128, 78, 74, 89, 82, 88, 128, 78, 74,
+ 89, 82, 128, 78, 74, 89, 80, 128, 78, 74, 89, 128, 78, 74, 85, 88, 128,
+ 78, 74, 85, 82, 88, 128, 78, 74, 85, 82, 128, 78, 74, 85, 81, 65, 128,
+ 78, 74, 85, 80, 128, 78, 74, 85, 79, 88, 128, 78, 74, 85, 79, 128, 78,
+ 74, 85, 69, 81, 128, 78, 74, 85, 65, 69, 128, 78, 74, 85, 128, 78, 74,
+ 79, 88, 128, 78, 74, 79, 84, 128, 78, 74, 79, 80, 128, 78, 74, 79, 79,
+ 128, 78, 74, 79, 128, 78, 74, 73, 88, 128, 78, 74, 73, 84, 128, 78, 74,
+ 73, 80, 128, 78, 74, 73, 69, 88, 128, 78, 74, 73, 69, 84, 128, 78, 74,
+ 73, 69, 80, 128, 78, 74, 73, 69, 69, 128, 78, 74, 73, 69, 128, 78, 74,
+ 73, 128, 78, 74, 201, 78, 74, 69, 85, 88, 128, 78, 74, 69, 85, 84, 128,
+ 78, 74, 69, 85, 65, 69, 78, 65, 128, 78, 74, 69, 85, 65, 69, 77, 128, 78,
+ 74, 69, 69, 69, 69, 128, 78, 74, 69, 69, 128, 78, 74, 69, 197, 78, 74,
+ 69, 128, 78, 74, 65, 81, 128, 78, 74, 65, 80, 128, 78, 74, 65, 69, 77,
+ 76, 73, 128, 78, 74, 65, 69, 77, 128, 78, 74, 65, 65, 128, 78, 73, 88,
+ 128, 78, 73, 84, 82, 69, 128, 78, 73, 83, 65, 71, 128, 78, 73, 82, 85,
+ 71, 85, 128, 78, 73, 80, 128, 78, 73, 78, 84, 72, 128, 78, 73, 78, 69,
+ 84, 89, 128, 78, 73, 78, 69, 84, 217, 78, 73, 78, 69, 84, 69, 69, 78,
+ 128, 78, 73, 78, 69, 84, 69, 69, 206, 78, 73, 78, 69, 45, 84, 72, 73, 82,
+ 84, 89, 128, 78, 73, 78, 197, 78, 73, 78, 68, 65, 50, 128, 78, 73, 78,
+ 68, 65, 178, 78, 73, 78, 57, 128, 78, 73, 78, 128, 78, 73, 77, 128, 78,
+ 73, 205, 78, 73, 75, 79, 76, 83, 66, 85, 82, 199, 78, 73, 75, 72, 65, 72,
+ 73, 84, 128, 78, 73, 75, 65, 72, 73, 84, 128, 78, 73, 75, 65, 128, 78,
+ 73, 72, 83, 72, 86, 65, 83, 65, 128, 78, 73, 71, 73, 68, 65, 77, 73, 78,
+ 128, 78, 73, 71, 73, 68, 65, 69, 83, 72, 128, 78, 73, 71, 72, 84, 128,
+ 78, 73, 71, 72, 212, 78, 73, 71, 71, 65, 72, 73, 84, 65, 128, 78, 73, 69,
+ 88, 128, 78, 73, 69, 85, 78, 45, 84, 73, 75, 69, 85, 84, 128, 78, 73, 69,
+ 85, 78, 45, 84, 72, 73, 69, 85, 84, 72, 128, 78, 73, 69, 85, 78, 45, 83,
+ 73, 79, 83, 128, 78, 73, 69, 85, 78, 45, 82, 73, 69, 85, 76, 128, 78, 73,
+ 69, 85, 78, 45, 80, 73, 69, 85, 80, 128, 78, 73, 69, 85, 78, 45, 80, 65,
+ 78, 83, 73, 79, 83, 128, 78, 73, 69, 85, 78, 45, 75, 73, 89, 69, 79, 75,
+ 128, 78, 73, 69, 85, 78, 45, 72, 73, 69, 85, 72, 128, 78, 73, 69, 85, 78,
+ 45, 67, 73, 69, 85, 67, 128, 78, 73, 69, 85, 78, 45, 67, 72, 73, 69, 85,
+ 67, 72, 128, 78, 73, 69, 85, 206, 78, 73, 69, 80, 128, 78, 73, 69, 128,
+ 78, 73, 66, 128, 78, 73, 65, 128, 78, 73, 50, 128, 78, 72, 85, 69, 128,
+ 78, 72, 74, 65, 128, 78, 72, 128, 78, 71, 89, 69, 128, 78, 71, 86, 69,
+ 128, 78, 71, 85, 85, 128, 78, 71, 85, 79, 88, 128, 78, 71, 85, 79, 84,
+ 128, 78, 71, 85, 79, 128, 78, 71, 85, 65, 78, 128, 78, 71, 85, 65, 69,
+ 84, 128, 78, 71, 85, 65, 69, 128, 78, 71, 79, 88, 128, 78, 71, 79, 85,
+ 128, 78, 71, 79, 213, 78, 71, 79, 84, 128, 78, 71, 79, 81, 128, 78, 71,
+ 79, 80, 128, 78, 71, 79, 78, 128, 78, 71, 79, 77, 128, 78, 71, 79, 69,
+ 72, 128, 78, 71, 79, 69, 200, 78, 71, 207, 78, 71, 75, 89, 69, 69, 128,
+ 78, 71, 75, 87, 65, 69, 78, 128, 78, 71, 75, 85, 80, 128, 78, 71, 75, 85,
+ 78, 128, 78, 71, 75, 85, 77, 128, 78, 71, 75, 85, 69, 78, 90, 69, 85, 77,
+ 128, 78, 71, 75, 85, 197, 78, 71, 75, 73, 78, 68, 201, 78, 71, 75, 73,
+ 69, 69, 128, 78, 71, 75, 69, 85, 88, 128, 78, 71, 75, 69, 85, 82, 73,
+ 128, 78, 71, 75, 69, 85, 65, 69, 81, 128, 78, 71, 75, 69, 85, 65, 69, 77,
+ 128, 78, 71, 75, 65, 81, 128, 78, 71, 75, 65, 80, 128, 78, 71, 75, 65,
+ 65, 77, 73, 128, 78, 71, 75, 65, 128, 78, 71, 73, 69, 88, 128, 78, 71,
+ 73, 69, 80, 128, 78, 71, 73, 69, 128, 78, 71, 72, 65, 128, 78, 71, 71,
+ 87, 65, 69, 78, 128, 78, 71, 71, 85, 82, 65, 69, 128, 78, 71, 71, 85, 80,
+ 128, 78, 71, 71, 85, 79, 81, 128, 78, 71, 71, 85, 79, 209, 78, 71, 71,
+ 85, 79, 78, 128, 78, 71, 71, 85, 79, 77, 128, 78, 71, 71, 85, 77, 128,
+ 78, 71, 71, 85, 69, 69, 84, 128, 78, 71, 71, 85, 65, 69, 83, 72, 65, 197,
+ 78, 71, 71, 85, 65, 69, 206, 78, 71, 71, 85, 65, 128, 78, 71, 71, 85,
128, 78, 71, 71, 79, 79, 128, 78, 71, 71, 79, 128, 78, 71, 71, 73, 128,
78, 71, 71, 69, 85, 88, 128, 78, 71, 71, 69, 85, 65, 69, 84, 128, 78, 71,
71, 69, 85, 65, 69, 128, 78, 71, 71, 69, 213, 78, 71, 71, 69, 78, 128,
78, 71, 71, 69, 69, 84, 128, 78, 71, 71, 69, 69, 69, 69, 128, 78, 71, 71,
69, 69, 128, 78, 71, 71, 69, 128, 78, 71, 71, 65, 80, 128, 78, 71, 71,
- 65, 65, 77, 65, 69, 128, 78, 71, 71, 65, 65, 77, 128, 78, 71, 71, 128,
- 78, 71, 69, 88, 128, 78, 71, 69, 85, 82, 69, 85, 84, 128, 78, 71, 69, 80,
- 128, 78, 71, 69, 78, 128, 78, 71, 69, 69, 128, 78, 71, 69, 65, 68, 65,
- 76, 128, 78, 71, 65, 88, 128, 78, 71, 65, 85, 128, 78, 71, 65, 84, 128,
- 78, 71, 65, 211, 78, 71, 65, 81, 128, 78, 71, 65, 80, 128, 78, 71, 65,
- 78, 71, 85, 128, 78, 71, 65, 78, 128, 78, 71, 65, 73, 128, 78, 71, 65,
- 72, 128, 78, 71, 65, 65, 73, 128, 78, 71, 193, 78, 70, 128, 78, 69, 88,
- 212, 78, 69, 88, 128, 78, 69, 87, 83, 80, 65, 80, 69, 82, 128, 78, 69,
- 87, 76, 73, 78, 69, 128, 78, 69, 87, 128, 78, 69, 85, 84, 82, 65, 204,
- 78, 69, 85, 84, 69, 82, 128, 78, 69, 84, 128, 78, 69, 212, 78, 69, 83,
- 84, 69, 196, 78, 69, 81, 85, 68, 65, 65, 128, 78, 69, 80, 84, 85, 78, 69,
- 128, 78, 69, 80, 128, 78, 69, 79, 128, 78, 69, 207, 78, 69, 78, 65, 78,
- 79, 128, 78, 69, 78, 128, 78, 69, 76, 128, 78, 69, 73, 84, 72, 69, 210,
- 78, 69, 71, 65, 84, 73, 79, 206, 78, 69, 71, 65, 84, 69, 196, 78, 69, 67,
- 75, 84, 73, 69, 128, 78, 69, 66, 69, 78, 83, 84, 73, 77, 77, 69, 128, 78,
- 68, 85, 88, 128, 78, 68, 85, 84, 128, 78, 68, 85, 82, 88, 128, 78, 68,
- 85, 82, 128, 78, 68, 85, 80, 128, 78, 68, 85, 78, 128, 78, 68, 213, 78,
- 68, 79, 88, 128, 78, 68, 79, 84, 128, 78, 68, 79, 80, 128, 78, 68, 79,
- 79, 128, 78, 68, 79, 78, 128, 78, 68, 79, 77, 66, 85, 128, 78, 68, 79,
- 76, 197, 78, 68, 73, 88, 128, 78, 68, 73, 84, 128, 78, 68, 73, 81, 128,
- 78, 68, 73, 80, 128, 78, 68, 73, 69, 88, 128, 78, 68, 73, 69, 128, 78,
- 68, 73, 68, 65, 128, 78, 68, 73, 65, 81, 128, 78, 68, 69, 88, 128, 78,
- 68, 69, 85, 88, 128, 78, 68, 69, 85, 84, 128, 78, 68, 69, 85, 65, 69, 82,
- 69, 69, 128, 78, 68, 69, 80, 128, 78, 68, 69, 69, 128, 78, 68, 69, 128,
- 78, 68, 65, 88, 128, 78, 68, 65, 84, 128, 78, 68, 65, 80, 128, 78, 68,
- 65, 77, 128, 78, 68, 65, 65, 78, 71, 71, 69, 85, 65, 69, 84, 128, 78, 68,
- 65, 65, 128, 78, 68, 65, 193, 78, 66, 89, 88, 128, 78, 66, 89, 84, 128,
- 78, 66, 89, 82, 88, 128, 78, 66, 89, 82, 128, 78, 66, 89, 80, 128, 78,
- 66, 89, 128, 78, 66, 85, 88, 128, 78, 66, 85, 84, 128, 78, 66, 85, 82,
- 88, 128, 78, 66, 85, 82, 128, 78, 66, 85, 80, 128, 78, 66, 85, 128, 78,
- 66, 79, 88, 128, 78, 66, 79, 84, 128, 78, 66, 79, 80, 128, 78, 66, 79,
- 128, 78, 66, 73, 88, 128, 78, 66, 73, 84, 128, 78, 66, 73, 80, 128, 78,
- 66, 73, 69, 88, 128, 78, 66, 73, 69, 80, 128, 78, 66, 73, 69, 128, 78,
- 66, 73, 128, 78, 66, 72, 128, 78, 66, 65, 88, 128, 78, 66, 65, 84, 128,
- 78, 66, 65, 80, 128, 78, 66, 65, 128, 78, 65, 89, 65, 78, 78, 65, 128,
- 78, 65, 89, 128, 78, 65, 88, 73, 65, 206, 78, 65, 88, 128, 78, 65, 85,
- 84, 72, 83, 128, 78, 65, 85, 68, 73, 218, 78, 65, 84, 85, 82, 65, 204,
- 78, 65, 84, 73, 79, 78, 65, 204, 78, 65, 83, 75, 65, 80, 201, 78, 65, 83,
- 72, 73, 128, 78, 65, 83, 65, 76, 73, 90, 65, 84, 73, 79, 78, 128, 78, 65,
- 83, 65, 76, 73, 90, 65, 84, 73, 79, 206, 78, 65, 82, 82, 79, 215, 78, 65,
- 82, 128, 78, 65, 81, 128, 78, 65, 79, 211, 78, 65, 78, 83, 65, 78, 65,
- 81, 128, 78, 65, 78, 71, 77, 79, 78, 84, 72, 79, 128, 78, 65, 78, 68,
- 128, 78, 65, 78, 65, 128, 78, 65, 77, 69, 128, 78, 65, 77, 197, 78, 65,
- 77, 50, 128, 78, 65, 77, 128, 78, 65, 75, 128, 78, 65, 73, 82, 193, 78,
- 65, 73, 204, 78, 65, 71, 82, 201, 78, 65, 71, 65, 82, 128, 78, 65, 71,
- 65, 128, 78, 65, 71, 193, 78, 65, 71, 128, 78, 65, 199, 78, 65, 69, 128,
- 78, 65, 66, 76, 65, 128, 78, 65, 65, 83, 73, 75, 89, 65, 89, 65, 128, 78,
- 65, 65, 75, 83, 73, 75, 89, 65, 89, 65, 128, 78, 65, 65, 73, 128, 78, 65,
- 193, 78, 65, 50, 128, 78, 65, 45, 50, 128, 78, 48, 52, 50, 128, 78, 48,
- 52, 49, 128, 78, 48, 52, 48, 128, 78, 48, 51, 57, 128, 78, 48, 51, 56,
- 128, 78, 48, 51, 55, 65, 128, 78, 48, 51, 55, 128, 78, 48, 51, 54, 128,
- 78, 48, 51, 53, 65, 128, 78, 48, 51, 53, 128, 78, 48, 51, 52, 65, 128,
- 78, 48, 51, 52, 128, 78, 48, 51, 51, 65, 128, 78, 48, 51, 51, 128, 78,
- 48, 51, 50, 128, 78, 48, 51, 49, 128, 78, 48, 51, 48, 128, 78, 48, 50,
- 57, 128, 78, 48, 50, 56, 128, 78, 48, 50, 55, 128, 78, 48, 50, 54, 128,
- 78, 48, 50, 53, 65, 128, 78, 48, 50, 53, 128, 78, 48, 50, 52, 128, 78,
- 48, 50, 51, 128, 78, 48, 50, 50, 128, 78, 48, 50, 49, 128, 78, 48, 50,
- 48, 128, 78, 48, 49, 57, 128, 78, 48, 49, 56, 66, 128, 78, 48, 49, 56,
- 65, 128, 78, 48, 49, 56, 128, 78, 48, 49, 55, 128, 78, 48, 49, 54, 128,
- 78, 48, 49, 53, 128, 78, 48, 49, 52, 128, 78, 48, 49, 51, 128, 78, 48,
- 49, 50, 128, 78, 48, 49, 49, 128, 78, 48, 49, 48, 128, 78, 48, 48, 57,
- 128, 78, 48, 48, 56, 128, 78, 48, 48, 55, 128, 78, 48, 48, 54, 128, 78,
- 48, 48, 53, 128, 78, 48, 48, 52, 128, 78, 48, 48, 51, 128, 78, 48, 48,
- 50, 128, 78, 48, 48, 49, 128, 78, 45, 67, 82, 69, 197, 78, 45, 65, 82,
- 217, 77, 89, 88, 128, 77, 89, 84, 128, 77, 89, 83, 76, 73, 84, 69, 128,
- 77, 89, 80, 128, 77, 89, 65, 128, 77, 89, 193, 77, 89, 128, 77, 217, 77,
- 87, 79, 79, 128, 77, 87, 79, 128, 77, 87, 73, 73, 128, 77, 87, 73, 128,
- 77, 87, 69, 69, 128, 77, 87, 69, 128, 77, 87, 65, 65, 128, 77, 87, 65,
- 128, 77, 87, 128, 77, 215, 77, 86, 83, 128, 77, 86, 79, 80, 128, 77, 86,
- 73, 128, 77, 86, 69, 85, 65, 69, 78, 71, 65, 77, 128, 77, 86, 128, 77,
- 214, 77, 85, 88, 128, 77, 85, 85, 83, 73, 75, 65, 84, 79, 65, 78, 128,
- 77, 85, 85, 82, 68, 72, 65, 74, 193, 77, 85, 85, 128, 77, 85, 84, 128,
- 77, 85, 83, 73, 67, 128, 77, 85, 83, 73, 195, 77, 85, 83, 72, 82, 79, 79,
- 77, 128, 77, 85, 83, 72, 51, 128, 77, 85, 83, 72, 179, 77, 85, 83, 72,
- 128, 77, 85, 83, 200, 77, 85, 82, 88, 128, 77, 85, 82, 71, 85, 50, 128,
- 77, 85, 82, 69, 128, 77, 85, 82, 68, 65, 128, 77, 85, 82, 68, 193, 77,
- 85, 82, 128, 77, 85, 81, 68, 65, 77, 128, 77, 85, 80, 128, 77, 85, 79,
- 88, 128, 77, 85, 79, 84, 128, 77, 85, 79, 80, 128, 77, 85, 79, 77, 65,
- 69, 128, 77, 85, 79, 128, 77, 85, 78, 83, 85, 66, 128, 77, 85, 78, 65,
- 72, 128, 77, 85, 76, 84, 73, 83, 69, 84, 128, 77, 85, 76, 84, 73, 83, 69,
- 212, 77, 85, 76, 84, 73, 80, 76, 73, 67, 65, 84, 73, 79, 78, 128, 77, 85,
- 76, 84, 73, 80, 76, 73, 67, 65, 84, 73, 79, 206, 77, 85, 76, 84, 73, 80,
- 76, 197, 77, 85, 76, 84, 73, 79, 67, 85, 76, 65, 210, 77, 85, 76, 84, 73,
- 77, 65, 80, 128, 77, 85, 76, 84, 201, 77, 85, 75, 80, 72, 82, 69, 78, 71,
- 128, 77, 85, 73, 78, 128, 77, 85, 71, 83, 128, 77, 85, 71, 128, 77, 85,
- 199, 77, 85, 69, 128, 77, 85, 67, 72, 128, 77, 85, 67, 200, 77, 85, 67,
- 65, 65, 68, 128, 77, 85, 65, 78, 128, 77, 85, 65, 69, 128, 77, 85, 45,
- 71, 65, 65, 72, 76, 65, 193, 77, 213, 77, 83, 128, 77, 80, 65, 128, 77,
- 79, 89, 65, 73, 128, 77, 79, 88, 128, 77, 79, 86, 73, 197, 77, 79, 86,
- 69, 196, 77, 79, 85, 84, 72, 128, 77, 79, 85, 84, 200, 77, 79, 85, 83,
- 69, 128, 77, 79, 85, 83, 197, 77, 79, 85, 78, 84, 65, 73, 78, 83, 128,
- 77, 79, 85, 78, 84, 65, 73, 78, 128, 77, 79, 85, 78, 84, 65, 73, 206, 77,
- 79, 85, 78, 212, 77, 79, 85, 78, 68, 128, 77, 79, 85, 78, 196, 77, 79,
- 84, 72, 69, 82, 128, 77, 79, 84, 128, 77, 79, 82, 84, 85, 85, 77, 128,
- 77, 79, 82, 84, 65, 82, 128, 77, 79, 82, 80, 72, 79, 76, 79, 71, 73, 67,
- 65, 204, 77, 79, 82, 78, 73, 78, 71, 128, 77, 79, 80, 128, 77, 79, 79,
- 83, 69, 45, 67, 82, 69, 197, 77, 79, 79, 78, 128, 77, 79, 79, 206, 77,
- 79, 79, 77, 80, 85, 81, 128, 77, 79, 79, 77, 69, 85, 84, 128, 77, 79, 79,
- 128, 77, 79, 78, 84, 73, 69, 69, 78, 128, 77, 79, 78, 84, 72, 128, 77,
- 79, 78, 84, 200, 77, 79, 78, 83, 84, 69, 82, 128, 77, 79, 78, 79, 83, 84,
- 65, 66, 76, 197, 77, 79, 78, 79, 83, 80, 65, 67, 197, 77, 79, 78, 79, 82,
- 65, 73, 76, 128, 77, 79, 78, 79, 71, 82, 65, 80, 200, 77, 79, 78, 79, 71,
- 82, 65, 77, 77, 79, 211, 77, 79, 78, 79, 71, 82, 65, 205, 77, 79, 78, 79,
- 70, 79, 78, 73, 65, 83, 128, 77, 79, 78, 79, 67, 85, 76, 65, 210, 77, 79,
- 78, 75, 69, 89, 128, 77, 79, 78, 75, 69, 217, 77, 79, 78, 73, 128, 77,
- 79, 78, 71, 75, 69, 85, 65, 69, 81, 128, 77, 79, 78, 69, 217, 77, 79, 78,
- 128, 77, 79, 206, 77, 79, 76, 128, 77, 79, 72, 65, 77, 77, 65, 196, 77,
- 79, 68, 85, 76, 207, 77, 79, 68, 69, 83, 84, 89, 128, 77, 79, 68, 69, 76,
- 83, 128, 77, 79, 68, 69, 76, 128, 77, 79, 68, 69, 128, 77, 79, 66, 73,
- 76, 197, 77, 79, 65, 128, 77, 207, 77, 78, 89, 65, 205, 77, 78, 65, 83,
- 128, 77, 77, 83, 80, 128, 77, 77, 128, 77, 205, 77, 76, 65, 128, 77, 76,
- 128, 77, 75, 80, 65, 82, 65, 209, 77, 73, 88, 128, 77, 73, 84, 128, 77,
- 73, 83, 82, 65, 128, 77, 73, 82, 73, 66, 65, 65, 82, 85, 128, 77, 73, 82,
- 73, 128, 77, 73, 82, 69, 68, 128, 77, 73, 80, 128, 77, 73, 78, 89, 128,
- 77, 73, 78, 85, 83, 45, 79, 82, 45, 80, 76, 85, 211, 77, 73, 78, 85, 83,
- 128, 77, 73, 78, 73, 83, 84, 69, 82, 128, 77, 73, 78, 73, 77, 65, 128,
- 77, 73, 78, 73, 68, 73, 83, 67, 128, 77, 73, 78, 73, 66, 85, 83, 128, 77,
- 73, 77, 69, 128, 77, 73, 77, 128, 77, 73, 76, 76, 73, 79, 78, 211, 77,
- 73, 76, 76, 69, 84, 128, 77, 73, 76, 76, 197, 77, 73, 76, 204, 77, 73,
- 76, 75, 217, 77, 73, 76, 128, 77, 73, 75, 85, 82, 79, 78, 128, 77, 73,
- 75, 82, 79, 206, 77, 73, 75, 82, 73, 128, 77, 73, 73, 78, 128, 77, 73,
- 73, 128, 77, 73, 199, 77, 73, 69, 88, 128, 77, 73, 69, 85, 77, 45, 84,
- 73, 75, 69, 85, 84, 128, 77, 73, 69, 85, 77, 45, 83, 83, 65, 78, 71, 83,
- 73, 79, 83, 128, 77, 73, 69, 85, 77, 45, 83, 83, 65, 78, 71, 78, 73, 69,
- 85, 78, 128, 77, 73, 69, 85, 77, 45, 82, 73, 69, 85, 76, 128, 77, 73, 69,
- 85, 77, 45, 80, 73, 69, 85, 80, 45, 83, 73, 79, 83, 128, 77, 73, 69, 85,
- 77, 45, 80, 73, 69, 85, 80, 128, 77, 73, 69, 85, 77, 45, 80, 65, 78, 83,
- 73, 79, 83, 128, 77, 73, 69, 85, 77, 45, 78, 73, 69, 85, 78, 128, 77, 73,
- 69, 85, 77, 45, 67, 73, 69, 85, 67, 128, 77, 73, 69, 85, 77, 45, 67, 72,
- 73, 69, 85, 67, 72, 128, 77, 73, 69, 85, 205, 77, 73, 69, 80, 128, 77,
- 73, 69, 69, 128, 77, 73, 69, 128, 77, 73, 68, 76, 73, 78, 197, 77, 73,
- 68, 68, 76, 69, 45, 87, 69, 76, 83, 200, 77, 73, 68, 68, 76, 197, 77, 73,
- 196, 77, 73, 67, 82, 79, 83, 67, 79, 80, 69, 128, 77, 73, 67, 82, 79, 80,
- 72, 79, 78, 69, 128, 77, 73, 67, 82, 207, 77, 73, 67, 210, 77, 72, 90,
- 128, 77, 72, 65, 128, 77, 72, 128, 77, 71, 85, 88, 128, 77, 71, 85, 84,
- 128, 77, 71, 85, 82, 88, 128, 77, 71, 85, 82, 128, 77, 71, 85, 80, 128,
- 77, 71, 85, 79, 88, 128, 77, 71, 85, 79, 80, 128, 77, 71, 85, 79, 128,
- 77, 71, 85, 128, 77, 71, 79, 88, 128, 77, 71, 79, 84, 128, 77, 71, 79,
- 80, 128, 77, 71, 79, 128, 77, 71, 207, 77, 71, 73, 69, 88, 128, 77, 71,
- 73, 69, 128, 77, 71, 69, 88, 128, 77, 71, 69, 80, 128, 77, 71, 69, 128,
- 77, 71, 66, 85, 128, 77, 71, 66, 79, 79, 128, 77, 71, 66, 79, 70, 85, 77,
- 128, 77, 71, 66, 79, 128, 77, 71, 66, 73, 128, 77, 71, 66, 69, 85, 78,
- 128, 77, 71, 66, 69, 78, 128, 77, 71, 66, 69, 69, 128, 77, 71, 66, 69,
- 128, 77, 71, 66, 65, 83, 65, 81, 128, 77, 71, 66, 65, 83, 65, 128, 77,
- 71, 65, 88, 128, 77, 71, 65, 84, 128, 77, 71, 65, 80, 128, 77, 71, 65,
- 128, 77, 71, 128, 77, 70, 79, 78, 128, 77, 70, 79, 206, 77, 70, 79, 128,
- 77, 70, 73, 89, 65, 81, 128, 77, 70, 73, 69, 69, 128, 77, 70, 69, 85, 84,
- 128, 77, 70, 69, 85, 81, 128, 77, 70, 69, 85, 65, 69, 128, 77, 70, 65,
- 65, 128, 77, 69, 90, 90, 79, 128, 77, 69, 88, 128, 77, 69, 85, 212, 77,
- 69, 85, 81, 128, 77, 69, 85, 78, 74, 79, 77, 78, 68, 69, 85, 81, 128, 77,
- 69, 85, 78, 128, 77, 69, 84, 82, 79, 128, 77, 69, 84, 82, 73, 67, 65,
- 204, 77, 69, 84, 82, 73, 65, 128, 77, 69, 84, 82, 69, 84, 69, 211, 77,
- 69, 84, 79, 66, 69, 76, 85, 83, 128, 77, 69, 84, 69, 75, 128, 77, 69, 84,
- 69, 71, 128, 77, 69, 84, 65, 76, 128, 77, 69, 84, 193, 77, 69, 83, 83,
- 69, 78, 73, 65, 206, 77, 69, 83, 83, 65, 71, 69, 128, 77, 69, 83, 83, 65,
- 71, 197, 77, 69, 83, 79, 128, 77, 69, 83, 73, 128, 77, 69, 83, 72, 128,
- 77, 69, 82, 79, 73, 84, 73, 195, 77, 69, 82, 75, 72, 65, 128, 77, 69, 82,
- 75, 72, 193, 77, 69, 82, 73, 68, 73, 65, 78, 83, 128, 77, 69, 82, 73,
- 128, 77, 69, 82, 71, 69, 128, 77, 69, 82, 67, 85, 82, 89, 128, 77, 69,
- 82, 67, 85, 82, 217, 77, 69, 78, 68, 85, 84, 128, 77, 69, 78, 128, 77,
- 69, 77, 79, 128, 77, 69, 77, 66, 69, 82, 83, 72, 73, 80, 128, 77, 69, 77,
- 66, 69, 82, 128, 77, 69, 77, 66, 69, 210, 77, 69, 77, 45, 81, 79, 80, 72,
- 128, 77, 69, 77, 128, 77, 69, 205, 77, 69, 76, 79, 68, 73, 195, 77, 69,
- 76, 73, 75, 128, 77, 69, 73, 90, 73, 128, 77, 69, 71, 65, 84, 79, 78,
+ 65, 65, 77, 65, 69, 128, 78, 71, 71, 65, 65, 77, 128, 78, 71, 71, 65, 65,
+ 128, 78, 71, 71, 128, 78, 71, 69, 88, 128, 78, 71, 69, 85, 82, 69, 85,
+ 84, 128, 78, 71, 69, 80, 128, 78, 71, 69, 78, 128, 78, 71, 69, 69, 128,
+ 78, 71, 69, 65, 68, 65, 76, 128, 78, 71, 65, 88, 128, 78, 71, 65, 85,
+ 128, 78, 71, 65, 84, 128, 78, 71, 65, 211, 78, 71, 65, 81, 128, 78, 71,
+ 65, 80, 128, 78, 71, 65, 78, 71, 85, 128, 78, 71, 65, 78, 128, 78, 71,
+ 65, 73, 128, 78, 71, 65, 72, 128, 78, 71, 65, 65, 73, 128, 78, 71, 193,
+ 78, 70, 128, 78, 69, 88, 212, 78, 69, 88, 128, 78, 69, 87, 83, 80, 65,
+ 80, 69, 82, 128, 78, 69, 87, 76, 73, 78, 69, 128, 78, 69, 87, 76, 73, 78,
+ 197, 78, 69, 87, 128, 78, 69, 215, 78, 69, 85, 84, 82, 65, 76, 128, 78,
+ 69, 85, 84, 82, 65, 204, 78, 69, 85, 84, 69, 82, 128, 78, 69, 84, 87, 79,
+ 82, 75, 69, 196, 78, 69, 84, 128, 78, 69, 212, 78, 69, 83, 84, 69, 196,
+ 78, 69, 82, 196, 78, 69, 81, 85, 68, 65, 65, 128, 78, 69, 80, 84, 85, 78,
+ 69, 128, 78, 69, 80, 128, 78, 69, 79, 128, 78, 69, 207, 78, 69, 78, 79,
+ 69, 128, 78, 69, 78, 65, 78, 79, 128, 78, 69, 78, 128, 78, 69, 76, 128,
+ 78, 69, 73, 84, 72, 69, 210, 78, 69, 71, 65, 84, 73, 79, 206, 78, 69, 71,
+ 65, 84, 69, 196, 78, 69, 67, 75, 84, 73, 69, 128, 78, 69, 67, 75, 128,
+ 78, 69, 66, 69, 78, 83, 84, 73, 77, 77, 69, 128, 78, 68, 85, 88, 128, 78,
+ 68, 85, 84, 128, 78, 68, 85, 82, 88, 128, 78, 68, 85, 82, 128, 78, 68,
+ 85, 80, 128, 78, 68, 85, 78, 128, 78, 68, 213, 78, 68, 79, 88, 128, 78,
+ 68, 79, 84, 128, 78, 68, 79, 80, 128, 78, 68, 79, 79, 128, 78, 68, 79,
+ 78, 128, 78, 68, 79, 77, 66, 85, 128, 78, 68, 79, 76, 197, 78, 68, 73,
+ 88, 128, 78, 68, 73, 84, 128, 78, 68, 73, 81, 128, 78, 68, 73, 80, 128,
+ 78, 68, 73, 69, 88, 128, 78, 68, 73, 69, 128, 78, 68, 73, 68, 65, 128,
+ 78, 68, 73, 65, 81, 128, 78, 68, 69, 88, 128, 78, 68, 69, 85, 88, 128,
+ 78, 68, 69, 85, 84, 128, 78, 68, 69, 85, 65, 69, 82, 69, 69, 128, 78, 68,
+ 69, 80, 128, 78, 68, 69, 69, 128, 78, 68, 69, 128, 78, 68, 65, 88, 128,
+ 78, 68, 65, 84, 128, 78, 68, 65, 80, 128, 78, 68, 65, 77, 128, 78, 68,
+ 65, 65, 78, 71, 71, 69, 85, 65, 69, 84, 128, 78, 68, 65, 65, 128, 78, 68,
+ 65, 193, 78, 67, 72, 65, 85, 128, 78, 66, 89, 88, 128, 78, 66, 89, 84,
+ 128, 78, 66, 89, 82, 88, 128, 78, 66, 89, 82, 128, 78, 66, 89, 80, 128,
+ 78, 66, 89, 128, 78, 66, 85, 88, 128, 78, 66, 85, 84, 128, 78, 66, 85,
+ 82, 88, 128, 78, 66, 85, 82, 128, 78, 66, 85, 80, 128, 78, 66, 85, 128,
+ 78, 66, 79, 88, 128, 78, 66, 79, 84, 128, 78, 66, 79, 80, 128, 78, 66,
+ 79, 128, 78, 66, 73, 88, 128, 78, 66, 73, 84, 128, 78, 66, 73, 80, 128,
+ 78, 66, 73, 69, 88, 128, 78, 66, 73, 69, 80, 128, 78, 66, 73, 69, 128,
+ 78, 66, 73, 128, 78, 66, 72, 128, 78, 66, 65, 88, 128, 78, 66, 65, 84,
+ 128, 78, 66, 65, 80, 128, 78, 66, 65, 128, 78, 65, 89, 65, 78, 78, 65,
+ 128, 78, 65, 89, 128, 78, 65, 88, 73, 65, 206, 78, 65, 88, 128, 78, 65,
+ 85, 84, 72, 83, 128, 78, 65, 85, 68, 73, 218, 78, 65, 84, 85, 82, 65,
+ 204, 78, 65, 84, 73, 79, 78, 65, 204, 78, 65, 83, 75, 65, 80, 201, 78,
+ 65, 83, 72, 73, 128, 78, 65, 83, 65, 76, 73, 90, 65, 84, 73, 79, 78, 128,
+ 78, 65, 83, 65, 76, 73, 90, 65, 84, 73, 79, 206, 78, 65, 83, 65, 204, 78,
+ 65, 82, 82, 79, 215, 78, 65, 82, 128, 78, 65, 81, 128, 78, 65, 79, 211,
+ 78, 65, 78, 83, 65, 78, 65, 81, 128, 78, 65, 78, 71, 77, 79, 78, 84, 72,
+ 79, 128, 78, 65, 78, 68, 128, 78, 65, 78, 65, 128, 78, 65, 77, 69, 128,
+ 78, 65, 77, 197, 78, 65, 77, 50, 128, 78, 65, 77, 128, 78, 65, 75, 128,
+ 78, 65, 73, 82, 193, 78, 65, 73, 204, 78, 65, 71, 82, 201, 78, 65, 71,
+ 65, 82, 128, 78, 65, 71, 65, 128, 78, 65, 71, 193, 78, 65, 71, 128, 78,
+ 65, 199, 78, 65, 69, 128, 78, 65, 66, 76, 65, 128, 78, 65, 66, 65, 84,
+ 65, 69, 65, 206, 78, 65, 65, 83, 73, 75, 89, 65, 89, 65, 128, 78, 65, 65,
+ 75, 83, 73, 75, 89, 65, 89, 65, 128, 78, 65, 65, 73, 128, 78, 65, 193,
+ 78, 65, 52, 128, 78, 65, 50, 128, 78, 65, 45, 50, 128, 78, 48, 52, 50,
+ 128, 78, 48, 52, 49, 128, 78, 48, 52, 48, 128, 78, 48, 51, 57, 128, 78,
+ 48, 51, 56, 128, 78, 48, 51, 55, 65, 128, 78, 48, 51, 55, 128, 78, 48,
+ 51, 54, 128, 78, 48, 51, 53, 65, 128, 78, 48, 51, 53, 128, 78, 48, 51,
+ 52, 65, 128, 78, 48, 51, 52, 128, 78, 48, 51, 51, 65, 128, 78, 48, 51,
+ 51, 128, 78, 48, 51, 50, 128, 78, 48, 51, 49, 128, 78, 48, 51, 48, 128,
+ 78, 48, 50, 57, 128, 78, 48, 50, 56, 128, 78, 48, 50, 55, 128, 78, 48,
+ 50, 54, 128, 78, 48, 50, 53, 65, 128, 78, 48, 50, 53, 128, 78, 48, 50,
+ 52, 128, 78, 48, 50, 51, 128, 78, 48, 50, 50, 128, 78, 48, 50, 49, 128,
+ 78, 48, 50, 48, 128, 78, 48, 49, 57, 128, 78, 48, 49, 56, 66, 128, 78,
+ 48, 49, 56, 65, 128, 78, 48, 49, 56, 128, 78, 48, 49, 55, 128, 78, 48,
+ 49, 54, 128, 78, 48, 49, 53, 128, 78, 48, 49, 52, 128, 78, 48, 49, 51,
+ 128, 78, 48, 49, 50, 128, 78, 48, 49, 49, 128, 78, 48, 49, 48, 128, 78,
+ 48, 48, 57, 128, 78, 48, 48, 56, 128, 78, 48, 48, 55, 128, 78, 48, 48,
+ 54, 128, 78, 48, 48, 53, 128, 78, 48, 48, 52, 128, 78, 48, 48, 51, 128,
+ 78, 48, 48, 50, 128, 78, 48, 48, 49, 128, 78, 45, 67, 82, 69, 197, 78,
+ 45, 65, 82, 217, 77, 89, 88, 128, 77, 89, 84, 128, 77, 89, 83, 76, 73,
+ 84, 69, 128, 77, 89, 80, 128, 77, 89, 65, 128, 77, 89, 193, 77, 89, 128,
+ 77, 217, 77, 87, 79, 79, 128, 77, 87, 79, 128, 77, 87, 73, 73, 128, 77,
+ 87, 73, 128, 77, 87, 69, 69, 128, 77, 87, 69, 128, 77, 87, 65, 65, 128,
+ 77, 87, 65, 128, 77, 87, 128, 77, 215, 77, 86, 83, 128, 77, 86, 79, 80,
+ 128, 77, 86, 73, 128, 77, 86, 69, 85, 65, 69, 78, 71, 65, 77, 128, 77,
+ 86, 128, 77, 214, 77, 85, 88, 128, 77, 85, 85, 83, 73, 75, 65, 84, 79,
+ 65, 78, 128, 77, 85, 85, 82, 68, 72, 65, 74, 193, 77, 85, 85, 128, 77,
+ 85, 84, 128, 77, 85, 83, 73, 67, 128, 77, 85, 83, 73, 195, 77, 85, 83,
+ 72, 82, 79, 79, 77, 128, 77, 85, 83, 72, 51, 128, 77, 85, 83, 72, 179,
+ 77, 85, 83, 72, 128, 77, 85, 83, 200, 77, 85, 83, 128, 77, 85, 82, 88,
+ 128, 77, 85, 82, 71, 85, 50, 128, 77, 85, 82, 69, 128, 77, 85, 82, 68,
+ 65, 128, 77, 85, 82, 68, 193, 77, 85, 82, 128, 77, 85, 81, 68, 65, 77,
+ 128, 77, 85, 80, 128, 77, 85, 79, 88, 128, 77, 85, 79, 84, 128, 77, 85,
+ 79, 80, 128, 77, 85, 79, 77, 65, 69, 128, 77, 85, 79, 128, 77, 85, 78,
+ 83, 85, 66, 128, 77, 85, 78, 65, 72, 128, 77, 85, 78, 128, 77, 85, 76,
+ 84, 73, 83, 69, 84, 128, 77, 85, 76, 84, 73, 83, 69, 212, 77, 85, 76, 84,
+ 73, 80, 76, 73, 67, 65, 84, 73, 79, 78, 128, 77, 85, 76, 84, 73, 80, 76,
+ 73, 67, 65, 84, 73, 79, 206, 77, 85, 76, 84, 73, 80, 76, 69, 128, 77, 85,
+ 76, 84, 73, 80, 76, 197, 77, 85, 76, 84, 73, 79, 67, 85, 76, 65, 210, 77,
+ 85, 76, 84, 73, 77, 65, 80, 128, 77, 85, 76, 84, 201, 77, 85, 76, 84, 65,
+ 78, 201, 77, 85, 75, 80, 72, 82, 69, 78, 71, 128, 77, 85, 73, 78, 128,
+ 77, 85, 71, 83, 128, 77, 85, 71, 128, 77, 85, 199, 77, 85, 69, 78, 128,
+ 77, 85, 69, 128, 77, 85, 67, 72, 128, 77, 85, 67, 200, 77, 85, 67, 65,
+ 65, 68, 128, 77, 85, 65, 83, 128, 77, 85, 65, 78, 128, 77, 85, 65, 69,
+ 128, 77, 85, 45, 71, 65, 65, 72, 76, 65, 193, 77, 213, 77, 83, 128, 77,
+ 82, 207, 77, 80, 65, 128, 77, 79, 89, 65, 73, 128, 77, 79, 88, 128, 77,
+ 79, 86, 73, 197, 77, 79, 86, 69, 211, 77, 79, 86, 69, 77, 69, 78, 84, 45,
+ 87, 65, 76, 76, 80, 76, 65, 78, 197, 77, 79, 86, 69, 77, 69, 78, 84, 45,
+ 72, 73, 78, 71, 197, 77, 79, 86, 69, 77, 69, 78, 84, 45, 70, 76, 79, 79,
+ 82, 80, 76, 65, 78, 197, 77, 79, 86, 69, 77, 69, 78, 84, 45, 68, 73, 65,
+ 71, 79, 78, 65, 204, 77, 79, 86, 69, 77, 69, 78, 84, 128, 77, 79, 86, 69,
+ 77, 69, 78, 212, 77, 79, 86, 69, 196, 77, 79, 86, 69, 128, 77, 79, 85,
+ 84, 72, 128, 77, 79, 85, 83, 69, 128, 77, 79, 85, 83, 197, 77, 79, 85,
+ 78, 84, 65, 73, 78, 83, 128, 77, 79, 85, 78, 84, 65, 73, 78, 128, 77, 79,
+ 85, 78, 84, 65, 73, 206, 77, 79, 85, 78, 212, 77, 79, 85, 78, 68, 128,
+ 77, 79, 85, 78, 196, 77, 79, 84, 79, 82, 87, 65, 89, 128, 77, 79, 84, 79,
+ 82, 67, 89, 67, 76, 69, 128, 77, 79, 84, 79, 210, 77, 79, 84, 72, 69, 82,
+ 128, 77, 79, 84, 128, 77, 79, 83, 81, 85, 69, 128, 77, 79, 82, 84, 85,
+ 85, 77, 128, 77, 79, 82, 84, 65, 82, 128, 77, 79, 82, 80, 72, 79, 76, 79,
+ 71, 73, 67, 65, 204, 77, 79, 82, 78, 73, 78, 71, 128, 77, 79, 80, 128,
+ 77, 79, 79, 83, 69, 45, 67, 82, 69, 197, 77, 79, 79, 78, 128, 77, 79, 79,
+ 206, 77, 79, 79, 77, 80, 85, 81, 128, 77, 79, 79, 77, 69, 85, 84, 128,
+ 77, 79, 79, 68, 128, 77, 79, 79, 196, 77, 79, 79, 128, 77, 79, 78, 84,
+ 73, 69, 69, 78, 128, 77, 79, 78, 84, 72, 128, 77, 79, 78, 84, 200, 77,
+ 79, 78, 83, 84, 69, 82, 128, 77, 79, 78, 79, 83, 84, 65, 66, 76, 197, 77,
+ 79, 78, 79, 83, 80, 65, 67, 197, 77, 79, 78, 79, 82, 65, 73, 76, 128, 77,
+ 79, 78, 79, 71, 82, 65, 80, 200, 77, 79, 78, 79, 71, 82, 65, 77, 77, 79,
+ 211, 77, 79, 78, 79, 71, 82, 65, 205, 77, 79, 78, 79, 70, 79, 78, 73, 65,
+ 83, 128, 77, 79, 78, 79, 67, 85, 76, 65, 210, 77, 79, 78, 75, 69, 89,
+ 128, 77, 79, 78, 75, 69, 217, 77, 79, 78, 73, 128, 77, 79, 78, 71, 75,
+ 69, 85, 65, 69, 81, 128, 77, 79, 78, 69, 89, 45, 77, 79, 85, 84, 200, 77,
+ 79, 78, 69, 217, 77, 79, 78, 128, 77, 79, 206, 77, 79, 76, 128, 77, 79,
+ 72, 65, 77, 77, 65, 196, 77, 79, 68, 85, 76, 207, 77, 79, 68, 73, 70, 73,
+ 69, 82, 45, 57, 128, 77, 79, 68, 73, 70, 73, 69, 82, 45, 56, 128, 77, 79,
+ 68, 73, 70, 73, 69, 82, 45, 55, 128, 77, 79, 68, 73, 70, 73, 69, 82, 45,
+ 54, 128, 77, 79, 68, 73, 70, 73, 69, 82, 45, 53, 128, 77, 79, 68, 73, 70,
+ 73, 69, 82, 45, 52, 128, 77, 79, 68, 73, 70, 73, 69, 82, 45, 51, 128, 77,
+ 79, 68, 73, 70, 73, 69, 82, 45, 50, 128, 77, 79, 68, 73, 70, 73, 69, 82,
+ 45, 49, 54, 128, 77, 79, 68, 73, 70, 73, 69, 82, 45, 49, 53, 128, 77, 79,
+ 68, 73, 70, 73, 69, 82, 45, 49, 52, 128, 77, 79, 68, 73, 70, 73, 69, 82,
+ 45, 49, 51, 128, 77, 79, 68, 73, 70, 73, 69, 82, 45, 49, 50, 128, 77, 79,
+ 68, 73, 70, 73, 69, 82, 45, 49, 49, 128, 77, 79, 68, 73, 70, 73, 69, 82,
+ 45, 49, 48, 128, 77, 79, 68, 201, 77, 79, 68, 69, 83, 84, 89, 128, 77,
+ 79, 68, 69, 77, 128, 77, 79, 68, 69, 76, 83, 128, 77, 79, 68, 69, 76,
+ 128, 77, 79, 68, 69, 128, 77, 79, 66, 73, 76, 197, 77, 79, 65, 128, 77,
+ 207, 77, 78, 89, 65, 205, 77, 78, 65, 83, 128, 77, 77, 83, 80, 128, 77,
+ 77, 128, 77, 205, 77, 76, 65, 128, 77, 76, 128, 77, 75, 80, 65, 82, 65,
+ 209, 77, 73, 88, 128, 77, 73, 84, 128, 77, 73, 83, 82, 65, 128, 77, 73,
+ 82, 73, 66, 65, 65, 82, 85, 128, 77, 73, 82, 73, 128, 77, 73, 82, 69, 68,
+ 128, 77, 73, 80, 128, 77, 73, 78, 89, 128, 77, 73, 78, 85, 83, 45, 79,
+ 82, 45, 80, 76, 85, 211, 77, 73, 78, 85, 83, 128, 77, 73, 78, 73, 83, 84,
+ 69, 82, 128, 77, 73, 78, 73, 77, 73, 90, 69, 128, 77, 73, 78, 73, 77, 65,
+ 128, 77, 73, 78, 73, 68, 73, 83, 67, 128, 77, 73, 78, 73, 66, 85, 83,
+ 128, 77, 73, 77, 69, 128, 77, 73, 77, 128, 77, 73, 76, 76, 73, 79, 78,
+ 83, 128, 77, 73, 76, 76, 73, 79, 78, 211, 77, 73, 76, 76, 69, 84, 128,
+ 77, 73, 76, 76, 197, 77, 73, 76, 204, 77, 73, 76, 75, 217, 77, 73, 76,
+ 73, 84, 65, 82, 217, 77, 73, 76, 128, 77, 73, 75, 85, 82, 79, 78, 128,
+ 77, 73, 75, 82, 79, 206, 77, 73, 75, 82, 73, 128, 77, 73, 73, 78, 128,
+ 77, 73, 73, 128, 77, 73, 199, 77, 73, 69, 88, 128, 77, 73, 69, 85, 77,
+ 45, 84, 73, 75, 69, 85, 84, 128, 77, 73, 69, 85, 77, 45, 83, 83, 65, 78,
+ 71, 83, 73, 79, 83, 128, 77, 73, 69, 85, 77, 45, 83, 83, 65, 78, 71, 78,
+ 73, 69, 85, 78, 128, 77, 73, 69, 85, 77, 45, 82, 73, 69, 85, 76, 128, 77,
+ 73, 69, 85, 77, 45, 80, 73, 69, 85, 80, 45, 83, 73, 79, 83, 128, 77, 73,
+ 69, 85, 77, 45, 80, 73, 69, 85, 80, 128, 77, 73, 69, 85, 77, 45, 80, 65,
+ 78, 83, 73, 79, 83, 128, 77, 73, 69, 85, 77, 45, 78, 73, 69, 85, 78, 128,
+ 77, 73, 69, 85, 77, 45, 67, 73, 69, 85, 67, 128, 77, 73, 69, 85, 77, 45,
+ 67, 72, 73, 69, 85, 67, 72, 128, 77, 73, 69, 85, 205, 77, 73, 69, 80,
+ 128, 77, 73, 69, 69, 128, 77, 73, 69, 128, 77, 73, 68, 76, 73, 78, 197,
+ 77, 73, 68, 68, 76, 69, 45, 87, 69, 76, 83, 200, 77, 73, 68, 68, 76, 69,
+ 128, 77, 73, 68, 45, 76, 69, 86, 69, 204, 77, 73, 196, 77, 73, 67, 82,
+ 79, 83, 67, 79, 80, 69, 128, 77, 73, 67, 82, 79, 80, 72, 79, 78, 69, 128,
+ 77, 73, 67, 82, 207, 77, 73, 67, 210, 77, 72, 90, 128, 77, 72, 65, 128,
+ 77, 72, 128, 77, 71, 85, 88, 128, 77, 71, 85, 84, 128, 77, 71, 85, 82,
+ 88, 128, 77, 71, 85, 82, 128, 77, 71, 85, 80, 128, 77, 71, 85, 79, 88,
+ 128, 77, 71, 85, 79, 80, 128, 77, 71, 85, 79, 128, 77, 71, 85, 128, 77,
+ 71, 79, 88, 128, 77, 71, 79, 84, 128, 77, 71, 79, 80, 128, 77, 71, 79,
+ 128, 77, 71, 207, 77, 71, 73, 69, 88, 128, 77, 71, 73, 69, 128, 77, 71,
+ 69, 88, 128, 77, 71, 69, 80, 128, 77, 71, 69, 128, 77, 71, 66, 85, 128,
+ 77, 71, 66, 79, 79, 128, 77, 71, 66, 79, 70, 85, 77, 128, 77, 71, 66, 79,
+ 128, 77, 71, 66, 73, 128, 77, 71, 66, 69, 85, 78, 128, 77, 71, 66, 69,
+ 78, 128, 77, 71, 66, 69, 69, 128, 77, 71, 66, 69, 128, 77, 71, 66, 65,
+ 83, 65, 81, 128, 77, 71, 66, 65, 83, 65, 128, 77, 71, 65, 88, 128, 77,
+ 71, 65, 84, 128, 77, 71, 65, 80, 128, 77, 71, 65, 128, 77, 71, 128, 77,
+ 70, 79, 78, 128, 77, 70, 79, 206, 77, 70, 79, 128, 77, 70, 73, 89, 65,
+ 81, 128, 77, 70, 73, 69, 69, 128, 77, 70, 69, 85, 84, 128, 77, 70, 69,
+ 85, 81, 128, 77, 70, 69, 85, 65, 69, 128, 77, 70, 65, 65, 128, 77, 69,
+ 90, 90, 79, 128, 77, 69, 88, 128, 77, 69, 85, 212, 77, 69, 85, 81, 128,
+ 77, 69, 85, 78, 74, 79, 77, 78, 68, 69, 85, 81, 128, 77, 69, 85, 78, 128,
+ 77, 69, 84, 82, 79, 128, 77, 69, 84, 82, 73, 67, 65, 204, 77, 69, 84, 82,
+ 73, 65, 128, 77, 69, 84, 82, 69, 84, 69, 211, 77, 69, 84, 79, 66, 69, 76,
+ 85, 83, 128, 77, 69, 84, 69, 75, 128, 77, 69, 84, 69, 71, 128, 77, 69,
+ 84, 65, 76, 128, 77, 69, 84, 193, 77, 69, 83, 83, 69, 78, 73, 65, 206,
+ 77, 69, 83, 83, 65, 71, 69, 128, 77, 69, 83, 83, 65, 71, 197, 77, 69, 83,
+ 79, 128, 77, 69, 83, 73, 128, 77, 69, 83, 72, 128, 77, 69, 82, 75, 72,
+ 65, 128, 77, 69, 82, 75, 72, 193, 77, 69, 82, 73, 68, 73, 65, 78, 83,
+ 128, 77, 69, 82, 73, 128, 77, 69, 82, 71, 69, 128, 77, 69, 82, 67, 85,
+ 82, 89, 128, 77, 69, 82, 67, 85, 82, 217, 77, 69, 78, 79, 82, 65, 200,
+ 77, 69, 78, 79, 69, 128, 77, 69, 78, 68, 85, 84, 128, 77, 69, 78, 128,
+ 77, 69, 77, 79, 128, 77, 69, 77, 66, 69, 82, 83, 72, 73, 80, 128, 77, 69,
+ 77, 66, 69, 82, 128, 77, 69, 77, 66, 69, 210, 77, 69, 77, 45, 81, 79, 80,
+ 72, 128, 77, 69, 77, 128, 77, 69, 205, 77, 69, 76, 79, 68, 73, 195, 77,
+ 69, 76, 73, 75, 128, 77, 69, 73, 90, 73, 128, 77, 69, 71, 65, 84, 79, 78,
128, 77, 69, 71, 65, 80, 72, 79, 78, 69, 128, 77, 69, 71, 65, 76, 73,
- 128, 77, 69, 69, 84, 79, 82, 85, 128, 77, 69, 69, 84, 128, 77, 69, 69,
- 77, 85, 128, 77, 69, 69, 77, 128, 77, 69, 69, 69, 69, 128, 77, 69, 68,
- 73, 85, 77, 128, 77, 69, 68, 73, 85, 205, 77, 69, 68, 73, 67, 73, 78, 69,
- 128, 77, 69, 68, 73, 67, 65, 204, 77, 69, 65, 84, 128, 77, 69, 65, 212,
- 77, 69, 65, 83, 85, 82, 69, 196, 77, 69, 65, 83, 85, 82, 69, 128, 77, 69,
- 65, 83, 85, 82, 197, 77, 68, 85, 206, 77, 196, 77, 67, 72, 213, 77, 67,
- 72, 65, 206, 77, 195, 77, 66, 85, 79, 81, 128, 77, 66, 85, 79, 128, 77,
- 66, 85, 69, 128, 77, 66, 85, 65, 69, 77, 128, 77, 66, 85, 65, 69, 128,
- 77, 66, 79, 79, 128, 77, 66, 79, 128, 77, 66, 73, 84, 128, 77, 66, 73,
- 212, 77, 66, 73, 82, 73, 69, 69, 78, 128, 77, 66, 73, 128, 77, 66, 69,
- 85, 88, 128, 77, 66, 69, 85, 82, 73, 128, 77, 66, 69, 85, 77, 128, 77,
- 66, 69, 82, 65, 69, 128, 77, 66, 69, 78, 128, 77, 66, 69, 69, 75, 69, 69,
- 84, 128, 77, 66, 69, 69, 128, 77, 66, 69, 128, 77, 66, 65, 81, 128, 77,
- 66, 65, 78, 89, 73, 128, 77, 66, 65, 65, 82, 65, 69, 128, 77, 66, 65, 65,
- 75, 69, 84, 128, 77, 66, 65, 65, 128, 77, 66, 65, 193, 77, 66, 193, 77,
- 66, 52, 128, 77, 66, 51, 128, 77, 66, 50, 128, 77, 66, 128, 77, 194, 77,
- 65, 89, 65, 78, 78, 65, 128, 77, 65, 89, 128, 77, 65, 88, 73, 77, 65,
- 128, 77, 65, 88, 128, 77, 65, 85, 128, 77, 65, 84, 84, 79, 67, 75, 128,
- 77, 65, 84, 82, 73, 88, 128, 77, 65, 84, 69, 82, 73, 65, 76, 83, 128, 77,
- 65, 84, 128, 77, 65, 83, 213, 77, 65, 83, 83, 73, 78, 71, 128, 77, 65,
- 83, 83, 65, 71, 69, 128, 77, 65, 83, 79, 82, 193, 77, 65, 83, 75, 128,
- 77, 65, 83, 72, 70, 65, 65, 84, 128, 77, 65, 83, 72, 50, 128, 77, 65, 83,
- 67, 85, 76, 73, 78, 197, 77, 65, 82, 89, 128, 77, 65, 82, 85, 75, 85,
- 128, 77, 65, 82, 84, 89, 82, 73, 193, 77, 65, 82, 82, 89, 73, 78, 199,
- 77, 65, 82, 82, 73, 65, 71, 197, 77, 65, 82, 75, 69, 82, 128, 77, 65, 82,
- 75, 45, 52, 128, 77, 65, 82, 75, 45, 51, 128, 77, 65, 82, 75, 45, 50,
- 128, 77, 65, 82, 75, 45, 49, 128, 77, 65, 82, 69, 128, 77, 65, 82, 67,
- 72, 128, 77, 65, 82, 67, 65, 84, 79, 45, 83, 84, 65, 67, 67, 65, 84, 79,
- 128, 77, 65, 82, 67, 65, 84, 79, 128, 77, 65, 82, 67, 65, 83, 73, 84, 69,
- 128, 77, 65, 82, 66, 85, 84, 65, 128, 77, 65, 82, 66, 85, 84, 193, 77,
- 65, 82, 128, 77, 65, 81, 65, 70, 128, 77, 65, 81, 128, 77, 65, 80, 76,
- 197, 77, 65, 80, 73, 81, 128, 77, 65, 208, 77, 65, 79, 128, 77, 65, 78,
- 83, 89, 79, 78, 128, 77, 65, 78, 83, 85, 65, 69, 128, 77, 65, 78, 78, 65,
- 218, 77, 65, 78, 78, 65, 128, 77, 65, 78, 71, 65, 76, 65, 77, 128, 77,
- 65, 78, 68, 65, 73, 76, 73, 78, 199, 77, 65, 78, 68, 65, 73, 195, 77, 65,
- 78, 67, 72, 213, 77, 65, 78, 65, 67, 76, 69, 83, 128, 77, 65, 76, 84, 69,
- 83, 197, 77, 65, 76, 69, 69, 82, 73, 128, 77, 65, 76, 69, 128, 77, 65,
- 76, 197, 77, 65, 76, 65, 75, 79, 206, 77, 65, 75, 83, 85, 82, 65, 128,
- 77, 65, 75, 83, 85, 82, 193, 77, 65, 73, 90, 69, 128, 77, 65, 73, 89, 65,
- 77, 79, 75, 128, 77, 65, 73, 84, 65, 73, 75, 72, 85, 128, 77, 65, 73, 82,
- 85, 128, 77, 65, 73, 77, 85, 65, 78, 128, 77, 65, 73, 77, 65, 76, 65, 73,
+ 128, 77, 69, 69, 84, 79, 82, 85, 128, 77, 69, 69, 84, 69, 201, 77, 69,
+ 69, 84, 128, 77, 69, 69, 77, 85, 128, 77, 69, 69, 77, 128, 77, 69, 69,
+ 202, 77, 69, 69, 69, 69, 128, 77, 69, 68, 73, 85, 77, 128, 77, 69, 68,
+ 73, 85, 205, 77, 69, 68, 73, 67, 73, 78, 69, 128, 77, 69, 68, 73, 67, 65,
+ 204, 77, 69, 68, 65, 76, 128, 77, 69, 65, 84, 128, 77, 69, 65, 212, 77,
+ 69, 65, 83, 85, 82, 69, 196, 77, 69, 65, 83, 85, 82, 69, 128, 77, 69, 65,
+ 83, 85, 82, 197, 77, 68, 85, 206, 77, 196, 77, 67, 72, 213, 77, 67, 72,
+ 65, 206, 77, 195, 77, 66, 85, 85, 128, 77, 66, 85, 79, 81, 128, 77, 66,
+ 85, 79, 128, 77, 66, 85, 69, 128, 77, 66, 85, 65, 69, 77, 128, 77, 66,
+ 85, 65, 69, 128, 77, 66, 79, 79, 128, 77, 66, 79, 128, 77, 66, 73, 84,
+ 128, 77, 66, 73, 212, 77, 66, 73, 82, 73, 69, 69, 78, 128, 77, 66, 73,
+ 128, 77, 66, 69, 85, 88, 128, 77, 66, 69, 85, 82, 73, 128, 77, 66, 69,
+ 85, 77, 128, 77, 66, 69, 82, 65, 69, 128, 77, 66, 69, 78, 128, 77, 66,
+ 69, 69, 75, 69, 69, 84, 128, 77, 66, 69, 69, 128, 77, 66, 69, 128, 77,
+ 66, 65, 81, 128, 77, 66, 65, 78, 89, 73, 128, 77, 66, 65, 65, 82, 65, 69,
+ 128, 77, 66, 65, 65, 75, 69, 84, 128, 77, 66, 65, 65, 128, 77, 66, 65,
+ 193, 77, 66, 193, 77, 66, 52, 128, 77, 66, 51, 128, 77, 66, 50, 128, 77,
+ 65, 89, 69, 203, 77, 65, 89, 65, 78, 78, 65, 128, 77, 65, 89, 128, 77,
+ 65, 88, 73, 77, 73, 90, 69, 128, 77, 65, 88, 73, 77, 65, 128, 77, 65, 88,
+ 128, 77, 65, 85, 128, 77, 65, 84, 84, 79, 67, 75, 128, 77, 65, 84, 82,
+ 73, 88, 128, 77, 65, 84, 69, 82, 73, 65, 76, 83, 128, 77, 65, 84, 128,
+ 77, 65, 83, 213, 77, 65, 83, 83, 73, 78, 71, 128, 77, 65, 83, 83, 65, 71,
+ 69, 128, 77, 65, 83, 79, 82, 193, 77, 65, 83, 75, 128, 77, 65, 83, 72,
+ 70, 65, 65, 84, 128, 77, 65, 83, 72, 50, 128, 77, 65, 83, 67, 85, 76, 73,
+ 78, 197, 77, 65, 82, 89, 128, 77, 65, 82, 87, 65, 82, 201, 77, 65, 82,
+ 85, 75, 85, 128, 77, 65, 82, 84, 89, 82, 73, 193, 77, 65, 82, 82, 89, 73,
+ 78, 199, 77, 65, 82, 82, 73, 65, 71, 197, 77, 65, 82, 75, 211, 77, 65,
+ 82, 75, 69, 82, 128, 77, 65, 82, 75, 45, 52, 128, 77, 65, 82, 75, 45, 51,
+ 128, 77, 65, 82, 75, 45, 50, 128, 77, 65, 82, 75, 45, 49, 128, 77, 65,
+ 82, 69, 128, 77, 65, 82, 67, 72, 128, 77, 65, 82, 67, 65, 84, 79, 45, 83,
+ 84, 65, 67, 67, 65, 84, 79, 128, 77, 65, 82, 67, 65, 84, 79, 128, 77, 65,
+ 82, 67, 65, 83, 73, 84, 69, 128, 77, 65, 82, 66, 85, 84, 65, 128, 77, 65,
+ 82, 66, 85, 84, 193, 77, 65, 82, 128, 77, 65, 81, 65, 70, 128, 77, 65,
+ 81, 128, 77, 65, 80, 76, 197, 77, 65, 80, 73, 81, 128, 77, 65, 208, 77,
+ 65, 79, 128, 77, 65, 78, 84, 69, 76, 80, 73, 69, 67, 197, 77, 65, 78, 83,
+ 89, 79, 78, 128, 77, 65, 78, 83, 85, 65, 69, 128, 77, 65, 78, 78, 65,
+ 218, 77, 65, 78, 78, 65, 128, 77, 65, 78, 73, 67, 72, 65, 69, 65, 206,
+ 77, 65, 78, 71, 65, 76, 65, 77, 128, 77, 65, 78, 68, 65, 73, 76, 73, 78,
+ 199, 77, 65, 78, 68, 65, 73, 195, 77, 65, 78, 67, 72, 213, 77, 65, 78,
+ 65, 212, 77, 65, 78, 65, 67, 76, 69, 83, 128, 77, 65, 76, 84, 69, 83,
+ 197, 77, 65, 76, 69, 69, 82, 73, 128, 77, 65, 76, 69, 128, 77, 65, 76,
+ 197, 77, 65, 76, 65, 75, 79, 206, 77, 65, 75, 83, 85, 82, 65, 128, 77,
+ 65, 75, 83, 85, 82, 193, 77, 65, 73, 90, 69, 128, 77, 65, 73, 89, 65, 77,
+ 79, 75, 128, 77, 65, 73, 84, 65, 73, 75, 72, 85, 128, 77, 65, 73, 82, 85,
+ 128, 77, 65, 73, 77, 85, 65, 78, 128, 77, 65, 73, 77, 65, 76, 65, 73,
128, 77, 65, 73, 76, 66, 79, 216, 77, 65, 73, 75, 85, 82, 79, 128, 77,
65, 73, 68, 69, 78, 128, 77, 65, 73, 128, 77, 65, 72, 74, 79, 78, 199,
77, 65, 72, 72, 65, 128, 77, 65, 72, 65, 80, 82, 65, 78, 65, 128, 77, 65,
- 72, 65, 80, 65, 75, 72, 128, 77, 65, 72, 65, 65, 80, 82, 65, 65, 78, 193,
- 77, 65, 72, 128, 77, 65, 71, 78, 73, 70, 89, 73, 78, 199, 77, 65, 69, 83,
- 73, 128, 77, 65, 69, 78, 89, 73, 128, 77, 65, 69, 78, 74, 69, 84, 128,
- 77, 65, 69, 77, 86, 69, 85, 88, 128, 77, 65, 69, 77, 75, 80, 69, 78, 128,
- 77, 65, 69, 77, 71, 66, 73, 69, 69, 128, 77, 65, 69, 77, 66, 71, 66, 73,
- 69, 69, 128, 77, 65, 69, 77, 66, 65, 128, 77, 65, 69, 77, 128, 77, 65,
- 69, 76, 69, 69, 128, 77, 65, 69, 75, 69, 85, 80, 128, 77, 65, 68, 89, 65,
- 128, 77, 65, 68, 85, 128, 77, 65, 68, 68, 65, 200, 77, 65, 68, 68, 65,
- 128, 77, 65, 68, 68, 193, 77, 65, 67, 82, 79, 78, 45, 71, 82, 65, 86, 69,
- 128, 77, 65, 67, 82, 79, 78, 45, 66, 82, 69, 86, 69, 128, 77, 65, 67, 82,
- 79, 78, 45, 65, 67, 85, 84, 69, 128, 77, 65, 67, 82, 79, 78, 128, 77, 65,
- 67, 82, 79, 206, 77, 65, 67, 72, 73, 78, 69, 128, 77, 65, 65, 89, 89, 65,
- 65, 128, 77, 65, 65, 73, 128, 77, 65, 65, 128, 77, 65, 50, 128, 77, 48,
- 52, 52, 128, 77, 48, 52, 51, 128, 77, 48, 52, 50, 128, 77, 48, 52, 49,
- 128, 77, 48, 52, 48, 65, 128, 77, 48, 52, 48, 128, 77, 48, 51, 57, 128,
- 77, 48, 51, 56, 128, 77, 48, 51, 55, 128, 77, 48, 51, 54, 128, 77, 48,
- 51, 53, 128, 77, 48, 51, 52, 128, 77, 48, 51, 51, 66, 128, 77, 48, 51,
- 51, 65, 128, 77, 48, 51, 51, 128, 77, 48, 51, 50, 128, 77, 48, 51, 49,
- 65, 128, 77, 48, 51, 49, 128, 77, 48, 51, 48, 128, 77, 48, 50, 57, 128,
- 77, 48, 50, 56, 65, 128, 77, 48, 50, 56, 128, 77, 48, 50, 55, 128, 77,
- 48, 50, 54, 128, 77, 48, 50, 53, 128, 77, 48, 50, 52, 65, 128, 77, 48,
- 50, 52, 128, 77, 48, 50, 51, 128, 77, 48, 50, 50, 65, 128, 77, 48, 50,
- 50, 128, 77, 48, 50, 49, 128, 77, 48, 50, 48, 128, 77, 48, 49, 57, 128,
- 77, 48, 49, 56, 128, 77, 48, 49, 55, 65, 128, 77, 48, 49, 55, 128, 77,
- 48, 49, 54, 65, 128, 77, 48, 49, 54, 128, 77, 48, 49, 53, 65, 128, 77,
- 48, 49, 53, 128, 77, 48, 49, 52, 128, 77, 48, 49, 51, 128, 77, 48, 49,
+ 72, 65, 80, 65, 75, 72, 128, 77, 65, 72, 65, 74, 65, 78, 201, 77, 65, 72,
+ 65, 65, 80, 82, 65, 65, 78, 193, 77, 65, 72, 128, 77, 65, 71, 78, 73, 70,
+ 89, 73, 78, 199, 77, 65, 69, 83, 73, 128, 77, 65, 69, 78, 89, 73, 128,
+ 77, 65, 69, 78, 74, 69, 84, 128, 77, 65, 69, 77, 86, 69, 85, 88, 128, 77,
+ 65, 69, 77, 75, 80, 69, 78, 128, 77, 65, 69, 77, 71, 66, 73, 69, 69, 128,
+ 77, 65, 69, 77, 66, 71, 66, 73, 69, 69, 128, 77, 65, 69, 77, 66, 65, 128,
+ 77, 65, 69, 77, 128, 77, 65, 69, 76, 69, 69, 128, 77, 65, 69, 75, 69, 85,
+ 80, 128, 77, 65, 68, 89, 65, 128, 77, 65, 68, 85, 128, 77, 65, 68, 68,
+ 65, 200, 77, 65, 68, 68, 65, 128, 77, 65, 68, 68, 193, 77, 65, 67, 82,
+ 79, 78, 45, 71, 82, 65, 86, 69, 128, 77, 65, 67, 82, 79, 78, 45, 66, 82,
+ 69, 86, 69, 128, 77, 65, 67, 82, 79, 78, 45, 65, 67, 85, 84, 69, 128, 77,
+ 65, 67, 82, 79, 78, 128, 77, 65, 67, 82, 79, 206, 77, 65, 67, 72, 73, 78,
+ 69, 128, 77, 65, 65, 89, 89, 65, 65, 128, 77, 65, 65, 73, 128, 77, 65,
+ 65, 128, 77, 65, 50, 128, 77, 49, 57, 183, 77, 49, 57, 182, 77, 49, 57,
+ 181, 77, 49, 57, 180, 77, 49, 57, 179, 77, 49, 57, 178, 77, 49, 57, 177,
+ 77, 49, 57, 176, 77, 49, 56, 185, 77, 49, 56, 184, 77, 49, 56, 183, 77,
+ 49, 56, 182, 77, 49, 56, 181, 77, 49, 56, 180, 77, 49, 56, 179, 77, 49,
+ 56, 178, 77, 49, 56, 177, 77, 49, 56, 176, 77, 49, 55, 185, 77, 49, 55,
+ 184, 77, 49, 55, 183, 77, 49, 55, 182, 77, 49, 55, 181, 77, 49, 55, 180,
+ 77, 49, 55, 179, 77, 49, 55, 178, 77, 49, 55, 177, 77, 49, 55, 176, 77,
+ 49, 54, 185, 77, 49, 54, 184, 77, 49, 54, 183, 77, 49, 54, 182, 77, 49,
+ 54, 181, 77, 49, 54, 180, 77, 49, 54, 179, 77, 49, 54, 178, 77, 49, 54,
+ 177, 77, 49, 54, 176, 77, 49, 53, 185, 77, 49, 53, 184, 77, 49, 53, 183,
+ 77, 49, 53, 182, 77, 49, 53, 181, 77, 49, 53, 180, 77, 49, 53, 179, 77,
+ 49, 53, 178, 77, 49, 53, 177, 77, 49, 53, 176, 77, 49, 52, 185, 77, 49,
+ 52, 184, 77, 49, 52, 183, 77, 49, 52, 182, 77, 49, 52, 181, 77, 49, 52,
+ 180, 77, 49, 52, 179, 77, 49, 52, 178, 77, 49, 52, 177, 77, 49, 52, 176,
+ 77, 49, 51, 185, 77, 49, 51, 184, 77, 49, 51, 183, 77, 49, 51, 182, 77,
+ 49, 51, 181, 77, 49, 51, 180, 77, 49, 51, 179, 77, 49, 51, 178, 77, 49,
+ 51, 177, 77, 49, 51, 176, 77, 49, 50, 185, 77, 49, 50, 184, 77, 49, 50,
+ 183, 77, 49, 50, 182, 77, 49, 50, 181, 77, 49, 50, 180, 77, 49, 50, 179,
+ 77, 49, 50, 178, 77, 49, 50, 177, 77, 49, 50, 176, 77, 49, 49, 185, 77,
+ 49, 49, 184, 77, 49, 49, 183, 77, 49, 49, 182, 77, 49, 49, 181, 77, 49,
+ 49, 180, 77, 49, 49, 179, 77, 49, 49, 178, 77, 49, 49, 177, 77, 49, 49,
+ 176, 77, 49, 48, 185, 77, 49, 48, 184, 77, 49, 48, 183, 77, 49, 48, 182,
+ 77, 49, 48, 181, 77, 49, 48, 180, 77, 49, 48, 179, 77, 49, 48, 178, 77,
+ 49, 48, 177, 77, 49, 48, 176, 77, 48, 57, 185, 77, 48, 57, 184, 77, 48,
+ 57, 183, 77, 48, 57, 182, 77, 48, 57, 181, 77, 48, 57, 180, 77, 48, 57,
+ 179, 77, 48, 57, 178, 77, 48, 57, 177, 77, 48, 57, 176, 77, 48, 56, 185,
+ 77, 48, 56, 184, 77, 48, 56, 183, 77, 48, 56, 182, 77, 48, 56, 181, 77,
+ 48, 56, 180, 77, 48, 56, 179, 77, 48, 56, 178, 77, 48, 56, 177, 77, 48,
+ 56, 176, 77, 48, 55, 185, 77, 48, 55, 184, 77, 48, 55, 183, 77, 48, 55,
+ 182, 77, 48, 55, 181, 77, 48, 55, 180, 77, 48, 55, 179, 77, 48, 55, 178,
+ 77, 48, 55, 177, 77, 48, 55, 176, 77, 48, 54, 185, 77, 48, 54, 184, 77,
+ 48, 54, 183, 77, 48, 54, 182, 77, 48, 54, 181, 77, 48, 54, 180, 77, 48,
+ 54, 179, 77, 48, 54, 178, 77, 48, 54, 177, 77, 48, 54, 176, 77, 48, 53,
+ 185, 77, 48, 53, 184, 77, 48, 53, 183, 77, 48, 53, 182, 77, 48, 53, 181,
+ 77, 48, 53, 180, 77, 48, 53, 179, 77, 48, 53, 178, 77, 48, 53, 177, 77,
+ 48, 53, 176, 77, 48, 52, 185, 77, 48, 52, 184, 77, 48, 52, 183, 77, 48,
+ 52, 182, 77, 48, 52, 181, 77, 48, 52, 52, 128, 77, 48, 52, 180, 77, 48,
+ 52, 51, 128, 77, 48, 52, 179, 77, 48, 52, 50, 128, 77, 48, 52, 178, 77,
+ 48, 52, 49, 128, 77, 48, 52, 177, 77, 48, 52, 48, 65, 128, 77, 48, 52,
+ 48, 128, 77, 48, 52, 176, 77, 48, 51, 57, 128, 77, 48, 51, 185, 77, 48,
+ 51, 56, 128, 77, 48, 51, 184, 77, 48, 51, 55, 128, 77, 48, 51, 183, 77,
+ 48, 51, 54, 128, 77, 48, 51, 182, 77, 48, 51, 53, 128, 77, 48, 51, 181,
+ 77, 48, 51, 52, 128, 77, 48, 51, 180, 77, 48, 51, 51, 66, 128, 77, 48,
+ 51, 51, 65, 128, 77, 48, 51, 51, 128, 77, 48, 51, 179, 77, 48, 51, 50,
+ 128, 77, 48, 51, 178, 77, 48, 51, 49, 65, 128, 77, 48, 51, 49, 128, 77,
+ 48, 51, 177, 77, 48, 51, 48, 128, 77, 48, 51, 176, 77, 48, 50, 57, 128,
+ 77, 48, 50, 185, 77, 48, 50, 56, 65, 128, 77, 48, 50, 56, 128, 77, 48,
+ 50, 184, 77, 48, 50, 55, 128, 77, 48, 50, 183, 77, 48, 50, 54, 128, 77,
+ 48, 50, 182, 77, 48, 50, 53, 128, 77, 48, 50, 181, 77, 48, 50, 52, 65,
+ 128, 77, 48, 50, 52, 128, 77, 48, 50, 180, 77, 48, 50, 51, 128, 77, 48,
+ 50, 179, 77, 48, 50, 50, 65, 128, 77, 48, 50, 50, 128, 77, 48, 50, 178,
+ 77, 48, 50, 49, 128, 77, 48, 50, 177, 77, 48, 50, 48, 128, 77, 48, 50,
+ 176, 77, 48, 49, 57, 128, 77, 48, 49, 185, 77, 48, 49, 56, 128, 77, 48,
+ 49, 184, 77, 48, 49, 55, 65, 128, 77, 48, 49, 55, 128, 77, 48, 49, 183,
+ 77, 48, 49, 54, 65, 128, 77, 48, 49, 54, 128, 77, 48, 49, 182, 77, 48,
+ 49, 53, 65, 128, 77, 48, 49, 53, 128, 77, 48, 49, 181, 77, 48, 49, 52,
+ 128, 77, 48, 49, 180, 77, 48, 49, 51, 128, 77, 48, 49, 179, 77, 48, 49,
50, 72, 128, 77, 48, 49, 50, 71, 128, 77, 48, 49, 50, 70, 128, 77, 48,
49, 50, 69, 128, 77, 48, 49, 50, 68, 128, 77, 48, 49, 50, 67, 128, 77,
48, 49, 50, 66, 128, 77, 48, 49, 50, 65, 128, 77, 48, 49, 50, 128, 77,
- 48, 49, 49, 128, 77, 48, 49, 48, 65, 128, 77, 48, 49, 48, 128, 77, 48,
- 48, 57, 128, 77, 48, 48, 56, 128, 77, 48, 48, 55, 128, 77, 48, 48, 54,
- 128, 77, 48, 48, 53, 128, 77, 48, 48, 52, 128, 77, 48, 48, 51, 65, 128,
- 77, 48, 48, 51, 128, 77, 48, 48, 50, 128, 77, 48, 48, 49, 66, 128, 77,
- 48, 48, 49, 65, 128, 77, 48, 48, 49, 128, 76, 218, 76, 89, 89, 128, 76,
- 89, 88, 128, 76, 89, 84, 128, 76, 89, 82, 88, 128, 76, 89, 82, 128, 76,
- 89, 80, 128, 76, 89, 68, 73, 65, 206, 76, 89, 67, 73, 65, 206, 76, 88,
- 128, 76, 87, 79, 79, 128, 76, 87, 79, 128, 76, 87, 73, 73, 128, 76, 87,
- 73, 128, 76, 87, 69, 128, 76, 87, 65, 65, 128, 76, 87, 65, 128, 76, 85,
- 88, 128, 76, 85, 85, 128, 76, 85, 84, 128, 76, 85, 82, 88, 128, 76, 85,
- 80, 128, 76, 85, 79, 88, 128, 76, 85, 79, 84, 128, 76, 85, 79, 80, 128,
- 76, 85, 79, 128, 76, 85, 78, 71, 83, 73, 128, 76, 85, 78, 65, 84, 197,
- 76, 85, 205, 76, 85, 76, 128, 76, 85, 73, 83, 128, 76, 85, 72, 85, 82,
- 128, 76, 85, 72, 128, 76, 85, 71, 71, 65, 71, 69, 128, 76, 85, 71, 65,
- 76, 128, 76, 85, 71, 65, 204, 76, 85, 69, 128, 76, 85, 65, 69, 80, 128,
- 76, 85, 51, 128, 76, 85, 50, 128, 76, 85, 178, 76, 82, 79, 128, 76, 82,
- 77, 128, 76, 82, 73, 128, 76, 82, 69, 128, 76, 79, 90, 69, 78, 71, 69,
- 128, 76, 79, 90, 69, 78, 71, 197, 76, 79, 88, 128, 76, 79, 87, 69, 82,
- 69, 196, 76, 79, 87, 69, 210, 76, 79, 87, 45, 185, 76, 79, 86, 197, 76,
- 79, 85, 82, 69, 128, 76, 79, 85, 68, 83, 80, 69, 65, 75, 69, 82, 128, 76,
- 79, 85, 68, 76, 217, 76, 79, 84, 85, 83, 128, 76, 79, 84, 128, 76, 79,
- 82, 82, 89, 128, 76, 79, 82, 82, 65, 73, 78, 69, 128, 76, 79, 81, 128,
- 76, 79, 80, 128, 76, 79, 79, 84, 128, 76, 79, 79, 80, 69, 196, 76, 79,
- 79, 80, 128, 76, 79, 79, 208, 76, 79, 79, 78, 128, 76, 79, 79, 203, 76,
- 79, 79, 128, 76, 79, 78, 83, 85, 77, 128, 76, 79, 78, 71, 65, 128, 76,
- 79, 78, 71, 193, 76, 79, 78, 71, 45, 66, 82, 65, 78, 67, 72, 45, 89, 82,
- 128, 76, 79, 78, 71, 45, 66, 82, 65, 78, 67, 72, 45, 83, 79, 204, 76, 79,
- 78, 71, 45, 66, 82, 65, 78, 67, 72, 45, 79, 83, 211, 76, 79, 78, 71, 45,
- 66, 82, 65, 78, 67, 72, 45, 77, 65, 68, 210, 76, 79, 78, 71, 45, 66, 82,
- 65, 78, 67, 72, 45, 72, 65, 71, 65, 76, 204, 76, 79, 78, 71, 45, 66, 82,
- 65, 78, 67, 72, 45, 65, 210, 76, 79, 77, 77, 65, 69, 128, 76, 79, 77,
- 128, 76, 79, 205, 76, 79, 76, 76, 73, 80, 79, 80, 128, 76, 79, 76, 76,
- 128, 76, 79, 71, 210, 76, 79, 71, 79, 84, 89, 80, 197, 76, 79, 71, 79,
- 71, 82, 65, 205, 76, 79, 71, 128, 76, 79, 68, 69, 83, 84, 79, 78, 69,
- 128, 76, 79, 67, 79, 77, 79, 84, 73, 86, 69, 128, 76, 79, 67, 75, 73, 78,
- 71, 45, 83, 72, 73, 70, 212, 76, 79, 67, 203, 76, 79, 67, 65, 84, 73, 86,
- 69, 128, 76, 79, 67, 65, 84, 73, 79, 206, 76, 79, 65, 128, 76, 78, 128,
- 76, 76, 85, 85, 128, 76, 76, 79, 79, 128, 76, 76, 76, 85, 85, 128, 76,
- 76, 76, 85, 128, 76, 76, 76, 79, 79, 128, 76, 76, 76, 79, 128, 76, 76,
- 76, 73, 73, 128, 76, 76, 76, 73, 128, 76, 76, 76, 69, 69, 128, 76, 76,
- 76, 69, 128, 76, 76, 76, 65, 85, 128, 76, 76, 76, 65, 73, 128, 76, 76,
- 76, 65, 65, 128, 76, 76, 76, 65, 128, 76, 76, 76, 128, 76, 74, 85, 68,
- 73, 74, 69, 128, 76, 74, 69, 128, 76, 74, 128, 76, 73, 88, 128, 76, 73,
- 87, 78, 128, 76, 73, 86, 82, 197, 76, 73, 84, 84, 76, 197, 76, 73, 84,
- 84, 69, 210, 76, 73, 84, 82, 193, 76, 73, 84, 128, 76, 73, 83, 213, 76,
- 73, 82, 193, 76, 73, 81, 85, 73, 196, 76, 73, 81, 128, 76, 73, 80, 83,
- 84, 73, 67, 75, 128, 76, 73, 78, 75, 73, 78, 199, 76, 73, 78, 203, 76,
- 73, 78, 71, 83, 65, 128, 76, 73, 78, 69, 83, 128, 76, 73, 78, 69, 211,
- 76, 73, 78, 69, 45, 57, 128, 76, 73, 78, 69, 45, 55, 128, 76, 73, 78, 69,
- 45, 51, 128, 76, 73, 78, 69, 45, 49, 128, 76, 73, 77, 77, 85, 52, 128,
- 76, 73, 77, 77, 85, 50, 128, 76, 73, 77, 77, 85, 128, 76, 73, 77, 77,
- 213, 76, 73, 77, 73, 84, 69, 196, 76, 73, 77, 73, 84, 65, 84, 73, 79, 78,
- 128, 76, 73, 77, 73, 84, 128, 76, 73, 77, 69, 128, 76, 73, 77, 66, 213,
- 76, 73, 76, 89, 128, 76, 73, 76, 73, 84, 72, 128, 76, 73, 76, 128, 76,
- 73, 71, 72, 84, 78, 73, 78, 71, 128, 76, 73, 71, 72, 84, 72, 79, 85, 83,
- 69, 128, 76, 73, 71, 72, 84, 128, 76, 73, 70, 69, 128, 76, 73, 69, 88,
- 128, 76, 73, 69, 84, 128, 76, 73, 69, 80, 128, 76, 73, 69, 69, 128, 76,
- 73, 69, 128, 76, 73, 68, 128, 76, 73, 66, 82, 65, 128, 76, 73, 66, 69,
- 82, 84, 89, 128, 76, 73, 65, 66, 73, 76, 73, 84, 217, 76, 72, 73, 73,
- 128, 76, 72, 65, 86, 73, 89, 65, 78, 73, 128, 76, 72, 65, 199, 76, 72,
- 65, 65, 128, 76, 72, 128, 76, 69, 90, 72, 128, 76, 69, 88, 128, 76, 69,
- 86, 69, 204, 76, 69, 85, 77, 128, 76, 69, 85, 65, 69, 80, 128, 76, 69,
- 85, 65, 69, 77, 128, 76, 69, 85, 128, 76, 69, 213, 76, 69, 84, 84, 69,
- 82, 83, 128, 76, 69, 84, 84, 69, 82, 128, 76, 69, 212, 76, 69, 83, 83,
- 69, 210, 76, 69, 83, 83, 45, 84, 72, 65, 78, 128, 76, 69, 83, 83, 45, 84,
- 72, 65, 206, 76, 69, 80, 128, 76, 69, 79, 80, 65, 82, 68, 128, 76, 69,
- 79, 128, 76, 69, 78, 84, 73, 67, 85, 76, 65, 210, 76, 69, 78, 73, 83,
- 128, 76, 69, 78, 71, 84, 72, 69, 78, 69, 82, 128, 76, 69, 78, 71, 84,
- 200, 76, 69, 78, 71, 65, 128, 76, 69, 78, 71, 193, 76, 69, 77, 79, 78,
- 128, 76, 69, 77, 79, 73, 128, 76, 69, 76, 69, 84, 128, 76, 69, 76, 69,
- 212, 76, 69, 203, 76, 69, 73, 77, 77, 65, 128, 76, 69, 73, 77, 77, 193,
- 76, 69, 71, 83, 128, 76, 69, 71, 73, 79, 78, 128, 76, 69, 71, 69, 84, 79,
- 211, 76, 69, 71, 128, 76, 69, 70, 84, 87, 65, 82, 68, 83, 128, 76, 69,
- 70, 84, 45, 84, 79, 45, 82, 73, 71, 72, 212, 76, 69, 70, 84, 45, 83, 84,
- 69, 205, 76, 69, 70, 84, 45, 83, 73, 68, 197, 76, 69, 70, 84, 45, 83, 72,
- 65, 68, 69, 196, 76, 69, 70, 84, 45, 80, 79, 73, 78, 84, 73, 78, 199, 76,
- 69, 70, 84, 45, 72, 65, 78, 68, 69, 196, 76, 69, 70, 84, 45, 72, 65, 78,
- 196, 76, 69, 70, 84, 45, 70, 65, 67, 73, 78, 199, 76, 69, 70, 84, 128,
- 76, 69, 69, 82, 65, 69, 87, 65, 128, 76, 69, 69, 75, 128, 76, 69, 69, 69,
- 69, 128, 76, 69, 68, 71, 69, 82, 128, 76, 69, 65, 84, 72, 69, 82, 128,
- 76, 69, 65, 70, 128, 76, 69, 65, 198, 76, 69, 65, 68, 73, 78, 199, 76,
- 69, 65, 68, 69, 82, 128, 76, 69, 65, 196, 76, 68, 65, 78, 128, 76, 68,
- 50, 128, 76, 67, 201, 76, 67, 197, 76, 65, 90, 217, 76, 65, 89, 65, 78,
- 78, 65, 128, 76, 65, 88, 128, 76, 65, 87, 128, 76, 65, 215, 76, 65, 85,
- 76, 65, 128, 76, 65, 85, 75, 65, 218, 76, 65, 84, 73, 78, 65, 84, 197,
+ 48, 49, 178, 77, 48, 49, 49, 128, 77, 48, 49, 177, 77, 48, 49, 48, 65,
+ 128, 77, 48, 49, 48, 128, 77, 48, 49, 176, 77, 48, 48, 57, 128, 77, 48,
+ 48, 185, 77, 48, 48, 56, 128, 77, 48, 48, 184, 77, 48, 48, 55, 128, 77,
+ 48, 48, 183, 77, 48, 48, 54, 128, 77, 48, 48, 182, 77, 48, 48, 53, 128,
+ 77, 48, 48, 181, 77, 48, 48, 52, 128, 77, 48, 48, 180, 77, 48, 48, 51,
+ 65, 128, 77, 48, 48, 51, 128, 77, 48, 48, 179, 77, 48, 48, 50, 128, 77,
+ 48, 48, 178, 77, 48, 48, 49, 66, 128, 77, 48, 48, 49, 65, 128, 77, 48,
+ 48, 49, 128, 77, 48, 48, 177, 76, 218, 76, 89, 89, 128, 76, 89, 88, 128,
+ 76, 89, 84, 128, 76, 89, 82, 88, 128, 76, 89, 82, 128, 76, 89, 80, 128,
+ 76, 89, 73, 84, 128, 76, 89, 68, 73, 65, 206, 76, 89, 67, 73, 65, 206,
+ 76, 88, 128, 76, 87, 79, 79, 128, 76, 87, 79, 128, 76, 87, 73, 73, 128,
+ 76, 87, 73, 128, 76, 87, 69, 128, 76, 87, 65, 65, 128, 76, 87, 65, 128,
+ 76, 85, 88, 128, 76, 85, 85, 128, 76, 85, 84, 128, 76, 85, 82, 88, 128,
+ 76, 85, 80, 128, 76, 85, 79, 88, 128, 76, 85, 79, 84, 128, 76, 85, 79,
+ 80, 128, 76, 85, 79, 128, 76, 85, 78, 71, 83, 73, 128, 76, 85, 78, 65,
+ 84, 197, 76, 85, 205, 76, 85, 76, 128, 76, 85, 73, 83, 128, 76, 85, 72,
+ 85, 82, 128, 76, 85, 72, 128, 76, 85, 200, 76, 85, 71, 71, 65, 71, 69,
+ 128, 76, 85, 71, 65, 76, 128, 76, 85, 71, 65, 204, 76, 85, 69, 128, 76,
+ 85, 197, 76, 85, 66, 128, 76, 85, 65, 69, 80, 128, 76, 85, 51, 128, 76,
+ 85, 50, 128, 76, 85, 178, 76, 82, 79, 128, 76, 82, 77, 128, 76, 82, 73,
+ 128, 76, 82, 69, 128, 76, 79, 90, 69, 78, 71, 69, 128, 76, 79, 90, 69,
+ 78, 71, 197, 76, 79, 88, 128, 76, 79, 87, 69, 82, 69, 196, 76, 79, 87,
+ 69, 210, 76, 79, 87, 45, 82, 69, 86, 69, 82, 83, 69, 68, 45, 185, 76, 79,
+ 87, 45, 77, 73, 196, 76, 79, 87, 45, 70, 65, 76, 76, 73, 78, 199, 76, 79,
+ 87, 45, 185, 76, 79, 86, 197, 76, 79, 85, 82, 69, 128, 76, 79, 85, 68,
+ 83, 80, 69, 65, 75, 69, 82, 128, 76, 79, 85, 68, 76, 217, 76, 79, 84, 85,
+ 83, 128, 76, 79, 84, 128, 76, 79, 82, 82, 89, 128, 76, 79, 82, 82, 65,
+ 73, 78, 69, 128, 76, 79, 81, 128, 76, 79, 80, 128, 76, 79, 79, 84, 128,
+ 76, 79, 79, 80, 69, 196, 76, 79, 79, 80, 128, 76, 79, 79, 208, 76, 79,
+ 79, 78, 128, 76, 79, 79, 203, 76, 79, 79, 128, 76, 79, 78, 83, 85, 77,
+ 128, 76, 79, 78, 71, 65, 128, 76, 79, 78, 71, 193, 76, 79, 78, 71, 45,
+ 66, 82, 65, 78, 67, 72, 45, 89, 82, 128, 76, 79, 78, 71, 45, 66, 82, 65,
+ 78, 67, 72, 45, 83, 79, 204, 76, 79, 78, 71, 45, 66, 82, 65, 78, 67, 72,
+ 45, 79, 83, 211, 76, 79, 78, 71, 45, 66, 82, 65, 78, 67, 72, 45, 77, 65,
+ 68, 210, 76, 79, 78, 71, 45, 66, 82, 65, 78, 67, 72, 45, 72, 65, 71, 65,
+ 76, 204, 76, 79, 78, 71, 45, 66, 82, 65, 78, 67, 72, 45, 65, 210, 76, 79,
+ 77, 77, 65, 69, 128, 76, 79, 77, 128, 76, 79, 205, 76, 79, 76, 76, 73,
+ 80, 79, 80, 128, 76, 79, 76, 76, 128, 76, 79, 71, 210, 76, 79, 71, 79,
+ 84, 89, 80, 197, 76, 79, 71, 79, 71, 82, 65, 205, 76, 79, 71, 128, 76,
+ 79, 68, 69, 83, 84, 79, 78, 69, 128, 76, 79, 67, 79, 77, 79, 84, 73, 86,
+ 69, 128, 76, 79, 67, 75, 73, 78, 71, 45, 83, 72, 73, 70, 212, 76, 79, 67,
+ 203, 76, 79, 67, 65, 84, 73, 86, 69, 128, 76, 79, 67, 65, 84, 73, 79, 78,
+ 45, 87, 65, 76, 76, 80, 76, 65, 78, 197, 76, 79, 67, 65, 84, 73, 79, 78,
+ 45, 70, 76, 79, 79, 82, 80, 76, 65, 78, 197, 76, 79, 67, 65, 84, 73, 79,
+ 206, 76, 79, 65, 128, 76, 78, 128, 76, 76, 85, 85, 128, 76, 76, 79, 79,
+ 128, 76, 76, 76, 85, 85, 128, 76, 76, 76, 85, 128, 76, 76, 76, 79, 79,
+ 128, 76, 76, 76, 79, 128, 76, 76, 76, 73, 73, 128, 76, 76, 76, 73, 128,
+ 76, 76, 76, 69, 69, 128, 76, 76, 76, 69, 128, 76, 76, 76, 65, 85, 128,
+ 76, 76, 76, 65, 73, 128, 76, 76, 76, 65, 65, 128, 76, 76, 76, 65, 128,
+ 76, 76, 76, 128, 76, 74, 85, 68, 73, 74, 69, 128, 76, 74, 69, 128, 76,
+ 74, 128, 76, 73, 88, 128, 76, 73, 87, 78, 128, 76, 73, 86, 82, 197, 76,
+ 73, 84, 84, 76, 69, 128, 76, 73, 84, 84, 76, 197, 76, 73, 84, 84, 69,
+ 210, 76, 73, 84, 82, 193, 76, 73, 84, 200, 76, 73, 83, 213, 76, 73, 83,
+ 128, 76, 73, 82, 193, 76, 73, 81, 85, 73, 196, 76, 73, 81, 128, 76, 73,
+ 80, 83, 84, 73, 67, 75, 128, 76, 73, 80, 211, 76, 73, 208, 76, 73, 78,
+ 75, 73, 78, 199, 76, 73, 78, 75, 69, 196, 76, 73, 78, 203, 76, 73, 78,
+ 71, 83, 65, 128, 76, 73, 78, 69, 83, 128, 76, 73, 78, 69, 211, 76, 73,
+ 78, 69, 45, 57, 128, 76, 73, 78, 69, 45, 55, 128, 76, 73, 78, 69, 45, 51,
+ 128, 76, 73, 78, 69, 45, 49, 128, 76, 73, 77, 77, 85, 52, 128, 76, 73,
+ 77, 77, 85, 50, 128, 76, 73, 77, 77, 85, 128, 76, 73, 77, 77, 213, 76,
+ 73, 77, 73, 84, 69, 196, 76, 73, 77, 73, 84, 65, 84, 73, 79, 78, 128, 76,
+ 73, 77, 73, 84, 128, 76, 73, 77, 69, 128, 76, 73, 77, 66, 213, 76, 73,
+ 77, 66, 211, 76, 73, 77, 194, 76, 73, 76, 89, 128, 76, 73, 76, 73, 84,
+ 72, 128, 76, 73, 76, 128, 76, 73, 71, 72, 84, 78, 73, 78, 71, 128, 76,
+ 73, 71, 72, 84, 78, 73, 78, 199, 76, 73, 71, 72, 84, 72, 79, 85, 83, 69,
+ 128, 76, 73, 71, 72, 84, 128, 76, 73, 71, 65, 84, 73, 78, 199, 76, 73,
+ 70, 84, 69, 82, 128, 76, 73, 70, 69, 128, 76, 73, 69, 88, 128, 76, 73,
+ 69, 84, 128, 76, 73, 69, 80, 128, 76, 73, 69, 69, 128, 76, 73, 69, 128,
+ 76, 73, 68, 128, 76, 73, 67, 75, 73, 78, 199, 76, 73, 66, 82, 65, 128,
+ 76, 73, 66, 69, 82, 84, 89, 128, 76, 73, 65, 66, 73, 76, 73, 84, 217, 76,
+ 72, 73, 73, 128, 76, 72, 65, 86, 73, 89, 65, 78, 73, 128, 76, 72, 65,
+ 199, 76, 72, 65, 65, 128, 76, 72, 128, 76, 69, 90, 72, 128, 76, 69, 88,
+ 128, 76, 69, 86, 73, 84, 65, 84, 73, 78, 71, 128, 76, 69, 85, 77, 128,
+ 76, 69, 85, 65, 69, 80, 128, 76, 69, 85, 65, 69, 77, 128, 76, 69, 85,
+ 128, 76, 69, 213, 76, 69, 84, 84, 69, 82, 83, 128, 76, 69, 84, 84, 69,
+ 82, 128, 76, 69, 212, 76, 69, 83, 83, 69, 210, 76, 69, 83, 83, 45, 84,
+ 72, 65, 78, 128, 76, 69, 83, 83, 45, 84, 72, 65, 206, 76, 69, 80, 67, 72,
+ 193, 76, 69, 80, 128, 76, 69, 79, 80, 65, 82, 68, 128, 76, 69, 79, 128,
+ 76, 69, 78, 84, 73, 67, 85, 76, 65, 210, 76, 69, 78, 73, 83, 128, 76, 69,
+ 78, 73, 211, 76, 69, 78, 71, 84, 72, 69, 78, 69, 82, 128, 76, 69, 78, 71,
+ 84, 72, 45, 55, 128, 76, 69, 78, 71, 84, 72, 45, 54, 128, 76, 69, 78, 71,
+ 84, 72, 45, 53, 128, 76, 69, 78, 71, 84, 72, 45, 52, 128, 76, 69, 78, 71,
+ 84, 72, 45, 51, 128, 76, 69, 78, 71, 84, 72, 45, 50, 128, 76, 69, 78, 71,
+ 84, 72, 45, 49, 128, 76, 69, 78, 71, 84, 200, 76, 69, 78, 71, 65, 128,
+ 76, 69, 78, 71, 193, 76, 69, 77, 79, 78, 128, 76, 69, 77, 79, 73, 128,
+ 76, 69, 76, 69, 84, 128, 76, 69, 76, 69, 212, 76, 69, 203, 76, 69, 73,
+ 77, 77, 65, 128, 76, 69, 73, 77, 77, 193, 76, 69, 73, 128, 76, 69, 71,
+ 83, 128, 76, 69, 71, 73, 79, 78, 128, 76, 69, 71, 69, 84, 79, 211, 76,
+ 69, 71, 128, 76, 69, 199, 76, 69, 70, 84, 87, 65, 82, 68, 83, 128, 76,
+ 69, 70, 84, 45, 84, 79, 45, 82, 73, 71, 72, 212, 76, 69, 70, 84, 45, 83,
+ 84, 69, 205, 76, 69, 70, 84, 45, 83, 73, 68, 197, 76, 69, 70, 84, 45, 83,
+ 72, 65, 68, 69, 196, 76, 69, 70, 84, 45, 80, 79, 73, 78, 84, 73, 78, 199,
+ 76, 69, 70, 84, 45, 76, 73, 71, 72, 84, 69, 196, 76, 69, 70, 84, 45, 72,
+ 65, 78, 68, 69, 196, 76, 69, 70, 84, 45, 72, 65, 78, 196, 76, 69, 70, 84,
+ 45, 70, 65, 67, 73, 78, 199, 76, 69, 70, 84, 128, 76, 69, 69, 82, 65, 69,
+ 87, 65, 128, 76, 69, 69, 75, 128, 76, 69, 69, 69, 69, 128, 76, 69, 68,
+ 71, 69, 82, 128, 76, 69, 65, 84, 72, 69, 82, 128, 76, 69, 65, 70, 128,
+ 76, 69, 65, 198, 76, 69, 65, 68, 73, 78, 199, 76, 69, 65, 68, 69, 82,
+ 128, 76, 69, 65, 196, 76, 68, 65, 78, 128, 76, 68, 50, 128, 76, 67, 201,
+ 76, 67, 197, 76, 65, 90, 217, 76, 65, 89, 65, 78, 78, 65, 128, 76, 65,
+ 88, 128, 76, 65, 87, 128, 76, 65, 215, 76, 65, 85, 76, 65, 128, 76, 65,
+ 85, 75, 65, 218, 76, 65, 85, 74, 128, 76, 65, 84, 73, 78, 65, 84, 197,
76, 65, 84, 73, 75, 128, 76, 65, 84, 69, 82, 65, 204, 76, 65, 84, 197,
- 76, 65, 83, 212, 76, 65, 82, 89, 78, 71, 69, 65, 204, 76, 65, 82, 71, 69,
- 210, 76, 65, 82, 71, 69, 128, 76, 65, 82, 71, 197, 76, 65, 81, 128, 76,
- 65, 80, 65, 81, 128, 76, 65, 80, 128, 76, 65, 78, 84, 69, 82, 78, 128,
- 76, 65, 78, 71, 85, 65, 71, 197, 76, 65, 78, 69, 83, 128, 76, 65, 77, 69,
- 68, 72, 128, 76, 65, 77, 69, 68, 128, 76, 65, 77, 69, 196, 76, 65, 77,
- 69, 128, 76, 65, 77, 197, 76, 65, 77, 68, 65, 128, 76, 65, 77, 68, 128,
- 76, 65, 77, 66, 68, 193, 76, 65, 77, 65, 68, 72, 128, 76, 65, 76, 128,
- 76, 65, 204, 76, 65, 75, 75, 72, 65, 78, 71, 89, 65, 79, 128, 76, 65, 74,
- 65, 78, 89, 65, 76, 65, 78, 128, 76, 65, 201, 76, 65, 72, 83, 72, 85,
- 128, 76, 65, 72, 128, 76, 65, 71, 85, 83, 128, 76, 65, 71, 213, 76, 65,
- 71, 65, 82, 128, 76, 65, 71, 65, 210, 76, 65, 71, 65, 66, 128, 76, 65,
- 71, 65, 194, 76, 65, 69, 86, 128, 76, 65, 69, 128, 76, 65, 68, 217, 76,
- 65, 67, 75, 128, 76, 65, 67, 65, 128, 76, 65, 66, 79, 85, 82, 73, 78, 71,
- 128, 76, 65, 66, 79, 82, 128, 76, 65, 66, 73, 65, 76, 73, 90, 65, 84, 73,
- 79, 206, 76, 65, 66, 73, 65, 204, 76, 65, 66, 65, 84, 128, 76, 65, 65,
- 78, 65, 69, 128, 76, 65, 65, 78, 128, 76, 65, 65, 77, 85, 128, 76, 65,
- 65, 77, 128, 76, 65, 65, 73, 128, 76, 48, 48, 54, 65, 128, 76, 48, 48,
+ 76, 65, 83, 212, 76, 65, 82, 89, 78, 71, 69, 65, 204, 76, 65, 82, 201,
+ 76, 65, 82, 71, 69, 83, 84, 128, 76, 65, 82, 71, 69, 210, 76, 65, 82, 71,
+ 69, 128, 76, 65, 82, 71, 197, 76, 65, 81, 128, 76, 65, 80, 65, 81, 128,
+ 76, 65, 207, 76, 65, 78, 84, 69, 82, 78, 128, 76, 65, 78, 71, 85, 65, 71,
+ 197, 76, 65, 78, 69, 83, 128, 76, 65, 78, 128, 76, 65, 77, 80, 128, 76,
+ 65, 77, 69, 68, 72, 128, 76, 65, 77, 69, 68, 128, 76, 65, 77, 69, 196,
+ 76, 65, 77, 69, 128, 76, 65, 77, 197, 76, 65, 77, 68, 65, 128, 76, 65,
+ 77, 68, 128, 76, 65, 77, 66, 68, 193, 76, 65, 77, 65, 68, 72, 128, 76,
+ 65, 76, 128, 76, 65, 204, 76, 65, 75, 75, 72, 65, 78, 71, 89, 65, 79,
+ 128, 76, 65, 75, 45, 55, 52, 57, 128, 76, 65, 75, 45, 55, 50, 52, 128,
+ 76, 65, 75, 45, 54, 54, 56, 128, 76, 65, 75, 45, 54, 52, 56, 128, 76, 65,
+ 75, 45, 54, 52, 184, 76, 65, 75, 45, 54, 51, 54, 128, 76, 65, 75, 45, 54,
+ 49, 55, 128, 76, 65, 75, 45, 54, 49, 183, 76, 65, 75, 45, 54, 48, 56,
+ 128, 76, 65, 75, 45, 53, 53, 48, 128, 76, 65, 75, 45, 52, 57, 53, 128,
+ 76, 65, 75, 45, 52, 57, 51, 128, 76, 65, 75, 45, 52, 57, 50, 128, 76, 65,
+ 75, 45, 52, 57, 48, 128, 76, 65, 75, 45, 52, 56, 51, 128, 76, 65, 75, 45,
+ 52, 55, 48, 128, 76, 65, 75, 45, 52, 53, 55, 128, 76, 65, 75, 45, 52, 53,
+ 48, 128, 76, 65, 75, 45, 52, 52, 57, 128, 76, 65, 75, 45, 52, 52, 185,
+ 76, 65, 75, 45, 52, 52, 49, 128, 76, 65, 75, 45, 51, 57, 48, 128, 76, 65,
+ 75, 45, 51, 56, 52, 128, 76, 65, 75, 45, 51, 56, 51, 128, 76, 65, 75, 45,
+ 51, 52, 56, 128, 76, 65, 75, 45, 51, 52, 55, 128, 76, 65, 75, 45, 51, 52,
+ 51, 128, 76, 65, 75, 45, 50, 54, 54, 128, 76, 65, 75, 45, 50, 54, 53,
+ 128, 76, 65, 75, 45, 50, 51, 56, 128, 76, 65, 75, 45, 50, 50, 56, 128,
+ 76, 65, 75, 45, 50, 50, 53, 128, 76, 65, 75, 45, 50, 50, 48, 128, 76, 65,
+ 75, 45, 50, 49, 57, 128, 76, 65, 75, 45, 50, 49, 48, 128, 76, 65, 75, 45,
+ 49, 52, 50, 128, 76, 65, 75, 45, 49, 51, 48, 128, 76, 65, 75, 45, 48, 57,
+ 50, 128, 76, 65, 75, 45, 48, 56, 49, 128, 76, 65, 75, 45, 48, 56, 177,
+ 76, 65, 75, 45, 48, 56, 48, 128, 76, 65, 75, 45, 48, 55, 185, 76, 65, 75,
+ 45, 48, 54, 50, 128, 76, 65, 75, 45, 48, 53, 49, 128, 76, 65, 75, 45, 48,
+ 53, 48, 128, 76, 65, 75, 45, 48, 51, 48, 128, 76, 65, 75, 45, 48, 50, 53,
+ 128, 76, 65, 75, 45, 48, 50, 49, 128, 76, 65, 75, 45, 48, 50, 48, 128,
+ 76, 65, 75, 45, 48, 48, 51, 128, 76, 65, 74, 65, 78, 89, 65, 76, 65, 78,
+ 128, 76, 65, 73, 78, 199, 76, 65, 201, 76, 65, 72, 83, 72, 85, 128, 76,
+ 65, 72, 128, 76, 65, 71, 85, 83, 128, 76, 65, 71, 213, 76, 65, 71, 65,
+ 82, 128, 76, 65, 71, 65, 210, 76, 65, 71, 65, 66, 128, 76, 65, 71, 65,
+ 194, 76, 65, 69, 86, 128, 76, 65, 69, 128, 76, 65, 68, 217, 76, 65, 67,
+ 75, 128, 76, 65, 67, 65, 128, 76, 65, 66, 79, 85, 82, 73, 78, 71, 128,
+ 76, 65, 66, 79, 82, 128, 76, 65, 66, 73, 65, 76, 73, 90, 65, 84, 73, 79,
+ 206, 76, 65, 66, 73, 65, 204, 76, 65, 66, 69, 76, 128, 76, 65, 66, 65,
+ 84, 128, 76, 65, 65, 78, 65, 69, 128, 76, 65, 65, 78, 128, 76, 65, 65,
+ 77, 85, 128, 76, 65, 65, 77, 128, 76, 65, 65, 73, 128, 76, 54, 128, 76,
+ 52, 128, 76, 51, 128, 76, 50, 128, 76, 48, 48, 54, 65, 128, 76, 48, 48,
50, 65, 128, 76, 45, 84, 89, 80, 197, 76, 45, 83, 72, 65, 80, 69, 196,
75, 89, 85, 82, 73, 73, 128, 75, 89, 85, 128, 75, 89, 79, 128, 75, 89,
76, 73, 83, 77, 65, 128, 75, 89, 73, 128, 75, 89, 69, 128, 75, 89, 65,
@@ -2207,72 +2465,82 @@ static unsigned char lexicon[] = {
128, 75, 88, 87, 69, 69, 128, 75, 88, 87, 69, 128, 75, 88, 87, 65, 65,
128, 75, 88, 87, 65, 128, 75, 88, 85, 128, 75, 88, 79, 128, 75, 88, 73,
128, 75, 88, 69, 69, 128, 75, 88, 69, 128, 75, 88, 65, 65, 128, 75, 88,
- 65, 128, 75, 87, 85, 51, 49, 56, 128, 75, 87, 79, 79, 128, 75, 87, 79,
- 128, 75, 87, 73, 73, 128, 75, 87, 73, 128, 75, 87, 69, 69, 128, 75, 87,
- 69, 128, 75, 87, 65, 89, 128, 75, 87, 65, 69, 84, 128, 75, 87, 65, 65,
- 128, 75, 86, 65, 128, 75, 86, 128, 75, 85, 88, 128, 75, 85, 85, 72, 128,
- 75, 85, 84, 128, 75, 85, 83, 77, 65, 128, 75, 85, 83, 72, 85, 50, 128,
- 75, 85, 82, 88, 128, 75, 85, 82, 85, 90, 69, 73, 82, 79, 128, 75, 85, 82,
- 84, 128, 75, 85, 82, 79, 79, 78, 69, 128, 75, 85, 82, 128, 75, 85, 210,
- 75, 85, 81, 128, 75, 85, 79, 88, 128, 75, 85, 79, 80, 128, 75, 85, 79,
- 208, 75, 85, 79, 77, 128, 75, 85, 79, 128, 75, 85, 78, 71, 128, 75, 85,
- 78, 68, 68, 65, 76, 73, 89, 65, 128, 75, 85, 76, 128, 75, 85, 204, 75,
- 85, 69, 84, 128, 75, 85, 55, 128, 75, 85, 52, 128, 75, 85, 180, 75, 85,
- 51, 128, 75, 85, 179, 75, 84, 128, 75, 83, 83, 85, 85, 128, 75, 83, 83,
- 85, 128, 75, 83, 83, 79, 79, 128, 75, 83, 83, 79, 128, 75, 83, 83, 73,
- 73, 128, 75, 83, 83, 73, 128, 75, 83, 83, 69, 69, 128, 75, 83, 83, 69,
- 128, 75, 83, 83, 65, 85, 128, 75, 83, 83, 65, 73, 128, 75, 83, 83, 65,
- 65, 128, 75, 83, 83, 65, 128, 75, 83, 83, 128, 75, 83, 73, 128, 75, 82,
- 69, 77, 65, 83, 84, 73, 128, 75, 82, 65, 84, 73, 77, 79, 89, 80, 79, 82,
- 82, 79, 79, 78, 128, 75, 82, 65, 84, 73, 77, 79, 75, 79, 85, 70, 73, 83,
- 77, 65, 128, 75, 82, 65, 84, 73, 77, 65, 84, 65, 128, 75, 82, 65, 84, 73,
- 77, 193, 75, 80, 85, 128, 75, 80, 79, 81, 128, 75, 80, 79, 79, 128, 75,
- 80, 79, 128, 75, 80, 73, 128, 75, 80, 69, 85, 88, 128, 75, 80, 69, 69,
- 128, 75, 80, 69, 128, 75, 80, 65, 82, 65, 81, 128, 75, 80, 65, 78, 128,
- 75, 80, 65, 128, 75, 79, 88, 128, 75, 79, 86, 85, 85, 128, 75, 79, 84,
- 79, 128, 75, 79, 82, 85, 78, 65, 128, 75, 79, 82, 79, 78, 73, 83, 128,
- 75, 79, 82, 69, 65, 206, 75, 79, 82, 65, 78, 73, 195, 75, 79, 81, 78, 68,
- 79, 78, 128, 75, 79, 80, 80, 65, 128, 75, 79, 80, 128, 75, 79, 79, 80,
- 79, 128, 75, 79, 79, 77, 85, 85, 84, 128, 75, 79, 79, 128, 75, 79, 78,
- 84, 69, 86, 77, 65, 128, 75, 79, 78, 84, 69, 86, 77, 193, 75, 79, 77,
- 201, 75, 79, 77, 66, 85, 86, 65, 128, 75, 79, 77, 66, 85, 86, 193, 75,
- 79, 77, 66, 213, 75, 79, 75, 79, 128, 75, 79, 75, 128, 75, 79, 203, 75,
- 79, 73, 128, 75, 79, 201, 75, 79, 72, 128, 75, 79, 71, 72, 79, 77, 128,
- 75, 79, 69, 84, 128, 75, 79, 65, 76, 65, 128, 75, 79, 65, 128, 75, 78,
- 73, 71, 72, 84, 128, 75, 78, 73, 71, 72, 212, 75, 78, 73, 70, 69, 128,
- 75, 78, 73, 70, 197, 75, 77, 128, 75, 205, 75, 76, 73, 84, 79, 78, 128,
- 75, 76, 65, 83, 77, 65, 128, 75, 76, 65, 83, 77, 193, 75, 76, 65, 128,
- 75, 76, 128, 75, 75, 85, 128, 75, 75, 79, 128, 75, 75, 73, 128, 75, 75,
- 69, 69, 128, 75, 75, 69, 128, 75, 75, 65, 128, 75, 75, 128, 75, 74, 69,
- 128, 75, 73, 89, 69, 79, 75, 45, 84, 73, 75, 69, 85, 84, 128, 75, 73, 89,
- 69, 79, 75, 45, 83, 73, 79, 83, 45, 75, 73, 89, 69, 79, 75, 128, 75, 73,
- 89, 69, 79, 75, 45, 82, 73, 69, 85, 76, 128, 75, 73, 89, 69, 79, 75, 45,
- 80, 73, 69, 85, 80, 128, 75, 73, 89, 69, 79, 75, 45, 78, 73, 69, 85, 78,
- 128, 75, 73, 89, 69, 79, 75, 45, 75, 72, 73, 69, 85, 75, 72, 128, 75, 73,
- 89, 69, 79, 75, 45, 67, 72, 73, 69, 85, 67, 72, 128, 75, 73, 89, 69, 79,
- 203, 75, 73, 88, 128, 75, 73, 84, 128, 75, 73, 83, 83, 73, 78, 199, 75,
- 73, 83, 83, 128, 75, 73, 83, 211, 75, 73, 83, 73, 77, 53, 128, 75, 73,
- 83, 73, 77, 181, 75, 73, 83, 72, 128, 75, 73, 83, 65, 76, 128, 75, 73,
- 82, 79, 87, 65, 84, 84, 79, 128, 75, 73, 82, 79, 77, 69, 69, 84, 79, 82,
- 85, 128, 75, 73, 82, 79, 71, 85, 82, 65, 77, 85, 128, 75, 73, 82, 79,
- 128, 75, 73, 82, 71, 72, 73, 218, 75, 73, 81, 128, 75, 73, 80, 128, 75,
- 73, 208, 75, 73, 78, 83, 72, 73, 80, 128, 75, 73, 78, 68, 69, 82, 71, 65,
- 82, 84, 69, 78, 128, 75, 73, 77, 79, 78, 79, 128, 75, 73, 73, 128, 75,
- 73, 72, 128, 75, 73, 69, 88, 128, 75, 73, 69, 80, 128, 75, 73, 69, 69,
- 77, 128, 75, 73, 69, 128, 75, 73, 68, 128, 75, 73, 196, 75, 73, 67, 75,
- 128, 75, 72, 90, 128, 75, 72, 87, 65, 73, 128, 75, 72, 85, 69, 78, 45,
- 76, 85, 197, 75, 72, 85, 69, 206, 75, 72, 85, 68, 65, 77, 128, 75, 72,
- 85, 65, 84, 128, 75, 72, 79, 85, 128, 75, 72, 79, 212, 75, 72, 79, 78,
- 128, 75, 72, 79, 77, 85, 84, 128, 75, 72, 79, 128, 75, 72, 207, 75, 72,
- 77, 213, 75, 72, 73, 84, 128, 75, 72, 73, 78, 89, 65, 128, 75, 72, 73,
- 69, 85, 75, 200, 75, 72, 73, 128, 75, 72, 72, 79, 128, 75, 72, 72, 65,
- 128, 75, 72, 69, 84, 72, 128, 75, 72, 69, 73, 128, 75, 72, 69, 69, 128,
- 75, 72, 69, 128, 75, 72, 65, 82, 79, 83, 72, 84, 72, 201, 75, 72, 65, 82,
+ 65, 128, 75, 87, 86, 128, 75, 87, 85, 51, 49, 56, 128, 75, 87, 79, 79,
+ 128, 75, 87, 79, 128, 75, 87, 77, 128, 75, 87, 73, 73, 128, 75, 87, 73,
+ 128, 75, 87, 69, 69, 128, 75, 87, 69, 128, 75, 87, 66, 128, 75, 87, 65,
+ 89, 128, 75, 87, 65, 69, 84, 128, 75, 87, 65, 65, 128, 75, 86, 65, 128,
+ 75, 86, 128, 75, 85, 88, 128, 75, 85, 86, 128, 75, 85, 85, 72, 128, 75,
+ 85, 84, 128, 75, 85, 83, 77, 65, 128, 75, 85, 83, 72, 85, 50, 128, 75,
+ 85, 83, 72, 85, 178, 75, 85, 82, 88, 128, 75, 85, 82, 85, 90, 69, 73, 82,
+ 79, 128, 75, 85, 82, 84, 128, 75, 85, 82, 79, 79, 78, 69, 128, 75, 85,
+ 82, 128, 75, 85, 210, 75, 85, 81, 128, 75, 85, 79, 88, 128, 75, 85, 79,
+ 80, 128, 75, 85, 79, 208, 75, 85, 79, 77, 128, 75, 85, 79, 128, 75, 85,
+ 78, 71, 128, 75, 85, 78, 68, 68, 65, 76, 73, 89, 65, 128, 75, 85, 76,
+ 128, 75, 85, 204, 75, 85, 71, 128, 75, 85, 69, 84, 128, 75, 85, 66, 128,
+ 75, 85, 65, 86, 128, 75, 85, 65, 66, 128, 75, 85, 65, 128, 75, 85, 55,
+ 128, 75, 85, 52, 128, 75, 85, 180, 75, 85, 51, 128, 75, 85, 179, 75, 84,
+ 128, 75, 83, 83, 85, 85, 128, 75, 83, 83, 85, 128, 75, 83, 83, 79, 79,
+ 128, 75, 83, 83, 79, 128, 75, 83, 83, 73, 73, 128, 75, 83, 83, 73, 128,
+ 75, 83, 83, 69, 69, 128, 75, 83, 83, 69, 128, 75, 83, 83, 65, 85, 128,
+ 75, 83, 83, 65, 73, 128, 75, 83, 83, 65, 65, 128, 75, 83, 83, 65, 128,
+ 75, 83, 83, 128, 75, 83, 73, 128, 75, 82, 69, 77, 65, 83, 84, 73, 128,
+ 75, 82, 65, 84, 73, 77, 79, 89, 80, 79, 82, 82, 79, 79, 78, 128, 75, 82,
+ 65, 84, 73, 77, 79, 75, 79, 85, 70, 73, 83, 77, 65, 128, 75, 82, 65, 84,
+ 73, 77, 65, 84, 65, 128, 75, 82, 65, 84, 73, 77, 193, 75, 80, 85, 128,
+ 75, 80, 79, 81, 128, 75, 80, 79, 79, 128, 75, 80, 79, 128, 75, 80, 73,
+ 128, 75, 80, 69, 85, 88, 128, 75, 80, 69, 69, 128, 75, 80, 69, 128, 75,
+ 80, 65, 82, 65, 81, 128, 75, 80, 65, 78, 128, 75, 80, 65, 72, 128, 75,
+ 80, 65, 128, 75, 79, 88, 128, 75, 79, 86, 85, 85, 128, 75, 79, 86, 128,
+ 75, 79, 84, 79, 128, 75, 79, 82, 85, 78, 65, 128, 75, 79, 82, 79, 78, 73,
+ 83, 128, 75, 79, 82, 69, 65, 206, 75, 79, 82, 65, 78, 73, 195, 75, 79,
+ 81, 78, 68, 79, 78, 128, 75, 79, 80, 80, 65, 128, 75, 79, 80, 128, 75,
+ 79, 79, 86, 128, 75, 79, 79, 80, 79, 128, 75, 79, 79, 77, 85, 85, 84,
+ 128, 75, 79, 79, 66, 128, 75, 79, 79, 128, 75, 79, 78, 84, 69, 86, 77,
+ 65, 128, 75, 79, 78, 84, 69, 86, 77, 193, 75, 79, 77, 201, 75, 79, 77,
+ 66, 85, 86, 65, 128, 75, 79, 77, 66, 85, 86, 193, 75, 79, 77, 66, 213,
+ 75, 79, 75, 79, 128, 75, 79, 75, 69, 128, 75, 79, 75, 128, 75, 79, 203,
+ 75, 79, 73, 128, 75, 79, 201, 75, 79, 72, 128, 75, 79, 71, 72, 79, 77,
+ 128, 75, 79, 69, 84, 128, 75, 79, 66, 128, 75, 79, 65, 76, 65, 128, 75,
+ 79, 65, 128, 75, 78, 85, 67, 75, 76, 69, 83, 128, 75, 78, 85, 67, 75, 76,
+ 69, 128, 75, 78, 79, 66, 83, 128, 75, 78, 73, 71, 72, 84, 128, 75, 78,
+ 73, 71, 72, 212, 75, 78, 73, 70, 69, 128, 75, 78, 73, 70, 197, 75, 77,
+ 128, 75, 205, 75, 76, 73, 84, 79, 78, 128, 75, 76, 65, 83, 77, 65, 128,
+ 75, 76, 65, 83, 77, 193, 75, 76, 65, 128, 75, 76, 128, 75, 75, 85, 128,
+ 75, 75, 79, 128, 75, 75, 73, 128, 75, 75, 69, 69, 128, 75, 75, 69, 128,
+ 75, 75, 65, 128, 75, 75, 128, 75, 74, 69, 128, 75, 73, 89, 69, 79, 75,
+ 45, 84, 73, 75, 69, 85, 84, 128, 75, 73, 89, 69, 79, 75, 45, 83, 73, 79,
+ 83, 45, 75, 73, 89, 69, 79, 75, 128, 75, 73, 89, 69, 79, 75, 45, 82, 73,
+ 69, 85, 76, 128, 75, 73, 89, 69, 79, 75, 45, 80, 73, 69, 85, 80, 128, 75,
+ 73, 89, 69, 79, 75, 45, 78, 73, 69, 85, 78, 128, 75, 73, 89, 69, 79, 75,
+ 45, 75, 72, 73, 69, 85, 75, 72, 128, 75, 73, 89, 69, 79, 75, 45, 67, 72,
+ 73, 69, 85, 67, 72, 128, 75, 73, 89, 69, 79, 203, 75, 73, 88, 128, 75,
+ 73, 87, 128, 75, 73, 86, 128, 75, 73, 84, 128, 75, 73, 83, 83, 73, 78,
+ 199, 75, 73, 83, 83, 128, 75, 73, 83, 211, 75, 73, 83, 73, 77, 53, 128,
+ 75, 73, 83, 73, 77, 181, 75, 73, 83, 72, 128, 75, 73, 83, 65, 76, 128,
+ 75, 73, 82, 79, 87, 65, 84, 84, 79, 128, 75, 73, 82, 79, 77, 69, 69, 84,
+ 79, 82, 85, 128, 75, 73, 82, 79, 71, 85, 82, 65, 77, 85, 128, 75, 73, 82,
+ 79, 128, 75, 73, 82, 71, 72, 73, 218, 75, 73, 81, 128, 75, 73, 80, 128,
+ 75, 73, 208, 75, 73, 78, 83, 72, 73, 80, 128, 75, 73, 78, 68, 69, 82, 71,
+ 65, 82, 84, 69, 78, 128, 75, 73, 77, 79, 78, 79, 128, 75, 73, 76, 76, 69,
+ 82, 128, 75, 73, 73, 128, 75, 73, 72, 128, 75, 73, 69, 88, 128, 75, 73,
+ 69, 86, 65, 206, 75, 73, 69, 80, 128, 75, 73, 69, 69, 77, 128, 75, 73,
+ 69, 128, 75, 73, 68, 128, 75, 73, 196, 75, 73, 67, 75, 128, 75, 73, 66,
+ 128, 75, 73, 65, 86, 128, 75, 73, 65, 66, 128, 75, 72, 90, 128, 75, 72,
+ 87, 65, 73, 128, 75, 72, 85, 69, 78, 45, 76, 85, 197, 75, 72, 85, 69,
+ 206, 75, 72, 85, 68, 65, 87, 65, 68, 201, 75, 72, 85, 68, 65, 77, 128,
+ 75, 72, 85, 65, 84, 128, 75, 72, 79, 85, 128, 75, 72, 79, 212, 75, 72,
+ 79, 78, 128, 75, 72, 79, 77, 85, 84, 128, 75, 72, 79, 74, 75, 201, 75,
+ 72, 79, 128, 75, 72, 207, 75, 72, 77, 213, 75, 72, 73, 84, 128, 75, 72,
+ 73, 78, 89, 65, 128, 75, 72, 73, 69, 85, 75, 200, 75, 72, 73, 128, 75,
+ 72, 201, 75, 72, 72, 79, 128, 75, 72, 72, 65, 128, 75, 72, 69, 84, 72,
+ 128, 75, 72, 69, 73, 128, 75, 72, 69, 69, 128, 75, 72, 69, 128, 75, 72,
+ 65, 86, 128, 75, 72, 65, 82, 79, 83, 72, 84, 72, 201, 75, 72, 65, 82,
128, 75, 72, 65, 80, 72, 128, 75, 72, 65, 78, 199, 75, 72, 65, 78, 68,
193, 75, 72, 65, 78, 128, 75, 72, 65, 77, 84, 201, 75, 72, 65, 75, 65,
83, 83, 73, 65, 206, 75, 72, 65, 73, 128, 75, 72, 65, 72, 128, 75, 72,
- 65, 200, 75, 72, 65, 65, 128, 75, 71, 128, 75, 69, 89, 67, 65, 80, 128,
- 75, 69, 89, 67, 65, 208, 75, 69, 89, 66, 79, 65, 82, 68, 128, 75, 69, 88,
+ 65, 200, 75, 72, 65, 66, 128, 75, 72, 65, 65, 128, 75, 71, 128, 75, 69,
+ 89, 67, 65, 80, 128, 75, 69, 89, 67, 65, 208, 75, 69, 89, 66, 79, 65, 82,
+ 68, 128, 75, 69, 89, 66, 79, 65, 82, 196, 75, 69, 88, 128, 75, 69, 86,
128, 75, 69, 85, 89, 69, 85, 88, 128, 75, 69, 85, 83, 72, 69, 85, 65, 69,
80, 128, 75, 69, 85, 83, 69, 85, 88, 128, 75, 69, 85, 80, 85, 81, 128,
75, 69, 85, 79, 212, 75, 69, 85, 77, 128, 75, 69, 85, 75, 69, 85, 84, 78,
@@ -2285,1560 +2553,1626 @@ static unsigned char lexicon[] = {
69, 77, 80, 76, 73, 128, 75, 69, 77, 80, 76, 201, 75, 69, 77, 80, 72, 82,
69, 78, 71, 128, 75, 69, 77, 66, 65, 78, 71, 128, 75, 69, 76, 86, 73,
206, 75, 69, 72, 69, 72, 128, 75, 69, 72, 69, 200, 75, 69, 72, 128, 75,
- 69, 70, 85, 76, 65, 128, 75, 69, 69, 83, 85, 128, 75, 69, 69, 80, 73, 78,
- 199, 75, 69, 69, 78, 71, 128, 75, 67, 65, 76, 128, 75, 66, 128, 75, 65,
- 90, 65, 75, 200, 75, 65, 89, 65, 78, 78, 65, 128, 75, 65, 89, 65, 200,
- 75, 65, 88, 128, 75, 65, 87, 73, 128, 75, 65, 86, 89, 75, 65, 128, 75,
- 65, 85, 78, 65, 128, 75, 65, 85, 206, 75, 65, 85, 128, 75, 65, 84, 79,
- 128, 75, 65, 84, 72, 73, 83, 84, 73, 128, 75, 65, 84, 72, 65, 75, 193,
- 75, 65, 84, 65, 86, 65, 83, 77, 65, 128, 75, 65, 84, 65, 86, 193, 75, 65,
- 84, 65, 75, 65, 78, 65, 45, 72, 73, 82, 65, 71, 65, 78, 193, 75, 65, 83,
- 82, 65, 84, 65, 78, 128, 75, 65, 83, 82, 65, 84, 65, 206, 75, 65, 83, 82,
- 65, 128, 75, 65, 83, 82, 193, 75, 65, 83, 75, 65, 76, 128, 75, 65, 83,
- 75, 65, 204, 75, 65, 83, 72, 77, 73, 82, 201, 75, 65, 82, 83, 72, 65, 78,
- 65, 128, 75, 65, 82, 79, 82, 73, 73, 128, 75, 65, 82, 207, 75, 65, 82,
- 69, 206, 75, 65, 82, 65, 84, 84, 79, 128, 75, 65, 82, 65, 78, 128, 75,
- 65, 80, 89, 69, 79, 85, 78, 83, 83, 65, 78, 71, 80, 73, 69, 85, 80, 128,
- 75, 65, 80, 89, 69, 79, 85, 78, 82, 73, 69, 85, 76, 128, 75, 65, 80, 89,
- 69, 79, 85, 78, 80, 72, 73, 69, 85, 80, 72, 128, 75, 65, 80, 89, 69, 79,
- 85, 78, 77, 73, 69, 85, 77, 128, 75, 65, 80, 80, 65, 128, 75, 65, 80, 80,
- 193, 75, 65, 80, 79, 128, 75, 65, 80, 72, 128, 75, 65, 80, 65, 76, 128,
- 75, 65, 80, 65, 128, 75, 65, 78, 84, 65, 74, 193, 75, 65, 78, 71, 128,
- 75, 65, 78, 199, 75, 65, 78, 65, 75, 79, 128, 75, 65, 77, 52, 128, 75,
- 65, 77, 50, 128, 75, 65, 77, 128, 75, 65, 75, 79, 128, 75, 65, 75, 65,
- 66, 65, 84, 128, 75, 65, 75, 128, 75, 65, 203, 75, 65, 73, 84, 72, 201,
- 75, 65, 73, 82, 73, 128, 75, 65, 73, 128, 75, 65, 201, 75, 65, 70, 65,
- 128, 75, 65, 70, 128, 75, 65, 198, 75, 65, 68, 53, 128, 75, 65, 68, 181,
- 75, 65, 68, 52, 128, 75, 65, 68, 51, 128, 75, 65, 68, 179, 75, 65, 68,
- 50, 128, 75, 65, 68, 128, 75, 65, 66, 193, 75, 65, 66, 128, 75, 65, 65,
- 73, 128, 75, 65, 65, 70, 85, 128, 75, 65, 65, 70, 128, 75, 65, 50, 128,
- 75, 65, 178, 75, 48, 48, 56, 128, 75, 48, 48, 55, 128, 75, 48, 48, 54,
- 128, 75, 48, 48, 53, 128, 75, 48, 48, 52, 128, 75, 48, 48, 51, 128, 75,
- 48, 48, 50, 128, 75, 48, 48, 49, 128, 74, 87, 65, 128, 74, 85, 85, 128,
- 74, 85, 84, 128, 74, 85, 83, 84, 73, 70, 73, 67, 65, 84, 73, 79, 78, 128,
- 74, 85, 80, 73, 84, 69, 82, 128, 74, 85, 79, 84, 128, 74, 85, 79, 80,
- 128, 74, 85, 78, 79, 128, 74, 85, 78, 69, 128, 74, 85, 76, 89, 128, 74,
- 85, 69, 85, 73, 128, 74, 85, 68, 85, 76, 128, 74, 85, 68, 71, 69, 128,
- 74, 85, 68, 69, 79, 45, 83, 80, 65, 78, 73, 83, 200, 74, 79, 89, 79, 85,
- 211, 74, 79, 89, 128, 74, 79, 86, 69, 128, 74, 79, 212, 74, 79, 78, 71,
- 128, 74, 79, 78, 193, 74, 79, 75, 69, 82, 128, 74, 79, 73, 78, 69, 68,
- 128, 74, 79, 73, 78, 128, 74, 79, 65, 128, 74, 74, 89, 88, 128, 74, 74,
- 89, 84, 128, 74, 74, 89, 80, 128, 74, 74, 89, 128, 74, 74, 85, 88, 128,
- 74, 74, 85, 84, 128, 74, 74, 85, 82, 88, 128, 74, 74, 85, 82, 128, 74,
- 74, 85, 80, 128, 74, 74, 85, 79, 88, 128, 74, 74, 85, 79, 80, 128, 74,
- 74, 85, 79, 128, 74, 74, 85, 128, 74, 74, 79, 88, 128, 74, 74, 79, 84,
- 128, 74, 74, 79, 80, 128, 74, 74, 79, 128, 74, 74, 73, 88, 128, 74, 74,
- 73, 84, 128, 74, 74, 73, 80, 128, 74, 74, 73, 69, 88, 128, 74, 74, 73,
- 69, 84, 128, 74, 74, 73, 69, 80, 128, 74, 74, 73, 69, 128, 74, 74, 73,
- 128, 74, 74, 69, 69, 128, 74, 74, 69, 128, 74, 74, 65, 128, 74, 73, 76,
- 128, 74, 73, 73, 128, 74, 73, 72, 86, 65, 77, 85, 76, 73, 89, 65, 128,
- 74, 73, 65, 128, 74, 72, 79, 128, 74, 72, 69, 72, 128, 74, 72, 65, 78,
- 128, 74, 72, 65, 77, 128, 74, 72, 65, 65, 128, 74, 72, 65, 128, 74, 69,
- 85, 128, 74, 69, 82, 85, 83, 65, 76, 69, 77, 128, 74, 69, 82, 65, 206,
- 74, 69, 82, 65, 128, 74, 69, 82, 128, 74, 69, 72, 128, 74, 69, 200, 74,
- 69, 71, 79, 71, 65, 78, 128, 74, 69, 69, 77, 128, 74, 69, 65, 78, 83,
- 128, 74, 65, 89, 65, 78, 78, 65, 128, 74, 65, 86, 73, 89, 65, 78, 73,
- 128, 74, 65, 85, 128, 74, 65, 82, 128, 74, 65, 80, 65, 78, 69, 83, 197,
- 74, 65, 80, 65, 78, 128, 74, 65, 78, 85, 65, 82, 89, 128, 74, 65, 76, 76,
- 65, 74, 65, 76, 65, 76, 79, 85, 72, 79, 85, 128, 74, 65, 73, 128, 74, 65,
- 72, 128, 74, 65, 68, 69, 128, 74, 65, 67, 75, 45, 79, 45, 76, 65, 78, 84,
- 69, 82, 78, 128, 74, 65, 67, 203, 74, 45, 83, 73, 77, 80, 76, 73, 70, 73,
- 69, 196, 202, 73, 90, 72, 73, 84, 83, 65, 128, 73, 90, 72, 73, 84, 83,
- 193, 73, 90, 72, 69, 128, 73, 90, 65, 75, 65, 89, 193, 73, 89, 69, 75,
- 128, 73, 89, 65, 78, 78, 65, 128, 73, 85, 74, 65, 128, 73, 85, 128, 73,
- 84, 211, 73, 84, 69, 82, 65, 84, 73, 79, 206, 73, 84, 69, 77, 128, 73,
- 83, 83, 72, 65, 82, 128, 73, 83, 79, 78, 128, 73, 83, 79, 206, 73, 83,
- 79, 76, 65, 84, 69, 128, 73, 83, 69, 78, 45, 73, 83, 69, 78, 128, 73, 83,
- 65, 75, 73, 193, 73, 83, 45, 80, 73, 76, 76, 65, 128, 73, 82, 85, 89, 65,
- 78, 78, 65, 128, 73, 82, 85, 85, 89, 65, 78, 78, 65, 128, 73, 82, 79, 78,
- 45, 67, 79, 80, 80, 69, 210, 73, 82, 79, 78, 128, 73, 79, 84, 73, 70, 73,
- 69, 196, 73, 79, 84, 65, 84, 69, 196, 73, 79, 84, 65, 128, 73, 79, 84,
- 193, 73, 79, 82, 128, 73, 79, 68, 72, 65, 68, 72, 128, 73, 78, 86, 73,
- 83, 73, 66, 76, 197, 73, 78, 86, 69, 82, 84, 69, 68, 128, 73, 78, 86, 69,
- 82, 84, 69, 196, 73, 78, 86, 69, 82, 83, 197, 73, 78, 84, 82, 79, 68, 85,
- 67, 69, 82, 128, 73, 78, 84, 73, 128, 73, 78, 84, 69, 82, 83, 89, 76, 76,
- 65, 66, 73, 195, 73, 78, 84, 69, 82, 83, 69, 67, 84, 73, 79, 78, 128, 73,
- 78, 84, 69, 82, 83, 69, 67, 84, 73, 79, 206, 73, 78, 84, 69, 82, 83, 69,
- 67, 84, 73, 78, 199, 73, 78, 84, 69, 82, 82, 79, 66, 65, 78, 71, 128, 73,
- 78, 84, 69, 82, 80, 79, 76, 65, 84, 73, 79, 206, 73, 78, 84, 69, 82, 76,
- 79, 67, 75, 69, 196, 73, 78, 84, 69, 82, 76, 73, 78, 69, 65, 210, 73, 78,
- 84, 69, 82, 76, 65, 67, 69, 196, 73, 78, 84, 69, 82, 73, 79, 210, 73, 78,
- 84, 69, 82, 69, 83, 212, 73, 78, 84, 69, 82, 67, 65, 76, 65, 84, 69, 128,
- 73, 78, 84, 69, 71, 82, 65, 84, 73, 79, 78, 128, 73, 78, 84, 69, 71, 82,
- 65, 84, 73, 79, 206, 73, 78, 84, 69, 71, 82, 65, 76, 128, 73, 78, 84, 69,
- 71, 82, 65, 204, 73, 78, 83, 85, 76, 65, 210, 73, 78, 83, 84, 82, 85, 77,
- 69, 78, 84, 65, 204, 73, 78, 83, 73, 68, 69, 128, 73, 78, 83, 69, 82, 84,
- 73, 79, 206, 73, 78, 83, 69, 67, 84, 128, 73, 78, 83, 67, 82, 73, 80, 84,
- 73, 79, 78, 65, 204, 73, 78, 80, 85, 212, 73, 78, 78, 79, 67, 69, 78, 67,
- 69, 128, 73, 78, 78, 78, 128, 73, 78, 78, 69, 82, 128, 73, 78, 78, 69,
- 210, 73, 78, 78, 128, 73, 78, 73, 78, 71, 85, 128, 73, 78, 73, 128, 73,
- 78, 72, 73, 66, 73, 212, 73, 78, 72, 69, 82, 69, 78, 212, 73, 78, 71, 87,
- 65, 90, 128, 73, 78, 70, 79, 82, 77, 65, 84, 73, 79, 206, 73, 78, 70, 76,
- 85, 69, 78, 67, 69, 128, 73, 78, 70, 73, 78, 73, 84, 89, 128, 73, 78, 70,
- 73, 78, 73, 84, 217, 73, 78, 68, 85, 83, 84, 82, 73, 65, 204, 73, 78, 68,
- 73, 82, 69, 67, 212, 73, 78, 68, 73, 67, 65, 84, 79, 82, 128, 73, 78, 68,
- 73, 67, 65, 84, 79, 210, 73, 78, 68, 73, 195, 73, 78, 68, 73, 65, 206,
- 73, 78, 68, 69, 88, 128, 73, 78, 68, 69, 80, 69, 78, 68, 69, 78, 212, 73,
- 78, 67, 82, 69, 77, 69, 78, 84, 128, 73, 78, 67, 82, 69, 65, 83, 69, 211,
- 73, 78, 67, 82, 69, 65, 83, 69, 128, 73, 78, 67, 79, 77, 80, 76, 69, 84,
- 197, 73, 78, 67, 79, 77, 73, 78, 199, 73, 78, 67, 76, 85, 68, 73, 78,
- 199, 73, 78, 67, 72, 128, 73, 78, 66, 79, 216, 73, 78, 65, 80, 128, 73,
- 78, 45, 65, 76, 65, 70, 128, 73, 77, 80, 69, 82, 73, 65, 204, 73, 77, 80,
- 69, 82, 70, 69, 67, 84, 85, 205, 73, 77, 80, 69, 82, 70, 69, 67, 84, 65,
- 128, 73, 77, 80, 69, 82, 70, 69, 67, 84, 193, 73, 77, 78, 128, 73, 77,
- 73, 83, 69, 79, 211, 73, 77, 73, 78, 51, 128, 73, 77, 73, 78, 128, 73,
- 77, 73, 206, 73, 77, 73, 70, 84, 72, 79, 82, 79, 78, 128, 73, 77, 73, 70,
- 84, 72, 79, 82, 65, 128, 73, 77, 73, 70, 79, 78, 79, 78, 128, 73, 77, 73,
- 68, 73, 65, 82, 71, 79, 78, 128, 73, 77, 65, 71, 197, 73, 76, 85, 89, 65,
- 78, 78, 65, 128, 73, 76, 85, 89, 128, 73, 76, 85, 85, 89, 65, 78, 78, 65,
- 128, 73, 76, 85, 84, 128, 73, 76, 73, 77, 77, 85, 52, 128, 73, 76, 73,
- 77, 77, 85, 51, 128, 73, 76, 73, 77, 77, 85, 128, 73, 76, 73, 77, 77,
- 213, 73, 76, 50, 128, 73, 75, 65, 82, 65, 128, 73, 75, 65, 82, 193, 73,
- 74, 128, 73, 73, 89, 65, 78, 78, 65, 128, 73, 71, 73, 128, 73, 71, 201,
- 73, 71, 71, 87, 83, 128, 73, 70, 73, 78, 128, 73, 69, 85, 78, 71, 45, 84,
- 73, 75, 69, 85, 84, 128, 73, 69, 85, 78, 71, 45, 84, 72, 73, 69, 85, 84,
- 72, 128, 73, 69, 85, 78, 71, 45, 83, 83, 65, 78, 71, 75, 73, 89, 69, 79,
- 75, 128, 73, 69, 85, 78, 71, 45, 82, 73, 69, 85, 76, 128, 73, 69, 85, 78,
- 71, 45, 80, 73, 69, 85, 80, 128, 73, 69, 85, 78, 71, 45, 80, 72, 73, 69,
- 85, 80, 72, 128, 73, 69, 85, 78, 71, 45, 75, 73, 89, 69, 79, 75, 128, 73,
- 69, 85, 78, 71, 45, 75, 72, 73, 69, 85, 75, 72, 128, 73, 69, 85, 78, 71,
- 45, 67, 73, 69, 85, 67, 128, 73, 69, 85, 78, 71, 45, 67, 72, 73, 69, 85,
- 67, 72, 128, 73, 69, 85, 78, 199, 73, 68, 76, 69, 128, 73, 68, 73, 77,
- 128, 73, 68, 73, 205, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 68,
- 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 68, 56, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 68, 55, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 68, 54, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 68, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 68, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 68,
- 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 68, 50, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 68, 49, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 68, 48, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 67, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 67, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 67,
- 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 67, 67, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 67, 66, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 67, 65, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 67, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 67, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 67,
- 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 67, 54, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 67, 53, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 67, 52, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 67, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 67, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 67,
- 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 67, 48, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 66, 70, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 66, 69, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 66, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 66, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 66,
- 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 66, 65, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 66, 57, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 66, 56, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 66, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 66, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 66,
- 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 66, 52, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 66, 51, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 66, 50, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 66, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 66, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 65,
- 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 65, 69, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 65, 68, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 65, 67, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 65, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 65, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 65,
- 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 65, 56, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 65, 55, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 65, 54, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 65, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 65, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 65,
- 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 65, 50, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 65, 49, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 65, 48, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 57, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 57, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 57,
- 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 57, 67, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 57, 66, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 57, 65, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 57, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 57, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 57,
- 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 57, 54, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 57, 53, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 57, 52, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 57, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 57, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 57,
- 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 57, 48, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 56, 70, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 56, 69, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 56, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 56, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 56,
- 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 56, 65, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 56, 57, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 56, 56, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 56, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 56, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 56,
- 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 56, 52, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 56, 51, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 56, 50, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 56, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 56, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 55,
- 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 55, 69, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 55, 68, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 55, 67, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 55, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 55, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 55,
- 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 55, 56, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 55, 55, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 55, 54, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 55, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 55, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 55,
- 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 55, 50, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 55, 49, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 55, 48, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 54, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 54, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 54,
- 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 54, 65, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 54, 57, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 54, 56, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 54, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 54, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 54,
- 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 54, 52, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 54, 51, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 54, 50, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 54, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 54, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 53,
- 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 53, 69, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 53, 68, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 53, 67, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 53, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 53, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 53,
- 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 53, 56, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 53, 55, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 53, 54, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 53, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 53, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 53,
- 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 53, 50, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 53, 49, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 53, 48, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 52, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 52, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 52,
- 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 52, 67, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 52, 66, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 52, 65, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 52, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 52, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 52,
- 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 52, 54, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 52, 53, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 52, 52, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 52, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 52, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 52,
- 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 52, 48, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 51, 70, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 51, 69, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 51, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 51, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 51,
- 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 51, 65, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 51, 57, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 51, 56, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 51, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 51, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 51,
- 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 51, 52, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 51, 51, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 51, 50, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 51, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 51, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 50,
- 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 50, 69, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 50, 68, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 50, 67, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 50, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 50, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 50,
- 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 50, 56, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 50, 55, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 50, 54, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 50, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 50, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 50,
- 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 50, 50, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 50, 49, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 50, 48, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 49, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 49, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 49,
- 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 49, 67, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 49, 66, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 49, 65, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 49, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 49, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 49,
- 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 49, 54, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 49, 53, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 49, 52, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 49, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 49, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 49,
- 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 49, 48, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 48, 70, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 48, 69, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 48, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 48, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 48,
- 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 48, 65, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 48, 57, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 48, 56, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 48, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 48, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 48,
- 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 48, 52, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 48, 51, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 65, 48, 50, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 65, 48, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 65, 48, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 70,
- 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 70, 69, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 70, 68, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 70, 67, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 70, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 70, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 70,
- 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 70, 56, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 70, 55, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 70, 54, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 70, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 70, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 70,
- 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 70, 50, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 70, 49, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 70, 48, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 69, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 69, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 69,
- 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 69, 67, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 69, 66, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 69, 65, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 69, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 69, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 69,
- 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 69, 54, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 69, 53, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 69, 52, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 69, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 69, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 69,
- 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 69, 48, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 68, 70, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 68, 69, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 68, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 68, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 68,
- 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 68, 65, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 68, 57, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 68, 56, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 68, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 68, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 68,
- 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 68, 52, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 68, 51, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 68, 50, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 68, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 68, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 67,
- 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 67, 69, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 67, 68, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 67, 67, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 67, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 67, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 67,
- 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 67, 56, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 67, 55, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 67, 54, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 67, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 67, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 67,
- 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 67, 50, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 67, 49, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 67, 48, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 66, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 66, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 66,
- 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 66, 67, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 66, 66, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 66, 65, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 66, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 66, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 66,
- 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 66, 54, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 66, 53, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 66, 52, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 66, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 66, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 66,
- 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 66, 48, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 65, 70, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 65, 69, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 65, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 65, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 65,
- 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 65, 65, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 65, 57, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 65, 56, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 65, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 65, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 65,
- 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 65, 52, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 65, 51, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 65, 50, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 65, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 65, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 57,
- 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 57, 69, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 57, 68, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 57, 67, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 57, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 57, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 57,
- 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 57, 56, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 57, 55, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 57, 54, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 57, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 57, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 57,
- 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 57, 50, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 57, 49, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 57, 48, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 56, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 56, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 56,
- 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 56, 67, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 56, 66, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 56, 65, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 56, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 56, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 56,
- 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 56, 54, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 56, 53, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 56, 52, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 56, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 56, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 56,
- 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 56, 48, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 55, 70, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 55, 69, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 55, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 55, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 55,
- 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 55, 65, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 55, 57, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 55, 56, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 55, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 55, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 55,
- 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 55, 52, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 55, 51, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 55, 50, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 55, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 55, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 54,
- 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 54, 69, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 54, 68, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 54, 67, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 54, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 54, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 54,
- 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 54, 56, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 54, 55, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 54, 54, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 54, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 54, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 54,
- 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 54, 50, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 54, 49, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 54, 48, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 53, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 53, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 53,
- 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 53, 67, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 53, 66, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 53, 65, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 53, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 53, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 53,
- 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 53, 54, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 53, 53, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 53, 52, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 53, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 53, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 53,
- 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 53, 48, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 52, 70, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 52, 69, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 52, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 52, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 52,
- 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 52, 65, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 52, 57, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 52, 56, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 52, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 52, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 52,
- 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 52, 52, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 52, 51, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 52, 50, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 52, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 52, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 51,
- 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 51, 69, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 51, 68, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 51, 67, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 51, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 51, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 51,
- 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 51, 56, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 51, 55, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 51, 54, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 51, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 51, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 51,
- 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 51, 50, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 51, 49, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 51, 48, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 50, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 50, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 50,
- 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 50, 67, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 50, 66, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 50, 65, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 50, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 50, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 50,
- 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 50, 54, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 50, 53, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 50, 52, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 50, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 50, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 50,
- 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 50, 48, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 49, 70, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 49, 69, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 49, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 49, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 49,
- 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 49, 65, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 49, 57, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 49, 56, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 49, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 49, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 49,
- 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 49, 52, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 49, 51, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 49, 50, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 49, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 49, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 48,
- 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 48, 69, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 48, 68, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 48, 67, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 48, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 48, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 48,
- 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 48, 56, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 48, 55, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 48, 54, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 70, 57, 48, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 70, 57, 48, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 48,
- 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 48, 50, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 48, 49, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 70, 57, 48, 48, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 57, 48, 52, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 56, 68, 55, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 56, 67, 65,
- 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 56, 57, 69, 51, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 55, 68, 52, 50, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 55, 65, 55, 65, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 55, 57, 56, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 55, 54, 68, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 55, 53, 51,
- 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 55, 53, 49, 70, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 55, 49, 50, 49, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 55, 48, 66, 57, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 54, 70, 49, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 54, 69, 56, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 54, 55, 50,
- 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 54, 55, 48, 57, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 54, 55, 48, 56, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 54, 54, 50, 48, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 54, 53, 66, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 54, 53, 57, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 54, 53, 53,
- 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 54, 51, 53, 53, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 54, 51, 48, 55, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 54, 50, 57, 53, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 54, 50, 53, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 54, 50, 52, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 53, 70, 56,
- 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 53, 68, 69, 54, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 53, 66, 56, 57, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 53, 66, 53, 55, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 53, 57, 50, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 53, 57, 49, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 53, 56, 70,
- 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 53, 53, 66, 54, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 53, 52, 51, 57, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 53, 52, 48, 56, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 53, 51, 70, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 53, 51, 67, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 53, 50, 68,
- 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 53, 50, 55, 50, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 53, 50, 52, 68, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 53, 50, 49, 68, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 53, 49, 56, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
- 52, 69, 65, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 52, 69, 56,
- 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 52, 69, 50, 68, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 52, 69, 48, 57, 128, 73, 68, 69, 79,
- 71, 82, 65, 80, 72, 45, 52, 69, 48, 48, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 65, 49, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 65, 49, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 65, 49, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 65,
- 49, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 65, 49, 57,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 65, 49, 56, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 65, 49, 55, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 65, 49, 54, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 65, 49, 53, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 65, 49, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 65, 49, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 65, 49, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 65,
- 49, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 65, 49, 48,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 65, 48, 70, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 65, 48, 69, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 65, 48, 68, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 65, 48, 67, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 65, 48, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 65, 48, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 65, 48, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 65,
- 48, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 65, 48, 55,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 65, 48, 54, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 65, 48, 53, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 65, 48, 52, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 65, 48, 51, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 65, 48, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 65, 48, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 65, 48, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
- 70, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 70, 69,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 70, 68, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 70, 67, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 70, 66, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 57, 70, 65, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 57, 70, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 57, 70, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 57, 70, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
- 70, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 70, 53,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 70, 52, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 70, 51, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 70, 50, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 57, 70, 49, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 57, 70, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 57, 69, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 57, 69, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
- 69, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 69, 67,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 69, 66, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 69, 65, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 69, 57, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 57, 69, 56, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 57, 69, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 57, 69, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 57, 69, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
- 69, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 69, 51,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 69, 50, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 69, 49, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 69, 48, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 57, 68, 70, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 57, 68, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 57, 68, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 57, 68, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
- 68, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 68, 65,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 68, 57, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 68, 56, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 68, 55, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 57, 68, 54, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 57, 68, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 57, 68, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 57, 68, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
- 68, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 68, 49,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 68, 48, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 67, 70, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 67, 69, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 57, 67, 68, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 57, 67, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 57, 67, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 57, 67, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
- 67, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 67, 56,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 67, 55, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 67, 54, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 67, 53, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 57, 67, 52, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 57, 67, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 57, 67, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 57, 67, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
- 67, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 66, 70,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 66, 69, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 66, 68, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 66, 67, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 57, 66, 66, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 57, 66, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 57, 66, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 57, 66, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
- 66, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 66, 54,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 66, 53, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 66, 52, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 66, 51, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 57, 66, 50, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 57, 66, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 57, 66, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 57, 65, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
- 65, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 65, 68,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 65, 67, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 65, 66, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 65, 65, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 57, 65, 57, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 57, 65, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 57, 65, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 57, 65, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
- 65, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 65, 52,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 65, 51, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 65, 50, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 65, 49, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 57, 65, 48, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 57, 57, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 57, 57, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 57, 57, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
- 57, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 57, 66,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 57, 65, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 57, 57, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 57, 56, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 57, 57, 55, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 57, 57, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 57, 57, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 57, 57, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
- 57, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 57, 50,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 57, 49, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 57, 48, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 56, 70, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 57, 56, 69, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 57, 56, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 57, 56, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 57, 56, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
- 56, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 56, 57,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 56, 56, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 56, 55, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 56, 54, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 57, 56, 53, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 57, 56, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 57, 56, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 57, 56, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
- 56, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 56, 48,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 55, 70, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 55, 69, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 55, 68, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 57, 55, 67, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 57, 55, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 57, 55, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 57, 55, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
- 55, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 55, 55,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 55, 54, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 55, 53, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 55, 52, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 57, 55, 51, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 57, 55, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 57, 55, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 57, 55, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
- 54, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 54, 69,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 54, 68, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 54, 67, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 54, 66, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 57, 54, 65, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 57, 54, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 57, 54, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 57, 54, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
- 54, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 54, 53,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 54, 52, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 54, 51, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 54, 50, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 57, 54, 49, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 57, 54, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 57, 53, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 57, 53, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
- 53, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 53, 67,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 53, 66, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 53, 65, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 53, 57, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 57, 53, 56, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 57, 53, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 57, 53, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 57, 53, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
- 53, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 53, 51,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 53, 50, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 53, 49, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 53, 48, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 57, 52, 70, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 57, 52, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 57, 52, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 57, 52, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
- 52, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 52, 65,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 52, 57, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 52, 56, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 52, 55, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 57, 52, 54, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 57, 52, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 57, 52, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 57, 52, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
- 52, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 52, 49,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 52, 48, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 51, 70, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 51, 69, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 57, 51, 68, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 57, 51, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 57, 51, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 57, 51, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
- 51, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 51, 56,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 51, 55, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 51, 54, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 51, 53, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 57, 51, 52, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 57, 51, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 57, 51, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 57, 51, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
- 51, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 50, 70,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 50, 69, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 50, 68, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 50, 67, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 57, 50, 66, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 57, 50, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 57, 50, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 57, 50, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
- 50, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 50, 54,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 50, 53, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 50, 52, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 50, 51, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 57, 50, 50, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 57, 50, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 57, 50, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 57, 49, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
- 49, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 49, 68,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 49, 67, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 49, 66, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 49, 65, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 57, 49, 57, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 57, 49, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 57, 49, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 57, 49, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
- 49, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 49, 52,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 49, 51, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 49, 50, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 49, 49, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 57, 49, 48, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 57, 48, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 57, 48, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 57, 48, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
- 48, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 48, 66,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 48, 65, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 48, 57, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 48, 56, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 57, 48, 55, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 57, 48, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 57, 48, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 57, 48, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
- 48, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 48, 50,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 48, 49, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 48, 48, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 70, 70, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 56, 70, 69, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 56, 70, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 56, 70, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 56, 70, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
- 70, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 70, 57,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 70, 56, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 70, 55, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 70, 54, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 56, 70, 53, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 56, 70, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 56, 70, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 56, 70, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
- 70, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 70, 48,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 69, 70, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 69, 69, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 69, 68, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 56, 69, 67, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 56, 69, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 56, 69, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 56, 69, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
- 69, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 69, 55,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 69, 54, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 69, 53, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 69, 52, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 56, 69, 51, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 56, 69, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 56, 69, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 56, 69, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
- 68, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 68, 69,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 68, 68, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 68, 67, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 68, 66, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 56, 68, 65, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 56, 68, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 56, 68, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 56, 68, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
- 68, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 68, 53,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 68, 52, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 68, 51, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 68, 50, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 56, 68, 49, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 56, 68, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 56, 67, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 56, 67, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
- 67, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 67, 67,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 67, 66, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 67, 65, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 67, 57, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 56, 67, 56, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 56, 67, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 56, 67, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 56, 67, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
- 67, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 67, 51,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 67, 50, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 67, 49, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 67, 48, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 56, 66, 70, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 56, 66, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 56, 66, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 56, 66, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
- 66, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 66, 65,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 66, 57, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 66, 56, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 66, 55, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 56, 66, 54, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 56, 66, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 56, 66, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 56, 66, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
- 66, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 66, 49,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 66, 48, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 65, 70, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 65, 69, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 56, 65, 68, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 56, 65, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 56, 65, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 56, 65, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
- 65, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 65, 56,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 65, 55, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 65, 54, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 65, 53, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 56, 65, 52, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 56, 65, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 56, 65, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 56, 65, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
- 65, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 57, 70,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 57, 69, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 57, 68, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 57, 67, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 56, 57, 66, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 56, 57, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 56, 57, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 56, 57, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
- 57, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 57, 54,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 57, 53, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 57, 52, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 57, 51, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 56, 57, 50, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 56, 57, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 56, 57, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 56, 56, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
- 56, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 56, 68,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 56, 67, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 56, 66, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 56, 65, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 56, 56, 57, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 56, 56, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 56, 56, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 56, 56, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
- 56, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 56, 52,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 56, 51, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 56, 50, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 56, 49, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 56, 56, 48, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 56, 55, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 56, 55, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 56, 55, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
- 55, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 55, 66,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 55, 65, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 55, 57, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 55, 56, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 56, 55, 55, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 56, 55, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 56, 55, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 56, 55, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
- 55, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 55, 50,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 55, 49, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 55, 48, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 54, 70, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 56, 54, 69, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 56, 54, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 56, 54, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 56, 54, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
- 54, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 54, 57,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 54, 56, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 54, 55, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 54, 54, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 56, 54, 53, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 56, 54, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 56, 54, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 56, 54, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
- 54, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 54, 48,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 53, 70, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 53, 69, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 53, 68, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 56, 53, 67, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 56, 53, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 56, 53, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 56, 53, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
- 53, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 53, 55,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 53, 54, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 53, 53, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 53, 52, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 56, 53, 51, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 56, 53, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 56, 53, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 56, 53, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
- 52, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 52, 69,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 52, 68, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 52, 67, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 52, 66, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 56, 52, 65, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 56, 52, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 56, 52, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 56, 52, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
- 52, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 52, 53,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 52, 52, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 52, 51, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 52, 50, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 56, 52, 49, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 56, 52, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 56, 51, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 56, 51, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
- 51, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 51, 67,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 51, 66, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 51, 65, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 51, 57, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 56, 51, 56, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 56, 51, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 56, 51, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 56, 51, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
- 51, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 51, 51,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 51, 50, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 51, 49, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 51, 48, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 56, 50, 70, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 56, 50, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 56, 50, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 56, 50, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
- 50, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 50, 65,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 50, 57, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 50, 56, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 50, 55, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 56, 50, 54, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 56, 50, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 56, 50, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 56, 50, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
- 50, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 50, 49,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 50, 48, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 49, 70, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 49, 69, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 56, 49, 68, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 56, 49, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 56, 49, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 56, 49, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
- 49, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 49, 56,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 49, 55, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 49, 54, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 49, 53, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 56, 49, 52, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 56, 49, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 56, 49, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 56, 49, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
- 49, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 48, 70,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 48, 69, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 48, 68, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 48, 67, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 56, 48, 66, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 56, 48, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 56, 48, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
- 70, 56, 48, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
- 48, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 48, 54,
- 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 48, 53, 128, 73,
- 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 48, 52, 128, 73, 68, 69,
- 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 48, 51, 128, 73, 68, 69, 79, 71,
- 82, 65, 80, 72, 45, 50, 70, 56, 48, 50, 128, 73, 68, 69, 79, 71, 82, 65,
- 80, 72, 45, 50, 70, 56, 48, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
- 45, 50, 70, 56, 48, 48, 128, 73, 68, 69, 78, 84, 73, 70, 73, 67, 65, 84,
- 73, 79, 78, 128, 73, 68, 69, 78, 84, 73, 67, 65, 204, 73, 67, 72, 79, 85,
- 128, 73, 67, 72, 79, 83, 128, 73, 67, 72, 73, 77, 65, 84, 79, 83, 128,
- 73, 67, 72, 65, 68, 73, 78, 128, 73, 67, 69, 76, 65, 78, 68, 73, 67, 45,
- 89, 82, 128, 73, 66, 73, 70, 73, 76, 73, 128, 73, 65, 85, 68, 65, 128,
- 73, 48, 49, 53, 128, 73, 48, 49, 52, 128, 73, 48, 49, 51, 128, 73, 48,
- 49, 50, 128, 73, 48, 49, 49, 65, 128, 73, 48, 49, 49, 128, 73, 48, 49,
- 48, 65, 128, 73, 48, 49, 48, 128, 73, 48, 48, 57, 65, 128, 73, 48, 48,
- 57, 128, 73, 48, 48, 56, 128, 73, 48, 48, 55, 128, 73, 48, 48, 54, 128,
- 73, 48, 48, 53, 65, 128, 73, 48, 48, 53, 128, 73, 48, 48, 52, 128, 73,
- 48, 48, 51, 128, 73, 48, 48, 50, 128, 73, 48, 48, 49, 128, 73, 45, 89,
- 85, 128, 73, 45, 89, 79, 128, 73, 45, 89, 69, 79, 128, 73, 45, 89, 69,
- 128, 73, 45, 89, 65, 69, 128, 73, 45, 89, 65, 45, 79, 128, 73, 45, 89,
- 65, 128, 73, 45, 79, 45, 73, 128, 73, 45, 79, 128, 73, 45, 69, 85, 128,
- 73, 45, 66, 69, 65, 77, 128, 73, 45, 65, 82, 65, 69, 65, 128, 73, 45, 65,
- 128, 72, 90, 90, 90, 71, 128, 72, 90, 90, 90, 128, 72, 90, 90, 80, 128,
- 72, 90, 90, 128, 72, 90, 87, 71, 128, 72, 90, 87, 128, 72, 90, 84, 128,
- 72, 90, 71, 128, 72, 89, 83, 84, 69, 82, 69, 83, 73, 211, 72, 89, 80, 79,
- 68, 73, 65, 83, 84, 79, 76, 69, 128, 72, 89, 80, 72, 69, 78, 65, 84, 73,
- 79, 206, 72, 89, 80, 72, 69, 78, 45, 77, 73, 78, 85, 83, 128, 72, 89, 80,
- 72, 69, 78, 128, 72, 89, 80, 72, 69, 206, 72, 88, 87, 71, 128, 72, 88,
- 85, 79, 88, 128, 72, 88, 85, 79, 84, 128, 72, 88, 85, 79, 80, 128, 72,
- 88, 85, 79, 128, 72, 88, 79, 88, 128, 72, 88, 79, 84, 128, 72, 88, 79,
- 80, 128, 72, 88, 79, 128, 72, 88, 73, 88, 128, 72, 88, 73, 84, 128, 72,
- 88, 73, 80, 128, 72, 88, 73, 69, 88, 128, 72, 88, 73, 69, 84, 128, 72,
- 88, 73, 69, 80, 128, 72, 88, 73, 69, 128, 72, 88, 73, 128, 72, 88, 69,
- 88, 128, 72, 88, 69, 80, 128, 72, 88, 69, 128, 72, 88, 65, 88, 128, 72,
- 88, 65, 84, 128, 72, 88, 65, 80, 128, 72, 88, 65, 128, 72, 87, 85, 128,
- 72, 87, 65, 73, 82, 128, 72, 86, 128, 72, 85, 83, 72, 69, 196, 72, 85,
- 82, 65, 78, 128, 72, 85, 79, 84, 128, 72, 85, 78, 68, 82, 69, 68, 128,
- 72, 85, 78, 68, 82, 69, 196, 72, 85, 78, 128, 72, 85, 77, 65, 78, 128,
- 72, 85, 77, 65, 206, 72, 85, 76, 50, 128, 72, 85, 73, 73, 84, 79, 128,
- 72, 85, 66, 50, 128, 72, 85, 66, 178, 72, 85, 66, 128, 72, 85, 65, 82,
- 65, 68, 68, 79, 128, 72, 84, 83, 128, 72, 84, 74, 128, 72, 82, 89, 86,
- 78, 73, 193, 72, 80, 87, 71, 128, 72, 80, 65, 128, 72, 80, 128, 72, 79,
- 85, 83, 197, 72, 79, 85, 82, 71, 76, 65, 83, 83, 128, 72, 79, 85, 82, 71,
- 76, 65, 83, 211, 72, 79, 85, 82, 128, 72, 79, 85, 210, 72, 79, 84, 69,
- 76, 128, 72, 79, 84, 65, 128, 72, 79, 83, 80, 73, 84, 65, 76, 128, 72,
- 79, 82, 83, 69, 128, 72, 79, 82, 83, 197, 72, 79, 82, 78, 83, 128, 72,
- 79, 82, 73, 90, 79, 78, 84, 65, 76, 76, 217, 72, 79, 82, 73, 90, 79, 78,
- 84, 65, 76, 45, 48, 54, 45, 48, 54, 128, 72, 79, 82, 73, 90, 79, 78, 84,
- 65, 76, 45, 48, 54, 45, 48, 53, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65,
- 76, 45, 48, 54, 45, 48, 52, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76,
- 45, 48, 54, 45, 48, 51, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45,
- 48, 54, 45, 48, 50, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48,
- 54, 45, 48, 49, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 54,
- 45, 48, 48, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 53, 45,
- 48, 54, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 53, 45, 48,
- 53, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 53, 45, 48, 52,
- 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 53, 45, 48, 51, 128,
- 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 53, 45, 48, 50, 128, 72,
- 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 53, 45, 48, 49, 128, 72, 79,
- 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 53, 45, 48, 48, 128, 72, 79, 82,
- 73, 90, 79, 78, 84, 65, 76, 45, 48, 52, 45, 48, 54, 128, 72, 79, 82, 73,
- 90, 79, 78, 84, 65, 76, 45, 48, 52, 45, 48, 53, 128, 72, 79, 82, 73, 90,
- 79, 78, 84, 65, 76, 45, 48, 52, 45, 48, 52, 128, 72, 79, 82, 73, 90, 79,
- 78, 84, 65, 76, 45, 48, 52, 45, 48, 51, 128, 72, 79, 82, 73, 90, 79, 78,
- 84, 65, 76, 45, 48, 52, 45, 48, 50, 128, 72, 79, 82, 73, 90, 79, 78, 84,
- 65, 76, 45, 48, 52, 45, 48, 49, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65,
- 76, 45, 48, 52, 45, 48, 48, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76,
- 45, 48, 51, 45, 48, 54, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45,
- 48, 51, 45, 48, 53, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48,
- 51, 45, 48, 52, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 51,
- 45, 48, 51, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 51, 45,
- 48, 50, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 51, 45, 48,
- 49, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 51, 45, 48, 48,
- 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 50, 45, 48, 54, 128,
- 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 50, 45, 48, 53, 128, 72,
- 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 50, 45, 48, 52, 128, 72, 79,
- 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 50, 45, 48, 51, 128, 72, 79, 82,
- 73, 90, 79, 78, 84, 65, 76, 45, 48, 50, 45, 48, 50, 128, 72, 79, 82, 73,
- 90, 79, 78, 84, 65, 76, 45, 48, 50, 45, 48, 49, 128, 72, 79, 82, 73, 90,
- 79, 78, 84, 65, 76, 45, 48, 50, 45, 48, 48, 128, 72, 79, 82, 73, 90, 79,
- 78, 84, 65, 76, 45, 48, 49, 45, 48, 54, 128, 72, 79, 82, 73, 90, 79, 78,
- 84, 65, 76, 45, 48, 49, 45, 48, 53, 128, 72, 79, 82, 73, 90, 79, 78, 84,
- 65, 76, 45, 48, 49, 45, 48, 52, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65,
- 76, 45, 48, 49, 45, 48, 51, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76,
- 45, 48, 49, 45, 48, 50, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45,
- 48, 49, 45, 48, 49, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48,
- 49, 45, 48, 48, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 48,
- 45, 48, 54, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 48, 45,
- 48, 53, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 48, 45, 48,
- 52, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 48, 45, 48, 51,
- 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 48, 45, 48, 50, 128,
- 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 48, 45, 48, 49, 128, 72,
- 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 48, 45, 48, 48, 128, 72, 79,
- 82, 73, 90, 79, 78, 84, 65, 76, 128, 72, 79, 82, 73, 128, 72, 79, 82,
- 193, 72, 79, 79, 82, 85, 128, 72, 79, 79, 80, 128, 72, 79, 79, 78, 128,
+ 69, 70, 85, 76, 65, 128, 75, 69, 69, 86, 128, 75, 69, 69, 83, 85, 128,
+ 75, 69, 69, 80, 73, 78, 199, 75, 69, 69, 78, 71, 128, 75, 69, 69, 66,
+ 128, 75, 69, 66, 128, 75, 69, 65, 65, 69, 128, 75, 67, 65, 76, 128, 75,
+ 66, 128, 75, 65, 90, 65, 75, 200, 75, 65, 89, 65, 78, 78, 65, 128, 75,
+ 65, 89, 65, 200, 75, 65, 88, 128, 75, 65, 87, 86, 128, 75, 65, 87, 73,
+ 128, 75, 65, 87, 66, 128, 75, 65, 86, 89, 75, 65, 128, 75, 65, 86, 128,
+ 75, 65, 85, 86, 128, 75, 65, 85, 78, 65, 128, 75, 65, 85, 206, 75, 65,
+ 85, 66, 128, 75, 65, 84, 79, 128, 75, 65, 84, 72, 73, 83, 84, 73, 128,
+ 75, 65, 84, 72, 65, 75, 193, 75, 65, 84, 65, 86, 65, 83, 77, 65, 128, 75,
+ 65, 84, 65, 86, 193, 75, 65, 84, 65, 75, 65, 78, 65, 45, 72, 73, 82, 65,
+ 71, 65, 78, 193, 75, 65, 83, 82, 65, 84, 65, 78, 128, 75, 65, 83, 82, 65,
+ 84, 65, 206, 75, 65, 83, 82, 65, 128, 75, 65, 83, 82, 193, 75, 65, 83,
+ 75, 65, 76, 128, 75, 65, 83, 75, 65, 204, 75, 65, 83, 72, 77, 73, 82,
+ 201, 75, 65, 82, 83, 72, 65, 78, 65, 128, 75, 65, 82, 79, 82, 73, 73,
+ 128, 75, 65, 82, 207, 75, 65, 82, 69, 206, 75, 65, 82, 65, 84, 84, 79,
+ 128, 75, 65, 82, 65, 78, 128, 75, 65, 80, 89, 69, 79, 85, 78, 83, 83, 65,
+ 78, 71, 80, 73, 69, 85, 80, 128, 75, 65, 80, 89, 69, 79, 85, 78, 82, 73,
+ 69, 85, 76, 128, 75, 65, 80, 89, 69, 79, 85, 78, 80, 72, 73, 69, 85, 80,
+ 72, 128, 75, 65, 80, 89, 69, 79, 85, 78, 77, 73, 69, 85, 77, 128, 75, 65,
+ 80, 80, 65, 128, 75, 65, 80, 80, 193, 75, 65, 80, 79, 128, 75, 65, 80,
+ 72, 128, 75, 65, 80, 65, 76, 128, 75, 65, 80, 65, 128, 75, 65, 208, 75,
+ 65, 78, 84, 65, 74, 193, 75, 65, 78, 71, 128, 75, 65, 78, 199, 75, 65,
+ 78, 65, 75, 79, 128, 75, 65, 77, 52, 128, 75, 65, 77, 50, 128, 75, 65,
+ 77, 128, 75, 65, 75, 79, 128, 75, 65, 75, 65, 66, 65, 84, 128, 75, 65,
+ 75, 128, 75, 65, 203, 75, 65, 73, 86, 128, 75, 65, 73, 84, 72, 201, 75,
+ 65, 73, 82, 73, 128, 75, 65, 73, 66, 128, 75, 65, 73, 128, 75, 65, 201,
+ 75, 65, 70, 65, 128, 75, 65, 70, 128, 75, 65, 198, 75, 65, 68, 53, 128,
+ 75, 65, 68, 181, 75, 65, 68, 52, 128, 75, 65, 68, 51, 128, 75, 65, 68,
+ 179, 75, 65, 68, 50, 128, 75, 65, 68, 128, 75, 65, 66, 193, 75, 65, 66,
+ 128, 75, 65, 65, 86, 128, 75, 65, 65, 73, 128, 75, 65, 65, 70, 85, 128,
+ 75, 65, 65, 70, 128, 75, 65, 65, 66, 65, 128, 75, 65, 65, 66, 128, 75,
+ 65, 50, 128, 75, 65, 178, 75, 48, 48, 56, 128, 75, 48, 48, 55, 128, 75,
+ 48, 48, 54, 128, 75, 48, 48, 53, 128, 75, 48, 48, 52, 128, 75, 48, 48,
+ 51, 128, 75, 48, 48, 50, 128, 75, 48, 48, 49, 128, 74, 87, 65, 128, 74,
+ 85, 85, 128, 74, 85, 84, 128, 74, 85, 83, 84, 73, 70, 73, 67, 65, 84, 73,
+ 79, 78, 128, 74, 85, 80, 73, 84, 69, 82, 128, 74, 85, 79, 84, 128, 74,
+ 85, 79, 80, 128, 74, 85, 78, 79, 128, 74, 85, 78, 69, 128, 74, 85, 76,
+ 89, 128, 74, 85, 69, 85, 73, 128, 74, 85, 68, 85, 76, 128, 74, 85, 68,
+ 71, 69, 128, 74, 85, 68, 69, 79, 45, 83, 80, 65, 78, 73, 83, 200, 74, 79,
+ 89, 83, 84, 73, 67, 75, 128, 74, 79, 89, 79, 85, 211, 74, 79, 89, 128,
+ 74, 79, 86, 69, 128, 74, 79, 212, 74, 79, 78, 71, 128, 74, 79, 78, 193,
+ 74, 79, 75, 69, 82, 128, 74, 79, 73, 78, 84, 83, 128, 74, 79, 73, 78, 69,
+ 68, 128, 74, 79, 73, 78, 128, 74, 79, 65, 128, 74, 74, 89, 88, 128, 74,
+ 74, 89, 84, 128, 74, 74, 89, 80, 128, 74, 74, 89, 128, 74, 74, 85, 88,
+ 128, 74, 74, 85, 84, 128, 74, 74, 85, 82, 88, 128, 74, 74, 85, 82, 128,
+ 74, 74, 85, 80, 128, 74, 74, 85, 79, 88, 128, 74, 74, 85, 79, 80, 128,
+ 74, 74, 85, 79, 128, 74, 74, 85, 128, 74, 74, 79, 88, 128, 74, 74, 79,
+ 84, 128, 74, 74, 79, 80, 128, 74, 74, 79, 128, 74, 74, 73, 88, 128, 74,
+ 74, 73, 84, 128, 74, 74, 73, 80, 128, 74, 74, 73, 69, 88, 128, 74, 74,
+ 73, 69, 84, 128, 74, 74, 73, 69, 80, 128, 74, 74, 73, 69, 128, 74, 74,
+ 73, 128, 74, 74, 69, 69, 128, 74, 74, 69, 128, 74, 74, 65, 128, 74, 73,
+ 76, 128, 74, 73, 73, 128, 74, 73, 72, 86, 65, 77, 85, 76, 73, 89, 65,
+ 128, 74, 73, 65, 128, 74, 72, 79, 88, 128, 74, 72, 79, 128, 74, 72, 69,
+ 72, 128, 74, 72, 65, 89, 73, 78, 128, 74, 72, 65, 78, 128, 74, 72, 65,
+ 77, 128, 74, 72, 65, 65, 128, 74, 72, 65, 128, 74, 69, 85, 128, 74, 69,
+ 82, 85, 83, 65, 76, 69, 77, 128, 74, 69, 82, 65, 206, 74, 69, 82, 65,
+ 128, 74, 69, 82, 128, 74, 69, 72, 128, 74, 69, 200, 74, 69, 71, 79, 71,
+ 65, 78, 128, 74, 69, 69, 77, 128, 74, 69, 65, 78, 83, 128, 74, 65, 89,
+ 78, 128, 74, 65, 89, 73, 78, 128, 74, 65, 89, 65, 78, 78, 65, 128, 74,
+ 65, 87, 128, 74, 65, 86, 73, 89, 65, 78, 73, 128, 74, 65, 85, 128, 74,
+ 65, 82, 128, 74, 65, 80, 65, 78, 69, 83, 197, 74, 65, 80, 65, 78, 128,
+ 74, 65, 78, 85, 65, 82, 89, 128, 74, 65, 76, 76, 65, 74, 65, 76, 65, 76,
+ 79, 85, 72, 79, 85, 128, 74, 65, 73, 206, 74, 65, 73, 128, 74, 65, 72,
+ 128, 74, 65, 68, 69, 128, 74, 65, 67, 75, 83, 128, 74, 65, 67, 75, 45,
+ 79, 45, 76, 65, 78, 84, 69, 82, 78, 128, 74, 65, 67, 203, 74, 45, 83, 73,
+ 77, 80, 76, 73, 70, 73, 69, 196, 73, 90, 72, 73, 84, 83, 65, 128, 73, 90,
+ 72, 73, 84, 83, 193, 73, 90, 72, 69, 128, 73, 90, 65, 75, 65, 89, 193,
+ 73, 89, 69, 75, 128, 73, 89, 65, 78, 78, 65, 128, 73, 85, 74, 65, 128,
+ 73, 84, 211, 73, 84, 69, 82, 65, 84, 73, 79, 206, 73, 84, 69, 77, 128,
+ 73, 83, 83, 72, 65, 82, 128, 73, 83, 79, 83, 67, 69, 76, 69, 211, 73, 83,
+ 79, 78, 128, 73, 83, 79, 206, 73, 83, 79, 76, 65, 84, 69, 128, 73, 83,
+ 76, 65, 78, 68, 128, 73, 83, 69, 78, 45, 73, 83, 69, 78, 128, 73, 83, 65,
+ 75, 73, 193, 73, 83, 45, 80, 73, 76, 76, 65, 128, 73, 82, 85, 89, 65, 78,
+ 78, 65, 128, 73, 82, 85, 85, 89, 65, 78, 78, 65, 128, 73, 82, 79, 78, 45,
+ 67, 79, 80, 80, 69, 210, 73, 82, 79, 78, 128, 73, 82, 66, 128, 73, 79,
+ 84, 73, 70, 73, 69, 196, 73, 79, 84, 65, 84, 69, 196, 73, 79, 84, 65,
+ 128, 73, 79, 84, 193, 73, 79, 82, 128, 73, 79, 68, 72, 65, 68, 72, 128,
+ 73, 78, 86, 73, 83, 73, 66, 76, 197, 73, 78, 86, 69, 82, 84, 69, 68, 128,
+ 73, 78, 86, 69, 82, 84, 69, 196, 73, 78, 86, 69, 82, 83, 197, 73, 78, 84,
+ 82, 79, 68, 85, 67, 69, 82, 128, 73, 78, 84, 73, 128, 73, 78, 84, 69, 82,
+ 83, 89, 76, 76, 65, 66, 73, 195, 73, 78, 84, 69, 82, 83, 69, 67, 84, 73,
+ 79, 78, 128, 73, 78, 84, 69, 82, 83, 69, 67, 84, 73, 79, 206, 73, 78, 84,
+ 69, 82, 83, 69, 67, 84, 73, 78, 199, 73, 78, 84, 69, 82, 82, 79, 66, 65,
+ 78, 71, 128, 73, 78, 84, 69, 82, 82, 79, 66, 65, 78, 199, 73, 78, 84, 69,
+ 82, 80, 79, 76, 65, 84, 73, 79, 206, 73, 78, 84, 69, 82, 76, 79, 67, 75,
+ 69, 196, 73, 78, 84, 69, 82, 76, 73, 78, 69, 65, 210, 73, 78, 84, 69, 82,
+ 76, 65, 67, 69, 196, 73, 78, 84, 69, 82, 73, 79, 210, 73, 78, 84, 69, 82,
+ 69, 83, 212, 73, 78, 84, 69, 82, 67, 65, 76, 65, 84, 69, 128, 73, 78, 84,
+ 69, 71, 82, 65, 84, 73, 79, 78, 128, 73, 78, 84, 69, 71, 82, 65, 84, 73,
+ 79, 206, 73, 78, 84, 69, 71, 82, 65, 76, 128, 73, 78, 84, 69, 71, 82, 65,
+ 204, 73, 78, 83, 85, 76, 65, 210, 73, 78, 83, 84, 82, 85, 77, 69, 78, 84,
+ 65, 204, 73, 78, 83, 73, 68, 69, 128, 73, 78, 83, 73, 68, 197, 73, 78,
+ 83, 69, 82, 84, 73, 79, 206, 73, 78, 83, 69, 67, 84, 128, 73, 78, 83, 67,
+ 82, 73, 80, 84, 73, 79, 78, 65, 204, 73, 78, 80, 85, 212, 73, 78, 78, 79,
+ 67, 69, 78, 67, 69, 128, 73, 78, 78, 78, 128, 73, 78, 78, 69, 82, 128,
+ 73, 78, 78, 69, 210, 73, 78, 78, 128, 73, 78, 73, 78, 71, 85, 128, 73,
+ 78, 73, 128, 73, 78, 72, 73, 66, 73, 212, 73, 78, 72, 69, 82, 69, 78,
+ 212, 73, 78, 72, 65, 76, 69, 128, 73, 78, 71, 87, 65, 90, 128, 73, 78,
+ 70, 79, 82, 77, 65, 84, 73, 79, 206, 73, 78, 70, 76, 85, 69, 78, 67, 69,
+ 128, 73, 78, 70, 73, 78, 73, 84, 89, 128, 73, 78, 70, 73, 78, 73, 84,
+ 217, 73, 78, 68, 85, 83, 84, 82, 73, 65, 204, 73, 78, 68, 73, 82, 69, 67,
+ 212, 73, 78, 68, 73, 67, 65, 84, 79, 82, 128, 73, 78, 68, 73, 67, 65, 84,
+ 79, 210, 73, 78, 68, 73, 195, 73, 78, 68, 73, 65, 206, 73, 78, 68, 69,
+ 88, 128, 73, 78, 68, 69, 80, 69, 78, 68, 69, 78, 212, 73, 78, 67, 82, 69,
+ 77, 69, 78, 84, 128, 73, 78, 67, 82, 69, 65, 83, 69, 211, 73, 78, 67, 82,
+ 69, 65, 83, 69, 128, 73, 78, 67, 82, 69, 65, 83, 197, 73, 78, 67, 79, 77,
+ 80, 76, 69, 84, 197, 73, 78, 67, 79, 77, 73, 78, 199, 73, 78, 67, 76, 85,
+ 68, 73, 78, 199, 73, 78, 67, 72, 128, 73, 78, 66, 79, 216, 73, 78, 65,
+ 80, 128, 73, 78, 45, 65, 76, 65, 70, 128, 73, 77, 80, 69, 82, 73, 65,
+ 204, 73, 77, 80, 69, 82, 70, 69, 67, 84, 85, 205, 73, 77, 80, 69, 82, 70,
+ 69, 67, 84, 65, 128, 73, 77, 80, 69, 82, 70, 69, 67, 84, 193, 73, 77, 78,
+ 128, 73, 77, 73, 83, 69, 79, 211, 73, 77, 73, 78, 51, 128, 73, 77, 73,
+ 78, 128, 73, 77, 73, 206, 73, 77, 73, 70, 84, 72, 79, 82, 79, 78, 128,
+ 73, 77, 73, 70, 84, 72, 79, 82, 65, 128, 73, 77, 73, 70, 79, 78, 79, 78,
+ 128, 73, 77, 73, 68, 73, 65, 82, 71, 79, 78, 128, 73, 77, 65, 71, 197,
+ 73, 76, 85, 89, 65, 78, 78, 65, 128, 73, 76, 85, 89, 128, 73, 76, 85, 85,
+ 89, 65, 78, 78, 65, 128, 73, 76, 85, 84, 128, 73, 76, 73, 77, 77, 85, 52,
+ 128, 73, 76, 73, 77, 77, 85, 51, 128, 73, 76, 73, 77, 77, 85, 128, 73,
+ 76, 73, 77, 77, 213, 73, 76, 50, 128, 73, 75, 65, 82, 65, 128, 73, 75,
+ 65, 82, 193, 73, 74, 128, 73, 73, 89, 65, 78, 78, 65, 128, 73, 71, 73,
+ 128, 73, 71, 201, 73, 71, 71, 87, 83, 128, 73, 70, 73, 78, 128, 73, 69,
+ 85, 78, 71, 45, 84, 73, 75, 69, 85, 84, 128, 73, 69, 85, 78, 71, 45, 84,
+ 72, 73, 69, 85, 84, 72, 128, 73, 69, 85, 78, 71, 45, 83, 83, 65, 78, 71,
+ 75, 73, 89, 69, 79, 75, 128, 73, 69, 85, 78, 71, 45, 82, 73, 69, 85, 76,
+ 128, 73, 69, 85, 78, 71, 45, 80, 73, 69, 85, 80, 128, 73, 69, 85, 78, 71,
+ 45, 80, 72, 73, 69, 85, 80, 72, 128, 73, 69, 85, 78, 71, 45, 75, 73, 89,
+ 69, 79, 75, 128, 73, 69, 85, 78, 71, 45, 75, 72, 73, 69, 85, 75, 72, 128,
+ 73, 69, 85, 78, 71, 45, 67, 73, 69, 85, 67, 128, 73, 69, 85, 78, 71, 45,
+ 67, 72, 73, 69, 85, 67, 72, 128, 73, 69, 85, 78, 199, 73, 68, 76, 69,
+ 128, 73, 68, 73, 77, 128, 73, 68, 73, 205, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 68, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 68, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 68,
+ 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 68, 54, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 68, 53, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 68, 52, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 68, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 68, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 68,
+ 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 68, 48, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 67, 70, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 67, 69, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 67, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 67, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 67,
+ 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 67, 65, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 67, 57, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 67, 56, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 67, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 67, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 67,
+ 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 67, 52, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 67, 51, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 67, 50, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 67, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 67, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 66,
+ 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 66, 69, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 66, 68, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 66, 67, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 66, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 66, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 66,
+ 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 66, 56, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 66, 55, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 66, 54, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 66, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 66, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 66,
+ 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 66, 50, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 66, 49, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 66, 48, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 65, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 65, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 65,
+ 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 65, 67, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 65, 66, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 65, 65, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 65, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 65, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 65,
+ 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 65, 54, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 65, 53, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 65, 52, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 65, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 65, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 65,
+ 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 65, 48, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 57, 70, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 57, 69, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 57, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 57, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 57,
+ 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 57, 65, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 57, 57, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 57, 56, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 57, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 57, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 57,
+ 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 57, 52, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 57, 51, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 57, 50, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 57, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 57, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 56,
+ 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 56, 69, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 56, 68, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 56, 67, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 56, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 56, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 56,
+ 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 56, 56, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 56, 55, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 56, 54, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 56, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 56, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 56,
+ 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 56, 50, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 56, 49, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 56, 48, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 55, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 55, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 55,
+ 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 55, 67, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 55, 66, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 55, 65, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 55, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 55, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 55,
+ 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 55, 54, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 55, 53, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 55, 52, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 55, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 55, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 55,
+ 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 55, 48, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 54, 68, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 54, 67, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 54, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 54, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 54,
+ 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 54, 56, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 54, 55, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 54, 54, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 54, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 54, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 54,
+ 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 54, 50, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 54, 49, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 54, 48, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 53, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 53, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 53,
+ 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 53, 67, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 53, 66, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 53, 65, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 53, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 53, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 53,
+ 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 53, 54, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 53, 53, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 53, 52, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 53, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 53, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 53,
+ 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 53, 48, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 52, 70, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 52, 69, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 52, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 52, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 52,
+ 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 52, 65, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 52, 57, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 52, 56, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 52, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 52, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 52,
+ 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 52, 52, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 52, 51, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 52, 50, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 52, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 52, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 51,
+ 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 51, 69, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 51, 68, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 51, 67, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 51, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 51, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 51,
+ 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 51, 56, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 51, 55, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 51, 54, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 51, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 51, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 51,
+ 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 51, 50, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 51, 49, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 51, 48, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 50, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 50, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 50,
+ 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 50, 67, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 50, 66, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 50, 65, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 50, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 50, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 50,
+ 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 50, 54, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 50, 53, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 50, 52, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 50, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 50, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 50,
+ 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 50, 48, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 49, 70, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 49, 69, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 49, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 49, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 49,
+ 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 49, 65, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 49, 57, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 49, 56, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 49, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 49, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 49,
+ 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 49, 52, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 49, 51, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 49, 50, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 49, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 49, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 48,
+ 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 48, 69, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 48, 68, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 48, 67, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 48, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 48, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 48,
+ 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 48, 56, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 48, 55, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 48, 54, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 65, 48, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 65, 48, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 48,
+ 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 48, 50, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 65, 48, 49, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 65, 48, 48, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 70, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 70, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 70,
+ 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 70, 67, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 70, 66, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 70, 65, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 70, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 70, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 70,
+ 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 70, 54, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 70, 53, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 70, 52, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 70, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 70, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 70,
+ 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 70, 48, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 69, 70, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 69, 69, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 69, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 69, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 69,
+ 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 69, 65, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 69, 57, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 69, 56, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 69, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 69, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 69,
+ 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 69, 52, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 69, 51, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 69, 50, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 69, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 69, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 68,
+ 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 68, 69, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 68, 68, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 68, 67, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 68, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 68, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 68,
+ 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 68, 56, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 68, 55, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 68, 54, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 68, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 68, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 68,
+ 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 68, 50, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 68, 49, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 68, 48, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 67, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 67, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 67,
+ 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 67, 67, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 67, 66, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 67, 65, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 67, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 67, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 67,
+ 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 67, 54, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 67, 53, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 67, 52, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 67, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 67, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 67,
+ 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 67, 48, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 66, 70, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 66, 69, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 66, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 66, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 66,
+ 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 66, 65, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 66, 57, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 66, 56, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 66, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 66, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 66,
+ 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 66, 52, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 66, 51, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 66, 50, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 66, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 66, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 65,
+ 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 65, 69, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 65, 68, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 65, 67, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 65, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 65, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 65,
+ 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 65, 56, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 65, 55, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 65, 54, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 65, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 65, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 65,
+ 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 65, 50, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 65, 49, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 65, 48, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 57, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 57, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 57,
+ 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 57, 67, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 57, 66, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 57, 65, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 57, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 57, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 57,
+ 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 57, 54, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 57, 53, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 57, 52, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 57, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 57, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 57,
+ 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 57, 48, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 56, 70, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 56, 69, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 56, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 56, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 56,
+ 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 56, 65, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 56, 57, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 56, 56, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 56, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 56, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 56,
+ 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 56, 52, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 56, 51, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 56, 50, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 56, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 56, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 55,
+ 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 55, 69, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 55, 68, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 55, 67, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 55, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 55, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 55,
+ 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 55, 56, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 55, 55, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 55, 54, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 55, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 55, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 55,
+ 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 55, 50, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 55, 49, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 55, 48, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 54, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 54, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 54,
+ 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 54, 67, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 54, 66, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 54, 65, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 54, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 54, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 54,
+ 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 54, 54, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 54, 53, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 54, 52, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 54, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 54, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 54,
+ 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 54, 48, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 53, 70, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 53, 69, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 53, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 53, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 53,
+ 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 53, 65, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 53, 57, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 53, 56, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 53, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 53, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 53,
+ 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 53, 52, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 53, 51, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 53, 50, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 53, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 53, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 52,
+ 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 52, 69, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 52, 68, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 52, 67, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 52, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 52, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 52,
+ 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 52, 56, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 52, 55, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 52, 54, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 52, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 52, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 52,
+ 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 52, 50, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 52, 49, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 52, 48, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 51, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 51, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 51,
+ 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 51, 67, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 51, 66, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 51, 65, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 51, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 51, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 51,
+ 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 51, 54, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 51, 53, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 51, 52, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 51, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 51, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 51,
+ 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 51, 48, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 50, 70, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 50, 69, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 50, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 50, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 50,
+ 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 50, 65, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 50, 57, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 50, 56, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 50, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 50, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 50,
+ 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 50, 52, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 50, 51, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 50, 50, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 50, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 50, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 49,
+ 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 49, 69, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 49, 68, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 49, 67, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 49, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 49, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 49,
+ 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 49, 56, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 49, 55, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 49, 54, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 49, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 49, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 49,
+ 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 49, 50, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 49, 49, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 49, 48, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 48, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 48, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 48,
+ 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 48, 67, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 48, 66, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 48, 65, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 48, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 48, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 48,
+ 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 48, 54, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 48, 53, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 70, 57, 48, 52, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 70, 57, 48, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 70, 57, 48, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 48,
+ 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 70, 57, 48, 48, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 57, 48, 52, 65, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 56, 68, 55, 48, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 56, 67, 65, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 56, 57, 69, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 55, 68, 52,
+ 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 55, 65, 55, 65, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 55, 57, 56, 49, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 55, 54, 68, 55, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 55, 53, 51, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 55, 53, 49, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 55, 49, 50,
+ 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 55, 48, 66, 57, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 54, 70, 49, 52, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 54, 69, 56, 48, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 54, 55, 50, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 54, 55, 48, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 54, 55, 48,
+ 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 54, 54, 50, 48, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 54, 53, 66, 48, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 54, 53, 57, 57, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 54, 53, 53, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 54, 51, 53, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 54, 51, 48,
+ 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 54, 50, 57, 53, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 54, 50, 53, 51, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 54, 50, 52, 66, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 53, 70, 56, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 53, 68, 69, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 53, 66, 56,
+ 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 53, 66, 53, 55, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 53, 57, 50, 57, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 53, 57, 49, 65, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 53, 56, 70, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 53, 53, 66, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 53, 52, 51,
+ 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 53, 52, 48, 56, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 53, 51, 70, 51, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 53, 51, 67, 67, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 53, 50, 68, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 53, 50, 55, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 53, 50, 52,
+ 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 53, 50, 49, 68, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 53, 49, 56, 68, 128, 73, 68, 69, 79,
+ 71, 82, 65, 80, 72, 45, 52, 69, 65, 52, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 52, 69, 56, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45,
+ 52, 69, 50, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 52, 69, 48,
+ 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 52, 69, 48, 48, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 65, 49, 68, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 65, 49, 67, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 65, 49, 66, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 65, 49, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 65, 49, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 65, 49, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 65,
+ 49, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 65, 49, 54,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 65, 49, 53, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 65, 49, 52, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 65, 49, 51, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 65, 49, 50, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 65, 49, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 65, 49, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 65, 48, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 65,
+ 48, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 65, 48, 68,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 65, 48, 67, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 65, 48, 66, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 65, 48, 65, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 65, 48, 57, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 65, 48, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 65, 48, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 65, 48, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 65,
+ 48, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 65, 48, 52,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 65, 48, 51, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 65, 48, 50, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 65, 48, 49, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 65, 48, 48, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 57, 70, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 57, 70, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 57, 70, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
+ 70, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 70, 66,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 70, 65, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 70, 57, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 70, 56, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 57, 70, 55, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 57, 70, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 57, 70, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 57, 70, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
+ 70, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 70, 50,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 70, 49, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 70, 48, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 69, 70, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 57, 69, 69, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 57, 69, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 57, 69, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 57, 69, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
+ 69, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 69, 57,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 69, 56, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 69, 55, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 69, 54, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 57, 69, 53, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 57, 69, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 57, 69, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 57, 69, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
+ 69, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 69, 48,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 68, 70, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 68, 69, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 68, 68, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 57, 68, 67, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 57, 68, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 57, 68, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 57, 68, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
+ 68, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 68, 55,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 68, 54, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 68, 53, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 68, 52, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 57, 68, 51, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 57, 68, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 57, 68, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 57, 68, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
+ 67, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 67, 69,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 67, 68, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 67, 67, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 67, 66, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 57, 67, 65, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 57, 67, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 57, 67, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 57, 67, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
+ 67, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 67, 53,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 67, 52, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 67, 51, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 67, 50, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 57, 67, 49, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 57, 67, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 57, 66, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 57, 66, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
+ 66, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 66, 67,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 66, 66, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 66, 65, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 66, 57, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 57, 66, 56, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 57, 66, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 57, 66, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 57, 66, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
+ 66, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 66, 51,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 66, 50, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 66, 49, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 66, 48, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 57, 65, 70, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 57, 65, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 57, 65, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 57, 65, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
+ 65, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 65, 65,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 65, 57, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 65, 56, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 65, 55, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 57, 65, 54, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 57, 65, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 57, 65, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 57, 65, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
+ 65, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 65, 49,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 65, 48, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 57, 70, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 57, 69, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 57, 57, 68, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 57, 57, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 57, 57, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 57, 57, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
+ 57, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 57, 56,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 57, 55, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 57, 54, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 57, 53, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 57, 57, 52, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 57, 57, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 57, 57, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 57, 57, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
+ 57, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 56, 70,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 56, 69, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 56, 68, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 56, 67, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 57, 56, 66, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 57, 56, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 57, 56, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 57, 56, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
+ 56, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 56, 54,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 56, 53, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 56, 52, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 56, 51, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 57, 56, 50, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 57, 56, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 57, 56, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 57, 55, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
+ 55, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 55, 68,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 55, 67, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 55, 66, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 55, 65, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 57, 55, 57, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 57, 55, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 57, 55, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 57, 55, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
+ 55, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 55, 52,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 55, 51, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 55, 50, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 55, 49, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 57, 55, 48, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 57, 54, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 57, 54, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 57, 54, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
+ 54, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 54, 66,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 54, 65, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 54, 57, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 54, 56, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 57, 54, 55, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 57, 54, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 57, 54, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 57, 54, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
+ 54, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 54, 50,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 54, 49, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 54, 48, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 53, 70, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 57, 53, 69, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 57, 53, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 57, 53, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 57, 53, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
+ 53, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 53, 57,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 53, 56, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 53, 55, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 53, 54, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 57, 53, 53, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 57, 53, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 57, 53, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 57, 53, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
+ 53, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 53, 48,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 52, 70, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 52, 69, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 52, 68, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 57, 52, 67, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 57, 52, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 57, 52, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 57, 52, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
+ 52, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 52, 55,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 52, 54, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 52, 53, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 52, 52, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 57, 52, 51, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 57, 52, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 57, 52, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 57, 52, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
+ 51, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 51, 69,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 51, 68, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 51, 67, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 51, 66, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 57, 51, 65, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 57, 51, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 57, 51, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 57, 51, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
+ 51, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 51, 53,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 51, 52, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 51, 51, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 51, 50, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 57, 51, 49, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 57, 51, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 57, 50, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 57, 50, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
+ 50, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 50, 67,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 50, 66, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 50, 65, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 50, 57, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 57, 50, 56, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 57, 50, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 57, 50, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 57, 50, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
+ 50, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 50, 51,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 50, 50, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 50, 49, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 50, 48, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 57, 49, 70, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 57, 49, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 57, 49, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 57, 49, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
+ 49, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 49, 65,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 49, 57, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 49, 56, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 49, 55, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 57, 49, 54, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 57, 49, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 57, 49, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 57, 49, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
+ 49, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 49, 49,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 49, 48, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 48, 70, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 48, 69, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 57, 48, 68, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 57, 48, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 57, 48, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 57, 48, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
+ 48, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 48, 56,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 48, 55, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 48, 54, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 57, 48, 53, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 57, 48, 52, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 57, 48, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 57, 48, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 57, 48, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 57,
+ 48, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 70, 70,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 70, 69, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 70, 68, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 70, 67, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 56, 70, 66, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 56, 70, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 56, 70, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 56, 70, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
+ 70, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 70, 54,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 70, 53, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 70, 52, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 70, 51, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 56, 70, 50, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 56, 70, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 56, 70, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 56, 69, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
+ 69, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 69, 68,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 69, 67, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 69, 66, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 69, 65, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 56, 69, 57, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 56, 69, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 56, 69, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 56, 69, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
+ 69, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 69, 52,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 69, 51, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 69, 50, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 69, 49, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 56, 69, 48, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 56, 68, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 56, 68, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 56, 68, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
+ 68, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 68, 66,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 68, 65, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 68, 57, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 68, 56, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 56, 68, 55, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 56, 68, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 56, 68, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 56, 68, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
+ 68, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 68, 50,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 68, 49, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 68, 48, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 67, 70, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 56, 67, 69, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 56, 67, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 56, 67, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 56, 67, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
+ 67, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 67, 57,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 67, 56, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 67, 55, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 67, 54, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 56, 67, 53, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 56, 67, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 56, 67, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 56, 67, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
+ 67, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 67, 48,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 66, 70, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 66, 69, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 66, 68, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 56, 66, 67, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 56, 66, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 56, 66, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 56, 66, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
+ 66, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 66, 55,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 66, 54, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 66, 53, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 66, 52, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 56, 66, 51, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 56, 66, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 56, 66, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 56, 66, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
+ 65, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 65, 69,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 65, 68, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 65, 67, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 65, 66, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 56, 65, 65, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 56, 65, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 56, 65, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 56, 65, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
+ 65, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 65, 53,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 65, 52, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 65, 51, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 65, 50, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 56, 65, 49, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 56, 65, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 56, 57, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 56, 57, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
+ 57, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 57, 67,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 57, 66, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 57, 65, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 57, 57, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 56, 57, 56, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 56, 57, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 56, 57, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 56, 57, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
+ 57, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 57, 51,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 57, 50, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 57, 49, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 57, 48, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 56, 56, 70, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 56, 56, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 56, 56, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 56, 56, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
+ 56, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 56, 65,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 56, 57, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 56, 56, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 56, 55, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 56, 56, 54, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 56, 56, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 56, 56, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 56, 56, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
+ 56, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 56, 49,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 56, 48, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 55, 70, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 55, 69, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 56, 55, 68, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 56, 55, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 56, 55, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 56, 55, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
+ 55, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 55, 56,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 55, 55, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 55, 54, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 55, 53, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 56, 55, 52, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 56, 55, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 56, 55, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 56, 55, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
+ 55, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 54, 70,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 54, 69, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 54, 68, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 54, 67, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 56, 54, 66, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 56, 54, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 56, 54, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 56, 54, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
+ 54, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 54, 54,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 54, 53, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 54, 52, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 54, 51, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 56, 54, 50, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 56, 54, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 56, 54, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 56, 53, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
+ 53, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 53, 68,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 53, 67, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 53, 66, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 53, 65, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 56, 53, 57, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 56, 53, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 56, 53, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 56, 53, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
+ 53, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 53, 52,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 53, 51, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 53, 50, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 53, 49, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 56, 53, 48, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 56, 52, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 56, 52, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 56, 52, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
+ 52, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 52, 66,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 52, 65, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 52, 57, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 52, 56, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 56, 52, 55, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 56, 52, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 56, 52, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 56, 52, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
+ 52, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 52, 50,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 52, 49, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 52, 48, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 51, 70, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 56, 51, 69, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 56, 51, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 56, 51, 67, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 56, 51, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
+ 51, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 51, 57,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 51, 56, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 51, 55, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 51, 54, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 56, 51, 53, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 56, 51, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 56, 51, 51, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 56, 51, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
+ 51, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 51, 48,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 50, 70, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 50, 69, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 50, 68, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 56, 50, 67, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 56, 50, 66, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 56, 50, 65, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 56, 50, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
+ 50, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 50, 55,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 50, 54, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 50, 53, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 50, 52, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 56, 50, 51, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 56, 50, 50, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 56, 50, 49, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 56, 50, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
+ 49, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 49, 69,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 49, 68, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 49, 67, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 49, 66, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 56, 49, 65, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 56, 49, 57, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 56, 49, 56, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 56, 49, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
+ 49, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 49, 53,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 49, 52, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 49, 51, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 49, 50, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 56, 49, 49, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 56, 49, 48, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 56, 48, 70, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 56, 48, 69, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
+ 48, 68, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 48, 67,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 48, 66, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 48, 65, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 48, 57, 128, 73, 68, 69, 79, 71,
+ 82, 65, 80, 72, 45, 50, 70, 56, 48, 56, 128, 73, 68, 69, 79, 71, 82, 65,
+ 80, 72, 45, 50, 70, 56, 48, 55, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72,
+ 45, 50, 70, 56, 48, 54, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50,
+ 70, 56, 48, 53, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56,
+ 48, 52, 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 48, 51,
+ 128, 73, 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 48, 50, 128, 73,
+ 68, 69, 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 48, 49, 128, 73, 68, 69,
+ 79, 71, 82, 65, 80, 72, 45, 50, 70, 56, 48, 48, 128, 73, 68, 69, 78, 84,
+ 73, 70, 73, 67, 65, 84, 73, 79, 78, 128, 73, 68, 69, 78, 84, 73, 67, 65,
+ 204, 73, 67, 79, 78, 128, 73, 67, 72, 79, 85, 128, 73, 67, 72, 79, 83,
+ 128, 73, 67, 72, 73, 77, 65, 84, 79, 83, 128, 73, 67, 72, 65, 68, 73, 78,
+ 128, 73, 67, 69, 76, 65, 78, 68, 73, 67, 45, 89, 82, 128, 73, 66, 73, 70,
+ 73, 76, 73, 128, 73, 65, 85, 68, 65, 128, 73, 48, 49, 53, 128, 73, 48,
+ 49, 52, 128, 73, 48, 49, 51, 128, 73, 48, 49, 50, 128, 73, 48, 49, 49,
+ 65, 128, 73, 48, 49, 49, 128, 73, 48, 49, 48, 65, 128, 73, 48, 49, 48,
+ 128, 73, 48, 48, 57, 65, 128, 73, 48, 48, 57, 128, 73, 48, 48, 56, 128,
+ 73, 48, 48, 55, 128, 73, 48, 48, 54, 128, 73, 48, 48, 53, 65, 128, 73,
+ 48, 48, 53, 128, 73, 48, 48, 52, 128, 73, 48, 48, 51, 128, 73, 48, 48,
+ 50, 128, 73, 48, 48, 49, 128, 73, 45, 89, 85, 128, 73, 45, 89, 79, 128,
+ 73, 45, 89, 69, 79, 128, 73, 45, 89, 69, 128, 73, 45, 89, 65, 69, 128,
+ 73, 45, 89, 65, 45, 79, 128, 73, 45, 89, 65, 128, 73, 45, 79, 45, 73,
+ 128, 73, 45, 79, 128, 73, 45, 69, 85, 128, 73, 45, 66, 69, 65, 77, 128,
+ 73, 45, 65, 82, 65, 69, 65, 128, 73, 45, 65, 128, 72, 90, 90, 90, 71,
+ 128, 72, 90, 90, 90, 128, 72, 90, 90, 80, 128, 72, 90, 90, 128, 72, 90,
+ 87, 71, 128, 72, 90, 87, 128, 72, 90, 84, 128, 72, 90, 71, 128, 72, 89,
+ 83, 84, 69, 82, 69, 83, 73, 211, 72, 89, 80, 79, 68, 73, 65, 83, 84, 79,
+ 76, 69, 128, 72, 89, 80, 72, 69, 78, 65, 84, 73, 79, 206, 72, 89, 80, 72,
+ 69, 78, 45, 77, 73, 78, 85, 83, 128, 72, 89, 80, 72, 69, 78, 128, 72, 89,
+ 80, 72, 69, 206, 72, 89, 71, 73, 69, 73, 65, 128, 72, 88, 87, 71, 128,
+ 72, 88, 85, 79, 88, 128, 72, 88, 85, 79, 84, 128, 72, 88, 85, 79, 80,
+ 128, 72, 88, 85, 79, 128, 72, 88, 79, 88, 128, 72, 88, 79, 84, 128, 72,
+ 88, 79, 80, 128, 72, 88, 79, 128, 72, 88, 73, 88, 128, 72, 88, 73, 84,
+ 128, 72, 88, 73, 80, 128, 72, 88, 73, 69, 88, 128, 72, 88, 73, 69, 84,
+ 128, 72, 88, 73, 69, 80, 128, 72, 88, 73, 69, 128, 72, 88, 73, 128, 72,
+ 88, 69, 88, 128, 72, 88, 69, 80, 128, 72, 88, 69, 128, 72, 88, 65, 88,
+ 128, 72, 88, 65, 84, 128, 72, 88, 65, 80, 128, 72, 88, 65, 128, 72, 87,
+ 85, 128, 72, 87, 65, 73, 82, 128, 72, 87, 65, 72, 128, 72, 86, 128, 72,
+ 85, 86, 65, 128, 72, 85, 83, 72, 69, 196, 72, 85, 83, 72, 128, 72, 85,
+ 82, 65, 78, 128, 72, 85, 79, 84, 128, 72, 85, 78, 68, 82, 69, 68, 83,
+ 128, 72, 85, 78, 68, 82, 69, 68, 128, 72, 85, 78, 68, 82, 69, 196, 72,
+ 85, 78, 128, 72, 85, 77, 208, 72, 85, 77, 65, 78, 128, 72, 85, 77, 65,
+ 206, 72, 85, 76, 50, 128, 72, 85, 73, 73, 84, 79, 128, 72, 85, 71, 71,
+ 73, 78, 199, 72, 85, 66, 50, 128, 72, 85, 66, 178, 72, 85, 66, 128, 72,
+ 85, 65, 82, 65, 68, 68, 79, 128, 72, 85, 65, 78, 128, 72, 84, 83, 128,
+ 72, 84, 74, 128, 72, 82, 89, 86, 78, 73, 193, 72, 80, 87, 71, 128, 72,
+ 80, 65, 128, 72, 80, 128, 72, 79, 85, 83, 197, 72, 79, 85, 82, 71, 76,
+ 65, 83, 83, 128, 72, 79, 85, 82, 71, 76, 65, 83, 211, 72, 79, 85, 82,
+ 128, 72, 79, 85, 210, 72, 79, 84, 69, 76, 128, 72, 79, 84, 65, 128, 72,
+ 79, 83, 80, 73, 84, 65, 76, 128, 72, 79, 82, 83, 69, 128, 72, 79, 82, 83,
+ 197, 72, 79, 82, 82, 128, 72, 79, 82, 78, 83, 128, 72, 79, 82, 73, 90,
+ 79, 78, 84, 65, 76, 76, 217, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45,
+ 48, 54, 45, 48, 54, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48,
+ 54, 45, 48, 53, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 54,
+ 45, 48, 52, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 54, 45,
+ 48, 51, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 54, 45, 48,
+ 50, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 54, 45, 48, 49,
+ 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 54, 45, 48, 48, 128,
+ 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 53, 45, 48, 54, 128, 72,
+ 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 53, 45, 48, 53, 128, 72, 79,
+ 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 53, 45, 48, 52, 128, 72, 79, 82,
+ 73, 90, 79, 78, 84, 65, 76, 45, 48, 53, 45, 48, 51, 128, 72, 79, 82, 73,
+ 90, 79, 78, 84, 65, 76, 45, 48, 53, 45, 48, 50, 128, 72, 79, 82, 73, 90,
+ 79, 78, 84, 65, 76, 45, 48, 53, 45, 48, 49, 128, 72, 79, 82, 73, 90, 79,
+ 78, 84, 65, 76, 45, 48, 53, 45, 48, 48, 128, 72, 79, 82, 73, 90, 79, 78,
+ 84, 65, 76, 45, 48, 52, 45, 48, 54, 128, 72, 79, 82, 73, 90, 79, 78, 84,
+ 65, 76, 45, 48, 52, 45, 48, 53, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65,
+ 76, 45, 48, 52, 45, 48, 52, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76,
+ 45, 48, 52, 45, 48, 51, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45,
+ 48, 52, 45, 48, 50, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48,
+ 52, 45, 48, 49, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 52,
+ 45, 48, 48, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 51, 45,
+ 48, 54, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 51, 45, 48,
+ 53, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 51, 45, 48, 52,
+ 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 51, 45, 48, 51, 128,
+ 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 51, 45, 48, 50, 128, 72,
+ 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 51, 45, 48, 49, 128, 72, 79,
+ 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 51, 45, 48, 48, 128, 72, 79, 82,
+ 73, 90, 79, 78, 84, 65, 76, 45, 48, 50, 45, 48, 54, 128, 72, 79, 82, 73,
+ 90, 79, 78, 84, 65, 76, 45, 48, 50, 45, 48, 53, 128, 72, 79, 82, 73, 90,
+ 79, 78, 84, 65, 76, 45, 48, 50, 45, 48, 52, 128, 72, 79, 82, 73, 90, 79,
+ 78, 84, 65, 76, 45, 48, 50, 45, 48, 51, 128, 72, 79, 82, 73, 90, 79, 78,
+ 84, 65, 76, 45, 48, 50, 45, 48, 50, 128, 72, 79, 82, 73, 90, 79, 78, 84,
+ 65, 76, 45, 48, 50, 45, 48, 49, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65,
+ 76, 45, 48, 50, 45, 48, 48, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76,
+ 45, 48, 49, 45, 48, 54, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45,
+ 48, 49, 45, 48, 53, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48,
+ 49, 45, 48, 52, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 49,
+ 45, 48, 51, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 49, 45,
+ 48, 50, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 49, 45, 48,
+ 49, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 49, 45, 48, 48,
+ 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 48, 45, 48, 54, 128,
+ 72, 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 48, 45, 48, 53, 128, 72,
+ 79, 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 48, 45, 48, 52, 128, 72, 79,
+ 82, 73, 90, 79, 78, 84, 65, 76, 45, 48, 48, 45, 48, 51, 128, 72, 79, 82,
+ 73, 90, 79, 78, 84, 65, 76, 45, 48, 48, 45, 48, 50, 128, 72, 79, 82, 73,
+ 90, 79, 78, 84, 65, 76, 45, 48, 48, 45, 48, 49, 128, 72, 79, 82, 73, 90,
+ 79, 78, 84, 65, 76, 45, 48, 48, 45, 48, 48, 128, 72, 79, 82, 73, 90, 79,
+ 78, 84, 65, 76, 128, 72, 79, 82, 73, 90, 79, 78, 84, 65, 204, 72, 79, 82,
+ 73, 128, 72, 79, 82, 193, 72, 79, 79, 85, 128, 72, 79, 79, 82, 85, 128,
+ 72, 79, 79, 80, 128, 72, 79, 79, 78, 128, 72, 79, 79, 75, 69, 68, 128,
72, 79, 79, 75, 69, 196, 72, 79, 78, 69, 89, 66, 69, 69, 128, 72, 79, 78,
69, 217, 72, 79, 77, 79, 84, 72, 69, 84, 73, 67, 128, 72, 79, 77, 79, 84,
- 72, 69, 84, 73, 195, 72, 79, 76, 69, 128, 72, 79, 76, 68, 73, 78, 199,
- 72, 79, 76, 65, 77, 128, 72, 79, 76, 65, 205, 72, 79, 75, 65, 128, 72,
- 79, 73, 128, 72, 79, 67, 72, 79, 128, 72, 78, 85, 84, 128, 72, 78, 85,
- 79, 88, 128, 72, 78, 85, 79, 128, 72, 78, 79, 88, 128, 72, 78, 79, 84,
- 128, 72, 78, 79, 80, 128, 72, 78, 73, 88, 128, 72, 78, 73, 84, 128, 72,
- 78, 73, 80, 128, 72, 78, 73, 69, 88, 128, 72, 78, 73, 69, 84, 128, 72,
- 78, 73, 69, 80, 128, 72, 78, 73, 69, 128, 72, 78, 73, 128, 72, 78, 69,
- 88, 128, 72, 78, 69, 80, 128, 72, 78, 69, 128, 72, 78, 65, 88, 128, 72,
- 78, 65, 84, 128, 72, 78, 65, 80, 128, 72, 78, 65, 128, 72, 77, 89, 88,
- 128, 72, 77, 89, 82, 88, 128, 72, 77, 89, 82, 128, 72, 77, 89, 80, 128,
- 72, 77, 89, 128, 72, 77, 85, 88, 128, 72, 77, 85, 84, 128, 72, 77, 85,
- 82, 88, 128, 72, 77, 85, 82, 128, 72, 77, 85, 80, 128, 72, 77, 85, 79,
- 88, 128, 72, 77, 85, 79, 80, 128, 72, 77, 85, 79, 128, 72, 77, 85, 128,
- 72, 77, 79, 88, 128, 72, 77, 79, 84, 128, 72, 77, 79, 80, 128, 72, 77,
- 79, 128, 72, 77, 73, 88, 128, 72, 77, 73, 84, 128, 72, 77, 73, 80, 128,
- 72, 77, 73, 69, 88, 128, 72, 77, 73, 69, 80, 128, 72, 77, 73, 69, 128,
- 72, 77, 73, 128, 72, 77, 69, 128, 72, 77, 65, 88, 128, 72, 77, 65, 84,
- 128, 72, 77, 65, 80, 128, 72, 77, 65, 128, 72, 76, 89, 88, 128, 72, 76,
- 89, 84, 128, 72, 76, 89, 82, 88, 128, 72, 76, 89, 82, 128, 72, 76, 89,
- 80, 128, 72, 76, 89, 128, 72, 76, 85, 88, 128, 72, 76, 85, 84, 128, 72,
- 76, 85, 82, 88, 128, 72, 76, 85, 82, 128, 72, 76, 85, 80, 128, 72, 76,
- 85, 79, 88, 128, 72, 76, 85, 79, 80, 128, 72, 76, 85, 79, 128, 72, 76,
- 85, 128, 72, 76, 79, 88, 128, 72, 76, 79, 80, 128, 72, 76, 79, 128, 72,
- 76, 73, 88, 128, 72, 76, 73, 84, 128, 72, 76, 73, 80, 128, 72, 76, 73,
- 69, 88, 128, 72, 76, 73, 69, 80, 128, 72, 76, 73, 69, 128, 72, 76, 73,
- 128, 72, 76, 69, 88, 128, 72, 76, 69, 80, 128, 72, 76, 69, 128, 72, 76,
- 65, 88, 128, 72, 76, 65, 84, 128, 72, 76, 65, 80, 128, 72, 76, 65, 128,
- 72, 75, 128, 72, 73, 90, 66, 128, 72, 73, 83, 84, 79, 82, 73, 195, 72,
- 73, 82, 73, 81, 128, 72, 73, 71, 72, 45, 83, 80, 69, 69, 196, 72, 73, 71,
- 72, 45, 82, 69, 86, 69, 82, 83, 69, 68, 45, 185, 72, 73, 71, 72, 45, 72,
- 69, 69, 76, 69, 196, 72, 73, 69, 88, 128, 72, 73, 69, 85, 72, 45, 83, 73,
- 79, 83, 128, 72, 73, 69, 85, 72, 45, 82, 73, 69, 85, 76, 128, 72, 73, 69,
- 85, 72, 45, 80, 73, 69, 85, 80, 128, 72, 73, 69, 85, 72, 45, 78, 73, 69,
- 85, 78, 128, 72, 73, 69, 85, 72, 45, 77, 73, 69, 85, 77, 128, 72, 73, 69,
- 85, 200, 72, 73, 69, 82, 79, 71, 76, 89, 80, 72, 73, 195, 72, 73, 69,
+ 72, 69, 84, 73, 195, 72, 79, 76, 79, 128, 72, 79, 76, 76, 79, 215, 72,
+ 79, 76, 69, 128, 72, 79, 76, 68, 73, 78, 199, 72, 79, 76, 65, 77, 128,
+ 72, 79, 76, 65, 205, 72, 79, 75, 65, 128, 72, 79, 67, 75, 69, 217, 72,
+ 79, 67, 72, 79, 128, 72, 78, 85, 84, 128, 72, 78, 85, 79, 88, 128, 72,
+ 78, 85, 79, 128, 72, 78, 85, 66, 128, 72, 78, 79, 88, 128, 72, 78, 79,
+ 84, 128, 72, 78, 79, 80, 128, 72, 78, 73, 88, 128, 72, 78, 73, 84, 128,
+ 72, 78, 73, 80, 128, 72, 78, 73, 69, 88, 128, 72, 78, 73, 69, 84, 128,
+ 72, 78, 73, 69, 80, 128, 72, 78, 73, 69, 128, 72, 78, 73, 128, 72, 78,
+ 69, 88, 128, 72, 78, 69, 80, 128, 72, 78, 69, 128, 72, 78, 65, 88, 128,
+ 72, 78, 65, 85, 128, 72, 78, 65, 84, 128, 72, 78, 65, 80, 128, 72, 78,
+ 65, 128, 72, 77, 89, 88, 128, 72, 77, 89, 82, 88, 128, 72, 77, 89, 82,
+ 128, 72, 77, 89, 80, 128, 72, 77, 89, 128, 72, 77, 85, 88, 128, 72, 77,
+ 85, 84, 128, 72, 77, 85, 82, 88, 128, 72, 77, 85, 82, 128, 72, 77, 85,
+ 80, 128, 72, 77, 85, 79, 88, 128, 72, 77, 85, 79, 80, 128, 72, 77, 85,
+ 79, 128, 72, 77, 85, 128, 72, 77, 79, 88, 128, 72, 77, 79, 84, 128, 72,
+ 77, 79, 80, 128, 72, 77, 79, 128, 72, 77, 73, 88, 128, 72, 77, 73, 84,
+ 128, 72, 77, 73, 80, 128, 72, 77, 73, 69, 88, 128, 72, 77, 73, 69, 80,
+ 128, 72, 77, 73, 69, 128, 72, 77, 73, 128, 72, 77, 69, 128, 72, 77, 65,
+ 88, 128, 72, 77, 65, 84, 128, 72, 77, 65, 80, 128, 72, 77, 65, 128, 72,
+ 76, 89, 88, 128, 72, 76, 89, 84, 128, 72, 76, 89, 82, 88, 128, 72, 76,
+ 89, 82, 128, 72, 76, 89, 80, 128, 72, 76, 89, 128, 72, 76, 85, 88, 128,
+ 72, 76, 85, 84, 128, 72, 76, 85, 82, 88, 128, 72, 76, 85, 82, 128, 72,
+ 76, 85, 80, 128, 72, 76, 85, 79, 88, 128, 72, 76, 85, 79, 80, 128, 72,
+ 76, 85, 79, 128, 72, 76, 85, 128, 72, 76, 79, 88, 128, 72, 76, 79, 80,
+ 128, 72, 76, 79, 128, 72, 76, 73, 88, 128, 72, 76, 73, 84, 128, 72, 76,
+ 73, 80, 128, 72, 76, 73, 69, 88, 128, 72, 76, 73, 69, 80, 128, 72, 76,
+ 73, 69, 128, 72, 76, 73, 128, 72, 76, 69, 88, 128, 72, 76, 69, 80, 128,
+ 72, 76, 69, 128, 72, 76, 65, 88, 128, 72, 76, 65, 85, 128, 72, 76, 65,
+ 84, 128, 72, 76, 65, 80, 128, 72, 76, 65, 128, 72, 76, 128, 72, 75, 128,
+ 72, 73, 90, 66, 128, 72, 73, 89, 79, 128, 72, 73, 84, 84, 73, 78, 199,
+ 72, 73, 83, 84, 79, 82, 73, 195, 72, 73, 82, 73, 81, 128, 72, 73, 78, 71,
+ 69, 68, 128, 72, 73, 78, 71, 69, 196, 72, 73, 78, 71, 69, 128, 72, 73,
+ 71, 72, 45, 83, 80, 69, 69, 196, 72, 73, 71, 72, 45, 82, 69, 86, 69, 82,
+ 83, 69, 68, 45, 185, 72, 73, 71, 72, 45, 76, 79, 215, 72, 73, 71, 72, 45,
+ 72, 69, 69, 76, 69, 196, 72, 73, 69, 88, 128, 72, 73, 69, 85, 72, 45, 83,
+ 73, 79, 83, 128, 72, 73, 69, 85, 72, 45, 82, 73, 69, 85, 76, 128, 72, 73,
+ 69, 85, 72, 45, 80, 73, 69, 85, 80, 128, 72, 73, 69, 85, 72, 45, 78, 73,
+ 69, 85, 78, 128, 72, 73, 69, 85, 72, 45, 77, 73, 69, 85, 77, 128, 72, 73,
+ 69, 85, 200, 72, 73, 69, 82, 79, 71, 76, 89, 80, 72, 73, 195, 72, 73, 69,
128, 72, 73, 68, 73, 78, 199, 72, 73, 68, 69, 84, 128, 72, 73, 68, 69,
128, 72, 73, 66, 73, 83, 67, 85, 83, 128, 72, 72, 87, 65, 128, 72, 72,
85, 128, 72, 72, 73, 128, 72, 72, 69, 69, 128, 72, 72, 69, 128, 72, 72,
- 65, 65, 128, 72, 71, 128, 72, 69, 88, 73, 70, 79, 82, 205, 72, 69, 88,
- 65, 71, 82, 65, 205, 72, 69, 88, 65, 71, 79, 78, 128, 72, 69, 82, 85, 84,
- 85, 128, 72, 69, 82, 85, 128, 72, 69, 82, 77, 73, 84, 73, 65, 206, 72,
- 69, 82, 77, 73, 79, 78, 73, 65, 206, 72, 69, 82, 77, 69, 83, 128, 72, 69,
- 82, 69, 128, 72, 69, 82, 66, 128, 72, 69, 82, 65, 69, 85, 205, 72, 69,
- 78, 71, 128, 72, 69, 78, 199, 72, 69, 77, 80, 128, 72, 69, 76, 77, 69,
- 84, 128, 72, 69, 76, 77, 69, 212, 72, 69, 76, 205, 72, 69, 76, 73, 67,
- 79, 80, 84, 69, 82, 128, 72, 69, 75, 85, 84, 65, 65, 82, 85, 128, 72, 69,
- 73, 83, 69, 73, 128, 72, 69, 65, 86, 89, 128, 72, 69, 65, 86, 69, 78, 76,
- 217, 72, 69, 65, 86, 69, 78, 128, 72, 69, 65, 86, 69, 206, 72, 69, 65,
- 82, 84, 83, 128, 72, 69, 65, 82, 84, 45, 83, 72, 65, 80, 69, 196, 72, 69,
- 65, 82, 84, 128, 72, 69, 65, 82, 212, 72, 69, 65, 82, 45, 78, 79, 45, 69,
- 86, 73, 204, 72, 69, 65, 68, 83, 84, 82, 79, 75, 69, 128, 72, 69, 65, 68,
- 83, 84, 79, 78, 197, 72, 69, 65, 68, 80, 72, 79, 78, 69, 128, 72, 69, 65,
- 68, 73, 78, 71, 128, 72, 66, 65, 83, 65, 45, 69, 83, 65, 83, 193, 72, 66,
- 65, 83, 193, 72, 65, 89, 65, 78, 78, 65, 128, 72, 65, 86, 69, 128, 72,
- 65, 85, 80, 84, 83, 84, 73, 77, 77, 69, 128, 72, 65, 84, 72, 73, 128, 72,
- 65, 84, 69, 128, 72, 65, 84, 67, 72, 73, 78, 199, 72, 65, 84, 65, 198,
- 72, 65, 83, 69, 210, 72, 65, 83, 65, 78, 84, 65, 128, 72, 65, 82, 80, 79,
- 79, 78, 128, 72, 65, 82, 80, 79, 79, 206, 72, 65, 82, 77, 79, 78, 73, 67,
- 128, 72, 65, 82, 75, 76, 69, 65, 206, 72, 65, 82, 68, 78, 69, 83, 83,
- 128, 72, 65, 82, 196, 72, 65, 80, 80, 217, 72, 65, 78, 85, 78, 79, 207,
- 72, 65, 78, 71, 90, 72, 79, 213, 72, 65, 78, 68, 83, 128, 72, 65, 78, 68,
- 211, 72, 65, 78, 68, 76, 69, 83, 128, 72, 65, 78, 68, 76, 69, 128, 72,
- 65, 78, 68, 66, 65, 71, 128, 72, 65, 78, 68, 128, 72, 65, 78, 45, 65, 75,
- 65, 84, 128, 72, 65, 77, 90, 65, 128, 72, 65, 77, 83, 84, 69, 210, 72,
- 65, 77, 77, 69, 82, 128, 72, 65, 77, 77, 69, 210, 72, 65, 77, 66, 85, 82,
- 71, 69, 82, 128, 72, 65, 76, 81, 65, 128, 72, 65, 76, 79, 128, 72, 65,
- 76, 70, 45, 67, 73, 82, 67, 76, 197, 72, 65, 76, 70, 128, 72, 65, 76, 66,
- 69, 82, 68, 128, 72, 65, 76, 65, 78, 84, 65, 128, 72, 65, 73, 84, 85,
- 128, 72, 65, 73, 82, 67, 85, 84, 128, 72, 65, 73, 82, 128, 72, 65, 71,
- 76, 65, 218, 72, 65, 71, 76, 128, 72, 65, 70, 85, 75, 72, 65, 128, 72,
- 65, 70, 85, 75, 72, 128, 72, 65, 69, 71, 204, 72, 65, 65, 82, 85, 128,
- 72, 65, 65, 77, 128, 72, 65, 193, 72, 65, 45, 72, 65, 128, 72, 48, 48,
- 56, 128, 72, 48, 48, 55, 128, 72, 48, 48, 54, 65, 128, 72, 48, 48, 54,
- 128, 72, 48, 48, 53, 128, 72, 48, 48, 52, 128, 72, 48, 48, 51, 128, 72,
- 48, 48, 50, 128, 72, 48, 48, 49, 128, 72, 45, 84, 89, 80, 197, 71, 89,
- 85, 128, 71, 89, 79, 78, 128, 71, 89, 79, 128, 71, 89, 73, 128, 71, 89,
- 70, 213, 71, 89, 69, 69, 128, 71, 89, 65, 83, 128, 71, 89, 65, 65, 128,
- 71, 89, 65, 128, 71, 89, 128, 71, 87, 85, 128, 71, 87, 73, 128, 71, 87,
- 69, 69, 128, 71, 87, 69, 128, 71, 87, 65, 65, 128, 71, 87, 65, 128, 71,
- 86, 128, 71, 85, 82, 85, 83, 72, 128, 71, 85, 82, 85, 78, 128, 71, 85,
- 82, 65, 77, 85, 84, 79, 78, 128, 71, 85, 82, 55, 128, 71, 85, 78, 85,
- 128, 71, 85, 78, 213, 71, 85, 205, 71, 85, 76, 128, 71, 85, 73, 84, 65,
- 82, 128, 71, 85, 199, 71, 85, 69, 72, 128, 71, 85, 69, 200, 71, 85, 68,
- 128, 71, 85, 196, 71, 85, 65, 82, 68, 83, 77, 65, 78, 128, 71, 85, 65,
- 82, 68, 69, 68, 78, 69, 83, 83, 128, 71, 85, 65, 82, 68, 69, 196, 71, 85,
- 65, 82, 68, 128, 71, 85, 65, 82, 65, 78, 201, 71, 85, 193, 71, 85, 178,
- 71, 84, 69, 210, 71, 83, 85, 77, 128, 71, 83, 85, 205, 71, 82, 213, 71,
- 82, 79, 87, 73, 78, 199, 71, 82, 79, 85, 78, 68, 128, 71, 82, 79, 78, 84,
- 72, 73, 83, 77, 65, 84, 65, 128, 71, 82, 73, 78, 78, 73, 78, 199, 71, 82,
- 73, 77, 65, 67, 73, 78, 199, 71, 82, 69, 71, 79, 82, 73, 65, 206, 71, 82,
- 69, 69, 206, 71, 82, 69, 65, 84, 78, 69, 83, 83, 128, 71, 82, 69, 65, 84,
- 69, 82, 45, 84, 72, 65, 78, 128, 71, 82, 69, 65, 84, 69, 82, 45, 84, 72,
- 65, 206, 71, 82, 69, 65, 84, 69, 210, 71, 82, 69, 65, 212, 71, 82, 65,
- 86, 69, 89, 65, 82, 196, 71, 82, 65, 86, 69, 45, 77, 65, 67, 82, 79, 78,
- 128, 71, 82, 65, 86, 69, 45, 65, 67, 85, 84, 69, 45, 71, 82, 65, 86, 69,
- 128, 71, 82, 65, 86, 197, 71, 82, 65, 84, 69, 82, 128, 71, 82, 65, 83,
- 83, 128, 71, 82, 65, 83, 211, 71, 82, 65, 80, 72, 69, 77, 197, 71, 82,
- 65, 80, 69, 83, 128, 71, 82, 65, 77, 77, 193, 71, 82, 65, 73, 78, 128,
- 71, 82, 65, 68, 85, 65, 84, 73, 79, 206, 71, 82, 65, 67, 69, 128, 71, 82,
- 65, 67, 197, 71, 80, 65, 128, 71, 79, 82, 84, 72, 77, 73, 75, 79, 206,
- 71, 79, 82, 84, 128, 71, 79, 82, 71, 79, 84, 69, 82, 73, 128, 71, 79, 82,
- 71, 79, 83, 89, 78, 84, 72, 69, 84, 79, 78, 128, 71, 79, 82, 71, 79, 206,
- 71, 79, 82, 71, 73, 128, 71, 79, 82, 65, 128, 71, 79, 79, 196, 71, 79,
- 78, 71, 128, 71, 79, 76, 68, 128, 71, 79, 75, 128, 71, 79, 73, 78, 199,
- 71, 79, 66, 76, 73, 78, 128, 71, 79, 65, 76, 128, 71, 79, 65, 204, 71,
- 79, 65, 128, 71, 78, 89, 73, 83, 128, 71, 78, 65, 86, 73, 89, 65, 78, 73,
- 128, 71, 76, 79, 87, 73, 78, 199, 71, 76, 79, 84, 84, 65, 204, 71, 76,
- 79, 66, 197, 71, 76, 73, 83, 83, 65, 78, 68, 207, 71, 76, 69, 73, 67,
- 200, 71, 76, 65, 71, 79, 76, 73, 128, 71, 76, 65, 128, 71, 74, 69, 128,
- 71, 73, 88, 128, 71, 73, 84, 128, 71, 73, 83, 72, 128, 71, 73, 83, 200,
- 71, 73, 83, 65, 76, 128, 71, 73, 82, 85, 68, 65, 65, 128, 71, 73, 82, 76,
- 128, 71, 73, 82, 51, 128, 71, 73, 82, 179, 71, 73, 82, 50, 128, 71, 73,
- 82, 178, 71, 73, 80, 128, 71, 73, 78, 73, 73, 128, 71, 73, 77, 69, 76,
- 128, 71, 73, 77, 69, 204, 71, 73, 77, 128, 71, 73, 71, 65, 128, 71, 73,
- 69, 84, 128, 71, 73, 68, 73, 77, 128, 71, 73, 66, 66, 79, 85, 211, 71,
- 73, 66, 65, 128, 71, 73, 52, 128, 71, 73, 180, 71, 72, 90, 128, 71, 72,
- 87, 65, 128, 71, 72, 85, 78, 78, 65, 128, 71, 72, 85, 78, 78, 193, 71,
- 72, 85, 128, 71, 72, 79, 85, 128, 71, 72, 79, 83, 84, 128, 71, 72, 79,
- 128, 71, 72, 73, 128, 71, 72, 72, 65, 128, 71, 72, 69, 85, 88, 128, 71,
- 72, 69, 85, 78, 128, 71, 72, 69, 85, 71, 72, 69, 85, 65, 69, 77, 128, 71,
- 72, 69, 85, 71, 72, 69, 78, 128, 71, 72, 69, 85, 65, 69, 82, 65, 69, 128,
- 71, 72, 69, 85, 65, 69, 71, 72, 69, 85, 65, 69, 128, 71, 72, 69, 84, 128,
- 71, 72, 69, 69, 128, 71, 72, 69, 128, 71, 72, 197, 71, 72, 65, 89, 78,
- 128, 71, 72, 65, 82, 65, 69, 128, 71, 72, 65, 80, 128, 71, 72, 65, 78,
- 128, 71, 72, 65, 77, 65, 76, 128, 71, 72, 65, 73, 78, 85, 128, 71, 72,
- 65, 73, 78, 128, 71, 72, 65, 73, 206, 71, 72, 65, 68, 128, 71, 72, 65,
- 65, 77, 65, 69, 128, 71, 72, 65, 65, 128, 71, 71, 87, 73, 128, 71, 71,
- 87, 69, 69, 128, 71, 71, 87, 69, 128, 71, 71, 87, 65, 65, 128, 71, 71,
- 87, 65, 128, 71, 71, 85, 88, 128, 71, 71, 85, 84, 128, 71, 71, 85, 82,
- 88, 128, 71, 71, 85, 82, 128, 71, 71, 85, 79, 88, 128, 71, 71, 85, 79,
- 84, 128, 71, 71, 85, 79, 80, 128, 71, 71, 85, 79, 128, 71, 71, 79, 88,
- 128, 71, 71, 79, 84, 128, 71, 71, 79, 80, 128, 71, 71, 73, 88, 128, 71,
- 71, 73, 84, 128, 71, 71, 73, 69, 88, 128, 71, 71, 73, 69, 80, 128, 71,
- 71, 73, 69, 128, 71, 71, 69, 88, 128, 71, 71, 69, 84, 128, 71, 71, 69,
- 80, 128, 71, 71, 65, 88, 128, 71, 71, 65, 84, 128, 71, 71, 65, 65, 128,
- 71, 69, 84, 193, 71, 69, 83, 84, 85, 82, 69, 128, 71, 69, 83, 72, 85,
- 128, 71, 69, 83, 72, 84, 73, 78, 128, 71, 69, 83, 72, 84, 73, 206, 71,
- 69, 83, 72, 50, 128, 71, 69, 82, 83, 72, 65, 89, 73, 77, 128, 71, 69, 82,
- 77, 65, 206, 71, 69, 82, 69, 83, 72, 128, 71, 69, 82, 69, 83, 200, 71,
- 69, 79, 77, 69, 84, 82, 73, 67, 65, 76, 76, 217, 71, 69, 79, 77, 69, 84,
- 82, 73, 195, 71, 69, 78, 84, 76, 197, 71, 69, 78, 73, 84, 73, 86, 69,
- 128, 71, 69, 78, 73, 75, 201, 71, 69, 78, 69, 82, 73, 195, 71, 69, 77,
- 73, 78, 73, 128, 71, 69, 77, 73, 78, 65, 84, 73, 79, 206, 71, 69, 205,
+ 65, 65, 128, 72, 71, 128, 72, 69, 89, 84, 128, 72, 69, 88, 73, 70, 79,
+ 82, 205, 72, 69, 88, 65, 71, 82, 65, 205, 72, 69, 88, 65, 71, 79, 78,
+ 128, 72, 69, 82, 85, 84, 85, 128, 72, 69, 82, 85, 128, 72, 69, 82, 77,
+ 73, 84, 73, 65, 206, 72, 69, 82, 77, 73, 79, 78, 73, 65, 206, 72, 69, 82,
+ 77, 69, 83, 128, 72, 69, 82, 69, 128, 72, 69, 82, 66, 128, 72, 69, 82,
+ 65, 69, 85, 205, 72, 69, 78, 71, 128, 72, 69, 78, 199, 72, 69, 77, 80,
+ 128, 72, 69, 76, 77, 69, 84, 128, 72, 69, 76, 77, 69, 212, 72, 69, 76,
+ 205, 72, 69, 76, 73, 67, 79, 80, 84, 69, 82, 128, 72, 69, 75, 85, 84, 65,
+ 65, 82, 85, 128, 72, 69, 73, 83, 69, 73, 128, 72, 69, 73, 71, 72, 84,
+ 128, 72, 69, 69, 73, 128, 72, 69, 65, 86, 89, 128, 72, 69, 65, 86, 69,
+ 78, 76, 217, 72, 69, 65, 86, 69, 78, 128, 72, 69, 65, 86, 69, 206, 72,
+ 69, 65, 82, 84, 83, 128, 72, 69, 65, 82, 84, 45, 83, 72, 65, 80, 69, 196,
+ 72, 69, 65, 82, 84, 128, 72, 69, 65, 82, 212, 72, 69, 65, 82, 45, 78, 79,
+ 45, 69, 86, 73, 204, 72, 69, 65, 68, 83, 84, 82, 79, 75, 69, 128, 72, 69,
+ 65, 68, 83, 84, 79, 78, 197, 72, 69, 65, 68, 80, 72, 79, 78, 69, 128, 72,
+ 69, 65, 68, 73, 78, 71, 128, 72, 69, 65, 68, 45, 66, 65, 78, 68, 65, 71,
+ 69, 128, 72, 66, 65, 83, 65, 45, 69, 83, 65, 83, 193, 72, 66, 65, 83,
+ 193, 72, 65, 89, 65, 78, 78, 65, 128, 72, 65, 87, 74, 128, 72, 65, 86,
+ 69, 128, 72, 65, 85, 80, 84, 83, 84, 73, 77, 77, 69, 128, 72, 65, 213,
+ 72, 65, 84, 82, 65, 206, 72, 65, 84, 72, 73, 128, 72, 65, 84, 69, 128,
+ 72, 65, 84, 67, 72, 73, 78, 199, 72, 65, 84, 65, 198, 72, 65, 83, 69,
+ 210, 72, 65, 83, 65, 78, 84, 65, 128, 72, 65, 82, 80, 79, 79, 78, 128,
+ 72, 65, 82, 80, 79, 79, 206, 72, 65, 82, 77, 79, 78, 73, 67, 128, 72, 65,
+ 82, 75, 76, 69, 65, 206, 72, 65, 82, 68, 78, 69, 83, 83, 128, 72, 65, 82,
+ 196, 72, 65, 80, 80, 217, 72, 65, 78, 85, 78, 79, 207, 72, 65, 78, 71,
+ 90, 72, 79, 213, 72, 65, 78, 68, 83, 128, 72, 65, 78, 68, 211, 72, 65,
+ 78, 68, 76, 69, 83, 128, 72, 65, 78, 68, 76, 69, 128, 72, 65, 78, 68, 66,
+ 65, 71, 128, 72, 65, 78, 68, 45, 79, 86, 65, 76, 128, 72, 65, 78, 68, 45,
+ 79, 86, 65, 204, 72, 65, 78, 68, 45, 72, 79, 79, 75, 128, 72, 65, 78, 68,
+ 45, 72, 79, 79, 203, 72, 65, 78, 68, 45, 72, 73, 78, 71, 69, 128, 72, 65,
+ 78, 68, 45, 72, 73, 78, 71, 197, 72, 65, 78, 68, 45, 70, 76, 65, 84, 128,
+ 72, 65, 78, 68, 45, 70, 76, 65, 212, 72, 65, 78, 68, 45, 70, 73, 83, 84,
+ 128, 72, 65, 78, 68, 45, 67, 85, 82, 76, 73, 67, 85, 69, 128, 72, 65, 78,
+ 68, 45, 67, 85, 82, 76, 73, 67, 85, 197, 72, 65, 78, 68, 45, 67, 85, 80,
+ 128, 72, 65, 78, 68, 45, 67, 85, 208, 72, 65, 78, 68, 45, 67, 76, 65, 87,
+ 128, 72, 65, 78, 68, 45, 67, 76, 65, 215, 72, 65, 78, 68, 45, 67, 73, 82,
+ 67, 76, 69, 128, 72, 65, 78, 68, 45, 67, 73, 82, 67, 76, 197, 72, 65, 78,
+ 68, 45, 65, 78, 71, 76, 69, 128, 72, 65, 78, 68, 45, 65, 78, 71, 76, 197,
+ 72, 65, 78, 68, 128, 72, 65, 78, 45, 65, 75, 65, 84, 128, 72, 65, 77, 90,
+ 65, 128, 72, 65, 77, 90, 193, 72, 65, 77, 83, 84, 69, 210, 72, 65, 77,
+ 77, 69, 82, 128, 72, 65, 77, 77, 69, 210, 72, 65, 77, 66, 85, 82, 71, 69,
+ 82, 128, 72, 65, 76, 81, 65, 128, 72, 65, 76, 79, 128, 72, 65, 76, 70,
+ 45, 67, 73, 82, 67, 76, 197, 72, 65, 76, 70, 128, 72, 65, 76, 66, 69, 82,
+ 68, 128, 72, 65, 76, 65, 78, 84, 65, 128, 72, 65, 73, 84, 85, 128, 72,
+ 65, 73, 211, 72, 65, 73, 82, 67, 85, 84, 128, 72, 65, 73, 82, 128, 72,
+ 65, 71, 76, 65, 218, 72, 65, 71, 76, 128, 72, 65, 70, 85, 75, 72, 65,
+ 128, 72, 65, 70, 85, 75, 72, 128, 72, 65, 69, 71, 204, 72, 65, 65, 82,
+ 85, 128, 72, 65, 65, 77, 128, 72, 65, 193, 72, 65, 45, 72, 65, 128, 72,
+ 48, 48, 56, 128, 72, 48, 48, 55, 128, 72, 48, 48, 54, 65, 128, 72, 48,
+ 48, 54, 128, 72, 48, 48, 53, 128, 72, 48, 48, 52, 128, 72, 48, 48, 51,
+ 128, 72, 48, 48, 50, 128, 72, 48, 48, 49, 128, 72, 45, 84, 89, 80, 197,
+ 71, 89, 85, 128, 71, 89, 79, 78, 128, 71, 89, 79, 128, 71, 89, 73, 128,
+ 71, 89, 70, 213, 71, 89, 69, 69, 128, 71, 89, 65, 83, 128, 71, 89, 65,
+ 65, 128, 71, 89, 65, 128, 71, 89, 128, 71, 87, 85, 128, 71, 87, 73, 128,
+ 71, 87, 69, 69, 128, 71, 87, 69, 128, 71, 87, 65, 65, 128, 71, 87, 65,
+ 128, 71, 86, 65, 78, 71, 128, 71, 86, 128, 71, 85, 82, 85, 83, 72, 128,
+ 71, 85, 82, 85, 78, 128, 71, 85, 82, 77, 85, 75, 72, 201, 71, 85, 82, 65,
+ 77, 85, 84, 79, 78, 128, 71, 85, 82, 55, 128, 71, 85, 78, 85, 128, 71,
+ 85, 78, 213, 71, 85, 205, 71, 85, 76, 128, 71, 85, 74, 65, 82, 65, 84,
+ 201, 71, 85, 73, 84, 65, 82, 128, 71, 85, 199, 71, 85, 69, 73, 128, 71,
+ 85, 69, 72, 128, 71, 85, 69, 200, 71, 85, 68, 128, 71, 85, 196, 71, 85,
+ 65, 82, 68, 83, 77, 65, 78, 128, 71, 85, 65, 82, 68, 69, 68, 78, 69, 83,
+ 83, 128, 71, 85, 65, 82, 68, 69, 196, 71, 85, 65, 82, 68, 128, 71, 85,
+ 65, 82, 65, 78, 201, 71, 85, 193, 71, 85, 178, 71, 84, 69, 210, 71, 83,
+ 85, 77, 128, 71, 83, 85, 205, 71, 82, 213, 71, 82, 79, 87, 73, 78, 199,
+ 71, 82, 79, 85, 78, 68, 128, 71, 82, 79, 78, 84, 72, 73, 83, 77, 65, 84,
+ 65, 128, 71, 82, 73, 78, 78, 73, 78, 199, 71, 82, 73, 77, 65, 67, 73, 78,
+ 199, 71, 82, 69, 71, 79, 82, 73, 65, 206, 71, 82, 69, 69, 206, 71, 82,
+ 69, 65, 84, 78, 69, 83, 83, 128, 71, 82, 69, 65, 84, 69, 82, 45, 84, 72,
+ 65, 78, 128, 71, 82, 69, 65, 84, 69, 82, 45, 84, 72, 65, 206, 71, 82, 69,
+ 65, 84, 69, 210, 71, 82, 69, 65, 212, 71, 82, 65, 86, 69, 89, 65, 82,
+ 196, 71, 82, 65, 86, 69, 45, 77, 65, 67, 82, 79, 78, 128, 71, 82, 65, 86,
+ 69, 45, 65, 67, 85, 84, 69, 45, 71, 82, 65, 86, 69, 128, 71, 82, 65, 86,
+ 197, 71, 82, 65, 84, 69, 82, 128, 71, 82, 65, 83, 83, 128, 71, 82, 65,
+ 83, 211, 71, 82, 65, 83, 208, 71, 82, 65, 80, 72, 69, 77, 197, 71, 82,
+ 65, 80, 69, 83, 128, 71, 82, 65, 78, 84, 72, 193, 71, 82, 65, 77, 77,
+ 193, 71, 82, 65, 73, 78, 128, 71, 82, 65, 68, 85, 65, 84, 73, 79, 206,
+ 71, 82, 65, 68, 85, 65, 76, 128, 71, 82, 65, 67, 69, 128, 71, 82, 65, 67,
+ 197, 71, 80, 65, 128, 71, 79, 82, 84, 72, 77, 73, 75, 79, 206, 71, 79,
+ 82, 84, 128, 71, 79, 82, 71, 79, 84, 69, 82, 73, 128, 71, 79, 82, 71, 79,
+ 83, 89, 78, 84, 72, 69, 84, 79, 78, 128, 71, 79, 82, 71, 79, 206, 71, 79,
+ 82, 71, 73, 128, 71, 79, 82, 65, 128, 71, 79, 79, 196, 71, 79, 78, 71,
+ 128, 71, 79, 76, 70, 69, 82, 128, 71, 79, 76, 68, 128, 71, 79, 75, 128,
+ 71, 79, 73, 78, 199, 71, 79, 66, 76, 73, 78, 128, 71, 79, 65, 76, 128,
+ 71, 79, 65, 204, 71, 79, 65, 128, 71, 78, 89, 73, 83, 128, 71, 78, 65,
+ 86, 73, 89, 65, 78, 73, 128, 71, 76, 79, 87, 73, 78, 199, 71, 76, 79, 84,
+ 84, 65, 204, 71, 76, 79, 66, 197, 71, 76, 73, 83, 83, 65, 78, 68, 207,
+ 71, 76, 69, 73, 67, 200, 71, 76, 65, 71, 79, 76, 73, 128, 71, 76, 65,
+ 128, 71, 74, 69, 128, 71, 73, 88, 128, 71, 73, 84, 128, 71, 73, 83, 72,
+ 128, 71, 73, 83, 200, 71, 73, 83, 65, 76, 128, 71, 73, 82, 85, 68, 65,
+ 65, 128, 71, 73, 82, 76, 211, 71, 73, 82, 76, 128, 71, 73, 82, 51, 128,
+ 71, 73, 82, 179, 71, 73, 82, 50, 128, 71, 73, 82, 178, 71, 73, 80, 128,
+ 71, 73, 78, 73, 73, 128, 71, 73, 77, 69, 76, 128, 71, 73, 77, 69, 204,
+ 71, 73, 77, 128, 71, 73, 71, 65, 128, 71, 73, 71, 128, 71, 73, 69, 84,
+ 128, 71, 73, 68, 73, 77, 128, 71, 73, 66, 66, 79, 85, 211, 71, 73, 66,
+ 65, 128, 71, 73, 52, 128, 71, 73, 180, 71, 72, 90, 128, 71, 72, 87, 65,
+ 128, 71, 72, 85, 78, 78, 65, 128, 71, 72, 85, 78, 78, 193, 71, 72, 85,
+ 128, 71, 72, 79, 85, 128, 71, 72, 79, 83, 84, 128, 71, 72, 79, 128, 71,
+ 72, 73, 77, 69, 76, 128, 71, 72, 73, 128, 71, 72, 72, 65, 128, 71, 72,
+ 69, 89, 83, 128, 71, 72, 69, 85, 88, 128, 71, 72, 69, 85, 78, 128, 71,
+ 72, 69, 85, 71, 72, 69, 85, 65, 69, 77, 128, 71, 72, 69, 85, 71, 72, 69,
+ 78, 128, 71, 72, 69, 85, 65, 69, 82, 65, 69, 128, 71, 72, 69, 85, 65, 69,
+ 71, 72, 69, 85, 65, 69, 128, 71, 72, 69, 84, 128, 71, 72, 69, 69, 128,
+ 71, 72, 69, 128, 71, 72, 197, 71, 72, 65, 89, 78, 128, 71, 72, 65, 82,
+ 65, 69, 128, 71, 72, 65, 80, 128, 71, 72, 65, 78, 128, 71, 72, 65, 77,
+ 77, 65, 128, 71, 72, 65, 77, 65, 76, 128, 71, 72, 65, 73, 78, 85, 128,
+ 71, 72, 65, 73, 78, 128, 71, 72, 65, 73, 206, 71, 72, 65, 68, 128, 71,
+ 72, 65, 65, 77, 65, 69, 128, 71, 72, 65, 65, 128, 71, 71, 87, 73, 128,
+ 71, 71, 87, 69, 69, 128, 71, 71, 87, 69, 128, 71, 71, 87, 65, 65, 128,
+ 71, 71, 87, 65, 128, 71, 71, 85, 88, 128, 71, 71, 85, 84, 128, 71, 71,
+ 85, 82, 88, 128, 71, 71, 85, 82, 128, 71, 71, 85, 79, 88, 128, 71, 71,
+ 85, 79, 84, 128, 71, 71, 85, 79, 80, 128, 71, 71, 85, 79, 128, 71, 71,
+ 79, 88, 128, 71, 71, 79, 84, 128, 71, 71, 79, 80, 128, 71, 71, 73, 88,
+ 128, 71, 71, 73, 84, 128, 71, 71, 73, 69, 88, 128, 71, 71, 73, 69, 80,
+ 128, 71, 71, 73, 69, 128, 71, 71, 69, 88, 128, 71, 71, 69, 84, 128, 71,
+ 71, 69, 80, 128, 71, 71, 65, 88, 128, 71, 71, 65, 84, 128, 71, 69, 84,
+ 193, 71, 69, 83, 84, 85, 82, 69, 128, 71, 69, 83, 72, 85, 128, 71, 69,
+ 83, 72, 84, 73, 78, 128, 71, 69, 83, 72, 84, 73, 206, 71, 69, 83, 72, 50,
+ 128, 71, 69, 82, 83, 72, 65, 89, 73, 77, 128, 71, 69, 82, 77, 65, 206,
+ 71, 69, 82, 69, 83, 72, 128, 71, 69, 82, 69, 83, 200, 71, 69, 79, 77, 69,
+ 84, 82, 73, 67, 65, 76, 76, 217, 71, 69, 79, 77, 69, 84, 82, 73, 195, 71,
+ 69, 78, 84, 76, 197, 71, 69, 78, 73, 84, 73, 86, 69, 128, 71, 69, 78, 73,
+ 75, 201, 71, 69, 78, 69, 82, 73, 195, 71, 69, 77, 73, 78, 73, 128, 71,
+ 69, 77, 73, 78, 65, 84, 73, 79, 206, 71, 69, 205, 71, 69, 69, 77, 128,
71, 69, 68, 79, 76, 65, 128, 71, 69, 68, 69, 128, 71, 69, 66, 207, 71,
- 69, 66, 193, 71, 69, 65, 82, 128, 71, 69, 65, 210, 71, 68, 65, 78, 128,
- 71, 67, 73, 71, 128, 71, 67, 65, 206, 71, 66, 79, 78, 128, 71, 66, 73,
- 69, 197, 71, 66, 69, 85, 88, 128, 71, 66, 69, 84, 128, 71, 66, 65, 89,
- 73, 128, 71, 66, 65, 75, 85, 82, 85, 78, 69, 78, 128, 71, 66, 128, 71,
- 65, 89, 65, 78, 85, 75, 73, 84, 84, 65, 128, 71, 65, 89, 65, 78, 78, 65,
- 128, 71, 65, 89, 128, 71, 65, 85, 78, 84, 76, 69, 84, 128, 71, 65, 84,
- 72, 69, 82, 73, 78, 71, 128, 71, 65, 84, 72, 69, 82, 73, 78, 199, 71, 65,
- 84, 69, 128, 71, 65, 83, 72, 65, 78, 128, 71, 65, 82, 83, 72, 85, 78, 73,
- 128, 71, 65, 82, 79, 78, 128, 71, 65, 82, 77, 69, 78, 84, 128, 71, 65,
- 82, 68, 69, 78, 128, 71, 65, 82, 51, 128, 71, 65, 80, 80, 69, 196, 71,
- 65, 208, 71, 65, 78, 77, 65, 128, 71, 65, 78, 71, 73, 65, 128, 71, 65,
- 78, 68, 193, 71, 65, 78, 50, 128, 71, 65, 78, 178, 71, 65, 77, 77, 65,
- 128, 71, 65, 77, 76, 65, 128, 71, 65, 77, 76, 128, 71, 65, 77, 69, 128,
- 71, 65, 77, 197, 71, 65, 77, 65, 78, 128, 71, 65, 77, 65, 76, 128, 71,
- 65, 77, 65, 204, 71, 65, 71, 128, 71, 65, 70, 128, 71, 65, 198, 71, 65,
- 69, 84, 84, 65, 45, 80, 73, 76, 76, 65, 128, 71, 65, 68, 79, 76, 128, 71,
- 65, 68, 128, 71, 65, 196, 71, 65, 66, 65, 128, 71, 65, 66, 193, 71, 65,
- 65, 70, 85, 128, 71, 65, 178, 71, 48, 53, 52, 128, 71, 48, 53, 51, 128,
- 71, 48, 53, 50, 128, 71, 48, 53, 49, 128, 71, 48, 53, 48, 128, 71, 48,
- 52, 57, 128, 71, 48, 52, 56, 128, 71, 48, 52, 55, 128, 71, 48, 52, 54,
- 128, 71, 48, 52, 53, 65, 128, 71, 48, 52, 53, 128, 71, 48, 52, 52, 128,
- 71, 48, 52, 51, 65, 128, 71, 48, 52, 51, 128, 71, 48, 52, 50, 128, 71,
- 48, 52, 49, 128, 71, 48, 52, 48, 128, 71, 48, 51, 57, 128, 71, 48, 51,
- 56, 128, 71, 48, 51, 55, 65, 128, 71, 48, 51, 55, 128, 71, 48, 51, 54,
- 65, 128, 71, 48, 51, 54, 128, 71, 48, 51, 53, 128, 71, 48, 51, 52, 128,
- 71, 48, 51, 51, 128, 71, 48, 51, 50, 128, 71, 48, 51, 49, 128, 71, 48,
- 51, 48, 128, 71, 48, 50, 57, 128, 71, 48, 50, 56, 128, 71, 48, 50, 55,
- 128, 71, 48, 50, 54, 65, 128, 71, 48, 50, 54, 128, 71, 48, 50, 53, 128,
- 71, 48, 50, 52, 128, 71, 48, 50, 51, 128, 71, 48, 50, 50, 128, 71, 48,
- 50, 49, 128, 71, 48, 50, 48, 65, 128, 71, 48, 50, 48, 128, 71, 48, 49,
- 57, 128, 71, 48, 49, 56, 128, 71, 48, 49, 55, 128, 71, 48, 49, 54, 128,
- 71, 48, 49, 53, 128, 71, 48, 49, 52, 128, 71, 48, 49, 51, 128, 71, 48,
- 49, 50, 128, 71, 48, 49, 49, 65, 128, 71, 48, 49, 49, 128, 71, 48, 49,
- 48, 128, 71, 48, 48, 57, 128, 71, 48, 48, 56, 128, 71, 48, 48, 55, 66,
- 128, 71, 48, 48, 55, 65, 128, 71, 48, 48, 55, 128, 71, 48, 48, 54, 65,
- 128, 71, 48, 48, 54, 128, 71, 48, 48, 53, 128, 71, 48, 48, 52, 128, 71,
- 48, 48, 51, 128, 71, 48, 48, 50, 128, 71, 48, 48, 49, 128, 70, 89, 88,
- 128, 70, 89, 84, 128, 70, 89, 80, 128, 70, 89, 65, 128, 70, 87, 73, 128,
- 70, 87, 69, 69, 128, 70, 87, 69, 128, 70, 87, 65, 65, 128, 70, 87, 65,
- 128, 70, 86, 83, 51, 128, 70, 86, 83, 50, 128, 70, 86, 83, 49, 128, 70,
- 85, 88, 128, 70, 85, 84, 128, 70, 85, 83, 69, 128, 70, 85, 83, 193, 70,
- 85, 82, 88, 128, 70, 85, 80, 128, 70, 85, 78, 69, 82, 65, 204, 70, 85,
- 78, 67, 84, 73, 79, 78, 65, 204, 70, 85, 78, 67, 84, 73, 79, 78, 128, 70,
- 85, 76, 76, 78, 69, 83, 83, 128, 70, 85, 76, 204, 70, 85, 74, 73, 128,
- 70, 85, 69, 84, 128, 70, 85, 69, 204, 70, 85, 69, 128, 70, 84, 72, 79,
- 82, 193, 70, 83, 73, 128, 70, 82, 79, 87, 78, 73, 78, 71, 128, 70, 82,
- 79, 87, 78, 73, 78, 199, 70, 82, 79, 87, 78, 128, 70, 82, 79, 78, 84, 45,
- 84, 73, 76, 84, 69, 196, 70, 82, 79, 78, 84, 45, 70, 65, 67, 73, 78, 199,
- 70, 82, 79, 205, 70, 82, 79, 71, 128, 70, 82, 79, 199, 70, 82, 73, 84,
- 85, 128, 70, 82, 73, 69, 83, 128, 70, 82, 73, 69, 196, 70, 82, 73, 67,
- 65, 84, 73, 86, 69, 128, 70, 82, 69, 84, 66, 79, 65, 82, 68, 128, 70, 82,
- 69, 78, 67, 200, 70, 82, 69, 69, 128, 70, 82, 69, 197, 70, 82, 65, 78,
- 195, 70, 82, 65, 77, 69, 128, 70, 82, 65, 71, 82, 65, 78, 84, 128, 70,
- 82, 65, 71, 77, 69, 78, 84, 128, 70, 82, 65, 67, 84, 73, 79, 206, 70, 79,
- 88, 128, 70, 79, 85, 82, 84, 69, 69, 78, 128, 70, 79, 85, 82, 84, 69, 69,
- 206, 70, 79, 85, 82, 45, 84, 72, 73, 82, 84, 89, 128, 70, 79, 85, 82, 45,
- 83, 84, 82, 73, 78, 199, 70, 79, 85, 82, 45, 80, 69, 82, 45, 69, 205, 70,
- 79, 85, 82, 45, 76, 73, 78, 197, 70, 79, 85, 210, 70, 79, 85, 78, 84, 65,
- 73, 78, 128, 70, 79, 83, 84, 69, 82, 73, 78, 71, 128, 70, 79, 82, 87, 65,
- 82, 68, 128, 70, 79, 82, 84, 89, 128, 70, 79, 82, 84, 217, 70, 79, 82,
- 84, 69, 128, 70, 79, 82, 77, 211, 70, 79, 82, 77, 65, 84, 84, 73, 78, 71,
- 128, 70, 79, 82, 75, 69, 196, 70, 79, 82, 67, 69, 83, 128, 70, 79, 82,
- 67, 69, 128, 70, 79, 80, 128, 70, 79, 79, 84, 83, 84, 79, 79, 76, 128,
- 70, 79, 79, 84, 80, 82, 73, 78, 84, 83, 128, 70, 79, 79, 84, 78, 79, 84,
- 197, 70, 79, 79, 84, 66, 65, 76, 76, 128, 70, 79, 79, 84, 128, 70, 79,
- 79, 68, 128, 70, 79, 79, 128, 70, 79, 78, 71, 77, 65, 78, 128, 70, 79,
- 77, 128, 70, 79, 76, 76, 89, 128, 70, 79, 76, 76, 79, 87, 73, 78, 71,
- 128, 70, 79, 76, 68, 69, 82, 128, 70, 79, 76, 68, 69, 196, 70, 79, 71,
- 71, 89, 128, 70, 207, 70, 77, 128, 70, 76, 89, 128, 70, 76, 85, 84, 84,
- 69, 82, 73, 78, 199, 70, 76, 85, 84, 69, 128, 70, 76, 85, 83, 72, 69,
- 196, 70, 76, 79, 87, 73, 78, 199, 70, 76, 79, 87, 69, 210, 70, 76, 79,
- 85, 82, 73, 83, 72, 128, 70, 76, 79, 82, 69, 84, 84, 69, 128, 70, 76, 79,
- 82, 65, 204, 70, 76, 79, 80, 80, 217, 70, 76, 79, 79, 82, 128, 70, 76,
- 73, 80, 128, 70, 76, 73, 71, 72, 84, 128, 70, 76, 69, 88, 85, 83, 128,
- 70, 76, 69, 88, 69, 196, 70, 76, 69, 85, 82, 45, 68, 69, 45, 76, 73, 83,
- 128, 70, 76, 65, 84, 84, 69, 78, 69, 196, 70, 76, 65, 84, 78, 69, 83, 83,
- 128, 70, 76, 65, 84, 128, 70, 76, 65, 212, 70, 76, 65, 71, 83, 128, 70,
- 76, 65, 71, 45, 53, 128, 70, 76, 65, 71, 45, 52, 128, 70, 76, 65, 71, 45,
- 51, 128, 70, 76, 65, 71, 45, 50, 128, 70, 76, 65, 71, 45, 49, 128, 70,
- 76, 65, 71, 128, 70, 76, 65, 199, 70, 76, 65, 128, 70, 76, 128, 70, 73,
- 88, 69, 68, 45, 70, 79, 82, 205, 70, 73, 88, 128, 70, 73, 86, 69, 45, 84,
- 72, 73, 82, 84, 89, 128, 70, 73, 86, 69, 45, 76, 73, 78, 197, 70, 73, 86,
- 197, 70, 73, 84, 65, 128, 70, 73, 84, 128, 70, 73, 83, 84, 69, 196, 70,
- 73, 83, 84, 128, 70, 73, 83, 72, 73, 78, 199, 70, 73, 83, 72, 72, 79, 79,
- 75, 128, 70, 73, 83, 72, 72, 79, 79, 203, 70, 73, 83, 72, 69, 89, 69,
- 128, 70, 73, 83, 72, 128, 70, 73, 83, 200, 70, 73, 82, 83, 212, 70, 73,
- 82, 73, 128, 70, 73, 82, 69, 87, 79, 82, 75, 83, 128, 70, 73, 82, 69, 87,
- 79, 82, 203, 70, 73, 82, 69, 128, 70, 73, 82, 197, 70, 73, 80, 128, 70,
- 73, 78, 73, 84, 197, 70, 73, 78, 71, 69, 82, 78, 65, 73, 76, 83, 128, 70,
- 73, 78, 71, 69, 82, 69, 196, 70, 73, 78, 65, 78, 67, 73, 65, 76, 128, 70,
- 73, 76, 76, 69, 82, 128, 70, 73, 76, 76, 69, 196, 70, 73, 76, 76, 128,
- 70, 73, 76, 204, 70, 73, 76, 197, 70, 73, 73, 128, 70, 73, 71, 85, 82,
- 69, 45, 51, 128, 70, 73, 71, 85, 82, 69, 45, 50, 128, 70, 73, 71, 85, 82,
- 69, 45, 49, 128, 70, 73, 71, 85, 82, 197, 70, 73, 71, 72, 84, 128, 70,
- 73, 70, 84, 89, 128, 70, 73, 70, 84, 217, 70, 73, 70, 84, 72, 83, 128,
- 70, 73, 70, 84, 72, 128, 70, 73, 70, 84, 69, 69, 78, 128, 70, 73, 70, 84,
- 69, 69, 206, 70, 73, 69, 76, 68, 128, 70, 72, 84, 79, 82, 193, 70, 70,
- 76, 128, 70, 70, 73, 128, 70, 69, 85, 88, 128, 70, 69, 85, 70, 69, 85,
- 65, 69, 84, 128, 70, 69, 83, 84, 73, 86, 65, 76, 128, 70, 69, 82, 82, 89,
- 128, 70, 69, 82, 82, 73, 211, 70, 69, 82, 77, 65, 84, 65, 128, 70, 69,
- 82, 77, 65, 84, 193, 70, 69, 79, 200, 70, 69, 78, 199, 70, 69, 78, 67,
- 69, 128, 70, 69, 77, 73, 78, 73, 78, 197, 70, 69, 77, 65, 76, 69, 128,
- 70, 69, 77, 65, 76, 197, 70, 69, 76, 76, 79, 87, 83, 72, 73, 80, 128, 70,
- 69, 73, 128, 70, 69, 72, 213, 70, 69, 72, 128, 70, 69, 200, 70, 69, 69,
- 78, 71, 128, 70, 69, 69, 68, 128, 70, 69, 69, 196, 70, 69, 69, 128, 70,
- 69, 66, 82, 85, 65, 82, 89, 128, 70, 69, 65, 84, 72, 69, 82, 128, 70, 69,
- 65, 84, 72, 69, 210, 70, 69, 65, 82, 78, 128, 70, 69, 65, 82, 70, 85,
- 204, 70, 69, 65, 82, 128, 70, 65, 89, 65, 78, 78, 65, 128, 70, 65, 89,
- 128, 70, 65, 88, 128, 70, 65, 216, 70, 65, 84, 73, 71, 85, 69, 128, 70,
- 65, 84, 72, 69, 82, 128, 70, 65, 84, 72, 69, 210, 70, 65, 84, 72, 65, 84,
- 65, 78, 128, 70, 65, 84, 72, 65, 84, 65, 206, 70, 65, 84, 72, 65, 128,
- 70, 65, 84, 72, 193, 70, 65, 84, 128, 70, 65, 82, 83, 201, 70, 65, 81,
- 128, 70, 65, 80, 128, 70, 65, 78, 71, 128, 70, 65, 78, 69, 82, 79, 83,
- 73, 211, 70, 65, 78, 128, 70, 65, 77, 73, 76, 89, 128, 70, 65, 76, 76,
- 73, 78, 199, 70, 65, 76, 76, 69, 206, 70, 65, 73, 76, 85, 82, 69, 128,
- 70, 65, 73, 72, 85, 128, 70, 65, 72, 82, 69, 78, 72, 69, 73, 84, 128, 70,
- 65, 67, 84, 79, 82, 89, 128, 70, 65, 67, 84, 79, 210, 70, 65, 67, 83, 73,
- 77, 73, 76, 197, 70, 65, 67, 69, 45, 54, 128, 70, 65, 67, 69, 45, 53,
- 128, 70, 65, 67, 69, 45, 52, 128, 70, 65, 67, 69, 45, 51, 128, 70, 65,
- 67, 69, 45, 50, 128, 70, 65, 67, 69, 45, 49, 128, 70, 65, 65, 77, 65, 69,
- 128, 70, 65, 65, 73, 128, 70, 65, 65, 70, 85, 128, 70, 48, 53, 51, 128,
- 70, 48, 53, 50, 128, 70, 48, 53, 49, 67, 128, 70, 48, 53, 49, 66, 128,
- 70, 48, 53, 49, 65, 128, 70, 48, 53, 49, 128, 70, 48, 53, 48, 128, 70,
- 48, 52, 57, 128, 70, 48, 52, 56, 128, 70, 48, 52, 55, 65, 128, 70, 48,
- 52, 55, 128, 70, 48, 52, 54, 65, 128, 70, 48, 52, 54, 128, 70, 48, 52,
- 53, 65, 128, 70, 48, 52, 53, 128, 70, 48, 52, 52, 128, 70, 48, 52, 51,
- 128, 70, 48, 52, 50, 128, 70, 48, 52, 49, 128, 70, 48, 52, 48, 128, 70,
- 48, 51, 57, 128, 70, 48, 51, 56, 65, 128, 70, 48, 51, 56, 128, 70, 48,
- 51, 55, 65, 128, 70, 48, 51, 55, 128, 70, 48, 51, 54, 128, 70, 48, 51,
- 53, 128, 70, 48, 51, 52, 128, 70, 48, 51, 51, 128, 70, 48, 51, 50, 128,
- 70, 48, 51, 49, 65, 128, 70, 48, 51, 49, 128, 70, 48, 51, 48, 128, 70,
- 48, 50, 57, 128, 70, 48, 50, 56, 128, 70, 48, 50, 55, 128, 70, 48, 50,
- 54, 128, 70, 48, 50, 53, 128, 70, 48, 50, 52, 128, 70, 48, 50, 51, 128,
- 70, 48, 50, 50, 128, 70, 48, 50, 49, 65, 128, 70, 48, 50, 49, 128, 70,
- 48, 50, 48, 128, 70, 48, 49, 57, 128, 70, 48, 49, 56, 128, 70, 48, 49,
- 55, 128, 70, 48, 49, 54, 128, 70, 48, 49, 53, 128, 70, 48, 49, 52, 128,
- 70, 48, 49, 51, 65, 128, 70, 48, 49, 51, 128, 70, 48, 49, 50, 128, 70,
- 48, 49, 49, 128, 70, 48, 49, 48, 128, 70, 48, 48, 57, 128, 70, 48, 48,
- 56, 128, 70, 48, 48, 55, 128, 70, 48, 48, 54, 128, 70, 48, 48, 53, 128,
- 70, 48, 48, 52, 128, 70, 48, 48, 51, 128, 70, 48, 48, 50, 128, 70, 48,
- 48, 49, 65, 128, 70, 48, 48, 49, 128, 69, 90, 200, 69, 90, 69, 78, 128,
- 69, 90, 69, 206, 69, 90, 128, 69, 89, 69, 83, 128, 69, 89, 69, 71, 76,
- 65, 83, 83, 69, 83, 128, 69, 89, 66, 69, 89, 70, 73, 76, 73, 128, 69, 89,
- 65, 78, 78, 65, 128, 69, 88, 84, 82, 65, 84, 69, 82, 82, 69, 83, 84, 82,
- 73, 65, 204, 69, 88, 84, 82, 65, 45, 76, 79, 215, 69, 88, 84, 82, 65, 45,
- 72, 73, 71, 200, 69, 88, 84, 69, 78, 83, 73, 79, 78, 128, 69, 88, 84, 69,
- 78, 68, 69, 196, 69, 88, 80, 82, 69, 83, 83, 73, 79, 78, 76, 69, 83, 211,
- 69, 88, 80, 79, 78, 69, 78, 212, 69, 88, 79, 128, 69, 88, 207, 69, 88,
- 73, 83, 84, 83, 128, 69, 88, 73, 83, 84, 128, 69, 88, 72, 65, 85, 83, 84,
- 73, 79, 78, 128, 69, 88, 67, 76, 65, 77, 65, 84, 73, 79, 78, 128, 69, 88,
- 67, 76, 65, 77, 65, 84, 73, 79, 206, 69, 88, 67, 72, 65, 78, 71, 69, 128,
- 69, 88, 67, 69, 83, 83, 128, 69, 88, 67, 69, 76, 76, 69, 78, 84, 128, 69,
- 87, 69, 128, 69, 86, 69, 82, 71, 82, 69, 69, 206, 69, 86, 69, 78, 73, 78,
- 71, 128, 69, 85, 82, 79, 80, 69, 65, 206, 69, 85, 82, 79, 80, 69, 45, 65,
- 70, 82, 73, 67, 65, 128, 69, 85, 82, 79, 45, 67, 85, 82, 82, 69, 78, 67,
- 217, 69, 85, 82, 207, 69, 85, 76, 69, 210, 69, 85, 45, 85, 128, 69, 85,
- 45, 79, 128, 69, 85, 45, 69, 85, 128, 69, 85, 45, 69, 79, 128, 69, 85,
- 45, 69, 128, 69, 85, 45, 65, 128, 69, 84, 88, 128, 69, 84, 78, 65, 72,
- 84, 65, 128, 69, 84, 72, 69, 204, 69, 84, 69, 82, 79, 206, 69, 84, 69,
- 82, 78, 73, 84, 89, 128, 69, 84, 66, 128, 69, 83, 85, 75, 85, 85, 68, 79,
- 128, 69, 83, 84, 73, 77, 65, 84, 69, 83, 128, 69, 83, 84, 73, 77, 65, 84,
- 69, 196, 69, 83, 72, 69, 51, 128, 69, 83, 72, 50, 49, 128, 69, 83, 72,
- 178, 69, 83, 72, 49, 54, 128, 69, 83, 67, 65, 80, 69, 128, 69, 83, 67,
- 128, 69, 83, 65, 128, 69, 83, 45, 84, 69, 128, 69, 82, 82, 79, 82, 45,
- 66, 65, 82, 82, 69, 196, 69, 82, 82, 128, 69, 82, 73, 78, 50, 128, 69,
- 82, 71, 128, 69, 82, 65, 83, 197, 69, 81, 85, 73, 86, 65, 76, 69, 78,
- 212, 69, 81, 85, 73, 68, 128, 69, 81, 85, 73, 65, 78, 71, 85, 76, 65,
+ 69, 66, 193, 71, 69, 65, 82, 128, 71, 69, 65, 210, 71, 69, 50, 50, 128,
+ 71, 68, 65, 78, 128, 71, 67, 73, 71, 128, 71, 67, 65, 206, 71, 66, 79,
+ 78, 128, 71, 66, 73, 69, 197, 71, 66, 69, 85, 88, 128, 71, 66, 69, 84,
+ 128, 71, 66, 65, 89, 73, 128, 71, 66, 65, 75, 85, 82, 85, 78, 69, 78,
+ 128, 71, 66, 128, 71, 65, 89, 65, 78, 85, 75, 73, 84, 84, 65, 128, 71,
+ 65, 89, 65, 78, 78, 65, 128, 71, 65, 89, 128, 71, 65, 85, 78, 84, 76, 69,
+ 84, 128, 71, 65, 84, 72, 69, 82, 73, 78, 71, 128, 71, 65, 84, 72, 69, 82,
+ 73, 78, 199, 71, 65, 84, 69, 128, 71, 65, 83, 72, 65, 78, 128, 71, 65,
+ 82, 83, 72, 85, 78, 73, 128, 71, 65, 82, 79, 78, 128, 71, 65, 82, 77, 69,
+ 78, 84, 128, 71, 65, 82, 68, 69, 78, 128, 71, 65, 82, 51, 128, 71, 65,
+ 80, 80, 69, 196, 71, 65, 208, 71, 65, 78, 77, 65, 128, 71, 65, 78, 71,
+ 73, 65, 128, 71, 65, 78, 68, 193, 71, 65, 78, 50, 128, 71, 65, 78, 178,
+ 71, 65, 77, 77, 65, 128, 71, 65, 77, 76, 65, 128, 71, 65, 77, 76, 128,
+ 71, 65, 77, 69, 128, 71, 65, 77, 197, 71, 65, 77, 65, 78, 128, 71, 65,
+ 77, 65, 76, 128, 71, 65, 77, 65, 204, 71, 65, 71, 128, 71, 65, 70, 128,
+ 71, 65, 198, 71, 65, 69, 84, 84, 65, 45, 80, 73, 76, 76, 65, 128, 71, 65,
+ 68, 79, 76, 128, 71, 65, 68, 128, 71, 65, 196, 71, 65, 66, 65, 128, 71,
+ 65, 66, 193, 71, 65, 65, 70, 85, 128, 71, 65, 178, 71, 48, 53, 52, 128,
+ 71, 48, 53, 51, 128, 71, 48, 53, 50, 128, 71, 48, 53, 49, 128, 71, 48,
+ 53, 48, 128, 71, 48, 52, 57, 128, 71, 48, 52, 56, 128, 71, 48, 52, 55,
+ 128, 71, 48, 52, 54, 128, 71, 48, 52, 53, 65, 128, 71, 48, 52, 53, 128,
+ 71, 48, 52, 52, 128, 71, 48, 52, 51, 65, 128, 71, 48, 52, 51, 128, 71,
+ 48, 52, 50, 128, 71, 48, 52, 49, 128, 71, 48, 52, 48, 128, 71, 48, 51,
+ 57, 128, 71, 48, 51, 56, 128, 71, 48, 51, 55, 65, 128, 71, 48, 51, 55,
+ 128, 71, 48, 51, 54, 65, 128, 71, 48, 51, 54, 128, 71, 48, 51, 53, 128,
+ 71, 48, 51, 52, 128, 71, 48, 51, 51, 128, 71, 48, 51, 50, 128, 71, 48,
+ 51, 49, 128, 71, 48, 51, 48, 128, 71, 48, 50, 57, 128, 71, 48, 50, 56,
+ 128, 71, 48, 50, 55, 128, 71, 48, 50, 54, 65, 128, 71, 48, 50, 54, 128,
+ 71, 48, 50, 53, 128, 71, 48, 50, 52, 128, 71, 48, 50, 51, 128, 71, 48,
+ 50, 50, 128, 71, 48, 50, 49, 128, 71, 48, 50, 48, 65, 128, 71, 48, 50,
+ 48, 128, 71, 48, 49, 57, 128, 71, 48, 49, 56, 128, 71, 48, 49, 55, 128,
+ 71, 48, 49, 54, 128, 71, 48, 49, 53, 128, 71, 48, 49, 52, 128, 71, 48,
+ 49, 51, 128, 71, 48, 49, 50, 128, 71, 48, 49, 49, 65, 128, 71, 48, 49,
+ 49, 128, 71, 48, 49, 48, 128, 71, 48, 48, 57, 128, 71, 48, 48, 56, 128,
+ 71, 48, 48, 55, 66, 128, 71, 48, 48, 55, 65, 128, 71, 48, 48, 55, 128,
+ 71, 48, 48, 54, 65, 128, 71, 48, 48, 54, 128, 71, 48, 48, 53, 128, 71,
+ 48, 48, 52, 128, 71, 48, 48, 51, 128, 71, 48, 48, 50, 128, 71, 48, 48,
+ 49, 128, 70, 89, 88, 128, 70, 89, 84, 128, 70, 89, 80, 128, 70, 89, 65,
+ 128, 70, 87, 73, 128, 70, 87, 69, 69, 128, 70, 87, 69, 128, 70, 87, 65,
+ 65, 128, 70, 87, 65, 128, 70, 86, 83, 51, 128, 70, 86, 83, 50, 128, 70,
+ 86, 83, 49, 128, 70, 85, 88, 128, 70, 85, 84, 128, 70, 85, 83, 69, 128,
+ 70, 85, 83, 193, 70, 85, 82, 88, 128, 70, 85, 80, 128, 70, 85, 78, 69,
+ 82, 65, 204, 70, 85, 78, 67, 84, 73, 79, 78, 65, 204, 70, 85, 78, 67, 84,
+ 73, 79, 78, 128, 70, 85, 76, 76, 78, 69, 83, 83, 128, 70, 85, 76, 204,
+ 70, 85, 74, 73, 128, 70, 85, 69, 84, 128, 70, 85, 69, 204, 70, 85, 69,
+ 128, 70, 85, 65, 128, 70, 84, 72, 79, 82, 193, 70, 83, 73, 128, 70, 82,
+ 79, 87, 78, 73, 78, 71, 128, 70, 82, 79, 87, 78, 73, 78, 199, 70, 82, 79,
+ 87, 78, 128, 70, 82, 79, 87, 206, 70, 82, 79, 78, 84, 45, 84, 73, 76, 84,
+ 69, 196, 70, 82, 79, 78, 84, 45, 70, 65, 67, 73, 78, 199, 70, 82, 79, 78,
+ 212, 70, 82, 79, 205, 70, 82, 79, 71, 128, 70, 82, 79, 199, 70, 82, 73,
+ 84, 85, 128, 70, 82, 73, 69, 83, 128, 70, 82, 73, 69, 196, 70, 82, 73,
+ 67, 65, 84, 73, 86, 69, 128, 70, 82, 69, 84, 66, 79, 65, 82, 68, 128, 70,
+ 82, 69, 78, 67, 200, 70, 82, 69, 69, 128, 70, 82, 69, 197, 70, 82, 65,
+ 78, 75, 211, 70, 82, 65, 78, 195, 70, 82, 65, 77, 69, 83, 128, 70, 82,
+ 65, 77, 69, 128, 70, 82, 65, 77, 197, 70, 82, 65, 71, 82, 65, 78, 84,
+ 128, 70, 82, 65, 71, 77, 69, 78, 84, 128, 70, 82, 65, 67, 84, 73, 79,
+ 206, 70, 79, 88, 128, 70, 79, 85, 82, 84, 69, 69, 78, 128, 70, 79, 85,
+ 82, 84, 69, 69, 206, 70, 79, 85, 82, 45, 84, 72, 73, 82, 84, 89, 128, 70,
+ 79, 85, 82, 45, 83, 84, 82, 73, 78, 199, 70, 79, 85, 82, 45, 80, 69, 82,
+ 45, 69, 205, 70, 79, 85, 82, 45, 76, 73, 78, 197, 70, 79, 85, 210, 70,
+ 79, 85, 78, 84, 65, 73, 78, 128, 70, 79, 85, 78, 84, 65, 73, 206, 70, 79,
+ 83, 84, 69, 82, 73, 78, 71, 128, 70, 79, 82, 87, 65, 82, 68, 128, 70, 79,
+ 82, 87, 65, 82, 196, 70, 79, 82, 84, 89, 128, 70, 79, 82, 84, 217, 70,
+ 79, 82, 84, 69, 128, 70, 79, 82, 77, 211, 70, 79, 82, 77, 65, 84, 84, 73,
+ 78, 71, 128, 70, 79, 82, 77, 65, 212, 70, 79, 82, 75, 69, 196, 70, 79,
+ 82, 69, 72, 69, 65, 196, 70, 79, 82, 67, 69, 83, 128, 70, 79, 82, 67, 69,
+ 128, 70, 79, 80, 128, 70, 79, 79, 84, 83, 84, 79, 79, 76, 128, 70, 79,
+ 79, 84, 80, 82, 73, 78, 84, 83, 128, 70, 79, 79, 84, 78, 79, 84, 197, 70,
+ 79, 79, 84, 66, 65, 76, 76, 128, 70, 79, 79, 84, 128, 70, 79, 79, 76,
+ 128, 70, 79, 79, 68, 128, 70, 79, 79, 128, 70, 79, 78, 212, 70, 79, 78,
+ 71, 77, 65, 78, 128, 70, 79, 77, 128, 70, 79, 76, 76, 89, 128, 70, 79,
+ 76, 76, 79, 87, 73, 78, 71, 128, 70, 79, 76, 68, 69, 82, 128, 70, 79, 76,
+ 68, 69, 196, 70, 79, 71, 71, 89, 128, 70, 79, 71, 128, 70, 207, 70, 77,
+ 128, 70, 76, 89, 73, 78, 199, 70, 76, 89, 128, 70, 76, 85, 84, 84, 69,
+ 82, 73, 78, 71, 128, 70, 76, 85, 84, 84, 69, 82, 73, 78, 199, 70, 76, 85,
+ 84, 69, 128, 70, 76, 85, 83, 72, 69, 196, 70, 76, 79, 87, 73, 78, 199,
+ 70, 76, 79, 87, 69, 82, 83, 128, 70, 76, 79, 87, 69, 210, 70, 76, 79, 85,
+ 82, 73, 83, 72, 128, 70, 76, 79, 82, 69, 84, 84, 69, 128, 70, 76, 79, 82,
+ 65, 204, 70, 76, 79, 80, 80, 217, 70, 76, 79, 79, 82, 128, 70, 76, 79,
+ 79, 210, 70, 76, 73, 80, 128, 70, 76, 73, 71, 72, 84, 128, 70, 76, 73,
+ 67, 203, 70, 76, 69, 88, 85, 83, 128, 70, 76, 69, 88, 69, 196, 70, 76,
+ 69, 88, 128, 70, 76, 69, 85, 82, 79, 78, 128, 70, 76, 69, 85, 82, 45, 68,
+ 69, 45, 76, 73, 83, 128, 70, 76, 65, 84, 84, 69, 78, 69, 196, 70, 76, 65,
+ 84, 78, 69, 83, 83, 128, 70, 76, 65, 83, 72, 128, 70, 76, 65, 71, 83,
+ 128, 70, 76, 65, 71, 45, 53, 128, 70, 76, 65, 71, 45, 52, 128, 70, 76,
+ 65, 71, 45, 51, 128, 70, 76, 65, 71, 45, 50, 128, 70, 76, 65, 71, 45, 49,
+ 128, 70, 76, 65, 71, 128, 70, 76, 65, 199, 70, 76, 65, 128, 70, 76, 128,
+ 70, 73, 88, 69, 68, 45, 70, 79, 82, 205, 70, 73, 88, 128, 70, 73, 86, 69,
+ 45, 84, 72, 73, 82, 84, 89, 128, 70, 73, 86, 69, 45, 76, 73, 78, 197, 70,
+ 73, 86, 197, 70, 73, 84, 90, 80, 65, 84, 82, 73, 67, 203, 70, 73, 84, 65,
+ 128, 70, 73, 84, 128, 70, 73, 83, 84, 69, 196, 70, 73, 83, 72, 73, 78,
+ 199, 70, 73, 83, 72, 72, 79, 79, 75, 128, 70, 73, 83, 72, 72, 79, 79,
+ 203, 70, 73, 83, 72, 69, 89, 69, 128, 70, 73, 83, 72, 128, 70, 73, 83,
+ 200, 70, 73, 82, 83, 212, 70, 73, 82, 73, 128, 70, 73, 82, 69, 87, 79,
+ 82, 75, 83, 128, 70, 73, 82, 69, 87, 79, 82, 203, 70, 73, 82, 69, 128,
+ 70, 73, 82, 197, 70, 73, 80, 128, 70, 73, 78, 73, 84, 197, 70, 73, 78,
+ 71, 69, 82, 83, 128, 70, 73, 78, 71, 69, 82, 211, 70, 73, 78, 71, 69, 82,
+ 78, 65, 73, 76, 83, 128, 70, 73, 78, 71, 69, 82, 69, 196, 70, 73, 78, 71,
+ 69, 82, 45, 80, 79, 83, 212, 70, 73, 78, 71, 69, 82, 128, 70, 73, 78, 71,
+ 69, 210, 70, 73, 78, 65, 78, 67, 73, 65, 76, 128, 70, 73, 78, 65, 76,
+ 128, 70, 73, 76, 205, 70, 73, 76, 76, 69, 82, 128, 70, 73, 76, 76, 69,
+ 196, 70, 73, 76, 76, 128, 70, 73, 76, 204, 70, 73, 76, 197, 70, 73, 73,
+ 128, 70, 73, 71, 85, 82, 69, 45, 51, 128, 70, 73, 71, 85, 82, 69, 45, 50,
+ 128, 70, 73, 71, 85, 82, 69, 45, 49, 128, 70, 73, 71, 85, 82, 197, 70,
+ 73, 71, 72, 84, 128, 70, 73, 70, 84, 89, 128, 70, 73, 70, 84, 217, 70,
+ 73, 70, 84, 72, 83, 128, 70, 73, 70, 84, 72, 128, 70, 73, 70, 84, 69, 69,
+ 78, 128, 70, 73, 70, 84, 69, 69, 206, 70, 73, 69, 76, 68, 128, 70, 73,
+ 69, 76, 196, 70, 72, 84, 79, 82, 193, 70, 70, 76, 128, 70, 70, 73, 128,
+ 70, 69, 85, 88, 128, 70, 69, 85, 70, 69, 85, 65, 69, 84, 128, 70, 69, 83,
+ 84, 73, 86, 65, 76, 128, 70, 69, 82, 82, 89, 128, 70, 69, 82, 82, 73,
+ 211, 70, 69, 82, 77, 65, 84, 65, 128, 70, 69, 82, 77, 65, 84, 193, 70,
+ 69, 79, 200, 70, 69, 78, 199, 70, 69, 78, 67, 69, 128, 70, 69, 77, 73,
+ 78, 73, 78, 197, 70, 69, 77, 65, 76, 69, 128, 70, 69, 77, 65, 76, 197,
+ 70, 69, 76, 76, 79, 87, 83, 72, 73, 80, 128, 70, 69, 73, 128, 70, 69, 72,
+ 213, 70, 69, 72, 128, 70, 69, 200, 70, 69, 69, 78, 71, 128, 70, 69, 69,
+ 77, 128, 70, 69, 69, 68, 128, 70, 69, 69, 196, 70, 69, 69, 128, 70, 69,
+ 66, 82, 85, 65, 82, 89, 128, 70, 69, 65, 84, 72, 69, 82, 128, 70, 69, 65,
+ 84, 72, 69, 210, 70, 69, 65, 82, 78, 128, 70, 69, 65, 82, 70, 85, 204,
+ 70, 69, 65, 82, 128, 70, 65, 89, 65, 78, 78, 65, 128, 70, 65, 89, 128,
+ 70, 65, 88, 128, 70, 65, 216, 70, 65, 84, 73, 71, 85, 69, 128, 70, 65,
+ 84, 72, 69, 82, 128, 70, 65, 84, 72, 69, 210, 70, 65, 84, 72, 65, 84, 65,
+ 78, 128, 70, 65, 84, 72, 65, 84, 65, 206, 70, 65, 84, 72, 65, 128, 70,
+ 65, 84, 72, 193, 70, 65, 84, 128, 70, 65, 83, 84, 128, 70, 65, 82, 83,
+ 201, 70, 65, 82, 128, 70, 65, 81, 128, 70, 65, 80, 128, 70, 65, 78, 71,
+ 128, 70, 65, 78, 69, 82, 79, 83, 73, 211, 70, 65, 78, 128, 70, 65, 77,
+ 73, 76, 89, 128, 70, 65, 77, 128, 70, 65, 76, 76, 69, 206, 70, 65, 74,
+ 128, 70, 65, 73, 76, 85, 82, 69, 128, 70, 65, 73, 72, 85, 128, 70, 65,
+ 73, 66, 128, 70, 65, 72, 82, 69, 78, 72, 69, 73, 84, 128, 70, 65, 67, 84,
+ 79, 82, 89, 128, 70, 65, 67, 84, 79, 210, 70, 65, 67, 83, 73, 77, 73, 76,
+ 197, 70, 65, 67, 73, 78, 71, 83, 128, 70, 65, 67, 69, 45, 54, 128, 70,
+ 65, 67, 69, 45, 53, 128, 70, 65, 67, 69, 45, 52, 128, 70, 65, 67, 69, 45,
+ 51, 128, 70, 65, 67, 69, 45, 50, 128, 70, 65, 67, 69, 45, 49, 128, 70,
+ 65, 65, 77, 65, 69, 128, 70, 65, 65, 73, 128, 70, 65, 65, 70, 85, 128,
+ 70, 48, 53, 51, 128, 70, 48, 53, 50, 128, 70, 48, 53, 49, 67, 128, 70,
+ 48, 53, 49, 66, 128, 70, 48, 53, 49, 65, 128, 70, 48, 53, 49, 128, 70,
+ 48, 53, 48, 128, 70, 48, 52, 57, 128, 70, 48, 52, 56, 128, 70, 48, 52,
+ 55, 65, 128, 70, 48, 52, 55, 128, 70, 48, 52, 54, 65, 128, 70, 48, 52,
+ 54, 128, 70, 48, 52, 53, 65, 128, 70, 48, 52, 53, 128, 70, 48, 52, 52,
+ 128, 70, 48, 52, 51, 128, 70, 48, 52, 50, 128, 70, 48, 52, 49, 128, 70,
+ 48, 52, 48, 128, 70, 48, 51, 57, 128, 70, 48, 51, 56, 65, 128, 70, 48,
+ 51, 56, 128, 70, 48, 51, 55, 65, 128, 70, 48, 51, 55, 128, 70, 48, 51,
+ 54, 128, 70, 48, 51, 53, 128, 70, 48, 51, 52, 128, 70, 48, 51, 51, 128,
+ 70, 48, 51, 50, 128, 70, 48, 51, 49, 65, 128, 70, 48, 51, 49, 128, 70,
+ 48, 51, 48, 128, 70, 48, 50, 57, 128, 70, 48, 50, 56, 128, 70, 48, 50,
+ 55, 128, 70, 48, 50, 54, 128, 70, 48, 50, 53, 128, 70, 48, 50, 52, 128,
+ 70, 48, 50, 51, 128, 70, 48, 50, 50, 128, 70, 48, 50, 49, 65, 128, 70,
+ 48, 50, 49, 128, 70, 48, 50, 48, 128, 70, 48, 49, 57, 128, 70, 48, 49,
+ 56, 128, 70, 48, 49, 55, 128, 70, 48, 49, 54, 128, 70, 48, 49, 53, 128,
+ 70, 48, 49, 52, 128, 70, 48, 49, 51, 65, 128, 70, 48, 49, 51, 128, 70,
+ 48, 49, 50, 128, 70, 48, 49, 49, 128, 70, 48, 49, 48, 128, 70, 48, 48,
+ 57, 128, 70, 48, 48, 56, 128, 70, 48, 48, 55, 128, 70, 48, 48, 54, 128,
+ 70, 48, 48, 53, 128, 70, 48, 48, 52, 128, 70, 48, 48, 51, 128, 70, 48,
+ 48, 50, 128, 70, 48, 48, 49, 65, 128, 70, 48, 48, 49, 128, 69, 90, 83,
+ 128, 69, 90, 200, 69, 90, 69, 78, 128, 69, 90, 69, 206, 69, 90, 128, 69,
+ 89, 89, 89, 128, 69, 89, 69, 83, 128, 69, 89, 69, 211, 69, 89, 69, 76,
+ 65, 83, 72, 69, 211, 69, 89, 69, 71, 76, 65, 83, 83, 69, 83, 128, 69, 89,
+ 69, 71, 65, 90, 69, 45, 87, 65, 76, 76, 80, 76, 65, 78, 197, 69, 89, 69,
+ 71, 65, 90, 69, 45, 70, 76, 79, 79, 82, 80, 76, 65, 78, 197, 69, 89, 69,
+ 66, 82, 79, 87, 211, 69, 89, 197, 69, 89, 66, 69, 89, 70, 73, 76, 73,
+ 128, 69, 89, 65, 78, 78, 65, 128, 69, 88, 84, 82, 69, 77, 69, 76, 217,
+ 69, 88, 84, 82, 65, 84, 69, 82, 82, 69, 83, 84, 82, 73, 65, 204, 69, 88,
+ 84, 82, 65, 45, 76, 79, 215, 69, 88, 84, 82, 65, 45, 72, 73, 71, 200, 69,
+ 88, 84, 82, 193, 69, 88, 84, 69, 78, 83, 73, 79, 78, 128, 69, 88, 84, 69,
+ 78, 68, 69, 68, 128, 69, 88, 84, 69, 78, 68, 69, 196, 69, 88, 80, 82, 69,
+ 83, 83, 73, 79, 78, 76, 69, 83, 211, 69, 88, 80, 79, 78, 69, 78, 212, 69,
+ 88, 79, 128, 69, 88, 207, 69, 88, 73, 83, 84, 83, 128, 69, 88, 73, 83,
+ 84, 128, 69, 88, 72, 65, 85, 83, 84, 73, 79, 78, 128, 69, 88, 72, 65, 76,
+ 69, 128, 69, 88, 67, 76, 65, 77, 65, 84, 73, 79, 78, 128, 69, 88, 67, 76,
+ 65, 77, 65, 84, 73, 79, 206, 69, 88, 67, 73, 84, 69, 77, 69, 78, 84, 128,
+ 69, 88, 67, 72, 65, 78, 71, 69, 128, 69, 88, 67, 69, 83, 83, 128, 69, 88,
+ 67, 69, 76, 76, 69, 78, 84, 128, 69, 87, 69, 128, 69, 86, 69, 82, 217,
+ 69, 86, 69, 82, 71, 82, 69, 69, 206, 69, 86, 69, 78, 73, 78, 71, 128, 69,
+ 85, 82, 79, 80, 69, 65, 206, 69, 85, 82, 79, 80, 69, 45, 65, 70, 82, 73,
+ 67, 65, 128, 69, 85, 82, 79, 45, 67, 85, 82, 82, 69, 78, 67, 217, 69, 85,
+ 82, 207, 69, 85, 76, 69, 210, 69, 85, 45, 85, 128, 69, 85, 45, 79, 128,
+ 69, 85, 45, 69, 85, 128, 69, 85, 45, 69, 79, 128, 69, 85, 45, 69, 128,
+ 69, 85, 45, 65, 128, 69, 84, 88, 128, 69, 84, 78, 65, 72, 84, 65, 128,
+ 69, 84, 72, 69, 204, 69, 84, 69, 82, 79, 206, 69, 84, 69, 82, 78, 73, 84,
+ 89, 128, 69, 84, 69, 82, 78, 73, 84, 217, 69, 84, 66, 128, 69, 83, 90,
+ 128, 69, 83, 85, 75, 85, 85, 68, 79, 128, 69, 83, 84, 73, 77, 65, 84, 69,
+ 83, 128, 69, 83, 84, 73, 77, 65, 84, 69, 196, 69, 83, 72, 69, 51, 128,
+ 69, 83, 72, 50, 49, 128, 69, 83, 72, 49, 54, 128, 69, 83, 67, 65, 80, 69,
+ 128, 69, 83, 67, 128, 69, 83, 65, 128, 69, 83, 45, 84, 69, 128, 69, 83,
+ 45, 51, 128, 69, 83, 45, 50, 128, 69, 83, 45, 49, 128, 69, 82, 82, 79,
+ 82, 45, 66, 65, 82, 82, 69, 196, 69, 82, 82, 128, 69, 82, 73, 78, 50,
+ 128, 69, 82, 73, 78, 178, 69, 82, 71, 128, 69, 82, 65, 83, 197, 69, 81,
+ 85, 73, 86, 65, 76, 69, 78, 212, 69, 81, 85, 73, 76, 65, 84, 69, 82, 65,
+ 204, 69, 81, 85, 73, 68, 128, 69, 81, 85, 73, 65, 78, 71, 85, 76, 65,
210, 69, 81, 85, 65, 76, 83, 128, 69, 81, 85, 65, 76, 211, 69, 81, 85,
65, 76, 128, 69, 80, 83, 73, 76, 79, 78, 128, 69, 80, 83, 73, 76, 79,
206, 69, 80, 79, 67, 72, 128, 69, 80, 73, 71, 82, 65, 80, 72, 73, 195,
69, 80, 73, 68, 65, 85, 82, 69, 65, 206, 69, 80, 69, 78, 84, 72, 69, 84,
- 73, 195, 69, 80, 69, 71, 69, 82, 77, 65, 128, 69, 79, 84, 128, 69, 79,
- 77, 128, 69, 79, 76, 72, 88, 128, 69, 79, 76, 128, 69, 79, 72, 128, 69,
- 78, 89, 128, 69, 78, 86, 69, 76, 79, 80, 69, 128, 69, 78, 86, 69, 76, 79,
- 80, 197, 69, 78, 85, 77, 69, 82, 65, 84, 73, 79, 206, 69, 78, 84, 82, 89,
- 45, 50, 128, 69, 78, 84, 82, 89, 45, 49, 128, 69, 78, 84, 82, 89, 128,
- 69, 78, 84, 82, 217, 69, 78, 84, 72, 85, 83, 73, 65, 83, 77, 128, 69, 78,
- 84, 69, 82, 80, 82, 73, 83, 69, 128, 69, 78, 84, 69, 82, 73, 78, 199, 69,
- 78, 84, 69, 82, 128, 69, 78, 84, 69, 210, 69, 78, 81, 85, 73, 82, 89,
- 128, 69, 78, 81, 128, 69, 78, 79, 211, 69, 78, 78, 128, 69, 78, 76, 65,
- 82, 71, 69, 77, 69, 78, 84, 128, 69, 78, 71, 73, 78, 69, 128, 69, 78, 68,
- 79, 70, 79, 78, 79, 78, 128, 69, 78, 68, 73, 78, 199, 69, 78, 68, 69, 80,
- 128, 69, 78, 68, 69, 65, 86, 79, 85, 82, 128, 69, 78, 67, 79, 85, 78, 84,
- 69, 82, 83, 128, 69, 78, 67, 76, 79, 83, 85, 82, 69, 128, 69, 78, 67, 76,
- 79, 83, 73, 78, 199, 69, 78, 67, 128, 69, 78, 65, 82, 88, 73, 211, 69,
- 78, 65, 82, 77, 79, 78, 73, 79, 211, 69, 77, 80, 84, 217, 69, 77, 80, 72,
- 65, 84, 73, 195, 69, 77, 80, 72, 65, 83, 73, 211, 69, 77, 66, 82, 79, 73,
- 68, 69, 82, 89, 128, 69, 77, 66, 76, 69, 77, 128, 69, 77, 66, 69, 76, 76,
- 73, 83, 72, 77, 69, 78, 84, 128, 69, 77, 66, 69, 68, 68, 73, 78, 71, 128,
- 69, 76, 84, 128, 69, 76, 76, 73, 80, 84, 73, 195, 69, 76, 76, 73, 80, 83,
- 73, 83, 128, 69, 76, 76, 73, 80, 83, 69, 128, 69, 76, 73, 70, 73, 128,
- 69, 76, 69, 86, 69, 78, 45, 84, 72, 73, 82, 84, 89, 128, 69, 76, 69, 86,
- 69, 78, 128, 69, 76, 69, 86, 69, 206, 69, 76, 69, 80, 72, 65, 78, 84,
- 128, 69, 76, 69, 77, 69, 78, 212, 69, 76, 69, 67, 84, 82, 73, 67, 65,
- 204, 69, 76, 69, 67, 84, 82, 73, 195, 69, 76, 65, 70, 82, 79, 78, 128,
- 69, 75, 83, 84, 82, 69, 80, 84, 79, 78, 128, 69, 75, 83, 128, 69, 75, 70,
- 79, 78, 73, 84, 73, 75, 79, 78, 128, 69, 75, 65, 82, 65, 128, 69, 74, 69,
- 67, 212, 69, 73, 83, 128, 69, 73, 71, 72, 84, 89, 128, 69, 73, 71, 72,
- 84, 217, 69, 73, 71, 72, 84, 72, 83, 128, 69, 73, 71, 72, 84, 72, 211,
- 69, 73, 71, 72, 84, 72, 128, 69, 73, 71, 72, 84, 69, 69, 78, 128, 69, 73,
- 71, 72, 84, 69, 69, 206, 69, 73, 71, 72, 84, 45, 84, 72, 73, 82, 84, 89,
- 128, 69, 73, 69, 128, 69, 72, 87, 65, 218, 69, 71, 89, 80, 84, 79, 76,
- 79, 71, 73, 67, 65, 204, 69, 71, 73, 82, 128, 69, 71, 71, 128, 69, 69,
+ 73, 195, 69, 80, 69, 71, 69, 82, 77, 65, 128, 69, 80, 65, 67, 212, 69,
+ 79, 84, 128, 69, 79, 77, 128, 69, 79, 76, 72, 88, 128, 69, 79, 76, 128,
+ 69, 79, 72, 128, 69, 78, 89, 128, 69, 78, 86, 69, 76, 79, 80, 69, 128,
+ 69, 78, 86, 69, 76, 79, 80, 197, 69, 78, 85, 77, 69, 82, 65, 84, 73, 79,
+ 206, 69, 78, 84, 82, 89, 45, 50, 128, 69, 78, 84, 82, 89, 45, 49, 128,
+ 69, 78, 84, 82, 89, 128, 69, 78, 84, 82, 217, 69, 78, 84, 72, 85, 83, 73,
+ 65, 83, 77, 128, 69, 78, 84, 69, 82, 80, 82, 73, 83, 69, 128, 69, 78, 84,
+ 69, 82, 73, 78, 199, 69, 78, 84, 69, 82, 128, 69, 78, 84, 69, 210, 69,
+ 78, 84, 45, 83, 72, 65, 80, 69, 196, 69, 78, 81, 85, 73, 82, 89, 128, 69,
+ 78, 81, 128, 69, 78, 79, 211, 69, 78, 78, 73, 128, 69, 78, 78, 128, 69,
+ 78, 76, 65, 82, 71, 69, 77, 69, 78, 84, 128, 69, 78, 71, 73, 78, 69, 128,
+ 69, 78, 68, 79, 70, 79, 78, 79, 78, 128, 69, 78, 68, 73, 78, 199, 69, 78,
+ 68, 69, 80, 128, 69, 78, 68, 69, 65, 86, 79, 85, 82, 128, 69, 78, 67, 79,
+ 85, 78, 84, 69, 82, 83, 128, 69, 78, 67, 76, 79, 83, 85, 82, 69, 83, 128,
+ 69, 78, 67, 76, 79, 83, 85, 82, 69, 128, 69, 78, 67, 76, 79, 83, 73, 78,
+ 199, 69, 78, 67, 128, 69, 78, 65, 82, 88, 73, 211, 69, 78, 65, 82, 77,
+ 79, 78, 73, 79, 211, 69, 77, 80, 84, 217, 69, 77, 80, 72, 65, 84, 73,
+ 195, 69, 77, 80, 72, 65, 83, 73, 211, 69, 77, 79, 74, 201, 69, 77, 66,
+ 82, 79, 73, 68, 69, 82, 89, 128, 69, 77, 66, 76, 69, 77, 128, 69, 77, 66,
+ 69, 76, 76, 73, 83, 72, 77, 69, 78, 84, 128, 69, 77, 66, 69, 68, 68, 73,
+ 78, 71, 128, 69, 76, 89, 128, 69, 76, 84, 128, 69, 76, 76, 73, 80, 84,
+ 73, 195, 69, 76, 76, 73, 80, 83, 73, 83, 128, 69, 76, 76, 73, 80, 83, 69,
+ 128, 69, 76, 73, 70, 73, 128, 69, 76, 69, 86, 69, 78, 45, 84, 72, 73, 82,
+ 84, 89, 128, 69, 76, 69, 86, 69, 78, 128, 69, 76, 69, 86, 69, 206, 69,
+ 76, 69, 80, 72, 65, 78, 84, 128, 69, 76, 69, 77, 69, 78, 212, 69, 76, 69,
+ 67, 84, 82, 73, 67, 65, 204, 69, 76, 69, 67, 84, 82, 73, 195, 69, 76, 66,
+ 65, 83, 65, 206, 69, 76, 65, 77, 73, 84, 69, 128, 69, 76, 65, 77, 73, 84,
+ 197, 69, 76, 65, 70, 82, 79, 78, 128, 69, 75, 83, 84, 82, 69, 80, 84, 79,
+ 78, 128, 69, 75, 83, 128, 69, 75, 70, 79, 78, 73, 84, 73, 75, 79, 78,
+ 128, 69, 75, 65, 82, 65, 128, 69, 75, 65, 77, 128, 69, 74, 69, 67, 212,
+ 69, 73, 83, 128, 69, 73, 71, 72, 84, 89, 128, 69, 73, 71, 72, 84, 217,
+ 69, 73, 71, 72, 84, 72, 83, 128, 69, 73, 71, 72, 84, 72, 211, 69, 73, 71,
+ 72, 84, 72, 128, 69, 73, 71, 72, 84, 69, 69, 78, 128, 69, 73, 71, 72, 84,
+ 69, 69, 206, 69, 73, 71, 72, 84, 45, 84, 72, 73, 82, 84, 89, 128, 69, 73,
+ 69, 128, 69, 72, 87, 65, 218, 69, 71, 89, 80, 84, 79, 76, 79, 71, 73, 67,
+ 65, 204, 69, 71, 89, 128, 69, 71, 73, 82, 128, 69, 71, 71, 128, 69, 69,
89, 65, 78, 78, 65, 128, 69, 69, 75, 65, 65, 128, 69, 69, 72, 128, 69,
69, 66, 69, 69, 70, 73, 76, 73, 128, 69, 68, 73, 84, 79, 82, 73, 65, 204,
- 69, 68, 73, 78, 128, 69, 68, 68, 128, 69, 66, 69, 70, 73, 76, 73, 128,
- 69, 65, 83, 84, 69, 82, 206, 69, 65, 83, 212, 69, 65, 82, 84, 72, 76,
- 217, 69, 65, 82, 84, 72, 128, 69, 65, 82, 84, 200, 69, 65, 82, 83, 128,
- 69, 65, 82, 76, 217, 69, 65, 77, 72, 65, 78, 67, 72, 79, 76, 76, 128, 69,
- 65, 71, 76, 69, 128, 69, 65, 68, 72, 65, 68, 72, 128, 69, 65, 66, 72, 65,
- 68, 72, 128, 69, 178, 69, 48, 51, 56, 128, 69, 48, 51, 55, 128, 69, 48,
- 51, 54, 128, 69, 48, 51, 52, 65, 128, 69, 48, 51, 52, 128, 69, 48, 51,
- 51, 128, 69, 48, 51, 50, 128, 69, 48, 51, 49, 128, 69, 48, 51, 48, 128,
- 69, 48, 50, 57, 128, 69, 48, 50, 56, 65, 128, 69, 48, 50, 56, 128, 69,
- 48, 50, 55, 128, 69, 48, 50, 54, 128, 69, 48, 50, 53, 128, 69, 48, 50,
- 52, 128, 69, 48, 50, 51, 128, 69, 48, 50, 50, 128, 69, 48, 50, 49, 128,
- 69, 48, 50, 48, 65, 128, 69, 48, 50, 48, 128, 69, 48, 49, 57, 128, 69,
- 48, 49, 56, 128, 69, 48, 49, 55, 65, 128, 69, 48, 49, 55, 128, 69, 48,
- 49, 54, 65, 128, 69, 48, 49, 54, 128, 69, 48, 49, 53, 128, 69, 48, 49,
- 52, 128, 69, 48, 49, 51, 128, 69, 48, 49, 50, 128, 69, 48, 49, 49, 128,
- 69, 48, 49, 48, 128, 69, 48, 48, 57, 65, 128, 69, 48, 48, 57, 128, 69,
- 48, 48, 56, 65, 128, 69, 48, 48, 56, 128, 69, 48, 48, 55, 128, 69, 48,
- 48, 54, 128, 69, 48, 48, 53, 128, 69, 48, 48, 52, 128, 69, 48, 48, 51,
- 128, 69, 48, 48, 50, 128, 69, 48, 48, 49, 128, 69, 45, 77, 65, 73, 204,
- 68, 90, 90, 69, 128, 68, 90, 90, 65, 128, 68, 90, 87, 69, 128, 68, 90,
- 85, 128, 68, 90, 79, 128, 68, 90, 74, 69, 128, 68, 90, 73, 128, 68, 90,
+ 69, 68, 73, 78, 128, 69, 68, 68, 128, 69, 67, 83, 128, 69, 66, 69, 70,
+ 73, 76, 73, 128, 69, 65, 83, 84, 69, 82, 206, 69, 65, 83, 84, 128, 69,
+ 65, 83, 212, 69, 65, 82, 84, 72, 76, 217, 69, 65, 82, 84, 72, 128, 69,
+ 65, 82, 84, 200, 69, 65, 82, 83, 128, 69, 65, 82, 76, 217, 69, 65, 77,
+ 72, 65, 78, 67, 72, 79, 76, 76, 128, 69, 65, 71, 76, 69, 128, 69, 65, 68,
+ 72, 65, 68, 72, 128, 69, 65, 66, 72, 65, 68, 72, 128, 69, 178, 69, 48,
+ 51, 56, 128, 69, 48, 51, 55, 128, 69, 48, 51, 54, 128, 69, 48, 51, 52,
+ 65, 128, 69, 48, 51, 52, 128, 69, 48, 51, 51, 128, 69, 48, 51, 50, 128,
+ 69, 48, 51, 49, 128, 69, 48, 51, 48, 128, 69, 48, 50, 57, 128, 69, 48,
+ 50, 56, 65, 128, 69, 48, 50, 56, 128, 69, 48, 50, 55, 128, 69, 48, 50,
+ 54, 128, 69, 48, 50, 53, 128, 69, 48, 50, 52, 128, 69, 48, 50, 51, 128,
+ 69, 48, 50, 50, 128, 69, 48, 50, 49, 128, 69, 48, 50, 48, 65, 128, 69,
+ 48, 50, 48, 128, 69, 48, 49, 57, 128, 69, 48, 49, 56, 128, 69, 48, 49,
+ 55, 65, 128, 69, 48, 49, 55, 128, 69, 48, 49, 54, 65, 128, 69, 48, 49,
+ 54, 128, 69, 48, 49, 53, 128, 69, 48, 49, 52, 128, 69, 48, 49, 51, 128,
+ 69, 48, 49, 50, 128, 69, 48, 49, 49, 128, 69, 48, 49, 48, 128, 69, 48,
+ 48, 57, 65, 128, 69, 48, 48, 57, 128, 69, 48, 48, 56, 65, 128, 69, 48,
+ 48, 56, 128, 69, 48, 48, 55, 128, 69, 48, 48, 54, 128, 69, 48, 48, 53,
+ 128, 69, 48, 48, 52, 128, 69, 48, 48, 51, 128, 69, 48, 48, 50, 128, 69,
+ 48, 48, 49, 128, 69, 45, 77, 65, 73, 204, 68, 90, 90, 72, 69, 128, 68,
+ 90, 90, 69, 128, 68, 90, 90, 65, 128, 68, 90, 89, 65, 89, 128, 68, 90,
+ 87, 69, 128, 68, 90, 85, 128, 68, 90, 79, 128, 68, 90, 74, 69, 128, 68,
+ 90, 73, 84, 65, 128, 68, 90, 73, 128, 68, 90, 72, 79, 73, 128, 68, 90,
72, 69, 128, 68, 90, 72, 65, 128, 68, 90, 69, 76, 79, 128, 68, 90, 69,
- 69, 128, 68, 90, 69, 128, 68, 90, 65, 65, 128, 68, 90, 65, 128, 68, 90,
- 128, 68, 218, 68, 89, 79, 128, 68, 89, 207, 68, 89, 69, 72, 128, 68, 89,
- 69, 200, 68, 87, 79, 128, 68, 87, 69, 128, 68, 87, 65, 128, 68, 86, 73,
+ 69, 128, 68, 90, 69, 128, 68, 90, 65, 89, 128, 68, 90, 65, 65, 128, 68,
+ 90, 65, 128, 68, 90, 128, 68, 218, 68, 89, 79, 128, 68, 89, 207, 68, 89,
+ 78, 65, 77, 73, 195, 68, 89, 69, 72, 128, 68, 89, 69, 200, 68, 89, 65,
+ 78, 128, 68, 87, 79, 128, 68, 87, 69, 128, 68, 87, 65, 128, 68, 86, 73,
83, 86, 65, 82, 65, 128, 68, 86, 68, 128, 68, 86, 128, 68, 85, 84, 73,
69, 83, 128, 68, 85, 83, 75, 128, 68, 85, 83, 72, 69, 78, 78, 65, 128,
68, 85, 82, 65, 84, 73, 79, 78, 128, 68, 85, 82, 50, 128, 68, 85, 80, 79,
78, 68, 73, 85, 211, 68, 85, 79, 88, 128, 68, 85, 79, 128, 68, 85, 78,
52, 128, 68, 85, 78, 51, 128, 68, 85, 78, 179, 68, 85, 77, 128, 68, 85,
- 204, 68, 85, 72, 128, 68, 85, 71, 85, 68, 128, 68, 85, 66, 50, 128, 68,
- 85, 66, 128, 68, 85, 194, 68, 82, 89, 128, 68, 82, 217, 68, 82, 85, 77,
- 128, 68, 82, 85, 205, 68, 82, 79, 80, 83, 128, 68, 82, 79, 80, 76, 69,
- 84, 128, 68, 82, 79, 80, 45, 83, 72, 65, 68, 79, 87, 69, 196, 68, 82, 79,
- 77, 69, 68, 65, 82, 217, 68, 82, 73, 86, 69, 128, 68, 82, 73, 86, 197,
- 68, 82, 73, 78, 75, 128, 68, 82, 73, 204, 68, 82, 69, 83, 83, 128, 68,
- 82, 65, 85, 71, 72, 84, 211, 68, 82, 65, 77, 128, 68, 82, 65, 205, 68,
- 82, 65, 71, 79, 78, 128, 68, 82, 65, 71, 79, 206, 68, 82, 65, 70, 84, 73,
- 78, 199, 68, 82, 65, 67, 72, 77, 65, 83, 128, 68, 82, 65, 67, 72, 77, 65,
- 128, 68, 82, 65, 67, 72, 77, 193, 68, 79, 87, 78, 87, 65, 82, 68, 83,
- 128, 68, 79, 87, 78, 87, 65, 82, 68, 211, 68, 79, 87, 78, 45, 80, 79, 73,
+ 204, 68, 85, 72, 128, 68, 85, 71, 85, 68, 128, 68, 85, 199, 68, 85, 66,
+ 50, 128, 68, 85, 66, 128, 68, 85, 194, 68, 82, 89, 128, 68, 82, 217, 68,
+ 82, 85, 77, 128, 68, 82, 85, 205, 68, 82, 79, 80, 83, 128, 68, 82, 79,
+ 80, 76, 69, 84, 128, 68, 82, 79, 80, 45, 83, 72, 65, 68, 79, 87, 69, 196,
+ 68, 82, 79, 77, 69, 68, 65, 82, 217, 68, 82, 73, 86, 69, 128, 68, 82, 73,
+ 86, 197, 68, 82, 73, 78, 75, 128, 68, 82, 73, 204, 68, 82, 69, 83, 83,
+ 128, 68, 82, 69, 65, 77, 217, 68, 82, 65, 85, 71, 72, 84, 211, 68, 82,
+ 65, 77, 128, 68, 82, 65, 205, 68, 82, 65, 71, 79, 78, 128, 68, 82, 65,
+ 71, 79, 206, 68, 82, 65, 70, 84, 73, 78, 199, 68, 82, 65, 67, 72, 77, 65,
+ 83, 128, 68, 82, 65, 67, 72, 77, 65, 128, 68, 82, 65, 67, 72, 77, 193,
+ 68, 79, 87, 78, 87, 65, 82, 68, 83, 128, 68, 79, 87, 78, 45, 80, 79, 73,
78, 84, 73, 78, 199, 68, 79, 87, 78, 128, 68, 79, 86, 69, 128, 68, 79,
- 85, 71, 72, 78, 85, 84, 128, 68, 79, 85, 66, 84, 128, 68, 79, 85, 66, 76,
- 69, 196, 68, 79, 85, 66, 76, 69, 45, 76, 73, 78, 197, 68, 79, 85, 66, 76,
- 69, 45, 69, 78, 68, 69, 196, 68, 79, 85, 66, 76, 69, 128, 68, 79, 84, 84,
- 69, 68, 45, 80, 128, 68, 79, 84, 84, 69, 68, 45, 78, 128, 68, 79, 84, 84,
- 69, 68, 45, 76, 128, 68, 79, 84, 84, 69, 68, 128, 68, 79, 84, 84, 69,
- 196, 68, 79, 84, 83, 45, 56, 128, 68, 79, 84, 83, 45, 55, 56, 128, 68,
- 79, 84, 83, 45, 55, 128, 68, 79, 84, 83, 45, 54, 56, 128, 68, 79, 84, 83,
- 45, 54, 55, 56, 128, 68, 79, 84, 83, 45, 54, 55, 128, 68, 79, 84, 83, 45,
- 54, 128, 68, 79, 84, 83, 45, 53, 56, 128, 68, 79, 84, 83, 45, 53, 55, 56,
- 128, 68, 79, 84, 83, 45, 53, 55, 128, 68, 79, 84, 83, 45, 53, 54, 56,
- 128, 68, 79, 84, 83, 45, 53, 54, 55, 56, 128, 68, 79, 84, 83, 45, 53, 54,
- 55, 128, 68, 79, 84, 83, 45, 53, 54, 128, 68, 79, 84, 83, 45, 53, 128,
- 68, 79, 84, 83, 45, 52, 56, 128, 68, 79, 84, 83, 45, 52, 55, 56, 128, 68,
- 79, 84, 83, 45, 52, 55, 128, 68, 79, 84, 83, 45, 52, 54, 56, 128, 68, 79,
- 84, 83, 45, 52, 54, 55, 56, 128, 68, 79, 84, 83, 45, 52, 54, 55, 128, 68,
- 79, 84, 83, 45, 52, 54, 128, 68, 79, 84, 83, 45, 52, 53, 56, 128, 68, 79,
- 84, 83, 45, 52, 53, 55, 56, 128, 68, 79, 84, 83, 45, 52, 53, 55, 128, 68,
- 79, 84, 83, 45, 52, 53, 54, 56, 128, 68, 79, 84, 83, 45, 52, 53, 54, 55,
- 56, 128, 68, 79, 84, 83, 45, 52, 53, 54, 55, 128, 68, 79, 84, 83, 45, 52,
- 53, 54, 128, 68, 79, 84, 83, 45, 52, 53, 128, 68, 79, 84, 83, 45, 52,
- 128, 68, 79, 84, 83, 45, 51, 56, 128, 68, 79, 84, 83, 45, 51, 55, 56,
- 128, 68, 79, 84, 83, 45, 51, 55, 128, 68, 79, 84, 83, 45, 51, 54, 56,
- 128, 68, 79, 84, 83, 45, 51, 54, 55, 56, 128, 68, 79, 84, 83, 45, 51, 54,
- 55, 128, 68, 79, 84, 83, 45, 51, 54, 128, 68, 79, 84, 83, 45, 51, 53, 56,
- 128, 68, 79, 84, 83, 45, 51, 53, 55, 56, 128, 68, 79, 84, 83, 45, 51, 53,
- 55, 128, 68, 79, 84, 83, 45, 51, 53, 54, 56, 128, 68, 79, 84, 83, 45, 51,
- 53, 54, 55, 56, 128, 68, 79, 84, 83, 45, 51, 53, 54, 55, 128, 68, 79, 84,
- 83, 45, 51, 53, 54, 128, 68, 79, 84, 83, 45, 51, 53, 128, 68, 79, 84, 83,
- 45, 51, 52, 56, 128, 68, 79, 84, 83, 45, 51, 52, 55, 56, 128, 68, 79, 84,
- 83, 45, 51, 52, 55, 128, 68, 79, 84, 83, 45, 51, 52, 54, 56, 128, 68, 79,
- 84, 83, 45, 51, 52, 54, 55, 56, 128, 68, 79, 84, 83, 45, 51, 52, 54, 55,
- 128, 68, 79, 84, 83, 45, 51, 52, 54, 128, 68, 79, 84, 83, 45, 51, 52, 53,
- 56, 128, 68, 79, 84, 83, 45, 51, 52, 53, 55, 56, 128, 68, 79, 84, 83, 45,
- 51, 52, 53, 55, 128, 68, 79, 84, 83, 45, 51, 52, 53, 54, 56, 128, 68, 79,
- 84, 83, 45, 51, 52, 53, 54, 55, 56, 128, 68, 79, 84, 83, 45, 51, 52, 53,
- 54, 55, 128, 68, 79, 84, 83, 45, 51, 52, 53, 54, 128, 68, 79, 84, 83, 45,
- 51, 52, 53, 128, 68, 79, 84, 83, 45, 51, 52, 128, 68, 79, 84, 83, 45, 51,
- 128, 68, 79, 84, 83, 45, 50, 56, 128, 68, 79, 84, 83, 45, 50, 55, 56,
- 128, 68, 79, 84, 83, 45, 50, 55, 128, 68, 79, 84, 83, 45, 50, 54, 56,
+ 86, 197, 68, 79, 85, 71, 72, 78, 85, 84, 128, 68, 79, 85, 66, 84, 128,
+ 68, 79, 85, 66, 76, 69, 196, 68, 79, 85, 66, 76, 69, 45, 76, 73, 78, 197,
+ 68, 79, 85, 66, 76, 69, 45, 69, 78, 68, 69, 196, 68, 79, 85, 66, 76, 69,
+ 128, 68, 79, 84, 84, 69, 68, 45, 80, 128, 68, 79, 84, 84, 69, 68, 45, 78,
+ 128, 68, 79, 84, 84, 69, 68, 45, 76, 128, 68, 79, 84, 84, 69, 68, 128,
+ 68, 79, 84, 84, 69, 196, 68, 79, 84, 83, 45, 56, 128, 68, 79, 84, 83, 45,
+ 55, 56, 128, 68, 79, 84, 83, 45, 55, 128, 68, 79, 84, 83, 45, 54, 56,
+ 128, 68, 79, 84, 83, 45, 54, 55, 56, 128, 68, 79, 84, 83, 45, 54, 55,
+ 128, 68, 79, 84, 83, 45, 54, 128, 68, 79, 84, 83, 45, 53, 56, 128, 68,
+ 79, 84, 83, 45, 53, 55, 56, 128, 68, 79, 84, 83, 45, 53, 55, 128, 68, 79,
+ 84, 83, 45, 53, 54, 56, 128, 68, 79, 84, 83, 45, 53, 54, 55, 56, 128, 68,
+ 79, 84, 83, 45, 53, 54, 55, 128, 68, 79, 84, 83, 45, 53, 54, 128, 68, 79,
+ 84, 83, 45, 53, 128, 68, 79, 84, 83, 45, 52, 56, 128, 68, 79, 84, 83, 45,
+ 52, 55, 56, 128, 68, 79, 84, 83, 45, 52, 55, 128, 68, 79, 84, 83, 45, 52,
+ 54, 56, 128, 68, 79, 84, 83, 45, 52, 54, 55, 56, 128, 68, 79, 84, 83, 45,
+ 52, 54, 55, 128, 68, 79, 84, 83, 45, 52, 54, 128, 68, 79, 84, 83, 45, 52,
+ 53, 56, 128, 68, 79, 84, 83, 45, 52, 53, 55, 56, 128, 68, 79, 84, 83, 45,
+ 52, 53, 55, 128, 68, 79, 84, 83, 45, 52, 53, 54, 56, 128, 68, 79, 84, 83,
+ 45, 52, 53, 54, 55, 56, 128, 68, 79, 84, 83, 45, 52, 53, 54, 55, 128, 68,
+ 79, 84, 83, 45, 52, 53, 54, 128, 68, 79, 84, 83, 45, 52, 53, 128, 68, 79,
+ 84, 83, 45, 52, 128, 68, 79, 84, 83, 45, 51, 56, 128, 68, 79, 84, 83, 45,
+ 51, 55, 56, 128, 68, 79, 84, 83, 45, 51, 55, 128, 68, 79, 84, 83, 45, 51,
+ 54, 56, 128, 68, 79, 84, 83, 45, 51, 54, 55, 56, 128, 68, 79, 84, 83, 45,
+ 51, 54, 55, 128, 68, 79, 84, 83, 45, 51, 54, 128, 68, 79, 84, 83, 45, 51,
+ 53, 56, 128, 68, 79, 84, 83, 45, 51, 53, 55, 56, 128, 68, 79, 84, 83, 45,
+ 51, 53, 55, 128, 68, 79, 84, 83, 45, 51, 53, 54, 56, 128, 68, 79, 84, 83,
+ 45, 51, 53, 54, 55, 56, 128, 68, 79, 84, 83, 45, 51, 53, 54, 55, 128, 68,
+ 79, 84, 83, 45, 51, 53, 54, 128, 68, 79, 84, 83, 45, 51, 53, 128, 68, 79,
+ 84, 83, 45, 51, 52, 56, 128, 68, 79, 84, 83, 45, 51, 52, 55, 56, 128, 68,
+ 79, 84, 83, 45, 51, 52, 55, 128, 68, 79, 84, 83, 45, 51, 52, 54, 56, 128,
+ 68, 79, 84, 83, 45, 51, 52, 54, 55, 56, 128, 68, 79, 84, 83, 45, 51, 52,
+ 54, 55, 128, 68, 79, 84, 83, 45, 51, 52, 54, 128, 68, 79, 84, 83, 45, 51,
+ 52, 53, 56, 128, 68, 79, 84, 83, 45, 51, 52, 53, 55, 56, 128, 68, 79, 84,
+ 83, 45, 51, 52, 53, 55, 128, 68, 79, 84, 83, 45, 51, 52, 53, 54, 56, 128,
+ 68, 79, 84, 83, 45, 51, 52, 53, 54, 55, 56, 128, 68, 79, 84, 83, 45, 51,
+ 52, 53, 54, 55, 128, 68, 79, 84, 83, 45, 51, 52, 53, 54, 128, 68, 79, 84,
+ 83, 45, 51, 52, 53, 128, 68, 79, 84, 83, 45, 51, 52, 128, 68, 79, 84, 83,
+ 45, 51, 128, 68, 79, 84, 83, 45, 50, 56, 128, 68, 79, 84, 83, 45, 50, 55,
+ 56, 128, 68, 79, 84, 83, 45, 50, 55, 128, 68, 79, 84, 83, 45, 50, 54, 56,
128, 68, 79, 84, 83, 45, 50, 54, 55, 56, 128, 68, 79, 84, 83, 45, 50, 54,
55, 128, 68, 79, 84, 83, 45, 50, 54, 128, 68, 79, 84, 83, 45, 50, 53, 56,
128, 68, 79, 84, 83, 45, 50, 53, 55, 56, 128, 68, 79, 84, 83, 45, 50, 53,
@@ -3952,392 +4286,436 @@ static unsigned char lexicon[] = {
71, 128, 68, 79, 78, 71, 128, 68, 79, 77, 65, 73, 206, 68, 79, 76, 80,
72, 73, 78, 128, 68, 79, 76, 76, 83, 128, 68, 79, 76, 76, 65, 210, 68,
79, 76, 73, 85, 77, 128, 68, 79, 75, 77, 65, 73, 128, 68, 79, 73, 84,
- 128, 68, 79, 71, 128, 68, 79, 199, 68, 79, 69, 211, 68, 79, 68, 69, 75,
- 65, 84, 65, 128, 68, 79, 66, 82, 79, 128, 68, 79, 65, 67, 72, 65, 83, 72,
- 77, 69, 69, 128, 68, 79, 65, 67, 72, 65, 83, 72, 77, 69, 197, 68, 79, 65,
- 128, 68, 79, 45, 79, 128, 68, 77, 128, 68, 205, 68, 76, 85, 128, 68, 76,
- 79, 128, 68, 76, 73, 128, 68, 76, 72, 89, 65, 128, 68, 76, 72, 65, 128,
- 68, 76, 69, 69, 128, 68, 76, 65, 128, 68, 76, 128, 68, 75, 65, 82, 128,
- 68, 75, 65, 210, 68, 74, 69, 82, 86, 73, 128, 68, 74, 69, 82, 86, 128,
- 68, 74, 69, 128, 68, 74, 65, 128, 68, 73, 90, 90, 217, 68, 73, 86, 79,
- 82, 67, 197, 68, 73, 86, 73, 83, 73, 79, 78, 128, 68, 73, 86, 73, 83, 73,
- 79, 206, 68, 73, 86, 73, 78, 65, 84, 73, 79, 78, 128, 68, 73, 86, 73, 68,
- 69, 83, 128, 68, 73, 86, 73, 68, 69, 82, 128, 68, 73, 86, 73, 68, 69,
- 196, 68, 73, 86, 73, 68, 69, 128, 68, 73, 86, 73, 68, 197, 68, 73, 86,
- 69, 82, 71, 69, 78, 67, 69, 128, 68, 73, 84, 84, 207, 68, 73, 83, 84, 79,
- 82, 84, 73, 79, 78, 128, 68, 73, 83, 84, 73, 78, 71, 85, 73, 83, 72, 128,
- 68, 73, 83, 84, 73, 76, 76, 128, 68, 73, 83, 83, 79, 76, 86, 69, 45, 50,
- 128, 68, 73, 83, 83, 79, 76, 86, 69, 128, 68, 73, 83, 80, 69, 82, 83, 73,
- 79, 78, 128, 68, 73, 83, 75, 128, 68, 73, 83, 73, 77, 79, 85, 128, 68,
- 73, 83, 72, 128, 68, 73, 83, 67, 79, 78, 84, 73, 78, 85, 79, 85, 211, 68,
- 73, 83, 195, 68, 73, 83, 65, 80, 80, 79, 73, 78, 84, 69, 196, 68, 73, 83,
- 65, 66, 76, 69, 196, 68, 73, 82, 71, 193, 68, 73, 82, 69, 67, 84, 76,
- 217, 68, 73, 82, 69, 67, 84, 73, 79, 78, 65, 204, 68, 73, 80, 84, 69,
- 128, 68, 73, 80, 80, 69, 82, 128, 68, 73, 80, 76, 79, 85, 78, 128, 68,
- 73, 80, 76, 73, 128, 68, 73, 80, 76, 201, 68, 73, 78, 71, 66, 65, 212,
- 68, 73, 206, 68, 73, 77, 77, 73, 78, 71, 128, 68, 73, 77, 73, 78, 85, 84,
- 73, 79, 78, 45, 51, 128, 68, 73, 77, 73, 78, 85, 84, 73, 79, 78, 45, 50,
- 128, 68, 73, 77, 73, 78, 85, 84, 73, 79, 78, 45, 49, 128, 68, 73, 77, 73,
- 78, 73, 83, 72, 77, 69, 78, 84, 128, 68, 73, 77, 73, 68, 73, 193, 68, 73,
- 77, 69, 78, 83, 73, 79, 78, 65, 204, 68, 73, 77, 69, 78, 83, 73, 79, 206,
- 68, 73, 77, 50, 128, 68, 73, 76, 128, 68, 73, 71, 82, 65, 80, 72, 128,
- 68, 73, 71, 82, 65, 80, 200, 68, 73, 71, 82, 65, 77, 77, 79, 211, 68, 73,
- 71, 82, 65, 77, 77, 193, 68, 73, 71, 82, 65, 205, 68, 73, 71, 79, 82, 71,
- 79, 78, 128, 68, 73, 71, 79, 82, 71, 79, 206, 68, 73, 71, 65, 77, 77, 65,
- 128, 68, 73, 71, 193, 68, 73, 70, 84, 79, 71, 71, 79, 211, 68, 73, 70,
- 79, 78, 73, 65, 83, 128, 68, 73, 70, 70, 73, 67, 85, 76, 84, 217, 68, 73,
- 70, 70, 73, 67, 85, 76, 84, 73, 69, 83, 128, 68, 73, 70, 70, 69, 82, 69,
- 78, 84, 73, 65, 76, 128, 68, 73, 70, 70, 69, 82, 69, 78, 67, 197, 68, 73,
- 70, 65, 84, 128, 68, 73, 69, 83, 73, 83, 128, 68, 73, 69, 83, 73, 211,
- 68, 73, 69, 80, 128, 68, 73, 197, 68, 73, 66, 128, 68, 73, 65, 84, 79,
- 78, 79, 206, 68, 73, 65, 84, 79, 78, 73, 75, 201, 68, 73, 65, 83, 84, 79,
- 76, 201, 68, 73, 65, 77, 79, 78, 68, 83, 128, 68, 73, 65, 77, 79, 78, 68,
- 128, 68, 73, 65, 77, 79, 78, 196, 68, 73, 65, 77, 69, 84, 69, 210, 68,
- 73, 65, 76, 89, 84, 73, 75, 65, 128, 68, 73, 65, 76, 89, 84, 73, 75, 193,
- 68, 73, 65, 76, 69, 67, 84, 45, 208, 68, 73, 65, 71, 79, 78, 65, 76, 128,
- 68, 73, 65, 71, 79, 78, 65, 204, 68, 73, 65, 69, 82, 69, 83, 73, 90, 69,
- 196, 68, 73, 65, 69, 82, 69, 83, 73, 83, 128, 68, 73, 65, 69, 82, 69, 83,
- 73, 211, 68, 72, 79, 85, 128, 68, 72, 79, 79, 128, 68, 72, 79, 128, 68,
- 72, 73, 128, 68, 72, 72, 85, 128, 68, 72, 72, 79, 79, 128, 68, 72, 72,
- 79, 128, 68, 72, 72, 73, 128, 68, 72, 72, 69, 69, 128, 68, 72, 72, 69,
- 128, 68, 72, 72, 65, 128, 68, 72, 69, 69, 128, 68, 72, 65, 82, 77, 65,
- 128, 68, 72, 65, 76, 69, 84, 72, 128, 68, 72, 65, 76, 65, 84, 72, 128,
- 68, 72, 65, 76, 128, 68, 72, 65, 68, 72, 69, 128, 68, 72, 65, 65, 76, 85,
- 128, 68, 72, 65, 65, 128, 68, 72, 65, 128, 68, 69, 90, 200, 68, 69, 89,
- 84, 69, 82, 79, 213, 68, 69, 89, 84, 69, 82, 79, 211, 68, 69, 88, 73, 65,
- 128, 68, 69, 86, 73, 67, 197, 68, 69, 86, 69, 76, 79, 80, 77, 69, 78, 84,
- 128, 68, 69, 85, 78, 71, 128, 68, 69, 83, 203, 68, 69, 83, 73, 71, 78,
- 128, 68, 69, 83, 73, 128, 68, 69, 83, 67, 82, 73, 80, 84, 73, 79, 206,
- 68, 69, 83, 67, 69, 78, 68, 73, 78, 199, 68, 69, 83, 67, 69, 78, 68, 69,
- 82, 128, 68, 69, 82, 69, 84, 45, 72, 73, 68, 69, 84, 128, 68, 69, 82, 69,
- 84, 128, 68, 69, 80, 65, 82, 84, 85, 82, 69, 128, 68, 69, 80, 65, 82, 84,
- 77, 69, 78, 212, 68, 69, 80, 65, 82, 84, 73, 78, 199, 68, 69, 78, 84, 73,
- 83, 84, 82, 217, 68, 69, 78, 84, 65, 204, 68, 69, 78, 79, 77, 73, 78, 65,
- 84, 79, 82, 128, 68, 69, 78, 79, 77, 73, 78, 65, 84, 79, 210, 68, 69, 78,
- 78, 69, 78, 128, 68, 69, 78, 71, 128, 68, 69, 78, 197, 68, 69, 78, 65,
- 82, 73, 85, 211, 68, 69, 76, 84, 65, 128, 68, 69, 76, 84, 193, 68, 69,
- 76, 84, 128, 68, 69, 76, 80, 72, 73, 195, 68, 69, 76, 73, 86, 69, 82,
- 217, 68, 69, 76, 73, 86, 69, 82, 65, 78, 67, 69, 128, 68, 69, 76, 73, 77,
- 73, 84, 69, 82, 128, 68, 69, 76, 73, 77, 73, 84, 69, 210, 68, 69, 76, 73,
- 67, 73, 79, 85, 211, 68, 69, 76, 69, 84, 69, 128, 68, 69, 76, 69, 84,
- 197, 68, 69, 75, 65, 128, 68, 69, 75, 128, 68, 69, 73, 128, 68, 69, 72,
- 73, 128, 68, 69, 71, 82, 69, 197, 68, 69, 70, 73, 78, 73, 84, 73, 79, 78,
- 128, 68, 69, 70, 69, 67, 84, 73, 86, 69, 78, 69, 83, 211, 68, 69, 69, 82,
- 128, 68, 69, 69, 80, 76, 89, 128, 68, 69, 69, 76, 128, 68, 69, 67, 82,
- 69, 83, 67, 69, 78, 68, 79, 128, 68, 69, 67, 82, 69, 65, 83, 69, 128, 68,
- 69, 67, 79, 82, 65, 84, 73, 86, 197, 68, 69, 67, 79, 82, 65, 84, 73, 79,
- 78, 128, 68, 69, 67, 73, 83, 73, 86, 69, 78, 69, 83, 83, 128, 68, 69, 67,
- 73, 77, 65, 204, 68, 69, 67, 73, 68, 85, 79, 85, 211, 68, 69, 67, 69, 77,
- 66, 69, 82, 128, 68, 69, 67, 65, 89, 69, 68, 128, 68, 69, 66, 73, 212,
- 68, 69, 65, 84, 72, 128, 68, 69, 65, 68, 128, 68, 68, 87, 65, 128, 68,
- 68, 85, 88, 128, 68, 68, 85, 84, 128, 68, 68, 85, 82, 88, 128, 68, 68,
- 85, 82, 128, 68, 68, 85, 80, 128, 68, 68, 85, 79, 88, 128, 68, 68, 85,
- 79, 80, 128, 68, 68, 85, 79, 128, 68, 68, 85, 128, 68, 68, 79, 88, 128,
- 68, 68, 79, 84, 128, 68, 68, 79, 80, 128, 68, 68, 79, 65, 128, 68, 68,
- 73, 88, 128, 68, 68, 73, 84, 128, 68, 68, 73, 80, 128, 68, 68, 73, 69,
- 88, 128, 68, 68, 73, 69, 80, 128, 68, 68, 73, 69, 128, 68, 68, 73, 128,
- 68, 68, 72, 85, 128, 68, 68, 72, 79, 128, 68, 68, 72, 73, 128, 68, 68,
- 72, 69, 69, 128, 68, 68, 72, 69, 128, 68, 68, 72, 65, 65, 128, 68, 68,
- 72, 65, 128, 68, 68, 69, 88, 128, 68, 68, 69, 80, 128, 68, 68, 69, 69,
- 128, 68, 68, 69, 128, 68, 68, 68, 72, 65, 128, 68, 68, 68, 65, 128, 68,
- 68, 65, 89, 65, 78, 78, 65, 128, 68, 68, 65, 88, 128, 68, 68, 65, 84,
- 128, 68, 68, 65, 80, 128, 68, 68, 65, 76, 128, 68, 68, 65, 204, 68, 68,
- 65, 72, 65, 76, 128, 68, 68, 65, 72, 65, 204, 68, 68, 65, 65, 128, 68,
- 67, 83, 128, 68, 67, 52, 128, 68, 67, 51, 128, 68, 67, 50, 128, 68, 67,
- 49, 128, 68, 194, 68, 65, 89, 45, 78, 73, 71, 72, 84, 128, 68, 65, 217,
- 68, 65, 86, 73, 89, 65, 78, 73, 128, 68, 65, 86, 73, 68, 128, 68, 65, 84,
- 197, 68, 65, 83, 73, 65, 128, 68, 65, 83, 73, 193, 68, 65, 83, 72, 69,
- 196, 68, 65, 83, 72, 128, 68, 65, 83, 200, 68, 65, 83, 69, 73, 65, 128,
- 68, 65, 82, 84, 128, 68, 65, 82, 75, 69, 78, 73, 78, 71, 128, 68, 65, 82,
- 75, 69, 78, 73, 78, 199, 68, 65, 82, 203, 68, 65, 82, 71, 65, 128, 68,
- 65, 82, 65, 52, 128, 68, 65, 82, 65, 51, 128, 68, 65, 82, 128, 68, 65,
- 80, 45, 80, 82, 65, 205, 68, 65, 80, 45, 80, 73, 201, 68, 65, 80, 45, 77,
- 85, 79, 217, 68, 65, 80, 45, 66, 85, 79, 206, 68, 65, 80, 45, 66, 69,
- 201, 68, 65, 208, 68, 65, 78, 84, 65, 74, 193, 68, 65, 78, 71, 79, 128,
- 68, 65, 78, 71, 128, 68, 65, 78, 199, 68, 65, 78, 68, 65, 128, 68, 65,
- 78, 67, 69, 82, 128, 68, 65, 77, 80, 128, 68, 65, 77, 208, 68, 65, 77,
- 77, 65, 84, 65, 78, 128, 68, 65, 77, 77, 65, 84, 65, 206, 68, 65, 77, 77,
- 65, 128, 68, 65, 77, 77, 193, 68, 65, 77, 65, 82, 85, 128, 68, 65, 76,
- 69, 84, 72, 128, 68, 65, 76, 69, 84, 128, 68, 65, 76, 69, 212, 68, 65,
- 76, 68, 65, 128, 68, 65, 76, 65, 84, 72, 128, 68, 65, 76, 65, 84, 200,
- 68, 65, 76, 65, 84, 128, 68, 65, 73, 82, 128, 68, 65, 73, 78, 71, 128,
- 68, 65, 72, 89, 65, 65, 85, 83, 72, 45, 50, 128, 68, 65, 72, 89, 65, 65,
- 85, 83, 72, 128, 68, 65, 71, 83, 128, 68, 65, 71, 71, 69, 82, 128, 68,
- 65, 71, 71, 69, 210, 68, 65, 71, 69, 83, 72, 128, 68, 65, 71, 69, 83,
- 200, 68, 65, 71, 66, 65, 83, 73, 78, 78, 65, 128, 68, 65, 71, 65, 218,
- 68, 65, 71, 65, 76, 71, 65, 128, 68, 65, 199, 68, 65, 69, 78, 71, 128,
- 68, 65, 69, 199, 68, 65, 68, 128, 68, 65, 196, 68, 65, 65, 83, 85, 128,
- 68, 65, 65, 68, 72, 85, 128, 68, 48, 54, 55, 72, 128, 68, 48, 54, 55, 71,
- 128, 68, 48, 54, 55, 70, 128, 68, 48, 54, 55, 69, 128, 68, 48, 54, 55,
- 68, 128, 68, 48, 54, 55, 67, 128, 68, 48, 54, 55, 66, 128, 68, 48, 54,
- 55, 65, 128, 68, 48, 54, 55, 128, 68, 48, 54, 54, 128, 68, 48, 54, 53,
- 128, 68, 48, 54, 52, 128, 68, 48, 54, 51, 128, 68, 48, 54, 50, 128, 68,
- 48, 54, 49, 128, 68, 48, 54, 48, 128, 68, 48, 53, 57, 128, 68, 48, 53,
- 56, 128, 68, 48, 53, 55, 128, 68, 48, 53, 54, 128, 68, 48, 53, 53, 128,
- 68, 48, 53, 52, 65, 128, 68, 48, 53, 52, 128, 68, 48, 53, 51, 128, 68,
- 48, 53, 50, 65, 128, 68, 48, 53, 50, 128, 68, 48, 53, 49, 128, 68, 48,
- 53, 48, 73, 128, 68, 48, 53, 48, 72, 128, 68, 48, 53, 48, 71, 128, 68,
- 48, 53, 48, 70, 128, 68, 48, 53, 48, 69, 128, 68, 48, 53, 48, 68, 128,
- 68, 48, 53, 48, 67, 128, 68, 48, 53, 48, 66, 128, 68, 48, 53, 48, 65,
- 128, 68, 48, 53, 48, 128, 68, 48, 52, 57, 128, 68, 48, 52, 56, 65, 128,
- 68, 48, 52, 56, 128, 68, 48, 52, 55, 128, 68, 48, 52, 54, 65, 128, 68,
- 48, 52, 54, 128, 68, 48, 52, 53, 128, 68, 48, 52, 52, 128, 68, 48, 52,
- 51, 128, 68, 48, 52, 50, 128, 68, 48, 52, 49, 128, 68, 48, 52, 48, 128,
- 68, 48, 51, 57, 128, 68, 48, 51, 56, 128, 68, 48, 51, 55, 128, 68, 48,
- 51, 54, 128, 68, 48, 51, 53, 128, 68, 48, 51, 52, 65, 128, 68, 48, 51,
- 52, 128, 68, 48, 51, 51, 128, 68, 48, 51, 50, 128, 68, 48, 51, 49, 65,
- 128, 68, 48, 51, 49, 128, 68, 48, 51, 48, 128, 68, 48, 50, 57, 128, 68,
- 48, 50, 56, 128, 68, 48, 50, 55, 65, 128, 68, 48, 50, 55, 128, 68, 48,
- 50, 54, 128, 68, 48, 50, 53, 128, 68, 48, 50, 52, 128, 68, 48, 50, 51,
- 128, 68, 48, 50, 50, 128, 68, 48, 50, 49, 128, 68, 48, 50, 48, 128, 68,
- 48, 49, 57, 128, 68, 48, 49, 56, 128, 68, 48, 49, 55, 128, 68, 48, 49,
- 54, 128, 68, 48, 49, 53, 128, 68, 48, 49, 52, 128, 68, 48, 49, 51, 128,
- 68, 48, 49, 50, 128, 68, 48, 49, 49, 128, 68, 48, 49, 48, 128, 68, 48,
- 48, 57, 128, 68, 48, 48, 56, 65, 128, 68, 48, 48, 56, 128, 68, 48, 48,
- 55, 128, 68, 48, 48, 54, 128, 68, 48, 48, 53, 128, 68, 48, 48, 52, 128,
- 68, 48, 48, 51, 128, 68, 48, 48, 50, 128, 68, 48, 48, 49, 128, 67, 89,
- 88, 128, 67, 89, 84, 128, 67, 89, 82, 88, 128, 67, 89, 82, 69, 78, 65,
- 73, 195, 67, 89, 82, 128, 67, 89, 80, 82, 73, 79, 212, 67, 89, 80, 69,
- 82, 85, 83, 128, 67, 89, 80, 128, 67, 89, 76, 73, 78, 68, 82, 73, 67, 73,
- 84, 89, 128, 67, 89, 67, 76, 79, 78, 69, 128, 67, 89, 65, 128, 67, 89,
- 128, 67, 87, 79, 79, 128, 67, 87, 79, 128, 67, 87, 73, 73, 128, 67, 87,
- 73, 128, 67, 87, 69, 79, 82, 84, 72, 128, 67, 87, 69, 128, 67, 87, 65,
- 65, 128, 67, 85, 88, 128, 67, 85, 85, 128, 67, 85, 212, 67, 85, 83, 84,
- 79, 77, 83, 128, 67, 85, 83, 84, 79, 77, 69, 210, 67, 85, 83, 84, 65, 82,
- 68, 128, 67, 85, 82, 88, 128, 67, 85, 82, 86, 73, 78, 199, 67, 85, 82,
- 86, 69, 196, 67, 85, 82, 86, 69, 128, 67, 85, 82, 86, 197, 67, 85, 82,
- 83, 73, 86, 197, 67, 85, 82, 82, 217, 67, 85, 82, 82, 69, 78, 84, 128,
- 67, 85, 82, 82, 69, 78, 212, 67, 85, 82, 76, 217, 67, 85, 82, 76, 128,
- 67, 85, 82, 128, 67, 85, 80, 128, 67, 85, 79, 88, 128, 67, 85, 79, 80,
- 128, 67, 85, 79, 128, 67, 85, 205, 67, 85, 66, 69, 68, 128, 67, 85, 66,
- 197, 67, 85, 65, 84, 82, 73, 76, 76, 79, 128, 67, 85, 65, 84, 82, 73, 76,
- 76, 207, 67, 85, 128, 67, 83, 73, 128, 67, 82, 89, 83, 84, 65, 204, 67,
- 82, 89, 80, 84, 79, 71, 82, 65, 77, 77, 73, 195, 67, 82, 89, 73, 78, 199,
- 67, 82, 85, 90, 69, 73, 82, 207, 67, 82, 85, 67, 73, 66, 76, 69, 45, 53,
- 128, 67, 82, 85, 67, 73, 66, 76, 69, 45, 52, 128, 67, 82, 85, 67, 73, 66,
- 76, 69, 45, 51, 128, 67, 82, 85, 67, 73, 66, 76, 69, 45, 50, 128, 67, 82,
- 85, 67, 73, 66, 76, 69, 128, 67, 82, 79, 87, 78, 128, 67, 82, 79, 83, 83,
- 73, 78, 71, 128, 67, 82, 79, 83, 83, 73, 78, 199, 67, 82, 79, 83, 83, 72,
- 65, 84, 67, 200, 67, 82, 79, 83, 83, 69, 68, 45, 84, 65, 73, 76, 128, 67,
- 82, 79, 83, 83, 69, 196, 67, 82, 79, 83, 83, 66, 79, 78, 69, 83, 128, 67,
- 82, 79, 83, 83, 128, 67, 82, 79, 83, 211, 67, 82, 79, 80, 128, 67, 82,
- 79, 73, 88, 128, 67, 82, 79, 67, 85, 211, 67, 82, 79, 67, 79, 68, 73, 76,
- 69, 128, 67, 82, 69, 83, 67, 69, 78, 84, 128, 67, 82, 69, 83, 67, 69, 78,
- 212, 67, 82, 69, 68, 73, 212, 67, 82, 69, 65, 84, 73, 86, 197, 67, 82,
- 69, 65, 77, 128, 67, 82, 65, 67, 75, 69, 82, 128, 67, 82, 128, 67, 79,
- 88, 128, 67, 79, 87, 128, 67, 79, 215, 67, 79, 86, 69, 82, 128, 67, 79,
- 85, 80, 76, 197, 67, 79, 85, 78, 84, 73, 78, 199, 67, 79, 85, 78, 84, 69,
- 82, 83, 73, 78, 75, 128, 67, 79, 85, 78, 84, 69, 82, 66, 79, 82, 69, 128,
- 67, 79, 85, 78, 67, 73, 204, 67, 79, 84, 128, 67, 79, 82, 82, 69, 83, 80,
- 79, 78, 68, 211, 67, 79, 82, 82, 69, 67, 84, 128, 67, 79, 82, 80, 83, 69,
- 128, 67, 79, 82, 80, 79, 82, 65, 84, 73, 79, 78, 128, 67, 79, 82, 79, 78,
- 73, 83, 128, 67, 79, 82, 78, 69, 82, 83, 128, 67, 79, 82, 78, 69, 82,
- 128, 67, 79, 82, 78, 69, 210, 67, 79, 80, 89, 82, 73, 71, 72, 84, 128,
- 67, 79, 80, 89, 82, 73, 71, 72, 212, 67, 79, 80, 89, 128, 67, 79, 80, 82,
- 79, 68, 85, 67, 84, 128, 67, 79, 80, 80, 69, 82, 45, 50, 128, 67, 79, 80,
- 80, 69, 82, 128, 67, 79, 80, 128, 67, 79, 79, 76, 128, 67, 79, 79, 75,
- 73, 78, 71, 128, 67, 79, 79, 75, 73, 69, 128, 67, 79, 79, 75, 69, 196,
- 67, 79, 79, 128, 67, 79, 78, 86, 69, 82, 71, 73, 78, 199, 67, 79, 78, 86,
- 69, 78, 73, 69, 78, 67, 197, 67, 79, 78, 84, 82, 79, 76, 128, 67, 79, 78,
- 84, 82, 79, 204, 67, 79, 78, 84, 82, 65, 82, 73, 69, 84, 89, 128, 67, 79,
- 78, 84, 82, 65, 67, 84, 73, 79, 78, 128, 67, 79, 78, 84, 79, 85, 82, 69,
- 196, 67, 79, 78, 84, 79, 85, 210, 67, 79, 78, 84, 69, 78, 84, 73, 79, 78,
- 128, 67, 79, 78, 84, 69, 77, 80, 76, 65, 84, 73, 79, 78, 128, 67, 79, 78,
- 84, 65, 73, 78, 211, 67, 79, 78, 84, 65, 73, 78, 73, 78, 199, 67, 79, 78,
- 84, 65, 73, 206, 67, 79, 78, 84, 65, 67, 84, 128, 67, 79, 78, 83, 84, 82,
- 85, 67, 84, 73, 79, 206, 67, 79, 78, 83, 84, 65, 78, 84, 128, 67, 79, 78,
- 83, 84, 65, 78, 212, 67, 79, 78, 83, 84, 65, 78, 67, 89, 128, 67, 79, 78,
- 83, 69, 67, 85, 84, 73, 86, 197, 67, 79, 78, 74, 85, 78, 67, 84, 73, 79,
- 78, 128, 67, 79, 78, 74, 85, 71, 65, 84, 197, 67, 79, 78, 74, 79, 73, 78,
- 73, 78, 199, 67, 79, 78, 73, 67, 65, 204, 67, 79, 78, 71, 82, 85, 69, 78,
+ 128, 68, 79, 73, 128, 68, 79, 71, 128, 68, 79, 199, 68, 79, 69, 211, 68,
+ 79, 68, 69, 75, 65, 84, 65, 128, 68, 79, 67, 85, 77, 69, 78, 84, 128, 68,
+ 79, 67, 85, 77, 69, 78, 212, 68, 79, 66, 82, 79, 128, 68, 79, 65, 67, 72,
+ 65, 83, 72, 77, 69, 69, 128, 68, 79, 65, 67, 72, 65, 83, 72, 77, 69, 197,
+ 68, 79, 65, 128, 68, 79, 45, 79, 128, 68, 77, 128, 68, 205, 68, 76, 85,
+ 128, 68, 76, 79, 128, 68, 76, 73, 128, 68, 76, 72, 89, 65, 128, 68, 76,
+ 72, 65, 128, 68, 76, 69, 69, 128, 68, 76, 65, 128, 68, 76, 128, 68, 75,
+ 65, 82, 128, 68, 75, 65, 210, 68, 74, 69, 82, 86, 73, 128, 68, 74, 69,
+ 82, 86, 128, 68, 74, 69, 128, 68, 74, 65, 128, 68, 73, 90, 90, 217, 68,
+ 73, 86, 79, 82, 67, 197, 68, 73, 86, 73, 83, 73, 79, 78, 128, 68, 73, 86,
+ 73, 83, 73, 79, 206, 68, 73, 86, 73, 78, 65, 84, 73, 79, 78, 128, 68, 73,
+ 86, 73, 68, 69, 83, 128, 68, 73, 86, 73, 68, 69, 82, 83, 128, 68, 73, 86,
+ 73, 68, 69, 82, 128, 68, 73, 86, 73, 68, 69, 196, 68, 73, 86, 73, 68, 69,
+ 128, 68, 73, 86, 73, 68, 197, 68, 73, 86, 69, 82, 71, 69, 78, 67, 69,
+ 128, 68, 73, 84, 84, 207, 68, 73, 83, 84, 79, 82, 84, 73, 79, 78, 128,
+ 68, 73, 83, 84, 73, 78, 71, 85, 73, 83, 72, 128, 68, 73, 83, 84, 73, 76,
+ 76, 128, 68, 73, 83, 83, 79, 76, 86, 69, 45, 50, 128, 68, 73, 83, 83, 79,
+ 76, 86, 69, 128, 68, 73, 83, 80, 69, 82, 83, 73, 79, 78, 128, 68, 73, 83,
+ 75, 128, 68, 73, 83, 73, 77, 79, 85, 128, 68, 73, 83, 72, 128, 68, 73,
+ 83, 67, 79, 78, 84, 73, 78, 85, 79, 85, 211, 68, 73, 83, 195, 68, 73, 83,
+ 65, 80, 80, 79, 73, 78, 84, 69, 196, 68, 73, 83, 65, 66, 76, 69, 196, 68,
+ 73, 82, 71, 193, 68, 73, 82, 69, 67, 84, 76, 217, 68, 73, 82, 69, 67, 84,
+ 73, 79, 78, 65, 204, 68, 73, 82, 69, 67, 84, 73, 79, 206, 68, 73, 80, 84,
+ 69, 128, 68, 73, 80, 80, 69, 82, 128, 68, 73, 80, 76, 79, 85, 78, 128,
+ 68, 73, 80, 76, 73, 128, 68, 73, 80, 76, 201, 68, 73, 78, 71, 66, 65,
+ 212, 68, 73, 206, 68, 73, 77, 77, 73, 78, 71, 128, 68, 73, 77, 73, 78,
+ 85, 84, 73, 79, 78, 45, 51, 128, 68, 73, 77, 73, 78, 85, 84, 73, 79, 78,
+ 45, 50, 128, 68, 73, 77, 73, 78, 85, 84, 73, 79, 78, 45, 49, 128, 68, 73,
+ 77, 73, 78, 73, 83, 72, 77, 69, 78, 84, 128, 68, 73, 77, 73, 68, 73, 193,
+ 68, 73, 77, 69, 78, 83, 73, 79, 78, 65, 204, 68, 73, 77, 69, 78, 83, 73,
+ 79, 206, 68, 73, 77, 50, 128, 68, 73, 77, 178, 68, 73, 76, 128, 68, 73,
+ 71, 82, 65, 80, 72, 128, 68, 73, 71, 82, 65, 80, 200, 68, 73, 71, 82, 65,
+ 77, 77, 79, 211, 68, 73, 71, 82, 65, 77, 77, 193, 68, 73, 71, 82, 65,
+ 205, 68, 73, 71, 79, 82, 71, 79, 78, 128, 68, 73, 71, 79, 82, 71, 79,
+ 206, 68, 73, 71, 73, 84, 83, 128, 68, 73, 71, 65, 77, 77, 65, 128, 68,
+ 73, 71, 193, 68, 73, 70, 84, 79, 71, 71, 79, 211, 68, 73, 70, 79, 78, 73,
+ 65, 83, 128, 68, 73, 70, 70, 73, 67, 85, 76, 84, 217, 68, 73, 70, 70, 73,
+ 67, 85, 76, 84, 73, 69, 83, 128, 68, 73, 70, 70, 69, 82, 69, 78, 84, 73,
+ 65, 76, 128, 68, 73, 70, 70, 69, 82, 69, 78, 67, 197, 68, 73, 70, 65, 84,
+ 128, 68, 73, 69, 83, 73, 83, 128, 68, 73, 69, 83, 73, 211, 68, 73, 69,
+ 83, 69, 204, 68, 73, 69, 80, 128, 68, 73, 197, 68, 73, 66, 128, 68, 73,
+ 65, 84, 79, 78, 79, 206, 68, 73, 65, 84, 79, 78, 73, 75, 201, 68, 73, 65,
+ 83, 84, 79, 76, 201, 68, 73, 65, 77, 79, 78, 68, 83, 128, 68, 73, 65, 77,
+ 79, 78, 68, 128, 68, 73, 65, 77, 79, 78, 196, 68, 73, 65, 77, 69, 84, 69,
+ 210, 68, 73, 65, 76, 89, 84, 73, 75, 65, 128, 68, 73, 65, 76, 89, 84, 73,
+ 75, 193, 68, 73, 65, 76, 69, 67, 84, 45, 208, 68, 73, 65, 71, 79, 78, 65,
+ 76, 128, 68, 73, 65, 69, 82, 69, 83, 73, 90, 69, 196, 68, 73, 65, 69, 82,
+ 69, 83, 73, 83, 45, 82, 73, 78, 71, 128, 68, 73, 65, 69, 82, 69, 83, 73,
+ 83, 128, 68, 73, 65, 69, 82, 69, 83, 73, 211, 68, 72, 79, 85, 128, 68,
+ 72, 79, 79, 128, 68, 72, 79, 128, 68, 72, 73, 73, 128, 68, 72, 73, 128,
+ 68, 72, 72, 85, 128, 68, 72, 72, 79, 79, 128, 68, 72, 72, 79, 128, 68,
+ 72, 72, 73, 128, 68, 72, 72, 69, 69, 128, 68, 72, 72, 69, 128, 68, 72,
+ 72, 65, 128, 68, 72, 69, 69, 128, 68, 72, 65, 82, 77, 65, 128, 68, 72,
+ 65, 77, 69, 68, 72, 128, 68, 72, 65, 76, 69, 84, 72, 128, 68, 72, 65, 76,
+ 65, 84, 72, 128, 68, 72, 65, 76, 128, 68, 72, 65, 68, 72, 69, 128, 68,
+ 72, 65, 65, 76, 85, 128, 68, 72, 65, 65, 128, 68, 72, 65, 128, 68, 69,
+ 90, 200, 68, 69, 89, 84, 69, 82, 79, 213, 68, 69, 89, 84, 69, 82, 79,
+ 211, 68, 69, 88, 73, 65, 128, 68, 69, 86, 73, 67, 197, 68, 69, 86, 69,
+ 76, 79, 80, 77, 69, 78, 84, 128, 68, 69, 85, 78, 71, 128, 68, 69, 83, 75,
+ 84, 79, 208, 68, 69, 83, 203, 68, 69, 83, 73, 71, 78, 128, 68, 69, 83,
+ 73, 128, 68, 69, 83, 69, 82, 84, 128, 68, 69, 83, 69, 82, 212, 68, 69,
+ 83, 69, 82, 69, 212, 68, 69, 83, 67, 82, 73, 80, 84, 73, 79, 206, 68, 69,
+ 83, 67, 69, 78, 68, 73, 78, 199, 68, 69, 83, 67, 69, 78, 68, 69, 82, 128,
+ 68, 69, 82, 69, 84, 45, 72, 73, 68, 69, 84, 128, 68, 69, 82, 69, 84, 128,
+ 68, 69, 82, 69, 76, 73, 67, 212, 68, 69, 80, 84, 72, 128, 68, 69, 80, 65,
+ 82, 84, 85, 82, 69, 128, 68, 69, 80, 65, 82, 84, 77, 69, 78, 212, 68, 69,
+ 80, 65, 82, 84, 73, 78, 199, 68, 69, 78, 84, 73, 83, 84, 82, 217, 68, 69,
+ 78, 84, 65, 204, 68, 69, 78, 79, 77, 73, 78, 65, 84, 79, 82, 128, 68, 69,
+ 78, 79, 77, 73, 78, 65, 84, 79, 210, 68, 69, 78, 78, 69, 78, 128, 68, 69,
+ 78, 71, 128, 68, 69, 78, 197, 68, 69, 78, 65, 82, 73, 85, 211, 68, 69,
+ 76, 84, 65, 128, 68, 69, 76, 84, 193, 68, 69, 76, 84, 128, 68, 69, 76,
+ 80, 72, 73, 195, 68, 69, 76, 73, 86, 69, 82, 217, 68, 69, 76, 73, 86, 69,
+ 82, 65, 78, 67, 69, 128, 68, 69, 76, 73, 77, 73, 84, 69, 82, 128, 68, 69,
+ 76, 73, 77, 73, 84, 69, 210, 68, 69, 76, 73, 67, 73, 79, 85, 211, 68, 69,
+ 76, 69, 84, 69, 128, 68, 69, 76, 69, 84, 197, 68, 69, 75, 65, 128, 68,
+ 69, 75, 128, 68, 69, 73, 128, 68, 69, 72, 73, 128, 68, 69, 71, 82, 69,
+ 69, 83, 128, 68, 69, 71, 82, 69, 197, 68, 69, 70, 73, 78, 73, 84, 73, 79,
+ 78, 128, 68, 69, 70, 69, 67, 84, 73, 86, 69, 78, 69, 83, 211, 68, 69, 69,
+ 82, 128, 68, 69, 69, 80, 76, 89, 128, 68, 69, 69, 76, 128, 68, 69, 67,
+ 82, 69, 83, 67, 69, 78, 68, 79, 128, 68, 69, 67, 82, 69, 65, 83, 69, 128,
+ 68, 69, 67, 82, 69, 65, 83, 197, 68, 69, 67, 79, 82, 65, 84, 73, 86, 197,
+ 68, 69, 67, 79, 82, 65, 84, 73, 79, 78, 128, 68, 69, 67, 73, 83, 73, 86,
+ 69, 78, 69, 83, 83, 128, 68, 69, 67, 73, 77, 65, 204, 68, 69, 67, 73, 68,
+ 85, 79, 85, 211, 68, 69, 67, 69, 77, 66, 69, 82, 128, 68, 69, 67, 65, 89,
+ 69, 68, 128, 68, 69, 66, 73, 212, 68, 69, 65, 84, 72, 128, 68, 69, 65,
+ 68, 128, 68, 68, 87, 65, 128, 68, 68, 85, 88, 128, 68, 68, 85, 84, 128,
+ 68, 68, 85, 82, 88, 128, 68, 68, 85, 82, 128, 68, 68, 85, 80, 128, 68,
+ 68, 85, 79, 88, 128, 68, 68, 85, 79, 80, 128, 68, 68, 85, 79, 128, 68,
+ 68, 85, 128, 68, 68, 79, 88, 128, 68, 68, 79, 84, 128, 68, 68, 79, 80,
+ 128, 68, 68, 79, 65, 128, 68, 68, 73, 88, 128, 68, 68, 73, 84, 128, 68,
+ 68, 73, 80, 128, 68, 68, 73, 69, 88, 128, 68, 68, 73, 69, 80, 128, 68,
+ 68, 73, 69, 128, 68, 68, 73, 128, 68, 68, 72, 85, 128, 68, 68, 72, 79,
+ 128, 68, 68, 72, 73, 128, 68, 68, 72, 69, 69, 128, 68, 68, 72, 69, 128,
+ 68, 68, 72, 65, 65, 128, 68, 68, 72, 65, 128, 68, 68, 69, 88, 128, 68,
+ 68, 69, 80, 128, 68, 68, 69, 69, 128, 68, 68, 69, 128, 68, 68, 68, 72,
+ 65, 128, 68, 68, 68, 65, 128, 68, 68, 65, 89, 65, 78, 78, 65, 128, 68,
+ 68, 65, 88, 128, 68, 68, 65, 84, 128, 68, 68, 65, 80, 128, 68, 68, 65,
+ 76, 128, 68, 68, 65, 204, 68, 68, 65, 72, 65, 76, 128, 68, 68, 65, 72,
+ 65, 204, 68, 68, 65, 65, 128, 68, 67, 83, 128, 68, 67, 72, 69, 128, 68,
+ 67, 52, 128, 68, 67, 51, 128, 68, 67, 50, 128, 68, 67, 49, 128, 68, 194,
+ 68, 65, 89, 45, 78, 73, 71, 72, 84, 128, 68, 65, 217, 68, 65, 87, 66,
+ 128, 68, 65, 86, 73, 89, 65, 78, 73, 128, 68, 65, 86, 73, 68, 128, 68,
+ 65, 84, 197, 68, 65, 83, 73, 65, 128, 68, 65, 83, 73, 193, 68, 65, 83,
+ 72, 69, 196, 68, 65, 83, 72, 128, 68, 65, 83, 200, 68, 65, 83, 69, 73,
+ 65, 128, 68, 65, 82, 84, 128, 68, 65, 82, 75, 69, 78, 73, 78, 71, 128,
+ 68, 65, 82, 75, 69, 78, 73, 78, 199, 68, 65, 82, 203, 68, 65, 82, 71, 65,
+ 128, 68, 65, 82, 65, 52, 128, 68, 65, 82, 65, 51, 128, 68, 65, 82, 128,
+ 68, 65, 80, 45, 80, 82, 65, 205, 68, 65, 80, 45, 80, 73, 201, 68, 65, 80,
+ 45, 77, 85, 79, 217, 68, 65, 80, 45, 66, 85, 79, 206, 68, 65, 80, 45, 66,
+ 69, 201, 68, 65, 208, 68, 65, 78, 84, 65, 74, 193, 68, 65, 78, 71, 79,
+ 128, 68, 65, 78, 71, 128, 68, 65, 78, 199, 68, 65, 78, 68, 65, 128, 68,
+ 65, 78, 67, 69, 82, 128, 68, 65, 77, 80, 128, 68, 65, 77, 208, 68, 65,
+ 77, 77, 65, 84, 65, 78, 128, 68, 65, 77, 77, 65, 84, 65, 206, 68, 65, 77,
+ 77, 65, 128, 68, 65, 77, 77, 193, 68, 65, 77, 65, 82, 85, 128, 68, 65,
+ 76, 69, 84, 72, 45, 82, 69, 83, 72, 128, 68, 65, 76, 69, 84, 72, 128, 68,
+ 65, 76, 69, 84, 128, 68, 65, 76, 69, 212, 68, 65, 76, 68, 65, 128, 68,
+ 65, 76, 65, 84, 72, 128, 68, 65, 76, 65, 84, 200, 68, 65, 76, 65, 84,
+ 128, 68, 65, 73, 82, 128, 68, 65, 73, 78, 71, 128, 68, 65, 73, 128, 68,
+ 65, 72, 89, 65, 65, 85, 83, 72, 45, 50, 128, 68, 65, 72, 89, 65, 65, 85,
+ 83, 72, 128, 68, 65, 71, 83, 128, 68, 65, 71, 71, 69, 82, 128, 68, 65,
+ 71, 71, 69, 210, 68, 65, 71, 69, 83, 72, 128, 68, 65, 71, 69, 83, 200,
+ 68, 65, 71, 66, 65, 83, 73, 78, 78, 65, 128, 68, 65, 71, 65, 218, 68, 65,
+ 71, 65, 76, 71, 65, 128, 68, 65, 71, 51, 128, 68, 65, 199, 68, 65, 69,
+ 78, 71, 128, 68, 65, 69, 199, 68, 65, 68, 128, 68, 65, 196, 68, 65, 65,
+ 83, 85, 128, 68, 65, 65, 68, 72, 85, 128, 68, 48, 54, 55, 72, 128, 68,
+ 48, 54, 55, 71, 128, 68, 48, 54, 55, 70, 128, 68, 48, 54, 55, 69, 128,
+ 68, 48, 54, 55, 68, 128, 68, 48, 54, 55, 67, 128, 68, 48, 54, 55, 66,
+ 128, 68, 48, 54, 55, 65, 128, 68, 48, 54, 55, 128, 68, 48, 54, 54, 128,
+ 68, 48, 54, 53, 128, 68, 48, 54, 52, 128, 68, 48, 54, 51, 128, 68, 48,
+ 54, 50, 128, 68, 48, 54, 49, 128, 68, 48, 54, 48, 128, 68, 48, 53, 57,
+ 128, 68, 48, 53, 56, 128, 68, 48, 53, 55, 128, 68, 48, 53, 54, 128, 68,
+ 48, 53, 53, 128, 68, 48, 53, 52, 65, 128, 68, 48, 53, 52, 128, 68, 48,
+ 53, 51, 128, 68, 48, 53, 50, 65, 128, 68, 48, 53, 50, 128, 68, 48, 53,
+ 49, 128, 68, 48, 53, 48, 73, 128, 68, 48, 53, 48, 72, 128, 68, 48, 53,
+ 48, 71, 128, 68, 48, 53, 48, 70, 128, 68, 48, 53, 48, 69, 128, 68, 48,
+ 53, 48, 68, 128, 68, 48, 53, 48, 67, 128, 68, 48, 53, 48, 66, 128, 68,
+ 48, 53, 48, 65, 128, 68, 48, 53, 48, 128, 68, 48, 52, 57, 128, 68, 48,
+ 52, 56, 65, 128, 68, 48, 52, 56, 128, 68, 48, 52, 55, 128, 68, 48, 52,
+ 54, 65, 128, 68, 48, 52, 54, 128, 68, 48, 52, 53, 128, 68, 48, 52, 52,
+ 128, 68, 48, 52, 51, 128, 68, 48, 52, 50, 128, 68, 48, 52, 49, 128, 68,
+ 48, 52, 48, 128, 68, 48, 51, 57, 128, 68, 48, 51, 56, 128, 68, 48, 51,
+ 55, 128, 68, 48, 51, 54, 128, 68, 48, 51, 53, 128, 68, 48, 51, 52, 65,
+ 128, 68, 48, 51, 52, 128, 68, 48, 51, 51, 128, 68, 48, 51, 50, 128, 68,
+ 48, 51, 49, 65, 128, 68, 48, 51, 49, 128, 68, 48, 51, 48, 128, 68, 48,
+ 50, 57, 128, 68, 48, 50, 56, 128, 68, 48, 50, 55, 65, 128, 68, 48, 50,
+ 55, 128, 68, 48, 50, 54, 128, 68, 48, 50, 53, 128, 68, 48, 50, 52, 128,
+ 68, 48, 50, 51, 128, 68, 48, 50, 50, 128, 68, 48, 50, 49, 128, 68, 48,
+ 50, 48, 128, 68, 48, 49, 57, 128, 68, 48, 49, 56, 128, 68, 48, 49, 55,
+ 128, 68, 48, 49, 54, 128, 68, 48, 49, 53, 128, 68, 48, 49, 52, 128, 68,
+ 48, 49, 51, 128, 68, 48, 49, 50, 128, 68, 48, 49, 49, 128, 68, 48, 49,
+ 48, 128, 68, 48, 48, 57, 128, 68, 48, 48, 56, 65, 128, 68, 48, 48, 56,
+ 128, 68, 48, 48, 55, 128, 68, 48, 48, 54, 128, 68, 48, 48, 53, 128, 68,
+ 48, 48, 52, 128, 68, 48, 48, 51, 128, 68, 48, 48, 50, 128, 68, 48, 48,
+ 49, 128, 67, 89, 88, 128, 67, 89, 84, 128, 67, 89, 82, 88, 128, 67, 89,
+ 82, 69, 78, 65, 73, 195, 67, 89, 82, 128, 67, 89, 80, 82, 73, 79, 212,
+ 67, 89, 80, 69, 82, 85, 83, 128, 67, 89, 80, 128, 67, 89, 76, 73, 78, 68,
+ 82, 73, 67, 73, 84, 89, 128, 67, 89, 67, 76, 79, 78, 69, 128, 67, 89, 65,
+ 89, 128, 67, 89, 65, 87, 128, 67, 89, 65, 128, 67, 87, 79, 79, 128, 67,
+ 87, 79, 128, 67, 87, 73, 73, 128, 67, 87, 73, 128, 67, 87, 69, 79, 82,
+ 84, 72, 128, 67, 87, 69, 128, 67, 87, 65, 65, 128, 67, 85, 88, 128, 67,
+ 85, 85, 128, 67, 85, 212, 67, 85, 83, 84, 79, 77, 83, 128, 67, 85, 83,
+ 84, 79, 77, 69, 210, 67, 85, 83, 84, 65, 82, 68, 128, 67, 85, 83, 80,
+ 128, 67, 85, 82, 88, 128, 67, 85, 82, 86, 73, 78, 199, 67, 85, 82, 86,
+ 69, 68, 128, 67, 85, 82, 86, 69, 196, 67, 85, 82, 86, 69, 128, 67, 85,
+ 82, 86, 197, 67, 85, 82, 82, 217, 67, 85, 82, 82, 69, 78, 84, 128, 67,
+ 85, 82, 82, 69, 78, 212, 67, 85, 82, 76, 217, 67, 85, 82, 76, 128, 67,
+ 85, 82, 128, 67, 85, 80, 80, 69, 68, 128, 67, 85, 80, 80, 69, 196, 67,
+ 85, 79, 88, 128, 67, 85, 79, 80, 128, 67, 85, 79, 128, 67, 85, 205, 67,
+ 85, 66, 69, 68, 128, 67, 85, 66, 197, 67, 85, 65, 84, 82, 73, 76, 76, 79,
+ 128, 67, 85, 65, 84, 82, 73, 76, 76, 207, 67, 85, 65, 205, 67, 85, 128,
+ 67, 83, 73, 128, 67, 82, 89, 83, 84, 65, 204, 67, 82, 89, 80, 84, 79, 71,
+ 82, 65, 77, 77, 73, 195, 67, 82, 89, 73, 78, 199, 67, 82, 85, 90, 69, 73,
+ 82, 207, 67, 82, 85, 67, 73, 70, 79, 82, 205, 67, 82, 85, 67, 73, 66, 76,
+ 69, 45, 53, 128, 67, 82, 85, 67, 73, 66, 76, 69, 45, 52, 128, 67, 82, 85,
+ 67, 73, 66, 76, 69, 45, 51, 128, 67, 82, 85, 67, 73, 66, 76, 69, 45, 50,
+ 128, 67, 82, 85, 67, 73, 66, 76, 69, 128, 67, 82, 79, 87, 78, 128, 67,
+ 82, 79, 83, 83, 73, 78, 71, 128, 67, 82, 79, 83, 83, 73, 78, 199, 67, 82,
+ 79, 83, 83, 72, 65, 84, 67, 200, 67, 82, 79, 83, 83, 69, 68, 45, 84, 65,
+ 73, 76, 128, 67, 82, 79, 83, 83, 69, 68, 128, 67, 82, 79, 83, 83, 69,
+ 196, 67, 82, 79, 83, 83, 66, 79, 78, 69, 83, 128, 67, 82, 79, 83, 83,
+ 128, 67, 82, 79, 83, 211, 67, 82, 79, 80, 128, 67, 82, 79, 73, 88, 128,
+ 67, 82, 79, 67, 85, 211, 67, 82, 79, 67, 79, 68, 73, 76, 69, 128, 67, 82,
+ 73, 67, 75, 69, 212, 67, 82, 69, 83, 67, 69, 78, 84, 83, 128, 67, 82, 69,
+ 83, 67, 69, 78, 84, 128, 67, 82, 69, 83, 67, 69, 78, 212, 67, 82, 69, 68,
+ 73, 212, 67, 82, 69, 65, 84, 73, 86, 197, 67, 82, 69, 65, 77, 128, 67,
+ 82, 65, 89, 79, 78, 128, 67, 82, 65, 67, 75, 69, 82, 128, 67, 82, 65, 66,
+ 128, 67, 82, 128, 67, 79, 88, 128, 67, 79, 87, 128, 67, 79, 215, 67, 79,
+ 86, 69, 82, 128, 67, 79, 85, 80, 76, 197, 67, 79, 85, 78, 84, 73, 78,
+ 199, 67, 79, 85, 78, 84, 69, 82, 83, 73, 78, 75, 128, 67, 79, 85, 78, 84,
+ 69, 82, 66, 79, 82, 69, 128, 67, 79, 85, 78, 67, 73, 204, 67, 79, 85, 67,
+ 200, 67, 79, 84, 128, 67, 79, 82, 82, 69, 83, 80, 79, 78, 68, 211, 67,
+ 79, 82, 82, 69, 67, 84, 128, 67, 79, 82, 80, 83, 69, 128, 67, 79, 82, 80,
+ 79, 82, 65, 84, 73, 79, 78, 128, 67, 79, 82, 79, 78, 73, 83, 128, 67, 79,
+ 82, 78, 69, 82, 83, 128, 67, 79, 82, 78, 69, 82, 128, 67, 79, 82, 78, 69,
+ 210, 67, 79, 82, 75, 128, 67, 79, 80, 89, 82, 73, 71, 72, 84, 128, 67,
+ 79, 80, 89, 82, 73, 71, 72, 212, 67, 79, 80, 89, 128, 67, 79, 80, 82, 79,
+ 68, 85, 67, 84, 128, 67, 79, 80, 80, 69, 82, 45, 50, 128, 67, 79, 80, 80,
+ 69, 82, 128, 67, 79, 80, 128, 67, 79, 79, 76, 128, 67, 79, 79, 75, 73,
+ 78, 71, 128, 67, 79, 79, 75, 73, 69, 128, 67, 79, 79, 75, 69, 196, 67,
+ 79, 79, 128, 67, 79, 78, 86, 69, 82, 71, 73, 78, 199, 67, 79, 78, 86, 69,
+ 78, 73, 69, 78, 67, 197, 67, 79, 78, 84, 82, 79, 76, 128, 67, 79, 78, 84,
+ 82, 79, 204, 67, 79, 78, 84, 82, 65, 82, 73, 69, 84, 89, 128, 67, 79, 78,
+ 84, 82, 65, 67, 84, 73, 79, 78, 128, 67, 79, 78, 84, 79, 85, 82, 69, 196,
+ 67, 79, 78, 84, 79, 85, 210, 67, 79, 78, 84, 73, 78, 85, 73, 78, 199, 67,
+ 79, 78, 84, 73, 78, 85, 65, 84, 73, 79, 206, 67, 79, 78, 84, 69, 78, 84,
+ 73, 79, 78, 128, 67, 79, 78, 84, 69, 77, 80, 76, 65, 84, 73, 79, 78, 128,
+ 67, 79, 78, 84, 65, 73, 78, 211, 67, 79, 78, 84, 65, 73, 78, 73, 78, 199,
+ 67, 79, 78, 84, 65, 73, 206, 67, 79, 78, 84, 65, 67, 84, 128, 67, 79, 78,
+ 83, 84, 82, 85, 67, 84, 73, 79, 78, 128, 67, 79, 78, 83, 84, 82, 85, 67,
+ 84, 73, 79, 206, 67, 79, 78, 83, 84, 65, 78, 84, 128, 67, 79, 78, 83, 84,
+ 65, 78, 212, 67, 79, 78, 83, 84, 65, 78, 67, 89, 128, 67, 79, 78, 83, 69,
+ 67, 85, 84, 73, 86, 197, 67, 79, 78, 74, 85, 78, 67, 84, 73, 79, 78, 128,
+ 67, 79, 78, 74, 85, 71, 65, 84, 197, 67, 79, 78, 74, 79, 73, 78, 73, 78,
+ 199, 67, 79, 78, 74, 79, 73, 78, 69, 68, 128, 67, 79, 78, 74, 79, 73, 78,
+ 69, 196, 67, 79, 78, 73, 67, 65, 204, 67, 79, 78, 71, 82, 85, 69, 78,
212, 67, 79, 78, 71, 82, 65, 84, 85, 76, 65, 84, 73, 79, 78, 128, 67, 79,
78, 70, 85, 83, 69, 196, 67, 79, 78, 70, 79, 85, 78, 68, 69, 196, 67, 79,
78, 70, 76, 73, 67, 84, 128, 67, 79, 78, 70, 69, 84, 84, 201, 67, 79, 78,
67, 65, 86, 69, 45, 83, 73, 68, 69, 196, 67, 79, 78, 67, 65, 86, 69, 45,
- 80, 79, 73, 78, 84, 69, 196, 67, 79, 78, 128, 67, 79, 77, 80, 85, 84, 69,
- 82, 128, 67, 79, 77, 80, 79, 83, 73, 84, 73, 79, 78, 128, 67, 79, 77, 80,
- 79, 83, 73, 84, 73, 79, 206, 67, 79, 77, 80, 76, 73, 65, 78, 67, 69, 128,
- 67, 79, 77, 80, 76, 69, 84, 73, 79, 78, 128, 67, 79, 77, 80, 76, 69, 84,
- 69, 68, 128, 67, 79, 77, 80, 76, 69, 77, 69, 78, 84, 128, 67, 79, 77, 80,
- 65, 82, 69, 128, 67, 79, 77, 77, 79, 206, 67, 79, 77, 77, 69, 82, 67, 73,
- 65, 204, 67, 79, 77, 77, 65, 78, 68, 128, 67, 79, 77, 77, 65, 128, 67,
- 79, 77, 77, 193, 67, 79, 77, 69, 84, 128, 67, 79, 77, 66, 128, 67, 79,
- 76, 85, 77, 78, 128, 67, 79, 76, 79, 82, 128, 67, 79, 76, 76, 73, 83, 73,
- 79, 206, 67, 79, 76, 76, 128, 67, 79, 76, 196, 67, 79, 70, 70, 73, 78,
- 128, 67, 79, 69, 78, 71, 128, 67, 79, 69, 78, 199, 67, 79, 68, 65, 128,
- 67, 79, 67, 75, 84, 65, 73, 204, 67, 79, 65, 83, 84, 69, 82, 128, 67, 79,
- 65, 128, 67, 79, 128, 67, 77, 128, 67, 205, 67, 76, 85, 83, 84, 69, 210,
- 67, 76, 85, 66, 83, 128, 67, 76, 85, 66, 45, 83, 80, 79, 75, 69, 196, 67,
- 76, 85, 66, 128, 67, 76, 85, 194, 67, 76, 79, 86, 69, 82, 128, 67, 76,
- 79, 85, 68, 128, 67, 76, 79, 85, 196, 67, 76, 79, 84, 72, 69, 83, 128,
- 67, 76, 79, 84, 72, 128, 67, 76, 79, 83, 69, 84, 128, 67, 76, 79, 83, 69,
- 78, 69, 83, 83, 128, 67, 76, 79, 83, 69, 68, 128, 67, 76, 79, 83, 197,
- 67, 76, 79, 67, 75, 87, 73, 83, 197, 67, 76, 79, 67, 203, 67, 76, 73, 86,
- 73, 83, 128, 67, 76, 73, 80, 66, 79, 65, 82, 68, 128, 67, 76, 73, 78, 75,
- 73, 78, 199, 67, 76, 73, 78, 71, 73, 78, 199, 67, 76, 73, 77, 65, 67, 85,
- 83, 128, 67, 76, 73, 70, 70, 128, 67, 76, 73, 67, 75, 128, 67, 76, 69,
- 70, 45, 50, 128, 67, 76, 69, 70, 45, 49, 128, 67, 76, 69, 70, 128, 67,
- 76, 69, 198, 67, 76, 69, 65, 86, 69, 82, 128, 67, 76, 69, 65, 210, 67,
- 76, 65, 87, 128, 67, 76, 65, 80, 80, 73, 78, 199, 67, 76, 65, 80, 80, 69,
- 210, 67, 76, 65, 78, 128, 67, 76, 65, 73, 77, 128, 67, 76, 128, 67, 73,
- 88, 128, 67, 73, 86, 73, 76, 73, 65, 78, 128, 67, 73, 84, 89, 83, 67, 65,
- 80, 197, 67, 73, 84, 128, 67, 73, 82, 67, 85, 211, 67, 73, 82, 67, 85,
- 77, 70, 76, 69, 88, 128, 67, 73, 82, 67, 85, 77, 70, 76, 69, 216, 67, 73,
- 82, 67, 85, 76, 65, 84, 73, 79, 206, 67, 73, 82, 67, 76, 69, 83, 128, 67,
- 73, 82, 67, 76, 69, 128, 67, 73, 80, 128, 67, 73, 78, 78, 65, 66, 65, 82,
- 128, 67, 73, 78, 69, 77, 65, 128, 67, 73, 73, 128, 67, 73, 69, 88, 128,
- 67, 73, 69, 85, 67, 45, 83, 83, 65, 78, 71, 80, 73, 69, 85, 80, 128, 67,
- 73, 69, 85, 67, 45, 80, 73, 69, 85, 80, 128, 67, 73, 69, 85, 67, 45, 73,
- 69, 85, 78, 71, 128, 67, 73, 69, 85, 195, 67, 73, 69, 84, 128, 67, 73,
- 69, 80, 128, 67, 73, 69, 128, 67, 72, 89, 88, 128, 67, 72, 89, 84, 128,
- 67, 72, 89, 82, 88, 128, 67, 72, 89, 82, 128, 67, 72, 89, 80, 128, 67,
- 72, 85, 88, 128, 67, 72, 85, 82, 88, 128, 67, 72, 85, 82, 67, 72, 128,
- 67, 72, 85, 82, 128, 67, 72, 85, 80, 128, 67, 72, 85, 79, 88, 128, 67,
- 72, 85, 79, 84, 128, 67, 72, 85, 79, 80, 128, 67, 72, 85, 79, 128, 67,
- 72, 85, 76, 65, 128, 67, 72, 85, 128, 67, 72, 82, 89, 83, 65, 78, 84, 72,
- 69, 77, 85, 77, 128, 67, 72, 82, 79, 78, 79, 85, 128, 67, 72, 82, 79, 78,
- 79, 78, 128, 67, 72, 82, 79, 77, 193, 67, 72, 82, 79, 193, 67, 72, 82,
- 73, 86, 73, 128, 67, 72, 82, 73, 83, 84, 77, 65, 83, 128, 67, 72, 82, 73,
- 83, 84, 77, 65, 211, 67, 72, 79, 88, 128, 67, 72, 79, 84, 128, 67, 72,
- 79, 82, 69, 86, 77, 193, 67, 72, 79, 80, 128, 67, 72, 79, 75, 69, 128,
- 67, 72, 79, 69, 128, 67, 72, 79, 67, 79, 76, 65, 84, 197, 67, 72, 79, 65,
- 128, 67, 72, 207, 67, 72, 73, 84, 85, 69, 85, 77, 83, 83, 65, 78, 71, 83,
- 73, 79, 83, 128, 67, 72, 73, 84, 85, 69, 85, 77, 83, 83, 65, 78, 71, 67,
- 73, 69, 85, 67, 128, 67, 72, 73, 84, 85, 69, 85, 77, 83, 73, 79, 83, 128,
- 67, 72, 73, 84, 85, 69, 85, 77, 67, 73, 69, 85, 67, 128, 67, 72, 73, 84,
- 85, 69, 85, 77, 67, 72, 73, 69, 85, 67, 72, 128, 67, 72, 73, 82, 79, 78,
- 128, 67, 72, 73, 82, 69, 84, 128, 67, 72, 73, 78, 71, 128, 67, 72, 73,
- 78, 69, 83, 197, 67, 72, 73, 78, 128, 67, 72, 73, 77, 69, 128, 67, 72,
- 73, 76, 76, 213, 67, 72, 73, 76, 68, 82, 69, 206, 67, 72, 73, 76, 68,
- 128, 67, 72, 73, 76, 128, 67, 72, 73, 75, 201, 67, 72, 73, 69, 85, 67,
- 72, 45, 75, 72, 73, 69, 85, 75, 72, 128, 67, 72, 73, 69, 85, 67, 72, 45,
- 72, 73, 69, 85, 72, 128, 67, 72, 73, 69, 85, 67, 200, 67, 72, 73, 67, 75,
- 69, 78, 128, 67, 72, 73, 67, 75, 128, 67, 72, 73, 128, 67, 72, 201, 67,
- 72, 72, 65, 128, 67, 72, 69, 88, 128, 67, 72, 69, 86, 82, 79, 206, 67,
- 72, 69, 84, 128, 67, 72, 69, 83, 84, 78, 85, 84, 128, 67, 72, 69, 83,
- 211, 67, 72, 69, 82, 82, 217, 67, 72, 69, 82, 82, 73, 69, 83, 128, 67,
+ 80, 79, 73, 78, 84, 69, 196, 67, 79, 77, 80, 85, 84, 69, 82, 83, 128, 67,
+ 79, 77, 80, 85, 84, 69, 82, 128, 67, 79, 77, 80, 82, 69, 83, 83, 73, 79,
+ 78, 128, 67, 79, 77, 80, 82, 69, 83, 83, 69, 196, 67, 79, 77, 80, 79, 83,
+ 73, 84, 73, 79, 78, 128, 67, 79, 77, 80, 79, 83, 73, 84, 73, 79, 206, 67,
+ 79, 77, 80, 76, 73, 65, 78, 67, 69, 128, 67, 79, 77, 80, 76, 69, 84, 73,
+ 79, 78, 128, 67, 79, 77, 80, 76, 69, 84, 69, 68, 128, 67, 79, 77, 80, 76,
+ 69, 77, 69, 78, 84, 128, 67, 79, 77, 80, 65, 82, 69, 128, 67, 79, 77, 77,
+ 79, 206, 67, 79, 77, 77, 69, 82, 67, 73, 65, 204, 67, 79, 77, 77, 65, 78,
+ 68, 128, 67, 79, 77, 77, 65, 128, 67, 79, 77, 77, 193, 67, 79, 77, 69,
+ 84, 128, 67, 79, 77, 66, 73, 78, 69, 68, 128, 67, 79, 77, 66, 73, 78, 65,
+ 84, 73, 79, 78, 128, 67, 79, 77, 66, 128, 67, 79, 76, 85, 77, 78, 128,
+ 67, 79, 76, 79, 82, 128, 67, 79, 76, 76, 73, 83, 73, 79, 206, 67, 79, 76,
+ 76, 128, 67, 79, 76, 196, 67, 79, 70, 70, 73, 78, 128, 67, 79, 69, 78,
+ 71, 128, 67, 79, 69, 78, 199, 67, 79, 68, 65, 128, 67, 79, 67, 75, 84,
+ 65, 73, 204, 67, 79, 65, 83, 84, 69, 82, 128, 67, 79, 65, 128, 67, 77,
+ 128, 67, 205, 67, 76, 85, 83, 84, 69, 210, 67, 76, 85, 66, 83, 128, 67,
+ 76, 85, 66, 45, 83, 80, 79, 75, 69, 196, 67, 76, 85, 66, 128, 67, 76, 85,
+ 194, 67, 76, 79, 86, 69, 82, 128, 67, 76, 79, 85, 68, 128, 67, 76, 79,
+ 85, 196, 67, 76, 79, 84, 72, 69, 83, 128, 67, 76, 79, 84, 72, 128, 67,
+ 76, 79, 83, 69, 84, 128, 67, 76, 79, 83, 69, 78, 69, 83, 83, 128, 67, 76,
+ 79, 83, 69, 68, 128, 67, 76, 79, 83, 197, 67, 76, 79, 67, 75, 87, 73, 83,
+ 197, 67, 76, 79, 67, 203, 67, 76, 73, 86, 73, 83, 128, 67, 76, 73, 80,
+ 66, 79, 65, 82, 68, 128, 67, 76, 73, 78, 75, 73, 78, 199, 67, 76, 73, 78,
+ 71, 73, 78, 199, 67, 76, 73, 77, 65, 67, 85, 83, 128, 67, 76, 73, 70, 70,
+ 128, 67, 76, 73, 67, 75, 128, 67, 76, 69, 70, 45, 50, 128, 67, 76, 69,
+ 70, 45, 49, 128, 67, 76, 69, 70, 128, 67, 76, 69, 198, 67, 76, 69, 65,
+ 86, 69, 82, 128, 67, 76, 69, 65, 210, 67, 76, 65, 83, 83, 73, 67, 65,
+ 204, 67, 76, 65, 80, 80, 73, 78, 199, 67, 76, 65, 80, 80, 69, 210, 67,
+ 76, 65, 78, 128, 67, 76, 65, 206, 67, 76, 65, 77, 83, 72, 69, 76, 204,
+ 67, 76, 65, 73, 77, 128, 67, 76, 128, 67, 73, 88, 128, 67, 73, 86, 73,
+ 76, 73, 65, 78, 128, 67, 73, 84, 89, 83, 67, 65, 80, 69, 128, 67, 73, 84,
+ 89, 83, 67, 65, 80, 197, 67, 73, 84, 201, 67, 73, 84, 65, 84, 73, 79,
+ 206, 67, 73, 84, 128, 67, 73, 82, 67, 85, 211, 67, 73, 82, 67, 85, 77,
+ 70, 76, 69, 88, 128, 67, 73, 82, 67, 85, 77, 70, 76, 69, 216, 67, 73, 82,
+ 67, 85, 76, 65, 84, 73, 79, 206, 67, 73, 82, 67, 76, 73, 78, 71, 128, 67,
+ 73, 82, 67, 76, 73, 78, 199, 67, 73, 82, 67, 76, 69, 83, 128, 67, 73, 82,
+ 67, 76, 69, 211, 67, 73, 82, 67, 76, 69, 68, 128, 67, 73, 80, 128, 67,
+ 73, 78, 78, 65, 66, 65, 82, 128, 67, 73, 78, 69, 77, 65, 128, 67, 73,
+ 206, 67, 73, 205, 67, 73, 73, 128, 67, 73, 69, 88, 128, 67, 73, 69, 85,
+ 67, 45, 83, 83, 65, 78, 71, 80, 73, 69, 85, 80, 128, 67, 73, 69, 85, 67,
+ 45, 80, 73, 69, 85, 80, 128, 67, 73, 69, 85, 67, 45, 73, 69, 85, 78, 71,
+ 128, 67, 73, 69, 85, 195, 67, 73, 69, 84, 128, 67, 73, 69, 80, 128, 67,
+ 73, 69, 128, 67, 72, 89, 88, 128, 67, 72, 89, 84, 128, 67, 72, 89, 82,
+ 88, 128, 67, 72, 89, 82, 128, 67, 72, 89, 80, 128, 67, 72, 87, 86, 128,
+ 67, 72, 85, 88, 128, 67, 72, 85, 82, 88, 128, 67, 72, 85, 82, 67, 72,
+ 128, 67, 72, 85, 82, 128, 67, 72, 85, 80, 128, 67, 72, 85, 79, 88, 128,
+ 67, 72, 85, 79, 84, 128, 67, 72, 85, 79, 80, 128, 67, 72, 85, 79, 128,
+ 67, 72, 85, 76, 65, 128, 67, 72, 85, 128, 67, 72, 82, 89, 83, 65, 78, 84,
+ 72, 69, 77, 85, 77, 128, 67, 72, 82, 79, 78, 79, 85, 128, 67, 72, 82, 79,
+ 78, 79, 78, 128, 67, 72, 82, 79, 77, 193, 67, 72, 82, 79, 193, 67, 72,
+ 82, 73, 86, 73, 128, 67, 72, 82, 73, 83, 84, 77, 65, 83, 128, 67, 72, 82,
+ 73, 83, 84, 77, 65, 211, 67, 72, 79, 89, 128, 67, 72, 79, 88, 128, 67,
+ 72, 79, 84, 128, 67, 72, 79, 82, 69, 86, 77, 193, 67, 72, 79, 80, 128,
+ 67, 72, 79, 75, 69, 128, 67, 72, 79, 69, 128, 67, 72, 79, 67, 79, 76, 65,
+ 84, 197, 67, 72, 79, 65, 128, 67, 72, 207, 67, 72, 73, 84, 85, 69, 85,
+ 77, 83, 83, 65, 78, 71, 83, 73, 79, 83, 128, 67, 72, 73, 84, 85, 69, 85,
+ 77, 83, 83, 65, 78, 71, 67, 73, 69, 85, 67, 128, 67, 72, 73, 84, 85, 69,
+ 85, 77, 83, 73, 79, 83, 128, 67, 72, 73, 84, 85, 69, 85, 77, 67, 73, 69,
+ 85, 67, 128, 67, 72, 73, 84, 85, 69, 85, 77, 67, 72, 73, 69, 85, 67, 72,
+ 128, 67, 72, 73, 82, 79, 78, 128, 67, 72, 73, 82, 69, 84, 128, 67, 72,
+ 73, 80, 77, 85, 78, 75, 128, 67, 72, 73, 78, 79, 79, 203, 67, 72, 73, 78,
+ 71, 128, 67, 72, 73, 78, 69, 83, 197, 67, 72, 73, 78, 128, 67, 72, 73,
+ 77, 69, 128, 67, 72, 73, 76, 76, 213, 67, 72, 73, 76, 68, 82, 69, 206,
+ 67, 72, 73, 76, 68, 128, 67, 72, 73, 76, 128, 67, 72, 73, 75, 201, 67,
+ 72, 73, 69, 85, 67, 72, 45, 75, 72, 73, 69, 85, 75, 72, 128, 67, 72, 73,
+ 69, 85, 67, 72, 45, 72, 73, 69, 85, 72, 128, 67, 72, 73, 69, 85, 67, 200,
+ 67, 72, 73, 67, 75, 69, 78, 128, 67, 72, 73, 67, 75, 128, 67, 72, 73,
+ 128, 67, 72, 201, 67, 72, 72, 65, 128, 67, 72, 69, 88, 128, 67, 72, 69,
+ 86, 82, 79, 206, 67, 72, 69, 84, 128, 67, 72, 69, 83, 84, 78, 85, 84,
+ 128, 67, 72, 69, 83, 84, 128, 67, 72, 69, 83, 211, 67, 72, 69, 82, 89,
+ 128, 67, 72, 69, 82, 82, 217, 67, 72, 69, 82, 82, 73, 69, 83, 128, 67,
72, 69, 81, 85, 69, 82, 69, 196, 67, 72, 69, 80, 128, 67, 72, 69, 206,
67, 72, 69, 73, 78, 65, 80, 128, 67, 72, 69, 73, 75, 72, 69, 73, 128, 67,
- 72, 69, 73, 75, 72, 65, 78, 128, 67, 72, 69, 69, 82, 73, 78, 199, 67, 72,
- 69, 69, 128, 67, 72, 69, 67, 75, 128, 67, 72, 69, 67, 203, 67, 72, 197,
- 67, 72, 65, 88, 128, 67, 72, 65, 86, 73, 89, 65, 78, 73, 128, 67, 72, 65,
- 84, 84, 65, 87, 65, 128, 67, 72, 65, 84, 128, 67, 72, 65, 82, 84, 128,
- 67, 72, 65, 82, 212, 67, 72, 65, 82, 73, 79, 84, 128, 67, 72, 65, 82, 73,
- 79, 212, 67, 72, 65, 82, 65, 67, 84, 69, 82, 83, 128, 67, 72, 65, 82, 65,
- 67, 84, 69, 82, 128, 67, 72, 65, 82, 128, 67, 72, 65, 80, 128, 67, 72,
- 65, 78, 71, 128, 67, 72, 65, 78, 128, 67, 72, 65, 77, 75, 79, 128, 67,
- 72, 65, 77, 73, 76, 79, 78, 128, 67, 72, 65, 77, 73, 76, 73, 128, 67, 72,
- 65, 75, 77, 193, 67, 72, 65, 73, 82, 128, 67, 72, 65, 73, 78, 83, 128,
- 67, 72, 65, 68, 65, 128, 67, 72, 65, 196, 67, 72, 65, 65, 128, 67, 71,
- 74, 128, 67, 69, 88, 128, 67, 69, 82, 69, 83, 128, 67, 69, 82, 69, 77,
- 79, 78, 89, 128, 67, 69, 82, 69, 75, 128, 67, 69, 82, 45, 87, 65, 128,
- 67, 69, 80, 128, 67, 69, 79, 78, 71, 67, 72, 73, 69, 85, 77, 83, 83, 65,
- 78, 71, 83, 73, 79, 83, 128, 67, 69, 79, 78, 71, 67, 72, 73, 69, 85, 77,
- 83, 83, 65, 78, 71, 67, 73, 69, 85, 67, 128, 67, 69, 79, 78, 71, 67, 72,
- 73, 69, 85, 77, 83, 73, 79, 83, 128, 67, 69, 79, 78, 71, 67, 72, 73, 69,
- 85, 77, 67, 73, 69, 85, 67, 128, 67, 69, 79, 78, 71, 67, 72, 73, 69, 85,
- 77, 67, 72, 73, 69, 85, 67, 72, 128, 67, 69, 78, 84, 85, 82, 73, 65, 204,
- 67, 69, 78, 84, 82, 69, 76, 73, 78, 197, 67, 69, 78, 84, 82, 69, 196, 67,
- 69, 78, 84, 82, 69, 128, 67, 69, 78, 84, 82, 197, 67, 69, 78, 128, 67,
- 69, 76, 83, 73, 85, 83, 128, 67, 69, 76, 69, 66, 82, 65, 84, 73, 79, 78,
- 128, 67, 69, 73, 82, 84, 128, 67, 69, 73, 76, 73, 78, 71, 128, 67, 69,
- 69, 128, 67, 69, 68, 73, 76, 76, 65, 128, 67, 69, 68, 73, 76, 76, 193,
- 67, 69, 68, 201, 67, 69, 67, 69, 75, 128, 67, 69, 67, 65, 75, 128, 67,
- 69, 67, 65, 203, 67, 69, 65, 76, 67, 128, 67, 67, 85, 128, 67, 67, 79,
- 128, 67, 67, 73, 128, 67, 67, 72, 85, 128, 67, 67, 72, 79, 128, 67, 67,
- 72, 73, 128, 67, 67, 72, 72, 85, 128, 67, 67, 72, 72, 79, 128, 67, 67,
- 72, 72, 73, 128, 67, 67, 72, 72, 69, 69, 128, 67, 67, 72, 72, 69, 128,
- 67, 67, 72, 72, 65, 65, 128, 67, 67, 72, 72, 65, 128, 67, 67, 72, 69, 69,
- 128, 67, 67, 72, 69, 128, 67, 67, 72, 65, 65, 128, 67, 67, 72, 65, 128,
- 67, 67, 72, 128, 67, 67, 69, 69, 128, 67, 67, 69, 128, 67, 67, 65, 65,
- 128, 67, 67, 65, 128, 67, 65, 89, 78, 128, 67, 65, 89, 65, 78, 78, 65,
- 128, 67, 65, 88, 128, 67, 65, 86, 69, 128, 67, 65, 85, 84, 73, 79, 206,
- 67, 65, 85, 76, 68, 82, 79, 78, 128, 67, 65, 85, 68, 65, 128, 67, 65, 85,
- 128, 67, 65, 84, 65, 87, 65, 128, 67, 65, 84, 128, 67, 65, 212, 67, 65,
- 83, 84, 76, 69, 128, 67, 65, 82, 89, 83, 84, 73, 65, 206, 67, 65, 82, 84,
- 128, 67, 65, 82, 211, 67, 65, 82, 82, 73, 65, 71, 197, 67, 65, 82, 80,
- 69, 78, 84, 82, 217, 67, 65, 82, 208, 67, 65, 82, 79, 85, 83, 69, 204,
- 67, 65, 82, 79, 78, 128, 67, 65, 82, 79, 206, 67, 65, 82, 73, 203, 67,
- 65, 82, 73, 65, 206, 67, 65, 82, 69, 84, 128, 67, 65, 82, 69, 212, 67,
- 65, 82, 197, 67, 65, 82, 68, 83, 128, 67, 65, 82, 68, 128, 67, 65, 82,
- 196, 67, 65, 82, 128, 67, 65, 210, 67, 65, 80, 85, 212, 67, 65, 80, 84,
- 73, 86, 69, 128, 67, 65, 80, 82, 73, 67, 79, 82, 78, 128, 67, 65, 80, 79,
- 128, 67, 65, 80, 73, 84, 65, 76, 128, 67, 65, 78, 84, 73, 76, 76, 65, 84,
- 73, 79, 206, 67, 65, 78, 199, 67, 65, 78, 68, 89, 128, 67, 65, 78, 68,
- 82, 65, 66, 73, 78, 68, 85, 128, 67, 65, 78, 68, 82, 65, 66, 73, 78, 68,
- 213, 67, 65, 78, 68, 82, 65, 128, 67, 65, 78, 68, 82, 193, 67, 65, 78,
- 67, 69, 82, 128, 67, 65, 78, 67, 69, 76, 76, 65, 84, 73, 79, 206, 67, 65,
- 78, 67, 69, 76, 128, 67, 65, 78, 67, 69, 204, 67, 65, 78, 128, 67, 65,
- 77, 78, 85, 195, 67, 65, 77, 69, 82, 65, 128, 67, 65, 77, 69, 76, 128,
- 67, 65, 76, 89, 65, 128, 67, 65, 76, 89, 193, 67, 65, 76, 88, 128, 67,
- 65, 76, 76, 128, 67, 65, 76, 69, 78, 68, 65, 82, 128, 67, 65, 76, 67,
- 128, 67, 65, 75, 82, 65, 128, 67, 65, 75, 197, 67, 65, 73, 128, 67, 65,
- 72, 128, 67, 65, 69, 83, 85, 82, 65, 128, 67, 65, 68, 85, 67, 69, 85, 83,
- 128, 67, 65, 68, 193, 67, 65, 67, 84, 85, 83, 128, 67, 65, 66, 76, 69,
- 87, 65, 89, 128, 67, 65, 66, 66, 65, 71, 69, 45, 84, 82, 69, 69, 128, 67,
- 65, 65, 78, 71, 128, 67, 65, 65, 73, 128, 67, 193, 67, 48, 50, 52, 128,
- 67, 48, 50, 51, 128, 67, 48, 50, 50, 128, 67, 48, 50, 49, 128, 67, 48,
- 50, 48, 128, 67, 48, 49, 57, 128, 67, 48, 49, 56, 128, 67, 48, 49, 55,
- 128, 67, 48, 49, 54, 128, 67, 48, 49, 53, 128, 67, 48, 49, 52, 128, 67,
- 48, 49, 51, 128, 67, 48, 49, 50, 128, 67, 48, 49, 49, 128, 67, 48, 49,
- 48, 65, 128, 67, 48, 49, 48, 128, 67, 48, 48, 57, 128, 67, 48, 48, 56,
- 128, 67, 48, 48, 55, 128, 67, 48, 48, 54, 128, 67, 48, 48, 53, 128, 67,
- 48, 48, 52, 128, 67, 48, 48, 51, 128, 67, 48, 48, 50, 67, 128, 67, 48,
- 48, 50, 66, 128, 67, 48, 48, 50, 65, 128, 67, 48, 48, 50, 128, 67, 48,
- 48, 49, 128, 67, 45, 83, 73, 77, 80, 76, 73, 70, 73, 69, 196, 67, 45, 51,
- 57, 128, 67, 45, 49, 56, 128, 66, 90, 85, 78, 199, 66, 90, 72, 201, 66,
- 89, 84, 197, 66, 89, 69, 76, 79, 82, 85, 83, 83, 73, 65, 78, 45, 85, 75,
- 82, 65, 73, 78, 73, 65, 206, 66, 88, 71, 128, 66, 87, 73, 128, 66, 87,
- 69, 69, 128, 66, 87, 69, 128, 66, 87, 65, 128, 66, 85, 85, 77, 73, 83,
- 72, 128, 66, 85, 84, 84, 79, 78, 128, 66, 85, 212, 66, 85, 83, 84, 211,
- 66, 85, 83, 212, 66, 85, 83, 83, 89, 69, 82, 85, 128, 66, 85, 211, 66,
- 85, 82, 213, 66, 85, 82, 50, 128, 66, 85, 210, 66, 85, 79, 88, 128, 66,
- 85, 79, 80, 128, 66, 85, 78, 78, 217, 66, 85, 78, 71, 128, 66, 85, 77,
- 80, 217, 66, 85, 76, 85, 71, 128, 66, 85, 76, 85, 199, 66, 85, 76, 76,
- 83, 69, 89, 69, 128, 66, 85, 76, 76, 211, 66, 85, 76, 76, 69, 84, 128,
- 66, 85, 76, 76, 69, 212, 66, 85, 76, 76, 128, 66, 85, 76, 66, 128, 66,
- 85, 75, 89, 128, 66, 85, 73, 76, 68, 73, 78, 71, 83, 128, 66, 85, 73, 76,
- 68, 73, 78, 71, 128, 66, 85, 72, 73, 196, 66, 85, 71, 73, 78, 69, 83,
- 197, 66, 85, 71, 128, 66, 85, 70, 70, 65, 76, 79, 128, 66, 85, 67, 75,
- 76, 69, 128, 66, 83, 84, 65, 82, 128, 66, 83, 75, 85, 210, 66, 83, 75,
- 65, 173, 66, 83, 68, 85, 211, 66, 82, 85, 83, 72, 128, 66, 82, 85, 83,
- 200, 66, 82, 79, 78, 90, 69, 128, 66, 82, 79, 75, 69, 206, 66, 82, 79,
- 65, 196, 66, 82, 73, 83, 84, 76, 69, 128, 66, 82, 73, 71, 72, 84, 78, 69,
- 83, 211, 66, 82, 73, 69, 70, 67, 65, 83, 69, 128, 66, 82, 73, 68, 71,
- 197, 66, 82, 73, 68, 197, 66, 82, 73, 67, 75, 128, 66, 82, 69, 86, 73,
- 83, 128, 66, 82, 69, 86, 69, 45, 77, 65, 67, 82, 79, 78, 128, 66, 82, 69,
- 86, 197, 66, 82, 69, 65, 84, 200, 66, 82, 69, 65, 75, 84, 72, 82, 79, 85,
- 71, 72, 128, 66, 82, 69, 65, 68, 128, 66, 82, 68, 193, 66, 82, 65, 78,
- 67, 72, 73, 78, 199, 66, 82, 65, 78, 67, 72, 128, 66, 82, 65, 78, 67,
- 200, 66, 82, 65, 75, 67, 69, 84, 128, 66, 82, 65, 67, 75, 69, 84, 69,
- 196, 66, 82, 65, 67, 75, 69, 212, 66, 82, 65, 67, 69, 128, 66, 81, 128,
- 66, 80, 72, 128, 66, 79, 89, 128, 66, 79, 87, 84, 73, 69, 128, 66, 79,
- 87, 84, 73, 197, 66, 79, 87, 76, 73, 78, 71, 128, 66, 79, 87, 76, 128,
- 66, 79, 87, 73, 78, 199, 66, 79, 215, 66, 79, 85, 81, 85, 69, 84, 128,
- 66, 79, 85, 78, 68, 65, 82, 217, 66, 79, 84, 84, 79, 77, 45, 76, 73, 71,
- 72, 84, 69, 196, 66, 79, 84, 84, 79, 77, 128, 66, 79, 84, 84, 79, 205,
- 66, 79, 84, 84, 76, 69, 128, 66, 79, 84, 84, 76, 197, 66, 79, 84, 200,
- 66, 79, 82, 85, 84, 79, 128, 66, 79, 82, 65, 88, 45, 51, 128, 66, 79, 82,
- 65, 88, 45, 50, 128, 66, 79, 82, 65, 88, 128, 66, 79, 80, 79, 77, 79, 70,
- 207, 66, 79, 79, 84, 83, 128, 66, 79, 79, 84, 128, 66, 79, 79, 77, 69,
- 82, 65, 78, 71, 128, 66, 79, 79, 75, 83, 128, 66, 79, 79, 75, 77, 65, 82,
- 75, 128, 66, 79, 79, 75, 77, 65, 82, 203, 66, 79, 78, 69, 128, 66, 79,
- 77, 66, 128, 66, 79, 77, 128, 66, 79, 76, 84, 128, 66, 79, 76, 212, 66,
- 79, 72, 65, 73, 82, 73, 195, 66, 79, 68, 89, 128, 66, 79, 65, 82, 128,
- 66, 79, 65, 128, 66, 76, 85, 69, 128, 66, 76, 85, 197, 66, 76, 79, 87,
- 70, 73, 83, 72, 128, 66, 76, 79, 83, 83, 79, 77, 128, 66, 76, 79, 79, 68,
- 128, 66, 76, 79, 78, 196, 66, 76, 79, 67, 75, 128, 66, 76, 69, 78, 68,
- 69, 196, 66, 76, 65, 78, 75, 128, 66, 76, 65, 78, 203, 66, 76, 65, 68,
- 197, 66, 76, 65, 67, 75, 70, 79, 79, 212, 66, 76, 65, 67, 75, 45, 76, 69,
- 84, 84, 69, 210, 66, 76, 65, 67, 75, 45, 70, 69, 65, 84, 72, 69, 82, 69,
- 196, 66, 76, 65, 67, 75, 128, 66, 75, 65, 173, 66, 73, 84, 84, 69, 82,
- 128, 66, 73, 84, 73, 78, 199, 66, 73, 83, 77, 85, 84, 200, 66, 73, 83,
- 77, 73, 76, 76, 65, 200, 66, 73, 83, 72, 79, 80, 128, 66, 73, 83, 69, 67,
- 84, 73, 78, 199, 66, 73, 83, 65, 72, 128, 66, 73, 82, 85, 128, 66, 73,
- 82, 84, 72, 68, 65, 217, 66, 73, 82, 71, 65, 128, 66, 73, 82, 68, 128,
- 66, 73, 79, 72, 65, 90, 65, 82, 196, 66, 73, 78, 79, 67, 85, 76, 65, 210,
- 66, 73, 78, 68, 73, 78, 199, 66, 73, 78, 68, 73, 128, 66, 73, 78, 65, 82,
- 217, 66, 73, 76, 76, 73, 65, 82, 68, 83, 128, 66, 73, 76, 65, 66, 73, 65,
+ 72, 69, 73, 75, 72, 65, 78, 128, 67, 72, 69, 69, 83, 197, 67, 72, 69, 69,
+ 82, 73, 78, 199, 67, 72, 69, 69, 77, 128, 67, 72, 69, 69, 75, 211, 67,
+ 72, 69, 69, 75, 128, 67, 72, 69, 69, 128, 67, 72, 69, 67, 75, 69, 210,
+ 67, 72, 69, 67, 75, 128, 67, 72, 69, 67, 203, 67, 72, 197, 67, 72, 65,
+ 88, 128, 67, 72, 65, 86, 73, 89, 65, 78, 73, 128, 67, 72, 65, 84, 84, 65,
+ 87, 65, 128, 67, 72, 65, 84, 128, 67, 72, 65, 82, 84, 128, 67, 72, 65,
+ 82, 212, 67, 72, 65, 82, 73, 79, 84, 128, 67, 72, 65, 82, 73, 79, 212,
+ 67, 72, 65, 82, 65, 67, 84, 69, 82, 83, 128, 67, 72, 65, 82, 65, 67, 84,
+ 69, 82, 128, 67, 72, 65, 82, 128, 67, 72, 65, 80, 84, 69, 82, 128, 67,
+ 72, 65, 80, 128, 67, 72, 65, 78, 71, 128, 67, 72, 65, 78, 128, 67, 72,
+ 65, 77, 75, 79, 128, 67, 72, 65, 77, 73, 76, 79, 78, 128, 67, 72, 65, 77,
+ 73, 76, 73, 128, 67, 72, 65, 205, 67, 72, 65, 75, 77, 193, 67, 72, 65,
+ 73, 82, 128, 67, 72, 65, 73, 78, 83, 128, 67, 72, 65, 68, 65, 128, 67,
+ 72, 65, 196, 67, 72, 65, 65, 128, 67, 71, 74, 128, 67, 69, 88, 128, 67,
+ 69, 82, 69, 83, 128, 67, 69, 82, 69, 77, 79, 78, 89, 128, 67, 69, 82, 69,
+ 75, 128, 67, 69, 82, 45, 87, 65, 128, 67, 69, 80, 128, 67, 69, 79, 78,
+ 71, 67, 72, 73, 69, 85, 77, 83, 83, 65, 78, 71, 83, 73, 79, 83, 128, 67,
+ 69, 79, 78, 71, 67, 72, 73, 69, 85, 77, 83, 83, 65, 78, 71, 67, 73, 69,
+ 85, 67, 128, 67, 69, 79, 78, 71, 67, 72, 73, 69, 85, 77, 83, 73, 79, 83,
+ 128, 67, 69, 79, 78, 71, 67, 72, 73, 69, 85, 77, 67, 73, 69, 85, 67, 128,
+ 67, 69, 79, 78, 71, 67, 72, 73, 69, 85, 77, 67, 72, 73, 69, 85, 67, 72,
+ 128, 67, 69, 78, 84, 85, 82, 73, 65, 204, 67, 69, 78, 84, 82, 69, 76, 73,
+ 78, 197, 67, 69, 78, 84, 82, 69, 68, 128, 67, 69, 78, 84, 82, 69, 196,
+ 67, 69, 78, 84, 82, 69, 128, 67, 69, 78, 84, 82, 197, 67, 69, 78, 84, 82,
+ 65, 76, 73, 90, 65, 84, 73, 79, 206, 67, 69, 78, 128, 67, 69, 76, 84, 73,
+ 195, 67, 69, 76, 83, 73, 85, 83, 128, 67, 69, 76, 69, 66, 82, 65, 84, 73,
+ 79, 78, 128, 67, 69, 73, 82, 84, 128, 67, 69, 73, 76, 73, 78, 71, 128,
+ 67, 69, 73, 76, 73, 78, 199, 67, 69, 69, 86, 128, 67, 69, 69, 66, 128,
+ 67, 69, 69, 128, 67, 69, 68, 73, 76, 76, 65, 128, 67, 69, 68, 73, 76, 76,
+ 193, 67, 69, 68, 201, 67, 69, 67, 69, 75, 128, 67, 69, 67, 65, 75, 128,
+ 67, 69, 67, 65, 203, 67, 69, 65, 76, 67, 128, 67, 67, 85, 128, 67, 67,
+ 79, 128, 67, 67, 73, 128, 67, 67, 72, 85, 128, 67, 67, 72, 79, 128, 67,
+ 67, 72, 73, 128, 67, 67, 72, 72, 85, 128, 67, 67, 72, 72, 79, 128, 67,
+ 67, 72, 72, 73, 128, 67, 67, 72, 72, 69, 69, 128, 67, 67, 72, 72, 69,
+ 128, 67, 67, 72, 72, 65, 65, 128, 67, 67, 72, 72, 65, 128, 67, 67, 72,
+ 69, 69, 128, 67, 67, 72, 69, 128, 67, 67, 72, 65, 65, 128, 67, 67, 72,
+ 65, 128, 67, 67, 72, 128, 67, 67, 69, 69, 128, 67, 67, 69, 128, 67, 67,
+ 65, 65, 128, 67, 67, 65, 128, 67, 65, 89, 78, 128, 67, 65, 89, 65, 78,
+ 78, 65, 128, 67, 65, 88, 128, 67, 65, 86, 69, 128, 67, 65, 85, 84, 73,
+ 79, 206, 67, 65, 85, 76, 68, 82, 79, 78, 128, 67, 65, 85, 68, 65, 128,
+ 67, 65, 85, 67, 65, 83, 73, 65, 206, 67, 65, 85, 128, 67, 65, 84, 65, 87,
+ 65, 128, 67, 65, 84, 128, 67, 65, 212, 67, 65, 83, 84, 76, 69, 128, 67,
+ 65, 83, 75, 69, 212, 67, 65, 82, 89, 83, 84, 73, 65, 206, 67, 65, 82, 84,
+ 82, 73, 68, 71, 69, 128, 67, 65, 82, 84, 128, 67, 65, 82, 211, 67, 65,
+ 82, 82, 73, 65, 71, 197, 67, 65, 82, 80, 69, 78, 84, 82, 217, 67, 65, 82,
+ 208, 67, 65, 82, 79, 85, 83, 69, 204, 67, 65, 82, 79, 78, 128, 67, 65,
+ 82, 79, 206, 67, 65, 82, 73, 203, 67, 65, 82, 73, 65, 206, 67, 65, 82,
+ 69, 84, 128, 67, 65, 82, 69, 212, 67, 65, 82, 197, 67, 65, 82, 68, 83,
+ 128, 67, 65, 82, 68, 128, 67, 65, 82, 196, 67, 65, 82, 128, 67, 65, 210,
+ 67, 65, 80, 85, 212, 67, 65, 80, 84, 73, 86, 69, 128, 67, 65, 80, 82, 73,
+ 67, 79, 82, 78, 128, 67, 65, 80, 80, 69, 196, 67, 65, 80, 79, 128, 67,
+ 65, 80, 73, 84, 85, 76, 85, 77, 128, 67, 65, 80, 73, 84, 65, 76, 128, 67,
+ 65, 78, 84, 73, 76, 76, 65, 84, 73, 79, 206, 67, 65, 78, 199, 67, 65, 78,
+ 68, 89, 128, 67, 65, 78, 68, 82, 65, 66, 73, 78, 68, 85, 128, 67, 65, 78,
+ 68, 82, 65, 66, 73, 78, 68, 213, 67, 65, 78, 68, 82, 65, 128, 67, 65, 78,
+ 68, 82, 193, 67, 65, 78, 68, 76, 69, 128, 67, 65, 78, 67, 69, 82, 128,
+ 67, 65, 78, 67, 69, 76, 76, 65, 84, 73, 79, 206, 67, 65, 78, 67, 69, 76,
+ 128, 67, 65, 78, 67, 69, 204, 67, 65, 78, 128, 67, 65, 77, 80, 73, 78,
+ 71, 128, 67, 65, 77, 78, 85, 195, 67, 65, 77, 69, 82, 65, 128, 67, 65,
+ 77, 69, 82, 193, 67, 65, 77, 69, 76, 128, 67, 65, 76, 89, 65, 128, 67,
+ 65, 76, 89, 193, 67, 65, 76, 88, 128, 67, 65, 76, 76, 128, 67, 65, 76,
+ 69, 78, 68, 65, 82, 128, 67, 65, 76, 69, 78, 68, 65, 210, 67, 65, 76, 67,
+ 85, 76, 65, 84, 79, 82, 128, 67, 65, 76, 67, 128, 67, 65, 75, 82, 65,
+ 128, 67, 65, 75, 197, 67, 65, 73, 128, 67, 65, 72, 128, 67, 65, 69, 83,
+ 85, 82, 65, 128, 67, 65, 68, 85, 67, 69, 85, 83, 128, 67, 65, 68, 193,
+ 67, 65, 67, 84, 85, 83, 128, 67, 65, 66, 76, 69, 87, 65, 89, 128, 67, 65,
+ 66, 73, 78, 69, 84, 128, 67, 65, 66, 66, 65, 71, 69, 45, 84, 82, 69, 69,
+ 128, 67, 65, 65, 78, 71, 128, 67, 65, 65, 73, 128, 67, 193, 67, 48, 50,
+ 52, 128, 67, 48, 50, 51, 128, 67, 48, 50, 50, 128, 67, 48, 50, 49, 128,
+ 67, 48, 50, 48, 128, 67, 48, 49, 57, 128, 67, 48, 49, 56, 128, 67, 48,
+ 49, 55, 128, 67, 48, 49, 54, 128, 67, 48, 49, 53, 128, 67, 48, 49, 52,
+ 128, 67, 48, 49, 51, 128, 67, 48, 49, 50, 128, 67, 48, 49, 49, 128, 67,
+ 48, 49, 48, 65, 128, 67, 48, 49, 48, 128, 67, 48, 48, 57, 128, 67, 48,
+ 48, 56, 128, 67, 48, 48, 55, 128, 67, 48, 48, 54, 128, 67, 48, 48, 53,
+ 128, 67, 48, 48, 52, 128, 67, 48, 48, 51, 128, 67, 48, 48, 50, 67, 128,
+ 67, 48, 48, 50, 66, 128, 67, 48, 48, 50, 65, 128, 67, 48, 48, 50, 128,
+ 67, 48, 48, 49, 128, 67, 45, 83, 73, 77, 80, 76, 73, 70, 73, 69, 196, 67,
+ 45, 51, 57, 128, 67, 45, 49, 56, 128, 66, 90, 85, 78, 199, 66, 90, 72,
+ 201, 66, 89, 84, 197, 66, 89, 69, 76, 79, 82, 85, 83, 83, 73, 65, 78, 45,
+ 85, 75, 82, 65, 73, 78, 73, 65, 206, 66, 88, 71, 128, 66, 87, 73, 128,
+ 66, 87, 69, 69, 128, 66, 87, 69, 128, 66, 87, 65, 128, 66, 85, 85, 77,
+ 73, 83, 72, 128, 66, 85, 84, 84, 79, 78, 128, 66, 85, 84, 84, 79, 206,
+ 66, 85, 212, 66, 85, 83, 84, 211, 66, 85, 83, 212, 66, 85, 83, 83, 89,
+ 69, 82, 85, 128, 66, 85, 83, 73, 78, 69, 83, 211, 66, 85, 211, 66, 85,
+ 82, 213, 66, 85, 82, 82, 73, 84, 79, 128, 66, 85, 82, 50, 128, 66, 85,
+ 210, 66, 85, 79, 88, 128, 66, 85, 79, 80, 128, 66, 85, 78, 78, 217, 66,
+ 85, 78, 71, 128, 66, 85, 77, 80, 217, 66, 85, 76, 85, 71, 128, 66, 85,
+ 76, 85, 199, 66, 85, 76, 76, 83, 69, 89, 69, 128, 66, 85, 76, 76, 211,
+ 66, 85, 76, 76, 72, 79, 82, 78, 128, 66, 85, 76, 76, 72, 79, 82, 206, 66,
+ 85, 76, 76, 69, 84, 128, 66, 85, 76, 76, 69, 212, 66, 85, 76, 76, 128,
+ 66, 85, 76, 66, 128, 66, 85, 75, 89, 128, 66, 85, 73, 76, 68, 73, 78, 71,
+ 83, 128, 66, 85, 73, 76, 68, 73, 78, 71, 128, 66, 85, 73, 76, 68, 73, 78,
+ 199, 66, 85, 72, 73, 196, 66, 85, 71, 73, 78, 69, 83, 197, 66, 85, 71,
+ 128, 66, 85, 70, 70, 65, 76, 79, 128, 66, 85, 68, 128, 66, 85, 67, 75,
+ 76, 69, 128, 66, 85, 66, 66, 76, 69, 83, 128, 66, 85, 66, 66, 76, 69,
+ 128, 66, 83, 84, 65, 82, 128, 66, 83, 75, 85, 210, 66, 83, 75, 65, 173,
+ 66, 83, 68, 85, 211, 66, 82, 85, 83, 200, 66, 82, 79, 78, 90, 69, 128,
+ 66, 82, 79, 75, 69, 206, 66, 82, 79, 65, 196, 66, 82, 73, 83, 84, 76, 69,
+ 128, 66, 82, 73, 71, 72, 84, 78, 69, 83, 211, 66, 82, 73, 69, 70, 67, 65,
+ 83, 69, 128, 66, 82, 73, 68, 71, 197, 66, 82, 73, 68, 197, 66, 82, 73,
+ 67, 75, 128, 66, 82, 69, 86, 73, 83, 128, 66, 82, 69, 86, 69, 45, 77, 65,
+ 67, 82, 79, 78, 128, 66, 82, 69, 86, 197, 66, 82, 69, 65, 84, 200, 66,
+ 82, 69, 65, 75, 84, 72, 82, 79, 85, 71, 72, 128, 66, 82, 69, 65, 68, 128,
+ 66, 82, 68, 193, 66, 82, 65, 78, 67, 72, 73, 78, 199, 66, 82, 65, 78, 67,
+ 72, 69, 83, 128, 66, 82, 65, 78, 67, 72, 128, 66, 82, 65, 78, 67, 200,
+ 66, 82, 65, 75, 67, 69, 84, 128, 66, 82, 65, 67, 75, 69, 84, 69, 196, 66,
+ 82, 65, 67, 75, 69, 212, 66, 82, 65, 67, 69, 128, 66, 81, 128, 66, 80,
+ 72, 128, 66, 79, 89, 211, 66, 79, 89, 128, 66, 79, 87, 84, 73, 69, 128,
+ 66, 79, 87, 84, 73, 197, 66, 79, 87, 76, 73, 78, 71, 128, 66, 79, 87, 76,
+ 128, 66, 79, 87, 204, 66, 79, 87, 73, 78, 199, 66, 79, 215, 66, 79, 85,
+ 81, 85, 69, 84, 128, 66, 79, 85, 81, 85, 69, 212, 66, 79, 85, 78, 68, 65,
+ 82, 217, 66, 79, 84, 84, 79, 77, 45, 83, 72, 65, 68, 69, 196, 66, 79, 84,
+ 84, 79, 77, 45, 76, 73, 71, 72, 84, 69, 196, 66, 79, 84, 84, 79, 77, 128,
+ 66, 79, 84, 84, 79, 205, 66, 79, 84, 84, 76, 69, 128, 66, 79, 84, 84, 76,
+ 197, 66, 79, 84, 200, 66, 79, 82, 85, 84, 79, 128, 66, 79, 82, 65, 88,
+ 45, 51, 128, 66, 79, 82, 65, 88, 45, 50, 128, 66, 79, 82, 65, 88, 128,
+ 66, 79, 80, 79, 77, 79, 70, 207, 66, 79, 79, 84, 83, 128, 66, 79, 79, 84,
+ 128, 66, 79, 79, 77, 69, 82, 65, 78, 71, 128, 66, 79, 79, 75, 83, 128,
+ 66, 79, 79, 75, 77, 65, 82, 75, 128, 66, 79, 79, 75, 77, 65, 82, 203, 66,
+ 79, 78, 69, 128, 66, 79, 77, 66, 128, 66, 79, 77, 128, 66, 79, 76, 84,
+ 128, 66, 79, 76, 212, 66, 79, 72, 65, 73, 82, 73, 195, 66, 79, 68, 89,
+ 128, 66, 79, 68, 217, 66, 79, 65, 82, 128, 66, 79, 65, 128, 66, 76, 85,
+ 69, 128, 66, 76, 85, 197, 66, 76, 79, 87, 73, 78, 199, 66, 76, 79, 87,
+ 70, 73, 83, 72, 128, 66, 76, 79, 215, 66, 76, 79, 83, 83, 79, 77, 128,
+ 66, 76, 79, 79, 68, 128, 66, 76, 79, 78, 196, 66, 76, 79, 67, 75, 128,
+ 66, 76, 73, 78, 203, 66, 76, 69, 78, 68, 69, 196, 66, 76, 65, 78, 75,
+ 128, 66, 76, 65, 78, 203, 66, 76, 65, 68, 197, 66, 76, 65, 67, 75, 76,
+ 69, 84, 84, 69, 210, 66, 76, 65, 67, 75, 70, 79, 79, 212, 66, 76, 65, 67,
+ 75, 45, 76, 69, 84, 84, 69, 210, 66, 76, 65, 67, 75, 45, 70, 69, 65, 84,
+ 72, 69, 82, 69, 196, 66, 76, 65, 67, 75, 128, 66, 75, 65, 173, 66, 73,
+ 84, 84, 69, 82, 128, 66, 73, 84, 73, 78, 199, 66, 73, 84, 197, 66, 73,
+ 83, 77, 85, 84, 200, 66, 73, 83, 77, 73, 76, 76, 65, 200, 66, 73, 83, 72,
+ 79, 80, 128, 66, 73, 83, 69, 67, 84, 73, 78, 199, 66, 73, 83, 65, 72,
+ 128, 66, 73, 82, 85, 128, 66, 73, 82, 84, 72, 68, 65, 217, 66, 73, 82,
+ 71, 65, 128, 66, 73, 82, 68, 128, 66, 73, 79, 72, 65, 90, 65, 82, 196,
+ 66, 73, 78, 79, 67, 85, 76, 65, 210, 66, 73, 78, 68, 73, 78, 199, 66, 73,
+ 78, 68, 73, 128, 66, 73, 78, 65, 82, 217, 66, 73, 76, 76, 73, 79, 78, 83,
+ 128, 66, 73, 76, 76, 73, 65, 82, 68, 83, 128, 66, 73, 76, 65, 66, 73, 65,
204, 66, 73, 75, 73, 78, 73, 128, 66, 73, 71, 128, 66, 73, 199, 66, 73,
69, 84, 128, 66, 73, 68, 69, 78, 84, 65, 204, 66, 73, 68, 65, 75, 85, 79,
206, 66, 73, 67, 89, 67, 76, 73, 83, 84, 128, 66, 73, 67, 89, 67, 76, 69,
@@ -4351,178 +4729,186 @@ static unsigned char lexicon[] = {
84, 87, 69, 69, 206, 66, 69, 84, 72, 128, 66, 69, 84, 65, 128, 66, 69,
84, 193, 66, 69, 212, 66, 69, 83, 73, 68, 197, 66, 69, 82, 75, 65, 78,
65, 206, 66, 69, 82, 66, 69, 210, 66, 69, 80, 128, 66, 69, 79, 82, 195,
- 66, 69, 78, 90, 69, 78, 197, 66, 69, 78, 84, 207, 66, 69, 78, 68, 69,
- 128, 66, 69, 78, 68, 128, 66, 69, 206, 66, 69, 76, 84, 128, 66, 69, 76,
- 212, 66, 69, 76, 79, 215, 66, 69, 76, 76, 128, 66, 69, 76, 204, 66, 69,
- 76, 71, 84, 72, 79, 210, 66, 69, 76, 128, 66, 69, 73, 84, 72, 128, 66,
- 69, 72, 73, 78, 196, 66, 69, 72, 69, 72, 128, 66, 69, 72, 69, 200, 66,
- 69, 72, 128, 66, 69, 200, 66, 69, 71, 73, 78, 78, 73, 78, 71, 128, 66,
- 69, 71, 73, 78, 78, 69, 82, 128, 66, 69, 71, 73, 206, 66, 69, 70, 79, 82,
+ 66, 69, 78, 90, 69, 78, 197, 66, 69, 78, 84, 207, 66, 69, 78, 84, 128,
+ 66, 69, 78, 212, 66, 69, 78, 68, 69, 128, 66, 69, 78, 68, 128, 66, 69,
+ 78, 196, 66, 69, 206, 66, 69, 76, 84, 128, 66, 69, 76, 212, 66, 69, 76,
+ 79, 215, 66, 69, 76, 76, 72, 79, 208, 66, 69, 76, 76, 128, 66, 69, 76,
+ 204, 66, 69, 76, 71, 84, 72, 79, 210, 66, 69, 73, 84, 72, 128, 66, 69,
+ 72, 73, 78, 196, 66, 69, 72, 69, 72, 128, 66, 69, 72, 69, 200, 66, 69,
+ 72, 128, 66, 69, 200, 66, 69, 71, 73, 78, 78, 73, 78, 71, 128, 66, 69,
+ 71, 73, 78, 78, 69, 82, 128, 66, 69, 71, 73, 206, 66, 69, 70, 79, 82,
197, 66, 69, 69, 84, 76, 69, 128, 66, 69, 69, 84, 65, 128, 66, 69, 69,
210, 66, 69, 69, 72, 73, 86, 69, 128, 66, 69, 69, 72, 128, 66, 69, 69,
200, 66, 69, 67, 65, 85, 83, 69, 128, 66, 69, 65, 86, 69, 210, 66, 69,
65, 84, 73, 78, 199, 66, 69, 65, 84, 128, 66, 69, 65, 210, 66, 69, 65,
- 78, 128, 66, 69, 65, 77, 69, 196, 66, 67, 65, 68, 128, 66, 67, 65, 196,
- 66, 66, 89, 88, 128, 66, 66, 89, 84, 128, 66, 66, 89, 80, 128, 66, 66,
- 89, 128, 66, 66, 85, 88, 128, 66, 66, 85, 84, 128, 66, 66, 85, 82, 88,
- 128, 66, 66, 85, 82, 128, 66, 66, 85, 80, 128, 66, 66, 85, 79, 88, 128,
- 66, 66, 85, 79, 80, 128, 66, 66, 85, 79, 128, 66, 66, 85, 128, 66, 66,
- 79, 88, 128, 66, 66, 79, 84, 128, 66, 66, 79, 80, 128, 66, 66, 79, 128,
- 66, 66, 73, 88, 128, 66, 66, 73, 80, 128, 66, 66, 73, 69, 88, 128, 66,
- 66, 73, 69, 84, 128, 66, 66, 73, 69, 80, 128, 66, 66, 73, 69, 128, 66,
- 66, 73, 128, 66, 66, 69, 88, 128, 66, 66, 69, 80, 128, 66, 66, 69, 69,
- 128, 66, 66, 69, 128, 66, 66, 65, 88, 128, 66, 66, 65, 84, 128, 66, 66,
- 65, 80, 128, 66, 66, 65, 65, 128, 66, 66, 65, 128, 66, 65, 89, 65, 78,
- 78, 65, 128, 66, 65, 85, 128, 66, 65, 84, 84, 69, 82, 89, 128, 66, 65,
- 84, 72, 84, 85, 66, 128, 66, 65, 84, 72, 65, 77, 65, 83, 65, 84, 128, 66,
- 65, 84, 72, 128, 66, 65, 84, 200, 66, 65, 84, 65, 203, 66, 65, 83, 83,
- 65, 128, 66, 65, 83, 75, 69, 84, 66, 65, 76, 204, 66, 65, 83, 72, 75, 73,
- 210, 66, 65, 83, 72, 128, 66, 65, 83, 69, 66, 65, 76, 76, 128, 66, 65,
- 83, 69, 128, 66, 65, 83, 197, 66, 65, 82, 83, 128, 66, 65, 82, 82, 73,
- 69, 82, 128, 66, 65, 82, 82, 69, 75, 72, 128, 66, 65, 82, 82, 69, 69,
- 128, 66, 65, 82, 82, 69, 197, 66, 65, 82, 76, 73, 78, 69, 128, 66, 65,
- 82, 76, 69, 89, 128, 66, 65, 82, 73, 89, 79, 79, 83, 65, 78, 128, 66, 65,
- 82, 66, 69, 210, 66, 65, 82, 194, 66, 65, 82, 65, 50, 128, 66, 65, 210,
- 66, 65, 78, 84, 79, 67, 128, 66, 65, 78, 75, 78, 79, 84, 197, 66, 65, 78,
- 75, 128, 66, 65, 78, 203, 66, 65, 78, 68, 128, 66, 65, 78, 65, 78, 65,
- 128, 66, 65, 78, 50, 128, 66, 65, 78, 178, 66, 65, 77, 66, 79, 79, 83,
- 128, 66, 65, 77, 66, 79, 79, 128, 66, 65, 76, 85, 68, 65, 128, 66, 65,
- 76, 76, 79, 212, 66, 65, 76, 76, 79, 79, 78, 45, 83, 80, 79, 75, 69, 196,
- 66, 65, 76, 76, 79, 79, 78, 128, 66, 65, 76, 65, 71, 128, 66, 65, 76,
- 128, 66, 65, 204, 66, 65, 73, 82, 75, 65, 78, 128, 66, 65, 73, 77, 65,
- 73, 128, 66, 65, 72, 84, 128, 66, 65, 72, 73, 82, 71, 79, 77, 85, 75, 72,
- 65, 128, 66, 65, 72, 65, 82, 50, 128, 66, 65, 72, 128, 66, 65, 71, 71,
- 65, 71, 197, 66, 65, 71, 65, 128, 66, 65, 71, 51, 128, 66, 65, 199, 66,
- 65, 68, 71, 69, 82, 128, 66, 65, 68, 71, 69, 128, 66, 65, 68, 128, 66,
- 65, 67, 84, 82, 73, 65, 206, 66, 65, 67, 75, 87, 65, 82, 68, 128, 66, 65,
- 67, 75, 83, 80, 65, 67, 69, 128, 66, 65, 67, 75, 83, 76, 65, 83, 72, 128,
- 66, 65, 67, 75, 83, 76, 65, 83, 200, 66, 65, 67, 75, 72, 65, 78, 196, 66,
- 65, 67, 75, 45, 84, 73, 76, 84, 69, 196, 66, 65, 67, 75, 128, 66, 65, 67,
- 203, 66, 65, 66, 89, 128, 66, 65, 66, 217, 66, 65, 65, 82, 69, 82, 85,
- 128, 66, 65, 45, 50, 128, 66, 51, 48, 53, 128, 66, 50, 53, 57, 128, 66,
- 50, 53, 56, 128, 66, 50, 53, 55, 128, 66, 50, 53, 54, 128, 66, 50, 53,
- 53, 128, 66, 50, 53, 180, 66, 50, 53, 51, 128, 66, 50, 53, 50, 128, 66,
- 50, 53, 49, 128, 66, 50, 53, 48, 128, 66, 50, 52, 57, 128, 66, 50, 52,
- 56, 128, 66, 50, 52, 183, 66, 50, 52, 54, 128, 66, 50, 52, 53, 128, 66,
- 50, 52, 179, 66, 50, 52, 178, 66, 50, 52, 177, 66, 50, 52, 176, 66, 50,
- 51, 54, 128, 66, 50, 51, 52, 128, 66, 50, 51, 179, 66, 50, 51, 50, 128,
- 66, 50, 51, 177, 66, 50, 51, 176, 66, 50, 50, 57, 128, 66, 50, 50, 56,
- 128, 66, 50, 50, 55, 128, 66, 50, 50, 54, 128, 66, 50, 50, 181, 66, 50,
- 50, 50, 128, 66, 50, 50, 49, 128, 66, 50, 50, 176, 66, 50, 49, 57, 128,
- 66, 50, 49, 56, 128, 66, 50, 49, 55, 128, 66, 50, 49, 54, 128, 66, 50,
- 49, 53, 128, 66, 50, 49, 52, 128, 66, 50, 49, 51, 128, 66, 50, 49, 50,
- 128, 66, 50, 49, 49, 128, 66, 50, 49, 48, 128, 66, 50, 48, 57, 128, 66,
- 50, 48, 56, 128, 66, 50, 48, 55, 128, 66, 50, 48, 54, 128, 66, 50, 48,
- 53, 128, 66, 50, 48, 52, 128, 66, 50, 48, 51, 128, 66, 50, 48, 50, 128,
- 66, 50, 48, 49, 128, 66, 50, 48, 48, 128, 66, 49, 57, 177, 66, 49, 57,
- 48, 128, 66, 49, 56, 57, 128, 66, 49, 56, 53, 128, 66, 49, 56, 52, 128,
- 66, 49, 56, 51, 128, 66, 49, 56, 50, 128, 66, 49, 56, 49, 128, 66, 49,
- 56, 48, 128, 66, 49, 55, 57, 128, 66, 49, 55, 56, 128, 66, 49, 55, 55,
- 128, 66, 49, 55, 182, 66, 49, 55, 52, 128, 66, 49, 55, 179, 66, 49, 55,
- 50, 128, 66, 49, 55, 49, 128, 66, 49, 55, 48, 128, 66, 49, 54, 57, 128,
- 66, 49, 54, 56, 128, 66, 49, 54, 55, 128, 66, 49, 54, 54, 128, 66, 49,
- 54, 53, 128, 66, 49, 54, 52, 128, 66, 49, 54, 179, 66, 49, 54, 178, 66,
- 49, 54, 49, 128, 66, 49, 54, 48, 128, 66, 49, 53, 185, 66, 49, 53, 56,
- 128, 66, 49, 53, 55, 128, 66, 49, 53, 182, 66, 49, 53, 53, 128, 66, 49,
- 53, 52, 128, 66, 49, 53, 51, 128, 66, 49, 53, 50, 128, 66, 49, 53, 177,
- 66, 49, 53, 48, 128, 66, 49, 52, 54, 128, 66, 49, 52, 181, 66, 49, 52,
- 50, 128, 66, 49, 52, 177, 66, 49, 52, 176, 66, 49, 51, 181, 66, 49, 51,
- 179, 66, 49, 51, 50, 128, 66, 49, 51, 177, 66, 49, 51, 176, 66, 49, 50,
- 184, 66, 49, 50, 183, 66, 49, 50, 181, 66, 49, 50, 179, 66, 49, 50, 178,
- 66, 49, 50, 177, 66, 49, 50, 176, 66, 49, 48, 57, 205, 66, 49, 48, 57,
- 198, 66, 49, 48, 56, 205, 66, 49, 48, 56, 198, 66, 49, 48, 55, 205, 66,
- 49, 48, 55, 198, 66, 49, 48, 54, 205, 66, 49, 48, 54, 198, 66, 49, 48,
- 53, 205, 66, 49, 48, 53, 198, 66, 49, 48, 181, 66, 49, 48, 180, 66, 49,
- 48, 178, 66, 49, 48, 176, 66, 48, 57, 177, 66, 48, 57, 176, 66, 48, 56,
- 57, 128, 66, 48, 56, 183, 66, 48, 56, 54, 128, 66, 48, 56, 181, 66, 48,
- 56, 51, 128, 66, 48, 56, 50, 128, 66, 48, 56, 177, 66, 48, 56, 176, 66,
- 48, 55, 57, 128, 66, 48, 55, 184, 66, 48, 55, 183, 66, 48, 55, 182, 66,
- 48, 55, 181, 66, 48, 55, 180, 66, 48, 55, 179, 66, 48, 55, 178, 66, 48,
- 55, 177, 66, 48, 55, 176, 66, 48, 54, 185, 66, 48, 54, 184, 66, 48, 54,
- 183, 66, 48, 54, 182, 66, 48, 54, 181, 66, 48, 54, 52, 128, 66, 48, 54,
- 51, 128, 66, 48, 54, 178, 66, 48, 54, 177, 66, 48, 54, 176, 66, 48, 53,
- 185, 66, 48, 53, 184, 66, 48, 53, 183, 66, 48, 53, 54, 128, 66, 48, 53,
- 181, 66, 48, 53, 180, 66, 48, 53, 179, 66, 48, 53, 178, 66, 48, 53, 177,
- 66, 48, 53, 176, 66, 48, 52, 57, 128, 66, 48, 52, 184, 66, 48, 52, 55,
- 128, 66, 48, 52, 182, 66, 48, 52, 181, 66, 48, 52, 180, 66, 48, 52, 179,
- 66, 48, 52, 178, 66, 48, 52, 177, 66, 48, 52, 176, 66, 48, 51, 185, 66,
- 48, 51, 184, 66, 48, 51, 183, 66, 48, 51, 182, 66, 48, 51, 52, 128, 66,
- 48, 51, 179, 66, 48, 51, 178, 66, 48, 51, 177, 66, 48, 51, 176, 66, 48,
- 50, 185, 66, 48, 50, 184, 66, 48, 50, 183, 66, 48, 50, 182, 66, 48, 50,
- 181, 66, 48, 50, 180, 66, 48, 50, 179, 66, 48, 50, 50, 128, 66, 48, 50,
- 177, 66, 48, 50, 176, 66, 48, 49, 57, 128, 66, 48, 49, 56, 128, 66, 48,
- 49, 183, 66, 48, 49, 182, 66, 48, 49, 181, 66, 48, 49, 180, 66, 48, 49,
- 179, 66, 48, 49, 178, 66, 48, 49, 177, 66, 48, 49, 176, 66, 48, 48, 57,
- 128, 66, 48, 48, 185, 66, 48, 48, 56, 128, 66, 48, 48, 184, 66, 48, 48,
- 55, 128, 66, 48, 48, 183, 66, 48, 48, 54, 128, 66, 48, 48, 182, 66, 48,
- 48, 53, 65, 128, 66, 48, 48, 53, 128, 66, 48, 48, 181, 66, 48, 48, 52,
- 128, 66, 48, 48, 180, 66, 48, 48, 51, 128, 66, 48, 48, 179, 66, 48, 48,
- 50, 128, 66, 48, 48, 178, 66, 48, 48, 49, 128, 66, 48, 48, 177, 65, 90,
- 85, 128, 65, 89, 69, 210, 65, 89, 66, 128, 65, 89, 65, 72, 128, 65, 88,
- 69, 128, 65, 87, 69, 128, 65, 86, 69, 83, 84, 65, 206, 65, 86, 69, 82,
- 65, 71, 197, 65, 86, 65, 75, 82, 65, 72, 65, 83, 65, 78, 89, 65, 128, 65,
- 86, 65, 71, 82, 65, 72, 65, 128, 65, 85, 89, 65, 78, 78, 65, 128, 65, 85,
- 84, 85, 77, 78, 128, 65, 85, 84, 79, 77, 79, 66, 73, 76, 69, 128, 65, 85,
- 84, 79, 77, 65, 84, 69, 196, 65, 85, 83, 84, 82, 65, 204, 65, 85, 82, 73,
- 80, 73, 71, 77, 69, 78, 84, 128, 65, 85, 82, 65, 77, 65, 90, 68, 65, 65,
- 72, 65, 128, 65, 85, 82, 65, 77, 65, 90, 68, 65, 65, 45, 50, 128, 65, 85,
- 82, 65, 77, 65, 90, 68, 65, 65, 128, 65, 85, 78, 78, 128, 65, 85, 71, 85,
- 83, 84, 128, 65, 85, 71, 77, 69, 78, 84, 65, 84, 73, 79, 206, 65, 85, 69,
- 128, 65, 85, 66, 69, 82, 71, 73, 78, 69, 128, 65, 84, 84, 73, 195, 65,
- 84, 84, 72, 65, 67, 65, 78, 128, 65, 84, 84, 69, 78, 84, 73, 79, 78, 128,
- 65, 84, 84, 65, 203, 65, 84, 79, 205, 65, 84, 78, 65, 200, 65, 84, 77,
- 65, 65, 85, 128, 65, 84, 73, 89, 65, 128, 65, 84, 72, 76, 69, 84, 73,
- 195, 65, 84, 72, 65, 82, 86, 65, 86, 69, 68, 73, 195, 65, 84, 72, 65, 80,
- 65, 83, 67, 65, 206, 65, 83, 90, 128, 65, 83, 89, 85, 82, 193, 65, 83,
- 89, 77, 80, 84, 79, 84, 73, 67, 65, 76, 76, 217, 65, 83, 84, 82, 79, 78,
- 79, 77, 73, 67, 65, 204, 65, 83, 84, 82, 79, 76, 79, 71, 73, 67, 65, 204,
- 65, 83, 84, 79, 78, 73, 83, 72, 69, 196, 65, 83, 84, 69, 82, 73, 83, 77,
- 128, 65, 83, 84, 69, 82, 73, 83, 75, 211, 65, 83, 84, 69, 82, 73, 83, 75,
- 128, 65, 83, 84, 69, 82, 73, 83, 203, 65, 83, 84, 69, 82, 73, 83, 67, 85,
- 83, 128, 65, 83, 83, 89, 82, 73, 65, 206, 65, 83, 83, 69, 82, 84, 73, 79,
- 78, 128, 65, 83, 80, 73, 82, 65, 84, 73, 79, 78, 128, 65, 83, 80, 73, 82,
- 65, 84, 69, 196, 65, 83, 80, 69, 82, 128, 65, 83, 73, 65, 45, 65, 85, 83,
- 84, 82, 65, 76, 73, 65, 128, 65, 83, 72, 71, 65, 66, 128, 65, 83, 72, 69,
- 83, 128, 65, 83, 72, 57, 128, 65, 83, 72, 178, 65, 83, 67, 69, 78, 84,
+ 78, 128, 66, 69, 65, 77, 69, 196, 66, 69, 65, 68, 83, 128, 66, 69, 65,
+ 67, 200, 66, 67, 65, 68, 128, 66, 67, 65, 196, 66, 66, 89, 88, 128, 66,
+ 66, 89, 84, 128, 66, 66, 89, 80, 128, 66, 66, 89, 128, 66, 66, 85, 88,
+ 128, 66, 66, 85, 84, 128, 66, 66, 85, 82, 88, 128, 66, 66, 85, 82, 128,
+ 66, 66, 85, 80, 128, 66, 66, 85, 79, 88, 128, 66, 66, 85, 79, 80, 128,
+ 66, 66, 85, 79, 128, 66, 66, 85, 128, 66, 66, 79, 88, 128, 66, 66, 79,
+ 84, 128, 66, 66, 79, 80, 128, 66, 66, 79, 128, 66, 66, 73, 88, 128, 66,
+ 66, 73, 80, 128, 66, 66, 73, 69, 88, 128, 66, 66, 73, 69, 84, 128, 66,
+ 66, 73, 69, 80, 128, 66, 66, 73, 69, 128, 66, 66, 73, 128, 66, 66, 69,
+ 88, 128, 66, 66, 69, 80, 128, 66, 66, 69, 69, 128, 66, 66, 69, 128, 66,
+ 66, 65, 88, 128, 66, 66, 65, 84, 128, 66, 66, 65, 80, 128, 66, 66, 65,
+ 65, 128, 66, 66, 65, 128, 66, 65, 89, 65, 78, 78, 65, 128, 66, 65, 85,
+ 128, 66, 65, 84, 84, 69, 82, 89, 128, 66, 65, 84, 72, 84, 85, 66, 128,
+ 66, 65, 84, 72, 65, 77, 65, 83, 65, 84, 128, 66, 65, 84, 72, 128, 66, 65,
+ 84, 200, 66, 65, 84, 65, 203, 66, 65, 83, 83, 65, 128, 66, 65, 83, 83,
+ 193, 66, 65, 83, 75, 69, 84, 66, 65, 76, 204, 66, 65, 83, 72, 75, 73,
+ 210, 66, 65, 83, 72, 128, 66, 65, 83, 69, 76, 73, 78, 197, 66, 65, 83,
+ 69, 66, 65, 76, 76, 128, 66, 65, 83, 69, 128, 66, 65, 83, 197, 66, 65,
+ 82, 83, 128, 66, 65, 82, 82, 73, 69, 82, 128, 66, 65, 82, 82, 69, 75, 72,
+ 128, 66, 65, 82, 82, 69, 69, 128, 66, 65, 82, 82, 69, 197, 66, 65, 82,
+ 76, 73, 78, 69, 128, 66, 65, 82, 76, 69, 89, 128, 66, 65, 82, 73, 89, 79,
+ 79, 83, 65, 78, 128, 66, 65, 82, 66, 69, 210, 66, 65, 82, 65, 50, 128,
+ 66, 65, 210, 66, 65, 78, 84, 79, 67, 128, 66, 65, 78, 75, 78, 79, 84,
+ 197, 66, 65, 78, 75, 128, 66, 65, 78, 203, 66, 65, 78, 68, 128, 66, 65,
+ 78, 65, 78, 65, 128, 66, 65, 78, 50, 128, 66, 65, 78, 178, 66, 65, 77,
+ 66, 79, 79, 83, 128, 66, 65, 77, 66, 79, 79, 128, 66, 65, 76, 85, 68, 65,
+ 128, 66, 65, 76, 76, 80, 79, 73, 78, 212, 66, 65, 76, 76, 79, 84, 128,
+ 66, 65, 76, 76, 79, 212, 66, 65, 76, 76, 79, 79, 78, 45, 83, 80, 79, 75,
+ 69, 196, 66, 65, 76, 76, 79, 79, 78, 128, 66, 65, 76, 65, 71, 128, 66,
+ 65, 76, 128, 66, 65, 204, 66, 65, 73, 82, 75, 65, 78, 128, 66, 65, 73,
+ 77, 65, 73, 128, 66, 65, 72, 84, 128, 66, 65, 72, 73, 82, 71, 79, 77, 85,
+ 75, 72, 65, 128, 66, 65, 72, 65, 82, 50, 128, 66, 65, 72, 65, 82, 178,
+ 66, 65, 72, 128, 66, 65, 71, 83, 128, 66, 65, 71, 71, 65, 71, 197, 66,
+ 65, 71, 65, 128, 66, 65, 71, 51, 128, 66, 65, 199, 66, 65, 68, 77, 73,
+ 78, 84, 79, 206, 66, 65, 68, 71, 69, 82, 128, 66, 65, 68, 71, 69, 128,
+ 66, 65, 68, 128, 66, 65, 196, 66, 65, 67, 84, 82, 73, 65, 206, 66, 65,
+ 67, 75, 87, 65, 82, 68, 128, 66, 65, 67, 75, 83, 80, 65, 67, 69, 128, 66,
+ 65, 67, 75, 83, 76, 65, 83, 72, 128, 66, 65, 67, 75, 83, 76, 65, 83, 200,
+ 66, 65, 67, 75, 83, 76, 65, 78, 84, 69, 196, 66, 65, 67, 75, 72, 65, 78,
+ 196, 66, 65, 67, 75, 45, 84, 73, 76, 84, 69, 196, 66, 65, 67, 75, 128,
+ 66, 65, 67, 203, 66, 65, 66, 89, 128, 66, 65, 66, 217, 66, 65, 65, 82,
+ 69, 82, 85, 128, 66, 65, 45, 50, 128, 66, 51, 48, 53, 128, 66, 50, 53,
+ 57, 128, 66, 50, 53, 56, 128, 66, 50, 53, 55, 128, 66, 50, 53, 54, 128,
+ 66, 50, 53, 53, 128, 66, 50, 53, 180, 66, 50, 53, 51, 128, 66, 50, 53,
+ 50, 128, 66, 50, 53, 49, 128, 66, 50, 53, 48, 128, 66, 50, 52, 57, 128,
+ 66, 50, 52, 56, 128, 66, 50, 52, 183, 66, 50, 52, 54, 128, 66, 50, 52,
+ 53, 128, 66, 50, 52, 179, 66, 50, 52, 178, 66, 50, 52, 177, 66, 50, 52,
+ 176, 66, 50, 51, 54, 128, 66, 50, 51, 52, 128, 66, 50, 51, 179, 66, 50,
+ 51, 50, 128, 66, 50, 51, 177, 66, 50, 51, 176, 66, 50, 50, 57, 128, 66,
+ 50, 50, 56, 128, 66, 50, 50, 55, 128, 66, 50, 50, 54, 128, 66, 50, 50,
+ 181, 66, 50, 50, 50, 128, 66, 50, 50, 49, 128, 66, 50, 50, 176, 66, 50,
+ 49, 57, 128, 66, 50, 49, 56, 128, 66, 50, 49, 55, 128, 66, 50, 49, 54,
+ 128, 66, 50, 49, 53, 128, 66, 50, 49, 52, 128, 66, 50, 49, 51, 128, 66,
+ 50, 49, 50, 128, 66, 50, 49, 49, 128, 66, 50, 49, 48, 128, 66, 50, 48,
+ 57, 128, 66, 50, 48, 56, 128, 66, 50, 48, 55, 128, 66, 50, 48, 54, 128,
+ 66, 50, 48, 53, 128, 66, 50, 48, 52, 128, 66, 50, 48, 51, 128, 66, 50,
+ 48, 50, 128, 66, 50, 48, 49, 128, 66, 50, 48, 48, 128, 66, 49, 57, 177,
+ 66, 49, 57, 48, 128, 66, 49, 56, 57, 128, 66, 49, 56, 53, 128, 66, 49,
+ 56, 52, 128, 66, 49, 56, 51, 128, 66, 49, 56, 50, 128, 66, 49, 56, 49,
+ 128, 66, 49, 56, 48, 128, 66, 49, 55, 57, 128, 66, 49, 55, 56, 128, 66,
+ 49, 55, 55, 128, 66, 49, 55, 182, 66, 49, 55, 52, 128, 66, 49, 55, 179,
+ 66, 49, 55, 50, 128, 66, 49, 55, 49, 128, 66, 49, 55, 48, 128, 66, 49,
+ 54, 57, 128, 66, 49, 54, 56, 128, 66, 49, 54, 55, 128, 66, 49, 54, 54,
+ 128, 66, 49, 54, 53, 128, 66, 49, 54, 52, 128, 66, 49, 54, 179, 66, 49,
+ 54, 178, 66, 49, 54, 49, 128, 66, 49, 54, 48, 128, 66, 49, 53, 185, 66,
+ 49, 53, 56, 128, 66, 49, 53, 55, 128, 66, 49, 53, 182, 66, 49, 53, 53,
+ 128, 66, 49, 53, 52, 128, 66, 49, 53, 51, 128, 66, 49, 53, 50, 128, 66,
+ 49, 53, 177, 66, 49, 53, 48, 128, 66, 49, 52, 54, 128, 66, 49, 52, 181,
+ 66, 49, 52, 50, 128, 66, 49, 52, 177, 66, 49, 52, 176, 66, 49, 51, 181,
+ 66, 49, 51, 179, 66, 49, 51, 50, 128, 66, 49, 51, 177, 66, 49, 51, 176,
+ 66, 49, 50, 184, 66, 49, 50, 183, 66, 49, 50, 181, 66, 49, 50, 179, 66,
+ 49, 50, 178, 66, 49, 50, 177, 66, 49, 50, 176, 66, 49, 48, 57, 205, 66,
+ 49, 48, 57, 198, 66, 49, 48, 56, 205, 66, 49, 48, 56, 198, 66, 49, 48,
+ 55, 205, 66, 49, 48, 55, 198, 66, 49, 48, 54, 205, 66, 49, 48, 54, 198,
+ 66, 49, 48, 53, 205, 66, 49, 48, 53, 198, 66, 49, 48, 181, 66, 49, 48,
+ 180, 66, 49, 48, 178, 66, 49, 48, 176, 66, 48, 57, 177, 66, 48, 57, 176,
+ 66, 48, 56, 57, 128, 66, 48, 56, 183, 66, 48, 56, 54, 128, 66, 48, 56,
+ 181, 66, 48, 56, 51, 128, 66, 48, 56, 50, 128, 66, 48, 56, 177, 66, 48,
+ 56, 176, 66, 48, 55, 57, 128, 66, 48, 55, 184, 66, 48, 55, 183, 66, 48,
+ 55, 182, 66, 48, 55, 181, 66, 48, 55, 180, 66, 48, 55, 179, 66, 48, 55,
+ 178, 66, 48, 55, 177, 66, 48, 55, 176, 66, 48, 54, 185, 66, 48, 54, 184,
+ 66, 48, 54, 183, 66, 48, 54, 182, 66, 48, 54, 181, 66, 48, 54, 52, 128,
+ 66, 48, 54, 51, 128, 66, 48, 54, 178, 66, 48, 54, 177, 66, 48, 54, 176,
+ 66, 48, 53, 185, 66, 48, 53, 184, 66, 48, 53, 183, 66, 48, 53, 54, 128,
+ 66, 48, 53, 181, 66, 48, 53, 180, 66, 48, 53, 179, 66, 48, 53, 178, 66,
+ 48, 53, 177, 66, 48, 53, 176, 66, 48, 52, 57, 128, 66, 48, 52, 184, 66,
+ 48, 52, 55, 128, 66, 48, 52, 182, 66, 48, 52, 181, 66, 48, 52, 180, 66,
+ 48, 52, 179, 66, 48, 52, 178, 66, 48, 52, 177, 66, 48, 52, 176, 66, 48,
+ 51, 185, 66, 48, 51, 184, 66, 48, 51, 183, 66, 48, 51, 182, 66, 48, 51,
+ 52, 128, 66, 48, 51, 179, 66, 48, 51, 178, 66, 48, 51, 177, 66, 48, 51,
+ 176, 66, 48, 50, 185, 66, 48, 50, 184, 66, 48, 50, 183, 66, 48, 50, 182,
+ 66, 48, 50, 181, 66, 48, 50, 180, 66, 48, 50, 179, 66, 48, 50, 50, 128,
+ 66, 48, 50, 177, 66, 48, 50, 176, 66, 48, 49, 57, 128, 66, 48, 49, 56,
+ 128, 66, 48, 49, 183, 66, 48, 49, 182, 66, 48, 49, 181, 66, 48, 49, 180,
+ 66, 48, 49, 179, 66, 48, 49, 178, 66, 48, 49, 177, 66, 48, 49, 176, 66,
+ 48, 48, 57, 128, 66, 48, 48, 185, 66, 48, 48, 56, 128, 66, 48, 48, 184,
+ 66, 48, 48, 55, 128, 66, 48, 48, 183, 66, 48, 48, 54, 128, 66, 48, 48,
+ 182, 66, 48, 48, 53, 65, 128, 66, 48, 48, 53, 128, 66, 48, 48, 181, 66,
+ 48, 48, 52, 128, 66, 48, 48, 180, 66, 48, 48, 51, 128, 66, 48, 48, 179,
+ 66, 48, 48, 50, 128, 66, 48, 48, 178, 66, 48, 48, 49, 128, 66, 48, 48,
+ 177, 65, 90, 85, 128, 65, 89, 66, 128, 65, 89, 65, 72, 128, 65, 88, 69,
+ 128, 65, 87, 69, 128, 65, 87, 65, 217, 65, 86, 69, 83, 84, 65, 206, 65,
+ 86, 69, 82, 65, 71, 197, 65, 86, 65, 75, 82, 65, 72, 65, 83, 65, 78, 89,
+ 65, 128, 65, 86, 65, 71, 82, 65, 72, 65, 128, 65, 85, 89, 65, 78, 78, 65,
+ 128, 65, 85, 84, 85, 77, 78, 128, 65, 85, 84, 79, 77, 79, 66, 73, 76, 69,
+ 128, 65, 85, 84, 79, 77, 65, 84, 69, 196, 65, 85, 83, 84, 82, 65, 204,
+ 65, 85, 82, 73, 80, 73, 71, 77, 69, 78, 84, 128, 65, 85, 82, 65, 77, 65,
+ 90, 68, 65, 65, 72, 65, 128, 65, 85, 82, 65, 77, 65, 90, 68, 65, 65, 45,
+ 50, 128, 65, 85, 82, 65, 77, 65, 90, 68, 65, 65, 128, 65, 85, 78, 78,
+ 128, 65, 85, 71, 85, 83, 84, 128, 65, 85, 71, 77, 69, 78, 84, 65, 84, 73,
+ 79, 206, 65, 85, 69, 128, 65, 85, 66, 69, 82, 71, 73, 78, 69, 128, 65,
+ 84, 84, 73, 195, 65, 84, 84, 72, 65, 67, 65, 78, 128, 65, 84, 84, 69, 78,
+ 84, 73, 79, 78, 128, 65, 84, 84, 65, 203, 65, 84, 84, 65, 67, 72, 69,
+ 196, 65, 84, 79, 205, 65, 84, 78, 65, 200, 65, 84, 77, 65, 65, 85, 128,
+ 65, 84, 73, 89, 65, 128, 65, 84, 72, 76, 69, 84, 73, 195, 65, 84, 72, 65,
+ 82, 86, 65, 86, 69, 68, 73, 195, 65, 84, 72, 65, 80, 65, 83, 67, 65, 206,
+ 65, 83, 90, 128, 65, 83, 89, 85, 82, 193, 65, 83, 89, 77, 80, 84, 79, 84,
+ 73, 67, 65, 76, 76, 217, 65, 83, 84, 82, 79, 78, 79, 77, 73, 67, 65, 204,
+ 65, 83, 84, 82, 79, 76, 79, 71, 73, 67, 65, 204, 65, 83, 84, 79, 78, 73,
+ 83, 72, 69, 196, 65, 83, 84, 69, 82, 73, 83, 77, 128, 65, 83, 84, 69, 82,
+ 73, 83, 75, 211, 65, 83, 84, 69, 82, 73, 83, 75, 128, 65, 83, 84, 69, 82,
+ 73, 83, 203, 65, 83, 84, 69, 82, 73, 83, 67, 85, 83, 128, 65, 83, 83, 89,
+ 82, 73, 65, 206, 65, 83, 83, 69, 82, 84, 73, 79, 78, 128, 65, 83, 80, 73,
+ 82, 65, 84, 73, 79, 78, 128, 65, 83, 80, 73, 82, 65, 84, 69, 196, 65, 83,
+ 80, 69, 82, 128, 65, 83, 73, 65, 45, 65, 85, 83, 84, 82, 65, 76, 73, 65,
+ 128, 65, 83, 72, 71, 65, 66, 128, 65, 83, 72, 69, 83, 128, 65, 83, 72,
+ 57, 128, 65, 83, 72, 51, 128, 65, 83, 72, 178, 65, 83, 67, 69, 78, 84,
128, 65, 83, 67, 69, 78, 68, 73, 78, 199, 65, 83, 65, 76, 50, 128, 65,
82, 85, 72, 85, 65, 128, 65, 82, 84, 73, 83, 212, 65, 82, 84, 73, 67, 85,
76, 65, 84, 69, 196, 65, 82, 84, 65, 66, 197, 65, 82, 83, 69, 79, 83,
128, 65, 82, 83, 69, 79, 211, 65, 82, 83, 69, 78, 73, 67, 128, 65, 82,
82, 79, 87, 83, 128, 65, 82, 82, 79, 87, 211, 65, 82, 82, 79, 87, 72, 69,
- 65, 68, 128, 65, 82, 82, 79, 87, 72, 69, 65, 196, 65, 82, 82, 79, 87, 45,
- 84, 65, 73, 76, 128, 65, 82, 82, 73, 86, 69, 128, 65, 82, 82, 65, 89,
- 128, 65, 82, 80, 69, 71, 71, 73, 65, 84, 207, 65, 82, 79, 85, 83, 73, 78,
- 199, 65, 82, 79, 85, 82, 193, 65, 82, 79, 85, 78, 68, 45, 80, 82, 79, 70,
- 73, 76, 69, 128, 65, 82, 79, 85, 78, 196, 65, 82, 77, 89, 128, 65, 82,
- 77, 79, 85, 82, 128, 65, 82, 205, 65, 82, 76, 65, 85, 199, 65, 82, 75,
- 84, 73, 75, 207, 65, 82, 75, 65, 66, 128, 65, 82, 75, 65, 65, 78, 85,
+ 65, 68, 83, 128, 65, 82, 82, 79, 87, 72, 69, 65, 68, 128, 65, 82, 82, 79,
+ 87, 72, 69, 65, 196, 65, 82, 82, 79, 87, 45, 84, 65, 73, 76, 128, 65, 82,
+ 82, 73, 86, 73, 78, 71, 128, 65, 82, 82, 73, 86, 69, 128, 65, 82, 82, 65,
+ 89, 128, 65, 82, 80, 69, 71, 71, 73, 65, 84, 207, 65, 82, 79, 85, 83, 73,
+ 78, 199, 65, 82, 79, 85, 82, 193, 65, 82, 79, 85, 78, 68, 45, 80, 82, 79,
+ 70, 73, 76, 69, 128, 65, 82, 79, 85, 78, 196, 65, 82, 77, 89, 128, 65,
+ 82, 77, 79, 85, 82, 128, 65, 82, 205, 65, 82, 76, 65, 85, 199, 65, 82,
+ 75, 84, 73, 75, 207, 65, 82, 75, 65, 66, 128, 65, 82, 75, 65, 65, 78, 85,
128, 65, 82, 73, 83, 84, 69, 82, 65, 128, 65, 82, 73, 83, 84, 69, 82,
193, 65, 82, 73, 69, 83, 128, 65, 82, 71, 79, 84, 69, 82, 73, 128, 65,
82, 71, 79, 83, 89, 78, 84, 72, 69, 84, 79, 78, 128, 65, 82, 71, 73, 128,
65, 82, 69, 80, 65, 128, 65, 82, 69, 65, 128, 65, 82, 68, 72, 65, 86, 73,
- 83, 65, 82, 71, 65, 128, 65, 82, 67, 72, 65, 73, 79, 78, 128, 65, 82, 67,
- 72, 65, 73, 79, 206, 65, 82, 67, 72, 65, 73, 195, 65, 82, 67, 200, 65,
- 82, 67, 128, 65, 82, 195, 65, 82, 65, 77, 65, 73, 195, 65, 82, 65, 69,
- 65, 69, 128, 65, 82, 65, 69, 65, 45, 85, 128, 65, 82, 65, 69, 65, 45, 73,
- 128, 65, 82, 65, 69, 65, 45, 69, 79, 128, 65, 82, 65, 69, 65, 45, 69,
- 128, 65, 82, 65, 69, 65, 45, 65, 128, 65, 82, 65, 68, 128, 65, 82, 65,
- 196, 65, 82, 65, 66, 73, 67, 45, 73, 78, 68, 73, 195, 65, 82, 65, 66, 73,
- 65, 206, 65, 82, 45, 82, 65, 72, 77, 65, 206, 65, 82, 45, 82, 65, 72, 69,
- 69, 77, 128, 65, 81, 85, 65, 82, 73, 85, 83, 128, 65, 81, 85, 65, 70, 79,
- 82, 84, 73, 83, 128, 65, 81, 85, 193, 65, 80, 85, 206, 65, 80, 82, 73,
- 76, 128, 65, 80, 80, 82, 79, 88, 73, 77, 65, 84, 69, 76, 217, 65, 80, 80,
- 82, 79, 88, 73, 77, 65, 84, 69, 128, 65, 80, 80, 82, 79, 65, 67, 72, 69,
- 211, 65, 80, 80, 82, 79, 65, 67, 72, 128, 65, 80, 80, 76, 73, 67, 65, 84,
- 73, 79, 78, 128, 65, 80, 80, 76, 73, 67, 65, 84, 73, 79, 206, 65, 80, 79,
- 84, 72, 69, 83, 128, 65, 80, 79, 84, 72, 69, 77, 65, 128, 65, 80, 79, 83,
- 84, 82, 79, 80, 72, 69, 128, 65, 80, 79, 83, 84, 82, 79, 70, 79, 83, 128,
- 65, 80, 79, 83, 84, 82, 79, 70, 79, 211, 65, 80, 79, 83, 84, 82, 79, 70,
- 79, 201, 65, 80, 79, 68, 69, 88, 73, 65, 128, 65, 80, 79, 68, 69, 82, 77,
- 193, 65, 80, 76, 79, 85, 78, 128, 65, 80, 76, 201, 65, 80, 204, 65, 80,
- 73, 78, 128, 65, 80, 69, 83, 207, 65, 80, 67, 128, 65, 80, 65, 82, 84,
- 128, 65, 80, 65, 65, 84, 79, 128, 65, 78, 85, 83, 86, 65, 82, 65, 89, 65,
- 128, 65, 78, 85, 83, 86, 65, 82, 65, 128, 65, 78, 85, 83, 86, 65, 82,
- 193, 65, 78, 85, 68, 65, 84, 84, 65, 128, 65, 78, 85, 68, 65, 84, 84,
+ 83, 65, 82, 71, 65, 128, 65, 82, 68, 72, 65, 67, 65, 78, 68, 82, 65, 128,
+ 65, 82, 67, 72, 65, 73, 79, 78, 128, 65, 82, 67, 72, 65, 73, 79, 206, 65,
+ 82, 67, 72, 65, 73, 195, 65, 82, 67, 200, 65, 82, 67, 128, 65, 82, 195,
+ 65, 82, 65, 77, 65, 73, 195, 65, 82, 65, 69, 65, 69, 128, 65, 82, 65, 69,
+ 65, 45, 85, 128, 65, 82, 65, 69, 65, 45, 73, 128, 65, 82, 65, 69, 65, 45,
+ 69, 79, 128, 65, 82, 65, 69, 65, 45, 69, 128, 65, 82, 65, 69, 65, 45, 65,
+ 128, 65, 82, 65, 68, 128, 65, 82, 65, 196, 65, 82, 65, 66, 73, 67, 45,
+ 73, 78, 68, 73, 195, 65, 82, 65, 66, 73, 65, 206, 65, 82, 45, 82, 65, 72,
+ 77, 65, 206, 65, 82, 45, 82, 65, 72, 69, 69, 77, 128, 65, 81, 85, 65, 82,
+ 73, 85, 83, 128, 65, 81, 85, 65, 70, 79, 82, 84, 73, 83, 128, 65, 81, 85,
+ 193, 65, 80, 85, 206, 65, 80, 82, 73, 76, 128, 65, 80, 80, 82, 79, 88,
+ 73, 77, 65, 84, 69, 76, 217, 65, 80, 80, 82, 79, 88, 73, 77, 65, 84, 69,
+ 128, 65, 80, 80, 82, 79, 65, 67, 72, 69, 211, 65, 80, 80, 82, 79, 65, 67,
+ 72, 128, 65, 80, 80, 76, 73, 67, 65, 84, 73, 79, 78, 128, 65, 80, 80, 76,
+ 73, 67, 65, 84, 73, 79, 206, 65, 80, 79, 84, 72, 69, 83, 128, 65, 80, 79,
+ 84, 72, 69, 77, 65, 128, 65, 80, 79, 83, 84, 82, 79, 80, 72, 69, 128, 65,
+ 80, 79, 83, 84, 82, 79, 70, 79, 83, 128, 65, 80, 79, 83, 84, 82, 79, 70,
+ 79, 211, 65, 80, 79, 83, 84, 82, 79, 70, 79, 201, 65, 80, 79, 68, 69, 88,
+ 73, 65, 128, 65, 80, 79, 68, 69, 82, 77, 193, 65, 80, 76, 79, 85, 78,
+ 128, 65, 80, 76, 201, 65, 80, 204, 65, 80, 73, 78, 128, 65, 80, 69, 83,
+ 207, 65, 80, 67, 128, 65, 80, 65, 82, 84, 128, 65, 80, 65, 65, 84, 79,
+ 128, 65, 79, 85, 128, 65, 79, 82, 128, 65, 78, 85, 83, 86, 65, 82, 65,
+ 89, 65, 128, 65, 78, 85, 83, 86, 65, 82, 65, 128, 65, 78, 85, 83, 86, 65,
+ 82, 193, 65, 78, 85, 68, 65, 84, 84, 65, 128, 65, 78, 85, 68, 65, 84, 84,
193, 65, 78, 84, 73, 82, 69, 83, 84, 82, 73, 67, 84, 73, 79, 78, 128, 65,
78, 84, 73, 77, 79, 78, 89, 45, 50, 128, 65, 78, 84, 73, 77, 79, 78, 89,
128, 65, 78, 84, 73, 77, 79, 78, 217, 65, 78, 84, 73, 77, 79, 78, 73, 65,
@@ -4530,15308 +4916,18348 @@ static unsigned char lexicon[] = {
75, 69, 78, 79, 75, 89, 76, 73, 83, 77, 65, 128, 65, 78, 84, 73, 70, 79,
78, 73, 65, 128, 65, 78, 84, 73, 67, 76, 79, 67, 75, 87, 73, 83, 69, 45,
82, 79, 84, 65, 84, 69, 196, 65, 78, 84, 73, 67, 76, 79, 67, 75, 87, 73,
- 83, 197, 65, 78, 84, 69, 78, 78, 65, 128, 65, 78, 84, 69, 78, 78, 193,
- 65, 78, 84, 65, 82, 71, 79, 77, 85, 75, 72, 65, 128, 65, 78, 83, 85, 218,
- 65, 78, 83, 72, 69, 128, 65, 78, 80, 69, 65, 128, 65, 78, 207, 65, 78,
- 78, 85, 73, 84, 217, 65, 78, 78, 79, 84, 65, 84, 73, 79, 206, 65, 78, 78,
- 65, 65, 85, 128, 65, 78, 75, 72, 128, 65, 78, 74, 73, 128, 65, 78, 72,
- 85, 128, 65, 78, 71, 85, 76, 65, 82, 128, 65, 78, 71, 85, 73, 83, 72, 69,
- 196, 65, 78, 71, 83, 84, 82, 79, 205, 65, 78, 71, 82, 217, 65, 78, 71,
- 75, 72, 65, 78, 75, 72, 85, 128, 65, 78, 71, 69, 210, 65, 78, 71, 69, 76,
- 128, 65, 78, 71, 69, 68, 128, 65, 78, 68, 65, 80, 128, 65, 78, 67, 79,
- 82, 65, 128, 65, 78, 67, 72, 79, 82, 128, 65, 78, 65, 84, 82, 73, 67, 72,
- 73, 83, 77, 65, 128, 65, 78, 65, 80, 128, 65, 77, 80, 83, 128, 65, 77,
- 80, 69, 82, 83, 65, 78, 68, 128, 65, 77, 79, 85, 78, 212, 65, 77, 69, 82,
- 73, 67, 65, 83, 128, 65, 77, 69, 82, 73, 67, 65, 206, 65, 77, 66, 85, 76,
- 65, 78, 67, 69, 128, 65, 77, 66, 193, 65, 77, 65, 82, 128, 65, 77, 65,
- 210, 65, 77, 65, 76, 71, 65, 77, 65, 84, 73, 79, 206, 65, 77, 65, 76, 71,
- 65, 77, 128, 65, 76, 86, 69, 79, 76, 65, 210, 65, 76, 85, 77, 128, 65,
- 76, 84, 69, 82, 78, 65, 84, 73, 86, 197, 65, 76, 84, 69, 82, 78, 65, 84,
- 73, 79, 206, 65, 76, 84, 69, 82, 78, 65, 84, 197, 65, 76, 84, 65, 128,
- 65, 76, 80, 72, 65, 128, 65, 76, 80, 72, 193, 65, 76, 80, 65, 80, 82, 65,
- 78, 65, 128, 65, 76, 80, 65, 80, 82, 65, 65, 78, 193, 65, 76, 80, 65,
- 128, 65, 76, 77, 79, 83, 212, 65, 76, 77, 128, 65, 76, 76, 79, 128, 65,
- 76, 76, 73, 65, 78, 67, 69, 128, 65, 76, 76, 201, 65, 76, 76, 65, 200,
- 65, 76, 75, 65, 76, 73, 45, 50, 128, 65, 76, 75, 65, 76, 73, 128, 65, 76,
- 73, 71, 78, 69, 196, 65, 76, 73, 70, 85, 128, 65, 76, 73, 69, 78, 128,
- 65, 76, 73, 69, 206, 65, 76, 71, 73, 218, 65, 76, 70, 65, 128, 65, 76,
- 69, 85, 212, 65, 76, 69, 82, 84, 128, 65, 76, 69, 80, 72, 128, 65, 76,
- 69, 77, 66, 73, 67, 128, 65, 76, 69, 70, 128, 65, 76, 65, 89, 72, 69,
- 128, 65, 76, 65, 89, 72, 197, 65, 76, 65, 82, 205, 65, 76, 65, 80, 72,
- 128, 65, 76, 45, 76, 65, 75, 85, 78, 65, 128, 65, 75, 84, 73, 69, 83, 69,
- 76, 83, 75, 65, 66, 128, 65, 75, 83, 65, 128, 65, 75, 72, 77, 73, 77, 73,
- 195, 65, 75, 66, 65, 210, 65, 75, 65, 82, 65, 128, 65, 75, 65, 82, 193,
- 65, 73, 89, 65, 78, 78, 65, 128, 65, 73, 86, 73, 76, 73, 203, 65, 73, 84,
- 79, 206, 65, 73, 82, 80, 76, 65, 78, 69, 128, 65, 73, 78, 213, 65, 73,
- 78, 78, 128, 65, 73, 76, 77, 128, 65, 73, 75, 65, 82, 65, 128, 65, 73,
- 72, 86, 85, 83, 128, 65, 72, 83, 68, 65, 128, 65, 72, 83, 65, 128, 65,
- 72, 65, 78, 199, 65, 72, 65, 71, 71, 65, 210, 65, 72, 65, 68, 128, 65,
- 71, 85, 78, 71, 128, 65, 71, 79, 71, 201, 65, 71, 71, 82, 65, 86, 65, 84,
- 73, 79, 78, 128, 65, 71, 71, 82, 65, 86, 65, 84, 69, 196, 65, 71, 65, 73,
- 78, 128, 65, 70, 84, 69, 210, 65, 70, 83, 65, 65, 81, 128, 65, 70, 82,
- 73, 67, 65, 206, 65, 70, 79, 82, 69, 77, 69, 78, 84, 73, 79, 78, 69, 68,
- 128, 65, 70, 71, 72, 65, 78, 201, 65, 70, 70, 82, 73, 67, 65, 84, 73, 79,
- 206, 65, 69, 89, 65, 78, 78, 65, 128, 65, 69, 89, 128, 65, 69, 83, 67,
- 85, 76, 65, 80, 73, 85, 83, 128, 65, 69, 83, 67, 128, 65, 69, 83, 128,
- 65, 69, 82, 73, 65, 204, 65, 69, 82, 128, 65, 69, 76, 65, 45, 80, 73, 76,
- 76, 65, 128, 65, 69, 76, 128, 65, 69, 75, 128, 65, 69, 71, 69, 65, 206,
- 65, 69, 71, 128, 65, 69, 69, 89, 65, 78, 78, 65, 128, 65, 69, 69, 128,
- 65, 69, 68, 65, 45, 80, 73, 76, 76, 65, 128, 65, 69, 68, 128, 65, 69, 66,
- 128, 65, 68, 86, 65, 78, 84, 65, 71, 69, 128, 65, 68, 86, 65, 78, 67, 69,
- 128, 65, 68, 69, 71, 128, 65, 68, 69, 199, 65, 68, 68, 82, 69, 83, 83,
- 69, 196, 65, 68, 68, 82, 69, 83, 211, 65, 68, 68, 65, 75, 128, 65, 68,
- 65, 203, 65, 67, 85, 84, 69, 45, 77, 65, 67, 82, 79, 78, 128, 65, 67, 85,
- 84, 69, 45, 71, 82, 65, 86, 69, 45, 65, 67, 85, 84, 69, 128, 65, 67, 85,
- 84, 197, 65, 67, 84, 85, 65, 76, 76, 217, 65, 67, 84, 73, 86, 65, 84,
- 197, 65, 67, 82, 79, 80, 72, 79, 78, 73, 195, 65, 67, 75, 78, 79, 87, 76,
- 69, 68, 71, 69, 128, 65, 67, 67, 85, 77, 85, 76, 65, 84, 73, 79, 78, 128,
- 65, 67, 67, 79, 85, 78, 212, 65, 67, 67, 69, 80, 84, 128, 65, 67, 67, 69,
- 78, 84, 45, 83, 84, 65, 67, 67, 65, 84, 79, 128, 65, 67, 67, 69, 78, 84,
- 128, 65, 67, 67, 69, 78, 212, 65, 67, 65, 68, 69, 77, 217, 65, 66, 89,
- 83, 77, 65, 204, 65, 66, 85, 78, 68, 65, 78, 67, 69, 128, 65, 66, 75, 72,
- 65, 83, 73, 65, 206, 65, 66, 66, 82, 69, 86, 73, 65, 84, 73, 79, 206, 65,
- 66, 65, 70, 73, 76, 73, 128, 65, 66, 178, 65, 65, 89, 65, 78, 78, 65,
- 128, 65, 65, 89, 128, 65, 65, 87, 128, 65, 65, 79, 128, 65, 65, 74, 128,
- 65, 65, 66, 65, 65, 70, 73, 76, 73, 128, 65, 65, 48, 51, 50, 128, 65, 65,
- 48, 51, 49, 128, 65, 65, 48, 51, 48, 128, 65, 65, 48, 50, 57, 128, 65,
- 65, 48, 50, 56, 128, 65, 65, 48, 50, 55, 128, 65, 65, 48, 50, 54, 128,
- 65, 65, 48, 50, 53, 128, 65, 65, 48, 50, 52, 128, 65, 65, 48, 50, 51,
- 128, 65, 65, 48, 50, 50, 128, 65, 65, 48, 50, 49, 128, 65, 65, 48, 50,
- 48, 128, 65, 65, 48, 49, 57, 128, 65, 65, 48, 49, 56, 128, 65, 65, 48,
- 49, 55, 128, 65, 65, 48, 49, 54, 128, 65, 65, 48, 49, 53, 128, 65, 65,
- 48, 49, 52, 128, 65, 65, 48, 49, 51, 128, 65, 65, 48, 49, 50, 128, 65,
- 65, 48, 49, 49, 128, 65, 65, 48, 49, 48, 128, 65, 65, 48, 48, 57, 128,
- 65, 65, 48, 48, 56, 128, 65, 65, 48, 48, 55, 66, 128, 65, 65, 48, 48, 55,
- 65, 128, 65, 65, 48, 48, 55, 128, 65, 65, 48, 48, 54, 128, 65, 65, 48,
- 48, 53, 128, 65, 65, 48, 48, 52, 128, 65, 65, 48, 48, 51, 128, 65, 65,
- 48, 48, 50, 128, 65, 65, 48, 48, 49, 128, 65, 48, 55, 48, 128, 65, 48,
- 54, 57, 128, 65, 48, 54, 56, 128, 65, 48, 54, 55, 128, 65, 48, 54, 54,
- 128, 65, 48, 54, 53, 128, 65, 48, 54, 52, 128, 65, 48, 54, 51, 128, 65,
- 48, 54, 50, 128, 65, 48, 54, 49, 128, 65, 48, 54, 48, 128, 65, 48, 53,
- 57, 128, 65, 48, 53, 56, 128, 65, 48, 53, 55, 128, 65, 48, 53, 54, 128,
- 65, 48, 53, 53, 128, 65, 48, 53, 52, 128, 65, 48, 53, 51, 128, 65, 48,
- 53, 50, 128, 65, 48, 53, 49, 128, 65, 48, 53, 48, 128, 65, 48, 52, 57,
- 128, 65, 48, 52, 56, 128, 65, 48, 52, 55, 128, 65, 48, 52, 54, 128, 65,
- 48, 52, 53, 65, 128, 65, 48, 52, 53, 128, 65, 48, 52, 52, 128, 65, 48,
- 52, 51, 65, 128, 65, 48, 52, 51, 128, 65, 48, 52, 50, 65, 128, 65, 48,
- 52, 50, 128, 65, 48, 52, 49, 128, 65, 48, 52, 48, 65, 128, 65, 48, 52,
- 48, 128, 65, 48, 51, 57, 128, 65, 48, 51, 56, 128, 65, 48, 51, 55, 128,
- 65, 48, 51, 54, 128, 65, 48, 51, 53, 128, 65, 48, 51, 52, 128, 65, 48,
- 51, 51, 128, 65, 48, 51, 50, 65, 128, 65, 48, 49, 55, 65, 128, 65, 48,
- 49, 52, 65, 128, 65, 48, 48, 54, 66, 128, 65, 48, 48, 54, 65, 128, 65,
- 48, 48, 53, 65, 128, 65, 45, 69, 85, 128, 45, 85, 205, 45, 80, 72, 82,
- 85, 128, 45, 75, 72, 89, 85, 196, 45, 75, 72, 89, 73, 76, 128, 45, 68,
- 90, 85, 196, 45, 67, 72, 65, 210, 45, 67, 72, 65, 76, 128,
+ 83, 69, 128, 65, 78, 84, 73, 67, 76, 79, 67, 75, 87, 73, 83, 197, 65, 78,
+ 84, 69, 78, 78, 65, 128, 65, 78, 84, 69, 78, 78, 193, 65, 78, 84, 65, 82,
+ 71, 79, 77, 85, 75, 72, 65, 128, 65, 78, 83, 85, 218, 65, 78, 83, 72, 69,
+ 128, 65, 78, 80, 69, 65, 128, 65, 78, 207, 65, 78, 78, 85, 73, 84, 217,
+ 65, 78, 78, 79, 84, 65, 84, 73, 79, 206, 65, 78, 78, 65, 65, 85, 128, 65,
+ 78, 75, 72, 128, 65, 78, 74, 73, 128, 65, 78, 72, 85, 128, 65, 78, 71,
+ 85, 76, 65, 82, 128, 65, 78, 71, 85, 73, 83, 72, 69, 196, 65, 78, 71, 83,
+ 84, 82, 79, 205, 65, 78, 71, 82, 217, 65, 78, 71, 76, 69, 68, 128, 65,
+ 78, 71, 76, 69, 196, 65, 78, 71, 75, 72, 65, 78, 75, 72, 85, 128, 65, 78,
+ 71, 69, 210, 65, 78, 71, 69, 76, 128, 65, 78, 71, 69, 68, 128, 65, 78,
+ 68, 65, 80, 128, 65, 78, 67, 79, 82, 65, 128, 65, 78, 67, 72, 79, 82,
+ 128, 65, 78, 65, 84, 82, 73, 67, 72, 73, 83, 77, 65, 128, 65, 78, 65, 80,
+ 128, 65, 77, 80, 83, 128, 65, 77, 80, 72, 79, 82, 65, 128, 65, 77, 80,
+ 69, 82, 83, 65, 78, 68, 128, 65, 77, 80, 69, 82, 83, 65, 78, 196, 65, 77,
+ 79, 85, 78, 212, 65, 77, 69, 82, 73, 67, 65, 83, 128, 65, 77, 69, 82, 73,
+ 67, 65, 206, 65, 77, 66, 85, 76, 65, 78, 67, 69, 128, 65, 77, 66, 193,
+ 65, 77, 66, 128, 65, 77, 65, 82, 128, 65, 77, 65, 210, 65, 77, 65, 76,
+ 71, 65, 77, 65, 84, 73, 79, 206, 65, 77, 65, 76, 71, 65, 77, 128, 65, 76,
+ 86, 69, 79, 76, 65, 210, 65, 76, 85, 77, 128, 65, 76, 84, 69, 82, 78, 65,
+ 84, 73, 86, 197, 65, 76, 84, 69, 82, 78, 65, 84, 73, 79, 206, 65, 76, 84,
+ 69, 82, 78, 65, 84, 73, 78, 71, 128, 65, 76, 84, 69, 82, 78, 65, 84, 73,
+ 78, 199, 65, 76, 84, 69, 82, 78, 65, 84, 69, 128, 65, 76, 84, 69, 82, 78,
+ 65, 84, 197, 65, 76, 84, 65, 128, 65, 76, 80, 72, 65, 128, 65, 76, 80,
+ 72, 193, 65, 76, 80, 65, 80, 82, 65, 78, 65, 128, 65, 76, 80, 65, 80, 82,
+ 65, 65, 78, 193, 65, 76, 80, 65, 128, 65, 76, 77, 79, 83, 212, 65, 76,
+ 77, 128, 65, 76, 76, 79, 128, 65, 76, 76, 73, 65, 78, 67, 69, 128, 65,
+ 76, 76, 201, 65, 76, 76, 65, 200, 65, 76, 75, 65, 76, 73, 45, 50, 128,
+ 65, 76, 75, 65, 76, 73, 128, 65, 76, 73, 71, 78, 69, 196, 65, 76, 73, 70,
+ 85, 128, 65, 76, 73, 69, 78, 128, 65, 76, 73, 69, 206, 65, 76, 71, 73,
+ 218, 65, 76, 70, 65, 128, 65, 76, 69, 85, 212, 65, 76, 69, 82, 84, 128,
+ 65, 76, 69, 80, 72, 128, 65, 76, 69, 77, 66, 73, 67, 128, 65, 76, 69, 70,
+ 128, 65, 76, 66, 65, 78, 73, 65, 206, 65, 76, 65, 89, 72, 69, 128, 65,
+ 76, 65, 89, 72, 197, 65, 76, 65, 82, 205, 65, 76, 65, 80, 72, 128, 65,
+ 76, 45, 76, 65, 75, 85, 78, 65, 128, 65, 75, 84, 73, 69, 83, 69, 76, 83,
+ 75, 65, 66, 128, 65, 75, 83, 65, 128, 65, 75, 72, 77, 73, 77, 73, 195,
+ 65, 75, 66, 65, 210, 65, 75, 65, 82, 65, 128, 65, 75, 65, 82, 193, 65,
+ 73, 89, 65, 78, 78, 65, 128, 65, 73, 86, 73, 76, 73, 203, 65, 73, 84, 79,
+ 206, 65, 73, 82, 80, 76, 65, 78, 69, 128, 65, 73, 82, 80, 76, 65, 78,
+ 197, 65, 73, 78, 213, 65, 73, 78, 78, 128, 65, 73, 76, 77, 128, 65, 73,
+ 75, 65, 82, 65, 128, 65, 73, 72, 86, 85, 83, 128, 65, 72, 83, 68, 65,
+ 128, 65, 72, 83, 65, 128, 65, 72, 79, 205, 65, 72, 65, 78, 199, 65, 72,
+ 65, 71, 71, 65, 210, 65, 72, 65, 68, 128, 65, 71, 85, 78, 71, 128, 65,
+ 71, 79, 71, 201, 65, 71, 71, 82, 65, 86, 65, 84, 73, 79, 78, 128, 65, 71,
+ 71, 82, 65, 86, 65, 84, 69, 196, 65, 71, 65, 73, 78, 83, 212, 65, 71, 65,
+ 73, 78, 128, 65, 70, 84, 69, 210, 65, 70, 83, 65, 65, 81, 128, 65, 70,
+ 82, 73, 67, 65, 206, 65, 70, 79, 82, 69, 77, 69, 78, 84, 73, 79, 78, 69,
+ 68, 128, 65, 70, 71, 72, 65, 78, 201, 65, 70, 70, 82, 73, 67, 65, 84, 73,
+ 79, 206, 65, 70, 70, 73, 216, 65, 69, 89, 65, 78, 78, 65, 128, 65, 69,
+ 89, 128, 65, 69, 83, 67, 85, 76, 65, 80, 73, 85, 83, 128, 65, 69, 83, 67,
+ 128, 65, 69, 83, 128, 65, 69, 82, 73, 65, 204, 65, 69, 82, 128, 65, 69,
+ 76, 65, 45, 80, 73, 76, 76, 65, 128, 65, 69, 76, 128, 65, 69, 75, 128,
+ 65, 69, 71, 69, 65, 206, 65, 69, 71, 128, 65, 69, 69, 89, 65, 78, 78, 65,
+ 128, 65, 69, 69, 128, 65, 69, 68, 65, 45, 80, 73, 76, 76, 65, 128, 65,
+ 69, 68, 128, 65, 69, 66, 128, 65, 68, 86, 65, 78, 84, 65, 71, 69, 128,
+ 65, 68, 86, 65, 78, 67, 69, 128, 65, 68, 77, 73, 83, 83, 73, 79, 206, 65,
+ 68, 69, 71, 128, 65, 68, 69, 199, 65, 68, 68, 82, 69, 83, 83, 69, 196,
+ 65, 68, 68, 82, 69, 83, 211, 65, 68, 68, 65, 75, 128, 65, 68, 65, 203,
+ 65, 67, 85, 84, 69, 45, 77, 65, 67, 82, 79, 78, 128, 65, 67, 85, 84, 69,
+ 45, 71, 82, 65, 86, 69, 45, 65, 67, 85, 84, 69, 128, 65, 67, 85, 84, 197,
+ 65, 67, 84, 85, 65, 76, 76, 217, 65, 67, 84, 73, 86, 65, 84, 197, 65, 67,
+ 82, 79, 80, 72, 79, 78, 73, 195, 65, 67, 75, 78, 79, 87, 76, 69, 68, 71,
+ 69, 128, 65, 67, 67, 85, 77, 85, 76, 65, 84, 73, 79, 78, 128, 65, 67, 67,
+ 79, 85, 78, 212, 65, 67, 67, 79, 77, 77, 79, 68, 65, 84, 73, 79, 78, 128,
+ 65, 67, 67, 69, 80, 84, 128, 65, 67, 67, 69, 78, 84, 45, 83, 84, 65, 67,
+ 67, 65, 84, 79, 128, 65, 67, 67, 69, 78, 84, 128, 65, 67, 67, 69, 78,
+ 212, 65, 67, 65, 68, 69, 77, 217, 65, 66, 89, 83, 77, 65, 204, 65, 66,
+ 85, 78, 68, 65, 78, 67, 69, 128, 65, 66, 75, 72, 65, 83, 73, 65, 206, 65,
+ 66, 66, 82, 69, 86, 73, 65, 84, 73, 79, 206, 65, 66, 65, 70, 73, 76, 73,
+ 128, 65, 66, 178, 65, 66, 49, 57, 49, 128, 65, 66, 49, 56, 56, 128, 65,
+ 66, 49, 56, 48, 128, 65, 66, 49, 55, 49, 128, 65, 66, 49, 54, 52, 128,
+ 65, 66, 49, 51, 49, 66, 128, 65, 66, 49, 51, 49, 65, 128, 65, 66, 49, 50,
+ 51, 128, 65, 66, 49, 50, 50, 128, 65, 66, 49, 50, 48, 128, 65, 66, 49,
+ 49, 56, 128, 65, 66, 48, 56, 55, 128, 65, 66, 48, 56, 54, 128, 65, 66,
+ 48, 56, 53, 128, 65, 66, 48, 56, 50, 128, 65, 66, 48, 56, 49, 128, 65,
+ 66, 48, 56, 48, 128, 65, 66, 48, 55, 57, 128, 65, 66, 48, 55, 56, 128,
+ 65, 66, 48, 55, 55, 128, 65, 66, 48, 55, 54, 128, 65, 66, 48, 55, 52,
+ 128, 65, 66, 48, 55, 51, 128, 65, 66, 48, 55, 48, 128, 65, 66, 48, 54,
+ 57, 128, 65, 66, 48, 54, 55, 128, 65, 66, 48, 54, 54, 128, 65, 66, 48,
+ 54, 53, 128, 65, 66, 48, 54, 49, 128, 65, 66, 48, 54, 48, 128, 65, 66,
+ 48, 53, 57, 128, 65, 66, 48, 53, 56, 128, 65, 66, 48, 53, 55, 128, 65,
+ 66, 48, 53, 54, 128, 65, 66, 48, 53, 53, 128, 65, 66, 48, 53, 52, 128,
+ 65, 66, 48, 53, 51, 128, 65, 66, 48, 53, 49, 128, 65, 66, 48, 53, 48,
+ 128, 65, 66, 48, 52, 57, 128, 65, 66, 48, 52, 56, 128, 65, 66, 48, 52,
+ 55, 128, 65, 66, 48, 52, 54, 128, 65, 66, 48, 52, 53, 128, 65, 66, 48,
+ 52, 52, 128, 65, 66, 48, 52, 49, 128, 65, 66, 48, 52, 48, 128, 65, 66,
+ 48, 51, 57, 128, 65, 66, 48, 51, 56, 128, 65, 66, 48, 51, 55, 128, 65,
+ 66, 48, 51, 52, 128, 65, 66, 48, 51, 49, 128, 65, 66, 48, 51, 48, 128,
+ 65, 66, 48, 50, 57, 128, 65, 66, 48, 50, 56, 128, 65, 66, 48, 50, 55,
+ 128, 65, 66, 48, 50, 54, 128, 65, 66, 48, 50, 52, 128, 65, 66, 48, 50,
+ 51, 77, 128, 65, 66, 48, 50, 51, 128, 65, 66, 48, 50, 50, 77, 128, 65,
+ 66, 48, 50, 50, 70, 128, 65, 66, 48, 50, 50, 128, 65, 66, 48, 50, 49, 77,
+ 128, 65, 66, 48, 50, 49, 70, 128, 65, 66, 48, 50, 49, 128, 65, 66, 48,
+ 50, 48, 128, 65, 66, 48, 49, 55, 128, 65, 66, 48, 49, 54, 128, 65, 66,
+ 48, 49, 51, 128, 65, 66, 48, 49, 49, 128, 65, 66, 48, 49, 48, 128, 65,
+ 66, 48, 48, 57, 128, 65, 66, 48, 48, 56, 128, 65, 66, 48, 48, 55, 128,
+ 65, 66, 48, 48, 54, 128, 65, 66, 48, 48, 53, 128, 65, 66, 48, 48, 52,
+ 128, 65, 66, 48, 48, 51, 128, 65, 66, 48, 48, 50, 128, 65, 66, 48, 48,
+ 49, 128, 65, 65, 89, 73, 78, 128, 65, 65, 89, 65, 78, 78, 65, 128, 65,
+ 65, 89, 128, 65, 65, 87, 128, 65, 65, 79, 128, 65, 65, 74, 128, 65, 65,
+ 66, 65, 65, 70, 73, 76, 73, 128, 65, 65, 48, 51, 50, 128, 65, 65, 48, 51,
+ 49, 128, 65, 65, 48, 51, 48, 128, 65, 65, 48, 50, 57, 128, 65, 65, 48,
+ 50, 56, 128, 65, 65, 48, 50, 55, 128, 65, 65, 48, 50, 54, 128, 65, 65,
+ 48, 50, 53, 128, 65, 65, 48, 50, 52, 128, 65, 65, 48, 50, 51, 128, 65,
+ 65, 48, 50, 50, 128, 65, 65, 48, 50, 49, 128, 65, 65, 48, 50, 48, 128,
+ 65, 65, 48, 49, 57, 128, 65, 65, 48, 49, 56, 128, 65, 65, 48, 49, 55,
+ 128, 65, 65, 48, 49, 54, 128, 65, 65, 48, 49, 53, 128, 65, 65, 48, 49,
+ 52, 128, 65, 65, 48, 49, 51, 128, 65, 65, 48, 49, 50, 128, 65, 65, 48,
+ 49, 49, 128, 65, 65, 48, 49, 48, 128, 65, 65, 48, 48, 57, 128, 65, 65,
+ 48, 48, 56, 128, 65, 65, 48, 48, 55, 66, 128, 65, 65, 48, 48, 55, 65,
+ 128, 65, 65, 48, 48, 55, 128, 65, 65, 48, 48, 54, 128, 65, 65, 48, 48,
+ 53, 128, 65, 65, 48, 48, 52, 128, 65, 65, 48, 48, 51, 128, 65, 65, 48,
+ 48, 50, 128, 65, 65, 48, 48, 49, 128, 65, 56, 48, 55, 128, 65, 56, 48,
+ 54, 128, 65, 56, 48, 53, 128, 65, 56, 48, 52, 128, 65, 56, 48, 51, 128,
+ 65, 56, 48, 50, 128, 65, 56, 48, 49, 128, 65, 56, 48, 48, 128, 65, 55,
+ 51, 178, 65, 55, 50, 182, 65, 55, 49, 183, 65, 55, 49, 181, 65, 55, 49,
+ 180, 65, 55, 49, 179, 65, 55, 49, 178, 65, 55, 49, 177, 65, 55, 49, 176,
+ 65, 55, 48, 57, 45, 182, 65, 55, 48, 57, 45, 180, 65, 55, 48, 57, 45,
+ 179, 65, 55, 48, 57, 45, 178, 65, 55, 48, 185, 65, 55, 48, 184, 65, 55,
+ 48, 183, 65, 55, 48, 182, 65, 55, 48, 181, 65, 55, 48, 180, 65, 55, 48,
+ 179, 65, 55, 48, 178, 65, 55, 48, 177, 65, 54, 54, 52, 128, 65, 54, 54,
+ 51, 128, 65, 54, 54, 50, 128, 65, 54, 54, 49, 128, 65, 54, 54, 48, 128,
+ 65, 54, 53, 57, 128, 65, 54, 53, 56, 128, 65, 54, 53, 55, 128, 65, 54,
+ 53, 54, 128, 65, 54, 53, 53, 128, 65, 54, 53, 52, 128, 65, 54, 53, 51,
+ 128, 65, 54, 53, 50, 128, 65, 54, 53, 49, 128, 65, 54, 52, 57, 128, 65,
+ 54, 52, 56, 128, 65, 54, 52, 54, 128, 65, 54, 52, 53, 128, 65, 54, 52,
+ 52, 128, 65, 54, 52, 51, 128, 65, 54, 52, 50, 128, 65, 54, 52, 48, 128,
+ 65, 54, 51, 56, 128, 65, 54, 51, 55, 128, 65, 54, 51, 52, 128, 65, 54,
+ 50, 57, 128, 65, 54, 50, 56, 128, 65, 54, 50, 55, 128, 65, 54, 50, 54,
+ 128, 65, 54, 50, 52, 128, 65, 54, 50, 51, 128, 65, 54, 50, 50, 128, 65,
+ 54, 50, 49, 128, 65, 54, 50, 48, 128, 65, 54, 49, 57, 128, 65, 54, 49,
+ 56, 128, 65, 54, 49, 55, 128, 65, 54, 49, 54, 128, 65, 54, 49, 53, 128,
+ 65, 54, 49, 52, 128, 65, 54, 49, 51, 128, 65, 54, 49, 50, 128, 65, 54,
+ 49, 49, 128, 65, 54, 49, 48, 128, 65, 54, 48, 57, 128, 65, 54, 48, 56,
+ 128, 65, 54, 48, 54, 128, 65, 54, 48, 52, 128, 65, 54, 48, 51, 128, 65,
+ 54, 48, 50, 128, 65, 54, 48, 49, 128, 65, 54, 48, 48, 128, 65, 53, 57,
+ 56, 128, 65, 53, 57, 54, 128, 65, 53, 57, 53, 128, 65, 53, 57, 52, 128,
+ 65, 53, 57, 50, 128, 65, 53, 57, 49, 128, 65, 53, 56, 57, 128, 65, 53,
+ 56, 56, 128, 65, 53, 56, 55, 128, 65, 53, 56, 54, 128, 65, 53, 56, 53,
+ 128, 65, 53, 56, 52, 128, 65, 53, 56, 51, 128, 65, 53, 56, 50, 128, 65,
+ 53, 56, 49, 128, 65, 53, 56, 48, 128, 65, 53, 55, 57, 128, 65, 53, 55,
+ 56, 128, 65, 53, 55, 55, 128, 65, 53, 55, 54, 128, 65, 53, 55, 53, 128,
+ 65, 53, 55, 52, 128, 65, 53, 55, 51, 128, 65, 53, 55, 50, 128, 65, 53,
+ 55, 49, 128, 65, 53, 55, 48, 128, 65, 53, 54, 57, 128, 65, 53, 54, 56,
+ 128, 65, 53, 54, 54, 128, 65, 53, 54, 53, 128, 65, 53, 54, 52, 128, 65,
+ 53, 54, 51, 128, 65, 53, 53, 57, 128, 65, 53, 53, 55, 128, 65, 53, 53,
+ 54, 128, 65, 53, 53, 53, 128, 65, 53, 53, 52, 128, 65, 53, 53, 51, 128,
+ 65, 53, 53, 50, 128, 65, 53, 53, 49, 128, 65, 53, 53, 48, 128, 65, 53,
+ 52, 57, 128, 65, 53, 52, 56, 128, 65, 53, 52, 55, 128, 65, 53, 52, 53,
+ 128, 65, 53, 52, 50, 128, 65, 53, 52, 49, 128, 65, 53, 52, 48, 128, 65,
+ 53, 51, 57, 128, 65, 53, 51, 56, 128, 65, 53, 51, 55, 128, 65, 53, 51,
+ 54, 128, 65, 53, 51, 53, 128, 65, 53, 51, 52, 128, 65, 53, 51, 50, 128,
+ 65, 53, 51, 49, 128, 65, 53, 51, 48, 128, 65, 53, 50, 57, 128, 65, 53,
+ 50, 56, 128, 65, 53, 50, 55, 128, 65, 53, 50, 54, 128, 65, 53, 50, 53,
+ 128, 65, 53, 50, 52, 128, 65, 53, 50, 51, 128, 65, 53, 50, 50, 128, 65,
+ 53, 50, 49, 128, 65, 53, 50, 48, 128, 65, 53, 49, 57, 128, 65, 53, 49,
+ 56, 128, 65, 53, 49, 55, 128, 65, 53, 49, 54, 128, 65, 53, 49, 53, 128,
+ 65, 53, 49, 52, 128, 65, 53, 49, 51, 128, 65, 53, 49, 50, 128, 65, 53,
+ 49, 49, 128, 65, 53, 49, 48, 128, 65, 53, 48, 57, 128, 65, 53, 48, 56,
+ 128, 65, 53, 48, 55, 128, 65, 53, 48, 54, 128, 65, 53, 48, 53, 128, 65,
+ 53, 48, 52, 128, 65, 53, 48, 51, 128, 65, 53, 48, 50, 128, 65, 53, 48,
+ 49, 128, 65, 52, 57, 55, 128, 65, 52, 57, 54, 128, 65, 52, 57, 53, 128,
+ 65, 52, 57, 52, 128, 65, 52, 57, 51, 128, 65, 52, 57, 50, 128, 65, 52,
+ 57, 49, 128, 65, 52, 57, 48, 128, 65, 52, 56, 57, 128, 65, 52, 56, 56,
+ 128, 65, 52, 56, 55, 128, 65, 52, 56, 54, 128, 65, 52, 56, 53, 128, 65,
+ 52, 56, 52, 128, 65, 52, 56, 51, 128, 65, 52, 56, 50, 128, 65, 52, 56,
+ 49, 128, 65, 52, 56, 48, 128, 65, 52, 55, 57, 128, 65, 52, 55, 56, 128,
+ 65, 52, 55, 55, 128, 65, 52, 55, 54, 128, 65, 52, 55, 53, 128, 65, 52,
+ 55, 52, 128, 65, 52, 55, 51, 128, 65, 52, 55, 50, 128, 65, 52, 55, 49,
+ 128, 65, 52, 55, 48, 128, 65, 52, 54, 57, 128, 65, 52, 54, 56, 128, 65,
+ 52, 54, 55, 128, 65, 52, 54, 54, 128, 65, 52, 54, 53, 128, 65, 52, 54,
+ 52, 128, 65, 52, 54, 51, 128, 65, 52, 54, 50, 128, 65, 52, 54, 49, 128,
+ 65, 52, 54, 48, 128, 65, 52, 53, 57, 128, 65, 52, 53, 56, 128, 65, 52,
+ 53, 55, 65, 128, 65, 52, 53, 55, 128, 65, 52, 53, 54, 128, 65, 52, 53,
+ 53, 128, 65, 52, 53, 52, 128, 65, 52, 53, 51, 128, 65, 52, 53, 50, 128,
+ 65, 52, 53, 49, 128, 65, 52, 53, 48, 65, 128, 65, 52, 53, 48, 128, 65,
+ 52, 52, 57, 128, 65, 52, 52, 56, 128, 65, 52, 52, 55, 128, 65, 52, 52,
+ 54, 128, 65, 52, 52, 53, 128, 65, 52, 52, 52, 128, 65, 52, 52, 51, 128,
+ 65, 52, 52, 50, 128, 65, 52, 52, 49, 128, 65, 52, 52, 48, 128, 65, 52,
+ 51, 57, 128, 65, 52, 51, 56, 128, 65, 52, 51, 55, 128, 65, 52, 51, 54,
+ 128, 65, 52, 51, 53, 128, 65, 52, 51, 52, 128, 65, 52, 51, 51, 128, 65,
+ 52, 51, 50, 128, 65, 52, 51, 49, 128, 65, 52, 51, 48, 128, 65, 52, 50,
+ 57, 128, 65, 52, 50, 56, 128, 65, 52, 50, 55, 128, 65, 52, 50, 54, 128,
+ 65, 52, 50, 53, 128, 65, 52, 50, 52, 128, 65, 52, 50, 51, 128, 65, 52,
+ 50, 50, 128, 65, 52, 50, 49, 128, 65, 52, 50, 48, 128, 65, 52, 49, 57,
+ 128, 65, 52, 49, 56, 45, 86, 65, 83, 128, 65, 52, 49, 56, 128, 65, 52,
+ 49, 55, 45, 86, 65, 83, 128, 65, 52, 49, 55, 128, 65, 52, 49, 54, 45, 86,
+ 65, 83, 128, 65, 52, 49, 54, 128, 65, 52, 49, 53, 45, 86, 65, 83, 128,
+ 65, 52, 49, 53, 128, 65, 52, 49, 52, 45, 86, 65, 83, 128, 65, 52, 49, 52,
+ 128, 65, 52, 49, 51, 45, 86, 65, 83, 128, 65, 52, 49, 51, 128, 65, 52,
+ 49, 50, 45, 86, 65, 83, 128, 65, 52, 49, 50, 128, 65, 52, 49, 49, 45, 86,
+ 65, 83, 128, 65, 52, 49, 49, 128, 65, 52, 49, 48, 193, 65, 52, 49, 48,
+ 45, 86, 65, 83, 128, 65, 52, 49, 176, 65, 52, 48, 57, 45, 86, 65, 83,
+ 128, 65, 52, 48, 57, 128, 65, 52, 48, 56, 45, 86, 65, 83, 128, 65, 52,
+ 48, 56, 128, 65, 52, 48, 55, 45, 86, 65, 83, 128, 65, 52, 48, 55, 128,
+ 65, 52, 48, 54, 45, 86, 65, 83, 128, 65, 52, 48, 54, 128, 65, 52, 48, 53,
+ 45, 86, 65, 83, 128, 65, 52, 48, 53, 128, 65, 52, 48, 52, 45, 86, 65, 83,
+ 128, 65, 52, 48, 52, 128, 65, 52, 48, 51, 45, 86, 65, 83, 128, 65, 52,
+ 48, 51, 128, 65, 52, 48, 50, 45, 86, 65, 83, 128, 65, 52, 48, 50, 128,
+ 65, 52, 48, 49, 45, 86, 65, 83, 128, 65, 52, 48, 49, 128, 65, 52, 48, 48,
+ 45, 86, 65, 83, 128, 65, 52, 48, 48, 128, 65, 51, 57, 57, 128, 65, 51,
+ 57, 56, 128, 65, 51, 57, 55, 128, 65, 51, 57, 54, 128, 65, 51, 57, 53,
+ 128, 65, 51, 57, 52, 128, 65, 51, 57, 179, 65, 51, 57, 50, 128, 65, 51,
+ 57, 49, 128, 65, 51, 57, 48, 128, 65, 51, 56, 57, 128, 65, 51, 56, 56,
+ 128, 65, 51, 56, 55, 128, 65, 51, 56, 54, 65, 128, 65, 51, 56, 54, 128,
+ 65, 51, 56, 53, 128, 65, 51, 56, 52, 128, 65, 51, 56, 51, 65, 128, 65,
+ 51, 56, 179, 65, 51, 56, 50, 128, 65, 51, 56, 49, 65, 128, 65, 51, 56,
+ 49, 128, 65, 51, 56, 48, 128, 65, 51, 55, 57, 128, 65, 51, 55, 56, 128,
+ 65, 51, 55, 55, 128, 65, 51, 55, 54, 128, 65, 51, 55, 53, 128, 65, 51,
+ 55, 52, 128, 65, 51, 55, 51, 128, 65, 51, 55, 50, 128, 65, 51, 55, 49,
+ 65, 128, 65, 51, 55, 49, 128, 65, 51, 55, 48, 128, 65, 51, 54, 57, 128,
+ 65, 51, 54, 56, 65, 128, 65, 51, 54, 56, 128, 65, 51, 54, 55, 128, 65,
+ 51, 54, 54, 128, 65, 51, 54, 53, 128, 65, 51, 54, 52, 65, 128, 65, 51,
+ 54, 52, 128, 65, 51, 54, 51, 128, 65, 51, 54, 50, 128, 65, 51, 54, 49,
+ 128, 65, 51, 54, 48, 128, 65, 51, 53, 57, 65, 128, 65, 51, 53, 57, 128,
+ 65, 51, 53, 56, 128, 65, 51, 53, 55, 128, 65, 51, 53, 54, 128, 65, 51,
+ 53, 53, 128, 65, 51, 53, 52, 128, 65, 51, 53, 51, 128, 65, 51, 53, 50,
+ 128, 65, 51, 53, 49, 128, 65, 51, 53, 48, 128, 65, 51, 52, 57, 128, 65,
+ 51, 52, 56, 128, 65, 51, 52, 55, 128, 65, 51, 52, 54, 128, 65, 51, 52,
+ 53, 128, 65, 51, 52, 52, 128, 65, 51, 52, 51, 128, 65, 51, 52, 50, 128,
+ 65, 51, 52, 49, 128, 65, 51, 52, 48, 128, 65, 51, 51, 57, 128, 65, 51,
+ 51, 56, 128, 65, 51, 51, 55, 128, 65, 51, 51, 54, 67, 128, 65, 51, 51,
+ 54, 66, 128, 65, 51, 51, 54, 65, 128, 65, 51, 51, 54, 128, 65, 51, 51,
+ 53, 128, 65, 51, 51, 52, 128, 65, 51, 51, 51, 128, 65, 51, 51, 50, 67,
+ 128, 65, 51, 51, 50, 66, 128, 65, 51, 51, 50, 65, 128, 65, 51, 51, 50,
+ 128, 65, 51, 51, 49, 128, 65, 51, 51, 48, 128, 65, 51, 50, 57, 65, 128,
+ 65, 51, 50, 57, 128, 65, 51, 50, 56, 128, 65, 51, 50, 55, 128, 65, 51,
+ 50, 54, 128, 65, 51, 50, 53, 128, 65, 51, 50, 52, 128, 65, 51, 50, 51,
+ 128, 65, 51, 50, 50, 128, 65, 51, 50, 49, 128, 65, 51, 50, 48, 128, 65,
+ 51, 49, 57, 128, 65, 51, 49, 56, 128, 65, 51, 49, 55, 128, 65, 51, 49,
+ 54, 128, 65, 51, 49, 53, 128, 65, 51, 49, 52, 128, 65, 51, 49, 51, 67,
+ 128, 65, 51, 49, 51, 66, 128, 65, 51, 49, 51, 65, 128, 65, 51, 49, 51,
+ 128, 65, 51, 49, 50, 128, 65, 51, 49, 49, 128, 65, 51, 49, 48, 128, 65,
+ 51, 48, 57, 67, 128, 65, 51, 48, 57, 66, 128, 65, 51, 48, 57, 65, 128,
+ 65, 51, 48, 57, 128, 65, 51, 48, 56, 128, 65, 51, 48, 55, 128, 65, 51,
+ 48, 54, 128, 65, 51, 48, 53, 128, 65, 51, 48, 52, 128, 65, 51, 48, 51,
+ 128, 65, 51, 48, 50, 128, 65, 51, 48, 49, 128, 65, 51, 48, 48, 128, 65,
+ 50, 57, 57, 65, 128, 65, 50, 57, 57, 128, 65, 50, 57, 56, 128, 65, 50,
+ 57, 55, 128, 65, 50, 57, 54, 128, 65, 50, 57, 53, 128, 65, 50, 57, 52,
+ 65, 128, 65, 50, 57, 52, 128, 65, 50, 57, 51, 128, 65, 50, 57, 50, 128,
+ 65, 50, 57, 49, 128, 65, 50, 57, 48, 128, 65, 50, 56, 57, 65, 128, 65,
+ 50, 56, 57, 128, 65, 50, 56, 56, 128, 65, 50, 56, 55, 128, 65, 50, 56,
+ 54, 128, 65, 50, 56, 53, 128, 65, 50, 56, 52, 128, 65, 50, 56, 51, 128,
+ 65, 50, 56, 50, 128, 65, 50, 56, 49, 128, 65, 50, 56, 48, 128, 65, 50,
+ 55, 57, 128, 65, 50, 55, 56, 128, 65, 50, 55, 55, 128, 65, 50, 55, 54,
+ 128, 65, 50, 55, 53, 128, 65, 50, 55, 52, 128, 65, 50, 55, 51, 128, 65,
+ 50, 55, 50, 128, 65, 50, 55, 49, 128, 65, 50, 55, 48, 128, 65, 50, 54,
+ 57, 128, 65, 50, 54, 56, 128, 65, 50, 54, 55, 65, 128, 65, 50, 54, 55,
+ 128, 65, 50, 54, 54, 128, 65, 50, 54, 53, 128, 65, 50, 54, 52, 128, 65,
+ 50, 54, 51, 128, 65, 50, 54, 50, 128, 65, 50, 54, 49, 128, 65, 50, 54,
+ 48, 128, 65, 50, 53, 57, 128, 65, 50, 53, 56, 128, 65, 50, 53, 55, 128,
+ 65, 50, 53, 54, 128, 65, 50, 53, 53, 128, 65, 50, 53, 52, 128, 65, 50,
+ 53, 51, 128, 65, 50, 53, 50, 128, 65, 50, 53, 49, 128, 65, 50, 53, 48,
+ 128, 65, 50, 52, 57, 128, 65, 50, 52, 56, 128, 65, 50, 52, 55, 128, 65,
+ 50, 52, 54, 128, 65, 50, 52, 53, 128, 65, 50, 52, 52, 128, 65, 50, 52,
+ 51, 128, 65, 50, 52, 50, 128, 65, 50, 52, 49, 128, 65, 50, 52, 48, 128,
+ 65, 50, 51, 57, 128, 65, 50, 51, 56, 128, 65, 50, 51, 55, 128, 65, 50,
+ 51, 54, 128, 65, 50, 51, 53, 128, 65, 50, 51, 52, 128, 65, 50, 51, 51,
+ 128, 65, 50, 51, 50, 128, 65, 50, 51, 49, 128, 65, 50, 51, 48, 128, 65,
+ 50, 50, 57, 128, 65, 50, 50, 56, 128, 65, 50, 50, 55, 65, 128, 65, 50,
+ 50, 55, 128, 65, 50, 50, 54, 128, 65, 50, 50, 53, 128, 65, 50, 50, 52,
+ 128, 65, 50, 50, 51, 128, 65, 50, 50, 50, 128, 65, 50, 50, 49, 128, 65,
+ 50, 50, 48, 128, 65, 50, 49, 57, 128, 65, 50, 49, 56, 128, 65, 50, 49,
+ 55, 128, 65, 50, 49, 54, 65, 128, 65, 50, 49, 54, 128, 65, 50, 49, 53,
+ 65, 128, 65, 50, 49, 53, 128, 65, 50, 49, 52, 128, 65, 50, 49, 51, 128,
+ 65, 50, 49, 50, 128, 65, 50, 49, 49, 128, 65, 50, 49, 48, 128, 65, 50,
+ 48, 57, 65, 128, 65, 50, 48, 57, 128, 65, 50, 48, 56, 128, 65, 50, 48,
+ 55, 65, 128, 65, 50, 48, 55, 128, 65, 50, 48, 54, 128, 65, 50, 48, 53,
+ 128, 65, 50, 48, 52, 128, 65, 50, 48, 51, 128, 65, 50, 48, 50, 66, 128,
+ 65, 50, 48, 50, 65, 128, 65, 50, 48, 50, 128, 65, 50, 48, 49, 128, 65,
+ 50, 48, 48, 128, 65, 49, 57, 57, 128, 65, 49, 57, 56, 128, 65, 49, 57,
+ 55, 128, 65, 49, 57, 54, 128, 65, 49, 57, 53, 128, 65, 49, 57, 52, 128,
+ 65, 49, 57, 51, 128, 65, 49, 57, 50, 128, 65, 49, 57, 49, 128, 65, 49,
+ 57, 48, 128, 65, 49, 56, 57, 128, 65, 49, 56, 56, 128, 65, 49, 56, 55,
+ 128, 65, 49, 56, 54, 128, 65, 49, 56, 53, 128, 65, 49, 56, 52, 128, 65,
+ 49, 56, 51, 128, 65, 49, 56, 50, 128, 65, 49, 56, 49, 128, 65, 49, 56,
+ 48, 128, 65, 49, 55, 57, 128, 65, 49, 55, 56, 128, 65, 49, 55, 55, 128,
+ 65, 49, 55, 54, 128, 65, 49, 55, 53, 128, 65, 49, 55, 52, 128, 65, 49,
+ 55, 51, 128, 65, 49, 55, 50, 128, 65, 49, 55, 49, 128, 65, 49, 55, 48,
+ 128, 65, 49, 54, 57, 128, 65, 49, 54, 56, 128, 65, 49, 54, 55, 128, 65,
+ 49, 54, 54, 128, 65, 49, 54, 53, 128, 65, 49, 54, 52, 128, 65, 49, 54,
+ 51, 128, 65, 49, 54, 50, 128, 65, 49, 54, 49, 128, 65, 49, 54, 48, 128,
+ 65, 49, 53, 57, 128, 65, 49, 53, 56, 128, 65, 49, 53, 55, 128, 65, 49,
+ 53, 54, 128, 65, 49, 53, 53, 128, 65, 49, 53, 52, 128, 65, 49, 53, 51,
+ 128, 65, 49, 53, 50, 128, 65, 49, 53, 49, 128, 65, 49, 53, 48, 128, 65,
+ 49, 52, 57, 128, 65, 49, 52, 56, 128, 65, 49, 52, 55, 128, 65, 49, 52,
+ 54, 128, 65, 49, 52, 53, 128, 65, 49, 52, 52, 128, 65, 49, 52, 51, 128,
+ 65, 49, 52, 50, 128, 65, 49, 52, 49, 128, 65, 49, 52, 48, 128, 65, 49,
+ 51, 57, 128, 65, 49, 51, 56, 128, 65, 49, 51, 55, 128, 65, 49, 51, 54,
+ 128, 65, 49, 51, 53, 65, 128, 65, 49, 51, 53, 128, 65, 49, 51, 52, 128,
+ 65, 49, 51, 51, 128, 65, 49, 51, 50, 128, 65, 49, 51, 49, 67, 128, 65,
+ 49, 51, 49, 128, 65, 49, 51, 48, 128, 65, 49, 50, 57, 128, 65, 49, 50,
+ 56, 128, 65, 49, 50, 55, 128, 65, 49, 50, 54, 128, 65, 49, 50, 53, 65,
+ 128, 65, 49, 50, 53, 128, 65, 49, 50, 52, 128, 65, 49, 50, 51, 128, 65,
+ 49, 50, 50, 128, 65, 49, 50, 49, 128, 65, 49, 50, 48, 66, 128, 65, 49,
+ 50, 48, 128, 65, 49, 49, 57, 128, 65, 49, 49, 56, 128, 65, 49, 49, 55,
+ 128, 65, 49, 49, 54, 128, 65, 49, 49, 53, 65, 128, 65, 49, 49, 53, 128,
+ 65, 49, 49, 52, 128, 65, 49, 49, 51, 128, 65, 49, 49, 50, 128, 65, 49,
+ 49, 49, 128, 65, 49, 49, 48, 66, 128, 65, 49, 49, 48, 65, 128, 65, 49,
+ 49, 48, 128, 65, 49, 48, 57, 128, 65, 49, 48, 56, 128, 65, 49, 48, 55,
+ 67, 128, 65, 49, 48, 55, 66, 128, 65, 49, 48, 55, 65, 128, 65, 49, 48,
+ 55, 128, 65, 49, 48, 54, 128, 65, 49, 48, 53, 66, 128, 65, 49, 48, 53,
+ 65, 128, 65, 49, 48, 53, 128, 65, 49, 48, 52, 67, 128, 65, 49, 48, 52,
+ 66, 128, 65, 49, 48, 52, 65, 128, 65, 49, 48, 52, 128, 65, 49, 48, 51,
+ 128, 65, 49, 48, 50, 65, 128, 65, 49, 48, 50, 128, 65, 49, 48, 49, 65,
+ 128, 65, 49, 48, 49, 128, 65, 49, 48, 48, 65, 128, 65, 49, 48, 48, 45,
+ 49, 48, 50, 128, 65, 49, 48, 48, 128, 65, 48, 57, 57, 128, 65, 48, 57,
+ 56, 65, 128, 65, 48, 57, 56, 128, 65, 48, 57, 55, 65, 128, 65, 48, 57,
+ 55, 128, 65, 48, 57, 54, 128, 65, 48, 57, 53, 128, 65, 48, 57, 52, 128,
+ 65, 48, 57, 51, 128, 65, 48, 57, 50, 128, 65, 48, 57, 49, 128, 65, 48,
+ 57, 48, 128, 65, 48, 56, 57, 128, 65, 48, 56, 56, 128, 65, 48, 56, 55,
+ 128, 65, 48, 56, 54, 128, 65, 48, 56, 53, 128, 65, 48, 56, 52, 128, 65,
+ 48, 56, 51, 128, 65, 48, 56, 50, 128, 65, 48, 56, 49, 128, 65, 48, 56,
+ 48, 128, 65, 48, 55, 57, 128, 65, 48, 55, 56, 128, 65, 48, 55, 55, 128,
+ 65, 48, 55, 54, 128, 65, 48, 55, 53, 128, 65, 48, 55, 52, 128, 65, 48,
+ 55, 51, 128, 65, 48, 55, 50, 128, 65, 48, 55, 49, 128, 65, 48, 55, 48,
+ 128, 65, 48, 54, 57, 128, 65, 48, 54, 56, 128, 65, 48, 54, 55, 128, 65,
+ 48, 54, 54, 67, 128, 65, 48, 54, 54, 66, 128, 65, 48, 54, 54, 65, 128,
+ 65, 48, 54, 54, 128, 65, 48, 54, 53, 128, 65, 48, 54, 52, 128, 65, 48,
+ 54, 51, 128, 65, 48, 54, 50, 128, 65, 48, 54, 49, 128, 65, 48, 54, 48,
+ 128, 65, 48, 53, 57, 128, 65, 48, 53, 56, 128, 65, 48, 53, 55, 128, 65,
+ 48, 53, 54, 128, 65, 48, 53, 53, 128, 65, 48, 53, 52, 128, 65, 48, 53,
+ 51, 128, 65, 48, 53, 50, 128, 65, 48, 53, 49, 128, 65, 48, 53, 48, 128,
+ 65, 48, 52, 57, 128, 65, 48, 52, 56, 128, 65, 48, 52, 55, 128, 65, 48,
+ 52, 54, 66, 128, 65, 48, 52, 54, 65, 128, 65, 48, 52, 54, 128, 65, 48,
+ 52, 53, 65, 128, 65, 48, 52, 53, 128, 65, 48, 52, 52, 128, 65, 48, 52,
+ 51, 65, 128, 65, 48, 52, 51, 128, 65, 48, 52, 50, 65, 128, 65, 48, 52,
+ 50, 128, 65, 48, 52, 49, 65, 128, 65, 48, 52, 49, 128, 65, 48, 52, 48,
+ 65, 128, 65, 48, 52, 48, 128, 65, 48, 51, 57, 65, 128, 65, 48, 51, 57,
+ 128, 65, 48, 51, 56, 128, 65, 48, 51, 55, 128, 65, 48, 51, 54, 128, 65,
+ 48, 51, 53, 128, 65, 48, 51, 52, 128, 65, 48, 51, 51, 128, 65, 48, 51,
+ 50, 65, 128, 65, 48, 50, 56, 66, 128, 65, 48, 50, 54, 65, 128, 65, 48,
+ 49, 55, 65, 128, 65, 48, 49, 52, 65, 128, 65, 48, 49, 48, 65, 128, 65,
+ 48, 48, 54, 66, 128, 65, 48, 48, 54, 65, 128, 65, 48, 48, 53, 65, 128,
+ 65, 45, 69, 85, 128, 45, 85, 205, 45, 80, 72, 82, 85, 128, 45, 75, 72,
+ 89, 85, 196, 45, 75, 72, 89, 73, 76, 128, 45, 68, 90, 85, 196, 45, 67,
+ 72, 65, 210, 45, 67, 72, 65, 76, 128,
};
static unsigned int lexicon_offset[] = {
- 0, 0, 6, 10, 18, 23, 27, 34, 39, 41, 47, 50, 62, 70, 80, 93, 102, 108,
- 113, 121, 130, 135, 140, 143, 147, 153, 158, 163, 171, 178, 186, 191,
- 194, 200, 208, 215, 225, 230, 237, 246, 249, 254, 257, 263, 267, 272,
- 281, 288, 295, 301, 310, 315, 321, 327, 335, 144, 341, 349, 350, 358,
- 361, 367, 369, 375, 382, 384, 391, 395, 403, 410, 412, 417, 422, 427,
- 434, 436, 299, 442, 445, 447, 452, 457, 463, 470, 479, 489, 494, 498,
- 505, 518, 522, 531, 538, 545, 548, 554, 558, 562, 572, 580, 588, 596,
- 605, 613, 618, 619, 623, 631, 638, 648, 652, 663, 667, 670, 673, 678,
- 348, 682, 691, 697, 703, 705, 708, 711, 714, 718, 722, 731, 739, 744,
- 747, 751, 757, 764, 771, 776, 785, 794, 801, 805, 818, 827, 835, 841,
- 557, 850, 860, 867, 873, 879, 886, 894, 898, 749, 906, 915, 503, 923,
- 928, 934, 17, 943, 948, 951, 955, 959, 966, 969, 976, 980, 988, 992,
- 1000, 1004, 1007, 1014, 1021, 192, 1024, 1029, 1039, 1048, 1055, 1060,
- 1066, 1072, 1080, 1083, 1088, 1094, 1102, 1107, 1110, 1113, 111, 1118,
- 1122, 1128, 1134, 1137, 1143, 1147, 1152, 1158, 1168, 1172, 1175, 1178,
- 1187, 1191, 1194, 1199, 1204, 1210, 1215, 1220, 1225, 1229, 1234, 1240,
- 1245, 1250, 1254, 1260, 1265, 1270, 1275, 1279, 1284, 1289, 1294, 1300,
- 1306, 1312, 1317, 1321, 1326, 1331, 1336, 1340, 1345, 1350, 1355, 1360,
- 1195, 1200, 1205, 1211, 1216, 1364, 1226, 1370, 1375, 1380, 1387, 1391,
- 1400, 1230, 1404, 1235, 1241, 1246, 1408, 1413, 1418, 1422, 1426, 1432,
- 1436, 1251, 1439, 1261, 1444, 1448, 1266, 1454, 1271, 1458, 1462, 1276,
- 1466, 1471, 1475, 1478, 1482, 1280, 1285, 1487, 1290, 1493, 1499, 1505,
- 1511, 1295, 1307, 1313, 1515, 1519, 1523, 1526, 1318, 1530, 1532, 1537,
- 1542, 1548, 1553, 1558, 1562, 1567, 1572, 1577, 1582, 1588, 1593, 1598,
- 1604, 1610, 1615, 1619, 1624, 1629, 1634, 1639, 1643, 1651, 1655, 1660,
- 1665, 1670, 1675, 1679, 1682, 1687, 1692, 1697, 1702, 1708, 1713, 1717,
- 1322, 1720, 1725, 1730, 1327, 1734, 1738, 1745, 1332, 1752, 1337, 1756,
- 1758, 1763, 1769, 1341, 1774, 1783, 1346, 1788, 1794, 1351, 1799, 1804,
- 1807, 1812, 1816, 1820, 1824, 1827, 1831, 1356, 1361, 1058, 1836, 1842,
- 1848, 1854, 1860, 1866, 1872, 1878, 1884, 1889, 1895, 1901, 1907, 1913,
- 1919, 1925, 1931, 1937, 1943, 1948, 1953, 1958, 1963, 1968, 1973, 1978,
- 1983, 1988, 1993, 1999, 2004, 2010, 2015, 2021, 2027, 2032, 2038, 2044,
- 2050, 2056, 2061, 2066, 2068, 2069, 2073, 2077, 2082, 2086, 2090, 2094,
- 2099, 2103, 2106, 2111, 2115, 2120, 2124, 2128, 2133, 2137, 2140, 2144,
- 2150, 2164, 2168, 2172, 2176, 2179, 2184, 2188, 2192, 2195, 2199, 2204,
- 2209, 2214, 2219, 2223, 2227, 2231, 2236, 2240, 2245, 2249, 2254, 2260,
- 2267, 2273, 2278, 2283, 2288, 2294, 2299, 2305, 2310, 2313, 1212, 2315,
- 2322, 2330, 2340, 2349, 2363, 2367, 2371, 2384, 2392, 2396, 2401, 2405,
- 2408, 2412, 2416, 2421, 2426, 2431, 2435, 2438, 2442, 2449, 2456, 2462,
- 2467, 2472, 2478, 2484, 2489, 2492, 1760, 2494, 2500, 2504, 2509, 2513,
- 2517, 1765, 1771, 2522, 2526, 2529, 2534, 2539, 2544, 2549, 2553, 2560,
- 2565, 2568, 2575, 2581, 2585, 2589, 2593, 2598, 2605, 2610, 2615, 2622,
- 2628, 2634, 2640, 2654, 2671, 2686, 2701, 2710, 2715, 2719, 2724, 2729,
- 2733, 2745, 2752, 2758, 2263, 2764, 2771, 2777, 2781, 2784, 2791, 2797,
- 2801, 2805, 2809, 2091, 2813, 2818, 2823, 2827, 2835, 2839, 2843, 2847,
- 2851, 2856, 2861, 2866, 2870, 2875, 2880, 2884, 2889, 2893, 2896, 2900,
- 2904, 2912, 2917, 2921, 2925, 2931, 2940, 2944, 2948, 2954, 2959, 2966,
- 2970, 2980, 2984, 2988, 2993, 2997, 3002, 3008, 3013, 3017, 3021, 3025,
- 2452, 3033, 3038, 3044, 3049, 3053, 3058, 3063, 3067, 3073, 3078, 2095,
- 3084, 3090, 3095, 3100, 3105, 3110, 3115, 3120, 3125, 3130, 3135, 3141,
- 3146, 1227, 92, 3152, 3156, 3160, 3164, 3169, 3173, 3177, 3181, 3185,
- 3190, 3194, 3199, 3203, 3206, 3210, 3215, 3219, 3224, 3228, 3232, 3236,
- 3241, 3245, 3248, 3261, 3265, 3269, 3273, 3277, 3281, 3284, 3288, 3292,
- 3297, 3301, 3306, 3311, 3316, 3320, 3323, 3326, 3332, 3336, 3340, 3343,
- 3347, 3351, 3354, 3360, 3365, 3370, 3376, 3381, 3386, 3392, 3398, 3403,
- 3408, 3413, 1120, 547, 3418, 3421, 3426, 3430, 3433, 3437, 3442, 3447,
- 3451, 3456, 3460, 3465, 3469, 3473, 3479, 3485, 3488, 3491, 3497, 3504,
- 3511, 3517, 3524, 3529, 3533, 3540, 3547, 3552, 3556, 3566, 3570, 3574,
- 3579, 3584, 3594, 2107, 3599, 3603, 3606, 3612, 3617, 3623, 3629, 3634,
- 3641, 3645, 3649, 620, 671, 1388, 3653, 3660, 3667, 3674, 3681, 3687,
- 3693, 3698, 3702, 3708, 3713, 3717, 2116, 3721, 3729, 600, 3735, 3746,
- 3750, 3760, 2121, 3766, 3771, 3786, 3792, 3799, 3809, 3815, 3820, 3826,
- 3832, 3835, 3839, 3844, 3851, 3856, 3860, 3864, 3868, 3872, 3877, 3883,
- 3894, 3211, 3899, 3911, 3919, 3924, 1564, 3931, 3934, 3937, 3941, 3944,
- 3950, 3954, 3968, 3972, 3975, 3979, 3985, 3991, 3996, 4000, 4004, 4010,
- 4021, 4027, 4032, 4038, 4042, 4050, 4060, 4066, 4071, 4080, 4088, 4095,
- 4099, 4105, 4114, 4123, 4127, 4132, 4137, 4141, 4149, 4153, 4158, 4162,
- 2129, 1401, 4168, 4173, 4179, 4184, 4189, 4194, 4199, 4204, 4209, 4215,
- 4220, 4226, 4231, 4236, 4241, 4247, 4252, 4257, 4262, 4267, 4273, 4278,
- 4284, 4289, 4294, 4299, 4304, 4309, 4314, 4320, 4325, 4330, 319, 456,
- 4335, 4341, 4345, 4349, 4354, 4358, 4362, 4365, 4369, 4373, 4377, 4381,
- 4386, 4390, 4394, 4400, 4165, 4405, 4409, 4412, 4417, 4422, 4427, 4432,
- 4437, 4442, 4447, 4452, 4457, 4462, 4466, 4471, 4476, 4481, 4486, 4491,
- 4496, 4501, 4506, 4511, 4516, 4520, 4525, 4530, 4535, 4540, 4545, 4550,
- 4555, 4560, 4565, 4570, 4574, 4579, 4584, 4589, 4594, 4599, 4604, 4609,
- 4614, 4619, 4624, 4628, 4633, 4638, 4643, 4648, 4653, 4658, 4663, 4668,
- 4673, 4678, 4682, 4687, 4692, 4697, 4702, 4707, 4712, 4717, 4722, 4727,
- 4732, 4736, 4741, 4746, 4751, 4756, 4761, 4766, 4771, 4776, 4781, 4786,
- 4790, 4795, 4800, 4805, 4810, 4816, 4822, 4828, 4834, 4840, 4846, 4852,
- 4857, 4863, 4869, 4875, 4881, 4887, 4893, 4899, 4905, 4911, 4917, 4922,
- 4928, 4934, 4940, 4946, 4952, 4958, 4964, 4970, 4976, 4982, 4987, 4993,
- 4999, 5005, 5011, 5017, 5023, 5029, 5035, 5041, 5047, 5052, 5058, 5064,
- 5070, 5076, 5082, 5088, 5094, 5100, 5106, 5112, 5117, 5123, 5129, 5135,
- 5141, 5147, 5153, 5159, 5165, 5171, 5177, 5182, 5186, 5192, 5198, 5204,
- 5210, 5216, 5222, 5228, 5234, 5240, 5246, 5251, 5257, 5263, 5269, 5275,
- 5281, 5287, 5293, 5299, 5305, 5311, 5316, 5322, 5328, 5334, 5340, 5346,
- 5352, 5358, 5364, 5370, 5376, 5381, 5387, 5393, 5399, 5405, 5411, 5417,
- 5423, 5429, 5435, 5441, 5446, 5452, 5458, 5464, 5470, 5476, 5482, 5488,
- 5494, 5500, 5506, 5511, 5517, 5523, 5529, 5535, 5541, 5547, 5553, 5559,
- 5565, 5571, 5576, 5582, 5588, 5594, 5600, 5606, 5612, 5618, 5624, 5630,
- 5636, 5641, 5647, 5653, 5659, 5665, 5671, 5677, 5683, 5689, 5695, 5701,
- 5706, 5712, 5718, 5724, 5730, 5736, 5742, 5748, 5754, 5760, 5766, 5771,
- 5777, 5783, 5789, 5795, 5801, 5807, 5813, 5819, 5825, 5831, 5836, 5840,
- 5843, 5850, 5854, 5867, 5871, 5875, 5879, 5883, 5887, 5891, 5897, 5904,
- 5912, 5916, 5924, 5933, 5939, 5951, 5956, 5959, 5963, 5973, 5981, 5989,
- 5995, 5999, 6009, 6019, 6027, 6034, 6041, 6047, 6053, 6060, 6064, 6071,
- 6081, 6091, 6099, 6106, 6111, 6115, 6123, 6127, 6132, 6139, 6147, 6152,
- 6157, 6161, 6168, 6173, 6187, 6192, 6197, 6204, 6213, 6216, 6220, 6224,
- 6228, 6231, 6236, 6241, 6250, 6256, 6262, 6268, 6272, 6283, 6293, 6308,
- 6323, 6338, 6353, 6368, 6383, 6398, 6413, 6428, 6443, 6458, 6473, 6488,
- 6503, 6518, 6533, 6548, 6563, 6578, 6593, 6608, 6623, 6638, 6653, 6668,
- 6683, 6698, 6713, 6728, 6743, 6758, 6773, 6788, 6803, 6818, 6833, 6848,
- 6863, 6878, 6893, 6908, 6923, 6938, 6953, 6968, 6983, 6998, 7013, 7028,
- 7037, 7046, 7051, 7057, 7067, 7071, 7076, 7081, 7089, 7093, 7096, 7100,
- 2975, 7103, 7108, 298, 425, 7114, 7122, 7126, 7130, 7133, 7137, 7143,
- 7147, 7155, 7161, 7166, 7173, 7180, 7186, 7191, 7198, 7204, 7212, 7216,
- 7221, 7233, 7244, 7251, 7255, 7259, 7265, 3233, 7269, 7275, 7280, 7285,
- 7290, 7296, 7301, 7306, 7311, 7316, 7322, 7327, 7332, 7338, 7343, 7349,
- 7354, 7360, 7365, 7371, 7376, 7381, 7386, 7391, 7396, 7402, 7407, 7412,
- 7417, 7423, 7429, 7435, 7441, 7447, 7453, 7459, 7465, 7471, 7477, 7483,
- 7489, 7494, 7499, 7504, 7509, 7514, 7519, 7524, 7529, 7535, 7541, 7546,
- 7552, 7558, 7564, 7569, 7574, 7579, 7584, 7590, 7596, 7601, 7606, 7611,
- 7616, 7621, 7627, 7632, 7638, 7644, 7650, 7656, 7662, 7668, 7674, 7680,
- 7686, 2138, 7132, 7691, 7695, 7699, 7702, 7709, 7712, 7720, 7725, 7730,
- 7721, 7735, 2165, 7739, 7745, 7751, 7756, 7761, 7768, 7776, 7781, 7785,
- 7788, 7792, 7798, 7804, 7808, 2173, 560, 7811, 7815, 7820, 7826, 7831,
- 7835, 7838, 7842, 7848, 7853, 7857, 7864, 7868, 7872, 7876, 945, 769,
- 7879, 7887, 7894, 7901, 7907, 7914, 7922, 7929, 7936, 7941, 7953, 1247,
- 1409, 1414, 7964, 1419, 7968, 7972, 7981, 7989, 7998, 8004, 8009, 8013,
- 8019, 8024, 2706, 8031, 8035, 8044, 8053, 8062, 8071, 8076, 8081, 8093,
- 8098, 8106, 2224, 8110, 8112, 8117, 8121, 8130, 8138, 1423, 133, 3461,
- 3466, 8144, 8148, 8157, 8163, 8168, 8171, 8180, 2698, 8186, 8194, 8198,
- 8202, 8206, 2237, 8210, 8215, 8222, 8228, 8234, 8237, 8239, 8242, 8250,
- 8258, 8266, 8269, 8274, 2250, 8279, 7732, 8282, 8284, 8289, 8294, 8299,
- 8304, 8309, 8314, 8319, 8324, 8329, 8334, 8340, 8345, 8350, 8355, 8361,
- 8366, 8371, 8376, 8381, 8386, 8391, 8397, 8402, 8407, 8412, 8417, 8422,
- 8427, 8432, 8437, 8442, 8447, 8452, 8457, 8462, 8467, 8472, 8477, 8482,
- 8488, 8494, 8499, 8504, 8509, 8514, 8519, 2261, 2268, 2274, 8524, 8530,
- 8538, 2300, 2306, 8546, 8550, 8555, 8559, 8563, 8567, 8572, 8576, 8581,
- 8585, 8588, 8591, 8597, 8603, 8609, 8615, 8621, 8627, 8633, 8637, 8641,
- 8645, 8649, 8653, 8658, 8665, 8676, 8684, 8694, 8700, 8707, 8712, 8716,
- 8727, 8740, 8751, 8764, 8775, 8787, 8799, 8811, 8824, 8837, 8844, 8850,
- 8864, 8871, 8877, 8881, 8886, 8890, 8897, 8905, 8909, 8915, 8919, 8925,
- 8935, 8939, 8944, 8949, 8956, 8962, 8972, 7909, 8978, 8982, 8989, 8996,
- 768, 9000, 9004, 9009, 9014, 9019, 9023, 9029, 9037, 9043, 9047, 9053,
- 9063, 9067, 9073, 9078, 9082, 9088, 9094, 2161, 9099, 9101, 9106, 9114,
- 9123, 9127, 9133, 9138, 9143, 9148, 9153, 9159, 9164, 9169, 4006, 9174,
- 9179, 9183, 9189, 9194, 9200, 9205, 9210, 9216, 9221, 9128, 9227, 9231,
- 9238, 9244, 9249, 9253, 6183, 9258, 9267, 9272, 9277, 8218, 8225, 9282,
- 2853, 9286, 9291, 9296, 9139, 9300, 9305, 9144, 9149, 9310, 9317, 9324,
- 9330, 9336, 9342, 9347, 9352, 9357, 9154, 9160, 9363, 9369, 9374, 9382,
- 9165, 9387, 990, 9390, 9398, 9404, 9410, 9419, 9427, 9432, 9438, 9446,
- 9453, 9468, 9485, 9504, 9513, 9521, 9536, 9547, 9557, 9567, 9575, 9581,
- 9593, 9602, 9610, 9617, 9624, 9630, 9635, 9643, 9653, 9660, 9670, 9680,
- 9690, 9698, 9705, 9714, 9724, 9738, 9753, 9762, 9770, 9775, 9779, 9788,
- 9794, 9799, 9809, 9819, 9829, 9834, 9838, 9847, 9852, 9862, 9873, 9886,
- 9894, 9907, 9919, 9927, 9932, 9936, 9942, 9947, 9955, 9963, 9970, 9975,
- 9983, 9989, 9992, 9996, 10002, 10010, 10015, 10019, 10027, 10036, 10044,
- 10050, 10054, 10061, 10072, 10076, 10079, 10085, 9170, 10090, 10096,
- 10103, 10109, 10114, 10121, 10128, 10135, 10142, 10149, 10156, 10163,
- 10170, 10175, 9481, 10180, 10186, 10193, 10200, 10205, 10212, 10221,
- 10225, 10237, 8256, 10241, 10244, 10248, 10252, 10256, 10260, 10266,
- 10272, 10277, 10283, 10288, 10293, 10299, 10304, 10309, 8952, 10314,
- 10318, 10322, 10326, 10331, 10336, 10344, 10350, 10354, 10358, 10365,
- 10370, 10378, 10383, 10387, 10390, 10396, 10403, 10407, 10410, 10415,
- 10419, 4045, 10425, 10434, 36, 10442, 10448, 10453, 8967, 10458, 10463,
- 10467, 10470, 10485, 10504, 10516, 10529, 10542, 10555, 10569, 10582,
- 10597, 10604, 9175, 10610, 10624, 10629, 10635, 10640, 10648, 10653,
- 8040, 10658, 10661, 10668, 10673, 10677, 2858, 998, 10683, 10687, 10693,
- 10699, 10704, 10710, 10715, 9184, 10721, 10727, 10732, 10737, 10745,
- 10751, 10764, 10772, 10779, 9190, 10785, 10793, 10801, 10808, 10821,
- 10833, 10843, 10851, 10858, 10865, 10874, 10883, 10891, 10898, 10903,
- 10909, 9195, 10914, 10920, 9201, 10925, 10928, 10935, 10941, 10954, 8669,
- 10965, 10971, 10980, 10988, 10995, 11001, 11007, 11012, 11016, 11021,
- 10477, 11027, 9206, 11034, 11039, 11046, 11052, 11058, 11063, 11071,
- 11079, 11086, 11090, 11104, 11114, 11119, 11123, 11134, 11140, 11145,
- 11150, 9211, 9217, 11154, 11157, 11162, 11174, 11181, 11186, 11190,
- 11195, 11199, 11206, 11212, 9222, 9129, 11219, 2863, 8, 11226, 11231,
- 11235, 11241, 11249, 11259, 11264, 11269, 11276, 11283, 11287, 11298,
- 11308, 11317, 11329, 11334, 11338, 11346, 11360, 11364, 11367, 11375,
- 11382, 11390, 11394, 11405, 11409, 11416, 11421, 11425, 11431, 11436,
- 11440, 11446, 11451, 11462, 11466, 11469, 11475, 11480, 11486, 11492,
- 11499, 11510, 11520, 11530, 11539, 11546, 11555, 9232, 9239, 9245, 9250,
- 11561, 11567, 9254, 11573, 11576, 11583, 11588, 11603, 11619, 11634,
- 11642, 11648, 11653, 838, 420, 11658, 11666, 11673, 11679, 11684, 11689,
- 9259, 11691, 11695, 11700, 11704, 11714, 11719, 11723, 11732, 11736,
- 11739, 9268, 11746, 11749, 11757, 11764, 11772, 11776, 11783, 11792,
- 11795, 11799, 11803, 11809, 11813, 11817, 11821, 11827, 11837, 11841,
- 11849, 11853, 11860, 11864, 11869, 11873, 11880, 11886, 11894, 11900,
- 11905, 11915, 11920, 11925, 11929, 11937, 3905, 11945, 11950, 9273,
- 11954, 11958, 11961, 11969, 11976, 11980, 5991, 11984, 11989, 11993,
- 12004, 12014, 12019, 12025, 12029, 12032, 12040, 12045, 12050, 12057,
- 12062, 9278, 12067, 12071, 12078, 1722, 6145, 12083, 12088, 12093, 12098,
- 12104, 12109, 12115, 12120, 12125, 12130, 12135, 12140, 12145, 12150,
- 12155, 12160, 12165, 12170, 12175, 12180, 12185, 12190, 12195, 12201,
- 12206, 12211, 12216, 12221, 12226, 12232, 12237, 12242, 12248, 12253,
- 12259, 12264, 12270, 12275, 12280, 12285, 12290, 12296, 12301, 12306,
- 12311, 737, 139, 12319, 12323, 12328, 12333, 12337, 12341, 12345, 12350,
- 12354, 12359, 12363, 12366, 12370, 12374, 12380, 12385, 12395, 12401,
- 12409, 12413, 12417, 12424, 12432, 12441, 12452, 12459, 12466, 12470,
- 12479, 12488, 12496, 12505, 12514, 12523, 12532, 12542, 12552, 12562,
- 12572, 12582, 12591, 12601, 12611, 12621, 12631, 12641, 12651, 12661,
- 12670, 12680, 12690, 12700, 12710, 12720, 12730, 12739, 12749, 12759,
- 12769, 12779, 12789, 12799, 12809, 12819, 12829, 12838, 12848, 12858,
- 12868, 12878, 12888, 12898, 12908, 12918, 12928, 12938, 12947, 1256,
- 12953, 12956, 12960, 12965, 12972, 12978, 12983, 12987, 12992, 13001,
- 13009, 13014, 13018, 13022, 13028, 13033, 13039, 9287, 13044, 13049,
- 13058, 9292, 13063, 13066, 13072, 13080, 9297, 13087, 13091, 13095,
- 13099, 13109, 13115, 13121, 13126, 13135, 13143, 13150, 13157, 13162,
- 13169, 13174, 13178, 13181, 13192, 13202, 13211, 13219, 13230, 13242,
- 13252, 13257, 13261, 13266, 13271, 13275, 13281, 13289, 13296, 13307,
- 13312, 13322, 13326, 13329, 13336, 13346, 13355, 13362, 13366, 13373,
- 13379, 13384, 13389, 13393, 13402, 13407, 13413, 13417, 13422, 13426,
- 13435, 13443, 13451, 13458, 13466, 13478, 13489, 13499, 13506, 13512,
- 13521, 13532, 13541, 13553, 13565, 13577, 13587, 13596, 13605, 13613,
- 13620, 13629, 13637, 13641, 13647, 13653, 13658, 7753, 13662, 13664,
- 13668, 13673, 13679, 13688, 13692, 13698, 13706, 13713, 13722, 13731,
- 13740, 13749, 13758, 13767, 13776, 13785, 13795, 13805, 13814, 13820,
- 13827, 13834, 13840, 13854, 13861, 13869, 13878, 13884, 13893, 13902,
- 13913, 13923, 13931, 13938, 13946, 13955, 13968, 13976, 13983, 13996,
- 14002, 14008, 14018, 14027, 14036, 14041, 14045, 14051, 14057, 14064,
- 8966, 14069, 14074, 14081, 14086, 12376, 14091, 14099, 14105, 14110,
- 14118, 14126, 14133, 14141, 14147, 14155, 14163, 14169, 14174, 14180,
- 14187, 14193, 14198, 14202, 14213, 14221, 14227, 14232, 14241, 14247,
- 14252, 14261, 14275, 3853, 14279, 14284, 14289, 14295, 14300, 14305,
- 14309, 14314, 14319, 14324, 7752, 14329, 14334, 14339, 14344, 14349,
- 14353, 14358, 14363, 14368, 14373, 14379, 14385, 14390, 14394, 14399,
- 14404, 14409, 9301, 14414, 14419, 14424, 14429, 14434, 14451, 14469,
- 14481, 14494, 14511, 14527, 14544, 14554, 14573, 14584, 14595, 14606,
- 14617, 14629, 14640, 14651, 14668, 14679, 14690, 14695, 9306, 14700,
- 14704, 2381, 14708, 14711, 14717, 14725, 14733, 14738, 14746, 14754,
- 14761, 14766, 14772, 14779, 14787, 14794, 14806, 14814, 14819, 11597,
- 14825, 14834, 14843, 14851, 14858, 14864, 14872, 14879, 14885, 14892,
- 14898, 14907, 14915, 14925, 14932, 14938, 14946, 14952, 14960, 14967,
- 14980, 14987, 14996, 15005, 15014, 15022, 15032, 15039, 15044, 3560,
- 15051, 15056, 1372, 15060, 14330, 15064, 15070, 15074, 15082, 15094,
- 15099, 15106, 15112, 15117, 15124, 14335, 15128, 15132, 15136, 14340,
- 15140, 14345, 15144, 15151, 15156, 15160, 15167, 15171, 15179, 15186,
- 15190, 15197, 15214, 15223, 15227, 15230, 15238, 15244, 15249, 3638,
- 15253, 15255, 15263, 15270, 15280, 15292, 15297, 15303, 15308, 15312,
- 15318, 15323, 15329, 15332, 15339, 15347, 15354, 15360, 15366, 15371,
- 15378, 15384, 15389, 15396, 15400, 15406, 15410, 15417, 15423, 15429,
- 15437, 15443, 15448, 15454, 15462, 15470, 15476, 15482, 15487, 15494,
- 15499, 15503, 15509, 15514, 15521, 15526, 15532, 15535, 15541, 15547,
- 15550, 15554, 15566, 15572, 15577, 15584, 15590, 15596, 15607, 15617,
- 15626, 15634, 15641, 15652, 15662, 15672, 15680, 15683, 14359, 15688,
- 15693, 14364, 14499, 15701, 15714, 15729, 15740, 14516, 15758, 15771,
- 15784, 15795, 10492, 15806, 15819, 15838, 15849, 15860, 15871, 2649,
- 15884, 15888, 15896, 15911, 15926, 15937, 15944, 15950, 15958, 15962,
- 15968, 15971, 15981, 15989, 15996, 16004, 16014, 16019, 16026, 16031,
- 16038, 16049, 16059, 16065, 16070, 16075, 14369, 16079, 16085, 16091,
- 16096, 16101, 16106, 16110, 14374, 14380, 16114, 14386, 16119, 16127,
- 16136, 16143, 9150, 16147, 16149, 16154, 16159, 16165, 16170, 16175,
- 16180, 16185, 16189, 16195, 16201, 16206, 16212, 16217, 16222, 16228,
- 16233, 16238, 16243, 16248, 16254, 16259, 16264, 16270, 16276, 16281,
- 16286, 16293, 16299, 16310, 16317, 16322, 16326, 16330, 16333, 16341,
- 16346, 16353, 16360, 16366, 16371, 16376, 16383, 16393, 16398, 16405,
- 16411, 16421, 16431, 16445, 16459, 16473, 16487, 16502, 16517, 16534,
- 16552, 16565, 16571, 16576, 16581, 16585, 16590, 16598, 16604, 16609,
- 16614, 16618, 16623, 16627, 16632, 16636, 16647, 16653, 16658, 16663,
- 16670, 16675, 16679, 16684, 16689, 16695, 16702, 16708, 16713, 16717,
- 16723, 16728, 16733, 16737, 16743, 16748, 16753, 16760, 16765, 13111,
- 16769, 16774, 16778, 16783, 16789, 16795, 16802, 16812, 16820, 16827,
- 16832, 16836, 16845, 16853, 16860, 16867, 16873, 16879, 16884, 16889,
- 16895, 16900, 16906, 16911, 16917, 16923, 16930, 16936, 16941, 16946,
- 9348, 16955, 16958, 16964, 16969, 16974, 16984, 16991, 16997, 17002,
- 17007, 17013, 17018, 17024, 17029, 17035, 17041, 17046, 17054, 17061,
- 17066, 17071, 17077, 17082, 17086, 17095, 17106, 17113, 17118, 17126,
- 17132, 17139, 17145, 17150, 17154, 17160, 17165, 17170, 17175, 1440,
- 7777, 2877, 17179, 17183, 17187, 17191, 17195, 17199, 17202, 17209,
- 17217, 14400, 17224, 17234, 17242, 17249, 17257, 17267, 17276, 17289,
- 17294, 17299, 17307, 17314, 13207, 13216, 17321, 17331, 17346, 17352,
- 17359, 17366, 17372, 17380, 17390, 17400, 14405, 17409, 17415, 17421,
- 17429, 17437, 17442, 17451, 17459, 17471, 17481, 17491, 17501, 17510,
- 17522, 17532, 17542, 17553, 17558, 17570, 17582, 17594, 17606, 17618,
- 17630, 17642, 17654, 17666, 17678, 17689, 17701, 17713, 17725, 17737,
- 17749, 17761, 17773, 17785, 17797, 17809, 17820, 17832, 17844, 17856,
- 17868, 17880, 17892, 17904, 17916, 17928, 17940, 17951, 17963, 17975,
- 17987, 17999, 18011, 18023, 18035, 18047, 18059, 18071, 18082, 18094,
- 18106, 18118, 18130, 18142, 18154, 18166, 18178, 18190, 18202, 18213,
- 18225, 18237, 18249, 18261, 18273, 18285, 18297, 18309, 18321, 18333,
- 18344, 18356, 18368, 18380, 18392, 18404, 18416, 18428, 18440, 18452,
- 18464, 18475, 18487, 18499, 18511, 18523, 18536, 18549, 18562, 18575,
- 18588, 18601, 18614, 18626, 18639, 18652, 18665, 18678, 18691, 18704,
- 18717, 18730, 18743, 18756, 18768, 18781, 18794, 18807, 18820, 18833,
- 18846, 18859, 18872, 18885, 18898, 18910, 18923, 18936, 18949, 18962,
- 18975, 18988, 19001, 19014, 19027, 19040, 19052, 19065, 19078, 19091,
- 19104, 19117, 19130, 19143, 19156, 19169, 19182, 19194, 19207, 19220,
- 19233, 19246, 19259, 19272, 19285, 19298, 19311, 19324, 19336, 19347,
- 19360, 19373, 19386, 19399, 19412, 19425, 19438, 19451, 19464, 19477,
- 19489, 19502, 19515, 19528, 19541, 19554, 19567, 19580, 19593, 19606,
- 19619, 19631, 19644, 19657, 19670, 19683, 19696, 19709, 19722, 19735,
- 19748, 19761, 19773, 19786, 19799, 19812, 19825, 19838, 19851, 19864,
- 19877, 19890, 19903, 19915, 19928, 19941, 19954, 19967, 19980, 19993,
- 20006, 20019, 20032, 20045, 20057, 20070, 20083, 20096, 20109, 20122,
- 20135, 20148, 20161, 20174, 20187, 20199, 20212, 20225, 20238, 20251,
- 20264, 20277, 20290, 20303, 20316, 20329, 20341, 20354, 20367, 20380,
- 20393, 20406, 20419, 20432, 20445, 20458, 20471, 20483, 20496, 20509,
- 20522, 20535, 20548, 20561, 20574, 20587, 20600, 20613, 20625, 20638,
- 20651, 20664, 20677, 20690, 20703, 20716, 20729, 20742, 20755, 20767,
- 20778, 20786, 20794, 20801, 20807, 20811, 20817, 20823, 20831, 20837,
- 20842, 20846, 20855, 9155, 20866, 20873, 20881, 20888, 20895, 10948,
- 20902, 20911, 20916, 20921, 7805, 20928, 20933, 20936, 20941, 20949,
- 20956, 20963, 20970, 20976, 20985, 20994, 21000, 21009, 21013, 21019,
- 21024, 21034, 21041, 21047, 21055, 21061, 21068, 21078, 21087, 21091,
- 21098, 21102, 21107, 21113, 21121, 21125, 21135, 14415, 21144, 21150,
- 21154, 21163, 14420, 21169, 21176, 21187, 21195, 21204, 21212, 8931,
- 21220, 21225, 21231, 21236, 21240, 21244, 21248, 9639, 21253, 21261,
- 21268, 21277, 21284, 21291, 10878, 21298, 21304, 21308, 21314, 21321,
- 21327, 21335, 21341, 21348, 21354, 21360, 21369, 21373, 21381, 21390,
- 21397, 21402, 21406, 21417, 21422, 21427, 21432, 21445, 7995, 21449,
- 21455, 21463, 21467, 21474, 21483, 21488, 14691, 21496, 21500, 21512,
- 21517, 21521, 21524, 21530, 21536, 21541, 21545, 21548, 21559, 21564,
- 9383, 21571, 21576, 9388, 21581, 21586, 21591, 21596, 21601, 21606,
- 21611, 21616, 21621, 21626, 21631, 21636, 21642, 21647, 21652, 21657,
- 21662, 21667, 21672, 21677, 21682, 21687, 21693, 21699, 21704, 21709,
- 21714, 21719, 21724, 21729, 21734, 21739, 21744, 21750, 21755, 21760,
- 21765, 21771, 21777, 21782, 21787, 21792, 21797, 21802, 21807, 21812,
- 21817, 21823, 21828, 21833, 21838, 21843, 21849, 21854, 21859, 21863,
- 1368, 129, 21871, 21875, 21879, 21883, 21888, 21892, 13117, 12476, 21896,
- 21901, 21905, 21910, 21914, 21919, 21923, 21929, 21934, 21938, 21942,
- 21950, 21954, 21958, 21963, 21968, 21972, 21978, 21983, 21987, 21992,
- 21997, 22001, 22008, 22015, 22022, 22026, 22030, 22035, 22039, 22042,
- 22048, 22061, 22066, 22075, 22080, 9428, 22085, 22088, 2712, 2717, 22092,
- 22098, 22104, 7209, 22109, 22114, 22119, 22125, 22130, 13909, 22135,
- 22140, 22145, 22150, 22156, 22161, 22166, 22172, 22177, 22181, 22186,
- 22191, 22196, 22201, 22205, 22210, 22214, 22219, 22224, 22229, 22234,
- 22238, 22243, 22247, 22252, 22257, 22262, 22267, 2886, 22182, 22271,
- 22279, 22286, 9733, 22298, 22306, 22187, 22313, 22318, 22326, 22192,
- 22331, 22336, 22344, 22349, 22197, 22354, 22359, 22363, 22369, 22377,
- 22380, 22387, 22391, 22395, 22401, 22408, 22413, 8958, 1727, 1732, 22417,
- 22423, 22429, 22434, 22438, 22442, 22446, 22450, 22454, 22458, 22462,
- 22466, 22469, 22475, 22482, 22490, 22496, 22502, 22507, 22512, 22516,
- 13829, 13836, 22521, 22533, 22536, 22543, 16362, 22550, 22558, 22569,
- 22578, 22591, 22601, 22615, 22627, 22641, 22653, 22663, 22675, 22681,
- 22696, 22720, 22738, 22757, 22770, 22784, 22802, 22818, 22835, 22853,
- 22864, 22883, 22900, 22920, 22938, 22950, 22964, 22978, 22990, 23007,
- 23026, 23044, 23056, 23074, 23093, 14559, 23106, 23126, 23138, 10523,
- 23150, 23155, 23160, 23165, 23171, 23176, 23180, 23187, 2398, 23191,
- 23197, 23201, 23204, 23208, 23216, 23222, 22215, 23226, 23235, 23246,
- 23252, 23258, 23267, 23275, 23282, 23287, 23291, 23298, 23304, 23313,
- 23321, 23328, 23338, 23347, 23357, 23362, 23371, 23380, 23391, 23402,
- 3963, 23412, 23416, 23426, 23434, 23444, 23455, 23460, 23470, 23478,
- 23485, 23491, 23498, 23503, 22225, 23507, 23516, 23520, 23523, 23528,
- 23535, 23544, 23552, 23560, 23570, 23579, 23585, 23591, 22230, 22235,
- 23595, 23605, 23615, 23625, 23633, 23640, 23650, 23658, 23666, 23672,
- 23680, 930, 23689, 14750, 542, 23703, 23712, 23720, 23731, 23742, 23752,
- 23761, 23773, 23782, 23791, 23797, 23806, 23815, 23825, 23833, 23841,
- 9360, 23847, 23850, 23854, 23859, 23864, 9848, 22248, 22253, 23872,
- 23878, 23884, 23889, 23894, 23898, 23906, 23912, 23918, 23922, 3525,
- 23930, 23935, 23940, 23944, 23948, 9928, 23955, 23963, 23977, 23984,
- 23990, 9937, 9943, 23998, 24006, 24013, 24018, 24023, 22258, 24029,
- 24040, 24044, 24049, 2601, 24054, 24065, 24071, 24076, 24080, 24084,
- 24087, 24094, 24101, 24108, 24114, 24118, 22263, 24123, 24127, 24131,
- 1037, 24136, 24141, 24146, 24151, 24156, 24161, 24166, 24171, 24176,
- 24181, 24186, 24191, 24196, 24201, 24207, 24212, 24217, 24222, 24227,
- 24232, 24237, 24243, 24248, 24253, 24258, 24263, 24268, 24273, 24278,
- 24284, 24290, 24295, 24301, 24306, 24311, 5, 24317, 24321, 24325, 24329,
- 24334, 24338, 24342, 24346, 24350, 24355, 24359, 24364, 24368, 24371,
- 24375, 24380, 24384, 24389, 24393, 24397, 24401, 24406, 24410, 24414,
- 24424, 24429, 24433, 24437, 24442, 24447, 24456, 24461, 24466, 24470,
- 24474, 24487, 24499, 24508, 24517, 24523, 24528, 24532, 24536, 24546,
- 24555, 24563, 24569, 24574, 24578, 24585, 24595, 24604, 24612, 24620,
- 24627, 24635, 24644, 24653, 24661, 24666, 24670, 24674, 24677, 24679,
- 24683, 24687, 24692, 24697, 24701, 24705, 24708, 24712, 24715, 24719,
- 24722, 24725, 24729, 24735, 24739, 24743, 24747, 24752, 24757, 24762,
- 24766, 24769, 24774, 24780, 24785, 24791, 24796, 24800, 24804, 24808,
- 24813, 24817, 24822, 24826, 24830, 24837, 24841, 24844, 24848, 24854,
- 24860, 24864, 24868, 24873, 24880, 24886, 24890, 24899, 24903, 24907,
- 24910, 24916, 24921, 24927, 1489, 1791, 24932, 24937, 24942, 24947,
- 24952, 24957, 24962, 2148, 2194, 24967, 24970, 24974, 24978, 24983,
- 24987, 24991, 24994, 24999, 25004, 25008, 25011, 25016, 25020, 25025,
- 25029, 14762, 25034, 25037, 25040, 25044, 25049, 25053, 25066, 25070,
- 25073, 25081, 25090, 25097, 25102, 25108, 25114, 25122, 25129, 25136,
- 25140, 25144, 25148, 25153, 25158, 25162, 25170, 25175, 25187, 25198,
- 25203, 25207, 25211, 25217, 25222, 25227, 25231, 25235, 25238, 25244,
- 7915, 2316, 25248, 25253, 25269, 9475, 25289, 25298, 25314, 25318, 25321,
- 25327, 25337, 25343, 25352, 25367, 25379, 25390, 25398, 25407, 25413,
- 25422, 25432, 25443, 25454, 25463, 25470, 25479, 25487, 25494, 25502,
- 25509, 25516, 25529, 25536, 25542, 25547, 25556, 25562, 25567, 25575,
- 25582, 23436, 25594, 25606, 25620, 25628, 25635, 25647, 25656, 25665,
- 25673, 25681, 25689, 25696, 25705, 25713, 25723, 25732, 25742, 25751,
- 25760, 25768, 25773, 25777, 25780, 25784, 25788, 25792, 25796, 25800,
- 25806, 25812, 25820, 14807, 25827, 25832, 25839, 25845, 25852, 14815,
- 25859, 25862, 25874, 25882, 25888, 25893, 25897, 9878, 25908, 25918,
- 25927, 25934, 25938, 14820, 25941, 25948, 25952, 25958, 25961, 25968,
- 25974, 25981, 25987, 25991, 25996, 26000, 26009, 26016, 26022, 7956,
- 26029, 26037, 26044, 26050, 26055, 26061, 26067, 26075, 26079, 26082,
- 26084, 25785, 26093, 26099, 26109, 26114, 26121, 26127, 26132, 26137,
- 26142, 26146, 26151, 26158, 26167, 26171, 26178, 26187, 26193, 26198,
- 26204, 26209, 26216, 26227, 26232, 26236, 26246, 26252, 26256, 26261,
- 26271, 26280, 26284, 26291, 26299, 26306, 26312, 26317, 26325, 26332,
- 26344, 26353, 26357, 13053, 26365, 26375, 26379, 25077, 26390, 26395,
- 26399, 26406, 26413, 21974, 25710, 26418, 26422, 26425, 22870, 26430,
- 26444, 26460, 26478, 26497, 26514, 26532, 22889, 26549, 26569, 22906,
- 26581, 26593, 15745, 26605, 22926, 26619, 26631, 10536, 26645, 26650,
- 26655, 26660, 26666, 26672, 26678, 26682, 26689, 26694, 26704, 26710,
- 10183, 26716, 26718, 26723, 26731, 26735, 26154, 26741, 26748, 11524,
- 11534, 26755, 26765, 26770, 26774, 26777, 26783, 26791, 26803, 26813,
- 26829, 26842, 26856, 15763, 26870, 26877, 26881, 26884, 26889, 26893,
- 26900, 26907, 26917, 26922, 26927, 26932, 26940, 26948, 26957, 26962,
- 9572, 26966, 26969, 26972, 26977, 26984, 26989, 27005, 27013, 27021,
- 9423, 27029, 27034, 27038, 27044, 27050, 27053, 27059, 27071, 27079,
- 27086, 27092, 27099, 27110, 27124, 27137, 27146, 27155, 27167, 27178,
- 27188, 27197, 27206, 27214, 27225, 7938, 27232, 27238, 27243, 27249,
- 27256, 27266, 27276, 27285, 27291, 27298, 27303, 27310, 27318, 27326,
- 27338, 6246, 27345, 27354, 27362, 27368, 27374, 27379, 27383, 27386,
- 27392, 27399, 27404, 27409, 27413, 27425, 27436, 27445, 27453, 14947,
- 27458, 27464, 27470, 11517, 8635, 27475, 27479, 27483, 27486, 27489,
- 27495, 27503, 27511, 27515, 27519, 27524, 27527, 27536, 27540, 27548,
- 27559, 27563, 27569, 27575, 27579, 27585, 27593, 27615, 27639, 27646,
- 27653, 27659, 27667, 27673, 27678, 27689, 27707, 27714, 27722, 27726,
- 27735, 27748, 27756, 27768, 27779, 27789, 27803, 27812, 27820, 27832,
- 9492, 27843, 27854, 27866, 27876, 27885, 27890, 27894, 27902, 27912,
- 27917, 27921, 27924, 27927, 27935, 27943, 27952, 27962, 27971, 27977,
- 27991, 2663, 28013, 28024, 28033, 28043, 28055, 28064, 28073, 28083,
- 28091, 28099, 28108, 28113, 28124, 28129, 28140, 28144, 28154, 28163,
- 28171, 28181, 28191, 28199, 28208, 28215, 28223, 28230, 28239, 28243,
- 28251, 28258, 28266, 28273, 28284, 28299, 28306, 28312, 28322, 28331,
- 28337, 28341, 28348, 28352, 14031, 28358, 28362, 28367, 28374, 28378,
- 28382, 28390, 28398, 28404, 28413, 28420, 28425, 28430, 28440, 23505,
- 28444, 28447, 28452, 28457, 28462, 28467, 28472, 28477, 28482, 28487,
- 28493, 28498, 28503, 28509, 1218, 704, 28514, 28523, 2364, 28530, 28535,
- 28539, 28545, 1267, 546, 318, 28550, 28559, 28567, 28576, 28584, 28595,
- 28604, 28612, 28616, 28619, 28627, 28635, 28640, 14775, 28646, 28652,
- 28658, 5872, 28663, 28667, 28673, 28677, 28684, 1455, 28690, 28697, 9579,
- 28701, 28711, 28719, 28725, 28734, 28742, 28748, 28756, 28763, 11110,
- 28769, 28776, 28781, 28788, 1496, 2147, 28794, 28800, 28807, 28818,
- 28829, 28837, 28844, 28854, 28863, 28871, 28880, 28887, 28894, 28907,
- 28918, 1272, 28937, 28942, 28950, 3575, 28954, 28959, 28963, 1459, 24706,
- 28973, 28977, 28982, 28986, 3493, 28992, 29000, 29007, 29018, 29026,
- 29034, 3576, 279, 29039, 29047, 29055, 29062, 29068, 29073, 2216, 29080,
- 29086, 25992, 26222, 29092, 106, 29096, 29100, 29106, 615, 9328, 29111,
- 29118, 29124, 2327, 29128, 29132, 15187, 29135, 29140, 29147, 29153,
- 29158, 29166, 29173, 29179, 22351, 29183, 29187, 3646, 16625, 29191,
- 29196, 29199, 29207, 29215, 29220, 29223, 29230, 29240, 29252, 29257,
- 29261, 29269, 29276, 29282, 29289, 29296, 29299, 29303, 29307, 1463,
- 29317, 29319, 29324, 29330, 29336, 29341, 29346, 29351, 29356, 29361,
- 29366, 29371, 29376, 29381, 29386, 29391, 29396, 29401, 29406, 29412,
- 29418, 29424, 29430, 29435, 29440, 29445, 29451, 29456, 29461, 29466,
- 29472, 29477, 29483, 29488, 29493, 29498, 29503, 29509, 29514, 29520,
- 29525, 29530, 29535, 29540, 29546, 29551, 29557, 29562, 29567, 29572,
- 29577, 29582, 29587, 29592, 29597, 29602, 29608, 29614, 29620, 29625,
- 29630, 29635, 29640, 29646, 29652, 29658, 29664, 29670, 29676, 29681,
- 29687, 29692, 29697, 29702, 29707, 29713, 2443, 29718, 2450, 2457, 2754,
- 29723, 2463, 2473, 29729, 29733, 29738, 29743, 29749, 29754, 29759,
- 29763, 29768, 29774, 29779, 29784, 29789, 29795, 29800, 29804, 29808,
- 29813, 29818, 29823, 29828, 29833, 29839, 29845, 29850, 29854, 29859,
- 29865, 29869, 29874, 29879, 29884, 29889, 29893, 29896, 29901, 29906,
- 29911, 29916, 29921, 29927, 29933, 29938, 29943, 29947, 29952, 29957,
- 29962, 29967, 29972, 29976, 29981, 29986, 29991, 29995, 29999, 30003,
- 30008, 30016, 30021, 30027, 30033, 30039, 30044, 30048, 30051, 30056,
- 30061, 30065, 30070, 30074, 30079, 30083, 30086, 30091, 17302, 30096,
- 30101, 30106, 30114, 21280, 28694, 9026, 30119, 30124, 30128, 30133,
- 30137, 30141, 30146, 30150, 30153, 30156, 30160, 30165, 30169, 30177,
- 30181, 30184, 30189, 30193, 30197, 30202, 30207, 30211, 30217, 30222,
- 30227, 30234, 30241, 30245, 30248, 30254, 30263, 30270, 30278, 30285,
- 30289, 30294, 30298, 30302, 30308, 30314, 30318, 30324, 30329, 30334,
- 30338, 30345, 30351, 30357, 30363, 30369, 30376, 30382, 30388, 30394,
- 30400, 30406, 30412, 30418, 30425, 30431, 30438, 30444, 30450, 30456,
- 30462, 30468, 30474, 30480, 30486, 30492, 11418, 30498, 30503, 30508,
- 30511, 30519, 30524, 30533, 30539, 30544, 30549, 30554, 30558, 30563,
- 30568, 30573, 30578, 30583, 30590, 30597, 30603, 30609, 30614, 16303,
- 30621, 30627, 30634, 30640, 30646, 30651, 30659, 30664, 16082, 30668,
- 30673, 30678, 30684, 30689, 30694, 30698, 30703, 30708, 30714, 30719,
- 30724, 30728, 30733, 30738, 30742, 30747, 30752, 30757, 30761, 30766,
- 30771, 30776, 30780, 30784, 15293, 30788, 30797, 30803, 30809, 30818,
- 30826, 30835, 30843, 30848, 30852, 30859, 30865, 30869, 30872, 30877,
- 30886, 30894, 30899, 1495, 30905, 30908, 30912, 22424, 22430, 30918,
- 30922, 30933, 30944, 30955, 30967, 30974, 30981, 30986, 30990, 5909, 755,
- 21279, 30998, 31003, 31007, 31012, 31016, 31022, 31027, 31033, 31038,
- 31044, 31049, 31055, 31060, 31066, 31072, 31078, 31083, 31039, 31045,
- 31087, 31092, 31098, 31103, 31109, 31114, 31120, 31125, 31050, 10421,
- 31129, 31061, 31067, 31073, 2831, 3423, 31135, 31138, 31144, 31150,
- 31156, 31163, 31169, 31175, 31181, 31187, 31193, 31199, 31205, 31211,
- 31217, 31223, 31229, 31235, 31242, 31248, 31254, 31260, 31266, 31272,
- 31275, 31280, 31283, 31290, 31298, 31303, 31308, 31314, 31319, 31324,
- 31328, 31333, 31339, 31344, 31350, 31355, 31361, 31366, 31372, 31378,
- 31382, 31387, 31392, 31397, 31402, 31406, 31411, 31416, 31421, 31427,
- 31433, 31439, 31445, 31450, 31454, 31457, 31463, 31469, 31478, 31486,
- 31493, 31498, 31502, 31506, 31511, 15146, 31516, 31524, 31530, 3683,
- 1377, 31535, 31539, 8005, 31545, 31551, 31558, 8014, 31562, 31568, 31575,
- 31581, 31590, 31598, 31610, 31614, 31621, 31627, 31631, 31634, 31643,
- 31651, 31040, 31656, 31666, 31676, 31686, 31692, 31697, 31707, 31712,
- 31725, 31739, 31750, 31762, 31774, 31788, 31801, 31813, 31825, 14600,
- 31839, 31844, 31849, 31853, 31857, 31861, 1780, 27176, 31865, 31870,
- 31088, 31875, 31878, 31883, 31888, 31893, 31899, 31905, 10098, 31910,
- 31917, 15697, 31923, 31928, 31933, 31937, 31942, 31947, 31093, 31952,
- 31957, 31962, 31968, 31099, 31973, 31976, 31983, 31991, 31997, 32003,
- 32009, 32020, 32025, 32032, 32039, 32046, 32054, 32063, 32072, 32078,
- 32084, 32092, 31104, 32097, 32103, 32109, 31110, 32114, 32119, 32127,
- 32135, 32141, 32148, 32154, 32161, 32168, 32174, 32182, 32192, 32199,
- 32204, 32210, 32215, 32220, 32227, 32236, 32244, 32249, 32255, 32262,
- 32270, 32276, 32281, 32287, 32296, 27957, 32303, 32307, 32312, 32321,
- 32326, 32331, 32336, 12405, 32344, 32349, 32354, 32359, 32363, 32368,
- 32373, 32380, 32385, 32390, 32395, 31115, 21216, 32401, 2519, 244, 32404,
- 32407, 32411, 32415, 32425, 32433, 32437, 32444, 32451, 32455, 32458,
- 32464, 32472, 32480, 32484, 32488, 32491, 32498, 32502, 32506, 32513,
- 32521, 31051, 32528, 32536, 10158, 664, 308, 32548, 32553, 32558, 32564,
- 32569, 32574, 3704, 32579, 32582, 32587, 32592, 32597, 32602, 32607,
- 32614, 22529, 32619, 32624, 32629, 32634, 32639, 32645, 32650, 32656,
- 31286, 32662, 32667, 32673, 32679, 32689, 32694, 32699, 32703, 32708,
- 32713, 32718, 32723, 32736, 32741, 22302, 16705, 3710, 32745, 32750,
- 32755, 32761, 32766, 32771, 32775, 32780, 32785, 32791, 32796, 32801,
- 1382, 32805, 32810, 32815, 32820, 32824, 32829, 32834, 32839, 32845,
- 32851, 32856, 32860, 32864, 32869, 32874, 32879, 32883, 32891, 32895,
- 32901, 32905, 32912, 16498, 31062, 32918, 32925, 32933, 32940, 32946,
- 32959, 32971, 32977, 32981, 2773, 32985, 32989, 32493, 32998, 33009,
- 33014, 33019, 33024, 33028, 33033, 22435, 33037, 33041, 33046, 31068,
- 21300, 33050, 33055, 33061, 33066, 33070, 33074, 33077, 33081, 33087,
- 33098, 33110, 31074, 33115, 33118, 33122, 347, 33127, 33132, 33137,
- 33142, 33147, 33152, 33158, 33163, 33168, 33174, 33179, 33185, 33190,
- 33196, 33201, 33206, 33211, 33216, 33221, 33226, 33231, 33236, 33242,
- 33247, 33252, 33257, 33262, 33267, 33272, 33277, 33283, 33289, 33294,
- 33299, 33304, 33309, 33314, 33319, 33324, 33329, 33334, 33339, 33344,
- 33349, 33354, 33359, 33364, 33369, 33374, 33379, 33385, 313, 26, 33390,
- 33394, 33398, 33406, 33410, 33414, 33417, 33420, 33422, 33427, 33431,
- 33436, 33440, 33445, 33449, 33454, 33458, 33461, 33463, 33467, 33472,
- 33476, 33487, 33490, 33492, 33496, 33508, 33517, 33521, 33525, 33531,
- 33536, 33545, 33551, 33556, 33561, 33565, 33570, 33577, 33582, 33588,
- 33593, 33597, 33604, 25718, 25728, 33608, 33613, 33618, 33623, 33630,
- 33634, 33641, 8113, 33647, 33656, 33664, 33679, 33693, 33701, 33712,
- 33721, 33726, 7227, 33736, 33741, 33746, 33750, 33753, 33757, 33762,
- 33766, 33773, 33778, 33783, 8912, 33793, 33795, 33798, 33802, 33808,
- 33812, 33817, 33822, 33828, 33833, 33839, 33844, 33854, 33863, 33871,
- 33876, 33882, 33887, 33894, 33898, 33906, 33913, 33926, 33934, 33938,
- 33948, 33953, 33957, 33965, 33973, 33977, 33986, 33992, 33997, 34005,
- 34015, 34024, 34033, 34042, 34053, 34061, 34072, 34081, 34088, 34094,
- 34099, 34110, 34115, 34119, 34122, 34126, 34134, 34140, 34148, 34155,
- 34161, 34166, 34172, 2418, 34176, 34178, 34183, 34188, 34193, 34196,
- 34198, 34202, 34205, 34212, 34216, 9891, 34220, 34226, 34236, 34241,
- 34247, 34251, 34256, 34269, 26104, 34275, 34284, 17475, 34291, 34300,
- 31672, 34308, 34313, 34317, 34325, 34332, 34337, 34341, 34346, 34350,
- 34358, 34364, 34370, 34375, 34379, 34382, 34387, 34400, 34416, 22996,
- 34433, 34445, 34462, 34474, 34488, 23013, 23032, 34500, 34512, 2680,
- 34526, 34531, 34536, 34541, 34545, 34552, 34564, 34570, 34573, 34584,
- 34595, 34600, 32089, 695, 34604, 34608, 34612, 34615, 34620, 34625,
- 34631, 34636, 34641, 34647, 34653, 34658, 34662, 34667, 34672, 34677,
- 34681, 34684, 34690, 34695, 34700, 34705, 34709, 34714, 34720, 34728,
- 26337, 34733, 34738, 34745, 34751, 34757, 34762, 34770, 22538, 34777,
- 34782, 34787, 34792, 34796, 34799, 34804, 34808, 34812, 34819, 34825,
- 34831, 34837, 34844, 34849, 34855, 33968, 34859, 34863, 34868, 34881,
- 34886, 34892, 34900, 34907, 34915, 34925, 34931, 34937, 34943, 34947,
- 34956, 34964, 34971, 34976, 34981, 10444, 34986, 34994, 35001, 35007,
- 35017, 35022, 35028, 35036, 3608, 35043, 35050, 3614, 35054, 35059,
- 35070, 35077, 35083, 35092, 35096, 4015, 35099, 35106, 35112, 35118,
- 35126, 35136, 29063, 35143, 35151, 35156, 35162, 35167, 25964, 35173,
- 35180, 35186, 35195, 23677, 35202, 35207, 35211, 35219, 35227, 9607,
- 5895, 35234, 35238, 35240, 35244, 35249, 35251, 35257, 35262, 35267,
- 35274, 32610, 35280, 35285, 35289, 35294, 35298, 35307, 35311, 35317,
- 35324, 35330, 35337, 35342, 35351, 35356, 35360, 35365, 35372, 35380,
- 35388, 35393, 21356, 35397, 35400, 35404, 35408, 35412, 35415, 35417,
- 35425, 35429, 35436, 35440, 35444, 35452, 35459, 35469, 35473, 35477,
- 35485, 35493, 35499, 35504, 35513, 13357, 35519, 35528, 35533, 35540,
- 35548, 35556, 35564, 35571, 35578, 35585, 35592, 35599, 35604, 35610,
- 35627, 35635, 35645, 35653, 35660, 407, 35664, 35670, 35674, 35679,
- 33717, 35685, 35688, 35692, 35700, 3619, 35708, 35714, 35720, 35729,
- 35739, 35746, 35752, 3625, 3631, 35761, 35768, 35776, 35781, 35785,
- 35792, 35800, 35807, 35813, 35822, 35832, 35838, 35846, 35855, 35862,
- 35870, 35877, 22032, 35881, 35888, 35894, 35904, 35913, 35924, 35928,
- 35938, 35944, 35951, 35959, 35968, 35977, 35987, 35998, 36005, 36010,
- 36017, 3029, 36025, 36031, 36036, 36042, 36048, 36053, 36066, 36079,
- 36092, 36099, 36105, 36113, 36121, 36126, 36130, 1469, 36134, 36139,
- 36144, 36149, 36154, 36160, 36165, 36170, 36175, 36180, 36185, 36190,
- 36195, 36201, 36207, 36212, 36217, 36223, 36228, 36233, 36238, 36244,
- 36249, 36254, 36259, 36264, 36270, 36275, 36280, 36286, 36291, 36296,
- 36301, 36306, 36311, 36317, 36322, 36328, 36333, 36339, 36344, 36349,
- 36354, 36360, 36366, 36372, 36378, 36384, 36390, 36396, 36402, 36407,
- 36412, 36418, 36423, 36428, 36433, 36438, 36443, 36448, 36453, 36459,
- 36464, 36469, 36475, 36481, 101, 36486, 36488, 36492, 36496, 36500,
- 36505, 36509, 9528, 36513, 36519, 1741, 6280, 36525, 36528, 36533, 36537,
- 36542, 36546, 36550, 36555, 10245, 36559, 36563, 36567, 36571, 15385,
- 36576, 36580, 36585, 36590, 36595, 36599, 36606, 26128, 36612, 36615,
- 36619, 36624, 36630, 36634, 36642, 36648, 36653, 36657, 36663, 36667,
- 36671, 3462, 3467, 29255, 36674, 36678, 36682, 36686, 36690, 36698,
- 36705, 36709, 36716, 36721, 317, 36726, 36730, 36736, 36748, 36754,
- 36760, 36764, 36770, 36779, 36783, 36787, 36792, 36798, 36803, 36807,
- 36812, 36816, 36820, 36827, 36833, 36838, 36853, 36868, 36883, 36899,
- 36917, 10195, 36931, 36938, 36942, 36945, 36954, 36959, 36963, 36971,
- 33919, 36979, 36983, 36993, 37004, 29225, 37017, 37021, 37030, 37038,
- 9785, 14913, 37042, 22447, 37045, 30173, 37050, 9784, 37055, 37061,
- 37066, 37072, 37077, 37083, 37088, 37094, 37099, 37105, 37111, 37117,
- 37122, 37078, 37084, 37089, 37095, 37100, 37106, 37112, 8126, 3874,
- 37126, 37134, 37138, 37141, 37145, 37150, 37155, 37161, 37167, 37172,
- 37176, 25976, 37180, 37184, 37190, 37194, 9049, 37203, 37210, 37214,
- 11875, 37221, 37227, 37232, 37239, 37246, 37253, 28571, 8049, 37260,
- 37267, 37274, 37280, 37285, 37292, 37303, 37309, 37314, 37319, 37324,
- 37331, 37079, 37335, 37345, 37356, 37362, 37367, 37372, 37377, 37382,
- 37387, 37391, 37395, 37401, 37409, 2319, 865, 10261, 10273, 10278, 10284,
- 37418, 10289, 10294, 10300, 37423, 37433, 37437, 10305, 37442, 16903,
- 37445, 37450, 37454, 37459, 37464, 37471, 37478, 37482, 37485, 37493,
- 10208, 37500, 37503, 37509, 37519, 5929, 37528, 37532, 37540, 37544,
- 37554, 37560, 37571, 37577, 37583, 37588, 37594, 37600, 37606, 37611,
- 37614, 37621, 37627, 37632, 37639, 37646, 37650, 37660, 37673, 37682,
- 37691, 37702, 37715, 37726, 37735, 37746, 37751, 37760, 37765, 10310,
- 37771, 37778, 37786, 37791, 37795, 37802, 37809, 3829, 16, 37813, 37818,
- 16757, 37822, 37825, 37828, 28077, 37832, 28580, 37840, 37844, 37848,
- 37851, 37857, 37101, 37863, 37871, 37877, 37884, 28060, 37888, 28254,
- 37892, 37901, 37907, 37913, 37918, 37922, 37928, 37932, 37940, 37948,
- 26194, 37954, 37961, 37967, 37972, 37977, 37981, 37987, 37992, 37998,
- 4056, 791, 38005, 38009, 38012, 15275, 38024, 35851, 38035, 38038, 38045,
- 38049, 38055, 38059, 38065, 38070, 38076, 38081, 38086, 38090, 38094,
- 38099, 38104, 38114, 38120, 38133, 38139, 38145, 38152, 38157, 38163,
- 38168, 16643, 1472, 1019, 31218, 31224, 38173, 31230, 31243, 31249,
- 31255, 38179, 31261, 31267, 38185, 38191, 22, 38199, 38206, 38210, 38214,
- 38222, 31978, 38226, 38230, 38237, 38242, 38246, 38251, 38257, 38262,
- 38268, 38273, 38277, 38281, 38285, 38290, 38294, 38299, 38303, 38310,
- 38315, 38319, 38324, 38328, 38333, 38337, 38342, 38348, 15495, 15500,
- 38353, 38357, 38360, 38364, 21183, 38369, 38373, 38379, 38386, 38391,
- 38401, 38406, 38414, 38418, 38421, 31993, 38425, 4109, 38430, 38435,
- 38439, 38444, 38448, 38453, 13375, 38464, 38468, 38471, 38476, 38480,
- 38484, 38487, 38491, 8145, 13391, 38494, 38497, 38503, 38508, 38514,
- 38519, 38525, 38530, 38536, 38541, 38547, 38553, 38559, 38564, 38568,
- 38572, 38581, 38597, 38613, 38623, 27967, 38630, 38634, 38639, 38644,
- 38648, 38652, 35972, 38658, 38663, 38667, 38674, 38679, 38683, 38687,
- 26996, 38693, 21451, 38698, 38705, 38713, 38719, 38726, 38734, 38740,
- 38744, 38750, 38758, 38762, 38771, 9509, 38779, 38783, 38791, 38798,
- 38803, 38808, 38812, 38815, 38819, 38822, 38826, 38833, 38838, 38844,
- 26415, 31281, 38848, 38855, 38861, 38867, 38872, 38875, 38877, 38884,
- 38891, 38897, 38901, 38904, 38908, 38912, 38916, 38921, 38925, 38929,
- 38932, 38936, 38950, 23062, 38969, 38982, 38995, 39008, 23080, 39023,
- 10497, 39038, 39044, 39048, 39052, 39059, 39064, 39068, 39075, 39081,
- 39086, 39092, 39102, 39114, 39125, 39130, 39137, 39141, 39145, 39148,
- 15891, 3677, 39156, 15522, 39169, 39176, 39180, 39184, 39189, 39194,
- 39200, 39204, 39208, 39211, 7742, 15533, 39216, 39220, 39226, 39235,
- 39240, 39247, 35828, 39253, 39258, 39262, 39267, 39274, 39278, 39281,
- 39285, 39290, 14565, 39297, 39304, 1077, 39308, 39313, 39318, 39324,
- 39329, 39334, 39338, 39348, 39353, 39359, 39364, 39370, 39375, 39381,
- 39391, 39396, 39401, 39405, 7229, 7241, 39410, 39413, 39420, 39426,
- 34084, 34091, 39435, 39439, 32041, 39447, 39458, 39466, 36020, 39473,
- 39478, 39483, 39494, 39501, 39512, 32065, 21457, 39520, 735, 39525,
- 39531, 28051, 39537, 39542, 39552, 39561, 39568, 39574, 39578, 39581,
- 39588, 39594, 39601, 39607, 39617, 39625, 39631, 39637, 39642, 39646,
- 39653, 39659, 39666, 38917, 535, 13818, 39672, 39677, 39680, 39686,
- 39694, 1396, 39699, 39703, 39708, 39715, 39721, 39725, 39729, 39734,
- 39743, 39750, 39760, 39766, 28095, 39783, 39792, 39800, 39806, 39811,
- 39818, 39824, 39832, 39841, 39849, 39853, 39858, 39866, 32074, 39872,
- 39891, 15824, 39905, 39921, 39935, 39941, 39946, 39951, 39956, 39962,
- 32080, 39967, 39974, 39979, 39983, 345, 2936, 39990, 39995, 40000, 27322,
- 39821, 40004, 40009, 40017, 40021, 40024, 40030, 40036, 40040, 28150,
- 40043, 40048, 40052, 40055, 40060, 40064, 40069, 40074, 40078, 40083,
- 40087, 40091, 21179, 21190, 40095, 40100, 40106, 26953, 40111, 40115,
- 21266, 16072, 40118, 40123, 40128, 40133, 40138, 40143, 40148, 40153,
- 450, 49, 31299, 31304, 31309, 31315, 31320, 31325, 40158, 31329, 40162,
- 40166, 40170, 31334, 31340, 40184, 31351, 31356, 40192, 40197, 31362,
- 40202, 40207, 40212, 40217, 40223, 40229, 40235, 31379, 40248, 40254,
- 31383, 40258, 31388, 40263, 31393, 31398, 40266, 40271, 40275, 30948,
- 40281, 13599, 40288, 40293, 31403, 40297, 40302, 40307, 40312, 40316,
- 40321, 40326, 40332, 40337, 40342, 40348, 40354, 40359, 40363, 40368,
- 40373, 40378, 40382, 40387, 40392, 40397, 40403, 40409, 40415, 40420,
- 40424, 40429, 40433, 31407, 31412, 31417, 40437, 40441, 40445, 31422,
- 31428, 31434, 31446, 40457, 26013, 40461, 40465, 40470, 40475, 40480,
- 40485, 40489, 40493, 40503, 40508, 40513, 40517, 40521, 40524, 40532,
- 31494, 40537, 1479, 40543, 40551, 40560, 40564, 40568, 40576, 40582,
- 40590, 40606, 40610, 40614, 40619, 40634, 31531, 1749, 12055, 40638,
- 1378, 40650, 40651, 40659, 40666, 40671, 40678, 40683, 9379, 1119, 10332,
- 40690, 40695, 40698, 40701, 40710, 1286, 40715, 39065, 40722, 40727,
- 40731, 22503, 2557, 40739, 10741, 40749, 40755, 2337, 2347, 40764, 40773,
- 40783, 40794, 3293, 34237, 10384, 3807, 16681, 1291, 40799, 40807, 40814,
- 40819, 40823, 40827, 23875, 10411, 40835, 40844, 40853, 40861, 40868,
- 40879, 40884, 40897, 40910, 40922, 40934, 40946, 40959, 40970, 40981,
- 40991, 40999, 41007, 41019, 41031, 41042, 41051, 41059, 41066, 41078,
- 41085, 41094, 41101, 41114, 41119, 41129, 41134, 41140, 41145, 37211,
- 41149, 41156, 41160, 41167, 41175, 2518, 41182, 41193, 41203, 41212,
- 41220, 41230, 41238, 41248, 41257, 41262, 41268, 41274, 3709, 41285,
- 41295, 41304, 41313, 41323, 41331, 41340, 41345, 41350, 41355, 1705, 37,
- 41363, 41371, 41382, 41393, 16356, 41403, 41407, 41414, 41420, 41425,
- 41429, 41440, 41450, 41459, 41470, 16730, 16735, 41475, 41484, 41489,
- 41499, 41504, 41512, 41520, 41527, 41533, 7078, 228, 41537, 41543, 41548,
- 41551, 2117, 39181, 41559, 41563, 41566, 1512, 41572, 13980, 1296, 41577,
- 41590, 41604, 2643, 41622, 41634, 41646, 2657, 2674, 41660, 41673, 2689,
- 41687, 41699, 2704, 41713, 1302, 1308, 1314, 10659, 41718, 41723, 41728,
- 41732, 41747, 41762, 41777, 41792, 41807, 41822, 41837, 41852, 41867,
- 41882, 41897, 41912, 41927, 41942, 41957, 41972, 41987, 42002, 42017,
- 42032, 42047, 42062, 42077, 42092, 42107, 42122, 42137, 42152, 42167,
- 42182, 42197, 42212, 42227, 42242, 42257, 42272, 42287, 42302, 42317,
- 42332, 42347, 42362, 42377, 42392, 42407, 42422, 42437, 42452, 42467,
- 42482, 42497, 42512, 42527, 42542, 42557, 42572, 42587, 42602, 42617,
- 42632, 42647, 42662, 42677, 42692, 42707, 42722, 42737, 42752, 42767,
- 42782, 42797, 42812, 42827, 42842, 42857, 42872, 42887, 42902, 42917,
- 42932, 42947, 42962, 42977, 42992, 43007, 43022, 43037, 43052, 43067,
- 43082, 43097, 43112, 43127, 43142, 43157, 43172, 43187, 43202, 43217,
- 43232, 43247, 43262, 43277, 43292, 43307, 43322, 43337, 43352, 43367,
- 43382, 43397, 43412, 43427, 43442, 43457, 43472, 43487, 43502, 43517,
- 43532, 43547, 43562, 43577, 43592, 43607, 43622, 43637, 43652, 43667,
- 43682, 43697, 43712, 43727, 43742, 43757, 43772, 43787, 43802, 43817,
- 43832, 43847, 43862, 43877, 43892, 43907, 43922, 43937, 43952, 43967,
- 43982, 43997, 44012, 44027, 44042, 44057, 44072, 44087, 44102, 44117,
- 44132, 44147, 44162, 44177, 44192, 44207, 44222, 44237, 44252, 44267,
- 44282, 44297, 44312, 44327, 44342, 44357, 44372, 44387, 44402, 44417,
- 44432, 44447, 44462, 44477, 44492, 44507, 44522, 44537, 44552, 44567,
- 44582, 44597, 44612, 44627, 44642, 44657, 44672, 44687, 44702, 44717,
- 44732, 44747, 44762, 44777, 44792, 44807, 44822, 44837, 44852, 44867,
- 44882, 44897, 44912, 44927, 44942, 44957, 44972, 44987, 45002, 45017,
- 45032, 45047, 45062, 45077, 45092, 45107, 45122, 45137, 45152, 45167,
- 45182, 45197, 45212, 45227, 45242, 45257, 45272, 45287, 45302, 45317,
- 45332, 45347, 45362, 45377, 45392, 45407, 45422, 45437, 45452, 45467,
- 45482, 45497, 45512, 45527, 45542, 45557, 45572, 45587, 45602, 45617,
- 45632, 45647, 45662, 45677, 45692, 45707, 45722, 45737, 45752, 45767,
- 45782, 45797, 45812, 45827, 45842, 45857, 45872, 45887, 45902, 45917,
- 45932, 45947, 45962, 45977, 45992, 46007, 46022, 46037, 46052, 46067,
- 46082, 46097, 46112, 46127, 46142, 46157, 46172, 46187, 46202, 46217,
- 46232, 46247, 46262, 46277, 46292, 46307, 46322, 46337, 46352, 46367,
- 46382, 46397, 46412, 46427, 46442, 46457, 46472, 46487, 46502, 46517,
- 46532, 46547, 46562, 46577, 46592, 46607, 46622, 46637, 46652, 46667,
- 46682, 46697, 46712, 46727, 46742, 46757, 46772, 46787, 46802, 46817,
- 46832, 46847, 46862, 46877, 46892, 46907, 46922, 46937, 46952, 46967,
- 46982, 46997, 47012, 47027, 47042, 47057, 47072, 47087, 47102, 47117,
- 47132, 47147, 47162, 47177, 47192, 47207, 47222, 47237, 47252, 47267,
- 47282, 47297, 47312, 47327, 47342, 47357, 47372, 47387, 47402, 47417,
- 47432, 47447, 47462, 47477, 47492, 47507, 47522, 47537, 47552, 47567,
- 47582, 47597, 47612, 47627, 47642, 47657, 47672, 47687, 47702, 47717,
- 47732, 47747, 47762, 47777, 47792, 47807, 47822, 47837, 47852, 47867,
- 47882, 47897, 47912, 47927, 47942, 47957, 47972, 47987, 48002, 48017,
- 48032, 48047, 48062, 48077, 48092, 48107, 48122, 48137, 48152, 48167,
- 48182, 48197, 48212, 48227, 48242, 48257, 48272, 48287, 48302, 48317,
- 48332, 48347, 48362, 48377, 48392, 48407, 48422, 48437, 48452, 48467,
- 48482, 48497, 48512, 48527, 48542, 48557, 48572, 48587, 48602, 48617,
- 48632, 48647, 48662, 48677, 48692, 48707, 48722, 48737, 48752, 48767,
- 48782, 48797, 48812, 48827, 48842, 48857, 48872, 48887, 48902, 48917,
- 48932, 48947, 48962, 48977, 48992, 49007, 49022, 49037, 49052, 49067,
- 49082, 49097, 49112, 49127, 49142, 49157, 49172, 49187, 49202, 49217,
- 49232, 49247, 49262, 49277, 49292, 49307, 49322, 49337, 49352, 49367,
- 49382, 49397, 49412, 49427, 49442, 49457, 49472, 49487, 49502, 49517,
- 49532, 49548, 49564, 49580, 49596, 49612, 49628, 49644, 49660, 49676,
- 49692, 49708, 49724, 49740, 49756, 49772, 49788, 49804, 49820, 49836,
- 49852, 49868, 49884, 49900, 49916, 49932, 49948, 49964, 49980, 49996,
- 50012, 50028, 50044, 50060, 50076, 50092, 50108, 50124, 50140, 50156,
- 50172, 50188, 50204, 50220, 50236, 50252, 50268, 50284, 50300, 50316,
- 50332, 50348, 50364, 50380, 50396, 50412, 50428, 50444, 50460, 50476,
- 50492, 50508, 50524, 50540, 50556, 50572, 50588, 50604, 50620, 50636,
- 50652, 50668, 50684, 50700, 50716, 50732, 50748, 50764, 50780, 50796,
- 50812, 50828, 50844, 50860, 50876, 50892, 50908, 50924, 50940, 50956,
- 50972, 50988, 51004, 51020, 51036, 51052, 51068, 51084, 51100, 51116,
- 51132, 51148, 51164, 51180, 51196, 51212, 51228, 51244, 51260, 51276,
- 51292, 51308, 51324, 51340, 51356, 51372, 51388, 51404, 51420, 51436,
- 51452, 51468, 51484, 51500, 51516, 51532, 51548, 51564, 51580, 51596,
- 51612, 51628, 51644, 51660, 51676, 51692, 51708, 51724, 51740, 51756,
- 51772, 51788, 51804, 51820, 51836, 51852, 51868, 51884, 51900, 51916,
- 51932, 51948, 51964, 51980, 51996, 52012, 52028, 52044, 52060, 52076,
- 52092, 52108, 52124, 52140, 52156, 52172, 52188, 52204, 52220, 52236,
- 52252, 52268, 52284, 52300, 52316, 52332, 52348, 52364, 52380, 52396,
- 52412, 52428, 52444, 52460, 52476, 52492, 52508, 52524, 52540, 52556,
- 52572, 52588, 52604, 52620, 52636, 52652, 52668, 52684, 52700, 52716,
- 52732, 52748, 52764, 52780, 52796, 52812, 52828, 52844, 52860, 52876,
- 52892, 52908, 52924, 52940, 52956, 52972, 52988, 53004, 53020, 53036,
- 53052, 53068, 53084, 53100, 53116, 53132, 53148, 53164, 53180, 53196,
- 53212, 53228, 53244, 53260, 53276, 53292, 53308, 53324, 53340, 53356,
- 53372, 53388, 53404, 53420, 53436, 53452, 53468, 53484, 53500, 53516,
- 53532, 53548, 53564, 53580, 53596, 53612, 53628, 53644, 53660, 53676,
- 53692, 53708, 53724, 53740, 53756, 53772, 53788, 53804, 53820, 53836,
- 53852, 53868, 53884, 53900, 53916, 53932, 53948, 53964, 53980, 53996,
- 54012, 54028, 54044, 54060, 54076, 54092, 54108, 54124, 54140, 54156,
- 54172, 54188, 54204, 54220, 54236, 54252, 54268, 54284, 54300, 54316,
- 54332, 54348, 54364, 54380, 54396, 54412, 54428, 54444, 54460, 54476,
- 54492, 54508, 54524, 54540, 54556, 54572, 54588, 54604, 54620, 54636,
- 54652, 54668, 54684, 54700, 54716, 54732, 54748, 54764, 54780, 54796,
- 54812, 54828, 54844, 54860, 54876, 54892, 54908, 54924, 54940, 54956,
- 54972, 54988, 55004, 55020, 55036, 55052, 55068, 55084, 55100, 55116,
- 55132, 55148, 55164, 55180, 55196, 55212, 55228, 55244, 55260, 55276,
- 55292, 55308, 55324, 55340, 55356, 55372, 55388, 55404, 55420, 55436,
- 55452, 55468, 55484, 55500, 55516, 55532, 55548, 55564, 55580, 55596,
- 55612, 55628, 55644, 55660, 55676, 55692, 55708, 55724, 55740, 55756,
- 55772, 55788, 55804, 55820, 55836, 55852, 55868, 55884, 55900, 55916,
- 55932, 55948, 55964, 55980, 55996, 56012, 56028, 56044, 56060, 56076,
- 56092, 56108, 56124, 56140, 56156, 56172, 56188, 56204, 56220, 56236,
- 56252, 56268, 56284, 56300, 56316, 56332, 56348, 56364, 56380, 56396,
- 56412, 56428, 56444, 56460, 56476, 56492, 56508, 56524, 56540, 56556,
- 56572, 56588, 56604, 56620, 56636, 56652, 56668, 56684, 56700, 56716,
- 56732, 56748, 56764, 56780, 56796, 56812, 56828, 56844, 56860, 56876,
- 56892, 56908, 56924, 56940, 56956, 56972, 56988, 57004, 57020, 57036,
- 57052, 57068, 57084, 57100, 57116, 57132, 57148, 57164, 57180, 57196,
- 57212, 57228, 57244, 57260, 57276, 57292, 57308, 57324, 57340, 57356,
- 57372, 57388, 57404, 57420, 57436, 57452, 57468, 57484, 57500, 57516,
- 57532, 57548, 57564, 57580, 57596, 57612, 57628, 57644, 57660, 57676,
- 57692, 57708, 57724, 57740, 57756, 57772, 57788, 57804, 57820, 57836,
- 57852, 57868, 57884, 57900, 57916, 57932, 57948, 57964, 57980, 57996,
- 58012, 58028, 58044, 58060, 58076, 58092, 58108, 58124, 58140, 58156,
- 58172, 58188, 58204, 58219, 16762, 58228, 58234, 58240, 58250, 58258,
- 14894, 15445, 9960, 58271, 1520, 58279, 3761, 27432, 7183, 58285, 58290,
- 58295, 58300, 58305, 58311, 58316, 58322, 58327, 58333, 58338, 58343,
- 58348, 58353, 58359, 58364, 58369, 58374, 58379, 58384, 58389, 58394,
- 58400, 58405, 58411, 58418, 2561, 58423, 58429, 8526, 58433, 58438,
- 58445, 58453, 40, 58457, 58463, 58468, 58473, 58477, 58482, 58486, 58490,
- 10684, 58494, 58504, 58517, 58528, 58541, 58548, 58554, 58559, 58565,
- 58571, 58577, 58582, 58587, 58592, 58597, 58601, 58606, 58611, 58616,
- 58622, 58628, 58634, 58639, 58643, 58648, 58653, 58657, 58662, 58667,
- 58672, 58676, 10700, 10711, 10716, 1563, 58680, 1568, 58686, 16239,
- 58689, 58695, 1599, 58701, 1605, 1611, 10746, 58706, 58714, 58721, 58725,
- 58731, 58736, 30977, 58741, 58748, 58753, 58757, 58761, 1616, 16331,
- 58770, 58774, 16342, 1125, 58778, 58785, 58790, 58794, 16367, 1620,
- 37350, 58797, 58802, 58812, 58821, 58826, 58830, 58836, 1625, 39259,
- 58841, 58850, 58856, 58861, 10904, 10910, 58867, 58879, 58896, 58913,
- 58930, 58947, 58964, 58981, 58998, 59015, 59032, 59049, 59066, 59083,
- 59100, 59117, 59134, 59151, 59168, 59185, 59202, 59219, 59236, 59253,
- 59270, 59287, 59304, 59321, 59338, 59355, 59372, 59389, 59406, 59423,
- 59440, 59457, 59474, 59491, 59508, 59525, 59542, 59559, 59576, 59593,
- 59610, 59627, 59644, 59661, 59678, 59695, 59712, 59723, 59728, 1630,
- 59732, 59738, 59743, 59748, 9326, 1635, 59754, 59763, 27731, 59768,
- 59779, 59789, 59794, 59801, 59807, 59812, 59817, 16619, 59821, 10921,
- 1640, 10926, 59827, 59832, 59838, 59843, 59848, 59853, 59858, 59863,
- 59868, 59873, 59879, 59885, 59891, 59896, 59900, 59905, 59910, 59914,
- 59919, 59924, 59929, 59933, 59938, 59944, 59949, 59954, 59958, 59963,
- 59968, 59974, 59979, 59984, 59990, 59996, 60001, 60005, 60010, 60015,
- 60020, 60024, 60029, 60034, 60039, 60045, 60051, 60056, 60060, 60064,
- 60069, 60074, 60079, 29129, 60083, 60088, 60093, 60099, 60104, 60109,
- 60113, 60118, 60123, 60129, 60134, 60139, 60145, 60151, 60156, 60160,
- 60165, 60170, 60174, 60179, 60184, 60189, 60195, 60201, 60206, 60210,
- 60215, 60220, 60224, 60229, 60234, 60239, 60243, 60246, 31639, 60251,
- 60259, 16685, 3663, 11017, 60265, 60275, 60290, 11022, 60301, 60306,
- 60317, 60329, 60341, 60353, 2695, 60365, 60370, 60382, 60386, 60392,
- 60398, 60403, 1652, 1078, 60412, 60417, 39309, 60421, 60425, 60430,
- 60434, 16770, 60439, 60442, 60450, 60458, 1656, 11047, 11053, 1661,
- 60466, 60473, 60478, 60487, 60497, 60504, 60509, 60514, 1666, 60521,
- 60526, 16885, 60530, 60535, 60542, 60548, 60552, 60563, 60573, 16907,
- 9234, 9241, 1671, 60580, 60586, 60594, 60601, 60607, 60614, 60626, 60632,
- 60637, 60649, 60660, 60669, 60679, 3740, 30813, 30822, 16947, 1676, 1680,
- 60687, 60698, 60703, 1683, 60711, 60716, 16998, 60728, 60734, 60739,
- 60747, 1688, 60752, 60757, 60765, 60773, 60780, 60789, 60797, 60806,
- 1693, 60810, 1698, 60815, 60822, 17072, 60830, 60836, 60841, 60849,
- 60856, 60864, 22574, 60869, 11182, 60878, 60884, 60891, 60898, 60904,
- 60914, 60920, 60925, 60936, 60941, 60949, 11191, 11196, 60957, 60963,
- 60971, 3805, 17114, 39397, 60976, 60982, 60987, 60995, 61002, 12036,
- 61007, 61013, 1709, 61018, 61021, 1132, 61027, 61032, 61037, 61043,
- 61048, 61053, 61058, 61063, 61068, 61073, 1718, 9, 61079, 61083, 61088,
- 61092, 61096, 61100, 31879, 61105, 61110, 61115, 61119, 61122, 61126,
- 61130, 61135, 61139, 61144, 61148, 34616, 34621, 34626, 61151, 61158,
- 61164, 39118, 61174, 34632, 32137, 31894, 31900, 34648, 31906, 61179,
- 61184, 32170, 61188, 61191, 61195, 61202, 61205, 61210, 61214, 61218,
- 61221, 61231, 61243, 61250, 61256, 61263, 33573, 61266, 8543, 877, 61269,
- 61273, 61278, 3690, 61282, 61285, 13632, 61292, 61299, 61312, 61320,
- 61329, 61338, 61343, 61353, 61366, 61378, 61385, 61390, 61399, 61412,
- 36060, 61430, 61435, 61442, 61448, 656, 61453, 61461, 61468, 27271, 627,
- 61474, 61480, 61490, 61496, 61501, 31924, 6003, 31938, 61505, 61515,
- 61520, 61530, 61545, 61551, 61557, 31948, 61562, 31094, 61566, 61571,
- 61576, 61580, 61585, 16950, 61592, 61597, 61601, 6044, 31974, 61605,
- 61611, 312, 61621, 61628, 61635, 61640, 61649, 58806, 61655, 61663,
- 61667, 61671, 61675, 61679, 61684, 61688, 61694, 61702, 61707, 61712,
- 61716, 61721, 61725, 61729, 61735, 61741, 61746, 61750, 32098, 61755,
- 32104, 32110, 61760, 61766, 61773, 61778, 61782, 31111, 16612, 61785,
- 61789, 61794, 61801, 61807, 61811, 61816, 38828, 61822, 61826, 61830,
- 61835, 61841, 61847, 61859, 61868, 61878, 61884, 61891, 61896, 61901,
- 61905, 61908, 61914, 61921, 61926, 61931, 61938, 61945, 61951, 61956,
- 61961, 61969, 32115, 2423, 61974, 61979, 61985, 61990, 61996, 62001,
- 62006, 62011, 62017, 32136, 62022, 62028, 62034, 62040, 32200, 62045,
- 62050, 62055, 32211, 62060, 62065, 62070, 62076, 62082, 32216, 62087,
- 62092, 62097, 32271, 32277, 62102, 62107, 32282, 62112, 27958, 32304,
- 32308, 62117, 62093, 62121, 62129, 62135, 62143, 62150, 62156, 62166,
- 62172, 62179, 10631, 32322, 62185, 62198, 62207, 62213, 62222, 62228,
- 23512, 62235, 62242, 62252, 32272, 62255, 62262, 62267, 62271, 62275,
- 62280, 6120, 62284, 62289, 62294, 34710, 34715, 62298, 34729, 62303,
- 34734, 62308, 62314, 34746, 34752, 34758, 62319, 62325, 22539, 62336,
- 62339, 62351, 62359, 32345, 62363, 62372, 62382, 62391, 32355, 62396,
- 62403, 62412, 62418, 62426, 62433, 6095, 4397, 62438, 32283, 62444,
- 62447, 62453, 62460, 62465, 62470, 23422, 62474, 62480, 62486, 62491,
- 62496, 62500, 62506, 62512, 33483, 863, 35723, 36644, 36650, 32391,
- 62517, 62521, 62525, 62528, 62541, 62547, 62551, 62554, 62559, 33786,
- 62563, 31116, 21287, 62569, 6024, 6032, 9075, 62572, 62577, 62582, 62587,
- 62592, 62597, 62602, 62607, 62612, 62617, 62623, 62628, 62633, 62639,
- 62644, 62649, 62654, 62659, 62664, 62669, 62675, 62680, 62686, 62691,
- 62696, 62701, 62706, 62711, 62716, 62721, 62726, 62731, 62736, 62742,
- 62747, 62752, 62757, 62762, 62767, 62772, 62778, 62783, 62788, 62793,
- 62798, 62803, 62808, 62813, 62818, 62823, 62829, 62834, 62839, 62844,
- 62849, 62855, 62861, 62866, 62872, 62877, 62882, 62887, 62892, 62897,
- 1513, 245, 62902, 62906, 62910, 62914, 25133, 62918, 62922, 62927, 62931,
- 62936, 62940, 62945, 62950, 62955, 62959, 62963, 62968, 62972, 13369,
- 62977, 62981, 62988, 62998, 15206, 63007, 63016, 63020, 63025, 63030,
- 63034, 24924, 3019, 63038, 63044, 17363, 63048, 63057, 63065, 63071,
- 63083, 63095, 63099, 63104, 63108, 63114, 63120, 63125, 63135, 63145,
- 63151, 63156, 63160, 63165, 63171, 63180, 63189, 63197, 15560, 63201,
- 63210, 63218, 63230, 63241, 63252, 63261, 63265, 63274, 63284, 63292,
- 63298, 63303, 63309, 63314, 98, 30925, 63325, 26266, 26276, 63331, 63338,
- 63344, 63348, 63358, 63369, 63377, 63386, 63391, 63396, 63400, 17317,
- 63408, 63412, 63418, 63428, 63435, 63441, 34809, 63447, 63449, 63452,
- 63456, 63466, 63472, 63479, 13315, 63486, 63492, 63501, 63510, 63516,
- 63522, 63528, 63533, 63540, 63547, 63553, 63566, 63575, 63584, 63589,
- 63593, 63599, 63606, 63613, 63620, 63627, 63634, 63639, 63643, 63647,
- 63650, 63660, 63664, 63676, 63685, 63689, 63694, 63698, 63704, 63709,
- 63716, 63725, 63733, 63741, 63746, 63750, 63755, 63760, 63770, 63778,
- 63783, 63787, 63791, 63797, 63809, 63817, 63827, 63834, 63840, 63845,
- 63849, 63853, 63857, 63866, 63875, 63884, 63890, 63896, 63902, 63907,
- 63914, 63920, 63928, 63935, 12463, 63941, 63947, 63951, 14244, 63955,
- 63960, 63970, 63979, 63985, 63991, 63999, 64006, 64010, 64014, 64020,
- 64028, 64035, 64041, 64052, 64056, 64060, 64064, 64067, 64073, 64078,
- 64082, 64086, 64095, 64103, 64110, 64116, 64123, 24046, 38870, 64128,
- 64136, 64140, 64144, 64147, 64155, 64162, 64168, 64177, 64185, 64191,
- 64196, 64200, 64205, 64209, 64213, 64218, 64227, 64231, 64238, 64245,
- 64251, 64259, 64265, 64276, 64284, 64290, 22669, 64299, 64306, 64313,
- 64320, 64327, 64334, 41907, 13153, 64341, 64348, 64353, 34845, 6217,
- 64359, 64364, 64369, 64375, 64381, 64387, 64392, 64397, 64402, 64407,
- 64413, 64418, 64424, 64429, 64435, 64440, 64445, 64450, 64455, 64460,
- 64465, 64470, 64476, 64481, 64487, 64492, 64497, 64502, 64507, 64512,
- 64517, 64523, 64528, 64533, 64538, 64543, 64548, 64553, 64558, 64563,
- 64568, 64573, 64579, 64584, 64589, 64594, 64599, 64604, 64609, 64614,
- 64619, 64625, 64630, 64635, 64640, 64645, 64650, 64655, 64660, 64665,
- 64670, 64675, 64680, 64685, 64691, 1834, 224, 37446, 64696, 64699, 64704,
- 64708, 64711, 64716, 63737, 64727, 64737, 64744, 64760, 64769, 64779,
- 64789, 64797, 64811, 64819, 64823, 64826, 64833, 64839, 64850, 64862,
- 64873, 64882, 64889, 1297, 23311, 64899, 2590, 64903, 64912, 1138, 17290,
- 38083, 64920, 64928, 64942, 64955, 64959, 64964, 64969, 64974, 64980,
- 64986, 64991, 8535, 64996, 65000, 65008, 11048, 65013, 65019, 65028,
- 1721, 11060, 736, 65032, 65041, 65051, 27030, 65060, 65066, 16862, 65072,
- 65076, 3964, 11391, 65082, 65089, 60693, 65093, 65097, 3988, 189, 14159,
- 65103, 65115, 65119, 65125, 27751, 65129, 11379, 2730, 4, 65134, 65144,
- 65150, 65161, 65168, 65174, 65180, 65188, 65195, 65201, 65211, 65221,
- 65231, 23499, 1309, 65240, 65244, 65248, 65254, 65258, 2753, 2759, 8532,
- 2264, 65262, 65266, 65275, 65283, 65294, 65302, 65310, 65316, 65321,
- 65332, 65343, 65351, 65357, 9694, 65362, 65370, 65374, 65378, 65382,
- 65394, 28136, 65401, 65411, 65417, 65423, 9796, 65433, 65444, 65454,
- 65463, 65467, 65474, 1140, 1170, 65484, 65489, 65497, 65505, 65516,
- 65523, 65537, 14088, 393, 65547, 65551, 65559, 65568, 65576, 65582,
- 65596, 65603, 65609, 65618, 65625, 65635, 65643, 3812, 156, 65651, 65662,
- 65666, 65678, 27949, 161, 65684, 65689, 65693, 65700, 65706, 65714,
- 65721, 8818, 65728, 65737, 65745, 3878, 65758, 8199, 65762, 2798, 443,
- 65767, 65780, 65785, 1833, 650, 65789, 3895, 65797, 65803, 65807, 931,
- 65817, 65826, 65831, 14928, 14935, 45269, 65835, 3822, 13041, 65843,
- 65850, 23555, 65854, 65861, 65867, 65872, 65877, 14948, 372, 65882,
- 65894, 65900, 65908, 2810, 1753, 65916, 65918, 65923, 65928, 65933,
- 65939, 65944, 65949, 65954, 65959, 65964, 65969, 65975, 65980, 65985,
- 65990, 65995, 66000, 66005, 66010, 66015, 66021, 66026, 66031, 66036,
- 66042, 66047, 66053, 66058, 66063, 66068, 66073, 66078, 66083, 66088,
- 66094, 66099, 66105, 66110, 66115, 66120, 66125, 66130, 66135, 66140,
- 66145, 66151, 66156, 66161, 66166, 66170, 66174, 66179, 66183, 66188,
- 66193, 66199, 66204, 66208, 66213, 66217, 66220, 66222, 66226, 66229,
- 66234, 66238, 66242, 66246, 66250, 66259, 66263, 32549, 66266, 32554,
- 66273, 66278, 32559, 66287, 66296, 32565, 66301, 32570, 66310, 66315,
- 11578, 66319, 66324, 66329, 32575, 66333, 40225, 66337, 66340, 66344,
- 8211, 66350, 66355, 66359, 3705, 32580, 66362, 66366, 66369, 66374,
- 66378, 66384, 66392, 66405, 66414, 66420, 66425, 66431, 66435, 66441,
- 66449, 66454, 66458, 66465, 66471, 66479, 66488, 66496, 32583, 66503,
- 66513, 66522, 66535, 66540, 66545, 66554, 66560, 66567, 66578, 66590,
- 66597, 66606, 66615, 66624, 66631, 66637, 66644, 66652, 66659, 66667,
- 66676, 66684, 66691, 66699, 66708, 66716, 66725, 66735, 66744, 66752,
- 66759, 66767, 66776, 66784, 66793, 66803, 66812, 66820, 66829, 66839,
- 66848, 66858, 66869, 66879, 66888, 66896, 66903, 66911, 66920, 66928,
- 66937, 66947, 66956, 66964, 66973, 66983, 66992, 67002, 67013, 67023,
- 67032, 67040, 67049, 67059, 67068, 67078, 67089, 67099, 67108, 67118,
- 67129, 67139, 67150, 67162, 67173, 67183, 67192, 67200, 67207, 67215,
- 67224, 67232, 67241, 67251, 67260, 67268, 67277, 67287, 67296, 67306,
- 67317, 67327, 67336, 67344, 67353, 67363, 67372, 67382, 67393, 67403,
- 67412, 67422, 67433, 67443, 67454, 67466, 67477, 67487, 67496, 67504,
- 67513, 67523, 67532, 67542, 67553, 67563, 67572, 67582, 67593, 67603,
- 67614, 67626, 67637, 67647, 67656, 67666, 67677, 67687, 67698, 67710,
- 67721, 67731, 67742, 67754, 67765, 67777, 67790, 67802, 67813, 67823,
- 67832, 67840, 67847, 67855, 67864, 67872, 67881, 67891, 67900, 67908,
- 67917, 67927, 67936, 67946, 67957, 67967, 67976, 67984, 67993, 68003,
- 68012, 68022, 68033, 68043, 68052, 68062, 68073, 68083, 68094, 68106,
- 68117, 68127, 68136, 68144, 68153, 68163, 68172, 68182, 68193, 68203,
- 68212, 68222, 68233, 68243, 68254, 68266, 68277, 68287, 68296, 68306,
- 68317, 68327, 68338, 68350, 68361, 68371, 68382, 68394, 68405, 68417,
- 68430, 68442, 68453, 68463, 68472, 68480, 68489, 68499, 68508, 68518,
- 68529, 68539, 68548, 68558, 68569, 68579, 68590, 68602, 68613, 68623,
- 68632, 68642, 68653, 68663, 68674, 68686, 68697, 68707, 68718, 68730,
- 68741, 68753, 68766, 68778, 68789, 68799, 68808, 68818, 68829, 68839,
- 68850, 68862, 68873, 68883, 68894, 68906, 68917, 68929, 68942, 68954,
- 68965, 68975, 68986, 68998, 69009, 69021, 69034, 69046, 69057, 69069,
- 69082, 69094, 69107, 69121, 69134, 69146, 69157, 69167, 69176, 69184,
- 69191, 69196, 8058, 69203, 32593, 69208, 69213, 32598, 69219, 20929,
- 32603, 69224, 69230, 69238, 69244, 69250, 69257, 69264, 69269, 69273,
- 69276, 69280, 69289, 69295, 69307, 69318, 69322, 3081, 8033, 69327,
- 69330, 69332, 69336, 69340, 69344, 69350, 69355, 25944, 69360, 69364,
- 69367, 69372, 69376, 69383, 69389, 69393, 6170, 69397, 32620, 69402,
- 69409, 69418, 69426, 69437, 69445, 69453, 69460, 69467, 69473, 69484,
- 32625, 69489, 69500, 69512, 69520, 69531, 69540, 69551, 69556, 69564,
- 2556, 69569, 34295, 69582, 69586, 69598, 69606, 69611, 69619, 17485,
- 69630, 69636, 69643, 69651, 69657, 32635, 69662, 3914, 58254, 69669,
- 69672, 69680, 69693, 69706, 69719, 69732, 69739, 69750, 69759, 41724,
- 41729, 69764, 69768, 69776, 69783, 69792, 69800, 69806, 69815, 69823,
- 69831, 69835, 69844, 69853, 69863, 69876, 69889, 69899, 32640, 69905,
- 69912, 69918, 32646, 69923, 69926, 69930, 69938, 69947, 41462, 69955,
- 69964, 69972, 69979, 69987, 69997, 70006, 70015, 70024, 70032, 70043,
- 70053, 9366, 21567, 70062, 70067, 70072, 70076, 70080, 70085, 70091,
- 70096, 70101, 70107, 70112, 70117, 21532, 70122, 70129, 70137, 70145,
- 70150, 70157, 70164, 70169, 70173, 70177, 70185, 70193, 32663, 70199,
- 70205, 70217, 70223, 70227, 70234, 70239, 70250, 70260, 70270, 70282,
- 70288, 70298, 70308, 32690, 70317, 70326, 70332, 70344, 70355, 70362,
- 70367, 70371, 70379, 70385, 70390, 70395, 70402, 70410, 70422, 70432,
- 70441, 70450, 70457, 34157, 23851, 70463, 70468, 70472, 70476, 70481,
- 70487, 70498, 70511, 70516, 70523, 32695, 70528, 70540, 70549, 70559,
- 70570, 70583, 70590, 70599, 70608, 70616, 70621, 70627, 1069, 70632,
- 70637, 70642, 70647, 70653, 70658, 70663, 70669, 70675, 70680, 70684,
- 70689, 70694, 70699, 58766, 70704, 70709, 70714, 70719, 70725, 70731,
- 70736, 70740, 70745, 70750, 70755, 70761, 70766, 70772, 70777, 70782,
- 70787, 70792, 70796, 70802, 70807, 70816, 70821, 70826, 70831, 70836,
- 70840, 70847, 70853, 17135, 17142, 70858, 70862, 70866, 70870, 70874,
- 45524, 70878, 70808, 70880, 70890, 32704, 70893, 70902, 70908, 6143,
- 32709, 70912, 70918, 70923, 70929, 70934, 70938, 70945, 70950, 70960,
- 70969, 70973, 70979, 70985, 70991, 70995, 71003, 71010, 71018, 71026,
- 32714, 71033, 71036, 71043, 71049, 71054, 71058, 71064, 71071, 71076,
- 71080, 71089, 71097, 71103, 71108, 32719, 71115, 71122, 71128, 71133,
- 71139, 71146, 71152, 21294, 27455, 71158, 71163, 71169, 71181, 70841,
- 70848, 21470, 71191, 71196, 71203, 71209, 71216, 71222, 71233, 71238,
- 9110, 71246, 71249, 71255, 71259, 71263, 71266, 71272, 32468, 6194, 964,
- 13419, 71279, 71285, 71291, 71297, 71303, 71309, 71315, 71321, 71327,
- 71332, 71337, 71342, 71347, 71352, 71357, 71362, 71367, 71372, 71377,
- 71382, 71387, 71392, 71398, 71403, 71408, 71414, 71419, 71424, 71430,
- 71436, 71442, 71448, 71454, 71460, 71466, 71472, 71478, 71483, 71488,
- 71494, 71499, 71504, 71510, 71515, 71520, 71525, 71530, 71535, 71540,
- 71545, 71550, 71555, 71560, 71565, 71570, 71576, 71581, 71586, 71591,
- 71597, 71602, 71607, 71612, 71617, 71623, 71628, 71633, 71638, 71643,
- 71648, 71653, 71658, 71663, 71668, 71673, 71678, 71683, 71688, 71693,
- 71698, 71703, 71708, 71713, 71718, 71724, 71729, 71734, 71739, 71744,
- 71749, 71754, 71759, 1864, 142, 71764, 71768, 71772, 71777, 71785, 71789,
- 71796, 71804, 71808, 71821, 71829, 71833, 71836, 71841, 71845, 71850,
- 71854, 71862, 71866, 20937, 71871, 71875, 60967, 71879, 71882, 71890,
- 71898, 71906, 71911, 71918, 71924, 71930, 71935, 71942, 71947, 71955,
- 64947, 71962, 71967, 71972, 71976, 11645, 71980, 71985, 71990, 71994,
- 71997, 72003, 72007, 72017, 72026, 72029, 72033, 72040, 72053, 72059,
- 72067, 72078, 72089, 72100, 72111, 72120, 72126, 72135, 72143, 72153,
- 72166, 72173, 72184, 72190, 72195, 72200, 72206, 72212, 72222, 72231,
- 70530, 72239, 72245, 72253, 72259, 72267, 72270, 72274, 72278, 72281,
- 72287, 72293, 72301, 72313, 72325, 72332, 72336, 72347, 72355, 72362,
- 72374, 72382, 72390, 72397, 72403, 72413, 72422, 72427, 72437, 72446,
- 40788, 72453, 72457, 72462, 72470, 72477, 72483, 72487, 72497, 72508,
- 72516, 72523, 72535, 72547, 72556, 69572, 72563, 72574, 72588, 72596,
- 72606, 72613, 72621, 72633, 72642, 72650, 72660, 72671, 72683, 72692,
- 72702, 72709, 72718, 72733, 72741, 72751, 72760, 72768, 72781, 72796,
- 72800, 72809, 72821, 72832, 72843, 72854, 72864, 72875, 72883, 72889,
- 72899, 72907, 72913, 29028, 72918, 72924, 72929, 72936, 9708, 17505,
- 72942, 72951, 72956, 72960, 72967, 72973, 72978, 72983, 72991, 72999,
- 73003, 73006, 73009, 73011, 73018, 73024, 73035, 73040, 73044, 73051,
- 73057, 73062, 73070, 65446, 65456, 73076, 73083, 73093, 10618, 73100,
- 73105, 29224, 73114, 73119, 73126, 73136, 73144, 73152, 73161, 73167,
- 73173, 73180, 73187, 73192, 73196, 73204, 73209, 73214, 73222, 73229,
- 73234, 73240, 73243, 73247, 73256, 71816, 73265, 73269, 73275, 73286,
- 73296, 17514, 73307, 73315, 17526, 73322, 73326, 73335, 27341, 73342,
- 73346, 73351, 73368, 73380, 10576, 73392, 73397, 73402, 73407, 21010,
- 73411, 73416, 73421, 73427, 73432, 5846, 21014, 73437, 73442, 73448,
- 73455, 73460, 73465, 73471, 73477, 73483, 73488, 73494, 73498, 73512,
- 73520, 73528, 73534, 73539, 73546, 73556, 73565, 73570, 73575, 73583,
- 73588, 73594, 73599, 73608, 59823, 73613, 73616, 73634, 73653, 73666,
- 73680, 73696, 73703, 73710, 73716, 73723, 73728, 73734, 73740, 73748,
- 73754, 73759, 73764, 73780, 10589, 73794, 73801, 73809, 73815, 73819,
- 73822, 73827, 73832, 73839, 73844, 73853, 73858, 73864, 73873, 73882,
- 73887, 73891, 73899, 73908, 11674, 73917, 73925, 73930, 73936, 11685,
- 73941, 73944, 73949, 73959, 73968, 73973, 73979, 73984, 73992, 73999,
- 74010, 74020, 74025, 64875, 74030, 74036, 74041, 74048, 74057, 74065,
- 74071, 74077, 74084, 74090, 74094, 16960, 3055, 74099, 74103, 74107,
- 74113, 74122, 74128, 74135, 74139, 74160, 74182, 74198, 74215, 74234,
- 74243, 74253, 74260, 74267, 27228, 74273, 74277, 74285, 74297, 74303,
- 74311, 74315, 74323, 74330, 74334, 74340, 74346, 74351, 3563, 41924,
- 74357, 74361, 74365, 74369, 74374, 74379, 74384, 74390, 74396, 74402,
- 74409, 74415, 74422, 74428, 74434, 74439, 74445, 74450, 74454, 74459,
- 74463, 74468, 41939, 74472, 74477, 74485, 74489, 74494, 74501, 74510,
- 74516, 74520, 74527, 74531, 74534, 74541, 74550, 74555, 74559, 74567,
- 74576, 74580, 74588, 74594, 74599, 74604, 74610, 74616, 74621, 74625,
- 74631, 74636, 74640, 74644, 74647, 74652, 74660, 74670, 74675, 39416,
- 74683, 74695, 74699, 74705, 74717, 74728, 74735, 74741, 74748, 74760,
- 74767, 74773, 21088, 74777, 74783, 74790, 74796, 74802, 74807, 74812,
- 74817, 74826, 7033, 74831, 16426, 74837, 74841, 74845, 74849, 74857,
- 74866, 74870, 74877, 74886, 74899, 74905, 74464, 30088, 74910, 74912,
- 74917, 74922, 74927, 74932, 74937, 74942, 74947, 74952, 74957, 74962,
- 74967, 74972, 74977, 74982, 74988, 74993, 74998, 75003, 75008, 75013,
- 75018, 75023, 75028, 75034, 75040, 75046, 75051, 75056, 75068, 75073,
- 1870, 46, 75078, 75083, 32746, 75087, 32751, 32756, 32762, 32767, 75091,
- 32772, 22083, 75113, 75117, 75121, 75126, 75130, 32776, 75134, 75142,
- 32781, 75149, 75152, 75157, 75161, 9543, 75170, 32786, 21945, 75173,
- 75177, 1428, 75182, 32797, 75185, 75190, 25737, 25747, 35258, 75195,
- 75200, 75205, 75210, 75216, 75221, 75230, 75235, 75242, 75248, 75253,
- 75258, 75263, 75273, 75282, 75287, 75295, 75299, 75307, 32611, 37317,
- 75314, 75320, 75325, 75330, 12016, 75335, 75341, 75346, 75353, 75359,
- 75364, 75372, 75382, 75392, 75398, 75403, 75409, 17536, 75416, 36073,
- 75429, 75434, 75440, 30993, 75453, 75459, 75463, 75472, 75479, 75485,
- 75493, 75502, 75509, 75515, 75518, 75522, 25878, 75526, 75533, 75539,
- 75547, 75552, 23994, 75558, 75561, 75569, 75577, 75591, 75598, 75604,
- 75611, 75617, 32811, 75621, 75628, 75636, 75644, 75650, 32816, 75658,
- 75664, 75669, 75679, 75685, 75694, 30830, 34716, 75702, 75707, 75712,
- 75716, 75721, 75725, 75733, 14920, 39429, 75738, 75743, 32821, 62269,
- 75747, 75752, 75756, 75765, 75773, 75779, 75784, 75790, 75797, 75803,
- 75808, 75813, 75822, 75834, 75849, 33083, 75855, 16545, 32825, 75859,
- 75866, 24104, 75872, 75879, 75888, 75895, 75904, 75910, 75915, 75923,
- 75929, 32835, 75934, 75943, 74723, 75952, 75959, 75965, 75971, 75981,
- 75989, 75996, 76000, 32840, 76003, 32846, 32852, 76008, 76016, 76024,
- 76034, 76043, 76051, 76058, 76068, 32857, 76072, 76074, 76078, 76083,
- 76087, 76091, 76097, 76102, 76106, 76117, 76122, 76127, 3060, 76131,
- 76138, 76142, 76151, 76159, 76166, 76171, 76176, 62315, 76180, 76183,
- 76189, 76197, 76203, 76207, 76212, 76219, 76224, 76230, 34747, 76235,
- 76238, 76243, 76247, 76252, 76257, 76261, 76269, 76273, 25756, 25765,
- 76279, 76285, 76291, 76296, 76300, 76303, 76313, 76322, 76327, 76333,
- 76340, 76346, 76350, 76358, 76363, 34753, 76367, 76375, 76381, 76388,
- 76393, 76397, 76402, 58440, 34759, 76408, 76413, 76417, 76422, 76427,
- 76432, 76436, 76441, 76446, 76452, 76457, 76462, 76468, 76474, 76479,
- 76483, 76488, 76493, 76498, 76502, 24103, 76507, 76512, 76518, 76524,
- 76530, 76535, 76539, 76544, 76549, 76554, 76558, 76563, 76568, 76573,
- 76578, 76582, 32865, 76590, 76594, 76602, 76610, 76621, 76626, 76630,
- 22397, 76635, 76641, 76651, 76658, 76663, 76672, 76677, 76681, 76686,
- 76694, 76702, 76709, 65109, 76715, 76723, 76730, 76741, 76747, 76751,
- 76757, 32875, 76760, 76767, 76775, 76780, 39620, 76784, 76789, 76796,
- 76801, 8992, 76805, 76813, 76820, 76827, 76833, 76847, 63381, 76855,
- 76861, 76865, 76868, 76876, 76883, 76888, 76901, 76908, 76912, 76919,
- 76924, 60860, 76929, 76932, 76939, 76945, 76949, 76957, 76966, 76976,
- 76986, 76995, 77003, 77014, 77019, 77023, 77028, 77032, 35389, 77040,
- 21357, 35398, 77045, 77050, 77055, 77060, 77065, 77070, 77075, 77079,
- 77084, 77089, 77094, 77099, 77104, 77109, 77113, 77118, 77123, 77127,
- 77131, 77135, 77139, 77144, 77149, 77153, 77158, 77162, 77166, 77171,
- 77176, 77181, 77186, 77190, 77195, 77200, 77204, 77209, 77214, 77219,
- 77224, 77229, 77234, 77239, 77244, 77249, 77254, 77259, 77264, 77269,
- 77274, 77279, 77284, 77289, 77294, 77299, 77304, 77308, 77313, 77318,
- 77323, 77328, 77333, 77338, 77343, 77348, 77353, 77358, 77363, 77367,
- 77372, 77376, 77381, 77386, 77391, 77396, 77401, 77406, 77411, 77416,
- 77421, 77425, 77429, 77434, 77439, 77443, 77448, 77453, 77457, 77462,
- 77467, 77472, 77477, 77481, 77486, 77491, 77495, 77500, 77504, 77508,
- 77512, 77516, 77521, 77525, 77529, 77533, 77537, 77541, 77545, 77549,
- 77553, 77557, 77562, 77567, 77572, 77577, 77582, 77587, 77592, 77597,
- 77602, 77607, 77611, 77615, 77619, 77623, 77627, 77631, 77636, 77640,
- 77645, 77649, 77654, 77659, 77663, 77667, 77672, 77676, 77680, 77684,
- 77688, 77692, 77696, 77700, 77704, 77708, 77712, 77716, 77720, 77724,
- 77728, 77733, 77738, 77742, 77746, 77750, 77754, 77758, 77762, 77767,
- 77771, 77775, 77779, 77783, 77787, 77791, 77796, 77800, 77805, 77809,
- 77813, 77817, 77821, 77825, 77829, 77833, 77837, 77841, 77845, 77849,
- 77854, 77858, 77862, 77866, 77870, 77874, 77878, 77882, 77886, 77890,
- 77894, 77898, 77903, 77907, 77911, 77916, 77921, 77925, 77929, 77933,
- 77937, 77941, 77945, 77949, 77953, 77958, 77962, 77967, 77971, 77976,
- 77980, 77985, 77989, 77995, 78000, 78004, 78009, 78013, 78018, 78022,
- 78027, 78031, 78036, 1521, 78040, 2824, 1759, 1764, 78044, 78048, 2828,
- 78052, 1397, 78057, 1342, 78061, 2840, 78065, 78072, 78079, 78093, 2844,
- 7131, 78102, 78110, 78117, 78128, 78137, 78144, 78156, 78169, 78182,
- 78193, 78198, 78205, 78217, 78221, 2848, 11747, 78231, 78236, 78245,
- 78255, 2852, 78260, 78264, 78269, 78276, 78282, 78290, 78302, 1347,
- 13042, 78312, 78316, 78322, 78336, 78348, 78360, 78370, 78379, 78388,
- 78397, 78405, 78416, 78424, 4051, 78434, 78445, 78454, 78460, 78475,
- 78482, 78488, 35514, 78493, 2876, 13046, 78497, 78504, 8930, 78513, 2881,
- 32361, 78519, 60609, 78526, 78532, 78543, 78549, 78556, 78562, 78570,
- 78577, 78583, 78593, 78602, 78613, 78620, 78626, 78636, 78644, 78650,
- 78665, 78671, 78676, 78683, 78686, 78692, 78699, 78705, 78713, 78722,
- 78730, 78736, 78745, 41464, 78759, 78764, 78770, 14757, 78775, 78788,
- 78797, 78805, 78812, 78816, 78820, 78823, 78830, 78837, 78845, 78853,
- 78862, 78870, 14684, 78878, 78883, 78887, 78899, 78906, 78915, 748,
- 78925, 78934, 78945, 2897, 78949, 78953, 78959, 78972, 78984, 78994,
- 79003, 79015, 26369, 79026, 79034, 79043, 79054, 79065, 79075, 79085,
- 79094, 79102, 11312, 79109, 79113, 79116, 79121, 79126, 79130, 79136,
- 1352, 11818, 79143, 79154, 79163, 79171, 79180, 79188, 79204, 79215,
- 79224, 79232, 79244, 79255, 79271, 79281, 79302, 79315, 79323, 79330,
- 14868, 79343, 79348, 79354, 5908, 79360, 79363, 79370, 79380, 8176,
- 79387, 79392, 79397, 79402, 79410, 79419, 79427, 9756, 9765, 79432,
- 79443, 79448, 79454, 2913, 2918, 79460, 10879, 79466, 79473, 79480,
- 79493, 2251, 68, 79498, 79503, 79513, 79519, 79528, 79536, 79546, 79550,
- 79555, 79559, 79571, 2941, 79579, 79587, 79592, 79603, 79614, 79623,
- 79628, 79634, 79639, 79649, 79659, 79664, 79670, 79674, 79679, 79688,
- 21410, 79692, 4128, 20, 79697, 79706, 79713, 79720, 79726, 79732, 864,
- 79737, 79742, 60937, 79747, 79752, 79758, 79764, 79772, 79777, 79784,
- 79790, 79795, 38030, 41358, 79801, 2945, 32, 79811, 79824, 79829, 79837,
- 79842, 79848, 2967, 28310, 79853, 79861, 79868, 79873, 58682, 61940,
- 79882, 79886, 1704, 1813, 79891, 79896, 79903, 1817, 247, 79910, 79916,
- 2989, 79921, 79926, 79933, 1821, 79938, 79944, 79949, 79961, 6119, 79971,
- 1828, 79977, 79982, 79989, 79996, 80011, 80018, 80029, 80037, 2618,
- 80041, 80053, 80058, 80062, 80068, 28135, 2256, 80072, 80083, 80087,
- 80091, 80097, 80101, 80110, 80114, 80125, 80129, 2302, 32190, 80133,
- 80143, 3080, 9371, 80151, 80156, 80160, 80169, 80176, 80182, 3050, 17152,
- 80186, 80199, 80217, 80222, 80230, 80238, 80248, 9985, 13154, 80260,
- 80273, 80280, 80287, 80303, 80310, 80316, 1064, 80323, 80330, 80340,
- 80349, 80361, 42328, 80369, 3064, 12030, 80372, 80380, 80384, 78272,
- 3068, 80388, 21191, 12046, 3756, 80392, 3074, 80396, 80406, 80412, 80418,
- 80424, 80430, 80436, 80442, 80448, 80454, 80460, 80466, 80472, 80478,
- 80484, 80490, 80496, 80502, 80508, 80514, 80520, 80526, 80532, 80538,
- 80544, 80550, 80556, 80563, 80570, 80576, 80582, 80588, 80594, 80600,
- 80606, 1357, 16062, 12068, 80612, 80617, 80622, 80627, 80632, 80637,
- 80642, 80647, 80652, 80657, 80662, 80667, 80672, 80677, 80682, 80687,
- 80692, 80697, 80702, 80707, 80712, 80717, 80722, 80727, 80732, 80737,
- 80743, 80748, 80753, 80759, 80764, 80770, 80775, 80780, 80786, 80791,
- 80796, 80801, 80806, 80811, 80816, 80821, 80826, 80407, 80413, 80419,
- 80425, 80431, 80437, 80443, 80449, 80455, 80461, 80467, 80473, 80479,
- 80485, 80491, 80832, 80497, 80503, 80509, 80838, 80515, 80521, 80527,
- 80533, 80539, 80545, 80551, 80571, 80844, 80850, 80577, 80856, 80583,
- 80589, 80595, 80601, 80607, 3091, 3096, 80862, 80867, 80870, 80876,
- 80882, 80889, 80894, 80899, 2307,
+ 0, 0, 6, 10, 14, 22, 27, 34, 44, 49, 58, 64, 66, 69, 81, 89, 102, 108,
+ 113, 118, 126, 135, 146, 151, 156, 161, 164, 168, 177, 183, 189, 194,
+ 201, 209, 217, 218, 221, 229, 165, 235, 244, 251, 261, 267, 274, 279,
+ 282, 287, 293, 296, 300, 305, 311, 317, 322, 327, 333, 339, 348, 355,
+ 362, 371, 376, 381, 383, 391, 399, 400, 408, 410, 417, 420, 426, 433,
+ 331, 438, 440, 442, 449, 451, 456, 464, 471, 476, 480, 486, 491, 501,
+ 506, 513, 516, 524, 528, 538, 545, 554, 561, 570, 577, 580, 584, 592,
+ 598, 611, 618, 622, 626, 627, 636, 640, 649, 655, 659, 661, 666, 674,
+ 678, 686, 691, 694, 700, 703, 707, 712, 720, 723, 730, 735, 744, 753,
+ 761, 769, 773, 779, 787, 794, 797, 807, 811, 815, 826, 833, 840, 844,
+ 848, 854, 842, 863, 869, 874, 879, 883, 886, 889, 894, 903, 911, 916,
+ 658, 575, 921, 924, 930, 934, 938, 947, 953, 960, 969, 976, 989, 994,
+ 998, 1006, 1009, 1015, 1021, 1030, 1037, 1045, 1052, 1062, 1069, 1077,
+ 1086, 1090, 1093, 1100, 21, 1104, 1113, 1121, 1128, 1131, 1136, 1138,
+ 1142, 1151, 1156, 1159, 1165, 1172, 1175, 1180, 1185, 1191, 1196, 1201,
+ 1206, 1210, 1215, 1221, 1226, 1231, 1235, 1241, 1246, 1251, 1256, 1260,
+ 1265, 1270, 1275, 1281, 1287, 1293, 1298, 1302, 1307, 1312, 1317, 1321,
+ 1326, 1331, 1336, 1341, 1176, 1181, 1186, 1192, 1197, 1345, 1207, 1351,
+ 1356, 1361, 1368, 1372, 1375, 1384, 1211, 1388, 1216, 1222, 1227, 1392,
+ 1397, 1402, 1406, 1410, 1416, 1420, 1232, 1423, 1425, 1242, 1430, 1434,
+ 1247, 1440, 1252, 1444, 1448, 1257, 1452, 1457, 1461, 1464, 1468, 1261,
+ 1266, 1473, 1479, 1271, 1491, 1497, 1503, 1509, 1276, 1288, 1294, 1513,
+ 1517, 1521, 1524, 1299, 1528, 1530, 1535, 1540, 1546, 1551, 1556, 1560,
+ 1565, 1570, 1575, 1580, 1586, 1591, 1596, 1602, 1608, 1613, 1617, 1622,
+ 1627, 1632, 1637, 1642, 1646, 1654, 1659, 1663, 1668, 1673, 1678, 1683,
+ 1687, 1690, 1697, 1702, 1707, 1712, 1717, 1723, 1728, 1732, 1303, 1735,
+ 1740, 1745, 1308, 1749, 1753, 1760, 1313, 1767, 1318, 1771, 1773, 1778,
+ 1784, 1322, 1789, 1798, 1327, 1803, 1809, 1814, 1332, 1819, 1824, 1827,
+ 1832, 1836, 1840, 1844, 1847, 1851, 1337, 1856, 1342, 1860, 1862, 1868,
+ 1874, 1880, 1886, 1892, 1898, 1904, 1910, 1915, 1921, 1927, 1933, 1939,
+ 1945, 1951, 1957, 1963, 1969, 1974, 1979, 1984, 1989, 1994, 1999, 2004,
+ 2009, 2014, 2019, 2025, 2030, 2036, 2041, 2047, 2053, 2058, 2064, 2070,
+ 2076, 2082, 2087, 2092, 2094, 2095, 2099, 2103, 2108, 2112, 2116, 2120,
+ 2125, 2129, 2132, 2137, 2141, 2146, 2150, 2154, 2159, 2163, 2166, 2170,
+ 2176, 2190, 2194, 2198, 2202, 2205, 2210, 2214, 2218, 2221, 2225, 2230,
+ 2235, 2240, 2245, 2249, 2253, 2257, 2261, 2266, 2270, 2275, 2279, 2284,
+ 2290, 2297, 2303, 2308, 2313, 2318, 2324, 2329, 2335, 2340, 2343, 2345,
+ 1193, 2349, 2356, 2364, 2374, 2383, 2397, 2401, 2405, 2410, 2423, 2431,
+ 2435, 2440, 2444, 2447, 2451, 2455, 2460, 2465, 2470, 2474, 2477, 2481,
+ 2488, 2495, 2501, 2506, 2511, 2517, 2523, 2528, 2531, 1775, 2533, 2539,
+ 2543, 2548, 2552, 2556, 1693, 1786, 2561, 2565, 2568, 2573, 2578, 2583,
+ 2588, 2592, 2599, 2604, 2607, 2614, 2620, 2624, 2628, 2632, 2637, 2644,
+ 2649, 2654, 2661, 2667, 2673, 2679, 2693, 2710, 2725, 2740, 2749, 2754,
+ 2758, 2763, 2768, 2772, 2784, 2791, 2797, 2293, 2803, 2810, 2816, 2820,
+ 2823, 2830, 2836, 2841, 2845, 2850, 2854, 2858, 2117, 2862, 2867, 2872,
+ 2876, 2881, 2889, 2893, 2898, 2902, 2906, 2910, 2915, 2920, 2925, 2929,
+ 2934, 2939, 2943, 2948, 2952, 2955, 2959, 2963, 2971, 2976, 2980, 2984,
+ 2990, 2999, 3003, 3007, 3013, 3018, 3025, 3029, 3039, 3043, 3047, 3052,
+ 3056, 3061, 3067, 3072, 3076, 3080, 3084, 2491, 3092, 3097, 3103, 3108,
+ 3112, 3117, 3122, 3126, 3132, 3137, 2121, 3143, 3149, 3154, 3159, 3164,
+ 3169, 3174, 3179, 3184, 3189, 3194, 3200, 3205, 1208, 101, 3211, 3215,
+ 3219, 3223, 3228, 3232, 3236, 3242, 3247, 3251, 3255, 3260, 3265, 3269,
+ 3274, 3278, 3281, 3285, 3290, 3294, 3299, 3303, 3306, 3310, 3314, 3319,
+ 3323, 3326, 3339, 3343, 3347, 3351, 3356, 3360, 3364, 3367, 3371, 3375,
+ 3380, 3384, 3389, 3394, 3399, 3403, 3408, 3411, 3414, 3419, 3425, 3429,
+ 3433, 3436, 3441, 3445, 3450, 3454, 3458, 3461, 3467, 3472, 3477, 3483,
+ 3488, 3493, 3499, 3505, 3510, 3515, 3520, 3525, 1140, 579, 3528, 3531,
+ 3536, 3540, 3544, 3548, 3552, 3555, 3559, 3564, 3569, 3573, 3578, 3582,
+ 3587, 3591, 3595, 3599, 3605, 3611, 3614, 3617, 139, 3623, 3628, 3637,
+ 3645, 3654, 3661, 3667, 3674, 3679, 3683, 3687, 3695, 3702, 3707, 3714,
+ 3719, 3723, 3733, 3737, 3741, 3746, 3751, 3761, 2133, 3766, 3770, 3773,
+ 3779, 3784, 3790, 3796, 3801, 3808, 3812, 3816, 637, 701, 1369, 3820,
+ 3827, 3834, 3840, 3845, 3852, 3859, 3864, 3870, 3876, 3881, 3885, 3891,
+ 3898, 3903, 3907, 2142, 3911, 3919, 3925, 3933, 739, 3939, 3947, 3958,
+ 3962, 3972, 2147, 3978, 3983, 3998, 4004, 4011, 4021, 4027, 4032, 4038,
+ 4044, 4047, 4050, 4054, 4059, 4066, 4071, 4075, 4079, 4083, 4087, 4092,
+ 4098, 4109, 4113, 3286, 4118, 4130, 4136, 4144, 4148, 4153, 1562, 4160,
+ 4163, 4166, 4170, 4173, 4179, 4183, 4197, 4201, 4204, 4208, 4214, 4220,
+ 4225, 4229, 4233, 4239, 4250, 4256, 4261, 4267, 4271, 4279, 4291, 4301,
+ 4307, 4312, 4321, 4329, 4336, 4342, 4346, 4352, 4361, 4370, 4374, 4383,
+ 4388, 4392, 4397, 4401, 4409, 4415, 4419, 4424, 4428, 4434, 2155, 1385,
+ 4440, 4445, 4451, 4456, 4461, 4466, 4471, 4476, 4481, 4487, 4492, 4498,
+ 4503, 4508, 4513, 4519, 4524, 4529, 4534, 4539, 4545, 4550, 4556, 4561,
+ 4566, 4571, 4576, 4581, 4586, 4592, 4597, 4602, 291, 321, 4607, 4613,
+ 4617, 4621, 4626, 4630, 4634, 4637, 4641, 4645, 4649, 4653, 4657, 4662,
+ 4666, 4670, 4676, 4437, 4681, 4685, 4688, 4693, 4698, 4703, 4708, 4713,
+ 4718, 4723, 4728, 4733, 4738, 4742, 4747, 4752, 4757, 4762, 4767, 4772,
+ 4777, 4782, 4787, 4792, 4796, 4801, 4806, 4811, 4816, 4821, 4826, 4831,
+ 4836, 4841, 4846, 4850, 4855, 4860, 4865, 4870, 4875, 4880, 4885, 4890,
+ 4895, 4900, 4904, 4909, 4914, 4919, 4924, 4929, 4934, 4939, 4944, 4949,
+ 4954, 4958, 4963, 4968, 4973, 4978, 4983, 4988, 4993, 4998, 5003, 5008,
+ 5012, 5017, 5022, 5027, 5032, 5037, 5042, 5047, 5052, 5057, 5062, 5066,
+ 5071, 5076, 5081, 5086, 5092, 5098, 5104, 5110, 5116, 5122, 5128, 5133,
+ 5139, 5145, 5151, 5157, 5163, 5169, 5175, 5181, 5187, 5193, 5198, 5204,
+ 5210, 5216, 5222, 5228, 5234, 5240, 5246, 5252, 5258, 5263, 5269, 5275,
+ 5281, 5287, 5293, 5299, 5305, 5311, 5317, 5323, 5328, 5334, 5340, 5346,
+ 5352, 5358, 5364, 5370, 5376, 5382, 5388, 5393, 5399, 5405, 5411, 5417,
+ 5423, 5429, 5435, 5441, 5447, 5453, 5458, 5462, 5468, 5474, 5480, 5486,
+ 5492, 5498, 5504, 5510, 5516, 5522, 5527, 5533, 5539, 5545, 5551, 5557,
+ 5563, 5569, 5575, 5581, 5587, 5592, 5598, 5604, 5610, 5616, 5622, 5628,
+ 5634, 5640, 5646, 5652, 5657, 5663, 5669, 5675, 5681, 5687, 5693, 5699,
+ 5705, 5711, 5717, 5722, 5728, 5734, 5740, 5746, 5752, 5758, 5764, 5770,
+ 5776, 5782, 5787, 5793, 5799, 5805, 5811, 5817, 5823, 5829, 5835, 5841,
+ 5847, 5852, 5858, 5864, 5870, 5876, 5882, 5888, 5894, 5900, 5906, 5912,
+ 5917, 5923, 5929, 5935, 5941, 5947, 5953, 5959, 5965, 5971, 5977, 5982,
+ 5988, 5994, 6000, 6006, 6012, 6018, 6024, 6030, 6036, 6042, 6047, 6053,
+ 6059, 6065, 6071, 6077, 6083, 6089, 6095, 6101, 6107, 6112, 6116, 6119,
+ 6126, 6130, 6143, 6147, 6151, 6155, 6158, 6162, 6167, 6171, 6175, 6181,
+ 6188, 6199, 6207, 6214, 6218, 6226, 6235, 6241, 6253, 6258, 6261, 6266,
+ 6270, 6280, 6288, 6296, 6302, 6306, 6316, 6326, 6334, 6341, 6348, 6354,
+ 6360, 6367, 6371, 6378, 6388, 6398, 6406, 6413, 6418, 6422, 6426, 6434,
+ 6438, 6443, 6450, 6458, 6463, 6467, 6472, 6476, 6483, 6488, 6502, 6507,
+ 6512, 6519, 3541, 6528, 6532, 6537, 6541, 6545, 6548, 6553, 6558, 6567,
+ 6573, 6579, 6585, 6589, 6600, 6610, 6625, 6640, 6655, 6670, 6685, 6700,
+ 6715, 6730, 6745, 6760, 6775, 6790, 6805, 6820, 6835, 6850, 6865, 6880,
+ 6895, 6910, 6925, 6940, 6955, 6970, 6985, 7000, 7015, 7030, 7045, 7060,
+ 7075, 7090, 7105, 7120, 7135, 7150, 7165, 7180, 7195, 7210, 7225, 7240,
+ 7255, 7270, 7285, 7300, 7315, 7330, 7345, 7354, 7363, 7368, 7374, 7384,
+ 7388, 7392, 7397, 7402, 7410, 7414, 7417, 7421, 3034, 7424, 7429, 330,
+ 504, 7435, 7443, 7447, 7451, 7454, 7458, 7464, 7468, 7476, 7482, 7487,
+ 7494, 7502, 7509, 7515, 7520, 7527, 7533, 7541, 7545, 7550, 7562, 7573,
+ 7580, 7584, 7588, 7592, 7595, 7601, 3311, 7605, 7611, 7616, 7621, 7626,
+ 7632, 7637, 7642, 7647, 7652, 7658, 7663, 7668, 7674, 7679, 7685, 7690,
+ 7696, 7701, 7707, 7712, 7717, 7722, 7727, 7732, 7738, 7743, 7748, 7753,
+ 7759, 7765, 7771, 7777, 7783, 7789, 7795, 7801, 7807, 7813, 7819, 7825,
+ 7830, 7835, 7840, 7845, 7850, 7855, 7860, 7865, 7871, 7877, 7882, 7888,
+ 7894, 7900, 7905, 7910, 7915, 7920, 7926, 7932, 7937, 7942, 7947, 7952,
+ 7957, 7963, 7968, 7974, 7980, 7986, 7992, 7998, 8004, 8010, 8016, 8022,
+ 2164, 7453, 8027, 8031, 8035, 8038, 8045, 8048, 8052, 8060, 8065, 8070,
+ 8061, 8075, 2191, 8079, 8085, 8091, 8096, 8101, 8108, 8116, 8121, 8125,
+ 8128, 8132, 8138, 8144, 8148, 2199, 526, 8151, 8155, 8160, 8166, 8171,
+ 8175, 8178, 8182, 8188, 8193, 8197, 8204, 8208, 8212, 8216, 876, 958,
+ 8219, 8227, 8234, 8240, 8247, 8255, 8262, 8273, 8280, 8286, 8291, 8303,
+ 1228, 1393, 1398, 8314, 1403, 8318, 8322, 8331, 8339, 8343, 8352, 8358,
+ 8363, 8367, 8373, 8378, 8385, 2745, 8392, 8396, 8405, 8414, 8423, 8432,
+ 8438, 8443, 8448, 8459, 8471, 8476, 8484, 2250, 8488, 8490, 8495, 8499,
+ 8508, 8516, 1407, 159, 3583, 3588, 8522, 8526, 8535, 8541, 8546, 8549,
+ 8558, 3592, 2737, 8564, 8572, 8576, 8580, 8584, 2267, 8588, 8593, 8600,
+ 8606, 8612, 8615, 8617, 8620, 8628, 8636, 8644, 8647, 8652, 2280, 8657,
+ 8072, 8660, 8662, 8667, 8672, 8677, 8682, 8687, 8692, 8697, 8702, 8707,
+ 8712, 8718, 8723, 8728, 8733, 8739, 8744, 8749, 8754, 8759, 8764, 8769,
+ 8775, 8780, 8785, 8790, 8795, 8800, 8805, 8810, 8815, 8820, 8825, 8830,
+ 8835, 8840, 8845, 8850, 8855, 8860, 8866, 8872, 8877, 8882, 8887, 8892,
+ 8897, 2291, 2298, 2304, 8902, 8910, 8916, 8924, 2330, 2336, 8932, 8936,
+ 8941, 8945, 8949, 8953, 8958, 8962, 8967, 8971, 8974, 8977, 8983, 8990,
+ 8996, 9003, 9009, 9016, 9022, 9029, 9035, 9041, 9050, 9056, 9060, 9064,
+ 9068, 9072, 9077, 9081, 9086, 9090, 9096, 9101, 9108, 9119, 9127, 9137,
+ 9143, 9153, 9162, 9169, 9174, 9178, 9189, 9202, 9213, 9226, 9237, 9249,
+ 9261, 9273, 9286, 9299, 9306, 9312, 9326, 9333, 9339, 9348, 9356, 9360,
+ 9365, 9369, 9376, 9384, 9388, 9394, 9398, 9404, 9414, 9418, 9423, 9428,
+ 9435, 9441, 9451, 8242, 9457, 9461, 9468, 9474, 9481, 9488, 957, 9492,
+ 9496, 9501, 9506, 9511, 9515, 9521, 9529, 9535, 9539, 9542, 9548, 9558,
+ 9562, 9568, 9573, 9577, 9581, 9587, 9593, 2187, 9598, 9600, 9605, 9613,
+ 9622, 9626, 9632, 9637, 9642, 9647, 9652, 9658, 9663, 9668, 4235, 9673,
+ 9678, 9682, 9688, 9693, 9699, 9704, 9709, 9715, 9720, 9627, 9726, 9730,
+ 9737, 9743, 9748, 9752, 6498, 9757, 9766, 9771, 9776, 8596, 8603, 9781,
+ 2912, 9785, 9790, 9795, 9800, 9638, 9804, 9809, 9814, 9643, 9818, 9648,
+ 9823, 9830, 9837, 9843, 9850, 9856, 9862, 9867, 9874, 9879, 9884, 9889,
+ 9895, 9653, 9659, 9901, 9907, 9912, 9917, 9925, 9664, 9930, 1102, 9933,
+ 9941, 9947, 9953, 9962, 9970, 9978, 9986, 9994, 10002, 10010, 10018,
+ 10026, 10035, 10044, 10052, 10061, 10070, 10079, 10088, 10097, 10106,
+ 10115, 10124, 10133, 10142, 10150, 10155, 10161, 10169, 10176, 10191,
+ 10208, 10227, 10236, 10244, 10259, 10270, 10280, 10290, 10298, 10304,
+ 10316, 10325, 10333, 10340, 10347, 10354, 10360, 10365, 10375, 10383,
+ 10393, 10400, 10410, 10420, 10430, 10438, 10445, 10454, 10464, 10478,
+ 10493, 10502, 10510, 10515, 10519, 10528, 10534, 10539, 10549, 10559,
+ 10569, 10574, 10578, 10587, 10592, 10608, 10625, 10635, 10646, 10659,
+ 10667, 10680, 10692, 10700, 10705, 10709, 10715, 10720, 10728, 10736,
+ 10743, 10748, 10756, 10766, 10772, 10776, 10779, 10783, 10789, 10796,
+ 10800, 10808, 10817, 10825, 10832, 10837, 10842, 10846, 10850, 10858,
+ 10873, 10889, 10895, 10903, 10912, 10920, 10926, 10930, 10937, 10948,
+ 10952, 10955, 10961, 9669, 10966, 10972, 10979, 10985, 10990, 10997,
+ 11004, 11011, 11018, 11025, 11032, 11039, 11046, 11051, 10204, 11056,
+ 11062, 11069, 11076, 11081, 11088, 11097, 11101, 11113, 8634, 11117,
+ 11120, 11124, 11128, 11132, 11136, 11142, 11148, 11153, 11159, 11164,
+ 11169, 11175, 11180, 11185, 9431, 11190, 11194, 11198, 11202, 11207,
+ 11212, 11217, 11225, 11231, 11236, 11240, 11244, 11251, 11256, 11264,
+ 11271, 11276, 11280, 11283, 11289, 11296, 11300, 11303, 11308, 11312,
+ 4274, 11318, 11327, 46, 11335, 11341, 11346, 11351, 11359, 11366, 11371,
+ 9446, 11377, 11383, 11388, 11392, 11395, 11410, 11429, 11441, 11454,
+ 11467, 11480, 11494, 11507, 11522, 11529, 9674, 11535, 11549, 11554,
+ 11560, 11565, 11573, 11578, 8401, 11583, 11586, 11594, 11601, 11606,
+ 11610, 11616, 2917, 10278, 11620, 11624, 11630, 11636, 11641, 11647,
+ 11652, 9683, 11658, 11664, 11669, 11674, 11682, 11688, 11701, 11709,
+ 11716, 11722, 9689, 11728, 11736, 11744, 11751, 11764, 11777, 11789,
+ 11799, 11807, 11814, 11826, 11833, 11843, 11852, 11861, 11869, 11876,
+ 11881, 11887, 9694, 11892, 11898, 11903, 11908, 9700, 11913, 11916,
+ 11923, 11929, 11942, 9112, 11953, 11959, 11968, 11976, 11983, 11989,
+ 12000, 12006, 12011, 3836, 12019, 12024, 11402, 12030, 12037, 12042,
+ 9705, 12048, 12053, 12060, 12066, 12072, 12077, 12085, 12093, 12100,
+ 12104, 12116, 12130, 12140, 12145, 12149, 12160, 12166, 12171, 12176,
+ 9710, 12180, 9716, 12185, 12188, 12193, 12205, 12212, 12217, 12221,
+ 12229, 12234, 12238, 12243, 12247, 12254, 12260, 9721, 9628, 12267, 2922,
+ 12, 12274, 12279, 12283, 12287, 12293, 12301, 12311, 12316, 12321, 12328,
+ 12335, 12339, 12350, 12360, 12369, 12378, 12390, 12395, 12399, 12407,
+ 12421, 12425, 12428, 12436, 12443, 12451, 12455, 12466, 12470, 12477,
+ 12482, 12486, 12492, 12497, 12503, 12508, 12513, 12517, 12523, 12528,
+ 12539, 12543, 12546, 12552, 12557, 12563, 12569, 12576, 12587, 12597,
+ 12607, 12616, 12623, 12632, 12636, 9731, 9738, 9744, 9749, 12642, 12648,
+ 12654, 12659, 12665, 9753, 12671, 12674, 12681, 12686, 12701, 12717,
+ 12732, 12740, 12746, 12751, 950, 374, 12756, 12764, 12771, 12777, 12782,
+ 12787, 9758, 12789, 12793, 12798, 12802, 12812, 12817, 12821, 12830,
+ 12834, 12837, 12844, 9767, 12849, 12852, 12860, 12867, 12875, 12879,
+ 12883, 12890, 12899, 12906, 12902, 12913, 12917, 12923, 12927, 12931,
+ 12935, 12941, 12951, 12959, 12966, 12970, 12978, 12982, 12989, 12993,
+ 12998, 13002, 13009, 13015, 13023, 13029, 13034, 13044, 13049, 13054,
+ 13058, 13062, 13070, 4124, 13078, 13083, 9772, 13087, 13091, 13094,
+ 13102, 13109, 13113, 6298, 13117, 13122, 13127, 13131, 13142, 13152,
+ 13157, 13163, 13168, 13172, 13175, 13183, 13188, 13193, 13200, 13205,
+ 9777, 13210, 13214, 13221, 1737, 6456, 13226, 13231, 13236, 13241, 13247,
+ 13252, 13258, 13263, 13268, 13273, 13278, 13283, 13288, 13293, 13298,
+ 13303, 13308, 13313, 13318, 13323, 13328, 13333, 13338, 13344, 13349,
+ 13354, 13359, 13364, 13369, 13375, 13380, 13385, 13391, 13396, 13402,
+ 13407, 13413, 13418, 13423, 13428, 13433, 13439, 13444, 13449, 13454,
+ 909, 112, 13462, 13466, 13471, 13476, 13480, 13484, 13488, 13493, 13497,
+ 13502, 13506, 13509, 13513, 13517, 13523, 13528, 13538, 13544, 13552,
+ 13558, 13562, 13566, 13573, 13581, 13590, 13601, 13611, 13618, 13625,
+ 13629, 13638, 13647, 13655, 13664, 13673, 13682, 13691, 13701, 13711,
+ 13721, 13731, 13741, 13750, 13760, 13770, 13780, 13790, 13800, 13810,
+ 13820, 13829, 13839, 13849, 13859, 13869, 13879, 13889, 13898, 13908,
+ 13918, 13928, 13938, 13948, 13958, 13968, 13978, 13988, 13997, 14007,
+ 14017, 14027, 14037, 14047, 14057, 14067, 14077, 14087, 14097, 14106,
+ 1237, 14112, 14115, 14119, 14124, 14131, 14137, 14142, 14146, 14151,
+ 14160, 14168, 14173, 14177, 14181, 14187, 14192, 14198, 9786, 14203,
+ 14208, 14217, 9796, 14222, 14225, 14231, 14239, 9801, 14246, 14250,
+ 14254, 14259, 14263, 14273, 14279, 14285, 14290, 14299, 14307, 14314,
+ 14321, 14326, 14333, 14338, 14342, 14345, 14356, 14366, 14375, 14383,
+ 14394, 14406, 14416, 14421, 14425, 14430, 14435, 14439, 14445, 14453,
+ 14460, 14471, 14476, 14486, 14495, 14499, 14502, 14509, 14519, 14528,
+ 14535, 14539, 14546, 14552, 14557, 14562, 14566, 14575, 14580, 14584,
+ 14590, 14594, 14599, 14603, 14610, 14617, 14621, 14630, 14638, 14646,
+ 14653, 14661, 14673, 14684, 14694, 14701, 14707, 14716, 14727, 14736,
+ 14748, 14760, 14772, 14782, 14791, 14800, 14808, 14815, 14824, 14832,
+ 14836, 14841, 14847, 14853, 14858, 14863, 8093, 14867, 14869, 14873,
+ 14878, 14884, 14890, 14899, 14903, 14909, 14917, 14924, 14933, 14942,
+ 14951, 14960, 14969, 14978, 14987, 14996, 15006, 15016, 15025, 15031,
+ 15038, 15045, 15051, 15065, 15071, 15078, 15086, 15095, 15103, 15109,
+ 15118, 15127, 15138, 15148, 15156, 15163, 15171, 15180, 15193, 15202,
+ 15210, 15217, 15230, 15236, 15242, 15252, 15261, 15270, 15275, 15279,
+ 15285, 15291, 15296, 15303, 15310, 9445, 15315, 15320, 15327, 15335,
+ 15340, 15347, 15352, 15364, 13519, 15369, 15377, 15383, 15388, 15396,
+ 15404, 15411, 15419, 15425, 15433, 15441, 15447, 15452, 15458, 15465,
+ 15471, 15476, 15480, 15491, 15499, 15505, 15510, 15517, 15526, 15532,
+ 15537, 15545, 15554, 15568, 4068, 15572, 15577, 15582, 15588, 15593,
+ 15598, 15602, 15607, 15612, 15617, 8092, 15622, 15627, 15632, 15637,
+ 15642, 15646, 15651, 15656, 15661, 15666, 15672, 15678, 15683, 15687,
+ 15693, 15698, 15703, 15708, 9805, 15713, 15718, 15723, 15728, 15733,
+ 15750, 15768, 15780, 15793, 15810, 15826, 15843, 15853, 15872, 15883,
+ 15894, 15905, 15916, 15928, 15939, 15950, 15967, 15978, 15989, 15994,
+ 9810, 15999, 16003, 2420, 16007, 16010, 16016, 16024, 16032, 16041,
+ 16048, 16053, 16061, 16069, 16076, 16080, 16085, 16091, 16098, 16106,
+ 16113, 16125, 16132, 16138, 16146, 16151, 16157, 12695, 16163, 16172,
+ 16178, 16183, 16191, 16200, 16208, 16215, 16221, 16229, 16236, 16242,
+ 16248, 16255, 16262, 16268, 16274, 16283, 16291, 16301, 16308, 16314,
+ 16322, 16328, 16336, 16344, 16351, 16364, 16371, 16380, 16389, 16398,
+ 16406, 16416, 16423, 16428, 3727, 16435, 16440, 1353, 16444, 15623,
+ 16448, 16454, 16458, 16466, 16478, 16483, 16490, 16496, 16501, 16508,
+ 15628, 16512, 16516, 16520, 15633, 16524, 15638, 16528, 16535, 16540,
+ 16544, 16551, 16555, 16563, 16570, 16575, 16579, 16586, 16603, 16612,
+ 16616, 16619, 16627, 16633, 16638, 3805, 16642, 16644, 16652, 16659,
+ 16669, 16681, 16686, 16690, 16696, 16701, 16705, 16711, 16716, 16722,
+ 16725, 16732, 16740, 16747, 16753, 16758, 16764, 16769, 16776, 16782,
+ 16787, 16794, 16799, 16803, 16809, 16813, 16820, 16826, 16831, 16837,
+ 16845, 16853, 16860, 16866, 16871, 16877, 16883, 16891, 16899, 16905,
+ 16911, 16916, 16923, 16928, 16932, 16938, 16943, 16950, 16955, 16961,
+ 16964, 16970, 16976, 16979, 16983, 16987, 16999, 17005, 17010, 17017,
+ 17023, 17029, 17040, 17050, 17059, 17067, 17074, 17085, 17095, 17105,
+ 17113, 17116, 15652, 17121, 17126, 15657, 15798, 17134, 17147, 17162,
+ 17173, 15815, 17191, 17204, 17217, 17228, 11417, 17239, 17252, 17271,
+ 17282, 17293, 17304, 2688, 17317, 17321, 17329, 17340, 17348, 17363,
+ 17378, 17389, 17396, 17402, 17410, 17414, 17420, 17423, 17436, 17448,
+ 17458, 17466, 17473, 17481, 17491, 17496, 17503, 17508, 17515, 17526,
+ 17536, 17542, 17547, 17552, 15662, 17556, 17562, 17568, 17573, 17578,
+ 17583, 17587, 15667, 15673, 17591, 15679, 17596, 17604, 17609, 17613,
+ 17621, 17630, 17637, 17641, 9649, 17645, 17647, 17652, 17657, 17663,
+ 17668, 17673, 17678, 17683, 17687, 17693, 17699, 17704, 17710, 17715,
+ 17720, 17724, 17730, 17735, 17740, 17745, 17757, 17762, 17768, 17773,
+ 17778, 17784, 17790, 17795, 17800, 17805, 17812, 17818, 17829, 17836,
+ 17841, 17845, 17849, 17852, 17860, 17865, 17872, 17879, 17885, 17890,
+ 17895, 17900, 17907, 17917, 17925, 17930, 17937, 17943, 17952, 17962,
+ 17972, 17986, 18000, 18014, 18028, 18043, 18058, 18075, 18093, 18106,
+ 18112, 18117, 18122, 18126, 18134, 18139, 18147, 18153, 18159, 18164,
+ 18169, 18173, 18178, 18182, 18187, 18191, 18202, 18208, 18213, 18218,
+ 18225, 18230, 18234, 3690, 18239, 18245, 18252, 15688, 18258, 18262,
+ 18268, 18273, 18278, 18282, 18288, 18293, 18298, 18305, 18310, 14275,
+ 18314, 18319, 18323, 18328, 18334, 18340, 18347, 18357, 18365, 18372,
+ 18377, 18381, 18390, 18398, 18405, 18412, 18418, 18423, 18429, 18434,
+ 18439, 18445, 18450, 18456, 18461, 18467, 18473, 18480, 18486, 18491,
+ 18496, 9875, 18505, 18508, 18516, 18522, 18527, 18532, 18542, 18549,
+ 18555, 18560, 18565, 18571, 18576, 18582, 18587, 18593, 18599, 18604,
+ 18612, 18619, 18624, 18629, 18635, 18640, 18644, 18653, 18664, 18671,
+ 18679, 18686, 18691, 18696, 18702, 18707, 18715, 18721, 18727, 18734,
+ 18740, 18745, 18749, 18755, 18760, 18765, 18769, 18774, 1426, 8117, 2936,
+ 18778, 18782, 18786, 18790, 18794, 18798, 18801, 18806, 18813, 18821,
+ 15699, 18828, 18838, 18846, 18853, 18861, 18871, 18880, 9220, 18893,
+ 18898, 18903, 18911, 18918, 14371, 14380, 18925, 18935, 18950, 18956,
+ 18963, 18970, 18976, 18982, 18993, 19001, 19009, 19019, 19029, 15704,
+ 19038, 19044, 19050, 19058, 19066, 19071, 19080, 19088, 19100, 19110,
+ 19120, 19130, 19139, 19151, 19161, 19171, 19182, 19187, 19199, 19211,
+ 19223, 19235, 19247, 19259, 19271, 19283, 19295, 19307, 19318, 19330,
+ 19342, 19354, 19366, 19378, 19390, 19402, 19414, 19426, 19438, 19449,
+ 19461, 19473, 19485, 19497, 19509, 19521, 19533, 19545, 19557, 19569,
+ 19580, 19592, 19604, 19616, 19628, 19640, 19652, 19664, 19676, 19688,
+ 19700, 19711, 19723, 19735, 19747, 19759, 19771, 19783, 19795, 19807,
+ 19819, 19831, 19842, 19854, 19866, 19878, 19890, 19902, 19914, 19926,
+ 19938, 19950, 19962, 19973, 19985, 19997, 20009, 20021, 20033, 20045,
+ 20057, 20069, 20081, 20093, 20104, 20116, 20128, 20140, 20152, 20165,
+ 20178, 20191, 20204, 20217, 20230, 20243, 20255, 20268, 20281, 20294,
+ 20307, 20320, 20333, 20346, 20359, 20372, 20385, 20397, 20410, 20423,
+ 20436, 20449, 20462, 20475, 20488, 20501, 20514, 20527, 20539, 20552,
+ 20565, 20578, 20591, 20604, 20617, 20630, 20643, 20656, 20669, 20681,
+ 20694, 20707, 20720, 20733, 20746, 20759, 20772, 20785, 20798, 20811,
+ 20823, 20836, 20849, 20862, 20875, 20888, 20901, 20914, 20927, 20940,
+ 20953, 20965, 20976, 20989, 21002, 21015, 21028, 21041, 21054, 21067,
+ 21080, 21093, 21106, 21118, 21131, 21144, 21157, 21170, 21183, 21196,
+ 21209, 21222, 21235, 21248, 21260, 21273, 21286, 21299, 21312, 21325,
+ 21338, 21351, 21364, 21377, 21390, 21402, 21415, 21428, 21441, 21454,
+ 21467, 21480, 21493, 21506, 21519, 21532, 21544, 21557, 21570, 21583,
+ 21596, 21609, 21622, 21635, 21648, 21661, 21674, 21686, 21699, 21712,
+ 21725, 21738, 21751, 21764, 21777, 21790, 21803, 21816, 21828, 21841,
+ 21854, 21867, 21880, 21893, 21906, 21919, 21932, 21945, 21958, 21970,
+ 21983, 21996, 22009, 22022, 22035, 22048, 22061, 22074, 22087, 22100,
+ 22112, 22125, 22138, 22151, 22164, 22177, 22190, 22203, 22216, 22229,
+ 22242, 22254, 22267, 22280, 22293, 22306, 22319, 22332, 22345, 22358,
+ 22371, 22384, 22396, 22407, 22416, 22424, 22432, 22439, 22445, 22449,
+ 22455, 22461, 22469, 22474, 22480, 22485, 22489, 22498, 9654, 22509,
+ 22516, 22524, 22531, 22538, 11936, 22545, 22552, 22561, 22566, 22571,
+ 8145, 22578, 22583, 22586, 22591, 22599, 22606, 22613, 22620, 22626,
+ 22635, 22644, 22653, 22659, 22668, 22672, 22678, 22683, 22693, 22700,
+ 22706, 22714, 22720, 22727, 22737, 22746, 22750, 22757, 22761, 22766,
+ 22772, 22780, 22784, 22794, 15714, 22803, 22809, 22813, 22822, 22832,
+ 15719, 22838, 22845, 22856, 22864, 22874, 22883, 22891, 9410, 22899,
+ 22904, 22910, 22915, 22919, 22923, 22927, 10379, 22932, 22940, 22947,
+ 22956, 22963, 22970, 22976, 11856, 22983, 22989, 22993, 22999, 23006,
+ 23012, 23020, 23026, 23033, 23039, 23045, 23054, 23058, 23066, 23075,
+ 23082, 23087, 23091, 23102, 23107, 23112, 23117, 23130, 8349, 23134,
+ 23140, 23145, 23153, 23157, 23164, 23173, 23178, 15990, 23186, 23190,
+ 23202, 23207, 23211, 23214, 23220, 23226, 23232, 23237, 23241, 23244,
+ 23255, 23260, 9926, 23267, 23272, 1243, 9931, 23277, 23282, 23287, 23292,
+ 23297, 23302, 23307, 23312, 23317, 23322, 23327, 23332, 23338, 23343,
+ 23348, 23353, 23358, 23363, 23368, 23373, 23378, 23383, 23389, 23395,
+ 23400, 23405, 23410, 23415, 23420, 23425, 23430, 23435, 23440, 23446,
+ 23451, 23456, 23461, 23467, 23473, 23478, 23483, 23488, 23493, 23498,
+ 23503, 23508, 23513, 23519, 23524, 23529, 23534, 23539, 23545, 23550,
+ 23555, 23559, 134, 23567, 23571, 23575, 23579, 23584, 23588, 14281, 2346,
+ 23592, 23597, 23601, 23606, 23610, 23615, 23619, 23625, 23630, 23634,
+ 23638, 23646, 23650, 23654, 23659, 23664, 23668, 23674, 23679, 23683,
+ 23688, 23693, 23697, 23704, 23711, 23718, 23722, 23726, 23731, 23735,
+ 23738, 23744, 23757, 23762, 23768, 23777, 23782, 10151, 23787, 23796,
+ 23801, 23804, 2751, 2756, 23808, 23814, 23820, 7538, 23825, 23830, 23835,
+ 23841, 23846, 15134, 23851, 23856, 23861, 23866, 23872, 23877, 23882,
+ 23888, 23893, 23897, 23902, 23907, 23912, 23917, 23922, 23926, 23931,
+ 23935, 23940, 23945, 23950, 23955, 23959, 23964, 23968, 23973, 23978,
+ 23983, 23898, 2945, 23903, 23988, 23996, 24003, 10473, 24015, 24023,
+ 24033, 24051, 24070, 24079, 24087, 23908, 24094, 24099, 24107, 23913,
+ 24112, 24117, 24125, 24130, 23918, 24135, 24143, 24148, 24152, 24159,
+ 24165, 24174, 24182, 24186, 24189, 24196, 24200, 24204, 24209, 24215,
+ 24222, 24227, 9437, 1742, 1747, 24231, 24237, 24243, 24248, 24252, 24256,
+ 24260, 24264, 24268, 24272, 24276, 24280, 24283, 24289, 24296, 24304,
+ 24310, 24316, 24321, 24326, 24332, 24336, 24341, 15040, 15047, 24348,
+ 24360, 24363, 24370, 24374, 17881, 24381, 24389, 24400, 24409, 24422,
+ 24432, 24446, 24458, 24472, 24485, 24497, 24507, 24519, 24525, 24540,
+ 24564, 24582, 24601, 24614, 24628, 24646, 24662, 24679, 24697, 24708,
+ 24727, 24744, 24764, 24782, 24794, 24808, 24822, 24834, 24851, 24870,
+ 24888, 24900, 24918, 24937, 15858, 24950, 24970, 24982, 11448, 24994,
+ 24999, 25004, 25009, 25015, 25020, 25024, 25031, 25037, 2437, 25041,
+ 25047, 25051, 25054, 25058, 25061, 25069, 25075, 23936, 25079, 25088,
+ 25099, 25105, 25111, 25126, 25135, 25143, 25150, 25155, 25159, 25166,
+ 25172, 25181, 25189, 25196, 25206, 25215, 25225, 25230, 25239, 25248,
+ 25259, 25270, 4192, 25280, 25284, 25294, 25302, 25312, 25323, 25328,
+ 25338, 25346, 25353, 25359, 25366, 25371, 23946, 25375, 25384, 25388,
+ 25391, 25396, 25404, 25411, 25420, 25428, 25436, 25444, 25454, 25463,
+ 25469, 25475, 25479, 23951, 23956, 25483, 25493, 25503, 25513, 25521,
+ 25528, 25538, 25546, 25554, 25560, 25568, 865, 25577, 16065, 615, 25591,
+ 25600, 25608, 25619, 25630, 25640, 25649, 25661, 25670, 25679, 25686,
+ 25692, 25702, 25711, 25720, 25728, 25738, 25746, 25754, 9892, 25760,
+ 25763, 25767, 25772, 25777, 25781, 10588, 23969, 23974, 25789, 25795,
+ 25801, 25806, 25811, 25815, 25823, 25829, 25835, 25839, 3675, 25847,
+ 25852, 25857, 25861, 25865, 10701, 25872, 25880, 25894, 25901, 25907,
+ 10710, 10716, 25915, 25923, 25930, 25935, 25940, 23979, 25946, 25957,
+ 25961, 25966, 2640, 25971, 25982, 25988, 25993, 25997, 26001, 26004,
+ 26011, 26018, 26024, 26031, 26037, 26041, 23984, 26046, 26050, 26054,
+ 1431, 8544, 26059, 26064, 26069, 26074, 26079, 26084, 26089, 26094,
+ 26099, 26104, 26109, 26114, 26119, 26124, 26130, 26135, 26140, 26145,
+ 26150, 26155, 26160, 26166, 26171, 26176, 26181, 26186, 26191, 26196,
+ 26201, 26207, 26213, 26218, 26224, 26229, 26234, 5, 26240, 26244, 26248,
+ 26252, 26257, 26261, 26265, 26269, 26273, 26278, 26282, 26287, 26291,
+ 26294, 26298, 26303, 26307, 26312, 26316, 26320, 26324, 26329, 26333,
+ 26337, 26347, 26352, 26356, 26360, 26365, 26370, 26379, 26384, 26389,
+ 26393, 26397, 26410, 26422, 26431, 26440, 26445, 26451, 26456, 26460,
+ 26464, 26474, 26483, 26491, 26497, 26502, 26506, 26513, 26523, 26532,
+ 26540, 11770, 26548, 26556, 26565, 26574, 26582, 26592, 26597, 26601,
+ 26605, 26608, 26610, 26614, 26618, 26623, 26628, 26632, 26636, 26639,
+ 26643, 26646, 26650, 26653, 26656, 26660, 26666, 26670, 26674, 26678,
+ 26683, 26688, 26693, 26697, 26700, 26705, 26711, 26716, 26722, 26727,
+ 26731, 26737, 26741, 26745, 26750, 26754, 26759, 26764, 26768, 26772,
+ 26779, 26783, 26786, 26790, 26794, 26800, 26806, 26810, 26814, 26819,
+ 26826, 26832, 26836, 26845, 26849, 26853, 26856, 26862, 26867, 26873,
+ 1475, 1806, 26878, 26883, 26888, 26893, 26898, 26903, 26908, 2174, 2220,
+ 26913, 26916, 26920, 26924, 26929, 26933, 16077, 26937, 26942, 26947,
+ 26951, 26954, 26959, 26963, 26968, 26972, 16081, 26977, 26980, 26983,
+ 26987, 26992, 26996, 27009, 27013, 27016, 27024, 27033, 27040, 27045,
+ 27051, 27057, 27065, 27072, 27079, 27083, 27087, 27091, 27096, 27101,
+ 27105, 27113, 27118, 27130, 27141, 27146, 27150, 27157, 27161, 27166,
+ 27172, 27175, 27180, 27185, 27189, 27193, 27196, 27202, 8248, 2350,
+ 27206, 27211, 27227, 10198, 27247, 27256, 27272, 27276, 27283, 27286,
+ 27292, 27302, 27308, 27317, 27332, 27344, 27355, 27363, 27372, 27378,
+ 27387, 27397, 27407, 27418, 27429, 27439, 27448, 27455, 27464, 27472,
+ 27479, 27487, 27494, 27501, 27514, 27521, 27529, 27536, 27542, 27547,
+ 27556, 27562, 27567, 27575, 27582, 27589, 25304, 27601, 27613, 27627,
+ 27635, 27642, 27654, 27663, 27672, 27680, 27688, 27696, 27703, 27709,
+ 27718, 27726, 27736, 27745, 27755, 27764, 27773, 27781, 27786, 27790,
+ 27793, 27797, 27801, 27805, 27809, 27813, 27819, 27825, 27833, 16139,
+ 27840, 27845, 27852, 27858, 27865, 16147, 27872, 27875, 27887, 27895,
+ 27901, 27906, 27910, 27921, 10651, 27931, 27939, 27949, 27958, 27965,
+ 27972, 27980, 27984, 16158, 27987, 27994, 27998, 28004, 28007, 28014,
+ 28020, 28027, 28033, 28037, 28042, 28046, 28055, 28062, 28068, 8306,
+ 28075, 28083, 28090, 28096, 28101, 28107, 28113, 28121, 28127, 28131,
+ 28134, 28136, 27798, 28145, 28151, 28157, 28167, 28172, 28179, 28185,
+ 28190, 28195, 28200, 28204, 28209, 28216, 28222, 28231, 28235, 28242,
+ 28248, 28257, 4378, 28263, 28269, 28274, 28281, 28292, 28297, 28301,
+ 28311, 28317, 28321, 28326, 28336, 28345, 28349, 28356, 28364, 28371,
+ 28377, 28382, 28390, 28397, 28402, 28409, 28421, 28430, 28434, 14212,
+ 28442, 28452, 28456, 27020, 28467, 28472, 28476, 28483, 28490, 23670,
+ 27723, 28495, 28499, 28502, 24714, 28507, 28521, 28537, 28555, 28574,
+ 28591, 28609, 24733, 28626, 28646, 24750, 28658, 28670, 17178, 28682,
+ 24770, 28696, 28708, 11461, 28722, 28727, 28732, 28737, 28743, 28749,
+ 28755, 28759, 28767, 28774, 28779, 28789, 28795, 11059, 28801, 28803,
+ 28808, 28816, 28820, 28212, 28826, 28833, 12601, 12611, 28840, 28850,
+ 28855, 28859, 28862, 28868, 28876, 28888, 28898, 28914, 28927, 28941,
+ 17196, 28955, 28962, 28966, 28969, 28974, 28978, 28985, 28992, 28999,
+ 29009, 29014, 29019, 29024, 29032, 29040, 29045, 29054, 29059, 3353,
+ 29063, 29066, 29069, 29074, 29081, 29086, 29102, 29110, 29118, 9966,
+ 29126, 29131, 29135, 29141, 29146, 29152, 29155, 29161, 29173, 29181,
+ 29188, 29194, 29201, 29212, 29226, 29239, 29245, 29254, 29260, 29269,
+ 29281, 29292, 29302, 29311, 29320, 29328, 29339, 8288, 29346, 29353,
+ 29359, 29364, 29370, 29377, 29387, 29397, 29406, 29412, 29419, 29424,
+ 29432, 29439, 29447, 29455, 29467, 6563, 995, 29474, 29483, 29491, 29497,
+ 29503, 29508, 29512, 29515, 29521, 29528, 29533, 29538, 29543, 29547,
+ 29559, 29570, 29579, 29587, 16323, 29592, 29597, 29603, 29609, 12594,
+ 9058, 29614, 29618, 29622, 29625, 29628, 29634, 29642, 29650, 29654,
+ 29658, 29663, 29666, 29675, 29679, 29682, 29690, 29701, 29705, 29711,
+ 29717, 29721, 29727, 29735, 29757, 29781, 29790, 29797, 29804, 29810,
+ 29818, 29824, 29829, 29840, 29858, 29865, 29873, 29877, 29882, 29891,
+ 29904, 29912, 29924, 29935, 29946, 29956, 29970, 29979, 29987, 29999,
+ 10215, 30010, 30021, 30033, 30043, 30052, 30057, 30061, 30069, 30080,
+ 30090, 30095, 30099, 30102, 30105, 30113, 30121, 30130, 30140, 30149,
+ 30155, 30169, 2702, 30191, 30202, 30211, 30221, 30233, 30242, 30251,
+ 30261, 30269, 30277, 30286, 30291, 30302, 30307, 30318, 30322, 30332,
+ 30341, 30349, 30359, 30369, 30377, 30386, 30393, 30401, 30408, 30417,
+ 30426, 30430, 30438, 30445, 30453, 30460, 30471, 30486, 30493, 30499,
+ 30509, 30518, 30524, 30535, 30539, 30546, 30550, 30556, 15265, 30562,
+ 30566, 30571, 30577, 30584, 30588, 30592, 30600, 30608, 30614, 30623,
+ 30630, 30635, 30640, 30650, 25373, 30654, 30657, 30662, 30667, 30672,
+ 30677, 30682, 30687, 30692, 30697, 30703, 30708, 30713, 30719, 1199, 660,
+ 30724, 30733, 2398, 30740, 30745, 30749, 30755, 1248, 578, 290, 30760,
+ 30769, 30777, 30786, 30794, 30805, 30813, 30822, 30830, 30835, 10797,
+ 30839, 30847, 30855, 30860, 16094, 3824, 30866, 30872, 30878, 6148,
+ 30883, 30887, 30893, 30897, 30903, 30908, 30915, 1441, 30921, 30928,
+ 1348, 6156, 30932, 30942, 30950, 30956, 30966, 30975, 30983, 30989,
+ 30997, 31004, 12136, 31010, 31017, 31022, 31029, 1494, 219, 2173, 31035,
+ 31041, 31048, 31059, 31070, 31078, 31085, 31095, 31104, 31112, 31121,
+ 31128, 31135, 31148, 31155, 31161, 31172, 31191, 1253, 31196, 31201,
+ 31209, 3742, 31213, 31218, 31222, 31226, 1445, 26637, 31236, 31240,
+ 31245, 31249, 3619, 31255, 31263, 31270, 31281, 31289, 31297, 3743, 346,
+ 31302, 31310, 31318, 31325, 31331, 31336, 2242, 11628, 31343, 31349,
+ 28038, 28287, 31355, 574, 106, 31359, 31363, 31369, 663, 9841, 31374,
+ 31381, 31387, 31391, 1639, 31394, 31398, 16576, 31401, 31406, 31413,
+ 31419, 31424, 31432, 31439, 31445, 24132, 31449, 31453, 31457, 3813,
+ 18180, 31461, 31466, 31470, 31473, 31481, 31489, 31494, 31502, 31505,
+ 31512, 31522, 31534, 31539, 31543, 31551, 31558, 31564, 31571, 31578,
+ 31581, 31585, 31589, 1449, 31599, 31601, 31606, 31612, 31618, 31623,
+ 31628, 31633, 31638, 31643, 31648, 31653, 31658, 31663, 31668, 31673,
+ 31678, 31683, 31688, 31694, 31700, 31706, 31712, 31717, 31722, 31727,
+ 31733, 31738, 31743, 31748, 31754, 31759, 31765, 31770, 31775, 31780,
+ 31785, 31791, 31796, 31802, 31807, 31812, 31817, 31822, 31828, 31833,
+ 31839, 31844, 31849, 31854, 31859, 31864, 31869, 31874, 31879, 31884,
+ 31890, 31896, 31902, 31907, 31912, 31917, 31922, 31928, 31934, 31940,
+ 31946, 31952, 31958, 31963, 31969, 31974, 31979, 31984, 31989, 31995,
+ 2482, 32000, 2489, 2496, 2793, 32005, 2502, 2512, 32011, 32015, 32020,
+ 32025, 32031, 32036, 32041, 32045, 32050, 32056, 32061, 32066, 32071,
+ 32077, 32082, 32086, 32090, 32095, 32100, 32105, 32110, 32115, 32121,
+ 32127, 32132, 32136, 32141, 32147, 32151, 32156, 32161, 32166, 32171,
+ 32175, 32178, 32183, 32188, 32193, 32198, 32203, 32209, 32215, 32220,
+ 32225, 32230, 32234, 32239, 32244, 32249, 32254, 32259, 32264, 32268,
+ 32273, 32278, 32283, 32287, 32291, 32295, 32300, 32308, 32313, 32318,
+ 32324, 32330, 32336, 32341, 32345, 32348, 32353, 32358, 32362, 32367,
+ 32372, 32376, 32381, 32385, 32388, 32393, 3914, 18906, 32398, 32403,
+ 32408, 32416, 22959, 30925, 9518, 32421, 32426, 32430, 32435, 32439,
+ 32443, 32448, 32452, 32455, 32458, 32462, 32467, 32471, 32479, 32483,
+ 32486, 32491, 32495, 32499, 32504, 32509, 32513, 32519, 32524, 32529,
+ 32536, 32543, 32547, 32550, 32556, 32565, 32572, 32580, 32587, 32591,
+ 32596, 32600, 32604, 32610, 32616, 32620, 32626, 32631, 32636, 32640,
+ 32647, 32653, 32659, 32665, 32671, 32678, 32684, 32690, 32696, 32702,
+ 32708, 32714, 32720, 32727, 32733, 32740, 32746, 32752, 32758, 32764,
+ 32770, 32776, 32782, 32788, 32794, 12479, 32800, 32806, 32811, 32816,
+ 32821, 32824, 32830, 32838, 32843, 32847, 32852, 32858, 32867, 32873,
+ 32878, 32883, 32888, 32892, 32897, 32902, 32907, 32912, 32917, 32924,
+ 32931, 32937, 32943, 32948, 17822, 32955, 32961, 32968, 32974, 32980,
+ 32985, 32993, 32998, 10372, 33002, 33007, 33012, 33018, 33023, 33028,
+ 33032, 33037, 33042, 33048, 33053, 33058, 33063, 33067, 33072, 33077,
+ 33081, 33086, 33091, 33095, 33100, 33104, 33109, 33114, 33119, 33123,
+ 33128, 33132, 33136, 16682, 33141, 33150, 33156, 33162, 33171, 33179,
+ 33188, 33196, 33201, 33205, 33212, 33218, 33226, 33230, 33233, 33238,
+ 33242, 33251, 33259, 33277, 33283, 1493, 33289, 33292, 33296, 24238,
+ 24244, 33302, 33306, 33317, 33328, 33339, 33351, 33355, 33362, 33369,
+ 33374, 33378, 6204, 928, 22958, 33386, 33391, 33395, 33400, 33404, 33410,
+ 33415, 33421, 33426, 33432, 33437, 33443, 33448, 33454, 33460, 33466,
+ 33471, 33427, 33433, 33475, 33480, 33486, 33491, 33497, 33502, 33508,
+ 33513, 33438, 11314, 33517, 33449, 33455, 33461, 2885, 3533, 33523,
+ 33526, 33531, 33537, 33543, 33549, 33556, 33562, 33568, 33574, 33580,
+ 33586, 33592, 33598, 33604, 33610, 33616, 33622, 33628, 33635, 33641,
+ 33647, 33653, 33659, 33665, 33668, 33673, 33676, 33683, 33688, 33696,
+ 33701, 33706, 33712, 33717, 33722, 33726, 33731, 33737, 33742, 33748,
+ 33753, 33759, 33764, 33770, 33776, 33780, 33785, 33790, 33795, 33800,
+ 33804, 33809, 33814, 33819, 33825, 33831, 33837, 33843, 33848, 33852,
+ 33855, 33861, 33867, 33876, 33884, 33891, 33896, 33900, 33904, 33909,
+ 16530, 33914, 33922, 33928, 3866, 1358, 33933, 33937, 8359, 33943, 33949,
+ 33956, 8368, 33960, 33966, 33973, 33979, 33988, 33996, 9244, 34008,
+ 34012, 34019, 34025, 34030, 34034, 34038, 34041, 34051, 34060, 34068,
+ 33428, 34073, 34083, 34093, 34103, 34109, 34114, 34124, 34129, 34142,
+ 34156, 34167, 34179, 34191, 34205, 34218, 34230, 34242, 15899, 34256,
+ 34261, 34266, 34270, 34274, 34278, 1795, 29290, 34282, 34287, 33476,
+ 34292, 34295, 34300, 34305, 34310, 34316, 34322, 10974, 34327, 34333,
+ 34340, 17130, 34346, 34351, 34356, 34360, 34365, 34370, 33481, 34375,
+ 34380, 34385, 34391, 33487, 34396, 34399, 34406, 34414, 34420, 34426,
+ 34432, 34443, 34448, 34455, 34462, 34469, 34477, 34486, 34495, 34501,
+ 34507, 34515, 33492, 34520, 34526, 34532, 33498, 34537, 34542, 34550,
+ 34558, 34564, 34571, 34577, 34584, 34591, 34597, 34605, 34615, 34622,
+ 34628, 34633, 34639, 34644, 34649, 34656, 34665, 34673, 34678, 34684,
+ 34691, 34699, 34705, 34710, 34716, 34725, 34732, 30135, 34738, 34742,
+ 34747, 34756, 34761, 34766, 34771, 13548, 34779, 34784, 34789, 34794,
+ 34798, 34803, 34808, 34815, 34820, 34825, 34830, 33503, 22895, 34836,
+ 2558, 144, 34839, 34842, 34846, 34850, 34860, 34868, 34875, 34879, 34882,
+ 34890, 34897, 34904, 34913, 34917, 34920, 34926, 34930, 34938, 34946,
+ 34950, 34954, 34957, 34963, 34970, 34974, 34978, 34985, 34993, 33439,
+ 35000, 35008, 35013, 11034, 623, 369, 35025, 35030, 35035, 35041, 35046,
+ 35051, 3887, 35056, 35059, 35064, 35069, 35074, 35079, 35084, 35091,
+ 24356, 35096, 35101, 35106, 35111, 35116, 35122, 35127, 35133, 33679,
+ 35139, 35144, 35150, 35156, 35166, 35171, 35176, 35180, 35185, 35190,
+ 35195, 35200, 35213, 35218, 24019, 18255, 3900, 35222, 35228, 35233,
+ 35238, 35244, 35249, 35254, 35258, 35263, 35268, 35274, 35279, 35284,
+ 1363, 35288, 35293, 35298, 35303, 35307, 35312, 35317, 35322, 35328,
+ 35334, 35339, 35343, 35347, 35352, 35357, 35362, 35366, 35374, 35378,
+ 35384, 35388, 35395, 18039, 33450, 35401, 35408, 35416, 35423, 35429,
+ 35442, 35454, 35459, 35465, 35469, 2812, 35473, 35477, 34965, 35486,
+ 35497, 35502, 30198, 35507, 35512, 35516, 35521, 24249, 35525, 35529,
+ 35534, 33456, 22985, 35538, 35543, 35549, 35554, 35558, 35562, 35565,
+ 35569, 35575, 35584, 35595, 35607, 33462, 35612, 35615, 35619, 35623,
+ 406, 35628, 35633, 35638, 35643, 35648, 35653, 35659, 35664, 35669,
+ 35675, 35680, 35686, 35691, 35697, 35702, 35707, 35712, 35717, 35722,
+ 35727, 35732, 35737, 35743, 35748, 35753, 35758, 35763, 35768, 35773,
+ 35778, 35784, 35790, 35795, 35800, 35805, 35810, 35815, 35820, 35825,
+ 35830, 35835, 35840, 35845, 35850, 35855, 35860, 35865, 35870, 35875,
+ 35880, 35886, 325, 9, 35891, 35895, 35899, 35907, 35911, 35915, 35918,
+ 35921, 35923, 35928, 35932, 35937, 35941, 35946, 35950, 35955, 35959,
+ 35962, 35964, 35968, 35973, 35977, 35988, 35991, 35993, 35997, 36009,
+ 36018, 36022, 36026, 36032, 36037, 36046, 36052, 36057, 36062, 36066,
+ 36070, 36075, 36082, 36087, 36093, 36098, 36102, 36109, 27731, 27741,
+ 36113, 36118, 36123, 36128, 36135, 36139, 36146, 36152, 8491, 36156,
+ 36165, 36173, 36188, 36202, 36211, 36219, 36230, 36239, 36244, 36251,
+ 7556, 36261, 36266, 36271, 36275, 36278, 36283, 36287, 36292, 36296,
+ 36303, 36308, 36313, 36318, 9391, 36328, 36330, 36333, 36336, 36340,
+ 36346, 36350, 36355, 36360, 36378, 36392, 36411, 36428, 36437, 36445,
+ 36450, 36455, 1486, 36461, 36467, 36472, 36482, 36491, 36499, 36504,
+ 36510, 36515, 36524, 36535, 36540, 36547, 36551, 36558, 36566, 36573,
+ 36586, 36594, 36598, 36608, 36613, 36617, 36625, 36633, 36638, 36642,
+ 36646, 36655, 36661, 36666, 36674, 36684, 36693, 36702, 36711, 36722,
+ 36730, 36741, 36750, 36757, 36763, 36768, 36779, 36790, 36795, 36799,
+ 36802, 36806, 36814, 36820, 36831, 36842, 36853, 36864, 36875, 36886,
+ 36897, 36908, 36920, 36932, 36944, 36956, 36968, 36980, 36992, 36996,
+ 37004, 37010, 37017, 37023, 37028, 37034, 2457, 37038, 37040, 37045,
+ 37050, 37055, 37058, 37060, 37064, 37067, 37074, 37078, 10664, 37082,
+ 37088, 37098, 37103, 37109, 37113, 37118, 37131, 28162, 37137, 37146,
+ 37155, 19104, 37162, 37171, 34089, 37179, 37184, 37188, 37197, 37205,
+ 37212, 37217, 37221, 37226, 37234, 37238, 37246, 37252, 37258, 37263,
+ 37267, 37270, 37275, 37288, 37304, 24840, 37321, 37333, 37350, 37362,
+ 37376, 24857, 24876, 37388, 37400, 2719, 37414, 37419, 37424, 37429,
+ 37433, 37440, 37452, 37459, 37468, 37471, 37482, 37493, 37498, 34512,
+ 852, 37502, 37506, 37510, 37513, 37518, 37523, 37529, 37534, 37539,
+ 37545, 37551, 37556, 37560, 37565, 37570, 37575, 37579, 37582, 37588,
+ 37593, 37598, 37603, 37607, 37612, 37618, 37626, 28414, 37631, 37636,
+ 37643, 37649, 37655, 37660, 37668, 24365, 37675, 37680, 37685, 37690,
+ 37694, 37697, 37702, 37706, 37710, 37717, 37723, 37729, 37735, 37742,
+ 37747, 37753, 36628, 37757, 37761, 37766, 37779, 37784, 37790, 37798,
+ 37805, 37813, 37823, 37829, 37835, 37841, 37845, 37854, 37862, 37869,
+ 37874, 37879, 11337, 37884, 37891, 37897, 37907, 37912, 37918, 37926,
+ 3775, 37933, 37940, 37946, 37953, 3781, 37957, 37962, 37973, 37980,
+ 37986, 37995, 37999, 4244, 38002, 38009, 38015, 38021, 38029, 38039,
+ 31326, 38046, 38054, 38060, 38065, 38071, 38076, 38080, 28010, 38086,
+ 38093, 38099, 38108, 38115, 25565, 38121, 38126, 38130, 38138, 38146,
+ 10330, 6179, 38153, 38157, 38159, 38163, 38168, 38170, 38175, 38181,
+ 38186, 38191, 38198, 35087, 38204, 38209, 38213, 38218, 38222, 38231,
+ 38235, 38241, 38248, 38254, 38261, 38266, 38275, 38280, 38284, 38289,
+ 38296, 38304, 38312, 38317, 23041, 38321, 38324, 38328, 38332, 11725,
+ 872, 38336, 38341, 38349, 38353, 38362, 38369, 38373, 38377, 38385,
+ 38392, 38402, 38406, 38410, 38418, 38426, 38432, 38437, 38446, 14530,
+ 38452, 38461, 38466, 38473, 38480, 38488, 38496, 38504, 38509, 38516,
+ 38523, 38530, 38537, 38544, 38549, 38555, 38572, 38580, 38590, 38598,
+ 38605, 414, 38609, 38615, 38619, 38624, 36235, 38630, 38633, 38637,
+ 38648, 38656, 3786, 38664, 38670, 38676, 38686, 38695, 38705, 38712,
+ 38718, 38723, 3792, 3798, 38732, 38739, 38747, 38752, 38756, 38763,
+ 38771, 38778, 38784, 38793, 38803, 38809, 38817, 38826, 38833, 38841,
+ 38848, 23728, 38852, 38859, 38865, 38875, 38884, 38892, 38903, 38907,
+ 38917, 38923, 38930, 38938, 38947, 38956, 38966, 38977, 38984, 38989,
+ 38996, 3088, 39004, 39010, 39015, 39021, 39027, 39032, 39045, 39058,
+ 39071, 39078, 39084, 39092, 39100, 39105, 39109, 1455, 39113, 39117,
+ 39121, 39125, 39129, 39133, 39137, 39141, 39145, 39149, 39153, 39157,
+ 39161, 39165, 39169, 39173, 39177, 39181, 39185, 39189, 39193, 39197,
+ 39201, 39205, 39209, 39213, 39217, 39221, 39225, 39229, 39233, 39237,
+ 39241, 39245, 39249, 39253, 39257, 39261, 39265, 39269, 39273, 39277,
+ 39281, 39285, 39289, 39293, 39297, 39301, 39305, 39309, 39313, 39317,
+ 39321, 39325, 39329, 39333, 39337, 39341, 39345, 39349, 39353, 39357,
+ 39361, 39365, 39369, 39373, 39377, 39381, 39385, 39389, 39393, 39397,
+ 39401, 39405, 39409, 39413, 39417, 39421, 39425, 39429, 39433, 39437,
+ 39441, 39445, 39449, 39453, 39457, 39461, 39465, 39469, 39473, 39477,
+ 39481, 39485, 39489, 39493, 39497, 39501, 39505, 39509, 39513, 39517,
+ 39521, 39525, 39529, 39533, 39537, 39541, 39545, 39549, 39553, 39557,
+ 39561, 39565, 39569, 39573, 39577, 39581, 39585, 39589, 39593, 39597,
+ 39601, 39605, 39609, 39613, 39617, 39621, 39625, 39629, 39633, 39637,
+ 39641, 39645, 39649, 39653, 39657, 39661, 39665, 39669, 39673, 39677,
+ 39681, 39685, 39689, 39693, 39697, 39701, 39705, 39709, 39713, 39717,
+ 39721, 39725, 39730, 39734, 39739, 39743, 39748, 39752, 39757, 39761,
+ 39767, 39772, 39776, 39781, 39785, 39790, 39794, 39799, 39803, 39808,
+ 39812, 39817, 39821, 39826, 39830, 39836, 39842, 39847, 39851, 39856,
+ 39860, 39866, 39871, 39875, 39880, 39884, 39889, 39893, 39899, 39904,
+ 39908, 39913, 39917, 39922, 39926, 39931, 39935, 39941, 39946, 39950,
+ 39955, 39959, 39965, 39970, 39974, 39979, 39983, 39988, 39992, 39997,
+ 40001, 40006, 40010, 40016, 40021, 40025, 40031, 40036, 40040, 40046,
+ 40051, 40055, 40060, 40064, 40069, 40073, 40079, 40085, 40091, 40097,
+ 40103, 40109, 40115, 40121, 40126, 40130, 40135, 40139, 40145, 40150,
+ 40154, 40159, 40163, 40168, 40172, 40177, 40181, 40186, 40190, 40195,
+ 40199, 40204, 40208, 40214, 40219, 40223, 40228, 40232, 40238, 40244,
+ 40249, 116, 57, 40253, 40255, 40259, 40263, 40267, 40272, 40276, 40280,
+ 10251, 40285, 40291, 1756, 6597, 40297, 40300, 40305, 40309, 40314,
+ 40318, 40322, 40327, 11121, 40331, 40335, 40339, 525, 40343, 16783,
+ 40348, 40352, 40357, 40362, 40367, 40371, 40378, 28186, 40384, 40387,
+ 40391, 40396, 40402, 40406, 40409, 40417, 40423, 40428, 40432, 40435,
+ 40439, 40445, 40449, 40453, 3584, 3589, 31537, 40456, 40460, 40464,
+ 40468, 40472, 40480, 40487, 40491, 14480, 40498, 40503, 40517, 40524,
+ 40535, 335, 40540, 40544, 40550, 40562, 40568, 40574, 31574, 40578,
+ 40584, 40593, 40597, 40601, 40606, 40612, 40617, 40621, 40626, 40630,
+ 40634, 40641, 40647, 40652, 40667, 40682, 40697, 40713, 40731, 11071,
+ 40745, 40752, 40756, 40759, 40768, 40773, 40777, 40785, 17333, 40793,
+ 40797, 40807, 40818, 31507, 40831, 40835, 40844, 40862, 40881, 40889,
+ 10525, 11234, 40893, 24261, 40896, 32475, 40901, 10524, 40906, 40912,
+ 40917, 40923, 40928, 40934, 40939, 40945, 40950, 40956, 40962, 40968,
+ 40973, 40929, 40935, 40940, 40946, 40951, 40957, 40963, 8504, 4089,
+ 40977, 40985, 40989, 40992, 40996, 41001, 41006, 41013, 41019, 41025,
+ 41030, 16174, 41034, 28022, 41038, 41042, 41046, 41052, 41056, 30075,
+ 41065, 9544, 41069, 9937, 41072, 41079, 41085, 41089, 13004, 41096,
+ 41102, 41107, 41114, 41121, 41128, 30781, 8410, 41135, 41142, 41149,
+ 41155, 41160, 41167, 41178, 41184, 41189, 41194, 41199, 41203, 41208,
+ 41215, 40930, 41219, 41229, 41238, 41249, 41255, 41263, 41270, 41275,
+ 41280, 41285, 41290, 41295, 41299, 41303, 41310, 41316, 41324, 2353,
+ 1050, 11137, 11149, 11154, 11160, 41333, 11165, 11170, 11176, 41338,
+ 41348, 41352, 11181, 41357, 18453, 41360, 41365, 41369, 37463, 41380,
+ 41385, 41392, 41399, 41403, 41406, 41414, 11084, 41421, 41424, 41430,
+ 41440, 6231, 41449, 41455, 41459, 41467, 41471, 41481, 41487, 41492,
+ 41503, 41512, 41521, 41530, 41539, 41548, 41557, 41566, 41572, 41578,
+ 41583, 41589, 41595, 41601, 41606, 41609, 41616, 41622, 41626, 41631,
+ 41638, 41645, 41649, 41652, 41662, 41675, 41684, 41693, 41704, 41717,
+ 41729, 41740, 41749, 41760, 41765, 41774, 41779, 11186, 41785, 41792,
+ 41800, 41805, 41809, 41816, 41823, 4041, 20, 41827, 41832, 18302, 41836,
+ 41839, 41842, 30255, 41846, 30790, 41854, 41858, 41862, 41865, 41871,
+ 41877, 33527, 41882, 41890, 41896, 41903, 30238, 41907, 30441, 41911,
+ 41920, 41924, 41932, 41938, 41944, 41949, 41953, 30809, 41959, 41962,
+ 41970, 41978, 4379, 41984, 41988, 41993, 42000, 42006, 42011, 42016,
+ 42020, 42026, 42031, 42037, 4297, 944, 42044, 42048, 42051, 16664, 42063,
+ 42071, 42079, 42087, 42095, 42102, 42110, 42118, 42125, 42133, 42141,
+ 42149, 42157, 42165, 42173, 42181, 42189, 42197, 42205, 42213, 42220,
+ 42228, 42236, 42244, 42252, 42260, 42268, 42276, 42284, 42292, 42300,
+ 42308, 42316, 42324, 42332, 42340, 42348, 42356, 42364, 42372, 42379,
+ 42387, 42394, 42402, 42410, 42418, 42426, 42434, 42442, 42450, 42458,
+ 42469, 23764, 42474, 42477, 42484, 42488, 42494, 42498, 42504, 42509,
+ 42515, 42520, 42525, 42529, 42533, 42538, 42543, 42553, 42559, 42572,
+ 42578, 42584, 42590, 42597, 42602, 42608, 42613, 18198, 1458, 831, 42618,
+ 42621, 42624, 42627, 33611, 33617, 42630, 33623, 33636, 33642, 33648,
+ 42636, 33654, 33660, 42642, 42648, 26, 42656, 42663, 42667, 42671, 42679,
+ 34401, 42683, 42687, 42694, 42699, 42703, 42708, 42714, 42719, 42725,
+ 42730, 42734, 42738, 42742, 42747, 42751, 42756, 42760, 42764, 42771,
+ 42776, 42780, 42784, 42789, 42793, 42798, 42802, 42806, 42811, 42817,
+ 16924, 16929, 42822, 42826, 42829, 42833, 42837, 22852, 42842, 42846,
+ 42852, 42859, 42865, 42870, 42880, 42885, 42893, 42897, 42900, 34416,
+ 42904, 4356, 42909, 42914, 42918, 42923, 42927, 42932, 14548, 42943,
+ 42947, 42950, 42954, 42959, 42963, 42968, 42973, 42977, 42981, 42985,
+ 42988, 42992, 8523, 14564, 42995, 42998, 43004, 43009, 43015, 43020,
+ 43026, 43031, 43037, 43042, 43048, 43054, 43060, 43065, 43069, 43073,
+ 43082, 43098, 43114, 43124, 30145, 43131, 43135, 43140, 43145, 43149,
+ 43153, 38951, 43159, 43164, 43168, 43175, 43180, 43185, 43189, 43193,
+ 43199, 29093, 43203, 23136, 43208, 43215, 43223, 43229, 43236, 43244,
+ 43250, 43254, 43259, 43265, 43273, 43278, 43282, 43291, 10232, 43299,
+ 43303, 43311, 43318, 43323, 43328, 43333, 43337, 43340, 43344, 43347,
+ 43351, 43358, 43363, 43367, 43373, 28492, 33674, 43377, 43386, 43394,
+ 43400, 43407, 43413, 43419, 43424, 43427, 43429, 43436, 43443, 43449,
+ 43453, 43456, 43460, 43464, 43468, 43473, 43477, 43481, 43484, 43488,
+ 43502, 24906, 43521, 43534, 43547, 43560, 24924, 43575, 11422, 43590,
+ 43596, 43600, 43604, 43608, 43612, 43619, 43624, 43628, 43635, 43641,
+ 43646, 43652, 43662, 43674, 43685, 43690, 43697, 43701, 43705, 43708,
+ 17343, 3855, 43716, 16951, 43729, 43736, 43743, 43747, 43751, 43756,
+ 43762, 43767, 43773, 43777, 43781, 43784, 43789, 43793, 43798, 8082,
+ 16962, 43803, 43807, 43813, 43822, 43827, 43836, 43843, 38799, 43849,
+ 43854, 43858, 43863, 43870, 43876, 43880, 43883, 43887, 43892, 15864,
+ 43899, 43906, 43910, 43913, 43918, 43923, 43929, 43934, 43939, 43943,
+ 43948, 43958, 43963, 43969, 43974, 43980, 43985, 43991, 44001, 44006,
+ 44011, 44015, 44020, 7558, 7570, 44025, 44028, 44035, 44041, 44050, 9477,
+ 36760, 44058, 44062, 44066, 34464, 44074, 44085, 44093, 38999, 44100,
+ 44105, 44110, 44121, 44128, 44139, 34488, 23147, 44147, 907, 44152,
+ 14913, 44158, 30229, 44164, 44169, 44179, 44188, 44195, 44201, 44205,
+ 44208, 44215, 44221, 44228, 44234, 44244, 44252, 44258, 44264, 44269,
+ 44273, 44280, 44285, 44291, 44298, 44304, 43469, 44309, 44313, 558,
+ 15029, 44319, 44324, 44327, 44333, 44341, 1380, 44346, 44350, 44355,
+ 44360, 44365, 44372, 44376, 44381, 44387, 44391, 33684, 44396, 44401,
+ 44410, 44417, 44427, 44433, 30273, 44450, 44459, 44467, 44473, 44478,
+ 44485, 44491, 44499, 44508, 44516, 44520, 44525, 44533, 31251, 34497,
+ 44539, 44558, 17257, 44572, 44588, 44602, 44608, 44613, 44618, 44623,
+ 44629, 34503, 44634, 44637, 44644, 44649, 44653, 404, 2995, 44660, 44665,
+ 44670, 29451, 44488, 44674, 44679, 44687, 44691, 44694, 44699, 44705,
+ 44711, 44716, 44720, 30328, 44723, 44728, 44732, 44735, 44740, 44744,
+ 44749, 44754, 44758, 44763, 44767, 44771, 44775, 22848, 22859, 44780,
+ 44785, 44791, 44796, 44802, 29050, 44807, 44811, 22945, 17549, 44814,
+ 44819, 44824, 44829, 44834, 44839, 44844, 44849, 474, 68, 33697, 33702,
+ 33707, 33713, 33718, 33723, 44854, 33727, 44858, 44862, 44866, 33732,
+ 33738, 44880, 33749, 33754, 44888, 44893, 33760, 44898, 44903, 44908,
+ 44913, 44919, 44925, 44931, 33777, 44944, 44953, 44959, 33781, 44963,
+ 33786, 44968, 33791, 33796, 44971, 44976, 44980, 44986, 33332, 44993,
+ 14794, 45000, 45005, 33801, 45009, 45014, 45019, 45024, 45028, 45033,
+ 45038, 45044, 45049, 45054, 45060, 45066, 45071, 45075, 45080, 45085,
+ 45090, 45094, 45099, 45104, 45109, 45115, 45121, 45127, 45132, 45136,
+ 45141, 45145, 33805, 33810, 33815, 45149, 45153, 45157, 33820, 33826,
+ 33832, 33844, 45169, 28059, 45173, 45178, 45182, 45187, 45194, 45199,
+ 45204, 45209, 45213, 45217, 45227, 45232, 45237, 45241, 45245, 45248,
+ 45256, 33892, 45261, 1465, 45267, 45272, 45278, 45286, 45290, 45299,
+ 45303, 45307, 45315, 45321, 45329, 45345, 45349, 45353, 45357, 45362,
+ 45368, 45383, 33929, 1764, 13198, 45387, 1359, 1374, 45399, 45407, 45414,
+ 45419, 45426, 45431, 9922, 1139, 2544, 11213, 45438, 9820, 45443, 45446,
+ 45455, 1267, 45460, 43625, 45467, 45476, 45481, 45485, 45493, 24317,
+ 2596, 45500, 11678, 45510, 45516, 2371, 2381, 45525, 45534, 45544, 45555,
+ 3376, 37099, 45560, 11277, 4019, 18236, 1272, 45564, 45572, 45579, 45584,
+ 45588, 45592, 25792, 43894, 11304, 45600, 45609, 45618, 45626, 45633,
+ 45644, 45649, 45662, 45675, 45687, 45699, 45711, 45722, 45735, 45746,
+ 45757, 45767, 45775, 45783, 45795, 45807, 45818, 45827, 45835, 45842,
+ 45854, 45861, 45867, 45876, 45883, 45896, 45901, 45911, 45916, 45922,
+ 45927, 41086, 45931, 45938, 45942, 45949, 45957, 45964, 2557, 45971,
+ 45982, 45992, 46001, 46009, 46019, 46027, 46037, 46046, 46051, 46057,
+ 46063, 3899, 46074, 46084, 46093, 46102, 46110, 46120, 46128, 46137,
+ 46142, 46147, 46152, 1694, 47, 46160, 46168, 46179, 46190, 17875, 46200,
+ 46204, 46211, 46217, 46222, 46226, 46237, 46247, 46256, 46267, 18275,
+ 18280, 46272, 46281, 46286, 46296, 46301, 46309, 46317, 46324, 46330,
+ 1656, 277, 46334, 46340, 46345, 46348, 2143, 43748, 46356, 46360, 46363,
+ 1510, 46369, 15214, 1277, 46374, 46387, 46401, 2682, 46419, 46431, 46443,
+ 2696, 2713, 46457, 46470, 2728, 46484, 46496, 2743, 46510, 1283, 1289,
+ 1295, 11584, 46515, 46520, 46525, 46529, 46544, 46559, 46574, 46589,
+ 46604, 46619, 46634, 46649, 46664, 46679, 46694, 46709, 46724, 46739,
+ 46754, 46769, 46784, 46799, 46814, 46829, 46844, 46859, 46874, 46889,
+ 46904, 46919, 46934, 46949, 46964, 46979, 46994, 47009, 47024, 47039,
+ 47054, 47069, 47084, 47099, 47114, 47129, 47144, 47159, 47174, 47189,
+ 47204, 47219, 47234, 47249, 47264, 47279, 47294, 47309, 47324, 47339,
+ 47354, 47369, 47384, 47399, 47414, 47429, 47444, 47459, 47474, 47489,
+ 47504, 47519, 47534, 47549, 47564, 47579, 47594, 47609, 47624, 47639,
+ 47654, 47669, 47684, 47699, 47714, 47729, 47744, 47759, 47774, 47789,
+ 47804, 47819, 47834, 47849, 47864, 47879, 47894, 47909, 47924, 47939,
+ 47954, 47969, 47984, 47999, 48014, 48029, 48044, 48059, 48074, 48089,
+ 48104, 48119, 48134, 48149, 48164, 48179, 48194, 48209, 48224, 48239,
+ 48254, 48269, 48284, 48299, 48314, 48329, 48344, 48359, 48374, 48389,
+ 48404, 48419, 48434, 48449, 48464, 48479, 48494, 48509, 48524, 48539,
+ 48554, 48569, 48584, 48599, 48614, 48629, 48644, 48659, 48674, 48689,
+ 48704, 48719, 48734, 48749, 48764, 48779, 48794, 48809, 48824, 48839,
+ 48854, 48869, 48884, 48899, 48914, 48929, 48944, 48959, 48974, 48989,
+ 49004, 49019, 49034, 49049, 49064, 49079, 49094, 49109, 49124, 49139,
+ 49154, 49169, 49184, 49199, 49214, 49229, 49244, 49259, 49274, 49289,
+ 49304, 49319, 49334, 49349, 49364, 49379, 49394, 49409, 49424, 49439,
+ 49454, 49469, 49484, 49499, 49514, 49529, 49544, 49559, 49574, 49589,
+ 49604, 49619, 49634, 49649, 49664, 49679, 49694, 49709, 49724, 49739,
+ 49754, 49769, 49784, 49799, 49814, 49829, 49844, 49859, 49874, 49889,
+ 49904, 49919, 49934, 49949, 49964, 49979, 49994, 50009, 50024, 50039,
+ 50054, 50069, 50084, 50099, 50114, 50129, 50144, 50159, 50174, 50189,
+ 50204, 50219, 50234, 50249, 50264, 50279, 50294, 50309, 50324, 50339,
+ 50354, 50369, 50384, 50399, 50414, 50429, 50444, 50459, 50474, 50489,
+ 50504, 50519, 50534, 50549, 50564, 50579, 50594, 50609, 50624, 50639,
+ 50654, 50669, 50684, 50699, 50714, 50729, 50744, 50759, 50774, 50789,
+ 50804, 50819, 50834, 50849, 50864, 50879, 50894, 50909, 50924, 50939,
+ 50954, 50969, 50984, 50999, 51014, 51029, 51044, 51059, 51074, 51089,
+ 51104, 51119, 51134, 51149, 51164, 51179, 51194, 51209, 51224, 51239,
+ 51254, 51269, 51284, 51299, 51314, 51329, 51344, 51359, 51374, 51389,
+ 51404, 51419, 51434, 51449, 51464, 51479, 51494, 51509, 51524, 51539,
+ 51554, 51569, 51584, 51599, 51614, 51629, 51644, 51659, 51674, 51689,
+ 51704, 51719, 51734, 51749, 51764, 51779, 51794, 51809, 51824, 51839,
+ 51854, 51869, 51884, 51899, 51914, 51929, 51944, 51959, 51974, 51989,
+ 52004, 52019, 52034, 52049, 52064, 52079, 52094, 52109, 52124, 52139,
+ 52154, 52169, 52184, 52199, 52214, 52229, 52244, 52259, 52274, 52289,
+ 52304, 52319, 52334, 52349, 52364, 52379, 52394, 52409, 52424, 52439,
+ 52454, 52469, 52484, 52499, 52514, 52529, 52544, 52559, 52574, 52589,
+ 52604, 52619, 52634, 52649, 52664, 52679, 52694, 52709, 52724, 52739,
+ 52754, 52769, 52784, 52799, 52814, 52829, 52844, 52859, 52874, 52889,
+ 52904, 52919, 52934, 52949, 52964, 52979, 52994, 53009, 53024, 53039,
+ 53054, 53069, 53084, 53099, 53114, 53129, 53144, 53159, 53174, 53189,
+ 53204, 53219, 53234, 53249, 53264, 53279, 53294, 53309, 53324, 53339,
+ 53354, 53369, 53384, 53399, 53414, 53429, 53444, 53459, 53474, 53489,
+ 53504, 53519, 53534, 53549, 53564, 53579, 53594, 53609, 53624, 53639,
+ 53654, 53669, 53684, 53699, 53714, 53729, 53744, 53759, 53774, 53789,
+ 53804, 53819, 53834, 53849, 53864, 53879, 53894, 53909, 53924, 53939,
+ 53954, 53969, 53984, 53999, 54014, 54029, 54044, 54059, 54074, 54089,
+ 54104, 54119, 54134, 54149, 54164, 54179, 54194, 54209, 54224, 54239,
+ 54254, 54269, 54284, 54299, 54314, 54329, 54345, 54361, 54377, 54393,
+ 54409, 54425, 54441, 54457, 54473, 54489, 54505, 54521, 54537, 54553,
+ 54569, 54585, 54601, 54617, 54633, 54649, 54665, 54681, 54697, 54713,
+ 54729, 54745, 54761, 54777, 54793, 54809, 54825, 54841, 54857, 54873,
+ 54889, 54905, 54921, 54937, 54953, 54969, 54985, 55001, 55017, 55033,
+ 55049, 55065, 55081, 55097, 55113, 55129, 55145, 55161, 55177, 55193,
+ 55209, 55225, 55241, 55257, 55273, 55289, 55305, 55321, 55337, 55353,
+ 55369, 55385, 55401, 55417, 55433, 55449, 55465, 55481, 55497, 55513,
+ 55529, 55545, 55561, 55577, 55593, 55609, 55625, 55641, 55657, 55673,
+ 55689, 55705, 55721, 55737, 55753, 55769, 55785, 55801, 55817, 55833,
+ 55849, 55865, 55881, 55897, 55913, 55929, 55945, 55961, 55977, 55993,
+ 56009, 56025, 56041, 56057, 56073, 56089, 56105, 56121, 56137, 56153,
+ 56169, 56185, 56201, 56217, 56233, 56249, 56265, 56281, 56297, 56313,
+ 56329, 56345, 56361, 56377, 56393, 56409, 56425, 56441, 56457, 56473,
+ 56489, 56505, 56521, 56537, 56553, 56569, 56585, 56601, 56617, 56633,
+ 56649, 56665, 56681, 56697, 56713, 56729, 56745, 56761, 56777, 56793,
+ 56809, 56825, 56841, 56857, 56873, 56889, 56905, 56921, 56937, 56953,
+ 56969, 56985, 57001, 57017, 57033, 57049, 57065, 57081, 57097, 57113,
+ 57129, 57145, 57161, 57177, 57193, 57209, 57225, 57241, 57257, 57273,
+ 57289, 57305, 57321, 57337, 57353, 57369, 57385, 57401, 57417, 57433,
+ 57449, 57465, 57481, 57497, 57513, 57529, 57545, 57561, 57577, 57593,
+ 57609, 57625, 57641, 57657, 57673, 57689, 57705, 57721, 57737, 57753,
+ 57769, 57785, 57801, 57817, 57833, 57849, 57865, 57881, 57897, 57913,
+ 57929, 57945, 57961, 57977, 57993, 58009, 58025, 58041, 58057, 58073,
+ 58089, 58105, 58121, 58137, 58153, 58169, 58185, 58201, 58217, 58233,
+ 58249, 58265, 58281, 58297, 58313, 58329, 58345, 58361, 58377, 58393,
+ 58409, 58425, 58441, 58457, 58473, 58489, 58505, 58521, 58537, 58553,
+ 58569, 58585, 58601, 58617, 58633, 58649, 58665, 58681, 58697, 58713,
+ 58729, 58745, 58761, 58777, 58793, 58809, 58825, 58841, 58857, 58873,
+ 58889, 58905, 58921, 58937, 58953, 58969, 58985, 59001, 59017, 59033,
+ 59049, 59065, 59081, 59097, 59113, 59129, 59145, 59161, 59177, 59193,
+ 59209, 59225, 59241, 59257, 59273, 59289, 59305, 59321, 59337, 59353,
+ 59369, 59385, 59401, 59417, 59433, 59449, 59465, 59481, 59497, 59513,
+ 59529, 59545, 59561, 59577, 59593, 59609, 59625, 59641, 59657, 59673,
+ 59689, 59705, 59721, 59737, 59753, 59769, 59785, 59801, 59817, 59833,
+ 59849, 59865, 59881, 59897, 59913, 59929, 59945, 59961, 59977, 59993,
+ 60009, 60025, 60041, 60057, 60073, 60089, 60105, 60121, 60137, 60153,
+ 60169, 60185, 60201, 60217, 60233, 60249, 60265, 60281, 60297, 60313,
+ 60329, 60345, 60361, 60377, 60393, 60409, 60425, 60441, 60457, 60473,
+ 60489, 60505, 60521, 60537, 60553, 60569, 60585, 60601, 60617, 60633,
+ 60649, 60665, 60681, 60697, 60713, 60729, 60745, 60761, 60777, 60793,
+ 60809, 60825, 60841, 60857, 60873, 60889, 60905, 60921, 60937, 60953,
+ 60969, 60985, 61001, 61017, 61033, 61049, 61065, 61081, 61097, 61113,
+ 61129, 61145, 61161, 61177, 61193, 61209, 61225, 61241, 61257, 61273,
+ 61289, 61305, 61321, 61337, 61353, 61369, 61385, 61401, 61417, 61433,
+ 61449, 61465, 61481, 61497, 61513, 61529, 61545, 61561, 61577, 61593,
+ 61609, 61625, 61641, 61657, 61673, 61689, 61705, 61721, 61737, 61753,
+ 61769, 61785, 61801, 61817, 61833, 61849, 61865, 61881, 61897, 61913,
+ 61929, 61945, 61961, 61977, 61993, 62009, 62025, 62041, 62057, 62073,
+ 62089, 62105, 62121, 62137, 62153, 62169, 62185, 62201, 62217, 62233,
+ 62249, 62265, 62281, 62297, 62313, 62329, 62345, 62361, 62377, 62393,
+ 62409, 62425, 62441, 62457, 62473, 62489, 62505, 62521, 62537, 62553,
+ 62569, 62585, 62601, 62617, 62633, 62649, 62665, 62681, 62697, 62713,
+ 62729, 62745, 62761, 62777, 62793, 62809, 62825, 62841, 62857, 62873,
+ 62889, 62905, 62921, 62937, 62953, 62969, 62985, 63001, 63016, 18307,
+ 63025, 63030, 63036, 63042, 63052, 63060, 16270, 16868, 10733, 63073,
+ 1518, 1522, 63081, 3973, 29566, 7512, 63087, 63092, 63097, 63102, 63107,
+ 63113, 63118, 63124, 63129, 63135, 63140, 63145, 63150, 63155, 63161,
+ 63166, 63171, 63176, 63181, 63186, 63191, 63196, 63202, 63207, 63213,
+ 63220, 2600, 63225, 63231, 8912, 63235, 63240, 63247, 63255, 65, 63259,
+ 63265, 63270, 63275, 63279, 63284, 63288, 63292, 11621, 63296, 63306,
+ 63319, 63330, 63343, 63350, 63356, 63364, 63369, 63375, 63381, 63387,
+ 63392, 63397, 63402, 63407, 63411, 63416, 63421, 63426, 63432, 63438,
+ 63444, 63449, 63453, 63458, 63463, 63467, 63472, 63477, 63482, 63486,
+ 11637, 11648, 11653, 1561, 63490, 63496, 1566, 63501, 63504, 17741,
+ 63509, 63515, 63520, 1597, 63526, 1603, 1609, 11683, 63531, 63540, 63548,
+ 63555, 63559, 63563, 63569, 63574, 33365, 63579, 63586, 63593, 63598,
+ 63602, 63606, 63615, 1614, 17850, 63620, 63624, 17861, 1162, 63628,
+ 63635, 63640, 63644, 17891, 1618, 41243, 63647, 63652, 63662, 63671,
+ 63676, 63680, 63686, 1623, 43855, 63691, 63700, 63706, 63711, 63716,
+ 11882, 11888, 63722, 63734, 63751, 63768, 63785, 63802, 63819, 63836,
+ 63853, 63870, 63887, 63904, 63921, 63938, 63955, 63972, 63989, 64006,
+ 64023, 64040, 64057, 64074, 64091, 64108, 64125, 64142, 64159, 64176,
+ 64193, 64210, 64227, 64244, 64261, 64278, 64295, 64312, 64329, 64346,
+ 64363, 64380, 64397, 64414, 64431, 64448, 64465, 64482, 64499, 64516,
+ 64533, 64550, 64567, 64578, 64588, 64593, 1628, 64597, 64602, 64608,
+ 64613, 64618, 64625, 9839, 1633, 64631, 64640, 29887, 64645, 64656,
+ 11899, 64666, 64671, 64677, 64682, 64689, 64695, 64700, 1638, 18174,
+ 64705, 64711, 11909, 1643, 11914, 64717, 64722, 64728, 64733, 64738,
+ 64743, 64748, 64753, 64758, 64763, 64768, 64774, 64780, 64786, 64791,
+ 64795, 64800, 64805, 64809, 64814, 64819, 64824, 64829, 64833, 64838,
+ 64844, 64849, 64854, 64858, 64863, 64868, 64874, 64879, 64884, 64890,
+ 64896, 64901, 64905, 64910, 64915, 64920, 64924, 64929, 64934, 64939,
+ 64945, 64951, 64956, 64960, 64964, 64969, 64974, 64979, 31395, 64983,
+ 64988, 64993, 64999, 65004, 65009, 65013, 65018, 65023, 65029, 65034,
+ 65039, 65045, 65051, 65056, 65060, 65065, 65070, 65074, 65079, 65084,
+ 65089, 65095, 65101, 65106, 65110, 65115, 65120, 65124, 65129, 65134,
+ 65139, 65144, 65148, 65151, 65154, 65159, 65164, 34056, 65171, 65179,
+ 3691, 29837, 65185, 65192, 65198, 3830, 12020, 65204, 65214, 65229,
+ 65237, 12025, 65248, 65253, 65264, 65276, 65288, 65300, 2734, 65312,
+ 65317, 65329, 65333, 65339, 65345, 65350, 1660, 17418, 65359, 65364,
+ 43914, 65368, 65372, 65377, 65381, 18315, 65386, 65389, 65394, 65402,
+ 65410, 1664, 12061, 12067, 1669, 65418, 65425, 65430, 65439, 65449,
+ 65456, 65461, 65466, 1674, 65473, 65478, 18435, 65482, 65487, 65494,
+ 65500, 65504, 65515, 65525, 65532, 18457, 9733, 9740, 4022, 4028, 65539,
+ 1679, 65544, 65550, 65558, 65565, 65571, 65578, 65590, 65596, 65601,
+ 65613, 65624, 65633, 65643, 3952, 65651, 33166, 33175, 18497, 1684, 1688,
+ 65664, 65675, 65680, 1698, 65688, 65693, 65698, 18556, 65710, 65713,
+ 65719, 65725, 65730, 65738, 1703, 65743, 65748, 65756, 65764, 65771,
+ 65780, 65788, 65797, 1708, 65801, 1713, 23016, 65806, 65813, 18630,
+ 65821, 65827, 65832, 65840, 65847, 65855, 65865, 65874, 65884, 65893,
+ 65904, 65914, 65924, 65933, 65943, 65957, 65970, 65979, 65987, 65997,
+ 66006, 66018, 66029, 66040, 66050, 17948, 66055, 12213, 66064, 66070,
+ 66075, 66082, 66089, 66095, 17617, 66105, 66111, 66116, 66127, 66132,
+ 66140, 12230, 12235, 66148, 66154, 66158, 66166, 4017, 18692, 44007,
+ 66171, 66177, 66182, 66190, 66197, 13179, 66202, 66208, 1724, 66213,
+ 66216, 1438, 66222, 66227, 66232, 66238, 66243, 66248, 66253, 66258,
+ 66263, 66268, 1733, 13, 66274, 66278, 66283, 66287, 66291, 66295, 34296,
+ 66300, 25070, 66305, 66310, 66314, 66317, 66321, 66325, 66330, 66334,
+ 66339, 66343, 66349, 37514, 37519, 37524, 66352, 66359, 66365, 66373,
+ 43678, 66383, 37530, 34560, 34311, 34317, 37546, 34323, 66388, 66393,
+ 34593, 66397, 66400, 66404, 66412, 66419, 66422, 66427, 66432, 66436,
+ 66440, 66443, 66453, 66465, 66472, 66478, 34328, 66485, 36078, 66488,
+ 8929, 1019, 66491, 66495, 66500, 3873, 66504, 66507, 14827, 66514, 66521,
+ 66534, 66542, 66551, 66560, 66565, 66575, 66588, 66600, 66607, 66612,
+ 66621, 66634, 39039, 66652, 66657, 66664, 66670, 66675, 819, 66680,
+ 66688, 66695, 66702, 29392, 783, 66708, 66714, 66724, 66732, 66738,
+ 66743, 34347, 6310, 34361, 66747, 66757, 66762, 66772, 66787, 66793,
+ 66799, 34371, 66804, 33482, 66808, 66813, 66820, 66825, 66829, 66834,
+ 18500, 66841, 66846, 66850, 6351, 34397, 66854, 66860, 324, 66870, 66877,
+ 66884, 66889, 66898, 63656, 66904, 66912, 66916, 66920, 66924, 66928,
+ 66933, 66937, 66943, 66951, 66956, 66961, 66966, 66970, 66975, 66979,
+ 66983, 66989, 66995, 67000, 67004, 67009, 34521, 67013, 34527, 34533,
+ 67018, 67024, 67031, 67036, 67040, 33499, 18167, 67043, 67047, 67052,
+ 67059, 67065, 67069, 67074, 43353, 67080, 67084, 67091, 67095, 67100,
+ 67106, 67112, 67118, 67130, 67139, 67149, 67155, 67162, 67167, 67172,
+ 67176, 67179, 67185, 67192, 67197, 67202, 67209, 67216, 67223, 67229,
+ 67234, 67239, 67247, 34538, 2462, 67252, 67257, 67263, 67268, 67274,
+ 67279, 67284, 67289, 67295, 34559, 67300, 67306, 67312, 67318, 34629,
+ 67323, 67328, 67333, 34640, 67338, 67343, 67348, 67354, 67360, 34645,
+ 67365, 67370, 67375, 34700, 34706, 67380, 67385, 34711, 34733, 30136,
+ 34739, 34743, 67390, 12909, 67394, 67402, 67408, 67416, 67423, 67429,
+ 67439, 67445, 67452, 11556, 34757, 67458, 67471, 67480, 67486, 67495,
+ 67501, 25380, 67508, 67515, 67525, 67528, 34701, 67533, 67540, 67545,
+ 67549, 67553, 67558, 67562, 4133, 67567, 67572, 67577, 37608, 37613,
+ 67581, 37627, 67586, 37632, 67591, 67597, 37644, 37650, 37656, 67602,
+ 67608, 24366, 67619, 67622, 67634, 67642, 34780, 67646, 67655, 67665,
+ 67674, 34790, 67679, 67686, 67695, 67701, 67709, 67716, 6402, 4673,
+ 67721, 34712, 67727, 67730, 67736, 67743, 67748, 67753, 25290, 67757,
+ 67763, 67769, 67774, 67779, 67783, 67789, 67795, 35984, 1048, 38689,
+ 40419, 40425, 34821, 34826, 67800, 67804, 67808, 67811, 67824, 67830,
+ 67834, 67837, 67842, 36321, 67846, 33504, 22966, 67852, 6331, 6339, 9570,
+ 67855, 67860, 67865, 67870, 67875, 67880, 67885, 67890, 67895, 67900,
+ 67906, 67911, 67916, 67922, 67927, 67932, 67937, 67942, 67947, 67952,
+ 67958, 67963, 67969, 67974, 67979, 67984, 67989, 67994, 67999, 68004,
+ 68009, 68014, 68019, 68025, 68030, 68035, 68040, 68045, 68050, 68055,
+ 68061, 68066, 68071, 68076, 68081, 68086, 68091, 68096, 68101, 68106,
+ 68112, 68117, 68122, 68127, 68132, 68138, 68144, 68149, 68155, 68160,
+ 68165, 68170, 68175, 68180, 1511, 145, 68185, 68189, 68193, 68197, 27076,
+ 68201, 68205, 68210, 68214, 68219, 68223, 68228, 68233, 68238, 68242,
+ 68246, 68251, 68255, 14542, 68260, 68264, 68271, 68281, 16595, 68290,
+ 68299, 68303, 68308, 68313, 68317, 68321, 26870, 3078, 68325, 68331,
+ 18967, 68335, 68344, 68352, 68358, 68363, 68375, 68387, 68392, 68396,
+ 68401, 68405, 68411, 68417, 68422, 68432, 68442, 68448, 68453, 68457,
+ 68463, 68468, 68475, 68481, 68486, 68495, 68504, 68512, 16993, 68516,
+ 68525, 68533, 68545, 68556, 68567, 68576, 68580, 68589, 68597, 68607,
+ 68615, 68622, 68628, 68633, 68639, 68644, 68655, 54, 33309, 68661, 28331,
+ 28341, 68667, 68675, 68682, 68688, 68692, 68702, 68713, 68721, 68730,
+ 68735, 68740, 68745, 68749, 68753, 18921, 68761, 68765, 68771, 68781,
+ 68788, 68794, 68800, 37707, 68804, 68806, 68809, 68815, 68819, 68830,
+ 68840, 68846, 68853, 68860, 14479, 68868, 68874, 68883, 68892, 68898,
+ 10615, 68904, 68910, 68915, 68920, 68927, 68932, 68939, 68945, 68950,
+ 68958, 68971, 68980, 65919, 65929, 68989, 68995, 69001, 69008, 69015,
+ 69022, 69029, 69036, 69041, 69045, 69049, 69052, 69062, 69066, 69078,
+ 69087, 69091, 69102, 69107, 69111, 65938, 69117, 69124, 69133, 69141,
+ 69149, 69154, 69158, 69163, 69168, 69178, 69186, 69191, 69195, 69199,
+ 69205, 69213, 69220, 69232, 69240, 69251, 69258, 69264, 69274, 69280,
+ 69284, 69291, 69297, 69302, 69306, 69310, 69314, 69323, 69332, 69341,
+ 69347, 69353, 69359, 69364, 69371, 69377, 69385, 69392, 69398, 13622,
+ 69403, 69409, 69413, 15529, 69417, 69422, 69432, 69441, 69447, 69453,
+ 69461, 69468, 69472, 69476, 69482, 69490, 69497, 69503, 69514, 69518,
+ 69522, 69526, 69529, 69535, 69540, 69545, 69549, 69553, 69562, 69570,
+ 69577, 69583, 69590, 25963, 43422, 69595, 69603, 69607, 69611, 69614,
+ 69622, 69629, 69635, 69644, 69652, 69658, 69663, 69667, 69672, 69677,
+ 69681, 69685, 69689, 69694, 69703, 69707, 69714, 40528, 69718, 69724,
+ 69728, 69736, 69742, 69747, 69758, 69766, 69772, 69781, 24513, 69789,
+ 69796, 69803, 69810, 69817, 69824, 46704, 14317, 69831, 69838, 69843,
+ 37743, 6529, 69849, 69854, 69859, 69865, 69871, 69877, 69882, 69887,
+ 69892, 69897, 69903, 69908, 69914, 69919, 69925, 69930, 69935, 69940,
+ 69945, 69950, 69955, 69960, 69966, 69971, 69977, 69982, 69987, 69992,
+ 69997, 70002, 70007, 70013, 70018, 70023, 70028, 70033, 70038, 70043,
+ 70048, 70053, 70058, 70063, 70069, 70074, 70079, 70084, 70089, 70094,
+ 70099, 70104, 70109, 70115, 70120, 70125, 70130, 70135, 70140, 70145,
+ 70150, 70155, 70160, 70165, 70170, 70175, 70181, 1854, 260, 70186, 41361,
+ 70190, 70193, 70198, 70202, 70205, 3415, 70210, 70215, 70219, 70228,
+ 70239, 70256, 70274, 69145, 70282, 70285, 70295, 70302, 70311, 70327,
+ 70336, 70346, 70351, 70361, 70370, 70378, 70392, 70400, 70404, 70407,
+ 70414, 70420, 70431, 70438, 70450, 70461, 70472, 70481, 70488, 1278, 710,
+ 70498, 2629, 70502, 70507, 70516, 9221, 18894, 22471, 70524, 70532,
+ 70546, 70559, 70563, 70568, 70573, 70578, 70584, 70590, 70595, 8921,
+ 16623, 70600, 70604, 70612, 12062, 70617, 70623, 70632, 70640, 1736,
+ 12074, 908, 6465, 70644, 70648, 70657, 70667, 2419, 29127, 70676, 70682,
+ 18407, 29142, 70688, 4193, 12452, 70694, 70701, 65670, 70705, 70709,
+ 70715, 70720, 70725, 3634, 154, 15437, 70730, 70742, 70746, 70752, 70757,
+ 29907, 70761, 12440, 2769, 4, 70766, 70776, 70787, 70793, 70804, 70811,
+ 70817, 70823, 70831, 70838, 70844, 70854, 70864, 70874, 70883, 25367,
+ 1290, 70888, 70892, 70896, 70902, 70906, 2792, 2798, 8918, 2294, 70910,
+ 70914, 70923, 70931, 70942, 70950, 70958, 70964, 70969, 70980, 70991,
+ 70999, 71005, 71010, 10434, 71020, 71028, 71032, 71036, 71041, 71045,
+ 71057, 30314, 16548, 71064, 71074, 71080, 71086, 10536, 71096, 71107,
+ 71118, 71128, 71137, 71141, 71148, 1750, 996, 71158, 71163, 71171, 65483,
+ 71179, 71184, 71195, 71202, 71216, 15366, 478, 71226, 71230, 71234,
+ 71242, 71251, 71259, 71265, 71279, 71286, 71292, 71301, 71308, 71318,
+ 71326, 71333, 71341, 71348, 4024, 149, 71356, 71367, 71371, 71383, 71389,
+ 12633, 192, 71394, 9871, 71399, 71403, 71410, 71416, 71424, 71431, 9280,
+ 71438, 71447, 71455, 4093, 71468, 4110, 71472, 2842, 514, 71477, 71490,
+ 71494, 71499, 2847, 1853, 809, 71503, 4114, 71511, 71517, 71521, 866,
+ 71531, 71540, 71545, 3651, 71549, 16304, 16311, 50066, 71553, 4145, 4034,
+ 14200, 71561, 71568, 71573, 25431, 71577, 71584, 71590, 71595, 71600,
+ 16324, 186, 71605, 71617, 71623, 71631, 2859, 1768, 71639, 71641, 71646,
+ 71651, 71656, 71662, 71667, 71672, 71677, 71682, 71687, 71692, 71698,
+ 71703, 71708, 71713, 71718, 71723, 71728, 71733, 71738, 71744, 71749,
+ 71754, 71759, 71765, 71770, 71776, 71781, 71786, 71791, 71796, 71801,
+ 71806, 71811, 71817, 71822, 71828, 71833, 71838, 71843, 71848, 71853,
+ 71858, 71863, 71868, 71874, 71880, 71885, 71890, 71896, 71901, 71905,
+ 71909, 71914, 71920, 71924, 71930, 71935, 71940, 71946, 71951, 71955,
+ 71960, 71965, 71969, 71972, 71974, 71978, 71981, 71988, 71993, 71997,
+ 72002, 72006, 72010, 72014, 72023, 72027, 35026, 72030, 35031, 72037,
+ 72042, 35036, 72051, 72060, 35042, 72065, 35047, 72074, 72079, 12676,
+ 72083, 72088, 72093, 35052, 72097, 44921, 72101, 72104, 72108, 8589,
+ 72114, 72117, 72122, 72126, 3888, 35057, 72129, 72133, 72136, 72141,
+ 72145, 72151, 72159, 72172, 72181, 72187, 72192, 72198, 72202, 72208,
+ 72214, 72222, 72227, 72231, 72238, 72244, 72252, 72261, 72269, 35060,
+ 72276, 72286, 72299, 72304, 72309, 72313, 72322, 72328, 72335, 72346,
+ 72358, 72365, 72374, 72383, 72392, 72399, 72405, 72412, 72420, 72427,
+ 72435, 72444, 72452, 72459, 72467, 72476, 72484, 72493, 72503, 72512,
+ 72520, 72527, 72535, 72544, 72552, 72561, 72571, 72580, 72588, 72597,
+ 72607, 72616, 72626, 72637, 72647, 72656, 72664, 72671, 72679, 72688,
+ 72696, 72705, 72715, 72724, 72732, 72741, 72751, 72760, 72770, 72781,
+ 72791, 72800, 72808, 72817, 72827, 72836, 72846, 72857, 72867, 72876,
+ 72886, 72897, 72907, 72918, 72930, 72941, 72951, 72960, 72968, 72975,
+ 72983, 72992, 73000, 73009, 73019, 73028, 73036, 73045, 73055, 73064,
+ 73074, 73085, 73095, 73104, 73112, 73121, 73131, 73140, 73150, 73161,
+ 73171, 73180, 73190, 73201, 73211, 73222, 73234, 73245, 73255, 73264,
+ 73272, 73281, 73291, 73300, 73310, 73321, 73331, 73340, 73350, 73361,
+ 73371, 73382, 73394, 73405, 73415, 73424, 73434, 73445, 73455, 73466,
+ 73478, 73489, 73499, 73510, 73522, 73533, 73545, 73558, 73570, 73581,
+ 73591, 73600, 73608, 73615, 73623, 73632, 73640, 73649, 73659, 73668,
+ 73676, 73685, 73695, 73704, 73714, 73725, 73735, 73744, 73752, 73761,
+ 73771, 73780, 73790, 73801, 73811, 73820, 73830, 73841, 73851, 73862,
+ 73874, 73885, 73895, 73904, 73912, 73921, 73931, 73940, 73950, 73961,
+ 73971, 73980, 73990, 74001, 74011, 74022, 74034, 74045, 74055, 74064,
+ 74074, 74085, 74095, 74106, 74118, 74129, 74139, 74150, 74162, 74173,
+ 74185, 74198, 74210, 74221, 74231, 74240, 74248, 74257, 74267, 74276,
+ 74286, 74297, 74307, 74316, 74326, 74337, 74347, 74358, 74370, 74381,
+ 74391, 74400, 74410, 74421, 74431, 74442, 74454, 74465, 74475, 74486,
+ 74498, 74509, 74521, 74534, 74546, 74557, 74567, 74576, 74586, 74597,
+ 74607, 74618, 74630, 74641, 74651, 74662, 74674, 74685, 74697, 74710,
+ 74722, 74733, 74743, 74754, 74766, 74777, 74789, 74802, 74814, 74825,
+ 74837, 74850, 74862, 74875, 74889, 74902, 74914, 74925, 74935, 74944,
+ 74952, 74959, 74964, 8419, 74971, 35070, 74976, 74981, 35075, 74987,
+ 22579, 35080, 74992, 74998, 75006, 75012, 75018, 75025, 75032, 75037,
+ 75041, 75045, 75048, 75052, 75061, 75070, 75078, 75084, 75096, 75107,
+ 75111, 3140, 8394, 75116, 75119, 75121, 75125, 75129, 75133, 75139,
+ 75144, 27990, 75149, 75153, 75156, 75161, 75165, 75172, 75178, 75182,
+ 6485, 75186, 35097, 75191, 75198, 75207, 75215, 75226, 75234, 75243,
+ 75251, 75258, 75265, 75271, 75282, 35102, 75287, 75298, 75310, 75318,
+ 75329, 75338, 75349, 75354, 75362, 2595, 75367, 37166, 75380, 75384,
+ 75396, 75404, 75409, 75417, 75428, 19114, 75437, 75443, 75450, 75458,
+ 75464, 35112, 75469, 4139, 63056, 75476, 75479, 75487, 75500, 75513,
+ 75526, 75539, 75546, 75557, 75566, 75571, 46521, 46526, 75575, 75579,
+ 75587, 75594, 75603, 75611, 75617, 75626, 75634, 75641, 75649, 75653,
+ 75662, 75671, 75681, 75694, 75707, 75717, 35117, 75723, 75730, 75736,
+ 75742, 35123, 75747, 75750, 75754, 75762, 75771, 46259, 75779, 75788,
+ 75796, 75803, 75811, 75821, 75830, 75839, 36420, 75848, 75859, 75874,
+ 75884, 9904, 23263, 75893, 75898, 75903, 75907, 75912, 75916, 75921,
+ 75927, 75932, 75937, 75943, 75948, 75953, 23228, 75958, 75965, 75973,
+ 75981, 75989, 75994, 76001, 76008, 76013, 2272, 76017, 76021, 76029,
+ 76037, 35140, 76043, 76049, 76061, 76067, 76074, 76078, 76085, 76090,
+ 76097, 76103, 76110, 76121, 76131, 76141, 76153, 76159, 76167, 76173,
+ 76183, 76193, 35167, 76202, 76211, 76217, 76229, 76240, 76247, 76252,
+ 76256, 76264, 76270, 76275, 76280, 76287, 76295, 76307, 76317, 76326,
+ 76335, 76342, 37019, 25764, 76348, 76353, 76357, 76361, 76366, 76374,
+ 76380, 76391, 76404, 76409, 76416, 35172, 76421, 76433, 76442, 76450,
+ 76460, 76471, 76484, 76491, 76500, 76509, 76517, 76522, 76528, 1500,
+ 76533, 76538, 76543, 76548, 76554, 76559, 76564, 76570, 76576, 76581,
+ 76585, 76590, 76595, 76600, 63611, 76605, 76610, 76615, 76620, 76626,
+ 76632, 76637, 76641, 76646, 76651, 76656, 76662, 76667, 76673, 76678,
+ 76683, 76688, 76693, 76697, 76703, 76708, 76717, 76722, 76727, 76732,
+ 76737, 76741, 76748, 76754, 4430, 18737, 3105, 76759, 76763, 76768,
+ 76772, 76776, 76780, 50321, 76784, 76709, 76786, 76796, 35181, 76799,
+ 76804, 76813, 76819, 6454, 35186, 76823, 76829, 76834, 76840, 76845,
+ 76849, 76856, 76861, 76871, 76880, 76884, 76890, 76896, 76902, 76906,
+ 76914, 76921, 76929, 76937, 35191, 76944, 76947, 76954, 76960, 76965,
+ 76969, 76975, 76982, 76987, 76991, 77000, 77008, 77014, 77019, 35196,
+ 77026, 77038, 77045, 77051, 77056, 77062, 77069, 77075, 22979, 29589,
+ 77081, 77086, 77092, 77096, 77108, 76742, 76749, 23160, 77118, 77123,
+ 77130, 77136, 77143, 77149, 77160, 77165, 77173, 9609, 77178, 77181,
+ 77187, 77191, 77195, 77198, 77204, 34934, 4431, 1067, 14596, 77211,
+ 77217, 77223, 77229, 77235, 77241, 77247, 77253, 77259, 77264, 77269,
+ 77274, 77279, 77284, 77289, 77294, 77299, 77304, 77309, 77314, 77319,
+ 77324, 77330, 77335, 77340, 77346, 77351, 77356, 77362, 77368, 77374,
+ 77380, 77386, 77392, 77398, 77404, 77410, 77415, 77420, 77426, 77431,
+ 77436, 77442, 77447, 77452, 77457, 77462, 77467, 77472, 77477, 77482,
+ 77487, 77492, 77497, 77502, 77508, 77513, 77518, 77523, 77529, 77534,
+ 77539, 77544, 77549, 77555, 77560, 77565, 77570, 77575, 77580, 77585,
+ 77590, 77595, 77600, 77605, 77610, 77615, 77620, 77625, 77630, 77635,
+ 77640, 77645, 77650, 77656, 77661, 77666, 77671, 77676, 77681, 77686,
+ 77691, 1890, 163, 77696, 77700, 77704, 77709, 77717, 77721, 77728, 77736,
+ 77740, 77753, 77761, 77766, 77771, 28394, 77775, 77780, 77784, 77789,
+ 77793, 77801, 77805, 22587, 77810, 77814, 66162, 77818, 77821, 77829,
+ 77837, 77845, 77850, 77855, 77862, 77869, 77875, 77881, 77886, 77891,
+ 77899, 70551, 77906, 65948, 77911, 77916, 77920, 77927, 65975, 12743,
+ 77933, 77938, 77943, 77947, 77950, 77956, 77960, 77970, 77979, 77983,
+ 77986, 77990, 77997, 78010, 78016, 78024, 78033, 78044, 78055, 78066,
+ 78077, 78086, 78092, 78101, 78109, 78119, 78132, 78140, 78147, 78158,
+ 78164, 78169, 78174, 78180, 78186, 78196, 78203, 78213, 78222, 76423,
+ 78230, 78236, 78244, 78250, 78257, 78265, 78270, 78273, 78277, 78281,
+ 78284, 78290, 78296, 78304, 78316, 78328, 78335, 78340, 78344, 78355,
+ 78363, 78370, 78382, 78390, 78398, 78405, 78411, 78416, 78426, 78435,
+ 78440, 78450, 78459, 45549, 78466, 78470, 78475, 78483, 78490, 78496,
+ 78500, 78510, 78521, 78529, 78536, 78548, 78560, 78569, 75370, 78576,
+ 78586, 78598, 78609, 78623, 78631, 78641, 78648, 78656, 78669, 78681,
+ 78690, 78698, 78708, 78719, 78731, 78740, 78750, 78760, 78769, 78776,
+ 78785, 78800, 78808, 78818, 78827, 78835, 78848, 63026, 78863, 78873,
+ 78882, 78894, 78904, 78916, 78927, 78938, 78949, 78959, 78970, 78978,
+ 78984, 78994, 79002, 79008, 31291, 79013, 79019, 79028, 79040, 79045,
+ 79052, 10448, 19134, 79058, 79067, 79072, 79076, 79083, 79089, 79094,
+ 79099, 79107, 79115, 13119, 79119, 79122, 79124, 79131, 79137, 79148,
+ 79153, 79157, 79164, 79170, 79175, 79183, 71120, 71130, 79189, 79196,
+ 79206, 11543, 79213, 79218, 31506, 79227, 79232, 79239, 79249, 79257,
+ 79265, 79274, 79280, 79286, 79293, 79300, 79305, 79309, 79317, 65992,
+ 79322, 79331, 79339, 79346, 79351, 79355, 79364, 79370, 79373, 79377,
+ 79386, 79396, 77748, 79405, 79409, 79417, 79421, 79427, 79438, 79448,
+ 19143, 79459, 79468, 79476, 79484, 79491, 66011, 9147, 79499, 79503,
+ 79512, 79519, 79522, 29470, 79525, 79529, 79534, 79551, 79563, 11501,
+ 79575, 79580, 79585, 79590, 22669, 79594, 79599, 79604, 79610, 79615,
+ 6122, 79620, 22673, 79625, 79630, 79636, 79643, 79648, 79653, 79659,
+ 79665, 79671, 79676, 79682, 79686, 79700, 79708, 79716, 79722, 79727,
+ 79734, 79744, 79753, 79758, 79763, 79768, 79776, 79781, 79787, 79792,
+ 79801, 64713, 79806, 79809, 79827, 79846, 79859, 79873, 79889, 79896,
+ 79903, 79912, 79919, 79925, 79932, 79937, 79943, 79949, 79957, 79963,
+ 79968, 79973, 79989, 11514, 80003, 80010, 80018, 80024, 80028, 80031,
+ 80036, 80041, 80048, 80053, 80062, 80068, 80073, 80079, 80085, 80094,
+ 80103, 80108, 80112, 80120, 80129, 12772, 80138, 80144, 80152, 80158,
+ 80164, 80170, 80175, 80182, 80188, 12783, 80193, 80196, 80201, 35223,
+ 80211, 80220, 80225, 80231, 80236, 80244, 80251, 80262, 80272, 80277,
+ 80285, 70474, 80290, 80296, 80301, 80308, 80317, 80325, 80329, 80335,
+ 80341, 80348, 80354, 80358, 18518, 3114, 80363, 80367, 80371, 80377,
+ 80386, 80392, 80399, 80403, 80424, 80446, 80462, 80479, 80498, 80507,
+ 80517, 80525, 80532, 80539, 80545, 29342, 80559, 80563, 80569, 80577,
+ 80589, 80595, 80603, 80610, 80615, 80620, 80624, 80632, 80639, 80643,
+ 80649, 80655, 80660, 3730, 46721, 80666, 80670, 80674, 80678, 80683,
+ 80688, 80693, 80699, 80705, 80711, 80718, 80724, 80731, 80737, 80743,
+ 80748, 80754, 80759, 80763, 80768, 80772, 80777, 46736, 80781, 80786,
+ 80794, 80798, 80803, 80810, 80819, 80825, 80834, 80838, 80845, 80849,
+ 80852, 80859, 80865, 80874, 80884, 80889, 80893, 80901, 80910, 80914,
+ 80922, 80928, 80933, 80938, 80944, 80950, 80955, 80959, 80965, 80970,
+ 80974, 80978, 80981, 80986, 80994, 81004, 81010, 81015, 81025, 44031,
+ 81033, 81045, 81049, 81055, 81067, 81078, 81085, 81091, 81098, 81105,
+ 81117, 81124, 81130, 22747, 81134, 81142, 81148, 81155, 81161, 81167,
+ 81173, 81178, 81183, 81188, 81197, 81205, 81216, 7350, 81221, 17967,
+ 81227, 81231, 81235, 81239, 81247, 81256, 81260, 81267, 81276, 81284,
+ 81297, 81303, 80773, 32390, 81308, 81310, 81315, 81320, 81325, 81330,
+ 81335, 81340, 81345, 81350, 81355, 81360, 81365, 81370, 81375, 81380,
+ 81386, 81391, 81396, 81401, 81406, 81411, 81416, 81421, 81426, 81432,
+ 81438, 81444, 81449, 81454, 81466, 81471, 1896, 63, 81476, 81481, 35229,
+ 81485, 35234, 35239, 35245, 35250, 81489, 35255, 23785, 81511, 81515,
+ 81519, 81524, 81528, 35259, 81532, 81540, 81547, 35264, 81553, 81556,
+ 81561, 81565, 81574, 10266, 81582, 35269, 23641, 81585, 81589, 81597,
+ 1412, 81602, 35280, 81605, 81610, 27750, 27760, 38182, 81615, 81620,
+ 81625, 81630, 81636, 81641, 81650, 81655, 81664, 81672, 81679, 81685,
+ 81690, 81695, 81700, 81710, 81719, 81727, 81732, 81740, 81744, 81752,
+ 81756, 81763, 81771, 35088, 41192, 81778, 81784, 81789, 81794, 13154,
+ 30529, 81799, 81804, 81811, 81817, 81822, 81830, 81840, 81850, 81856,
+ 81861, 81867, 19165, 81874, 39052, 81887, 81892, 81898, 33381, 81911,
+ 81917, 81921, 81930, 81939, 81946, 81952, 81960, 81969, 81976, 81982,
+ 81985, 81989, 81993, 27891, 81997, 82004, 82010, 82018, 82023, 82027,
+ 25911, 82033, 82036, 82044, 82051, 82059, 82072, 82086, 82093, 82099,
+ 82106, 82112, 35294, 82116, 82123, 82131, 82139, 82145, 35299, 82153,
+ 82159, 82164, 82174, 82180, 82189, 33183, 37614, 82197, 82202, 82207,
+ 82211, 82216, 82220, 82228, 82233, 16296, 44044, 82237, 82242, 35304,
+ 67547, 82246, 82251, 82255, 82262, 82271, 82275, 82283, 82289, 82294,
+ 82300, 82305, 82312, 82318, 82323, 82328, 82339, 82348, 82360, 82375,
+ 35571, 82381, 18086, 35308, 82385, 82392, 82398, 26027, 82402, 82409,
+ 82418, 82425, 82434, 82440, 82445, 82453, 82459, 35318, 82464, 82473,
+ 81073, 82482, 82489, 82495, 82501, 82510, 82520, 82528, 82535, 82539,
+ 35323, 82542, 35329, 35335, 82547, 82555, 82563, 82573, 82582, 82590,
+ 82597, 82607, 35340, 82611, 82613, 82617, 82622, 82626, 82630, 82636,
+ 82641, 82645, 82656, 82661, 82666, 3119, 82670, 82677, 82681, 82690,
+ 82698, 82705, 82710, 82715, 67598, 82719, 82722, 82728, 82736, 82742,
+ 82746, 82751, 82758, 82763, 82768, 82772, 82778, 82783, 37645, 82787,
+ 82790, 82795, 82799, 82804, 82811, 82816, 82820, 42580, 82828, 27769,
+ 27778, 82834, 82840, 82846, 82851, 82855, 82858, 82868, 82877, 82882,
+ 82888, 82895, 82901, 82905, 82913, 82918, 37651, 77952, 82922, 82930,
+ 82936, 82943, 82948, 82952, 82957, 63242, 82963, 82969, 37657, 82974,
+ 82979, 82983, 82988, 82993, 82998, 83002, 83007, 83012, 83018, 83023,
+ 83028, 83034, 83040, 83045, 83049, 83054, 83059, 83064, 83068, 26026,
+ 83073, 83078, 83084, 83090, 83096, 83101, 83105, 83110, 83115, 83120,
+ 83124, 83129, 83134, 83139, 83144, 46991, 83148, 35348, 83156, 83160,
+ 83168, 83176, 83187, 83192, 83196, 24211, 75473, 83201, 83207, 83212,
+ 83222, 83229, 83234, 83242, 83251, 83256, 83260, 83265, 83273, 83281,
+ 83288, 70736, 83294, 83302, 83309, 83320, 83326, 83332, 35358, 83335,
+ 83342, 83350, 83355, 44247, 83359, 83364, 83371, 83376, 9484, 83380,
+ 83388, 83395, 83402, 83411, 83418, 83424, 83438, 6194, 83446, 83452,
+ 83456, 83459, 83467, 83474, 83479, 83492, 83499, 83505, 83509, 83514,
+ 83521, 83526, 65851, 83531, 83534, 83543, 83550, 83556, 83560, 83563,
+ 83571, 83580, 83590, 83600, 83609, 83620, 83628, 83639, 83644, 83648,
+ 83653, 83657, 38313, 83665, 23042, 38322, 83670, 83675, 83680, 83685,
+ 83690, 83695, 83700, 83704, 83709, 83714, 83719, 83724, 83729, 83734,
+ 83738, 83743, 83748, 83752, 83756, 83760, 83764, 83769, 83774, 83778,
+ 83783, 83787, 83791, 83796, 83801, 83806, 83811, 83815, 83820, 83825,
+ 83829, 83834, 83839, 83844, 83849, 83854, 83859, 83864, 83869, 83874,
+ 83879, 83884, 83889, 83894, 83899, 83904, 83909, 83914, 83919, 83924,
+ 83929, 83933, 83938, 83943, 83948, 83953, 83958, 83963, 83968, 83973,
+ 83978, 83983, 83988, 83992, 83997, 84001, 84006, 84011, 84016, 84021,
+ 84026, 84031, 84036, 84041, 84046, 84050, 84054, 84059, 84064, 84068,
+ 84073, 84078, 84082, 84087, 84092, 84097, 84102, 84106, 84111, 84116,
+ 84120, 84125, 84129, 84133, 84137, 84141, 84146, 84150, 84154, 84158,
+ 84162, 84166, 84170, 84174, 84178, 84182, 84187, 84192, 84197, 84202,
+ 84207, 84212, 84217, 84222, 84227, 84232, 84236, 84240, 84244, 84248,
+ 84252, 84256, 84261, 84265, 84270, 84274, 84279, 84284, 84288, 84292,
+ 84297, 84301, 84305, 84309, 84313, 84317, 84321, 84325, 84329, 84333,
+ 84337, 84341, 84345, 84349, 84353, 84358, 84363, 84367, 84371, 84375,
+ 84379, 84383, 84387, 84392, 84396, 84400, 84404, 84408, 84412, 84416,
+ 84421, 84425, 84430, 84434, 84438, 84442, 84446, 84450, 84454, 84458,
+ 84462, 84466, 84470, 84474, 84479, 84483, 84487, 84491, 84495, 84499,
+ 84503, 84507, 84511, 84515, 84519, 84523, 84528, 84532, 84536, 84541,
+ 84546, 84550, 84554, 84558, 84562, 84566, 84570, 84574, 84578, 84583,
+ 84587, 84592, 84596, 84601, 84605, 84610, 84614, 84620, 84625, 84629,
+ 84634, 84638, 84643, 84647, 84652, 84656, 84661, 1519, 84665, 2873, 1774,
+ 1692, 27705, 84669, 2882, 84673, 1381, 84678, 1323, 84682, 84686, 2899,
+ 84690, 84697, 84704, 84718, 2903, 7452, 84727, 84735, 84742, 84753,
+ 84762, 84769, 84781, 84794, 84807, 84818, 84823, 84830, 84842, 84846,
+ 2907, 12850, 84856, 84861, 84870, 84880, 84885, 2911, 84893, 84897,
+ 84902, 84909, 84915, 84923, 84935, 1328, 14201, 84945, 84949, 84955,
+ 84969, 84981, 84993, 85003, 85012, 85021, 85030, 85038, 85049, 85057,
+ 4292, 85067, 85078, 85087, 85093, 85108, 85115, 85121, 85126, 38447,
+ 85131, 2935, 14205, 85135, 85142, 9409, 85151, 2940, 34796, 85157, 65573,
+ 85164, 85170, 85181, 85187, 85194, 85200, 85208, 85215, 85221, 85232,
+ 85242, 85251, 85262, 85271, 85278, 85284, 85294, 85302, 85308, 85323,
+ 85329, 85334, 85341, 85344, 85350, 85357, 85363, 85371, 85380, 85388,
+ 85394, 85403, 46261, 85417, 85422, 85428, 16072, 85433, 85446, 85458,
+ 85467, 85475, 85482, 85486, 85490, 85493, 85500, 85507, 85515, 85523,
+ 85532, 85540, 15983, 85548, 85553, 85557, 85569, 85576, 85585, 841,
+ 85595, 85604, 85615, 2956, 85619, 85623, 85629, 85642, 85654, 85664,
+ 85673, 85685, 28446, 85696, 85704, 85713, 85724, 85735, 85745, 85755,
+ 85764, 85772, 12364, 85779, 85783, 85786, 85791, 85796, 85800, 85806,
+ 1333, 85813, 85817, 12932, 85821, 85832, 85841, 85849, 85858, 85866,
+ 85882, 85893, 85902, 85910, 85922, 85933, 85949, 85959, 85980, 85994,
+ 86007, 86015, 86022, 7498, 86035, 86040, 86046, 6203, 86052, 86055,
+ 86062, 86072, 8554, 86079, 86084, 86089, 86094, 86102, 86111, 86119,
+ 86124, 86131, 10496, 10505, 86137, 86148, 86153, 86159, 2972, 2977,
+ 86165, 11857, 86171, 86178, 86185, 86198, 2281, 87, 86203, 86208, 86216,
+ 86226, 86235, 86241, 86250, 86258, 86268, 86272, 86276, 86281, 86285,
+ 86297, 3000, 86305, 86313, 86318, 86329, 86340, 86352, 86363, 86373,
+ 86382, 23083, 86387, 86393, 86398, 86408, 86418, 86423, 86429, 86433,
+ 86438, 86447, 23095, 86451, 4384, 24, 86456, 86465, 86472, 86479, 86485,
+ 86491, 1049, 86496, 86501, 66128, 86506, 86511, 86517, 86523, 86531,
+ 86536, 86544, 86551, 86557, 86562, 42464, 46155, 86568, 3004, 32, 86578,
+ 86591, 86596, 86604, 86609, 86615, 3026, 30497, 86620, 86628, 86635,
+ 86640, 86649, 63492, 4018, 67218, 86657, 86661, 1719, 1833, 86666, 86671,
+ 86678, 1837, 280, 86685, 86691, 86696, 3048, 86700, 86705, 86712, 1841,
+ 86717, 86723, 86728, 86740, 6430, 86750, 86757, 1848, 86763, 86768,
+ 86775, 86782, 86797, 86804, 86815, 86820, 86828, 2657, 86832, 86844,
+ 86849, 86853, 86859, 30313, 2286, 86863, 86874, 86878, 86882, 86888,
+ 86892, 86901, 86905, 86916, 86920, 2332, 34613, 86924, 86934, 3139,
+ 86942, 9909, 86951, 86956, 86960, 86969, 86976, 86982, 3109, 16136,
+ 86986, 86999, 87017, 87022, 87030, 87038, 87048, 10768, 14318, 87060,
+ 87073, 87080, 87094, 87101, 87117, 87124, 87130, 23127, 13556, 87137,
+ 87144, 87154, 87163, 46990, 87175, 47125, 87183, 87186, 87192, 87198,
+ 87204, 87210, 87216, 87223, 87230, 87236, 87242, 87248, 87254, 87260,
+ 87266, 87272, 87278, 87284, 87290, 87296, 87302, 87308, 87314, 87320,
+ 87326, 87332, 87338, 87344, 87350, 87356, 87362, 87368, 87374, 87380,
+ 87386, 87392, 87398, 87404, 87410, 87416, 87422, 87428, 87434, 87440,
+ 87446, 87452, 87458, 87464, 87470, 87476, 87482, 87488, 87494, 87500,
+ 87506, 87512, 87518, 87524, 87530, 87536, 87543, 87549, 87556, 87563,
+ 87569, 87576, 87583, 87589, 87595, 87601, 87607, 87613, 87619, 87625,
+ 87631, 87637, 87643, 87649, 87655, 87661, 87667, 87673, 3123, 9882,
+ 87679, 87685, 87693, 87697, 84905, 3127, 87701, 22860, 13189, 3968,
+ 87705, 3133, 87709, 87719, 87725, 87731, 87737, 87743, 87749, 87755,
+ 87761, 87767, 87773, 87779, 87785, 87791, 87797, 87803, 87809, 87815,
+ 87821, 87827, 87833, 87839, 87845, 87851, 87857, 87863, 87869, 87876,
+ 87883, 87889, 87895, 87901, 87907, 87913, 87919, 1338, 87925, 87930,
+ 87935, 87940, 87945, 87950, 87955, 87960, 87965, 87969, 87973, 87977,
+ 87981, 87985, 87989, 87993, 87997, 88001, 88007, 88013, 88019, 88025,
+ 88029, 88033, 88037, 88041, 88045, 88049, 88053, 88057, 88061, 88066,
+ 88071, 88076, 88081, 88086, 88091, 88096, 88101, 88106, 88111, 88116,
+ 88121, 88126, 88131, 88136, 88141, 88146, 88151, 88156, 88161, 88166,
+ 88171, 88176, 88181, 88186, 88191, 88196, 88201, 88206, 88211, 88216,
+ 88221, 88226, 88231, 88236, 88241, 88246, 88251, 88256, 88261, 88266,
+ 88271, 88276, 88281, 88286, 88291, 88296, 88301, 88306, 88311, 88316,
+ 88321, 88326, 88331, 88336, 88341, 88346, 88351, 88356, 88361, 88366,
+ 88371, 88376, 88381, 88386, 88391, 88396, 88401, 88406, 88411, 88416,
+ 88421, 88426, 88431, 88436, 88441, 88446, 88451, 88456, 88461, 88466,
+ 88471, 88476, 88481, 88486, 88491, 88496, 88501, 88506, 88511, 88516,
+ 88521, 88526, 88531, 88536, 88541, 88546, 88551, 88556, 88561, 88566,
+ 88571, 88576, 88581, 88586, 88591, 88596, 88601, 88606, 88611, 88616,
+ 88621, 88626, 88631, 88636, 88641, 88646, 88651, 88656, 88661, 88666,
+ 88671, 88676, 88681, 88686, 88691, 88696, 88701, 88706, 88711, 88716,
+ 88721, 88726, 88731, 88736, 88741, 88746, 88751, 88756, 88761, 88766,
+ 88771, 88776, 88781, 88786, 88791, 88796, 88801, 88806, 88811, 88816,
+ 88821, 88826, 88831, 88836, 88841, 88846, 88851, 88856, 88861, 88866,
+ 88871, 88876, 88881, 88886, 88891, 88896, 88901, 88906, 88911, 88916,
+ 88921, 88926, 88931, 88936, 88941, 88946, 88951, 88957, 88962, 88967,
+ 88972, 88977, 88982, 88987, 88992, 88998, 89003, 89008, 89013, 89018,
+ 89023, 89028, 89033, 89038, 89043, 89048, 89053, 89058, 89063, 89068,
+ 89073, 89078, 89083, 89088, 89093, 89098, 89103, 89108, 89113, 89118,
+ 89123, 89128, 89133, 89138, 89143, 89148, 89153, 89158, 89167, 89172,
+ 89181, 89186, 89195, 89200, 89209, 89214, 89223, 89228, 89237, 89242,
+ 89251, 89256, 89265, 89270, 89275, 89284, 89288, 89297, 89302, 89311,
+ 89316, 89325, 89330, 89339, 89344, 89353, 89358, 89367, 89372, 89381,
+ 89386, 89395, 89400, 89409, 89414, 89423, 89428, 89433, 89438, 89443,
+ 89448, 89453, 89458, 89462, 89467, 89472, 89477, 89482, 89487, 89492,
+ 89498, 89503, 89508, 89513, 89519, 89523, 89528, 89534, 89539, 89544,
+ 89549, 89554, 89559, 89564, 89569, 89574, 89579, 89584, 89590, 89595,
+ 89600, 89605, 89611, 89616, 89621, 89626, 89631, 89637, 89642, 89647,
+ 89652, 89657, 89662, 89668, 89673, 89678, 89683, 89688, 89693, 89698,
+ 89703, 89708, 89713, 89718, 89723, 89728, 89733, 89738, 89743, 89748,
+ 89753, 89758, 89763, 89768, 89773, 89778, 89783, 89789, 89795, 89801,
+ 89806, 89811, 89816, 89821, 89827, 89833, 89839, 89844, 89849, 89854,
+ 89860, 89865, 89870, 89875, 89880, 89885, 89890, 89895, 89900, 89905,
+ 89910, 89915, 89920, 89925, 89930, 89935, 89940, 89946, 89952, 89958,
+ 89963, 89968, 89973, 89978, 89984, 89990, 89996, 90001, 90006, 90011,
+ 90016, 90021, 90026, 90031, 90036, 90041, 17539, 90046, 90052, 90057,
+ 90062, 90067, 90072, 90077, 90083, 90088, 90093, 90098, 90103, 90108,
+ 90114, 90119, 90124, 90129, 90134, 90139, 90144, 90149, 90154, 90159,
+ 90164, 90169, 90174, 90179, 90184, 90189, 90194, 90199, 90204, 90209,
+ 90214, 90219, 90224, 90230, 90235, 90240, 90245, 90250, 90255, 90260,
+ 90265, 90270, 90275, 90280, 90285, 90290, 90295, 90300, 90305, 90310,
+ 90315, 90320, 90325, 90330, 90335, 90340, 90345, 90350, 90355, 90360,
+ 90365, 90370, 90375, 90380, 90385, 90390, 90395, 90400, 90405, 90410,
+ 90415, 90420, 90425, 90430, 90436, 90441, 90446, 90451, 90456, 90461,
+ 90466, 90471, 90476, 90481, 90486, 90491, 90497, 90502, 90508, 90513,
+ 90518, 90523, 90528, 90533, 90538, 90544, 90549, 90554, 90560, 90565,
+ 90570, 90575, 90580, 90585, 90591, 90597, 90602, 90607, 13211, 90612,
+ 90617, 90622, 90627, 90632, 90637, 90642, 90647, 90652, 90657, 90662,
+ 90667, 90672, 90677, 90682, 90687, 90692, 90697, 90702, 90707, 90712,
+ 90717, 90722, 90727, 90732, 90737, 90742, 90747, 90752, 90757, 90762,
+ 90767, 90772, 90777, 90782, 90787, 90792, 90797, 90802, 90807, 90812,
+ 90817, 90822, 90827, 90832, 90837, 90842, 90847, 90852, 90857, 90862,
+ 90867, 90872, 90877, 90882, 90887, 90892, 90897, 90902, 90907, 90912,
+ 90917, 90922, 90927, 90932, 90938, 90943, 90948, 90953, 90958, 90964,
+ 90969, 90974, 90979, 90984, 90989, 90994, 91000, 91005, 91010, 91015,
+ 91020, 91025, 91031, 91036, 91041, 91046, 91051, 91056, 91062, 91067,
+ 91072, 91077, 91082, 91087, 91093, 91099, 91104, 91109, 91114, 91120,
+ 91126, 91132, 91137, 91142, 91148, 91154, 91159, 91165, 91171, 91177,
+ 91182, 91187, 91193, 91198, 91204, 91209, 91215, 91224, 91229, 91234,
+ 91240, 91245, 91251, 91256, 91261, 91266, 91271, 91276, 91281, 91286,
+ 91291, 91296, 91301, 91306, 91311, 91316, 91321, 91326, 91331, 91336,
+ 91341, 91346, 91351, 91356, 91361, 91366, 91371, 91376, 91381, 91386,
+ 91391, 91396, 91401, 91406, 91412, 91418, 91424, 91429, 91434, 91439,
+ 91444, 91449, 91454, 91459, 91464, 91469, 91474, 91479, 91484, 91489,
+ 91494, 91499, 91504, 91509, 91514, 91519, 91524, 91530, 91536, 91541,
+ 91547, 91552, 91557, 91563, 91568, 91574, 91579, 91585, 91590, 91596,
+ 91601, 91607, 91612, 91617, 91622, 91627, 91632, 91637, 91642, 87720,
+ 87726, 87732, 87738, 91648, 87744, 87750, 91654, 87756, 87762, 87768,
+ 87774, 87780, 87786, 87792, 87798, 87804, 91660, 87810, 87816, 87822,
+ 91666, 87828, 87834, 87840, 87846, 91672, 87852, 87858, 87864, 87884,
+ 91678, 91684, 87890, 91690, 87896, 87902, 87908, 87914, 87920, 3150,
+ 3155, 91696, 91701, 91704, 91710, 91716, 91723, 91728, 91733, 2337,
};
/* code->name phrasebook */
-#define phrasebook_shift 7
-#define phrasebook_short 209
+#define phrasebook_shift 8
+#define phrasebook_short 201
static unsigned char phrasebook[] = {
- 0, 219, 20, 245, 39, 79, 224, 1, 79, 54, 50, 247, 140, 50, 225, 185, 50,
- 254, 134, 254, 65, 43, 226, 7, 44, 226, 7, 253, 224, 96, 50, 249, 227,
- 240, 174, 243, 236, 218, 131, 219, 48, 21, 210, 86, 21, 111, 21, 105, 21,
- 158, 21, 161, 21, 190, 21, 195, 21, 199, 21, 196, 21, 201, 249, 234, 220,
- 152, 233, 21, 50, 245, 106, 50, 242, 137, 50, 224, 16, 79, 249, 225, 253,
- 214, 7, 6, 1, 61, 7, 6, 1, 253, 166, 7, 6, 1, 251, 74, 7, 6, 1, 249, 68,
- 7, 6, 1, 76, 7, 6, 1, 245, 14, 7, 6, 1, 243, 209, 7, 6, 1, 242, 67, 7, 6,
- 1, 74, 7, 6, 1, 235, 150, 7, 6, 1, 235, 29, 7, 6, 1, 156, 7, 6, 1, 194,
- 7, 6, 1, 230, 30, 7, 6, 1, 78, 7, 6, 1, 226, 109, 7, 6, 1, 224, 99, 7, 6,
- 1, 153, 7, 6, 1, 222, 93, 7, 6, 1, 217, 153, 7, 6, 1, 69, 7, 6, 1, 214,
- 105, 7, 6, 1, 212, 98, 7, 6, 1, 211, 178, 7, 6, 1, 211, 117, 7, 6, 1,
- 210, 159, 43, 42, 127, 223, 53, 219, 48, 44, 42, 127, 250, 39, 255, 23,
- 121, 232, 219, 242, 144, 255, 23, 7, 4, 1, 61, 7, 4, 1, 253, 166, 7, 4,
- 1, 251, 74, 7, 4, 1, 249, 68, 7, 4, 1, 76, 7, 4, 1, 245, 14, 7, 4, 1,
- 243, 209, 7, 4, 1, 242, 67, 7, 4, 1, 74, 7, 4, 1, 235, 150, 7, 4, 1, 235,
- 29, 7, 4, 1, 156, 7, 4, 1, 194, 7, 4, 1, 230, 30, 7, 4, 1, 78, 7, 4, 1,
- 226, 109, 7, 4, 1, 224, 99, 7, 4, 1, 153, 7, 4, 1, 222, 93, 7, 4, 1, 217,
- 153, 7, 4, 1, 69, 7, 4, 1, 214, 105, 7, 4, 1, 212, 98, 7, 4, 1, 211, 178,
- 7, 4, 1, 211, 117, 7, 4, 1, 210, 159, 43, 249, 107, 127, 67, 232, 219,
- 44, 249, 107, 127, 184, 228, 78, 219, 20, 235, 200, 245, 39, 79, 250,
- 184, 50, 224, 231, 50, 249, 106, 50, 211, 40, 50, 251, 143, 130, 221,
- 175, 50, 248, 9, 249, 171, 50, 244, 144, 226, 158, 235, 245, 233, 48, 52,
- 254, 118, 224, 1, 79, 228, 57, 50, 219, 54, 240, 175, 223, 105, 50, 231,
- 237, 248, 79, 50, 225, 24, 50, 218, 24, 105, 218, 24, 158, 255, 12, 255,
- 23, 230, 233, 50, 225, 71, 50, 230, 229, 247, 128, 250, 191, 218, 24,
- 111, 231, 153, 226, 158, 235, 245, 222, 250, 52, 254, 118, 224, 1, 79,
- 212, 114, 244, 10, 123, 224, 24, 212, 114, 244, 10, 123, 242, 34, 212,
- 114, 244, 10, 134, 224, 22, 235, 200, 224, 16, 79, 7, 6, 1, 116, 2, 242,
- 143, 7, 6, 1, 116, 2, 142, 7, 6, 1, 116, 2, 250, 38, 7, 6, 1, 116, 2,
- 184, 7, 6, 1, 116, 2, 248, 9, 7, 6, 1, 116, 2, 222, 237, 48, 7, 6, 1,
- 254, 252, 7, 6, 1, 251, 75, 2, 250, 191, 7, 6, 1, 160, 2, 242, 143, 7, 6,
- 1, 160, 2, 142, 7, 6, 1, 160, 2, 250, 38, 7, 6, 1, 160, 2, 248, 9, 7, 6,
- 1, 240, 161, 2, 242, 143, 7, 6, 1, 240, 161, 2, 142, 7, 6, 1, 240, 161,
- 2, 250, 38, 7, 6, 1, 240, 161, 2, 248, 9, 7, 6, 1, 245, 67, 7, 6, 1, 230,
- 31, 2, 184, 7, 6, 1, 144, 2, 242, 143, 7, 6, 1, 144, 2, 142, 7, 6, 1,
- 144, 2, 250, 38, 7, 6, 1, 144, 2, 184, 7, 6, 1, 144, 2, 248, 9, 230, 89,
- 50, 7, 6, 1, 144, 2, 91, 7, 6, 1, 104, 2, 242, 143, 7, 6, 1, 104, 2, 142,
- 7, 6, 1, 104, 2, 250, 38, 7, 6, 1, 104, 2, 248, 9, 7, 6, 1, 211, 118, 2,
- 142, 7, 6, 1, 216, 152, 7, 4, 1, 220, 78, 222, 93, 7, 4, 1, 116, 2, 242,
- 143, 7, 4, 1, 116, 2, 142, 7, 4, 1, 116, 2, 250, 38, 7, 4, 1, 116, 2,
- 184, 7, 4, 1, 116, 2, 248, 9, 7, 4, 1, 116, 2, 222, 237, 48, 7, 4, 1,
- 254, 252, 7, 4, 1, 251, 75, 2, 250, 191, 7, 4, 1, 160, 2, 242, 143, 7, 4,
- 1, 160, 2, 142, 7, 4, 1, 160, 2, 250, 38, 7, 4, 1, 160, 2, 248, 9, 7, 4,
- 1, 240, 161, 2, 242, 143, 7, 4, 1, 240, 161, 2, 142, 7, 4, 1, 240, 161,
- 2, 250, 38, 7, 4, 1, 240, 161, 2, 248, 9, 7, 4, 1, 245, 67, 7, 4, 1, 230,
- 31, 2, 184, 7, 4, 1, 144, 2, 242, 143, 7, 4, 1, 144, 2, 142, 7, 4, 1,
- 144, 2, 250, 38, 7, 4, 1, 144, 2, 184, 7, 4, 1, 144, 2, 248, 9, 247, 177,
- 50, 7, 4, 1, 144, 2, 91, 7, 4, 1, 104, 2, 242, 143, 7, 4, 1, 104, 2, 142,
- 7, 4, 1, 104, 2, 250, 38, 7, 4, 1, 104, 2, 248, 9, 7, 4, 1, 211, 118, 2,
- 142, 7, 4, 1, 216, 152, 7, 4, 1, 211, 118, 2, 248, 9, 7, 6, 1, 116, 2,
- 231, 237, 7, 4, 1, 116, 2, 231, 237, 7, 6, 1, 116, 2, 251, 154, 7, 4, 1,
- 116, 2, 251, 154, 7, 6, 1, 116, 2, 226, 228, 7, 4, 1, 116, 2, 226, 228,
- 7, 6, 1, 251, 75, 2, 142, 7, 4, 1, 251, 75, 2, 142, 7, 6, 1, 251, 75, 2,
- 250, 38, 7, 4, 1, 251, 75, 2, 250, 38, 7, 6, 1, 251, 75, 2, 59, 48, 7, 4,
- 1, 251, 75, 2, 59, 48, 7, 6, 1, 251, 75, 2, 250, 242, 7, 4, 1, 251, 75,
- 2, 250, 242, 7, 6, 1, 249, 69, 2, 250, 242, 7, 4, 1, 249, 69, 2, 250,
- 242, 7, 6, 1, 249, 69, 2, 91, 7, 4, 1, 249, 69, 2, 91, 7, 6, 1, 160, 2,
- 231, 237, 7, 4, 1, 160, 2, 231, 237, 7, 6, 1, 160, 2, 251, 154, 7, 4, 1,
- 160, 2, 251, 154, 7, 6, 1, 160, 2, 59, 48, 7, 4, 1, 160, 2, 59, 48, 7, 6,
- 1, 160, 2, 226, 228, 7, 4, 1, 160, 2, 226, 228, 7, 6, 1, 160, 2, 250,
- 242, 7, 4, 1, 160, 2, 250, 242, 7, 6, 1, 243, 210, 2, 250, 38, 7, 4, 1,
- 243, 210, 2, 250, 38, 7, 6, 1, 243, 210, 2, 251, 154, 7, 4, 1, 243, 210,
- 2, 251, 154, 7, 6, 1, 243, 210, 2, 59, 48, 7, 4, 1, 243, 210, 2, 59, 48,
- 7, 6, 1, 243, 210, 2, 250, 191, 7, 4, 1, 243, 210, 2, 250, 191, 7, 6, 1,
- 242, 68, 2, 250, 38, 7, 4, 1, 242, 68, 2, 250, 38, 7, 6, 1, 242, 68, 2,
- 91, 7, 4, 1, 242, 68, 2, 91, 7, 6, 1, 240, 161, 2, 184, 7, 4, 1, 240,
- 161, 2, 184, 7, 6, 1, 240, 161, 2, 231, 237, 7, 4, 1, 240, 161, 2, 231,
- 237, 7, 6, 1, 240, 161, 2, 251, 154, 7, 4, 1, 240, 161, 2, 251, 154, 7,
- 6, 1, 240, 161, 2, 226, 228, 7, 4, 1, 240, 161, 2, 226, 228, 7, 6, 1,
- 240, 161, 2, 59, 48, 7, 4, 1, 247, 127, 74, 7, 6, 27, 236, 38, 7, 4, 27,
- 236, 38, 7, 6, 1, 235, 151, 2, 250, 38, 7, 4, 1, 235, 151, 2, 250, 38, 7,
- 6, 1, 235, 30, 2, 250, 191, 7, 4, 1, 235, 30, 2, 250, 191, 7, 4, 1, 233,
- 245, 7, 6, 1, 233, 155, 2, 142, 7, 4, 1, 233, 155, 2, 142, 7, 6, 1, 233,
- 155, 2, 250, 191, 7, 4, 1, 233, 155, 2, 250, 191, 7, 6, 1, 233, 155, 2,
- 250, 242, 7, 4, 1, 233, 155, 2, 250, 242, 7, 6, 1, 233, 155, 2, 230, 229,
- 247, 128, 7, 4, 1, 233, 155, 2, 230, 229, 247, 128, 7, 6, 1, 233, 155, 2,
- 91, 7, 4, 1, 233, 155, 2, 91, 7, 6, 1, 230, 31, 2, 142, 7, 4, 1, 230, 31,
- 2, 142, 7, 6, 1, 230, 31, 2, 250, 191, 7, 4, 1, 230, 31, 2, 250, 191, 7,
- 6, 1, 230, 31, 2, 250, 242, 7, 4, 1, 230, 31, 2, 250, 242, 7, 4, 1, 230,
- 31, 224, 207, 251, 86, 254, 65, 7, 6, 1, 245, 146, 7, 4, 1, 245, 146, 7,
- 6, 1, 144, 2, 231, 237, 7, 4, 1, 144, 2, 231, 237, 7, 6, 1, 144, 2, 251,
- 154, 7, 4, 1, 144, 2, 251, 154, 7, 6, 1, 144, 2, 52, 142, 7, 4, 1, 144,
- 2, 52, 142, 7, 6, 27, 226, 238, 7, 4, 27, 226, 238, 7, 6, 1, 223, 227, 2,
- 142, 7, 4, 1, 223, 227, 2, 142, 7, 6, 1, 223, 227, 2, 250, 191, 7, 4, 1,
- 223, 227, 2, 250, 191, 7, 6, 1, 223, 227, 2, 250, 242, 7, 4, 1, 223, 227,
- 2, 250, 242, 7, 6, 1, 222, 94, 2, 142, 7, 4, 1, 222, 94, 2, 142, 7, 6, 1,
- 222, 94, 2, 250, 38, 7, 4, 1, 222, 94, 2, 250, 38, 7, 6, 1, 222, 94, 2,
- 250, 191, 7, 4, 1, 222, 94, 2, 250, 191, 7, 6, 1, 222, 94, 2, 250, 242,
- 7, 4, 1, 222, 94, 2, 250, 242, 7, 6, 1, 217, 154, 2, 250, 191, 7, 4, 1,
- 217, 154, 2, 250, 191, 7, 6, 1, 217, 154, 2, 250, 242, 7, 4, 1, 217, 154,
- 2, 250, 242, 7, 6, 1, 217, 154, 2, 91, 7, 4, 1, 217, 154, 2, 91, 7, 6, 1,
- 104, 2, 184, 7, 4, 1, 104, 2, 184, 7, 6, 1, 104, 2, 231, 237, 7, 4, 1,
- 104, 2, 231, 237, 7, 6, 1, 104, 2, 251, 154, 7, 4, 1, 104, 2, 251, 154,
- 7, 6, 1, 104, 2, 222, 237, 48, 7, 4, 1, 104, 2, 222, 237, 48, 7, 6, 1,
- 104, 2, 52, 142, 7, 4, 1, 104, 2, 52, 142, 7, 6, 1, 104, 2, 226, 228, 7,
- 4, 1, 104, 2, 226, 228, 7, 6, 1, 212, 99, 2, 250, 38, 7, 4, 1, 212, 99,
- 2, 250, 38, 7, 6, 1, 211, 118, 2, 250, 38, 7, 4, 1, 211, 118, 2, 250, 38,
- 7, 6, 1, 211, 118, 2, 248, 9, 7, 6, 1, 210, 160, 2, 142, 7, 4, 1, 210,
- 160, 2, 142, 7, 6, 1, 210, 160, 2, 59, 48, 7, 4, 1, 210, 160, 2, 59, 48,
- 7, 6, 1, 210, 160, 2, 250, 242, 7, 4, 1, 210, 160, 2, 250, 242, 7, 4, 1,
- 200, 222, 93, 7, 4, 1, 57, 2, 91, 7, 6, 1, 57, 2, 103, 7, 6, 1, 57, 2,
- 216, 12, 7, 4, 1, 57, 2, 216, 12, 7, 6, 1, 138, 195, 7, 4, 1, 138, 195,
- 7, 6, 1, 204, 78, 7, 6, 1, 251, 75, 2, 103, 7, 4, 1, 251, 75, 2, 103, 7,
- 6, 1, 254, 228, 249, 68, 7, 6, 1, 249, 69, 2, 103, 7, 6, 1, 249, 69, 2,
- 216, 12, 7, 4, 1, 249, 69, 2, 216, 12, 7, 4, 1, 215, 94, 248, 62, 7, 6,
- 1, 223, 52, 76, 7, 6, 1, 221, 197, 7, 6, 1, 204, 76, 7, 6, 1, 245, 15, 2,
- 103, 7, 4, 1, 245, 15, 2, 103, 7, 6, 1, 243, 210, 2, 103, 7, 6, 1, 243,
- 114, 7, 4, 1, 240, 208, 7, 6, 1, 235, 192, 7, 6, 1, 240, 161, 2, 91, 7,
- 6, 1, 235, 30, 2, 103, 7, 4, 1, 235, 30, 2, 103, 7, 4, 1, 233, 155, 2,
- 130, 7, 4, 1, 233, 106, 2, 91, 7, 6, 1, 215, 94, 194, 7, 6, 1, 230, 31,
- 2, 43, 103, 7, 4, 1, 230, 31, 2, 200, 44, 233, 42, 7, 6, 1, 144, 2, 230,
- 229, 184, 7, 6, 1, 144, 2, 240, 255, 7, 4, 1, 144, 2, 240, 255, 7, 6, 1,
- 226, 223, 7, 4, 1, 226, 223, 7, 6, 1, 226, 110, 2, 103, 7, 4, 1, 226,
- 110, 2, 103, 7, 1, 210, 214, 7, 6, 1, 138, 105, 7, 4, 1, 138, 105, 7, 6,
- 1, 245, 83, 7, 1, 223, 52, 245, 84, 232, 129, 7, 4, 1, 217, 154, 2, 226,
- 70, 103, 7, 6, 1, 217, 154, 2, 103, 7, 4, 1, 217, 154, 2, 103, 7, 6, 1,
- 217, 154, 2, 223, 58, 103, 7, 6, 1, 104, 2, 240, 255, 7, 4, 1, 104, 2,
- 240, 255, 7, 6, 1, 214, 157, 7, 6, 1, 214, 106, 2, 103, 7, 6, 1, 211,
- 118, 2, 103, 7, 4, 1, 211, 118, 2, 103, 7, 6, 1, 210, 160, 2, 91, 7, 4,
- 1, 210, 160, 2, 91, 7, 6, 1, 245, 16, 7, 6, 1, 245, 17, 223, 51, 7, 4, 1,
- 245, 17, 223, 51, 7, 4, 1, 245, 17, 2, 217, 78, 7, 1, 113, 2, 91, 7, 6,
- 1, 138, 190, 7, 4, 1, 138, 190, 7, 1, 235, 200, 242, 187, 218, 132, 2,
- 91, 7, 1, 211, 181, 7, 1, 248, 55, 250, 19, 7, 1, 233, 83, 250, 19, 7, 1,
- 254, 145, 250, 19, 7, 1, 223, 58, 250, 19, 7, 6, 1, 246, 48, 2, 250, 242,
- 7, 6, 1, 249, 69, 2, 4, 1, 210, 160, 2, 250, 242, 7, 4, 1, 246, 48, 2,
- 250, 242, 7, 6, 1, 232, 194, 7, 6, 1, 233, 155, 2, 4, 1, 235, 150, 7, 4,
- 1, 232, 194, 7, 6, 1, 228, 191, 7, 6, 1, 230, 31, 2, 4, 1, 235, 150, 7,
- 4, 1, 228, 191, 7, 6, 1, 116, 2, 250, 242, 7, 4, 1, 116, 2, 250, 242, 7,
- 6, 1, 240, 161, 2, 250, 242, 7, 4, 1, 240, 161, 2, 250, 242, 7, 6, 1,
- 144, 2, 250, 242, 7, 4, 1, 144, 2, 250, 242, 7, 6, 1, 104, 2, 250, 242,
- 7, 4, 1, 104, 2, 250, 242, 7, 6, 1, 104, 2, 248, 10, 22, 231, 237, 7, 4,
- 1, 104, 2, 248, 10, 22, 231, 237, 7, 6, 1, 104, 2, 248, 10, 22, 142, 7,
- 4, 1, 104, 2, 248, 10, 22, 142, 7, 6, 1, 104, 2, 248, 10, 22, 250, 242,
- 7, 4, 1, 104, 2, 248, 10, 22, 250, 242, 7, 6, 1, 104, 2, 248, 10, 22,
- 242, 143, 7, 4, 1, 104, 2, 248, 10, 22, 242, 143, 7, 4, 1, 215, 94, 76,
- 7, 6, 1, 116, 2, 248, 10, 22, 231, 237, 7, 4, 1, 116, 2, 248, 10, 22,
- 231, 237, 7, 6, 1, 116, 2, 59, 72, 22, 231, 237, 7, 4, 1, 116, 2, 59, 72,
- 22, 231, 237, 7, 6, 1, 254, 253, 2, 231, 237, 7, 4, 1, 254, 253, 2, 231,
- 237, 7, 6, 1, 243, 210, 2, 91, 7, 4, 1, 243, 210, 2, 91, 7, 6, 1, 243,
- 210, 2, 250, 242, 7, 4, 1, 243, 210, 2, 250, 242, 7, 6, 1, 235, 30, 2,
- 250, 242, 7, 4, 1, 235, 30, 2, 250, 242, 7, 6, 1, 144, 2, 226, 228, 7, 4,
- 1, 144, 2, 226, 228, 7, 6, 1, 144, 2, 226, 229, 22, 231, 237, 7, 4, 1,
- 144, 2, 226, 229, 22, 231, 237, 7, 6, 1, 245, 17, 2, 250, 242, 7, 4, 1,
- 245, 17, 2, 250, 242, 7, 4, 1, 235, 151, 2, 250, 242, 7, 6, 1, 246, 47,
- 7, 6, 1, 249, 69, 2, 4, 1, 210, 159, 7, 4, 1, 246, 47, 7, 6, 1, 243, 210,
- 2, 142, 7, 4, 1, 243, 210, 2, 142, 7, 6, 1, 240, 206, 7, 6, 1, 211, 181,
- 7, 6, 1, 230, 31, 2, 242, 143, 7, 4, 1, 230, 31, 2, 242, 143, 7, 6, 1,
- 116, 2, 222, 237, 72, 22, 142, 7, 4, 1, 116, 2, 222, 237, 72, 22, 142, 7,
- 6, 1, 254, 253, 2, 142, 7, 4, 1, 254, 253, 2, 142, 7, 6, 1, 144, 2, 218,
- 105, 22, 142, 7, 4, 1, 144, 2, 218, 105, 22, 142, 7, 6, 1, 116, 2, 52,
- 242, 143, 7, 4, 1, 116, 2, 52, 242, 143, 7, 6, 1, 116, 2, 235, 200, 251,
- 154, 7, 4, 1, 116, 2, 235, 200, 251, 154, 7, 6, 1, 160, 2, 52, 242, 143,
- 7, 4, 1, 160, 2, 52, 242, 143, 7, 6, 1, 160, 2, 235, 200, 251, 154, 7, 4,
- 1, 160, 2, 235, 200, 251, 154, 7, 6, 1, 240, 161, 2, 52, 242, 143, 7, 4,
- 1, 240, 161, 2, 52, 242, 143, 7, 6, 1, 240, 161, 2, 235, 200, 251, 154,
- 7, 4, 1, 240, 161, 2, 235, 200, 251, 154, 7, 6, 1, 144, 2, 52, 242, 143,
- 7, 4, 1, 144, 2, 52, 242, 143, 7, 6, 1, 144, 2, 235, 200, 251, 154, 7, 4,
- 1, 144, 2, 235, 200, 251, 154, 7, 6, 1, 223, 227, 2, 52, 242, 143, 7, 4,
- 1, 223, 227, 2, 52, 242, 143, 7, 6, 1, 223, 227, 2, 235, 200, 251, 154,
- 7, 4, 1, 223, 227, 2, 235, 200, 251, 154, 7, 6, 1, 104, 2, 52, 242, 143,
- 7, 4, 1, 104, 2, 52, 242, 143, 7, 6, 1, 104, 2, 235, 200, 251, 154, 7, 4,
- 1, 104, 2, 235, 200, 251, 154, 7, 6, 1, 222, 94, 2, 249, 228, 51, 7, 4,
- 1, 222, 94, 2, 249, 228, 51, 7, 6, 1, 217, 154, 2, 249, 228, 51, 7, 4, 1,
- 217, 154, 2, 249, 228, 51, 7, 6, 1, 210, 231, 7, 4, 1, 210, 231, 7, 6, 1,
- 242, 68, 2, 250, 242, 7, 4, 1, 242, 68, 2, 250, 242, 7, 6, 1, 230, 31, 2,
- 200, 44, 233, 42, 7, 4, 1, 249, 69, 2, 249, 108, 7, 6, 1, 226, 138, 7, 4,
- 1, 226, 138, 7, 6, 1, 210, 160, 2, 103, 7, 4, 1, 210, 160, 2, 103, 7, 6,
- 1, 116, 2, 59, 48, 7, 4, 1, 116, 2, 59, 48, 7, 6, 1, 160, 2, 250, 191, 7,
- 4, 1, 160, 2, 250, 191, 7, 6, 1, 144, 2, 248, 10, 22, 231, 237, 7, 4, 1,
- 144, 2, 248, 10, 22, 231, 237, 7, 6, 1, 144, 2, 216, 90, 22, 231, 237, 7,
- 4, 1, 144, 2, 216, 90, 22, 231, 237, 7, 6, 1, 144, 2, 59, 48, 7, 4, 1,
- 144, 2, 59, 48, 7, 6, 1, 144, 2, 59, 72, 22, 231, 237, 7, 4, 1, 144, 2,
- 59, 72, 22, 231, 237, 7, 6, 1, 211, 118, 2, 231, 237, 7, 4, 1, 211, 118,
- 2, 231, 237, 7, 4, 1, 233, 155, 2, 249, 108, 7, 4, 1, 230, 31, 2, 249,
- 108, 7, 4, 1, 217, 154, 2, 249, 108, 7, 4, 1, 247, 127, 235, 150, 7, 4,
- 1, 248, 151, 247, 228, 7, 4, 1, 224, 34, 247, 228, 7, 6, 1, 116, 2, 91,
- 7, 6, 1, 251, 75, 2, 91, 7, 4, 1, 251, 75, 2, 91, 7, 6, 1, 233, 155, 2,
- 130, 7, 6, 1, 217, 154, 2, 248, 7, 91, 7, 4, 1, 222, 94, 2, 217, 251,
- 217, 78, 7, 4, 1, 210, 160, 2, 217, 251, 217, 78, 7, 6, 1, 242, 187, 218,
- 131, 7, 4, 1, 242, 187, 218, 131, 7, 6, 1, 57, 2, 91, 7, 6, 1, 104, 130,
- 7, 6, 1, 215, 94, 214, 105, 7, 6, 1, 160, 2, 91, 7, 4, 1, 160, 2, 91, 7,
- 6, 1, 235, 151, 2, 91, 7, 4, 1, 235, 151, 2, 91, 7, 6, 1, 4, 224, 100, 2,
- 241, 59, 217, 78, 7, 4, 1, 224, 100, 2, 241, 59, 217, 78, 7, 6, 1, 223,
- 227, 2, 91, 7, 4, 1, 223, 227, 2, 91, 7, 6, 1, 211, 118, 2, 91, 7, 4, 1,
- 211, 118, 2, 91, 7, 4, 1, 215, 94, 61, 7, 4, 1, 254, 151, 7, 4, 1, 215,
- 94, 254, 151, 7, 4, 1, 57, 2, 103, 7, 4, 1, 204, 78, 7, 4, 1, 251, 75, 2,
- 249, 108, 7, 4, 1, 249, 69, 2, 217, 78, 7, 4, 1, 249, 69, 2, 103, 7, 4,
- 1, 223, 52, 76, 7, 4, 1, 221, 197, 7, 4, 1, 221, 198, 2, 103, 7, 4, 1,
- 204, 76, 7, 4, 1, 223, 52, 204, 76, 7, 4, 1, 223, 52, 204, 160, 2, 103,
- 7, 4, 1, 250, 8, 223, 52, 204, 76, 7, 4, 1, 247, 127, 235, 151, 2, 91, 7,
- 4, 1, 243, 210, 2, 103, 7, 4, 1, 119, 243, 209, 7, 1, 4, 6, 243, 209, 7,
- 4, 1, 243, 114, 7, 4, 1, 223, 154, 240, 255, 7, 4, 1, 215, 94, 242, 67,
- 7, 4, 1, 242, 68, 2, 103, 7, 4, 1, 241, 215, 2, 103, 7, 4, 1, 240, 161,
- 2, 91, 7, 4, 1, 235, 192, 7, 1, 4, 6, 74, 7, 4, 1, 233, 155, 2, 230, 229,
- 184, 7, 4, 1, 233, 155, 2, 252, 49, 7, 4, 1, 233, 155, 2, 223, 58, 103,
- 7, 4, 1, 233, 7, 7, 4, 1, 215, 94, 194, 7, 4, 1, 215, 94, 232, 55, 2,
- 200, 233, 42, 7, 4, 1, 232, 55, 2, 103, 7, 4, 1, 230, 31, 2, 43, 103, 7,
- 4, 1, 230, 31, 2, 223, 58, 103, 7, 1, 4, 6, 230, 30, 7, 4, 1, 252, 142,
- 78, 7, 1, 4, 6, 226, 238, 7, 4, 1, 250, 8, 226, 205, 7, 4, 1, 225, 136,
- 7, 4, 1, 215, 94, 153, 7, 4, 1, 215, 94, 223, 227, 2, 200, 233, 42, 7, 4,
- 1, 215, 94, 223, 227, 2, 103, 7, 4, 1, 223, 227, 2, 200, 233, 42, 7, 4,
- 1, 223, 227, 2, 217, 78, 7, 4, 1, 223, 227, 2, 244, 95, 7, 4, 1, 223, 52,
- 223, 227, 2, 244, 95, 7, 1, 4, 6, 153, 7, 1, 4, 6, 235, 200, 153, 7, 4,
- 1, 222, 94, 2, 103, 7, 4, 1, 245, 83, 7, 4, 1, 247, 127, 235, 151, 2,
- 218, 105, 22, 103, 7, 4, 1, 218, 233, 223, 52, 245, 83, 7, 4, 1, 245, 84,
- 2, 249, 108, 7, 4, 1, 215, 94, 217, 153, 7, 4, 1, 217, 154, 2, 223, 58,
- 103, 7, 4, 1, 104, 130, 7, 4, 1, 214, 157, 7, 4, 1, 214, 106, 2, 103, 7,
- 4, 1, 215, 94, 214, 105, 7, 4, 1, 215, 94, 212, 98, 7, 4, 1, 215, 94,
- 211, 117, 7, 1, 4, 6, 211, 117, 7, 4, 1, 210, 160, 2, 223, 58, 103, 7, 4,
- 1, 210, 160, 2, 249, 108, 7, 4, 1, 245, 16, 7, 4, 1, 245, 17, 2, 249,
- 108, 7, 1, 242, 187, 218, 131, 7, 1, 225, 142, 213, 135, 244, 1, 7, 1,
- 235, 200, 242, 187, 218, 131, 7, 1, 218, 112, 251, 74, 7, 1, 251, 254,
- 250, 19, 7, 1, 4, 6, 253, 166, 7, 4, 1, 250, 8, 204, 76, 7, 1, 4, 6, 243,
- 210, 2, 103, 7, 1, 4, 6, 242, 67, 7, 4, 1, 235, 151, 2, 249, 135, 7, 4,
- 1, 215, 94, 235, 29, 7, 1, 4, 6, 156, 7, 4, 1, 224, 100, 2, 103, 7, 1,
- 242, 187, 218, 132, 2, 91, 7, 1, 223, 52, 242, 187, 218, 132, 2, 91, 7,
- 4, 1, 246, 48, 247, 228, 7, 4, 1, 248, 34, 247, 228, 7, 4, 1, 246, 48,
- 247, 229, 2, 249, 108, 7, 4, 1, 215, 186, 247, 228, 7, 4, 1, 216, 236,
- 247, 228, 7, 4, 1, 217, 30, 247, 229, 2, 249, 108, 7, 4, 1, 244, 142,
- 247, 228, 7, 4, 1, 232, 105, 247, 228, 7, 4, 1, 232, 56, 247, 228, 7, 1,
- 251, 254, 225, 184, 7, 1, 252, 6, 225, 184, 7, 4, 1, 215, 94, 242, 68, 2,
- 244, 95, 7, 4, 1, 215, 94, 242, 68, 2, 244, 96, 22, 217, 78, 58, 1, 4,
- 242, 67, 58, 1, 4, 242, 68, 2, 103, 58, 1, 4, 235, 150, 58, 1, 4, 153,
- 58, 1, 4, 215, 94, 153, 58, 1, 4, 215, 94, 223, 227, 2, 103, 58, 1, 4, 6,
- 235, 200, 153, 58, 1, 4, 212, 98, 58, 1, 4, 211, 117, 58, 1, 224, 193,
- 58, 1, 52, 224, 193, 58, 1, 215, 94, 249, 227, 58, 1, 254, 65, 58, 1,
- 223, 52, 249, 227, 58, 1, 44, 163, 222, 236, 58, 1, 43, 163, 222, 236,
- 58, 1, 242, 187, 218, 131, 58, 1, 223, 52, 242, 187, 218, 131, 58, 1, 43,
- 254, 1, 58, 1, 44, 254, 1, 58, 1, 120, 254, 1, 58, 1, 124, 254, 1, 58, 1,
- 250, 39, 255, 23, 250, 242, 58, 1, 67, 232, 219, 58, 1, 231, 237, 58, 1,
- 255, 12, 255, 23, 58, 1, 242, 144, 255, 23, 58, 1, 121, 67, 232, 219, 58,
- 1, 121, 231, 237, 58, 1, 121, 242, 144, 255, 23, 58, 1, 121, 255, 12,
- 255, 23, 58, 1, 215, 223, 249, 234, 58, 1, 163, 215, 223, 249, 234, 58,
- 1, 250, 181, 44, 163, 222, 236, 58, 1, 250, 181, 43, 163, 222, 236, 58,
- 1, 120, 217, 88, 58, 1, 124, 217, 88, 58, 1, 96, 50, 58, 1, 230, 187, 50,
- 251, 154, 59, 48, 222, 237, 48, 226, 228, 4, 184, 52, 255, 12, 255, 23,
- 58, 1, 223, 39, 103, 58, 1, 249, 139, 255, 23, 58, 1, 4, 243, 114, 58, 1,
- 4, 156, 58, 1, 4, 222, 93, 58, 1, 4, 211, 178, 58, 1, 4, 223, 52, 242,
- 187, 218, 131, 58, 1, 245, 28, 138, 130, 58, 1, 125, 138, 130, 58, 1,
- 230, 230, 138, 130, 58, 1, 121, 138, 130, 58, 1, 245, 27, 138, 130, 58,
- 1, 210, 254, 248, 52, 138, 79, 58, 1, 211, 70, 248, 52, 138, 79, 58, 1,
- 213, 133, 58, 1, 214, 186, 58, 1, 52, 254, 65, 58, 1, 121, 124, 254, 1,
- 58, 1, 121, 120, 254, 1, 58, 1, 121, 43, 254, 1, 58, 1, 121, 44, 254, 1,
- 58, 1, 121, 222, 236, 58, 1, 230, 229, 242, 144, 255, 23, 58, 1, 230,
- 229, 52, 242, 144, 255, 23, 58, 1, 230, 229, 52, 255, 12, 255, 23, 58, 1,
- 121, 184, 58, 1, 223, 160, 249, 234, 58, 1, 252, 66, 125, 216, 31, 58, 1,
- 245, 151, 125, 216, 31, 58, 1, 252, 66, 121, 216, 31, 58, 1, 245, 151,
- 121, 216, 31, 58, 1, 220, 56, 58, 1, 204, 220, 56, 58, 1, 121, 43, 75,
- 38, 242, 144, 255, 23, 38, 255, 12, 255, 23, 38, 250, 39, 255, 23, 38,
- 184, 38, 231, 237, 38, 226, 123, 38, 251, 154, 38, 59, 48, 38, 248, 9,
- 38, 241, 59, 48, 38, 222, 237, 48, 38, 52, 255, 12, 255, 23, 38, 250,
- 242, 38, 67, 232, 220, 48, 38, 52, 67, 232, 220, 48, 38, 52, 242, 144,
- 255, 23, 38, 251, 7, 38, 235, 200, 251, 154, 38, 215, 94, 249, 228, 48,
- 38, 249, 228, 48, 38, 223, 52, 249, 228, 48, 38, 249, 228, 72, 222, 254,
- 38, 242, 144, 255, 24, 51, 38, 255, 12, 255, 24, 51, 38, 43, 217, 89, 51,
- 38, 44, 217, 89, 51, 38, 43, 254, 118, 48, 38, 240, 255, 38, 43, 163,
- 222, 237, 51, 38, 120, 217, 89, 51, 38, 124, 217, 89, 51, 38, 96, 5, 51,
- 38, 230, 187, 5, 51, 38, 226, 68, 241, 59, 51, 38, 223, 58, 241, 59, 51,
- 38, 59, 51, 38, 248, 10, 51, 38, 222, 237, 51, 38, 249, 228, 51, 38, 250,
- 191, 38, 226, 228, 38, 67, 232, 220, 51, 38, 251, 148, 51, 38, 235, 200,
- 52, 254, 32, 51, 38, 250, 243, 51, 38, 250, 39, 255, 24, 51, 38, 251,
- 155, 51, 38, 235, 200, 251, 155, 51, 38, 216, 90, 51, 38, 231, 238, 51,
- 38, 121, 232, 219, 38, 52, 121, 232, 219, 38, 216, 90, 226, 124, 38, 219,
- 253, 218, 105, 226, 124, 38, 200, 218, 105, 226, 124, 38, 219, 253, 219,
- 49, 226, 124, 38, 200, 219, 49, 226, 124, 38, 44, 163, 222, 237, 51, 38,
- 235, 200, 251, 148, 51, 38, 42, 51, 38, 221, 182, 51, 38, 211, 179, 48,
- 38, 67, 184, 38, 52, 226, 123, 38, 242, 144, 138, 79, 38, 255, 12, 138,
- 79, 38, 26, 225, 178, 38, 26, 234, 8, 38, 26, 248, 4, 216, 19, 38, 26,
- 210, 219, 38, 251, 148, 48, 38, 245, 106, 5, 51, 38, 52, 67, 232, 220,
- 51, 38, 43, 254, 118, 51, 38, 228, 57, 216, 90, 48, 38, 241, 65, 48, 38,
- 254, 156, 128, 216, 43, 48, 38, 43, 44, 80, 51, 38, 214, 153, 80, 51, 38,
- 242, 149, 235, 69, 38, 44, 254, 2, 48, 38, 43, 163, 222, 237, 48, 38,
- 244, 139, 38, 211, 179, 51, 38, 43, 254, 2, 51, 38, 44, 254, 2, 51, 38,
- 44, 254, 2, 22, 120, 254, 2, 51, 38, 44, 163, 222, 237, 48, 38, 59, 72,
- 222, 254, 38, 253, 225, 51, 38, 52, 222, 237, 51, 38, 210, 35, 48, 38,
- 52, 251, 155, 51, 38, 52, 251, 154, 38, 52, 231, 237, 38, 52, 231, 238,
- 51, 38, 52, 184, 38, 52, 235, 200, 251, 154, 38, 52, 97, 80, 51, 38, 7,
- 4, 1, 61, 38, 7, 4, 1, 76, 38, 7, 4, 1, 74, 38, 7, 4, 1, 78, 38, 7, 4, 1,
- 69, 38, 7, 4, 1, 251, 74, 38, 7, 4, 1, 249, 68, 38, 7, 4, 1, 242, 67, 38,
- 7, 4, 1, 194, 38, 7, 4, 1, 153, 38, 7, 4, 1, 217, 153, 38, 7, 4, 1, 214,
- 105, 38, 7, 4, 1, 211, 178, 26, 6, 1, 241, 203, 26, 4, 1, 241, 203, 26,
- 6, 1, 254, 31, 221, 248, 26, 4, 1, 254, 31, 221, 248, 26, 227, 202, 50,
- 26, 232, 114, 227, 202, 50, 26, 6, 1, 226, 55, 247, 235, 26, 4, 1, 226,
- 55, 247, 235, 26, 210, 219, 26, 4, 223, 52, 232, 88, 219, 180, 87, 26, 4,
- 246, 126, 232, 88, 219, 180, 87, 26, 4, 223, 52, 246, 126, 232, 88, 219,
- 180, 87, 26, 224, 16, 79, 26, 216, 19, 26, 248, 4, 216, 19, 26, 6, 1,
- 254, 152, 2, 216, 19, 26, 254, 105, 217, 3, 26, 6, 1, 245, 109, 2, 216,
- 19, 26, 6, 1, 245, 72, 2, 216, 19, 26, 6, 1, 235, 193, 2, 216, 19, 26, 6,
- 1, 226, 204, 2, 216, 19, 26, 6, 1, 214, 158, 2, 216, 19, 26, 6, 1, 226,
- 206, 2, 216, 19, 26, 4, 1, 235, 193, 2, 248, 4, 22, 216, 19, 26, 6, 1,
- 254, 151, 26, 6, 1, 252, 34, 26, 6, 1, 243, 114, 26, 6, 1, 248, 62, 26,
- 6, 1, 245, 108, 26, 6, 1, 210, 85, 26, 6, 1, 245, 71, 26, 6, 1, 216, 180,
- 26, 6, 1, 235, 192, 26, 6, 1, 234, 228, 26, 6, 1, 233, 104, 26, 6, 1,
- 230, 107, 26, 6, 1, 227, 242, 26, 6, 1, 211, 157, 26, 6, 1, 226, 203, 26,
- 6, 1, 225, 111, 26, 6, 1, 223, 40, 26, 6, 1, 219, 179, 26, 6, 1, 217, 42,
- 26, 6, 1, 214, 157, 26, 6, 1, 225, 136, 26, 6, 1, 250, 118, 26, 6, 1,
- 224, 164, 26, 6, 1, 226, 205, 26, 6, 1, 235, 193, 2, 248, 3, 26, 6, 1,
- 214, 158, 2, 248, 3, 26, 4, 1, 254, 152, 2, 216, 19, 26, 4, 1, 245, 109,
- 2, 216, 19, 26, 4, 1, 245, 72, 2, 216, 19, 26, 4, 1, 235, 193, 2, 216,
- 19, 26, 4, 1, 214, 158, 2, 248, 4, 22, 216, 19, 26, 4, 1, 254, 151, 26,
- 4, 1, 252, 34, 26, 4, 1, 243, 114, 26, 4, 1, 248, 62, 26, 4, 1, 245, 108,
- 26, 4, 1, 210, 85, 26, 4, 1, 245, 71, 26, 4, 1, 216, 180, 26, 4, 1, 235,
- 192, 26, 4, 1, 234, 228, 26, 4, 1, 233, 104, 26, 4, 1, 230, 107, 26, 4,
- 1, 227, 242, 26, 4, 1, 211, 157, 26, 4, 1, 226, 203, 26, 4, 1, 225, 111,
- 26, 4, 1, 223, 40, 26, 4, 1, 40, 219, 179, 26, 4, 1, 219, 179, 26, 4, 1,
- 217, 42, 26, 4, 1, 214, 157, 26, 4, 1, 225, 136, 26, 4, 1, 250, 118, 26,
- 4, 1, 224, 164, 26, 4, 1, 226, 205, 26, 4, 1, 235, 193, 2, 248, 3, 26, 4,
- 1, 214, 158, 2, 248, 3, 26, 4, 1, 226, 204, 2, 216, 19, 26, 4, 1, 214,
- 158, 2, 216, 19, 26, 4, 1, 226, 206, 2, 216, 19, 26, 6, 234, 253, 87, 26,
- 252, 35, 87, 26, 216, 181, 87, 26, 214, 158, 2, 241, 59, 87, 26, 214,
- 158, 2, 255, 12, 22, 241, 59, 87, 26, 214, 158, 2, 248, 10, 22, 241, 59,
- 87, 26, 225, 137, 87, 26, 225, 112, 87, 26, 234, 253, 87, 26, 1, 254, 31,
- 234, 12, 26, 4, 1, 254, 31, 234, 12, 26, 1, 218, 139, 26, 4, 1, 218, 139,
- 26, 1, 247, 235, 26, 4, 1, 247, 235, 26, 1, 234, 12, 26, 4, 1, 234, 12,
- 26, 1, 221, 248, 26, 4, 1, 221, 248, 81, 6, 1, 220, 57, 81, 4, 1, 220,
- 57, 81, 6, 1, 244, 148, 81, 4, 1, 244, 148, 81, 6, 1, 234, 123, 81, 4, 1,
- 234, 123, 81, 6, 1, 241, 52, 81, 4, 1, 241, 52, 81, 6, 1, 243, 109, 81,
- 4, 1, 243, 109, 81, 6, 1, 220, 24, 81, 4, 1, 220, 24, 81, 6, 1, 248, 77,
- 81, 4, 1, 248, 77, 26, 234, 229, 87, 26, 223, 41, 87, 26, 232, 88, 219,
- 180, 87, 26, 1, 210, 224, 26, 6, 216, 181, 87, 26, 232, 88, 245, 109, 87,
- 26, 223, 52, 232, 88, 245, 109, 87, 26, 6, 1, 220, 9, 26, 4, 1, 220, 9,
- 26, 6, 232, 88, 219, 180, 87, 26, 6, 1, 221, 245, 26, 4, 1, 221, 245, 26,
- 223, 41, 2, 218, 105, 87, 26, 6, 223, 52, 232, 88, 219, 180, 87, 26, 6,
- 246, 126, 232, 88, 219, 180, 87, 26, 6, 223, 52, 246, 126, 232, 88, 219,
- 180, 87, 33, 6, 1, 236, 68, 2, 242, 143, 33, 6, 1, 235, 196, 33, 6, 1,
- 247, 170, 33, 6, 1, 242, 194, 33, 6, 1, 214, 202, 236, 67, 33, 6, 1, 246,
- 44, 33, 6, 1, 251, 84, 74, 33, 6, 1, 211, 8, 33, 6, 1, 235, 132, 33, 6,
- 1, 232, 193, 33, 6, 1, 228, 183, 33, 6, 1, 215, 175, 33, 6, 1, 234, 54,
- 33, 6, 1, 240, 161, 2, 242, 143, 33, 6, 1, 219, 253, 69, 33, 6, 1, 246,
- 40, 33, 6, 1, 61, 33, 6, 1, 252, 83, 33, 6, 1, 213, 255, 33, 6, 1, 242,
- 243, 33, 6, 1, 248, 98, 33, 6, 1, 236, 67, 33, 6, 1, 210, 74, 33, 6, 1,
- 210, 94, 33, 6, 1, 74, 33, 6, 1, 219, 253, 74, 33, 6, 1, 176, 33, 6, 1,
- 245, 182, 33, 6, 1, 245, 167, 33, 6, 1, 245, 158, 33, 6, 1, 78, 33, 6, 1,
- 225, 224, 33, 6, 1, 245, 100, 33, 6, 1, 245, 90, 33, 6, 1, 217, 23, 33,
- 6, 1, 69, 33, 6, 1, 245, 210, 33, 6, 1, 162, 33, 6, 1, 215, 179, 33, 6,
- 1, 250, 139, 33, 6, 1, 220, 104, 33, 6, 1, 220, 67, 33, 6, 1, 242, 10,
- 50, 33, 6, 1, 211, 27, 33, 6, 1, 219, 54, 50, 33, 6, 1, 76, 33, 6, 1,
- 210, 212, 33, 6, 1, 192, 33, 4, 1, 61, 33, 4, 1, 252, 83, 33, 4, 1, 213,
- 255, 33, 4, 1, 242, 243, 33, 4, 1, 248, 98, 33, 4, 1, 236, 67, 33, 4, 1,
- 210, 74, 33, 4, 1, 210, 94, 33, 4, 1, 74, 33, 4, 1, 219, 253, 74, 33, 4,
- 1, 176, 33, 4, 1, 245, 182, 33, 4, 1, 245, 167, 33, 4, 1, 245, 158, 33,
- 4, 1, 78, 33, 4, 1, 225, 224, 33, 4, 1, 245, 100, 33, 4, 1, 245, 90, 33,
- 4, 1, 217, 23, 33, 4, 1, 69, 33, 4, 1, 245, 210, 33, 4, 1, 162, 33, 4, 1,
- 215, 179, 33, 4, 1, 250, 139, 33, 4, 1, 220, 104, 33, 4, 1, 220, 67, 33,
- 4, 1, 242, 10, 50, 33, 4, 1, 211, 27, 33, 4, 1, 219, 54, 50, 33, 4, 1,
- 76, 33, 4, 1, 210, 212, 33, 4, 1, 192, 33, 4, 1, 236, 68, 2, 242, 143,
- 33, 4, 1, 235, 196, 33, 4, 1, 247, 170, 33, 4, 1, 242, 194, 33, 4, 1,
- 214, 202, 236, 67, 33, 4, 1, 246, 44, 33, 4, 1, 251, 84, 74, 33, 4, 1,
- 211, 8, 33, 4, 1, 235, 132, 33, 4, 1, 232, 193, 33, 4, 1, 228, 183, 33,
- 4, 1, 215, 175, 33, 4, 1, 234, 54, 33, 4, 1, 240, 161, 2, 242, 143, 33,
- 4, 1, 219, 253, 69, 33, 4, 1, 246, 40, 33, 6, 1, 226, 205, 33, 4, 1, 226,
- 205, 33, 6, 1, 211, 59, 33, 4, 1, 211, 59, 33, 6, 1, 235, 190, 76, 33, 4,
- 1, 235, 190, 76, 33, 6, 1, 232, 198, 210, 183, 33, 4, 1, 232, 198, 210,
- 183, 33, 6, 1, 235, 190, 232, 198, 210, 183, 33, 4, 1, 235, 190, 232,
- 198, 210, 183, 33, 6, 1, 252, 1, 210, 183, 33, 4, 1, 252, 1, 210, 183,
- 33, 6, 1, 235, 190, 252, 1, 210, 183, 33, 4, 1, 235, 190, 252, 1, 210,
- 183, 33, 6, 1, 233, 239, 33, 4, 1, 233, 239, 33, 6, 1, 224, 164, 33, 4,
- 1, 224, 164, 33, 6, 1, 244, 90, 33, 4, 1, 244, 90, 33, 6, 1, 235, 152,
- 33, 4, 1, 235, 152, 33, 6, 1, 235, 153, 2, 52, 242, 144, 255, 23, 33, 4,
- 1, 235, 153, 2, 52, 242, 144, 255, 23, 33, 6, 1, 214, 205, 33, 4, 1, 214,
- 205, 33, 6, 1, 222, 187, 226, 205, 33, 4, 1, 222, 187, 226, 205, 33, 6,
- 1, 226, 206, 2, 216, 66, 33, 4, 1, 226, 206, 2, 216, 66, 33, 6, 1, 226,
- 144, 33, 4, 1, 226, 144, 33, 6, 1, 234, 12, 33, 4, 1, 234, 12, 33, 216,
- 147, 50, 38, 33, 216, 66, 38, 33, 226, 69, 38, 33, 248, 162, 225, 21, 38,
- 33, 224, 158, 225, 21, 38, 33, 225, 6, 38, 33, 240, 218, 216, 147, 50,
- 38, 33, 230, 196, 50, 33, 6, 1, 219, 253, 240, 161, 2, 217, 78, 33, 4, 1,
- 219, 253, 240, 161, 2, 217, 78, 33, 6, 1, 220, 148, 50, 33, 4, 1, 220,
- 148, 50, 33, 6, 1, 245, 101, 2, 216, 115, 33, 4, 1, 245, 101, 2, 216,
- 115, 33, 6, 1, 242, 244, 2, 214, 156, 33, 4, 1, 242, 244, 2, 214, 156,
- 33, 6, 1, 242, 244, 2, 91, 33, 4, 1, 242, 244, 2, 91, 33, 6, 1, 242, 244,
- 2, 230, 229, 103, 33, 4, 1, 242, 244, 2, 230, 229, 103, 33, 6, 1, 210,
- 75, 2, 248, 47, 33, 4, 1, 210, 75, 2, 248, 47, 33, 6, 1, 210, 95, 2, 248,
- 47, 33, 4, 1, 210, 95, 2, 248, 47, 33, 6, 1, 235, 19, 2, 248, 47, 33, 4,
- 1, 235, 19, 2, 248, 47, 33, 6, 1, 235, 19, 2, 67, 91, 33, 4, 1, 235, 19,
- 2, 67, 91, 33, 6, 1, 235, 19, 2, 91, 33, 4, 1, 235, 19, 2, 91, 33, 6, 1,
- 252, 132, 176, 33, 4, 1, 252, 132, 176, 33, 6, 1, 245, 159, 2, 248, 47,
- 33, 4, 1, 245, 159, 2, 248, 47, 33, 6, 27, 245, 159, 242, 243, 33, 4, 27,
- 245, 159, 242, 243, 33, 6, 1, 225, 225, 2, 230, 229, 103, 33, 4, 1, 225,
- 225, 2, 230, 229, 103, 33, 6, 1, 255, 29, 162, 33, 4, 1, 255, 29, 162,
- 33, 6, 1, 245, 91, 2, 248, 47, 33, 4, 1, 245, 91, 2, 248, 47, 33, 6, 1,
- 217, 24, 2, 248, 47, 33, 4, 1, 217, 24, 2, 248, 47, 33, 6, 1, 218, 123,
- 69, 33, 4, 1, 218, 123, 69, 33, 6, 1, 218, 123, 104, 2, 91, 33, 4, 1,
- 218, 123, 104, 2, 91, 33, 6, 1, 242, 56, 2, 248, 47, 33, 4, 1, 242, 56,
- 2, 248, 47, 33, 6, 27, 217, 24, 215, 179, 33, 4, 27, 217, 24, 215, 179,
- 33, 6, 1, 250, 140, 2, 248, 47, 33, 4, 1, 250, 140, 2, 248, 47, 33, 6, 1,
- 250, 140, 2, 67, 91, 33, 4, 1, 250, 140, 2, 67, 91, 33, 6, 1, 220, 35,
- 33, 4, 1, 220, 35, 33, 6, 1, 255, 29, 250, 139, 33, 4, 1, 255, 29, 250,
- 139, 33, 6, 1, 255, 29, 250, 140, 2, 248, 47, 33, 4, 1, 255, 29, 250,
- 140, 2, 248, 47, 33, 1, 226, 62, 33, 6, 1, 210, 75, 2, 251, 154, 33, 4,
- 1, 210, 75, 2, 251, 154, 33, 6, 1, 235, 19, 2, 103, 33, 4, 1, 235, 19, 2,
- 103, 33, 6, 1, 245, 183, 2, 217, 78, 33, 4, 1, 245, 183, 2, 217, 78, 33,
- 6, 1, 245, 159, 2, 103, 33, 4, 1, 245, 159, 2, 103, 33, 6, 1, 245, 159,
- 2, 217, 78, 33, 4, 1, 245, 159, 2, 217, 78, 33, 6, 1, 234, 133, 250, 139,
- 33, 4, 1, 234, 133, 250, 139, 33, 6, 1, 245, 168, 2, 217, 78, 33, 4, 1,
- 245, 168, 2, 217, 78, 33, 4, 1, 226, 62, 33, 6, 1, 116, 2, 251, 154, 33,
- 4, 1, 116, 2, 251, 154, 33, 6, 1, 116, 2, 248, 9, 33, 4, 1, 116, 2, 248,
- 9, 33, 6, 27, 116, 236, 67, 33, 4, 27, 116, 236, 67, 33, 6, 1, 236, 68,
- 2, 251, 154, 33, 4, 1, 236, 68, 2, 251, 154, 33, 6, 1, 221, 197, 33, 4,
- 1, 221, 197, 33, 6, 1, 221, 198, 2, 248, 9, 33, 4, 1, 221, 198, 2, 248,
- 9, 33, 6, 1, 210, 75, 2, 248, 9, 33, 4, 1, 210, 75, 2, 248, 9, 33, 6, 1,
- 210, 95, 2, 248, 9, 33, 4, 1, 210, 95, 2, 248, 9, 33, 6, 1, 255, 29, 246,
- 44, 33, 4, 1, 255, 29, 246, 44, 33, 6, 1, 240, 161, 2, 231, 237, 33, 4,
- 1, 240, 161, 2, 231, 237, 33, 6, 1, 240, 161, 2, 248, 9, 33, 4, 1, 240,
- 161, 2, 248, 9, 33, 6, 1, 144, 2, 248, 9, 33, 4, 1, 144, 2, 248, 9, 33,
- 6, 1, 252, 142, 78, 33, 4, 1, 252, 142, 78, 33, 6, 1, 252, 142, 144, 2,
- 248, 9, 33, 4, 1, 252, 142, 144, 2, 248, 9, 33, 6, 1, 160, 2, 248, 9, 33,
- 4, 1, 160, 2, 248, 9, 33, 6, 1, 104, 2, 231, 237, 33, 4, 1, 104, 2, 231,
- 237, 33, 6, 1, 104, 2, 248, 9, 33, 4, 1, 104, 2, 248, 9, 33, 6, 1, 104,
- 2, 52, 142, 33, 4, 1, 104, 2, 52, 142, 33, 6, 1, 250, 140, 2, 248, 9, 33,
- 4, 1, 250, 140, 2, 248, 9, 33, 6, 1, 242, 244, 2, 248, 47, 33, 4, 1, 242,
- 244, 2, 248, 47, 33, 6, 1, 211, 28, 2, 248, 9, 33, 4, 1, 211, 28, 2, 248,
- 9, 33, 6, 1, 242, 244, 2, 218, 105, 22, 103, 33, 4, 1, 242, 244, 2, 218,
- 105, 22, 103, 33, 6, 1, 242, 56, 2, 103, 33, 4, 1, 242, 56, 2, 103, 33,
- 6, 1, 242, 56, 2, 91, 33, 4, 1, 242, 56, 2, 91, 33, 6, 1, 234, 20, 248,
- 98, 33, 4, 1, 234, 20, 248, 98, 33, 6, 1, 234, 20, 247, 170, 33, 4, 1,
- 234, 20, 247, 170, 33, 6, 1, 234, 20, 210, 27, 33, 4, 1, 234, 20, 210,
- 27, 33, 6, 1, 234, 20, 246, 38, 33, 4, 1, 234, 20, 246, 38, 33, 6, 1,
- 234, 20, 232, 193, 33, 4, 1, 234, 20, 232, 193, 33, 6, 1, 234, 20, 228,
- 183, 33, 4, 1, 234, 20, 228, 183, 33, 6, 1, 234, 20, 219, 111, 33, 4, 1,
- 234, 20, 219, 111, 33, 6, 1, 234, 20, 216, 61, 33, 4, 1, 234, 20, 216,
- 61, 33, 6, 1, 223, 52, 210, 94, 33, 4, 1, 223, 52, 210, 94, 33, 6, 1,
- 245, 183, 2, 103, 33, 4, 1, 245, 183, 2, 103, 33, 6, 1, 233, 4, 33, 4, 1,
- 233, 4, 33, 6, 1, 223, 42, 33, 4, 1, 223, 42, 33, 6, 1, 211, 92, 33, 4,
- 1, 211, 92, 33, 6, 1, 224, 91, 33, 4, 1, 224, 91, 33, 6, 1, 212, 22, 33,
- 4, 1, 212, 22, 33, 6, 1, 254, 175, 176, 33, 4, 1, 254, 175, 176, 33, 6,
- 1, 245, 183, 2, 230, 229, 103, 33, 4, 1, 245, 183, 2, 230, 229, 103, 33,
- 6, 1, 245, 159, 2, 230, 229, 103, 33, 4, 1, 245, 159, 2, 230, 229, 103,
- 33, 6, 1, 225, 225, 2, 248, 47, 33, 4, 1, 225, 225, 2, 248, 47, 33, 6, 1,
- 220, 36, 2, 248, 47, 33, 4, 1, 220, 36, 2, 248, 47, 150, 6, 1, 253, 172,
- 150, 6, 1, 252, 47, 150, 6, 1, 242, 210, 150, 6, 1, 248, 229, 150, 6, 1,
- 245, 221, 150, 6, 1, 210, 116, 150, 6, 1, 245, 205, 150, 6, 1, 245, 73,
- 150, 6, 1, 112, 150, 6, 1, 210, 74, 150, 6, 1, 235, 234, 150, 6, 1, 232,
- 196, 150, 6, 1, 211, 160, 150, 6, 1, 251, 41, 150, 6, 1, 234, 171, 150,
- 6, 1, 241, 75, 150, 6, 1, 235, 147, 150, 6, 1, 242, 253, 150, 6, 1, 250,
- 134, 150, 6, 1, 231, 63, 150, 6, 1, 211, 8, 150, 6, 1, 228, 44, 150, 6,
- 1, 220, 104, 150, 6, 1, 213, 138, 150, 6, 1, 250, 165, 150, 6, 1, 225,
- 208, 150, 6, 1, 235, 116, 150, 6, 1, 205, 150, 6, 1, 221, 163, 150, 6, 1,
- 213, 179, 150, 6, 1, 216, 63, 150, 6, 1, 223, 98, 150, 6, 1, 249, 246,
- 150, 6, 1, 210, 249, 150, 6, 1, 225, 49, 150, 6, 1, 234, 182, 150, 6, 1,
- 226, 226, 150, 6, 1, 244, 150, 150, 58, 1, 43, 163, 222, 236, 150, 254,
- 65, 150, 245, 162, 79, 150, 245, 39, 79, 150, 249, 227, 150, 224, 16, 79,
- 150, 255, 30, 79, 150, 4, 1, 253, 172, 150, 4, 1, 252, 47, 150, 4, 1,
- 242, 210, 150, 4, 1, 248, 229, 150, 4, 1, 245, 221, 150, 4, 1, 210, 116,
- 150, 4, 1, 245, 205, 150, 4, 1, 245, 73, 150, 4, 1, 112, 150, 4, 1, 210,
- 74, 150, 4, 1, 235, 234, 150, 4, 1, 232, 196, 150, 4, 1, 211, 160, 150,
- 4, 1, 251, 41, 150, 4, 1, 234, 171, 150, 4, 1, 241, 75, 150, 4, 1, 235,
- 147, 150, 4, 1, 242, 253, 150, 4, 1, 250, 134, 150, 4, 1, 231, 63, 150,
- 4, 1, 211, 8, 150, 4, 1, 228, 44, 150, 4, 1, 220, 104, 150, 4, 1, 213,
- 138, 150, 4, 1, 250, 165, 150, 4, 1, 225, 208, 150, 4, 1, 235, 116, 150,
- 4, 1, 205, 150, 4, 1, 221, 163, 150, 4, 1, 213, 179, 150, 4, 1, 216, 63,
- 150, 4, 1, 223, 98, 150, 4, 1, 249, 246, 150, 4, 1, 210, 249, 150, 4, 1,
- 225, 49, 150, 4, 1, 234, 182, 150, 4, 1, 226, 226, 150, 4, 1, 244, 150,
- 150, 4, 27, 245, 222, 210, 249, 150, 243, 236, 218, 131, 150, 240, 175,
- 150, 246, 103, 50, 94, 255, 24, 245, 65, 94, 255, 24, 221, 164, 94, 255,
- 24, 220, 90, 94, 255, 24, 210, 104, 224, 74, 94, 255, 24, 210, 104, 243,
- 132, 94, 255, 24, 216, 76, 94, 255, 24, 223, 50, 94, 255, 24, 210, 103,
- 94, 255, 24, 225, 249, 94, 255, 24, 211, 20, 94, 255, 24, 216, 215, 94,
- 255, 24, 243, 48, 94, 255, 24, 243, 49, 230, 74, 94, 255, 24, 243, 46,
- 94, 255, 24, 224, 75, 226, 20, 94, 255, 24, 216, 254, 243, 63, 94, 255,
- 24, 225, 230, 94, 255, 24, 253, 208, 242, 48, 94, 255, 24, 230, 84, 94,
- 255, 24, 231, 213, 94, 255, 24, 231, 54, 94, 255, 24, 231, 55, 234, 183,
- 94, 255, 24, 248, 171, 94, 255, 24, 224, 86, 94, 255, 24, 216, 254, 224,
- 70, 94, 255, 24, 211, 30, 252, 48, 210, 230, 94, 255, 24, 226, 211, 94,
- 255, 24, 236, 26, 94, 255, 24, 248, 78, 94, 255, 24, 210, 33, 94, 164,
- 231, 148, 250, 43, 94, 225, 14, 220, 38, 94, 225, 14, 242, 1, 221, 164,
- 94, 225, 14, 242, 1, 225, 243, 94, 225, 14, 242, 1, 224, 79, 94, 225, 14,
- 241, 165, 94, 225, 14, 215, 177, 94, 225, 14, 221, 164, 94, 225, 14, 225,
- 243, 94, 225, 14, 224, 79, 94, 225, 14, 241, 68, 94, 225, 14, 241, 69,
- 242, 3, 31, 214, 3, 94, 225, 14, 224, 20, 94, 225, 14, 248, 216, 177,
- 231, 176, 94, 225, 14, 231, 43, 94, 224, 144, 231, 173, 94, 225, 14, 223,
- 172, 94, 224, 144, 225, 251, 94, 225, 14, 220, 23, 247, 128, 94, 225, 14,
- 219, 161, 247, 128, 94, 224, 144, 219, 55, 225, 245, 94, 164, 214, 160,
- 247, 128, 94, 164, 232, 114, 247, 128, 94, 224, 144, 227, 199, 242, 47,
- 94, 225, 14, 224, 80, 224, 74, 94, 1, 254, 179, 94, 1, 252, 36, 94, 1,
- 242, 208, 94, 1, 248, 197, 94, 1, 241, 245, 94, 1, 214, 3, 94, 1, 210,
- 97, 94, 1, 241, 204, 94, 1, 216, 231, 94, 1, 210, 233, 94, 1, 40, 235, 0,
- 94, 1, 235, 0, 94, 1, 233, 100, 94, 1, 40, 231, 70, 94, 1, 231, 70, 94,
- 1, 40, 227, 198, 94, 1, 227, 198, 94, 1, 221, 251, 94, 1, 253, 170, 94,
- 1, 40, 225, 224, 94, 1, 225, 224, 94, 1, 40, 215, 180, 94, 1, 215, 180,
- 94, 1, 224, 42, 94, 1, 223, 70, 94, 1, 220, 22, 94, 1, 217, 39, 94, 27,
- 211, 6, 52, 214, 3, 94, 27, 211, 6, 214, 4, 210, 233, 94, 27, 211, 6, 52,
- 210, 233, 94, 224, 144, 243, 48, 94, 224, 144, 243, 46, 9, 54, 50, 9, 5,
- 221, 244, 9, 244, 38, 231, 159, 9, 5, 222, 25, 9, 5, 221, 247, 254, 45,
- 249, 117, 222, 195, 254, 45, 244, 12, 222, 195, 9, 223, 137, 254, 45,
- 225, 186, 230, 198, 50, 254, 45, 225, 186, 216, 249, 216, 149, 50, 254,
- 230, 50, 9, 249, 227, 9, 248, 158, 220, 139, 9, 225, 16, 213, 241, 50, 9,
- 5, 230, 179, 9, 5, 222, 5, 254, 181, 212, 45, 9, 5, 254, 181, 253, 229,
- 9, 5, 223, 170, 254, 180, 9, 5, 223, 178, 254, 161, 254, 112, 9, 5, 217,
- 71, 9, 4, 125, 217, 81, 9, 4, 125, 27, 109, 2, 233, 109, 2, 211, 43, 9,
- 4, 125, 210, 108, 9, 4, 244, 173, 9, 4, 248, 192, 9, 4, 234, 211, 9, 220,
- 152, 9, 1, 79, 9, 215, 212, 59, 224, 144, 79, 9, 224, 16, 79, 9, 1, 234,
- 215, 211, 43, 9, 1, 242, 26, 9, 1, 109, 2, 231, 233, 48, 9, 1, 109, 2,
- 182, 48, 9, 1, 212, 31, 2, 182, 48, 9, 1, 109, 2, 182, 51, 9, 1, 77, 2,
- 182, 48, 9, 1, 254, 179, 9, 1, 252, 62, 9, 1, 217, 9, 231, 169, 9, 1,
- 217, 8, 9, 1, 216, 193, 9, 1, 235, 129, 9, 1, 242, 44, 9, 1, 234, 135, 9,
- 1, 248, 203, 9, 1, 216, 203, 9, 1, 223, 98, 9, 1, 210, 108, 9, 1, 221,
- 168, 9, 1, 220, 61, 9, 1, 222, 28, 9, 1, 248, 224, 9, 1, 217, 81, 9, 1,
- 210, 111, 9, 1, 254, 205, 9, 1, 242, 251, 9, 1, 234, 181, 2, 113, 170,
- 48, 9, 1, 234, 181, 2, 134, 170, 51, 9, 1, 244, 176, 77, 2, 235, 200,
- 214, 105, 9, 1, 244, 176, 77, 2, 113, 170, 48, 9, 1, 244, 176, 77, 2,
- 134, 170, 48, 9, 217, 44, 9, 1, 244, 150, 9, 1, 224, 84, 9, 1, 235, 0, 9,
- 1, 233, 108, 9, 1, 231, 83, 9, 1, 228, 67, 9, 1, 241, 225, 9, 1, 212, 30,
- 9, 1, 109, 231, 197, 9, 1, 211, 43, 9, 244, 171, 9, 248, 190, 9, 234,
- 209, 9, 244, 173, 9, 248, 192, 9, 234, 211, 9, 220, 95, 9, 218, 46, 9,
- 231, 231, 48, 9, 182, 48, 9, 182, 51, 9, 218, 66, 254, 179, 9, 235, 200,
- 248, 192, 9, 164, 228, 68, 242, 225, 9, 209, 255, 9, 25, 5, 4, 214, 106,
- 48, 9, 25, 5, 235, 200, 4, 214, 106, 48, 9, 25, 5, 59, 51, 9, 223, 52,
- 248, 192, 9, 244, 174, 2, 113, 247, 126, 9, 212, 32, 182, 51, 254, 45,
- 21, 210, 86, 254, 45, 21, 111, 254, 45, 21, 105, 254, 45, 21, 158, 254,
- 45, 21, 161, 254, 45, 21, 190, 254, 45, 21, 195, 254, 45, 21, 199, 254,
- 45, 21, 196, 254, 45, 21, 201, 9, 225, 185, 50, 9, 248, 91, 220, 139, 9,
- 216, 147, 220, 139, 9, 244, 89, 225, 12, 218, 158, 9, 1, 247, 127, 252,
- 62, 9, 1, 247, 127, 224, 84, 9, 1, 218, 24, 254, 179, 9, 1, 109, 212, 46,
- 9, 1, 109, 2, 212, 32, 182, 48, 9, 1, 109, 2, 212, 32, 182, 51, 9, 1,
- 125, 242, 26, 9, 1, 125, 182, 254, 179, 9, 1, 125, 182, 212, 30, 9, 1,
- 104, 2, 182, 48, 9, 1, 125, 182, 211, 43, 9, 1, 215, 149, 9, 1, 215, 147,
- 9, 1, 252, 72, 9, 1, 217, 9, 2, 222, 236, 9, 1, 217, 9, 2, 134, 170, 72,
- 246, 111, 9, 1, 225, 208, 9, 1, 217, 6, 9, 1, 252, 60, 9, 1, 122, 2, 182,
- 48, 9, 1, 122, 2, 113, 170, 67, 48, 9, 1, 227, 157, 9, 1, 246, 51, 9, 1,
- 122, 2, 134, 170, 48, 9, 1, 217, 27, 9, 1, 217, 25, 9, 1, 248, 138, 9, 1,
- 248, 204, 2, 222, 236, 9, 1, 248, 204, 2, 59, 51, 9, 1, 248, 204, 2, 59,
- 252, 51, 22, 4, 217, 81, 9, 1, 248, 209, 9, 1, 248, 140, 9, 1, 246, 78,
- 9, 1, 248, 204, 2, 134, 170, 72, 246, 111, 9, 1, 248, 204, 2, 244, 19,
- 170, 48, 9, 1, 222, 173, 9, 1, 223, 99, 2, 4, 214, 105, 9, 1, 223, 99, 2,
- 222, 236, 9, 1, 223, 99, 2, 59, 51, 9, 1, 223, 99, 2, 4, 214, 106, 51, 9,
- 1, 223, 99, 2, 59, 252, 51, 22, 59, 48, 9, 1, 223, 99, 2, 113, 170, 48,
- 9, 1, 235, 126, 9, 1, 223, 99, 2, 244, 19, 170, 48, 9, 1, 221, 169, 2,
- 59, 252, 51, 22, 59, 48, 9, 1, 221, 169, 2, 134, 170, 51, 9, 1, 221, 169,
- 2, 134, 170, 252, 51, 22, 134, 170, 48, 9, 1, 222, 29, 2, 113, 170, 51,
- 9, 1, 222, 29, 2, 134, 170, 48, 9, 1, 217, 82, 2, 134, 170, 48, 9, 1,
- 254, 206, 2, 134, 170, 48, 9, 1, 247, 127, 244, 150, 9, 1, 244, 151, 2,
- 59, 230, 114, 51, 9, 1, 244, 151, 2, 59, 51, 9, 1, 213, 248, 9, 1, 244,
- 151, 2, 134, 170, 51, 9, 1, 225, 206, 9, 1, 224, 85, 2, 59, 48, 9, 1,
- 224, 85, 2, 134, 170, 48, 9, 1, 234, 180, 9, 1, 217, 251, 235, 0, 9, 1,
- 235, 1, 2, 222, 236, 9, 1, 235, 1, 2, 59, 48, 9, 1, 229, 84, 9, 1, 235,
- 1, 2, 134, 170, 51, 9, 1, 243, 129, 9, 1, 243, 130, 2, 222, 236, 9, 1,
- 229, 7, 9, 1, 243, 130, 2, 113, 170, 51, 9, 1, 242, 108, 9, 1, 243, 130,
- 2, 134, 170, 48, 9, 1, 233, 109, 2, 4, 214, 105, 9, 1, 233, 109, 2, 59,
- 48, 9, 1, 233, 109, 2, 134, 170, 48, 9, 1, 233, 109, 2, 134, 170, 51, 9,
- 1, 228, 68, 2, 59, 51, 9, 1, 228, 68, 242, 225, 9, 1, 222, 216, 9, 1,
- 228, 68, 2, 222, 236, 9, 1, 228, 68, 2, 134, 170, 48, 9, 1, 241, 226,
- 247, 149, 9, 1, 217, 28, 2, 59, 48, 9, 1, 241, 226, 2, 77, 48, 9, 1, 241,
- 226, 242, 178, 9, 1, 241, 226, 242, 179, 2, 182, 48, 9, 1, 217, 9, 231,
- 170, 242, 178, 9, 1, 212, 31, 2, 222, 236, 9, 1, 234, 79, 226, 238, 9, 1,
- 226, 238, 9, 1, 69, 9, 1, 210, 212, 9, 1, 234, 79, 210, 212, 9, 1, 212,
- 31, 2, 113, 170, 48, 9, 1, 213, 255, 9, 1, 244, 176, 211, 43, 9, 1, 77,
- 2, 217, 78, 9, 1, 77, 2, 4, 214, 105, 9, 1, 212, 31, 2, 59, 48, 9, 1, 76,
- 9, 1, 77, 2, 134, 170, 51, 9, 1, 77, 252, 140, 9, 1, 77, 252, 141, 2,
- 182, 48, 9, 243, 236, 218, 131, 9, 1, 254, 252, 9, 4, 125, 27, 222, 29,
- 2, 233, 109, 2, 109, 231, 197, 9, 4, 125, 27, 224, 85, 2, 233, 109, 2,
- 109, 231, 197, 9, 4, 125, 66, 65, 17, 9, 4, 125, 233, 109, 254, 179, 9,
- 4, 125, 235, 129, 9, 4, 125, 134, 247, 126, 9, 4, 125, 221, 168, 9, 245,
- 151, 64, 253, 174, 9, 218, 154, 64, 222, 140, 245, 183, 241, 162, 9, 4,
- 125, 222, 185, 210, 86, 9, 4, 125, 214, 159, 223, 118, 210, 86, 9, 4,
- 125, 247, 127, 241, 243, 64, 234, 135, 9, 4, 125, 66, 53, 17, 9, 4, 121,
- 221, 168, 9, 4, 125, 231, 232, 9, 4, 212, 30, 9, 4, 211, 43, 9, 4, 125,
- 211, 43, 9, 4, 125, 228, 67, 9, 225, 44, 64, 222, 15, 9, 245, 160, 250,
- 183, 121, 218, 131, 9, 245, 160, 250, 183, 125, 218, 131, 9, 222, 185,
- 125, 218, 132, 2, 244, 112, 250, 182, 9, 4, 121, 231, 83, 9, 1, 248, 204,
- 2, 235, 200, 214, 105, 9, 1, 223, 99, 2, 235, 200, 214, 105, 245, 30,
- 254, 45, 21, 210, 86, 245, 30, 254, 45, 21, 111, 245, 30, 254, 45, 21,
- 105, 245, 30, 254, 45, 21, 158, 245, 30, 254, 45, 21, 161, 245, 30, 254,
- 45, 21, 190, 245, 30, 254, 45, 21, 195, 245, 30, 254, 45, 21, 199, 245,
- 30, 254, 45, 21, 196, 245, 30, 254, 45, 21, 201, 9, 1, 220, 62, 2, 59,
- 51, 9, 1, 248, 225, 2, 59, 51, 9, 1, 242, 252, 2, 59, 51, 9, 5, 219, 160,
- 254, 134, 9, 5, 219, 160, 224, 238, 231, 63, 9, 1, 241, 226, 2, 235, 200,
- 214, 105, 183, 245, 151, 64, 226, 18, 183, 218, 20, 243, 236, 218, 131,
- 183, 218, 68, 243, 236, 218, 131, 183, 218, 20, 249, 234, 183, 218, 68,
- 249, 234, 183, 203, 249, 234, 183, 249, 235, 219, 108, 233, 52, 183, 249,
- 235, 219, 108, 222, 254, 183, 218, 20, 249, 235, 219, 108, 233, 52, 183,
- 218, 68, 249, 235, 219, 108, 222, 254, 183, 249, 188, 183, 242, 8, 226,
- 254, 183, 242, 8, 231, 41, 183, 242, 8, 253, 226, 183, 255, 30, 79, 183,
- 1, 254, 183, 183, 1, 218, 24, 254, 183, 183, 1, 252, 33, 183, 1, 243,
- 120, 183, 1, 243, 121, 243, 98, 183, 1, 248, 200, 183, 1, 247, 127, 248,
- 201, 222, 232, 183, 1, 241, 245, 183, 1, 212, 30, 183, 1, 210, 108, 183,
- 1, 241, 202, 183, 1, 216, 227, 183, 1, 216, 228, 243, 98, 183, 1, 210,
- 199, 183, 1, 210, 200, 241, 245, 183, 1, 234, 231, 183, 1, 233, 107, 183,
- 1, 230, 195, 183, 1, 227, 198, 183, 1, 220, 145, 183, 1, 40, 220, 145,
- 183, 1, 76, 183, 1, 225, 224, 183, 1, 223, 52, 225, 224, 183, 1, 222, 26,
- 183, 1, 224, 78, 183, 1, 222, 232, 183, 1, 220, 22, 183, 1, 217, 37, 183,
- 1, 225, 172, 252, 20, 183, 1, 225, 172, 242, 249, 183, 1, 225, 172, 248,
- 28, 183, 224, 154, 48, 183, 224, 154, 51, 183, 224, 154, 246, 125, 183,
- 210, 17, 48, 183, 210, 17, 51, 183, 210, 17, 246, 125, 183, 223, 134, 48,
- 183, 223, 134, 51, 183, 246, 126, 210, 24, 241, 51, 183, 246, 126, 210,
- 24, 254, 113, 183, 241, 248, 48, 183, 241, 248, 51, 183, 241, 247, 246,
- 125, 183, 245, 87, 48, 183, 245, 87, 51, 183, 222, 109, 183, 244, 144,
- 247, 128, 183, 223, 251, 183, 222, 136, 183, 113, 67, 170, 48, 183, 113,
- 67, 170, 51, 183, 134, 170, 48, 183, 134, 170, 51, 183, 226, 252, 232,
- 220, 48, 183, 226, 252, 232, 220, 51, 183, 230, 61, 183, 252, 139, 183,
- 1, 219, 51, 210, 80, 183, 1, 219, 51, 234, 128, 183, 1, 219, 51, 244,
- 162, 9, 1, 252, 63, 2, 134, 170, 241, 1, 51, 9, 1, 252, 63, 2, 59, 252,
- 51, 22, 134, 170, 48, 9, 1, 252, 63, 2, 134, 170, 225, 10, 214, 153, 51,
- 9, 1, 252, 63, 2, 134, 170, 225, 10, 214, 153, 252, 51, 22, 113, 170, 48,
- 9, 1, 252, 63, 2, 113, 170, 252, 51, 22, 59, 48, 9, 1, 252, 63, 2, 235,
- 200, 4, 214, 106, 51, 9, 1, 252, 63, 2, 4, 214, 105, 9, 1, 122, 2, 113,
- 170, 48, 9, 1, 122, 2, 134, 170, 225, 10, 214, 153, 51, 9, 1, 248, 204,
- 2, 113, 170, 213, 189, 252, 51, 22, 4, 217, 81, 9, 1, 248, 204, 2, 235,
- 200, 4, 214, 106, 51, 9, 1, 223, 99, 2, 91, 9, 1, 221, 169, 2, 244, 19,
- 170, 48, 9, 1, 254, 206, 2, 113, 170, 48, 9, 1, 254, 206, 2, 134, 170,
- 225, 10, 246, 112, 48, 9, 1, 254, 206, 2, 113, 170, 213, 189, 48, 9, 1,
- 244, 151, 2, 113, 170, 51, 9, 1, 244, 151, 2, 134, 170, 225, 10, 214,
- 153, 51, 9, 1, 234, 181, 2, 59, 48, 9, 1, 234, 181, 2, 134, 170, 48, 9,
- 1, 234, 181, 2, 134, 170, 225, 10, 214, 153, 51, 9, 1, 66, 2, 59, 48, 9,
- 1, 66, 2, 59, 51, 9, 1, 228, 68, 2, 113, 170, 51, 9, 1, 228, 68, 2, 4,
- 217, 81, 9, 1, 228, 68, 2, 4, 214, 105, 9, 1, 233, 109, 2, 130, 9, 1,
- 223, 99, 2, 113, 170, 213, 189, 48, 9, 1, 223, 99, 2, 182, 48, 9, 1, 221,
- 169, 2, 113, 170, 213, 189, 48, 9, 1, 122, 2, 4, 9, 1, 217, 82, 51, 9, 1,
- 122, 2, 4, 9, 1, 217, 82, 22, 113, 247, 126, 9, 1, 221, 169, 2, 4, 9, 1,
- 217, 82, 22, 113, 247, 126, 9, 1, 223, 99, 2, 4, 9, 1, 217, 82, 22, 113,
- 247, 126, 9, 1, 122, 2, 4, 9, 1, 217, 82, 48, 9, 1, 109, 2, 245, 30, 254,
- 45, 21, 113, 48, 9, 1, 109, 2, 245, 30, 254, 45, 21, 134, 48, 9, 1, 244,
- 176, 77, 2, 245, 30, 254, 45, 21, 113, 48, 9, 1, 244, 176, 77, 2, 245,
- 30, 254, 45, 21, 134, 48, 9, 1, 244, 176, 77, 2, 245, 30, 254, 45, 21,
- 244, 19, 51, 9, 1, 212, 31, 2, 245, 30, 254, 45, 21, 113, 48, 9, 1, 212,
- 31, 2, 245, 30, 254, 45, 21, 134, 48, 9, 1, 77, 252, 141, 2, 245, 30,
- 254, 45, 21, 113, 48, 9, 1, 77, 252, 141, 2, 245, 30, 254, 45, 21, 134,
- 48, 9, 1, 122, 2, 245, 30, 254, 45, 21, 244, 19, 51, 9, 1, 221, 169, 2,
- 245, 30, 254, 45, 21, 244, 19, 48, 9, 1, 221, 169, 2, 235, 200, 214, 105,
- 9, 1, 235, 1, 2, 113, 170, 48, 216, 206, 1, 242, 53, 216, 206, 1, 220,
- 70, 216, 206, 1, 228, 66, 216, 206, 1, 223, 187, 216, 206, 1, 252, 197,
- 216, 206, 1, 233, 1, 216, 206, 1, 235, 14, 216, 206, 1, 254, 168, 216,
- 206, 1, 214, 25, 216, 206, 1, 231, 82, 216, 206, 1, 244, 202, 216, 206,
- 1, 248, 31, 216, 206, 1, 216, 208, 216, 206, 1, 233, 137, 216, 206, 1,
- 243, 138, 216, 206, 1, 242, 184, 216, 206, 1, 221, 167, 216, 206, 1, 248,
- 156, 216, 206, 1, 210, 100, 216, 206, 1, 217, 38, 216, 206, 1, 211, 103,
- 216, 206, 1, 225, 237, 216, 206, 1, 235, 134, 216, 206, 1, 250, 142, 216,
- 206, 1, 215, 156, 216, 206, 1, 241, 195, 216, 206, 1, 234, 137, 216, 206,
- 1, 216, 207, 216, 206, 1, 210, 115, 216, 206, 1, 220, 60, 216, 206, 1,
- 222, 32, 216, 206, 1, 248, 227, 216, 206, 1, 112, 216, 206, 1, 210, 23,
- 216, 206, 1, 254, 202, 216, 206, 1, 242, 250, 216, 206, 1, 224, 88, 216,
- 206, 1, 212, 63, 216, 206, 255, 31, 216, 206, 255, 47, 216, 206, 240,
- 121, 216, 206, 245, 216, 216, 206, 214, 222, 216, 206, 226, 186, 216,
- 206, 245, 224, 216, 206, 245, 24, 216, 206, 226, 251, 216, 206, 227, 3,
- 216, 206, 218, 46, 216, 206, 1, 229, 230, 228, 142, 21, 210, 86, 228,
- 142, 21, 111, 228, 142, 21, 105, 228, 142, 21, 158, 228, 142, 21, 161,
- 228, 142, 21, 190, 228, 142, 21, 195, 228, 142, 21, 199, 228, 142, 21,
- 196, 228, 142, 21, 201, 228, 142, 1, 61, 228, 142, 1, 245, 217, 228, 142,
- 1, 74, 228, 142, 1, 76, 228, 142, 1, 69, 228, 142, 1, 226, 187, 228, 142,
- 1, 78, 228, 142, 1, 248, 217, 228, 142, 1, 230, 30, 228, 142, 1, 252,
- 199, 228, 142, 1, 191, 228, 142, 1, 217, 106, 228, 142, 1, 235, 147, 228,
- 142, 1, 250, 165, 228, 142, 1, 248, 229, 228, 142, 1, 205, 228, 142, 1,
- 222, 181, 228, 142, 1, 206, 228, 142, 1, 243, 86, 228, 142, 1, 244, 204,
- 228, 142, 1, 176, 228, 142, 1, 233, 141, 228, 142, 1, 229, 234, 211, 223,
- 228, 142, 1, 186, 228, 142, 1, 227, 169, 228, 142, 1, 198, 228, 142, 1,
- 162, 228, 142, 1, 212, 65, 228, 142, 1, 192, 228, 142, 1, 227, 170, 211,
- 223, 228, 142, 1, 235, 67, 235, 147, 228, 142, 1, 235, 67, 250, 165, 228,
- 142, 1, 235, 67, 205, 228, 142, 38, 219, 253, 125, 216, 31, 228, 142, 38,
- 219, 253, 121, 216, 31, 228, 142, 38, 219, 253, 222, 231, 216, 31, 228,
- 142, 38, 200, 248, 46, 216, 31, 228, 142, 38, 200, 125, 216, 31, 228,
- 142, 38, 200, 121, 216, 31, 228, 142, 38, 200, 222, 231, 216, 31, 228,
- 142, 38, 229, 198, 79, 228, 142, 38, 52, 59, 48, 228, 142, 125, 138, 254,
- 65, 228, 142, 121, 138, 254, 65, 228, 142, 16, 226, 188, 248, 58, 228,
- 142, 16, 243, 85, 228, 142, 249, 227, 228, 142, 245, 39, 79, 228, 142,
- 233, 114, 221, 254, 1, 254, 185, 221, 254, 1, 251, 236, 221, 254, 1, 243,
- 119, 221, 254, 1, 248, 202, 221, 254, 1, 235, 158, 221, 254, 1, 252, 197,
- 221, 254, 1, 210, 89, 221, 254, 1, 235, 166, 221, 254, 1, 216, 68, 221,
- 254, 1, 210, 182, 221, 254, 1, 235, 15, 221, 254, 1, 233, 134, 221, 254,
- 1, 230, 195, 221, 254, 1, 227, 198, 221, 254, 1, 219, 158, 221, 254, 1,
- 236, 6, 221, 254, 1, 244, 129, 221, 254, 1, 215, 182, 221, 254, 1, 224,
- 13, 221, 254, 1, 222, 232, 221, 254, 1, 220, 87, 221, 254, 1, 217, 101,
- 221, 254, 164, 236, 6, 221, 254, 164, 236, 5, 221, 254, 164, 226, 247,
- 221, 254, 164, 248, 215, 221, 254, 58, 1, 245, 113, 210, 182, 221, 254,
- 164, 245, 113, 210, 182, 221, 254, 25, 5, 200, 76, 221, 254, 25, 5, 76,
- 221, 254, 25, 5, 226, 122, 255, 82, 221, 254, 25, 5, 200, 255, 82, 221,
- 254, 25, 5, 255, 82, 221, 254, 25, 5, 226, 122, 61, 221, 254, 25, 5, 200,
- 61, 221, 254, 25, 5, 61, 221, 254, 58, 1, 219, 253, 61, 221, 254, 25, 5,
- 219, 253, 61, 221, 254, 25, 5, 200, 69, 221, 254, 25, 5, 69, 221, 254,
- 58, 1, 74, 221, 254, 25, 5, 200, 74, 221, 254, 25, 5, 74, 221, 254, 25,
- 5, 78, 221, 254, 25, 5, 218, 46, 221, 254, 164, 229, 97, 221, 254, 224,
- 144, 229, 97, 221, 254, 224, 144, 254, 227, 221, 254, 224, 144, 254, 122,
- 221, 254, 224, 144, 252, 122, 221, 254, 224, 144, 253, 209, 221, 254,
- 224, 144, 220, 10, 221, 254, 255, 30, 79, 221, 254, 224, 144, 231, 73,
- 224, 48, 221, 254, 224, 144, 210, 31, 221, 254, 224, 144, 224, 48, 221,
- 254, 224, 144, 210, 114, 221, 254, 224, 144, 215, 90, 221, 254, 224, 144,
- 254, 17, 221, 254, 224, 144, 219, 55, 231, 150, 221, 254, 224, 144, 254,
- 108, 231, 187, 1, 242, 31, 231, 187, 1, 255, 34, 231, 187, 1, 254, 225,
- 231, 187, 1, 255, 8, 231, 187, 1, 254, 218, 231, 187, 1, 214, 124, 231,
- 187, 1, 253, 168, 231, 187, 1, 235, 166, 231, 187, 1, 253, 206, 231, 187,
- 1, 254, 190, 231, 187, 1, 254, 195, 231, 187, 1, 254, 187, 231, 187, 1,
- 254, 144, 231, 187, 1, 254, 131, 231, 187, 1, 253, 245, 231, 187, 1, 236,
- 6, 231, 187, 1, 254, 80, 231, 187, 1, 253, 216, 231, 187, 1, 254, 53,
- 231, 187, 1, 254, 49, 231, 187, 1, 253, 239, 231, 187, 1, 253, 214, 231,
- 187, 1, 246, 63, 231, 187, 1, 235, 8, 231, 187, 1, 254, 205, 231, 187,
- 254, 231, 79, 231, 187, 213, 136, 79, 231, 187, 243, 60, 79, 231, 187,
- 224, 143, 9, 1, 252, 63, 2, 4, 214, 106, 51, 9, 1, 151, 2, 113, 170, 48,
- 9, 1, 217, 82, 2, 113, 170, 48, 9, 1, 244, 151, 2, 59, 252, 51, 22, 134,
- 170, 48, 9, 1, 224, 85, 2, 59, 51, 9, 1, 233, 109, 2, 52, 130, 9, 1, 66,
- 2, 134, 170, 48, 9, 1, 77, 2, 113, 170, 252, 51, 22, 182, 48, 9, 1, 77,
- 2, 113, 170, 252, 51, 22, 59, 48, 9, 1, 223, 99, 2, 232, 129, 9, 1, 212,
- 31, 2, 59, 211, 231, 9, 1, 222, 203, 211, 43, 9, 249, 107, 244, 173, 9,
- 249, 107, 248, 192, 9, 249, 107, 234, 211, 9, 249, 107, 244, 171, 9, 249,
- 107, 248, 190, 9, 249, 107, 234, 209, 9, 138, 123, 59, 48, 9, 138, 113,
- 170, 48, 9, 138, 232, 130, 48, 9, 138, 123, 59, 51, 9, 138, 113, 170, 51,
- 9, 138, 232, 130, 51, 9, 204, 244, 171, 9, 204, 248, 190, 9, 204, 234,
- 209, 9, 4, 125, 212, 30, 9, 244, 174, 2, 222, 236, 9, 244, 174, 2, 59,
- 48, 9, 234, 212, 2, 59, 51, 9, 43, 254, 2, 48, 9, 44, 254, 2, 48, 9, 43,
- 254, 2, 51, 9, 44, 254, 2, 51, 9, 52, 44, 254, 2, 48, 9, 52, 44, 254, 2,
- 72, 2, 247, 128, 9, 44, 254, 2, 72, 2, 247, 128, 9, 248, 193, 2, 247,
- 128, 84, 5, 235, 200, 251, 7, 84, 5, 251, 7, 84, 5, 254, 83, 84, 5, 213,
- 147, 84, 1, 219, 253, 61, 84, 1, 61, 84, 1, 255, 82, 84, 1, 74, 84, 1,
- 236, 40, 84, 1, 69, 84, 1, 214, 118, 84, 1, 149, 153, 84, 1, 149, 156,
- 84, 1, 251, 10, 76, 84, 1, 219, 253, 76, 84, 1, 76, 84, 1, 254, 210, 84,
- 1, 251, 10, 78, 84, 1, 219, 253, 78, 84, 1, 78, 84, 1, 253, 200, 84, 1,
- 176, 84, 1, 234, 138, 84, 1, 243, 142, 84, 1, 243, 0, 84, 1, 229, 82, 84,
- 1, 251, 41, 84, 1, 250, 165, 84, 1, 235, 147, 84, 1, 235, 120, 84, 1,
- 227, 169, 84, 1, 215, 157, 84, 1, 215, 145, 84, 1, 248, 143, 84, 1, 248,
- 127, 84, 1, 228, 115, 84, 1, 217, 106, 84, 1, 216, 209, 84, 1, 248, 229,
- 84, 1, 248, 33, 84, 1, 198, 84, 1, 228, 97, 84, 1, 191, 84, 1, 225, 150,
- 84, 1, 252, 199, 84, 1, 252, 26, 84, 1, 186, 84, 1, 192, 84, 1, 205, 84,
- 1, 222, 181, 84, 1, 233, 141, 84, 1, 232, 190, 84, 1, 232, 181, 84, 1,
- 214, 27, 84, 1, 220, 104, 84, 1, 218, 225, 84, 1, 206, 84, 1, 162, 84,
- 25, 5, 226, 238, 84, 25, 5, 226, 185, 84, 5, 227, 209, 84, 5, 253, 183,
- 84, 25, 5, 255, 82, 84, 25, 5, 74, 84, 25, 5, 236, 40, 84, 25, 5, 69, 84,
- 25, 5, 214, 118, 84, 25, 5, 149, 153, 84, 25, 5, 149, 222, 182, 84, 25,
- 5, 251, 10, 76, 84, 25, 5, 219, 253, 76, 84, 25, 5, 76, 84, 25, 5, 254,
- 210, 84, 25, 5, 251, 10, 78, 84, 25, 5, 219, 253, 78, 84, 25, 5, 78, 84,
- 25, 5, 253, 200, 84, 5, 213, 152, 84, 25, 5, 224, 188, 76, 84, 25, 5,
- 253, 179, 84, 226, 208, 84, 218, 113, 5, 214, 216, 84, 218, 113, 5, 254,
- 85, 84, 242, 144, 255, 23, 84, 255, 12, 255, 23, 84, 25, 5, 251, 10, 200,
- 76, 84, 25, 5, 214, 214, 84, 25, 5, 214, 117, 84, 1, 224, 91, 84, 1, 234,
- 121, 84, 1, 242, 233, 84, 1, 210, 116, 84, 1, 248, 132, 84, 1, 223, 42,
- 84, 1, 244, 204, 84, 1, 210, 168, 84, 1, 149, 222, 182, 84, 1, 149, 232,
- 191, 84, 25, 5, 149, 156, 84, 25, 5, 149, 232, 191, 84, 248, 186, 84, 52,
- 248, 186, 84, 21, 210, 86, 84, 21, 111, 84, 21, 105, 84, 21, 158, 84, 21,
- 161, 84, 21, 190, 84, 21, 195, 84, 21, 199, 84, 21, 196, 84, 21, 201, 84,
- 255, 30, 50, 84, 5, 125, 219, 19, 247, 128, 84, 1, 251, 10, 61, 84, 1,
- 226, 238, 84, 1, 226, 185, 84, 1, 253, 179, 84, 1, 214, 214, 84, 1, 214,
- 117, 84, 1, 210, 82, 84, 1, 114, 192, 84, 1, 243, 36, 84, 1, 235, 102,
- 84, 1, 242, 187, 218, 131, 84, 1, 248, 133, 84, 1, 252, 119, 146, 5, 251,
- 7, 146, 5, 254, 83, 146, 5, 213, 147, 146, 1, 61, 146, 1, 255, 82, 146,
- 1, 74, 146, 1, 236, 40, 146, 1, 69, 146, 1, 214, 118, 146, 1, 149, 153,
- 146, 1, 149, 156, 146, 1, 76, 146, 1, 254, 210, 146, 1, 78, 146, 1, 253,
- 200, 146, 1, 176, 146, 1, 234, 138, 146, 1, 243, 142, 146, 1, 243, 0,
- 146, 1, 229, 82, 146, 1, 251, 41, 146, 1, 250, 165, 146, 1, 235, 147,
- 146, 1, 235, 120, 146, 1, 227, 169, 146, 1, 215, 157, 146, 1, 215, 145,
- 146, 1, 248, 143, 146, 1, 248, 127, 146, 1, 228, 115, 146, 1, 217, 106,
- 146, 1, 216, 209, 146, 1, 248, 229, 146, 1, 248, 33, 146, 1, 198, 146, 1,
- 191, 146, 1, 225, 150, 146, 1, 252, 199, 146, 1, 252, 26, 146, 1, 186,
- 146, 1, 192, 146, 1, 205, 146, 1, 233, 141, 146, 1, 220, 104, 146, 1,
- 218, 225, 146, 1, 206, 146, 1, 162, 146, 5, 227, 209, 146, 5, 253, 183,
- 146, 25, 5, 255, 82, 146, 25, 5, 74, 146, 25, 5, 236, 40, 146, 25, 5, 69,
- 146, 25, 5, 214, 118, 146, 25, 5, 149, 153, 146, 25, 5, 149, 222, 182,
- 146, 25, 5, 76, 146, 25, 5, 254, 210, 146, 25, 5, 78, 146, 25, 5, 253,
- 200, 146, 5, 213, 152, 146, 1, 234, 130, 217, 106, 146, 253, 201, 233,
- 29, 79, 146, 1, 222, 181, 146, 1, 223, 42, 146, 1, 210, 168, 146, 1, 149,
- 222, 182, 146, 1, 149, 232, 191, 146, 25, 5, 149, 156, 146, 25, 5, 149,
- 232, 191, 146, 21, 210, 86, 146, 21, 111, 146, 21, 105, 146, 21, 158,
- 146, 21, 161, 146, 21, 190, 146, 21, 195, 146, 21, 199, 146, 21, 196,
- 146, 21, 201, 146, 1, 223, 191, 2, 230, 229, 248, 6, 146, 1, 223, 191, 2,
- 232, 114, 248, 6, 146, 222, 120, 79, 146, 222, 120, 50, 146, 249, 106,
- 227, 201, 111, 146, 249, 106, 227, 201, 105, 146, 249, 106, 227, 201,
- 158, 146, 249, 106, 227, 201, 161, 146, 249, 106, 227, 201, 123, 233, 22,
- 216, 202, 216, 197, 248, 56, 146, 249, 106, 248, 57, 219, 121, 146, 235,
- 167, 146, 243, 110, 79, 185, 5, 255, 7, 251, 251, 185, 5, 251, 251, 185,
- 5, 213, 147, 185, 1, 61, 185, 1, 255, 82, 185, 1, 74, 185, 1, 236, 40,
- 185, 1, 69, 185, 1, 214, 118, 185, 1, 245, 217, 185, 1, 254, 210, 185, 1,
- 226, 187, 185, 1, 253, 200, 185, 1, 176, 185, 1, 234, 138, 185, 1, 243,
- 142, 185, 1, 243, 0, 185, 1, 229, 82, 185, 1, 251, 41, 185, 1, 250, 165,
- 185, 1, 235, 147, 185, 1, 235, 120, 185, 1, 227, 169, 185, 1, 215, 157,
- 185, 1, 215, 145, 185, 1, 248, 143, 185, 1, 248, 127, 185, 1, 228, 115,
- 185, 1, 217, 106, 185, 1, 216, 209, 185, 1, 248, 229, 185, 1, 248, 33,
- 185, 1, 198, 185, 1, 191, 185, 1, 225, 150, 185, 1, 252, 199, 185, 1,
- 252, 26, 185, 1, 186, 185, 1, 192, 185, 1, 205, 185, 1, 233, 141, 185, 1,
- 232, 190, 185, 1, 214, 27, 185, 1, 220, 104, 185, 1, 206, 185, 1, 162,
- 185, 5, 227, 209, 185, 25, 5, 255, 82, 185, 25, 5, 74, 185, 25, 5, 236,
- 40, 185, 25, 5, 69, 185, 25, 5, 214, 118, 185, 25, 5, 245, 217, 185, 25,
- 5, 254, 210, 185, 25, 5, 226, 187, 185, 25, 5, 253, 200, 185, 5, 213,
- 152, 185, 5, 214, 218, 185, 1, 234, 121, 185, 1, 242, 233, 185, 1, 210,
- 116, 185, 1, 222, 181, 185, 1, 244, 204, 185, 21, 210, 86, 185, 21, 111,
- 185, 21, 105, 185, 21, 158, 185, 21, 161, 185, 21, 190, 185, 21, 195,
- 185, 21, 199, 185, 21, 196, 185, 21, 201, 185, 216, 75, 185, 255, 6, 185,
- 235, 185, 185, 214, 146, 185, 245, 189, 226, 192, 185, 5, 211, 78, 171,
- 5, 251, 7, 171, 5, 254, 83, 171, 5, 213, 147, 171, 1, 61, 171, 1, 255,
- 82, 171, 1, 74, 171, 1, 236, 40, 171, 1, 69, 171, 1, 214, 118, 171, 1,
- 149, 153, 171, 1, 149, 156, 171, 25, 251, 10, 76, 171, 1, 76, 171, 1,
- 254, 210, 171, 25, 251, 10, 78, 171, 1, 78, 171, 1, 253, 200, 171, 1,
- 176, 171, 1, 234, 138, 171, 1, 243, 142, 171, 1, 243, 0, 171, 1, 229, 82,
- 171, 1, 251, 41, 171, 1, 250, 165, 171, 1, 235, 147, 171, 1, 235, 120,
- 171, 1, 227, 169, 171, 1, 215, 157, 171, 1, 215, 145, 171, 1, 248, 143,
- 171, 1, 248, 127, 171, 1, 228, 115, 171, 1, 217, 106, 171, 1, 216, 209,
- 171, 1, 248, 229, 171, 1, 248, 33, 171, 1, 198, 171, 1, 191, 171, 1, 225,
- 150, 171, 1, 252, 199, 171, 1, 252, 26, 171, 1, 186, 171, 1, 192, 171, 1,
- 205, 171, 1, 233, 141, 171, 1, 232, 190, 171, 1, 214, 27, 171, 1, 220,
- 104, 171, 1, 218, 225, 171, 1, 206, 171, 1, 162, 171, 5, 227, 209, 171,
- 5, 253, 183, 171, 25, 5, 255, 82, 171, 25, 5, 74, 171, 25, 5, 236, 40,
- 171, 25, 5, 69, 171, 25, 5, 214, 118, 171, 25, 5, 149, 153, 171, 25, 5,
- 149, 222, 182, 171, 25, 5, 251, 10, 76, 171, 25, 5, 76, 171, 25, 5, 254,
- 210, 171, 25, 5, 251, 10, 78, 171, 25, 5, 78, 171, 25, 5, 253, 200, 171,
- 5, 213, 152, 171, 226, 208, 171, 1, 149, 222, 182, 171, 1, 149, 232, 191,
- 171, 25, 5, 149, 156, 171, 25, 5, 149, 232, 191, 171, 21, 210, 86, 171,
- 21, 111, 171, 21, 105, 171, 21, 158, 171, 21, 161, 171, 21, 190, 171, 21,
- 195, 171, 21, 199, 171, 21, 196, 171, 21, 201, 171, 255, 30, 50, 171,
- 222, 120, 50, 157, 5, 251, 7, 157, 5, 254, 83, 157, 5, 213, 147, 157, 1,
- 61, 157, 1, 255, 82, 157, 1, 74, 157, 1, 236, 40, 157, 1, 69, 157, 1,
- 214, 118, 157, 1, 149, 153, 157, 1, 149, 156, 157, 1, 76, 157, 1, 254,
- 210, 157, 1, 78, 157, 1, 253, 200, 157, 1, 176, 157, 1, 234, 138, 157, 1,
- 243, 142, 157, 1, 243, 0, 157, 1, 229, 82, 157, 1, 251, 41, 157, 1, 250,
- 165, 157, 1, 235, 147, 157, 1, 235, 120, 157, 1, 227, 169, 157, 1, 215,
- 157, 157, 1, 215, 145, 157, 1, 248, 143, 157, 1, 248, 127, 157, 1, 228,
- 115, 157, 1, 217, 106, 157, 1, 216, 209, 157, 1, 248, 229, 157, 1, 248,
- 33, 157, 1, 198, 157, 1, 191, 157, 1, 225, 150, 157, 1, 252, 199, 157, 1,
- 252, 26, 157, 1, 186, 157, 1, 192, 157, 1, 205, 157, 1, 233, 141, 157, 1,
- 232, 190, 157, 1, 214, 27, 157, 1, 220, 104, 157, 1, 218, 225, 157, 1,
- 206, 157, 1, 162, 157, 5, 227, 209, 157, 5, 253, 183, 157, 25, 5, 255,
- 82, 157, 25, 5, 74, 157, 25, 5, 236, 40, 157, 25, 5, 69, 157, 25, 5, 214,
- 118, 157, 25, 5, 149, 153, 157, 25, 5, 149, 222, 182, 157, 25, 5, 76,
- 157, 25, 5, 254, 210, 157, 25, 5, 78, 157, 25, 5, 253, 200, 157, 5, 213,
- 152, 157, 254, 211, 233, 29, 79, 157, 253, 201, 233, 29, 79, 157, 1, 222,
- 181, 157, 1, 223, 42, 157, 1, 210, 168, 157, 1, 149, 222, 182, 157, 1,
- 149, 232, 191, 157, 25, 5, 149, 156, 157, 25, 5, 149, 232, 191, 157, 21,
- 210, 86, 157, 21, 111, 157, 21, 105, 157, 21, 158, 157, 21, 161, 157, 21,
- 190, 157, 21, 195, 157, 21, 199, 157, 21, 196, 157, 21, 201, 157, 235,
- 167, 157, 1, 212, 65, 157, 244, 10, 123, 224, 24, 157, 244, 10, 123, 242,
- 34, 157, 244, 10, 134, 224, 22, 157, 244, 10, 123, 219, 119, 157, 244,
- 10, 123, 245, 196, 157, 244, 10, 134, 219, 118, 36, 5, 254, 83, 36, 5,
- 213, 147, 36, 1, 61, 36, 1, 255, 82, 36, 1, 74, 36, 1, 236, 40, 36, 1,
- 69, 36, 1, 214, 118, 36, 1, 76, 36, 1, 245, 217, 36, 1, 254, 210, 36, 1,
- 78, 36, 1, 226, 187, 36, 1, 253, 200, 36, 1, 176, 36, 1, 229, 82, 36, 1,
- 251, 41, 36, 1, 235, 147, 36, 1, 227, 169, 36, 1, 215, 157, 36, 1, 228,
- 115, 36, 1, 217, 106, 36, 1, 198, 36, 1, 228, 97, 36, 1, 191, 36, 1, 186,
- 36, 1, 192, 36, 1, 205, 36, 1, 222, 181, 36, 1, 233, 141, 36, 1, 232,
- 190, 36, 1, 232, 181, 36, 1, 214, 27, 36, 1, 220, 104, 36, 1, 218, 225,
- 36, 1, 206, 36, 1, 162, 36, 25, 5, 255, 82, 36, 25, 5, 74, 36, 25, 5,
- 236, 40, 36, 25, 5, 69, 36, 25, 5, 214, 118, 36, 25, 5, 76, 36, 25, 5,
- 245, 217, 36, 25, 5, 254, 210, 36, 25, 5, 78, 36, 25, 5, 226, 187, 36,
- 25, 5, 253, 200, 36, 5, 213, 152, 36, 226, 208, 36, 253, 201, 233, 29,
- 79, 36, 21, 210, 86, 36, 21, 111, 36, 21, 105, 36, 21, 158, 36, 21, 161,
- 36, 21, 190, 36, 21, 195, 36, 21, 199, 36, 21, 196, 36, 21, 201, 36, 54,
- 216, 248, 36, 54, 123, 240, 217, 36, 54, 123, 216, 148, 36, 248, 154, 50,
- 36, 230, 140, 50, 36, 211, 45, 50, 36, 248, 95, 50, 36, 249, 147, 50, 36,
- 253, 246, 72, 50, 36, 222, 120, 50, 36, 54, 50, 148, 5, 251, 7, 148, 5,
- 254, 83, 148, 5, 213, 147, 148, 1, 61, 148, 1, 255, 82, 148, 1, 74, 148,
- 1, 236, 40, 148, 1, 69, 148, 1, 214, 118, 148, 1, 149, 153, 148, 1, 149,
- 156, 148, 1, 76, 148, 1, 245, 217, 148, 1, 254, 210, 148, 1, 78, 148, 1,
- 226, 187, 148, 1, 253, 200, 148, 1, 176, 148, 1, 234, 138, 148, 1, 243,
- 142, 148, 1, 243, 0, 148, 1, 229, 82, 148, 1, 251, 41, 148, 1, 250, 165,
- 148, 1, 235, 147, 148, 1, 235, 120, 148, 1, 227, 169, 148, 1, 215, 157,
- 148, 1, 215, 145, 148, 1, 248, 143, 148, 1, 248, 127, 148, 1, 228, 115,
- 148, 1, 217, 106, 148, 1, 216, 209, 148, 1, 248, 229, 148, 1, 248, 33,
- 148, 1, 198, 148, 1, 191, 148, 1, 225, 150, 148, 1, 252, 199, 148, 1,
- 252, 26, 148, 1, 186, 148, 1, 192, 148, 1, 205, 148, 1, 222, 181, 148, 1,
- 233, 141, 148, 1, 232, 190, 148, 1, 214, 27, 148, 1, 220, 104, 148, 1,
- 218, 225, 148, 1, 206, 148, 1, 162, 148, 5, 253, 183, 148, 25, 5, 255,
- 82, 148, 25, 5, 74, 148, 25, 5, 236, 40, 148, 25, 5, 69, 148, 25, 5, 214,
- 118, 148, 25, 5, 149, 153, 148, 25, 5, 149, 222, 182, 148, 25, 5, 76,
- 148, 25, 5, 245, 217, 148, 25, 5, 254, 210, 148, 25, 5, 78, 148, 25, 5,
- 226, 187, 148, 25, 5, 253, 200, 148, 5, 213, 152, 148, 233, 29, 79, 148,
- 254, 211, 233, 29, 79, 148, 1, 215, 184, 148, 1, 246, 46, 148, 1, 149,
- 222, 182, 148, 1, 149, 232, 191, 148, 25, 5, 149, 156, 148, 25, 5, 149,
- 232, 191, 148, 21, 210, 86, 148, 21, 111, 148, 21, 105, 148, 21, 158,
- 148, 21, 161, 148, 21, 190, 148, 21, 195, 148, 21, 199, 148, 21, 196,
- 148, 21, 201, 148, 244, 10, 21, 210, 87, 31, 226, 241, 224, 226, 64, 161,
- 148, 244, 10, 21, 123, 31, 226, 241, 224, 226, 64, 161, 148, 244, 10, 21,
- 113, 31, 226, 241, 224, 226, 64, 161, 148, 244, 10, 21, 134, 31, 226,
- 241, 224, 226, 64, 161, 148, 244, 10, 21, 123, 31, 245, 50, 224, 226, 64,
- 161, 148, 244, 10, 21, 113, 31, 245, 50, 224, 226, 64, 161, 148, 244, 10,
- 21, 134, 31, 245, 50, 224, 226, 64, 161, 148, 5, 215, 84, 165, 5, 254,
- 83, 165, 5, 213, 147, 165, 1, 61, 165, 1, 255, 82, 165, 1, 74, 165, 1,
- 236, 40, 165, 1, 69, 165, 1, 214, 118, 165, 1, 149, 153, 165, 1, 149,
- 156, 165, 1, 76, 165, 1, 245, 217, 165, 1, 254, 210, 165, 1, 78, 165, 1,
- 226, 187, 165, 1, 253, 200, 165, 1, 176, 165, 1, 234, 138, 165, 1, 243,
- 142, 165, 1, 243, 0, 165, 1, 229, 82, 165, 1, 251, 41, 165, 1, 250, 165,
- 165, 1, 235, 147, 165, 1, 235, 120, 165, 1, 227, 169, 165, 1, 215, 157,
- 165, 1, 215, 145, 165, 1, 248, 143, 165, 1, 248, 127, 165, 1, 228, 115,
- 165, 1, 217, 106, 165, 1, 216, 209, 165, 1, 248, 229, 165, 1, 248, 33,
- 165, 1, 198, 165, 1, 191, 165, 1, 225, 150, 165, 1, 252, 199, 165, 1,
- 252, 26, 165, 1, 186, 165, 1, 192, 165, 1, 205, 165, 1, 222, 181, 165, 1,
- 233, 141, 165, 1, 232, 190, 165, 1, 214, 27, 165, 1, 220, 104, 165, 1,
- 218, 225, 165, 1, 206, 165, 1, 162, 165, 5, 227, 209, 165, 5, 253, 183,
- 165, 25, 5, 255, 82, 165, 25, 5, 74, 165, 25, 5, 236, 40, 165, 25, 5, 69,
- 165, 25, 5, 214, 118, 165, 25, 5, 149, 153, 165, 25, 5, 149, 222, 182,
- 165, 25, 5, 76, 165, 25, 5, 245, 217, 165, 25, 5, 254, 210, 165, 25, 5,
- 78, 165, 25, 5, 226, 187, 165, 25, 5, 253, 200, 165, 5, 213, 152, 165,
- 233, 29, 79, 165, 254, 211, 233, 29, 79, 165, 1, 244, 204, 165, 1, 149,
- 222, 182, 165, 1, 149, 232, 191, 165, 25, 5, 149, 156, 165, 25, 5, 149,
- 232, 191, 165, 21, 210, 86, 165, 21, 111, 165, 21, 105, 165, 21, 158,
- 165, 21, 161, 165, 21, 190, 165, 21, 195, 165, 21, 199, 165, 21, 196,
- 165, 21, 201, 165, 5, 235, 108, 165, 5, 214, 161, 136, 5, 254, 83, 136,
- 5, 213, 147, 136, 1, 61, 136, 1, 255, 82, 136, 1, 74, 136, 1, 236, 40,
- 136, 1, 69, 136, 1, 214, 118, 136, 1, 149, 153, 136, 1, 149, 156, 136, 1,
- 76, 136, 1, 245, 217, 136, 1, 254, 210, 136, 1, 78, 136, 1, 226, 187,
- 136, 1, 253, 200, 136, 1, 176, 136, 1, 234, 138, 136, 1, 243, 142, 136,
- 1, 243, 0, 136, 1, 229, 82, 136, 1, 251, 41, 136, 1, 250, 165, 136, 1,
- 235, 147, 136, 1, 235, 120, 136, 1, 227, 169, 136, 1, 215, 157, 136, 1,
- 215, 145, 136, 1, 248, 143, 136, 1, 248, 127, 136, 1, 228, 115, 136, 1,
- 217, 106, 136, 1, 216, 209, 136, 1, 248, 229, 136, 1, 248, 33, 136, 1,
- 198, 136, 1, 228, 97, 136, 1, 191, 136, 1, 225, 150, 136, 1, 252, 199,
- 136, 1, 252, 26, 136, 1, 186, 136, 1, 192, 136, 1, 205, 136, 1, 222, 181,
- 136, 1, 233, 141, 136, 1, 232, 190, 136, 1, 232, 181, 136, 1, 214, 27,
- 136, 1, 220, 104, 136, 1, 218, 225, 136, 1, 206, 136, 1, 162, 136, 1,
- 215, 126, 136, 5, 253, 183, 136, 25, 5, 255, 82, 136, 25, 5, 74, 136, 25,
- 5, 236, 40, 136, 25, 5, 69, 136, 25, 5, 214, 118, 136, 25, 5, 149, 153,
- 136, 25, 5, 149, 222, 182, 136, 25, 5, 76, 136, 25, 5, 245, 217, 136, 25,
- 5, 254, 210, 136, 25, 5, 78, 136, 25, 5, 226, 187, 136, 25, 5, 253, 200,
- 136, 5, 213, 152, 136, 1, 59, 223, 76, 136, 253, 201, 233, 29, 79, 136,
- 1, 149, 222, 182, 136, 1, 149, 232, 191, 136, 25, 5, 149, 156, 136, 25,
- 5, 149, 232, 191, 136, 21, 210, 86, 136, 21, 111, 136, 21, 105, 136, 21,
- 158, 136, 21, 161, 136, 21, 190, 136, 21, 195, 136, 21, 199, 136, 21,
- 196, 136, 21, 201, 136, 54, 216, 248, 136, 54, 123, 240, 217, 136, 54,
- 123, 216, 148, 136, 244, 10, 123, 224, 24, 136, 244, 10, 123, 242, 34,
- 136, 244, 10, 134, 224, 22, 136, 248, 158, 79, 136, 1, 250, 107, 228,
- 116, 136, 1, 250, 107, 230, 30, 136, 1, 250, 107, 222, 182, 136, 1, 250,
- 107, 156, 136, 1, 250, 107, 232, 191, 136, 1, 250, 107, 235, 29, 175, 5,
- 254, 82, 175, 5, 213, 146, 175, 1, 253, 173, 175, 1, 255, 36, 175, 1,
- 254, 232, 175, 1, 254, 247, 175, 1, 235, 157, 175, 1, 236, 39, 175, 1,
- 214, 110, 175, 1, 214, 112, 175, 1, 235, 180, 175, 1, 235, 181, 175, 1,
- 236, 25, 175, 1, 236, 27, 175, 1, 245, 25, 175, 1, 245, 212, 175, 1, 254,
- 197, 175, 1, 226, 112, 175, 1, 226, 181, 175, 1, 253, 186, 175, 1, 254,
- 154, 234, 193, 175, 1, 231, 214, 234, 193, 175, 1, 254, 154, 243, 89,
- 175, 1, 231, 214, 243, 89, 175, 1, 234, 235, 229, 227, 175, 1, 221, 238,
- 243, 89, 175, 1, 254, 154, 250, 224, 175, 1, 231, 214, 250, 224, 175, 1,
- 254, 154, 235, 133, 175, 1, 231, 214, 235, 133, 175, 1, 217, 99, 229,
- 227, 175, 1, 217, 99, 221, 237, 229, 228, 175, 1, 221, 238, 235, 133,
- 175, 1, 254, 154, 215, 153, 175, 1, 231, 214, 215, 153, 175, 1, 254, 154,
- 248, 134, 175, 1, 231, 214, 248, 134, 175, 1, 230, 58, 229, 185, 175, 1,
- 221, 238, 248, 134, 175, 1, 254, 154, 217, 31, 175, 1, 231, 214, 217, 31,
- 175, 1, 254, 154, 248, 152, 175, 1, 231, 214, 248, 152, 175, 1, 248, 182,
- 229, 185, 175, 1, 221, 238, 248, 152, 175, 1, 254, 154, 225, 232, 175, 1,
- 231, 214, 225, 232, 175, 1, 254, 154, 252, 120, 175, 1, 231, 214, 252,
- 120, 175, 1, 231, 136, 175, 1, 254, 139, 252, 120, 175, 1, 211, 51, 175,
- 1, 223, 136, 175, 1, 248, 182, 233, 73, 175, 1, 214, 1, 175, 1, 217, 99,
- 221, 212, 175, 1, 230, 58, 221, 212, 175, 1, 248, 182, 221, 212, 175, 1,
- 241, 249, 175, 1, 230, 58, 233, 73, 175, 1, 244, 164, 175, 5, 254, 186,
- 175, 25, 5, 254, 242, 175, 25, 5, 234, 161, 254, 249, 175, 25, 5, 247,
- 236, 254, 249, 175, 25, 5, 234, 161, 235, 177, 175, 25, 5, 247, 236, 235,
- 177, 175, 25, 5, 234, 161, 226, 92, 175, 25, 5, 247, 236, 226, 92, 175,
- 25, 5, 243, 131, 175, 25, 5, 234, 21, 175, 25, 5, 247, 236, 234, 21, 175,
- 25, 5, 234, 23, 248, 75, 175, 25, 5, 234, 22, 242, 54, 254, 242, 175, 25,
- 5, 234, 22, 242, 54, 247, 236, 254, 242, 175, 25, 5, 234, 22, 242, 54,
- 243, 88, 175, 25, 5, 243, 88, 175, 25, 5, 247, 236, 243, 131, 175, 25, 5,
- 247, 236, 243, 88, 175, 224, 144, 233, 213, 168, 135, 234, 35, 234, 252,
- 168, 135, 234, 112, 234, 134, 168, 135, 234, 112, 234, 105, 168, 135,
- 234, 112, 234, 101, 168, 135, 234, 112, 234, 109, 168, 135, 234, 112,
- 223, 157, 168, 135, 229, 10, 228, 253, 168, 135, 250, 95, 250, 155, 168,
- 135, 250, 95, 250, 103, 168, 135, 250, 95, 250, 154, 168, 135, 219, 61,
- 219, 60, 168, 135, 250, 95, 250, 91, 168, 135, 210, 245, 210, 252, 168,
- 135, 247, 154, 250, 162, 168, 135, 216, 43, 225, 242, 168, 135, 216, 158,
- 216, 201, 168, 135, 216, 158, 229, 206, 168, 135, 216, 158, 225, 114,
- 168, 135, 228, 80, 229, 103, 168, 135, 247, 154, 248, 76, 168, 135, 216,
- 43, 217, 56, 168, 135, 216, 158, 216, 132, 168, 135, 216, 158, 216, 205,
- 168, 135, 216, 158, 216, 155, 168, 135, 228, 80, 227, 242, 168, 135, 251,
- 214, 252, 172, 168, 135, 225, 20, 225, 45, 168, 135, 225, 125, 225, 116,
- 168, 135, 244, 52, 244, 204, 168, 135, 225, 125, 225, 144, 168, 135, 244,
- 52, 244, 181, 168, 135, 225, 125, 221, 249, 168, 135, 230, 167, 186, 168,
- 135, 210, 245, 211, 79, 168, 135, 222, 214, 222, 141, 168, 135, 222, 142,
- 168, 135, 232, 163, 232, 212, 168, 135, 232, 103, 168, 135, 211, 228,
- 212, 61, 168, 135, 219, 61, 222, 8, 168, 135, 219, 61, 222, 116, 168,
- 135, 219, 61, 218, 83, 168, 135, 241, 76, 241, 166, 168, 135, 232, 163,
- 250, 76, 168, 135, 144, 254, 123, 168, 135, 241, 76, 228, 75, 168, 135,
- 226, 72, 168, 135, 221, 232, 61, 168, 135, 231, 209, 242, 24, 168, 135,
- 221, 232, 255, 82, 168, 135, 221, 232, 254, 144, 168, 135, 221, 232, 74,
- 168, 135, 221, 232, 236, 40, 168, 135, 221, 232, 214, 214, 168, 135, 221,
- 232, 214, 212, 168, 135, 221, 232, 69, 168, 135, 221, 232, 214, 118, 168,
- 135, 225, 127, 168, 249, 106, 16, 252, 173, 168, 135, 221, 232, 76, 168,
- 135, 221, 232, 254, 252, 168, 135, 221, 232, 78, 168, 135, 221, 232, 254,
- 211, 231, 203, 168, 135, 221, 232, 254, 211, 231, 204, 168, 135, 233,
- 112, 168, 135, 231, 200, 168, 135, 231, 201, 168, 135, 231, 209, 245,
- 188, 168, 135, 231, 209, 216, 157, 168, 135, 231, 209, 215, 229, 168,
- 135, 231, 209, 250, 143, 168, 135, 216, 199, 168, 135, 228, 210, 168,
- 135, 211, 73, 168, 135, 244, 43, 168, 21, 210, 86, 168, 21, 111, 168, 21,
- 105, 168, 21, 158, 168, 21, 161, 168, 21, 190, 168, 21, 195, 168, 21,
- 199, 168, 21, 196, 168, 21, 201, 168, 135, 254, 119, 168, 135, 234, 110,
- 209, 209, 1, 234, 34, 209, 209, 1, 234, 112, 218, 36, 209, 209, 1, 234,
- 112, 217, 63, 209, 209, 1, 229, 9, 209, 209, 1, 249, 246, 209, 209, 1,
- 219, 61, 217, 63, 209, 209, 1, 227, 138, 209, 209, 1, 247, 153, 209, 209,
- 1, 112, 209, 209, 1, 216, 158, 218, 36, 209, 209, 1, 216, 158, 217, 63,
- 209, 209, 1, 228, 79, 209, 209, 1, 251, 213, 209, 209, 1, 225, 19, 209,
- 209, 1, 225, 125, 218, 36, 209, 209, 1, 244, 52, 217, 63, 209, 209, 1,
- 225, 125, 217, 63, 209, 209, 1, 244, 52, 218, 36, 209, 209, 1, 230, 166,
- 209, 209, 1, 210, 244, 209, 209, 1, 232, 163, 232, 212, 209, 209, 1, 232,
- 163, 232, 127, 209, 209, 1, 211, 227, 209, 209, 1, 219, 61, 218, 36, 209,
- 209, 1, 241, 76, 218, 36, 209, 209, 1, 78, 209, 209, 1, 241, 76, 217, 63,
- 209, 209, 245, 171, 209, 209, 25, 5, 61, 209, 209, 25, 5, 231, 209, 234,
- 240, 209, 209, 25, 5, 255, 82, 209, 209, 25, 5, 254, 144, 209, 209, 25,
- 5, 74, 209, 209, 25, 5, 236, 40, 209, 209, 25, 5, 211, 117, 209, 209, 25,
- 5, 210, 169, 209, 209, 25, 5, 69, 209, 209, 25, 5, 214, 118, 209, 209,
- 25, 5, 231, 209, 234, 19, 209, 209, 220, 147, 5, 232, 162, 209, 209, 220,
- 147, 5, 227, 138, 209, 209, 25, 5, 76, 209, 209, 25, 5, 245, 203, 209,
- 209, 25, 5, 78, 209, 209, 25, 5, 253, 175, 209, 209, 25, 5, 254, 210,
- 209, 209, 234, 35, 233, 141, 209, 209, 138, 231, 209, 245, 188, 209, 209,
- 138, 231, 209, 216, 157, 209, 209, 138, 231, 209, 216, 118, 209, 209,
- 138, 231, 209, 250, 231, 209, 209, 251, 12, 79, 209, 209, 228, 219, 209,
- 209, 21, 210, 86, 209, 209, 21, 111, 209, 209, 21, 105, 209, 209, 21,
- 158, 209, 209, 21, 161, 209, 209, 21, 190, 209, 209, 21, 195, 209, 209,
- 21, 199, 209, 209, 21, 196, 209, 209, 21, 201, 209, 209, 241, 76, 228,
- 79, 209, 209, 241, 76, 230, 166, 209, 209, 1, 234, 113, 242, 181, 209,
- 209, 1, 234, 113, 227, 138, 63, 3, 226, 208, 63, 164, 242, 122, 211, 0,
- 230, 253, 215, 190, 61, 63, 164, 242, 122, 211, 0, 230, 253, 255, 168,
- 222, 218, 252, 85, 186, 63, 164, 242, 122, 211, 0, 230, 253, 255, 168,
- 242, 122, 215, 174, 186, 63, 164, 65, 211, 0, 230, 253, 231, 98, 186, 63,
- 164, 250, 4, 211, 0, 230, 253, 220, 111, 186, 63, 164, 250, 247, 211, 0,
- 230, 253, 225, 115, 220, 98, 186, 63, 164, 211, 0, 230, 253, 215, 174,
- 220, 98, 186, 63, 164, 221, 210, 220, 97, 63, 164, 251, 136, 211, 0, 230,
- 252, 63, 164, 251, 231, 220, 5, 211, 0, 230, 252, 63, 164, 235, 204, 215,
- 173, 63, 164, 248, 69, 215, 174, 251, 135, 63, 164, 220, 97, 63, 164,
- 227, 143, 220, 97, 63, 164, 215, 174, 220, 97, 63, 164, 227, 143, 215,
- 174, 220, 97, 63, 164, 222, 239, 250, 130, 218, 238, 220, 97, 63, 164,
- 223, 45, 242, 153, 220, 97, 63, 164, 250, 247, 255, 172, 222, 146, 231,
- 97, 200, 251, 15, 63, 164, 242, 122, 215, 173, 63, 232, 150, 5, 250, 163,
- 222, 145, 63, 232, 150, 5, 233, 2, 222, 145, 63, 253, 220, 5, 220, 107,
- 243, 72, 255, 173, 222, 145, 63, 253, 220, 5, 255, 170, 191, 63, 253,
- 220, 5, 221, 184, 215, 169, 63, 5, 223, 133, 247, 167, 243, 71, 63, 5,
- 223, 133, 247, 167, 242, 183, 63, 5, 223, 133, 247, 167, 242, 123, 63, 5,
- 223, 133, 229, 224, 243, 71, 63, 5, 223, 133, 229, 224, 242, 183, 63, 5,
- 223, 133, 247, 167, 223, 133, 229, 223, 63, 21, 210, 86, 63, 21, 111, 63,
- 21, 105, 63, 21, 158, 63, 21, 161, 63, 21, 190, 63, 21, 195, 63, 21, 199,
- 63, 21, 196, 63, 21, 201, 63, 21, 163, 111, 63, 21, 163, 105, 63, 21,
- 163, 158, 63, 21, 163, 161, 63, 21, 163, 190, 63, 21, 163, 195, 63, 21,
- 163, 199, 63, 21, 163, 196, 63, 21, 163, 201, 63, 21, 163, 210, 86, 63,
- 164, 251, 138, 222, 145, 63, 164, 229, 73, 251, 76, 227, 153, 210, 25,
- 63, 164, 250, 247, 255, 172, 222, 146, 251, 77, 230, 207, 251, 15, 63,
- 164, 229, 73, 251, 76, 220, 108, 222, 145, 63, 164, 250, 140, 230, 252,
- 63, 164, 215, 185, 255, 169, 63, 164, 242, 107, 222, 146, 242, 70, 63,
- 164, 242, 107, 222, 146, 242, 76, 63, 164, 254, 124, 234, 129, 242, 70,
- 63, 164, 254, 124, 234, 129, 242, 76, 63, 5, 211, 65, 215, 172, 63, 5,
- 231, 172, 215, 172, 63, 1, 176, 63, 1, 234, 138, 63, 1, 243, 142, 63, 1,
- 243, 0, 63, 1, 229, 82, 63, 1, 251, 41, 63, 1, 250, 165, 63, 1, 235, 147,
- 63, 1, 227, 169, 63, 1, 215, 157, 63, 1, 215, 145, 63, 1, 248, 143, 63,
- 1, 248, 127, 63, 1, 228, 115, 63, 1, 217, 106, 63, 1, 216, 209, 63, 1,
- 248, 229, 63, 1, 248, 33, 63, 1, 198, 63, 1, 191, 63, 1, 225, 150, 63, 1,
- 252, 199, 63, 1, 252, 26, 63, 1, 186, 63, 1, 215, 184, 63, 1, 215, 176,
- 63, 1, 246, 46, 63, 1, 246, 41, 63, 1, 212, 65, 63, 1, 210, 82, 63, 1,
- 210, 116, 63, 1, 255, 175, 63, 1, 192, 63, 1, 205, 63, 1, 233, 141, 63,
- 1, 220, 104, 63, 1, 218, 225, 63, 1, 206, 63, 1, 162, 63, 1, 61, 63, 1,
- 233, 237, 63, 1, 244, 85, 205, 63, 1, 234, 52, 63, 1, 222, 181, 63, 25,
- 5, 255, 82, 63, 25, 5, 74, 63, 25, 5, 236, 40, 63, 25, 5, 69, 63, 25, 5,
- 214, 118, 63, 25, 5, 149, 153, 63, 25, 5, 149, 222, 182, 63, 25, 5, 149,
- 156, 63, 25, 5, 149, 232, 191, 63, 25, 5, 76, 63, 25, 5, 245, 217, 63,
- 25, 5, 78, 63, 25, 5, 226, 187, 63, 5, 222, 224, 218, 85, 229, 83, 222,
- 213, 63, 5, 222, 218, 252, 84, 63, 25, 5, 223, 52, 74, 63, 25, 5, 223,
- 52, 236, 40, 63, 5, 227, 153, 210, 26, 229, 231, 248, 229, 63, 5, 219,
- 73, 233, 66, 63, 164, 242, 36, 63, 164, 226, 61, 63, 5, 233, 69, 222,
- 145, 63, 5, 211, 70, 222, 145, 63, 5, 233, 70, 215, 185, 251, 15, 63, 5,
- 231, 100, 251, 15, 63, 5, 242, 126, 251, 16, 223, 43, 63, 5, 242, 126,
- 231, 90, 223, 43, 63, 5, 235, 200, 231, 100, 251, 15, 63, 218, 74, 5,
- 233, 70, 215, 185, 251, 15, 63, 218, 74, 5, 231, 100, 251, 15, 63, 218,
- 74, 5, 235, 200, 231, 100, 251, 15, 63, 218, 74, 1, 176, 63, 218, 74, 1,
- 234, 138, 63, 218, 74, 1, 243, 142, 63, 218, 74, 1, 243, 0, 63, 218, 74,
- 1, 229, 82, 63, 218, 74, 1, 251, 41, 63, 218, 74, 1, 250, 165, 63, 218,
- 74, 1, 235, 147, 63, 218, 74, 1, 227, 169, 63, 218, 74, 1, 215, 157, 63,
- 218, 74, 1, 215, 145, 63, 218, 74, 1, 248, 143, 63, 218, 74, 1, 248, 127,
- 63, 218, 74, 1, 228, 115, 63, 218, 74, 1, 217, 106, 63, 218, 74, 1, 216,
- 209, 63, 218, 74, 1, 248, 229, 63, 218, 74, 1, 248, 33, 63, 218, 74, 1,
- 198, 63, 218, 74, 1, 191, 63, 218, 74, 1, 225, 150, 63, 218, 74, 1, 252,
- 199, 63, 218, 74, 1, 252, 26, 63, 218, 74, 1, 186, 63, 218, 74, 1, 215,
- 184, 63, 218, 74, 1, 215, 176, 63, 218, 74, 1, 246, 46, 63, 218, 74, 1,
- 246, 41, 63, 218, 74, 1, 212, 65, 63, 218, 74, 1, 210, 82, 63, 218, 74,
- 1, 210, 116, 63, 218, 74, 1, 255, 175, 63, 218, 74, 1, 192, 63, 218, 74,
- 1, 205, 63, 218, 74, 1, 233, 141, 63, 218, 74, 1, 220, 104, 63, 218, 74,
- 1, 218, 225, 63, 218, 74, 1, 206, 63, 218, 74, 1, 162, 63, 218, 74, 1,
- 61, 63, 218, 74, 1, 233, 237, 63, 218, 74, 1, 244, 85, 212, 65, 63, 218,
- 74, 1, 244, 85, 192, 63, 218, 74, 1, 244, 85, 205, 63, 233, 224, 222,
- 143, 234, 138, 63, 233, 224, 222, 143, 234, 139, 251, 77, 230, 207, 251,
- 15, 63, 251, 4, 5, 114, 252, 78, 63, 251, 4, 5, 193, 252, 78, 63, 251, 4,
- 5, 251, 5, 217, 21, 63, 251, 4, 5, 221, 209, 255, 174, 63, 16, 246, 99,
- 251, 133, 63, 16, 223, 132, 222, 225, 63, 16, 226, 81, 243, 70, 63, 16,
- 223, 132, 222, 226, 223, 45, 242, 152, 63, 16, 225, 115, 191, 63, 16,
- 228, 64, 251, 133, 63, 16, 228, 64, 251, 134, 227, 143, 255, 171, 63, 16,
- 228, 64, 251, 134, 242, 124, 255, 171, 63, 16, 228, 64, 251, 134, 251,
- 77, 255, 171, 63, 5, 223, 133, 229, 224, 223, 133, 247, 166, 63, 5, 223,
- 133, 229, 224, 242, 123, 63, 164, 251, 137, 220, 5, 242, 222, 230, 253,
- 223, 44, 63, 164, 230, 168, 211, 0, 242, 222, 230, 253, 223, 44, 63, 164,
- 227, 143, 215, 173, 63, 164, 65, 251, 160, 222, 215, 211, 0, 230, 253,
- 231, 98, 186, 63, 164, 250, 4, 251, 160, 222, 215, 211, 0, 230, 253, 220,
- 111, 186, 222, 253, 218, 0, 50, 233, 51, 218, 0, 50, 222, 253, 218, 0, 5,
- 2, 247, 126, 233, 51, 218, 0, 5, 2, 247, 126, 63, 164, 233, 61, 231, 101,
- 222, 145, 63, 164, 215, 251, 231, 101, 222, 145, 68, 1, 176, 68, 1, 234,
- 138, 68, 1, 243, 142, 68, 1, 243, 0, 68, 1, 229, 82, 68, 1, 251, 41, 68,
- 1, 250, 165, 68, 1, 235, 147, 68, 1, 235, 120, 68, 1, 227, 169, 68, 1,
- 228, 81, 68, 1, 215, 157, 68, 1, 215, 145, 68, 1, 248, 143, 68, 1, 248,
- 127, 68, 1, 228, 115, 68, 1, 217, 106, 68, 1, 216, 209, 68, 1, 248, 229,
- 68, 1, 248, 33, 68, 1, 198, 68, 1, 191, 68, 1, 225, 150, 68, 1, 252, 199,
- 68, 1, 252, 26, 68, 1, 186, 68, 1, 192, 68, 1, 205, 68, 1, 233, 141, 68,
- 1, 212, 65, 68, 1, 206, 68, 1, 162, 68, 1, 232, 190, 68, 1, 61, 68, 1,
- 220, 88, 61, 68, 1, 74, 68, 1, 236, 40, 68, 1, 69, 68, 1, 214, 118, 68,
- 1, 76, 68, 1, 230, 156, 76, 68, 1, 78, 68, 1, 253, 200, 68, 25, 5, 217,
- 65, 255, 82, 68, 25, 5, 255, 82, 68, 25, 5, 74, 68, 25, 5, 236, 40, 68,
- 25, 5, 69, 68, 25, 5, 214, 118, 68, 25, 5, 76, 68, 25, 5, 254, 210, 68,
- 25, 5, 230, 156, 236, 40, 68, 25, 5, 230, 156, 78, 68, 25, 5, 160, 48,
- 68, 5, 254, 83, 68, 5, 59, 51, 68, 5, 213, 147, 68, 5, 213, 152, 68, 5,
- 253, 243, 68, 117, 5, 147, 192, 68, 117, 5, 147, 205, 68, 117, 5, 147,
- 212, 65, 68, 117, 5, 147, 162, 68, 1, 242, 139, 206, 68, 21, 210, 86, 68,
- 21, 111, 68, 21, 105, 68, 21, 158, 68, 21, 161, 68, 21, 190, 68, 21, 195,
- 68, 21, 199, 68, 21, 196, 68, 21, 201, 68, 5, 232, 198, 221, 174, 68, 5,
- 221, 174, 68, 16, 232, 159, 68, 16, 249, 221, 68, 16, 254, 229, 68, 16,
- 243, 55, 68, 1, 220, 104, 68, 1, 218, 225, 68, 1, 149, 153, 68, 1, 149,
- 222, 182, 68, 1, 149, 156, 68, 1, 149, 232, 191, 68, 25, 5, 149, 153, 68,
- 25, 5, 149, 222, 182, 68, 25, 5, 149, 156, 68, 25, 5, 149, 232, 191, 68,
- 1, 230, 156, 229, 82, 68, 1, 230, 156, 235, 120, 68, 1, 230, 156, 252,
- 119, 68, 1, 230, 156, 252, 114, 68, 117, 5, 230, 156, 147, 198, 68, 117,
- 5, 230, 156, 147, 186, 68, 117, 5, 230, 156, 147, 233, 141, 68, 1, 220,
- 110, 234, 219, 220, 104, 68, 25, 5, 220, 110, 234, 219, 245, 63, 68, 138,
- 164, 220, 110, 234, 219, 241, 254, 68, 138, 164, 220, 110, 234, 219, 234,
- 189, 225, 124, 68, 1, 212, 7, 224, 111, 234, 219, 216, 209, 68, 1, 212,
- 7, 224, 111, 234, 219, 224, 117, 68, 25, 5, 212, 7, 224, 111, 234, 219,
- 245, 63, 68, 25, 5, 212, 7, 224, 111, 234, 219, 214, 214, 68, 5, 212, 7,
- 224, 111, 234, 219, 216, 30, 68, 5, 212, 7, 224, 111, 234, 219, 216, 29,
- 68, 5, 212, 7, 224, 111, 234, 219, 216, 28, 68, 5, 212, 7, 224, 111, 234,
- 219, 216, 27, 68, 5, 212, 7, 224, 111, 234, 219, 216, 26, 68, 1, 245,
- 227, 224, 111, 234, 219, 228, 115, 68, 1, 245, 227, 224, 111, 234, 219,
- 210, 176, 68, 1, 245, 227, 224, 111, 234, 219, 242, 224, 68, 25, 5, 243,
- 66, 234, 219, 74, 68, 25, 5, 234, 194, 226, 238, 68, 25, 5, 234, 194, 69,
- 68, 25, 5, 234, 194, 245, 217, 68, 1, 220, 88, 176, 68, 1, 220, 88, 234,
- 138, 68, 1, 220, 88, 243, 142, 68, 1, 220, 88, 251, 41, 68, 1, 220, 88,
- 210, 116, 68, 1, 220, 88, 227, 169, 68, 1, 220, 88, 248, 229, 68, 1, 220,
- 88, 198, 68, 1, 220, 88, 225, 150, 68, 1, 220, 88, 244, 204, 68, 1, 220,
- 88, 252, 199, 68, 1, 220, 88, 216, 209, 68, 1, 220, 88, 162, 68, 117, 5,
- 220, 88, 147, 212, 65, 68, 25, 5, 220, 88, 255, 82, 68, 25, 5, 220, 88,
- 76, 68, 25, 5, 220, 88, 160, 48, 68, 25, 5, 220, 88, 40, 211, 117, 68, 5,
- 220, 88, 216, 29, 68, 5, 220, 88, 216, 28, 68, 5, 220, 88, 216, 26, 68,
- 5, 220, 88, 216, 25, 68, 5, 220, 88, 249, 160, 216, 29, 68, 5, 220, 88,
- 249, 160, 216, 28, 68, 5, 220, 88, 249, 160, 245, 161, 216, 31, 68, 1,
- 222, 130, 226, 67, 244, 204, 68, 5, 222, 130, 226, 67, 216, 26, 68, 220,
- 88, 21, 210, 86, 68, 220, 88, 21, 111, 68, 220, 88, 21, 105, 68, 220, 88,
- 21, 158, 68, 220, 88, 21, 161, 68, 220, 88, 21, 190, 68, 220, 88, 21,
- 195, 68, 220, 88, 21, 199, 68, 220, 88, 21, 196, 68, 220, 88, 21, 201,
- 68, 5, 234, 132, 216, 30, 68, 5, 234, 132, 216, 28, 68, 25, 5, 254, 199,
- 61, 68, 25, 5, 254, 199, 254, 210, 68, 16, 220, 88, 111, 68, 16, 220, 88,
- 245, 38, 98, 6, 1, 254, 131, 98, 6, 1, 252, 160, 98, 6, 1, 243, 113, 98,
- 6, 1, 247, 136, 98, 6, 1, 245, 158, 98, 6, 1, 213, 160, 98, 6, 1, 210,
- 89, 98, 6, 1, 217, 61, 98, 6, 1, 236, 6, 98, 6, 1, 234, 240, 98, 6, 1,
- 233, 87, 98, 6, 1, 231, 190, 98, 6, 1, 229, 200, 98, 6, 1, 226, 200, 98,
- 6, 1, 226, 21, 98, 6, 1, 210, 78, 98, 6, 1, 223, 174, 98, 6, 1, 221, 245,
- 98, 6, 1, 217, 51, 98, 6, 1, 214, 190, 98, 6, 1, 225, 143, 98, 6, 1, 234,
- 127, 98, 6, 1, 242, 248, 98, 6, 1, 224, 76, 98, 6, 1, 220, 22, 98, 6, 1,
- 250, 105, 98, 6, 1, 251, 15, 98, 6, 1, 235, 106, 98, 6, 1, 250, 48, 98,
- 6, 1, 250, 151, 98, 6, 1, 211, 163, 98, 6, 1, 235, 117, 98, 6, 1, 242,
- 50, 98, 6, 1, 241, 245, 98, 6, 1, 241, 182, 98, 6, 1, 212, 22, 98, 6, 1,
- 242, 11, 98, 6, 1, 241, 72, 98, 6, 1, 210, 246, 98, 6, 1, 254, 241, 98,
- 1, 254, 131, 98, 1, 252, 160, 98, 1, 243, 113, 98, 1, 247, 136, 98, 1,
- 245, 158, 98, 1, 213, 160, 98, 1, 210, 89, 98, 1, 217, 61, 98, 1, 236, 6,
- 98, 1, 234, 240, 98, 1, 233, 87, 98, 1, 231, 190, 98, 1, 229, 200, 98, 1,
- 226, 200, 98, 1, 226, 21, 98, 1, 210, 78, 98, 1, 223, 174, 98, 1, 221,
- 245, 98, 1, 217, 51, 98, 1, 214, 190, 98, 1, 225, 143, 98, 1, 234, 127,
- 98, 1, 242, 248, 98, 1, 224, 76, 98, 1, 220, 22, 98, 1, 250, 105, 98, 1,
- 251, 15, 98, 1, 235, 106, 98, 1, 250, 48, 98, 1, 250, 151, 98, 1, 211,
- 163, 98, 1, 235, 117, 98, 1, 242, 50, 98, 1, 241, 245, 98, 1, 241, 182,
- 98, 1, 212, 22, 98, 1, 242, 11, 98, 1, 241, 72, 98, 1, 244, 129, 98, 1,
- 210, 246, 98, 1, 245, 173, 98, 1, 215, 94, 243, 113, 98, 1, 254, 205, 98,
- 226, 19, 220, 139, 58, 1, 98, 229, 200, 98, 1, 254, 241, 98, 1, 242, 10,
- 50, 98, 1, 233, 133, 50, 24, 100, 234, 64, 24, 100, 218, 217, 24, 100,
- 228, 231, 24, 100, 216, 102, 24, 100, 218, 206, 24, 100, 223, 29, 24,
- 100, 230, 222, 24, 100, 225, 98, 24, 100, 218, 214, 24, 100, 219, 150,
- 24, 100, 218, 211, 24, 100, 236, 63, 24, 100, 250, 54, 24, 100, 218, 221,
- 24, 100, 250, 114, 24, 100, 234, 116, 24, 100, 216, 174, 24, 100, 225,
- 134, 24, 100, 241, 179, 24, 100, 228, 227, 24, 100, 218, 215, 24, 100,
- 228, 221, 24, 100, 228, 225, 24, 100, 216, 99, 24, 100, 223, 17, 24, 100,
- 218, 213, 24, 100, 223, 27, 24, 100, 234, 224, 24, 100, 230, 215, 24,
- 100, 234, 227, 24, 100, 225, 93, 24, 100, 225, 91, 24, 100, 225, 79, 24,
- 100, 225, 87, 24, 100, 225, 85, 24, 100, 225, 82, 24, 100, 225, 84, 24,
- 100, 225, 81, 24, 100, 225, 86, 24, 100, 225, 96, 24, 100, 225, 97, 24,
- 100, 225, 80, 24, 100, 225, 90, 24, 100, 234, 225, 24, 100, 234, 223, 24,
- 100, 219, 143, 24, 100, 219, 141, 24, 100, 219, 133, 24, 100, 219, 136,
- 24, 100, 219, 142, 24, 100, 219, 138, 24, 100, 219, 137, 24, 100, 219,
- 135, 24, 100, 219, 146, 24, 100, 219, 148, 24, 100, 219, 149, 24, 100,
- 219, 144, 24, 100, 219, 134, 24, 100, 219, 139, 24, 100, 219, 147, 24,
- 100, 250, 98, 24, 100, 250, 96, 24, 100, 250, 176, 24, 100, 250, 174, 24,
- 100, 226, 36, 24, 100, 236, 58, 24, 100, 236, 49, 24, 100, 236, 57, 24,
- 100, 236, 54, 24, 100, 236, 52, 24, 100, 236, 56, 24, 100, 218, 218, 24,
- 100, 236, 61, 24, 100, 236, 62, 24, 100, 236, 50, 24, 100, 236, 55, 24,
- 100, 211, 26, 24, 100, 250, 53, 24, 100, 250, 99, 24, 100, 250, 97, 24,
- 100, 250, 177, 24, 100, 250, 175, 24, 100, 250, 112, 24, 100, 250, 113,
- 24, 100, 250, 100, 24, 100, 250, 178, 24, 100, 225, 132, 24, 100, 234,
- 226, 24, 100, 218, 219, 24, 100, 211, 32, 24, 100, 234, 55, 24, 100, 228,
- 223, 24, 100, 228, 229, 24, 100, 228, 228, 24, 100, 216, 96, 24, 100,
- 244, 111, 24, 143, 244, 111, 24, 143, 61, 24, 143, 254, 252, 24, 143,
- 192, 24, 143, 211, 92, 24, 143, 245, 125, 24, 143, 76, 24, 143, 211, 36,
- 24, 143, 211, 47, 24, 143, 78, 24, 143, 212, 65, 24, 143, 212, 62, 24,
- 143, 226, 238, 24, 143, 210, 244, 24, 143, 69, 24, 143, 212, 11, 24, 143,
- 212, 22, 24, 143, 211, 250, 24, 143, 210, 212, 24, 143, 245, 63, 24, 143,
- 211, 8, 24, 143, 74, 24, 143, 255, 166, 24, 143, 255, 165, 24, 143, 211,
- 106, 24, 143, 211, 104, 24, 143, 245, 123, 24, 143, 245, 122, 24, 143,
- 245, 124, 24, 143, 211, 35, 24, 143, 211, 34, 24, 143, 227, 88, 24, 143,
- 227, 89, 24, 143, 227, 82, 24, 143, 227, 87, 24, 143, 227, 85, 24, 143,
- 210, 238, 24, 143, 210, 237, 24, 143, 210, 236, 24, 143, 210, 239, 24,
- 143, 210, 240, 24, 143, 215, 30, 24, 143, 215, 29, 24, 143, 215, 27, 24,
- 143, 215, 24, 24, 143, 215, 25, 24, 143, 210, 211, 24, 143, 210, 208, 24,
- 143, 210, 209, 24, 143, 210, 203, 24, 143, 210, 204, 24, 143, 210, 205,
- 24, 143, 210, 207, 24, 143, 245, 57, 24, 143, 245, 59, 24, 143, 211, 7,
- 24, 143, 240, 160, 24, 143, 240, 152, 24, 143, 240, 155, 24, 143, 240,
- 153, 24, 143, 240, 157, 24, 143, 240, 159, 24, 143, 254, 42, 24, 143,
- 254, 39, 24, 143, 254, 37, 24, 143, 254, 38, 24, 143, 218, 222, 24, 143,
- 255, 167, 24, 143, 211, 105, 24, 143, 211, 33, 24, 143, 227, 84, 24, 143,
- 227, 83, 24, 90, 234, 64, 24, 90, 218, 217, 24, 90, 234, 57, 24, 90, 228,
- 231, 24, 90, 228, 229, 24, 90, 228, 228, 24, 90, 216, 102, 24, 90, 223,
- 29, 24, 90, 223, 24, 24, 90, 223, 21, 24, 90, 223, 14, 24, 90, 223, 9,
- 24, 90, 223, 4, 24, 90, 223, 15, 24, 90, 223, 27, 24, 90, 230, 222, 24,
- 90, 225, 98, 24, 90, 225, 87, 24, 90, 219, 150, 24, 90, 218, 211, 24, 90,
- 236, 63, 24, 90, 250, 54, 24, 90, 250, 114, 24, 90, 234, 116, 24, 90,
- 216, 174, 24, 90, 225, 134, 24, 90, 241, 179, 24, 90, 234, 58, 24, 90,
- 234, 56, 24, 90, 228, 227, 24, 90, 228, 221, 24, 90, 228, 223, 24, 90,
- 228, 226, 24, 90, 228, 222, 24, 90, 216, 99, 24, 90, 216, 96, 24, 90,
- 223, 22, 24, 90, 223, 17, 24, 90, 223, 3, 24, 90, 223, 2, 24, 90, 218,
- 213, 24, 90, 223, 19, 24, 90, 223, 18, 24, 90, 223, 11, 24, 90, 223, 13,
- 24, 90, 223, 26, 24, 90, 223, 6, 24, 90, 223, 16, 24, 90, 223, 25, 24,
- 90, 223, 1, 24, 90, 230, 218, 24, 90, 230, 213, 24, 90, 230, 215, 24, 90,
- 230, 212, 24, 90, 230, 210, 24, 90, 230, 216, 24, 90, 230, 221, 24, 90,
- 230, 219, 24, 90, 234, 227, 24, 90, 225, 89, 24, 90, 225, 90, 24, 90,
- 225, 95, 24, 90, 234, 225, 24, 90, 219, 143, 24, 90, 219, 133, 24, 90,
- 219, 136, 24, 90, 219, 138, 24, 90, 226, 36, 24, 90, 236, 58, 24, 90,
- 236, 51, 24, 90, 218, 218, 24, 90, 236, 59, 24, 90, 211, 26, 24, 90, 211,
- 22, 24, 90, 211, 23, 24, 90, 225, 132, 24, 90, 234, 226, 24, 90, 241,
- 177, 24, 90, 241, 175, 24, 90, 241, 178, 24, 90, 241, 176, 24, 90, 211,
- 32, 24, 90, 234, 60, 24, 90, 234, 59, 24, 90, 234, 63, 24, 90, 234, 61,
- 24, 90, 234, 62, 24, 90, 218, 215, 29, 3, 162, 29, 3, 240, 229, 29, 3,
- 241, 187, 29, 3, 242, 53, 29, 3, 241, 227, 29, 3, 241, 245, 29, 3, 241,
- 75, 29, 3, 241, 74, 29, 3, 233, 141, 29, 3, 232, 103, 29, 3, 232, 247,
- 29, 3, 233, 140, 29, 3, 233, 56, 29, 3, 233, 64, 29, 3, 232, 162, 29, 3,
- 232, 75, 29, 3, 241, 196, 29, 3, 241, 190, 29, 3, 241, 192, 29, 3, 241,
- 195, 29, 3, 241, 193, 29, 3, 241, 194, 29, 3, 241, 191, 29, 3, 241, 189,
- 29, 3, 186, 29, 3, 230, 107, 29, 3, 230, 235, 29, 3, 231, 242, 29, 3,
- 231, 85, 29, 3, 231, 96, 29, 3, 230, 166, 29, 3, 230, 47, 29, 3, 217,
- 164, 29, 3, 217, 158, 29, 3, 217, 160, 29, 3, 217, 163, 29, 3, 217, 161,
- 29, 3, 217, 162, 29, 3, 217, 159, 29, 3, 217, 157, 29, 3, 205, 29, 3,
- 222, 142, 29, 3, 223, 38, 29, 3, 223, 187, 29, 3, 223, 111, 29, 3, 223,
- 131, 29, 3, 222, 213, 29, 3, 222, 111, 29, 3, 206, 29, 3, 218, 84, 29, 3,
- 219, 193, 29, 3, 222, 33, 29, 3, 221, 172, 29, 3, 221, 183, 29, 3, 219,
- 60, 29, 3, 217, 254, 29, 3, 220, 104, 29, 3, 219, 227, 29, 3, 220, 34,
- 29, 3, 220, 100, 29, 3, 220, 63, 29, 3, 220, 65, 29, 3, 220, 9, 29, 3,
- 219, 210, 29, 3, 224, 91, 29, 3, 224, 33, 29, 3, 224, 56, 29, 3, 224, 90,
- 29, 3, 224, 71, 29, 3, 224, 72, 29, 3, 224, 45, 29, 3, 224, 44, 29, 3,
- 223, 245, 29, 3, 223, 241, 29, 3, 223, 244, 29, 3, 223, 242, 29, 3, 223,
- 243, 29, 3, 224, 68, 29, 3, 224, 62, 29, 3, 224, 64, 29, 3, 224, 67, 29,
- 3, 224, 65, 29, 3, 224, 66, 29, 3, 224, 63, 29, 3, 224, 61, 29, 3, 224,
- 57, 29, 3, 224, 60, 29, 3, 224, 58, 29, 3, 224, 59, 29, 3, 252, 199, 29,
- 3, 251, 133, 29, 3, 252, 14, 29, 3, 252, 197, 29, 3, 252, 74, 29, 3, 252,
- 83, 29, 3, 251, 213, 29, 3, 251, 91, 29, 3, 214, 27, 29, 3, 212, 116, 29,
- 3, 213, 176, 29, 3, 214, 26, 29, 3, 213, 250, 29, 3, 213, 255, 29, 3,
- 213, 138, 29, 3, 212, 107, 29, 3, 217, 106, 29, 3, 215, 119, 29, 3, 216,
- 118, 29, 3, 217, 102, 29, 3, 217, 12, 29, 3, 217, 23, 29, 3, 112, 29, 3,
- 215, 80, 29, 3, 251, 41, 29, 3, 249, 120, 29, 3, 250, 59, 29, 3, 251, 40,
- 29, 3, 250, 190, 29, 3, 250, 198, 29, 3, 249, 246, 29, 3, 249, 89, 29, 3,
- 211, 165, 29, 3, 211, 141, 29, 3, 211, 157, 29, 3, 211, 164, 29, 3, 211,
- 161, 29, 3, 211, 162, 29, 3, 211, 148, 29, 3, 211, 147, 29, 3, 211, 136,
- 29, 3, 211, 132, 29, 3, 211, 135, 29, 3, 211, 133, 29, 3, 211, 134, 29,
- 3, 198, 29, 3, 227, 242, 29, 3, 228, 238, 29, 3, 229, 230, 29, 3, 229,
- 108, 29, 3, 229, 112, 29, 3, 228, 79, 29, 3, 227, 178, 29, 3, 227, 169,
- 29, 3, 227, 132, 29, 3, 227, 152, 29, 3, 227, 168, 29, 3, 227, 159, 29,
- 3, 227, 160, 29, 3, 227, 138, 29, 3, 227, 123, 29, 3, 242, 187, 61, 29,
- 3, 242, 187, 69, 29, 3, 242, 187, 74, 29, 3, 242, 187, 255, 82, 29, 3,
- 242, 187, 245, 217, 29, 3, 242, 187, 76, 29, 3, 242, 187, 78, 29, 3, 242,
- 187, 212, 65, 29, 3, 176, 29, 3, 233, 223, 29, 3, 234, 98, 29, 3, 235,
- 16, 29, 3, 234, 187, 29, 3, 234, 188, 29, 3, 234, 34, 29, 3, 234, 33, 29,
- 3, 233, 188, 29, 3, 233, 182, 29, 3, 233, 187, 29, 3, 233, 183, 29, 3,
- 233, 184, 29, 3, 233, 177, 29, 3, 233, 171, 29, 3, 233, 173, 29, 3, 233,
- 176, 29, 3, 233, 174, 29, 3, 233, 175, 29, 3, 233, 172, 29, 3, 233, 170,
- 29, 3, 233, 166, 29, 3, 233, 169, 29, 3, 233, 167, 29, 3, 233, 168, 29,
- 3, 212, 65, 29, 3, 211, 195, 29, 3, 211, 250, 29, 3, 212, 64, 29, 3, 212,
- 17, 29, 3, 212, 22, 29, 3, 211, 227, 29, 3, 211, 226, 29, 3, 225, 142,
- 61, 29, 3, 225, 142, 69, 29, 3, 225, 142, 74, 29, 3, 225, 142, 255, 82,
- 29, 3, 225, 142, 245, 217, 29, 3, 225, 142, 76, 29, 3, 225, 142, 78, 29,
- 3, 210, 116, 29, 3, 210, 13, 29, 3, 210, 44, 29, 3, 210, 115, 29, 3, 210,
- 92, 29, 3, 210, 94, 29, 3, 210, 23, 29, 3, 210, 0, 29, 3, 210, 82, 29, 3,
- 210, 62, 29, 3, 210, 69, 29, 3, 210, 81, 29, 3, 210, 73, 29, 3, 210, 74,
- 29, 3, 210, 67, 29, 3, 210, 53, 29, 3, 192, 29, 3, 210, 212, 29, 3, 211,
- 8, 29, 3, 211, 103, 29, 3, 211, 44, 29, 3, 211, 47, 29, 3, 210, 244, 29,
- 3, 210, 235, 29, 3, 248, 229, 29, 3, 246, 86, 29, 3, 248, 11, 29, 3, 248,
- 228, 29, 3, 248, 85, 29, 3, 248, 98, 29, 3, 247, 153, 29, 3, 246, 55, 29,
- 3, 248, 143, 29, 3, 248, 108, 29, 3, 248, 120, 29, 3, 248, 142, 29, 3,
- 248, 130, 29, 3, 248, 131, 29, 3, 248, 113, 29, 3, 248, 99, 29, 3, 235,
- 147, 29, 3, 235, 57, 29, 3, 235, 114, 29, 3, 235, 146, 29, 3, 235, 130,
- 29, 3, 235, 132, 29, 3, 235, 74, 29, 3, 235, 37, 29, 3, 243, 142, 29, 3,
- 242, 120, 29, 3, 242, 221, 29, 3, 243, 139, 29, 3, 243, 62, 29, 3, 243,
- 69, 29, 3, 242, 181, 29, 3, 242, 180, 29, 3, 242, 85, 29, 3, 242, 81, 29,
- 3, 242, 84, 29, 3, 242, 82, 29, 3, 242, 83, 29, 3, 243, 36, 29, 3, 243,
- 16, 29, 3, 243, 26, 29, 3, 243, 35, 29, 3, 243, 30, 29, 3, 243, 31, 29,
- 3, 243, 20, 29, 3, 243, 5, 29, 3, 216, 209, 29, 3, 216, 137, 29, 3, 216,
- 176, 29, 3, 216, 208, 29, 3, 216, 195, 29, 3, 216, 196, 29, 3, 216, 157,
- 29, 3, 216, 129, 29, 3, 250, 165, 29, 3, 250, 77, 29, 3, 250, 118, 29, 3,
- 250, 164, 29, 3, 250, 136, 29, 3, 250, 139, 29, 3, 250, 94, 29, 3, 250,
- 66, 29, 3, 225, 150, 29, 3, 225, 117, 29, 3, 225, 136, 29, 3, 225, 149,
- 29, 3, 225, 138, 29, 3, 225, 139, 29, 3, 225, 124, 29, 3, 225, 113, 29,
- 3, 215, 184, 29, 3, 215, 164, 29, 3, 215, 168, 29, 3, 215, 183, 29, 3,
- 215, 178, 29, 3, 215, 179, 29, 3, 215, 167, 29, 3, 215, 162, 29, 3, 215,
- 39, 29, 3, 215, 31, 29, 3, 215, 35, 29, 3, 215, 38, 29, 3, 215, 36, 29,
- 3, 215, 37, 29, 3, 215, 33, 29, 3, 215, 32, 29, 3, 244, 204, 29, 3, 243,
- 241, 29, 3, 244, 129, 29, 3, 244, 203, 29, 3, 244, 155, 29, 3, 244, 162,
- 29, 3, 244, 51, 29, 3, 243, 220, 29, 3, 191, 29, 3, 224, 153, 29, 3, 225,
- 111, 29, 3, 226, 93, 29, 3, 225, 214, 29, 3, 225, 224, 29, 3, 225, 19,
- 29, 3, 224, 117, 29, 3, 222, 101, 29, 3, 230, 36, 29, 3, 243, 214, 29,
- 38, 243, 60, 22, 25, 233, 29, 79, 29, 38, 25, 233, 29, 79, 29, 38, 243,
- 60, 79, 29, 221, 175, 79, 29, 211, 208, 29, 243, 236, 218, 131, 29, 249,
- 227, 29, 220, 152, 29, 249, 234, 29, 224, 202, 249, 234, 29, 224, 16, 79,
- 29, 226, 19, 220, 139, 29, 21, 111, 29, 21, 105, 29, 21, 158, 29, 21,
- 161, 29, 21, 190, 29, 21, 195, 29, 21, 199, 29, 21, 196, 29, 21, 201, 29,
- 54, 216, 248, 29, 54, 215, 73, 29, 54, 216, 163, 29, 54, 244, 23, 29, 54,
- 244, 122, 29, 54, 219, 113, 29, 54, 220, 118, 29, 54, 245, 192, 29, 54,
- 228, 200, 29, 54, 240, 217, 29, 54, 216, 249, 216, 148, 29, 3, 221, 179,
- 230, 47, 29, 3, 230, 43, 29, 3, 230, 44, 29, 3, 230, 45, 29, 3, 221, 179,
- 251, 91, 29, 3, 251, 88, 29, 3, 251, 89, 29, 3, 251, 90, 29, 3, 221, 179,
- 243, 220, 29, 3, 243, 216, 29, 3, 243, 217, 29, 3, 243, 218, 29, 3, 221,
- 179, 224, 117, 29, 3, 224, 113, 29, 3, 224, 114, 29, 3, 224, 115, 29,
- 216, 32, 164, 210, 247, 29, 216, 32, 164, 248, 49, 29, 216, 32, 164, 222,
- 241, 29, 216, 32, 164, 219, 253, 222, 241, 29, 216, 32, 164, 247, 243,
- 29, 216, 32, 164, 234, 170, 29, 216, 32, 164, 250, 102, 29, 216, 32, 164,
- 241, 184, 29, 216, 32, 164, 248, 48, 29, 216, 32, 164, 233, 200, 169, 1,
- 61, 169, 1, 76, 169, 1, 74, 169, 1, 78, 169, 1, 69, 169, 1, 214, 105,
- 169, 1, 243, 142, 169, 1, 176, 169, 1, 243, 69, 169, 1, 242, 221, 169, 1,
- 242, 181, 169, 1, 242, 120, 169, 1, 242, 86, 169, 1, 162, 169, 1, 241,
- 245, 169, 1, 241, 187, 169, 1, 241, 75, 169, 1, 240, 229, 169, 1, 240,
- 208, 169, 1, 233, 141, 169, 1, 233, 64, 169, 1, 232, 247, 169, 1, 232,
- 162, 169, 1, 232, 103, 169, 1, 232, 76, 169, 1, 186, 169, 1, 231, 96,
- 169, 1, 230, 235, 169, 1, 230, 166, 169, 1, 230, 107, 169, 1, 198, 169,
- 1, 241, 97, 169, 1, 229, 218, 169, 1, 229, 112, 169, 1, 228, 238, 169, 1,
- 228, 79, 169, 1, 227, 242, 169, 1, 227, 180, 169, 1, 224, 32, 169, 1,
- 224, 19, 169, 1, 224, 12, 169, 1, 224, 4, 169, 1, 223, 249, 169, 1, 223,
- 247, 169, 1, 206, 169, 1, 222, 93, 169, 1, 221, 183, 169, 1, 219, 193,
- 169, 1, 219, 60, 169, 1, 218, 84, 169, 1, 218, 3, 169, 1, 248, 229, 169,
- 1, 217, 106, 169, 1, 248, 98, 169, 1, 217, 23, 169, 1, 248, 11, 169, 1,
- 216, 118, 169, 1, 247, 153, 169, 1, 246, 86, 169, 1, 246, 58, 169, 1,
- 247, 164, 169, 1, 216, 60, 169, 1, 216, 59, 169, 1, 216, 48, 169, 1, 216,
- 47, 169, 1, 216, 46, 169, 1, 216, 45, 169, 1, 215, 184, 169, 1, 215, 179,
- 169, 1, 215, 168, 169, 1, 215, 167, 169, 1, 215, 164, 169, 1, 215, 163,
- 169, 1, 212, 65, 169, 1, 212, 22, 169, 1, 211, 250, 169, 1, 211, 227,
- 169, 1, 211, 195, 169, 1, 211, 183, 169, 1, 192, 169, 1, 211, 47, 169, 1,
- 211, 8, 169, 1, 210, 244, 169, 1, 210, 212, 169, 1, 210, 177, 18, 19,
- 240, 175, 18, 19, 76, 18, 19, 255, 46, 18, 19, 74, 18, 19, 236, 40, 18,
- 19, 78, 18, 19, 226, 187, 18, 19, 211, 116, 226, 187, 18, 19, 73, 245,
- 217, 18, 19, 73, 74, 18, 19, 61, 18, 19, 255, 82, 18, 19, 212, 22, 18,
- 19, 159, 212, 22, 18, 19, 211, 250, 18, 19, 159, 211, 250, 18, 19, 211,
- 242, 18, 19, 159, 211, 242, 18, 19, 211, 227, 18, 19, 159, 211, 227, 18,
- 19, 211, 215, 18, 19, 159, 211, 215, 18, 19, 229, 195, 211, 215, 18, 19,
- 212, 65, 18, 19, 159, 212, 65, 18, 19, 212, 64, 18, 19, 159, 212, 64, 18,
- 19, 229, 195, 212, 64, 18, 19, 254, 210, 18, 19, 211, 116, 212, 98, 18,
- 19, 242, 187, 218, 131, 18, 19, 40, 142, 18, 19, 40, 242, 143, 18, 19,
- 40, 251, 183, 163, 222, 236, 18, 19, 40, 216, 15, 163, 222, 236, 18, 19,
- 40, 44, 163, 222, 236, 18, 19, 40, 222, 236, 18, 19, 40, 52, 142, 18, 19,
- 40, 52, 219, 253, 67, 218, 92, 18, 19, 40, 230, 229, 247, 128, 18, 19,
- 40, 219, 253, 203, 91, 18, 19, 40, 225, 25, 18, 19, 40, 124, 217, 88, 18,
- 19, 245, 158, 18, 19, 236, 6, 18, 19, 226, 200, 18, 19, 254, 131, 18, 19,
- 225, 224, 18, 19, 226, 91, 18, 19, 225, 111, 18, 19, 225, 74, 18, 19,
- 225, 19, 18, 19, 224, 252, 18, 19, 211, 116, 224, 252, 18, 19, 73, 241,
- 227, 18, 19, 73, 241, 187, 18, 19, 191, 18, 19, 226, 93, 18, 19, 224,
- 115, 18, 19, 159, 224, 115, 18, 19, 224, 113, 18, 19, 159, 224, 113, 18,
- 19, 224, 112, 18, 19, 159, 224, 112, 18, 19, 224, 110, 18, 19, 159, 224,
- 110, 18, 19, 224, 109, 18, 19, 159, 224, 109, 18, 19, 224, 117, 18, 19,
- 159, 224, 117, 18, 19, 224, 116, 18, 19, 159, 224, 116, 18, 19, 211, 116,
- 224, 116, 18, 19, 226, 109, 18, 19, 159, 226, 109, 18, 19, 73, 242, 67,
- 18, 19, 217, 23, 18, 19, 217, 100, 18, 19, 216, 118, 18, 19, 216, 104,
- 18, 19, 112, 18, 19, 216, 18, 18, 19, 211, 116, 216, 18, 18, 19, 73, 248,
- 85, 18, 19, 73, 248, 11, 18, 19, 217, 106, 18, 19, 217, 102, 18, 19, 215,
- 78, 18, 19, 159, 215, 78, 18, 19, 215, 62, 18, 19, 159, 215, 62, 18, 19,
- 215, 61, 18, 19, 159, 215, 61, 18, 19, 105, 18, 19, 159, 105, 18, 19,
- 215, 54, 18, 19, 159, 215, 54, 18, 19, 215, 80, 18, 19, 159, 215, 80, 18,
- 19, 215, 79, 18, 19, 159, 215, 79, 18, 19, 229, 195, 215, 79, 18, 19,
- 217, 153, 18, 19, 215, 152, 18, 19, 215, 136, 18, 19, 215, 134, 18, 19,
- 215, 157, 18, 19, 234, 188, 18, 19, 235, 13, 18, 19, 234, 98, 18, 19,
- 234, 89, 18, 19, 234, 34, 18, 19, 234, 16, 18, 19, 211, 116, 234, 16, 18,
- 19, 176, 18, 19, 235, 16, 18, 19, 233, 184, 18, 19, 159, 233, 184, 18,
- 19, 233, 182, 18, 19, 159, 233, 182, 18, 19, 233, 181, 18, 19, 159, 233,
- 181, 18, 19, 233, 180, 18, 19, 159, 233, 180, 18, 19, 233, 179, 18, 19,
- 159, 233, 179, 18, 19, 233, 188, 18, 19, 159, 233, 188, 18, 19, 233, 187,
- 18, 19, 159, 233, 187, 18, 19, 229, 195, 233, 187, 18, 19, 235, 29, 18,
- 19, 233, 189, 18, 19, 219, 29, 234, 182, 18, 19, 219, 29, 234, 90, 18,
- 19, 219, 29, 234, 29, 18, 19, 219, 29, 234, 254, 18, 19, 250, 198, 18,
- 19, 251, 39, 18, 19, 250, 59, 18, 19, 250, 49, 18, 19, 249, 246, 18, 19,
- 249, 182, 18, 19, 211, 116, 249, 182, 18, 19, 251, 41, 18, 19, 251, 40,
- 18, 19, 249, 87, 18, 19, 159, 249, 87, 18, 19, 249, 85, 18, 19, 159, 249,
- 85, 18, 19, 249, 84, 18, 19, 159, 249, 84, 18, 19, 249, 83, 18, 19, 159,
- 249, 83, 18, 19, 249, 82, 18, 19, 159, 249, 82, 18, 19, 249, 89, 18, 19,
- 159, 249, 89, 18, 19, 249, 88, 18, 19, 159, 249, 88, 18, 19, 229, 195,
- 249, 88, 18, 19, 251, 74, 18, 19, 221, 211, 216, 211, 18, 19, 231, 96,
- 18, 19, 231, 241, 18, 19, 230, 235, 18, 19, 230, 206, 18, 19, 230, 166,
- 18, 19, 230, 137, 18, 19, 211, 116, 230, 137, 18, 19, 186, 18, 19, 231,
- 242, 18, 19, 230, 45, 18, 19, 159, 230, 45, 18, 19, 230, 43, 18, 19, 159,
- 230, 43, 18, 19, 230, 42, 18, 19, 159, 230, 42, 18, 19, 230, 41, 18, 19,
- 159, 230, 41, 18, 19, 230, 40, 18, 19, 159, 230, 40, 18, 19, 230, 47, 18,
- 19, 159, 230, 47, 18, 19, 230, 46, 18, 19, 159, 230, 46, 18, 19, 229,
- 195, 230, 46, 18, 19, 194, 18, 19, 159, 194, 18, 19, 230, 239, 18, 19,
- 253, 213, 194, 18, 19, 221, 211, 194, 18, 19, 229, 112, 18, 19, 229, 229,
- 18, 19, 228, 238, 18, 19, 228, 213, 18, 19, 228, 79, 18, 19, 228, 69, 18,
- 19, 211, 116, 228, 69, 18, 19, 198, 18, 19, 229, 230, 18, 19, 227, 176,
- 18, 19, 159, 227, 176, 18, 19, 227, 178, 18, 19, 159, 227, 178, 18, 19,
- 227, 177, 18, 19, 159, 227, 177, 18, 19, 229, 195, 227, 177, 18, 19, 230,
- 30, 18, 19, 73, 229, 84, 18, 19, 228, 243, 18, 19, 233, 64, 18, 19, 233,
- 139, 18, 19, 232, 247, 18, 19, 232, 233, 18, 19, 232, 162, 18, 19, 232,
- 133, 18, 19, 211, 116, 232, 133, 18, 19, 233, 141, 18, 19, 233, 140, 18,
- 19, 232, 73, 18, 19, 159, 232, 73, 18, 19, 232, 72, 18, 19, 159, 232, 72,
- 18, 19, 232, 71, 18, 19, 159, 232, 71, 18, 19, 232, 70, 18, 19, 159, 232,
- 70, 18, 19, 232, 69, 18, 19, 159, 232, 69, 18, 19, 232, 75, 18, 19, 159,
- 232, 75, 18, 19, 232, 74, 18, 19, 159, 232, 74, 18, 19, 156, 18, 19, 159,
- 156, 18, 19, 147, 156, 18, 19, 221, 183, 18, 19, 222, 31, 18, 19, 219,
- 193, 18, 19, 219, 177, 18, 19, 219, 60, 18, 19, 219, 42, 18, 19, 211,
- 116, 219, 42, 18, 19, 206, 18, 19, 222, 33, 18, 19, 217, 250, 18, 19,
- 159, 217, 250, 18, 19, 217, 244, 18, 19, 159, 217, 244, 18, 19, 217, 243,
- 18, 19, 159, 217, 243, 18, 19, 217, 239, 18, 19, 159, 217, 239, 18, 19,
- 217, 238, 18, 19, 159, 217, 238, 18, 19, 217, 254, 18, 19, 159, 217, 254,
- 18, 19, 217, 253, 18, 19, 159, 217, 253, 18, 19, 229, 195, 217, 253, 18,
- 19, 222, 93, 18, 19, 253, 213, 222, 93, 18, 19, 217, 255, 18, 19, 251,
- 226, 222, 93, 18, 19, 230, 132, 219, 110, 18, 19, 229, 195, 219, 101, 18,
- 19, 229, 195, 222, 91, 18, 19, 229, 195, 218, 237, 18, 19, 229, 195, 218,
- 87, 18, 19, 229, 195, 219, 100, 18, 19, 229, 195, 221, 186, 18, 19, 220,
- 65, 18, 19, 220, 34, 18, 19, 220, 29, 18, 19, 220, 9, 18, 19, 220, 3, 18,
- 19, 220, 104, 18, 19, 220, 100, 18, 19, 219, 208, 18, 19, 159, 219, 208,
- 18, 19, 219, 207, 18, 19, 159, 219, 207, 18, 19, 219, 206, 18, 19, 159,
- 219, 206, 18, 19, 219, 205, 18, 19, 159, 219, 205, 18, 19, 219, 204, 18,
- 19, 159, 219, 204, 18, 19, 219, 210, 18, 19, 159, 219, 210, 18, 19, 219,
- 209, 18, 19, 159, 219, 209, 18, 19, 220, 106, 18, 19, 211, 47, 18, 19,
- 211, 101, 18, 19, 211, 8, 18, 19, 210, 255, 18, 19, 210, 244, 18, 19,
- 210, 229, 18, 19, 211, 116, 210, 229, 18, 19, 192, 18, 19, 211, 103, 18,
- 19, 210, 174, 18, 19, 159, 210, 174, 18, 19, 210, 173, 18, 19, 159, 210,
- 173, 18, 19, 210, 172, 18, 19, 159, 210, 172, 18, 19, 210, 171, 18, 19,
- 159, 210, 171, 18, 19, 210, 170, 18, 19, 159, 210, 170, 18, 19, 210, 176,
- 18, 19, 159, 210, 176, 18, 19, 210, 175, 18, 19, 159, 210, 175, 18, 19,
- 229, 195, 210, 175, 18, 19, 211, 117, 18, 19, 252, 12, 211, 117, 18, 19,
- 159, 211, 117, 18, 19, 221, 211, 211, 8, 18, 19, 223, 131, 18, 19, 223,
- 226, 223, 131, 18, 19, 159, 233, 64, 18, 19, 223, 186, 18, 19, 223, 38,
- 18, 19, 222, 242, 18, 19, 222, 213, 18, 19, 222, 199, 18, 19, 159, 232,
- 162, 18, 19, 205, 18, 19, 223, 187, 18, 19, 159, 233, 141, 18, 19, 222,
- 110, 18, 19, 159, 222, 110, 18, 19, 153, 18, 19, 159, 153, 18, 19, 147,
- 153, 18, 19, 244, 162, 18, 19, 244, 201, 18, 19, 244, 129, 18, 19, 244,
- 116, 18, 19, 244, 51, 18, 19, 244, 42, 18, 19, 244, 204, 18, 19, 244,
- 203, 18, 19, 243, 219, 18, 19, 159, 243, 219, 18, 19, 245, 14, 18, 19,
- 216, 196, 18, 19, 230, 28, 216, 196, 18, 19, 216, 176, 18, 19, 230, 28,
- 216, 176, 18, 19, 216, 172, 18, 19, 230, 28, 216, 172, 18, 19, 216, 157,
- 18, 19, 216, 154, 18, 19, 216, 209, 18, 19, 216, 208, 18, 19, 216, 128,
- 18, 19, 159, 216, 128, 18, 19, 216, 211, 18, 19, 215, 143, 18, 19, 215,
- 141, 18, 19, 215, 140, 18, 19, 215, 145, 18, 19, 215, 146, 18, 19, 215,
- 52, 18, 19, 215, 51, 18, 19, 215, 50, 18, 19, 215, 53, 18, 19, 227, 197,
- 241, 245, 18, 19, 227, 197, 241, 187, 18, 19, 227, 197, 241, 168, 18, 19,
- 227, 197, 241, 75, 18, 19, 227, 197, 241, 60, 18, 19, 227, 197, 162, 18,
- 19, 227, 197, 242, 53, 18, 19, 227, 197, 242, 67, 18, 19, 227, 196, 242,
- 67, 18, 19, 241, 161, 18, 19, 224, 87, 18, 19, 224, 56, 18, 19, 224, 51,
- 18, 19, 224, 45, 18, 19, 224, 40, 18, 19, 224, 91, 18, 19, 224, 90, 18,
- 19, 224, 99, 18, 19, 216, 56, 18, 19, 216, 54, 18, 19, 216, 53, 18, 19,
- 216, 57, 18, 19, 159, 223, 131, 18, 19, 159, 223, 38, 18, 19, 159, 222,
- 213, 18, 19, 159, 205, 18, 19, 229, 80, 18, 19, 229, 32, 18, 19, 229, 28,
- 18, 19, 229, 9, 18, 19, 229, 4, 18, 19, 229, 82, 18, 19, 229, 81, 18, 19,
- 229, 84, 18, 19, 228, 108, 18, 19, 221, 211, 220, 65, 18, 19, 221, 211,
- 220, 34, 18, 19, 221, 211, 220, 9, 18, 19, 221, 211, 220, 104, 18, 19,
- 211, 213, 216, 196, 18, 19, 211, 213, 216, 176, 18, 19, 211, 213, 216,
- 157, 18, 19, 211, 213, 216, 209, 18, 19, 211, 213, 216, 211, 18, 19, 232,
- 254, 18, 19, 232, 253, 18, 19, 232, 252, 18, 19, 232, 251, 18, 19, 233,
- 4, 18, 19, 233, 3, 18, 19, 233, 5, 18, 19, 216, 210, 216, 196, 18, 19,
- 216, 210, 216, 176, 18, 19, 216, 210, 216, 172, 18, 19, 216, 210, 216,
- 157, 18, 19, 216, 210, 216, 154, 18, 19, 216, 210, 216, 209, 18, 19, 216,
- 210, 216, 208, 18, 19, 216, 210, 216, 211, 18, 19, 254, 198, 253, 166,
- 18, 19, 251, 226, 76, 18, 19, 251, 226, 74, 18, 19, 251, 226, 78, 18, 19,
- 251, 226, 61, 18, 19, 251, 226, 212, 22, 18, 19, 251, 226, 211, 250, 18,
- 19, 251, 226, 211, 227, 18, 19, 251, 226, 212, 65, 18, 19, 251, 226, 229,
- 112, 18, 19, 251, 226, 228, 238, 18, 19, 251, 226, 228, 79, 18, 19, 251,
- 226, 198, 18, 19, 251, 226, 234, 188, 18, 19, 251, 226, 234, 98, 18, 19,
- 251, 226, 234, 34, 18, 19, 251, 226, 176, 18, 19, 221, 211, 241, 245, 18,
- 19, 221, 211, 241, 187, 18, 19, 221, 211, 241, 75, 18, 19, 221, 211, 162,
- 18, 19, 73, 242, 227, 18, 19, 73, 242, 231, 18, 19, 73, 242, 243, 18, 19,
- 73, 242, 242, 18, 19, 73, 242, 232, 18, 19, 73, 243, 0, 18, 19, 73, 222,
- 142, 18, 19, 73, 222, 213, 18, 19, 73, 223, 131, 18, 19, 73, 223, 111,
- 18, 19, 73, 223, 38, 18, 19, 73, 205, 18, 19, 73, 211, 195, 18, 19, 73,
- 211, 227, 18, 19, 73, 212, 22, 18, 19, 73, 212, 17, 18, 19, 73, 211, 250,
- 18, 19, 73, 212, 65, 18, 19, 73, 240, 201, 18, 19, 73, 240, 202, 18, 19,
- 73, 240, 205, 18, 19, 73, 240, 204, 18, 19, 73, 240, 203, 18, 19, 73,
- 240, 207, 18, 19, 73, 216, 137, 18, 19, 73, 216, 157, 18, 19, 73, 216,
- 196, 18, 19, 73, 216, 195, 18, 19, 73, 216, 176, 18, 19, 73, 216, 209,
- 18, 19, 73, 215, 124, 18, 19, 73, 215, 134, 18, 19, 73, 215, 152, 18, 19,
- 73, 215, 151, 18, 19, 73, 215, 136, 18, 19, 73, 215, 157, 18, 19, 73,
- 224, 153, 18, 19, 73, 225, 19, 18, 19, 73, 225, 224, 18, 19, 73, 225,
- 214, 18, 19, 73, 225, 111, 18, 19, 73, 191, 18, 19, 73, 226, 109, 18, 19,
- 73, 242, 120, 18, 19, 73, 242, 181, 18, 19, 73, 243, 69, 18, 19, 73, 243,
- 62, 18, 19, 73, 242, 221, 18, 19, 73, 243, 142, 18, 19, 73, 234, 106, 18,
- 19, 73, 234, 111, 18, 19, 73, 234, 125, 18, 19, 73, 234, 124, 18, 19, 73,
- 234, 118, 18, 19, 73, 234, 138, 18, 19, 73, 234, 47, 18, 19, 73, 234, 48,
- 18, 19, 73, 234, 51, 18, 19, 73, 234, 50, 18, 19, 73, 234, 49, 18, 19,
- 73, 234, 52, 18, 19, 73, 234, 53, 18, 19, 73, 227, 242, 18, 19, 73, 228,
- 79, 18, 19, 73, 229, 112, 18, 19, 73, 229, 108, 18, 19, 73, 228, 238, 18,
- 19, 73, 198, 18, 19, 73, 230, 107, 18, 19, 73, 230, 166, 18, 19, 73, 231,
- 96, 18, 19, 73, 231, 85, 18, 19, 73, 230, 235, 18, 19, 73, 186, 18, 19,
- 73, 210, 212, 18, 19, 73, 210, 244, 18, 19, 73, 211, 47, 18, 19, 73, 211,
- 44, 18, 19, 73, 211, 8, 18, 19, 73, 192, 18, 19, 73, 235, 57, 18, 19,
- 221, 211, 235, 57, 18, 19, 73, 235, 74, 18, 19, 73, 235, 132, 18, 19, 73,
- 235, 130, 18, 19, 73, 235, 114, 18, 19, 221, 211, 235, 114, 18, 19, 73,
- 235, 147, 18, 19, 73, 235, 87, 18, 19, 73, 235, 91, 18, 19, 73, 235, 101,
- 18, 19, 73, 235, 100, 18, 19, 73, 235, 99, 18, 19, 73, 235, 102, 18, 19,
- 73, 232, 103, 18, 19, 73, 232, 162, 18, 19, 73, 233, 64, 18, 19, 73, 233,
- 56, 18, 19, 73, 232, 247, 18, 19, 73, 233, 141, 18, 19, 73, 247, 157, 18,
- 19, 73, 247, 158, 18, 19, 73, 247, 163, 18, 19, 73, 247, 162, 18, 19, 73,
- 247, 159, 18, 19, 73, 247, 164, 18, 19, 73, 232, 250, 18, 19, 73, 232,
- 252, 18, 19, 73, 233, 0, 18, 19, 73, 232, 255, 18, 19, 73, 232, 254, 18,
- 19, 73, 233, 4, 18, 19, 73, 216, 51, 18, 19, 73, 216, 53, 18, 19, 73,
- 216, 56, 18, 19, 73, 216, 55, 18, 19, 73, 216, 54, 18, 19, 73, 216, 57,
- 18, 19, 73, 216, 46, 18, 19, 73, 216, 47, 18, 19, 73, 216, 59, 18, 19,
- 73, 216, 58, 18, 19, 73, 216, 48, 18, 19, 73, 216, 60, 18, 19, 73, 210,
- 13, 18, 19, 73, 210, 23, 18, 19, 73, 210, 94, 18, 19, 73, 210, 92, 18,
- 19, 73, 210, 44, 18, 19, 73, 210, 116, 18, 19, 73, 210, 159, 18, 19, 73,
- 65, 210, 159, 18, 19, 73, 246, 36, 18, 19, 73, 246, 37, 18, 19, 73, 246,
- 44, 18, 19, 73, 246, 43, 18, 19, 73, 246, 39, 18, 19, 73, 246, 46, 18,
- 19, 73, 218, 84, 18, 19, 73, 219, 60, 18, 19, 73, 221, 183, 18, 19, 73,
- 221, 172, 18, 19, 73, 219, 193, 18, 19, 73, 206, 18, 19, 73, 219, 227,
- 18, 19, 73, 220, 9, 18, 19, 73, 220, 65, 18, 19, 73, 220, 63, 18, 19, 73,
- 220, 34, 18, 19, 73, 220, 104, 18, 19, 73, 220, 106, 18, 19, 73, 215,
- 164, 18, 19, 73, 215, 167, 18, 19, 73, 215, 179, 18, 19, 73, 215, 178,
- 18, 19, 73, 215, 168, 18, 19, 73, 215, 184, 18, 19, 73, 250, 77, 18, 19,
- 73, 250, 94, 18, 19, 73, 250, 139, 18, 19, 73, 250, 136, 18, 19, 73, 250,
- 118, 18, 19, 73, 250, 165, 18, 19, 73, 215, 127, 18, 19, 73, 215, 128,
- 18, 19, 73, 215, 131, 18, 19, 73, 215, 130, 18, 19, 73, 215, 129, 18, 19,
- 73, 215, 132, 18, 19, 250, 119, 50, 18, 19, 243, 236, 218, 131, 18, 19,
- 224, 83, 18, 19, 229, 78, 18, 19, 228, 105, 18, 19, 228, 104, 18, 19,
- 228, 103, 18, 19, 228, 102, 18, 19, 228, 107, 18, 19, 228, 106, 18, 19,
- 211, 213, 216, 126, 18, 19, 211, 213, 216, 125, 18, 19, 211, 213, 216,
- 124, 18, 19, 211, 213, 216, 123, 18, 19, 211, 213, 216, 122, 18, 19, 211,
- 213, 216, 129, 18, 19, 211, 213, 216, 128, 18, 19, 211, 213, 40, 216,
- 211, 18, 19, 251, 226, 212, 98, 226, 230, 219, 21, 79, 226, 230, 1, 252,
- 56, 226, 230, 1, 232, 92, 226, 230, 1, 244, 159, 226, 230, 1, 222, 17,
- 226, 230, 1, 228, 198, 226, 230, 1, 214, 226, 226, 230, 1, 248, 205, 226,
- 230, 1, 216, 81, 226, 230, 1, 249, 237, 226, 230, 1, 250, 188, 226, 230,
- 1, 230, 96, 226, 230, 1, 242, 163, 226, 230, 1, 229, 68, 226, 230, 1,
- 218, 124, 226, 230, 1, 222, 137, 226, 230, 1, 254, 207, 226, 230, 1, 226,
- 191, 226, 230, 1, 214, 150, 226, 230, 1, 245, 239, 226, 230, 1, 235, 195,
- 226, 230, 1, 245, 240, 226, 230, 1, 226, 162, 226, 230, 1, 214, 206, 226,
- 230, 1, 236, 46, 226, 230, 1, 245, 237, 226, 230, 1, 225, 205, 226, 230,
- 244, 158, 79, 226, 230, 223, 52, 244, 158, 79, 178, 1, 244, 149, 244,
- 141, 244, 163, 245, 14, 178, 1, 214, 105, 178, 1, 214, 135, 214, 151, 69,
- 178, 1, 210, 214, 178, 1, 211, 117, 178, 1, 212, 98, 178, 1, 216, 131,
- 216, 130, 216, 152, 178, 1, 245, 67, 178, 1, 254, 101, 61, 178, 1, 226,
- 147, 78, 178, 1, 255, 26, 61, 178, 1, 254, 236, 178, 1, 232, 139, 78,
- 178, 1, 219, 246, 78, 178, 1, 78, 178, 1, 226, 238, 178, 1, 226, 200,
- 178, 1, 223, 167, 223, 180, 223, 97, 153, 178, 1, 234, 199, 178, 1, 250,
- 185, 178, 1, 234, 200, 235, 29, 178, 1, 243, 209, 178, 1, 245, 146, 178,
- 1, 243, 65, 242, 73, 243, 209, 178, 1, 243, 103, 178, 1, 211, 188, 211,
- 182, 212, 98, 178, 1, 242, 45, 242, 67, 178, 1, 242, 49, 242, 67, 178, 1,
- 232, 141, 242, 67, 178, 1, 219, 249, 242, 67, 178, 1, 229, 190, 227, 161,
- 229, 191, 230, 30, 178, 1, 219, 247, 230, 30, 178, 1, 246, 123, 178, 1,
- 235, 175, 235, 179, 235, 168, 74, 178, 1, 76, 178, 1, 235, 123, 235, 150,
- 178, 1, 243, 50, 178, 1, 232, 142, 254, 252, 178, 1, 219, 251, 61, 178,
- 1, 235, 160, 245, 121, 178, 1, 225, 167, 225, 189, 226, 109, 178, 1, 254,
- 172, 245, 119, 178, 1, 219, 26, 222, 93, 178, 1, 219, 181, 232, 138, 222,
- 93, 178, 1, 219, 245, 222, 93, 178, 1, 251, 74, 178, 1, 210, 159, 178, 1,
- 216, 64, 216, 74, 215, 41, 217, 153, 178, 1, 219, 244, 217, 153, 178, 1,
- 249, 68, 178, 1, 252, 39, 252, 42, 251, 232, 253, 166, 178, 1, 219, 250,
- 253, 166, 178, 1, 246, 122, 178, 1, 226, 175, 178, 1, 245, 204, 245, 206,
- 76, 178, 1, 231, 183, 231, 191, 194, 178, 1, 232, 140, 194, 178, 1, 219,
- 248, 194, 178, 1, 233, 79, 233, 120, 232, 149, 156, 178, 1, 246, 124,
- 178, 1, 235, 237, 178, 1, 235, 238, 178, 1, 248, 218, 248, 223, 249, 68,
- 178, 1, 226, 142, 245, 66, 78, 178, 1, 245, 235, 178, 1, 235, 194, 178,
- 1, 249, 86, 178, 1, 251, 25, 178, 1, 250, 197, 178, 1, 218, 163, 178, 1,
- 232, 137, 178, 1, 219, 243, 178, 1, 240, 117, 178, 1, 224, 99, 178, 1,
- 211, 178, 178, 219, 157, 224, 143, 178, 230, 90, 224, 143, 178, 249, 139,
- 224, 143, 178, 254, 14, 87, 178, 215, 82, 87, 178, 252, 54, 87, 217, 84,
- 1, 61, 217, 84, 1, 74, 217, 84, 1, 69, 217, 84, 1, 176, 217, 84, 1, 243,
- 142, 217, 84, 1, 229, 82, 217, 84, 1, 217, 106, 217, 84, 1, 248, 229,
- 217, 84, 1, 198, 217, 84, 1, 191, 217, 84, 1, 252, 199, 217, 84, 1, 186,
- 217, 84, 1, 192, 217, 84, 1, 233, 141, 217, 84, 1, 212, 65, 217, 84, 1,
- 206, 217, 84, 1, 162, 217, 84, 25, 5, 74, 217, 84, 25, 5, 69, 217, 84, 5,
- 213, 152, 242, 14, 1, 61, 242, 14, 1, 74, 242, 14, 1, 69, 242, 14, 1,
- 176, 242, 14, 1, 243, 142, 242, 14, 1, 229, 82, 242, 14, 1, 217, 106,
- 242, 14, 1, 248, 229, 242, 14, 1, 198, 242, 14, 1, 191, 242, 14, 1, 252,
- 199, 242, 14, 1, 186, 242, 14, 1, 192, 242, 14, 1, 205, 242, 14, 1, 233,
- 141, 242, 14, 1, 212, 65, 242, 14, 1, 206, 242, 14, 1, 162, 242, 14, 25,
- 5, 74, 242, 14, 25, 5, 69, 242, 14, 5, 226, 53, 225, 129, 219, 157, 224,
- 143, 225, 129, 52, 224, 143, 251, 128, 1, 61, 251, 128, 1, 74, 251, 128,
- 1, 69, 251, 128, 1, 176, 251, 128, 1, 243, 142, 251, 128, 1, 229, 82,
- 251, 128, 1, 217, 106, 251, 128, 1, 248, 229, 251, 128, 1, 198, 251, 128,
- 1, 191, 251, 128, 1, 252, 199, 251, 128, 1, 186, 251, 128, 1, 192, 251,
- 128, 1, 205, 251, 128, 1, 233, 141, 251, 128, 1, 212, 65, 251, 128, 1,
- 206, 251, 128, 1, 162, 251, 128, 25, 5, 74, 251, 128, 25, 5, 69, 217, 83,
- 1, 61, 217, 83, 1, 74, 217, 83, 1, 69, 217, 83, 1, 176, 217, 83, 1, 243,
- 142, 217, 83, 1, 229, 82, 217, 83, 1, 217, 106, 217, 83, 1, 248, 229,
- 217, 83, 1, 198, 217, 83, 1, 191, 217, 83, 1, 252, 199, 217, 83, 1, 186,
- 217, 83, 1, 192, 217, 83, 1, 233, 141, 217, 83, 1, 212, 65, 217, 83, 1,
- 206, 217, 83, 25, 5, 74, 217, 83, 25, 5, 69, 70, 1, 176, 70, 1, 234, 138,
- 70, 1, 234, 34, 70, 1, 234, 111, 70, 1, 229, 9, 70, 1, 251, 41, 70, 1,
- 250, 165, 70, 1, 249, 246, 70, 1, 250, 94, 70, 1, 227, 138, 70, 1, 248,
- 229, 70, 1, 215, 145, 70, 1, 247, 153, 70, 1, 215, 140, 70, 1, 228, 85,
- 70, 1, 217, 106, 70, 1, 216, 209, 70, 1, 112, 70, 1, 216, 157, 70, 1,
- 228, 79, 70, 1, 252, 199, 70, 1, 225, 150, 70, 1, 225, 19, 70, 1, 225,
- 124, 70, 1, 230, 166, 70, 1, 210, 244, 70, 1, 222, 213, 70, 1, 232, 162,
- 70, 1, 213, 138, 70, 1, 220, 104, 70, 1, 218, 186, 70, 1, 206, 70, 1,
- 162, 70, 1, 233, 141, 70, 1, 224, 91, 70, 235, 250, 25, 224, 77, 70, 235,
- 250, 25, 224, 90, 70, 235, 250, 25, 224, 56, 70, 235, 250, 25, 224, 51,
- 70, 235, 250, 25, 224, 33, 70, 235, 250, 25, 224, 5, 70, 235, 250, 25,
- 223, 249, 70, 235, 250, 25, 223, 248, 70, 235, 250, 25, 222, 102, 70,
- 235, 250, 25, 222, 95, 70, 235, 250, 25, 232, 67, 70, 235, 250, 25, 232,
- 57, 70, 235, 250, 25, 224, 72, 70, 235, 250, 25, 224, 83, 70, 235, 250,
- 25, 224, 41, 215, 49, 111, 70, 235, 250, 25, 224, 41, 215, 49, 105, 70,
- 235, 250, 25, 224, 73, 70, 25, 235, 236, 254, 53, 70, 25, 235, 236, 255,
- 82, 70, 25, 5, 255, 82, 70, 25, 5, 74, 70, 25, 5, 236, 40, 70, 25, 5,
- 211, 117, 70, 25, 5, 210, 169, 70, 25, 5, 69, 70, 25, 5, 214, 118, 70,
- 25, 5, 214, 229, 70, 25, 5, 226, 238, 70, 25, 5, 192, 70, 25, 5, 236, 67,
- 70, 25, 5, 76, 70, 25, 5, 254, 252, 70, 25, 5, 254, 210, 70, 25, 5, 226,
- 187, 70, 25, 5, 253, 200, 70, 5, 228, 211, 70, 5, 223, 129, 70, 5, 210,
- 180, 70, 5, 230, 57, 70, 5, 215, 214, 70, 5, 252, 151, 70, 5, 222, 208,
- 70, 5, 216, 41, 70, 5, 234, 247, 70, 5, 254, 212, 70, 5, 221, 246, 221,
- 240, 70, 5, 213, 149, 70, 5, 249, 240, 70, 5, 252, 125, 70, 5, 234, 131,
- 70, 5, 252, 145, 70, 5, 251, 17, 225, 75, 233, 193, 70, 5, 233, 36, 216,
- 18, 70, 5, 252, 28, 70, 5, 225, 126, 230, 104, 70, 5, 234, 15, 70, 249,
- 106, 16, 223, 31, 70, 5, 253, 182, 70, 5, 253, 203, 70, 21, 210, 86, 70,
- 21, 111, 70, 21, 105, 70, 21, 158, 70, 21, 161, 70, 21, 190, 70, 21, 195,
- 70, 21, 199, 70, 21, 196, 70, 21, 201, 70, 16, 233, 36, 253, 205, 219,
- 45, 70, 16, 233, 36, 253, 205, 230, 76, 70, 16, 233, 36, 253, 205, 225,
- 74, 70, 16, 233, 36, 253, 205, 252, 57, 70, 16, 233, 36, 253, 205, 251,
- 111, 70, 16, 233, 36, 253, 205, 224, 218, 70, 16, 233, 36, 253, 205, 224,
- 212, 70, 16, 233, 36, 253, 205, 224, 210, 70, 16, 233, 36, 253, 205, 224,
- 216, 70, 16, 233, 36, 253, 205, 224, 214, 83, 251, 244, 83, 245, 171, 83,
- 249, 227, 83, 243, 236, 218, 131, 83, 249, 234, 83, 244, 19, 247, 126,
- 83, 216, 40, 219, 54, 240, 175, 83, 219, 192, 3, 251, 180, 231, 159, 83,
- 231, 188, 249, 227, 83, 231, 188, 243, 236, 218, 131, 83, 228, 196, 83,
- 244, 5, 45, 221, 159, 111, 83, 244, 5, 45, 221, 159, 105, 83, 244, 5, 45,
- 221, 159, 158, 83, 25, 220, 139, 83, 21, 210, 86, 83, 21, 111, 83, 21,
- 105, 83, 21, 158, 83, 21, 161, 83, 21, 190, 83, 21, 195, 83, 21, 199, 83,
- 21, 196, 83, 21, 201, 83, 1, 61, 83, 1, 76, 83, 1, 74, 83, 1, 78, 83, 1,
- 69, 83, 1, 226, 238, 83, 1, 214, 214, 83, 1, 245, 217, 83, 1, 198, 83, 1,
- 254, 123, 83, 1, 252, 199, 83, 1, 191, 83, 1, 224, 91, 83, 1, 243, 142,
- 83, 1, 186, 83, 1, 233, 141, 83, 1, 206, 83, 1, 220, 104, 83, 1, 217,
- 106, 83, 1, 248, 229, 83, 1, 250, 165, 83, 1, 235, 147, 83, 1, 192, 83,
- 1, 205, 83, 1, 212, 65, 83, 1, 244, 204, 83, 1, 176, 83, 1, 234, 138, 83,
- 1, 215, 184, 83, 1, 210, 116, 83, 1, 242, 53, 83, 1, 210, 16, 83, 1, 233,
- 4, 83, 1, 210, 69, 83, 1, 250, 118, 83, 1, 216, 40, 200, 25, 50, 83, 1,
- 216, 40, 76, 83, 1, 216, 40, 74, 83, 1, 216, 40, 78, 83, 1, 216, 40, 69,
- 83, 1, 216, 40, 226, 238, 83, 1, 216, 40, 214, 214, 83, 1, 216, 40, 254,
- 123, 83, 1, 216, 40, 252, 199, 83, 1, 216, 40, 191, 83, 1, 216, 40, 224,
- 91, 83, 1, 216, 40, 243, 142, 83, 1, 216, 40, 186, 83, 1, 216, 40, 217,
- 106, 83, 1, 216, 40, 248, 229, 83, 1, 216, 40, 250, 165, 83, 1, 216, 40,
- 235, 147, 83, 1, 216, 40, 215, 184, 83, 1, 216, 40, 192, 83, 1, 216, 40,
- 212, 65, 83, 1, 216, 40, 176, 83, 1, 216, 40, 243, 139, 83, 1, 216, 40,
- 242, 53, 83, 1, 216, 40, 235, 113, 83, 1, 216, 40, 228, 236, 83, 1, 216,
- 40, 246, 46, 83, 1, 219, 192, 76, 83, 1, 219, 192, 74, 83, 1, 219, 192,
- 235, 158, 83, 1, 219, 192, 214, 214, 83, 1, 219, 192, 69, 83, 1, 219,
- 192, 254, 123, 83, 1, 219, 192, 176, 83, 1, 219, 192, 243, 142, 83, 1,
- 219, 192, 162, 83, 1, 219, 192, 191, 83, 1, 219, 192, 220, 104, 83, 1,
- 219, 192, 217, 106, 83, 1, 219, 192, 248, 229, 83, 1, 219, 192, 235, 147,
- 83, 1, 219, 192, 244, 204, 83, 1, 219, 192, 243, 139, 83, 1, 219, 192,
- 242, 53, 83, 1, 219, 192, 215, 184, 83, 1, 219, 192, 210, 116, 83, 1,
- 219, 192, 223, 187, 83, 1, 219, 192, 250, 165, 83, 1, 219, 192, 210, 82,
- 83, 1, 231, 188, 74, 83, 1, 231, 188, 176, 83, 1, 231, 188, 205, 83, 1,
- 231, 188, 244, 204, 83, 1, 231, 188, 210, 82, 83, 1, 254, 171, 243, 123,
- 254, 84, 111, 83, 1, 254, 171, 243, 123, 213, 148, 111, 83, 1, 254, 171,
- 243, 123, 248, 194, 83, 1, 254, 171, 243, 123, 214, 224, 83, 1, 254, 171,
- 243, 123, 235, 200, 214, 224, 83, 1, 254, 171, 243, 123, 252, 163, 83, 1,
- 254, 171, 243, 123, 134, 252, 163, 83, 1, 254, 171, 243, 123, 61, 83, 1,
- 254, 171, 243, 123, 74, 83, 1, 254, 171, 243, 123, 176, 83, 1, 254, 171,
- 243, 123, 229, 82, 83, 1, 254, 171, 243, 123, 251, 41, 83, 1, 254, 171,
- 243, 123, 215, 157, 83, 1, 254, 171, 243, 123, 215, 145, 83, 1, 254, 171,
- 243, 123, 248, 143, 83, 1, 254, 171, 243, 123, 228, 115, 83, 1, 254, 171,
- 243, 123, 217, 106, 83, 1, 254, 171, 243, 123, 248, 229, 83, 1, 254, 171,
- 243, 123, 191, 83, 1, 254, 171, 243, 123, 225, 150, 83, 1, 254, 171, 243,
- 123, 218, 225, 83, 1, 254, 171, 243, 123, 210, 82, 83, 1, 254, 171, 243,
- 123, 210, 116, 83, 1, 254, 171, 243, 123, 254, 218, 83, 1, 216, 40, 254,
- 171, 243, 123, 217, 106, 83, 1, 216, 40, 254, 171, 243, 123, 210, 82, 83,
- 1, 231, 188, 254, 171, 243, 123, 243, 0, 83, 1, 231, 188, 254, 171, 243,
- 123, 229, 82, 83, 1, 231, 188, 254, 171, 243, 123, 251, 41, 83, 1, 231,
- 188, 254, 171, 243, 123, 235, 120, 83, 1, 231, 188, 254, 171, 243, 123,
- 215, 157, 83, 1, 231, 188, 254, 171, 243, 123, 248, 127, 83, 1, 231, 188,
- 254, 171, 243, 123, 217, 106, 83, 1, 231, 188, 254, 171, 243, 123, 248,
- 33, 83, 1, 231, 188, 254, 171, 243, 123, 218, 225, 83, 1, 231, 188, 254,
- 171, 243, 123, 249, 80, 83, 1, 231, 188, 254, 171, 243, 123, 210, 82, 83,
- 1, 231, 188, 254, 171, 243, 123, 210, 116, 83, 1, 254, 171, 243, 123,
- 163, 69, 83, 1, 254, 171, 243, 123, 163, 192, 83, 1, 231, 188, 254, 171,
- 243, 123, 252, 26, 83, 1, 254, 171, 243, 123, 248, 219, 83, 1, 231, 188,
- 254, 171, 243, 123, 233, 4, 18, 19, 226, 113, 18, 19, 253, 175, 18, 19,
- 255, 37, 18, 19, 212, 25, 18, 19, 224, 224, 18, 19, 225, 233, 18, 19,
- 224, 108, 18, 19, 217, 32, 18, 19, 234, 195, 18, 19, 233, 185, 18, 19,
- 231, 137, 18, 19, 228, 42, 18, 19, 229, 186, 18, 19, 233, 74, 18, 19,
- 219, 24, 18, 19, 221, 213, 18, 19, 219, 234, 18, 19, 220, 68, 18, 19,
- 219, 203, 18, 19, 210, 220, 18, 19, 211, 52, 18, 19, 223, 137, 18, 19,
- 227, 175, 18, 19, 226, 220, 227, 175, 18, 19, 227, 174, 18, 19, 226, 220,
- 227, 174, 18, 19, 227, 173, 18, 19, 226, 220, 227, 173, 18, 19, 227, 172,
- 18, 19, 226, 220, 227, 172, 18, 19, 222, 107, 18, 19, 222, 106, 18, 19,
- 222, 105, 18, 19, 222, 104, 18, 19, 222, 103, 18, 19, 222, 111, 18, 19,
- 226, 220, 226, 109, 18, 19, 226, 220, 217, 153, 18, 19, 226, 220, 235,
- 29, 18, 19, 226, 220, 251, 74, 18, 19, 226, 220, 194, 18, 19, 226, 220,
- 230, 30, 18, 19, 226, 220, 222, 93, 18, 19, 226, 220, 220, 106, 18, 19,
- 245, 227, 212, 98, 18, 19, 212, 7, 212, 98, 18, 19, 40, 4, 222, 236, 18,
- 19, 40, 223, 160, 247, 128, 18, 19, 223, 226, 222, 108, 18, 19, 159, 232,
- 133, 18, 19, 159, 233, 140, 18, 19, 216, 127, 18, 19, 216, 129, 18, 19,
- 215, 137, 18, 19, 215, 139, 18, 19, 215, 144, 18, 19, 216, 50, 18, 19,
- 216, 52, 18, 19, 221, 211, 219, 208, 18, 19, 221, 211, 220, 3, 18, 19,
- 221, 211, 241, 60, 18, 19, 73, 242, 80, 18, 19, 73, 248, 60, 243, 62, 18,
- 19, 73, 243, 139, 18, 19, 73, 242, 85, 18, 19, 221, 211, 235, 39, 18, 19,
- 73, 235, 37, 18, 19, 252, 76, 248, 60, 156, 18, 19, 252, 76, 248, 60,
- 153, 18, 19, 73, 248, 55, 222, 93, 232, 229, 213, 122, 233, 16, 232, 229,
- 1, 176, 232, 229, 1, 234, 138, 232, 229, 1, 243, 142, 232, 229, 1, 243,
- 0, 232, 229, 1, 229, 82, 232, 229, 1, 251, 41, 232, 229, 1, 250, 165,
- 232, 229, 1, 235, 147, 232, 229, 1, 235, 120, 232, 229, 1, 211, 71, 232,
- 229, 1, 217, 106, 232, 229, 1, 216, 209, 232, 229, 1, 248, 229, 232, 229,
- 1, 248, 33, 232, 229, 1, 198, 232, 229, 1, 191, 232, 229, 1, 225, 150,
- 232, 229, 1, 252, 199, 232, 229, 1, 252, 26, 232, 229, 1, 186, 232, 229,
- 1, 192, 232, 229, 1, 205, 232, 229, 1, 233, 141, 232, 229, 1, 212, 65,
- 232, 229, 1, 220, 104, 232, 229, 1, 218, 225, 232, 229, 1, 206, 232, 229,
- 1, 162, 232, 229, 25, 5, 61, 232, 229, 25, 5, 74, 232, 229, 25, 5, 69,
- 232, 229, 25, 5, 245, 217, 232, 229, 25, 5, 254, 210, 232, 229, 25, 5,
- 226, 187, 232, 229, 25, 5, 253, 200, 232, 229, 25, 5, 76, 232, 229, 25,
- 5, 78, 232, 229, 218, 74, 1, 192, 232, 229, 218, 74, 1, 205, 232, 229,
- 218, 74, 1, 212, 65, 232, 229, 4, 1, 176, 232, 229, 4, 1, 229, 82, 232,
- 229, 4, 1, 254, 83, 232, 229, 4, 1, 217, 106, 232, 229, 4, 1, 198, 232,
- 229, 4, 1, 191, 232, 229, 4, 1, 186, 232, 229, 4, 1, 205, 232, 229, 4, 1,
- 233, 141, 232, 229, 5, 230, 94, 232, 229, 5, 234, 177, 232, 229, 5, 222,
- 34, 232, 229, 5, 232, 133, 232, 229, 245, 39, 79, 232, 229, 224, 16, 79,
- 232, 229, 21, 210, 86, 232, 229, 21, 111, 232, 229, 21, 105, 232, 229,
- 21, 158, 232, 229, 21, 161, 232, 229, 21, 190, 232, 229, 21, 195, 232,
- 229, 21, 199, 232, 229, 21, 196, 232, 229, 21, 201, 39, 233, 65, 1, 176,
- 39, 233, 65, 1, 211, 165, 39, 233, 65, 1, 229, 82, 39, 233, 65, 1, 215,
- 184, 39, 233, 65, 1, 206, 39, 233, 65, 1, 192, 39, 233, 65, 1, 217, 106,
- 39, 233, 65, 1, 216, 209, 39, 233, 65, 1, 233, 141, 39, 233, 65, 1, 191,
- 39, 233, 65, 1, 225, 150, 39, 233, 65, 1, 186, 39, 233, 65, 1, 244, 204,
- 39, 233, 65, 1, 214, 27, 39, 233, 65, 1, 162, 39, 233, 65, 1, 224, 91,
- 39, 233, 65, 1, 234, 138, 39, 233, 65, 1, 215, 176, 39, 233, 65, 1, 198,
- 39, 233, 65, 1, 61, 39, 233, 65, 1, 74, 39, 233, 65, 1, 245, 217, 39,
- 233, 65, 1, 245, 205, 39, 233, 65, 1, 69, 39, 233, 65, 1, 226, 187, 39,
- 233, 65, 1, 78, 39, 233, 65, 1, 214, 214, 39, 233, 65, 1, 76, 39, 233,
- 65, 1, 253, 198, 39, 233, 65, 1, 254, 210, 39, 233, 65, 1, 216, 29, 39,
- 233, 65, 1, 216, 28, 39, 233, 65, 1, 216, 27, 39, 233, 65, 1, 216, 26,
- 39, 233, 65, 1, 216, 25, 166, 39, 173, 1, 125, 224, 91, 166, 39, 173, 1,
- 121, 224, 91, 166, 39, 173, 1, 125, 176, 166, 39, 173, 1, 125, 211, 165,
- 166, 39, 173, 1, 125, 229, 82, 166, 39, 173, 1, 121, 176, 166, 39, 173,
- 1, 121, 211, 165, 166, 39, 173, 1, 121, 229, 82, 166, 39, 173, 1, 125,
- 215, 184, 166, 39, 173, 1, 125, 206, 166, 39, 173, 1, 125, 192, 166, 39,
- 173, 1, 121, 215, 184, 166, 39, 173, 1, 121, 206, 166, 39, 173, 1, 121,
- 192, 166, 39, 173, 1, 125, 217, 106, 166, 39, 173, 1, 125, 216, 209, 166,
- 39, 173, 1, 125, 198, 166, 39, 173, 1, 121, 217, 106, 166, 39, 173, 1,
- 121, 216, 209, 166, 39, 173, 1, 121, 198, 166, 39, 173, 1, 125, 191, 166,
- 39, 173, 1, 125, 225, 150, 166, 39, 173, 1, 125, 186, 166, 39, 173, 1,
- 121, 191, 166, 39, 173, 1, 121, 225, 150, 166, 39, 173, 1, 121, 186, 166,
- 39, 173, 1, 125, 244, 204, 166, 39, 173, 1, 125, 214, 27, 166, 39, 173,
- 1, 125, 233, 141, 166, 39, 173, 1, 121, 244, 204, 166, 39, 173, 1, 121,
- 214, 27, 166, 39, 173, 1, 121, 233, 141, 166, 39, 173, 1, 125, 162, 166,
- 39, 173, 1, 125, 248, 229, 166, 39, 173, 1, 125, 252, 199, 166, 39, 173,
- 1, 121, 162, 166, 39, 173, 1, 121, 248, 229, 166, 39, 173, 1, 121, 252,
- 199, 166, 39, 173, 1, 125, 233, 190, 166, 39, 173, 1, 125, 211, 138, 166,
- 39, 173, 1, 121, 233, 190, 166, 39, 173, 1, 121, 211, 138, 166, 39, 173,
- 1, 125, 218, 83, 166, 39, 173, 1, 121, 218, 83, 166, 39, 173, 25, 5, 25,
- 219, 241, 166, 39, 173, 25, 5, 255, 82, 166, 39, 173, 25, 5, 236, 40,
- 166, 39, 173, 25, 5, 69, 166, 39, 173, 25, 5, 214, 118, 166, 39, 173, 25,
- 5, 76, 166, 39, 173, 25, 5, 254, 252, 166, 39, 173, 25, 5, 78, 166, 39,
- 173, 25, 5, 227, 4, 166, 39, 173, 25, 5, 214, 214, 166, 39, 173, 25, 5,
- 253, 175, 166, 39, 173, 25, 5, 255, 37, 166, 39, 173, 25, 5, 214, 111,
- 166, 39, 173, 25, 5, 226, 113, 166, 39, 173, 25, 5, 227, 1, 166, 39, 173,
- 25, 5, 214, 210, 166, 39, 173, 25, 5, 235, 158, 166, 39, 173, 1, 40, 214,
- 105, 166, 39, 173, 1, 40, 229, 84, 166, 39, 173, 1, 40, 230, 30, 166, 39,
- 173, 1, 40, 194, 166, 39, 173, 1, 40, 235, 29, 166, 39, 173, 1, 40, 249,
- 68, 166, 39, 173, 1, 40, 253, 166, 166, 39, 173, 138, 231, 163, 166, 39,
- 173, 138, 231, 162, 166, 39, 173, 21, 210, 86, 166, 39, 173, 21, 111,
- 166, 39, 173, 21, 105, 166, 39, 173, 21, 158, 166, 39, 173, 21, 161, 166,
- 39, 173, 21, 190, 166, 39, 173, 21, 195, 166, 39, 173, 21, 199, 166, 39,
- 173, 21, 196, 166, 39, 173, 21, 201, 166, 39, 173, 89, 21, 111, 166, 39,
- 173, 5, 233, 126, 166, 39, 173, 5, 233, 125, 70, 16, 225, 240, 70, 16,
- 230, 77, 234, 31, 70, 16, 225, 75, 234, 31, 70, 16, 252, 58, 234, 31, 70,
- 16, 251, 112, 234, 31, 70, 16, 224, 219, 234, 31, 70, 16, 224, 213, 234,
- 31, 70, 16, 224, 211, 234, 31, 70, 16, 224, 217, 234, 31, 70, 16, 224,
- 215, 234, 31, 70, 16, 248, 181, 234, 31, 70, 16, 248, 177, 234, 31, 70,
- 16, 248, 176, 234, 31, 70, 16, 248, 179, 234, 31, 70, 16, 248, 178, 234,
- 31, 70, 16, 248, 175, 234, 31, 70, 16, 215, 87, 70, 16, 230, 77, 222,
- 207, 70, 16, 225, 75, 222, 207, 70, 16, 252, 58, 222, 207, 70, 16, 251,
- 112, 222, 207, 70, 16, 224, 219, 222, 207, 70, 16, 224, 213, 222, 207,
- 70, 16, 224, 211, 222, 207, 70, 16, 224, 217, 222, 207, 70, 16, 224, 215,
- 222, 207, 70, 16, 248, 181, 222, 207, 70, 16, 248, 177, 222, 207, 70, 16,
- 248, 176, 222, 207, 70, 16, 248, 179, 222, 207, 70, 16, 248, 178, 222,
- 207, 70, 16, 248, 175, 222, 207, 251, 129, 1, 176, 251, 129, 1, 243, 142,
- 251, 129, 1, 229, 82, 251, 129, 1, 229, 27, 251, 129, 1, 191, 251, 129,
- 1, 252, 199, 251, 129, 1, 186, 251, 129, 1, 230, 110, 251, 129, 1, 217,
- 106, 251, 129, 1, 248, 229, 251, 129, 1, 198, 251, 129, 1, 228, 41, 251,
- 129, 1, 251, 41, 251, 129, 1, 235, 147, 251, 129, 1, 227, 169, 251, 129,
- 1, 227, 162, 251, 129, 1, 192, 251, 129, 1, 205, 251, 129, 1, 233, 141,
- 251, 129, 1, 214, 27, 251, 129, 1, 206, 251, 129, 1, 61, 251, 129, 1,
- 162, 251, 129, 25, 5, 74, 251, 129, 25, 5, 69, 251, 129, 25, 5, 76, 251,
- 129, 25, 5, 78, 251, 129, 25, 5, 254, 252, 251, 129, 226, 64, 251, 129,
- 245, 151, 64, 221, 174, 39, 89, 1, 125, 176, 39, 89, 1, 125, 234, 138,
- 39, 89, 1, 125, 233, 177, 39, 89, 1, 121, 176, 39, 89, 1, 121, 233, 177,
- 39, 89, 1, 121, 234, 138, 39, 89, 1, 229, 82, 39, 89, 1, 125, 251, 41,
- 39, 89, 1, 125, 250, 165, 39, 89, 1, 121, 251, 41, 39, 89, 1, 121, 206,
- 39, 89, 1, 121, 250, 165, 39, 89, 1, 227, 169, 39, 89, 1, 223, 143, 39,
- 89, 1, 125, 223, 141, 39, 89, 1, 248, 229, 39, 89, 1, 121, 223, 141, 39,
- 89, 1, 223, 152, 39, 89, 1, 125, 217, 106, 39, 89, 1, 125, 216, 209, 39,
- 89, 1, 121, 217, 106, 39, 89, 1, 121, 216, 209, 39, 89, 1, 198, 39, 89,
- 1, 252, 199, 39, 89, 1, 125, 191, 39, 89, 1, 125, 225, 150, 39, 89, 1,
- 125, 244, 204, 39, 89, 1, 121, 191, 39, 89, 1, 121, 244, 204, 39, 89, 1,
- 121, 225, 150, 39, 89, 1, 186, 39, 89, 1, 121, 192, 39, 89, 1, 125, 192,
- 39, 89, 1, 205, 39, 89, 1, 222, 139, 39, 89, 1, 233, 141, 39, 89, 1, 232,
- 98, 39, 89, 1, 212, 65, 39, 89, 1, 125, 220, 104, 39, 89, 1, 125, 218,
- 225, 39, 89, 1, 125, 206, 39, 89, 1, 125, 162, 39, 89, 1, 232, 190, 39,
- 89, 1, 61, 39, 89, 1, 121, 162, 39, 89, 1, 74, 39, 89, 1, 236, 40, 39,
- 89, 1, 69, 39, 89, 1, 214, 118, 39, 89, 1, 245, 217, 39, 89, 1, 226, 187,
- 39, 89, 1, 233, 126, 39, 89, 1, 242, 139, 206, 39, 89, 117, 5, 147, 205,
- 39, 89, 117, 5, 147, 233, 141, 39, 89, 117, 5, 233, 142, 217, 59, 233,
- 115, 39, 89, 5, 231, 209, 234, 237, 233, 115, 39, 89, 117, 5, 40, 229,
- 82, 39, 89, 117, 5, 121, 191, 39, 89, 117, 5, 125, 223, 142, 177, 121,
- 191, 39, 89, 117, 5, 186, 39, 89, 117, 5, 252, 199, 39, 89, 117, 5, 206,
- 39, 89, 5, 222, 12, 39, 89, 25, 5, 61, 39, 89, 25, 5, 231, 209, 221, 228,
- 39, 89, 25, 5, 255, 82, 39, 89, 25, 5, 217, 65, 255, 82, 39, 89, 25, 5,
- 74, 39, 89, 25, 5, 236, 40, 39, 89, 25, 5, 214, 214, 39, 89, 25, 5, 214,
- 117, 39, 89, 25, 5, 69, 39, 89, 25, 5, 214, 118, 39, 89, 25, 5, 78, 39,
- 89, 25, 5, 227, 5, 51, 39, 89, 25, 5, 226, 113, 39, 89, 25, 5, 76, 39,
- 89, 25, 5, 254, 252, 39, 89, 25, 5, 226, 187, 39, 89, 25, 5, 254, 210,
- 39, 89, 25, 5, 89, 254, 210, 39, 89, 25, 5, 227, 5, 48, 39, 89, 5, 231,
- 209, 234, 236, 39, 89, 5, 216, 30, 39, 89, 5, 216, 29, 39, 89, 5, 234,
- 103, 216, 28, 39, 89, 5, 234, 103, 216, 27, 39, 89, 5, 234, 103, 216, 26,
- 39, 89, 5, 223, 191, 242, 52, 39, 89, 5, 231, 209, 221, 255, 39, 89, 5,
- 234, 102, 234, 221, 39, 89, 38, 249, 123, 247, 128, 39, 89, 241, 53, 21,
- 210, 86, 39, 89, 241, 53, 21, 111, 39, 89, 241, 53, 21, 105, 39, 89, 241,
- 53, 21, 158, 39, 89, 241, 53, 21, 161, 39, 89, 241, 53, 21, 190, 39, 89,
- 241, 53, 21, 195, 39, 89, 241, 53, 21, 199, 39, 89, 241, 53, 21, 196, 39,
- 89, 241, 53, 21, 201, 39, 89, 89, 21, 210, 86, 39, 89, 89, 21, 111, 39,
- 89, 89, 21, 105, 39, 89, 89, 21, 158, 39, 89, 89, 21, 161, 39, 89, 89,
- 21, 190, 39, 89, 89, 21, 195, 39, 89, 89, 21, 199, 39, 89, 89, 21, 196,
- 39, 89, 89, 21, 201, 39, 89, 5, 211, 249, 39, 89, 5, 211, 248, 39, 89, 5,
- 221, 217, 39, 89, 5, 234, 166, 39, 89, 5, 240, 239, 39, 89, 5, 247, 142,
- 39, 89, 5, 223, 52, 222, 189, 223, 152, 39, 89, 5, 231, 209, 211, 72, 39,
- 89, 5, 235, 12, 39, 89, 5, 235, 11, 39, 89, 5, 221, 224, 39, 89, 5, 221,
- 223, 39, 89, 5, 242, 16, 39, 89, 5, 251, 38, 102, 5, 214, 200, 223, 33,
- 102, 5, 214, 200, 251, 9, 102, 5, 250, 194, 102, 5, 218, 16, 102, 5, 251,
- 241, 102, 1, 254, 193, 102, 1, 254, 194, 217, 14, 102, 1, 236, 36, 102,
- 1, 236, 37, 217, 14, 102, 1, 214, 203, 102, 1, 214, 204, 217, 14, 102, 1,
- 223, 191, 223, 82, 102, 1, 223, 191, 223, 83, 217, 14, 102, 1, 233, 142,
- 233, 30, 102, 1, 233, 142, 233, 31, 217, 14, 102, 1, 245, 187, 102, 1,
- 254, 208, 102, 1, 226, 216, 102, 1, 226, 217, 217, 14, 102, 1, 176, 102,
- 1, 235, 19, 231, 212, 102, 1, 243, 142, 102, 1, 243, 143, 242, 168, 102,
- 1, 229, 82, 102, 1, 251, 41, 102, 1, 251, 42, 233, 129, 102, 1, 235, 147,
- 102, 1, 235, 148, 235, 124, 102, 1, 227, 169, 102, 1, 217, 107, 233, 82,
- 102, 1, 217, 107, 230, 72, 231, 212, 102, 1, 248, 230, 230, 72, 254, 153,
- 102, 1, 248, 230, 230, 72, 231, 212, 102, 1, 229, 234, 223, 155, 102, 1,
- 217, 106, 102, 1, 217, 107, 217, 36, 102, 1, 248, 229, 102, 1, 248, 230,
- 231, 230, 102, 1, 198, 102, 1, 191, 102, 1, 226, 94, 234, 232, 102, 1,
- 252, 199, 102, 1, 252, 200, 234, 178, 102, 1, 186, 102, 1, 192, 102, 1,
- 205, 102, 1, 233, 141, 102, 1, 212, 65, 102, 1, 222, 36, 222, 22, 102, 1,
- 222, 36, 221, 235, 102, 1, 206, 102, 1, 162, 102, 5, 223, 73, 102, 25, 5,
- 217, 14, 102, 25, 5, 214, 199, 102, 25, 5, 214, 200, 221, 231, 102, 25,
- 5, 218, 48, 102, 25, 5, 218, 49, 236, 28, 102, 25, 5, 223, 191, 223, 82,
- 102, 25, 5, 223, 191, 223, 83, 217, 14, 102, 25, 5, 233, 142, 233, 30,
- 102, 25, 5, 233, 142, 233, 31, 217, 14, 102, 25, 5, 217, 66, 102, 25, 5,
- 217, 67, 223, 82, 102, 25, 5, 217, 67, 217, 14, 102, 25, 5, 217, 67, 223,
- 83, 217, 14, 102, 25, 5, 225, 187, 102, 25, 5, 225, 188, 217, 14, 102,
- 255, 3, 255, 2, 102, 1, 235, 1, 221, 230, 102, 1, 234, 108, 221, 230,
- 102, 1, 215, 34, 221, 230, 102, 1, 245, 211, 221, 230, 102, 1, 214, 0,
- 221, 230, 102, 1, 210, 107, 221, 230, 102, 1, 253, 217, 221, 230, 102,
- 21, 210, 86, 102, 21, 111, 102, 21, 105, 102, 21, 158, 102, 21, 161, 102,
- 21, 190, 102, 21, 195, 102, 21, 199, 102, 21, 196, 102, 21, 201, 102,
- 226, 33, 102, 226, 59, 102, 211, 238, 102, 250, 244, 226, 52, 102, 250,
- 244, 219, 174, 102, 250, 244, 226, 6, 102, 226, 58, 102, 28, 16, 247,
- 134, 102, 28, 16, 248, 59, 102, 28, 16, 246, 72, 102, 28, 16, 248, 184,
- 102, 28, 16, 248, 185, 218, 16, 102, 28, 16, 247, 213, 102, 28, 16, 248,
- 222, 102, 28, 16, 248, 41, 102, 28, 16, 248, 206, 102, 28, 16, 248, 185,
- 243, 64, 102, 28, 16, 38, 217, 10, 102, 28, 16, 38, 245, 149, 102, 28,
- 16, 38, 234, 173, 102, 28, 16, 38, 234, 175, 102, 28, 16, 38, 235, 128,
- 102, 28, 16, 38, 234, 174, 2, 235, 128, 102, 28, 16, 38, 234, 176, 2,
- 235, 128, 102, 28, 16, 38, 252, 45, 102, 28, 16, 38, 242, 172, 102, 28,
- 16, 222, 252, 204, 246, 82, 102, 28, 16, 222, 252, 204, 248, 220, 102,
- 28, 16, 222, 252, 250, 8, 215, 112, 102, 28, 16, 222, 252, 250, 8, 217,
- 74, 102, 28, 16, 233, 50, 204, 226, 47, 102, 28, 16, 233, 50, 204, 224,
- 142, 102, 28, 16, 233, 50, 250, 8, 225, 41, 102, 28, 16, 233, 50, 250, 8,
- 225, 29, 102, 28, 16, 233, 50, 204, 225, 64, 207, 5, 226, 30, 207, 5,
- 226, 43, 207, 5, 226, 39, 207, 1, 61, 207, 1, 74, 207, 1, 69, 207, 1,
- 254, 252, 207, 1, 78, 207, 1, 76, 207, 1, 245, 63, 207, 1, 176, 207, 1,
- 224, 91, 207, 1, 243, 142, 207, 1, 229, 82, 207, 1, 251, 41, 207, 1, 235,
- 147, 207, 1, 210, 116, 207, 1, 227, 169, 207, 1, 217, 106, 207, 1, 248,
- 229, 207, 1, 198, 207, 1, 191, 207, 1, 244, 204, 207, 1, 214, 27, 207, 1,
- 252, 199, 207, 1, 186, 207, 1, 192, 207, 1, 205, 207, 1, 233, 141, 207,
- 1, 212, 65, 207, 1, 206, 207, 1, 211, 165, 207, 1, 162, 207, 117, 5, 226,
- 56, 207, 117, 5, 226, 32, 207, 117, 5, 226, 29, 207, 25, 5, 226, 46, 207,
- 25, 5, 226, 28, 207, 25, 5, 226, 50, 207, 25, 5, 226, 38, 207, 25, 5,
- 226, 57, 207, 25, 5, 226, 48, 207, 5, 226, 60, 207, 5, 213, 152, 207,
- 117, 5, 225, 252, 186, 207, 117, 5, 225, 252, 212, 65, 207, 1, 234, 138,
- 207, 1, 217, 232, 207, 21, 210, 86, 207, 21, 111, 207, 21, 105, 207, 21,
- 158, 207, 21, 161, 207, 21, 190, 207, 21, 195, 207, 21, 199, 207, 21,
- 196, 207, 21, 201, 207, 253, 183, 207, 1, 223, 55, 207, 1, 233, 13, 207,
- 1, 252, 26, 207, 1, 40, 235, 29, 207, 1, 40, 194, 252, 128, 1, 61, 252,
- 128, 1, 219, 166, 61, 252, 128, 1, 162, 252, 128, 1, 219, 166, 162, 252,
- 128, 1, 231, 186, 162, 252, 128, 1, 252, 199, 252, 128, 1, 234, 218, 252,
- 199, 252, 128, 1, 191, 252, 128, 1, 219, 166, 191, 252, 128, 1, 198, 252,
- 128, 1, 231, 186, 198, 252, 128, 1, 212, 65, 252, 128, 1, 219, 166, 212,
- 65, 252, 128, 1, 226, 71, 212, 65, 252, 128, 1, 243, 142, 252, 128, 1,
- 219, 166, 243, 142, 252, 128, 1, 235, 147, 252, 128, 1, 248, 229, 252,
- 128, 1, 205, 252, 128, 1, 219, 166, 205, 252, 128, 1, 186, 252, 128, 1,
- 219, 166, 186, 252, 128, 1, 219, 28, 217, 106, 252, 128, 1, 228, 60, 217,
- 106, 252, 128, 1, 206, 252, 128, 1, 219, 166, 206, 252, 128, 1, 231, 186,
- 206, 252, 128, 1, 192, 252, 128, 1, 219, 166, 192, 252, 128, 1, 229, 82,
- 252, 128, 1, 233, 141, 252, 128, 1, 219, 166, 233, 141, 252, 128, 1, 227,
- 169, 252, 128, 1, 251, 41, 252, 128, 1, 229, 153, 252, 128, 1, 231, 129,
- 252, 128, 1, 74, 252, 128, 1, 69, 252, 128, 5, 216, 34, 252, 128, 25, 5,
- 76, 252, 128, 25, 5, 226, 71, 76, 252, 128, 25, 5, 245, 217, 252, 128,
- 25, 5, 74, 252, 128, 25, 5, 234, 218, 74, 252, 128, 25, 5, 78, 252, 128,
- 25, 5, 234, 218, 78, 252, 128, 25, 5, 69, 252, 128, 25, 5, 104, 31, 219,
- 166, 206, 252, 128, 117, 5, 229, 84, 252, 128, 117, 5, 242, 67, 252, 128,
- 226, 41, 252, 128, 226, 37, 252, 128, 16, 251, 249, 229, 234, 231, 42,
- 252, 128, 16, 251, 249, 225, 67, 252, 128, 16, 251, 249, 235, 54, 252,
- 128, 16, 251, 249, 226, 41, 197, 1, 176, 197, 1, 234, 45, 197, 1, 234,
- 138, 197, 1, 243, 142, 197, 1, 242, 193, 197, 1, 229, 82, 197, 1, 251,
- 41, 197, 1, 250, 165, 197, 1, 235, 147, 197, 1, 227, 169, 197, 1, 217,
- 106, 197, 1, 216, 209, 197, 1, 248, 229, 197, 1, 198, 197, 1, 191, 197,
- 1, 225, 45, 197, 1, 225, 150, 197, 1, 244, 204, 197, 1, 244, 83, 197, 1,
- 252, 199, 197, 1, 251, 230, 197, 1, 186, 197, 1, 230, 173, 197, 1, 215,
- 184, 197, 1, 215, 176, 197, 1, 246, 46, 197, 1, 192, 197, 1, 205, 197, 1,
- 233, 141, 197, 1, 162, 197, 1, 241, 160, 197, 1, 214, 27, 197, 1, 206,
- 197, 1, 220, 104, 197, 1, 212, 65, 197, 1, 61, 197, 218, 74, 1, 192, 197,
- 218, 74, 1, 205, 197, 25, 5, 255, 82, 197, 25, 5, 74, 197, 25, 5, 78,
- 197, 25, 5, 226, 187, 197, 25, 5, 69, 197, 25, 5, 214, 118, 197, 25, 5,
- 76, 197, 117, 5, 235, 29, 197, 117, 5, 194, 197, 117, 5, 156, 197, 117,
- 5, 230, 30, 197, 117, 5, 226, 109, 197, 117, 5, 153, 197, 117, 5, 217,
- 153, 197, 117, 5, 227, 146, 197, 117, 5, 234, 236, 197, 5, 223, 153, 197,
- 5, 227, 209, 197, 224, 144, 217, 104, 197, 224, 144, 227, 156, 216, 121,
- 217, 104, 197, 224, 144, 250, 172, 197, 224, 144, 215, 171, 250, 172,
- 197, 224, 144, 215, 170, 197, 21, 210, 86, 197, 21, 111, 197, 21, 105,
- 197, 21, 158, 197, 21, 161, 197, 21, 190, 197, 21, 195, 197, 21, 199,
- 197, 21, 196, 197, 21, 201, 197, 1, 215, 157, 197, 1, 215, 145, 197, 1,
- 248, 143, 226, 214, 250, 111, 21, 210, 86, 226, 214, 250, 111, 21, 111,
- 226, 214, 250, 111, 21, 105, 226, 214, 250, 111, 21, 158, 226, 214, 250,
- 111, 21, 161, 226, 214, 250, 111, 21, 190, 226, 214, 250, 111, 21, 195,
- 226, 214, 250, 111, 21, 199, 226, 214, 250, 111, 21, 196, 226, 214, 250,
- 111, 21, 201, 226, 214, 250, 111, 1, 233, 141, 226, 214, 250, 111, 1,
- 253, 214, 226, 214, 250, 111, 1, 254, 225, 226, 214, 250, 111, 1, 254,
- 123, 226, 214, 250, 111, 1, 254, 187, 226, 214, 250, 111, 1, 233, 140,
- 226, 214, 250, 111, 1, 255, 44, 226, 214, 250, 111, 1, 255, 45, 226, 214,
- 250, 111, 1, 255, 43, 226, 214, 250, 111, 1, 255, 38, 226, 214, 250, 111,
- 1, 232, 247, 226, 214, 250, 111, 1, 235, 178, 226, 214, 250, 111, 1, 236,
- 41, 226, 214, 250, 111, 1, 235, 197, 226, 214, 250, 111, 1, 235, 186,
- 226, 214, 250, 111, 1, 232, 103, 226, 214, 250, 111, 1, 214, 221, 226,
- 214, 250, 111, 1, 214, 219, 226, 214, 250, 111, 1, 214, 168, 226, 214,
- 250, 111, 1, 214, 111, 226, 214, 250, 111, 1, 233, 64, 226, 214, 250,
- 111, 1, 245, 116, 226, 214, 250, 111, 1, 245, 220, 226, 214, 250, 111, 1,
- 245, 158, 226, 214, 250, 111, 1, 245, 94, 226, 214, 250, 111, 1, 232,
- 162, 226, 214, 250, 111, 1, 226, 141, 226, 214, 250, 111, 1, 227, 0, 226,
- 214, 250, 111, 1, 226, 129, 226, 214, 250, 111, 1, 226, 226, 226, 214,
- 250, 111, 230, 108, 215, 122, 226, 214, 250, 111, 243, 137, 215, 123,
- 226, 214, 250, 111, 230, 106, 215, 123, 226, 214, 250, 111, 223, 95, 226,
- 214, 250, 111, 225, 148, 226, 214, 250, 111, 254, 217, 226, 214, 250,
- 111, 224, 144, 230, 103, 226, 214, 250, 111, 224, 144, 52, 230, 103, 207,
- 224, 144, 251, 249, 218, 9, 207, 224, 144, 251, 249, 226, 42, 207, 224,
- 144, 251, 249, 224, 132, 207, 224, 144, 251, 249, 251, 27, 207, 224, 144,
- 251, 249, 233, 14, 221, 227, 207, 224, 144, 251, 249, 235, 19, 221, 227,
- 207, 224, 144, 251, 249, 248, 230, 221, 227, 207, 224, 144, 251, 249,
- 252, 200, 221, 227, 213, 252, 138, 234, 216, 213, 252, 138, 220, 79, 213,
- 252, 138, 224, 201, 213, 252, 5, 228, 214, 213, 252, 5, 211, 80, 230,
- 227, 218, 1, 213, 252, 138, 211, 80, 254, 222, 235, 250, 218, 1, 213,
- 252, 138, 211, 80, 235, 250, 218, 1, 213, 252, 138, 211, 80, 234, 204,
- 235, 250, 218, 1, 213, 252, 138, 251, 10, 51, 213, 252, 138, 211, 80,
- 234, 204, 235, 250, 218, 2, 221, 199, 213, 252, 138, 52, 218, 1, 213,
- 252, 138, 215, 212, 218, 1, 213, 252, 138, 234, 204, 254, 85, 213, 252,
- 138, 59, 51, 213, 252, 138, 113, 170, 51, 213, 252, 138, 134, 170, 51,
- 213, 252, 138, 222, 243, 234, 215, 235, 250, 218, 1, 213, 252, 138, 253,
- 212, 235, 250, 218, 1, 213, 252, 5, 213, 148, 218, 1, 213, 252, 5, 213,
- 148, 214, 216, 213, 252, 5, 223, 52, 213, 148, 214, 216, 213, 252, 5,
- 213, 148, 254, 85, 213, 252, 5, 223, 52, 213, 148, 254, 85, 213, 252, 5,
- 213, 148, 214, 217, 2, 217, 78, 213, 252, 5, 213, 148, 254, 86, 2, 217,
- 78, 213, 252, 5, 254, 84, 254, 99, 213, 252, 5, 254, 84, 252, 174, 213,
- 252, 5, 254, 84, 214, 20, 213, 252, 5, 254, 84, 214, 21, 2, 217, 78, 213,
- 252, 5, 216, 69, 213, 252, 5, 241, 198, 200, 254, 83, 213, 252, 5, 200,
- 254, 83, 213, 252, 5, 222, 144, 200, 254, 83, 213, 252, 5, 254, 84, 214,
- 223, 230, 95, 213, 252, 5, 254, 28, 213, 252, 5, 222, 189, 254, 28, 213,
- 252, 138, 251, 10, 48, 213, 252, 5, 235, 108, 213, 252, 5, 214, 161, 7,
- 1, 4, 6, 61, 7, 1, 4, 6, 254, 252, 7, 4, 1, 215, 94, 254, 252, 7, 1, 4,
- 6, 252, 142, 253, 166, 7, 1, 4, 6, 251, 74, 7, 1, 4, 6, 249, 68, 7, 1, 4,
- 6, 245, 67, 7, 1, 4, 6, 76, 7, 4, 1, 215, 94, 204, 76, 7, 4, 1, 215, 94,
- 74, 7, 1, 4, 6, 235, 150, 7, 1, 4, 6, 235, 29, 7, 1, 4, 6, 233, 155, 2,
- 91, 7, 1, 4, 6, 194, 7, 1, 4, 6, 223, 52, 230, 30, 7, 1, 4, 6, 78, 7, 1,
- 4, 6, 204, 78, 7, 4, 1, 219, 189, 78, 7, 4, 1, 219, 189, 204, 78, 7, 4,
- 1, 219, 189, 144, 2, 91, 7, 4, 1, 215, 94, 226, 238, 7, 1, 4, 6, 226,
- 138, 7, 4, 1, 216, 15, 163, 78, 7, 4, 1, 251, 183, 163, 78, 7, 1, 4, 6,
- 226, 109, 7, 1, 4, 6, 223, 52, 153, 7, 1, 4, 6, 215, 94, 153, 7, 1, 4, 6,
- 217, 153, 7, 1, 4, 6, 69, 7, 4, 1, 219, 189, 69, 7, 4, 1, 219, 189, 248,
- 8, 69, 7, 4, 1, 219, 189, 215, 94, 194, 7, 1, 4, 6, 214, 105, 7, 1, 4, 6,
- 212, 98, 7, 1, 4, 6, 210, 159, 7, 1, 4, 6, 245, 16, 7, 1, 213, 135, 233,
- 88, 218, 252, 7, 1, 254, 205, 26, 1, 4, 6, 243, 114, 26, 1, 4, 6, 233,
- 104, 26, 1, 4, 6, 225, 111, 26, 1, 4, 6, 223, 40, 26, 1, 4, 6, 224, 164,
- 33, 1, 4, 6, 245, 182, 58, 1, 6, 61, 58, 1, 6, 254, 252, 58, 1, 6, 253,
- 166, 58, 1, 6, 252, 142, 253, 166, 58, 1, 6, 249, 68, 58, 1, 6, 76, 58,
- 1, 6, 223, 52, 76, 58, 1, 6, 243, 209, 58, 1, 6, 242, 67, 58, 1, 6, 74,
- 58, 1, 6, 235, 150, 58, 1, 6, 235, 29, 58, 1, 6, 156, 58, 1, 6, 194, 58,
- 1, 6, 230, 30, 58, 1, 6, 223, 52, 230, 30, 58, 1, 6, 78, 58, 1, 6, 226,
- 138, 58, 1, 6, 226, 109, 58, 1, 6, 153, 58, 1, 6, 217, 153, 58, 1, 6, 69,
- 58, 1, 6, 212, 98, 58, 1, 4, 61, 58, 1, 4, 215, 94, 61, 58, 1, 4, 254,
- 151, 58, 1, 4, 215, 94, 254, 252, 58, 1, 4, 253, 166, 58, 1, 4, 249, 68,
- 58, 1, 4, 76, 58, 1, 4, 221, 197, 58, 1, 4, 204, 76, 58, 1, 4, 215, 94,
- 204, 76, 58, 1, 4, 243, 209, 58, 1, 4, 215, 94, 74, 58, 1, 4, 235, 29,
- 58, 1, 4, 194, 58, 1, 4, 245, 146, 58, 1, 4, 78, 58, 1, 4, 204, 78, 58,
- 1, 4, 216, 15, 163, 78, 58, 1, 4, 251, 183, 163, 78, 58, 1, 4, 226, 109,
- 58, 1, 4, 217, 153, 58, 1, 4, 69, 58, 1, 4, 219, 189, 69, 58, 1, 4, 215,
- 94, 194, 58, 1, 4, 214, 105, 58, 1, 4, 254, 205, 58, 1, 4, 252, 34, 58,
- 1, 4, 26, 243, 114, 58, 1, 4, 248, 62, 58, 1, 4, 26, 225, 136, 58, 1, 4,
- 250, 118, 7, 218, 66, 4, 1, 74, 7, 218, 66, 4, 1, 153, 7, 218, 66, 4, 1,
- 69, 7, 218, 66, 4, 1, 214, 105, 26, 218, 66, 4, 1, 252, 34, 26, 218, 66,
- 4, 1, 243, 114, 26, 218, 66, 4, 1, 223, 40, 26, 218, 66, 4, 1, 225, 136,
- 26, 218, 66, 4, 1, 250, 118, 7, 4, 1, 214, 214, 7, 4, 1, 57, 2, 230, 229,
- 184, 7, 4, 1, 249, 69, 2, 230, 229, 184, 7, 4, 1, 245, 15, 2, 230, 229,
- 184, 7, 4, 1, 232, 55, 2, 230, 229, 184, 7, 4, 1, 230, 31, 2, 230, 229,
- 184, 7, 4, 1, 226, 110, 2, 230, 229, 184, 7, 4, 1, 223, 227, 2, 230, 229,
- 184, 7, 4, 1, 223, 227, 2, 244, 96, 22, 230, 229, 184, 7, 4, 1, 222, 94,
- 2, 230, 229, 184, 7, 4, 1, 217, 154, 2, 230, 229, 184, 7, 4, 1, 210, 160,
- 2, 230, 229, 184, 7, 4, 1, 215, 94, 243, 209, 58, 1, 33, 245, 158, 7, 4,
- 1, 235, 220, 243, 209, 7, 4, 1, 216, 212, 2, 218, 109, 7, 4, 6, 1, 240,
- 161, 2, 91, 7, 4, 1, 235, 193, 2, 91, 7, 4, 1, 226, 110, 2, 91, 7, 4, 6,
- 1, 104, 2, 91, 7, 4, 1, 214, 158, 2, 91, 7, 4, 1, 57, 2, 226, 70, 103, 7,
- 4, 1, 249, 69, 2, 226, 70, 103, 7, 4, 1, 245, 15, 2, 226, 70, 103, 7, 4,
- 1, 243, 210, 2, 226, 70, 103, 7, 4, 1, 235, 30, 2, 226, 70, 103, 7, 4, 1,
- 233, 155, 2, 226, 70, 103, 7, 4, 1, 232, 55, 2, 226, 70, 103, 7, 4, 1,
- 230, 31, 2, 226, 70, 103, 7, 4, 1, 226, 110, 2, 226, 70, 103, 7, 4, 1,
- 223, 227, 2, 226, 70, 103, 7, 4, 1, 222, 94, 2, 226, 70, 103, 7, 4, 1,
- 245, 84, 2, 226, 70, 103, 7, 4, 1, 214, 106, 2, 226, 70, 103, 7, 4, 1,
- 211, 179, 2, 226, 70, 103, 7, 4, 1, 210, 160, 2, 226, 70, 103, 7, 4, 1,
- 116, 2, 223, 58, 103, 7, 4, 1, 254, 152, 2, 223, 58, 103, 7, 4, 1, 249,
- 69, 2, 241, 59, 22, 217, 78, 7, 4, 1, 160, 2, 223, 58, 103, 7, 4, 1, 204,
- 160, 2, 223, 58, 103, 7, 4, 1, 223, 52, 204, 160, 2, 223, 58, 103, 7, 4,
- 1, 221, 198, 2, 223, 58, 103, 7, 4, 1, 240, 161, 2, 223, 58, 103, 7, 4,
- 1, 204, 144, 2, 223, 58, 103, 7, 4, 1, 245, 84, 2, 223, 58, 103, 7, 4, 1,
- 104, 2, 223, 58, 103, 7, 4, 1, 245, 17, 2, 223, 58, 103, 58, 1, 4, 215,
- 94, 254, 151, 58, 1, 4, 251, 74, 58, 1, 4, 251, 75, 2, 249, 108, 58, 1,
- 4, 245, 67, 58, 1, 4, 223, 52, 204, 76, 58, 1, 4, 245, 14, 58, 1, 4, 247,
- 127, 235, 151, 2, 91, 58, 1, 4, 119, 243, 209, 58, 1, 4, 215, 94, 242,
- 67, 58, 1, 4, 240, 161, 2, 91, 58, 1, 4, 235, 192, 58, 1, 4, 6, 74, 58,
- 1, 4, 6, 240, 161, 2, 91, 58, 1, 4, 235, 151, 2, 249, 135, 58, 1, 4, 233,
- 155, 2, 223, 58, 103, 58, 1, 4, 233, 155, 2, 226, 70, 103, 58, 1, 4, 6,
- 156, 58, 1, 4, 232, 55, 2, 103, 58, 1, 4, 215, 94, 232, 55, 2, 200, 233,
- 42, 58, 1, 4, 230, 31, 2, 43, 103, 58, 1, 4, 230, 31, 2, 223, 58, 103,
- 58, 1, 4, 6, 230, 30, 58, 1, 4, 252, 142, 78, 58, 1, 4, 225, 136, 58, 1,
- 4, 222, 94, 2, 103, 58, 1, 4, 245, 83, 58, 1, 4, 217, 154, 2, 226, 70,
- 103, 58, 1, 4, 104, 130, 58, 1, 4, 214, 157, 58, 1, 4, 6, 69, 58, 1, 4,
- 214, 106, 2, 103, 58, 1, 4, 215, 94, 214, 105, 58, 1, 4, 210, 159, 58, 1,
- 4, 210, 160, 2, 223, 58, 103, 58, 1, 4, 210, 160, 2, 249, 108, 58, 1, 4,
- 245, 16, 58, 1, 4, 216, 180, 38, 246, 126, 242, 144, 255, 23, 38, 246,
- 126, 255, 12, 255, 23, 38, 219, 71, 51, 38, 218, 7, 79, 38, 231, 236, 38,
- 242, 141, 38, 231, 234, 38, 255, 10, 38, 242, 142, 38, 255, 11, 38, 7, 4,
- 1, 223, 227, 51, 38, 251, 153, 38, 231, 235, 38, 52, 250, 39, 48, 38,
- 226, 229, 48, 38, 210, 35, 51, 38, 235, 179, 51, 38, 214, 151, 48, 38,
- 214, 134, 48, 38, 7, 4, 1, 244, 71, 204, 116, 48, 38, 7, 4, 1, 254, 252,
- 38, 7, 4, 1, 254, 81, 38, 7, 4, 1, 253, 184, 38, 7, 4, 1, 251, 75, 250,
- 191, 38, 7, 4, 1, 235, 220, 249, 68, 38, 7, 4, 1, 245, 67, 38, 7, 4, 1,
- 243, 209, 38, 7, 1, 4, 6, 243, 209, 38, 7, 4, 1, 235, 29, 38, 7, 4, 1,
- 156, 38, 7, 1, 4, 6, 156, 38, 7, 1, 4, 6, 194, 38, 7, 4, 1, 230, 30, 38,
- 7, 1, 4, 6, 230, 30, 38, 7, 1, 4, 6, 153, 38, 7, 4, 1, 223, 227, 222,
- 188, 38, 7, 4, 1, 222, 93, 38, 7, 4, 1, 200, 222, 93, 38, 7, 4, 1, 210,
- 159, 38, 52, 235, 200, 251, 155, 51, 38, 254, 156, 128, 216, 43, 51, 38,
- 43, 254, 2, 48, 38, 44, 254, 2, 22, 124, 254, 2, 51, 7, 6, 1, 116, 2,
- 222, 237, 51, 7, 4, 1, 116, 2, 222, 237, 51, 7, 6, 1, 57, 2, 59, 48, 7,
- 4, 1, 57, 2, 59, 48, 7, 6, 1, 57, 2, 59, 51, 7, 4, 1, 57, 2, 59, 51, 7,
- 6, 1, 57, 2, 232, 220, 51, 7, 4, 1, 57, 2, 232, 220, 51, 7, 6, 1, 251,
- 75, 2, 250, 192, 22, 142, 7, 4, 1, 251, 75, 2, 250, 192, 22, 142, 7, 6,
- 1, 249, 69, 2, 59, 48, 7, 4, 1, 249, 69, 2, 59, 48, 7, 6, 1, 249, 69, 2,
- 59, 51, 7, 4, 1, 249, 69, 2, 59, 51, 7, 6, 1, 249, 69, 2, 232, 220, 51,
- 7, 4, 1, 249, 69, 2, 232, 220, 51, 7, 6, 1, 249, 69, 2, 250, 191, 7, 4,
- 1, 249, 69, 2, 250, 191, 7, 6, 1, 249, 69, 2, 250, 39, 51, 7, 4, 1, 249,
- 69, 2, 250, 39, 51, 7, 6, 1, 160, 2, 231, 238, 22, 242, 143, 7, 4, 1,
- 160, 2, 231, 238, 22, 242, 143, 7, 6, 1, 160, 2, 231, 238, 22, 142, 7, 4,
- 1, 160, 2, 231, 238, 22, 142, 7, 6, 1, 160, 2, 250, 39, 51, 7, 4, 1, 160,
- 2, 250, 39, 51, 7, 6, 1, 160, 2, 216, 90, 51, 7, 4, 1, 160, 2, 216, 90,
- 51, 7, 6, 1, 160, 2, 250, 192, 22, 251, 154, 7, 4, 1, 160, 2, 250, 192,
- 22, 251, 154, 7, 6, 1, 245, 15, 2, 59, 48, 7, 4, 1, 245, 15, 2, 59, 48,
- 7, 6, 1, 243, 210, 2, 231, 237, 7, 4, 1, 243, 210, 2, 231, 237, 7, 6, 1,
- 242, 68, 2, 59, 48, 7, 4, 1, 242, 68, 2, 59, 48, 7, 6, 1, 242, 68, 2, 59,
- 51, 7, 4, 1, 242, 68, 2, 59, 51, 7, 6, 1, 242, 68, 2, 248, 9, 7, 4, 1,
- 242, 68, 2, 248, 9, 7, 6, 1, 242, 68, 2, 250, 191, 7, 4, 1, 242, 68, 2,
- 250, 191, 7, 6, 1, 242, 68, 2, 251, 155, 51, 7, 4, 1, 242, 68, 2, 251,
- 155, 51, 7, 6, 1, 240, 161, 2, 216, 90, 51, 7, 4, 1, 240, 161, 2, 216,
- 90, 51, 7, 6, 1, 240, 161, 2, 248, 10, 22, 142, 7, 4, 1, 240, 161, 2,
- 248, 10, 22, 142, 7, 6, 1, 235, 30, 2, 142, 7, 4, 1, 235, 30, 2, 142, 7,
- 6, 1, 235, 30, 2, 59, 51, 7, 4, 1, 235, 30, 2, 59, 51, 7, 6, 1, 235, 30,
- 2, 232, 220, 51, 7, 4, 1, 235, 30, 2, 232, 220, 51, 7, 6, 1, 233, 155, 2,
- 59, 51, 7, 4, 1, 233, 155, 2, 59, 51, 7, 6, 1, 233, 155, 2, 59, 252, 51,
- 22, 231, 237, 7, 4, 1, 233, 155, 2, 59, 252, 51, 22, 231, 237, 7, 6, 1,
- 233, 155, 2, 232, 220, 51, 7, 4, 1, 233, 155, 2, 232, 220, 51, 7, 6, 1,
- 233, 155, 2, 250, 39, 51, 7, 4, 1, 233, 155, 2, 250, 39, 51, 7, 6, 1,
- 232, 55, 2, 142, 7, 4, 1, 232, 55, 2, 142, 7, 6, 1, 232, 55, 2, 59, 48,
- 7, 4, 1, 232, 55, 2, 59, 48, 7, 6, 1, 232, 55, 2, 59, 51, 7, 4, 1, 232,
- 55, 2, 59, 51, 7, 6, 1, 230, 31, 2, 59, 48, 7, 4, 1, 230, 31, 2, 59, 48,
- 7, 6, 1, 230, 31, 2, 59, 51, 7, 4, 1, 230, 31, 2, 59, 51, 7, 6, 1, 230,
- 31, 2, 232, 220, 51, 7, 4, 1, 230, 31, 2, 232, 220, 51, 7, 6, 1, 230, 31,
- 2, 250, 39, 51, 7, 4, 1, 230, 31, 2, 250, 39, 51, 7, 6, 1, 144, 2, 216,
- 90, 22, 142, 7, 4, 1, 144, 2, 216, 90, 22, 142, 7, 6, 1, 144, 2, 216, 90,
- 22, 248, 9, 7, 4, 1, 144, 2, 216, 90, 22, 248, 9, 7, 6, 1, 144, 2, 231,
- 238, 22, 242, 143, 7, 4, 1, 144, 2, 231, 238, 22, 242, 143, 7, 6, 1, 144,
- 2, 231, 238, 22, 142, 7, 4, 1, 144, 2, 231, 238, 22, 142, 7, 6, 1, 226,
- 110, 2, 142, 7, 4, 1, 226, 110, 2, 142, 7, 6, 1, 226, 110, 2, 59, 48, 7,
- 4, 1, 226, 110, 2, 59, 48, 7, 6, 1, 223, 227, 2, 59, 48, 7, 4, 1, 223,
- 227, 2, 59, 48, 7, 6, 1, 223, 227, 2, 59, 51, 7, 4, 1, 223, 227, 2, 59,
- 51, 7, 6, 1, 223, 227, 2, 59, 252, 51, 22, 231, 237, 7, 4, 1, 223, 227,
- 2, 59, 252, 51, 22, 231, 237, 7, 6, 1, 223, 227, 2, 232, 220, 51, 7, 4,
- 1, 223, 227, 2, 232, 220, 51, 7, 6, 1, 222, 94, 2, 59, 48, 7, 4, 1, 222,
- 94, 2, 59, 48, 7, 6, 1, 222, 94, 2, 59, 51, 7, 4, 1, 222, 94, 2, 59, 51,
- 7, 6, 1, 222, 94, 2, 255, 12, 22, 59, 48, 7, 4, 1, 222, 94, 2, 255, 12,
- 22, 59, 48, 7, 6, 1, 222, 94, 2, 250, 243, 22, 59, 48, 7, 4, 1, 222, 94,
- 2, 250, 243, 22, 59, 48, 7, 6, 1, 222, 94, 2, 59, 252, 51, 22, 59, 48, 7,
- 4, 1, 222, 94, 2, 59, 252, 51, 22, 59, 48, 7, 6, 1, 217, 154, 2, 59, 48,
- 7, 4, 1, 217, 154, 2, 59, 48, 7, 6, 1, 217, 154, 2, 59, 51, 7, 4, 1, 217,
- 154, 2, 59, 51, 7, 6, 1, 217, 154, 2, 232, 220, 51, 7, 4, 1, 217, 154, 2,
- 232, 220, 51, 7, 6, 1, 217, 154, 2, 250, 39, 51, 7, 4, 1, 217, 154, 2,
- 250, 39, 51, 7, 6, 1, 104, 2, 248, 10, 51, 7, 4, 1, 104, 2, 248, 10, 51,
- 7, 6, 1, 104, 2, 216, 90, 51, 7, 4, 1, 104, 2, 216, 90, 51, 7, 6, 1, 104,
- 2, 250, 39, 51, 7, 4, 1, 104, 2, 250, 39, 51, 7, 6, 1, 104, 2, 216, 90,
- 22, 142, 7, 4, 1, 104, 2, 216, 90, 22, 142, 7, 6, 1, 104, 2, 231, 238,
- 22, 248, 9, 7, 4, 1, 104, 2, 231, 238, 22, 248, 9, 7, 6, 1, 214, 106, 2,
- 184, 7, 4, 1, 214, 106, 2, 184, 7, 6, 1, 214, 106, 2, 59, 51, 7, 4, 1,
- 214, 106, 2, 59, 51, 7, 6, 1, 212, 99, 2, 242, 143, 7, 4, 1, 212, 99, 2,
- 242, 143, 7, 6, 1, 212, 99, 2, 142, 7, 4, 1, 212, 99, 2, 142, 7, 6, 1,
- 212, 99, 2, 248, 9, 7, 4, 1, 212, 99, 2, 248, 9, 7, 6, 1, 212, 99, 2, 59,
- 48, 7, 4, 1, 212, 99, 2, 59, 48, 7, 6, 1, 212, 99, 2, 59, 51, 7, 4, 1,
- 212, 99, 2, 59, 51, 7, 6, 1, 211, 179, 2, 59, 48, 7, 4, 1, 211, 179, 2,
- 59, 48, 7, 6, 1, 211, 179, 2, 248, 9, 7, 4, 1, 211, 179, 2, 248, 9, 7, 6,
- 1, 211, 118, 2, 59, 48, 7, 4, 1, 211, 118, 2, 59, 48, 7, 6, 1, 210, 160,
- 2, 250, 38, 7, 4, 1, 210, 160, 2, 250, 38, 7, 6, 1, 210, 160, 2, 59, 51,
- 7, 4, 1, 210, 160, 2, 59, 51, 7, 6, 1, 210, 160, 2, 232, 220, 51, 7, 4,
- 1, 210, 160, 2, 232, 220, 51, 7, 4, 1, 242, 68, 2, 232, 220, 51, 7, 4, 1,
- 217, 154, 2, 248, 9, 7, 4, 1, 212, 99, 2, 222, 237, 48, 7, 4, 1, 211,
- 118, 2, 222, 237, 48, 7, 4, 1, 116, 2, 44, 163, 222, 236, 7, 4, 1, 200,
- 222, 94, 2, 59, 48, 7, 4, 1, 200, 222, 94, 2, 248, 7, 91, 7, 4, 1, 200,
- 222, 94, 2, 125, 91, 7, 6, 1, 220, 78, 222, 93, 7, 4, 1, 248, 62, 7, 6,
- 1, 116, 2, 59, 51, 7, 4, 1, 116, 2, 59, 51, 7, 6, 1, 116, 2, 241, 59, 48,
- 7, 4, 1, 116, 2, 241, 59, 48, 7, 6, 1, 116, 2, 250, 39, 22, 142, 7, 4, 1,
- 116, 2, 250, 39, 22, 142, 7, 6, 1, 116, 2, 250, 39, 22, 242, 143, 7, 4,
- 1, 116, 2, 250, 39, 22, 242, 143, 7, 6, 1, 116, 2, 250, 39, 22, 241, 59,
- 48, 7, 4, 1, 116, 2, 250, 39, 22, 241, 59, 48, 7, 6, 1, 116, 2, 250, 39,
- 22, 184, 7, 4, 1, 116, 2, 250, 39, 22, 184, 7, 6, 1, 116, 2, 250, 39, 22,
- 59, 51, 7, 4, 1, 116, 2, 250, 39, 22, 59, 51, 7, 6, 1, 116, 2, 251, 155,
- 22, 142, 7, 4, 1, 116, 2, 251, 155, 22, 142, 7, 6, 1, 116, 2, 251, 155,
- 22, 242, 143, 7, 4, 1, 116, 2, 251, 155, 22, 242, 143, 7, 6, 1, 116, 2,
- 251, 155, 22, 241, 59, 48, 7, 4, 1, 116, 2, 251, 155, 22, 241, 59, 48, 7,
- 6, 1, 116, 2, 251, 155, 22, 184, 7, 4, 1, 116, 2, 251, 155, 22, 184, 7,
- 6, 1, 116, 2, 251, 155, 22, 59, 51, 7, 4, 1, 116, 2, 251, 155, 22, 59,
- 51, 7, 6, 1, 160, 2, 59, 51, 7, 4, 1, 160, 2, 59, 51, 7, 6, 1, 160, 2,
- 241, 59, 48, 7, 4, 1, 160, 2, 241, 59, 48, 7, 6, 1, 160, 2, 184, 7, 4, 1,
- 160, 2, 184, 7, 6, 1, 160, 2, 250, 39, 22, 142, 7, 4, 1, 160, 2, 250, 39,
- 22, 142, 7, 6, 1, 160, 2, 250, 39, 22, 242, 143, 7, 4, 1, 160, 2, 250,
- 39, 22, 242, 143, 7, 6, 1, 160, 2, 250, 39, 22, 241, 59, 48, 7, 4, 1,
- 160, 2, 250, 39, 22, 241, 59, 48, 7, 6, 1, 160, 2, 250, 39, 22, 184, 7,
- 4, 1, 160, 2, 250, 39, 22, 184, 7, 6, 1, 160, 2, 250, 39, 22, 59, 51, 7,
- 4, 1, 160, 2, 250, 39, 22, 59, 51, 7, 6, 1, 240, 161, 2, 241, 59, 48, 7,
- 4, 1, 240, 161, 2, 241, 59, 48, 7, 6, 1, 240, 161, 2, 59, 51, 7, 4, 1,
- 240, 161, 2, 59, 51, 7, 6, 1, 144, 2, 59, 51, 7, 4, 1, 144, 2, 59, 51, 7,
- 6, 1, 144, 2, 241, 59, 48, 7, 4, 1, 144, 2, 241, 59, 48, 7, 6, 1, 144, 2,
- 250, 39, 22, 142, 7, 4, 1, 144, 2, 250, 39, 22, 142, 7, 6, 1, 144, 2,
- 250, 39, 22, 242, 143, 7, 4, 1, 144, 2, 250, 39, 22, 242, 143, 7, 6, 1,
- 144, 2, 250, 39, 22, 241, 59, 48, 7, 4, 1, 144, 2, 250, 39, 22, 241, 59,
- 48, 7, 6, 1, 144, 2, 250, 39, 22, 184, 7, 4, 1, 144, 2, 250, 39, 22, 184,
- 7, 6, 1, 144, 2, 250, 39, 22, 59, 51, 7, 4, 1, 144, 2, 250, 39, 22, 59,
- 51, 7, 6, 1, 144, 2, 241, 0, 22, 142, 7, 4, 1, 144, 2, 241, 0, 22, 142,
- 7, 6, 1, 144, 2, 241, 0, 22, 242, 143, 7, 4, 1, 144, 2, 241, 0, 22, 242,
- 143, 7, 6, 1, 144, 2, 241, 0, 22, 241, 59, 48, 7, 4, 1, 144, 2, 241, 0,
- 22, 241, 59, 48, 7, 6, 1, 144, 2, 241, 0, 22, 184, 7, 4, 1, 144, 2, 241,
- 0, 22, 184, 7, 6, 1, 144, 2, 241, 0, 22, 59, 51, 7, 4, 1, 144, 2, 241, 0,
- 22, 59, 51, 7, 6, 1, 104, 2, 59, 51, 7, 4, 1, 104, 2, 59, 51, 7, 6, 1,
- 104, 2, 241, 59, 48, 7, 4, 1, 104, 2, 241, 59, 48, 7, 6, 1, 104, 2, 241,
- 0, 22, 142, 7, 4, 1, 104, 2, 241, 0, 22, 142, 7, 6, 1, 104, 2, 241, 0,
- 22, 242, 143, 7, 4, 1, 104, 2, 241, 0, 22, 242, 143, 7, 6, 1, 104, 2,
- 241, 0, 22, 241, 59, 48, 7, 4, 1, 104, 2, 241, 0, 22, 241, 59, 48, 7, 6,
- 1, 104, 2, 241, 0, 22, 184, 7, 4, 1, 104, 2, 241, 0, 22, 184, 7, 6, 1,
- 104, 2, 241, 0, 22, 59, 51, 7, 4, 1, 104, 2, 241, 0, 22, 59, 51, 7, 6, 1,
- 211, 118, 2, 242, 143, 7, 4, 1, 211, 118, 2, 242, 143, 7, 6, 1, 211, 118,
- 2, 59, 51, 7, 4, 1, 211, 118, 2, 59, 51, 7, 6, 1, 211, 118, 2, 241, 59,
- 48, 7, 4, 1, 211, 118, 2, 241, 59, 48, 7, 6, 1, 211, 118, 2, 184, 7, 4,
- 1, 211, 118, 2, 184, 7, 6, 1, 230, 228, 232, 191, 7, 4, 1, 230, 228, 232,
- 191, 7, 6, 1, 230, 228, 214, 105, 7, 4, 1, 230, 228, 214, 105, 7, 6, 1,
- 211, 118, 2, 232, 129, 7, 4, 1, 211, 118, 2, 232, 129, 26, 4, 1, 254,
- 152, 2, 224, 157, 26, 4, 1, 254, 152, 2, 248, 161, 26, 4, 1, 254, 152, 2,
- 224, 158, 22, 214, 13, 26, 4, 1, 254, 152, 2, 248, 162, 22, 214, 13, 26,
- 4, 1, 254, 152, 2, 224, 158, 22, 226, 114, 26, 4, 1, 254, 152, 2, 248,
- 162, 22, 226, 114, 26, 4, 1, 254, 152, 2, 224, 158, 22, 225, 178, 26, 4,
- 1, 254, 152, 2, 248, 162, 22, 225, 178, 26, 6, 1, 254, 152, 2, 224, 157,
- 26, 6, 1, 254, 152, 2, 248, 161, 26, 6, 1, 254, 152, 2, 224, 158, 22,
- 214, 13, 26, 6, 1, 254, 152, 2, 248, 162, 22, 214, 13, 26, 6, 1, 254,
- 152, 2, 224, 158, 22, 226, 114, 26, 6, 1, 254, 152, 2, 248, 162, 22, 226,
- 114, 26, 6, 1, 254, 152, 2, 224, 158, 22, 225, 178, 26, 6, 1, 254, 152,
- 2, 248, 162, 22, 225, 178, 26, 4, 1, 245, 109, 2, 224, 157, 26, 4, 1,
- 245, 109, 2, 248, 161, 26, 4, 1, 245, 109, 2, 224, 158, 22, 214, 13, 26,
- 4, 1, 245, 109, 2, 248, 162, 22, 214, 13, 26, 4, 1, 245, 109, 2, 224,
- 158, 22, 226, 114, 26, 4, 1, 245, 109, 2, 248, 162, 22, 226, 114, 26, 6,
- 1, 245, 109, 2, 224, 157, 26, 6, 1, 245, 109, 2, 248, 161, 26, 6, 1, 245,
- 109, 2, 224, 158, 22, 214, 13, 26, 6, 1, 245, 109, 2, 248, 162, 22, 214,
- 13, 26, 6, 1, 245, 109, 2, 224, 158, 22, 226, 114, 26, 6, 1, 245, 109, 2,
- 248, 162, 22, 226, 114, 26, 4, 1, 245, 72, 2, 224, 157, 26, 4, 1, 245,
- 72, 2, 248, 161, 26, 4, 1, 245, 72, 2, 224, 158, 22, 214, 13, 26, 4, 1,
- 245, 72, 2, 248, 162, 22, 214, 13, 26, 4, 1, 245, 72, 2, 224, 158, 22,
- 226, 114, 26, 4, 1, 245, 72, 2, 248, 162, 22, 226, 114, 26, 4, 1, 245,
- 72, 2, 224, 158, 22, 225, 178, 26, 4, 1, 245, 72, 2, 248, 162, 22, 225,
- 178, 26, 6, 1, 245, 72, 2, 224, 157, 26, 6, 1, 245, 72, 2, 248, 161, 26,
- 6, 1, 245, 72, 2, 224, 158, 22, 214, 13, 26, 6, 1, 245, 72, 2, 248, 162,
- 22, 214, 13, 26, 6, 1, 245, 72, 2, 224, 158, 22, 226, 114, 26, 6, 1, 245,
- 72, 2, 248, 162, 22, 226, 114, 26, 6, 1, 245, 72, 2, 224, 158, 22, 225,
- 178, 26, 6, 1, 245, 72, 2, 248, 162, 22, 225, 178, 26, 4, 1, 235, 193, 2,
- 224, 157, 26, 4, 1, 235, 193, 2, 248, 161, 26, 4, 1, 235, 193, 2, 224,
- 158, 22, 214, 13, 26, 4, 1, 235, 193, 2, 248, 162, 22, 214, 13, 26, 4, 1,
- 235, 193, 2, 224, 158, 22, 226, 114, 26, 4, 1, 235, 193, 2, 248, 162, 22,
- 226, 114, 26, 4, 1, 235, 193, 2, 224, 158, 22, 225, 178, 26, 4, 1, 235,
- 193, 2, 248, 162, 22, 225, 178, 26, 6, 1, 235, 193, 2, 224, 157, 26, 6,
- 1, 235, 193, 2, 248, 161, 26, 6, 1, 235, 193, 2, 224, 158, 22, 214, 13,
- 26, 6, 1, 235, 193, 2, 248, 162, 22, 214, 13, 26, 6, 1, 235, 193, 2, 224,
- 158, 22, 226, 114, 26, 6, 1, 235, 193, 2, 248, 162, 22, 226, 114, 26, 6,
- 1, 235, 193, 2, 224, 158, 22, 225, 178, 26, 6, 1, 235, 193, 2, 248, 162,
- 22, 225, 178, 26, 4, 1, 226, 204, 2, 224, 157, 26, 4, 1, 226, 204, 2,
- 248, 161, 26, 4, 1, 226, 204, 2, 224, 158, 22, 214, 13, 26, 4, 1, 226,
- 204, 2, 248, 162, 22, 214, 13, 26, 4, 1, 226, 204, 2, 224, 158, 22, 226,
- 114, 26, 4, 1, 226, 204, 2, 248, 162, 22, 226, 114, 26, 6, 1, 226, 204,
- 2, 224, 157, 26, 6, 1, 226, 204, 2, 248, 161, 26, 6, 1, 226, 204, 2, 224,
- 158, 22, 214, 13, 26, 6, 1, 226, 204, 2, 248, 162, 22, 214, 13, 26, 6, 1,
- 226, 204, 2, 224, 158, 22, 226, 114, 26, 6, 1, 226, 204, 2, 248, 162, 22,
- 226, 114, 26, 4, 1, 214, 158, 2, 224, 157, 26, 4, 1, 214, 158, 2, 248,
- 161, 26, 4, 1, 214, 158, 2, 224, 158, 22, 214, 13, 26, 4, 1, 214, 158, 2,
- 248, 162, 22, 214, 13, 26, 4, 1, 214, 158, 2, 224, 158, 22, 226, 114, 26,
- 4, 1, 214, 158, 2, 248, 162, 22, 226, 114, 26, 4, 1, 214, 158, 2, 224,
- 158, 22, 225, 178, 26, 4, 1, 214, 158, 2, 248, 162, 22, 225, 178, 26, 6,
- 1, 214, 158, 2, 248, 161, 26, 6, 1, 214, 158, 2, 248, 162, 22, 214, 13,
- 26, 6, 1, 214, 158, 2, 248, 162, 22, 226, 114, 26, 6, 1, 214, 158, 2,
- 248, 162, 22, 225, 178, 26, 4, 1, 226, 206, 2, 224, 157, 26, 4, 1, 226,
- 206, 2, 248, 161, 26, 4, 1, 226, 206, 2, 224, 158, 22, 214, 13, 26, 4, 1,
- 226, 206, 2, 248, 162, 22, 214, 13, 26, 4, 1, 226, 206, 2, 224, 158, 22,
- 226, 114, 26, 4, 1, 226, 206, 2, 248, 162, 22, 226, 114, 26, 4, 1, 226,
- 206, 2, 224, 158, 22, 225, 178, 26, 4, 1, 226, 206, 2, 248, 162, 22, 225,
- 178, 26, 6, 1, 226, 206, 2, 224, 157, 26, 6, 1, 226, 206, 2, 248, 161,
- 26, 6, 1, 226, 206, 2, 224, 158, 22, 214, 13, 26, 6, 1, 226, 206, 2, 248,
- 162, 22, 214, 13, 26, 6, 1, 226, 206, 2, 224, 158, 22, 226, 114, 26, 6,
- 1, 226, 206, 2, 248, 162, 22, 226, 114, 26, 6, 1, 226, 206, 2, 224, 158,
- 22, 225, 178, 26, 6, 1, 226, 206, 2, 248, 162, 22, 225, 178, 26, 4, 1,
- 254, 152, 2, 214, 13, 26, 4, 1, 254, 152, 2, 226, 114, 26, 4, 1, 245,
- 109, 2, 214, 13, 26, 4, 1, 245, 109, 2, 226, 114, 26, 4, 1, 245, 72, 2,
- 214, 13, 26, 4, 1, 245, 72, 2, 226, 114, 26, 4, 1, 235, 193, 2, 214, 13,
- 26, 4, 1, 235, 193, 2, 226, 114, 26, 4, 1, 226, 204, 2, 214, 13, 26, 4,
- 1, 226, 204, 2, 226, 114, 26, 4, 1, 214, 158, 2, 214, 13, 26, 4, 1, 214,
- 158, 2, 226, 114, 26, 4, 1, 226, 206, 2, 214, 13, 26, 4, 1, 226, 206, 2,
- 226, 114, 26, 4, 1, 254, 152, 2, 224, 158, 22, 210, 219, 26, 4, 1, 254,
- 152, 2, 248, 162, 22, 210, 219, 26, 4, 1, 254, 152, 2, 224, 158, 22, 214,
- 14, 22, 210, 219, 26, 4, 1, 254, 152, 2, 248, 162, 22, 214, 14, 22, 210,
- 219, 26, 4, 1, 254, 152, 2, 224, 158, 22, 226, 115, 22, 210, 219, 26, 4,
- 1, 254, 152, 2, 248, 162, 22, 226, 115, 22, 210, 219, 26, 4, 1, 254, 152,
- 2, 224, 158, 22, 225, 179, 22, 210, 219, 26, 4, 1, 254, 152, 2, 248, 162,
- 22, 225, 179, 22, 210, 219, 26, 6, 1, 254, 152, 2, 224, 158, 22, 224,
- 170, 26, 6, 1, 254, 152, 2, 248, 162, 22, 224, 170, 26, 6, 1, 254, 152,
- 2, 224, 158, 22, 214, 14, 22, 224, 170, 26, 6, 1, 254, 152, 2, 248, 162,
- 22, 214, 14, 22, 224, 170, 26, 6, 1, 254, 152, 2, 224, 158, 22, 226, 115,
- 22, 224, 170, 26, 6, 1, 254, 152, 2, 248, 162, 22, 226, 115, 22, 224,
- 170, 26, 6, 1, 254, 152, 2, 224, 158, 22, 225, 179, 22, 224, 170, 26, 6,
- 1, 254, 152, 2, 248, 162, 22, 225, 179, 22, 224, 170, 26, 4, 1, 245, 72,
- 2, 224, 158, 22, 210, 219, 26, 4, 1, 245, 72, 2, 248, 162, 22, 210, 219,
- 26, 4, 1, 245, 72, 2, 224, 158, 22, 214, 14, 22, 210, 219, 26, 4, 1, 245,
- 72, 2, 248, 162, 22, 214, 14, 22, 210, 219, 26, 4, 1, 245, 72, 2, 224,
- 158, 22, 226, 115, 22, 210, 219, 26, 4, 1, 245, 72, 2, 248, 162, 22, 226,
- 115, 22, 210, 219, 26, 4, 1, 245, 72, 2, 224, 158, 22, 225, 179, 22, 210,
- 219, 26, 4, 1, 245, 72, 2, 248, 162, 22, 225, 179, 22, 210, 219, 26, 6,
- 1, 245, 72, 2, 224, 158, 22, 224, 170, 26, 6, 1, 245, 72, 2, 248, 162,
- 22, 224, 170, 26, 6, 1, 245, 72, 2, 224, 158, 22, 214, 14, 22, 224, 170,
- 26, 6, 1, 245, 72, 2, 248, 162, 22, 214, 14, 22, 224, 170, 26, 6, 1, 245,
- 72, 2, 224, 158, 22, 226, 115, 22, 224, 170, 26, 6, 1, 245, 72, 2, 248,
- 162, 22, 226, 115, 22, 224, 170, 26, 6, 1, 245, 72, 2, 224, 158, 22, 225,
- 179, 22, 224, 170, 26, 6, 1, 245, 72, 2, 248, 162, 22, 225, 179, 22, 224,
- 170, 26, 4, 1, 226, 206, 2, 224, 158, 22, 210, 219, 26, 4, 1, 226, 206,
- 2, 248, 162, 22, 210, 219, 26, 4, 1, 226, 206, 2, 224, 158, 22, 214, 14,
- 22, 210, 219, 26, 4, 1, 226, 206, 2, 248, 162, 22, 214, 14, 22, 210, 219,
- 26, 4, 1, 226, 206, 2, 224, 158, 22, 226, 115, 22, 210, 219, 26, 4, 1,
- 226, 206, 2, 248, 162, 22, 226, 115, 22, 210, 219, 26, 4, 1, 226, 206, 2,
- 224, 158, 22, 225, 179, 22, 210, 219, 26, 4, 1, 226, 206, 2, 248, 162,
- 22, 225, 179, 22, 210, 219, 26, 6, 1, 226, 206, 2, 224, 158, 22, 224,
- 170, 26, 6, 1, 226, 206, 2, 248, 162, 22, 224, 170, 26, 6, 1, 226, 206,
- 2, 224, 158, 22, 214, 14, 22, 224, 170, 26, 6, 1, 226, 206, 2, 248, 162,
- 22, 214, 14, 22, 224, 170, 26, 6, 1, 226, 206, 2, 224, 158, 22, 226, 115,
- 22, 224, 170, 26, 6, 1, 226, 206, 2, 248, 162, 22, 226, 115, 22, 224,
- 170, 26, 6, 1, 226, 206, 2, 224, 158, 22, 225, 179, 22, 224, 170, 26, 6,
- 1, 226, 206, 2, 248, 162, 22, 225, 179, 22, 224, 170, 26, 4, 1, 254, 152,
- 2, 213, 120, 26, 4, 1, 254, 152, 2, 231, 237, 26, 4, 1, 254, 152, 2, 214,
- 14, 22, 210, 219, 26, 4, 1, 254, 152, 2, 210, 219, 26, 4, 1, 254, 152, 2,
- 226, 115, 22, 210, 219, 26, 4, 1, 254, 152, 2, 225, 178, 26, 4, 1, 254,
- 152, 2, 225, 179, 22, 210, 219, 26, 6, 1, 254, 152, 2, 213, 120, 26, 6,
- 1, 254, 152, 2, 231, 237, 26, 6, 1, 254, 152, 2, 214, 13, 26, 6, 1, 254,
- 152, 2, 226, 114, 26, 6, 1, 254, 152, 2, 224, 170, 26, 234, 8, 26, 224,
- 170, 26, 224, 157, 26, 225, 178, 26, 248, 4, 22, 225, 178, 26, 4, 1, 245,
- 72, 2, 214, 14, 22, 210, 219, 26, 4, 1, 245, 72, 2, 210, 219, 26, 4, 1,
- 245, 72, 2, 226, 115, 22, 210, 219, 26, 4, 1, 245, 72, 2, 225, 178, 26,
- 4, 1, 245, 72, 2, 225, 179, 22, 210, 219, 26, 6, 1, 245, 109, 2, 214, 13,
- 26, 6, 1, 245, 109, 2, 226, 114, 26, 6, 1, 245, 72, 2, 214, 13, 26, 6, 1,
- 245, 72, 2, 226, 114, 26, 6, 1, 245, 72, 2, 224, 170, 26, 224, 158, 22,
- 214, 13, 26, 224, 158, 22, 226, 114, 26, 224, 158, 22, 225, 178, 26, 4,
- 1, 235, 193, 2, 213, 120, 26, 4, 1, 235, 193, 2, 231, 237, 26, 4, 1, 235,
- 193, 2, 248, 4, 22, 214, 13, 26, 4, 1, 235, 193, 2, 248, 4, 22, 226, 114,
- 26, 4, 1, 235, 193, 2, 225, 178, 26, 4, 1, 235, 193, 2, 248, 4, 22, 225,
- 178, 26, 6, 1, 235, 193, 2, 213, 120, 26, 6, 1, 235, 193, 2, 231, 237,
- 26, 6, 1, 235, 193, 2, 214, 13, 26, 6, 1, 235, 193, 2, 226, 114, 26, 248,
- 162, 22, 214, 13, 26, 248, 162, 22, 226, 114, 26, 248, 162, 22, 225, 178,
- 26, 4, 1, 214, 158, 2, 213, 120, 26, 4, 1, 214, 158, 2, 231, 237, 26, 4,
- 1, 214, 158, 2, 248, 4, 22, 214, 13, 26, 4, 1, 214, 158, 2, 248, 4, 22,
- 226, 114, 26, 4, 1, 223, 41, 2, 224, 157, 26, 4, 1, 223, 41, 2, 248, 161,
- 26, 4, 1, 214, 158, 2, 225, 178, 26, 4, 1, 214, 158, 2, 248, 4, 22, 225,
- 178, 26, 6, 1, 214, 158, 2, 213, 120, 26, 6, 1, 214, 158, 2, 231, 237,
- 26, 6, 1, 214, 158, 2, 214, 13, 26, 6, 1, 214, 158, 2, 226, 114, 26, 6,
- 1, 223, 41, 2, 248, 161, 26, 248, 4, 22, 214, 13, 26, 248, 4, 22, 226,
- 114, 26, 214, 13, 26, 4, 1, 226, 206, 2, 214, 14, 22, 210, 219, 26, 4, 1,
- 226, 206, 2, 210, 219, 26, 4, 1, 226, 206, 2, 226, 115, 22, 210, 219, 26,
- 4, 1, 226, 206, 2, 225, 178, 26, 4, 1, 226, 206, 2, 225, 179, 22, 210,
- 219, 26, 6, 1, 226, 204, 2, 214, 13, 26, 6, 1, 226, 204, 2, 226, 114, 26,
- 6, 1, 226, 206, 2, 214, 13, 26, 6, 1, 226, 206, 2, 226, 114, 26, 6, 1,
- 226, 206, 2, 224, 170, 26, 226, 114, 26, 248, 161, 245, 159, 224, 30,
- 245, 168, 224, 30, 245, 159, 219, 20, 245, 168, 219, 20, 216, 142, 219,
- 20, 244, 17, 219, 20, 219, 125, 219, 20, 244, 120, 219, 20, 224, 144,
- 219, 20, 216, 171, 219, 20, 242, 42, 219, 20, 210, 87, 211, 245, 219, 20,
- 210, 87, 211, 245, 228, 72, 210, 87, 211, 245, 235, 69, 233, 44, 79, 222,
- 246, 79, 240, 175, 228, 73, 240, 175, 244, 120, 248, 164, 245, 159, 248,
- 164, 245, 168, 248, 164, 203, 130, 52, 67, 232, 219, 52, 121, 232, 219,
- 43, 219, 157, 224, 1, 79, 44, 219, 157, 224, 1, 79, 219, 157, 232, 115,
- 224, 1, 79, 219, 157, 241, 170, 224, 1, 79, 43, 52, 224, 1, 79, 44, 52,
- 224, 1, 79, 52, 232, 115, 224, 1, 79, 52, 241, 170, 224, 1, 79, 248, 213,
- 52, 248, 213, 251, 121, 215, 223, 251, 121, 123, 59, 233, 62, 113, 59,
- 233, 62, 203, 245, 171, 240, 173, 225, 13, 232, 220, 220, 139, 226, 19,
- 220, 139, 233, 44, 245, 166, 222, 246, 245, 166, 224, 249, 247, 204, 244,
- 27, 233, 44, 226, 121, 222, 246, 226, 121, 229, 199, 228, 78, 219, 20,
- 225, 186, 230, 198, 50, 225, 186, 216, 249, 216, 149, 50, 224, 193, 52,
- 224, 193, 215, 212, 224, 193, 223, 52, 224, 193, 223, 52, 52, 224, 193,
- 223, 52, 215, 212, 224, 193, 250, 246, 219, 157, 233, 48, 254, 118, 224,
- 1, 79, 219, 157, 222, 250, 254, 118, 224, 1, 79, 223, 110, 79, 52, 245,
- 39, 79, 235, 208, 226, 123, 214, 180, 135, 216, 112, 250, 247, 235, 223,
- 225, 13, 253, 222, 240, 176, 251, 121, 244, 10, 219, 97, 43, 42, 251,
- 166, 2, 224, 10, 44, 42, 251, 166, 2, 224, 10, 52, 224, 16, 79, 224, 16,
- 245, 39, 79, 245, 39, 224, 16, 79, 216, 71, 5, 245, 73, 223, 52, 225, 71,
- 50, 85, 140, 251, 121, 85, 97, 251, 121, 121, 253, 224, 223, 52, 220,
- 152, 250, 9, 214, 163, 113, 253, 223, 254, 167, 213, 188, 249, 225, 230,
- 187, 50, 217, 235, 248, 164, 235, 200, 214, 180, 244, 60, 224, 144, 79,
- 134, 59, 224, 143, 224, 27, 224, 193, 244, 19, 59, 224, 143, 244, 89, 59,
- 224, 143, 113, 59, 224, 143, 244, 19, 59, 79, 246, 126, 249, 138, 215,
- 222, 67, 244, 19, 247, 126, 231, 87, 11, 219, 20, 211, 209, 235, 69, 243,
- 234, 254, 60, 235, 198, 216, 86, 235, 198, 220, 139, 235, 198, 225, 25,
- 233, 44, 235, 171, 222, 246, 235, 171, 244, 100, 218, 91, 235, 171, 224,
- 249, 247, 204, 235, 171, 235, 235, 217, 183, 217, 252, 255, 14, 217, 183,
- 217, 252, 235, 235, 9, 244, 28, 220, 82, 255, 14, 9, 244, 28, 220, 82,
- 229, 194, 21, 220, 83, 228, 74, 21, 220, 83, 218, 24, 210, 86, 218, 24,
- 7, 4, 1, 74, 218, 24, 161, 218, 24, 190, 218, 24, 195, 218, 24, 199, 218,
- 24, 196, 218, 24, 201, 218, 24, 96, 50, 218, 24, 230, 186, 218, 24, 245,
- 106, 50, 218, 24, 43, 226, 7, 218, 24, 44, 226, 7, 218, 24, 7, 4, 1, 230,
- 30, 218, 66, 210, 86, 218, 66, 111, 218, 66, 105, 218, 66, 158, 218, 66,
- 161, 218, 66, 190, 218, 66, 195, 218, 66, 199, 218, 66, 196, 218, 66,
- 201, 218, 66, 96, 50, 218, 66, 230, 186, 218, 66, 245, 106, 50, 218, 66,
- 43, 226, 7, 218, 66, 44, 226, 7, 7, 218, 66, 4, 1, 61, 7, 218, 66, 4, 1,
- 76, 7, 218, 66, 4, 1, 78, 7, 218, 66, 4, 1, 211, 178, 7, 218, 66, 4, 1,
- 221, 197, 7, 218, 66, 4, 1, 242, 67, 7, 218, 66, 4, 1, 235, 29, 7, 218,
- 66, 4, 1, 156, 7, 218, 66, 4, 1, 194, 7, 218, 66, 4, 1, 230, 30, 7, 218,
- 66, 4, 1, 226, 109, 7, 218, 66, 4, 1, 222, 93, 7, 218, 66, 4, 1, 217,
- 153, 245, 54, 50, 249, 235, 50, 249, 125, 50, 244, 3, 244, 6, 50, 232,
- 204, 50, 230, 199, 50, 229, 215, 50, 225, 165, 50, 222, 120, 50, 211,
- 217, 50, 166, 220, 51, 50, 247, 135, 50, 245, 55, 50, 234, 82, 50, 215,
- 113, 50, 246, 109, 50, 243, 47, 225, 196, 50, 225, 163, 50, 242, 116, 50,
- 253, 190, 50, 240, 235, 50, 250, 193, 50, 232, 197, 216, 4, 50, 219, 2,
- 50, 216, 246, 50, 235, 248, 222, 120, 50, 215, 97, 232, 204, 50, 38, 43,
- 242, 6, 48, 38, 44, 242, 6, 48, 38, 200, 67, 232, 220, 226, 124, 38, 219,
- 253, 67, 232, 220, 226, 124, 38, 254, 96, 80, 48, 38, 250, 10, 80, 48,
- 38, 43, 80, 48, 38, 44, 80, 48, 38, 222, 237, 226, 124, 38, 250, 10, 222,
- 237, 226, 124, 38, 254, 96, 222, 237, 226, 124, 38, 134, 170, 48, 38,
- 244, 19, 170, 48, 38, 245, 154, 250, 43, 38, 245, 154, 218, 236, 38, 245,
- 154, 248, 0, 38, 245, 154, 250, 44, 252, 188, 38, 43, 44, 80, 48, 38,
- 245, 154, 221, 190, 38, 245, 154, 234, 141, 38, 245, 154, 214, 155, 225,
- 10, 215, 226, 38, 223, 53, 219, 49, 226, 124, 38, 52, 67, 218, 105, 226,
- 124, 38, 254, 106, 87, 38, 215, 212, 214, 182, 38, 211, 247, 251, 148,
- 48, 38, 140, 80, 226, 124, 38, 200, 52, 219, 49, 226, 124, 38, 97, 242,
- 6, 2, 252, 147, 246, 111, 38, 140, 242, 6, 2, 252, 147, 246, 111, 38, 43,
- 80, 51, 38, 44, 80, 51, 38, 253, 225, 48, 255, 20, 226, 235, 255, 4, 216,
- 43, 216, 197, 218, 75, 139, 6, 251, 74, 248, 79, 250, 186, 250, 183, 232,
- 220, 87, 250, 248, 226, 235, 251, 34, 214, 189, 245, 56, 249, 199, 221,
- 187, 248, 79, 244, 187, 119, 4, 243, 209, 119, 6, 242, 67, 251, 227, 6,
- 242, 67, 139, 6, 242, 67, 225, 40, 249, 199, 225, 40, 249, 200, 115, 113,
- 225, 111, 119, 6, 74, 251, 227, 6, 74, 119, 6, 156, 119, 4, 156, 233,
- 155, 57, 252, 149, 87, 139, 6, 230, 30, 227, 200, 50, 219, 33, 223, 122,
- 249, 170, 119, 6, 226, 109, 139, 6, 226, 109, 139, 6, 224, 99, 119, 6,
- 153, 251, 227, 6, 153, 139, 6, 153, 224, 199, 217, 72, 223, 65, 220, 134,
- 79, 217, 2, 50, 215, 254, 164, 50, 213, 240, 139, 6, 210, 159, 226, 137,
- 50, 226, 225, 50, 235, 200, 226, 225, 50, 251, 227, 6, 210, 159, 215, 94,
- 26, 4, 1, 235, 192, 234, 179, 50, 254, 115, 50, 119, 6, 253, 166, 251,
- 227, 6, 251, 74, 245, 76, 87, 119, 4, 76, 119, 6, 76, 119, 6, 245, 14,
- 215, 94, 6, 245, 14, 119, 6, 194, 119, 4, 78, 109, 87, 252, 37, 87, 242,
- 209, 87, 248, 198, 87, 235, 239, 219, 31, 222, 189, 6, 224, 99, 244, 190,
- 50, 139, 4, 225, 111, 139, 4, 243, 114, 139, 6, 243, 114, 139, 6, 225,
- 111, 139, 230, 29, 218, 41, 215, 94, 35, 6, 243, 209, 215, 94, 35, 6,
- 156, 223, 52, 35, 6, 156, 215, 94, 35, 6, 211, 117, 139, 32, 6, 249, 68,
- 139, 32, 4, 249, 68, 139, 32, 4, 76, 139, 32, 4, 74, 139, 32, 4, 235,
- 150, 224, 173, 232, 219, 215, 94, 254, 134, 225, 186, 50, 254, 189, 215,
- 94, 4, 245, 14, 16, 31, 221, 254, 219, 31, 212, 114, 244, 10, 123, 220,
- 120, 212, 114, 244, 10, 123, 228, 199, 212, 114, 244, 10, 123, 216, 242,
- 212, 114, 244, 10, 123, 216, 169, 212, 114, 244, 10, 113, 216, 167, 212,
- 114, 244, 10, 123, 244, 125, 212, 114, 244, 10, 113, 244, 124, 212, 114,
- 244, 10, 134, 244, 124, 212, 114, 244, 10, 244, 19, 244, 124, 212, 114,
- 244, 10, 123, 219, 117, 212, 114, 244, 10, 244, 89, 219, 115, 212, 114,
- 244, 10, 123, 245, 196, 212, 114, 244, 10, 134, 245, 194, 212, 114, 244,
- 10, 244, 89, 245, 194, 212, 114, 244, 10, 220, 124, 245, 194, 244, 10,
- 227, 201, 111, 222, 200, 227, 202, 111, 222, 200, 227, 202, 105, 222,
- 200, 227, 202, 158, 222, 200, 227, 202, 161, 222, 200, 227, 202, 190,
- 222, 200, 227, 202, 195, 222, 200, 227, 202, 199, 222, 200, 227, 202,
- 196, 222, 200, 227, 202, 201, 222, 200, 227, 202, 216, 248, 222, 200,
- 227, 202, 245, 175, 222, 200, 227, 202, 215, 76, 222, 200, 227, 202, 244,
- 122, 222, 200, 227, 202, 123, 240, 217, 222, 200, 227, 202, 244, 89, 240,
- 217, 222, 200, 227, 202, 123, 216, 148, 4, 222, 200, 227, 202, 111, 4,
- 222, 200, 227, 202, 105, 4, 222, 200, 227, 202, 158, 4, 222, 200, 227,
- 202, 161, 4, 222, 200, 227, 202, 190, 4, 222, 200, 227, 202, 195, 4, 222,
- 200, 227, 202, 199, 4, 222, 200, 227, 202, 196, 4, 222, 200, 227, 202,
- 201, 4, 222, 200, 227, 202, 216, 248, 4, 222, 200, 227, 202, 245, 175, 4,
- 222, 200, 227, 202, 215, 76, 4, 222, 200, 227, 202, 244, 122, 4, 222,
- 200, 227, 202, 123, 240, 217, 4, 222, 200, 227, 202, 244, 89, 240, 217,
- 4, 222, 200, 227, 202, 123, 216, 148, 222, 200, 227, 202, 123, 216, 149,
- 251, 75, 249, 68, 222, 200, 227, 202, 244, 89, 216, 148, 222, 200, 227,
- 202, 216, 249, 216, 148, 222, 200, 227, 202, 223, 52, 123, 240, 217, 7,
- 4, 1, 223, 52, 251, 74, 222, 200, 227, 202, 219, 127, 233, 84, 17, 222,
- 200, 227, 202, 244, 123, 245, 234, 17, 222, 200, 227, 202, 244, 123, 216,
- 148, 222, 200, 227, 202, 123, 240, 218, 216, 148, 212, 114, 244, 10, 210,
- 87, 216, 167, 140, 75, 214, 153, 75, 97, 75, 246, 112, 75, 43, 44, 75,
- 120, 124, 75, 228, 61, 212, 9, 75, 228, 61, 245, 228, 75, 219, 30, 245,
- 228, 75, 219, 30, 212, 9, 75, 140, 80, 2, 91, 97, 80, 2, 91, 140, 212,
- 36, 75, 97, 212, 36, 75, 140, 113, 241, 241, 75, 214, 153, 113, 241, 241,
- 75, 97, 113, 241, 241, 75, 246, 112, 113, 241, 241, 75, 140, 80, 2, 217,
- 78, 97, 80, 2, 217, 78, 140, 80, 243, 251, 130, 214, 153, 80, 243, 251,
- 130, 97, 80, 243, 251, 130, 246, 112, 80, 243, 251, 130, 120, 124, 80, 2,
- 252, 135, 140, 80, 2, 103, 97, 80, 2, 103, 140, 80, 2, 232, 129, 97, 80,
- 2, 232, 129, 43, 44, 212, 36, 75, 43, 44, 80, 2, 91, 246, 112, 210, 35,
- 75, 214, 153, 80, 2, 216, 78, 233, 43, 214, 153, 80, 2, 216, 78, 222,
- 244, 246, 112, 80, 2, 216, 78, 233, 43, 246, 112, 80, 2, 216, 78, 222,
- 244, 97, 80, 2, 249, 169, 246, 111, 246, 112, 80, 2, 249, 169, 233, 43,
- 254, 96, 216, 15, 220, 155, 75, 250, 10, 216, 15, 220, 155, 75, 228, 61,
- 212, 9, 80, 216, 43, 200, 130, 140, 80, 216, 43, 252, 149, 115, 97, 80,
- 216, 43, 130, 254, 96, 204, 250, 44, 75, 250, 10, 204, 250, 44, 75, 140,
- 242, 6, 2, 252, 147, 214, 152, 140, 242, 6, 2, 252, 147, 246, 111, 214,
- 153, 242, 6, 2, 252, 147, 222, 244, 214, 153, 242, 6, 2, 252, 147, 233,
- 43, 97, 242, 6, 2, 252, 147, 214, 152, 97, 242, 6, 2, 252, 147, 246, 111,
- 246, 112, 242, 6, 2, 252, 147, 222, 244, 246, 112, 242, 6, 2, 252, 147,
- 233, 43, 97, 80, 115, 140, 75, 214, 153, 80, 140, 64, 246, 112, 75, 140,
- 80, 115, 97, 75, 140, 226, 74, 253, 255, 214, 153, 226, 74, 253, 255, 97,
- 226, 74, 253, 255, 246, 112, 226, 74, 253, 255, 140, 242, 6, 115, 97,
- 242, 5, 97, 242, 6, 115, 140, 242, 5, 140, 52, 80, 2, 91, 43, 44, 52, 80,
- 2, 91, 97, 52, 80, 2, 91, 140, 52, 75, 214, 153, 52, 75, 97, 52, 75, 246,
- 112, 52, 75, 43, 44, 52, 75, 120, 124, 52, 75, 228, 61, 212, 9, 52, 75,
- 228, 61, 245, 228, 52, 75, 219, 30, 245, 228, 52, 75, 219, 30, 212, 9,
- 52, 75, 140, 215, 212, 75, 97, 215, 212, 75, 140, 218, 232, 75, 97, 218,
- 232, 75, 214, 153, 80, 2, 52, 91, 246, 112, 80, 2, 52, 91, 140, 248, 163,
- 75, 214, 153, 248, 163, 75, 97, 248, 163, 75, 246, 112, 248, 163, 75,
- 140, 80, 216, 43, 130, 97, 80, 216, 43, 130, 140, 71, 75, 214, 153, 71,
- 75, 97, 71, 75, 246, 112, 71, 75, 214, 153, 71, 80, 243, 251, 130, 214,
- 153, 71, 80, 226, 201, 225, 217, 214, 153, 71, 80, 226, 201, 225, 218, 2,
- 203, 130, 214, 153, 71, 80, 226, 201, 225, 218, 2, 67, 130, 214, 153, 71,
- 52, 75, 214, 153, 71, 52, 80, 226, 201, 225, 217, 97, 71, 80, 243, 251,
- 212, 56, 228, 61, 212, 9, 80, 216, 43, 249, 168, 219, 30, 245, 228, 80,
- 216, 43, 249, 168, 120, 124, 71, 75, 44, 80, 2, 4, 250, 43, 246, 112, 80,
- 140, 64, 214, 153, 75, 134, 97, 253, 255, 140, 80, 2, 67, 91, 97, 80, 2,
- 67, 91, 43, 44, 80, 2, 67, 91, 140, 80, 2, 52, 67, 91, 97, 80, 2, 52, 67,
- 91, 43, 44, 80, 2, 52, 67, 91, 140, 226, 177, 75, 97, 226, 177, 75, 43,
- 44, 226, 177, 75, 31, 254, 163, 249, 222, 226, 1, 247, 241, 216, 188,
- 245, 35, 216, 188, 247, 146, 228, 57, 245, 36, 245, 160, 220, 129, 235,
- 252, 229, 226, 245, 178, 226, 235, 228, 57, 254, 132, 245, 178, 226, 235,
- 4, 245, 178, 226, 235, 249, 194, 253, 246, 231, 67, 247, 146, 228, 57,
- 249, 196, 253, 246, 231, 67, 4, 249, 194, 253, 246, 231, 67, 245, 151,
- 64, 224, 175, 230, 29, 224, 183, 230, 29, 249, 173, 230, 29, 218, 41,
- 230, 187, 50, 230, 185, 50, 59, 225, 25, 247, 177, 219, 97, 220, 130,
- 230, 186, 253, 225, 226, 171, 222, 237, 226, 171, 251, 122, 226, 171, 42,
- 222, 195, 249, 117, 222, 195, 244, 12, 222, 195, 224, 171, 112, 235, 241,
- 44, 254, 117, 254, 117, 231, 93, 254, 117, 219, 1, 254, 117, 247, 179,
- 247, 146, 228, 57, 247, 182, 226, 12, 112, 228, 57, 226, 12, 112, 232,
- 152, 254, 126, 232, 152, 226, 162, 235, 205, 214, 175, 235, 218, 52, 235,
- 218, 215, 212, 235, 218, 249, 190, 235, 218, 218, 14, 235, 218, 213, 129,
- 235, 218, 250, 10, 235, 218, 250, 10, 249, 190, 235, 218, 254, 96, 249,
- 190, 235, 218, 216, 187, 252, 75, 223, 140, 224, 172, 59, 230, 186, 245,
- 41, 243, 53, 224, 172, 241, 64, 216, 90, 226, 171, 223, 52, 184, 235,
- 200, 233, 71, 222, 93, 219, 159, 212, 35, 211, 200, 224, 183, 228, 57,
- 184, 230, 187, 184, 253, 218, 128, 112, 228, 57, 253, 218, 128, 112, 254,
- 56, 128, 112, 254, 56, 251, 96, 228, 57, 255, 13, 128, 112, 229, 105,
- 254, 56, 228, 64, 255, 13, 128, 112, 254, 156, 128, 112, 228, 57, 254,
- 156, 128, 112, 254, 156, 128, 177, 128, 112, 215, 212, 184, 254, 164,
- 128, 112, 245, 102, 112, 243, 52, 245, 102, 112, 247, 242, 252, 31, 254,
- 58, 216, 197, 232, 227, 243, 52, 128, 112, 254, 56, 128, 216, 43, 177,
- 216, 197, 236, 22, 226, 235, 236, 22, 64, 177, 254, 56, 128, 112, 249,
- 235, 245, 105, 245, 106, 249, 234, 222, 237, 236, 7, 128, 112, 222, 237,
- 128, 112, 249, 162, 112, 245, 75, 245, 104, 112, 218, 159, 245, 105, 248,
- 63, 128, 112, 128, 216, 43, 251, 86, 248, 80, 231, 93, 251, 85, 224, 14,
- 128, 112, 228, 57, 128, 112, 240, 111, 112, 228, 57, 240, 111, 112, 218,
- 111, 245, 102, 112, 233, 21, 177, 128, 112, 242, 137, 177, 128, 112, 233,
- 21, 115, 128, 112, 242, 137, 115, 128, 112, 233, 21, 251, 96, 228, 57,
- 128, 112, 242, 137, 251, 96, 228, 57, 128, 112, 230, 102, 233, 20, 230,
- 102, 242, 136, 252, 31, 228, 57, 245, 102, 112, 228, 57, 233, 20, 228,
- 57, 242, 136, 229, 105, 233, 21, 228, 64, 128, 112, 229, 105, 242, 137,
- 228, 64, 128, 112, 233, 21, 177, 245, 102, 112, 242, 137, 177, 245, 102,
- 112, 229, 105, 233, 21, 228, 64, 245, 102, 112, 229, 105, 242, 137, 228,
- 64, 245, 102, 112, 233, 21, 177, 242, 136, 242, 137, 177, 233, 20, 229,
- 105, 233, 21, 228, 64, 242, 136, 229, 105, 242, 137, 228, 64, 233, 20,
- 224, 205, 218, 56, 224, 206, 177, 128, 112, 218, 57, 177, 128, 112, 224,
- 206, 177, 245, 102, 112, 218, 57, 177, 245, 102, 112, 247, 146, 228, 57,
- 224, 208, 247, 146, 228, 57, 218, 58, 218, 65, 226, 235, 218, 23, 226,
- 235, 228, 57, 116, 218, 65, 226, 235, 228, 57, 116, 218, 23, 226, 235,
- 218, 65, 64, 177, 128, 112, 218, 23, 64, 177, 128, 112, 229, 105, 116,
- 218, 65, 64, 228, 64, 128, 112, 229, 105, 116, 218, 23, 64, 228, 64, 128,
- 112, 218, 65, 64, 2, 228, 57, 128, 112, 218, 23, 64, 2, 228, 57, 128,
- 112, 230, 86, 230, 87, 230, 88, 230, 87, 214, 175, 42, 236, 22, 226, 235,
- 42, 226, 154, 226, 235, 42, 236, 22, 64, 177, 128, 112, 42, 226, 154, 64,
- 177, 128, 112, 42, 251, 3, 42, 249, 110, 37, 225, 25, 37, 230, 186, 37,
- 216, 86, 37, 247, 177, 219, 97, 37, 59, 226, 171, 37, 222, 237, 226, 171,
- 37, 253, 225, 226, 171, 37, 245, 105, 37, 248, 164, 92, 225, 25, 92, 230,
- 186, 92, 216, 86, 92, 59, 226, 171, 44, 217, 88, 43, 217, 88, 124, 217,
- 88, 120, 217, 88, 253, 228, 230, 161, 215, 192, 244, 33, 215, 212, 67,
- 252, 149, 44, 215, 93, 52, 67, 252, 149, 52, 44, 215, 93, 247, 146, 228,
- 57, 224, 166, 228, 57, 215, 192, 247, 146, 228, 57, 244, 34, 229, 107,
- 52, 67, 252, 149, 52, 44, 215, 93, 224, 206, 214, 184, 223, 94, 218, 57,
- 214, 184, 223, 94, 228, 62, 218, 78, 226, 235, 249, 194, 253, 246, 228,
- 62, 218, 77, 228, 62, 218, 78, 64, 177, 128, 112, 249, 194, 253, 246,
- 228, 62, 218, 78, 177, 128, 112, 226, 154, 226, 235, 236, 22, 226, 235,
- 230, 92, 241, 207, 249, 204, 231, 142, 235, 215, 211, 145, 229, 207, 228,
- 63, 44, 254, 118, 2, 254, 33, 44, 215, 226, 230, 29, 232, 152, 254, 126,
- 230, 29, 232, 152, 226, 162, 230, 29, 235, 205, 230, 29, 214, 175, 248,
- 1, 226, 171, 59, 226, 171, 218, 159, 226, 171, 247, 177, 216, 86, 251,
- 172, 43, 228, 62, 244, 189, 220, 151, 224, 183, 44, 228, 62, 244, 189,
- 220, 151, 224, 183, 43, 220, 151, 224, 183, 44, 220, 151, 224, 183, 223,
- 52, 216, 90, 245, 105, 249, 107, 232, 152, 226, 162, 249, 107, 232, 152,
- 254, 126, 52, 218, 64, 52, 218, 22, 52, 235, 205, 52, 214, 175, 225, 50,
- 128, 22, 226, 12, 112, 233, 21, 2, 247, 128, 242, 137, 2, 247, 128, 213,
- 187, 230, 102, 233, 20, 213, 187, 230, 102, 242, 136, 233, 21, 128, 216,
- 43, 177, 242, 136, 242, 137, 128, 216, 43, 177, 233, 20, 128, 216, 43,
- 177, 233, 20, 128, 216, 43, 177, 242, 136, 128, 216, 43, 177, 224, 205,
- 128, 216, 43, 177, 218, 56, 247, 146, 228, 57, 224, 209, 177, 245, 107,
- 247, 146, 228, 57, 218, 59, 177, 245, 107, 228, 57, 42, 236, 22, 64, 177,
- 128, 112, 228, 57, 42, 226, 154, 64, 177, 128, 112, 42, 236, 22, 64, 177,
- 228, 57, 128, 112, 42, 226, 154, 64, 177, 228, 57, 128, 112, 233, 21,
- 251, 96, 228, 57, 245, 102, 112, 242, 137, 251, 96, 228, 57, 245, 102,
- 112, 224, 206, 251, 96, 228, 57, 245, 102, 112, 218, 57, 251, 96, 228,
- 57, 245, 102, 112, 228, 57, 228, 62, 218, 78, 226, 235, 247, 146, 228,
- 57, 249, 196, 253, 246, 228, 62, 218, 77, 228, 57, 228, 62, 218, 78, 64,
- 177, 128, 112, 247, 146, 228, 57, 249, 196, 253, 246, 228, 62, 218, 78,
- 177, 245, 107, 67, 245, 171, 230, 227, 203, 245, 171, 120, 44, 248, 7,
- 245, 171, 124, 44, 248, 7, 245, 171, 245, 178, 64, 2, 200, 203, 91, 245,
- 178, 64, 2, 67, 252, 149, 253, 215, 245, 151, 64, 203, 91, 4, 245, 178,
- 64, 2, 67, 252, 149, 253, 215, 245, 151, 64, 203, 91, 245, 178, 64, 2,
- 59, 48, 245, 178, 64, 2, 226, 127, 4, 245, 178, 64, 2, 226, 127, 245,
- 178, 64, 2, 214, 183, 245, 178, 64, 2, 113, 203, 218, 92, 249, 194, 2,
- 200, 203, 91, 249, 194, 2, 67, 252, 149, 253, 215, 245, 151, 64, 203, 91,
- 4, 249, 194, 2, 67, 252, 149, 253, 215, 245, 151, 64, 203, 91, 249, 194,
- 2, 226, 127, 4, 249, 194, 2, 226, 127, 210, 160, 189, 252, 181, 231, 66,
- 248, 2, 50, 245, 180, 75, 240, 241, 120, 254, 1, 124, 254, 1, 224, 178,
- 225, 168, 212, 32, 232, 219, 43, 250, 189, 44, 250, 189, 43, 244, 65, 44,
- 244, 65, 251, 183, 44, 249, 140, 251, 183, 43, 249, 140, 216, 15, 44,
- 249, 140, 216, 15, 43, 249, 140, 223, 52, 228, 57, 50, 42, 232, 110, 254,
- 33, 221, 166, 221, 173, 217, 2, 223, 123, 224, 244, 235, 245, 213, 165,
- 218, 236, 225, 44, 64, 235, 214, 50, 215, 94, 228, 57, 50, 212, 42, 240,
- 243, 216, 15, 43, 249, 168, 216, 15, 44, 249, 168, 251, 183, 43, 249,
- 168, 251, 183, 44, 249, 168, 216, 15, 163, 235, 218, 251, 183, 163, 235,
- 218, 243, 248, 219, 77, 120, 254, 2, 252, 32, 113, 203, 252, 137, 226,
- 164, 234, 144, 245, 98, 216, 43, 216, 197, 222, 254, 211, 179, 236, 7,
- 116, 223, 120, 251, 171, 234, 143, 233, 48, 254, 118, 127, 222, 250, 254,
- 118, 127, 245, 98, 216, 43, 216, 197, 233, 52, 252, 43, 222, 236, 249,
- 78, 254, 164, 254, 9, 217, 182, 216, 5, 222, 125, 247, 223, 226, 155,
- 249, 206, 217, 53, 219, 88, 249, 159, 249, 158, 254, 74, 243, 232, 16,
- 240, 158, 254, 74, 243, 232, 16, 218, 230, 224, 30, 254, 74, 243, 232,
- 16, 224, 31, 245, 107, 254, 74, 243, 232, 16, 224, 31, 247, 182, 254, 74,
- 243, 232, 16, 224, 31, 248, 0, 254, 74, 243, 232, 16, 224, 31, 235, 62,
- 254, 74, 243, 232, 16, 224, 31, 250, 43, 254, 74, 243, 232, 16, 250, 44,
- 218, 137, 254, 74, 243, 232, 16, 250, 44, 235, 62, 254, 74, 243, 232, 16,
- 219, 98, 130, 254, 74, 243, 232, 16, 252, 189, 130, 254, 74, 243, 232,
- 16, 224, 31, 219, 97, 254, 74, 243, 232, 16, 224, 31, 252, 188, 254, 74,
- 243, 232, 16, 224, 31, 233, 20, 254, 74, 243, 232, 16, 224, 31, 242, 136,
- 254, 74, 243, 232, 16, 140, 214, 19, 254, 74, 243, 232, 16, 97, 214, 19,
- 254, 74, 243, 232, 16, 224, 31, 140, 75, 254, 74, 243, 232, 16, 224, 31,
- 97, 75, 254, 74, 243, 232, 16, 250, 44, 252, 188, 254, 74, 243, 232, 16,
- 124, 217, 89, 214, 183, 254, 74, 243, 232, 16, 248, 63, 218, 137, 254,
- 74, 243, 232, 16, 224, 31, 124, 250, 246, 254, 74, 243, 232, 16, 224, 31,
- 248, 62, 254, 74, 243, 232, 16, 124, 217, 89, 235, 62, 254, 74, 243, 232,
- 16, 214, 153, 214, 19, 254, 74, 243, 232, 16, 224, 31, 214, 153, 75, 254,
- 74, 243, 232, 16, 120, 217, 89, 226, 127, 254, 74, 243, 232, 16, 248, 74,
- 218, 137, 254, 74, 243, 232, 16, 224, 31, 120, 250, 246, 254, 74, 243,
- 232, 16, 224, 31, 248, 73, 254, 74, 243, 232, 16, 120, 217, 89, 235, 62,
- 254, 74, 243, 232, 16, 246, 112, 214, 19, 254, 74, 243, 232, 16, 224, 31,
- 246, 112, 75, 254, 74, 243, 232, 16, 224, 0, 214, 183, 254, 74, 243, 232,
- 16, 248, 63, 214, 183, 254, 74, 243, 232, 16, 248, 1, 214, 183, 254, 74,
- 243, 232, 16, 235, 63, 214, 183, 254, 74, 243, 232, 16, 250, 44, 214,
- 183, 254, 74, 243, 232, 16, 120, 220, 7, 235, 62, 254, 74, 243, 232, 16,
- 224, 0, 224, 30, 254, 74, 243, 232, 16, 250, 44, 218, 158, 254, 74, 243,
- 232, 16, 224, 31, 249, 234, 254, 74, 243, 232, 16, 120, 217, 89, 248, 9,
- 254, 74, 243, 232, 16, 248, 74, 248, 9, 254, 74, 243, 232, 16, 218, 159,
- 248, 9, 254, 74, 243, 232, 16, 235, 63, 248, 9, 254, 74, 243, 232, 16,
- 250, 44, 248, 9, 254, 74, 243, 232, 16, 124, 220, 7, 218, 137, 254, 74,
- 243, 232, 16, 43, 220, 7, 218, 137, 254, 74, 243, 232, 16, 216, 90, 248,
- 9, 254, 74, 243, 232, 16, 242, 137, 248, 9, 254, 74, 243, 232, 16, 249,
- 228, 130, 254, 74, 243, 232, 16, 248, 74, 184, 254, 74, 243, 232, 16,
- 210, 34, 254, 74, 243, 232, 16, 218, 138, 184, 254, 74, 243, 232, 16,
- 220, 153, 214, 183, 254, 74, 243, 232, 16, 224, 31, 228, 57, 245, 107,
- 254, 74, 243, 232, 16, 224, 31, 224, 15, 254, 74, 243, 232, 16, 124, 250,
- 247, 184, 254, 74, 243, 232, 16, 120, 250, 247, 184, 254, 74, 243, 232,
- 16, 235, 192, 254, 74, 243, 232, 16, 223, 40, 254, 74, 243, 232, 16, 226,
- 205, 254, 74, 243, 232, 16, 254, 152, 214, 183, 254, 74, 243, 232, 16,
- 245, 109, 214, 183, 254, 74, 243, 232, 16, 235, 193, 214, 183, 254, 74,
- 243, 232, 16, 226, 206, 214, 183, 254, 74, 243, 232, 16, 254, 151, 228,
- 57, 250, 138, 79, 44, 254, 118, 2, 246, 112, 210, 35, 75, 219, 237, 204,
- 251, 171, 252, 53, 87, 67, 232, 220, 2, 230, 229, 247, 128, 235, 223, 87,
- 249, 191, 214, 181, 87, 247, 197, 214, 181, 87, 245, 162, 87, 249, 218,
- 87, 71, 42, 2, 250, 183, 67, 232, 219, 245, 138, 87, 254, 147, 234, 145,
- 87, 241, 220, 87, 37, 203, 252, 149, 2, 228, 55, 37, 215, 227, 246, 114,
- 251, 143, 250, 44, 2, 228, 59, 75, 214, 179, 87, 230, 142, 87, 240, 171,
- 87, 226, 178, 242, 66, 87, 226, 178, 233, 153, 87, 225, 248, 87, 225,
- 247, 87, 247, 205, 249, 105, 16, 244, 28, 105, 219, 52, 87, 254, 74, 243,
- 232, 16, 224, 30, 248, 91, 220, 140, 234, 145, 87, 224, 195, 226, 79,
- 229, 87, 226, 79, 224, 191, 221, 191, 87, 250, 25, 221, 191, 87, 43, 226,
- 8, 214, 160, 103, 43, 226, 8, 245, 29, 43, 226, 8, 232, 114, 103, 44,
- 226, 8, 214, 160, 103, 44, 226, 8, 245, 29, 44, 226, 8, 232, 114, 103,
- 43, 42, 251, 166, 214, 160, 249, 168, 43, 42, 251, 166, 245, 29, 43, 42,
- 251, 166, 232, 114, 249, 168, 44, 42, 251, 166, 214, 160, 249, 168, 44,
- 42, 251, 166, 245, 29, 44, 42, 251, 166, 232, 114, 249, 168, 43, 249,
- 107, 251, 166, 214, 160, 103, 43, 249, 107, 251, 166, 230, 229, 225, 104,
- 43, 249, 107, 251, 166, 232, 114, 103, 249, 107, 251, 166, 245, 29, 44,
- 249, 107, 251, 166, 214, 160, 103, 44, 249, 107, 251, 166, 230, 229, 225,
- 104, 44, 249, 107, 251, 166, 232, 114, 103, 235, 219, 245, 29, 203, 232,
- 220, 245, 29, 214, 160, 43, 177, 232, 114, 44, 249, 107, 251, 166, 221,
- 174, 214, 160, 44, 177, 232, 114, 43, 249, 107, 251, 166, 221, 174, 218,
- 42, 216, 14, 218, 42, 251, 182, 216, 15, 42, 127, 251, 183, 42, 127, 251,
- 183, 42, 251, 166, 115, 216, 15, 42, 127, 34, 16, 251, 182, 43, 67, 93,
- 232, 219, 44, 67, 93, 232, 219, 203, 221, 207, 232, 218, 203, 221, 207,
- 232, 217, 203, 221, 207, 232, 216, 203, 221, 207, 232, 215, 248, 54, 16,
- 193, 67, 22, 216, 15, 222, 254, 248, 54, 16, 193, 67, 22, 251, 183, 222,
- 254, 248, 54, 16, 193, 67, 2, 250, 43, 248, 54, 16, 193, 124, 22, 203, 2,
- 250, 43, 248, 54, 16, 193, 120, 22, 203, 2, 250, 43, 248, 54, 16, 193,
- 67, 2, 215, 226, 248, 54, 16, 193, 124, 22, 203, 2, 215, 226, 248, 54,
- 16, 193, 120, 22, 203, 2, 215, 226, 248, 54, 16, 193, 67, 22, 212, 35,
- 248, 54, 16, 193, 124, 22, 203, 2, 212, 35, 248, 54, 16, 193, 120, 22,
- 203, 2, 212, 35, 248, 54, 16, 193, 124, 22, 241, 51, 248, 54, 16, 193,
- 120, 22, 241, 51, 248, 54, 16, 193, 67, 22, 216, 15, 233, 52, 248, 54,
- 16, 193, 67, 22, 251, 183, 233, 52, 42, 244, 40, 223, 57, 87, 245, 190,
- 87, 67, 232, 220, 245, 29, 231, 38, 251, 154, 231, 38, 200, 115, 219,
- 252, 231, 38, 219, 253, 115, 232, 143, 231, 38, 200, 115, 113, 219, 239,
- 231, 38, 113, 219, 240, 115, 232, 143, 231, 38, 113, 219, 240, 235, 70,
- 231, 38, 215, 209, 231, 38, 216, 224, 231, 38, 225, 191, 245, 232, 242,
- 129, 243, 226, 216, 15, 226, 7, 251, 183, 226, 7, 216, 15, 249, 107, 127,
- 251, 183, 249, 107, 127, 216, 15, 216, 7, 220, 55, 127, 251, 183, 216, 7,
- 220, 55, 127, 71, 215, 240, 252, 43, 222, 237, 2, 250, 43, 218, 122, 244,
- 72, 255, 26, 249, 104, 245, 179, 235, 205, 248, 91, 245, 32, 87, 85, 222,
- 250, 52, 215, 226, 85, 233, 48, 52, 215, 226, 85, 214, 162, 52, 215, 226,
- 85, 246, 113, 52, 215, 226, 85, 222, 250, 52, 215, 227, 2, 67, 130, 85,
- 233, 48, 52, 215, 227, 2, 67, 130, 85, 222, 250, 215, 227, 2, 52, 67,
- 130, 254, 182, 250, 11, 218, 128, 216, 87, 250, 11, 240, 244, 2, 244, 58,
- 221, 243, 16, 31, 227, 206, 16, 31, 218, 154, 64, 241, 240, 16, 31, 218,
- 154, 64, 216, 213, 16, 31, 245, 151, 64, 216, 213, 16, 31, 245, 151, 64,
- 215, 244, 16, 31, 245, 140, 16, 31, 255, 16, 16, 31, 252, 52, 16, 31,
- 252, 187, 16, 31, 203, 217, 90, 16, 31, 232, 220, 244, 153, 16, 31, 67,
- 217, 90, 16, 31, 244, 28, 244, 153, 16, 31, 250, 238, 223, 56, 16, 31,
- 220, 30, 226, 134, 16, 31, 220, 30, 236, 6, 16, 31, 248, 159, 232, 210,
- 245, 85, 16, 31, 248, 39, 249, 186, 111, 16, 31, 248, 39, 249, 186, 105,
- 16, 31, 248, 39, 249, 186, 158, 16, 31, 248, 39, 249, 186, 161, 16, 31,
- 152, 255, 16, 16, 31, 217, 178, 236, 69, 16, 31, 245, 151, 64, 215, 245,
- 251, 221, 16, 31, 251, 13, 16, 31, 245, 151, 64, 231, 86, 16, 31, 218,
- 62, 16, 31, 245, 85, 16, 31, 244, 115, 220, 139, 16, 31, 242, 128, 220,
- 139, 16, 31, 223, 124, 220, 139, 16, 31, 214, 174, 220, 139, 16, 31, 219,
- 20, 16, 31, 248, 71, 251, 224, 87, 204, 251, 171, 16, 31, 229, 90, 16,
- 31, 248, 72, 244, 28, 105, 16, 31, 218, 63, 244, 28, 105, 226, 245, 103,
- 226, 245, 250, 160, 226, 245, 244, 31, 226, 245, 235, 200, 244, 31, 226,
- 245, 252, 50, 251, 132, 226, 245, 251, 178, 216, 112, 226, 245, 251, 163,
- 252, 154, 240, 110, 226, 245, 254, 135, 64, 250, 137, 226, 245, 248, 164,
- 226, 245, 249, 95, 255, 20, 227, 204, 226, 245, 52, 252, 188, 37, 21,
- 111, 37, 21, 105, 37, 21, 158, 37, 21, 161, 37, 21, 190, 37, 21, 195, 37,
- 21, 199, 37, 21, 196, 37, 21, 201, 37, 54, 216, 248, 37, 54, 245, 175,
- 37, 54, 215, 76, 37, 54, 216, 165, 37, 54, 244, 13, 37, 54, 244, 126, 37,
- 54, 219, 121, 37, 54, 220, 121, 37, 54, 245, 198, 37, 54, 228, 202, 37,
- 54, 215, 73, 88, 21, 111, 88, 21, 105, 88, 21, 158, 88, 21, 161, 88, 21,
- 190, 88, 21, 195, 88, 21, 199, 88, 21, 196, 88, 21, 201, 88, 54, 216,
- 248, 88, 54, 245, 175, 88, 54, 215, 76, 88, 54, 216, 165, 88, 54, 244,
- 13, 88, 54, 244, 126, 88, 54, 219, 121, 88, 54, 220, 121, 88, 54, 245,
- 198, 88, 54, 228, 202, 88, 54, 215, 73, 21, 123, 243, 236, 218, 131, 21,
- 113, 243, 236, 218, 131, 21, 134, 243, 236, 218, 131, 21, 244, 19, 243,
- 236, 218, 131, 21, 244, 89, 243, 236, 218, 131, 21, 219, 127, 243, 236,
- 218, 131, 21, 220, 124, 243, 236, 218, 131, 21, 245, 201, 243, 236, 218,
- 131, 21, 228, 205, 243, 236, 218, 131, 54, 216, 249, 243, 236, 218, 131,
- 54, 245, 176, 243, 236, 218, 131, 54, 215, 77, 243, 236, 218, 131, 54,
- 216, 166, 243, 236, 218, 131, 54, 244, 14, 243, 236, 218, 131, 54, 244,
- 127, 243, 236, 218, 131, 54, 219, 122, 243, 236, 218, 131, 54, 220, 122,
- 243, 236, 218, 131, 54, 245, 199, 243, 236, 218, 131, 54, 228, 203, 243,
- 236, 218, 131, 54, 215, 74, 243, 236, 218, 131, 88, 7, 4, 1, 61, 88, 7,
- 4, 1, 253, 166, 88, 7, 4, 1, 251, 74, 88, 7, 4, 1, 249, 68, 88, 7, 4, 1,
- 76, 88, 7, 4, 1, 245, 14, 88, 7, 4, 1, 243, 209, 88, 7, 4, 1, 242, 67,
- 88, 7, 4, 1, 74, 88, 7, 4, 1, 235, 150, 88, 7, 4, 1, 235, 29, 88, 7, 4,
- 1, 156, 88, 7, 4, 1, 194, 88, 7, 4, 1, 230, 30, 88, 7, 4, 1, 78, 88, 7,
- 4, 1, 226, 109, 88, 7, 4, 1, 224, 99, 88, 7, 4, 1, 153, 88, 7, 4, 1, 222,
- 93, 88, 7, 4, 1, 217, 153, 88, 7, 4, 1, 69, 88, 7, 4, 1, 214, 105, 88, 7,
- 4, 1, 212, 98, 88, 7, 4, 1, 211, 178, 88, 7, 4, 1, 211, 117, 88, 7, 4, 1,
- 210, 159, 37, 7, 6, 1, 61, 37, 7, 6, 1, 253, 166, 37, 7, 6, 1, 251, 74,
- 37, 7, 6, 1, 249, 68, 37, 7, 6, 1, 76, 37, 7, 6, 1, 245, 14, 37, 7, 6, 1,
- 243, 209, 37, 7, 6, 1, 242, 67, 37, 7, 6, 1, 74, 37, 7, 6, 1, 235, 150,
- 37, 7, 6, 1, 235, 29, 37, 7, 6, 1, 156, 37, 7, 6, 1, 194, 37, 7, 6, 1,
- 230, 30, 37, 7, 6, 1, 78, 37, 7, 6, 1, 226, 109, 37, 7, 6, 1, 224, 99,
- 37, 7, 6, 1, 153, 37, 7, 6, 1, 222, 93, 37, 7, 6, 1, 217, 153, 37, 7, 6,
- 1, 69, 37, 7, 6, 1, 214, 105, 37, 7, 6, 1, 212, 98, 37, 7, 6, 1, 211,
- 178, 37, 7, 6, 1, 211, 117, 37, 7, 6, 1, 210, 159, 37, 7, 4, 1, 61, 37,
- 7, 4, 1, 253, 166, 37, 7, 4, 1, 251, 74, 37, 7, 4, 1, 249, 68, 37, 7, 4,
- 1, 76, 37, 7, 4, 1, 245, 14, 37, 7, 4, 1, 243, 209, 37, 7, 4, 1, 242, 67,
- 37, 7, 4, 1, 74, 37, 7, 4, 1, 235, 150, 37, 7, 4, 1, 235, 29, 37, 7, 4,
- 1, 156, 37, 7, 4, 1, 194, 37, 7, 4, 1, 230, 30, 37, 7, 4, 1, 78, 37, 7,
- 4, 1, 226, 109, 37, 7, 4, 1, 224, 99, 37, 7, 4, 1, 153, 37, 7, 4, 1, 222,
- 93, 37, 7, 4, 1, 217, 153, 37, 7, 4, 1, 69, 37, 7, 4, 1, 214, 105, 37, 7,
- 4, 1, 212, 98, 37, 7, 4, 1, 211, 178, 37, 7, 4, 1, 211, 117, 37, 7, 4, 1,
- 210, 159, 37, 21, 210, 86, 152, 37, 54, 245, 175, 152, 37, 54, 215, 76,
- 152, 37, 54, 216, 165, 152, 37, 54, 244, 13, 152, 37, 54, 244, 126, 152,
- 37, 54, 219, 121, 152, 37, 54, 220, 121, 152, 37, 54, 245, 198, 152, 37,
- 54, 228, 202, 152, 37, 54, 215, 73, 52, 37, 21, 111, 52, 37, 21, 105, 52,
- 37, 21, 158, 52, 37, 21, 161, 52, 37, 21, 190, 52, 37, 21, 195, 52, 37,
- 21, 199, 52, 37, 21, 196, 52, 37, 21, 201, 52, 37, 54, 216, 248, 152, 37,
- 21, 210, 86, 93, 99, 193, 241, 51, 93, 99, 114, 241, 51, 93, 99, 193,
- 213, 239, 93, 99, 114, 213, 239, 93, 99, 193, 215, 212, 248, 165, 241,
- 51, 93, 99, 114, 215, 212, 248, 165, 241, 51, 93, 99, 193, 215, 212, 248,
- 165, 213, 239, 93, 99, 114, 215, 212, 248, 165, 213, 239, 93, 99, 193,
- 224, 27, 248, 165, 241, 51, 93, 99, 114, 224, 27, 248, 165, 241, 51, 93,
- 99, 193, 224, 27, 248, 165, 213, 239, 93, 99, 114, 224, 27, 248, 165,
- 213, 239, 93, 99, 193, 124, 22, 222, 254, 93, 99, 124, 193, 22, 44, 241,
- 228, 93, 99, 124, 114, 22, 44, 232, 236, 93, 99, 114, 124, 22, 222, 254,
- 93, 99, 193, 124, 22, 233, 52, 93, 99, 124, 193, 22, 43, 241, 228, 93,
- 99, 124, 114, 22, 43, 232, 236, 93, 99, 114, 124, 22, 233, 52, 93, 99,
- 193, 120, 22, 222, 254, 93, 99, 120, 193, 22, 44, 241, 228, 93, 99, 120,
- 114, 22, 44, 232, 236, 93, 99, 114, 120, 22, 222, 254, 93, 99, 193, 120,
- 22, 233, 52, 93, 99, 120, 193, 22, 43, 241, 228, 93, 99, 120, 114, 22,
- 43, 232, 236, 93, 99, 114, 120, 22, 233, 52, 93, 99, 193, 67, 22, 222,
- 254, 93, 99, 67, 193, 22, 44, 241, 228, 93, 99, 120, 114, 22, 44, 124,
- 232, 236, 93, 99, 124, 114, 22, 44, 120, 232, 236, 93, 99, 67, 114, 22,
- 44, 232, 236, 93, 99, 124, 193, 22, 44, 120, 241, 228, 93, 99, 120, 193,
- 22, 44, 124, 241, 228, 93, 99, 114, 67, 22, 222, 254, 93, 99, 193, 67,
- 22, 233, 52, 93, 99, 67, 193, 22, 43, 241, 228, 93, 99, 120, 114, 22, 43,
- 124, 232, 236, 93, 99, 124, 114, 22, 43, 120, 232, 236, 93, 99, 67, 114,
- 22, 43, 232, 236, 93, 99, 124, 193, 22, 43, 120, 241, 228, 93, 99, 120,
- 193, 22, 43, 124, 241, 228, 93, 99, 114, 67, 22, 233, 52, 93, 99, 193,
- 124, 22, 241, 51, 93, 99, 43, 114, 22, 44, 124, 232, 236, 93, 99, 44,
- 114, 22, 43, 124, 232, 236, 93, 99, 124, 193, 22, 203, 241, 228, 93, 99,
- 124, 114, 22, 203, 232, 236, 93, 99, 44, 193, 22, 43, 124, 241, 228, 93,
- 99, 43, 193, 22, 44, 124, 241, 228, 93, 99, 114, 124, 22, 241, 51, 93,
- 99, 193, 120, 22, 241, 51, 93, 99, 43, 114, 22, 44, 120, 232, 236, 93,
- 99, 44, 114, 22, 43, 120, 232, 236, 93, 99, 120, 193, 22, 203, 241, 228,
- 93, 99, 120, 114, 22, 203, 232, 236, 93, 99, 44, 193, 22, 43, 120, 241,
- 228, 93, 99, 43, 193, 22, 44, 120, 241, 228, 93, 99, 114, 120, 22, 241,
- 51, 93, 99, 193, 67, 22, 241, 51, 93, 99, 43, 114, 22, 44, 67, 232, 236,
- 93, 99, 44, 114, 22, 43, 67, 232, 236, 93, 99, 67, 193, 22, 203, 241,
- 228, 93, 99, 120, 114, 22, 124, 203, 232, 236, 93, 99, 124, 114, 22, 120,
- 203, 232, 236, 93, 99, 67, 114, 22, 203, 232, 236, 93, 99, 43, 120, 114,
- 22, 44, 124, 232, 236, 93, 99, 44, 120, 114, 22, 43, 124, 232, 236, 93,
- 99, 43, 124, 114, 22, 44, 120, 232, 236, 93, 99, 44, 124, 114, 22, 43,
- 120, 232, 236, 93, 99, 124, 193, 22, 120, 203, 241, 228, 93, 99, 120,
- 193, 22, 124, 203, 241, 228, 93, 99, 44, 193, 22, 43, 67, 241, 228, 93,
- 99, 43, 193, 22, 44, 67, 241, 228, 93, 99, 114, 67, 22, 241, 51, 93, 99,
- 193, 52, 248, 165, 241, 51, 93, 99, 114, 52, 248, 165, 241, 51, 93, 99,
- 193, 52, 248, 165, 213, 239, 93, 99, 114, 52, 248, 165, 213, 239, 93, 99,
- 52, 241, 51, 93, 99, 52, 213, 239, 93, 99, 124, 219, 157, 22, 44, 246,
- 121, 93, 99, 124, 52, 22, 44, 219, 156, 93, 99, 52, 124, 22, 222, 254,
- 93, 99, 124, 219, 157, 22, 43, 246, 121, 93, 99, 124, 52, 22, 43, 219,
- 156, 93, 99, 52, 124, 22, 233, 52, 93, 99, 120, 219, 157, 22, 44, 246,
- 121, 93, 99, 120, 52, 22, 44, 219, 156, 93, 99, 52, 120, 22, 222, 254,
- 93, 99, 120, 219, 157, 22, 43, 246, 121, 93, 99, 120, 52, 22, 43, 219,
- 156, 93, 99, 52, 120, 22, 233, 52, 93, 99, 67, 219, 157, 22, 44, 246,
- 121, 93, 99, 67, 52, 22, 44, 219, 156, 93, 99, 52, 67, 22, 222, 254, 93,
- 99, 67, 219, 157, 22, 43, 246, 121, 93, 99, 67, 52, 22, 43, 219, 156, 93,
- 99, 52, 67, 22, 233, 52, 93, 99, 124, 219, 157, 22, 203, 246, 121, 93,
- 99, 124, 52, 22, 203, 219, 156, 93, 99, 52, 124, 22, 241, 51, 93, 99,
- 120, 219, 157, 22, 203, 246, 121, 93, 99, 120, 52, 22, 203, 219, 156, 93,
- 99, 52, 120, 22, 241, 51, 93, 99, 67, 219, 157, 22, 203, 246, 121, 93,
- 99, 67, 52, 22, 203, 219, 156, 93, 99, 52, 67, 22, 241, 51, 93, 99, 193,
- 254, 34, 124, 22, 222, 254, 93, 99, 193, 254, 34, 124, 22, 233, 52, 93,
- 99, 193, 254, 34, 120, 22, 233, 52, 93, 99, 193, 254, 34, 120, 22, 222,
- 254, 93, 99, 193, 248, 7, 214, 160, 44, 216, 43, 232, 114, 233, 52, 93,
- 99, 193, 248, 7, 214, 160, 43, 216, 43, 232, 114, 222, 254, 93, 99, 193,
- 248, 7, 249, 138, 93, 99, 193, 233, 52, 93, 99, 193, 214, 163, 93, 99,
- 193, 222, 254, 93, 99, 193, 246, 114, 93, 99, 114, 233, 52, 93, 99, 114,
- 214, 163, 93, 99, 114, 222, 254, 93, 99, 114, 246, 114, 93, 99, 193, 43,
- 22, 114, 222, 254, 93, 99, 193, 120, 22, 114, 246, 114, 93, 99, 114, 43,
- 22, 193, 222, 254, 93, 99, 114, 120, 22, 193, 246, 114, 214, 160, 163,
- 251, 221, 232, 114, 123, 245, 197, 251, 221, 232, 114, 123, 224, 25, 251,
- 221, 232, 114, 134, 245, 195, 251, 221, 232, 114, 163, 251, 221, 232,
- 114, 244, 89, 245, 195, 251, 221, 232, 114, 134, 224, 23, 251, 221, 232,
- 114, 220, 124, 245, 195, 251, 221, 243, 236, 251, 221, 43, 220, 124, 245,
- 195, 251, 221, 43, 134, 224, 23, 251, 221, 43, 244, 89, 245, 195, 251,
- 221, 43, 163, 251, 221, 43, 134, 245, 195, 251, 221, 43, 123, 224, 25,
- 251, 221, 43, 123, 245, 197, 251, 221, 44, 163, 251, 221, 193, 220, 94,
- 231, 87, 220, 94, 248, 170, 220, 94, 214, 160, 123, 245, 197, 251, 221,
- 44, 123, 245, 197, 251, 221, 224, 29, 232, 114, 233, 52, 224, 29, 232,
- 114, 222, 254, 224, 29, 214, 160, 233, 52, 224, 29, 214, 160, 43, 22,
- 232, 114, 43, 22, 232, 114, 222, 254, 224, 29, 214, 160, 43, 22, 232,
- 114, 222, 254, 224, 29, 214, 160, 43, 22, 214, 160, 44, 22, 232, 114,
- 233, 52, 224, 29, 214, 160, 43, 22, 214, 160, 44, 22, 232, 114, 222, 254,
- 224, 29, 214, 160, 222, 254, 224, 29, 214, 160, 44, 22, 232, 114, 233,
- 52, 224, 29, 214, 160, 44, 22, 232, 114, 43, 22, 232, 114, 222, 254, 85,
- 218, 236, 71, 218, 236, 71, 42, 2, 222, 185, 249, 167, 71, 42, 249, 195,
- 85, 4, 218, 236, 42, 2, 203, 244, 113, 42, 2, 67, 244, 113, 42, 2, 226,
- 148, 249, 134, 244, 113, 42, 2, 214, 160, 43, 216, 43, 232, 114, 44, 244,
- 113, 42, 2, 214, 160, 44, 216, 43, 232, 114, 43, 244, 113, 42, 2, 248, 7,
- 249, 134, 244, 113, 85, 4, 218, 236, 71, 4, 218, 236, 85, 223, 119, 71,
- 223, 119, 85, 67, 223, 119, 71, 67, 223, 119, 85, 226, 10, 71, 226, 10,
- 85, 214, 162, 215, 226, 71, 214, 162, 215, 226, 85, 214, 162, 4, 215,
- 226, 71, 214, 162, 4, 215, 226, 85, 222, 250, 215, 226, 71, 222, 250,
- 215, 226, 85, 222, 250, 4, 215, 226, 71, 222, 250, 4, 215, 226, 85, 222,
- 250, 225, 11, 71, 222, 250, 225, 11, 85, 246, 113, 215, 226, 71, 246,
- 113, 215, 226, 85, 246, 113, 4, 215, 226, 71, 246, 113, 4, 215, 226, 85,
- 233, 48, 215, 226, 71, 233, 48, 215, 226, 85, 233, 48, 4, 215, 226, 71,
- 233, 48, 4, 215, 226, 85, 233, 48, 225, 11, 71, 233, 48, 225, 11, 85,
- 248, 0, 71, 248, 0, 71, 248, 1, 249, 195, 85, 4, 248, 0, 244, 97, 232,
- 110, 71, 250, 43, 246, 126, 250, 43, 250, 44, 2, 67, 244, 113, 251, 119,
- 85, 250, 43, 250, 44, 2, 43, 163, 251, 229, 250, 44, 2, 44, 163, 251,
- 229, 250, 44, 2, 232, 114, 163, 251, 229, 250, 44, 2, 214, 160, 163, 251,
- 229, 250, 44, 2, 214, 160, 44, 224, 29, 251, 229, 250, 44, 2, 254, 164,
- 251, 96, 214, 160, 43, 224, 29, 251, 229, 43, 163, 85, 250, 43, 44, 163,
- 85, 250, 43, 235, 201, 251, 121, 235, 201, 71, 250, 43, 214, 160, 163,
- 235, 201, 71, 250, 43, 232, 114, 163, 235, 201, 71, 250, 43, 214, 160,
- 43, 224, 29, 250, 41, 254, 33, 214, 160, 44, 224, 29, 250, 41, 254, 33,
- 232, 114, 44, 224, 29, 250, 41, 254, 33, 232, 114, 43, 224, 29, 250, 41,
- 254, 33, 214, 160, 163, 250, 43, 232, 114, 163, 250, 43, 85, 232, 114,
- 44, 215, 226, 85, 232, 114, 43, 215, 226, 85, 214, 160, 43, 215, 226, 85,
- 214, 160, 44, 215, 226, 71, 251, 121, 42, 2, 43, 163, 251, 229, 42, 2,
- 44, 163, 251, 229, 42, 2, 214, 160, 43, 248, 7, 163, 251, 229, 42, 2,
- 232, 114, 44, 248, 7, 163, 251, 229, 71, 42, 2, 67, 251, 240, 232, 219,
- 71, 214, 162, 215, 227, 2, 247, 128, 214, 162, 215, 227, 2, 43, 163, 251,
- 229, 214, 162, 215, 227, 2, 44, 163, 251, 229, 233, 91, 250, 43, 71, 42,
- 2, 214, 160, 43, 224, 28, 71, 42, 2, 232, 114, 43, 224, 28, 71, 42, 2,
- 232, 114, 44, 224, 28, 71, 42, 2, 214, 160, 44, 224, 28, 71, 250, 44, 2,
- 214, 160, 43, 224, 28, 71, 250, 44, 2, 232, 114, 43, 224, 28, 71, 250,
- 44, 2, 232, 114, 44, 224, 28, 71, 250, 44, 2, 214, 160, 44, 224, 28, 214,
- 160, 43, 215, 226, 214, 160, 44, 215, 226, 232, 114, 43, 215, 226, 71,
- 231, 87, 218, 236, 85, 231, 87, 218, 236, 71, 231, 87, 4, 218, 236, 85,
- 231, 87, 4, 218, 236, 232, 114, 44, 215, 226, 85, 218, 39, 2, 223, 135,
- 249, 255, 214, 194, 219, 62, 249, 230, 85, 218, 158, 71, 218, 158, 232,
- 234, 216, 133, 218, 38, 253, 242, 228, 76, 248, 46, 228, 76, 249, 203,
- 226, 167, 85, 217, 1, 71, 217, 1, 252, 164, 251, 171, 252, 164, 93, 2,
- 250, 137, 252, 164, 93, 2, 211, 178, 222, 0, 214, 195, 2, 223, 163, 246,
- 92, 240, 250, 252, 30, 71, 220, 4, 225, 104, 85, 220, 4, 225, 104, 220,
- 89, 223, 52, 222, 189, 244, 63, 241, 235, 251, 121, 85, 43, 225, 10, 235,
- 249, 85, 44, 225, 10, 235, 249, 71, 43, 225, 10, 235, 249, 71, 120, 225,
- 10, 235, 249, 71, 44, 225, 10, 235, 249, 71, 124, 225, 10, 235, 249, 219,
- 103, 22, 249, 137, 250, 227, 50, 223, 175, 50, 251, 247, 50, 251, 33,
- 254, 110, 226, 149, 249, 138, 250, 119, 223, 40, 249, 139, 64, 232, 124,
- 249, 139, 64, 235, 122, 218, 159, 22, 249, 144, 244, 176, 87, 255, 1,
- 220, 91, 242, 29, 22, 219, 191, 225, 223, 87, 210, 254, 211, 69, 215,
- 216, 31, 241, 230, 215, 216, 31, 233, 113, 215, 216, 31, 244, 104, 215,
- 216, 31, 216, 134, 215, 216, 31, 211, 239, 215, 216, 31, 212, 40, 215,
- 216, 31, 230, 120, 215, 216, 31, 245, 231, 212, 1, 64, 248, 26, 71, 243,
- 247, 244, 198, 71, 219, 76, 244, 198, 85, 219, 76, 244, 198, 71, 218, 39,
- 2, 223, 135, 244, 100, 224, 25, 230, 133, 233, 86, 224, 25, 230, 133,
- 231, 59, 244, 146, 50, 245, 231, 231, 195, 50, 235, 44, 221, 222, 214,
- 145, 229, 98, 225, 23, 254, 20, 217, 41, 243, 59, 251, 11, 233, 25, 213,
- 150, 232, 244, 221, 193, 222, 21, 251, 0, 254, 50, 225, 55, 71, 250, 125,
- 234, 84, 71, 250, 125, 224, 17, 71, 250, 125, 222, 197, 71, 250, 125,
- 251, 239, 71, 250, 125, 234, 36, 71, 250, 125, 225, 235, 85, 250, 125,
- 234, 84, 85, 250, 125, 224, 17, 85, 250, 125, 222, 197, 85, 250, 125,
- 251, 239, 85, 250, 125, 234, 36, 85, 250, 125, 225, 235, 85, 219, 18,
- 218, 51, 71, 241, 235, 218, 51, 71, 248, 1, 218, 51, 85, 249, 253, 218,
- 51, 71, 219, 18, 218, 51, 85, 241, 235, 218, 51, 85, 248, 1, 218, 51, 71,
- 249, 253, 218, 51, 240, 250, 218, 240, 224, 25, 228, 52, 245, 197, 228,
- 52, 252, 81, 245, 197, 228, 47, 252, 81, 219, 120, 228, 47, 230, 62, 244,
- 74, 50, 230, 62, 229, 193, 50, 230, 62, 220, 78, 50, 212, 9, 183, 249,
- 138, 245, 228, 183, 249, 138, 214, 171, 223, 115, 87, 223, 115, 16, 31,
- 215, 48, 225, 37, 223, 115, 16, 31, 215, 47, 225, 37, 223, 115, 16, 31,
- 215, 46, 225, 37, 223, 115, 16, 31, 215, 45, 225, 37, 223, 115, 16, 31,
- 215, 44, 225, 37, 223, 115, 16, 31, 215, 43, 225, 37, 223, 115, 16, 31,
- 215, 42, 225, 37, 223, 115, 16, 31, 243, 57, 231, 143, 85, 214, 171, 223,
- 115, 87, 223, 116, 226, 24, 87, 226, 0, 226, 24, 87, 225, 177, 226, 24,
- 50, 211, 255, 87, 247, 249, 244, 197, 247, 249, 244, 196, 247, 249, 244,
- 195, 247, 249, 244, 194, 247, 249, 244, 193, 247, 249, 244, 192, 71, 250,
- 44, 2, 59, 222, 254, 71, 250, 44, 2, 113, 247, 126, 85, 250, 44, 2, 71,
- 59, 222, 254, 85, 250, 44, 2, 113, 71, 247, 126, 230, 147, 31, 211, 69,
- 230, 147, 31, 210, 253, 247, 232, 31, 242, 138, 211, 69, 247, 232, 31,
- 233, 19, 210, 253, 247, 232, 31, 233, 19, 211, 69, 247, 232, 31, 242,
- 138, 210, 253, 71, 244, 81, 85, 244, 81, 242, 29, 22, 225, 107, 254, 128,
- 249, 136, 217, 236, 218, 166, 64, 254, 235, 221, 208, 254, 178, 244, 59,
- 243, 67, 218, 166, 64, 241, 209, 253, 207, 87, 244, 70, 226, 130, 71,
- 218, 158, 134, 232, 214, 249, 183, 222, 254, 134, 232, 214, 249, 183,
- 233, 52, 212, 50, 50, 125, 213, 130, 50, 246, 118, 244, 146, 50, 246,
- 118, 231, 195, 50, 235, 210, 244, 146, 22, 231, 195, 50, 231, 195, 22,
- 244, 146, 50, 231, 195, 2, 218, 105, 50, 231, 195, 2, 218, 105, 22, 231,
- 195, 22, 244, 146, 50, 67, 231, 195, 2, 218, 105, 50, 203, 231, 195, 2,
- 218, 105, 50, 231, 87, 71, 250, 43, 231, 87, 85, 250, 43, 231, 87, 4, 71,
- 250, 43, 231, 158, 87, 247, 175, 87, 214, 169, 225, 255, 87, 249, 239,
- 243, 231, 214, 141, 229, 93, 250, 169, 226, 65, 235, 50, 213, 185, 250,
- 101, 85, 230, 134, 232, 231, 220, 114, 220, 149, 224, 8, 220, 132, 219,
- 57, 252, 167, 252, 134, 92, 234, 144, 71, 246, 101, 231, 190, 71, 246,
- 101, 234, 84, 85, 246, 101, 231, 190, 85, 246, 101, 234, 84, 219, 63,
- 211, 230, 219, 66, 218, 39, 252, 59, 249, 255, 223, 162, 85, 219, 62,
- 216, 135, 250, 0, 22, 223, 162, 215, 94, 71, 220, 4, 225, 104, 215, 94,
- 85, 220, 4, 225, 104, 71, 248, 1, 236, 7, 218, 236, 249, 133, 233, 97,
- 247, 201, 250, 252, 226, 170, 225, 107, 250, 253, 219, 90, 241, 219, 2,
- 71, 249, 138, 37, 249, 133, 233, 97, 250, 161, 228, 80, 245, 132, 254,
- 149, 226, 195, 43, 212, 26, 215, 252, 85, 215, 55, 43, 212, 26, 215, 252,
- 71, 215, 55, 43, 212, 26, 215, 252, 85, 43, 233, 98, 231, 58, 71, 43,
- 233, 98, 231, 58, 246, 97, 219, 84, 50, 114, 71, 246, 113, 215, 226, 43,
- 250, 8, 245, 132, 92, 222, 0, 244, 183, 248, 7, 236, 7, 71, 250, 44, 236,
- 7, 85, 218, 236, 85, 215, 193, 223, 63, 43, 245, 131, 223, 63, 43, 245,
- 130, 253, 219, 16, 31, 214, 145, 114, 250, 44, 2, 218, 105, 22, 113, 170,
- 48, 225, 192, 222, 251, 235, 212, 225, 192, 233, 49, 235, 212, 225, 192,
- 235, 200, 225, 192, 85, 249, 139, 226, 201, 220, 31, 220, 19, 219, 231,
- 250, 69, 250, 234, 241, 164, 219, 128, 243, 68, 211, 230, 240, 227, 243,
- 68, 2, 242, 19, 231, 178, 16, 31, 232, 235, 230, 120, 214, 195, 226, 201,
- 242, 129, 244, 20, 244, 82, 236, 7, 241, 66, 244, 137, 222, 16, 42, 244,
- 19, 249, 167, 219, 106, 240, 119, 219, 109, 225, 171, 2, 252, 167, 216,
- 243, 235, 137, 252, 154, 87, 241, 238, 242, 140, 87, 243, 239, 224, 145,
- 249, 111, 226, 201, 85, 218, 236, 71, 244, 82, 2, 203, 230, 229, 85, 218,
- 106, 214, 160, 251, 225, 221, 195, 85, 221, 195, 232, 114, 251, 225, 221,
- 195, 71, 221, 195, 71, 114, 250, 138, 79, 217, 2, 232, 160, 50, 217, 54,
- 246, 96, 254, 200, 245, 127, 223, 160, 244, 93, 223, 160, 242, 22, 213,
- 174, 242, 22, 211, 198, 242, 22, 232, 114, 44, 225, 201, 225, 201, 214,
- 160, 44, 225, 201, 71, 228, 235, 85, 228, 235, 250, 138, 79, 114, 250,
- 138, 79, 230, 89, 211, 178, 114, 230, 89, 211, 178, 252, 164, 211, 178,
- 114, 252, 164, 211, 178, 226, 130, 26, 249, 138, 114, 26, 249, 138, 204,
- 250, 183, 249, 138, 114, 204, 250, 183, 249, 138, 7, 249, 138, 220, 93,
- 71, 7, 249, 138, 226, 130, 7, 249, 138, 231, 192, 249, 138, 218, 159, 64,
- 248, 157, 244, 19, 217, 16, 253, 224, 244, 19, 252, 165, 253, 224, 114,
- 244, 19, 252, 165, 253, 224, 244, 19, 249, 251, 253, 224, 85, 244, 19,
- 225, 12, 218, 158, 71, 244, 19, 225, 12, 218, 158, 219, 13, 218, 113,
- 226, 130, 71, 218, 158, 37, 71, 218, 158, 204, 250, 183, 85, 218, 158,
- 85, 250, 183, 71, 218, 158, 226, 130, 85, 218, 158, 114, 226, 130, 85,
- 218, 158, 225, 63, 218, 158, 220, 93, 71, 218, 158, 114, 253, 224, 204,
- 250, 183, 253, 224, 245, 201, 218, 246, 253, 224, 245, 201, 225, 12, 85,
- 218, 158, 245, 201, 225, 12, 225, 63, 218, 158, 219, 127, 225, 12, 85,
- 218, 158, 245, 201, 225, 12, 223, 117, 85, 218, 158, 114, 245, 201, 225,
- 12, 223, 117, 85, 218, 158, 215, 77, 225, 12, 85, 218, 158, 219, 122,
- 225, 12, 253, 224, 217, 16, 253, 224, 204, 250, 183, 217, 16, 253, 224,
- 114, 217, 16, 253, 224, 219, 127, 225, 160, 85, 22, 71, 244, 62, 85, 244,
- 62, 71, 244, 62, 245, 201, 225, 160, 226, 130, 85, 244, 62, 37, 204, 250,
- 183, 245, 201, 225, 12, 218, 158, 114, 217, 16, 225, 63, 253, 224, 219,
- 64, 216, 106, 215, 219, 219, 64, 114, 250, 122, 219, 64, 219, 15, 114,
- 219, 15, 252, 165, 253, 224, 245, 201, 217, 16, 224, 174, 253, 224, 114,
- 245, 201, 217, 16, 224, 174, 253, 224, 249, 139, 79, 220, 93, 71, 250,
- 43, 152, 92, 249, 139, 79, 232, 114, 44, 246, 94, 71, 218, 236, 214, 160,
- 44, 246, 94, 71, 218, 236, 232, 114, 44, 220, 93, 71, 218, 236, 214, 160,
- 44, 220, 93, 71, 218, 236, 85, 224, 16, 164, 226, 151, 71, 224, 16, 164,
- 226, 151, 71, 245, 39, 164, 226, 151, 85, 248, 1, 230, 187, 71, 211, 178,
- 114, 245, 39, 164, 87, 193, 67, 130, 231, 87, 67, 130, 114, 67, 130, 114,
- 219, 157, 215, 94, 249, 228, 224, 1, 164, 226, 151, 114, 219, 157, 249,
- 228, 224, 1, 164, 226, 151, 114, 52, 215, 94, 249, 228, 224, 1, 164, 226,
- 151, 114, 52, 249, 228, 224, 1, 164, 226, 151, 114, 121, 219, 157, 249,
- 228, 224, 1, 164, 226, 151, 114, 121, 52, 249, 228, 224, 1, 164, 226,
- 151, 249, 99, 218, 142, 226, 19, 5, 226, 151, 114, 245, 39, 164, 226,
- 151, 114, 241, 235, 245, 39, 164, 226, 151, 114, 85, 241, 234, 222, 189,
- 114, 85, 241, 235, 251, 121, 244, 63, 241, 234, 222, 189, 244, 63, 241,
- 235, 251, 121, 231, 87, 43, 226, 8, 226, 151, 231, 87, 44, 226, 8, 226,
- 151, 231, 87, 244, 71, 43, 226, 8, 226, 151, 231, 87, 244, 71, 44, 226,
- 8, 226, 151, 231, 87, 233, 48, 254, 118, 251, 166, 226, 151, 231, 87,
- 222, 250, 254, 118, 251, 166, 226, 151, 114, 233, 48, 254, 118, 224, 1,
- 164, 226, 151, 114, 222, 250, 254, 118, 224, 1, 164, 226, 151, 114, 233,
- 48, 254, 118, 251, 166, 226, 151, 114, 222, 250, 254, 118, 251, 166, 226,
- 151, 193, 43, 216, 7, 220, 55, 251, 166, 226, 151, 193, 44, 216, 7, 220,
- 55, 251, 166, 226, 151, 231, 87, 43, 249, 107, 251, 166, 226, 151, 231,
- 87, 44, 249, 107, 251, 166, 226, 151, 247, 212, 152, 37, 21, 111, 247,
- 212, 152, 37, 21, 105, 247, 212, 152, 37, 21, 158, 247, 212, 152, 37, 21,
- 161, 247, 212, 152, 37, 21, 190, 247, 212, 152, 37, 21, 195, 247, 212,
- 152, 37, 21, 199, 247, 212, 152, 37, 21, 196, 247, 212, 152, 37, 21, 201,
- 247, 212, 152, 37, 54, 216, 248, 247, 212, 37, 35, 21, 111, 247, 212, 37,
- 35, 21, 105, 247, 212, 37, 35, 21, 158, 247, 212, 37, 35, 21, 161, 247,
- 212, 37, 35, 21, 190, 247, 212, 37, 35, 21, 195, 247, 212, 37, 35, 21,
- 199, 247, 212, 37, 35, 21, 196, 247, 212, 37, 35, 21, 201, 247, 212, 37,
- 35, 54, 216, 248, 247, 212, 152, 37, 35, 21, 111, 247, 212, 152, 37, 35,
- 21, 105, 247, 212, 152, 37, 35, 21, 158, 247, 212, 152, 37, 35, 21, 161,
- 247, 212, 152, 37, 35, 21, 190, 247, 212, 152, 37, 35, 21, 195, 247, 212,
- 152, 37, 35, 21, 199, 247, 212, 152, 37, 35, 21, 196, 247, 212, 152, 37,
- 35, 21, 201, 247, 212, 152, 37, 35, 54, 216, 248, 114, 211, 246, 97, 75,
- 114, 96, 50, 114, 230, 187, 50, 114, 247, 177, 50, 114, 219, 30, 245,
- 228, 75, 114, 97, 75, 114, 228, 61, 245, 228, 75, 246, 106, 225, 14, 97,
- 75, 114, 222, 186, 97, 75, 215, 225, 97, 75, 114, 215, 225, 97, 75, 248,
- 163, 215, 225, 97, 75, 114, 248, 163, 215, 225, 97, 75, 85, 97, 75, 216,
- 145, 216, 13, 97, 254, 1, 216, 145, 251, 181, 97, 254, 1, 85, 97, 254, 1,
- 114, 85, 249, 99, 246, 112, 22, 97, 75, 114, 85, 249, 99, 214, 153, 22,
- 97, 75, 218, 233, 85, 97, 75, 114, 249, 214, 85, 97, 75, 222, 249, 71,
- 97, 75, 233, 47, 71, 97, 75, 252, 191, 220, 93, 71, 97, 75, 243, 249,
- 220, 93, 71, 97, 75, 114, 232, 114, 222, 248, 71, 97, 75, 114, 214, 160,
- 222, 248, 71, 97, 75, 228, 54, 232, 114, 222, 248, 71, 97, 75, 249, 107,
- 232, 129, 228, 54, 214, 160, 222, 248, 71, 97, 75, 37, 114, 71, 97, 75,
- 211, 252, 97, 75, 251, 228, 219, 30, 245, 228, 75, 251, 228, 97, 75, 251,
- 228, 228, 61, 245, 228, 75, 114, 251, 228, 219, 30, 245, 228, 75, 114,
- 251, 228, 97, 75, 114, 251, 228, 228, 61, 245, 228, 75, 217, 18, 97, 75,
- 114, 217, 17, 97, 75, 212, 18, 97, 75, 114, 212, 18, 97, 75, 226, 176,
- 97, 75, 52, 249, 107, 232, 129, 134, 247, 222, 254, 117, 71, 215, 227,
- 249, 195, 4, 71, 215, 226, 225, 174, 204, 218, 64, 204, 218, 22, 43, 222,
- 92, 252, 181, 248, 68, 44, 222, 92, 252, 181, 248, 68, 177, 2, 59, 235,
- 222, 223, 53, 219, 49, 224, 204, 218, 64, 218, 23, 224, 204, 219, 48, 67,
- 252, 149, 2, 203, 91, 11, 222, 231, 248, 6, 200, 247, 176, 11, 244, 183,
- 248, 6, 92, 232, 152, 254, 126, 92, 232, 152, 226, 162, 71, 248, 1, 2,
- 250, 181, 247, 128, 22, 2, 247, 128, 245, 178, 64, 226, 174, 214, 152,
- 232, 114, 44, 249, 169, 2, 247, 128, 214, 160, 43, 249, 169, 2, 247, 128,
- 43, 226, 132, 235, 72, 44, 226, 132, 235, 72, 243, 236, 226, 132, 235,
- 72, 233, 91, 120, 217, 88, 233, 91, 124, 217, 88, 43, 22, 44, 52, 215,
- 93, 43, 22, 44, 217, 88, 43, 230, 92, 200, 44, 217, 88, 200, 43, 217, 88,
- 120, 217, 89, 2, 250, 44, 48, 232, 111, 247, 181, 251, 86, 203, 222, 135,
- 71, 249, 213, 248, 0, 71, 249, 213, 248, 1, 2, 140, 216, 115, 71, 249,
- 213, 248, 1, 2, 97, 216, 115, 71, 42, 2, 140, 216, 115, 71, 42, 2, 97,
- 216, 115, 11, 43, 71, 42, 127, 11, 44, 71, 42, 127, 11, 43, 254, 118,
- 127, 11, 44, 254, 118, 127, 11, 43, 52, 254, 118, 127, 11, 44, 52, 254,
- 118, 127, 11, 43, 71, 216, 7, 220, 55, 127, 11, 44, 71, 216, 7, 220, 55,
- 127, 11, 43, 244, 71, 226, 7, 11, 44, 244, 71, 226, 7, 214, 153, 224, 27,
- 75, 246, 112, 224, 27, 75, 254, 96, 243, 105, 250, 44, 75, 250, 10, 243,
- 105, 250, 44, 75, 44, 80, 2, 37, 225, 25, 200, 140, 75, 200, 97, 75, 200,
- 43, 44, 75, 200, 140, 52, 75, 200, 97, 52, 75, 200, 43, 44, 52, 75, 200,
- 140, 80, 243, 251, 130, 200, 97, 80, 243, 251, 130, 200, 140, 52, 80,
- 243, 251, 130, 200, 97, 52, 80, 243, 251, 130, 200, 97, 218, 232, 75, 46,
- 47, 251, 223, 46, 47, 247, 125, 46, 47, 246, 253, 46, 47, 247, 124, 46,
- 47, 246, 189, 46, 47, 247, 60, 46, 47, 246, 252, 46, 47, 247, 123, 46,
- 47, 246, 157, 46, 47, 247, 28, 46, 47, 246, 220, 46, 47, 247, 91, 46, 47,
- 246, 188, 46, 47, 247, 59, 46, 47, 246, 251, 46, 47, 247, 122, 46, 47,
- 246, 141, 46, 47, 247, 12, 46, 47, 246, 204, 46, 47, 247, 75, 46, 47,
- 246, 172, 46, 47, 247, 43, 46, 47, 246, 235, 46, 47, 247, 106, 46, 47,
- 246, 156, 46, 47, 247, 27, 46, 47, 246, 219, 46, 47, 247, 90, 46, 47,
- 246, 187, 46, 47, 247, 58, 46, 47, 246, 250, 46, 47, 247, 121, 46, 47,
- 246, 133, 46, 47, 247, 4, 46, 47, 246, 196, 46, 47, 247, 67, 46, 47, 246,
- 164, 46, 47, 247, 35, 46, 47, 246, 227, 46, 47, 247, 98, 46, 47, 246,
- 148, 46, 47, 247, 19, 46, 47, 246, 211, 46, 47, 247, 82, 46, 47, 246,
- 179, 46, 47, 247, 50, 46, 47, 246, 242, 46, 47, 247, 113, 46, 47, 246,
- 140, 46, 47, 247, 11, 46, 47, 246, 203, 46, 47, 247, 74, 46, 47, 246,
- 171, 46, 47, 247, 42, 46, 47, 246, 234, 46, 47, 247, 105, 46, 47, 246,
- 155, 46, 47, 247, 26, 46, 47, 246, 218, 46, 47, 247, 89, 46, 47, 246,
- 186, 46, 47, 247, 57, 46, 47, 246, 249, 46, 47, 247, 120, 46, 47, 246,
- 129, 46, 47, 247, 0, 46, 47, 246, 192, 46, 47, 247, 63, 46, 47, 246, 160,
- 46, 47, 247, 31, 46, 47, 246, 223, 46, 47, 247, 94, 46, 47, 246, 144, 46,
- 47, 247, 15, 46, 47, 246, 207, 46, 47, 247, 78, 46, 47, 246, 175, 46, 47,
- 247, 46, 46, 47, 246, 238, 46, 47, 247, 109, 46, 47, 246, 136, 46, 47,
- 247, 7, 46, 47, 246, 199, 46, 47, 247, 70, 46, 47, 246, 167, 46, 47, 247,
- 38, 46, 47, 246, 230, 46, 47, 247, 101, 46, 47, 246, 151, 46, 47, 247,
- 22, 46, 47, 246, 214, 46, 47, 247, 85, 46, 47, 246, 182, 46, 47, 247, 53,
- 46, 47, 246, 245, 46, 47, 247, 116, 46, 47, 246, 132, 46, 47, 247, 3, 46,
- 47, 246, 195, 46, 47, 247, 66, 46, 47, 246, 163, 46, 47, 247, 34, 46, 47,
- 246, 226, 46, 47, 247, 97, 46, 47, 246, 147, 46, 47, 247, 18, 46, 47,
- 246, 210, 46, 47, 247, 81, 46, 47, 246, 178, 46, 47, 247, 49, 46, 47,
- 246, 241, 46, 47, 247, 112, 46, 47, 246, 139, 46, 47, 247, 10, 46, 47,
- 246, 202, 46, 47, 247, 73, 46, 47, 246, 170, 46, 47, 247, 41, 46, 47,
- 246, 233, 46, 47, 247, 104, 46, 47, 246, 154, 46, 47, 247, 25, 46, 47,
- 246, 217, 46, 47, 247, 88, 46, 47, 246, 185, 46, 47, 247, 56, 46, 47,
- 246, 248, 46, 47, 247, 119, 46, 47, 246, 127, 46, 47, 246, 254, 46, 47,
- 246, 190, 46, 47, 247, 61, 46, 47, 246, 158, 46, 47, 247, 29, 46, 47,
- 246, 221, 46, 47, 247, 92, 46, 47, 246, 142, 46, 47, 247, 13, 46, 47,
- 246, 205, 46, 47, 247, 76, 46, 47, 246, 173, 46, 47, 247, 44, 46, 47,
- 246, 236, 46, 47, 247, 107, 46, 47, 246, 134, 46, 47, 247, 5, 46, 47,
- 246, 197, 46, 47, 247, 68, 46, 47, 246, 165, 46, 47, 247, 36, 46, 47,
- 246, 228, 46, 47, 247, 99, 46, 47, 246, 149, 46, 47, 247, 20, 46, 47,
- 246, 212, 46, 47, 247, 83, 46, 47, 246, 180, 46, 47, 247, 51, 46, 47,
- 246, 243, 46, 47, 247, 114, 46, 47, 246, 130, 46, 47, 247, 1, 46, 47,
- 246, 193, 46, 47, 247, 64, 46, 47, 246, 161, 46, 47, 247, 32, 46, 47,
- 246, 224, 46, 47, 247, 95, 46, 47, 246, 145, 46, 47, 247, 16, 46, 47,
- 246, 208, 46, 47, 247, 79, 46, 47, 246, 176, 46, 47, 247, 47, 46, 47,
- 246, 239, 46, 47, 247, 110, 46, 47, 246, 137, 46, 47, 247, 8, 46, 47,
- 246, 200, 46, 47, 247, 71, 46, 47, 246, 168, 46, 47, 247, 39, 46, 47,
- 246, 231, 46, 47, 247, 102, 46, 47, 246, 152, 46, 47, 247, 23, 46, 47,
- 246, 215, 46, 47, 247, 86, 46, 47, 246, 183, 46, 47, 247, 54, 46, 47,
- 246, 246, 46, 47, 247, 117, 46, 47, 246, 128, 46, 47, 246, 255, 46, 47,
- 246, 191, 46, 47, 247, 62, 46, 47, 246, 159, 46, 47, 247, 30, 46, 47,
- 246, 222, 46, 47, 247, 93, 46, 47, 246, 143, 46, 47, 247, 14, 46, 47,
- 246, 206, 46, 47, 247, 77, 46, 47, 246, 174, 46, 47, 247, 45, 46, 47,
- 246, 237, 46, 47, 247, 108, 46, 47, 246, 135, 46, 47, 247, 6, 46, 47,
- 246, 198, 46, 47, 247, 69, 46, 47, 246, 166, 46, 47, 247, 37, 46, 47,
- 246, 229, 46, 47, 247, 100, 46, 47, 246, 150, 46, 47, 247, 21, 46, 47,
- 246, 213, 46, 47, 247, 84, 46, 47, 246, 181, 46, 47, 247, 52, 46, 47,
- 246, 244, 46, 47, 247, 115, 46, 47, 246, 131, 46, 47, 247, 2, 46, 47,
- 246, 194, 46, 47, 247, 65, 46, 47, 246, 162, 46, 47, 247, 33, 46, 47,
- 246, 225, 46, 47, 247, 96, 46, 47, 246, 146, 46, 47, 247, 17, 46, 47,
- 246, 209, 46, 47, 247, 80, 46, 47, 246, 177, 46, 47, 247, 48, 46, 47,
- 246, 240, 46, 47, 247, 111, 46, 47, 246, 138, 46, 47, 247, 9, 46, 47,
- 246, 201, 46, 47, 247, 72, 46, 47, 246, 169, 46, 47, 247, 40, 46, 47,
- 246, 232, 46, 47, 247, 103, 46, 47, 246, 153, 46, 47, 247, 24, 46, 47,
- 246, 216, 46, 47, 247, 87, 46, 47, 246, 184, 46, 47, 247, 55, 46, 47,
- 246, 247, 46, 47, 247, 118, 97, 215, 58, 80, 2, 67, 91, 97, 215, 58, 80,
- 2, 52, 67, 91, 140, 52, 80, 2, 67, 91, 97, 52, 80, 2, 67, 91, 43, 44, 52,
- 80, 2, 67, 91, 97, 215, 58, 80, 243, 251, 130, 140, 52, 80, 243, 251,
- 130, 97, 52, 80, 243, 251, 130, 246, 112, 80, 2, 203, 91, 214, 153, 80,
- 2, 203, 91, 214, 153, 215, 212, 75, 246, 112, 215, 212, 75, 140, 52, 248,
- 165, 75, 97, 52, 248, 165, 75, 140, 215, 212, 248, 165, 75, 97, 215, 212,
- 248, 165, 75, 97, 215, 58, 215, 212, 248, 165, 75, 97, 80, 2, 246, 126,
- 218, 141, 214, 153, 80, 216, 43, 130, 246, 112, 80, 216, 43, 130, 97, 80,
- 2, 217, 79, 2, 67, 91, 97, 80, 2, 217, 79, 2, 52, 67, 91, 97, 215, 58,
- 80, 2, 217, 78, 97, 215, 58, 80, 2, 217, 79, 2, 67, 91, 97, 215, 58, 80,
- 2, 217, 79, 2, 52, 67, 91, 140, 254, 3, 97, 254, 3, 140, 52, 254, 3, 97,
- 52, 254, 3, 140, 80, 216, 43, 85, 248, 0, 97, 80, 216, 43, 85, 248, 0,
- 140, 80, 243, 251, 252, 149, 216, 43, 85, 248, 0, 97, 80, 243, 251, 252,
- 149, 216, 43, 85, 248, 0, 228, 61, 212, 9, 22, 219, 30, 245, 228, 75,
- 228, 61, 245, 228, 22, 219, 30, 212, 9, 75, 228, 61, 212, 9, 80, 2, 103,
- 228, 61, 245, 228, 80, 2, 103, 219, 30, 245, 228, 80, 2, 103, 219, 30,
- 212, 9, 80, 2, 103, 228, 61, 212, 9, 80, 22, 228, 61, 245, 228, 75, 228,
- 61, 245, 228, 80, 22, 219, 30, 245, 228, 75, 219, 30, 245, 228, 80, 22,
- 219, 30, 212, 9, 75, 219, 30, 212, 9, 80, 22, 228, 61, 212, 9, 75, 222,
- 231, 248, 7, 249, 133, 244, 183, 248, 6, 244, 183, 248, 7, 249, 133, 222,
- 231, 248, 6, 219, 30, 245, 228, 80, 249, 133, 228, 61, 245, 228, 75, 228,
- 61, 245, 228, 80, 249, 133, 219, 30, 245, 228, 75, 244, 183, 248, 7, 249,
- 133, 228, 61, 245, 228, 75, 222, 231, 248, 7, 249, 133, 219, 30, 245,
- 228, 75, 228, 61, 245, 228, 80, 249, 133, 228, 61, 212, 9, 75, 228, 61,
- 212, 9, 80, 249, 133, 228, 61, 245, 228, 75, 212, 36, 80, 225, 10, 247,
- 203, 222, 254, 80, 225, 10, 97, 216, 189, 249, 98, 214, 152, 80, 225, 10,
- 97, 216, 189, 249, 98, 246, 111, 80, 225, 10, 246, 112, 216, 189, 249,
- 98, 233, 43, 80, 225, 10, 246, 112, 216, 189, 249, 98, 222, 244, 222,
- 247, 254, 34, 250, 10, 75, 233, 46, 254, 34, 254, 96, 75, 216, 15, 254,
- 34, 254, 96, 75, 251, 183, 254, 34, 254, 96, 75, 216, 15, 254, 34, 250,
- 10, 80, 2, 230, 186, 216, 15, 254, 34, 254, 96, 80, 2, 225, 25, 232, 114,
- 44, 220, 154, 250, 10, 75, 232, 114, 43, 220, 154, 254, 96, 75, 254, 96,
- 250, 8, 250, 44, 75, 250, 10, 250, 8, 250, 44, 75, 97, 80, 72, 219, 253,
- 140, 75, 140, 80, 72, 219, 253, 97, 75, 219, 253, 97, 80, 72, 140, 75,
- 97, 80, 2, 96, 51, 140, 80, 2, 96, 51, 97, 80, 216, 140, 211, 178, 43,
- 44, 80, 216, 140, 4, 250, 43, 214, 153, 215, 58, 80, 243, 251, 4, 250,
- 43, 43, 252, 147, 120, 44, 252, 147, 124, 242, 5, 43, 252, 147, 124, 44,
- 252, 147, 120, 242, 5, 120, 252, 147, 44, 124, 252, 147, 43, 242, 5, 120,
- 252, 147, 43, 124, 252, 147, 44, 242, 5, 43, 252, 147, 120, 44, 252, 147,
- 120, 242, 5, 120, 252, 147, 44, 124, 252, 147, 44, 242, 5, 43, 252, 147,
- 124, 44, 252, 147, 124, 242, 5, 120, 252, 147, 43, 124, 252, 147, 43,
- 242, 5, 140, 242, 6, 2, 252, 147, 120, 216, 43, 130, 97, 242, 6, 2, 252,
- 147, 120, 216, 43, 130, 214, 153, 242, 6, 2, 252, 147, 44, 216, 43, 130,
- 246, 112, 242, 6, 2, 252, 147, 44, 216, 43, 130, 140, 242, 6, 2, 252,
- 147, 124, 216, 43, 130, 97, 242, 6, 2, 252, 147, 124, 216, 43, 130, 214,
- 153, 242, 6, 2, 252, 147, 43, 216, 43, 130, 246, 112, 242, 6, 2, 252,
- 147, 43, 216, 43, 130, 140, 242, 6, 2, 252, 147, 120, 243, 251, 130, 97,
- 242, 6, 2, 252, 147, 120, 243, 251, 130, 214, 153, 242, 6, 2, 252, 147,
- 44, 243, 251, 130, 246, 112, 242, 6, 2, 252, 147, 44, 243, 251, 130, 140,
- 242, 6, 2, 252, 147, 124, 243, 251, 130, 97, 242, 6, 2, 252, 147, 124,
- 243, 251, 130, 214, 153, 242, 6, 2, 252, 147, 43, 243, 251, 130, 246,
- 112, 242, 6, 2, 252, 147, 43, 243, 251, 130, 140, 242, 6, 2, 252, 147,
- 120, 72, 140, 242, 6, 2, 252, 147, 246, 114, 214, 153, 242, 6, 2, 252,
- 147, 43, 252, 38, 214, 153, 242, 6, 2, 252, 147, 222, 254, 97, 242, 6, 2,
- 252, 147, 120, 72, 97, 242, 6, 2, 252, 147, 246, 114, 246, 112, 242, 6,
- 2, 252, 147, 43, 252, 38, 246, 112, 242, 6, 2, 252, 147, 222, 254, 140,
- 242, 6, 2, 252, 147, 120, 72, 97, 242, 6, 2, 252, 147, 214, 163, 140,
- 242, 6, 2, 252, 147, 124, 72, 97, 242, 6, 2, 252, 147, 246, 114, 97, 242,
- 6, 2, 252, 147, 120, 72, 140, 242, 6, 2, 252, 147, 214, 163, 97, 242, 6,
- 2, 252, 147, 124, 72, 140, 242, 6, 2, 252, 147, 246, 114, 140, 242, 6, 2,
- 252, 147, 120, 72, 200, 248, 164, 140, 242, 6, 2, 252, 147, 124, 252, 51,
- 200, 248, 164, 97, 242, 6, 2, 252, 147, 120, 72, 200, 248, 164, 97, 242,
- 6, 2, 252, 147, 124, 252, 51, 200, 248, 164, 214, 153, 242, 6, 2, 252,
- 147, 43, 252, 38, 246, 112, 242, 6, 2, 252, 147, 222, 254, 246, 112, 242,
- 6, 2, 252, 147, 43, 252, 38, 214, 153, 242, 6, 2, 252, 147, 222, 254, 44,
- 52, 80, 2, 222, 185, 241, 242, 245, 106, 5, 72, 97, 75, 216, 90, 226,
- 172, 72, 97, 75, 140, 80, 72, 216, 90, 226, 171, 97, 80, 72, 216, 90,
- 226, 171, 97, 80, 72, 254, 156, 128, 112, 233, 21, 72, 140, 75, 140, 80,
- 216, 140, 233, 20, 242, 137, 72, 97, 75, 218, 65, 72, 97, 75, 140, 80,
- 216, 140, 218, 64, 218, 23, 72, 140, 75, 43, 244, 99, 217, 78, 44, 244,
- 99, 217, 78, 120, 244, 99, 217, 78, 124, 244, 99, 217, 78, 215, 212, 67,
- 252, 149, 248, 68, 210, 160, 189, 218, 244, 210, 160, 189, 215, 49, 249,
- 234, 43, 71, 249, 107, 127, 44, 71, 249, 107, 127, 43, 71, 226, 7, 44,
- 71, 226, 7, 210, 160, 189, 43, 236, 22, 127, 210, 160, 189, 44, 236, 22,
- 127, 210, 160, 189, 43, 251, 250, 127, 210, 160, 189, 44, 251, 250, 127,
- 43, 42, 251, 166, 2, 214, 183, 44, 42, 251, 166, 2, 214, 183, 43, 42,
- 251, 166, 2, 216, 116, 236, 7, 216, 15, 249, 168, 44, 42, 251, 166, 2,
- 216, 116, 236, 7, 251, 183, 249, 168, 43, 42, 251, 166, 2, 216, 116, 236,
- 7, 251, 183, 249, 168, 44, 42, 251, 166, 2, 216, 116, 236, 7, 216, 15,
- 249, 168, 43, 254, 118, 251, 166, 2, 247, 128, 44, 254, 118, 251, 166, 2,
- 247, 128, 43, 254, 34, 233, 21, 127, 44, 254, 34, 242, 137, 127, 52, 43,
- 254, 34, 242, 137, 127, 52, 44, 254, 34, 233, 21, 127, 43, 85, 216, 7,
- 220, 55, 127, 44, 85, 216, 7, 220, 55, 127, 246, 126, 244, 143, 67, 210,
- 35, 232, 219, 231, 93, 254, 118, 226, 174, 233, 52, 44, 254, 118, 214,
- 12, 2, 218, 236, 231, 93, 44, 254, 118, 2, 247, 128, 254, 118, 2, 222,
- 94, 235, 222, 255, 12, 254, 117, 219, 1, 254, 118, 226, 174, 233, 52,
- 219, 1, 254, 118, 226, 174, 214, 163, 215, 94, 254, 117, 223, 52, 254,
- 117, 254, 118, 2, 214, 183, 223, 52, 254, 118, 2, 214, 183, 226, 252,
- 254, 118, 226, 174, 214, 163, 226, 252, 254, 118, 226, 174, 246, 114,
- 231, 93, 254, 118, 2, 204, 254, 13, 245, 148, 236, 7, 80, 225, 10, 120,
- 22, 222, 254, 231, 93, 254, 118, 2, 204, 254, 13, 245, 148, 236, 7, 80,
- 225, 10, 120, 22, 233, 52, 231, 93, 254, 118, 2, 204, 254, 13, 245, 148,
- 236, 7, 80, 225, 10, 124, 22, 222, 254, 231, 93, 254, 118, 2, 204, 254,
- 13, 245, 148, 236, 7, 80, 225, 10, 124, 22, 233, 52, 231, 93, 254, 118,
- 2, 204, 254, 13, 245, 148, 236, 7, 80, 225, 10, 44, 22, 214, 163, 231,
- 93, 254, 118, 2, 204, 254, 13, 245, 148, 236, 7, 80, 225, 10, 43, 22,
- 214, 163, 231, 93, 254, 118, 2, 204, 254, 13, 245, 148, 236, 7, 80, 225,
- 10, 44, 22, 246, 114, 231, 93, 254, 118, 2, 204, 254, 13, 245, 148, 236,
- 7, 80, 225, 10, 43, 22, 246, 114, 223, 52, 245, 160, 220, 129, 245, 160,
- 220, 130, 2, 226, 127, 245, 160, 220, 130, 2, 4, 250, 44, 48, 245, 160,
- 220, 130, 2, 44, 80, 48, 245, 160, 220, 130, 2, 43, 80, 48, 250, 44, 2,
- 203, 130, 37, 67, 130, 37, 226, 11, 37, 223, 53, 219, 48, 37, 225, 174,
- 250, 44, 247, 181, 251, 86, 203, 252, 149, 22, 216, 15, 163, 247, 181,
- 251, 86, 67, 130, 250, 44, 2, 218, 25, 211, 178, 37, 254, 95, 247, 177,
- 50, 120, 80, 216, 140, 250, 43, 37, 71, 251, 121, 37, 251, 121, 37, 233,
- 20, 37, 242, 136, 250, 44, 2, 4, 250, 44, 216, 43, 216, 197, 222, 254,
- 250, 44, 2, 113, 203, 218, 93, 216, 43, 216, 197, 222, 254, 92, 222, 231,
- 248, 7, 219, 97, 92, 244, 183, 248, 7, 219, 97, 92, 253, 224, 92, 4, 250,
- 43, 92, 218, 236, 113, 235, 71, 218, 234, 215, 227, 2, 59, 48, 215, 227,
- 2, 214, 183, 222, 94, 236, 7, 215, 226, 215, 227, 2, 220, 136, 253, 215,
- 251, 182, 44, 215, 227, 72, 43, 215, 226, 43, 215, 227, 252, 38, 67, 130,
- 67, 252, 149, 252, 38, 44, 215, 226, 251, 173, 2, 43, 163, 251, 229, 251,
- 173, 2, 44, 163, 251, 229, 85, 251, 172, 30, 2, 43, 163, 251, 229, 30, 2,
- 44, 163, 251, 229, 71, 240, 243, 85, 240, 243, 43, 211, 244, 244, 143,
- 44, 211, 244, 244, 143, 43, 52, 211, 244, 244, 143, 44, 52, 211, 244,
- 244, 143, 235, 255, 235, 241, 216, 113, 115, 235, 241, 235, 242, 229,
- 107, 2, 67, 130, 246, 120, 230, 92, 42, 2, 249, 189, 226, 131, 235, 253,
- 253, 245, 219, 221, 224, 183, 245, 106, 5, 22, 219, 99, 226, 11, 245,
- 106, 5, 22, 219, 99, 226, 12, 2, 216, 90, 48, 240, 111, 216, 43, 22, 219,
- 99, 226, 11, 242, 190, 218, 157, 216, 186, 246, 113, 215, 227, 2, 43,
- 163, 251, 229, 246, 113, 215, 227, 2, 44, 163, 251, 229, 85, 248, 1, 2,
- 124, 75, 85, 232, 110, 71, 250, 44, 2, 124, 75, 85, 250, 44, 2, 124, 75,
- 245, 93, 71, 218, 236, 245, 93, 85, 218, 236, 245, 93, 71, 248, 0, 245,
- 93, 85, 248, 0, 245, 93, 71, 250, 43, 245, 93, 85, 250, 43, 222, 134,
- 223, 53, 219, 49, 226, 171, 219, 49, 2, 226, 127, 223, 53, 219, 49, 2,
- 203, 91, 252, 1, 219, 48, 252, 1, 223, 53, 219, 48, 52, 225, 25, 215,
- 212, 225, 25, 233, 48, 249, 99, 254, 118, 127, 222, 250, 249, 99, 254,
- 118, 127, 216, 79, 230, 184, 230, 29, 37, 59, 226, 171, 230, 29, 37, 96,
- 226, 171, 230, 29, 37, 30, 226, 171, 230, 29, 214, 176, 226, 172, 2, 247,
- 128, 230, 29, 214, 176, 226, 172, 2, 225, 25, 230, 29, 42, 235, 206, 226,
- 171, 230, 29, 42, 214, 176, 226, 171, 113, 232, 152, 22, 226, 171, 113,
- 232, 152, 177, 226, 171, 230, 29, 30, 226, 171, 230, 159, 113, 218, 44,
- 218, 42, 2, 235, 218, 224, 27, 235, 219, 226, 171, 244, 107, 226, 3, 235,
- 218, 235, 219, 2, 52, 91, 235, 219, 253, 181, 2, 219, 97, 250, 40, 243,
- 233, 254, 96, 235, 216, 232, 220, 235, 217, 2, 223, 118, 225, 241, 254,
- 10, 225, 4, 232, 220, 235, 217, 2, 220, 154, 225, 241, 254, 10, 225, 4,
- 232, 220, 235, 217, 228, 57, 236, 1, 216, 197, 225, 4, 235, 219, 254, 10,
- 116, 225, 14, 226, 171, 224, 21, 235, 219, 226, 171, 235, 219, 2, 140,
- 80, 2, 103, 235, 219, 2, 30, 50, 235, 219, 2, 235, 205, 235, 219, 2, 214,
- 175, 235, 219, 2, 226, 127, 235, 219, 2, 214, 183, 235, 72, 233, 91, 43,
- 215, 227, 226, 171, 210, 160, 189, 221, 203, 249, 217, 210, 160, 189,
- 221, 203, 225, 59, 210, 160, 189, 221, 203, 224, 179, 96, 5, 2, 4, 250,
- 44, 48, 96, 5, 2, 250, 39, 255, 24, 48, 96, 5, 2, 216, 90, 48, 96, 5, 2,
- 59, 51, 96, 5, 2, 216, 90, 51, 96, 5, 2, 218, 66, 105, 96, 5, 2, 85, 215,
- 226, 230, 187, 5, 2, 249, 228, 48, 230, 187, 5, 2, 59, 51, 230, 187, 5,
- 2, 244, 183, 247, 126, 230, 187, 5, 2, 222, 231, 247, 126, 96, 5, 236, 7,
- 43, 163, 250, 43, 96, 5, 236, 7, 44, 163, 250, 43, 213, 254, 177, 249,
- 139, 224, 183, 230, 89, 5, 2, 59, 48, 230, 89, 5, 2, 214, 183, 220, 151,
- 224, 184, 2, 251, 183, 250, 7, 219, 79, 224, 183, 230, 89, 5, 236, 7, 43,
- 163, 250, 43, 230, 89, 5, 236, 7, 44, 163, 250, 43, 37, 230, 89, 5, 2,
- 250, 39, 255, 23, 230, 89, 5, 236, 7, 52, 250, 43, 37, 247, 177, 50, 96,
- 5, 236, 7, 215, 226, 230, 187, 5, 236, 7, 215, 226, 230, 89, 5, 236, 7,
- 215, 226, 235, 213, 224, 183, 222, 245, 235, 213, 224, 183, 210, 160,
- 189, 223, 93, 249, 217, 254, 142, 177, 249, 173, 235, 206, 2, 247, 128,
- 214, 176, 2, 230, 187, 50, 214, 176, 2, 226, 127, 235, 206, 2, 226, 127,
- 235, 206, 2, 232, 152, 254, 126, 214, 176, 2, 232, 152, 226, 162, 214,
- 176, 72, 235, 205, 235, 206, 72, 214, 175, 214, 176, 72, 252, 149, 72,
- 235, 205, 235, 206, 72, 252, 149, 72, 214, 175, 214, 176, 252, 38, 22,
- 235, 71, 2, 214, 175, 235, 206, 252, 38, 22, 235, 71, 2, 235, 205, 250,
- 8, 214, 176, 2, 220, 135, 250, 8, 235, 206, 2, 220, 135, 52, 42, 235,
- 205, 52, 42, 214, 175, 250, 8, 214, 176, 2, 220, 136, 22, 219, 79, 224,
- 183, 232, 152, 22, 2, 59, 48, 232, 152, 177, 2, 59, 48, 52, 232, 152,
- 254, 126, 52, 232, 152, 226, 162, 113, 235, 207, 232, 152, 254, 126, 113,
- 235, 207, 232, 152, 226, 162, 219, 87, 233, 91, 226, 162, 219, 87, 233,
- 91, 254, 126, 232, 152, 177, 226, 125, 232, 152, 254, 126, 232, 152, 22,
- 2, 230, 229, 218, 141, 232, 152, 177, 2, 230, 229, 218, 141, 232, 152,
- 22, 2, 203, 248, 164, 232, 152, 177, 2, 203, 248, 164, 232, 152, 22, 2,
- 52, 226, 127, 232, 152, 22, 2, 214, 183, 232, 152, 22, 2, 52, 214, 183,
- 4, 213, 251, 2, 214, 183, 232, 152, 177, 2, 52, 226, 127, 232, 152, 177,
- 2, 52, 214, 183, 210, 160, 189, 247, 137, 254, 87, 210, 160, 189, 223,
- 151, 254, 87, 245, 106, 5, 2, 59, 51, 240, 111, 2, 59, 48, 215, 212, 203,
- 252, 149, 2, 52, 67, 91, 215, 212, 203, 252, 149, 2, 215, 212, 67, 91,
- 216, 90, 226, 172, 2, 59, 48, 216, 90, 226, 172, 2, 222, 231, 247, 126,
- 219, 164, 230, 187, 219, 163, 249, 207, 2, 59, 48, 245, 106, 2, 253, 224,
- 254, 156, 128, 216, 43, 2, 250, 39, 255, 23, 254, 56, 128, 177, 128, 112,
- 245, 106, 5, 72, 96, 50, 96, 5, 72, 245, 106, 50, 245, 106, 5, 72, 216,
- 90, 226, 171, 52, 249, 235, 245, 107, 113, 249, 202, 245, 106, 219, 178,
- 134, 249, 202, 245, 106, 219, 178, 245, 106, 5, 2, 113, 170, 72, 22, 113,
- 170, 51, 245, 102, 2, 244, 19, 170, 48, 233, 21, 2, 250, 44, 235, 222,
- 242, 137, 2, 250, 44, 235, 222, 233, 21, 2, 224, 16, 164, 48, 242, 137,
- 2, 224, 16, 164, 48, 233, 21, 177, 219, 99, 128, 112, 242, 137, 177, 219,
- 99, 128, 112, 233, 21, 177, 219, 99, 128, 216, 43, 2, 59, 235, 222, 242,
- 137, 177, 219, 99, 128, 216, 43, 2, 59, 235, 222, 233, 21, 177, 219, 99,
- 128, 216, 43, 2, 59, 48, 242, 137, 177, 219, 99, 128, 216, 43, 2, 59, 48,
- 233, 21, 177, 219, 99, 128, 216, 43, 2, 59, 72, 222, 254, 242, 137, 177,
- 219, 99, 128, 216, 43, 2, 59, 72, 233, 52, 233, 21, 177, 254, 57, 242,
- 137, 177, 254, 57, 233, 21, 22, 219, 155, 228, 57, 128, 112, 242, 137,
- 22, 219, 155, 228, 57, 128, 112, 233, 21, 22, 228, 57, 254, 57, 242, 137,
- 22, 228, 57, 254, 57, 233, 21, 72, 246, 119, 128, 72, 242, 136, 242, 137,
- 72, 246, 119, 128, 72, 233, 20, 233, 21, 72, 219, 164, 177, 245, 107,
- 242, 137, 72, 219, 164, 177, 245, 107, 233, 21, 72, 219, 164, 72, 242,
- 136, 242, 137, 72, 219, 164, 72, 233, 20, 233, 21, 72, 242, 137, 72, 246,
- 119, 245, 107, 242, 137, 72, 233, 21, 72, 246, 119, 245, 107, 233, 21,
- 72, 219, 99, 128, 72, 242, 137, 72, 219, 99, 245, 107, 242, 137, 72, 219,
- 99, 128, 72, 233, 21, 72, 219, 99, 245, 107, 219, 99, 128, 216, 43, 177,
- 233, 20, 219, 99, 128, 216, 43, 177, 242, 136, 219, 99, 128, 216, 43,
- 177, 233, 21, 2, 59, 235, 222, 219, 99, 128, 216, 43, 177, 242, 137, 2,
- 59, 235, 222, 246, 119, 128, 216, 43, 177, 233, 20, 246, 119, 128, 216,
- 43, 177, 242, 136, 246, 119, 219, 99, 128, 216, 43, 177, 233, 20, 246,
- 119, 219, 99, 128, 216, 43, 177, 242, 136, 219, 164, 177, 233, 20, 219,
- 164, 177, 242, 136, 219, 164, 72, 233, 21, 72, 245, 106, 50, 219, 164,
- 72, 242, 137, 72, 245, 106, 50, 52, 229, 96, 233, 20, 52, 229, 96, 242,
- 136, 52, 229, 96, 233, 21, 2, 214, 183, 242, 137, 226, 125, 233, 20, 242,
- 137, 252, 38, 233, 20, 233, 21, 250, 8, 251, 86, 249, 100, 242, 137, 250,
- 8, 251, 86, 249, 100, 233, 21, 250, 8, 251, 86, 249, 101, 72, 219, 99,
- 245, 107, 242, 137, 250, 8, 251, 86, 249, 101, 72, 219, 99, 245, 107,
- 219, 80, 216, 201, 233, 89, 216, 201, 219, 80, 216, 202, 177, 128, 112,
- 233, 89, 216, 202, 177, 128, 112, 245, 106, 5, 2, 251, 116, 48, 224, 206,
- 72, 219, 155, 245, 106, 50, 218, 57, 72, 219, 155, 245, 106, 50, 224,
- 206, 72, 219, 155, 228, 57, 128, 112, 218, 57, 72, 219, 155, 228, 57,
- 128, 112, 224, 206, 72, 245, 106, 50, 218, 57, 72, 245, 106, 50, 224,
- 206, 72, 228, 57, 128, 112, 218, 57, 72, 228, 57, 128, 112, 224, 206, 72,
- 254, 156, 128, 112, 218, 57, 72, 254, 156, 128, 112, 224, 206, 72, 228,
- 57, 254, 156, 128, 112, 218, 57, 72, 228, 57, 254, 156, 128, 112, 52,
- 224, 205, 52, 218, 56, 218, 65, 2, 247, 128, 218, 23, 2, 247, 128, 218,
- 65, 2, 96, 5, 51, 218, 23, 2, 96, 5, 51, 218, 65, 2, 230, 89, 5, 51, 218,
- 23, 2, 230, 89, 5, 51, 218, 65, 64, 177, 128, 216, 43, 2, 59, 48, 218,
- 23, 64, 177, 128, 216, 43, 2, 59, 48, 218, 65, 64, 72, 245, 106, 50, 218,
- 23, 64, 72, 245, 106, 50, 218, 65, 64, 72, 216, 90, 226, 171, 218, 23,
- 64, 72, 216, 90, 226, 171, 218, 65, 64, 72, 254, 156, 128, 112, 218, 23,
- 64, 72, 254, 156, 128, 112, 218, 65, 64, 72, 228, 57, 128, 112, 218, 23,
- 64, 72, 228, 57, 128, 112, 42, 43, 204, 93, 226, 171, 42, 44, 204, 93,
- 226, 171, 250, 8, 218, 64, 250, 8, 218, 22, 250, 8, 218, 65, 177, 128,
- 112, 250, 8, 218, 23, 177, 128, 112, 218, 65, 72, 218, 22, 218, 23, 72,
- 218, 64, 218, 65, 72, 218, 64, 218, 23, 72, 218, 22, 218, 23, 252, 38,
- 218, 64, 218, 23, 252, 38, 22, 235, 71, 251, 86, 248, 165, 2, 218, 64,
- 245, 178, 64, 226, 174, 246, 111, 225, 51, 2, 217, 13, 216, 14, 215, 241,
- 235, 205, 244, 29, 228, 70, 219, 253, 43, 217, 88, 219, 253, 124, 217,
- 88, 219, 253, 120, 217, 88, 225, 175, 2, 222, 93, 67, 252, 149, 215, 212,
- 44, 215, 93, 52, 67, 252, 149, 43, 215, 93, 67, 252, 149, 52, 43, 215,
- 93, 52, 67, 252, 149, 52, 43, 215, 93, 200, 248, 165, 243, 251, 43, 231,
- 68, 64, 52, 213, 239, 219, 253, 124, 217, 89, 2, 226, 127, 219, 253, 120,
- 217, 89, 2, 214, 183, 219, 253, 120, 217, 89, 72, 219, 253, 124, 217, 88,
- 52, 124, 217, 88, 52, 120, 217, 88, 52, 218, 105, 228, 57, 50, 223, 52,
- 52, 218, 105, 228, 57, 50, 247, 146, 228, 57, 247, 183, 2, 223, 52, 229,
- 106, 219, 97, 67, 232, 220, 2, 250, 44, 48, 67, 232, 220, 2, 250, 44, 51,
- 124, 217, 89, 2, 250, 44, 51, 226, 12, 2, 203, 91, 226, 12, 2, 216, 90,
- 226, 171, 215, 212, 67, 252, 149, 251, 252, 223, 94, 215, 212, 67, 252,
- 149, 2, 203, 91, 215, 212, 249, 235, 226, 171, 215, 212, 229, 96, 233,
- 20, 215, 212, 229, 96, 242, 136, 246, 119, 219, 99, 233, 21, 177, 128,
- 112, 246, 119, 219, 99, 242, 137, 177, 128, 112, 215, 212, 219, 49, 251,
- 252, 223, 94, 233, 91, 215, 212, 67, 252, 149, 226, 171, 52, 219, 49,
- 226, 171, 71, 67, 130, 230, 29, 71, 67, 130, 228, 61, 245, 228, 71, 75,
- 228, 61, 212, 9, 71, 75, 219, 30, 245, 228, 71, 75, 219, 30, 212, 9, 71,
- 75, 43, 44, 71, 75, 140, 85, 75, 214, 153, 85, 75, 246, 112, 85, 75, 228,
- 61, 245, 228, 85, 75, 228, 61, 212, 9, 85, 75, 219, 30, 245, 228, 85, 75,
- 219, 30, 212, 9, 85, 75, 43, 44, 85, 75, 120, 124, 85, 75, 97, 80, 2,
- 216, 78, 246, 111, 97, 80, 2, 216, 78, 214, 152, 140, 80, 2, 216, 78,
- 246, 111, 140, 80, 2, 216, 78, 214, 152, 42, 2, 216, 15, 163, 251, 229,
- 42, 2, 251, 183, 163, 251, 229, 42, 2, 214, 160, 44, 248, 7, 163, 251,
- 229, 42, 2, 232, 114, 43, 248, 7, 163, 251, 229, 248, 1, 2, 43, 163, 251,
- 229, 248, 1, 2, 44, 163, 251, 229, 248, 1, 2, 216, 15, 163, 251, 229,
- 248, 1, 2, 251, 183, 163, 251, 229, 246, 126, 218, 236, 85, 233, 91, 218,
- 236, 71, 233, 91, 218, 236, 85, 213, 187, 4, 218, 236, 71, 213, 187, 4,
- 218, 236, 85, 225, 193, 71, 225, 193, 71, 241, 200, 85, 241, 200, 203,
- 85, 241, 200, 85, 233, 91, 250, 43, 85, 231, 87, 248, 0, 71, 231, 87,
- 248, 0, 85, 231, 87, 232, 110, 71, 231, 87, 232, 110, 85, 4, 248, 0, 85,
- 4, 232, 110, 71, 4, 232, 110, 85, 203, 245, 172, 71, 203, 245, 172, 85,
- 67, 245, 172, 71, 67, 245, 172, 43, 80, 2, 4, 250, 43, 134, 140, 253,
- 255, 43, 80, 2, 37, 225, 25, 200, 140, 218, 232, 75, 140, 215, 58, 80, 2,
- 67, 91, 140, 215, 58, 80, 2, 52, 67, 91, 140, 215, 58, 80, 243, 251, 130,
- 140, 215, 58, 215, 212, 248, 165, 75, 140, 80, 2, 246, 126, 218, 141,
- 140, 80, 2, 217, 79, 2, 67, 91, 140, 80, 2, 217, 79, 2, 52, 67, 91, 140,
- 215, 58, 80, 2, 217, 78, 140, 215, 58, 80, 2, 217, 79, 2, 67, 91, 140,
- 215, 58, 80, 2, 217, 79, 2, 52, 67, 91, 140, 80, 216, 140, 211, 178, 212,
- 36, 80, 225, 10, 247, 203, 233, 52, 245, 106, 5, 72, 140, 75, 223, 53,
- 216, 90, 226, 172, 72, 140, 75, 140, 80, 72, 223, 53, 254, 156, 128, 112,
- 97, 80, 216, 140, 242, 136, 97, 80, 216, 140, 218, 22, 140, 224, 27, 75,
- 97, 224, 27, 75, 223, 53, 216, 90, 226, 172, 72, 97, 75, 97, 80, 72, 223,
- 53, 254, 156, 128, 112, 216, 90, 226, 172, 72, 140, 75, 140, 80, 72, 254,
- 156, 128, 112, 140, 80, 72, 223, 53, 216, 90, 226, 171, 97, 80, 72, 223,
- 53, 216, 90, 226, 171, 71, 231, 87, 218, 158, 85, 4, 218, 158, 71, 4,
- 218, 158, 85, 222, 250, 225, 193, 71, 222, 250, 225, 193, 114, 233, 91,
- 250, 43, 114, 226, 128, 2, 226, 128, 235, 222, 114, 250, 44, 2, 250, 44,
- 235, 222, 114, 250, 43, 114, 37, 222, 0, 145, 6, 1, 253, 167, 145, 6, 1,
- 251, 125, 145, 6, 1, 213, 253, 145, 6, 1, 242, 192, 145, 6, 1, 247, 148,
- 145, 6, 1, 211, 21, 145, 6, 1, 210, 68, 145, 6, 1, 246, 42, 145, 6, 1,
- 210, 91, 145, 6, 1, 235, 154, 145, 6, 1, 65, 235, 154, 145, 6, 1, 74,
- 145, 6, 1, 247, 168, 145, 6, 1, 234, 246, 145, 6, 1, 232, 192, 145, 6, 1,
- 230, 34, 145, 6, 1, 229, 196, 145, 6, 1, 226, 189, 145, 6, 1, 225, 7,
- 145, 6, 1, 222, 230, 145, 6, 1, 219, 85, 145, 6, 1, 215, 81, 145, 6, 1,
- 214, 201, 145, 6, 1, 243, 254, 145, 6, 1, 241, 206, 145, 6, 1, 226, 139,
- 145, 6, 1, 225, 224, 145, 6, 1, 219, 230, 145, 6, 1, 215, 168, 145, 6, 1,
- 250, 83, 145, 6, 1, 220, 104, 145, 6, 1, 211, 27, 145, 6, 1, 211, 29,
- 145, 6, 1, 211, 57, 145, 6, 1, 218, 255, 162, 145, 6, 1, 210, 212, 145,
- 6, 1, 4, 210, 183, 145, 6, 1, 4, 210, 184, 2, 217, 78, 145, 6, 1, 210,
- 244, 145, 6, 1, 235, 191, 4, 210, 183, 145, 6, 1, 252, 1, 210, 183, 145,
- 6, 1, 235, 191, 252, 1, 210, 183, 145, 6, 1, 244, 90, 145, 6, 1, 235,
- 152, 145, 6, 1, 219, 229, 145, 6, 1, 215, 203, 61, 145, 6, 1, 233, 81,
- 230, 34, 145, 4, 1, 253, 167, 145, 4, 1, 251, 125, 145, 4, 1, 213, 253,
- 145, 4, 1, 242, 192, 145, 4, 1, 247, 148, 145, 4, 1, 211, 21, 145, 4, 1,
- 210, 68, 145, 4, 1, 246, 42, 145, 4, 1, 210, 91, 145, 4, 1, 235, 154,
- 145, 4, 1, 65, 235, 154, 145, 4, 1, 74, 145, 4, 1, 247, 168, 145, 4, 1,
- 234, 246, 145, 4, 1, 232, 192, 145, 4, 1, 230, 34, 145, 4, 1, 229, 196,
- 145, 4, 1, 226, 189, 145, 4, 1, 225, 7, 145, 4, 1, 222, 230, 145, 4, 1,
- 219, 85, 145, 4, 1, 215, 81, 145, 4, 1, 214, 201, 145, 4, 1, 243, 254,
- 145, 4, 1, 241, 206, 145, 4, 1, 226, 139, 145, 4, 1, 225, 224, 145, 4, 1,
- 219, 230, 145, 4, 1, 215, 168, 145, 4, 1, 250, 83, 145, 4, 1, 220, 104,
- 145, 4, 1, 211, 27, 145, 4, 1, 211, 29, 145, 4, 1, 211, 57, 145, 4, 1,
- 218, 255, 162, 145, 4, 1, 210, 212, 145, 4, 1, 4, 210, 183, 145, 4, 1, 4,
- 210, 184, 2, 217, 78, 145, 4, 1, 210, 244, 145, 4, 1, 235, 191, 4, 210,
- 183, 145, 4, 1, 252, 1, 210, 183, 145, 4, 1, 235, 191, 252, 1, 210, 183,
- 145, 4, 1, 244, 90, 145, 4, 1, 235, 152, 145, 4, 1, 219, 229, 145, 4, 1,
- 215, 203, 61, 145, 4, 1, 233, 81, 230, 34, 7, 6, 1, 233, 155, 2, 52, 130,
- 7, 4, 1, 233, 155, 2, 52, 130, 7, 6, 1, 233, 155, 2, 230, 229, 184, 7, 6,
- 1, 226, 110, 2, 91, 7, 6, 1, 223, 227, 2, 217, 78, 7, 4, 1, 116, 2, 91,
- 7, 4, 1, 217, 154, 2, 248, 7, 91, 7, 6, 1, 242, 68, 2, 248, 47, 7, 4, 1,
- 242, 68, 2, 248, 47, 7, 6, 1, 235, 30, 2, 248, 47, 7, 4, 1, 235, 30, 2,
- 248, 47, 7, 6, 1, 210, 160, 2, 248, 47, 7, 4, 1, 210, 160, 2, 248, 47, 7,
- 6, 1, 254, 151, 7, 6, 1, 232, 55, 2, 103, 7, 6, 1, 215, 94, 61, 7, 6, 1,
- 215, 94, 254, 151, 7, 4, 1, 214, 106, 2, 44, 103, 7, 6, 1, 212, 99, 2,
- 103, 7, 4, 1, 212, 99, 2, 103, 7, 4, 1, 214, 106, 2, 249, 108, 7, 6, 1,
- 163, 242, 67, 7, 4, 1, 163, 242, 67, 7, 4, 1, 217, 76, 225, 136, 7, 4, 1,
- 160, 2, 228, 55, 7, 4, 1, 215, 94, 223, 227, 2, 217, 78, 7, 4, 1, 144, 2,
- 121, 222, 237, 235, 222, 7, 1, 4, 6, 215, 94, 76, 7, 218, 66, 4, 1, 235,
- 150, 58, 1, 6, 214, 105, 7, 6, 1, 222, 94, 2, 217, 251, 217, 78, 7, 6, 1,
- 210, 160, 2, 217, 251, 217, 78, 81, 6, 1, 254, 173, 81, 4, 1, 254, 173,
- 81, 6, 1, 213, 173, 81, 4, 1, 213, 173, 81, 6, 1, 243, 114, 81, 4, 1,
- 243, 114, 81, 6, 1, 248, 199, 81, 4, 1, 248, 199, 81, 6, 1, 245, 202, 81,
- 4, 1, 245, 202, 81, 6, 1, 219, 35, 81, 4, 1, 219, 35, 81, 6, 1, 210, 101,
- 81, 4, 1, 210, 101, 81, 6, 1, 241, 255, 81, 4, 1, 241, 255, 81, 6, 1,
- 216, 178, 81, 4, 1, 216, 178, 81, 6, 1, 240, 123, 81, 4, 1, 240, 123, 81,
- 6, 1, 234, 233, 81, 4, 1, 234, 233, 81, 6, 1, 233, 78, 81, 4, 1, 233, 78,
- 81, 6, 1, 230, 235, 81, 4, 1, 230, 235, 81, 6, 1, 228, 238, 81, 4, 1,
- 228, 238, 81, 6, 1, 233, 239, 81, 4, 1, 233, 239, 81, 6, 1, 78, 81, 4, 1,
- 78, 81, 6, 1, 225, 111, 81, 4, 1, 225, 111, 81, 6, 1, 222, 213, 81, 4, 1,
- 222, 213, 81, 6, 1, 219, 167, 81, 4, 1, 219, 167, 81, 6, 1, 217, 42, 81,
- 4, 1, 217, 42, 81, 6, 1, 214, 229, 81, 4, 1, 214, 229, 81, 6, 1, 244,
- 129, 81, 4, 1, 244, 129, 81, 6, 1, 234, 118, 81, 4, 1, 234, 118, 81, 6,
- 1, 224, 164, 81, 4, 1, 224, 164, 81, 6, 1, 226, 182, 81, 4, 1, 226, 182,
- 81, 6, 1, 248, 5, 254, 179, 81, 4, 1, 248, 5, 254, 179, 81, 6, 1, 55, 81,
- 254, 205, 81, 4, 1, 55, 81, 254, 205, 81, 6, 1, 249, 123, 245, 202, 81,
- 4, 1, 249, 123, 245, 202, 81, 6, 1, 248, 5, 234, 233, 81, 4, 1, 248, 5,
- 234, 233, 81, 6, 1, 248, 5, 228, 238, 81, 4, 1, 248, 5, 228, 238, 81, 6,
- 1, 249, 123, 228, 238, 81, 4, 1, 249, 123, 228, 238, 81, 6, 1, 55, 81,
- 226, 182, 81, 4, 1, 55, 81, 226, 182, 81, 6, 1, 221, 248, 81, 4, 1, 221,
- 248, 81, 6, 1, 249, 136, 220, 57, 81, 4, 1, 249, 136, 220, 57, 81, 6, 1,
- 55, 81, 220, 57, 81, 4, 1, 55, 81, 220, 57, 81, 6, 1, 55, 81, 245, 83,
- 81, 4, 1, 55, 81, 245, 83, 81, 6, 1, 254, 191, 234, 123, 81, 4, 1, 254,
- 191, 234, 123, 81, 6, 1, 248, 5, 241, 52, 81, 4, 1, 248, 5, 241, 52, 81,
- 6, 1, 55, 81, 241, 52, 81, 4, 1, 55, 81, 241, 52, 81, 6, 1, 55, 81, 162,
- 81, 4, 1, 55, 81, 162, 81, 6, 1, 233, 154, 162, 81, 4, 1, 233, 154, 162,
- 81, 6, 1, 55, 81, 241, 224, 81, 4, 1, 55, 81, 241, 224, 81, 6, 1, 55, 81,
- 242, 2, 81, 4, 1, 55, 81, 242, 2, 81, 6, 1, 55, 81, 243, 109, 81, 4, 1,
- 55, 81, 243, 109, 81, 6, 1, 55, 81, 247, 171, 81, 4, 1, 55, 81, 247, 171,
- 81, 6, 1, 55, 81, 220, 24, 81, 4, 1, 55, 81, 220, 24, 81, 6, 1, 55, 227,
- 212, 220, 24, 81, 4, 1, 55, 227, 212, 220, 24, 81, 6, 1, 55, 227, 212,
- 229, 32, 81, 4, 1, 55, 227, 212, 229, 32, 81, 6, 1, 55, 227, 212, 227,
- 152, 81, 4, 1, 55, 227, 212, 227, 152, 81, 6, 1, 55, 227, 212, 212, 37,
- 81, 4, 1, 55, 227, 212, 212, 37, 81, 16, 234, 252, 81, 16, 230, 236, 222,
- 213, 81, 16, 225, 112, 222, 213, 81, 16, 218, 149, 81, 16, 217, 43, 222,
- 213, 81, 16, 234, 119, 222, 213, 81, 16, 220, 25, 219, 167, 81, 6, 1,
- 249, 123, 220, 57, 81, 4, 1, 249, 123, 220, 57, 81, 6, 1, 249, 123, 243,
- 109, 81, 4, 1, 249, 123, 243, 109, 81, 38, 228, 239, 48, 81, 38, 218,
- 249, 253, 232, 81, 38, 218, 249, 233, 27, 81, 6, 1, 251, 207, 234, 123,
- 81, 4, 1, 251, 207, 234, 123, 81, 55, 227, 212, 243, 236, 218, 131, 81,
- 55, 227, 212, 247, 205, 224, 16, 79, 81, 55, 227, 212, 235, 244, 224, 16,
- 79, 81, 55, 227, 212, 213, 241, 247, 180, 81, 244, 10, 123, 242, 34, 81,
- 243, 236, 218, 131, 81, 230, 129, 247, 180, 98, 4, 1, 254, 131, 98, 4, 1,
- 252, 160, 98, 4, 1, 243, 113, 98, 4, 1, 247, 136, 98, 4, 1, 245, 158, 98,
- 4, 1, 213, 160, 98, 4, 1, 210, 89, 98, 4, 1, 217, 61, 98, 4, 1, 236, 6,
- 98, 4, 1, 234, 240, 98, 4, 1, 233, 87, 98, 4, 1, 231, 190, 98, 4, 1, 229,
- 200, 98, 4, 1, 226, 200, 98, 4, 1, 226, 21, 98, 4, 1, 210, 78, 98, 4, 1,
- 223, 174, 98, 4, 1, 221, 245, 98, 4, 1, 217, 51, 98, 4, 1, 214, 190, 98,
- 4, 1, 225, 143, 98, 4, 1, 234, 127, 98, 4, 1, 242, 248, 98, 4, 1, 224,
- 76, 98, 4, 1, 220, 22, 98, 4, 1, 250, 105, 98, 4, 1, 251, 15, 98, 4, 1,
- 235, 106, 98, 4, 1, 250, 48, 98, 4, 1, 250, 151, 98, 4, 1, 211, 163, 98,
- 4, 1, 235, 117, 98, 4, 1, 242, 50, 98, 4, 1, 241, 245, 98, 4, 1, 241,
- 182, 98, 4, 1, 212, 22, 98, 4, 1, 242, 11, 98, 4, 1, 241, 72, 98, 4, 1,
- 210, 246, 98, 4, 1, 254, 241, 216, 109, 1, 192, 216, 109, 1, 211, 99,
- 216, 109, 1, 211, 98, 216, 109, 1, 211, 88, 216, 109, 1, 211, 86, 216,
- 109, 1, 252, 40, 255, 25, 211, 81, 216, 109, 1, 211, 81, 216, 109, 1,
- 211, 96, 216, 109, 1, 211, 93, 216, 109, 1, 211, 95, 216, 109, 1, 211,
- 94, 216, 109, 1, 211, 12, 216, 109, 1, 211, 90, 216, 109, 1, 211, 79,
- 216, 109, 1, 215, 116, 211, 79, 216, 109, 1, 211, 76, 216, 109, 1, 211,
- 84, 216, 109, 1, 252, 40, 255, 25, 211, 84, 216, 109, 1, 215, 116, 211,
- 84, 216, 109, 1, 211, 83, 216, 109, 1, 211, 103, 216, 109, 1, 211, 77,
- 216, 109, 1, 215, 116, 211, 77, 216, 109, 1, 211, 66, 216, 109, 1, 215,
- 116, 211, 66, 216, 109, 1, 211, 8, 216, 109, 1, 211, 49, 216, 109, 1,
- 254, 216, 211, 49, 216, 109, 1, 215, 116, 211, 49, 216, 109, 1, 211, 75,
- 216, 109, 1, 211, 74, 216, 109, 1, 211, 71, 216, 109, 1, 215, 116, 211,
- 85, 216, 109, 1, 215, 116, 211, 69, 216, 109, 1, 211, 67, 216, 109, 1,
- 210, 212, 216, 109, 1, 211, 64, 216, 109, 1, 211, 63, 216, 109, 1, 211,
- 87, 216, 109, 1, 215, 116, 211, 87, 216, 109, 1, 253, 171, 211, 87, 216,
- 109, 1, 211, 62, 216, 109, 1, 211, 60, 216, 109, 1, 211, 61, 216, 109, 1,
- 211, 59, 216, 109, 1, 211, 58, 216, 109, 1, 211, 97, 216, 109, 1, 211,
- 56, 216, 109, 1, 211, 54, 216, 109, 1, 211, 53, 216, 109, 1, 211, 52,
- 216, 109, 1, 211, 50, 216, 109, 1, 217, 35, 211, 50, 216, 109, 1, 211,
- 48, 216, 109, 1, 211, 47, 216, 109, 1, 210, 244, 216, 109, 58, 1, 233,
- 132, 79, 216, 109, 220, 140, 79, 216, 109, 117, 235, 69, 29, 3, 232, 161,
- 29, 3, 230, 165, 29, 3, 222, 211, 29, 3, 219, 59, 29, 3, 220, 8, 29, 3,
- 251, 212, 29, 3, 216, 42, 29, 3, 249, 245, 29, 3, 228, 77, 29, 3, 227,
- 137, 29, 3, 242, 187, 227, 4, 29, 3, 210, 22, 29, 3, 247, 151, 29, 3,
- 248, 112, 29, 3, 235, 73, 29, 3, 216, 156, 29, 3, 250, 93, 29, 3, 225,
- 123, 29, 3, 225, 18, 29, 3, 243, 6, 29, 3, 243, 2, 29, 3, 243, 3, 29, 3,
- 243, 4, 29, 3, 218, 225, 29, 3, 218, 181, 29, 3, 218, 194, 29, 3, 218,
- 224, 29, 3, 218, 198, 29, 3, 218, 199, 29, 3, 218, 186, 29, 3, 250, 221,
- 29, 3, 250, 200, 29, 3, 250, 202, 29, 3, 250, 220, 29, 3, 250, 218, 29,
- 3, 250, 219, 29, 3, 250, 201, 29, 3, 209, 243, 29, 3, 209, 221, 29, 3,
- 209, 234, 29, 3, 209, 242, 29, 3, 209, 237, 29, 3, 209, 238, 29, 3, 209,
- 226, 29, 3, 250, 216, 29, 3, 250, 203, 29, 3, 250, 205, 29, 3, 250, 215,
- 29, 3, 250, 213, 29, 3, 250, 214, 29, 3, 250, 204, 29, 3, 223, 239, 29,
- 3, 223, 229, 29, 3, 223, 235, 29, 3, 223, 238, 29, 3, 223, 236, 29, 3,
- 223, 237, 29, 3, 223, 234, 29, 3, 233, 165, 29, 3, 233, 157, 29, 3, 233,
- 160, 29, 3, 233, 164, 29, 3, 233, 161, 29, 3, 233, 162, 29, 3, 233, 158,
- 29, 3, 211, 130, 29, 3, 211, 120, 29, 3, 211, 126, 29, 3, 211, 129, 29,
- 3, 211, 127, 29, 3, 211, 128, 29, 3, 211, 125, 29, 3, 242, 78, 29, 3,
- 242, 69, 29, 3, 242, 72, 29, 3, 242, 77, 29, 3, 242, 74, 29, 3, 242, 75,
- 29, 3, 242, 71, 38, 33, 1, 252, 83, 38, 33, 1, 213, 255, 38, 33, 1, 242,
- 243, 38, 33, 1, 248, 98, 38, 33, 1, 210, 74, 38, 33, 1, 210, 94, 38, 33,
- 1, 176, 38, 33, 1, 245, 182, 38, 33, 1, 245, 167, 38, 33, 1, 245, 158,
- 38, 33, 1, 78, 38, 33, 1, 225, 224, 38, 33, 1, 245, 100, 38, 33, 1, 245,
- 90, 38, 33, 1, 217, 23, 38, 33, 1, 162, 38, 33, 1, 215, 179, 38, 33, 1,
- 250, 139, 38, 33, 1, 220, 104, 38, 33, 1, 220, 67, 38, 33, 1, 244, 90,
- 38, 33, 1, 245, 89, 38, 33, 1, 61, 38, 33, 1, 236, 67, 38, 33, 1, 247,
- 169, 38, 33, 1, 230, 145, 214, 205, 38, 33, 1, 211, 59, 38, 33, 1, 210,
- 212, 38, 33, 1, 235, 190, 61, 38, 33, 1, 232, 198, 210, 183, 38, 33, 1,
- 252, 1, 210, 183, 38, 33, 1, 235, 190, 252, 1, 210, 183, 44, 254, 118,
- 218, 61, 231, 159, 44, 254, 118, 246, 126, 218, 61, 231, 159, 43, 218,
- 61, 127, 44, 218, 61, 127, 43, 246, 126, 218, 61, 127, 44, 246, 126, 218,
- 61, 127, 223, 160, 235, 209, 231, 159, 223, 160, 246, 126, 235, 209, 231,
- 159, 246, 126, 215, 242, 231, 159, 43, 215, 242, 127, 44, 215, 242, 127,
- 223, 160, 218, 236, 43, 223, 160, 226, 202, 127, 44, 223, 160, 226, 202,
- 127, 245, 218, 249, 166, 226, 17, 244, 30, 226, 17, 223, 52, 244, 30,
- 226, 17, 240, 172, 246, 126, 226, 255, 246, 112, 254, 127, 214, 153, 254,
- 127, 246, 126, 222, 250, 254, 117, 52, 226, 252, 240, 175, 235, 200, 235,
- 208, 226, 63, 251, 162, 240, 176, 2, 248, 9, 216, 90, 2, 222, 237, 48,
- 43, 121, 226, 9, 127, 44, 121, 226, 9, 127, 216, 90, 2, 59, 48, 216, 90,
- 2, 59, 51, 43, 67, 252, 149, 2, 224, 10, 44, 67, 252, 149, 2, 224, 10,
- 216, 15, 43, 163, 127, 216, 15, 44, 163, 127, 251, 183, 43, 163, 127,
- 251, 183, 44, 163, 127, 43, 219, 189, 104, 127, 44, 219, 189, 104, 127,
- 43, 52, 226, 7, 44, 52, 226, 7, 113, 170, 115, 123, 59, 224, 143, 123,
- 59, 115, 113, 170, 224, 143, 92, 244, 19, 59, 224, 143, 244, 89, 59, 79,
- 223, 52, 224, 16, 79, 67, 184, 222, 237, 225, 13, 211, 209, 220, 140,
- 230, 229, 247, 128, 215, 94, 249, 227, 223, 160, 247, 128, 223, 160, 249,
- 227, 215, 94, 220, 152, 248, 214, 2, 43, 242, 115, 248, 214, 2, 44, 242,
- 115, 215, 94, 248, 213, 216, 15, 163, 221, 175, 50, 215, 59, 248, 164,
- 216, 144, 248, 164, 10, 34, 223, 79, 10, 34, 250, 18, 10, 34, 221, 178,
- 111, 10, 34, 221, 178, 105, 10, 34, 221, 178, 158, 10, 34, 225, 170, 10,
- 34, 251, 171, 10, 34, 217, 93, 10, 34, 234, 39, 111, 10, 34, 234, 39,
- 105, 10, 34, 247, 178, 10, 34, 221, 181, 10, 34, 4, 111, 10, 34, 4, 105,
- 10, 34, 233, 103, 111, 10, 34, 233, 103, 105, 10, 34, 233, 103, 158, 10,
- 34, 233, 103, 161, 10, 34, 219, 70, 10, 34, 216, 146, 10, 34, 219, 68,
- 111, 10, 34, 219, 68, 105, 10, 34, 241, 235, 111, 10, 34, 241, 235, 105,
- 10, 34, 242, 22, 10, 34, 223, 150, 10, 34, 250, 90, 10, 34, 218, 38, 10,
- 34, 230, 133, 10, 34, 248, 96, 10, 34, 230, 125, 10, 34, 250, 33, 10, 34,
- 212, 41, 111, 10, 34, 212, 41, 105, 10, 34, 244, 104, 10, 34, 225, 236,
- 111, 10, 34, 225, 236, 105, 10, 34, 219, 162, 163, 215, 237, 215, 189,
- 10, 34, 249, 153, 10, 34, 247, 144, 10, 34, 235, 143, 10, 34, 251, 206,
- 64, 250, 2, 10, 34, 245, 23, 10, 34, 218, 251, 111, 10, 34, 218, 251,
- 105, 10, 34, 252, 162, 10, 34, 219, 169, 10, 34, 251, 71, 219, 169, 10,
- 34, 229, 95, 111, 10, 34, 229, 95, 105, 10, 34, 229, 95, 158, 10, 34,
- 229, 95, 161, 10, 34, 231, 51, 10, 34, 220, 59, 10, 34, 223, 156, 10, 34,
- 245, 45, 10, 34, 226, 213, 10, 34, 251, 141, 111, 10, 34, 251, 141, 105,
- 10, 34, 231, 91, 10, 34, 230, 128, 10, 34, 242, 147, 111, 10, 34, 242,
- 147, 105, 10, 34, 242, 147, 158, 10, 34, 216, 107, 10, 34, 250, 1, 10,
- 34, 212, 9, 111, 10, 34, 212, 9, 105, 10, 34, 251, 71, 221, 172, 10, 34,
- 219, 162, 240, 255, 10, 34, 240, 255, 10, 34, 251, 71, 219, 4, 10, 34,
- 251, 71, 220, 54, 10, 34, 244, 40, 10, 34, 251, 71, 250, 236, 10, 34,
- 219, 162, 212, 57, 10, 34, 212, 58, 111, 10, 34, 212, 58, 105, 10, 34,
- 250, 35, 10, 34, 251, 71, 242, 173, 10, 34, 200, 111, 10, 34, 200, 105,
- 10, 34, 251, 71, 232, 143, 10, 34, 251, 71, 243, 95, 10, 34, 230, 124,
- 111, 10, 34, 230, 124, 105, 10, 34, 223, 162, 10, 34, 251, 215, 10, 34,
- 251, 71, 217, 57, 233, 58, 10, 34, 251, 71, 233, 59, 10, 34, 251, 71,
- 211, 239, 10, 34, 251, 71, 244, 54, 10, 34, 245, 226, 111, 10, 34, 245,
- 226, 105, 10, 34, 245, 226, 158, 10, 34, 251, 71, 245, 225, 10, 34, 241,
- 242, 10, 34, 251, 71, 240, 252, 10, 34, 251, 202, 10, 34, 242, 229, 10,
- 34, 251, 71, 244, 98, 10, 34, 251, 71, 251, 245, 10, 34, 251, 71, 222, 3,
- 10, 34, 219, 162, 212, 2, 10, 34, 219, 162, 211, 41, 10, 34, 251, 71,
- 243, 252, 10, 34, 235, 149, 245, 49, 10, 34, 251, 71, 245, 49, 10, 34,
- 235, 149, 216, 16, 10, 34, 251, 71, 216, 16, 10, 34, 235, 149, 246, 104,
- 10, 34, 251, 71, 246, 104, 10, 34, 215, 91, 10, 34, 235, 149, 215, 91,
- 10, 34, 251, 71, 215, 91, 60, 34, 111, 60, 34, 232, 219, 60, 34, 247,
- 128, 60, 34, 219, 97, 60, 34, 221, 177, 60, 34, 103, 60, 34, 105, 60, 34,
- 232, 243, 60, 34, 231, 190, 60, 34, 233, 39, 60, 34, 245, 137, 60, 34,
- 196, 60, 34, 124, 251, 171, 60, 34, 249, 155, 60, 34, 240, 118, 60, 34,
- 217, 93, 60, 34, 204, 251, 171, 60, 34, 234, 38, 60, 34, 224, 227, 60,
- 34, 211, 202, 60, 34, 218, 245, 60, 34, 44, 204, 251, 171, 60, 34, 241,
- 183, 245, 153, 60, 34, 216, 248, 60, 34, 247, 178, 60, 34, 221, 181, 60,
- 34, 250, 18, 60, 34, 224, 185, 60, 34, 254, 224, 60, 34, 230, 115, 60,
- 34, 245, 153, 60, 34, 245, 231, 60, 34, 221, 202, 60, 34, 242, 181, 60,
- 34, 242, 182, 219, 83, 60, 34, 245, 48, 60, 34, 252, 0, 60, 34, 211, 221,
- 60, 34, 250, 109, 60, 34, 222, 198, 60, 34, 236, 2, 60, 34, 219, 81, 60,
- 34, 233, 102, 60, 34, 249, 164, 60, 34, 218, 239, 60, 34, 230, 120, 60,
- 34, 222, 227, 60, 34, 211, 206, 60, 34, 226, 194, 60, 34, 215, 98, 60,
- 34, 246, 88, 60, 34, 219, 253, 216, 146, 60, 34, 246, 126, 250, 18, 60,
- 34, 200, 218, 110, 60, 34, 113, 242, 17, 60, 34, 220, 2, 60, 34, 251,
- 177, 60, 34, 219, 67, 60, 34, 251, 145, 60, 34, 218, 140, 60, 34, 241,
- 234, 60, 34, 242, 35, 60, 34, 247, 131, 60, 34, 242, 22, 60, 34, 251,
- 162, 60, 34, 223, 150, 60, 34, 221, 189, 60, 34, 247, 207, 60, 34, 253,
- 176, 60, 34, 218, 236, 60, 34, 228, 56, 60, 34, 218, 38, 60, 34, 221,
- 213, 60, 34, 230, 133, 60, 34, 215, 236, 60, 34, 233, 128, 60, 34, 218,
- 131, 60, 34, 248, 96, 60, 34, 212, 21, 60, 34, 247, 154, 228, 56, 60, 34,
- 249, 223, 60, 34, 243, 229, 60, 34, 250, 29, 60, 34, 218, 144, 60, 34,
- 212, 40, 60, 34, 244, 104, 60, 34, 250, 26, 60, 34, 244, 169, 60, 34, 52,
- 211, 178, 60, 34, 163, 215, 237, 215, 189, 60, 34, 219, 91, 60, 34, 244,
- 179, 60, 34, 249, 153, 60, 34, 247, 144, 60, 34, 224, 182, 60, 34, 235,
- 143, 60, 34, 231, 72, 60, 34, 216, 89, 60, 34, 217, 246, 60, 34, 232,
- 237, 60, 34, 214, 131, 60, 34, 244, 128, 60, 34, 251, 206, 64, 250, 2,
- 60, 34, 219, 190, 60, 34, 246, 126, 216, 243, 60, 34, 211, 253, 60, 34,
- 219, 105, 60, 34, 247, 195, 60, 34, 245, 23, 60, 34, 219, 7, 60, 34, 75,
- 60, 34, 218, 133, 60, 34, 218, 250, 60, 34, 216, 0, 60, 34, 242, 154, 60,
- 34, 250, 226, 60, 34, 218, 162, 60, 34, 252, 162, 60, 34, 223, 34, 60,
- 34, 219, 169, 60, 34, 235, 136, 60, 34, 229, 94, 60, 34, 220, 59, 60, 34,
- 244, 157, 60, 34, 226, 213, 60, 34, 254, 126, 60, 34, 225, 32, 60, 34,
- 245, 235, 60, 34, 251, 140, 60, 34, 231, 91, 60, 34, 230, 188, 60, 34,
- 220, 158, 60, 34, 254, 4, 60, 34, 230, 128, 60, 34, 216, 20, 60, 34, 226,
- 169, 60, 34, 251, 209, 60, 34, 218, 129, 60, 34, 249, 233, 60, 34, 242,
- 146, 60, 34, 216, 107, 60, 34, 235, 224, 60, 34, 251, 219, 60, 34, 212,
- 58, 245, 153, 60, 34, 250, 1, 60, 34, 212, 8, 60, 34, 221, 172, 60, 34,
- 240, 255, 60, 34, 219, 4, 60, 34, 214, 22, 60, 34, 252, 80, 60, 34, 225,
- 76, 60, 34, 252, 182, 60, 34, 220, 54, 60, 34, 223, 113, 60, 34, 222,
- 128, 60, 34, 244, 40, 60, 34, 251, 208, 60, 34, 250, 236, 60, 34, 251,
- 234, 60, 34, 230, 130, 60, 34, 212, 57, 60, 34, 250, 35, 60, 34, 211,
- 236, 60, 34, 247, 188, 60, 34, 213, 161, 60, 34, 242, 173, 60, 34, 232,
- 143, 60, 34, 243, 95, 60, 34, 230, 123, 60, 34, 219, 96, 60, 34, 219,
- 253, 217, 77, 251, 245, 60, 34, 223, 162, 60, 34, 251, 215, 60, 34, 211,
- 197, 60, 34, 244, 198, 60, 34, 233, 58, 60, 34, 217, 57, 233, 58, 60, 34,
- 233, 54, 60, 34, 219, 32, 60, 34, 233, 59, 60, 34, 211, 239, 60, 34, 244,
- 54, 60, 34, 245, 225, 60, 34, 241, 242, 60, 34, 244, 8, 60, 34, 240, 252,
- 60, 34, 251, 202, 60, 34, 217, 64, 60, 34, 242, 41, 60, 34, 244, 121, 60,
- 34, 222, 30, 211, 236, 60, 34, 250, 228, 60, 34, 242, 229, 60, 34, 244,
- 98, 60, 34, 251, 245, 60, 34, 222, 3, 60, 34, 248, 82, 60, 34, 212, 2,
- 60, 34, 241, 217, 60, 34, 211, 41, 60, 34, 230, 197, 60, 34, 251, 229,
- 60, 34, 245, 163, 60, 34, 243, 252, 60, 34, 215, 210, 60, 34, 246, 90,
- 60, 34, 223, 144, 60, 34, 228, 58, 60, 34, 245, 49, 60, 34, 216, 16, 60,
- 34, 246, 104, 60, 34, 215, 91, 60, 34, 244, 56, 110, 248, 45, 135, 43,
- 216, 43, 222, 254, 110, 248, 45, 135, 72, 216, 43, 51, 110, 248, 45, 135,
- 43, 216, 43, 230, 229, 22, 222, 254, 110, 248, 45, 135, 72, 216, 43, 230,
- 229, 22, 51, 110, 248, 45, 135, 243, 236, 218, 11, 110, 248, 45, 135,
- 218, 12, 243, 251, 48, 110, 248, 45, 135, 218, 12, 243, 251, 51, 110,
- 248, 45, 135, 218, 12, 243, 251, 233, 52, 110, 248, 45, 135, 218, 12,
- 243, 251, 214, 160, 233, 52, 110, 248, 45, 135, 218, 12, 243, 251, 214,
- 160, 222, 254, 110, 248, 45, 135, 218, 12, 243, 251, 232, 114, 233, 52,
- 110, 248, 45, 135, 226, 126, 110, 219, 20, 110, 249, 227, 110, 243, 236,
- 218, 131, 247, 185, 79, 235, 137, 235, 243, 218, 161, 87, 110, 235, 164,
- 79, 110, 250, 4, 79, 110, 54, 210, 86, 43, 254, 118, 127, 44, 254, 118,
- 127, 43, 52, 254, 118, 127, 44, 52, 254, 118, 127, 43, 249, 169, 127, 44,
- 249, 169, 127, 43, 71, 249, 169, 127, 44, 71, 249, 169, 127, 43, 85, 233,
- 26, 127, 44, 85, 233, 26, 127, 224, 240, 79, 243, 39, 79, 43, 216, 7,
- 220, 55, 127, 44, 216, 7, 220, 55, 127, 43, 71, 233, 26, 127, 44, 71,
- 233, 26, 127, 43, 71, 216, 7, 220, 55, 127, 44, 71, 216, 7, 220, 55, 127,
- 43, 71, 42, 127, 44, 71, 42, 127, 212, 36, 248, 164, 223, 52, 52, 224,
- 194, 224, 1, 79, 52, 224, 194, 224, 1, 79, 121, 52, 224, 194, 224, 1, 79,
- 224, 240, 164, 244, 198, 242, 15, 227, 202, 111, 242, 15, 227, 202, 105,
- 242, 15, 227, 202, 158, 242, 15, 227, 202, 161, 242, 15, 227, 202, 190,
- 242, 15, 227, 202, 195, 242, 15, 227, 202, 199, 242, 15, 227, 202, 196,
- 242, 15, 227, 202, 201, 110, 233, 9, 138, 79, 110, 222, 231, 138, 79,
- 110, 248, 52, 138, 79, 110, 245, 136, 138, 79, 24, 219, 157, 59, 138, 79,
- 24, 52, 59, 138, 79, 212, 32, 248, 164, 67, 234, 239, 223, 80, 79, 67,
- 234, 239, 223, 80, 2, 213, 135, 219, 33, 79, 67, 234, 239, 223, 80, 164,
- 214, 160, 242, 34, 67, 234, 239, 223, 80, 2, 213, 135, 219, 33, 164, 214,
- 160, 242, 34, 67, 234, 239, 223, 80, 164, 232, 114, 242, 34, 37, 224,
- 240, 79, 110, 217, 4, 232, 220, 244, 154, 220, 140, 87, 242, 15, 227,
- 202, 216, 248, 242, 15, 227, 202, 215, 73, 242, 15, 227, 202, 216, 163,
- 67, 110, 235, 164, 79, 231, 145, 79, 226, 3, 254, 148, 79, 110, 45, 235,
- 245, 110, 163, 244, 114, 219, 20, 141, 1, 4, 61, 141, 1, 61, 141, 1, 4,
- 74, 141, 1, 74, 141, 1, 4, 69, 141, 1, 69, 141, 1, 4, 76, 141, 1, 76,
- 141, 1, 4, 78, 141, 1, 78, 141, 1, 176, 141, 1, 243, 142, 141, 1, 234,
- 98, 141, 1, 242, 221, 141, 1, 233, 223, 141, 1, 242, 120, 141, 1, 234,
- 188, 141, 1, 243, 69, 141, 1, 234, 34, 141, 1, 242, 181, 141, 1, 206,
- 141, 1, 210, 116, 141, 1, 219, 193, 141, 1, 210, 44, 141, 1, 218, 84,
- 141, 1, 210, 13, 141, 1, 221, 183, 141, 1, 210, 94, 141, 1, 219, 60, 141,
- 1, 210, 23, 141, 1, 217, 106, 141, 1, 248, 229, 141, 1, 216, 118, 141, 1,
- 248, 11, 141, 1, 4, 215, 119, 141, 1, 215, 119, 141, 1, 246, 86, 141, 1,
- 217, 23, 141, 1, 248, 98, 141, 1, 112, 141, 1, 247, 153, 141, 1, 198,
- 141, 1, 228, 238, 141, 1, 227, 242, 141, 1, 229, 112, 141, 1, 228, 79,
- 141, 1, 162, 141, 1, 252, 199, 141, 1, 191, 141, 1, 241, 187, 141, 1,
- 252, 14, 141, 1, 225, 111, 141, 1, 240, 229, 141, 1, 251, 133, 141, 1,
- 224, 153, 141, 1, 241, 245, 141, 1, 252, 83, 141, 1, 225, 224, 141, 1,
- 241, 75, 141, 1, 251, 213, 141, 1, 225, 19, 141, 1, 186, 141, 1, 230,
- 235, 141, 1, 230, 107, 141, 1, 231, 96, 141, 1, 230, 166, 141, 1, 4, 192,
- 141, 1, 192, 141, 1, 4, 210, 212, 141, 1, 210, 212, 141, 1, 4, 210, 244,
- 141, 1, 210, 244, 141, 1, 205, 141, 1, 223, 38, 141, 1, 222, 142, 141, 1,
- 223, 131, 141, 1, 222, 213, 141, 1, 4, 212, 65, 141, 1, 212, 65, 141, 1,
- 211, 250, 141, 1, 212, 22, 141, 1, 211, 227, 141, 1, 230, 30, 141, 1,
- 212, 116, 141, 1, 4, 176, 141, 1, 4, 234, 188, 38, 234, 207, 213, 135,
- 219, 33, 79, 38, 234, 207, 220, 157, 219, 33, 79, 234, 207, 213, 135,
- 219, 33, 79, 234, 207, 220, 157, 219, 33, 79, 141, 235, 164, 79, 141,
- 213, 135, 235, 164, 79, 141, 247, 229, 210, 225, 234, 207, 52, 240, 175,
- 56, 1, 4, 61, 56, 1, 61, 56, 1, 4, 74, 56, 1, 74, 56, 1, 4, 69, 56, 1,
- 69, 56, 1, 4, 76, 56, 1, 76, 56, 1, 4, 78, 56, 1, 78, 56, 1, 176, 56, 1,
- 243, 142, 56, 1, 234, 98, 56, 1, 242, 221, 56, 1, 233, 223, 56, 1, 242,
- 120, 56, 1, 234, 188, 56, 1, 243, 69, 56, 1, 234, 34, 56, 1, 242, 181,
- 56, 1, 206, 56, 1, 210, 116, 56, 1, 219, 193, 56, 1, 210, 44, 56, 1, 218,
- 84, 56, 1, 210, 13, 56, 1, 221, 183, 56, 1, 210, 94, 56, 1, 219, 60, 56,
- 1, 210, 23, 56, 1, 217, 106, 56, 1, 248, 229, 56, 1, 216, 118, 56, 1,
- 248, 11, 56, 1, 4, 215, 119, 56, 1, 215, 119, 56, 1, 246, 86, 56, 1, 217,
- 23, 56, 1, 248, 98, 56, 1, 112, 56, 1, 247, 153, 56, 1, 198, 56, 1, 228,
- 238, 56, 1, 227, 242, 56, 1, 229, 112, 56, 1, 228, 79, 56, 1, 162, 56, 1,
- 252, 199, 56, 1, 191, 56, 1, 241, 187, 56, 1, 252, 14, 56, 1, 225, 111,
- 56, 1, 240, 229, 56, 1, 251, 133, 56, 1, 224, 153, 56, 1, 241, 245, 56,
- 1, 252, 83, 56, 1, 225, 224, 56, 1, 241, 75, 56, 1, 251, 213, 56, 1, 225,
- 19, 56, 1, 186, 56, 1, 230, 235, 56, 1, 230, 107, 56, 1, 231, 96, 56, 1,
- 230, 166, 56, 1, 4, 192, 56, 1, 192, 56, 1, 4, 210, 212, 56, 1, 210, 212,
- 56, 1, 4, 210, 244, 56, 1, 210, 244, 56, 1, 205, 56, 1, 223, 38, 56, 1,
- 222, 142, 56, 1, 223, 131, 56, 1, 222, 213, 56, 1, 4, 212, 65, 56, 1,
- 212, 65, 56, 1, 211, 250, 56, 1, 212, 22, 56, 1, 211, 227, 56, 1, 230,
- 30, 56, 1, 212, 116, 56, 1, 4, 176, 56, 1, 4, 234, 188, 56, 1, 214, 27,
- 56, 1, 213, 176, 56, 1, 213, 255, 56, 1, 213, 138, 56, 230, 229, 247,
- 128, 234, 207, 224, 176, 219, 33, 79, 56, 235, 164, 79, 56, 213, 135,
- 235, 164, 79, 56, 247, 229, 234, 5, 251, 192, 1, 253, 166, 251, 192, 1,
- 226, 109, 251, 192, 1, 194, 251, 192, 1, 245, 14, 251, 192, 1, 249, 68,
- 251, 192, 1, 217, 153, 251, 192, 1, 230, 30, 251, 192, 1, 156, 251, 192,
- 1, 243, 209, 251, 192, 1, 235, 29, 251, 192, 1, 242, 67, 251, 192, 1,
- 235, 150, 251, 192, 1, 224, 99, 251, 192, 1, 211, 178, 251, 192, 1, 210,
- 83, 251, 192, 1, 250, 166, 251, 192, 1, 220, 106, 251, 192, 1, 153, 251,
- 192, 1, 210, 159, 251, 192, 1, 251, 74, 251, 192, 1, 222, 93, 251, 192,
- 1, 61, 251, 192, 1, 78, 251, 192, 1, 76, 251, 192, 1, 245, 205, 251, 192,
- 1, 254, 210, 251, 192, 1, 245, 203, 251, 192, 1, 253, 200, 251, 192, 1,
- 226, 138, 251, 192, 1, 254, 131, 251, 192, 1, 245, 158, 251, 192, 1, 254,
- 123, 251, 192, 1, 245, 146, 251, 192, 1, 245, 100, 251, 192, 1, 74, 251,
- 192, 1, 69, 251, 192, 1, 235, 162, 251, 192, 1, 214, 105, 251, 192, 1,
- 229, 84, 251, 192, 1, 242, 185, 251, 192, 1, 236, 41, 24, 1, 234, 64, 24,
- 1, 218, 217, 24, 1, 234, 57, 24, 1, 228, 231, 24, 1, 228, 229, 24, 1,
- 228, 228, 24, 1, 216, 102, 24, 1, 218, 206, 24, 1, 223, 29, 24, 1, 223,
- 24, 24, 1, 223, 21, 24, 1, 223, 14, 24, 1, 223, 9, 24, 1, 223, 4, 24, 1,
- 223, 15, 24, 1, 223, 27, 24, 1, 230, 222, 24, 1, 225, 98, 24, 1, 218,
- 214, 24, 1, 225, 87, 24, 1, 219, 150, 24, 1, 218, 211, 24, 1, 236, 63,
- 24, 1, 250, 54, 24, 1, 218, 221, 24, 1, 250, 114, 24, 1, 234, 116, 24, 1,
- 216, 174, 24, 1, 225, 134, 24, 1, 241, 179, 24, 1, 61, 24, 1, 254, 252,
- 24, 1, 192, 24, 1, 211, 92, 24, 1, 245, 125, 24, 1, 76, 24, 1, 211, 36,
- 24, 1, 211, 47, 24, 1, 78, 24, 1, 212, 65, 24, 1, 212, 62, 24, 1, 226,
- 238, 24, 1, 210, 244, 24, 1, 69, 24, 1, 212, 11, 24, 1, 212, 22, 24, 1,
- 211, 250, 24, 1, 210, 212, 24, 1, 245, 63, 24, 1, 211, 8, 24, 1, 74, 24,
- 244, 111, 24, 1, 218, 215, 24, 1, 228, 221, 24, 1, 228, 223, 24, 1, 228,
- 226, 24, 1, 223, 22, 24, 1, 223, 3, 24, 1, 223, 11, 24, 1, 223, 16, 24,
- 1, 223, 1, 24, 1, 230, 215, 24, 1, 230, 212, 24, 1, 230, 216, 24, 1, 234,
- 227, 24, 1, 225, 93, 24, 1, 225, 79, 24, 1, 225, 85, 24, 1, 225, 82, 24,
- 1, 225, 96, 24, 1, 225, 80, 24, 1, 234, 225, 24, 1, 234, 223, 24, 1, 219,
- 143, 24, 1, 219, 141, 24, 1, 219, 133, 24, 1, 219, 138, 24, 1, 219, 148,
- 24, 1, 226, 36, 24, 1, 218, 218, 24, 1, 211, 26, 24, 1, 211, 22, 24, 1,
- 211, 23, 24, 1, 234, 226, 24, 1, 218, 219, 24, 1, 211, 32, 24, 1, 210,
- 238, 24, 1, 210, 237, 24, 1, 210, 240, 24, 1, 210, 203, 24, 1, 210, 204,
- 24, 1, 210, 207, 24, 1, 254, 42, 24, 1, 254, 36, 110, 254, 107, 232, 209,
- 79, 110, 254, 107, 223, 53, 79, 110, 254, 107, 123, 79, 110, 254, 107,
- 113, 79, 110, 254, 107, 134, 79, 110, 254, 107, 244, 19, 79, 110, 254,
- 107, 216, 15, 79, 110, 254, 107, 230, 229, 79, 110, 254, 107, 251, 183,
- 79, 110, 254, 107, 244, 100, 79, 110, 254, 107, 221, 178, 79, 110, 254,
- 107, 216, 170, 79, 110, 254, 107, 244, 12, 79, 110, 254, 107, 241, 231,
- 79, 110, 254, 107, 245, 232, 79, 110, 254, 107, 231, 191, 79, 251, 192,
- 1, 251, 133, 251, 192, 1, 210, 44, 251, 192, 1, 235, 114, 251, 192, 1,
- 242, 120, 251, 192, 1, 245, 217, 251, 192, 1, 245, 143, 251, 192, 1, 226,
- 187, 251, 192, 1, 226, 191, 251, 192, 1, 235, 186, 251, 192, 1, 254, 109,
- 251, 192, 1, 235, 231, 251, 192, 1, 214, 168, 251, 192, 1, 236, 23, 251,
- 192, 1, 229, 62, 251, 192, 1, 254, 204, 251, 192, 1, 253, 195, 251, 192,
- 1, 254, 144, 251, 192, 1, 226, 208, 251, 192, 1, 226, 193, 251, 192, 1,
- 235, 228, 251, 192, 40, 1, 226, 109, 251, 192, 40, 1, 217, 153, 251, 192,
- 40, 1, 235, 29, 251, 192, 40, 1, 242, 67, 251, 192, 1, 243, 1, 251, 192,
- 1, 233, 5, 251, 192, 1, 209, 250, 10, 218, 105, 217, 153, 10, 218, 105,
- 212, 4, 10, 218, 105, 211, 158, 10, 218, 105, 251, 87, 10, 218, 105, 217,
- 255, 10, 218, 105, 240, 165, 10, 218, 105, 240, 169, 10, 218, 105, 240,
- 238, 10, 218, 105, 240, 166, 10, 218, 105, 217, 156, 10, 218, 105, 240,
- 168, 10, 218, 105, 240, 164, 10, 218, 105, 240, 236, 10, 218, 105, 240,
- 167, 10, 218, 105, 240, 163, 10, 218, 105, 230, 30, 10, 218, 105, 242,
- 67, 10, 218, 105, 222, 93, 10, 218, 105, 226, 109, 10, 218, 105, 219, 23,
- 10, 218, 105, 249, 68, 10, 218, 105, 240, 170, 10, 218, 105, 241, 197,
- 10, 218, 105, 217, 165, 10, 218, 105, 217, 234, 10, 218, 105, 218, 170,
- 10, 218, 105, 220, 112, 10, 218, 105, 225, 228, 10, 218, 105, 224, 101,
- 10, 218, 105, 216, 44, 10, 218, 105, 217, 155, 10, 218, 105, 217, 245,
- 10, 218, 105, 240, 177, 10, 218, 105, 240, 162, 10, 218, 105, 225, 152,
- 10, 218, 105, 224, 99, 56, 1, 4, 233, 223, 56, 1, 4, 219, 193, 56, 1, 4,
- 218, 84, 56, 1, 4, 112, 56, 1, 4, 227, 242, 56, 1, 4, 162, 56, 1, 4, 241,
- 187, 56, 1, 4, 240, 229, 56, 1, 4, 241, 245, 56, 1, 4, 241, 75, 56, 1, 4,
- 230, 107, 56, 1, 4, 205, 56, 1, 4, 223, 38, 56, 1, 4, 222, 142, 56, 1, 4,
- 223, 131, 56, 1, 4, 222, 213, 88, 24, 234, 64, 88, 24, 228, 231, 88, 24,
- 216, 102, 88, 24, 223, 29, 88, 24, 230, 222, 88, 24, 225, 98, 88, 24,
- 219, 150, 88, 24, 236, 63, 88, 24, 250, 54, 88, 24, 250, 114, 88, 24,
- 234, 116, 88, 24, 216, 174, 88, 24, 225, 134, 88, 24, 241, 179, 88, 24,
- 234, 65, 61, 88, 24, 228, 232, 61, 88, 24, 216, 103, 61, 88, 24, 223, 30,
- 61, 88, 24, 230, 223, 61, 88, 24, 225, 99, 61, 88, 24, 219, 151, 61, 88,
- 24, 236, 64, 61, 88, 24, 250, 55, 61, 88, 24, 250, 115, 61, 88, 24, 234,
- 117, 61, 88, 24, 216, 175, 61, 88, 24, 225, 135, 61, 88, 24, 241, 180,
- 61, 88, 24, 250, 55, 69, 88, 234, 9, 135, 226, 221, 88, 234, 9, 135, 144,
- 240, 229, 88, 154, 111, 88, 154, 105, 88, 154, 158, 88, 154, 161, 88,
- 154, 190, 88, 154, 195, 88, 154, 199, 88, 154, 196, 88, 154, 201, 88,
- 154, 216, 248, 88, 154, 230, 133, 88, 154, 244, 104, 88, 154, 212, 40,
- 88, 154, 211, 214, 88, 154, 231, 44, 88, 154, 245, 231, 88, 154, 218, 38,
- 88, 154, 218, 134, 88, 154, 241, 251, 88, 154, 219, 56, 88, 154, 229,
- 209, 88, 154, 219, 6, 88, 154, 244, 110, 88, 154, 249, 208, 88, 154, 233,
- 131, 88, 154, 223, 74, 88, 154, 251, 23, 88, 154, 218, 88, 88, 154, 218,
- 21, 88, 154, 245, 135, 88, 154, 223, 66, 88, 154, 254, 159, 88, 154, 244,
- 136, 88, 154, 223, 64, 88, 154, 220, 158, 88, 154, 223, 130, 37, 154,
- 224, 15, 37, 154, 234, 86, 37, 154, 221, 200, 37, 154, 234, 5, 37, 54,
- 216, 249, 226, 201, 85, 218, 236, 37, 54, 215, 74, 226, 201, 85, 218,
- 236, 37, 54, 216, 164, 226, 201, 85, 218, 236, 37, 54, 244, 24, 226, 201,
- 85, 218, 236, 37, 54, 244, 123, 226, 201, 85, 218, 236, 37, 54, 219, 114,
- 226, 201, 85, 218, 236, 37, 54, 220, 119, 226, 201, 85, 218, 236, 37, 54,
- 245, 193, 226, 201, 85, 218, 236, 225, 255, 50, 37, 54, 215, 74, 111, 37,
- 54, 215, 74, 105, 37, 54, 215, 74, 158, 37, 54, 215, 74, 161, 37, 54,
- 215, 74, 190, 37, 54, 215, 74, 195, 37, 54, 215, 74, 199, 37, 54, 215,
- 74, 196, 37, 54, 215, 74, 201, 37, 54, 216, 163, 37, 54, 216, 164, 111,
- 37, 54, 216, 164, 105, 37, 54, 216, 164, 158, 37, 54, 216, 164, 161, 37,
- 54, 216, 164, 190, 37, 24, 234, 64, 37, 24, 228, 231, 37, 24, 216, 102,
- 37, 24, 223, 29, 37, 24, 230, 222, 37, 24, 225, 98, 37, 24, 219, 150, 37,
- 24, 236, 63, 37, 24, 250, 54, 37, 24, 250, 114, 37, 24, 234, 116, 37, 24,
- 216, 174, 37, 24, 225, 134, 37, 24, 241, 179, 37, 24, 234, 65, 61, 37,
- 24, 228, 232, 61, 37, 24, 216, 103, 61, 37, 24, 223, 30, 61, 37, 24, 230,
- 223, 61, 37, 24, 225, 99, 61, 37, 24, 219, 151, 61, 37, 24, 236, 64, 61,
- 37, 24, 250, 55, 61, 37, 24, 250, 115, 61, 37, 24, 234, 117, 61, 37, 24,
- 216, 175, 61, 37, 24, 225, 135, 61, 37, 24, 241, 180, 61, 37, 234, 9,
- 135, 250, 156, 37, 234, 9, 135, 235, 53, 37, 24, 236, 64, 69, 234, 9,
- 218, 161, 87, 37, 154, 111, 37, 154, 105, 37, 154, 158, 37, 154, 161, 37,
- 154, 190, 37, 154, 195, 37, 154, 199, 37, 154, 196, 37, 154, 201, 37,
- 154, 216, 248, 37, 154, 230, 133, 37, 154, 244, 104, 37, 154, 212, 40,
- 37, 154, 211, 214, 37, 154, 231, 44, 37, 154, 245, 231, 37, 154, 218, 38,
- 37, 154, 218, 134, 37, 154, 241, 251, 37, 154, 219, 56, 37, 154, 229,
- 209, 37, 154, 219, 6, 37, 154, 244, 110, 37, 154, 249, 208, 37, 154, 233,
- 131, 37, 154, 221, 176, 37, 154, 231, 194, 37, 154, 244, 145, 37, 154,
- 218, 50, 37, 154, 245, 42, 37, 154, 224, 190, 37, 154, 253, 204, 37, 154,
- 235, 165, 37, 154, 223, 64, 37, 154, 249, 172, 37, 154, 249, 163, 37,
- 154, 241, 172, 37, 154, 250, 182, 37, 154, 232, 116, 37, 154, 233, 52,
- 37, 154, 222, 254, 37, 154, 231, 88, 37, 154, 223, 90, 37, 154, 218, 88,
- 37, 154, 218, 21, 37, 154, 245, 135, 37, 154, 223, 66, 37, 154, 254, 159,
- 37, 154, 228, 217, 37, 54, 216, 164, 195, 37, 54, 216, 164, 199, 37, 54,
- 216, 164, 196, 37, 54, 216, 164, 201, 37, 54, 244, 23, 37, 54, 244, 24,
- 111, 37, 54, 244, 24, 105, 37, 54, 244, 24, 158, 37, 54, 244, 24, 161,
- 37, 54, 244, 24, 190, 37, 54, 244, 24, 195, 37, 54, 244, 24, 199, 37, 54,
- 244, 24, 196, 37, 54, 244, 24, 201, 37, 54, 244, 122, 110, 217, 4, 16,
- 31, 235, 139, 110, 217, 4, 16, 31, 244, 156, 110, 217, 4, 16, 31, 231,
- 165, 110, 217, 4, 16, 31, 254, 55, 110, 217, 4, 16, 31, 231, 137, 110,
- 217, 4, 16, 31, 235, 51, 110, 217, 4, 16, 31, 235, 52, 110, 217, 4, 16,
- 31, 253, 196, 110, 217, 4, 16, 31, 220, 138, 110, 217, 4, 16, 31, 226,
- 243, 110, 217, 4, 16, 31, 228, 45, 110, 217, 4, 16, 31, 248, 93, 42, 241,
- 197, 42, 245, 96, 42, 245, 51, 232, 225, 232, 246, 50, 37, 56, 61, 37,
- 56, 74, 37, 56, 69, 37, 56, 76, 37, 56, 78, 37, 56, 176, 37, 56, 234, 98,
- 37, 56, 233, 223, 37, 56, 234, 188, 37, 56, 234, 34, 37, 56, 206, 37, 56,
- 219, 193, 37, 56, 218, 84, 37, 56, 221, 183, 37, 56, 219, 60, 37, 56,
- 217, 106, 37, 56, 216, 118, 37, 56, 215, 119, 37, 56, 217, 23, 37, 56,
- 112, 37, 56, 198, 37, 56, 228, 238, 37, 56, 227, 242, 37, 56, 229, 112,
- 37, 56, 228, 79, 37, 56, 162, 37, 56, 241, 187, 37, 56, 240, 229, 37, 56,
- 241, 245, 37, 56, 241, 75, 37, 56, 186, 37, 56, 230, 235, 37, 56, 230,
- 107, 37, 56, 231, 96, 37, 56, 230, 166, 37, 56, 192, 37, 56, 210, 212,
- 37, 56, 210, 244, 37, 56, 205, 37, 56, 223, 38, 37, 56, 222, 142, 37, 56,
- 223, 131, 37, 56, 222, 213, 37, 56, 212, 65, 37, 56, 211, 250, 37, 56,
- 212, 22, 37, 56, 211, 227, 42, 254, 79, 42, 253, 247, 42, 254, 103, 42,
- 255, 40, 42, 235, 233, 42, 235, 203, 42, 214, 166, 42, 245, 74, 42, 245,
- 214, 42, 226, 190, 42, 226, 184, 42, 234, 251, 42, 234, 220, 42, 234,
- 217, 42, 243, 99, 42, 243, 108, 42, 242, 211, 42, 242, 207, 42, 233, 156,
- 42, 242, 200, 42, 234, 78, 42, 234, 77, 42, 234, 76, 42, 234, 75, 42,
- 242, 93, 42, 242, 92, 42, 233, 199, 42, 233, 201, 42, 234, 184, 42, 234,
- 7, 42, 234, 14, 42, 222, 18, 42, 221, 239, 42, 219, 131, 42, 220, 143,
- 42, 220, 142, 42, 248, 226, 42, 248, 44, 42, 247, 129, 42, 216, 33, 42,
- 229, 205, 42, 228, 46, 42, 242, 39, 42, 226, 88, 42, 226, 87, 42, 252,
- 196, 42, 225, 108, 42, 225, 72, 42, 225, 73, 42, 251, 242, 42, 240, 228,
- 42, 240, 224, 42, 251, 99, 42, 240, 211, 42, 241, 222, 42, 225, 162, 42,
- 225, 197, 42, 241, 205, 42, 225, 194, 42, 225, 210, 42, 252, 69, 42, 225,
- 9, 42, 251, 188, 42, 241, 63, 42, 224, 253, 42, 241, 55, 42, 241, 57, 42,
- 231, 206, 42, 231, 202, 42, 231, 211, 42, 231, 155, 42, 231, 180, 42,
- 230, 202, 42, 230, 181, 42, 230, 180, 42, 231, 79, 42, 231, 76, 42, 231,
- 80, 42, 211, 102, 42, 211, 100, 42, 210, 201, 42, 222, 229, 42, 222, 233,
- 42, 222, 119, 42, 222, 113, 42, 223, 88, 42, 223, 85, 42, 212, 38, 110,
- 217, 4, 16, 31, 240, 246, 210, 86, 110, 217, 4, 16, 31, 240, 246, 111,
- 110, 217, 4, 16, 31, 240, 246, 105, 110, 217, 4, 16, 31, 240, 246, 158,
- 110, 217, 4, 16, 31, 240, 246, 161, 110, 217, 4, 16, 31, 240, 246, 190,
- 110, 217, 4, 16, 31, 240, 246, 195, 110, 217, 4, 16, 31, 240, 246, 199,
- 110, 217, 4, 16, 31, 240, 246, 196, 110, 217, 4, 16, 31, 240, 246, 201,
- 110, 217, 4, 16, 31, 240, 246, 216, 248, 110, 217, 4, 16, 31, 240, 246,
- 245, 175, 110, 217, 4, 16, 31, 240, 246, 215, 76, 110, 217, 4, 16, 31,
- 240, 246, 216, 165, 110, 217, 4, 16, 31, 240, 246, 244, 13, 110, 217, 4,
- 16, 31, 240, 246, 244, 126, 110, 217, 4, 16, 31, 240, 246, 219, 121, 110,
- 217, 4, 16, 31, 240, 246, 220, 121, 110, 217, 4, 16, 31, 240, 246, 245,
- 198, 110, 217, 4, 16, 31, 240, 246, 228, 202, 110, 217, 4, 16, 31, 240,
- 246, 215, 73, 110, 217, 4, 16, 31, 240, 246, 215, 67, 110, 217, 4, 16,
- 31, 240, 246, 215, 63, 110, 217, 4, 16, 31, 240, 246, 215, 64, 110, 217,
- 4, 16, 31, 240, 246, 215, 69, 42, 240, 237, 42, 248, 229, 42, 253, 200,
- 42, 130, 42, 226, 129, 42, 225, 229, 42, 247, 155, 42, 247, 156, 218,
- 235, 42, 247, 156, 249, 116, 42, 235, 162, 42, 245, 99, 229, 210, 241,
- 223, 42, 245, 99, 229, 210, 217, 175, 42, 245, 99, 229, 210, 217, 75, 42,
- 245, 99, 229, 210, 231, 75, 42, 249, 165, 42, 226, 94, 254, 133, 42, 198,
- 42, 230, 108, 61, 42, 186, 42, 176, 42, 234, 191, 42, 231, 134, 42, 243,
- 87, 42, 251, 26, 42, 234, 190, 42, 225, 153, 42, 229, 86, 42, 230, 108,
- 245, 14, 42, 230, 108, 243, 209, 42, 231, 20, 42, 234, 140, 42, 240, 170,
- 42, 234, 100, 42, 230, 237, 42, 242, 223, 42, 216, 120, 42, 230, 108,
- 156, 42, 230, 174, 42, 247, 165, 42, 234, 46, 42, 244, 53, 42, 228, 117,
- 42, 230, 108, 194, 42, 230, 171, 42, 249, 247, 42, 234, 40, 42, 230, 172,
- 218, 235, 42, 249, 248, 218, 235, 42, 232, 55, 218, 235, 42, 234, 41,
- 218, 235, 42, 230, 172, 249, 116, 42, 249, 248, 249, 116, 42, 232, 55,
- 249, 116, 42, 234, 41, 249, 116, 42, 232, 55, 115, 222, 93, 42, 232, 55,
- 115, 222, 94, 218, 235, 42, 191, 42, 234, 1, 42, 230, 110, 42, 242, 158,
- 42, 223, 179, 42, 223, 180, 115, 222, 93, 42, 223, 180, 115, 222, 94,
- 218, 235, 42, 224, 165, 42, 228, 18, 42, 230, 108, 222, 93, 42, 230, 109,
- 42, 224, 119, 42, 227, 180, 42, 230, 108, 214, 105, 42, 230, 54, 42, 233,
- 191, 42, 230, 55, 231, 79, 42, 224, 118, 42, 227, 179, 42, 230, 108, 212,
- 98, 42, 230, 48, 42, 233, 189, 42, 230, 49, 231, 79, 42, 235, 30, 226,
- 224, 42, 232, 55, 226, 224, 42, 254, 144, 42, 251, 168, 42, 250, 222, 42,
- 250, 199, 42, 251, 75, 115, 234, 140, 42, 249, 246, 42, 248, 150, 42,
- 242, 79, 42, 162, 42, 240, 238, 42, 236, 6, 42, 234, 53, 42, 234, 41,
- 251, 2, 42, 233, 225, 42, 232, 165, 42, 232, 164, 42, 232, 153, 42, 232,
- 68, 42, 231, 135, 219, 81, 42, 230, 201, 42, 230, 157, 42, 225, 151, 42,
- 225, 22, 42, 224, 222, 42, 224, 220, 42, 218, 229, 42, 218, 3, 42, 212,
- 24, 42, 214, 106, 115, 194, 42, 116, 115, 194, 110, 217, 4, 16, 31, 248,
- 154, 111, 110, 217, 4, 16, 31, 248, 154, 105, 110, 217, 4, 16, 31, 248,
- 154, 158, 110, 217, 4, 16, 31, 248, 154, 161, 110, 217, 4, 16, 31, 248,
- 154, 190, 110, 217, 4, 16, 31, 248, 154, 195, 110, 217, 4, 16, 31, 248,
- 154, 199, 110, 217, 4, 16, 31, 248, 154, 196, 110, 217, 4, 16, 31, 248,
- 154, 201, 110, 217, 4, 16, 31, 248, 154, 216, 248, 110, 217, 4, 16, 31,
- 248, 154, 245, 175, 110, 217, 4, 16, 31, 248, 154, 215, 76, 110, 217, 4,
- 16, 31, 248, 154, 216, 165, 110, 217, 4, 16, 31, 248, 154, 244, 13, 110,
- 217, 4, 16, 31, 248, 154, 244, 126, 110, 217, 4, 16, 31, 248, 154, 219,
- 121, 110, 217, 4, 16, 31, 248, 154, 220, 121, 110, 217, 4, 16, 31, 248,
- 154, 245, 198, 110, 217, 4, 16, 31, 248, 154, 228, 202, 110, 217, 4, 16,
- 31, 248, 154, 215, 73, 110, 217, 4, 16, 31, 248, 154, 215, 67, 110, 217,
- 4, 16, 31, 248, 154, 215, 63, 110, 217, 4, 16, 31, 248, 154, 215, 64,
- 110, 217, 4, 16, 31, 248, 154, 215, 69, 110, 217, 4, 16, 31, 248, 154,
- 215, 70, 110, 217, 4, 16, 31, 248, 154, 215, 65, 110, 217, 4, 16, 31,
- 248, 154, 215, 66, 110, 217, 4, 16, 31, 248, 154, 215, 72, 110, 217, 4,
- 16, 31, 248, 154, 215, 68, 110, 217, 4, 16, 31, 248, 154, 216, 163, 110,
- 217, 4, 16, 31, 248, 154, 216, 162, 42, 243, 125, 241, 199, 31, 216, 197,
- 249, 148, 241, 230, 241, 199, 31, 216, 197, 223, 125, 245, 231, 241, 199,
- 31, 247, 239, 253, 215, 216, 197, 252, 64, 241, 199, 31, 210, 223, 244,
- 46, 241, 199, 31, 212, 59, 241, 199, 31, 249, 211, 241, 199, 31, 216,
- 197, 254, 11, 241, 199, 31, 241, 67, 216, 39, 241, 199, 31, 4, 217, 62,
- 241, 199, 31, 215, 238, 241, 199, 31, 225, 222, 241, 199, 31, 218, 160,
- 241, 199, 31, 244, 147, 241, 199, 31, 242, 139, 224, 243, 241, 199, 31,
- 230, 160, 241, 199, 31, 245, 134, 241, 199, 31, 244, 47, 241, 199, 31,
- 211, 207, 226, 201, 216, 197, 248, 94, 241, 199, 31, 254, 59, 241, 199,
- 31, 249, 193, 241, 199, 31, 251, 235, 216, 139, 241, 199, 31, 242, 156,
- 241, 199, 31, 218, 247, 254, 78, 241, 199, 31, 223, 56, 241, 199, 31,
- 235, 227, 241, 199, 31, 242, 139, 217, 62, 241, 199, 31, 230, 116, 249,
- 167, 241, 199, 31, 242, 139, 224, 200, 241, 199, 31, 216, 197, 255, 27,
- 212, 40, 241, 199, 31, 216, 197, 250, 16, 244, 104, 241, 199, 31, 235,
- 240, 241, 199, 31, 246, 65, 241, 199, 31, 223, 59, 241, 199, 31, 242,
- 139, 224, 227, 241, 199, 31, 224, 180, 241, 199, 31, 248, 169, 64, 216,
- 197, 232, 236, 241, 199, 31, 216, 197, 244, 182, 241, 199, 31, 226, 167,
- 241, 199, 31, 226, 248, 241, 199, 31, 248, 67, 241, 199, 31, 248, 87,
- 241, 199, 31, 235, 254, 241, 199, 31, 251, 157, 241, 199, 31, 249, 229,
- 216, 43, 231, 81, 241, 199, 31, 243, 94, 216, 39, 241, 199, 31, 224, 128,
- 214, 154, 241, 199, 31, 226, 166, 241, 199, 31, 216, 197, 212, 13, 241,
- 199, 31, 223, 48, 241, 199, 31, 216, 197, 250, 228, 241, 199, 31, 216,
- 197, 254, 7, 216, 134, 241, 199, 31, 216, 197, 234, 185, 218, 136, 230,
- 120, 241, 199, 31, 248, 40, 241, 199, 31, 216, 197, 231, 157, 231, 207,
- 241, 199, 31, 255, 28, 241, 199, 31, 216, 197, 212, 54, 241, 199, 31,
- 216, 197, 243, 54, 211, 239, 241, 199, 31, 216, 197, 235, 58, 233, 113,
- 241, 199, 31, 247, 192, 241, 199, 31, 232, 226, 241, 199, 31, 235, 230,
- 215, 188, 241, 199, 31, 4, 224, 200, 241, 199, 31, 254, 226, 249, 220,
- 241, 199, 31, 252, 67, 249, 220, 8, 3, 235, 166, 8, 3, 235, 159, 8, 3,
- 74, 8, 3, 235, 189, 8, 3, 236, 65, 8, 3, 236, 48, 8, 3, 236, 67, 8, 3,
- 236, 66, 8, 3, 253, 214, 8, 3, 253, 177, 8, 3, 61, 8, 3, 254, 80, 8, 3,
- 214, 164, 8, 3, 214, 167, 8, 3, 214, 165, 8, 3, 226, 144, 8, 3, 226, 118,
- 8, 3, 78, 8, 3, 226, 179, 8, 3, 245, 43, 8, 3, 76, 8, 3, 211, 195, 8, 3,
- 251, 236, 8, 3, 251, 233, 8, 3, 252, 14, 8, 3, 251, 246, 8, 3, 252, 3, 8,
- 3, 252, 2, 8, 3, 252, 5, 8, 3, 252, 4, 8, 3, 252, 129, 8, 3, 252, 121, 8,
- 3, 252, 199, 8, 3, 252, 150, 8, 3, 251, 109, 8, 3, 251, 113, 8, 3, 251,
- 110, 8, 3, 251, 187, 8, 3, 251, 171, 8, 3, 251, 213, 8, 3, 251, 193, 8,
- 3, 252, 29, 8, 3, 252, 83, 8, 3, 252, 41, 8, 3, 251, 95, 8, 3, 251, 92,
- 8, 3, 251, 133, 8, 3, 251, 108, 8, 3, 251, 102, 8, 3, 251, 106, 8, 3,
- 251, 80, 8, 3, 251, 78, 8, 3, 251, 85, 8, 3, 251, 83, 8, 3, 251, 81, 8,
- 3, 251, 82, 8, 3, 225, 52, 8, 3, 225, 48, 8, 3, 225, 111, 8, 3, 225, 62,
- 8, 3, 225, 78, 8, 3, 225, 105, 8, 3, 225, 101, 8, 3, 225, 244, 8, 3, 225,
- 234, 8, 3, 191, 8, 3, 226, 25, 8, 3, 224, 138, 8, 3, 224, 140, 8, 3, 224,
- 139, 8, 3, 224, 236, 8, 3, 224, 225, 8, 3, 225, 19, 8, 3, 224, 248, 8, 3,
- 224, 124, 8, 3, 224, 120, 8, 3, 224, 153, 8, 3, 224, 137, 8, 3, 224, 129,
- 8, 3, 224, 135, 8, 3, 224, 103, 8, 3, 224, 102, 8, 3, 224, 107, 8, 3,
- 224, 106, 8, 3, 224, 104, 8, 3, 224, 105, 8, 3, 252, 104, 8, 3, 252, 103,
- 8, 3, 252, 110, 8, 3, 252, 105, 8, 3, 252, 107, 8, 3, 252, 106, 8, 3,
- 252, 109, 8, 3, 252, 108, 8, 3, 252, 116, 8, 3, 252, 115, 8, 3, 252, 119,
- 8, 3, 252, 117, 8, 3, 252, 95, 8, 3, 252, 97, 8, 3, 252, 96, 8, 3, 252,
- 100, 8, 3, 252, 99, 8, 3, 252, 102, 8, 3, 252, 101, 8, 3, 252, 111, 8, 3,
- 252, 114, 8, 3, 252, 112, 8, 3, 252, 91, 8, 3, 252, 90, 8, 3, 252, 98, 8,
- 3, 252, 94, 8, 3, 252, 92, 8, 3, 252, 93, 8, 3, 252, 87, 8, 3, 252, 86,
- 8, 3, 252, 89, 8, 3, 252, 88, 8, 3, 229, 174, 8, 3, 229, 173, 8, 3, 229,
- 179, 8, 3, 229, 175, 8, 3, 229, 176, 8, 3, 229, 178, 8, 3, 229, 177, 8,
- 3, 229, 182, 8, 3, 229, 181, 8, 3, 229, 184, 8, 3, 229, 183, 8, 3, 229,
- 170, 8, 3, 229, 169, 8, 3, 229, 172, 8, 3, 229, 171, 8, 3, 229, 163, 8,
- 3, 229, 162, 8, 3, 229, 167, 8, 3, 229, 166, 8, 3, 229, 164, 8, 3, 229,
- 165, 8, 3, 229, 157, 8, 3, 229, 156, 8, 3, 229, 161, 8, 3, 229, 160, 8,
- 3, 229, 158, 8, 3, 229, 159, 8, 3, 241, 117, 8, 3, 241, 116, 8, 3, 241,
- 122, 8, 3, 241, 118, 8, 3, 241, 119, 8, 3, 241, 121, 8, 3, 241, 120, 8,
- 3, 241, 125, 8, 3, 241, 124, 8, 3, 241, 127, 8, 3, 241, 126, 8, 3, 241,
- 108, 8, 3, 241, 110, 8, 3, 241, 109, 8, 3, 241, 113, 8, 3, 241, 112, 8,
- 3, 241, 115, 8, 3, 241, 114, 8, 3, 241, 104, 8, 3, 241, 103, 8, 3, 241,
- 111, 8, 3, 241, 107, 8, 3, 241, 105, 8, 3, 241, 106, 8, 3, 241, 98, 8, 3,
- 241, 102, 8, 3, 241, 101, 8, 3, 241, 99, 8, 3, 241, 100, 8, 3, 230, 177,
- 8, 3, 230, 176, 8, 3, 230, 235, 8, 3, 230, 183, 8, 3, 230, 208, 8, 3,
- 230, 226, 8, 3, 230, 224, 8, 3, 231, 144, 8, 3, 231, 139, 8, 3, 186, 8,
- 3, 231, 177, 8, 3, 230, 79, 8, 3, 230, 78, 8, 3, 230, 82, 8, 3, 230, 80,
- 8, 3, 230, 126, 8, 3, 230, 112, 8, 3, 230, 166, 8, 3, 230, 131, 8, 3,
- 231, 31, 8, 3, 231, 96, 8, 3, 230, 60, 8, 3, 230, 56, 8, 3, 230, 107, 8,
- 3, 230, 75, 8, 3, 230, 68, 8, 3, 230, 73, 8, 3, 230, 33, 8, 3, 230, 32,
- 8, 3, 230, 38, 8, 3, 230, 35, 8, 3, 244, 91, 8, 3, 244, 86, 8, 3, 244,
- 129, 8, 3, 244, 106, 8, 3, 244, 175, 8, 3, 244, 166, 8, 3, 244, 204, 8,
- 3, 244, 178, 8, 3, 244, 11, 8, 3, 244, 51, 8, 3, 244, 35, 8, 3, 243, 225,
- 8, 3, 243, 224, 8, 3, 243, 241, 8, 3, 243, 230, 8, 3, 243, 228, 8, 3,
- 243, 229, 8, 3, 243, 212, 8, 3, 243, 211, 8, 3, 243, 215, 8, 3, 243, 213,
- 8, 3, 213, 144, 8, 3, 213, 139, 8, 3, 213, 176, 8, 3, 213, 153, 8, 3,
- 213, 166, 8, 3, 213, 163, 8, 3, 213, 168, 8, 3, 213, 167, 8, 3, 214, 7,
- 8, 3, 214, 2, 8, 3, 214, 27, 8, 3, 214, 18, 8, 3, 213, 125, 8, 3, 213,
- 121, 8, 3, 213, 138, 8, 3, 213, 126, 8, 3, 213, 178, 8, 3, 213, 244, 8,
- 3, 212, 110, 8, 3, 212, 108, 8, 3, 212, 116, 8, 3, 212, 113, 8, 3, 212,
- 111, 8, 3, 212, 112, 8, 3, 212, 102, 8, 3, 212, 101, 8, 3, 212, 106, 8,
- 3, 212, 105, 8, 3, 212, 103, 8, 3, 212, 104, 8, 3, 247, 186, 8, 3, 247,
- 174, 8, 3, 248, 11, 8, 3, 247, 211, 8, 3, 247, 244, 8, 3, 247, 248, 8, 3,
- 247, 247, 8, 3, 248, 160, 8, 3, 248, 155, 8, 3, 248, 229, 8, 3, 248, 180,
- 8, 3, 246, 70, 8, 3, 246, 71, 8, 3, 247, 128, 8, 3, 246, 110, 8, 3, 247,
- 153, 8, 3, 247, 130, 8, 3, 248, 38, 8, 3, 248, 98, 8, 3, 248, 53, 8, 3,
- 246, 61, 8, 3, 246, 59, 8, 3, 246, 86, 8, 3, 246, 69, 8, 3, 246, 64, 8,
- 3, 246, 67, 8, 3, 216, 68, 8, 3, 216, 62, 8, 3, 216, 118, 8, 3, 216, 77,
- 8, 3, 216, 110, 8, 3, 216, 112, 8, 3, 216, 111, 8, 3, 217, 47, 8, 3, 217,
- 34, 8, 3, 217, 106, 8, 3, 217, 55, 8, 3, 215, 103, 8, 3, 215, 102, 8, 3,
- 215, 105, 8, 3, 215, 104, 8, 3, 216, 6, 8, 3, 216, 2, 8, 3, 112, 8, 3,
- 216, 14, 8, 3, 216, 214, 8, 3, 217, 23, 8, 3, 216, 238, 8, 3, 215, 88, 8,
- 3, 215, 83, 8, 3, 215, 119, 8, 3, 215, 101, 8, 3, 215, 89, 8, 3, 215, 99,
- 8, 3, 248, 115, 8, 3, 248, 114, 8, 3, 248, 120, 8, 3, 248, 116, 8, 3,
- 248, 117, 8, 3, 248, 119, 8, 3, 248, 118, 8, 3, 248, 136, 8, 3, 248, 135,
- 8, 3, 248, 143, 8, 3, 248, 137, 8, 3, 248, 105, 8, 3, 248, 107, 8, 3,
- 248, 106, 8, 3, 248, 110, 8, 3, 248, 109, 8, 3, 248, 113, 8, 3, 248, 111,
- 8, 3, 248, 128, 8, 3, 248, 131, 8, 3, 248, 129, 8, 3, 248, 101, 8, 3,
- 248, 100, 8, 3, 248, 108, 8, 3, 248, 104, 8, 3, 248, 102, 8, 3, 248, 103,
- 8, 3, 229, 131, 8, 3, 229, 130, 8, 3, 229, 138, 8, 3, 229, 133, 8, 3,
- 229, 134, 8, 3, 229, 135, 8, 3, 229, 147, 8, 3, 229, 146, 8, 3, 229, 153,
- 8, 3, 229, 148, 8, 3, 229, 123, 8, 3, 229, 122, 8, 3, 229, 129, 8, 3,
- 229, 124, 8, 3, 229, 139, 8, 3, 229, 145, 8, 3, 229, 143, 8, 3, 229, 115,
- 8, 3, 229, 114, 8, 3, 229, 120, 8, 3, 229, 118, 8, 3, 229, 116, 8, 3,
- 229, 117, 8, 3, 241, 84, 8, 3, 241, 83, 8, 3, 241, 90, 8, 3, 241, 85, 8,
- 3, 241, 87, 8, 3, 241, 86, 8, 3, 241, 89, 8, 3, 241, 88, 8, 3, 241, 95,
- 8, 3, 241, 94, 8, 3, 241, 97, 8, 3, 241, 96, 8, 3, 241, 78, 8, 3, 241,
- 79, 8, 3, 241, 81, 8, 3, 241, 80, 8, 3, 241, 82, 8, 3, 241, 91, 8, 3,
- 241, 93, 8, 3, 241, 92, 8, 3, 241, 77, 8, 3, 228, 194, 8, 3, 228, 192, 8,
- 3, 228, 238, 8, 3, 228, 197, 8, 3, 228, 220, 8, 3, 228, 234, 8, 3, 228,
- 233, 8, 3, 229, 188, 8, 3, 198, 8, 3, 229, 202, 8, 3, 227, 190, 8, 3,
- 227, 192, 8, 3, 227, 191, 8, 3, 228, 56, 8, 3, 228, 43, 8, 3, 228, 79, 8,
- 3, 228, 65, 8, 3, 229, 88, 8, 3, 229, 112, 8, 3, 229, 99, 8, 3, 227, 185,
- 8, 3, 227, 181, 8, 3, 227, 242, 8, 3, 227, 189, 8, 3, 227, 187, 8, 3,
- 227, 188, 8, 3, 241, 148, 8, 3, 241, 147, 8, 3, 241, 153, 8, 3, 241, 149,
- 8, 3, 241, 150, 8, 3, 241, 152, 8, 3, 241, 151, 8, 3, 241, 158, 8, 3,
- 241, 157, 8, 3, 241, 160, 8, 3, 241, 159, 8, 3, 241, 140, 8, 3, 241, 142,
- 8, 3, 241, 141, 8, 3, 241, 144, 8, 3, 241, 146, 8, 3, 241, 145, 8, 3,
- 241, 154, 8, 3, 241, 156, 8, 3, 241, 155, 8, 3, 241, 136, 8, 3, 241, 135,
- 8, 3, 241, 143, 8, 3, 241, 139, 8, 3, 241, 137, 8, 3, 241, 138, 8, 3,
- 241, 130, 8, 3, 241, 129, 8, 3, 241, 134, 8, 3, 241, 133, 8, 3, 241, 131,
- 8, 3, 241, 132, 8, 3, 232, 201, 8, 3, 232, 195, 8, 3, 232, 247, 8, 3,
- 232, 208, 8, 3, 232, 239, 8, 3, 232, 238, 8, 3, 232, 242, 8, 3, 232, 240,
- 8, 3, 233, 85, 8, 3, 233, 75, 8, 3, 233, 141, 8, 3, 233, 94, 8, 3, 232,
- 84, 8, 3, 232, 83, 8, 3, 232, 86, 8, 3, 232, 85, 8, 3, 232, 122, 8, 3,
- 232, 112, 8, 3, 232, 162, 8, 3, 232, 126, 8, 3, 233, 8, 8, 3, 233, 64, 8,
- 3, 233, 23, 8, 3, 232, 79, 8, 3, 232, 77, 8, 3, 232, 103, 8, 3, 232, 82,
- 8, 3, 232, 80, 8, 3, 232, 81, 8, 3, 232, 59, 8, 3, 232, 58, 8, 3, 232,
- 67, 8, 3, 232, 62, 8, 3, 232, 60, 8, 3, 232, 61, 8, 3, 242, 196, 8, 3,
- 242, 195, 8, 3, 242, 221, 8, 3, 242, 206, 8, 3, 242, 213, 8, 3, 242, 212,
- 8, 3, 242, 215, 8, 3, 242, 214, 8, 3, 243, 96, 8, 3, 243, 91, 8, 3, 243,
- 142, 8, 3, 243, 106, 8, 3, 242, 98, 8, 3, 242, 97, 8, 3, 242, 100, 8, 3,
- 242, 99, 8, 3, 242, 161, 8, 3, 242, 159, 8, 3, 242, 181, 8, 3, 242, 169,
- 8, 3, 243, 40, 8, 3, 243, 38, 8, 3, 243, 69, 8, 3, 243, 51, 8, 3, 242,
- 88, 8, 3, 242, 87, 8, 3, 242, 120, 8, 3, 242, 96, 8, 3, 242, 89, 8, 3,
- 242, 95, 8, 3, 234, 67, 8, 3, 234, 66, 8, 3, 234, 98, 8, 3, 234, 81, 8,
- 3, 234, 91, 8, 3, 234, 94, 8, 3, 234, 92, 8, 3, 234, 208, 8, 3, 234, 196,
- 8, 3, 176, 8, 3, 234, 234, 8, 3, 233, 206, 8, 3, 233, 211, 8, 3, 233,
- 208, 8, 3, 234, 6, 8, 3, 234, 2, 8, 3, 234, 34, 8, 3, 234, 13, 8, 3, 234,
- 162, 8, 3, 234, 146, 8, 3, 234, 188, 8, 3, 234, 165, 8, 3, 233, 195, 8,
- 3, 233, 192, 8, 3, 233, 223, 8, 3, 233, 205, 8, 3, 233, 198, 8, 3, 233,
- 202, 8, 3, 243, 22, 8, 3, 243, 21, 8, 3, 243, 26, 8, 3, 243, 23, 8, 3,
- 243, 25, 8, 3, 243, 24, 8, 3, 243, 33, 8, 3, 243, 32, 8, 3, 243, 36, 8,
- 3, 243, 34, 8, 3, 243, 13, 8, 3, 243, 12, 8, 3, 243, 15, 8, 3, 243, 14,
- 8, 3, 243, 18, 8, 3, 243, 17, 8, 3, 243, 20, 8, 3, 243, 19, 8, 3, 243,
- 28, 8, 3, 243, 27, 8, 3, 243, 31, 8, 3, 243, 29, 8, 3, 243, 8, 8, 3, 243,
- 7, 8, 3, 243, 16, 8, 3, 243, 11, 8, 3, 243, 9, 8, 3, 243, 10, 8, 3, 230,
- 254, 8, 3, 230, 255, 8, 3, 231, 17, 8, 3, 231, 16, 8, 3, 231, 19, 8, 3,
- 231, 18, 8, 3, 230, 245, 8, 3, 230, 247, 8, 3, 230, 246, 8, 3, 230, 250,
- 8, 3, 230, 249, 8, 3, 230, 252, 8, 3, 230, 251, 8, 3, 231, 0, 8, 3, 231,
- 2, 8, 3, 231, 1, 8, 3, 230, 241, 8, 3, 230, 240, 8, 3, 230, 248, 8, 3,
- 230, 244, 8, 3, 230, 242, 8, 3, 230, 243, 8, 3, 240, 187, 8, 3, 240, 186,
- 8, 3, 240, 193, 8, 3, 240, 188, 8, 3, 240, 190, 8, 3, 240, 189, 8, 3,
- 240, 192, 8, 3, 240, 191, 8, 3, 240, 198, 8, 3, 240, 197, 8, 3, 240, 200,
- 8, 3, 240, 199, 8, 3, 240, 179, 8, 3, 240, 178, 8, 3, 240, 181, 8, 3,
- 240, 180, 8, 3, 240, 183, 8, 3, 240, 182, 8, 3, 240, 185, 8, 3, 240, 184,
- 8, 3, 240, 194, 8, 3, 240, 196, 8, 3, 240, 195, 8, 3, 229, 29, 8, 3, 229,
- 31, 8, 3, 229, 30, 8, 3, 229, 72, 8, 3, 229, 70, 8, 3, 229, 82, 8, 3,
- 229, 75, 8, 3, 228, 248, 8, 3, 228, 247, 8, 3, 228, 249, 8, 3, 229, 1, 8,
- 3, 228, 254, 8, 3, 229, 9, 8, 3, 229, 3, 8, 3, 229, 63, 8, 3, 229, 69, 8,
- 3, 229, 65, 8, 3, 241, 163, 8, 3, 241, 173, 8, 3, 241, 182, 8, 3, 242, 2,
- 8, 3, 241, 250, 8, 3, 162, 8, 3, 242, 13, 8, 3, 240, 213, 8, 3, 240, 212,
- 8, 3, 240, 215, 8, 3, 240, 214, 8, 3, 240, 249, 8, 3, 240, 240, 8, 3,
- 241, 75, 8, 3, 241, 54, 8, 3, 241, 201, 8, 3, 241, 245, 8, 3, 241, 213,
- 8, 3, 212, 43, 8, 3, 212, 28, 8, 3, 212, 65, 8, 3, 212, 51, 8, 3, 211,
- 185, 8, 3, 211, 187, 8, 3, 211, 186, 8, 3, 211, 203, 8, 3, 211, 227, 8,
- 3, 211, 210, 8, 3, 212, 5, 8, 3, 212, 22, 8, 3, 212, 10, 8, 3, 210, 30,
- 8, 3, 210, 29, 8, 3, 210, 44, 8, 3, 210, 32, 8, 3, 210, 37, 8, 3, 210,
- 39, 8, 3, 210, 38, 8, 3, 210, 102, 8, 3, 210, 99, 8, 3, 210, 116, 8, 3,
- 210, 105, 8, 3, 210, 6, 8, 3, 210, 8, 8, 3, 210, 7, 8, 3, 210, 19, 8, 3,
- 210, 18, 8, 3, 210, 23, 8, 3, 210, 20, 8, 3, 210, 84, 8, 3, 210, 94, 8,
- 3, 210, 88, 8, 3, 210, 2, 8, 3, 210, 1, 8, 3, 210, 13, 8, 3, 210, 5, 8,
- 3, 210, 3, 8, 3, 210, 4, 8, 3, 209, 245, 8, 3, 209, 244, 8, 3, 209, 250,
- 8, 3, 209, 248, 8, 3, 209, 246, 8, 3, 209, 247, 8, 3, 250, 36, 8, 3, 250,
- 32, 8, 3, 250, 59, 8, 3, 250, 45, 8, 3, 250, 56, 8, 3, 250, 50, 8, 3,
- 250, 58, 8, 3, 250, 57, 8, 3, 250, 232, 8, 3, 250, 225, 8, 3, 251, 41, 8,
- 3, 251, 3, 8, 3, 249, 112, 8, 3, 249, 114, 8, 3, 249, 113, 8, 3, 249,
- 161, 8, 3, 249, 152, 8, 3, 249, 246, 8, 3, 249, 177, 8, 3, 250, 168, 8,
- 3, 250, 198, 8, 3, 250, 173, 8, 3, 249, 92, 8, 3, 249, 90, 8, 3, 249,
- 120, 8, 3, 249, 110, 8, 3, 249, 97, 8, 3, 249, 109, 8, 3, 249, 71, 8, 3,
- 249, 70, 8, 3, 249, 81, 8, 3, 249, 77, 8, 3, 249, 72, 8, 3, 249, 74, 8,
- 3, 209, 228, 8, 3, 209, 227, 8, 3, 209, 234, 8, 3, 209, 229, 8, 3, 209,
- 231, 8, 3, 209, 230, 8, 3, 209, 233, 8, 3, 209, 232, 8, 3, 209, 240, 8,
- 3, 209, 239, 8, 3, 209, 243, 8, 3, 209, 241, 8, 3, 209, 224, 8, 3, 209,
- 226, 8, 3, 209, 225, 8, 3, 209, 235, 8, 3, 209, 238, 8, 3, 209, 236, 8,
- 3, 209, 217, 8, 3, 209, 221, 8, 3, 209, 220, 8, 3, 209, 218, 8, 3, 209,
- 219, 8, 3, 209, 211, 8, 3, 209, 210, 8, 3, 209, 216, 8, 3, 209, 214, 8,
- 3, 209, 212, 8, 3, 209, 213, 8, 3, 227, 108, 8, 3, 227, 107, 8, 3, 227,
- 113, 8, 3, 227, 109, 8, 3, 227, 110, 8, 3, 227, 112, 8, 3, 227, 111, 8,
- 3, 227, 118, 8, 3, 227, 117, 8, 3, 227, 121, 8, 3, 227, 120, 8, 3, 227,
- 101, 8, 3, 227, 102, 8, 3, 227, 105, 8, 3, 227, 106, 8, 3, 227, 114, 8,
- 3, 227, 116, 8, 3, 227, 96, 8, 3, 227, 104, 8, 3, 227, 100, 8, 3, 227,
- 97, 8, 3, 227, 98, 8, 3, 227, 91, 8, 3, 227, 90, 8, 3, 227, 95, 8, 3,
- 227, 94, 8, 3, 227, 92, 8, 3, 227, 93, 8, 3, 219, 129, 8, 3, 195, 8, 3,
- 219, 193, 8, 3, 219, 132, 8, 3, 219, 185, 8, 3, 219, 188, 8, 3, 219, 186,
- 8, 3, 221, 228, 8, 3, 221, 216, 8, 3, 206, 8, 3, 221, 236, 8, 3, 218, 29,
- 8, 3, 218, 31, 8, 3, 218, 30, 8, 3, 219, 36, 8, 3, 219, 25, 8, 3, 219,
- 60, 8, 3, 219, 40, 8, 3, 220, 116, 8, 3, 221, 183, 8, 3, 220, 141, 8, 3,
- 218, 6, 8, 3, 218, 4, 8, 3, 218, 84, 8, 3, 218, 28, 8, 3, 218, 10, 8, 3,
- 218, 18, 8, 3, 217, 167, 8, 3, 217, 166, 8, 3, 217, 233, 8, 3, 217, 174,
- 8, 3, 217, 169, 8, 3, 217, 173, 8, 3, 218, 188, 8, 3, 218, 187, 8, 3,
- 218, 194, 8, 3, 218, 189, 8, 3, 218, 191, 8, 3, 218, 193, 8, 3, 218, 192,
- 8, 3, 218, 202, 8, 3, 218, 200, 8, 3, 218, 225, 8, 3, 218, 203, 8, 3,
- 218, 183, 8, 3, 218, 182, 8, 3, 218, 186, 8, 3, 218, 184, 8, 3, 218, 196,
- 8, 3, 218, 199, 8, 3, 218, 197, 8, 3, 218, 179, 8, 3, 218, 177, 8, 3,
- 218, 181, 8, 3, 218, 180, 8, 3, 218, 172, 8, 3, 218, 171, 8, 3, 218, 176,
- 8, 3, 218, 175, 8, 3, 218, 173, 8, 3, 218, 174, 8, 3, 210, 77, 8, 3, 210,
- 76, 8, 3, 210, 82, 8, 3, 210, 79, 8, 3, 210, 59, 8, 3, 210, 61, 8, 3,
- 210, 60, 8, 3, 210, 64, 8, 3, 210, 63, 8, 3, 210, 67, 8, 3, 210, 65, 8,
- 3, 210, 71, 8, 3, 210, 70, 8, 3, 210, 74, 8, 3, 210, 72, 8, 3, 210, 55,
- 8, 3, 210, 54, 8, 3, 210, 62, 8, 3, 210, 58, 8, 3, 210, 56, 8, 3, 210,
- 57, 8, 3, 210, 47, 8, 3, 210, 46, 8, 3, 210, 51, 8, 3, 210, 50, 8, 3,
- 210, 48, 8, 3, 210, 49, 8, 3, 250, 144, 8, 3, 250, 141, 8, 3, 250, 165,
- 8, 3, 250, 152, 8, 3, 250, 73, 8, 3, 250, 72, 8, 3, 250, 75, 8, 3, 250,
- 74, 8, 3, 250, 87, 8, 3, 250, 86, 8, 3, 250, 94, 8, 3, 250, 89, 8, 3,
- 250, 123, 8, 3, 250, 121, 8, 3, 250, 139, 8, 3, 250, 129, 8, 3, 250, 67,
- 8, 3, 250, 77, 8, 3, 250, 71, 8, 3, 250, 68, 8, 3, 250, 70, 8, 3, 250,
- 61, 8, 3, 250, 60, 8, 3, 250, 65, 8, 3, 250, 64, 8, 3, 250, 62, 8, 3,
- 250, 63, 8, 3, 222, 177, 8, 3, 222, 181, 8, 3, 222, 160, 8, 3, 222, 161,
- 8, 3, 222, 164, 8, 3, 222, 163, 8, 3, 222, 167, 8, 3, 222, 165, 8, 3,
- 222, 171, 8, 3, 222, 170, 8, 3, 222, 176, 8, 3, 222, 172, 8, 3, 222, 156,
- 8, 3, 222, 154, 8, 3, 222, 162, 8, 3, 222, 159, 8, 3, 222, 157, 8, 3,
- 222, 158, 8, 3, 222, 149, 8, 3, 222, 148, 8, 3, 222, 153, 8, 3, 222, 152,
- 8, 3, 222, 150, 8, 3, 222, 151, 8, 3, 228, 39, 8, 3, 228, 38, 8, 3, 228,
- 41, 8, 3, 228, 40, 8, 3, 228, 31, 8, 3, 228, 33, 8, 3, 228, 32, 8, 3,
- 228, 35, 8, 3, 228, 34, 8, 3, 228, 37, 8, 3, 228, 36, 8, 3, 228, 26, 8,
- 3, 228, 25, 8, 3, 228, 30, 8, 3, 228, 29, 8, 3, 228, 27, 8, 3, 228, 28,
- 8, 3, 228, 20, 8, 3, 228, 19, 8, 3, 228, 24, 8, 3, 228, 23, 8, 3, 228,
- 21, 8, 3, 228, 22, 8, 3, 220, 74, 8, 3, 220, 69, 8, 3, 220, 104, 8, 3,
- 220, 85, 8, 3, 219, 217, 8, 3, 219, 219, 8, 3, 219, 218, 8, 3, 219, 238,
- 8, 3, 219, 235, 8, 3, 220, 9, 8, 3, 220, 0, 8, 3, 220, 44, 8, 3, 220, 37,
- 8, 3, 220, 65, 8, 3, 220, 52, 8, 3, 219, 213, 8, 3, 219, 211, 8, 3, 219,
- 227, 8, 3, 219, 216, 8, 3, 219, 214, 8, 3, 219, 215, 8, 3, 219, 196, 8,
- 3, 219, 195, 8, 3, 219, 202, 8, 3, 219, 199, 8, 3, 219, 197, 8, 3, 219,
- 198, 8, 3, 223, 144, 8, 3, 223, 138, 8, 3, 205, 8, 3, 223, 150, 8, 3,
- 222, 122, 8, 3, 222, 124, 8, 3, 222, 123, 8, 3, 222, 190, 8, 3, 222, 183,
- 8, 3, 222, 213, 8, 3, 222, 194, 8, 3, 223, 46, 8, 3, 223, 131, 8, 3, 223,
- 84, 8, 3, 222, 115, 8, 3, 222, 112, 8, 3, 222, 142, 8, 3, 222, 121, 8, 3,
- 222, 117, 8, 3, 222, 118, 8, 3, 222, 97, 8, 3, 222, 96, 8, 3, 222, 102,
- 8, 3, 222, 100, 8, 3, 222, 98, 8, 3, 222, 99, 8, 3, 235, 104, 8, 3, 235,
- 103, 8, 3, 235, 114, 8, 3, 235, 105, 8, 3, 235, 110, 8, 3, 235, 109, 8,
- 3, 235, 112, 8, 3, 235, 111, 8, 3, 235, 47, 8, 3, 235, 46, 8, 3, 235, 49,
- 8, 3, 235, 48, 8, 3, 235, 62, 8, 3, 235, 60, 8, 3, 235, 74, 8, 3, 235,
- 64, 8, 3, 235, 40, 8, 3, 235, 38, 8, 3, 235, 57, 8, 3, 235, 45, 8, 3,
- 235, 42, 8, 3, 235, 43, 8, 3, 235, 32, 8, 3, 235, 31, 8, 3, 235, 36, 8,
- 3, 235, 35, 8, 3, 235, 33, 8, 3, 235, 34, 8, 3, 224, 49, 8, 3, 224, 47,
- 8, 3, 224, 56, 8, 3, 224, 50, 8, 3, 224, 53, 8, 3, 224, 52, 8, 3, 224,
- 55, 8, 3, 224, 54, 8, 3, 224, 2, 8, 3, 223, 255, 8, 3, 224, 4, 8, 3, 224,
- 3, 8, 3, 224, 36, 8, 3, 224, 35, 8, 3, 224, 45, 8, 3, 224, 39, 8, 3, 223,
- 250, 8, 3, 223, 246, 8, 3, 224, 33, 8, 3, 223, 254, 8, 3, 223, 252, 8, 3,
- 223, 253, 8, 3, 223, 230, 8, 3, 223, 228, 8, 3, 223, 240, 8, 3, 223, 233,
- 8, 3, 223, 231, 8, 3, 223, 232, 8, 3, 235, 93, 8, 3, 235, 92, 8, 3, 235,
- 99, 8, 3, 235, 94, 8, 3, 235, 96, 8, 3, 235, 95, 8, 3, 235, 98, 8, 3,
- 235, 97, 8, 3, 235, 84, 8, 3, 235, 86, 8, 3, 235, 85, 8, 3, 235, 89, 8,
- 3, 235, 88, 8, 3, 235, 91, 8, 3, 235, 90, 8, 3, 235, 80, 8, 3, 235, 79,
- 8, 3, 235, 87, 8, 3, 235, 83, 8, 3, 235, 81, 8, 3, 235, 82, 8, 3, 235,
- 76, 8, 3, 235, 75, 8, 3, 235, 78, 8, 3, 235, 77, 8, 3, 228, 167, 8, 3,
- 228, 166, 8, 3, 228, 174, 8, 3, 228, 168, 8, 3, 228, 170, 8, 3, 228, 169,
- 8, 3, 228, 173, 8, 3, 228, 171, 8, 3, 228, 156, 8, 3, 228, 157, 8, 3,
- 228, 162, 8, 3, 228, 161, 8, 3, 228, 165, 8, 3, 228, 163, 8, 3, 228, 151,
- 8, 3, 228, 160, 8, 3, 228, 155, 8, 3, 228, 152, 8, 3, 228, 153, 8, 3,
- 228, 146, 8, 3, 228, 145, 8, 3, 228, 150, 8, 3, 228, 149, 8, 3, 228, 147,
- 8, 3, 228, 148, 8, 3, 227, 141, 8, 3, 227, 140, 8, 3, 227, 152, 8, 3,
- 227, 145, 8, 3, 227, 149, 8, 3, 227, 148, 8, 3, 227, 151, 8, 3, 227, 150,
- 8, 3, 227, 128, 8, 3, 227, 130, 8, 3, 227, 129, 8, 3, 227, 134, 8, 3,
- 227, 133, 8, 3, 227, 138, 8, 3, 227, 135, 8, 3, 227, 126, 8, 3, 227, 124,
- 8, 3, 227, 132, 8, 3, 227, 127, 8, 3, 211, 150, 8, 3, 211, 149, 8, 3,
- 211, 157, 8, 3, 211, 152, 8, 3, 211, 154, 8, 3, 211, 153, 8, 3, 211, 156,
- 8, 3, 211, 155, 8, 3, 211, 139, 8, 3, 211, 140, 8, 3, 211, 144, 8, 3,
- 211, 143, 8, 3, 211, 148, 8, 3, 211, 146, 8, 3, 211, 121, 8, 3, 211, 119,
- 8, 3, 211, 131, 8, 3, 211, 124, 8, 3, 211, 122, 8, 3, 211, 123, 8, 3,
- 210, 250, 8, 3, 210, 248, 8, 3, 211, 8, 8, 3, 210, 251, 8, 3, 211, 2, 8,
- 3, 211, 1, 8, 3, 211, 5, 8, 3, 211, 3, 8, 3, 210, 191, 8, 3, 210, 190, 8,
- 3, 210, 194, 8, 3, 210, 192, 8, 3, 210, 224, 8, 3, 210, 221, 8, 3, 210,
- 244, 8, 3, 210, 228, 8, 3, 210, 182, 8, 3, 210, 178, 8, 3, 210, 212, 8,
- 3, 210, 189, 8, 3, 210, 185, 8, 3, 210, 186, 8, 3, 210, 162, 8, 3, 210,
- 161, 8, 3, 210, 169, 8, 3, 210, 165, 8, 3, 210, 163, 8, 3, 210, 164, 8,
- 34, 224, 36, 8, 34, 232, 247, 8, 34, 234, 67, 8, 34, 227, 145, 8, 34,
- 249, 77, 8, 34, 218, 194, 8, 34, 243, 19, 8, 34, 243, 51, 8, 34, 230,
- 235, 8, 34, 240, 187, 8, 34, 232, 61, 8, 34, 252, 91, 8, 34, 230, 131, 8,
- 34, 210, 244, 8, 34, 224, 124, 8, 34, 240, 181, 8, 34, 217, 47, 8, 34,
- 243, 142, 8, 34, 210, 5, 8, 34, 249, 71, 8, 34, 248, 103, 8, 34, 251,
- 106, 8, 34, 243, 15, 8, 34, 227, 135, 8, 34, 215, 119, 8, 34, 226, 179,
- 8, 34, 235, 80, 8, 34, 210, 19, 8, 34, 224, 103, 8, 34, 241, 115, 8, 34,
- 210, 250, 8, 34, 212, 112, 8, 34, 219, 202, 8, 34, 213, 244, 8, 34, 210,
- 116, 8, 34, 235, 74, 8, 34, 227, 100, 8, 34, 235, 78, 8, 34, 242, 161, 8,
- 34, 235, 98, 8, 34, 211, 227, 8, 34, 246, 86, 8, 34, 219, 215, 8, 34,
- 232, 242, 8, 34, 249, 81, 8, 34, 249, 113, 8, 34, 250, 45, 8, 34, 240,
- 184, 8, 34, 220, 74, 8, 34, 210, 4, 8, 34, 220, 0, 8, 34, 250, 139, 8,
- 34, 209, 231, 8, 34, 229, 178, 8, 34, 234, 188, 232, 202, 1, 252, 199,
- 232, 202, 1, 191, 232, 202, 1, 225, 150, 232, 202, 1, 248, 229, 232, 202,
- 1, 217, 106, 232, 202, 1, 216, 209, 232, 202, 1, 243, 142, 232, 202, 1,
- 176, 232, 202, 1, 234, 138, 232, 202, 1, 235, 147, 232, 202, 1, 251, 41,
- 232, 202, 1, 250, 165, 232, 202, 1, 246, 46, 232, 202, 1, 215, 184, 232,
- 202, 1, 215, 176, 232, 202, 1, 186, 232, 202, 1, 198, 232, 202, 1, 233,
- 141, 232, 202, 1, 206, 232, 202, 1, 210, 82, 232, 202, 1, 210, 116, 232,
- 202, 1, 229, 82, 232, 202, 1, 162, 232, 202, 1, 211, 165, 232, 202, 1,
- 241, 196, 232, 202, 1, 244, 204, 232, 202, 1, 212, 65, 232, 202, 1, 220,
- 104, 232, 202, 1, 192, 232, 202, 1, 243, 0, 232, 202, 1, 61, 232, 202, 1,
- 254, 252, 232, 202, 1, 76, 232, 202, 1, 245, 63, 232, 202, 1, 74, 232,
- 202, 1, 78, 232, 202, 1, 69, 232, 202, 1, 214, 214, 232, 202, 1, 214,
- 208, 232, 202, 1, 226, 238, 232, 202, 1, 138, 230, 37, 216, 118, 232,
- 202, 1, 138, 229, 234, 225, 19, 232, 202, 1, 138, 230, 37, 249, 80, 232,
- 202, 1, 138, 230, 37, 251, 213, 232, 202, 1, 138, 230, 37, 198, 232, 202,
- 1, 138, 230, 37, 235, 121, 232, 202, 224, 144, 249, 227, 232, 202, 224,
- 144, 243, 236, 218, 131, 41, 3, 245, 217, 41, 3, 245, 213, 41, 3, 241,
- 227, 41, 3, 212, 17, 41, 3, 212, 16, 41, 3, 225, 214, 41, 3, 252, 21, 41,
- 3, 252, 74, 41, 3, 231, 121, 41, 3, 233, 253, 41, 3, 231, 11, 41, 3, 243,
- 82, 41, 3, 244, 155, 41, 3, 213, 250, 41, 3, 217, 12, 41, 3, 216, 195,
- 41, 3, 248, 24, 41, 3, 248, 21, 41, 3, 233, 56, 41, 3, 223, 111, 41, 3,
- 248, 85, 41, 3, 229, 144, 41, 3, 221, 172, 41, 3, 220, 63, 41, 3, 210,
- 92, 41, 3, 210, 73, 41, 3, 250, 190, 41, 3, 235, 130, 41, 3, 228, 181,
- 41, 3, 211, 44, 41, 3, 234, 187, 41, 3, 229, 56, 41, 3, 243, 62, 41, 3,
- 231, 85, 41, 3, 229, 108, 41, 3, 227, 159, 41, 3, 74, 41, 3, 236, 6, 41,
- 3, 241, 187, 41, 3, 241, 167, 41, 3, 211, 250, 41, 3, 211, 241, 41, 3,
- 225, 111, 41, 3, 252, 19, 41, 3, 252, 14, 41, 3, 231, 114, 41, 3, 233,
- 250, 41, 3, 231, 8, 41, 3, 243, 78, 41, 3, 244, 129, 41, 3, 213, 176, 41,
- 3, 216, 118, 41, 3, 216, 176, 41, 3, 248, 16, 41, 3, 248, 20, 41, 3, 232,
- 247, 41, 3, 223, 38, 41, 3, 248, 11, 41, 3, 229, 138, 41, 3, 219, 193,
- 41, 3, 220, 34, 41, 3, 210, 44, 41, 3, 210, 69, 41, 3, 250, 59, 41, 3,
- 235, 114, 41, 3, 228, 174, 41, 3, 211, 8, 41, 3, 234, 98, 41, 3, 229, 48,
- 41, 3, 242, 221, 41, 3, 230, 235, 41, 3, 228, 238, 41, 3, 227, 152, 41,
- 3, 61, 41, 3, 254, 131, 41, 3, 229, 77, 41, 3, 162, 41, 3, 242, 25, 41,
- 3, 212, 65, 41, 3, 212, 55, 41, 3, 191, 41, 3, 252, 26, 41, 3, 252, 199,
- 41, 3, 231, 129, 41, 3, 234, 1, 41, 3, 234, 0, 41, 3, 231, 15, 41, 3,
- 243, 86, 41, 3, 244, 204, 41, 3, 214, 27, 41, 3, 217, 106, 41, 3, 216,
- 209, 41, 3, 248, 33, 41, 3, 248, 23, 41, 3, 233, 141, 41, 3, 205, 41, 3,
- 248, 229, 41, 3, 229, 153, 41, 3, 206, 41, 3, 220, 104, 41, 3, 210, 116,
- 41, 3, 210, 82, 41, 3, 251, 41, 41, 3, 235, 147, 41, 3, 228, 190, 41, 3,
- 192, 41, 3, 176, 41, 3, 234, 240, 41, 3, 229, 61, 41, 3, 243, 142, 41, 3,
- 186, 41, 3, 198, 41, 3, 227, 169, 41, 3, 226, 187, 41, 3, 226, 183, 41,
- 3, 241, 60, 41, 3, 211, 215, 41, 3, 211, 211, 41, 3, 224, 252, 41, 3,
- 252, 17, 41, 3, 251, 201, 41, 3, 231, 109, 41, 3, 233, 248, 41, 3, 231,
- 4, 41, 3, 243, 74, 41, 3, 244, 42, 41, 3, 213, 127, 41, 3, 216, 18, 41,
- 3, 216, 154, 41, 3, 248, 14, 41, 3, 248, 18, 41, 3, 232, 133, 41, 3, 222,
- 199, 41, 3, 247, 133, 41, 3, 229, 125, 41, 3, 219, 42, 41, 3, 220, 3, 41,
- 3, 210, 21, 41, 3, 210, 66, 41, 3, 249, 182, 41, 3, 235, 65, 41, 3, 228,
- 164, 41, 3, 210, 229, 41, 3, 234, 16, 41, 3, 229, 46, 41, 3, 242, 171,
- 41, 3, 230, 137, 41, 3, 228, 69, 41, 3, 227, 136, 41, 3, 69, 41, 3, 214,
- 190, 41, 3, 240, 229, 41, 3, 240, 219, 41, 3, 211, 195, 41, 3, 211, 189,
- 41, 3, 224, 153, 41, 3, 252, 16, 41, 3, 251, 133, 41, 3, 231, 108, 41, 3,
- 233, 246, 41, 3, 231, 3, 41, 3, 243, 73, 41, 3, 243, 241, 41, 3, 212,
- 116, 41, 3, 215, 119, 41, 3, 216, 137, 41, 3, 248, 12, 41, 3, 248, 17,
- 41, 3, 232, 103, 41, 3, 222, 142, 41, 3, 246, 86, 41, 3, 229, 120, 41, 3,
- 218, 84, 41, 3, 219, 227, 41, 3, 210, 13, 41, 3, 210, 62, 41, 3, 249,
- 120, 41, 3, 235, 57, 41, 3, 228, 160, 41, 3, 210, 212, 41, 3, 233, 223,
- 41, 3, 229, 45, 41, 3, 242, 120, 41, 3, 230, 107, 41, 3, 227, 242, 41, 3,
- 227, 132, 41, 3, 78, 41, 3, 226, 200, 41, 3, 229, 5, 41, 3, 241, 75, 41,
- 3, 241, 63, 41, 3, 211, 227, 41, 3, 211, 216, 41, 3, 225, 19, 41, 3, 252,
- 18, 41, 3, 251, 213, 41, 3, 231, 110, 41, 3, 233, 249, 41, 3, 231, 6, 41,
- 3, 243, 76, 41, 3, 243, 75, 41, 3, 244, 51, 41, 3, 213, 138, 41, 3, 112,
- 41, 3, 216, 157, 41, 3, 248, 15, 41, 3, 248, 19, 41, 3, 232, 162, 41, 3,
- 222, 213, 41, 3, 247, 153, 41, 3, 229, 129, 41, 3, 219, 60, 41, 3, 220,
- 9, 41, 3, 210, 23, 41, 3, 210, 67, 41, 3, 249, 246, 41, 3, 235, 74, 41,
- 3, 228, 165, 41, 3, 210, 244, 41, 3, 234, 34, 41, 3, 229, 47, 41, 3, 242,
- 181, 41, 3, 230, 166, 41, 3, 228, 79, 41, 3, 227, 138, 41, 3, 76, 41, 3,
- 245, 158, 41, 3, 229, 66, 41, 3, 241, 245, 41, 3, 241, 216, 41, 3, 212,
- 22, 41, 3, 212, 12, 41, 3, 225, 224, 41, 3, 252, 22, 41, 3, 252, 83, 41,
- 3, 231, 122, 41, 3, 233, 254, 41, 3, 233, 252, 41, 3, 231, 12, 41, 3,
- 243, 83, 41, 3, 243, 81, 41, 3, 244, 162, 41, 3, 213, 255, 41, 3, 217,
- 23, 41, 3, 216, 196, 41, 3, 248, 25, 41, 3, 248, 22, 41, 3, 233, 64, 41,
- 3, 223, 131, 41, 3, 248, 98, 41, 3, 229, 145, 41, 3, 221, 183, 41, 3,
- 220, 65, 41, 3, 210, 94, 41, 3, 210, 74, 41, 3, 250, 198, 41, 3, 235,
- 132, 41, 3, 228, 183, 41, 3, 211, 47, 41, 3, 234, 188, 41, 3, 229, 57,
- 41, 3, 229, 53, 41, 3, 243, 69, 41, 3, 243, 58, 41, 3, 231, 96, 41, 3,
- 229, 112, 41, 3, 227, 160, 41, 3, 229, 84, 41, 3, 233, 28, 41, 249, 227,
- 41, 243, 236, 218, 131, 41, 224, 16, 79, 41, 3, 229, 128, 244, 204, 41,
- 3, 229, 128, 176, 41, 3, 229, 128, 219, 42, 41, 16, 244, 152, 41, 16,
- 234, 186, 41, 16, 216, 82, 41, 16, 228, 213, 41, 16, 252, 155, 41, 16,
- 244, 203, 41, 16, 217, 102, 41, 16, 248, 184, 41, 16, 247, 132, 41, 16,
- 233, 212, 41, 16, 216, 22, 41, 16, 247, 152, 41, 16, 235, 66, 41, 21,
- 210, 86, 41, 21, 111, 41, 21, 105, 41, 21, 158, 41, 21, 161, 41, 21, 190,
- 41, 21, 195, 41, 21, 199, 41, 21, 196, 41, 21, 201, 41, 3, 229, 128, 186,
- 41, 3, 229, 128, 247, 153, 33, 6, 1, 210, 90, 33, 4, 1, 210, 90, 33, 6,
- 1, 246, 42, 33, 4, 1, 246, 42, 33, 6, 1, 223, 52, 246, 44, 33, 4, 1, 223,
- 52, 246, 44, 33, 6, 1, 235, 192, 33, 4, 1, 235, 192, 33, 6, 1, 247, 169,
- 33, 4, 1, 247, 169, 33, 6, 1, 230, 145, 214, 205, 33, 4, 1, 230, 145,
- 214, 205, 33, 6, 1, 251, 144, 226, 205, 33, 4, 1, 251, 144, 226, 205, 33,
- 6, 1, 229, 92, 211, 31, 33, 4, 1, 229, 92, 211, 31, 33, 6, 1, 211, 28, 2,
- 252, 193, 211, 31, 33, 4, 1, 211, 28, 2, 252, 193, 211, 31, 33, 6, 1,
- 235, 190, 211, 59, 33, 4, 1, 235, 190, 211, 59, 33, 6, 1, 223, 52, 210,
- 212, 33, 4, 1, 223, 52, 210, 212, 33, 6, 1, 235, 190, 61, 33, 4, 1, 235,
- 190, 61, 33, 6, 1, 250, 8, 232, 198, 210, 183, 33, 4, 1, 250, 8, 232,
- 198, 210, 183, 33, 6, 1, 251, 222, 210, 183, 33, 4, 1, 251, 222, 210,
- 183, 33, 6, 1, 235, 190, 250, 8, 232, 198, 210, 183, 33, 4, 1, 235, 190,
- 250, 8, 232, 198, 210, 183, 33, 6, 1, 210, 246, 33, 4, 1, 210, 246, 33,
- 6, 1, 223, 52, 215, 179, 33, 4, 1, 223, 52, 215, 179, 33, 6, 1, 219, 54,
- 248, 98, 33, 4, 1, 219, 54, 248, 98, 33, 6, 1, 219, 54, 245, 182, 33, 4,
- 1, 219, 54, 245, 182, 33, 6, 1, 219, 54, 245, 167, 33, 4, 1, 219, 54,
- 245, 167, 33, 6, 1, 230, 149, 78, 33, 4, 1, 230, 149, 78, 33, 6, 1, 251,
- 248, 78, 33, 4, 1, 251, 248, 78, 33, 6, 1, 52, 230, 149, 78, 33, 4, 1,
- 52, 230, 149, 78, 33, 1, 230, 91, 78, 38, 33, 212, 100, 38, 33, 216, 249,
- 230, 196, 50, 38, 33, 240, 218, 230, 196, 50, 38, 33, 216, 149, 230, 196,
- 50, 219, 95, 253, 224, 38, 33, 1, 214, 202, 236, 67, 38, 33, 1, 74, 38,
- 33, 1, 211, 8, 38, 33, 1, 69, 38, 33, 1, 242, 10, 50, 38, 33, 1, 211, 27,
- 38, 33, 1, 219, 54, 50, 38, 33, 1, 226, 205, 38, 33, 234, 198, 38, 33,
- 225, 231, 33, 234, 198, 33, 225, 231, 33, 6, 1, 246, 54, 33, 4, 1, 246,
- 54, 33, 6, 1, 246, 35, 33, 4, 1, 246, 35, 33, 6, 1, 210, 52, 33, 4, 1,
- 210, 52, 33, 6, 1, 250, 214, 33, 4, 1, 250, 214, 33, 6, 1, 246, 33, 33,
- 4, 1, 246, 33, 33, 6, 1, 217, 24, 2, 230, 229, 103, 33, 4, 1, 217, 24, 2,
- 230, 229, 103, 33, 6, 1, 215, 78, 33, 4, 1, 215, 78, 33, 6, 1, 215, 161,
- 33, 4, 1, 215, 161, 33, 6, 1, 215, 165, 33, 4, 1, 215, 165, 33, 6, 1,
- 217, 29, 33, 4, 1, 217, 29, 33, 6, 1, 240, 205, 33, 4, 1, 240, 205, 33,
- 6, 1, 219, 208, 33, 4, 1, 219, 208, 38, 33, 1, 235, 190, 76, 20, 1, 61,
- 20, 1, 176, 20, 1, 69, 20, 1, 233, 223, 20, 1, 245, 217, 20, 1, 223, 111,
- 20, 1, 217, 87, 20, 1, 78, 20, 1, 227, 152, 20, 1, 74, 20, 1, 233, 141,
- 20, 1, 191, 20, 1, 222, 242, 20, 1, 223, 32, 20, 1, 233, 55, 20, 1, 231,
- 84, 20, 1, 217, 102, 20, 1, 229, 151, 20, 1, 228, 188, 20, 1, 194, 20, 1,
- 218, 5, 20, 1, 230, 107, 20, 1, 220, 29, 20, 1, 219, 193, 20, 1, 220, 39,
- 20, 1, 220, 125, 20, 1, 233, 161, 20, 1, 234, 162, 20, 1, 227, 213, 20,
- 1, 227, 242, 20, 1, 228, 159, 20, 1, 210, 226, 20, 1, 219, 227, 20, 1,
- 210, 187, 20, 1, 192, 20, 1, 228, 14, 20, 1, 234, 148, 20, 1, 225, 154,
- 20, 1, 228, 181, 20, 1, 227, 251, 20, 1, 224, 147, 20, 1, 211, 192, 20,
- 1, 225, 214, 20, 1, 244, 155, 20, 1, 222, 142, 20, 1, 232, 103, 20, 1,
- 230, 235, 20, 1, 228, 238, 20, 1, 223, 54, 20, 1, 223, 174, 20, 1, 234,
- 171, 20, 1, 229, 12, 20, 1, 229, 61, 20, 1, 229, 82, 20, 1, 220, 9, 20,
- 1, 224, 150, 20, 1, 243, 241, 20, 1, 244, 45, 20, 1, 212, 65, 20, 1, 198,
- 20, 1, 232, 247, 20, 1, 225, 111, 20, 1, 232, 125, 20, 1, 234, 34, 20, 1,
- 231, 119, 20, 1, 223, 86, 20, 1, 231, 63, 20, 1, 186, 20, 1, 216, 118,
- 20, 1, 234, 98, 20, 1, 230, 166, 20, 1, 231, 127, 20, 1, 216, 231, 20, 1,
- 234, 1, 20, 1, 216, 248, 20, 1, 227, 243, 20, 1, 221, 253, 20, 1, 244,
- 200, 20, 1, 234, 3, 20, 1, 234, 30, 20, 38, 164, 234, 11, 20, 38, 164,
- 215, 111, 20, 228, 187, 20, 243, 236, 218, 131, 20, 249, 234, 20, 249,
- 227, 20, 220, 152, 20, 224, 16, 79, 58, 1, 250, 104, 138, 210, 254, 225,
- 64, 58, 1, 250, 104, 138, 211, 70, 225, 64, 58, 1, 250, 104, 138, 210,
- 254, 220, 86, 58, 1, 250, 104, 138, 211, 70, 220, 86, 58, 1, 250, 104,
- 138, 210, 254, 224, 33, 58, 1, 250, 104, 138, 211, 70, 224, 33, 58, 1,
- 250, 104, 138, 210, 254, 222, 142, 58, 1, 250, 104, 138, 211, 70, 222,
- 142, 58, 1, 245, 28, 246, 126, 138, 130, 58, 1, 125, 246, 126, 138, 130,
- 58, 1, 230, 230, 246, 126, 138, 130, 58, 1, 121, 246, 126, 138, 130, 58,
- 1, 245, 27, 246, 126, 138, 130, 58, 1, 245, 28, 246, 126, 233, 45, 138,
- 130, 58, 1, 125, 246, 126, 233, 45, 138, 130, 58, 1, 230, 230, 246, 126,
- 233, 45, 138, 130, 58, 1, 121, 246, 126, 233, 45, 138, 130, 58, 1, 245,
- 27, 246, 126, 233, 45, 138, 130, 58, 1, 245, 28, 233, 45, 138, 130, 58,
- 1, 125, 233, 45, 138, 130, 58, 1, 230, 230, 233, 45, 138, 130, 58, 1,
- 121, 233, 45, 138, 130, 58, 1, 245, 27, 233, 45, 138, 130, 58, 1, 59, 67,
- 130, 58, 1, 59, 219, 97, 58, 1, 59, 203, 130, 58, 1, 232, 114, 44, 249,
- 169, 254, 117, 58, 1, 223, 160, 120, 75, 58, 1, 223, 160, 124, 75, 58, 1,
- 223, 160, 245, 39, 79, 58, 1, 223, 160, 235, 200, 245, 39, 79, 58, 1,
- 121, 235, 200, 245, 39, 79, 58, 1, 218, 113, 22, 125, 216, 31, 58, 1,
- 218, 113, 22, 121, 216, 31, 7, 6, 1, 245, 207, 254, 179, 7, 4, 1, 245,
- 207, 254, 179, 7, 6, 1, 245, 207, 254, 205, 7, 4, 1, 245, 207, 254, 205,
- 7, 6, 1, 241, 214, 7, 4, 1, 241, 214, 7, 6, 1, 215, 40, 7, 4, 1, 215, 40,
- 7, 6, 1, 215, 230, 7, 4, 1, 215, 230, 7, 6, 1, 249, 118, 7, 4, 1, 249,
- 118, 7, 6, 1, 249, 119, 2, 249, 227, 7, 4, 1, 249, 119, 2, 249, 227, 7,
- 1, 4, 6, 245, 14, 7, 1, 4, 6, 222, 93, 7, 6, 1, 255, 82, 7, 4, 1, 255,
- 82, 7, 6, 1, 254, 81, 7, 4, 1, 254, 81, 7, 6, 1, 253, 200, 7, 4, 1, 253,
- 200, 7, 6, 1, 253, 184, 7, 4, 1, 253, 184, 7, 6, 1, 253, 185, 2, 203,
- 130, 7, 4, 1, 253, 185, 2, 203, 130, 7, 6, 1, 253, 175, 7, 4, 1, 253,
- 175, 7, 6, 1, 223, 52, 251, 75, 2, 247, 128, 7, 4, 1, 223, 52, 251, 75,
- 2, 247, 128, 7, 6, 1, 235, 30, 2, 91, 7, 4, 1, 235, 30, 2, 91, 7, 6, 1,
- 235, 30, 2, 248, 7, 91, 7, 4, 1, 235, 30, 2, 248, 7, 91, 7, 6, 1, 235,
- 30, 2, 218, 105, 22, 248, 7, 91, 7, 4, 1, 235, 30, 2, 218, 105, 22, 248,
- 7, 91, 7, 6, 1, 251, 143, 156, 7, 4, 1, 251, 143, 156, 7, 6, 1, 233, 155,
- 2, 125, 91, 7, 4, 1, 233, 155, 2, 125, 91, 7, 6, 1, 144, 2, 200, 218,
- 105, 226, 124, 7, 4, 1, 144, 2, 200, 218, 105, 226, 124, 7, 6, 1, 144, 2,
- 232, 129, 7, 4, 1, 144, 2, 232, 129, 7, 6, 1, 226, 187, 7, 4, 1, 226,
- 187, 7, 6, 1, 226, 110, 2, 218, 105, 216, 140, 248, 47, 7, 4, 1, 226,
- 110, 2, 218, 105, 216, 140, 248, 47, 7, 6, 1, 226, 110, 2, 244, 61, 7, 4,
- 1, 226, 110, 2, 244, 61, 7, 6, 1, 226, 110, 2, 218, 231, 217, 78, 7, 4,
- 1, 226, 110, 2, 218, 231, 217, 78, 7, 6, 1, 224, 100, 2, 218, 105, 216,
- 140, 248, 47, 7, 4, 1, 224, 100, 2, 218, 105, 216, 140, 248, 47, 7, 6, 1,
- 224, 100, 2, 248, 7, 91, 7, 4, 1, 224, 100, 2, 248, 7, 91, 7, 6, 1, 223,
- 227, 222, 188, 7, 4, 1, 223, 227, 222, 188, 7, 6, 1, 222, 132, 222, 188,
- 7, 4, 1, 222, 132, 222, 188, 7, 6, 1, 214, 106, 2, 248, 7, 91, 7, 4, 1,
- 214, 106, 2, 248, 7, 91, 7, 6, 1, 212, 106, 7, 4, 1, 212, 106, 7, 6, 1,
- 213, 145, 210, 159, 7, 4, 1, 213, 145, 210, 159, 7, 6, 1, 216, 153, 2,
- 91, 7, 4, 1, 216, 153, 2, 91, 7, 6, 1, 216, 153, 2, 218, 105, 216, 140,
- 248, 47, 7, 4, 1, 216, 153, 2, 218, 105, 216, 140, 248, 47, 7, 6, 1, 213,
- 245, 7, 4, 1, 213, 245, 7, 6, 1, 245, 73, 7, 4, 1, 245, 73, 7, 6, 1, 235,
- 178, 7, 4, 1, 235, 178, 7, 6, 1, 249, 215, 7, 4, 1, 249, 215, 58, 1, 214,
- 133, 7, 4, 1, 246, 77, 7, 4, 1, 232, 89, 7, 4, 1, 230, 85, 7, 4, 1, 227,
- 205, 7, 4, 1, 222, 131, 7, 1, 4, 6, 222, 131, 7, 4, 1, 215, 109, 7, 4, 1,
- 214, 197, 7, 6, 1, 235, 220, 249, 68, 7, 4, 1, 235, 220, 249, 68, 7, 6,
- 1, 235, 220, 245, 14, 7, 4, 1, 235, 220, 245, 14, 7, 6, 1, 235, 220, 243,
- 209, 7, 6, 1, 215, 94, 235, 220, 243, 209, 7, 4, 1, 215, 94, 235, 220,
- 243, 209, 7, 6, 1, 215, 94, 156, 7, 4, 1, 215, 94, 156, 7, 6, 1, 235,
- 220, 153, 7, 4, 1, 235, 220, 153, 7, 6, 1, 235, 220, 222, 93, 7, 4, 1,
- 235, 220, 222, 93, 7, 6, 1, 235, 220, 217, 153, 7, 4, 1, 235, 220, 217,
- 153, 58, 1, 121, 250, 39, 255, 23, 58, 1, 249, 234, 58, 1, 219, 253, 245,
- 106, 50, 7, 6, 1, 222, 1, 7, 4, 1, 222, 1, 7, 6, 1, 215, 94, 242, 67, 7,
- 4, 1, 233, 155, 2, 223, 58, 241, 59, 22, 252, 49, 7, 6, 1, 230, 31, 2,
- 248, 47, 7, 4, 1, 230, 31, 2, 248, 47, 7, 6, 1, 251, 75, 2, 130, 7, 4, 1,
- 251, 75, 2, 130, 7, 6, 1, 243, 210, 2, 226, 252, 91, 7, 4, 1, 243, 210,
- 2, 226, 252, 91, 7, 6, 1, 235, 30, 2, 226, 252, 91, 7, 4, 1, 235, 30, 2,
- 226, 252, 91, 7, 6, 1, 230, 31, 2, 226, 252, 91, 7, 4, 1, 230, 31, 2,
- 226, 252, 91, 7, 6, 1, 223, 227, 2, 226, 252, 91, 7, 4, 1, 223, 227, 2,
- 226, 252, 91, 7, 6, 1, 222, 94, 2, 226, 252, 91, 7, 4, 1, 222, 94, 2,
- 226, 252, 91, 7, 6, 1, 242, 68, 2, 103, 58, 1, 6, 242, 68, 2, 91, 58, 1,
- 4, 27, 226, 238, 7, 1, 4, 6, 215, 94, 194, 7, 245, 111, 1, 223, 52, 245,
- 14, 7, 245, 111, 1, 223, 52, 226, 109, 7, 245, 111, 1, 235, 200, 194, 7,
- 245, 111, 1, 240, 161, 232, 135, 7, 245, 111, 1, 254, 31, 194, 217, 231,
- 229, 219, 1, 61, 217, 231, 229, 219, 1, 74, 217, 231, 229, 219, 5, 246,
- 56, 217, 231, 229, 219, 1, 69, 217, 231, 229, 219, 1, 76, 217, 231, 229,
- 219, 1, 78, 217, 231, 229, 219, 5, 242, 4, 217, 231, 229, 219, 1, 234,
- 34, 217, 231, 229, 219, 1, 234, 111, 217, 231, 229, 219, 1, 242, 181,
- 217, 231, 229, 219, 1, 242, 231, 217, 231, 229, 219, 5, 254, 83, 217,
- 231, 229, 219, 1, 249, 246, 217, 231, 229, 219, 1, 250, 94, 217, 231,
- 229, 219, 1, 235, 74, 217, 231, 229, 219, 1, 235, 115, 217, 231, 229,
- 219, 1, 215, 134, 217, 231, 229, 219, 1, 215, 140, 217, 231, 229, 219, 1,
- 248, 113, 217, 231, 229, 219, 1, 248, 122, 217, 231, 229, 219, 1, 112,
- 217, 231, 229, 219, 1, 216, 157, 217, 231, 229, 219, 1, 247, 153, 217,
- 231, 229, 219, 1, 248, 15, 217, 231, 229, 219, 1, 228, 79, 217, 231, 229,
- 219, 1, 225, 19, 217, 231, 229, 219, 1, 225, 124, 217, 231, 229, 219, 1,
- 251, 213, 217, 231, 229, 219, 1, 252, 18, 217, 231, 229, 219, 1, 230,
- 166, 217, 231, 229, 219, 1, 222, 213, 217, 231, 229, 219, 1, 232, 162,
- 217, 231, 229, 219, 1, 222, 167, 217, 231, 229, 219, 1, 219, 60, 217,
- 231, 229, 219, 1, 241, 75, 217, 231, 229, 219, 25, 5, 61, 217, 231, 229,
- 219, 25, 5, 74, 217, 231, 229, 219, 25, 5, 69, 217, 231, 229, 219, 25, 5,
- 76, 217, 231, 229, 219, 25, 5, 226, 187, 217, 231, 229, 219, 225, 15,
- 231, 163, 217, 231, 229, 219, 225, 15, 231, 162, 217, 231, 229, 219, 225,
- 15, 231, 161, 217, 231, 229, 219, 225, 15, 231, 160, 228, 61, 235, 247,
- 244, 10, 123, 224, 24, 228, 61, 235, 247, 244, 10, 123, 242, 34, 228, 61,
- 235, 247, 244, 10, 134, 224, 22, 228, 61, 235, 247, 244, 10, 123, 219,
- 119, 228, 61, 235, 247, 244, 10, 123, 245, 196, 228, 61, 235, 247, 244,
- 10, 134, 219, 118, 228, 61, 235, 247, 224, 25, 79, 228, 61, 235, 247,
- 225, 43, 79, 228, 61, 235, 247, 222, 120, 79, 228, 61, 235, 247, 224, 26,
- 79, 225, 147, 1, 176, 225, 147, 1, 234, 138, 225, 147, 1, 243, 142, 225,
- 147, 1, 229, 82, 225, 147, 1, 251, 41, 225, 147, 1, 250, 165, 225, 147,
- 1, 235, 147, 225, 147, 1, 227, 169, 225, 147, 1, 217, 106, 225, 147, 1,
- 216, 209, 225, 147, 1, 248, 229, 225, 147, 1, 198, 225, 147, 1, 191, 225,
- 147, 1, 225, 150, 225, 147, 1, 252, 199, 225, 147, 1, 186, 225, 147, 1,
- 215, 184, 225, 147, 1, 215, 176, 225, 147, 1, 246, 46, 225, 147, 1, 212,
- 65, 225, 147, 1, 210, 82, 225, 147, 1, 210, 116, 225, 147, 1, 4, 61, 225,
- 147, 1, 192, 225, 147, 1, 205, 225, 147, 1, 233, 141, 225, 147, 1, 220,
- 104, 225, 147, 1, 206, 225, 147, 1, 162, 225, 147, 1, 61, 225, 147, 1,
- 74, 225, 147, 1, 69, 225, 147, 1, 76, 225, 147, 1, 78, 225, 147, 1, 224,
- 91, 225, 147, 1, 211, 165, 225, 147, 1, 244, 204, 225, 147, 1, 243, 36,
- 225, 147, 1, 245, 217, 225, 147, 218, 74, 1, 212, 65, 225, 147, 218, 74,
- 1, 192, 225, 147, 1, 215, 157, 225, 147, 1, 215, 145, 225, 147, 1, 248,
- 143, 225, 147, 1, 228, 115, 225, 147, 1, 254, 149, 192, 225, 147, 1, 213,
- 134, 220, 104, 225, 147, 1, 213, 135, 162, 225, 147, 1, 253, 231, 244,
- 204, 225, 147, 218, 74, 1, 205, 225, 147, 218, 26, 1, 205, 225, 147, 1,
- 251, 7, 225, 147, 219, 157, 241, 243, 79, 225, 147, 52, 241, 243, 79,
- 225, 147, 164, 220, 97, 225, 147, 164, 52, 220, 97, 179, 5, 254, 83, 179,
- 5, 213, 147, 179, 1, 61, 179, 1, 255, 82, 179, 1, 74, 179, 1, 236, 40,
- 179, 1, 69, 179, 1, 214, 118, 179, 1, 149, 153, 179, 1, 149, 222, 182,
- 179, 1, 149, 156, 179, 1, 149, 232, 191, 179, 1, 76, 179, 1, 245, 217,
- 179, 1, 254, 210, 179, 1, 78, 179, 1, 226, 187, 179, 1, 253, 200, 179, 1,
- 176, 179, 1, 234, 138, 179, 1, 243, 142, 179, 1, 243, 0, 179, 1, 229, 82,
- 179, 1, 251, 41, 179, 1, 250, 165, 179, 1, 235, 147, 179, 1, 235, 120,
- 179, 1, 227, 169, 179, 1, 215, 157, 179, 1, 215, 145, 179, 1, 248, 143,
- 179, 1, 248, 127, 179, 1, 228, 115, 179, 1, 217, 106, 179, 1, 216, 209,
- 179, 1, 248, 229, 179, 1, 248, 33, 179, 1, 198, 179, 1, 191, 179, 1, 225,
- 150, 179, 1, 252, 199, 179, 1, 252, 26, 179, 1, 186, 179, 1, 192, 179, 1,
- 205, 179, 1, 233, 141, 179, 1, 214, 27, 179, 1, 220, 104, 179, 1, 218,
- 225, 179, 1, 206, 179, 1, 162, 179, 1, 232, 190, 179, 117, 5, 242, 51,
- 179, 25, 5, 255, 82, 179, 25, 5, 74, 179, 25, 5, 236, 40, 179, 25, 5, 69,
- 179, 25, 5, 214, 118, 179, 25, 5, 149, 153, 179, 25, 5, 149, 222, 182,
- 179, 25, 5, 149, 156, 179, 25, 5, 149, 232, 191, 179, 25, 5, 76, 179, 25,
- 5, 245, 217, 179, 25, 5, 254, 210, 179, 25, 5, 78, 179, 25, 5, 226, 187,
- 179, 25, 5, 253, 200, 179, 5, 213, 152, 179, 248, 186, 179, 52, 248, 186,
- 179, 21, 210, 86, 179, 21, 111, 179, 21, 105, 179, 21, 158, 179, 21, 161,
- 179, 21, 190, 179, 21, 195, 179, 21, 199, 179, 21, 196, 179, 21, 201, 38,
- 84, 21, 210, 86, 38, 84, 21, 111, 38, 84, 21, 105, 38, 84, 21, 158, 38,
- 84, 21, 161, 38, 84, 21, 190, 38, 84, 21, 195, 38, 84, 21, 199, 38, 84,
- 21, 196, 38, 84, 21, 201, 38, 84, 1, 61, 38, 84, 1, 69, 38, 84, 1, 176,
- 38, 84, 1, 198, 38, 84, 1, 191, 38, 84, 1, 205, 38, 84, 1, 213, 176, 38,
- 84, 5, 253, 183, 84, 5, 219, 19, 251, 7, 84, 5, 251, 8, 213, 152, 84, 5,
- 52, 251, 8, 213, 152, 84, 5, 251, 8, 105, 84, 5, 251, 8, 158, 84, 5, 251,
- 8, 253, 183, 84, 5, 224, 127, 84, 243, 107, 244, 111, 84, 250, 246, 84,
- 241, 237, 234, 194, 232, 248, 21, 210, 86, 234, 194, 232, 248, 21, 111,
- 234, 194, 232, 248, 21, 105, 234, 194, 232, 248, 21, 158, 234, 194, 232,
- 248, 21, 161, 234, 194, 232, 248, 21, 190, 234, 194, 232, 248, 21, 195,
- 234, 194, 232, 248, 21, 199, 234, 194, 232, 248, 21, 196, 234, 194, 232,
- 248, 21, 201, 234, 194, 232, 248, 1, 176, 234, 194, 232, 248, 1, 234,
- 138, 234, 194, 232, 248, 1, 243, 142, 234, 194, 232, 248, 1, 229, 82,
- 234, 194, 232, 248, 1, 206, 234, 194, 232, 248, 1, 220, 104, 234, 194,
- 232, 248, 1, 210, 116, 234, 194, 232, 248, 1, 227, 169, 234, 194, 232,
- 248, 1, 217, 106, 234, 194, 232, 248, 1, 240, 233, 234, 194, 232, 248, 1,
- 198, 234, 194, 232, 248, 1, 191, 234, 194, 232, 248, 1, 225, 150, 234,
- 194, 232, 248, 1, 186, 234, 194, 232, 248, 1, 248, 229, 234, 194, 232,
- 248, 1, 252, 199, 234, 194, 232, 248, 1, 205, 234, 194, 232, 248, 1, 192,
- 234, 194, 232, 248, 1, 233, 141, 234, 194, 232, 248, 1, 212, 65, 234,
- 194, 232, 248, 1, 216, 209, 234, 194, 232, 248, 1, 162, 234, 194, 232,
- 248, 1, 214, 27, 234, 194, 232, 248, 1, 251, 41, 234, 194, 232, 248, 1,
- 61, 234, 194, 232, 248, 1, 226, 238, 234, 194, 232, 248, 1, 74, 234, 194,
- 232, 248, 1, 226, 187, 234, 194, 232, 248, 25, 214, 214, 234, 194, 232,
- 248, 25, 76, 234, 194, 232, 248, 25, 69, 234, 194, 232, 248, 25, 245,
- 217, 234, 194, 232, 248, 25, 78, 234, 194, 232, 248, 138, 225, 33, 234,
- 194, 232, 248, 138, 251, 20, 234, 194, 232, 248, 138, 251, 21, 225, 33,
- 234, 194, 232, 248, 5, 249, 85, 234, 194, 232, 248, 5, 219, 201, 223, 96,
- 1, 176, 223, 96, 1, 243, 142, 223, 96, 1, 229, 82, 223, 96, 1, 217, 106,
- 223, 96, 1, 248, 229, 223, 96, 1, 198, 223, 96, 1, 191, 223, 96, 1, 252,
- 199, 223, 96, 1, 186, 223, 96, 1, 251, 41, 223, 96, 1, 235, 147, 223, 96,
- 1, 227, 169, 223, 96, 1, 206, 223, 96, 1, 205, 223, 96, 1, 233, 141, 223,
- 96, 1, 192, 223, 96, 1, 212, 65, 223, 96, 1, 162, 223, 96, 1, 231, 129,
- 223, 96, 1, 229, 61, 223, 96, 1, 229, 153, 223, 96, 1, 227, 139, 223, 96,
- 1, 61, 223, 96, 25, 5, 74, 223, 96, 25, 5, 69, 223, 96, 25, 5, 76, 223,
- 96, 25, 5, 254, 210, 223, 96, 25, 5, 78, 223, 96, 25, 5, 253, 200, 223,
- 96, 25, 5, 245, 63, 223, 96, 25, 5, 245, 241, 223, 96, 117, 5, 229, 84,
- 223, 96, 117, 5, 230, 30, 223, 96, 117, 5, 153, 223, 96, 117, 5, 242, 67,
- 223, 96, 213, 152, 223, 96, 221, 175, 79, 24, 100, 216, 98, 24, 100, 216,
- 97, 24, 100, 216, 95, 24, 100, 216, 100, 24, 100, 223, 24, 24, 100, 223,
- 8, 24, 100, 223, 3, 24, 100, 223, 5, 24, 100, 223, 21, 24, 100, 223, 14,
- 24, 100, 223, 7, 24, 100, 223, 26, 24, 100, 223, 9, 24, 100, 223, 28, 24,
- 100, 223, 25, 24, 100, 230, 218, 24, 100, 230, 209, 24, 100, 230, 212,
- 24, 100, 225, 83, 24, 100, 225, 94, 24, 100, 225, 95, 24, 100, 218, 209,
- 24, 100, 236, 53, 24, 100, 236, 60, 24, 100, 218, 220, 24, 100, 218, 207,
- 24, 100, 225, 133, 24, 100, 241, 174, 24, 100, 218, 204, 155, 5, 226, 31,
- 155, 5, 250, 195, 155, 5, 233, 72, 155, 5, 211, 243, 155, 1, 61, 155, 1,
- 240, 161, 234, 197, 155, 1, 74, 155, 1, 236, 40, 155, 1, 69, 155, 1, 226,
- 94, 250, 171, 155, 1, 229, 83, 233, 34, 155, 1, 229, 83, 233, 35, 223,
- 145, 155, 1, 76, 155, 1, 254, 210, 155, 1, 78, 155, 1, 176, 155, 1, 235,
- 19, 221, 230, 155, 1, 235, 19, 230, 71, 155, 1, 243, 142, 155, 1, 243,
- 143, 230, 71, 155, 1, 229, 82, 155, 1, 251, 41, 155, 1, 251, 42, 230, 71,
- 155, 1, 235, 147, 155, 1, 227, 170, 230, 71, 155, 1, 235, 148, 231, 212,
- 155, 1, 227, 169, 155, 1, 215, 157, 155, 1, 215, 158, 231, 212, 155, 1,
- 248, 143, 155, 1, 248, 144, 231, 212, 155, 1, 229, 234, 230, 71, 155, 1,
- 217, 106, 155, 1, 217, 107, 230, 71, 155, 1, 248, 229, 155, 1, 248, 230,
- 231, 212, 155, 1, 198, 155, 1, 191, 155, 1, 226, 94, 230, 71, 155, 1,
- 252, 199, 155, 1, 252, 200, 230, 71, 155, 1, 186, 155, 1, 192, 155, 1,
- 205, 155, 1, 223, 191, 254, 219, 155, 1, 233, 141, 155, 1, 212, 65, 155,
- 1, 222, 36, 230, 71, 155, 1, 222, 36, 231, 212, 155, 1, 206, 155, 1, 162,
- 155, 5, 250, 196, 216, 251, 155, 25, 5, 217, 48, 155, 25, 5, 216, 36,
- 155, 25, 5, 211, 190, 155, 25, 5, 211, 191, 231, 74, 155, 25, 5, 218, 48,
- 155, 25, 5, 218, 49, 231, 62, 155, 25, 5, 217, 66, 155, 25, 5, 247, 202,
- 230, 70, 155, 25, 5, 225, 187, 155, 117, 5, 234, 164, 155, 117, 5, 225,
- 199, 155, 117, 5, 251, 27, 155, 226, 44, 155, 43, 223, 72, 155, 44, 223,
- 72, 155, 226, 83, 254, 125, 155, 226, 83, 231, 229, 155, 226, 83, 232,
- 93, 155, 226, 83, 211, 238, 155, 226, 83, 226, 45, 155, 226, 83, 232,
- 211, 155, 226, 83, 232, 87, 155, 226, 83, 255, 2, 155, 226, 83, 255, 3,
- 255, 2, 155, 226, 83, 225, 54, 155, 215, 94, 226, 83, 225, 54, 155, 226,
- 40, 155, 21, 210, 86, 155, 21, 111, 155, 21, 105, 155, 21, 158, 155, 21,
- 161, 155, 21, 190, 155, 21, 195, 155, 21, 199, 155, 21, 196, 155, 21,
- 201, 155, 226, 83, 216, 70, 215, 107, 155, 226, 83, 235, 174, 172, 1, 61,
- 172, 1, 74, 172, 1, 69, 172, 1, 76, 172, 1, 254, 210, 172, 1, 78, 172, 1,
- 176, 172, 1, 234, 138, 172, 1, 243, 142, 172, 1, 243, 0, 172, 1, 228,
- 250, 172, 1, 229, 82, 172, 1, 250, 165, 172, 1, 250, 120, 172, 1, 235,
- 147, 172, 1, 235, 120, 172, 1, 228, 240, 172, 1, 228, 242, 172, 1, 228,
- 241, 172, 1, 217, 106, 172, 1, 216, 209, 172, 1, 248, 229, 172, 1, 248,
- 33, 172, 1, 227, 211, 172, 1, 198, 172, 1, 248, 143, 172, 1, 191, 172, 1,
- 224, 223, 172, 1, 225, 150, 172, 1, 252, 199, 172, 1, 252, 26, 172, 1,
- 230, 100, 172, 1, 186, 172, 1, 252, 119, 172, 1, 192, 172, 1, 205, 172,
- 1, 233, 141, 172, 1, 214, 27, 172, 1, 218, 225, 172, 1, 206, 172, 1, 162,
- 172, 25, 5, 255, 82, 172, 25, 5, 74, 172, 25, 5, 236, 40, 172, 25, 5,
- 245, 203, 172, 25, 5, 69, 172, 25, 5, 226, 238, 172, 25, 5, 78, 172, 25,
- 5, 254, 210, 172, 25, 5, 253, 200, 172, 25, 5, 214, 214, 172, 117, 5,
- 192, 172, 117, 5, 205, 172, 117, 5, 233, 141, 172, 117, 5, 212, 65, 172,
- 1, 40, 235, 29, 172, 1, 40, 243, 209, 172, 1, 40, 229, 84, 172, 117, 5,
- 40, 229, 84, 172, 1, 40, 250, 166, 172, 1, 40, 217, 153, 172, 1, 40, 230,
- 30, 172, 1, 40, 226, 109, 172, 1, 40, 211, 117, 172, 1, 40, 153, 172, 1,
- 40, 156, 172, 1, 40, 218, 228, 172, 117, 5, 40, 194, 172, 117, 5, 40,
- 242, 67, 172, 21, 210, 86, 172, 21, 111, 172, 21, 105, 172, 21, 158, 172,
- 21, 161, 172, 21, 190, 172, 21, 195, 172, 21, 199, 172, 21, 196, 172, 21,
- 201, 172, 224, 144, 218, 253, 172, 224, 144, 248, 186, 172, 224, 144, 52,
- 248, 186, 172, 224, 144, 215, 212, 248, 186, 68, 1, 234, 132, 243, 142,
- 68, 1, 234, 132, 251, 41, 68, 1, 234, 132, 250, 165, 68, 1, 234, 132,
- 235, 147, 68, 1, 234, 132, 235, 120, 68, 1, 234, 132, 227, 169, 68, 1,
- 234, 132, 215, 157, 68, 1, 234, 132, 215, 145, 68, 1, 234, 132, 248, 143,
- 68, 1, 234, 132, 248, 127, 68, 1, 234, 132, 248, 33, 68, 1, 234, 132,
- 198, 68, 1, 234, 132, 206, 68, 1, 234, 132, 162, 68, 1, 234, 132, 241,
- 196, 68, 1, 234, 132, 244, 204, 68, 58, 1, 234, 132, 223, 112, 68, 1,
- 234, 132, 211, 165, 68, 1, 234, 132, 210, 116, 68, 1, 234, 132, 205, 68,
- 232, 151, 234, 132, 227, 1, 68, 232, 151, 234, 132, 224, 46, 68, 232,
- 151, 234, 132, 241, 128, 68, 16, 254, 199, 245, 38, 68, 16, 254, 199,
- 111, 68, 16, 254, 199, 105, 68, 1, 254, 199, 205, 68, 5, 226, 27, 234,
- 219, 216, 31, 39, 208, 1, 121, 234, 34, 39, 208, 1, 125, 234, 34, 39,
- 208, 1, 121, 234, 111, 39, 208, 1, 125, 234, 111, 39, 208, 1, 121, 234,
- 120, 39, 208, 1, 125, 234, 120, 39, 208, 1, 121, 242, 181, 39, 208, 1,
- 125, 242, 181, 39, 208, 1, 121, 229, 9, 39, 208, 1, 125, 229, 9, 39, 208,
- 1, 121, 249, 246, 39, 208, 1, 125, 249, 246, 39, 208, 1, 121, 250, 94,
- 39, 208, 1, 125, 250, 94, 39, 208, 1, 121, 219, 60, 39, 208, 1, 125, 219,
- 60, 39, 208, 1, 121, 227, 138, 39, 208, 1, 125, 227, 138, 39, 208, 1,
- 121, 247, 153, 39, 208, 1, 125, 247, 153, 39, 208, 1, 121, 112, 39, 208,
- 1, 125, 112, 39, 208, 1, 121, 216, 157, 39, 208, 1, 125, 216, 157, 39,
- 208, 1, 121, 228, 79, 39, 208, 1, 125, 228, 79, 39, 208, 1, 121, 251,
- 213, 39, 208, 1, 125, 251, 213, 39, 208, 1, 121, 225, 19, 39, 208, 1,
- 125, 225, 19, 39, 208, 1, 121, 225, 124, 39, 208, 1, 125, 225, 124, 39,
- 208, 1, 121, 244, 51, 39, 208, 1, 125, 244, 51, 39, 208, 1, 121, 230,
- 166, 39, 208, 1, 125, 230, 166, 39, 208, 1, 121, 210, 244, 39, 208, 1,
- 125, 210, 244, 39, 208, 1, 121, 222, 213, 39, 208, 1, 125, 222, 213, 39,
- 208, 1, 121, 232, 162, 39, 208, 1, 125, 232, 162, 39, 208, 1, 121, 213,
- 138, 39, 208, 1, 125, 213, 138, 39, 208, 1, 121, 241, 75, 39, 208, 1,
- 125, 241, 75, 39, 208, 1, 121, 78, 39, 208, 1, 125, 78, 39, 208, 231,
- 209, 234, 236, 39, 208, 25, 255, 82, 39, 208, 25, 74, 39, 208, 25, 214,
- 214, 39, 208, 25, 69, 39, 208, 25, 76, 39, 208, 25, 78, 39, 208, 231,
- 209, 234, 114, 39, 208, 25, 240, 126, 39, 208, 25, 214, 213, 39, 208, 25,
- 214, 229, 39, 208, 25, 253, 198, 39, 208, 25, 253, 175, 39, 208, 25, 254,
- 131, 39, 208, 25, 254, 144, 39, 208, 138, 231, 209, 245, 188, 39, 208,
- 138, 231, 209, 227, 210, 39, 208, 138, 231, 209, 216, 157, 39, 208, 138,
- 231, 209, 219, 44, 39, 208, 16, 234, 19, 39, 208, 16, 227, 210, 39, 208,
- 16, 221, 255, 39, 208, 16, 241, 76, 241, 71, 39, 208, 16, 234, 28, 234,
- 27, 188, 187, 1, 76, 188, 187, 1, 78, 188, 187, 1, 250, 165, 188, 187, 1,
- 227, 169, 188, 187, 1, 215, 157, 188, 187, 1, 215, 145, 188, 187, 1, 248,
- 143, 188, 187, 1, 248, 127, 188, 187, 1, 228, 115, 188, 187, 1, 220, 104,
- 188, 187, 1, 218, 225, 188, 187, 25, 5, 236, 40, 188, 187, 25, 5, 214,
- 118, 188, 187, 25, 5, 255, 46, 188, 187, 25, 5, 253, 200, 188, 187, 25,
- 5, 255, 39, 188, 187, 250, 133, 188, 187, 254, 215, 234, 104, 188, 187,
- 254, 111, 188, 187, 3, 223, 77, 79, 188, 187, 211, 209, 223, 77, 79, 188,
- 187, 25, 5, 213, 147, 188, 187, 213, 152, 29, 3, 215, 138, 29, 3, 215,
- 141, 29, 3, 215, 144, 29, 3, 215, 142, 29, 3, 215, 143, 29, 3, 215, 140,
- 29, 3, 248, 121, 29, 3, 248, 123, 29, 3, 248, 126, 29, 3, 248, 124, 29,
- 3, 248, 125, 29, 3, 248, 122, 29, 3, 246, 36, 29, 3, 246, 39, 29, 3, 246,
- 45, 29, 3, 246, 43, 29, 3, 246, 44, 29, 3, 246, 37, 29, 3, 250, 212, 29,
- 3, 250, 206, 29, 3, 250, 208, 29, 3, 250, 211, 29, 3, 250, 209, 29, 3,
- 250, 210, 29, 3, 250, 207, 29, 3, 252, 119, 29, 3, 252, 98, 29, 3, 252,
- 110, 29, 3, 252, 118, 29, 3, 252, 113, 29, 3, 252, 114, 29, 3, 252, 102,
- 188, 187, 1, 234, 25, 188, 187, 1, 221, 255, 188, 187, 1, 233, 115, 188,
- 187, 1, 230, 177, 188, 187, 1, 191, 188, 187, 1, 198, 188, 187, 1, 250,
- 110, 188, 187, 1, 216, 91, 188, 187, 1, 234, 107, 188, 187, 1, 228, 255,
- 188, 187, 1, 216, 151, 188, 187, 1, 212, 60, 188, 187, 1, 211, 69, 188,
- 187, 1, 240, 223, 188, 187, 1, 214, 190, 188, 187, 1, 74, 188, 187, 1,
- 225, 145, 188, 187, 1, 253, 210, 188, 187, 1, 242, 174, 188, 187, 1, 235,
- 118, 188, 187, 1, 223, 169, 188, 187, 1, 252, 199, 188, 187, 1, 235, 106,
- 188, 187, 1, 247, 227, 188, 187, 1, 242, 228, 188, 187, 1, 248, 13, 188,
- 187, 1, 252, 24, 188, 187, 1, 234, 26, 232, 134, 188, 187, 1, 233, 116,
- 232, 134, 188, 187, 1, 230, 178, 232, 134, 188, 187, 1, 226, 94, 232,
- 134, 188, 187, 1, 229, 234, 232, 134, 188, 187, 1, 216, 92, 232, 134,
- 188, 187, 1, 229, 0, 232, 134, 188, 187, 1, 240, 161, 232, 134, 188, 187,
- 25, 5, 226, 199, 188, 187, 25, 5, 236, 4, 188, 187, 25, 5, 254, 130, 188,
- 187, 25, 5, 211, 38, 188, 187, 25, 5, 219, 34, 188, 187, 25, 5, 214, 187,
- 188, 187, 25, 5, 250, 131, 188, 187, 25, 5, 227, 195, 188, 187, 250, 132,
- 188, 187, 232, 90, 235, 156, 188, 187, 254, 54, 235, 156, 188, 187, 21,
- 210, 86, 188, 187, 21, 111, 188, 187, 21, 105, 188, 187, 21, 158, 188,
- 187, 21, 161, 188, 187, 21, 190, 188, 187, 21, 195, 188, 187, 21, 199,
- 188, 187, 21, 196, 188, 187, 21, 201, 24, 143, 227, 81, 24, 143, 227, 86,
- 24, 143, 210, 243, 24, 143, 210, 242, 24, 143, 210, 241, 24, 143, 215,
- 23, 24, 143, 215, 26, 24, 143, 210, 210, 24, 143, 210, 206, 24, 143, 245,
- 62, 24, 143, 245, 60, 24, 143, 245, 61, 24, 143, 245, 58, 24, 143, 240,
- 151, 24, 143, 240, 150, 24, 143, 240, 148, 24, 143, 240, 149, 24, 143,
- 240, 154, 24, 143, 240, 147, 24, 143, 240, 146, 24, 143, 240, 156, 24,
- 143, 254, 41, 24, 143, 254, 40, 24, 90, 228, 224, 24, 90, 228, 230, 24,
- 90, 218, 206, 24, 90, 218, 205, 24, 90, 216, 97, 24, 90, 216, 95, 24, 90,
- 216, 94, 24, 90, 216, 100, 24, 90, 216, 101, 24, 90, 216, 93, 24, 90,
- 223, 8, 24, 90, 223, 23, 24, 90, 218, 212, 24, 90, 223, 20, 24, 90, 223,
- 10, 24, 90, 223, 12, 24, 90, 222, 255, 24, 90, 223, 0, 24, 90, 234, 224,
- 24, 90, 230, 217, 24, 90, 230, 211, 24, 90, 218, 216, 24, 90, 230, 214,
- 24, 90, 230, 220, 24, 90, 225, 79, 24, 90, 225, 88, 24, 90, 225, 92, 24,
- 90, 218, 214, 24, 90, 225, 82, 24, 90, 225, 96, 24, 90, 225, 97, 24, 90,
- 219, 142, 24, 90, 219, 145, 24, 90, 218, 210, 24, 90, 218, 208, 24, 90,
- 219, 140, 24, 90, 219, 148, 24, 90, 219, 149, 24, 90, 219, 134, 24, 90,
- 219, 147, 24, 90, 226, 34, 24, 90, 226, 35, 24, 90, 211, 24, 24, 90, 211,
- 25, 24, 90, 250, 52, 24, 90, 250, 51, 24, 90, 218, 221, 24, 90, 225, 131,
- 24, 90, 225, 130, 10, 14, 238, 31, 10, 14, 238, 30, 10, 14, 238, 29, 10,
- 14, 238, 28, 10, 14, 238, 27, 10, 14, 238, 26, 10, 14, 238, 25, 10, 14,
- 238, 24, 10, 14, 238, 23, 10, 14, 238, 22, 10, 14, 238, 21, 10, 14, 238,
- 20, 10, 14, 238, 19, 10, 14, 238, 18, 10, 14, 238, 17, 10, 14, 238, 16,
- 10, 14, 238, 15, 10, 14, 238, 14, 10, 14, 238, 13, 10, 14, 238, 12, 10,
- 14, 238, 11, 10, 14, 238, 10, 10, 14, 238, 9, 10, 14, 238, 8, 10, 14,
- 238, 7, 10, 14, 238, 6, 10, 14, 238, 5, 10, 14, 238, 4, 10, 14, 238, 3,
- 10, 14, 238, 2, 10, 14, 238, 1, 10, 14, 238, 0, 10, 14, 237, 255, 10, 14,
- 237, 254, 10, 14, 237, 253, 10, 14, 237, 252, 10, 14, 237, 251, 10, 14,
- 237, 250, 10, 14, 237, 249, 10, 14, 237, 248, 10, 14, 237, 247, 10, 14,
- 237, 246, 10, 14, 237, 245, 10, 14, 237, 244, 10, 14, 237, 243, 10, 14,
- 237, 242, 10, 14, 237, 241, 10, 14, 237, 240, 10, 14, 237, 239, 10, 14,
- 237, 238, 10, 14, 237, 237, 10, 14, 237, 236, 10, 14, 237, 235, 10, 14,
- 237, 234, 10, 14, 237, 233, 10, 14, 237, 232, 10, 14, 237, 231, 10, 14,
- 237, 230, 10, 14, 237, 229, 10, 14, 237, 228, 10, 14, 237, 227, 10, 14,
- 237, 226, 10, 14, 237, 225, 10, 14, 237, 224, 10, 14, 237, 223, 10, 14,
- 237, 222, 10, 14, 237, 221, 10, 14, 237, 220, 10, 14, 237, 219, 10, 14,
- 237, 218, 10, 14, 237, 217, 10, 14, 237, 216, 10, 14, 237, 215, 10, 14,
- 237, 214, 10, 14, 237, 213, 10, 14, 237, 212, 10, 14, 237, 211, 10, 14,
- 237, 210, 10, 14, 237, 209, 10, 14, 237, 208, 10, 14, 237, 207, 10, 14,
- 237, 206, 10, 14, 237, 205, 10, 14, 237, 204, 10, 14, 237, 203, 10, 14,
- 237, 202, 10, 14, 237, 201, 10, 14, 237, 200, 10, 14, 237, 199, 10, 14,
- 237, 198, 10, 14, 237, 197, 10, 14, 237, 196, 10, 14, 237, 195, 10, 14,
- 237, 194, 10, 14, 237, 193, 10, 14, 237, 192, 10, 14, 237, 191, 10, 14,
- 237, 190, 10, 14, 237, 189, 10, 14, 237, 188, 10, 14, 237, 187, 10, 14,
- 237, 186, 10, 14, 237, 185, 10, 14, 237, 184, 10, 14, 237, 183, 10, 14,
- 237, 182, 10, 14, 237, 181, 10, 14, 237, 180, 10, 14, 237, 179, 10, 14,
- 237, 178, 10, 14, 237, 177, 10, 14, 237, 176, 10, 14, 237, 175, 10, 14,
- 237, 174, 10, 14, 237, 173, 10, 14, 237, 172, 10, 14, 237, 171, 10, 14,
- 237, 170, 10, 14, 237, 169, 10, 14, 237, 168, 10, 14, 237, 167, 10, 14,
- 237, 166, 10, 14, 237, 165, 10, 14, 237, 164, 10, 14, 237, 163, 10, 14,
- 237, 162, 10, 14, 237, 161, 10, 14, 237, 160, 10, 14, 237, 159, 10, 14,
- 237, 158, 10, 14, 237, 157, 10, 14, 237, 156, 10, 14, 237, 155, 10, 14,
- 237, 154, 10, 14, 237, 153, 10, 14, 237, 152, 10, 14, 237, 151, 10, 14,
- 237, 150, 10, 14, 237, 149, 10, 14, 237, 148, 10, 14, 237, 147, 10, 14,
- 237, 146, 10, 14, 237, 145, 10, 14, 237, 144, 10, 14, 237, 143, 10, 14,
- 237, 142, 10, 14, 237, 141, 10, 14, 237, 140, 10, 14, 237, 139, 10, 14,
- 237, 138, 10, 14, 237, 137, 10, 14, 237, 136, 10, 14, 237, 135, 10, 14,
- 237, 134, 10, 14, 237, 133, 10, 14, 237, 132, 10, 14, 237, 131, 10, 14,
- 237, 130, 10, 14, 237, 129, 10, 14, 237, 128, 10, 14, 237, 127, 10, 14,
- 237, 126, 10, 14, 237, 125, 10, 14, 237, 124, 10, 14, 237, 123, 10, 14,
- 237, 122, 10, 14, 237, 121, 10, 14, 237, 120, 10, 14, 237, 119, 10, 14,
- 237, 118, 10, 14, 237, 117, 10, 14, 237, 116, 10, 14, 237, 115, 10, 14,
- 237, 114, 10, 14, 237, 113, 10, 14, 237, 112, 10, 14, 237, 111, 10, 14,
- 237, 110, 10, 14, 237, 109, 10, 14, 237, 108, 10, 14, 237, 107, 10, 14,
- 237, 106, 10, 14, 237, 105, 10, 14, 237, 104, 10, 14, 237, 103, 10, 14,
- 237, 102, 10, 14, 237, 101, 10, 14, 237, 100, 10, 14, 237, 99, 10, 14,
- 237, 98, 10, 14, 237, 97, 10, 14, 237, 96, 10, 14, 237, 95, 10, 14, 237,
- 94, 10, 14, 237, 93, 10, 14, 237, 92, 10, 14, 237, 91, 10, 14, 237, 90,
- 10, 14, 237, 89, 10, 14, 237, 88, 10, 14, 237, 87, 10, 14, 237, 86, 10,
- 14, 237, 85, 10, 14, 237, 84, 10, 14, 237, 83, 10, 14, 237, 82, 10, 14,
- 237, 81, 10, 14, 237, 80, 10, 14, 237, 79, 10, 14, 237, 78, 10, 14, 237,
- 77, 10, 14, 237, 76, 10, 14, 237, 75, 10, 14, 237, 74, 10, 14, 237, 73,
- 10, 14, 237, 72, 10, 14, 237, 71, 10, 14, 237, 70, 10, 14, 237, 69, 10,
- 14, 237, 68, 10, 14, 237, 67, 10, 14, 237, 66, 10, 14, 237, 65, 10, 14,
- 237, 64, 10, 14, 237, 63, 10, 14, 237, 62, 10, 14, 237, 61, 10, 14, 237,
- 60, 10, 14, 237, 59, 10, 14, 237, 58, 10, 14, 237, 57, 10, 14, 237, 56,
- 10, 14, 237, 55, 10, 14, 237, 54, 10, 14, 237, 53, 10, 14, 237, 52, 10,
- 14, 237, 51, 10, 14, 237, 50, 10, 14, 237, 49, 10, 14, 237, 48, 10, 14,
- 237, 47, 10, 14, 237, 46, 10, 14, 237, 45, 10, 14, 237, 44, 10, 14, 237,
- 43, 10, 14, 237, 42, 10, 14, 237, 41, 10, 14, 237, 40, 10, 14, 237, 39,
- 10, 14, 237, 38, 10, 14, 237, 37, 10, 14, 237, 36, 10, 14, 237, 35, 10,
- 14, 237, 34, 10, 14, 237, 33, 10, 14, 237, 32, 10, 14, 237, 31, 10, 14,
- 237, 30, 10, 14, 237, 29, 10, 14, 237, 28, 10, 14, 237, 27, 10, 14, 237,
- 26, 10, 14, 237, 25, 10, 14, 237, 24, 10, 14, 237, 23, 10, 14, 237, 22,
- 10, 14, 237, 21, 10, 14, 237, 20, 10, 14, 237, 19, 10, 14, 237, 18, 10,
- 14, 237, 17, 10, 14, 237, 16, 10, 14, 237, 15, 10, 14, 237, 14, 10, 14,
- 237, 13, 10, 14, 237, 12, 10, 14, 237, 11, 10, 14, 237, 10, 10, 14, 237,
- 9, 10, 14, 237, 8, 10, 14, 237, 7, 10, 14, 237, 6, 10, 14, 237, 5, 10,
- 14, 237, 4, 10, 14, 237, 3, 10, 14, 237, 2, 10, 14, 237, 1, 10, 14, 237,
- 0, 10, 14, 236, 255, 10, 14, 236, 254, 10, 14, 236, 253, 10, 14, 236,
- 252, 10, 14, 236, 251, 10, 14, 236, 250, 10, 14, 236, 249, 10, 14, 236,
- 248, 10, 14, 236, 247, 10, 14, 236, 246, 10, 14, 236, 245, 10, 14, 236,
- 244, 10, 14, 236, 243, 10, 14, 236, 242, 10, 14, 236, 241, 10, 14, 236,
- 240, 10, 14, 236, 239, 10, 14, 236, 238, 10, 14, 236, 237, 10, 14, 236,
- 236, 10, 14, 236, 235, 10, 14, 236, 234, 10, 14, 236, 233, 10, 14, 236,
- 232, 10, 14, 236, 231, 10, 14, 236, 230, 10, 14, 236, 229, 10, 14, 236,
- 228, 10, 14, 236, 227, 10, 14, 236, 226, 10, 14, 236, 225, 10, 14, 236,
- 224, 10, 14, 236, 223, 10, 14, 236, 222, 10, 14, 236, 221, 10, 14, 236,
- 220, 10, 14, 236, 219, 10, 14, 236, 218, 10, 14, 236, 217, 10, 14, 236,
- 216, 10, 14, 236, 215, 10, 14, 236, 214, 10, 14, 236, 213, 10, 14, 236,
- 212, 10, 14, 236, 211, 10, 14, 236, 210, 10, 14, 236, 209, 10, 14, 236,
- 208, 10, 14, 236, 207, 10, 14, 236, 206, 10, 14, 236, 205, 10, 14, 236,
- 204, 10, 14, 236, 203, 10, 14, 236, 202, 10, 14, 236, 201, 10, 14, 236,
- 200, 10, 14, 236, 199, 10, 14, 236, 198, 10, 14, 236, 197, 10, 14, 236,
- 196, 10, 14, 236, 195, 10, 14, 236, 194, 10, 14, 236, 193, 10, 14, 236,
- 192, 10, 14, 236, 191, 10, 14, 236, 190, 10, 14, 236, 189, 10, 14, 236,
- 188, 10, 14, 236, 187, 10, 14, 236, 186, 10, 14, 236, 185, 10, 14, 236,
- 184, 10, 14, 236, 183, 10, 14, 236, 182, 10, 14, 236, 181, 10, 14, 236,
- 180, 10, 14, 236, 179, 10, 14, 236, 178, 10, 14, 236, 177, 10, 14, 236,
- 176, 10, 14, 236, 175, 10, 14, 236, 174, 10, 14, 236, 173, 10, 14, 236,
- 172, 10, 14, 236, 171, 10, 14, 236, 170, 10, 14, 236, 169, 10, 14, 236,
- 168, 10, 14, 236, 167, 10, 14, 236, 166, 10, 14, 236, 165, 10, 14, 236,
- 164, 10, 14, 236, 163, 10, 14, 236, 162, 10, 14, 236, 161, 10, 14, 236,
- 160, 10, 14, 236, 159, 10, 14, 236, 158, 10, 14, 236, 157, 10, 14, 236,
- 156, 10, 14, 236, 155, 10, 14, 236, 154, 10, 14, 236, 153, 10, 14, 236,
- 152, 10, 14, 236, 151, 10, 14, 236, 150, 10, 14, 236, 149, 10, 14, 236,
- 148, 10, 14, 236, 147, 10, 14, 236, 146, 10, 14, 236, 145, 10, 14, 236,
- 144, 10, 14, 236, 143, 10, 14, 236, 142, 10, 14, 236, 141, 10, 14, 236,
- 140, 10, 14, 236, 139, 10, 14, 236, 138, 10, 14, 236, 137, 10, 14, 236,
- 136, 10, 14, 236, 135, 10, 14, 236, 134, 10, 14, 236, 133, 10, 14, 236,
- 132, 10, 14, 236, 131, 10, 14, 236, 130, 10, 14, 236, 129, 10, 14, 236,
- 128, 10, 14, 236, 127, 10, 14, 236, 126, 10, 14, 236, 125, 10, 14, 236,
- 124, 10, 14, 236, 123, 10, 14, 236, 122, 10, 14, 236, 121, 10, 14, 236,
- 120, 10, 14, 236, 119, 10, 14, 236, 118, 10, 14, 236, 117, 10, 14, 236,
- 116, 10, 14, 236, 115, 10, 14, 236, 114, 10, 14, 236, 113, 10, 14, 236,
- 112, 10, 14, 236, 111, 10, 14, 236, 110, 10, 14, 236, 109, 10, 14, 236,
- 108, 10, 14, 236, 107, 10, 14, 236, 106, 10, 14, 236, 105, 10, 14, 236,
- 104, 10, 14, 236, 103, 10, 14, 236, 102, 10, 14, 236, 101, 10, 14, 236,
- 100, 10, 14, 236, 99, 10, 14, 236, 98, 10, 14, 236, 97, 10, 14, 236, 96,
- 10, 14, 236, 95, 10, 14, 236, 94, 10, 14, 236, 93, 10, 14, 236, 92, 10,
- 14, 236, 91, 10, 14, 236, 90, 10, 14, 236, 89, 10, 14, 236, 88, 10, 14,
- 236, 87, 10, 14, 236, 86, 10, 14, 236, 85, 10, 14, 236, 84, 10, 14, 236,
- 83, 10, 14, 236, 82, 10, 14, 236, 81, 10, 14, 236, 80, 10, 14, 236, 79,
- 10, 14, 236, 78, 10, 14, 236, 77, 10, 14, 236, 76, 10, 14, 236, 75, 10,
- 14, 236, 74, 10, 14, 236, 73, 10, 14, 236, 72, 7, 4, 27, 244, 133, 7, 4,
- 27, 244, 129, 7, 4, 27, 244, 84, 7, 4, 27, 244, 132, 7, 4, 27, 244, 131,
- 7, 4, 27, 200, 222, 94, 217, 153, 7, 4, 27, 218, 170, 150, 4, 27, 231,
- 64, 228, 44, 150, 4, 27, 231, 64, 245, 221, 150, 4, 27, 231, 64, 235,
- 234, 150, 4, 27, 213, 180, 228, 44, 150, 4, 27, 231, 64, 211, 160, 94, 1,
- 210, 234, 2, 241, 165, 94, 225, 14, 235, 56, 214, 11, 94, 27, 211, 6,
- 210, 234, 210, 234, 225, 243, 94, 1, 254, 147, 253, 170, 94, 1, 211, 247,
- 254, 179, 94, 1, 211, 247, 248, 197, 94, 1, 211, 247, 241, 245, 94, 1,
- 211, 247, 235, 0, 94, 1, 211, 247, 233, 100, 94, 1, 211, 247, 40, 231,
- 70, 94, 1, 211, 247, 223, 70, 94, 1, 211, 247, 217, 39, 94, 1, 254, 147,
- 96, 50, 94, 1, 220, 23, 2, 220, 23, 247, 128, 94, 1, 220, 23, 2, 219,
- 161, 247, 128, 94, 1, 220, 23, 2, 248, 216, 22, 220, 23, 247, 128, 94, 1,
- 220, 23, 2, 248, 216, 22, 219, 161, 247, 128, 94, 1, 109, 2, 225, 243,
- 94, 1, 109, 2, 224, 79, 94, 1, 109, 2, 231, 176, 94, 1, 252, 37, 2, 248,
- 215, 94, 1, 242, 209, 2, 248, 215, 94, 1, 248, 198, 2, 248, 215, 94, 1,
- 241, 246, 2, 231, 176, 94, 1, 214, 4, 2, 248, 215, 94, 1, 210, 98, 2,
- 248, 215, 94, 1, 216, 232, 2, 248, 215, 94, 1, 210, 234, 2, 248, 215, 94,
- 1, 40, 235, 1, 2, 248, 215, 94, 1, 235, 1, 2, 248, 215, 94, 1, 233, 101,
- 2, 248, 215, 94, 1, 231, 71, 2, 248, 215, 94, 1, 227, 199, 2, 248, 215,
- 94, 1, 221, 252, 2, 248, 215, 94, 1, 40, 225, 225, 2, 248, 215, 94, 1,
- 225, 225, 2, 248, 215, 94, 1, 215, 181, 2, 248, 215, 94, 1, 224, 43, 2,
- 248, 215, 94, 1, 223, 71, 2, 248, 215, 94, 1, 220, 23, 2, 248, 215, 94,
- 1, 217, 40, 2, 248, 215, 94, 1, 214, 4, 2, 241, 68, 94, 1, 252, 37, 2,
- 223, 172, 94, 1, 235, 1, 2, 223, 172, 94, 1, 225, 225, 2, 223, 172, 94,
- 27, 109, 233, 100, 9, 1, 109, 212, 47, 53, 17, 9, 1, 109, 212, 47, 40,
- 17, 9, 1, 252, 73, 53, 17, 9, 1, 252, 73, 40, 17, 9, 1, 252, 73, 65, 17,
- 9, 1, 252, 73, 147, 17, 9, 1, 225, 209, 53, 17, 9, 1, 225, 209, 40, 17,
- 9, 1, 225, 209, 65, 17, 9, 1, 225, 209, 147, 17, 9, 1, 252, 61, 53, 17,
- 9, 1, 252, 61, 40, 17, 9, 1, 252, 61, 65, 17, 9, 1, 252, 61, 147, 17, 9,
- 1, 215, 148, 53, 17, 9, 1, 215, 148, 40, 17, 9, 1, 215, 148, 65, 17, 9,
- 1, 215, 148, 147, 17, 9, 1, 217, 7, 53, 17, 9, 1, 217, 7, 40, 17, 9, 1,
- 217, 7, 65, 17, 9, 1, 217, 7, 147, 17, 9, 1, 215, 150, 53, 17, 9, 1, 215,
- 150, 40, 17, 9, 1, 215, 150, 65, 17, 9, 1, 215, 150, 147, 17, 9, 1, 213,
- 249, 53, 17, 9, 1, 213, 249, 40, 17, 9, 1, 213, 249, 65, 17, 9, 1, 213,
- 249, 147, 17, 9, 1, 225, 207, 53, 17, 9, 1, 225, 207, 40, 17, 9, 1, 225,
- 207, 65, 17, 9, 1, 225, 207, 147, 17, 9, 1, 246, 52, 53, 17, 9, 1, 246,
- 52, 40, 17, 9, 1, 246, 52, 65, 17, 9, 1, 246, 52, 147, 17, 9, 1, 227,
- 158, 53, 17, 9, 1, 227, 158, 40, 17, 9, 1, 227, 158, 65, 17, 9, 1, 227,
- 158, 147, 17, 9, 1, 217, 28, 53, 17, 9, 1, 217, 28, 40, 17, 9, 1, 217,
- 28, 65, 17, 9, 1, 217, 28, 147, 17, 9, 1, 217, 26, 53, 17, 9, 1, 217, 26,
- 40, 17, 9, 1, 217, 26, 65, 17, 9, 1, 217, 26, 147, 17, 9, 1, 248, 141,
- 53, 17, 9, 1, 248, 141, 40, 17, 9, 1, 248, 210, 53, 17, 9, 1, 248, 210,
- 40, 17, 9, 1, 246, 79, 53, 17, 9, 1, 246, 79, 40, 17, 9, 1, 248, 139, 53,
- 17, 9, 1, 248, 139, 40, 17, 9, 1, 235, 127, 53, 17, 9, 1, 235, 127, 40,
- 17, 9, 1, 222, 174, 53, 17, 9, 1, 222, 174, 40, 17, 9, 1, 234, 181, 53,
- 17, 9, 1, 234, 181, 40, 17, 9, 1, 234, 181, 65, 17, 9, 1, 234, 181, 147,
- 17, 9, 1, 243, 130, 53, 17, 9, 1, 243, 130, 40, 17, 9, 1, 243, 130, 65,
- 17, 9, 1, 243, 130, 147, 17, 9, 1, 242, 109, 53, 17, 9, 1, 242, 109, 40,
- 17, 9, 1, 242, 109, 65, 17, 9, 1, 242, 109, 147, 17, 9, 1, 229, 8, 53,
- 17, 9, 1, 229, 8, 40, 17, 9, 1, 229, 8, 65, 17, 9, 1, 229, 8, 147, 17, 9,
- 1, 228, 68, 242, 226, 53, 17, 9, 1, 228, 68, 242, 226, 40, 17, 9, 1, 222,
- 217, 53, 17, 9, 1, 222, 217, 40, 17, 9, 1, 222, 217, 65, 17, 9, 1, 222,
- 217, 147, 17, 9, 1, 241, 226, 2, 77, 72, 53, 17, 9, 1, 241, 226, 2, 77,
- 72, 40, 17, 9, 1, 241, 226, 242, 179, 53, 17, 9, 1, 241, 226, 242, 179,
- 40, 17, 9, 1, 241, 226, 242, 179, 65, 17, 9, 1, 241, 226, 242, 179, 147,
- 17, 9, 1, 241, 226, 247, 150, 53, 17, 9, 1, 241, 226, 247, 150, 40, 17,
- 9, 1, 241, 226, 247, 150, 65, 17, 9, 1, 241, 226, 247, 150, 147, 17, 9,
- 1, 77, 252, 141, 53, 17, 9, 1, 77, 252, 141, 40, 17, 9, 1, 77, 252, 141,
- 2, 182, 72, 53, 17, 9, 1, 77, 252, 141, 2, 182, 72, 40, 17, 9, 16, 59,
- 48, 9, 16, 59, 51, 9, 16, 113, 170, 48, 9, 16, 113, 170, 51, 9, 16, 134,
- 170, 48, 9, 16, 134, 170, 51, 9, 16, 134, 170, 225, 10, 246, 112, 48, 9,
- 16, 134, 170, 225, 10, 246, 112, 51, 9, 16, 244, 19, 170, 48, 9, 16, 244,
- 19, 170, 51, 9, 16, 52, 67, 252, 149, 51, 9, 16, 113, 170, 213, 189, 48,
- 9, 16, 113, 170, 213, 189, 51, 9, 16, 222, 236, 9, 16, 4, 217, 82, 48, 9,
- 16, 4, 217, 82, 51, 9, 1, 229, 85, 53, 17, 9, 1, 229, 85, 40, 17, 9, 1,
- 229, 85, 65, 17, 9, 1, 229, 85, 147, 17, 9, 1, 104, 53, 17, 9, 1, 104,
- 40, 17, 9, 1, 226, 239, 53, 17, 9, 1, 226, 239, 40, 17, 9, 1, 210, 213,
- 53, 17, 9, 1, 210, 213, 40, 17, 9, 1, 104, 2, 182, 72, 53, 17, 9, 1, 214,
- 0, 53, 17, 9, 1, 214, 0, 40, 17, 9, 1, 234, 79, 226, 239, 53, 17, 9, 1,
- 234, 79, 226, 239, 40, 17, 9, 1, 234, 79, 210, 213, 53, 17, 9, 1, 234,
- 79, 210, 213, 40, 17, 9, 1, 160, 53, 17, 9, 1, 160, 40, 17, 9, 1, 160,
- 65, 17, 9, 1, 160, 147, 17, 9, 1, 214, 207, 234, 192, 234, 79, 109, 231,
- 198, 65, 17, 9, 1, 214, 207, 234, 192, 234, 79, 109, 231, 198, 147, 17,
- 9, 27, 77, 2, 182, 72, 2, 109, 53, 17, 9, 27, 77, 2, 182, 72, 2, 109, 40,
- 17, 9, 27, 77, 2, 182, 72, 2, 254, 253, 53, 17, 9, 27, 77, 2, 182, 72, 2,
- 254, 253, 40, 17, 9, 27, 77, 2, 182, 72, 2, 212, 31, 53, 17, 9, 27, 77,
- 2, 182, 72, 2, 212, 31, 40, 17, 9, 27, 77, 2, 182, 72, 2, 104, 53, 17, 9,
- 27, 77, 2, 182, 72, 2, 104, 40, 17, 9, 27, 77, 2, 182, 72, 2, 226, 239,
- 53, 17, 9, 27, 77, 2, 182, 72, 2, 226, 239, 40, 17, 9, 27, 77, 2, 182,
- 72, 2, 210, 213, 53, 17, 9, 27, 77, 2, 182, 72, 2, 210, 213, 40, 17, 9,
- 27, 77, 2, 182, 72, 2, 160, 53, 17, 9, 27, 77, 2, 182, 72, 2, 160, 40,
- 17, 9, 27, 77, 2, 182, 72, 2, 160, 65, 17, 9, 27, 214, 207, 234, 79, 77,
- 2, 182, 72, 2, 109, 231, 198, 53, 17, 9, 27, 214, 207, 234, 79, 77, 2,
- 182, 72, 2, 109, 231, 198, 40, 17, 9, 27, 214, 207, 234, 79, 77, 2, 182,
- 72, 2, 109, 231, 198, 65, 17, 9, 1, 244, 176, 77, 53, 17, 9, 1, 244, 176,
- 77, 40, 17, 9, 1, 244, 176, 77, 65, 17, 9, 1, 244, 176, 77, 147, 17, 9,
- 27, 77, 2, 182, 72, 2, 151, 53, 17, 9, 27, 77, 2, 182, 72, 2, 122, 53,
- 17, 9, 27, 77, 2, 182, 72, 2, 66, 53, 17, 9, 27, 77, 2, 182, 72, 2, 109,
- 231, 198, 53, 17, 9, 27, 77, 2, 182, 72, 2, 77, 53, 17, 9, 27, 252, 63,
- 2, 151, 53, 17, 9, 27, 252, 63, 2, 122, 53, 17, 9, 27, 252, 63, 2, 234,
- 136, 53, 17, 9, 27, 252, 63, 2, 66, 53, 17, 9, 27, 252, 63, 2, 109, 231,
- 198, 53, 17, 9, 27, 252, 63, 2, 77, 53, 17, 9, 27, 217, 9, 2, 151, 53,
- 17, 9, 27, 217, 9, 2, 122, 53, 17, 9, 27, 217, 9, 2, 234, 136, 53, 17, 9,
- 27, 217, 9, 2, 66, 53, 17, 9, 27, 217, 9, 2, 109, 231, 198, 53, 17, 9,
- 27, 217, 9, 2, 77, 53, 17, 9, 27, 216, 194, 2, 151, 53, 17, 9, 27, 216,
- 194, 2, 66, 53, 17, 9, 27, 216, 194, 2, 109, 231, 198, 53, 17, 9, 27,
- 216, 194, 2, 77, 53, 17, 9, 27, 151, 2, 122, 53, 17, 9, 27, 151, 2, 66,
- 53, 17, 9, 27, 122, 2, 151, 53, 17, 9, 27, 122, 2, 66, 53, 17, 9, 27,
- 234, 136, 2, 151, 53, 17, 9, 27, 234, 136, 2, 122, 53, 17, 9, 27, 234,
- 136, 2, 66, 53, 17, 9, 27, 221, 169, 2, 151, 53, 17, 9, 27, 221, 169, 2,
- 122, 53, 17, 9, 27, 221, 169, 2, 234, 136, 53, 17, 9, 27, 221, 169, 2,
- 66, 53, 17, 9, 27, 222, 29, 2, 122, 53, 17, 9, 27, 222, 29, 2, 66, 53,
- 17, 9, 27, 248, 225, 2, 151, 53, 17, 9, 27, 248, 225, 2, 122, 53, 17, 9,
- 27, 248, 225, 2, 234, 136, 53, 17, 9, 27, 248, 225, 2, 66, 53, 17, 9, 27,
- 217, 82, 2, 122, 53, 17, 9, 27, 217, 82, 2, 66, 53, 17, 9, 27, 210, 112,
- 2, 66, 53, 17, 9, 27, 254, 206, 2, 151, 53, 17, 9, 27, 254, 206, 2, 66,
- 53, 17, 9, 27, 242, 252, 2, 151, 53, 17, 9, 27, 242, 252, 2, 66, 53, 17,
- 9, 27, 244, 151, 2, 151, 53, 17, 9, 27, 244, 151, 2, 122, 53, 17, 9, 27,
- 244, 151, 2, 234, 136, 53, 17, 9, 27, 244, 151, 2, 66, 53, 17, 9, 27,
- 244, 151, 2, 109, 231, 198, 53, 17, 9, 27, 244, 151, 2, 77, 53, 17, 9,
- 27, 224, 85, 2, 122, 53, 17, 9, 27, 224, 85, 2, 66, 53, 17, 9, 27, 224,
- 85, 2, 109, 231, 198, 53, 17, 9, 27, 224, 85, 2, 77, 53, 17, 9, 27, 235,
- 1, 2, 109, 53, 17, 9, 27, 235, 1, 2, 151, 53, 17, 9, 27, 235, 1, 2, 122,
- 53, 17, 9, 27, 235, 1, 2, 234, 136, 53, 17, 9, 27, 235, 1, 2, 233, 109,
- 53, 17, 9, 27, 235, 1, 2, 66, 53, 17, 9, 27, 235, 1, 2, 109, 231, 198,
- 53, 17, 9, 27, 235, 1, 2, 77, 53, 17, 9, 27, 233, 109, 2, 151, 53, 17, 9,
- 27, 233, 109, 2, 122, 53, 17, 9, 27, 233, 109, 2, 234, 136, 53, 17, 9,
- 27, 233, 109, 2, 66, 53, 17, 9, 27, 233, 109, 2, 109, 231, 198, 53, 17,
- 9, 27, 233, 109, 2, 77, 53, 17, 9, 27, 66, 2, 151, 53, 17, 9, 27, 66, 2,
- 122, 53, 17, 9, 27, 66, 2, 234, 136, 53, 17, 9, 27, 66, 2, 66, 53, 17, 9,
- 27, 66, 2, 109, 231, 198, 53, 17, 9, 27, 66, 2, 77, 53, 17, 9, 27, 228,
- 68, 2, 151, 53, 17, 9, 27, 228, 68, 2, 122, 53, 17, 9, 27, 228, 68, 2,
- 234, 136, 53, 17, 9, 27, 228, 68, 2, 66, 53, 17, 9, 27, 228, 68, 2, 109,
- 231, 198, 53, 17, 9, 27, 228, 68, 2, 77, 53, 17, 9, 27, 241, 226, 2, 151,
- 53, 17, 9, 27, 241, 226, 2, 66, 53, 17, 9, 27, 241, 226, 2, 109, 231,
- 198, 53, 17, 9, 27, 241, 226, 2, 77, 53, 17, 9, 27, 77, 2, 151, 53, 17,
- 9, 27, 77, 2, 122, 53, 17, 9, 27, 77, 2, 234, 136, 53, 17, 9, 27, 77, 2,
- 66, 53, 17, 9, 27, 77, 2, 109, 231, 198, 53, 17, 9, 27, 77, 2, 77, 53,
- 17, 9, 27, 216, 204, 2, 218, 24, 109, 53, 17, 9, 27, 223, 99, 2, 218, 24,
- 109, 53, 17, 9, 27, 109, 231, 198, 2, 218, 24, 109, 53, 17, 9, 27, 220,
- 96, 2, 248, 191, 53, 17, 9, 27, 220, 96, 2, 234, 210, 53, 17, 9, 27, 220,
- 96, 2, 244, 174, 53, 17, 9, 27, 220, 96, 2, 248, 193, 53, 17, 9, 27, 220,
- 96, 2, 234, 212, 53, 17, 9, 27, 220, 96, 2, 218, 24, 109, 53, 17, 9, 27,
- 77, 2, 182, 72, 2, 223, 99, 40, 17, 9, 27, 77, 2, 182, 72, 2, 210, 109,
- 40, 17, 9, 27, 77, 2, 182, 72, 2, 66, 40, 17, 9, 27, 77, 2, 182, 72, 2,
- 228, 68, 40, 17, 9, 27, 77, 2, 182, 72, 2, 109, 231, 198, 40, 17, 9, 27,
- 77, 2, 182, 72, 2, 77, 40, 17, 9, 27, 252, 63, 2, 223, 99, 40, 17, 9, 27,
- 252, 63, 2, 210, 109, 40, 17, 9, 27, 252, 63, 2, 66, 40, 17, 9, 27, 252,
- 63, 2, 228, 68, 40, 17, 9, 27, 252, 63, 2, 109, 231, 198, 40, 17, 9, 27,
- 252, 63, 2, 77, 40, 17, 9, 27, 217, 9, 2, 223, 99, 40, 17, 9, 27, 217, 9,
- 2, 210, 109, 40, 17, 9, 27, 217, 9, 2, 66, 40, 17, 9, 27, 217, 9, 2, 228,
- 68, 40, 17, 9, 27, 217, 9, 2, 109, 231, 198, 40, 17, 9, 27, 217, 9, 2,
- 77, 40, 17, 9, 27, 216, 194, 2, 223, 99, 40, 17, 9, 27, 216, 194, 2, 210,
- 109, 40, 17, 9, 27, 216, 194, 2, 66, 40, 17, 9, 27, 216, 194, 2, 228, 68,
- 40, 17, 9, 27, 216, 194, 2, 109, 231, 198, 40, 17, 9, 27, 216, 194, 2,
- 77, 40, 17, 9, 27, 244, 151, 2, 109, 231, 198, 40, 17, 9, 27, 244, 151,
- 2, 77, 40, 17, 9, 27, 224, 85, 2, 109, 231, 198, 40, 17, 9, 27, 224, 85,
- 2, 77, 40, 17, 9, 27, 235, 1, 2, 109, 40, 17, 9, 27, 235, 1, 2, 233, 109,
- 40, 17, 9, 27, 235, 1, 2, 66, 40, 17, 9, 27, 235, 1, 2, 109, 231, 198,
- 40, 17, 9, 27, 235, 1, 2, 77, 40, 17, 9, 27, 233, 109, 2, 66, 40, 17, 9,
- 27, 233, 109, 2, 109, 231, 198, 40, 17, 9, 27, 233, 109, 2, 77, 40, 17,
- 9, 27, 66, 2, 109, 40, 17, 9, 27, 66, 2, 66, 40, 17, 9, 27, 228, 68, 2,
- 223, 99, 40, 17, 9, 27, 228, 68, 2, 210, 109, 40, 17, 9, 27, 228, 68, 2,
- 66, 40, 17, 9, 27, 228, 68, 2, 228, 68, 40, 17, 9, 27, 228, 68, 2, 109,
- 231, 198, 40, 17, 9, 27, 228, 68, 2, 77, 40, 17, 9, 27, 109, 231, 198, 2,
- 218, 24, 109, 40, 17, 9, 27, 77, 2, 223, 99, 40, 17, 9, 27, 77, 2, 210,
- 109, 40, 17, 9, 27, 77, 2, 66, 40, 17, 9, 27, 77, 2, 228, 68, 40, 17, 9,
- 27, 77, 2, 109, 231, 198, 40, 17, 9, 27, 77, 2, 77, 40, 17, 9, 27, 77, 2,
- 182, 72, 2, 151, 65, 17, 9, 27, 77, 2, 182, 72, 2, 122, 65, 17, 9, 27,
- 77, 2, 182, 72, 2, 234, 136, 65, 17, 9, 27, 77, 2, 182, 72, 2, 66, 65,
- 17, 9, 27, 77, 2, 182, 72, 2, 241, 226, 65, 17, 9, 27, 252, 63, 2, 151,
- 65, 17, 9, 27, 252, 63, 2, 122, 65, 17, 9, 27, 252, 63, 2, 234, 136, 65,
- 17, 9, 27, 252, 63, 2, 66, 65, 17, 9, 27, 252, 63, 2, 241, 226, 65, 17,
- 9, 27, 217, 9, 2, 151, 65, 17, 9, 27, 217, 9, 2, 122, 65, 17, 9, 27, 217,
- 9, 2, 234, 136, 65, 17, 9, 27, 217, 9, 2, 66, 65, 17, 9, 27, 217, 9, 2,
- 241, 226, 65, 17, 9, 27, 216, 194, 2, 66, 65, 17, 9, 27, 151, 2, 122, 65,
- 17, 9, 27, 151, 2, 66, 65, 17, 9, 27, 122, 2, 151, 65, 17, 9, 27, 122, 2,
- 66, 65, 17, 9, 27, 234, 136, 2, 151, 65, 17, 9, 27, 234, 136, 2, 66, 65,
- 17, 9, 27, 221, 169, 2, 151, 65, 17, 9, 27, 221, 169, 2, 122, 65, 17, 9,
- 27, 221, 169, 2, 234, 136, 65, 17, 9, 27, 221, 169, 2, 66, 65, 17, 9, 27,
- 222, 29, 2, 122, 65, 17, 9, 27, 222, 29, 2, 234, 136, 65, 17, 9, 27, 222,
- 29, 2, 66, 65, 17, 9, 27, 248, 225, 2, 151, 65, 17, 9, 27, 248, 225, 2,
- 122, 65, 17, 9, 27, 248, 225, 2, 234, 136, 65, 17, 9, 27, 248, 225, 2,
- 66, 65, 17, 9, 27, 217, 82, 2, 122, 65, 17, 9, 27, 210, 112, 2, 66, 65,
- 17, 9, 27, 254, 206, 2, 151, 65, 17, 9, 27, 254, 206, 2, 66, 65, 17, 9,
- 27, 242, 252, 2, 151, 65, 17, 9, 27, 242, 252, 2, 66, 65, 17, 9, 27, 244,
- 151, 2, 151, 65, 17, 9, 27, 244, 151, 2, 122, 65, 17, 9, 27, 244, 151, 2,
- 234, 136, 65, 17, 9, 27, 244, 151, 2, 66, 65, 17, 9, 27, 224, 85, 2, 122,
- 65, 17, 9, 27, 224, 85, 2, 66, 65, 17, 9, 27, 235, 1, 2, 151, 65, 17, 9,
- 27, 235, 1, 2, 122, 65, 17, 9, 27, 235, 1, 2, 234, 136, 65, 17, 9, 27,
- 235, 1, 2, 233, 109, 65, 17, 9, 27, 235, 1, 2, 66, 65, 17, 9, 27, 233,
- 109, 2, 151, 65, 17, 9, 27, 233, 109, 2, 122, 65, 17, 9, 27, 233, 109, 2,
- 234, 136, 65, 17, 9, 27, 233, 109, 2, 66, 65, 17, 9, 27, 233, 109, 2,
- 241, 226, 65, 17, 9, 27, 66, 2, 151, 65, 17, 9, 27, 66, 2, 122, 65, 17,
- 9, 27, 66, 2, 234, 136, 65, 17, 9, 27, 66, 2, 66, 65, 17, 9, 27, 228, 68,
- 2, 151, 65, 17, 9, 27, 228, 68, 2, 122, 65, 17, 9, 27, 228, 68, 2, 234,
- 136, 65, 17, 9, 27, 228, 68, 2, 66, 65, 17, 9, 27, 228, 68, 2, 241, 226,
- 65, 17, 9, 27, 241, 226, 2, 151, 65, 17, 9, 27, 241, 226, 2, 66, 65, 17,
- 9, 27, 241, 226, 2, 218, 24, 109, 65, 17, 9, 27, 77, 2, 151, 65, 17, 9,
- 27, 77, 2, 122, 65, 17, 9, 27, 77, 2, 234, 136, 65, 17, 9, 27, 77, 2, 66,
- 65, 17, 9, 27, 77, 2, 241, 226, 65, 17, 9, 27, 77, 2, 182, 72, 2, 66,
- 147, 17, 9, 27, 77, 2, 182, 72, 2, 241, 226, 147, 17, 9, 27, 252, 63, 2,
- 66, 147, 17, 9, 27, 252, 63, 2, 241, 226, 147, 17, 9, 27, 217, 9, 2, 66,
- 147, 17, 9, 27, 217, 9, 2, 241, 226, 147, 17, 9, 27, 216, 194, 2, 66,
- 147, 17, 9, 27, 216, 194, 2, 241, 226, 147, 17, 9, 27, 221, 169, 2, 66,
- 147, 17, 9, 27, 221, 169, 2, 241, 226, 147, 17, 9, 27, 220, 62, 2, 66,
- 147, 17, 9, 27, 220, 62, 2, 241, 226, 147, 17, 9, 27, 235, 1, 2, 233,
- 109, 147, 17, 9, 27, 235, 1, 2, 66, 147, 17, 9, 27, 233, 109, 2, 66, 147,
- 17, 9, 27, 228, 68, 2, 66, 147, 17, 9, 27, 228, 68, 2, 241, 226, 147, 17,
- 9, 27, 77, 2, 66, 147, 17, 9, 27, 77, 2, 241, 226, 147, 17, 9, 27, 220,
- 96, 2, 244, 174, 147, 17, 9, 27, 220, 96, 2, 248, 193, 147, 17, 9, 27,
- 220, 96, 2, 234, 212, 147, 17, 9, 27, 217, 82, 2, 109, 231, 198, 53, 17,
- 9, 27, 217, 82, 2, 77, 53, 17, 9, 27, 254, 206, 2, 109, 231, 198, 53, 17,
- 9, 27, 254, 206, 2, 77, 53, 17, 9, 27, 242, 252, 2, 109, 231, 198, 53,
- 17, 9, 27, 242, 252, 2, 77, 53, 17, 9, 27, 221, 169, 2, 109, 231, 198,
- 53, 17, 9, 27, 221, 169, 2, 77, 53, 17, 9, 27, 220, 62, 2, 109, 231, 198,
- 53, 17, 9, 27, 220, 62, 2, 77, 53, 17, 9, 27, 122, 2, 109, 231, 198, 53,
- 17, 9, 27, 122, 2, 77, 53, 17, 9, 27, 151, 2, 109, 231, 198, 53, 17, 9,
- 27, 151, 2, 77, 53, 17, 9, 27, 234, 136, 2, 109, 231, 198, 53, 17, 9, 27,
- 234, 136, 2, 77, 53, 17, 9, 27, 222, 29, 2, 109, 231, 198, 53, 17, 9, 27,
- 222, 29, 2, 77, 53, 17, 9, 27, 248, 225, 2, 109, 231, 198, 53, 17, 9, 27,
- 248, 225, 2, 77, 53, 17, 9, 27, 220, 62, 2, 151, 53, 17, 9, 27, 220, 62,
- 2, 122, 53, 17, 9, 27, 220, 62, 2, 234, 136, 53, 17, 9, 27, 220, 62, 2,
- 66, 53, 17, 9, 27, 220, 62, 2, 223, 99, 53, 17, 9, 27, 221, 169, 2, 223,
- 99, 53, 17, 9, 27, 222, 29, 2, 223, 99, 53, 17, 9, 27, 248, 225, 2, 223,
- 99, 53, 17, 9, 27, 217, 82, 2, 109, 231, 198, 40, 17, 9, 27, 217, 82, 2,
- 77, 40, 17, 9, 27, 254, 206, 2, 109, 231, 198, 40, 17, 9, 27, 254, 206,
- 2, 77, 40, 17, 9, 27, 242, 252, 2, 109, 231, 198, 40, 17, 9, 27, 242,
- 252, 2, 77, 40, 17, 9, 27, 221, 169, 2, 109, 231, 198, 40, 17, 9, 27,
- 221, 169, 2, 77, 40, 17, 9, 27, 220, 62, 2, 109, 231, 198, 40, 17, 9, 27,
- 220, 62, 2, 77, 40, 17, 9, 27, 122, 2, 109, 231, 198, 40, 17, 9, 27, 122,
- 2, 77, 40, 17, 9, 27, 151, 2, 109, 231, 198, 40, 17, 9, 27, 151, 2, 77,
- 40, 17, 9, 27, 234, 136, 2, 109, 231, 198, 40, 17, 9, 27, 234, 136, 2,
- 77, 40, 17, 9, 27, 222, 29, 2, 109, 231, 198, 40, 17, 9, 27, 222, 29, 2,
- 77, 40, 17, 9, 27, 248, 225, 2, 109, 231, 198, 40, 17, 9, 27, 248, 225,
- 2, 77, 40, 17, 9, 27, 220, 62, 2, 151, 40, 17, 9, 27, 220, 62, 2, 122,
- 40, 17, 9, 27, 220, 62, 2, 234, 136, 40, 17, 9, 27, 220, 62, 2, 66, 40,
- 17, 9, 27, 220, 62, 2, 223, 99, 40, 17, 9, 27, 221, 169, 2, 223, 99, 40,
- 17, 9, 27, 222, 29, 2, 223, 99, 40, 17, 9, 27, 248, 225, 2, 223, 99, 40,
- 17, 9, 27, 220, 62, 2, 151, 65, 17, 9, 27, 220, 62, 2, 122, 65, 17, 9,
- 27, 220, 62, 2, 234, 136, 65, 17, 9, 27, 220, 62, 2, 66, 65, 17, 9, 27,
- 221, 169, 2, 241, 226, 65, 17, 9, 27, 220, 62, 2, 241, 226, 65, 17, 9,
- 27, 217, 82, 2, 66, 65, 17, 9, 27, 221, 169, 2, 151, 147, 17, 9, 27, 221,
- 169, 2, 122, 147, 17, 9, 27, 221, 169, 2, 234, 136, 147, 17, 9, 27, 220,
- 62, 2, 151, 147, 17, 9, 27, 220, 62, 2, 122, 147, 17, 9, 27, 220, 62, 2,
- 234, 136, 147, 17, 9, 27, 217, 82, 2, 66, 147, 17, 9, 27, 210, 112, 2,
- 66, 147, 17, 9, 27, 109, 2, 244, 172, 40, 17, 9, 27, 109, 2, 244, 172,
- 53, 17, 226, 150, 43, 226, 7, 226, 150, 44, 226, 7, 9, 27, 217, 9, 2,
- 151, 2, 66, 65, 17, 9, 27, 217, 9, 2, 122, 2, 151, 40, 17, 9, 27, 217, 9,
- 2, 122, 2, 151, 65, 17, 9, 27, 217, 9, 2, 122, 2, 66, 65, 17, 9, 27, 217,
- 9, 2, 234, 136, 2, 66, 65, 17, 9, 27, 217, 9, 2, 66, 2, 151, 65, 17, 9,
- 27, 217, 9, 2, 66, 2, 122, 65, 17, 9, 27, 217, 9, 2, 66, 2, 234, 136, 65,
- 17, 9, 27, 151, 2, 66, 2, 122, 40, 17, 9, 27, 151, 2, 66, 2, 122, 65, 17,
- 9, 27, 122, 2, 66, 2, 77, 40, 17, 9, 27, 122, 2, 66, 2, 109, 231, 198,
- 40, 17, 9, 27, 221, 169, 2, 122, 2, 151, 65, 17, 9, 27, 221, 169, 2, 151,
- 2, 122, 65, 17, 9, 27, 221, 169, 2, 151, 2, 109, 231, 198, 40, 17, 9, 27,
- 221, 169, 2, 66, 2, 122, 40, 17, 9, 27, 221, 169, 2, 66, 2, 122, 65, 17,
- 9, 27, 221, 169, 2, 66, 2, 151, 65, 17, 9, 27, 221, 169, 2, 66, 2, 66,
- 40, 17, 9, 27, 221, 169, 2, 66, 2, 66, 65, 17, 9, 27, 222, 29, 2, 122, 2,
- 122, 40, 17, 9, 27, 222, 29, 2, 122, 2, 122, 65, 17, 9, 27, 222, 29, 2,
- 66, 2, 66, 40, 17, 9, 27, 220, 62, 2, 122, 2, 66, 40, 17, 9, 27, 220, 62,
- 2, 122, 2, 66, 65, 17, 9, 27, 220, 62, 2, 151, 2, 77, 40, 17, 9, 27, 220,
- 62, 2, 66, 2, 234, 136, 40, 17, 9, 27, 220, 62, 2, 66, 2, 234, 136, 65,
- 17, 9, 27, 220, 62, 2, 66, 2, 66, 40, 17, 9, 27, 220, 62, 2, 66, 2, 66,
- 65, 17, 9, 27, 248, 225, 2, 122, 2, 109, 231, 198, 40, 17, 9, 27, 248,
- 225, 2, 234, 136, 2, 66, 40, 17, 9, 27, 248, 225, 2, 234, 136, 2, 66, 65,
- 17, 9, 27, 217, 82, 2, 66, 2, 122, 40, 17, 9, 27, 217, 82, 2, 66, 2, 122,
- 65, 17, 9, 27, 217, 82, 2, 66, 2, 66, 65, 17, 9, 27, 217, 82, 2, 66, 2,
- 77, 40, 17, 9, 27, 254, 206, 2, 151, 2, 66, 40, 17, 9, 27, 254, 206, 2,
- 66, 2, 66, 40, 17, 9, 27, 254, 206, 2, 66, 2, 66, 65, 17, 9, 27, 254,
- 206, 2, 66, 2, 109, 231, 198, 40, 17, 9, 27, 242, 252, 2, 66, 2, 66, 40,
- 17, 9, 27, 242, 252, 2, 66, 2, 77, 40, 17, 9, 27, 242, 252, 2, 66, 2,
- 109, 231, 198, 40, 17, 9, 27, 244, 151, 2, 234, 136, 2, 66, 40, 17, 9,
- 27, 244, 151, 2, 234, 136, 2, 66, 65, 17, 9, 27, 224, 85, 2, 66, 2, 122,
- 40, 17, 9, 27, 224, 85, 2, 66, 2, 66, 40, 17, 9, 27, 233, 109, 2, 122, 2,
- 66, 40, 17, 9, 27, 233, 109, 2, 122, 2, 77, 40, 17, 9, 27, 233, 109, 2,
- 122, 2, 109, 231, 198, 40, 17, 9, 27, 233, 109, 2, 151, 2, 151, 65, 17,
- 9, 27, 233, 109, 2, 151, 2, 151, 40, 17, 9, 27, 233, 109, 2, 234, 136, 2,
- 66, 40, 17, 9, 27, 233, 109, 2, 234, 136, 2, 66, 65, 17, 9, 27, 233, 109,
- 2, 66, 2, 122, 40, 17, 9, 27, 233, 109, 2, 66, 2, 122, 65, 17, 9, 27, 66,
- 2, 122, 2, 151, 65, 17, 9, 27, 66, 2, 122, 2, 66, 65, 17, 9, 27, 66, 2,
- 122, 2, 77, 40, 17, 9, 27, 66, 2, 151, 2, 122, 65, 17, 9, 27, 66, 2, 151,
- 2, 66, 65, 17, 9, 27, 66, 2, 234, 136, 2, 151, 65, 17, 9, 27, 66, 2, 234,
- 136, 2, 66, 65, 17, 9, 27, 66, 2, 151, 2, 234, 136, 65, 17, 9, 27, 241,
- 226, 2, 66, 2, 151, 65, 17, 9, 27, 241, 226, 2, 66, 2, 66, 65, 17, 9, 27,
- 228, 68, 2, 122, 2, 66, 65, 17, 9, 27, 228, 68, 2, 122, 2, 109, 231, 198,
- 40, 17, 9, 27, 228, 68, 2, 151, 2, 66, 40, 17, 9, 27, 228, 68, 2, 151, 2,
- 66, 65, 17, 9, 27, 228, 68, 2, 151, 2, 109, 231, 198, 40, 17, 9, 27, 228,
- 68, 2, 66, 2, 77, 40, 17, 9, 27, 228, 68, 2, 66, 2, 109, 231, 198, 40,
- 17, 9, 27, 77, 2, 66, 2, 66, 40, 17, 9, 27, 77, 2, 66, 2, 66, 65, 17, 9,
- 27, 252, 63, 2, 234, 136, 2, 77, 40, 17, 9, 27, 217, 9, 2, 151, 2, 77,
- 40, 17, 9, 27, 217, 9, 2, 151, 2, 109, 231, 198, 40, 17, 9, 27, 217, 9,
- 2, 234, 136, 2, 77, 40, 17, 9, 27, 217, 9, 2, 234, 136, 2, 109, 231, 198,
- 40, 17, 9, 27, 217, 9, 2, 66, 2, 77, 40, 17, 9, 27, 217, 9, 2, 66, 2,
- 109, 231, 198, 40, 17, 9, 27, 151, 2, 66, 2, 77, 40, 17, 9, 27, 151, 2,
- 122, 2, 109, 231, 198, 40, 17, 9, 27, 151, 2, 66, 2, 109, 231, 198, 40,
- 17, 9, 27, 221, 169, 2, 234, 136, 2, 109, 231, 198, 40, 17, 9, 27, 222,
- 29, 2, 122, 2, 77, 40, 17, 9, 27, 220, 62, 2, 122, 2, 77, 40, 17, 9, 27,
- 248, 225, 2, 122, 2, 77, 40, 17, 9, 27, 233, 109, 2, 151, 2, 77, 40, 17,
- 9, 27, 233, 109, 2, 66, 2, 77, 40, 17, 9, 27, 77, 2, 122, 2, 77, 40, 17,
- 9, 27, 77, 2, 151, 2, 77, 40, 17, 9, 27, 77, 2, 66, 2, 77, 40, 17, 9, 27,
- 66, 2, 66, 2, 77, 40, 17, 9, 27, 224, 85, 2, 66, 2, 77, 40, 17, 9, 27,
- 228, 68, 2, 122, 2, 77, 40, 17, 9, 27, 224, 85, 2, 66, 2, 122, 65, 17, 9,
- 27, 233, 109, 2, 122, 2, 66, 65, 17, 9, 27, 254, 206, 2, 66, 2, 77, 40,
- 17, 9, 27, 235, 1, 2, 66, 2, 77, 40, 17, 9, 27, 228, 68, 2, 151, 2, 122,
- 65, 17, 9, 27, 66, 2, 234, 136, 2, 77, 40, 17, 9, 27, 233, 109, 2, 151,
- 2, 66, 65, 17, 9, 27, 235, 1, 2, 66, 2, 66, 40, 17, 9, 27, 233, 109, 2,
- 151, 2, 66, 40, 17, 9, 27, 228, 68, 2, 151, 2, 122, 40, 17, 9, 27, 151,
- 2, 122, 2, 77, 40, 17, 9, 27, 122, 2, 151, 2, 77, 40, 17, 9, 27, 66, 2,
- 151, 2, 77, 40, 17, 9, 27, 244, 151, 2, 66, 2, 77, 40, 17, 9, 27, 252,
- 63, 2, 122, 2, 77, 40, 17, 9, 27, 235, 1, 2, 66, 2, 66, 65, 17, 9, 27,
- 254, 206, 2, 151, 2, 66, 65, 17, 9, 27, 222, 29, 2, 66, 2, 66, 65, 17, 9,
- 27, 221, 169, 2, 234, 136, 2, 77, 40, 17, 9, 27, 228, 68, 2, 151, 2, 77,
- 40, 17, 9, 27, 222, 6, 214, 128, 253, 246, 234, 10, 218, 132, 5, 53, 17,
- 9, 27, 224, 81, 214, 128, 253, 246, 234, 10, 218, 132, 5, 53, 17, 9, 27,
- 254, 162, 53, 17, 9, 27, 254, 192, 53, 17, 9, 27, 230, 158, 53, 17, 9,
- 27, 222, 7, 53, 17, 9, 27, 223, 146, 53, 17, 9, 27, 254, 181, 53, 17, 9,
- 27, 212, 49, 53, 17, 9, 27, 222, 6, 53, 17, 9, 27, 222, 5, 254, 181, 212,
- 48, 9, 27, 235, 140, 223, 37, 50, 9, 27, 251, 238, 254, 47, 254, 48, 45,
- 221, 158, 45, 221, 47, 45, 220, 235, 45, 220, 224, 45, 220, 213, 45, 220,
- 202, 45, 220, 191, 45, 220, 180, 45, 220, 169, 45, 221, 157, 45, 221,
- 146, 45, 221, 135, 45, 221, 124, 45, 221, 113, 45, 221, 102, 45, 221, 91,
- 224, 197, 244, 28, 31, 67, 249, 227, 224, 197, 244, 28, 31, 67, 110, 249,
- 227, 224, 197, 244, 28, 31, 67, 110, 243, 236, 218, 131, 224, 197, 244,
- 28, 31, 67, 249, 234, 224, 197, 244, 28, 31, 67, 220, 152, 224, 197, 244,
- 28, 31, 67, 245, 39, 79, 224, 197, 244, 28, 31, 67, 224, 16, 79, 224,
- 197, 244, 28, 31, 67, 43, 71, 233, 26, 127, 224, 197, 244, 28, 31, 67,
- 44, 71, 233, 26, 251, 164, 224, 197, 244, 28, 31, 67, 203, 245, 171, 38,
- 27, 43, 242, 34, 38, 27, 44, 242, 34, 38, 52, 216, 90, 43, 242, 34, 38,
- 52, 216, 90, 44, 242, 34, 38, 231, 238, 43, 242, 34, 38, 231, 238, 44,
- 242, 34, 38, 249, 205, 231, 237, 224, 197, 244, 28, 31, 67, 113, 59, 233,
- 62, 224, 197, 244, 28, 31, 67, 245, 168, 248, 164, 224, 197, 244, 28, 31,
- 67, 245, 159, 248, 164, 224, 197, 244, 28, 31, 67, 121, 232, 219, 224,
- 197, 244, 28, 31, 67, 212, 32, 121, 232, 219, 224, 197, 244, 28, 31, 67,
- 43, 226, 7, 224, 197, 244, 28, 31, 67, 44, 226, 7, 224, 197, 244, 28, 31,
- 67, 43, 249, 107, 127, 224, 197, 244, 28, 31, 67, 44, 249, 107, 127, 224,
- 197, 244, 28, 31, 67, 43, 216, 7, 220, 55, 127, 224, 197, 244, 28, 31,
- 67, 44, 216, 7, 220, 55, 127, 224, 197, 244, 28, 31, 67, 43, 85, 233, 26,
- 127, 224, 197, 244, 28, 31, 67, 44, 85, 233, 26, 127, 224, 197, 244, 28,
- 31, 67, 43, 52, 254, 118, 127, 224, 197, 244, 28, 31, 67, 44, 52, 254,
- 118, 127, 224, 197, 244, 28, 31, 67, 43, 254, 118, 127, 224, 197, 244,
- 28, 31, 67, 44, 254, 118, 127, 224, 197, 244, 28, 31, 67, 43, 249, 169,
- 127, 224, 197, 244, 28, 31, 67, 44, 249, 169, 127, 224, 197, 244, 28, 31,
- 67, 43, 71, 249, 169, 127, 224, 197, 244, 28, 31, 67, 44, 71, 249, 169,
- 127, 220, 133, 247, 128, 71, 220, 133, 247, 128, 224, 197, 244, 28, 31,
- 67, 43, 42, 127, 224, 197, 244, 28, 31, 67, 44, 42, 127, 248, 163, 226,
- 123, 250, 180, 226, 123, 212, 32, 226, 123, 52, 212, 32, 226, 123, 248,
- 163, 121, 232, 219, 250, 180, 121, 232, 219, 212, 32, 121, 232, 219, 4,
- 249, 227, 4, 110, 249, 227, 4, 243, 236, 218, 131, 4, 220, 152, 4, 249,
- 234, 4, 224, 16, 79, 4, 245, 39, 79, 4, 245, 168, 248, 164, 4, 43, 226,
- 7, 4, 44, 226, 7, 4, 43, 249, 107, 127, 4, 44, 249, 107, 127, 4, 43, 216,
- 7, 220, 55, 127, 4, 44, 216, 7, 220, 55, 127, 4, 54, 50, 4, 254, 134, 4,
- 253, 224, 4, 96, 50, 4, 240, 174, 4, 233, 21, 50, 4, 242, 137, 50, 4,
- 245, 106, 50, 4, 223, 53, 219, 48, 4, 247, 140, 50, 4, 225, 185, 50, 4,
- 249, 225, 253, 214, 9, 244, 172, 53, 17, 9, 217, 45, 2, 244, 172, 48, 9,
- 248, 191, 53, 17, 9, 217, 79, 244, 9, 9, 234, 210, 53, 17, 9, 244, 174,
- 53, 17, 9, 244, 174, 147, 17, 9, 248, 193, 53, 17, 9, 248, 193, 147, 17,
- 9, 234, 212, 53, 17, 9, 234, 212, 147, 17, 9, 220, 96, 53, 17, 9, 220,
- 96, 147, 17, 9, 218, 47, 53, 17, 9, 218, 47, 147, 17, 9, 1, 182, 53, 17,
- 9, 1, 109, 2, 231, 233, 72, 53, 17, 9, 1, 109, 2, 231, 233, 72, 40, 17,
- 9, 1, 109, 2, 182, 72, 53, 17, 9, 1, 109, 2, 182, 72, 40, 17, 9, 1, 212,
- 31, 2, 182, 72, 53, 17, 9, 1, 212, 31, 2, 182, 72, 40, 17, 9, 1, 109, 2,
- 182, 252, 51, 53, 17, 9, 1, 109, 2, 182, 252, 51, 40, 17, 9, 1, 77, 2,
- 182, 72, 53, 17, 9, 1, 77, 2, 182, 72, 40, 17, 9, 1, 77, 2, 182, 72, 65,
- 17, 9, 1, 77, 2, 182, 72, 147, 17, 9, 1, 109, 53, 17, 9, 1, 109, 40, 17,
- 9, 1, 252, 63, 53, 17, 9, 1, 252, 63, 40, 17, 9, 1, 252, 63, 65, 17, 9,
- 1, 252, 63, 147, 17, 9, 1, 217, 9, 231, 170, 53, 17, 9, 1, 217, 9, 231,
- 170, 40, 17, 9, 1, 217, 9, 53, 17, 9, 1, 217, 9, 40, 17, 9, 1, 217, 9,
- 65, 17, 9, 1, 217, 9, 147, 17, 9, 1, 216, 194, 53, 17, 9, 1, 216, 194,
- 40, 17, 9, 1, 216, 194, 65, 17, 9, 1, 216, 194, 147, 17, 9, 1, 151, 53,
- 17, 9, 1, 151, 40, 17, 9, 1, 151, 65, 17, 9, 1, 151, 147, 17, 9, 1, 122,
- 53, 17, 9, 1, 122, 40, 17, 9, 1, 122, 65, 17, 9, 1, 122, 147, 17, 9, 1,
- 234, 136, 53, 17, 9, 1, 234, 136, 40, 17, 9, 1, 234, 136, 65, 17, 9, 1,
- 234, 136, 147, 17, 9, 1, 248, 204, 53, 17, 9, 1, 248, 204, 40, 17, 9, 1,
- 216, 204, 53, 17, 9, 1, 216, 204, 40, 17, 9, 1, 223, 99, 53, 17, 9, 1,
- 223, 99, 40, 17, 9, 1, 210, 109, 53, 17, 9, 1, 210, 109, 40, 17, 9, 1,
- 221, 169, 53, 17, 9, 1, 221, 169, 40, 17, 9, 1, 221, 169, 65, 17, 9, 1,
- 221, 169, 147, 17, 9, 1, 220, 62, 53, 17, 9, 1, 220, 62, 40, 17, 9, 1,
- 220, 62, 65, 17, 9, 1, 220, 62, 147, 17, 9, 1, 222, 29, 53, 17, 9, 1,
- 222, 29, 40, 17, 9, 1, 222, 29, 65, 17, 9, 1, 222, 29, 147, 17, 9, 1,
- 248, 225, 53, 17, 9, 1, 248, 225, 40, 17, 9, 1, 248, 225, 65, 17, 9, 1,
- 248, 225, 147, 17, 9, 1, 217, 82, 53, 17, 9, 1, 217, 82, 40, 17, 9, 1,
- 217, 82, 65, 17, 9, 1, 217, 82, 147, 17, 9, 1, 210, 112, 53, 17, 9, 1,
- 210, 112, 40, 17, 9, 1, 210, 112, 65, 17, 9, 1, 210, 112, 147, 17, 9, 1,
- 254, 206, 53, 17, 9, 1, 254, 206, 40, 17, 9, 1, 254, 206, 65, 17, 9, 1,
- 254, 206, 147, 17, 9, 1, 242, 252, 53, 17, 9, 1, 242, 252, 40, 17, 9, 1,
- 242, 252, 65, 17, 9, 1, 242, 252, 147, 17, 9, 1, 244, 151, 53, 17, 9, 1,
- 244, 151, 40, 17, 9, 1, 244, 151, 65, 17, 9, 1, 244, 151, 147, 17, 9, 1,
- 224, 85, 53, 17, 9, 1, 224, 85, 40, 17, 9, 1, 224, 85, 65, 17, 9, 1, 224,
- 85, 147, 17, 9, 1, 235, 1, 53, 17, 9, 1, 235, 1, 40, 17, 9, 1, 235, 1,
- 65, 17, 9, 1, 235, 1, 147, 17, 9, 1, 233, 109, 53, 17, 9, 1, 233, 109,
- 40, 17, 9, 1, 233, 109, 65, 17, 9, 1, 233, 109, 147, 17, 9, 1, 66, 53,
- 17, 9, 1, 66, 40, 17, 9, 1, 66, 65, 17, 9, 1, 66, 147, 17, 9, 1, 228, 68,
- 53, 17, 9, 1, 228, 68, 40, 17, 9, 1, 228, 68, 65, 17, 9, 1, 228, 68, 147,
- 17, 9, 1, 241, 226, 53, 17, 9, 1, 241, 226, 40, 17, 9, 1, 241, 226, 65,
- 17, 9, 1, 241, 226, 147, 17, 9, 1, 212, 31, 53, 17, 9, 1, 212, 31, 40,
- 17, 9, 1, 109, 231, 198, 53, 17, 9, 1, 109, 231, 198, 40, 17, 9, 1, 77,
- 53, 17, 9, 1, 77, 40, 17, 9, 1, 77, 65, 17, 9, 1, 77, 147, 17, 9, 27,
- 233, 109, 2, 109, 2, 231, 233, 72, 53, 17, 9, 27, 233, 109, 2, 109, 2,
- 231, 233, 72, 40, 17, 9, 27, 233, 109, 2, 109, 2, 182, 72, 53, 17, 9, 27,
- 233, 109, 2, 109, 2, 182, 72, 40, 17, 9, 27, 233, 109, 2, 109, 2, 182,
- 252, 51, 53, 17, 9, 27, 233, 109, 2, 109, 2, 182, 252, 51, 40, 17, 9, 27,
- 233, 109, 2, 109, 53, 17, 9, 27, 233, 109, 2, 109, 40, 17, 210, 87, 211,
- 245, 228, 78, 219, 20, 126, 245, 39, 79, 126, 224, 1, 79, 126, 54, 50,
- 126, 247, 140, 50, 126, 225, 185, 50, 126, 254, 134, 126, 254, 65, 126,
- 43, 226, 7, 126, 44, 226, 7, 126, 253, 224, 126, 96, 50, 126, 249, 227,
- 126, 240, 174, 126, 243, 236, 218, 131, 126, 219, 48, 126, 21, 210, 86,
- 126, 21, 111, 126, 21, 105, 126, 21, 158, 126, 21, 161, 126, 21, 190,
- 126, 21, 195, 126, 21, 199, 126, 21, 196, 126, 21, 201, 126, 249, 234,
- 126, 220, 152, 126, 233, 21, 50, 126, 245, 106, 50, 126, 242, 137, 50,
- 126, 224, 16, 79, 126, 249, 225, 253, 214, 126, 7, 6, 1, 61, 126, 7, 6,
- 1, 253, 166, 126, 7, 6, 1, 251, 74, 126, 7, 6, 1, 249, 68, 126, 7, 6, 1,
- 76, 126, 7, 6, 1, 245, 14, 126, 7, 6, 1, 243, 209, 126, 7, 6, 1, 242, 67,
- 126, 7, 6, 1, 74, 126, 7, 6, 1, 235, 150, 126, 7, 6, 1, 235, 29, 126, 7,
- 6, 1, 156, 126, 7, 6, 1, 194, 126, 7, 6, 1, 230, 30, 126, 7, 6, 1, 78,
- 126, 7, 6, 1, 226, 109, 126, 7, 6, 1, 224, 99, 126, 7, 6, 1, 153, 126, 7,
- 6, 1, 222, 93, 126, 7, 6, 1, 217, 153, 126, 7, 6, 1, 69, 126, 7, 6, 1,
- 214, 105, 126, 7, 6, 1, 212, 98, 126, 7, 6, 1, 211, 178, 126, 7, 6, 1,
- 211, 117, 126, 7, 6, 1, 210, 159, 126, 43, 42, 127, 126, 223, 53, 219,
- 48, 126, 44, 42, 127, 126, 250, 39, 255, 23, 126, 121, 232, 219, 126,
- 242, 144, 255, 23, 126, 7, 4, 1, 61, 126, 7, 4, 1, 253, 166, 126, 7, 4,
- 1, 251, 74, 126, 7, 4, 1, 249, 68, 126, 7, 4, 1, 76, 126, 7, 4, 1, 245,
- 14, 126, 7, 4, 1, 243, 209, 126, 7, 4, 1, 242, 67, 126, 7, 4, 1, 74, 126,
- 7, 4, 1, 235, 150, 126, 7, 4, 1, 235, 29, 126, 7, 4, 1, 156, 126, 7, 4,
- 1, 194, 126, 7, 4, 1, 230, 30, 126, 7, 4, 1, 78, 126, 7, 4, 1, 226, 109,
- 126, 7, 4, 1, 224, 99, 126, 7, 4, 1, 153, 126, 7, 4, 1, 222, 93, 126, 7,
- 4, 1, 217, 153, 126, 7, 4, 1, 69, 126, 7, 4, 1, 214, 105, 126, 7, 4, 1,
- 212, 98, 126, 7, 4, 1, 211, 178, 126, 7, 4, 1, 211, 117, 126, 7, 4, 1,
- 210, 159, 126, 43, 249, 107, 127, 126, 67, 232, 219, 126, 44, 249, 107,
- 127, 126, 184, 126, 43, 71, 226, 7, 126, 44, 71, 226, 7, 101, 110, 243,
- 236, 218, 131, 101, 43, 249, 169, 127, 101, 44, 249, 169, 127, 101, 110,
- 249, 227, 101, 56, 230, 229, 247, 128, 101, 56, 1, 211, 227, 101, 56, 1,
- 4, 61, 101, 56, 1, 4, 74, 101, 56, 1, 4, 69, 101, 56, 1, 4, 76, 101, 56,
- 1, 4, 78, 101, 56, 1, 4, 192, 101, 56, 1, 4, 210, 212, 101, 56, 1, 4,
- 210, 244, 101, 56, 1, 4, 215, 119, 101, 234, 207, 224, 176, 219, 33, 79,
- 101, 56, 1, 61, 101, 56, 1, 74, 101, 56, 1, 69, 101, 56, 1, 76, 101, 56,
- 1, 78, 101, 56, 1, 176, 101, 56, 1, 234, 98, 101, 56, 1, 233, 223, 101,
- 56, 1, 234, 188, 101, 56, 1, 234, 34, 101, 56, 1, 206, 101, 56, 1, 219,
- 193, 101, 56, 1, 218, 84, 101, 56, 1, 221, 183, 101, 56, 1, 219, 60, 101,
- 56, 1, 217, 106, 101, 56, 1, 216, 118, 101, 56, 1, 215, 119, 101, 56, 1,
- 217, 23, 101, 56, 1, 112, 101, 56, 1, 198, 101, 56, 1, 228, 238, 101, 56,
- 1, 227, 242, 101, 56, 1, 229, 112, 101, 56, 1, 228, 79, 101, 56, 1, 162,
- 101, 56, 1, 241, 187, 101, 56, 1, 240, 229, 101, 56, 1, 241, 245, 101,
- 56, 1, 241, 75, 101, 56, 1, 186, 101, 56, 1, 230, 235, 101, 56, 1, 230,
- 107, 101, 56, 1, 231, 96, 101, 56, 1, 230, 166, 101, 56, 1, 192, 101, 56,
- 1, 210, 212, 101, 56, 1, 210, 244, 101, 56, 1, 205, 101, 56, 1, 223, 38,
- 101, 56, 1, 222, 142, 101, 56, 1, 223, 131, 101, 56, 1, 222, 213, 101,
- 56, 1, 212, 65, 101, 56, 1, 230, 30, 101, 56, 213, 135, 219, 33, 79, 101,
- 56, 220, 157, 219, 33, 79, 101, 24, 244, 111, 101, 24, 1, 234, 64, 101,
- 24, 1, 218, 217, 101, 24, 1, 234, 57, 101, 24, 1, 228, 231, 101, 24, 1,
- 228, 229, 101, 24, 1, 228, 228, 101, 24, 1, 216, 102, 101, 24, 1, 218,
- 206, 101, 24, 1, 223, 29, 101, 24, 1, 223, 24, 101, 24, 1, 223, 21, 101,
- 24, 1, 223, 14, 101, 24, 1, 223, 9, 101, 24, 1, 223, 4, 101, 24, 1, 223,
- 15, 101, 24, 1, 223, 27, 101, 24, 1, 230, 222, 101, 24, 1, 225, 98, 101,
- 24, 1, 218, 214, 101, 24, 1, 225, 87, 101, 24, 1, 219, 150, 101, 24, 1,
- 218, 211, 101, 24, 1, 236, 63, 101, 24, 1, 250, 54, 101, 24, 1, 218, 221,
- 101, 24, 1, 250, 114, 101, 24, 1, 234, 116, 101, 24, 1, 216, 174, 101,
- 24, 1, 225, 134, 101, 24, 1, 241, 179, 101, 24, 1, 61, 101, 24, 1, 254,
- 252, 101, 24, 1, 192, 101, 24, 1, 211, 92, 101, 24, 1, 245, 125, 101, 24,
- 1, 76, 101, 24, 1, 211, 36, 101, 24, 1, 211, 47, 101, 24, 1, 78, 101, 24,
- 1, 212, 65, 101, 24, 1, 212, 62, 101, 24, 1, 226, 238, 101, 24, 1, 210,
- 244, 101, 24, 1, 69, 101, 24, 1, 212, 11, 101, 24, 1, 212, 22, 101, 24,
- 1, 211, 250, 101, 24, 1, 210, 212, 101, 24, 1, 245, 63, 101, 24, 1, 211,
- 8, 101, 24, 1, 74, 126, 250, 184, 50, 126, 224, 231, 50, 126, 228, 57,
- 50, 126, 231, 237, 126, 251, 143, 130, 126, 211, 40, 50, 126, 211, 217,
- 50, 101, 244, 26, 193, 213, 239, 101, 140, 75, 101, 214, 153, 75, 101,
- 97, 75, 101, 246, 112, 75, 101, 85, 218, 236, 101, 71, 250, 43, 235, 211,
- 254, 107, 254, 128, 235, 211, 254, 107, 220, 139, 235, 211, 254, 107,
- 216, 237, 226, 253, 223, 75, 250, 150, 223, 75, 250, 150, 62, 57, 3, 253,
- 150, 61, 62, 57, 3, 253, 119, 76, 62, 57, 3, 253, 128, 74, 62, 57, 3,
- 253, 96, 78, 62, 57, 3, 253, 146, 69, 62, 57, 3, 253, 165, 248, 229, 62,
- 57, 3, 253, 112, 248, 98, 62, 57, 3, 253, 152, 248, 11, 62, 57, 3, 253,
- 142, 247, 153, 62, 57, 3, 253, 106, 246, 86, 62, 57, 3, 253, 100, 235,
- 147, 62, 57, 3, 253, 111, 235, 132, 62, 57, 3, 253, 121, 235, 74, 62, 57,
- 3, 253, 92, 235, 57, 62, 57, 3, 253, 80, 176, 62, 57, 3, 253, 113, 234,
- 188, 62, 57, 3, 253, 90, 234, 98, 62, 57, 3, 253, 87, 234, 34, 62, 57, 3,
- 253, 76, 233, 223, 62, 57, 3, 253, 77, 186, 62, 57, 3, 253, 143, 231, 96,
- 62, 57, 3, 253, 84, 230, 235, 62, 57, 3, 253, 141, 230, 166, 62, 57, 3,
- 253, 133, 230, 107, 62, 57, 3, 253, 154, 198, 62, 57, 3, 253, 132, 229,
- 112, 62, 57, 3, 253, 126, 228, 238, 62, 57, 3, 253, 105, 228, 79, 62, 57,
- 3, 253, 102, 227, 242, 62, 57, 3, 253, 161, 191, 62, 57, 3, 253, 85, 225,
- 224, 62, 57, 3, 253, 118, 225, 111, 62, 57, 3, 253, 145, 225, 19, 62, 57,
- 3, 253, 107, 224, 153, 62, 57, 3, 253, 140, 224, 91, 62, 57, 3, 253, 79,
- 224, 72, 62, 57, 3, 253, 135, 224, 56, 62, 57, 3, 253, 124, 224, 45, 62,
- 57, 3, 253, 97, 205, 62, 57, 3, 253, 129, 223, 131, 62, 57, 3, 253, 104,
- 223, 38, 62, 57, 3, 253, 163, 222, 213, 62, 57, 3, 253, 130, 222, 142,
- 62, 57, 3, 253, 125, 206, 62, 57, 3, 253, 148, 221, 183, 62, 57, 3, 253,
- 116, 219, 193, 62, 57, 3, 253, 144, 219, 60, 62, 57, 3, 253, 99, 218, 84,
- 62, 57, 3, 253, 98, 217, 106, 62, 57, 3, 253, 159, 217, 23, 62, 57, 3,
- 253, 120, 216, 118, 62, 57, 3, 253, 157, 112, 62, 57, 3, 253, 88, 215,
- 119, 62, 57, 3, 253, 103, 212, 65, 62, 57, 3, 253, 82, 212, 22, 62, 57,
- 3, 253, 117, 211, 250, 62, 57, 3, 253, 115, 211, 227, 62, 57, 3, 253,
- 139, 210, 116, 62, 57, 3, 253, 83, 210, 94, 62, 57, 3, 253, 136, 210, 23,
- 62, 57, 3, 253, 131, 255, 84, 62, 57, 3, 253, 114, 255, 83, 62, 57, 3,
- 253, 73, 253, 200, 62, 57, 3, 253, 86, 246, 54, 62, 57, 3, 253, 69, 246,
- 53, 62, 57, 3, 253, 109, 227, 178, 62, 57, 3, 253, 127, 224, 151, 62, 57,
- 3, 253, 95, 224, 155, 62, 57, 3, 253, 81, 223, 189, 62, 57, 3, 253, 123,
- 223, 188, 62, 57, 3, 253, 89, 222, 212, 62, 57, 3, 253, 91, 217, 103, 62,
- 57, 3, 253, 71, 215, 78, 62, 57, 3, 253, 68, 105, 62, 57, 16, 253, 138,
- 62, 57, 16, 253, 137, 62, 57, 16, 253, 134, 62, 57, 16, 253, 122, 62, 57,
- 16, 253, 110, 62, 57, 16, 253, 108, 62, 57, 16, 253, 101, 62, 57, 16,
- 253, 94, 62, 57, 16, 253, 93, 62, 57, 16, 253, 78, 62, 57, 16, 253, 75,
- 62, 57, 16, 253, 74, 62, 57, 16, 253, 72, 62, 57, 16, 253, 70, 62, 57,
- 106, 253, 67, 231, 190, 62, 57, 106, 253, 66, 211, 221, 62, 57, 106, 253,
- 65, 248, 82, 62, 57, 106, 253, 64, 245, 103, 62, 57, 106, 253, 63, 231,
- 164, 62, 57, 106, 253, 62, 218, 164, 62, 57, 106, 253, 61, 245, 45, 62,
- 57, 106, 253, 60, 223, 156, 62, 57, 106, 253, 59, 220, 64, 62, 57, 106,
- 253, 58, 241, 244, 62, 57, 106, 253, 57, 219, 27, 62, 57, 106, 253, 56,
- 251, 211, 62, 57, 106, 253, 55, 249, 153, 62, 57, 106, 253, 54, 251, 123,
- 62, 57, 106, 253, 53, 212, 2, 62, 57, 106, 253, 52, 252, 144, 62, 57,
- 106, 253, 51, 226, 209, 62, 57, 106, 253, 50, 219, 0, 62, 57, 106, 253,
- 49, 249, 76, 62, 57, 230, 147, 253, 48, 234, 230, 62, 57, 230, 147, 253,
- 47, 234, 238, 62, 57, 106, 253, 46, 226, 222, 62, 57, 106, 253, 45, 211,
- 236, 62, 57, 106, 253, 44, 62, 57, 230, 147, 253, 43, 254, 25, 62, 57,
- 230, 147, 253, 42, 231, 57, 62, 57, 106, 253, 41, 251, 142, 62, 57, 106,
- 253, 40, 242, 173, 62, 57, 106, 253, 39, 62, 57, 106, 253, 38, 211, 212,
- 62, 57, 106, 253, 37, 62, 57, 106, 253, 36, 62, 57, 106, 253, 35, 240,
- 255, 62, 57, 106, 253, 34, 62, 57, 106, 253, 33, 62, 57, 106, 253, 32,
- 62, 57, 230, 147, 253, 30, 215, 92, 62, 57, 106, 253, 29, 62, 57, 106,
- 253, 28, 62, 57, 106, 253, 27, 250, 2, 62, 57, 106, 253, 26, 62, 57, 106,
- 253, 25, 62, 57, 106, 253, 24, 243, 100, 62, 57, 106, 253, 23, 254, 12,
- 62, 57, 106, 253, 22, 62, 57, 106, 253, 21, 62, 57, 106, 253, 20, 62, 57,
- 106, 253, 19, 62, 57, 106, 253, 18, 62, 57, 106, 253, 17, 62, 57, 106,
- 253, 16, 62, 57, 106, 253, 15, 62, 57, 106, 253, 14, 62, 57, 106, 253,
- 13, 230, 139, 62, 57, 106, 253, 12, 62, 57, 106, 253, 11, 215, 236, 62,
- 57, 106, 253, 10, 62, 57, 106, 253, 9, 62, 57, 106, 253, 8, 62, 57, 106,
- 253, 7, 62, 57, 106, 253, 6, 62, 57, 106, 253, 5, 62, 57, 106, 253, 4,
- 62, 57, 106, 253, 3, 62, 57, 106, 253, 2, 62, 57, 106, 253, 1, 62, 57,
- 106, 253, 0, 62, 57, 106, 252, 255, 241, 218, 62, 57, 106, 252, 234, 244,
- 36, 62, 57, 106, 252, 231, 252, 124, 62, 57, 106, 252, 226, 219, 7, 62,
- 57, 106, 252, 225, 75, 62, 57, 106, 252, 224, 62, 57, 106, 252, 223, 217,
- 237, 62, 57, 106, 252, 222, 62, 57, 106, 252, 221, 62, 57, 106, 252, 220,
- 211, 254, 250, 147, 62, 57, 106, 252, 219, 250, 147, 62, 57, 106, 252,
- 218, 250, 148, 244, 7, 62, 57, 106, 252, 217, 212, 0, 62, 57, 106, 252,
- 216, 62, 57, 106, 252, 215, 62, 57, 230, 147, 252, 214, 247, 206, 62, 57,
- 106, 252, 213, 62, 57, 106, 252, 212, 62, 57, 106, 252, 210, 62, 57, 106,
- 252, 209, 62, 57, 106, 252, 208, 62, 57, 106, 252, 207, 248, 167, 62, 57,
- 106, 252, 206, 62, 57, 106, 252, 205, 62, 57, 106, 252, 204, 62, 57, 106,
- 252, 203, 62, 57, 106, 252, 202, 62, 57, 106, 213, 186, 253, 31, 62, 57,
- 106, 213, 186, 252, 254, 62, 57, 106, 213, 186, 252, 253, 62, 57, 106,
- 213, 186, 252, 252, 62, 57, 106, 213, 186, 252, 251, 62, 57, 106, 213,
- 186, 252, 250, 62, 57, 106, 213, 186, 252, 249, 62, 57, 106, 213, 186,
- 252, 248, 62, 57, 106, 213, 186, 252, 247, 62, 57, 106, 213, 186, 252,
- 246, 62, 57, 106, 213, 186, 252, 245, 62, 57, 106, 213, 186, 252, 244,
- 62, 57, 106, 213, 186, 252, 243, 62, 57, 106, 213, 186, 252, 242, 62, 57,
- 106, 213, 186, 252, 241, 62, 57, 106, 213, 186, 252, 240, 62, 57, 106,
- 213, 186, 252, 239, 62, 57, 106, 213, 186, 252, 238, 62, 57, 106, 213,
- 186, 252, 237, 62, 57, 106, 213, 186, 252, 236, 62, 57, 106, 213, 186,
- 252, 235, 62, 57, 106, 213, 186, 252, 233, 62, 57, 106, 213, 186, 252,
- 232, 62, 57, 106, 213, 186, 252, 230, 62, 57, 106, 213, 186, 252, 229,
- 62, 57, 106, 213, 186, 252, 228, 62, 57, 106, 213, 186, 252, 227, 62, 57,
- 106, 213, 186, 252, 211, 62, 57, 106, 213, 186, 252, 201, 254, 245, 211,
- 209, 220, 140, 232, 219, 254, 245, 211, 209, 220, 140, 247, 128, 254,
- 245, 250, 138, 79, 254, 245, 54, 111, 254, 245, 54, 105, 254, 245, 54,
- 158, 254, 245, 54, 161, 254, 245, 54, 190, 254, 245, 54, 195, 254, 245,
- 54, 199, 254, 245, 54, 196, 254, 245, 54, 201, 254, 245, 54, 216, 248,
- 254, 245, 54, 215, 73, 254, 245, 54, 216, 163, 254, 245, 54, 244, 23,
- 254, 245, 54, 244, 122, 254, 245, 54, 219, 113, 254, 245, 54, 220, 118,
- 254, 245, 54, 245, 192, 254, 245, 54, 228, 200, 254, 245, 54, 123, 240,
- 217, 254, 245, 54, 113, 240, 217, 254, 245, 54, 134, 240, 217, 254, 245,
- 54, 244, 19, 240, 217, 254, 245, 54, 244, 89, 240, 217, 254, 245, 54,
- 219, 127, 240, 217, 254, 245, 54, 220, 124, 240, 217, 254, 245, 54, 245,
- 201, 240, 217, 254, 245, 54, 228, 205, 240, 217, 254, 245, 54, 123, 216,
- 148, 254, 245, 54, 113, 216, 148, 254, 245, 54, 134, 216, 148, 254, 245,
- 54, 244, 19, 216, 148, 254, 245, 54, 244, 89, 216, 148, 254, 245, 54,
- 219, 127, 216, 148, 254, 245, 54, 220, 124, 216, 148, 254, 245, 54, 245,
- 201, 216, 148, 254, 245, 54, 228, 205, 216, 148, 254, 245, 54, 216, 249,
- 216, 148, 254, 245, 54, 215, 74, 216, 148, 254, 245, 54, 216, 164, 216,
- 148, 254, 245, 54, 244, 24, 216, 148, 254, 245, 54, 244, 123, 216, 148,
- 254, 245, 54, 219, 114, 216, 148, 254, 245, 54, 220, 119, 216, 148, 254,
- 245, 54, 245, 193, 216, 148, 254, 245, 54, 228, 201, 216, 148, 254, 245,
- 212, 14, 252, 136, 214, 173, 254, 245, 212, 14, 244, 100, 218, 60, 254,
- 245, 212, 14, 221, 178, 218, 60, 254, 245, 212, 14, 216, 170, 218, 60,
- 254, 245, 212, 14, 244, 12, 218, 60, 254, 245, 246, 89, 231, 95, 244,
- 100, 218, 60, 254, 245, 232, 205, 231, 95, 244, 100, 218, 60, 254, 245,
- 231, 95, 221, 178, 218, 60, 254, 245, 231, 95, 216, 170, 218, 60, 26,
- 255, 15, 253, 202, 123, 224, 24, 26, 255, 15, 253, 202, 123, 242, 34, 26,
- 255, 15, 253, 202, 123, 246, 108, 26, 255, 15, 253, 202, 190, 26, 255,
- 15, 253, 202, 244, 122, 26, 255, 15, 253, 202, 244, 89, 240, 217, 26,
- 255, 15, 253, 202, 244, 89, 216, 148, 26, 255, 15, 253, 202, 244, 123,
- 216, 148, 26, 255, 15, 253, 202, 244, 89, 217, 68, 26, 255, 15, 253, 202,
- 216, 249, 217, 68, 26, 255, 15, 253, 202, 244, 123, 217, 68, 26, 255, 15,
- 253, 202, 123, 240, 218, 217, 68, 26, 255, 15, 253, 202, 244, 89, 240,
- 218, 217, 68, 26, 255, 15, 253, 202, 123, 216, 149, 217, 68, 26, 255, 15,
- 253, 202, 244, 89, 216, 149, 217, 68, 26, 255, 15, 253, 202, 244, 89,
- 218, 152, 26, 255, 15, 253, 202, 216, 249, 218, 152, 26, 255, 15, 253,
- 202, 244, 123, 218, 152, 26, 255, 15, 253, 202, 123, 240, 218, 218, 152,
- 26, 255, 15, 253, 202, 244, 89, 240, 218, 218, 152, 26, 255, 15, 253,
- 202, 123, 216, 149, 218, 152, 26, 255, 15, 253, 202, 216, 249, 216, 149,
- 218, 152, 26, 255, 15, 253, 202, 244, 123, 216, 149, 218, 152, 26, 255,
- 15, 253, 202, 216, 249, 230, 169, 26, 255, 15, 241, 212, 123, 225, 34,
- 26, 255, 15, 216, 182, 111, 26, 255, 15, 241, 208, 111, 26, 255, 15, 245,
- 112, 105, 26, 255, 15, 216, 182, 105, 26, 255, 15, 249, 73, 113, 246,
- 107, 26, 255, 15, 245, 112, 113, 246, 107, 26, 255, 15, 215, 204, 190,
- 26, 255, 15, 215, 204, 216, 248, 26, 255, 15, 215, 204, 216, 249, 254,
- 149, 17, 26, 255, 15, 241, 208, 216, 248, 26, 255, 15, 231, 46, 216, 248,
- 26, 255, 15, 216, 182, 216, 248, 26, 255, 15, 216, 182, 216, 163, 26,
- 255, 15, 215, 204, 244, 122, 26, 255, 15, 215, 204, 244, 123, 254, 149,
- 17, 26, 255, 15, 241, 208, 244, 122, 26, 255, 15, 216, 182, 244, 122, 26,
- 255, 15, 216, 182, 123, 240, 217, 26, 255, 15, 216, 182, 134, 240, 217,
- 26, 255, 15, 245, 112, 244, 89, 240, 217, 26, 255, 15, 215, 204, 244, 89,
- 240, 217, 26, 255, 15, 216, 182, 244, 89, 240, 217, 26, 255, 15, 250,
- 235, 244, 89, 240, 217, 26, 255, 15, 229, 187, 244, 89, 240, 217, 26,
- 255, 15, 216, 182, 123, 216, 148, 26, 255, 15, 216, 182, 244, 89, 216,
- 148, 26, 255, 15, 248, 65, 244, 89, 230, 169, 26, 255, 15, 218, 120, 244,
- 123, 230, 169, 26, 123, 163, 50, 26, 123, 163, 5, 254, 149, 17, 26, 113,
- 216, 168, 50, 26, 134, 224, 23, 50, 26, 211, 45, 50, 26, 217, 69, 50, 26,
- 246, 109, 50, 26, 226, 250, 50, 26, 113, 226, 249, 50, 26, 134, 226, 249,
- 50, 26, 244, 19, 226, 249, 50, 26, 244, 89, 226, 249, 50, 26, 231, 40,
- 50, 26, 233, 163, 252, 136, 50, 26, 232, 200, 50, 26, 226, 135, 50, 26,
- 211, 159, 50, 26, 253, 251, 50, 26, 254, 8, 50, 26, 242, 151, 50, 26,
- 215, 187, 252, 136, 50, 26, 210, 87, 50, 222, 200, 220, 115, 50, 222,
- 200, 214, 185, 50, 222, 200, 220, 144, 50, 222, 200, 220, 113, 50, 222,
- 200, 247, 221, 220, 113, 50, 222, 200, 219, 170, 50, 222, 200, 248, 61,
- 50, 222, 200, 224, 9, 50, 222, 200, 220, 131, 50, 222, 200, 246, 68, 50,
- 222, 200, 253, 246, 50, 222, 200, 250, 179, 50, 225, 146, 247, 199, 5,
- 225, 216, 225, 146, 247, 199, 5, 225, 27, 241, 242, 225, 146, 247, 199,
- 5, 217, 46, 241, 242, 225, 146, 247, 199, 5, 250, 255, 225, 146, 247,
- 199, 5, 250, 109, 225, 146, 247, 199, 5, 211, 221, 225, 146, 247, 199, 5,
- 241, 218, 225, 146, 247, 199, 5, 243, 92, 225, 146, 247, 199, 5, 216,
- 117, 225, 146, 247, 199, 5, 75, 225, 146, 247, 199, 5, 251, 177, 225,
- 146, 247, 199, 5, 220, 31, 225, 146, 247, 199, 5, 249, 252, 225, 146,
- 247, 199, 5, 231, 189, 225, 146, 247, 199, 5, 231, 141, 225, 146, 247,
- 199, 5, 221, 218, 225, 146, 247, 199, 5, 232, 243, 225, 146, 247, 199, 5,
- 251, 196, 225, 146, 247, 199, 5, 250, 239, 225, 38, 225, 146, 247, 199,
- 5, 247, 141, 225, 146, 247, 199, 5, 249, 231, 225, 146, 247, 199, 5, 219,
- 89, 225, 146, 247, 199, 5, 249, 232, 225, 146, 247, 199, 5, 252, 71, 225,
- 146, 247, 199, 5, 220, 18, 225, 146, 247, 199, 5, 240, 255, 225, 146,
- 247, 199, 5, 241, 185, 225, 146, 247, 199, 5, 251, 120, 233, 42, 225,
- 146, 247, 199, 5, 250, 232, 225, 146, 247, 199, 5, 223, 156, 225, 146,
- 247, 199, 5, 245, 238, 225, 146, 247, 199, 5, 246, 115, 225, 146, 247,
- 199, 5, 215, 106, 225, 146, 247, 199, 5, 252, 74, 225, 146, 247, 199, 5,
- 225, 39, 215, 236, 225, 146, 247, 199, 5, 213, 159, 225, 146, 247, 199,
- 5, 226, 22, 225, 146, 247, 199, 5, 222, 192, 225, 146, 247, 199, 5, 232,
- 230, 225, 146, 247, 199, 5, 226, 119, 252, 192, 225, 146, 247, 199, 5,
- 244, 56, 225, 146, 247, 199, 5, 242, 145, 225, 146, 247, 199, 5, 218,
- 121, 225, 146, 247, 199, 5, 4, 253, 176, 225, 146, 247, 199, 5, 212, 32,
- 252, 156, 225, 146, 247, 199, 5, 38, 226, 252, 91, 232, 65, 1, 61, 232,
- 65, 1, 76, 232, 65, 1, 253, 166, 232, 65, 1, 252, 27, 232, 65, 1, 243,
- 209, 232, 65, 1, 249, 68, 232, 65, 1, 74, 232, 65, 1, 212, 98, 232, 65,
- 1, 210, 159, 232, 65, 1, 216, 211, 232, 65, 1, 235, 150, 232, 65, 1, 235,
- 29, 232, 65, 1, 224, 99, 232, 65, 1, 156, 232, 65, 1, 194, 232, 65, 1,
- 230, 30, 232, 65, 1, 230, 171, 232, 65, 1, 228, 116, 232, 65, 1, 69, 232,
- 65, 1, 226, 109, 232, 65, 1, 234, 53, 232, 65, 1, 153, 232, 65, 1, 222,
- 93, 232, 65, 1, 217, 153, 232, 65, 1, 215, 160, 232, 65, 1, 254, 131,
- 232, 65, 1, 245, 158, 232, 65, 1, 242, 67, 232, 65, 1, 211, 178, 250,
- 245, 1, 61, 250, 245, 1, 226, 95, 250, 245, 1, 249, 68, 250, 245, 1, 156,
- 250, 245, 1, 214, 116, 250, 245, 1, 153, 250, 245, 1, 233, 68, 250, 245,
- 1, 255, 84, 250, 245, 1, 224, 99, 250, 245, 1, 253, 166, 250, 245, 1,
- 194, 250, 245, 1, 78, 250, 245, 1, 248, 231, 250, 245, 1, 217, 153, 250,
- 245, 1, 220, 106, 250, 245, 1, 220, 105, 250, 245, 1, 222, 93, 250, 245,
- 1, 251, 73, 250, 245, 1, 69, 250, 245, 1, 228, 116, 250, 245, 1, 211,
- 178, 250, 245, 1, 230, 30, 250, 245, 1, 215, 159, 250, 245, 1, 226, 109,
- 250, 245, 1, 218, 228, 250, 245, 1, 74, 250, 245, 1, 76, 250, 245, 1,
- 214, 113, 250, 245, 1, 235, 29, 250, 245, 1, 235, 20, 250, 245, 1, 229,
- 155, 250, 245, 1, 214, 118, 250, 245, 1, 243, 209, 250, 245, 1, 243, 144,
- 250, 245, 1, 218, 170, 250, 245, 1, 218, 169, 250, 245, 1, 229, 84, 250,
- 245, 1, 236, 40, 250, 245, 1, 251, 72, 250, 245, 1, 215, 160, 250, 245,
- 1, 214, 115, 250, 245, 1, 222, 182, 250, 245, 1, 231, 134, 250, 245, 1,
- 231, 133, 250, 245, 1, 231, 132, 250, 245, 1, 231, 131, 250, 245, 1, 233,
- 67, 250, 245, 1, 245, 242, 250, 245, 1, 214, 114, 55, 32, 1, 61, 55, 32,
- 1, 252, 83, 55, 32, 1, 234, 188, 55, 32, 1, 248, 98, 55, 32, 1, 76, 55,
- 32, 1, 213, 255, 55, 32, 1, 210, 94, 55, 32, 1, 241, 245, 55, 32, 1, 216,
- 196, 55, 32, 1, 74, 55, 32, 1, 176, 55, 32, 1, 245, 182, 55, 32, 1, 245,
- 167, 55, 32, 1, 245, 158, 55, 32, 1, 245, 83, 55, 32, 1, 78, 55, 32, 1,
- 225, 224, 55, 32, 1, 220, 65, 55, 32, 1, 233, 223, 55, 32, 1, 245, 100,
- 55, 32, 1, 245, 90, 55, 32, 1, 217, 23, 55, 32, 1, 69, 55, 32, 1, 245,
- 185, 55, 32, 1, 225, 139, 55, 32, 1, 234, 125, 55, 32, 1, 245, 210, 55,
- 32, 1, 245, 92, 55, 32, 1, 250, 139, 55, 32, 1, 236, 40, 55, 32, 1, 214,
- 118, 55, 32, 227, 202, 111, 55, 32, 227, 202, 190, 55, 32, 227, 202, 216,
- 248, 55, 32, 227, 202, 244, 122, 242, 160, 1, 254, 213, 242, 160, 1, 252,
- 171, 242, 160, 1, 242, 218, 242, 160, 1, 248, 212, 242, 160, 1, 254, 209,
- 242, 160, 1, 224, 82, 242, 160, 1, 235, 161, 242, 160, 1, 242, 46, 242,
- 160, 1, 216, 159, 242, 160, 1, 245, 191, 242, 160, 1, 233, 196, 242, 160,
- 1, 233, 119, 242, 160, 1, 231, 184, 242, 160, 1, 229, 189, 242, 160, 1,
- 235, 125, 242, 160, 1, 214, 136, 242, 160, 1, 226, 73, 242, 160, 1, 228,
- 200, 242, 160, 1, 223, 168, 242, 160, 1, 221, 220, 242, 160, 1, 217, 5,
- 242, 160, 1, 211, 234, 242, 160, 1, 244, 186, 242, 160, 1, 236, 44, 242,
- 160, 1, 240, 206, 242, 160, 1, 226, 143, 242, 160, 1, 228, 205, 240, 217,
- 214, 209, 1, 254, 155, 214, 209, 1, 252, 34, 214, 209, 1, 243, 115, 214,
- 209, 1, 234, 138, 214, 209, 1, 248, 62, 214, 209, 1, 241, 75, 214, 209,
- 1, 211, 227, 214, 209, 1, 210, 85, 214, 209, 1, 240, 248, 214, 209, 1,
- 216, 231, 214, 209, 1, 210, 233, 214, 209, 1, 235, 0, 214, 209, 1, 220,
- 22, 214, 209, 1, 233, 104, 214, 209, 1, 231, 70, 214, 209, 1, 248, 29,
- 214, 209, 1, 227, 198, 214, 209, 1, 210, 13, 214, 209, 1, 221, 250, 214,
- 209, 1, 254, 205, 214, 209, 1, 224, 153, 214, 209, 1, 222, 27, 214, 209,
- 1, 224, 38, 214, 209, 1, 223, 147, 214, 209, 1, 216, 200, 214, 209, 1,
- 242, 251, 214, 209, 1, 112, 214, 209, 1, 74, 214, 209, 1, 69, 214, 209,
- 1, 218, 181, 214, 209, 211, 209, 247, 180, 55, 225, 172, 5, 61, 55, 225,
- 172, 5, 74, 55, 225, 172, 5, 69, 55, 225, 172, 5, 176, 55, 225, 172, 5,
- 233, 223, 55, 225, 172, 5, 243, 142, 55, 225, 172, 5, 242, 120, 55, 225,
- 172, 5, 211, 165, 55, 225, 172, 5, 251, 41, 55, 225, 172, 5, 235, 147,
- 55, 225, 172, 5, 235, 114, 55, 225, 172, 5, 217, 106, 55, 225, 172, 5,
- 215, 119, 55, 225, 172, 5, 248, 229, 55, 225, 172, 5, 248, 11, 55, 225,
- 172, 5, 246, 86, 55, 225, 172, 5, 216, 209, 55, 225, 172, 5, 191, 55,
- 225, 172, 5, 252, 199, 55, 225, 172, 5, 244, 204, 55, 225, 172, 5, 198,
- 55, 225, 172, 5, 227, 242, 55, 225, 172, 5, 186, 55, 225, 172, 5, 230,
- 235, 55, 225, 172, 5, 230, 107, 55, 225, 172, 5, 192, 55, 225, 172, 5,
- 214, 27, 55, 225, 172, 5, 213, 176, 55, 225, 172, 5, 205, 55, 225, 172,
- 5, 222, 142, 55, 225, 172, 5, 233, 141, 55, 225, 172, 5, 206, 55, 225,
- 172, 5, 210, 116, 55, 225, 172, 5, 220, 104, 55, 225, 172, 5, 218, 225,
- 55, 225, 172, 5, 162, 55, 225, 172, 5, 253, 194, 55, 225, 172, 5, 253,
- 193, 55, 225, 172, 5, 253, 192, 55, 225, 172, 5, 211, 142, 55, 225, 172,
- 5, 248, 208, 55, 225, 172, 5, 248, 207, 55, 225, 172, 5, 252, 178, 55,
- 225, 172, 5, 251, 93, 55, 225, 172, 211, 209, 247, 180, 55, 225, 172, 54,
- 111, 55, 225, 172, 54, 105, 55, 225, 172, 54, 216, 248, 55, 225, 172, 54,
- 215, 73, 55, 225, 172, 54, 240, 217, 181, 6, 1, 200, 74, 181, 6, 1, 200,
- 76, 181, 6, 1, 200, 61, 181, 6, 1, 200, 254, 218, 181, 6, 1, 200, 78,
- 181, 6, 1, 200, 226, 187, 181, 6, 1, 219, 253, 74, 181, 6, 1, 219, 253,
- 76, 181, 6, 1, 219, 253, 61, 181, 6, 1, 219, 253, 254, 218, 181, 6, 1,
- 219, 253, 78, 181, 6, 1, 219, 253, 226, 187, 181, 6, 1, 253, 175, 181, 6,
- 1, 226, 120, 181, 6, 1, 211, 195, 181, 6, 1, 211, 44, 181, 6, 1, 242, 67,
- 181, 6, 1, 225, 214, 181, 6, 1, 252, 74, 181, 6, 1, 217, 12, 181, 6, 1,
- 248, 85, 181, 6, 1, 250, 136, 181, 6, 1, 235, 130, 181, 6, 1, 234, 195,
- 181, 6, 1, 243, 90, 181, 6, 1, 245, 210, 181, 6, 1, 213, 250, 181, 6, 1,
- 245, 67, 181, 6, 1, 216, 195, 181, 6, 1, 245, 90, 181, 6, 1, 210, 92,
- 181, 6, 1, 245, 83, 181, 6, 1, 210, 73, 181, 6, 1, 245, 100, 181, 6, 1,
- 245, 182, 181, 6, 1, 245, 167, 181, 6, 1, 245, 158, 181, 6, 1, 245, 146,
- 181, 6, 1, 226, 223, 181, 6, 1, 245, 46, 181, 4, 1, 200, 74, 181, 4, 1,
- 200, 76, 181, 4, 1, 200, 61, 181, 4, 1, 200, 254, 218, 181, 4, 1, 200,
- 78, 181, 4, 1, 200, 226, 187, 181, 4, 1, 219, 253, 74, 181, 4, 1, 219,
- 253, 76, 181, 4, 1, 219, 253, 61, 181, 4, 1, 219, 253, 254, 218, 181, 4,
- 1, 219, 253, 78, 181, 4, 1, 219, 253, 226, 187, 181, 4, 1, 253, 175, 181,
- 4, 1, 226, 120, 181, 4, 1, 211, 195, 181, 4, 1, 211, 44, 181, 4, 1, 242,
- 67, 181, 4, 1, 225, 214, 181, 4, 1, 252, 74, 181, 4, 1, 217, 12, 181, 4,
- 1, 248, 85, 181, 4, 1, 250, 136, 181, 4, 1, 235, 130, 181, 4, 1, 234,
- 195, 181, 4, 1, 243, 90, 181, 4, 1, 245, 210, 181, 4, 1, 213, 250, 181,
- 4, 1, 245, 67, 181, 4, 1, 216, 195, 181, 4, 1, 245, 90, 181, 4, 1, 210,
- 92, 181, 4, 1, 245, 83, 181, 4, 1, 210, 73, 181, 4, 1, 245, 100, 181, 4,
- 1, 245, 182, 181, 4, 1, 245, 167, 181, 4, 1, 245, 158, 181, 4, 1, 245,
- 146, 181, 4, 1, 226, 223, 181, 4, 1, 245, 46, 220, 71, 1, 225, 212, 220,
- 71, 1, 216, 6, 220, 71, 1, 234, 97, 220, 71, 1, 244, 155, 220, 71, 1,
- 216, 173, 220, 71, 1, 219, 60, 220, 71, 1, 218, 15, 220, 71, 1, 250, 69,
- 220, 71, 1, 211, 46, 220, 71, 1, 240, 216, 220, 71, 1, 252, 13, 220, 71,
- 1, 248, 97, 220, 71, 1, 243, 128, 220, 71, 1, 213, 123, 220, 71, 1, 216,
- 177, 220, 71, 1, 210, 21, 220, 71, 1, 231, 94, 220, 71, 1, 235, 55, 220,
- 71, 1, 211, 225, 220, 71, 1, 242, 55, 220, 71, 1, 232, 148, 220, 71, 1,
- 230, 194, 220, 71, 1, 236, 47, 220, 71, 1, 245, 209, 220, 71, 1, 253,
- 239, 220, 71, 1, 255, 0, 220, 71, 1, 226, 200, 220, 71, 1, 211, 212, 220,
- 71, 1, 226, 134, 220, 71, 1, 254, 218, 220, 71, 1, 222, 210, 220, 71, 1,
- 227, 198, 220, 71, 1, 245, 225, 220, 71, 1, 254, 223, 220, 71, 1, 240,
- 118, 220, 71, 1, 214, 163, 220, 71, 1, 227, 2, 220, 71, 1, 226, 180, 220,
- 71, 1, 226, 222, 220, 71, 1, 253, 178, 220, 71, 1, 254, 27, 220, 71, 1,
- 226, 162, 220, 71, 1, 254, 201, 220, 71, 1, 245, 94, 220, 71, 1, 254, 5,
- 220, 71, 1, 245, 235, 220, 71, 1, 240, 125, 220, 71, 1, 211, 13, 226,
- 145, 1, 254, 179, 226, 145, 1, 252, 199, 226, 145, 1, 217, 106, 226, 145,
- 1, 235, 147, 226, 145, 1, 211, 165, 226, 145, 1, 234, 138, 226, 145, 1,
- 248, 84, 226, 145, 1, 205, 226, 145, 1, 206, 226, 145, 1, 220, 28, 226,
- 145, 1, 248, 33, 226, 145, 1, 250, 223, 226, 145, 1, 243, 142, 226, 145,
- 1, 244, 204, 226, 145, 1, 224, 89, 226, 145, 1, 235, 15, 226, 145, 1,
- 233, 136, 226, 145, 1, 230, 205, 226, 145, 1, 227, 182, 226, 145, 1, 212,
- 30, 226, 145, 1, 162, 226, 145, 1, 192, 226, 145, 1, 61, 226, 145, 1, 76,
- 226, 145, 1, 74, 226, 145, 1, 78, 226, 145, 1, 69, 226, 145, 1, 255, 82,
- 226, 145, 1, 245, 217, 226, 145, 1, 226, 187, 226, 145, 21, 210, 86, 226,
- 145, 21, 111, 226, 145, 21, 105, 226, 145, 21, 158, 226, 145, 21, 161,
- 226, 145, 21, 190, 226, 145, 21, 195, 226, 145, 21, 199, 226, 145, 21,
- 196, 226, 145, 21, 201, 249, 75, 3, 61, 249, 75, 3, 76, 249, 75, 3, 74,
- 249, 75, 3, 78, 249, 75, 3, 69, 249, 75, 3, 235, 147, 249, 75, 3, 235,
- 74, 249, 75, 3, 176, 249, 75, 3, 234, 188, 249, 75, 3, 234, 98, 249, 75,
- 3, 234, 34, 249, 75, 3, 233, 223, 249, 75, 3, 233, 141, 249, 75, 3, 233,
- 64, 249, 75, 3, 232, 247, 249, 75, 3, 232, 162, 249, 75, 3, 232, 103,
- 249, 75, 3, 186, 249, 75, 3, 231, 96, 249, 75, 3, 230, 235, 249, 75, 3,
- 230, 166, 249, 75, 3, 230, 107, 249, 75, 3, 198, 249, 75, 3, 229, 112,
- 249, 75, 3, 228, 238, 249, 75, 3, 228, 79, 249, 75, 3, 227, 242, 249, 75,
- 3, 191, 249, 75, 3, 225, 224, 249, 75, 3, 225, 111, 249, 75, 3, 225, 19,
- 249, 75, 3, 224, 153, 249, 75, 3, 205, 249, 75, 3, 223, 131, 249, 75, 3,
- 223, 38, 249, 75, 3, 222, 213, 249, 75, 3, 222, 142, 249, 75, 3, 206,
- 249, 75, 3, 221, 183, 249, 75, 3, 219, 193, 249, 75, 3, 219, 60, 249, 75,
- 3, 218, 84, 249, 75, 3, 217, 106, 249, 75, 3, 217, 23, 249, 75, 3, 216,
- 118, 249, 75, 3, 112, 249, 75, 3, 215, 119, 249, 75, 3, 212, 65, 249, 75,
- 3, 212, 22, 249, 75, 3, 211, 250, 249, 75, 3, 211, 227, 249, 75, 3, 211,
- 165, 249, 75, 3, 211, 162, 249, 75, 3, 210, 116, 249, 75, 3, 210, 23,
- 236, 8, 254, 35, 1, 254, 177, 236, 8, 254, 35, 1, 252, 33, 236, 8, 254,
- 35, 1, 242, 208, 236, 8, 254, 35, 1, 248, 196, 236, 8, 254, 35, 1, 241,
- 245, 236, 8, 254, 35, 1, 212, 30, 236, 8, 254, 35, 1, 210, 97, 236, 8,
- 254, 35, 1, 241, 202, 236, 8, 254, 35, 1, 216, 227, 236, 8, 254, 35, 1,
- 210, 232, 236, 8, 254, 35, 1, 234, 231, 236, 8, 254, 35, 1, 233, 99, 236,
- 8, 254, 35, 1, 231, 70, 236, 8, 254, 35, 1, 227, 198, 236, 8, 254, 35, 1,
- 221, 251, 236, 8, 254, 35, 1, 253, 170, 236, 8, 254, 35, 1, 225, 224,
- 236, 8, 254, 35, 1, 222, 26, 236, 8, 254, 35, 1, 224, 37, 236, 8, 254,
- 35, 1, 223, 70, 236, 8, 254, 35, 1, 220, 22, 236, 8, 254, 35, 1, 217, 37,
- 236, 8, 254, 35, 221, 175, 50, 236, 8, 254, 35, 54, 111, 236, 8, 254, 35,
- 54, 105, 236, 8, 254, 35, 54, 158, 236, 8, 254, 35, 54, 216, 248, 236, 8,
- 254, 35, 54, 215, 73, 236, 8, 254, 35, 54, 123, 240, 217, 236, 8, 254,
- 35, 54, 123, 216, 148, 236, 8, 254, 35, 54, 216, 249, 216, 148, 225, 122,
- 1, 254, 174, 225, 122, 1, 252, 36, 225, 122, 1, 243, 116, 225, 122, 1,
- 248, 64, 225, 122, 1, 241, 245, 225, 122, 1, 212, 37, 225, 122, 1, 210,
- 110, 225, 122, 1, 241, 204, 225, 122, 1, 216, 231, 225, 122, 1, 210, 233,
- 225, 122, 1, 235, 0, 225, 122, 1, 233, 105, 225, 122, 1, 231, 70, 225,
- 122, 1, 227, 198, 225, 122, 1, 220, 146, 225, 122, 1, 254, 205, 225, 122,
- 1, 225, 224, 225, 122, 1, 222, 27, 225, 122, 1, 224, 42, 225, 122, 1,
- 222, 191, 225, 122, 1, 220, 22, 225, 122, 1, 217, 42, 225, 122, 54, 111,
- 225, 122, 54, 216, 248, 225, 122, 54, 215, 73, 225, 122, 54, 123, 240,
- 217, 225, 122, 54, 105, 225, 122, 54, 158, 225, 122, 211, 209, 220, 139,
- 232, 64, 1, 61, 232, 64, 1, 253, 166, 232, 64, 1, 243, 209, 232, 64, 1,
- 249, 68, 232, 64, 1, 76, 232, 64, 1, 214, 105, 232, 64, 1, 74, 232, 64,
- 1, 211, 117, 232, 64, 1, 235, 29, 232, 64, 1, 156, 232, 64, 1, 194, 232,
- 64, 1, 230, 30, 232, 64, 1, 78, 232, 64, 1, 153, 232, 64, 1, 218, 228,
- 232, 64, 1, 217, 153, 232, 64, 1, 69, 232, 64, 1, 245, 14, 232, 64, 1,
- 224, 99, 232, 64, 1, 222, 93, 232, 64, 1, 215, 160, 232, 64, 1, 254, 131,
- 232, 64, 1, 245, 158, 232, 64, 1, 232, 67, 232, 64, 1, 228, 116, 232, 64,
- 1, 251, 74, 232, 64, 215, 223, 79, 231, 53, 241, 181, 1, 61, 231, 53,
- 241, 181, 1, 76, 231, 53, 241, 181, 1, 74, 231, 53, 241, 181, 1, 78, 231,
- 53, 241, 181, 1, 192, 231, 53, 241, 181, 1, 212, 65, 231, 53, 241, 181,
- 1, 252, 199, 231, 53, 241, 181, 1, 252, 198, 231, 53, 241, 181, 1, 191,
- 231, 53, 241, 181, 1, 186, 231, 53, 241, 181, 1, 198, 231, 53, 241, 181,
- 1, 229, 233, 231, 53, 241, 181, 1, 229, 112, 231, 53, 241, 181, 1, 229,
- 111, 231, 53, 241, 181, 1, 205, 231, 53, 241, 181, 1, 223, 190, 231, 53,
- 241, 181, 1, 233, 141, 231, 53, 241, 181, 1, 234, 138, 231, 53, 241, 181,
- 1, 241, 196, 231, 53, 241, 181, 1, 206, 231, 53, 241, 181, 1, 222, 35,
- 231, 53, 241, 181, 1, 221, 183, 231, 53, 241, 181, 1, 176, 231, 53, 241,
- 181, 1, 224, 91, 231, 53, 241, 181, 1, 217, 106, 231, 53, 241, 181, 1,
- 217, 105, 231, 53, 241, 181, 1, 217, 23, 231, 53, 241, 181, 1, 217, 22,
- 231, 53, 241, 181, 1, 112, 231, 53, 241, 181, 1, 248, 229, 231, 53, 241,
- 181, 16, 213, 170, 231, 53, 241, 181, 16, 213, 169, 231, 53, 249, 102, 1,
- 61, 231, 53, 249, 102, 1, 76, 231, 53, 249, 102, 1, 74, 231, 53, 249,
- 102, 1, 78, 231, 53, 249, 102, 1, 192, 231, 53, 249, 102, 1, 212, 65,
- 231, 53, 249, 102, 1, 252, 199, 231, 53, 249, 102, 1, 191, 231, 53, 249,
- 102, 1, 186, 231, 53, 249, 102, 1, 198, 231, 53, 249, 102, 1, 229, 112,
- 231, 53, 249, 102, 1, 205, 231, 53, 249, 102, 1, 233, 141, 231, 53, 249,
- 102, 1, 234, 138, 231, 53, 249, 102, 1, 241, 196, 231, 53, 249, 102, 1,
- 206, 231, 53, 249, 102, 1, 254, 31, 206, 231, 53, 249, 102, 1, 221, 183,
- 231, 53, 249, 102, 1, 176, 231, 53, 249, 102, 1, 224, 91, 231, 53, 249,
- 102, 1, 217, 106, 231, 53, 249, 102, 1, 217, 23, 231, 53, 249, 102, 1,
- 112, 231, 53, 249, 102, 1, 248, 229, 231, 53, 249, 102, 232, 151, 222,
- 219, 231, 53, 249, 102, 232, 151, 236, 13, 234, 126, 1, 61, 234, 126, 25,
- 5, 74, 234, 126, 25, 5, 69, 234, 126, 25, 5, 149, 153, 234, 126, 25, 5,
- 76, 234, 126, 25, 5, 78, 234, 126, 25, 233, 29, 79, 234, 126, 5, 52, 222,
- 237, 51, 234, 126, 5, 254, 83, 234, 126, 5, 213, 147, 234, 126, 1, 176,
- 234, 126, 1, 234, 138, 234, 126, 1, 243, 142, 234, 126, 1, 243, 0, 234,
- 126, 1, 251, 41, 234, 126, 1, 250, 165, 234, 126, 1, 235, 147, 234, 126,
- 1, 227, 169, 234, 126, 1, 215, 157, 234, 126, 1, 215, 145, 234, 126, 1,
- 248, 143, 234, 126, 1, 248, 127, 234, 126, 1, 228, 115, 234, 126, 1, 217,
- 106, 234, 126, 1, 216, 209, 234, 126, 1, 248, 229, 234, 126, 1, 248, 33,
- 234, 126, 1, 198, 234, 126, 1, 191, 234, 126, 1, 225, 150, 234, 126, 1,
- 252, 199, 234, 126, 1, 252, 26, 234, 126, 1, 186, 234, 126, 1, 192, 234,
- 126, 1, 205, 234, 126, 1, 233, 141, 234, 126, 1, 214, 27, 234, 126, 1,
- 220, 104, 234, 126, 1, 218, 225, 234, 126, 1, 206, 234, 126, 1, 210, 116,
- 234, 126, 1, 162, 234, 126, 1, 234, 52, 234, 126, 1, 215, 125, 234, 126,
- 5, 252, 149, 48, 234, 126, 5, 250, 229, 234, 126, 5, 59, 51, 234, 126,
- 213, 152, 234, 126, 21, 111, 234, 126, 21, 105, 234, 126, 21, 158, 234,
- 126, 21, 161, 234, 126, 54, 216, 248, 234, 126, 54, 215, 73, 234, 126,
- 54, 123, 240, 217, 234, 126, 54, 123, 216, 148, 234, 126, 224, 144, 247,
- 128, 234, 126, 224, 144, 4, 250, 43, 234, 126, 224, 144, 250, 43, 234,
- 126, 224, 144, 249, 145, 130, 234, 126, 224, 144, 231, 185, 234, 126,
- 224, 144, 232, 121, 234, 126, 224, 144, 248, 186, 234, 126, 224, 144, 52,
- 248, 186, 234, 126, 224, 144, 232, 213, 55, 219, 30, 254, 46, 1, 241,
- 245, 55, 219, 30, 254, 46, 1, 233, 99, 55, 219, 30, 254, 46, 1, 241, 202,
- 55, 219, 30, 254, 46, 1, 231, 70, 55, 219, 30, 254, 46, 1, 224, 37, 55,
- 219, 30, 254, 46, 1, 212, 30, 55, 219, 30, 254, 46, 1, 220, 22, 55, 219,
- 30, 254, 46, 1, 223, 70, 55, 219, 30, 254, 46, 1, 252, 33, 55, 219, 30,
- 254, 46, 1, 217, 37, 55, 219, 30, 254, 46, 1, 221, 228, 55, 219, 30, 254,
- 46, 1, 234, 231, 55, 219, 30, 254, 46, 1, 227, 198, 55, 219, 30, 254, 46,
- 1, 234, 122, 55, 219, 30, 254, 46, 1, 222, 26, 55, 219, 30, 254, 46, 1,
- 221, 251, 55, 219, 30, 254, 46, 1, 244, 162, 55, 219, 30, 254, 46, 1,
- 254, 179, 55, 219, 30, 254, 46, 1, 253, 169, 55, 219, 30, 254, 46, 1,
- 248, 30, 55, 219, 30, 254, 46, 1, 242, 208, 55, 219, 30, 254, 46, 1, 248,
- 196, 55, 219, 30, 254, 46, 1, 242, 245, 55, 219, 30, 254, 46, 1, 216,
- 227, 55, 219, 30, 254, 46, 1, 210, 96, 55, 219, 30, 254, 46, 1, 248, 27,
- 55, 219, 30, 254, 46, 1, 210, 232, 55, 219, 30, 254, 46, 1, 216, 198, 55,
- 219, 30, 254, 46, 1, 216, 179, 55, 219, 30, 254, 46, 54, 111, 55, 219,
- 30, 254, 46, 54, 244, 122, 55, 219, 30, 254, 46, 132, 235, 245, 253, 180,
- 1, 61, 253, 180, 1, 255, 82, 253, 180, 1, 254, 81, 253, 180, 1, 255, 41,
- 253, 180, 1, 254, 131, 253, 180, 1, 255, 42, 253, 180, 1, 254, 252, 253,
- 180, 1, 254, 248, 253, 180, 1, 76, 253, 180, 1, 245, 217, 253, 180, 1,
- 78, 253, 180, 1, 226, 187, 253, 180, 1, 74, 253, 180, 1, 236, 40, 253,
- 180, 1, 69, 253, 180, 1, 214, 118, 253, 180, 1, 234, 188, 253, 180, 1,
- 211, 162, 253, 180, 1, 211, 128, 253, 180, 1, 211, 137, 253, 180, 1, 243,
- 69, 253, 180, 1, 243, 31, 253, 180, 1, 242, 243, 253, 180, 1, 250, 198,
- 253, 180, 1, 235, 132, 253, 180, 1, 217, 23, 253, 180, 1, 216, 196, 253,
- 180, 1, 248, 98, 253, 180, 1, 248, 25, 253, 180, 1, 215, 152, 253, 180,
- 1, 225, 224, 253, 180, 1, 244, 162, 253, 180, 1, 252, 83, 253, 180, 1,
- 252, 22, 253, 180, 1, 229, 69, 253, 180, 1, 228, 244, 253, 180, 1, 228,
- 245, 253, 180, 1, 229, 112, 253, 180, 1, 227, 160, 253, 180, 1, 228, 110,
- 253, 180, 1, 231, 96, 253, 180, 1, 241, 123, 253, 180, 1, 210, 166, 253,
- 180, 1, 211, 47, 253, 180, 1, 213, 255, 253, 180, 1, 223, 131, 253, 180,
- 1, 233, 64, 253, 180, 1, 221, 183, 253, 180, 1, 210, 94, 253, 180, 1,
- 220, 65, 253, 180, 1, 210, 74, 253, 180, 1, 219, 200, 253, 180, 1, 218,
- 195, 253, 180, 1, 241, 245, 253, 180, 255, 30, 79, 216, 80, 113, 170,
- 115, 123, 59, 224, 143, 4, 113, 170, 115, 123, 59, 224, 143, 233, 91,
- 113, 170, 115, 123, 59, 224, 143, 233, 91, 123, 59, 115, 113, 170, 224,
- 143, 233, 91, 113, 222, 235, 115, 123, 222, 237, 224, 143, 233, 91, 123,
- 222, 237, 115, 113, 222, 235, 224, 143, 235, 225, 226, 2, 1, 254, 177,
- 235, 225, 226, 2, 1, 252, 33, 235, 225, 226, 2, 1, 242, 208, 235, 225,
- 226, 2, 1, 248, 196, 235, 225, 226, 2, 1, 241, 245, 235, 225, 226, 2, 1,
- 212, 30, 235, 225, 226, 2, 1, 210, 97, 235, 225, 226, 2, 1, 241, 202,
- 235, 225, 226, 2, 1, 216, 227, 235, 225, 226, 2, 1, 210, 232, 235, 225,
- 226, 2, 1, 234, 231, 235, 225, 226, 2, 1, 233, 99, 235, 225, 226, 2, 1,
- 231, 70, 235, 225, 226, 2, 1, 227, 198, 235, 225, 226, 2, 1, 221, 251,
- 235, 225, 226, 2, 1, 253, 170, 235, 225, 226, 2, 1, 225, 224, 235, 225,
- 226, 2, 1, 222, 26, 235, 225, 226, 2, 1, 224, 37, 235, 225, 226, 2, 1,
- 223, 70, 235, 225, 226, 2, 1, 220, 22, 235, 225, 226, 2, 1, 217, 37, 235,
- 225, 226, 2, 54, 111, 235, 225, 226, 2, 54, 105, 235, 225, 226, 2, 54,
- 158, 235, 225, 226, 2, 54, 161, 235, 225, 226, 2, 54, 216, 248, 235, 225,
- 226, 2, 54, 215, 73, 235, 225, 226, 2, 54, 123, 240, 217, 235, 225, 226,
- 2, 54, 123, 216, 148, 235, 225, 226, 76, 1, 254, 177, 235, 225, 226, 76,
- 1, 252, 33, 235, 225, 226, 76, 1, 242, 208, 235, 225, 226, 76, 1, 248,
- 196, 235, 225, 226, 76, 1, 241, 245, 235, 225, 226, 76, 1, 212, 29, 235,
- 225, 226, 76, 1, 210, 97, 235, 225, 226, 76, 1, 241, 202, 235, 225, 226,
- 76, 1, 216, 227, 235, 225, 226, 76, 1, 210, 232, 235, 225, 226, 76, 1,
- 234, 231, 235, 225, 226, 76, 1, 233, 99, 235, 225, 226, 76, 1, 231, 69,
- 235, 225, 226, 76, 1, 227, 198, 235, 225, 226, 76, 1, 221, 251, 235, 225,
- 226, 76, 1, 225, 224, 235, 225, 226, 76, 1, 222, 26, 235, 225, 226, 76,
- 1, 220, 22, 235, 225, 226, 76, 1, 217, 37, 235, 225, 226, 76, 54, 111,
- 235, 225, 226, 76, 54, 105, 235, 225, 226, 76, 54, 158, 235, 225, 226,
- 76, 54, 161, 235, 225, 226, 76, 54, 216, 248, 235, 225, 226, 76, 54, 215,
- 73, 235, 225, 226, 76, 54, 123, 240, 217, 235, 225, 226, 76, 54, 123,
- 216, 148, 55, 202, 1, 226, 153, 61, 55, 202, 1, 211, 37, 61, 55, 202, 1,
- 211, 37, 254, 252, 55, 202, 1, 226, 153, 74, 55, 202, 1, 211, 37, 74, 55,
- 202, 1, 211, 37, 76, 55, 202, 1, 226, 153, 78, 55, 202, 1, 226, 153, 226,
- 238, 55, 202, 1, 211, 37, 226, 238, 55, 202, 1, 226, 153, 255, 34, 55,
- 202, 1, 211, 37, 255, 34, 55, 202, 1, 226, 153, 254, 251, 55, 202, 1,
- 211, 37, 254, 251, 55, 202, 1, 226, 153, 254, 225, 55, 202, 1, 211, 37,
- 254, 225, 55, 202, 1, 226, 153, 254, 246, 55, 202, 1, 211, 37, 254, 246,
- 55, 202, 1, 226, 153, 255, 8, 55, 202, 1, 211, 37, 255, 8, 55, 202, 1,
- 226, 153, 254, 250, 55, 202, 1, 226, 153, 245, 20, 55, 202, 1, 211, 37,
- 245, 20, 55, 202, 1, 226, 153, 253, 175, 55, 202, 1, 211, 37, 253, 175,
- 55, 202, 1, 226, 153, 254, 233, 55, 202, 1, 211, 37, 254, 233, 55, 202,
- 1, 226, 153, 254, 244, 55, 202, 1, 211, 37, 254, 244, 55, 202, 1, 226,
- 153, 226, 237, 55, 202, 1, 211, 37, 226, 237, 55, 202, 1, 226, 153, 254,
- 187, 55, 202, 1, 211, 37, 254, 187, 55, 202, 1, 226, 153, 254, 243, 55,
- 202, 1, 226, 153, 245, 169, 55, 202, 1, 226, 153, 245, 167, 55, 202, 1,
- 226, 153, 254, 131, 55, 202, 1, 226, 153, 254, 241, 55, 202, 1, 211, 37,
- 254, 241, 55, 202, 1, 226, 153, 245, 139, 55, 202, 1, 211, 37, 245, 139,
- 55, 202, 1, 226, 153, 245, 155, 55, 202, 1, 211, 37, 245, 155, 55, 202,
- 1, 226, 153, 245, 126, 55, 202, 1, 211, 37, 245, 126, 55, 202, 1, 211,
- 37, 254, 123, 55, 202, 1, 226, 153, 245, 146, 55, 202, 1, 211, 37, 254,
- 240, 55, 202, 1, 226, 153, 245, 116, 55, 202, 1, 226, 153, 226, 179, 55,
- 202, 1, 226, 153, 240, 120, 55, 202, 1, 226, 153, 245, 223, 55, 202, 1,
- 211, 37, 245, 223, 55, 202, 1, 226, 153, 254, 53, 55, 202, 1, 211, 37,
- 254, 53, 55, 202, 1, 226, 153, 235, 188, 55, 202, 1, 211, 37, 235, 188,
- 55, 202, 1, 226, 153, 226, 163, 55, 202, 1, 211, 37, 226, 163, 55, 202,
- 1, 226, 153, 254, 49, 55, 202, 1, 211, 37, 254, 49, 55, 202, 1, 226, 153,
- 254, 239, 55, 202, 1, 226, 153, 253, 245, 55, 202, 1, 226, 153, 254, 237,
- 55, 202, 1, 226, 153, 253, 239, 55, 202, 1, 211, 37, 253, 239, 55, 202,
- 1, 226, 153, 245, 83, 55, 202, 1, 211, 37, 245, 83, 55, 202, 1, 226, 153,
- 253, 214, 55, 202, 1, 211, 37, 253, 214, 55, 202, 1, 226, 153, 254, 234,
- 55, 202, 1, 211, 37, 254, 234, 55, 202, 1, 226, 153, 226, 144, 55, 202,
- 1, 226, 153, 252, 133, 222, 129, 21, 111, 222, 129, 21, 105, 222, 129,
- 21, 158, 222, 129, 21, 161, 222, 129, 21, 190, 222, 129, 21, 195, 222,
- 129, 21, 199, 222, 129, 21, 196, 222, 129, 21, 201, 222, 129, 54, 216,
- 248, 222, 129, 54, 215, 73, 222, 129, 54, 216, 163, 222, 129, 54, 244,
- 23, 222, 129, 54, 244, 122, 222, 129, 54, 219, 113, 222, 129, 54, 220,
- 118, 222, 129, 54, 245, 192, 222, 129, 54, 228, 200, 222, 129, 54, 123,
- 240, 217, 222, 129, 54, 113, 240, 217, 222, 129, 54, 134, 240, 217, 222,
- 129, 54, 244, 19, 240, 217, 222, 129, 54, 244, 89, 240, 217, 222, 129,
- 54, 219, 127, 240, 217, 222, 129, 54, 220, 124, 240, 217, 222, 129, 54,
- 245, 201, 240, 217, 222, 129, 54, 228, 205, 240, 217, 222, 129, 244, 10,
- 123, 242, 34, 222, 129, 244, 10, 123, 224, 24, 222, 129, 244, 10, 123,
- 216, 169, 222, 129, 244, 10, 113, 216, 167, 118, 5, 251, 7, 118, 5, 254,
- 83, 118, 5, 213, 147, 118, 5, 235, 108, 118, 5, 214, 161, 118, 1, 61,
- 118, 1, 255, 82, 118, 1, 74, 118, 1, 236, 40, 118, 1, 69, 118, 1, 214,
- 118, 118, 1, 149, 153, 118, 1, 149, 222, 182, 118, 1, 149, 156, 118, 1,
- 149, 232, 191, 118, 1, 76, 118, 1, 254, 210, 118, 1, 78, 118, 1, 253,
- 200, 118, 1, 176, 118, 1, 234, 138, 118, 1, 243, 142, 118, 1, 243, 0,
- 118, 1, 229, 82, 118, 1, 251, 41, 118, 1, 250, 165, 118, 1, 235, 147,
- 118, 1, 235, 120, 118, 1, 227, 169, 118, 1, 215, 157, 118, 1, 215, 145,
- 118, 1, 248, 143, 118, 1, 248, 127, 118, 1, 228, 115, 118, 1, 217, 106,
- 118, 1, 216, 209, 118, 1, 248, 229, 118, 1, 248, 33, 118, 1, 198, 118, 1,
- 191, 118, 1, 225, 150, 118, 1, 252, 199, 118, 1, 252, 26, 118, 1, 186,
- 118, 1, 192, 118, 1, 205, 118, 1, 233, 141, 118, 1, 214, 27, 118, 1, 220,
- 104, 118, 1, 218, 225, 118, 1, 206, 118, 1, 162, 118, 1, 232, 190, 118,
- 1, 55, 36, 232, 181, 118, 1, 55, 36, 222, 181, 118, 1, 55, 36, 228, 97,
- 118, 25, 5, 255, 82, 118, 25, 5, 252, 23, 255, 82, 118, 25, 5, 74, 118,
- 25, 5, 236, 40, 118, 25, 5, 69, 118, 25, 5, 214, 118, 118, 25, 5, 149,
- 153, 118, 25, 5, 149, 222, 182, 118, 25, 5, 149, 156, 118, 25, 5, 149,
- 232, 191, 118, 25, 5, 76, 118, 25, 5, 254, 210, 118, 25, 5, 78, 118, 25,
- 5, 253, 200, 118, 213, 152, 118, 248, 186, 118, 52, 248, 186, 118, 224,
- 144, 247, 128, 118, 224, 144, 52, 247, 128, 118, 224, 144, 232, 219, 118,
- 224, 144, 249, 145, 130, 118, 224, 144, 232, 121, 118, 54, 111, 118, 54,
- 105, 118, 54, 158, 118, 54, 161, 118, 54, 190, 118, 54, 195, 118, 54,
- 199, 118, 54, 196, 118, 54, 201, 118, 54, 216, 248, 118, 54, 215, 73,
- 118, 54, 216, 163, 118, 54, 244, 23, 118, 54, 244, 122, 118, 54, 219,
- 113, 118, 54, 220, 118, 118, 54, 245, 192, 118, 54, 228, 200, 118, 54,
- 123, 240, 217, 118, 54, 123, 216, 148, 118, 21, 210, 86, 118, 21, 111,
- 118, 21, 105, 118, 21, 158, 118, 21, 161, 118, 21, 190, 118, 21, 195,
- 118, 21, 199, 118, 21, 196, 118, 21, 201, 234, 250, 5, 251, 7, 234, 250,
- 5, 254, 83, 234, 250, 5, 213, 147, 234, 250, 1, 61, 234, 250, 1, 255, 82,
- 234, 250, 1, 74, 234, 250, 1, 236, 40, 234, 250, 1, 69, 234, 250, 1, 214,
- 118, 234, 250, 1, 76, 234, 250, 1, 254, 210, 234, 250, 1, 78, 234, 250,
- 1, 253, 200, 234, 250, 1, 176, 234, 250, 1, 234, 138, 234, 250, 1, 243,
- 142, 234, 250, 1, 243, 0, 234, 250, 1, 229, 82, 234, 250, 1, 251, 41,
- 234, 250, 1, 250, 165, 234, 250, 1, 235, 147, 234, 250, 1, 235, 120, 234,
- 250, 1, 227, 169, 234, 250, 1, 215, 157, 234, 250, 1, 215, 145, 234, 250,
- 1, 248, 143, 234, 250, 1, 248, 132, 234, 250, 1, 248, 127, 234, 250, 1,
- 223, 42, 234, 250, 1, 228, 115, 234, 250, 1, 217, 106, 234, 250, 1, 216,
- 209, 234, 250, 1, 248, 229, 234, 250, 1, 248, 33, 234, 250, 1, 198, 234,
- 250, 1, 191, 234, 250, 1, 225, 150, 234, 250, 1, 252, 199, 234, 250, 1,
- 252, 26, 234, 250, 1, 186, 234, 250, 1, 192, 234, 250, 1, 205, 234, 250,
- 1, 233, 141, 234, 250, 1, 214, 27, 234, 250, 1, 220, 104, 234, 250, 1,
- 218, 225, 234, 250, 1, 206, 234, 250, 1, 162, 234, 250, 25, 5, 255, 82,
- 234, 250, 25, 5, 74, 234, 250, 25, 5, 236, 40, 234, 250, 25, 5, 69, 234,
- 250, 25, 5, 214, 118, 234, 250, 25, 5, 76, 234, 250, 25, 5, 254, 210,
- 234, 250, 25, 5, 78, 234, 250, 25, 5, 253, 200, 234, 250, 5, 213, 152,
- 234, 250, 5, 227, 209, 234, 250, 255, 30, 50, 234, 250, 245, 129, 50,
- 234, 250, 54, 50, 234, 250, 221, 175, 79, 234, 250, 52, 221, 175, 79,
- 234, 250, 248, 186, 234, 250, 52, 248, 186, 219, 38, 219, 46, 1, 222, 20,
- 219, 38, 219, 46, 1, 217, 81, 219, 38, 219, 46, 1, 252, 176, 219, 38,
- 219, 46, 1, 251, 31, 219, 38, 219, 46, 1, 248, 211, 219, 38, 219, 46, 1,
- 243, 127, 219, 38, 219, 46, 1, 231, 215, 219, 38, 219, 46, 1, 229, 79,
- 219, 38, 219, 46, 1, 233, 118, 219, 38, 219, 46, 1, 229, 218, 219, 38,
- 219, 46, 1, 214, 24, 219, 38, 219, 46, 1, 226, 77, 219, 38, 219, 46, 1,
- 211, 84, 219, 38, 219, 46, 1, 223, 171, 219, 38, 219, 46, 1, 242, 44,
- 219, 38, 219, 46, 1, 234, 254, 219, 38, 219, 46, 1, 235, 142, 219, 38,
- 219, 46, 1, 227, 166, 219, 38, 219, 46, 1, 254, 218, 219, 38, 219, 46, 1,
- 245, 215, 219, 38, 219, 46, 1, 236, 41, 219, 38, 219, 46, 1, 214, 208,
- 219, 38, 219, 46, 1, 226, 226, 219, 38, 219, 46, 1, 245, 205, 219, 38,
- 219, 46, 1, 231, 228, 219, 38, 219, 46, 21, 210, 86, 219, 38, 219, 46,
- 21, 111, 219, 38, 219, 46, 21, 105, 219, 38, 219, 46, 21, 158, 219, 38,
- 219, 46, 21, 161, 219, 38, 219, 46, 21, 190, 219, 38, 219, 46, 21, 195,
- 219, 38, 219, 46, 21, 199, 219, 38, 219, 46, 21, 196, 219, 38, 219, 46,
- 21, 201, 250, 159, 5, 251, 7, 250, 159, 5, 254, 83, 250, 159, 5, 213,
- 147, 250, 159, 1, 255, 82, 250, 159, 1, 74, 250, 159, 1, 69, 250, 159, 1,
- 76, 250, 159, 1, 235, 16, 250, 159, 1, 234, 137, 250, 159, 1, 243, 139,
- 250, 159, 1, 242, 255, 250, 159, 1, 229, 81, 250, 159, 1, 251, 40, 250,
- 159, 1, 250, 164, 250, 159, 1, 235, 146, 250, 159, 1, 235, 119, 250, 159,
- 1, 227, 168, 250, 159, 1, 215, 156, 250, 159, 1, 215, 144, 250, 159, 1,
- 248, 142, 250, 159, 1, 248, 126, 250, 159, 1, 228, 114, 250, 159, 1, 217,
- 102, 250, 159, 1, 216, 208, 250, 159, 1, 248, 228, 250, 159, 1, 248, 32,
- 250, 159, 1, 229, 230, 250, 159, 1, 226, 93, 250, 159, 1, 225, 149, 250,
- 159, 1, 252, 197, 250, 159, 1, 252, 25, 250, 159, 1, 231, 242, 250, 159,
- 1, 210, 167, 250, 159, 1, 211, 103, 250, 159, 1, 223, 187, 250, 159, 1,
- 233, 140, 250, 159, 1, 212, 64, 250, 159, 1, 222, 33, 250, 159, 1, 242,
- 53, 250, 159, 25, 5, 61, 250, 159, 25, 5, 74, 250, 159, 25, 5, 236, 40,
- 250, 159, 25, 5, 69, 250, 159, 25, 5, 214, 118, 250, 159, 25, 5, 76, 250,
- 159, 25, 5, 254, 210, 250, 159, 25, 5, 78, 250, 159, 25, 5, 253, 200,
- 250, 159, 25, 5, 226, 223, 250, 159, 144, 79, 250, 159, 253, 201, 79,
- 250, 159, 213, 152, 250, 159, 231, 240, 250, 159, 21, 210, 86, 250, 159,
- 21, 111, 250, 159, 21, 105, 250, 159, 21, 158, 250, 159, 21, 161, 250,
- 159, 21, 190, 250, 159, 21, 195, 250, 159, 21, 199, 250, 159, 21, 196,
- 250, 159, 21, 201, 250, 159, 221, 175, 79, 250, 159, 248, 186, 250, 159,
- 52, 248, 186, 250, 159, 224, 16, 79, 174, 5, 251, 7, 174, 5, 254, 83,
- 174, 5, 213, 147, 174, 1, 61, 174, 1, 255, 82, 174, 1, 74, 174, 1, 236,
- 40, 174, 1, 69, 174, 1, 214, 118, 174, 1, 149, 153, 174, 1, 149, 222,
- 182, 174, 1, 149, 156, 174, 1, 149, 232, 191, 174, 1, 76, 174, 1, 254,
- 210, 174, 1, 78, 174, 1, 253, 200, 174, 1, 176, 174, 1, 234, 138, 174, 1,
- 243, 142, 174, 1, 243, 0, 174, 1, 229, 82, 174, 1, 251, 41, 174, 1, 250,
- 165, 174, 1, 235, 147, 174, 1, 235, 120, 174, 1, 227, 169, 174, 1, 215,
- 157, 174, 1, 215, 145, 174, 1, 248, 143, 174, 1, 248, 127, 174, 1, 228,
- 115, 174, 1, 217, 106, 174, 1, 216, 209, 174, 1, 248, 229, 174, 1, 248,
- 33, 174, 1, 198, 174, 1, 191, 174, 1, 225, 150, 174, 1, 252, 199, 174, 1,
- 252, 26, 174, 1, 186, 174, 1, 192, 174, 1, 205, 174, 1, 233, 141, 174, 1,
- 232, 190, 174, 1, 214, 27, 174, 1, 220, 104, 174, 1, 218, 225, 174, 1,
- 206, 174, 1, 162, 174, 25, 5, 255, 82, 174, 25, 5, 74, 174, 25, 5, 236,
- 40, 174, 25, 5, 69, 174, 25, 5, 214, 118, 174, 25, 5, 149, 153, 174, 25,
- 5, 149, 222, 182, 174, 25, 5, 149, 156, 174, 25, 5, 149, 232, 191, 174,
- 25, 5, 76, 174, 25, 5, 254, 210, 174, 25, 5, 78, 174, 25, 5, 253, 200,
- 174, 5, 213, 152, 174, 5, 253, 183, 174, 5, 235, 108, 174, 5, 214, 161,
- 174, 226, 208, 174, 248, 186, 174, 52, 248, 186, 174, 255, 30, 50, 174,
- 220, 139, 174, 21, 210, 86, 174, 21, 111, 174, 21, 105, 174, 21, 158,
- 174, 21, 161, 174, 21, 190, 174, 21, 195, 174, 21, 199, 174, 21, 196,
- 174, 21, 201, 217, 70, 1, 61, 217, 70, 1, 255, 82, 217, 70, 1, 74, 217,
- 70, 1, 236, 40, 217, 70, 1, 69, 217, 70, 1, 214, 118, 217, 70, 1, 76,
- 217, 70, 1, 254, 210, 217, 70, 1, 78, 217, 70, 1, 253, 200, 217, 70, 1,
- 176, 217, 70, 1, 234, 138, 217, 70, 1, 243, 142, 217, 70, 1, 243, 0, 217,
- 70, 1, 229, 82, 217, 70, 1, 251, 41, 217, 70, 1, 250, 165, 217, 70, 1,
- 235, 147, 217, 70, 1, 235, 120, 217, 70, 1, 227, 169, 217, 70, 1, 215,
- 157, 217, 70, 1, 215, 145, 217, 70, 1, 248, 143, 217, 70, 1, 248, 127,
- 217, 70, 1, 228, 115, 217, 70, 1, 217, 106, 217, 70, 1, 216, 209, 217,
- 70, 1, 248, 229, 217, 70, 1, 248, 33, 217, 70, 1, 198, 217, 70, 1, 191,
- 217, 70, 1, 225, 150, 217, 70, 1, 252, 199, 217, 70, 1, 252, 26, 217, 70,
- 1, 186, 217, 70, 1, 192, 217, 70, 1, 205, 217, 70, 1, 233, 141, 217, 70,
- 1, 214, 27, 217, 70, 1, 220, 104, 217, 70, 1, 206, 217, 70, 1, 162, 217,
- 70, 1, 222, 181, 217, 70, 5, 254, 83, 217, 70, 5, 213, 147, 217, 70, 25,
- 5, 255, 82, 217, 70, 25, 5, 74, 217, 70, 25, 5, 236, 40, 217, 70, 25, 5,
- 69, 217, 70, 25, 5, 214, 118, 217, 70, 25, 5, 76, 217, 70, 25, 5, 254,
- 210, 217, 70, 25, 5, 78, 217, 70, 25, 5, 253, 200, 217, 70, 5, 213, 152,
- 217, 70, 5, 227, 209, 217, 70, 21, 210, 86, 217, 70, 21, 111, 217, 70,
- 21, 105, 217, 70, 21, 158, 217, 70, 21, 161, 217, 70, 21, 190, 217, 70,
- 21, 195, 217, 70, 21, 199, 217, 70, 21, 196, 217, 70, 21, 201, 15, 5, 61,
- 15, 5, 116, 30, 61, 15, 5, 116, 30, 252, 184, 15, 5, 116, 30, 243, 112,
- 216, 240, 15, 5, 116, 30, 162, 15, 5, 116, 30, 236, 42, 15, 5, 116, 30,
- 233, 122, 242, 101, 15, 5, 116, 30, 230, 66, 15, 5, 116, 30, 222, 23, 15,
- 5, 255, 84, 15, 5, 255, 34, 15, 5, 255, 35, 30, 253, 237, 15, 5, 255, 35,
- 30, 246, 75, 242, 101, 15, 5, 255, 35, 30, 243, 125, 15, 5, 255, 35, 30,
- 243, 112, 216, 240, 15, 5, 255, 35, 30, 162, 15, 5, 255, 35, 30, 236, 43,
- 242, 101, 15, 5, 255, 35, 30, 236, 16, 15, 5, 255, 35, 30, 233, 123, 15,
- 5, 255, 35, 30, 220, 50, 15, 5, 255, 35, 30, 104, 96, 104, 96, 69, 15, 5,
- 255, 35, 242, 101, 15, 5, 255, 32, 15, 5, 255, 33, 30, 252, 168, 15, 5,
- 255, 33, 30, 243, 112, 216, 240, 15, 5, 255, 33, 30, 231, 97, 96, 245,
- 158, 15, 5, 255, 33, 30, 220, 102, 15, 5, 255, 33, 30, 217, 73, 15, 5,
- 255, 8, 15, 5, 254, 195, 15, 5, 254, 196, 30, 245, 95, 15, 5, 254, 196,
- 30, 220, 12, 96, 242, 197, 15, 5, 254, 187, 15, 5, 254, 188, 30, 254,
- 187, 15, 5, 254, 188, 30, 247, 224, 15, 5, 254, 188, 30, 242, 197, 15, 5,
- 254, 188, 30, 162, 15, 5, 254, 188, 30, 235, 5, 15, 5, 254, 188, 30, 234,
- 98, 15, 5, 254, 188, 30, 220, 65, 15, 5, 254, 188, 30, 214, 126, 15, 5,
- 254, 184, 15, 5, 254, 177, 15, 5, 254, 140, 15, 5, 254, 141, 30, 220, 65,
- 15, 5, 254, 131, 15, 5, 254, 132, 115, 254, 131, 15, 5, 254, 132, 134,
- 216, 86, 15, 5, 254, 132, 96, 229, 222, 226, 168, 254, 132, 96, 229, 221,
- 15, 5, 254, 132, 96, 229, 222, 218, 235, 15, 5, 254, 102, 15, 5, 254, 75,
- 15, 5, 254, 43, 15, 5, 254, 44, 30, 233, 202, 15, 5, 254, 16, 15, 5, 253,
- 244, 15, 5, 253, 239, 15, 5, 253, 240, 210, 40, 216, 240, 15, 5, 253,
- 240, 235, 9, 216, 240, 15, 5, 253, 240, 115, 253, 240, 215, 115, 115,
- 215, 115, 215, 115, 115, 215, 115, 226, 25, 15, 5, 253, 240, 115, 253,
- 240, 115, 253, 239, 15, 5, 253, 240, 115, 253, 240, 115, 253, 240, 249,
- 133, 253, 240, 115, 253, 240, 115, 253, 239, 15, 5, 253, 237, 15, 5, 253,
- 234, 15, 5, 252, 199, 15, 5, 252, 184, 15, 5, 252, 179, 15, 5, 252, 175,
- 15, 5, 252, 169, 15, 5, 252, 170, 115, 252, 169, 15, 5, 252, 168, 15, 5,
- 130, 15, 5, 252, 148, 15, 5, 252, 14, 15, 5, 252, 15, 30, 61, 15, 5, 252,
- 15, 30, 243, 103, 15, 5, 252, 15, 30, 236, 43, 242, 101, 15, 5, 251, 133,
- 15, 5, 251, 134, 115, 251, 134, 255, 34, 15, 5, 251, 134, 115, 251, 134,
- 214, 190, 15, 5, 251, 134, 249, 133, 251, 133, 15, 5, 251, 117, 15, 5,
- 251, 118, 115, 251, 117, 15, 5, 251, 106, 15, 5, 251, 105, 15, 5, 248,
- 229, 15, 5, 248, 220, 15, 5, 248, 221, 234, 72, 30, 116, 96, 231, 152,
- 15, 5, 248, 221, 234, 72, 30, 254, 140, 15, 5, 248, 221, 234, 72, 30,
- 252, 168, 15, 5, 248, 221, 234, 72, 30, 252, 14, 15, 5, 248, 221, 234,
- 72, 30, 243, 142, 15, 5, 248, 221, 234, 72, 30, 243, 143, 96, 231, 152,
- 15, 5, 248, 221, 234, 72, 30, 242, 221, 15, 5, 248, 221, 234, 72, 30,
- 242, 204, 15, 5, 248, 221, 234, 72, 30, 242, 110, 15, 5, 248, 221, 234,
- 72, 30, 162, 15, 5, 248, 221, 234, 72, 30, 235, 186, 15, 5, 248, 221,
- 234, 72, 30, 235, 187, 96, 232, 103, 15, 5, 248, 221, 234, 72, 30, 234,
- 248, 15, 5, 248, 221, 234, 72, 30, 233, 141, 15, 5, 248, 221, 234, 72,
- 30, 232, 103, 15, 5, 248, 221, 234, 72, 30, 232, 104, 96, 231, 151, 15,
- 5, 248, 221, 234, 72, 30, 232, 89, 15, 5, 248, 221, 234, 72, 30, 229,
- 112, 15, 5, 248, 221, 234, 72, 30, 226, 26, 96, 226, 25, 15, 5, 248, 221,
- 234, 72, 30, 219, 193, 15, 5, 248, 221, 234, 72, 30, 217, 73, 15, 5, 248,
- 221, 234, 72, 30, 214, 231, 96, 242, 204, 15, 5, 248, 221, 234, 72, 30,
- 214, 126, 15, 5, 248, 195, 15, 5, 248, 174, 15, 5, 248, 173, 15, 5, 248,
- 172, 15, 5, 248, 11, 15, 5, 247, 250, 15, 5, 247, 225, 15, 5, 247, 226,
- 30, 220, 65, 15, 5, 247, 224, 15, 5, 247, 214, 15, 5, 247, 215, 234, 214,
- 104, 242, 102, 247, 195, 15, 5, 247, 195, 15, 5, 246, 86, 15, 5, 246, 87,
- 115, 246, 86, 15, 5, 246, 87, 242, 101, 15, 5, 246, 87, 220, 47, 15, 5,
- 246, 84, 15, 5, 246, 85, 30, 245, 80, 15, 5, 246, 83, 15, 5, 246, 82, 15,
- 5, 246, 81, 15, 5, 246, 80, 15, 5, 246, 76, 15, 5, 246, 74, 15, 5, 246,
- 75, 242, 101, 15, 5, 246, 75, 242, 102, 242, 101, 15, 5, 246, 73, 15, 5,
- 246, 66, 15, 5, 76, 15, 5, 160, 30, 226, 25, 15, 5, 160, 115, 160, 227,
- 199, 115, 227, 198, 15, 5, 245, 242, 15, 5, 245, 243, 30, 116, 96, 242,
- 56, 96, 248, 229, 15, 5, 245, 243, 30, 243, 103, 15, 5, 245, 243, 30,
- 230, 235, 15, 5, 245, 243, 30, 222, 10, 15, 5, 245, 243, 30, 220, 65, 15,
- 5, 245, 243, 30, 69, 15, 5, 245, 219, 15, 5, 245, 208, 15, 5, 245, 182,
- 15, 5, 245, 158, 15, 5, 245, 159, 30, 243, 111, 15, 5, 245, 159, 30, 243,
- 112, 216, 240, 15, 5, 245, 159, 30, 231, 96, 15, 5, 245, 159, 249, 133,
- 245, 158, 15, 5, 245, 159, 226, 168, 245, 158, 15, 5, 245, 159, 218, 235,
- 15, 5, 245, 97, 15, 5, 245, 95, 15, 5, 245, 80, 15, 5, 245, 18, 15, 5,
- 245, 19, 30, 61, 15, 5, 245, 19, 30, 116, 96, 233, 110, 15, 5, 245, 19,
- 30, 116, 96, 233, 111, 30, 233, 110, 15, 5, 245, 19, 30, 254, 131, 15, 5,
- 245, 19, 30, 252, 184, 15, 5, 245, 19, 30, 246, 75, 242, 101, 15, 5, 245,
- 19, 30, 246, 75, 242, 102, 242, 101, 15, 5, 245, 19, 30, 162, 15, 5, 245,
- 19, 30, 242, 56, 242, 101, 15, 5, 245, 19, 30, 236, 43, 242, 101, 15, 5,
- 245, 19, 30, 234, 213, 15, 5, 245, 19, 30, 234, 214, 218, 235, 15, 5,
- 245, 19, 30, 233, 221, 15, 5, 245, 19, 30, 233, 141, 15, 5, 245, 19, 30,
- 233, 111, 30, 233, 110, 15, 5, 245, 19, 30, 232, 247, 15, 5, 245, 19, 30,
- 232, 103, 15, 5, 245, 19, 30, 214, 230, 15, 5, 245, 19, 30, 214, 219, 15,
- 5, 243, 142, 15, 5, 243, 143, 242, 101, 15, 5, 243, 140, 15, 5, 243, 141,
- 30, 116, 96, 248, 230, 96, 162, 15, 5, 243, 141, 30, 116, 96, 162, 15, 5,
- 243, 141, 30, 116, 96, 236, 42, 15, 5, 243, 141, 30, 255, 33, 216, 241,
- 96, 217, 94, 15, 5, 243, 141, 30, 254, 131, 15, 5, 243, 141, 30, 253,
- 239, 15, 5, 243, 141, 30, 253, 238, 96, 243, 125, 15, 5, 243, 141, 30,
- 252, 184, 15, 5, 243, 141, 30, 252, 149, 96, 205, 15, 5, 243, 141, 30,
- 251, 106, 15, 5, 243, 141, 30, 251, 107, 96, 205, 15, 5, 243, 141, 30,
- 248, 229, 15, 5, 243, 141, 30, 248, 11, 15, 5, 243, 141, 30, 247, 226,
- 30, 220, 65, 15, 5, 243, 141, 30, 246, 84, 15, 5, 243, 141, 30, 245, 182,
- 15, 5, 243, 141, 30, 245, 183, 96, 233, 141, 15, 5, 243, 141, 30, 245,
- 158, 15, 5, 243, 141, 30, 245, 159, 30, 243, 112, 216, 240, 15, 5, 243,
- 141, 30, 243, 112, 216, 240, 15, 5, 243, 141, 30, 243, 103, 15, 5, 243,
- 141, 30, 242, 221, 15, 5, 243, 141, 30, 242, 219, 15, 5, 243, 141, 30,
- 242, 220, 96, 61, 15, 5, 243, 141, 30, 242, 205, 96, 218, 84, 15, 5, 243,
- 141, 30, 242, 56, 96, 232, 104, 96, 245, 80, 15, 5, 243, 141, 30, 242,
- 37, 15, 5, 243, 141, 30, 242, 38, 96, 233, 141, 15, 5, 243, 141, 30, 241,
- 188, 96, 232, 247, 15, 5, 243, 141, 30, 240, 225, 15, 5, 243, 141, 30,
- 236, 43, 242, 101, 15, 5, 243, 141, 30, 235, 173, 96, 240, 230, 96, 253,
- 239, 15, 5, 243, 141, 30, 234, 248, 15, 5, 243, 141, 30, 234, 213, 15, 5,
- 243, 141, 30, 234, 95, 15, 5, 243, 141, 30, 234, 96, 96, 233, 110, 15, 5,
- 243, 141, 30, 233, 222, 96, 254, 131, 15, 5, 243, 141, 30, 233, 141, 15,
- 5, 243, 141, 30, 231, 97, 96, 245, 158, 15, 5, 243, 141, 30, 230, 235,
- 15, 5, 243, 141, 30, 227, 198, 15, 5, 243, 141, 30, 227, 199, 115, 227,
- 198, 15, 5, 243, 141, 30, 191, 15, 5, 243, 141, 30, 222, 10, 15, 5, 243,
- 141, 30, 221, 233, 15, 5, 243, 141, 30, 220, 65, 15, 5, 243, 141, 30,
- 220, 66, 96, 215, 99, 15, 5, 243, 141, 30, 220, 32, 15, 5, 243, 141, 30,
- 218, 44, 15, 5, 243, 141, 30, 217, 73, 15, 5, 243, 141, 30, 69, 15, 5,
- 243, 141, 30, 214, 219, 15, 5, 243, 141, 30, 214, 220, 96, 246, 86, 15,
- 5, 243, 141, 115, 243, 140, 15, 5, 243, 135, 15, 5, 243, 136, 249, 133,
- 243, 135, 15, 5, 243, 133, 15, 5, 243, 134, 115, 243, 134, 243, 104, 115,
- 243, 103, 15, 5, 243, 125, 15, 5, 243, 126, 243, 134, 115, 243, 134, 243,
- 104, 115, 243, 103, 15, 5, 243, 124, 15, 5, 243, 122, 15, 5, 243, 113,
- 15, 5, 243, 111, 15, 5, 243, 112, 216, 240, 15, 5, 243, 112, 115, 243,
- 111, 15, 5, 243, 112, 249, 133, 243, 111, 15, 5, 243, 103, 15, 5, 243,
- 102, 15, 5, 243, 97, 15, 5, 243, 43, 15, 5, 243, 44, 30, 233, 202, 15, 5,
- 242, 221, 15, 5, 242, 222, 30, 76, 15, 5, 242, 222, 30, 69, 15, 5, 242,
- 222, 249, 133, 242, 221, 15, 5, 242, 219, 15, 5, 242, 220, 115, 242, 219,
- 15, 5, 242, 220, 249, 133, 242, 219, 15, 5, 242, 216, 15, 5, 242, 204,
- 15, 5, 242, 205, 242, 101, 15, 5, 242, 202, 15, 5, 242, 203, 30, 116, 96,
- 236, 42, 15, 5, 242, 203, 30, 243, 112, 216, 240, 15, 5, 242, 203, 30,
- 236, 42, 15, 5, 242, 203, 30, 232, 104, 96, 236, 42, 15, 5, 242, 203, 30,
- 191, 15, 5, 242, 199, 15, 5, 242, 197, 15, 5, 242, 198, 249, 133, 242,
- 197, 15, 5, 242, 198, 30, 252, 184, 15, 5, 242, 198, 30, 217, 73, 15, 5,
- 242, 198, 216, 240, 15, 5, 242, 120, 15, 5, 242, 121, 249, 133, 242, 120,
- 15, 5, 242, 118, 15, 5, 242, 119, 30, 234, 248, 15, 5, 242, 119, 30, 234,
- 249, 30, 236, 43, 242, 101, 15, 5, 242, 119, 30, 227, 198, 15, 5, 242,
- 119, 30, 222, 11, 96, 215, 114, 15, 5, 242, 119, 242, 101, 15, 5, 242,
- 110, 15, 5, 242, 111, 30, 116, 96, 233, 202, 15, 5, 242, 111, 30, 233,
- 202, 15, 5, 242, 111, 115, 242, 111, 232, 96, 15, 5, 242, 105, 15, 5,
- 242, 103, 15, 5, 242, 104, 30, 220, 65, 15, 5, 242, 95, 15, 5, 242, 94,
- 15, 5, 242, 91, 15, 5, 242, 90, 15, 5, 162, 15, 5, 242, 56, 216, 240, 15,
- 5, 242, 56, 242, 101, 15, 5, 242, 37, 15, 5, 241, 187, 15, 5, 241, 188,
- 30, 253, 239, 15, 5, 241, 188, 30, 253, 237, 15, 5, 241, 188, 30, 252,
- 184, 15, 5, 241, 188, 30, 247, 195, 15, 5, 241, 188, 30, 243, 133, 15, 5,
- 241, 188, 30, 234, 87, 15, 5, 241, 188, 30, 227, 198, 15, 5, 241, 188,
- 30, 220, 65, 15, 5, 241, 188, 30, 69, 15, 5, 240, 229, 15, 5, 240, 225,
- 15, 5, 240, 226, 30, 254, 131, 15, 5, 240, 226, 30, 242, 37, 15, 5, 240,
- 226, 30, 234, 213, 15, 5, 240, 226, 30, 232, 203, 15, 5, 240, 226, 30,
- 214, 219, 15, 5, 240, 222, 15, 5, 74, 15, 5, 240, 161, 61, 15, 5, 240,
- 122, 15, 5, 236, 70, 15, 5, 236, 71, 115, 236, 71, 251, 106, 15, 5, 236,
- 71, 115, 236, 71, 218, 235, 15, 5, 236, 45, 15, 5, 236, 42, 15, 5, 236,
- 43, 247, 250, 15, 5, 236, 43, 223, 38, 15, 5, 236, 43, 115, 236, 43, 220,
- 16, 115, 220, 16, 214, 220, 115, 214, 219, 15, 5, 236, 43, 242, 101, 15,
- 5, 236, 34, 15, 5, 236, 35, 30, 243, 112, 216, 240, 15, 5, 236, 33, 15,
- 5, 236, 23, 15, 5, 236, 24, 30, 217, 73, 15, 5, 236, 24, 249, 133, 236,
- 23, 15, 5, 236, 24, 226, 168, 236, 23, 15, 5, 236, 24, 218, 235, 15, 5,
- 236, 16, 15, 5, 236, 6, 15, 5, 235, 186, 15, 5, 235, 172, 15, 5, 176, 15,
- 5, 235, 19, 30, 61, 15, 5, 235, 19, 30, 255, 8, 15, 5, 235, 19, 30, 255,
- 9, 96, 233, 221, 15, 5, 235, 19, 30, 253, 237, 15, 5, 235, 19, 30, 252,
- 184, 15, 5, 235, 19, 30, 252, 168, 15, 5, 235, 19, 30, 130, 15, 5, 235,
- 19, 30, 252, 14, 15, 5, 235, 19, 30, 245, 95, 15, 5, 235, 19, 30, 245,
- 80, 15, 5, 235, 19, 30, 243, 142, 15, 5, 235, 19, 30, 243, 125, 15, 5,
- 235, 19, 30, 243, 112, 216, 240, 15, 5, 235, 19, 30, 243, 103, 15, 5,
- 235, 19, 30, 243, 104, 96, 220, 103, 96, 61, 15, 5, 235, 19, 30, 242,
- 221, 15, 5, 235, 19, 30, 242, 204, 15, 5, 235, 19, 30, 242, 198, 96, 221,
- 233, 15, 5, 235, 19, 30, 242, 198, 249, 133, 242, 197, 15, 5, 235, 19,
- 30, 242, 120, 15, 5, 235, 19, 30, 242, 94, 15, 5, 235, 19, 30, 236, 42,
- 15, 5, 235, 19, 30, 236, 23, 15, 5, 235, 19, 30, 234, 248, 15, 5, 235,
- 19, 30, 234, 98, 15, 5, 235, 19, 30, 234, 95, 15, 5, 235, 19, 30, 232,
- 247, 15, 5, 235, 19, 30, 232, 103, 15, 5, 235, 19, 30, 231, 96, 15, 5,
- 235, 19, 30, 231, 97, 96, 246, 86, 15, 5, 235, 19, 30, 231, 97, 96, 242,
- 221, 15, 5, 235, 19, 30, 231, 97, 96, 217, 23, 15, 5, 235, 19, 30, 230,
- 235, 15, 5, 235, 19, 30, 230, 236, 96, 227, 193, 15, 5, 235, 19, 30, 229,
- 112, 15, 5, 235, 19, 30, 227, 198, 15, 5, 235, 19, 30, 225, 111, 15, 5,
- 235, 19, 30, 222, 142, 15, 5, 235, 19, 30, 206, 15, 5, 235, 19, 30, 221,
- 233, 15, 5, 235, 19, 30, 220, 104, 15, 5, 235, 19, 30, 220, 65, 15, 5,
- 235, 19, 30, 220, 32, 15, 5, 235, 19, 30, 219, 227, 15, 5, 235, 19, 30,
- 219, 184, 15, 5, 235, 19, 30, 218, 52, 15, 5, 235, 19, 30, 217, 51, 15,
- 5, 235, 19, 30, 69, 15, 5, 235, 19, 30, 214, 230, 15, 5, 235, 19, 30,
- 214, 219, 15, 5, 235, 19, 30, 214, 193, 30, 191, 15, 5, 235, 19, 30, 214,
- 126, 15, 5, 235, 19, 30, 210, 44, 15, 5, 235, 17, 15, 5, 235, 18, 249,
- 133, 235, 17, 15, 5, 235, 10, 15, 5, 235, 7, 15, 5, 235, 5, 15, 5, 235,
- 4, 15, 5, 235, 2, 15, 5, 235, 3, 115, 235, 2, 15, 5, 234, 248, 15, 5,
- 234, 249, 30, 236, 43, 242, 101, 15, 5, 234, 244, 15, 5, 234, 245, 30,
- 252, 184, 15, 5, 234, 245, 249, 133, 234, 244, 15, 5, 234, 242, 15, 5,
- 234, 241, 15, 5, 234, 213, 15, 5, 234, 214, 233, 124, 30, 104, 115, 233,
- 124, 30, 69, 15, 5, 234, 214, 115, 234, 214, 233, 124, 30, 104, 115, 233,
- 124, 30, 69, 15, 5, 234, 163, 15, 5, 234, 98, 15, 5, 234, 99, 30, 252,
- 184, 15, 5, 234, 99, 30, 69, 15, 5, 234, 99, 30, 214, 219, 15, 5, 234,
- 95, 15, 5, 234, 87, 15, 5, 234, 74, 15, 5, 234, 73, 15, 5, 234, 71, 15,
- 5, 234, 72, 115, 234, 71, 15, 5, 233, 223, 15, 5, 233, 224, 115, 241,
- 188, 30, 253, 238, 233, 224, 115, 241, 188, 30, 253, 237, 15, 5, 233,
- 221, 15, 5, 233, 219, 15, 5, 233, 220, 214, 12, 17, 15, 5, 233, 218, 15,
- 5, 233, 215, 15, 5, 233, 216, 242, 101, 15, 5, 233, 214, 15, 5, 233, 202,
- 15, 5, 233, 203, 226, 168, 233, 202, 15, 5, 233, 197, 15, 5, 233, 178,
- 15, 5, 233, 141, 15, 5, 233, 123, 15, 5, 233, 124, 30, 61, 15, 5, 233,
- 124, 30, 116, 96, 248, 230, 96, 162, 15, 5, 233, 124, 30, 116, 96, 243,
- 103, 15, 5, 233, 124, 30, 116, 96, 233, 110, 15, 5, 233, 124, 30, 254,
- 187, 15, 5, 233, 124, 30, 254, 131, 15, 5, 233, 124, 30, 253, 240, 210,
- 40, 216, 240, 15, 5, 233, 124, 30, 252, 184, 15, 5, 233, 124, 30, 252,
- 14, 15, 5, 233, 124, 30, 248, 174, 15, 5, 233, 124, 30, 245, 158, 15, 5,
- 233, 124, 30, 243, 142, 15, 5, 233, 124, 30, 243, 103, 15, 5, 233, 124,
- 30, 242, 110, 15, 5, 233, 124, 30, 242, 111, 96, 242, 110, 15, 5, 233,
- 124, 30, 162, 15, 5, 233, 124, 30, 242, 37, 15, 5, 233, 124, 30, 241,
- 188, 30, 227, 198, 15, 5, 233, 124, 30, 236, 43, 242, 101, 15, 5, 233,
- 124, 30, 236, 23, 15, 5, 233, 124, 30, 236, 24, 96, 162, 15, 5, 233, 124,
- 30, 236, 24, 96, 232, 103, 15, 5, 233, 124, 30, 234, 98, 15, 5, 233, 124,
- 30, 234, 87, 15, 5, 233, 124, 30, 233, 221, 15, 5, 233, 124, 30, 233,
- 215, 15, 5, 233, 124, 30, 233, 216, 96, 241, 188, 96, 61, 15, 5, 233,
- 124, 30, 233, 123, 15, 5, 233, 124, 30, 232, 203, 15, 5, 233, 124, 30,
- 232, 103, 15, 5, 233, 124, 30, 232, 91, 15, 5, 233, 124, 30, 231, 96, 15,
- 5, 233, 124, 30, 231, 97, 96, 245, 158, 15, 5, 233, 124, 30, 230, 66, 15,
- 5, 233, 124, 30, 229, 112, 15, 5, 233, 124, 30, 220, 66, 96, 218, 44, 15,
- 5, 233, 124, 30, 220, 12, 96, 242, 198, 96, 245, 95, 15, 5, 233, 124, 30,
- 220, 12, 96, 242, 198, 216, 240, 15, 5, 233, 124, 30, 219, 225, 15, 5,
- 233, 124, 30, 219, 226, 96, 219, 225, 15, 5, 233, 124, 30, 218, 44, 15,
- 5, 233, 124, 30, 217, 85, 15, 5, 233, 124, 30, 217, 73, 15, 5, 233, 124,
- 30, 217, 24, 96, 116, 96, 218, 85, 96, 198, 15, 5, 233, 124, 30, 69, 15,
- 5, 233, 124, 30, 104, 96, 61, 15, 5, 233, 124, 30, 104, 96, 104, 96, 69,
- 15, 5, 233, 124, 30, 214, 231, 96, 253, 239, 15, 5, 233, 124, 30, 214,
- 219, 15, 5, 233, 124, 30, 214, 126, 15, 5, 233, 124, 218, 235, 15, 5,
- 233, 121, 15, 5, 233, 122, 30, 220, 65, 15, 5, 233, 122, 30, 220, 66, 96,
- 218, 44, 15, 5, 233, 122, 242, 101, 15, 5, 233, 122, 242, 102, 115, 233,
- 122, 242, 102, 220, 65, 15, 5, 233, 117, 15, 5, 233, 110, 15, 5, 233,
- 111, 30, 233, 110, 15, 5, 233, 108, 15, 5, 233, 109, 30, 233, 202, 15, 5,
- 233, 109, 30, 233, 203, 96, 222, 142, 15, 5, 232, 247, 15, 5, 232, 232,
- 15, 5, 232, 222, 15, 5, 232, 203, 15, 5, 232, 103, 15, 5, 232, 104, 30,
- 252, 184, 15, 5, 232, 101, 15, 5, 232, 102, 30, 254, 187, 15, 5, 232,
- 102, 30, 252, 184, 15, 5, 232, 102, 30, 245, 80, 15, 5, 232, 102, 30,
- 245, 81, 216, 240, 15, 5, 232, 102, 30, 243, 112, 216, 240, 15, 5, 232,
- 102, 30, 241, 188, 30, 252, 184, 15, 5, 232, 102, 30, 236, 23, 15, 5,
- 232, 102, 30, 235, 7, 15, 5, 232, 102, 30, 235, 5, 15, 5, 232, 102, 30,
- 235, 6, 96, 253, 239, 15, 5, 232, 102, 30, 234, 98, 15, 5, 232, 102, 30,
- 233, 142, 96, 253, 239, 15, 5, 232, 102, 30, 233, 123, 15, 5, 232, 102,
- 30, 231, 97, 96, 245, 158, 15, 5, 232, 102, 30, 229, 112, 15, 5, 232,
- 102, 30, 227, 242, 15, 5, 232, 102, 30, 219, 194, 96, 253, 239, 15, 5,
- 232, 102, 30, 219, 176, 96, 251, 133, 15, 5, 232, 102, 30, 215, 114, 15,
- 5, 232, 102, 216, 240, 15, 5, 232, 102, 249, 133, 232, 101, 15, 5, 232,
- 102, 226, 168, 232, 101, 15, 5, 232, 102, 218, 235, 15, 5, 232, 102, 220,
- 47, 15, 5, 232, 100, 15, 5, 232, 96, 15, 5, 232, 97, 115, 232, 96, 15, 5,
- 232, 97, 226, 168, 232, 96, 15, 5, 232, 97, 220, 47, 15, 5, 232, 94, 15,
- 5, 232, 91, 15, 5, 232, 89, 15, 5, 232, 90, 115, 232, 89, 15, 5, 232, 90,
- 115, 232, 90, 243, 104, 115, 243, 103, 15, 5, 186, 15, 5, 231, 244, 30,
- 217, 73, 15, 5, 231, 244, 242, 101, 15, 5, 231, 243, 15, 5, 231, 215, 15,
- 5, 231, 171, 15, 5, 231, 152, 15, 5, 231, 151, 15, 5, 231, 96, 15, 5,
- 231, 52, 15, 5, 230, 235, 15, 5, 230, 193, 15, 5, 230, 107, 15, 5, 230,
- 108, 115, 230, 107, 15, 5, 230, 98, 15, 5, 230, 99, 242, 101, 15, 5, 230,
- 83, 15, 5, 230, 69, 15, 5, 230, 66, 15, 5, 230, 67, 30, 61, 15, 5, 230,
- 67, 30, 233, 202, 15, 5, 230, 67, 30, 210, 116, 15, 5, 230, 67, 115, 230,
- 66, 15, 5, 230, 67, 115, 230, 67, 30, 116, 96, 198, 15, 5, 230, 67, 249,
- 133, 230, 66, 15, 5, 230, 64, 15, 5, 230, 65, 30, 61, 15, 5, 230, 65, 30,
- 116, 96, 248, 11, 15, 5, 230, 65, 30, 248, 11, 15, 5, 230, 65, 242, 101,
- 15, 5, 198, 15, 5, 229, 232, 15, 5, 229, 221, 15, 5, 229, 222, 235, 199,
- 15, 5, 229, 222, 30, 219, 228, 216, 240, 15, 5, 229, 222, 226, 168, 229,
- 221, 15, 5, 229, 220, 15, 5, 229, 213, 227, 184, 15, 5, 229, 212, 15, 5,
- 229, 211, 15, 5, 229, 112, 15, 5, 229, 113, 30, 61, 15, 5, 229, 113, 30,
- 214, 219, 15, 5, 229, 113, 220, 47, 15, 5, 228, 238, 15, 5, 228, 239, 30,
- 76, 15, 5, 228, 237, 15, 5, 228, 208, 15, 5, 228, 209, 30, 243, 112, 216,
- 240, 15, 5, 228, 209, 30, 243, 104, 96, 243, 112, 216, 240, 15, 5, 228,
- 206, 15, 5, 228, 207, 30, 254, 131, 15, 5, 228, 207, 30, 253, 239, 15, 5,
- 228, 207, 30, 253, 240, 96, 253, 239, 15, 5, 228, 207, 30, 242, 110, 15,
- 5, 228, 207, 30, 231, 97, 96, 243, 112, 216, 240, 15, 5, 228, 207, 30,
- 229, 112, 15, 5, 228, 207, 30, 227, 198, 15, 5, 228, 207, 30, 220, 65,
- 15, 5, 228, 207, 30, 220, 66, 96, 116, 254, 131, 15, 5, 228, 207, 30,
- 220, 66, 96, 253, 239, 15, 5, 228, 207, 30, 220, 66, 96, 253, 240, 96,
- 253, 239, 15, 5, 228, 207, 30, 214, 231, 96, 253, 239, 15, 5, 228, 207,
- 30, 214, 126, 15, 5, 228, 195, 15, 5, 227, 242, 15, 5, 227, 214, 15, 5,
- 227, 198, 15, 5, 227, 199, 233, 122, 30, 243, 103, 15, 5, 227, 199, 233,
- 122, 30, 231, 152, 15, 5, 227, 199, 233, 122, 30, 222, 10, 15, 5, 227,
- 199, 233, 122, 30, 222, 11, 115, 227, 199, 233, 122, 30, 222, 10, 15, 5,
- 227, 199, 233, 122, 30, 214, 126, 15, 5, 227, 199, 216, 240, 15, 5, 227,
- 199, 115, 227, 198, 15, 5, 227, 199, 249, 133, 227, 198, 15, 5, 227, 199,
- 249, 133, 227, 199, 233, 122, 115, 233, 121, 15, 5, 227, 193, 15, 5, 227,
- 194, 255, 33, 30, 253, 234, 15, 5, 227, 194, 255, 33, 30, 252, 14, 15, 5,
- 227, 194, 255, 33, 30, 246, 82, 15, 5, 227, 194, 255, 33, 30, 242, 110,
- 15, 5, 227, 194, 255, 33, 30, 236, 43, 242, 101, 15, 5, 227, 194, 255,
- 33, 30, 235, 5, 15, 5, 227, 194, 255, 33, 30, 233, 141, 15, 5, 227, 194,
- 255, 33, 30, 229, 112, 15, 5, 227, 194, 255, 33, 30, 219, 173, 15, 5,
- 227, 194, 255, 33, 30, 214, 230, 15, 5, 227, 194, 234, 72, 30, 252, 14,
- 15, 5, 227, 194, 234, 72, 30, 252, 15, 69, 15, 5, 191, 15, 5, 226, 84,
- 15, 5, 226, 51, 15, 5, 226, 25, 15, 5, 225, 164, 15, 5, 225, 111, 15, 5,
- 225, 112, 30, 61, 15, 5, 225, 112, 30, 255, 34, 15, 5, 225, 112, 30, 252,
- 14, 15, 5, 225, 112, 30, 251, 133, 15, 5, 225, 112, 30, 76, 15, 5, 225,
- 112, 30, 74, 15, 5, 225, 112, 30, 240, 122, 15, 5, 225, 112, 30, 69, 15,
- 5, 225, 112, 30, 214, 230, 15, 5, 225, 112, 249, 133, 225, 111, 15, 5,
- 225, 56, 15, 5, 225, 57, 30, 234, 244, 15, 5, 225, 57, 30, 214, 219, 15,
- 5, 225, 57, 30, 210, 116, 15, 5, 225, 57, 226, 168, 225, 56, 15, 5, 205,
- 15, 5, 223, 185, 15, 5, 223, 38, 15, 5, 222, 142, 15, 5, 206, 15, 5, 222,
- 24, 227, 184, 15, 5, 222, 23, 15, 5, 222, 24, 30, 61, 15, 5, 222, 24, 30,
- 246, 86, 15, 5, 222, 24, 30, 246, 84, 15, 5, 222, 24, 30, 162, 15, 5,
- 222, 24, 30, 234, 248, 15, 5, 222, 24, 30, 233, 202, 15, 5, 222, 24, 30,
- 232, 89, 15, 5, 222, 24, 30, 230, 235, 15, 5, 222, 24, 30, 227, 198, 15,
- 5, 222, 24, 30, 222, 10, 15, 5, 222, 24, 30, 220, 32, 15, 5, 222, 24, 30,
- 217, 94, 15, 5, 222, 24, 30, 214, 230, 15, 5, 222, 24, 30, 214, 225, 15,
- 5, 222, 24, 30, 214, 197, 15, 5, 222, 24, 30, 214, 150, 15, 5, 222, 24,
- 30, 214, 126, 15, 5, 222, 24, 115, 222, 23, 15, 5, 222, 24, 242, 101, 15,
- 5, 222, 10, 15, 5, 222, 11, 233, 124, 30, 253, 237, 15, 5, 221, 241, 15,
- 5, 221, 233, 15, 5, 220, 104, 15, 5, 220, 102, 15, 5, 220, 103, 30, 61,
- 15, 5, 220, 103, 30, 252, 184, 15, 5, 220, 103, 30, 242, 197, 15, 5, 220,
- 103, 30, 229, 112, 15, 5, 220, 103, 30, 219, 225, 15, 5, 220, 103, 30,
- 215, 99, 15, 5, 220, 103, 30, 69, 15, 5, 220, 103, 30, 104, 96, 61, 15,
- 5, 220, 101, 15, 5, 220, 99, 15, 5, 220, 80, 15, 5, 220, 65, 15, 5, 220,
- 66, 240, 229, 15, 5, 220, 66, 115, 220, 66, 243, 134, 115, 243, 134, 243,
- 104, 115, 243, 103, 15, 5, 220, 66, 115, 220, 66, 217, 95, 115, 217, 95,
- 243, 104, 115, 243, 103, 15, 5, 220, 58, 15, 5, 220, 53, 15, 5, 220, 50,
- 15, 5, 220, 49, 15, 5, 220, 46, 15, 5, 220, 32, 15, 5, 220, 33, 30, 61,
- 15, 5, 220, 33, 30, 236, 23, 15, 5, 220, 26, 15, 5, 220, 27, 30, 61, 15,
- 5, 220, 27, 30, 252, 169, 15, 5, 220, 27, 30, 251, 117, 15, 5, 220, 27,
- 30, 247, 214, 15, 5, 220, 27, 30, 243, 103, 15, 5, 220, 27, 30, 236, 42,
- 15, 5, 220, 27, 30, 236, 43, 242, 101, 15, 5, 220, 27, 30, 233, 197, 15,
- 5, 220, 27, 30, 232, 91, 15, 5, 220, 27, 30, 230, 98, 15, 5, 220, 27, 30,
- 222, 10, 15, 5, 220, 20, 15, 5, 220, 15, 15, 5, 220, 16, 216, 240, 15, 5,
- 220, 16, 115, 220, 16, 251, 107, 115, 251, 106, 15, 5, 220, 11, 15, 5,
- 219, 227, 15, 5, 219, 228, 115, 235, 200, 219, 227, 15, 5, 219, 225, 15,
- 5, 219, 224, 15, 5, 219, 193, 15, 5, 219, 194, 242, 101, 15, 5, 219, 184,
- 15, 5, 219, 182, 15, 5, 219, 183, 115, 219, 183, 219, 225, 15, 5, 219,
- 175, 15, 5, 219, 173, 15, 5, 218, 84, 15, 5, 218, 85, 115, 218, 84, 15,
- 5, 218, 55, 15, 5, 218, 54, 15, 5, 218, 52, 15, 5, 218, 44, 15, 5, 218,
- 43, 15, 5, 218, 18, 15, 5, 218, 17, 15, 5, 217, 106, 15, 5, 217, 107,
- 253, 224, 15, 5, 217, 107, 30, 241, 187, 15, 5, 217, 107, 30, 230, 235,
- 15, 5, 217, 107, 242, 101, 15, 5, 217, 94, 15, 5, 217, 95, 115, 217, 95,
- 228, 239, 115, 228, 239, 247, 196, 115, 247, 195, 15, 5, 217, 95, 218,
- 235, 15, 5, 217, 85, 15, 5, 129, 30, 252, 14, 15, 5, 129, 30, 242, 110,
- 15, 5, 129, 30, 220, 65, 15, 5, 129, 30, 219, 227, 15, 5, 129, 30, 215,
- 114, 15, 5, 129, 30, 214, 219, 15, 5, 217, 73, 15, 5, 217, 51, 15, 5,
- 217, 23, 15, 5, 217, 24, 242, 101, 15, 5, 216, 118, 15, 5, 216, 119, 216,
- 240, 15, 5, 216, 91, 15, 5, 216, 73, 15, 5, 216, 74, 30, 217, 73, 15, 5,
- 216, 74, 115, 216, 73, 15, 5, 216, 74, 115, 216, 74, 243, 134, 115, 243,
- 134, 243, 104, 115, 243, 103, 15, 5, 215, 119, 15, 5, 215, 114, 15, 5,
- 215, 112, 15, 5, 215, 109, 15, 5, 215, 99, 15, 5, 215, 100, 115, 215,
- 100, 210, 117, 115, 210, 116, 15, 5, 69, 15, 5, 104, 242, 110, 15, 5,
- 104, 104, 69, 15, 5, 104, 115, 104, 226, 94, 115, 226, 94, 243, 104, 115,
- 243, 103, 15, 5, 104, 115, 104, 218, 19, 115, 218, 18, 15, 5, 104, 115,
- 104, 104, 223, 52, 115, 104, 223, 51, 15, 5, 214, 230, 15, 5, 214, 225,
- 15, 5, 214, 219, 15, 5, 214, 220, 233, 197, 15, 5, 214, 220, 30, 252,
- 184, 15, 5, 214, 220, 30, 230, 235, 15, 5, 214, 220, 30, 104, 96, 104,
- 96, 69, 15, 5, 214, 220, 30, 104, 96, 104, 96, 104, 242, 101, 15, 5, 214,
- 220, 242, 101, 15, 5, 214, 220, 220, 47, 15, 5, 214, 220, 220, 48, 30,
- 252, 184, 15, 5, 214, 215, 15, 5, 214, 197, 15, 5, 214, 198, 30, 233,
- 123, 15, 5, 214, 198, 30, 231, 97, 96, 248, 229, 15, 5, 214, 198, 30,
- 220, 102, 15, 5, 214, 198, 30, 69, 15, 5, 214, 196, 15, 5, 214, 192, 15,
- 5, 214, 193, 30, 234, 213, 15, 5, 214, 193, 30, 191, 15, 5, 214, 190, 15,
- 5, 214, 191, 242, 101, 15, 5, 214, 150, 15, 5, 214, 151, 249, 133, 214,
- 150, 15, 5, 214, 151, 220, 47, 15, 5, 214, 148, 15, 5, 214, 149, 30, 116,
- 96, 162, 15, 5, 214, 149, 30, 116, 96, 198, 15, 5, 214, 149, 30, 254,
- 187, 15, 5, 214, 149, 30, 162, 15, 5, 214, 149, 30, 227, 198, 15, 5, 214,
- 149, 30, 214, 230, 15, 5, 214, 149, 30, 214, 231, 96, 253, 239, 15, 5,
- 214, 149, 30, 214, 231, 96, 252, 14, 15, 5, 214, 147, 15, 5, 214, 144,
- 15, 5, 214, 143, 15, 5, 214, 139, 15, 5, 214, 140, 30, 61, 15, 5, 214,
- 140, 30, 253, 234, 15, 5, 214, 140, 30, 130, 15, 5, 214, 140, 30, 246,
- 76, 15, 5, 214, 140, 30, 243, 142, 15, 5, 214, 140, 30, 243, 125, 15, 5,
- 214, 140, 30, 243, 112, 216, 240, 15, 5, 214, 140, 30, 243, 103, 15, 5,
- 214, 140, 30, 242, 120, 15, 5, 214, 140, 30, 162, 15, 5, 214, 140, 30,
- 236, 42, 15, 5, 214, 140, 30, 236, 23, 15, 5, 214, 140, 30, 235, 172, 15,
- 5, 214, 140, 30, 234, 98, 15, 5, 214, 140, 30, 232, 89, 15, 5, 214, 140,
- 30, 230, 193, 15, 5, 214, 140, 30, 191, 15, 5, 214, 140, 30, 220, 65, 15,
- 5, 214, 140, 30, 219, 182, 15, 5, 214, 140, 30, 215, 119, 15, 5, 214,
- 140, 30, 104, 96, 242, 110, 15, 5, 214, 140, 30, 214, 219, 15, 5, 214,
- 140, 30, 214, 137, 15, 5, 214, 137, 15, 5, 214, 138, 30, 69, 15, 5, 214,
- 126, 15, 5, 214, 127, 30, 61, 15, 5, 214, 127, 30, 233, 223, 15, 5, 214,
- 127, 30, 233, 202, 15, 5, 214, 127, 30, 217, 73, 15, 5, 214, 122, 15, 5,
- 214, 125, 15, 5, 214, 123, 15, 5, 214, 119, 15, 5, 214, 108, 15, 5, 214,
- 109, 30, 234, 213, 15, 5, 214, 107, 15, 5, 210, 116, 15, 5, 210, 117,
- 216, 240, 15, 5, 210, 117, 92, 30, 233, 202, 15, 5, 210, 113, 15, 5, 210,
- 106, 15, 5, 210, 93, 15, 5, 210, 44, 15, 5, 210, 45, 115, 210, 44, 15, 5,
- 210, 43, 15, 5, 210, 41, 15, 5, 210, 42, 235, 9, 216, 240, 15, 5, 210,
- 36, 15, 5, 210, 28, 15, 5, 210, 13, 15, 5, 210, 11, 15, 5, 210, 12, 30,
- 61, 15, 5, 210, 10, 15, 5, 210, 9, 15, 132, 5, 113, 253, 239, 15, 132, 5,
- 134, 253, 239, 15, 132, 5, 244, 19, 253, 239, 15, 132, 5, 244, 89, 253,
- 239, 15, 132, 5, 219, 127, 253, 239, 15, 132, 5, 220, 124, 253, 239, 15,
- 132, 5, 245, 201, 253, 239, 15, 132, 5, 228, 205, 253, 239, 15, 132, 5,
- 134, 247, 195, 15, 132, 5, 244, 19, 247, 195, 15, 132, 5, 244, 89, 247,
- 195, 15, 132, 5, 219, 127, 247, 195, 15, 132, 5, 220, 124, 247, 195, 15,
- 132, 5, 245, 201, 247, 195, 15, 132, 5, 228, 205, 247, 195, 15, 132, 5,
- 244, 19, 69, 15, 132, 5, 244, 89, 69, 15, 132, 5, 219, 127, 69, 15, 132,
- 5, 220, 124, 69, 15, 132, 5, 245, 201, 69, 15, 132, 5, 228, 205, 69, 15,
- 132, 5, 123, 243, 45, 15, 132, 5, 113, 243, 45, 15, 132, 5, 134, 243, 45,
- 15, 132, 5, 244, 19, 243, 45, 15, 132, 5, 244, 89, 243, 45, 15, 132, 5,
- 219, 127, 243, 45, 15, 132, 5, 220, 124, 243, 45, 15, 132, 5, 245, 201,
- 243, 45, 15, 132, 5, 228, 205, 243, 45, 15, 132, 5, 123, 243, 42, 15,
- 132, 5, 113, 243, 42, 15, 132, 5, 134, 243, 42, 15, 132, 5, 244, 19, 243,
- 42, 15, 132, 5, 244, 89, 243, 42, 15, 132, 5, 113, 220, 80, 15, 132, 5,
- 134, 220, 80, 15, 132, 5, 134, 220, 81, 214, 12, 17, 15, 132, 5, 244, 19,
- 220, 80, 15, 132, 5, 244, 89, 220, 80, 15, 132, 5, 219, 127, 220, 80, 15,
- 132, 5, 220, 124, 220, 80, 15, 132, 5, 245, 201, 220, 80, 15, 132, 5,
- 228, 205, 220, 80, 15, 132, 5, 123, 220, 75, 15, 132, 5, 113, 220, 75,
- 15, 132, 5, 134, 220, 75, 15, 132, 5, 134, 220, 76, 214, 12, 17, 15, 132,
- 5, 244, 19, 220, 75, 15, 132, 5, 244, 89, 220, 75, 15, 132, 5, 220, 81,
- 30, 243, 126, 96, 247, 195, 15, 132, 5, 220, 81, 30, 243, 126, 96, 230,
- 193, 15, 132, 5, 123, 251, 103, 15, 132, 5, 113, 251, 103, 15, 132, 5,
- 134, 251, 103, 15, 132, 5, 134, 251, 104, 214, 12, 17, 15, 132, 5, 244,
- 19, 251, 103, 15, 132, 5, 244, 89, 251, 103, 15, 132, 5, 134, 214, 12,
- 244, 28, 245, 82, 15, 132, 5, 134, 214, 12, 244, 28, 245, 79, 15, 132, 5,
- 244, 19, 214, 12, 244, 28, 232, 223, 15, 132, 5, 244, 19, 214, 12, 244,
- 28, 232, 221, 15, 132, 5, 244, 19, 214, 12, 244, 28, 232, 224, 61, 15,
- 132, 5, 244, 19, 214, 12, 244, 28, 232, 224, 253, 166, 15, 132, 5, 219,
- 127, 214, 12, 244, 28, 253, 236, 15, 132, 5, 220, 124, 214, 12, 244, 28,
- 236, 15, 15, 132, 5, 220, 124, 214, 12, 244, 28, 236, 17, 61, 15, 132, 5,
- 220, 124, 214, 12, 244, 28, 236, 17, 253, 166, 15, 132, 5, 245, 201, 214,
- 12, 244, 28, 214, 121, 15, 132, 5, 245, 201, 214, 12, 244, 28, 214, 120,
- 15, 132, 5, 228, 205, 214, 12, 244, 28, 236, 31, 15, 132, 5, 228, 205,
- 214, 12, 244, 28, 236, 30, 15, 132, 5, 228, 205, 214, 12, 244, 28, 236,
- 29, 15, 132, 5, 228, 205, 214, 12, 244, 28, 236, 32, 61, 15, 132, 5, 113,
- 253, 240, 216, 240, 15, 132, 5, 134, 253, 240, 216, 240, 15, 132, 5, 244,
- 19, 253, 240, 216, 240, 15, 132, 5, 244, 89, 253, 240, 216, 240, 15, 132,
- 5, 219, 127, 253, 240, 216, 240, 15, 132, 5, 123, 252, 158, 15, 132, 5,
- 113, 252, 158, 15, 132, 5, 134, 252, 158, 15, 132, 5, 244, 19, 252, 158,
- 15, 132, 5, 244, 19, 252, 159, 214, 12, 17, 15, 132, 5, 244, 89, 252,
- 158, 15, 132, 5, 244, 89, 252, 159, 214, 12, 17, 15, 132, 5, 228, 215,
- 15, 132, 5, 228, 216, 15, 132, 5, 123, 245, 78, 15, 132, 5, 113, 245, 78,
- 15, 132, 5, 123, 216, 170, 247, 195, 15, 132, 5, 113, 216, 168, 247, 195,
- 15, 132, 5, 244, 89, 219, 116, 247, 195, 15, 132, 5, 123, 216, 170, 214,
- 12, 244, 28, 61, 15, 132, 5, 113, 216, 168, 214, 12, 244, 28, 61, 15,
- 132, 5, 123, 245, 197, 253, 239, 15, 132, 5, 123, 224, 25, 253, 239, 15,
- 132, 5, 55, 253, 227, 123, 219, 117, 15, 132, 5, 55, 253, 227, 123, 224,
- 24, 15, 224, 144, 5, 55, 253, 227, 211, 209, 247, 180, 15, 224, 144, 5,
- 67, 249, 234, 15, 224, 144, 5, 248, 7, 249, 234, 15, 224, 144, 5, 248, 7,
- 215, 222, 12, 13, 255, 164, 12, 13, 255, 163, 12, 13, 255, 162, 12, 13,
- 255, 161, 12, 13, 255, 160, 12, 13, 255, 159, 12, 13, 255, 158, 12, 13,
- 255, 157, 12, 13, 255, 156, 12, 13, 255, 155, 12, 13, 255, 154, 12, 13,
- 255, 153, 12, 13, 255, 152, 12, 13, 255, 151, 12, 13, 255, 150, 12, 13,
- 255, 149, 12, 13, 255, 148, 12, 13, 255, 147, 12, 13, 255, 146, 12, 13,
- 255, 145, 12, 13, 255, 144, 12, 13, 255, 143, 12, 13, 255, 142, 12, 13,
- 255, 141, 12, 13, 255, 140, 12, 13, 255, 139, 12, 13, 255, 138, 12, 13,
- 255, 137, 12, 13, 255, 136, 12, 13, 255, 135, 12, 13, 255, 134, 12, 13,
- 255, 133, 12, 13, 255, 132, 12, 13, 255, 131, 12, 13, 255, 130, 12, 13,
- 255, 129, 12, 13, 255, 128, 12, 13, 255, 127, 12, 13, 255, 126, 12, 13,
- 255, 125, 12, 13, 255, 124, 12, 13, 255, 123, 12, 13, 255, 122, 12, 13,
- 255, 121, 12, 13, 255, 120, 12, 13, 255, 119, 12, 13, 255, 118, 12, 13,
- 255, 117, 12, 13, 255, 116, 12, 13, 255, 115, 12, 13, 255, 114, 12, 13,
- 255, 113, 12, 13, 255, 112, 12, 13, 255, 111, 12, 13, 255, 110, 12, 13,
- 255, 109, 12, 13, 255, 108, 12, 13, 255, 107, 12, 13, 255, 106, 12, 13,
- 255, 105, 12, 13, 255, 104, 12, 13, 255, 103, 12, 13, 255, 102, 12, 13,
- 255, 101, 12, 13, 255, 100, 12, 13, 255, 99, 12, 13, 255, 98, 12, 13,
- 255, 97, 12, 13, 255, 96, 12, 13, 255, 95, 12, 13, 255, 94, 12, 13, 255,
- 93, 12, 13, 255, 92, 12, 13, 255, 91, 12, 13, 255, 90, 12, 13, 255, 89,
- 12, 13, 255, 88, 12, 13, 255, 87, 12, 13, 255, 86, 12, 13, 255, 85, 12,
- 13, 253, 164, 12, 13, 253, 162, 12, 13, 253, 160, 12, 13, 253, 158, 12,
- 13, 253, 156, 12, 13, 253, 155, 12, 13, 253, 153, 12, 13, 253, 151, 12,
- 13, 253, 149, 12, 13, 253, 147, 12, 13, 251, 70, 12, 13, 251, 69, 12, 13,
- 251, 68, 12, 13, 251, 67, 12, 13, 251, 66, 12, 13, 251, 65, 12, 13, 251,
- 64, 12, 13, 251, 63, 12, 13, 251, 62, 12, 13, 251, 61, 12, 13, 251, 60,
- 12, 13, 251, 59, 12, 13, 251, 58, 12, 13, 251, 57, 12, 13, 251, 56, 12,
- 13, 251, 55, 12, 13, 251, 54, 12, 13, 251, 53, 12, 13, 251, 52, 12, 13,
- 251, 51, 12, 13, 251, 50, 12, 13, 251, 49, 12, 13, 251, 48, 12, 13, 251,
- 47, 12, 13, 251, 46, 12, 13, 251, 45, 12, 13, 251, 44, 12, 13, 251, 43,
- 12, 13, 249, 67, 12, 13, 249, 66, 12, 13, 249, 65, 12, 13, 249, 64, 12,
- 13, 249, 63, 12, 13, 249, 62, 12, 13, 249, 61, 12, 13, 249, 60, 12, 13,
- 249, 59, 12, 13, 249, 58, 12, 13, 249, 57, 12, 13, 249, 56, 12, 13, 249,
- 55, 12, 13, 249, 54, 12, 13, 249, 53, 12, 13, 249, 52, 12, 13, 249, 51,
- 12, 13, 249, 50, 12, 13, 249, 49, 12, 13, 249, 48, 12, 13, 249, 47, 12,
- 13, 249, 46, 12, 13, 249, 45, 12, 13, 249, 44, 12, 13, 249, 43, 12, 13,
- 249, 42, 12, 13, 249, 41, 12, 13, 249, 40, 12, 13, 249, 39, 12, 13, 249,
- 38, 12, 13, 249, 37, 12, 13, 249, 36, 12, 13, 249, 35, 12, 13, 249, 34,
- 12, 13, 249, 33, 12, 13, 249, 32, 12, 13, 249, 31, 12, 13, 249, 30, 12,
- 13, 249, 29, 12, 13, 249, 28, 12, 13, 249, 27, 12, 13, 249, 26, 12, 13,
- 249, 25, 12, 13, 249, 24, 12, 13, 249, 23, 12, 13, 249, 22, 12, 13, 249,
- 21, 12, 13, 249, 20, 12, 13, 249, 19, 12, 13, 249, 18, 12, 13, 249, 17,
- 12, 13, 249, 16, 12, 13, 249, 15, 12, 13, 249, 14, 12, 13, 249, 13, 12,
- 13, 249, 12, 12, 13, 249, 11, 12, 13, 249, 10, 12, 13, 249, 9, 12, 13,
- 249, 8, 12, 13, 249, 7, 12, 13, 249, 6, 12, 13, 249, 5, 12, 13, 249, 4,
- 12, 13, 249, 3, 12, 13, 249, 2, 12, 13, 249, 1, 12, 13, 249, 0, 12, 13,
- 248, 255, 12, 13, 248, 254, 12, 13, 248, 253, 12, 13, 248, 252, 12, 13,
- 248, 251, 12, 13, 248, 250, 12, 13, 248, 249, 12, 13, 248, 248, 12, 13,
- 248, 247, 12, 13, 248, 246, 12, 13, 248, 245, 12, 13, 248, 244, 12, 13,
- 248, 243, 12, 13, 248, 242, 12, 13, 248, 241, 12, 13, 248, 240, 12, 13,
- 248, 239, 12, 13, 248, 238, 12, 13, 248, 237, 12, 13, 248, 236, 12, 13,
- 248, 235, 12, 13, 248, 234, 12, 13, 248, 233, 12, 13, 248, 232, 12, 13,
- 246, 31, 12, 13, 246, 30, 12, 13, 246, 29, 12, 13, 246, 28, 12, 13, 246,
- 27, 12, 13, 246, 26, 12, 13, 246, 25, 12, 13, 246, 24, 12, 13, 246, 23,
- 12, 13, 246, 22, 12, 13, 246, 21, 12, 13, 246, 20, 12, 13, 246, 19, 12,
- 13, 246, 18, 12, 13, 246, 17, 12, 13, 246, 16, 12, 13, 246, 15, 12, 13,
- 246, 14, 12, 13, 246, 13, 12, 13, 246, 12, 12, 13, 246, 11, 12, 13, 246,
- 10, 12, 13, 246, 9, 12, 13, 246, 8, 12, 13, 246, 7, 12, 13, 246, 6, 12,
- 13, 246, 5, 12, 13, 246, 4, 12, 13, 246, 3, 12, 13, 246, 2, 12, 13, 246,
- 1, 12, 13, 246, 0, 12, 13, 245, 255, 12, 13, 245, 254, 12, 13, 245, 253,
- 12, 13, 245, 252, 12, 13, 245, 251, 12, 13, 245, 250, 12, 13, 245, 249,
- 12, 13, 245, 248, 12, 13, 245, 247, 12, 13, 245, 246, 12, 13, 245, 245,
- 12, 13, 245, 244, 12, 13, 245, 13, 12, 13, 245, 12, 12, 13, 245, 11, 12,
- 13, 245, 10, 12, 13, 245, 9, 12, 13, 245, 8, 12, 13, 245, 7, 12, 13, 245,
- 6, 12, 13, 245, 5, 12, 13, 245, 4, 12, 13, 245, 3, 12, 13, 245, 2, 12,
- 13, 245, 1, 12, 13, 245, 0, 12, 13, 244, 255, 12, 13, 244, 254, 12, 13,
- 244, 253, 12, 13, 244, 252, 12, 13, 244, 251, 12, 13, 244, 250, 12, 13,
- 244, 249, 12, 13, 244, 248, 12, 13, 244, 247, 12, 13, 244, 246, 12, 13,
- 244, 245, 12, 13, 244, 244, 12, 13, 244, 243, 12, 13, 244, 242, 12, 13,
- 244, 241, 12, 13, 244, 240, 12, 13, 244, 239, 12, 13, 244, 238, 12, 13,
- 244, 237, 12, 13, 244, 236, 12, 13, 244, 235, 12, 13, 244, 234, 12, 13,
- 244, 233, 12, 13, 244, 232, 12, 13, 244, 231, 12, 13, 244, 230, 12, 13,
- 244, 229, 12, 13, 244, 228, 12, 13, 244, 227, 12, 13, 244, 226, 12, 13,
- 244, 225, 12, 13, 244, 224, 12, 13, 244, 223, 12, 13, 244, 222, 12, 13,
- 244, 221, 12, 13, 244, 220, 12, 13, 244, 219, 12, 13, 244, 218, 12, 13,
- 244, 217, 12, 13, 244, 216, 12, 13, 244, 215, 12, 13, 244, 214, 12, 13,
- 244, 213, 12, 13, 244, 212, 12, 13, 244, 211, 12, 13, 244, 210, 12, 13,
- 244, 209, 12, 13, 244, 208, 12, 13, 244, 207, 12, 13, 244, 206, 12, 13,
- 244, 205, 12, 13, 243, 208, 12, 13, 243, 207, 12, 13, 243, 206, 12, 13,
- 243, 205, 12, 13, 243, 204, 12, 13, 243, 203, 12, 13, 243, 202, 12, 13,
- 243, 201, 12, 13, 243, 200, 12, 13, 243, 199, 12, 13, 243, 198, 12, 13,
- 243, 197, 12, 13, 243, 196, 12, 13, 243, 195, 12, 13, 243, 194, 12, 13,
- 243, 193, 12, 13, 243, 192, 12, 13, 243, 191, 12, 13, 243, 190, 12, 13,
- 243, 189, 12, 13, 243, 188, 12, 13, 243, 187, 12, 13, 243, 186, 12, 13,
- 243, 185, 12, 13, 243, 184, 12, 13, 243, 183, 12, 13, 243, 182, 12, 13,
- 243, 181, 12, 13, 243, 180, 12, 13, 243, 179, 12, 13, 243, 178, 12, 13,
- 243, 177, 12, 13, 243, 176, 12, 13, 243, 175, 12, 13, 243, 174, 12, 13,
- 243, 173, 12, 13, 243, 172, 12, 13, 243, 171, 12, 13, 243, 170, 12, 13,
- 243, 169, 12, 13, 243, 168, 12, 13, 243, 167, 12, 13, 243, 166, 12, 13,
- 243, 165, 12, 13, 243, 164, 12, 13, 243, 163, 12, 13, 243, 162, 12, 13,
- 243, 161, 12, 13, 243, 160, 12, 13, 243, 159, 12, 13, 243, 158, 12, 13,
- 243, 157, 12, 13, 243, 156, 12, 13, 243, 155, 12, 13, 243, 154, 12, 13,
- 243, 153, 12, 13, 243, 152, 12, 13, 243, 151, 12, 13, 243, 150, 12, 13,
- 243, 149, 12, 13, 243, 148, 12, 13, 243, 147, 12, 13, 243, 146, 12, 13,
- 243, 145, 12, 13, 242, 65, 12, 13, 242, 64, 12, 13, 242, 63, 12, 13, 242,
- 62, 12, 13, 242, 61, 12, 13, 242, 60, 12, 13, 242, 59, 12, 13, 242, 58,
- 12, 13, 242, 57, 12, 13, 240, 145, 12, 13, 240, 144, 12, 13, 240, 143,
- 12, 13, 240, 142, 12, 13, 240, 141, 12, 13, 240, 140, 12, 13, 240, 139,
- 12, 13, 240, 138, 12, 13, 240, 137, 12, 13, 240, 136, 12, 13, 240, 135,
- 12, 13, 240, 134, 12, 13, 240, 133, 12, 13, 240, 132, 12, 13, 240, 131,
- 12, 13, 240, 130, 12, 13, 240, 129, 12, 13, 240, 128, 12, 13, 240, 127,
- 12, 13, 235, 28, 12, 13, 235, 27, 12, 13, 235, 26, 12, 13, 235, 25, 12,
- 13, 235, 24, 12, 13, 235, 23, 12, 13, 235, 22, 12, 13, 235, 21, 12, 13,
- 233, 152, 12, 13, 233, 151, 12, 13, 233, 150, 12, 13, 233, 149, 12, 13,
- 233, 148, 12, 13, 233, 147, 12, 13, 233, 146, 12, 13, 233, 145, 12, 13,
- 233, 144, 12, 13, 233, 143, 12, 13, 232, 54, 12, 13, 232, 53, 12, 13,
- 232, 52, 12, 13, 232, 51, 12, 13, 232, 50, 12, 13, 232, 49, 12, 13, 232,
- 48, 12, 13, 232, 47, 12, 13, 232, 46, 12, 13, 232, 45, 12, 13, 232, 44,
- 12, 13, 232, 43, 12, 13, 232, 42, 12, 13, 232, 41, 12, 13, 232, 40, 12,
- 13, 232, 39, 12, 13, 232, 38, 12, 13, 232, 37, 12, 13, 232, 36, 12, 13,
- 232, 35, 12, 13, 232, 34, 12, 13, 232, 33, 12, 13, 232, 32, 12, 13, 232,
- 31, 12, 13, 232, 30, 12, 13, 232, 29, 12, 13, 232, 28, 12, 13, 232, 27,
- 12, 13, 232, 26, 12, 13, 232, 25, 12, 13, 232, 24, 12, 13, 232, 23, 12,
- 13, 232, 22, 12, 13, 232, 21, 12, 13, 232, 20, 12, 13, 232, 19, 12, 13,
- 232, 18, 12, 13, 232, 17, 12, 13, 232, 16, 12, 13, 232, 15, 12, 13, 232,
- 14, 12, 13, 232, 13, 12, 13, 232, 12, 12, 13, 232, 11, 12, 13, 232, 10,
- 12, 13, 232, 9, 12, 13, 232, 8, 12, 13, 232, 7, 12, 13, 232, 6, 12, 13,
- 232, 5, 12, 13, 232, 4, 12, 13, 232, 3, 12, 13, 232, 2, 12, 13, 232, 1,
- 12, 13, 232, 0, 12, 13, 231, 255, 12, 13, 231, 254, 12, 13, 231, 253, 12,
- 13, 231, 252, 12, 13, 231, 251, 12, 13, 231, 250, 12, 13, 231, 249, 12,
- 13, 231, 248, 12, 13, 231, 247, 12, 13, 231, 246, 12, 13, 231, 245, 12,
- 13, 230, 27, 12, 13, 230, 26, 12, 13, 230, 25, 12, 13, 230, 24, 12, 13,
- 230, 23, 12, 13, 230, 22, 12, 13, 230, 21, 12, 13, 230, 20, 12, 13, 230,
- 19, 12, 13, 230, 18, 12, 13, 230, 17, 12, 13, 230, 16, 12, 13, 230, 15,
- 12, 13, 230, 14, 12, 13, 230, 13, 12, 13, 230, 12, 12, 13, 230, 11, 12,
- 13, 230, 10, 12, 13, 230, 9, 12, 13, 230, 8, 12, 13, 230, 7, 12, 13, 230,
- 6, 12, 13, 230, 5, 12, 13, 230, 4, 12, 13, 230, 3, 12, 13, 230, 2, 12,
- 13, 230, 1, 12, 13, 230, 0, 12, 13, 229, 255, 12, 13, 229, 254, 12, 13,
- 229, 253, 12, 13, 229, 252, 12, 13, 229, 251, 12, 13, 229, 250, 12, 13,
- 229, 249, 12, 13, 229, 248, 12, 13, 229, 247, 12, 13, 229, 246, 12, 13,
- 229, 245, 12, 13, 229, 244, 12, 13, 229, 243, 12, 13, 229, 242, 12, 13,
- 229, 241, 12, 13, 229, 240, 12, 13, 229, 239, 12, 13, 229, 238, 12, 13,
- 229, 237, 12, 13, 229, 236, 12, 13, 229, 235, 12, 13, 228, 139, 12, 13,
- 228, 138, 12, 13, 228, 137, 12, 13, 228, 136, 12, 13, 228, 135, 12, 13,
- 228, 134, 12, 13, 228, 133, 12, 13, 228, 132, 12, 13, 228, 131, 12, 13,
- 228, 130, 12, 13, 228, 129, 12, 13, 228, 128, 12, 13, 228, 127, 12, 13,
- 228, 126, 12, 13, 228, 125, 12, 13, 228, 124, 12, 13, 228, 123, 12, 13,
- 228, 122, 12, 13, 228, 121, 12, 13, 228, 120, 12, 13, 228, 119, 12, 13,
- 228, 118, 12, 13, 227, 241, 12, 13, 227, 240, 12, 13, 227, 239, 12, 13,
- 227, 238, 12, 13, 227, 237, 12, 13, 227, 236, 12, 13, 227, 235, 12, 13,
- 227, 234, 12, 13, 227, 233, 12, 13, 227, 232, 12, 13, 227, 231, 12, 13,
- 227, 230, 12, 13, 227, 229, 12, 13, 227, 228, 12, 13, 227, 227, 12, 13,
- 227, 226, 12, 13, 227, 225, 12, 13, 227, 224, 12, 13, 227, 223, 12, 13,
- 227, 222, 12, 13, 227, 221, 12, 13, 227, 220, 12, 13, 227, 219, 12, 13,
- 227, 218, 12, 13, 227, 217, 12, 13, 227, 216, 12, 13, 227, 80, 12, 13,
- 227, 79, 12, 13, 227, 78, 12, 13, 227, 77, 12, 13, 227, 76, 12, 13, 227,
- 75, 12, 13, 227, 74, 12, 13, 227, 73, 12, 13, 227, 72, 12, 13, 227, 71,
- 12, 13, 227, 70, 12, 13, 227, 69, 12, 13, 227, 68, 12, 13, 227, 67, 12,
- 13, 227, 66, 12, 13, 227, 65, 12, 13, 227, 64, 12, 13, 227, 63, 12, 13,
- 227, 62, 12, 13, 227, 61, 12, 13, 227, 60, 12, 13, 227, 59, 12, 13, 227,
- 58, 12, 13, 227, 57, 12, 13, 227, 56, 12, 13, 227, 55, 12, 13, 227, 54,
- 12, 13, 227, 53, 12, 13, 227, 52, 12, 13, 227, 51, 12, 13, 227, 50, 12,
- 13, 227, 49, 12, 13, 227, 48, 12, 13, 227, 47, 12, 13, 227, 46, 12, 13,
- 227, 45, 12, 13, 227, 44, 12, 13, 227, 43, 12, 13, 227, 42, 12, 13, 227,
- 41, 12, 13, 227, 40, 12, 13, 227, 39, 12, 13, 227, 38, 12, 13, 227, 37,
- 12, 13, 227, 36, 12, 13, 227, 35, 12, 13, 227, 34, 12, 13, 227, 33, 12,
- 13, 227, 32, 12, 13, 227, 31, 12, 13, 227, 30, 12, 13, 227, 29, 12, 13,
- 227, 28, 12, 13, 227, 27, 12, 13, 227, 26, 12, 13, 227, 25, 12, 13, 227,
- 24, 12, 13, 227, 23, 12, 13, 227, 22, 12, 13, 227, 21, 12, 13, 227, 20,
- 12, 13, 227, 19, 12, 13, 227, 18, 12, 13, 227, 17, 12, 13, 227, 16, 12,
- 13, 227, 15, 12, 13, 227, 14, 12, 13, 227, 13, 12, 13, 227, 12, 12, 13,
- 227, 11, 12, 13, 227, 10, 12, 13, 227, 9, 12, 13, 227, 8, 12, 13, 227, 7,
- 12, 13, 227, 6, 12, 13, 226, 108, 12, 13, 226, 107, 12, 13, 226, 106, 12,
- 13, 226, 105, 12, 13, 226, 104, 12, 13, 226, 103, 12, 13, 226, 102, 12,
- 13, 226, 101, 12, 13, 226, 100, 12, 13, 226, 99, 12, 13, 226, 98, 12, 13,
- 226, 97, 12, 13, 226, 96, 12, 13, 224, 98, 12, 13, 224, 97, 12, 13, 224,
- 96, 12, 13, 224, 95, 12, 13, 224, 94, 12, 13, 224, 93, 12, 13, 224, 92,
- 12, 13, 223, 225, 12, 13, 223, 224, 12, 13, 223, 223, 12, 13, 223, 222,
- 12, 13, 223, 221, 12, 13, 223, 220, 12, 13, 223, 219, 12, 13, 223, 218,
- 12, 13, 223, 217, 12, 13, 223, 216, 12, 13, 223, 215, 12, 13, 223, 214,
- 12, 13, 223, 213, 12, 13, 223, 212, 12, 13, 223, 211, 12, 13, 223, 210,
- 12, 13, 223, 209, 12, 13, 223, 208, 12, 13, 223, 207, 12, 13, 223, 206,
- 12, 13, 223, 205, 12, 13, 223, 204, 12, 13, 223, 203, 12, 13, 223, 202,
- 12, 13, 223, 201, 12, 13, 223, 200, 12, 13, 223, 199, 12, 13, 223, 198,
- 12, 13, 223, 197, 12, 13, 223, 196, 12, 13, 223, 195, 12, 13, 223, 194,
- 12, 13, 223, 193, 12, 13, 223, 192, 12, 13, 222, 90, 12, 13, 222, 89, 12,
- 13, 222, 88, 12, 13, 222, 87, 12, 13, 222, 86, 12, 13, 222, 85, 12, 13,
- 222, 84, 12, 13, 222, 83, 12, 13, 222, 82, 12, 13, 222, 81, 12, 13, 222,
- 80, 12, 13, 222, 79, 12, 13, 222, 78, 12, 13, 222, 77, 12, 13, 222, 76,
- 12, 13, 222, 75, 12, 13, 222, 74, 12, 13, 222, 73, 12, 13, 222, 72, 12,
- 13, 222, 71, 12, 13, 222, 70, 12, 13, 222, 69, 12, 13, 222, 68, 12, 13,
- 222, 67, 12, 13, 222, 66, 12, 13, 222, 65, 12, 13, 222, 64, 12, 13, 222,
- 63, 12, 13, 222, 62, 12, 13, 222, 61, 12, 13, 222, 60, 12, 13, 222, 59,
- 12, 13, 222, 58, 12, 13, 222, 57, 12, 13, 222, 56, 12, 13, 222, 55, 12,
- 13, 222, 54, 12, 13, 222, 53, 12, 13, 222, 52, 12, 13, 222, 51, 12, 13,
- 222, 50, 12, 13, 222, 49, 12, 13, 222, 48, 12, 13, 222, 47, 12, 13, 222,
- 46, 12, 13, 222, 45, 12, 13, 222, 44, 12, 13, 222, 43, 12, 13, 222, 42,
- 12, 13, 222, 41, 12, 13, 222, 40, 12, 13, 222, 39, 12, 13, 222, 38, 12,
- 13, 222, 37, 12, 13, 217, 151, 12, 13, 217, 150, 12, 13, 217, 149, 12,
- 13, 217, 148, 12, 13, 217, 147, 12, 13, 217, 146, 12, 13, 217, 145, 12,
- 13, 217, 144, 12, 13, 217, 143, 12, 13, 217, 142, 12, 13, 217, 141, 12,
- 13, 217, 140, 12, 13, 217, 139, 12, 13, 217, 138, 12, 13, 217, 137, 12,
- 13, 217, 136, 12, 13, 217, 135, 12, 13, 217, 134, 12, 13, 217, 133, 12,
- 13, 217, 132, 12, 13, 217, 131, 12, 13, 217, 130, 12, 13, 217, 129, 12,
- 13, 217, 128, 12, 13, 217, 127, 12, 13, 217, 126, 12, 13, 217, 125, 12,
- 13, 217, 124, 12, 13, 217, 123, 12, 13, 217, 122, 12, 13, 217, 121, 12,
- 13, 217, 120, 12, 13, 217, 119, 12, 13, 217, 118, 12, 13, 217, 117, 12,
- 13, 217, 116, 12, 13, 217, 115, 12, 13, 217, 114, 12, 13, 217, 113, 12,
- 13, 217, 112, 12, 13, 217, 111, 12, 13, 217, 110, 12, 13, 217, 109, 12,
- 13, 217, 108, 12, 13, 215, 22, 12, 13, 215, 21, 12, 13, 215, 20, 12, 13,
- 215, 19, 12, 13, 215, 18, 12, 13, 215, 17, 12, 13, 215, 16, 12, 13, 215,
- 15, 12, 13, 215, 14, 12, 13, 215, 13, 12, 13, 215, 12, 12, 13, 215, 11,
- 12, 13, 215, 10, 12, 13, 215, 9, 12, 13, 215, 8, 12, 13, 215, 7, 12, 13,
- 215, 6, 12, 13, 215, 5, 12, 13, 215, 4, 12, 13, 215, 3, 12, 13, 215, 2,
- 12, 13, 215, 1, 12, 13, 215, 0, 12, 13, 214, 255, 12, 13, 214, 254, 12,
- 13, 214, 253, 12, 13, 214, 252, 12, 13, 214, 251, 12, 13, 214, 250, 12,
- 13, 214, 249, 12, 13, 214, 248, 12, 13, 214, 247, 12, 13, 214, 246, 12,
- 13, 214, 245, 12, 13, 214, 244, 12, 13, 214, 243, 12, 13, 214, 242, 12,
- 13, 214, 241, 12, 13, 214, 240, 12, 13, 214, 239, 12, 13, 214, 238, 12,
- 13, 214, 237, 12, 13, 214, 236, 12, 13, 214, 235, 12, 13, 214, 234, 12,
- 13, 214, 233, 12, 13, 214, 232, 12, 13, 214, 104, 12, 13, 214, 103, 12,
- 13, 214, 102, 12, 13, 214, 101, 12, 13, 214, 100, 12, 13, 214, 99, 12,
- 13, 214, 98, 12, 13, 214, 97, 12, 13, 214, 96, 12, 13, 214, 95, 12, 13,
- 214, 94, 12, 13, 214, 93, 12, 13, 214, 92, 12, 13, 214, 91, 12, 13, 214,
- 90, 12, 13, 214, 89, 12, 13, 214, 88, 12, 13, 214, 87, 12, 13, 214, 86,
- 12, 13, 214, 85, 12, 13, 214, 84, 12, 13, 214, 83, 12, 13, 214, 82, 12,
- 13, 214, 81, 12, 13, 214, 80, 12, 13, 214, 79, 12, 13, 214, 78, 12, 13,
- 214, 77, 12, 13, 214, 76, 12, 13, 214, 75, 12, 13, 214, 74, 12, 13, 214,
- 73, 12, 13, 214, 72, 12, 13, 214, 71, 12, 13, 214, 70, 12, 13, 214, 69,
- 12, 13, 214, 68, 12, 13, 214, 67, 12, 13, 214, 66, 12, 13, 214, 65, 12,
- 13, 214, 64, 12, 13, 214, 63, 12, 13, 214, 62, 12, 13, 214, 61, 12, 13,
- 214, 60, 12, 13, 214, 59, 12, 13, 214, 58, 12, 13, 214, 57, 12, 13, 214,
- 56, 12, 13, 214, 55, 12, 13, 214, 54, 12, 13, 214, 53, 12, 13, 214, 52,
- 12, 13, 214, 51, 12, 13, 214, 50, 12, 13, 214, 49, 12, 13, 214, 48, 12,
- 13, 214, 47, 12, 13, 214, 46, 12, 13, 214, 45, 12, 13, 214, 44, 12, 13,
- 214, 43, 12, 13, 214, 42, 12, 13, 214, 41, 12, 13, 214, 40, 12, 13, 214,
- 39, 12, 13, 214, 38, 12, 13, 214, 37, 12, 13, 214, 36, 12, 13, 214, 35,
- 12, 13, 214, 34, 12, 13, 214, 33, 12, 13, 214, 32, 12, 13, 214, 31, 12,
- 13, 214, 30, 12, 13, 214, 29, 12, 13, 214, 28, 12, 13, 212, 97, 12, 13,
- 212, 96, 12, 13, 212, 95, 12, 13, 212, 94, 12, 13, 212, 93, 12, 13, 212,
- 92, 12, 13, 212, 91, 12, 13, 212, 90, 12, 13, 212, 89, 12, 13, 212, 88,
- 12, 13, 212, 87, 12, 13, 212, 86, 12, 13, 212, 85, 12, 13, 212, 84, 12,
- 13, 212, 83, 12, 13, 212, 82, 12, 13, 212, 81, 12, 13, 212, 80, 12, 13,
- 212, 79, 12, 13, 212, 78, 12, 13, 212, 77, 12, 13, 212, 76, 12, 13, 212,
- 75, 12, 13, 212, 74, 12, 13, 212, 73, 12, 13, 212, 72, 12, 13, 212, 71,
- 12, 13, 212, 70, 12, 13, 212, 69, 12, 13, 212, 68, 12, 13, 212, 67, 12,
- 13, 212, 66, 12, 13, 211, 177, 12, 13, 211, 176, 12, 13, 211, 175, 12,
- 13, 211, 174, 12, 13, 211, 173, 12, 13, 211, 172, 12, 13, 211, 171, 12,
- 13, 211, 170, 12, 13, 211, 169, 12, 13, 211, 168, 12, 13, 211, 167, 12,
- 13, 211, 166, 12, 13, 211, 115, 12, 13, 211, 114, 12, 13, 211, 113, 12,
- 13, 211, 112, 12, 13, 211, 111, 12, 13, 211, 110, 12, 13, 211, 109, 12,
- 13, 211, 108, 12, 13, 211, 107, 12, 13, 210, 158, 12, 13, 210, 157, 12,
- 13, 210, 156, 12, 13, 210, 155, 12, 13, 210, 154, 12, 13, 210, 153, 12,
- 13, 210, 152, 12, 13, 210, 151, 12, 13, 210, 150, 12, 13, 210, 149, 12,
- 13, 210, 148, 12, 13, 210, 147, 12, 13, 210, 146, 12, 13, 210, 145, 12,
- 13, 210, 144, 12, 13, 210, 143, 12, 13, 210, 142, 12, 13, 210, 141, 12,
- 13, 210, 140, 12, 13, 210, 139, 12, 13, 210, 138, 12, 13, 210, 137, 12,
- 13, 210, 136, 12, 13, 210, 135, 12, 13, 210, 134, 12, 13, 210, 133, 12,
- 13, 210, 132, 12, 13, 210, 131, 12, 13, 210, 130, 12, 13, 210, 129, 12,
- 13, 210, 128, 12, 13, 210, 127, 12, 13, 210, 126, 12, 13, 210, 125, 12,
- 13, 210, 124, 12, 13, 210, 123, 12, 13, 210, 122, 12, 13, 210, 121, 12,
- 13, 210, 120, 12, 13, 210, 119, 12, 13, 210, 118, 12, 13, 255, 81, 12,
- 13, 255, 80, 12, 13, 255, 79, 12, 13, 255, 78, 12, 13, 255, 77, 12, 13,
- 255, 76, 12, 13, 255, 75, 12, 13, 255, 74, 12, 13, 255, 73, 12, 13, 255,
- 72, 12, 13, 255, 71, 12, 13, 255, 70, 12, 13, 255, 69, 12, 13, 255, 68,
- 12, 13, 255, 67, 12, 13, 255, 66, 12, 13, 255, 65, 12, 13, 255, 64, 12,
- 13, 255, 63, 12, 13, 255, 62, 12, 13, 255, 61, 12, 13, 255, 60, 12, 13,
- 255, 59, 12, 13, 255, 58, 12, 13, 255, 57, 12, 13, 255, 56, 12, 13, 255,
- 55, 12, 13, 255, 54, 12, 13, 255, 53, 12, 13, 255, 52, 12, 13, 255, 51,
- 12, 13, 255, 50, 12, 13, 255, 49, 12, 13, 255, 48, 20, 1, 167, 229, 17,
- 231, 21, 20, 1, 167, 243, 77, 244, 44, 20, 1, 167, 224, 254, 231, 22,
- 225, 60, 20, 1, 167, 224, 254, 231, 22, 225, 61, 20, 1, 167, 229, 231,
- 231, 21, 20, 1, 167, 219, 223, 20, 1, 167, 216, 67, 231, 21, 20, 1, 167,
- 227, 122, 231, 21, 20, 1, 167, 220, 21, 226, 94, 228, 174, 20, 1, 167,
- 224, 254, 226, 94, 228, 175, 225, 60, 20, 1, 167, 224, 254, 226, 94, 228,
- 175, 225, 61, 20, 1, 167, 231, 223, 20, 1, 167, 215, 120, 231, 224, 20,
- 1, 167, 229, 76, 20, 1, 167, 231, 220, 20, 1, 167, 231, 181, 20, 1, 167,
- 230, 53, 20, 1, 167, 220, 126, 20, 1, 167, 227, 246, 20, 1, 167, 234,
- 155, 20, 1, 167, 228, 143, 20, 1, 167, 218, 5, 20, 1, 167, 229, 16, 20,
- 1, 167, 233, 93, 20, 1, 167, 233, 18, 233, 195, 20, 1, 167, 227, 253,
- 231, 29, 20, 1, 167, 231, 227, 20, 1, 167, 225, 250, 20, 1, 167, 242,
- 238, 20, 1, 167, 226, 54, 20, 1, 167, 230, 156, 229, 50, 20, 1, 167, 227,
- 103, 231, 32, 20, 1, 167, 104, 210, 188, 229, 225, 20, 1, 167, 242, 239,
- 20, 1, 167, 227, 253, 227, 254, 20, 1, 167, 219, 130, 20, 1, 167, 231,
- 14, 20, 1, 167, 231, 35, 20, 1, 167, 230, 135, 20, 1, 167, 234, 255, 20,
- 1, 167, 226, 94, 233, 53, 20, 1, 167, 229, 154, 233, 53, 20, 1, 167, 225,
- 161, 20, 1, 167, 231, 221, 20, 1, 167, 228, 212, 20, 1, 167, 224, 137,
- 20, 1, 167, 215, 117, 20, 1, 167, 232, 99, 20, 1, 167, 219, 43, 20, 1,
- 167, 216, 217, 20, 1, 167, 231, 218, 20, 1, 167, 234, 162, 20, 1, 167,
- 229, 150, 20, 1, 167, 233, 207, 20, 1, 167, 230, 136, 20, 1, 167, 219,
- 220, 20, 1, 167, 232, 144, 20, 1, 167, 244, 101, 20, 1, 167, 222, 201,
- 20, 1, 167, 233, 247, 20, 1, 167, 219, 39, 20, 1, 167, 231, 178, 225,
- 102, 20, 1, 167, 220, 14, 20, 1, 167, 227, 252, 20, 1, 167, 219, 255,
- 228, 7, 210, 196, 20, 1, 167, 227, 142, 230, 153, 20, 1, 167, 226, 89,
- 20, 1, 167, 228, 144, 20, 1, 167, 214, 170, 20, 1, 167, 229, 53, 20, 1,
- 167, 231, 217, 20, 1, 167, 228, 186, 20, 1, 167, 231, 124, 20, 1, 167,
- 227, 155, 20, 1, 167, 216, 221, 20, 1, 167, 219, 36, 20, 1, 167, 226, 90,
- 20, 1, 167, 228, 11, 20, 1, 167, 231, 225, 20, 1, 167, 227, 152, 20, 1,
- 167, 234, 222, 20, 1, 167, 228, 14, 20, 1, 167, 213, 250, 20, 1, 167,
- 232, 103, 20, 1, 167, 229, 103, 20, 1, 167, 229, 201, 20, 1, 167, 231,
- 123, 20, 1, 225, 141, 228, 9, 20, 1, 225, 141, 215, 120, 231, 222, 20, 1,
- 225, 141, 219, 187, 20, 1, 225, 141, 220, 130, 215, 119, 20, 1, 225, 141,
- 232, 146, 227, 249, 20, 1, 225, 141, 231, 130, 231, 226, 20, 1, 225, 141,
- 234, 93, 20, 1, 225, 141, 211, 15, 20, 1, 225, 141, 231, 125, 20, 1, 225,
- 141, 234, 243, 20, 1, 225, 141, 225, 211, 20, 1, 225, 141, 211, 89, 233,
- 53, 20, 1, 225, 141, 233, 109, 228, 7, 227, 164, 20, 1, 225, 141, 227,
- 247, 220, 40, 20, 1, 225, 141, 229, 121, 228, 189, 20, 1, 225, 141, 242,
- 236, 20, 1, 225, 141, 225, 52, 20, 1, 225, 141, 215, 120, 228, 5, 20, 1,
- 225, 141, 220, 45, 228, 184, 20, 1, 225, 141, 220, 41, 20, 1, 225, 141,
- 231, 22, 216, 220, 20, 1, 225, 141, 231, 112, 231, 126, 20, 1, 225, 141,
- 227, 153, 227, 249, 20, 1, 225, 141, 234, 151, 20, 1, 225, 141, 242, 237,
- 20, 1, 225, 141, 234, 147, 20, 1, 225, 141, 233, 135, 20, 1, 225, 141,
- 225, 253, 20, 1, 225, 141, 213, 182, 20, 1, 225, 141, 229, 18, 230, 51,
- 20, 1, 225, 141, 229, 52, 231, 108, 20, 1, 225, 141, 211, 193, 20, 1,
- 225, 141, 222, 13, 20, 1, 225, 141, 217, 98, 20, 1, 225, 141, 231, 34,
- 20, 1, 225, 141, 229, 37, 20, 1, 225, 141, 229, 38, 233, 90, 20, 1, 225,
- 141, 231, 24, 20, 1, 225, 141, 218, 53, 20, 1, 225, 141, 231, 116, 20, 1,
- 225, 141, 230, 138, 20, 1, 225, 141, 227, 167, 20, 1, 225, 141, 224, 141,
- 20, 1, 225, 141, 231, 33, 229, 54, 20, 1, 225, 141, 244, 134, 20, 1, 225,
- 141, 231, 103, 20, 1, 225, 141, 244, 155, 20, 1, 225, 141, 234, 159, 20,
- 1, 225, 141, 231, 244, 228, 178, 20, 1, 225, 141, 231, 244, 228, 154, 20,
- 1, 225, 141, 233, 17, 20, 1, 225, 141, 229, 60, 20, 1, 225, 141, 228, 16,
- 20, 1, 225, 141, 186, 20, 1, 225, 141, 234, 80, 20, 1, 225, 141, 229, 6,
- 20, 1, 137, 229, 17, 231, 224, 20, 1, 137, 227, 121, 20, 1, 137, 210,
- 196, 20, 1, 137, 212, 53, 20, 1, 137, 229, 53, 20, 1, 137, 229, 142, 20,
- 1, 137, 229, 24, 20, 1, 137, 242, 246, 20, 1, 137, 231, 120, 20, 1, 137,
- 243, 84, 20, 1, 137, 227, 144, 230, 175, 231, 36, 20, 1, 137, 227, 245,
- 231, 111, 20, 1, 137, 231, 117, 20, 1, 137, 225, 58, 20, 1, 137, 229,
- 127, 20, 1, 137, 231, 128, 251, 37, 20, 1, 137, 234, 149, 20, 1, 137,
- 242, 247, 20, 1, 137, 234, 156, 20, 1, 137, 210, 213, 230, 81, 20, 1,
- 137, 227, 115, 20, 1, 137, 231, 105, 20, 1, 137, 228, 15, 20, 1, 137,
- 231, 111, 20, 1, 137, 211, 16, 20, 1, 137, 233, 255, 20, 1, 137, 235, 16,
- 20, 1, 137, 220, 125, 20, 1, 137, 229, 136, 20, 1, 137, 217, 96, 20, 1,
- 137, 228, 158, 20, 1, 137, 216, 67, 210, 198, 20, 1, 137, 218, 80, 20, 1,
- 137, 229, 44, 227, 164, 20, 1, 137, 213, 181, 20, 1, 137, 229, 204, 20,
- 1, 137, 231, 244, 234, 158, 20, 1, 137, 227, 254, 20, 1, 137, 229, 39,
- 20, 1, 137, 233, 94, 20, 1, 137, 231, 113, 20, 1, 137, 231, 13, 20, 1,
- 137, 227, 248, 20, 1, 137, 216, 216, 20, 1, 137, 229, 41, 20, 1, 137,
- 243, 240, 20, 1, 137, 229, 141, 20, 1, 137, 228, 17, 20, 1, 137, 228, 13,
- 20, 1, 137, 251, 115, 20, 1, 137, 213, 183, 20, 1, 137, 231, 118, 20, 1,
- 137, 222, 142, 20, 1, 137, 228, 188, 20, 1, 137, 233, 108, 20, 1, 137,
- 216, 65, 20, 1, 137, 227, 255, 229, 6, 20, 1, 137, 228, 180, 20, 1, 137,
- 234, 162, 20, 1, 137, 229, 45, 20, 1, 137, 231, 217, 20, 1, 137, 231,
- 106, 20, 1, 137, 232, 103, 20, 1, 137, 233, 195, 20, 1, 137, 228, 186,
- 20, 1, 137, 229, 6, 20, 1, 137, 211, 184, 20, 1, 137, 229, 42, 20, 1,
- 137, 228, 2, 20, 1, 137, 227, 250, 20, 1, 137, 233, 209, 228, 144, 20, 1,
- 137, 228, 0, 20, 1, 137, 229, 149, 20, 1, 137, 231, 244, 228, 5, 20, 1,
- 137, 211, 103, 20, 1, 137, 229, 148, 20, 1, 137, 219, 222, 20, 1, 137,
- 220, 128, 20, 1, 137, 231, 114, 20, 1, 137, 231, 224, 20, 1, 137, 231,
- 124, 20, 1, 137, 234, 150, 20, 1, 137, 231, 115, 20, 1, 137, 234, 154,
- 20, 1, 137, 231, 128, 225, 106, 20, 1, 137, 210, 179, 20, 1, 137, 228,
- 176, 20, 1, 137, 230, 225, 20, 1, 137, 230, 105, 20, 1, 137, 220, 17, 20,
- 1, 137, 234, 172, 233, 76, 20, 1, 137, 234, 172, 244, 168, 20, 1, 137,
- 229, 74, 20, 1, 137, 229, 201, 20, 1, 137, 232, 206, 20, 1, 137, 225, 68,
- 20, 1, 137, 225, 202, 20, 1, 137, 216, 231, 20, 1, 107, 231, 104, 20, 1,
- 107, 212, 51, 20, 1, 107, 228, 174, 20, 1, 107, 231, 21, 20, 1, 107, 228,
- 172, 20, 1, 107, 232, 241, 20, 1, 107, 228, 177, 20, 1, 107, 228, 12, 20,
- 1, 107, 229, 59, 20, 1, 107, 227, 164, 20, 1, 107, 211, 194, 20, 1, 107,
- 229, 14, 20, 1, 107, 220, 63, 20, 1, 107, 229, 25, 20, 1, 107, 234, 157,
- 20, 1, 107, 216, 218, 20, 1, 107, 220, 43, 20, 1, 107, 228, 185, 20, 1,
- 107, 218, 53, 20, 1, 107, 234, 162, 20, 1, 107, 211, 91, 20, 1, 107, 233,
- 210, 20, 1, 107, 221, 236, 20, 1, 107, 231, 26, 20, 1, 107, 229, 140, 20,
- 1, 107, 231, 193, 20, 1, 107, 231, 32, 20, 1, 107, 220, 127, 20, 1, 107,
- 211, 39, 20, 1, 107, 228, 179, 20, 1, 107, 234, 153, 231, 107, 20, 1,
- 107, 229, 21, 20, 1, 107, 215, 119, 20, 1, 107, 242, 255, 20, 1, 107,
- 229, 11, 20, 1, 107, 244, 135, 20, 1, 107, 229, 144, 20, 1, 107, 231, 5,
- 20, 1, 107, 233, 11, 20, 1, 107, 229, 126, 20, 1, 107, 230, 152, 20, 1,
- 107, 231, 9, 20, 1, 107, 224, 121, 20, 1, 107, 231, 7, 20, 1, 107, 231,
- 23, 20, 1, 107, 232, 89, 20, 1, 107, 228, 4, 20, 1, 107, 231, 127, 20, 1,
- 107, 233, 186, 20, 1, 107, 227, 155, 20, 1, 107, 216, 221, 20, 1, 107,
- 219, 36, 20, 1, 107, 210, 179, 20, 1, 107, 234, 154, 20, 1, 107, 223,
- 173, 20, 1, 107, 217, 11, 20, 1, 107, 229, 22, 20, 1, 107, 231, 28, 20,
- 1, 107, 228, 3, 20, 1, 107, 234, 152, 20, 1, 107, 225, 62, 20, 1, 107,
- 225, 155, 20, 1, 107, 227, 131, 20, 1, 107, 233, 17, 20, 1, 107, 229, 60,
- 20, 1, 107, 231, 25, 20, 1, 107, 229, 34, 20, 1, 107, 210, 193, 20, 1,
- 107, 226, 25, 20, 1, 107, 210, 192, 20, 1, 107, 229, 149, 20, 1, 107,
- 227, 249, 20, 1, 107, 218, 82, 20, 1, 107, 233, 214, 20, 1, 107, 229, 49,
- 20, 1, 107, 229, 19, 20, 1, 107, 215, 103, 20, 1, 107, 231, 36, 20, 1,
- 107, 233, 204, 20, 1, 107, 228, 1, 20, 1, 107, 216, 219, 20, 1, 107, 231,
- 219, 20, 1, 107, 229, 58, 20, 1, 107, 233, 10, 20, 1, 107, 229, 40, 20,
- 1, 107, 228, 6, 20, 1, 107, 228, 158, 20, 1, 107, 242, 240, 20, 1, 107,
- 233, 223, 20, 1, 107, 223, 87, 226, 213, 20, 1, 107, 217, 87, 20, 1, 107,
- 216, 11, 20, 1, 107, 227, 152, 20, 1, 107, 222, 242, 20, 1, 107, 233, 55,
- 20, 1, 107, 231, 84, 20, 1, 107, 194, 20, 1, 107, 218, 5, 20, 1, 107,
- 230, 107, 20, 1, 107, 220, 29, 20, 1, 107, 220, 39, 20, 1, 107, 233, 161,
- 20, 1, 107, 227, 242, 20, 1, 107, 219, 227, 20, 1, 107, 227, 251, 20, 1,
- 107, 225, 214, 20, 1, 107, 228, 238, 20, 1, 107, 219, 254, 20, 1, 107,
- 224, 136, 20, 1, 107, 230, 51, 20, 1, 107, 232, 125, 20, 1, 107, 223, 87,
- 230, 101, 20, 1, 107, 216, 118, 20, 1, 107, 227, 243, 20, 1, 107, 231,
- 128, 199, 20, 1, 107, 221, 234, 20, 1, 107, 244, 203, 20, 1, 82, 229,
- 148, 20, 1, 82, 216, 17, 20, 1, 82, 231, 117, 20, 1, 82, 233, 94, 20, 1,
- 82, 213, 128, 20, 1, 82, 232, 131, 20, 1, 82, 226, 93, 20, 1, 82, 219,
- 47, 20, 1, 82, 223, 148, 20, 1, 82, 228, 8, 20, 1, 82, 229, 119, 20, 1,
- 82, 224, 150, 20, 1, 82, 217, 63, 20, 1, 82, 229, 27, 20, 1, 82, 233,
- 251, 20, 1, 82, 211, 187, 20, 1, 82, 221, 172, 20, 1, 82, 229, 50, 20, 1,
- 82, 226, 90, 20, 1, 82, 216, 18, 20, 1, 82, 233, 208, 20, 1, 82, 232,
- 145, 20, 1, 82, 228, 11, 20, 1, 82, 229, 3, 20, 1, 82, 231, 225, 20, 1,
- 82, 229, 20, 20, 1, 82, 229, 2, 20, 1, 82, 228, 10, 20, 1, 82, 222, 240,
- 20, 1, 82, 228, 176, 20, 1, 82, 225, 213, 20, 1, 82, 222, 33, 20, 1, 82,
- 229, 35, 20, 1, 82, 231, 15, 20, 1, 82, 242, 234, 20, 1, 82, 229, 23, 20,
- 1, 82, 228, 187, 20, 1, 82, 231, 177, 20, 1, 82, 232, 127, 20, 1, 82,
- 229, 55, 20, 1, 82, 229, 132, 20, 1, 82, 217, 86, 227, 249, 20, 1, 82,
- 220, 129, 20, 1, 82, 224, 146, 20, 1, 82, 229, 152, 219, 53, 20, 1, 82,
- 229, 43, 227, 164, 20, 1, 82, 211, 4, 20, 1, 82, 242, 235, 20, 1, 82,
- 215, 118, 20, 1, 82, 211, 19, 20, 1, 82, 225, 19, 20, 1, 82, 215, 108,
- 20, 1, 82, 234, 160, 20, 1, 82, 218, 81, 20, 1, 82, 216, 220, 20, 1, 82,
- 213, 184, 20, 1, 82, 212, 6, 20, 1, 82, 233, 138, 20, 1, 82, 224, 153,
- 20, 1, 82, 217, 97, 20, 1, 82, 242, 254, 20, 1, 82, 229, 64, 20, 1, 82,
- 220, 42, 20, 1, 82, 231, 10, 20, 1, 82, 231, 121, 20, 1, 82, 227, 119,
- 20, 1, 82, 228, 141, 20, 1, 82, 243, 80, 20, 1, 82, 215, 109, 20, 1, 82,
- 233, 217, 20, 1, 82, 211, 67, 20, 1, 82, 227, 153, 250, 24, 20, 1, 82,
- 210, 250, 20, 1, 82, 231, 27, 20, 1, 82, 229, 137, 20, 1, 82, 225, 103,
- 20, 1, 82, 210, 197, 20, 1, 82, 233, 12, 20, 1, 82, 243, 240, 20, 1, 82,
- 243, 79, 20, 1, 82, 229, 13, 20, 1, 82, 234, 162, 20, 1, 82, 231, 228,
- 20, 1, 82, 229, 26, 20, 1, 82, 242, 241, 20, 1, 82, 244, 204, 20, 1, 82,
- 227, 244, 20, 1, 82, 225, 156, 20, 1, 82, 211, 17, 20, 1, 82, 229, 51,
- 20, 1, 82, 227, 153, 252, 31, 20, 1, 82, 227, 99, 20, 1, 82, 224, 250,
- 20, 1, 82, 230, 225, 20, 1, 82, 243, 238, 20, 1, 82, 229, 225, 20, 1, 82,
- 230, 105, 20, 1, 82, 242, 240, 20, 1, 82, 243, 242, 74, 20, 1, 82, 230,
- 52, 20, 1, 82, 224, 149, 20, 1, 82, 229, 15, 20, 1, 82, 233, 195, 20, 1,
- 82, 225, 100, 20, 1, 82, 227, 252, 20, 1, 82, 211, 18, 20, 1, 82, 229,
- 36, 20, 1, 82, 226, 94, 225, 190, 20, 1, 82, 243, 242, 251, 23, 20, 1,
- 82, 244, 45, 20, 1, 82, 228, 181, 20, 1, 82, 61, 20, 1, 82, 216, 11, 20,
- 1, 82, 78, 20, 1, 82, 74, 20, 1, 82, 233, 92, 20, 1, 82, 226, 94, 225,
- 26, 20, 1, 82, 217, 102, 20, 1, 82, 217, 52, 20, 1, 82, 229, 152, 230,
- 39, 240, 241, 20, 1, 82, 220, 17, 20, 1, 82, 211, 14, 20, 1, 82, 228,
- 252, 20, 1, 82, 210, 202, 20, 1, 82, 210, 227, 217, 241, 20, 1, 82, 210,
- 227, 249, 155, 20, 1, 82, 210, 187, 20, 1, 82, 210, 195, 20, 1, 82, 234,
- 148, 20, 1, 82, 225, 154, 20, 1, 82, 228, 182, 245, 110, 20, 1, 82, 224,
- 147, 20, 1, 82, 211, 192, 20, 1, 82, 244, 155, 20, 1, 82, 213, 250, 20,
- 1, 82, 232, 103, 20, 1, 82, 230, 235, 20, 1, 82, 223, 54, 20, 1, 82, 223,
- 174, 20, 1, 82, 228, 251, 20, 1, 82, 229, 82, 20, 1, 82, 220, 9, 20, 1,
- 82, 219, 254, 20, 1, 82, 243, 242, 223, 89, 20, 1, 82, 198, 20, 1, 82,
- 225, 111, 20, 1, 82, 232, 125, 20, 1, 82, 234, 34, 20, 1, 82, 231, 63,
- 20, 1, 82, 186, 20, 1, 82, 231, 174, 20, 1, 82, 216, 222, 20, 1, 82, 234,
- 98, 20, 1, 82, 230, 155, 20, 1, 82, 216, 248, 20, 1, 82, 244, 177, 20, 1,
- 82, 242, 230, 20, 1, 225, 140, 176, 20, 1, 225, 140, 69, 20, 1, 225, 140,
- 233, 223, 20, 1, 225, 140, 245, 217, 20, 1, 225, 140, 223, 111, 20, 1,
- 225, 140, 217, 87, 20, 1, 225, 140, 227, 152, 20, 1, 225, 140, 233, 141,
- 20, 1, 225, 140, 222, 242, 20, 1, 225, 140, 223, 32, 20, 1, 225, 140,
- 231, 84, 20, 1, 225, 140, 217, 102, 20, 1, 225, 140, 229, 151, 20, 1,
- 225, 140, 228, 188, 20, 1, 225, 140, 194, 20, 1, 225, 140, 218, 5, 20, 1,
- 225, 140, 220, 29, 20, 1, 225, 140, 219, 193, 20, 1, 225, 140, 220, 125,
- 20, 1, 225, 140, 233, 161, 20, 1, 225, 140, 234, 162, 20, 1, 225, 140,
- 227, 213, 20, 1, 225, 140, 227, 242, 20, 1, 225, 140, 228, 159, 20, 1,
- 225, 140, 210, 226, 20, 1, 225, 140, 219, 227, 20, 1, 225, 140, 192, 20,
- 1, 225, 140, 228, 14, 20, 1, 225, 140, 225, 154, 20, 1, 225, 140, 227,
- 251, 20, 1, 225, 140, 211, 192, 20, 1, 225, 140, 225, 214, 20, 1, 225,
- 140, 222, 142, 20, 1, 225, 140, 228, 238, 20, 1, 225, 140, 223, 54, 20,
- 1, 225, 140, 234, 171, 20, 1, 225, 140, 229, 12, 20, 1, 225, 140, 229,
- 61, 20, 1, 225, 140, 220, 9, 20, 1, 225, 140, 224, 150, 20, 1, 225, 140,
- 244, 45, 20, 1, 225, 140, 212, 65, 20, 1, 225, 140, 232, 247, 20, 1, 225,
- 140, 232, 125, 20, 1, 225, 140, 234, 34, 20, 1, 225, 140, 231, 119, 20,
- 1, 225, 140, 223, 86, 20, 1, 225, 140, 186, 20, 1, 225, 140, 230, 166,
- 20, 1, 225, 140, 231, 127, 20, 1, 225, 140, 216, 231, 20, 1, 225, 140,
- 234, 1, 20, 1, 225, 140, 221, 253, 20, 1, 225, 140, 212, 115, 95, 1, 191,
- 95, 1, 252, 199, 95, 1, 8, 191, 95, 1, 225, 45, 95, 1, 186, 95, 1, 230,
- 238, 95, 1, 254, 31, 186, 95, 1, 244, 204, 95, 1, 214, 27, 95, 1, 213,
- 177, 95, 1, 217, 106, 95, 1, 248, 229, 95, 1, 8, 215, 157, 95, 1, 8, 217,
- 106, 95, 1, 215, 157, 95, 1, 248, 143, 95, 1, 198, 95, 1, 228, 242, 95,
- 1, 8, 228, 115, 95, 1, 254, 31, 198, 95, 1, 228, 115, 95, 1, 228, 101,
- 95, 1, 233, 141, 95, 1, 232, 66, 95, 1, 233, 4, 95, 1, 232, 249, 95, 1,
- 216, 57, 95, 1, 247, 161, 95, 1, 216, 49, 95, 1, 247, 160, 95, 1, 176,
- 95, 1, 243, 142, 95, 1, 8, 176, 95, 1, 224, 91, 95, 1, 224, 69, 95, 1,
- 229, 82, 95, 1, 229, 33, 95, 1, 254, 31, 229, 82, 95, 1, 162, 95, 1, 211,
- 165, 95, 1, 243, 0, 95, 1, 242, 233, 95, 1, 215, 166, 95, 1, 246, 34, 95,
- 1, 227, 169, 95, 1, 227, 154, 95, 1, 215, 176, 95, 1, 246, 41, 95, 1, 8,
- 215, 176, 95, 1, 8, 246, 41, 95, 1, 223, 109, 215, 176, 95, 1, 220, 104,
- 95, 1, 218, 225, 95, 1, 210, 82, 95, 1, 210, 14, 95, 1, 215, 184, 95, 1,
- 246, 46, 95, 1, 8, 215, 184, 95, 1, 206, 95, 1, 210, 116, 95, 1, 210, 15,
- 95, 1, 209, 243, 95, 1, 209, 223, 95, 1, 254, 31, 209, 243, 95, 1, 209,
- 215, 95, 1, 209, 222, 95, 1, 212, 65, 95, 1, 254, 218, 95, 1, 241, 196,
- 95, 1, 229, 197, 95, 5, 253, 230, 95, 5, 223, 109, 213, 133, 95, 5, 223,
- 109, 253, 230, 95, 25, 5, 61, 95, 25, 5, 255, 82, 95, 25, 5, 254, 214,
- 95, 25, 5, 254, 131, 95, 25, 5, 254, 123, 95, 25, 5, 78, 95, 25, 5, 226,
- 187, 95, 25, 5, 211, 227, 95, 25, 5, 212, 98, 95, 25, 5, 76, 95, 25, 5,
- 245, 158, 95, 25, 5, 245, 146, 95, 25, 5, 226, 236, 95, 25, 5, 74, 95,
- 25, 5, 240, 126, 95, 25, 5, 240, 125, 95, 25, 5, 240, 124, 95, 25, 5,
- 235, 196, 95, 25, 5, 236, 67, 95, 25, 5, 236, 40, 95, 25, 5, 235, 162,
- 95, 25, 5, 235, 238, 95, 25, 5, 69, 95, 25, 5, 214, 229, 95, 25, 5, 214,
- 228, 95, 25, 5, 214, 227, 95, 25, 5, 214, 118, 95, 25, 5, 214, 211, 95,
- 25, 5, 214, 178, 95, 25, 5, 211, 117, 95, 25, 5, 211, 8, 95, 25, 5, 254,
- 252, 95, 25, 5, 254, 248, 95, 25, 5, 245, 94, 95, 25, 5, 222, 185, 245,
- 94, 95, 25, 5, 245, 100, 95, 25, 5, 222, 185, 245, 100, 95, 25, 5, 254,
- 210, 95, 25, 5, 245, 203, 95, 25, 5, 253, 200, 95, 25, 5, 226, 138, 95,
- 25, 5, 230, 30, 95, 25, 5, 229, 84, 95, 138, 222, 254, 95, 138, 216, 15,
- 222, 254, 95, 138, 48, 95, 138, 51, 95, 1, 216, 29, 95, 1, 216, 28, 95,
- 1, 216, 27, 95, 1, 216, 26, 95, 1, 216, 25, 95, 1, 216, 24, 95, 1, 216,
- 23, 95, 1, 223, 109, 216, 30, 95, 1, 223, 109, 216, 29, 95, 1, 223, 109,
- 216, 27, 95, 1, 223, 109, 216, 26, 95, 1, 223, 109, 216, 25, 95, 1, 223,
- 109, 216, 23, 56, 1, 254, 31, 76, 141, 1, 254, 31, 211, 47, 49, 28, 16,
- 224, 157, 49, 28, 16, 248, 166, 49, 28, 16, 225, 178, 49, 28, 16, 226,
- 117, 245, 186, 49, 28, 16, 226, 117, 247, 209, 49, 28, 16, 214, 16, 245,
- 186, 49, 28, 16, 214, 16, 247, 209, 49, 28, 16, 234, 203, 49, 28, 16,
- 217, 170, 49, 28, 16, 226, 13, 49, 28, 16, 210, 217, 49, 28, 16, 210,
- 218, 247, 209, 49, 28, 16, 233, 240, 49, 28, 16, 254, 76, 245, 186, 49,
- 28, 16, 245, 34, 245, 186, 49, 28, 16, 217, 3, 49, 28, 16, 234, 167, 49,
- 28, 16, 254, 66, 49, 28, 16, 254, 67, 247, 209, 49, 28, 16, 217, 176, 49,
- 28, 16, 216, 160, 49, 28, 16, 226, 210, 254, 29, 49, 28, 16, 242, 166,
- 254, 29, 49, 28, 16, 224, 156, 49, 28, 16, 250, 157, 49, 28, 16, 214, 6,
- 49, 28, 16, 235, 170, 254, 29, 49, 28, 16, 234, 169, 254, 29, 49, 28, 16,
- 234, 168, 254, 29, 49, 28, 16, 221, 215, 49, 28, 16, 226, 4, 49, 28, 16,
- 218, 148, 254, 69, 49, 28, 16, 226, 116, 254, 29, 49, 28, 16, 214, 15,
- 254, 29, 49, 28, 16, 254, 70, 254, 29, 49, 28, 16, 254, 64, 49, 28, 16,
- 234, 43, 49, 28, 16, 223, 49, 49, 28, 16, 225, 109, 254, 29, 49, 28, 16,
- 216, 84, 49, 28, 16, 254, 129, 49, 28, 16, 221, 161, 49, 28, 16, 217,
- 179, 254, 29, 49, 28, 16, 217, 179, 231, 45, 218, 146, 49, 28, 16, 226,
- 111, 254, 29, 49, 28, 16, 216, 191, 49, 28, 16, 233, 33, 49, 28, 16, 246,
- 49, 49, 28, 16, 215, 228, 49, 28, 16, 216, 233, 49, 28, 16, 233, 243, 49,
- 28, 16, 254, 76, 245, 34, 229, 100, 49, 28, 16, 243, 243, 254, 29, 49,
- 28, 16, 236, 19, 49, 28, 16, 215, 200, 254, 29, 49, 28, 16, 234, 206,
- 215, 199, 49, 28, 16, 225, 203, 49, 28, 16, 224, 161, 49, 28, 16, 234,
- 17, 49, 28, 16, 250, 88, 254, 29, 49, 28, 16, 223, 149, 49, 28, 16, 226,
- 16, 254, 29, 49, 28, 16, 226, 14, 254, 29, 49, 28, 16, 240, 116, 49, 28,
- 16, 229, 208, 49, 28, 16, 225, 159, 49, 28, 16, 234, 18, 254, 158, 49,
- 28, 16, 215, 200, 254, 158, 49, 28, 16, 218, 125, 49, 28, 16, 242, 130,
- 49, 28, 16, 235, 170, 229, 100, 49, 28, 16, 226, 210, 229, 100, 49, 28,
- 16, 226, 117, 229, 100, 49, 28, 16, 225, 158, 49, 28, 16, 234, 4, 49, 28,
- 16, 225, 157, 49, 28, 16, 233, 242, 49, 28, 16, 225, 204, 229, 100, 49,
- 28, 16, 234, 168, 229, 101, 254, 104, 49, 28, 16, 234, 169, 229, 101,
- 254, 104, 49, 28, 16, 210, 215, 49, 28, 16, 254, 67, 229, 100, 49, 28,
- 16, 254, 68, 217, 177, 229, 100, 49, 28, 16, 210, 216, 49, 28, 16, 233,
- 241, 49, 28, 16, 245, 181, 49, 28, 16, 250, 158, 49, 28, 16, 230, 203,
- 235, 169, 49, 28, 16, 214, 16, 229, 100, 49, 28, 16, 225, 109, 229, 100,
- 49, 28, 16, 224, 162, 229, 100, 49, 28, 16, 226, 207, 49, 28, 16, 254,
- 92, 49, 28, 16, 232, 63, 49, 28, 16, 226, 14, 229, 100, 49, 28, 16, 226,
- 16, 229, 100, 49, 28, 16, 245, 68, 226, 15, 49, 28, 16, 233, 159, 49, 28,
- 16, 254, 93, 49, 28, 16, 215, 200, 229, 100, 49, 28, 16, 245, 184, 49,
- 28, 16, 217, 179, 229, 100, 49, 28, 16, 217, 171, 49, 28, 16, 250, 88,
- 229, 100, 49, 28, 16, 245, 114, 49, 28, 16, 221, 162, 229, 100, 49, 28,
- 16, 211, 151, 234, 43, 49, 28, 16, 215, 197, 49, 28, 16, 224, 163, 49,
- 28, 16, 215, 201, 49, 28, 16, 215, 198, 49, 28, 16, 224, 160, 49, 28, 16,
- 215, 196, 49, 28, 16, 224, 159, 49, 28, 16, 242, 165, 49, 28, 16, 254,
- 22, 49, 28, 16, 245, 68, 254, 22, 49, 28, 16, 226, 111, 229, 100, 49, 28,
- 16, 216, 190, 245, 77, 49, 28, 16, 216, 190, 245, 33, 49, 28, 16, 216,
- 192, 254, 71, 49, 28, 16, 216, 185, 234, 253, 254, 63, 49, 28, 16, 234,
- 205, 49, 28, 16, 245, 147, 49, 28, 16, 211, 11, 234, 202, 49, 28, 16,
- 211, 11, 254, 104, 49, 28, 16, 218, 147, 49, 28, 16, 234, 44, 254, 104,
- 49, 28, 16, 247, 210, 254, 29, 49, 28, 16, 233, 244, 254, 29, 49, 28, 16,
- 233, 244, 254, 158, 49, 28, 16, 233, 244, 229, 100, 49, 28, 16, 254, 70,
- 229, 100, 49, 28, 16, 254, 72, 49, 28, 16, 247, 209, 49, 28, 16, 215,
- 211, 49, 28, 16, 216, 225, 49, 28, 16, 234, 8, 49, 28, 16, 233, 38, 245,
- 142, 250, 79, 49, 28, 16, 233, 38, 246, 50, 250, 80, 49, 28, 16, 233, 38,
- 215, 213, 250, 80, 49, 28, 16, 233, 38, 216, 235, 250, 80, 49, 28, 16,
- 233, 38, 236, 14, 250, 79, 49, 28, 16, 242, 166, 229, 101, 254, 104, 49,
- 28, 16, 242, 166, 226, 5, 254, 18, 49, 28, 16, 242, 166, 226, 5, 248, 37,
- 49, 28, 16, 247, 233, 49, 28, 16, 247, 234, 226, 5, 254, 19, 234, 202,
- 49, 28, 16, 247, 234, 226, 5, 254, 19, 254, 104, 49, 28, 16, 247, 234,
- 226, 5, 248, 37, 49, 28, 16, 215, 217, 49, 28, 16, 254, 23, 49, 28, 16,
- 236, 21, 49, 28, 16, 247, 254, 49, 28, 16, 254, 220, 225, 3, 254, 24, 49,
- 28, 16, 254, 220, 254, 21, 49, 28, 16, 254, 220, 254, 24, 49, 28, 16,
- 254, 220, 231, 39, 49, 28, 16, 254, 220, 231, 50, 49, 28, 16, 254, 220,
- 242, 167, 49, 28, 16, 254, 220, 242, 164, 49, 28, 16, 254, 220, 225, 3,
- 242, 167, 49, 28, 16, 231, 156, 224, 168, 240, 114, 49, 28, 16, 231, 156,
- 254, 160, 224, 168, 240, 114, 49, 28, 16, 231, 156, 248, 36, 240, 114,
- 49, 28, 16, 231, 156, 254, 160, 248, 36, 240, 114, 49, 28, 16, 231, 156,
- 215, 206, 240, 114, 49, 28, 16, 231, 156, 215, 218, 49, 28, 16, 231, 156,
- 216, 229, 240, 114, 49, 28, 16, 231, 156, 216, 229, 233, 41, 240, 114,
- 49, 28, 16, 231, 156, 233, 41, 240, 114, 49, 28, 16, 231, 156, 225, 42,
- 240, 114, 49, 28, 16, 235, 176, 216, 252, 240, 115, 49, 28, 16, 254, 68,
- 216, 252, 240, 115, 49, 28, 16, 244, 180, 216, 226, 49, 28, 16, 244, 180,
- 230, 148, 49, 28, 16, 244, 180, 247, 238, 49, 28, 16, 231, 156, 214, 10,
- 240, 114, 49, 28, 16, 231, 156, 224, 167, 240, 114, 49, 28, 16, 231, 156,
- 225, 42, 216, 229, 240, 114, 49, 28, 16, 242, 162, 230, 31, 254, 71, 49,
- 28, 16, 242, 162, 230, 31, 247, 208, 49, 28, 16, 245, 156, 234, 253, 243,
- 243, 213, 124, 49, 28, 16, 236, 20, 49, 28, 16, 236, 18, 49, 28, 16, 243,
- 243, 254, 30, 248, 35, 240, 113, 49, 28, 16, 243, 243, 247, 252, 191, 49,
- 28, 16, 243, 243, 247, 252, 229, 208, 49, 28, 16, 243, 243, 229, 203,
- 240, 114, 49, 28, 16, 243, 243, 247, 252, 248, 11, 49, 28, 16, 243, 243,
- 219, 104, 247, 251, 248, 11, 49, 28, 16, 243, 243, 247, 252, 234, 188,
- 49, 28, 16, 243, 243, 247, 252, 210, 23, 49, 28, 16, 243, 243, 247, 252,
- 228, 239, 234, 202, 49, 28, 16, 243, 243, 247, 252, 228, 239, 254, 104,
- 49, 28, 16, 243, 243, 231, 196, 250, 81, 247, 238, 49, 28, 16, 243, 243,
- 231, 196, 250, 81, 230, 148, 49, 28, 16, 244, 130, 219, 104, 250, 81,
- 214, 9, 49, 28, 16, 243, 243, 219, 104, 250, 81, 217, 180, 49, 28, 16,
- 243, 243, 229, 102, 49, 28, 16, 250, 82, 209, 249, 49, 28, 16, 250, 82,
- 234, 42, 49, 28, 16, 250, 82, 219, 11, 49, 28, 16, 243, 243, 240, 161,
- 211, 10, 216, 230, 49, 28, 16, 243, 243, 245, 157, 254, 94, 49, 28, 16,
- 211, 10, 215, 207, 49, 28, 16, 247, 246, 215, 207, 49, 28, 16, 247, 246,
- 216, 230, 49, 28, 16, 247, 246, 254, 73, 246, 50, 247, 147, 49, 28, 16,
- 247, 246, 230, 146, 216, 234, 247, 147, 49, 28, 16, 247, 246, 247, 230,
- 245, 44, 247, 147, 49, 28, 16, 247, 246, 215, 215, 226, 215, 247, 147,
- 49, 28, 16, 211, 10, 254, 73, 246, 50, 247, 147, 49, 28, 16, 211, 10,
- 230, 146, 216, 234, 247, 147, 49, 28, 16, 211, 10, 247, 230, 245, 44,
- 247, 147, 49, 28, 16, 211, 10, 215, 215, 226, 215, 247, 147, 49, 28, 16,
- 243, 56, 247, 245, 49, 28, 16, 243, 56, 211, 9, 49, 28, 16, 247, 253,
- 254, 73, 230, 204, 49, 28, 16, 247, 253, 254, 73, 231, 78, 49, 28, 16,
- 247, 253, 247, 209, 49, 28, 16, 247, 253, 216, 183, 49, 28, 16, 219, 165,
- 216, 183, 49, 28, 16, 219, 165, 216, 184, 247, 194, 49, 28, 16, 219, 165,
- 216, 184, 215, 208, 49, 28, 16, 219, 165, 216, 184, 216, 223, 49, 28, 16,
- 219, 165, 253, 252, 49, 28, 16, 219, 165, 253, 253, 247, 194, 49, 28, 16,
- 219, 165, 253, 253, 215, 208, 49, 28, 16, 219, 165, 253, 253, 216, 223,
- 49, 28, 16, 247, 231, 243, 37, 49, 28, 16, 247, 237, 226, 138, 49, 28,
- 16, 218, 139, 49, 28, 16, 254, 15, 191, 49, 28, 16, 254, 15, 213, 124,
- 49, 28, 16, 254, 15, 243, 142, 49, 28, 16, 254, 15, 248, 11, 49, 28, 16,
- 254, 15, 234, 188, 49, 28, 16, 254, 15, 210, 23, 49, 28, 16, 254, 15,
- 228, 238, 49, 28, 16, 234, 168, 229, 101, 231, 49, 49, 28, 16, 234, 169,
- 229, 101, 231, 49, 49, 28, 16, 234, 168, 229, 101, 234, 202, 49, 28, 16,
- 234, 169, 229, 101, 234, 202, 49, 28, 16, 234, 44, 234, 202, 49, 28, 16,
- 242, 166, 229, 101, 234, 202, 28, 16, 219, 157, 252, 143, 28, 16, 52,
- 252, 143, 28, 16, 40, 252, 143, 28, 16, 223, 53, 40, 252, 143, 28, 16,
- 248, 163, 252, 143, 28, 16, 219, 253, 252, 143, 28, 16, 43, 223, 80, 50,
- 28, 16, 44, 223, 80, 50, 28, 16, 223, 80, 247, 126, 28, 16, 248, 204,
- 221, 165, 28, 16, 248, 230, 251, 1, 28, 16, 221, 165, 28, 16, 249, 242,
- 28, 16, 223, 78, 244, 119, 28, 16, 223, 78, 244, 118, 28, 16, 223, 78,
- 244, 117, 28, 16, 244, 139, 28, 16, 244, 140, 51, 28, 16, 251, 156, 79,
- 28, 16, 251, 32, 28, 16, 251, 167, 28, 16, 127, 28, 16, 226, 197, 218,
- 165, 28, 16, 215, 57, 218, 165, 28, 16, 216, 143, 218, 165, 28, 16, 244,
- 18, 218, 165, 28, 16, 244, 88, 218, 165, 28, 16, 219, 126, 218, 165, 28,
- 16, 219, 124, 244, 2, 28, 16, 244, 16, 244, 2, 28, 16, 243, 210, 250, 22,
- 28, 16, 243, 210, 250, 23, 226, 140, 254, 150, 28, 16, 243, 210, 250, 23,
- 226, 140, 252, 130, 28, 16, 251, 75, 250, 22, 28, 16, 245, 15, 250, 22,
- 28, 16, 245, 15, 250, 23, 226, 140, 254, 150, 28, 16, 245, 15, 250, 23,
- 226, 140, 252, 130, 28, 16, 246, 91, 250, 21, 28, 16, 246, 91, 250, 20,
- 28, 16, 230, 90, 231, 95, 223, 64, 28, 16, 52, 220, 77, 28, 16, 52, 244,
- 73, 28, 16, 244, 74, 214, 163, 28, 16, 244, 74, 246, 114, 28, 16, 229,
- 193, 214, 163, 28, 16, 229, 193, 246, 114, 28, 16, 220, 78, 214, 163, 28,
- 16, 220, 78, 246, 114, 28, 16, 224, 25, 138, 220, 77, 28, 16, 224, 25,
- 138, 244, 73, 28, 16, 249, 224, 216, 88, 28, 16, 249, 93, 216, 88, 28,
- 16, 226, 140, 254, 150, 28, 16, 226, 140, 252, 130, 28, 16, 224, 7, 254,
- 150, 28, 16, 224, 7, 252, 130, 28, 16, 230, 93, 223, 64, 28, 16, 211,
- 251, 223, 64, 28, 16, 163, 223, 64, 28, 16, 224, 25, 223, 64, 28, 16,
- 245, 197, 223, 64, 28, 16, 219, 120, 223, 64, 28, 16, 216, 161, 223, 64,
- 28, 16, 219, 112, 223, 64, 28, 16, 123, 240, 218, 215, 71, 223, 64, 28,
- 16, 211, 179, 228, 48, 28, 16, 96, 228, 48, 28, 16, 250, 44, 211, 179,
- 228, 48, 28, 16, 42, 228, 49, 211, 253, 28, 16, 42, 228, 49, 251, 229,
- 28, 16, 215, 227, 228, 49, 120, 211, 253, 28, 16, 215, 227, 228, 49, 120,
- 251, 229, 28, 16, 215, 227, 228, 49, 43, 211, 253, 28, 16, 215, 227, 228,
- 49, 43, 251, 229, 28, 16, 215, 227, 228, 49, 44, 211, 253, 28, 16, 215,
- 227, 228, 49, 44, 251, 229, 28, 16, 215, 227, 228, 49, 124, 211, 253, 28,
- 16, 215, 227, 228, 49, 124, 251, 229, 28, 16, 215, 227, 228, 49, 120, 44,
- 211, 253, 28, 16, 215, 227, 228, 49, 120, 44, 251, 229, 28, 16, 230, 134,
- 228, 49, 211, 253, 28, 16, 230, 134, 228, 49, 251, 229, 28, 16, 215, 224,
- 228, 49, 124, 211, 253, 28, 16, 215, 224, 228, 49, 124, 251, 229, 28, 16,
- 226, 8, 228, 48, 28, 16, 213, 132, 228, 48, 28, 16, 228, 49, 251, 229,
- 28, 16, 227, 207, 228, 48, 28, 16, 249, 249, 228, 49, 211, 253, 28, 16,
- 249, 249, 228, 49, 251, 229, 28, 16, 251, 154, 28, 16, 211, 251, 228, 52,
- 28, 16, 163, 228, 52, 28, 16, 224, 25, 228, 52, 28, 16, 245, 197, 228,
- 52, 28, 16, 219, 120, 228, 52, 28, 16, 216, 161, 228, 52, 28, 16, 219,
- 112, 228, 52, 28, 16, 123, 240, 218, 215, 71, 228, 52, 28, 16, 38, 218,
- 141, 28, 16, 38, 218, 242, 218, 141, 28, 16, 38, 215, 235, 28, 16, 38,
- 215, 234, 28, 16, 38, 215, 233, 28, 16, 244, 109, 215, 235, 28, 16, 244,
- 109, 215, 234, 28, 16, 244, 109, 215, 233, 28, 16, 38, 253, 197, 247,
- 128, 28, 16, 38, 244, 80, 28, 16, 38, 244, 79, 28, 16, 38, 244, 78, 28,
- 16, 38, 244, 77, 28, 16, 38, 244, 76, 28, 16, 252, 66, 252, 82, 28, 16,
- 245, 151, 252, 82, 28, 16, 252, 66, 216, 112, 28, 16, 245, 151, 216, 112,
- 28, 16, 252, 66, 219, 82, 28, 16, 245, 151, 219, 82, 28, 16, 252, 66,
- 225, 118, 28, 16, 245, 151, 225, 118, 28, 16, 38, 255, 23, 28, 16, 38,
- 218, 167, 28, 16, 38, 216, 239, 28, 16, 38, 218, 168, 28, 16, 38, 231,
- 167, 28, 16, 38, 231, 166, 28, 16, 38, 255, 22, 28, 16, 38, 232, 118, 28,
- 16, 254, 6, 214, 163, 28, 16, 254, 6, 246, 114, 28, 16, 38, 247, 143, 28,
- 16, 38, 222, 234, 28, 16, 38, 244, 66, 28, 16, 38, 219, 78, 28, 16, 38,
- 252, 46, 28, 16, 38, 52, 216, 20, 28, 16, 38, 215, 212, 216, 20, 28, 16,
- 222, 238, 28, 16, 218, 76, 28, 16, 210, 159, 28, 16, 225, 110, 28, 16,
- 231, 30, 28, 16, 244, 25, 28, 16, 249, 146, 28, 16, 248, 86, 28, 16, 242,
- 157, 228, 53, 219, 97, 28, 16, 242, 157, 228, 53, 228, 80, 219, 97, 28,
- 16, 216, 1, 28, 16, 215, 95, 28, 16, 235, 200, 215, 95, 28, 16, 215, 96,
- 219, 97, 28, 16, 215, 96, 214, 163, 28, 16, 226, 152, 218, 104, 28, 16,
- 226, 152, 218, 101, 28, 16, 226, 152, 218, 100, 28, 16, 226, 152, 218,
- 99, 28, 16, 226, 152, 218, 98, 28, 16, 226, 152, 218, 97, 28, 16, 226,
- 152, 218, 96, 28, 16, 226, 152, 218, 95, 28, 16, 226, 152, 218, 94, 28,
- 16, 226, 152, 218, 103, 28, 16, 226, 152, 218, 102, 28, 16, 241, 252, 28,
- 16, 229, 110, 28, 16, 245, 151, 64, 218, 135, 28, 16, 248, 79, 219, 97,
- 28, 16, 38, 124, 251, 177, 28, 16, 38, 120, 251, 177, 28, 16, 38, 242, 7,
- 28, 16, 38, 219, 69, 225, 46, 28, 16, 225, 219, 79, 28, 16, 225, 219,
- 120, 79, 28, 16, 163, 225, 219, 79, 28, 16, 242, 189, 214, 163, 28, 16,
- 242, 189, 246, 114, 28, 16, 2, 244, 108, 28, 16, 248, 188, 28, 16, 248,
- 189, 254, 163, 28, 16, 231, 138, 28, 16, 232, 135, 28, 16, 251, 151, 28,
- 16, 220, 156, 211, 253, 28, 16, 220, 156, 251, 229, 28, 16, 230, 189, 28,
- 16, 230, 190, 251, 229, 28, 16, 220, 150, 211, 253, 28, 16, 220, 150,
- 251, 229, 28, 16, 243, 227, 211, 253, 28, 16, 243, 227, 251, 229, 28, 16,
- 232, 136, 225, 183, 223, 64, 28, 16, 232, 136, 236, 11, 223, 64, 28, 16,
- 251, 152, 223, 64, 28, 16, 220, 156, 223, 64, 28, 16, 230, 190, 223, 64,
- 28, 16, 220, 150, 223, 64, 28, 16, 216, 250, 225, 181, 249, 115, 224,
- 177, 225, 182, 28, 16, 216, 250, 225, 181, 249, 115, 224, 177, 236, 10,
- 28, 16, 216, 250, 225, 181, 249, 115, 224, 177, 225, 183, 247, 219, 28,
- 16, 216, 250, 236, 9, 249, 115, 224, 177, 225, 182, 28, 16, 216, 250,
- 236, 9, 249, 115, 224, 177, 236, 10, 28, 16, 216, 250, 236, 9, 249, 115,
- 224, 177, 236, 11, 247, 219, 28, 16, 216, 250, 236, 9, 249, 115, 224,
- 177, 236, 11, 247, 218, 28, 16, 216, 250, 236, 9, 249, 115, 224, 177,
- 236, 11, 247, 217, 28, 16, 249, 141, 28, 16, 242, 133, 251, 75, 250, 22,
- 28, 16, 242, 133, 245, 15, 250, 22, 28, 16, 42, 253, 166, 28, 16, 213,
- 151, 28, 16, 225, 17, 28, 16, 250, 13, 28, 16, 221, 205, 28, 16, 250, 17,
- 28, 16, 216, 8, 28, 16, 224, 245, 28, 16, 224, 246, 244, 68, 28, 16, 221,
- 206, 244, 68, 28, 16, 216, 9, 223, 61, 28, 16, 225, 166, 218, 67, 26,
- 213, 137, 189, 217, 230, 26, 213, 137, 189, 217, 219, 26, 213, 137, 189,
- 217, 209, 26, 213, 137, 189, 217, 202, 26, 213, 137, 189, 217, 194, 26,
- 213, 137, 189, 217, 188, 26, 213, 137, 189, 217, 187, 26, 213, 137, 189,
- 217, 186, 26, 213, 137, 189, 217, 185, 26, 213, 137, 189, 217, 229, 26,
- 213, 137, 189, 217, 228, 26, 213, 137, 189, 217, 227, 26, 213, 137, 189,
- 217, 226, 26, 213, 137, 189, 217, 225, 26, 213, 137, 189, 217, 224, 26,
- 213, 137, 189, 217, 223, 26, 213, 137, 189, 217, 222, 26, 213, 137, 189,
- 217, 221, 26, 213, 137, 189, 217, 220, 26, 213, 137, 189, 217, 218, 26,
- 213, 137, 189, 217, 217, 26, 213, 137, 189, 217, 216, 26, 213, 137, 189,
- 217, 215, 26, 213, 137, 189, 217, 214, 26, 213, 137, 189, 217, 193, 26,
- 213, 137, 189, 217, 192, 26, 213, 137, 189, 217, 191, 26, 213, 137, 189,
- 217, 190, 26, 213, 137, 189, 217, 189, 26, 235, 221, 189, 217, 230, 26,
- 235, 221, 189, 217, 219, 26, 235, 221, 189, 217, 202, 26, 235, 221, 189,
- 217, 194, 26, 235, 221, 189, 217, 187, 26, 235, 221, 189, 217, 186, 26,
- 235, 221, 189, 217, 228, 26, 235, 221, 189, 217, 227, 26, 235, 221, 189,
- 217, 226, 26, 235, 221, 189, 217, 225, 26, 235, 221, 189, 217, 222, 26,
- 235, 221, 189, 217, 221, 26, 235, 221, 189, 217, 220, 26, 235, 221, 189,
- 217, 215, 26, 235, 221, 189, 217, 214, 26, 235, 221, 189, 217, 213, 26,
- 235, 221, 189, 217, 212, 26, 235, 221, 189, 217, 211, 26, 235, 221, 189,
- 217, 210, 26, 235, 221, 189, 217, 208, 26, 235, 221, 189, 217, 207, 26,
- 235, 221, 189, 217, 206, 26, 235, 221, 189, 217, 205, 26, 235, 221, 189,
- 217, 204, 26, 235, 221, 189, 217, 203, 26, 235, 221, 189, 217, 201, 26,
- 235, 221, 189, 217, 200, 26, 235, 221, 189, 217, 199, 26, 235, 221, 189,
- 217, 198, 26, 235, 221, 189, 217, 197, 26, 235, 221, 189, 217, 196, 26,
- 235, 221, 189, 217, 195, 26, 235, 221, 189, 217, 193, 26, 235, 221, 189,
- 217, 192, 26, 235, 221, 189, 217, 191, 26, 235, 221, 189, 217, 190, 26,
- 235, 221, 189, 217, 189, 38, 26, 28, 215, 209, 38, 26, 28, 216, 224, 38,
- 26, 28, 225, 191, 26, 28, 233, 37, 230, 147, 31, 245, 231, 247, 232, 31,
- 241, 229, 245, 231, 247, 232, 31, 240, 221, 245, 231, 247, 232, 31, 245,
- 230, 241, 230, 247, 232, 31, 245, 230, 240, 220, 247, 232, 31, 245, 231,
- 180, 31, 250, 182, 180, 31, 243, 236, 250, 43, 180, 31, 230, 182, 180,
- 31, 252, 138, 180, 31, 234, 185, 219, 81, 180, 31, 249, 187, 180, 31,
- 253, 241, 180, 31, 226, 167, 180, 31, 251, 161, 226, 134, 180, 31, 248,
- 81, 177, 247, 187, 180, 31, 247, 184, 180, 31, 210, 222, 180, 31, 235,
- 254, 180, 31, 225, 200, 180, 31, 223, 130, 180, 31, 249, 197, 180, 31,
- 241, 67, 252, 192, 180, 31, 212, 59, 180, 31, 244, 47, 180, 31, 254, 255,
- 180, 31, 223, 92, 180, 31, 223, 68, 180, 31, 245, 229, 180, 31, 235, 59,
- 180, 31, 249, 192, 180, 31, 245, 150, 180, 31, 246, 60, 180, 31, 250,
- 153, 180, 31, 248, 90, 180, 31, 23, 223, 67, 180, 31, 226, 85, 180, 31,
- 233, 40, 180, 31, 250, 6, 180, 31, 234, 83, 180, 31, 243, 93, 180, 31,
- 218, 114, 180, 31, 224, 133, 180, 31, 243, 235, 180, 31, 223, 69, 180,
- 31, 233, 77, 177, 230, 162, 180, 31, 223, 65, 180, 31, 242, 175, 216, 43,
- 231, 81, 180, 31, 245, 152, 180, 31, 218, 126, 180, 31, 242, 135, 180,
- 31, 245, 144, 180, 31, 225, 239, 180, 31, 222, 228, 180, 31, 244, 67,
- 180, 31, 214, 8, 177, 212, 44, 180, 31, 249, 201, 180, 31, 231, 94, 180,
- 31, 245, 69, 180, 31, 214, 172, 180, 31, 247, 220, 180, 31, 250, 8, 230,
- 115, 180, 31, 242, 113, 180, 31, 243, 94, 236, 6, 180, 31, 231, 146, 180,
- 31, 255, 19, 180, 31, 245, 165, 180, 31, 246, 117, 180, 31, 212, 42, 180,
- 31, 219, 152, 180, 31, 235, 229, 180, 31, 248, 50, 180, 31, 248, 168,
- 180, 31, 247, 216, 180, 31, 245, 37, 180, 31, 220, 117, 180, 31, 218,
- 130, 180, 31, 242, 9, 180, 31, 249, 220, 180, 31, 250, 3, 180, 31, 244,
- 185, 180, 31, 254, 221, 180, 31, 249, 219, 180, 31, 226, 201, 216, 197,
- 213, 242, 180, 31, 247, 240, 180, 31, 233, 130, 180, 31, 244, 21, 249,
- 157, 222, 204, 214, 174, 21, 111, 249, 157, 222, 204, 214, 174, 21, 105,
- 249, 157, 222, 204, 214, 174, 21, 158, 249, 157, 222, 204, 214, 174, 21,
- 161, 249, 157, 222, 204, 214, 174, 21, 190, 249, 157, 222, 204, 214, 174,
- 21, 195, 249, 157, 222, 204, 214, 174, 21, 199, 249, 157, 222, 204, 214,
- 174, 21, 196, 249, 157, 222, 204, 214, 174, 21, 201, 249, 157, 222, 204,
- 216, 244, 21, 111, 249, 157, 222, 204, 216, 244, 21, 105, 249, 157, 222,
- 204, 216, 244, 21, 158, 249, 157, 222, 204, 216, 244, 21, 161, 249, 157,
- 222, 204, 216, 244, 21, 190, 249, 157, 222, 204, 216, 244, 21, 195, 249,
- 157, 222, 204, 216, 244, 21, 199, 249, 157, 222, 204, 216, 244, 21, 196,
- 249, 157, 222, 204, 216, 244, 21, 201, 11, 23, 6, 61, 11, 23, 6, 253,
- 166, 11, 23, 6, 251, 74, 11, 23, 6, 249, 68, 11, 23, 6, 76, 11, 23, 6,
- 245, 14, 11, 23, 6, 243, 209, 11, 23, 6, 242, 67, 11, 23, 6, 74, 11, 23,
- 6, 235, 150, 11, 23, 6, 235, 29, 11, 23, 6, 156, 11, 23, 6, 194, 11, 23,
- 6, 230, 30, 11, 23, 6, 78, 11, 23, 6, 226, 109, 11, 23, 6, 224, 99, 11,
- 23, 6, 153, 11, 23, 6, 222, 93, 11, 23, 6, 217, 153, 11, 23, 6, 69, 11,
- 23, 6, 214, 105, 11, 23, 6, 212, 98, 11, 23, 6, 211, 178, 11, 23, 6, 211,
- 117, 11, 23, 6, 210, 159, 11, 23, 4, 61, 11, 23, 4, 253, 166, 11, 23, 4,
- 251, 74, 11, 23, 4, 249, 68, 11, 23, 4, 76, 11, 23, 4, 245, 14, 11, 23,
- 4, 243, 209, 11, 23, 4, 242, 67, 11, 23, 4, 74, 11, 23, 4, 235, 150, 11,
- 23, 4, 235, 29, 11, 23, 4, 156, 11, 23, 4, 194, 11, 23, 4, 230, 30, 11,
- 23, 4, 78, 11, 23, 4, 226, 109, 11, 23, 4, 224, 99, 11, 23, 4, 153, 11,
- 23, 4, 222, 93, 11, 23, 4, 217, 153, 11, 23, 4, 69, 11, 23, 4, 214, 105,
- 11, 23, 4, 212, 98, 11, 23, 4, 211, 178, 11, 23, 4, 211, 117, 11, 23, 4,
- 210, 159, 11, 32, 6, 61, 11, 32, 6, 253, 166, 11, 32, 6, 251, 74, 11, 32,
- 6, 249, 68, 11, 32, 6, 76, 11, 32, 6, 245, 14, 11, 32, 6, 243, 209, 11,
- 32, 6, 242, 67, 11, 32, 6, 74, 11, 32, 6, 235, 150, 11, 32, 6, 235, 29,
- 11, 32, 6, 156, 11, 32, 6, 194, 11, 32, 6, 230, 30, 11, 32, 6, 78, 11,
- 32, 6, 226, 109, 11, 32, 6, 224, 99, 11, 32, 6, 153, 11, 32, 6, 222, 93,
- 11, 32, 6, 217, 153, 11, 32, 6, 69, 11, 32, 6, 214, 105, 11, 32, 6, 212,
- 98, 11, 32, 6, 211, 178, 11, 32, 6, 211, 117, 11, 32, 6, 210, 159, 11,
- 32, 4, 61, 11, 32, 4, 253, 166, 11, 32, 4, 251, 74, 11, 32, 4, 249, 68,
- 11, 32, 4, 76, 11, 32, 4, 245, 14, 11, 32, 4, 243, 209, 11, 32, 4, 74,
- 11, 32, 4, 235, 150, 11, 32, 4, 235, 29, 11, 32, 4, 156, 11, 32, 4, 194,
- 11, 32, 4, 230, 30, 11, 32, 4, 78, 11, 32, 4, 226, 109, 11, 32, 4, 224,
- 99, 11, 32, 4, 153, 11, 32, 4, 222, 93, 11, 32, 4, 217, 153, 11, 32, 4,
- 69, 11, 32, 4, 214, 105, 11, 32, 4, 212, 98, 11, 32, 4, 211, 178, 11, 32,
- 4, 211, 117, 11, 32, 4, 210, 159, 11, 23, 32, 6, 61, 11, 23, 32, 6, 253,
- 166, 11, 23, 32, 6, 251, 74, 11, 23, 32, 6, 249, 68, 11, 23, 32, 6, 76,
- 11, 23, 32, 6, 245, 14, 11, 23, 32, 6, 243, 209, 11, 23, 32, 6, 242, 67,
- 11, 23, 32, 6, 74, 11, 23, 32, 6, 235, 150, 11, 23, 32, 6, 235, 29, 11,
- 23, 32, 6, 156, 11, 23, 32, 6, 194, 11, 23, 32, 6, 230, 30, 11, 23, 32,
- 6, 78, 11, 23, 32, 6, 226, 109, 11, 23, 32, 6, 224, 99, 11, 23, 32, 6,
- 153, 11, 23, 32, 6, 222, 93, 11, 23, 32, 6, 217, 153, 11, 23, 32, 6, 69,
- 11, 23, 32, 6, 214, 105, 11, 23, 32, 6, 212, 98, 11, 23, 32, 6, 211, 178,
- 11, 23, 32, 6, 211, 117, 11, 23, 32, 6, 210, 159, 11, 23, 32, 4, 61, 11,
- 23, 32, 4, 253, 166, 11, 23, 32, 4, 251, 74, 11, 23, 32, 4, 249, 68, 11,
- 23, 32, 4, 76, 11, 23, 32, 4, 245, 14, 11, 23, 32, 4, 243, 209, 11, 23,
- 32, 4, 242, 67, 11, 23, 32, 4, 74, 11, 23, 32, 4, 235, 150, 11, 23, 32,
- 4, 235, 29, 11, 23, 32, 4, 156, 11, 23, 32, 4, 194, 11, 23, 32, 4, 230,
- 30, 11, 23, 32, 4, 78, 11, 23, 32, 4, 226, 109, 11, 23, 32, 4, 224, 99,
- 11, 23, 32, 4, 153, 11, 23, 32, 4, 222, 93, 11, 23, 32, 4, 217, 153, 11,
- 23, 32, 4, 69, 11, 23, 32, 4, 214, 105, 11, 23, 32, 4, 212, 98, 11, 23,
- 32, 4, 211, 178, 11, 23, 32, 4, 211, 117, 11, 23, 32, 4, 210, 159, 11,
- 119, 6, 61, 11, 119, 6, 251, 74, 11, 119, 6, 249, 68, 11, 119, 6, 243,
- 209, 11, 119, 6, 235, 150, 11, 119, 6, 235, 29, 11, 119, 6, 230, 30, 11,
- 119, 6, 78, 11, 119, 6, 226, 109, 11, 119, 6, 224, 99, 11, 119, 6, 222,
- 93, 11, 119, 6, 217, 153, 11, 119, 6, 69, 11, 119, 6, 214, 105, 11, 119,
- 6, 212, 98, 11, 119, 6, 211, 178, 11, 119, 6, 211, 117, 11, 119, 6, 210,
- 159, 11, 119, 4, 61, 11, 119, 4, 253, 166, 11, 119, 4, 251, 74, 11, 119,
- 4, 249, 68, 11, 119, 4, 245, 14, 11, 119, 4, 242, 67, 11, 119, 4, 74, 11,
- 119, 4, 235, 150, 11, 119, 4, 235, 29, 11, 119, 4, 156, 11, 119, 4, 194,
- 11, 119, 4, 230, 30, 11, 119, 4, 226, 109, 11, 119, 4, 224, 99, 11, 119,
- 4, 153, 11, 119, 4, 222, 93, 11, 119, 4, 217, 153, 11, 119, 4, 69, 11,
- 119, 4, 214, 105, 11, 119, 4, 212, 98, 11, 119, 4, 211, 178, 11, 119, 4,
- 211, 117, 11, 119, 4, 210, 159, 11, 23, 119, 6, 61, 11, 23, 119, 6, 253,
- 166, 11, 23, 119, 6, 251, 74, 11, 23, 119, 6, 249, 68, 11, 23, 119, 6,
- 76, 11, 23, 119, 6, 245, 14, 11, 23, 119, 6, 243, 209, 11, 23, 119, 6,
- 242, 67, 11, 23, 119, 6, 74, 11, 23, 119, 6, 235, 150, 11, 23, 119, 6,
- 235, 29, 11, 23, 119, 6, 156, 11, 23, 119, 6, 194, 11, 23, 119, 6, 230,
- 30, 11, 23, 119, 6, 78, 11, 23, 119, 6, 226, 109, 11, 23, 119, 6, 224,
- 99, 11, 23, 119, 6, 153, 11, 23, 119, 6, 222, 93, 11, 23, 119, 6, 217,
- 153, 11, 23, 119, 6, 69, 11, 23, 119, 6, 214, 105, 11, 23, 119, 6, 212,
- 98, 11, 23, 119, 6, 211, 178, 11, 23, 119, 6, 211, 117, 11, 23, 119, 6,
- 210, 159, 11, 23, 119, 4, 61, 11, 23, 119, 4, 253, 166, 11, 23, 119, 4,
- 251, 74, 11, 23, 119, 4, 249, 68, 11, 23, 119, 4, 76, 11, 23, 119, 4,
- 245, 14, 11, 23, 119, 4, 243, 209, 11, 23, 119, 4, 242, 67, 11, 23, 119,
- 4, 74, 11, 23, 119, 4, 235, 150, 11, 23, 119, 4, 235, 29, 11, 23, 119, 4,
- 156, 11, 23, 119, 4, 194, 11, 23, 119, 4, 230, 30, 11, 23, 119, 4, 78,
- 11, 23, 119, 4, 226, 109, 11, 23, 119, 4, 224, 99, 11, 23, 119, 4, 153,
- 11, 23, 119, 4, 222, 93, 11, 23, 119, 4, 217, 153, 11, 23, 119, 4, 69,
- 11, 23, 119, 4, 214, 105, 11, 23, 119, 4, 212, 98, 11, 23, 119, 4, 211,
- 178, 11, 23, 119, 4, 211, 117, 11, 23, 119, 4, 210, 159, 11, 133, 6, 61,
- 11, 133, 6, 253, 166, 11, 133, 6, 249, 68, 11, 133, 6, 76, 11, 133, 6,
- 245, 14, 11, 133, 6, 243, 209, 11, 133, 6, 235, 150, 11, 133, 6, 235, 29,
- 11, 133, 6, 156, 11, 133, 6, 194, 11, 133, 6, 230, 30, 11, 133, 6, 78,
- 11, 133, 6, 226, 109, 11, 133, 6, 224, 99, 11, 133, 6, 222, 93, 11, 133,
- 6, 217, 153, 11, 133, 6, 69, 11, 133, 6, 214, 105, 11, 133, 6, 212, 98,
- 11, 133, 6, 211, 178, 11, 133, 6, 211, 117, 11, 133, 4, 61, 11, 133, 4,
- 253, 166, 11, 133, 4, 251, 74, 11, 133, 4, 249, 68, 11, 133, 4, 76, 11,
- 133, 4, 245, 14, 11, 133, 4, 243, 209, 11, 133, 4, 242, 67, 11, 133, 4,
- 74, 11, 133, 4, 235, 150, 11, 133, 4, 235, 29, 11, 133, 4, 156, 11, 133,
- 4, 194, 11, 133, 4, 230, 30, 11, 133, 4, 78, 11, 133, 4, 226, 109, 11,
- 133, 4, 224, 99, 11, 133, 4, 153, 11, 133, 4, 222, 93, 11, 133, 4, 217,
- 153, 11, 133, 4, 69, 11, 133, 4, 214, 105, 11, 133, 4, 212, 98, 11, 133,
- 4, 211, 178, 11, 133, 4, 211, 117, 11, 133, 4, 210, 159, 11, 139, 6, 61,
- 11, 139, 6, 253, 166, 11, 139, 6, 249, 68, 11, 139, 6, 76, 11, 139, 6,
- 245, 14, 11, 139, 6, 243, 209, 11, 139, 6, 74, 11, 139, 6, 235, 150, 11,
- 139, 6, 235, 29, 11, 139, 6, 156, 11, 139, 6, 194, 11, 139, 6, 78, 11,
- 139, 6, 222, 93, 11, 139, 6, 217, 153, 11, 139, 6, 69, 11, 139, 6, 214,
- 105, 11, 139, 6, 212, 98, 11, 139, 6, 211, 178, 11, 139, 6, 211, 117, 11,
- 139, 4, 61, 11, 139, 4, 253, 166, 11, 139, 4, 251, 74, 11, 139, 4, 249,
- 68, 11, 139, 4, 76, 11, 139, 4, 245, 14, 11, 139, 4, 243, 209, 11, 139,
- 4, 242, 67, 11, 139, 4, 74, 11, 139, 4, 235, 150, 11, 139, 4, 235, 29,
- 11, 139, 4, 156, 11, 139, 4, 194, 11, 139, 4, 230, 30, 11, 139, 4, 78,
- 11, 139, 4, 226, 109, 11, 139, 4, 224, 99, 11, 139, 4, 153, 11, 139, 4,
- 222, 93, 11, 139, 4, 217, 153, 11, 139, 4, 69, 11, 139, 4, 214, 105, 11,
- 139, 4, 212, 98, 11, 139, 4, 211, 178, 11, 139, 4, 211, 117, 11, 139, 4,
- 210, 159, 11, 23, 133, 6, 61, 11, 23, 133, 6, 253, 166, 11, 23, 133, 6,
- 251, 74, 11, 23, 133, 6, 249, 68, 11, 23, 133, 6, 76, 11, 23, 133, 6,
- 245, 14, 11, 23, 133, 6, 243, 209, 11, 23, 133, 6, 242, 67, 11, 23, 133,
- 6, 74, 11, 23, 133, 6, 235, 150, 11, 23, 133, 6, 235, 29, 11, 23, 133, 6,
- 156, 11, 23, 133, 6, 194, 11, 23, 133, 6, 230, 30, 11, 23, 133, 6, 78,
- 11, 23, 133, 6, 226, 109, 11, 23, 133, 6, 224, 99, 11, 23, 133, 6, 153,
- 11, 23, 133, 6, 222, 93, 11, 23, 133, 6, 217, 153, 11, 23, 133, 6, 69,
- 11, 23, 133, 6, 214, 105, 11, 23, 133, 6, 212, 98, 11, 23, 133, 6, 211,
- 178, 11, 23, 133, 6, 211, 117, 11, 23, 133, 6, 210, 159, 11, 23, 133, 4,
- 61, 11, 23, 133, 4, 253, 166, 11, 23, 133, 4, 251, 74, 11, 23, 133, 4,
- 249, 68, 11, 23, 133, 4, 76, 11, 23, 133, 4, 245, 14, 11, 23, 133, 4,
- 243, 209, 11, 23, 133, 4, 242, 67, 11, 23, 133, 4, 74, 11, 23, 133, 4,
- 235, 150, 11, 23, 133, 4, 235, 29, 11, 23, 133, 4, 156, 11, 23, 133, 4,
- 194, 11, 23, 133, 4, 230, 30, 11, 23, 133, 4, 78, 11, 23, 133, 4, 226,
- 109, 11, 23, 133, 4, 224, 99, 11, 23, 133, 4, 153, 11, 23, 133, 4, 222,
- 93, 11, 23, 133, 4, 217, 153, 11, 23, 133, 4, 69, 11, 23, 133, 4, 214,
- 105, 11, 23, 133, 4, 212, 98, 11, 23, 133, 4, 211, 178, 11, 23, 133, 4,
- 211, 117, 11, 23, 133, 4, 210, 159, 11, 35, 6, 61, 11, 35, 6, 253, 166,
- 11, 35, 6, 251, 74, 11, 35, 6, 249, 68, 11, 35, 6, 76, 11, 35, 6, 245,
- 14, 11, 35, 6, 243, 209, 11, 35, 6, 242, 67, 11, 35, 6, 74, 11, 35, 6,
- 235, 150, 11, 35, 6, 235, 29, 11, 35, 6, 156, 11, 35, 6, 194, 11, 35, 6,
- 230, 30, 11, 35, 6, 78, 11, 35, 6, 226, 109, 11, 35, 6, 224, 99, 11, 35,
- 6, 153, 11, 35, 6, 222, 93, 11, 35, 6, 217, 153, 11, 35, 6, 69, 11, 35,
- 6, 214, 105, 11, 35, 6, 212, 98, 11, 35, 6, 211, 178, 11, 35, 6, 211,
- 117, 11, 35, 6, 210, 159, 11, 35, 4, 61, 11, 35, 4, 253, 166, 11, 35, 4,
- 251, 74, 11, 35, 4, 249, 68, 11, 35, 4, 76, 11, 35, 4, 245, 14, 11, 35,
- 4, 243, 209, 11, 35, 4, 242, 67, 11, 35, 4, 74, 11, 35, 4, 235, 150, 11,
- 35, 4, 235, 29, 11, 35, 4, 156, 11, 35, 4, 194, 11, 35, 4, 230, 30, 11,
- 35, 4, 78, 11, 35, 4, 226, 109, 11, 35, 4, 224, 99, 11, 35, 4, 153, 11,
- 35, 4, 222, 93, 11, 35, 4, 217, 153, 11, 35, 4, 69, 11, 35, 4, 214, 105,
- 11, 35, 4, 212, 98, 11, 35, 4, 211, 178, 11, 35, 4, 211, 117, 11, 35, 4,
- 210, 159, 11, 35, 23, 6, 61, 11, 35, 23, 6, 253, 166, 11, 35, 23, 6, 251,
- 74, 11, 35, 23, 6, 249, 68, 11, 35, 23, 6, 76, 11, 35, 23, 6, 245, 14,
- 11, 35, 23, 6, 243, 209, 11, 35, 23, 6, 242, 67, 11, 35, 23, 6, 74, 11,
- 35, 23, 6, 235, 150, 11, 35, 23, 6, 235, 29, 11, 35, 23, 6, 156, 11, 35,
- 23, 6, 194, 11, 35, 23, 6, 230, 30, 11, 35, 23, 6, 78, 11, 35, 23, 6,
- 226, 109, 11, 35, 23, 6, 224, 99, 11, 35, 23, 6, 153, 11, 35, 23, 6, 222,
- 93, 11, 35, 23, 6, 217, 153, 11, 35, 23, 6, 69, 11, 35, 23, 6, 214, 105,
- 11, 35, 23, 6, 212, 98, 11, 35, 23, 6, 211, 178, 11, 35, 23, 6, 211, 117,
- 11, 35, 23, 6, 210, 159, 11, 35, 23, 4, 61, 11, 35, 23, 4, 253, 166, 11,
- 35, 23, 4, 251, 74, 11, 35, 23, 4, 249, 68, 11, 35, 23, 4, 76, 11, 35,
- 23, 4, 245, 14, 11, 35, 23, 4, 243, 209, 11, 35, 23, 4, 242, 67, 11, 35,
- 23, 4, 74, 11, 35, 23, 4, 235, 150, 11, 35, 23, 4, 235, 29, 11, 35, 23,
- 4, 156, 11, 35, 23, 4, 194, 11, 35, 23, 4, 230, 30, 11, 35, 23, 4, 78,
- 11, 35, 23, 4, 226, 109, 11, 35, 23, 4, 224, 99, 11, 35, 23, 4, 153, 11,
- 35, 23, 4, 222, 93, 11, 35, 23, 4, 217, 153, 11, 35, 23, 4, 69, 11, 35,
- 23, 4, 214, 105, 11, 35, 23, 4, 212, 98, 11, 35, 23, 4, 211, 178, 11, 35,
- 23, 4, 211, 117, 11, 35, 23, 4, 210, 159, 11, 35, 32, 6, 61, 11, 35, 32,
- 6, 253, 166, 11, 35, 32, 6, 251, 74, 11, 35, 32, 6, 249, 68, 11, 35, 32,
- 6, 76, 11, 35, 32, 6, 245, 14, 11, 35, 32, 6, 243, 209, 11, 35, 32, 6,
- 242, 67, 11, 35, 32, 6, 74, 11, 35, 32, 6, 235, 150, 11, 35, 32, 6, 235,
- 29, 11, 35, 32, 6, 156, 11, 35, 32, 6, 194, 11, 35, 32, 6, 230, 30, 11,
- 35, 32, 6, 78, 11, 35, 32, 6, 226, 109, 11, 35, 32, 6, 224, 99, 11, 35,
- 32, 6, 153, 11, 35, 32, 6, 222, 93, 11, 35, 32, 6, 217, 153, 11, 35, 32,
- 6, 69, 11, 35, 32, 6, 214, 105, 11, 35, 32, 6, 212, 98, 11, 35, 32, 6,
- 211, 178, 11, 35, 32, 6, 211, 117, 11, 35, 32, 6, 210, 159, 11, 35, 32,
- 4, 61, 11, 35, 32, 4, 253, 166, 11, 35, 32, 4, 251, 74, 11, 35, 32, 4,
- 249, 68, 11, 35, 32, 4, 76, 11, 35, 32, 4, 245, 14, 11, 35, 32, 4, 243,
- 209, 11, 35, 32, 4, 242, 67, 11, 35, 32, 4, 74, 11, 35, 32, 4, 235, 150,
- 11, 35, 32, 4, 235, 29, 11, 35, 32, 4, 156, 11, 35, 32, 4, 194, 11, 35,
- 32, 4, 230, 30, 11, 35, 32, 4, 78, 11, 35, 32, 4, 226, 109, 11, 35, 32,
- 4, 224, 99, 11, 35, 32, 4, 153, 11, 35, 32, 4, 222, 93, 11, 35, 32, 4,
- 217, 153, 11, 35, 32, 4, 69, 11, 35, 32, 4, 214, 105, 11, 35, 32, 4, 212,
- 98, 11, 35, 32, 4, 211, 178, 11, 35, 32, 4, 211, 117, 11, 35, 32, 4, 210,
- 159, 11, 35, 23, 32, 6, 61, 11, 35, 23, 32, 6, 253, 166, 11, 35, 23, 32,
- 6, 251, 74, 11, 35, 23, 32, 6, 249, 68, 11, 35, 23, 32, 6, 76, 11, 35,
- 23, 32, 6, 245, 14, 11, 35, 23, 32, 6, 243, 209, 11, 35, 23, 32, 6, 242,
- 67, 11, 35, 23, 32, 6, 74, 11, 35, 23, 32, 6, 235, 150, 11, 35, 23, 32,
- 6, 235, 29, 11, 35, 23, 32, 6, 156, 11, 35, 23, 32, 6, 194, 11, 35, 23,
- 32, 6, 230, 30, 11, 35, 23, 32, 6, 78, 11, 35, 23, 32, 6, 226, 109, 11,
- 35, 23, 32, 6, 224, 99, 11, 35, 23, 32, 6, 153, 11, 35, 23, 32, 6, 222,
- 93, 11, 35, 23, 32, 6, 217, 153, 11, 35, 23, 32, 6, 69, 11, 35, 23, 32,
- 6, 214, 105, 11, 35, 23, 32, 6, 212, 98, 11, 35, 23, 32, 6, 211, 178, 11,
- 35, 23, 32, 6, 211, 117, 11, 35, 23, 32, 6, 210, 159, 11, 35, 23, 32, 4,
- 61, 11, 35, 23, 32, 4, 253, 166, 11, 35, 23, 32, 4, 251, 74, 11, 35, 23,
- 32, 4, 249, 68, 11, 35, 23, 32, 4, 76, 11, 35, 23, 32, 4, 245, 14, 11,
- 35, 23, 32, 4, 243, 209, 11, 35, 23, 32, 4, 242, 67, 11, 35, 23, 32, 4,
- 74, 11, 35, 23, 32, 4, 235, 150, 11, 35, 23, 32, 4, 235, 29, 11, 35, 23,
- 32, 4, 156, 11, 35, 23, 32, 4, 194, 11, 35, 23, 32, 4, 230, 30, 11, 35,
- 23, 32, 4, 78, 11, 35, 23, 32, 4, 226, 109, 11, 35, 23, 32, 4, 224, 99,
- 11, 35, 23, 32, 4, 153, 11, 35, 23, 32, 4, 222, 93, 11, 35, 23, 32, 4,
- 217, 153, 11, 35, 23, 32, 4, 69, 11, 35, 23, 32, 4, 214, 105, 11, 35, 23,
- 32, 4, 212, 98, 11, 35, 23, 32, 4, 211, 178, 11, 35, 23, 32, 4, 211, 117,
- 11, 35, 23, 32, 4, 210, 159, 11, 230, 143, 6, 61, 11, 230, 143, 6, 253,
- 166, 11, 230, 143, 6, 251, 74, 11, 230, 143, 6, 249, 68, 11, 230, 143, 6,
- 76, 11, 230, 143, 6, 245, 14, 11, 230, 143, 6, 243, 209, 11, 230, 143, 6,
- 242, 67, 11, 230, 143, 6, 74, 11, 230, 143, 6, 235, 150, 11, 230, 143, 6,
- 235, 29, 11, 230, 143, 6, 156, 11, 230, 143, 6, 194, 11, 230, 143, 6,
- 230, 30, 11, 230, 143, 6, 78, 11, 230, 143, 6, 226, 109, 11, 230, 143, 6,
- 224, 99, 11, 230, 143, 6, 153, 11, 230, 143, 6, 222, 93, 11, 230, 143, 6,
- 217, 153, 11, 230, 143, 6, 69, 11, 230, 143, 6, 214, 105, 11, 230, 143,
- 6, 212, 98, 11, 230, 143, 6, 211, 178, 11, 230, 143, 6, 211, 117, 11,
- 230, 143, 6, 210, 159, 11, 230, 143, 4, 61, 11, 230, 143, 4, 253, 166,
- 11, 230, 143, 4, 251, 74, 11, 230, 143, 4, 249, 68, 11, 230, 143, 4, 76,
- 11, 230, 143, 4, 245, 14, 11, 230, 143, 4, 243, 209, 11, 230, 143, 4,
- 242, 67, 11, 230, 143, 4, 74, 11, 230, 143, 4, 235, 150, 11, 230, 143, 4,
- 235, 29, 11, 230, 143, 4, 156, 11, 230, 143, 4, 194, 11, 230, 143, 4,
- 230, 30, 11, 230, 143, 4, 78, 11, 230, 143, 4, 226, 109, 11, 230, 143, 4,
- 224, 99, 11, 230, 143, 4, 153, 11, 230, 143, 4, 222, 93, 11, 230, 143, 4,
- 217, 153, 11, 230, 143, 4, 69, 11, 230, 143, 4, 214, 105, 11, 230, 143,
- 4, 212, 98, 11, 230, 143, 4, 211, 178, 11, 230, 143, 4, 211, 117, 11,
- 230, 143, 4, 210, 159, 11, 32, 4, 247, 127, 74, 11, 32, 4, 247, 127, 235,
- 150, 11, 23, 6, 254, 151, 11, 23, 6, 252, 34, 11, 23, 6, 243, 114, 11,
- 23, 6, 248, 62, 11, 23, 6, 245, 108, 11, 23, 6, 210, 85, 11, 23, 6, 245,
- 71, 11, 23, 6, 216, 180, 11, 23, 6, 235, 192, 11, 23, 6, 234, 228, 11,
- 23, 6, 233, 104, 11, 23, 6, 230, 107, 11, 23, 6, 227, 242, 11, 23, 6,
- 211, 157, 11, 23, 6, 226, 203, 11, 23, 6, 225, 111, 11, 23, 6, 223, 40,
- 11, 23, 6, 216, 181, 87, 11, 23, 6, 219, 179, 11, 23, 6, 217, 42, 11, 23,
- 6, 214, 157, 11, 23, 6, 225, 136, 11, 23, 6, 250, 118, 11, 23, 6, 224,
- 164, 11, 23, 6, 226, 205, 11, 23, 229, 226, 11, 23, 4, 254, 151, 11, 23,
- 4, 252, 34, 11, 23, 4, 243, 114, 11, 23, 4, 248, 62, 11, 23, 4, 245, 108,
- 11, 23, 4, 210, 85, 11, 23, 4, 245, 71, 11, 23, 4, 216, 180, 11, 23, 4,
- 235, 192, 11, 23, 4, 234, 228, 11, 23, 4, 233, 104, 11, 23, 4, 230, 107,
- 11, 23, 4, 227, 242, 11, 23, 4, 211, 157, 11, 23, 4, 226, 203, 11, 23, 4,
- 225, 111, 11, 23, 4, 223, 40, 11, 23, 4, 40, 219, 179, 11, 23, 4, 219,
- 179, 11, 23, 4, 217, 42, 11, 23, 4, 214, 157, 11, 23, 4, 225, 136, 11,
- 23, 4, 250, 118, 11, 23, 4, 224, 164, 11, 23, 4, 226, 205, 11, 23, 226,
- 1, 247, 241, 11, 23, 245, 109, 87, 11, 23, 216, 181, 87, 11, 23, 234,
- 229, 87, 11, 23, 225, 137, 87, 11, 23, 223, 41, 87, 11, 23, 225, 112, 87,
- 11, 32, 6, 254, 151, 11, 32, 6, 252, 34, 11, 32, 6, 243, 114, 11, 32, 6,
- 248, 62, 11, 32, 6, 245, 108, 11, 32, 6, 210, 85, 11, 32, 6, 245, 71, 11,
- 32, 6, 216, 180, 11, 32, 6, 235, 192, 11, 32, 6, 234, 228, 11, 32, 6,
- 233, 104, 11, 32, 6, 230, 107, 11, 32, 6, 227, 242, 11, 32, 6, 211, 157,
- 11, 32, 6, 226, 203, 11, 32, 6, 225, 111, 11, 32, 6, 223, 40, 11, 32, 6,
- 216, 181, 87, 11, 32, 6, 219, 179, 11, 32, 6, 217, 42, 11, 32, 6, 214,
- 157, 11, 32, 6, 225, 136, 11, 32, 6, 250, 118, 11, 32, 6, 224, 164, 11,
- 32, 6, 226, 205, 11, 32, 229, 226, 11, 32, 4, 254, 151, 11, 32, 4, 252,
- 34, 11, 32, 4, 243, 114, 11, 32, 4, 248, 62, 11, 32, 4, 245, 108, 11, 32,
- 4, 210, 85, 11, 32, 4, 245, 71, 11, 32, 4, 216, 180, 11, 32, 4, 235, 192,
- 11, 32, 4, 234, 228, 11, 32, 4, 233, 104, 11, 32, 4, 230, 107, 11, 32, 4,
- 227, 242, 11, 32, 4, 211, 157, 11, 32, 4, 226, 203, 11, 32, 4, 225, 111,
- 11, 32, 4, 223, 40, 11, 32, 4, 40, 219, 179, 11, 32, 4, 219, 179, 11, 32,
- 4, 217, 42, 11, 32, 4, 214, 157, 11, 32, 4, 225, 136, 11, 32, 4, 250,
- 118, 11, 32, 4, 224, 164, 11, 32, 4, 226, 205, 11, 32, 226, 1, 247, 241,
- 11, 32, 245, 109, 87, 11, 32, 216, 181, 87, 11, 32, 234, 229, 87, 11, 32,
- 225, 137, 87, 11, 32, 223, 41, 87, 11, 32, 225, 112, 87, 11, 23, 32, 6,
- 254, 151, 11, 23, 32, 6, 252, 34, 11, 23, 32, 6, 243, 114, 11, 23, 32, 6,
- 248, 62, 11, 23, 32, 6, 245, 108, 11, 23, 32, 6, 210, 85, 11, 23, 32, 6,
- 245, 71, 11, 23, 32, 6, 216, 180, 11, 23, 32, 6, 235, 192, 11, 23, 32, 6,
- 234, 228, 11, 23, 32, 6, 233, 104, 11, 23, 32, 6, 230, 107, 11, 23, 32,
- 6, 227, 242, 11, 23, 32, 6, 211, 157, 11, 23, 32, 6, 226, 203, 11, 23,
- 32, 6, 225, 111, 11, 23, 32, 6, 223, 40, 11, 23, 32, 6, 216, 181, 87, 11,
- 23, 32, 6, 219, 179, 11, 23, 32, 6, 217, 42, 11, 23, 32, 6, 214, 157, 11,
- 23, 32, 6, 225, 136, 11, 23, 32, 6, 250, 118, 11, 23, 32, 6, 224, 164,
- 11, 23, 32, 6, 226, 205, 11, 23, 32, 229, 226, 11, 23, 32, 4, 254, 151,
- 11, 23, 32, 4, 252, 34, 11, 23, 32, 4, 243, 114, 11, 23, 32, 4, 248, 62,
- 11, 23, 32, 4, 245, 108, 11, 23, 32, 4, 210, 85, 11, 23, 32, 4, 245, 71,
- 11, 23, 32, 4, 216, 180, 11, 23, 32, 4, 235, 192, 11, 23, 32, 4, 234,
- 228, 11, 23, 32, 4, 233, 104, 11, 23, 32, 4, 230, 107, 11, 23, 32, 4,
- 227, 242, 11, 23, 32, 4, 211, 157, 11, 23, 32, 4, 226, 203, 11, 23, 32,
- 4, 225, 111, 11, 23, 32, 4, 223, 40, 11, 23, 32, 4, 40, 219, 179, 11, 23,
- 32, 4, 219, 179, 11, 23, 32, 4, 217, 42, 11, 23, 32, 4, 214, 157, 11, 23,
- 32, 4, 225, 136, 11, 23, 32, 4, 250, 118, 11, 23, 32, 4, 224, 164, 11,
- 23, 32, 4, 226, 205, 11, 23, 32, 226, 1, 247, 241, 11, 23, 32, 245, 109,
- 87, 11, 23, 32, 216, 181, 87, 11, 23, 32, 234, 229, 87, 11, 23, 32, 225,
- 137, 87, 11, 23, 32, 223, 41, 87, 11, 23, 32, 225, 112, 87, 11, 35, 23,
- 6, 254, 151, 11, 35, 23, 6, 252, 34, 11, 35, 23, 6, 243, 114, 11, 35, 23,
- 6, 248, 62, 11, 35, 23, 6, 245, 108, 11, 35, 23, 6, 210, 85, 11, 35, 23,
- 6, 245, 71, 11, 35, 23, 6, 216, 180, 11, 35, 23, 6, 235, 192, 11, 35, 23,
- 6, 234, 228, 11, 35, 23, 6, 233, 104, 11, 35, 23, 6, 230, 107, 11, 35,
- 23, 6, 227, 242, 11, 35, 23, 6, 211, 157, 11, 35, 23, 6, 226, 203, 11,
- 35, 23, 6, 225, 111, 11, 35, 23, 6, 223, 40, 11, 35, 23, 6, 216, 181, 87,
- 11, 35, 23, 6, 219, 179, 11, 35, 23, 6, 217, 42, 11, 35, 23, 6, 214, 157,
- 11, 35, 23, 6, 225, 136, 11, 35, 23, 6, 250, 118, 11, 35, 23, 6, 224,
- 164, 11, 35, 23, 6, 226, 205, 11, 35, 23, 229, 226, 11, 35, 23, 4, 254,
- 151, 11, 35, 23, 4, 252, 34, 11, 35, 23, 4, 243, 114, 11, 35, 23, 4, 248,
- 62, 11, 35, 23, 4, 245, 108, 11, 35, 23, 4, 210, 85, 11, 35, 23, 4, 245,
- 71, 11, 35, 23, 4, 216, 180, 11, 35, 23, 4, 235, 192, 11, 35, 23, 4, 234,
- 228, 11, 35, 23, 4, 233, 104, 11, 35, 23, 4, 230, 107, 11, 35, 23, 4,
- 227, 242, 11, 35, 23, 4, 211, 157, 11, 35, 23, 4, 226, 203, 11, 35, 23,
- 4, 225, 111, 11, 35, 23, 4, 223, 40, 11, 35, 23, 4, 40, 219, 179, 11, 35,
- 23, 4, 219, 179, 11, 35, 23, 4, 217, 42, 11, 35, 23, 4, 214, 157, 11, 35,
- 23, 4, 225, 136, 11, 35, 23, 4, 250, 118, 11, 35, 23, 4, 224, 164, 11,
- 35, 23, 4, 226, 205, 11, 35, 23, 226, 1, 247, 241, 11, 35, 23, 245, 109,
- 87, 11, 35, 23, 216, 181, 87, 11, 35, 23, 234, 229, 87, 11, 35, 23, 225,
- 137, 87, 11, 35, 23, 223, 41, 87, 11, 35, 23, 225, 112, 87, 11, 35, 23,
- 32, 6, 254, 151, 11, 35, 23, 32, 6, 252, 34, 11, 35, 23, 32, 6, 243, 114,
- 11, 35, 23, 32, 6, 248, 62, 11, 35, 23, 32, 6, 245, 108, 11, 35, 23, 32,
- 6, 210, 85, 11, 35, 23, 32, 6, 245, 71, 11, 35, 23, 32, 6, 216, 180, 11,
- 35, 23, 32, 6, 235, 192, 11, 35, 23, 32, 6, 234, 228, 11, 35, 23, 32, 6,
- 233, 104, 11, 35, 23, 32, 6, 230, 107, 11, 35, 23, 32, 6, 227, 242, 11,
- 35, 23, 32, 6, 211, 157, 11, 35, 23, 32, 6, 226, 203, 11, 35, 23, 32, 6,
- 225, 111, 11, 35, 23, 32, 6, 223, 40, 11, 35, 23, 32, 6, 216, 181, 87,
- 11, 35, 23, 32, 6, 219, 179, 11, 35, 23, 32, 6, 217, 42, 11, 35, 23, 32,
- 6, 214, 157, 11, 35, 23, 32, 6, 225, 136, 11, 35, 23, 32, 6, 250, 118,
- 11, 35, 23, 32, 6, 224, 164, 11, 35, 23, 32, 6, 226, 205, 11, 35, 23, 32,
- 229, 226, 11, 35, 23, 32, 4, 254, 151, 11, 35, 23, 32, 4, 252, 34, 11,
- 35, 23, 32, 4, 243, 114, 11, 35, 23, 32, 4, 248, 62, 11, 35, 23, 32, 4,
- 245, 108, 11, 35, 23, 32, 4, 210, 85, 11, 35, 23, 32, 4, 245, 71, 11, 35,
- 23, 32, 4, 216, 180, 11, 35, 23, 32, 4, 235, 192, 11, 35, 23, 32, 4, 234,
- 228, 11, 35, 23, 32, 4, 233, 104, 11, 35, 23, 32, 4, 230, 107, 11, 35,
- 23, 32, 4, 227, 242, 11, 35, 23, 32, 4, 211, 157, 11, 35, 23, 32, 4, 226,
- 203, 11, 35, 23, 32, 4, 225, 111, 11, 35, 23, 32, 4, 223, 40, 11, 35, 23,
- 32, 4, 40, 219, 179, 11, 35, 23, 32, 4, 219, 179, 11, 35, 23, 32, 4, 217,
- 42, 11, 35, 23, 32, 4, 214, 157, 11, 35, 23, 32, 4, 225, 136, 11, 35, 23,
- 32, 4, 250, 118, 11, 35, 23, 32, 4, 224, 164, 11, 35, 23, 32, 4, 226,
- 205, 11, 35, 23, 32, 226, 1, 247, 241, 11, 35, 23, 32, 245, 109, 87, 11,
- 35, 23, 32, 216, 181, 87, 11, 35, 23, 32, 234, 229, 87, 11, 35, 23, 32,
- 225, 137, 87, 11, 35, 23, 32, 223, 41, 87, 11, 35, 23, 32, 225, 112, 87,
- 11, 23, 6, 247, 235, 11, 23, 4, 247, 235, 11, 23, 21, 210, 86, 11, 23,
- 21, 111, 11, 23, 21, 105, 11, 23, 21, 158, 11, 23, 21, 161, 11, 23, 21,
- 190, 11, 23, 21, 195, 11, 23, 21, 199, 11, 23, 21, 196, 11, 23, 21, 201,
- 11, 139, 21, 210, 86, 11, 139, 21, 111, 11, 139, 21, 105, 11, 139, 21,
- 158, 11, 139, 21, 161, 11, 139, 21, 190, 11, 139, 21, 195, 11, 139, 21,
- 199, 11, 139, 21, 196, 11, 139, 21, 201, 11, 35, 21, 210, 86, 11, 35, 21,
- 111, 11, 35, 21, 105, 11, 35, 21, 158, 11, 35, 21, 161, 11, 35, 21, 190,
- 11, 35, 21, 195, 11, 35, 21, 199, 11, 35, 21, 196, 11, 35, 21, 201, 11,
- 35, 23, 21, 210, 86, 11, 35, 23, 21, 111, 11, 35, 23, 21, 105, 11, 35,
- 23, 21, 158, 11, 35, 23, 21, 161, 11, 35, 23, 21, 190, 11, 35, 23, 21,
- 195, 11, 35, 23, 21, 199, 11, 35, 23, 21, 196, 11, 35, 23, 21, 201, 11,
- 230, 143, 21, 210, 86, 11, 230, 143, 21, 111, 11, 230, 143, 21, 105, 11,
- 230, 143, 21, 158, 11, 230, 143, 21, 161, 11, 230, 143, 21, 190, 11, 230,
- 143, 21, 195, 11, 230, 143, 21, 199, 11, 230, 143, 21, 196, 11, 230, 143,
- 21, 201, 9, 11, 254, 179, 9, 11, 252, 62, 9, 11, 235, 129, 9, 11, 248,
- 203, 9, 11, 212, 30, 9, 11, 210, 108, 9, 11, 242, 44, 9, 11, 217, 81, 9,
- 11, 211, 43, 9, 11, 235, 0, 9, 11, 233, 108, 9, 11, 231, 83, 9, 11, 228,
- 67, 9, 11, 221, 168, 9, 11, 254, 205, 9, 11, 244, 150, 9, 11, 222, 28, 9,
- 11, 224, 84, 9, 11, 223, 98, 9, 11, 220, 61, 9, 11, 217, 8, 9, 11, 216,
- 193, 9, 11, 234, 135, 9, 11, 216, 203, 9, 11, 248, 224, 9, 11, 210, 111,
- 9, 11, 242, 251, 9, 11, 247, 127, 252, 62, 9, 11, 247, 127, 228, 67, 9,
- 11, 247, 127, 244, 150, 9, 11, 247, 127, 224, 84, 9, 11, 65, 252, 62, 9,
- 11, 65, 235, 129, 9, 11, 65, 241, 225, 9, 11, 65, 242, 44, 9, 11, 65,
- 211, 43, 9, 11, 65, 235, 0, 9, 11, 65, 233, 108, 9, 11, 65, 231, 83, 9,
- 11, 65, 228, 67, 9, 11, 65, 221, 168, 9, 11, 65, 254, 205, 9, 11, 65,
- 244, 150, 9, 11, 65, 222, 28, 9, 11, 65, 224, 84, 9, 11, 65, 220, 61, 9,
- 11, 65, 217, 8, 9, 11, 65, 216, 193, 9, 11, 65, 234, 135, 9, 11, 65, 248,
- 224, 9, 11, 65, 242, 251, 9, 11, 217, 77, 235, 129, 9, 11, 217, 77, 242,
- 44, 9, 11, 217, 77, 211, 43, 9, 11, 217, 77, 233, 108, 9, 11, 217, 77,
- 228, 67, 9, 11, 217, 77, 221, 168, 9, 11, 217, 77, 254, 205, 9, 11, 217,
- 77, 222, 28, 9, 11, 217, 77, 224, 84, 9, 11, 217, 77, 220, 61, 9, 11,
- 217, 77, 234, 135, 9, 11, 217, 77, 248, 224, 9, 11, 217, 77, 242, 251, 9,
- 11, 217, 77, 247, 127, 228, 67, 9, 11, 217, 77, 247, 127, 224, 84, 9, 11,
- 218, 112, 252, 62, 9, 11, 218, 112, 235, 129, 9, 11, 218, 112, 241, 225,
- 9, 11, 218, 112, 242, 44, 9, 11, 218, 112, 217, 81, 9, 11, 218, 112, 211,
- 43, 9, 11, 218, 112, 235, 0, 9, 11, 218, 112, 231, 83, 9, 11, 218, 112,
- 228, 67, 9, 11, 218, 112, 221, 168, 9, 11, 218, 112, 254, 205, 9, 11,
- 218, 112, 244, 150, 9, 11, 218, 112, 222, 28, 9, 11, 218, 112, 224, 84,
- 9, 11, 218, 112, 220, 61, 9, 11, 218, 112, 217, 8, 9, 11, 218, 112, 216,
- 193, 9, 11, 218, 112, 234, 135, 9, 11, 218, 112, 248, 224, 9, 11, 218,
- 112, 210, 111, 9, 11, 218, 112, 242, 251, 9, 11, 218, 112, 247, 127, 252,
- 62, 9, 11, 218, 112, 247, 127, 244, 150, 9, 11, 232, 128, 254, 179, 9,
- 11, 232, 128, 252, 62, 9, 11, 232, 128, 235, 129, 9, 11, 232, 128, 248,
- 203, 9, 11, 232, 128, 241, 225, 9, 11, 232, 128, 212, 30, 9, 11, 232,
- 128, 210, 108, 9, 11, 232, 128, 242, 44, 9, 11, 232, 128, 217, 81, 9, 11,
- 232, 128, 211, 43, 9, 11, 232, 128, 233, 108, 9, 11, 232, 128, 231, 83,
- 9, 11, 232, 128, 228, 67, 9, 11, 232, 128, 221, 168, 9, 11, 232, 128,
- 254, 205, 9, 11, 232, 128, 244, 150, 9, 11, 232, 128, 222, 28, 9, 11,
- 232, 128, 224, 84, 9, 11, 232, 128, 223, 98, 9, 11, 232, 128, 220, 61, 9,
- 11, 232, 128, 217, 8, 9, 11, 232, 128, 216, 193, 9, 11, 232, 128, 234,
- 135, 9, 11, 232, 128, 216, 203, 9, 11, 232, 128, 248, 224, 9, 11, 232,
- 128, 210, 111, 9, 11, 232, 128, 242, 251, 9, 11, 139, 252, 62, 9, 11,
- 139, 235, 129, 9, 11, 139, 248, 203, 9, 11, 139, 212, 30, 9, 11, 139,
- 210, 108, 9, 11, 139, 242, 44, 9, 11, 139, 217, 81, 9, 11, 139, 211, 43,
- 9, 11, 139, 233, 108, 9, 11, 139, 231, 83, 9, 11, 139, 228, 67, 9, 11,
- 139, 221, 168, 9, 11, 139, 254, 205, 9, 11, 139, 244, 150, 9, 11, 139,
- 222, 28, 9, 11, 139, 224, 84, 9, 11, 139, 223, 98, 9, 11, 139, 220, 61,
- 9, 11, 139, 217, 8, 9, 11, 139, 216, 193, 9, 11, 139, 234, 135, 9, 11,
- 139, 216, 203, 9, 11, 139, 248, 224, 9, 11, 139, 210, 111, 9, 11, 139,
- 242, 251, 9, 11, 226, 172, 66, 2, 122, 2, 217, 44, 9, 11, 226, 172, 122,
- 2, 248, 203, 231, 210, 86, 245, 228, 211, 239, 231, 210, 86, 219, 30,
- 211, 239, 231, 210, 86, 212, 9, 211, 239, 231, 210, 86, 228, 61, 211,
- 239, 231, 210, 86, 223, 114, 246, 104, 231, 210, 86, 242, 134, 246, 104,
- 231, 210, 86, 71, 246, 104, 231, 210, 86, 123, 64, 250, 149, 231, 210,
- 86, 113, 64, 250, 149, 231, 210, 86, 134, 64, 250, 149, 231, 210, 86,
- 244, 19, 64, 250, 149, 231, 210, 86, 244, 89, 64, 250, 149, 231, 210, 86,
- 219, 127, 64, 250, 149, 231, 210, 86, 220, 124, 64, 250, 149, 231, 210,
- 86, 245, 201, 64, 250, 149, 231, 210, 86, 228, 205, 64, 250, 149, 231,
- 210, 86, 123, 64, 252, 161, 231, 210, 86, 113, 64, 252, 161, 231, 210,
- 86, 134, 64, 252, 161, 231, 210, 86, 244, 19, 64, 252, 161, 231, 210, 86,
- 244, 89, 64, 252, 161, 231, 210, 86, 219, 127, 64, 252, 161, 231, 210,
- 86, 220, 124, 64, 252, 161, 231, 210, 86, 245, 201, 64, 252, 161, 231,
- 210, 86, 228, 205, 64, 252, 161, 231, 210, 86, 123, 64, 250, 42, 231,
- 210, 86, 113, 64, 250, 42, 231, 210, 86, 134, 64, 250, 42, 231, 210, 86,
- 244, 19, 64, 250, 42, 231, 210, 86, 244, 89, 64, 250, 42, 231, 210, 86,
- 219, 127, 64, 250, 42, 231, 210, 86, 220, 124, 64, 250, 42, 231, 210, 86,
- 245, 201, 64, 250, 42, 231, 210, 86, 228, 205, 64, 250, 42, 231, 210, 86,
- 225, 28, 231, 210, 86, 226, 160, 231, 210, 86, 252, 162, 231, 210, 86,
- 250, 78, 231, 210, 86, 218, 241, 231, 210, 86, 218, 40, 231, 210, 86,
- 253, 187, 231, 210, 86, 211, 232, 231, 210, 86, 235, 68, 231, 210, 86,
- 252, 192, 131, 86, 203, 252, 192, 131, 86, 241, 50, 131, 86, 241, 49,
- 131, 86, 241, 48, 131, 86, 241, 47, 131, 86, 241, 46, 131, 86, 241, 45,
- 131, 86, 241, 44, 131, 86, 241, 43, 131, 86, 241, 42, 131, 86, 241, 41,
- 131, 86, 241, 40, 131, 86, 241, 39, 131, 86, 241, 38, 131, 86, 241, 37,
- 131, 86, 241, 36, 131, 86, 241, 35, 131, 86, 241, 34, 131, 86, 241, 33,
- 131, 86, 241, 32, 131, 86, 241, 31, 131, 86, 241, 30, 131, 86, 241, 29,
- 131, 86, 241, 28, 131, 86, 241, 27, 131, 86, 241, 26, 131, 86, 241, 25,
- 131, 86, 241, 24, 131, 86, 241, 23, 131, 86, 241, 22, 131, 86, 241, 21,
- 131, 86, 241, 20, 131, 86, 241, 19, 131, 86, 241, 18, 131, 86, 241, 17,
- 131, 86, 241, 16, 131, 86, 241, 15, 131, 86, 241, 14, 131, 86, 241, 13,
- 131, 86, 241, 12, 131, 86, 241, 11, 131, 86, 241, 10, 131, 86, 241, 9,
- 131, 86, 241, 8, 131, 86, 241, 7, 131, 86, 241, 6, 131, 86, 241, 5, 131,
- 86, 241, 4, 131, 86, 241, 3, 131, 86, 241, 2, 131, 86, 67, 252, 192, 131,
- 86, 213, 238, 131, 86, 213, 237, 131, 86, 213, 236, 131, 86, 213, 235,
- 131, 86, 213, 234, 131, 86, 213, 233, 131, 86, 213, 232, 131, 86, 213,
- 231, 131, 86, 213, 230, 131, 86, 213, 229, 131, 86, 213, 228, 131, 86,
- 213, 227, 131, 86, 213, 226, 131, 86, 213, 225, 131, 86, 213, 224, 131,
- 86, 213, 223, 131, 86, 213, 222, 131, 86, 213, 221, 131, 86, 213, 220,
- 131, 86, 213, 219, 131, 86, 213, 218, 131, 86, 213, 217, 131, 86, 213,
- 216, 131, 86, 213, 215, 131, 86, 213, 214, 131, 86, 213, 213, 131, 86,
- 213, 212, 131, 86, 213, 211, 131, 86, 213, 210, 131, 86, 213, 209, 131,
- 86, 213, 208, 131, 86, 213, 207, 131, 86, 213, 206, 131, 86, 213, 205,
- 131, 86, 213, 204, 131, 86, 213, 203, 131, 86, 213, 202, 131, 86, 213,
- 201, 131, 86, 213, 200, 131, 86, 213, 199, 131, 86, 213, 198, 131, 86,
- 213, 197, 131, 86, 213, 196, 131, 86, 213, 195, 131, 86, 213, 194, 131,
- 86, 213, 193, 131, 86, 213, 192, 131, 86, 213, 191, 131, 86, 213, 190,
- 225, 36, 250, 251, 252, 192, 225, 36, 250, 251, 255, 18, 64, 219, 17,
- 225, 36, 250, 251, 113, 64, 219, 17, 225, 36, 250, 251, 134, 64, 219, 17,
- 225, 36, 250, 251, 244, 19, 64, 219, 17, 225, 36, 250, 251, 244, 89, 64,
- 219, 17, 225, 36, 250, 251, 219, 127, 64, 219, 17, 225, 36, 250, 251,
- 220, 124, 64, 219, 17, 225, 36, 250, 251, 245, 201, 64, 219, 17, 225, 36,
- 250, 251, 228, 205, 64, 219, 17, 225, 36, 250, 251, 216, 249, 64, 219,
- 17, 225, 36, 250, 251, 235, 145, 64, 219, 17, 225, 36, 250, 251, 234, 37,
- 64, 219, 17, 225, 36, 250, 251, 224, 18, 64, 219, 17, 225, 36, 250, 251,
- 234, 85, 64, 219, 17, 225, 36, 250, 251, 255, 18, 64, 241, 232, 225, 36,
- 250, 251, 113, 64, 241, 232, 225, 36, 250, 251, 134, 64, 241, 232, 225,
- 36, 250, 251, 244, 19, 64, 241, 232, 225, 36, 250, 251, 244, 89, 64, 241,
- 232, 225, 36, 250, 251, 219, 127, 64, 241, 232, 225, 36, 250, 251, 220,
- 124, 64, 241, 232, 225, 36, 250, 251, 245, 201, 64, 241, 232, 225, 36,
- 250, 251, 228, 205, 64, 241, 232, 225, 36, 250, 251, 216, 249, 64, 241,
- 232, 225, 36, 250, 251, 235, 145, 64, 241, 232, 225, 36, 250, 251, 234,
- 37, 64, 241, 232, 225, 36, 250, 251, 224, 18, 64, 241, 232, 225, 36, 250,
- 251, 234, 85, 64, 241, 232, 225, 36, 250, 251, 255, 18, 64, 247, 255,
- 225, 36, 250, 251, 113, 64, 247, 255, 225, 36, 250, 251, 134, 64, 247,
- 255, 225, 36, 250, 251, 244, 19, 64, 247, 255, 225, 36, 250, 251, 244,
- 89, 64, 247, 255, 225, 36, 250, 251, 219, 127, 64, 247, 255, 225, 36,
- 250, 251, 220, 124, 64, 247, 255, 225, 36, 250, 251, 245, 201, 64, 247,
- 255, 225, 36, 250, 251, 228, 205, 64, 247, 255, 225, 36, 250, 251, 216,
- 249, 64, 247, 255, 225, 36, 250, 251, 235, 145, 64, 247, 255, 225, 36,
- 250, 251, 234, 37, 64, 247, 255, 225, 36, 250, 251, 224, 18, 64, 247,
- 255, 225, 36, 250, 251, 234, 85, 64, 247, 255, 225, 36, 250, 251, 85,
- 235, 68, 225, 36, 250, 251, 255, 18, 64, 249, 250, 225, 36, 250, 251,
- 113, 64, 249, 250, 225, 36, 250, 251, 134, 64, 249, 250, 225, 36, 250,
- 251, 244, 19, 64, 249, 250, 225, 36, 250, 251, 244, 89, 64, 249, 250,
- 225, 36, 250, 251, 219, 127, 64, 249, 250, 225, 36, 250, 251, 220, 124,
- 64, 249, 250, 225, 36, 250, 251, 245, 201, 64, 249, 250, 225, 36, 250,
- 251, 228, 205, 64, 249, 250, 225, 36, 250, 251, 216, 249, 64, 249, 250,
- 225, 36, 250, 251, 235, 145, 64, 249, 250, 225, 36, 250, 251, 234, 37,
- 64, 249, 250, 225, 36, 250, 251, 224, 18, 64, 249, 250, 225, 36, 250,
- 251, 234, 85, 64, 249, 250, 225, 36, 250, 251, 71, 235, 68, 21, 210, 87,
- 243, 236, 218, 131, 21, 210, 87, 249, 227, 21, 123, 249, 227, 21, 113,
- 249, 227, 21, 134, 249, 227, 21, 244, 19, 249, 227, 21, 244, 89, 249,
- 227, 21, 219, 127, 249, 227, 21, 220, 124, 249, 227, 21, 245, 201, 249,
- 227, 21, 228, 205, 249, 227, 88, 7, 6, 1, 61, 88, 7, 6, 1, 253, 166, 88,
- 7, 6, 1, 251, 74, 88, 7, 6, 1, 249, 68, 88, 7, 6, 1, 76, 88, 7, 6, 1,
- 245, 14, 88, 7, 6, 1, 243, 209, 88, 7, 6, 1, 242, 67, 88, 7, 6, 1, 74,
- 88, 7, 6, 1, 235, 150, 88, 7, 6, 1, 235, 29, 88, 7, 6, 1, 156, 88, 7, 6,
- 1, 194, 88, 7, 6, 1, 230, 30, 88, 7, 6, 1, 78, 88, 7, 6, 1, 226, 109, 88,
- 7, 6, 1, 224, 99, 88, 7, 6, 1, 153, 88, 7, 6, 1, 222, 93, 88, 7, 6, 1,
- 217, 153, 88, 7, 6, 1, 69, 88, 7, 6, 1, 214, 105, 88, 7, 6, 1, 212, 98,
- 88, 7, 6, 1, 211, 178, 88, 7, 6, 1, 211, 117, 88, 7, 6, 1, 210, 159, 216,
- 7, 220, 55, 251, 165, 7, 6, 1, 222, 93, 37, 32, 7, 6, 1, 251, 74, 37, 32,
- 7, 6, 1, 153, 37, 250, 199, 37, 211, 180, 92, 7, 6, 1, 61, 92, 7, 6, 1,
- 253, 166, 92, 7, 6, 1, 251, 74, 92, 7, 6, 1, 249, 68, 92, 7, 6, 1, 76,
- 92, 7, 6, 1, 245, 14, 92, 7, 6, 1, 243, 209, 92, 7, 6, 1, 242, 67, 92, 7,
- 6, 1, 74, 92, 7, 6, 1, 235, 150, 92, 7, 6, 1, 235, 29, 92, 7, 6, 1, 156,
- 92, 7, 6, 1, 194, 92, 7, 6, 1, 230, 30, 92, 7, 6, 1, 78, 92, 7, 6, 1,
- 226, 109, 92, 7, 6, 1, 224, 99, 92, 7, 6, 1, 153, 92, 7, 6, 1, 222, 93,
- 92, 7, 6, 1, 217, 153, 92, 7, 6, 1, 69, 92, 7, 6, 1, 214, 105, 92, 7, 6,
- 1, 212, 98, 92, 7, 6, 1, 211, 178, 92, 7, 6, 1, 211, 117, 92, 7, 6, 1,
- 210, 159, 92, 240, 208, 92, 230, 54, 92, 221, 185, 92, 218, 228, 92, 224,
- 221, 92, 212, 23, 152, 37, 7, 6, 1, 61, 152, 37, 7, 6, 1, 253, 166, 152,
- 37, 7, 6, 1, 251, 74, 152, 37, 7, 6, 1, 249, 68, 152, 37, 7, 6, 1, 76,
- 152, 37, 7, 6, 1, 245, 14, 152, 37, 7, 6, 1, 243, 209, 152, 37, 7, 6, 1,
- 242, 67, 152, 37, 7, 6, 1, 74, 152, 37, 7, 6, 1, 235, 150, 152, 37, 7, 6,
- 1, 235, 29, 152, 37, 7, 6, 1, 156, 152, 37, 7, 6, 1, 194, 152, 37, 7, 6,
- 1, 230, 30, 152, 37, 7, 6, 1, 78, 152, 37, 7, 6, 1, 226, 109, 152, 37, 7,
- 6, 1, 224, 99, 152, 37, 7, 6, 1, 153, 152, 37, 7, 6, 1, 222, 93, 152, 37,
- 7, 6, 1, 217, 153, 152, 37, 7, 6, 1, 69, 152, 37, 7, 6, 1, 214, 105, 152,
- 37, 7, 6, 1, 212, 98, 152, 37, 7, 6, 1, 211, 178, 152, 37, 7, 6, 1, 211,
- 117, 152, 37, 7, 6, 1, 210, 159, 223, 160, 231, 102, 50, 223, 160, 231,
- 99, 50, 152, 92, 7, 6, 1, 61, 152, 92, 7, 6, 1, 253, 166, 152, 92, 7, 6,
- 1, 251, 74, 152, 92, 7, 6, 1, 249, 68, 152, 92, 7, 6, 1, 76, 152, 92, 7,
- 6, 1, 245, 14, 152, 92, 7, 6, 1, 243, 209, 152, 92, 7, 6, 1, 242, 67,
- 152, 92, 7, 6, 1, 74, 152, 92, 7, 6, 1, 235, 150, 152, 92, 7, 6, 1, 235,
- 29, 152, 92, 7, 6, 1, 156, 152, 92, 7, 6, 1, 194, 152, 92, 7, 6, 1, 230,
- 30, 152, 92, 7, 6, 1, 78, 152, 92, 7, 6, 1, 226, 109, 152, 92, 7, 6, 1,
- 224, 99, 152, 92, 7, 6, 1, 153, 152, 92, 7, 6, 1, 222, 93, 152, 92, 7, 6,
- 1, 217, 153, 152, 92, 7, 6, 1, 69, 152, 92, 7, 6, 1, 214, 105, 152, 92,
- 7, 6, 1, 212, 98, 152, 92, 7, 6, 1, 211, 178, 152, 92, 7, 6, 1, 211, 117,
- 152, 92, 7, 6, 1, 210, 159, 249, 136, 152, 92, 7, 6, 1, 226, 109, 152,
- 92, 240, 120, 152, 92, 191, 152, 92, 206, 152, 92, 255, 34, 152, 92, 212,
- 23, 42, 247, 172, 92, 250, 31, 92, 249, 178, 92, 244, 4, 92, 240, 112,
- 92, 229, 91, 92, 229, 84, 92, 226, 218, 92, 219, 37, 92, 120, 2, 245, 39,
- 79, 92, 213, 119, 223, 106, 235, 246, 16, 1, 61, 223, 106, 235, 246, 16,
- 1, 253, 166, 223, 106, 235, 246, 16, 1, 251, 74, 223, 106, 235, 246, 16,
- 1, 249, 68, 223, 106, 235, 246, 16, 1, 76, 223, 106, 235, 246, 16, 1,
- 245, 14, 223, 106, 235, 246, 16, 1, 243, 209, 223, 106, 235, 246, 16, 1,
- 242, 67, 223, 106, 235, 246, 16, 1, 74, 223, 106, 235, 246, 16, 1, 235,
- 150, 223, 106, 235, 246, 16, 1, 235, 29, 223, 106, 235, 246, 16, 1, 156,
- 223, 106, 235, 246, 16, 1, 194, 223, 106, 235, 246, 16, 1, 230, 30, 223,
- 106, 235, 246, 16, 1, 78, 223, 106, 235, 246, 16, 1, 226, 109, 223, 106,
- 235, 246, 16, 1, 224, 99, 223, 106, 235, 246, 16, 1, 153, 223, 106, 235,
- 246, 16, 1, 222, 93, 223, 106, 235, 246, 16, 1, 217, 153, 223, 106, 235,
- 246, 16, 1, 69, 223, 106, 235, 246, 16, 1, 214, 105, 223, 106, 235, 246,
- 16, 1, 212, 98, 223, 106, 235, 246, 16, 1, 211, 178, 223, 106, 235, 246,
- 16, 1, 211, 117, 223, 106, 235, 246, 16, 1, 210, 159, 42, 141, 241, 70,
- 92, 56, 234, 24, 92, 56, 206, 92, 10, 214, 177, 238, 57, 92, 10, 214,
- 177, 238, 61, 92, 10, 214, 177, 238, 69, 92, 56, 248, 98, 92, 10, 214,
- 177, 238, 76, 92, 10, 214, 177, 238, 63, 92, 10, 214, 177, 238, 35, 92,
- 10, 214, 177, 238, 62, 92, 10, 214, 177, 238, 75, 92, 10, 214, 177, 238,
- 49, 92, 10, 214, 177, 238, 42, 92, 10, 214, 177, 238, 51, 92, 10, 214,
- 177, 238, 72, 92, 10, 214, 177, 238, 58, 92, 10, 214, 177, 238, 74, 92,
- 10, 214, 177, 238, 50, 92, 10, 214, 177, 238, 73, 92, 10, 214, 177, 238,
- 36, 92, 10, 214, 177, 238, 41, 92, 10, 214, 177, 238, 34, 92, 10, 214,
- 177, 238, 64, 92, 10, 214, 177, 238, 66, 92, 10, 214, 177, 238, 44, 92,
- 10, 214, 177, 238, 55, 92, 10, 214, 177, 238, 53, 92, 10, 214, 177, 238,
- 79, 92, 10, 214, 177, 238, 78, 92, 10, 214, 177, 238, 32, 92, 10, 214,
- 177, 238, 59, 92, 10, 214, 177, 238, 77, 92, 10, 214, 177, 238, 68, 92,
- 10, 214, 177, 238, 54, 92, 10, 214, 177, 238, 33, 92, 10, 214, 177, 238,
- 56, 92, 10, 214, 177, 238, 38, 92, 10, 214, 177, 238, 37, 92, 10, 214,
- 177, 238, 67, 92, 10, 214, 177, 238, 45, 92, 10, 214, 177, 238, 47, 92,
- 10, 214, 177, 238, 48, 92, 10, 214, 177, 238, 40, 92, 10, 214, 177, 238,
- 71, 92, 10, 214, 177, 238, 65, 216, 7, 220, 55, 251, 165, 10, 214, 177,
- 238, 46, 216, 7, 220, 55, 251, 165, 10, 214, 177, 238, 78, 216, 7, 220,
- 55, 251, 165, 10, 214, 177, 238, 76, 216, 7, 220, 55, 251, 165, 10, 214,
- 177, 238, 60, 216, 7, 220, 55, 251, 165, 10, 214, 177, 238, 43, 216, 7,
- 220, 55, 251, 165, 10, 214, 177, 238, 56, 216, 7, 220, 55, 251, 165, 10,
- 214, 177, 238, 39, 216, 7, 220, 55, 251, 165, 10, 214, 177, 238, 70, 216,
- 7, 220, 55, 251, 165, 10, 214, 177, 238, 52, 37, 154, 254, 254, 37, 154,
- 255, 21, 249, 79, 244, 50, 250, 8, 214, 194, 228, 218, 2, 218, 155, 218,
- 34, 115, 230, 119, 218, 33, 250, 34, 253, 215, 246, 62, 218, 32, 115,
- 251, 126, 223, 161, 251, 148, 253, 215, 228, 217, 212, 41, 212, 35, 213,
- 131, 230, 200, 212, 25, 245, 232, 242, 188, 245, 53, 245, 232, 242, 188,
- 254, 136, 245, 232, 242, 188, 253, 233, 242, 188, 2, 231, 56, 166, 230,
- 134, 87, 212, 27, 249, 145, 230, 134, 87, 244, 100, 224, 25, 230, 134,
- 87, 212, 27, 242, 217, 230, 134, 87, 243, 236, 230, 134, 87, 212, 52,
- 242, 217, 230, 134, 87, 233, 86, 224, 25, 230, 134, 87, 212, 52, 249,
- 145, 230, 134, 87, 249, 145, 230, 133, 166, 230, 134, 2, 244, 198, 244,
- 100, 224, 25, 230, 134, 2, 244, 198, 233, 86, 224, 25, 230, 134, 2, 244,
- 198, 243, 236, 230, 134, 2, 244, 198, 218, 39, 2, 244, 198, 242, 186,
- 218, 158, 220, 1, 218, 158, 250, 124, 221, 170, 245, 47, 215, 236, 248,
- 92, 215, 236, 226, 63, 215, 236, 251, 35, 215, 110, 250, 126, 251, 218,
- 222, 193, 241, 186, 218, 37, 251, 218, 245, 236, 64, 231, 199, 245, 236,
- 64, 223, 34, 241, 211, 244, 19, 233, 60, 249, 254, 231, 175, 233, 59,
- 244, 184, 233, 59, 233, 60, 244, 55, 236, 7, 211, 239, 230, 63, 216, 35,
- 253, 199, 242, 150, 231, 72, 212, 39, 217, 58, 233, 32, 252, 157, 225,
- 65, 223, 114, 254, 62, 242, 134, 254, 62, 225, 220, 225, 221, 250, 127,
- 218, 116, 242, 30, 219, 92, 64, 225, 47, 231, 92, 226, 201, 251, 202,
- 224, 232, 233, 42, 223, 35, 249, 150, 223, 35, 252, 167, 249, 181, 223,
- 34, 249, 103, 22, 223, 34, 218, 143, 251, 175, 219, 16, 251, 159, 244, 3,
- 243, 255, 222, 209, 217, 247, 224, 234, 248, 183, 226, 240, 218, 8, 244,
- 0, 219, 232, 244, 99, 251, 29, 2, 217, 240, 248, 43, 219, 54, 240, 119,
- 249, 149, 220, 72, 240, 118, 240, 119, 249, 149, 246, 116, 249, 180, 250,
- 92, 130, 251, 6, 232, 147, 249, 96, 241, 62, 224, 236, 219, 242, 252, 44,
- 251, 171, 224, 237, 64, 244, 41, 249, 179, 244, 32, 22, 234, 38, 217, 20,
- 211, 230, 242, 20, 222, 14, 251, 185, 22, 249, 110, 211, 237, 242, 191,
- 249, 243, 242, 191, 215, 194, 246, 98, 252, 70, 230, 98, 250, 15, 252,
- 70, 230, 97, 252, 195, 251, 184, 223, 36, 211, 201, 224, 198, 251, 243,
- 251, 28, 235, 144, 250, 85, 215, 236, 244, 170, 250, 84, 244, 102, 244,
- 103, 219, 14, 252, 166, 225, 254, 224, 247, 249, 212, 252, 167, 217, 60,
- 215, 236, 249, 136, 244, 75, 225, 66, 248, 89, 235, 137, 247, 139, 250,
- 240, 218, 115, 211, 240, 250, 106, 230, 134, 213, 164, 250, 170, 221,
- 201, 221, 226, 242, 155, 251, 3, 250, 241, 240, 252, 244, 138, 212, 0,
- 222, 202, 249, 244, 244, 94, 225, 5, 22, 244, 98, 230, 232, 230, 113,
- 251, 18, 250, 47, 241, 239, 253, 249, 226, 66, 216, 15, 242, 2, 250, 37,
- 216, 243, 216, 114, 250, 28, 251, 210, 225, 180, 253, 248, 213, 172, 243,
- 117, 247, 205, 241, 163, 219, 86, 231, 239, 251, 253, 243, 118, 247, 248,
- 251, 174, 244, 60, 225, 36, 250, 249, 28, 228, 52, 230, 90, 28, 228, 47,
- 221, 214, 242, 106, 28, 234, 143, 215, 191, 213, 154, 28, 221, 194, 222,
- 126, 220, 13, 2, 221, 229, 216, 245, 223, 181, 22, 252, 167, 219, 107,
- 22, 219, 107, 251, 195, 252, 131, 22, 241, 56, 250, 128, 244, 81, 219,
- 65, 222, 127, 218, 13, 215, 195, 240, 253, 223, 182, 254, 137, 244, 39,
- 222, 138, 244, 39, 217, 242, 240, 242, 251, 127, 240, 242, 2, 243, 101,
- 226, 233, 251, 127, 235, 137, 224, 242, 226, 232, 245, 52, 224, 242, 226,
- 232, 240, 251, 252, 153, 253, 189, 216, 253, 231, 239, 240, 247, 232,
- 117, 240, 247, 249, 184, 218, 127, 221, 200, 248, 51, 218, 127, 244, 188,
- 235, 155, 233, 95, 235, 137, 250, 234, 245, 52, 250, 234, 223, 144, 230,
- 117, 226, 118, 212, 41, 251, 131, 249, 153, 216, 107, 233, 24, 223, 183,
- 250, 232, 246, 104, 249, 143, 212, 3, 219, 72, 219, 70, 240, 252, 223,
- 156, 242, 177, 220, 59, 230, 150, 222, 196, 250, 116, 247, 144, 225, 76,
- 251, 211, 245, 177, 226, 242, 218, 254, 220, 54, 251, 130, 254, 100, 241,
- 61, 233, 127, 252, 68, 244, 98, 215, 194, 244, 98, 251, 217, 215, 91,
- 242, 0, 250, 117, 252, 195, 250, 117, 243, 250, 252, 195, 250, 117, 251,
- 245, 225, 198, 234, 32, 224, 251, 246, 95, 251, 19, 252, 185, 251, 19,
- 247, 138, 230, 118, 244, 198, 249, 154, 244, 198, 216, 108, 244, 198,
- 223, 184, 244, 198, 250, 233, 244, 198, 246, 105, 244, 198, 218, 243,
- 212, 3, 240, 253, 244, 198, 230, 151, 244, 198, 247, 145, 244, 198, 225,
- 77, 244, 198, 243, 253, 244, 198, 242, 27, 244, 198, 211, 224, 244, 198,
- 252, 79, 244, 198, 226, 49, 244, 198, 225, 77, 228, 58, 225, 236, 224,
- 189, 245, 21, 245, 235, 228, 58, 230, 115, 216, 20, 71, 120, 225, 10,
- 252, 190, 235, 249, 71, 124, 225, 10, 252, 190, 235, 249, 71, 43, 225,
- 10, 252, 190, 235, 249, 71, 44, 225, 10, 252, 190, 235, 249, 244, 92,
- 242, 23, 50, 212, 33, 242, 23, 50, 226, 219, 242, 23, 50, 216, 136, 120,
- 50, 216, 136, 124, 50, 250, 27, 242, 18, 50, 204, 242, 18, 50, 249, 131,
- 211, 220, 242, 2, 245, 22, 229, 109, 217, 152, 235, 131, 246, 100, 234,
- 88, 251, 255, 211, 220, 250, 1, 224, 130, 242, 21, 224, 233, 231, 182,
- 220, 6, 253, 211, 220, 6, 241, 171, 220, 6, 211, 220, 221, 242, 211, 220,
- 251, 194, 244, 37, 251, 98, 236, 7, 219, 171, 251, 97, 236, 7, 219, 171,
- 251, 170, 242, 201, 231, 190, 211, 221, 244, 182, 231, 191, 22, 211, 222,
- 241, 67, 242, 17, 113, 231, 64, 241, 67, 242, 17, 113, 211, 219, 241, 67,
- 242, 17, 225, 2, 226, 231, 211, 222, 2, 251, 114, 245, 233, 251, 149, 2,
- 213, 246, 225, 171, 2, 251, 220, 242, 41, 231, 191, 2, 242, 117, 225,
- 112, 231, 179, 231, 191, 2, 215, 98, 226, 212, 231, 190, 226, 212, 211,
- 221, 252, 194, 249, 198, 211, 205, 224, 192, 235, 137, 226, 227, 235,
- 137, 242, 176, 242, 229, 252, 195, 254, 121, 245, 26, 254, 169, 254, 170,
- 230, 141, 236, 12, 219, 102, 235, 239, 248, 42, 225, 170, 242, 112, 248,
- 187, 232, 207, 229, 216, 225, 1, 244, 199, 231, 147, 242, 40, 252, 146,
- 225, 4, 217, 172, 225, 69, 234, 70, 79, 232, 117, 233, 16, 222, 236, 243,
- 61, 218, 133, 234, 69, 251, 179, 249, 156, 2, 241, 234, 212, 19, 252, 77,
- 241, 234, 251, 143, 241, 234, 113, 241, 232, 219, 12, 241, 234, 242, 127,
- 241, 234, 241, 235, 2, 75, 251, 216, 241, 234, 242, 134, 241, 234, 211,
- 42, 241, 234, 224, 131, 241, 234, 241, 235, 2, 223, 36, 223, 47, 241,
- 232, 241, 235, 248, 89, 248, 1, 220, 84, 2, 116, 59, 235, 222, 245, 180,
- 193, 251, 124, 254, 120, 87, 251, 203, 219, 94, 87, 249, 236, 87, 218,
- 248, 217, 249, 87, 246, 93, 248, 165, 87, 225, 70, 64, 224, 252, 244, 69,
- 252, 11, 247, 173, 87, 219, 5, 252, 166, 216, 150, 252, 166, 71, 244, 59,
- 240, 218, 225, 8, 87, 230, 154, 252, 180, 249, 106, 245, 40, 114, 247,
- 140, 50, 249, 147, 250, 250, 252, 152, 2, 211, 40, 50, 252, 152, 2, 247,
- 140, 50, 252, 152, 2, 245, 55, 50, 252, 152, 2, 224, 231, 50, 230, 154,
- 2, 211, 235, 250, 146, 2, 214, 153, 215, 232, 22, 211, 40, 50, 221, 180,
- 225, 169, 249, 216, 251, 147, 230, 191, 244, 64, 247, 193, 226, 165, 247,
- 198, 246, 57, 244, 115, 244, 48, 204, 244, 115, 244, 48, 226, 80, 2, 249,
- 108, 226, 80, 244, 191, 214, 163, 251, 24, 217, 19, 251, 24, 250, 251,
- 235, 249, 250, 146, 2, 214, 153, 215, 231, 250, 146, 2, 246, 112, 215,
- 231, 252, 149, 250, 145, 250, 14, 224, 126, 222, 187, 224, 126, 226, 23,
- 218, 123, 222, 133, 215, 223, 222, 133, 251, 199, 217, 92, 233, 57, 228,
- 50, 228, 51, 2, 248, 88, 249, 155, 250, 8, 251, 200, 204, 251, 200, 242,
- 134, 251, 200, 251, 216, 251, 200, 226, 161, 251, 200, 251, 197, 229,
- 210, 252, 183, 221, 188, 231, 65, 217, 2, 223, 126, 226, 78, 244, 167,
- 231, 239, 221, 225, 254, 97, 224, 148, 255, 5, 232, 119, 250, 135, 231,
- 77, 226, 133, 215, 239, 236, 3, 215, 239, 226, 86, 246, 32, 87, 236, 0,
- 245, 127, 245, 128, 2, 246, 112, 80, 48, 250, 8, 231, 205, 2, 232, 113,
- 244, 81, 250, 8, 231, 205, 2, 223, 160, 244, 81, 204, 231, 205, 2, 223,
- 160, 244, 81, 204, 231, 205, 2, 232, 113, 244, 81, 224, 239, 224, 240,
- 240, 255, 229, 89, 230, 164, 225, 120, 230, 164, 225, 121, 2, 97, 80,
- 253, 215, 233, 52, 213, 175, 230, 163, 230, 164, 225, 121, 226, 234, 228,
- 80, 230, 164, 225, 119, 254, 98, 2, 252, 137, 251, 18, 213, 172, 251, 18,
- 216, 255, 223, 176, 213, 171, 215, 60, 97, 253, 255, 250, 10, 97, 22,
- 140, 204, 250, 44, 253, 255, 250, 10, 97, 22, 140, 204, 250, 44, 254, 0,
- 2, 37, 123, 226, 124, 250, 10, 246, 112, 22, 214, 153, 204, 250, 44, 253,
- 255, 254, 96, 246, 112, 22, 214, 153, 204, 250, 44, 253, 255, 121, 251,
- 146, 87, 125, 251, 146, 87, 219, 9, 2, 251, 12, 91, 219, 8, 219, 9, 2,
- 123, 219, 33, 212, 35, 219, 9, 2, 134, 219, 33, 212, 34, 252, 123, 245,
- 180, 225, 30, 233, 48, 231, 216, 242, 191, 222, 250, 231, 216, 242, 191,
- 232, 158, 2, 235, 232, 225, 202, 250, 8, 232, 158, 2, 234, 144, 234, 144,
- 232, 157, 204, 232, 157, 252, 52, 252, 53, 2, 251, 12, 91, 251, 198, 232,
- 210, 87, 223, 177, 251, 94, 252, 193, 2, 140, 80, 48, 245, 151, 2, 140,
- 80, 48, 226, 201, 2, 245, 39, 164, 2, 43, 44, 80, 48, 219, 41, 2, 97, 80,
- 48, 216, 15, 2, 214, 153, 80, 48, 228, 80, 123, 214, 184, 245, 199, 87,
- 234, 142, 216, 248, 235, 226, 16, 31, 7, 6, 233, 15, 235, 226, 16, 31, 7,
- 4, 233, 15, 235, 226, 16, 31, 227, 203, 235, 226, 16, 31, 217, 184, 235,
- 226, 16, 31, 7, 233, 15, 244, 104, 245, 180, 216, 10, 211, 199, 242, 28,
- 227, 186, 22, 251, 205, 241, 73, 225, 53, 230, 231, 217, 0, 249, 122,
- 252, 167, 219, 127, 225, 12, 218, 159, 2, 230, 229, 247, 128, 235, 137,
- 16, 31, 252, 65, 215, 221, 245, 164, 85, 42, 251, 94, 71, 42, 251, 94,
- 233, 91, 223, 114, 250, 43, 233, 91, 251, 216, 250, 43, 233, 91, 226,
- 161, 248, 0, 233, 91, 251, 216, 248, 0, 4, 226, 161, 248, 0, 4, 251, 216,
- 248, 0, 214, 162, 223, 114, 215, 226, 246, 113, 223, 114, 215, 226, 214,
- 162, 4, 223, 114, 215, 226, 246, 113, 4, 223, 114, 215, 226, 37, 249,
- 139, 224, 255, 249, 139, 225, 0, 2, 242, 33, 51, 249, 139, 224, 255, 228,
- 54, 43, 220, 155, 2, 134, 247, 126, 250, 12, 244, 199, 123, 226, 246,
- 250, 12, 244, 199, 113, 226, 246, 250, 12, 244, 199, 134, 226, 246, 250,
- 12, 244, 199, 244, 19, 226, 246, 250, 12, 244, 199, 244, 89, 226, 246,
- 250, 12, 244, 199, 219, 127, 226, 246, 250, 12, 244, 199, 220, 124, 226,
- 246, 250, 12, 244, 199, 245, 201, 226, 246, 250, 12, 244, 199, 228, 205,
- 226, 246, 250, 12, 244, 199, 216, 249, 226, 246, 250, 12, 244, 199, 245,
- 176, 226, 246, 250, 12, 244, 199, 215, 77, 226, 246, 250, 12, 244, 199,
- 226, 196, 250, 12, 244, 199, 215, 56, 250, 12, 244, 199, 216, 141, 250,
- 12, 244, 199, 244, 15, 250, 12, 244, 199, 244, 87, 250, 12, 244, 199,
- 219, 123, 250, 12, 244, 199, 220, 123, 250, 12, 244, 199, 245, 200, 250,
- 12, 244, 199, 228, 204, 250, 12, 244, 199, 216, 247, 250, 12, 244, 199,
- 245, 174, 250, 12, 244, 199, 215, 75, 230, 122, 243, 237, 216, 37, 216,
- 3, 218, 150, 64, 232, 245, 219, 172, 64, 235, 138, 230, 111, 242, 131,
- 244, 198, 242, 131, 244, 199, 2, 219, 76, 245, 21, 244, 199, 2, 217, 15,
- 64, 235, 59, 219, 76, 244, 199, 2, 204, 230, 115, 219, 76, 244, 199, 2,
- 204, 230, 116, 22, 219, 76, 245, 21, 219, 76, 244, 199, 2, 204, 230, 116,
- 22, 249, 238, 217, 248, 219, 76, 244, 199, 2, 204, 230, 116, 22, 216,
- 105, 245, 21, 219, 76, 244, 199, 2, 242, 32, 219, 76, 244, 199, 2, 240,
- 254, 211, 233, 244, 198, 219, 76, 244, 199, 2, 219, 76, 245, 21, 244,
- 199, 221, 219, 248, 70, 244, 41, 223, 91, 244, 198, 219, 76, 244, 199, 2,
- 241, 233, 245, 21, 219, 76, 244, 199, 2, 218, 35, 219, 75, 244, 198, 229,
- 92, 244, 198, 245, 31, 244, 198, 214, 188, 244, 198, 244, 199, 2, 249,
- 238, 217, 248, 225, 195, 244, 198, 249, 209, 244, 198, 249, 210, 244,
- 198, 234, 68, 244, 198, 244, 199, 216, 138, 116, 234, 69, 234, 68, 244,
- 199, 2, 219, 76, 245, 21, 234, 68, 244, 199, 2, 250, 8, 245, 21, 244,
- 199, 2, 218, 89, 216, 20, 244, 199, 2, 218, 89, 216, 21, 22, 211, 233,
- 245, 23, 244, 199, 2, 218, 89, 216, 21, 22, 216, 105, 245, 21, 247, 200,
- 244, 198, 211, 204, 244, 198, 254, 116, 244, 198, 224, 230, 244, 198,
- 249, 124, 244, 198, 225, 173, 244, 198, 244, 199, 2, 232, 132, 64, 215,
- 205, 247, 200, 251, 96, 223, 91, 244, 198, 243, 247, 244, 199, 2, 204,
- 230, 115, 254, 114, 244, 198, 244, 160, 244, 198, 212, 20, 244, 198, 219,
- 93, 244, 198, 216, 72, 244, 198, 242, 132, 244, 198, 232, 120, 249, 124,
- 244, 198, 244, 199, 2, 204, 230, 115, 240, 210, 244, 198, 244, 199, 2,
- 204, 230, 116, 22, 249, 238, 217, 248, 244, 199, 221, 192, 236, 7, 244,
- 161, 253, 221, 244, 198, 244, 57, 244, 198, 219, 94, 244, 198, 247, 173,
- 244, 198, 244, 199, 211, 230, 230, 115, 244, 199, 2, 231, 89, 231, 149,
- 242, 131, 250, 233, 244, 199, 2, 219, 76, 245, 21, 250, 233, 244, 199, 2,
- 217, 15, 64, 235, 59, 219, 76, 250, 233, 244, 199, 2, 204, 230, 115, 219,
- 76, 250, 233, 244, 199, 2, 241, 233, 245, 21, 250, 233, 244, 199, 2, 211,
- 196, 219, 77, 234, 68, 250, 233, 244, 199, 2, 250, 8, 245, 21, 224, 230,
- 250, 233, 244, 198, 249, 124, 250, 233, 244, 198, 212, 20, 250, 233, 244,
- 198, 244, 199, 2, 228, 80, 242, 170, 243, 41, 244, 199, 2, 226, 219, 243,
- 41, 225, 171, 251, 176, 248, 83, 221, 171, 230, 150, 241, 236, 230, 150,
- 219, 10, 230, 150, 242, 12, 225, 171, 223, 159, 123, 242, 22, 225, 171,
- 223, 159, 251, 186, 242, 18, 236, 7, 250, 187, 225, 171, 243, 246, 225,
- 171, 2, 224, 230, 244, 198, 225, 171, 2, 244, 49, 242, 17, 222, 205, 241,
- 221, 218, 145, 232, 155, 223, 165, 250, 252, 241, 169, 215, 249, 241,
- 169, 215, 250, 2, 251, 122, 228, 58, 215, 249, 231, 37, 193, 223, 166,
- 218, 151, 215, 247, 215, 248, 250, 252, 251, 100, 226, 198, 251, 100,
- 215, 202, 251, 101, 218, 131, 230, 192, 254, 138, 244, 105, 245, 145,
- 225, 2, 250, 252, 226, 198, 225, 2, 250, 252, 217, 33, 226, 198, 217, 33,
- 253, 188, 226, 198, 253, 188, 223, 121, 213, 247, 248, 66, 215, 193, 253,
- 250, 232, 123, 215, 255, 230, 144, 230, 121, 223, 164, 218, 7, 223, 164,
- 230, 121, 251, 36, 254, 238, 215, 246, 220, 18, 222, 184, 219, 3, 203,
- 215, 253, 232, 236, 67, 215, 253, 232, 236, 249, 198, 50, 225, 2, 250,
- 237, 223, 47, 232, 236, 215, 223, 244, 82, 226, 201, 224, 241, 247, 131,
- 228, 80, 245, 133, 50, 219, 74, 87, 228, 80, 219, 74, 87, 224, 125, 232,
- 199, 236, 7, 235, 163, 225, 44, 87, 247, 154, 228, 57, 232, 199, 87, 224,
- 235, 212, 41, 87, 228, 71, 212, 41, 87, 252, 10, 228, 80, 252, 9, 252, 8,
- 230, 121, 252, 8, 225, 216, 228, 80, 225, 215, 250, 108, 249, 132, 231,
- 61, 87, 211, 218, 87, 223, 62, 252, 195, 87, 216, 38, 212, 41, 250, 5,
- 219, 236, 252, 126, 252, 124, 225, 246, 249, 185, 249, 94, 252, 177, 250,
- 30, 43, 232, 95, 108, 16, 31, 224, 6, 108, 16, 31, 254, 201, 108, 16, 31,
- 244, 104, 108, 16, 31, 245, 231, 108, 16, 31, 212, 40, 108, 16, 31, 254,
- 51, 108, 16, 31, 254, 52, 223, 108, 108, 16, 31, 254, 52, 223, 107, 108,
- 16, 31, 254, 52, 213, 143, 108, 16, 31, 254, 52, 213, 142, 108, 16, 31,
- 213, 157, 108, 16, 31, 213, 156, 108, 16, 31, 213, 155, 108, 16, 31, 218,
- 45, 108, 16, 31, 225, 128, 218, 45, 108, 16, 31, 85, 218, 45, 108, 16,
- 31, 231, 60, 218, 72, 108, 16, 31, 231, 60, 218, 71, 108, 16, 31, 231,
- 60, 218, 70, 108, 16, 31, 250, 46, 108, 16, 31, 222, 3, 108, 16, 31, 228,
- 193, 108, 16, 31, 213, 141, 108, 16, 31, 213, 140, 108, 16, 31, 222, 206,
- 222, 3, 108, 16, 31, 222, 206, 222, 2, 108, 16, 31, 242, 173, 108, 16,
- 31, 219, 168, 108, 16, 31, 235, 184, 226, 157, 108, 16, 31, 235, 184,
- 226, 156, 108, 16, 31, 249, 142, 64, 235, 183, 108, 16, 31, 223, 104, 64,
- 235, 183, 108, 16, 31, 249, 176, 226, 157, 108, 16, 31, 235, 182, 226,
- 157, 108, 16, 31, 218, 73, 64, 249, 175, 108, 16, 31, 249, 142, 64, 249,
- 175, 108, 16, 31, 249, 142, 64, 249, 174, 108, 16, 31, 249, 176, 254, 91,
- 108, 16, 31, 222, 4, 64, 249, 176, 254, 91, 108, 16, 31, 218, 73, 64,
- 222, 4, 64, 249, 175, 108, 16, 31, 213, 243, 108, 16, 31, 216, 85, 226,
- 157, 108, 16, 31, 233, 63, 226, 157, 108, 16, 31, 254, 90, 226, 157, 108,
- 16, 31, 218, 73, 64, 254, 89, 108, 16, 31, 222, 4, 64, 254, 89, 108, 16,
- 31, 218, 73, 64, 222, 4, 64, 254, 89, 108, 16, 31, 213, 158, 64, 254, 89,
- 108, 16, 31, 223, 104, 64, 254, 89, 108, 16, 31, 223, 104, 64, 254, 88,
- 108, 16, 31, 223, 103, 108, 16, 31, 223, 102, 108, 16, 31, 223, 101, 108,
- 16, 31, 223, 100, 108, 16, 31, 254, 166, 108, 16, 31, 254, 165, 108, 16,
- 31, 231, 168, 108, 16, 31, 222, 9, 108, 16, 31, 253, 254, 108, 16, 31,
- 223, 128, 108, 16, 31, 223, 127, 108, 16, 31, 253, 191, 108, 16, 31, 251,
- 237, 226, 157, 108, 16, 31, 217, 50, 108, 16, 31, 217, 49, 108, 16, 31,
- 224, 11, 232, 228, 108, 16, 31, 251, 191, 108, 16, 31, 251, 190, 108, 16,
- 31, 251, 189, 108, 16, 31, 254, 146, 108, 16, 31, 226, 222, 108, 16, 31,
- 218, 250, 108, 16, 31, 216, 83, 108, 16, 31, 242, 103, 108, 16, 31, 212,
- 28, 108, 16, 31, 224, 229, 108, 16, 31, 251, 22, 108, 16, 31, 215, 86,
- 108, 16, 31, 250, 254, 230, 127, 108, 16, 31, 221, 204, 64, 235, 61, 108,
- 16, 31, 251, 33, 108, 16, 31, 215, 220, 108, 16, 31, 218, 156, 215, 220,
- 108, 16, 31, 232, 154, 108, 16, 31, 219, 58, 108, 16, 31, 214, 142, 108,
- 16, 31, 240, 253, 246, 72, 108, 16, 31, 253, 235, 108, 16, 31, 224, 237,
- 253, 235, 108, 16, 31, 251, 150, 108, 16, 31, 224, 228, 251, 150, 108,
- 16, 31, 254, 143, 108, 16, 31, 218, 119, 218, 27, 218, 118, 108, 16, 31,
- 218, 119, 218, 27, 218, 117, 108, 16, 31, 218, 69, 108, 16, 31, 224, 203,
- 108, 16, 31, 247, 189, 108, 16, 31, 247, 191, 108, 16, 31, 247, 190, 108,
- 16, 31, 224, 134, 108, 16, 31, 224, 123, 108, 16, 31, 249, 130, 108, 16,
- 31, 249, 129, 108, 16, 31, 249, 128, 108, 16, 31, 249, 127, 108, 16, 31,
- 249, 126, 108, 16, 31, 254, 178, 108, 16, 31, 252, 127, 64, 231, 154,
- 108, 16, 31, 252, 127, 64, 214, 17, 108, 16, 31, 223, 60, 108, 16, 31,
- 240, 245, 108, 16, 31, 228, 217, 108, 16, 31, 248, 153, 108, 16, 31, 230,
- 139, 108, 16, 31, 163, 246, 102, 108, 16, 31, 163, 226, 136, 10, 14, 240,
- 109, 10, 14, 240, 108, 10, 14, 240, 107, 10, 14, 240, 106, 10, 14, 240,
- 105, 10, 14, 240, 104, 10, 14, 240, 103, 10, 14, 240, 102, 10, 14, 240,
- 101, 10, 14, 240, 100, 10, 14, 240, 99, 10, 14, 240, 98, 10, 14, 240, 97,
- 10, 14, 240, 96, 10, 14, 240, 95, 10, 14, 240, 94, 10, 14, 240, 93, 10,
- 14, 240, 92, 10, 14, 240, 91, 10, 14, 240, 90, 10, 14, 240, 89, 10, 14,
- 240, 88, 10, 14, 240, 87, 10, 14, 240, 86, 10, 14, 240, 85, 10, 14, 240,
- 84, 10, 14, 240, 83, 10, 14, 240, 82, 10, 14, 240, 81, 10, 14, 240, 80,
- 10, 14, 240, 79, 10, 14, 240, 78, 10, 14, 240, 77, 10, 14, 240, 76, 10,
- 14, 240, 75, 10, 14, 240, 74, 10, 14, 240, 73, 10, 14, 240, 72, 10, 14,
- 240, 71, 10, 14, 240, 70, 10, 14, 240, 69, 10, 14, 240, 68, 10, 14, 240,
- 67, 10, 14, 240, 66, 10, 14, 240, 65, 10, 14, 240, 64, 10, 14, 240, 63,
- 10, 14, 240, 62, 10, 14, 240, 61, 10, 14, 240, 60, 10, 14, 240, 59, 10,
- 14, 240, 58, 10, 14, 240, 57, 10, 14, 240, 56, 10, 14, 240, 55, 10, 14,
- 240, 54, 10, 14, 240, 53, 10, 14, 240, 52, 10, 14, 240, 51, 10, 14, 240,
- 50, 10, 14, 240, 49, 10, 14, 240, 48, 10, 14, 240, 47, 10, 14, 240, 46,
- 10, 14, 240, 45, 10, 14, 240, 44, 10, 14, 240, 43, 10, 14, 240, 42, 10,
- 14, 240, 41, 10, 14, 240, 40, 10, 14, 240, 39, 10, 14, 240, 38, 10, 14,
- 240, 37, 10, 14, 240, 36, 10, 14, 240, 35, 10, 14, 240, 34, 10, 14, 240,
- 33, 10, 14, 240, 32, 10, 14, 240, 31, 10, 14, 240, 30, 10, 14, 240, 29,
- 10, 14, 240, 28, 10, 14, 240, 27, 10, 14, 240, 26, 10, 14, 240, 25, 10,
- 14, 240, 24, 10, 14, 240, 23, 10, 14, 240, 22, 10, 14, 240, 21, 10, 14,
- 240, 20, 10, 14, 240, 19, 10, 14, 240, 18, 10, 14, 240, 17, 10, 14, 240,
- 16, 10, 14, 240, 15, 10, 14, 240, 14, 10, 14, 240, 13, 10, 14, 240, 12,
- 10, 14, 240, 11, 10, 14, 240, 10, 10, 14, 240, 9, 10, 14, 240, 8, 10, 14,
- 240, 7, 10, 14, 240, 6, 10, 14, 240, 5, 10, 14, 240, 4, 10, 14, 240, 3,
- 10, 14, 240, 2, 10, 14, 240, 1, 10, 14, 240, 0, 10, 14, 239, 255, 10, 14,
- 239, 254, 10, 14, 239, 253, 10, 14, 239, 252, 10, 14, 239, 251, 10, 14,
- 239, 250, 10, 14, 239, 249, 10, 14, 239, 248, 10, 14, 239, 247, 10, 14,
- 239, 246, 10, 14, 239, 245, 10, 14, 239, 244, 10, 14, 239, 243, 10, 14,
- 239, 242, 10, 14, 239, 241, 10, 14, 239, 240, 10, 14, 239, 239, 10, 14,
- 239, 238, 10, 14, 239, 237, 10, 14, 239, 236, 10, 14, 239, 235, 10, 14,
- 239, 234, 10, 14, 239, 233, 10, 14, 239, 232, 10, 14, 239, 231, 10, 14,
- 239, 230, 10, 14, 239, 229, 10, 14, 239, 228, 10, 14, 239, 227, 10, 14,
- 239, 226, 10, 14, 239, 225, 10, 14, 239, 224, 10, 14, 239, 223, 10, 14,
- 239, 222, 10, 14, 239, 221, 10, 14, 239, 220, 10, 14, 239, 219, 10, 14,
- 239, 218, 10, 14, 239, 217, 10, 14, 239, 216, 10, 14, 239, 215, 10, 14,
- 239, 214, 10, 14, 239, 213, 10, 14, 239, 212, 10, 14, 239, 211, 10, 14,
- 239, 210, 10, 14, 239, 209, 10, 14, 239, 208, 10, 14, 239, 207, 10, 14,
- 239, 206, 10, 14, 239, 205, 10, 14, 239, 204, 10, 14, 239, 203, 10, 14,
- 239, 202, 10, 14, 239, 201, 10, 14, 239, 200, 10, 14, 239, 199, 10, 14,
- 239, 198, 10, 14, 239, 197, 10, 14, 239, 196, 10, 14, 239, 195, 10, 14,
- 239, 194, 10, 14, 239, 193, 10, 14, 239, 192, 10, 14, 239, 191, 10, 14,
- 239, 190, 10, 14, 239, 189, 10, 14, 239, 188, 10, 14, 239, 187, 10, 14,
- 239, 186, 10, 14, 239, 185, 10, 14, 239, 184, 10, 14, 239, 183, 10, 14,
- 239, 182, 10, 14, 239, 181, 10, 14, 239, 180, 10, 14, 239, 179, 10, 14,
- 239, 178, 10, 14, 239, 177, 10, 14, 239, 176, 10, 14, 239, 175, 10, 14,
- 239, 174, 10, 14, 239, 173, 10, 14, 239, 172, 10, 14, 239, 171, 10, 14,
- 239, 170, 10, 14, 239, 169, 10, 14, 239, 168, 10, 14, 239, 167, 10, 14,
- 239, 166, 10, 14, 239, 165, 10, 14, 239, 164, 10, 14, 239, 163, 10, 14,
- 239, 162, 10, 14, 239, 161, 10, 14, 239, 160, 10, 14, 239, 159, 10, 14,
- 239, 158, 10, 14, 239, 157, 10, 14, 239, 156, 10, 14, 239, 155, 10, 14,
- 239, 154, 10, 14, 239, 153, 10, 14, 239, 152, 10, 14, 239, 151, 10, 14,
- 239, 150, 10, 14, 239, 149, 10, 14, 239, 148, 10, 14, 239, 147, 10, 14,
- 239, 146, 10, 14, 239, 145, 10, 14, 239, 144, 10, 14, 239, 143, 10, 14,
- 239, 142, 10, 14, 239, 141, 10, 14, 239, 140, 10, 14, 239, 139, 10, 14,
- 239, 138, 10, 14, 239, 137, 10, 14, 239, 136, 10, 14, 239, 135, 10, 14,
- 239, 134, 10, 14, 239, 133, 10, 14, 239, 132, 10, 14, 239, 131, 10, 14,
- 239, 130, 10, 14, 239, 129, 10, 14, 239, 128, 10, 14, 239, 127, 10, 14,
- 239, 126, 10, 14, 239, 125, 10, 14, 239, 124, 10, 14, 239, 123, 10, 14,
- 239, 122, 10, 14, 239, 121, 10, 14, 239, 120, 10, 14, 239, 119, 10, 14,
- 239, 118, 10, 14, 239, 117, 10, 14, 239, 116, 10, 14, 239, 115, 10, 14,
- 239, 114, 10, 14, 239, 113, 10, 14, 239, 112, 10, 14, 239, 111, 10, 14,
- 239, 110, 10, 14, 239, 109, 10, 14, 239, 108, 10, 14, 239, 107, 10, 14,
- 239, 106, 10, 14, 239, 105, 10, 14, 239, 104, 10, 14, 239, 103, 10, 14,
- 239, 102, 10, 14, 239, 101, 10, 14, 239, 100, 10, 14, 239, 99, 10, 14,
- 239, 98, 10, 14, 239, 97, 10, 14, 239, 96, 10, 14, 239, 95, 10, 14, 239,
- 94, 10, 14, 239, 93, 10, 14, 239, 92, 10, 14, 239, 91, 10, 14, 239, 90,
- 10, 14, 239, 89, 10, 14, 239, 88, 10, 14, 239, 87, 10, 14, 239, 86, 10,
- 14, 239, 85, 10, 14, 239, 84, 10, 14, 239, 83, 10, 14, 239, 82, 10, 14,
- 239, 81, 10, 14, 239, 80, 10, 14, 239, 79, 10, 14, 239, 78, 10, 14, 239,
- 77, 10, 14, 239, 76, 10, 14, 239, 75, 10, 14, 239, 74, 10, 14, 239, 73,
- 10, 14, 239, 72, 10, 14, 239, 71, 10, 14, 239, 70, 10, 14, 239, 69, 10,
- 14, 239, 68, 10, 14, 239, 67, 10, 14, 239, 66, 10, 14, 239, 65, 10, 14,
- 239, 64, 10, 14, 239, 63, 10, 14, 239, 62, 10, 14, 239, 61, 10, 14, 239,
- 60, 10, 14, 239, 59, 10, 14, 239, 58, 10, 14, 239, 57, 10, 14, 239, 56,
- 10, 14, 239, 55, 10, 14, 239, 54, 10, 14, 239, 53, 10, 14, 239, 52, 10,
- 14, 239, 51, 10, 14, 239, 50, 10, 14, 239, 49, 10, 14, 239, 48, 10, 14,
- 239, 47, 10, 14, 239, 46, 10, 14, 239, 45, 10, 14, 239, 44, 10, 14, 239,
- 43, 10, 14, 239, 42, 10, 14, 239, 41, 10, 14, 239, 40, 10, 14, 239, 39,
- 10, 14, 239, 38, 10, 14, 239, 37, 10, 14, 239, 36, 10, 14, 239, 35, 10,
- 14, 239, 34, 10, 14, 239, 33, 10, 14, 239, 32, 10, 14, 239, 31, 10, 14,
- 239, 30, 10, 14, 239, 29, 10, 14, 239, 28, 10, 14, 239, 27, 10, 14, 239,
- 26, 10, 14, 239, 25, 10, 14, 239, 24, 10, 14, 239, 23, 10, 14, 239, 22,
- 10, 14, 239, 21, 10, 14, 239, 20, 10, 14, 239, 19, 10, 14, 239, 18, 10,
- 14, 239, 17, 10, 14, 239, 16, 10, 14, 239, 15, 10, 14, 239, 14, 10, 14,
- 239, 13, 10, 14, 239, 12, 10, 14, 239, 11, 10, 14, 239, 10, 10, 14, 239,
- 9, 10, 14, 239, 8, 10, 14, 239, 7, 10, 14, 239, 6, 10, 14, 239, 5, 10,
- 14, 239, 4, 10, 14, 239, 3, 10, 14, 239, 2, 10, 14, 239, 1, 10, 14, 239,
- 0, 10, 14, 238, 255, 10, 14, 238, 254, 10, 14, 238, 253, 10, 14, 238,
- 252, 10, 14, 238, 251, 10, 14, 238, 250, 10, 14, 238, 249, 10, 14, 238,
- 248, 10, 14, 238, 247, 10, 14, 238, 246, 10, 14, 238, 245, 10, 14, 238,
- 244, 10, 14, 238, 243, 10, 14, 238, 242, 10, 14, 238, 241, 10, 14, 238,
- 240, 10, 14, 238, 239, 10, 14, 238, 238, 10, 14, 238, 237, 10, 14, 238,
- 236, 10, 14, 238, 235, 10, 14, 238, 234, 10, 14, 238, 233, 10, 14, 238,
- 232, 10, 14, 238, 231, 10, 14, 238, 230, 10, 14, 238, 229, 10, 14, 238,
- 228, 10, 14, 238, 227, 10, 14, 238, 226, 10, 14, 238, 225, 10, 14, 238,
- 224, 10, 14, 238, 223, 10, 14, 238, 222, 10, 14, 238, 221, 10, 14, 238,
- 220, 10, 14, 238, 219, 10, 14, 238, 218, 10, 14, 238, 217, 10, 14, 238,
- 216, 10, 14, 238, 215, 10, 14, 238, 214, 10, 14, 238, 213, 10, 14, 238,
- 212, 10, 14, 238, 211, 10, 14, 238, 210, 10, 14, 238, 209, 10, 14, 238,
- 208, 10, 14, 238, 207, 10, 14, 238, 206, 10, 14, 238, 205, 10, 14, 238,
- 204, 10, 14, 238, 203, 10, 14, 238, 202, 10, 14, 238, 201, 10, 14, 238,
- 200, 10, 14, 238, 199, 10, 14, 238, 198, 10, 14, 238, 197, 10, 14, 238,
- 196, 10, 14, 238, 195, 10, 14, 238, 194, 10, 14, 238, 193, 10, 14, 238,
- 192, 10, 14, 238, 191, 10, 14, 238, 190, 10, 14, 238, 189, 10, 14, 238,
- 188, 10, 14, 238, 187, 10, 14, 238, 186, 10, 14, 238, 185, 10, 14, 238,
- 184, 10, 14, 238, 183, 10, 14, 238, 182, 10, 14, 238, 181, 10, 14, 238,
- 180, 10, 14, 238, 179, 10, 14, 238, 178, 10, 14, 238, 177, 10, 14, 238,
- 176, 10, 14, 238, 175, 10, 14, 238, 174, 10, 14, 238, 173, 10, 14, 238,
- 172, 10, 14, 238, 171, 10, 14, 238, 170, 10, 14, 238, 169, 10, 14, 238,
- 168, 10, 14, 238, 167, 10, 14, 238, 166, 10, 14, 238, 165, 10, 14, 238,
- 164, 10, 14, 238, 163, 10, 14, 238, 162, 10, 14, 238, 161, 10, 14, 238,
- 160, 10, 14, 238, 159, 10, 14, 238, 158, 10, 14, 238, 157, 10, 14, 238,
- 156, 10, 14, 238, 155, 10, 14, 238, 154, 10, 14, 238, 153, 10, 14, 238,
- 152, 10, 14, 238, 151, 10, 14, 238, 150, 10, 14, 238, 149, 10, 14, 238,
- 148, 10, 14, 238, 147, 10, 14, 238, 146, 10, 14, 238, 145, 10, 14, 238,
- 144, 10, 14, 238, 143, 10, 14, 238, 142, 10, 14, 238, 141, 10, 14, 238,
- 140, 10, 14, 238, 139, 10, 14, 238, 138, 10, 14, 238, 137, 10, 14, 238,
- 136, 10, 14, 238, 135, 10, 14, 238, 134, 10, 14, 238, 133, 10, 14, 238,
- 132, 10, 14, 238, 131, 10, 14, 238, 130, 10, 14, 238, 129, 10, 14, 238,
- 128, 10, 14, 238, 127, 10, 14, 238, 126, 10, 14, 238, 125, 10, 14, 238,
- 124, 10, 14, 238, 123, 10, 14, 238, 122, 10, 14, 238, 121, 10, 14, 238,
- 120, 10, 14, 238, 119, 10, 14, 238, 118, 10, 14, 238, 117, 10, 14, 238,
- 116, 10, 14, 238, 115, 10, 14, 238, 114, 10, 14, 238, 113, 10, 14, 238,
- 112, 10, 14, 238, 111, 10, 14, 238, 110, 10, 14, 238, 109, 10, 14, 238,
- 108, 10, 14, 238, 107, 10, 14, 238, 106, 10, 14, 238, 105, 10, 14, 238,
- 104, 10, 14, 238, 103, 10, 14, 238, 102, 10, 14, 238, 101, 10, 14, 238,
- 100, 10, 14, 238, 99, 10, 14, 238, 98, 10, 14, 238, 97, 10, 14, 238, 96,
- 10, 14, 238, 95, 10, 14, 238, 94, 10, 14, 238, 93, 10, 14, 238, 92, 10,
- 14, 238, 91, 10, 14, 238, 90, 10, 14, 238, 89, 10, 14, 238, 88, 10, 14,
- 238, 87, 10, 14, 238, 86, 10, 14, 238, 85, 10, 14, 238, 84, 10, 14, 238,
- 83, 10, 14, 238, 82, 10, 14, 238, 81, 10, 14, 238, 80, 233, 96, 217, 85,
- 129, 219, 20, 129, 245, 39, 79, 129, 224, 1, 79, 129, 54, 50, 129, 247,
- 140, 50, 129, 225, 185, 50, 129, 254, 134, 129, 254, 65, 129, 43, 226, 7,
- 129, 44, 226, 7, 129, 253, 224, 129, 96, 50, 129, 249, 227, 129, 240,
- 174, 129, 243, 236, 218, 131, 129, 219, 48, 129, 21, 210, 86, 129, 21,
- 111, 129, 21, 105, 129, 21, 158, 129, 21, 161, 129, 21, 190, 129, 21,
- 195, 129, 21, 199, 129, 21, 196, 129, 21, 201, 129, 249, 234, 129, 220,
- 152, 129, 233, 21, 50, 129, 245, 106, 50, 129, 242, 137, 50, 129, 224,
- 16, 79, 129, 249, 225, 253, 214, 129, 7, 6, 1, 61, 129, 7, 6, 1, 253,
- 166, 129, 7, 6, 1, 251, 74, 129, 7, 6, 1, 249, 68, 129, 7, 6, 1, 76, 129,
- 7, 6, 1, 245, 14, 129, 7, 6, 1, 243, 209, 129, 7, 6, 1, 242, 67, 129, 7,
- 6, 1, 74, 129, 7, 6, 1, 235, 150, 129, 7, 6, 1, 235, 29, 129, 7, 6, 1,
- 156, 129, 7, 6, 1, 194, 129, 7, 6, 1, 230, 30, 129, 7, 6, 1, 78, 129, 7,
- 6, 1, 226, 109, 129, 7, 6, 1, 224, 99, 129, 7, 6, 1, 153, 129, 7, 6, 1,
- 222, 93, 129, 7, 6, 1, 217, 153, 129, 7, 6, 1, 69, 129, 7, 6, 1, 214,
- 105, 129, 7, 6, 1, 212, 98, 129, 7, 6, 1, 211, 178, 129, 7, 6, 1, 211,
- 117, 129, 7, 6, 1, 210, 159, 129, 43, 42, 127, 129, 223, 53, 219, 48,
- 129, 44, 42, 127, 129, 250, 39, 255, 23, 129, 121, 232, 219, 129, 242,
- 144, 255, 23, 129, 7, 4, 1, 61, 129, 7, 4, 1, 253, 166, 129, 7, 4, 1,
- 251, 74, 129, 7, 4, 1, 249, 68, 129, 7, 4, 1, 76, 129, 7, 4, 1, 245, 14,
- 129, 7, 4, 1, 243, 209, 129, 7, 4, 1, 242, 67, 129, 7, 4, 1, 74, 129, 7,
- 4, 1, 235, 150, 129, 7, 4, 1, 235, 29, 129, 7, 4, 1, 156, 129, 7, 4, 1,
- 194, 129, 7, 4, 1, 230, 30, 129, 7, 4, 1, 78, 129, 7, 4, 1, 226, 109,
- 129, 7, 4, 1, 224, 99, 129, 7, 4, 1, 153, 129, 7, 4, 1, 222, 93, 129, 7,
- 4, 1, 217, 153, 129, 7, 4, 1, 69, 129, 7, 4, 1, 214, 105, 129, 7, 4, 1,
- 212, 98, 129, 7, 4, 1, 211, 178, 129, 7, 4, 1, 211, 117, 129, 7, 4, 1,
- 210, 159, 129, 43, 249, 107, 127, 129, 67, 232, 219, 129, 44, 249, 107,
- 127, 129, 184, 251, 14, 217, 85, 45, 221, 80, 45, 221, 69, 45, 221, 58,
- 45, 221, 46, 45, 221, 35, 45, 221, 24, 45, 221, 13, 45, 221, 2, 45, 220,
- 247, 45, 220, 239, 45, 220, 238, 45, 220, 237, 45, 220, 236, 45, 220,
- 234, 45, 220, 233, 45, 220, 232, 45, 220, 231, 45, 220, 230, 45, 220,
- 229, 45, 220, 228, 45, 220, 227, 45, 220, 226, 45, 220, 225, 45, 220,
- 223, 45, 220, 222, 45, 220, 221, 45, 220, 220, 45, 220, 219, 45, 220,
- 218, 45, 220, 217, 45, 220, 216, 45, 220, 215, 45, 220, 214, 45, 220,
- 212, 45, 220, 211, 45, 220, 210, 45, 220, 209, 45, 220, 208, 45, 220,
- 207, 45, 220, 206, 45, 220, 205, 45, 220, 204, 45, 220, 203, 45, 220,
- 201, 45, 220, 200, 45, 220, 199, 45, 220, 198, 45, 220, 197, 45, 220,
- 196, 45, 220, 195, 45, 220, 194, 45, 220, 193, 45, 220, 192, 45, 220,
- 190, 45, 220, 189, 45, 220, 188, 45, 220, 187, 45, 220, 186, 45, 220,
- 185, 45, 220, 184, 45, 220, 183, 45, 220, 182, 45, 220, 181, 45, 220,
- 179, 45, 220, 178, 45, 220, 177, 45, 220, 176, 45, 220, 175, 45, 220,
- 174, 45, 220, 173, 45, 220, 172, 45, 220, 171, 45, 220, 170, 45, 220,
- 168, 45, 220, 167, 45, 220, 166, 45, 220, 165, 45, 220, 164, 45, 220,
- 163, 45, 220, 162, 45, 220, 161, 45, 220, 160, 45, 220, 159, 45, 221,
- 156, 45, 221, 155, 45, 221, 154, 45, 221, 153, 45, 221, 152, 45, 221,
- 151, 45, 221, 150, 45, 221, 149, 45, 221, 148, 45, 221, 147, 45, 221,
- 145, 45, 221, 144, 45, 221, 143, 45, 221, 142, 45, 221, 141, 45, 221,
- 140, 45, 221, 139, 45, 221, 138, 45, 221, 137, 45, 221, 136, 45, 221,
- 134, 45, 221, 133, 45, 221, 132, 45, 221, 131, 45, 221, 130, 45, 221,
- 129, 45, 221, 128, 45, 221, 127, 45, 221, 126, 45, 221, 125, 45, 221,
- 123, 45, 221, 122, 45, 221, 121, 45, 221, 120, 45, 221, 119, 45, 221,
- 118, 45, 221, 117, 45, 221, 116, 45, 221, 115, 45, 221, 114, 45, 221,
- 112, 45, 221, 111, 45, 221, 110, 45, 221, 109, 45, 221, 108, 45, 221,
- 107, 45, 221, 106, 45, 221, 105, 45, 221, 104, 45, 221, 103, 45, 221,
- 101, 45, 221, 100, 45, 221, 99, 45, 221, 98, 45, 221, 97, 45, 221, 96,
- 45, 221, 95, 45, 221, 94, 45, 221, 93, 45, 221, 92, 45, 221, 90, 45, 221,
- 89, 45, 221, 88, 45, 221, 87, 45, 221, 86, 45, 221, 85, 45, 221, 84, 45,
- 221, 83, 45, 221, 82, 45, 221, 81, 45, 221, 79, 45, 221, 78, 45, 221, 77,
- 45, 221, 76, 45, 221, 75, 45, 221, 74, 45, 221, 73, 45, 221, 72, 45, 221,
- 71, 45, 221, 70, 45, 221, 68, 45, 221, 67, 45, 221, 66, 45, 221, 65, 45,
- 221, 64, 45, 221, 63, 45, 221, 62, 45, 221, 61, 45, 221, 60, 45, 221, 59,
- 45, 221, 57, 45, 221, 56, 45, 221, 55, 45, 221, 54, 45, 221, 53, 45, 221,
- 52, 45, 221, 51, 45, 221, 50, 45, 221, 49, 45, 221, 48, 45, 221, 45, 45,
- 221, 44, 45, 221, 43, 45, 221, 42, 45, 221, 41, 45, 221, 40, 45, 221, 39,
- 45, 221, 38, 45, 221, 37, 45, 221, 36, 45, 221, 34, 45, 221, 33, 45, 221,
- 32, 45, 221, 31, 45, 221, 30, 45, 221, 29, 45, 221, 28, 45, 221, 27, 45,
- 221, 26, 45, 221, 25, 45, 221, 23, 45, 221, 22, 45, 221, 21, 45, 221, 20,
- 45, 221, 19, 45, 221, 18, 45, 221, 17, 45, 221, 16, 45, 221, 15, 45, 221,
- 14, 45, 221, 12, 45, 221, 11, 45, 221, 10, 45, 221, 9, 45, 221, 8, 45,
- 221, 7, 45, 221, 6, 45, 221, 5, 45, 221, 4, 45, 221, 3, 45, 221, 1, 45,
- 221, 0, 45, 220, 255, 45, 220, 254, 45, 220, 253, 45, 220, 252, 45, 220,
- 251, 45, 220, 250, 45, 220, 249, 45, 220, 248, 45, 220, 246, 45, 220,
- 245, 45, 220, 244, 45, 220, 243, 45, 220, 242, 45, 220, 241, 45, 220,
- 240, 227, 206, 227, 208, 218, 154, 64, 241, 240, 219, 50, 218, 154, 64,
- 216, 213, 218, 86, 245, 151, 64, 216, 213, 245, 64, 245, 151, 64, 215,
- 244, 245, 117, 245, 140, 245, 141, 255, 16, 255, 17, 254, 176, 252, 55,
- 252, 187, 251, 139, 135, 217, 90, 203, 217, 90, 240, 234, 217, 94, 232,
- 220, 244, 153, 166, 232, 219, 245, 151, 64, 232, 219, 233, 6, 228, 140,
- 245, 120, 232, 220, 217, 90, 67, 217, 90, 212, 118, 244, 28, 244, 153,
- 244, 133, 250, 238, 223, 56, 249, 151, 220, 30, 226, 134, 232, 156, 111,
- 219, 60, 220, 30, 236, 6, 232, 156, 210, 86, 219, 193, 248, 159, 232,
- 210, 245, 85, 247, 163, 248, 39, 249, 186, 111, 248, 149, 248, 39, 249,
- 186, 105, 248, 148, 248, 39, 249, 186, 158, 248, 147, 248, 39, 249, 186,
- 161, 248, 146, 152, 255, 16, 229, 214, 217, 178, 236, 69, 217, 181, 245,
- 151, 64, 215, 245, 251, 221, 245, 70, 251, 13, 251, 15, 245, 151, 64,
- 231, 86, 245, 118, 218, 62, 218, 79, 245, 85, 245, 86, 235, 239, 220,
- 140, 161, 244, 115, 220, 139, 243, 245, 235, 239, 220, 140, 158, 242,
- 128, 220, 139, 242, 125, 235, 239, 220, 140, 105, 223, 124, 220, 139,
- 222, 147, 235, 239, 220, 140, 111, 214, 174, 220, 139, 214, 133, 219, 23,
- 248, 71, 248, 73, 226, 82, 250, 150, 226, 84, 125, 226, 244, 224, 196,
- 241, 54, 251, 158, 225, 176, 241, 210, 251, 169, 228, 80, 251, 158, 241,
- 210, 229, 180, 235, 249, 235, 251, 229, 87, 232, 219, 229, 104, 218, 154,
- 64, 221, 160, 254, 26, 218, 225, 245, 151, 64, 221, 160, 254, 26, 245,
- 88, 135, 217, 91, 220, 129, 203, 217, 91, 220, 129, 240, 231, 135, 217,
- 91, 2, 235, 41, 203, 217, 91, 2, 235, 41, 240, 232, 232, 220, 217, 91,
- 220, 129, 67, 217, 91, 220, 129, 212, 117, 226, 1, 232, 220, 244, 22,
- 226, 1, 232, 220, 246, 114, 225, 35, 226, 1, 232, 220, 252, 186, 226, 1,
- 232, 220, 214, 163, 225, 31, 223, 53, 232, 220, 244, 153, 223, 53, 235,
- 249, 223, 38, 219, 157, 220, 30, 105, 219, 154, 218, 227, 219, 157, 220,
- 30, 158, 219, 153, 218, 226, 248, 39, 249, 186, 218, 107, 248, 145, 224,
- 186, 214, 132, 111, 224, 186, 214, 130, 224, 152, 224, 186, 214, 132,
- 105, 224, 186, 214, 129, 224, 151, 220, 130, 215, 243, 218, 153, 218, 90,
- 251, 14, 250, 150, 250, 217, 231, 48, 212, 59, 230, 48, 218, 154, 64,
- 242, 114, 254, 26, 218, 154, 64, 224, 169, 254, 26, 219, 22, 245, 151,
- 64, 242, 114, 254, 26, 245, 151, 64, 224, 169, 254, 26, 245, 115, 218,
- 154, 64, 218, 107, 219, 37, 219, 157, 242, 148, 135, 235, 202, 220, 109,
- 219, 157, 135, 235, 202, 221, 196, 249, 186, 220, 137, 235, 202, 249,
- 121, 218, 108, 216, 237, 218, 170, 226, 173, 217, 168, 249, 226, 226,
- 146, 224, 187, 231, 47, 225, 22, 254, 61, 224, 181, 249, 226, 254, 77,
- 229, 168, 219, 202, 7, 6, 1, 243, 0, 7, 4, 1, 243, 0, 250, 167, 254, 157,
- 183, 218, 68, 249, 235, 219, 108, 233, 52, 165, 1, 232, 181, 209, 209, 1,
- 244, 52, 244, 44, 209, 209, 1, 244, 52, 244, 165, 209, 209, 1, 222, 213,
- 209, 209, 1, 232, 162, 63, 164, 251, 231, 220, 5, 242, 222, 230, 253,
- 223, 44, 243, 223, 243, 222, 243, 221, 230, 50, 209, 251, 209, 252, 209,
- 254, 232, 107, 222, 221, 232, 109, 222, 223, 225, 227, 232, 106, 222,
- 220, 228, 111, 230, 170, 211, 229, 232, 108, 222, 222, 243, 244, 225,
- 226, 212, 15, 245, 170, 243, 233, 230, 234, 226, 201, 214, 134, 87, 230,
- 234, 248, 165, 87, 8, 3, 235, 164, 79, 224, 197, 244, 28, 31, 67, 44, 71,
- 233, 26, 127, 213, 118, 213, 7, 212, 195, 212, 184, 212, 173, 212, 162,
- 212, 151, 212, 140, 212, 129, 213, 117, 213, 106, 213, 95, 213, 84, 213,
- 73, 213, 62, 213, 51, 251, 79, 226, 159, 79, 251, 204, 209, 253, 15, 5,
- 227, 215, 216, 240, 15, 5, 227, 215, 115, 227, 215, 251, 107, 115, 251,
- 106, 49, 28, 16, 243, 243, 219, 104, 250, 81, 214, 9, 213, 40, 213, 29,
- 213, 18, 213, 6, 212, 251, 212, 240, 212, 229, 212, 218, 212, 207, 212,
- 199, 212, 198, 212, 197, 212, 196, 212, 194, 212, 193, 212, 192, 212,
- 191, 212, 190, 212, 189, 212, 188, 212, 187, 212, 186, 212, 185, 212,
- 183, 212, 182, 212, 181, 212, 180, 212, 179, 212, 178, 212, 177, 212,
- 176, 212, 175, 212, 174, 212, 172, 212, 171, 212, 170, 212, 169, 212,
- 168, 212, 167, 212, 166, 212, 165, 212, 164, 212, 163, 212, 161, 212,
- 160, 212, 159, 212, 158, 212, 157, 212, 156, 212, 155, 212, 154, 212,
- 153, 212, 152, 212, 150, 212, 149, 212, 148, 212, 147, 212, 146, 212,
- 145, 212, 144, 212, 143, 212, 142, 212, 141, 212, 139, 212, 138, 212,
- 137, 212, 136, 212, 135, 212, 134, 212, 133, 212, 132, 212, 131, 212,
- 130, 212, 128, 212, 127, 212, 126, 212, 125, 212, 124, 212, 123, 212,
- 122, 212, 121, 212, 120, 212, 119, 213, 116, 213, 115, 213, 114, 213,
- 113, 213, 112, 213, 111, 213, 110, 213, 109, 213, 108, 213, 107, 213,
- 105, 213, 104, 213, 103, 213, 102, 213, 101, 213, 100, 213, 99, 213, 98,
- 213, 97, 213, 96, 213, 94, 213, 93, 213, 92, 213, 91, 213, 90, 213, 89,
- 213, 88, 213, 87, 213, 86, 213, 85, 213, 83, 213, 82, 213, 81, 213, 80,
- 213, 79, 213, 78, 213, 77, 213, 76, 213, 75, 213, 74, 213, 72, 213, 71,
- 213, 70, 213, 69, 213, 68, 213, 67, 213, 66, 213, 65, 213, 64, 213, 63,
- 213, 61, 213, 60, 213, 59, 213, 58, 213, 57, 213, 56, 213, 55, 213, 54,
- 213, 53, 213, 52, 213, 50, 213, 49, 213, 48, 213, 47, 213, 46, 213, 45,
- 213, 44, 213, 43, 213, 42, 213, 41, 213, 39, 213, 38, 213, 37, 213, 36,
- 213, 35, 213, 34, 213, 33, 213, 32, 213, 31, 213, 30, 213, 28, 213, 27,
- 213, 26, 213, 25, 213, 24, 213, 23, 213, 22, 213, 21, 213, 20, 213, 19,
- 213, 17, 213, 16, 213, 15, 213, 14, 213, 13, 213, 12, 213, 11, 213, 10,
- 213, 9, 213, 8, 213, 5, 213, 4, 213, 3, 213, 2, 213, 1, 213, 0, 212, 255,
- 212, 254, 212, 253, 212, 252, 212, 250, 212, 249, 212, 248, 212, 247,
- 212, 246, 212, 245, 212, 244, 212, 243, 212, 242, 212, 241, 212, 239,
- 212, 238, 212, 237, 212, 236, 212, 235, 212, 234, 212, 233, 212, 232,
- 212, 231, 212, 230, 212, 228, 212, 227, 212, 226, 212, 225, 212, 224,
- 212, 223, 212, 222, 212, 221, 212, 220, 212, 219, 212, 217, 212, 216,
- 212, 215, 212, 214, 212, 213, 212, 212, 212, 211, 212, 210, 212, 209,
- 212, 208, 212, 206, 212, 205, 212, 204, 212, 203, 212, 202, 212, 201,
- 212, 200, 7, 6, 1, 116, 2, 231, 238, 22, 242, 143, 7, 4, 1, 116, 2, 231,
- 238, 22, 242, 143, 7, 6, 1, 160, 2, 67, 232, 220, 51, 7, 4, 1, 160, 2,
- 67, 232, 220, 51, 7, 6, 1, 160, 2, 67, 232, 220, 252, 51, 22, 242, 143,
- 7, 4, 1, 160, 2, 67, 232, 220, 252, 51, 22, 242, 143, 7, 6, 1, 160, 2,
- 67, 232, 220, 252, 51, 22, 142, 7, 4, 1, 160, 2, 67, 232, 220, 252, 51,
- 22, 142, 7, 6, 1, 160, 2, 250, 39, 22, 231, 237, 7, 4, 1, 160, 2, 250,
- 39, 22, 231, 237, 7, 6, 1, 160, 2, 250, 39, 22, 250, 242, 7, 4, 1, 160,
- 2, 250, 39, 22, 250, 242, 7, 6, 1, 240, 161, 2, 231, 238, 22, 242, 143,
- 7, 4, 1, 240, 161, 2, 231, 238, 22, 242, 143, 7, 4, 1, 240, 161, 2, 59,
- 72, 22, 142, 7, 4, 1, 229, 85, 2, 216, 90, 48, 7, 6, 1, 144, 2, 67, 232,
- 220, 51, 7, 4, 1, 144, 2, 67, 232, 220, 51, 7, 6, 1, 144, 2, 67, 232,
- 220, 252, 51, 22, 242, 143, 7, 4, 1, 144, 2, 67, 232, 220, 252, 51, 22,
- 242, 143, 7, 6, 1, 144, 2, 67, 232, 220, 252, 51, 22, 142, 7, 4, 1, 144,
- 2, 67, 232, 220, 252, 51, 22, 142, 7, 6, 1, 222, 94, 2, 67, 232, 220, 51,
- 7, 4, 1, 222, 94, 2, 67, 232, 220, 51, 7, 6, 1, 104, 2, 231, 238, 22,
- 242, 143, 7, 4, 1, 104, 2, 231, 238, 22, 242, 143, 7, 6, 1, 116, 2, 226,
- 229, 22, 142, 7, 4, 1, 116, 2, 226, 229, 22, 142, 7, 6, 1, 116, 2, 226,
- 229, 22, 184, 7, 4, 1, 116, 2, 226, 229, 22, 184, 7, 6, 1, 160, 2, 226,
- 229, 22, 142, 7, 4, 1, 160, 2, 226, 229, 22, 142, 7, 6, 1, 160, 2, 226,
- 229, 22, 184, 7, 4, 1, 160, 2, 226, 229, 22, 184, 7, 6, 1, 160, 2, 59,
- 72, 22, 142, 7, 4, 1, 160, 2, 59, 72, 22, 142, 7, 6, 1, 160, 2, 59, 72,
- 22, 184, 7, 4, 1, 160, 2, 59, 72, 22, 184, 7, 4, 1, 240, 161, 2, 59, 72,
- 22, 242, 143, 7, 4, 1, 240, 161, 2, 59, 72, 22, 184, 7, 6, 1, 240, 161,
- 2, 226, 229, 22, 142, 7, 4, 1, 240, 161, 2, 226, 229, 22, 59, 72, 22,
- 142, 7, 6, 1, 240, 161, 2, 226, 229, 22, 184, 7, 4, 1, 240, 161, 2, 226,
- 229, 22, 59, 72, 22, 184, 7, 6, 1, 235, 151, 2, 184, 7, 4, 1, 235, 151,
- 2, 59, 72, 22, 184, 7, 6, 1, 233, 155, 2, 184, 7, 4, 1, 233, 155, 2, 184,
- 7, 6, 1, 232, 55, 2, 184, 7, 4, 1, 232, 55, 2, 184, 7, 6, 1, 223, 227, 2,
- 184, 7, 4, 1, 223, 227, 2, 184, 7, 6, 1, 104, 2, 226, 229, 22, 142, 7, 4,
- 1, 104, 2, 226, 229, 22, 142, 7, 6, 1, 104, 2, 226, 229, 22, 184, 7, 4,
- 1, 104, 2, 226, 229, 22, 184, 7, 6, 1, 104, 2, 231, 238, 22, 142, 7, 4,
- 1, 104, 2, 231, 238, 22, 142, 7, 6, 1, 104, 2, 231, 238, 22, 184, 7, 4,
- 1, 104, 2, 231, 238, 22, 184, 7, 4, 1, 254, 253, 2, 242, 143, 7, 4, 1,
- 204, 144, 2, 242, 143, 7, 4, 1, 204, 144, 2, 142, 7, 4, 1, 215, 94, 214,
- 106, 2, 242, 143, 7, 4, 1, 215, 94, 214, 106, 2, 142, 7, 4, 1, 221, 198,
- 2, 242, 143, 7, 4, 1, 221, 198, 2, 142, 7, 4, 1, 241, 58, 221, 198, 2,
- 242, 143, 7, 4, 1, 241, 58, 221, 198, 2, 142, 9, 220, 137, 77, 2, 182,
- 72, 2, 254, 179, 9, 220, 137, 77, 2, 182, 72, 2, 212, 30, 9, 220, 137,
- 77, 2, 182, 72, 2, 109, 231, 197, 9, 220, 137, 77, 2, 182, 72, 2, 226,
- 238, 9, 220, 137, 77, 2, 182, 72, 2, 69, 9, 220, 137, 77, 2, 182, 72, 2,
- 210, 212, 9, 220, 137, 77, 2, 182, 72, 2, 76, 9, 220, 137, 77, 2, 182,
- 72, 2, 254, 252, 9, 220, 137, 228, 68, 2, 234, 180, 146, 1, 234, 115, 36,
- 117, 235, 29, 36, 117, 229, 84, 36, 117, 251, 74, 36, 117, 227, 171, 36,
- 117, 215, 160, 36, 117, 228, 116, 36, 117, 217, 153, 36, 117, 230, 30,
- 36, 117, 226, 109, 36, 117, 194, 36, 117, 211, 117, 36, 117, 153, 36,
- 117, 156, 36, 117, 214, 105, 36, 117, 232, 182, 36, 117, 232, 191, 36,
- 117, 222, 182, 36, 117, 228, 98, 36, 117, 235, 150, 36, 117, 220, 106,
- 36, 117, 218, 228, 36, 117, 222, 93, 36, 117, 242, 67, 36, 117, 233, 238,
- 36, 3, 235, 16, 36, 3, 234, 98, 36, 3, 234, 89, 36, 3, 233, 223, 36, 3,
- 233, 194, 36, 3, 234, 188, 36, 3, 234, 187, 36, 3, 234, 252, 36, 3, 234,
- 34, 36, 3, 234, 16, 36, 3, 234, 201, 36, 3, 229, 81, 36, 3, 229, 32, 36,
- 3, 229, 28, 36, 3, 228, 253, 36, 3, 228, 246, 36, 3, 229, 69, 36, 3, 229,
- 67, 36, 3, 229, 78, 36, 3, 229, 9, 36, 3, 229, 4, 36, 3, 229, 71, 36, 3,
- 251, 40, 36, 3, 250, 59, 36, 3, 250, 49, 36, 3, 249, 120, 36, 3, 249, 91,
- 36, 3, 250, 198, 36, 3, 250, 190, 36, 3, 251, 30, 36, 3, 249, 246, 36, 3,
- 249, 182, 36, 3, 250, 230, 36, 3, 227, 168, 36, 3, 227, 152, 36, 3, 227,
- 147, 36, 3, 227, 132, 36, 3, 227, 125, 36, 3, 227, 160, 36, 3, 227, 159,
- 36, 3, 227, 165, 36, 3, 227, 138, 36, 3, 227, 136, 36, 3, 227, 163, 36,
- 3, 215, 156, 36, 3, 215, 136, 36, 3, 215, 135, 36, 3, 215, 124, 36, 3,
- 215, 121, 36, 3, 215, 152, 36, 3, 215, 151, 36, 3, 215, 155, 36, 3, 215,
- 134, 36, 3, 215, 133, 36, 3, 215, 154, 36, 3, 228, 114, 36, 3, 228, 100,
- 36, 3, 228, 99, 36, 3, 228, 83, 36, 3, 228, 82, 36, 3, 228, 110, 36, 3,
- 228, 109, 36, 3, 228, 113, 36, 3, 228, 85, 36, 3, 228, 84, 36, 3, 228,
- 112, 36, 3, 217, 102, 36, 3, 216, 118, 36, 3, 216, 104, 36, 3, 215, 119,
- 36, 3, 215, 85, 36, 3, 217, 23, 36, 3, 217, 12, 36, 3, 217, 80, 36, 3,
- 112, 36, 3, 216, 18, 36, 3, 217, 42, 36, 3, 229, 230, 36, 3, 228, 238,
- 36, 3, 228, 213, 36, 3, 227, 242, 36, 3, 227, 183, 36, 3, 229, 112, 36,
- 3, 229, 108, 36, 3, 229, 217, 36, 3, 228, 79, 36, 3, 228, 69, 36, 3, 229,
- 192, 36, 3, 226, 93, 36, 3, 225, 111, 36, 3, 225, 74, 36, 3, 224, 153,
- 36, 3, 224, 122, 36, 3, 225, 224, 36, 3, 225, 214, 36, 3, 226, 75, 36, 3,
- 225, 19, 36, 3, 224, 252, 36, 3, 225, 238, 36, 3, 231, 242, 36, 3, 230,
- 235, 36, 3, 230, 206, 36, 3, 230, 107, 36, 3, 230, 59, 36, 3, 231, 96,
- 36, 3, 231, 85, 36, 3, 231, 208, 36, 3, 230, 166, 36, 3, 230, 137, 36, 3,
- 231, 140, 36, 3, 211, 103, 36, 3, 211, 8, 36, 3, 210, 255, 36, 3, 210,
- 212, 36, 3, 210, 181, 36, 3, 211, 47, 36, 3, 211, 44, 36, 3, 211, 82, 36,
- 3, 210, 244, 36, 3, 210, 229, 36, 3, 211, 55, 36, 3, 223, 187, 36, 3,
- 223, 38, 36, 3, 222, 242, 36, 3, 222, 142, 36, 3, 222, 114, 36, 3, 223,
- 131, 36, 3, 223, 111, 36, 3, 223, 169, 36, 3, 222, 213, 36, 3, 222, 199,
- 36, 3, 223, 139, 36, 3, 233, 140, 36, 3, 232, 247, 36, 3, 232, 233, 36,
- 3, 232, 103, 36, 3, 232, 78, 36, 3, 233, 64, 36, 3, 233, 56, 36, 3, 233,
- 115, 36, 3, 232, 162, 36, 3, 232, 133, 36, 3, 233, 80, 36, 3, 214, 26,
- 36, 3, 213, 176, 36, 3, 213, 162, 36, 3, 212, 116, 36, 3, 212, 109, 36,
- 3, 213, 255, 36, 3, 213, 250, 36, 3, 214, 23, 36, 3, 213, 138, 36, 3,
- 213, 127, 36, 3, 214, 5, 36, 3, 232, 180, 36, 3, 232, 175, 36, 3, 232,
- 174, 36, 3, 232, 171, 36, 3, 232, 170, 36, 3, 232, 177, 36, 3, 232, 176,
- 36, 3, 232, 179, 36, 3, 232, 173, 36, 3, 232, 172, 36, 3, 232, 178, 36,
- 3, 232, 189, 36, 3, 232, 184, 36, 3, 232, 183, 36, 3, 232, 167, 36, 3,
- 232, 166, 36, 3, 232, 186, 36, 3, 232, 185, 36, 3, 232, 188, 36, 3, 232,
- 169, 36, 3, 232, 168, 36, 3, 232, 187, 36, 3, 222, 180, 36, 3, 222, 169,
- 36, 3, 222, 168, 36, 3, 222, 162, 36, 3, 222, 155, 36, 3, 222, 176, 36,
- 3, 222, 175, 36, 3, 222, 179, 36, 3, 222, 167, 36, 3, 222, 166, 36, 3,
- 222, 178, 36, 3, 228, 96, 36, 3, 228, 91, 36, 3, 228, 90, 36, 3, 228, 87,
- 36, 3, 228, 86, 36, 3, 228, 93, 36, 3, 228, 92, 36, 3, 228, 95, 36, 3,
- 228, 89, 36, 3, 228, 88, 36, 3, 228, 94, 36, 3, 235, 146, 36, 3, 235,
- 114, 36, 3, 235, 107, 36, 3, 235, 57, 36, 3, 235, 39, 36, 3, 235, 132,
- 36, 3, 235, 130, 36, 3, 235, 141, 36, 3, 235, 74, 36, 3, 235, 65, 36, 3,
- 235, 135, 36, 3, 220, 100, 36, 3, 220, 34, 36, 3, 220, 29, 36, 3, 219,
- 227, 36, 3, 219, 212, 36, 3, 220, 65, 36, 3, 220, 63, 36, 3, 220, 92, 36,
- 3, 220, 9, 36, 3, 220, 3, 36, 3, 220, 73, 36, 3, 218, 224, 36, 3, 218,
- 194, 36, 3, 218, 190, 36, 3, 218, 181, 36, 3, 218, 178, 36, 3, 218, 199,
- 36, 3, 218, 198, 36, 3, 218, 223, 36, 3, 218, 186, 36, 3, 218, 185, 36,
- 3, 218, 201, 36, 3, 222, 33, 36, 3, 219, 193, 36, 3, 219, 177, 36, 3,
- 218, 84, 36, 3, 218, 5, 36, 3, 221, 183, 36, 3, 221, 172, 36, 3, 222, 19,
- 36, 3, 219, 60, 36, 3, 219, 42, 36, 3, 221, 221, 36, 3, 242, 53, 36, 3,
- 241, 187, 36, 3, 241, 168, 36, 3, 240, 229, 36, 3, 240, 209, 36, 3, 241,
- 245, 36, 3, 241, 227, 36, 3, 242, 43, 36, 3, 241, 75, 36, 3, 241, 60, 36,
- 3, 241, 253, 36, 3, 233, 237, 36, 3, 233, 236, 36, 3, 233, 231, 36, 3,
- 233, 230, 36, 3, 233, 227, 36, 3, 233, 226, 36, 3, 233, 233, 36, 3, 233,
- 232, 36, 3, 233, 235, 36, 3, 233, 229, 36, 3, 233, 228, 36, 3, 233, 234,
- 36, 3, 219, 233, 175, 117, 5, 211, 68, 175, 117, 5, 223, 158, 175, 117,
- 5, 223, 81, 98, 1, 215, 28, 70, 117, 5, 249, 241, 176, 70, 117, 5, 249,
- 241, 234, 138, 70, 117, 5, 249, 241, 234, 34, 70, 117, 5, 249, 241, 234,
- 111, 70, 117, 5, 249, 241, 229, 9, 70, 117, 5, 249, 241, 251, 41, 70,
- 117, 5, 249, 241, 250, 165, 70, 117, 5, 249, 241, 249, 246, 70, 117, 5,
- 249, 241, 250, 94, 70, 117, 5, 249, 241, 227, 138, 70, 117, 5, 249, 241,
- 248, 229, 70, 117, 5, 249, 241, 215, 145, 70, 117, 5, 249, 241, 247, 153,
- 70, 117, 5, 249, 241, 215, 140, 70, 117, 5, 249, 241, 198, 70, 117, 5,
- 249, 241, 217, 106, 70, 117, 5, 249, 241, 216, 209, 70, 117, 5, 249, 241,
- 112, 70, 117, 5, 249, 241, 216, 157, 70, 117, 5, 249, 241, 228, 79, 70,
- 117, 5, 249, 241, 252, 199, 70, 117, 5, 249, 241, 225, 150, 70, 117, 5,
- 249, 241, 225, 19, 70, 117, 5, 249, 241, 225, 124, 70, 117, 5, 249, 241,
- 230, 166, 70, 117, 5, 249, 241, 210, 244, 70, 117, 5, 249, 241, 222, 213,
- 70, 117, 5, 249, 241, 232, 162, 70, 117, 5, 249, 241, 213, 138, 70, 117,
- 5, 249, 241, 220, 104, 70, 117, 5, 249, 241, 218, 225, 70, 117, 5, 249,
- 241, 206, 70, 117, 5, 249, 241, 162, 70, 117, 5, 249, 241, 233, 141, 70,
- 25, 5, 249, 241, 224, 91, 70, 235, 250, 25, 5, 249, 241, 224, 33, 70,
- 235, 250, 25, 5, 249, 241, 222, 102, 70, 235, 250, 25, 5, 249, 241, 222,
- 95, 70, 235, 250, 25, 5, 249, 241, 224, 72, 70, 25, 5, 226, 208, 70, 25,
- 5, 255, 43, 141, 1, 252, 7, 229, 82, 141, 1, 252, 7, 229, 32, 141, 1,
- 252, 7, 228, 253, 141, 1, 252, 7, 229, 69, 141, 1, 252, 7, 229, 9, 56, 1,
- 252, 7, 229, 82, 56, 1, 252, 7, 229, 32, 56, 1, 252, 7, 228, 253, 56, 1,
- 252, 7, 229, 69, 56, 1, 252, 7, 229, 9, 56, 1, 254, 203, 250, 198, 56, 1,
- 254, 203, 215, 119, 56, 1, 254, 203, 112, 56, 1, 254, 203, 226, 109, 58,
- 1, 245, 28, 245, 27, 249, 190, 138, 130, 58, 1, 245, 27, 245, 28, 249,
- 190, 138, 130,
+ 0, 211, 228, 240, 212, 82, 217, 31, 82, 42, 54, 243, 97, 54, 218, 246,
+ 54, 250, 235, 250, 160, 49, 219, 76, 50, 219, 76, 250, 59, 91, 54, 245,
+ 233, 235, 219, 239, 102, 211, 61, 212, 0, 17, 202, 84, 17, 105, 17, 108,
+ 17, 147, 17, 149, 17, 170, 17, 195, 17, 213, 111, 17, 199, 17, 222, 63,
+ 245, 242, 213, 143, 227, 179, 54, 241, 35, 54, 237, 247, 54, 217, 47, 82,
+ 245, 231, 250, 49, 8, 6, 1, 63, 8, 6, 1, 249, 255, 8, 6, 1, 247, 125, 8,
+ 6, 1, 245, 51, 8, 6, 1, 74, 8, 6, 1, 240, 174, 8, 6, 1, 239, 75, 8, 6, 1,
+ 237, 171, 8, 6, 1, 75, 8, 6, 1, 230, 184, 8, 6, 1, 230, 54, 8, 6, 1, 159,
+ 8, 6, 1, 226, 185, 8, 6, 1, 223, 163, 8, 6, 1, 78, 8, 6, 1, 219, 184, 8,
+ 6, 1, 217, 134, 8, 6, 1, 146, 8, 6, 1, 194, 8, 6, 1, 210, 69, 8, 6, 1,
+ 68, 8, 6, 1, 206, 164, 8, 6, 1, 204, 144, 8, 6, 1, 203, 196, 8, 6, 1,
+ 203, 124, 8, 6, 1, 202, 159, 49, 51, 155, 216, 74, 212, 0, 50, 51, 155,
+ 246, 53, 251, 138, 124, 227, 114, 237, 254, 251, 138, 8, 5, 1, 63, 8, 5,
+ 1, 249, 255, 8, 5, 1, 247, 125, 8, 5, 1, 245, 51, 8, 5, 1, 74, 8, 5, 1,
+ 240, 174, 8, 5, 1, 239, 75, 8, 5, 1, 237, 171, 8, 5, 1, 75, 8, 5, 1, 230,
+ 184, 8, 5, 1, 230, 54, 8, 5, 1, 159, 8, 5, 1, 226, 185, 8, 5, 1, 223,
+ 163, 8, 5, 1, 78, 8, 5, 1, 219, 184, 8, 5, 1, 217, 134, 8, 5, 1, 146, 8,
+ 5, 1, 194, 8, 5, 1, 210, 69, 8, 5, 1, 68, 8, 5, 1, 206, 164, 8, 5, 1,
+ 204, 144, 8, 5, 1, 203, 196, 8, 5, 1, 203, 124, 8, 5, 1, 202, 159, 49,
+ 245, 93, 155, 80, 227, 114, 50, 245, 93, 155, 208, 227, 221, 190, 211,
+ 228, 230, 239, 240, 212, 82, 246, 220, 54, 218, 20, 54, 245, 92, 54, 203,
+ 43, 54, 247, 203, 142, 214, 168, 54, 243, 231, 245, 169, 54, 240, 41,
+ 219, 240, 231, 31, 227, 217, 52, 250, 218, 217, 31, 82, 221, 166, 54,
+ 212, 7, 235, 220, 216, 129, 54, 225, 170, 244, 55, 54, 218, 75, 54, 210,
+ 199, 108, 210, 199, 147, 251, 126, 251, 138, 224, 153, 54, 218, 126, 54,
+ 101, 243, 85, 246, 231, 210, 199, 105, 225, 80, 219, 240, 231, 31, 216,
+ 11, 52, 250, 218, 217, 31, 82, 204, 161, 239, 138, 118, 217, 55, 204,
+ 161, 239, 138, 118, 237, 137, 204, 161, 239, 138, 126, 217, 53, 230, 239,
+ 217, 47, 82, 8, 6, 1, 34, 3, 237, 253, 8, 6, 1, 34, 3, 165, 8, 6, 1, 34,
+ 3, 246, 52, 8, 6, 1, 34, 3, 208, 227, 8, 6, 1, 34, 3, 243, 231, 8, 6, 1,
+ 34, 3, 215, 253, 55, 8, 6, 1, 251, 109, 8, 6, 1, 247, 126, 3, 246, 231,
+ 8, 6, 1, 188, 3, 237, 253, 8, 6, 1, 188, 3, 165, 8, 6, 1, 188, 3, 246,
+ 52, 8, 6, 1, 188, 3, 243, 231, 8, 6, 1, 235, 206, 3, 237, 253, 8, 6, 1,
+ 235, 206, 3, 165, 8, 6, 1, 235, 206, 3, 246, 52, 8, 6, 1, 235, 206, 3,
+ 243, 231, 8, 6, 1, 240, 243, 8, 6, 1, 223, 164, 3, 208, 227, 8, 6, 1,
+ 158, 3, 237, 253, 8, 6, 1, 158, 3, 165, 8, 6, 1, 158, 3, 246, 52, 8, 6,
+ 1, 158, 3, 208, 227, 8, 6, 1, 158, 3, 243, 231, 223, 224, 54, 8, 6, 1,
+ 158, 3, 95, 8, 6, 1, 106, 3, 237, 253, 8, 6, 1, 106, 3, 165, 8, 6, 1,
+ 106, 3, 246, 52, 8, 6, 1, 106, 3, 243, 231, 8, 6, 1, 203, 125, 3, 165, 8,
+ 6, 1, 209, 40, 8, 5, 1, 213, 57, 194, 8, 5, 1, 34, 3, 237, 253, 8, 5, 1,
+ 34, 3, 165, 8, 5, 1, 34, 3, 246, 52, 8, 5, 1, 34, 3, 208, 227, 8, 5, 1,
+ 34, 3, 243, 231, 8, 5, 1, 34, 3, 215, 253, 55, 8, 5, 1, 251, 109, 8, 5,
+ 1, 247, 126, 3, 246, 231, 8, 5, 1, 188, 3, 237, 253, 8, 5, 1, 188, 3,
+ 165, 8, 5, 1, 188, 3, 246, 52, 8, 5, 1, 188, 3, 243, 231, 8, 5, 1, 235,
+ 206, 3, 237, 253, 8, 5, 1, 235, 206, 3, 165, 8, 5, 1, 235, 206, 3, 246,
+ 52, 8, 5, 1, 235, 206, 3, 243, 231, 8, 5, 1, 240, 243, 8, 5, 1, 223, 164,
+ 3, 208, 227, 8, 5, 1, 158, 3, 237, 253, 8, 5, 1, 158, 3, 165, 8, 5, 1,
+ 158, 3, 246, 52, 8, 5, 1, 158, 3, 208, 227, 8, 5, 1, 158, 3, 243, 231,
+ 243, 137, 54, 8, 5, 1, 158, 3, 95, 8, 5, 1, 106, 3, 237, 253, 8, 5, 1,
+ 106, 3, 165, 8, 5, 1, 106, 3, 246, 52, 8, 5, 1, 106, 3, 243, 231, 8, 5,
+ 1, 203, 125, 3, 165, 8, 5, 1, 209, 40, 8, 5, 1, 203, 125, 3, 243, 231, 8,
+ 6, 1, 34, 3, 225, 170, 8, 5, 1, 34, 3, 225, 170, 8, 6, 1, 34, 3, 247,
+ 214, 8, 5, 1, 34, 3, 247, 214, 8, 6, 1, 34, 3, 220, 62, 8, 5, 1, 34, 3,
+ 220, 62, 8, 6, 1, 247, 126, 3, 165, 8, 5, 1, 247, 126, 3, 165, 8, 6, 1,
+ 247, 126, 3, 246, 52, 8, 5, 1, 247, 126, 3, 246, 52, 8, 6, 1, 247, 126,
+ 3, 70, 55, 8, 5, 1, 247, 126, 3, 70, 55, 8, 6, 1, 247, 126, 3, 247, 29,
+ 8, 5, 1, 247, 126, 3, 247, 29, 8, 6, 1, 245, 52, 3, 247, 29, 8, 5, 1,
+ 245, 52, 3, 247, 29, 8, 6, 1, 245, 52, 3, 95, 8, 5, 1, 245, 52, 3, 95, 8,
+ 6, 1, 188, 3, 225, 170, 8, 5, 1, 188, 3, 225, 170, 8, 6, 1, 188, 3, 247,
+ 214, 8, 5, 1, 188, 3, 247, 214, 8, 6, 1, 188, 3, 70, 55, 8, 5, 1, 188, 3,
+ 70, 55, 8, 6, 1, 188, 3, 220, 62, 8, 5, 1, 188, 3, 220, 62, 8, 6, 1, 188,
+ 3, 247, 29, 8, 5, 1, 188, 3, 247, 29, 8, 6, 1, 239, 76, 3, 246, 52, 8, 5,
+ 1, 239, 76, 3, 246, 52, 8, 6, 1, 239, 76, 3, 247, 214, 8, 5, 1, 239, 76,
+ 3, 247, 214, 8, 6, 1, 239, 76, 3, 70, 55, 8, 5, 1, 239, 76, 3, 70, 55, 8,
+ 6, 1, 239, 76, 3, 246, 231, 8, 5, 1, 239, 76, 3, 246, 231, 8, 6, 1, 237,
+ 172, 3, 246, 52, 8, 5, 1, 237, 172, 3, 246, 52, 8, 6, 1, 237, 172, 3, 95,
+ 8, 5, 1, 237, 172, 3, 95, 8, 6, 1, 235, 206, 3, 208, 227, 8, 5, 1, 235,
+ 206, 3, 208, 227, 8, 6, 1, 235, 206, 3, 225, 170, 8, 5, 1, 235, 206, 3,
+ 225, 170, 8, 6, 1, 235, 206, 3, 247, 214, 8, 5, 1, 235, 206, 3, 247, 214,
+ 8, 6, 1, 235, 206, 3, 220, 62, 8, 5, 1, 235, 206, 3, 220, 62, 8, 6, 1,
+ 235, 206, 3, 70, 55, 8, 5, 1, 243, 84, 75, 8, 6, 32, 231, 81, 8, 5, 32,
+ 231, 81, 8, 6, 1, 230, 185, 3, 246, 52, 8, 5, 1, 230, 185, 3, 246, 52, 8,
+ 6, 1, 230, 55, 3, 246, 231, 8, 5, 1, 230, 55, 3, 246, 231, 8, 5, 1, 228,
+ 231, 8, 6, 1, 228, 131, 3, 165, 8, 5, 1, 228, 131, 3, 165, 8, 6, 1, 228,
+ 131, 3, 246, 231, 8, 5, 1, 228, 131, 3, 246, 231, 8, 6, 1, 228, 131, 3,
+ 247, 29, 8, 5, 1, 228, 131, 3, 247, 29, 8, 6, 1, 228, 131, 3, 101, 243,
+ 85, 8, 5, 1, 228, 131, 3, 101, 243, 85, 8, 6, 1, 228, 131, 3, 95, 8, 5,
+ 1, 228, 131, 3, 95, 8, 6, 1, 223, 164, 3, 165, 8, 5, 1, 223, 164, 3, 165,
+ 8, 6, 1, 223, 164, 3, 246, 231, 8, 5, 1, 223, 164, 3, 246, 231, 8, 6, 1,
+ 223, 164, 3, 247, 29, 8, 5, 1, 223, 164, 3, 247, 29, 8, 5, 1, 223, 164,
+ 217, 251, 247, 137, 250, 160, 8, 6, 1, 241, 78, 8, 5, 1, 241, 78, 8, 6,
+ 1, 158, 3, 225, 170, 8, 5, 1, 158, 3, 225, 170, 8, 6, 1, 158, 3, 247,
+ 214, 8, 5, 1, 158, 3, 247, 214, 8, 6, 1, 158, 3, 52, 165, 8, 5, 1, 158,
+ 3, 52, 165, 8, 6, 32, 220, 73, 8, 5, 32, 220, 73, 8, 6, 1, 217, 1, 3,
+ 165, 8, 5, 1, 217, 1, 3, 165, 8, 6, 1, 217, 1, 3, 246, 231, 8, 5, 1, 217,
+ 1, 3, 246, 231, 8, 6, 1, 217, 1, 3, 247, 29, 8, 5, 1, 217, 1, 3, 247, 29,
+ 8, 6, 1, 215, 94, 3, 165, 8, 5, 1, 215, 94, 3, 165, 8, 6, 1, 215, 94, 3,
+ 246, 52, 8, 5, 1, 215, 94, 3, 246, 52, 8, 6, 1, 215, 94, 3, 246, 231, 8,
+ 5, 1, 215, 94, 3, 246, 231, 8, 6, 1, 215, 94, 3, 247, 29, 8, 5, 1, 215,
+ 94, 3, 247, 29, 8, 6, 1, 210, 70, 3, 246, 231, 8, 5, 1, 210, 70, 3, 246,
+ 231, 8, 6, 1, 210, 70, 3, 247, 29, 8, 5, 1, 210, 70, 3, 247, 29, 8, 6, 1,
+ 210, 70, 3, 95, 8, 5, 1, 210, 70, 3, 95, 8, 6, 1, 106, 3, 208, 227, 8, 5,
+ 1, 106, 3, 208, 227, 8, 6, 1, 106, 3, 225, 170, 8, 5, 1, 106, 3, 225,
+ 170, 8, 6, 1, 106, 3, 247, 214, 8, 5, 1, 106, 3, 247, 214, 8, 6, 1, 106,
+ 3, 215, 253, 55, 8, 5, 1, 106, 3, 215, 253, 55, 8, 6, 1, 106, 3, 52, 165,
+ 8, 5, 1, 106, 3, 52, 165, 8, 6, 1, 106, 3, 220, 62, 8, 5, 1, 106, 3, 220,
+ 62, 8, 6, 1, 204, 145, 3, 246, 52, 8, 5, 1, 204, 145, 3, 246, 52, 8, 6,
+ 1, 203, 125, 3, 246, 52, 8, 5, 1, 203, 125, 3, 246, 52, 8, 6, 1, 203,
+ 125, 3, 243, 231, 8, 6, 1, 202, 160, 3, 165, 8, 5, 1, 202, 160, 3, 165,
+ 8, 6, 1, 202, 160, 3, 70, 55, 8, 5, 1, 202, 160, 3, 70, 55, 8, 6, 1, 202,
+ 160, 3, 247, 29, 8, 5, 1, 202, 160, 3, 247, 29, 8, 5, 1, 163, 194, 8, 5,
+ 1, 66, 3, 95, 8, 6, 1, 66, 3, 113, 8, 6, 1, 66, 3, 208, 142, 8, 5, 1, 66,
+ 3, 208, 142, 8, 6, 1, 143, 195, 8, 5, 1, 143, 195, 8, 6, 1, 171, 78, 8,
+ 6, 1, 247, 126, 3, 113, 8, 5, 1, 247, 126, 3, 113, 8, 6, 1, 251, 84, 245,
+ 51, 8, 6, 1, 245, 52, 3, 113, 8, 6, 1, 245, 52, 3, 208, 142, 8, 5, 1,
+ 245, 52, 3, 208, 142, 8, 5, 1, 207, 174, 244, 37, 8, 6, 1, 216, 73, 74,
+ 8, 6, 1, 214, 192, 8, 6, 1, 171, 74, 8, 6, 1, 240, 175, 3, 113, 8, 5, 1,
+ 240, 175, 3, 113, 8, 6, 1, 239, 76, 3, 113, 8, 6, 1, 238, 235, 8, 5, 1,
+ 235, 255, 8, 6, 1, 230, 230, 8, 6, 1, 235, 206, 3, 95, 8, 6, 1, 230, 55,
+ 3, 113, 8, 5, 1, 230, 55, 3, 113, 8, 5, 1, 228, 131, 3, 142, 8, 5, 1,
+ 228, 26, 3, 95, 8, 6, 1, 207, 174, 226, 185, 8, 6, 1, 223, 164, 3, 49,
+ 113, 8, 5, 1, 223, 164, 3, 163, 50, 227, 210, 8, 6, 1, 158, 3, 101, 208,
+ 227, 8, 6, 1, 158, 3, 236, 53, 8, 5, 1, 158, 3, 236, 53, 8, 6, 1, 220,
+ 57, 8, 5, 1, 220, 57, 8, 6, 1, 219, 185, 3, 113, 8, 5, 1, 219, 185, 3,
+ 113, 8, 1, 202, 216, 8, 6, 1, 143, 108, 8, 5, 1, 143, 108, 8, 6, 1, 241,
+ 7, 8, 1, 216, 73, 241, 8, 227, 14, 8, 5, 1, 210, 70, 3, 219, 142, 113, 8,
+ 6, 1, 210, 70, 3, 113, 8, 5, 1, 210, 70, 3, 113, 8, 6, 1, 210, 70, 3,
+ 216, 79, 113, 8, 6, 1, 106, 3, 236, 53, 8, 5, 1, 106, 3, 236, 53, 8, 6,
+ 1, 206, 216, 8, 6, 1, 206, 165, 3, 113, 8, 6, 1, 203, 125, 3, 113, 8, 5,
+ 1, 203, 125, 3, 113, 8, 6, 1, 202, 160, 3, 95, 8, 5, 1, 202, 160, 3, 95,
+ 8, 6, 1, 240, 177, 8, 6, 1, 240, 178, 216, 72, 8, 5, 1, 240, 178, 216,
+ 72, 8, 5, 1, 240, 178, 3, 209, 248, 8, 1, 120, 3, 95, 8, 6, 1, 143, 170,
+ 8, 5, 1, 143, 170, 8, 1, 230, 239, 238, 45, 211, 62, 3, 95, 8, 1, 203,
+ 199, 8, 1, 244, 30, 246, 27, 8, 1, 227, 254, 246, 27, 8, 1, 250, 248,
+ 246, 27, 8, 1, 216, 79, 246, 27, 8, 6, 1, 242, 1, 3, 247, 29, 8, 6, 1,
+ 245, 52, 3, 5, 1, 202, 160, 3, 247, 29, 8, 5, 1, 242, 1, 3, 247, 29, 8,
+ 6, 1, 227, 81, 8, 6, 1, 228, 131, 3, 5, 1, 230, 184, 8, 5, 1, 227, 81, 8,
+ 6, 1, 222, 49, 8, 6, 1, 223, 164, 3, 5, 1, 230, 184, 8, 5, 1, 222, 49, 8,
+ 6, 1, 34, 3, 247, 29, 8, 5, 1, 34, 3, 247, 29, 8, 6, 1, 235, 206, 3, 247,
+ 29, 8, 5, 1, 235, 206, 3, 247, 29, 8, 6, 1, 158, 3, 247, 29, 8, 5, 1,
+ 158, 3, 247, 29, 8, 6, 1, 106, 3, 247, 29, 8, 5, 1, 106, 3, 247, 29, 8,
+ 6, 1, 106, 3, 243, 232, 25, 225, 170, 8, 5, 1, 106, 3, 243, 232, 25, 225,
+ 170, 8, 6, 1, 106, 3, 243, 232, 25, 165, 8, 5, 1, 106, 3, 243, 232, 25,
+ 165, 8, 6, 1, 106, 3, 243, 232, 25, 247, 29, 8, 5, 1, 106, 3, 243, 232,
+ 25, 247, 29, 8, 6, 1, 106, 3, 243, 232, 25, 237, 253, 8, 5, 1, 106, 3,
+ 243, 232, 25, 237, 253, 8, 5, 1, 207, 174, 74, 8, 6, 1, 34, 3, 243, 232,
+ 25, 225, 170, 8, 5, 1, 34, 3, 243, 232, 25, 225, 170, 8, 6, 1, 34, 3, 70,
+ 87, 25, 225, 170, 8, 5, 1, 34, 3, 70, 87, 25, 225, 170, 8, 6, 1, 251,
+ 110, 3, 225, 170, 8, 5, 1, 251, 110, 3, 225, 170, 8, 6, 1, 239, 76, 3,
+ 95, 8, 5, 1, 239, 76, 3, 95, 8, 6, 1, 239, 76, 3, 247, 29, 8, 5, 1, 239,
+ 76, 3, 247, 29, 8, 6, 1, 230, 55, 3, 247, 29, 8, 5, 1, 230, 55, 3, 247,
+ 29, 8, 6, 1, 158, 3, 220, 62, 8, 5, 1, 158, 3, 220, 62, 8, 6, 1, 158, 3,
+ 220, 63, 25, 225, 170, 8, 5, 1, 158, 3, 220, 63, 25, 225, 170, 8, 6, 1,
+ 240, 178, 3, 247, 29, 8, 5, 1, 240, 178, 3, 247, 29, 8, 5, 1, 230, 185,
+ 3, 247, 29, 8, 6, 1, 242, 0, 8, 6, 1, 245, 52, 3, 5, 1, 202, 159, 8, 5,
+ 1, 242, 0, 8, 6, 1, 239, 76, 3, 165, 8, 5, 1, 239, 76, 3, 165, 8, 6, 1,
+ 235, 252, 8, 6, 1, 203, 199, 8, 6, 1, 223, 164, 3, 237, 253, 8, 5, 1,
+ 223, 164, 3, 237, 253, 8, 6, 1, 34, 3, 215, 253, 87, 25, 165, 8, 5, 1,
+ 34, 3, 215, 253, 87, 25, 165, 8, 6, 1, 251, 110, 3, 165, 8, 5, 1, 251,
+ 110, 3, 165, 8, 6, 1, 158, 3, 211, 32, 25, 165, 8, 5, 1, 158, 3, 211, 32,
+ 25, 165, 8, 6, 1, 34, 3, 52, 237, 253, 8, 5, 1, 34, 3, 52, 237, 253, 8,
+ 6, 1, 34, 3, 230, 239, 247, 214, 8, 5, 1, 34, 3, 230, 239, 247, 214, 8,
+ 6, 1, 188, 3, 52, 237, 253, 8, 5, 1, 188, 3, 52, 237, 253, 8, 6, 1, 188,
+ 3, 230, 239, 247, 214, 8, 5, 1, 188, 3, 230, 239, 247, 214, 8, 6, 1, 235,
+ 206, 3, 52, 237, 253, 8, 5, 1, 235, 206, 3, 52, 237, 253, 8, 6, 1, 235,
+ 206, 3, 230, 239, 247, 214, 8, 5, 1, 235, 206, 3, 230, 239, 247, 214, 8,
+ 6, 1, 158, 3, 52, 237, 253, 8, 5, 1, 158, 3, 52, 237, 253, 8, 6, 1, 158,
+ 3, 230, 239, 247, 214, 8, 5, 1, 158, 3, 230, 239, 247, 214, 8, 6, 1, 217,
+ 1, 3, 52, 237, 253, 8, 5, 1, 217, 1, 3, 52, 237, 253, 8, 6, 1, 217, 1, 3,
+ 230, 239, 247, 214, 8, 5, 1, 217, 1, 3, 230, 239, 247, 214, 8, 6, 1, 106,
+ 3, 52, 237, 253, 8, 5, 1, 106, 3, 52, 237, 253, 8, 6, 1, 106, 3, 230,
+ 239, 247, 214, 8, 5, 1, 106, 3, 230, 239, 247, 214, 8, 6, 1, 215, 94, 3,
+ 245, 234, 56, 8, 5, 1, 215, 94, 3, 245, 234, 56, 8, 6, 1, 210, 70, 3,
+ 245, 234, 56, 8, 5, 1, 210, 70, 3, 245, 234, 56, 8, 6, 1, 202, 234, 8, 5,
+ 1, 202, 234, 8, 6, 1, 237, 172, 3, 247, 29, 8, 5, 1, 237, 172, 3, 247,
+ 29, 8, 6, 1, 223, 164, 3, 163, 50, 227, 210, 8, 5, 1, 245, 52, 3, 245,
+ 95, 8, 6, 1, 219, 216, 8, 5, 1, 219, 216, 8, 6, 1, 202, 160, 3, 113, 8,
+ 5, 1, 202, 160, 3, 113, 8, 6, 1, 34, 3, 70, 55, 8, 5, 1, 34, 3, 70, 55,
+ 8, 6, 1, 188, 3, 246, 231, 8, 5, 1, 188, 3, 246, 231, 8, 6, 1, 158, 3,
+ 243, 232, 25, 225, 170, 8, 5, 1, 158, 3, 243, 232, 25, 225, 170, 8, 6, 1,
+ 158, 3, 208, 228, 25, 225, 170, 8, 5, 1, 158, 3, 208, 228, 25, 225, 170,
+ 8, 6, 1, 158, 3, 70, 55, 8, 5, 1, 158, 3, 70, 55, 8, 6, 1, 158, 3, 70,
+ 87, 25, 225, 170, 8, 5, 1, 158, 3, 70, 87, 25, 225, 170, 8, 6, 1, 203,
+ 125, 3, 225, 170, 8, 5, 1, 203, 125, 3, 225, 170, 8, 5, 1, 228, 131, 3,
+ 245, 95, 8, 5, 1, 223, 164, 3, 245, 95, 8, 5, 1, 210, 70, 3, 245, 95, 8,
+ 5, 1, 243, 84, 230, 184, 8, 5, 1, 244, 130, 243, 191, 8, 5, 1, 217, 66,
+ 243, 191, 8, 6, 1, 34, 3, 95, 8, 6, 1, 247, 126, 3, 95, 8, 5, 1, 247,
+ 126, 3, 95, 8, 6, 1, 228, 131, 3, 142, 8, 6, 1, 210, 70, 3, 243, 228, 95,
+ 8, 5, 1, 215, 94, 3, 210, 169, 209, 248, 8, 5, 1, 202, 160, 3, 210, 169,
+ 209, 248, 8, 6, 1, 238, 45, 211, 61, 8, 5, 1, 238, 45, 211, 61, 8, 6, 1,
+ 66, 3, 95, 8, 6, 1, 106, 142, 8, 6, 1, 207, 174, 206, 164, 8, 6, 1, 188,
+ 3, 95, 8, 5, 1, 188, 3, 95, 8, 6, 1, 230, 185, 3, 95, 8, 5, 1, 230, 185,
+ 3, 95, 8, 6, 1, 5, 217, 135, 3, 236, 116, 209, 248, 8, 5, 1, 217, 135, 3,
+ 236, 116, 209, 248, 8, 6, 1, 217, 1, 3, 95, 8, 5, 1, 217, 1, 3, 95, 8, 6,
+ 1, 203, 125, 3, 95, 8, 5, 1, 203, 125, 3, 95, 8, 5, 1, 207, 174, 63, 8,
+ 5, 1, 251, 2, 8, 5, 1, 207, 174, 251, 2, 8, 5, 1, 66, 3, 113, 8, 5, 1,
+ 171, 78, 8, 5, 1, 247, 126, 3, 245, 95, 8, 5, 1, 245, 52, 3, 209, 248, 8,
+ 5, 1, 245, 52, 3, 113, 8, 5, 1, 216, 73, 74, 8, 5, 1, 214, 192, 8, 5, 1,
+ 214, 193, 3, 113, 8, 5, 1, 171, 74, 8, 5, 1, 216, 73, 171, 74, 8, 5, 1,
+ 216, 73, 171, 188, 3, 113, 8, 5, 1, 246, 16, 216, 73, 171, 74, 8, 5, 1,
+ 243, 84, 230, 185, 3, 95, 8, 5, 1, 239, 76, 3, 113, 8, 5, 1, 132, 239,
+ 75, 8, 1, 5, 6, 239, 75, 8, 5, 1, 238, 235, 8, 5, 1, 216, 182, 236, 53,
+ 8, 5, 1, 207, 174, 237, 171, 8, 5, 1, 237, 172, 3, 113, 8, 5, 1, 237, 32,
+ 3, 113, 8, 5, 1, 235, 206, 3, 95, 8, 5, 1, 230, 230, 8, 1, 5, 6, 75, 8,
+ 5, 1, 228, 131, 3, 101, 208, 227, 8, 5, 1, 228, 131, 3, 248, 124, 8, 5,
+ 1, 228, 131, 3, 216, 79, 113, 8, 5, 1, 227, 164, 8, 5, 1, 207, 174, 226,
+ 185, 8, 5, 1, 207, 174, 226, 186, 3, 163, 227, 210, 8, 5, 1, 226, 186, 3,
+ 113, 8, 5, 1, 223, 164, 3, 49, 113, 8, 5, 1, 223, 164, 3, 216, 79, 113,
+ 8, 1, 5, 6, 223, 163, 8, 5, 1, 248, 225, 78, 8, 1, 5, 6, 220, 73, 8, 5,
+ 1, 246, 16, 220, 36, 8, 5, 1, 218, 192, 8, 5, 1, 207, 174, 146, 8, 5, 1,
+ 207, 174, 217, 1, 3, 163, 227, 210, 8, 5, 1, 207, 174, 217, 1, 3, 113, 8,
+ 5, 1, 217, 1, 3, 163, 227, 210, 8, 5, 1, 217, 1, 3, 209, 248, 8, 5, 1,
+ 217, 1, 3, 239, 240, 8, 5, 1, 216, 73, 217, 1, 3, 239, 240, 8, 1, 5, 6,
+ 146, 8, 1, 5, 6, 230, 239, 146, 8, 5, 1, 215, 94, 3, 113, 8, 5, 1, 241,
+ 7, 8, 5, 1, 243, 84, 230, 185, 3, 211, 32, 25, 113, 8, 5, 1, 211, 174,
+ 216, 73, 241, 7, 8, 5, 1, 241, 8, 3, 245, 95, 8, 5, 1, 207, 174, 210, 69,
+ 8, 5, 1, 210, 70, 3, 216, 79, 113, 8, 5, 1, 106, 142, 8, 5, 1, 206, 216,
+ 8, 5, 1, 206, 165, 3, 113, 8, 5, 1, 207, 174, 206, 164, 8, 5, 1, 207,
+ 174, 204, 144, 8, 5, 1, 207, 174, 203, 124, 8, 1, 5, 6, 203, 124, 8, 5,
+ 1, 202, 160, 3, 216, 79, 113, 8, 5, 1, 202, 160, 3, 245, 95, 8, 5, 1,
+ 240, 177, 8, 5, 1, 240, 178, 3, 245, 95, 8, 1, 238, 45, 211, 61, 8, 1,
+ 218, 199, 205, 186, 239, 126, 8, 1, 230, 239, 238, 45, 211, 61, 8, 1,
+ 211, 40, 247, 125, 8, 1, 248, 70, 246, 27, 8, 1, 5, 6, 249, 255, 8, 5, 1,
+ 246, 16, 171, 74, 8, 1, 5, 6, 239, 76, 3, 113, 8, 1, 5, 6, 237, 171, 8,
+ 5, 1, 230, 185, 3, 245, 126, 8, 5, 1, 207, 174, 230, 54, 8, 1, 5, 6, 159,
+ 8, 5, 1, 217, 135, 3, 113, 8, 1, 238, 45, 211, 62, 3, 95, 8, 1, 216, 73,
+ 238, 45, 211, 62, 3, 95, 8, 5, 1, 242, 1, 243, 191, 8, 5, 1, 244, 3, 243,
+ 191, 8, 5, 1, 242, 1, 243, 192, 3, 245, 95, 8, 5, 1, 208, 22, 243, 191,
+ 8, 5, 1, 209, 137, 243, 191, 8, 5, 1, 209, 194, 243, 192, 3, 245, 95, 8,
+ 5, 1, 240, 39, 243, 191, 8, 5, 1, 226, 241, 243, 191, 8, 5, 1, 226, 187,
+ 243, 191, 8, 1, 248, 70, 218, 245, 8, 1, 248, 78, 218, 245, 8, 5, 1, 207,
+ 174, 237, 172, 3, 239, 240, 8, 5, 1, 207, 174, 237, 172, 3, 239, 241, 25,
+ 209, 248, 65, 1, 5, 237, 171, 65, 1, 5, 237, 172, 3, 113, 65, 1, 5, 230,
+ 184, 65, 1, 5, 146, 65, 1, 5, 207, 174, 146, 65, 1, 5, 207, 174, 217, 1,
+ 3, 113, 65, 1, 5, 6, 230, 239, 146, 65, 1, 5, 204, 144, 65, 1, 5, 203,
+ 124, 65, 1, 217, 236, 65, 1, 52, 217, 236, 65, 1, 207, 174, 245, 233, 65,
+ 1, 250, 160, 65, 1, 216, 73, 245, 233, 65, 1, 50, 162, 215, 252, 65, 1,
+ 49, 162, 215, 252, 65, 1, 238, 45, 211, 61, 65, 1, 216, 73, 238, 45, 211,
+ 61, 65, 1, 49, 250, 94, 65, 1, 50, 250, 94, 65, 1, 112, 250, 94, 65, 1,
+ 121, 250, 94, 65, 1, 246, 53, 251, 138, 247, 29, 65, 1, 80, 227, 114, 65,
+ 1, 225, 170, 65, 1, 251, 126, 251, 138, 65, 1, 237, 254, 251, 138, 65, 1,
+ 124, 80, 227, 114, 65, 1, 124, 225, 170, 65, 1, 124, 237, 254, 251, 138,
+ 65, 1, 124, 251, 126, 251, 138, 65, 1, 208, 82, 245, 242, 65, 1, 162,
+ 208, 82, 245, 242, 65, 1, 246, 216, 50, 162, 215, 252, 65, 1, 246, 216,
+ 49, 162, 215, 252, 65, 1, 112, 210, 3, 65, 1, 121, 210, 3, 65, 1, 91, 54,
+ 65, 1, 224, 103, 54, 247, 214, 70, 55, 215, 253, 55, 220, 62, 5, 208,
+ 227, 52, 251, 126, 251, 138, 65, 1, 216, 58, 113, 65, 1, 245, 131, 251,
+ 138, 65, 1, 5, 238, 235, 65, 1, 5, 159, 65, 1, 5, 194, 65, 1, 5, 203,
+ 196, 65, 1, 5, 216, 73, 238, 45, 211, 61, 65, 1, 240, 198, 143, 142, 65,
+ 1, 138, 143, 142, 65, 1, 224, 150, 143, 142, 65, 1, 124, 143, 142, 65, 1,
+ 240, 197, 143, 142, 65, 1, 203, 1, 244, 27, 143, 82, 65, 1, 203, 77, 244,
+ 27, 143, 82, 65, 1, 205, 184, 65, 1, 206, 251, 65, 1, 52, 250, 160, 65,
+ 1, 124, 121, 250, 94, 65, 1, 124, 112, 250, 94, 65, 1, 124, 49, 250, 94,
+ 65, 1, 124, 50, 250, 94, 65, 1, 124, 215, 252, 65, 1, 101, 237, 254, 251,
+ 138, 65, 1, 101, 52, 237, 254, 251, 138, 65, 1, 101, 52, 251, 126, 251,
+ 138, 65, 1, 124, 208, 227, 65, 1, 216, 188, 245, 242, 65, 1, 248, 142,
+ 138, 208, 161, 65, 1, 241, 84, 138, 208, 161, 65, 1, 248, 142, 124, 208,
+ 161, 65, 1, 241, 84, 124, 208, 161, 65, 1, 213, 34, 65, 1, 171, 213, 34,
+ 65, 1, 124, 49, 47, 39, 237, 254, 251, 138, 39, 251, 126, 251, 138, 39,
+ 246, 53, 251, 138, 39, 208, 227, 39, 225, 170, 39, 219, 198, 39, 247,
+ 214, 39, 70, 55, 39, 243, 231, 39, 236, 116, 55, 39, 215, 253, 55, 39,
+ 52, 251, 126, 251, 138, 39, 247, 29, 39, 80, 227, 115, 55, 39, 52, 80,
+ 227, 115, 55, 39, 52, 237, 254, 251, 138, 39, 247, 52, 39, 230, 239, 247,
+ 214, 39, 207, 174, 245, 234, 55, 39, 245, 234, 55, 39, 216, 73, 245, 234,
+ 55, 39, 245, 234, 87, 216, 16, 39, 237, 254, 251, 139, 56, 39, 251, 126,
+ 251, 139, 56, 39, 49, 210, 4, 56, 39, 50, 210, 4, 56, 39, 49, 250, 218,
+ 55, 39, 236, 53, 39, 49, 162, 215, 253, 56, 39, 112, 210, 4, 56, 39, 121,
+ 210, 4, 56, 39, 91, 2, 56, 39, 224, 103, 2, 56, 39, 219, 140, 236, 116,
+ 56, 39, 216, 79, 236, 116, 56, 39, 70, 56, 39, 243, 232, 56, 39, 215,
+ 253, 56, 39, 245, 234, 56, 39, 246, 231, 39, 220, 62, 39, 80, 227, 115,
+ 56, 39, 247, 208, 56, 39, 230, 239, 52, 250, 127, 56, 39, 247, 30, 56,
+ 39, 246, 53, 251, 139, 56, 39, 247, 215, 56, 39, 230, 239, 247, 215, 56,
+ 39, 208, 228, 56, 39, 225, 171, 56, 39, 124, 227, 114, 39, 52, 124, 227,
+ 114, 39, 208, 228, 219, 199, 39, 212, 228, 211, 32, 219, 199, 39, 163,
+ 211, 32, 219, 199, 39, 212, 228, 212, 1, 219, 199, 39, 163, 212, 1, 219,
+ 199, 39, 50, 162, 215, 253, 56, 39, 230, 239, 247, 208, 56, 39, 51, 56,
+ 39, 214, 176, 56, 39, 203, 197, 55, 39, 80, 208, 227, 39, 52, 219, 198,
+ 39, 237, 254, 143, 82, 39, 251, 126, 143, 82, 39, 30, 218, 239, 39, 30,
+ 228, 252, 39, 30, 243, 225, 208, 149, 39, 30, 202, 221, 39, 247, 208, 55,
+ 39, 241, 35, 2, 56, 39, 52, 80, 227, 115, 56, 39, 49, 250, 218, 56, 39,
+ 221, 166, 208, 228, 55, 39, 236, 122, 55, 39, 251, 7, 156, 208, 173, 55,
+ 39, 49, 50, 53, 56, 39, 177, 53, 56, 39, 238, 4, 230, 96, 39, 50, 250,
+ 95, 55, 39, 49, 162, 215, 253, 55, 39, 240, 36, 39, 203, 197, 56, 39, 49,
+ 250, 95, 56, 39, 50, 250, 95, 56, 39, 50, 250, 95, 25, 112, 250, 95, 56,
+ 39, 50, 162, 215, 253, 55, 39, 70, 87, 216, 16, 39, 250, 60, 56, 39, 52,
+ 215, 253, 56, 39, 202, 30, 55, 39, 52, 247, 215, 56, 39, 52, 247, 214,
+ 39, 52, 225, 170, 39, 52, 225, 171, 56, 39, 52, 208, 227, 39, 52, 230,
+ 239, 247, 214, 39, 52, 86, 53, 56, 39, 8, 5, 1, 63, 39, 8, 5, 1, 74, 39,
+ 8, 5, 1, 75, 39, 8, 5, 1, 78, 39, 8, 5, 1, 68, 39, 8, 5, 1, 247, 125, 39,
+ 8, 5, 1, 245, 51, 39, 8, 5, 1, 237, 171, 39, 8, 5, 1, 226, 185, 39, 8, 5,
+ 1, 146, 39, 8, 5, 1, 210, 69, 39, 8, 5, 1, 206, 164, 39, 8, 5, 1, 203,
+ 196, 30, 6, 1, 237, 20, 30, 5, 1, 237, 20, 30, 6, 1, 250, 126, 214, 246,
+ 30, 5, 1, 250, 126, 214, 246, 30, 221, 44, 54, 30, 226, 251, 221, 44, 54,
+ 30, 6, 1, 219, 126, 243, 199, 30, 5, 1, 219, 126, 243, 199, 30, 202, 221,
+ 30, 5, 216, 73, 226, 221, 212, 145, 97, 30, 5, 242, 83, 226, 221, 212,
+ 145, 97, 30, 5, 216, 73, 242, 83, 226, 221, 212, 145, 97, 30, 217, 47,
+ 82, 30, 6, 1, 202, 227, 30, 208, 149, 30, 243, 225, 208, 149, 30, 6, 1,
+ 251, 3, 3, 208, 149, 30, 250, 203, 209, 163, 30, 6, 1, 241, 38, 3, 208,
+ 149, 30, 6, 1, 240, 249, 3, 208, 149, 30, 6, 1, 230, 231, 3, 208, 149,
+ 30, 6, 1, 220, 35, 3, 208, 149, 30, 6, 1, 206, 217, 3, 208, 149, 30, 6,
+ 1, 220, 37, 3, 208, 149, 30, 5, 1, 230, 231, 3, 243, 225, 25, 208, 149,
+ 30, 6, 1, 251, 2, 30, 6, 1, 248, 106, 30, 6, 1, 238, 235, 30, 6, 1, 244,
+ 37, 30, 6, 1, 241, 37, 30, 6, 1, 202, 83, 30, 6, 1, 240, 248, 30, 6, 1,
+ 209, 74, 30, 6, 1, 230, 230, 30, 6, 1, 229, 247, 30, 6, 1, 228, 24, 30,
+ 6, 1, 223, 246, 30, 6, 1, 221, 84, 30, 6, 1, 203, 170, 30, 6, 1, 220, 34,
+ 30, 6, 1, 218, 167, 30, 6, 1, 216, 59, 30, 6, 1, 212, 144, 30, 6, 1, 209,
+ 207, 30, 6, 1, 206, 216, 30, 6, 1, 218, 192, 30, 6, 1, 246, 142, 30, 6,
+ 1, 217, 202, 30, 6, 1, 220, 36, 30, 6, 1, 230, 231, 3, 243, 224, 30, 6,
+ 1, 206, 217, 3, 243, 224, 30, 5, 1, 251, 3, 3, 208, 149, 30, 5, 1, 241,
+ 38, 3, 208, 149, 30, 5, 1, 240, 249, 3, 208, 149, 30, 5, 1, 230, 231, 3,
+ 208, 149, 30, 5, 1, 206, 217, 3, 243, 225, 25, 208, 149, 30, 5, 1, 251,
+ 2, 30, 5, 1, 248, 106, 30, 5, 1, 238, 235, 30, 5, 1, 244, 37, 30, 5, 1,
+ 241, 37, 30, 5, 1, 202, 83, 30, 5, 1, 240, 248, 30, 5, 1, 209, 74, 30, 5,
+ 1, 230, 230, 30, 5, 1, 229, 247, 30, 5, 1, 228, 24, 30, 5, 1, 223, 246,
+ 30, 5, 1, 221, 84, 30, 5, 1, 203, 170, 30, 5, 1, 220, 34, 30, 5, 1, 218,
+ 167, 30, 5, 1, 216, 59, 30, 5, 1, 46, 212, 144, 30, 5, 1, 212, 144, 30,
+ 5, 1, 209, 207, 30, 5, 1, 206, 216, 30, 5, 1, 218, 192, 30, 5, 1, 246,
+ 142, 30, 5, 1, 217, 202, 30, 5, 1, 220, 36, 30, 5, 1, 230, 231, 3, 243,
+ 224, 30, 5, 1, 206, 217, 3, 243, 224, 30, 5, 1, 220, 35, 3, 208, 149, 30,
+ 5, 1, 206, 217, 3, 208, 149, 30, 5, 1, 220, 37, 3, 208, 149, 30, 6, 230,
+ 19, 97, 30, 248, 107, 97, 30, 209, 75, 97, 30, 206, 217, 3, 236, 116, 97,
+ 30, 206, 217, 3, 251, 126, 25, 236, 116, 97, 30, 206, 217, 3, 243, 232,
+ 25, 236, 116, 97, 30, 218, 193, 97, 30, 218, 168, 97, 30, 230, 19, 97,
+ 30, 1, 250, 126, 229, 0, 30, 5, 1, 250, 126, 229, 0, 30, 1, 211, 71, 30,
+ 5, 1, 211, 71, 30, 1, 243, 199, 30, 5, 1, 243, 199, 30, 1, 229, 0, 30, 5,
+ 1, 229, 0, 30, 1, 214, 246, 30, 5, 1, 214, 246, 84, 6, 1, 213, 35, 84, 5,
+ 1, 213, 35, 84, 6, 1, 240, 45, 84, 5, 1, 240, 45, 84, 6, 1, 229, 127, 84,
+ 5, 1, 229, 127, 84, 6, 1, 236, 107, 84, 5, 1, 236, 107, 84, 6, 1, 238,
+ 230, 84, 5, 1, 238, 230, 84, 6, 1, 213, 1, 84, 5, 1, 213, 1, 84, 6, 1,
+ 244, 52, 84, 5, 1, 244, 52, 30, 229, 248, 97, 30, 216, 60, 97, 30, 226,
+ 221, 212, 145, 97, 30, 1, 202, 227, 30, 6, 209, 75, 97, 30, 226, 221,
+ 241, 38, 97, 30, 216, 73, 226, 221, 241, 38, 97, 30, 6, 1, 212, 242, 30,
+ 5, 1, 212, 242, 30, 6, 226, 221, 212, 145, 97, 30, 6, 1, 214, 243, 30, 5,
+ 1, 214, 243, 30, 216, 60, 3, 211, 32, 97, 30, 6, 216, 73, 226, 221, 212,
+ 145, 97, 30, 6, 242, 83, 226, 221, 212, 145, 97, 30, 6, 216, 73, 242, 83,
+ 226, 221, 212, 145, 97, 36, 6, 1, 231, 111, 3, 237, 253, 36, 6, 1, 230,
+ 234, 36, 6, 1, 243, 130, 36, 6, 1, 238, 52, 36, 6, 1, 207, 11, 231, 110,
+ 36, 6, 1, 241, 252, 36, 6, 1, 247, 135, 75, 36, 6, 1, 203, 11, 36, 6, 1,
+ 230, 161, 36, 6, 1, 227, 80, 36, 6, 1, 222, 41, 36, 6, 1, 208, 8, 36, 6,
+ 1, 229, 49, 36, 6, 1, 235, 206, 3, 237, 253, 36, 6, 1, 212, 228, 68, 36,
+ 6, 1, 241, 248, 36, 6, 1, 63, 36, 6, 1, 248, 162, 36, 6, 1, 206, 55, 36,
+ 6, 1, 238, 105, 36, 6, 1, 244, 75, 36, 6, 1, 231, 110, 36, 6, 1, 202, 71,
+ 36, 6, 1, 202, 92, 36, 6, 1, 75, 36, 6, 1, 212, 228, 75, 36, 6, 1, 173,
+ 36, 6, 1, 241, 122, 36, 6, 1, 241, 103, 36, 6, 1, 241, 92, 36, 6, 1, 78,
+ 36, 6, 1, 219, 34, 36, 6, 1, 241, 28, 36, 6, 1, 241, 17, 36, 6, 1, 209,
+ 187, 36, 6, 1, 68, 36, 6, 1, 241, 154, 36, 6, 1, 152, 36, 6, 1, 208, 14,
+ 36, 6, 1, 246, 170, 36, 6, 1, 213, 90, 36, 6, 1, 213, 46, 36, 6, 1, 237,
+ 91, 54, 36, 6, 1, 203, 30, 36, 6, 1, 212, 7, 54, 36, 6, 1, 74, 36, 6, 1,
+ 202, 213, 36, 6, 1, 198, 36, 5, 1, 63, 36, 5, 1, 248, 162, 36, 5, 1, 206,
+ 55, 36, 5, 1, 238, 105, 36, 5, 1, 244, 75, 36, 5, 1, 231, 110, 36, 5, 1,
+ 202, 71, 36, 5, 1, 202, 92, 36, 5, 1, 75, 36, 5, 1, 212, 228, 75, 36, 5,
+ 1, 173, 36, 5, 1, 241, 122, 36, 5, 1, 241, 103, 36, 5, 1, 241, 92, 36, 5,
+ 1, 78, 36, 5, 1, 219, 34, 36, 5, 1, 241, 28, 36, 5, 1, 241, 17, 36, 5, 1,
+ 209, 187, 36, 5, 1, 68, 36, 5, 1, 241, 154, 36, 5, 1, 152, 36, 5, 1, 208,
+ 14, 36, 5, 1, 246, 170, 36, 5, 1, 213, 90, 36, 5, 1, 213, 46, 36, 5, 1,
+ 237, 91, 54, 36, 5, 1, 203, 30, 36, 5, 1, 212, 7, 54, 36, 5, 1, 74, 36,
+ 5, 1, 202, 213, 36, 5, 1, 198, 36, 5, 1, 231, 111, 3, 237, 253, 36, 5, 1,
+ 230, 234, 36, 5, 1, 243, 130, 36, 5, 1, 238, 52, 36, 5, 1, 207, 11, 231,
+ 110, 36, 5, 1, 241, 252, 36, 5, 1, 247, 135, 75, 36, 5, 1, 203, 11, 36,
+ 5, 1, 230, 161, 36, 5, 1, 227, 80, 36, 5, 1, 222, 41, 36, 5, 1, 208, 8,
+ 36, 5, 1, 229, 49, 36, 5, 1, 235, 206, 3, 237, 253, 36, 5, 1, 212, 228,
+ 68, 36, 5, 1, 241, 248, 36, 6, 1, 220, 36, 36, 5, 1, 220, 36, 36, 6, 1,
+ 203, 66, 36, 5, 1, 203, 66, 36, 6, 1, 230, 228, 74, 36, 5, 1, 230, 228,
+ 74, 36, 6, 1, 227, 86, 202, 183, 36, 5, 1, 227, 86, 202, 183, 36, 6, 1,
+ 230, 228, 227, 86, 202, 183, 36, 5, 1, 230, 228, 227, 86, 202, 183, 36,
+ 6, 1, 248, 73, 202, 183, 36, 5, 1, 248, 73, 202, 183, 36, 6, 1, 230, 228,
+ 248, 73, 202, 183, 36, 5, 1, 230, 228, 248, 73, 202, 183, 36, 6, 1, 228,
+ 225, 36, 5, 1, 228, 225, 36, 6, 1, 217, 202, 36, 5, 1, 217, 202, 36, 6,
+ 1, 239, 235, 36, 5, 1, 239, 235, 36, 6, 1, 230, 186, 36, 5, 1, 230, 186,
+ 36, 6, 1, 230, 187, 3, 52, 237, 254, 251, 138, 36, 5, 1, 230, 187, 3, 52,
+ 237, 254, 251, 138, 36, 6, 1, 207, 14, 36, 5, 1, 207, 14, 36, 6, 1, 215,
+ 191, 220, 36, 36, 5, 1, 215, 191, 220, 36, 36, 6, 1, 220, 37, 3, 208,
+ 197, 36, 5, 1, 220, 37, 3, 208, 197, 36, 6, 1, 219, 224, 36, 5, 1, 219,
+ 224, 36, 6, 1, 229, 0, 36, 5, 1, 229, 0, 36, 209, 35, 54, 39, 36, 208,
+ 197, 39, 36, 219, 141, 39, 36, 244, 142, 218, 71, 39, 36, 217, 196, 218,
+ 71, 39, 36, 218, 55, 39, 36, 236, 12, 209, 35, 54, 39, 36, 224, 114, 54,
+ 36, 6, 1, 212, 228, 235, 206, 3, 209, 248, 36, 5, 1, 212, 228, 235, 206,
+ 3, 209, 248, 36, 6, 1, 213, 139, 54, 36, 5, 1, 213, 139, 54, 36, 6, 1,
+ 241, 29, 3, 208, 254, 36, 5, 1, 241, 29, 3, 208, 254, 36, 6, 1, 238, 106,
+ 3, 206, 215, 36, 5, 1, 238, 106, 3, 206, 215, 36, 6, 1, 238, 106, 3, 95,
+ 36, 5, 1, 238, 106, 3, 95, 36, 6, 1, 238, 106, 3, 101, 113, 36, 5, 1,
+ 238, 106, 3, 101, 113, 36, 6, 1, 202, 72, 3, 244, 20, 36, 5, 1, 202, 72,
+ 3, 244, 20, 36, 6, 1, 202, 93, 3, 244, 20, 36, 5, 1, 202, 93, 3, 244, 20,
+ 36, 6, 1, 230, 44, 3, 244, 20, 36, 5, 1, 230, 44, 3, 244, 20, 36, 6, 1,
+ 230, 44, 3, 80, 95, 36, 5, 1, 230, 44, 3, 80, 95, 36, 6, 1, 230, 44, 3,
+ 95, 36, 5, 1, 230, 44, 3, 95, 36, 6, 1, 248, 214, 173, 36, 5, 1, 248,
+ 214, 173, 36, 6, 1, 241, 93, 3, 244, 20, 36, 5, 1, 241, 93, 3, 244, 20,
+ 36, 6, 32, 241, 93, 238, 105, 36, 5, 32, 241, 93, 238, 105, 36, 6, 1,
+ 219, 35, 3, 101, 113, 36, 5, 1, 219, 35, 3, 101, 113, 36, 6, 1, 251, 145,
+ 152, 36, 5, 1, 251, 145, 152, 36, 6, 1, 241, 18, 3, 244, 20, 36, 5, 1,
+ 241, 18, 3, 244, 20, 36, 6, 1, 209, 188, 3, 244, 20, 36, 5, 1, 209, 188,
+ 3, 244, 20, 36, 6, 1, 211, 53, 68, 36, 5, 1, 211, 53, 68, 36, 6, 1, 211,
+ 53, 106, 3, 95, 36, 5, 1, 211, 53, 106, 3, 95, 36, 6, 1, 237, 160, 3,
+ 244, 20, 36, 5, 1, 237, 160, 3, 244, 20, 36, 6, 32, 209, 188, 208, 14,
+ 36, 5, 32, 209, 188, 208, 14, 36, 6, 1, 246, 171, 3, 244, 20, 36, 5, 1,
+ 246, 171, 3, 244, 20, 36, 6, 1, 246, 171, 3, 80, 95, 36, 5, 1, 246, 171,
+ 3, 80, 95, 36, 6, 1, 213, 12, 36, 5, 1, 213, 12, 36, 6, 1, 251, 145, 246,
+ 170, 36, 5, 1, 251, 145, 246, 170, 36, 6, 1, 251, 145, 246, 171, 3, 244,
+ 20, 36, 5, 1, 251, 145, 246, 171, 3, 244, 20, 36, 1, 219, 133, 36, 6, 1,
+ 202, 72, 3, 247, 214, 36, 5, 1, 202, 72, 3, 247, 214, 36, 6, 1, 230, 44,
+ 3, 113, 36, 5, 1, 230, 44, 3, 113, 36, 6, 1, 241, 123, 3, 209, 248, 36,
+ 5, 1, 241, 123, 3, 209, 248, 36, 6, 1, 241, 93, 3, 113, 36, 5, 1, 241,
+ 93, 3, 113, 36, 6, 1, 241, 93, 3, 209, 248, 36, 5, 1, 241, 93, 3, 209,
+ 248, 36, 6, 1, 229, 138, 246, 170, 36, 5, 1, 229, 138, 246, 170, 36, 6,
+ 1, 241, 104, 3, 209, 248, 36, 5, 1, 241, 104, 3, 209, 248, 36, 5, 1, 219,
+ 133, 36, 6, 1, 34, 3, 247, 214, 36, 5, 1, 34, 3, 247, 214, 36, 6, 1, 34,
+ 3, 243, 231, 36, 5, 1, 34, 3, 243, 231, 36, 6, 32, 34, 231, 110, 36, 5,
+ 32, 34, 231, 110, 36, 6, 1, 231, 111, 3, 247, 214, 36, 5, 1, 231, 111, 3,
+ 247, 214, 36, 6, 1, 214, 192, 36, 5, 1, 214, 192, 36, 6, 1, 214, 193, 3,
+ 243, 231, 36, 5, 1, 214, 193, 3, 243, 231, 36, 6, 1, 202, 72, 3, 243,
+ 231, 36, 5, 1, 202, 72, 3, 243, 231, 36, 6, 1, 202, 93, 3, 243, 231, 36,
+ 5, 1, 202, 93, 3, 243, 231, 36, 6, 1, 251, 145, 241, 252, 36, 5, 1, 251,
+ 145, 241, 252, 36, 6, 1, 235, 206, 3, 225, 170, 36, 5, 1, 235, 206, 3,
+ 225, 170, 36, 6, 1, 235, 206, 3, 243, 231, 36, 5, 1, 235, 206, 3, 243,
+ 231, 36, 6, 1, 158, 3, 243, 231, 36, 5, 1, 158, 3, 243, 231, 36, 6, 1,
+ 248, 225, 78, 36, 5, 1, 248, 225, 78, 36, 6, 1, 248, 225, 158, 3, 243,
+ 231, 36, 5, 1, 248, 225, 158, 3, 243, 231, 36, 6, 1, 188, 3, 243, 231,
+ 36, 5, 1, 188, 3, 243, 231, 36, 6, 1, 106, 3, 225, 170, 36, 5, 1, 106, 3,
+ 225, 170, 36, 6, 1, 106, 3, 243, 231, 36, 5, 1, 106, 3, 243, 231, 36, 6,
+ 1, 106, 3, 52, 165, 36, 5, 1, 106, 3, 52, 165, 36, 6, 1, 246, 171, 3,
+ 243, 231, 36, 5, 1, 246, 171, 3, 243, 231, 36, 6, 1, 238, 106, 3, 244,
+ 20, 36, 5, 1, 238, 106, 3, 244, 20, 36, 6, 1, 203, 31, 3, 243, 231, 36,
+ 5, 1, 203, 31, 3, 243, 231, 36, 6, 1, 238, 106, 3, 211, 32, 25, 113, 36,
+ 5, 1, 238, 106, 3, 211, 32, 25, 113, 36, 6, 1, 237, 160, 3, 113, 36, 5,
+ 1, 237, 160, 3, 113, 36, 6, 1, 237, 160, 3, 95, 36, 5, 1, 237, 160, 3,
+ 95, 36, 6, 1, 229, 10, 244, 75, 36, 5, 1, 229, 10, 244, 75, 36, 6, 1,
+ 229, 10, 243, 130, 36, 5, 1, 229, 10, 243, 130, 36, 6, 1, 229, 10, 202,
+ 21, 36, 5, 1, 229, 10, 202, 21, 36, 6, 1, 229, 10, 241, 244, 36, 5, 1,
+ 229, 10, 241, 244, 36, 6, 1, 229, 10, 227, 80, 36, 5, 1, 229, 10, 227,
+ 80, 36, 6, 1, 229, 10, 222, 41, 36, 5, 1, 229, 10, 222, 41, 36, 6, 1,
+ 229, 10, 212, 71, 36, 5, 1, 229, 10, 212, 71, 36, 6, 1, 229, 10, 208,
+ 191, 36, 5, 1, 229, 10, 208, 191, 36, 6, 1, 216, 73, 202, 92, 36, 5, 1,
+ 216, 73, 202, 92, 36, 6, 1, 241, 123, 3, 113, 36, 5, 1, 241, 123, 3, 113,
+ 36, 6, 1, 227, 161, 36, 5, 1, 227, 161, 36, 6, 1, 216, 61, 36, 5, 1, 216,
+ 61, 36, 6, 1, 203, 99, 36, 5, 1, 203, 99, 36, 6, 1, 217, 126, 36, 5, 1,
+ 217, 126, 36, 6, 1, 204, 62, 36, 5, 1, 204, 62, 36, 6, 1, 251, 26, 173,
+ 36, 5, 1, 251, 26, 173, 36, 6, 1, 241, 123, 3, 101, 113, 36, 5, 1, 241,
+ 123, 3, 101, 113, 36, 6, 1, 241, 93, 3, 101, 113, 36, 5, 1, 241, 93, 3,
+ 101, 113, 36, 6, 1, 219, 35, 3, 244, 20, 36, 5, 1, 219, 35, 3, 244, 20,
+ 36, 6, 1, 213, 13, 3, 244, 20, 36, 5, 1, 213, 13, 3, 244, 20, 36, 6, 1,
+ 241, 93, 3, 49, 113, 36, 5, 1, 241, 93, 3, 49, 113, 36, 6, 1, 241, 237,
+ 36, 5, 1, 241, 237, 36, 6, 1, 244, 124, 36, 5, 1, 244, 124, 36, 6, 1,
+ 241, 123, 3, 244, 20, 36, 5, 1, 241, 123, 3, 244, 20, 178, 6, 1, 250, 5,
+ 178, 6, 1, 248, 122, 178, 6, 1, 238, 69, 178, 6, 1, 244, 212, 178, 6, 1,
+ 241, 167, 178, 6, 1, 202, 116, 178, 6, 1, 241, 147, 178, 6, 1, 240, 250,
+ 178, 6, 1, 135, 178, 6, 1, 202, 71, 178, 6, 1, 231, 19, 178, 6, 1, 227,
+ 83, 178, 6, 1, 203, 174, 178, 6, 1, 247, 92, 178, 6, 1, 229, 180, 178, 6,
+ 1, 236, 136, 178, 6, 1, 230, 181, 178, 6, 1, 238, 116, 178, 6, 1, 246,
+ 160, 178, 6, 1, 224, 240, 178, 6, 1, 203, 11, 178, 6, 1, 221, 152, 178,
+ 6, 1, 213, 90, 178, 6, 1, 205, 189, 178, 6, 1, 246, 199, 178, 6, 1, 219,
+ 16, 178, 6, 1, 230, 144, 178, 6, 1, 216, 220, 178, 6, 1, 214, 155, 178,
+ 6, 1, 205, 234, 178, 6, 1, 208, 194, 178, 6, 1, 216, 122, 178, 6, 1, 245,
+ 254, 178, 6, 1, 202, 252, 178, 6, 1, 218, 102, 178, 6, 1, 229, 191, 178,
+ 6, 1, 220, 60, 178, 6, 1, 240, 47, 178, 65, 1, 49, 162, 215, 252, 178,
+ 250, 160, 178, 241, 96, 82, 178, 240, 212, 82, 178, 245, 233, 178, 217,
+ 47, 82, 178, 251, 146, 82, 178, 5, 1, 250, 5, 178, 5, 1, 248, 122, 178,
+ 5, 1, 238, 69, 178, 5, 1, 244, 212, 178, 5, 1, 241, 167, 178, 5, 1, 202,
+ 116, 178, 5, 1, 241, 147, 178, 5, 1, 240, 250, 178, 5, 1, 135, 178, 5, 1,
+ 202, 71, 178, 5, 1, 231, 19, 178, 5, 1, 227, 83, 178, 5, 1, 203, 174,
+ 178, 5, 1, 247, 92, 178, 5, 1, 229, 180, 178, 5, 1, 236, 136, 178, 5, 1,
+ 230, 181, 178, 5, 1, 238, 116, 178, 5, 1, 246, 160, 178, 5, 1, 224, 240,
+ 178, 5, 1, 203, 11, 178, 5, 1, 221, 152, 178, 5, 1, 213, 90, 178, 5, 1,
+ 205, 189, 178, 5, 1, 246, 199, 178, 5, 1, 219, 16, 178, 5, 1, 230, 144,
+ 178, 5, 1, 216, 220, 178, 5, 1, 214, 155, 178, 5, 1, 205, 234, 178, 5, 1,
+ 208, 194, 178, 5, 1, 216, 122, 178, 5, 1, 245, 254, 178, 5, 1, 202, 252,
+ 178, 5, 1, 218, 102, 178, 5, 1, 229, 191, 178, 5, 1, 220, 60, 178, 5, 1,
+ 240, 47, 178, 5, 32, 241, 168, 202, 252, 178, 239, 102, 211, 61, 178,
+ 235, 220, 216, 15, 178, 240, 246, 54, 227, 221, 178, 240, 246, 54, 178,
+ 242, 60, 54, 110, 251, 139, 240, 241, 110, 251, 139, 214, 156, 110, 251,
+ 139, 213, 69, 110, 251, 139, 202, 103, 217, 109, 110, 251, 139, 202, 103,
+ 238, 254, 110, 251, 139, 208, 209, 110, 251, 139, 216, 70, 110, 251, 139,
+ 202, 101, 110, 251, 139, 219, 61, 110, 251, 139, 203, 23, 110, 251, 139,
+ 209, 115, 110, 251, 139, 238, 167, 110, 251, 139, 238, 168, 223, 208,
+ 110, 251, 139, 238, 165, 110, 251, 139, 217, 110, 219, 90, 110, 251, 139,
+ 209, 158, 238, 183, 110, 251, 139, 219, 40, 110, 251, 139, 250, 43, 237,
+ 152, 110, 251, 139, 223, 218, 110, 251, 139, 225, 145, 110, 251, 139,
+ 224, 229, 110, 251, 139, 224, 230, 229, 192, 110, 251, 139, 244, 151,
+ 110, 251, 139, 217, 121, 110, 251, 139, 209, 158, 217, 104, 110, 251,
+ 139, 203, 33, 248, 123, 202, 233, 110, 251, 139, 220, 43, 110, 251, 139,
+ 231, 69, 110, 251, 139, 244, 53, 110, 251, 139, 202, 28, 110, 131, 225,
+ 75, 246, 61, 110, 218, 63, 213, 15, 110, 218, 63, 237, 82, 214, 156, 110,
+ 218, 63, 237, 82, 219, 54, 110, 218, 63, 237, 82, 217, 114, 110, 218, 63,
+ 236, 232, 110, 218, 63, 208, 11, 110, 218, 63, 214, 156, 110, 218, 63,
+ 219, 54, 110, 218, 63, 217, 114, 110, 218, 63, 236, 128, 110, 218, 63,
+ 236, 129, 237, 84, 35, 206, 59, 110, 218, 63, 217, 51, 110, 218, 63, 244,
+ 198, 219, 245, 225, 105, 110, 218, 63, 224, 219, 110, 217, 179, 225, 102,
+ 110, 218, 63, 216, 200, 110, 217, 179, 219, 63, 110, 218, 63, 213, 0,
+ 243, 85, 110, 218, 63, 212, 124, 243, 85, 110, 217, 179, 212, 8, 219, 56,
+ 110, 131, 206, 221, 243, 85, 110, 131, 226, 251, 243, 85, 110, 217, 179,
+ 221, 41, 237, 151, 110, 218, 63, 217, 115, 217, 109, 110, 1, 251, 30,
+ 110, 1, 248, 108, 110, 1, 238, 67, 110, 1, 244, 178, 110, 1, 237, 67,
+ 110, 1, 206, 59, 110, 1, 202, 95, 110, 1, 237, 21, 110, 1, 209, 132, 110,
+ 1, 202, 236, 110, 1, 46, 230, 22, 110, 1, 230, 22, 110, 1, 228, 20, 110,
+ 1, 46, 224, 247, 110, 1, 224, 247, 110, 1, 46, 221, 40, 110, 1, 221, 40,
+ 110, 1, 214, 249, 110, 1, 250, 3, 110, 1, 46, 219, 34, 110, 1, 219, 34,
+ 110, 1, 46, 208, 15, 110, 1, 208, 15, 110, 1, 217, 74, 110, 1, 216, 91,
+ 110, 1, 212, 255, 110, 1, 209, 203, 110, 32, 203, 9, 52, 206, 59, 110,
+ 32, 203, 9, 206, 60, 202, 236, 110, 32, 203, 9, 52, 202, 236, 110, 217,
+ 179, 238, 167, 110, 217, 179, 238, 165, 10, 42, 54, 10, 2, 214, 242, 10,
+ 239, 170, 225, 88, 10, 2, 215, 24, 10, 2, 214, 245, 10, 42, 131, 55, 250,
+ 140, 245, 106, 215, 204, 250, 140, 239, 140, 215, 204, 10, 216, 165, 250,
+ 140, 218, 247, 224, 116, 54, 250, 140, 218, 247, 209, 153, 209, 37, 54,
+ 251, 86, 54, 10, 245, 233, 10, 244, 138, 213, 130, 10, 218, 65, 206, 40,
+ 54, 10, 2, 224, 95, 10, 2, 215, 3, 251, 33, 204, 86, 10, 2, 251, 33, 250,
+ 64, 10, 2, 216, 198, 251, 32, 10, 2, 216, 206, 251, 12, 250, 210, 10, 2,
+ 209, 240, 10, 5, 138, 209, 251, 10, 5, 138, 32, 137, 3, 228, 29, 3, 203,
+ 47, 10, 5, 138, 202, 107, 10, 5, 240, 71, 10, 5, 244, 172, 10, 5, 229,
+ 229, 10, 213, 143, 10, 1, 82, 10, 208, 70, 70, 217, 179, 82, 10, 217, 47,
+ 82, 10, 1, 229, 233, 203, 47, 10, 1, 237, 127, 10, 1, 137, 3, 225, 166,
+ 55, 10, 1, 137, 3, 237, 128, 55, 10, 1, 204, 71, 3, 237, 128, 55, 10, 1,
+ 137, 3, 237, 128, 56, 10, 1, 89, 3, 237, 128, 55, 10, 1, 251, 30, 10, 1,
+ 248, 138, 10, 1, 209, 170, 225, 98, 10, 1, 209, 169, 10, 1, 209, 88, 10,
+ 1, 230, 158, 10, 1, 237, 148, 10, 1, 229, 140, 10, 1, 244, 184, 10, 1,
+ 209, 100, 10, 1, 216, 122, 10, 1, 202, 107, 10, 1, 214, 161, 10, 1, 213,
+ 39, 10, 1, 215, 28, 10, 1, 244, 207, 10, 1, 209, 251, 10, 1, 202, 110,
+ 10, 1, 251, 59, 10, 1, 238, 114, 10, 1, 229, 190, 3, 120, 187, 55, 10, 1,
+ 229, 190, 3, 126, 187, 56, 10, 1, 240, 75, 89, 3, 230, 239, 206, 164, 10,
+ 1, 240, 75, 89, 3, 120, 187, 55, 10, 1, 240, 75, 89, 3, 126, 187, 55, 10,
+ 209, 209, 10, 1, 240, 47, 10, 1, 217, 119, 10, 1, 230, 22, 10, 1, 228,
+ 28, 10, 1, 225, 5, 10, 1, 221, 178, 10, 1, 237, 43, 10, 1, 204, 70, 10,
+ 1, 137, 225, 129, 10, 1, 203, 47, 10, 240, 69, 10, 244, 170, 10, 229,
+ 227, 10, 240, 71, 10, 244, 172, 10, 229, 229, 10, 213, 80, 10, 210, 222,
+ 10, 225, 164, 55, 10, 237, 128, 55, 10, 237, 128, 56, 10, 210, 246, 251,
+ 30, 10, 230, 239, 244, 172, 10, 131, 221, 179, 238, 85, 10, 201, 248, 10,
+ 22, 2, 5, 206, 165, 55, 10, 22, 2, 230, 239, 5, 206, 165, 55, 10, 22, 2,
+ 70, 56, 10, 216, 73, 244, 172, 10, 240, 72, 3, 120, 243, 83, 10, 204, 72,
+ 237, 128, 56, 250, 140, 17, 202, 84, 250, 140, 17, 105, 250, 140, 17,
+ 108, 250, 140, 17, 147, 250, 140, 17, 149, 250, 140, 17, 170, 250, 140,
+ 17, 195, 250, 140, 17, 213, 111, 250, 140, 17, 199, 250, 140, 17, 222,
+ 63, 10, 218, 246, 54, 10, 244, 68, 213, 130, 10, 209, 35, 213, 130, 10,
+ 239, 233, 218, 61, 211, 94, 10, 1, 243, 84, 248, 138, 10, 1, 243, 84,
+ 217, 119, 10, 1, 210, 199, 251, 30, 10, 1, 137, 204, 87, 10, 1, 137, 3,
+ 204, 72, 237, 128, 55, 10, 1, 137, 3, 204, 72, 237, 128, 56, 10, 1, 138,
+ 237, 127, 10, 1, 138, 237, 128, 251, 30, 10, 1, 138, 237, 128, 204, 70,
+ 10, 1, 106, 3, 237, 128, 55, 10, 1, 138, 237, 128, 203, 47, 10, 1, 207,
+ 233, 10, 1, 207, 231, 10, 1, 248, 148, 10, 1, 209, 170, 3, 215, 252, 10,
+ 1, 209, 170, 3, 126, 187, 87, 242, 68, 10, 1, 219, 16, 10, 1, 209, 167,
+ 10, 1, 248, 136, 10, 1, 151, 3, 237, 128, 55, 10, 1, 151, 3, 120, 187,
+ 80, 55, 10, 1, 220, 254, 10, 1, 242, 5, 10, 1, 151, 3, 126, 187, 55, 10,
+ 1, 209, 191, 10, 1, 209, 189, 10, 1, 244, 115, 10, 1, 244, 185, 3, 215,
+ 252, 10, 1, 244, 185, 3, 70, 56, 10, 1, 244, 185, 3, 70, 248, 126, 25, 5,
+ 209, 251, 10, 1, 244, 191, 10, 1, 244, 117, 10, 1, 242, 33, 10, 1, 244,
+ 185, 3, 126, 187, 87, 242, 68, 10, 1, 244, 185, 3, 239, 147, 187, 55, 10,
+ 1, 215, 177, 10, 1, 216, 123, 3, 5, 206, 164, 10, 1, 216, 123, 3, 215,
+ 252, 10, 1, 216, 123, 3, 70, 56, 10, 1, 216, 123, 3, 5, 206, 165, 56, 10,
+ 1, 216, 123, 3, 70, 248, 126, 25, 70, 55, 10, 1, 216, 123, 3, 120, 187,
+ 55, 10, 1, 230, 155, 10, 1, 216, 123, 3, 239, 147, 187, 55, 10, 1, 214,
+ 162, 3, 70, 248, 126, 25, 70, 55, 10, 1, 214, 162, 3, 126, 187, 56, 10,
+ 1, 214, 162, 3, 126, 187, 248, 126, 25, 126, 187, 55, 10, 1, 215, 29, 3,
+ 120, 187, 56, 10, 1, 215, 29, 3, 126, 187, 55, 10, 1, 209, 252, 3, 126,
+ 187, 55, 10, 1, 251, 60, 3, 126, 187, 55, 10, 1, 243, 84, 240, 47, 10, 1,
+ 240, 48, 3, 70, 224, 5, 56, 10, 1, 240, 48, 3, 70, 56, 10, 1, 206, 48,
+ 10, 1, 240, 48, 3, 126, 187, 56, 10, 1, 219, 14, 10, 1, 217, 120, 3, 70,
+ 55, 10, 1, 217, 120, 3, 126, 187, 55, 10, 1, 229, 189, 10, 1, 210, 169,
+ 230, 22, 10, 1, 230, 23, 3, 215, 252, 10, 1, 230, 23, 3, 70, 55, 10, 1,
+ 222, 205, 10, 1, 230, 23, 3, 126, 187, 56, 10, 1, 238, 251, 10, 1, 238,
+ 252, 3, 215, 252, 10, 1, 222, 126, 10, 1, 238, 252, 3, 120, 187, 56, 10,
+ 1, 237, 217, 10, 1, 238, 252, 3, 126, 187, 55, 10, 1, 228, 29, 3, 5, 206,
+ 164, 10, 1, 228, 29, 3, 70, 55, 10, 1, 228, 29, 3, 126, 187, 55, 10, 1,
+ 228, 29, 3, 126, 187, 56, 10, 1, 221, 179, 3, 70, 56, 10, 1, 221, 179,
+ 238, 85, 10, 1, 215, 230, 10, 1, 221, 179, 3, 215, 252, 10, 1, 221, 179,
+ 3, 126, 187, 55, 10, 1, 237, 44, 243, 109, 10, 1, 209, 192, 3, 70, 55,
+ 10, 1, 237, 44, 3, 89, 55, 10, 1, 237, 44, 238, 36, 10, 1, 237, 44, 238,
+ 37, 3, 237, 128, 55, 10, 1, 209, 170, 225, 99, 238, 36, 10, 1, 204, 71,
+ 3, 215, 252, 10, 1, 229, 76, 220, 73, 10, 1, 220, 73, 10, 1, 68, 10, 1,
+ 202, 213, 10, 1, 229, 76, 202, 213, 10, 1, 204, 71, 3, 120, 187, 55, 10,
+ 1, 206, 55, 10, 1, 240, 75, 203, 47, 10, 1, 89, 3, 209, 248, 10, 1, 89,
+ 3, 5, 206, 164, 10, 1, 204, 71, 3, 70, 55, 10, 1, 74, 10, 1, 89, 3, 126,
+ 187, 56, 10, 1, 89, 248, 223, 10, 1, 89, 248, 224, 3, 237, 128, 55, 10,
+ 239, 102, 211, 61, 10, 1, 251, 109, 10, 5, 138, 32, 215, 29, 3, 228, 29,
+ 3, 137, 225, 129, 10, 5, 138, 32, 217, 120, 3, 228, 29, 3, 137, 225, 129,
+ 10, 5, 138, 83, 81, 18, 10, 5, 138, 228, 29, 251, 30, 10, 5, 138, 230,
+ 158, 10, 5, 138, 126, 243, 83, 10, 5, 138, 214, 161, 10, 241, 84, 76,
+ 250, 7, 10, 211, 90, 76, 215, 143, 241, 123, 236, 227, 10, 5, 138, 215,
+ 189, 202, 84, 10, 5, 138, 206, 219, 216, 142, 202, 84, 10, 5, 138, 243,
+ 84, 237, 65, 76, 229, 140, 10, 5, 138, 83, 64, 18, 10, 5, 124, 214, 161,
+ 10, 5, 138, 225, 165, 10, 5, 204, 70, 10, 5, 203, 47, 10, 5, 138, 203,
+ 47, 10, 5, 138, 221, 178, 10, 218, 97, 76, 215, 14, 10, 241, 94, 246,
+ 218, 124, 211, 61, 10, 241, 94, 246, 218, 138, 211, 61, 10, 215, 189,
+ 138, 211, 62, 3, 240, 8, 246, 217, 10, 5, 124, 225, 5, 10, 1, 244, 185,
+ 3, 230, 239, 206, 164, 10, 1, 216, 123, 3, 230, 239, 206, 164, 240, 202,
+ 250, 140, 17, 202, 84, 240, 202, 250, 140, 17, 105, 240, 202, 250, 140,
+ 17, 108, 240, 202, 250, 140, 17, 147, 240, 202, 250, 140, 17, 149, 240,
+ 202, 250, 140, 17, 170, 240, 202, 250, 140, 17, 195, 240, 202, 250, 140,
+ 17, 213, 111, 240, 202, 250, 140, 17, 199, 240, 202, 250, 140, 17, 222,
+ 63, 10, 1, 213, 40, 3, 70, 56, 10, 1, 244, 208, 3, 70, 56, 10, 1, 238,
+ 115, 3, 70, 56, 10, 2, 212, 123, 250, 235, 10, 2, 212, 123, 218, 27, 224,
+ 240, 10, 1, 237, 44, 3, 230, 239, 206, 164, 210, 89, 241, 84, 76, 219,
+ 88, 210, 89, 210, 195, 239, 102, 211, 61, 210, 89, 210, 248, 239, 102,
+ 211, 61, 210, 89, 210, 195, 245, 242, 210, 89, 210, 248, 245, 242, 210,
+ 89, 236, 106, 245, 242, 210, 89, 245, 243, 212, 68, 227, 222, 210, 89,
+ 245, 243, 212, 68, 216, 16, 210, 89, 210, 195, 245, 243, 212, 68, 227,
+ 222, 210, 89, 210, 248, 245, 243, 212, 68, 216, 16, 210, 89, 245, 186,
+ 210, 89, 237, 89, 220, 91, 210, 89, 237, 89, 224, 217, 210, 89, 237, 89,
+ 250, 61, 210, 89, 251, 146, 82, 210, 89, 1, 251, 35, 210, 89, 1, 210,
+ 199, 251, 35, 210, 89, 1, 248, 105, 210, 89, 1, 238, 241, 210, 89, 1,
+ 238, 242, 238, 219, 210, 89, 1, 244, 181, 210, 89, 1, 243, 84, 244, 182,
+ 215, 246, 210, 89, 1, 237, 67, 210, 89, 1, 204, 70, 210, 89, 1, 202, 107,
+ 210, 89, 1, 237, 19, 210, 89, 1, 209, 128, 210, 89, 1, 209, 129, 238,
+ 219, 210, 89, 1, 202, 200, 210, 89, 1, 202, 201, 237, 67, 210, 89, 1,
+ 229, 250, 210, 89, 1, 228, 27, 210, 89, 1, 224, 112, 210, 89, 1, 221, 40,
+ 210, 89, 1, 213, 136, 210, 89, 1, 46, 213, 136, 210, 89, 1, 74, 210, 89,
+ 1, 219, 34, 210, 89, 1, 216, 73, 219, 34, 210, 89, 1, 215, 26, 210, 89,
+ 1, 217, 113, 210, 89, 1, 215, 246, 210, 89, 1, 212, 255, 210, 89, 1, 209,
+ 201, 210, 89, 1, 218, 231, 248, 92, 210, 89, 1, 218, 231, 238, 112, 210,
+ 89, 1, 218, 231, 243, 252, 210, 89, 217, 192, 55, 210, 89, 217, 192, 56,
+ 210, 89, 217, 192, 242, 82, 210, 89, 202, 11, 55, 210, 89, 202, 11, 56,
+ 210, 89, 202, 11, 242, 82, 210, 89, 216, 161, 55, 210, 89, 216, 161, 56,
+ 210, 89, 242, 83, 202, 18, 236, 105, 210, 89, 242, 83, 202, 18, 250, 211,
+ 210, 89, 237, 70, 55, 210, 89, 237, 70, 56, 210, 89, 237, 69, 242, 82,
+ 210, 89, 241, 11, 55, 210, 89, 241, 11, 56, 210, 89, 215, 109, 210, 89,
+ 240, 41, 243, 85, 210, 89, 217, 25, 210, 89, 215, 137, 210, 89, 120, 80,
+ 187, 55, 210, 89, 120, 80, 187, 56, 210, 89, 126, 187, 55, 210, 89, 126,
+ 187, 56, 210, 89, 220, 89, 227, 115, 55, 210, 89, 220, 89, 227, 115, 56,
+ 210, 89, 223, 194, 210, 89, 248, 222, 210, 89, 1, 212, 4, 202, 78, 210,
+ 89, 1, 212, 4, 229, 133, 210, 89, 1, 212, 4, 240, 60, 10, 1, 248, 139, 3,
+ 126, 187, 236, 55, 56, 10, 1, 248, 139, 3, 70, 248, 126, 25, 126, 187,
+ 55, 10, 1, 248, 139, 3, 126, 187, 218, 59, 177, 56, 10, 1, 248, 139, 3,
+ 126, 187, 218, 59, 177, 248, 126, 25, 120, 187, 55, 10, 1, 248, 139, 3,
+ 120, 187, 248, 126, 25, 70, 55, 10, 1, 248, 139, 3, 230, 239, 5, 206,
+ 165, 56, 10, 1, 248, 139, 3, 5, 206, 164, 10, 1, 151, 3, 120, 187, 55,
+ 10, 1, 151, 3, 126, 187, 218, 59, 177, 56, 10, 1, 244, 185, 3, 120, 187,
+ 205, 244, 248, 126, 25, 5, 209, 251, 10, 1, 244, 185, 3, 230, 239, 5,
+ 206, 165, 56, 10, 1, 216, 123, 3, 95, 10, 1, 214, 162, 3, 239, 147, 187,
+ 55, 10, 1, 251, 60, 3, 120, 187, 55, 10, 1, 251, 60, 3, 126, 187, 218,
+ 59, 183, 55, 10, 1, 251, 60, 3, 120, 187, 205, 244, 55, 10, 1, 240, 48,
+ 3, 120, 187, 56, 10, 1, 240, 48, 3, 126, 187, 218, 59, 177, 56, 10, 1,
+ 229, 190, 3, 70, 55, 10, 1, 229, 190, 3, 126, 187, 55, 10, 1, 229, 190,
+ 3, 126, 187, 218, 59, 177, 56, 10, 1, 83, 3, 70, 55, 10, 1, 83, 3, 70,
+ 56, 10, 1, 221, 179, 3, 120, 187, 56, 10, 1, 221, 179, 3, 5, 209, 251,
+ 10, 1, 221, 179, 3, 5, 206, 164, 10, 1, 228, 29, 3, 142, 10, 1, 216, 123,
+ 3, 120, 187, 205, 244, 55, 10, 1, 216, 123, 3, 237, 128, 55, 10, 1, 214,
+ 162, 3, 120, 187, 205, 244, 55, 10, 1, 151, 3, 5, 10, 1, 209, 252, 56,
+ 10, 1, 151, 3, 5, 10, 1, 209, 252, 25, 120, 243, 83, 10, 1, 214, 162, 3,
+ 5, 10, 1, 209, 252, 25, 120, 243, 83, 10, 1, 216, 123, 3, 5, 10, 1, 209,
+ 252, 25, 120, 243, 83, 10, 1, 151, 3, 5, 10, 1, 209, 252, 55, 10, 1, 137,
+ 3, 240, 202, 250, 140, 17, 120, 55, 10, 1, 137, 3, 240, 202, 250, 140,
+ 17, 126, 55, 10, 1, 240, 75, 89, 3, 240, 202, 250, 140, 17, 120, 55, 10,
+ 1, 240, 75, 89, 3, 240, 202, 250, 140, 17, 126, 55, 10, 1, 240, 75, 89,
+ 3, 240, 202, 250, 140, 17, 239, 147, 56, 10, 1, 204, 71, 3, 240, 202,
+ 250, 140, 17, 120, 55, 10, 1, 204, 71, 3, 240, 202, 250, 140, 17, 126,
+ 55, 10, 1, 89, 248, 224, 3, 240, 202, 250, 140, 17, 120, 55, 10, 1, 89,
+ 248, 224, 3, 240, 202, 250, 140, 17, 126, 55, 10, 1, 151, 3, 240, 202,
+ 250, 140, 17, 239, 147, 56, 10, 1, 214, 162, 3, 240, 202, 250, 140, 17,
+ 239, 147, 55, 10, 1, 214, 162, 3, 230, 239, 206, 164, 10, 1, 230, 23, 3,
+ 120, 187, 55, 209, 105, 1, 237, 157, 209, 105, 1, 213, 49, 209, 105, 1,
+ 221, 177, 209, 105, 1, 216, 216, 209, 105, 1, 249, 30, 209, 105, 1, 227,
+ 158, 209, 105, 1, 230, 37, 209, 105, 1, 251, 19, 209, 105, 1, 206, 84,
+ 209, 105, 1, 225, 4, 209, 105, 1, 240, 106, 209, 105, 1, 243, 255, 209,
+ 105, 1, 209, 107, 209, 105, 1, 228, 109, 209, 105, 1, 239, 4, 209, 105,
+ 1, 238, 42, 209, 105, 1, 214, 160, 209, 105, 1, 244, 136, 209, 105, 1,
+ 202, 98, 209, 105, 1, 209, 202, 209, 105, 1, 203, 110, 209, 105, 1, 219,
+ 47, 209, 105, 1, 230, 166, 209, 105, 1, 246, 173, 209, 105, 1, 207, 240,
+ 209, 105, 1, 237, 11, 209, 105, 1, 229, 143, 209, 105, 1, 209, 106, 209,
+ 105, 1, 202, 114, 209, 105, 1, 213, 38, 209, 105, 1, 215, 32, 209, 105,
+ 1, 244, 210, 209, 105, 1, 135, 209, 105, 1, 202, 17, 209, 105, 1, 251,
+ 56, 209, 105, 1, 238, 113, 209, 105, 1, 217, 123, 209, 105, 1, 204, 109,
+ 209, 105, 251, 148, 209, 105, 251, 246, 209, 105, 235, 165, 209, 105,
+ 241, 160, 209, 105, 207, 32, 209, 105, 220, 17, 209, 105, 241, 170, 209,
+ 105, 240, 193, 209, 105, 220, 88, 209, 105, 220, 96, 209, 105, 210, 222,
+ 209, 105, 1, 223, 106, 221, 255, 17, 202, 84, 221, 255, 17, 105, 221,
+ 255, 17, 108, 221, 255, 17, 147, 221, 255, 17, 149, 221, 255, 17, 170,
+ 221, 255, 17, 195, 221, 255, 17, 213, 111, 221, 255, 17, 199, 221, 255,
+ 17, 222, 63, 221, 255, 1, 63, 221, 255, 1, 241, 161, 221, 255, 1, 75,
+ 221, 255, 1, 74, 221, 255, 1, 68, 221, 255, 1, 220, 18, 221, 255, 1, 78,
+ 221, 255, 1, 244, 199, 221, 255, 1, 223, 163, 221, 255, 1, 249, 32, 221,
+ 255, 1, 185, 221, 255, 1, 210, 22, 221, 255, 1, 230, 181, 221, 255, 1,
+ 246, 199, 221, 255, 1, 244, 212, 221, 255, 1, 216, 220, 221, 255, 1, 215,
+ 185, 221, 255, 1, 215, 36, 221, 255, 1, 238, 207, 221, 255, 1, 240, 108,
+ 221, 255, 1, 173, 221, 255, 1, 228, 113, 221, 255, 1, 223, 111, 203, 252,
+ 221, 255, 1, 192, 221, 255, 1, 221, 11, 221, 255, 1, 201, 201, 221, 255,
+ 1, 152, 221, 255, 1, 204, 111, 221, 255, 1, 198, 221, 255, 1, 221, 12,
+ 203, 252, 221, 255, 1, 230, 93, 230, 181, 221, 255, 1, 230, 93, 246, 199,
+ 221, 255, 1, 230, 93, 216, 220, 221, 255, 39, 212, 228, 138, 208, 161,
+ 221, 255, 39, 212, 228, 124, 208, 161, 221, 255, 39, 212, 228, 215, 245,
+ 208, 161, 221, 255, 39, 163, 244, 19, 208, 161, 221, 255, 39, 163, 138,
+ 208, 161, 221, 255, 39, 163, 124, 208, 161, 221, 255, 39, 163, 215, 245,
+ 208, 161, 221, 255, 39, 223, 71, 82, 221, 255, 39, 52, 70, 55, 221, 255,
+ 138, 143, 250, 160, 221, 255, 124, 143, 250, 160, 221, 255, 16, 220, 19,
+ 244, 33, 221, 255, 16, 238, 206, 221, 255, 245, 233, 221, 255, 240, 212,
+ 82, 221, 255, 228, 84, 214, 252, 1, 251, 37, 214, 252, 1, 248, 51, 214,
+ 252, 1, 238, 240, 214, 252, 1, 244, 183, 214, 252, 1, 230, 192, 214, 252,
+ 1, 249, 30, 214, 252, 1, 202, 87, 214, 252, 1, 230, 201, 214, 252, 1,
+ 208, 200, 214, 252, 1, 202, 182, 214, 252, 1, 230, 38, 214, 252, 1, 228,
+ 106, 214, 252, 1, 224, 112, 214, 252, 1, 221, 40, 214, 252, 1, 212, 121,
+ 214, 252, 1, 231, 49, 214, 252, 1, 240, 26, 214, 252, 1, 208, 18, 214,
+ 252, 1, 217, 44, 214, 252, 1, 215, 246, 214, 252, 1, 213, 66, 214, 252,
+ 1, 210, 17, 214, 252, 131, 231, 49, 214, 252, 131, 231, 48, 214, 252,
+ 131, 220, 84, 214, 252, 131, 244, 197, 214, 252, 65, 1, 241, 42, 202,
+ 182, 214, 252, 131, 241, 42, 202, 182, 214, 252, 22, 2, 163, 74, 214,
+ 252, 22, 2, 74, 214, 252, 22, 2, 219, 197, 252, 25, 214, 252, 22, 2, 163,
+ 252, 25, 214, 252, 22, 2, 252, 25, 214, 252, 22, 2, 219, 197, 63, 214,
+ 252, 22, 2, 163, 63, 214, 252, 22, 2, 63, 214, 252, 65, 1, 212, 228, 63,
+ 214, 252, 22, 2, 212, 228, 63, 214, 252, 22, 2, 163, 68, 214, 252, 22, 2,
+ 68, 214, 252, 65, 1, 75, 214, 252, 22, 2, 163, 75, 214, 252, 22, 2, 75,
+ 214, 252, 22, 2, 78, 214, 252, 22, 2, 210, 222, 214, 252, 131, 222, 223,
+ 214, 252, 217, 179, 222, 223, 214, 252, 217, 179, 251, 83, 214, 252, 217,
+ 179, 250, 222, 214, 252, 217, 179, 248, 202, 214, 252, 217, 179, 250, 44,
+ 214, 252, 217, 179, 212, 243, 214, 252, 251, 146, 82, 214, 252, 217, 179,
+ 224, 250, 217, 80, 214, 252, 217, 179, 202, 25, 214, 252, 217, 179, 217,
+ 80, 214, 252, 217, 179, 202, 113, 214, 252, 217, 179, 207, 170, 214, 252,
+ 217, 179, 250, 111, 214, 252, 217, 179, 212, 8, 225, 77, 214, 252, 217,
+ 179, 250, 206, 225, 118, 1, 237, 134, 225, 118, 1, 251, 232, 225, 118, 1,
+ 251, 81, 225, 118, 1, 251, 122, 225, 118, 1, 251, 73, 225, 118, 1, 206,
+ 184, 225, 118, 1, 250, 1, 225, 118, 1, 230, 201, 225, 118, 1, 250, 41,
+ 225, 118, 1, 251, 42, 225, 118, 1, 251, 47, 225, 118, 1, 251, 39, 225,
+ 118, 1, 250, 247, 225, 118, 1, 250, 231, 225, 118, 1, 250, 81, 225, 118,
+ 1, 231, 49, 225, 118, 1, 250, 175, 225, 118, 1, 250, 51, 225, 118, 1,
+ 250, 148, 225, 118, 1, 250, 144, 225, 118, 1, 250, 75, 225, 118, 1, 250,
+ 49, 225, 118, 1, 242, 18, 225, 118, 1, 230, 30, 225, 118, 1, 251, 59,
+ 225, 118, 251, 87, 82, 225, 118, 205, 187, 82, 225, 118, 238, 179, 82,
+ 225, 118, 217, 178, 10, 1, 248, 139, 3, 5, 206, 165, 56, 10, 1, 248, 139,
+ 3, 237, 128, 55, 10, 1, 184, 3, 120, 187, 55, 10, 1, 209, 252, 3, 120,
+ 187, 55, 10, 1, 240, 48, 3, 70, 248, 126, 25, 126, 187, 55, 10, 1, 217,
+ 120, 3, 70, 56, 10, 1, 228, 29, 3, 52, 142, 10, 1, 83, 3, 126, 187, 55,
+ 10, 1, 89, 3, 120, 187, 248, 126, 25, 237, 128, 55, 10, 1, 89, 3, 120,
+ 187, 248, 126, 25, 70, 55, 10, 1, 216, 123, 3, 227, 14, 10, 1, 204, 71,
+ 3, 70, 204, 4, 10, 1, 215, 215, 203, 47, 10, 1, 124, 251, 30, 10, 1, 244,
+ 185, 3, 126, 187, 56, 10, 1, 215, 29, 3, 126, 187, 56, 10, 1, 238, 252,
+ 3, 230, 239, 95, 10, 1, 211, 53, 204, 70, 10, 1, 202, 108, 3, 230, 239,
+ 206, 165, 55, 10, 1, 251, 60, 3, 126, 187, 56, 10, 1, 230, 23, 3, 70, 56,
+ 10, 207, 174, 244, 173, 56, 10, 245, 93, 240, 71, 10, 245, 93, 244, 172,
+ 10, 245, 93, 229, 229, 10, 245, 93, 240, 69, 10, 245, 93, 244, 170, 10,
+ 245, 93, 229, 227, 10, 143, 118, 70, 55, 10, 143, 120, 187, 55, 10, 143,
+ 227, 15, 55, 10, 143, 118, 70, 56, 10, 143, 120, 187, 56, 10, 143, 227,
+ 15, 56, 10, 171, 240, 69, 10, 171, 244, 170, 10, 171, 229, 227, 10, 5,
+ 138, 204, 70, 10, 240, 72, 3, 215, 252, 10, 240, 72, 3, 70, 55, 10, 229,
+ 230, 3, 70, 56, 10, 49, 250, 95, 55, 10, 50, 250, 95, 55, 10, 49, 250,
+ 95, 56, 10, 50, 250, 95, 56, 10, 52, 50, 250, 95, 55, 10, 52, 50, 250,
+ 95, 87, 3, 243, 85, 10, 50, 250, 95, 87, 3, 243, 85, 10, 244, 173, 3,
+ 243, 85, 10, 131, 212, 154, 221, 179, 238, 85, 92, 2, 230, 239, 247, 52,
+ 92, 2, 247, 52, 92, 2, 250, 180, 92, 2, 205, 199, 92, 1, 212, 228, 63,
+ 92, 1, 63, 92, 1, 252, 25, 92, 1, 75, 92, 1, 231, 83, 92, 1, 68, 92, 1,
+ 206, 178, 92, 1, 125, 146, 92, 1, 125, 159, 92, 1, 247, 55, 74, 92, 1,
+ 212, 228, 74, 92, 1, 74, 92, 1, 251, 64, 92, 1, 247, 55, 78, 92, 1, 212,
+ 228, 78, 92, 1, 78, 92, 1, 250, 34, 92, 1, 173, 92, 1, 229, 144, 92, 1,
+ 239, 8, 92, 1, 238, 119, 92, 1, 222, 203, 92, 1, 247, 92, 92, 1, 246,
+ 199, 92, 1, 230, 181, 92, 1, 230, 149, 92, 1, 221, 11, 92, 1, 207, 241,
+ 92, 1, 207, 229, 92, 1, 244, 120, 92, 1, 244, 104, 92, 1, 221, 227, 92,
+ 1, 210, 22, 92, 1, 209, 108, 92, 1, 244, 212, 92, 1, 244, 1, 92, 1, 201,
+ 201, 92, 1, 221, 209, 92, 1, 185, 92, 1, 218, 208, 92, 1, 249, 32, 92, 1,
+ 248, 98, 92, 1, 192, 92, 1, 198, 92, 1, 216, 220, 92, 1, 215, 185, 92, 1,
+ 228, 113, 92, 1, 227, 77, 92, 1, 227, 68, 92, 1, 206, 86, 92, 1, 213, 90,
+ 92, 1, 211, 164, 92, 1, 215, 36, 92, 1, 152, 92, 22, 2, 220, 73, 92, 22,
+ 2, 220, 16, 92, 2, 221, 51, 92, 2, 250, 17, 92, 22, 2, 252, 25, 92, 22,
+ 2, 75, 92, 22, 2, 231, 83, 92, 22, 2, 68, 92, 22, 2, 206, 178, 92, 22, 2,
+ 125, 146, 92, 22, 2, 125, 215, 186, 92, 22, 2, 247, 55, 74, 92, 22, 2,
+ 212, 228, 74, 92, 22, 2, 74, 92, 22, 2, 251, 64, 92, 22, 2, 247, 55, 78,
+ 92, 22, 2, 212, 228, 78, 92, 22, 2, 78, 92, 22, 2, 250, 34, 92, 2, 205,
+ 204, 92, 22, 2, 217, 229, 74, 92, 22, 2, 250, 13, 92, 220, 39, 92, 211,
+ 42, 2, 207, 26, 92, 211, 42, 2, 250, 182, 92, 237, 254, 251, 138, 92,
+ 251, 126, 251, 138, 92, 22, 2, 247, 55, 163, 74, 92, 22, 2, 207, 24, 92,
+ 22, 2, 206, 177, 92, 1, 217, 126, 92, 1, 229, 125, 92, 1, 238, 94, 92, 1,
+ 202, 116, 92, 1, 244, 109, 92, 1, 216, 61, 92, 1, 240, 108, 92, 1, 202,
+ 168, 92, 1, 125, 215, 186, 92, 1, 125, 227, 78, 92, 22, 2, 125, 159, 92,
+ 22, 2, 125, 227, 78, 92, 244, 166, 92, 52, 244, 166, 92, 17, 202, 84, 92,
+ 17, 105, 92, 17, 108, 92, 17, 147, 92, 17, 149, 92, 17, 170, 92, 17, 195,
+ 92, 17, 213, 111, 92, 17, 199, 92, 17, 222, 63, 92, 251, 146, 54, 92, 2,
+ 138, 211, 227, 243, 85, 92, 1, 247, 55, 63, 92, 1, 220, 73, 92, 1, 220,
+ 16, 92, 1, 250, 13, 92, 1, 207, 24, 92, 1, 206, 177, 92, 1, 225, 82, 244,
+ 120, 92, 1, 202, 80, 92, 1, 79, 198, 92, 1, 238, 155, 92, 1, 230, 129,
+ 92, 1, 238, 45, 211, 61, 92, 1, 244, 110, 92, 1, 248, 198, 179, 250, 209,
+ 179, 2, 247, 52, 179, 2, 250, 180, 179, 2, 205, 199, 179, 1, 63, 179, 1,
+ 252, 25, 179, 1, 75, 179, 1, 231, 83, 179, 1, 68, 179, 1, 206, 178, 179,
+ 1, 125, 146, 179, 1, 125, 159, 179, 1, 74, 179, 1, 251, 64, 179, 1, 78,
+ 179, 1, 250, 34, 179, 1, 173, 179, 1, 229, 144, 179, 1, 239, 8, 179, 1,
+ 238, 119, 179, 1, 222, 203, 179, 1, 247, 92, 179, 1, 246, 199, 179, 1,
+ 230, 181, 179, 1, 230, 149, 179, 1, 221, 11, 179, 1, 207, 241, 179, 1,
+ 207, 229, 179, 1, 244, 120, 179, 1, 244, 104, 179, 1, 221, 227, 179, 1,
+ 210, 22, 179, 1, 209, 108, 179, 1, 244, 212, 179, 1, 244, 1, 179, 1, 201,
+ 201, 179, 1, 185, 179, 1, 218, 208, 179, 1, 249, 32, 179, 1, 248, 98,
+ 179, 1, 192, 179, 1, 198, 179, 1, 216, 220, 179, 1, 228, 113, 179, 1,
+ 213, 90, 179, 1, 211, 164, 179, 1, 215, 36, 179, 1, 152, 179, 2, 221, 51,
+ 179, 2, 250, 17, 179, 22, 2, 252, 25, 179, 22, 2, 75, 179, 22, 2, 231,
+ 83, 179, 22, 2, 68, 179, 22, 2, 206, 178, 179, 22, 2, 125, 146, 179, 22,
+ 2, 125, 215, 186, 179, 22, 2, 74, 179, 22, 2, 251, 64, 179, 22, 2, 78,
+ 179, 22, 2, 250, 34, 179, 2, 205, 204, 179, 1, 229, 135, 210, 22, 179,
+ 250, 35, 227, 196, 82, 179, 1, 215, 185, 179, 1, 216, 61, 179, 1, 202,
+ 168, 179, 1, 125, 215, 186, 179, 1, 125, 227, 78, 179, 22, 2, 125, 159,
+ 179, 22, 2, 125, 227, 78, 179, 17, 202, 84, 179, 17, 105, 179, 17, 108,
+ 179, 17, 147, 179, 17, 149, 179, 17, 170, 179, 17, 195, 179, 17, 213,
+ 111, 179, 17, 199, 179, 17, 222, 63, 179, 1, 216, 221, 3, 101, 243, 227,
+ 179, 1, 216, 221, 3, 226, 251, 243, 227, 179, 215, 120, 82, 179, 215,
+ 120, 54, 179, 245, 92, 221, 43, 105, 179, 245, 92, 221, 43, 108, 179,
+ 245, 92, 221, 43, 147, 179, 245, 92, 221, 43, 149, 179, 245, 92, 221, 43,
+ 118, 227, 180, 209, 98, 209, 93, 244, 31, 179, 245, 92, 244, 32, 212, 82,
+ 179, 230, 202, 179, 238, 231, 82, 237, 198, 2, 251, 121, 248, 66, 237,
+ 198, 2, 248, 66, 237, 198, 2, 205, 199, 237, 198, 1, 63, 237, 198, 1,
+ 252, 25, 237, 198, 1, 75, 237, 198, 1, 231, 83, 237, 198, 1, 68, 237,
+ 198, 1, 206, 178, 237, 198, 1, 241, 161, 237, 198, 1, 251, 64, 237, 198,
+ 1, 220, 18, 237, 198, 1, 250, 34, 237, 198, 1, 173, 237, 198, 1, 229,
+ 144, 237, 198, 1, 239, 8, 237, 198, 1, 238, 119, 237, 198, 1, 222, 203,
+ 237, 198, 1, 247, 92, 237, 198, 1, 246, 199, 237, 198, 1, 230, 181, 237,
+ 198, 1, 230, 149, 237, 198, 1, 221, 11, 237, 198, 1, 207, 241, 237, 198,
+ 1, 207, 229, 237, 198, 1, 244, 120, 237, 198, 1, 244, 104, 237, 198, 1,
+ 221, 227, 237, 198, 1, 210, 22, 237, 198, 1, 209, 108, 237, 198, 1, 244,
+ 212, 237, 198, 1, 244, 1, 237, 198, 1, 201, 201, 237, 198, 1, 185, 237,
+ 198, 1, 218, 208, 237, 198, 1, 249, 32, 237, 198, 1, 248, 98, 237, 198,
+ 1, 192, 237, 198, 1, 198, 237, 198, 1, 216, 220, 237, 198, 1, 228, 113,
+ 237, 198, 1, 227, 77, 237, 198, 1, 206, 86, 237, 198, 1, 213, 90, 237,
+ 198, 1, 215, 36, 237, 198, 1, 152, 237, 198, 2, 221, 51, 237, 198, 22, 2,
+ 252, 25, 237, 198, 22, 2, 75, 237, 198, 22, 2, 231, 83, 237, 198, 22, 2,
+ 68, 237, 198, 22, 2, 206, 178, 237, 198, 22, 2, 241, 161, 237, 198, 22,
+ 2, 251, 64, 237, 198, 22, 2, 220, 18, 237, 198, 22, 2, 250, 34, 237, 198,
+ 2, 205, 204, 237, 198, 2, 207, 28, 237, 198, 1, 229, 125, 237, 198, 1,
+ 238, 94, 237, 198, 1, 202, 116, 237, 198, 1, 215, 185, 237, 198, 1, 240,
+ 108, 237, 198, 17, 202, 84, 237, 198, 17, 105, 237, 198, 17, 108, 237,
+ 198, 17, 147, 237, 198, 17, 149, 237, 198, 17, 170, 237, 198, 17, 195,
+ 237, 198, 17, 213, 111, 237, 198, 17, 199, 237, 198, 17, 222, 63, 237,
+ 198, 208, 208, 237, 198, 251, 120, 237, 198, 230, 222, 237, 198, 206,
+ 206, 237, 198, 241, 130, 220, 23, 237, 198, 2, 203, 85, 237, 213, 2, 247,
+ 52, 237, 213, 2, 250, 180, 237, 213, 2, 205, 199, 237, 213, 1, 63, 237,
+ 213, 1, 252, 25, 237, 213, 1, 75, 237, 213, 1, 231, 83, 237, 213, 1, 68,
+ 237, 213, 1, 206, 178, 237, 213, 1, 125, 146, 237, 213, 1, 125, 159, 237,
+ 213, 22, 247, 55, 74, 237, 213, 1, 74, 237, 213, 1, 251, 64, 237, 213,
+ 22, 247, 55, 78, 237, 213, 1, 78, 237, 213, 1, 250, 34, 237, 213, 1, 173,
+ 237, 213, 1, 229, 144, 237, 213, 1, 239, 8, 237, 213, 1, 238, 119, 237,
+ 213, 1, 222, 203, 237, 213, 1, 247, 92, 237, 213, 1, 246, 199, 237, 213,
+ 1, 230, 181, 237, 213, 1, 230, 149, 237, 213, 1, 221, 11, 237, 213, 1,
+ 207, 241, 237, 213, 1, 207, 229, 237, 213, 1, 244, 120, 237, 213, 1, 244,
+ 104, 237, 213, 1, 221, 227, 237, 213, 1, 210, 22, 237, 213, 1, 209, 108,
+ 237, 213, 1, 244, 212, 237, 213, 1, 244, 1, 237, 213, 1, 201, 201, 237,
+ 213, 1, 185, 237, 213, 1, 218, 208, 237, 213, 1, 249, 32, 237, 213, 1,
+ 248, 98, 237, 213, 1, 192, 237, 213, 1, 198, 237, 213, 1, 216, 220, 237,
+ 213, 1, 228, 113, 237, 213, 1, 227, 77, 237, 213, 1, 206, 86, 237, 213,
+ 1, 213, 90, 237, 213, 1, 211, 164, 237, 213, 1, 215, 36, 237, 213, 1,
+ 152, 237, 213, 2, 221, 51, 237, 213, 2, 250, 17, 237, 213, 22, 2, 252,
+ 25, 237, 213, 22, 2, 75, 237, 213, 22, 2, 231, 83, 237, 213, 22, 2, 68,
+ 237, 213, 22, 2, 206, 178, 237, 213, 22, 2, 125, 146, 237, 213, 22, 2,
+ 125, 215, 186, 237, 213, 22, 2, 247, 55, 74, 237, 213, 22, 2, 74, 237,
+ 213, 22, 2, 251, 64, 237, 213, 22, 2, 247, 55, 78, 237, 213, 22, 2, 78,
+ 237, 213, 22, 2, 250, 34, 237, 213, 2, 205, 204, 237, 213, 220, 39, 237,
+ 213, 1, 125, 215, 186, 237, 213, 1, 125, 227, 78, 237, 213, 22, 2, 125,
+ 159, 237, 213, 22, 2, 125, 227, 78, 237, 213, 17, 202, 84, 237, 213, 17,
+ 105, 237, 213, 17, 108, 237, 213, 17, 147, 237, 213, 17, 149, 237, 213,
+ 17, 170, 237, 213, 17, 195, 237, 213, 17, 213, 111, 237, 213, 17, 199,
+ 237, 213, 17, 222, 63, 237, 213, 251, 146, 54, 237, 213, 215, 120, 54,
+ 237, 213, 1, 202, 80, 193, 2, 247, 52, 193, 2, 250, 180, 193, 2, 205,
+ 199, 193, 1, 63, 193, 1, 252, 25, 193, 1, 75, 193, 1, 231, 83, 193, 1,
+ 68, 193, 1, 206, 178, 193, 1, 125, 146, 193, 1, 125, 159, 193, 1, 74,
+ 193, 1, 251, 64, 193, 1, 78, 193, 1, 250, 34, 193, 1, 173, 193, 1, 229,
+ 144, 193, 1, 239, 8, 193, 1, 238, 119, 193, 1, 222, 203, 193, 1, 247, 92,
+ 193, 1, 246, 199, 193, 1, 230, 181, 193, 1, 230, 149, 193, 1, 221, 11,
+ 193, 1, 207, 241, 193, 1, 207, 229, 193, 1, 244, 120, 193, 1, 244, 104,
+ 193, 1, 221, 227, 193, 1, 210, 22, 193, 1, 209, 108, 193, 1, 244, 212,
+ 193, 1, 244, 1, 193, 1, 201, 201, 193, 1, 185, 193, 1, 218, 208, 193, 1,
+ 249, 32, 193, 1, 248, 98, 193, 1, 192, 193, 1, 198, 193, 1, 216, 220,
+ 193, 1, 228, 113, 193, 1, 227, 77, 193, 1, 206, 86, 193, 1, 213, 90, 193,
+ 1, 211, 164, 193, 1, 215, 36, 193, 1, 152, 193, 2, 221, 51, 193, 2, 250,
+ 17, 193, 22, 2, 252, 25, 193, 22, 2, 75, 193, 22, 2, 231, 83, 193, 22, 2,
+ 68, 193, 22, 2, 206, 178, 193, 22, 2, 125, 146, 193, 22, 2, 125, 215,
+ 186, 193, 22, 2, 74, 193, 22, 2, 251, 64, 193, 22, 2, 78, 193, 22, 2,
+ 250, 34, 193, 2, 205, 204, 193, 251, 65, 227, 196, 82, 193, 250, 35, 227,
+ 196, 82, 193, 1, 215, 185, 193, 1, 216, 61, 193, 1, 202, 168, 193, 1,
+ 125, 215, 186, 193, 1, 125, 227, 78, 193, 22, 2, 125, 159, 193, 22, 2,
+ 125, 227, 78, 193, 17, 202, 84, 193, 17, 105, 193, 17, 108, 193, 17, 147,
+ 193, 17, 149, 193, 17, 170, 193, 17, 195, 193, 17, 213, 111, 193, 17,
+ 199, 193, 17, 222, 63, 193, 230, 202, 193, 1, 204, 111, 193, 239, 138,
+ 118, 217, 55, 193, 239, 138, 118, 237, 137, 193, 239, 138, 126, 217, 53,
+ 193, 239, 138, 118, 212, 80, 193, 239, 138, 118, 241, 138, 193, 239, 138,
+ 126, 212, 79, 44, 2, 250, 180, 44, 2, 205, 199, 44, 1, 63, 44, 1, 252,
+ 25, 44, 1, 75, 44, 1, 231, 83, 44, 1, 68, 44, 1, 206, 178, 44, 1, 74, 44,
+ 1, 241, 161, 44, 1, 251, 64, 44, 1, 78, 44, 1, 220, 18, 44, 1, 250, 34,
+ 44, 1, 173, 44, 1, 222, 203, 44, 1, 247, 92, 44, 1, 230, 181, 44, 1, 221,
+ 11, 44, 1, 207, 241, 44, 1, 221, 227, 44, 1, 210, 22, 44, 1, 201, 201,
+ 44, 1, 221, 209, 44, 1, 185, 44, 1, 192, 44, 1, 198, 44, 1, 216, 220, 44,
+ 1, 215, 185, 44, 1, 228, 113, 44, 1, 227, 77, 44, 1, 227, 68, 44, 1, 206,
+ 86, 44, 1, 213, 90, 44, 1, 211, 164, 44, 1, 215, 36, 44, 1, 152, 44, 22,
+ 2, 252, 25, 44, 22, 2, 75, 44, 22, 2, 231, 83, 44, 22, 2, 68, 44, 22, 2,
+ 206, 178, 44, 22, 2, 74, 44, 22, 2, 241, 161, 44, 22, 2, 251, 64, 44, 22,
+ 2, 78, 44, 22, 2, 220, 18, 44, 22, 2, 250, 34, 44, 2, 205, 204, 44, 220,
+ 39, 44, 250, 35, 227, 196, 82, 44, 17, 202, 84, 44, 17, 105, 44, 17, 108,
+ 44, 17, 147, 44, 17, 149, 44, 17, 170, 44, 17, 195, 44, 17, 213, 111, 44,
+ 17, 199, 44, 17, 222, 63, 44, 42, 209, 152, 44, 42, 118, 236, 11, 44, 42,
+ 118, 209, 36, 44, 244, 133, 54, 44, 224, 38, 54, 44, 203, 50, 54, 44,
+ 244, 72, 54, 44, 245, 141, 54, 44, 250, 82, 87, 54, 44, 215, 120, 54, 44,
+ 42, 54, 175, 2, 39, 247, 53, 55, 175, 2, 247, 52, 175, 2, 250, 180, 175,
+ 2, 205, 199, 175, 1, 63, 175, 1, 252, 25, 175, 1, 75, 175, 1, 231, 83,
+ 175, 1, 68, 175, 1, 206, 178, 175, 1, 125, 146, 175, 1, 125, 159, 175, 1,
+ 74, 175, 1, 241, 161, 175, 1, 251, 64, 175, 1, 78, 175, 1, 220, 18, 175,
+ 1, 250, 34, 175, 1, 173, 175, 1, 229, 144, 175, 1, 239, 8, 175, 1, 238,
+ 119, 175, 1, 222, 203, 175, 1, 247, 92, 175, 1, 246, 199, 175, 1, 230,
+ 181, 175, 1, 230, 149, 175, 1, 221, 11, 175, 1, 207, 241, 175, 1, 207,
+ 229, 175, 1, 244, 120, 175, 1, 244, 104, 175, 1, 221, 227, 175, 1, 210,
+ 22, 175, 1, 209, 108, 175, 1, 244, 212, 175, 1, 244, 1, 175, 1, 201, 201,
+ 175, 1, 185, 175, 1, 218, 208, 175, 1, 249, 32, 175, 1, 248, 98, 175, 1,
+ 192, 175, 1, 198, 175, 1, 216, 220, 175, 1, 215, 185, 175, 1, 228, 113,
+ 175, 1, 227, 77, 175, 1, 227, 68, 175, 1, 206, 86, 175, 1, 213, 90, 175,
+ 1, 211, 164, 175, 1, 215, 36, 175, 1, 152, 175, 2, 250, 17, 175, 22, 2,
+ 252, 25, 175, 22, 2, 75, 175, 22, 2, 231, 83, 175, 22, 2, 68, 175, 22, 2,
+ 206, 178, 175, 22, 2, 125, 146, 175, 22, 2, 125, 215, 186, 175, 22, 2,
+ 74, 175, 22, 2, 241, 161, 175, 22, 2, 251, 64, 175, 22, 2, 78, 175, 22,
+ 2, 220, 18, 175, 22, 2, 250, 34, 175, 2, 205, 204, 175, 227, 196, 82,
+ 175, 251, 65, 227, 196, 82, 175, 1, 208, 20, 175, 1, 241, 255, 175, 1,
+ 215, 166, 175, 1, 125, 215, 186, 175, 1, 125, 227, 78, 175, 22, 2, 125,
+ 159, 175, 22, 2, 125, 227, 78, 175, 17, 202, 84, 175, 17, 105, 175, 17,
+ 108, 175, 17, 147, 175, 17, 149, 175, 17, 170, 175, 17, 195, 175, 17,
+ 213, 111, 175, 17, 199, 175, 17, 222, 63, 175, 239, 138, 17, 202, 85, 35,
+ 220, 77, 218, 15, 76, 149, 175, 239, 138, 17, 118, 35, 220, 77, 218, 15,
+ 76, 149, 175, 239, 138, 17, 120, 35, 220, 77, 218, 15, 76, 149, 175, 239,
+ 138, 17, 126, 35, 220, 77, 218, 15, 76, 149, 175, 239, 138, 17, 118, 35,
+ 240, 225, 218, 15, 76, 149, 175, 239, 138, 17, 120, 35, 240, 225, 218,
+ 15, 76, 149, 175, 239, 138, 17, 126, 35, 240, 225, 218, 15, 76, 149, 175,
+ 2, 207, 164, 200, 2, 247, 52, 200, 2, 250, 180, 200, 2, 205, 199, 200, 1,
+ 63, 200, 1, 252, 25, 200, 1, 75, 200, 1, 231, 83, 200, 1, 68, 200, 1,
+ 206, 178, 200, 1, 125, 146, 200, 1, 125, 159, 200, 1, 74, 200, 1, 241,
+ 161, 200, 1, 251, 64, 200, 1, 78, 200, 1, 220, 18, 200, 1, 250, 34, 200,
+ 1, 173, 200, 1, 229, 144, 200, 1, 239, 8, 200, 1, 238, 119, 200, 1, 222,
+ 203, 200, 1, 247, 92, 200, 1, 246, 199, 200, 1, 230, 181, 200, 1, 230,
+ 149, 200, 1, 221, 11, 200, 1, 207, 241, 200, 1, 207, 229, 200, 1, 244,
+ 120, 200, 1, 244, 104, 200, 1, 221, 227, 200, 1, 210, 22, 200, 1, 209,
+ 108, 200, 1, 244, 212, 200, 1, 244, 1, 200, 1, 201, 201, 200, 1, 185,
+ 200, 1, 218, 208, 200, 1, 249, 32, 200, 1, 248, 98, 200, 1, 192, 200, 1,
+ 198, 200, 1, 216, 220, 200, 1, 215, 185, 200, 1, 228, 113, 200, 1, 227,
+ 77, 200, 1, 206, 86, 200, 1, 213, 90, 200, 1, 211, 164, 200, 1, 215, 36,
+ 200, 1, 152, 200, 2, 221, 51, 200, 2, 250, 17, 200, 22, 2, 252, 25, 200,
+ 22, 2, 75, 200, 22, 2, 231, 83, 200, 22, 2, 68, 200, 22, 2, 206, 178,
+ 200, 22, 2, 125, 146, 200, 22, 2, 125, 215, 186, 200, 22, 2, 74, 200, 22,
+ 2, 241, 161, 200, 22, 2, 251, 64, 200, 22, 2, 78, 200, 22, 2, 220, 18,
+ 200, 22, 2, 250, 34, 200, 2, 205, 204, 200, 227, 196, 82, 200, 251, 65,
+ 227, 196, 82, 200, 1, 240, 108, 200, 1, 125, 215, 186, 200, 1, 125, 227,
+ 78, 200, 22, 2, 125, 159, 200, 22, 2, 125, 227, 78, 200, 17, 202, 84,
+ 200, 17, 105, 200, 17, 108, 200, 17, 147, 200, 17, 149, 200, 17, 170,
+ 200, 17, 195, 200, 17, 213, 111, 200, 17, 199, 200, 17, 222, 63, 200, 2,
+ 230, 135, 200, 2, 206, 222, 164, 2, 247, 52, 164, 2, 250, 180, 164, 2,
+ 205, 199, 164, 1, 63, 164, 1, 252, 25, 164, 1, 75, 164, 1, 231, 83, 164,
+ 1, 68, 164, 1, 206, 178, 164, 1, 125, 146, 164, 1, 125, 159, 164, 1, 74,
+ 164, 1, 241, 161, 164, 1, 251, 64, 164, 1, 78, 164, 1, 220, 18, 164, 1,
+ 250, 34, 164, 1, 173, 164, 1, 229, 144, 164, 1, 239, 8, 164, 1, 238, 119,
+ 164, 1, 222, 203, 164, 1, 247, 92, 164, 1, 246, 199, 164, 1, 230, 181,
+ 164, 1, 230, 149, 164, 1, 221, 11, 164, 1, 207, 241, 164, 1, 207, 229,
+ 164, 1, 244, 120, 164, 1, 244, 104, 164, 1, 221, 227, 164, 1, 210, 22,
+ 164, 1, 209, 108, 164, 1, 244, 212, 164, 1, 244, 1, 164, 1, 201, 201,
+ 164, 1, 221, 209, 164, 1, 185, 164, 1, 218, 208, 164, 1, 249, 32, 164, 1,
+ 248, 98, 164, 1, 192, 164, 1, 198, 164, 1, 216, 220, 164, 1, 215, 185,
+ 164, 1, 228, 113, 164, 1, 227, 77, 164, 1, 227, 68, 164, 1, 206, 86, 164,
+ 1, 213, 90, 164, 1, 211, 164, 164, 1, 215, 36, 164, 1, 152, 164, 1, 207,
+ 210, 164, 2, 250, 17, 164, 22, 2, 252, 25, 164, 22, 2, 75, 164, 22, 2,
+ 231, 83, 164, 22, 2, 68, 164, 22, 2, 206, 178, 164, 22, 2, 125, 146, 164,
+ 22, 2, 125, 215, 186, 164, 22, 2, 74, 164, 22, 2, 241, 161, 164, 22, 2,
+ 251, 64, 164, 22, 2, 78, 164, 22, 2, 220, 18, 164, 22, 2, 250, 34, 164,
+ 2, 205, 204, 164, 1, 70, 216, 97, 164, 250, 35, 227, 196, 82, 164, 1,
+ 250, 126, 231, 83, 164, 1, 125, 215, 186, 164, 1, 125, 227, 78, 164, 22,
+ 2, 125, 159, 164, 22, 2, 125, 227, 78, 164, 17, 202, 84, 164, 17, 105,
+ 164, 17, 108, 164, 17, 147, 164, 17, 149, 164, 17, 170, 164, 17, 195,
+ 164, 17, 213, 111, 164, 17, 199, 164, 17, 222, 63, 164, 42, 209, 152,
+ 164, 42, 118, 236, 11, 164, 42, 118, 209, 36, 164, 239, 138, 118, 217,
+ 55, 164, 239, 138, 118, 237, 137, 164, 239, 138, 126, 217, 53, 164, 244,
+ 138, 82, 164, 1, 246, 131, 221, 228, 164, 1, 246, 131, 223, 163, 164, 1,
+ 246, 131, 215, 186, 164, 1, 246, 131, 159, 164, 1, 246, 131, 227, 78,
+ 164, 1, 246, 131, 230, 54, 140, 2, 250, 179, 140, 2, 205, 198, 140, 1,
+ 250, 6, 140, 1, 251, 235, 140, 1, 251, 89, 140, 1, 251, 104, 140, 1, 230,
+ 191, 140, 1, 231, 82, 140, 1, 206, 169, 140, 1, 206, 172, 140, 1, 230,
+ 217, 140, 1, 230, 218, 140, 1, 231, 68, 140, 1, 231, 70, 140, 1, 240,
+ 194, 140, 1, 241, 156, 140, 1, 251, 49, 140, 1, 219, 187, 140, 1, 220,
+ 11, 140, 1, 250, 20, 140, 1, 251, 5, 229, 206, 140, 1, 225, 147, 229,
+ 206, 140, 1, 251, 5, 238, 210, 140, 1, 225, 147, 238, 210, 140, 1, 229,
+ 255, 223, 103, 140, 1, 214, 235, 238, 210, 140, 1, 251, 5, 247, 8, 140,
+ 1, 225, 147, 247, 8, 140, 1, 251, 5, 230, 164, 140, 1, 225, 147, 230,
+ 164, 140, 1, 210, 15, 223, 103, 140, 1, 210, 15, 214, 234, 223, 104, 140,
+ 1, 214, 235, 230, 164, 140, 1, 251, 5, 207, 237, 140, 1, 225, 147, 207,
+ 237, 140, 1, 251, 5, 244, 111, 140, 1, 225, 147, 244, 111, 140, 1, 223,
+ 191, 223, 58, 140, 1, 214, 235, 244, 111, 140, 1, 251, 5, 209, 195, 140,
+ 1, 225, 147, 209, 195, 140, 1, 251, 5, 244, 131, 140, 1, 225, 147, 244,
+ 131, 140, 1, 244, 162, 223, 58, 140, 1, 214, 235, 244, 131, 140, 1, 251,
+ 5, 219, 42, 140, 1, 225, 147, 219, 42, 140, 1, 251, 5, 248, 200, 140, 1,
+ 225, 147, 248, 200, 140, 1, 225, 62, 140, 1, 250, 241, 248, 200, 140, 1,
+ 203, 57, 140, 1, 216, 164, 140, 1, 244, 162, 227, 243, 140, 1, 206, 57,
+ 140, 1, 210, 15, 214, 207, 140, 1, 223, 191, 214, 207, 140, 1, 244, 162,
+ 214, 207, 140, 1, 237, 71, 140, 1, 223, 191, 227, 243, 140, 1, 240, 62,
+ 140, 2, 251, 38, 140, 22, 2, 251, 99, 140, 22, 2, 229, 169, 251, 106,
+ 140, 22, 2, 243, 200, 251, 106, 140, 22, 2, 229, 169, 230, 214, 140, 22,
+ 2, 243, 200, 230, 214, 140, 22, 2, 229, 169, 219, 167, 140, 22, 2, 243,
+ 200, 219, 167, 140, 22, 2, 238, 253, 140, 22, 2, 229, 11, 140, 22, 2,
+ 243, 200, 229, 11, 140, 22, 2, 229, 13, 244, 50, 140, 22, 2, 229, 12,
+ 237, 158, 251, 99, 140, 22, 2, 229, 12, 237, 158, 243, 200, 251, 99, 140,
+ 22, 2, 229, 12, 237, 158, 238, 209, 140, 22, 2, 238, 209, 140, 227, 89,
+ 17, 202, 84, 140, 227, 89, 17, 105, 140, 227, 89, 17, 108, 140, 227, 89,
+ 17, 147, 140, 227, 89, 17, 149, 140, 227, 89, 17, 170, 140, 227, 89, 17,
+ 195, 140, 227, 89, 17, 213, 111, 140, 227, 89, 17, 199, 140, 227, 89, 17,
+ 222, 63, 140, 22, 2, 243, 200, 238, 253, 140, 22, 2, 243, 200, 238, 209,
+ 140, 217, 179, 228, 194, 209, 103, 167, 229, 27, 230, 18, 209, 103, 167,
+ 229, 116, 229, 139, 209, 103, 167, 229, 116, 229, 108, 209, 103, 167,
+ 229, 116, 229, 103, 209, 103, 167, 229, 116, 229, 112, 209, 103, 167,
+ 229, 116, 216, 185, 209, 103, 167, 222, 129, 222, 116, 209, 103, 167,
+ 246, 117, 246, 188, 209, 103, 167, 246, 117, 246, 127, 209, 103, 167,
+ 246, 117, 246, 187, 209, 103, 167, 212, 14, 212, 13, 209, 103, 167, 246,
+ 117, 246, 113, 209, 103, 167, 202, 248, 202, 255, 209, 103, 167, 243,
+ 114, 246, 196, 209, 103, 167, 208, 173, 219, 53, 209, 103, 167, 209, 48,
+ 209, 97, 209, 103, 167, 209, 48, 223, 80, 209, 103, 167, 209, 48, 218,
+ 170, 209, 103, 167, 221, 192, 222, 230, 209, 103, 167, 243, 114, 244, 51,
+ 209, 103, 167, 208, 173, 209, 223, 209, 103, 167, 209, 48, 209, 16, 209,
+ 103, 167, 209, 48, 209, 104, 209, 103, 167, 209, 48, 209, 43, 209, 103,
+ 167, 221, 192, 221, 84, 209, 103, 167, 248, 24, 249, 0, 209, 103, 167,
+ 218, 70, 218, 98, 209, 103, 167, 218, 181, 218, 172, 209, 103, 167, 239,
+ 187, 240, 108, 209, 103, 167, 218, 181, 218, 201, 209, 103, 167, 239,
+ 187, 240, 81, 209, 103, 167, 218, 181, 214, 247, 209, 103, 167, 224, 83,
+ 192, 209, 103, 167, 202, 248, 203, 86, 209, 103, 167, 215, 228, 215, 144,
+ 209, 103, 167, 215, 145, 209, 103, 167, 227, 50, 227, 107, 209, 103, 167,
+ 226, 239, 209, 103, 167, 204, 1, 204, 106, 209, 103, 167, 212, 14, 215,
+ 6, 209, 103, 167, 212, 14, 215, 116, 209, 103, 167, 212, 14, 211, 9, 209,
+ 103, 167, 236, 137, 236, 233, 209, 103, 167, 227, 50, 246, 97, 209, 103,
+ 167, 158, 250, 223, 209, 103, 167, 236, 137, 221, 187, 209, 103, 167,
+ 219, 144, 209, 103, 167, 214, 229, 63, 209, 103, 167, 225, 141, 237, 125,
+ 209, 103, 167, 214, 229, 252, 25, 209, 103, 167, 214, 229, 250, 247, 209,
+ 103, 167, 214, 229, 75, 209, 103, 167, 214, 229, 231, 83, 209, 103, 167,
+ 214, 229, 207, 24, 209, 103, 167, 214, 229, 207, 22, 209, 103, 167, 214,
+ 229, 68, 209, 103, 167, 214, 229, 206, 178, 209, 103, 167, 218, 183, 209,
+ 103, 245, 92, 16, 249, 1, 209, 103, 167, 214, 229, 74, 209, 103, 167,
+ 214, 229, 251, 109, 209, 103, 167, 214, 229, 78, 209, 103, 167, 214, 229,
+ 251, 65, 225, 135, 209, 103, 167, 214, 229, 251, 65, 225, 136, 209, 103,
+ 167, 228, 32, 209, 103, 167, 225, 132, 209, 103, 167, 225, 133, 209, 103,
+ 167, 225, 141, 241, 129, 209, 103, 167, 225, 141, 209, 47, 209, 103, 167,
+ 225, 141, 208, 88, 209, 103, 167, 225, 141, 246, 175, 209, 103, 167, 209,
+ 95, 209, 103, 167, 222, 72, 209, 103, 167, 203, 80, 209, 103, 167, 239,
+ 177, 209, 103, 17, 202, 84, 209, 103, 17, 105, 209, 103, 17, 108, 209,
+ 103, 17, 147, 209, 103, 17, 149, 209, 103, 17, 170, 209, 103, 17, 195,
+ 209, 103, 17, 213, 111, 209, 103, 17, 199, 209, 103, 17, 222, 63, 209,
+ 103, 167, 250, 219, 209, 103, 167, 229, 113, 228, 12, 1, 229, 26, 228,
+ 12, 1, 229, 116, 210, 211, 228, 12, 1, 229, 116, 209, 232, 228, 12, 1,
+ 222, 128, 228, 12, 1, 245, 254, 228, 12, 1, 212, 14, 209, 232, 228, 12,
+ 1, 220, 233, 228, 12, 1, 243, 113, 228, 12, 1, 135, 228, 12, 1, 209, 48,
+ 210, 211, 228, 12, 1, 209, 48, 209, 232, 228, 12, 1, 221, 191, 228, 12,
+ 1, 248, 23, 228, 12, 1, 218, 69, 228, 12, 1, 218, 181, 210, 211, 228, 12,
+ 1, 239, 187, 209, 232, 228, 12, 1, 218, 181, 209, 232, 228, 12, 1, 239,
+ 187, 210, 211, 228, 12, 1, 224, 82, 228, 12, 1, 202, 247, 228, 12, 1,
+ 227, 50, 227, 107, 228, 12, 1, 227, 50, 227, 12, 228, 12, 1, 204, 0, 228,
+ 12, 1, 212, 14, 210, 211, 228, 12, 1, 236, 137, 210, 211, 228, 12, 1, 78,
+ 228, 12, 1, 236, 137, 209, 232, 228, 12, 241, 108, 228, 12, 22, 2, 63,
+ 228, 12, 22, 2, 225, 141, 230, 4, 228, 12, 22, 2, 252, 25, 228, 12, 22,
+ 2, 250, 247, 228, 12, 22, 2, 75, 228, 12, 22, 2, 231, 83, 228, 12, 22, 2,
+ 203, 124, 228, 12, 22, 2, 202, 169, 228, 12, 22, 2, 68, 228, 12, 22, 2,
+ 206, 178, 228, 12, 22, 2, 225, 141, 229, 9, 228, 12, 213, 138, 2, 227,
+ 49, 228, 12, 213, 138, 2, 220, 233, 228, 12, 22, 2, 74, 228, 12, 22, 2,
+ 241, 145, 228, 12, 22, 2, 78, 228, 12, 22, 2, 250, 8, 228, 12, 22, 2,
+ 251, 64, 228, 12, 229, 27, 228, 113, 228, 12, 143, 225, 141, 241, 129,
+ 228, 12, 143, 225, 141, 209, 47, 228, 12, 143, 225, 141, 209, 2, 228, 12,
+ 143, 225, 141, 247, 16, 228, 12, 247, 58, 82, 228, 12, 222, 81, 228, 12,
+ 17, 202, 84, 228, 12, 17, 105, 228, 12, 17, 108, 228, 12, 17, 147, 228,
+ 12, 17, 149, 228, 12, 17, 170, 228, 12, 17, 195, 228, 12, 17, 213, 111,
+ 228, 12, 17, 199, 228, 12, 17, 222, 63, 228, 12, 236, 137, 221, 191, 228,
+ 12, 236, 137, 224, 82, 228, 12, 1, 229, 117, 238, 39, 228, 12, 1, 229,
+ 117, 220, 233, 77, 4, 220, 39, 77, 131, 237, 232, 203, 3, 224, 173, 208,
+ 26, 63, 77, 131, 237, 232, 203, 3, 224, 173, 255, 22, 215, 232, 248, 164,
+ 192, 77, 131, 237, 232, 203, 3, 224, 173, 255, 22, 237, 232, 208, 6, 192,
+ 77, 131, 81, 203, 3, 224, 173, 225, 22, 192, 77, 131, 246, 12, 203, 3,
+ 224, 173, 213, 97, 192, 77, 131, 247, 34, 203, 3, 224, 173, 218, 171,
+ 213, 83, 192, 77, 131, 203, 3, 224, 173, 208, 6, 213, 83, 192, 77, 131,
+ 214, 205, 213, 82, 77, 131, 247, 196, 203, 3, 224, 172, 77, 131, 248, 45,
+ 212, 238, 203, 3, 224, 172, 77, 131, 230, 243, 208, 5, 77, 131, 244, 44,
+ 208, 6, 247, 195, 77, 131, 213, 82, 77, 131, 220, 238, 213, 82, 77, 131,
+ 208, 6, 213, 82, 77, 131, 220, 238, 208, 6, 213, 82, 77, 131, 215, 255,
+ 246, 156, 211, 180, 213, 82, 77, 131, 216, 65, 238, 9, 213, 82, 77, 131,
+ 247, 34, 255, 26, 215, 149, 225, 21, 163, 247, 61, 77, 131, 237, 232,
+ 208, 5, 77, 227, 35, 2, 246, 197, 215, 148, 77, 227, 35, 2, 227, 159,
+ 215, 148, 77, 250, 55, 2, 213, 93, 238, 193, 255, 27, 215, 148, 77, 250,
+ 55, 2, 255, 24, 185, 77, 250, 55, 2, 214, 178, 208, 0, 77, 2, 216, 160,
+ 243, 127, 238, 192, 77, 2, 216, 160, 243, 127, 238, 41, 77, 2, 216, 160,
+ 243, 127, 237, 233, 77, 2, 216, 160, 223, 99, 238, 192, 77, 2, 216, 160,
+ 223, 99, 238, 41, 77, 2, 216, 160, 243, 127, 216, 160, 223, 98, 77, 17,
+ 202, 84, 77, 17, 105, 77, 17, 108, 77, 17, 147, 77, 17, 149, 77, 17, 170,
+ 77, 17, 195, 77, 17, 213, 111, 77, 17, 199, 77, 17, 222, 63, 77, 17, 162,
+ 105, 77, 17, 162, 108, 77, 17, 162, 147, 77, 17, 162, 149, 77, 17, 162,
+ 170, 77, 17, 162, 195, 77, 17, 162, 213, 111, 77, 17, 162, 199, 77, 17,
+ 162, 222, 63, 77, 17, 162, 202, 84, 77, 131, 247, 198, 215, 148, 77, 131,
+ 222, 194, 247, 127, 220, 249, 202, 19, 77, 131, 247, 34, 255, 26, 215,
+ 149, 247, 128, 224, 126, 247, 61, 77, 131, 222, 194, 247, 127, 213, 94,
+ 215, 148, 77, 131, 246, 171, 224, 172, 77, 131, 208, 21, 255, 23, 77,
+ 131, 237, 215, 215, 149, 237, 174, 77, 131, 237, 215, 215, 149, 237, 180,
+ 77, 131, 250, 224, 229, 134, 237, 174, 77, 131, 250, 224, 229, 134, 237,
+ 180, 77, 2, 203, 72, 208, 4, 77, 2, 225, 101, 208, 4, 77, 1, 173, 77, 1,
+ 229, 144, 77, 1, 239, 8, 77, 1, 238, 119, 77, 1, 222, 203, 77, 1, 247,
+ 92, 77, 1, 246, 199, 77, 1, 230, 181, 77, 1, 221, 11, 77, 1, 207, 241,
+ 77, 1, 207, 229, 77, 1, 244, 120, 77, 1, 244, 104, 77, 1, 221, 227, 77,
+ 1, 210, 22, 77, 1, 209, 108, 77, 1, 244, 212, 77, 1, 244, 1, 77, 1, 201,
+ 201, 77, 1, 185, 77, 1, 218, 208, 77, 1, 249, 32, 77, 1, 248, 98, 77, 1,
+ 192, 77, 1, 208, 20, 77, 1, 208, 10, 77, 1, 241, 255, 77, 1, 241, 249,
+ 77, 1, 204, 111, 77, 1, 202, 80, 77, 1, 202, 116, 77, 1, 255, 29, 77, 1,
+ 198, 77, 1, 216, 220, 77, 1, 228, 113, 77, 1, 213, 90, 77, 1, 211, 164,
+ 77, 1, 215, 36, 77, 1, 152, 77, 1, 63, 77, 1, 228, 223, 77, 1, 239, 229,
+ 216, 220, 77, 1, 229, 47, 77, 1, 215, 185, 77, 22, 2, 252, 25, 77, 22, 2,
+ 75, 77, 22, 2, 231, 83, 77, 22, 2, 68, 77, 22, 2, 206, 178, 77, 22, 2,
+ 125, 146, 77, 22, 2, 125, 215, 186, 77, 22, 2, 125, 159, 77, 22, 2, 125,
+ 227, 78, 77, 22, 2, 74, 77, 22, 2, 241, 161, 77, 22, 2, 78, 77, 22, 2,
+ 220, 18, 77, 2, 215, 238, 211, 11, 222, 204, 215, 227, 77, 2, 215, 232,
+ 248, 163, 77, 22, 2, 216, 73, 75, 77, 22, 2, 216, 73, 231, 83, 77, 2,
+ 220, 249, 202, 20, 223, 107, 244, 212, 77, 2, 212, 27, 227, 236, 77, 131,
+ 237, 139, 77, 131, 219, 132, 77, 2, 227, 239, 215, 148, 77, 2, 203, 77,
+ 215, 148, 77, 2, 227, 240, 208, 21, 247, 61, 77, 2, 225, 24, 247, 61, 77,
+ 2, 237, 236, 247, 62, 216, 63, 77, 2, 237, 236, 225, 14, 216, 63, 77, 2,
+ 230, 239, 225, 24, 247, 61, 77, 210, 254, 2, 227, 240, 208, 21, 247, 61,
+ 77, 210, 254, 2, 225, 24, 247, 61, 77, 210, 254, 2, 230, 239, 225, 24,
+ 247, 61, 77, 210, 254, 1, 173, 77, 210, 254, 1, 229, 144, 77, 210, 254,
+ 1, 239, 8, 77, 210, 254, 1, 238, 119, 77, 210, 254, 1, 222, 203, 77, 210,
+ 254, 1, 247, 92, 77, 210, 254, 1, 246, 199, 77, 210, 254, 1, 230, 181,
+ 77, 210, 254, 1, 221, 11, 77, 210, 254, 1, 207, 241, 77, 210, 254, 1,
+ 207, 229, 77, 210, 254, 1, 244, 120, 77, 210, 254, 1, 244, 104, 77, 210,
+ 254, 1, 221, 227, 77, 210, 254, 1, 210, 22, 77, 210, 254, 1, 209, 108,
+ 77, 210, 254, 1, 244, 212, 77, 210, 254, 1, 244, 1, 77, 210, 254, 1, 201,
+ 201, 77, 210, 254, 1, 185, 77, 210, 254, 1, 218, 208, 77, 210, 254, 1,
+ 249, 32, 77, 210, 254, 1, 248, 98, 77, 210, 254, 1, 192, 77, 210, 254, 1,
+ 208, 20, 77, 210, 254, 1, 208, 10, 77, 210, 254, 1, 241, 255, 77, 210,
+ 254, 1, 241, 249, 77, 210, 254, 1, 204, 111, 77, 210, 254, 1, 202, 80,
+ 77, 210, 254, 1, 202, 116, 77, 210, 254, 1, 255, 29, 77, 210, 254, 1,
+ 198, 77, 210, 254, 1, 216, 220, 77, 210, 254, 1, 228, 113, 77, 210, 254,
+ 1, 213, 90, 77, 210, 254, 1, 211, 164, 77, 210, 254, 1, 215, 36, 77, 210,
+ 254, 1, 152, 77, 210, 254, 1, 63, 77, 210, 254, 1, 228, 223, 77, 210,
+ 254, 1, 239, 229, 204, 111, 77, 210, 254, 1, 239, 229, 198, 77, 210, 254,
+ 1, 239, 229, 216, 220, 77, 228, 210, 215, 146, 229, 144, 77, 228, 210,
+ 215, 146, 229, 145, 247, 128, 224, 126, 247, 61, 77, 247, 49, 2, 79, 248,
+ 155, 77, 247, 49, 2, 157, 248, 155, 77, 247, 49, 2, 247, 50, 209, 185,
+ 77, 247, 49, 2, 214, 204, 255, 28, 77, 16, 242, 55, 247, 193, 77, 16,
+ 216, 159, 215, 239, 77, 16, 219, 155, 238, 191, 77, 16, 216, 159, 215,
+ 240, 216, 65, 238, 8, 77, 16, 218, 171, 185, 77, 16, 221, 175, 247, 193,
+ 77, 16, 221, 175, 247, 194, 220, 238, 255, 25, 77, 16, 221, 175, 247,
+ 194, 237, 234, 255, 25, 77, 16, 221, 175, 247, 194, 247, 128, 255, 25,
+ 77, 2, 216, 160, 223, 99, 216, 160, 243, 126, 77, 2, 216, 160, 223, 99,
+ 237, 233, 77, 131, 247, 197, 212, 238, 238, 82, 224, 173, 216, 64, 77,
+ 131, 224, 84, 203, 3, 238, 82, 224, 173, 216, 64, 77, 131, 220, 238, 208,
+ 5, 77, 131, 81, 247, 220, 215, 229, 203, 3, 224, 173, 225, 22, 192, 77,
+ 131, 246, 12, 247, 220, 215, 229, 203, 3, 224, 173, 213, 97, 192, 216,
+ 15, 210, 174, 54, 227, 221, 210, 174, 54, 216, 15, 210, 174, 2, 3, 243,
+ 83, 227, 221, 210, 174, 2, 3, 243, 83, 77, 131, 227, 231, 225, 25, 215,
+ 148, 77, 131, 208, 112, 225, 25, 215, 148, 69, 1, 173, 69, 1, 229, 144,
+ 69, 1, 239, 8, 69, 1, 238, 119, 69, 1, 222, 203, 69, 1, 247, 92, 69, 1,
+ 246, 199, 69, 1, 230, 181, 69, 1, 230, 149, 69, 1, 221, 11, 69, 1, 221,
+ 193, 69, 1, 207, 241, 69, 1, 207, 229, 69, 1, 244, 120, 69, 1, 244, 104,
+ 69, 1, 221, 227, 69, 1, 210, 22, 69, 1, 209, 108, 69, 1, 244, 212, 69, 1,
+ 244, 1, 69, 1, 201, 201, 69, 1, 185, 69, 1, 218, 208, 69, 1, 249, 32, 69,
+ 1, 248, 98, 69, 1, 192, 69, 1, 198, 69, 1, 216, 220, 69, 1, 228, 113, 69,
+ 1, 204, 111, 69, 1, 215, 36, 69, 1, 152, 69, 1, 227, 77, 69, 1, 63, 69,
+ 1, 213, 67, 63, 69, 1, 75, 69, 1, 231, 83, 69, 1, 68, 69, 1, 206, 178,
+ 69, 1, 74, 69, 1, 224, 55, 74, 69, 1, 78, 69, 1, 250, 34, 69, 22, 2, 209,
+ 234, 252, 25, 69, 22, 2, 252, 25, 69, 22, 2, 75, 69, 22, 2, 231, 83, 69,
+ 22, 2, 68, 69, 22, 2, 206, 178, 69, 22, 2, 74, 69, 22, 2, 251, 64, 69,
+ 22, 2, 224, 55, 231, 83, 69, 22, 2, 224, 55, 78, 69, 22, 2, 188, 55, 69,
+ 2, 250, 180, 69, 2, 70, 56, 69, 2, 205, 199, 69, 2, 205, 204, 69, 2, 250,
+ 79, 69, 109, 2, 174, 198, 69, 109, 2, 174, 216, 220, 69, 109, 2, 174,
+ 204, 111, 69, 109, 2, 174, 152, 69, 1, 237, 249, 215, 36, 69, 17, 202,
+ 84, 69, 17, 105, 69, 17, 108, 69, 17, 147, 69, 17, 149, 69, 17, 170, 69,
+ 17, 195, 69, 17, 213, 111, 69, 17, 199, 69, 17, 222, 63, 69, 2, 227, 86,
+ 214, 167, 69, 2, 214, 167, 69, 16, 227, 44, 69, 16, 245, 227, 69, 16,
+ 251, 85, 69, 16, 238, 174, 69, 1, 213, 90, 69, 1, 211, 164, 69, 1, 125,
+ 146, 69, 1, 125, 215, 186, 69, 1, 125, 159, 69, 1, 125, 227, 78, 69, 22,
+ 2, 125, 146, 69, 22, 2, 125, 215, 186, 69, 22, 2, 125, 159, 69, 22, 2,
+ 125, 227, 78, 69, 1, 224, 55, 222, 203, 69, 1, 224, 55, 230, 149, 69, 1,
+ 224, 55, 248, 198, 69, 1, 224, 55, 248, 193, 69, 109, 2, 224, 55, 174,
+ 201, 201, 69, 109, 2, 224, 55, 174, 192, 69, 109, 2, 224, 55, 174, 228,
+ 113, 69, 1, 213, 96, 229, 237, 213, 90, 69, 22, 2, 213, 96, 229, 237,
+ 240, 238, 69, 143, 131, 213, 96, 229, 237, 237, 79, 69, 143, 131, 213,
+ 96, 229, 237, 229, 202, 218, 180, 69, 1, 204, 44, 217, 146, 229, 237,
+ 209, 108, 69, 1, 204, 44, 217, 146, 229, 237, 217, 152, 69, 22, 2, 204,
+ 44, 217, 146, 229, 237, 240, 238, 69, 22, 2, 204, 44, 217, 146, 229, 237,
+ 207, 24, 69, 2, 204, 44, 217, 146, 229, 237, 208, 160, 69, 2, 204, 44,
+ 217, 146, 229, 237, 208, 159, 69, 2, 204, 44, 217, 146, 229, 237, 208,
+ 158, 69, 2, 204, 44, 217, 146, 229, 237, 208, 157, 69, 2, 204, 44, 217,
+ 146, 229, 237, 208, 156, 69, 1, 241, 174, 217, 146, 229, 237, 221, 227,
+ 69, 1, 241, 174, 217, 146, 229, 237, 202, 176, 69, 1, 241, 174, 217, 146,
+ 229, 237, 238, 84, 69, 22, 2, 238, 186, 229, 237, 75, 69, 22, 2, 229,
+ 207, 220, 73, 69, 22, 2, 229, 207, 68, 69, 22, 2, 229, 207, 241, 161, 69,
+ 1, 213, 67, 173, 69, 1, 213, 67, 229, 144, 69, 1, 213, 67, 239, 8, 69, 1,
+ 213, 67, 247, 92, 69, 1, 213, 67, 202, 116, 69, 1, 213, 67, 221, 11, 69,
+ 1, 213, 67, 244, 212, 69, 1, 213, 67, 201, 201, 69, 1, 213, 67, 218, 208,
+ 69, 1, 213, 67, 240, 108, 69, 1, 213, 67, 249, 32, 69, 1, 213, 67, 209,
+ 108, 69, 1, 213, 67, 152, 69, 109, 2, 213, 67, 174, 204, 111, 69, 22, 2,
+ 213, 67, 252, 25, 69, 22, 2, 213, 67, 74, 69, 22, 2, 213, 67, 188, 55,
+ 69, 22, 2, 213, 67, 46, 203, 124, 69, 2, 213, 67, 208, 159, 69, 2, 213,
+ 67, 208, 158, 69, 2, 213, 67, 208, 156, 69, 2, 213, 67, 208, 155, 69, 2,
+ 213, 67, 245, 156, 208, 159, 69, 2, 213, 67, 245, 156, 208, 158, 69, 2,
+ 213, 67, 245, 156, 241, 95, 208, 161, 69, 1, 215, 130, 219, 139, 240,
+ 108, 69, 2, 215, 130, 219, 139, 208, 156, 69, 213, 67, 17, 202, 84, 69,
+ 213, 67, 17, 105, 69, 213, 67, 17, 108, 69, 213, 67, 17, 147, 69, 213,
+ 67, 17, 149, 69, 213, 67, 17, 170, 69, 213, 67, 17, 195, 69, 213, 67, 17,
+ 213, 111, 69, 213, 67, 17, 199, 69, 213, 67, 17, 222, 63, 69, 2, 229,
+ 137, 208, 160, 69, 2, 229, 137, 208, 158, 69, 22, 2, 251, 51, 63, 69, 22,
+ 2, 251, 51, 251, 64, 69, 16, 213, 67, 105, 69, 16, 213, 67, 240, 211,
+ 114, 6, 1, 250, 231, 114, 6, 1, 248, 242, 114, 6, 1, 238, 234, 114, 6, 1,
+ 243, 93, 114, 6, 1, 241, 92, 114, 6, 1, 205, 213, 114, 6, 1, 202, 87,
+ 114, 6, 1, 209, 230, 114, 6, 1, 231, 49, 114, 6, 1, 230, 4, 114, 6, 1,
+ 228, 2, 114, 6, 1, 225, 122, 114, 6, 1, 223, 74, 114, 6, 1, 220, 31, 114,
+ 6, 1, 219, 91, 114, 6, 1, 202, 76, 114, 6, 1, 216, 202, 114, 6, 1, 214,
+ 243, 114, 6, 1, 209, 218, 114, 6, 1, 206, 255, 114, 6, 1, 218, 200, 114,
+ 6, 1, 229, 132, 114, 6, 1, 238, 110, 114, 6, 1, 217, 111, 114, 6, 1, 212,
+ 255, 114, 6, 1, 246, 129, 114, 6, 1, 247, 61, 114, 6, 1, 230, 133, 114,
+ 6, 1, 246, 68, 114, 6, 1, 246, 183, 114, 6, 1, 203, 180, 114, 6, 1, 230,
+ 146, 114, 6, 1, 237, 154, 114, 6, 1, 237, 67, 114, 6, 1, 236, 254, 114,
+ 6, 1, 204, 62, 114, 6, 1, 237, 92, 114, 6, 1, 236, 132, 114, 6, 1, 202,
+ 249, 114, 6, 1, 251, 98, 114, 1, 250, 231, 114, 1, 248, 242, 114, 1, 238,
+ 234, 114, 1, 243, 93, 114, 1, 241, 92, 114, 1, 205, 213, 114, 1, 202, 87,
+ 114, 1, 209, 230, 114, 1, 231, 49, 114, 1, 230, 4, 114, 1, 228, 2, 114,
+ 1, 225, 122, 114, 1, 223, 74, 114, 1, 220, 31, 114, 1, 219, 91, 114, 1,
+ 202, 76, 114, 1, 216, 202, 114, 1, 214, 243, 114, 1, 209, 218, 114, 1,
+ 206, 255, 114, 1, 218, 200, 114, 1, 229, 132, 114, 1, 238, 110, 114, 1,
+ 217, 111, 114, 1, 212, 255, 114, 1, 246, 129, 114, 1, 247, 61, 114, 1,
+ 230, 133, 114, 1, 246, 68, 114, 1, 246, 183, 114, 1, 203, 180, 114, 1,
+ 230, 146, 114, 1, 237, 154, 114, 1, 237, 67, 114, 1, 236, 254, 114, 1,
+ 204, 62, 114, 1, 237, 92, 114, 1, 236, 132, 114, 1, 240, 26, 114, 1, 202,
+ 249, 114, 1, 241, 110, 114, 1, 207, 174, 238, 234, 114, 1, 251, 59, 114,
+ 219, 89, 213, 130, 65, 1, 114, 223, 74, 114, 1, 251, 98, 114, 1, 237, 91,
+ 54, 114, 1, 228, 104, 54, 28, 123, 229, 59, 28, 123, 211, 156, 28, 123,
+ 222, 93, 28, 123, 208, 240, 28, 123, 211, 145, 28, 123, 216, 47, 28, 123,
+ 224, 141, 28, 123, 218, 153, 28, 123, 211, 153, 28, 123, 212, 111, 28,
+ 123, 211, 150, 28, 123, 231, 106, 28, 123, 246, 74, 28, 123, 211, 160,
+ 28, 123, 246, 138, 28, 123, 229, 120, 28, 123, 209, 66, 28, 123, 218,
+ 190, 28, 123, 236, 251, 28, 123, 222, 89, 28, 123, 211, 154, 28, 123,
+ 222, 83, 28, 123, 222, 87, 28, 123, 208, 237, 28, 123, 216, 35, 28, 123,
+ 211, 152, 28, 123, 216, 45, 28, 123, 229, 243, 28, 123, 224, 134, 28,
+ 123, 229, 246, 28, 123, 218, 148, 28, 123, 218, 146, 28, 123, 218, 134,
+ 28, 123, 218, 142, 28, 123, 218, 140, 28, 123, 218, 137, 28, 123, 218,
+ 139, 28, 123, 218, 136, 28, 123, 218, 141, 28, 123, 218, 151, 28, 123,
+ 218, 152, 28, 123, 218, 135, 28, 123, 218, 145, 28, 123, 229, 244, 28,
+ 123, 229, 242, 28, 123, 212, 104, 28, 123, 212, 102, 28, 123, 212, 94,
+ 28, 123, 212, 97, 28, 123, 212, 103, 28, 123, 212, 99, 28, 123, 212, 98,
+ 28, 123, 212, 96, 28, 123, 212, 107, 28, 123, 212, 109, 28, 123, 212,
+ 110, 28, 123, 212, 105, 28, 123, 212, 95, 28, 123, 212, 100, 28, 123,
+ 212, 108, 28, 123, 246, 120, 28, 123, 246, 118, 28, 123, 246, 210, 28,
+ 123, 246, 208, 28, 123, 219, 107, 28, 123, 231, 101, 28, 123, 231, 92,
+ 28, 123, 231, 100, 28, 123, 231, 97, 28, 123, 231, 95, 28, 123, 231, 99,
+ 28, 123, 211, 157, 28, 123, 231, 104, 28, 123, 231, 105, 28, 123, 231,
+ 93, 28, 123, 231, 98, 28, 123, 203, 29, 28, 123, 246, 73, 28, 123, 246,
+ 121, 28, 123, 246, 119, 28, 123, 246, 211, 28, 123, 246, 209, 28, 123,
+ 246, 136, 28, 123, 246, 137, 28, 123, 246, 122, 28, 123, 246, 212, 28,
+ 123, 218, 188, 28, 123, 229, 245, 28, 123, 211, 158, 28, 123, 203, 35,
+ 28, 123, 229, 50, 28, 123, 222, 85, 28, 123, 222, 91, 28, 123, 222, 90,
+ 28, 123, 208, 234, 28, 123, 240, 7, 28, 176, 240, 7, 28, 176, 63, 28,
+ 176, 251, 109, 28, 176, 198, 28, 176, 203, 99, 28, 176, 241, 55, 28, 176,
+ 74, 28, 176, 203, 39, 28, 176, 203, 52, 28, 176, 78, 28, 176, 204, 111,
+ 28, 176, 204, 107, 28, 176, 220, 73, 28, 176, 202, 247, 28, 176, 68, 28,
+ 176, 204, 48, 28, 176, 204, 62, 28, 176, 204, 30, 28, 176, 202, 213, 28,
+ 176, 240, 238, 28, 176, 203, 11, 28, 176, 75, 28, 176, 255, 20, 28, 176,
+ 255, 19, 28, 176, 203, 113, 28, 176, 203, 111, 28, 176, 241, 53, 28, 176,
+ 241, 52, 28, 176, 241, 54, 28, 176, 203, 38, 28, 176, 203, 37, 28, 176,
+ 220, 181, 28, 176, 220, 182, 28, 176, 220, 175, 28, 176, 220, 180, 28,
+ 176, 220, 178, 28, 176, 202, 241, 28, 176, 202, 240, 28, 176, 202, 239,
+ 28, 176, 202, 242, 28, 176, 202, 243, 28, 176, 207, 97, 28, 176, 207, 96,
+ 28, 176, 207, 94, 28, 176, 207, 90, 28, 176, 207, 91, 28, 176, 202, 212,
+ 28, 176, 202, 209, 28, 176, 202, 210, 28, 176, 202, 204, 28, 176, 202,
+ 205, 28, 176, 202, 206, 28, 176, 202, 208, 28, 176, 240, 232, 28, 176,
+ 240, 234, 28, 176, 203, 10, 28, 176, 235, 205, 28, 176, 235, 197, 28,
+ 176, 235, 200, 28, 176, 235, 198, 28, 176, 235, 202, 28, 176, 235, 204,
+ 28, 176, 250, 137, 28, 176, 250, 134, 28, 176, 250, 132, 28, 176, 250,
+ 133, 28, 176, 211, 161, 28, 176, 255, 21, 28, 176, 203, 112, 28, 176,
+ 203, 36, 28, 176, 220, 177, 28, 176, 220, 176, 28, 107, 229, 59, 28, 107,
+ 211, 156, 28, 107, 229, 52, 28, 107, 222, 93, 28, 107, 222, 91, 28, 107,
+ 222, 90, 28, 107, 208, 240, 28, 107, 216, 47, 28, 107, 216, 42, 28, 107,
+ 216, 39, 28, 107, 216, 32, 28, 107, 216, 27, 28, 107, 216, 22, 28, 107,
+ 216, 33, 28, 107, 216, 45, 28, 107, 224, 141, 28, 107, 218, 153, 28, 107,
+ 218, 142, 28, 107, 212, 111, 28, 107, 211, 150, 28, 107, 231, 106, 28,
+ 107, 246, 74, 28, 107, 246, 138, 28, 107, 229, 120, 28, 107, 209, 66, 28,
+ 107, 218, 190, 28, 107, 236, 251, 28, 107, 229, 53, 28, 107, 229, 51, 28,
+ 107, 222, 89, 28, 107, 222, 83, 28, 107, 222, 85, 28, 107, 222, 88, 28,
+ 107, 222, 84, 28, 107, 208, 237, 28, 107, 208, 234, 28, 107, 216, 40, 28,
+ 107, 216, 35, 28, 107, 216, 21, 28, 107, 216, 20, 28, 107, 211, 152, 28,
+ 107, 216, 37, 28, 107, 216, 36, 28, 107, 216, 29, 28, 107, 216, 31, 28,
+ 107, 216, 44, 28, 107, 216, 24, 28, 107, 216, 34, 28, 107, 216, 43, 28,
+ 107, 216, 19, 28, 107, 224, 137, 28, 107, 224, 132, 28, 107, 224, 134,
+ 28, 107, 224, 131, 28, 107, 224, 129, 28, 107, 224, 135, 28, 107, 224,
+ 140, 28, 107, 224, 138, 28, 107, 229, 246, 28, 107, 218, 144, 28, 107,
+ 218, 145, 28, 107, 218, 150, 28, 107, 229, 244, 28, 107, 212, 104, 28,
+ 107, 212, 94, 28, 107, 212, 97, 28, 107, 212, 99, 28, 107, 219, 107, 28,
+ 107, 231, 101, 28, 107, 231, 94, 28, 107, 211, 157, 28, 107, 231, 102,
+ 28, 107, 203, 29, 28, 107, 203, 25, 28, 107, 203, 26, 28, 107, 218, 188,
+ 28, 107, 229, 245, 28, 107, 236, 249, 28, 107, 236, 247, 28, 107, 236,
+ 250, 28, 107, 236, 248, 28, 107, 203, 35, 28, 107, 229, 55, 28, 107, 229,
+ 54, 28, 107, 229, 58, 28, 107, 229, 56, 28, 107, 229, 57, 28, 107, 211,
+ 154, 33, 4, 152, 33, 4, 236, 26, 33, 4, 237, 3, 33, 4, 237, 157, 33, 4,
+ 237, 48, 33, 4, 237, 67, 33, 4, 236, 136, 33, 4, 236, 135, 33, 4, 228,
+ 113, 33, 4, 226, 239, 33, 4, 227, 148, 33, 4, 228, 112, 33, 4, 227, 226,
+ 33, 4, 227, 234, 33, 4, 227, 49, 33, 4, 226, 207, 33, 4, 237, 12, 33, 4,
+ 237, 6, 33, 4, 237, 8, 33, 4, 237, 11, 33, 4, 237, 9, 33, 4, 237, 10, 33,
+ 4, 237, 7, 33, 4, 237, 5, 33, 4, 192, 33, 4, 223, 246, 33, 4, 224, 155,
+ 33, 4, 225, 175, 33, 4, 225, 8, 33, 4, 225, 20, 33, 4, 224, 82, 33, 4,
+ 223, 180, 33, 4, 210, 80, 33, 4, 210, 74, 33, 4, 210, 76, 33, 4, 210, 79,
+ 33, 4, 210, 77, 33, 4, 210, 78, 33, 4, 210, 75, 33, 4, 210, 73, 33, 4,
+ 216, 220, 33, 4, 215, 145, 33, 4, 216, 57, 33, 4, 216, 216, 33, 4, 216,
+ 135, 33, 4, 216, 158, 33, 4, 215, 227, 33, 4, 215, 111, 33, 4, 215, 36,
+ 33, 4, 211, 10, 33, 4, 212, 162, 33, 4, 215, 33, 33, 4, 214, 165, 33, 4,
+ 214, 177, 33, 4, 212, 13, 33, 4, 210, 172, 33, 4, 213, 90, 33, 4, 212,
+ 199, 33, 4, 213, 11, 33, 4, 213, 85, 33, 4, 213, 41, 33, 4, 213, 43, 33,
+ 4, 212, 242, 33, 4, 212, 180, 33, 4, 217, 126, 33, 4, 217, 65, 33, 4,
+ 217, 88, 33, 4, 217, 125, 33, 4, 217, 105, 33, 4, 217, 106, 33, 4, 217,
+ 77, 33, 4, 217, 76, 33, 4, 217, 19, 33, 4, 217, 15, 33, 4, 217, 18, 33,
+ 4, 217, 16, 33, 4, 217, 17, 33, 4, 217, 102, 33, 4, 217, 94, 33, 4, 217,
+ 97, 33, 4, 217, 101, 33, 4, 217, 98, 33, 4, 217, 99, 33, 4, 217, 96, 33,
+ 4, 217, 93, 33, 4, 217, 89, 33, 4, 217, 92, 33, 4, 217, 90, 33, 4, 217,
+ 91, 33, 4, 249, 32, 33, 4, 247, 193, 33, 4, 248, 86, 33, 4, 249, 30, 33,
+ 4, 248, 150, 33, 4, 248, 162, 33, 4, 248, 23, 33, 4, 247, 142, 33, 4,
+ 206, 86, 33, 4, 204, 163, 33, 4, 205, 230, 33, 4, 206, 85, 33, 4, 206,
+ 50, 33, 4, 206, 55, 33, 4, 205, 189, 33, 4, 204, 154, 33, 4, 210, 22, 33,
+ 4, 207, 203, 33, 4, 209, 2, 33, 4, 210, 18, 33, 4, 209, 176, 33, 4, 209,
+ 187, 33, 4, 135, 33, 4, 207, 160, 33, 4, 247, 92, 33, 4, 245, 110, 33, 4,
+ 246, 79, 33, 4, 247, 91, 33, 4, 246, 230, 33, 4, 246, 238, 33, 4, 245,
+ 254, 33, 4, 245, 74, 33, 4, 203, 182, 33, 4, 203, 152, 33, 4, 203, 170,
+ 33, 4, 203, 181, 33, 4, 203, 175, 33, 4, 203, 176, 33, 4, 203, 160, 33,
+ 4, 203, 159, 33, 4, 203, 146, 33, 4, 203, 142, 33, 4, 203, 145, 33, 4,
+ 203, 143, 33, 4, 203, 144, 33, 4, 201, 201, 33, 4, 221, 84, 33, 4, 222,
+ 100, 33, 4, 223, 106, 33, 4, 222, 235, 33, 4, 222, 240, 33, 4, 221, 191,
+ 33, 4, 221, 20, 33, 4, 221, 11, 33, 4, 220, 226, 33, 4, 220, 248, 33, 4,
+ 221, 10, 33, 4, 221, 0, 33, 4, 221, 1, 33, 4, 220, 233, 33, 4, 220, 216,
+ 33, 4, 238, 45, 63, 33, 4, 238, 45, 68, 33, 4, 238, 45, 75, 33, 4, 238,
+ 45, 252, 25, 33, 4, 238, 45, 241, 161, 33, 4, 238, 45, 74, 33, 4, 238,
+ 45, 78, 33, 4, 238, 45, 204, 111, 33, 4, 173, 33, 4, 228, 209, 33, 4,
+ 229, 100, 33, 4, 230, 41, 33, 4, 229, 198, 33, 4, 229, 201, 33, 4, 229,
+ 26, 33, 4, 229, 25, 33, 4, 228, 167, 33, 4, 228, 160, 33, 4, 228, 166,
+ 33, 4, 228, 161, 33, 4, 228, 162, 33, 4, 228, 153, 33, 4, 228, 147, 33,
+ 4, 228, 149, 33, 4, 228, 152, 33, 4, 228, 150, 33, 4, 228, 151, 33, 4,
+ 228, 148, 33, 4, 228, 146, 33, 4, 228, 142, 33, 4, 228, 145, 33, 4, 228,
+ 143, 33, 4, 228, 144, 33, 4, 204, 111, 33, 4, 203, 217, 33, 4, 204, 30,
+ 33, 4, 204, 110, 33, 4, 204, 55, 33, 4, 204, 62, 33, 4, 204, 0, 33, 4,
+ 203, 255, 33, 4, 218, 199, 63, 33, 4, 218, 199, 68, 33, 4, 218, 199, 75,
+ 33, 4, 218, 199, 252, 25, 33, 4, 218, 199, 241, 161, 33, 4, 218, 199, 74,
+ 33, 4, 218, 199, 78, 33, 4, 202, 116, 33, 4, 202, 6, 33, 4, 202, 39, 33,
+ 4, 202, 114, 33, 4, 202, 90, 33, 4, 202, 92, 33, 4, 202, 17, 33, 4, 201,
+ 249, 33, 4, 202, 80, 33, 4, 202, 57, 33, 4, 202, 66, 33, 4, 202, 79, 33,
+ 4, 202, 70, 33, 4, 202, 71, 33, 4, 202, 63, 33, 4, 202, 48, 33, 4, 198,
+ 33, 4, 202, 213, 33, 4, 203, 11, 33, 4, 203, 110, 33, 4, 203, 49, 33, 4,
+ 203, 52, 33, 4, 202, 247, 33, 4, 202, 238, 33, 4, 244, 212, 33, 4, 242,
+ 42, 33, 4, 243, 233, 33, 4, 244, 211, 33, 4, 244, 61, 33, 4, 244, 75, 33,
+ 4, 243, 113, 33, 4, 242, 10, 33, 4, 244, 120, 33, 4, 244, 85, 33, 4, 244,
+ 97, 33, 4, 244, 119, 33, 4, 244, 107, 33, 4, 244, 108, 33, 4, 244, 90,
+ 33, 4, 244, 76, 33, 4, 230, 181, 33, 4, 230, 82, 33, 4, 230, 141, 33, 4,
+ 230, 180, 33, 4, 230, 159, 33, 4, 230, 161, 33, 4, 230, 101, 33, 4, 230,
+ 62, 33, 4, 239, 8, 33, 4, 237, 230, 33, 4, 238, 81, 33, 4, 239, 5, 33, 4,
+ 238, 182, 33, 4, 238, 190, 33, 4, 238, 39, 33, 4, 238, 38, 33, 4, 237,
+ 190, 33, 4, 237, 186, 33, 4, 237, 189, 33, 4, 237, 187, 33, 4, 237, 188,
+ 33, 4, 238, 155, 33, 4, 238, 135, 33, 4, 238, 145, 33, 4, 238, 154, 33,
+ 4, 238, 149, 33, 4, 238, 150, 33, 4, 238, 139, 33, 4, 238, 124, 33, 4,
+ 209, 108, 33, 4, 209, 22, 33, 4, 209, 70, 33, 4, 209, 107, 33, 4, 209,
+ 90, 33, 4, 209, 92, 33, 4, 209, 47, 33, 4, 209, 13, 33, 4, 246, 199, 33,
+ 4, 246, 98, 33, 4, 246, 142, 33, 4, 246, 198, 33, 4, 246, 166, 33, 4,
+ 246, 170, 33, 4, 246, 116, 33, 4, 246, 87, 33, 4, 218, 208, 33, 4, 218,
+ 173, 33, 4, 218, 192, 33, 4, 218, 207, 33, 4, 218, 194, 33, 4, 218, 195,
+ 33, 4, 218, 180, 33, 4, 218, 169, 33, 4, 208, 20, 33, 4, 207, 249, 33, 4,
+ 207, 255, 33, 4, 208, 19, 33, 4, 208, 13, 33, 4, 208, 14, 33, 4, 207,
+ 253, 33, 4, 207, 247, 33, 4, 207, 106, 33, 4, 207, 98, 33, 4, 207, 102,
+ 33, 4, 207, 105, 33, 4, 207, 103, 33, 4, 207, 104, 33, 4, 207, 100, 33,
+ 4, 207, 99, 33, 4, 240, 108, 33, 4, 239, 108, 33, 4, 240, 26, 33, 4, 240,
+ 107, 33, 4, 240, 53, 33, 4, 240, 60, 33, 4, 239, 186, 33, 4, 239, 86, 33,
+ 4, 185, 33, 4, 217, 191, 33, 4, 218, 167, 33, 4, 219, 168, 33, 4, 219,
+ 23, 33, 4, 219, 34, 33, 4, 218, 69, 33, 4, 217, 152, 33, 4, 215, 101, 33,
+ 4, 223, 169, 33, 4, 239, 80, 33, 39, 238, 179, 25, 22, 227, 196, 82, 33,
+ 39, 22, 227, 196, 82, 33, 39, 238, 179, 82, 33, 214, 168, 82, 33, 203,
+ 237, 33, 239, 102, 211, 61, 33, 245, 233, 33, 213, 143, 33, 245, 242, 33,
+ 217, 246, 245, 242, 33, 217, 47, 82, 33, 219, 89, 213, 130, 33, 17, 105,
+ 33, 17, 108, 33, 17, 147, 33, 17, 149, 33, 17, 170, 33, 17, 195, 33, 17,
+ 213, 111, 33, 17, 199, 33, 17, 222, 63, 33, 42, 209, 152, 33, 42, 207,
+ 151, 33, 42, 209, 53, 33, 42, 239, 153, 33, 42, 240, 18, 33, 42, 212, 74,
+ 33, 42, 213, 105, 33, 42, 241, 134, 33, 42, 222, 58, 33, 42, 236, 11, 33,
+ 42, 209, 153, 209, 36, 33, 4, 214, 173, 223, 180, 33, 4, 223, 176, 33, 4,
+ 223, 177, 33, 4, 223, 178, 33, 4, 214, 173, 247, 142, 33, 4, 247, 139,
+ 33, 4, 247, 140, 33, 4, 247, 141, 33, 4, 214, 173, 239, 86, 33, 4, 239,
+ 82, 33, 4, 239, 83, 33, 4, 239, 84, 33, 4, 214, 173, 217, 152, 33, 4,
+ 217, 148, 33, 4, 217, 149, 33, 4, 217, 150, 33, 208, 162, 131, 202, 250,
+ 33, 208, 162, 131, 244, 22, 33, 208, 162, 131, 216, 2, 33, 208, 162, 131,
+ 212, 228, 216, 2, 33, 208, 162, 131, 243, 207, 33, 208, 162, 131, 229,
+ 179, 33, 208, 162, 131, 246, 124, 33, 208, 162, 131, 237, 0, 33, 208,
+ 162, 131, 244, 21, 33, 208, 162, 131, 228, 181, 90, 1, 63, 90, 1, 74, 90,
+ 1, 75, 90, 1, 78, 90, 1, 68, 90, 1, 206, 164, 90, 1, 239, 8, 90, 1, 173,
+ 90, 1, 238, 190, 90, 1, 238, 81, 90, 1, 238, 39, 90, 1, 237, 230, 90, 1,
+ 237, 192, 90, 1, 152, 90, 1, 237, 67, 90, 1, 237, 3, 90, 1, 236, 136, 90,
+ 1, 236, 26, 90, 1, 235, 255, 90, 1, 228, 113, 90, 1, 227, 234, 90, 1,
+ 227, 148, 90, 1, 227, 49, 90, 1, 226, 239, 90, 1, 226, 208, 90, 1, 192,
+ 90, 1, 225, 20, 90, 1, 224, 155, 90, 1, 224, 82, 90, 1, 223, 246, 90, 1,
+ 201, 201, 90, 1, 236, 160, 90, 1, 223, 93, 90, 1, 222, 240, 90, 1, 222,
+ 100, 90, 1, 221, 191, 90, 1, 221, 84, 90, 1, 221, 22, 90, 1, 217, 64, 90,
+ 1, 217, 50, 90, 1, 217, 43, 90, 1, 217, 34, 90, 1, 217, 23, 90, 1, 217,
+ 21, 90, 1, 215, 36, 90, 1, 194, 90, 1, 214, 177, 90, 1, 212, 162, 90, 1,
+ 212, 13, 90, 1, 211, 10, 90, 1, 210, 177, 90, 1, 244, 212, 90, 1, 210,
+ 22, 90, 1, 244, 75, 90, 1, 209, 187, 90, 1, 243, 233, 90, 1, 209, 2, 90,
+ 1, 243, 113, 90, 1, 242, 42, 90, 1, 242, 13, 90, 1, 243, 124, 90, 1, 208,
+ 190, 90, 1, 208, 189, 90, 1, 208, 178, 90, 1, 208, 177, 90, 1, 208, 176,
+ 90, 1, 208, 175, 90, 1, 208, 20, 90, 1, 208, 14, 90, 1, 207, 255, 90, 1,
+ 207, 253, 90, 1, 207, 249, 90, 1, 207, 248, 90, 1, 204, 111, 90, 1, 204,
+ 62, 90, 1, 204, 30, 90, 1, 204, 0, 90, 1, 203, 217, 90, 1, 203, 204, 90,
+ 1, 198, 90, 1, 203, 52, 90, 1, 203, 11, 90, 1, 202, 247, 90, 1, 202, 213,
+ 90, 1, 202, 177, 90, 1, 223, 187, 90, 5, 1, 203, 52, 90, 5, 1, 203, 11,
+ 90, 5, 1, 202, 247, 90, 5, 1, 202, 213, 90, 5, 1, 202, 177, 90, 5, 1,
+ 223, 187, 19, 20, 235, 220, 19, 20, 74, 19, 20, 251, 245, 19, 20, 75, 19,
+ 20, 231, 83, 19, 20, 78, 19, 20, 220, 18, 19, 20, 203, 123, 220, 18, 19,
+ 20, 88, 241, 161, 19, 20, 88, 75, 19, 20, 63, 19, 20, 252, 25, 19, 20,
+ 204, 62, 19, 20, 196, 204, 62, 19, 20, 204, 30, 19, 20, 196, 204, 30, 19,
+ 20, 204, 19, 19, 20, 196, 204, 19, 19, 20, 204, 0, 19, 20, 196, 204, 0,
+ 19, 20, 203, 244, 19, 20, 196, 203, 244, 19, 20, 223, 68, 203, 244, 19,
+ 20, 204, 111, 19, 20, 196, 204, 111, 19, 20, 204, 110, 19, 20, 196, 204,
+ 110, 19, 20, 223, 68, 204, 110, 19, 20, 251, 64, 19, 20, 203, 123, 204,
+ 144, 19, 20, 238, 45, 211, 61, 19, 20, 46, 165, 19, 20, 46, 237, 253, 19,
+ 20, 46, 247, 248, 162, 215, 252, 19, 20, 46, 208, 145, 162, 215, 252, 19,
+ 20, 46, 50, 162, 215, 252, 19, 20, 46, 215, 252, 19, 20, 46, 52, 165, 19,
+ 20, 46, 52, 212, 228, 80, 211, 19, 19, 20, 46, 101, 243, 85, 19, 20, 46,
+ 212, 228, 236, 106, 95, 19, 20, 46, 218, 76, 19, 20, 46, 121, 210, 3, 19,
+ 20, 241, 92, 19, 20, 231, 49, 19, 20, 220, 31, 19, 20, 250, 231, 19, 20,
+ 219, 34, 19, 20, 219, 166, 19, 20, 218, 167, 19, 20, 218, 129, 19, 20,
+ 218, 69, 19, 20, 218, 45, 19, 20, 203, 123, 218, 45, 19, 20, 88, 237, 48,
+ 19, 20, 88, 237, 3, 19, 20, 185, 19, 20, 219, 168, 19, 20, 217, 150, 19,
+ 20, 196, 217, 150, 19, 20, 217, 148, 19, 20, 196, 217, 148, 19, 20, 217,
+ 147, 19, 20, 196, 217, 147, 19, 20, 217, 145, 19, 20, 196, 217, 145, 19,
+ 20, 217, 144, 19, 20, 196, 217, 144, 19, 20, 217, 152, 19, 20, 196, 217,
+ 152, 19, 20, 217, 151, 19, 20, 196, 217, 151, 19, 20, 203, 123, 217, 151,
+ 19, 20, 219, 184, 19, 20, 196, 219, 184, 19, 20, 88, 237, 171, 19, 20,
+ 209, 187, 19, 20, 210, 16, 19, 20, 209, 2, 19, 20, 208, 242, 19, 20, 135,
+ 19, 20, 208, 148, 19, 20, 203, 123, 208, 148, 19, 20, 88, 244, 61, 19,
+ 20, 88, 243, 233, 19, 20, 210, 22, 19, 20, 210, 18, 19, 20, 207, 158, 19,
+ 20, 196, 207, 158, 19, 20, 207, 140, 19, 20, 196, 207, 140, 19, 20, 207,
+ 139, 19, 20, 196, 207, 139, 19, 20, 108, 19, 20, 196, 108, 19, 20, 207,
+ 130, 19, 20, 196, 207, 130, 19, 20, 207, 160, 19, 20, 196, 207, 160, 19,
+ 20, 207, 159, 19, 20, 196, 207, 159, 19, 20, 223, 68, 207, 159, 19, 20,
+ 210, 69, 19, 20, 207, 236, 19, 20, 207, 220, 19, 20, 207, 218, 19, 20,
+ 207, 241, 19, 20, 229, 201, 19, 20, 230, 36, 19, 20, 229, 100, 19, 20,
+ 229, 87, 19, 20, 229, 26, 19, 20, 229, 6, 19, 20, 203, 123, 229, 6, 19,
+ 20, 173, 19, 20, 230, 41, 19, 20, 228, 162, 19, 20, 196, 228, 162, 19,
+ 20, 228, 160, 19, 20, 196, 228, 160, 19, 20, 228, 159, 19, 20, 196, 228,
+ 159, 19, 20, 228, 157, 19, 20, 196, 228, 157, 19, 20, 228, 156, 19, 20,
+ 196, 228, 156, 19, 20, 228, 167, 19, 20, 196, 228, 167, 19, 20, 228, 166,
+ 19, 20, 196, 228, 166, 19, 20, 223, 68, 228, 166, 19, 20, 230, 54, 19,
+ 20, 228, 168, 19, 20, 211, 237, 229, 191, 19, 20, 211, 237, 229, 88, 19,
+ 20, 211, 237, 229, 20, 19, 20, 211, 237, 230, 20, 19, 20, 246, 238, 19,
+ 20, 247, 90, 19, 20, 246, 79, 19, 20, 246, 69, 19, 20, 245, 254, 19, 20,
+ 245, 180, 19, 20, 203, 123, 245, 180, 19, 20, 247, 92, 19, 20, 247, 91,
+ 19, 20, 245, 72, 19, 20, 196, 245, 72, 19, 20, 245, 70, 19, 20, 196, 245,
+ 70, 19, 20, 245, 69, 19, 20, 196, 245, 69, 19, 20, 245, 68, 19, 20, 196,
+ 245, 68, 19, 20, 245, 67, 19, 20, 196, 245, 67, 19, 20, 245, 74, 19, 20,
+ 196, 245, 74, 19, 20, 245, 73, 19, 20, 196, 245, 73, 19, 20, 223, 68,
+ 245, 73, 19, 20, 247, 125, 19, 20, 214, 206, 209, 110, 19, 20, 225, 20,
+ 19, 20, 225, 174, 19, 20, 224, 155, 19, 20, 224, 125, 19, 20, 224, 82,
+ 19, 20, 224, 35, 19, 20, 203, 123, 224, 35, 19, 20, 192, 19, 20, 225,
+ 175, 19, 20, 223, 178, 19, 20, 196, 223, 178, 19, 20, 223, 176, 19, 20,
+ 196, 223, 176, 19, 20, 223, 175, 19, 20, 196, 223, 175, 19, 20, 223, 174,
+ 19, 20, 196, 223, 174, 19, 20, 223, 173, 19, 20, 196, 223, 173, 19, 20,
+ 223, 180, 19, 20, 196, 223, 180, 19, 20, 223, 179, 19, 20, 196, 223, 179,
+ 19, 20, 223, 68, 223, 179, 19, 20, 226, 185, 19, 20, 196, 226, 185, 19,
+ 20, 224, 159, 19, 20, 250, 48, 226, 185, 19, 20, 214, 206, 226, 185, 19,
+ 20, 222, 240, 19, 20, 223, 105, 19, 20, 222, 100, 19, 20, 222, 75, 19,
+ 20, 221, 191, 19, 20, 221, 180, 19, 20, 203, 123, 221, 180, 19, 20, 201,
+ 201, 19, 20, 223, 106, 19, 20, 221, 18, 19, 20, 196, 221, 18, 19, 20,
+ 221, 20, 19, 20, 196, 221, 20, 19, 20, 221, 19, 19, 20, 196, 221, 19, 19,
+ 20, 223, 68, 221, 19, 19, 20, 223, 163, 19, 20, 88, 222, 205, 19, 20,
+ 222, 105, 19, 20, 227, 234, 19, 20, 228, 111, 19, 20, 227, 148, 19, 20,
+ 227, 130, 19, 20, 227, 49, 19, 20, 227, 18, 19, 20, 203, 123, 227, 18,
+ 19, 20, 228, 113, 19, 20, 228, 112, 19, 20, 226, 205, 19, 20, 196, 226,
+ 205, 19, 20, 226, 204, 19, 20, 196, 226, 204, 19, 20, 226, 203, 19, 20,
+ 196, 226, 203, 19, 20, 226, 202, 19, 20, 196, 226, 202, 19, 20, 226, 201,
+ 19, 20, 196, 226, 201, 19, 20, 226, 207, 19, 20, 196, 226, 207, 19, 20,
+ 226, 206, 19, 20, 196, 226, 206, 19, 20, 159, 19, 20, 196, 159, 19, 20,
+ 174, 159, 19, 20, 214, 177, 19, 20, 215, 31, 19, 20, 212, 162, 19, 20,
+ 212, 142, 19, 20, 212, 13, 19, 20, 211, 250, 19, 20, 203, 123, 211, 250,
+ 19, 20, 215, 36, 19, 20, 215, 33, 19, 20, 210, 168, 19, 20, 196, 210,
+ 168, 19, 20, 210, 162, 19, 20, 196, 210, 162, 19, 20, 210, 161, 19, 20,
+ 196, 210, 161, 19, 20, 210, 157, 19, 20, 196, 210, 157, 19, 20, 210, 156,
+ 19, 20, 196, 210, 156, 19, 20, 210, 172, 19, 20, 196, 210, 172, 19, 20,
+ 210, 171, 19, 20, 196, 210, 171, 19, 20, 223, 68, 210, 171, 19, 20, 194,
+ 19, 20, 250, 48, 194, 19, 20, 210, 173, 19, 20, 248, 40, 194, 19, 20,
+ 224, 28, 212, 70, 19, 20, 223, 68, 212, 61, 19, 20, 223, 68, 215, 92, 19,
+ 20, 223, 68, 211, 179, 19, 20, 223, 68, 211, 13, 19, 20, 223, 68, 212,
+ 60, 19, 20, 223, 68, 214, 180, 19, 20, 213, 43, 19, 20, 213, 11, 19, 20,
+ 213, 6, 19, 20, 212, 242, 19, 20, 212, 236, 19, 20, 213, 90, 19, 20, 213,
+ 85, 19, 20, 212, 177, 19, 20, 196, 212, 177, 19, 20, 212, 176, 19, 20,
+ 196, 212, 176, 19, 20, 212, 175, 19, 20, 196, 212, 175, 19, 20, 212, 174,
+ 19, 20, 196, 212, 174, 19, 20, 212, 173, 19, 20, 196, 212, 173, 19, 20,
+ 212, 180, 19, 20, 196, 212, 180, 19, 20, 212, 179, 19, 20, 196, 212, 179,
+ 19, 20, 213, 92, 19, 20, 203, 52, 19, 20, 203, 108, 19, 20, 203, 11, 19,
+ 20, 203, 2, 19, 20, 202, 247, 19, 20, 202, 232, 19, 20, 203, 123, 202,
+ 232, 19, 20, 198, 19, 20, 203, 110, 19, 20, 202, 174, 19, 20, 196, 202,
+ 174, 19, 20, 202, 173, 19, 20, 196, 202, 173, 19, 20, 202, 172, 19, 20,
+ 196, 202, 172, 19, 20, 202, 171, 19, 20, 196, 202, 171, 19, 20, 202, 170,
+ 19, 20, 196, 202, 170, 19, 20, 202, 176, 19, 20, 196, 202, 176, 19, 20,
+ 202, 175, 19, 20, 196, 202, 175, 19, 20, 223, 68, 202, 175, 19, 20, 203,
+ 124, 19, 20, 248, 84, 203, 124, 19, 20, 196, 203, 124, 19, 20, 214, 206,
+ 203, 11, 19, 20, 216, 158, 19, 20, 217, 0, 216, 158, 19, 20, 196, 227,
+ 234, 19, 20, 216, 215, 19, 20, 216, 57, 19, 20, 216, 3, 19, 20, 215, 227,
+ 19, 20, 215, 208, 19, 20, 196, 227, 49, 19, 20, 216, 220, 19, 20, 216,
+ 216, 19, 20, 196, 228, 113, 19, 20, 215, 110, 19, 20, 196, 215, 110, 19,
+ 20, 146, 19, 20, 196, 146, 19, 20, 174, 146, 19, 20, 240, 60, 19, 20,
+ 240, 105, 19, 20, 240, 26, 19, 20, 240, 12, 19, 20, 239, 186, 19, 20,
+ 239, 175, 19, 20, 240, 108, 19, 20, 240, 107, 19, 20, 239, 85, 19, 20,
+ 196, 239, 85, 19, 20, 240, 174, 19, 20, 209, 92, 19, 20, 223, 161, 209,
+ 92, 19, 20, 209, 70, 19, 20, 223, 161, 209, 70, 19, 20, 209, 64, 19, 20,
+ 223, 161, 209, 64, 19, 20, 209, 47, 19, 20, 209, 42, 19, 20, 209, 108,
+ 19, 20, 209, 107, 19, 20, 209, 12, 19, 20, 196, 209, 12, 19, 20, 209,
+ 110, 19, 20, 207, 227, 19, 20, 207, 225, 19, 20, 207, 224, 19, 20, 207,
+ 229, 19, 20, 207, 230, 19, 20, 207, 124, 19, 20, 207, 123, 19, 20, 207,
+ 122, 19, 20, 207, 126, 19, 20, 221, 39, 237, 67, 19, 20, 221, 39, 237, 3,
+ 19, 20, 221, 39, 236, 239, 19, 20, 221, 39, 236, 136, 19, 20, 221, 39,
+ 236, 117, 19, 20, 221, 39, 152, 19, 20, 221, 39, 237, 157, 19, 20, 221,
+ 39, 237, 171, 19, 20, 221, 38, 237, 171, 19, 20, 236, 226, 19, 20, 217,
+ 122, 19, 20, 217, 88, 19, 20, 217, 83, 19, 20, 217, 77, 19, 20, 217, 72,
+ 19, 20, 217, 126, 19, 20, 217, 125, 19, 20, 217, 134, 19, 20, 208, 186,
+ 19, 20, 208, 184, 19, 20, 208, 183, 19, 20, 208, 187, 19, 20, 196, 216,
+ 158, 19, 20, 196, 216, 57, 19, 20, 196, 215, 227, 19, 20, 196, 216, 220,
+ 19, 20, 222, 201, 19, 20, 222, 151, 19, 20, 222, 147, 19, 20, 222, 128,
+ 19, 20, 222, 123, 19, 20, 222, 203, 19, 20, 222, 202, 19, 20, 222, 205,
+ 19, 20, 221, 220, 19, 20, 214, 206, 213, 43, 19, 20, 214, 206, 213, 11,
+ 19, 20, 214, 206, 212, 242, 19, 20, 214, 206, 213, 90, 19, 20, 203, 242,
+ 209, 92, 19, 20, 203, 242, 209, 70, 19, 20, 203, 242, 209, 47, 19, 20,
+ 203, 242, 209, 108, 19, 20, 203, 242, 209, 110, 19, 20, 227, 155, 19, 20,
+ 227, 154, 19, 20, 227, 153, 19, 20, 227, 152, 19, 20, 227, 161, 19, 20,
+ 227, 160, 19, 20, 227, 162, 19, 20, 209, 109, 209, 92, 19, 20, 209, 109,
+ 209, 70, 19, 20, 209, 109, 209, 64, 19, 20, 209, 109, 209, 47, 19, 20,
+ 209, 109, 209, 42, 19, 20, 209, 109, 209, 108, 19, 20, 209, 109, 209,
+ 107, 19, 20, 209, 109, 209, 110, 19, 20, 251, 50, 249, 255, 19, 20, 248,
+ 40, 74, 19, 20, 248, 40, 75, 19, 20, 248, 40, 78, 19, 20, 248, 40, 63,
+ 19, 20, 248, 40, 204, 62, 19, 20, 248, 40, 204, 30, 19, 20, 248, 40, 204,
+ 0, 19, 20, 248, 40, 204, 111, 19, 20, 248, 40, 222, 240, 19, 20, 248, 40,
+ 222, 100, 19, 20, 248, 40, 221, 191, 19, 20, 248, 40, 201, 201, 19, 20,
+ 248, 40, 229, 201, 19, 20, 248, 40, 229, 100, 19, 20, 248, 40, 229, 26,
+ 19, 20, 248, 40, 173, 19, 20, 214, 206, 237, 67, 19, 20, 214, 206, 237,
+ 3, 19, 20, 214, 206, 236, 136, 19, 20, 214, 206, 152, 19, 20, 88, 238,
+ 87, 19, 20, 88, 238, 91, 19, 20, 88, 238, 105, 19, 20, 88, 238, 104, 19,
+ 20, 88, 238, 93, 19, 20, 88, 238, 119, 19, 20, 88, 215, 145, 19, 20, 88,
+ 215, 227, 19, 20, 88, 216, 158, 19, 20, 88, 216, 135, 19, 20, 88, 216,
+ 57, 19, 20, 88, 216, 220, 19, 20, 88, 203, 217, 19, 20, 88, 204, 0, 19,
+ 20, 88, 204, 62, 19, 20, 88, 204, 55, 19, 20, 88, 204, 30, 19, 20, 88,
+ 204, 111, 19, 20, 88, 235, 247, 19, 20, 88, 235, 248, 19, 20, 88, 235,
+ 251, 19, 20, 88, 235, 250, 19, 20, 88, 235, 249, 19, 20, 88, 235, 254,
+ 19, 20, 88, 209, 22, 19, 20, 88, 209, 47, 19, 20, 88, 209, 92, 19, 20,
+ 88, 209, 90, 19, 20, 88, 209, 70, 19, 20, 88, 209, 108, 19, 20, 88, 207,
+ 208, 19, 20, 88, 207, 218, 19, 20, 88, 207, 236, 19, 20, 88, 207, 235,
+ 19, 20, 88, 207, 220, 19, 20, 88, 207, 241, 19, 20, 88, 217, 191, 19, 20,
+ 88, 218, 69, 19, 20, 88, 219, 34, 19, 20, 88, 219, 23, 19, 20, 88, 218,
+ 167, 19, 20, 88, 185, 19, 20, 88, 219, 184, 19, 20, 88, 237, 230, 19, 20,
+ 88, 238, 39, 19, 20, 88, 238, 190, 19, 20, 88, 238, 182, 19, 20, 88, 238,
+ 81, 19, 20, 88, 239, 8, 19, 20, 88, 229, 109, 19, 20, 88, 229, 115, 19,
+ 20, 88, 229, 129, 19, 20, 88, 229, 128, 19, 20, 88, 229, 122, 19, 20, 88,
+ 229, 144, 19, 20, 88, 229, 42, 19, 20, 88, 229, 43, 19, 20, 88, 229, 46,
+ 19, 20, 88, 229, 45, 19, 20, 88, 229, 44, 19, 20, 88, 229, 47, 19, 20,
+ 88, 229, 48, 19, 20, 88, 221, 84, 19, 20, 88, 221, 191, 19, 20, 88, 222,
+ 240, 19, 20, 88, 222, 235, 19, 20, 88, 222, 100, 19, 20, 88, 201, 201,
+ 19, 20, 88, 223, 246, 19, 20, 88, 224, 82, 19, 20, 88, 225, 20, 19, 20,
+ 88, 225, 8, 19, 20, 88, 224, 155, 19, 20, 88, 192, 19, 20, 88, 202, 213,
+ 19, 20, 88, 202, 247, 19, 20, 88, 203, 52, 19, 20, 88, 203, 49, 19, 20,
+ 88, 203, 11, 19, 20, 88, 198, 19, 20, 88, 230, 82, 19, 20, 214, 206, 230,
+ 82, 19, 20, 88, 230, 101, 19, 20, 88, 230, 161, 19, 20, 88, 230, 159, 19,
+ 20, 88, 230, 141, 19, 20, 214, 206, 230, 141, 19, 20, 88, 230, 181, 19,
+ 20, 88, 230, 114, 19, 20, 88, 230, 118, 19, 20, 88, 230, 128, 19, 20, 88,
+ 230, 127, 19, 20, 88, 230, 126, 19, 20, 88, 230, 129, 19, 20, 88, 226,
+ 239, 19, 20, 88, 227, 49, 19, 20, 88, 227, 234, 19, 20, 88, 227, 226, 19,
+ 20, 88, 227, 148, 19, 20, 88, 228, 113, 19, 20, 88, 243, 117, 19, 20, 88,
+ 243, 118, 19, 20, 88, 243, 123, 19, 20, 88, 243, 122, 19, 20, 88, 243,
+ 119, 19, 20, 88, 243, 124, 19, 20, 88, 227, 151, 19, 20, 88, 227, 153,
+ 19, 20, 88, 227, 157, 19, 20, 88, 227, 156, 19, 20, 88, 227, 155, 19, 20,
+ 88, 227, 161, 19, 20, 88, 208, 181, 19, 20, 88, 208, 183, 19, 20, 88,
+ 208, 186, 19, 20, 88, 208, 185, 19, 20, 88, 208, 184, 19, 20, 88, 208,
+ 187, 19, 20, 88, 208, 176, 19, 20, 88, 208, 177, 19, 20, 88, 208, 189,
+ 19, 20, 88, 208, 188, 19, 20, 88, 208, 178, 19, 20, 88, 208, 190, 19, 20,
+ 88, 202, 6, 19, 20, 88, 202, 17, 19, 20, 88, 202, 92, 19, 20, 88, 202,
+ 90, 19, 20, 88, 202, 39, 19, 20, 88, 202, 116, 19, 20, 88, 202, 159, 19,
+ 20, 88, 81, 202, 159, 19, 20, 88, 241, 242, 19, 20, 88, 241, 243, 19, 20,
+ 88, 241, 252, 19, 20, 88, 241, 251, 19, 20, 88, 241, 246, 19, 20, 88,
+ 241, 255, 19, 20, 88, 211, 10, 19, 20, 88, 212, 13, 19, 20, 88, 214, 177,
+ 19, 20, 88, 214, 165, 19, 20, 88, 212, 162, 19, 20, 88, 215, 36, 19, 20,
+ 88, 212, 199, 19, 20, 88, 212, 242, 19, 20, 88, 213, 43, 19, 20, 88, 213,
+ 41, 19, 20, 88, 213, 11, 19, 20, 88, 213, 90, 19, 20, 88, 213, 92, 19,
+ 20, 88, 207, 249, 19, 20, 88, 207, 253, 19, 20, 88, 208, 14, 19, 20, 88,
+ 208, 13, 19, 20, 88, 207, 255, 19, 20, 88, 208, 20, 19, 20, 88, 246, 98,
+ 19, 20, 88, 246, 116, 19, 20, 88, 246, 170, 19, 20, 88, 246, 166, 19, 20,
+ 88, 246, 142, 19, 20, 88, 246, 199, 19, 20, 88, 207, 211, 19, 20, 88,
+ 207, 212, 19, 20, 88, 207, 215, 19, 20, 88, 207, 214, 19, 20, 88, 207,
+ 213, 19, 20, 88, 207, 216, 19, 20, 246, 143, 54, 19, 20, 239, 102, 211,
+ 61, 19, 20, 217, 118, 19, 20, 222, 199, 19, 20, 221, 217, 19, 20, 221,
+ 216, 19, 20, 221, 215, 19, 20, 221, 214, 19, 20, 221, 219, 19, 20, 221,
+ 218, 19, 20, 203, 242, 209, 10, 19, 20, 203, 242, 209, 9, 19, 20, 203,
+ 242, 209, 8, 19, 20, 203, 242, 209, 7, 19, 20, 203, 242, 209, 6, 19, 20,
+ 203, 242, 209, 13, 19, 20, 203, 242, 209, 12, 19, 20, 203, 242, 46, 209,
+ 110, 19, 20, 248, 40, 204, 144, 220, 64, 211, 229, 82, 220, 64, 1, 248,
+ 132, 220, 64, 1, 226, 225, 220, 64, 1, 240, 57, 220, 64, 1, 215, 16, 220,
+ 64, 1, 222, 56, 220, 64, 1, 207, 36, 220, 64, 1, 244, 186, 220, 64, 1,
+ 208, 214, 220, 64, 1, 245, 245, 220, 64, 1, 246, 225, 220, 64, 1, 223,
+ 233, 220, 64, 1, 238, 20, 220, 64, 1, 222, 189, 220, 64, 1, 211, 54, 220,
+ 64, 1, 215, 138, 220, 64, 1, 251, 61, 220, 64, 1, 220, 22, 220, 64, 1,
+ 206, 210, 220, 64, 1, 241, 187, 220, 64, 1, 230, 233, 220, 64, 1, 241,
+ 188, 220, 64, 1, 219, 244, 220, 64, 1, 207, 15, 220, 64, 1, 231, 89, 220,
+ 64, 1, 241, 185, 220, 64, 1, 219, 13, 220, 64, 240, 56, 82, 220, 64, 216,
+ 73, 240, 56, 82, 197, 1, 240, 46, 240, 38, 240, 61, 240, 174, 197, 1,
+ 206, 164, 197, 1, 206, 195, 206, 211, 68, 197, 1, 202, 216, 197, 1, 203,
+ 124, 197, 1, 204, 144, 197, 1, 209, 15, 209, 14, 209, 40, 197, 1, 240,
+ 243, 197, 1, 250, 199, 63, 197, 1, 219, 228, 78, 197, 1, 251, 142, 63,
+ 197, 1, 251, 93, 197, 1, 227, 24, 78, 197, 1, 212, 221, 78, 197, 1, 78,
+ 197, 1, 220, 73, 197, 1, 220, 31, 197, 1, 216, 195, 216, 208, 216, 120,
+ 146, 197, 1, 229, 216, 197, 1, 246, 221, 197, 1, 229, 217, 230, 54, 197,
+ 1, 239, 75, 197, 1, 241, 78, 197, 1, 238, 185, 237, 177, 239, 75, 197, 1,
+ 238, 224, 197, 1, 203, 209, 203, 200, 204, 144, 197, 1, 237, 149, 237,
+ 171, 197, 1, 237, 153, 237, 171, 197, 1, 227, 26, 237, 171, 197, 1, 212,
+ 224, 237, 171, 197, 1, 223, 63, 221, 2, 223, 64, 223, 163, 197, 1, 212,
+ 222, 223, 163, 197, 1, 242, 80, 197, 1, 230, 212, 230, 216, 230, 203, 75,
+ 197, 1, 74, 197, 1, 230, 152, 230, 184, 197, 1, 238, 169, 197, 1, 227,
+ 27, 251, 109, 197, 1, 212, 226, 63, 197, 1, 230, 195, 241, 51, 197, 1,
+ 218, 226, 218, 251, 219, 184, 197, 1, 251, 23, 241, 49, 197, 1, 211, 234,
+ 194, 197, 1, 212, 146, 227, 23, 194, 197, 1, 212, 220, 194, 197, 1, 247,
+ 125, 197, 1, 202, 159, 197, 1, 208, 195, 208, 207, 207, 108, 210, 69,
+ 197, 1, 212, 219, 210, 69, 197, 1, 245, 51, 197, 1, 248, 111, 248, 114,
+ 248, 46, 249, 255, 197, 1, 212, 225, 249, 255, 197, 1, 242, 79, 197, 1,
+ 220, 2, 197, 1, 241, 146, 241, 148, 74, 197, 1, 225, 113, 225, 123, 226,
+ 185, 197, 1, 227, 25, 226, 185, 197, 1, 212, 223, 226, 185, 197, 1, 227,
+ 249, 228, 91, 227, 34, 159, 197, 1, 242, 81, 197, 1, 231, 23, 197, 1,
+ 231, 24, 197, 1, 244, 200, 244, 206, 245, 51, 197, 1, 219, 222, 240, 242,
+ 78, 197, 1, 241, 183, 197, 1, 230, 232, 197, 1, 245, 71, 197, 1, 247, 75,
+ 197, 1, 246, 237, 197, 1, 211, 99, 197, 1, 227, 22, 197, 1, 212, 218,
+ 197, 1, 235, 161, 197, 1, 217, 134, 197, 1, 203, 196, 197, 212, 120, 217,
+ 178, 197, 223, 226, 217, 178, 197, 245, 131, 217, 178, 197, 250, 108, 97,
+ 197, 207, 162, 97, 197, 248, 130, 97, 197, 1, 230, 54, 197, 1, 213, 92,
+ 197, 1, 220, 18, 197, 1, 239, 131, 247, 20, 219, 227, 197, 1, 239, 131,
+ 247, 20, 230, 215, 197, 1, 239, 131, 247, 20, 241, 147, 197, 1, 239, 131,
+ 247, 20, 251, 141, 197, 1, 239, 131, 247, 20, 251, 93, 209, 254, 1, 63,
+ 209, 254, 1, 75, 209, 254, 1, 68, 209, 254, 1, 173, 209, 254, 1, 239, 8,
+ 209, 254, 1, 222, 203, 209, 254, 1, 210, 22, 209, 254, 1, 244, 212, 209,
+ 254, 1, 201, 201, 209, 254, 1, 185, 209, 254, 1, 249, 32, 209, 254, 1,
+ 192, 209, 254, 1, 198, 209, 254, 1, 228, 113, 209, 254, 1, 204, 111, 209,
+ 254, 1, 215, 36, 209, 254, 1, 152, 209, 254, 22, 2, 75, 209, 254, 22, 2,
+ 68, 209, 254, 2, 205, 204, 237, 96, 1, 63, 237, 96, 1, 75, 237, 96, 1,
+ 68, 237, 96, 1, 173, 237, 96, 1, 239, 8, 237, 96, 1, 222, 203, 237, 96,
+ 1, 210, 22, 237, 96, 1, 244, 212, 237, 96, 1, 201, 201, 237, 96, 1, 185,
+ 237, 96, 1, 249, 32, 237, 96, 1, 192, 237, 96, 1, 198, 237, 96, 1, 216,
+ 220, 237, 96, 1, 228, 113, 237, 96, 1, 204, 111, 237, 96, 1, 215, 36,
+ 237, 96, 1, 152, 237, 96, 22, 2, 75, 237, 96, 22, 2, 68, 237, 96, 2, 219,
+ 124, 218, 185, 212, 120, 217, 178, 218, 185, 52, 217, 178, 247, 185, 1,
+ 63, 247, 185, 1, 75, 247, 185, 1, 68, 247, 185, 1, 173, 247, 185, 1, 239,
+ 8, 247, 185, 1, 222, 203, 247, 185, 1, 210, 22, 247, 185, 1, 244, 212,
+ 247, 185, 1, 201, 201, 247, 185, 1, 185, 247, 185, 1, 249, 32, 247, 185,
+ 1, 192, 247, 185, 1, 198, 247, 185, 1, 216, 220, 247, 185, 1, 228, 113,
+ 247, 185, 1, 204, 111, 247, 185, 1, 215, 36, 247, 185, 1, 152, 247, 185,
+ 22, 2, 75, 247, 185, 22, 2, 68, 209, 253, 1, 63, 209, 253, 1, 75, 209,
+ 253, 1, 68, 209, 253, 1, 173, 209, 253, 1, 239, 8, 209, 253, 1, 222, 203,
+ 209, 253, 1, 210, 22, 209, 253, 1, 244, 212, 209, 253, 1, 201, 201, 209,
+ 253, 1, 185, 209, 253, 1, 249, 32, 209, 253, 1, 192, 209, 253, 1, 198,
+ 209, 253, 1, 228, 113, 209, 253, 1, 204, 111, 209, 253, 1, 215, 36, 209,
+ 253, 22, 2, 75, 209, 253, 22, 2, 68, 85, 1, 173, 85, 1, 229, 144, 85, 1,
+ 229, 26, 85, 1, 229, 115, 85, 1, 222, 128, 85, 1, 247, 92, 85, 1, 246,
+ 199, 85, 1, 245, 254, 85, 1, 246, 116, 85, 1, 220, 233, 85, 1, 244, 212,
+ 85, 1, 207, 229, 85, 1, 243, 113, 85, 1, 207, 224, 85, 1, 221, 197, 85,
+ 1, 210, 22, 85, 1, 209, 108, 85, 1, 135, 85, 1, 209, 47, 85, 1, 221, 191,
+ 85, 1, 249, 32, 85, 1, 218, 208, 85, 1, 218, 69, 85, 1, 218, 180, 85, 1,
+ 224, 82, 85, 1, 202, 247, 85, 1, 215, 227, 85, 1, 227, 49, 85, 1, 205,
+ 189, 85, 1, 213, 90, 85, 1, 211, 124, 85, 1, 215, 36, 85, 1, 152, 85, 1,
+ 228, 113, 85, 1, 217, 126, 85, 231, 36, 22, 217, 112, 85, 231, 36, 22,
+ 217, 125, 85, 231, 36, 22, 217, 88, 85, 231, 36, 22, 217, 83, 85, 231,
+ 36, 22, 217, 65, 85, 231, 36, 22, 217, 35, 85, 231, 36, 22, 217, 23, 85,
+ 231, 36, 22, 217, 22, 85, 231, 36, 22, 215, 102, 85, 231, 36, 22, 215,
+ 95, 85, 231, 36, 22, 226, 199, 85, 231, 36, 22, 226, 188, 85, 231, 36,
+ 22, 217, 106, 85, 231, 36, 22, 217, 118, 85, 231, 36, 22, 217, 73, 207,
+ 121, 105, 85, 231, 36, 22, 217, 73, 207, 121, 108, 85, 231, 36, 22, 217,
+ 108, 85, 22, 231, 21, 250, 148, 85, 22, 231, 21, 252, 25, 85, 22, 2, 252,
+ 25, 85, 22, 2, 75, 85, 22, 2, 231, 83, 85, 22, 2, 203, 124, 85, 22, 2,
+ 202, 169, 85, 22, 2, 68, 85, 22, 2, 206, 178, 85, 22, 2, 207, 39, 85, 22,
+ 2, 220, 73, 85, 22, 2, 198, 85, 22, 2, 231, 110, 85, 22, 2, 74, 85, 22,
+ 2, 251, 109, 85, 22, 2, 251, 64, 85, 22, 2, 220, 18, 85, 22, 2, 250, 34,
+ 85, 2, 222, 73, 85, 2, 216, 156, 85, 2, 202, 180, 85, 2, 223, 190, 85, 2,
+ 208, 73, 85, 2, 248, 233, 85, 2, 215, 222, 85, 2, 208, 171, 85, 2, 230,
+ 11, 85, 2, 251, 66, 85, 2, 214, 244, 214, 237, 85, 2, 205, 201, 85, 2,
+ 245, 248, 85, 2, 248, 205, 85, 2, 229, 136, 85, 2, 248, 228, 85, 2, 247,
+ 64, 218, 130, 228, 173, 85, 2, 227, 203, 208, 148, 85, 2, 248, 100, 85,
+ 2, 218, 182, 223, 243, 85, 2, 229, 4, 85, 245, 92, 16, 216, 49, 85, 2,
+ 250, 16, 85, 2, 250, 37, 85, 17, 202, 84, 85, 17, 105, 85, 17, 108, 85,
+ 17, 147, 85, 17, 149, 85, 17, 170, 85, 17, 195, 85, 17, 213, 111, 85, 17,
+ 199, 85, 17, 222, 63, 85, 16, 227, 203, 250, 39, 211, 253, 85, 16, 227,
+ 203, 250, 39, 223, 210, 85, 16, 227, 203, 250, 39, 218, 129, 85, 16, 227,
+ 203, 250, 39, 248, 133, 85, 16, 227, 203, 250, 39, 247, 165, 85, 16, 227,
+ 203, 250, 39, 218, 7, 85, 16, 227, 203, 250, 39, 218, 1, 85, 16, 227,
+ 203, 250, 39, 217, 255, 85, 16, 227, 203, 250, 39, 218, 5, 85, 16, 227,
+ 203, 250, 39, 218, 3, 94, 248, 59, 94, 241, 108, 94, 245, 233, 94, 239,
+ 102, 211, 61, 94, 245, 242, 94, 239, 147, 243, 83, 94, 208, 170, 212, 7,
+ 235, 220, 94, 212, 160, 4, 247, 244, 225, 88, 94, 225, 119, 245, 233, 94,
+ 225, 119, 239, 102, 211, 61, 94, 222, 54, 94, 239, 130, 57, 214, 151,
+ 105, 94, 239, 130, 57, 214, 151, 108, 94, 239, 130, 57, 214, 151, 147,
+ 94, 22, 213, 130, 94, 17, 202, 84, 94, 17, 105, 94, 17, 108, 94, 17, 147,
+ 94, 17, 149, 94, 17, 170, 94, 17, 195, 94, 17, 213, 111, 94, 17, 199, 94,
+ 17, 222, 63, 94, 1, 63, 94, 1, 74, 94, 1, 75, 94, 1, 78, 94, 1, 68, 94,
+ 1, 220, 73, 94, 1, 207, 24, 94, 1, 241, 161, 94, 1, 201, 201, 94, 1, 250,
+ 223, 94, 1, 249, 32, 94, 1, 185, 94, 1, 217, 126, 94, 1, 239, 8, 94, 1,
+ 192, 94, 1, 228, 113, 94, 1, 215, 36, 94, 1, 213, 90, 94, 1, 210, 22, 94,
+ 1, 244, 212, 94, 1, 246, 199, 94, 1, 230, 181, 94, 1, 198, 94, 1, 216,
+ 220, 94, 1, 204, 111, 94, 1, 240, 108, 94, 1, 173, 94, 1, 229, 144, 94,
+ 1, 208, 20, 94, 1, 202, 116, 94, 1, 237, 157, 94, 1, 202, 10, 94, 1, 227,
+ 161, 94, 1, 202, 66, 94, 1, 246, 142, 94, 1, 208, 170, 163, 22, 54, 94,
+ 1, 208, 170, 74, 94, 1, 208, 170, 75, 94, 1, 208, 170, 78, 94, 1, 208,
+ 170, 68, 94, 1, 208, 170, 220, 73, 94, 1, 208, 170, 207, 24, 94, 1, 208,
+ 170, 250, 223, 94, 1, 208, 170, 249, 32, 94, 1, 208, 170, 185, 94, 1,
+ 208, 170, 217, 126, 94, 1, 208, 170, 239, 8, 94, 1, 208, 170, 192, 94, 1,
+ 208, 170, 210, 22, 94, 1, 208, 170, 244, 212, 94, 1, 208, 170, 246, 199,
+ 94, 1, 208, 170, 230, 181, 94, 1, 208, 170, 208, 20, 94, 1, 208, 170,
+ 198, 94, 1, 208, 170, 204, 111, 94, 1, 208, 170, 173, 94, 1, 208, 170,
+ 239, 5, 94, 1, 208, 170, 237, 157, 94, 1, 208, 170, 230, 140, 94, 1, 208,
+ 170, 222, 98, 94, 1, 208, 170, 241, 255, 94, 1, 212, 160, 74, 94, 1, 212,
+ 160, 75, 94, 1, 212, 160, 230, 192, 94, 1, 212, 160, 207, 24, 94, 1, 212,
+ 160, 68, 94, 1, 212, 160, 250, 223, 94, 1, 212, 160, 173, 94, 1, 212,
+ 160, 239, 8, 94, 1, 212, 160, 152, 94, 1, 212, 160, 185, 94, 1, 212, 160,
+ 213, 90, 94, 1, 212, 160, 210, 22, 94, 1, 212, 160, 244, 212, 94, 1, 212,
+ 160, 230, 181, 94, 1, 212, 160, 240, 108, 94, 1, 212, 160, 239, 5, 94, 1,
+ 212, 160, 237, 157, 94, 1, 212, 160, 208, 20, 94, 1, 212, 160, 202, 116,
+ 94, 1, 212, 160, 216, 216, 94, 1, 212, 160, 246, 199, 94, 1, 212, 160,
+ 202, 80, 94, 1, 225, 119, 75, 94, 1, 225, 119, 173, 94, 1, 225, 119, 216,
+ 220, 94, 1, 225, 119, 240, 108, 94, 1, 225, 119, 202, 80, 94, 1, 251, 22,
+ 238, 244, 250, 181, 105, 94, 1, 251, 22, 238, 244, 205, 200, 105, 94, 1,
+ 251, 22, 238, 244, 244, 174, 94, 1, 251, 22, 238, 244, 207, 34, 94, 1,
+ 251, 22, 238, 244, 230, 239, 207, 34, 94, 1, 251, 22, 238, 244, 248, 245,
+ 94, 1, 251, 22, 238, 244, 126, 248, 245, 94, 1, 251, 22, 238, 244, 63,
+ 94, 1, 251, 22, 238, 244, 75, 94, 1, 251, 22, 238, 244, 173, 94, 1, 251,
+ 22, 238, 244, 222, 203, 94, 1, 251, 22, 238, 244, 247, 92, 94, 1, 251,
+ 22, 238, 244, 207, 241, 94, 1, 251, 22, 238, 244, 207, 229, 94, 1, 251,
+ 22, 238, 244, 244, 120, 94, 1, 251, 22, 238, 244, 221, 227, 94, 1, 251,
+ 22, 238, 244, 210, 22, 94, 1, 251, 22, 238, 244, 244, 212, 94, 1, 251,
+ 22, 238, 244, 185, 94, 1, 251, 22, 238, 244, 218, 208, 94, 1, 251, 22,
+ 238, 244, 211, 164, 94, 1, 251, 22, 238, 244, 202, 80, 94, 1, 251, 22,
+ 238, 244, 202, 116, 94, 1, 251, 22, 238, 244, 251, 73, 94, 1, 208, 170,
+ 251, 22, 238, 244, 210, 22, 94, 1, 208, 170, 251, 22, 238, 244, 202, 80,
+ 94, 1, 225, 119, 251, 22, 238, 244, 238, 119, 94, 1, 225, 119, 251, 22,
+ 238, 244, 222, 203, 94, 1, 225, 119, 251, 22, 238, 244, 247, 92, 94, 1,
+ 225, 119, 251, 22, 238, 244, 230, 149, 94, 1, 225, 119, 251, 22, 238,
+ 244, 207, 241, 94, 1, 225, 119, 251, 22, 238, 244, 244, 104, 94, 1, 225,
+ 119, 251, 22, 238, 244, 210, 22, 94, 1, 225, 119, 251, 22, 238, 244, 244,
+ 1, 94, 1, 225, 119, 251, 22, 238, 244, 211, 164, 94, 1, 225, 119, 251,
+ 22, 238, 244, 245, 65, 94, 1, 225, 119, 251, 22, 238, 244, 202, 80, 94,
+ 1, 225, 119, 251, 22, 238, 244, 202, 116, 94, 1, 251, 22, 238, 244, 162,
+ 68, 94, 1, 251, 22, 238, 244, 162, 198, 94, 1, 225, 119, 251, 22, 238,
+ 244, 248, 98, 94, 1, 251, 22, 238, 244, 244, 201, 94, 1, 225, 119, 251,
+ 22, 238, 244, 227, 161, 19, 20, 219, 188, 19, 20, 250, 8, 19, 20, 251,
+ 236, 19, 20, 204, 65, 19, 20, 218, 13, 19, 20, 219, 43, 19, 20, 217, 143,
+ 19, 20, 209, 196, 19, 20, 229, 208, 19, 20, 228, 164, 19, 20, 225, 63,
+ 19, 20, 221, 149, 19, 20, 223, 59, 19, 20, 227, 244, 19, 20, 211, 232,
+ 19, 20, 214, 208, 19, 20, 212, 207, 19, 20, 213, 47, 19, 20, 212, 172,
+ 19, 20, 202, 222, 19, 20, 203, 58, 19, 20, 216, 165, 19, 20, 221, 17, 19,
+ 20, 220, 53, 221, 17, 19, 20, 221, 16, 19, 20, 220, 53, 221, 16, 19, 20,
+ 221, 15, 19, 20, 220, 53, 221, 15, 19, 20, 221, 14, 19, 20, 220, 53, 221,
+ 14, 19, 20, 215, 107, 19, 20, 215, 106, 19, 20, 215, 105, 19, 20, 215,
+ 104, 19, 20, 215, 103, 19, 20, 215, 111, 19, 20, 220, 53, 219, 184, 19,
+ 20, 220, 53, 210, 69, 19, 20, 220, 53, 230, 54, 19, 20, 220, 53, 247,
+ 125, 19, 20, 220, 53, 226, 185, 19, 20, 220, 53, 223, 163, 19, 20, 220,
+ 53, 194, 19, 20, 220, 53, 213, 92, 19, 20, 241, 174, 204, 144, 19, 20,
+ 204, 44, 204, 144, 19, 20, 46, 5, 215, 252, 19, 20, 46, 216, 188, 243,
+ 85, 19, 20, 217, 0, 215, 108, 19, 20, 196, 227, 18, 19, 20, 196, 228,
+ 112, 19, 20, 209, 11, 19, 20, 209, 13, 19, 20, 207, 221, 19, 20, 207,
+ 223, 19, 20, 207, 228, 19, 20, 208, 180, 19, 20, 208, 182, 19, 20, 214,
+ 206, 212, 177, 19, 20, 214, 206, 212, 236, 19, 20, 214, 206, 236, 117,
+ 19, 20, 88, 237, 185, 19, 20, 88, 244, 35, 238, 182, 19, 20, 88, 239, 5,
+ 19, 20, 88, 237, 190, 19, 20, 214, 206, 230, 64, 19, 20, 88, 230, 62, 19,
+ 20, 248, 153, 244, 35, 159, 19, 20, 248, 153, 244, 35, 146, 19, 20, 88,
+ 244, 30, 194, 227, 124, 205, 169, 227, 174, 227, 124, 1, 173, 227, 124,
+ 1, 229, 144, 227, 124, 1, 239, 8, 227, 124, 1, 238, 119, 227, 124, 1,
+ 222, 203, 227, 124, 1, 247, 92, 227, 124, 1, 246, 199, 227, 124, 1, 230,
+ 181, 227, 124, 1, 230, 149, 227, 124, 1, 203, 78, 227, 124, 1, 210, 22,
+ 227, 124, 1, 209, 108, 227, 124, 1, 244, 212, 227, 124, 1, 244, 1, 227,
+ 124, 1, 201, 201, 227, 124, 1, 185, 227, 124, 1, 218, 208, 227, 124, 1,
+ 249, 32, 227, 124, 1, 248, 98, 227, 124, 1, 192, 227, 124, 1, 198, 227,
+ 124, 1, 216, 220, 227, 124, 1, 228, 113, 227, 124, 1, 204, 111, 227, 124,
+ 1, 213, 90, 227, 124, 1, 211, 164, 227, 124, 1, 215, 36, 227, 124, 1,
+ 152, 227, 124, 1, 237, 181, 227, 124, 1, 208, 119, 227, 124, 22, 2, 63,
+ 227, 124, 22, 2, 75, 227, 124, 22, 2, 68, 227, 124, 22, 2, 241, 161, 227,
+ 124, 22, 2, 251, 64, 227, 124, 22, 2, 220, 18, 227, 124, 22, 2, 250, 34,
+ 227, 124, 22, 2, 74, 227, 124, 22, 2, 78, 227, 124, 210, 254, 1, 198,
+ 227, 124, 210, 254, 1, 216, 220, 227, 124, 210, 254, 1, 204, 111, 227,
+ 124, 5, 1, 173, 227, 124, 5, 1, 222, 203, 227, 124, 5, 1, 250, 180, 227,
+ 124, 5, 1, 210, 22, 227, 124, 5, 1, 201, 201, 227, 124, 5, 1, 185, 227,
+ 124, 5, 1, 192, 227, 124, 5, 1, 216, 220, 227, 124, 5, 1, 228, 113, 227,
+ 124, 2, 223, 231, 227, 124, 2, 229, 186, 227, 124, 2, 215, 34, 227, 124,
+ 2, 227, 18, 227, 124, 240, 212, 82, 227, 124, 217, 47, 82, 227, 124, 17,
+ 202, 84, 227, 124, 17, 105, 227, 124, 17, 108, 227, 124, 17, 147, 227,
+ 124, 17, 149, 227, 124, 17, 170, 227, 124, 17, 195, 227, 124, 17, 213,
+ 111, 227, 124, 17, 199, 227, 124, 17, 222, 63, 45, 227, 235, 1, 173, 45,
+ 227, 235, 1, 203, 182, 45, 227, 235, 1, 222, 203, 45, 227, 235, 1, 208,
+ 20, 45, 227, 235, 1, 215, 36, 45, 227, 235, 1, 198, 45, 227, 235, 1, 210,
+ 22, 45, 227, 235, 1, 209, 108, 45, 227, 235, 1, 228, 113, 45, 227, 235,
+ 1, 185, 45, 227, 235, 1, 218, 208, 45, 227, 235, 1, 192, 45, 227, 235, 1,
+ 240, 108, 45, 227, 235, 1, 206, 86, 45, 227, 235, 1, 152, 45, 227, 235,
+ 1, 217, 126, 45, 227, 235, 1, 229, 144, 45, 227, 235, 1, 208, 10, 45,
+ 227, 235, 1, 201, 201, 45, 227, 235, 1, 63, 45, 227, 235, 1, 75, 45, 227,
+ 235, 1, 241, 161, 45, 227, 235, 1, 241, 147, 45, 227, 235, 1, 68, 45,
+ 227, 235, 1, 220, 18, 45, 227, 235, 1, 78, 45, 227, 235, 1, 207, 24, 45,
+ 227, 235, 1, 74, 45, 227, 235, 1, 250, 32, 45, 227, 235, 1, 251, 64, 45,
+ 227, 235, 1, 208, 159, 45, 227, 235, 1, 208, 158, 45, 227, 235, 1, 208,
+ 157, 45, 227, 235, 1, 208, 156, 45, 227, 235, 1, 208, 155, 222, 214, 45,
+ 226, 233, 1, 138, 217, 126, 222, 214, 45, 226, 233, 1, 124, 217, 126,
+ 222, 214, 45, 226, 233, 1, 138, 173, 222, 214, 45, 226, 233, 1, 138, 203,
+ 182, 222, 214, 45, 226, 233, 1, 138, 222, 203, 222, 214, 45, 226, 233, 1,
+ 124, 173, 222, 214, 45, 226, 233, 1, 124, 203, 182, 222, 214, 45, 226,
+ 233, 1, 124, 222, 203, 222, 214, 45, 226, 233, 1, 138, 208, 20, 222, 214,
+ 45, 226, 233, 1, 138, 215, 36, 222, 214, 45, 226, 233, 1, 138, 198, 222,
+ 214, 45, 226, 233, 1, 124, 208, 20, 222, 214, 45, 226, 233, 1, 124, 215,
+ 36, 222, 214, 45, 226, 233, 1, 124, 198, 222, 214, 45, 226, 233, 1, 138,
+ 210, 22, 222, 214, 45, 226, 233, 1, 138, 209, 108, 222, 214, 45, 226,
+ 233, 1, 138, 201, 201, 222, 214, 45, 226, 233, 1, 124, 210, 22, 222, 214,
+ 45, 226, 233, 1, 124, 209, 108, 222, 214, 45, 226, 233, 1, 124, 201, 201,
+ 222, 214, 45, 226, 233, 1, 138, 185, 222, 214, 45, 226, 233, 1, 138, 218,
+ 208, 222, 214, 45, 226, 233, 1, 138, 192, 222, 214, 45, 226, 233, 1, 124,
+ 185, 222, 214, 45, 226, 233, 1, 124, 218, 208, 222, 214, 45, 226, 233, 1,
+ 124, 192, 222, 214, 45, 226, 233, 1, 138, 240, 108, 222, 214, 45, 226,
+ 233, 1, 138, 206, 86, 222, 214, 45, 226, 233, 1, 138, 228, 113, 222, 214,
+ 45, 226, 233, 1, 124, 240, 108, 222, 214, 45, 226, 233, 1, 124, 206, 86,
+ 222, 214, 45, 226, 233, 1, 124, 228, 113, 222, 214, 45, 226, 233, 1, 138,
+ 152, 222, 214, 45, 226, 233, 1, 138, 244, 212, 222, 214, 45, 226, 233, 1,
+ 138, 249, 32, 222, 214, 45, 226, 233, 1, 124, 152, 222, 214, 45, 226,
+ 233, 1, 124, 244, 212, 222, 214, 45, 226, 233, 1, 124, 249, 32, 222, 214,
+ 45, 226, 233, 1, 138, 228, 169, 222, 214, 45, 226, 233, 1, 138, 203, 149,
+ 222, 214, 45, 226, 233, 1, 124, 228, 169, 222, 214, 45, 226, 233, 1, 124,
+ 203, 149, 222, 214, 45, 226, 233, 1, 138, 211, 9, 222, 214, 45, 226, 233,
+ 1, 124, 211, 9, 222, 214, 45, 226, 233, 22, 2, 22, 212, 216, 222, 214,
+ 45, 226, 233, 22, 2, 252, 25, 222, 214, 45, 226, 233, 22, 2, 231, 83,
+ 222, 214, 45, 226, 233, 22, 2, 68, 222, 214, 45, 226, 233, 22, 2, 206,
+ 178, 222, 214, 45, 226, 233, 22, 2, 74, 222, 214, 45, 226, 233, 22, 2,
+ 251, 109, 222, 214, 45, 226, 233, 22, 2, 78, 222, 214, 45, 226, 233, 22,
+ 2, 220, 97, 222, 214, 45, 226, 233, 22, 2, 207, 24, 222, 214, 45, 226,
+ 233, 22, 2, 250, 8, 222, 214, 45, 226, 233, 22, 2, 251, 236, 222, 214,
+ 45, 226, 233, 22, 2, 206, 170, 222, 214, 45, 226, 233, 22, 2, 219, 188,
+ 222, 214, 45, 226, 233, 22, 2, 220, 94, 222, 214, 45, 226, 233, 22, 2,
+ 207, 20, 222, 214, 45, 226, 233, 22, 2, 230, 192, 222, 214, 45, 226, 233,
+ 1, 46, 206, 164, 222, 214, 45, 226, 233, 1, 46, 222, 205, 222, 214, 45,
+ 226, 233, 1, 46, 223, 163, 222, 214, 45, 226, 233, 1, 46, 226, 185, 222,
+ 214, 45, 226, 233, 1, 46, 230, 54, 222, 214, 45, 226, 233, 1, 46, 245,
+ 51, 222, 214, 45, 226, 233, 1, 46, 249, 255, 222, 214, 45, 226, 233, 143,
+ 225, 92, 222, 214, 45, 226, 233, 143, 225, 91, 222, 214, 45, 226, 233,
+ 17, 202, 84, 222, 214, 45, 226, 233, 17, 105, 222, 214, 45, 226, 233, 17,
+ 108, 222, 214, 45, 226, 233, 17, 147, 222, 214, 45, 226, 233, 17, 149,
+ 222, 214, 45, 226, 233, 17, 170, 222, 214, 45, 226, 233, 17, 195, 222,
+ 214, 45, 226, 233, 17, 213, 111, 222, 214, 45, 226, 233, 17, 199, 222,
+ 214, 45, 226, 233, 17, 222, 63, 222, 214, 45, 226, 233, 104, 17, 105,
+ 222, 214, 45, 226, 233, 2, 228, 97, 222, 214, 45, 226, 233, 2, 228, 96,
+ 85, 16, 219, 51, 85, 16, 223, 211, 229, 22, 85, 16, 218, 130, 229, 22,
+ 85, 16, 248, 134, 229, 22, 85, 16, 247, 166, 229, 22, 85, 16, 218, 8,
+ 229, 22, 85, 16, 218, 2, 229, 22, 85, 16, 218, 0, 229, 22, 85, 16, 218,
+ 6, 229, 22, 85, 16, 218, 4, 229, 22, 85, 16, 244, 161, 229, 22, 85, 16,
+ 244, 157, 229, 22, 85, 16, 244, 156, 229, 22, 85, 16, 244, 159, 229, 22,
+ 85, 16, 244, 158, 229, 22, 85, 16, 244, 155, 229, 22, 85, 16, 207, 167,
+ 85, 16, 223, 211, 215, 220, 85, 16, 218, 130, 215, 220, 85, 16, 248, 134,
+ 215, 220, 85, 16, 247, 166, 215, 220, 85, 16, 218, 8, 215, 220, 85, 16,
+ 218, 2, 215, 220, 85, 16, 218, 0, 215, 220, 85, 16, 218, 6, 215, 220, 85,
+ 16, 218, 4, 215, 220, 85, 16, 244, 161, 215, 220, 85, 16, 244, 157, 215,
+ 220, 85, 16, 244, 156, 215, 220, 85, 16, 244, 159, 215, 220, 85, 16, 244,
+ 158, 215, 220, 85, 16, 244, 155, 215, 220, 247, 186, 1, 173, 247, 186, 1,
+ 239, 8, 247, 186, 1, 222, 203, 247, 186, 1, 222, 146, 247, 186, 1, 185,
+ 247, 186, 1, 249, 32, 247, 186, 1, 192, 247, 186, 1, 223, 250, 247, 186,
+ 1, 210, 22, 247, 186, 1, 244, 212, 247, 186, 1, 201, 201, 247, 186, 1,
+ 221, 147, 247, 186, 1, 247, 92, 247, 186, 1, 230, 181, 247, 186, 1, 221,
+ 11, 247, 186, 1, 221, 3, 247, 186, 1, 198, 247, 186, 1, 216, 220, 247,
+ 186, 1, 228, 113, 247, 186, 1, 206, 86, 247, 186, 1, 215, 36, 247, 186,
+ 1, 63, 247, 186, 1, 152, 247, 186, 22, 2, 75, 247, 186, 22, 2, 68, 247,
+ 186, 22, 2, 74, 247, 186, 22, 2, 78, 247, 186, 22, 2, 251, 109, 247, 186,
+ 219, 136, 247, 186, 241, 84, 76, 214, 167, 45, 104, 1, 138, 173, 45, 104,
+ 1, 138, 229, 144, 45, 104, 1, 138, 228, 153, 45, 104, 1, 124, 173, 45,
+ 104, 1, 124, 228, 153, 45, 104, 1, 124, 229, 144, 45, 104, 1, 222, 203,
+ 45, 104, 1, 138, 247, 92, 45, 104, 1, 138, 246, 199, 45, 104, 1, 124,
+ 247, 92, 45, 104, 1, 124, 215, 36, 45, 104, 1, 124, 246, 199, 45, 104, 1,
+ 221, 11, 45, 104, 1, 216, 171, 45, 104, 1, 138, 216, 169, 45, 104, 1,
+ 244, 212, 45, 104, 1, 124, 216, 169, 45, 104, 1, 216, 180, 45, 104, 1,
+ 138, 210, 22, 45, 104, 1, 138, 209, 108, 45, 104, 1, 124, 210, 22, 45,
+ 104, 1, 124, 209, 108, 45, 104, 1, 201, 201, 45, 104, 1, 249, 32, 45,
+ 104, 1, 138, 185, 45, 104, 1, 138, 218, 208, 45, 104, 1, 138, 240, 108,
+ 45, 104, 1, 124, 185, 45, 104, 1, 124, 240, 108, 45, 104, 1, 124, 218,
+ 208, 45, 104, 1, 192, 45, 104, 1, 124, 198, 45, 104, 1, 138, 198, 45,
+ 104, 1, 216, 220, 45, 104, 1, 215, 140, 45, 104, 1, 228, 113, 45, 104, 1,
+ 226, 232, 45, 104, 1, 204, 111, 45, 104, 1, 138, 213, 90, 45, 104, 1,
+ 138, 211, 164, 45, 104, 1, 138, 215, 36, 45, 104, 1, 138, 152, 45, 104,
+ 1, 227, 77, 45, 104, 1, 63, 45, 104, 1, 124, 152, 45, 104, 1, 75, 45,
+ 104, 1, 231, 83, 45, 104, 1, 68, 45, 104, 1, 206, 178, 45, 104, 1, 241,
+ 161, 45, 104, 1, 220, 18, 45, 104, 1, 228, 97, 45, 104, 1, 237, 249, 215,
+ 36, 45, 104, 109, 2, 174, 216, 220, 45, 104, 109, 2, 174, 228, 113, 45,
+ 104, 109, 2, 228, 114, 209, 228, 228, 86, 45, 104, 2, 225, 141, 230, 1,
+ 228, 86, 45, 104, 109, 2, 46, 222, 203, 45, 104, 109, 2, 124, 185, 45,
+ 104, 109, 2, 138, 216, 170, 219, 245, 124, 185, 45, 104, 109, 2, 192, 45,
+ 104, 109, 2, 249, 32, 45, 104, 109, 2, 215, 36, 45, 104, 2, 215, 10, 45,
+ 104, 22, 2, 63, 45, 104, 22, 2, 225, 141, 214, 225, 45, 104, 22, 2, 252,
+ 25, 45, 104, 22, 2, 209, 234, 252, 25, 45, 104, 22, 2, 75, 45, 104, 22,
+ 2, 231, 83, 45, 104, 22, 2, 207, 24, 45, 104, 22, 2, 206, 177, 45, 104,
+ 22, 2, 68, 45, 104, 22, 2, 206, 178, 45, 104, 22, 2, 78, 45, 104, 22, 2,
+ 220, 98, 56, 45, 104, 22, 2, 219, 188, 45, 104, 22, 2, 74, 45, 104, 22,
+ 2, 251, 109, 45, 104, 22, 2, 220, 18, 45, 104, 22, 2, 251, 64, 45, 104,
+ 22, 2, 104, 251, 64, 45, 104, 22, 2, 220, 98, 55, 45, 104, 2, 225, 141,
+ 230, 0, 45, 104, 2, 208, 160, 45, 104, 2, 208, 159, 45, 104, 2, 229, 105,
+ 208, 158, 45, 104, 2, 229, 105, 208, 157, 45, 104, 2, 229, 105, 208, 156,
+ 45, 104, 2, 216, 221, 237, 156, 45, 104, 2, 225, 141, 214, 253, 45, 104,
+ 2, 229, 104, 229, 239, 45, 104, 39, 245, 113, 243, 85, 45, 104, 236, 108,
+ 17, 202, 84, 45, 104, 236, 108, 17, 105, 45, 104, 236, 108, 17, 108, 45,
+ 104, 236, 108, 17, 147, 45, 104, 236, 108, 17, 149, 45, 104, 236, 108,
+ 17, 170, 45, 104, 236, 108, 17, 195, 45, 104, 236, 108, 17, 213, 111, 45,
+ 104, 236, 108, 17, 199, 45, 104, 236, 108, 17, 222, 63, 45, 104, 104, 17,
+ 202, 84, 45, 104, 104, 17, 105, 45, 104, 104, 17, 108, 45, 104, 104, 17,
+ 147, 45, 104, 104, 17, 149, 45, 104, 104, 17, 170, 45, 104, 104, 17, 195,
+ 45, 104, 104, 17, 213, 111, 45, 104, 104, 17, 199, 45, 104, 104, 17, 222,
+ 63, 45, 104, 2, 204, 29, 45, 104, 2, 204, 28, 45, 104, 2, 214, 212, 45,
+ 104, 2, 229, 175, 45, 104, 2, 236, 36, 45, 104, 2, 243, 99, 45, 104, 2,
+ 216, 73, 215, 198, 216, 180, 45, 104, 2, 225, 141, 203, 79, 45, 104, 2,
+ 230, 35, 45, 104, 2, 230, 34, 45, 104, 2, 214, 220, 45, 104, 2, 214, 219,
+ 45, 104, 2, 237, 98, 45, 104, 2, 247, 89, 39, 242, 75, 246, 53, 251, 138,
+ 39, 243, 230, 39, 231, 27, 39, 183, 47, 39, 208, 70, 243, 85, 39, 203,
+ 195, 56, 39, 204, 21, 227, 115, 56, 39, 171, 131, 56, 39, 52, 171, 131,
+ 56, 39, 157, 246, 219, 211, 32, 56, 39, 211, 18, 246, 219, 211, 32, 56,
+ 39, 219, 78, 55, 39, 52, 219, 78, 55, 39, 219, 78, 56, 39, 219, 78, 219,
+ 199, 130, 2, 207, 9, 216, 51, 130, 2, 207, 9, 247, 54, 130, 2, 246, 234,
+ 130, 2, 210, 191, 130, 2, 248, 56, 130, 1, 251, 45, 130, 1, 251, 46, 209,
+ 178, 130, 1, 231, 79, 130, 1, 231, 80, 209, 178, 130, 1, 207, 12, 130, 1,
+ 207, 13, 209, 178, 130, 1, 216, 221, 216, 103, 130, 1, 216, 221, 216,
+ 104, 209, 178, 130, 1, 228, 114, 227, 197, 130, 1, 228, 114, 227, 198,
+ 209, 178, 130, 1, 241, 127, 130, 1, 251, 62, 130, 1, 220, 49, 130, 1,
+ 220, 50, 209, 178, 130, 1, 173, 130, 1, 230, 44, 225, 144, 130, 1, 239,
+ 8, 130, 1, 239, 9, 238, 25, 130, 1, 222, 203, 130, 1, 247, 92, 130, 1,
+ 247, 93, 228, 100, 130, 1, 230, 181, 130, 1, 230, 182, 230, 153, 130, 1,
+ 221, 11, 130, 1, 210, 23, 227, 253, 130, 1, 210, 23, 223, 206, 225, 144,
+ 130, 1, 244, 213, 223, 206, 251, 4, 130, 1, 244, 213, 223, 206, 225, 144,
+ 130, 1, 223, 111, 216, 183, 130, 1, 210, 22, 130, 1, 210, 23, 209, 200,
+ 130, 1, 244, 212, 130, 1, 244, 213, 225, 163, 130, 1, 201, 201, 130, 1,
+ 185, 130, 1, 219, 169, 229, 251, 130, 1, 249, 32, 130, 1, 249, 33, 229,
+ 187, 130, 1, 192, 130, 1, 198, 130, 1, 216, 220, 130, 1, 228, 113, 130,
+ 1, 204, 111, 130, 1, 215, 37, 215, 21, 130, 1, 215, 37, 214, 232, 130, 1,
+ 215, 36, 130, 1, 152, 130, 2, 216, 94, 130, 22, 2, 209, 178, 130, 22, 2,
+ 207, 8, 130, 22, 2, 207, 9, 214, 228, 130, 22, 2, 210, 224, 130, 22, 2,
+ 210, 225, 231, 71, 130, 22, 2, 216, 221, 216, 103, 130, 22, 2, 216, 221,
+ 216, 104, 209, 178, 130, 22, 2, 228, 114, 227, 197, 130, 22, 2, 228, 114,
+ 227, 198, 209, 178, 130, 22, 2, 209, 235, 130, 22, 2, 209, 236, 216, 103,
+ 130, 22, 2, 209, 236, 209, 178, 130, 22, 2, 209, 236, 216, 104, 209, 178,
+ 130, 22, 2, 218, 249, 130, 22, 2, 218, 250, 209, 178, 130, 251, 117, 251,
+ 116, 130, 1, 230, 23, 214, 227, 130, 1, 229, 111, 214, 227, 130, 1, 207,
+ 101, 214, 227, 130, 1, 241, 155, 214, 227, 130, 1, 206, 56, 214, 227,
+ 130, 1, 202, 106, 214, 227, 130, 1, 250, 52, 214, 227, 130, 17, 202, 84,
+ 130, 17, 105, 130, 17, 108, 130, 17, 147, 130, 17, 149, 130, 17, 170,
+ 130, 17, 195, 130, 17, 213, 111, 130, 17, 199, 130, 17, 222, 63, 130,
+ 219, 104, 130, 219, 130, 130, 204, 14, 130, 247, 31, 219, 123, 130, 247,
+ 31, 212, 139, 130, 247, 31, 219, 75, 130, 219, 129, 130, 31, 16, 243, 91,
+ 130, 31, 16, 244, 34, 130, 31, 16, 242, 27, 130, 31, 16, 244, 164, 130,
+ 31, 16, 244, 165, 210, 191, 130, 31, 16, 243, 175, 130, 31, 16, 244, 205,
+ 130, 31, 16, 244, 10, 130, 31, 16, 244, 187, 130, 31, 16, 244, 165, 238,
+ 184, 130, 31, 16, 39, 209, 171, 130, 31, 16, 39, 241, 82, 130, 31, 16,
+ 39, 229, 182, 130, 31, 16, 39, 229, 184, 130, 31, 16, 39, 230, 157, 130,
+ 31, 16, 39, 229, 183, 3, 230, 157, 130, 31, 16, 39, 229, 185, 3, 230,
+ 157, 130, 31, 16, 39, 248, 119, 130, 31, 16, 39, 238, 29, 130, 31, 16,
+ 216, 14, 171, 242, 37, 130, 31, 16, 216, 14, 171, 244, 203, 130, 31, 16,
+ 216, 14, 246, 16, 207, 195, 130, 31, 16, 216, 14, 246, 16, 209, 244, 130,
+ 31, 16, 227, 220, 171, 219, 118, 130, 31, 16, 227, 220, 171, 217, 177,
+ 130, 31, 16, 227, 220, 246, 16, 218, 94, 130, 31, 16, 227, 220, 246, 16,
+ 218, 80, 130, 31, 16, 227, 220, 171, 218, 119, 210, 213, 2, 219, 101,
+ 210, 213, 2, 219, 114, 210, 213, 2, 219, 110, 210, 213, 1, 63, 210, 213,
+ 1, 75, 210, 213, 1, 68, 210, 213, 1, 251, 109, 210, 213, 1, 78, 210, 213,
+ 1, 74, 210, 213, 1, 240, 238, 210, 213, 1, 173, 210, 213, 1, 217, 126,
+ 210, 213, 1, 239, 8, 210, 213, 1, 222, 203, 210, 213, 1, 247, 92, 210,
+ 213, 1, 230, 181, 210, 213, 1, 202, 116, 210, 213, 1, 221, 11, 210, 213,
+ 1, 210, 22, 210, 213, 1, 244, 212, 210, 213, 1, 201, 201, 210, 213, 1,
+ 185, 210, 213, 1, 240, 108, 210, 213, 1, 206, 86, 210, 213, 1, 249, 32,
+ 210, 213, 1, 192, 210, 213, 1, 198, 210, 213, 1, 216, 220, 210, 213, 1,
+ 228, 113, 210, 213, 1, 204, 111, 210, 213, 1, 215, 36, 210, 213, 1, 203,
+ 182, 210, 213, 1, 152, 210, 213, 109, 2, 219, 127, 210, 213, 109, 2, 219,
+ 103, 210, 213, 109, 2, 219, 100, 210, 213, 22, 2, 219, 117, 210, 213, 22,
+ 2, 219, 99, 210, 213, 22, 2, 219, 121, 210, 213, 22, 2, 219, 109, 210,
+ 213, 22, 2, 219, 128, 210, 213, 22, 2, 219, 119, 210, 213, 2, 219, 131,
+ 210, 213, 2, 205, 204, 210, 213, 109, 2, 219, 64, 192, 210, 213, 109, 2,
+ 219, 64, 204, 111, 210, 213, 1, 229, 144, 210, 213, 1, 210, 150, 210,
+ 213, 17, 202, 84, 210, 213, 17, 105, 210, 213, 17, 108, 210, 213, 17,
+ 147, 210, 213, 17, 149, 210, 213, 17, 170, 210, 213, 17, 195, 210, 213,
+ 17, 213, 111, 210, 213, 17, 199, 210, 213, 17, 222, 63, 210, 213, 250,
+ 17, 210, 213, 1, 216, 76, 210, 213, 1, 227, 171, 210, 213, 1, 248, 98,
+ 210, 213, 1, 46, 230, 54, 210, 213, 1, 46, 226, 185, 248, 208, 1, 63,
+ 248, 208, 1, 212, 131, 63, 248, 208, 1, 152, 248, 208, 1, 212, 131, 152,
+ 248, 208, 1, 225, 117, 152, 248, 208, 1, 249, 32, 248, 208, 1, 229, 236,
+ 249, 32, 248, 208, 1, 185, 248, 208, 1, 212, 131, 185, 248, 208, 1, 201,
+ 201, 248, 208, 1, 225, 117, 201, 201, 248, 208, 1, 204, 111, 248, 208, 1,
+ 212, 131, 204, 111, 248, 208, 1, 219, 143, 204, 111, 248, 208, 1, 239, 8,
+ 248, 208, 1, 212, 131, 239, 8, 248, 208, 1, 230, 181, 248, 208, 1, 244,
+ 212, 248, 208, 1, 216, 220, 248, 208, 1, 212, 131, 216, 220, 248, 208, 1,
+ 192, 248, 208, 1, 212, 131, 192, 248, 208, 1, 211, 236, 210, 22, 248,
+ 208, 1, 221, 170, 210, 22, 248, 208, 1, 215, 36, 248, 208, 1, 212, 131,
+ 215, 36, 248, 208, 1, 225, 117, 215, 36, 248, 208, 1, 198, 248, 208, 1,
+ 212, 131, 198, 248, 208, 1, 222, 203, 248, 208, 1, 228, 113, 248, 208, 1,
+ 212, 131, 228, 113, 248, 208, 1, 221, 11, 248, 208, 1, 247, 92, 248, 208,
+ 1, 223, 25, 248, 208, 1, 225, 54, 248, 208, 1, 75, 248, 208, 1, 68, 248,
+ 208, 2, 208, 164, 248, 208, 22, 2, 74, 248, 208, 22, 2, 219, 143, 74,
+ 248, 208, 22, 2, 241, 161, 248, 208, 22, 2, 75, 248, 208, 22, 2, 229,
+ 236, 75, 248, 208, 22, 2, 78, 248, 208, 22, 2, 229, 236, 78, 248, 208,
+ 22, 2, 68, 248, 208, 22, 2, 106, 35, 212, 131, 215, 36, 248, 208, 109, 2,
+ 222, 205, 248, 208, 109, 2, 237, 171, 248, 208, 219, 112, 248, 208, 219,
+ 108, 248, 208, 16, 248, 64, 223, 111, 224, 218, 248, 208, 16, 248, 64,
+ 218, 122, 248, 208, 16, 248, 64, 230, 79, 248, 208, 16, 248, 64, 219,
+ 112, 227, 181, 1, 173, 227, 181, 1, 229, 40, 227, 181, 1, 229, 144, 227,
+ 181, 1, 239, 8, 227, 181, 1, 238, 51, 227, 181, 1, 222, 203, 227, 181, 1,
+ 247, 92, 227, 181, 1, 246, 199, 227, 181, 1, 230, 181, 227, 181, 1, 221,
+ 11, 227, 181, 1, 210, 22, 227, 181, 1, 209, 108, 227, 181, 1, 244, 212,
+ 227, 181, 1, 201, 201, 227, 181, 1, 185, 227, 181, 1, 218, 98, 227, 181,
+ 1, 218, 208, 227, 181, 1, 240, 108, 227, 181, 1, 239, 227, 227, 181, 1,
+ 249, 32, 227, 181, 1, 248, 44, 227, 181, 1, 192, 227, 181, 1, 224, 89,
+ 227, 181, 1, 208, 20, 227, 181, 1, 208, 10, 227, 181, 1, 241, 255, 227,
+ 181, 1, 198, 227, 181, 1, 216, 220, 227, 181, 1, 228, 113, 227, 181, 1,
+ 152, 227, 181, 1, 236, 224, 227, 181, 1, 206, 86, 227, 181, 1, 215, 36,
+ 227, 181, 1, 213, 90, 227, 181, 1, 204, 111, 227, 181, 1, 63, 227, 181,
+ 210, 254, 1, 198, 227, 181, 210, 254, 1, 216, 220, 227, 181, 22, 2, 252,
+ 25, 227, 181, 22, 2, 75, 227, 181, 22, 2, 78, 227, 181, 22, 2, 220, 18,
+ 227, 181, 22, 2, 68, 227, 181, 22, 2, 206, 178, 227, 181, 22, 2, 74, 227,
+ 181, 109, 2, 230, 54, 227, 181, 109, 2, 226, 185, 227, 181, 109, 2, 159,
+ 227, 181, 109, 2, 223, 163, 227, 181, 109, 2, 219, 184, 227, 181, 109, 2,
+ 146, 227, 181, 109, 2, 210, 69, 227, 181, 109, 2, 220, 241, 227, 181,
+ 109, 2, 230, 0, 227, 181, 2, 216, 181, 227, 181, 2, 221, 51, 227, 181,
+ 217, 179, 210, 20, 227, 181, 217, 179, 220, 252, 209, 5, 210, 20, 227,
+ 181, 217, 179, 246, 206, 227, 181, 217, 179, 208, 2, 246, 206, 227, 181,
+ 217, 179, 208, 1, 227, 181, 17, 202, 84, 227, 181, 17, 105, 227, 181, 17,
+ 108, 227, 181, 17, 147, 227, 181, 17, 149, 227, 181, 17, 170, 227, 181,
+ 17, 195, 227, 181, 17, 213, 111, 227, 181, 17, 199, 227, 181, 17, 222,
+ 63, 227, 181, 1, 207, 241, 227, 181, 1, 207, 229, 227, 181, 1, 244, 120,
+ 220, 47, 246, 135, 17, 202, 84, 220, 47, 246, 135, 17, 105, 220, 47, 246,
+ 135, 17, 108, 220, 47, 246, 135, 17, 147, 220, 47, 246, 135, 17, 149,
+ 220, 47, 246, 135, 17, 170, 220, 47, 246, 135, 17, 195, 220, 47, 246,
+ 135, 17, 213, 111, 220, 47, 246, 135, 17, 199, 220, 47, 246, 135, 17,
+ 222, 63, 220, 47, 246, 135, 1, 228, 113, 220, 47, 246, 135, 1, 250, 49,
+ 220, 47, 246, 135, 1, 251, 81, 220, 47, 246, 135, 1, 250, 223, 220, 47,
+ 246, 135, 1, 251, 39, 220, 47, 246, 135, 1, 228, 112, 220, 47, 246, 135,
+ 1, 251, 243, 220, 47, 246, 135, 1, 251, 244, 220, 47, 246, 135, 1, 251,
+ 242, 220, 47, 246, 135, 1, 251, 237, 220, 47, 246, 135, 1, 227, 148, 220,
+ 47, 246, 135, 1, 230, 215, 220, 47, 246, 135, 1, 231, 84, 220, 47, 246,
+ 135, 1, 230, 236, 220, 47, 246, 135, 1, 230, 224, 220, 47, 246, 135, 1,
+ 226, 239, 220, 47, 246, 135, 1, 207, 31, 220, 47, 246, 135, 1, 207, 29,
+ 220, 47, 246, 135, 1, 206, 229, 220, 47, 246, 135, 1, 206, 170, 220, 47,
+ 246, 135, 1, 227, 234, 220, 47, 246, 135, 1, 241, 46, 220, 47, 246, 135,
+ 1, 241, 164, 220, 47, 246, 135, 1, 241, 92, 220, 47, 246, 135, 1, 241,
+ 21, 220, 47, 246, 135, 1, 227, 49, 220, 47, 246, 135, 1, 219, 219, 220,
+ 47, 246, 135, 1, 220, 93, 220, 47, 246, 135, 1, 219, 206, 220, 47, 246,
+ 135, 1, 220, 60, 220, 47, 246, 135, 223, 247, 207, 206, 220, 47, 246,
+ 135, 239, 3, 207, 207, 220, 47, 246, 135, 223, 245, 207, 207, 220, 47,
+ 246, 135, 216, 118, 220, 47, 246, 135, 218, 206, 220, 47, 246, 135, 251,
+ 72, 220, 47, 246, 135, 217, 179, 223, 241, 220, 47, 246, 135, 217, 179,
+ 52, 223, 241, 210, 213, 217, 179, 248, 64, 210, 184, 210, 213, 217, 179,
+ 248, 64, 219, 113, 210, 213, 217, 179, 248, 64, 217, 167, 210, 213, 217,
+ 179, 248, 64, 247, 77, 210, 213, 217, 179, 248, 64, 227, 172, 214, 224,
+ 210, 213, 217, 179, 248, 64, 230, 44, 214, 224, 210, 213, 217, 179, 248,
+ 64, 244, 213, 214, 224, 210, 213, 217, 179, 248, 64, 249, 33, 214, 224,
+ 206, 52, 143, 229, 234, 206, 52, 143, 213, 58, 206, 52, 143, 217, 245,
+ 206, 52, 2, 222, 76, 206, 52, 2, 203, 87, 224, 146, 210, 175, 206, 52,
+ 143, 203, 87, 251, 77, 231, 36, 210, 175, 206, 52, 143, 203, 87, 231, 36,
+ 210, 175, 206, 52, 143, 203, 87, 229, 222, 231, 36, 210, 175, 206, 52,
+ 143, 247, 55, 56, 206, 52, 143, 203, 87, 229, 222, 231, 36, 210, 176,
+ 214, 194, 206, 52, 143, 52, 210, 175, 206, 52, 143, 208, 70, 210, 175,
+ 206, 52, 143, 229, 222, 250, 182, 206, 52, 143, 70, 56, 206, 52, 143,
+ 120, 187, 56, 206, 52, 143, 126, 187, 56, 206, 52, 143, 216, 4, 229, 233,
+ 231, 36, 210, 175, 206, 52, 143, 250, 47, 231, 36, 210, 175, 206, 52, 2,
+ 205, 200, 210, 175, 206, 52, 2, 205, 200, 207, 26, 206, 52, 2, 216, 73,
+ 205, 200, 207, 26, 206, 52, 2, 205, 200, 250, 182, 206, 52, 2, 216, 73,
+ 205, 200, 250, 182, 206, 52, 2, 205, 200, 207, 27, 3, 209, 248, 206, 52,
+ 2, 205, 200, 250, 183, 3, 209, 248, 206, 52, 2, 250, 181, 250, 197, 206,
+ 52, 2, 250, 181, 249, 2, 206, 52, 2, 250, 181, 206, 77, 206, 52, 2, 250,
+ 181, 206, 78, 3, 209, 248, 206, 52, 2, 208, 201, 206, 52, 2, 237, 15,
+ 163, 250, 180, 206, 52, 2, 163, 250, 180, 206, 52, 2, 215, 147, 163, 250,
+ 180, 206, 52, 2, 250, 181, 207, 33, 223, 232, 206, 52, 2, 250, 122, 206,
+ 52, 2, 215, 198, 250, 122, 206, 52, 143, 247, 55, 55, 206, 52, 2, 230,
+ 135, 206, 52, 2, 206, 222, 206, 52, 143, 215, 253, 55, 206, 52, 143, 52,
+ 215, 253, 55, 8, 1, 5, 6, 63, 8, 1, 5, 6, 251, 109, 8, 5, 1, 207, 174,
+ 251, 109, 8, 1, 5, 6, 248, 225, 249, 255, 8, 1, 5, 6, 247, 125, 8, 1, 5,
+ 6, 245, 51, 8, 1, 5, 6, 240, 243, 8, 1, 5, 6, 74, 8, 5, 1, 207, 174, 171,
+ 74, 8, 5, 1, 207, 174, 75, 8, 1, 5, 6, 230, 184, 8, 1, 5, 6, 230, 54, 8,
+ 1, 5, 6, 228, 131, 3, 95, 8, 1, 5, 6, 226, 185, 8, 1, 5, 6, 216, 73, 223,
+ 163, 8, 1, 5, 6, 78, 8, 1, 5, 6, 171, 78, 8, 5, 1, 212, 154, 78, 8, 5, 1,
+ 212, 154, 171, 78, 8, 5, 1, 212, 154, 158, 3, 95, 8, 5, 1, 207, 174, 220,
+ 73, 8, 1, 5, 6, 219, 216, 8, 5, 1, 208, 145, 162, 78, 8, 5, 1, 247, 248,
+ 162, 78, 8, 1, 5, 6, 219, 184, 8, 1, 5, 6, 216, 73, 146, 8, 1, 5, 6, 207,
+ 174, 146, 8, 1, 5, 6, 210, 69, 8, 1, 5, 6, 68, 8, 5, 1, 212, 154, 68, 8,
+ 5, 1, 212, 154, 243, 229, 68, 8, 5, 1, 212, 154, 207, 174, 226, 185, 8,
+ 1, 5, 6, 206, 164, 8, 1, 5, 6, 204, 144, 8, 1, 5, 6, 202, 159, 8, 1, 5,
+ 6, 240, 177, 8, 1, 205, 186, 228, 3, 211, 200, 8, 1, 251, 59, 30, 1, 5,
+ 6, 238, 235, 30, 1, 5, 6, 228, 24, 30, 1, 5, 6, 218, 167, 30, 1, 5, 6,
+ 216, 59, 30, 1, 5, 6, 217, 202, 36, 1, 5, 6, 241, 122, 65, 1, 6, 63, 65,
+ 1, 6, 251, 109, 65, 1, 6, 249, 255, 65, 1, 6, 248, 225, 249, 255, 65, 1,
+ 6, 245, 51, 65, 1, 6, 74, 65, 1, 6, 216, 73, 74, 65, 1, 6, 239, 75, 65,
+ 1, 6, 237, 171, 65, 1, 6, 75, 65, 1, 6, 230, 184, 65, 1, 6, 230, 54, 65,
+ 1, 6, 159, 65, 1, 6, 226, 185, 65, 1, 6, 223, 163, 65, 1, 6, 216, 73,
+ 223, 163, 65, 1, 6, 78, 65, 1, 6, 219, 216, 65, 1, 6, 219, 184, 65, 1, 6,
+ 146, 65, 1, 6, 210, 69, 65, 1, 6, 68, 65, 1, 6, 204, 144, 65, 1, 5, 63,
+ 65, 1, 5, 207, 174, 63, 65, 1, 5, 251, 2, 65, 1, 5, 207, 174, 251, 109,
+ 65, 1, 5, 249, 255, 65, 1, 5, 245, 51, 65, 1, 5, 74, 65, 1, 5, 214, 192,
+ 65, 1, 5, 171, 74, 65, 1, 5, 207, 174, 171, 74, 65, 1, 5, 239, 75, 65, 1,
+ 5, 207, 174, 75, 65, 1, 5, 230, 54, 65, 1, 5, 226, 185, 65, 1, 5, 241,
+ 78, 65, 1, 5, 78, 65, 1, 5, 171, 78, 65, 1, 5, 208, 145, 162, 78, 65, 1,
+ 5, 247, 248, 162, 78, 65, 1, 5, 219, 184, 65, 1, 5, 210, 69, 65, 1, 5,
+ 68, 65, 1, 5, 212, 154, 68, 65, 1, 5, 207, 174, 226, 185, 65, 1, 5, 206,
+ 164, 65, 1, 5, 251, 59, 65, 1, 5, 248, 106, 65, 1, 5, 30, 238, 235, 65,
+ 1, 5, 244, 37, 65, 1, 5, 30, 218, 192, 65, 1, 5, 246, 142, 8, 210, 246,
+ 5, 1, 75, 8, 210, 246, 5, 1, 146, 8, 210, 246, 5, 1, 68, 8, 210, 246, 5,
+ 1, 206, 164, 30, 210, 246, 5, 1, 248, 106, 30, 210, 246, 5, 1, 238, 235,
+ 30, 210, 246, 5, 1, 216, 59, 30, 210, 246, 5, 1, 218, 192, 30, 210, 246,
+ 5, 1, 246, 142, 8, 5, 1, 207, 24, 8, 5, 1, 66, 3, 101, 208, 227, 8, 5, 1,
+ 245, 52, 3, 101, 208, 227, 8, 5, 1, 240, 175, 3, 101, 208, 227, 8, 5, 1,
+ 226, 186, 3, 101, 208, 227, 8, 5, 1, 223, 164, 3, 101, 208, 227, 8, 5, 1,
+ 219, 185, 3, 101, 208, 227, 8, 5, 1, 217, 1, 3, 101, 208, 227, 8, 5, 1,
+ 217, 1, 3, 239, 241, 25, 101, 208, 227, 8, 5, 1, 215, 94, 3, 101, 208,
+ 227, 8, 5, 1, 210, 70, 3, 101, 208, 227, 8, 5, 1, 202, 160, 3, 101, 208,
+ 227, 8, 5, 1, 207, 174, 239, 75, 65, 1, 36, 241, 92, 8, 5, 1, 231, 4,
+ 239, 75, 8, 5, 1, 209, 111, 3, 211, 36, 8, 5, 6, 1, 235, 206, 3, 95, 8,
+ 5, 1, 230, 231, 3, 95, 8, 5, 1, 219, 185, 3, 95, 8, 5, 6, 1, 106, 3, 95,
+ 8, 5, 1, 206, 217, 3, 95, 8, 5, 1, 66, 3, 219, 142, 113, 8, 5, 1, 245,
+ 52, 3, 219, 142, 113, 8, 5, 1, 240, 175, 3, 219, 142, 113, 8, 5, 1, 239,
+ 76, 3, 219, 142, 113, 8, 5, 1, 230, 55, 3, 219, 142, 113, 8, 5, 1, 228,
+ 131, 3, 219, 142, 113, 8, 5, 1, 226, 186, 3, 219, 142, 113, 8, 5, 1, 223,
+ 164, 3, 219, 142, 113, 8, 5, 1, 219, 185, 3, 219, 142, 113, 8, 5, 1, 217,
+ 1, 3, 219, 142, 113, 8, 5, 1, 215, 94, 3, 219, 142, 113, 8, 5, 1, 241, 8,
+ 3, 219, 142, 113, 8, 5, 1, 206, 165, 3, 219, 142, 113, 8, 5, 1, 203, 197,
+ 3, 219, 142, 113, 8, 5, 1, 202, 160, 3, 219, 142, 113, 8, 5, 1, 34, 3,
+ 216, 79, 113, 8, 5, 1, 251, 3, 3, 216, 79, 113, 8, 5, 1, 245, 52, 3, 236,
+ 116, 25, 209, 248, 8, 5, 1, 188, 3, 216, 79, 113, 8, 5, 1, 171, 188, 3,
+ 216, 79, 113, 8, 5, 1, 216, 73, 171, 188, 3, 216, 79, 113, 8, 5, 1, 214,
+ 193, 3, 216, 79, 113, 8, 5, 1, 235, 206, 3, 216, 79, 113, 8, 5, 1, 171,
+ 158, 3, 216, 79, 113, 8, 5, 1, 241, 8, 3, 216, 79, 113, 8, 5, 1, 106, 3,
+ 216, 79, 113, 8, 5, 1, 240, 178, 3, 216, 79, 113, 65, 1, 5, 207, 174,
+ 251, 2, 65, 1, 5, 247, 125, 65, 1, 5, 247, 126, 3, 245, 95, 65, 1, 5,
+ 240, 243, 65, 1, 5, 216, 73, 171, 74, 65, 1, 5, 240, 174, 65, 1, 5, 243,
+ 84, 230, 185, 3, 95, 65, 1, 5, 132, 239, 75, 65, 1, 5, 207, 174, 237,
+ 171, 65, 1, 5, 235, 206, 3, 95, 65, 1, 5, 230, 230, 65, 1, 5, 6, 75, 65,
+ 1, 5, 6, 235, 206, 3, 95, 65, 1, 5, 230, 185, 3, 245, 126, 65, 1, 5, 228,
+ 131, 3, 216, 79, 113, 65, 1, 5, 228, 131, 3, 219, 142, 113, 65, 1, 5, 6,
+ 159, 65, 1, 5, 226, 186, 3, 113, 65, 1, 5, 207, 174, 226, 186, 3, 163,
+ 227, 210, 65, 1, 5, 223, 164, 3, 49, 113, 65, 1, 5, 223, 164, 3, 216, 79,
+ 113, 65, 1, 5, 6, 223, 163, 65, 1, 5, 248, 225, 78, 65, 1, 5, 218, 192,
+ 65, 1, 5, 215, 94, 3, 113, 65, 1, 5, 241, 7, 65, 1, 5, 210, 70, 3, 219,
+ 142, 113, 65, 1, 5, 106, 142, 65, 1, 5, 206, 216, 65, 1, 5, 6, 68, 65, 1,
+ 5, 206, 165, 3, 113, 65, 1, 5, 207, 174, 206, 164, 65, 1, 5, 202, 159,
+ 65, 1, 5, 202, 160, 3, 216, 79, 113, 65, 1, 5, 202, 160, 3, 245, 95, 65,
+ 1, 5, 240, 177, 65, 1, 5, 209, 74, 39, 242, 83, 237, 254, 251, 138, 39,
+ 242, 83, 251, 126, 251, 138, 39, 212, 25, 56, 39, 210, 182, 82, 39, 225,
+ 169, 39, 237, 251, 39, 225, 167, 39, 251, 124, 39, 237, 252, 39, 251,
+ 125, 39, 8, 5, 1, 217, 1, 56, 39, 247, 213, 39, 225, 168, 39, 52, 246,
+ 53, 55, 39, 220, 63, 55, 39, 202, 30, 56, 39, 230, 216, 56, 39, 206, 211,
+ 55, 39, 206, 194, 55, 39, 8, 5, 1, 239, 214, 171, 34, 55, 39, 8, 5, 1,
+ 251, 109, 39, 8, 5, 1, 250, 178, 39, 8, 5, 1, 250, 18, 39, 8, 5, 1, 247,
+ 126, 246, 231, 39, 8, 5, 1, 231, 4, 245, 51, 39, 8, 5, 1, 240, 243, 39,
+ 8, 5, 1, 239, 75, 39, 8, 1, 5, 6, 239, 75, 39, 8, 5, 1, 230, 54, 39, 8,
+ 5, 1, 159, 39, 8, 1, 5, 6, 159, 39, 8, 1, 5, 6, 226, 185, 39, 8, 5, 1,
+ 223, 163, 39, 8, 1, 5, 6, 223, 163, 39, 8, 1, 5, 6, 146, 39, 8, 5, 1,
+ 217, 1, 215, 192, 39, 8, 5, 1, 194, 39, 8, 5, 1, 163, 194, 39, 8, 5, 1,
+ 202, 159, 39, 8, 5, 1, 251, 2, 39, 8, 5, 1, 249, 255, 39, 8, 5, 1, 248,
+ 106, 39, 8, 5, 1, 214, 192, 39, 8, 5, 1, 240, 174, 39, 8, 5, 1, 228, 131,
+ 3, 52, 101, 208, 227, 39, 8, 5, 1, 158, 3, 157, 246, 219, 95, 39, 8, 5,
+ 1, 219, 184, 39, 8, 5, 1, 241, 7, 39, 8, 5, 1, 106, 3, 157, 246, 219, 95,
+ 39, 8, 5, 1, 204, 144, 39, 8, 5, 1, 34, 3, 243, 231, 39, 8, 5, 1, 158, 3,
+ 243, 231, 39, 8, 5, 1, 106, 3, 243, 231, 39, 112, 210, 4, 55, 39, 52,
+ 230, 239, 247, 215, 56, 39, 251, 7, 156, 208, 173, 56, 39, 49, 250, 95,
+ 55, 39, 50, 250, 95, 25, 121, 250, 95, 56, 8, 6, 1, 34, 3, 215, 253, 56,
+ 8, 5, 1, 34, 3, 215, 253, 56, 8, 6, 1, 66, 3, 70, 55, 8, 5, 1, 66, 3, 70,
+ 55, 8, 6, 1, 66, 3, 70, 56, 8, 5, 1, 66, 3, 70, 56, 8, 6, 1, 66, 3, 227,
+ 115, 56, 8, 5, 1, 66, 3, 227, 115, 56, 8, 6, 1, 247, 126, 3, 246, 232,
+ 25, 165, 8, 5, 1, 247, 126, 3, 246, 232, 25, 165, 8, 6, 1, 245, 52, 3,
+ 70, 55, 8, 5, 1, 245, 52, 3, 70, 55, 8, 6, 1, 245, 52, 3, 70, 56, 8, 5,
+ 1, 245, 52, 3, 70, 56, 8, 6, 1, 245, 52, 3, 227, 115, 56, 8, 5, 1, 245,
+ 52, 3, 227, 115, 56, 8, 6, 1, 245, 52, 3, 246, 231, 8, 5, 1, 245, 52, 3,
+ 246, 231, 8, 6, 1, 245, 52, 3, 246, 53, 56, 8, 5, 1, 245, 52, 3, 246, 53,
+ 56, 8, 6, 1, 188, 3, 225, 171, 25, 237, 253, 8, 5, 1, 188, 3, 225, 171,
+ 25, 237, 253, 8, 6, 1, 188, 3, 225, 171, 25, 165, 8, 5, 1, 188, 3, 225,
+ 171, 25, 165, 8, 6, 1, 188, 3, 246, 53, 56, 8, 5, 1, 188, 3, 246, 53, 56,
+ 8, 6, 1, 188, 3, 208, 228, 56, 8, 5, 1, 188, 3, 208, 228, 56, 8, 6, 1,
+ 188, 3, 246, 232, 25, 247, 214, 8, 5, 1, 188, 3, 246, 232, 25, 247, 214,
+ 8, 6, 1, 240, 175, 3, 70, 55, 8, 5, 1, 240, 175, 3, 70, 55, 8, 6, 1, 239,
+ 76, 3, 225, 170, 8, 5, 1, 239, 76, 3, 225, 170, 8, 6, 1, 237, 172, 3, 70,
+ 55, 8, 5, 1, 237, 172, 3, 70, 55, 8, 6, 1, 237, 172, 3, 70, 56, 8, 5, 1,
+ 237, 172, 3, 70, 56, 8, 6, 1, 237, 172, 3, 243, 231, 8, 5, 1, 237, 172,
+ 3, 243, 231, 8, 6, 1, 237, 172, 3, 246, 231, 8, 5, 1, 237, 172, 3, 246,
+ 231, 8, 6, 1, 237, 172, 3, 247, 215, 56, 8, 5, 1, 237, 172, 3, 247, 215,
+ 56, 8, 6, 1, 235, 206, 3, 208, 228, 56, 8, 5, 1, 235, 206, 3, 208, 228,
+ 56, 8, 6, 1, 235, 206, 3, 243, 232, 25, 165, 8, 5, 1, 235, 206, 3, 243,
+ 232, 25, 165, 8, 6, 1, 230, 55, 3, 165, 8, 5, 1, 230, 55, 3, 165, 8, 6,
+ 1, 230, 55, 3, 70, 56, 8, 5, 1, 230, 55, 3, 70, 56, 8, 6, 1, 230, 55, 3,
+ 227, 115, 56, 8, 5, 1, 230, 55, 3, 227, 115, 56, 8, 6, 1, 228, 131, 3,
+ 70, 56, 8, 5, 1, 228, 131, 3, 70, 56, 8, 6, 1, 228, 131, 3, 70, 248, 126,
+ 25, 225, 170, 8, 5, 1, 228, 131, 3, 70, 248, 126, 25, 225, 170, 8, 6, 1,
+ 228, 131, 3, 227, 115, 56, 8, 5, 1, 228, 131, 3, 227, 115, 56, 8, 6, 1,
+ 228, 131, 3, 246, 53, 56, 8, 5, 1, 228, 131, 3, 246, 53, 56, 8, 6, 1,
+ 226, 186, 3, 165, 8, 5, 1, 226, 186, 3, 165, 8, 6, 1, 226, 186, 3, 70,
+ 55, 8, 5, 1, 226, 186, 3, 70, 55, 8, 6, 1, 226, 186, 3, 70, 56, 8, 5, 1,
+ 226, 186, 3, 70, 56, 8, 6, 1, 223, 164, 3, 70, 55, 8, 5, 1, 223, 164, 3,
+ 70, 55, 8, 6, 1, 223, 164, 3, 70, 56, 8, 5, 1, 223, 164, 3, 70, 56, 8, 6,
+ 1, 223, 164, 3, 227, 115, 56, 8, 5, 1, 223, 164, 3, 227, 115, 56, 8, 6,
+ 1, 223, 164, 3, 246, 53, 56, 8, 5, 1, 223, 164, 3, 246, 53, 56, 8, 6, 1,
+ 158, 3, 208, 228, 25, 165, 8, 5, 1, 158, 3, 208, 228, 25, 165, 8, 6, 1,
+ 158, 3, 208, 228, 25, 243, 231, 8, 5, 1, 158, 3, 208, 228, 25, 243, 231,
+ 8, 6, 1, 158, 3, 225, 171, 25, 237, 253, 8, 5, 1, 158, 3, 225, 171, 25,
+ 237, 253, 8, 6, 1, 158, 3, 225, 171, 25, 165, 8, 5, 1, 158, 3, 225, 171,
+ 25, 165, 8, 6, 1, 219, 185, 3, 165, 8, 5, 1, 219, 185, 3, 165, 8, 6, 1,
+ 219, 185, 3, 70, 55, 8, 5, 1, 219, 185, 3, 70, 55, 8, 6, 1, 217, 1, 3,
+ 70, 55, 8, 5, 1, 217, 1, 3, 70, 55, 8, 6, 1, 217, 1, 3, 70, 56, 8, 5, 1,
+ 217, 1, 3, 70, 56, 8, 6, 1, 217, 1, 3, 70, 248, 126, 25, 225, 170, 8, 5,
+ 1, 217, 1, 3, 70, 248, 126, 25, 225, 170, 8, 6, 1, 217, 1, 3, 227, 115,
+ 56, 8, 5, 1, 217, 1, 3, 227, 115, 56, 8, 6, 1, 215, 94, 3, 70, 55, 8, 5,
+ 1, 215, 94, 3, 70, 55, 8, 6, 1, 215, 94, 3, 70, 56, 8, 5, 1, 215, 94, 3,
+ 70, 56, 8, 6, 1, 215, 94, 3, 251, 126, 25, 70, 55, 8, 5, 1, 215, 94, 3,
+ 251, 126, 25, 70, 55, 8, 6, 1, 215, 94, 3, 247, 30, 25, 70, 55, 8, 5, 1,
+ 215, 94, 3, 247, 30, 25, 70, 55, 8, 6, 1, 215, 94, 3, 70, 248, 126, 25,
+ 70, 55, 8, 5, 1, 215, 94, 3, 70, 248, 126, 25, 70, 55, 8, 6, 1, 210, 70,
+ 3, 70, 55, 8, 5, 1, 210, 70, 3, 70, 55, 8, 6, 1, 210, 70, 3, 70, 56, 8,
+ 5, 1, 210, 70, 3, 70, 56, 8, 6, 1, 210, 70, 3, 227, 115, 56, 8, 5, 1,
+ 210, 70, 3, 227, 115, 56, 8, 6, 1, 210, 70, 3, 246, 53, 56, 8, 5, 1, 210,
+ 70, 3, 246, 53, 56, 8, 6, 1, 106, 3, 243, 232, 56, 8, 5, 1, 106, 3, 243,
+ 232, 56, 8, 6, 1, 106, 3, 208, 228, 56, 8, 5, 1, 106, 3, 208, 228, 56, 8,
+ 6, 1, 106, 3, 246, 53, 56, 8, 5, 1, 106, 3, 246, 53, 56, 8, 6, 1, 106, 3,
+ 208, 228, 25, 165, 8, 5, 1, 106, 3, 208, 228, 25, 165, 8, 6, 1, 106, 3,
+ 225, 171, 25, 243, 231, 8, 5, 1, 106, 3, 225, 171, 25, 243, 231, 8, 6, 1,
+ 206, 165, 3, 208, 227, 8, 5, 1, 206, 165, 3, 208, 227, 8, 6, 1, 206, 165,
+ 3, 70, 56, 8, 5, 1, 206, 165, 3, 70, 56, 8, 6, 1, 204, 145, 3, 237, 253,
+ 8, 5, 1, 204, 145, 3, 237, 253, 8, 6, 1, 204, 145, 3, 165, 8, 5, 1, 204,
+ 145, 3, 165, 8, 6, 1, 204, 145, 3, 243, 231, 8, 5, 1, 204, 145, 3, 243,
+ 231, 8, 6, 1, 204, 145, 3, 70, 55, 8, 5, 1, 204, 145, 3, 70, 55, 8, 6, 1,
+ 204, 145, 3, 70, 56, 8, 5, 1, 204, 145, 3, 70, 56, 8, 6, 1, 203, 197, 3,
+ 70, 55, 8, 5, 1, 203, 197, 3, 70, 55, 8, 6, 1, 203, 197, 3, 243, 231, 8,
+ 5, 1, 203, 197, 3, 243, 231, 8, 6, 1, 203, 125, 3, 70, 55, 8, 5, 1, 203,
+ 125, 3, 70, 55, 8, 6, 1, 202, 160, 3, 246, 52, 8, 5, 1, 202, 160, 3, 246,
+ 52, 8, 6, 1, 202, 160, 3, 70, 56, 8, 5, 1, 202, 160, 3, 70, 56, 8, 6, 1,
+ 202, 160, 3, 227, 115, 56, 8, 5, 1, 202, 160, 3, 227, 115, 56, 8, 5, 1,
+ 237, 172, 3, 227, 115, 56, 8, 5, 1, 210, 70, 3, 243, 231, 8, 5, 1, 204,
+ 145, 3, 215, 253, 55, 8, 5, 1, 203, 125, 3, 215, 253, 55, 8, 5, 1, 34, 3,
+ 50, 162, 215, 252, 8, 5, 1, 163, 215, 94, 3, 70, 55, 8, 5, 1, 163, 215,
+ 94, 3, 243, 228, 95, 8, 5, 1, 163, 215, 94, 3, 138, 95, 8, 6, 1, 213, 57,
+ 194, 8, 5, 1, 244, 37, 8, 6, 1, 34, 3, 70, 56, 8, 5, 1, 34, 3, 70, 56, 8,
+ 6, 1, 34, 3, 236, 116, 55, 8, 5, 1, 34, 3, 236, 116, 55, 8, 6, 1, 34, 3,
+ 246, 53, 25, 165, 8, 5, 1, 34, 3, 246, 53, 25, 165, 8, 6, 1, 34, 3, 246,
+ 53, 25, 237, 253, 8, 5, 1, 34, 3, 246, 53, 25, 237, 253, 8, 6, 1, 34, 3,
+ 246, 53, 25, 236, 116, 55, 8, 5, 1, 34, 3, 246, 53, 25, 236, 116, 55, 8,
+ 6, 1, 34, 3, 246, 53, 25, 208, 227, 8, 5, 1, 34, 3, 246, 53, 25, 208,
+ 227, 8, 6, 1, 34, 3, 246, 53, 25, 70, 56, 8, 5, 1, 34, 3, 246, 53, 25,
+ 70, 56, 8, 6, 1, 34, 3, 247, 215, 25, 165, 8, 5, 1, 34, 3, 247, 215, 25,
+ 165, 8, 6, 1, 34, 3, 247, 215, 25, 237, 253, 8, 5, 1, 34, 3, 247, 215,
+ 25, 237, 253, 8, 6, 1, 34, 3, 247, 215, 25, 236, 116, 55, 8, 5, 1, 34, 3,
+ 247, 215, 25, 236, 116, 55, 8, 6, 1, 34, 3, 247, 215, 25, 208, 227, 8, 5,
+ 1, 34, 3, 247, 215, 25, 208, 227, 8, 6, 1, 34, 3, 247, 215, 25, 70, 56,
+ 8, 5, 1, 34, 3, 247, 215, 25, 70, 56, 8, 6, 1, 188, 3, 70, 56, 8, 5, 1,
+ 188, 3, 70, 56, 8, 6, 1, 188, 3, 236, 116, 55, 8, 5, 1, 188, 3, 236, 116,
+ 55, 8, 6, 1, 188, 3, 208, 227, 8, 5, 1, 188, 3, 208, 227, 8, 6, 1, 188,
+ 3, 246, 53, 25, 165, 8, 5, 1, 188, 3, 246, 53, 25, 165, 8, 6, 1, 188, 3,
+ 246, 53, 25, 237, 253, 8, 5, 1, 188, 3, 246, 53, 25, 237, 253, 8, 6, 1,
+ 188, 3, 246, 53, 25, 236, 116, 55, 8, 5, 1, 188, 3, 246, 53, 25, 236,
+ 116, 55, 8, 6, 1, 188, 3, 246, 53, 25, 208, 227, 8, 5, 1, 188, 3, 246,
+ 53, 25, 208, 227, 8, 6, 1, 188, 3, 246, 53, 25, 70, 56, 8, 5, 1, 188, 3,
+ 246, 53, 25, 70, 56, 8, 6, 1, 235, 206, 3, 236, 116, 55, 8, 5, 1, 235,
+ 206, 3, 236, 116, 55, 8, 6, 1, 235, 206, 3, 70, 56, 8, 5, 1, 235, 206, 3,
+ 70, 56, 8, 6, 1, 158, 3, 70, 56, 8, 5, 1, 158, 3, 70, 56, 8, 6, 1, 158,
+ 3, 236, 116, 55, 8, 5, 1, 158, 3, 236, 116, 55, 8, 6, 1, 158, 3, 246, 53,
+ 25, 165, 8, 5, 1, 158, 3, 246, 53, 25, 165, 8, 6, 1, 158, 3, 246, 53, 25,
+ 237, 253, 8, 5, 1, 158, 3, 246, 53, 25, 237, 253, 8, 6, 1, 158, 3, 246,
+ 53, 25, 236, 116, 55, 8, 5, 1, 158, 3, 246, 53, 25, 236, 116, 55, 8, 6,
+ 1, 158, 3, 246, 53, 25, 208, 227, 8, 5, 1, 158, 3, 246, 53, 25, 208, 227,
+ 8, 6, 1, 158, 3, 246, 53, 25, 70, 56, 8, 5, 1, 158, 3, 246, 53, 25, 70,
+ 56, 8, 6, 1, 158, 3, 236, 54, 25, 165, 8, 5, 1, 158, 3, 236, 54, 25, 165,
+ 8, 6, 1, 158, 3, 236, 54, 25, 237, 253, 8, 5, 1, 158, 3, 236, 54, 25,
+ 237, 253, 8, 6, 1, 158, 3, 236, 54, 25, 236, 116, 55, 8, 5, 1, 158, 3,
+ 236, 54, 25, 236, 116, 55, 8, 6, 1, 158, 3, 236, 54, 25, 208, 227, 8, 5,
+ 1, 158, 3, 236, 54, 25, 208, 227, 8, 6, 1, 158, 3, 236, 54, 25, 70, 56,
+ 8, 5, 1, 158, 3, 236, 54, 25, 70, 56, 8, 6, 1, 106, 3, 70, 56, 8, 5, 1,
+ 106, 3, 70, 56, 8, 6, 1, 106, 3, 236, 116, 55, 8, 5, 1, 106, 3, 236, 116,
+ 55, 8, 6, 1, 106, 3, 236, 54, 25, 165, 8, 5, 1, 106, 3, 236, 54, 25, 165,
+ 8, 6, 1, 106, 3, 236, 54, 25, 237, 253, 8, 5, 1, 106, 3, 236, 54, 25,
+ 237, 253, 8, 6, 1, 106, 3, 236, 54, 25, 236, 116, 55, 8, 5, 1, 106, 3,
+ 236, 54, 25, 236, 116, 55, 8, 6, 1, 106, 3, 236, 54, 25, 208, 227, 8, 5,
+ 1, 106, 3, 236, 54, 25, 208, 227, 8, 6, 1, 106, 3, 236, 54, 25, 70, 56,
+ 8, 5, 1, 106, 3, 236, 54, 25, 70, 56, 8, 6, 1, 203, 125, 3, 237, 253, 8,
+ 5, 1, 203, 125, 3, 237, 253, 8, 6, 1, 203, 125, 3, 70, 56, 8, 5, 1, 203,
+ 125, 3, 70, 56, 8, 6, 1, 203, 125, 3, 236, 116, 55, 8, 5, 1, 203, 125, 3,
+ 236, 116, 55, 8, 6, 1, 203, 125, 3, 208, 227, 8, 5, 1, 203, 125, 3, 208,
+ 227, 8, 6, 1, 224, 147, 227, 78, 8, 5, 1, 224, 147, 227, 78, 8, 6, 1,
+ 224, 147, 206, 164, 8, 5, 1, 224, 147, 206, 164, 8, 6, 1, 203, 125, 3,
+ 227, 14, 8, 5, 1, 203, 125, 3, 227, 14, 30, 5, 1, 251, 3, 3, 217, 195,
+ 30, 5, 1, 251, 3, 3, 244, 141, 30, 5, 1, 251, 3, 3, 217, 196, 25, 206,
+ 70, 30, 5, 1, 251, 3, 3, 244, 142, 25, 206, 70, 30, 5, 1, 251, 3, 3, 217,
+ 196, 25, 219, 189, 30, 5, 1, 251, 3, 3, 244, 142, 25, 219, 189, 30, 5, 1,
+ 251, 3, 3, 217, 196, 25, 218, 239, 30, 5, 1, 251, 3, 3, 244, 142, 25,
+ 218, 239, 30, 6, 1, 251, 3, 3, 217, 195, 30, 6, 1, 251, 3, 3, 244, 141,
+ 30, 6, 1, 251, 3, 3, 217, 196, 25, 206, 70, 30, 6, 1, 251, 3, 3, 244,
+ 142, 25, 206, 70, 30, 6, 1, 251, 3, 3, 217, 196, 25, 219, 189, 30, 6, 1,
+ 251, 3, 3, 244, 142, 25, 219, 189, 30, 6, 1, 251, 3, 3, 217, 196, 25,
+ 218, 239, 30, 6, 1, 251, 3, 3, 244, 142, 25, 218, 239, 30, 5, 1, 241, 38,
+ 3, 217, 195, 30, 5, 1, 241, 38, 3, 244, 141, 30, 5, 1, 241, 38, 3, 217,
+ 196, 25, 206, 70, 30, 5, 1, 241, 38, 3, 244, 142, 25, 206, 70, 30, 5, 1,
+ 241, 38, 3, 217, 196, 25, 219, 189, 30, 5, 1, 241, 38, 3, 244, 142, 25,
+ 219, 189, 30, 6, 1, 241, 38, 3, 217, 195, 30, 6, 1, 241, 38, 3, 244, 141,
+ 30, 6, 1, 241, 38, 3, 217, 196, 25, 206, 70, 30, 6, 1, 241, 38, 3, 244,
+ 142, 25, 206, 70, 30, 6, 1, 241, 38, 3, 217, 196, 25, 219, 189, 30, 6, 1,
+ 241, 38, 3, 244, 142, 25, 219, 189, 30, 5, 1, 240, 249, 3, 217, 195, 30,
+ 5, 1, 240, 249, 3, 244, 141, 30, 5, 1, 240, 249, 3, 217, 196, 25, 206,
+ 70, 30, 5, 1, 240, 249, 3, 244, 142, 25, 206, 70, 30, 5, 1, 240, 249, 3,
+ 217, 196, 25, 219, 189, 30, 5, 1, 240, 249, 3, 244, 142, 25, 219, 189,
+ 30, 5, 1, 240, 249, 3, 217, 196, 25, 218, 239, 30, 5, 1, 240, 249, 3,
+ 244, 142, 25, 218, 239, 30, 6, 1, 240, 249, 3, 217, 195, 30, 6, 1, 240,
+ 249, 3, 244, 141, 30, 6, 1, 240, 249, 3, 217, 196, 25, 206, 70, 30, 6, 1,
+ 240, 249, 3, 244, 142, 25, 206, 70, 30, 6, 1, 240, 249, 3, 217, 196, 25,
+ 219, 189, 30, 6, 1, 240, 249, 3, 244, 142, 25, 219, 189, 30, 6, 1, 240,
+ 249, 3, 217, 196, 25, 218, 239, 30, 6, 1, 240, 249, 3, 244, 142, 25, 218,
+ 239, 30, 5, 1, 230, 231, 3, 217, 195, 30, 5, 1, 230, 231, 3, 244, 141,
+ 30, 5, 1, 230, 231, 3, 217, 196, 25, 206, 70, 30, 5, 1, 230, 231, 3, 244,
+ 142, 25, 206, 70, 30, 5, 1, 230, 231, 3, 217, 196, 25, 219, 189, 30, 5,
+ 1, 230, 231, 3, 244, 142, 25, 219, 189, 30, 5, 1, 230, 231, 3, 217, 196,
+ 25, 218, 239, 30, 5, 1, 230, 231, 3, 244, 142, 25, 218, 239, 30, 6, 1,
+ 230, 231, 3, 217, 195, 30, 6, 1, 230, 231, 3, 244, 141, 30, 6, 1, 230,
+ 231, 3, 217, 196, 25, 206, 70, 30, 6, 1, 230, 231, 3, 244, 142, 25, 206,
+ 70, 30, 6, 1, 230, 231, 3, 217, 196, 25, 219, 189, 30, 6, 1, 230, 231, 3,
+ 244, 142, 25, 219, 189, 30, 6, 1, 230, 231, 3, 217, 196, 25, 218, 239,
+ 30, 6, 1, 230, 231, 3, 244, 142, 25, 218, 239, 30, 5, 1, 220, 35, 3, 217,
+ 195, 30, 5, 1, 220, 35, 3, 244, 141, 30, 5, 1, 220, 35, 3, 217, 196, 25,
+ 206, 70, 30, 5, 1, 220, 35, 3, 244, 142, 25, 206, 70, 30, 5, 1, 220, 35,
+ 3, 217, 196, 25, 219, 189, 30, 5, 1, 220, 35, 3, 244, 142, 25, 219, 189,
+ 30, 6, 1, 220, 35, 3, 217, 195, 30, 6, 1, 220, 35, 3, 244, 141, 30, 6, 1,
+ 220, 35, 3, 217, 196, 25, 206, 70, 30, 6, 1, 220, 35, 3, 244, 142, 25,
+ 206, 70, 30, 6, 1, 220, 35, 3, 217, 196, 25, 219, 189, 30, 6, 1, 220, 35,
+ 3, 244, 142, 25, 219, 189, 30, 5, 1, 206, 217, 3, 217, 195, 30, 5, 1,
+ 206, 217, 3, 244, 141, 30, 5, 1, 206, 217, 3, 217, 196, 25, 206, 70, 30,
+ 5, 1, 206, 217, 3, 244, 142, 25, 206, 70, 30, 5, 1, 206, 217, 3, 217,
+ 196, 25, 219, 189, 30, 5, 1, 206, 217, 3, 244, 142, 25, 219, 189, 30, 5,
+ 1, 206, 217, 3, 217, 196, 25, 218, 239, 30, 5, 1, 206, 217, 3, 244, 142,
+ 25, 218, 239, 30, 6, 1, 206, 217, 3, 244, 141, 30, 6, 1, 206, 217, 3,
+ 244, 142, 25, 206, 70, 30, 6, 1, 206, 217, 3, 244, 142, 25, 219, 189, 30,
+ 6, 1, 206, 217, 3, 244, 142, 25, 218, 239, 30, 5, 1, 220, 37, 3, 217,
+ 195, 30, 5, 1, 220, 37, 3, 244, 141, 30, 5, 1, 220, 37, 3, 217, 196, 25,
+ 206, 70, 30, 5, 1, 220, 37, 3, 244, 142, 25, 206, 70, 30, 5, 1, 220, 37,
+ 3, 217, 196, 25, 219, 189, 30, 5, 1, 220, 37, 3, 244, 142, 25, 219, 189,
+ 30, 5, 1, 220, 37, 3, 217, 196, 25, 218, 239, 30, 5, 1, 220, 37, 3, 244,
+ 142, 25, 218, 239, 30, 6, 1, 220, 37, 3, 217, 195, 30, 6, 1, 220, 37, 3,
+ 244, 141, 30, 6, 1, 220, 37, 3, 217, 196, 25, 206, 70, 30, 6, 1, 220, 37,
+ 3, 244, 142, 25, 206, 70, 30, 6, 1, 220, 37, 3, 217, 196, 25, 219, 189,
+ 30, 6, 1, 220, 37, 3, 244, 142, 25, 219, 189, 30, 6, 1, 220, 37, 3, 217,
+ 196, 25, 218, 239, 30, 6, 1, 220, 37, 3, 244, 142, 25, 218, 239, 30, 5,
+ 1, 251, 3, 3, 206, 70, 30, 5, 1, 251, 3, 3, 219, 189, 30, 5, 1, 241, 38,
+ 3, 206, 70, 30, 5, 1, 241, 38, 3, 219, 189, 30, 5, 1, 240, 249, 3, 206,
+ 70, 30, 5, 1, 240, 249, 3, 219, 189, 30, 5, 1, 230, 231, 3, 206, 70, 30,
+ 5, 1, 230, 231, 3, 219, 189, 30, 5, 1, 220, 35, 3, 206, 70, 30, 5, 1,
+ 220, 35, 3, 219, 189, 30, 5, 1, 206, 217, 3, 206, 70, 30, 5, 1, 206, 217,
+ 3, 219, 189, 30, 5, 1, 220, 37, 3, 206, 70, 30, 5, 1, 220, 37, 3, 219,
+ 189, 30, 5, 1, 251, 3, 3, 217, 196, 25, 202, 221, 30, 5, 1, 251, 3, 3,
+ 244, 142, 25, 202, 221, 30, 5, 1, 251, 3, 3, 217, 196, 25, 206, 71, 25,
+ 202, 221, 30, 5, 1, 251, 3, 3, 244, 142, 25, 206, 71, 25, 202, 221, 30,
+ 5, 1, 251, 3, 3, 217, 196, 25, 219, 190, 25, 202, 221, 30, 5, 1, 251, 3,
+ 3, 244, 142, 25, 219, 190, 25, 202, 221, 30, 5, 1, 251, 3, 3, 217, 196,
+ 25, 218, 240, 25, 202, 221, 30, 5, 1, 251, 3, 3, 244, 142, 25, 218, 240,
+ 25, 202, 221, 30, 6, 1, 251, 3, 3, 217, 196, 25, 217, 209, 30, 6, 1, 251,
+ 3, 3, 244, 142, 25, 217, 209, 30, 6, 1, 251, 3, 3, 217, 196, 25, 206, 71,
+ 25, 217, 209, 30, 6, 1, 251, 3, 3, 244, 142, 25, 206, 71, 25, 217, 209,
+ 30, 6, 1, 251, 3, 3, 217, 196, 25, 219, 190, 25, 217, 209, 30, 6, 1, 251,
+ 3, 3, 244, 142, 25, 219, 190, 25, 217, 209, 30, 6, 1, 251, 3, 3, 217,
+ 196, 25, 218, 240, 25, 217, 209, 30, 6, 1, 251, 3, 3, 244, 142, 25, 218,
+ 240, 25, 217, 209, 30, 5, 1, 240, 249, 3, 217, 196, 25, 202, 221, 30, 5,
+ 1, 240, 249, 3, 244, 142, 25, 202, 221, 30, 5, 1, 240, 249, 3, 217, 196,
+ 25, 206, 71, 25, 202, 221, 30, 5, 1, 240, 249, 3, 244, 142, 25, 206, 71,
+ 25, 202, 221, 30, 5, 1, 240, 249, 3, 217, 196, 25, 219, 190, 25, 202,
+ 221, 30, 5, 1, 240, 249, 3, 244, 142, 25, 219, 190, 25, 202, 221, 30, 5,
+ 1, 240, 249, 3, 217, 196, 25, 218, 240, 25, 202, 221, 30, 5, 1, 240, 249,
+ 3, 244, 142, 25, 218, 240, 25, 202, 221, 30, 6, 1, 240, 249, 3, 217, 196,
+ 25, 217, 209, 30, 6, 1, 240, 249, 3, 244, 142, 25, 217, 209, 30, 6, 1,
+ 240, 249, 3, 217, 196, 25, 206, 71, 25, 217, 209, 30, 6, 1, 240, 249, 3,
+ 244, 142, 25, 206, 71, 25, 217, 209, 30, 6, 1, 240, 249, 3, 217, 196, 25,
+ 219, 190, 25, 217, 209, 30, 6, 1, 240, 249, 3, 244, 142, 25, 219, 190,
+ 25, 217, 209, 30, 6, 1, 240, 249, 3, 217, 196, 25, 218, 240, 25, 217,
+ 209, 30, 6, 1, 240, 249, 3, 244, 142, 25, 218, 240, 25, 217, 209, 30, 5,
+ 1, 220, 37, 3, 217, 196, 25, 202, 221, 30, 5, 1, 220, 37, 3, 244, 142,
+ 25, 202, 221, 30, 5, 1, 220, 37, 3, 217, 196, 25, 206, 71, 25, 202, 221,
+ 30, 5, 1, 220, 37, 3, 244, 142, 25, 206, 71, 25, 202, 221, 30, 5, 1, 220,
+ 37, 3, 217, 196, 25, 219, 190, 25, 202, 221, 30, 5, 1, 220, 37, 3, 244,
+ 142, 25, 219, 190, 25, 202, 221, 30, 5, 1, 220, 37, 3, 217, 196, 25, 218,
+ 240, 25, 202, 221, 30, 5, 1, 220, 37, 3, 244, 142, 25, 218, 240, 25, 202,
+ 221, 30, 6, 1, 220, 37, 3, 217, 196, 25, 217, 209, 30, 6, 1, 220, 37, 3,
+ 244, 142, 25, 217, 209, 30, 6, 1, 220, 37, 3, 217, 196, 25, 206, 71, 25,
+ 217, 209, 30, 6, 1, 220, 37, 3, 244, 142, 25, 206, 71, 25, 217, 209, 30,
+ 6, 1, 220, 37, 3, 217, 196, 25, 219, 190, 25, 217, 209, 30, 6, 1, 220,
+ 37, 3, 244, 142, 25, 219, 190, 25, 217, 209, 30, 6, 1, 220, 37, 3, 217,
+ 196, 25, 218, 240, 25, 217, 209, 30, 6, 1, 220, 37, 3, 244, 142, 25, 218,
+ 240, 25, 217, 209, 30, 5, 1, 251, 3, 3, 205, 167, 30, 5, 1, 251, 3, 3,
+ 225, 170, 30, 5, 1, 251, 3, 3, 206, 71, 25, 202, 221, 30, 5, 1, 251, 3,
+ 3, 202, 221, 30, 5, 1, 251, 3, 3, 219, 190, 25, 202, 221, 30, 5, 1, 251,
+ 3, 3, 218, 239, 30, 5, 1, 251, 3, 3, 218, 240, 25, 202, 221, 30, 6, 1,
+ 251, 3, 3, 205, 167, 30, 6, 1, 251, 3, 3, 225, 170, 30, 6, 1, 251, 3, 3,
+ 206, 70, 30, 6, 1, 251, 3, 3, 219, 189, 30, 6, 1, 251, 3, 3, 217, 209,
+ 30, 228, 252, 30, 217, 209, 30, 217, 195, 30, 218, 239, 30, 243, 225, 25,
+ 218, 239, 30, 5, 1, 240, 249, 3, 206, 71, 25, 202, 221, 30, 5, 1, 240,
+ 249, 3, 202, 221, 30, 5, 1, 240, 249, 3, 219, 190, 25, 202, 221, 30, 5,
+ 1, 240, 249, 3, 218, 239, 30, 5, 1, 240, 249, 3, 218, 240, 25, 202, 221,
+ 30, 6, 1, 241, 38, 3, 206, 70, 30, 6, 1, 241, 38, 3, 219, 189, 30, 6, 1,
+ 240, 249, 3, 206, 70, 30, 6, 1, 240, 249, 3, 219, 189, 30, 6, 1, 240,
+ 249, 3, 217, 209, 30, 217, 196, 25, 206, 70, 30, 217, 196, 25, 219, 189,
+ 30, 217, 196, 25, 218, 239, 30, 5, 1, 230, 231, 3, 205, 167, 30, 5, 1,
+ 230, 231, 3, 225, 170, 30, 5, 1, 230, 231, 3, 243, 225, 25, 206, 70, 30,
+ 5, 1, 230, 231, 3, 243, 225, 25, 219, 189, 30, 5, 1, 230, 231, 3, 218,
+ 239, 30, 5, 1, 230, 231, 3, 243, 225, 25, 218, 239, 30, 6, 1, 230, 231,
+ 3, 205, 167, 30, 6, 1, 230, 231, 3, 225, 170, 30, 6, 1, 230, 231, 3, 206,
+ 70, 30, 6, 1, 230, 231, 3, 219, 189, 30, 244, 142, 25, 206, 70, 30, 244,
+ 142, 25, 219, 189, 30, 244, 142, 25, 218, 239, 30, 5, 1, 206, 217, 3,
+ 205, 167, 30, 5, 1, 206, 217, 3, 225, 170, 30, 5, 1, 206, 217, 3, 243,
+ 225, 25, 206, 70, 30, 5, 1, 206, 217, 3, 243, 225, 25, 219, 189, 30, 5,
+ 1, 216, 60, 3, 217, 195, 30, 5, 1, 216, 60, 3, 244, 141, 30, 5, 1, 206,
+ 217, 3, 218, 239, 30, 5, 1, 206, 217, 3, 243, 225, 25, 218, 239, 30, 6,
+ 1, 206, 217, 3, 205, 167, 30, 6, 1, 206, 217, 3, 225, 170, 30, 6, 1, 206,
+ 217, 3, 206, 70, 30, 6, 1, 206, 217, 3, 219, 189, 30, 6, 1, 216, 60, 3,
+ 244, 141, 30, 243, 225, 25, 206, 70, 30, 243, 225, 25, 219, 189, 30, 206,
+ 70, 30, 5, 1, 220, 37, 3, 206, 71, 25, 202, 221, 30, 5, 1, 220, 37, 3,
+ 202, 221, 30, 5, 1, 220, 37, 3, 219, 190, 25, 202, 221, 30, 5, 1, 220,
+ 37, 3, 218, 239, 30, 5, 1, 220, 37, 3, 218, 240, 25, 202, 221, 30, 6, 1,
+ 220, 35, 3, 206, 70, 30, 6, 1, 220, 35, 3, 219, 189, 30, 6, 1, 220, 37,
+ 3, 206, 70, 30, 6, 1, 220, 37, 3, 219, 189, 30, 6, 1, 220, 37, 3, 217,
+ 209, 30, 219, 189, 30, 244, 141, 241, 93, 217, 62, 241, 104, 217, 62,
+ 241, 93, 211, 228, 241, 104, 211, 228, 209, 28, 211, 228, 239, 145, 211,
+ 228, 212, 86, 211, 228, 240, 16, 211, 228, 217, 179, 211, 228, 209, 63,
+ 211, 228, 237, 146, 211, 228, 202, 85, 204, 24, 211, 228, 202, 85, 204,
+ 24, 221, 183, 202, 85, 204, 24, 230, 96, 227, 213, 82, 216, 7, 82, 235,
+ 220, 221, 184, 235, 220, 240, 16, 244, 144, 241, 93, 244, 144, 241, 104,
+ 244, 144, 236, 106, 142, 52, 80, 227, 114, 52, 124, 227, 114, 49, 212,
+ 120, 217, 31, 82, 50, 212, 120, 217, 31, 82, 212, 120, 226, 255, 217, 31,
+ 82, 212, 120, 236, 241, 217, 31, 82, 49, 52, 217, 31, 82, 50, 52, 217,
+ 31, 82, 52, 226, 255, 217, 31, 82, 52, 236, 241, 217, 31, 82, 244, 195,
+ 52, 244, 195, 247, 177, 208, 82, 247, 177, 118, 70, 227, 232, 120, 70,
+ 227, 232, 236, 106, 241, 108, 235, 218, 218, 62, 227, 115, 213, 130, 219,
+ 89, 213, 130, 227, 213, 241, 102, 216, 7, 241, 102, 218, 42, 243, 165,
+ 239, 157, 227, 213, 219, 196, 216, 7, 219, 196, 223, 73, 221, 190, 211,
+ 228, 218, 247, 224, 116, 54, 218, 247, 209, 153, 209, 37, 54, 217, 236,
+ 52, 217, 236, 208, 70, 217, 236, 216, 73, 217, 236, 216, 73, 52, 217,
+ 236, 216, 73, 208, 70, 217, 236, 247, 33, 212, 120, 227, 217, 250, 218,
+ 217, 31, 82, 212, 120, 216, 11, 250, 218, 217, 31, 82, 216, 134, 82, 52,
+ 240, 212, 82, 230, 247, 219, 198, 206, 243, 167, 208, 250, 247, 34, 231,
+ 8, 218, 62, 250, 57, 235, 221, 247, 177, 239, 138, 212, 57, 49, 51, 247,
+ 227, 3, 217, 41, 50, 51, 247, 227, 3, 217, 41, 52, 217, 47, 82, 217, 47,
+ 240, 212, 82, 240, 212, 217, 47, 82, 208, 203, 2, 240, 250, 216, 73, 218,
+ 126, 54, 62, 96, 247, 177, 62, 86, 247, 177, 124, 250, 59, 216, 73, 213,
+ 143, 246, 17, 206, 224, 120, 250, 58, 251, 18, 205, 243, 245, 231, 224,
+ 103, 54, 210, 153, 244, 144, 230, 239, 206, 243, 239, 198, 217, 179, 82,
+ 126, 70, 217, 178, 217, 58, 217, 236, 239, 147, 70, 217, 178, 239, 233,
+ 70, 217, 178, 120, 70, 217, 178, 239, 147, 70, 82, 242, 83, 245, 130,
+ 208, 81, 80, 239, 147, 243, 83, 225, 10, 13, 211, 228, 203, 238, 230, 96,
+ 239, 100, 250, 155, 230, 237, 208, 219, 230, 237, 213, 130, 230, 237,
+ 218, 76, 227, 213, 230, 207, 216, 7, 230, 207, 239, 245, 211, 18, 230,
+ 207, 218, 42, 243, 165, 230, 207, 231, 20, 210, 101, 210, 170, 251, 128,
+ 210, 101, 210, 170, 231, 20, 10, 239, 159, 213, 61, 251, 128, 10, 239,
+ 159, 213, 61, 223, 67, 17, 213, 62, 221, 186, 17, 213, 62, 210, 199, 202,
+ 84, 210, 199, 8, 5, 1, 75, 210, 199, 149, 210, 199, 170, 210, 199, 195,
+ 210, 199, 213, 111, 210, 199, 199, 210, 199, 222, 63, 210, 199, 91, 54,
+ 210, 199, 224, 102, 210, 199, 241, 35, 54, 210, 199, 49, 219, 76, 210,
+ 199, 50, 219, 76, 210, 199, 8, 5, 1, 223, 163, 210, 246, 202, 84, 210,
+ 246, 105, 210, 246, 108, 210, 246, 147, 210, 246, 149, 210, 246, 170,
+ 210, 246, 195, 210, 246, 213, 111, 210, 246, 199, 210, 246, 222, 63, 210,
+ 246, 91, 54, 210, 246, 224, 102, 210, 246, 241, 35, 54, 210, 246, 49,
+ 219, 76, 210, 246, 50, 219, 76, 8, 210, 246, 5, 1, 63, 8, 210, 246, 5, 1,
+ 74, 8, 210, 246, 5, 1, 78, 8, 210, 246, 5, 1, 203, 196, 8, 210, 246, 5,
+ 1, 214, 192, 8, 210, 246, 5, 1, 237, 171, 8, 210, 246, 5, 1, 230, 54, 8,
+ 210, 246, 5, 1, 159, 8, 210, 246, 5, 1, 226, 185, 8, 210, 246, 5, 1, 223,
+ 163, 8, 210, 246, 5, 1, 219, 184, 8, 210, 246, 5, 1, 194, 8, 210, 246, 5,
+ 1, 210, 69, 240, 229, 54, 245, 243, 54, 245, 115, 54, 239, 128, 239, 132,
+ 54, 227, 94, 54, 224, 117, 54, 223, 90, 54, 218, 224, 54, 215, 120, 54,
+ 203, 246, 54, 222, 214, 213, 29, 54, 243, 92, 54, 240, 230, 54, 229, 79,
+ 54, 207, 196, 54, 242, 66, 54, 238, 166, 219, 2, 54, 218, 221, 54, 237,
+ 225, 54, 250, 24, 54, 236, 32, 54, 246, 233, 54, 227, 84, 208, 125, 54,
+ 211, 209, 54, 209, 150, 54, 231, 34, 215, 120, 54, 207, 177, 227, 94, 54,
+ 221, 173, 131, 54, 225, 120, 54, 215, 142, 54, 228, 4, 54, 39, 49, 237,
+ 87, 55, 39, 50, 237, 87, 55, 39, 163, 80, 227, 115, 219, 199, 39, 212,
+ 228, 80, 227, 115, 219, 199, 39, 250, 194, 53, 55, 39, 246, 18, 53, 55,
+ 39, 49, 53, 55, 39, 50, 53, 55, 39, 215, 253, 219, 199, 39, 246, 18, 215,
+ 253, 219, 199, 39, 250, 194, 215, 253, 219, 199, 39, 126, 187, 55, 39,
+ 239, 147, 187, 55, 39, 241, 88, 246, 61, 39, 241, 88, 211, 177, 39, 241,
+ 88, 243, 221, 39, 241, 88, 246, 62, 249, 20, 39, 49, 50, 53, 55, 39, 241,
+ 88, 214, 184, 39, 241, 88, 229, 147, 39, 241, 88, 206, 214, 218, 59, 208,
+ 85, 39, 216, 74, 212, 1, 219, 199, 39, 52, 80, 211, 32, 219, 199, 39,
+ 250, 204, 97, 39, 208, 70, 206, 245, 39, 204, 27, 247, 208, 55, 39, 96,
+ 53, 219, 199, 39, 163, 52, 212, 1, 219, 199, 39, 86, 237, 87, 3, 150,
+ 242, 68, 39, 96, 237, 87, 3, 150, 242, 68, 39, 49, 53, 56, 39, 50, 53,
+ 56, 39, 250, 60, 55, 251, 134, 220, 69, 251, 118, 208, 173, 209, 93, 210,
+ 255, 169, 6, 247, 125, 244, 55, 246, 223, 246, 218, 227, 115, 97, 247,
+ 35, 220, 69, 247, 84, 206, 254, 240, 231, 245, 200, 214, 181, 244, 55,
+ 240, 90, 132, 5, 239, 75, 132, 6, 237, 171, 248, 41, 6, 237, 171, 169, 6,
+ 237, 171, 218, 93, 245, 200, 218, 93, 245, 201, 115, 120, 218, 167, 132,
+ 6, 75, 248, 41, 6, 75, 132, 6, 159, 132, 5, 159, 228, 131, 66, 248, 231,
+ 97, 169, 6, 223, 163, 221, 42, 54, 211, 241, 216, 146, 245, 168, 132, 6,
+ 219, 184, 169, 6, 219, 184, 169, 6, 217, 134, 132, 6, 146, 248, 41, 6,
+ 146, 169, 6, 146, 217, 243, 209, 241, 216, 86, 213, 122, 82, 209, 162,
+ 54, 208, 115, 131, 54, 206, 39, 169, 6, 202, 159, 219, 215, 54, 220, 59,
+ 54, 230, 239, 220, 59, 54, 248, 41, 6, 202, 159, 207, 174, 30, 5, 1, 230,
+ 230, 229, 188, 54, 250, 213, 54, 132, 6, 249, 255, 248, 41, 6, 247, 125,
+ 240, 255, 97, 132, 5, 74, 132, 6, 74, 132, 6, 240, 174, 207, 174, 6, 240,
+ 174, 132, 6, 226, 185, 132, 5, 78, 137, 97, 248, 109, 97, 238, 68, 97,
+ 244, 179, 97, 231, 25, 211, 239, 215, 198, 6, 217, 134, 240, 93, 54, 169,
+ 5, 218, 167, 169, 5, 238, 235, 169, 6, 238, 235, 169, 6, 218, 167, 169,
+ 223, 162, 210, 217, 207, 174, 41, 6, 239, 75, 207, 174, 41, 6, 159, 216,
+ 73, 41, 6, 159, 207, 174, 41, 6, 203, 124, 169, 37, 6, 245, 51, 169, 37,
+ 5, 245, 51, 169, 37, 5, 74, 169, 37, 5, 75, 169, 37, 5, 230, 184, 217,
+ 212, 227, 114, 207, 174, 250, 235, 218, 247, 54, 251, 41, 207, 174, 5,
+ 240, 174, 16, 35, 214, 252, 211, 239, 204, 161, 239, 138, 118, 213, 107,
+ 204, 161, 239, 138, 118, 222, 57, 204, 161, 239, 138, 118, 209, 143, 204,
+ 161, 239, 138, 118, 209, 60, 204, 161, 239, 138, 120, 209, 57, 204, 161,
+ 239, 138, 118, 240, 21, 204, 161, 239, 138, 120, 240, 20, 204, 161, 239,
+ 138, 126, 240, 20, 204, 161, 239, 138, 239, 147, 240, 20, 204, 161, 239,
+ 138, 118, 212, 78, 204, 161, 239, 138, 239, 233, 212, 76, 204, 161, 239,
+ 138, 118, 241, 138, 204, 161, 239, 138, 126, 241, 136, 204, 161, 239,
+ 138, 239, 233, 241, 136, 204, 161, 239, 138, 213, 112, 241, 136, 239,
+ 138, 221, 43, 105, 215, 210, 221, 44, 105, 215, 210, 221, 44, 108, 215,
+ 210, 221, 44, 147, 215, 210, 221, 44, 149, 215, 210, 221, 44, 170, 215,
+ 210, 221, 44, 195, 215, 210, 221, 44, 213, 111, 215, 210, 221, 44, 199,
+ 215, 210, 221, 44, 222, 63, 215, 210, 221, 44, 209, 152, 215, 210, 221,
+ 44, 241, 112, 215, 210, 221, 44, 207, 154, 215, 210, 221, 44, 240, 18,
+ 215, 210, 221, 44, 118, 236, 11, 215, 210, 221, 44, 239, 233, 236, 11,
+ 215, 210, 221, 44, 118, 209, 36, 5, 215, 210, 221, 44, 105, 5, 215, 210,
+ 221, 44, 108, 5, 215, 210, 221, 44, 147, 5, 215, 210, 221, 44, 149, 5,
+ 215, 210, 221, 44, 170, 5, 215, 210, 221, 44, 195, 5, 215, 210, 221, 44,
+ 213, 111, 5, 215, 210, 221, 44, 199, 5, 215, 210, 221, 44, 222, 63, 5,
+ 215, 210, 221, 44, 209, 152, 5, 215, 210, 221, 44, 241, 112, 5, 215, 210,
+ 221, 44, 207, 154, 5, 215, 210, 221, 44, 240, 18, 5, 215, 210, 221, 44,
+ 118, 236, 11, 5, 215, 210, 221, 44, 239, 233, 236, 11, 5, 215, 210, 221,
+ 44, 118, 209, 36, 215, 210, 221, 44, 118, 209, 37, 247, 126, 245, 51,
+ 215, 210, 221, 44, 239, 233, 209, 36, 215, 210, 221, 44, 209, 153, 209,
+ 36, 215, 210, 221, 44, 216, 73, 118, 236, 11, 8, 5, 1, 216, 73, 247, 125,
+ 215, 210, 221, 44, 212, 88, 227, 255, 18, 215, 210, 221, 44, 240, 19,
+ 241, 182, 18, 215, 210, 221, 44, 240, 19, 209, 36, 215, 210, 221, 44,
+ 118, 236, 12, 209, 36, 204, 161, 239, 138, 202, 85, 209, 57, 207, 174,
+ 17, 108, 207, 174, 17, 147, 96, 47, 177, 47, 86, 47, 183, 47, 49, 50, 47,
+ 112, 121, 47, 153, 204, 46, 47, 153, 241, 176, 47, 211, 238, 241, 176,
+ 47, 211, 238, 204, 46, 47, 96, 53, 3, 95, 86, 53, 3, 95, 96, 204, 76, 47,
+ 86, 204, 76, 47, 96, 120, 237, 62, 47, 177, 120, 237, 62, 47, 86, 120,
+ 237, 62, 47, 183, 120, 237, 62, 47, 96, 53, 3, 209, 248, 86, 53, 3, 209,
+ 248, 96, 53, 239, 120, 142, 177, 53, 239, 120, 142, 86, 53, 239, 120,
+ 142, 183, 53, 239, 120, 142, 112, 121, 53, 3, 248, 218, 96, 53, 3, 113,
+ 86, 53, 3, 113, 96, 53, 3, 227, 14, 86, 53, 3, 227, 14, 49, 50, 204, 76,
+ 47, 49, 50, 53, 3, 95, 183, 202, 30, 47, 177, 53, 3, 208, 211, 227, 212,
+ 177, 53, 3, 208, 211, 216, 5, 183, 53, 3, 208, 211, 227, 212, 183, 53, 3,
+ 208, 211, 216, 5, 86, 53, 3, 245, 166, 242, 68, 183, 53, 3, 245, 166,
+ 227, 212, 250, 194, 208, 145, 213, 146, 47, 246, 18, 208, 145, 213, 146,
+ 47, 153, 204, 46, 53, 208, 173, 163, 142, 96, 53, 208, 173, 248, 231,
+ 115, 86, 53, 208, 173, 142, 250, 194, 171, 246, 62, 47, 246, 18, 171,
+ 246, 62, 47, 96, 237, 87, 3, 150, 206, 212, 96, 237, 87, 3, 150, 242, 68,
+ 177, 237, 87, 3, 150, 216, 5, 177, 237, 87, 3, 150, 227, 212, 86, 237,
+ 87, 3, 150, 206, 212, 86, 237, 87, 3, 150, 242, 68, 183, 237, 87, 3, 150,
+ 216, 5, 183, 237, 87, 3, 150, 227, 212, 86, 53, 115, 96, 47, 177, 53, 96,
+ 76, 183, 47, 96, 53, 115, 86, 47, 96, 219, 146, 250, 91, 177, 219, 146,
+ 250, 91, 86, 219, 146, 250, 91, 183, 219, 146, 250, 91, 96, 237, 87, 115,
+ 86, 237, 86, 86, 237, 87, 115, 96, 237, 86, 96, 52, 53, 3, 95, 49, 50,
+ 52, 53, 3, 95, 86, 52, 53, 3, 95, 96, 52, 47, 177, 52, 47, 86, 52, 47,
+ 183, 52, 47, 49, 50, 52, 47, 112, 121, 52, 47, 153, 204, 46, 52, 47, 153,
+ 241, 176, 52, 47, 211, 238, 241, 176, 52, 47, 211, 238, 204, 46, 52, 47,
+ 96, 208, 70, 47, 86, 208, 70, 47, 96, 211, 171, 47, 86, 211, 171, 47,
+ 177, 53, 3, 52, 95, 183, 53, 3, 52, 95, 96, 244, 143, 47, 177, 244, 143,
+ 47, 86, 244, 143, 47, 183, 244, 143, 47, 96, 53, 208, 173, 142, 86, 53,
+ 208, 173, 142, 96, 61, 47, 177, 61, 47, 86, 61, 47, 183, 61, 47, 177, 61,
+ 53, 239, 120, 142, 177, 61, 53, 220, 32, 219, 26, 177, 61, 53, 220, 32,
+ 219, 27, 3, 236, 106, 142, 177, 61, 53, 220, 32, 219, 27, 3, 80, 142,
+ 177, 61, 52, 47, 177, 61, 52, 53, 220, 32, 219, 26, 86, 61, 53, 239, 120,
+ 204, 99, 153, 204, 46, 53, 208, 173, 245, 165, 211, 238, 241, 176, 53,
+ 208, 173, 245, 165, 112, 121, 61, 47, 50, 53, 3, 5, 246, 61, 183, 53, 96,
+ 76, 177, 47, 126, 86, 250, 91, 96, 53, 3, 80, 95, 86, 53, 3, 80, 95, 49,
+ 50, 53, 3, 80, 95, 96, 53, 3, 52, 80, 95, 86, 53, 3, 52, 80, 95, 49, 50,
+ 53, 3, 52, 80, 95, 96, 220, 6, 47, 86, 220, 6, 47, 49, 50, 220, 6, 47,
+ 35, 251, 14, 245, 228, 219, 69, 243, 205, 209, 83, 240, 207, 209, 83,
+ 243, 104, 221, 166, 240, 208, 241, 94, 213, 117, 231, 38, 223, 101, 241,
+ 115, 220, 69, 221, 166, 250, 232, 241, 115, 220, 69, 5, 241, 115, 220,
+ 69, 245, 194, 250, 82, 224, 244, 243, 104, 221, 166, 245, 196, 250, 82,
+ 224, 244, 5, 245, 194, 250, 82, 224, 244, 241, 84, 76, 217, 214, 223,
+ 162, 217, 224, 223, 162, 245, 171, 223, 162, 210, 217, 224, 103, 54, 224,
+ 101, 54, 70, 218, 76, 243, 137, 212, 57, 213, 118, 224, 102, 250, 60,
+ 219, 254, 215, 253, 219, 254, 247, 178, 219, 254, 51, 215, 204, 245, 106,
+ 215, 204, 239, 140, 215, 204, 217, 210, 135, 231, 27, 50, 250, 217, 250,
+ 217, 225, 17, 250, 217, 211, 208, 250, 217, 243, 139, 243, 104, 221, 166,
+ 243, 143, 219, 82, 135, 221, 166, 219, 82, 135, 227, 37, 250, 226, 227,
+ 37, 219, 244, 230, 244, 206, 237, 231, 2, 52, 231, 2, 208, 70, 231, 2,
+ 245, 188, 231, 2, 210, 189, 231, 2, 205, 178, 231, 2, 246, 18, 231, 2,
+ 246, 18, 245, 188, 231, 2, 250, 194, 245, 188, 231, 2, 209, 82, 248, 152,
+ 216, 168, 217, 211, 70, 224, 102, 240, 215, 238, 172, 217, 211, 236, 121,
+ 208, 228, 219, 254, 216, 73, 208, 227, 230, 239, 227, 241, 194, 212, 122,
+ 204, 75, 203, 226, 217, 224, 221, 166, 208, 227, 224, 103, 208, 227, 250,
+ 53, 156, 135, 221, 166, 250, 53, 156, 135, 250, 151, 156, 135, 250, 151,
+ 247, 148, 221, 166, 251, 127, 156, 135, 222, 232, 250, 151, 221, 175,
+ 251, 127, 156, 135, 251, 7, 156, 135, 221, 166, 251, 7, 156, 135, 251, 7,
+ 156, 219, 245, 156, 135, 208, 70, 208, 227, 251, 15, 156, 135, 241, 30,
+ 135, 238, 171, 241, 30, 135, 243, 206, 248, 103, 250, 153, 209, 93, 227,
+ 122, 238, 171, 156, 135, 250, 151, 156, 208, 173, 219, 245, 209, 93, 231,
+ 65, 220, 69, 231, 65, 76, 219, 245, 250, 151, 156, 135, 245, 243, 241,
+ 34, 241, 35, 245, 242, 215, 253, 231, 50, 156, 135, 215, 253, 156, 135,
+ 245, 159, 135, 240, 254, 241, 33, 135, 211, 95, 241, 34, 244, 38, 156,
+ 135, 156, 208, 173, 247, 137, 244, 56, 225, 17, 247, 136, 217, 45, 156,
+ 135, 221, 166, 156, 135, 235, 154, 135, 221, 166, 235, 154, 135, 211, 39,
+ 241, 30, 135, 227, 179, 219, 245, 156, 135, 237, 247, 219, 245, 156, 135,
+ 227, 179, 115, 156, 135, 237, 247, 115, 156, 135, 227, 179, 247, 148,
+ 221, 166, 156, 135, 237, 247, 247, 148, 221, 166, 156, 135, 223, 240,
+ 227, 178, 223, 240, 237, 246, 248, 103, 221, 166, 241, 30, 135, 221, 166,
+ 227, 178, 221, 166, 237, 246, 222, 232, 227, 179, 221, 175, 156, 135,
+ 222, 232, 237, 247, 221, 175, 156, 135, 227, 179, 219, 245, 241, 30, 135,
+ 237, 247, 219, 245, 241, 30, 135, 222, 232, 227, 179, 221, 175, 241, 30,
+ 135, 222, 232, 237, 247, 221, 175, 241, 30, 135, 227, 179, 219, 245, 237,
+ 246, 237, 247, 219, 245, 227, 178, 222, 232, 227, 179, 221, 175, 237,
+ 246, 222, 232, 237, 247, 221, 175, 227, 178, 217, 249, 210, 236, 217,
+ 250, 219, 245, 156, 135, 210, 237, 219, 245, 156, 135, 217, 250, 219,
+ 245, 241, 30, 135, 210, 237, 219, 245, 241, 30, 135, 243, 104, 221, 166,
+ 217, 252, 243, 104, 221, 166, 210, 238, 210, 245, 220, 69, 210, 198, 220,
+ 69, 221, 166, 34, 210, 245, 220, 69, 221, 166, 34, 210, 198, 220, 69,
+ 210, 245, 76, 219, 245, 156, 135, 210, 198, 76, 219, 245, 156, 135, 222,
+ 232, 34, 210, 245, 76, 221, 175, 156, 135, 222, 232, 34, 210, 198, 76,
+ 221, 175, 156, 135, 210, 245, 76, 3, 221, 166, 156, 135, 210, 198, 76, 3,
+ 221, 166, 156, 135, 223, 221, 223, 222, 223, 223, 223, 222, 206, 237, 51,
+ 231, 65, 220, 69, 51, 219, 236, 220, 69, 51, 231, 65, 76, 219, 245, 156,
+ 135, 51, 219, 236, 76, 219, 245, 156, 135, 51, 247, 48, 51, 245, 99, 43,
+ 218, 76, 43, 224, 102, 43, 208, 219, 43, 243, 137, 212, 57, 43, 70, 219,
+ 254, 43, 215, 253, 219, 254, 43, 250, 60, 219, 254, 43, 241, 34, 43, 244,
+ 144, 103, 218, 76, 103, 224, 102, 103, 208, 219, 103, 70, 219, 254, 50,
+ 210, 3, 49, 210, 3, 121, 210, 3, 112, 210, 3, 250, 63, 224, 77, 208, 49,
+ 239, 165, 208, 70, 80, 248, 231, 50, 207, 173, 52, 80, 248, 231, 52, 50,
+ 207, 173, 243, 104, 221, 166, 217, 205, 221, 166, 208, 49, 243, 104, 221,
+ 166, 239, 166, 222, 234, 52, 80, 248, 231, 52, 50, 207, 173, 217, 250,
+ 206, 248, 216, 117, 210, 237, 206, 248, 216, 117, 221, 172, 211, 2, 220,
+ 69, 245, 194, 250, 82, 221, 172, 211, 1, 221, 172, 211, 2, 76, 219, 245,
+ 156, 135, 245, 194, 250, 82, 221, 172, 211, 2, 219, 245, 156, 135, 219,
+ 236, 220, 69, 231, 65, 220, 69, 223, 228, 237, 24, 245, 205, 225, 69,
+ 230, 255, 203, 156, 223, 81, 221, 174, 50, 250, 218, 3, 250, 128, 50,
+ 208, 85, 223, 162, 227, 37, 250, 226, 223, 162, 227, 37, 219, 244, 223,
+ 162, 230, 244, 223, 162, 206, 237, 243, 222, 219, 254, 70, 219, 254, 211,
+ 95, 219, 254, 243, 137, 208, 219, 247, 234, 49, 221, 172, 240, 92, 213,
+ 142, 217, 224, 50, 221, 172, 240, 92, 213, 142, 217, 224, 49, 213, 142,
+ 217, 224, 50, 213, 142, 217, 224, 216, 73, 208, 228, 241, 34, 245, 93,
+ 227, 37, 219, 244, 245, 93, 227, 37, 250, 226, 52, 210, 244, 52, 210,
+ 197, 52, 230, 244, 52, 206, 237, 218, 103, 156, 25, 219, 82, 135, 227,
+ 179, 3, 243, 85, 237, 247, 3, 243, 85, 205, 242, 223, 240, 227, 178, 205,
+ 242, 223, 240, 237, 246, 227, 179, 156, 208, 173, 219, 245, 237, 246,
+ 237, 247, 156, 208, 173, 219, 245, 227, 178, 156, 208, 173, 219, 245,
+ 227, 178, 156, 208, 173, 219, 245, 237, 246, 156, 208, 173, 219, 245,
+ 217, 249, 156, 208, 173, 219, 245, 210, 236, 243, 104, 221, 166, 217,
+ 253, 219, 245, 241, 36, 243, 104, 221, 166, 210, 239, 219, 245, 241, 36,
+ 221, 166, 51, 231, 65, 76, 219, 245, 156, 135, 221, 166, 51, 219, 236,
+ 76, 219, 245, 156, 135, 51, 231, 65, 76, 219, 245, 221, 166, 156, 135,
+ 51, 219, 236, 76, 219, 245, 221, 166, 156, 135, 227, 179, 247, 148, 221,
+ 166, 241, 30, 135, 237, 247, 247, 148, 221, 166, 241, 30, 135, 217, 250,
+ 247, 148, 221, 166, 241, 30, 135, 210, 237, 247, 148, 221, 166, 241, 30,
+ 135, 221, 166, 221, 172, 211, 2, 220, 69, 243, 104, 221, 166, 245, 196,
+ 250, 82, 221, 172, 211, 1, 221, 166, 221, 172, 211, 2, 76, 219, 245, 156,
+ 135, 243, 104, 221, 166, 245, 196, 250, 82, 221, 172, 211, 2, 219, 245,
+ 241, 36, 80, 241, 108, 224, 146, 236, 106, 241, 108, 112, 50, 243, 228,
+ 241, 108, 121, 50, 243, 228, 241, 108, 241, 115, 76, 3, 163, 236, 106,
+ 95, 241, 115, 76, 3, 80, 248, 231, 250, 50, 241, 84, 76, 236, 106, 95, 5,
+ 241, 115, 76, 3, 80, 248, 231, 250, 50, 241, 84, 76, 236, 106, 95, 241,
+ 115, 76, 3, 70, 55, 241, 115, 76, 3, 219, 203, 5, 241, 115, 76, 3, 219,
+ 203, 241, 115, 76, 3, 206, 246, 241, 115, 76, 3, 120, 236, 106, 211, 19,
+ 245, 194, 3, 163, 236, 106, 95, 245, 194, 3, 80, 248, 231, 250, 50, 241,
+ 84, 76, 236, 106, 95, 5, 245, 194, 3, 80, 248, 231, 250, 50, 241, 84, 76,
+ 236, 106, 95, 245, 194, 3, 219, 203, 5, 245, 194, 3, 219, 203, 202, 160,
+ 221, 164, 249, 11, 224, 243, 243, 223, 54, 241, 117, 47, 236, 38, 112,
+ 250, 94, 121, 250, 94, 217, 218, 218, 227, 204, 72, 227, 114, 49, 246,
+ 226, 50, 246, 226, 49, 239, 204, 50, 239, 204, 247, 248, 50, 245, 132,
+ 247, 248, 49, 245, 132, 208, 145, 50, 245, 132, 208, 145, 49, 245, 132,
+ 216, 73, 221, 166, 54, 51, 226, 246, 250, 128, 214, 158, 214, 166, 209,
+ 162, 216, 147, 218, 34, 231, 31, 205, 218, 211, 177, 218, 97, 76, 230,
+ 254, 54, 207, 174, 221, 166, 54, 204, 82, 236, 40, 208, 145, 49, 245,
+ 165, 208, 145, 50, 245, 165, 247, 248, 49, 245, 165, 247, 248, 50, 245,
+ 165, 208, 145, 162, 231, 2, 247, 248, 162, 231, 2, 239, 115, 212, 31,
+ 112, 250, 95, 248, 104, 120, 236, 106, 248, 220, 219, 247, 229, 151, 241,
+ 26, 208, 173, 209, 93, 216, 16, 203, 197, 231, 50, 34, 216, 144, 247,
+ 233, 229, 149, 227, 217, 250, 218, 155, 216, 11, 250, 218, 155, 241, 26,
+ 208, 173, 209, 93, 227, 222, 248, 115, 215, 252, 245, 61, 251, 15, 250,
+ 103, 210, 100, 208, 130, 215, 125, 243, 185, 219, 237, 245, 209, 209,
+ 220, 212, 44, 245, 155, 245, 154, 250, 169, 239, 98, 16, 235, 203, 250,
+ 169, 239, 98, 16, 211, 169, 217, 62, 250, 169, 239, 98, 16, 217, 63, 241,
+ 36, 250, 169, 239, 98, 16, 217, 63, 243, 143, 250, 169, 239, 98, 16, 217,
+ 63, 243, 221, 250, 169, 239, 98, 16, 217, 63, 230, 88, 250, 169, 239, 98,
+ 16, 217, 63, 246, 61, 250, 169, 239, 98, 16, 246, 62, 211, 69, 250, 169,
+ 239, 98, 16, 246, 62, 230, 88, 250, 169, 239, 98, 16, 212, 58, 142, 250,
+ 169, 239, 98, 16, 249, 21, 142, 250, 169, 239, 98, 16, 217, 63, 212, 57,
+ 250, 169, 239, 98, 16, 217, 63, 249, 20, 250, 169, 239, 98, 16, 217, 63,
+ 227, 178, 250, 169, 239, 98, 16, 217, 63, 237, 246, 250, 169, 239, 98,
+ 16, 96, 206, 76, 250, 169, 239, 98, 16, 86, 206, 76, 250, 169, 239, 98,
+ 16, 217, 63, 96, 47, 250, 169, 239, 98, 16, 217, 63, 86, 47, 250, 169,
+ 239, 98, 16, 246, 62, 249, 20, 250, 169, 239, 98, 16, 121, 210, 4, 206,
+ 246, 250, 169, 239, 98, 16, 244, 38, 211, 69, 250, 169, 239, 98, 16, 217,
+ 63, 121, 247, 33, 250, 169, 239, 98, 16, 217, 63, 244, 37, 250, 169, 239,
+ 98, 16, 121, 210, 4, 230, 88, 250, 169, 239, 98, 16, 177, 206, 76, 250,
+ 169, 239, 98, 16, 217, 63, 177, 47, 250, 169, 239, 98, 16, 112, 210, 4,
+ 219, 203, 250, 169, 239, 98, 16, 244, 49, 211, 69, 250, 169, 239, 98, 16,
+ 217, 63, 112, 247, 33, 250, 169, 239, 98, 16, 217, 63, 244, 48, 250, 169,
+ 239, 98, 16, 112, 210, 4, 230, 88, 250, 169, 239, 98, 16, 183, 206, 76,
+ 250, 169, 239, 98, 16, 217, 63, 183, 47, 250, 169, 239, 98, 16, 217, 30,
+ 206, 246, 250, 169, 239, 98, 16, 244, 38, 206, 246, 250, 169, 239, 98,
+ 16, 243, 222, 206, 246, 250, 169, 239, 98, 16, 230, 89, 206, 246, 250,
+ 169, 239, 98, 16, 246, 62, 206, 246, 250, 169, 239, 98, 16, 112, 212,
+ 240, 230, 88, 250, 169, 239, 98, 16, 217, 30, 217, 62, 250, 169, 239, 98,
+ 16, 246, 62, 211, 94, 250, 169, 239, 98, 16, 217, 63, 245, 242, 250, 169,
+ 239, 98, 16, 112, 210, 4, 243, 231, 250, 169, 239, 98, 16, 244, 49, 243,
+ 231, 250, 169, 239, 98, 16, 211, 95, 243, 231, 250, 169, 239, 98, 16,
+ 230, 89, 243, 231, 250, 169, 239, 98, 16, 246, 62, 243, 231, 250, 169,
+ 239, 98, 16, 121, 212, 240, 211, 69, 250, 169, 239, 98, 16, 49, 212, 240,
+ 211, 69, 250, 169, 239, 98, 16, 208, 228, 243, 231, 250, 169, 239, 98,
+ 16, 237, 247, 243, 231, 250, 169, 239, 98, 16, 245, 234, 142, 250, 169,
+ 239, 98, 16, 244, 49, 208, 227, 250, 169, 239, 98, 16, 202, 29, 250, 169,
+ 239, 98, 16, 211, 70, 208, 227, 250, 169, 239, 98, 16, 213, 144, 206,
+ 246, 250, 169, 239, 98, 16, 217, 63, 221, 166, 241, 36, 250, 169, 239,
+ 98, 16, 217, 63, 217, 46, 250, 169, 239, 98, 16, 121, 247, 34, 208, 227,
+ 250, 169, 239, 98, 16, 112, 247, 34, 208, 227, 250, 169, 239, 98, 16,
+ 230, 230, 250, 169, 239, 98, 16, 216, 59, 250, 169, 239, 98, 16, 220, 36,
+ 250, 169, 239, 98, 16, 251, 3, 206, 246, 250, 169, 239, 98, 16, 241, 38,
+ 206, 246, 250, 169, 239, 98, 16, 230, 231, 206, 246, 250, 169, 239, 98,
+ 16, 220, 37, 206, 246, 250, 169, 239, 98, 16, 251, 2, 221, 166, 246, 169,
+ 82, 50, 250, 218, 3, 183, 202, 30, 47, 212, 210, 171, 247, 233, 248, 129,
+ 97, 80, 227, 115, 3, 101, 243, 85, 231, 8, 97, 245, 189, 206, 244, 97,
+ 243, 158, 206, 244, 97, 241, 96, 97, 245, 224, 97, 61, 51, 3, 246, 218,
+ 80, 227, 114, 241, 68, 97, 250, 250, 229, 152, 97, 237, 37, 97, 43, 236,
+ 106, 248, 231, 3, 221, 163, 43, 208, 86, 242, 70, 247, 203, 246, 62, 3,
+ 221, 169, 47, 206, 242, 97, 224, 40, 97, 235, 216, 97, 220, 7, 237, 170,
+ 97, 220, 7, 228, 129, 97, 219, 59, 97, 219, 58, 97, 243, 167, 245, 91,
+ 16, 239, 159, 108, 212, 5, 97, 250, 169, 239, 98, 16, 217, 62, 244, 68,
+ 213, 131, 229, 152, 97, 217, 238, 219, 153, 222, 208, 219, 153, 217, 234,
+ 214, 185, 97, 246, 33, 214, 185, 97, 49, 219, 77, 206, 221, 113, 49, 219,
+ 77, 240, 200, 49, 219, 77, 226, 251, 113, 50, 219, 77, 206, 221, 113, 50,
+ 219, 77, 240, 200, 50, 219, 77, 226, 251, 113, 49, 51, 247, 227, 206,
+ 221, 245, 165, 49, 51, 247, 227, 240, 200, 49, 51, 247, 227, 226, 251,
+ 245, 165, 50, 51, 247, 227, 206, 221, 245, 165, 50, 51, 247, 227, 240,
+ 200, 50, 51, 247, 227, 226, 251, 245, 165, 49, 245, 93, 247, 227, 206,
+ 221, 113, 49, 245, 93, 247, 227, 101, 218, 159, 49, 245, 93, 247, 227,
+ 226, 251, 113, 245, 93, 247, 227, 240, 200, 50, 245, 93, 247, 227, 206,
+ 221, 113, 50, 245, 93, 247, 227, 101, 218, 159, 50, 245, 93, 247, 227,
+ 226, 251, 113, 231, 3, 240, 200, 236, 106, 227, 115, 240, 200, 206, 221,
+ 49, 219, 245, 226, 251, 50, 245, 93, 247, 227, 214, 167, 206, 221, 50,
+ 219, 245, 226, 251, 49, 245, 93, 247, 227, 214, 167, 210, 218, 208, 144,
+ 210, 218, 247, 247, 208, 145, 51, 155, 247, 248, 51, 155, 247, 248, 51,
+ 247, 227, 115, 208, 145, 51, 155, 40, 16, 247, 247, 49, 80, 98, 227, 114,
+ 50, 80, 98, 227, 114, 236, 106, 214, 202, 227, 113, 236, 106, 214, 202,
+ 227, 112, 236, 106, 214, 202, 227, 111, 236, 106, 214, 202, 227, 110,
+ 244, 29, 16, 157, 80, 25, 208, 145, 216, 16, 244, 29, 16, 157, 80, 25,
+ 247, 248, 216, 16, 244, 29, 16, 157, 80, 3, 246, 61, 244, 29, 16, 157,
+ 121, 25, 236, 106, 3, 246, 61, 244, 29, 16, 157, 112, 25, 236, 106, 3,
+ 246, 61, 244, 29, 16, 157, 80, 3, 208, 85, 244, 29, 16, 157, 121, 25,
+ 236, 106, 3, 208, 85, 244, 29, 16, 157, 112, 25, 236, 106, 3, 208, 85,
+ 244, 29, 16, 157, 80, 25, 204, 75, 244, 29, 16, 157, 121, 25, 236, 106,
+ 3, 204, 75, 244, 29, 16, 157, 112, 25, 236, 106, 3, 204, 75, 244, 29, 16,
+ 157, 121, 25, 236, 105, 244, 29, 16, 157, 112, 25, 236, 105, 244, 29, 16,
+ 157, 80, 25, 208, 145, 227, 222, 244, 29, 16, 157, 80, 25, 247, 248, 227,
+ 222, 51, 239, 172, 216, 78, 97, 241, 131, 97, 80, 227, 115, 240, 200,
+ 224, 214, 247, 214, 224, 214, 163, 115, 212, 227, 224, 214, 212, 228,
+ 115, 227, 28, 224, 214, 163, 115, 120, 212, 213, 224, 214, 120, 212, 214,
+ 115, 227, 28, 224, 214, 120, 212, 214, 230, 97, 224, 214, 208, 66, 224,
+ 214, 209, 124, 224, 214, 218, 253, 241, 180, 237, 239, 239, 92, 208, 145,
+ 219, 76, 247, 248, 219, 76, 208, 145, 245, 93, 155, 247, 248, 245, 93,
+ 155, 208, 145, 208, 133, 213, 33, 155, 247, 248, 208, 133, 213, 33, 155,
+ 61, 208, 101, 248, 115, 215, 253, 3, 246, 61, 211, 51, 239, 215, 251,
+ 142, 245, 90, 241, 116, 230, 244, 244, 68, 240, 204, 97, 62, 216, 11, 52,
+ 208, 85, 62, 227, 217, 52, 208, 85, 62, 206, 223, 52, 208, 85, 62, 242,
+ 69, 52, 208, 85, 62, 216, 11, 52, 208, 86, 3, 80, 142, 62, 227, 217, 52,
+ 208, 86, 3, 80, 142, 62, 216, 11, 208, 86, 3, 52, 80, 142, 251, 34, 246,
+ 19, 211, 58, 208, 220, 246, 19, 236, 41, 3, 239, 195, 214, 241, 62, 225,
+ 10, 227, 217, 208, 85, 62, 225, 10, 216, 11, 208, 85, 62, 225, 10, 206,
+ 223, 208, 85, 62, 225, 10, 242, 69, 208, 85, 52, 80, 142, 62, 51, 35,
+ 211, 61, 62, 246, 62, 35, 216, 148, 16, 35, 221, 48, 16, 35, 211, 90, 76,
+ 237, 61, 16, 35, 211, 90, 76, 209, 112, 16, 35, 241, 84, 76, 209, 112,
+ 16, 35, 241, 84, 76, 208, 105, 16, 35, 241, 71, 16, 35, 251, 130, 16, 35,
+ 248, 128, 16, 35, 249, 19, 16, 35, 236, 106, 210, 5, 16, 35, 227, 115,
+ 240, 51, 16, 35, 80, 210, 5, 16, 35, 239, 159, 240, 51, 16, 35, 247, 25,
+ 216, 77, 16, 35, 213, 7, 219, 211, 16, 35, 213, 7, 231, 49, 16, 35, 244,
+ 139, 227, 105, 241, 9, 16, 35, 244, 8, 245, 184, 105, 16, 35, 244, 8,
+ 245, 184, 108, 16, 35, 244, 8, 245, 184, 147, 16, 35, 244, 8, 245, 184,
+ 149, 16, 35, 182, 251, 130, 16, 35, 210, 95, 231, 112, 16, 35, 241, 84,
+ 76, 208, 106, 248, 33, 16, 35, 247, 59, 16, 35, 241, 84, 76, 225, 9, 16,
+ 35, 210, 242, 16, 35, 241, 9, 16, 35, 240, 11, 213, 130, 16, 35, 237,
+ 238, 213, 130, 16, 35, 216, 149, 213, 130, 16, 35, 206, 236, 213, 130,
+ 16, 35, 211, 228, 16, 35, 244, 46, 248, 37, 97, 171, 247, 233, 16, 35,
+ 222, 211, 16, 35, 244, 47, 239, 159, 108, 16, 35, 210, 243, 239, 159,
+ 108, 220, 82, 113, 220, 82, 246, 194, 220, 82, 239, 162, 220, 82, 230,
+ 239, 239, 162, 220, 82, 248, 125, 247, 190, 220, 82, 247, 241, 208, 250,
+ 220, 82, 247, 224, 248, 236, 235, 153, 220, 82, 250, 237, 76, 246, 168,
+ 220, 82, 244, 144, 220, 82, 245, 80, 251, 134, 221, 46, 220, 82, 52, 249,
+ 20, 43, 17, 105, 43, 17, 108, 43, 17, 147, 43, 17, 149, 43, 17, 170, 43,
+ 17, 195, 43, 17, 213, 111, 43, 17, 199, 43, 17, 222, 63, 43, 42, 209,
+ 152, 43, 42, 241, 112, 43, 42, 207, 154, 43, 42, 209, 55, 43, 42, 239,
+ 141, 43, 42, 240, 22, 43, 42, 212, 82, 43, 42, 213, 108, 43, 42, 241,
+ 140, 43, 42, 222, 60, 43, 42, 207, 151, 102, 17, 105, 102, 17, 108, 102,
+ 17, 147, 102, 17, 149, 102, 17, 170, 102, 17, 195, 102, 17, 213, 111,
+ 102, 17, 199, 102, 17, 222, 63, 102, 42, 209, 152, 102, 42, 241, 112,
+ 102, 42, 207, 154, 102, 42, 209, 55, 102, 42, 239, 141, 102, 42, 240, 22,
+ 102, 42, 212, 82, 102, 42, 213, 108, 102, 42, 241, 140, 102, 42, 222, 60,
+ 102, 42, 207, 151, 17, 118, 239, 102, 211, 61, 17, 120, 239, 102, 211,
+ 61, 17, 126, 239, 102, 211, 61, 17, 239, 147, 239, 102, 211, 61, 17, 239,
+ 233, 239, 102, 211, 61, 17, 212, 88, 239, 102, 211, 61, 17, 213, 112,
+ 239, 102, 211, 61, 17, 241, 143, 239, 102, 211, 61, 17, 222, 64, 239,
+ 102, 211, 61, 42, 209, 153, 239, 102, 211, 61, 42, 241, 113, 239, 102,
+ 211, 61, 42, 207, 155, 239, 102, 211, 61, 42, 209, 56, 239, 102, 211, 61,
+ 42, 239, 142, 239, 102, 211, 61, 42, 240, 23, 239, 102, 211, 61, 42, 212,
+ 83, 239, 102, 211, 61, 42, 213, 109, 239, 102, 211, 61, 42, 241, 141,
+ 239, 102, 211, 61, 42, 222, 61, 239, 102, 211, 61, 42, 207, 152, 239,
+ 102, 211, 61, 102, 8, 5, 1, 63, 102, 8, 5, 1, 249, 255, 102, 8, 5, 1,
+ 247, 125, 102, 8, 5, 1, 245, 51, 102, 8, 5, 1, 74, 102, 8, 5, 1, 240,
+ 174, 102, 8, 5, 1, 239, 75, 102, 8, 5, 1, 237, 171, 102, 8, 5, 1, 75,
+ 102, 8, 5, 1, 230, 184, 102, 8, 5, 1, 230, 54, 102, 8, 5, 1, 159, 102, 8,
+ 5, 1, 226, 185, 102, 8, 5, 1, 223, 163, 102, 8, 5, 1, 78, 102, 8, 5, 1,
+ 219, 184, 102, 8, 5, 1, 217, 134, 102, 8, 5, 1, 146, 102, 8, 5, 1, 194,
+ 102, 8, 5, 1, 210, 69, 102, 8, 5, 1, 68, 102, 8, 5, 1, 206, 164, 102, 8,
+ 5, 1, 204, 144, 102, 8, 5, 1, 203, 196, 102, 8, 5, 1, 203, 124, 102, 8,
+ 5, 1, 202, 159, 43, 8, 6, 1, 63, 43, 8, 6, 1, 249, 255, 43, 8, 6, 1, 247,
+ 125, 43, 8, 6, 1, 245, 51, 43, 8, 6, 1, 74, 43, 8, 6, 1, 240, 174, 43, 8,
+ 6, 1, 239, 75, 43, 8, 6, 1, 237, 171, 43, 8, 6, 1, 75, 43, 8, 6, 1, 230,
+ 184, 43, 8, 6, 1, 230, 54, 43, 8, 6, 1, 159, 43, 8, 6, 1, 226, 185, 43,
+ 8, 6, 1, 223, 163, 43, 8, 6, 1, 78, 43, 8, 6, 1, 219, 184, 43, 8, 6, 1,
+ 217, 134, 43, 8, 6, 1, 146, 43, 8, 6, 1, 194, 43, 8, 6, 1, 210, 69, 43,
+ 8, 6, 1, 68, 43, 8, 6, 1, 206, 164, 43, 8, 6, 1, 204, 144, 43, 8, 6, 1,
+ 203, 196, 43, 8, 6, 1, 203, 124, 43, 8, 6, 1, 202, 159, 43, 8, 5, 1, 63,
+ 43, 8, 5, 1, 249, 255, 43, 8, 5, 1, 247, 125, 43, 8, 5, 1, 245, 51, 43,
+ 8, 5, 1, 74, 43, 8, 5, 1, 240, 174, 43, 8, 5, 1, 239, 75, 43, 8, 5, 1,
+ 237, 171, 43, 8, 5, 1, 75, 43, 8, 5, 1, 230, 184, 43, 8, 5, 1, 230, 54,
+ 43, 8, 5, 1, 159, 43, 8, 5, 1, 226, 185, 43, 8, 5, 1, 223, 163, 43, 8, 5,
+ 1, 78, 43, 8, 5, 1, 219, 184, 43, 8, 5, 1, 217, 134, 43, 8, 5, 1, 146,
+ 43, 8, 5, 1, 194, 43, 8, 5, 1, 210, 69, 43, 8, 5, 1, 68, 43, 8, 5, 1,
+ 206, 164, 43, 8, 5, 1, 204, 144, 43, 8, 5, 1, 203, 196, 43, 8, 5, 1, 203,
+ 124, 43, 8, 5, 1, 202, 159, 43, 17, 202, 84, 182, 43, 42, 241, 112, 182,
+ 43, 42, 207, 154, 182, 43, 42, 209, 55, 182, 43, 42, 239, 141, 182, 43,
+ 42, 240, 22, 182, 43, 42, 212, 82, 182, 43, 42, 213, 108, 182, 43, 42,
+ 241, 140, 182, 43, 42, 222, 60, 182, 43, 42, 207, 151, 52, 43, 17, 105,
+ 52, 43, 17, 108, 52, 43, 17, 147, 52, 43, 17, 149, 52, 43, 17, 170, 52,
+ 43, 17, 195, 52, 43, 17, 213, 111, 52, 43, 17, 199, 52, 43, 17, 222, 63,
+ 52, 43, 42, 209, 152, 182, 43, 17, 202, 84, 98, 116, 157, 236, 105, 98,
+ 116, 79, 236, 105, 98, 116, 157, 206, 38, 98, 116, 79, 206, 38, 98, 116,
+ 157, 208, 70, 244, 145, 236, 105, 98, 116, 79, 208, 70, 244, 145, 236,
+ 105, 98, 116, 157, 208, 70, 244, 145, 206, 38, 98, 116, 79, 208, 70, 244,
+ 145, 206, 38, 98, 116, 157, 217, 58, 244, 145, 236, 105, 98, 116, 79,
+ 217, 58, 244, 145, 236, 105, 98, 116, 157, 217, 58, 244, 145, 206, 38,
+ 98, 116, 79, 217, 58, 244, 145, 206, 38, 98, 116, 157, 121, 25, 216, 16,
+ 98, 116, 121, 157, 25, 50, 237, 49, 98, 116, 121, 79, 25, 50, 227, 134,
+ 98, 116, 79, 121, 25, 216, 16, 98, 116, 157, 121, 25, 227, 222, 98, 116,
+ 121, 157, 25, 49, 237, 49, 98, 116, 121, 79, 25, 49, 227, 134, 98, 116,
+ 79, 121, 25, 227, 222, 98, 116, 157, 112, 25, 216, 16, 98, 116, 112, 157,
+ 25, 50, 237, 49, 98, 116, 112, 79, 25, 50, 227, 134, 98, 116, 79, 112,
+ 25, 216, 16, 98, 116, 157, 112, 25, 227, 222, 98, 116, 112, 157, 25, 49,
+ 237, 49, 98, 116, 112, 79, 25, 49, 227, 134, 98, 116, 79, 112, 25, 227,
+ 222, 98, 116, 157, 80, 25, 216, 16, 98, 116, 80, 157, 25, 50, 237, 49,
+ 98, 116, 112, 79, 25, 50, 121, 227, 134, 98, 116, 121, 79, 25, 50, 112,
+ 227, 134, 98, 116, 80, 79, 25, 50, 227, 134, 98, 116, 121, 157, 25, 50,
+ 112, 237, 49, 98, 116, 112, 157, 25, 50, 121, 237, 49, 98, 116, 79, 80,
+ 25, 216, 16, 98, 116, 157, 80, 25, 227, 222, 98, 116, 80, 157, 25, 49,
+ 237, 49, 98, 116, 112, 79, 25, 49, 121, 227, 134, 98, 116, 121, 79, 25,
+ 49, 112, 227, 134, 98, 116, 80, 79, 25, 49, 227, 134, 98, 116, 121, 157,
+ 25, 49, 112, 237, 49, 98, 116, 112, 157, 25, 49, 121, 237, 49, 98, 116,
+ 79, 80, 25, 227, 222, 98, 116, 157, 121, 25, 236, 105, 98, 116, 49, 79,
+ 25, 50, 121, 227, 134, 98, 116, 50, 79, 25, 49, 121, 227, 134, 98, 116,
+ 121, 157, 25, 236, 106, 237, 49, 98, 116, 121, 79, 25, 236, 106, 227,
+ 134, 98, 116, 50, 157, 25, 49, 121, 237, 49, 98, 116, 49, 157, 25, 50,
+ 121, 237, 49, 98, 116, 79, 121, 25, 236, 105, 98, 116, 157, 112, 25, 236,
+ 105, 98, 116, 49, 79, 25, 50, 112, 227, 134, 98, 116, 50, 79, 25, 49,
+ 112, 227, 134, 98, 116, 112, 157, 25, 236, 106, 237, 49, 98, 116, 112,
+ 79, 25, 236, 106, 227, 134, 98, 116, 50, 157, 25, 49, 112, 237, 49, 98,
+ 116, 49, 157, 25, 50, 112, 237, 49, 98, 116, 79, 112, 25, 236, 105, 98,
+ 116, 157, 80, 25, 236, 105, 98, 116, 49, 79, 25, 50, 80, 227, 134, 98,
+ 116, 50, 79, 25, 49, 80, 227, 134, 98, 116, 80, 157, 25, 236, 106, 237,
+ 49, 98, 116, 112, 79, 25, 121, 236, 106, 227, 134, 98, 116, 121, 79, 25,
+ 112, 236, 106, 227, 134, 98, 116, 80, 79, 25, 236, 106, 227, 134, 98,
+ 116, 49, 112, 79, 25, 50, 121, 227, 134, 98, 116, 50, 112, 79, 25, 49,
+ 121, 227, 134, 98, 116, 49, 121, 79, 25, 50, 112, 227, 134, 98, 116, 50,
+ 121, 79, 25, 49, 112, 227, 134, 98, 116, 121, 157, 25, 112, 236, 106,
+ 237, 49, 98, 116, 112, 157, 25, 121, 236, 106, 237, 49, 98, 116, 50, 157,
+ 25, 49, 80, 237, 49, 98, 116, 49, 157, 25, 50, 80, 237, 49, 98, 116, 79,
+ 80, 25, 236, 105, 98, 116, 157, 52, 244, 145, 236, 105, 98, 116, 79, 52,
+ 244, 145, 236, 105, 98, 116, 157, 52, 244, 145, 206, 38, 98, 116, 79, 52,
+ 244, 145, 206, 38, 98, 116, 52, 236, 105, 98, 116, 52, 206, 38, 98, 116,
+ 121, 212, 120, 25, 50, 242, 78, 98, 116, 121, 52, 25, 50, 212, 119, 98,
+ 116, 52, 121, 25, 216, 16, 98, 116, 121, 212, 120, 25, 49, 242, 78, 98,
+ 116, 121, 52, 25, 49, 212, 119, 98, 116, 52, 121, 25, 227, 222, 98, 116,
+ 112, 212, 120, 25, 50, 242, 78, 98, 116, 112, 52, 25, 50, 212, 119, 98,
+ 116, 52, 112, 25, 216, 16, 98, 116, 112, 212, 120, 25, 49, 242, 78, 98,
+ 116, 112, 52, 25, 49, 212, 119, 98, 116, 52, 112, 25, 227, 222, 98, 116,
+ 80, 212, 120, 25, 50, 242, 78, 98, 116, 80, 52, 25, 50, 212, 119, 98,
+ 116, 52, 80, 25, 216, 16, 98, 116, 80, 212, 120, 25, 49, 242, 78, 98,
+ 116, 80, 52, 25, 49, 212, 119, 98, 116, 52, 80, 25, 227, 222, 98, 116,
+ 121, 212, 120, 25, 236, 106, 242, 78, 98, 116, 121, 52, 25, 236, 106,
+ 212, 119, 98, 116, 52, 121, 25, 236, 105, 98, 116, 112, 212, 120, 25,
+ 236, 106, 242, 78, 98, 116, 112, 52, 25, 236, 106, 212, 119, 98, 116, 52,
+ 112, 25, 236, 105, 98, 116, 80, 212, 120, 25, 236, 106, 242, 78, 98, 116,
+ 80, 52, 25, 236, 106, 212, 119, 98, 116, 52, 80, 25, 236, 105, 98, 116,
+ 157, 250, 129, 121, 25, 216, 16, 98, 116, 157, 250, 129, 121, 25, 227,
+ 222, 98, 116, 157, 250, 129, 112, 25, 227, 222, 98, 116, 157, 250, 129,
+ 112, 25, 216, 16, 98, 116, 157, 243, 228, 206, 221, 50, 208, 173, 226,
+ 251, 227, 222, 98, 116, 157, 243, 228, 206, 221, 49, 208, 173, 226, 251,
+ 216, 16, 98, 116, 157, 243, 228, 245, 130, 98, 116, 157, 227, 222, 98,
+ 116, 157, 206, 224, 98, 116, 157, 216, 16, 98, 116, 157, 242, 70, 98,
+ 116, 79, 227, 222, 98, 116, 79, 206, 224, 98, 116, 79, 216, 16, 98, 116,
+ 79, 242, 70, 98, 116, 157, 49, 25, 79, 216, 16, 98, 116, 157, 112, 25,
+ 79, 242, 70, 98, 116, 79, 49, 25, 157, 216, 16, 98, 116, 79, 112, 25,
+ 157, 242, 70, 206, 221, 162, 248, 33, 226, 251, 118, 241, 139, 248, 33,
+ 226, 251, 118, 217, 56, 248, 33, 226, 251, 126, 241, 137, 248, 33, 226,
+ 251, 162, 248, 33, 226, 251, 239, 233, 241, 137, 248, 33, 226, 251, 126,
+ 217, 54, 248, 33, 226, 251, 213, 112, 241, 137, 248, 33, 239, 102, 248,
+ 33, 49, 213, 112, 241, 137, 248, 33, 49, 126, 217, 54, 248, 33, 49, 239,
+ 233, 241, 137, 248, 33, 49, 162, 248, 33, 49, 126, 241, 137, 248, 33, 49,
+ 118, 217, 56, 248, 33, 49, 118, 241, 139, 248, 33, 50, 162, 248, 33, 157,
+ 213, 79, 225, 10, 213, 79, 244, 150, 213, 79, 206, 221, 118, 241, 139,
+ 248, 33, 50, 118, 241, 139, 248, 33, 217, 60, 226, 251, 227, 222, 217,
+ 60, 226, 251, 216, 16, 217, 60, 206, 221, 227, 222, 217, 60, 206, 221,
+ 49, 25, 226, 251, 49, 25, 226, 251, 216, 16, 217, 60, 206, 221, 49, 25,
+ 226, 251, 216, 16, 217, 60, 206, 221, 49, 25, 206, 221, 50, 25, 226, 251,
+ 227, 222, 217, 60, 206, 221, 49, 25, 206, 221, 50, 25, 226, 251, 216, 16,
+ 217, 60, 206, 221, 216, 16, 217, 60, 206, 221, 50, 25, 226, 251, 227,
+ 222, 217, 60, 206, 221, 50, 25, 226, 251, 49, 25, 226, 251, 216, 16, 62,
+ 211, 177, 61, 211, 177, 61, 51, 3, 215, 189, 245, 164, 61, 51, 245, 195,
+ 62, 5, 211, 177, 51, 3, 236, 106, 240, 9, 51, 3, 80, 240, 9, 51, 3, 219,
+ 229, 245, 125, 240, 9, 51, 3, 206, 221, 49, 208, 173, 226, 251, 50, 240,
+ 9, 51, 3, 206, 221, 50, 208, 173, 226, 251, 49, 240, 9, 51, 3, 243, 228,
+ 245, 125, 240, 9, 62, 5, 211, 177, 61, 5, 211, 177, 62, 216, 143, 61,
+ 216, 143, 62, 80, 216, 143, 61, 80, 216, 143, 62, 219, 80, 61, 219, 80,
+ 62, 206, 223, 208, 85, 61, 206, 223, 208, 85, 62, 206, 223, 5, 208, 85,
+ 61, 206, 223, 5, 208, 85, 62, 216, 11, 208, 85, 61, 216, 11, 208, 85, 62,
+ 216, 11, 5, 208, 85, 61, 216, 11, 5, 208, 85, 62, 216, 11, 218, 60, 61,
+ 216, 11, 218, 60, 62, 242, 69, 208, 85, 61, 242, 69, 208, 85, 62, 242,
+ 69, 5, 208, 85, 61, 242, 69, 5, 208, 85, 62, 227, 217, 208, 85, 61, 227,
+ 217, 208, 85, 62, 227, 217, 5, 208, 85, 61, 227, 217, 5, 208, 85, 62,
+ 227, 217, 218, 60, 61, 227, 217, 218, 60, 62, 243, 221, 61, 243, 221, 61,
+ 243, 222, 245, 195, 62, 5, 243, 221, 239, 242, 226, 246, 61, 246, 61,
+ 242, 83, 246, 61, 246, 62, 3, 80, 240, 9, 247, 173, 62, 246, 61, 246, 62,
+ 3, 49, 162, 248, 43, 246, 62, 3, 50, 162, 248, 43, 246, 62, 3, 226, 251,
+ 162, 248, 43, 246, 62, 3, 206, 221, 162, 248, 43, 246, 62, 3, 206, 221,
+ 50, 217, 60, 248, 43, 246, 62, 3, 251, 15, 247, 148, 206, 221, 49, 217,
+ 60, 248, 43, 49, 162, 62, 246, 61, 50, 162, 62, 246, 61, 230, 240, 247,
+ 177, 230, 240, 61, 246, 61, 206, 221, 162, 230, 240, 61, 246, 61, 226,
+ 251, 162, 230, 240, 61, 246, 61, 206, 221, 49, 217, 60, 246, 55, 250,
+ 128, 206, 221, 50, 217, 60, 246, 55, 250, 128, 226, 251, 50, 217, 60,
+ 246, 55, 250, 128, 226, 251, 49, 217, 60, 246, 55, 250, 128, 206, 221,
+ 162, 246, 61, 226, 251, 162, 246, 61, 62, 226, 251, 50, 208, 85, 62, 226,
+ 251, 49, 208, 85, 62, 206, 221, 49, 208, 85, 62, 206, 221, 50, 208, 85,
+ 61, 247, 177, 51, 3, 49, 162, 248, 43, 51, 3, 50, 162, 248, 43, 51, 3,
+ 206, 221, 49, 243, 228, 162, 248, 43, 51, 3, 226, 251, 50, 243, 228, 162,
+ 248, 43, 61, 51, 3, 80, 248, 55, 227, 114, 61, 206, 223, 208, 86, 3, 243,
+ 85, 206, 223, 208, 86, 3, 49, 162, 248, 43, 206, 223, 208, 86, 3, 50,
+ 162, 248, 43, 228, 8, 246, 61, 61, 51, 3, 206, 221, 49, 217, 59, 61, 51,
+ 3, 226, 251, 49, 217, 59, 61, 51, 3, 226, 251, 50, 217, 59, 61, 51, 3,
+ 206, 221, 50, 217, 59, 61, 246, 62, 3, 206, 221, 49, 217, 59, 61, 246,
+ 62, 3, 226, 251, 49, 217, 59, 61, 246, 62, 3, 226, 251, 50, 217, 59, 61,
+ 246, 62, 3, 206, 221, 50, 217, 59, 206, 221, 49, 208, 85, 206, 221, 50,
+ 208, 85, 226, 251, 49, 208, 85, 61, 225, 10, 211, 177, 62, 225, 10, 211,
+ 177, 61, 225, 10, 5, 211, 177, 62, 225, 10, 5, 211, 177, 226, 251, 50,
+ 208, 85, 62, 210, 215, 3, 216, 162, 246, 7, 207, 3, 212, 15, 245, 236,
+ 62, 211, 94, 61, 211, 94, 227, 131, 209, 17, 210, 214, 250, 78, 221, 188,
+ 244, 19, 221, 188, 245, 204, 219, 250, 62, 209, 161, 61, 209, 161, 248,
+ 248, 247, 233, 248, 248, 98, 3, 246, 168, 248, 248, 98, 3, 203, 196, 214,
+ 254, 207, 4, 3, 216, 191, 242, 48, 236, 47, 248, 102, 61, 212, 237, 218,
+ 159, 62, 212, 237, 218, 159, 213, 68, 216, 73, 215, 198, 239, 201, 237,
+ 56, 247, 177, 62, 49, 218, 59, 231, 35, 62, 50, 218, 59, 231, 35, 61, 49,
+ 218, 59, 231, 35, 61, 112, 218, 59, 231, 35, 61, 50, 218, 59, 231, 35,
+ 61, 121, 218, 59, 231, 35, 212, 63, 25, 245, 129, 247, 11, 54, 216, 203,
+ 54, 248, 62, 54, 247, 83, 250, 208, 219, 230, 245, 130, 246, 143, 216,
+ 59, 245, 131, 76, 227, 9, 245, 131, 76, 230, 151, 211, 95, 25, 245, 138,
+ 240, 75, 97, 251, 115, 213, 70, 237, 131, 25, 212, 159, 219, 33, 97, 203,
+ 1, 203, 76, 208, 75, 35, 237, 51, 208, 75, 35, 228, 33, 208, 75, 35, 239,
+ 249, 208, 75, 35, 209, 18, 208, 75, 35, 204, 16, 208, 75, 35, 204, 80,
+ 208, 75, 35, 224, 12, 208, 75, 35, 241, 179, 204, 37, 76, 243, 249, 61,
+ 239, 114, 240, 102, 61, 212, 30, 240, 102, 62, 212, 30, 240, 102, 61,
+ 210, 215, 3, 216, 162, 239, 245, 217, 56, 224, 29, 228, 1, 217, 56, 224,
+ 29, 224, 234, 240, 43, 54, 241, 179, 225, 127, 54, 230, 69, 214, 218,
+ 206, 205, 222, 224, 218, 73, 250, 114, 209, 205, 238, 178, 247, 57, 227,
+ 184, 205, 202, 227, 145, 214, 187, 215, 20, 247, 43, 250, 145, 218, 108,
+ 61, 246, 150, 229, 81, 61, 246, 150, 217, 48, 61, 246, 150, 215, 206, 61,
+ 246, 150, 248, 54, 61, 246, 150, 229, 31, 61, 246, 150, 219, 45, 62, 246,
+ 150, 229, 81, 62, 246, 150, 217, 48, 62, 246, 150, 215, 206, 62, 246,
+ 150, 248, 54, 62, 246, 150, 229, 31, 62, 246, 150, 219, 45, 62, 211, 226,
+ 210, 227, 61, 237, 56, 210, 227, 61, 243, 222, 210, 227, 62, 246, 5, 210,
+ 227, 61, 211, 226, 210, 227, 62, 237, 56, 210, 227, 62, 243, 222, 210,
+ 227, 61, 246, 5, 210, 227, 236, 47, 211, 182, 217, 56, 221, 160, 241,
+ 139, 221, 160, 248, 158, 241, 139, 221, 155, 248, 158, 212, 81, 221, 155,
+ 223, 195, 239, 217, 54, 223, 195, 223, 66, 54, 223, 195, 213, 57, 54,
+ 204, 46, 210, 89, 245, 130, 241, 176, 210, 89, 245, 130, 206, 233, 216,
+ 139, 97, 216, 139, 16, 35, 207, 120, 218, 90, 216, 139, 16, 35, 207, 118,
+ 218, 90, 216, 139, 16, 35, 207, 117, 218, 90, 216, 139, 16, 35, 207, 115,
+ 218, 90, 216, 139, 16, 35, 207, 113, 218, 90, 216, 139, 16, 35, 207, 111,
+ 218, 90, 216, 139, 16, 35, 207, 109, 218, 90, 216, 139, 16, 35, 238, 176,
+ 225, 70, 62, 206, 233, 216, 139, 97, 216, 140, 219, 95, 97, 219, 68, 219,
+ 95, 97, 218, 238, 219, 95, 54, 204, 35, 97, 243, 214, 240, 101, 243, 214,
+ 240, 100, 243, 214, 240, 99, 243, 214, 240, 98, 243, 214, 240, 97, 243,
+ 214, 240, 96, 61, 246, 62, 3, 70, 216, 16, 61, 246, 62, 3, 120, 243, 83,
+ 62, 246, 62, 3, 61, 70, 216, 16, 62, 246, 62, 3, 120, 61, 243, 83, 224,
+ 45, 35, 203, 76, 224, 45, 35, 203, 0, 243, 195, 35, 237, 248, 203, 76,
+ 243, 195, 35, 227, 177, 203, 0, 243, 195, 35, 227, 177, 203, 76, 243,
+ 195, 35, 237, 248, 203, 0, 61, 239, 225, 62, 239, 225, 237, 131, 25, 218,
+ 163, 250, 228, 245, 128, 210, 154, 211, 103, 76, 251, 92, 214, 203, 251,
+ 29, 239, 197, 238, 187, 211, 103, 76, 237, 26, 250, 42, 97, 239, 213,
+ 219, 207, 61, 211, 94, 126, 227, 109, 245, 181, 216, 16, 126, 227, 109,
+ 245, 181, 227, 222, 204, 91, 54, 138, 205, 179, 54, 242, 75, 240, 43, 54,
+ 242, 75, 225, 127, 54, 230, 250, 240, 43, 25, 225, 127, 54, 225, 127, 25,
+ 240, 43, 54, 225, 127, 3, 211, 32, 54, 225, 127, 3, 211, 32, 25, 225,
+ 127, 25, 240, 43, 54, 80, 225, 127, 3, 211, 32, 54, 236, 106, 225, 127,
+ 3, 211, 32, 54, 225, 10, 61, 246, 61, 225, 10, 62, 246, 61, 225, 10, 5,
+ 61, 246, 61, 225, 86, 97, 243, 135, 97, 206, 230, 219, 67, 97, 245, 247,
+ 239, 97, 206, 201, 222, 217, 246, 203, 219, 137, 230, 75, 205, 240, 246,
+ 123, 62, 224, 30, 227, 128, 213, 101, 213, 140, 217, 38, 213, 120, 212,
+ 10, 248, 251, 248, 217, 103, 229, 151, 61, 242, 58, 225, 122, 61, 242,
+ 58, 229, 81, 62, 242, 58, 225, 122, 62, 242, 58, 229, 81, 212, 16, 204,
+ 3, 212, 19, 210, 215, 248, 135, 246, 7, 216, 190, 62, 212, 15, 209, 19,
+ 246, 8, 25, 216, 190, 207, 174, 61, 212, 237, 218, 159, 207, 174, 62,
+ 212, 237, 218, 159, 61, 243, 222, 231, 50, 211, 177, 245, 124, 228, 15,
+ 243, 162, 247, 39, 219, 253, 218, 163, 247, 40, 212, 48, 237, 36, 3, 61,
+ 245, 130, 43, 245, 124, 228, 15, 246, 195, 221, 192, 241, 62, 250, 255,
+ 220, 26, 49, 204, 66, 208, 113, 62, 207, 131, 49, 204, 66, 208, 113, 61,
+ 207, 131, 49, 204, 66, 208, 113, 62, 49, 228, 16, 224, 233, 61, 49, 228,
+ 16, 224, 233, 242, 53, 212, 40, 54, 79, 61, 242, 69, 208, 85, 49, 246,
+ 16, 241, 62, 103, 214, 254, 240, 84, 243, 228, 231, 50, 61, 246, 62, 231,
+ 50, 62, 211, 177, 62, 208, 50, 216, 84, 49, 241, 61, 216, 84, 49, 241,
+ 60, 250, 54, 16, 35, 206, 205, 79, 246, 62, 3, 211, 32, 25, 120, 187, 55,
+ 218, 254, 216, 13, 230, 252, 218, 254, 227, 219, 230, 252, 218, 254, 230,
+ 239, 218, 254, 62, 245, 131, 220, 32, 213, 8, 212, 252, 212, 203, 246,
+ 90, 247, 19, 236, 231, 212, 89, 238, 188, 204, 3, 236, 23, 238, 188, 3,
+ 237, 101, 225, 107, 16, 35, 227, 133, 224, 12, 207, 4, 220, 32, 237, 239,
+ 239, 148, 239, 226, 231, 50, 236, 126, 240, 34, 215, 15, 51, 239, 147,
+ 245, 164, 212, 66, 235, 163, 212, 69, 218, 230, 3, 248, 251, 209, 144,
+ 230, 169, 248, 236, 97, 237, 59, 237, 250, 97, 239, 105, 217, 180, 245,
+ 100, 220, 32, 62, 211, 177, 61, 239, 226, 3, 236, 106, 101, 62, 211, 33,
+ 62, 215, 25, 214, 190, 206, 221, 248, 38, 214, 190, 62, 214, 190, 226,
+ 251, 248, 38, 214, 190, 61, 214, 190, 61, 79, 246, 169, 82, 209, 162,
+ 227, 47, 54, 209, 221, 242, 52, 251, 52, 241, 57, 216, 188, 239, 238,
+ 216, 188, 237, 123, 205, 228, 237, 123, 203, 220, 237, 123, 226, 251, 50,
+ 219, 8, 219, 8, 206, 221, 50, 219, 8, 61, 222, 97, 62, 222, 97, 246, 169,
+ 82, 79, 246, 169, 82, 223, 224, 203, 196, 79, 223, 224, 203, 196, 248,
+ 248, 203, 196, 79, 248, 248, 203, 196, 219, 207, 30, 245, 130, 79, 30,
+ 245, 130, 171, 246, 218, 245, 130, 79, 171, 246, 218, 245, 130, 8, 245,
+ 130, 213, 77, 61, 8, 245, 130, 219, 207, 8, 245, 130, 225, 124, 245, 130,
+ 211, 95, 76, 244, 137, 239, 147, 209, 180, 250, 59, 239, 147, 248, 249,
+ 250, 59, 79, 239, 147, 248, 249, 250, 59, 239, 147, 246, 3, 250, 59, 62,
+ 239, 147, 218, 61, 211, 94, 61, 239, 147, 218, 61, 211, 94, 211, 221,
+ 211, 42, 219, 207, 61, 211, 94, 43, 61, 211, 94, 171, 246, 218, 62, 211,
+ 94, 62, 246, 218, 61, 211, 94, 219, 207, 62, 211, 94, 79, 219, 207, 62,
+ 211, 94, 218, 118, 211, 94, 213, 77, 61, 211, 94, 79, 250, 59, 171, 246,
+ 218, 250, 59, 241, 143, 211, 191, 250, 59, 241, 143, 218, 61, 62, 211,
+ 94, 241, 143, 218, 61, 218, 118, 211, 94, 212, 88, 218, 61, 62, 211, 94,
+ 241, 143, 218, 61, 216, 141, 62, 211, 94, 79, 241, 143, 218, 61, 216,
+ 141, 62, 211, 94, 207, 155, 218, 61, 62, 211, 94, 212, 83, 218, 61, 250,
+ 59, 209, 180, 250, 59, 171, 246, 218, 209, 180, 250, 59, 79, 209, 180,
+ 250, 59, 212, 88, 218, 218, 62, 25, 61, 239, 200, 62, 239, 200, 61, 239,
+ 200, 241, 143, 218, 218, 219, 207, 62, 239, 200, 43, 171, 246, 218, 241,
+ 143, 218, 61, 211, 94, 79, 209, 180, 218, 118, 250, 59, 212, 17, 208,
+ 244, 208, 78, 212, 17, 79, 246, 146, 212, 17, 211, 223, 79, 211, 223,
+ 248, 249, 250, 59, 241, 143, 209, 180, 217, 213, 250, 59, 79, 241, 143,
+ 209, 180, 217, 213, 250, 59, 245, 131, 82, 213, 77, 61, 246, 61, 182,
+ 103, 245, 131, 82, 226, 251, 50, 242, 50, 61, 211, 177, 206, 221, 50,
+ 242, 50, 61, 211, 177, 226, 251, 50, 213, 77, 61, 211, 177, 206, 221, 50,
+ 213, 77, 61, 211, 177, 62, 217, 47, 131, 219, 233, 61, 217, 47, 131, 219,
+ 233, 61, 240, 212, 131, 219, 233, 62, 243, 222, 224, 103, 61, 203, 196,
+ 79, 240, 212, 131, 97, 157, 80, 142, 225, 10, 80, 142, 79, 80, 142, 79,
+ 212, 120, 207, 174, 245, 234, 217, 31, 131, 219, 233, 79, 212, 120, 245,
+ 234, 217, 31, 131, 219, 233, 79, 52, 207, 174, 245, 234, 217, 31, 131,
+ 219, 233, 79, 52, 245, 234, 217, 31, 131, 219, 233, 79, 124, 212, 120,
+ 245, 234, 217, 31, 131, 219, 233, 79, 124, 52, 245, 234, 217, 31, 131,
+ 219, 233, 245, 86, 211, 78, 219, 89, 2, 219, 233, 79, 240, 212, 131, 219,
+ 233, 79, 237, 56, 240, 212, 131, 219, 233, 79, 62, 237, 55, 215, 198, 79,
+ 62, 237, 56, 247, 177, 239, 201, 237, 55, 215, 198, 239, 201, 237, 56,
+ 247, 177, 225, 10, 49, 219, 77, 219, 233, 225, 10, 50, 219, 77, 219, 233,
+ 225, 10, 239, 214, 49, 219, 77, 219, 233, 225, 10, 239, 214, 50, 219, 77,
+ 219, 233, 225, 10, 227, 217, 250, 218, 247, 227, 219, 233, 225, 10, 216,
+ 11, 250, 218, 247, 227, 219, 233, 79, 227, 217, 250, 218, 217, 31, 131,
+ 219, 233, 79, 216, 11, 250, 218, 217, 31, 131, 219, 233, 79, 227, 217,
+ 250, 218, 247, 227, 219, 233, 79, 216, 11, 250, 218, 247, 227, 219, 233,
+ 157, 49, 208, 133, 213, 33, 247, 227, 219, 233, 157, 50, 208, 133, 213,
+ 33, 247, 227, 219, 233, 225, 10, 49, 245, 93, 247, 227, 219, 233, 225,
+ 10, 50, 245, 93, 247, 227, 219, 233, 243, 174, 182, 43, 17, 105, 243,
+ 174, 182, 43, 17, 108, 243, 174, 182, 43, 17, 147, 243, 174, 182, 43, 17,
+ 149, 243, 174, 182, 43, 17, 170, 243, 174, 182, 43, 17, 195, 243, 174,
+ 182, 43, 17, 213, 111, 243, 174, 182, 43, 17, 199, 243, 174, 182, 43, 17,
+ 222, 63, 243, 174, 182, 43, 42, 209, 152, 243, 174, 43, 41, 17, 105, 243,
+ 174, 43, 41, 17, 108, 243, 174, 43, 41, 17, 147, 243, 174, 43, 41, 17,
+ 149, 243, 174, 43, 41, 17, 170, 243, 174, 43, 41, 17, 195, 243, 174, 43,
+ 41, 17, 213, 111, 243, 174, 43, 41, 17, 199, 243, 174, 43, 41, 17, 222,
+ 63, 243, 174, 43, 41, 42, 209, 152, 243, 174, 182, 43, 41, 17, 105, 243,
+ 174, 182, 43, 41, 17, 108, 243, 174, 182, 43, 41, 17, 147, 243, 174, 182,
+ 43, 41, 17, 149, 243, 174, 182, 43, 41, 17, 170, 243, 174, 182, 43, 41,
+ 17, 195, 243, 174, 182, 43, 41, 17, 213, 111, 243, 174, 182, 43, 41, 17,
+ 199, 243, 174, 182, 43, 41, 17, 222, 63, 243, 174, 182, 43, 41, 42, 209,
+ 152, 79, 204, 26, 86, 47, 79, 91, 54, 79, 224, 103, 54, 79, 243, 137, 54,
+ 79, 211, 238, 241, 176, 47, 79, 86, 47, 79, 153, 241, 176, 47, 242, 63,
+ 218, 63, 86, 47, 79, 215, 190, 86, 47, 208, 84, 86, 47, 79, 208, 84, 86,
+ 47, 244, 143, 208, 84, 86, 47, 79, 244, 143, 208, 84, 86, 47, 62, 86, 47,
+ 209, 31, 208, 143, 86, 250, 94, 209, 31, 247, 246, 86, 250, 94, 62, 86,
+ 250, 94, 79, 62, 245, 86, 183, 25, 86, 47, 79, 62, 245, 86, 177, 25, 86,
+ 47, 211, 174, 62, 86, 47, 79, 245, 217, 62, 86, 47, 216, 10, 61, 86, 47,
+ 227, 216, 61, 86, 47, 249, 24, 213, 77, 61, 86, 47, 239, 117, 213, 77,
+ 61, 86, 47, 79, 226, 251, 216, 9, 61, 86, 47, 79, 206, 221, 216, 9, 61,
+ 86, 47, 221, 162, 226, 251, 216, 9, 61, 86, 47, 245, 93, 227, 14, 221,
+ 162, 206, 221, 216, 9, 61, 86, 47, 43, 79, 61, 86, 47, 204, 32, 86, 47,
+ 248, 42, 211, 238, 241, 176, 47, 248, 42, 86, 47, 248, 42, 153, 241, 176,
+ 47, 79, 248, 42, 211, 238, 241, 176, 47, 79, 248, 42, 86, 47, 79, 248,
+ 42, 153, 241, 176, 47, 209, 182, 86, 47, 79, 209, 181, 86, 47, 204, 56,
+ 86, 47, 79, 204, 56, 86, 47, 220, 3, 86, 47, 52, 245, 93, 227, 14, 126,
+ 243, 184, 250, 217, 61, 208, 86, 245, 195, 5, 61, 208, 85, 218, 233, 171,
+ 210, 244, 171, 210, 197, 49, 215, 93, 249, 11, 244, 43, 50, 215, 93, 249,
+ 11, 244, 43, 219, 245, 3, 70, 231, 6, 216, 74, 212, 1, 217, 248, 210,
+ 244, 210, 198, 217, 248, 212, 0, 80, 248, 231, 3, 236, 106, 95, 13, 215,
+ 245, 243, 227, 163, 243, 136, 13, 240, 84, 243, 227, 103, 227, 37, 250,
+ 226, 103, 227, 37, 219, 244, 61, 243, 222, 3, 246, 216, 243, 85, 25, 3,
+ 243, 85, 241, 115, 76, 220, 1, 206, 212, 226, 251, 50, 245, 166, 3, 243,
+ 85, 206, 221, 49, 245, 166, 3, 243, 85, 49, 219, 209, 230, 99, 50, 219,
+ 209, 230, 99, 239, 102, 219, 209, 230, 99, 228, 8, 112, 210, 3, 228, 8,
+ 121, 210, 3, 49, 25, 50, 52, 207, 173, 49, 25, 50, 210, 3, 49, 223, 228,
+ 163, 50, 210, 3, 163, 49, 210, 3, 112, 210, 4, 3, 246, 62, 55, 226, 247,
+ 243, 142, 247, 137, 236, 106, 215, 135, 61, 245, 216, 243, 221, 61, 245,
+ 216, 243, 222, 3, 96, 208, 254, 61, 245, 216, 243, 222, 3, 86, 208, 254,
+ 61, 51, 3, 96, 208, 254, 61, 51, 3, 86, 208, 254, 13, 49, 61, 51, 155,
+ 13, 50, 61, 51, 155, 13, 49, 250, 218, 155, 13, 50, 250, 218, 155, 13,
+ 49, 52, 250, 218, 155, 13, 50, 52, 250, 218, 155, 13, 49, 61, 208, 133,
+ 213, 33, 155, 13, 50, 61, 208, 133, 213, 33, 155, 13, 49, 239, 214, 219,
+ 76, 13, 50, 239, 214, 219, 76, 177, 217, 58, 47, 183, 217, 58, 47, 250,
+ 194, 238, 226, 246, 62, 47, 246, 18, 238, 226, 246, 62, 47, 50, 53, 3,
+ 43, 218, 76, 163, 96, 47, 163, 86, 47, 163, 49, 50, 47, 163, 96, 52, 47,
+ 163, 86, 52, 47, 163, 49, 50, 52, 47, 163, 96, 53, 239, 120, 142, 163,
+ 86, 53, 239, 120, 142, 163, 96, 52, 53, 239, 120, 142, 163, 86, 52, 53,
+ 239, 120, 142, 163, 86, 211, 171, 47, 58, 59, 248, 36, 58, 59, 243, 82,
+ 58, 59, 242, 210, 58, 59, 243, 81, 58, 59, 242, 146, 58, 59, 243, 17, 58,
+ 59, 242, 209, 58, 59, 243, 80, 58, 59, 242, 114, 58, 59, 242, 241, 58,
+ 59, 242, 177, 58, 59, 243, 48, 58, 59, 242, 145, 58, 59, 243, 16, 58, 59,
+ 242, 208, 58, 59, 243, 79, 58, 59, 242, 98, 58, 59, 242, 225, 58, 59,
+ 242, 161, 58, 59, 243, 32, 58, 59, 242, 129, 58, 59, 243, 0, 58, 59, 242,
+ 192, 58, 59, 243, 63, 58, 59, 242, 113, 58, 59, 242, 240, 58, 59, 242,
+ 176, 58, 59, 243, 47, 58, 59, 242, 144, 58, 59, 243, 15, 58, 59, 242,
+ 207, 58, 59, 243, 78, 58, 59, 242, 90, 58, 59, 242, 217, 58, 59, 242,
+ 153, 58, 59, 243, 24, 58, 59, 242, 121, 58, 59, 242, 248, 58, 59, 242,
+ 184, 58, 59, 243, 55, 58, 59, 242, 105, 58, 59, 242, 232, 58, 59, 242,
+ 168, 58, 59, 243, 39, 58, 59, 242, 136, 58, 59, 243, 7, 58, 59, 242, 199,
+ 58, 59, 243, 70, 58, 59, 242, 97, 58, 59, 242, 224, 58, 59, 242, 160, 58,
+ 59, 243, 31, 58, 59, 242, 128, 58, 59, 242, 255, 58, 59, 242, 191, 58,
+ 59, 243, 62, 58, 59, 242, 112, 58, 59, 242, 239, 58, 59, 242, 175, 58,
+ 59, 243, 46, 58, 59, 242, 143, 58, 59, 243, 14, 58, 59, 242, 206, 58, 59,
+ 243, 77, 58, 59, 242, 86, 58, 59, 242, 213, 58, 59, 242, 149, 58, 59,
+ 243, 20, 58, 59, 242, 117, 58, 59, 242, 244, 58, 59, 242, 180, 58, 59,
+ 243, 51, 58, 59, 242, 101, 58, 59, 242, 228, 58, 59, 242, 164, 58, 59,
+ 243, 35, 58, 59, 242, 132, 58, 59, 243, 3, 58, 59, 242, 195, 58, 59, 243,
+ 66, 58, 59, 242, 93, 58, 59, 242, 220, 58, 59, 242, 156, 58, 59, 243, 27,
+ 58, 59, 242, 124, 58, 59, 242, 251, 58, 59, 242, 187, 58, 59, 243, 58,
+ 58, 59, 242, 108, 58, 59, 242, 235, 58, 59, 242, 171, 58, 59, 243, 42,
+ 58, 59, 242, 139, 58, 59, 243, 10, 58, 59, 242, 202, 58, 59, 243, 73, 58,
+ 59, 242, 89, 58, 59, 242, 216, 58, 59, 242, 152, 58, 59, 243, 23, 58, 59,
+ 242, 120, 58, 59, 242, 247, 58, 59, 242, 183, 58, 59, 243, 54, 58, 59,
+ 242, 104, 58, 59, 242, 231, 58, 59, 242, 167, 58, 59, 243, 38, 58, 59,
+ 242, 135, 58, 59, 243, 6, 58, 59, 242, 198, 58, 59, 243, 69, 58, 59, 242,
+ 96, 58, 59, 242, 223, 58, 59, 242, 159, 58, 59, 243, 30, 58, 59, 242,
+ 127, 58, 59, 242, 254, 58, 59, 242, 190, 58, 59, 243, 61, 58, 59, 242,
+ 111, 58, 59, 242, 238, 58, 59, 242, 174, 58, 59, 243, 45, 58, 59, 242,
+ 142, 58, 59, 243, 13, 58, 59, 242, 205, 58, 59, 243, 76, 58, 59, 242, 84,
+ 58, 59, 242, 211, 58, 59, 242, 147, 58, 59, 243, 18, 58, 59, 242, 115,
+ 58, 59, 242, 242, 58, 59, 242, 178, 58, 59, 243, 49, 58, 59, 242, 99, 58,
+ 59, 242, 226, 58, 59, 242, 162, 58, 59, 243, 33, 58, 59, 242, 130, 58,
+ 59, 243, 1, 58, 59, 242, 193, 58, 59, 243, 64, 58, 59, 242, 91, 58, 59,
+ 242, 218, 58, 59, 242, 154, 58, 59, 243, 25, 58, 59, 242, 122, 58, 59,
+ 242, 249, 58, 59, 242, 185, 58, 59, 243, 56, 58, 59, 242, 106, 58, 59,
+ 242, 233, 58, 59, 242, 169, 58, 59, 243, 40, 58, 59, 242, 137, 58, 59,
+ 243, 8, 58, 59, 242, 200, 58, 59, 243, 71, 58, 59, 242, 87, 58, 59, 242,
+ 214, 58, 59, 242, 150, 58, 59, 243, 21, 58, 59, 242, 118, 58, 59, 242,
+ 245, 58, 59, 242, 181, 58, 59, 243, 52, 58, 59, 242, 102, 58, 59, 242,
+ 229, 58, 59, 242, 165, 58, 59, 243, 36, 58, 59, 242, 133, 58, 59, 243, 4,
+ 58, 59, 242, 196, 58, 59, 243, 67, 58, 59, 242, 94, 58, 59, 242, 221, 58,
+ 59, 242, 157, 58, 59, 243, 28, 58, 59, 242, 125, 58, 59, 242, 252, 58,
+ 59, 242, 188, 58, 59, 243, 59, 58, 59, 242, 109, 58, 59, 242, 236, 58,
+ 59, 242, 172, 58, 59, 243, 43, 58, 59, 242, 140, 58, 59, 243, 11, 58, 59,
+ 242, 203, 58, 59, 243, 74, 58, 59, 242, 85, 58, 59, 242, 212, 58, 59,
+ 242, 148, 58, 59, 243, 19, 58, 59, 242, 116, 58, 59, 242, 243, 58, 59,
+ 242, 179, 58, 59, 243, 50, 58, 59, 242, 100, 58, 59, 242, 227, 58, 59,
+ 242, 163, 58, 59, 243, 34, 58, 59, 242, 131, 58, 59, 243, 2, 58, 59, 242,
+ 194, 58, 59, 243, 65, 58, 59, 242, 92, 58, 59, 242, 219, 58, 59, 242,
+ 155, 58, 59, 243, 26, 58, 59, 242, 123, 58, 59, 242, 250, 58, 59, 242,
+ 186, 58, 59, 243, 57, 58, 59, 242, 107, 58, 59, 242, 234, 58, 59, 242,
+ 170, 58, 59, 243, 41, 58, 59, 242, 138, 58, 59, 243, 9, 58, 59, 242, 201,
+ 58, 59, 243, 72, 58, 59, 242, 88, 58, 59, 242, 215, 58, 59, 242, 151, 58,
+ 59, 243, 22, 58, 59, 242, 119, 58, 59, 242, 246, 58, 59, 242, 182, 58,
+ 59, 243, 53, 58, 59, 242, 103, 58, 59, 242, 230, 58, 59, 242, 166, 58,
+ 59, 243, 37, 58, 59, 242, 134, 58, 59, 243, 5, 58, 59, 242, 197, 58, 59,
+ 243, 68, 58, 59, 242, 95, 58, 59, 242, 222, 58, 59, 242, 158, 58, 59,
+ 243, 29, 58, 59, 242, 126, 58, 59, 242, 253, 58, 59, 242, 189, 58, 59,
+ 243, 60, 58, 59, 242, 110, 58, 59, 242, 237, 58, 59, 242, 173, 58, 59,
+ 243, 44, 58, 59, 242, 141, 58, 59, 243, 12, 58, 59, 242, 204, 58, 59,
+ 243, 75, 86, 207, 134, 53, 3, 80, 95, 86, 207, 134, 53, 3, 52, 80, 95,
+ 96, 52, 53, 3, 80, 95, 86, 52, 53, 3, 80, 95, 49, 50, 52, 53, 3, 80, 95,
+ 86, 207, 134, 53, 239, 120, 142, 96, 52, 53, 239, 120, 142, 86, 52, 53,
+ 239, 120, 142, 183, 53, 3, 236, 106, 95, 177, 53, 3, 236, 106, 95, 177,
+ 208, 70, 47, 183, 208, 70, 47, 96, 52, 244, 145, 47, 86, 52, 244, 145,
+ 47, 96, 208, 70, 244, 145, 47, 86, 208, 70, 244, 145, 47, 86, 207, 134,
+ 208, 70, 244, 145, 47, 86, 53, 3, 242, 83, 211, 77, 177, 53, 208, 173,
+ 142, 183, 53, 208, 173, 142, 86, 53, 3, 209, 249, 3, 80, 95, 86, 53, 3,
+ 209, 249, 3, 52, 80, 95, 86, 207, 134, 53, 3, 209, 248, 86, 207, 134, 53,
+ 3, 209, 249, 3, 80, 95, 86, 207, 134, 53, 3, 209, 249, 3, 52, 80, 95, 96,
+ 250, 96, 86, 250, 96, 96, 52, 250, 96, 86, 52, 250, 96, 96, 53, 208, 173,
+ 62, 243, 221, 86, 53, 208, 173, 62, 243, 221, 96, 53, 239, 120, 248, 231,
+ 208, 173, 62, 243, 221, 86, 53, 239, 120, 248, 231, 208, 173, 62, 243,
+ 221, 153, 204, 46, 25, 211, 238, 241, 176, 47, 153, 241, 176, 25, 211,
+ 238, 204, 46, 47, 153, 204, 46, 53, 3, 113, 153, 241, 176, 53, 3, 113,
+ 211, 238, 241, 176, 53, 3, 113, 211, 238, 204, 46, 53, 3, 113, 153, 204,
+ 46, 53, 25, 153, 241, 176, 47, 153, 241, 176, 53, 25, 211, 238, 241, 176,
+ 47, 211, 238, 241, 176, 53, 25, 211, 238, 204, 46, 47, 211, 238, 204, 46,
+ 53, 25, 153, 204, 46, 47, 215, 245, 243, 228, 245, 124, 240, 84, 243,
+ 227, 240, 84, 243, 228, 245, 124, 215, 245, 243, 227, 211, 238, 241, 176,
+ 53, 245, 124, 153, 241, 176, 47, 153, 241, 176, 53, 245, 124, 211, 238,
+ 241, 176, 47, 240, 84, 243, 228, 245, 124, 153, 241, 176, 47, 215, 245,
+ 243, 228, 245, 124, 211, 238, 241, 176, 47, 153, 241, 176, 53, 245, 124,
+ 153, 204, 46, 47, 153, 204, 46, 53, 245, 124, 153, 241, 176, 47, 204, 76,
+ 53, 218, 59, 243, 164, 216, 16, 53, 218, 59, 86, 209, 84, 245, 84, 206,
+ 212, 53, 218, 59, 86, 209, 84, 245, 84, 242, 68, 53, 218, 59, 183, 209,
+ 84, 245, 84, 227, 212, 53, 218, 59, 183, 209, 84, 245, 84, 216, 5, 216,
+ 8, 250, 129, 246, 18, 47, 227, 215, 250, 129, 250, 194, 47, 208, 145,
+ 250, 129, 250, 194, 47, 247, 248, 250, 129, 250, 194, 47, 208, 145, 250,
+ 129, 246, 18, 53, 3, 224, 102, 208, 145, 250, 129, 250, 194, 53, 3, 218,
+ 76, 226, 251, 50, 213, 145, 246, 18, 47, 226, 251, 49, 213, 145, 250,
+ 194, 47, 250, 194, 246, 16, 246, 62, 47, 246, 18, 246, 16, 246, 62, 47,
+ 86, 53, 87, 212, 228, 96, 47, 96, 53, 87, 212, 228, 86, 47, 212, 228, 86,
+ 53, 87, 96, 47, 86, 53, 3, 91, 56, 96, 53, 3, 91, 56, 86, 53, 209, 25,
+ 203, 196, 49, 50, 53, 209, 25, 5, 246, 61, 177, 207, 134, 53, 239, 120,
+ 5, 246, 61, 49, 150, 112, 50, 150, 121, 237, 86, 49, 150, 121, 50, 150,
+ 112, 237, 86, 112, 150, 50, 121, 150, 49, 237, 86, 112, 150, 49, 121,
+ 150, 50, 237, 86, 49, 150, 112, 50, 150, 112, 237, 86, 112, 150, 50, 121,
+ 150, 50, 237, 86, 49, 150, 121, 50, 150, 121, 237, 86, 112, 150, 49, 121,
+ 150, 49, 237, 86, 96, 237, 87, 3, 150, 112, 208, 173, 142, 86, 237, 87,
+ 3, 150, 112, 208, 173, 142, 177, 237, 87, 3, 150, 50, 208, 173, 142, 183,
+ 237, 87, 3, 150, 50, 208, 173, 142, 96, 237, 87, 3, 150, 121, 208, 173,
+ 142, 86, 237, 87, 3, 150, 121, 208, 173, 142, 177, 237, 87, 3, 150, 49,
+ 208, 173, 142, 183, 237, 87, 3, 150, 49, 208, 173, 142, 96, 237, 87, 3,
+ 150, 112, 239, 120, 142, 86, 237, 87, 3, 150, 112, 239, 120, 142, 177,
+ 237, 87, 3, 150, 50, 239, 120, 142, 183, 237, 87, 3, 150, 50, 239, 120,
+ 142, 96, 237, 87, 3, 150, 121, 239, 120, 142, 86, 237, 87, 3, 150, 121,
+ 239, 120, 142, 177, 237, 87, 3, 150, 49, 239, 120, 142, 183, 237, 87, 3,
+ 150, 49, 239, 120, 142, 96, 237, 87, 3, 150, 112, 87, 96, 237, 87, 3,
+ 150, 242, 70, 177, 237, 87, 3, 150, 49, 248, 110, 177, 237, 87, 3, 150,
+ 216, 16, 86, 237, 87, 3, 150, 112, 87, 86, 237, 87, 3, 150, 242, 70, 183,
+ 237, 87, 3, 150, 49, 248, 110, 183, 237, 87, 3, 150, 216, 16, 96, 237,
+ 87, 3, 150, 112, 87, 86, 237, 87, 3, 150, 206, 224, 96, 237, 87, 3, 150,
+ 121, 87, 86, 237, 87, 3, 150, 242, 70, 86, 237, 87, 3, 150, 112, 87, 96,
+ 237, 87, 3, 150, 206, 224, 86, 237, 87, 3, 150, 121, 87, 96, 237, 87, 3,
+ 150, 242, 70, 96, 237, 87, 3, 150, 112, 87, 163, 244, 144, 96, 237, 87,
+ 3, 150, 121, 248, 126, 163, 244, 144, 86, 237, 87, 3, 150, 112, 87, 163,
+ 244, 144, 86, 237, 87, 3, 150, 121, 248, 126, 163, 244, 144, 177, 237,
+ 87, 3, 150, 49, 248, 110, 183, 237, 87, 3, 150, 216, 16, 183, 237, 87, 3,
+ 150, 49, 248, 110, 177, 237, 87, 3, 150, 216, 16, 50, 52, 53, 3, 215,
+ 189, 237, 64, 241, 35, 2, 87, 86, 47, 208, 228, 219, 255, 87, 86, 47, 96,
+ 53, 87, 208, 228, 219, 254, 86, 53, 87, 208, 228, 219, 254, 86, 53, 87,
+ 251, 7, 156, 135, 227, 179, 87, 96, 47, 96, 53, 209, 25, 227, 178, 237,
+ 247, 87, 86, 47, 210, 245, 87, 86, 47, 96, 53, 209, 25, 210, 244, 210,
+ 198, 87, 96, 47, 49, 239, 244, 209, 248, 50, 239, 244, 209, 248, 112,
+ 239, 244, 209, 248, 121, 239, 244, 209, 248, 208, 70, 80, 248, 231, 244,
+ 43, 202, 160, 221, 164, 211, 188, 202, 160, 221, 164, 207, 121, 245, 242,
+ 49, 61, 245, 93, 155, 50, 61, 245, 93, 155, 49, 61, 219, 76, 50, 61, 219,
+ 76, 202, 160, 221, 164, 49, 231, 65, 155, 202, 160, 221, 164, 50, 231,
+ 65, 155, 202, 160, 221, 164, 49, 248, 65, 155, 202, 160, 221, 164, 50,
+ 248, 65, 155, 49, 51, 247, 227, 3, 206, 246, 50, 51, 247, 227, 3, 206,
+ 246, 49, 51, 247, 227, 3, 208, 255, 231, 50, 208, 145, 245, 165, 50, 51,
+ 247, 227, 3, 208, 255, 231, 50, 247, 248, 245, 165, 49, 51, 247, 227, 3,
+ 208, 255, 231, 50, 247, 248, 245, 165, 50, 51, 247, 227, 3, 208, 255,
+ 231, 50, 208, 145, 245, 165, 49, 250, 218, 247, 227, 3, 243, 85, 50, 250,
+ 218, 247, 227, 3, 243, 85, 49, 250, 129, 227, 179, 155, 50, 250, 129,
+ 237, 247, 155, 52, 49, 250, 129, 237, 247, 155, 52, 50, 250, 129, 227,
+ 179, 155, 49, 62, 208, 133, 213, 33, 155, 50, 62, 208, 133, 213, 33, 155,
+ 242, 83, 240, 40, 80, 202, 30, 227, 114, 225, 17, 250, 218, 220, 1, 227,
+ 222, 50, 250, 218, 206, 69, 3, 211, 177, 225, 17, 50, 250, 218, 3, 243,
+ 85, 250, 218, 3, 215, 94, 231, 6, 251, 126, 250, 217, 211, 208, 250, 218,
+ 220, 1, 227, 222, 211, 208, 250, 218, 220, 1, 206, 224, 207, 174, 250,
+ 217, 216, 73, 250, 217, 250, 218, 3, 206, 246, 216, 73, 250, 218, 3, 206,
+ 246, 220, 89, 250, 218, 220, 1, 206, 224, 220, 89, 250, 218, 220, 1, 242,
+ 70, 225, 17, 250, 218, 3, 171, 250, 107, 241, 81, 231, 50, 53, 218, 59,
+ 112, 25, 216, 16, 225, 17, 250, 218, 3, 171, 250, 107, 241, 81, 231, 50,
+ 53, 218, 59, 112, 25, 227, 222, 225, 17, 250, 218, 3, 171, 250, 107, 241,
+ 81, 231, 50, 53, 218, 59, 121, 25, 216, 16, 225, 17, 250, 218, 3, 171,
+ 250, 107, 241, 81, 231, 50, 53, 218, 59, 121, 25, 227, 222, 225, 17, 250,
+ 218, 3, 171, 250, 107, 241, 81, 231, 50, 53, 218, 59, 50, 25, 206, 224,
+ 225, 17, 250, 218, 3, 171, 250, 107, 241, 81, 231, 50, 53, 218, 59, 49,
+ 25, 206, 224, 225, 17, 250, 218, 3, 171, 250, 107, 241, 81, 231, 50, 53,
+ 218, 59, 50, 25, 242, 70, 225, 17, 250, 218, 3, 171, 250, 107, 241, 81,
+ 231, 50, 53, 218, 59, 49, 25, 242, 70, 216, 73, 241, 94, 213, 117, 241,
+ 94, 213, 118, 3, 219, 203, 241, 94, 213, 118, 3, 5, 246, 62, 55, 241, 94,
+ 213, 118, 3, 50, 53, 55, 241, 94, 213, 118, 3, 49, 53, 55, 246, 62, 3,
+ 236, 106, 142, 43, 80, 142, 43, 219, 81, 43, 216, 74, 212, 0, 43, 218,
+ 233, 246, 62, 243, 142, 247, 137, 236, 106, 248, 231, 25, 208, 145, 162,
+ 243, 142, 247, 137, 80, 142, 246, 62, 3, 210, 200, 203, 196, 43, 250,
+ 192, 243, 137, 54, 112, 53, 209, 25, 246, 61, 43, 61, 247, 177, 43, 247,
+ 177, 43, 227, 178, 43, 237, 246, 246, 62, 3, 5, 246, 62, 208, 173, 209,
+ 93, 216, 16, 246, 62, 3, 120, 236, 106, 211, 20, 208, 173, 209, 93, 216,
+ 16, 103, 215, 245, 243, 228, 212, 57, 103, 240, 84, 243, 228, 212, 57,
+ 103, 250, 59, 103, 5, 246, 61, 103, 211, 177, 120, 230, 98, 211, 175,
+ 208, 86, 3, 70, 55, 208, 86, 3, 206, 246, 215, 94, 231, 50, 208, 85, 208,
+ 86, 3, 213, 124, 250, 50, 247, 247, 50, 208, 86, 87, 49, 208, 85, 49,
+ 208, 86, 248, 110, 80, 142, 80, 248, 231, 248, 110, 50, 208, 85, 247,
+ 235, 3, 49, 162, 248, 43, 247, 235, 3, 50, 162, 248, 43, 62, 247, 234,
+ 23, 3, 49, 162, 248, 43, 23, 3, 50, 162, 248, 43, 61, 236, 40, 62, 236,
+ 40, 49, 204, 21, 240, 40, 50, 204, 21, 240, 40, 49, 52, 204, 21, 240, 40,
+ 50, 52, 204, 21, 240, 40, 231, 42, 231, 27, 208, 251, 115, 231, 27, 231,
+ 28, 222, 234, 3, 80, 142, 242, 77, 223, 228, 51, 3, 245, 187, 219, 208,
+ 231, 39, 250, 81, 212, 193, 217, 224, 241, 35, 2, 25, 212, 59, 219, 81,
+ 241, 35, 2, 25, 212, 59, 219, 82, 3, 208, 228, 55, 235, 154, 208, 173,
+ 25, 212, 59, 219, 81, 238, 48, 211, 93, 209, 81, 242, 69, 208, 86, 3, 49,
+ 162, 248, 43, 242, 69, 208, 86, 3, 50, 162, 248, 43, 62, 243, 222, 3,
+ 121, 47, 62, 226, 246, 61, 246, 62, 3, 121, 47, 62, 246, 62, 3, 121, 47,
+ 241, 20, 61, 211, 177, 241, 20, 62, 211, 177, 241, 20, 61, 243, 221, 241,
+ 20, 62, 243, 221, 241, 20, 61, 246, 61, 241, 20, 62, 246, 61, 215, 134,
+ 216, 74, 212, 1, 219, 254, 212, 1, 3, 219, 203, 216, 74, 212, 1, 3, 236,
+ 106, 95, 248, 73, 212, 0, 248, 73, 216, 74, 212, 0, 52, 218, 76, 208, 70,
+ 218, 76, 227, 217, 245, 86, 250, 218, 155, 216, 11, 245, 86, 250, 218,
+ 155, 208, 212, 224, 100, 223, 162, 43, 70, 219, 254, 223, 162, 43, 91,
+ 219, 254, 223, 162, 43, 23, 219, 254, 223, 162, 206, 238, 219, 255, 3,
+ 243, 85, 223, 162, 206, 238, 219, 255, 3, 218, 76, 223, 162, 51, 230,
+ 245, 219, 254, 223, 162, 51, 206, 238, 219, 254, 120, 227, 37, 25, 219,
+ 254, 120, 227, 37, 219, 245, 219, 254, 223, 162, 23, 219, 254, 224, 58,
+ 120, 210, 220, 210, 218, 3, 231, 2, 217, 58, 231, 3, 219, 254, 239, 252,
+ 219, 71, 231, 2, 231, 3, 3, 52, 95, 231, 3, 250, 15, 3, 212, 57, 246, 54,
+ 239, 99, 250, 194, 231, 0, 227, 115, 231, 1, 3, 216, 142, 219, 52, 250,
+ 104, 218, 53, 227, 115, 231, 1, 3, 213, 145, 219, 52, 250, 104, 218, 53,
+ 227, 115, 231, 1, 221, 166, 231, 44, 209, 93, 218, 53, 231, 3, 250, 104,
+ 34, 218, 63, 219, 254, 217, 52, 231, 3, 219, 254, 231, 3, 3, 96, 53, 3,
+ 113, 231, 3, 3, 23, 54, 231, 3, 3, 230, 244, 231, 3, 3, 206, 237, 231, 3,
+ 3, 219, 203, 231, 3, 3, 206, 246, 230, 99, 228, 8, 49, 208, 86, 219, 254,
+ 202, 160, 221, 164, 214, 198, 245, 223, 202, 160, 221, 164, 214, 198,
+ 218, 114, 202, 160, 221, 164, 214, 198, 217, 219, 91, 2, 3, 5, 246, 62,
+ 55, 91, 2, 3, 246, 53, 251, 139, 55, 91, 2, 3, 208, 228, 55, 91, 2, 3,
+ 70, 56, 91, 2, 3, 208, 228, 56, 91, 2, 3, 210, 246, 108, 91, 2, 3, 62,
+ 208, 85, 224, 103, 2, 3, 245, 234, 55, 224, 103, 2, 3, 70, 56, 224, 103,
+ 2, 3, 240, 84, 243, 83, 224, 103, 2, 3, 215, 245, 243, 83, 91, 2, 231,
+ 50, 49, 162, 246, 61, 91, 2, 231, 50, 50, 162, 246, 61, 206, 54, 219,
+ 245, 245, 131, 217, 224, 223, 224, 2, 3, 70, 55, 223, 224, 2, 3, 206,
+ 246, 213, 142, 217, 225, 3, 247, 248, 246, 15, 212, 34, 217, 224, 223,
+ 224, 2, 231, 50, 49, 162, 246, 61, 223, 224, 2, 231, 50, 50, 162, 246,
+ 61, 43, 223, 224, 2, 3, 246, 53, 251, 138, 223, 224, 2, 231, 50, 52, 246,
+ 61, 43, 243, 137, 54, 91, 2, 231, 50, 208, 85, 224, 103, 2, 231, 50, 208,
+ 85, 223, 224, 2, 231, 50, 208, 85, 230, 253, 217, 224, 216, 6, 230, 253,
+ 217, 224, 202, 160, 221, 164, 216, 116, 245, 223, 250, 245, 219, 245,
+ 245, 171, 230, 245, 3, 243, 85, 206, 238, 3, 224, 103, 54, 206, 238, 3,
+ 219, 203, 230, 245, 3, 219, 203, 230, 245, 3, 227, 37, 250, 226, 206,
+ 238, 3, 227, 37, 219, 244, 206, 238, 87, 230, 244, 230, 245, 87, 206,
+ 237, 206, 238, 87, 248, 231, 87, 230, 244, 230, 245, 87, 248, 231, 87,
+ 206, 237, 206, 238, 248, 110, 25, 230, 98, 3, 206, 237, 230, 245, 248,
+ 110, 25, 230, 98, 3, 230, 244, 246, 16, 206, 238, 3, 213, 123, 246, 16,
+ 230, 245, 3, 213, 123, 52, 51, 230, 244, 52, 51, 206, 237, 246, 16, 206,
+ 238, 3, 213, 124, 25, 212, 34, 217, 224, 227, 37, 25, 3, 70, 55, 227, 37,
+ 219, 245, 3, 70, 55, 52, 227, 37, 250, 226, 52, 227, 37, 219, 244, 120,
+ 230, 246, 227, 37, 250, 226, 120, 230, 246, 227, 37, 219, 244, 212, 43,
+ 228, 8, 219, 244, 212, 43, 228, 8, 250, 226, 227, 37, 219, 245, 219, 200,
+ 227, 37, 250, 226, 227, 37, 25, 3, 101, 211, 77, 227, 37, 219, 245, 3,
+ 101, 211, 77, 227, 37, 25, 3, 236, 106, 244, 144, 227, 37, 219, 245, 3,
+ 236, 106, 244, 144, 227, 37, 25, 3, 52, 219, 203, 227, 37, 25, 3, 206,
+ 246, 227, 37, 25, 3, 52, 206, 246, 5, 206, 51, 3, 206, 246, 227, 37, 219,
+ 245, 3, 52, 219, 203, 227, 37, 219, 245, 3, 52, 206, 246, 202, 160, 221,
+ 164, 243, 94, 250, 184, 202, 160, 221, 164, 216, 179, 250, 184, 241, 35,
+ 2, 3, 70, 56, 235, 154, 3, 70, 55, 208, 70, 236, 106, 248, 231, 3, 52,
+ 80, 95, 208, 70, 236, 106, 248, 231, 3, 208, 70, 80, 95, 208, 228, 219,
+ 255, 3, 70, 55, 208, 228, 219, 255, 3, 215, 245, 243, 83, 212, 129, 224,
+ 103, 212, 128, 245, 210, 3, 70, 55, 241, 35, 3, 250, 59, 251, 7, 156,
+ 208, 173, 3, 246, 53, 251, 138, 250, 151, 156, 219, 245, 156, 135, 241,
+ 35, 2, 87, 91, 54, 91, 2, 87, 241, 35, 54, 241, 35, 2, 87, 208, 228, 219,
+ 254, 52, 245, 243, 241, 36, 120, 245, 203, 241, 35, 212, 143, 126, 245,
+ 203, 241, 35, 212, 143, 241, 35, 2, 3, 120, 187, 87, 25, 120, 187, 56,
+ 241, 30, 3, 239, 147, 187, 55, 227, 179, 3, 246, 62, 231, 6, 237, 247, 3,
+ 246, 62, 231, 6, 227, 179, 3, 217, 47, 131, 55, 237, 247, 3, 217, 47,
+ 131, 55, 227, 179, 219, 245, 212, 59, 156, 135, 237, 247, 219, 245, 212,
+ 59, 156, 135, 227, 179, 219, 245, 212, 59, 156, 208, 173, 3, 70, 231, 6,
+ 237, 247, 219, 245, 212, 59, 156, 208, 173, 3, 70, 231, 6, 227, 179, 219,
+ 245, 212, 59, 156, 208, 173, 3, 70, 55, 237, 247, 219, 245, 212, 59, 156,
+ 208, 173, 3, 70, 55, 227, 179, 219, 245, 212, 59, 156, 208, 173, 3, 70,
+ 87, 216, 16, 237, 247, 219, 245, 212, 59, 156, 208, 173, 3, 70, 87, 227,
+ 222, 227, 179, 219, 245, 250, 152, 237, 247, 219, 245, 250, 152, 227,
+ 179, 25, 212, 118, 221, 166, 156, 135, 237, 247, 25, 212, 118, 221, 166,
+ 156, 135, 227, 179, 25, 221, 166, 250, 152, 237, 247, 25, 221, 166, 250,
+ 152, 227, 179, 87, 242, 76, 156, 87, 237, 246, 237, 247, 87, 242, 76,
+ 156, 87, 227, 178, 227, 179, 87, 212, 129, 219, 245, 241, 36, 237, 247,
+ 87, 212, 129, 219, 245, 241, 36, 227, 179, 87, 212, 129, 87, 237, 246,
+ 237, 247, 87, 212, 129, 87, 227, 178, 227, 179, 87, 237, 247, 87, 242,
+ 76, 241, 36, 237, 247, 87, 227, 179, 87, 242, 76, 241, 36, 227, 179, 87,
+ 212, 59, 156, 87, 237, 247, 87, 212, 59, 241, 36, 237, 247, 87, 212, 59,
+ 156, 87, 227, 179, 87, 212, 59, 241, 36, 212, 59, 156, 208, 173, 219,
+ 245, 227, 178, 212, 59, 156, 208, 173, 219, 245, 237, 246, 212, 59, 156,
+ 208, 173, 219, 245, 227, 179, 3, 70, 231, 6, 212, 59, 156, 208, 173, 219,
+ 245, 237, 247, 3, 70, 231, 6, 242, 76, 156, 208, 173, 219, 245, 227, 178,
+ 242, 76, 156, 208, 173, 219, 245, 237, 246, 242, 76, 212, 59, 156, 208,
+ 173, 219, 245, 227, 178, 242, 76, 212, 59, 156, 208, 173, 219, 245, 237,
+ 246, 212, 129, 219, 245, 227, 178, 212, 129, 219, 245, 237, 246, 212,
+ 129, 87, 227, 179, 87, 241, 35, 54, 212, 129, 87, 237, 247, 87, 241, 35,
+ 54, 52, 222, 221, 227, 178, 52, 222, 221, 237, 246, 52, 222, 221, 227,
+ 179, 3, 206, 246, 237, 247, 219, 200, 227, 178, 237, 247, 248, 110, 227,
+ 178, 227, 179, 246, 16, 247, 137, 245, 87, 237, 247, 246, 16, 247, 137,
+ 245, 87, 227, 179, 246, 16, 247, 137, 245, 88, 87, 212, 59, 241, 36, 237,
+ 247, 246, 16, 247, 137, 245, 88, 87, 212, 59, 241, 36, 212, 35, 209, 97,
+ 228, 6, 209, 97, 212, 35, 209, 98, 219, 245, 156, 135, 228, 6, 209, 98,
+ 219, 245, 156, 135, 241, 35, 2, 3, 247, 170, 55, 217, 250, 87, 212, 118,
+ 241, 35, 54, 210, 237, 87, 212, 118, 241, 35, 54, 217, 250, 87, 212, 118,
+ 221, 166, 156, 135, 210, 237, 87, 212, 118, 221, 166, 156, 135, 217, 250,
+ 87, 241, 35, 54, 210, 237, 87, 241, 35, 54, 217, 250, 87, 221, 166, 156,
+ 135, 210, 237, 87, 221, 166, 156, 135, 217, 250, 87, 251, 7, 156, 135,
+ 210, 237, 87, 251, 7, 156, 135, 217, 250, 87, 221, 166, 251, 7, 156, 135,
+ 210, 237, 87, 221, 166, 251, 7, 156, 135, 52, 217, 249, 52, 210, 236,
+ 210, 245, 3, 243, 85, 210, 198, 3, 243, 85, 210, 245, 3, 91, 2, 56, 210,
+ 198, 3, 91, 2, 56, 210, 245, 3, 223, 224, 2, 56, 210, 198, 3, 223, 224,
+ 2, 56, 210, 245, 76, 219, 245, 156, 208, 173, 3, 70, 55, 210, 198, 76,
+ 219, 245, 156, 208, 173, 3, 70, 55, 210, 245, 76, 87, 241, 35, 54, 210,
+ 198, 76, 87, 241, 35, 54, 210, 245, 76, 87, 208, 228, 219, 254, 210, 198,
+ 76, 87, 208, 228, 219, 254, 210, 245, 76, 87, 251, 7, 156, 135, 210, 198,
+ 76, 87, 251, 7, 156, 135, 210, 245, 76, 87, 221, 166, 156, 135, 210, 198,
+ 76, 87, 221, 166, 156, 135, 51, 49, 171, 98, 219, 254, 51, 50, 171, 98,
+ 219, 254, 246, 16, 210, 244, 246, 16, 210, 197, 246, 16, 210, 245, 219,
+ 245, 156, 135, 246, 16, 210, 198, 219, 245, 156, 135, 210, 245, 87, 210,
+ 197, 210, 198, 87, 210, 244, 210, 245, 87, 210, 244, 210, 198, 87, 210,
+ 197, 210, 198, 248, 110, 210, 244, 210, 198, 248, 110, 25, 230, 98, 247,
+ 137, 244, 145, 3, 210, 244, 241, 115, 76, 220, 1, 242, 68, 218, 104, 3,
+ 209, 177, 208, 144, 208, 102, 230, 244, 239, 160, 221, 181, 212, 228, 49,
+ 210, 3, 212, 228, 121, 210, 3, 212, 228, 112, 210, 3, 218, 234, 3, 194,
+ 80, 248, 231, 208, 70, 50, 207, 173, 52, 80, 248, 231, 49, 207, 173, 80,
+ 248, 231, 52, 49, 207, 173, 52, 80, 248, 231, 52, 49, 207, 173, 163, 244,
+ 145, 239, 120, 49, 224, 245, 76, 52, 206, 38, 212, 228, 121, 210, 4, 3,
+ 219, 203, 212, 228, 112, 210, 4, 3, 206, 246, 212, 228, 112, 210, 4, 87,
+ 212, 228, 121, 210, 3, 52, 121, 210, 3, 52, 112, 210, 3, 52, 211, 32,
+ 221, 166, 54, 216, 73, 52, 211, 32, 221, 166, 54, 243, 104, 221, 166,
+ 243, 144, 3, 216, 73, 222, 233, 212, 57, 80, 227, 115, 3, 246, 62, 55,
+ 80, 227, 115, 3, 246, 62, 56, 121, 210, 4, 3, 246, 62, 56, 219, 82, 3,
+ 236, 106, 95, 219, 82, 3, 208, 228, 219, 254, 208, 70, 80, 248, 231, 248,
+ 67, 216, 117, 208, 70, 80, 248, 231, 3, 236, 106, 95, 208, 70, 245, 243,
+ 219, 254, 208, 70, 222, 221, 227, 178, 208, 70, 222, 221, 237, 246, 242,
+ 76, 212, 59, 227, 179, 219, 245, 156, 135, 242, 76, 212, 59, 237, 247,
+ 219, 245, 156, 135, 208, 70, 212, 1, 248, 67, 216, 117, 228, 8, 208, 70,
+ 80, 248, 231, 219, 254, 52, 212, 1, 219, 254, 61, 80, 142, 223, 162, 61,
+ 80, 142, 153, 241, 176, 61, 47, 153, 204, 46, 61, 47, 211, 238, 241, 176,
+ 61, 47, 211, 238, 204, 46, 61, 47, 49, 50, 61, 47, 96, 62, 47, 177, 62,
+ 47, 183, 62, 47, 153, 241, 176, 62, 47, 153, 204, 46, 62, 47, 211, 238,
+ 241, 176, 62, 47, 211, 238, 204, 46, 62, 47, 49, 50, 62, 47, 112, 121,
+ 62, 47, 86, 53, 3, 208, 211, 242, 68, 86, 53, 3, 208, 211, 206, 212, 96,
+ 53, 3, 208, 211, 242, 68, 96, 53, 3, 208, 211, 206, 212, 51, 3, 208, 145,
+ 162, 248, 43, 51, 3, 247, 248, 162, 248, 43, 51, 3, 206, 221, 50, 243,
+ 228, 162, 248, 43, 51, 3, 226, 251, 49, 243, 228, 162, 248, 43, 243, 222,
+ 3, 49, 162, 248, 43, 243, 222, 3, 50, 162, 248, 43, 243, 222, 3, 208,
+ 145, 162, 248, 43, 243, 222, 3, 247, 248, 162, 248, 43, 242, 83, 211,
+ 177, 62, 228, 8, 211, 177, 61, 228, 8, 211, 177, 62, 205, 242, 5, 211,
+ 177, 61, 205, 242, 5, 211, 177, 62, 218, 255, 61, 218, 255, 61, 237, 17,
+ 62, 237, 17, 236, 106, 62, 237, 17, 62, 228, 8, 246, 61, 62, 225, 10,
+ 243, 221, 61, 225, 10, 243, 221, 62, 225, 10, 226, 246, 61, 225, 10, 226,
+ 246, 62, 5, 243, 221, 62, 5, 226, 246, 61, 5, 226, 246, 62, 236, 106,
+ 241, 109, 61, 236, 106, 241, 109, 62, 80, 241, 109, 61, 80, 241, 109, 49,
+ 53, 3, 5, 246, 61, 126, 96, 250, 91, 49, 53, 3, 43, 218, 76, 163, 96,
+ 211, 171, 47, 96, 207, 134, 53, 3, 80, 95, 96, 207, 134, 53, 3, 52, 80,
+ 95, 96, 207, 134, 53, 239, 120, 142, 96, 207, 134, 208, 70, 244, 145, 47,
+ 96, 53, 3, 242, 83, 211, 77, 96, 53, 3, 209, 249, 3, 80, 95, 96, 53, 3,
+ 209, 249, 3, 52, 80, 95, 96, 207, 134, 53, 3, 209, 248, 96, 207, 134, 53,
+ 3, 209, 249, 3, 80, 95, 96, 207, 134, 53, 3, 209, 249, 3, 52, 80, 95, 96,
+ 53, 209, 25, 203, 196, 204, 76, 53, 218, 59, 243, 164, 227, 222, 241, 35,
+ 2, 87, 96, 47, 216, 74, 208, 228, 219, 255, 87, 96, 47, 96, 53, 87, 216,
+ 74, 251, 7, 156, 135, 86, 53, 209, 25, 237, 246, 86, 53, 209, 25, 210,
+ 197, 96, 217, 58, 47, 86, 217, 58, 47, 216, 74, 208, 228, 219, 255, 87,
+ 86, 47, 86, 53, 87, 216, 74, 251, 7, 156, 135, 208, 228, 219, 255, 87,
+ 96, 47, 96, 53, 87, 251, 7, 156, 135, 96, 53, 87, 216, 74, 208, 228, 219,
+ 254, 86, 53, 87, 216, 74, 208, 228, 219, 254, 183, 208, 84, 202, 30, 47,
+ 212, 228, 212, 59, 153, 47, 212, 228, 249, 22, 211, 238, 47, 61, 225, 10,
+ 211, 94, 62, 5, 211, 94, 61, 5, 211, 94, 62, 216, 11, 218, 255, 61, 216,
+ 11, 218, 255, 79, 228, 8, 246, 61, 79, 219, 205, 3, 219, 205, 231, 6, 79,
+ 246, 62, 3, 246, 62, 231, 6, 79, 246, 61, 79, 43, 214, 254, 212, 59, 153,
+ 53, 3, 236, 115, 237, 64, 249, 22, 211, 238, 53, 3, 236, 115, 209, 248,
+ 212, 59, 153, 53, 3, 236, 106, 209, 248, 249, 22, 211, 238, 53, 3, 236,
+ 106, 209, 248, 248, 118, 53, 218, 59, 183, 209, 84, 153, 241, 175, 212,
+ 228, 248, 118, 53, 218, 59, 183, 209, 84, 153, 241, 175, 96, 208, 84, 47,
+ 177, 208, 84, 47, 86, 208, 84, 47, 183, 208, 84, 47, 49, 50, 208, 84, 47,
+ 112, 121, 208, 84, 47, 153, 204, 46, 208, 84, 47, 153, 241, 176, 208, 84,
+ 47, 211, 238, 241, 176, 208, 84, 47, 211, 238, 204, 46, 208, 84, 47, 96,
+ 208, 84, 244, 143, 47, 177, 208, 84, 244, 143, 47, 86, 208, 84, 244, 143,
+ 47, 183, 208, 84, 244, 143, 47, 246, 18, 208, 84, 171, 246, 62, 47, 250,
+ 194, 208, 84, 171, 246, 62, 47, 96, 208, 84, 53, 208, 173, 142, 177, 208,
+ 84, 53, 208, 173, 142, 86, 208, 84, 53, 208, 173, 142, 183, 208, 84, 53,
+ 208, 173, 142, 153, 204, 46, 208, 84, 53, 208, 173, 142, 153, 241, 176,
+ 208, 84, 53, 208, 173, 142, 211, 238, 241, 176, 208, 84, 53, 208, 173,
+ 142, 211, 238, 204, 46, 208, 84, 53, 208, 173, 142, 96, 208, 84, 53, 3,
+ 52, 236, 106, 95, 177, 208, 84, 53, 3, 52, 236, 106, 95, 86, 208, 84, 53,
+ 3, 52, 236, 106, 95, 183, 208, 84, 53, 3, 52, 236, 106, 95, 236, 106,
+ 210, 11, 229, 151, 80, 210, 11, 229, 151, 96, 208, 84, 53, 115, 86, 208,
+ 84, 47, 177, 208, 84, 53, 96, 76, 183, 208, 84, 47, 86, 208, 84, 53, 115,
+ 96, 208, 84, 47, 183, 208, 84, 53, 96, 76, 177, 208, 84, 47, 96, 208, 84,
+ 219, 146, 250, 91, 177, 208, 84, 219, 146, 250, 91, 86, 208, 84, 219,
+ 146, 250, 91, 183, 208, 84, 219, 146, 250, 91, 96, 62, 43, 61, 47, 177,
+ 62, 43, 61, 47, 86, 62, 43, 61, 47, 183, 62, 43, 61, 47, 250, 194, 208,
+ 84, 50, 207, 92, 47, 250, 194, 208, 84, 247, 248, 207, 92, 47, 250, 194,
+ 208, 84, 49, 207, 92, 47, 250, 194, 208, 84, 208, 145, 207, 92, 47, 216,
+ 78, 227, 222, 216, 78, 216, 16, 222, 212, 227, 222, 222, 212, 216, 16,
+ 239, 147, 245, 166, 250, 92, 246, 57, 250, 193, 86, 62, 47, 209, 31, 208,
+ 143, 96, 241, 31, 250, 94, 209, 31, 216, 12, 177, 241, 31, 250, 94, 209,
+ 31, 208, 143, 86, 241, 31, 250, 94, 209, 31, 227, 218, 183, 241, 31, 250,
+ 94, 62, 96, 241, 31, 250, 94, 62, 177, 241, 31, 250, 94, 62, 86, 241, 31,
+ 250, 94, 62, 183, 241, 31, 250, 94, 183, 208, 84, 53, 3, 163, 208, 211,
+ 227, 212, 183, 208, 84, 53, 3, 163, 208, 211, 216, 5, 177, 208, 84, 53,
+ 3, 163, 208, 211, 227, 212, 177, 208, 84, 53, 3, 163, 208, 211, 216, 5,
+ 96, 208, 84, 53, 3, 163, 208, 211, 206, 212, 86, 208, 84, 53, 3, 163,
+ 208, 211, 206, 212, 96, 208, 84, 53, 3, 163, 208, 211, 242, 68, 86, 208,
+ 84, 53, 3, 163, 208, 211, 242, 68, 62, 245, 86, 183, 25, 96, 47, 62, 245,
+ 86, 183, 25, 86, 47, 62, 245, 86, 177, 25, 96, 47, 62, 245, 86, 177, 25,
+ 86, 47, 62, 245, 86, 96, 25, 177, 47, 62, 245, 86, 86, 25, 177, 47, 62,
+ 245, 86, 96, 25, 183, 47, 62, 245, 86, 86, 25, 183, 47, 216, 55, 53, 121,
+ 227, 222, 216, 55, 53, 121, 216, 16, 216, 55, 53, 112, 227, 222, 216, 55,
+ 53, 112, 216, 16, 216, 55, 53, 49, 206, 224, 216, 55, 53, 50, 206, 224,
+ 216, 55, 53, 49, 242, 70, 216, 55, 53, 50, 242, 70, 177, 61, 53, 239,
+ 120, 248, 231, 3, 236, 106, 142, 112, 250, 95, 231, 50, 34, 216, 144,
+ 247, 233, 248, 248, 98, 3, 157, 203, 196, 43, 203, 196, 43, 26, 203, 196,
+ 62, 51, 246, 215, 62, 243, 222, 246, 215, 207, 174, 62, 218, 255, 236,
+ 106, 62, 220, 81, 62, 220, 81, 62, 225, 10, 206, 223, 208, 86, 246, 215,
+ 62, 225, 10, 242, 69, 208, 86, 246, 215, 62, 225, 10, 227, 217, 208, 86,
+ 246, 215, 62, 225, 10, 216, 11, 208, 86, 246, 215, 208, 145, 162, 62,
+ 246, 61, 247, 248, 162, 62, 246, 61, 157, 239, 147, 218, 61, 62, 245, 82,
+ 215, 198, 157, 239, 147, 218, 61, 62, 245, 82, 61, 239, 147, 218, 61,
+ 245, 82, 215, 198, 61, 239, 147, 218, 61, 245, 82, 51, 218, 34, 231, 31,
+ 206, 250, 54, 96, 207, 134, 53, 3, 208, 86, 250, 93, 177, 207, 134, 53,
+ 3, 208, 86, 250, 93, 86, 207, 134, 53, 3, 208, 86, 250, 93, 183, 207,
+ 134, 53, 3, 208, 86, 250, 93, 180, 6, 1, 250, 0, 180, 6, 1, 247, 181,
+ 180, 6, 1, 206, 53, 180, 6, 1, 238, 50, 180, 6, 1, 243, 108, 180, 6, 1,
+ 203, 24, 180, 6, 1, 202, 64, 180, 6, 1, 241, 250, 180, 6, 1, 202, 89,
+ 180, 6, 1, 230, 188, 180, 6, 1, 81, 230, 188, 180, 6, 1, 75, 180, 6, 1,
+ 243, 128, 180, 6, 1, 230, 10, 180, 6, 1, 227, 79, 180, 6, 1, 223, 167,
+ 180, 6, 1, 223, 69, 180, 6, 1, 220, 20, 180, 6, 1, 218, 56, 180, 6, 1,
+ 215, 244, 180, 6, 1, 212, 41, 180, 6, 1, 207, 161, 180, 6, 1, 207, 10,
+ 180, 6, 1, 239, 123, 180, 6, 1, 237, 23, 180, 6, 1, 219, 217, 180, 6, 1,
+ 219, 34, 180, 6, 1, 212, 202, 180, 6, 1, 207, 255, 180, 6, 1, 246, 104,
+ 180, 6, 1, 213, 90, 180, 6, 1, 203, 30, 180, 6, 1, 203, 32, 180, 6, 1,
+ 203, 64, 180, 6, 1, 211, 204, 152, 180, 6, 1, 202, 213, 180, 6, 1, 5,
+ 202, 183, 180, 6, 1, 5, 202, 184, 3, 209, 248, 180, 6, 1, 202, 247, 180,
+ 6, 1, 230, 229, 5, 202, 183, 180, 6, 1, 248, 73, 202, 183, 180, 6, 1,
+ 230, 229, 248, 73, 202, 183, 180, 6, 1, 239, 235, 180, 6, 1, 230, 186,
+ 180, 6, 1, 212, 201, 180, 6, 1, 208, 60, 63, 180, 6, 1, 227, 252, 223,
+ 167, 180, 5, 1, 250, 0, 180, 5, 1, 247, 181, 180, 5, 1, 206, 53, 180, 5,
+ 1, 238, 50, 180, 5, 1, 243, 108, 180, 5, 1, 203, 24, 180, 5, 1, 202, 64,
+ 180, 5, 1, 241, 250, 180, 5, 1, 202, 89, 180, 5, 1, 230, 188, 180, 5, 1,
+ 81, 230, 188, 180, 5, 1, 75, 180, 5, 1, 243, 128, 180, 5, 1, 230, 10,
+ 180, 5, 1, 227, 79, 180, 5, 1, 223, 167, 180, 5, 1, 223, 69, 180, 5, 1,
+ 220, 20, 180, 5, 1, 218, 56, 180, 5, 1, 215, 244, 180, 5, 1, 212, 41,
+ 180, 5, 1, 207, 161, 180, 5, 1, 207, 10, 180, 5, 1, 239, 123, 180, 5, 1,
+ 237, 23, 180, 5, 1, 219, 217, 180, 5, 1, 219, 34, 180, 5, 1, 212, 202,
+ 180, 5, 1, 207, 255, 180, 5, 1, 246, 104, 180, 5, 1, 213, 90, 180, 5, 1,
+ 203, 30, 180, 5, 1, 203, 32, 180, 5, 1, 203, 64, 180, 5, 1, 211, 204,
+ 152, 180, 5, 1, 202, 213, 180, 5, 1, 5, 202, 183, 180, 5, 1, 5, 202, 184,
+ 3, 209, 248, 180, 5, 1, 202, 247, 180, 5, 1, 230, 229, 5, 202, 183, 180,
+ 5, 1, 248, 73, 202, 183, 180, 5, 1, 230, 229, 248, 73, 202, 183, 180, 5,
+ 1, 239, 235, 180, 5, 1, 230, 186, 180, 5, 1, 212, 201, 180, 5, 1, 208,
+ 60, 63, 180, 5, 1, 227, 252, 223, 167, 8, 6, 1, 228, 131, 3, 52, 142, 8,
+ 5, 1, 228, 131, 3, 52, 142, 8, 6, 1, 228, 131, 3, 101, 208, 227, 8, 6, 1,
+ 219, 185, 3, 95, 8, 6, 1, 217, 1, 3, 209, 248, 8, 5, 1, 34, 3, 95, 8, 5,
+ 1, 210, 70, 3, 243, 228, 95, 8, 6, 1, 237, 172, 3, 244, 20, 8, 5, 1, 237,
+ 172, 3, 244, 20, 8, 6, 1, 230, 55, 3, 244, 20, 8, 5, 1, 230, 55, 3, 244,
+ 20, 8, 6, 1, 202, 160, 3, 244, 20, 8, 5, 1, 202, 160, 3, 244, 20, 8, 6,
+ 1, 251, 2, 8, 6, 1, 226, 186, 3, 113, 8, 6, 1, 207, 174, 63, 8, 6, 1,
+ 207, 174, 251, 2, 8, 5, 1, 206, 165, 3, 50, 113, 8, 6, 1, 204, 145, 3,
+ 113, 8, 5, 1, 204, 145, 3, 113, 8, 5, 1, 206, 165, 3, 245, 95, 8, 6, 1,
+ 162, 237, 171, 8, 5, 1, 162, 237, 171, 8, 5, 1, 209, 246, 218, 192, 8, 5,
+ 1, 188, 3, 221, 163, 8, 5, 1, 207, 174, 217, 1, 3, 209, 248, 8, 5, 1,
+ 158, 3, 124, 215, 253, 231, 6, 8, 1, 5, 6, 207, 174, 74, 8, 210, 246, 5,
+ 1, 230, 184, 65, 1, 6, 206, 164, 8, 6, 1, 215, 94, 3, 210, 169, 209, 248,
+ 8, 6, 1, 202, 160, 3, 210, 169, 209, 248, 84, 6, 1, 251, 24, 84, 5, 1,
+ 251, 24, 84, 6, 1, 205, 227, 84, 5, 1, 205, 227, 84, 6, 1, 238, 235, 84,
+ 5, 1, 238, 235, 84, 6, 1, 244, 180, 84, 5, 1, 244, 180, 84, 6, 1, 241,
+ 144, 84, 5, 1, 241, 144, 84, 6, 1, 211, 243, 84, 5, 1, 211, 243, 84, 6,
+ 1, 202, 99, 84, 5, 1, 202, 99, 84, 6, 1, 237, 80, 84, 5, 1, 237, 80, 84,
+ 6, 1, 209, 72, 84, 5, 1, 209, 72, 84, 6, 1, 235, 168, 84, 5, 1, 235, 168,
+ 84, 6, 1, 229, 252, 84, 5, 1, 229, 252, 84, 6, 1, 227, 248, 84, 5, 1,
+ 227, 248, 84, 6, 1, 224, 155, 84, 5, 1, 224, 155, 84, 6, 1, 222, 100, 84,
+ 5, 1, 222, 100, 84, 6, 1, 228, 225, 84, 5, 1, 228, 225, 84, 6, 1, 78, 84,
+ 5, 1, 78, 84, 6, 1, 218, 167, 84, 5, 1, 218, 167, 84, 6, 1, 215, 227, 84,
+ 5, 1, 215, 227, 84, 6, 1, 212, 132, 84, 5, 1, 212, 132, 84, 6, 1, 209,
+ 207, 84, 5, 1, 209, 207, 84, 6, 1, 207, 39, 84, 5, 1, 207, 39, 84, 6, 1,
+ 240, 26, 84, 5, 1, 240, 26, 84, 6, 1, 229, 122, 84, 5, 1, 229, 122, 84,
+ 6, 1, 217, 202, 84, 5, 1, 217, 202, 84, 6, 1, 220, 12, 84, 5, 1, 220, 12,
+ 84, 6, 1, 243, 226, 251, 30, 84, 5, 1, 243, 226, 251, 30, 84, 6, 1, 38,
+ 84, 251, 59, 84, 5, 1, 38, 84, 251, 59, 84, 6, 1, 245, 113, 241, 144, 84,
+ 5, 1, 245, 113, 241, 144, 84, 6, 1, 243, 226, 229, 252, 84, 5, 1, 243,
+ 226, 229, 252, 84, 6, 1, 243, 226, 222, 100, 84, 5, 1, 243, 226, 222,
+ 100, 84, 6, 1, 245, 113, 222, 100, 84, 5, 1, 245, 113, 222, 100, 84, 6,
+ 1, 38, 84, 220, 12, 84, 5, 1, 38, 84, 220, 12, 84, 6, 1, 214, 246, 84, 5,
+ 1, 214, 246, 84, 6, 1, 245, 128, 213, 35, 84, 5, 1, 245, 128, 213, 35,
+ 84, 6, 1, 38, 84, 213, 35, 84, 5, 1, 38, 84, 213, 35, 84, 6, 1, 38, 84,
+ 241, 7, 84, 5, 1, 38, 84, 241, 7, 84, 6, 1, 251, 43, 229, 127, 84, 5, 1,
+ 251, 43, 229, 127, 84, 6, 1, 243, 226, 236, 107, 84, 5, 1, 243, 226, 236,
+ 107, 84, 6, 1, 38, 84, 236, 107, 84, 5, 1, 38, 84, 236, 107, 84, 6, 1,
+ 38, 84, 152, 84, 5, 1, 38, 84, 152, 84, 6, 1, 228, 130, 152, 84, 5, 1,
+ 228, 130, 152, 84, 6, 1, 38, 84, 237, 42, 84, 5, 1, 38, 84, 237, 42, 84,
+ 6, 1, 38, 84, 237, 83, 84, 5, 1, 38, 84, 237, 83, 84, 6, 1, 38, 84, 238,
+ 230, 84, 5, 1, 38, 84, 238, 230, 84, 6, 1, 38, 84, 243, 131, 84, 5, 1,
+ 38, 84, 243, 131, 84, 6, 1, 38, 84, 213, 1, 84, 5, 1, 38, 84, 213, 1, 84,
+ 6, 1, 38, 221, 54, 213, 1, 84, 5, 1, 38, 221, 54, 213, 1, 84, 6, 1, 38,
+ 221, 54, 222, 151, 84, 5, 1, 38, 221, 54, 222, 151, 84, 6, 1, 38, 221,
+ 54, 220, 248, 84, 5, 1, 38, 221, 54, 220, 248, 84, 6, 1, 38, 221, 54,
+ 204, 77, 84, 5, 1, 38, 221, 54, 204, 77, 84, 16, 230, 18, 84, 16, 224,
+ 156, 215, 227, 84, 16, 218, 168, 215, 227, 84, 16, 211, 85, 84, 16, 209,
+ 208, 215, 227, 84, 16, 229, 123, 215, 227, 84, 16, 213, 2, 212, 132, 84,
+ 6, 1, 245, 113, 213, 35, 84, 5, 1, 245, 113, 213, 35, 84, 6, 1, 245, 113,
+ 238, 230, 84, 5, 1, 245, 113, 238, 230, 84, 39, 222, 101, 55, 84, 39,
+ 211, 197, 250, 67, 84, 39, 211, 197, 227, 186, 84, 6, 1, 248, 16, 229,
+ 127, 84, 5, 1, 248, 16, 229, 127, 84, 38, 221, 54, 239, 102, 211, 61, 84,
+ 38, 221, 54, 243, 167, 217, 47, 82, 84, 38, 221, 54, 231, 30, 217, 47,
+ 82, 84, 38, 221, 54, 206, 40, 243, 141, 84, 239, 138, 118, 237, 137, 84,
+ 239, 102, 211, 61, 84, 224, 25, 243, 141, 114, 5, 1, 250, 231, 114, 5, 1,
+ 248, 242, 114, 5, 1, 238, 234, 114, 5, 1, 243, 93, 114, 5, 1, 241, 92,
+ 114, 5, 1, 205, 213, 114, 5, 1, 202, 87, 114, 5, 1, 209, 230, 114, 5, 1,
+ 231, 49, 114, 5, 1, 230, 4, 114, 5, 1, 228, 2, 114, 5, 1, 225, 122, 114,
+ 5, 1, 223, 74, 114, 5, 1, 220, 31, 114, 5, 1, 219, 91, 114, 5, 1, 202,
+ 76, 114, 5, 1, 216, 202, 114, 5, 1, 214, 243, 114, 5, 1, 209, 218, 114,
+ 5, 1, 206, 255, 114, 5, 1, 218, 200, 114, 5, 1, 229, 132, 114, 5, 1, 238,
+ 110, 114, 5, 1, 217, 111, 114, 5, 1, 212, 255, 114, 5, 1, 246, 129, 114,
+ 5, 1, 247, 61, 114, 5, 1, 230, 133, 114, 5, 1, 246, 68, 114, 5, 1, 246,
+ 183, 114, 5, 1, 203, 180, 114, 5, 1, 230, 146, 114, 5, 1, 237, 154, 114,
+ 5, 1, 237, 67, 114, 5, 1, 236, 254, 114, 5, 1, 204, 62, 114, 5, 1, 237,
+ 92, 114, 5, 1, 236, 132, 114, 5, 1, 202, 249, 114, 5, 1, 251, 98, 208,
+ 247, 1, 198, 208, 247, 1, 203, 106, 208, 247, 1, 203, 105, 208, 247, 1,
+ 203, 95, 208, 247, 1, 203, 93, 208, 247, 1, 248, 112, 251, 140, 203, 88,
+ 208, 247, 1, 203, 88, 208, 247, 1, 203, 103, 208, 247, 1, 203, 100, 208,
+ 247, 1, 203, 102, 208, 247, 1, 203, 101, 208, 247, 1, 203, 15, 208, 247,
+ 1, 203, 97, 208, 247, 1, 203, 86, 208, 247, 1, 207, 200, 203, 86, 208,
+ 247, 1, 203, 83, 208, 247, 1, 203, 91, 208, 247, 1, 248, 112, 251, 140,
+ 203, 91, 208, 247, 1, 207, 200, 203, 91, 208, 247, 1, 203, 90, 208, 247,
+ 1, 203, 110, 208, 247, 1, 203, 84, 208, 247, 1, 207, 200, 203, 84, 208,
+ 247, 1, 203, 73, 208, 247, 1, 207, 200, 203, 73, 208, 247, 1, 203, 11,
+ 208, 247, 1, 203, 54, 208, 247, 1, 251, 71, 203, 54, 208, 247, 1, 207,
+ 200, 203, 54, 208, 247, 1, 203, 82, 208, 247, 1, 203, 81, 208, 247, 1,
+ 203, 78, 208, 247, 1, 207, 200, 203, 92, 208, 247, 1, 207, 200, 203, 76,
+ 208, 247, 1, 203, 74, 208, 247, 1, 202, 213, 208, 247, 1, 203, 71, 208,
+ 247, 1, 203, 70, 208, 247, 1, 203, 94, 208, 247, 1, 207, 200, 203, 94,
+ 208, 247, 1, 250, 4, 203, 94, 208, 247, 1, 203, 69, 208, 247, 1, 203, 67,
+ 208, 247, 1, 203, 68, 208, 247, 1, 203, 66, 208, 247, 1, 203, 65, 208,
+ 247, 1, 203, 104, 208, 247, 1, 203, 63, 208, 247, 1, 203, 61, 208, 247,
+ 1, 203, 60, 208, 247, 1, 203, 58, 208, 247, 1, 203, 55, 208, 247, 1, 209,
+ 199, 203, 55, 208, 247, 1, 203, 53, 208, 247, 1, 203, 52, 208, 247, 1,
+ 202, 247, 208, 247, 65, 1, 228, 103, 82, 208, 247, 213, 131, 82, 208,
+ 247, 109, 230, 96, 33, 4, 227, 48, 33, 4, 224, 81, 33, 4, 215, 225, 33,
+ 4, 212, 12, 33, 4, 212, 241, 33, 4, 248, 22, 33, 4, 208, 172, 33, 4, 245,
+ 253, 33, 4, 221, 189, 33, 4, 220, 232, 33, 4, 238, 45, 220, 97, 33, 4,
+ 202, 16, 33, 4, 243, 111, 33, 4, 244, 89, 33, 4, 230, 100, 33, 4, 209,
+ 46, 33, 4, 246, 115, 33, 4, 218, 179, 33, 4, 218, 68, 33, 4, 238, 125,
+ 33, 4, 238, 121, 33, 4, 238, 122, 33, 4, 238, 123, 33, 4, 211, 164, 33,
+ 4, 211, 119, 33, 4, 211, 132, 33, 4, 211, 163, 33, 4, 211, 137, 33, 4,
+ 211, 138, 33, 4, 211, 124, 33, 4, 247, 5, 33, 4, 246, 240, 33, 4, 246,
+ 242, 33, 4, 247, 4, 33, 4, 247, 2, 33, 4, 247, 3, 33, 4, 246, 241, 33, 4,
+ 201, 235, 33, 4, 201, 213, 33, 4, 201, 226, 33, 4, 201, 234, 33, 4, 201,
+ 229, 33, 4, 201, 230, 33, 4, 201, 218, 33, 4, 247, 0, 33, 4, 246, 243,
+ 33, 4, 246, 245, 33, 4, 246, 255, 33, 4, 246, 253, 33, 4, 246, 254, 33,
+ 4, 246, 244, 33, 4, 217, 13, 33, 4, 217, 3, 33, 4, 217, 9, 33, 4, 217,
+ 12, 33, 4, 217, 10, 33, 4, 217, 11, 33, 4, 217, 8, 33, 4, 228, 141, 33,
+ 4, 228, 133, 33, 4, 228, 136, 33, 4, 228, 140, 33, 4, 228, 137, 33, 4,
+ 228, 138, 33, 4, 228, 134, 33, 4, 203, 140, 33, 4, 203, 127, 33, 4, 203,
+ 135, 33, 4, 203, 139, 33, 4, 203, 137, 33, 4, 203, 138, 33, 4, 203, 134,
+ 33, 4, 237, 183, 33, 4, 237, 173, 33, 4, 237, 176, 33, 4, 237, 182, 33,
+ 4, 237, 178, 33, 4, 237, 179, 33, 4, 237, 175, 39, 36, 1, 248, 162, 39,
+ 36, 1, 206, 55, 39, 36, 1, 238, 105, 39, 36, 1, 244, 75, 39, 36, 1, 202,
+ 71, 39, 36, 1, 202, 92, 39, 36, 1, 173, 39, 36, 1, 241, 122, 39, 36, 1,
+ 241, 103, 39, 36, 1, 241, 92, 39, 36, 1, 78, 39, 36, 1, 219, 34, 39, 36,
+ 1, 241, 28, 39, 36, 1, 241, 17, 39, 36, 1, 209, 187, 39, 36, 1, 152, 39,
+ 36, 1, 208, 14, 39, 36, 1, 246, 170, 39, 36, 1, 213, 90, 39, 36, 1, 213,
+ 46, 39, 36, 1, 239, 235, 39, 36, 1, 241, 13, 39, 36, 1, 63, 39, 36, 1,
+ 231, 110, 39, 36, 1, 243, 129, 39, 36, 1, 224, 43, 207, 14, 39, 36, 1,
+ 203, 66, 39, 36, 1, 202, 213, 39, 36, 1, 230, 228, 63, 39, 36, 1, 227,
+ 86, 202, 183, 39, 36, 1, 248, 73, 202, 183, 39, 36, 1, 230, 228, 248, 73,
+ 202, 183, 50, 250, 218, 210, 241, 225, 88, 50, 250, 218, 242, 83, 210,
+ 241, 225, 88, 49, 210, 241, 155, 50, 210, 241, 155, 49, 242, 83, 210,
+ 241, 155, 50, 242, 83, 210, 241, 155, 216, 188, 230, 249, 225, 88, 216,
+ 188, 242, 83, 230, 249, 225, 88, 242, 83, 208, 103, 225, 88, 49, 208,
+ 103, 155, 50, 208, 103, 155, 216, 188, 211, 177, 49, 216, 188, 220, 33,
+ 155, 50, 216, 188, 220, 33, 155, 241, 162, 245, 163, 219, 87, 239, 161,
+ 219, 87, 216, 73, 239, 161, 219, 87, 235, 217, 242, 83, 220, 92, 183,
+ 250, 227, 177, 250, 227, 242, 83, 216, 11, 250, 217, 52, 220, 89, 235,
+ 220, 230, 239, 230, 247, 219, 135, 247, 223, 235, 221, 3, 243, 231, 208,
+ 228, 3, 215, 253, 55, 49, 124, 219, 79, 155, 50, 124, 219, 79, 155, 208,
+ 228, 3, 70, 55, 208, 228, 3, 70, 56, 49, 80, 248, 231, 3, 217, 41, 50,
+ 80, 248, 231, 3, 217, 41, 208, 145, 49, 162, 155, 208, 145, 50, 162, 155,
+ 247, 248, 49, 162, 155, 247, 248, 50, 162, 155, 49, 212, 154, 106, 155,
+ 50, 212, 154, 106, 155, 49, 52, 219, 76, 50, 52, 219, 76, 120, 187, 115,
+ 118, 70, 217, 178, 118, 70, 115, 120, 187, 217, 178, 103, 239, 147, 70,
+ 217, 178, 239, 233, 70, 82, 216, 73, 217, 47, 82, 80, 208, 227, 215, 253,
+ 218, 62, 203, 238, 213, 131, 101, 243, 85, 207, 174, 245, 233, 216, 188,
+ 243, 85, 216, 188, 245, 233, 207, 174, 213, 143, 244, 196, 3, 49, 237,
+ 224, 244, 196, 3, 50, 237, 224, 207, 174, 244, 195, 208, 145, 162, 214,
+ 168, 54, 207, 135, 244, 144, 209, 30, 244, 144, 211, 76, 239, 102, 211,
+ 61, 80, 212, 88, 243, 83, 204, 21, 80, 227, 114, 247, 46, 52, 235, 220,
+ 216, 73, 245, 233, 52, 226, 252, 217, 31, 82, 12, 40, 216, 100, 12, 40,
+ 246, 26, 12, 40, 214, 171, 105, 12, 40, 214, 171, 108, 12, 40, 214, 171,
+ 147, 12, 40, 218, 229, 12, 40, 247, 233, 12, 40, 210, 8, 12, 40, 229, 34,
+ 105, 12, 40, 229, 34, 108, 12, 40, 243, 138, 12, 40, 214, 175, 12, 40, 5,
+ 105, 12, 40, 5, 108, 12, 40, 228, 23, 105, 12, 40, 228, 23, 108, 12, 40,
+ 228, 23, 147, 12, 40, 228, 23, 149, 12, 40, 212, 24, 12, 40, 209, 33, 12,
+ 40, 212, 22, 105, 12, 40, 212, 22, 108, 12, 40, 237, 56, 105, 12, 40,
+ 237, 56, 108, 12, 40, 237, 123, 12, 40, 216, 178, 12, 40, 246, 112, 12,
+ 40, 210, 214, 12, 40, 224, 29, 12, 40, 244, 73, 12, 40, 224, 20, 12, 40,
+ 246, 44, 12, 40, 204, 81, 105, 12, 40, 204, 81, 108, 12, 40, 239, 249,
+ 12, 40, 219, 46, 105, 12, 40, 219, 46, 108, 12, 40, 212, 127, 162, 208,
+ 96, 208, 25, 12, 40, 245, 149, 12, 40, 243, 102, 12, 40, 230, 176, 12,
+ 40, 248, 15, 76, 246, 10, 12, 40, 240, 191, 12, 40, 211, 199, 105, 12,
+ 40, 211, 199, 108, 12, 40, 248, 244, 12, 40, 212, 134, 12, 40, 247, 122,
+ 212, 134, 12, 40, 222, 220, 105, 12, 40, 222, 220, 108, 12, 40, 222, 220,
+ 147, 12, 40, 222, 220, 149, 12, 40, 224, 227, 12, 40, 213, 37, 12, 40,
+ 216, 184, 12, 40, 240, 219, 12, 40, 220, 45, 12, 40, 247, 201, 105, 12,
+ 40, 247, 201, 108, 12, 40, 225, 15, 12, 40, 224, 24, 12, 40, 238, 1, 105,
+ 12, 40, 238, 1, 108, 12, 40, 238, 1, 147, 12, 40, 208, 245, 12, 40, 246,
+ 9, 12, 40, 204, 46, 105, 12, 40, 204, 46, 108, 12, 40, 247, 122, 214,
+ 165, 12, 40, 212, 127, 236, 53, 12, 40, 236, 53, 12, 40, 247, 122, 211,
+ 211, 12, 40, 247, 122, 213, 32, 12, 40, 239, 172, 12, 40, 247, 122, 247,
+ 23, 12, 40, 212, 127, 204, 101, 12, 40, 204, 102, 105, 12, 40, 204, 102,
+ 108, 12, 40, 246, 47, 12, 40, 247, 122, 238, 31, 12, 40, 163, 105, 12,
+ 40, 163, 108, 12, 40, 247, 122, 227, 28, 12, 40, 247, 122, 238, 216, 12,
+ 40, 224, 16, 105, 12, 40, 224, 16, 108, 12, 40, 216, 190, 12, 40, 248,
+ 25, 12, 40, 247, 122, 209, 224, 227, 228, 12, 40, 247, 122, 227, 229, 12,
+ 40, 247, 122, 204, 16, 12, 40, 247, 122, 239, 190, 12, 40, 241, 173, 105,
+ 12, 40, 241, 173, 108, 12, 40, 241, 173, 147, 12, 40, 247, 122, 241, 172,
+ 12, 40, 237, 64, 12, 40, 247, 122, 236, 49, 12, 40, 248, 11, 12, 40, 238,
+ 89, 12, 40, 247, 122, 239, 243, 12, 40, 247, 122, 248, 60, 12, 40, 247,
+ 122, 215, 1, 12, 40, 212, 127, 204, 38, 12, 40, 212, 127, 203, 44, 12,
+ 40, 247, 122, 239, 121, 12, 40, 230, 183, 240, 224, 12, 40, 247, 122,
+ 240, 224, 12, 40, 230, 183, 208, 146, 12, 40, 247, 122, 208, 146, 12, 40,
+ 230, 183, 242, 61, 12, 40, 247, 122, 242, 61, 12, 40, 207, 171, 12, 40,
+ 230, 183, 207, 171, 12, 40, 247, 122, 207, 171, 71, 40, 105, 71, 40, 227,
+ 114, 71, 40, 243, 85, 71, 40, 212, 57, 71, 40, 214, 170, 71, 40, 113, 71,
+ 40, 108, 71, 40, 227, 143, 71, 40, 225, 122, 71, 40, 227, 207, 71, 40,
+ 241, 67, 71, 40, 199, 71, 40, 121, 247, 233, 71, 40, 245, 151, 71, 40,
+ 235, 162, 71, 40, 210, 8, 71, 40, 171, 247, 233, 71, 40, 229, 33, 71, 40,
+ 218, 16, 71, 40, 203, 228, 71, 40, 211, 190, 71, 40, 50, 171, 247, 233,
+ 71, 40, 236, 255, 241, 87, 71, 40, 209, 152, 71, 40, 243, 138, 71, 40,
+ 214, 175, 71, 40, 246, 26, 71, 40, 217, 226, 71, 40, 251, 80, 71, 40,
+ 224, 7, 71, 40, 241, 87, 71, 40, 241, 179, 71, 40, 214, 197, 71, 40, 238,
+ 39, 71, 40, 238, 40, 212, 38, 71, 40, 240, 223, 71, 40, 248, 72, 71, 40,
+ 203, 250, 71, 40, 246, 133, 71, 40, 215, 207, 71, 40, 231, 45, 71, 40,
+ 212, 36, 71, 40, 228, 22, 71, 40, 245, 161, 71, 40, 211, 181, 71, 40,
+ 224, 12, 71, 40, 215, 241, 71, 40, 203, 235, 71, 40, 220, 25, 71, 40,
+ 207, 180, 71, 40, 242, 44, 71, 40, 212, 228, 209, 33, 71, 40, 242, 83,
+ 246, 26, 71, 40, 163, 211, 38, 71, 40, 120, 237, 99, 71, 40, 212, 234,
+ 71, 40, 247, 240, 71, 40, 212, 21, 71, 40, 247, 205, 71, 40, 211, 75, 71,
+ 40, 237, 55, 71, 40, 237, 138, 71, 40, 243, 88, 71, 40, 237, 123, 71, 40,
+ 247, 223, 71, 40, 216, 178, 71, 40, 214, 183, 71, 40, 243, 169, 71, 40,
+ 250, 9, 71, 40, 211, 177, 71, 40, 221, 165, 71, 40, 210, 214, 71, 40,
+ 214, 208, 71, 40, 224, 29, 71, 40, 208, 95, 71, 40, 228, 99, 71, 40, 211,
+ 61, 71, 40, 244, 73, 71, 40, 204, 61, 71, 40, 243, 114, 221, 165, 71, 40,
+ 245, 229, 71, 40, 239, 95, 71, 40, 246, 38, 71, 40, 211, 80, 71, 40, 204,
+ 80, 71, 40, 239, 249, 71, 40, 246, 34, 71, 40, 240, 67, 71, 40, 52, 203,
+ 196, 71, 40, 162, 208, 96, 208, 25, 71, 40, 212, 50, 71, 40, 240, 79, 71,
+ 40, 245, 149, 71, 40, 243, 102, 71, 40, 217, 223, 71, 40, 230, 176, 71,
+ 40, 224, 249, 71, 40, 208, 226, 71, 40, 210, 164, 71, 40, 227, 137, 71,
+ 40, 206, 191, 71, 40, 240, 24, 71, 40, 248, 15, 76, 246, 10, 71, 40, 212,
+ 158, 71, 40, 242, 83, 209, 144, 71, 40, 204, 33, 71, 40, 212, 65, 71, 40,
+ 243, 156, 71, 40, 240, 191, 71, 40, 211, 214, 71, 40, 47, 71, 40, 211,
+ 63, 71, 40, 211, 198, 71, 40, 208, 118, 71, 40, 238, 10, 71, 40, 247, 10,
+ 71, 40, 211, 98, 71, 40, 248, 244, 71, 40, 216, 52, 71, 40, 212, 134, 71,
+ 40, 230, 168, 71, 40, 222, 219, 71, 40, 213, 37, 71, 40, 240, 55, 71, 40,
+ 220, 45, 71, 40, 250, 226, 71, 40, 218, 83, 71, 40, 241, 183, 71, 40,
+ 247, 200, 71, 40, 225, 15, 71, 40, 224, 104, 71, 40, 213, 149, 71, 40,
+ 250, 98, 71, 40, 224, 24, 71, 40, 208, 150, 71, 40, 219, 252, 71, 40,
+ 248, 19, 71, 40, 211, 59, 71, 40, 245, 241, 71, 40, 238, 0, 71, 40, 208,
+ 245, 71, 40, 231, 9, 71, 40, 248, 31, 71, 40, 204, 102, 241, 87, 71, 40,
+ 246, 9, 71, 40, 204, 45, 71, 40, 214, 165, 71, 40, 236, 53, 71, 40, 211,
+ 211, 71, 40, 206, 79, 71, 40, 248, 157, 71, 40, 218, 131, 71, 40, 249,
+ 13, 71, 40, 213, 32, 71, 40, 216, 137, 71, 40, 215, 128, 71, 40, 239,
+ 172, 71, 40, 248, 17, 71, 40, 247, 23, 71, 40, 248, 48, 71, 40, 224, 26,
+ 71, 40, 204, 101, 71, 40, 246, 47, 71, 40, 204, 12, 71, 40, 243, 149, 71,
+ 40, 205, 214, 71, 40, 238, 31, 71, 40, 227, 28, 71, 40, 238, 216, 71, 40,
+ 224, 15, 71, 40, 212, 56, 71, 40, 212, 228, 209, 247, 248, 60, 71, 40,
+ 216, 190, 71, 40, 248, 25, 71, 40, 203, 219, 71, 40, 240, 102, 71, 40,
+ 227, 228, 71, 40, 209, 224, 227, 228, 71, 40, 227, 224, 71, 40, 211, 240,
+ 71, 40, 227, 229, 71, 40, 204, 16, 71, 40, 239, 190, 71, 40, 241, 172,
+ 71, 40, 237, 64, 71, 40, 239, 136, 71, 40, 236, 49, 71, 40, 248, 11, 71,
+ 40, 209, 233, 71, 40, 237, 145, 71, 40, 240, 17, 71, 40, 215, 30, 204,
+ 12, 71, 40, 247, 12, 71, 40, 238, 89, 71, 40, 239, 243, 71, 40, 248, 60,
+ 71, 40, 215, 1, 71, 40, 244, 58, 71, 40, 204, 38, 71, 40, 237, 34, 71,
+ 40, 203, 44, 71, 40, 224, 115, 71, 40, 248, 43, 71, 40, 241, 99, 71, 40,
+ 239, 121, 71, 40, 208, 67, 71, 40, 242, 46, 71, 40, 216, 172, 71, 40,
+ 221, 167, 71, 40, 240, 224, 71, 40, 208, 146, 71, 40, 242, 61, 71, 40,
+ 207, 171, 71, 40, 239, 193, 139, 244, 18, 167, 49, 208, 173, 216, 16,
+ 139, 244, 18, 167, 87, 208, 173, 56, 139, 244, 18, 167, 49, 208, 173,
+ 101, 25, 216, 16, 139, 244, 18, 167, 87, 208, 173, 101, 25, 56, 139, 244,
+ 18, 167, 239, 102, 210, 186, 139, 244, 18, 167, 210, 187, 239, 120, 55,
+ 139, 244, 18, 167, 210, 187, 239, 120, 56, 139, 244, 18, 167, 210, 187,
+ 239, 120, 227, 222, 139, 244, 18, 167, 210, 187, 239, 120, 206, 221, 227,
+ 222, 139, 244, 18, 167, 210, 187, 239, 120, 206, 221, 216, 16, 139, 244,
+ 18, 167, 210, 187, 239, 120, 226, 251, 227, 222, 139, 244, 18, 167, 219,
+ 202, 139, 211, 228, 139, 245, 233, 139, 239, 102, 211, 61, 243, 146, 82,
+ 230, 169, 231, 29, 211, 97, 97, 139, 230, 199, 82, 139, 246, 12, 82, 139,
+ 42, 202, 84, 49, 250, 218, 155, 50, 250, 218, 155, 49, 52, 250, 218, 155,
+ 50, 52, 250, 218, 155, 49, 245, 166, 155, 50, 245, 166, 155, 49, 61, 245,
+ 166, 155, 50, 61, 245, 166, 155, 49, 62, 227, 185, 155, 50, 62, 227, 185,
+ 155, 218, 29, 82, 238, 158, 82, 49, 208, 133, 213, 33, 155, 50, 208, 133,
+ 213, 33, 155, 49, 61, 227, 185, 155, 50, 61, 227, 185, 155, 49, 61, 208,
+ 133, 213, 33, 155, 50, 61, 208, 133, 213, 33, 155, 49, 61, 51, 155, 50,
+ 61, 51, 155, 204, 76, 244, 144, 216, 73, 52, 217, 237, 217, 31, 82, 52,
+ 217, 237, 217, 31, 82, 124, 52, 217, 237, 217, 31, 82, 218, 29, 131, 240,
+ 102, 237, 97, 221, 44, 105, 237, 97, 221, 44, 108, 237, 97, 221, 44, 147,
+ 237, 97, 221, 44, 149, 237, 97, 221, 44, 170, 237, 97, 221, 44, 195, 237,
+ 97, 221, 44, 213, 111, 237, 97, 221, 44, 199, 237, 97, 221, 44, 222, 63,
+ 139, 227, 167, 143, 82, 139, 215, 245, 143, 82, 139, 244, 27, 143, 82,
+ 139, 241, 66, 143, 82, 28, 212, 120, 70, 143, 82, 28, 52, 70, 143, 82,
+ 204, 72, 244, 144, 80, 230, 3, 216, 101, 82, 80, 230, 3, 216, 101, 3,
+ 205, 186, 211, 241, 82, 80, 230, 3, 216, 101, 131, 206, 221, 237, 137,
+ 80, 230, 3, 216, 101, 3, 205, 186, 211, 241, 131, 206, 221, 237, 137, 80,
+ 230, 3, 216, 101, 131, 226, 251, 237, 137, 43, 218, 29, 82, 139, 209,
+ 164, 227, 115, 240, 52, 213, 131, 97, 237, 97, 221, 44, 209, 152, 237,
+ 97, 221, 44, 207, 151, 237, 97, 221, 44, 209, 53, 80, 139, 230, 199, 82,
+ 225, 72, 82, 219, 71, 250, 251, 82, 139, 57, 231, 31, 139, 162, 240, 10,
+ 211, 228, 172, 1, 5, 63, 172, 1, 63, 172, 1, 5, 75, 172, 1, 75, 172, 1,
+ 5, 68, 172, 1, 68, 172, 1, 5, 74, 172, 1, 74, 172, 1, 5, 78, 172, 1, 78,
+ 172, 1, 173, 172, 1, 239, 8, 172, 1, 229, 100, 172, 1, 238, 81, 172, 1,
+ 228, 209, 172, 1, 237, 230, 172, 1, 229, 201, 172, 1, 238, 190, 172, 1,
+ 229, 26, 172, 1, 238, 39, 172, 1, 215, 36, 172, 1, 202, 116, 172, 1, 212,
+ 162, 172, 1, 202, 39, 172, 1, 211, 10, 172, 1, 202, 6, 172, 1, 214, 177,
+ 172, 1, 202, 92, 172, 1, 212, 13, 172, 1, 202, 17, 172, 1, 210, 22, 172,
+ 1, 244, 212, 172, 1, 209, 2, 172, 1, 243, 233, 172, 1, 5, 207, 203, 172,
+ 1, 207, 203, 172, 1, 242, 42, 172, 1, 209, 187, 172, 1, 244, 75, 172, 1,
+ 135, 172, 1, 243, 113, 172, 1, 201, 201, 172, 1, 222, 100, 172, 1, 221,
+ 84, 172, 1, 222, 240, 172, 1, 221, 191, 172, 1, 152, 172, 1, 249, 32,
+ 172, 1, 185, 172, 1, 237, 3, 172, 1, 248, 86, 172, 1, 218, 167, 172, 1,
+ 236, 26, 172, 1, 247, 193, 172, 1, 217, 191, 172, 1, 237, 67, 172, 1,
+ 248, 162, 172, 1, 219, 34, 172, 1, 236, 136, 172, 1, 248, 23, 172, 1,
+ 218, 69, 172, 1, 192, 172, 1, 224, 155, 172, 1, 223, 246, 172, 1, 225,
+ 20, 172, 1, 224, 82, 172, 1, 5, 198, 172, 1, 198, 172, 1, 5, 202, 213,
+ 172, 1, 202, 213, 172, 1, 5, 202, 247, 172, 1, 202, 247, 172, 1, 216,
+ 220, 172, 1, 216, 57, 172, 1, 215, 145, 172, 1, 216, 158, 172, 1, 215,
+ 227, 172, 1, 5, 204, 111, 172, 1, 204, 111, 172, 1, 204, 30, 172, 1, 204,
+ 62, 172, 1, 204, 0, 172, 1, 223, 163, 172, 1, 204, 163, 172, 1, 5, 173,
+ 172, 1, 5, 229, 201, 39, 229, 225, 205, 186, 211, 241, 82, 39, 229, 225,
+ 213, 148, 211, 241, 82, 229, 225, 205, 186, 211, 241, 82, 229, 225, 213,
+ 148, 211, 241, 82, 172, 230, 199, 82, 172, 205, 186, 230, 199, 82, 172,
+ 243, 192, 202, 228, 229, 225, 52, 235, 220, 67, 1, 5, 63, 67, 1, 63, 67,
+ 1, 5, 75, 67, 1, 75, 67, 1, 5, 68, 67, 1, 68, 67, 1, 5, 74, 67, 1, 74,
+ 67, 1, 5, 78, 67, 1, 78, 67, 1, 173, 67, 1, 239, 8, 67, 1, 229, 100, 67,
+ 1, 238, 81, 67, 1, 228, 209, 67, 1, 237, 230, 67, 1, 229, 201, 67, 1,
+ 238, 190, 67, 1, 229, 26, 67, 1, 238, 39, 67, 1, 215, 36, 67, 1, 202,
+ 116, 67, 1, 212, 162, 67, 1, 202, 39, 67, 1, 211, 10, 67, 1, 202, 6, 67,
+ 1, 214, 177, 67, 1, 202, 92, 67, 1, 212, 13, 67, 1, 202, 17, 67, 1, 210,
+ 22, 67, 1, 244, 212, 67, 1, 209, 2, 67, 1, 243, 233, 67, 1, 5, 207, 203,
+ 67, 1, 207, 203, 67, 1, 242, 42, 67, 1, 209, 187, 67, 1, 244, 75, 67, 1,
+ 135, 67, 1, 243, 113, 67, 1, 201, 201, 67, 1, 222, 100, 67, 1, 221, 84,
+ 67, 1, 222, 240, 67, 1, 221, 191, 67, 1, 152, 67, 1, 249, 32, 67, 1, 185,
+ 67, 1, 237, 3, 67, 1, 248, 86, 67, 1, 218, 167, 67, 1, 236, 26, 67, 1,
+ 247, 193, 67, 1, 217, 191, 67, 1, 237, 67, 67, 1, 248, 162, 67, 1, 219,
+ 34, 67, 1, 236, 136, 67, 1, 248, 23, 67, 1, 218, 69, 67, 1, 192, 67, 1,
+ 224, 155, 67, 1, 223, 246, 67, 1, 225, 20, 67, 1, 224, 82, 67, 1, 5, 198,
+ 67, 1, 198, 67, 1, 5, 202, 213, 67, 1, 202, 213, 67, 1, 5, 202, 247, 67,
+ 1, 202, 247, 67, 1, 216, 220, 67, 1, 216, 57, 67, 1, 215, 145, 67, 1,
+ 216, 158, 67, 1, 215, 227, 67, 1, 5, 204, 111, 67, 1, 204, 111, 67, 1,
+ 204, 30, 67, 1, 204, 62, 67, 1, 204, 0, 67, 1, 223, 163, 67, 1, 204, 163,
+ 67, 1, 5, 173, 67, 1, 5, 229, 201, 67, 1, 206, 86, 67, 1, 205, 230, 67,
+ 1, 206, 55, 67, 1, 205, 189, 67, 101, 243, 85, 229, 225, 217, 215, 211,
+ 241, 82, 67, 230, 199, 82, 67, 205, 186, 230, 199, 82, 67, 243, 192, 228,
+ 249, 248, 1, 1, 249, 255, 248, 1, 1, 219, 184, 248, 1, 1, 226, 185, 248,
+ 1, 1, 240, 174, 248, 1, 1, 245, 51, 248, 1, 1, 210, 69, 248, 1, 1, 223,
+ 163, 248, 1, 1, 159, 248, 1, 1, 239, 75, 248, 1, 1, 230, 54, 248, 1, 1,
+ 237, 171, 248, 1, 1, 230, 184, 248, 1, 1, 217, 134, 248, 1, 1, 203, 196,
+ 248, 1, 1, 202, 81, 248, 1, 1, 246, 200, 248, 1, 1, 213, 92, 248, 1, 1,
+ 146, 248, 1, 1, 202, 159, 248, 1, 1, 247, 125, 248, 1, 1, 194, 248, 1, 1,
+ 63, 248, 1, 1, 78, 248, 1, 1, 74, 248, 1, 1, 241, 147, 248, 1, 1, 251,
+ 64, 248, 1, 1, 241, 145, 248, 1, 1, 250, 34, 248, 1, 1, 219, 216, 248, 1,
+ 1, 250, 231, 248, 1, 1, 241, 92, 248, 1, 1, 250, 223, 248, 1, 1, 241, 78,
+ 248, 1, 1, 241, 28, 248, 1, 1, 75, 248, 1, 1, 68, 248, 1, 1, 230, 197,
+ 248, 1, 1, 206, 164, 248, 1, 1, 222, 205, 248, 1, 1, 238, 43, 248, 1, 1,
+ 231, 84, 28, 1, 229, 59, 28, 1, 211, 156, 28, 1, 229, 52, 28, 1, 222, 93,
+ 28, 1, 222, 91, 28, 1, 222, 90, 28, 1, 208, 240, 28, 1, 211, 145, 28, 1,
+ 216, 47, 28, 1, 216, 42, 28, 1, 216, 39, 28, 1, 216, 32, 28, 1, 216, 27,
+ 28, 1, 216, 22, 28, 1, 216, 33, 28, 1, 216, 45, 28, 1, 224, 141, 28, 1,
+ 218, 153, 28, 1, 211, 153, 28, 1, 218, 142, 28, 1, 212, 111, 28, 1, 211,
+ 150, 28, 1, 231, 106, 28, 1, 246, 74, 28, 1, 211, 160, 28, 1, 246, 138,
+ 28, 1, 229, 120, 28, 1, 209, 66, 28, 1, 218, 190, 28, 1, 236, 251, 28, 1,
+ 63, 28, 1, 251, 109, 28, 1, 198, 28, 1, 203, 99, 28, 1, 241, 55, 28, 1,
+ 74, 28, 1, 203, 39, 28, 1, 203, 52, 28, 1, 78, 28, 1, 204, 111, 28, 1,
+ 204, 107, 28, 1, 220, 73, 28, 1, 202, 247, 28, 1, 68, 28, 1, 204, 48, 28,
+ 1, 204, 62, 28, 1, 204, 30, 28, 1, 202, 213, 28, 1, 240, 238, 28, 1, 203,
+ 11, 28, 1, 75, 28, 240, 7, 28, 1, 211, 154, 28, 1, 222, 83, 28, 1, 222,
+ 85, 28, 1, 222, 88, 28, 1, 216, 40, 28, 1, 216, 21, 28, 1, 216, 29, 28,
+ 1, 216, 34, 28, 1, 216, 19, 28, 1, 224, 134, 28, 1, 224, 131, 28, 1, 224,
+ 135, 28, 1, 229, 246, 28, 1, 218, 148, 28, 1, 218, 134, 28, 1, 218, 140,
+ 28, 1, 218, 137, 28, 1, 218, 151, 28, 1, 218, 135, 28, 1, 229, 244, 28,
+ 1, 229, 242, 28, 1, 212, 104, 28, 1, 212, 102, 28, 1, 212, 94, 28, 1,
+ 212, 99, 28, 1, 212, 109, 28, 1, 219, 107, 28, 1, 211, 157, 28, 1, 203,
+ 29, 28, 1, 203, 25, 28, 1, 203, 26, 28, 1, 229, 245, 28, 1, 211, 158, 28,
+ 1, 203, 35, 28, 1, 202, 241, 28, 1, 202, 240, 28, 1, 202, 243, 28, 1,
+ 202, 204, 28, 1, 202, 205, 28, 1, 202, 208, 28, 1, 250, 137, 28, 1, 250,
+ 131, 139, 250, 205, 227, 103, 82, 139, 250, 205, 216, 74, 82, 139, 250,
+ 205, 118, 82, 139, 250, 205, 120, 82, 139, 250, 205, 126, 82, 139, 250,
+ 205, 239, 147, 82, 139, 250, 205, 208, 145, 82, 139, 250, 205, 101, 82,
+ 139, 250, 205, 247, 248, 82, 139, 250, 205, 239, 245, 82, 139, 250, 205,
+ 214, 171, 82, 139, 250, 205, 209, 61, 82, 139, 250, 205, 239, 140, 82,
+ 139, 250, 205, 237, 52, 82, 139, 250, 205, 241, 180, 82, 139, 250, 205,
+ 225, 123, 82, 248, 1, 1, 247, 193, 248, 1, 1, 202, 39, 248, 1, 1, 230,
+ 141, 248, 1, 1, 237, 230, 248, 1, 1, 241, 161, 248, 1, 1, 241, 75, 248,
+ 1, 1, 220, 18, 248, 1, 1, 220, 22, 248, 1, 1, 230, 224, 248, 1, 1, 250,
+ 207, 248, 1, 1, 231, 16, 248, 1, 1, 206, 229, 248, 1, 1, 231, 66, 248, 1,
+ 1, 222, 183, 248, 1, 1, 251, 58, 248, 1, 1, 250, 29, 248, 1, 1, 250, 247,
+ 248, 1, 1, 220, 39, 248, 1, 1, 220, 24, 248, 1, 1, 231, 13, 248, 1, 46,
+ 1, 219, 184, 248, 1, 46, 1, 210, 69, 248, 1, 46, 1, 230, 54, 248, 1, 46,
+ 1, 237, 171, 248, 1, 1, 238, 120, 248, 1, 1, 227, 162, 248, 1, 1, 201,
+ 242, 12, 211, 32, 210, 69, 12, 211, 32, 204, 41, 12, 211, 32, 203, 171,
+ 12, 211, 32, 247, 138, 12, 211, 32, 210, 173, 12, 211, 32, 235, 210, 12,
+ 211, 32, 235, 214, 12, 211, 32, 236, 35, 12, 211, 32, 235, 211, 12, 211,
+ 32, 210, 72, 12, 211, 32, 235, 213, 12, 211, 32, 235, 209, 12, 211, 32,
+ 236, 33, 12, 211, 32, 235, 212, 12, 211, 32, 235, 208, 12, 211, 32, 223,
+ 163, 12, 211, 32, 237, 171, 12, 211, 32, 194, 12, 211, 32, 219, 184, 12,
+ 211, 32, 211, 231, 12, 211, 32, 245, 51, 12, 211, 32, 235, 215, 12, 211,
+ 32, 237, 13, 12, 211, 32, 210, 81, 12, 211, 32, 210, 152, 12, 211, 32,
+ 211, 108, 12, 211, 32, 213, 98, 12, 211, 32, 219, 38, 12, 211, 32, 217,
+ 136, 12, 211, 32, 208, 174, 12, 211, 32, 210, 71, 12, 211, 32, 210, 163,
+ 12, 211, 32, 235, 223, 12, 211, 32, 235, 207, 12, 211, 32, 218, 210, 12,
+ 211, 32, 217, 134, 67, 1, 5, 228, 209, 67, 1, 5, 212, 162, 67, 1, 5, 211,
+ 10, 67, 1, 5, 135, 67, 1, 5, 221, 84, 67, 1, 5, 152, 67, 1, 5, 237, 3,
+ 67, 1, 5, 236, 26, 67, 1, 5, 237, 67, 67, 1, 5, 236, 136, 67, 1, 5, 223,
+ 246, 67, 1, 5, 216, 220, 67, 1, 5, 216, 57, 67, 1, 5, 215, 145, 67, 1, 5,
+ 216, 158, 67, 1, 5, 215, 227, 102, 28, 229, 59, 102, 28, 222, 93, 102,
+ 28, 208, 240, 102, 28, 216, 47, 102, 28, 224, 141, 102, 28, 218, 153,
+ 102, 28, 212, 111, 102, 28, 231, 106, 102, 28, 246, 74, 102, 28, 246,
+ 138, 102, 28, 229, 120, 102, 28, 209, 66, 102, 28, 218, 190, 102, 28,
+ 236, 251, 102, 28, 229, 60, 63, 102, 28, 222, 94, 63, 102, 28, 208, 241,
+ 63, 102, 28, 216, 48, 63, 102, 28, 224, 142, 63, 102, 28, 218, 154, 63,
+ 102, 28, 212, 112, 63, 102, 28, 231, 107, 63, 102, 28, 246, 75, 63, 102,
+ 28, 246, 139, 63, 102, 28, 229, 121, 63, 102, 28, 209, 67, 63, 102, 28,
+ 218, 191, 63, 102, 28, 236, 252, 63, 102, 28, 246, 75, 68, 102, 228, 253,
+ 167, 220, 54, 102, 228, 253, 167, 158, 236, 26, 102, 189, 105, 102, 189,
+ 108, 102, 189, 147, 102, 189, 149, 102, 189, 170, 102, 189, 195, 102,
+ 189, 213, 111, 102, 189, 199, 102, 189, 222, 63, 102, 189, 209, 152, 102,
+ 189, 224, 29, 102, 189, 239, 249, 102, 189, 204, 80, 102, 189, 203, 243,
+ 102, 189, 224, 220, 102, 189, 241, 179, 102, 189, 210, 214, 102, 189,
+ 211, 64, 102, 189, 237, 74, 102, 189, 212, 9, 102, 189, 223, 84, 102,
+ 189, 211, 213, 102, 189, 240, 4, 102, 189, 245, 211, 102, 189, 228, 102,
+ 102, 189, 216, 95, 102, 189, 247, 71, 102, 189, 211, 14, 102, 189, 210,
+ 196, 102, 189, 241, 65, 102, 189, 216, 87, 102, 189, 251, 10, 102, 189,
+ 240, 33, 102, 189, 216, 85, 102, 189, 213, 149, 102, 189, 216, 157, 43,
+ 189, 217, 46, 43, 189, 229, 83, 43, 189, 214, 195, 43, 189, 228, 249, 43,
+ 42, 209, 153, 220, 32, 62, 211, 177, 43, 42, 207, 152, 220, 32, 62, 211,
+ 177, 43, 42, 209, 54, 220, 32, 62, 211, 177, 43, 42, 239, 154, 220, 32,
+ 62, 211, 177, 43, 42, 240, 19, 220, 32, 62, 211, 177, 43, 42, 212, 75,
+ 220, 32, 62, 211, 177, 43, 42, 213, 106, 220, 32, 62, 211, 177, 43, 42,
+ 241, 135, 220, 32, 62, 211, 177, 219, 67, 54, 43, 42, 207, 152, 105, 43,
+ 42, 207, 152, 108, 43, 42, 207, 152, 147, 43, 42, 207, 152, 149, 43, 42,
+ 207, 152, 170, 43, 42, 207, 152, 195, 43, 42, 207, 152, 213, 111, 43, 42,
+ 207, 152, 199, 43, 42, 207, 152, 222, 63, 43, 42, 209, 53, 43, 42, 209,
+ 54, 105, 43, 42, 209, 54, 108, 43, 42, 209, 54, 147, 43, 42, 209, 54,
+ 149, 43, 42, 209, 54, 170, 43, 28, 229, 59, 43, 28, 222, 93, 43, 28, 208,
+ 240, 43, 28, 216, 47, 43, 28, 224, 141, 43, 28, 218, 153, 43, 28, 212,
+ 111, 43, 28, 231, 106, 43, 28, 246, 74, 43, 28, 246, 138, 43, 28, 229,
+ 120, 43, 28, 209, 66, 43, 28, 218, 190, 43, 28, 236, 251, 43, 28, 229,
+ 60, 63, 43, 28, 222, 94, 63, 43, 28, 208, 241, 63, 43, 28, 216, 48, 63,
+ 43, 28, 224, 142, 63, 43, 28, 218, 154, 63, 43, 28, 212, 112, 63, 43, 28,
+ 231, 107, 63, 43, 28, 246, 75, 63, 43, 28, 246, 139, 63, 43, 28, 229,
+ 121, 63, 43, 28, 209, 67, 63, 43, 28, 218, 191, 63, 43, 28, 236, 252, 63,
+ 43, 228, 253, 167, 246, 189, 43, 228, 253, 167, 230, 78, 43, 28, 231,
+ 107, 68, 228, 253, 211, 97, 97, 43, 189, 105, 43, 189, 108, 43, 189, 147,
+ 43, 189, 149, 43, 189, 170, 43, 189, 195, 43, 189, 213, 111, 43, 189,
+ 199, 43, 189, 222, 63, 43, 189, 209, 152, 43, 189, 224, 29, 43, 189, 239,
+ 249, 43, 189, 204, 80, 43, 189, 203, 243, 43, 189, 224, 220, 43, 189,
+ 241, 179, 43, 189, 210, 214, 43, 189, 211, 64, 43, 189, 237, 74, 43, 189,
+ 212, 9, 43, 189, 223, 84, 43, 189, 211, 213, 43, 189, 240, 4, 43, 189,
+ 245, 211, 43, 189, 228, 102, 43, 189, 214, 169, 43, 189, 225, 126, 43,
+ 189, 240, 42, 43, 189, 210, 226, 43, 189, 240, 216, 43, 189, 217, 233,
+ 43, 189, 250, 38, 43, 189, 230, 200, 43, 189, 216, 85, 43, 189, 245, 170,
+ 43, 189, 245, 160, 43, 189, 236, 244, 43, 189, 246, 217, 43, 189, 227, 0,
+ 43, 189, 227, 222, 43, 189, 216, 16, 43, 189, 225, 11, 43, 189, 216, 112,
+ 43, 189, 211, 14, 43, 189, 210, 196, 43, 189, 241, 65, 43, 189, 216, 87,
+ 43, 189, 251, 10, 43, 189, 222, 79, 43, 42, 209, 54, 195, 43, 42, 209,
+ 54, 213, 111, 43, 42, 209, 54, 199, 43, 42, 209, 54, 222, 63, 43, 42,
+ 239, 153, 43, 42, 239, 154, 105, 43, 42, 239, 154, 108, 43, 42, 239, 154,
+ 147, 43, 42, 239, 154, 149, 43, 42, 239, 154, 170, 43, 42, 239, 154, 195,
+ 43, 42, 239, 154, 213, 111, 43, 42, 239, 154, 199, 43, 42, 239, 154, 222,
+ 63, 43, 42, 240, 18, 139, 209, 164, 16, 35, 230, 171, 139, 209, 164, 16,
+ 35, 240, 54, 139, 209, 164, 16, 35, 225, 94, 139, 209, 164, 16, 35, 250,
+ 150, 139, 209, 164, 16, 35, 225, 63, 139, 209, 164, 16, 35, 230, 76, 139,
+ 209, 164, 16, 35, 230, 77, 139, 209, 164, 16, 35, 250, 30, 139, 209, 164,
+ 16, 35, 213, 129, 139, 209, 164, 16, 35, 220, 79, 139, 209, 164, 16, 35,
+ 221, 153, 139, 209, 164, 16, 35, 244, 70, 51, 237, 13, 51, 241, 24, 51,
+ 240, 226, 227, 120, 227, 147, 54, 43, 67, 63, 43, 67, 75, 43, 67, 68, 43,
+ 67, 74, 43, 67, 78, 43, 67, 173, 43, 67, 229, 100, 43, 67, 228, 209, 43,
+ 67, 229, 201, 43, 67, 229, 26, 43, 67, 215, 36, 43, 67, 212, 162, 43, 67,
+ 211, 10, 43, 67, 214, 177, 43, 67, 212, 13, 43, 67, 210, 22, 43, 67, 209,
+ 2, 43, 67, 207, 203, 43, 67, 209, 187, 43, 67, 135, 43, 67, 201, 201, 43,
+ 67, 222, 100, 43, 67, 221, 84, 43, 67, 222, 240, 43, 67, 221, 191, 43,
+ 67, 152, 43, 67, 237, 3, 43, 67, 236, 26, 43, 67, 237, 67, 43, 67, 236,
+ 136, 43, 67, 192, 43, 67, 224, 155, 43, 67, 223, 246, 43, 67, 225, 20,
+ 43, 67, 224, 82, 43, 67, 198, 43, 67, 202, 213, 43, 67, 202, 247, 43, 67,
+ 216, 220, 43, 67, 216, 57, 43, 67, 215, 145, 43, 67, 216, 158, 43, 67,
+ 215, 227, 43, 67, 204, 111, 43, 67, 204, 30, 43, 67, 204, 62, 43, 67,
+ 204, 0, 51, 250, 174, 51, 250, 83, 51, 250, 201, 51, 251, 239, 51, 231,
+ 18, 51, 230, 242, 51, 206, 227, 51, 240, 253, 51, 241, 158, 51, 220, 21,
+ 51, 220, 14, 51, 230, 16, 51, 229, 238, 51, 229, 235, 51, 238, 220, 51,
+ 238, 229, 51, 238, 70, 51, 238, 66, 51, 228, 132, 51, 238, 58, 51, 229,
+ 75, 51, 229, 74, 51, 229, 73, 51, 229, 72, 51, 237, 200, 51, 237, 199,
+ 51, 228, 180, 51, 228, 182, 51, 229, 194, 51, 228, 251, 51, 229, 3, 51,
+ 215, 17, 51, 214, 236, 51, 212, 92, 51, 213, 134, 51, 213, 133, 51, 244,
+ 209, 51, 244, 14, 51, 243, 86, 51, 208, 163, 51, 223, 79, 51, 221, 154,
+ 51, 237, 142, 51, 219, 163, 51, 219, 162, 51, 249, 29, 51, 218, 164, 51,
+ 218, 127, 51, 218, 128, 51, 248, 57, 51, 236, 24, 51, 236, 19, 51, 247,
+ 151, 51, 236, 4, 51, 237, 39, 51, 218, 220, 51, 219, 4, 51, 237, 22, 51,
+ 219, 0, 51, 219, 18, 51, 248, 145, 51, 218, 58, 51, 247, 253, 51, 236,
+ 120, 51, 218, 46, 51, 236, 111, 51, 236, 113, 51, 225, 138, 51, 225, 134,
+ 51, 225, 143, 51, 225, 83, 51, 225, 110, 51, 224, 121, 51, 224, 97, 51,
+ 224, 96, 51, 225, 0, 51, 224, 253, 51, 225, 1, 51, 203, 109, 51, 203,
+ 107, 51, 202, 202, 51, 215, 243, 51, 215, 247, 51, 215, 119, 51, 215,
+ 113, 51, 216, 109, 51, 216, 106, 51, 204, 78, 139, 209, 164, 16, 35, 236,
+ 43, 202, 84, 139, 209, 164, 16, 35, 236, 43, 105, 139, 209, 164, 16, 35,
+ 236, 43, 108, 139, 209, 164, 16, 35, 236, 43, 147, 139, 209, 164, 16, 35,
+ 236, 43, 149, 139, 209, 164, 16, 35, 236, 43, 170, 139, 209, 164, 16, 35,
+ 236, 43, 195, 139, 209, 164, 16, 35, 236, 43, 213, 111, 139, 209, 164,
+ 16, 35, 236, 43, 199, 139, 209, 164, 16, 35, 236, 43, 222, 63, 139, 209,
+ 164, 16, 35, 236, 43, 209, 152, 139, 209, 164, 16, 35, 236, 43, 241, 112,
+ 139, 209, 164, 16, 35, 236, 43, 207, 154, 139, 209, 164, 16, 35, 236, 43,
+ 209, 55, 139, 209, 164, 16, 35, 236, 43, 239, 141, 139, 209, 164, 16, 35,
+ 236, 43, 240, 22, 139, 209, 164, 16, 35, 236, 43, 212, 82, 139, 209, 164,
+ 16, 35, 236, 43, 213, 108, 139, 209, 164, 16, 35, 236, 43, 241, 140, 139,
+ 209, 164, 16, 35, 236, 43, 222, 60, 139, 209, 164, 16, 35, 236, 43, 207,
+ 151, 139, 209, 164, 16, 35, 236, 43, 207, 145, 139, 209, 164, 16, 35,
+ 236, 43, 207, 141, 139, 209, 164, 16, 35, 236, 43, 207, 142, 139, 209,
+ 164, 16, 35, 236, 43, 207, 147, 51, 236, 34, 51, 244, 212, 51, 250, 34,
+ 51, 142, 51, 219, 206, 51, 219, 39, 51, 243, 115, 51, 243, 116, 211, 176,
+ 51, 243, 116, 245, 105, 51, 230, 197, 51, 241, 27, 223, 85, 237, 40, 51,
+ 241, 27, 223, 85, 210, 92, 51, 241, 27, 223, 85, 209, 245, 51, 241, 27,
+ 223, 85, 224, 252, 51, 245, 162, 51, 219, 169, 250, 233, 51, 201, 201,
+ 51, 223, 247, 63, 51, 192, 51, 173, 51, 229, 204, 51, 225, 59, 51, 238,
+ 208, 51, 247, 76, 51, 229, 203, 51, 218, 211, 51, 222, 207, 51, 223, 247,
+ 240, 174, 51, 223, 247, 239, 75, 51, 224, 196, 51, 229, 146, 51, 235,
+ 215, 51, 229, 102, 51, 224, 157, 51, 238, 83, 51, 209, 4, 51, 223, 247,
+ 159, 51, 224, 90, 51, 243, 125, 51, 229, 41, 51, 239, 188, 51, 221, 229,
+ 51, 223, 247, 226, 185, 51, 224, 87, 51, 245, 255, 51, 229, 35, 51, 224,
+ 88, 211, 176, 51, 246, 0, 211, 176, 51, 226, 186, 211, 176, 51, 229, 36,
+ 211, 176, 51, 224, 88, 245, 105, 51, 246, 0, 245, 105, 51, 226, 186, 245,
+ 105, 51, 229, 36, 245, 105, 51, 226, 186, 115, 194, 51, 226, 186, 115,
+ 215, 94, 211, 176, 51, 185, 51, 228, 244, 51, 223, 250, 51, 238, 15, 51,
+ 216, 207, 51, 216, 208, 115, 194, 51, 216, 208, 115, 215, 94, 211, 176,
+ 51, 217, 204, 51, 221, 122, 51, 223, 247, 194, 51, 223, 248, 51, 217,
+ 154, 51, 221, 22, 51, 223, 247, 206, 164, 51, 223, 187, 51, 228, 170, 51,
+ 223, 188, 225, 0, 51, 217, 153, 51, 221, 21, 51, 223, 247, 204, 144, 51,
+ 223, 181, 51, 228, 168, 51, 223, 182, 225, 0, 51, 230, 55, 220, 58, 51,
+ 226, 186, 220, 58, 51, 250, 247, 51, 247, 229, 51, 247, 6, 51, 246, 239,
+ 51, 247, 126, 115, 229, 146, 51, 245, 254, 51, 244, 129, 51, 237, 184,
+ 51, 152, 51, 236, 35, 51, 231, 49, 51, 229, 48, 51, 229, 36, 247, 47, 51,
+ 228, 211, 51, 227, 52, 51, 227, 51, 51, 227, 38, 51, 226, 200, 51, 225,
+ 60, 212, 36, 51, 224, 120, 51, 224, 56, 51, 218, 209, 51, 218, 72, 51,
+ 218, 11, 51, 218, 9, 51, 211, 168, 51, 210, 177, 51, 204, 64, 51, 206,
+ 165, 115, 226, 185, 51, 34, 115, 226, 185, 139, 209, 164, 16, 35, 244,
+ 133, 105, 139, 209, 164, 16, 35, 244, 133, 108, 139, 209, 164, 16, 35,
+ 244, 133, 147, 139, 209, 164, 16, 35, 244, 133, 149, 139, 209, 164, 16,
+ 35, 244, 133, 170, 139, 209, 164, 16, 35, 244, 133, 195, 139, 209, 164,
+ 16, 35, 244, 133, 213, 111, 139, 209, 164, 16, 35, 244, 133, 199, 139,
+ 209, 164, 16, 35, 244, 133, 222, 63, 139, 209, 164, 16, 35, 244, 133,
+ 209, 152, 139, 209, 164, 16, 35, 244, 133, 241, 112, 139, 209, 164, 16,
+ 35, 244, 133, 207, 154, 139, 209, 164, 16, 35, 244, 133, 209, 55, 139,
+ 209, 164, 16, 35, 244, 133, 239, 141, 139, 209, 164, 16, 35, 244, 133,
+ 240, 22, 139, 209, 164, 16, 35, 244, 133, 212, 82, 139, 209, 164, 16, 35,
+ 244, 133, 213, 108, 139, 209, 164, 16, 35, 244, 133, 241, 140, 139, 209,
+ 164, 16, 35, 244, 133, 222, 60, 139, 209, 164, 16, 35, 244, 133, 207,
+ 151, 139, 209, 164, 16, 35, 244, 133, 207, 145, 139, 209, 164, 16, 35,
+ 244, 133, 207, 141, 139, 209, 164, 16, 35, 244, 133, 207, 142, 139, 209,
+ 164, 16, 35, 244, 133, 207, 147, 139, 209, 164, 16, 35, 244, 133, 207,
+ 148, 139, 209, 164, 16, 35, 244, 133, 207, 143, 139, 209, 164, 16, 35,
+ 244, 133, 207, 144, 139, 209, 164, 16, 35, 244, 133, 207, 150, 139, 209,
+ 164, 16, 35, 244, 133, 207, 146, 139, 209, 164, 16, 35, 244, 133, 209,
+ 53, 139, 209, 164, 16, 35, 244, 133, 209, 52, 51, 238, 246, 237, 16, 35,
+ 209, 93, 245, 142, 237, 51, 237, 16, 35, 209, 93, 216, 151, 241, 179,
+ 237, 16, 35, 243, 203, 250, 50, 209, 93, 248, 140, 237, 16, 35, 202, 226,
+ 239, 180, 237, 16, 35, 204, 103, 237, 16, 35, 245, 214, 237, 16, 35, 209,
+ 93, 250, 105, 237, 16, 35, 236, 127, 208, 169, 237, 16, 35, 5, 209, 231,
+ 237, 16, 35, 208, 97, 237, 16, 35, 219, 32, 237, 16, 35, 211, 96, 237,
+ 16, 35, 240, 44, 237, 16, 35, 237, 249, 218, 32, 237, 16, 35, 224, 75,
+ 237, 16, 35, 241, 64, 237, 16, 35, 239, 181, 237, 16, 35, 203, 236, 220,
+ 32, 209, 93, 244, 71, 237, 16, 35, 250, 154, 237, 16, 35, 245, 193, 237,
+ 16, 35, 248, 49, 209, 24, 237, 16, 35, 238, 13, 237, 16, 35, 211, 192,
+ 250, 173, 237, 16, 35, 216, 77, 237, 16, 35, 231, 12, 237, 16, 35, 237,
+ 249, 209, 231, 237, 16, 35, 224, 8, 245, 164, 237, 16, 35, 237, 249, 217,
+ 244, 237, 16, 35, 209, 93, 251, 143, 204, 80, 237, 16, 35, 209, 93, 246,
+ 24, 239, 249, 237, 16, 35, 231, 26, 237, 16, 35, 242, 20, 237, 16, 35,
+ 216, 80, 237, 16, 35, 237, 249, 218, 16, 237, 16, 35, 217, 221, 237, 16,
+ 35, 244, 149, 76, 209, 93, 227, 134, 237, 16, 35, 209, 93, 240, 82, 237,
+ 16, 35, 219, 250, 237, 16, 35, 220, 85, 237, 16, 35, 244, 42, 237, 16,
+ 35, 244, 63, 237, 16, 35, 231, 40, 237, 16, 35, 247, 217, 237, 16, 35,
+ 245, 235, 208, 173, 225, 3, 237, 16, 35, 238, 215, 208, 169, 237, 16, 35,
+ 217, 163, 206, 213, 237, 16, 35, 219, 249, 237, 16, 35, 209, 93, 204, 50,
+ 237, 16, 35, 216, 68, 237, 16, 35, 209, 93, 247, 12, 237, 16, 35, 209,
+ 93, 250, 101, 209, 18, 237, 16, 35, 209, 93, 229, 195, 211, 68, 224, 12,
+ 237, 16, 35, 244, 9, 237, 16, 35, 209, 93, 225, 85, 225, 139, 237, 16,
+ 35, 251, 144, 237, 16, 35, 209, 93, 204, 96, 237, 16, 35, 209, 93, 238,
+ 173, 204, 16, 237, 16, 35, 209, 93, 230, 84, 228, 33, 237, 16, 35, 243,
+ 153, 237, 16, 35, 227, 121, 237, 16, 35, 231, 15, 208, 24, 237, 16, 35,
+ 5, 217, 244, 237, 16, 35, 251, 82, 245, 226, 237, 16, 35, 248, 143, 245,
+ 226, 11, 4, 230, 201, 11, 4, 230, 193, 11, 4, 75, 11, 4, 230, 227, 11, 4,
+ 231, 108, 11, 4, 231, 91, 11, 4, 231, 110, 11, 4, 231, 109, 11, 4, 250,
+ 49, 11, 4, 250, 10, 11, 4, 63, 11, 4, 250, 175, 11, 4, 206, 225, 11, 4,
+ 206, 228, 11, 4, 206, 226, 11, 4, 219, 224, 11, 4, 219, 193, 11, 4, 78,
+ 11, 4, 220, 9, 11, 4, 240, 217, 11, 4, 74, 11, 4, 203, 217, 11, 4, 248,
+ 51, 11, 4, 248, 47, 11, 4, 248, 86, 11, 4, 248, 61, 11, 4, 248, 75, 11,
+ 4, 248, 74, 11, 4, 248, 77, 11, 4, 248, 76, 11, 4, 248, 209, 11, 4, 248,
+ 201, 11, 4, 249, 32, 11, 4, 248, 232, 11, 4, 247, 163, 11, 4, 247, 167,
+ 11, 4, 247, 164, 11, 4, 247, 252, 11, 4, 247, 233, 11, 4, 248, 23, 11, 4,
+ 248, 2, 11, 4, 248, 101, 11, 4, 248, 162, 11, 4, 248, 113, 11, 4, 247,
+ 147, 11, 4, 247, 143, 11, 4, 247, 193, 11, 4, 247, 162, 11, 4, 247, 155,
+ 11, 4, 247, 160, 11, 4, 247, 131, 11, 4, 247, 129, 11, 4, 247, 136, 11,
+ 4, 247, 134, 11, 4, 247, 132, 11, 4, 247, 133, 11, 4, 218, 105, 11, 4,
+ 218, 101, 11, 4, 218, 167, 11, 4, 218, 117, 11, 4, 218, 133, 11, 4, 218,
+ 160, 11, 4, 218, 156, 11, 4, 219, 55, 11, 4, 219, 44, 11, 4, 185, 11, 4,
+ 219, 96, 11, 4, 217, 173, 11, 4, 217, 175, 11, 4, 217, 174, 11, 4, 218,
+ 25, 11, 4, 218, 14, 11, 4, 218, 69, 11, 4, 218, 41, 11, 4, 217, 159, 11,
+ 4, 217, 155, 11, 4, 217, 191, 11, 4, 217, 172, 11, 4, 217, 164, 11, 4,
+ 217, 170, 11, 4, 217, 138, 11, 4, 217, 137, 11, 4, 217, 142, 11, 4, 217,
+ 141, 11, 4, 217, 139, 11, 4, 217, 140, 11, 4, 248, 183, 11, 4, 248, 182,
+ 11, 4, 248, 189, 11, 4, 248, 184, 11, 4, 248, 186, 11, 4, 248, 185, 11,
+ 4, 248, 188, 11, 4, 248, 187, 11, 4, 248, 195, 11, 4, 248, 194, 11, 4,
+ 248, 198, 11, 4, 248, 196, 11, 4, 248, 174, 11, 4, 248, 176, 11, 4, 248,
+ 175, 11, 4, 248, 179, 11, 4, 248, 178, 11, 4, 248, 181, 11, 4, 248, 180,
+ 11, 4, 248, 190, 11, 4, 248, 193, 11, 4, 248, 191, 11, 4, 248, 170, 11,
+ 4, 248, 169, 11, 4, 248, 177, 11, 4, 248, 173, 11, 4, 248, 171, 11, 4,
+ 248, 172, 11, 4, 248, 166, 11, 4, 248, 165, 11, 4, 248, 168, 11, 4, 248,
+ 167, 11, 4, 223, 47, 11, 4, 223, 46, 11, 4, 223, 52, 11, 4, 223, 48, 11,
+ 4, 223, 49, 11, 4, 223, 51, 11, 4, 223, 50, 11, 4, 223, 55, 11, 4, 223,
+ 54, 11, 4, 223, 57, 11, 4, 223, 56, 11, 4, 223, 43, 11, 4, 223, 42, 11,
+ 4, 223, 45, 11, 4, 223, 44, 11, 4, 223, 36, 11, 4, 223, 35, 11, 4, 223,
+ 40, 11, 4, 223, 39, 11, 4, 223, 37, 11, 4, 223, 38, 11, 4, 223, 30, 11,
+ 4, 223, 29, 11, 4, 223, 34, 11, 4, 223, 33, 11, 4, 223, 31, 11, 4, 223,
+ 32, 11, 4, 236, 180, 11, 4, 236, 179, 11, 4, 236, 185, 11, 4, 236, 181,
+ 11, 4, 236, 182, 11, 4, 236, 184, 11, 4, 236, 183, 11, 4, 236, 188, 11,
+ 4, 236, 187, 11, 4, 236, 190, 11, 4, 236, 189, 11, 4, 236, 171, 11, 4,
+ 236, 173, 11, 4, 236, 172, 11, 4, 236, 176, 11, 4, 236, 175, 11, 4, 236,
+ 178, 11, 4, 236, 177, 11, 4, 236, 167, 11, 4, 236, 166, 11, 4, 236, 174,
+ 11, 4, 236, 170, 11, 4, 236, 168, 11, 4, 236, 169, 11, 4, 236, 161, 11,
+ 4, 236, 165, 11, 4, 236, 164, 11, 4, 236, 162, 11, 4, 236, 163, 11, 4,
+ 224, 93, 11, 4, 224, 92, 11, 4, 224, 155, 11, 4, 224, 99, 11, 4, 224,
+ 127, 11, 4, 224, 145, 11, 4, 224, 143, 11, 4, 225, 71, 11, 4, 225, 66,
+ 11, 4, 192, 11, 4, 225, 106, 11, 4, 223, 213, 11, 4, 223, 212, 11, 4,
+ 223, 216, 11, 4, 223, 214, 11, 4, 224, 21, 11, 4, 223, 252, 11, 4, 224,
+ 82, 11, 4, 224, 27, 11, 4, 224, 207, 11, 4, 225, 20, 11, 4, 223, 193, 11,
+ 4, 223, 189, 11, 4, 223, 246, 11, 4, 223, 209, 11, 4, 223, 202, 11, 4,
+ 223, 207, 11, 4, 223, 166, 11, 4, 223, 165, 11, 4, 223, 171, 11, 4, 223,
+ 168, 11, 4, 239, 236, 11, 4, 239, 230, 11, 4, 240, 26, 11, 4, 239, 251,
+ 11, 4, 240, 73, 11, 4, 240, 64, 11, 4, 240, 108, 11, 4, 240, 78, 11, 4,
+ 239, 139, 11, 4, 239, 186, 11, 4, 239, 167, 11, 4, 239, 91, 11, 4, 239,
+ 90, 11, 4, 239, 108, 11, 4, 239, 96, 11, 4, 239, 94, 11, 4, 239, 95, 11,
+ 4, 239, 78, 11, 4, 239, 77, 11, 4, 239, 81, 11, 4, 239, 79, 11, 4, 205,
+ 196, 11, 4, 205, 191, 11, 4, 205, 230, 11, 4, 205, 205, 11, 4, 205, 219,
+ 11, 4, 205, 216, 11, 4, 205, 222, 11, 4, 205, 221, 11, 4, 206, 63, 11, 4,
+ 206, 58, 11, 4, 206, 86, 11, 4, 206, 75, 11, 4, 205, 172, 11, 4, 205,
+ 168, 11, 4, 205, 189, 11, 4, 205, 174, 11, 4, 205, 233, 11, 4, 206, 44,
+ 11, 4, 204, 157, 11, 4, 204, 155, 11, 4, 204, 163, 11, 4, 204, 160, 11,
+ 4, 204, 158, 11, 4, 204, 159, 11, 4, 204, 148, 11, 4, 204, 147, 11, 4,
+ 204, 152, 11, 4, 204, 151, 11, 4, 204, 149, 11, 4, 204, 150, 11, 4, 243,
+ 147, 11, 4, 243, 134, 11, 4, 243, 233, 11, 4, 243, 173, 11, 4, 243, 208,
+ 11, 4, 243, 213, 11, 4, 243, 212, 11, 4, 244, 140, 11, 4, 244, 134, 11,
+ 4, 244, 212, 11, 4, 244, 160, 11, 4, 242, 25, 11, 4, 242, 26, 11, 4, 243,
+ 85, 11, 4, 242, 67, 11, 4, 243, 113, 11, 4, 243, 87, 11, 4, 244, 7, 11,
+ 4, 244, 75, 11, 4, 244, 28, 11, 4, 242, 16, 11, 4, 242, 14, 11, 4, 242,
+ 42, 11, 4, 242, 24, 11, 4, 242, 19, 11, 4, 242, 22, 11, 4, 208, 200, 11,
+ 4, 208, 192, 11, 4, 209, 2, 11, 4, 208, 210, 11, 4, 208, 248, 11, 4, 208,
+ 250, 11, 4, 208, 249, 11, 4, 209, 212, 11, 4, 209, 198, 11, 4, 210, 22,
+ 11, 4, 209, 222, 11, 4, 207, 185, 11, 4, 207, 184, 11, 4, 207, 187, 11,
+ 4, 207, 186, 11, 4, 208, 131, 11, 4, 208, 121, 11, 4, 135, 11, 4, 208,
+ 144, 11, 4, 209, 114, 11, 4, 209, 187, 11, 4, 209, 139, 11, 4, 207, 168,
+ 11, 4, 207, 163, 11, 4, 207, 203, 11, 4, 207, 183, 11, 4, 207, 169, 11,
+ 4, 207, 181, 11, 4, 244, 92, 11, 4, 244, 91, 11, 4, 244, 97, 11, 4, 244,
+ 93, 11, 4, 244, 94, 11, 4, 244, 96, 11, 4, 244, 95, 11, 4, 244, 113, 11,
+ 4, 244, 112, 11, 4, 244, 120, 11, 4, 244, 114, 11, 4, 244, 82, 11, 4,
+ 244, 84, 11, 4, 244, 83, 11, 4, 244, 87, 11, 4, 244, 86, 11, 4, 244, 90,
+ 11, 4, 244, 88, 11, 4, 244, 105, 11, 4, 244, 108, 11, 4, 244, 106, 11, 4,
+ 244, 78, 11, 4, 244, 77, 11, 4, 244, 85, 11, 4, 244, 81, 11, 4, 244, 79,
+ 11, 4, 244, 80, 11, 4, 223, 3, 11, 4, 223, 2, 11, 4, 223, 10, 11, 4, 223,
+ 5, 11, 4, 223, 6, 11, 4, 223, 7, 11, 4, 223, 19, 11, 4, 223, 18, 11, 4,
+ 223, 25, 11, 4, 223, 20, 11, 4, 222, 251, 11, 4, 222, 250, 11, 4, 223, 1,
+ 11, 4, 222, 252, 11, 4, 223, 11, 11, 4, 223, 17, 11, 4, 223, 15, 11, 4,
+ 222, 243, 11, 4, 222, 242, 11, 4, 222, 248, 11, 4, 222, 246, 11, 4, 222,
+ 244, 11, 4, 222, 245, 11, 4, 236, 146, 11, 4, 236, 145, 11, 4, 236, 152,
+ 11, 4, 236, 147, 11, 4, 236, 149, 11, 4, 236, 148, 11, 4, 236, 151, 11,
+ 4, 236, 150, 11, 4, 236, 158, 11, 4, 236, 156, 11, 4, 236, 160, 11, 4,
+ 236, 159, 11, 4, 236, 139, 11, 4, 236, 140, 11, 4, 236, 143, 11, 4, 236,
+ 142, 11, 4, 236, 144, 11, 4, 236, 153, 11, 4, 236, 155, 11, 4, 236, 154,
+ 11, 4, 236, 138, 11, 4, 222, 52, 11, 4, 222, 50, 11, 4, 222, 100, 11, 4,
+ 222, 55, 11, 4, 222, 82, 11, 4, 222, 96, 11, 4, 222, 95, 11, 4, 223, 61,
+ 11, 4, 201, 201, 11, 4, 223, 76, 11, 4, 221, 32, 11, 4, 221, 34, 11, 4,
+ 221, 33, 11, 4, 221, 165, 11, 4, 221, 150, 11, 4, 221, 191, 11, 4, 221,
+ 176, 11, 4, 222, 209, 11, 4, 222, 240, 11, 4, 222, 225, 11, 4, 221, 27,
+ 11, 4, 221, 23, 11, 4, 221, 84, 11, 4, 221, 31, 11, 4, 221, 29, 11, 4,
+ 221, 30, 11, 4, 236, 211, 11, 4, 236, 210, 11, 4, 236, 216, 11, 4, 236,
+ 212, 11, 4, 236, 213, 11, 4, 236, 215, 11, 4, 236, 214, 11, 4, 236, 222,
+ 11, 4, 236, 220, 11, 4, 236, 224, 11, 4, 236, 223, 11, 4, 236, 203, 11,
+ 4, 236, 205, 11, 4, 236, 204, 11, 4, 236, 207, 11, 4, 236, 209, 11, 4,
+ 236, 208, 11, 4, 236, 217, 11, 4, 236, 219, 11, 4, 236, 218, 11, 4, 236,
+ 199, 11, 4, 236, 198, 11, 4, 236, 206, 11, 4, 236, 202, 11, 4, 236, 200,
+ 11, 4, 236, 201, 11, 4, 236, 193, 11, 4, 236, 192, 11, 4, 236, 197, 11,
+ 4, 236, 196, 11, 4, 236, 194, 11, 4, 236, 195, 11, 4, 227, 90, 11, 4,
+ 227, 82, 11, 4, 227, 148, 11, 4, 227, 100, 11, 4, 227, 139, 11, 4, 227,
+ 138, 11, 4, 227, 142, 11, 4, 227, 140, 11, 4, 228, 0, 11, 4, 227, 245,
+ 11, 4, 228, 113, 11, 4, 228, 11, 11, 4, 226, 217, 11, 4, 226, 216, 11, 4,
+ 226, 219, 11, 4, 226, 218, 11, 4, 227, 6, 11, 4, 226, 248, 11, 4, 227,
+ 49, 11, 4, 227, 11, 11, 4, 227, 165, 11, 4, 227, 234, 11, 4, 227, 182,
+ 11, 4, 226, 211, 11, 4, 226, 209, 11, 4, 226, 239, 11, 4, 226, 215, 11,
+ 4, 226, 213, 11, 4, 226, 214, 11, 4, 226, 190, 11, 4, 226, 189, 11, 4,
+ 226, 199, 11, 4, 226, 193, 11, 4, 226, 191, 11, 4, 226, 192, 11, 4, 238,
+ 54, 11, 4, 238, 53, 11, 4, 238, 81, 11, 4, 238, 65, 11, 4, 238, 73, 11,
+ 4, 238, 72, 11, 4, 238, 75, 11, 4, 238, 74, 11, 4, 238, 217, 11, 4, 238,
+ 212, 11, 4, 239, 8, 11, 4, 238, 227, 11, 4, 237, 205, 11, 4, 237, 204,
+ 11, 4, 237, 207, 11, 4, 237, 206, 11, 4, 238, 18, 11, 4, 238, 16, 11, 4,
+ 238, 39, 11, 4, 238, 26, 11, 4, 238, 159, 11, 4, 238, 157, 11, 4, 238,
+ 190, 11, 4, 238, 170, 11, 4, 237, 194, 11, 4, 237, 193, 11, 4, 237, 230,
+ 11, 4, 237, 203, 11, 4, 237, 195, 11, 4, 237, 202, 11, 4, 229, 64, 11, 4,
+ 229, 61, 11, 4, 229, 100, 11, 4, 229, 78, 11, 4, 229, 89, 11, 4, 229, 93,
+ 11, 4, 229, 91, 11, 4, 229, 226, 11, 4, 229, 209, 11, 4, 173, 11, 4, 229,
+ 253, 11, 4, 228, 187, 11, 4, 228, 192, 11, 4, 228, 189, 11, 4, 228, 250,
+ 11, 4, 228, 245, 11, 4, 229, 26, 11, 4, 229, 1, 11, 4, 229, 170, 11, 4,
+ 229, 153, 11, 4, 229, 201, 11, 4, 229, 174, 11, 4, 228, 175, 11, 4, 228,
+ 171, 11, 4, 228, 209, 11, 4, 228, 186, 11, 4, 228, 179, 11, 4, 228, 183,
+ 11, 4, 238, 141, 11, 4, 238, 140, 11, 4, 238, 145, 11, 4, 238, 142, 11,
+ 4, 238, 144, 11, 4, 238, 143, 11, 4, 238, 152, 11, 4, 238, 151, 11, 4,
+ 238, 155, 11, 4, 238, 153, 11, 4, 238, 132, 11, 4, 238, 131, 11, 4, 238,
+ 134, 11, 4, 238, 133, 11, 4, 238, 137, 11, 4, 238, 136, 11, 4, 238, 139,
+ 11, 4, 238, 138, 11, 4, 238, 147, 11, 4, 238, 146, 11, 4, 238, 150, 11,
+ 4, 238, 148, 11, 4, 238, 127, 11, 4, 238, 126, 11, 4, 238, 135, 11, 4,
+ 238, 130, 11, 4, 238, 128, 11, 4, 238, 129, 11, 4, 224, 174, 11, 4, 224,
+ 175, 11, 4, 224, 193, 11, 4, 224, 192, 11, 4, 224, 195, 11, 4, 224, 194,
+ 11, 4, 224, 165, 11, 4, 224, 167, 11, 4, 224, 166, 11, 4, 224, 170, 11,
+ 4, 224, 169, 11, 4, 224, 172, 11, 4, 224, 171, 11, 4, 224, 176, 11, 4,
+ 224, 178, 11, 4, 224, 177, 11, 4, 224, 161, 11, 4, 224, 160, 11, 4, 224,
+ 168, 11, 4, 224, 164, 11, 4, 224, 162, 11, 4, 224, 163, 11, 4, 235, 233,
+ 11, 4, 235, 232, 11, 4, 235, 239, 11, 4, 235, 234, 11, 4, 235, 236, 11,
+ 4, 235, 235, 11, 4, 235, 238, 11, 4, 235, 237, 11, 4, 235, 244, 11, 4,
+ 235, 243, 11, 4, 235, 246, 11, 4, 235, 245, 11, 4, 235, 225, 11, 4, 235,
+ 224, 11, 4, 235, 227, 11, 4, 235, 226, 11, 4, 235, 229, 11, 4, 235, 228,
+ 11, 4, 235, 231, 11, 4, 235, 230, 11, 4, 235, 240, 11, 4, 235, 242, 11,
+ 4, 235, 241, 11, 4, 222, 148, 11, 4, 222, 150, 11, 4, 222, 149, 11, 4,
+ 222, 193, 11, 4, 222, 191, 11, 4, 222, 203, 11, 4, 222, 196, 11, 4, 222,
+ 110, 11, 4, 222, 109, 11, 4, 222, 111, 11, 4, 222, 120, 11, 4, 222, 117,
+ 11, 4, 222, 128, 11, 4, 222, 122, 11, 4, 222, 184, 11, 4, 222, 190, 11,
+ 4, 222, 186, 11, 4, 236, 230, 11, 4, 236, 245, 11, 4, 236, 254, 11, 4,
+ 237, 83, 11, 4, 237, 72, 11, 4, 152, 11, 4, 237, 94, 11, 4, 236, 6, 11,
+ 4, 236, 5, 11, 4, 236, 8, 11, 4, 236, 7, 11, 4, 236, 46, 11, 4, 236, 37,
+ 11, 4, 236, 136, 11, 4, 236, 109, 11, 4, 237, 18, 11, 4, 237, 67, 11, 4,
+ 237, 30, 11, 4, 204, 83, 11, 4, 204, 68, 11, 4, 204, 111, 11, 4, 204, 93,
+ 11, 4, 203, 206, 11, 4, 203, 208, 11, 4, 203, 207, 11, 4, 203, 229, 11,
+ 4, 204, 0, 11, 4, 203, 239, 11, 4, 204, 42, 11, 4, 204, 62, 11, 4, 204,
+ 47, 11, 4, 202, 24, 11, 4, 202, 23, 11, 4, 202, 39, 11, 4, 202, 27, 11,
+ 4, 202, 32, 11, 4, 202, 34, 11, 4, 202, 33, 11, 4, 202, 100, 11, 4, 202,
+ 97, 11, 4, 202, 116, 11, 4, 202, 104, 11, 4, 201, 255, 11, 4, 202, 1, 11,
+ 4, 202, 0, 11, 4, 202, 13, 11, 4, 202, 12, 11, 4, 202, 17, 11, 4, 202,
+ 14, 11, 4, 202, 82, 11, 4, 202, 92, 11, 4, 202, 86, 11, 4, 201, 251, 11,
+ 4, 201, 250, 11, 4, 202, 6, 11, 4, 201, 254, 11, 4, 201, 252, 11, 4, 201,
+ 253, 11, 4, 201, 237, 11, 4, 201, 236, 11, 4, 201, 242, 11, 4, 201, 240,
+ 11, 4, 201, 238, 11, 4, 201, 239, 11, 4, 246, 50, 11, 4, 246, 43, 11, 4,
+ 246, 79, 11, 4, 246, 63, 11, 4, 246, 76, 11, 4, 246, 70, 11, 4, 246, 78,
+ 11, 4, 246, 77, 11, 4, 247, 17, 11, 4, 247, 9, 11, 4, 247, 92, 11, 4,
+ 247, 48, 11, 4, 245, 101, 11, 4, 245, 103, 11, 4, 245, 102, 11, 4, 245,
+ 158, 11, 4, 245, 148, 11, 4, 245, 254, 11, 4, 245, 175, 11, 4, 246, 202,
+ 11, 4, 246, 238, 11, 4, 246, 207, 11, 4, 245, 77, 11, 4, 245, 75, 11, 4,
+ 245, 110, 11, 4, 245, 99, 11, 4, 245, 83, 11, 4, 245, 96, 11, 4, 245, 54,
+ 11, 4, 245, 53, 11, 4, 245, 66, 11, 4, 245, 60, 11, 4, 245, 55, 11, 4,
+ 245, 57, 11, 4, 201, 220, 11, 4, 201, 219, 11, 4, 201, 226, 11, 4, 201,
+ 221, 11, 4, 201, 223, 11, 4, 201, 222, 11, 4, 201, 225, 11, 4, 201, 224,
+ 11, 4, 201, 232, 11, 4, 201, 231, 11, 4, 201, 235, 11, 4, 201, 233, 11,
+ 4, 201, 216, 11, 4, 201, 218, 11, 4, 201, 217, 11, 4, 201, 227, 11, 4,
+ 201, 230, 11, 4, 201, 228, 11, 4, 201, 209, 11, 4, 201, 213, 11, 4, 201,
+ 212, 11, 4, 201, 210, 11, 4, 201, 211, 11, 4, 201, 203, 11, 4, 201, 202,
+ 11, 4, 201, 208, 11, 4, 201, 206, 11, 4, 201, 204, 11, 4, 201, 205, 11,
+ 4, 220, 201, 11, 4, 220, 200, 11, 4, 220, 206, 11, 4, 220, 202, 11, 4,
+ 220, 203, 11, 4, 220, 205, 11, 4, 220, 204, 11, 4, 220, 211, 11, 4, 220,
+ 210, 11, 4, 220, 214, 11, 4, 220, 213, 11, 4, 220, 194, 11, 4, 220, 195,
+ 11, 4, 220, 198, 11, 4, 220, 199, 11, 4, 220, 207, 11, 4, 220, 209, 11,
+ 4, 220, 189, 11, 4, 220, 197, 11, 4, 220, 193, 11, 4, 220, 190, 11, 4,
+ 220, 191, 11, 4, 220, 184, 11, 4, 220, 183, 11, 4, 220, 188, 11, 4, 220,
+ 187, 11, 4, 220, 185, 11, 4, 220, 186, 11, 4, 212, 90, 11, 4, 195, 11, 4,
+ 212, 162, 11, 4, 212, 93, 11, 4, 212, 150, 11, 4, 212, 153, 11, 4, 212,
+ 151, 11, 4, 214, 225, 11, 4, 214, 211, 11, 4, 215, 36, 11, 4, 214, 233,
+ 11, 4, 210, 204, 11, 4, 210, 206, 11, 4, 210, 205, 11, 4, 211, 244, 11,
+ 4, 211, 233, 11, 4, 212, 13, 11, 4, 211, 248, 11, 4, 213, 103, 11, 4,
+ 214, 177, 11, 4, 213, 132, 11, 4, 210, 181, 11, 4, 210, 178, 11, 4, 211,
+ 10, 11, 4, 210, 203, 11, 4, 210, 185, 11, 4, 210, 193, 11, 4, 210, 83,
+ 11, 4, 210, 82, 11, 4, 210, 151, 11, 4, 210, 91, 11, 4, 210, 85, 11, 4,
+ 210, 90, 11, 4, 211, 126, 11, 4, 211, 125, 11, 4, 211, 132, 11, 4, 211,
+ 127, 11, 4, 211, 129, 11, 4, 211, 131, 11, 4, 211, 130, 11, 4, 211, 141,
+ 11, 4, 211, 139, 11, 4, 211, 164, 11, 4, 211, 142, 11, 4, 211, 121, 11,
+ 4, 211, 120, 11, 4, 211, 124, 11, 4, 211, 122, 11, 4, 211, 135, 11, 4,
+ 211, 138, 11, 4, 211, 136, 11, 4, 211, 117, 11, 4, 211, 115, 11, 4, 211,
+ 119, 11, 4, 211, 118, 11, 4, 211, 110, 11, 4, 211, 109, 11, 4, 211, 114,
+ 11, 4, 211, 113, 11, 4, 211, 111, 11, 4, 211, 112, 11, 4, 202, 75, 11, 4,
+ 202, 74, 11, 4, 202, 80, 11, 4, 202, 77, 11, 4, 202, 54, 11, 4, 202, 56,
+ 11, 4, 202, 55, 11, 4, 202, 59, 11, 4, 202, 58, 11, 4, 202, 63, 11, 4,
+ 202, 60, 11, 4, 202, 68, 11, 4, 202, 67, 11, 4, 202, 71, 11, 4, 202, 69,
+ 11, 4, 202, 50, 11, 4, 202, 49, 11, 4, 202, 57, 11, 4, 202, 53, 11, 4,
+ 202, 51, 11, 4, 202, 52, 11, 4, 202, 42, 11, 4, 202, 41, 11, 4, 202, 46,
+ 11, 4, 202, 45, 11, 4, 202, 43, 11, 4, 202, 44, 11, 4, 246, 176, 11, 4,
+ 246, 172, 11, 4, 246, 199, 11, 4, 246, 185, 11, 4, 246, 94, 11, 4, 246,
+ 93, 11, 4, 246, 96, 11, 4, 246, 95, 11, 4, 246, 109, 11, 4, 246, 108, 11,
+ 4, 246, 116, 11, 4, 246, 111, 11, 4, 246, 147, 11, 4, 246, 145, 11, 4,
+ 246, 170, 11, 4, 246, 155, 11, 4, 246, 88, 11, 4, 246, 98, 11, 4, 246,
+ 92, 11, 4, 246, 89, 11, 4, 246, 91, 11, 4, 246, 81, 11, 4, 246, 80, 11,
+ 4, 246, 85, 11, 4, 246, 84, 11, 4, 246, 82, 11, 4, 246, 83, 11, 4, 215,
+ 181, 11, 4, 215, 185, 11, 4, 215, 163, 11, 4, 215, 164, 11, 4, 215, 168,
+ 11, 4, 215, 167, 11, 4, 215, 171, 11, 4, 215, 169, 11, 4, 215, 175, 11,
+ 4, 215, 174, 11, 4, 215, 180, 11, 4, 215, 176, 11, 4, 215, 159, 11, 4,
+ 215, 157, 11, 4, 215, 165, 11, 4, 215, 162, 11, 4, 215, 160, 11, 4, 215,
+ 161, 11, 4, 215, 152, 11, 4, 215, 151, 11, 4, 215, 156, 11, 4, 215, 155,
+ 11, 4, 215, 153, 11, 4, 215, 154, 11, 4, 221, 145, 11, 4, 221, 144, 11,
+ 4, 221, 147, 11, 4, 221, 146, 11, 4, 221, 136, 11, 4, 221, 138, 11, 4,
+ 221, 137, 11, 4, 221, 140, 11, 4, 221, 139, 11, 4, 221, 143, 11, 4, 221,
+ 142, 11, 4, 221, 130, 11, 4, 221, 129, 11, 4, 221, 135, 11, 4, 221, 133,
+ 11, 4, 221, 131, 11, 4, 221, 132, 11, 4, 221, 124, 11, 4, 221, 123, 11,
+ 4, 221, 128, 11, 4, 221, 127, 11, 4, 221, 125, 11, 4, 221, 126, 11, 4,
+ 213, 53, 11, 4, 213, 48, 11, 4, 213, 90, 11, 4, 213, 64, 11, 4, 212, 188,
+ 11, 4, 212, 190, 11, 4, 212, 189, 11, 4, 212, 212, 11, 4, 212, 208, 11,
+ 4, 212, 242, 11, 4, 212, 232, 11, 4, 213, 21, 11, 4, 213, 14, 11, 4, 213,
+ 43, 11, 4, 213, 30, 11, 4, 212, 184, 11, 4, 212, 181, 11, 4, 212, 199,
+ 11, 4, 212, 187, 11, 4, 212, 185, 11, 4, 212, 186, 11, 4, 212, 165, 11,
+ 4, 212, 164, 11, 4, 212, 171, 11, 4, 212, 168, 11, 4, 212, 166, 11, 4,
+ 212, 167, 11, 4, 216, 172, 11, 4, 216, 166, 11, 4, 216, 220, 11, 4, 216,
+ 178, 11, 4, 215, 122, 11, 4, 215, 124, 11, 4, 215, 123, 11, 4, 215, 199,
+ 11, 4, 215, 187, 11, 4, 215, 227, 11, 4, 215, 203, 11, 4, 216, 66, 11, 4,
+ 216, 158, 11, 4, 216, 105, 11, 4, 215, 115, 11, 4, 215, 112, 11, 4, 215,
+ 145, 11, 4, 215, 121, 11, 4, 215, 117, 11, 4, 215, 118, 11, 4, 215, 97,
+ 11, 4, 215, 96, 11, 4, 215, 102, 11, 4, 215, 100, 11, 4, 215, 98, 11, 4,
+ 215, 99, 11, 4, 230, 131, 11, 4, 230, 130, 11, 4, 230, 141, 11, 4, 230,
+ 132, 11, 4, 230, 137, 11, 4, 230, 136, 11, 4, 230, 139, 11, 4, 230, 138,
+ 11, 4, 230, 72, 11, 4, 230, 71, 11, 4, 230, 74, 11, 4, 230, 73, 11, 4,
+ 230, 88, 11, 4, 230, 86, 11, 4, 230, 101, 11, 4, 230, 90, 11, 4, 230, 65,
+ 11, 4, 230, 63, 11, 4, 230, 82, 11, 4, 230, 70, 11, 4, 230, 67, 11, 4,
+ 230, 68, 11, 4, 230, 57, 11, 4, 230, 56, 11, 4, 230, 61, 11, 4, 230, 60,
+ 11, 4, 230, 58, 11, 4, 230, 59, 11, 4, 217, 81, 11, 4, 217, 79, 11, 4,
+ 217, 88, 11, 4, 217, 82, 11, 4, 217, 85, 11, 4, 217, 84, 11, 4, 217, 87,
+ 11, 4, 217, 86, 11, 4, 217, 32, 11, 4, 217, 29, 11, 4, 217, 34, 11, 4,
+ 217, 33, 11, 4, 217, 68, 11, 4, 217, 67, 11, 4, 217, 77, 11, 4, 217, 71,
+ 11, 4, 217, 24, 11, 4, 217, 20, 11, 4, 217, 65, 11, 4, 217, 28, 11, 4,
+ 217, 26, 11, 4, 217, 27, 11, 4, 217, 4, 11, 4, 217, 2, 11, 4, 217, 14,
+ 11, 4, 217, 7, 11, 4, 217, 5, 11, 4, 217, 6, 11, 4, 230, 120, 11, 4, 230,
+ 119, 11, 4, 230, 126, 11, 4, 230, 121, 11, 4, 230, 123, 11, 4, 230, 122,
+ 11, 4, 230, 125, 11, 4, 230, 124, 11, 4, 230, 111, 11, 4, 230, 113, 11,
+ 4, 230, 112, 11, 4, 230, 116, 11, 4, 230, 115, 11, 4, 230, 118, 11, 4,
+ 230, 117, 11, 4, 230, 107, 11, 4, 230, 106, 11, 4, 230, 114, 11, 4, 230,
+ 110, 11, 4, 230, 108, 11, 4, 230, 109, 11, 4, 230, 103, 11, 4, 230, 102,
+ 11, 4, 230, 105, 11, 4, 230, 104, 11, 4, 222, 25, 11, 4, 222, 24, 11, 4,
+ 222, 32, 11, 4, 222, 26, 11, 4, 222, 28, 11, 4, 222, 27, 11, 4, 222, 31,
+ 11, 4, 222, 29, 11, 4, 222, 14, 11, 4, 222, 15, 11, 4, 222, 20, 11, 4,
+ 222, 19, 11, 4, 222, 23, 11, 4, 222, 21, 11, 4, 222, 9, 11, 4, 222, 18,
+ 11, 4, 222, 13, 11, 4, 222, 10, 11, 4, 222, 11, 11, 4, 222, 4, 11, 4,
+ 222, 3, 11, 4, 222, 8, 11, 4, 222, 7, 11, 4, 222, 5, 11, 4, 222, 6, 11,
+ 4, 220, 236, 11, 4, 220, 235, 11, 4, 220, 248, 11, 4, 220, 240, 11, 4,
+ 220, 245, 11, 4, 220, 244, 11, 4, 220, 247, 11, 4, 220, 246, 11, 4, 220,
+ 221, 11, 4, 220, 223, 11, 4, 220, 222, 11, 4, 220, 228, 11, 4, 220, 227,
+ 11, 4, 220, 233, 11, 4, 220, 229, 11, 4, 220, 219, 11, 4, 220, 217, 11,
+ 4, 220, 226, 11, 4, 220, 220, 11, 4, 203, 162, 11, 4, 203, 161, 11, 4,
+ 203, 170, 11, 4, 203, 164, 11, 4, 203, 166, 11, 4, 203, 165, 11, 4, 203,
+ 168, 11, 4, 203, 167, 11, 4, 203, 150, 11, 4, 203, 151, 11, 4, 203, 155,
+ 11, 4, 203, 154, 11, 4, 203, 160, 11, 4, 203, 158, 11, 4, 203, 128, 11,
+ 4, 203, 126, 11, 4, 203, 141, 11, 4, 203, 131, 11, 4, 203, 129, 11, 4,
+ 203, 130, 11, 4, 202, 253, 11, 4, 202, 251, 11, 4, 203, 11, 11, 4, 202,
+ 254, 11, 4, 203, 5, 11, 4, 203, 4, 11, 4, 203, 8, 11, 4, 203, 6, 11, 4,
+ 202, 191, 11, 4, 202, 190, 11, 4, 202, 194, 11, 4, 202, 192, 11, 4, 202,
+ 227, 11, 4, 202, 223, 11, 4, 202, 247, 11, 4, 202, 231, 11, 4, 202, 182,
+ 11, 4, 202, 178, 11, 4, 202, 213, 11, 4, 202, 189, 11, 4, 202, 185, 11,
+ 4, 202, 186, 11, 4, 202, 162, 11, 4, 202, 161, 11, 4, 202, 169, 11, 4,
+ 202, 165, 11, 4, 202, 163, 11, 4, 202, 164, 11, 40, 217, 68, 11, 40, 227,
+ 148, 11, 40, 229, 64, 11, 40, 220, 240, 11, 40, 245, 60, 11, 40, 211,
+ 132, 11, 40, 238, 138, 11, 40, 238, 170, 11, 40, 224, 155, 11, 40, 235,
+ 233, 11, 40, 226, 192, 11, 40, 248, 170, 11, 40, 224, 27, 11, 40, 202,
+ 247, 11, 40, 217, 159, 11, 40, 235, 227, 11, 40, 209, 212, 11, 40, 239,
+ 8, 11, 40, 201, 254, 11, 40, 245, 54, 11, 40, 244, 80, 11, 40, 247, 160,
+ 11, 40, 238, 134, 11, 40, 220, 229, 11, 40, 207, 203, 11, 40, 220, 9, 11,
+ 40, 230, 107, 11, 40, 202, 13, 11, 40, 217, 138, 11, 40, 236, 178, 11,
+ 40, 202, 253, 11, 40, 204, 159, 11, 40, 212, 171, 11, 40, 206, 44, 11,
+ 40, 202, 116, 11, 40, 230, 101, 11, 40, 220, 193, 11, 40, 230, 105, 11,
+ 40, 238, 18, 11, 40, 230, 125, 11, 40, 204, 0, 11, 40, 242, 42, 11, 40,
+ 212, 186, 11, 40, 227, 142, 11, 40, 245, 66, 11, 40, 245, 102, 11, 40,
+ 246, 63, 11, 40, 235, 230, 11, 40, 213, 53, 11, 40, 201, 253, 11, 40,
+ 212, 232, 11, 40, 246, 170, 11, 40, 201, 223, 11, 40, 223, 51, 11, 40,
+ 229, 201, 227, 91, 1, 249, 32, 227, 91, 1, 185, 227, 91, 1, 218, 208,
+ 227, 91, 1, 244, 212, 227, 91, 1, 210, 22, 227, 91, 1, 209, 108, 227, 91,
+ 1, 239, 8, 227, 91, 1, 173, 227, 91, 1, 229, 144, 227, 91, 1, 230, 181,
+ 227, 91, 1, 247, 92, 227, 91, 1, 246, 199, 227, 91, 1, 241, 255, 227, 91,
+ 1, 208, 20, 227, 91, 1, 208, 10, 227, 91, 1, 192, 227, 91, 1, 201, 201,
+ 227, 91, 1, 228, 113, 227, 91, 1, 215, 36, 227, 91, 1, 202, 80, 227, 91,
+ 1, 202, 116, 227, 91, 1, 222, 203, 227, 91, 1, 152, 227, 91, 1, 203, 182,
+ 227, 91, 1, 237, 12, 227, 91, 1, 240, 108, 227, 91, 1, 204, 111, 227, 91,
+ 1, 213, 90, 227, 91, 1, 198, 227, 91, 1, 238, 119, 227, 91, 1, 63, 227,
+ 91, 1, 251, 109, 227, 91, 1, 74, 227, 91, 1, 240, 238, 227, 91, 1, 75,
+ 227, 91, 1, 78, 227, 91, 1, 68, 227, 91, 1, 207, 24, 227, 91, 1, 207, 18,
+ 227, 91, 1, 220, 73, 227, 91, 1, 143, 223, 170, 209, 2, 227, 91, 1, 143,
+ 223, 111, 218, 69, 227, 91, 1, 143, 223, 170, 245, 65, 227, 91, 1, 143,
+ 223, 170, 248, 23, 227, 91, 1, 143, 223, 170, 201, 201, 227, 91, 1, 143,
+ 223, 170, 230, 150, 227, 91, 217, 179, 245, 233, 227, 91, 217, 179, 239,
+ 102, 211, 61, 48, 4, 241, 161, 48, 4, 241, 157, 48, 4, 237, 48, 48, 4,
+ 204, 55, 48, 4, 204, 54, 48, 4, 219, 23, 48, 4, 248, 93, 48, 4, 248, 150,
+ 48, 4, 225, 46, 48, 4, 228, 239, 48, 4, 224, 187, 48, 4, 238, 203, 48, 4,
+ 240, 53, 48, 4, 206, 50, 48, 4, 209, 176, 48, 4, 209, 90, 48, 4, 243,
+ 247, 48, 4, 243, 244, 48, 4, 227, 226, 48, 4, 216, 135, 48, 4, 244, 61,
+ 48, 4, 223, 16, 48, 4, 214, 165, 48, 4, 213, 41, 48, 4, 202, 90, 48, 4,
+ 202, 70, 48, 4, 246, 230, 48, 4, 230, 159, 48, 4, 222, 39, 48, 4, 203,
+ 49, 48, 4, 229, 198, 48, 4, 222, 176, 48, 4, 238, 182, 48, 4, 225, 8, 48,
+ 4, 222, 235, 48, 4, 221, 0, 48, 4, 75, 48, 4, 231, 49, 48, 4, 237, 3, 48,
+ 4, 236, 238, 48, 4, 204, 30, 48, 4, 204, 18, 48, 4, 218, 167, 48, 4, 248,
+ 91, 48, 4, 248, 86, 48, 4, 225, 39, 48, 4, 228, 236, 48, 4, 224, 184, 48,
+ 4, 238, 199, 48, 4, 240, 26, 48, 4, 205, 230, 48, 4, 209, 2, 48, 4, 209,
+ 70, 48, 4, 243, 239, 48, 4, 243, 243, 48, 4, 227, 148, 48, 4, 216, 57,
+ 48, 4, 243, 233, 48, 4, 223, 10, 48, 4, 212, 162, 48, 4, 213, 11, 48, 4,
+ 202, 39, 48, 4, 202, 66, 48, 4, 246, 79, 48, 4, 230, 141, 48, 4, 222, 32,
+ 48, 4, 203, 11, 48, 4, 229, 100, 48, 4, 222, 168, 48, 4, 238, 81, 48, 4,
+ 224, 155, 48, 4, 222, 100, 48, 4, 220, 248, 48, 4, 63, 48, 4, 250, 231,
+ 48, 4, 222, 198, 48, 4, 152, 48, 4, 237, 126, 48, 4, 204, 111, 48, 4,
+ 204, 97, 48, 4, 185, 48, 4, 248, 98, 48, 4, 249, 32, 48, 4, 225, 54, 48,
+ 4, 228, 244, 48, 4, 228, 242, 48, 4, 224, 191, 48, 4, 238, 207, 48, 4,
+ 240, 108, 48, 4, 206, 86, 48, 4, 210, 22, 48, 4, 209, 108, 48, 4, 244, 1,
+ 48, 4, 243, 246, 48, 4, 228, 113, 48, 4, 216, 220, 48, 4, 244, 212, 48,
+ 4, 223, 25, 48, 4, 215, 36, 48, 4, 213, 90, 48, 4, 202, 116, 48, 4, 202,
+ 80, 48, 4, 247, 92, 48, 4, 230, 181, 48, 4, 222, 48, 48, 4, 198, 48, 4,
+ 173, 48, 4, 230, 4, 48, 4, 222, 182, 48, 4, 239, 8, 48, 4, 192, 48, 4,
+ 201, 201, 48, 4, 221, 11, 48, 4, 220, 18, 48, 4, 220, 13, 48, 4, 236,
+ 117, 48, 4, 203, 244, 48, 4, 203, 240, 48, 4, 218, 45, 48, 4, 248, 89,
+ 48, 4, 248, 10, 48, 4, 225, 34, 48, 4, 228, 234, 48, 4, 224, 180, 48, 4,
+ 238, 195, 48, 4, 239, 175, 48, 4, 205, 176, 48, 4, 208, 148, 48, 4, 209,
+ 42, 48, 4, 243, 236, 48, 4, 243, 241, 48, 4, 227, 18, 48, 4, 215, 208,
+ 48, 4, 243, 90, 48, 4, 222, 253, 48, 4, 211, 250, 48, 4, 212, 236, 48, 4,
+ 202, 15, 48, 4, 202, 61, 48, 4, 245, 180, 48, 4, 230, 91, 48, 4, 222, 22,
+ 48, 4, 202, 232, 48, 4, 229, 6, 48, 4, 222, 166, 48, 4, 238, 28, 48, 4,
+ 224, 35, 48, 4, 221, 180, 48, 4, 220, 230, 48, 4, 68, 48, 4, 206, 255,
+ 48, 4, 236, 26, 48, 4, 236, 13, 48, 4, 203, 217, 48, 4, 203, 210, 48, 4,
+ 217, 191, 48, 4, 248, 88, 48, 4, 247, 193, 48, 4, 225, 33, 48, 4, 228,
+ 232, 48, 4, 224, 179, 48, 4, 238, 194, 48, 4, 239, 108, 48, 4, 204, 163,
+ 48, 4, 207, 203, 48, 4, 209, 22, 48, 4, 243, 234, 48, 4, 243, 240, 48, 4,
+ 226, 239, 48, 4, 215, 145, 48, 4, 242, 42, 48, 4, 222, 248, 48, 4, 211,
+ 10, 48, 4, 212, 199, 48, 4, 202, 6, 48, 4, 202, 57, 48, 4, 245, 110, 48,
+ 4, 230, 82, 48, 4, 222, 18, 48, 4, 202, 213, 48, 4, 228, 209, 48, 4, 222,
+ 165, 48, 4, 237, 230, 48, 4, 223, 246, 48, 4, 221, 84, 48, 4, 220, 226,
+ 48, 4, 78, 48, 4, 220, 31, 48, 4, 222, 124, 48, 4, 236, 136, 48, 4, 236,
+ 120, 48, 4, 204, 0, 48, 4, 203, 245, 48, 4, 218, 69, 48, 4, 248, 90, 48,
+ 4, 248, 23, 48, 4, 225, 35, 48, 4, 228, 235, 48, 4, 224, 182, 48, 4, 238,
+ 197, 48, 4, 238, 196, 48, 4, 239, 186, 48, 4, 205, 189, 48, 4, 135, 48,
+ 4, 209, 47, 48, 4, 243, 237, 48, 4, 243, 242, 48, 4, 227, 49, 48, 4, 215,
+ 227, 48, 4, 243, 113, 48, 4, 223, 1, 48, 4, 212, 13, 48, 4, 212, 242, 48,
+ 4, 202, 17, 48, 4, 202, 63, 48, 4, 245, 254, 48, 4, 230, 101, 48, 4, 222,
+ 23, 48, 4, 202, 247, 48, 4, 229, 26, 48, 4, 222, 167, 48, 4, 238, 39, 48,
+ 4, 224, 82, 48, 4, 221, 191, 48, 4, 220, 233, 48, 4, 74, 48, 4, 241, 92,
+ 48, 4, 222, 187, 48, 4, 237, 67, 48, 4, 237, 33, 48, 4, 204, 62, 48, 4,
+ 204, 49, 48, 4, 219, 34, 48, 4, 248, 94, 48, 4, 248, 162, 48, 4, 225, 47,
+ 48, 4, 228, 240, 48, 4, 228, 238, 48, 4, 224, 188, 48, 4, 238, 204, 48,
+ 4, 238, 202, 48, 4, 240, 60, 48, 4, 206, 55, 48, 4, 209, 187, 48, 4, 209,
+ 92, 48, 4, 243, 248, 48, 4, 243, 245, 48, 4, 227, 234, 48, 4, 216, 158,
+ 48, 4, 244, 75, 48, 4, 223, 17, 48, 4, 214, 177, 48, 4, 213, 43, 48, 4,
+ 202, 92, 48, 4, 202, 71, 48, 4, 246, 238, 48, 4, 230, 161, 48, 4, 222,
+ 41, 48, 4, 203, 52, 48, 4, 229, 201, 48, 4, 222, 177, 48, 4, 222, 173,
+ 48, 4, 238, 190, 48, 4, 238, 177, 48, 4, 225, 20, 48, 4, 222, 240, 48, 4,
+ 221, 1, 48, 4, 222, 205, 48, 4, 227, 188, 48, 245, 233, 48, 239, 102,
+ 211, 61, 48, 217, 47, 82, 48, 4, 223, 0, 240, 108, 48, 4, 223, 0, 173,
+ 48, 4, 223, 0, 211, 250, 48, 16, 240, 49, 48, 16, 229, 196, 48, 16, 208,
+ 215, 48, 16, 222, 75, 48, 16, 248, 237, 48, 16, 240, 107, 48, 16, 210,
+ 18, 48, 16, 244, 164, 48, 16, 243, 89, 48, 16, 228, 193, 48, 16, 208,
+ 152, 48, 16, 243, 112, 48, 16, 230, 92, 48, 17, 202, 84, 48, 17, 105, 48,
+ 17, 108, 48, 17, 147, 48, 17, 149, 48, 17, 170, 48, 17, 195, 48, 17, 213,
+ 111, 48, 17, 199, 48, 17, 222, 63, 48, 4, 223, 0, 192, 48, 4, 223, 0,
+ 243, 113, 36, 6, 1, 202, 88, 36, 5, 1, 202, 88, 36, 6, 1, 241, 250, 36,
+ 5, 1, 241, 250, 36, 6, 1, 216, 73, 241, 252, 36, 5, 1, 216, 73, 241, 252,
+ 36, 6, 1, 230, 230, 36, 5, 1, 230, 230, 36, 6, 1, 243, 129, 36, 5, 1,
+ 243, 129, 36, 6, 1, 224, 43, 207, 14, 36, 5, 1, 224, 43, 207, 14, 36, 6,
+ 1, 247, 204, 220, 36, 36, 5, 1, 247, 204, 220, 36, 36, 6, 1, 222, 216,
+ 203, 34, 36, 5, 1, 222, 216, 203, 34, 36, 6, 1, 203, 31, 3, 249, 26, 203,
+ 34, 36, 5, 1, 203, 31, 3, 249, 26, 203, 34, 36, 6, 1, 230, 228, 203, 66,
+ 36, 5, 1, 230, 228, 203, 66, 36, 6, 1, 216, 73, 202, 213, 36, 5, 1, 216,
+ 73, 202, 213, 36, 6, 1, 230, 228, 63, 36, 5, 1, 230, 228, 63, 36, 6, 1,
+ 246, 16, 227, 86, 202, 183, 36, 5, 1, 246, 16, 227, 86, 202, 183, 36, 6,
+ 1, 248, 35, 202, 183, 36, 5, 1, 248, 35, 202, 183, 36, 6, 1, 230, 228,
+ 246, 16, 227, 86, 202, 183, 36, 5, 1, 230, 228, 246, 16, 227, 86, 202,
+ 183, 36, 6, 1, 202, 249, 36, 5, 1, 202, 249, 36, 6, 1, 216, 73, 208, 14,
+ 36, 5, 1, 216, 73, 208, 14, 36, 6, 1, 212, 7, 244, 75, 36, 5, 1, 212, 7,
+ 244, 75, 36, 6, 1, 212, 7, 241, 122, 36, 5, 1, 212, 7, 241, 122, 36, 6,
+ 1, 212, 7, 241, 103, 36, 5, 1, 212, 7, 241, 103, 36, 6, 1, 224, 47, 78,
+ 36, 5, 1, 224, 47, 78, 36, 6, 1, 248, 63, 78, 36, 5, 1, 248, 63, 78, 36,
+ 6, 1, 52, 224, 47, 78, 36, 5, 1, 52, 224, 47, 78, 36, 1, 223, 227, 78,
+ 39, 36, 204, 146, 39, 36, 209, 153, 224, 114, 54, 39, 36, 236, 12, 224,
+ 114, 54, 39, 36, 209, 37, 224, 114, 54, 212, 55, 250, 59, 39, 36, 1, 207,
+ 11, 231, 110, 39, 36, 1, 75, 39, 36, 1, 203, 11, 39, 36, 1, 68, 39, 36,
+ 1, 237, 91, 54, 39, 36, 1, 203, 30, 39, 36, 1, 212, 7, 54, 39, 36, 1,
+ 220, 36, 39, 36, 229, 213, 39, 36, 219, 41, 36, 229, 213, 36, 219, 41,
+ 36, 6, 1, 242, 9, 36, 5, 1, 242, 9, 36, 6, 1, 241, 241, 36, 5, 1, 241,
+ 241, 36, 6, 1, 202, 47, 36, 5, 1, 202, 47, 36, 6, 1, 246, 254, 36, 5, 1,
+ 246, 254, 36, 6, 1, 241, 238, 36, 5, 1, 241, 238, 36, 6, 1, 209, 188, 3,
+ 101, 113, 36, 5, 1, 209, 188, 3, 101, 113, 36, 6, 1, 207, 158, 36, 5, 1,
+ 207, 158, 36, 6, 1, 207, 245, 36, 5, 1, 207, 245, 36, 6, 1, 207, 250, 36,
+ 5, 1, 207, 250, 36, 6, 1, 209, 193, 36, 5, 1, 209, 193, 36, 6, 1, 235,
+ 251, 36, 5, 1, 235, 251, 36, 6, 1, 212, 177, 36, 5, 1, 212, 177, 36, 6,
+ 1, 52, 78, 36, 5, 1, 52, 78, 36, 6, 1, 245, 128, 78, 36, 5, 1, 245, 128,
+ 78, 65, 1, 36, 237, 91, 54, 65, 1, 36, 212, 7, 54, 39, 36, 1, 241, 154,
+ 39, 36, 1, 230, 228, 74, 24, 1, 63, 24, 1, 173, 24, 1, 68, 24, 1, 228,
+ 209, 24, 1, 241, 161, 24, 1, 216, 135, 24, 1, 210, 1, 24, 1, 78, 24, 1,
+ 220, 248, 24, 1, 75, 24, 1, 228, 113, 24, 1, 185, 24, 1, 216, 3, 24, 1,
+ 216, 50, 24, 1, 227, 225, 24, 1, 225, 7, 24, 1, 210, 18, 24, 1, 223, 23,
+ 24, 1, 222, 46, 24, 1, 226, 185, 24, 1, 210, 179, 24, 1, 223, 246, 24, 1,
+ 213, 6, 24, 1, 212, 162, 24, 1, 213, 16, 24, 1, 213, 113, 24, 1, 228,
+ 137, 24, 1, 229, 170, 24, 1, 221, 55, 24, 1, 221, 84, 24, 1, 222, 17, 24,
+ 1, 202, 229, 24, 1, 212, 199, 24, 1, 202, 187, 24, 1, 198, 24, 1, 221,
+ 118, 24, 1, 229, 156, 24, 1, 218, 212, 24, 1, 222, 39, 24, 1, 221, 99,
+ 24, 1, 217, 183, 24, 1, 203, 214, 24, 1, 219, 23, 24, 1, 240, 53, 24, 1,
+ 215, 145, 24, 1, 226, 239, 24, 1, 224, 155, 24, 1, 222, 100, 24, 1, 216,
+ 75, 24, 1, 216, 202, 24, 1, 229, 180, 24, 1, 222, 131, 24, 1, 222, 182,
+ 24, 1, 222, 203, 24, 1, 212, 242, 24, 1, 217, 188, 24, 1, 239, 108, 24,
+ 1, 239, 179, 24, 1, 204, 111, 24, 1, 201, 201, 24, 1, 227, 148, 24, 1,
+ 218, 167, 24, 1, 227, 10, 24, 1, 229, 26, 24, 1, 225, 44, 24, 1, 216,
+ 107, 24, 1, 224, 240, 24, 1, 192, 24, 1, 209, 2, 24, 1, 229, 100, 24, 1,
+ 224, 82, 24, 1, 225, 52, 24, 1, 209, 132, 24, 1, 228, 244, 24, 1, 209,
+ 152, 24, 1, 221, 86, 24, 1, 214, 251, 24, 1, 240, 104, 24, 1, 228, 246,
+ 24, 1, 229, 21, 24, 39, 131, 228, 255, 24, 39, 131, 207, 194, 24, 222,
+ 45, 24, 239, 102, 211, 61, 24, 245, 242, 24, 245, 233, 24, 213, 143, 24,
+ 217, 47, 82, 65, 1, 246, 128, 143, 203, 1, 218, 119, 65, 1, 246, 128,
+ 143, 203, 77, 218, 119, 65, 1, 246, 128, 143, 203, 1, 213, 65, 65, 1,
+ 246, 128, 143, 203, 77, 213, 65, 65, 1, 246, 128, 143, 203, 1, 217, 65,
+ 65, 1, 246, 128, 143, 203, 77, 217, 65, 65, 1, 246, 128, 143, 203, 1,
+ 215, 145, 65, 1, 246, 128, 143, 203, 77, 215, 145, 65, 1, 240, 198, 242,
+ 83, 143, 142, 65, 1, 138, 242, 83, 143, 142, 65, 1, 224, 150, 242, 83,
+ 143, 142, 65, 1, 124, 242, 83, 143, 142, 65, 1, 240, 197, 242, 83, 143,
+ 142, 65, 1, 240, 198, 242, 83, 227, 214, 143, 142, 65, 1, 138, 242, 83,
+ 227, 214, 143, 142, 65, 1, 224, 150, 242, 83, 227, 214, 143, 142, 65, 1,
+ 124, 242, 83, 227, 214, 143, 142, 65, 1, 240, 197, 242, 83, 227, 214,
+ 143, 142, 65, 1, 240, 198, 227, 214, 143, 142, 65, 1, 138, 227, 214, 143,
+ 142, 65, 1, 224, 150, 227, 214, 143, 142, 65, 1, 124, 227, 214, 143, 142,
+ 65, 1, 240, 197, 227, 214, 143, 142, 65, 1, 70, 80, 142, 65, 1, 70, 212,
+ 57, 65, 1, 70, 236, 106, 142, 65, 1, 226, 251, 50, 245, 166, 250, 217,
+ 65, 1, 216, 188, 112, 47, 65, 1, 216, 188, 121, 47, 65, 1, 216, 188, 240,
+ 212, 82, 65, 1, 216, 188, 230, 239, 240, 212, 82, 65, 1, 124, 230, 239,
+ 240, 212, 82, 65, 1, 211, 42, 25, 138, 208, 161, 65, 1, 211, 42, 25, 124,
+ 208, 161, 8, 6, 1, 241, 149, 251, 30, 8, 5, 1, 241, 149, 251, 30, 8, 6,
+ 1, 241, 149, 251, 59, 8, 5, 1, 241, 149, 251, 59, 8, 6, 1, 237, 31, 8, 5,
+ 1, 237, 31, 8, 6, 1, 207, 107, 8, 5, 1, 207, 107, 8, 6, 1, 208, 89, 8, 5,
+ 1, 208, 89, 8, 6, 1, 245, 107, 8, 5, 1, 245, 107, 8, 6, 1, 245, 108, 3,
+ 245, 233, 8, 5, 1, 245, 108, 3, 245, 233, 8, 1, 5, 6, 240, 174, 8, 1, 5,
+ 6, 194, 8, 6, 1, 252, 25, 8, 5, 1, 252, 25, 8, 6, 1, 250, 178, 8, 5, 1,
+ 250, 178, 8, 6, 1, 250, 34, 8, 5, 1, 250, 34, 8, 6, 1, 250, 18, 8, 5, 1,
+ 250, 18, 8, 6, 1, 250, 19, 3, 236, 106, 142, 8, 5, 1, 250, 19, 3, 236,
+ 106, 142, 8, 6, 1, 250, 8, 8, 5, 1, 250, 8, 8, 6, 1, 216, 73, 247, 126,
+ 3, 243, 85, 8, 5, 1, 216, 73, 247, 126, 3, 243, 85, 8, 6, 1, 230, 55, 3,
+ 95, 8, 5, 1, 230, 55, 3, 95, 8, 6, 1, 230, 55, 3, 243, 228, 95, 8, 5, 1,
+ 230, 55, 3, 243, 228, 95, 8, 6, 1, 230, 55, 3, 211, 32, 25, 243, 228, 95,
+ 8, 5, 1, 230, 55, 3, 211, 32, 25, 243, 228, 95, 8, 6, 1, 247, 203, 159,
+ 8, 5, 1, 247, 203, 159, 8, 6, 1, 228, 131, 3, 138, 95, 8, 5, 1, 228, 131,
+ 3, 138, 95, 8, 6, 1, 158, 3, 163, 211, 32, 219, 199, 8, 5, 1, 158, 3,
+ 163, 211, 32, 219, 199, 8, 6, 1, 158, 3, 227, 14, 8, 5, 1, 158, 3, 227,
+ 14, 8, 6, 1, 220, 18, 8, 5, 1, 220, 18, 8, 6, 1, 219, 185, 3, 211, 32,
+ 209, 25, 244, 20, 8, 5, 1, 219, 185, 3, 211, 32, 209, 25, 244, 20, 8, 6,
+ 1, 219, 185, 3, 239, 199, 8, 5, 1, 219, 185, 3, 239, 199, 8, 6, 1, 219,
+ 185, 3, 211, 170, 209, 248, 8, 5, 1, 219, 185, 3, 211, 170, 209, 248, 8,
+ 6, 1, 217, 135, 3, 211, 32, 209, 25, 244, 20, 8, 5, 1, 217, 135, 3, 211,
+ 32, 209, 25, 244, 20, 8, 6, 1, 217, 135, 3, 243, 228, 95, 8, 5, 1, 217,
+ 135, 3, 243, 228, 95, 8, 6, 1, 217, 1, 215, 192, 8, 5, 1, 217, 1, 215,
+ 192, 8, 6, 1, 215, 132, 215, 192, 8, 5, 1, 215, 132, 215, 192, 8, 6, 1,
+ 206, 165, 3, 243, 228, 95, 8, 5, 1, 206, 165, 3, 243, 228, 95, 8, 6, 1,
+ 204, 152, 8, 5, 1, 204, 152, 8, 6, 1, 205, 197, 202, 159, 8, 5, 1, 205,
+ 197, 202, 159, 8, 6, 1, 209, 41, 3, 95, 8, 5, 1, 209, 41, 3, 95, 8, 6, 1,
+ 209, 41, 3, 211, 32, 209, 25, 244, 20, 8, 5, 1, 209, 41, 3, 211, 32, 209,
+ 25, 244, 20, 8, 6, 1, 206, 45, 8, 5, 1, 206, 45, 8, 6, 1, 240, 250, 8, 5,
+ 1, 240, 250, 8, 6, 1, 230, 215, 8, 5, 1, 230, 215, 8, 6, 1, 245, 218, 8,
+ 5, 1, 245, 218, 65, 1, 206, 193, 8, 5, 1, 242, 32, 8, 5, 1, 226, 222, 8,
+ 5, 1, 223, 220, 8, 5, 1, 221, 47, 8, 5, 1, 215, 131, 8, 1, 5, 6, 215,
+ 131, 8, 5, 1, 207, 191, 8, 5, 1, 207, 6, 8, 6, 1, 231, 4, 245, 51, 8, 5,
+ 1, 231, 4, 245, 51, 8, 6, 1, 231, 4, 240, 174, 8, 5, 1, 231, 4, 240, 174,
+ 8, 6, 1, 231, 4, 239, 75, 8, 6, 1, 207, 174, 231, 4, 239, 75, 8, 5, 1,
+ 207, 174, 231, 4, 239, 75, 8, 6, 1, 207, 174, 159, 8, 5, 1, 207, 174,
+ 159, 8, 6, 1, 231, 4, 146, 8, 5, 1, 231, 4, 146, 8, 6, 1, 231, 4, 194, 8,
+ 5, 1, 231, 4, 194, 8, 6, 1, 231, 4, 210, 69, 8, 5, 1, 231, 4, 210, 69,
+ 65, 1, 124, 246, 53, 251, 138, 65, 1, 245, 242, 65, 1, 212, 228, 241, 35,
+ 54, 8, 6, 1, 214, 255, 8, 5, 1, 214, 255, 8, 6, 1, 207, 174, 237, 171, 8,
+ 5, 1, 228, 131, 3, 216, 79, 236, 116, 25, 248, 124, 8, 1, 212, 114, 243,
+ 85, 8, 6, 1, 223, 164, 3, 244, 20, 8, 5, 1, 223, 164, 3, 244, 20, 8, 6,
+ 1, 247, 126, 3, 142, 8, 5, 1, 247, 126, 3, 142, 8, 5, 1, 247, 126, 3,
+ 219, 142, 113, 8, 5, 1, 237, 172, 3, 219, 142, 113, 8, 6, 1, 66, 3, 239,
+ 199, 8, 5, 1, 66, 3, 239, 199, 8, 6, 1, 240, 175, 3, 95, 8, 5, 1, 240,
+ 175, 3, 95, 8, 6, 1, 205, 182, 251, 109, 8, 5, 1, 205, 182, 251, 109, 8,
+ 6, 1, 205, 182, 220, 73, 8, 5, 1, 205, 182, 220, 73, 8, 6, 1, 205, 182,
+ 207, 24, 8, 5, 1, 205, 182, 207, 24, 8, 6, 1, 239, 76, 3, 220, 89, 95, 8,
+ 5, 1, 239, 76, 3, 220, 89, 95, 8, 6, 1, 230, 55, 3, 220, 89, 95, 8, 5, 1,
+ 230, 55, 3, 220, 89, 95, 8, 6, 1, 223, 164, 3, 220, 89, 95, 8, 5, 1, 223,
+ 164, 3, 220, 89, 95, 8, 6, 1, 217, 1, 3, 220, 89, 95, 8, 5, 1, 217, 1, 3,
+ 220, 89, 95, 8, 6, 1, 215, 94, 3, 220, 89, 95, 8, 5, 1, 215, 94, 3, 220,
+ 89, 95, 8, 6, 1, 237, 172, 3, 113, 8, 6, 1, 216, 73, 171, 74, 8, 6, 1,
+ 132, 239, 75, 8, 6, 1, 228, 131, 3, 248, 124, 8, 6, 1, 207, 174, 230, 54,
+ 8, 6, 1, 207, 174, 210, 69, 8, 6, 1, 230, 185, 3, 245, 126, 8, 6, 1, 246,
+ 142, 8, 6, 1, 248, 106, 8, 5, 1, 248, 106, 8, 6, 1, 220, 36, 8, 5, 1,
+ 220, 36, 8, 241, 40, 1, 212, 154, 75, 65, 1, 6, 237, 172, 3, 95, 65, 1,
+ 5, 32, 220, 73, 8, 1, 5, 6, 207, 174, 226, 185, 8, 241, 40, 1, 216, 73,
+ 240, 174, 8, 241, 40, 1, 216, 73, 219, 184, 8, 241, 40, 1, 230, 239, 226,
+ 185, 8, 241, 40, 1, 235, 206, 227, 20, 8, 241, 40, 1, 250, 126, 226, 185,
+ 210, 149, 223, 94, 1, 63, 210, 149, 223, 94, 1, 75, 210, 149, 223, 94, 2,
+ 242, 11, 210, 149, 223, 94, 1, 68, 210, 149, 223, 94, 1, 74, 210, 149,
+ 223, 94, 1, 78, 210, 149, 223, 94, 2, 237, 85, 210, 149, 223, 94, 1, 229,
+ 26, 210, 149, 223, 94, 1, 229, 115, 210, 149, 223, 94, 1, 238, 39, 210,
+ 149, 223, 94, 1, 238, 91, 210, 149, 223, 94, 2, 250, 180, 210, 149, 223,
+ 94, 1, 245, 254, 210, 149, 223, 94, 1, 246, 116, 210, 149, 223, 94, 1,
+ 230, 101, 210, 149, 223, 94, 1, 230, 143, 210, 149, 223, 94, 1, 207, 218,
+ 210, 149, 223, 94, 1, 207, 224, 210, 149, 223, 94, 1, 244, 90, 210, 149,
+ 223, 94, 1, 244, 99, 210, 149, 223, 94, 1, 135, 210, 149, 223, 94, 1,
+ 209, 47, 210, 149, 223, 94, 1, 243, 113, 210, 149, 223, 94, 1, 243, 237,
+ 210, 149, 223, 94, 1, 221, 191, 210, 149, 223, 94, 1, 218, 69, 210, 149,
+ 223, 94, 1, 218, 180, 210, 149, 223, 94, 1, 248, 23, 210, 149, 223, 94,
+ 1, 248, 90, 210, 149, 223, 94, 1, 224, 82, 210, 149, 223, 94, 1, 215,
+ 227, 210, 149, 223, 94, 1, 227, 49, 210, 149, 223, 94, 1, 215, 171, 210,
+ 149, 223, 94, 1, 212, 13, 210, 149, 223, 94, 1, 236, 136, 210, 149, 223,
+ 94, 22, 2, 63, 210, 149, 223, 94, 22, 2, 75, 210, 149, 223, 94, 22, 2,
+ 68, 210, 149, 223, 94, 22, 2, 74, 210, 149, 223, 94, 22, 2, 220, 18, 210,
+ 149, 223, 94, 218, 64, 225, 92, 210, 149, 223, 94, 218, 64, 225, 91, 210,
+ 149, 223, 94, 218, 64, 225, 90, 210, 149, 223, 94, 218, 64, 225, 89, 153,
+ 231, 33, 239, 138, 118, 217, 55, 153, 231, 33, 239, 138, 118, 237, 137,
+ 153, 231, 33, 239, 138, 126, 217, 53, 153, 231, 33, 239, 138, 118, 212,
+ 80, 153, 231, 33, 239, 138, 118, 241, 138, 153, 231, 33, 239, 138, 126,
+ 212, 79, 153, 231, 33, 217, 56, 82, 153, 231, 33, 218, 96, 82, 153, 231,
+ 33, 215, 120, 82, 153, 231, 33, 217, 57, 82, 218, 204, 1, 173, 218, 204,
+ 1, 229, 144, 218, 204, 1, 239, 8, 218, 204, 1, 222, 203, 218, 204, 1,
+ 247, 92, 218, 204, 1, 246, 199, 218, 204, 1, 230, 181, 218, 204, 1, 221,
+ 11, 218, 204, 1, 210, 22, 218, 204, 1, 209, 108, 218, 204, 1, 244, 212,
+ 218, 204, 1, 201, 201, 218, 204, 1, 185, 218, 204, 1, 218, 208, 218, 204,
+ 1, 249, 32, 218, 204, 1, 192, 218, 204, 1, 208, 20, 218, 204, 1, 208, 10,
+ 218, 204, 1, 241, 255, 218, 204, 1, 204, 111, 218, 204, 1, 202, 80, 218,
+ 204, 1, 202, 116, 218, 204, 1, 5, 63, 218, 204, 1, 198, 218, 204, 1, 216,
+ 220, 218, 204, 1, 228, 113, 218, 204, 1, 213, 90, 218, 204, 1, 215, 36,
+ 218, 204, 1, 152, 218, 204, 1, 63, 218, 204, 1, 75, 218, 204, 1, 68, 218,
+ 204, 1, 74, 218, 204, 1, 78, 218, 204, 1, 217, 126, 218, 204, 1, 203,
+ 182, 218, 204, 1, 240, 108, 218, 204, 1, 238, 155, 218, 204, 1, 241, 161,
+ 218, 204, 210, 254, 1, 204, 111, 218, 204, 210, 254, 1, 198, 218, 204, 1,
+ 207, 241, 218, 204, 1, 207, 229, 218, 204, 1, 244, 120, 218, 204, 1, 221,
+ 227, 218, 204, 1, 250, 255, 198, 218, 204, 1, 205, 185, 213, 90, 218,
+ 204, 1, 205, 186, 152, 218, 204, 1, 250, 66, 240, 108, 218, 204, 210,
+ 254, 1, 216, 220, 218, 204, 210, 201, 1, 216, 220, 218, 204, 1, 247, 52,
+ 218, 204, 212, 120, 237, 65, 82, 218, 204, 52, 237, 65, 82, 218, 204,
+ 131, 213, 82, 218, 204, 131, 52, 213, 82, 214, 215, 2, 250, 180, 214,
+ 215, 2, 205, 199, 214, 215, 1, 63, 214, 215, 1, 252, 25, 214, 215, 1, 75,
+ 214, 215, 1, 231, 83, 214, 215, 1, 68, 214, 215, 1, 206, 178, 214, 215,
+ 1, 125, 146, 214, 215, 1, 125, 215, 186, 214, 215, 1, 125, 159, 214, 215,
+ 1, 125, 227, 78, 214, 215, 1, 74, 214, 215, 1, 241, 161, 214, 215, 1,
+ 251, 64, 214, 215, 1, 78, 214, 215, 1, 220, 18, 214, 215, 1, 250, 34,
+ 214, 215, 1, 173, 214, 215, 1, 229, 144, 214, 215, 1, 239, 8, 214, 215,
+ 1, 238, 119, 214, 215, 1, 222, 203, 214, 215, 1, 247, 92, 214, 215, 1,
+ 246, 199, 214, 215, 1, 230, 181, 214, 215, 1, 230, 149, 214, 215, 1, 221,
+ 11, 214, 215, 1, 207, 241, 214, 215, 1, 207, 229, 214, 215, 1, 244, 120,
+ 214, 215, 1, 244, 104, 214, 215, 1, 221, 227, 214, 215, 1, 210, 22, 214,
+ 215, 1, 209, 108, 214, 215, 1, 244, 212, 214, 215, 1, 244, 1, 214, 215,
+ 1, 201, 201, 214, 215, 1, 185, 214, 215, 1, 218, 208, 214, 215, 1, 249,
+ 32, 214, 215, 1, 248, 98, 214, 215, 1, 192, 214, 215, 1, 198, 214, 215,
+ 1, 216, 220, 214, 215, 1, 228, 113, 214, 215, 1, 206, 86, 214, 215, 1,
+ 213, 90, 214, 215, 1, 211, 164, 214, 215, 1, 215, 36, 214, 215, 1, 152,
+ 214, 215, 1, 227, 77, 214, 215, 109, 2, 237, 155, 214, 215, 22, 2, 252,
+ 25, 214, 215, 22, 2, 75, 214, 215, 22, 2, 231, 83, 214, 215, 22, 2, 68,
+ 214, 215, 22, 2, 206, 178, 214, 215, 22, 2, 125, 146, 214, 215, 22, 2,
+ 125, 215, 186, 214, 215, 22, 2, 125, 159, 214, 215, 22, 2, 125, 227, 78,
+ 214, 215, 22, 2, 74, 214, 215, 22, 2, 241, 161, 214, 215, 22, 2, 251, 64,
+ 214, 215, 22, 2, 78, 214, 215, 22, 2, 220, 18, 214, 215, 22, 2, 250, 34,
+ 214, 215, 2, 205, 204, 214, 215, 244, 166, 214, 215, 52, 244, 166, 214,
+ 215, 17, 202, 84, 214, 215, 17, 105, 214, 215, 17, 108, 214, 215, 17,
+ 147, 214, 215, 17, 149, 214, 215, 17, 170, 214, 215, 17, 195, 214, 215,
+ 17, 213, 111, 214, 215, 17, 199, 214, 215, 17, 222, 63, 39, 92, 17, 202,
+ 84, 39, 92, 17, 105, 39, 92, 17, 108, 39, 92, 17, 147, 39, 92, 17, 149,
+ 39, 92, 17, 170, 39, 92, 17, 195, 39, 92, 17, 213, 111, 39, 92, 17, 199,
+ 39, 92, 17, 222, 63, 39, 92, 1, 63, 39, 92, 1, 68, 39, 92, 1, 173, 39,
+ 92, 1, 201, 201, 39, 92, 1, 185, 39, 92, 1, 216, 220, 39, 92, 1, 205,
+ 230, 39, 92, 2, 250, 17, 92, 2, 211, 227, 247, 52, 92, 2, 247, 53, 205,
+ 204, 92, 2, 52, 247, 53, 205, 204, 92, 2, 247, 53, 108, 92, 2, 247, 53,
+ 147, 92, 2, 247, 53, 250, 17, 92, 2, 217, 162, 92, 238, 228, 240, 7, 92,
+ 247, 33, 92, 237, 58, 92, 2, 212, 157, 92, 230, 173, 220, 39, 229, 207,
+ 227, 149, 17, 202, 84, 229, 207, 227, 149, 17, 105, 229, 207, 227, 149,
+ 17, 108, 229, 207, 227, 149, 17, 147, 229, 207, 227, 149, 17, 149, 229,
+ 207, 227, 149, 17, 170, 229, 207, 227, 149, 17, 195, 229, 207, 227, 149,
+ 17, 213, 111, 229, 207, 227, 149, 17, 199, 229, 207, 227, 149, 17, 222,
+ 63, 229, 207, 227, 149, 1, 173, 229, 207, 227, 149, 1, 229, 144, 229,
+ 207, 227, 149, 1, 239, 8, 229, 207, 227, 149, 1, 222, 203, 229, 207, 227,
+ 149, 1, 215, 36, 229, 207, 227, 149, 1, 213, 90, 229, 207, 227, 149, 1,
+ 202, 116, 229, 207, 227, 149, 1, 221, 11, 229, 207, 227, 149, 1, 210, 22,
+ 229, 207, 227, 149, 1, 236, 30, 229, 207, 227, 149, 1, 201, 201, 229,
+ 207, 227, 149, 1, 185, 229, 207, 227, 149, 1, 218, 208, 229, 207, 227,
+ 149, 1, 192, 229, 207, 227, 149, 1, 244, 212, 229, 207, 227, 149, 1, 249,
+ 32, 229, 207, 227, 149, 1, 216, 220, 229, 207, 227, 149, 1, 198, 229,
+ 207, 227, 149, 1, 228, 113, 229, 207, 227, 149, 1, 204, 111, 229, 207,
+ 227, 149, 1, 209, 108, 229, 207, 227, 149, 1, 152, 229, 207, 227, 149, 1,
+ 206, 86, 229, 207, 227, 149, 1, 247, 92, 229, 207, 227, 149, 1, 63, 229,
+ 207, 227, 149, 1, 220, 73, 229, 207, 227, 149, 1, 75, 229, 207, 227, 149,
+ 1, 220, 18, 229, 207, 227, 149, 22, 207, 24, 229, 207, 227, 149, 22, 74,
+ 229, 207, 227, 149, 22, 68, 229, 207, 227, 149, 22, 241, 161, 229, 207,
+ 227, 149, 22, 78, 229, 207, 227, 149, 143, 218, 84, 229, 207, 227, 149,
+ 143, 247, 68, 229, 207, 227, 149, 143, 247, 69, 218, 84, 229, 207, 227,
+ 149, 2, 245, 70, 229, 207, 227, 149, 2, 212, 170, 216, 119, 1, 173, 216,
+ 119, 1, 239, 8, 216, 119, 1, 222, 203, 216, 119, 1, 210, 22, 216, 119, 1,
+ 244, 212, 216, 119, 1, 201, 201, 216, 119, 1, 185, 216, 119, 1, 249, 32,
+ 216, 119, 1, 192, 216, 119, 1, 247, 92, 216, 119, 1, 230, 181, 216, 119,
+ 1, 221, 11, 216, 119, 1, 215, 36, 216, 119, 1, 216, 220, 216, 119, 1,
+ 228, 113, 216, 119, 1, 198, 216, 119, 1, 204, 111, 216, 119, 1, 152, 216,
+ 119, 1, 225, 54, 216, 119, 1, 222, 182, 216, 119, 1, 223, 25, 216, 119,
+ 1, 220, 234, 216, 119, 1, 63, 216, 119, 22, 2, 75, 216, 119, 22, 2, 68,
+ 216, 119, 22, 2, 74, 216, 119, 22, 2, 251, 64, 216, 119, 22, 2, 78, 216,
+ 119, 22, 2, 250, 34, 216, 119, 22, 2, 240, 238, 216, 119, 22, 2, 241,
+ 189, 216, 119, 109, 2, 222, 205, 216, 119, 109, 2, 223, 163, 216, 119,
+ 109, 2, 146, 216, 119, 109, 2, 237, 171, 216, 119, 205, 204, 216, 119,
+ 214, 168, 82, 28, 123, 208, 236, 28, 123, 208, 235, 28, 123, 208, 233,
+ 28, 123, 208, 238, 28, 123, 216, 42, 28, 123, 216, 26, 28, 123, 216, 21,
+ 28, 123, 216, 23, 28, 123, 216, 39, 28, 123, 216, 32, 28, 123, 216, 25,
+ 28, 123, 216, 44, 28, 123, 216, 27, 28, 123, 216, 46, 28, 123, 216, 43,
+ 28, 123, 224, 137, 28, 123, 224, 128, 28, 123, 224, 131, 28, 123, 218,
+ 138, 28, 123, 218, 149, 28, 123, 218, 150, 28, 123, 211, 148, 28, 123,
+ 231, 96, 28, 123, 231, 103, 28, 123, 211, 159, 28, 123, 211, 146, 28,
+ 123, 218, 189, 28, 123, 236, 246, 28, 123, 211, 143, 190, 2, 219, 102,
+ 190, 2, 246, 235, 190, 2, 227, 242, 190, 2, 204, 20, 190, 1, 63, 190, 1,
+ 235, 206, 229, 211, 190, 1, 75, 190, 1, 231, 83, 190, 1, 68, 190, 1, 219,
+ 169, 246, 205, 190, 1, 222, 204, 227, 201, 190, 1, 222, 204, 227, 202,
+ 216, 173, 190, 1, 74, 190, 1, 251, 64, 190, 1, 78, 190, 1, 173, 190, 1,
+ 230, 44, 214, 227, 190, 1, 230, 44, 223, 205, 190, 1, 239, 8, 190, 1,
+ 239, 9, 223, 205, 190, 1, 222, 203, 190, 1, 247, 92, 190, 1, 247, 93,
+ 223, 205, 190, 1, 230, 181, 190, 1, 221, 12, 223, 205, 190, 1, 230, 182,
+ 225, 144, 190, 1, 221, 11, 190, 1, 207, 241, 190, 1, 207, 242, 225, 144,
+ 190, 1, 244, 120, 190, 1, 244, 121, 225, 144, 190, 1, 223, 111, 223, 205,
+ 190, 1, 210, 22, 190, 1, 210, 23, 223, 205, 190, 1, 244, 212, 190, 1,
+ 244, 213, 225, 144, 190, 1, 201, 201, 190, 1, 185, 190, 1, 219, 169, 223,
+ 205, 190, 1, 249, 32, 190, 1, 249, 33, 223, 205, 190, 1, 192, 190, 1,
+ 198, 190, 1, 216, 220, 190, 1, 216, 221, 251, 74, 190, 1, 228, 113, 190,
+ 1, 204, 111, 190, 1, 215, 37, 223, 205, 190, 1, 215, 37, 225, 144, 190,
+ 1, 215, 36, 190, 1, 152, 190, 2, 246, 236, 209, 155, 190, 22, 2, 209,
+ 214, 190, 22, 2, 208, 166, 190, 22, 2, 203, 211, 190, 22, 2, 203, 212,
+ 224, 251, 190, 22, 2, 210, 224, 190, 22, 2, 210, 225, 224, 239, 190, 22,
+ 2, 209, 235, 190, 22, 2, 243, 163, 223, 204, 190, 22, 2, 218, 249, 190,
+ 109, 2, 229, 173, 190, 109, 2, 219, 6, 190, 109, 2, 247, 77, 190, 219,
+ 115, 190, 49, 216, 93, 190, 50, 216, 93, 190, 219, 158, 250, 225, 190,
+ 219, 158, 225, 162, 190, 219, 158, 226, 226, 190, 219, 158, 204, 14, 190,
+ 219, 158, 219, 116, 190, 219, 158, 227, 106, 190, 219, 158, 226, 220,
+ 190, 219, 158, 251, 116, 190, 219, 158, 251, 117, 251, 116, 190, 219,
+ 158, 218, 107, 190, 207, 174, 219, 158, 218, 107, 190, 219, 111, 190, 17,
+ 202, 84, 190, 17, 105, 190, 17, 108, 190, 17, 147, 190, 17, 149, 190, 17,
+ 170, 190, 17, 195, 190, 17, 213, 111, 190, 17, 199, 190, 17, 222, 63,
+ 190, 219, 158, 208, 202, 207, 189, 190, 219, 158, 230, 211, 69, 1, 213,
+ 67, 238, 119, 69, 1, 213, 67, 246, 199, 69, 1, 213, 67, 230, 149, 69, 1,
+ 213, 67, 221, 227, 69, 1, 213, 67, 248, 98, 69, 2, 213, 67, 214, 213, 69,
+ 65, 1, 213, 67, 216, 136, 69, 1, 45, 228, 85, 221, 11, 69, 1, 45, 228,
+ 85, 240, 108, 69, 1, 45, 228, 85, 239, 8, 69, 1, 45, 228, 85, 238, 119,
+ 69, 1, 45, 228, 85, 230, 181, 69, 1, 45, 228, 85, 230, 149, 69, 1, 45,
+ 228, 85, 244, 120, 69, 1, 45, 228, 85, 244, 104, 69, 1, 45, 228, 85, 221,
+ 227, 69, 45, 228, 85, 17, 202, 84, 69, 45, 228, 85, 17, 105, 69, 45, 228,
+ 85, 17, 108, 69, 45, 228, 85, 17, 147, 69, 45, 228, 85, 17, 149, 69, 45,
+ 228, 85, 17, 170, 69, 45, 228, 85, 17, 195, 69, 45, 228, 85, 17, 213,
+ 111, 69, 45, 228, 85, 17, 199, 69, 45, 228, 85, 17, 222, 63, 69, 1, 45,
+ 228, 85, 227, 77, 69, 1, 45, 228, 85, 244, 212, 69, 1, 45, 228, 85, 244,
+ 1, 69, 1, 45, 228, 85, 249, 32, 69, 1, 45, 228, 85, 248, 98, 246, 192, 1,
+ 63, 246, 192, 1, 75, 246, 192, 1, 68, 246, 192, 1, 74, 246, 192, 1, 251,
+ 64, 246, 192, 1, 78, 246, 192, 1, 173, 246, 192, 1, 229, 144, 246, 192,
+ 1, 239, 8, 246, 192, 1, 238, 119, 246, 192, 1, 222, 112, 246, 192, 1,
+ 222, 203, 246, 192, 1, 246, 199, 246, 192, 1, 246, 144, 246, 192, 1, 230,
+ 181, 246, 192, 1, 230, 149, 246, 192, 1, 222, 102, 246, 192, 1, 222, 104,
+ 246, 192, 1, 222, 103, 246, 192, 1, 210, 22, 246, 192, 1, 209, 108, 246,
+ 192, 1, 244, 212, 246, 192, 1, 244, 1, 246, 192, 1, 221, 53, 246, 192, 1,
+ 201, 201, 246, 192, 1, 244, 120, 246, 192, 1, 185, 246, 192, 1, 218, 12,
+ 246, 192, 1, 218, 208, 246, 192, 1, 249, 32, 246, 192, 1, 248, 98, 246,
+ 192, 1, 223, 238, 246, 192, 1, 192, 246, 192, 1, 248, 198, 246, 192, 1,
+ 198, 246, 192, 1, 216, 220, 246, 192, 1, 228, 113, 246, 192, 1, 206, 86,
+ 246, 192, 1, 211, 164, 246, 192, 1, 215, 36, 246, 192, 1, 152, 246, 192,
+ 22, 2, 252, 25, 246, 192, 22, 2, 75, 246, 192, 22, 2, 231, 83, 246, 192,
+ 22, 2, 241, 145, 246, 192, 22, 2, 68, 246, 192, 22, 2, 220, 73, 246, 192,
+ 22, 2, 78, 246, 192, 22, 2, 251, 64, 246, 192, 22, 2, 250, 34, 246, 192,
+ 22, 2, 207, 24, 246, 192, 109, 2, 198, 246, 192, 109, 2, 216, 220, 246,
+ 192, 109, 2, 228, 113, 246, 192, 109, 2, 204, 111, 246, 192, 1, 46, 230,
+ 54, 246, 192, 1, 46, 239, 75, 246, 192, 1, 46, 222, 205, 246, 192, 109,
+ 2, 46, 222, 205, 246, 192, 1, 46, 246, 200, 246, 192, 1, 46, 210, 69,
+ 246, 192, 1, 46, 223, 163, 246, 192, 1, 46, 219, 184, 246, 192, 1, 46,
+ 203, 124, 246, 192, 1, 46, 146, 246, 192, 1, 46, 159, 246, 192, 1, 46,
+ 211, 167, 246, 192, 109, 2, 46, 226, 185, 246, 192, 109, 2, 46, 237, 171,
+ 246, 192, 17, 202, 84, 246, 192, 17, 105, 246, 192, 17, 108, 246, 192,
+ 17, 147, 246, 192, 17, 149, 246, 192, 17, 170, 246, 192, 17, 195, 246,
+ 192, 17, 213, 111, 246, 192, 17, 199, 246, 192, 17, 222, 63, 246, 192,
+ 217, 179, 211, 201, 246, 192, 217, 179, 244, 166, 246, 192, 217, 179, 52,
+ 244, 166, 246, 192, 217, 179, 208, 70, 244, 166, 69, 1, 229, 137, 239, 8,
+ 69, 1, 229, 137, 247, 92, 69, 1, 229, 137, 246, 199, 69, 1, 229, 137,
+ 230, 181, 69, 1, 229, 137, 230, 149, 69, 1, 229, 137, 221, 11, 69, 1,
+ 229, 137, 207, 241, 69, 1, 229, 137, 207, 229, 69, 1, 229, 137, 244, 120,
+ 69, 1, 229, 137, 244, 104, 69, 1, 229, 137, 244, 1, 69, 1, 229, 137, 201,
+ 201, 69, 1, 229, 137, 215, 36, 69, 1, 229, 137, 152, 69, 1, 229, 137,
+ 237, 12, 69, 1, 229, 137, 240, 108, 69, 65, 1, 229, 137, 216, 136, 69, 1,
+ 229, 137, 203, 182, 69, 1, 229, 137, 202, 116, 69, 1, 229, 137, 216, 220,
+ 69, 227, 36, 229, 137, 220, 94, 69, 227, 36, 229, 137, 217, 78, 69, 227,
+ 36, 229, 137, 236, 191, 69, 16, 251, 51, 240, 211, 69, 16, 251, 51, 105,
+ 69, 16, 251, 51, 108, 69, 1, 251, 51, 216, 220, 69, 2, 219, 98, 229, 237,
+ 208, 161, 69, 2, 45, 228, 85, 208, 159, 69, 2, 45, 228, 85, 208, 156, 69,
+ 1, 212, 178, 219, 139, 246, 199, 69, 1, 212, 178, 219, 139, 213, 90, 45,
+ 205, 220, 1, 124, 229, 26, 45, 205, 220, 1, 138, 229, 26, 45, 205, 220,
+ 1, 124, 229, 115, 45, 205, 220, 1, 138, 229, 115, 45, 205, 220, 1, 124,
+ 229, 124, 45, 205, 220, 1, 138, 229, 124, 45, 205, 220, 1, 124, 238, 39,
+ 45, 205, 220, 1, 138, 238, 39, 45, 205, 220, 1, 124, 222, 128, 45, 205,
+ 220, 1, 138, 222, 128, 45, 205, 220, 1, 124, 245, 254, 45, 205, 220, 1,
+ 138, 245, 254, 45, 205, 220, 1, 124, 246, 116, 45, 205, 220, 1, 138, 246,
+ 116, 45, 205, 220, 1, 124, 212, 13, 45, 205, 220, 1, 138, 212, 13, 45,
+ 205, 220, 1, 124, 220, 233, 45, 205, 220, 1, 138, 220, 233, 45, 205, 220,
+ 1, 124, 243, 113, 45, 205, 220, 1, 138, 243, 113, 45, 205, 220, 1, 124,
+ 135, 45, 205, 220, 1, 138, 135, 45, 205, 220, 1, 124, 209, 47, 45, 205,
+ 220, 1, 138, 209, 47, 45, 205, 220, 1, 124, 221, 191, 45, 205, 220, 1,
+ 138, 221, 191, 45, 205, 220, 1, 124, 248, 23, 45, 205, 220, 1, 138, 248,
+ 23, 45, 205, 220, 1, 124, 218, 69, 45, 205, 220, 1, 138, 218, 69, 45,
+ 205, 220, 1, 124, 218, 180, 45, 205, 220, 1, 138, 218, 180, 45, 205, 220,
+ 1, 124, 239, 186, 45, 205, 220, 1, 138, 239, 186, 45, 205, 220, 1, 124,
+ 224, 82, 45, 205, 220, 1, 138, 224, 82, 45, 205, 220, 1, 124, 202, 247,
+ 45, 205, 220, 1, 138, 202, 247, 45, 205, 220, 1, 124, 215, 227, 45, 205,
+ 220, 1, 138, 215, 227, 45, 205, 220, 1, 124, 227, 49, 45, 205, 220, 1,
+ 138, 227, 49, 45, 205, 220, 1, 124, 205, 189, 45, 205, 220, 1, 138, 205,
+ 189, 45, 205, 220, 1, 124, 236, 136, 45, 205, 220, 1, 138, 236, 136, 45,
+ 205, 220, 1, 124, 78, 45, 205, 220, 1, 138, 78, 45, 205, 220, 225, 141,
+ 230, 0, 45, 205, 220, 22, 252, 25, 45, 205, 220, 22, 75, 45, 205, 220,
+ 22, 207, 24, 45, 205, 220, 22, 68, 45, 205, 220, 22, 74, 45, 205, 220,
+ 22, 78, 45, 205, 220, 225, 141, 229, 118, 45, 205, 220, 22, 235, 171, 45,
+ 205, 220, 22, 207, 23, 45, 205, 220, 22, 207, 39, 45, 205, 220, 22, 250,
+ 32, 45, 205, 220, 22, 250, 8, 45, 205, 220, 22, 250, 231, 45, 205, 220,
+ 22, 250, 247, 45, 205, 220, 143, 225, 141, 241, 129, 45, 205, 220, 143,
+ 225, 141, 221, 52, 45, 205, 220, 143, 225, 141, 209, 47, 45, 205, 220,
+ 143, 225, 141, 211, 252, 45, 205, 220, 16, 229, 9, 45, 205, 220, 16, 221,
+ 52, 45, 205, 220, 16, 214, 253, 45, 205, 220, 16, 236, 137, 236, 131, 45,
+ 205, 220, 16, 229, 19, 229, 18, 225, 2, 225, 61, 1, 74, 225, 2, 225, 61,
+ 1, 78, 225, 2, 225, 61, 1, 246, 199, 225, 2, 225, 61, 1, 221, 11, 225, 2,
+ 225, 61, 1, 207, 241, 225, 2, 225, 61, 1, 207, 229, 225, 2, 225, 61, 1,
+ 244, 120, 225, 2, 225, 61, 1, 244, 104, 225, 2, 225, 61, 1, 221, 227,
+ 225, 2, 225, 61, 1, 213, 90, 225, 2, 225, 61, 1, 211, 164, 225, 2, 225,
+ 61, 22, 2, 231, 83, 225, 2, 225, 61, 22, 2, 206, 178, 225, 2, 225, 61,
+ 22, 2, 251, 245, 225, 2, 225, 61, 22, 2, 250, 34, 225, 2, 225, 61, 22, 2,
+ 251, 238, 225, 2, 225, 61, 246, 159, 225, 2, 225, 61, 251, 70, 229, 107,
+ 225, 2, 225, 61, 250, 209, 225, 2, 225, 61, 4, 216, 98, 82, 225, 2, 225,
+ 61, 203, 238, 216, 98, 82, 225, 2, 225, 61, 22, 2, 205, 199, 225, 2, 225,
+ 61, 205, 204, 33, 4, 207, 222, 33, 4, 207, 225, 33, 4, 207, 228, 33, 4,
+ 207, 226, 33, 4, 207, 227, 33, 4, 207, 224, 33, 4, 244, 98, 33, 4, 244,
+ 100, 33, 4, 244, 103, 33, 4, 244, 101, 33, 4, 244, 102, 33, 4, 244, 99,
+ 33, 4, 241, 242, 33, 4, 241, 246, 33, 4, 241, 254, 33, 4, 241, 251, 33,
+ 4, 241, 252, 33, 4, 241, 243, 33, 4, 246, 252, 33, 4, 246, 246, 33, 4,
+ 246, 248, 33, 4, 246, 251, 33, 4, 246, 249, 33, 4, 246, 250, 33, 4, 246,
+ 247, 33, 4, 248, 198, 33, 4, 248, 177, 33, 4, 248, 189, 33, 4, 248, 197,
+ 33, 4, 248, 192, 33, 4, 248, 193, 33, 4, 248, 181, 8, 5, 1, 248, 225,
+ 251, 2, 8, 5, 1, 34, 216, 71, 8, 5, 1, 248, 39, 74, 8, 5, 1, 248, 225,
+ 74, 8, 5, 1, 188, 3, 239, 199, 8, 5, 1, 227, 187, 240, 174, 8, 5, 1, 132,
+ 239, 76, 3, 245, 126, 8, 5, 1, 228, 131, 3, 230, 239, 227, 241, 194, 8,
+ 5, 1, 228, 131, 3, 52, 101, 208, 227, 8, 5, 1, 228, 131, 3, 101, 215,
+ 252, 8, 5, 1, 226, 186, 3, 245, 126, 8, 5, 1, 223, 164, 3, 245, 126, 8,
+ 5, 1, 241, 79, 3, 245, 126, 8, 5, 1, 248, 39, 78, 8, 5, 1, 248, 39, 158,
+ 3, 95, 8, 5, 1, 171, 158, 3, 95, 8, 5, 1, 230, 239, 220, 73, 8, 5, 1,
+ 207, 174, 220, 74, 3, 95, 8, 5, 1, 207, 174, 220, 74, 3, 236, 106, 95, 8,
+ 5, 1, 207, 174, 158, 220, 4, 8, 5, 1, 207, 174, 158, 220, 5, 3, 95, 8, 5,
+ 1, 211, 66, 146, 8, 1, 5, 6, 217, 1, 3, 50, 227, 210, 8, 5, 1, 217, 1,
+ 204, 3, 237, 102, 8, 5, 1, 52, 146, 8, 5, 1, 217, 1, 3, 245, 126, 8, 5,
+ 1, 52, 217, 1, 3, 245, 126, 8, 5, 1, 132, 146, 8, 5, 1, 132, 217, 1, 3,
+ 215, 252, 8, 5, 1, 248, 216, 241, 7, 8, 5, 1, 106, 3, 212, 228, 50, 227,
+ 210, 8, 5, 1, 106, 248, 231, 3, 212, 228, 50, 227, 210, 8, 5, 1, 207, 17,
+ 8, 5, 1, 207, 174, 207, 17, 8, 5, 1, 106, 3, 49, 113, 8, 5, 1, 246, 142,
+ 8, 5, 1, 246, 143, 3, 124, 50, 215, 252, 8, 5, 1, 246, 143, 3, 124, 49,
+ 213, 125, 8, 5, 1, 203, 197, 3, 124, 50, 215, 252, 8, 5, 1, 203, 197, 3,
+ 163, 49, 227, 210, 8, 5, 1, 203, 197, 3, 163, 49, 227, 211, 25, 124, 50,
+ 215, 252, 8, 5, 1, 203, 197, 3, 163, 49, 227, 211, 3, 213, 125, 8, 5, 1,
+ 203, 125, 3, 212, 228, 50, 227, 210, 65, 247, 215, 3, 230, 239, 247, 214,
+ 65, 1, 5, 237, 31, 65, 1, 5, 228, 131, 3, 230, 239, 227, 241, 194, 65, 1,
+ 5, 228, 131, 3, 101, 208, 227, 65, 1, 5, 106, 3, 49, 113, 8, 5, 1, 215,
+ 11, 203, 66, 8, 5, 1, 230, 228, 74, 8, 5, 1, 171, 220, 73, 8, 5, 1, 206,
+ 228, 8, 5, 1, 230, 239, 251, 2, 30, 1, 5, 6, 220, 36, 90, 5, 1, 63, 90,
+ 5, 1, 74, 90, 5, 1, 75, 90, 5, 1, 78, 90, 5, 1, 68, 90, 5, 1, 206, 164,
+ 90, 5, 1, 239, 8, 90, 5, 1, 173, 90, 5, 1, 238, 190, 90, 5, 1, 238, 81,
+ 90, 5, 1, 238, 39, 90, 5, 1, 237, 230, 90, 5, 1, 237, 192, 90, 5, 1, 152,
+ 90, 5, 1, 237, 67, 90, 5, 1, 237, 3, 90, 5, 1, 236, 136, 90, 5, 1, 236,
+ 26, 90, 5, 1, 235, 255, 90, 5, 1, 228, 113, 90, 5, 1, 227, 234, 90, 5, 1,
+ 227, 148, 90, 5, 1, 227, 49, 90, 5, 1, 226, 239, 90, 5, 1, 226, 208, 90,
+ 5, 1, 192, 90, 5, 1, 225, 20, 90, 5, 1, 224, 155, 90, 5, 1, 224, 82, 90,
+ 5, 1, 223, 246, 90, 5, 1, 201, 201, 90, 5, 1, 236, 160, 90, 5, 1, 223,
+ 93, 90, 5, 1, 222, 240, 90, 5, 1, 222, 100, 90, 5, 1, 221, 191, 90, 5, 1,
+ 221, 84, 90, 5, 1, 221, 22, 90, 5, 1, 217, 64, 90, 5, 1, 217, 50, 90, 5,
+ 1, 217, 43, 90, 5, 1, 217, 34, 90, 5, 1, 217, 23, 90, 5, 1, 217, 21, 90,
+ 5, 1, 215, 36, 90, 5, 1, 194, 90, 5, 1, 214, 177, 90, 5, 1, 212, 162, 90,
+ 5, 1, 212, 13, 90, 5, 1, 211, 10, 90, 5, 1, 210, 177, 90, 5, 1, 244, 212,
+ 90, 5, 1, 210, 22, 90, 5, 1, 244, 75, 90, 5, 1, 209, 187, 90, 5, 1, 243,
+ 233, 90, 5, 1, 209, 2, 90, 5, 1, 243, 113, 90, 5, 1, 242, 42, 90, 5, 1,
+ 242, 13, 90, 5, 1, 243, 124, 90, 5, 1, 208, 190, 90, 5, 1, 208, 189, 90,
+ 5, 1, 208, 178, 90, 5, 1, 208, 177, 90, 5, 1, 208, 176, 90, 5, 1, 208,
+ 175, 90, 5, 1, 208, 20, 90, 5, 1, 208, 14, 90, 5, 1, 207, 255, 90, 5, 1,
+ 207, 253, 90, 5, 1, 207, 249, 90, 5, 1, 207, 248, 90, 5, 1, 204, 111, 90,
+ 5, 1, 204, 62, 90, 5, 1, 204, 30, 90, 5, 1, 204, 0, 90, 5, 1, 203, 217,
+ 90, 5, 1, 203, 204, 90, 5, 1, 198, 225, 2, 225, 61, 1, 229, 16, 225, 2,
+ 225, 61, 1, 214, 253, 225, 2, 225, 61, 1, 228, 86, 225, 2, 225, 61, 1,
+ 224, 93, 225, 2, 225, 61, 1, 185, 225, 2, 225, 61, 1, 201, 201, 225, 2,
+ 225, 61, 1, 246, 134, 225, 2, 225, 61, 1, 208, 229, 225, 2, 225, 61, 1,
+ 229, 110, 225, 2, 225, 61, 1, 222, 118, 225, 2, 225, 61, 1, 209, 39, 225,
+ 2, 225, 61, 1, 204, 105, 225, 2, 225, 61, 1, 203, 76, 225, 2, 225, 61, 1,
+ 236, 18, 225, 2, 225, 61, 1, 206, 255, 225, 2, 225, 61, 1, 75, 225, 2,
+ 225, 61, 1, 218, 202, 225, 2, 225, 61, 1, 250, 45, 225, 2, 225, 61, 1,
+ 238, 32, 225, 2, 225, 61, 1, 230, 147, 225, 2, 225, 61, 1, 216, 197, 225,
+ 2, 225, 61, 1, 249, 32, 225, 2, 225, 61, 1, 230, 133, 225, 2, 225, 61, 1,
+ 243, 190, 225, 2, 225, 61, 1, 238, 88, 225, 2, 225, 61, 1, 243, 235, 225,
+ 2, 225, 61, 1, 248, 96, 225, 2, 225, 61, 1, 229, 17, 227, 19, 225, 2,
+ 225, 61, 1, 228, 87, 227, 19, 225, 2, 225, 61, 1, 224, 94, 227, 19, 225,
+ 2, 225, 61, 1, 219, 169, 227, 19, 225, 2, 225, 61, 1, 223, 111, 227, 19,
+ 225, 2, 225, 61, 1, 208, 230, 227, 19, 225, 2, 225, 61, 1, 222, 119, 227,
+ 19, 225, 2, 225, 61, 1, 235, 206, 227, 19, 225, 2, 225, 61, 22, 2, 220,
+ 30, 225, 2, 225, 61, 22, 2, 231, 47, 225, 2, 225, 61, 22, 2, 250, 230,
+ 225, 2, 225, 61, 22, 2, 203, 41, 225, 2, 225, 61, 22, 2, 211, 242, 225,
+ 2, 225, 61, 22, 2, 206, 252, 225, 2, 225, 61, 22, 2, 246, 157, 225, 2,
+ 225, 61, 22, 2, 221, 37, 225, 2, 225, 61, 246, 158, 225, 2, 225, 61, 226,
+ 223, 230, 190, 225, 2, 225, 61, 250, 149, 230, 190, 225, 2, 225, 61, 17,
+ 202, 84, 225, 2, 225, 61, 17, 105, 225, 2, 225, 61, 17, 108, 225, 2, 225,
+ 61, 17, 147, 225, 2, 225, 61, 17, 149, 225, 2, 225, 61, 17, 170, 225, 2,
+ 225, 61, 17, 195, 225, 2, 225, 61, 17, 213, 111, 225, 2, 225, 61, 17,
+ 199, 225, 2, 225, 61, 17, 222, 63, 28, 176, 220, 174, 28, 176, 220, 179,
+ 28, 176, 202, 246, 28, 176, 202, 245, 28, 176, 202, 244, 28, 176, 207,
+ 89, 28, 176, 207, 93, 28, 176, 202, 211, 28, 176, 202, 207, 28, 176, 240,
+ 237, 28, 176, 240, 235, 28, 176, 240, 236, 28, 176, 240, 233, 28, 176,
+ 235, 196, 28, 176, 235, 195, 28, 176, 235, 193, 28, 176, 235, 194, 28,
+ 176, 235, 199, 28, 176, 235, 192, 28, 176, 235, 191, 28, 176, 235, 201,
+ 28, 176, 250, 136, 28, 176, 250, 135, 28, 107, 222, 86, 28, 107, 222, 92,
+ 28, 107, 211, 145, 28, 107, 211, 144, 28, 107, 208, 235, 28, 107, 208,
+ 233, 28, 107, 208, 232, 28, 107, 208, 238, 28, 107, 208, 239, 28, 107,
+ 208, 231, 28, 107, 216, 26, 28, 107, 216, 41, 28, 107, 211, 151, 28, 107,
+ 216, 38, 28, 107, 216, 28, 28, 107, 216, 30, 28, 107, 216, 17, 28, 107,
+ 216, 18, 28, 107, 229, 243, 28, 107, 224, 136, 28, 107, 224, 130, 28,
+ 107, 211, 155, 28, 107, 224, 133, 28, 107, 224, 139, 28, 107, 218, 134,
+ 28, 107, 218, 143, 28, 107, 218, 147, 28, 107, 211, 153, 28, 107, 218,
+ 137, 28, 107, 218, 151, 28, 107, 218, 152, 28, 107, 212, 103, 28, 107,
+ 212, 106, 28, 107, 211, 149, 28, 107, 211, 147, 28, 107, 212, 101, 28,
+ 107, 212, 109, 28, 107, 212, 110, 28, 107, 212, 95, 28, 107, 212, 108,
+ 28, 107, 219, 105, 28, 107, 219, 106, 28, 107, 203, 27, 28, 107, 203, 28,
+ 28, 107, 246, 72, 28, 107, 246, 71, 28, 107, 211, 160, 28, 107, 218, 187,
+ 28, 107, 218, 186, 12, 15, 233, 74, 12, 15, 233, 73, 12, 15, 233, 72, 12,
+ 15, 233, 71, 12, 15, 233, 70, 12, 15, 233, 69, 12, 15, 233, 68, 12, 15,
+ 233, 67, 12, 15, 233, 66, 12, 15, 233, 65, 12, 15, 233, 64, 12, 15, 233,
+ 63, 12, 15, 233, 62, 12, 15, 233, 61, 12, 15, 233, 60, 12, 15, 233, 59,
+ 12, 15, 233, 58, 12, 15, 233, 57, 12, 15, 233, 56, 12, 15, 233, 55, 12,
+ 15, 233, 54, 12, 15, 233, 53, 12, 15, 233, 52, 12, 15, 233, 51, 12, 15,
+ 233, 50, 12, 15, 233, 49, 12, 15, 233, 48, 12, 15, 233, 47, 12, 15, 233,
+ 46, 12, 15, 233, 45, 12, 15, 233, 44, 12, 15, 233, 43, 12, 15, 233, 42,
+ 12, 15, 233, 41, 12, 15, 233, 40, 12, 15, 233, 39, 12, 15, 233, 38, 12,
+ 15, 233, 37, 12, 15, 233, 36, 12, 15, 233, 35, 12, 15, 233, 34, 12, 15,
+ 233, 33, 12, 15, 233, 32, 12, 15, 233, 31, 12, 15, 233, 30, 12, 15, 233,
+ 29, 12, 15, 233, 28, 12, 15, 233, 27, 12, 15, 233, 26, 12, 15, 233, 25,
+ 12, 15, 233, 24, 12, 15, 233, 23, 12, 15, 233, 22, 12, 15, 233, 21, 12,
+ 15, 233, 20, 12, 15, 233, 19, 12, 15, 233, 18, 12, 15, 233, 17, 12, 15,
+ 233, 16, 12, 15, 233, 15, 12, 15, 233, 14, 12, 15, 233, 13, 12, 15, 233,
+ 12, 12, 15, 233, 11, 12, 15, 233, 10, 12, 15, 233, 9, 12, 15, 233, 8, 12,
+ 15, 233, 7, 12, 15, 233, 6, 12, 15, 233, 5, 12, 15, 233, 4, 12, 15, 233,
+ 3, 12, 15, 233, 2, 12, 15, 233, 1, 12, 15, 233, 0, 12, 15, 232, 255, 12,
+ 15, 232, 254, 12, 15, 232, 253, 12, 15, 232, 252, 12, 15, 232, 251, 12,
+ 15, 232, 250, 12, 15, 232, 249, 12, 15, 232, 248, 12, 15, 232, 247, 12,
+ 15, 232, 246, 12, 15, 232, 245, 12, 15, 232, 244, 12, 15, 232, 243, 12,
+ 15, 232, 242, 12, 15, 232, 241, 12, 15, 232, 240, 12, 15, 232, 239, 12,
+ 15, 232, 238, 12, 15, 232, 237, 12, 15, 232, 236, 12, 15, 232, 235, 12,
+ 15, 232, 234, 12, 15, 232, 233, 12, 15, 232, 232, 12, 15, 232, 231, 12,
+ 15, 232, 230, 12, 15, 232, 229, 12, 15, 232, 228, 12, 15, 232, 227, 12,
+ 15, 232, 226, 12, 15, 232, 225, 12, 15, 232, 224, 12, 15, 232, 223, 12,
+ 15, 232, 222, 12, 15, 232, 221, 12, 15, 232, 220, 12, 15, 232, 219, 12,
+ 15, 232, 218, 12, 15, 232, 217, 12, 15, 232, 216, 12, 15, 232, 215, 12,
+ 15, 232, 214, 12, 15, 232, 213, 12, 15, 232, 212, 12, 15, 232, 211, 12,
+ 15, 232, 210, 12, 15, 232, 209, 12, 15, 232, 208, 12, 15, 232, 207, 12,
+ 15, 232, 206, 12, 15, 232, 205, 12, 15, 232, 204, 12, 15, 232, 203, 12,
+ 15, 232, 202, 12, 15, 232, 201, 12, 15, 232, 200, 12, 15, 232, 199, 12,
+ 15, 232, 198, 12, 15, 232, 197, 12, 15, 232, 196, 12, 15, 232, 195, 12,
+ 15, 232, 194, 12, 15, 232, 193, 12, 15, 232, 192, 12, 15, 232, 191, 12,
+ 15, 232, 190, 12, 15, 232, 189, 12, 15, 232, 188, 12, 15, 232, 187, 12,
+ 15, 232, 186, 12, 15, 232, 185, 12, 15, 232, 184, 12, 15, 232, 183, 12,
+ 15, 232, 182, 12, 15, 232, 181, 12, 15, 232, 180, 12, 15, 232, 179, 12,
+ 15, 232, 178, 12, 15, 232, 177, 12, 15, 232, 176, 12, 15, 232, 175, 12,
+ 15, 232, 174, 12, 15, 232, 173, 12, 15, 232, 172, 12, 15, 232, 171, 12,
+ 15, 232, 170, 12, 15, 232, 169, 12, 15, 232, 168, 12, 15, 232, 167, 12,
+ 15, 232, 166, 12, 15, 232, 165, 12, 15, 232, 164, 12, 15, 232, 163, 12,
+ 15, 232, 162, 12, 15, 232, 161, 12, 15, 232, 160, 12, 15, 232, 159, 12,
+ 15, 232, 158, 12, 15, 232, 157, 12, 15, 232, 156, 12, 15, 232, 155, 12,
+ 15, 232, 154, 12, 15, 232, 153, 12, 15, 232, 152, 12, 15, 232, 151, 12,
+ 15, 232, 150, 12, 15, 232, 149, 12, 15, 232, 148, 12, 15, 232, 147, 12,
+ 15, 232, 146, 12, 15, 232, 145, 12, 15, 232, 144, 12, 15, 232, 143, 12,
+ 15, 232, 142, 12, 15, 232, 141, 12, 15, 232, 140, 12, 15, 232, 139, 12,
+ 15, 232, 138, 12, 15, 232, 137, 12, 15, 232, 136, 12, 15, 232, 135, 12,
+ 15, 232, 134, 12, 15, 232, 133, 12, 15, 232, 132, 12, 15, 232, 131, 12,
+ 15, 232, 130, 12, 15, 232, 129, 12, 15, 232, 128, 12, 15, 232, 127, 12,
+ 15, 232, 126, 12, 15, 232, 125, 12, 15, 232, 124, 12, 15, 232, 123, 12,
+ 15, 232, 122, 12, 15, 232, 121, 12, 15, 232, 120, 12, 15, 232, 119, 12,
+ 15, 232, 118, 12, 15, 232, 117, 12, 15, 232, 116, 12, 15, 232, 115, 12,
+ 15, 232, 114, 12, 15, 232, 113, 12, 15, 232, 112, 12, 15, 232, 111, 12,
+ 15, 232, 110, 12, 15, 232, 109, 12, 15, 232, 108, 12, 15, 232, 107, 12,
+ 15, 232, 106, 12, 15, 232, 105, 12, 15, 232, 104, 12, 15, 232, 103, 12,
+ 15, 232, 102, 12, 15, 232, 101, 12, 15, 232, 100, 12, 15, 232, 99, 12,
+ 15, 232, 98, 12, 15, 232, 97, 12, 15, 232, 96, 12, 15, 232, 95, 12, 15,
+ 232, 94, 12, 15, 232, 93, 12, 15, 232, 92, 12, 15, 232, 91, 12, 15, 232,
+ 90, 12, 15, 232, 89, 12, 15, 232, 88, 12, 15, 232, 87, 12, 15, 232, 86,
+ 12, 15, 232, 85, 12, 15, 232, 84, 12, 15, 232, 83, 12, 15, 232, 82, 12,
+ 15, 232, 81, 12, 15, 232, 80, 12, 15, 232, 79, 12, 15, 232, 78, 12, 15,
+ 232, 77, 12, 15, 232, 76, 12, 15, 232, 75, 12, 15, 232, 74, 12, 15, 232,
+ 73, 12, 15, 232, 72, 12, 15, 232, 71, 12, 15, 232, 70, 12, 15, 232, 69,
+ 12, 15, 232, 68, 12, 15, 232, 67, 12, 15, 232, 66, 12, 15, 232, 65, 12,
+ 15, 232, 64, 12, 15, 232, 63, 12, 15, 232, 62, 12, 15, 232, 61, 12, 15,
+ 232, 60, 12, 15, 232, 59, 12, 15, 232, 58, 12, 15, 232, 57, 12, 15, 232,
+ 56, 12, 15, 232, 55, 12, 15, 232, 54, 12, 15, 232, 53, 12, 15, 232, 52,
+ 12, 15, 232, 51, 12, 15, 232, 50, 12, 15, 232, 49, 12, 15, 232, 48, 12,
+ 15, 232, 47, 12, 15, 232, 46, 12, 15, 232, 45, 12, 15, 232, 44, 12, 15,
+ 232, 43, 12, 15, 232, 42, 12, 15, 232, 41, 12, 15, 232, 40, 12, 15, 232,
+ 39, 12, 15, 232, 38, 12, 15, 232, 37, 12, 15, 232, 36, 12, 15, 232, 35,
+ 12, 15, 232, 34, 12, 15, 232, 33, 12, 15, 232, 32, 12, 15, 232, 31, 12,
+ 15, 232, 30, 12, 15, 232, 29, 12, 15, 232, 28, 12, 15, 232, 27, 12, 15,
+ 232, 26, 12, 15, 232, 25, 12, 15, 232, 24, 12, 15, 232, 23, 12, 15, 232,
+ 22, 12, 15, 232, 21, 12, 15, 232, 20, 12, 15, 232, 19, 12, 15, 232, 18,
+ 12, 15, 232, 17, 12, 15, 232, 16, 12, 15, 232, 15, 12, 15, 232, 14, 12,
+ 15, 232, 13, 12, 15, 232, 12, 12, 15, 232, 11, 12, 15, 232, 10, 12, 15,
+ 232, 9, 12, 15, 232, 8, 12, 15, 232, 7, 12, 15, 232, 6, 12, 15, 232, 5,
+ 12, 15, 232, 4, 12, 15, 232, 3, 12, 15, 232, 2, 12, 15, 232, 1, 12, 15,
+ 232, 0, 12, 15, 231, 255, 12, 15, 231, 254, 12, 15, 231, 253, 12, 15,
+ 231, 252, 12, 15, 231, 251, 12, 15, 231, 250, 12, 15, 231, 249, 12, 15,
+ 231, 248, 12, 15, 231, 247, 12, 15, 231, 246, 12, 15, 231, 245, 12, 15,
+ 231, 244, 12, 15, 231, 243, 12, 15, 231, 242, 12, 15, 231, 241, 12, 15,
+ 231, 240, 12, 15, 231, 239, 12, 15, 231, 238, 12, 15, 231, 237, 12, 15,
+ 231, 236, 12, 15, 231, 235, 12, 15, 231, 234, 12, 15, 231, 233, 12, 15,
+ 231, 232, 12, 15, 231, 231, 12, 15, 231, 230, 12, 15, 231, 229, 12, 15,
+ 231, 228, 12, 15, 231, 227, 12, 15, 231, 226, 12, 15, 231, 225, 12, 15,
+ 231, 224, 12, 15, 231, 223, 12, 15, 231, 222, 12, 15, 231, 221, 12, 15,
+ 231, 220, 12, 15, 231, 219, 12, 15, 231, 218, 12, 15, 231, 217, 12, 15,
+ 231, 216, 12, 15, 231, 215, 12, 15, 231, 214, 12, 15, 231, 213, 12, 15,
+ 231, 212, 12, 15, 231, 211, 12, 15, 231, 210, 12, 15, 231, 209, 12, 15,
+ 231, 208, 12, 15, 231, 207, 12, 15, 231, 206, 12, 15, 231, 205, 12, 15,
+ 231, 204, 12, 15, 231, 203, 12, 15, 231, 202, 12, 15, 231, 201, 12, 15,
+ 231, 200, 12, 15, 231, 199, 12, 15, 231, 198, 12, 15, 231, 197, 12, 15,
+ 231, 196, 12, 15, 231, 195, 12, 15, 231, 194, 12, 15, 231, 193, 12, 15,
+ 231, 192, 12, 15, 231, 191, 12, 15, 231, 190, 12, 15, 231, 189, 12, 15,
+ 231, 188, 12, 15, 231, 187, 12, 15, 231, 186, 12, 15, 231, 185, 12, 15,
+ 231, 184, 12, 15, 231, 183, 12, 15, 231, 182, 12, 15, 231, 181, 12, 15,
+ 231, 180, 12, 15, 231, 179, 12, 15, 231, 178, 12, 15, 231, 177, 12, 15,
+ 231, 176, 12, 15, 231, 175, 12, 15, 231, 174, 12, 15, 231, 173, 12, 15,
+ 231, 172, 12, 15, 231, 171, 12, 15, 231, 170, 12, 15, 231, 169, 12, 15,
+ 231, 168, 12, 15, 231, 167, 12, 15, 231, 166, 12, 15, 231, 165, 12, 15,
+ 231, 164, 12, 15, 231, 163, 12, 15, 231, 162, 12, 15, 231, 161, 12, 15,
+ 231, 160, 12, 15, 231, 159, 12, 15, 231, 158, 12, 15, 231, 157, 12, 15,
+ 231, 156, 12, 15, 231, 155, 12, 15, 231, 154, 12, 15, 231, 153, 12, 15,
+ 231, 152, 12, 15, 231, 151, 12, 15, 231, 150, 12, 15, 231, 149, 12, 15,
+ 231, 148, 12, 15, 231, 147, 12, 15, 231, 146, 12, 15, 231, 145, 12, 15,
+ 231, 144, 12, 15, 231, 143, 12, 15, 231, 142, 12, 15, 231, 141, 12, 15,
+ 231, 140, 12, 15, 231, 139, 12, 15, 231, 138, 12, 15, 231, 137, 12, 15,
+ 231, 136, 12, 15, 231, 135, 12, 15, 231, 134, 12, 15, 231, 133, 12, 15,
+ 231, 132, 12, 15, 231, 131, 12, 15, 231, 130, 12, 15, 231, 129, 12, 15,
+ 231, 128, 12, 15, 231, 127, 12, 15, 231, 126, 12, 15, 231, 125, 12, 15,
+ 231, 124, 12, 15, 231, 123, 12, 15, 231, 122, 12, 15, 231, 121, 12, 15,
+ 231, 120, 12, 15, 231, 119, 12, 15, 231, 118, 12, 15, 231, 117, 12, 15,
+ 231, 116, 12, 15, 231, 115, 8, 5, 32, 240, 30, 8, 5, 32, 240, 26, 8, 5,
+ 32, 239, 228, 8, 5, 32, 240, 29, 8, 5, 32, 240, 28, 8, 5, 32, 163, 215,
+ 94, 210, 69, 8, 5, 32, 211, 108, 178, 5, 32, 224, 241, 221, 152, 178, 5,
+ 32, 224, 241, 241, 167, 178, 5, 32, 224, 241, 231, 19, 178, 5, 32, 205,
+ 235, 221, 152, 178, 5, 32, 224, 241, 203, 174, 110, 1, 202, 237, 3, 236,
+ 232, 110, 218, 63, 230, 81, 206, 67, 110, 32, 203, 9, 202, 237, 202, 237,
+ 219, 54, 110, 1, 250, 250, 250, 3, 110, 1, 204, 27, 251, 30, 110, 1, 204,
+ 27, 244, 178, 110, 1, 204, 27, 237, 67, 110, 1, 204, 27, 230, 22, 110, 1,
+ 204, 27, 228, 20, 110, 1, 204, 27, 46, 224, 247, 110, 1, 204, 27, 216,
+ 91, 110, 1, 204, 27, 209, 203, 110, 1, 250, 250, 91, 54, 110, 1, 213, 0,
+ 3, 213, 0, 243, 85, 110, 1, 213, 0, 3, 212, 124, 243, 85, 110, 1, 213, 0,
+ 3, 244, 198, 25, 213, 0, 243, 85, 110, 1, 213, 0, 3, 244, 198, 25, 212,
+ 124, 243, 85, 110, 1, 137, 3, 219, 54, 110, 1, 137, 3, 217, 114, 110, 1,
+ 137, 3, 225, 105, 110, 1, 248, 109, 3, 244, 197, 110, 1, 238, 68, 3, 244,
+ 197, 110, 1, 244, 179, 3, 244, 197, 110, 1, 237, 68, 3, 225, 105, 110, 1,
+ 206, 60, 3, 244, 197, 110, 1, 202, 96, 3, 244, 197, 110, 1, 209, 133, 3,
+ 244, 197, 110, 1, 202, 237, 3, 244, 197, 110, 1, 46, 230, 23, 3, 244,
+ 197, 110, 1, 230, 23, 3, 244, 197, 110, 1, 228, 21, 3, 244, 197, 110, 1,
+ 224, 248, 3, 244, 197, 110, 1, 221, 41, 3, 244, 197, 110, 1, 214, 250, 3,
+ 244, 197, 110, 1, 46, 219, 35, 3, 244, 197, 110, 1, 219, 35, 3, 244, 197,
+ 110, 1, 208, 16, 3, 244, 197, 110, 1, 217, 75, 3, 244, 197, 110, 1, 216,
+ 92, 3, 244, 197, 110, 1, 213, 0, 3, 244, 197, 110, 1, 209, 204, 3, 244,
+ 197, 110, 1, 206, 60, 3, 236, 128, 110, 1, 248, 109, 3, 216, 200, 110, 1,
+ 230, 23, 3, 216, 200, 110, 1, 219, 35, 3, 216, 200, 110, 32, 137, 228,
+ 20, 10, 1, 137, 204, 88, 64, 18, 10, 1, 137, 204, 88, 46, 18, 10, 1, 248,
+ 149, 64, 18, 10, 1, 248, 149, 46, 18, 10, 1, 248, 149, 81, 18, 10, 1,
+ 248, 149, 174, 18, 10, 1, 219, 17, 64, 18, 10, 1, 219, 17, 46, 18, 10, 1,
+ 219, 17, 81, 18, 10, 1, 219, 17, 174, 18, 10, 1, 248, 137, 64, 18, 10, 1,
+ 248, 137, 46, 18, 10, 1, 248, 137, 81, 18, 10, 1, 248, 137, 174, 18, 10,
+ 1, 207, 232, 64, 18, 10, 1, 207, 232, 46, 18, 10, 1, 207, 232, 81, 18,
+ 10, 1, 207, 232, 174, 18, 10, 1, 209, 168, 64, 18, 10, 1, 209, 168, 46,
+ 18, 10, 1, 209, 168, 81, 18, 10, 1, 209, 168, 174, 18, 10, 1, 207, 234,
+ 64, 18, 10, 1, 207, 234, 46, 18, 10, 1, 207, 234, 81, 18, 10, 1, 207,
+ 234, 174, 18, 10, 1, 206, 49, 64, 18, 10, 1, 206, 49, 46, 18, 10, 1, 206,
+ 49, 81, 18, 10, 1, 206, 49, 174, 18, 10, 1, 219, 15, 64, 18, 10, 1, 219,
+ 15, 46, 18, 10, 1, 219, 15, 81, 18, 10, 1, 219, 15, 174, 18, 10, 1, 242,
+ 6, 64, 18, 10, 1, 242, 6, 46, 18, 10, 1, 242, 6, 81, 18, 10, 1, 242, 6,
+ 174, 18, 10, 1, 220, 255, 64, 18, 10, 1, 220, 255, 46, 18, 10, 1, 220,
+ 255, 81, 18, 10, 1, 220, 255, 174, 18, 10, 1, 209, 192, 64, 18, 10, 1,
+ 209, 192, 46, 18, 10, 1, 209, 192, 81, 18, 10, 1, 209, 192, 174, 18, 10,
+ 1, 209, 190, 64, 18, 10, 1, 209, 190, 46, 18, 10, 1, 209, 190, 81, 18,
+ 10, 1, 209, 190, 174, 18, 10, 1, 244, 118, 64, 18, 10, 1, 244, 118, 46,
+ 18, 10, 1, 244, 192, 64, 18, 10, 1, 244, 192, 46, 18, 10, 1, 242, 34, 64,
+ 18, 10, 1, 242, 34, 46, 18, 10, 1, 244, 116, 64, 18, 10, 1, 244, 116, 46,
+ 18, 10, 1, 230, 156, 64, 18, 10, 1, 230, 156, 46, 18, 10, 1, 215, 178,
+ 64, 18, 10, 1, 215, 178, 46, 18, 10, 1, 229, 190, 64, 18, 10, 1, 229,
+ 190, 46, 18, 10, 1, 229, 190, 81, 18, 10, 1, 229, 190, 174, 18, 10, 1,
+ 238, 252, 64, 18, 10, 1, 238, 252, 46, 18, 10, 1, 238, 252, 81, 18, 10,
+ 1, 238, 252, 174, 18, 10, 1, 237, 218, 64, 18, 10, 1, 237, 218, 46, 18,
+ 10, 1, 237, 218, 81, 18, 10, 1, 237, 218, 174, 18, 10, 1, 222, 127, 64,
+ 18, 10, 1, 222, 127, 46, 18, 10, 1, 222, 127, 81, 18, 10, 1, 222, 127,
+ 174, 18, 10, 1, 221, 179, 238, 86, 64, 18, 10, 1, 221, 179, 238, 86, 46,
+ 18, 10, 1, 215, 231, 64, 18, 10, 1, 215, 231, 46, 18, 10, 1, 215, 231,
+ 81, 18, 10, 1, 215, 231, 174, 18, 10, 1, 237, 44, 3, 89, 87, 64, 18, 10,
+ 1, 237, 44, 3, 89, 87, 46, 18, 10, 1, 237, 44, 238, 37, 64, 18, 10, 1,
+ 237, 44, 238, 37, 46, 18, 10, 1, 237, 44, 238, 37, 81, 18, 10, 1, 237,
+ 44, 238, 37, 174, 18, 10, 1, 237, 44, 243, 110, 64, 18, 10, 1, 237, 44,
+ 243, 110, 46, 18, 10, 1, 237, 44, 243, 110, 81, 18, 10, 1, 237, 44, 243,
+ 110, 174, 18, 10, 1, 89, 248, 224, 64, 18, 10, 1, 89, 248, 224, 46, 18,
+ 10, 1, 89, 248, 224, 3, 237, 128, 87, 64, 18, 10, 1, 89, 248, 224, 3,
+ 237, 128, 87, 46, 18, 10, 16, 70, 55, 10, 16, 70, 56, 10, 16, 120, 187,
+ 55, 10, 16, 120, 187, 56, 10, 16, 126, 187, 55, 10, 16, 126, 187, 56, 10,
+ 16, 126, 187, 218, 59, 183, 55, 10, 16, 126, 187, 218, 59, 183, 56, 10,
+ 16, 239, 147, 187, 55, 10, 16, 239, 147, 187, 56, 10, 16, 52, 80, 248,
+ 231, 56, 10, 16, 120, 187, 205, 244, 55, 10, 16, 120, 187, 205, 244, 56,
+ 10, 16, 215, 252, 10, 16, 5, 209, 252, 55, 10, 16, 5, 209, 252, 56, 10,
+ 1, 222, 206, 64, 18, 10, 1, 222, 206, 46, 18, 10, 1, 222, 206, 81, 18,
+ 10, 1, 222, 206, 174, 18, 10, 1, 106, 64, 18, 10, 1, 106, 46, 18, 10, 1,
+ 220, 74, 64, 18, 10, 1, 220, 74, 46, 18, 10, 1, 202, 214, 64, 18, 10, 1,
+ 202, 214, 46, 18, 10, 1, 106, 3, 237, 128, 87, 64, 18, 10, 1, 206, 56,
+ 64, 18, 10, 1, 206, 56, 46, 18, 10, 1, 229, 76, 220, 74, 64, 18, 10, 1,
+ 229, 76, 220, 74, 46, 18, 10, 1, 229, 76, 202, 214, 64, 18, 10, 1, 229,
+ 76, 202, 214, 46, 18, 10, 1, 188, 64, 18, 10, 1, 188, 46, 18, 10, 1, 188,
+ 81, 18, 10, 1, 188, 174, 18, 10, 1, 207, 16, 229, 205, 229, 76, 137, 225,
+ 130, 81, 18, 10, 1, 207, 16, 229, 205, 229, 76, 137, 225, 130, 174, 18,
+ 10, 32, 89, 3, 237, 128, 87, 3, 137, 64, 18, 10, 32, 89, 3, 237, 128, 87,
+ 3, 137, 46, 18, 10, 32, 89, 3, 237, 128, 87, 3, 251, 110, 64, 18, 10, 32,
+ 89, 3, 237, 128, 87, 3, 251, 110, 46, 18, 10, 32, 89, 3, 237, 128, 87, 3,
+ 204, 71, 64, 18, 10, 32, 89, 3, 237, 128, 87, 3, 204, 71, 46, 18, 10, 32,
+ 89, 3, 237, 128, 87, 3, 106, 64, 18, 10, 32, 89, 3, 237, 128, 87, 3, 106,
+ 46, 18, 10, 32, 89, 3, 237, 128, 87, 3, 220, 74, 64, 18, 10, 32, 89, 3,
+ 237, 128, 87, 3, 220, 74, 46, 18, 10, 32, 89, 3, 237, 128, 87, 3, 202,
+ 214, 64, 18, 10, 32, 89, 3, 237, 128, 87, 3, 202, 214, 46, 18, 10, 32,
+ 89, 3, 237, 128, 87, 3, 188, 64, 18, 10, 32, 89, 3, 237, 128, 87, 3, 188,
+ 46, 18, 10, 32, 89, 3, 237, 128, 87, 3, 188, 81, 18, 10, 32, 207, 16,
+ 229, 76, 89, 3, 237, 128, 87, 3, 137, 225, 130, 64, 18, 10, 32, 207, 16,
+ 229, 76, 89, 3, 237, 128, 87, 3, 137, 225, 130, 46, 18, 10, 32, 207, 16,
+ 229, 76, 89, 3, 237, 128, 87, 3, 137, 225, 130, 81, 18, 10, 1, 240, 75,
+ 89, 64, 18, 10, 1, 240, 75, 89, 46, 18, 10, 1, 240, 75, 89, 81, 18, 10,
+ 1, 240, 75, 89, 174, 18, 10, 32, 89, 3, 237, 128, 87, 3, 184, 64, 18, 10,
+ 32, 89, 3, 237, 128, 87, 3, 151, 64, 18, 10, 32, 89, 3, 237, 128, 87, 3,
+ 83, 64, 18, 10, 32, 89, 3, 237, 128, 87, 3, 137, 225, 130, 64, 18, 10,
+ 32, 89, 3, 237, 128, 87, 3, 89, 64, 18, 10, 32, 248, 139, 3, 184, 64, 18,
+ 10, 32, 248, 139, 3, 151, 64, 18, 10, 32, 248, 139, 3, 229, 141, 64, 18,
+ 10, 32, 248, 139, 3, 83, 64, 18, 10, 32, 248, 139, 3, 137, 225, 130, 64,
+ 18, 10, 32, 248, 139, 3, 89, 64, 18, 10, 32, 209, 170, 3, 184, 64, 18,
+ 10, 32, 209, 170, 3, 151, 64, 18, 10, 32, 209, 170, 3, 229, 141, 64, 18,
+ 10, 32, 209, 170, 3, 83, 64, 18, 10, 32, 209, 170, 3, 137, 225, 130, 64,
+ 18, 10, 32, 209, 170, 3, 89, 64, 18, 10, 32, 209, 89, 3, 184, 64, 18, 10,
+ 32, 209, 89, 3, 83, 64, 18, 10, 32, 209, 89, 3, 137, 225, 130, 64, 18,
+ 10, 32, 209, 89, 3, 89, 64, 18, 10, 32, 184, 3, 151, 64, 18, 10, 32, 184,
+ 3, 83, 64, 18, 10, 32, 151, 3, 184, 64, 18, 10, 32, 151, 3, 83, 64, 18,
+ 10, 32, 229, 141, 3, 184, 64, 18, 10, 32, 229, 141, 3, 151, 64, 18, 10,
+ 32, 229, 141, 3, 83, 64, 18, 10, 32, 214, 162, 3, 184, 64, 18, 10, 32,
+ 214, 162, 3, 151, 64, 18, 10, 32, 214, 162, 3, 229, 141, 64, 18, 10, 32,
+ 214, 162, 3, 83, 64, 18, 10, 32, 215, 29, 3, 151, 64, 18, 10, 32, 215,
+ 29, 3, 83, 64, 18, 10, 32, 244, 208, 3, 184, 64, 18, 10, 32, 244, 208, 3,
+ 151, 64, 18, 10, 32, 244, 208, 3, 229, 141, 64, 18, 10, 32, 244, 208, 3,
+ 83, 64, 18, 10, 32, 209, 252, 3, 151, 64, 18, 10, 32, 209, 252, 3, 83,
+ 64, 18, 10, 32, 202, 111, 3, 83, 64, 18, 10, 32, 251, 60, 3, 184, 64, 18,
+ 10, 32, 251, 60, 3, 83, 64, 18, 10, 32, 238, 115, 3, 184, 64, 18, 10, 32,
+ 238, 115, 3, 83, 64, 18, 10, 32, 240, 48, 3, 184, 64, 18, 10, 32, 240,
+ 48, 3, 151, 64, 18, 10, 32, 240, 48, 3, 229, 141, 64, 18, 10, 32, 240,
+ 48, 3, 83, 64, 18, 10, 32, 240, 48, 3, 137, 225, 130, 64, 18, 10, 32,
+ 240, 48, 3, 89, 64, 18, 10, 32, 217, 120, 3, 151, 64, 18, 10, 32, 217,
+ 120, 3, 83, 64, 18, 10, 32, 217, 120, 3, 137, 225, 130, 64, 18, 10, 32,
+ 217, 120, 3, 89, 64, 18, 10, 32, 230, 23, 3, 137, 64, 18, 10, 32, 230,
+ 23, 3, 184, 64, 18, 10, 32, 230, 23, 3, 151, 64, 18, 10, 32, 230, 23, 3,
+ 229, 141, 64, 18, 10, 32, 230, 23, 3, 228, 29, 64, 18, 10, 32, 230, 23,
+ 3, 83, 64, 18, 10, 32, 230, 23, 3, 137, 225, 130, 64, 18, 10, 32, 230,
+ 23, 3, 89, 64, 18, 10, 32, 228, 29, 3, 184, 64, 18, 10, 32, 228, 29, 3,
+ 151, 64, 18, 10, 32, 228, 29, 3, 229, 141, 64, 18, 10, 32, 228, 29, 3,
+ 83, 64, 18, 10, 32, 228, 29, 3, 137, 225, 130, 64, 18, 10, 32, 228, 29,
+ 3, 89, 64, 18, 10, 32, 83, 3, 184, 64, 18, 10, 32, 83, 3, 151, 64, 18,
+ 10, 32, 83, 3, 229, 141, 64, 18, 10, 32, 83, 3, 83, 64, 18, 10, 32, 83,
+ 3, 137, 225, 130, 64, 18, 10, 32, 83, 3, 89, 64, 18, 10, 32, 221, 179, 3,
+ 184, 64, 18, 10, 32, 221, 179, 3, 151, 64, 18, 10, 32, 221, 179, 3, 229,
+ 141, 64, 18, 10, 32, 221, 179, 3, 83, 64, 18, 10, 32, 221, 179, 3, 137,
+ 225, 130, 64, 18, 10, 32, 221, 179, 3, 89, 64, 18, 10, 32, 237, 44, 3,
+ 184, 64, 18, 10, 32, 237, 44, 3, 83, 64, 18, 10, 32, 237, 44, 3, 137,
+ 225, 130, 64, 18, 10, 32, 237, 44, 3, 89, 64, 18, 10, 32, 89, 3, 184, 64,
+ 18, 10, 32, 89, 3, 151, 64, 18, 10, 32, 89, 3, 229, 141, 64, 18, 10, 32,
+ 89, 3, 83, 64, 18, 10, 32, 89, 3, 137, 225, 130, 64, 18, 10, 32, 89, 3,
+ 89, 64, 18, 10, 32, 209, 101, 3, 210, 199, 137, 64, 18, 10, 32, 216, 123,
+ 3, 210, 199, 137, 64, 18, 10, 32, 137, 225, 130, 3, 210, 199, 137, 64,
+ 18, 10, 32, 213, 81, 3, 244, 171, 64, 18, 10, 32, 213, 81, 3, 229, 228,
+ 64, 18, 10, 32, 213, 81, 3, 240, 72, 64, 18, 10, 32, 213, 81, 3, 244,
+ 173, 64, 18, 10, 32, 213, 81, 3, 229, 230, 64, 18, 10, 32, 213, 81, 3,
+ 210, 199, 137, 64, 18, 10, 32, 89, 3, 237, 128, 87, 3, 216, 123, 46, 18,
+ 10, 32, 89, 3, 237, 128, 87, 3, 202, 108, 46, 18, 10, 32, 89, 3, 237,
+ 128, 87, 3, 83, 46, 18, 10, 32, 89, 3, 237, 128, 87, 3, 221, 179, 46, 18,
+ 10, 32, 89, 3, 237, 128, 87, 3, 137, 225, 130, 46, 18, 10, 32, 89, 3,
+ 237, 128, 87, 3, 89, 46, 18, 10, 32, 248, 139, 3, 216, 123, 46, 18, 10,
+ 32, 248, 139, 3, 202, 108, 46, 18, 10, 32, 248, 139, 3, 83, 46, 18, 10,
+ 32, 248, 139, 3, 221, 179, 46, 18, 10, 32, 248, 139, 3, 137, 225, 130,
+ 46, 18, 10, 32, 248, 139, 3, 89, 46, 18, 10, 32, 209, 170, 3, 216, 123,
+ 46, 18, 10, 32, 209, 170, 3, 202, 108, 46, 18, 10, 32, 209, 170, 3, 83,
+ 46, 18, 10, 32, 209, 170, 3, 221, 179, 46, 18, 10, 32, 209, 170, 3, 137,
+ 225, 130, 46, 18, 10, 32, 209, 170, 3, 89, 46, 18, 10, 32, 209, 89, 3,
+ 216, 123, 46, 18, 10, 32, 209, 89, 3, 202, 108, 46, 18, 10, 32, 209, 89,
+ 3, 83, 46, 18, 10, 32, 209, 89, 3, 221, 179, 46, 18, 10, 32, 209, 89, 3,
+ 137, 225, 130, 46, 18, 10, 32, 209, 89, 3, 89, 46, 18, 10, 32, 240, 48,
+ 3, 137, 225, 130, 46, 18, 10, 32, 240, 48, 3, 89, 46, 18, 10, 32, 217,
+ 120, 3, 137, 225, 130, 46, 18, 10, 32, 217, 120, 3, 89, 46, 18, 10, 32,
+ 230, 23, 3, 137, 46, 18, 10, 32, 230, 23, 3, 228, 29, 46, 18, 10, 32,
+ 230, 23, 3, 83, 46, 18, 10, 32, 230, 23, 3, 137, 225, 130, 46, 18, 10,
+ 32, 230, 23, 3, 89, 46, 18, 10, 32, 228, 29, 3, 83, 46, 18, 10, 32, 228,
+ 29, 3, 137, 225, 130, 46, 18, 10, 32, 228, 29, 3, 89, 46, 18, 10, 32, 83,
+ 3, 137, 46, 18, 10, 32, 83, 3, 83, 46, 18, 10, 32, 221, 179, 3, 216, 123,
+ 46, 18, 10, 32, 221, 179, 3, 202, 108, 46, 18, 10, 32, 221, 179, 3, 83,
+ 46, 18, 10, 32, 221, 179, 3, 221, 179, 46, 18, 10, 32, 221, 179, 3, 137,
+ 225, 130, 46, 18, 10, 32, 221, 179, 3, 89, 46, 18, 10, 32, 137, 225, 130,
+ 3, 210, 199, 137, 46, 18, 10, 32, 89, 3, 216, 123, 46, 18, 10, 32, 89, 3,
+ 202, 108, 46, 18, 10, 32, 89, 3, 83, 46, 18, 10, 32, 89, 3, 221, 179, 46,
+ 18, 10, 32, 89, 3, 137, 225, 130, 46, 18, 10, 32, 89, 3, 89, 46, 18, 10,
+ 32, 89, 3, 237, 128, 87, 3, 184, 81, 18, 10, 32, 89, 3, 237, 128, 87, 3,
+ 151, 81, 18, 10, 32, 89, 3, 237, 128, 87, 3, 229, 141, 81, 18, 10, 32,
+ 89, 3, 237, 128, 87, 3, 83, 81, 18, 10, 32, 89, 3, 237, 128, 87, 3, 237,
+ 44, 81, 18, 10, 32, 248, 139, 3, 184, 81, 18, 10, 32, 248, 139, 3, 151,
+ 81, 18, 10, 32, 248, 139, 3, 229, 141, 81, 18, 10, 32, 248, 139, 3, 83,
+ 81, 18, 10, 32, 248, 139, 3, 237, 44, 81, 18, 10, 32, 209, 170, 3, 184,
+ 81, 18, 10, 32, 209, 170, 3, 151, 81, 18, 10, 32, 209, 170, 3, 229, 141,
+ 81, 18, 10, 32, 209, 170, 3, 83, 81, 18, 10, 32, 209, 170, 3, 237, 44,
+ 81, 18, 10, 32, 209, 89, 3, 83, 81, 18, 10, 32, 184, 3, 151, 81, 18, 10,
+ 32, 184, 3, 83, 81, 18, 10, 32, 151, 3, 184, 81, 18, 10, 32, 151, 3, 83,
+ 81, 18, 10, 32, 229, 141, 3, 184, 81, 18, 10, 32, 229, 141, 3, 83, 81,
+ 18, 10, 32, 214, 162, 3, 184, 81, 18, 10, 32, 214, 162, 3, 151, 81, 18,
+ 10, 32, 214, 162, 3, 229, 141, 81, 18, 10, 32, 214, 162, 3, 83, 81, 18,
+ 10, 32, 215, 29, 3, 151, 81, 18, 10, 32, 215, 29, 3, 229, 141, 81, 18,
+ 10, 32, 215, 29, 3, 83, 81, 18, 10, 32, 244, 208, 3, 184, 81, 18, 10, 32,
+ 244, 208, 3, 151, 81, 18, 10, 32, 244, 208, 3, 229, 141, 81, 18, 10, 32,
+ 244, 208, 3, 83, 81, 18, 10, 32, 209, 252, 3, 151, 81, 18, 10, 32, 202,
+ 111, 3, 83, 81, 18, 10, 32, 251, 60, 3, 184, 81, 18, 10, 32, 251, 60, 3,
+ 83, 81, 18, 10, 32, 238, 115, 3, 184, 81, 18, 10, 32, 238, 115, 3, 83,
+ 81, 18, 10, 32, 240, 48, 3, 184, 81, 18, 10, 32, 240, 48, 3, 151, 81, 18,
+ 10, 32, 240, 48, 3, 229, 141, 81, 18, 10, 32, 240, 48, 3, 83, 81, 18, 10,
+ 32, 217, 120, 3, 151, 81, 18, 10, 32, 217, 120, 3, 83, 81, 18, 10, 32,
+ 230, 23, 3, 184, 81, 18, 10, 32, 230, 23, 3, 151, 81, 18, 10, 32, 230,
+ 23, 3, 229, 141, 81, 18, 10, 32, 230, 23, 3, 228, 29, 81, 18, 10, 32,
+ 230, 23, 3, 83, 81, 18, 10, 32, 228, 29, 3, 184, 81, 18, 10, 32, 228, 29,
+ 3, 151, 81, 18, 10, 32, 228, 29, 3, 229, 141, 81, 18, 10, 32, 228, 29, 3,
+ 83, 81, 18, 10, 32, 228, 29, 3, 237, 44, 81, 18, 10, 32, 83, 3, 184, 81,
+ 18, 10, 32, 83, 3, 151, 81, 18, 10, 32, 83, 3, 229, 141, 81, 18, 10, 32,
+ 83, 3, 83, 81, 18, 10, 32, 221, 179, 3, 184, 81, 18, 10, 32, 221, 179, 3,
+ 151, 81, 18, 10, 32, 221, 179, 3, 229, 141, 81, 18, 10, 32, 221, 179, 3,
+ 83, 81, 18, 10, 32, 221, 179, 3, 237, 44, 81, 18, 10, 32, 237, 44, 3,
+ 184, 81, 18, 10, 32, 237, 44, 3, 83, 81, 18, 10, 32, 237, 44, 3, 210,
+ 199, 137, 81, 18, 10, 32, 89, 3, 184, 81, 18, 10, 32, 89, 3, 151, 81, 18,
+ 10, 32, 89, 3, 229, 141, 81, 18, 10, 32, 89, 3, 83, 81, 18, 10, 32, 89,
+ 3, 237, 44, 81, 18, 10, 32, 89, 3, 237, 128, 87, 3, 83, 174, 18, 10, 32,
+ 89, 3, 237, 128, 87, 3, 237, 44, 174, 18, 10, 32, 248, 139, 3, 83, 174,
+ 18, 10, 32, 248, 139, 3, 237, 44, 174, 18, 10, 32, 209, 170, 3, 83, 174,
+ 18, 10, 32, 209, 170, 3, 237, 44, 174, 18, 10, 32, 209, 89, 3, 83, 174,
+ 18, 10, 32, 209, 89, 3, 237, 44, 174, 18, 10, 32, 214, 162, 3, 83, 174,
+ 18, 10, 32, 214, 162, 3, 237, 44, 174, 18, 10, 32, 213, 40, 3, 83, 174,
+ 18, 10, 32, 213, 40, 3, 237, 44, 174, 18, 10, 32, 230, 23, 3, 228, 29,
+ 174, 18, 10, 32, 230, 23, 3, 83, 174, 18, 10, 32, 228, 29, 3, 83, 174,
+ 18, 10, 32, 221, 179, 3, 83, 174, 18, 10, 32, 221, 179, 3, 237, 44, 174,
+ 18, 10, 32, 89, 3, 83, 174, 18, 10, 32, 89, 3, 237, 44, 174, 18, 10, 32,
+ 213, 81, 3, 240, 72, 174, 18, 10, 32, 213, 81, 3, 244, 173, 174, 18, 10,
+ 32, 213, 81, 3, 229, 230, 174, 18, 10, 32, 209, 252, 3, 137, 225, 130,
+ 64, 18, 10, 32, 209, 252, 3, 89, 64, 18, 10, 32, 251, 60, 3, 137, 225,
+ 130, 64, 18, 10, 32, 251, 60, 3, 89, 64, 18, 10, 32, 238, 115, 3, 137,
+ 225, 130, 64, 18, 10, 32, 238, 115, 3, 89, 64, 18, 10, 32, 214, 162, 3,
+ 137, 225, 130, 64, 18, 10, 32, 214, 162, 3, 89, 64, 18, 10, 32, 213, 40,
+ 3, 137, 225, 130, 64, 18, 10, 32, 213, 40, 3, 89, 64, 18, 10, 32, 151, 3,
+ 137, 225, 130, 64, 18, 10, 32, 151, 3, 89, 64, 18, 10, 32, 184, 3, 137,
+ 225, 130, 64, 18, 10, 32, 184, 3, 89, 64, 18, 10, 32, 229, 141, 3, 137,
+ 225, 130, 64, 18, 10, 32, 229, 141, 3, 89, 64, 18, 10, 32, 215, 29, 3,
+ 137, 225, 130, 64, 18, 10, 32, 215, 29, 3, 89, 64, 18, 10, 32, 244, 208,
+ 3, 137, 225, 130, 64, 18, 10, 32, 244, 208, 3, 89, 64, 18, 10, 32, 213,
+ 40, 3, 184, 64, 18, 10, 32, 213, 40, 3, 151, 64, 18, 10, 32, 213, 40, 3,
+ 229, 141, 64, 18, 10, 32, 213, 40, 3, 83, 64, 18, 10, 32, 213, 40, 3,
+ 216, 123, 64, 18, 10, 32, 214, 162, 3, 216, 123, 64, 18, 10, 32, 215, 29,
+ 3, 216, 123, 64, 18, 10, 32, 244, 208, 3, 216, 123, 64, 18, 10, 32, 209,
+ 252, 3, 137, 225, 130, 46, 18, 10, 32, 209, 252, 3, 89, 46, 18, 10, 32,
+ 251, 60, 3, 137, 225, 130, 46, 18, 10, 32, 251, 60, 3, 89, 46, 18, 10,
+ 32, 238, 115, 3, 137, 225, 130, 46, 18, 10, 32, 238, 115, 3, 89, 46, 18,
+ 10, 32, 214, 162, 3, 137, 225, 130, 46, 18, 10, 32, 214, 162, 3, 89, 46,
+ 18, 10, 32, 213, 40, 3, 137, 225, 130, 46, 18, 10, 32, 213, 40, 3, 89,
+ 46, 18, 10, 32, 151, 3, 137, 225, 130, 46, 18, 10, 32, 151, 3, 89, 46,
+ 18, 10, 32, 184, 3, 137, 225, 130, 46, 18, 10, 32, 184, 3, 89, 46, 18,
+ 10, 32, 229, 141, 3, 137, 225, 130, 46, 18, 10, 32, 229, 141, 3, 89, 46,
+ 18, 10, 32, 215, 29, 3, 137, 225, 130, 46, 18, 10, 32, 215, 29, 3, 89,
+ 46, 18, 10, 32, 244, 208, 3, 137, 225, 130, 46, 18, 10, 32, 244, 208, 3,
+ 89, 46, 18, 10, 32, 213, 40, 3, 184, 46, 18, 10, 32, 213, 40, 3, 151, 46,
+ 18, 10, 32, 213, 40, 3, 229, 141, 46, 18, 10, 32, 213, 40, 3, 83, 46, 18,
+ 10, 32, 213, 40, 3, 216, 123, 46, 18, 10, 32, 214, 162, 3, 216, 123, 46,
+ 18, 10, 32, 215, 29, 3, 216, 123, 46, 18, 10, 32, 244, 208, 3, 216, 123,
+ 46, 18, 10, 32, 213, 40, 3, 184, 81, 18, 10, 32, 213, 40, 3, 151, 81, 18,
+ 10, 32, 213, 40, 3, 229, 141, 81, 18, 10, 32, 213, 40, 3, 83, 81, 18, 10,
+ 32, 214, 162, 3, 237, 44, 81, 18, 10, 32, 213, 40, 3, 237, 44, 81, 18,
+ 10, 32, 209, 252, 3, 83, 81, 18, 10, 32, 214, 162, 3, 184, 174, 18, 10,
+ 32, 214, 162, 3, 151, 174, 18, 10, 32, 214, 162, 3, 229, 141, 174, 18,
+ 10, 32, 213, 40, 3, 184, 174, 18, 10, 32, 213, 40, 3, 151, 174, 18, 10,
+ 32, 213, 40, 3, 229, 141, 174, 18, 10, 32, 209, 252, 3, 83, 174, 18, 10,
+ 32, 202, 111, 3, 83, 174, 18, 10, 32, 137, 3, 240, 70, 46, 18, 10, 32,
+ 137, 3, 240, 70, 64, 18, 219, 231, 49, 219, 76, 219, 231, 50, 219, 76,
+ 10, 32, 209, 170, 3, 184, 3, 83, 81, 18, 10, 32, 209, 170, 3, 151, 3,
+ 184, 46, 18, 10, 32, 209, 170, 3, 151, 3, 184, 81, 18, 10, 32, 209, 170,
+ 3, 151, 3, 83, 81, 18, 10, 32, 209, 170, 3, 229, 141, 3, 83, 81, 18, 10,
+ 32, 209, 170, 3, 83, 3, 184, 81, 18, 10, 32, 209, 170, 3, 83, 3, 151, 81,
+ 18, 10, 32, 209, 170, 3, 83, 3, 229, 141, 81, 18, 10, 32, 184, 3, 83, 3,
+ 151, 46, 18, 10, 32, 184, 3, 83, 3, 151, 81, 18, 10, 32, 151, 3, 83, 3,
+ 89, 46, 18, 10, 32, 151, 3, 83, 3, 137, 225, 130, 46, 18, 10, 32, 214,
+ 162, 3, 151, 3, 184, 81, 18, 10, 32, 214, 162, 3, 184, 3, 151, 81, 18,
+ 10, 32, 214, 162, 3, 184, 3, 137, 225, 130, 46, 18, 10, 32, 214, 162, 3,
+ 83, 3, 151, 46, 18, 10, 32, 214, 162, 3, 83, 3, 151, 81, 18, 10, 32, 214,
+ 162, 3, 83, 3, 184, 81, 18, 10, 32, 214, 162, 3, 83, 3, 83, 46, 18, 10,
+ 32, 214, 162, 3, 83, 3, 83, 81, 18, 10, 32, 215, 29, 3, 151, 3, 151, 46,
+ 18, 10, 32, 215, 29, 3, 151, 3, 151, 81, 18, 10, 32, 215, 29, 3, 83, 3,
+ 83, 46, 18, 10, 32, 213, 40, 3, 151, 3, 83, 46, 18, 10, 32, 213, 40, 3,
+ 151, 3, 83, 81, 18, 10, 32, 213, 40, 3, 184, 3, 89, 46, 18, 10, 32, 213,
+ 40, 3, 83, 3, 229, 141, 46, 18, 10, 32, 213, 40, 3, 83, 3, 229, 141, 81,
+ 18, 10, 32, 213, 40, 3, 83, 3, 83, 46, 18, 10, 32, 213, 40, 3, 83, 3, 83,
+ 81, 18, 10, 32, 244, 208, 3, 151, 3, 137, 225, 130, 46, 18, 10, 32, 244,
+ 208, 3, 229, 141, 3, 83, 46, 18, 10, 32, 244, 208, 3, 229, 141, 3, 83,
+ 81, 18, 10, 32, 209, 252, 3, 83, 3, 151, 46, 18, 10, 32, 209, 252, 3, 83,
+ 3, 151, 81, 18, 10, 32, 209, 252, 3, 83, 3, 83, 81, 18, 10, 32, 209, 252,
+ 3, 83, 3, 89, 46, 18, 10, 32, 251, 60, 3, 184, 3, 83, 46, 18, 10, 32,
+ 251, 60, 3, 83, 3, 83, 46, 18, 10, 32, 251, 60, 3, 83, 3, 83, 81, 18, 10,
+ 32, 251, 60, 3, 83, 3, 137, 225, 130, 46, 18, 10, 32, 238, 115, 3, 83, 3,
+ 83, 46, 18, 10, 32, 238, 115, 3, 83, 3, 89, 46, 18, 10, 32, 238, 115, 3,
+ 83, 3, 137, 225, 130, 46, 18, 10, 32, 240, 48, 3, 229, 141, 3, 83, 46,
+ 18, 10, 32, 240, 48, 3, 229, 141, 3, 83, 81, 18, 10, 32, 217, 120, 3, 83,
+ 3, 151, 46, 18, 10, 32, 217, 120, 3, 83, 3, 83, 46, 18, 10, 32, 228, 29,
+ 3, 151, 3, 83, 46, 18, 10, 32, 228, 29, 3, 151, 3, 89, 46, 18, 10, 32,
+ 228, 29, 3, 151, 3, 137, 225, 130, 46, 18, 10, 32, 228, 29, 3, 184, 3,
+ 184, 81, 18, 10, 32, 228, 29, 3, 184, 3, 184, 46, 18, 10, 32, 228, 29, 3,
+ 229, 141, 3, 83, 46, 18, 10, 32, 228, 29, 3, 229, 141, 3, 83, 81, 18, 10,
+ 32, 228, 29, 3, 83, 3, 151, 46, 18, 10, 32, 228, 29, 3, 83, 3, 151, 81,
+ 18, 10, 32, 83, 3, 151, 3, 184, 81, 18, 10, 32, 83, 3, 151, 3, 83, 81,
+ 18, 10, 32, 83, 3, 151, 3, 89, 46, 18, 10, 32, 83, 3, 184, 3, 151, 81,
+ 18, 10, 32, 83, 3, 184, 3, 83, 81, 18, 10, 32, 83, 3, 229, 141, 3, 184,
+ 81, 18, 10, 32, 83, 3, 229, 141, 3, 83, 81, 18, 10, 32, 83, 3, 184, 3,
+ 229, 141, 81, 18, 10, 32, 237, 44, 3, 83, 3, 184, 81, 18, 10, 32, 237,
+ 44, 3, 83, 3, 83, 81, 18, 10, 32, 221, 179, 3, 151, 3, 83, 81, 18, 10,
+ 32, 221, 179, 3, 151, 3, 137, 225, 130, 46, 18, 10, 32, 221, 179, 3, 184,
+ 3, 83, 46, 18, 10, 32, 221, 179, 3, 184, 3, 83, 81, 18, 10, 32, 221, 179,
+ 3, 184, 3, 137, 225, 130, 46, 18, 10, 32, 221, 179, 3, 83, 3, 89, 46, 18,
+ 10, 32, 221, 179, 3, 83, 3, 137, 225, 130, 46, 18, 10, 32, 89, 3, 83, 3,
+ 83, 46, 18, 10, 32, 89, 3, 83, 3, 83, 81, 18, 10, 32, 248, 139, 3, 229,
+ 141, 3, 89, 46, 18, 10, 32, 209, 170, 3, 184, 3, 89, 46, 18, 10, 32, 209,
+ 170, 3, 184, 3, 137, 225, 130, 46, 18, 10, 32, 209, 170, 3, 229, 141, 3,
+ 89, 46, 18, 10, 32, 209, 170, 3, 229, 141, 3, 137, 225, 130, 46, 18, 10,
+ 32, 209, 170, 3, 83, 3, 89, 46, 18, 10, 32, 209, 170, 3, 83, 3, 137, 225,
+ 130, 46, 18, 10, 32, 184, 3, 83, 3, 89, 46, 18, 10, 32, 184, 3, 151, 3,
+ 137, 225, 130, 46, 18, 10, 32, 184, 3, 83, 3, 137, 225, 130, 46, 18, 10,
+ 32, 214, 162, 3, 229, 141, 3, 137, 225, 130, 46, 18, 10, 32, 215, 29, 3,
+ 151, 3, 89, 46, 18, 10, 32, 213, 40, 3, 151, 3, 89, 46, 18, 10, 32, 244,
+ 208, 3, 151, 3, 89, 46, 18, 10, 32, 228, 29, 3, 184, 3, 89, 46, 18, 10,
+ 32, 228, 29, 3, 83, 3, 89, 46, 18, 10, 32, 89, 3, 151, 3, 89, 46, 18, 10,
+ 32, 89, 3, 184, 3, 89, 46, 18, 10, 32, 89, 3, 83, 3, 89, 46, 18, 10, 32,
+ 83, 3, 83, 3, 89, 46, 18, 10, 32, 217, 120, 3, 83, 3, 89, 46, 18, 10, 32,
+ 221, 179, 3, 151, 3, 89, 46, 18, 10, 32, 217, 120, 3, 83, 3, 151, 81, 18,
+ 10, 32, 228, 29, 3, 151, 3, 83, 81, 18, 10, 32, 251, 60, 3, 83, 3, 89,
+ 46, 18, 10, 32, 230, 23, 3, 83, 3, 89, 46, 18, 10, 32, 221, 179, 3, 184,
+ 3, 151, 81, 18, 10, 32, 83, 3, 229, 141, 3, 89, 46, 18, 10, 32, 228, 29,
+ 3, 184, 3, 83, 81, 18, 10, 32, 230, 23, 3, 83, 3, 83, 46, 18, 10, 32,
+ 228, 29, 3, 184, 3, 83, 46, 18, 10, 32, 221, 179, 3, 184, 3, 151, 46, 18,
+ 10, 32, 184, 3, 151, 3, 89, 46, 18, 10, 32, 151, 3, 184, 3, 89, 46, 18,
+ 10, 32, 83, 3, 184, 3, 89, 46, 18, 10, 32, 240, 48, 3, 83, 3, 89, 46, 18,
+ 10, 32, 248, 139, 3, 151, 3, 89, 46, 18, 10, 32, 230, 23, 3, 83, 3, 83,
+ 81, 18, 10, 32, 251, 60, 3, 184, 3, 83, 81, 18, 10, 32, 215, 29, 3, 83,
+ 3, 83, 81, 18, 10, 32, 214, 162, 3, 229, 141, 3, 89, 46, 18, 10, 32, 221,
+ 179, 3, 184, 3, 89, 46, 18, 10, 32, 215, 4, 206, 188, 250, 82, 228, 254,
+ 211, 62, 2, 64, 18, 10, 32, 217, 116, 206, 188, 250, 82, 228, 254, 211,
+ 62, 2, 64, 18, 10, 32, 251, 13, 64, 18, 10, 32, 251, 44, 64, 18, 10, 32,
+ 224, 57, 64, 18, 10, 32, 215, 5, 64, 18, 10, 32, 216, 174, 64, 18, 10,
+ 32, 251, 33, 64, 18, 10, 32, 204, 90, 64, 18, 10, 32, 215, 4, 64, 18, 10,
+ 32, 215, 3, 251, 33, 204, 89, 10, 32, 230, 172, 216, 56, 54, 10, 32, 248,
+ 53, 250, 142, 250, 143, 57, 214, 149, 57, 214, 38, 57, 213, 226, 57, 213,
+ 215, 57, 213, 204, 57, 213, 193, 57, 213, 182, 57, 213, 171, 57, 213,
+ 160, 57, 214, 148, 57, 214, 137, 57, 214, 126, 57, 214, 115, 57, 214,
+ 104, 57, 214, 93, 57, 214, 82, 217, 241, 239, 159, 35, 80, 245, 233, 217,
+ 241, 239, 159, 35, 80, 139, 245, 233, 217, 241, 239, 159, 35, 80, 139,
+ 239, 102, 211, 61, 217, 241, 239, 159, 35, 80, 245, 242, 217, 241, 239,
+ 159, 35, 80, 213, 143, 217, 241, 239, 159, 35, 80, 240, 212, 82, 217,
+ 241, 239, 159, 35, 80, 217, 47, 82, 217, 241, 239, 159, 35, 80, 49, 61,
+ 227, 185, 155, 217, 241, 239, 159, 35, 80, 50, 61, 227, 185, 247, 225,
+ 217, 241, 239, 159, 35, 80, 236, 106, 241, 108, 39, 32, 49, 237, 137, 39,
+ 32, 50, 237, 137, 39, 52, 208, 228, 49, 237, 137, 39, 52, 208, 228, 50,
+ 237, 137, 39, 225, 171, 49, 237, 137, 39, 225, 171, 50, 237, 137, 39,
+ 245, 206, 225, 170, 39, 32, 49, 162, 56, 39, 32, 50, 162, 56, 39, 208,
+ 228, 49, 162, 56, 39, 208, 228, 50, 162, 56, 39, 225, 171, 49, 162, 56,
+ 39, 225, 171, 50, 162, 56, 39, 245, 206, 225, 171, 56, 39, 36, 208, 198,
+ 49, 237, 137, 39, 36, 208, 198, 50, 237, 137, 217, 241, 239, 159, 35, 80,
+ 120, 70, 227, 232, 217, 241, 239, 159, 35, 80, 241, 104, 244, 144, 217,
+ 241, 239, 159, 35, 80, 241, 93, 244, 144, 217, 241, 239, 159, 35, 80,
+ 124, 227, 114, 217, 241, 239, 159, 35, 80, 204, 72, 124, 227, 114, 217,
+ 241, 239, 159, 35, 80, 49, 219, 76, 217, 241, 239, 159, 35, 80, 50, 219,
+ 76, 217, 241, 239, 159, 35, 80, 49, 245, 93, 155, 217, 241, 239, 159, 35,
+ 80, 50, 245, 93, 155, 217, 241, 239, 159, 35, 80, 49, 208, 133, 213, 33,
+ 155, 217, 241, 239, 159, 35, 80, 50, 208, 133, 213, 33, 155, 217, 241,
+ 239, 159, 35, 80, 49, 62, 227, 185, 155, 217, 241, 239, 159, 35, 80, 50,
+ 62, 227, 185, 155, 217, 241, 239, 159, 35, 80, 49, 52, 250, 218, 155,
+ 217, 241, 239, 159, 35, 80, 50, 52, 250, 218, 155, 217, 241, 239, 159,
+ 35, 80, 49, 250, 218, 155, 217, 241, 239, 159, 35, 80, 50, 250, 218, 155,
+ 217, 241, 239, 159, 35, 80, 49, 245, 166, 155, 217, 241, 239, 159, 35,
+ 80, 50, 245, 166, 155, 217, 241, 239, 159, 35, 80, 49, 61, 245, 166, 155,
+ 217, 241, 239, 159, 35, 80, 50, 61, 245, 166, 155, 213, 121, 243, 85, 61,
+ 213, 121, 243, 85, 217, 241, 239, 159, 35, 80, 49, 51, 155, 217, 241,
+ 239, 159, 35, 80, 50, 51, 155, 244, 143, 219, 198, 246, 214, 219, 198,
+ 204, 72, 219, 198, 52, 204, 72, 219, 198, 244, 143, 124, 227, 114, 246,
+ 214, 124, 227, 114, 204, 72, 124, 227, 114, 5, 245, 233, 5, 139, 245,
+ 233, 5, 239, 102, 211, 61, 5, 213, 143, 5, 245, 242, 5, 217, 47, 82, 5,
+ 240, 212, 82, 5, 241, 104, 244, 144, 5, 49, 219, 76, 5, 50, 219, 76, 5,
+ 49, 245, 93, 155, 5, 50, 245, 93, 155, 5, 49, 208, 133, 213, 33, 155, 5,
+ 50, 208, 133, 213, 33, 155, 5, 42, 54, 5, 250, 235, 5, 250, 59, 5, 91,
+ 54, 5, 235, 219, 5, 227, 179, 54, 5, 237, 247, 54, 5, 241, 35, 54, 5,
+ 216, 74, 212, 0, 5, 243, 97, 54, 5, 218, 246, 54, 5, 245, 231, 250, 49,
+ 10, 240, 70, 64, 18, 10, 209, 210, 3, 240, 70, 55, 10, 244, 171, 64, 18,
+ 10, 209, 249, 239, 137, 10, 229, 228, 64, 18, 10, 240, 72, 64, 18, 10,
+ 240, 72, 174, 18, 10, 244, 173, 64, 18, 10, 244, 173, 174, 18, 10, 229,
+ 230, 64, 18, 10, 229, 230, 174, 18, 10, 213, 81, 64, 18, 10, 213, 81,
+ 174, 18, 10, 210, 223, 64, 18, 10, 210, 223, 174, 18, 10, 1, 237, 128,
+ 64, 18, 10, 1, 137, 3, 225, 166, 87, 64, 18, 10, 1, 137, 3, 225, 166, 87,
+ 46, 18, 10, 1, 137, 3, 237, 128, 87, 64, 18, 10, 1, 137, 3, 237, 128, 87,
+ 46, 18, 10, 1, 204, 71, 3, 237, 128, 87, 64, 18, 10, 1, 204, 71, 3, 237,
+ 128, 87, 46, 18, 10, 1, 137, 3, 237, 128, 248, 126, 64, 18, 10, 1, 137,
+ 3, 237, 128, 248, 126, 46, 18, 10, 1, 89, 3, 237, 128, 87, 64, 18, 10, 1,
+ 89, 3, 237, 128, 87, 46, 18, 10, 1, 89, 3, 237, 128, 87, 81, 18, 10, 1,
+ 89, 3, 237, 128, 87, 174, 18, 10, 1, 137, 64, 18, 10, 1, 137, 46, 18, 10,
+ 1, 248, 139, 64, 18, 10, 1, 248, 139, 46, 18, 10, 1, 248, 139, 81, 18,
+ 10, 1, 248, 139, 174, 18, 10, 1, 209, 170, 225, 99, 64, 18, 10, 1, 209,
+ 170, 225, 99, 46, 18, 10, 1, 209, 170, 64, 18, 10, 1, 209, 170, 46, 18,
+ 10, 1, 209, 170, 81, 18, 10, 1, 209, 170, 174, 18, 10, 1, 209, 89, 64,
+ 18, 10, 1, 209, 89, 46, 18, 10, 1, 209, 89, 81, 18, 10, 1, 209, 89, 174,
+ 18, 10, 1, 184, 64, 18, 10, 1, 184, 46, 18, 10, 1, 184, 81, 18, 10, 1,
+ 184, 174, 18, 10, 1, 151, 64, 18, 10, 1, 151, 46, 18, 10, 1, 151, 81, 18,
+ 10, 1, 151, 174, 18, 10, 1, 229, 141, 64, 18, 10, 1, 229, 141, 46, 18,
+ 10, 1, 229, 141, 81, 18, 10, 1, 229, 141, 174, 18, 10, 1, 244, 185, 64,
+ 18, 10, 1, 244, 185, 46, 18, 10, 1, 209, 101, 64, 18, 10, 1, 209, 101,
+ 46, 18, 10, 1, 216, 123, 64, 18, 10, 1, 216, 123, 46, 18, 10, 1, 202,
+ 108, 64, 18, 10, 1, 202, 108, 46, 18, 10, 1, 214, 162, 64, 18, 10, 1,
+ 214, 162, 46, 18, 10, 1, 214, 162, 81, 18, 10, 1, 214, 162, 174, 18, 10,
+ 1, 213, 40, 64, 18, 10, 1, 213, 40, 46, 18, 10, 1, 213, 40, 81, 18, 10,
+ 1, 213, 40, 174, 18, 10, 1, 215, 29, 64, 18, 10, 1, 215, 29, 46, 18, 10,
+ 1, 215, 29, 81, 18, 10, 1, 215, 29, 174, 18, 10, 1, 244, 208, 64, 18, 10,
+ 1, 244, 208, 46, 18, 10, 1, 244, 208, 81, 18, 10, 1, 244, 208, 174, 18,
+ 10, 1, 209, 252, 64, 18, 10, 1, 209, 252, 46, 18, 10, 1, 209, 252, 81,
+ 18, 10, 1, 209, 252, 174, 18, 10, 1, 202, 111, 64, 18, 10, 1, 202, 111,
+ 46, 18, 10, 1, 202, 111, 81, 18, 10, 1, 202, 111, 174, 18, 10, 1, 251,
+ 60, 64, 18, 10, 1, 251, 60, 46, 18, 10, 1, 251, 60, 81, 18, 10, 1, 251,
+ 60, 174, 18, 10, 1, 238, 115, 64, 18, 10, 1, 238, 115, 46, 18, 10, 1,
+ 238, 115, 81, 18, 10, 1, 238, 115, 174, 18, 10, 1, 240, 48, 64, 18, 10,
+ 1, 240, 48, 46, 18, 10, 1, 240, 48, 81, 18, 10, 1, 240, 48, 174, 18, 10,
+ 1, 217, 120, 64, 18, 10, 1, 217, 120, 46, 18, 10, 1, 217, 120, 81, 18,
+ 10, 1, 217, 120, 174, 18, 10, 1, 230, 23, 64, 18, 10, 1, 230, 23, 46, 18,
+ 10, 1, 230, 23, 81, 18, 10, 1, 230, 23, 174, 18, 10, 1, 228, 29, 64, 18,
+ 10, 1, 228, 29, 46, 18, 10, 1, 228, 29, 81, 18, 10, 1, 228, 29, 174, 18,
+ 10, 1, 83, 64, 18, 10, 1, 83, 46, 18, 10, 1, 83, 81, 18, 10, 1, 83, 174,
+ 18, 10, 1, 221, 179, 64, 18, 10, 1, 221, 179, 46, 18, 10, 1, 221, 179,
+ 81, 18, 10, 1, 221, 179, 174, 18, 10, 1, 237, 44, 64, 18, 10, 1, 237, 44,
+ 46, 18, 10, 1, 237, 44, 81, 18, 10, 1, 237, 44, 174, 18, 10, 1, 204, 71,
+ 64, 18, 10, 1, 204, 71, 46, 18, 10, 1, 137, 225, 130, 64, 18, 10, 1, 137,
+ 225, 130, 46, 18, 10, 1, 89, 64, 18, 10, 1, 89, 46, 18, 10, 1, 89, 81,
+ 18, 10, 1, 89, 174, 18, 10, 32, 228, 29, 3, 137, 3, 225, 166, 87, 64, 18,
+ 10, 32, 228, 29, 3, 137, 3, 225, 166, 87, 46, 18, 10, 32, 228, 29, 3,
+ 137, 3, 237, 128, 87, 64, 18, 10, 32, 228, 29, 3, 137, 3, 237, 128, 87,
+ 46, 18, 10, 32, 228, 29, 3, 137, 3, 237, 128, 248, 126, 64, 18, 10, 32,
+ 228, 29, 3, 137, 3, 237, 128, 248, 126, 46, 18, 10, 32, 228, 29, 3, 137,
+ 64, 18, 10, 32, 228, 29, 3, 137, 46, 18, 202, 85, 204, 24, 221, 190, 211,
+ 228, 154, 240, 212, 82, 154, 217, 31, 82, 154, 42, 54, 154, 243, 97, 54,
+ 154, 218, 246, 54, 154, 250, 235, 154, 250, 160, 154, 49, 219, 76, 154,
+ 50, 219, 76, 154, 250, 59, 154, 91, 54, 154, 245, 233, 154, 235, 219,
+ 154, 239, 102, 211, 61, 154, 212, 0, 154, 17, 202, 84, 154, 17, 105, 154,
+ 17, 108, 154, 17, 147, 154, 17, 149, 154, 17, 170, 154, 17, 195, 154, 17,
+ 213, 111, 154, 17, 199, 154, 17, 222, 63, 154, 245, 242, 154, 213, 143,
+ 154, 227, 179, 54, 154, 241, 35, 54, 154, 237, 247, 54, 154, 217, 47, 82,
+ 154, 245, 231, 250, 49, 154, 8, 6, 1, 63, 154, 8, 6, 1, 249, 255, 154, 8,
+ 6, 1, 247, 125, 154, 8, 6, 1, 245, 51, 154, 8, 6, 1, 74, 154, 8, 6, 1,
+ 240, 174, 154, 8, 6, 1, 239, 75, 154, 8, 6, 1, 237, 171, 154, 8, 6, 1,
+ 75, 154, 8, 6, 1, 230, 184, 154, 8, 6, 1, 230, 54, 154, 8, 6, 1, 159,
+ 154, 8, 6, 1, 226, 185, 154, 8, 6, 1, 223, 163, 154, 8, 6, 1, 78, 154, 8,
+ 6, 1, 219, 184, 154, 8, 6, 1, 217, 134, 154, 8, 6, 1, 146, 154, 8, 6, 1,
+ 194, 154, 8, 6, 1, 210, 69, 154, 8, 6, 1, 68, 154, 8, 6, 1, 206, 164,
+ 154, 8, 6, 1, 204, 144, 154, 8, 6, 1, 203, 196, 154, 8, 6, 1, 203, 124,
+ 154, 8, 6, 1, 202, 159, 154, 49, 51, 155, 154, 216, 74, 212, 0, 154, 50,
+ 51, 155, 154, 246, 53, 251, 138, 154, 124, 227, 114, 154, 237, 254, 251,
+ 138, 154, 8, 5, 1, 63, 154, 8, 5, 1, 249, 255, 154, 8, 5, 1, 247, 125,
+ 154, 8, 5, 1, 245, 51, 154, 8, 5, 1, 74, 154, 8, 5, 1, 240, 174, 154, 8,
+ 5, 1, 239, 75, 154, 8, 5, 1, 237, 171, 154, 8, 5, 1, 75, 154, 8, 5, 1,
+ 230, 184, 154, 8, 5, 1, 230, 54, 154, 8, 5, 1, 159, 154, 8, 5, 1, 226,
+ 185, 154, 8, 5, 1, 223, 163, 154, 8, 5, 1, 78, 154, 8, 5, 1, 219, 184,
+ 154, 8, 5, 1, 217, 134, 154, 8, 5, 1, 146, 154, 8, 5, 1, 194, 154, 8, 5,
+ 1, 210, 69, 154, 8, 5, 1, 68, 154, 8, 5, 1, 206, 164, 154, 8, 5, 1, 204,
+ 144, 154, 8, 5, 1, 203, 196, 154, 8, 5, 1, 203, 124, 154, 8, 5, 1, 202,
+ 159, 154, 49, 245, 93, 155, 154, 80, 227, 114, 154, 50, 245, 93, 155,
+ 154, 208, 227, 154, 49, 61, 219, 76, 154, 50, 61, 219, 76, 127, 139, 239,
+ 102, 211, 61, 127, 49, 245, 166, 155, 127, 50, 245, 166, 155, 127, 139,
+ 245, 233, 127, 67, 101, 243, 85, 127, 67, 1, 204, 0, 127, 67, 1, 5, 63,
+ 127, 67, 1, 5, 75, 127, 67, 1, 5, 68, 127, 67, 1, 5, 74, 127, 67, 1, 5,
+ 78, 127, 67, 1, 5, 198, 127, 67, 1, 5, 202, 213, 127, 67, 1, 5, 202, 247,
+ 127, 67, 1, 5, 207, 203, 127, 229, 225, 217, 215, 211, 241, 82, 127, 67,
+ 1, 63, 127, 67, 1, 75, 127, 67, 1, 68, 127, 67, 1, 74, 127, 67, 1, 78,
+ 127, 67, 1, 173, 127, 67, 1, 229, 100, 127, 67, 1, 228, 209, 127, 67, 1,
+ 229, 201, 127, 67, 1, 229, 26, 127, 67, 1, 215, 36, 127, 67, 1, 212, 162,
+ 127, 67, 1, 211, 10, 127, 67, 1, 214, 177, 127, 67, 1, 212, 13, 127, 67,
+ 1, 210, 22, 127, 67, 1, 209, 2, 127, 67, 1, 207, 203, 127, 67, 1, 209,
+ 187, 127, 67, 1, 135, 127, 67, 1, 201, 201, 127, 67, 1, 222, 100, 127,
+ 67, 1, 221, 84, 127, 67, 1, 222, 240, 127, 67, 1, 221, 191, 127, 67, 1,
+ 152, 127, 67, 1, 237, 3, 127, 67, 1, 236, 26, 127, 67, 1, 237, 67, 127,
+ 67, 1, 236, 136, 127, 67, 1, 192, 127, 67, 1, 224, 155, 127, 67, 1, 223,
+ 246, 127, 67, 1, 225, 20, 127, 67, 1, 224, 82, 127, 67, 1, 198, 127, 67,
+ 1, 202, 213, 127, 67, 1, 202, 247, 127, 67, 1, 216, 220, 127, 67, 1, 216,
+ 57, 127, 67, 1, 215, 145, 127, 67, 1, 216, 158, 127, 67, 1, 215, 227,
+ 127, 67, 1, 204, 111, 127, 67, 1, 223, 163, 127, 67, 205, 186, 211, 241,
+ 82, 127, 67, 213, 148, 211, 241, 82, 127, 28, 240, 7, 127, 28, 1, 229,
+ 59, 127, 28, 1, 211, 156, 127, 28, 1, 229, 52, 127, 28, 1, 222, 93, 127,
+ 28, 1, 222, 91, 127, 28, 1, 222, 90, 127, 28, 1, 208, 240, 127, 28, 1,
+ 211, 145, 127, 28, 1, 216, 47, 127, 28, 1, 216, 42, 127, 28, 1, 216, 39,
+ 127, 28, 1, 216, 32, 127, 28, 1, 216, 27, 127, 28, 1, 216, 22, 127, 28,
+ 1, 216, 33, 127, 28, 1, 216, 45, 127, 28, 1, 224, 141, 127, 28, 1, 218,
+ 153, 127, 28, 1, 211, 153, 127, 28, 1, 218, 142, 127, 28, 1, 212, 111,
+ 127, 28, 1, 211, 150, 127, 28, 1, 231, 106, 127, 28, 1, 246, 74, 127, 28,
+ 1, 211, 160, 127, 28, 1, 246, 138, 127, 28, 1, 229, 120, 127, 28, 1, 209,
+ 66, 127, 28, 1, 218, 190, 127, 28, 1, 236, 251, 127, 28, 1, 63, 127, 28,
+ 1, 251, 109, 127, 28, 1, 198, 127, 28, 1, 203, 99, 127, 28, 1, 241, 55,
+ 127, 28, 1, 74, 127, 28, 1, 203, 39, 127, 28, 1, 203, 52, 127, 28, 1, 78,
+ 127, 28, 1, 204, 111, 127, 28, 1, 204, 107, 127, 28, 1, 220, 73, 127, 28,
+ 1, 202, 247, 127, 28, 1, 68, 127, 28, 1, 204, 48, 127, 28, 1, 204, 62,
+ 127, 28, 1, 204, 30, 127, 28, 1, 202, 213, 127, 28, 1, 240, 238, 127, 28,
+ 1, 203, 11, 127, 28, 1, 75, 154, 246, 220, 54, 154, 218, 20, 54, 154,
+ 221, 166, 54, 154, 225, 170, 154, 247, 203, 142, 154, 203, 43, 54, 154,
+ 203, 246, 54, 127, 239, 156, 157, 206, 38, 127, 96, 47, 127, 177, 47,
+ 127, 86, 47, 127, 183, 47, 127, 62, 211, 177, 127, 61, 246, 61, 230, 251,
+ 250, 205, 250, 228, 230, 251, 250, 205, 213, 130, 230, 251, 250, 205,
+ 209, 138, 220, 90, 216, 96, 246, 182, 216, 96, 246, 182, 29, 66, 4, 249,
+ 239, 63, 29, 66, 4, 249, 208, 74, 29, 66, 4, 249, 217, 75, 29, 66, 4,
+ 249, 185, 78, 29, 66, 4, 249, 235, 68, 29, 66, 4, 249, 254, 244, 212, 29,
+ 66, 4, 249, 201, 244, 75, 29, 66, 4, 249, 241, 243, 233, 29, 66, 4, 249,
+ 231, 243, 113, 29, 66, 4, 249, 195, 242, 42, 29, 66, 4, 249, 189, 230,
+ 181, 29, 66, 4, 249, 200, 230, 161, 29, 66, 4, 249, 210, 230, 101, 29,
+ 66, 4, 249, 181, 230, 82, 29, 66, 4, 249, 169, 173, 29, 66, 4, 249, 202,
+ 229, 201, 29, 66, 4, 249, 179, 229, 100, 29, 66, 4, 249, 176, 229, 26,
+ 29, 66, 4, 249, 165, 228, 209, 29, 66, 4, 249, 166, 192, 29, 66, 4, 249,
+ 232, 225, 20, 29, 66, 4, 249, 173, 224, 155, 29, 66, 4, 249, 230, 224,
+ 82, 29, 66, 4, 249, 222, 223, 246, 29, 66, 4, 249, 243, 201, 201, 29, 66,
+ 4, 249, 221, 222, 240, 29, 66, 4, 249, 215, 222, 100, 29, 66, 4, 249,
+ 194, 221, 191, 29, 66, 4, 249, 191, 221, 84, 29, 66, 4, 249, 250, 185,
+ 29, 66, 4, 249, 174, 219, 34, 29, 66, 4, 249, 207, 218, 167, 29, 66, 4,
+ 249, 234, 218, 69, 29, 66, 4, 249, 196, 217, 191, 29, 66, 4, 249, 229,
+ 217, 126, 29, 66, 4, 249, 168, 217, 106, 29, 66, 4, 249, 224, 217, 88,
+ 29, 66, 4, 249, 213, 217, 77, 29, 66, 4, 249, 186, 216, 220, 29, 66, 4,
+ 249, 218, 216, 158, 29, 66, 4, 249, 193, 216, 57, 29, 66, 4, 249, 252,
+ 215, 227, 29, 66, 4, 249, 219, 215, 145, 29, 66, 4, 249, 214, 215, 36,
+ 29, 66, 4, 249, 237, 214, 177, 29, 66, 4, 249, 205, 212, 162, 29, 66, 4,
+ 249, 233, 212, 13, 29, 66, 4, 249, 188, 211, 10, 29, 66, 4, 249, 187,
+ 210, 22, 29, 66, 4, 249, 248, 209, 187, 29, 66, 4, 249, 209, 209, 2, 29,
+ 66, 4, 249, 246, 135, 29, 66, 4, 249, 177, 207, 203, 29, 66, 4, 249, 192,
+ 204, 111, 29, 66, 4, 249, 171, 204, 62, 29, 66, 4, 249, 206, 204, 30, 29,
+ 66, 4, 249, 204, 204, 0, 29, 66, 4, 249, 228, 202, 116, 29, 66, 4, 249,
+ 172, 202, 92, 29, 66, 4, 249, 225, 202, 17, 29, 66, 4, 249, 220, 254, 34,
+ 29, 66, 4, 249, 203, 253, 178, 29, 66, 4, 249, 162, 250, 34, 29, 66, 4,
+ 249, 175, 242, 9, 29, 66, 4, 249, 158, 242, 8, 29, 66, 4, 249, 198, 221,
+ 20, 29, 66, 4, 249, 216, 217, 189, 29, 66, 4, 249, 184, 217, 193, 29, 66,
+ 4, 249, 170, 216, 218, 29, 66, 4, 249, 212, 216, 217, 29, 66, 4, 249,
+ 178, 215, 226, 29, 66, 4, 249, 180, 210, 19, 29, 66, 4, 249, 160, 207,
+ 158, 29, 66, 4, 249, 157, 108, 29, 66, 16, 249, 227, 29, 66, 16, 249,
+ 226, 29, 66, 16, 249, 223, 29, 66, 16, 249, 211, 29, 66, 16, 249, 199,
+ 29, 66, 16, 249, 197, 29, 66, 16, 249, 190, 29, 66, 16, 249, 183, 29, 66,
+ 16, 249, 182, 29, 66, 16, 249, 167, 29, 66, 16, 249, 164, 29, 66, 16,
+ 249, 163, 29, 66, 16, 249, 161, 29, 66, 16, 249, 159, 29, 66, 133, 249,
+ 156, 225, 122, 29, 66, 133, 249, 155, 203, 250, 29, 66, 133, 249, 154,
+ 244, 58, 29, 66, 133, 249, 153, 241, 32, 29, 66, 133, 249, 152, 225, 93,
+ 29, 66, 133, 249, 151, 211, 101, 29, 66, 133, 249, 150, 240, 219, 29, 66,
+ 133, 249, 149, 216, 184, 29, 66, 133, 249, 148, 213, 42, 29, 66, 133,
+ 249, 147, 237, 66, 29, 66, 133, 249, 146, 211, 235, 29, 66, 133, 249,
+ 145, 248, 21, 29, 66, 133, 249, 144, 245, 149, 29, 66, 133, 249, 143,
+ 247, 179, 29, 66, 133, 249, 142, 204, 38, 29, 66, 133, 249, 141, 248,
+ 227, 29, 66, 133, 249, 140, 220, 41, 29, 66, 133, 249, 139, 211, 207, 29,
+ 66, 133, 249, 138, 245, 59, 29, 66, 224, 45, 249, 137, 229, 249, 29, 66,
+ 224, 45, 249, 136, 230, 2, 29, 66, 133, 249, 135, 220, 55, 29, 66, 133,
+ 249, 134, 204, 12, 29, 66, 133, 249, 133, 29, 66, 224, 45, 249, 132, 250,
+ 119, 29, 66, 224, 45, 249, 131, 224, 232, 29, 66, 133, 249, 130, 247,
+ 202, 29, 66, 133, 249, 129, 238, 31, 29, 66, 133, 249, 128, 29, 66, 133,
+ 249, 127, 203, 241, 29, 66, 133, 249, 126, 29, 66, 133, 249, 125, 29, 66,
+ 133, 249, 124, 236, 53, 29, 66, 133, 249, 123, 29, 66, 133, 249, 122, 29,
+ 66, 133, 249, 121, 29, 66, 224, 45, 249, 119, 207, 172, 29, 66, 133, 249,
+ 118, 29, 66, 133, 249, 117, 29, 66, 133, 249, 116, 246, 10, 29, 66, 133,
+ 249, 115, 29, 66, 133, 249, 114, 29, 66, 133, 249, 113, 238, 221, 29, 66,
+ 133, 249, 112, 250, 106, 29, 66, 133, 249, 111, 29, 66, 133, 249, 110,
+ 29, 66, 133, 249, 109, 29, 66, 133, 249, 108, 29, 66, 133, 249, 107, 29,
+ 66, 133, 249, 106, 29, 66, 133, 249, 105, 29, 66, 133, 249, 104, 29, 66,
+ 133, 249, 103, 29, 66, 133, 249, 102, 224, 37, 29, 66, 133, 249, 101, 29,
+ 66, 133, 249, 100, 208, 95, 29, 66, 133, 249, 99, 29, 66, 133, 249, 98,
+ 29, 66, 133, 249, 97, 29, 66, 133, 249, 96, 29, 66, 133, 249, 95, 29, 66,
+ 133, 249, 94, 29, 66, 133, 249, 93, 29, 66, 133, 249, 92, 29, 66, 133,
+ 249, 91, 29, 66, 133, 249, 90, 29, 66, 133, 249, 89, 29, 66, 133, 249,
+ 88, 237, 35, 29, 66, 133, 249, 67, 239, 168, 29, 66, 133, 249, 64, 248,
+ 204, 29, 66, 133, 249, 59, 211, 214, 29, 66, 133, 249, 58, 47, 29, 66,
+ 133, 249, 57, 29, 66, 133, 249, 56, 210, 155, 29, 66, 133, 249, 55, 29,
+ 66, 133, 249, 54, 29, 66, 133, 249, 53, 204, 34, 246, 179, 29, 66, 133,
+ 249, 52, 246, 179, 29, 66, 133, 249, 51, 246, 180, 239, 134, 29, 66, 133,
+ 249, 50, 204, 36, 29, 66, 133, 249, 49, 29, 66, 133, 249, 48, 29, 66,
+ 224, 45, 249, 47, 243, 168, 29, 66, 133, 249, 46, 29, 66, 133, 249, 45,
+ 29, 66, 133, 249, 43, 29, 66, 133, 249, 42, 29, 66, 133, 249, 41, 29, 66,
+ 133, 249, 40, 244, 147, 29, 66, 133, 249, 39, 29, 66, 133, 249, 38, 29,
+ 66, 133, 249, 37, 29, 66, 133, 249, 36, 29, 66, 133, 249, 35, 29, 66,
+ 133, 205, 241, 249, 120, 29, 66, 133, 205, 241, 249, 87, 29, 66, 133,
+ 205, 241, 249, 86, 29, 66, 133, 205, 241, 249, 85, 29, 66, 133, 205, 241,
+ 249, 84, 29, 66, 133, 205, 241, 249, 83, 29, 66, 133, 205, 241, 249, 82,
+ 29, 66, 133, 205, 241, 249, 81, 29, 66, 133, 205, 241, 249, 80, 29, 66,
+ 133, 205, 241, 249, 79, 29, 66, 133, 205, 241, 249, 78, 29, 66, 133, 205,
+ 241, 249, 77, 29, 66, 133, 205, 241, 249, 76, 29, 66, 133, 205, 241, 249,
+ 75, 29, 66, 133, 205, 241, 249, 74, 29, 66, 133, 205, 241, 249, 73, 29,
+ 66, 133, 205, 241, 249, 72, 29, 66, 133, 205, 241, 249, 71, 29, 66, 133,
+ 205, 241, 249, 70, 29, 66, 133, 205, 241, 249, 69, 29, 66, 133, 205, 241,
+ 249, 68, 29, 66, 133, 205, 241, 249, 66, 29, 66, 133, 205, 241, 249, 65,
+ 29, 66, 133, 205, 241, 249, 63, 29, 66, 133, 205, 241, 249, 62, 29, 66,
+ 133, 205, 241, 249, 61, 29, 66, 133, 205, 241, 249, 60, 29, 66, 133, 205,
+ 241, 249, 44, 29, 66, 133, 205, 241, 249, 34, 251, 102, 203, 238, 213,
+ 131, 227, 114, 251, 102, 203, 238, 213, 131, 243, 85, 251, 102, 246, 169,
+ 82, 251, 102, 42, 105, 251, 102, 42, 108, 251, 102, 42, 147, 251, 102,
+ 42, 149, 251, 102, 42, 170, 251, 102, 42, 195, 251, 102, 42, 213, 111,
+ 251, 102, 42, 199, 251, 102, 42, 222, 63, 251, 102, 42, 209, 152, 251,
+ 102, 42, 207, 151, 251, 102, 42, 209, 53, 251, 102, 42, 239, 153, 251,
+ 102, 42, 240, 18, 251, 102, 42, 212, 74, 251, 102, 42, 213, 105, 251,
+ 102, 42, 241, 134, 251, 102, 42, 222, 58, 251, 102, 42, 118, 236, 11,
+ 251, 102, 42, 120, 236, 11, 251, 102, 42, 126, 236, 11, 251, 102, 42,
+ 239, 147, 236, 11, 251, 102, 42, 239, 233, 236, 11, 251, 102, 42, 212,
+ 88, 236, 11, 251, 102, 42, 213, 112, 236, 11, 251, 102, 42, 241, 143,
+ 236, 11, 251, 102, 42, 222, 64, 236, 11, 251, 102, 42, 118, 209, 36, 251,
+ 102, 42, 120, 209, 36, 251, 102, 42, 126, 209, 36, 251, 102, 42, 239,
+ 147, 209, 36, 251, 102, 42, 239, 233, 209, 36, 251, 102, 42, 212, 88,
+ 209, 36, 251, 102, 42, 213, 112, 209, 36, 251, 102, 42, 241, 143, 209,
+ 36, 251, 102, 42, 222, 64, 209, 36, 251, 102, 42, 209, 153, 209, 36, 251,
+ 102, 42, 207, 152, 209, 36, 251, 102, 42, 209, 54, 209, 36, 251, 102, 42,
+ 239, 154, 209, 36, 251, 102, 42, 240, 19, 209, 36, 251, 102, 42, 212, 75,
+ 209, 36, 251, 102, 42, 213, 106, 209, 36, 251, 102, 42, 241, 135, 209,
+ 36, 251, 102, 42, 222, 59, 209, 36, 251, 102, 204, 51, 248, 219, 206,
+ 235, 251, 102, 204, 51, 239, 245, 210, 240, 251, 102, 204, 51, 214, 171,
+ 210, 240, 251, 102, 204, 51, 209, 61, 210, 240, 251, 102, 204, 51, 239,
+ 140, 210, 240, 251, 102, 242, 45, 225, 19, 239, 245, 210, 240, 251, 102,
+ 227, 95, 225, 19, 239, 245, 210, 240, 251, 102, 225, 19, 214, 171, 210,
+ 240, 251, 102, 225, 19, 209, 61, 210, 240, 30, 251, 129, 250, 36, 118,
+ 217, 55, 30, 251, 129, 250, 36, 118, 237, 137, 30, 251, 129, 250, 36,
+ 118, 242, 65, 30, 251, 129, 250, 36, 170, 30, 251, 129, 250, 36, 240, 18,
+ 30, 251, 129, 250, 36, 239, 233, 236, 11, 30, 251, 129, 250, 36, 239,
+ 233, 209, 36, 30, 251, 129, 250, 36, 240, 19, 209, 36, 30, 251, 129, 250,
+ 36, 239, 233, 209, 237, 30, 251, 129, 250, 36, 209, 153, 209, 237, 30,
+ 251, 129, 250, 36, 240, 19, 209, 237, 30, 251, 129, 250, 36, 118, 236,
+ 12, 209, 237, 30, 251, 129, 250, 36, 239, 233, 236, 12, 209, 237, 30,
+ 251, 129, 250, 36, 118, 209, 37, 209, 237, 30, 251, 129, 250, 36, 239,
+ 233, 209, 37, 209, 237, 30, 251, 129, 250, 36, 239, 233, 211, 88, 30,
+ 251, 129, 250, 36, 209, 153, 211, 88, 30, 251, 129, 250, 36, 240, 19,
+ 211, 88, 30, 251, 129, 250, 36, 118, 236, 12, 211, 88, 30, 251, 129, 250,
+ 36, 239, 233, 236, 12, 211, 88, 30, 251, 129, 250, 36, 118, 209, 37, 211,
+ 88, 30, 251, 129, 250, 36, 209, 153, 209, 37, 211, 88, 30, 251, 129, 250,
+ 36, 240, 19, 209, 37, 211, 88, 30, 251, 129, 250, 36, 209, 153, 224, 85,
+ 30, 251, 129, 237, 29, 118, 218, 86, 30, 251, 129, 209, 76, 105, 30, 251,
+ 129, 237, 25, 105, 30, 251, 129, 241, 41, 108, 30, 251, 129, 209, 76,
+ 108, 30, 251, 129, 245, 56, 120, 242, 64, 30, 251, 129, 241, 41, 120,
+ 242, 64, 30, 251, 129, 208, 61, 170, 30, 251, 129, 208, 61, 209, 152, 30,
+ 251, 129, 208, 61, 209, 153, 250, 255, 18, 30, 251, 129, 237, 25, 209,
+ 152, 30, 251, 129, 224, 222, 209, 152, 30, 251, 129, 209, 76, 209, 152,
+ 30, 251, 129, 209, 76, 209, 53, 30, 251, 129, 208, 61, 240, 18, 30, 251,
+ 129, 208, 61, 240, 19, 250, 255, 18, 30, 251, 129, 237, 25, 240, 18, 30,
+ 251, 129, 209, 76, 240, 18, 30, 251, 129, 209, 76, 118, 236, 11, 30, 251,
+ 129, 209, 76, 126, 236, 11, 30, 251, 129, 241, 41, 239, 233, 236, 11, 30,
+ 251, 129, 208, 61, 239, 233, 236, 11, 30, 251, 129, 209, 76, 239, 233,
+ 236, 11, 30, 251, 129, 247, 21, 239, 233, 236, 11, 30, 251, 129, 223, 60,
+ 239, 233, 236, 11, 30, 251, 129, 209, 76, 118, 209, 36, 30, 251, 129,
+ 209, 76, 239, 233, 209, 36, 30, 251, 129, 244, 40, 239, 233, 224, 85, 30,
+ 251, 129, 211, 49, 240, 19, 224, 85, 30, 118, 162, 54, 30, 118, 162, 2,
+ 250, 255, 18, 30, 120, 209, 58, 54, 30, 126, 217, 54, 54, 30, 203, 50,
+ 54, 30, 209, 238, 54, 30, 242, 66, 54, 30, 220, 87, 54, 30, 120, 220, 86,
+ 54, 30, 126, 220, 86, 54, 30, 239, 147, 220, 86, 54, 30, 239, 233, 220,
+ 86, 54, 30, 224, 216, 54, 30, 228, 139, 248, 219, 54, 30, 227, 88, 54,
+ 30, 219, 213, 54, 30, 203, 173, 54, 30, 250, 87, 54, 30, 250, 102, 54,
+ 30, 238, 7, 54, 30, 208, 23, 248, 219, 54, 30, 202, 85, 54, 30, 118, 217,
+ 56, 54, 30, 212, 113, 54, 215, 210, 213, 102, 54, 215, 210, 206, 249, 54,
+ 215, 210, 213, 135, 54, 215, 210, 213, 100, 54, 215, 210, 243, 183, 213,
+ 100, 54, 215, 210, 212, 135, 54, 215, 210, 244, 36, 54, 215, 210, 217,
+ 39, 54, 215, 210, 213, 119, 54, 215, 210, 242, 23, 54, 215, 210, 250, 82,
+ 54, 215, 210, 246, 213, 54, 30, 16, 209, 208, 216, 59, 218, 203, 243,
+ 160, 2, 219, 25, 218, 203, 243, 160, 2, 218, 78, 237, 64, 218, 203, 243,
+ 160, 2, 209, 211, 237, 64, 218, 203, 243, 160, 2, 247, 42, 218, 203, 243,
+ 160, 2, 246, 133, 218, 203, 243, 160, 2, 203, 250, 218, 203, 243, 160, 2,
+ 237, 35, 218, 203, 243, 160, 2, 238, 213, 218, 203, 243, 160, 2, 209, 0,
+ 218, 203, 243, 160, 2, 47, 218, 203, 243, 160, 2, 247, 240, 218, 203,
+ 243, 160, 2, 213, 8, 218, 203, 243, 160, 2, 246, 4, 218, 203, 243, 160,
+ 2, 225, 121, 218, 203, 243, 160, 2, 225, 68, 218, 203, 243, 160, 2, 214,
+ 213, 218, 203, 243, 160, 2, 227, 143, 218, 203, 243, 160, 2, 248, 5, 218,
+ 203, 243, 160, 2, 247, 26, 218, 91, 218, 203, 243, 160, 2, 243, 98, 218,
+ 203, 243, 160, 2, 245, 239, 218, 203, 243, 160, 2, 212, 46, 218, 203,
+ 243, 160, 2, 245, 240, 218, 203, 243, 160, 2, 248, 147, 218, 203, 243,
+ 160, 2, 212, 251, 218, 203, 243, 160, 2, 236, 53, 218, 203, 243, 160, 2,
+ 237, 1, 218, 203, 243, 160, 2, 247, 174, 227, 210, 218, 203, 243, 160, 2,
+ 247, 17, 218, 203, 243, 160, 2, 216, 184, 218, 203, 243, 160, 2, 241,
+ 186, 218, 203, 243, 160, 2, 242, 71, 218, 203, 243, 160, 2, 207, 188,
+ 218, 203, 243, 160, 2, 248, 150, 218, 203, 243, 160, 2, 218, 92, 208, 95,
+ 218, 203, 243, 160, 2, 205, 211, 218, 203, 243, 160, 2, 219, 92, 218,
+ 203, 243, 160, 2, 215, 201, 218, 203, 243, 160, 2, 227, 127, 218, 203,
+ 243, 160, 2, 219, 194, 249, 25, 218, 203, 243, 160, 2, 239, 193, 218,
+ 203, 243, 160, 2, 237, 255, 218, 203, 243, 160, 2, 211, 50, 218, 203,
+ 243, 160, 2, 5, 250, 9, 218, 203, 243, 160, 2, 204, 72, 248, 238, 218,
+ 203, 243, 160, 2, 39, 220, 89, 95, 226, 197, 1, 63, 226, 197, 1, 74, 226,
+ 197, 1, 249, 255, 226, 197, 1, 248, 99, 226, 197, 1, 239, 75, 226, 197,
+ 1, 245, 51, 226, 197, 1, 75, 226, 197, 1, 204, 144, 226, 197, 1, 202,
+ 159, 226, 197, 1, 209, 110, 226, 197, 1, 230, 184, 226, 197, 1, 230, 54,
+ 226, 197, 1, 217, 134, 226, 197, 1, 159, 226, 197, 1, 226, 185, 226, 197,
+ 1, 223, 163, 226, 197, 1, 224, 87, 226, 197, 1, 221, 228, 226, 197, 1,
+ 68, 226, 197, 1, 219, 184, 226, 197, 1, 229, 48, 226, 197, 1, 146, 226,
+ 197, 1, 194, 226, 197, 1, 210, 69, 226, 197, 1, 207, 244, 226, 197, 1,
+ 250, 231, 226, 197, 1, 241, 92, 226, 197, 1, 237, 171, 226, 197, 1, 203,
+ 196, 247, 32, 1, 63, 247, 32, 1, 219, 170, 247, 32, 1, 245, 51, 247, 32,
+ 1, 159, 247, 32, 1, 206, 176, 247, 32, 1, 146, 247, 32, 1, 227, 238, 247,
+ 32, 1, 254, 34, 247, 32, 1, 217, 134, 247, 32, 1, 249, 255, 247, 32, 1,
+ 226, 185, 247, 32, 1, 78, 247, 32, 1, 244, 214, 247, 32, 1, 210, 69, 247,
+ 32, 1, 213, 92, 247, 32, 1, 213, 91, 247, 32, 1, 194, 247, 32, 1, 247,
+ 124, 247, 32, 1, 68, 247, 32, 1, 221, 228, 247, 32, 1, 203, 196, 247, 32,
+ 1, 223, 163, 247, 32, 1, 207, 243, 247, 32, 1, 219, 184, 247, 32, 1, 211,
+ 167, 247, 32, 1, 75, 247, 32, 1, 74, 247, 32, 1, 206, 173, 247, 32, 1,
+ 230, 54, 247, 32, 1, 230, 45, 247, 32, 1, 223, 27, 247, 32, 1, 206, 178,
+ 247, 32, 1, 239, 75, 247, 32, 1, 239, 10, 247, 32, 1, 211, 108, 247, 32,
+ 1, 211, 107, 247, 32, 1, 222, 205, 247, 32, 1, 231, 83, 247, 32, 1, 247,
+ 123, 247, 32, 1, 207, 244, 247, 32, 1, 206, 175, 247, 32, 1, 215, 186,
+ 247, 32, 1, 225, 59, 247, 32, 1, 225, 58, 247, 32, 1, 225, 57, 247, 32,
+ 1, 225, 56, 247, 32, 1, 227, 237, 247, 32, 1, 241, 190, 247, 32, 1, 206,
+ 174, 84, 241, 44, 209, 35, 82, 84, 241, 44, 17, 105, 84, 241, 44, 17,
+ 108, 84, 241, 44, 17, 147, 84, 241, 44, 17, 149, 84, 241, 44, 17, 170,
+ 84, 241, 44, 17, 195, 84, 241, 44, 17, 213, 111, 84, 241, 44, 17, 199,
+ 84, 241, 44, 17, 222, 63, 84, 241, 44, 42, 209, 152, 84, 241, 44, 42,
+ 207, 151, 84, 241, 44, 42, 209, 53, 84, 241, 44, 42, 239, 153, 84, 241,
+ 44, 42, 240, 18, 84, 241, 44, 42, 212, 74, 84, 241, 44, 42, 213, 105, 84,
+ 241, 44, 42, 241, 134, 84, 241, 44, 42, 222, 58, 84, 241, 44, 42, 118,
+ 236, 11, 84, 241, 44, 42, 120, 236, 11, 84, 241, 44, 42, 126, 236, 11,
+ 84, 241, 44, 42, 239, 147, 236, 11, 84, 241, 44, 42, 239, 233, 236, 11,
+ 84, 241, 44, 42, 212, 88, 236, 11, 84, 241, 44, 42, 213, 112, 236, 11,
+ 84, 241, 44, 42, 241, 143, 236, 11, 84, 241, 44, 42, 222, 64, 236, 11,
+ 38, 37, 1, 63, 38, 37, 1, 248, 162, 38, 37, 1, 229, 201, 38, 37, 1, 244,
+ 75, 38, 37, 1, 74, 38, 37, 1, 206, 55, 38, 37, 1, 202, 92, 38, 37, 1,
+ 237, 67, 38, 37, 1, 209, 92, 38, 37, 1, 75, 38, 37, 1, 173, 38, 37, 1,
+ 241, 122, 38, 37, 1, 241, 103, 38, 37, 1, 241, 92, 38, 37, 1, 241, 7, 38,
+ 37, 1, 78, 38, 37, 1, 219, 34, 38, 37, 1, 213, 43, 38, 37, 1, 228, 209,
+ 38, 37, 1, 241, 28, 38, 37, 1, 241, 17, 38, 37, 1, 209, 187, 38, 37, 1,
+ 68, 38, 37, 1, 241, 125, 38, 37, 1, 218, 195, 38, 37, 1, 229, 129, 38,
+ 37, 1, 241, 154, 38, 37, 1, 241, 19, 38, 37, 1, 246, 170, 38, 37, 1, 231,
+ 83, 38, 37, 1, 206, 178, 38, 37, 1, 241, 0, 38, 37, 221, 44, 105, 38, 37,
+ 221, 44, 170, 38, 37, 221, 44, 209, 152, 38, 37, 221, 44, 240, 18, 238,
+ 17, 1, 251, 67, 238, 17, 1, 248, 255, 238, 17, 1, 238, 78, 238, 17, 1,
+ 244, 194, 238, 17, 1, 251, 63, 238, 17, 1, 217, 117, 238, 17, 1, 230,
+ 196, 238, 17, 1, 237, 150, 238, 17, 1, 209, 49, 238, 17, 1, 241, 133,
+ 238, 17, 1, 228, 176, 238, 17, 1, 228, 90, 238, 17, 1, 225, 114, 238, 17,
+ 1, 223, 62, 238, 17, 1, 230, 154, 238, 17, 1, 206, 196, 238, 17, 1, 219,
+ 145, 238, 17, 1, 222, 58, 238, 17, 1, 216, 196, 238, 17, 1, 214, 216,
+ 238, 17, 1, 209, 166, 238, 17, 1, 204, 10, 238, 17, 1, 240, 88, 238, 17,
+ 1, 231, 87, 238, 17, 1, 235, 252, 238, 17, 1, 219, 223, 238, 17, 1, 222,
+ 64, 236, 11, 38, 218, 237, 1, 250, 231, 38, 218, 237, 1, 247, 160, 38,
+ 218, 237, 1, 238, 248, 38, 218, 237, 1, 243, 101, 38, 218, 237, 1, 74,
+ 38, 218, 237, 1, 202, 62, 38, 218, 237, 1, 241, 247, 38, 218, 237, 1,
+ 202, 99, 38, 218, 237, 1, 241, 245, 38, 218, 237, 1, 75, 38, 218, 237, 1,
+ 229, 15, 38, 218, 237, 1, 227, 206, 38, 218, 237, 1, 224, 238, 38, 218,
+ 237, 1, 222, 228, 38, 218, 237, 1, 205, 175, 38, 218, 237, 1, 219, 22,
+ 38, 218, 237, 1, 216, 121, 38, 218, 237, 1, 212, 142, 38, 218, 237, 1,
+ 209, 250, 38, 218, 237, 1, 68, 38, 218, 237, 1, 246, 151, 38, 218, 237,
+ 1, 212, 235, 38, 218, 237, 1, 213, 45, 38, 218, 237, 1, 202, 215, 38,
+ 218, 237, 1, 203, 30, 38, 218, 237, 1, 78, 38, 218, 237, 1, 220, 18, 38,
+ 218, 237, 1, 241, 154, 38, 218, 237, 1, 152, 38, 218, 237, 1, 207, 254,
+ 38, 218, 237, 1, 206, 43, 38, 218, 237, 1, 203, 34, 38, 218, 237, 1, 203,
+ 32, 38, 218, 237, 1, 203, 66, 38, 218, 237, 1, 231, 110, 38, 218, 237, 1,
+ 202, 213, 38, 218, 237, 1, 198, 38, 218, 237, 1, 235, 171, 39, 38, 218,
+ 237, 1, 250, 231, 39, 38, 218, 237, 1, 243, 101, 39, 38, 218, 237, 1,
+ 202, 99, 39, 38, 218, 237, 1, 222, 228, 39, 38, 218, 237, 1, 212, 142,
+ 207, 19, 1, 251, 6, 207, 19, 1, 248, 106, 207, 19, 1, 238, 236, 207, 19,
+ 1, 229, 144, 207, 19, 1, 244, 37, 207, 19, 1, 236, 136, 207, 19, 1, 204,
+ 0, 207, 19, 1, 202, 83, 207, 19, 1, 236, 45, 207, 19, 1, 209, 132, 207,
+ 19, 1, 202, 236, 207, 19, 1, 230, 22, 207, 19, 1, 212, 255, 207, 19, 1,
+ 228, 24, 207, 19, 1, 224, 247, 207, 19, 1, 243, 253, 207, 19, 1, 221, 40,
+ 207, 19, 1, 202, 6, 207, 19, 1, 214, 248, 207, 19, 1, 251, 59, 207, 19,
+ 1, 217, 191, 207, 19, 1, 215, 27, 207, 19, 1, 217, 70, 207, 19, 1, 216,
+ 175, 207, 19, 1, 209, 96, 207, 19, 1, 238, 114, 207, 19, 1, 135, 207, 19,
+ 1, 75, 207, 19, 1, 68, 207, 19, 1, 211, 119, 207, 19, 203, 238, 243, 141,
+ 38, 218, 231, 2, 63, 38, 218, 231, 2, 75, 38, 218, 231, 2, 68, 38, 218,
+ 231, 2, 173, 38, 218, 231, 2, 228, 209, 38, 218, 231, 2, 239, 8, 38, 218,
+ 231, 2, 237, 230, 38, 218, 231, 2, 203, 182, 38, 218, 231, 2, 247, 92,
+ 38, 218, 231, 2, 230, 181, 38, 218, 231, 2, 230, 141, 38, 218, 231, 2,
+ 210, 22, 38, 218, 231, 2, 207, 203, 38, 218, 231, 2, 244, 212, 38, 218,
+ 231, 2, 243, 233, 38, 218, 231, 2, 242, 42, 38, 218, 231, 2, 209, 108,
+ 38, 218, 231, 2, 185, 38, 218, 231, 2, 249, 32, 38, 218, 231, 2, 240,
+ 108, 38, 218, 231, 2, 201, 201, 38, 218, 231, 2, 221, 84, 38, 218, 231,
+ 2, 192, 38, 218, 231, 2, 224, 155, 38, 218, 231, 2, 223, 246, 38, 218,
+ 231, 2, 198, 38, 218, 231, 2, 206, 86, 38, 218, 231, 2, 205, 230, 38,
+ 218, 231, 2, 216, 220, 38, 218, 231, 2, 215, 145, 38, 218, 231, 2, 228,
+ 113, 38, 218, 231, 2, 215, 36, 38, 218, 231, 2, 202, 116, 38, 218, 231,
+ 2, 213, 90, 38, 218, 231, 2, 211, 164, 38, 218, 231, 2, 152, 38, 218,
+ 231, 2, 250, 28, 38, 218, 231, 2, 250, 27, 38, 218, 231, 2, 250, 26, 38,
+ 218, 231, 2, 203, 153, 38, 218, 231, 2, 244, 190, 38, 218, 231, 2, 244,
+ 189, 38, 218, 231, 2, 249, 8, 38, 218, 231, 2, 247, 144, 38, 218, 231,
+ 203, 238, 243, 141, 38, 218, 231, 42, 105, 38, 218, 231, 42, 108, 38,
+ 218, 231, 42, 209, 152, 38, 218, 231, 42, 207, 151, 38, 218, 231, 42,
+ 236, 11, 244, 17, 6, 1, 163, 75, 244, 17, 6, 1, 163, 74, 244, 17, 6, 1,
+ 163, 63, 244, 17, 6, 1, 163, 251, 73, 244, 17, 6, 1, 163, 78, 244, 17, 6,
+ 1, 163, 220, 18, 244, 17, 6, 1, 212, 228, 75, 244, 17, 6, 1, 212, 228,
+ 74, 244, 17, 6, 1, 212, 228, 63, 244, 17, 6, 1, 212, 228, 251, 73, 244,
+ 17, 6, 1, 212, 228, 78, 244, 17, 6, 1, 212, 228, 220, 18, 244, 17, 6, 1,
+ 250, 8, 244, 17, 6, 1, 219, 195, 244, 17, 6, 1, 203, 217, 244, 17, 6, 1,
+ 203, 49, 244, 17, 6, 1, 237, 171, 244, 17, 6, 1, 219, 23, 244, 17, 6, 1,
+ 248, 150, 244, 17, 6, 1, 209, 176, 244, 17, 6, 1, 244, 61, 244, 17, 6, 1,
+ 246, 166, 244, 17, 6, 1, 230, 159, 244, 17, 6, 1, 229, 208, 244, 17, 6,
+ 1, 238, 211, 244, 17, 6, 1, 241, 154, 244, 17, 6, 1, 206, 50, 244, 17, 6,
+ 1, 240, 243, 244, 17, 6, 1, 209, 90, 244, 17, 6, 1, 241, 17, 244, 17, 6,
+ 1, 202, 90, 244, 17, 6, 1, 241, 7, 244, 17, 6, 1, 202, 70, 244, 17, 6, 1,
+ 241, 28, 244, 17, 6, 1, 241, 122, 244, 17, 6, 1, 241, 103, 244, 17, 6, 1,
+ 241, 92, 244, 17, 6, 1, 241, 78, 244, 17, 6, 1, 220, 57, 244, 17, 6, 1,
+ 240, 220, 244, 17, 5, 1, 163, 75, 244, 17, 5, 1, 163, 74, 244, 17, 5, 1,
+ 163, 63, 244, 17, 5, 1, 163, 251, 73, 244, 17, 5, 1, 163, 78, 244, 17, 5,
+ 1, 163, 220, 18, 244, 17, 5, 1, 212, 228, 75, 244, 17, 5, 1, 212, 228,
+ 74, 244, 17, 5, 1, 212, 228, 63, 244, 17, 5, 1, 212, 228, 251, 73, 244,
+ 17, 5, 1, 212, 228, 78, 244, 17, 5, 1, 212, 228, 220, 18, 244, 17, 5, 1,
+ 250, 8, 244, 17, 5, 1, 219, 195, 244, 17, 5, 1, 203, 217, 244, 17, 5, 1,
+ 203, 49, 244, 17, 5, 1, 237, 171, 244, 17, 5, 1, 219, 23, 244, 17, 5, 1,
+ 248, 150, 244, 17, 5, 1, 209, 176, 244, 17, 5, 1, 244, 61, 244, 17, 5, 1,
+ 246, 166, 244, 17, 5, 1, 230, 159, 244, 17, 5, 1, 229, 208, 244, 17, 5,
+ 1, 238, 211, 244, 17, 5, 1, 241, 154, 244, 17, 5, 1, 206, 50, 244, 17, 5,
+ 1, 240, 243, 244, 17, 5, 1, 209, 90, 244, 17, 5, 1, 241, 17, 244, 17, 5,
+ 1, 202, 90, 244, 17, 5, 1, 241, 7, 244, 17, 5, 1, 202, 70, 244, 17, 5, 1,
+ 241, 28, 244, 17, 5, 1, 241, 122, 244, 17, 5, 1, 241, 103, 244, 17, 5, 1,
+ 241, 92, 244, 17, 5, 1, 241, 78, 244, 17, 5, 1, 220, 57, 244, 17, 5, 1,
+ 240, 220, 213, 50, 1, 219, 20, 213, 50, 1, 208, 131, 213, 50, 1, 229, 96,
+ 213, 50, 1, 240, 53, 213, 50, 1, 209, 65, 213, 50, 1, 212, 13, 213, 50,
+ 1, 210, 190, 213, 50, 1, 246, 90, 213, 50, 1, 203, 51, 213, 50, 1, 236,
+ 9, 213, 50, 1, 248, 85, 213, 50, 1, 244, 74, 213, 50, 1, 238, 250, 213,
+ 50, 1, 205, 170, 213, 50, 1, 209, 71, 213, 50, 1, 202, 15, 213, 50, 1,
+ 225, 18, 213, 50, 1, 230, 80, 213, 50, 1, 203, 254, 213, 50, 1, 237, 159,
+ 213, 50, 1, 227, 33, 213, 50, 1, 224, 111, 213, 50, 1, 231, 90, 213, 50,
+ 1, 241, 152, 213, 50, 1, 250, 75, 213, 50, 1, 251, 113, 213, 50, 1, 220,
+ 31, 213, 50, 1, 203, 241, 213, 50, 1, 219, 211, 213, 50, 1, 251, 73, 213,
+ 50, 1, 215, 224, 213, 50, 1, 221, 40, 213, 50, 1, 241, 172, 213, 50, 1,
+ 251, 78, 213, 50, 1, 235, 162, 213, 50, 1, 206, 224, 213, 50, 1, 220, 95,
+ 213, 50, 1, 220, 10, 213, 50, 1, 220, 55, 213, 50, 1, 250, 11, 213, 50,
+ 1, 250, 121, 213, 50, 1, 219, 244, 213, 50, 1, 251, 54, 213, 50, 1, 241,
+ 21, 213, 50, 1, 250, 99, 213, 50, 1, 241, 183, 213, 50, 1, 235, 170, 213,
+ 50, 1, 203, 16, 219, 225, 1, 251, 30, 219, 225, 1, 249, 32, 219, 225, 1,
+ 210, 22, 219, 225, 1, 230, 181, 219, 225, 1, 203, 182, 219, 225, 1, 229,
+ 144, 219, 225, 1, 244, 60, 219, 225, 1, 216, 220, 219, 225, 1, 215, 36,
+ 219, 225, 1, 213, 5, 219, 225, 1, 244, 1, 219, 225, 1, 247, 7, 219, 225,
+ 1, 239, 8, 219, 225, 1, 240, 108, 219, 225, 1, 217, 124, 219, 225, 1,
+ 230, 38, 219, 225, 1, 228, 108, 219, 225, 1, 224, 124, 219, 225, 1, 221,
+ 24, 219, 225, 1, 204, 70, 219, 225, 1, 152, 219, 225, 1, 198, 219, 225,
+ 1, 63, 219, 225, 1, 74, 219, 225, 1, 75, 219, 225, 1, 78, 219, 225, 1,
+ 68, 219, 225, 1, 252, 25, 219, 225, 1, 241, 161, 219, 225, 1, 220, 18,
+ 219, 225, 17, 202, 84, 219, 225, 17, 105, 219, 225, 17, 108, 219, 225,
+ 17, 147, 219, 225, 17, 149, 219, 225, 17, 170, 219, 225, 17, 195, 219,
+ 225, 17, 213, 111, 219, 225, 17, 199, 219, 225, 17, 222, 63, 241, 118, 1,
+ 63, 241, 118, 1, 248, 162, 241, 118, 1, 246, 238, 241, 118, 1, 246, 170,
+ 241, 118, 1, 244, 75, 241, 118, 1, 223, 17, 241, 118, 1, 243, 248, 241,
+ 118, 1, 241, 145, 241, 118, 1, 74, 241, 118, 1, 240, 60, 241, 118, 1,
+ 238, 190, 241, 118, 1, 238, 52, 241, 118, 1, 237, 67, 241, 118, 1, 75,
+ 241, 118, 1, 230, 161, 241, 118, 1, 229, 201, 241, 118, 1, 227, 234, 241,
+ 118, 1, 227, 73, 241, 118, 1, 225, 20, 241, 118, 1, 222, 240, 241, 118,
+ 1, 201, 201, 241, 118, 1, 222, 41, 241, 118, 1, 78, 241, 118, 1, 219, 34,
+ 241, 118, 1, 217, 106, 241, 118, 1, 216, 158, 241, 118, 1, 215, 180, 241,
+ 118, 1, 214, 177, 241, 118, 1, 213, 43, 241, 118, 1, 209, 187, 241, 118,
+ 1, 209, 92, 241, 118, 1, 68, 241, 118, 1, 206, 55, 241, 118, 1, 203, 176,
+ 241, 118, 1, 203, 124, 241, 118, 1, 202, 92, 241, 118, 1, 202, 71, 241,
+ 118, 1, 238, 105, 241, 118, 1, 238, 111, 241, 118, 1, 229, 129, 247, 14,
+ 251, 31, 1, 251, 1, 247, 14, 251, 31, 1, 248, 108, 247, 14, 251, 31, 1,
+ 238, 69, 247, 14, 251, 31, 1, 244, 140, 247, 14, 251, 31, 1, 241, 171,
+ 247, 14, 251, 31, 1, 202, 102, 247, 14, 251, 31, 1, 240, 183, 247, 14,
+ 251, 31, 1, 202, 65, 247, 14, 251, 31, 1, 209, 213, 247, 14, 251, 31, 1,
+ 246, 199, 247, 14, 251, 31, 1, 202, 224, 247, 14, 251, 31, 1, 202, 80,
+ 247, 14, 251, 31, 1, 230, 223, 247, 14, 251, 31, 1, 213, 90, 247, 14,
+ 251, 31, 1, 228, 17, 247, 14, 251, 31, 1, 230, 235, 247, 14, 251, 31, 1,
+ 203, 172, 247, 14, 251, 31, 1, 242, 7, 247, 14, 251, 31, 1, 247, 39, 247,
+ 14, 251, 31, 1, 230, 142, 247, 14, 251, 31, 1, 229, 240, 247, 14, 251,
+ 31, 1, 226, 194, 247, 14, 251, 31, 1, 237, 14, 247, 14, 251, 31, 1, 217,
+ 107, 247, 14, 251, 31, 1, 250, 177, 247, 14, 251, 31, 1, 246, 107, 247,
+ 14, 251, 31, 1, 246, 142, 247, 14, 251, 31, 1, 245, 63, 247, 14, 251, 31,
+ 1, 225, 103, 247, 14, 251, 31, 1, 217, 111, 247, 14, 251, 31, 1, 221,
+ 151, 247, 14, 251, 31, 1, 241, 240, 247, 14, 251, 31, 1, 213, 73, 247,
+ 14, 251, 31, 1, 230, 162, 247, 14, 251, 31, 1, 220, 31, 247, 14, 251, 31,
+ 1, 207, 125, 247, 14, 251, 31, 1, 240, 83, 247, 14, 251, 31, 1, 241, 253,
+ 247, 14, 251, 31, 1, 246, 176, 247, 14, 251, 31, 1, 219, 9, 247, 14, 251,
+ 31, 1, 238, 95, 247, 14, 251, 31, 1, 216, 172, 247, 14, 251, 31, 1, 213,
+ 99, 247, 14, 251, 31, 1, 205, 232, 247, 14, 251, 31, 1, 208, 193, 247,
+ 14, 251, 31, 1, 212, 207, 247, 14, 251, 31, 1, 230, 194, 247, 14, 251,
+ 31, 1, 245, 64, 247, 14, 251, 31, 1, 247, 7, 247, 14, 251, 31, 1, 203,
+ 56, 247, 14, 251, 31, 1, 218, 102, 247, 14, 251, 31, 1, 229, 62, 247, 14,
+ 251, 31, 246, 49, 82, 29, 34, 2, 251, 231, 29, 34, 2, 251, 230, 29, 34,
+ 2, 251, 229, 29, 34, 2, 251, 228, 29, 34, 2, 251, 227, 29, 34, 2, 251,
+ 226, 29, 34, 2, 251, 225, 29, 34, 2, 251, 224, 29, 34, 2, 251, 223, 29,
+ 34, 2, 251, 222, 29, 34, 2, 251, 221, 29, 34, 2, 251, 220, 29, 34, 2,
+ 251, 219, 29, 34, 2, 251, 218, 29, 34, 2, 251, 217, 29, 34, 2, 251, 216,
+ 29, 34, 2, 251, 215, 29, 34, 2, 251, 214, 29, 34, 2, 251, 213, 29, 34, 2,
+ 251, 212, 29, 34, 2, 251, 211, 29, 34, 2, 251, 210, 29, 34, 2, 251, 209,
+ 29, 34, 2, 251, 208, 29, 34, 2, 251, 207, 29, 34, 2, 251, 206, 29, 34, 2,
+ 251, 205, 29, 34, 2, 254, 239, 29, 34, 2, 251, 204, 29, 34, 2, 251, 203,
+ 29, 34, 2, 251, 202, 29, 34, 2, 251, 201, 29, 34, 2, 251, 200, 29, 34, 2,
+ 251, 199, 29, 34, 2, 251, 198, 29, 34, 2, 251, 197, 29, 34, 2, 251, 196,
+ 29, 34, 2, 251, 195, 29, 34, 2, 251, 194, 29, 34, 2, 251, 193, 29, 34, 2,
+ 251, 192, 29, 34, 2, 251, 191, 29, 34, 2, 251, 190, 29, 34, 2, 251, 189,
+ 29, 34, 2, 251, 188, 29, 34, 2, 251, 187, 29, 34, 2, 251, 186, 29, 34, 2,
+ 251, 185, 29, 34, 2, 251, 184, 29, 34, 2, 251, 183, 29, 34, 2, 251, 182,
+ 29, 34, 2, 251, 181, 29, 34, 2, 251, 180, 29, 34, 2, 251, 179, 29, 34, 2,
+ 251, 178, 29, 34, 2, 251, 177, 29, 34, 2, 251, 176, 29, 34, 2, 251, 175,
+ 29, 34, 2, 251, 174, 29, 34, 2, 251, 173, 29, 34, 2, 251, 172, 29, 34, 2,
+ 251, 171, 29, 34, 2, 251, 170, 29, 34, 2, 251, 169, 29, 34, 2, 251, 168,
+ 29, 34, 2, 251, 167, 29, 34, 2, 251, 166, 29, 34, 2, 251, 165, 29, 34, 2,
+ 251, 164, 29, 34, 2, 251, 163, 29, 34, 2, 251, 162, 29, 34, 2, 254, 152,
+ 29, 34, 2, 251, 161, 29, 34, 2, 251, 160, 29, 34, 2, 254, 117, 29, 34, 2,
+ 251, 159, 29, 34, 2, 251, 158, 29, 34, 2, 251, 157, 29, 34, 2, 251, 156,
+ 29, 34, 2, 254, 104, 29, 34, 2, 251, 155, 29, 34, 2, 251, 154, 29, 34, 2,
+ 251, 153, 29, 34, 2, 251, 152, 29, 34, 2, 251, 151, 29, 34, 2, 253, 176,
+ 29, 34, 2, 253, 175, 29, 34, 2, 253, 174, 29, 34, 2, 253, 173, 29, 34, 2,
+ 253, 172, 29, 34, 2, 253, 171, 29, 34, 2, 253, 170, 29, 34, 2, 253, 169,
+ 29, 34, 2, 253, 167, 29, 34, 2, 253, 166, 29, 34, 2, 253, 165, 29, 34, 2,
+ 253, 164, 29, 34, 2, 253, 163, 29, 34, 2, 253, 162, 29, 34, 2, 253, 160,
+ 29, 34, 2, 253, 159, 29, 34, 2, 253, 158, 29, 34, 2, 253, 157, 29, 34, 2,
+ 253, 156, 29, 34, 2, 253, 155, 29, 34, 2, 253, 154, 29, 34, 2, 253, 153,
+ 29, 34, 2, 253, 152, 29, 34, 2, 253, 151, 29, 34, 2, 253, 150, 29, 34, 2,
+ 253, 149, 29, 34, 2, 253, 148, 29, 34, 2, 253, 147, 29, 34, 2, 253, 146,
+ 29, 34, 2, 253, 145, 29, 34, 2, 253, 144, 29, 34, 2, 253, 143, 29, 34, 2,
+ 253, 142, 29, 34, 2, 253, 140, 29, 34, 2, 253, 139, 29, 34, 2, 253, 138,
+ 29, 34, 2, 253, 134, 29, 34, 2, 253, 133, 29, 34, 2, 253, 132, 29, 34, 2,
+ 253, 131, 29, 34, 2, 253, 127, 29, 34, 2, 253, 126, 29, 34, 2, 253, 125,
+ 29, 34, 2, 253, 124, 29, 34, 2, 253, 123, 29, 34, 2, 253, 122, 29, 34, 2,
+ 253, 121, 29, 34, 2, 253, 120, 29, 34, 2, 253, 119, 29, 34, 2, 253, 118,
+ 29, 34, 2, 253, 117, 29, 34, 2, 253, 116, 29, 34, 2, 253, 115, 29, 34, 2,
+ 253, 114, 29, 34, 2, 253, 113, 29, 34, 2, 253, 112, 29, 34, 2, 253, 111,
+ 29, 34, 2, 253, 110, 29, 34, 2, 253, 109, 29, 34, 2, 253, 108, 29, 34, 2,
+ 253, 107, 29, 34, 2, 253, 106, 29, 34, 2, 253, 105, 29, 34, 2, 253, 103,
+ 29, 34, 2, 253, 102, 29, 34, 2, 253, 101, 29, 34, 2, 253, 100, 29, 34, 2,
+ 253, 99, 29, 34, 2, 253, 97, 29, 34, 2, 253, 96, 29, 34, 2, 253, 95, 29,
+ 34, 2, 253, 94, 29, 34, 2, 253, 92, 29, 34, 2, 253, 91, 29, 34, 2, 253,
+ 90, 29, 34, 2, 253, 56, 29, 34, 2, 253, 54, 29, 34, 2, 253, 52, 29, 34,
+ 2, 253, 50, 29, 34, 2, 253, 48, 29, 34, 2, 253, 46, 29, 34, 2, 253, 44,
+ 29, 34, 2, 253, 42, 29, 34, 2, 253, 40, 29, 34, 2, 253, 38, 29, 34, 2,
+ 253, 36, 29, 34, 2, 253, 33, 29, 34, 2, 253, 31, 29, 34, 2, 253, 29, 29,
+ 34, 2, 253, 27, 29, 34, 2, 253, 25, 29, 34, 2, 253, 23, 29, 34, 2, 253,
+ 21, 29, 34, 2, 253, 19, 29, 34, 2, 252, 193, 29, 34, 2, 252, 192, 29, 34,
+ 2, 252, 191, 29, 34, 2, 252, 190, 29, 34, 2, 252, 189, 29, 34, 2, 252,
+ 188, 29, 34, 2, 252, 186, 29, 34, 2, 252, 185, 29, 34, 2, 252, 184, 29,
+ 34, 2, 252, 183, 29, 34, 2, 252, 182, 29, 34, 2, 252, 181, 29, 34, 2,
+ 252, 179, 29, 34, 2, 252, 178, 29, 34, 2, 252, 174, 29, 34, 2, 252, 173,
+ 29, 34, 2, 252, 171, 29, 34, 2, 252, 170, 29, 34, 2, 252, 169, 29, 34, 2,
+ 252, 168, 29, 34, 2, 252, 167, 29, 34, 2, 252, 166, 29, 34, 2, 252, 165,
+ 29, 34, 2, 252, 164, 29, 34, 2, 252, 163, 29, 34, 2, 252, 162, 29, 34, 2,
+ 252, 161, 29, 34, 2, 252, 160, 29, 34, 2, 252, 159, 29, 34, 2, 252, 158,
+ 29, 34, 2, 252, 157, 29, 34, 2, 252, 156, 29, 34, 2, 252, 155, 29, 34, 2,
+ 252, 154, 29, 34, 2, 252, 153, 29, 34, 2, 252, 152, 29, 34, 2, 252, 151,
+ 29, 34, 2, 252, 150, 29, 34, 2, 252, 149, 29, 34, 2, 252, 148, 29, 34, 2,
+ 252, 147, 29, 34, 2, 252, 146, 29, 34, 2, 252, 145, 29, 34, 2, 252, 144,
+ 29, 34, 2, 252, 143, 29, 34, 2, 252, 142, 29, 34, 2, 252, 141, 29, 34, 2,
+ 252, 140, 29, 34, 2, 252, 139, 29, 34, 2, 252, 138, 29, 34, 2, 252, 137,
+ 29, 34, 2, 252, 136, 29, 34, 2, 252, 135, 29, 34, 2, 252, 134, 29, 34, 2,
+ 252, 133, 29, 34, 2, 252, 132, 29, 34, 2, 252, 131, 29, 34, 2, 252, 130,
+ 29, 34, 2, 252, 129, 29, 34, 2, 252, 128, 29, 34, 2, 252, 127, 29, 34, 2,
+ 252, 126, 29, 34, 2, 252, 125, 29, 34, 2, 252, 124, 29, 34, 2, 252, 123,
+ 29, 34, 2, 252, 122, 29, 34, 2, 252, 121, 29, 34, 2, 252, 120, 29, 34, 2,
+ 252, 119, 29, 34, 2, 252, 118, 29, 34, 2, 252, 117, 29, 34, 2, 252, 116,
+ 29, 34, 2, 252, 115, 29, 34, 2, 252, 114, 29, 34, 2, 252, 113, 29, 34, 2,
+ 252, 112, 29, 34, 2, 252, 111, 29, 34, 2, 252, 110, 29, 34, 2, 252, 109,
+ 29, 34, 2, 252, 108, 29, 34, 2, 252, 107, 29, 34, 2, 252, 106, 29, 34, 2,
+ 252, 105, 29, 34, 2, 252, 104, 29, 34, 2, 252, 103, 29, 34, 2, 252, 102,
+ 29, 34, 2, 252, 101, 29, 34, 2, 252, 100, 29, 34, 2, 252, 99, 29, 34, 2,
+ 252, 98, 29, 34, 2, 252, 97, 29, 34, 2, 252, 96, 29, 34, 2, 252, 95, 29,
+ 34, 2, 252, 94, 29, 34, 2, 252, 93, 29, 34, 2, 252, 92, 29, 34, 2, 252,
+ 91, 29, 34, 2, 252, 90, 29, 34, 2, 252, 89, 29, 34, 2, 252, 88, 29, 34,
+ 2, 252, 87, 29, 34, 2, 252, 86, 29, 34, 2, 252, 85, 29, 34, 2, 252, 84,
+ 29, 34, 2, 252, 83, 29, 34, 2, 252, 82, 29, 34, 2, 252, 81, 29, 34, 2,
+ 252, 80, 29, 34, 2, 252, 79, 29, 34, 2, 252, 78, 29, 34, 2, 252, 77, 29,
+ 34, 2, 252, 76, 29, 34, 2, 252, 75, 29, 34, 2, 252, 74, 29, 34, 2, 252,
+ 73, 29, 34, 2, 252, 72, 29, 34, 2, 252, 71, 29, 34, 2, 252, 70, 29, 34,
+ 2, 252, 69, 29, 34, 2, 252, 68, 29, 34, 2, 252, 67, 29, 34, 2, 252, 66,
+ 29, 34, 2, 252, 65, 29, 34, 2, 252, 64, 29, 34, 2, 252, 63, 29, 34, 2,
+ 252, 62, 29, 34, 2, 252, 61, 29, 34, 2, 252, 60, 29, 34, 2, 252, 59, 29,
+ 34, 2, 252, 58, 29, 34, 2, 252, 57, 29, 34, 2, 252, 56, 29, 34, 2, 252,
+ 55, 63, 29, 34, 2, 252, 54, 249, 255, 29, 34, 2, 252, 53, 245, 51, 29,
+ 34, 2, 252, 52, 74, 29, 34, 2, 252, 51, 240, 174, 29, 34, 2, 252, 50,
+ 237, 171, 29, 34, 2, 252, 49, 230, 184, 29, 34, 2, 252, 48, 230, 54, 29,
+ 34, 2, 252, 47, 159, 29, 34, 2, 252, 46, 228, 118, 29, 34, 2, 252, 45,
+ 228, 117, 29, 34, 2, 252, 44, 228, 116, 29, 34, 2, 252, 43, 228, 115, 29,
+ 34, 2, 252, 42, 204, 144, 29, 34, 2, 252, 41, 203, 196, 29, 34, 2, 252,
+ 40, 203, 124, 29, 34, 2, 252, 39, 220, 36, 29, 34, 2, 252, 38, 251, 147,
+ 29, 34, 2, 252, 37, 248, 199, 29, 34, 2, 252, 36, 244, 122, 29, 34, 2,
+ 252, 35, 240, 182, 29, 34, 2, 252, 34, 230, 161, 29, 34, 2, 252, 33, 29,
+ 34, 2, 252, 32, 29, 34, 2, 252, 31, 29, 34, 2, 252, 30, 29, 34, 2, 252,
+ 29, 29, 34, 2, 252, 28, 29, 34, 2, 252, 27, 29, 34, 2, 252, 26, 245, 58,
+ 4, 63, 245, 58, 4, 74, 245, 58, 4, 75, 245, 58, 4, 78, 245, 58, 4, 68,
+ 245, 58, 4, 230, 181, 245, 58, 4, 230, 101, 245, 58, 4, 173, 245, 58, 4,
+ 229, 201, 245, 58, 4, 229, 100, 245, 58, 4, 229, 26, 245, 58, 4, 228,
+ 209, 245, 58, 4, 228, 113, 245, 58, 4, 227, 234, 245, 58, 4, 227, 148,
+ 245, 58, 4, 227, 49, 245, 58, 4, 226, 239, 245, 58, 4, 192, 245, 58, 4,
+ 225, 20, 245, 58, 4, 224, 155, 245, 58, 4, 224, 82, 245, 58, 4, 223, 246,
+ 245, 58, 4, 201, 201, 245, 58, 4, 222, 240, 245, 58, 4, 222, 100, 245,
+ 58, 4, 221, 191, 245, 58, 4, 221, 84, 245, 58, 4, 185, 245, 58, 4, 219,
+ 34, 245, 58, 4, 218, 167, 245, 58, 4, 218, 69, 245, 58, 4, 217, 191, 245,
+ 58, 4, 216, 220, 245, 58, 4, 216, 158, 245, 58, 4, 216, 57, 245, 58, 4,
+ 215, 227, 245, 58, 4, 215, 145, 245, 58, 4, 215, 36, 245, 58, 4, 214,
+ 177, 245, 58, 4, 212, 162, 245, 58, 4, 212, 13, 245, 58, 4, 211, 10, 245,
+ 58, 4, 210, 22, 245, 58, 4, 209, 187, 245, 58, 4, 209, 2, 245, 58, 4,
+ 135, 245, 58, 4, 207, 203, 245, 58, 4, 204, 111, 245, 58, 4, 204, 62,
+ 245, 58, 4, 204, 30, 245, 58, 4, 204, 0, 245, 58, 4, 203, 182, 245, 58,
+ 4, 203, 176, 245, 58, 4, 202, 116, 245, 58, 4, 202, 17, 231, 51, 250,
+ 130, 1, 251, 28, 231, 51, 250, 130, 1, 248, 105, 231, 51, 250, 130, 1,
+ 238, 67, 231, 51, 250, 130, 1, 244, 177, 231, 51, 250, 130, 1, 237, 67,
+ 231, 51, 250, 130, 1, 204, 70, 231, 51, 250, 130, 1, 202, 95, 231, 51,
+ 250, 130, 1, 237, 19, 231, 51, 250, 130, 1, 209, 128, 231, 51, 250, 130,
+ 1, 202, 235, 231, 51, 250, 130, 1, 229, 250, 231, 51, 250, 130, 1, 228,
+ 19, 231, 51, 250, 130, 1, 224, 247, 231, 51, 250, 130, 1, 221, 40, 231,
+ 51, 250, 130, 1, 214, 249, 231, 51, 250, 130, 1, 250, 3, 231, 51, 250,
+ 130, 1, 219, 34, 231, 51, 250, 130, 1, 215, 26, 231, 51, 250, 130, 1,
+ 217, 69, 231, 51, 250, 130, 1, 216, 91, 231, 51, 250, 130, 1, 212, 255,
+ 231, 51, 250, 130, 1, 209, 201, 231, 51, 250, 130, 214, 168, 54, 231, 51,
+ 250, 130, 42, 105, 231, 51, 250, 130, 42, 108, 231, 51, 250, 130, 42,
+ 147, 231, 51, 250, 130, 42, 209, 152, 231, 51, 250, 130, 42, 207, 151,
+ 231, 51, 250, 130, 42, 118, 236, 11, 231, 51, 250, 130, 42, 118, 209, 36,
+ 231, 51, 250, 130, 42, 209, 153, 209, 36, 219, 134, 1, 251, 28, 219, 134,
+ 1, 248, 105, 219, 134, 1, 238, 67, 219, 134, 1, 244, 177, 219, 134, 1,
+ 237, 67, 219, 134, 1, 204, 70, 219, 134, 1, 202, 95, 219, 134, 1, 237,
+ 19, 219, 134, 1, 209, 128, 219, 134, 1, 202, 235, 219, 134, 1, 229, 250,
+ 219, 134, 1, 228, 19, 219, 134, 1, 224, 247, 219, 134, 1, 46, 221, 40,
+ 219, 134, 1, 221, 40, 219, 134, 1, 214, 249, 219, 134, 1, 250, 3, 219,
+ 134, 1, 219, 34, 219, 134, 1, 215, 26, 219, 134, 1, 217, 69, 219, 134, 1,
+ 216, 91, 219, 134, 1, 212, 255, 219, 134, 1, 209, 201, 219, 134, 227,
+ 217, 239, 212, 219, 134, 216, 11, 239, 212, 219, 134, 42, 105, 219, 134,
+ 42, 108, 219, 134, 42, 147, 219, 134, 42, 149, 219, 134, 42, 170, 219,
+ 134, 42, 209, 152, 219, 134, 42, 207, 151, 223, 102, 1, 46, 251, 28, 223,
+ 102, 1, 251, 28, 223, 102, 1, 46, 248, 105, 223, 102, 1, 248, 105, 223,
+ 102, 1, 238, 67, 223, 102, 1, 244, 177, 223, 102, 1, 46, 237, 67, 223,
+ 102, 1, 237, 67, 223, 102, 1, 204, 70, 223, 102, 1, 202, 95, 223, 102, 1,
+ 237, 19, 223, 102, 1, 209, 128, 223, 102, 1, 46, 202, 235, 223, 102, 1,
+ 202, 235, 223, 102, 1, 46, 229, 250, 223, 102, 1, 229, 250, 223, 102, 1,
+ 46, 228, 19, 223, 102, 1, 228, 19, 223, 102, 1, 46, 224, 247, 223, 102,
+ 1, 224, 247, 223, 102, 1, 46, 221, 40, 223, 102, 1, 221, 40, 223, 102, 1,
+ 214, 249, 223, 102, 1, 250, 3, 223, 102, 1, 219, 34, 223, 102, 1, 215,
+ 26, 223, 102, 1, 217, 69, 223, 102, 1, 216, 91, 223, 102, 1, 46, 212,
+ 255, 223, 102, 1, 212, 255, 223, 102, 1, 209, 201, 223, 102, 42, 105,
+ 223, 102, 42, 108, 223, 102, 42, 147, 223, 102, 42, 149, 223, 102, 245,
+ 116, 42, 149, 223, 102, 42, 170, 223, 102, 42, 209, 152, 223, 102, 42,
+ 207, 151, 223, 102, 42, 118, 236, 11, 237, 78, 1, 251, 28, 237, 78, 1,
+ 248, 105, 237, 78, 1, 238, 67, 237, 78, 1, 244, 176, 237, 78, 1, 237, 67,
+ 237, 78, 1, 204, 70, 237, 78, 1, 202, 94, 237, 78, 1, 237, 19, 237, 78,
+ 1, 209, 128, 237, 78, 1, 202, 235, 237, 78, 1, 229, 250, 237, 78, 1, 228,
+ 19, 237, 78, 1, 224, 247, 237, 78, 1, 221, 40, 237, 78, 1, 214, 249, 237,
+ 78, 1, 250, 2, 237, 78, 1, 219, 34, 237, 78, 1, 215, 26, 237, 78, 1, 217,
+ 69, 237, 78, 1, 212, 255, 237, 78, 1, 209, 201, 237, 78, 42, 105, 237,
+ 78, 42, 170, 237, 78, 42, 209, 152, 237, 78, 42, 207, 151, 237, 78, 42,
+ 118, 236, 11, 218, 178, 1, 251, 25, 218, 178, 1, 248, 108, 218, 178, 1,
+ 238, 237, 218, 178, 1, 244, 39, 218, 178, 1, 237, 67, 218, 178, 1, 204,
+ 77, 218, 178, 1, 202, 109, 218, 178, 1, 237, 21, 218, 178, 1, 209, 132,
+ 218, 178, 1, 202, 236, 218, 178, 1, 230, 22, 218, 178, 1, 228, 25, 218,
+ 178, 1, 224, 247, 218, 178, 1, 221, 40, 218, 178, 1, 213, 137, 218, 178,
+ 1, 251, 59, 218, 178, 1, 219, 34, 218, 178, 1, 215, 27, 218, 178, 1, 217,
+ 74, 218, 178, 1, 215, 200, 218, 178, 1, 212, 255, 218, 178, 1, 209, 207,
+ 218, 178, 42, 105, 218, 178, 42, 209, 152, 218, 178, 42, 207, 151, 218,
+ 178, 42, 118, 236, 11, 218, 178, 42, 108, 218, 178, 42, 147, 218, 178,
+ 203, 238, 213, 130, 226, 196, 1, 63, 226, 196, 1, 249, 255, 226, 196, 1,
+ 239, 75, 226, 196, 1, 245, 51, 226, 196, 1, 74, 226, 196, 1, 206, 164,
+ 226, 196, 1, 75, 226, 196, 1, 203, 124, 226, 196, 1, 230, 54, 226, 196,
+ 1, 159, 226, 196, 1, 226, 185, 226, 196, 1, 223, 163, 226, 196, 1, 78,
+ 226, 196, 1, 146, 226, 196, 1, 211, 167, 226, 196, 1, 210, 69, 226, 196,
+ 1, 68, 226, 196, 1, 240, 174, 226, 196, 1, 217, 134, 226, 196, 1, 194,
+ 226, 196, 1, 207, 244, 226, 196, 1, 250, 231, 226, 196, 1, 241, 92, 226,
+ 196, 1, 226, 199, 226, 196, 1, 221, 228, 226, 196, 1, 247, 125, 226, 196,
+ 208, 82, 82, 129, 236, 253, 1, 63, 129, 236, 253, 1, 74, 129, 236, 253,
+ 1, 75, 129, 236, 253, 1, 78, 129, 236, 253, 1, 198, 129, 236, 253, 1,
+ 204, 111, 129, 236, 253, 1, 249, 32, 129, 236, 253, 1, 249, 31, 129, 236,
+ 253, 1, 185, 129, 236, 253, 1, 192, 129, 236, 253, 1, 201, 201, 129, 236,
+ 253, 1, 223, 110, 129, 236, 253, 1, 222, 240, 129, 236, 253, 1, 222, 239,
+ 129, 236, 253, 1, 216, 220, 129, 236, 253, 1, 216, 219, 129, 236, 253, 1,
+ 228, 113, 129, 236, 253, 1, 229, 144, 129, 236, 253, 1, 237, 12, 129,
+ 236, 253, 1, 215, 36, 129, 236, 253, 1, 215, 35, 129, 236, 253, 1, 214,
+ 177, 129, 236, 253, 1, 173, 129, 236, 253, 1, 217, 126, 129, 236, 253, 1,
+ 210, 22, 129, 236, 253, 1, 210, 21, 129, 236, 253, 1, 209, 187, 129, 236,
+ 253, 1, 209, 186, 129, 236, 253, 1, 135, 129, 236, 253, 1, 244, 212, 129,
+ 236, 253, 16, 205, 224, 129, 236, 253, 16, 205, 223, 129, 191, 1, 63,
+ 129, 191, 1, 74, 129, 191, 1, 75, 129, 191, 1, 78, 129, 191, 1, 198, 129,
+ 191, 1, 204, 111, 129, 191, 1, 249, 32, 129, 191, 1, 185, 129, 191, 1,
+ 192, 129, 191, 1, 201, 201, 129, 191, 1, 222, 240, 129, 191, 1, 216, 220,
+ 129, 191, 1, 228, 113, 129, 191, 1, 229, 144, 129, 191, 1, 237, 12, 129,
+ 191, 1, 215, 36, 129, 191, 1, 250, 126, 215, 36, 129, 191, 1, 214, 177,
+ 129, 191, 1, 173, 129, 191, 1, 217, 126, 129, 191, 1, 210, 22, 129, 191,
+ 1, 209, 187, 129, 191, 1, 135, 129, 191, 1, 244, 212, 129, 191, 239, 138,
+ 241, 113, 207, 156, 129, 191, 239, 138, 118, 237, 137, 129, 191, 227, 36,
+ 215, 233, 129, 191, 227, 36, 231, 56, 129, 191, 42, 105, 129, 191, 42,
+ 108, 129, 191, 42, 147, 129, 191, 42, 149, 129, 191, 42, 170, 129, 191,
+ 42, 195, 129, 191, 42, 213, 111, 129, 191, 42, 199, 129, 191, 42, 222,
+ 63, 129, 191, 42, 209, 152, 129, 191, 42, 207, 151, 129, 191, 42, 209,
+ 53, 129, 191, 42, 239, 153, 129, 191, 42, 240, 18, 129, 191, 42, 212, 74,
+ 129, 191, 42, 213, 105, 129, 191, 42, 118, 236, 11, 129, 191, 42, 120,
+ 236, 11, 129, 191, 42, 126, 236, 11, 129, 191, 42, 239, 147, 236, 11,
+ 129, 191, 42, 239, 233, 236, 11, 129, 191, 42, 212, 88, 236, 11, 129,
+ 191, 42, 213, 112, 236, 11, 129, 191, 42, 241, 143, 236, 11, 129, 191,
+ 42, 222, 64, 236, 11, 129, 191, 42, 118, 209, 36, 129, 191, 42, 120, 209,
+ 36, 129, 191, 42, 126, 209, 36, 129, 191, 42, 239, 147, 209, 36, 129,
+ 191, 42, 239, 233, 209, 36, 129, 191, 42, 212, 88, 209, 36, 129, 191, 42,
+ 213, 112, 209, 36, 129, 191, 42, 241, 143, 209, 36, 129, 191, 42, 222,
+ 64, 209, 36, 129, 191, 42, 209, 153, 209, 36, 129, 191, 42, 207, 152,
+ 209, 36, 129, 191, 42, 209, 54, 209, 36, 129, 191, 42, 239, 154, 209, 36,
+ 129, 191, 42, 240, 19, 209, 36, 129, 191, 42, 212, 75, 209, 36, 129, 191,
+ 42, 213, 106, 209, 36, 129, 191, 42, 241, 135, 209, 36, 129, 191, 42,
+ 222, 59, 209, 36, 129, 191, 42, 118, 236, 12, 209, 36, 129, 191, 42, 120,
+ 236, 12, 209, 36, 129, 191, 42, 126, 236, 12, 209, 36, 129, 191, 42, 239,
+ 147, 236, 12, 209, 36, 129, 191, 42, 239, 233, 236, 12, 209, 36, 129,
+ 191, 42, 212, 88, 236, 12, 209, 36, 129, 191, 42, 213, 112, 236, 12, 209,
+ 36, 129, 191, 42, 241, 143, 236, 12, 209, 36, 129, 191, 42, 222, 64, 236,
+ 12, 209, 36, 129, 191, 239, 138, 118, 207, 157, 129, 191, 239, 138, 120,
+ 207, 156, 129, 191, 239, 138, 126, 207, 156, 129, 191, 239, 138, 239,
+ 147, 207, 156, 129, 191, 239, 138, 239, 233, 207, 156, 129, 191, 239,
+ 138, 212, 88, 207, 156, 129, 191, 239, 138, 213, 112, 207, 156, 129, 191,
+ 239, 138, 241, 143, 207, 156, 129, 191, 239, 138, 222, 64, 207, 156, 129,
+ 191, 239, 138, 209, 153, 207, 156, 229, 131, 1, 63, 229, 131, 22, 2, 75,
+ 229, 131, 22, 2, 68, 229, 131, 22, 2, 125, 146, 229, 131, 22, 2, 74, 229,
+ 131, 22, 2, 78, 229, 131, 22, 227, 196, 82, 229, 131, 2, 52, 215, 253,
+ 56, 229, 131, 2, 250, 180, 229, 131, 2, 205, 199, 229, 131, 1, 173, 229,
+ 131, 1, 229, 144, 229, 131, 1, 239, 8, 229, 131, 1, 238, 119, 229, 131,
+ 1, 247, 92, 229, 131, 1, 246, 199, 229, 131, 1, 230, 181, 229, 131, 1,
+ 221, 11, 229, 131, 1, 207, 241, 229, 131, 1, 207, 229, 229, 131, 1, 244,
+ 120, 229, 131, 1, 244, 104, 229, 131, 1, 221, 227, 229, 131, 1, 210, 22,
+ 229, 131, 1, 209, 108, 229, 131, 1, 244, 212, 229, 131, 1, 244, 1, 229,
+ 131, 1, 201, 201, 229, 131, 1, 185, 229, 131, 1, 218, 208, 229, 131, 1,
+ 249, 32, 229, 131, 1, 248, 98, 229, 131, 1, 192, 229, 131, 1, 198, 229,
+ 131, 1, 216, 220, 229, 131, 1, 228, 113, 229, 131, 1, 206, 86, 229, 131,
+ 1, 213, 90, 229, 131, 1, 211, 164, 229, 131, 1, 215, 36, 229, 131, 1,
+ 202, 116, 229, 131, 1, 152, 229, 131, 1, 229, 47, 229, 131, 1, 207, 209,
+ 229, 131, 2, 248, 231, 55, 229, 131, 2, 247, 13, 229, 131, 2, 70, 56,
+ 229, 131, 205, 204, 229, 131, 17, 105, 229, 131, 17, 108, 229, 131, 17,
+ 147, 229, 131, 17, 149, 229, 131, 42, 209, 152, 229, 131, 42, 207, 151,
+ 229, 131, 42, 118, 236, 11, 229, 131, 42, 118, 209, 36, 229, 131, 217,
+ 179, 243, 85, 229, 131, 217, 179, 5, 246, 61, 229, 131, 217, 179, 246,
+ 61, 229, 131, 217, 179, 245, 139, 142, 229, 131, 217, 179, 225, 116, 229,
+ 131, 217, 179, 227, 5, 229, 131, 217, 179, 244, 166, 229, 131, 217, 179,
+ 52, 244, 166, 229, 131, 217, 179, 227, 108, 38, 211, 238, 250, 141, 1,
+ 237, 67, 38, 211, 238, 250, 141, 1, 228, 19, 38, 211, 238, 250, 141, 1,
+ 237, 19, 38, 211, 238, 250, 141, 1, 224, 247, 38, 211, 238, 250, 141, 1,
+ 217, 69, 38, 211, 238, 250, 141, 1, 204, 70, 38, 211, 238, 250, 141, 1,
+ 212, 255, 38, 211, 238, 250, 141, 1, 216, 91, 38, 211, 238, 250, 141, 1,
+ 248, 105, 38, 211, 238, 250, 141, 1, 209, 201, 38, 211, 238, 250, 141, 1,
+ 214, 225, 38, 211, 238, 250, 141, 1, 229, 250, 38, 211, 238, 250, 141, 1,
+ 221, 40, 38, 211, 238, 250, 141, 1, 229, 126, 38, 211, 238, 250, 141, 1,
+ 215, 26, 38, 211, 238, 250, 141, 1, 214, 249, 38, 211, 238, 250, 141, 1,
+ 240, 60, 38, 211, 238, 250, 141, 1, 251, 30, 38, 211, 238, 250, 141, 1,
+ 250, 2, 38, 211, 238, 250, 141, 1, 243, 254, 38, 211, 238, 250, 141, 1,
+ 238, 67, 38, 211, 238, 250, 141, 1, 244, 177, 38, 211, 238, 250, 141, 1,
+ 238, 107, 38, 211, 238, 250, 141, 1, 209, 128, 38, 211, 238, 250, 141, 1,
+ 202, 94, 38, 211, 238, 250, 141, 1, 243, 251, 38, 211, 238, 250, 141, 1,
+ 202, 235, 38, 211, 238, 250, 141, 1, 209, 94, 38, 211, 238, 250, 141, 1,
+ 209, 73, 38, 211, 238, 250, 141, 42, 105, 38, 211, 238, 250, 141, 42,
+ 240, 18, 38, 211, 238, 250, 141, 141, 231, 31, 38, 153, 250, 141, 1, 237,
+ 43, 38, 153, 250, 141, 1, 228, 28, 38, 153, 250, 141, 1, 237, 148, 38,
+ 153, 250, 141, 1, 225, 5, 38, 153, 250, 141, 1, 217, 119, 38, 153, 250,
+ 141, 1, 204, 70, 38, 153, 250, 141, 1, 241, 15, 38, 153, 250, 141, 1,
+ 216, 122, 38, 153, 250, 141, 1, 248, 138, 38, 153, 250, 141, 1, 209, 169,
+ 38, 153, 250, 141, 1, 241, 16, 38, 153, 250, 141, 1, 230, 22, 38, 153,
+ 250, 141, 1, 221, 178, 38, 153, 250, 141, 1, 229, 140, 38, 153, 250, 141,
+ 1, 215, 28, 38, 153, 250, 141, 1, 241, 14, 38, 153, 250, 141, 1, 240, 47,
+ 38, 153, 250, 141, 1, 251, 30, 38, 153, 250, 141, 1, 251, 59, 38, 153,
+ 250, 141, 1, 244, 207, 38, 153, 250, 141, 1, 238, 181, 38, 153, 250, 141,
+ 1, 244, 184, 38, 153, 250, 141, 1, 238, 114, 38, 153, 250, 141, 1, 209,
+ 251, 38, 153, 250, 141, 1, 202, 107, 38, 153, 250, 141, 1, 209, 100, 38,
+ 153, 250, 141, 1, 203, 47, 38, 153, 250, 141, 1, 209, 88, 38, 153, 250,
+ 141, 1, 202, 110, 38, 153, 250, 141, 42, 105, 38, 153, 250, 141, 42, 209,
+ 152, 38, 153, 250, 141, 42, 207, 151, 225, 115, 1, 251, 28, 225, 115, 1,
+ 248, 105, 225, 115, 1, 248, 92, 225, 115, 1, 238, 67, 225, 115, 1, 238,
+ 92, 225, 115, 1, 244, 177, 225, 115, 1, 237, 67, 225, 115, 1, 204, 70,
+ 225, 115, 2, 207, 29, 225, 115, 1, 202, 95, 225, 115, 1, 202, 73, 225,
+ 115, 1, 230, 163, 225, 115, 1, 230, 145, 225, 115, 1, 237, 19, 225, 115,
+ 1, 209, 128, 225, 115, 1, 202, 235, 225, 115, 1, 229, 250, 225, 115, 1,
+ 203, 179, 225, 115, 1, 229, 133, 225, 115, 1, 228, 19, 225, 115, 1, 243,
+ 250, 225, 115, 1, 209, 99, 225, 115, 1, 224, 247, 225, 115, 1, 221, 40,
+ 225, 115, 1, 214, 249, 225, 115, 1, 250, 3, 225, 115, 1, 251, 234, 225,
+ 115, 1, 219, 34, 225, 115, 1, 240, 60, 225, 115, 1, 215, 26, 225, 115, 1,
+ 217, 69, 225, 115, 1, 203, 157, 225, 115, 1, 217, 95, 225, 115, 1, 216,
+ 91, 225, 115, 1, 212, 255, 225, 115, 1, 211, 133, 225, 115, 1, 209, 201,
+ 225, 115, 251, 146, 131, 55, 225, 115, 251, 146, 131, 56, 225, 115, 42,
+ 105, 225, 115, 42, 170, 225, 115, 42, 209, 152, 225, 115, 42, 207, 151,
+ 225, 115, 42, 118, 236, 11, 225, 115, 217, 179, 211, 94, 225, 115, 217,
+ 179, 239, 212, 225, 115, 217, 179, 52, 70, 204, 5, 243, 85, 225, 115,
+ 217, 179, 70, 204, 5, 243, 85, 225, 115, 217, 179, 243, 85, 225, 115,
+ 217, 179, 120, 243, 83, 225, 115, 217, 179, 227, 115, 240, 7, 250, 14, 1,
+ 63, 250, 14, 1, 252, 25, 250, 14, 1, 250, 178, 250, 14, 1, 251, 240, 250,
+ 14, 1, 250, 231, 250, 14, 1, 251, 241, 250, 14, 1, 251, 109, 250, 14, 1,
+ 251, 105, 250, 14, 1, 74, 250, 14, 1, 241, 161, 250, 14, 1, 78, 250, 14,
+ 1, 220, 18, 250, 14, 1, 75, 250, 14, 1, 231, 83, 250, 14, 1, 68, 250, 14,
+ 1, 206, 178, 250, 14, 1, 229, 201, 250, 14, 1, 203, 176, 250, 14, 1, 203,
+ 138, 250, 14, 1, 203, 148, 250, 14, 1, 238, 190, 250, 14, 1, 238, 150,
+ 250, 14, 1, 238, 105, 250, 14, 1, 246, 238, 250, 14, 1, 230, 161, 250,
+ 14, 1, 209, 187, 250, 14, 1, 209, 92, 250, 14, 1, 244, 75, 250, 14, 1,
+ 243, 248, 250, 14, 1, 207, 236, 250, 14, 1, 219, 34, 250, 14, 1, 240, 60,
+ 250, 14, 1, 248, 162, 250, 14, 1, 248, 94, 250, 14, 1, 222, 190, 250, 14,
+ 1, 222, 106, 250, 14, 1, 222, 107, 250, 14, 1, 222, 240, 250, 14, 1, 221,
+ 1, 250, 14, 1, 221, 222, 250, 14, 1, 225, 20, 250, 14, 1, 236, 186, 250,
+ 14, 1, 202, 166, 250, 14, 1, 203, 52, 250, 14, 1, 206, 55, 250, 14, 1,
+ 216, 158, 250, 14, 1, 227, 234, 250, 14, 1, 214, 177, 250, 14, 1, 202,
+ 92, 250, 14, 1, 213, 43, 250, 14, 1, 202, 71, 250, 14, 1, 212, 169, 250,
+ 14, 1, 211, 134, 250, 14, 1, 237, 67, 250, 14, 251, 146, 82, 208, 213,
+ 120, 187, 115, 118, 70, 217, 178, 5, 120, 187, 115, 118, 70, 217, 178,
+ 228, 8, 120, 187, 115, 118, 70, 217, 178, 228, 8, 118, 70, 115, 120, 187,
+ 217, 178, 228, 8, 120, 215, 250, 115, 118, 215, 253, 217, 178, 228, 8,
+ 118, 215, 253, 115, 120, 215, 250, 217, 178, 231, 10, 219, 70, 1, 251,
+ 28, 231, 10, 219, 70, 1, 248, 105, 231, 10, 219, 70, 1, 238, 67, 231, 10,
+ 219, 70, 1, 244, 177, 231, 10, 219, 70, 1, 237, 67, 231, 10, 219, 70, 1,
+ 204, 70, 231, 10, 219, 70, 1, 202, 95, 231, 10, 219, 70, 1, 237, 19, 231,
+ 10, 219, 70, 1, 209, 128, 231, 10, 219, 70, 1, 202, 235, 231, 10, 219,
+ 70, 1, 229, 250, 231, 10, 219, 70, 1, 228, 19, 231, 10, 219, 70, 1, 224,
+ 247, 231, 10, 219, 70, 1, 221, 40, 231, 10, 219, 70, 1, 214, 249, 231,
+ 10, 219, 70, 1, 250, 3, 231, 10, 219, 70, 1, 219, 34, 231, 10, 219, 70,
+ 1, 215, 26, 231, 10, 219, 70, 1, 217, 69, 231, 10, 219, 70, 1, 216, 91,
+ 231, 10, 219, 70, 1, 212, 255, 231, 10, 219, 70, 1, 209, 201, 231, 10,
+ 219, 70, 42, 105, 231, 10, 219, 70, 42, 108, 231, 10, 219, 70, 42, 147,
+ 231, 10, 219, 70, 42, 149, 231, 10, 219, 70, 42, 209, 152, 231, 10, 219,
+ 70, 42, 207, 151, 231, 10, 219, 70, 42, 118, 236, 11, 231, 10, 219, 70,
+ 42, 118, 209, 36, 231, 10, 219, 149, 1, 251, 28, 231, 10, 219, 149, 1,
+ 248, 105, 231, 10, 219, 149, 1, 238, 67, 231, 10, 219, 149, 1, 244, 177,
+ 231, 10, 219, 149, 1, 237, 67, 231, 10, 219, 149, 1, 204, 69, 231, 10,
+ 219, 149, 1, 202, 95, 231, 10, 219, 149, 1, 237, 19, 231, 10, 219, 149,
+ 1, 209, 128, 231, 10, 219, 149, 1, 202, 235, 231, 10, 219, 149, 1, 229,
+ 250, 231, 10, 219, 149, 1, 228, 19, 231, 10, 219, 149, 1, 224, 246, 231,
+ 10, 219, 149, 1, 221, 40, 231, 10, 219, 149, 1, 214, 249, 231, 10, 219,
+ 149, 1, 219, 34, 231, 10, 219, 149, 1, 215, 26, 231, 10, 219, 149, 1,
+ 212, 255, 231, 10, 219, 149, 1, 209, 201, 231, 10, 219, 149, 42, 105,
+ 231, 10, 219, 149, 42, 108, 231, 10, 219, 149, 42, 147, 231, 10, 219,
+ 149, 42, 149, 231, 10, 219, 149, 42, 209, 152, 231, 10, 219, 149, 42,
+ 207, 151, 231, 10, 219, 149, 42, 118, 236, 11, 231, 10, 219, 149, 42,
+ 118, 209, 36, 217, 203, 219, 149, 1, 251, 28, 217, 203, 219, 149, 1, 248,
+ 105, 217, 203, 219, 149, 1, 238, 67, 217, 203, 219, 149, 1, 244, 177,
+ 217, 203, 219, 149, 1, 237, 67, 217, 203, 219, 149, 1, 204, 69, 217, 203,
+ 219, 149, 1, 202, 95, 217, 203, 219, 149, 1, 237, 19, 217, 203, 219, 149,
+ 1, 202, 235, 217, 203, 219, 149, 1, 229, 250, 217, 203, 219, 149, 1, 228,
+ 19, 217, 203, 219, 149, 1, 224, 246, 217, 203, 219, 149, 1, 221, 40, 217,
+ 203, 219, 149, 1, 214, 249, 217, 203, 219, 149, 1, 219, 34, 217, 203,
+ 219, 149, 1, 215, 26, 217, 203, 219, 149, 1, 212, 255, 217, 203, 219,
+ 149, 1, 209, 201, 217, 203, 219, 149, 214, 168, 82, 217, 203, 219, 149,
+ 207, 174, 214, 168, 82, 217, 203, 219, 149, 239, 147, 187, 3, 245, 130,
+ 217, 203, 219, 149, 239, 147, 187, 3, 243, 85, 217, 203, 219, 149, 42,
+ 105, 217, 203, 219, 149, 42, 108, 217, 203, 219, 149, 42, 147, 217, 203,
+ 219, 149, 42, 149, 217, 203, 219, 149, 42, 209, 152, 217, 203, 219, 149,
+ 42, 207, 151, 217, 203, 219, 149, 42, 118, 236, 11, 38, 207, 178, 1, 219,
+ 235, 63, 38, 207, 178, 1, 203, 40, 63, 38, 207, 178, 1, 203, 40, 251,
+ 109, 38, 207, 178, 1, 219, 235, 75, 38, 207, 178, 1, 203, 40, 75, 38,
+ 207, 178, 1, 203, 40, 74, 38, 207, 178, 1, 219, 235, 78, 38, 207, 178, 1,
+ 219, 235, 220, 73, 38, 207, 178, 1, 203, 40, 220, 73, 38, 207, 178, 1,
+ 219, 235, 251, 232, 38, 207, 178, 1, 203, 40, 251, 232, 38, 207, 178, 1,
+ 219, 235, 251, 108, 38, 207, 178, 1, 203, 40, 251, 108, 38, 207, 178, 1,
+ 219, 235, 251, 81, 38, 207, 178, 1, 203, 40, 251, 81, 38, 207, 178, 1,
+ 219, 235, 251, 103, 38, 207, 178, 1, 203, 40, 251, 103, 38, 207, 178, 1,
+ 219, 235, 251, 122, 38, 207, 178, 1, 203, 40, 251, 122, 38, 207, 178, 1,
+ 219, 235, 251, 107, 38, 207, 178, 1, 219, 235, 240, 181, 38, 207, 178, 1,
+ 203, 40, 240, 181, 38, 207, 178, 1, 219, 235, 250, 8, 38, 207, 178, 1,
+ 203, 40, 250, 8, 38, 207, 178, 1, 219, 235, 251, 90, 38, 207, 178, 1,
+ 203, 40, 251, 90, 38, 207, 178, 1, 219, 235, 251, 101, 38, 207, 178, 1,
+ 203, 40, 251, 101, 38, 207, 178, 1, 219, 235, 220, 71, 38, 207, 178, 1,
+ 203, 40, 220, 71, 38, 207, 178, 1, 219, 235, 251, 39, 38, 207, 178, 1,
+ 203, 40, 251, 39, 38, 207, 178, 1, 219, 235, 251, 100, 38, 207, 178, 1,
+ 219, 235, 241, 106, 38, 207, 178, 1, 219, 235, 241, 103, 38, 207, 178, 1,
+ 219, 235, 250, 231, 38, 207, 178, 1, 219, 235, 251, 98, 38, 207, 178, 1,
+ 203, 40, 251, 98, 38, 207, 178, 1, 219, 235, 241, 70, 38, 207, 178, 1,
+ 203, 40, 241, 70, 38, 207, 178, 1, 219, 235, 241, 89, 38, 207, 178, 1,
+ 203, 40, 241, 89, 38, 207, 178, 1, 219, 235, 241, 56, 38, 207, 178, 1,
+ 203, 40, 241, 56, 38, 207, 178, 1, 203, 40, 250, 223, 38, 207, 178, 1,
+ 219, 235, 241, 78, 38, 207, 178, 1, 203, 40, 251, 97, 38, 207, 178, 1,
+ 219, 235, 241, 46, 38, 207, 178, 1, 219, 235, 220, 9, 38, 207, 178, 1,
+ 219, 235, 235, 164, 38, 207, 178, 1, 219, 235, 241, 169, 38, 207, 178, 1,
+ 203, 40, 241, 169, 38, 207, 178, 1, 219, 235, 250, 148, 38, 207, 178, 1,
+ 203, 40, 250, 148, 38, 207, 178, 1, 219, 235, 230, 226, 38, 207, 178, 1,
+ 203, 40, 230, 226, 38, 207, 178, 1, 219, 235, 219, 246, 38, 207, 178, 1,
+ 203, 40, 219, 246, 38, 207, 178, 1, 219, 235, 250, 144, 38, 207, 178, 1,
+ 203, 40, 250, 144, 38, 207, 178, 1, 219, 235, 251, 96, 38, 207, 178, 1,
+ 219, 235, 250, 81, 38, 207, 178, 1, 219, 235, 251, 94, 38, 207, 178, 1,
+ 219, 235, 250, 75, 38, 207, 178, 1, 203, 40, 250, 75, 38, 207, 178, 1,
+ 219, 235, 241, 7, 38, 207, 178, 1, 203, 40, 241, 7, 38, 207, 178, 1, 219,
+ 235, 250, 49, 38, 207, 178, 1, 203, 40, 250, 49, 38, 207, 178, 1, 219,
+ 235, 251, 91, 38, 207, 178, 1, 203, 40, 251, 91, 38, 207, 178, 1, 219,
+ 235, 219, 224, 38, 207, 178, 1, 219, 235, 248, 215, 38, 145, 6, 1, 63,
+ 38, 145, 6, 1, 252, 25, 38, 145, 6, 1, 241, 171, 38, 145, 6, 1, 250, 242,
+ 38, 145, 6, 1, 241, 169, 38, 145, 6, 1, 241, 89, 38, 145, 6, 1, 241, 166,
+ 38, 145, 6, 1, 241, 165, 38, 145, 6, 1, 250, 226, 38, 145, 6, 1, 74, 38,
+ 145, 6, 1, 246, 17, 74, 38, 145, 6, 1, 241, 161, 38, 145, 6, 1, 241, 154,
+ 38, 145, 6, 1, 241, 153, 38, 145, 6, 1, 241, 150, 38, 145, 6, 1, 241,
+ 147, 38, 145, 6, 1, 75, 38, 145, 6, 1, 231, 83, 38, 145, 6, 1, 241, 132,
+ 38, 145, 6, 1, 241, 129, 38, 145, 6, 1, 251, 47, 38, 145, 6, 1, 206, 232,
+ 38, 145, 6, 1, 241, 122, 38, 145, 6, 1, 241, 105, 38, 145, 6, 1, 241,
+ 103, 38, 145, 6, 1, 241, 92, 38, 145, 6, 1, 241, 56, 38, 145, 6, 1, 78,
+ 38, 145, 6, 1, 220, 18, 38, 145, 6, 1, 222, 71, 220, 73, 38, 145, 6, 1,
+ 215, 141, 220, 73, 38, 145, 6, 1, 220, 72, 38, 145, 6, 1, 241, 46, 38,
+ 145, 6, 1, 241, 97, 38, 145, 6, 1, 241, 28, 38, 145, 6, 1, 212, 228, 241,
+ 28, 38, 145, 6, 1, 241, 17, 38, 145, 6, 1, 240, 252, 38, 145, 6, 1, 240,
+ 250, 38, 145, 6, 1, 241, 70, 38, 145, 6, 1, 240, 239, 38, 145, 6, 1, 241,
+ 167, 38, 145, 6, 1, 68, 38, 145, 6, 1, 206, 178, 38, 145, 6, 1, 222, 71,
+ 207, 24, 38, 145, 6, 1, 215, 141, 207, 24, 38, 145, 6, 1, 240, 226, 38,
+ 145, 6, 1, 240, 181, 38, 145, 6, 1, 240, 176, 38, 145, 6, 1, 241, 69, 54,
+ 38, 145, 6, 1, 206, 193, 38, 145, 5, 1, 63, 38, 145, 5, 1, 252, 25, 38,
+ 145, 5, 1, 241, 171, 38, 145, 5, 1, 250, 242, 38, 145, 5, 1, 241, 169,
+ 38, 145, 5, 1, 241, 89, 38, 145, 5, 1, 241, 166, 38, 145, 5, 1, 241, 165,
+ 38, 145, 5, 1, 250, 226, 38, 145, 5, 1, 74, 38, 145, 5, 1, 246, 17, 74,
+ 38, 145, 5, 1, 241, 161, 38, 145, 5, 1, 241, 154, 38, 145, 5, 1, 241,
+ 153, 38, 145, 5, 1, 241, 150, 38, 145, 5, 1, 241, 147, 38, 145, 5, 1, 75,
+ 38, 145, 5, 1, 231, 83, 38, 145, 5, 1, 241, 132, 38, 145, 5, 1, 241, 129,
+ 38, 145, 5, 1, 251, 47, 38, 145, 5, 1, 206, 232, 38, 145, 5, 1, 241, 122,
+ 38, 145, 5, 1, 241, 105, 38, 145, 5, 1, 241, 103, 38, 145, 5, 1, 241, 92,
+ 38, 145, 5, 1, 241, 56, 38, 145, 5, 1, 78, 38, 145, 5, 1, 220, 18, 38,
+ 145, 5, 1, 222, 71, 220, 73, 38, 145, 5, 1, 215, 141, 220, 73, 38, 145,
+ 5, 1, 220, 72, 38, 145, 5, 1, 241, 46, 38, 145, 5, 1, 241, 97, 38, 145,
+ 5, 1, 241, 28, 38, 145, 5, 1, 212, 228, 241, 28, 38, 145, 5, 1, 241, 17,
+ 38, 145, 5, 1, 240, 252, 38, 145, 5, 1, 240, 250, 38, 145, 5, 1, 241, 70,
+ 38, 145, 5, 1, 240, 239, 38, 145, 5, 1, 241, 167, 38, 145, 5, 1, 68, 38,
+ 145, 5, 1, 206, 178, 38, 145, 5, 1, 222, 71, 207, 24, 38, 145, 5, 1, 215,
+ 141, 207, 24, 38, 145, 5, 1, 240, 226, 38, 145, 5, 1, 240, 181, 38, 145,
+ 5, 1, 240, 176, 38, 145, 5, 1, 241, 69, 54, 38, 145, 5, 1, 206, 193, 38,
+ 145, 42, 105, 38, 145, 42, 170, 38, 145, 42, 209, 152, 38, 145, 42, 240,
+ 18, 38, 145, 42, 118, 236, 11, 38, 145, 42, 118, 209, 36, 215, 129, 17,
+ 105, 215, 129, 17, 108, 215, 129, 17, 147, 215, 129, 17, 149, 215, 129,
+ 17, 170, 215, 129, 17, 195, 215, 129, 17, 213, 111, 215, 129, 17, 199,
+ 215, 129, 17, 222, 63, 215, 129, 42, 209, 152, 215, 129, 42, 207, 151,
+ 215, 129, 42, 209, 53, 215, 129, 42, 239, 153, 215, 129, 42, 240, 18,
+ 215, 129, 42, 212, 74, 215, 129, 42, 213, 105, 215, 129, 42, 241, 134,
+ 215, 129, 42, 222, 58, 215, 129, 42, 118, 236, 11, 215, 129, 42, 120,
+ 236, 11, 215, 129, 42, 126, 236, 11, 215, 129, 42, 239, 147, 236, 11,
+ 215, 129, 42, 239, 233, 236, 11, 215, 129, 42, 212, 88, 236, 11, 215,
+ 129, 42, 213, 112, 236, 11, 215, 129, 42, 241, 143, 236, 11, 215, 129,
+ 42, 222, 64, 236, 11, 215, 129, 239, 138, 118, 237, 137, 215, 129, 239,
+ 138, 118, 217, 55, 215, 129, 239, 138, 118, 209, 60, 215, 129, 239, 138,
+ 120, 209, 57, 144, 2, 247, 52, 144, 2, 250, 180, 144, 2, 205, 199, 144,
+ 2, 230, 135, 144, 2, 206, 222, 144, 1, 63, 144, 1, 252, 25, 144, 1, 75,
+ 144, 1, 231, 83, 144, 1, 68, 144, 1, 206, 178, 144, 1, 125, 146, 144, 1,
+ 125, 215, 186, 144, 1, 125, 159, 144, 1, 125, 227, 78, 144, 1, 74, 144,
+ 1, 251, 64, 144, 1, 78, 144, 1, 250, 34, 144, 1, 173, 144, 1, 229, 144,
+ 144, 1, 239, 8, 144, 1, 238, 119, 144, 1, 222, 203, 144, 1, 247, 92, 144,
+ 1, 246, 199, 144, 1, 230, 181, 144, 1, 230, 149, 144, 1, 221, 11, 144, 1,
+ 207, 241, 144, 1, 207, 229, 144, 1, 244, 120, 144, 1, 244, 104, 144, 1,
+ 221, 227, 144, 1, 210, 22, 144, 1, 209, 108, 144, 1, 244, 212, 144, 1,
+ 244, 1, 144, 1, 201, 201, 144, 1, 185, 144, 1, 218, 208, 144, 1, 249, 32,
+ 144, 1, 248, 98, 144, 1, 192, 144, 1, 198, 144, 1, 216, 220, 144, 1, 228,
+ 113, 144, 1, 206, 86, 144, 1, 213, 90, 144, 1, 211, 164, 144, 1, 215, 36,
+ 144, 1, 152, 144, 1, 227, 77, 144, 1, 38, 44, 227, 68, 144, 1, 38, 44,
+ 215, 185, 144, 1, 38, 44, 221, 209, 144, 22, 2, 252, 25, 144, 22, 2, 248,
+ 95, 252, 25, 144, 22, 2, 75, 144, 22, 2, 231, 83, 144, 22, 2, 68, 144,
+ 22, 2, 206, 178, 144, 22, 2, 125, 146, 144, 22, 2, 125, 215, 186, 144,
+ 22, 2, 125, 159, 144, 22, 2, 125, 227, 78, 144, 22, 2, 74, 144, 22, 2,
+ 251, 64, 144, 22, 2, 78, 144, 22, 2, 250, 34, 144, 205, 204, 144, 244,
+ 166, 144, 52, 244, 166, 144, 217, 179, 243, 85, 144, 217, 179, 52, 243,
+ 85, 144, 217, 179, 227, 114, 144, 217, 179, 245, 139, 142, 144, 217, 179,
+ 227, 5, 144, 42, 105, 144, 42, 108, 144, 42, 147, 144, 42, 149, 144, 42,
+ 170, 144, 42, 195, 144, 42, 213, 111, 144, 42, 199, 144, 42, 222, 63,
+ 144, 42, 209, 152, 144, 42, 207, 151, 144, 42, 209, 53, 144, 42, 239,
+ 153, 144, 42, 240, 18, 144, 42, 212, 74, 144, 42, 213, 105, 144, 42, 241,
+ 134, 144, 42, 222, 58, 144, 42, 118, 236, 11, 144, 42, 118, 209, 36, 144,
+ 17, 202, 84, 144, 17, 105, 144, 17, 108, 144, 17, 147, 144, 17, 149, 144,
+ 17, 170, 144, 17, 195, 144, 17, 213, 111, 144, 17, 199, 144, 17, 222, 63,
+ 144, 42, 230, 96, 230, 15, 2, 247, 52, 230, 15, 2, 250, 180, 230, 15, 2,
+ 205, 199, 230, 15, 1, 63, 230, 15, 1, 252, 25, 230, 15, 1, 75, 230, 15,
+ 1, 231, 83, 230, 15, 1, 68, 230, 15, 1, 206, 178, 230, 15, 1, 74, 230,
+ 15, 1, 251, 64, 230, 15, 1, 78, 230, 15, 1, 250, 34, 230, 15, 1, 173,
+ 230, 15, 1, 229, 144, 230, 15, 1, 239, 8, 230, 15, 1, 238, 119, 230, 15,
+ 1, 222, 203, 230, 15, 1, 247, 92, 230, 15, 1, 246, 199, 230, 15, 1, 230,
+ 181, 230, 15, 1, 230, 149, 230, 15, 1, 221, 11, 230, 15, 1, 207, 241,
+ 230, 15, 1, 207, 229, 230, 15, 1, 244, 120, 230, 15, 1, 244, 109, 230,
+ 15, 1, 244, 104, 230, 15, 1, 216, 61, 230, 15, 1, 221, 227, 230, 15, 1,
+ 210, 22, 230, 15, 1, 209, 108, 230, 15, 1, 244, 212, 230, 15, 1, 244, 1,
+ 230, 15, 1, 201, 201, 230, 15, 1, 185, 230, 15, 1, 218, 208, 230, 15, 1,
+ 249, 32, 230, 15, 1, 248, 98, 230, 15, 1, 192, 230, 15, 1, 198, 230, 15,
+ 1, 216, 220, 230, 15, 1, 228, 113, 230, 15, 1, 206, 86, 230, 15, 1, 213,
+ 90, 230, 15, 1, 211, 164, 230, 15, 1, 215, 36, 230, 15, 1, 152, 230, 15,
+ 22, 2, 252, 25, 230, 15, 22, 2, 75, 230, 15, 22, 2, 231, 83, 230, 15, 22,
+ 2, 68, 230, 15, 22, 2, 206, 178, 230, 15, 22, 2, 74, 230, 15, 22, 2, 251,
+ 64, 230, 15, 22, 2, 78, 230, 15, 22, 2, 250, 34, 230, 15, 2, 205, 204,
+ 230, 15, 2, 221, 51, 230, 15, 251, 146, 54, 230, 15, 241, 59, 54, 230,
+ 15, 42, 54, 230, 15, 214, 168, 82, 230, 15, 52, 214, 168, 82, 230, 15,
+ 244, 166, 230, 15, 52, 244, 166, 211, 246, 211, 254, 1, 215, 19, 211,
+ 246, 211, 254, 1, 209, 251, 211, 246, 211, 254, 1, 249, 5, 211, 246, 211,
+ 254, 1, 247, 81, 211, 246, 211, 254, 1, 244, 193, 211, 246, 211, 254, 1,
+ 238, 249, 211, 246, 211, 254, 1, 225, 148, 211, 246, 211, 254, 1, 222,
+ 200, 211, 246, 211, 254, 1, 228, 89, 211, 246, 211, 254, 1, 223, 93, 211,
+ 246, 211, 254, 1, 206, 82, 211, 246, 211, 254, 1, 219, 150, 211, 246,
+ 211, 254, 1, 203, 91, 211, 246, 211, 254, 1, 216, 199, 211, 246, 211,
+ 254, 1, 237, 148, 211, 246, 211, 254, 1, 230, 20, 211, 246, 211, 254, 1,
+ 230, 175, 211, 246, 211, 254, 1, 221, 8, 211, 246, 211, 254, 1, 251, 73,
+ 211, 246, 211, 254, 1, 241, 159, 211, 246, 211, 254, 1, 231, 84, 211,
+ 246, 211, 254, 1, 207, 18, 211, 246, 211, 254, 1, 220, 60, 211, 246, 211,
+ 254, 1, 241, 147, 211, 246, 211, 254, 1, 225, 161, 211, 246, 211, 254,
+ 17, 202, 84, 211, 246, 211, 254, 17, 105, 211, 246, 211, 254, 17, 108,
+ 211, 246, 211, 254, 17, 147, 211, 246, 211, 254, 17, 149, 211, 246, 211,
+ 254, 17, 170, 211, 246, 211, 254, 17, 195, 211, 246, 211, 254, 17, 213,
+ 111, 211, 246, 211, 254, 17, 199, 211, 246, 211, 254, 17, 222, 63, 246,
+ 193, 2, 247, 52, 246, 193, 2, 250, 180, 246, 193, 2, 205, 199, 246, 193,
+ 1, 252, 25, 246, 193, 1, 75, 246, 193, 1, 68, 246, 193, 1, 74, 246, 193,
+ 1, 230, 41, 246, 193, 1, 229, 143, 246, 193, 1, 239, 5, 246, 193, 1, 238,
+ 118, 246, 193, 1, 222, 202, 246, 193, 1, 247, 91, 246, 193, 1, 246, 198,
+ 246, 193, 1, 230, 180, 246, 193, 1, 230, 148, 246, 193, 1, 221, 10, 246,
+ 193, 1, 207, 240, 246, 193, 1, 207, 228, 246, 193, 1, 244, 119, 246, 193,
+ 1, 244, 103, 246, 193, 1, 221, 226, 246, 193, 1, 210, 18, 246, 193, 1,
+ 209, 107, 246, 193, 1, 244, 211, 246, 193, 1, 244, 0, 246, 193, 1, 223,
+ 106, 246, 193, 1, 219, 168, 246, 193, 1, 218, 207, 246, 193, 1, 249, 30,
+ 246, 193, 1, 248, 97, 246, 193, 1, 225, 175, 246, 193, 1, 202, 167, 246,
+ 193, 1, 203, 110, 246, 193, 1, 216, 216, 246, 193, 1, 228, 112, 246, 193,
+ 1, 204, 110, 246, 193, 1, 215, 33, 246, 193, 1, 237, 157, 246, 193, 22,
+ 2, 63, 246, 193, 22, 2, 75, 246, 193, 22, 2, 231, 83, 246, 193, 22, 2,
+ 68, 246, 193, 22, 2, 206, 178, 246, 193, 22, 2, 74, 246, 193, 22, 2, 251,
+ 64, 246, 193, 22, 2, 78, 246, 193, 22, 2, 250, 34, 246, 193, 22, 2, 220,
+ 57, 246, 193, 158, 82, 246, 193, 250, 35, 82, 246, 193, 205, 204, 246,
+ 193, 225, 173, 246, 193, 17, 202, 84, 246, 193, 17, 105, 246, 193, 17,
+ 108, 246, 193, 17, 147, 246, 193, 17, 149, 246, 193, 17, 170, 246, 193,
+ 17, 195, 246, 193, 17, 213, 111, 246, 193, 17, 199, 246, 193, 17, 222,
+ 63, 246, 193, 214, 168, 82, 246, 193, 244, 166, 246, 193, 52, 244, 166,
+ 246, 193, 217, 47, 82, 225, 146, 1, 63, 225, 146, 1, 75, 225, 146, 1, 68,
+ 225, 146, 1, 74, 225, 146, 1, 78, 225, 146, 1, 173, 225, 146, 1, 229,
+ 144, 225, 146, 1, 239, 8, 225, 146, 1, 238, 119, 225, 146, 1, 247, 92,
+ 225, 146, 1, 246, 199, 225, 146, 1, 230, 181, 225, 146, 1, 230, 149, 225,
+ 146, 1, 221, 11, 225, 146, 1, 207, 241, 225, 146, 1, 207, 229, 225, 146,
+ 1, 244, 120, 225, 146, 1, 244, 104, 225, 146, 1, 221, 227, 225, 146, 1,
+ 210, 22, 225, 146, 1, 209, 108, 225, 146, 1, 244, 212, 225, 146, 1, 244,
+ 1, 225, 146, 1, 201, 201, 225, 146, 1, 185, 225, 146, 1, 218, 208, 225,
+ 146, 1, 249, 32, 225, 146, 1, 248, 98, 225, 146, 1, 192, 225, 146, 1,
+ 216, 220, 225, 146, 1, 228, 113, 225, 146, 1, 206, 86, 225, 146, 1, 215,
+ 36, 225, 146, 1, 152, 225, 146, 1, 215, 185, 225, 146, 2, 221, 51, 225,
+ 146, 251, 146, 54, 225, 146, 214, 168, 82, 225, 146, 32, 212, 206, 181,
+ 2, 247, 52, 181, 2, 250, 180, 181, 2, 205, 199, 181, 1, 63, 181, 1, 252,
+ 25, 181, 1, 75, 181, 1, 231, 83, 181, 1, 68, 181, 1, 206, 178, 181, 1,
+ 125, 146, 181, 1, 125, 215, 186, 181, 1, 125, 159, 181, 1, 125, 227, 78,
+ 181, 1, 74, 181, 1, 251, 64, 181, 1, 78, 181, 1, 250, 34, 181, 1, 173,
+ 181, 1, 229, 144, 181, 1, 239, 8, 181, 1, 238, 119, 181, 1, 222, 203,
+ 181, 1, 247, 92, 181, 1, 246, 199, 181, 1, 230, 181, 181, 1, 230, 149,
+ 181, 1, 221, 11, 181, 1, 207, 241, 181, 1, 207, 229, 181, 1, 244, 120,
+ 181, 1, 244, 104, 181, 1, 221, 227, 181, 1, 210, 22, 181, 1, 209, 108,
+ 181, 1, 244, 212, 181, 1, 244, 1, 181, 1, 201, 201, 181, 1, 185, 181, 1,
+ 218, 208, 181, 1, 249, 32, 181, 1, 248, 98, 181, 1, 192, 181, 1, 198,
+ 181, 1, 216, 220, 181, 1, 228, 113, 181, 1, 227, 77, 181, 1, 206, 86,
+ 181, 1, 213, 90, 181, 1, 211, 164, 181, 1, 215, 36, 181, 1, 152, 181, 22,
+ 2, 252, 25, 181, 22, 2, 75, 181, 22, 2, 231, 83, 181, 22, 2, 68, 181, 22,
+ 2, 206, 178, 181, 22, 2, 125, 146, 181, 22, 2, 125, 215, 186, 181, 22, 2,
+ 125, 159, 181, 22, 2, 125, 227, 78, 181, 22, 2, 74, 181, 22, 2, 251, 64,
+ 181, 22, 2, 78, 181, 22, 2, 250, 34, 181, 2, 205, 204, 181, 2, 250, 17,
+ 181, 2, 230, 135, 181, 2, 206, 222, 181, 220, 39, 181, 244, 166, 181, 52,
+ 244, 166, 181, 251, 146, 54, 181, 213, 130, 181, 214, 239, 82, 181, 2,
+ 221, 51, 181, 22, 65, 82, 181, 240, 199, 212, 228, 22, 82, 181, 210, 180,
+ 82, 181, 17, 202, 84, 181, 17, 105, 181, 17, 108, 181, 17, 147, 181, 17,
+ 149, 181, 17, 170, 181, 17, 195, 181, 17, 213, 111, 181, 17, 199, 181,
+ 17, 222, 63, 181, 241, 128, 181, 2, 212, 157, 181, 237, 58, 181, 245,
+ 191, 54, 181, 214, 168, 225, 92, 181, 214, 168, 225, 91, 140, 250, 126,
+ 17, 105, 140, 250, 126, 17, 108, 140, 250, 126, 17, 147, 140, 250, 126,
+ 17, 149, 140, 250, 126, 17, 170, 140, 250, 126, 17, 195, 140, 250, 126,
+ 17, 213, 111, 140, 250, 126, 17, 199, 140, 250, 126, 17, 222, 63, 140,
+ 250, 126, 42, 209, 152, 140, 250, 126, 42, 207, 151, 140, 250, 126, 42,
+ 209, 53, 140, 250, 126, 42, 239, 153, 140, 250, 126, 42, 240, 18, 140,
+ 250, 126, 42, 212, 74, 140, 250, 126, 42, 213, 105, 140, 250, 126, 42,
+ 241, 134, 140, 250, 126, 42, 222, 58, 140, 250, 126, 42, 118, 236, 11,
+ 140, 250, 126, 42, 118, 209, 36, 229, 114, 1, 63, 229, 114, 1, 252, 25,
+ 229, 114, 1, 75, 229, 114, 1, 68, 229, 114, 1, 74, 229, 114, 1, 251, 64,
+ 229, 114, 1, 78, 229, 114, 1, 250, 34, 229, 114, 1, 173, 229, 114, 1,
+ 229, 144, 229, 114, 1, 239, 8, 229, 114, 1, 238, 155, 229, 114, 1, 238,
+ 119, 229, 114, 1, 222, 203, 229, 114, 1, 247, 92, 229, 114, 1, 246, 199,
+ 229, 114, 1, 230, 181, 229, 114, 1, 230, 129, 229, 114, 1, 221, 11, 229,
+ 114, 1, 207, 241, 229, 114, 1, 207, 229, 229, 114, 1, 244, 120, 229, 114,
+ 1, 244, 104, 229, 114, 1, 221, 227, 229, 114, 1, 210, 22, 229, 114, 1,
+ 209, 108, 229, 114, 1, 244, 212, 229, 114, 1, 244, 110, 229, 114, 1, 244,
+ 1, 229, 114, 1, 201, 201, 229, 114, 1, 185, 229, 114, 1, 218, 208, 229,
+ 114, 1, 249, 32, 229, 114, 1, 248, 198, 229, 114, 1, 248, 98, 229, 114,
+ 1, 192, 229, 114, 1, 198, 229, 114, 1, 216, 220, 229, 114, 1, 228, 113,
+ 229, 114, 1, 206, 86, 229, 114, 1, 215, 36, 229, 114, 1, 152, 229, 114,
+ 1, 227, 77, 229, 114, 22, 2, 252, 25, 229, 114, 22, 2, 75, 229, 114, 22,
+ 2, 231, 83, 229, 114, 22, 2, 68, 229, 114, 22, 2, 74, 229, 114, 22, 2,
+ 251, 64, 229, 114, 22, 2, 78, 229, 114, 22, 2, 250, 34, 229, 114, 2, 250,
+ 180, 229, 114, 2, 205, 204, 229, 114, 2, 221, 51, 229, 114, 2, 213, 80,
+ 229, 114, 244, 166, 229, 114, 52, 244, 166, 229, 114, 203, 238, 213, 130,
+ 229, 114, 214, 168, 82, 229, 114, 52, 214, 168, 82, 229, 114, 251, 146,
+ 54, 223, 230, 1, 63, 223, 230, 1, 75, 223, 230, 1, 68, 223, 230, 1, 74,
+ 223, 230, 1, 173, 223, 230, 1, 229, 144, 223, 230, 1, 239, 8, 223, 230,
+ 1, 238, 119, 223, 230, 1, 247, 92, 223, 230, 1, 246, 199, 223, 230, 1,
+ 230, 181, 223, 230, 1, 230, 129, 223, 230, 1, 221, 11, 223, 230, 1, 207,
+ 241, 223, 230, 1, 207, 229, 223, 230, 1, 244, 120, 223, 230, 1, 244, 110,
+ 223, 230, 1, 244, 104, 223, 230, 1, 221, 227, 223, 230, 1, 210, 22, 223,
+ 230, 1, 209, 108, 223, 230, 1, 244, 212, 223, 230, 1, 244, 1, 223, 230,
+ 1, 201, 201, 223, 230, 1, 185, 223, 230, 1, 218, 208, 223, 230, 1, 249,
+ 32, 223, 230, 1, 248, 98, 223, 230, 1, 192, 223, 230, 1, 198, 223, 230,
+ 1, 216, 220, 223, 230, 1, 228, 113, 223, 230, 1, 206, 86, 223, 230, 1,
+ 215, 36, 223, 230, 1, 152, 223, 230, 1, 215, 185, 223, 230, 1, 216, 61,
+ 223, 230, 214, 168, 82, 229, 106, 1, 63, 229, 106, 1, 252, 25, 229, 106,
+ 1, 75, 229, 106, 1, 231, 83, 229, 106, 1, 68, 229, 106, 1, 206, 178, 229,
+ 106, 1, 74, 229, 106, 1, 251, 64, 229, 106, 1, 78, 229, 106, 1, 250, 34,
+ 229, 106, 1, 173, 229, 106, 1, 229, 144, 229, 106, 1, 239, 8, 229, 106,
+ 1, 238, 155, 229, 106, 1, 238, 119, 229, 106, 1, 222, 203, 229, 106, 1,
+ 247, 92, 229, 106, 1, 246, 199, 229, 106, 1, 230, 181, 229, 106, 1, 230,
+ 129, 229, 106, 1, 230, 149, 229, 106, 1, 221, 11, 229, 106, 1, 207, 241,
+ 229, 106, 1, 207, 229, 229, 106, 1, 244, 120, 229, 106, 1, 244, 110, 229,
+ 106, 1, 215, 185, 229, 106, 1, 244, 104, 229, 106, 1, 221, 227, 229, 106,
+ 1, 210, 22, 229, 106, 1, 209, 108, 229, 106, 1, 244, 212, 229, 106, 1,
+ 244, 1, 229, 106, 1, 201, 201, 229, 106, 1, 185, 229, 106, 1, 218, 208,
+ 229, 106, 1, 249, 32, 229, 106, 1, 248, 198, 229, 106, 1, 248, 98, 229,
+ 106, 1, 192, 229, 106, 1, 198, 229, 106, 1, 216, 220, 229, 106, 1, 228,
+ 113, 229, 106, 1, 206, 86, 229, 106, 1, 213, 90, 229, 106, 1, 215, 36,
+ 229, 106, 1, 152, 229, 106, 2, 250, 180, 229, 106, 22, 2, 252, 25, 229,
+ 106, 22, 2, 75, 229, 106, 22, 2, 231, 83, 229, 106, 22, 2, 68, 229, 106,
+ 22, 2, 206, 178, 229, 106, 22, 2, 74, 229, 106, 22, 2, 251, 64, 229, 106,
+ 22, 2, 78, 229, 106, 22, 2, 250, 34, 229, 106, 2, 221, 51, 229, 106, 2,
+ 205, 204, 229, 106, 17, 202, 84, 229, 106, 17, 105, 229, 106, 17, 108,
+ 229, 106, 17, 147, 229, 106, 17, 149, 229, 106, 17, 170, 229, 106, 17,
+ 195, 229, 106, 17, 213, 111, 229, 106, 17, 199, 229, 106, 17, 222, 63,
+ 238, 6, 2, 39, 250, 181, 55, 238, 6, 2, 247, 52, 238, 6, 2, 250, 180,
+ 238, 6, 2, 205, 199, 238, 6, 1, 63, 238, 6, 1, 252, 25, 238, 6, 1, 75,
+ 238, 6, 1, 231, 83, 238, 6, 1, 68, 238, 6, 1, 206, 178, 238, 6, 1, 125,
+ 146, 238, 6, 1, 125, 159, 238, 6, 1, 241, 161, 238, 6, 1, 251, 64, 238,
+ 6, 1, 220, 18, 238, 6, 1, 250, 34, 238, 6, 1, 173, 238, 6, 1, 229, 144,
+ 238, 6, 1, 239, 8, 238, 6, 1, 238, 119, 238, 6, 1, 222, 203, 238, 6, 1,
+ 247, 92, 238, 6, 1, 246, 199, 238, 6, 1, 230, 181, 238, 6, 1, 230, 149,
+ 238, 6, 1, 221, 11, 238, 6, 1, 207, 241, 238, 6, 1, 207, 229, 238, 6, 1,
+ 244, 120, 238, 6, 1, 244, 104, 238, 6, 1, 221, 227, 238, 6, 1, 210, 22,
+ 238, 6, 1, 209, 108, 238, 6, 1, 244, 212, 238, 6, 1, 244, 1, 238, 6, 1,
+ 201, 201, 238, 6, 1, 185, 238, 6, 1, 218, 208, 238, 6, 1, 249, 32, 238,
+ 6, 1, 248, 98, 238, 6, 1, 192, 238, 6, 1, 198, 238, 6, 1, 216, 220, 238,
+ 6, 1, 228, 113, 238, 6, 1, 227, 77, 238, 6, 1, 206, 86, 238, 6, 1, 213,
+ 90, 238, 6, 1, 211, 164, 238, 6, 1, 215, 36, 238, 6, 1, 152, 238, 6, 2,
+ 221, 51, 238, 6, 2, 250, 17, 238, 6, 22, 2, 252, 25, 238, 6, 22, 2, 75,
+ 238, 6, 22, 2, 231, 83, 238, 6, 22, 2, 68, 238, 6, 22, 2, 206, 178, 238,
+ 6, 22, 2, 125, 146, 238, 6, 22, 2, 125, 215, 186, 238, 6, 22, 2, 241,
+ 161, 238, 6, 22, 2, 251, 64, 238, 6, 22, 2, 220, 18, 238, 6, 22, 2, 250,
+ 34, 238, 6, 2, 205, 204, 238, 6, 220, 39, 238, 6, 250, 35, 227, 196, 82,
+ 238, 6, 2, 218, 74, 238, 6, 1, 206, 52, 250, 180, 238, 6, 1, 206, 52, 52,
+ 250, 180, 238, 6, 1, 125, 215, 186, 238, 6, 1, 125, 227, 78, 238, 6, 22,
+ 2, 125, 159, 238, 6, 22, 2, 125, 227, 78, 39, 238, 6, 17, 202, 84, 39,
+ 238, 6, 17, 105, 39, 238, 6, 17, 108, 39, 238, 6, 17, 147, 39, 238, 6,
+ 17, 149, 39, 238, 6, 17, 170, 39, 238, 6, 17, 195, 39, 238, 6, 1, 63, 39,
+ 238, 6, 1, 173, 39, 238, 6, 1, 201, 201, 39, 238, 6, 1, 205, 230, 39,
+ 238, 6, 1, 185, 208, 204, 250, 209, 208, 204, 1, 63, 208, 204, 1, 252,
+ 25, 208, 204, 1, 75, 208, 204, 1, 231, 83, 208, 204, 1, 68, 208, 204, 1,
+ 206, 178, 208, 204, 1, 125, 146, 208, 204, 1, 125, 215, 186, 208, 204, 1,
+ 125, 159, 208, 204, 1, 125, 227, 78, 208, 204, 1, 74, 208, 204, 1, 251,
+ 64, 208, 204, 1, 78, 208, 204, 1, 250, 34, 208, 204, 1, 173, 208, 204, 1,
+ 229, 144, 208, 204, 1, 239, 8, 208, 204, 1, 238, 119, 208, 204, 1, 222,
+ 203, 208, 204, 1, 247, 92, 208, 204, 1, 246, 199, 208, 204, 1, 230, 181,
+ 208, 204, 1, 230, 149, 208, 204, 1, 221, 11, 208, 204, 1, 207, 241, 208,
+ 204, 1, 207, 229, 208, 204, 1, 244, 120, 208, 204, 1, 244, 104, 208, 204,
+ 1, 221, 227, 208, 204, 1, 210, 22, 208, 204, 1, 209, 108, 208, 204, 1,
+ 244, 212, 208, 204, 1, 244, 1, 208, 204, 1, 201, 201, 208, 204, 1, 185,
+ 208, 204, 1, 218, 208, 208, 204, 1, 249, 32, 208, 204, 1, 248, 98, 208,
+ 204, 1, 192, 208, 204, 1, 198, 208, 204, 1, 216, 220, 208, 204, 1, 228,
+ 113, 208, 204, 1, 206, 86, 208, 204, 1, 213, 90, 208, 204, 1, 211, 164,
+ 208, 204, 1, 215, 36, 208, 204, 1, 152, 208, 204, 22, 2, 252, 25, 208,
+ 204, 22, 2, 75, 208, 204, 22, 2, 231, 83, 208, 204, 22, 2, 68, 208, 204,
+ 22, 2, 206, 178, 208, 204, 22, 2, 125, 146, 208, 204, 22, 2, 125, 215,
+ 186, 208, 204, 22, 2, 125, 159, 208, 204, 22, 2, 125, 227, 78, 208, 204,
+ 22, 2, 74, 208, 204, 22, 2, 212, 228, 74, 208, 204, 22, 2, 251, 64, 208,
+ 204, 22, 2, 78, 208, 204, 22, 2, 212, 228, 78, 208, 204, 22, 2, 250, 34,
+ 208, 204, 2, 247, 52, 208, 204, 2, 250, 180, 208, 204, 2, 205, 199, 208,
+ 204, 2, 205, 204, 208, 204, 2, 221, 51, 208, 204, 2, 250, 17, 208, 204,
+ 237, 191, 208, 204, 251, 146, 54, 208, 204, 220, 39, 208, 204, 17, 202,
+ 84, 208, 204, 17, 105, 208, 204, 17, 108, 208, 204, 17, 147, 208, 204,
+ 17, 149, 208, 204, 17, 170, 208, 204, 17, 195, 208, 204, 17, 213, 111,
+ 208, 204, 17, 199, 208, 204, 17, 222, 63, 186, 1, 63, 186, 1, 252, 25,
+ 186, 1, 75, 186, 1, 231, 83, 186, 1, 68, 186, 1, 206, 178, 186, 1, 125,
+ 146, 186, 1, 125, 215, 186, 186, 1, 125, 159, 186, 1, 125, 227, 78, 186,
+ 1, 74, 186, 1, 251, 64, 186, 1, 78, 186, 1, 250, 34, 186, 1, 173, 186, 1,
+ 229, 144, 186, 1, 239, 8, 186, 1, 238, 119, 186, 1, 222, 203, 186, 1,
+ 247, 92, 186, 1, 246, 199, 186, 1, 230, 181, 186, 1, 230, 149, 186, 1,
+ 221, 11, 186, 1, 207, 241, 186, 1, 207, 229, 186, 1, 244, 120, 186, 1,
+ 244, 104, 186, 1, 221, 227, 186, 1, 210, 22, 186, 1, 209, 108, 186, 1,
+ 244, 212, 186, 1, 244, 1, 186, 1, 201, 201, 186, 1, 185, 186, 1, 218,
+ 208, 186, 1, 249, 32, 186, 1, 248, 98, 186, 1, 192, 186, 1, 198, 186, 1,
+ 216, 220, 186, 1, 228, 113, 186, 1, 206, 86, 186, 1, 213, 90, 186, 1,
+ 211, 164, 186, 1, 215, 36, 186, 1, 152, 186, 22, 2, 252, 25, 186, 22, 2,
+ 75, 186, 22, 2, 231, 83, 186, 22, 2, 68, 186, 22, 2, 206, 178, 186, 22,
+ 2, 125, 146, 186, 22, 2, 125, 215, 186, 186, 22, 2, 74, 186, 22, 2, 251,
+ 64, 186, 22, 2, 78, 186, 22, 2, 250, 34, 186, 2, 247, 52, 186, 2, 250,
+ 180, 186, 2, 205, 199, 186, 2, 205, 204, 186, 2, 221, 51, 186, 2, 212,
+ 157, 186, 244, 166, 186, 52, 244, 166, 186, 213, 131, 243, 85, 186, 213,
+ 131, 142, 186, 216, 98, 225, 92, 186, 216, 98, 225, 91, 186, 216, 98,
+ 225, 90, 186, 241, 84, 76, 209, 113, 82, 186, 214, 168, 131, 3, 208, 80,
+ 25, 207, 92, 219, 232, 186, 214, 168, 131, 3, 208, 80, 25, 242, 83, 245,
+ 137, 186, 214, 168, 131, 3, 216, 163, 25, 242, 83, 245, 137, 186, 214,
+ 168, 131, 3, 216, 163, 25, 242, 83, 52, 245, 137, 186, 214, 168, 131, 3,
+ 216, 163, 25, 242, 83, 208, 70, 245, 137, 186, 214, 168, 131, 52, 215,
+ 252, 186, 214, 168, 131, 52, 215, 253, 3, 216, 162, 186, 214, 168, 131,
+ 3, 52, 245, 137, 186, 214, 168, 131, 3, 208, 70, 245, 137, 186, 214, 168,
+ 131, 3, 217, 58, 245, 137, 186, 214, 168, 131, 3, 213, 128, 245, 137,
+ 186, 214, 168, 131, 3, 246, 59, 25, 216, 162, 186, 214, 168, 131, 3, 246,
+ 59, 25, 120, 241, 86, 186, 214, 168, 131, 3, 246, 59, 25, 239, 147, 241,
+ 86, 186, 1, 209, 32, 250, 255, 75, 186, 1, 207, 136, 250, 255, 75, 186,
+ 1, 207, 136, 250, 255, 231, 83, 186, 1, 250, 255, 68, 186, 22, 2, 250,
+ 255, 68, 186, 22, 2, 250, 255, 206, 178, 224, 74, 1, 63, 224, 74, 1, 252,
+ 25, 224, 74, 1, 75, 224, 74, 1, 231, 83, 224, 74, 1, 68, 224, 74, 1, 206,
+ 178, 224, 74, 1, 125, 146, 224, 74, 1, 125, 215, 186, 224, 74, 1, 125,
+ 159, 224, 74, 1, 125, 227, 78, 224, 74, 1, 74, 224, 74, 1, 251, 64, 224,
+ 74, 1, 78, 224, 74, 1, 250, 34, 224, 74, 1, 173, 224, 74, 1, 229, 144,
+ 224, 74, 1, 239, 8, 224, 74, 1, 238, 119, 224, 74, 1, 222, 203, 224, 74,
+ 1, 247, 92, 224, 74, 1, 246, 199, 224, 74, 1, 230, 181, 224, 74, 1, 230,
+ 149, 224, 74, 1, 221, 11, 224, 74, 1, 207, 241, 224, 74, 1, 207, 229,
+ 224, 74, 1, 244, 120, 224, 74, 1, 244, 104, 224, 74, 1, 221, 227, 224,
+ 74, 1, 210, 22, 224, 74, 1, 209, 108, 224, 74, 1, 244, 212, 224, 74, 1,
+ 244, 1, 224, 74, 1, 201, 201, 224, 74, 1, 185, 224, 74, 1, 218, 208, 224,
+ 74, 1, 249, 32, 224, 74, 1, 248, 98, 224, 74, 1, 192, 224, 74, 1, 198,
+ 224, 74, 1, 216, 220, 224, 74, 1, 228, 113, 224, 74, 1, 206, 86, 224, 74,
+ 1, 213, 90, 224, 74, 1, 211, 164, 224, 74, 1, 215, 36, 224, 74, 1, 152,
+ 224, 74, 1, 227, 77, 224, 74, 22, 2, 252, 25, 224, 74, 22, 2, 75, 224,
+ 74, 22, 2, 231, 83, 224, 74, 22, 2, 68, 224, 74, 22, 2, 206, 178, 224,
+ 74, 22, 2, 125, 146, 224, 74, 22, 2, 125, 215, 186, 224, 74, 22, 2, 125,
+ 159, 224, 74, 22, 2, 125, 227, 78, 224, 74, 22, 2, 74, 224, 74, 22, 2,
+ 251, 64, 224, 74, 22, 2, 78, 224, 74, 22, 2, 250, 34, 224, 74, 2, 250,
+ 180, 224, 74, 2, 205, 199, 224, 74, 2, 205, 204, 224, 74, 2, 250, 123,
+ 224, 74, 244, 166, 224, 74, 52, 244, 166, 224, 74, 251, 146, 54, 224, 74,
+ 2, 236, 0, 224, 74, 17, 202, 84, 224, 74, 17, 105, 224, 74, 17, 108, 224,
+ 74, 17, 147, 224, 74, 17, 149, 224, 74, 17, 170, 224, 74, 17, 195, 224,
+ 74, 17, 213, 111, 224, 74, 17, 199, 224, 74, 17, 222, 63, 209, 239, 1,
+ 63, 209, 239, 1, 252, 25, 209, 239, 1, 75, 209, 239, 1, 231, 83, 209,
+ 239, 1, 68, 209, 239, 1, 206, 178, 209, 239, 1, 74, 209, 239, 1, 251, 64,
+ 209, 239, 1, 78, 209, 239, 1, 250, 34, 209, 239, 1, 173, 209, 239, 1,
+ 229, 144, 209, 239, 1, 239, 8, 209, 239, 1, 238, 119, 209, 239, 1, 222,
+ 203, 209, 239, 1, 247, 92, 209, 239, 1, 246, 199, 209, 239, 1, 230, 181,
+ 209, 239, 1, 230, 149, 209, 239, 1, 221, 11, 209, 239, 1, 207, 241, 209,
+ 239, 1, 207, 229, 209, 239, 1, 244, 120, 209, 239, 1, 244, 104, 209, 239,
+ 1, 221, 227, 209, 239, 1, 210, 22, 209, 239, 1, 209, 108, 209, 239, 1,
+ 244, 212, 209, 239, 1, 244, 1, 209, 239, 1, 201, 201, 209, 239, 1, 185,
+ 209, 239, 1, 218, 208, 209, 239, 1, 249, 32, 209, 239, 1, 248, 98, 209,
+ 239, 1, 192, 209, 239, 1, 198, 209, 239, 1, 216, 220, 209, 239, 1, 228,
+ 113, 209, 239, 1, 206, 86, 209, 239, 1, 213, 90, 209, 239, 1, 215, 36,
+ 209, 239, 1, 152, 209, 239, 1, 215, 185, 209, 239, 2, 250, 180, 209, 239,
+ 2, 205, 199, 209, 239, 22, 2, 252, 25, 209, 239, 22, 2, 75, 209, 239, 22,
+ 2, 231, 83, 209, 239, 22, 2, 68, 209, 239, 22, 2, 206, 178, 209, 239, 22,
+ 2, 74, 209, 239, 22, 2, 251, 64, 209, 239, 22, 2, 78, 209, 239, 22, 2,
+ 250, 34, 209, 239, 2, 205, 204, 209, 239, 2, 221, 51, 209, 239, 17, 202,
+ 84, 209, 239, 17, 105, 209, 239, 17, 108, 209, 239, 17, 147, 209, 239,
+ 17, 149, 209, 239, 17, 170, 209, 239, 17, 195, 209, 239, 17, 213, 111,
+ 209, 239, 17, 199, 209, 239, 17, 222, 63, 251, 68, 1, 173, 251, 68, 1,
+ 229, 144, 251, 68, 1, 222, 203, 251, 68, 1, 201, 201, 251, 68, 1, 210,
+ 22, 251, 68, 1, 250, 255, 210, 22, 251, 68, 1, 185, 251, 68, 1, 218, 208,
+ 251, 68, 1, 249, 32, 251, 68, 1, 192, 251, 68, 1, 230, 181, 251, 68, 1,
+ 246, 199, 251, 68, 1, 209, 108, 251, 68, 1, 216, 220, 251, 68, 1, 228,
+ 113, 251, 68, 1, 215, 36, 251, 68, 1, 221, 11, 251, 68, 1, 152, 251, 68,
+ 1, 63, 251, 68, 1, 244, 212, 251, 68, 1, 244, 1, 251, 68, 1, 239, 8, 251,
+ 68, 1, 250, 255, 239, 8, 251, 68, 1, 238, 119, 251, 68, 1, 248, 98, 251,
+ 68, 1, 230, 149, 251, 68, 109, 2, 174, 228, 113, 251, 68, 109, 2, 174,
+ 216, 220, 251, 68, 109, 2, 174, 227, 135, 216, 220, 251, 68, 22, 2, 63,
+ 251, 68, 22, 2, 252, 25, 251, 68, 22, 2, 75, 251, 68, 22, 2, 231, 83,
+ 251, 68, 22, 2, 68, 251, 68, 22, 2, 206, 178, 251, 68, 22, 2, 74, 251,
+ 68, 22, 2, 250, 13, 251, 68, 22, 2, 78, 251, 68, 22, 2, 251, 64, 251, 68,
+ 22, 2, 250, 247, 251, 68, 2, 229, 86, 251, 68, 17, 202, 84, 251, 68, 17,
+ 105, 251, 68, 17, 108, 251, 68, 17, 147, 251, 68, 17, 149, 251, 68, 17,
+ 170, 251, 68, 17, 195, 251, 68, 17, 213, 111, 251, 68, 17, 199, 251, 68,
+ 17, 222, 63, 251, 68, 42, 209, 152, 251, 68, 42, 207, 151, 251, 68, 2, 5,
+ 214, 167, 251, 68, 2, 214, 167, 251, 68, 2, 215, 136, 251, 68, 16, 205,
+ 230, 204, 92, 246, 48, 6, 1, 222, 202, 204, 92, 246, 48, 6, 1, 63, 204,
+ 92, 246, 48, 6, 1, 204, 30, 204, 92, 246, 48, 6, 1, 202, 213, 204, 92,
+ 246, 48, 6, 1, 198, 204, 92, 246, 48, 6, 1, 202, 247, 204, 92, 246, 48,
+ 6, 1, 231, 83, 204, 92, 246, 48, 6, 1, 206, 178, 204, 92, 246, 48, 6, 1,
+ 74, 204, 92, 246, 48, 6, 1, 78, 204, 92, 246, 48, 6, 1, 250, 223, 204,
+ 92, 246, 48, 6, 1, 239, 8, 204, 92, 246, 48, 6, 1, 229, 26, 204, 92, 246,
+ 48, 6, 1, 241, 56, 204, 92, 246, 48, 6, 1, 202, 197, 204, 92, 246, 48, 6,
+ 1, 207, 31, 204, 92, 246, 48, 6, 1, 241, 75, 204, 92, 246, 48, 6, 1, 220,
+ 76, 204, 92, 246, 48, 6, 1, 207, 236, 204, 92, 246, 48, 6, 1, 221, 37,
+ 204, 92, 246, 48, 6, 1, 244, 212, 204, 92, 246, 48, 6, 1, 250, 49, 204,
+ 92, 246, 48, 6, 1, 250, 247, 204, 92, 246, 48, 6, 1, 247, 193, 204, 92,
+ 246, 48, 6, 1, 217, 191, 204, 92, 246, 48, 6, 1, 236, 228, 204, 92, 246,
+ 48, 6, 1, 236, 124, 204, 92, 246, 48, 6, 1, 236, 51, 204, 92, 246, 48, 6,
+ 1, 237, 92, 204, 92, 246, 48, 6, 1, 211, 116, 204, 92, 246, 48, 6, 1,
+ 212, 142, 204, 92, 246, 48, 6, 1, 205, 190, 204, 92, 246, 48, 5, 1, 222,
+ 202, 204, 92, 246, 48, 5, 1, 63, 204, 92, 246, 48, 5, 1, 204, 30, 204,
+ 92, 246, 48, 5, 1, 202, 213, 204, 92, 246, 48, 5, 1, 198, 204, 92, 246,
+ 48, 5, 1, 202, 247, 204, 92, 246, 48, 5, 1, 231, 83, 204, 92, 246, 48, 5,
+ 1, 206, 178, 204, 92, 246, 48, 5, 1, 74, 204, 92, 246, 48, 5, 1, 78, 204,
+ 92, 246, 48, 5, 1, 250, 223, 204, 92, 246, 48, 5, 1, 239, 8, 204, 92,
+ 246, 48, 5, 1, 229, 26, 204, 92, 246, 48, 5, 1, 241, 56, 204, 92, 246,
+ 48, 5, 1, 202, 197, 204, 92, 246, 48, 5, 1, 207, 31, 204, 92, 246, 48, 5,
+ 1, 241, 75, 204, 92, 246, 48, 5, 1, 220, 76, 204, 92, 246, 48, 5, 1, 207,
+ 236, 204, 92, 246, 48, 5, 1, 221, 37, 204, 92, 246, 48, 5, 1, 244, 212,
+ 204, 92, 246, 48, 5, 1, 250, 49, 204, 92, 246, 48, 5, 1, 250, 247, 204,
+ 92, 246, 48, 5, 1, 247, 193, 204, 92, 246, 48, 5, 1, 217, 191, 204, 92,
+ 246, 48, 5, 1, 236, 228, 204, 92, 246, 48, 5, 1, 236, 124, 204, 92, 246,
+ 48, 5, 1, 236, 51, 204, 92, 246, 48, 5, 1, 237, 92, 204, 92, 246, 48, 5,
+ 1, 211, 116, 204, 92, 246, 48, 5, 1, 212, 142, 204, 92, 246, 48, 5, 1,
+ 205, 190, 204, 92, 246, 48, 17, 202, 84, 204, 92, 246, 48, 17, 105, 204,
+ 92, 246, 48, 17, 108, 204, 92, 246, 48, 17, 147, 204, 92, 246, 48, 17,
+ 149, 204, 92, 246, 48, 17, 170, 204, 92, 246, 48, 17, 195, 204, 92, 246,
+ 48, 17, 213, 111, 204, 92, 246, 48, 17, 199, 204, 92, 246, 48, 17, 222,
+ 63, 204, 92, 246, 48, 42, 209, 152, 204, 92, 246, 48, 42, 207, 151, 204,
+ 92, 246, 48, 42, 209, 53, 204, 92, 246, 48, 42, 239, 153, 204, 92, 246,
+ 48, 42, 240, 18, 204, 92, 246, 48, 42, 212, 74, 204, 92, 246, 48, 42,
+ 213, 105, 204, 92, 246, 48, 42, 241, 134, 204, 92, 246, 48, 42, 222, 58,
+ 204, 92, 246, 48, 220, 39, 219, 49, 246, 66, 237, 77, 1, 185, 219, 49,
+ 246, 66, 237, 77, 1, 173, 219, 49, 246, 66, 237, 77, 1, 228, 113, 219,
+ 49, 246, 66, 237, 77, 1, 192, 219, 49, 246, 66, 237, 77, 1, 244, 212,
+ 219, 49, 246, 66, 237, 77, 1, 202, 116, 219, 49, 246, 66, 237, 77, 1,
+ 206, 86, 219, 49, 246, 66, 237, 77, 1, 222, 203, 219, 49, 246, 66, 237,
+ 77, 1, 152, 219, 49, 246, 66, 237, 77, 1, 239, 8, 219, 49, 246, 66, 237,
+ 77, 1, 229, 144, 219, 49, 246, 66, 237, 77, 1, 215, 36, 219, 49, 246, 66,
+ 237, 77, 1, 249, 32, 219, 49, 246, 66, 237, 77, 1, 247, 92, 219, 49, 246,
+ 66, 237, 77, 1, 210, 22, 219, 49, 246, 66, 237, 77, 1, 209, 108, 219, 49,
+ 246, 66, 237, 77, 1, 201, 201, 219, 49, 246, 66, 237, 77, 1, 218, 208,
+ 219, 49, 246, 66, 237, 77, 1, 216, 220, 219, 49, 246, 66, 237, 77, 1,
+ 240, 108, 219, 49, 246, 66, 237, 77, 1, 246, 199, 219, 49, 246, 66, 237,
+ 77, 1, 63, 219, 49, 246, 66, 237, 77, 1, 74, 219, 49, 246, 66, 237, 77,
+ 1, 75, 219, 49, 246, 66, 237, 77, 1, 78, 219, 49, 246, 66, 237, 77, 1,
+ 68, 219, 49, 246, 66, 237, 77, 1, 207, 39, 219, 49, 246, 66, 237, 77, 1,
+ 235, 171, 219, 49, 246, 66, 237, 77, 1, 46, 219, 184, 219, 49, 246, 66,
+ 237, 77, 1, 46, 230, 54, 219, 49, 246, 66, 237, 77, 1, 46, 210, 69, 219,
+ 49, 246, 66, 237, 77, 1, 46, 226, 185, 219, 49, 246, 66, 237, 77, 1, 46,
+ 223, 163, 219, 49, 246, 66, 237, 77, 1, 46, 159, 219, 49, 246, 66, 237,
+ 77, 1, 46, 204, 144, 219, 49, 246, 66, 237, 77, 1, 46, 222, 205, 219, 49,
+ 246, 66, 237, 77, 1, 46, 203, 124, 219, 49, 246, 66, 237, 77, 215, 245,
+ 143, 227, 28, 219, 49, 246, 66, 237, 77, 215, 245, 208, 161, 219, 49,
+ 246, 66, 237, 77, 214, 239, 238, 45, 211, 61, 219, 49, 246, 66, 237, 77,
+ 215, 245, 143, 163, 240, 5, 219, 49, 246, 66, 237, 77, 215, 245, 143,
+ 240, 5, 219, 49, 246, 66, 237, 77, 214, 239, 238, 45, 211, 62, 240, 5,
+ 219, 49, 246, 66, 237, 77, 214, 239, 143, 227, 28, 219, 49, 246, 66, 237,
+ 77, 214, 239, 208, 161, 219, 49, 246, 66, 237, 77, 214, 239, 143, 163,
+ 240, 5, 219, 49, 246, 66, 237, 77, 214, 239, 143, 240, 5, 219, 49, 246,
+ 66, 237, 77, 224, 149, 208, 161, 219, 49, 246, 66, 237, 77, 238, 45, 211,
+ 62, 206, 68, 219, 49, 246, 66, 237, 77, 224, 149, 143, 163, 240, 5, 219,
+ 49, 246, 66, 237, 77, 224, 149, 143, 240, 5, 219, 49, 246, 66, 237, 77,
+ 226, 254, 143, 227, 28, 219, 49, 246, 66, 237, 77, 226, 254, 208, 161,
+ 219, 49, 246, 66, 237, 77, 238, 45, 211, 61, 219, 49, 246, 66, 237, 77,
+ 226, 254, 143, 163, 240, 5, 219, 49, 246, 66, 237, 77, 226, 254, 143,
+ 240, 5, 219, 49, 246, 66, 237, 77, 238, 45, 211, 62, 240, 5, 9, 2, 63, 9,
+ 2, 34, 23, 63, 9, 2, 34, 23, 249, 15, 9, 2, 34, 23, 238, 233, 209, 141,
+ 9, 2, 34, 23, 152, 9, 2, 34, 23, 231, 85, 9, 2, 34, 23, 228, 93, 237,
+ 208, 9, 2, 34, 23, 223, 199, 9, 2, 34, 23, 215, 22, 9, 2, 254, 34, 9, 2,
+ 251, 232, 9, 2, 251, 233, 23, 250, 73, 9, 2, 251, 233, 23, 242, 30, 237,
+ 208, 9, 2, 251, 233, 23, 238, 246, 9, 2, 251, 233, 23, 238, 233, 209,
+ 141, 9, 2, 251, 233, 23, 152, 9, 2, 251, 233, 23, 231, 86, 237, 208, 9,
+ 2, 251, 233, 23, 231, 59, 9, 2, 251, 233, 23, 228, 94, 9, 2, 251, 233,
+ 23, 213, 27, 9, 2, 251, 233, 23, 106, 91, 106, 91, 68, 9, 2, 251, 233,
+ 237, 208, 9, 2, 251, 149, 9, 2, 251, 150, 23, 248, 252, 9, 2, 251, 150,
+ 23, 238, 233, 209, 141, 9, 2, 251, 150, 23, 225, 21, 91, 241, 92, 9, 2,
+ 251, 150, 23, 213, 88, 9, 2, 251, 150, 23, 209, 242, 9, 2, 251, 122, 9,
+ 2, 251, 47, 9, 2, 251, 48, 23, 241, 22, 9, 2, 251, 48, 23, 212, 245, 91,
+ 238, 55, 9, 2, 251, 39, 9, 2, 251, 40, 23, 251, 39, 9, 2, 251, 40, 23,
+ 243, 186, 9, 2, 251, 40, 23, 238, 55, 9, 2, 251, 40, 23, 152, 9, 2, 251,
+ 40, 23, 230, 27, 9, 2, 251, 40, 23, 229, 100, 9, 2, 251, 40, 23, 213, 43,
+ 9, 2, 251, 40, 23, 206, 186, 9, 2, 251, 36, 9, 2, 251, 28, 9, 2, 250,
+ 243, 9, 2, 250, 244, 23, 213, 43, 9, 2, 250, 231, 9, 2, 250, 232, 115,
+ 250, 231, 9, 2, 250, 232, 126, 208, 219, 9, 2, 250, 232, 91, 223, 97,
+ 219, 251, 250, 232, 91, 223, 96, 9, 2, 250, 232, 91, 223, 97, 211, 176,
+ 9, 2, 250, 200, 9, 2, 250, 170, 9, 2, 250, 138, 9, 2, 250, 139, 23, 228,
+ 183, 9, 2, 250, 110, 9, 2, 250, 80, 9, 2, 250, 75, 9, 2, 250, 76, 202,
+ 35, 209, 141, 9, 2, 250, 76, 230, 31, 209, 141, 9, 2, 250, 76, 115, 250,
+ 76, 207, 198, 115, 207, 198, 207, 198, 115, 207, 198, 219, 96, 9, 2, 250,
+ 76, 115, 250, 76, 115, 250, 75, 9, 2, 250, 76, 115, 250, 76, 115, 250,
+ 76, 245, 124, 250, 76, 115, 250, 76, 115, 250, 75, 9, 2, 250, 73, 9, 2,
+ 250, 69, 9, 2, 249, 32, 9, 2, 249, 15, 9, 2, 249, 9, 9, 2, 249, 3, 9, 2,
+ 248, 253, 9, 2, 248, 254, 115, 248, 253, 9, 2, 248, 252, 9, 2, 142, 9, 2,
+ 248, 230, 9, 2, 248, 86, 9, 2, 248, 87, 23, 63, 9, 2, 248, 87, 23, 238,
+ 224, 9, 2, 248, 87, 23, 231, 86, 237, 208, 9, 2, 247, 193, 9, 2, 247,
+ 194, 115, 247, 194, 251, 232, 9, 2, 247, 194, 115, 247, 194, 206, 255, 9,
+ 2, 247, 194, 245, 124, 247, 193, 9, 2, 247, 171, 9, 2, 247, 172, 115,
+ 247, 171, 9, 2, 247, 160, 9, 2, 247, 159, 9, 2, 244, 212, 9, 2, 244, 203,
+ 9, 2, 244, 204, 229, 69, 23, 34, 91, 225, 79, 9, 2, 244, 204, 229, 69,
+ 23, 250, 243, 9, 2, 244, 204, 229, 69, 23, 248, 252, 9, 2, 244, 204, 229,
+ 69, 23, 248, 86, 9, 2, 244, 204, 229, 69, 23, 239, 8, 9, 2, 244, 204,
+ 229, 69, 23, 239, 9, 91, 225, 79, 9, 2, 244, 204, 229, 69, 23, 238, 81,
+ 9, 2, 244, 204, 229, 69, 23, 238, 63, 9, 2, 244, 204, 229, 69, 23, 237,
+ 219, 9, 2, 244, 204, 229, 69, 23, 152, 9, 2, 244, 204, 229, 69, 23, 230,
+ 224, 9, 2, 244, 204, 229, 69, 23, 230, 225, 91, 226, 239, 9, 2, 244, 204,
+ 229, 69, 23, 230, 12, 9, 2, 244, 204, 229, 69, 23, 228, 113, 9, 2, 244,
+ 204, 229, 69, 23, 226, 239, 9, 2, 244, 204, 229, 69, 23, 226, 240, 91,
+ 225, 78, 9, 2, 244, 204, 229, 69, 23, 226, 222, 9, 2, 244, 204, 229, 69,
+ 23, 222, 240, 9, 2, 244, 204, 229, 69, 23, 219, 97, 91, 219, 96, 9, 2,
+ 244, 204, 229, 69, 23, 212, 162, 9, 2, 244, 204, 229, 69, 23, 209, 242,
+ 9, 2, 244, 204, 229, 69, 23, 207, 41, 91, 238, 63, 9, 2, 244, 204, 229,
+ 69, 23, 206, 186, 9, 2, 244, 175, 9, 2, 244, 154, 9, 2, 244, 153, 9, 2,
+ 244, 152, 9, 2, 243, 233, 9, 2, 243, 215, 9, 2, 243, 188, 9, 2, 243, 189,
+ 23, 213, 43, 9, 2, 243, 186, 9, 2, 243, 176, 9, 2, 243, 177, 229, 232,
+ 106, 237, 209, 243, 156, 9, 2, 243, 156, 9, 2, 242, 42, 9, 2, 242, 43,
+ 115, 242, 42, 9, 2, 242, 43, 237, 208, 9, 2, 242, 43, 213, 24, 9, 2, 242,
+ 40, 9, 2, 242, 41, 23, 241, 4, 9, 2, 242, 39, 9, 2, 242, 37, 9, 2, 242,
+ 36, 9, 2, 242, 35, 9, 2, 242, 31, 9, 2, 242, 29, 9, 2, 242, 30, 237, 208,
+ 9, 2, 242, 30, 237, 209, 237, 208, 9, 2, 242, 28, 9, 2, 242, 21, 9, 2,
+ 74, 9, 2, 188, 23, 219, 96, 9, 2, 188, 115, 188, 221, 41, 115, 221, 40,
+ 9, 2, 241, 190, 9, 2, 241, 191, 23, 34, 91, 237, 160, 91, 244, 212, 9, 2,
+ 241, 191, 23, 238, 224, 9, 2, 241, 191, 23, 224, 155, 9, 2, 241, 191, 23,
+ 215, 8, 9, 2, 241, 191, 23, 213, 43, 9, 2, 241, 191, 23, 68, 9, 2, 241,
+ 163, 9, 2, 241, 151, 9, 2, 241, 122, 9, 2, 241, 92, 9, 2, 241, 93, 23,
+ 238, 232, 9, 2, 241, 93, 23, 238, 233, 209, 141, 9, 2, 241, 93, 23, 225,
+ 20, 9, 2, 241, 93, 245, 124, 241, 92, 9, 2, 241, 93, 219, 251, 241, 92,
+ 9, 2, 241, 93, 211, 176, 9, 2, 241, 25, 9, 2, 241, 22, 9, 2, 241, 4, 9,
+ 2, 240, 179, 9, 2, 240, 180, 23, 63, 9, 2, 240, 180, 23, 34, 91, 228, 30,
+ 9, 2, 240, 180, 23, 34, 91, 228, 31, 23, 228, 30, 9, 2, 240, 180, 23,
+ 250, 231, 9, 2, 240, 180, 23, 249, 15, 9, 2, 240, 180, 23, 242, 30, 237,
+ 208, 9, 2, 240, 180, 23, 242, 30, 237, 209, 237, 208, 9, 2, 240, 180, 23,
+ 152, 9, 2, 240, 180, 23, 237, 160, 237, 208, 9, 2, 240, 180, 23, 231, 86,
+ 237, 208, 9, 2, 240, 180, 23, 229, 231, 9, 2, 240, 180, 23, 229, 232,
+ 211, 176, 9, 2, 240, 180, 23, 228, 207, 9, 2, 240, 180, 23, 228, 113, 9,
+ 2, 240, 180, 23, 228, 31, 23, 228, 30, 9, 2, 240, 180, 23, 227, 148, 9,
+ 2, 240, 180, 23, 226, 239, 9, 2, 240, 180, 23, 207, 40, 9, 2, 240, 180,
+ 23, 207, 29, 9, 2, 239, 8, 9, 2, 239, 9, 237, 208, 9, 2, 239, 6, 9, 2,
+ 239, 7, 23, 34, 91, 244, 213, 91, 152, 9, 2, 239, 7, 23, 34, 91, 152, 9,
+ 2, 239, 7, 23, 34, 91, 231, 85, 9, 2, 239, 7, 23, 251, 150, 209, 142, 91,
+ 210, 10, 9, 2, 239, 7, 23, 250, 231, 9, 2, 239, 7, 23, 250, 75, 9, 2,
+ 239, 7, 23, 250, 74, 91, 238, 246, 9, 2, 239, 7, 23, 249, 15, 9, 2, 239,
+ 7, 23, 248, 231, 91, 216, 220, 9, 2, 239, 7, 23, 247, 160, 9, 2, 239, 7,
+ 23, 247, 161, 91, 216, 220, 9, 2, 239, 7, 23, 244, 212, 9, 2, 239, 7, 23,
+ 243, 233, 9, 2, 239, 7, 23, 243, 189, 23, 213, 43, 9, 2, 239, 7, 23, 242,
+ 40, 9, 2, 239, 7, 23, 241, 122, 9, 2, 239, 7, 23, 241, 123, 91, 228, 113,
+ 9, 2, 239, 7, 23, 241, 92, 9, 2, 239, 7, 23, 241, 93, 23, 238, 233, 209,
+ 141, 9, 2, 239, 7, 23, 238, 233, 209, 141, 9, 2, 239, 7, 23, 238, 224, 9,
+ 2, 239, 7, 23, 238, 81, 9, 2, 239, 7, 23, 238, 79, 9, 2, 239, 7, 23, 238,
+ 80, 91, 63, 9, 2, 239, 7, 23, 238, 64, 91, 211, 10, 9, 2, 239, 7, 23,
+ 237, 160, 91, 226, 240, 91, 241, 4, 9, 2, 239, 7, 23, 237, 140, 9, 2,
+ 239, 7, 23, 237, 141, 91, 228, 113, 9, 2, 239, 7, 23, 237, 4, 91, 227,
+ 148, 9, 2, 239, 7, 23, 236, 21, 9, 2, 239, 7, 23, 231, 86, 237, 208, 9,
+ 2, 239, 7, 23, 230, 210, 91, 236, 27, 91, 250, 75, 9, 2, 239, 7, 23, 230,
+ 12, 9, 2, 239, 7, 23, 229, 231, 9, 2, 239, 7, 23, 229, 94, 9, 2, 239, 7,
+ 23, 229, 95, 91, 228, 30, 9, 2, 239, 7, 23, 228, 208, 91, 250, 231, 9, 2,
+ 239, 7, 23, 228, 113, 9, 2, 239, 7, 23, 225, 21, 91, 241, 92, 9, 2, 239,
+ 7, 23, 224, 155, 9, 2, 239, 7, 23, 221, 40, 9, 2, 239, 7, 23, 221, 41,
+ 115, 221, 40, 9, 2, 239, 7, 23, 185, 9, 2, 239, 7, 23, 215, 8, 9, 2, 239,
+ 7, 23, 214, 230, 9, 2, 239, 7, 23, 213, 43, 9, 2, 239, 7, 23, 213, 44,
+ 91, 207, 181, 9, 2, 239, 7, 23, 213, 9, 9, 2, 239, 7, 23, 210, 220, 9, 2,
+ 239, 7, 23, 209, 242, 9, 2, 239, 7, 23, 68, 9, 2, 239, 7, 23, 207, 29, 9,
+ 2, 239, 7, 23, 207, 30, 91, 242, 42, 9, 2, 239, 7, 115, 239, 6, 9, 2,
+ 239, 1, 9, 2, 239, 2, 245, 124, 239, 1, 9, 2, 238, 255, 9, 2, 239, 0,
+ 115, 239, 0, 238, 225, 115, 238, 224, 9, 2, 238, 246, 9, 2, 238, 247,
+ 239, 0, 115, 239, 0, 238, 225, 115, 238, 224, 9, 2, 238, 245, 9, 2, 238,
+ 243, 9, 2, 238, 234, 9, 2, 238, 232, 9, 2, 238, 233, 209, 141, 9, 2, 238,
+ 233, 115, 238, 232, 9, 2, 238, 233, 245, 124, 238, 232, 9, 2, 238, 224,
+ 9, 2, 238, 223, 9, 2, 238, 218, 9, 2, 238, 162, 9, 2, 238, 163, 23, 228,
+ 183, 9, 2, 238, 81, 9, 2, 238, 82, 23, 74, 9, 2, 238, 82, 23, 68, 9, 2,
+ 238, 82, 245, 124, 238, 81, 9, 2, 238, 79, 9, 2, 238, 80, 115, 238, 79,
+ 9, 2, 238, 80, 245, 124, 238, 79, 9, 2, 238, 76, 9, 2, 238, 63, 9, 2,
+ 238, 64, 237, 208, 9, 2, 238, 61, 9, 2, 238, 62, 23, 34, 91, 231, 85, 9,
+ 2, 238, 62, 23, 238, 233, 209, 141, 9, 2, 238, 62, 23, 231, 85, 9, 2,
+ 238, 62, 23, 226, 240, 91, 231, 85, 9, 2, 238, 62, 23, 185, 9, 2, 238,
+ 57, 9, 2, 238, 55, 9, 2, 238, 56, 245, 124, 238, 55, 9, 2, 238, 56, 23,
+ 249, 15, 9, 2, 238, 56, 23, 209, 242, 9, 2, 238, 56, 209, 141, 9, 2, 237,
+ 230, 9, 2, 237, 231, 245, 124, 237, 230, 9, 2, 237, 228, 9, 2, 237, 229,
+ 23, 230, 12, 9, 2, 237, 229, 23, 230, 13, 23, 231, 86, 237, 208, 9, 2,
+ 237, 229, 23, 221, 40, 9, 2, 237, 229, 23, 215, 9, 91, 207, 197, 9, 2,
+ 237, 229, 237, 208, 9, 2, 237, 219, 9, 2, 237, 220, 23, 34, 91, 228, 183,
+ 9, 2, 237, 220, 23, 228, 183, 9, 2, 237, 220, 115, 237, 220, 226, 230, 9,
+ 2, 237, 212, 9, 2, 237, 210, 9, 2, 237, 211, 23, 213, 43, 9, 2, 237, 202,
+ 9, 2, 237, 201, 9, 2, 237, 197, 9, 2, 237, 196, 9, 2, 152, 9, 2, 237,
+ 160, 209, 141, 9, 2, 237, 160, 237, 208, 9, 2, 237, 140, 9, 2, 237, 3, 9,
+ 2, 237, 4, 23, 250, 75, 9, 2, 237, 4, 23, 250, 73, 9, 2, 237, 4, 23, 249,
+ 15, 9, 2, 237, 4, 23, 243, 156, 9, 2, 237, 4, 23, 238, 255, 9, 2, 237, 4,
+ 23, 229, 84, 9, 2, 237, 4, 23, 221, 40, 9, 2, 237, 4, 23, 213, 43, 9, 2,
+ 237, 4, 23, 68, 9, 2, 236, 26, 9, 2, 236, 21, 9, 2, 236, 22, 23, 250,
+ 231, 9, 2, 236, 22, 23, 237, 140, 9, 2, 236, 22, 23, 229, 231, 9, 2, 236,
+ 22, 23, 227, 92, 9, 2, 236, 22, 23, 207, 29, 9, 2, 236, 17, 9, 2, 75, 9,
+ 2, 235, 206, 63, 9, 2, 235, 166, 9, 2, 231, 113, 9, 2, 231, 114, 115,
+ 231, 114, 247, 160, 9, 2, 231, 114, 115, 231, 114, 211, 176, 9, 2, 231,
+ 88, 9, 2, 231, 85, 9, 2, 231, 86, 243, 215, 9, 2, 231, 86, 216, 57, 9, 2,
+ 231, 86, 115, 231, 86, 212, 249, 115, 212, 249, 207, 30, 115, 207, 29, 9,
+ 2, 231, 86, 237, 208, 9, 2, 231, 77, 9, 2, 231, 78, 23, 238, 233, 209,
+ 141, 9, 2, 231, 76, 9, 2, 231, 66, 9, 2, 231, 67, 23, 209, 242, 9, 2,
+ 231, 67, 245, 124, 231, 66, 9, 2, 231, 67, 219, 251, 231, 66, 9, 2, 231,
+ 67, 211, 176, 9, 2, 231, 59, 9, 2, 231, 49, 9, 2, 230, 224, 9, 2, 230,
+ 209, 9, 2, 173, 9, 2, 230, 44, 23, 63, 9, 2, 230, 44, 23, 251, 122, 9, 2,
+ 230, 44, 23, 251, 123, 91, 228, 207, 9, 2, 230, 44, 23, 250, 73, 9, 2,
+ 230, 44, 23, 249, 15, 9, 2, 230, 44, 23, 248, 252, 9, 2, 230, 44, 23,
+ 142, 9, 2, 230, 44, 23, 248, 86, 9, 2, 230, 44, 23, 241, 22, 9, 2, 230,
+ 44, 23, 241, 4, 9, 2, 230, 44, 23, 239, 8, 9, 2, 230, 44, 23, 238, 246,
+ 9, 2, 230, 44, 23, 238, 233, 209, 141, 9, 2, 230, 44, 23, 238, 224, 9, 2,
+ 230, 44, 23, 238, 225, 91, 213, 89, 91, 63, 9, 2, 230, 44, 23, 238, 81,
+ 9, 2, 230, 44, 23, 238, 63, 9, 2, 230, 44, 23, 238, 56, 91, 214, 230, 9,
+ 2, 230, 44, 23, 238, 56, 245, 124, 238, 55, 9, 2, 230, 44, 23, 237, 230,
+ 9, 2, 230, 44, 23, 237, 201, 9, 2, 230, 44, 23, 231, 85, 9, 2, 230, 44,
+ 23, 231, 66, 9, 2, 230, 44, 23, 230, 12, 9, 2, 230, 44, 23, 229, 100, 9,
+ 2, 230, 44, 23, 229, 94, 9, 2, 230, 44, 23, 227, 148, 9, 2, 230, 44, 23,
+ 226, 239, 9, 2, 230, 44, 23, 225, 20, 9, 2, 230, 44, 23, 225, 21, 91,
+ 242, 42, 9, 2, 230, 44, 23, 225, 21, 91, 238, 81, 9, 2, 230, 44, 23, 225,
+ 21, 91, 209, 187, 9, 2, 230, 44, 23, 224, 155, 9, 2, 230, 44, 23, 224,
+ 156, 91, 221, 35, 9, 2, 230, 44, 23, 222, 240, 9, 2, 230, 44, 23, 221,
+ 40, 9, 2, 230, 44, 23, 218, 167, 9, 2, 230, 44, 23, 215, 145, 9, 2, 230,
+ 44, 23, 215, 36, 9, 2, 230, 44, 23, 214, 230, 9, 2, 230, 44, 23, 213, 90,
+ 9, 2, 230, 44, 23, 213, 43, 9, 2, 230, 44, 23, 213, 9, 9, 2, 230, 44, 23,
+ 212, 199, 9, 2, 230, 44, 23, 212, 149, 9, 2, 230, 44, 23, 210, 229, 9, 2,
+ 230, 44, 23, 209, 218, 9, 2, 230, 44, 23, 68, 9, 2, 230, 44, 23, 207, 40,
+ 9, 2, 230, 44, 23, 207, 29, 9, 2, 230, 44, 23, 207, 2, 23, 185, 9, 2,
+ 230, 44, 23, 206, 186, 9, 2, 230, 44, 23, 202, 39, 9, 2, 230, 42, 9, 2,
+ 230, 43, 245, 124, 230, 42, 9, 2, 230, 32, 9, 2, 230, 29, 9, 2, 230, 27,
+ 9, 2, 230, 26, 9, 2, 230, 24, 9, 2, 230, 25, 115, 230, 24, 9, 2, 230, 12,
+ 9, 2, 230, 13, 23, 231, 86, 237, 208, 9, 2, 230, 8, 9, 2, 230, 9, 23,
+ 249, 15, 9, 2, 230, 9, 245, 124, 230, 8, 9, 2, 230, 6, 9, 2, 230, 5, 9,
+ 2, 229, 231, 9, 2, 229, 232, 228, 95, 23, 106, 115, 228, 95, 23, 68, 9,
+ 2, 229, 232, 115, 229, 232, 228, 95, 23, 106, 115, 228, 95, 23, 68, 9, 2,
+ 229, 171, 9, 2, 229, 100, 9, 2, 229, 101, 23, 249, 15, 9, 2, 229, 101,
+ 23, 68, 9, 2, 229, 101, 23, 207, 29, 9, 2, 229, 94, 9, 2, 229, 84, 9, 2,
+ 229, 71, 9, 2, 229, 70, 9, 2, 229, 68, 9, 2, 229, 69, 115, 229, 68, 9, 2,
+ 228, 209, 9, 2, 228, 210, 115, 237, 4, 23, 250, 74, 228, 210, 115, 237,
+ 4, 23, 250, 73, 9, 2, 228, 207, 9, 2, 228, 205, 9, 2, 228, 206, 206, 69,
+ 18, 9, 2, 228, 204, 9, 2, 228, 196, 9, 2, 228, 197, 237, 208, 9, 2, 228,
+ 195, 9, 2, 228, 183, 9, 2, 228, 184, 219, 251, 228, 183, 9, 2, 228, 177,
+ 9, 2, 228, 155, 9, 2, 228, 113, 9, 2, 228, 94, 9, 2, 228, 95, 23, 63, 9,
+ 2, 228, 95, 23, 34, 91, 244, 213, 91, 152, 9, 2, 228, 95, 23, 34, 91,
+ 238, 224, 9, 2, 228, 95, 23, 34, 91, 228, 30, 9, 2, 228, 95, 23, 251, 39,
+ 9, 2, 228, 95, 23, 250, 231, 9, 2, 228, 95, 23, 250, 76, 202, 35, 209,
+ 141, 9, 2, 228, 95, 23, 249, 15, 9, 2, 228, 95, 23, 248, 86, 9, 2, 228,
+ 95, 23, 244, 154, 9, 2, 228, 95, 23, 241, 92, 9, 2, 228, 95, 23, 239, 8,
+ 9, 2, 228, 95, 23, 238, 224, 9, 2, 228, 95, 23, 237, 219, 9, 2, 228, 95,
+ 23, 237, 220, 91, 237, 219, 9, 2, 228, 95, 23, 152, 9, 2, 228, 95, 23,
+ 237, 140, 9, 2, 228, 95, 23, 237, 4, 23, 221, 40, 9, 2, 228, 95, 23, 231,
+ 86, 237, 208, 9, 2, 228, 95, 23, 231, 66, 9, 2, 228, 95, 23, 231, 67, 91,
+ 152, 9, 2, 228, 95, 23, 231, 67, 91, 226, 239, 9, 2, 228, 95, 23, 229,
+ 100, 9, 2, 228, 95, 23, 229, 84, 9, 2, 228, 95, 23, 228, 207, 9, 2, 228,
+ 95, 23, 228, 196, 9, 2, 228, 95, 23, 228, 197, 91, 237, 4, 91, 63, 9, 2,
+ 228, 95, 23, 228, 94, 9, 2, 228, 95, 23, 227, 92, 9, 2, 228, 95, 23, 226,
+ 239, 9, 2, 228, 95, 23, 226, 224, 9, 2, 228, 95, 23, 225, 20, 9, 2, 228,
+ 95, 23, 225, 21, 91, 241, 92, 9, 2, 228, 95, 23, 223, 199, 9, 2, 228, 95,
+ 23, 222, 240, 9, 2, 228, 95, 23, 213, 44, 91, 210, 220, 9, 2, 228, 95,
+ 23, 212, 245, 91, 238, 56, 91, 241, 22, 9, 2, 228, 95, 23, 212, 245, 91,
+ 238, 56, 209, 141, 9, 2, 228, 95, 23, 212, 197, 9, 2, 228, 95, 23, 212,
+ 198, 91, 212, 197, 9, 2, 228, 95, 23, 210, 220, 9, 2, 228, 95, 23, 209,
+ 255, 9, 2, 228, 95, 23, 209, 242, 9, 2, 228, 95, 23, 209, 188, 91, 34,
+ 91, 211, 11, 91, 201, 201, 9, 2, 228, 95, 23, 68, 9, 2, 228, 95, 23, 106,
+ 91, 63, 9, 2, 228, 95, 23, 106, 91, 106, 91, 68, 9, 2, 228, 95, 23, 207,
+ 41, 91, 250, 75, 9, 2, 228, 95, 23, 207, 29, 9, 2, 228, 95, 23, 206, 186,
+ 9, 2, 228, 95, 211, 176, 9, 2, 228, 92, 9, 2, 228, 93, 23, 213, 43, 9, 2,
+ 228, 93, 23, 213, 44, 91, 210, 220, 9, 2, 228, 93, 237, 208, 9, 2, 228,
+ 93, 237, 209, 115, 228, 93, 237, 209, 213, 43, 9, 2, 228, 88, 9, 2, 228,
+ 30, 9, 2, 228, 31, 23, 228, 30, 9, 2, 228, 28, 9, 2, 228, 29, 23, 228,
+ 183, 9, 2, 228, 29, 23, 228, 184, 91, 215, 145, 9, 2, 227, 148, 9, 2,
+ 227, 129, 9, 2, 227, 117, 9, 2, 227, 92, 9, 2, 226, 239, 9, 2, 226, 240,
+ 23, 249, 15, 9, 2, 226, 237, 9, 2, 226, 238, 23, 251, 39, 9, 2, 226, 238,
+ 23, 249, 15, 9, 2, 226, 238, 23, 241, 4, 9, 2, 226, 238, 23, 241, 5, 209,
+ 141, 9, 2, 226, 238, 23, 238, 233, 209, 141, 9, 2, 226, 238, 23, 237, 4,
+ 23, 249, 15, 9, 2, 226, 238, 23, 231, 66, 9, 2, 226, 238, 23, 230, 29, 9,
+ 2, 226, 238, 23, 230, 27, 9, 2, 226, 238, 23, 230, 28, 91, 250, 75, 9, 2,
+ 226, 238, 23, 229, 100, 9, 2, 226, 238, 23, 228, 114, 91, 250, 75, 9, 2,
+ 226, 238, 23, 228, 94, 9, 2, 226, 238, 23, 225, 21, 91, 241, 92, 9, 2,
+ 226, 238, 23, 222, 240, 9, 2, 226, 238, 23, 221, 84, 9, 2, 226, 238, 23,
+ 212, 163, 91, 250, 75, 9, 2, 226, 238, 23, 212, 141, 91, 247, 193, 9, 2,
+ 226, 238, 23, 207, 197, 9, 2, 226, 238, 209, 141, 9, 2, 226, 238, 245,
+ 124, 226, 237, 9, 2, 226, 238, 219, 251, 226, 237, 9, 2, 226, 238, 211,
+ 176, 9, 2, 226, 238, 213, 24, 9, 2, 226, 236, 9, 2, 226, 230, 9, 2, 226,
+ 231, 115, 226, 230, 9, 2, 226, 231, 219, 251, 226, 230, 9, 2, 226, 231,
+ 213, 24, 9, 2, 226, 227, 9, 2, 226, 224, 9, 2, 226, 222, 9, 2, 226, 223,
+ 115, 226, 222, 9, 2, 226, 223, 115, 226, 223, 238, 225, 115, 238, 224, 9,
+ 2, 192, 9, 2, 225, 177, 23, 209, 242, 9, 2, 225, 177, 237, 208, 9, 2,
+ 225, 176, 9, 2, 225, 148, 9, 2, 225, 100, 9, 2, 225, 79, 9, 2, 225, 78,
+ 9, 2, 225, 20, 9, 2, 224, 228, 9, 2, 224, 155, 9, 2, 224, 110, 9, 2, 223,
+ 246, 9, 2, 223, 247, 115, 223, 246, 9, 2, 223, 235, 9, 2, 223, 236, 237,
+ 208, 9, 2, 223, 217, 9, 2, 223, 203, 9, 2, 223, 199, 9, 2, 223, 200, 23,
+ 63, 9, 2, 223, 200, 23, 228, 183, 9, 2, 223, 200, 23, 202, 116, 9, 2,
+ 223, 200, 115, 223, 199, 9, 2, 223, 200, 115, 223, 200, 23, 34, 91, 201,
+ 201, 9, 2, 223, 200, 245, 124, 223, 199, 9, 2, 223, 197, 9, 2, 223, 198,
+ 23, 63, 9, 2, 223, 198, 23, 34, 91, 243, 233, 9, 2, 223, 198, 23, 243,
+ 233, 9, 2, 223, 198, 237, 208, 9, 2, 201, 201, 9, 2, 223, 109, 9, 2, 223,
+ 96, 9, 2, 223, 97, 230, 238, 9, 2, 223, 97, 23, 212, 200, 209, 141, 9, 2,
+ 223, 97, 219, 251, 223, 96, 9, 2, 223, 95, 9, 2, 223, 88, 221, 26, 9, 2,
+ 223, 87, 9, 2, 223, 86, 9, 2, 222, 240, 9, 2, 222, 241, 23, 63, 9, 2,
+ 222, 241, 23, 207, 29, 9, 2, 222, 241, 213, 24, 9, 2, 222, 100, 9, 2,
+ 222, 101, 23, 74, 9, 2, 222, 99, 9, 2, 222, 69, 9, 2, 222, 70, 23, 238,
+ 233, 209, 141, 9, 2, 222, 70, 23, 238, 225, 91, 238, 233, 209, 141, 9, 2,
+ 222, 65, 9, 2, 222, 66, 23, 250, 231, 9, 2, 222, 66, 23, 250, 75, 9, 2,
+ 222, 66, 23, 250, 76, 91, 250, 75, 9, 2, 222, 66, 23, 237, 219, 9, 2,
+ 222, 66, 23, 225, 21, 91, 238, 233, 209, 141, 9, 2, 222, 66, 23, 222,
+ 240, 9, 2, 222, 66, 23, 221, 40, 9, 2, 222, 66, 23, 213, 43, 9, 2, 222,
+ 66, 23, 213, 44, 91, 34, 250, 231, 9, 2, 222, 66, 23, 213, 44, 91, 250,
+ 75, 9, 2, 222, 66, 23, 213, 44, 91, 250, 76, 91, 250, 75, 9, 2, 222, 66,
+ 23, 207, 41, 91, 250, 75, 9, 2, 222, 66, 23, 206, 186, 9, 2, 222, 53, 9,
+ 2, 221, 84, 9, 2, 221, 56, 9, 2, 221, 40, 9, 2, 221, 41, 228, 93, 23,
+ 238, 224, 9, 2, 221, 41, 228, 93, 23, 225, 79, 9, 2, 221, 41, 228, 93,
+ 23, 215, 8, 9, 2, 221, 41, 228, 93, 23, 215, 9, 115, 221, 41, 228, 93,
+ 23, 215, 8, 9, 2, 221, 41, 228, 93, 23, 206, 186, 9, 2, 221, 41, 209,
+ 141, 9, 2, 221, 41, 115, 221, 40, 9, 2, 221, 41, 245, 124, 221, 40, 9, 2,
+ 221, 41, 245, 124, 221, 41, 228, 93, 115, 228, 92, 9, 2, 221, 35, 9, 2,
+ 221, 36, 251, 150, 23, 250, 69, 9, 2, 221, 36, 251, 150, 23, 248, 86, 9,
+ 2, 221, 36, 251, 150, 23, 242, 37, 9, 2, 221, 36, 251, 150, 23, 237, 219,
+ 9, 2, 221, 36, 251, 150, 23, 231, 86, 237, 208, 9, 2, 221, 36, 251, 150,
+ 23, 230, 27, 9, 2, 221, 36, 251, 150, 23, 228, 113, 9, 2, 221, 36, 251,
+ 150, 23, 222, 240, 9, 2, 221, 36, 251, 150, 23, 212, 138, 9, 2, 221, 36,
+ 251, 150, 23, 207, 40, 9, 2, 221, 36, 229, 69, 23, 248, 86, 9, 2, 221,
+ 36, 229, 69, 23, 248, 87, 68, 9, 2, 185, 9, 2, 219, 159, 9, 2, 219, 122,
+ 9, 2, 219, 96, 9, 2, 218, 222, 9, 2, 218, 167, 9, 2, 218, 168, 23, 63, 9,
+ 2, 218, 168, 23, 251, 232, 9, 2, 218, 168, 23, 248, 86, 9, 2, 218, 168,
+ 23, 247, 193, 9, 2, 218, 168, 23, 74, 9, 2, 218, 168, 23, 75, 9, 2, 218,
+ 168, 23, 235, 166, 9, 2, 218, 168, 23, 68, 9, 2, 218, 168, 23, 207, 40,
+ 9, 2, 218, 168, 245, 124, 218, 167, 9, 2, 218, 109, 9, 2, 218, 110, 23,
+ 230, 8, 9, 2, 218, 110, 23, 207, 29, 9, 2, 218, 110, 23, 202, 116, 9, 2,
+ 218, 110, 219, 251, 218, 109, 9, 2, 216, 220, 9, 2, 216, 214, 9, 2, 216,
+ 57, 9, 2, 215, 145, 9, 2, 215, 36, 9, 2, 215, 23, 221, 26, 9, 2, 215, 22,
+ 9, 2, 215, 23, 23, 63, 9, 2, 215, 23, 23, 242, 42, 9, 2, 215, 23, 23,
+ 242, 40, 9, 2, 215, 23, 23, 152, 9, 2, 215, 23, 23, 230, 12, 9, 2, 215,
+ 23, 23, 228, 183, 9, 2, 215, 23, 23, 226, 222, 9, 2, 215, 23, 23, 224,
+ 155, 9, 2, 215, 23, 23, 221, 40, 9, 2, 215, 23, 23, 215, 8, 9, 2, 215,
+ 23, 23, 213, 9, 9, 2, 215, 23, 23, 210, 10, 9, 2, 215, 23, 23, 207, 40,
+ 9, 2, 215, 23, 23, 207, 35, 9, 2, 215, 23, 23, 207, 6, 9, 2, 215, 23, 23,
+ 206, 210, 9, 2, 215, 23, 23, 206, 186, 9, 2, 215, 23, 115, 215, 22, 9, 2,
+ 215, 23, 237, 208, 9, 2, 215, 8, 9, 2, 215, 9, 228, 95, 23, 250, 73, 9,
+ 2, 214, 238, 9, 2, 214, 230, 9, 2, 213, 90, 9, 2, 213, 88, 9, 2, 213, 89,
+ 23, 63, 9, 2, 213, 89, 23, 249, 15, 9, 2, 213, 89, 23, 238, 55, 9, 2,
+ 213, 89, 23, 222, 240, 9, 2, 213, 89, 23, 212, 197, 9, 2, 213, 89, 23,
+ 207, 181, 9, 2, 213, 89, 23, 68, 9, 2, 213, 89, 23, 106, 91, 63, 9, 2,
+ 213, 86, 9, 2, 213, 84, 9, 2, 213, 59, 9, 2, 213, 43, 9, 2, 213, 44, 236,
+ 26, 9, 2, 213, 44, 115, 213, 44, 239, 0, 115, 239, 0, 238, 225, 115, 238,
+ 224, 9, 2, 213, 44, 115, 213, 44, 210, 11, 115, 210, 11, 238, 225, 115,
+ 238, 224, 9, 2, 213, 36, 9, 2, 213, 31, 9, 2, 213, 27, 9, 2, 213, 26, 9,
+ 2, 213, 23, 9, 2, 213, 9, 9, 2, 213, 10, 23, 63, 9, 2, 213, 10, 23, 231,
+ 66, 9, 2, 213, 3, 9, 2, 213, 4, 23, 63, 9, 2, 213, 4, 23, 248, 253, 9, 2,
+ 213, 4, 23, 247, 171, 9, 2, 213, 4, 23, 243, 176, 9, 2, 213, 4, 23, 238,
+ 224, 9, 2, 213, 4, 23, 231, 85, 9, 2, 213, 4, 23, 231, 86, 237, 208, 9,
+ 2, 213, 4, 23, 228, 177, 9, 2, 213, 4, 23, 226, 224, 9, 2, 213, 4, 23,
+ 223, 235, 9, 2, 213, 4, 23, 215, 8, 9, 2, 212, 253, 9, 2, 212, 248, 9, 2,
+ 212, 249, 209, 141, 9, 2, 212, 249, 115, 212, 249, 247, 161, 115, 247,
+ 160, 9, 2, 212, 244, 9, 2, 212, 199, 9, 2, 212, 200, 115, 230, 239, 212,
+ 199, 9, 2, 212, 197, 9, 2, 212, 196, 9, 2, 212, 162, 9, 2, 212, 163, 237,
+ 208, 9, 2, 212, 149, 9, 2, 212, 147, 9, 2, 212, 148, 115, 212, 148, 212,
+ 197, 9, 2, 212, 140, 9, 2, 212, 138, 9, 2, 211, 10, 9, 2, 211, 11, 115,
+ 211, 10, 9, 2, 210, 232, 9, 2, 210, 231, 9, 2, 210, 229, 9, 2, 210, 220,
+ 9, 2, 210, 219, 9, 2, 210, 193, 9, 2, 210, 192, 9, 2, 210, 22, 9, 2, 210,
+ 23, 250, 59, 9, 2, 210, 23, 23, 237, 3, 9, 2, 210, 23, 23, 224, 155, 9,
+ 2, 210, 23, 237, 208, 9, 2, 210, 10, 9, 2, 210, 11, 115, 210, 11, 222,
+ 101, 115, 222, 101, 243, 157, 115, 243, 156, 9, 2, 210, 11, 211, 176, 9,
+ 2, 209, 255, 9, 2, 160, 23, 248, 86, 9, 2, 160, 23, 237, 219, 9, 2, 160,
+ 23, 213, 43, 9, 2, 160, 23, 212, 199, 9, 2, 160, 23, 207, 197, 9, 2, 160,
+ 23, 207, 29, 9, 2, 209, 242, 9, 2, 209, 218, 9, 2, 209, 187, 9, 2, 209,
+ 188, 237, 208, 9, 2, 209, 2, 9, 2, 209, 3, 209, 141, 9, 2, 208, 229, 9,
+ 2, 208, 206, 9, 2, 208, 207, 23, 209, 242, 9, 2, 208, 207, 115, 208, 206,
+ 9, 2, 208, 207, 115, 208, 207, 239, 0, 115, 239, 0, 238, 225, 115, 238,
+ 224, 9, 2, 207, 203, 9, 2, 207, 197, 9, 2, 207, 195, 9, 2, 207, 191, 9,
+ 2, 207, 181, 9, 2, 207, 182, 115, 207, 182, 202, 117, 115, 202, 116, 9,
+ 2, 68, 9, 2, 106, 237, 219, 9, 2, 106, 106, 68, 9, 2, 106, 115, 106, 219,
+ 169, 115, 219, 169, 238, 225, 115, 238, 224, 9, 2, 106, 115, 106, 210,
+ 194, 115, 210, 193, 9, 2, 106, 115, 106, 106, 216, 73, 115, 106, 216, 72,
+ 9, 2, 207, 40, 9, 2, 207, 35, 9, 2, 207, 29, 9, 2, 207, 30, 228, 177, 9,
+ 2, 207, 30, 23, 249, 15, 9, 2, 207, 30, 23, 224, 155, 9, 2, 207, 30, 23,
+ 106, 91, 106, 91, 68, 9, 2, 207, 30, 23, 106, 91, 106, 91, 106, 237, 208,
+ 9, 2, 207, 30, 237, 208, 9, 2, 207, 30, 213, 24, 9, 2, 207, 30, 213, 25,
+ 23, 249, 15, 9, 2, 207, 25, 9, 2, 207, 6, 9, 2, 207, 7, 23, 228, 94, 9,
+ 2, 207, 7, 23, 225, 21, 91, 244, 212, 9, 2, 207, 7, 23, 213, 88, 9, 2,
+ 207, 7, 23, 68, 9, 2, 207, 5, 9, 2, 207, 1, 9, 2, 207, 2, 23, 229, 231,
+ 9, 2, 207, 2, 23, 185, 9, 2, 206, 255, 9, 2, 207, 0, 237, 208, 9, 2, 206,
+ 210, 9, 2, 206, 211, 245, 124, 206, 210, 9, 2, 206, 211, 213, 24, 9, 2,
+ 206, 208, 9, 2, 206, 209, 23, 34, 91, 152, 9, 2, 206, 209, 23, 34, 91,
+ 201, 201, 9, 2, 206, 209, 23, 251, 39, 9, 2, 206, 209, 23, 152, 9, 2,
+ 206, 209, 23, 221, 40, 9, 2, 206, 209, 23, 207, 40, 9, 2, 206, 209, 23,
+ 207, 41, 91, 250, 75, 9, 2, 206, 209, 23, 207, 41, 91, 248, 86, 9, 2,
+ 206, 207, 9, 2, 206, 204, 9, 2, 206, 203, 9, 2, 206, 199, 9, 2, 206, 200,
+ 23, 63, 9, 2, 206, 200, 23, 250, 69, 9, 2, 206, 200, 23, 142, 9, 2, 206,
+ 200, 23, 242, 31, 9, 2, 206, 200, 23, 239, 8, 9, 2, 206, 200, 23, 238,
+ 246, 9, 2, 206, 200, 23, 238, 233, 209, 141, 9, 2, 206, 200, 23, 238,
+ 224, 9, 2, 206, 200, 23, 237, 230, 9, 2, 206, 200, 23, 152, 9, 2, 206,
+ 200, 23, 231, 85, 9, 2, 206, 200, 23, 231, 66, 9, 2, 206, 200, 23, 230,
+ 209, 9, 2, 206, 200, 23, 229, 100, 9, 2, 206, 200, 23, 226, 222, 9, 2,
+ 206, 200, 23, 224, 110, 9, 2, 206, 200, 23, 185, 9, 2, 206, 200, 23, 213,
+ 43, 9, 2, 206, 200, 23, 212, 147, 9, 2, 206, 200, 23, 207, 203, 9, 2,
+ 206, 200, 23, 106, 91, 237, 219, 9, 2, 206, 200, 23, 207, 29, 9, 2, 206,
+ 200, 23, 206, 197, 9, 2, 206, 197, 9, 2, 206, 198, 23, 68, 9, 2, 206,
+ 186, 9, 2, 206, 187, 23, 63, 9, 2, 206, 187, 23, 228, 209, 9, 2, 206,
+ 187, 23, 228, 183, 9, 2, 206, 187, 23, 209, 242, 9, 2, 206, 182, 9, 2,
+ 206, 185, 9, 2, 206, 183, 9, 2, 206, 179, 9, 2, 206, 167, 9, 2, 206, 168,
+ 23, 229, 231, 9, 2, 206, 166, 9, 2, 202, 116, 9, 2, 202, 117, 209, 141,
+ 9, 2, 202, 117, 103, 23, 228, 183, 9, 2, 202, 112, 9, 2, 202, 105, 9, 2,
+ 202, 91, 9, 2, 202, 39, 9, 2, 202, 40, 115, 202, 39, 9, 2, 202, 38, 9, 2,
+ 202, 36, 9, 2, 202, 37, 230, 31, 209, 141, 9, 2, 202, 31, 9, 2, 202, 22,
+ 9, 2, 202, 6, 9, 2, 202, 4, 9, 2, 202, 5, 23, 63, 9, 2, 202, 3, 9, 2,
+ 202, 2, 9, 2, 229, 254, 241, 119, 9, 2, 251, 233, 23, 221, 40, 9, 2, 251,
+ 150, 23, 63, 9, 2, 250, 244, 23, 228, 198, 9, 2, 244, 204, 229, 69, 23,
+ 207, 41, 91, 225, 79, 9, 2, 244, 202, 9, 2, 243, 157, 91, 212, 199, 9, 2,
+ 242, 41, 23, 213, 43, 9, 2, 240, 180, 23, 237, 219, 9, 2, 240, 180, 23,
+ 213, 43, 9, 2, 239, 7, 23, 250, 232, 91, 230, 13, 91, 63, 9, 2, 239, 7,
+ 23, 250, 73, 9, 2, 238, 189, 9, 2, 238, 71, 9, 2, 236, 3, 9, 2, 230, 44,
+ 23, 250, 200, 9, 2, 230, 44, 23, 250, 72, 9, 2, 230, 44, 23, 238, 55, 9,
+ 2, 230, 44, 23, 237, 219, 9, 2, 230, 44, 23, 237, 4, 23, 250, 73, 9, 2,
+ 230, 44, 23, 226, 222, 9, 2, 230, 44, 23, 185, 9, 2, 230, 44, 23, 212,
+ 192, 9, 2, 230, 44, 23, 207, 203, 9, 2, 230, 44, 23, 206, 208, 9, 2, 228,
+ 95, 23, 238, 81, 9, 2, 226, 238, 213, 25, 23, 249, 15, 9, 2, 226, 238,
+ 23, 241, 5, 91, 228, 30, 9, 2, 226, 238, 23, 212, 199, 9, 2, 224, 227, 9,
+ 2, 223, 198, 23, 202, 116, 9, 2, 223, 108, 9, 2, 222, 68, 9, 2, 222, 67,
+ 9, 2, 222, 66, 23, 248, 253, 9, 2, 222, 66, 23, 238, 81, 9, 2, 221, 57,
+ 215, 198, 222, 59, 244, 54, 9, 2, 218, 223, 250, 59, 9, 2, 218, 113, 9,
+ 2, 215, 23, 23, 231, 86, 237, 208, 9, 2, 209, 1, 9, 2, 207, 7, 23, 225,
+ 20, 9, 2, 106, 68, 9, 141, 2, 120, 250, 75, 9, 141, 2, 126, 250, 75, 9,
+ 141, 2, 239, 147, 250, 75, 9, 141, 2, 239, 233, 250, 75, 9, 141, 2, 212,
+ 88, 250, 75, 9, 141, 2, 213, 112, 250, 75, 9, 141, 2, 241, 143, 250, 75,
+ 9, 141, 2, 222, 64, 250, 75, 9, 141, 2, 126, 243, 156, 9, 141, 2, 239,
+ 147, 243, 156, 9, 141, 2, 239, 233, 243, 156, 9, 141, 2, 212, 88, 243,
+ 156, 9, 141, 2, 213, 112, 243, 156, 9, 141, 2, 241, 143, 243, 156, 9,
+ 141, 2, 222, 64, 243, 156, 9, 141, 2, 239, 147, 68, 9, 141, 2, 239, 233,
+ 68, 9, 141, 2, 212, 88, 68, 9, 141, 2, 213, 112, 68, 9, 141, 2, 241, 143,
+ 68, 9, 141, 2, 222, 64, 68, 9, 141, 2, 118, 238, 164, 9, 141, 2, 120,
+ 238, 164, 9, 141, 2, 126, 238, 164, 9, 141, 2, 239, 147, 238, 164, 9,
+ 141, 2, 239, 233, 238, 164, 9, 141, 2, 212, 88, 238, 164, 9, 141, 2, 213,
+ 112, 238, 164, 9, 141, 2, 241, 143, 238, 164, 9, 141, 2, 222, 64, 238,
+ 164, 9, 141, 2, 118, 238, 161, 9, 141, 2, 120, 238, 161, 9, 141, 2, 126,
+ 238, 161, 9, 141, 2, 239, 147, 238, 161, 9, 141, 2, 239, 233, 238, 161,
+ 9, 141, 2, 120, 213, 59, 9, 141, 2, 126, 213, 59, 9, 141, 2, 126, 213,
+ 60, 206, 69, 18, 9, 141, 2, 239, 147, 213, 59, 9, 141, 2, 239, 233, 213,
+ 59, 9, 141, 2, 212, 88, 213, 59, 9, 141, 2, 213, 112, 213, 59, 9, 141, 2,
+ 241, 143, 213, 59, 9, 141, 2, 222, 64, 213, 59, 9, 141, 2, 118, 213, 54,
+ 9, 141, 2, 120, 213, 54, 9, 141, 2, 126, 213, 54, 9, 141, 2, 126, 213,
+ 55, 206, 69, 18, 9, 141, 2, 239, 147, 213, 54, 9, 141, 2, 239, 233, 213,
+ 54, 9, 141, 2, 213, 60, 23, 238, 247, 91, 243, 156, 9, 141, 2, 213, 60,
+ 23, 238, 247, 91, 224, 110, 9, 141, 2, 118, 247, 156, 9, 141, 2, 120,
+ 247, 156, 9, 141, 2, 126, 247, 156, 9, 141, 2, 126, 247, 157, 206, 69,
+ 18, 9, 141, 2, 239, 147, 247, 156, 9, 141, 2, 239, 233, 247, 156, 9, 141,
+ 2, 126, 206, 69, 239, 159, 241, 6, 9, 141, 2, 126, 206, 69, 239, 159,
+ 241, 3, 9, 141, 2, 239, 147, 206, 69, 239, 159, 227, 118, 9, 141, 2, 239,
+ 147, 206, 69, 239, 159, 227, 116, 9, 141, 2, 239, 147, 206, 69, 239, 159,
+ 227, 119, 63, 9, 141, 2, 239, 147, 206, 69, 239, 159, 227, 119, 249, 255,
+ 9, 141, 2, 212, 88, 206, 69, 239, 159, 250, 71, 9, 141, 2, 213, 112, 206,
+ 69, 239, 159, 231, 58, 9, 141, 2, 213, 112, 206, 69, 239, 159, 231, 60,
+ 63, 9, 141, 2, 213, 112, 206, 69, 239, 159, 231, 60, 249, 255, 9, 141, 2,
+ 241, 143, 206, 69, 239, 159, 206, 181, 9, 141, 2, 241, 143, 206, 69, 239,
+ 159, 206, 180, 9, 141, 2, 222, 64, 206, 69, 239, 159, 231, 74, 9, 141, 2,
+ 222, 64, 206, 69, 239, 159, 231, 73, 9, 141, 2, 222, 64, 206, 69, 239,
+ 159, 231, 72, 9, 141, 2, 222, 64, 206, 69, 239, 159, 231, 75, 63, 9, 141,
+ 2, 120, 250, 76, 209, 141, 9, 141, 2, 126, 250, 76, 209, 141, 9, 141, 2,
+ 239, 147, 250, 76, 209, 141, 9, 141, 2, 239, 233, 250, 76, 209, 141, 9,
+ 141, 2, 212, 88, 250, 76, 209, 141, 9, 141, 2, 118, 248, 240, 9, 141, 2,
+ 120, 248, 240, 9, 141, 2, 126, 248, 240, 9, 141, 2, 239, 147, 248, 240,
+ 9, 141, 2, 239, 147, 248, 241, 206, 69, 18, 9, 141, 2, 239, 233, 248,
+ 240, 9, 141, 2, 239, 233, 248, 241, 206, 69, 18, 9, 141, 2, 222, 77, 9,
+ 141, 2, 222, 78, 9, 141, 2, 118, 241, 2, 9, 141, 2, 120, 241, 2, 9, 141,
+ 2, 118, 209, 61, 243, 156, 9, 141, 2, 120, 209, 58, 243, 156, 9, 141, 2,
+ 239, 233, 212, 77, 243, 156, 9, 141, 2, 118, 209, 61, 206, 69, 239, 159,
+ 63, 9, 141, 2, 120, 209, 58, 206, 69, 239, 159, 63, 9, 141, 2, 118, 241,
+ 139, 250, 75, 9, 141, 2, 118, 217, 56, 250, 75, 9, 141, 2, 38, 250, 62,
+ 118, 212, 78, 9, 141, 2, 38, 250, 62, 118, 217, 55, 9, 141, 2, 118, 217,
+ 56, 237, 202, 9, 141, 2, 118, 162, 237, 202, 9, 141, 2, 241, 120, 118,
+ 209, 60, 9, 141, 2, 241, 120, 120, 209, 57, 9, 141, 2, 241, 120, 239,
+ 153, 9, 141, 2, 241, 120, 240, 18, 9, 141, 2, 239, 147, 106, 206, 69, 18,
+ 9, 141, 2, 239, 233, 106, 206, 69, 18, 9, 141, 2, 212, 88, 106, 206, 69,
+ 18, 9, 141, 2, 213, 112, 106, 206, 69, 18, 9, 141, 2, 241, 143, 106, 206,
+ 69, 18, 9, 141, 2, 222, 64, 106, 206, 69, 18, 9, 217, 179, 2, 38, 250,
+ 62, 203, 238, 243, 141, 9, 217, 179, 2, 80, 245, 242, 9, 217, 179, 2,
+ 243, 228, 245, 242, 9, 217, 179, 2, 243, 228, 208, 81, 9, 217, 179, 2,
+ 243, 228, 217, 61, 9, 2, 251, 233, 23, 221, 41, 209, 141, 9, 2, 251, 233,
+ 23, 212, 197, 9, 2, 251, 123, 23, 241, 4, 9, 2, 249, 16, 23, 243, 157,
+ 209, 141, 9, 2, 249, 4, 23, 251, 149, 9, 2, 249, 4, 23, 222, 100, 9, 2,
+ 249, 4, 23, 202, 116, 9, 2, 247, 194, 115, 247, 194, 23, 223, 109, 9, 2,
+ 244, 213, 23, 209, 242, 9, 2, 244, 204, 23, 228, 183, 9, 2, 243, 189, 23,
+ 231, 85, 9, 2, 243, 189, 23, 106, 106, 68, 9, 2, 243, 187, 23, 207, 29,
+ 9, 2, 242, 38, 23, 250, 200, 9, 2, 242, 38, 23, 250, 75, 9, 2, 242, 38,
+ 23, 250, 76, 250, 50, 227, 222, 9, 2, 242, 38, 23, 243, 176, 9, 2, 242,
+ 38, 23, 242, 31, 9, 2, 242, 38, 23, 241, 22, 9, 2, 242, 38, 23, 239, 8,
+ 9, 2, 242, 38, 23, 238, 81, 9, 2, 242, 38, 23, 238, 64, 237, 208, 9, 2,
+ 242, 38, 23, 238, 55, 9, 2, 242, 38, 23, 152, 9, 2, 242, 38, 23, 237, 3,
+ 9, 2, 242, 38, 23, 231, 86, 237, 208, 9, 2, 242, 38, 23, 229, 231, 9, 2,
+ 242, 38, 23, 228, 183, 9, 2, 242, 38, 23, 228, 177, 9, 2, 242, 38, 23,
+ 228, 178, 91, 229, 231, 9, 2, 242, 38, 23, 228, 82, 9, 2, 242, 38, 23,
+ 228, 28, 9, 2, 242, 38, 23, 228, 29, 23, 228, 183, 9, 2, 242, 38, 23,
+ 226, 228, 91, 238, 55, 9, 2, 242, 38, 23, 225, 79, 9, 2, 242, 38, 23,
+ 224, 228, 9, 2, 242, 38, 23, 224, 155, 9, 2, 242, 38, 23, 222, 100, 9, 2,
+ 242, 38, 23, 218, 167, 9, 2, 242, 38, 23, 213, 43, 9, 2, 242, 38, 23,
+ 212, 163, 237, 208, 9, 2, 241, 191, 23, 228, 183, 9, 2, 241, 191, 23,
+ 219, 96, 9, 2, 241, 23, 203, 196, 9, 2, 241, 5, 245, 124, 241, 4, 9, 2,
+ 240, 180, 213, 25, 23, 250, 75, 9, 2, 240, 180, 213, 25, 23, 237, 3, 9,
+ 2, 240, 180, 213, 25, 23, 231, 86, 237, 208, 9, 2, 240, 180, 213, 25, 23,
+ 228, 113, 9, 2, 240, 180, 213, 25, 23, 228, 30, 9, 2, 240, 180, 213, 25,
+ 23, 225, 20, 9, 2, 240, 180, 213, 25, 23, 224, 228, 9, 2, 240, 180, 213,
+ 25, 23, 211, 10, 9, 2, 240, 180, 23, 211, 10, 9, 2, 239, 7, 23, 249, 3,
+ 9, 2, 239, 7, 23, 243, 189, 237, 208, 9, 2, 239, 7, 23, 242, 38, 23, 231,
+ 86, 237, 208, 9, 2, 239, 7, 23, 242, 38, 23, 229, 231, 9, 2, 239, 7, 23,
+ 241, 25, 9, 2, 239, 7, 23, 239, 8, 9, 2, 239, 7, 23, 238, 225, 91, 243,
+ 233, 9, 2, 239, 7, 23, 238, 225, 91, 222, 240, 9, 2, 239, 7, 23, 237,
+ 160, 91, 63, 9, 2, 239, 7, 23, 228, 178, 91, 229, 231, 9, 2, 239, 7, 23,
+ 228, 28, 9, 2, 239, 7, 23, 228, 29, 23, 228, 183, 9, 2, 239, 7, 23, 226,
+ 227, 9, 2, 239, 7, 23, 223, 199, 9, 2, 239, 7, 23, 222, 240, 9, 2, 239,
+ 7, 23, 222, 241, 91, 241, 190, 9, 2, 239, 7, 23, 222, 241, 91, 238, 81,
+ 9, 2, 239, 7, 23, 213, 3, 9, 2, 239, 7, 23, 202, 22, 9, 2, 239, 2, 215,
+ 198, 222, 59, 244, 54, 9, 2, 238, 163, 23, 68, 9, 2, 238, 56, 23, 238,
+ 56, 245, 124, 238, 55, 9, 2, 237, 229, 23, 231, 86, 237, 208, 9, 2, 237,
+ 220, 91, 238, 56, 23, 209, 242, 9, 2, 237, 160, 209, 142, 237, 208, 9, 2,
+ 237, 4, 23, 250, 76, 115, 237, 4, 23, 250, 75, 9, 2, 230, 44, 23, 247,
+ 193, 9, 2, 230, 44, 23, 173, 9, 2, 230, 44, 23, 106, 106, 68, 9, 2, 230,
+ 44, 23, 206, 210, 9, 2, 228, 95, 23, 202, 7, 115, 202, 6, 9, 2, 228, 83,
+ 9, 2, 228, 81, 9, 2, 228, 80, 9, 2, 228, 79, 9, 2, 228, 78, 9, 2, 228,
+ 77, 9, 2, 228, 76, 9, 2, 228, 75, 115, 228, 75, 237, 208, 9, 2, 228, 74,
+ 9, 2, 228, 73, 115, 228, 72, 9, 2, 228, 71, 9, 2, 228, 70, 9, 2, 228, 69,
+ 9, 2, 228, 68, 9, 2, 228, 67, 9, 2, 228, 66, 9, 2, 228, 65, 9, 2, 228,
+ 64, 9, 2, 228, 63, 9, 2, 228, 62, 9, 2, 228, 61, 9, 2, 228, 60, 9, 2,
+ 228, 59, 9, 2, 228, 58, 9, 2, 228, 57, 9, 2, 228, 56, 9, 2, 228, 55, 9,
+ 2, 228, 54, 9, 2, 228, 52, 9, 2, 228, 53, 23, 237, 230, 9, 2, 228, 53,
+ 23, 231, 85, 9, 2, 228, 53, 23, 219, 97, 91, 226, 236, 9, 2, 228, 53, 23,
+ 219, 97, 91, 219, 97, 91, 226, 236, 9, 2, 228, 53, 23, 207, 41, 91, 249,
+ 32, 9, 2, 228, 51, 9, 2, 228, 50, 9, 2, 228, 49, 9, 2, 228, 48, 9, 2,
+ 228, 47, 9, 2, 228, 46, 9, 2, 228, 45, 9, 2, 228, 44, 9, 2, 228, 43, 9,
+ 2, 228, 42, 9, 2, 228, 40, 9, 2, 228, 41, 23, 250, 75, 9, 2, 228, 41, 23,
+ 249, 15, 9, 2, 228, 41, 23, 242, 30, 237, 209, 237, 208, 9, 2, 228, 41,
+ 23, 228, 207, 9, 2, 228, 41, 23, 228, 113, 9, 2, 228, 41, 23, 209, 218,
+ 9, 2, 228, 41, 23, 209, 187, 9, 2, 228, 41, 23, 207, 40, 9, 2, 228, 41,
+ 23, 207, 29, 9, 2, 228, 41, 23, 206, 197, 9, 2, 228, 39, 9, 2, 228, 37,
+ 9, 2, 228, 38, 23, 242, 40, 9, 2, 228, 38, 23, 239, 8, 9, 2, 228, 38, 23,
+ 231, 85, 9, 2, 228, 38, 23, 231, 86, 237, 208, 9, 2, 228, 38, 23, 222,
+ 100, 9, 2, 228, 38, 23, 219, 97, 91, 219, 97, 91, 226, 236, 9, 2, 228,
+ 38, 23, 213, 28, 91, 229, 100, 9, 2, 228, 38, 23, 207, 29, 9, 2, 228, 38,
+ 23, 206, 197, 9, 2, 228, 35, 9, 2, 228, 34, 9, 2, 226, 238, 237, 209, 23,
+ 250, 75, 9, 2, 226, 238, 23, 243, 156, 9, 2, 226, 238, 23, 237, 140, 9,
+ 2, 226, 238, 23, 219, 96, 9, 2, 226, 238, 23, 219, 97, 91, 219, 97, 91,
+ 226, 236, 9, 2, 226, 238, 23, 209, 242, 9, 2, 224, 156, 91, 202, 115, 9,
+ 2, 223, 200, 115, 223, 200, 23, 239, 8, 9, 2, 223, 200, 115, 223, 200,
+ 23, 230, 12, 9, 2, 222, 66, 23, 243, 189, 237, 208, 9, 2, 222, 66, 23,
+ 238, 55, 9, 2, 222, 66, 23, 237, 212, 9, 2, 222, 66, 23, 237, 3, 9, 2,
+ 222, 66, 23, 229, 171, 9, 2, 222, 66, 23, 228, 78, 9, 2, 222, 66, 23,
+ 225, 79, 9, 2, 222, 66, 23, 219, 97, 91, 219, 96, 9, 2, 222, 66, 23, 68,
+ 9, 2, 222, 66, 23, 106, 91, 68, 9, 2, 222, 66, 23, 206, 197, 9, 2, 215,
+ 23, 237, 209, 23, 152, 9, 2, 215, 23, 23, 241, 92, 9, 2, 215, 23, 23,
+ 213, 44, 250, 50, 227, 222, 9, 2, 215, 23, 23, 209, 242, 9, 2, 213, 87,
+ 209, 141, 9, 2, 213, 44, 115, 213, 43, 9, 2, 213, 44, 91, 236, 21, 9, 2,
+ 213, 44, 91, 223, 86, 9, 2, 213, 44, 91, 214, 230, 9, 2, 212, 198, 91,
+ 242, 38, 23, 222, 100, 9, 2, 212, 198, 91, 241, 191, 23, 250, 231, 9, 2,
+ 212, 163, 23, 209, 242, 9, 2, 209, 243, 91, 215, 22, 9, 2, 207, 192, 23,
+ 238, 233, 209, 141, 9, 2, 207, 192, 23, 126, 243, 156, 9, 2, 206, 209,
+ 230, 238, 9, 2, 206, 209, 23, 207, 29, 9, 2, 206, 200, 23, 244, 153, 9,
+ 2, 206, 200, 23, 228, 36, 9, 2, 206, 200, 23, 226, 236, 9, 2, 202, 115,
+ 9, 2, 202, 7, 115, 202, 7, 91, 214, 230, 9, 2, 202, 5, 23, 126, 243, 157,
+ 209, 141, 14, 7, 255, 18, 14, 7, 255, 17, 14, 7, 255, 16, 14, 7, 255, 15,
+ 14, 7, 255, 14, 14, 7, 255, 13, 14, 7, 255, 12, 14, 7, 255, 11, 14, 7,
+ 255, 10, 14, 7, 255, 9, 14, 7, 255, 8, 14, 7, 255, 7, 14, 7, 255, 6, 14,
+ 7, 255, 4, 14, 7, 255, 3, 14, 7, 255, 2, 14, 7, 255, 1, 14, 7, 255, 0,
+ 14, 7, 254, 255, 14, 7, 254, 254, 14, 7, 254, 253, 14, 7, 254, 252, 14,
+ 7, 254, 251, 14, 7, 254, 250, 14, 7, 254, 249, 14, 7, 254, 248, 14, 7,
+ 254, 247, 14, 7, 254, 246, 14, 7, 254, 245, 14, 7, 254, 244, 14, 7, 254,
+ 243, 14, 7, 254, 241, 14, 7, 254, 240, 14, 7, 254, 238, 14, 7, 254, 237,
+ 14, 7, 254, 236, 14, 7, 254, 235, 14, 7, 254, 234, 14, 7, 254, 233, 14,
+ 7, 254, 232, 14, 7, 254, 231, 14, 7, 254, 230, 14, 7, 254, 229, 14, 7,
+ 254, 228, 14, 7, 254, 227, 14, 7, 254, 225, 14, 7, 254, 224, 14, 7, 254,
+ 223, 14, 7, 254, 221, 14, 7, 254, 220, 14, 7, 254, 219, 14, 7, 254, 218,
+ 14, 7, 254, 217, 14, 7, 254, 216, 14, 7, 254, 215, 14, 7, 254, 214, 14,
+ 7, 254, 211, 14, 7, 254, 210, 14, 7, 254, 209, 14, 7, 254, 208, 14, 7,
+ 254, 207, 14, 7, 254, 206, 14, 7, 254, 205, 14, 7, 254, 204, 14, 7, 254,
+ 203, 14, 7, 254, 202, 14, 7, 254, 201, 14, 7, 254, 200, 14, 7, 254, 199,
+ 14, 7, 254, 198, 14, 7, 254, 197, 14, 7, 254, 196, 14, 7, 254, 195, 14,
+ 7, 254, 194, 14, 7, 254, 193, 14, 7, 254, 192, 14, 7, 254, 188, 14, 7,
+ 254, 187, 14, 7, 254, 186, 14, 7, 254, 185, 14, 7, 249, 253, 14, 7, 249,
+ 251, 14, 7, 249, 249, 14, 7, 249, 247, 14, 7, 249, 245, 14, 7, 249, 244,
+ 14, 7, 249, 242, 14, 7, 249, 240, 14, 7, 249, 238, 14, 7, 249, 236, 14,
+ 7, 247, 121, 14, 7, 247, 120, 14, 7, 247, 119, 14, 7, 247, 118, 14, 7,
+ 247, 117, 14, 7, 247, 116, 14, 7, 247, 115, 14, 7, 247, 114, 14, 7, 247,
+ 113, 14, 7, 247, 112, 14, 7, 247, 111, 14, 7, 247, 110, 14, 7, 247, 109,
+ 14, 7, 247, 108, 14, 7, 247, 107, 14, 7, 247, 106, 14, 7, 247, 105, 14,
+ 7, 247, 104, 14, 7, 247, 103, 14, 7, 247, 102, 14, 7, 247, 101, 14, 7,
+ 247, 100, 14, 7, 247, 99, 14, 7, 247, 98, 14, 7, 247, 97, 14, 7, 247, 96,
+ 14, 7, 247, 95, 14, 7, 247, 94, 14, 7, 245, 50, 14, 7, 245, 49, 14, 7,
+ 245, 48, 14, 7, 245, 47, 14, 7, 245, 46, 14, 7, 245, 45, 14, 7, 245, 44,
+ 14, 7, 245, 43, 14, 7, 245, 42, 14, 7, 245, 41, 14, 7, 245, 40, 14, 7,
+ 245, 39, 14, 7, 245, 38, 14, 7, 245, 37, 14, 7, 245, 36, 14, 7, 245, 35,
+ 14, 7, 245, 34, 14, 7, 245, 33, 14, 7, 245, 32, 14, 7, 245, 31, 14, 7,
+ 245, 30, 14, 7, 245, 29, 14, 7, 245, 28, 14, 7, 245, 27, 14, 7, 245, 26,
+ 14, 7, 245, 25, 14, 7, 245, 24, 14, 7, 245, 23, 14, 7, 245, 22, 14, 7,
+ 245, 21, 14, 7, 245, 20, 14, 7, 245, 19, 14, 7, 245, 18, 14, 7, 245, 17,
+ 14, 7, 245, 16, 14, 7, 245, 15, 14, 7, 245, 14, 14, 7, 245, 13, 14, 7,
+ 245, 12, 14, 7, 245, 11, 14, 7, 245, 10, 14, 7, 245, 9, 14, 7, 245, 8,
+ 14, 7, 245, 7, 14, 7, 245, 6, 14, 7, 245, 5, 14, 7, 245, 4, 14, 7, 245,
+ 3, 14, 7, 245, 2, 14, 7, 245, 1, 14, 7, 245, 0, 14, 7, 244, 255, 14, 7,
+ 244, 254, 14, 7, 244, 253, 14, 7, 244, 252, 14, 7, 244, 251, 14, 7, 244,
+ 250, 14, 7, 244, 249, 14, 7, 244, 248, 14, 7, 244, 247, 14, 7, 244, 246,
+ 14, 7, 244, 245, 14, 7, 244, 244, 14, 7, 244, 243, 14, 7, 244, 242, 14,
+ 7, 244, 241, 14, 7, 244, 240, 14, 7, 244, 239, 14, 7, 244, 238, 14, 7,
+ 244, 237, 14, 7, 244, 236, 14, 7, 244, 235, 14, 7, 244, 234, 14, 7, 244,
+ 233, 14, 7, 244, 232, 14, 7, 244, 231, 14, 7, 244, 230, 14, 7, 244, 229,
+ 14, 7, 244, 228, 14, 7, 244, 227, 14, 7, 244, 226, 14, 7, 244, 225, 14,
+ 7, 244, 224, 14, 7, 244, 223, 14, 7, 244, 222, 14, 7, 244, 221, 14, 7,
+ 244, 220, 14, 7, 244, 219, 14, 7, 244, 218, 14, 7, 244, 217, 14, 7, 244,
+ 216, 14, 7, 244, 215, 14, 7, 241, 235, 14, 7, 241, 234, 14, 7, 241, 233,
+ 14, 7, 241, 232, 14, 7, 241, 231, 14, 7, 241, 230, 14, 7, 241, 229, 14,
+ 7, 241, 228, 14, 7, 241, 227, 14, 7, 241, 226, 14, 7, 241, 225, 14, 7,
+ 241, 224, 14, 7, 241, 223, 14, 7, 241, 222, 14, 7, 241, 221, 14, 7, 241,
+ 220, 14, 7, 241, 219, 14, 7, 241, 218, 14, 7, 241, 217, 14, 7, 241, 216,
+ 14, 7, 241, 215, 14, 7, 241, 214, 14, 7, 241, 213, 14, 7, 241, 212, 14,
+ 7, 241, 211, 14, 7, 241, 210, 14, 7, 241, 209, 14, 7, 241, 208, 14, 7,
+ 241, 207, 14, 7, 241, 206, 14, 7, 241, 205, 14, 7, 241, 204, 14, 7, 241,
+ 203, 14, 7, 241, 202, 14, 7, 241, 201, 14, 7, 241, 200, 14, 7, 241, 199,
+ 14, 7, 241, 198, 14, 7, 241, 197, 14, 7, 241, 196, 14, 7, 241, 195, 14,
+ 7, 241, 194, 14, 7, 241, 193, 14, 7, 241, 192, 14, 7, 240, 173, 14, 7,
+ 240, 172, 14, 7, 240, 171, 14, 7, 240, 170, 14, 7, 240, 169, 14, 7, 240,
+ 168, 14, 7, 240, 167, 14, 7, 240, 166, 14, 7, 240, 165, 14, 7, 240, 164,
+ 14, 7, 240, 163, 14, 7, 240, 162, 14, 7, 240, 161, 14, 7, 240, 160, 14,
+ 7, 240, 159, 14, 7, 240, 158, 14, 7, 240, 157, 14, 7, 240, 156, 14, 7,
+ 240, 155, 14, 7, 240, 154, 14, 7, 240, 153, 14, 7, 240, 152, 14, 7, 240,
+ 151, 14, 7, 240, 150, 14, 7, 240, 149, 14, 7, 240, 148, 14, 7, 240, 147,
+ 14, 7, 240, 146, 14, 7, 240, 145, 14, 7, 240, 144, 14, 7, 240, 143, 14,
+ 7, 240, 142, 14, 7, 240, 141, 14, 7, 240, 140, 14, 7, 240, 139, 14, 7,
+ 240, 138, 14, 7, 240, 137, 14, 7, 240, 136, 14, 7, 240, 135, 14, 7, 240,
+ 134, 14, 7, 240, 133, 14, 7, 240, 132, 14, 7, 240, 131, 14, 7, 240, 130,
+ 14, 7, 240, 129, 14, 7, 240, 128, 14, 7, 240, 127, 14, 7, 240, 126, 14,
+ 7, 240, 125, 14, 7, 240, 124, 14, 7, 240, 123, 14, 7, 240, 122, 14, 7,
+ 240, 121, 14, 7, 240, 120, 14, 7, 240, 119, 14, 7, 240, 118, 14, 7, 240,
+ 117, 14, 7, 240, 116, 14, 7, 240, 115, 14, 7, 240, 114, 14, 7, 240, 113,
+ 14, 7, 240, 112, 14, 7, 240, 111, 14, 7, 240, 110, 14, 7, 240, 109, 14,
+ 7, 239, 74, 14, 7, 239, 73, 14, 7, 239, 72, 14, 7, 239, 71, 14, 7, 239,
+ 70, 14, 7, 239, 69, 14, 7, 239, 68, 14, 7, 239, 67, 14, 7, 239, 66, 14,
+ 7, 239, 65, 14, 7, 239, 64, 14, 7, 239, 63, 14, 7, 239, 62, 14, 7, 239,
+ 61, 14, 7, 239, 60, 14, 7, 239, 59, 14, 7, 239, 58, 14, 7, 239, 57, 14,
+ 7, 239, 56, 14, 7, 239, 55, 14, 7, 239, 54, 14, 7, 239, 53, 14, 7, 239,
+ 52, 14, 7, 239, 51, 14, 7, 239, 50, 14, 7, 239, 49, 14, 7, 239, 48, 14,
+ 7, 239, 47, 14, 7, 239, 46, 14, 7, 239, 45, 14, 7, 239, 44, 14, 7, 239,
+ 43, 14, 7, 239, 42, 14, 7, 239, 41, 14, 7, 239, 40, 14, 7, 239, 39, 14,
+ 7, 239, 38, 14, 7, 239, 37, 14, 7, 239, 36, 14, 7, 239, 35, 14, 7, 239,
+ 34, 14, 7, 239, 33, 14, 7, 239, 32, 14, 7, 239, 31, 14, 7, 239, 30, 14,
+ 7, 239, 29, 14, 7, 239, 28, 14, 7, 239, 27, 14, 7, 239, 26, 14, 7, 239,
+ 25, 14, 7, 239, 24, 14, 7, 239, 23, 14, 7, 239, 22, 14, 7, 239, 21, 14,
+ 7, 239, 20, 14, 7, 239, 19, 14, 7, 239, 18, 14, 7, 239, 17, 14, 7, 239,
+ 16, 14, 7, 239, 15, 14, 7, 239, 14, 14, 7, 239, 13, 14, 7, 239, 12, 14,
+ 7, 239, 11, 14, 7, 237, 169, 14, 7, 237, 168, 14, 7, 237, 167, 14, 7,
+ 237, 166, 14, 7, 237, 165, 14, 7, 237, 164, 14, 7, 237, 163, 14, 7, 237,
+ 162, 14, 7, 237, 161, 14, 7, 235, 190, 14, 7, 235, 189, 14, 7, 235, 188,
+ 14, 7, 235, 187, 14, 7, 235, 186, 14, 7, 235, 185, 14, 7, 235, 184, 14,
+ 7, 235, 183, 14, 7, 235, 182, 14, 7, 235, 181, 14, 7, 235, 180, 14, 7,
+ 235, 179, 14, 7, 235, 178, 14, 7, 235, 177, 14, 7, 235, 176, 14, 7, 235,
+ 175, 14, 7, 235, 174, 14, 7, 235, 173, 14, 7, 235, 172, 14, 7, 230, 53,
+ 14, 7, 230, 52, 14, 7, 230, 51, 14, 7, 230, 50, 14, 7, 230, 49, 14, 7,
+ 230, 48, 14, 7, 230, 47, 14, 7, 230, 46, 14, 7, 228, 128, 14, 7, 228,
+ 127, 14, 7, 228, 126, 14, 7, 228, 125, 14, 7, 228, 124, 14, 7, 228, 123,
+ 14, 7, 228, 122, 14, 7, 228, 121, 14, 7, 228, 120, 14, 7, 228, 119, 14,
+ 7, 226, 183, 14, 7, 226, 182, 14, 7, 226, 181, 14, 7, 226, 179, 14, 7,
+ 226, 177, 14, 7, 226, 176, 14, 7, 226, 174, 14, 7, 226, 172, 14, 7, 226,
+ 170, 14, 7, 226, 168, 14, 7, 226, 166, 14, 7, 226, 164, 14, 7, 226, 162,
+ 14, 7, 226, 161, 14, 7, 226, 159, 14, 7, 226, 157, 14, 7, 226, 156, 14,
+ 7, 226, 155, 14, 7, 226, 154, 14, 7, 226, 153, 14, 7, 226, 152, 14, 7,
+ 226, 151, 14, 7, 226, 150, 14, 7, 226, 149, 14, 7, 226, 147, 14, 7, 226,
+ 145, 14, 7, 226, 143, 14, 7, 226, 142, 14, 7, 226, 140, 14, 7, 226, 139,
+ 14, 7, 226, 137, 14, 7, 226, 136, 14, 7, 226, 134, 14, 7, 226, 132, 14,
+ 7, 226, 130, 14, 7, 226, 128, 14, 7, 226, 126, 14, 7, 226, 125, 14, 7,
+ 226, 123, 14, 7, 226, 121, 14, 7, 226, 120, 14, 7, 226, 118, 14, 7, 226,
+ 116, 14, 7, 226, 114, 14, 7, 226, 112, 14, 7, 226, 111, 14, 7, 226, 109,
+ 14, 7, 226, 107, 14, 7, 226, 105, 14, 7, 226, 104, 14, 7, 226, 102, 14,
+ 7, 226, 100, 14, 7, 226, 99, 14, 7, 226, 98, 14, 7, 226, 96, 14, 7, 226,
+ 94, 14, 7, 226, 92, 14, 7, 226, 90, 14, 7, 226, 88, 14, 7, 226, 86, 14,
+ 7, 226, 84, 14, 7, 226, 83, 14, 7, 226, 81, 14, 7, 226, 79, 14, 7, 226,
+ 77, 14, 7, 226, 75, 14, 7, 223, 160, 14, 7, 223, 159, 14, 7, 223, 158,
+ 14, 7, 223, 157, 14, 7, 223, 156, 14, 7, 223, 155, 14, 7, 223, 154, 14,
+ 7, 223, 153, 14, 7, 223, 152, 14, 7, 223, 151, 14, 7, 223, 150, 14, 7,
+ 223, 149, 14, 7, 223, 148, 14, 7, 223, 147, 14, 7, 223, 146, 14, 7, 223,
+ 145, 14, 7, 223, 144, 14, 7, 223, 143, 14, 7, 223, 142, 14, 7, 223, 141,
+ 14, 7, 223, 140, 14, 7, 223, 139, 14, 7, 223, 138, 14, 7, 223, 137, 14,
+ 7, 223, 136, 14, 7, 223, 135, 14, 7, 223, 134, 14, 7, 223, 133, 14, 7,
+ 223, 132, 14, 7, 223, 131, 14, 7, 223, 130, 14, 7, 223, 129, 14, 7, 223,
+ 128, 14, 7, 223, 127, 14, 7, 223, 126, 14, 7, 223, 125, 14, 7, 223, 124,
+ 14, 7, 223, 123, 14, 7, 223, 122, 14, 7, 223, 121, 14, 7, 223, 120, 14,
+ 7, 223, 119, 14, 7, 223, 118, 14, 7, 223, 117, 14, 7, 223, 116, 14, 7,
+ 223, 115, 14, 7, 223, 114, 14, 7, 223, 113, 14, 7, 223, 112, 14, 7, 221,
+ 252, 14, 7, 221, 251, 14, 7, 221, 250, 14, 7, 221, 249, 14, 7, 221, 248,
+ 14, 7, 221, 247, 14, 7, 221, 246, 14, 7, 221, 245, 14, 7, 221, 244, 14,
+ 7, 221, 243, 14, 7, 221, 242, 14, 7, 221, 241, 14, 7, 221, 240, 14, 7,
+ 221, 239, 14, 7, 221, 238, 14, 7, 221, 237, 14, 7, 221, 236, 14, 7, 221,
+ 235, 14, 7, 221, 234, 14, 7, 221, 233, 14, 7, 221, 232, 14, 7, 221, 231,
+ 14, 7, 221, 83, 14, 7, 221, 82, 14, 7, 221, 81, 14, 7, 221, 80, 14, 7,
+ 221, 79, 14, 7, 221, 78, 14, 7, 221, 77, 14, 7, 221, 76, 14, 7, 221, 75,
+ 14, 7, 221, 74, 14, 7, 221, 73, 14, 7, 221, 72, 14, 7, 221, 71, 14, 7,
+ 221, 70, 14, 7, 221, 69, 14, 7, 221, 68, 14, 7, 221, 67, 14, 7, 221, 66,
+ 14, 7, 221, 65, 14, 7, 221, 64, 14, 7, 221, 63, 14, 7, 221, 62, 14, 7,
+ 221, 61, 14, 7, 221, 60, 14, 7, 221, 59, 14, 7, 221, 58, 14, 7, 220, 173,
+ 14, 7, 220, 172, 14, 7, 220, 171, 14, 7, 220, 170, 14, 7, 220, 169, 14,
+ 7, 220, 168, 14, 7, 220, 167, 14, 7, 220, 166, 14, 7, 220, 165, 14, 7,
+ 220, 164, 14, 7, 220, 163, 14, 7, 220, 162, 14, 7, 220, 161, 14, 7, 220,
+ 160, 14, 7, 220, 159, 14, 7, 220, 158, 14, 7, 220, 157, 14, 7, 220, 156,
+ 14, 7, 220, 155, 14, 7, 220, 154, 14, 7, 220, 153, 14, 7, 220, 152, 14,
+ 7, 220, 151, 14, 7, 220, 150, 14, 7, 220, 149, 14, 7, 220, 148, 14, 7,
+ 220, 147, 14, 7, 220, 146, 14, 7, 220, 145, 14, 7, 220, 144, 14, 7, 220,
+ 143, 14, 7, 220, 142, 14, 7, 220, 141, 14, 7, 220, 140, 14, 7, 220, 139,
+ 14, 7, 220, 138, 14, 7, 220, 137, 14, 7, 220, 136, 14, 7, 220, 135, 14,
+ 7, 220, 134, 14, 7, 220, 133, 14, 7, 220, 132, 14, 7, 220, 131, 14, 7,
+ 220, 130, 14, 7, 220, 129, 14, 7, 220, 128, 14, 7, 220, 127, 14, 7, 220,
+ 126, 14, 7, 220, 125, 14, 7, 220, 124, 14, 7, 220, 123, 14, 7, 220, 122,
+ 14, 7, 220, 121, 14, 7, 220, 120, 14, 7, 220, 119, 14, 7, 220, 118, 14,
+ 7, 220, 117, 14, 7, 220, 116, 14, 7, 220, 115, 14, 7, 220, 114, 14, 7,
+ 220, 113, 14, 7, 220, 112, 14, 7, 220, 111, 14, 7, 220, 110, 14, 7, 220,
+ 109, 14, 7, 220, 108, 14, 7, 220, 107, 14, 7, 220, 106, 14, 7, 220, 105,
+ 14, 7, 220, 104, 14, 7, 220, 103, 14, 7, 220, 102, 14, 7, 220, 101, 14,
+ 7, 220, 100, 14, 7, 220, 99, 14, 7, 219, 183, 14, 7, 219, 182, 14, 7,
+ 219, 181, 14, 7, 219, 180, 14, 7, 219, 179, 14, 7, 219, 178, 14, 7, 219,
+ 177, 14, 7, 219, 176, 14, 7, 219, 175, 14, 7, 219, 174, 14, 7, 219, 173,
+ 14, 7, 219, 172, 14, 7, 219, 171, 14, 7, 217, 133, 14, 7, 217, 132, 14,
+ 7, 217, 131, 14, 7, 217, 130, 14, 7, 217, 129, 14, 7, 217, 128, 14, 7,
+ 217, 127, 14, 7, 216, 255, 14, 7, 216, 254, 14, 7, 216, 253, 14, 7, 216,
+ 252, 14, 7, 216, 251, 14, 7, 216, 250, 14, 7, 216, 249, 14, 7, 216, 248,
+ 14, 7, 216, 247, 14, 7, 216, 246, 14, 7, 216, 245, 14, 7, 216, 244, 14,
+ 7, 216, 243, 14, 7, 216, 242, 14, 7, 216, 241, 14, 7, 216, 240, 14, 7,
+ 216, 239, 14, 7, 216, 238, 14, 7, 216, 237, 14, 7, 216, 236, 14, 7, 216,
+ 235, 14, 7, 216, 234, 14, 7, 216, 233, 14, 7, 216, 232, 14, 7, 216, 231,
+ 14, 7, 216, 230, 14, 7, 216, 229, 14, 7, 216, 228, 14, 7, 216, 227, 14,
+ 7, 216, 226, 14, 7, 216, 225, 14, 7, 216, 224, 14, 7, 216, 223, 14, 7,
+ 216, 222, 14, 7, 215, 91, 14, 7, 215, 90, 14, 7, 215, 89, 14, 7, 215, 88,
+ 14, 7, 215, 87, 14, 7, 215, 86, 14, 7, 215, 85, 14, 7, 215, 84, 14, 7,
+ 215, 83, 14, 7, 215, 82, 14, 7, 215, 81, 14, 7, 215, 80, 14, 7, 215, 79,
+ 14, 7, 215, 78, 14, 7, 215, 77, 14, 7, 215, 76, 14, 7, 215, 75, 14, 7,
+ 215, 74, 14, 7, 215, 73, 14, 7, 215, 72, 14, 7, 215, 71, 14, 7, 215, 70,
+ 14, 7, 215, 69, 14, 7, 215, 68, 14, 7, 215, 67, 14, 7, 215, 66, 14, 7,
+ 215, 65, 14, 7, 215, 64, 14, 7, 215, 63, 14, 7, 215, 62, 14, 7, 215, 61,
+ 14, 7, 215, 60, 14, 7, 215, 59, 14, 7, 215, 58, 14, 7, 215, 57, 14, 7,
+ 215, 56, 14, 7, 215, 55, 14, 7, 215, 54, 14, 7, 215, 53, 14, 7, 215, 52,
+ 14, 7, 215, 51, 14, 7, 215, 50, 14, 7, 215, 49, 14, 7, 215, 48, 14, 7,
+ 215, 47, 14, 7, 215, 46, 14, 7, 215, 45, 14, 7, 215, 44, 14, 7, 215, 43,
+ 14, 7, 215, 42, 14, 7, 215, 41, 14, 7, 215, 40, 14, 7, 215, 39, 14, 7,
+ 215, 38, 14, 7, 210, 67, 14, 7, 210, 66, 14, 7, 210, 65, 14, 7, 210, 64,
+ 14, 7, 210, 63, 14, 7, 210, 62, 14, 7, 210, 61, 14, 7, 210, 60, 14, 7,
+ 210, 59, 14, 7, 210, 58, 14, 7, 210, 57, 14, 7, 210, 56, 14, 7, 210, 55,
+ 14, 7, 210, 54, 14, 7, 210, 53, 14, 7, 210, 52, 14, 7, 210, 51, 14, 7,
+ 210, 50, 14, 7, 210, 49, 14, 7, 210, 48, 14, 7, 210, 47, 14, 7, 210, 46,
+ 14, 7, 210, 45, 14, 7, 210, 44, 14, 7, 210, 43, 14, 7, 210, 42, 14, 7,
+ 210, 41, 14, 7, 210, 40, 14, 7, 210, 39, 14, 7, 210, 38, 14, 7, 210, 37,
+ 14, 7, 210, 36, 14, 7, 210, 35, 14, 7, 210, 34, 14, 7, 210, 33, 14, 7,
+ 210, 32, 14, 7, 210, 31, 14, 7, 210, 30, 14, 7, 210, 29, 14, 7, 210, 28,
+ 14, 7, 210, 27, 14, 7, 210, 26, 14, 7, 210, 25, 14, 7, 210, 24, 14, 7,
+ 207, 88, 14, 7, 207, 87, 14, 7, 207, 86, 14, 7, 207, 85, 14, 7, 207, 84,
+ 14, 7, 207, 83, 14, 7, 207, 82, 14, 7, 207, 81, 14, 7, 207, 80, 14, 7,
+ 207, 79, 14, 7, 207, 78, 14, 7, 207, 77, 14, 7, 207, 76, 14, 7, 207, 75,
+ 14, 7, 207, 74, 14, 7, 207, 73, 14, 7, 207, 72, 14, 7, 207, 71, 14, 7,
+ 207, 70, 14, 7, 207, 69, 14, 7, 207, 68, 14, 7, 207, 67, 14, 7, 207, 66,
+ 14, 7, 207, 65, 14, 7, 207, 64, 14, 7, 207, 63, 14, 7, 207, 62, 14, 7,
+ 207, 61, 14, 7, 207, 60, 14, 7, 207, 59, 14, 7, 207, 58, 14, 7, 207, 57,
+ 14, 7, 207, 56, 14, 7, 207, 55, 14, 7, 207, 54, 14, 7, 207, 53, 14, 7,
+ 207, 52, 14, 7, 207, 51, 14, 7, 207, 50, 14, 7, 207, 49, 14, 7, 207, 48,
+ 14, 7, 207, 47, 14, 7, 207, 46, 14, 7, 207, 45, 14, 7, 207, 44, 14, 7,
+ 207, 43, 14, 7, 207, 42, 14, 7, 206, 163, 14, 7, 206, 162, 14, 7, 206,
+ 161, 14, 7, 206, 160, 14, 7, 206, 159, 14, 7, 206, 158, 14, 7, 206, 157,
+ 14, 7, 206, 156, 14, 7, 206, 155, 14, 7, 206, 154, 14, 7, 206, 153, 14,
+ 7, 206, 152, 14, 7, 206, 151, 14, 7, 206, 150, 14, 7, 206, 149, 14, 7,
+ 206, 148, 14, 7, 206, 147, 14, 7, 206, 146, 14, 7, 206, 145, 14, 7, 206,
+ 144, 14, 7, 206, 143, 14, 7, 206, 142, 14, 7, 206, 141, 14, 7, 206, 140,
+ 14, 7, 206, 139, 14, 7, 206, 138, 14, 7, 206, 137, 14, 7, 206, 136, 14,
+ 7, 206, 135, 14, 7, 206, 134, 14, 7, 206, 133, 14, 7, 206, 132, 14, 7,
+ 206, 131, 14, 7, 206, 130, 14, 7, 206, 129, 14, 7, 206, 128, 14, 7, 206,
+ 127, 14, 7, 206, 126, 14, 7, 206, 125, 14, 7, 206, 124, 14, 7, 206, 123,
+ 14, 7, 206, 122, 14, 7, 206, 121, 14, 7, 206, 120, 14, 7, 206, 119, 14,
+ 7, 206, 118, 14, 7, 206, 117, 14, 7, 206, 116, 14, 7, 206, 115, 14, 7,
+ 206, 114, 14, 7, 206, 113, 14, 7, 206, 112, 14, 7, 206, 111, 14, 7, 206,
+ 110, 14, 7, 206, 109, 14, 7, 206, 108, 14, 7, 206, 107, 14, 7, 206, 106,
+ 14, 7, 206, 105, 14, 7, 206, 104, 14, 7, 206, 103, 14, 7, 206, 102, 14,
+ 7, 206, 101, 14, 7, 206, 100, 14, 7, 206, 99, 14, 7, 206, 98, 14, 7, 206,
+ 97, 14, 7, 206, 96, 14, 7, 206, 95, 14, 7, 206, 94, 14, 7, 206, 93, 14,
+ 7, 206, 92, 14, 7, 206, 91, 14, 7, 206, 90, 14, 7, 206, 89, 14, 7, 206,
+ 88, 14, 7, 206, 87, 14, 7, 204, 143, 14, 7, 204, 142, 14, 7, 204, 141,
+ 14, 7, 204, 140, 14, 7, 204, 139, 14, 7, 204, 138, 14, 7, 204, 137, 14,
+ 7, 204, 136, 14, 7, 204, 135, 14, 7, 204, 134, 14, 7, 204, 133, 14, 7,
+ 204, 132, 14, 7, 204, 131, 14, 7, 204, 130, 14, 7, 204, 129, 14, 7, 204,
+ 128, 14, 7, 204, 127, 14, 7, 204, 126, 14, 7, 204, 125, 14, 7, 204, 124,
+ 14, 7, 204, 123, 14, 7, 204, 122, 14, 7, 204, 121, 14, 7, 204, 120, 14,
+ 7, 204, 119, 14, 7, 204, 118, 14, 7, 204, 117, 14, 7, 204, 116, 14, 7,
+ 204, 115, 14, 7, 204, 114, 14, 7, 204, 113, 14, 7, 204, 112, 14, 7, 203,
+ 194, 14, 7, 203, 193, 14, 7, 203, 192, 14, 7, 203, 191, 14, 7, 203, 190,
+ 14, 7, 203, 189, 14, 7, 203, 188, 14, 7, 203, 187, 14, 7, 203, 186, 14,
+ 7, 203, 185, 14, 7, 203, 184, 14, 7, 203, 183, 14, 7, 203, 122, 14, 7,
+ 203, 121, 14, 7, 203, 120, 14, 7, 203, 119, 14, 7, 203, 118, 14, 7, 203,
+ 117, 14, 7, 203, 116, 14, 7, 203, 115, 14, 7, 203, 114, 14, 7, 202, 158,
+ 14, 7, 202, 157, 14, 7, 202, 156, 14, 7, 202, 155, 14, 7, 202, 154, 14,
+ 7, 202, 153, 14, 7, 202, 152, 14, 7, 202, 151, 14, 7, 202, 150, 14, 7,
+ 202, 149, 14, 7, 202, 148, 14, 7, 202, 147, 14, 7, 202, 146, 14, 7, 202,
+ 145, 14, 7, 202, 144, 14, 7, 202, 143, 14, 7, 202, 142, 14, 7, 202, 141,
+ 14, 7, 202, 140, 14, 7, 202, 139, 14, 7, 202, 138, 14, 7, 202, 137, 14,
+ 7, 202, 136, 14, 7, 202, 135, 14, 7, 202, 134, 14, 7, 202, 133, 14, 7,
+ 202, 132, 14, 7, 202, 131, 14, 7, 202, 130, 14, 7, 202, 129, 14, 7, 202,
+ 128, 14, 7, 202, 127, 14, 7, 202, 126, 14, 7, 202, 125, 14, 7, 202, 124,
+ 14, 7, 202, 123, 14, 7, 202, 122, 14, 7, 202, 121, 14, 7, 202, 120, 14,
+ 7, 202, 119, 14, 7, 202, 118, 14, 7, 252, 24, 14, 7, 252, 23, 14, 7, 252,
+ 22, 14, 7, 252, 21, 14, 7, 252, 20, 14, 7, 252, 19, 14, 7, 252, 18, 14,
+ 7, 252, 17, 14, 7, 252, 16, 14, 7, 252, 15, 14, 7, 252, 14, 14, 7, 252,
+ 13, 14, 7, 252, 12, 14, 7, 252, 11, 14, 7, 252, 10, 14, 7, 252, 9, 14, 7,
+ 252, 8, 14, 7, 252, 7, 14, 7, 252, 6, 14, 7, 252, 5, 14, 7, 252, 4, 14,
+ 7, 252, 3, 14, 7, 252, 2, 14, 7, 252, 1, 14, 7, 252, 0, 14, 7, 251, 255,
+ 14, 7, 251, 254, 14, 7, 251, 253, 14, 7, 251, 252, 14, 7, 251, 251, 14,
+ 7, 251, 250, 14, 7, 251, 249, 14, 7, 251, 248, 14, 7, 251, 247, 27, 7,
+ 255, 18, 27, 7, 255, 17, 27, 7, 255, 16, 27, 7, 255, 15, 27, 7, 255, 14,
+ 27, 7, 255, 12, 27, 7, 255, 9, 27, 7, 255, 8, 27, 7, 255, 7, 27, 7, 255,
+ 6, 27, 7, 255, 5, 27, 7, 255, 4, 27, 7, 255, 3, 27, 7, 255, 2, 27, 7,
+ 255, 1, 27, 7, 254, 255, 27, 7, 254, 254, 27, 7, 254, 253, 27, 7, 254,
+ 251, 27, 7, 254, 250, 27, 7, 254, 249, 27, 7, 254, 248, 27, 7, 254, 247,
+ 27, 7, 254, 246, 27, 7, 254, 245, 27, 7, 254, 244, 27, 7, 254, 243, 27,
+ 7, 254, 242, 27, 7, 254, 241, 27, 7, 254, 240, 27, 7, 254, 238, 27, 7,
+ 254, 237, 27, 7, 254, 236, 27, 7, 254, 235, 27, 7, 254, 233, 27, 7, 254,
+ 232, 27, 7, 254, 231, 27, 7, 254, 230, 27, 7, 254, 229, 27, 7, 254, 228,
+ 27, 7, 254, 227, 27, 7, 254, 226, 27, 7, 254, 225, 27, 7, 254, 223, 27,
+ 7, 254, 222, 27, 7, 254, 221, 27, 7, 254, 219, 27, 7, 254, 217, 27, 7,
+ 254, 216, 27, 7, 254, 215, 27, 7, 254, 214, 27, 7, 254, 213, 27, 7, 254,
+ 212, 27, 7, 254, 211, 27, 7, 254, 210, 27, 7, 254, 209, 27, 7, 254, 208,
+ 27, 7, 254, 207, 27, 7, 254, 206, 27, 7, 254, 205, 27, 7, 254, 204, 27,
+ 7, 254, 203, 27, 7, 254, 202, 27, 7, 254, 201, 27, 7, 254, 200, 27, 7,
+ 254, 199, 27, 7, 254, 198, 27, 7, 254, 197, 27, 7, 254, 196, 27, 7, 254,
+ 195, 27, 7, 254, 194, 27, 7, 254, 193, 27, 7, 254, 192, 27, 7, 254, 191,
+ 27, 7, 254, 190, 27, 7, 254, 189, 27, 7, 254, 188, 27, 7, 254, 187, 27,
+ 7, 254, 186, 27, 7, 254, 185, 27, 7, 254, 184, 27, 7, 254, 183, 27, 7,
+ 254, 182, 27, 7, 254, 181, 27, 7, 254, 180, 27, 7, 254, 179, 27, 7, 254,
+ 178, 27, 7, 254, 177, 27, 7, 254, 176, 27, 7, 254, 175, 27, 7, 254, 174,
+ 27, 7, 254, 173, 27, 7, 254, 172, 27, 7, 254, 171, 27, 7, 254, 170, 27,
+ 7, 254, 169, 27, 7, 254, 168, 27, 7, 254, 167, 27, 7, 254, 166, 27, 7,
+ 254, 165, 27, 7, 254, 164, 27, 7, 254, 163, 27, 7, 254, 162, 27, 7, 254,
+ 161, 27, 7, 254, 160, 27, 7, 254, 159, 27, 7, 254, 158, 27, 7, 254, 157,
+ 27, 7, 254, 156, 27, 7, 254, 155, 27, 7, 254, 154, 27, 7, 254, 153, 27,
+ 7, 254, 151, 27, 7, 254, 150, 27, 7, 254, 149, 27, 7, 254, 148, 27, 7,
+ 254, 147, 27, 7, 254, 146, 27, 7, 254, 145, 27, 7, 254, 144, 27, 7, 254,
+ 143, 27, 7, 254, 142, 27, 7, 254, 141, 27, 7, 254, 140, 27, 7, 254, 139,
+ 27, 7, 254, 138, 27, 7, 254, 137, 27, 7, 254, 136, 27, 7, 254, 135, 27,
+ 7, 254, 134, 27, 7, 254, 133, 27, 7, 254, 132, 27, 7, 254, 131, 27, 7,
+ 254, 130, 27, 7, 254, 129, 27, 7, 254, 128, 27, 7, 254, 127, 27, 7, 254,
+ 126, 27, 7, 254, 125, 27, 7, 254, 124, 27, 7, 254, 123, 27, 7, 254, 122,
+ 27, 7, 254, 121, 27, 7, 254, 120, 27, 7, 254, 119, 27, 7, 254, 118, 27,
+ 7, 254, 116, 27, 7, 254, 115, 27, 7, 254, 114, 27, 7, 254, 113, 27, 7,
+ 254, 112, 27, 7, 254, 111, 27, 7, 254, 110, 27, 7, 254, 109, 27, 7, 254,
+ 108, 27, 7, 254, 107, 27, 7, 254, 106, 27, 7, 254, 105, 27, 7, 254, 103,
+ 27, 7, 254, 102, 27, 7, 254, 101, 27, 7, 254, 100, 27, 7, 254, 99, 27, 7,
+ 254, 98, 27, 7, 254, 97, 27, 7, 254, 96, 27, 7, 254, 95, 27, 7, 254, 94,
+ 27, 7, 254, 93, 27, 7, 254, 92, 27, 7, 254, 91, 27, 7, 254, 90, 27, 7,
+ 254, 89, 27, 7, 254, 88, 27, 7, 254, 87, 27, 7, 254, 86, 27, 7, 254, 85,
+ 27, 7, 254, 84, 27, 7, 254, 83, 27, 7, 254, 82, 27, 7, 254, 81, 27, 7,
+ 254, 80, 27, 7, 254, 79, 27, 7, 254, 78, 27, 7, 254, 77, 27, 7, 254, 76,
+ 27, 7, 254, 75, 27, 7, 254, 74, 27, 7, 254, 73, 27, 7, 254, 72, 27, 7,
+ 254, 71, 27, 7, 254, 70, 27, 7, 254, 69, 27, 7, 254, 68, 27, 7, 254, 67,
+ 27, 7, 254, 66, 27, 7, 254, 65, 27, 7, 254, 64, 27, 7, 254, 63, 27, 7,
+ 254, 62, 27, 7, 254, 61, 27, 7, 254, 60, 27, 7, 254, 59, 27, 7, 254, 58,
+ 27, 7, 254, 57, 27, 7, 254, 56, 27, 7, 254, 55, 27, 7, 254, 54, 27, 7,
+ 254, 53, 27, 7, 254, 52, 27, 7, 254, 51, 27, 7, 254, 50, 27, 7, 254, 49,
+ 27, 7, 254, 48, 27, 7, 254, 47, 27, 7, 254, 46, 27, 7, 254, 45, 27, 7,
+ 254, 44, 27, 7, 254, 43, 27, 7, 254, 42, 27, 7, 254, 41, 27, 7, 254, 40,
+ 27, 7, 254, 39, 27, 7, 254, 38, 27, 7, 254, 37, 27, 7, 254, 36, 27, 7,
+ 254, 35, 27, 7, 254, 33, 27, 7, 254, 32, 27, 7, 254, 31, 27, 7, 254, 30,
+ 27, 7, 254, 29, 27, 7, 254, 28, 27, 7, 254, 27, 27, 7, 254, 26, 27, 7,
+ 254, 25, 27, 7, 254, 24, 27, 7, 254, 23, 27, 7, 254, 22, 27, 7, 254, 21,
+ 27, 7, 254, 20, 27, 7, 254, 19, 27, 7, 254, 18, 27, 7, 254, 17, 27, 7,
+ 254, 16, 27, 7, 254, 15, 27, 7, 254, 14, 27, 7, 254, 13, 27, 7, 254, 12,
+ 27, 7, 254, 11, 27, 7, 254, 10, 27, 7, 254, 9, 27, 7, 254, 8, 27, 7, 254,
+ 7, 27, 7, 254, 6, 27, 7, 254, 5, 27, 7, 254, 4, 27, 7, 254, 3, 27, 7,
+ 254, 2, 27, 7, 254, 1, 27, 7, 254, 0, 27, 7, 253, 255, 27, 7, 253, 254,
+ 27, 7, 253, 253, 27, 7, 253, 252, 27, 7, 253, 251, 27, 7, 253, 250, 27,
+ 7, 253, 249, 27, 7, 253, 248, 27, 7, 253, 247, 27, 7, 253, 246, 27, 7,
+ 253, 245, 27, 7, 253, 244, 27, 7, 253, 243, 27, 7, 253, 242, 27, 7, 253,
+ 241, 27, 7, 253, 240, 27, 7, 253, 239, 27, 7, 253, 238, 27, 7, 253, 237,
+ 27, 7, 253, 236, 27, 7, 253, 235, 27, 7, 253, 234, 27, 7, 253, 233, 27,
+ 7, 253, 232, 27, 7, 253, 231, 27, 7, 253, 230, 27, 7, 253, 229, 27, 7,
+ 253, 228, 27, 7, 253, 227, 27, 7, 253, 226, 27, 7, 253, 225, 27, 7, 253,
+ 224, 27, 7, 253, 223, 27, 7, 253, 222, 27, 7, 253, 221, 27, 7, 253, 220,
+ 27, 7, 253, 219, 27, 7, 253, 218, 27, 7, 253, 217, 27, 7, 253, 216, 27,
+ 7, 253, 215, 27, 7, 253, 214, 27, 7, 253, 213, 27, 7, 253, 212, 27, 7,
+ 253, 211, 27, 7, 253, 210, 27, 7, 253, 209, 27, 7, 253, 208, 27, 7, 253,
+ 207, 27, 7, 253, 206, 27, 7, 253, 205, 27, 7, 253, 204, 27, 7, 253, 203,
+ 27, 7, 253, 202, 27, 7, 253, 201, 27, 7, 253, 200, 27, 7, 253, 199, 27,
+ 7, 253, 198, 27, 7, 253, 197, 27, 7, 253, 196, 27, 7, 253, 195, 27, 7,
+ 253, 194, 27, 7, 253, 193, 27, 7, 253, 192, 27, 7, 253, 191, 27, 7, 253,
+ 190, 27, 7, 253, 189, 27, 7, 253, 188, 27, 7, 253, 187, 27, 7, 253, 186,
+ 27, 7, 253, 185, 27, 7, 253, 184, 27, 7, 253, 183, 27, 7, 253, 182, 27,
+ 7, 253, 181, 27, 7, 253, 180, 27, 7, 253, 179, 27, 7, 253, 177, 27, 7,
+ 253, 176, 27, 7, 253, 175, 27, 7, 253, 174, 27, 7, 253, 173, 27, 7, 253,
+ 172, 27, 7, 253, 171, 27, 7, 253, 170, 27, 7, 253, 169, 27, 7, 253, 168,
+ 27, 7, 253, 167, 27, 7, 253, 164, 27, 7, 253, 163, 27, 7, 253, 162, 27,
+ 7, 253, 161, 27, 7, 253, 157, 27, 7, 253, 156, 27, 7, 253, 155, 27, 7,
+ 253, 154, 27, 7, 253, 153, 27, 7, 253, 152, 27, 7, 253, 151, 27, 7, 253,
+ 150, 27, 7, 253, 149, 27, 7, 253, 148, 27, 7, 253, 147, 27, 7, 253, 146,
+ 27, 7, 253, 145, 27, 7, 253, 144, 27, 7, 253, 143, 27, 7, 253, 142, 27,
+ 7, 253, 141, 27, 7, 253, 140, 27, 7, 253, 139, 27, 7, 253, 137, 27, 7,
+ 253, 136, 27, 7, 253, 135, 27, 7, 253, 134, 27, 7, 253, 133, 27, 7, 253,
+ 132, 27, 7, 253, 131, 27, 7, 253, 130, 27, 7, 253, 129, 27, 7, 253, 128,
+ 27, 7, 253, 127, 27, 7, 253, 126, 27, 7, 253, 125, 27, 7, 253, 124, 27,
+ 7, 253, 123, 27, 7, 253, 122, 27, 7, 253, 121, 27, 7, 253, 120, 27, 7,
+ 253, 119, 27, 7, 253, 118, 27, 7, 253, 117, 27, 7, 253, 116, 27, 7, 253,
+ 115, 27, 7, 253, 114, 27, 7, 253, 113, 27, 7, 253, 112, 27, 7, 253, 111,
+ 27, 7, 253, 110, 27, 7, 253, 109, 27, 7, 253, 108, 27, 7, 253, 107, 27,
+ 7, 253, 106, 27, 7, 253, 105, 27, 7, 253, 104, 27, 7, 253, 103, 27, 7,
+ 253, 102, 27, 7, 253, 101, 27, 7, 253, 100, 27, 7, 253, 99, 27, 7, 253,
+ 98, 27, 7, 253, 97, 27, 7, 253, 96, 27, 7, 253, 95, 27, 7, 253, 94, 27,
+ 7, 253, 93, 27, 7, 253, 92, 27, 7, 253, 91, 27, 7, 253, 90, 27, 7, 253,
+ 89, 27, 7, 253, 88, 27, 7, 253, 87, 27, 7, 253, 86, 27, 7, 253, 85, 27,
+ 7, 253, 84, 27, 7, 253, 83, 27, 7, 253, 82, 27, 7, 253, 81, 27, 7, 253,
+ 80, 27, 7, 253, 79, 27, 7, 253, 78, 27, 7, 253, 77, 27, 7, 253, 76, 216,
+ 221, 219, 245, 216, 57, 27, 7, 253, 75, 27, 7, 253, 74, 27, 7, 253, 73,
+ 27, 7, 253, 72, 27, 7, 253, 71, 27, 7, 253, 70, 27, 7, 253, 69, 27, 7,
+ 253, 68, 27, 7, 253, 67, 27, 7, 253, 66, 27, 7, 253, 65, 27, 7, 253, 64,
+ 199, 27, 7, 253, 63, 27, 7, 253, 62, 27, 7, 253, 61, 27, 7, 253, 60, 27,
+ 7, 253, 59, 27, 7, 253, 58, 27, 7, 253, 57, 27, 7, 253, 55, 27, 7, 253,
+ 53, 27, 7, 253, 51, 27, 7, 253, 49, 27, 7, 253, 47, 27, 7, 253, 45, 27,
+ 7, 253, 43, 27, 7, 253, 41, 27, 7, 253, 39, 27, 7, 253, 37, 248, 142,
+ 227, 36, 82, 27, 7, 253, 35, 241, 84, 227, 36, 82, 27, 7, 253, 34, 27, 7,
+ 253, 32, 27, 7, 253, 30, 27, 7, 253, 28, 27, 7, 253, 26, 27, 7, 253, 24,
+ 27, 7, 253, 22, 27, 7, 253, 20, 27, 7, 253, 18, 27, 7, 253, 17, 27, 7,
+ 253, 16, 27, 7, 253, 15, 27, 7, 253, 14, 27, 7, 253, 13, 27, 7, 253, 12,
+ 27, 7, 253, 11, 27, 7, 253, 10, 27, 7, 253, 9, 27, 7, 253, 8, 27, 7, 253,
+ 7, 27, 7, 253, 6, 27, 7, 253, 5, 27, 7, 253, 4, 27, 7, 253, 3, 27, 7,
+ 253, 2, 27, 7, 253, 1, 27, 7, 253, 0, 27, 7, 252, 255, 27, 7, 252, 254,
+ 27, 7, 252, 253, 27, 7, 252, 252, 27, 7, 252, 251, 27, 7, 252, 250, 27,
+ 7, 252, 249, 27, 7, 252, 248, 27, 7, 252, 247, 27, 7, 252, 246, 27, 7,
+ 252, 245, 27, 7, 252, 244, 27, 7, 252, 243, 27, 7, 252, 242, 27, 7, 252,
+ 241, 27, 7, 252, 240, 27, 7, 252, 239, 27, 7, 252, 238, 27, 7, 252, 237,
+ 27, 7, 252, 236, 27, 7, 252, 235, 27, 7, 252, 234, 27, 7, 252, 233, 27,
+ 7, 252, 232, 27, 7, 252, 231, 27, 7, 252, 230, 27, 7, 252, 229, 27, 7,
+ 252, 228, 27, 7, 252, 227, 27, 7, 252, 226, 27, 7, 252, 225, 27, 7, 252,
+ 224, 27, 7, 252, 223, 27, 7, 252, 222, 27, 7, 252, 221, 27, 7, 252, 220,
+ 27, 7, 252, 219, 27, 7, 252, 218, 27, 7, 252, 217, 27, 7, 252, 216, 27,
+ 7, 252, 215, 27, 7, 252, 214, 27, 7, 252, 213, 27, 7, 252, 212, 27, 7,
+ 252, 211, 27, 7, 252, 210, 27, 7, 252, 209, 27, 7, 252, 208, 27, 7, 252,
+ 207, 27, 7, 252, 206, 27, 7, 252, 205, 27, 7, 252, 204, 27, 7, 252, 203,
+ 27, 7, 252, 202, 27, 7, 252, 201, 27, 7, 252, 200, 27, 7, 252, 199, 27,
+ 7, 252, 198, 27, 7, 252, 197, 27, 7, 252, 196, 27, 7, 252, 195, 27, 7,
+ 252, 194, 27, 7, 252, 193, 27, 7, 252, 192, 27, 7, 252, 191, 27, 7, 252,
+ 190, 27, 7, 252, 189, 27, 7, 252, 188, 27, 7, 252, 187, 27, 7, 252, 186,
+ 27, 7, 252, 185, 27, 7, 252, 184, 27, 7, 252, 183, 27, 7, 252, 182, 27,
+ 7, 252, 181, 27, 7, 252, 180, 27, 7, 252, 179, 27, 7, 252, 178, 27, 7,
+ 252, 177, 27, 7, 252, 176, 27, 7, 252, 175, 27, 7, 252, 174, 27, 7, 252,
+ 173, 27, 7, 252, 172, 27, 7, 252, 171, 27, 7, 252, 170, 27, 7, 252, 169,
+ 27, 7, 252, 168, 27, 7, 252, 167, 27, 7, 252, 166, 27, 7, 252, 165, 27,
+ 7, 252, 164, 24, 1, 218, 198, 222, 136, 224, 197, 24, 1, 218, 198, 238,
+ 198, 239, 178, 24, 1, 218, 198, 218, 47, 224, 198, 218, 115, 24, 1, 218,
+ 198, 218, 47, 224, 198, 218, 116, 24, 1, 218, 198, 223, 107, 224, 197,
+ 24, 1, 218, 198, 212, 195, 24, 1, 218, 198, 208, 199, 224, 197, 24, 1,
+ 218, 198, 220, 215, 224, 197, 24, 1, 218, 198, 212, 254, 219, 169, 222,
+ 32, 24, 1, 218, 198, 218, 47, 219, 169, 222, 33, 218, 115, 24, 1, 218,
+ 198, 218, 47, 219, 169, 222, 33, 218, 116, 24, 1, 218, 198, 225, 156, 24,
+ 1, 218, 198, 207, 204, 225, 157, 24, 1, 218, 198, 222, 197, 24, 1, 218,
+ 198, 225, 153, 24, 1, 218, 198, 225, 111, 24, 1, 218, 198, 223, 186, 24,
+ 1, 218, 198, 213, 114, 24, 1, 218, 198, 221, 91, 24, 1, 218, 198, 229,
+ 163, 24, 1, 218, 198, 222, 0, 24, 1, 218, 198, 210, 179, 24, 1, 218, 198,
+ 222, 135, 24, 1, 218, 198, 228, 10, 24, 1, 218, 198, 227, 176, 228, 175,
+ 24, 1, 218, 198, 221, 101, 224, 205, 24, 1, 218, 198, 225, 160, 24, 1,
+ 218, 198, 219, 62, 24, 1, 218, 198, 238, 100, 24, 1, 218, 198, 219, 125,
+ 24, 1, 218, 198, 224, 55, 222, 170, 24, 1, 218, 198, 220, 196, 224, 208,
+ 24, 1, 218, 198, 106, 202, 188, 223, 100, 24, 1, 218, 198, 238, 101, 24,
+ 1, 218, 198, 221, 101, 221, 102, 24, 1, 218, 198, 212, 91, 24, 1, 218,
+ 198, 224, 190, 24, 1, 218, 198, 224, 211, 24, 1, 218, 198, 224, 31, 24,
+ 1, 218, 198, 230, 21, 24, 1, 218, 198, 219, 169, 227, 223, 24, 1, 218,
+ 198, 223, 26, 227, 223, 24, 1, 218, 198, 218, 219, 24, 1, 218, 198, 225,
+ 154, 24, 1, 218, 198, 222, 74, 24, 1, 218, 198, 217, 172, 24, 1, 218,
+ 198, 207, 201, 24, 1, 218, 198, 226, 235, 24, 1, 218, 198, 211, 251, 24,
+ 1, 218, 198, 209, 117, 24, 1, 218, 198, 225, 151, 24, 1, 218, 198, 229,
+ 170, 24, 1, 218, 198, 223, 22, 24, 1, 218, 198, 228, 188, 24, 1, 218,
+ 198, 224, 32, 24, 1, 218, 198, 212, 191, 24, 1, 218, 198, 227, 29, 24, 1,
+ 218, 198, 239, 246, 24, 1, 218, 198, 215, 211, 24, 1, 218, 198, 228, 233,
+ 24, 1, 218, 198, 211, 247, 24, 1, 218, 198, 225, 107, 218, 157, 24, 1,
+ 218, 198, 212, 247, 24, 1, 218, 198, 221, 100, 24, 1, 218, 198, 212, 230,
+ 221, 111, 202, 196, 24, 1, 218, 198, 220, 237, 224, 51, 24, 1, 218, 198,
+ 219, 164, 24, 1, 218, 198, 222, 2, 24, 1, 218, 198, 206, 231, 24, 1, 218,
+ 198, 222, 173, 24, 1, 218, 198, 225, 150, 24, 1, 218, 198, 222, 44, 24,
+ 1, 218, 198, 225, 49, 24, 1, 218, 198, 220, 251, 24, 1, 218, 198, 209,
+ 121, 24, 1, 218, 198, 211, 244, 24, 1, 218, 198, 219, 165, 24, 1, 218,
+ 198, 221, 115, 24, 1, 218, 198, 225, 158, 24, 1, 218, 198, 220, 248, 24,
+ 1, 218, 198, 229, 241, 24, 1, 218, 198, 221, 118, 24, 1, 218, 198, 206,
+ 50, 24, 1, 218, 198, 226, 239, 24, 1, 218, 198, 222, 230, 24, 1, 218,
+ 198, 223, 75, 24, 1, 218, 198, 225, 48, 24, 1, 218, 197, 221, 113, 24, 1,
+ 218, 197, 207, 204, 225, 155, 24, 1, 218, 197, 212, 152, 24, 1, 218, 197,
+ 213, 118, 207, 203, 24, 1, 218, 197, 227, 31, 221, 97, 24, 1, 218, 197,
+ 225, 55, 225, 159, 24, 1, 218, 197, 229, 92, 24, 1, 218, 197, 203, 18,
+ 24, 1, 218, 197, 225, 50, 24, 1, 218, 197, 230, 7, 24, 1, 218, 197, 219,
+ 19, 24, 1, 218, 197, 203, 96, 227, 223, 24, 1, 218, 197, 228, 29, 221,
+ 111, 221, 6, 24, 1, 218, 197, 221, 94, 213, 17, 24, 1, 218, 197, 222,
+ 249, 222, 47, 24, 1, 218, 197, 238, 98, 24, 1, 218, 197, 218, 105, 24, 1,
+ 218, 197, 207, 204, 221, 109, 24, 1, 218, 197, 213, 22, 222, 42, 24, 1,
+ 218, 197, 213, 18, 24, 1, 218, 197, 224, 198, 209, 120, 24, 1, 218, 197,
+ 225, 37, 225, 51, 24, 1, 218, 197, 220, 249, 221, 97, 24, 1, 218, 197,
+ 229, 159, 24, 1, 218, 197, 238, 99, 24, 1, 218, 197, 229, 155, 24, 1,
+ 218, 197, 228, 107, 24, 1, 218, 197, 219, 65, 24, 1, 218, 197, 205, 237,
+ 24, 1, 218, 197, 222, 137, 223, 184, 24, 1, 218, 197, 222, 172, 225, 33,
+ 24, 1, 218, 197, 203, 215, 24, 1, 218, 197, 215, 12, 24, 1, 218, 197,
+ 210, 14, 24, 1, 218, 197, 224, 210, 24, 1, 218, 197, 222, 156, 24, 1,
+ 218, 197, 222, 157, 228, 7, 24, 1, 218, 197, 224, 200, 24, 1, 218, 197,
+ 210, 230, 24, 1, 218, 197, 225, 41, 24, 1, 218, 197, 224, 36, 24, 1, 218,
+ 197, 221, 9, 24, 1, 218, 197, 217, 176, 24, 1, 218, 197, 224, 209, 222,
+ 174, 24, 1, 218, 197, 240, 31, 24, 1, 218, 197, 225, 28, 24, 1, 218, 197,
+ 240, 53, 24, 1, 218, 197, 229, 167, 24, 1, 218, 197, 225, 177, 222, 36,
+ 24, 1, 218, 197, 225, 177, 222, 12, 24, 1, 218, 197, 227, 175, 24, 1,
+ 218, 197, 222, 180, 24, 1, 218, 197, 221, 120, 24, 1, 218, 197, 192, 24,
+ 1, 218, 197, 229, 77, 24, 1, 218, 197, 222, 125, 24, 1, 168, 222, 136,
+ 225, 157, 24, 1, 168, 220, 214, 24, 1, 168, 202, 196, 24, 1, 168, 204,
+ 95, 24, 1, 168, 222, 173, 24, 1, 168, 223, 14, 24, 1, 168, 222, 143, 24,
+ 1, 168, 238, 108, 24, 1, 168, 225, 45, 24, 1, 168, 238, 205, 24, 1, 168,
+ 220, 239, 224, 91, 224, 212, 24, 1, 168, 221, 89, 225, 36, 24, 1, 168,
+ 225, 42, 24, 1, 168, 218, 111, 24, 1, 168, 222, 255, 24, 1, 168, 225, 53,
+ 247, 88, 24, 1, 168, 229, 157, 24, 1, 168, 238, 109, 24, 1, 168, 229,
+ 164, 24, 1, 168, 202, 214, 223, 215, 24, 1, 168, 220, 208, 24, 1, 168,
+ 225, 30, 24, 1, 168, 221, 119, 24, 1, 168, 225, 36, 24, 1, 168, 203, 19,
+ 24, 1, 168, 228, 241, 24, 1, 168, 230, 41, 24, 1, 168, 213, 113, 24, 1,
+ 168, 223, 8, 24, 1, 168, 210, 12, 24, 1, 168, 222, 16, 24, 1, 168, 208,
+ 199, 202, 199, 24, 1, 168, 211, 5, 24, 1, 168, 222, 163, 221, 6, 24, 1,
+ 168, 205, 236, 24, 1, 168, 223, 78, 24, 1, 168, 225, 177, 229, 166, 24,
+ 1, 168, 221, 102, 24, 1, 168, 222, 158, 24, 1, 168, 228, 11, 24, 1, 168,
+ 225, 38, 24, 1, 168, 224, 189, 24, 1, 168, 221, 96, 24, 1, 168, 209, 116,
+ 24, 1, 168, 222, 160, 24, 1, 168, 239, 106, 24, 1, 168, 223, 13, 24, 1,
+ 168, 221, 121, 24, 1, 168, 221, 117, 24, 1, 168, 247, 169, 24, 1, 168,
+ 205, 238, 24, 1, 168, 225, 43, 24, 1, 168, 215, 145, 24, 1, 168, 222, 46,
+ 24, 1, 168, 228, 28, 24, 1, 168, 208, 196, 24, 1, 168, 221, 103, 222,
+ 125, 24, 1, 168, 222, 38, 24, 1, 168, 229, 170, 24, 1, 168, 222, 165, 24,
+ 1, 168, 225, 150, 24, 1, 168, 225, 31, 24, 1, 168, 226, 239, 24, 1, 168,
+ 228, 175, 24, 1, 168, 222, 44, 24, 1, 168, 222, 125, 24, 1, 168, 203,
+ 205, 24, 1, 168, 222, 161, 24, 1, 168, 221, 106, 24, 1, 168, 221, 98, 24,
+ 1, 168, 228, 190, 222, 2, 24, 1, 168, 221, 104, 24, 1, 168, 223, 21, 24,
+ 1, 168, 225, 177, 221, 109, 24, 1, 168, 203, 110, 24, 1, 168, 223, 20,
+ 24, 1, 168, 212, 194, 24, 1, 168, 213, 116, 24, 1, 168, 225, 39, 24, 1,
+ 168, 225, 157, 24, 1, 168, 225, 49, 24, 1, 168, 229, 158, 24, 1, 168,
+ 225, 40, 24, 1, 168, 229, 162, 24, 1, 168, 225, 53, 218, 162, 24, 1, 168,
+ 202, 179, 24, 1, 168, 222, 34, 24, 1, 168, 224, 144, 24, 1, 168, 223,
+ 244, 24, 1, 168, 212, 250, 24, 1, 168, 229, 181, 227, 246, 24, 1, 168,
+ 229, 181, 240, 66, 24, 1, 168, 222, 195, 24, 1, 168, 223, 75, 24, 1, 168,
+ 227, 96, 24, 1, 168, 218, 123, 24, 1, 168, 219, 9, 24, 1, 168, 209, 132,
+ 24, 1, 134, 225, 29, 24, 1, 134, 204, 93, 24, 1, 134, 222, 32, 24, 1,
+ 134, 224, 197, 24, 1, 134, 222, 30, 24, 1, 134, 227, 141, 24, 1, 134,
+ 222, 35, 24, 1, 134, 221, 116, 24, 1, 134, 222, 179, 24, 1, 134, 221, 6,
+ 24, 1, 134, 203, 216, 24, 1, 134, 222, 133, 24, 1, 134, 213, 41, 24, 1,
+ 134, 222, 144, 24, 1, 134, 229, 165, 24, 1, 134, 209, 118, 24, 1, 134,
+ 213, 20, 24, 1, 134, 222, 43, 24, 1, 134, 210, 230, 24, 1, 134, 229, 170,
+ 24, 1, 134, 203, 98, 24, 1, 134, 228, 191, 24, 1, 134, 214, 233, 24, 1,
+ 134, 224, 202, 24, 1, 134, 223, 12, 24, 1, 134, 225, 125, 24, 1, 134,
+ 224, 208, 24, 1, 134, 213, 115, 24, 1, 134, 203, 42, 24, 1, 134, 222, 37,
+ 24, 1, 134, 229, 161, 225, 32, 24, 1, 134, 222, 140, 24, 1, 134, 207,
+ 203, 24, 1, 134, 238, 118, 24, 1, 134, 222, 130, 24, 1, 134, 240, 32, 24,
+ 1, 134, 223, 16, 24, 1, 134, 224, 181, 24, 1, 134, 227, 169, 24, 1, 134,
+ 222, 254, 24, 1, 134, 224, 50, 24, 1, 134, 224, 185, 24, 1, 134, 217,
+ 156, 24, 1, 134, 224, 183, 24, 1, 134, 224, 199, 24, 1, 134, 226, 222,
+ 24, 1, 134, 221, 108, 24, 1, 134, 225, 52, 24, 1, 134, 228, 165, 24, 1,
+ 134, 220, 251, 24, 1, 134, 209, 121, 24, 1, 134, 211, 244, 24, 1, 134,
+ 202, 179, 24, 1, 134, 229, 162, 24, 1, 134, 216, 201, 24, 1, 134, 209,
+ 175, 24, 1, 134, 222, 141, 24, 1, 134, 224, 204, 24, 1, 134, 221, 107,
+ 24, 1, 134, 229, 160, 24, 1, 134, 218, 117, 24, 1, 134, 218, 213, 24, 1,
+ 134, 220, 225, 24, 1, 134, 227, 175, 24, 1, 134, 222, 180, 24, 1, 134,
+ 224, 201, 24, 1, 134, 222, 153, 24, 1, 134, 202, 193, 24, 1, 134, 219,
+ 96, 24, 1, 134, 202, 192, 24, 1, 134, 223, 21, 24, 1, 134, 221, 97, 24,
+ 1, 134, 211, 7, 24, 1, 134, 228, 195, 24, 1, 134, 222, 169, 24, 1, 134,
+ 222, 138, 24, 1, 134, 207, 185, 24, 1, 134, 224, 212, 24, 1, 134, 228,
+ 185, 24, 1, 134, 221, 105, 24, 1, 134, 209, 119, 24, 1, 134, 225, 152,
+ 24, 1, 134, 222, 178, 24, 1, 134, 227, 168, 24, 1, 134, 222, 159, 24, 1,
+ 134, 221, 110, 24, 1, 134, 222, 16, 24, 1, 134, 238, 102, 24, 1, 134,
+ 228, 209, 24, 1, 134, 216, 108, 220, 45, 24, 1, 134, 210, 1, 24, 1, 134,
+ 208, 141, 24, 1, 134, 220, 248, 24, 1, 134, 216, 3, 24, 1, 134, 227, 225,
+ 24, 1, 134, 225, 7, 24, 1, 134, 226, 185, 24, 1, 134, 210, 179, 24, 1,
+ 134, 223, 246, 24, 1, 134, 213, 6, 24, 1, 134, 213, 16, 24, 1, 134, 228,
+ 137, 24, 1, 134, 221, 84, 24, 1, 134, 212, 199, 24, 1, 134, 221, 99, 24,
+ 1, 134, 219, 23, 24, 1, 134, 222, 100, 24, 1, 134, 212, 229, 24, 1, 134,
+ 217, 171, 24, 1, 134, 223, 184, 24, 1, 134, 227, 10, 24, 1, 134, 216,
+ 108, 223, 239, 24, 1, 134, 209, 2, 24, 1, 134, 221, 86, 24, 1, 134, 225,
+ 53, 213, 111, 24, 1, 134, 214, 231, 24, 1, 134, 240, 107, 24, 1, 93, 223,
+ 20, 24, 1, 93, 208, 147, 24, 1, 93, 225, 42, 24, 1, 93, 228, 11, 24, 1,
+ 93, 205, 177, 24, 1, 93, 227, 16, 24, 1, 93, 219, 168, 24, 1, 93, 211,
+ 255, 24, 1, 93, 216, 176, 24, 1, 93, 221, 112, 24, 1, 93, 222, 247, 24,
+ 1, 93, 217, 188, 24, 1, 93, 209, 232, 24, 1, 93, 222, 146, 24, 1, 93,
+ 228, 237, 24, 1, 93, 203, 208, 24, 1, 93, 214, 165, 24, 1, 93, 222, 170,
+ 24, 1, 93, 219, 165, 24, 1, 93, 208, 148, 24, 1, 93, 228, 189, 24, 1, 93,
+ 227, 30, 24, 1, 93, 221, 115, 24, 1, 93, 222, 122, 24, 1, 93, 225, 158,
+ 24, 1, 93, 222, 139, 24, 1, 93, 222, 121, 24, 1, 93, 221, 114, 24, 1, 93,
+ 216, 0, 24, 1, 93, 222, 34, 24, 1, 93, 219, 21, 24, 1, 93, 215, 33, 24,
+ 1, 93, 222, 154, 24, 1, 93, 224, 191, 24, 1, 93, 238, 96, 24, 1, 93, 222,
+ 142, 24, 1, 93, 222, 45, 24, 1, 93, 225, 106, 24, 1, 93, 227, 12, 24, 1,
+ 93, 222, 175, 24, 1, 93, 223, 4, 24, 1, 93, 210, 0, 221, 97, 24, 1, 93,
+ 213, 117, 24, 1, 93, 217, 181, 24, 1, 93, 223, 24, 212, 6, 24, 1, 93,
+ 222, 162, 221, 6, 24, 1, 93, 203, 7, 24, 1, 93, 238, 97, 24, 1, 93, 207,
+ 202, 24, 1, 93, 203, 22, 24, 1, 93, 218, 69, 24, 1, 93, 207, 190, 24, 1,
+ 93, 229, 168, 24, 1, 93, 211, 6, 24, 1, 93, 209, 120, 24, 1, 93, 205,
+ 239, 24, 1, 93, 204, 43, 24, 1, 93, 228, 110, 24, 1, 93, 217, 191, 24, 1,
+ 93, 210, 13, 24, 1, 93, 238, 117, 24, 1, 93, 222, 185, 24, 1, 93, 213,
+ 19, 24, 1, 93, 224, 186, 24, 1, 93, 225, 46, 24, 1, 93, 220, 212, 24, 1,
+ 93, 221, 254, 24, 1, 93, 238, 201, 24, 1, 93, 207, 191, 24, 1, 93, 228,
+ 199, 24, 1, 93, 203, 74, 24, 1, 93, 220, 249, 246, 32, 24, 1, 93, 202,
+ 253, 24, 1, 93, 224, 203, 24, 1, 93, 223, 9, 24, 1, 93, 218, 158, 24, 1,
+ 93, 202, 198, 24, 1, 93, 227, 170, 24, 1, 93, 239, 106, 24, 1, 93, 238,
+ 200, 24, 1, 93, 222, 132, 24, 1, 93, 229, 170, 24, 1, 93, 225, 161, 24,
+ 1, 93, 222, 145, 24, 1, 93, 238, 103, 24, 1, 93, 240, 108, 24, 1, 93,
+ 221, 87, 24, 1, 93, 218, 214, 24, 1, 93, 203, 20, 24, 1, 93, 222, 171,
+ 24, 1, 93, 220, 249, 248, 103, 24, 1, 93, 220, 192, 24, 1, 93, 218, 43,
+ 24, 1, 93, 224, 144, 24, 1, 93, 239, 104, 24, 1, 93, 223, 100, 24, 1, 93,
+ 223, 244, 24, 1, 93, 238, 102, 24, 1, 93, 239, 109, 75, 24, 1, 93, 223,
+ 185, 24, 1, 93, 217, 187, 24, 1, 93, 222, 134, 24, 1, 93, 228, 175, 24,
+ 1, 93, 218, 155, 24, 1, 93, 221, 100, 24, 1, 93, 203, 21, 24, 1, 93, 222,
+ 155, 24, 1, 93, 219, 169, 218, 252, 24, 1, 93, 239, 109, 247, 71, 24, 1,
+ 93, 239, 179, 24, 1, 93, 222, 39, 24, 1, 93, 63, 24, 1, 93, 208, 141, 24,
+ 1, 93, 78, 24, 1, 93, 75, 24, 1, 93, 228, 9, 24, 1, 93, 219, 169, 218,
+ 77, 24, 1, 93, 210, 18, 24, 1, 93, 209, 219, 24, 1, 93, 223, 24, 223,
+ 172, 236, 38, 24, 1, 93, 212, 250, 24, 1, 93, 203, 17, 24, 1, 93, 222,
+ 115, 24, 1, 93, 202, 203, 24, 1, 93, 202, 230, 210, 159, 24, 1, 93, 202,
+ 230, 245, 151, 24, 1, 93, 202, 187, 24, 1, 93, 202, 195, 24, 1, 93, 229,
+ 156, 24, 1, 93, 218, 212, 24, 1, 93, 222, 40, 241, 39, 24, 1, 93, 217,
+ 183, 24, 1, 93, 203, 214, 24, 1, 93, 240, 53, 24, 1, 93, 206, 50, 24, 1,
+ 93, 226, 239, 24, 1, 93, 224, 155, 24, 1, 93, 216, 75, 24, 1, 93, 216,
+ 202, 24, 1, 93, 222, 114, 24, 1, 93, 222, 203, 24, 1, 93, 212, 242, 24,
+ 1, 93, 212, 229, 24, 1, 93, 239, 109, 216, 111, 24, 1, 93, 201, 201, 24,
+ 1, 93, 218, 167, 24, 1, 93, 227, 10, 24, 1, 93, 229, 26, 24, 1, 93, 224,
+ 240, 24, 1, 93, 192, 24, 1, 93, 225, 103, 24, 1, 93, 209, 122, 24, 1, 93,
+ 229, 100, 24, 1, 93, 224, 54, 24, 1, 93, 209, 152, 24, 1, 93, 240, 77,
+ 24, 1, 93, 238, 90, 24, 1, 218, 196, 173, 24, 1, 218, 196, 68, 24, 1,
+ 218, 196, 228, 209, 24, 1, 218, 196, 241, 161, 24, 1, 218, 196, 216, 135,
+ 24, 1, 218, 196, 210, 1, 24, 1, 218, 196, 220, 248, 24, 1, 218, 196, 228,
+ 113, 24, 1, 218, 196, 216, 3, 24, 1, 218, 196, 216, 50, 24, 1, 218, 196,
+ 225, 7, 24, 1, 218, 196, 210, 18, 24, 1, 218, 196, 223, 23, 24, 1, 218,
+ 196, 222, 46, 24, 1, 218, 196, 226, 185, 24, 1, 218, 196, 210, 179, 24,
+ 1, 218, 196, 213, 6, 24, 1, 218, 196, 212, 162, 24, 1, 218, 196, 213,
+ 113, 24, 1, 218, 196, 228, 137, 24, 1, 218, 196, 229, 170, 24, 1, 218,
+ 196, 221, 55, 24, 1, 218, 196, 221, 84, 24, 1, 218, 196, 222, 17, 24, 1,
+ 218, 196, 202, 229, 24, 1, 218, 196, 212, 199, 24, 1, 218, 196, 198, 24,
+ 1, 218, 196, 221, 118, 24, 1, 218, 196, 218, 212, 24, 1, 218, 196, 221,
+ 99, 24, 1, 218, 196, 203, 214, 24, 1, 218, 196, 219, 23, 24, 1, 218, 196,
+ 215, 145, 24, 1, 218, 196, 222, 100, 24, 1, 218, 196, 216, 75, 24, 1,
+ 218, 196, 229, 180, 24, 1, 218, 196, 222, 131, 24, 1, 218, 196, 222, 182,
+ 24, 1, 218, 196, 212, 242, 24, 1, 218, 196, 217, 188, 24, 1, 218, 196,
+ 239, 179, 24, 1, 218, 196, 204, 111, 24, 1, 218, 196, 227, 148, 24, 1,
+ 218, 196, 227, 10, 24, 1, 218, 196, 229, 26, 24, 1, 218, 196, 225, 44,
+ 24, 1, 218, 196, 216, 107, 24, 1, 218, 196, 192, 24, 1, 218, 196, 224,
+ 82, 24, 1, 218, 196, 225, 52, 24, 1, 218, 196, 209, 132, 24, 1, 218, 196,
+ 228, 244, 24, 1, 218, 196, 214, 251, 24, 1, 218, 196, 204, 162, 223, 249,
+ 1, 210, 22, 223, 249, 1, 222, 151, 223, 249, 1, 202, 247, 223, 249, 1,
+ 224, 112, 223, 249, 1, 249, 32, 223, 249, 1, 244, 212, 223, 249, 1, 63,
+ 223, 249, 1, 218, 192, 223, 249, 1, 229, 139, 223, 249, 1, 237, 95, 223,
+ 249, 1, 244, 188, 223, 249, 1, 246, 98, 223, 249, 1, 229, 200, 223, 249,
+ 1, 220, 46, 223, 249, 1, 225, 158, 223, 249, 1, 222, 68, 223, 249, 1,
+ 185, 223, 249, 1, 220, 18, 223, 249, 1, 78, 223, 249, 1, 215, 227, 223,
+ 249, 1, 213, 11, 223, 249, 1, 209, 91, 223, 249, 1, 241, 189, 223, 249,
+ 1, 204, 111, 223, 249, 1, 74, 223, 249, 1, 229, 26, 223, 249, 1, 228, 17,
+ 223, 249, 1, 228, 113, 223, 249, 1, 237, 147, 223, 249, 1, 216, 57, 223,
+ 249, 1, 209, 165, 223, 249, 17, 202, 84, 223, 249, 17, 105, 223, 249, 17,
+ 108, 223, 249, 17, 147, 223, 249, 17, 149, 223, 249, 17, 170, 223, 249,
+ 17, 195, 223, 249, 17, 213, 111, 223, 249, 17, 199, 223, 249, 17, 222,
+ 63, 223, 249, 244, 166, 223, 249, 52, 244, 166, 248, 212, 206, 83, 1,
+ 241, 74, 248, 212, 206, 83, 1, 173, 248, 212, 206, 83, 1, 214, 177, 248,
+ 212, 206, 83, 1, 240, 108, 248, 212, 206, 83, 1, 225, 47, 248, 212, 206,
+ 83, 1, 203, 8, 248, 212, 206, 83, 1, 238, 249, 248, 212, 206, 83, 1, 243,
+ 238, 248, 212, 206, 83, 1, 228, 243, 248, 212, 206, 83, 1, 230, 101, 248,
+ 212, 206, 83, 1, 235, 253, 248, 212, 206, 83, 1, 204, 111, 248, 212, 206,
+ 83, 1, 202, 17, 248, 212, 206, 83, 1, 238, 194, 248, 212, 206, 83, 1,
+ 243, 113, 248, 212, 206, 83, 1, 246, 238, 248, 212, 206, 83, 1, 206, 171,
+ 248, 212, 206, 83, 1, 135, 248, 212, 206, 83, 1, 249, 32, 248, 212, 206,
+ 83, 1, 204, 163, 248, 212, 206, 83, 1, 203, 46, 248, 212, 206, 83, 1,
+ 185, 248, 212, 206, 83, 1, 204, 108, 248, 212, 206, 83, 1, 63, 248, 212,
+ 206, 83, 1, 78, 248, 212, 206, 83, 1, 220, 18, 248, 212, 206, 83, 1, 68,
+ 248, 212, 206, 83, 1, 241, 161, 248, 212, 206, 83, 1, 74, 248, 212, 206,
+ 83, 1, 75, 248, 212, 206, 83, 39, 138, 208, 161, 248, 212, 206, 83, 39,
+ 124, 208, 161, 248, 212, 206, 83, 39, 224, 150, 208, 161, 248, 212, 206,
+ 83, 39, 226, 253, 208, 161, 248, 212, 206, 83, 39, 236, 242, 208, 161,
+ 248, 212, 206, 83, 239, 102, 211, 61, 119, 117, 22, 229, 197, 119, 117,
+ 22, 229, 193, 119, 117, 22, 229, 97, 119, 117, 22, 229, 63, 119, 117, 22,
+ 229, 218, 119, 117, 22, 229, 215, 119, 117, 22, 228, 200, 119, 117, 22,
+ 228, 172, 119, 117, 22, 229, 199, 119, 117, 22, 229, 154, 119, 117, 22,
+ 230, 17, 119, 117, 22, 230, 14, 119, 117, 22, 229, 5, 119, 117, 22, 229,
+ 2, 119, 117, 22, 229, 212, 119, 117, 22, 229, 210, 119, 117, 22, 228,
+ 202, 119, 117, 22, 228, 201, 119, 117, 22, 229, 23, 119, 117, 22, 228,
+ 247, 119, 117, 22, 229, 99, 119, 117, 22, 229, 98, 119, 117, 22, 230, 32,
+ 119, 117, 22, 229, 214, 119, 117, 22, 228, 163, 119, 117, 22, 228, 154,
+ 119, 117, 22, 230, 40, 119, 117, 22, 230, 33, 119, 117, 109, 206, 61,
+ 119, 117, 109, 221, 90, 119, 117, 109, 227, 251, 119, 117, 109, 237, 76,
+ 119, 117, 109, 221, 230, 119, 117, 109, 216, 167, 119, 117, 109, 222, 1,
+ 119, 117, 109, 217, 100, 119, 117, 109, 203, 62, 119, 117, 109, 236, 221,
+ 119, 117, 109, 225, 67, 119, 117, 109, 246, 174, 119, 117, 109, 223, 28,
+ 119, 117, 109, 236, 157, 119, 117, 109, 218, 85, 119, 117, 109, 221, 95,
+ 119, 117, 109, 223, 65, 119, 117, 109, 250, 34, 119, 117, 109, 203, 178,
+ 119, 117, 109, 247, 15, 119, 117, 131, 246, 67, 207, 199, 119, 117, 131,
+ 246, 67, 212, 13, 119, 117, 131, 246, 67, 229, 172, 119, 117, 131, 246,
+ 67, 229, 130, 119, 117, 131, 246, 67, 211, 4, 119, 117, 131, 246, 67,
+ 236, 123, 119, 117, 131, 246, 67, 209, 206, 119, 117, 2, 205, 173, 209,
+ 44, 119, 117, 2, 205, 173, 208, 9, 246, 229, 119, 117, 2, 246, 67, 246,
+ 163, 119, 117, 2, 205, 173, 209, 69, 119, 117, 2, 205, 173, 240, 50, 119,
+ 117, 2, 203, 136, 221, 85, 119, 117, 2, 203, 136, 216, 59, 119, 117, 2,
+ 203, 136, 208, 124, 119, 117, 2, 203, 136, 240, 89, 119, 117, 2, 205,
+ 173, 214, 159, 119, 117, 2, 225, 6, 211, 8, 119, 117, 2, 205, 173, 221,
+ 134, 119, 117, 2, 235, 167, 203, 81, 119, 117, 2, 203, 177, 119, 117, 2,
+ 246, 67, 207, 252, 215, 216, 119, 117, 17, 202, 84, 119, 117, 17, 105,
+ 119, 117, 17, 108, 119, 117, 17, 147, 119, 117, 17, 149, 119, 117, 17,
+ 170, 119, 117, 17, 195, 119, 117, 17, 213, 111, 119, 117, 17, 199, 119,
+ 117, 17, 222, 63, 119, 117, 42, 209, 147, 119, 117, 42, 236, 10, 119,
+ 117, 42, 209, 153, 209, 34, 119, 117, 42, 224, 113, 119, 117, 42, 236,
+ 12, 224, 113, 119, 117, 42, 209, 153, 248, 68, 119, 117, 42, 208, 72,
+ 119, 117, 2, 205, 173, 226, 234, 119, 117, 2, 203, 133, 119, 117, 2, 236,
+ 216, 119, 117, 2, 209, 59, 236, 216, 119, 117, 2, 201, 247, 209, 102,
+ 119, 117, 2, 236, 141, 119, 117, 2, 221, 148, 119, 117, 2, 203, 169, 119,
+ 117, 2, 221, 88, 119, 117, 2, 250, 18, 119, 117, 2, 207, 129, 246, 228,
+ 119, 117, 2, 225, 6, 208, 12, 119, 117, 2, 209, 207, 119, 117, 2, 227, 7,
+ 119, 117, 2, 223, 201, 119, 117, 2, 246, 67, 237, 143, 226, 212, 221, 93,
+ 221, 92, 119, 117, 2, 246, 67, 245, 109, 208, 3, 119, 117, 2, 246, 67,
+ 207, 127, 119, 117, 2, 246, 67, 207, 128, 246, 86, 119, 117, 2, 246, 67,
+ 217, 186, 244, 135, 119, 117, 2, 246, 67, 221, 141, 208, 132, 119, 117,
+ 246, 39, 2, 208, 7, 119, 117, 246, 39, 2, 203, 48, 119, 117, 246, 39, 2,
+ 227, 93, 119, 117, 246, 39, 2, 227, 250, 119, 117, 246, 39, 2, 203, 132,
+ 119, 117, 246, 39, 2, 229, 6, 119, 117, 246, 39, 2, 237, 73, 119, 117,
+ 246, 39, 2, 223, 242, 119, 117, 246, 39, 2, 209, 45, 119, 117, 246, 39,
+ 2, 208, 17, 119, 117, 246, 39, 2, 218, 205, 119, 117, 246, 39, 2, 229,
+ 142, 119, 117, 246, 39, 2, 237, 133, 119, 117, 246, 39, 2, 206, 80, 119,
+ 117, 246, 39, 2, 240, 86, 119, 117, 246, 39, 2, 203, 88, 119, 117, 246,
+ 39, 2, 207, 246, 119, 117, 246, 39, 2, 228, 158, 119, 117, 246, 39, 2,
+ 204, 153, 111, 1, 185, 111, 1, 249, 32, 111, 1, 11, 185, 111, 1, 218, 98,
+ 111, 1, 192, 111, 1, 224, 158, 111, 1, 250, 126, 192, 111, 1, 240, 108,
+ 111, 1, 206, 86, 111, 1, 205, 231, 111, 1, 210, 22, 111, 1, 244, 212,
+ 111, 1, 11, 207, 241, 111, 1, 11, 210, 22, 111, 1, 207, 241, 111, 1, 244,
+ 120, 111, 1, 201, 201, 111, 1, 222, 104, 111, 1, 11, 221, 227, 111, 1,
+ 250, 126, 201, 201, 111, 1, 221, 227, 111, 1, 221, 213, 111, 1, 228, 113,
+ 111, 1, 226, 198, 111, 1, 227, 161, 111, 1, 227, 150, 111, 1, 208, 187,
+ 111, 1, 243, 121, 111, 1, 208, 179, 111, 1, 243, 120, 111, 1, 173, 111,
+ 1, 239, 8, 111, 1, 11, 173, 111, 1, 217, 126, 111, 1, 217, 103, 111, 1,
+ 222, 203, 111, 1, 222, 152, 111, 1, 250, 126, 222, 203, 111, 1, 152, 111,
+ 1, 203, 182, 111, 1, 238, 119, 111, 1, 238, 94, 111, 1, 207, 251, 111, 1,
+ 241, 239, 111, 1, 221, 11, 111, 1, 220, 250, 111, 1, 208, 10, 111, 1,
+ 241, 249, 111, 1, 11, 208, 10, 111, 1, 11, 241, 249, 111, 1, 216, 133,
+ 208, 10, 111, 1, 213, 90, 111, 1, 211, 164, 111, 1, 202, 80, 111, 1, 202,
+ 8, 111, 1, 208, 20, 111, 1, 241, 255, 111, 1, 11, 208, 20, 111, 1, 215,
+ 36, 111, 1, 202, 116, 111, 1, 202, 9, 111, 1, 201, 235, 111, 1, 201, 215,
+ 111, 1, 250, 126, 201, 235, 111, 1, 201, 207, 111, 1, 201, 214, 111, 1,
+ 204, 111, 111, 1, 251, 73, 111, 1, 237, 12, 111, 1, 223, 70, 111, 2, 250,
+ 65, 111, 2, 216, 133, 205, 184, 111, 2, 216, 133, 250, 65, 111, 22, 2,
+ 63, 111, 22, 2, 252, 25, 111, 22, 2, 251, 69, 111, 22, 2, 250, 231, 111,
+ 22, 2, 250, 223, 111, 22, 2, 78, 111, 22, 2, 220, 18, 111, 22, 2, 204, 0,
+ 111, 22, 2, 204, 144, 111, 22, 2, 74, 111, 22, 2, 241, 92, 111, 22, 2,
+ 241, 78, 111, 22, 2, 220, 70, 111, 22, 2, 75, 111, 22, 2, 235, 171, 111,
+ 22, 2, 235, 170, 111, 22, 2, 235, 169, 111, 22, 2, 230, 234, 111, 22, 2,
+ 231, 110, 111, 22, 2, 231, 83, 111, 22, 2, 230, 197, 111, 22, 2, 231, 24,
+ 111, 22, 2, 68, 111, 22, 2, 207, 39, 111, 22, 2, 207, 38, 111, 22, 2,
+ 207, 37, 111, 22, 2, 206, 178, 111, 22, 2, 207, 21, 111, 22, 2, 206, 241,
+ 111, 22, 2, 203, 124, 111, 22, 2, 203, 11, 111, 22, 2, 251, 109, 111, 22,
+ 2, 251, 105, 111, 22, 2, 241, 21, 111, 22, 2, 215, 189, 241, 21, 111, 22,
+ 2, 241, 28, 111, 22, 2, 215, 189, 241, 28, 111, 22, 2, 251, 64, 111, 22,
+ 2, 241, 145, 111, 22, 2, 250, 34, 111, 22, 2, 219, 216, 111, 22, 2, 223,
+ 163, 111, 22, 2, 222, 205, 111, 143, 216, 16, 111, 143, 208, 145, 216,
+ 16, 111, 143, 55, 111, 143, 56, 111, 1, 208, 159, 111, 1, 208, 158, 111,
+ 1, 208, 157, 111, 1, 208, 156, 111, 1, 208, 155, 111, 1, 208, 154, 111,
+ 1, 208, 153, 111, 1, 216, 133, 208, 160, 111, 1, 216, 133, 208, 159, 111,
+ 1, 216, 133, 208, 157, 111, 1, 216, 133, 208, 156, 111, 1, 216, 133, 208,
+ 155, 111, 1, 216, 133, 208, 153, 67, 1, 250, 126, 74, 172, 1, 250, 126,
+ 203, 52, 100, 1, 237, 171, 100, 1, 203, 196, 100, 1, 219, 184, 100, 1,
+ 210, 69, 100, 1, 240, 174, 100, 1, 230, 54, 100, 1, 159, 100, 1, 249,
+ 255, 100, 1, 245, 51, 100, 1, 206, 164, 100, 1, 239, 75, 100, 1, 146,
+ 100, 1, 219, 185, 223, 163, 100, 1, 245, 52, 194, 100, 1, 240, 175, 223,
+ 163, 100, 1, 230, 55, 226, 185, 100, 1, 217, 1, 194, 100, 1, 209, 110,
+ 100, 1, 212, 45, 244, 2, 100, 1, 244, 2, 100, 1, 229, 48, 100, 1, 212,
+ 45, 230, 184, 100, 1, 236, 225, 100, 1, 227, 162, 100, 1, 216, 62, 100,
+ 1, 226, 185, 100, 1, 223, 163, 100, 1, 230, 184, 100, 1, 194, 100, 1,
+ 226, 186, 223, 163, 100, 1, 223, 164, 226, 185, 100, 1, 230, 185, 226,
+ 185, 100, 1, 215, 94, 230, 184, 100, 1, 226, 186, 3, 243, 85, 100, 1,
+ 223, 164, 3, 243, 85, 100, 1, 230, 185, 3, 243, 85, 100, 1, 230, 185, 3,
+ 187, 231, 7, 25, 55, 100, 1, 215, 94, 3, 243, 85, 100, 1, 215, 94, 3, 70,
+ 56, 100, 1, 226, 186, 194, 100, 1, 223, 164, 194, 100, 1, 230, 185, 194,
+ 100, 1, 215, 94, 194, 100, 1, 226, 186, 223, 164, 194, 100, 1, 223, 164,
+ 226, 186, 194, 100, 1, 230, 185, 226, 186, 194, 100, 1, 215, 94, 230,
+ 185, 194, 100, 1, 230, 185, 215, 94, 3, 243, 85, 100, 1, 230, 185, 223,
+ 163, 100, 1, 230, 185, 223, 164, 194, 100, 1, 215, 94, 210, 69, 100, 1,
+ 215, 94, 210, 70, 146, 100, 1, 215, 94, 219, 184, 100, 1, 215, 94, 219,
+ 185, 146, 100, 1, 210, 70, 194, 100, 1, 210, 70, 217, 1, 194, 100, 1,
+ 204, 144, 100, 1, 204, 40, 100, 1, 204, 145, 146, 100, 1, 215, 94, 223,
+ 163, 100, 1, 215, 94, 226, 185, 100, 1, 230, 55, 217, 1, 194, 100, 1,
+ 239, 76, 217, 1, 194, 100, 1, 215, 94, 230, 54, 100, 1, 215, 94, 230, 55,
+ 146, 100, 1, 63, 100, 1, 212, 45, 219, 195, 100, 1, 220, 97, 100, 1, 78,
+ 100, 1, 250, 176, 100, 1, 75, 100, 1, 74, 100, 1, 231, 110, 100, 1, 212,
+ 228, 75, 100, 1, 207, 17, 100, 1, 241, 161, 100, 1, 212, 45, 241, 147,
+ 100, 1, 215, 209, 75, 100, 1, 212, 45, 241, 161, 100, 1, 163, 75, 100, 1,
+ 203, 52, 100, 1, 68, 100, 1, 240, 238, 100, 1, 203, 147, 100, 1, 106,
+ 223, 163, 100, 1, 163, 68, 100, 1, 215, 209, 68, 100, 1, 207, 18, 100, 1,
+ 212, 45, 68, 100, 1, 220, 15, 100, 1, 219, 195, 100, 1, 219, 216, 100, 1,
+ 204, 111, 100, 1, 204, 0, 100, 1, 204, 30, 100, 1, 204, 53, 100, 1, 203,
+ 230, 100, 1, 223, 72, 68, 100, 1, 223, 72, 78, 100, 1, 223, 72, 75, 100,
+ 1, 223, 72, 63, 100, 1, 218, 235, 250, 231, 100, 1, 218, 235, 250, 247,
+ 100, 1, 212, 45, 241, 92, 100, 1, 212, 45, 250, 231, 100, 1, 212, 45,
+ 220, 31, 100, 1, 125, 226, 185, 100, 251, 88, 49, 236, 106, 214, 172,
+ 100, 251, 88, 224, 150, 236, 106, 214, 172, 100, 251, 88, 50, 236, 106,
+ 214, 172, 100, 251, 88, 124, 80, 214, 172, 100, 251, 88, 224, 150, 80,
+ 214, 172, 100, 251, 88, 138, 80, 214, 172, 100, 251, 88, 250, 40, 214,
+ 172, 100, 251, 88, 250, 40, 227, 213, 214, 172, 100, 251, 88, 250, 40,
+ 209, 226, 100, 251, 88, 250, 40, 209, 248, 100, 251, 88, 250, 40, 188,
+ 113, 100, 251, 88, 250, 40, 235, 206, 113, 100, 251, 88, 250, 40, 209,
+ 227, 113, 100, 251, 88, 138, 165, 100, 251, 88, 138, 208, 244, 165, 100,
+ 251, 88, 138, 237, 253, 100, 251, 88, 138, 163, 237, 253, 100, 251, 88,
+ 138, 243, 85, 100, 251, 88, 138, 246, 61, 100, 251, 88, 138, 227, 114,
+ 100, 251, 88, 138, 204, 75, 100, 251, 88, 138, 206, 38, 100, 251, 88,
+ 124, 165, 100, 251, 88, 124, 208, 244, 165, 100, 251, 88, 124, 237, 253,
+ 100, 251, 88, 124, 163, 237, 253, 100, 251, 88, 124, 243, 85, 100, 251,
+ 88, 124, 246, 61, 100, 251, 88, 124, 227, 114, 100, 251, 88, 124, 204,
+ 75, 100, 251, 88, 124, 206, 38, 100, 251, 88, 124, 47, 100, 2, 158, 3,
+ 245, 130, 100, 209, 68, 1, 214, 150, 100, 52, 82, 100, 217, 179, 246,
+ 126, 239, 102, 211, 61, 212, 215, 239, 158, 1, 219, 201, 212, 215, 239,
+ 158, 245, 190, 219, 201, 212, 215, 239, 158, 121, 211, 75, 212, 215, 239,
+ 158, 112, 211, 75, 60, 31, 16, 217, 195, 60, 31, 16, 244, 146, 60, 31,
+ 16, 218, 239, 60, 31, 16, 219, 192, 241, 126, 60, 31, 16, 219, 192, 243,
+ 171, 60, 31, 16, 206, 73, 241, 126, 60, 31, 16, 206, 73, 243, 171, 60,
+ 31, 16, 229, 221, 60, 31, 16, 210, 86, 60, 31, 16, 219, 83, 60, 31, 16,
+ 202, 219, 60, 31, 16, 202, 220, 243, 171, 60, 31, 16, 228, 226, 60, 31,
+ 16, 250, 171, 241, 126, 60, 31, 16, 240, 206, 241, 126, 60, 31, 16, 209,
+ 163, 60, 31, 16, 229, 176, 60, 31, 16, 250, 161, 60, 31, 16, 250, 162,
+ 243, 171, 60, 31, 16, 210, 93, 60, 31, 16, 209, 50, 60, 31, 16, 220, 42,
+ 250, 124, 60, 31, 16, 238, 23, 250, 124, 60, 31, 16, 217, 194, 60, 31,
+ 16, 246, 190, 60, 31, 16, 206, 62, 60, 31, 16, 230, 206, 250, 124, 60,
+ 31, 16, 229, 178, 250, 124, 60, 31, 16, 229, 177, 250, 124, 60, 31, 16,
+ 214, 210, 60, 31, 16, 219, 73, 60, 31, 16, 211, 84, 250, 164, 60, 31, 16,
+ 219, 191, 250, 124, 60, 31, 16, 206, 72, 250, 124, 60, 31, 16, 250, 165,
+ 250, 124, 60, 31, 16, 250, 159, 60, 31, 16, 229, 38, 60, 31, 16, 216, 69,
+ 60, 31, 16, 218, 165, 250, 124, 60, 31, 16, 208, 217, 60, 31, 16, 250,
+ 229, 60, 31, 16, 214, 153, 60, 31, 16, 210, 97, 250, 124, 60, 31, 16,
+ 210, 97, 224, 221, 211, 82, 60, 31, 16, 219, 186, 250, 124, 60, 31, 16,
+ 209, 86, 60, 31, 16, 227, 200, 60, 31, 16, 242, 2, 60, 31, 16, 208, 87,
+ 60, 31, 16, 209, 134, 60, 31, 16, 228, 229, 60, 31, 16, 250, 171, 240,
+ 206, 222, 226, 60, 31, 16, 239, 110, 250, 124, 60, 31, 16, 231, 62, 60,
+ 31, 16, 208, 57, 250, 124, 60, 31, 16, 229, 224, 208, 56, 60, 31, 16,
+ 219, 11, 60, 31, 16, 217, 199, 60, 31, 16, 229, 7, 60, 31, 16, 246, 110,
+ 250, 124, 60, 31, 16, 216, 177, 60, 31, 16, 219, 86, 250, 124, 60, 31,
+ 16, 219, 84, 250, 124, 60, 31, 16, 235, 160, 60, 31, 16, 223, 82, 60, 31,
+ 16, 218, 217, 60, 31, 16, 229, 8, 251, 9, 60, 31, 16, 208, 57, 251, 9,
+ 60, 31, 16, 211, 55, 60, 31, 16, 237, 240, 60, 31, 16, 230, 206, 222,
+ 226, 60, 31, 16, 220, 42, 222, 226, 60, 31, 16, 219, 192, 222, 226, 60,
+ 31, 16, 218, 216, 60, 31, 16, 228, 248, 60, 31, 16, 218, 215, 60, 31, 16,
+ 228, 228, 60, 31, 16, 219, 12, 222, 226, 60, 31, 16, 229, 177, 222, 227,
+ 250, 202, 60, 31, 16, 229, 178, 222, 227, 250, 202, 60, 31, 16, 202, 217,
+ 60, 31, 16, 250, 162, 222, 226, 60, 31, 16, 250, 163, 210, 94, 222, 226,
+ 60, 31, 16, 202, 218, 60, 31, 16, 228, 227, 60, 31, 16, 241, 121, 60, 31,
+ 16, 246, 191, 60, 31, 16, 224, 122, 230, 205, 60, 31, 16, 206, 73, 222,
+ 226, 60, 31, 16, 218, 165, 222, 226, 60, 31, 16, 217, 200, 222, 226, 60,
+ 31, 16, 220, 38, 60, 31, 16, 250, 189, 60, 31, 16, 226, 195, 60, 31, 16,
+ 219, 84, 222, 226, 60, 31, 16, 219, 86, 222, 226, 60, 31, 16, 240, 244,
+ 219, 85, 60, 31, 16, 228, 135, 60, 31, 16, 250, 190, 60, 31, 16, 208, 57,
+ 222, 226, 60, 31, 16, 241, 124, 60, 31, 16, 210, 97, 222, 226, 60, 31,
+ 16, 210, 87, 60, 31, 16, 246, 110, 222, 226, 60, 31, 16, 241, 43, 60, 31,
+ 16, 214, 154, 222, 226, 60, 31, 16, 203, 163, 229, 38, 60, 31, 16, 208,
+ 54, 60, 31, 16, 217, 201, 60, 31, 16, 208, 58, 60, 31, 16, 208, 55, 60,
+ 31, 16, 217, 198, 60, 31, 16, 208, 53, 60, 31, 16, 217, 197, 60, 31, 16,
+ 238, 22, 60, 31, 16, 250, 116, 60, 31, 16, 240, 244, 250, 116, 60, 31,
+ 16, 219, 186, 222, 226, 60, 31, 16, 209, 85, 241, 1, 60, 31, 16, 209, 85,
+ 240, 205, 60, 31, 16, 209, 87, 250, 166, 60, 31, 16, 209, 79, 230, 19,
+ 250, 158, 60, 31, 16, 229, 223, 60, 31, 16, 241, 80, 60, 31, 16, 203, 14,
+ 229, 220, 60, 31, 16, 203, 14, 250, 202, 60, 31, 16, 211, 83, 60, 31, 16,
+ 229, 39, 250, 202, 60, 31, 16, 243, 172, 250, 124, 60, 31, 16, 228, 230,
+ 250, 124, 60, 31, 16, 228, 230, 251, 9, 60, 31, 16, 228, 230, 222, 226,
+ 60, 31, 16, 250, 165, 222, 226, 60, 31, 16, 250, 167, 60, 31, 16, 243,
+ 171, 60, 31, 16, 208, 68, 60, 31, 16, 209, 125, 60, 31, 16, 228, 252, 60,
+ 31, 16, 227, 205, 241, 73, 246, 100, 60, 31, 16, 227, 205, 242, 3, 246,
+ 101, 60, 31, 16, 227, 205, 208, 71, 246, 101, 60, 31, 16, 227, 205, 209,
+ 136, 246, 101, 60, 31, 16, 227, 205, 231, 57, 246, 100, 60, 31, 16, 238,
+ 23, 222, 227, 250, 202, 60, 31, 16, 238, 23, 219, 74, 250, 112, 60, 31,
+ 16, 238, 23, 219, 74, 244, 6, 60, 31, 16, 243, 196, 60, 31, 16, 243, 197,
+ 219, 74, 250, 113, 229, 220, 60, 31, 16, 243, 197, 219, 74, 250, 113,
+ 250, 202, 60, 31, 16, 243, 197, 219, 74, 244, 6, 60, 31, 16, 208, 76, 60,
+ 31, 16, 250, 117, 60, 31, 16, 231, 64, 60, 31, 16, 243, 219, 60, 31, 16,
+ 251, 75, 218, 52, 250, 118, 60, 31, 16, 251, 75, 250, 115, 60, 31, 16,
+ 251, 75, 250, 118, 60, 31, 16, 251, 75, 224, 215, 60, 31, 16, 251, 75,
+ 224, 226, 60, 31, 16, 251, 75, 238, 24, 60, 31, 16, 251, 75, 238, 21, 60,
+ 31, 16, 251, 75, 218, 52, 238, 24, 60, 31, 16, 225, 84, 217, 207, 235,
+ 158, 60, 31, 16, 225, 84, 251, 11, 217, 207, 235, 158, 60, 31, 16, 225,
+ 84, 244, 5, 235, 158, 60, 31, 16, 225, 84, 251, 11, 244, 5, 235, 158, 60,
+ 31, 16, 225, 84, 208, 63, 235, 158, 60, 31, 16, 225, 84, 208, 77, 60, 31,
+ 16, 225, 84, 209, 130, 235, 158, 60, 31, 16, 225, 84, 209, 130, 227, 209,
+ 235, 158, 60, 31, 16, 225, 84, 227, 209, 235, 158, 60, 31, 16, 225, 84,
+ 218, 95, 235, 158, 60, 31, 16, 230, 213, 209, 156, 235, 159, 60, 31, 16,
+ 250, 163, 209, 156, 235, 159, 60, 31, 16, 240, 80, 209, 127, 60, 31, 16,
+ 240, 80, 224, 46, 60, 31, 16, 240, 80, 243, 202, 60, 31, 16, 225, 84,
+ 206, 66, 235, 158, 60, 31, 16, 225, 84, 217, 206, 235, 158, 60, 31, 16,
+ 225, 84, 218, 95, 209, 130, 235, 158, 60, 31, 16, 238, 19, 223, 164, 250,
+ 166, 60, 31, 16, 238, 19, 223, 164, 243, 170, 60, 31, 16, 241, 90, 230,
+ 19, 239, 110, 205, 171, 60, 31, 16, 231, 63, 60, 31, 16, 231, 61, 60, 31,
+ 16, 239, 110, 250, 125, 244, 4, 235, 157, 60, 31, 16, 239, 110, 243, 217,
+ 185, 60, 31, 16, 239, 110, 243, 217, 223, 82, 60, 31, 16, 239, 110, 223,
+ 77, 235, 158, 60, 31, 16, 239, 110, 243, 217, 243, 233, 60, 31, 16, 239,
+ 110, 212, 64, 243, 216, 243, 233, 60, 31, 16, 239, 110, 243, 217, 229,
+ 201, 60, 31, 16, 239, 110, 243, 217, 202, 17, 60, 31, 16, 239, 110, 243,
+ 217, 222, 101, 229, 220, 60, 31, 16, 239, 110, 243, 217, 222, 101, 250,
+ 202, 60, 31, 16, 239, 110, 225, 128, 246, 102, 243, 202, 60, 31, 16, 239,
+ 110, 225, 128, 246, 102, 224, 46, 60, 31, 16, 240, 27, 212, 64, 246, 102,
+ 206, 65, 60, 31, 16, 239, 110, 212, 64, 246, 102, 210, 98, 60, 31, 16,
+ 239, 110, 222, 229, 60, 31, 16, 246, 103, 201, 241, 60, 31, 16, 246, 103,
+ 229, 37, 60, 31, 16, 246, 103, 211, 219, 60, 31, 16, 239, 110, 235, 206,
+ 203, 13, 209, 131, 60, 31, 16, 239, 110, 241, 91, 250, 191, 60, 31, 16,
+ 203, 13, 208, 64, 60, 31, 16, 243, 210, 208, 64, 60, 31, 16, 243, 210,
+ 209, 131, 60, 31, 16, 243, 210, 250, 168, 242, 3, 243, 105, 60, 31, 16,
+ 243, 210, 224, 44, 209, 135, 243, 105, 60, 31, 16, 243, 210, 243, 193,
+ 240, 218, 243, 105, 60, 31, 16, 243, 210, 208, 74, 220, 48, 243, 105, 60,
+ 31, 16, 203, 13, 250, 168, 242, 3, 243, 105, 60, 31, 16, 203, 13, 224,
+ 44, 209, 135, 243, 105, 60, 31, 16, 203, 13, 243, 193, 240, 218, 243,
+ 105, 60, 31, 16, 203, 13, 208, 74, 220, 48, 243, 105, 60, 31, 16, 238,
+ 175, 243, 209, 60, 31, 16, 238, 175, 203, 12, 60, 31, 16, 243, 218, 250,
+ 168, 224, 123, 60, 31, 16, 243, 218, 250, 168, 224, 255, 60, 31, 16, 243,
+ 218, 243, 171, 60, 31, 16, 243, 218, 209, 77, 60, 31, 16, 212, 130, 209,
+ 77, 60, 31, 16, 212, 130, 209, 78, 243, 155, 60, 31, 16, 212, 130, 209,
+ 78, 208, 65, 60, 31, 16, 212, 130, 209, 78, 209, 123, 60, 31, 16, 212,
+ 130, 250, 88, 60, 31, 16, 212, 130, 250, 89, 243, 155, 60, 31, 16, 212,
+ 130, 250, 89, 208, 65, 60, 31, 16, 212, 130, 250, 89, 209, 123, 60, 31,
+ 16, 243, 194, 238, 156, 60, 31, 16, 243, 201, 219, 216, 60, 31, 16, 211,
+ 71, 60, 31, 16, 250, 109, 185, 60, 31, 16, 250, 109, 205, 171, 60, 31,
+ 16, 250, 109, 239, 8, 60, 31, 16, 250, 109, 243, 233, 60, 31, 16, 250,
+ 109, 229, 201, 60, 31, 16, 250, 109, 202, 17, 60, 31, 16, 250, 109, 222,
+ 100, 60, 31, 16, 229, 177, 222, 227, 224, 225, 60, 31, 16, 229, 178, 222,
+ 227, 224, 225, 60, 31, 16, 229, 177, 222, 227, 229, 220, 60, 31, 16, 229,
+ 178, 222, 227, 229, 220, 60, 31, 16, 229, 39, 229, 220, 60, 31, 16, 238,
+ 23, 222, 227, 229, 220, 31, 16, 212, 120, 248, 226, 31, 16, 52, 248, 226,
+ 31, 16, 46, 248, 226, 31, 16, 216, 74, 46, 248, 226, 31, 16, 244, 143,
+ 248, 226, 31, 16, 212, 228, 248, 226, 31, 16, 49, 216, 101, 54, 31, 16,
+ 50, 216, 101, 54, 31, 16, 216, 101, 243, 83, 31, 16, 244, 185, 214, 157,
+ 31, 16, 244, 213, 247, 45, 31, 16, 214, 157, 31, 16, 245, 250, 31, 16,
+ 216, 99, 240, 15, 31, 16, 216, 99, 240, 14, 31, 16, 216, 99, 240, 13, 31,
+ 16, 240, 36, 31, 16, 240, 37, 56, 31, 16, 247, 216, 82, 31, 16, 247, 82,
+ 31, 16, 247, 228, 31, 16, 155, 31, 16, 220, 28, 211, 102, 31, 16, 207,
+ 133, 211, 102, 31, 16, 209, 29, 211, 102, 31, 16, 239, 146, 211, 102, 31,
+ 16, 239, 232, 211, 102, 31, 16, 212, 87, 211, 102, 31, 16, 212, 85, 239,
+ 127, 31, 16, 239, 144, 239, 127, 31, 16, 239, 76, 246, 30, 31, 16, 239,
+ 76, 246, 31, 219, 218, 251, 0, 31, 16, 239, 76, 246, 31, 219, 218, 248,
+ 211, 31, 16, 247, 126, 246, 30, 31, 16, 240, 175, 246, 30, 31, 16, 240,
+ 175, 246, 31, 219, 218, 251, 0, 31, 16, 240, 175, 246, 31, 219, 218, 248,
+ 211, 31, 16, 242, 47, 246, 29, 31, 16, 242, 47, 246, 28, 31, 16, 223,
+ 226, 225, 19, 216, 85, 31, 16, 52, 213, 56, 31, 16, 52, 239, 216, 31, 16,
+ 239, 217, 206, 224, 31, 16, 239, 217, 242, 70, 31, 16, 223, 66, 206, 224,
+ 31, 16, 223, 66, 242, 70, 31, 16, 213, 57, 206, 224, 31, 16, 213, 57,
+ 242, 70, 31, 16, 217, 56, 143, 213, 56, 31, 16, 217, 56, 143, 239, 216,
+ 31, 16, 245, 230, 208, 221, 31, 16, 245, 78, 208, 221, 31, 16, 219, 218,
+ 251, 0, 31, 16, 219, 218, 248, 211, 31, 16, 217, 37, 251, 0, 31, 16, 217,
+ 37, 248, 211, 31, 16, 223, 229, 216, 85, 31, 16, 204, 31, 216, 85, 31,
+ 16, 162, 216, 85, 31, 16, 217, 56, 216, 85, 31, 16, 241, 139, 216, 85,
+ 31, 16, 212, 81, 216, 85, 31, 16, 209, 51, 216, 85, 31, 16, 212, 73, 216,
+ 85, 31, 16, 118, 236, 12, 207, 149, 216, 85, 31, 16, 203, 197, 221, 156,
+ 31, 16, 91, 221, 156, 31, 16, 246, 62, 203, 197, 221, 156, 31, 16, 51,
+ 221, 157, 204, 33, 31, 16, 51, 221, 157, 248, 43, 31, 16, 208, 86, 221,
+ 157, 112, 204, 33, 31, 16, 208, 86, 221, 157, 112, 248, 43, 31, 16, 208,
+ 86, 221, 157, 49, 204, 33, 31, 16, 208, 86, 221, 157, 49, 248, 43, 31,
+ 16, 208, 86, 221, 157, 50, 204, 33, 31, 16, 208, 86, 221, 157, 50, 248,
+ 43, 31, 16, 208, 86, 221, 157, 121, 204, 33, 31, 16, 208, 86, 221, 157,
+ 121, 248, 43, 31, 16, 208, 86, 221, 157, 112, 50, 204, 33, 31, 16, 208,
+ 86, 221, 157, 112, 50, 248, 43, 31, 16, 224, 30, 221, 157, 204, 33, 31,
+ 16, 224, 30, 221, 157, 248, 43, 31, 16, 208, 83, 221, 157, 121, 204, 33,
+ 31, 16, 208, 83, 221, 157, 121, 248, 43, 31, 16, 219, 77, 221, 156, 31,
+ 16, 205, 183, 221, 156, 31, 16, 221, 157, 248, 43, 31, 16, 221, 49, 221,
+ 156, 31, 16, 246, 1, 221, 157, 204, 33, 31, 16, 246, 1, 221, 157, 248,
+ 43, 31, 16, 247, 214, 31, 16, 204, 31, 221, 160, 31, 16, 162, 221, 160,
+ 31, 16, 217, 56, 221, 160, 31, 16, 241, 139, 221, 160, 31, 16, 212, 81,
+ 221, 160, 31, 16, 209, 51, 221, 160, 31, 16, 212, 73, 221, 160, 31, 16,
+ 118, 236, 12, 207, 149, 221, 160, 31, 16, 39, 211, 77, 31, 16, 39, 211,
+ 184, 211, 77, 31, 16, 39, 208, 94, 31, 16, 39, 208, 93, 31, 16, 39, 208,
+ 92, 31, 16, 240, 0, 208, 94, 31, 16, 240, 0, 208, 93, 31, 16, 240, 0,
+ 208, 92, 31, 16, 39, 250, 31, 243, 85, 31, 16, 39, 239, 224, 31, 16, 39,
+ 239, 223, 31, 16, 39, 239, 222, 31, 16, 39, 239, 221, 31, 16, 39, 239,
+ 220, 31, 16, 248, 142, 248, 159, 31, 16, 241, 84, 248, 159, 31, 16, 248,
+ 142, 208, 250, 31, 16, 241, 84, 208, 250, 31, 16, 248, 142, 212, 37, 31,
+ 16, 241, 84, 212, 37, 31, 16, 248, 142, 218, 174, 31, 16, 241, 84, 218,
+ 174, 31, 16, 39, 251, 138, 31, 16, 39, 211, 105, 31, 16, 39, 209, 140,
+ 31, 16, 39, 211, 106, 31, 16, 39, 225, 96, 31, 16, 39, 225, 95, 31, 16,
+ 39, 251, 137, 31, 16, 39, 227, 2, 31, 16, 250, 100, 206, 224, 31, 16,
+ 250, 100, 242, 70, 31, 16, 39, 243, 100, 31, 16, 39, 215, 249, 31, 16,
+ 39, 239, 206, 31, 16, 39, 212, 33, 31, 16, 39, 248, 120, 31, 16, 39, 52,
+ 208, 150, 31, 16, 39, 208, 70, 208, 150, 31, 16, 215, 254, 31, 16, 211,
+ 0, 31, 16, 202, 159, 31, 16, 218, 166, 31, 16, 224, 206, 31, 16, 239,
+ 155, 31, 16, 245, 140, 31, 16, 244, 62, 31, 16, 238, 14, 221, 161, 212,
+ 57, 31, 16, 238, 14, 221, 161, 221, 192, 212, 57, 31, 16, 208, 120, 31,
+ 16, 207, 175, 31, 16, 230, 239, 207, 175, 31, 16, 207, 176, 212, 57, 31,
+ 16, 207, 176, 206, 224, 31, 16, 219, 234, 211, 31, 31, 16, 219, 234, 211,
+ 28, 31, 16, 219, 234, 211, 27, 31, 16, 219, 234, 211, 26, 31, 16, 219,
+ 234, 211, 25, 31, 16, 219, 234, 211, 24, 31, 16, 219, 234, 211, 23, 31,
+ 16, 219, 234, 211, 22, 31, 16, 219, 234, 211, 21, 31, 16, 219, 234, 211,
+ 30, 31, 16, 219, 234, 211, 29, 31, 16, 237, 75, 31, 16, 222, 238, 31, 16,
+ 241, 84, 76, 211, 67, 31, 16, 244, 55, 212, 57, 31, 16, 39, 121, 247,
+ 240, 31, 16, 39, 112, 247, 240, 31, 16, 39, 237, 88, 31, 16, 39, 212, 23,
+ 218, 99, 31, 16, 219, 28, 82, 31, 16, 219, 28, 112, 82, 31, 16, 162, 219,
+ 28, 82, 31, 16, 238, 47, 206, 224, 31, 16, 238, 47, 242, 70, 31, 16, 3,
+ 239, 255, 31, 16, 244, 168, 31, 16, 244, 169, 251, 14, 31, 16, 225, 65,
+ 31, 16, 227, 20, 31, 16, 247, 211, 31, 16, 213, 147, 204, 33, 31, 16,
+ 213, 147, 248, 43, 31, 16, 224, 106, 31, 16, 224, 107, 248, 43, 31, 16,
+ 213, 141, 204, 33, 31, 16, 213, 141, 248, 43, 31, 16, 239, 93, 204, 33,
+ 31, 16, 239, 93, 248, 43, 31, 16, 227, 21, 218, 244, 216, 85, 31, 16,
+ 227, 21, 231, 54, 216, 85, 31, 16, 247, 212, 216, 85, 31, 16, 213, 147,
+ 216, 85, 31, 16, 224, 107, 216, 85, 31, 16, 213, 141, 216, 85, 31, 16,
+ 209, 154, 218, 242, 245, 104, 217, 216, 218, 243, 31, 16, 209, 154, 218,
+ 242, 245, 104, 217, 216, 231, 53, 31, 16, 209, 154, 218, 242, 245, 104,
+ 217, 216, 218, 244, 243, 181, 31, 16, 209, 154, 231, 52, 245, 104, 217,
+ 216, 218, 243, 31, 16, 209, 154, 231, 52, 245, 104, 217, 216, 231, 53,
+ 31, 16, 209, 154, 231, 52, 245, 104, 217, 216, 231, 54, 243, 181, 31, 16,
+ 209, 154, 231, 52, 245, 104, 217, 216, 231, 54, 243, 180, 31, 16, 209,
+ 154, 231, 52, 245, 104, 217, 216, 231, 54, 243, 179, 31, 16, 245, 133,
+ 31, 16, 237, 243, 247, 126, 246, 30, 31, 16, 237, 243, 240, 175, 246, 30,
+ 31, 16, 51, 249, 255, 31, 16, 205, 203, 31, 16, 218, 66, 31, 16, 246, 21,
+ 31, 16, 214, 200, 31, 16, 246, 25, 31, 16, 208, 138, 31, 16, 218, 36, 31,
+ 16, 218, 37, 239, 209, 31, 16, 214, 201, 239, 209, 31, 16, 208, 139, 216,
+ 82, 31, 16, 218, 225, 210, 247, 31, 16, 229, 90, 247, 126, 246, 30, 31,
+ 16, 229, 90, 241, 84, 76, 218, 159, 31, 16, 229, 90, 46, 221, 160, 31,
+ 16, 229, 90, 216, 150, 82, 31, 16, 229, 90, 204, 31, 221, 160, 31, 16,
+ 229, 90, 162, 221, 160, 31, 16, 229, 90, 217, 56, 221, 161, 211, 78, 242,
+ 70, 31, 16, 229, 90, 217, 56, 221, 161, 211, 78, 206, 224, 31, 16, 229,
+ 90, 241, 139, 221, 161, 211, 78, 242, 70, 31, 16, 229, 90, 241, 139, 221,
+ 161, 211, 78, 206, 224, 31, 16, 229, 90, 239, 217, 54, 30, 205, 188, 221,
+ 164, 210, 148, 30, 205, 188, 221, 164, 210, 137, 30, 205, 188, 221, 164,
+ 210, 127, 30, 205, 188, 221, 164, 210, 120, 30, 205, 188, 221, 164, 210,
+ 112, 30, 205, 188, 221, 164, 210, 106, 30, 205, 188, 221, 164, 210, 105,
+ 30, 205, 188, 221, 164, 210, 104, 30, 205, 188, 221, 164, 210, 103, 30,
+ 205, 188, 221, 164, 210, 147, 30, 205, 188, 221, 164, 210, 146, 30, 205,
+ 188, 221, 164, 210, 145, 30, 205, 188, 221, 164, 210, 144, 30, 205, 188,
+ 221, 164, 210, 143, 30, 205, 188, 221, 164, 210, 142, 30, 205, 188, 221,
+ 164, 210, 141, 30, 205, 188, 221, 164, 210, 140, 30, 205, 188, 221, 164,
+ 210, 139, 30, 205, 188, 221, 164, 210, 138, 30, 205, 188, 221, 164, 210,
+ 136, 30, 205, 188, 221, 164, 210, 135, 30, 205, 188, 221, 164, 210, 134,
+ 30, 205, 188, 221, 164, 210, 133, 30, 205, 188, 221, 164, 210, 132, 30,
+ 205, 188, 221, 164, 210, 111, 30, 205, 188, 221, 164, 210, 110, 30, 205,
+ 188, 221, 164, 210, 109, 30, 205, 188, 221, 164, 210, 108, 30, 205, 188,
+ 221, 164, 210, 107, 30, 231, 5, 221, 164, 210, 148, 30, 231, 5, 221, 164,
+ 210, 137, 30, 231, 5, 221, 164, 210, 120, 30, 231, 5, 221, 164, 210, 112,
+ 30, 231, 5, 221, 164, 210, 105, 30, 231, 5, 221, 164, 210, 104, 30, 231,
+ 5, 221, 164, 210, 146, 30, 231, 5, 221, 164, 210, 145, 30, 231, 5, 221,
+ 164, 210, 144, 30, 231, 5, 221, 164, 210, 143, 30, 231, 5, 221, 164, 210,
+ 140, 30, 231, 5, 221, 164, 210, 139, 30, 231, 5, 221, 164, 210, 138, 30,
+ 231, 5, 221, 164, 210, 133, 30, 231, 5, 221, 164, 210, 132, 30, 231, 5,
+ 221, 164, 210, 131, 30, 231, 5, 221, 164, 210, 130, 30, 231, 5, 221, 164,
+ 210, 129, 30, 231, 5, 221, 164, 210, 128, 30, 231, 5, 221, 164, 210, 126,
+ 30, 231, 5, 221, 164, 210, 125, 30, 231, 5, 221, 164, 210, 124, 30, 231,
+ 5, 221, 164, 210, 123, 30, 231, 5, 221, 164, 210, 122, 30, 231, 5, 221,
+ 164, 210, 121, 30, 231, 5, 221, 164, 210, 119, 30, 231, 5, 221, 164, 210,
+ 118, 30, 231, 5, 221, 164, 210, 117, 30, 231, 5, 221, 164, 210, 116, 30,
+ 231, 5, 221, 164, 210, 115, 30, 231, 5, 221, 164, 210, 114, 30, 231, 5,
+ 221, 164, 210, 113, 30, 231, 5, 221, 164, 210, 111, 30, 231, 5, 221, 164,
+ 210, 110, 30, 231, 5, 221, 164, 210, 109, 30, 231, 5, 221, 164, 210, 108,
+ 30, 231, 5, 221, 164, 210, 107, 39, 30, 31, 208, 66, 39, 30, 31, 209,
+ 124, 39, 30, 31, 218, 253, 30, 31, 227, 204, 224, 45, 35, 241, 179, 243,
+ 195, 35, 237, 50, 241, 179, 243, 195, 35, 236, 16, 241, 179, 243, 195,
+ 35, 241, 178, 237, 51, 243, 195, 35, 241, 178, 236, 15, 243, 195, 35,
+ 241, 179, 209, 126, 35, 246, 217, 209, 126, 35, 239, 102, 246, 61, 209,
+ 126, 35, 224, 98, 209, 126, 35, 248, 221, 209, 126, 35, 229, 195, 212,
+ 36, 209, 126, 35, 245, 185, 209, 126, 35, 250, 77, 209, 126, 35, 219,
+ 250, 209, 126, 35, 247, 221, 219, 211, 209, 126, 35, 244, 57, 219, 245,
+ 243, 148, 209, 126, 35, 243, 145, 209, 126, 35, 202, 225, 209, 126, 35,
+ 231, 40, 209, 126, 35, 219, 7, 209, 126, 35, 216, 157, 209, 126, 35, 245,
+ 197, 209, 126, 35, 236, 127, 249, 25, 209, 126, 35, 204, 103, 209, 126,
+ 35, 239, 181, 209, 126, 35, 251, 112, 209, 126, 35, 216, 114, 209, 126,
+ 35, 216, 89, 209, 126, 35, 241, 177, 209, 126, 35, 230, 85, 209, 126, 35,
+ 245, 192, 209, 126, 35, 241, 83, 209, 126, 35, 242, 15, 209, 126, 35,
+ 246, 186, 209, 126, 35, 244, 67, 209, 126, 35, 26, 216, 88, 209, 126, 35,
+ 219, 160, 209, 126, 35, 227, 208, 209, 126, 35, 246, 14, 209, 126, 35,
+ 229, 80, 209, 126, 35, 238, 214, 209, 126, 35, 211, 43, 209, 126, 35,
+ 217, 168, 209, 126, 35, 239, 101, 209, 126, 35, 216, 90, 209, 126, 35,
+ 227, 247, 219, 245, 224, 78, 209, 126, 35, 216, 86, 209, 126, 35, 238,
+ 33, 208, 173, 225, 3, 209, 126, 35, 241, 85, 209, 126, 35, 211, 56, 209,
+ 126, 35, 237, 245, 209, 126, 35, 241, 76, 209, 126, 35, 219, 50, 209,
+ 126, 35, 215, 242, 209, 126, 35, 239, 207, 209, 126, 35, 206, 64, 219,
+ 245, 204, 84, 209, 126, 35, 245, 202, 209, 126, 35, 225, 18, 209, 126,
+ 35, 240, 245, 209, 126, 35, 206, 234, 209, 126, 35, 243, 182, 209, 126,
+ 35, 246, 16, 224, 7, 209, 126, 35, 237, 222, 209, 126, 35, 238, 215, 231,
+ 49, 209, 126, 35, 225, 73, 209, 126, 35, 251, 133, 209, 126, 35, 241,
+ 101, 209, 126, 35, 242, 74, 209, 126, 35, 204, 82, 209, 126, 35, 212,
+ 115, 209, 126, 35, 231, 14, 209, 126, 35, 244, 25, 209, 126, 35, 244,
+ 148, 209, 126, 35, 243, 178, 209, 126, 35, 240, 209, 209, 126, 35, 213,
+ 104, 209, 126, 35, 211, 60, 209, 126, 35, 237, 90, 209, 126, 35, 245,
+ 226, 209, 126, 35, 246, 11, 209, 126, 35, 240, 87, 209, 126, 35, 251, 76,
+ 209, 126, 35, 245, 225, 209, 126, 35, 220, 32, 209, 93, 206, 41, 209,
+ 126, 35, 243, 204, 209, 126, 35, 228, 101, 209, 126, 35, 239, 150, 245,
+ 153, 215, 217, 206, 236, 17, 105, 245, 153, 215, 217, 206, 236, 17, 108,
+ 245, 153, 215, 217, 206, 236, 17, 147, 245, 153, 215, 217, 206, 236, 17,
+ 149, 245, 153, 215, 217, 206, 236, 17, 170, 245, 153, 215, 217, 206, 236,
+ 17, 195, 245, 153, 215, 217, 206, 236, 17, 213, 111, 245, 153, 215, 217,
+ 206, 236, 17, 199, 245, 153, 215, 217, 206, 236, 17, 222, 63, 245, 153,
+ 215, 217, 209, 148, 17, 105, 245, 153, 215, 217, 209, 148, 17, 108, 245,
+ 153, 215, 217, 209, 148, 17, 147, 245, 153, 215, 217, 209, 148, 17, 149,
+ 245, 153, 215, 217, 209, 148, 17, 170, 245, 153, 215, 217, 209, 148, 17,
+ 195, 245, 153, 215, 217, 209, 148, 17, 213, 111, 245, 153, 215, 217, 209,
+ 148, 17, 199, 245, 153, 215, 217, 209, 148, 17, 222, 63, 13, 26, 6, 63,
+ 13, 26, 6, 249, 255, 13, 26, 6, 247, 125, 13, 26, 6, 245, 51, 13, 26, 6,
+ 74, 13, 26, 6, 240, 174, 13, 26, 6, 239, 75, 13, 26, 6, 237, 171, 13, 26,
+ 6, 75, 13, 26, 6, 230, 184, 13, 26, 6, 230, 54, 13, 26, 6, 159, 13, 26,
+ 6, 226, 185, 13, 26, 6, 223, 163, 13, 26, 6, 78, 13, 26, 6, 219, 184, 13,
+ 26, 6, 217, 134, 13, 26, 6, 146, 13, 26, 6, 194, 13, 26, 6, 210, 69, 13,
+ 26, 6, 68, 13, 26, 6, 206, 164, 13, 26, 6, 204, 144, 13, 26, 6, 203, 196,
+ 13, 26, 6, 203, 124, 13, 26, 6, 202, 159, 13, 26, 5, 63, 13, 26, 5, 249,
+ 255, 13, 26, 5, 247, 125, 13, 26, 5, 245, 51, 13, 26, 5, 74, 13, 26, 5,
+ 240, 174, 13, 26, 5, 239, 75, 13, 26, 5, 237, 171, 13, 26, 5, 75, 13, 26,
+ 5, 230, 184, 13, 26, 5, 230, 54, 13, 26, 5, 159, 13, 26, 5, 226, 185, 13,
+ 26, 5, 223, 163, 13, 26, 5, 78, 13, 26, 5, 219, 184, 13, 26, 5, 217, 134,
+ 13, 26, 5, 146, 13, 26, 5, 194, 13, 26, 5, 210, 69, 13, 26, 5, 68, 13,
+ 26, 5, 206, 164, 13, 26, 5, 204, 144, 13, 26, 5, 203, 196, 13, 26, 5,
+ 203, 124, 13, 26, 5, 202, 159, 13, 37, 6, 63, 13, 37, 6, 249, 255, 13,
+ 37, 6, 247, 125, 13, 37, 6, 245, 51, 13, 37, 6, 74, 13, 37, 6, 240, 174,
+ 13, 37, 6, 239, 75, 13, 37, 6, 237, 171, 13, 37, 6, 75, 13, 37, 6, 230,
+ 184, 13, 37, 6, 230, 54, 13, 37, 6, 159, 13, 37, 6, 226, 185, 13, 37, 6,
+ 223, 163, 13, 37, 6, 78, 13, 37, 6, 219, 184, 13, 37, 6, 217, 134, 13,
+ 37, 6, 146, 13, 37, 6, 194, 13, 37, 6, 210, 69, 13, 37, 6, 68, 13, 37, 6,
+ 206, 164, 13, 37, 6, 204, 144, 13, 37, 6, 203, 196, 13, 37, 6, 203, 124,
+ 13, 37, 6, 202, 159, 13, 37, 5, 63, 13, 37, 5, 249, 255, 13, 37, 5, 247,
+ 125, 13, 37, 5, 245, 51, 13, 37, 5, 74, 13, 37, 5, 240, 174, 13, 37, 5,
+ 239, 75, 13, 37, 5, 75, 13, 37, 5, 230, 184, 13, 37, 5, 230, 54, 13, 37,
+ 5, 159, 13, 37, 5, 226, 185, 13, 37, 5, 223, 163, 13, 37, 5, 78, 13, 37,
+ 5, 219, 184, 13, 37, 5, 217, 134, 13, 37, 5, 146, 13, 37, 5, 194, 13, 37,
+ 5, 210, 69, 13, 37, 5, 68, 13, 37, 5, 206, 164, 13, 37, 5, 204, 144, 13,
+ 37, 5, 203, 196, 13, 37, 5, 203, 124, 13, 37, 5, 202, 159, 13, 26, 37, 6,
+ 63, 13, 26, 37, 6, 249, 255, 13, 26, 37, 6, 247, 125, 13, 26, 37, 6, 245,
+ 51, 13, 26, 37, 6, 74, 13, 26, 37, 6, 240, 174, 13, 26, 37, 6, 239, 75,
+ 13, 26, 37, 6, 237, 171, 13, 26, 37, 6, 75, 13, 26, 37, 6, 230, 184, 13,
+ 26, 37, 6, 230, 54, 13, 26, 37, 6, 159, 13, 26, 37, 6, 226, 185, 13, 26,
+ 37, 6, 223, 163, 13, 26, 37, 6, 78, 13, 26, 37, 6, 219, 184, 13, 26, 37,
+ 6, 217, 134, 13, 26, 37, 6, 146, 13, 26, 37, 6, 194, 13, 26, 37, 6, 210,
+ 69, 13, 26, 37, 6, 68, 13, 26, 37, 6, 206, 164, 13, 26, 37, 6, 204, 144,
+ 13, 26, 37, 6, 203, 196, 13, 26, 37, 6, 203, 124, 13, 26, 37, 6, 202,
+ 159, 13, 26, 37, 5, 63, 13, 26, 37, 5, 249, 255, 13, 26, 37, 5, 247, 125,
+ 13, 26, 37, 5, 245, 51, 13, 26, 37, 5, 74, 13, 26, 37, 5, 240, 174, 13,
+ 26, 37, 5, 239, 75, 13, 26, 37, 5, 237, 171, 13, 26, 37, 5, 75, 13, 26,
+ 37, 5, 230, 184, 13, 26, 37, 5, 230, 54, 13, 26, 37, 5, 159, 13, 26, 37,
+ 5, 226, 185, 13, 26, 37, 5, 223, 163, 13, 26, 37, 5, 78, 13, 26, 37, 5,
+ 219, 184, 13, 26, 37, 5, 217, 134, 13, 26, 37, 5, 146, 13, 26, 37, 5,
+ 194, 13, 26, 37, 5, 210, 69, 13, 26, 37, 5, 68, 13, 26, 37, 5, 206, 164,
+ 13, 26, 37, 5, 204, 144, 13, 26, 37, 5, 203, 196, 13, 26, 37, 5, 203,
+ 124, 13, 26, 37, 5, 202, 159, 13, 132, 6, 63, 13, 132, 6, 247, 125, 13,
+ 132, 6, 245, 51, 13, 132, 6, 239, 75, 13, 132, 6, 230, 184, 13, 132, 6,
+ 230, 54, 13, 132, 6, 223, 163, 13, 132, 6, 78, 13, 132, 6, 219, 184, 13,
+ 132, 6, 217, 134, 13, 132, 6, 194, 13, 132, 6, 210, 69, 13, 132, 6, 68,
+ 13, 132, 6, 206, 164, 13, 132, 6, 204, 144, 13, 132, 6, 203, 196, 13,
+ 132, 6, 203, 124, 13, 132, 6, 202, 159, 13, 132, 5, 63, 13, 132, 5, 249,
+ 255, 13, 132, 5, 247, 125, 13, 132, 5, 245, 51, 13, 132, 5, 240, 174, 13,
+ 132, 5, 237, 171, 13, 132, 5, 75, 13, 132, 5, 230, 184, 13, 132, 5, 230,
+ 54, 13, 132, 5, 159, 13, 132, 5, 226, 185, 13, 132, 5, 223, 163, 13, 132,
+ 5, 219, 184, 13, 132, 5, 217, 134, 13, 132, 5, 146, 13, 132, 5, 194, 13,
+ 132, 5, 210, 69, 13, 132, 5, 68, 13, 132, 5, 206, 164, 13, 132, 5, 204,
+ 144, 13, 132, 5, 203, 196, 13, 132, 5, 203, 124, 13, 132, 5, 202, 159,
+ 13, 26, 132, 6, 63, 13, 26, 132, 6, 249, 255, 13, 26, 132, 6, 247, 125,
+ 13, 26, 132, 6, 245, 51, 13, 26, 132, 6, 74, 13, 26, 132, 6, 240, 174,
+ 13, 26, 132, 6, 239, 75, 13, 26, 132, 6, 237, 171, 13, 26, 132, 6, 75,
+ 13, 26, 132, 6, 230, 184, 13, 26, 132, 6, 230, 54, 13, 26, 132, 6, 159,
+ 13, 26, 132, 6, 226, 185, 13, 26, 132, 6, 223, 163, 13, 26, 132, 6, 78,
+ 13, 26, 132, 6, 219, 184, 13, 26, 132, 6, 217, 134, 13, 26, 132, 6, 146,
+ 13, 26, 132, 6, 194, 13, 26, 132, 6, 210, 69, 13, 26, 132, 6, 68, 13, 26,
+ 132, 6, 206, 164, 13, 26, 132, 6, 204, 144, 13, 26, 132, 6, 203, 196, 13,
+ 26, 132, 6, 203, 124, 13, 26, 132, 6, 202, 159, 13, 26, 132, 5, 63, 13,
+ 26, 132, 5, 249, 255, 13, 26, 132, 5, 247, 125, 13, 26, 132, 5, 245, 51,
+ 13, 26, 132, 5, 74, 13, 26, 132, 5, 240, 174, 13, 26, 132, 5, 239, 75,
+ 13, 26, 132, 5, 237, 171, 13, 26, 132, 5, 75, 13, 26, 132, 5, 230, 184,
+ 13, 26, 132, 5, 230, 54, 13, 26, 132, 5, 159, 13, 26, 132, 5, 226, 185,
+ 13, 26, 132, 5, 223, 163, 13, 26, 132, 5, 78, 13, 26, 132, 5, 219, 184,
+ 13, 26, 132, 5, 217, 134, 13, 26, 132, 5, 146, 13, 26, 132, 5, 194, 13,
+ 26, 132, 5, 210, 69, 13, 26, 132, 5, 68, 13, 26, 132, 5, 206, 164, 13,
+ 26, 132, 5, 204, 144, 13, 26, 132, 5, 203, 196, 13, 26, 132, 5, 203, 124,
+ 13, 26, 132, 5, 202, 159, 13, 166, 6, 63, 13, 166, 6, 249, 255, 13, 166,
+ 6, 245, 51, 13, 166, 6, 74, 13, 166, 6, 240, 174, 13, 166, 6, 239, 75,
+ 13, 166, 6, 230, 184, 13, 166, 6, 230, 54, 13, 166, 6, 159, 13, 166, 6,
+ 226, 185, 13, 166, 6, 223, 163, 13, 166, 6, 78, 13, 166, 6, 219, 184, 13,
+ 166, 6, 217, 134, 13, 166, 6, 194, 13, 166, 6, 210, 69, 13, 166, 6, 68,
+ 13, 166, 6, 206, 164, 13, 166, 6, 204, 144, 13, 166, 6, 203, 196, 13,
+ 166, 6, 203, 124, 13, 166, 5, 63, 13, 166, 5, 249, 255, 13, 166, 5, 247,
+ 125, 13, 166, 5, 245, 51, 13, 166, 5, 74, 13, 166, 5, 240, 174, 13, 166,
+ 5, 239, 75, 13, 166, 5, 237, 171, 13, 166, 5, 75, 13, 166, 5, 230, 184,
+ 13, 166, 5, 230, 54, 13, 166, 5, 159, 13, 166, 5, 226, 185, 13, 166, 5,
+ 223, 163, 13, 166, 5, 78, 13, 166, 5, 219, 184, 13, 166, 5, 217, 134, 13,
+ 166, 5, 146, 13, 166, 5, 194, 13, 166, 5, 210, 69, 13, 166, 5, 68, 13,
+ 166, 5, 206, 164, 13, 166, 5, 204, 144, 13, 166, 5, 203, 196, 13, 166, 5,
+ 203, 124, 13, 166, 5, 202, 159, 13, 169, 6, 63, 13, 169, 6, 249, 255, 13,
+ 169, 6, 245, 51, 13, 169, 6, 74, 13, 169, 6, 240, 174, 13, 169, 6, 239,
+ 75, 13, 169, 6, 75, 13, 169, 6, 230, 184, 13, 169, 6, 230, 54, 13, 169,
+ 6, 159, 13, 169, 6, 226, 185, 13, 169, 6, 78, 13, 169, 6, 194, 13, 169,
+ 6, 210, 69, 13, 169, 6, 68, 13, 169, 6, 206, 164, 13, 169, 6, 204, 144,
+ 13, 169, 6, 203, 196, 13, 169, 6, 203, 124, 13, 169, 5, 63, 13, 169, 5,
+ 249, 255, 13, 169, 5, 247, 125, 13, 169, 5, 245, 51, 13, 169, 5, 74, 13,
+ 169, 5, 240, 174, 13, 169, 5, 239, 75, 13, 169, 5, 237, 171, 13, 169, 5,
+ 75, 13, 169, 5, 230, 184, 13, 169, 5, 230, 54, 13, 169, 5, 159, 13, 169,
+ 5, 226, 185, 13, 169, 5, 223, 163, 13, 169, 5, 78, 13, 169, 5, 219, 184,
+ 13, 169, 5, 217, 134, 13, 169, 5, 146, 13, 169, 5, 194, 13, 169, 5, 210,
+ 69, 13, 169, 5, 68, 13, 169, 5, 206, 164, 13, 169, 5, 204, 144, 13, 169,
+ 5, 203, 196, 13, 169, 5, 203, 124, 13, 169, 5, 202, 159, 13, 26, 166, 6,
+ 63, 13, 26, 166, 6, 249, 255, 13, 26, 166, 6, 247, 125, 13, 26, 166, 6,
+ 245, 51, 13, 26, 166, 6, 74, 13, 26, 166, 6, 240, 174, 13, 26, 166, 6,
+ 239, 75, 13, 26, 166, 6, 237, 171, 13, 26, 166, 6, 75, 13, 26, 166, 6,
+ 230, 184, 13, 26, 166, 6, 230, 54, 13, 26, 166, 6, 159, 13, 26, 166, 6,
+ 226, 185, 13, 26, 166, 6, 223, 163, 13, 26, 166, 6, 78, 13, 26, 166, 6,
+ 219, 184, 13, 26, 166, 6, 217, 134, 13, 26, 166, 6, 146, 13, 26, 166, 6,
+ 194, 13, 26, 166, 6, 210, 69, 13, 26, 166, 6, 68, 13, 26, 166, 6, 206,
+ 164, 13, 26, 166, 6, 204, 144, 13, 26, 166, 6, 203, 196, 13, 26, 166, 6,
+ 203, 124, 13, 26, 166, 6, 202, 159, 13, 26, 166, 5, 63, 13, 26, 166, 5,
+ 249, 255, 13, 26, 166, 5, 247, 125, 13, 26, 166, 5, 245, 51, 13, 26, 166,
+ 5, 74, 13, 26, 166, 5, 240, 174, 13, 26, 166, 5, 239, 75, 13, 26, 166, 5,
+ 237, 171, 13, 26, 166, 5, 75, 13, 26, 166, 5, 230, 184, 13, 26, 166, 5,
+ 230, 54, 13, 26, 166, 5, 159, 13, 26, 166, 5, 226, 185, 13, 26, 166, 5,
+ 223, 163, 13, 26, 166, 5, 78, 13, 26, 166, 5, 219, 184, 13, 26, 166, 5,
+ 217, 134, 13, 26, 166, 5, 146, 13, 26, 166, 5, 194, 13, 26, 166, 5, 210,
+ 69, 13, 26, 166, 5, 68, 13, 26, 166, 5, 206, 164, 13, 26, 166, 5, 204,
+ 144, 13, 26, 166, 5, 203, 196, 13, 26, 166, 5, 203, 124, 13, 26, 166, 5,
+ 202, 159, 13, 41, 6, 63, 13, 41, 6, 249, 255, 13, 41, 6, 247, 125, 13,
+ 41, 6, 245, 51, 13, 41, 6, 74, 13, 41, 6, 240, 174, 13, 41, 6, 239, 75,
+ 13, 41, 6, 237, 171, 13, 41, 6, 75, 13, 41, 6, 230, 184, 13, 41, 6, 230,
+ 54, 13, 41, 6, 159, 13, 41, 6, 226, 185, 13, 41, 6, 223, 163, 13, 41, 6,
+ 78, 13, 41, 6, 219, 184, 13, 41, 6, 217, 134, 13, 41, 6, 146, 13, 41, 6,
+ 194, 13, 41, 6, 210, 69, 13, 41, 6, 68, 13, 41, 6, 206, 164, 13, 41, 6,
+ 204, 144, 13, 41, 6, 203, 196, 13, 41, 6, 203, 124, 13, 41, 6, 202, 159,
+ 13, 41, 5, 63, 13, 41, 5, 249, 255, 13, 41, 5, 247, 125, 13, 41, 5, 245,
+ 51, 13, 41, 5, 74, 13, 41, 5, 240, 174, 13, 41, 5, 239, 75, 13, 41, 5,
+ 237, 171, 13, 41, 5, 75, 13, 41, 5, 230, 184, 13, 41, 5, 230, 54, 13, 41,
+ 5, 159, 13, 41, 5, 226, 185, 13, 41, 5, 223, 163, 13, 41, 5, 78, 13, 41,
+ 5, 219, 184, 13, 41, 5, 217, 134, 13, 41, 5, 146, 13, 41, 5, 194, 13, 41,
+ 5, 210, 69, 13, 41, 5, 68, 13, 41, 5, 206, 164, 13, 41, 5, 204, 144, 13,
+ 41, 5, 203, 196, 13, 41, 5, 203, 124, 13, 41, 5, 202, 159, 13, 41, 26, 6,
+ 63, 13, 41, 26, 6, 249, 255, 13, 41, 26, 6, 247, 125, 13, 41, 26, 6, 245,
+ 51, 13, 41, 26, 6, 74, 13, 41, 26, 6, 240, 174, 13, 41, 26, 6, 239, 75,
+ 13, 41, 26, 6, 237, 171, 13, 41, 26, 6, 75, 13, 41, 26, 6, 230, 184, 13,
+ 41, 26, 6, 230, 54, 13, 41, 26, 6, 159, 13, 41, 26, 6, 226, 185, 13, 41,
+ 26, 6, 223, 163, 13, 41, 26, 6, 78, 13, 41, 26, 6, 219, 184, 13, 41, 26,
+ 6, 217, 134, 13, 41, 26, 6, 146, 13, 41, 26, 6, 194, 13, 41, 26, 6, 210,
+ 69, 13, 41, 26, 6, 68, 13, 41, 26, 6, 206, 164, 13, 41, 26, 6, 204, 144,
+ 13, 41, 26, 6, 203, 196, 13, 41, 26, 6, 203, 124, 13, 41, 26, 6, 202,
+ 159, 13, 41, 26, 5, 63, 13, 41, 26, 5, 249, 255, 13, 41, 26, 5, 247, 125,
+ 13, 41, 26, 5, 245, 51, 13, 41, 26, 5, 74, 13, 41, 26, 5, 240, 174, 13,
+ 41, 26, 5, 239, 75, 13, 41, 26, 5, 237, 171, 13, 41, 26, 5, 75, 13, 41,
+ 26, 5, 230, 184, 13, 41, 26, 5, 230, 54, 13, 41, 26, 5, 159, 13, 41, 26,
+ 5, 226, 185, 13, 41, 26, 5, 223, 163, 13, 41, 26, 5, 78, 13, 41, 26, 5,
+ 219, 184, 13, 41, 26, 5, 217, 134, 13, 41, 26, 5, 146, 13, 41, 26, 5,
+ 194, 13, 41, 26, 5, 210, 69, 13, 41, 26, 5, 68, 13, 41, 26, 5, 206, 164,
+ 13, 41, 26, 5, 204, 144, 13, 41, 26, 5, 203, 196, 13, 41, 26, 5, 203,
+ 124, 13, 41, 26, 5, 202, 159, 13, 41, 37, 6, 63, 13, 41, 37, 6, 249, 255,
+ 13, 41, 37, 6, 247, 125, 13, 41, 37, 6, 245, 51, 13, 41, 37, 6, 74, 13,
+ 41, 37, 6, 240, 174, 13, 41, 37, 6, 239, 75, 13, 41, 37, 6, 237, 171, 13,
+ 41, 37, 6, 75, 13, 41, 37, 6, 230, 184, 13, 41, 37, 6, 230, 54, 13, 41,
+ 37, 6, 159, 13, 41, 37, 6, 226, 185, 13, 41, 37, 6, 223, 163, 13, 41, 37,
+ 6, 78, 13, 41, 37, 6, 219, 184, 13, 41, 37, 6, 217, 134, 13, 41, 37, 6,
+ 146, 13, 41, 37, 6, 194, 13, 41, 37, 6, 210, 69, 13, 41, 37, 6, 68, 13,
+ 41, 37, 6, 206, 164, 13, 41, 37, 6, 204, 144, 13, 41, 37, 6, 203, 196,
+ 13, 41, 37, 6, 203, 124, 13, 41, 37, 6, 202, 159, 13, 41, 37, 5, 63, 13,
+ 41, 37, 5, 249, 255, 13, 41, 37, 5, 247, 125, 13, 41, 37, 5, 245, 51, 13,
+ 41, 37, 5, 74, 13, 41, 37, 5, 240, 174, 13, 41, 37, 5, 239, 75, 13, 41,
+ 37, 5, 237, 171, 13, 41, 37, 5, 75, 13, 41, 37, 5, 230, 184, 13, 41, 37,
+ 5, 230, 54, 13, 41, 37, 5, 159, 13, 41, 37, 5, 226, 185, 13, 41, 37, 5,
+ 223, 163, 13, 41, 37, 5, 78, 13, 41, 37, 5, 219, 184, 13, 41, 37, 5, 217,
+ 134, 13, 41, 37, 5, 146, 13, 41, 37, 5, 194, 13, 41, 37, 5, 210, 69, 13,
+ 41, 37, 5, 68, 13, 41, 37, 5, 206, 164, 13, 41, 37, 5, 204, 144, 13, 41,
+ 37, 5, 203, 196, 13, 41, 37, 5, 203, 124, 13, 41, 37, 5, 202, 159, 13,
+ 41, 26, 37, 6, 63, 13, 41, 26, 37, 6, 249, 255, 13, 41, 26, 37, 6, 247,
+ 125, 13, 41, 26, 37, 6, 245, 51, 13, 41, 26, 37, 6, 74, 13, 41, 26, 37,
+ 6, 240, 174, 13, 41, 26, 37, 6, 239, 75, 13, 41, 26, 37, 6, 237, 171, 13,
+ 41, 26, 37, 6, 75, 13, 41, 26, 37, 6, 230, 184, 13, 41, 26, 37, 6, 230,
+ 54, 13, 41, 26, 37, 6, 159, 13, 41, 26, 37, 6, 226, 185, 13, 41, 26, 37,
+ 6, 223, 163, 13, 41, 26, 37, 6, 78, 13, 41, 26, 37, 6, 219, 184, 13, 41,
+ 26, 37, 6, 217, 134, 13, 41, 26, 37, 6, 146, 13, 41, 26, 37, 6, 194, 13,
+ 41, 26, 37, 6, 210, 69, 13, 41, 26, 37, 6, 68, 13, 41, 26, 37, 6, 206,
+ 164, 13, 41, 26, 37, 6, 204, 144, 13, 41, 26, 37, 6, 203, 196, 13, 41,
+ 26, 37, 6, 203, 124, 13, 41, 26, 37, 6, 202, 159, 13, 41, 26, 37, 5, 63,
+ 13, 41, 26, 37, 5, 249, 255, 13, 41, 26, 37, 5, 247, 125, 13, 41, 26, 37,
+ 5, 245, 51, 13, 41, 26, 37, 5, 74, 13, 41, 26, 37, 5, 240, 174, 13, 41,
+ 26, 37, 5, 239, 75, 13, 41, 26, 37, 5, 237, 171, 13, 41, 26, 37, 5, 75,
+ 13, 41, 26, 37, 5, 230, 184, 13, 41, 26, 37, 5, 230, 54, 13, 41, 26, 37,
+ 5, 159, 13, 41, 26, 37, 5, 226, 185, 13, 41, 26, 37, 5, 223, 163, 13, 41,
+ 26, 37, 5, 78, 13, 41, 26, 37, 5, 219, 184, 13, 41, 26, 37, 5, 217, 134,
+ 13, 41, 26, 37, 5, 146, 13, 41, 26, 37, 5, 194, 13, 41, 26, 37, 5, 210,
+ 69, 13, 41, 26, 37, 5, 68, 13, 41, 26, 37, 5, 206, 164, 13, 41, 26, 37,
+ 5, 204, 144, 13, 41, 26, 37, 5, 203, 196, 13, 41, 26, 37, 5, 203, 124,
+ 13, 41, 26, 37, 5, 202, 159, 13, 224, 41, 6, 63, 13, 224, 41, 6, 249,
+ 255, 13, 224, 41, 6, 247, 125, 13, 224, 41, 6, 245, 51, 13, 224, 41, 6,
+ 74, 13, 224, 41, 6, 240, 174, 13, 224, 41, 6, 239, 75, 13, 224, 41, 6,
+ 237, 171, 13, 224, 41, 6, 75, 13, 224, 41, 6, 230, 184, 13, 224, 41, 6,
+ 230, 54, 13, 224, 41, 6, 159, 13, 224, 41, 6, 226, 185, 13, 224, 41, 6,
+ 223, 163, 13, 224, 41, 6, 78, 13, 224, 41, 6, 219, 184, 13, 224, 41, 6,
+ 217, 134, 13, 224, 41, 6, 146, 13, 224, 41, 6, 194, 13, 224, 41, 6, 210,
+ 69, 13, 224, 41, 6, 68, 13, 224, 41, 6, 206, 164, 13, 224, 41, 6, 204,
+ 144, 13, 224, 41, 6, 203, 196, 13, 224, 41, 6, 203, 124, 13, 224, 41, 6,
+ 202, 159, 13, 224, 41, 5, 63, 13, 224, 41, 5, 249, 255, 13, 224, 41, 5,
+ 247, 125, 13, 224, 41, 5, 245, 51, 13, 224, 41, 5, 74, 13, 224, 41, 5,
+ 240, 174, 13, 224, 41, 5, 239, 75, 13, 224, 41, 5, 237, 171, 13, 224, 41,
+ 5, 75, 13, 224, 41, 5, 230, 184, 13, 224, 41, 5, 230, 54, 13, 224, 41, 5,
+ 159, 13, 224, 41, 5, 226, 185, 13, 224, 41, 5, 223, 163, 13, 224, 41, 5,
+ 78, 13, 224, 41, 5, 219, 184, 13, 224, 41, 5, 217, 134, 13, 224, 41, 5,
+ 146, 13, 224, 41, 5, 194, 13, 224, 41, 5, 210, 69, 13, 224, 41, 5, 68,
+ 13, 224, 41, 5, 206, 164, 13, 224, 41, 5, 204, 144, 13, 224, 41, 5, 203,
+ 196, 13, 224, 41, 5, 203, 124, 13, 224, 41, 5, 202, 159, 13, 37, 5, 243,
+ 84, 75, 13, 37, 5, 243, 84, 230, 184, 13, 26, 6, 251, 2, 13, 26, 6, 248,
+ 106, 13, 26, 6, 238, 235, 13, 26, 6, 244, 37, 13, 26, 6, 241, 37, 13, 26,
+ 6, 202, 83, 13, 26, 6, 240, 248, 13, 26, 6, 209, 74, 13, 26, 6, 230, 230,
+ 13, 26, 6, 229, 247, 13, 26, 6, 228, 24, 13, 26, 6, 223, 246, 13, 26, 6,
+ 221, 84, 13, 26, 6, 203, 170, 13, 26, 6, 220, 34, 13, 26, 6, 218, 167,
+ 13, 26, 6, 216, 59, 13, 26, 6, 209, 75, 97, 13, 26, 6, 212, 144, 13, 26,
+ 6, 209, 207, 13, 26, 6, 206, 216, 13, 26, 6, 218, 192, 13, 26, 6, 246,
+ 142, 13, 26, 6, 217, 202, 13, 26, 6, 220, 36, 13, 26, 223, 101, 13, 26,
+ 5, 251, 2, 13, 26, 5, 248, 106, 13, 26, 5, 238, 235, 13, 26, 5, 244, 37,
+ 13, 26, 5, 241, 37, 13, 26, 5, 202, 83, 13, 26, 5, 240, 248, 13, 26, 5,
+ 209, 74, 13, 26, 5, 230, 230, 13, 26, 5, 229, 247, 13, 26, 5, 228, 24,
+ 13, 26, 5, 223, 246, 13, 26, 5, 221, 84, 13, 26, 5, 203, 170, 13, 26, 5,
+ 220, 34, 13, 26, 5, 218, 167, 13, 26, 5, 216, 59, 13, 26, 5, 46, 212,
+ 144, 13, 26, 5, 212, 144, 13, 26, 5, 209, 207, 13, 26, 5, 206, 216, 13,
+ 26, 5, 218, 192, 13, 26, 5, 246, 142, 13, 26, 5, 217, 202, 13, 26, 5,
+ 220, 36, 13, 26, 219, 69, 243, 205, 13, 26, 241, 38, 97, 13, 26, 209, 75,
+ 97, 13, 26, 229, 248, 97, 13, 26, 218, 193, 97, 13, 26, 216, 60, 97, 13,
+ 26, 218, 168, 97, 13, 37, 6, 251, 2, 13, 37, 6, 248, 106, 13, 37, 6, 238,
+ 235, 13, 37, 6, 244, 37, 13, 37, 6, 241, 37, 13, 37, 6, 202, 83, 13, 37,
+ 6, 240, 248, 13, 37, 6, 209, 74, 13, 37, 6, 230, 230, 13, 37, 6, 229,
+ 247, 13, 37, 6, 228, 24, 13, 37, 6, 223, 246, 13, 37, 6, 221, 84, 13, 37,
+ 6, 203, 170, 13, 37, 6, 220, 34, 13, 37, 6, 218, 167, 13, 37, 6, 216, 59,
+ 13, 37, 6, 209, 75, 97, 13, 37, 6, 212, 144, 13, 37, 6, 209, 207, 13, 37,
+ 6, 206, 216, 13, 37, 6, 218, 192, 13, 37, 6, 246, 142, 13, 37, 6, 217,
+ 202, 13, 37, 6, 220, 36, 13, 37, 223, 101, 13, 37, 5, 251, 2, 13, 37, 5,
+ 248, 106, 13, 37, 5, 238, 235, 13, 37, 5, 244, 37, 13, 37, 5, 241, 37,
+ 13, 37, 5, 202, 83, 13, 37, 5, 240, 248, 13, 37, 5, 209, 74, 13, 37, 5,
+ 230, 230, 13, 37, 5, 229, 247, 13, 37, 5, 228, 24, 13, 37, 5, 223, 246,
+ 13, 37, 5, 221, 84, 13, 37, 5, 203, 170, 13, 37, 5, 220, 34, 13, 37, 5,
+ 218, 167, 13, 37, 5, 216, 59, 13, 37, 5, 46, 212, 144, 13, 37, 5, 212,
+ 144, 13, 37, 5, 209, 207, 13, 37, 5, 206, 216, 13, 37, 5, 218, 192, 13,
+ 37, 5, 246, 142, 13, 37, 5, 217, 202, 13, 37, 5, 220, 36, 13, 37, 219,
+ 69, 243, 205, 13, 37, 241, 38, 97, 13, 37, 209, 75, 97, 13, 37, 229, 248,
+ 97, 13, 37, 218, 193, 97, 13, 37, 216, 60, 97, 13, 37, 218, 168, 97, 13,
+ 26, 37, 6, 251, 2, 13, 26, 37, 6, 248, 106, 13, 26, 37, 6, 238, 235, 13,
+ 26, 37, 6, 244, 37, 13, 26, 37, 6, 241, 37, 13, 26, 37, 6, 202, 83, 13,
+ 26, 37, 6, 240, 248, 13, 26, 37, 6, 209, 74, 13, 26, 37, 6, 230, 230, 13,
+ 26, 37, 6, 229, 247, 13, 26, 37, 6, 228, 24, 13, 26, 37, 6, 223, 246, 13,
+ 26, 37, 6, 221, 84, 13, 26, 37, 6, 203, 170, 13, 26, 37, 6, 220, 34, 13,
+ 26, 37, 6, 218, 167, 13, 26, 37, 6, 216, 59, 13, 26, 37, 6, 209, 75, 97,
+ 13, 26, 37, 6, 212, 144, 13, 26, 37, 6, 209, 207, 13, 26, 37, 6, 206,
+ 216, 13, 26, 37, 6, 218, 192, 13, 26, 37, 6, 246, 142, 13, 26, 37, 6,
+ 217, 202, 13, 26, 37, 6, 220, 36, 13, 26, 37, 223, 101, 13, 26, 37, 5,
+ 251, 2, 13, 26, 37, 5, 248, 106, 13, 26, 37, 5, 238, 235, 13, 26, 37, 5,
+ 244, 37, 13, 26, 37, 5, 241, 37, 13, 26, 37, 5, 202, 83, 13, 26, 37, 5,
+ 240, 248, 13, 26, 37, 5, 209, 74, 13, 26, 37, 5, 230, 230, 13, 26, 37, 5,
+ 229, 247, 13, 26, 37, 5, 228, 24, 13, 26, 37, 5, 223, 246, 13, 26, 37, 5,
+ 221, 84, 13, 26, 37, 5, 203, 170, 13, 26, 37, 5, 220, 34, 13, 26, 37, 5,
+ 218, 167, 13, 26, 37, 5, 216, 59, 13, 26, 37, 5, 46, 212, 144, 13, 26,
+ 37, 5, 212, 144, 13, 26, 37, 5, 209, 207, 13, 26, 37, 5, 206, 216, 13,
+ 26, 37, 5, 218, 192, 13, 26, 37, 5, 246, 142, 13, 26, 37, 5, 217, 202,
+ 13, 26, 37, 5, 220, 36, 13, 26, 37, 219, 69, 243, 205, 13, 26, 37, 241,
+ 38, 97, 13, 26, 37, 209, 75, 97, 13, 26, 37, 229, 248, 97, 13, 26, 37,
+ 218, 193, 97, 13, 26, 37, 216, 60, 97, 13, 26, 37, 218, 168, 97, 13, 41,
+ 26, 6, 251, 2, 13, 41, 26, 6, 248, 106, 13, 41, 26, 6, 238, 235, 13, 41,
+ 26, 6, 244, 37, 13, 41, 26, 6, 241, 37, 13, 41, 26, 6, 202, 83, 13, 41,
+ 26, 6, 240, 248, 13, 41, 26, 6, 209, 74, 13, 41, 26, 6, 230, 230, 13, 41,
+ 26, 6, 229, 247, 13, 41, 26, 6, 228, 24, 13, 41, 26, 6, 223, 246, 13, 41,
+ 26, 6, 221, 84, 13, 41, 26, 6, 203, 170, 13, 41, 26, 6, 220, 34, 13, 41,
+ 26, 6, 218, 167, 13, 41, 26, 6, 216, 59, 13, 41, 26, 6, 209, 75, 97, 13,
+ 41, 26, 6, 212, 144, 13, 41, 26, 6, 209, 207, 13, 41, 26, 6, 206, 216,
+ 13, 41, 26, 6, 218, 192, 13, 41, 26, 6, 246, 142, 13, 41, 26, 6, 217,
+ 202, 13, 41, 26, 6, 220, 36, 13, 41, 26, 223, 101, 13, 41, 26, 5, 251, 2,
+ 13, 41, 26, 5, 248, 106, 13, 41, 26, 5, 238, 235, 13, 41, 26, 5, 244, 37,
+ 13, 41, 26, 5, 241, 37, 13, 41, 26, 5, 202, 83, 13, 41, 26, 5, 240, 248,
+ 13, 41, 26, 5, 209, 74, 13, 41, 26, 5, 230, 230, 13, 41, 26, 5, 229, 247,
+ 13, 41, 26, 5, 228, 24, 13, 41, 26, 5, 223, 246, 13, 41, 26, 5, 221, 84,
+ 13, 41, 26, 5, 203, 170, 13, 41, 26, 5, 220, 34, 13, 41, 26, 5, 218, 167,
+ 13, 41, 26, 5, 216, 59, 13, 41, 26, 5, 46, 212, 144, 13, 41, 26, 5, 212,
+ 144, 13, 41, 26, 5, 209, 207, 13, 41, 26, 5, 206, 216, 13, 41, 26, 5,
+ 218, 192, 13, 41, 26, 5, 246, 142, 13, 41, 26, 5, 217, 202, 13, 41, 26,
+ 5, 220, 36, 13, 41, 26, 219, 69, 243, 205, 13, 41, 26, 241, 38, 97, 13,
+ 41, 26, 209, 75, 97, 13, 41, 26, 229, 248, 97, 13, 41, 26, 218, 193, 97,
+ 13, 41, 26, 216, 60, 97, 13, 41, 26, 218, 168, 97, 13, 41, 26, 37, 6,
+ 251, 2, 13, 41, 26, 37, 6, 248, 106, 13, 41, 26, 37, 6, 238, 235, 13, 41,
+ 26, 37, 6, 244, 37, 13, 41, 26, 37, 6, 241, 37, 13, 41, 26, 37, 6, 202,
+ 83, 13, 41, 26, 37, 6, 240, 248, 13, 41, 26, 37, 6, 209, 74, 13, 41, 26,
+ 37, 6, 230, 230, 13, 41, 26, 37, 6, 229, 247, 13, 41, 26, 37, 6, 228, 24,
+ 13, 41, 26, 37, 6, 223, 246, 13, 41, 26, 37, 6, 221, 84, 13, 41, 26, 37,
+ 6, 203, 170, 13, 41, 26, 37, 6, 220, 34, 13, 41, 26, 37, 6, 218, 167, 13,
+ 41, 26, 37, 6, 216, 59, 13, 41, 26, 37, 6, 209, 75, 97, 13, 41, 26, 37,
+ 6, 212, 144, 13, 41, 26, 37, 6, 209, 207, 13, 41, 26, 37, 6, 206, 216,
+ 13, 41, 26, 37, 6, 218, 192, 13, 41, 26, 37, 6, 246, 142, 13, 41, 26, 37,
+ 6, 217, 202, 13, 41, 26, 37, 6, 220, 36, 13, 41, 26, 37, 223, 101, 13,
+ 41, 26, 37, 5, 251, 2, 13, 41, 26, 37, 5, 248, 106, 13, 41, 26, 37, 5,
+ 238, 235, 13, 41, 26, 37, 5, 244, 37, 13, 41, 26, 37, 5, 241, 37, 13, 41,
+ 26, 37, 5, 202, 83, 13, 41, 26, 37, 5, 240, 248, 13, 41, 26, 37, 5, 209,
+ 74, 13, 41, 26, 37, 5, 230, 230, 13, 41, 26, 37, 5, 229, 247, 13, 41, 26,
+ 37, 5, 228, 24, 13, 41, 26, 37, 5, 223, 246, 13, 41, 26, 37, 5, 221, 84,
+ 13, 41, 26, 37, 5, 203, 170, 13, 41, 26, 37, 5, 220, 34, 13, 41, 26, 37,
+ 5, 218, 167, 13, 41, 26, 37, 5, 216, 59, 13, 41, 26, 37, 5, 46, 212, 144,
+ 13, 41, 26, 37, 5, 212, 144, 13, 41, 26, 37, 5, 209, 207, 13, 41, 26, 37,
+ 5, 206, 216, 13, 41, 26, 37, 5, 218, 192, 13, 41, 26, 37, 5, 246, 142,
+ 13, 41, 26, 37, 5, 217, 202, 13, 41, 26, 37, 5, 220, 36, 13, 41, 26, 37,
+ 219, 69, 243, 205, 13, 41, 26, 37, 241, 38, 97, 13, 41, 26, 37, 209, 75,
+ 97, 13, 41, 26, 37, 229, 248, 97, 13, 41, 26, 37, 218, 193, 97, 13, 41,
+ 26, 37, 216, 60, 97, 13, 41, 26, 37, 218, 168, 97, 13, 26, 6, 243, 199,
+ 13, 26, 5, 243, 199, 13, 26, 17, 202, 84, 13, 26, 17, 105, 13, 26, 17,
+ 108, 13, 26, 17, 147, 13, 26, 17, 149, 13, 26, 17, 170, 13, 26, 17, 195,
+ 13, 26, 17, 213, 111, 13, 26, 17, 199, 13, 26, 17, 222, 63, 13, 169, 17,
+ 202, 84, 13, 169, 17, 105, 13, 169, 17, 108, 13, 169, 17, 147, 13, 169,
+ 17, 149, 13, 169, 17, 170, 13, 169, 17, 195, 13, 169, 17, 213, 111, 13,
+ 169, 17, 199, 13, 169, 17, 222, 63, 13, 41, 17, 202, 84, 13, 41, 17, 105,
+ 13, 41, 17, 108, 13, 41, 17, 147, 13, 41, 17, 149, 13, 41, 17, 170, 13,
+ 41, 17, 195, 13, 41, 17, 213, 111, 13, 41, 17, 199, 13, 41, 17, 222, 63,
+ 13, 41, 26, 17, 202, 84, 13, 41, 26, 17, 105, 13, 41, 26, 17, 108, 13,
+ 41, 26, 17, 147, 13, 41, 26, 17, 149, 13, 41, 26, 17, 170, 13, 41, 26,
+ 17, 195, 13, 41, 26, 17, 213, 111, 13, 41, 26, 17, 199, 13, 41, 26, 17,
+ 222, 63, 13, 224, 41, 17, 202, 84, 13, 224, 41, 17, 105, 13, 224, 41, 17,
+ 108, 13, 224, 41, 17, 147, 13, 224, 41, 17, 149, 13, 224, 41, 17, 170,
+ 13, 224, 41, 17, 195, 13, 224, 41, 17, 213, 111, 13, 224, 41, 17, 199,
+ 13, 224, 41, 17, 222, 63, 21, 128, 231, 35, 21, 237, 120, 231, 35, 21,
+ 237, 116, 231, 35, 21, 237, 105, 231, 35, 21, 237, 109, 231, 35, 21, 237,
+ 122, 231, 35, 21, 128, 122, 248, 117, 21, 237, 120, 122, 248, 117, 21,
+ 128, 148, 206, 248, 122, 248, 117, 21, 128, 122, 216, 188, 229, 29, 21,
+ 128, 122, 245, 97, 21, 128, 122, 236, 235, 21, 128, 122, 236, 236, 227,
+ 0, 21, 237, 120, 122, 236, 237, 21, 128, 122, 224, 148, 21, 237, 120,
+ 122, 224, 148, 21, 128, 122, 101, 248, 117, 21, 128, 122, 101, 216, 188,
+ 229, 28, 21, 128, 122, 101, 236, 235, 21, 128, 122, 112, 101, 236, 235,
+ 21, 128, 122, 236, 236, 101, 206, 224, 21, 128, 122, 101, 245, 207, 21,
+ 128, 122, 101, 245, 208, 122, 248, 117, 21, 128, 122, 101, 245, 208, 101,
+ 248, 117, 21, 128, 122, 101, 245, 208, 245, 97, 21, 128, 122, 101, 245,
+ 208, 236, 235, 21, 128, 122, 101, 245, 127, 21, 237, 120, 122, 101, 245,
+ 127, 21, 128, 101, 248, 118, 115, 231, 35, 21, 128, 122, 248, 118, 115,
+ 224, 148, 21, 128, 122, 101, 209, 21, 21, 237, 120, 122, 101, 209, 21,
+ 21, 128, 122, 101, 211, 53, 148, 248, 117, 21, 128, 122, 101, 248, 118,
+ 148, 211, 52, 21, 128, 122, 101, 148, 248, 117, 21, 128, 122, 101, 236,
+ 236, 211, 186, 148, 212, 155, 21, 128, 122, 112, 101, 236, 236, 148, 212,
+ 155, 21, 128, 122, 112, 101, 236, 236, 148, 245, 207, 21, 128, 122, 236,
+ 236, 101, 112, 148, 212, 155, 21, 128, 122, 101, 112, 211, 186, 148, 239,
+ 151, 21, 128, 122, 101, 148, 245, 97, 21, 128, 122, 101, 148, 246, 60,
+ 21, 128, 122, 101, 148, 236, 114, 21, 128, 122, 101, 148, 236, 235, 21,
+ 128, 148, 248, 104, 122, 101, 211, 52, 21, 128, 122, 101, 245, 208, 148,
+ 212, 155, 21, 128, 122, 101, 245, 208, 148, 212, 156, 245, 207, 21, 128,
+ 122, 101, 245, 208, 148, 212, 156, 248, 117, 21, 128, 101, 148, 236, 115,
+ 122, 206, 224, 21, 128, 122, 148, 236, 115, 101, 206, 224, 21, 128, 122,
+ 101, 245, 208, 236, 236, 148, 212, 155, 21, 128, 122, 101, 245, 128, 148,
+ 212, 155, 21, 128, 122, 101, 245, 208, 148, 239, 151, 21, 128, 122, 101,
+ 245, 208, 245, 98, 148, 239, 151, 21, 128, 101, 148, 245, 98, 122, 206,
+ 224, 21, 128, 122, 148, 245, 98, 101, 206, 224, 21, 128, 101, 148, 43,
+ 122, 206, 224, 21, 128, 101, 148, 43, 122, 236, 235, 21, 128, 122, 148,
+ 250, 216, 219, 212, 101, 206, 224, 21, 128, 122, 148, 250, 216, 231, 50,
+ 101, 206, 224, 21, 128, 122, 148, 43, 101, 206, 224, 21, 128, 122, 101,
+ 148, 245, 208, 236, 235, 21, 128, 122, 101, 148, 250, 216, 219, 211, 21,
+ 128, 122, 101, 148, 250, 215, 21, 128, 101, 148, 250, 216, 219, 212, 122,
+ 206, 224, 21, 128, 101, 148, 250, 216, 219, 212, 122, 245, 127, 21, 128,
+ 101, 148, 250, 216, 122, 206, 224, 21, 128, 122, 148, 236, 115, 101, 236,
+ 235, 21, 237, 111, 239, 147, 239, 253, 21, 237, 111, 239, 147, 239, 254,
+ 248, 117, 21, 237, 111, 239, 147, 239, 254, 236, 235, 21, 237, 111, 239,
+ 147, 239, 254, 245, 207, 21, 237, 111, 239, 147, 239, 254, 245, 208, 211,
+ 193, 21, 237, 118, 239, 147, 239, 254, 245, 207, 21, 128, 239, 147, 239,
+ 254, 245, 208, 248, 117, 21, 237, 109, 239, 147, 239, 254, 245, 207, 21,
+ 237, 111, 239, 233, 239, 254, 211, 185, 21, 237, 111, 237, 46, 239, 233,
+ 239, 254, 211, 185, 21, 237, 111, 239, 233, 239, 254, 211, 186, 239, 147,
+ 248, 117, 21, 237, 111, 237, 46, 239, 233, 239, 254, 211, 186, 239, 147,
+ 248, 117, 21, 237, 111, 239, 233, 239, 254, 211, 186, 248, 117, 21, 237,
+ 111, 237, 46, 239, 233, 239, 254, 211, 186, 248, 117, 21, 237, 111, 239,
+ 233, 239, 254, 211, 186, 148, 239, 151, 21, 237, 116, 239, 233, 239, 254,
+ 211, 185, 21, 237, 116, 239, 233, 239, 254, 211, 186, 220, 8, 21, 237,
+ 109, 239, 233, 239, 254, 211, 186, 220, 8, 21, 237, 105, 239, 233, 239,
+ 254, 211, 185, 21, 237, 111, 239, 233, 239, 254, 211, 186, 236, 235, 21,
+ 237, 111, 239, 233, 239, 254, 211, 186, 236, 236, 148, 212, 155, 21, 237,
+ 111, 239, 233, 239, 254, 211, 186, 236, 236, 221, 192, 209, 21, 21, 237,
+ 110, 21, 237, 111, 248, 104, 219, 135, 240, 94, 21, 237, 111, 237, 45,
+ 21, 237, 111, 148, 212, 155, 21, 237, 111, 237, 46, 148, 212, 155, 21,
+ 237, 111, 148, 248, 117, 21, 237, 111, 148, 239, 151, 21, 237, 111, 211,
+ 194, 122, 148, 212, 155, 21, 237, 111, 211, 194, 246, 217, 21, 237, 111,
+ 211, 194, 246, 218, 148, 212, 155, 21, 237, 111, 211, 194, 246, 218, 148,
+ 212, 156, 248, 117, 21, 237, 111, 211, 194, 227, 85, 21, 237, 117, 21,
+ 237, 118, 148, 212, 155, 21, 237, 118, 221, 192, 209, 21, 21, 237, 118,
+ 148, 239, 151, 21, 237, 107, 245, 94, 21, 237, 106, 21, 237, 116, 220, 8,
+ 21, 237, 115, 21, 237, 116, 171, 148, 212, 155, 21, 237, 116, 148, 212,
+ 155, 21, 237, 116, 171, 221, 192, 209, 21, 21, 237, 116, 221, 192, 209,
+ 21, 21, 237, 116, 171, 148, 239, 151, 21, 237, 116, 148, 239, 151, 21,
+ 237, 114, 220, 8, 21, 237, 113, 21, 237, 119, 21, 237, 104, 21, 237, 105,
+ 148, 212, 155, 21, 237, 105, 221, 192, 209, 21, 21, 237, 105, 148, 239,
+ 151, 21, 237, 109, 220, 8, 21, 237, 109, 171, 148, 239, 151, 21, 237,
+ 108, 21, 237, 109, 212, 36, 21, 237, 109, 171, 148, 212, 155, 21, 237,
+ 109, 148, 212, 155, 21, 237, 109, 171, 221, 192, 209, 21, 21, 237, 109,
+ 221, 192, 209, 21, 21, 237, 109, 148, 212, 156, 208, 127, 231, 35, 21,
+ 237, 109, 148, 248, 104, 101, 215, 252, 21, 237, 121, 21, 128, 122, 101,
+ 215, 252, 21, 237, 120, 122, 101, 215, 252, 21, 237, 109, 122, 101, 215,
+ 252, 21, 237, 122, 122, 101, 215, 252, 21, 237, 109, 227, 85, 21, 128,
+ 122, 101, 215, 253, 248, 117, 21, 128, 122, 101, 215, 253, 245, 207, 21,
+ 237, 109, 122, 101, 215, 253, 245, 207, 21, 128, 227, 86, 242, 70, 21,
+ 128, 227, 86, 121, 215, 248, 211, 52, 21, 128, 227, 86, 121, 215, 248,
+ 245, 85, 21, 128, 227, 86, 121, 219, 220, 246, 60, 21, 128, 227, 86, 206,
+ 224, 21, 128, 148, 206, 248, 227, 86, 206, 224, 21, 237, 120, 227, 86,
+ 206, 224, 21, 237, 105, 227, 86, 206, 224, 21, 237, 122, 227, 86, 206,
+ 224, 21, 128, 227, 86, 216, 188, 229, 29, 21, 128, 227, 86, 248, 117, 21,
+ 128, 227, 86, 208, 128, 209, 21, 21, 128, 227, 86, 209, 21, 21, 237, 109,
+ 227, 86, 209, 21, 21, 128, 227, 86, 122, 209, 21, 21, 237, 109, 227, 86,
+ 122, 209, 21, 21, 237, 122, 227, 86, 122, 148, 122, 148, 219, 211, 21,
+ 237, 122, 227, 86, 122, 148, 122, 209, 21, 21, 128, 227, 86, 231, 35, 21,
+ 237, 120, 227, 86, 231, 35, 21, 237, 109, 227, 86, 231, 35, 21, 237, 122,
+ 227, 86, 231, 35, 21, 128, 122, 101, 227, 85, 21, 237, 120, 122, 101,
+ 227, 85, 21, 237, 109, 122, 101, 227, 85, 21, 237, 109, 215, 252, 21,
+ 237, 122, 122, 101, 227, 85, 21, 128, 122, 101, 245, 131, 227, 85, 21,
+ 237, 120, 122, 101, 245, 131, 227, 85, 21, 128, 215, 253, 242, 70, 21,
+ 237, 109, 215, 253, 121, 122, 148, 236, 116, 224, 148, 21, 237, 122, 215,
+ 253, 121, 101, 148, 122, 245, 130, 21, 128, 215, 253, 206, 224, 21, 128,
+ 215, 253, 216, 188, 229, 29, 21, 128, 215, 253, 227, 85, 21, 237, 120,
+ 215, 253, 227, 85, 21, 237, 105, 215, 253, 227, 85, 21, 237, 122, 215,
+ 253, 227, 85, 21, 128, 215, 253, 224, 148, 21, 128, 215, 253, 101, 245,
+ 207, 21, 128, 215, 253, 101, 216, 188, 229, 28, 21, 128, 215, 253, 231,
+ 35, 21, 128, 215, 253, 209, 21, 21, 237, 107, 215, 253, 209, 21, 21, 128,
+ 122, 215, 253, 227, 85, 21, 237, 120, 122, 215, 253, 227, 85, 21, 237,
+ 114, 122, 215, 253, 227, 86, 220, 31, 21, 237, 107, 122, 215, 253, 227,
+ 86, 219, 211, 21, 237, 107, 122, 215, 253, 227, 86, 231, 49, 21, 237,
+ 107, 122, 215, 253, 227, 86, 206, 247, 21, 237, 116, 122, 215, 253, 227,
+ 85, 21, 237, 109, 122, 215, 253, 227, 85, 21, 237, 122, 122, 215, 253,
+ 227, 86, 219, 211, 21, 237, 122, 122, 215, 253, 227, 85, 21, 128, 101,
+ 242, 70, 21, 237, 109, 224, 148, 21, 128, 101, 206, 224, 21, 237, 120,
+ 101, 206, 224, 21, 128, 101, 216, 188, 229, 29, 21, 128, 101, 112, 148,
+ 212, 155, 21, 237, 107, 101, 209, 21, 21, 128, 101, 148, 227, 85, 21,
+ 128, 101, 227, 85, 21, 128, 101, 215, 253, 227, 85, 21, 237, 120, 101,
+ 215, 253, 227, 85, 21, 237, 114, 101, 215, 253, 227, 86, 220, 31, 21,
+ 237, 116, 101, 215, 253, 227, 85, 21, 237, 109, 101, 215, 253, 227, 85,
+ 21, 237, 122, 101, 215, 253, 227, 86, 219, 211, 21, 237, 122, 101, 215,
+ 253, 227, 86, 231, 49, 21, 237, 122, 101, 215, 253, 227, 85, 21, 237,
+ 120, 101, 215, 253, 227, 86, 248, 117, 21, 237, 118, 101, 215, 253, 227,
+ 86, 245, 207, 21, 237, 118, 101, 215, 253, 227, 86, 245, 208, 212, 155,
+ 21, 237, 107, 101, 215, 253, 227, 86, 245, 208, 219, 211, 21, 237, 107,
+ 101, 215, 253, 227, 86, 245, 208, 231, 49, 21, 237, 107, 101, 215, 253,
+ 227, 86, 245, 207, 21, 237, 109, 122, 236, 235, 21, 128, 122, 148, 212,
+ 155, 21, 237, 109, 122, 148, 212, 155, 21, 128, 122, 148, 212, 156, 148,
+ 243, 227, 21, 128, 122, 148, 212, 156, 148, 245, 207, 21, 128, 122, 148,
+ 212, 156, 148, 248, 117, 21, 128, 122, 148, 212, 156, 122, 248, 117, 21,
+ 128, 122, 148, 212, 156, 247, 251, 248, 117, 21, 128, 122, 148, 212, 156,
+ 122, 236, 237, 21, 128, 122, 148, 239, 152, 122, 211, 52, 21, 128, 122,
+ 148, 239, 152, 122, 248, 117, 21, 128, 122, 148, 113, 21, 128, 122, 148,
+ 245, 94, 21, 128, 122, 148, 245, 88, 148, 231, 6, 21, 237, 118, 122, 148,
+ 245, 88, 148, 231, 6, 21, 128, 122, 148, 245, 88, 148, 206, 247, 21, 128,
+ 122, 148, 246, 61, 21, 237, 116, 122, 209, 21, 21, 237, 116, 122, 148,
+ 220, 8, 21, 237, 109, 122, 148, 220, 8, 21, 237, 109, 122, 148, 228, 7,
+ 21, 237, 109, 122, 209, 21, 21, 237, 109, 122, 148, 212, 36, 21, 237,
+ 122, 122, 148, 219, 211, 21, 237, 122, 122, 148, 231, 49, 21, 237, 122,
+ 122, 209, 21, 21, 128, 209, 21, 21, 128, 148, 237, 45, 21, 128, 148, 212,
+ 156, 243, 227, 21, 128, 148, 212, 156, 245, 207, 21, 128, 148, 212, 156,
+ 248, 117, 21, 128, 148, 239, 151, 21, 128, 148, 248, 104, 122, 224, 148,
+ 21, 128, 148, 248, 104, 101, 215, 252, 21, 128, 148, 248, 104, 215, 253,
+ 227, 85, 21, 128, 148, 206, 248, 120, 239, 253, 21, 128, 148, 115, 120,
+ 239, 253, 21, 128, 148, 206, 248, 126, 239, 253, 21, 128, 148, 206, 248,
+ 239, 147, 239, 253, 21, 128, 148, 115, 239, 147, 216, 188, 229, 28, 21,
+ 237, 112, 21, 128, 237, 45, 21, 208, 129, 212, 119, 21, 208, 129, 223,
+ 225, 21, 208, 129, 248, 103, 21, 238, 2, 212, 119, 21, 238, 2, 223, 225,
+ 21, 238, 2, 248, 103, 21, 211, 37, 212, 119, 21, 211, 37, 223, 225, 21,
+ 211, 37, 248, 103, 21, 247, 201, 212, 119, 21, 247, 201, 223, 225, 21,
+ 247, 201, 248, 103, 21, 215, 143, 212, 119, 21, 215, 143, 223, 225, 21,
+ 215, 143, 248, 103, 21, 210, 189, 210, 102, 21, 210, 189, 248, 103, 21,
+ 211, 173, 228, 8, 212, 119, 21, 211, 173, 5, 212, 119, 21, 211, 173, 228,
+ 8, 223, 225, 21, 211, 173, 5, 223, 225, 21, 211, 173, 213, 126, 21, 239,
+ 208, 228, 8, 212, 119, 21, 239, 208, 5, 212, 119, 21, 239, 208, 228, 8,
+ 223, 225, 21, 239, 208, 5, 223, 225, 21, 239, 208, 213, 126, 21, 211,
+ 173, 239, 208, 250, 252, 21, 224, 0, 112, 121, 228, 7, 21, 224, 0, 112,
+ 121, 212, 36, 21, 224, 0, 112, 213, 126, 21, 224, 0, 121, 213, 126, 21,
+ 224, 0, 112, 121, 250, 253, 228, 7, 21, 224, 0, 112, 121, 250, 253, 212,
+ 36, 21, 224, 0, 212, 156, 208, 173, 212, 156, 214, 190, 21, 223, 255,
+ 240, 3, 245, 197, 21, 224, 1, 240, 3, 245, 197, 21, 223, 255, 212, 120,
+ 211, 53, 212, 36, 21, 223, 255, 212, 120, 211, 53, 225, 9, 21, 223, 255,
+ 212, 120, 211, 53, 228, 7, 21, 223, 255, 212, 120, 211, 53, 228, 5, 21,
+ 223, 255, 212, 120, 203, 221, 239, 211, 21, 223, 255, 52, 211, 52, 21,
+ 223, 255, 52, 203, 221, 239, 211, 21, 223, 255, 52, 250, 252, 21, 223,
+ 255, 52, 250, 253, 203, 221, 239, 211, 21, 223, 255, 245, 130, 21, 223,
+ 255, 208, 70, 211, 53, 224, 3, 21, 223, 255, 208, 70, 203, 221, 239, 211,
+ 21, 223, 255, 208, 70, 250, 252, 21, 223, 255, 208, 70, 250, 253, 203,
+ 221, 239, 211, 21, 223, 255, 248, 121, 212, 36, 21, 223, 255, 248, 121,
+ 225, 9, 21, 223, 255, 248, 121, 228, 7, 21, 223, 255, 245, 166, 212, 36,
+ 21, 223, 255, 245, 166, 225, 9, 21, 223, 255, 245, 166, 228, 7, 21, 223,
+ 255, 245, 166, 215, 196, 21, 223, 255, 246, 169, 212, 36, 21, 223, 255,
+ 246, 169, 225, 9, 21, 223, 255, 246, 169, 228, 7, 21, 223, 255, 98, 212,
+ 36, 21, 223, 255, 98, 225, 9, 21, 223, 255, 98, 228, 7, 21, 223, 255,
+ 202, 30, 212, 36, 21, 223, 255, 202, 30, 225, 9, 21, 223, 255, 202, 30,
+ 228, 7, 21, 223, 255, 219, 30, 212, 36, 21, 223, 255, 219, 30, 225, 9,
+ 21, 223, 255, 219, 30, 228, 7, 21, 208, 99, 215, 194, 212, 119, 21, 208,
+ 99, 215, 194, 242, 78, 21, 208, 99, 215, 194, 250, 252, 21, 208, 99, 215,
+ 195, 212, 119, 21, 208, 99, 215, 195, 242, 78, 21, 208, 99, 215, 195,
+ 250, 252, 21, 208, 99, 213, 71, 21, 208, 99, 250, 107, 211, 202, 212,
+ 119, 21, 208, 99, 250, 107, 211, 202, 242, 78, 21, 208, 99, 250, 107,
+ 211, 202, 208, 69, 21, 224, 2, 250, 12, 212, 36, 21, 224, 2, 250, 12,
+ 225, 9, 21, 224, 2, 250, 12, 228, 7, 21, 224, 2, 250, 12, 228, 5, 21,
+ 224, 2, 208, 123, 212, 36, 21, 224, 2, 208, 123, 225, 9, 21, 224, 2, 208,
+ 123, 228, 7, 21, 224, 2, 208, 123, 228, 5, 21, 224, 2, 248, 104, 250, 12,
+ 212, 36, 21, 224, 2, 248, 104, 250, 12, 225, 9, 21, 224, 2, 248, 104,
+ 250, 12, 228, 7, 21, 224, 2, 248, 104, 250, 12, 228, 5, 21, 224, 2, 248,
+ 104, 208, 123, 212, 36, 21, 224, 2, 248, 104, 208, 123, 225, 9, 21, 224,
+ 2, 248, 104, 208, 123, 228, 7, 21, 224, 2, 248, 104, 208, 123, 228, 5,
+ 21, 224, 1, 212, 120, 211, 53, 212, 36, 21, 224, 1, 212, 120, 211, 53,
+ 225, 9, 21, 224, 1, 212, 120, 211, 53, 228, 7, 21, 224, 1, 212, 120, 211,
+ 53, 228, 5, 21, 224, 1, 212, 120, 203, 221, 239, 211, 21, 224, 1, 52,
+ 211, 52, 21, 224, 1, 52, 203, 221, 239, 211, 21, 224, 1, 52, 250, 252,
+ 21, 224, 1, 52, 250, 253, 203, 221, 239, 211, 21, 224, 1, 245, 130, 21,
+ 224, 1, 208, 70, 211, 53, 224, 3, 21, 224, 1, 208, 70, 203, 221, 239,
+ 211, 21, 224, 1, 208, 70, 250, 253, 224, 3, 21, 224, 1, 208, 70, 250,
+ 253, 203, 221, 239, 211, 21, 224, 1, 248, 120, 21, 224, 1, 245, 166, 212,
+ 36, 21, 224, 1, 245, 166, 225, 9, 21, 224, 1, 245, 166, 228, 7, 21, 224,
+ 1, 246, 168, 21, 224, 1, 98, 212, 36, 21, 224, 1, 98, 225, 9, 21, 224, 1,
+ 98, 228, 7, 21, 224, 1, 202, 30, 212, 36, 21, 224, 1, 202, 30, 225, 9,
+ 21, 224, 1, 202, 30, 228, 7, 21, 224, 1, 219, 30, 212, 36, 21, 224, 1,
+ 219, 30, 225, 9, 21, 224, 1, 219, 30, 228, 7, 21, 208, 100, 215, 195,
+ 212, 119, 21, 208, 100, 215, 195, 242, 78, 21, 208, 100, 215, 195, 250,
+ 252, 21, 208, 100, 215, 194, 212, 119, 21, 208, 100, 215, 194, 242, 78,
+ 21, 208, 100, 215, 194, 250, 252, 21, 208, 100, 213, 71, 21, 223, 255,
+ 245, 88, 217, 56, 212, 36, 21, 223, 255, 245, 88, 217, 56, 225, 9, 21,
+ 223, 255, 245, 88, 217, 56, 228, 7, 21, 223, 255, 245, 88, 217, 56, 228,
+ 5, 21, 223, 255, 245, 88, 237, 136, 212, 36, 21, 223, 255, 245, 88, 237,
+ 136, 225, 9, 21, 223, 255, 245, 88, 237, 136, 228, 7, 21, 223, 255, 245,
+ 88, 237, 136, 228, 5, 21, 223, 255, 245, 88, 209, 27, 246, 62, 212, 36,
+ 21, 223, 255, 245, 88, 209, 27, 246, 62, 225, 9, 21, 223, 255, 236, 14,
+ 212, 36, 21, 223, 255, 236, 14, 225, 9, 21, 223, 255, 236, 14, 228, 7,
+ 21, 223, 255, 227, 15, 212, 36, 21, 223, 255, 227, 15, 225, 9, 21, 223,
+ 255, 227, 15, 228, 7, 21, 223, 255, 227, 15, 5, 242, 78, 21, 223, 255,
+ 204, 76, 245, 88, 52, 212, 36, 21, 223, 255, 204, 76, 245, 88, 52, 225,
+ 9, 21, 223, 255, 204, 76, 245, 88, 52, 228, 7, 21, 223, 255, 204, 76,
+ 245, 88, 208, 70, 212, 36, 21, 223, 255, 204, 76, 245, 88, 208, 70, 225,
+ 9, 21, 223, 255, 204, 76, 245, 88, 208, 70, 228, 7, 21, 223, 255, 245,
+ 88, 209, 84, 211, 52, 21, 223, 255, 245, 86, 245, 131, 212, 36, 21, 223,
+ 255, 245, 86, 245, 131, 225, 9, 21, 215, 194, 212, 119, 21, 215, 194,
+ 242, 78, 21, 215, 194, 250, 254, 21, 223, 255, 213, 71, 21, 223, 255,
+ 245, 88, 236, 229, 239, 119, 204, 99, 21, 223, 255, 236, 14, 236, 229,
+ 239, 119, 204, 99, 21, 223, 255, 227, 15, 236, 229, 239, 119, 204, 99,
+ 21, 223, 255, 204, 76, 236, 229, 239, 119, 204, 99, 21, 215, 194, 212,
+ 120, 236, 229, 239, 119, 204, 99, 21, 215, 194, 52, 236, 229, 239, 119,
+ 204, 99, 21, 215, 194, 250, 253, 236, 229, 239, 119, 204, 99, 21, 223,
+ 255, 245, 88, 236, 229, 246, 149, 21, 223, 255, 236, 14, 236, 229, 246,
+ 149, 21, 223, 255, 227, 15, 236, 229, 246, 149, 21, 223, 255, 204, 76,
+ 236, 229, 246, 149, 21, 215, 194, 212, 120, 236, 229, 246, 149, 21, 215,
+ 194, 52, 236, 229, 246, 149, 21, 215, 194, 250, 253, 236, 229, 246, 149,
+ 21, 223, 255, 204, 76, 243, 228, 219, 52, 212, 36, 21, 223, 255, 204, 76,
+ 243, 228, 219, 52, 225, 9, 21, 223, 255, 204, 76, 243, 228, 219, 52, 228,
+ 7, 21, 224, 1, 245, 88, 236, 229, 246, 227, 212, 36, 21, 224, 1, 245, 88,
+ 236, 229, 246, 227, 228, 7, 21, 224, 1, 236, 14, 236, 229, 246, 227, 5,
+ 242, 78, 21, 224, 1, 236, 14, 236, 229, 246, 227, 228, 8, 242, 78, 21,
+ 224, 1, 236, 14, 236, 229, 246, 227, 5, 208, 69, 21, 224, 1, 236, 14,
+ 236, 229, 246, 227, 228, 8, 208, 69, 21, 224, 1, 227, 15, 236, 229, 246,
+ 227, 5, 212, 119, 21, 224, 1, 227, 15, 236, 229, 246, 227, 228, 8, 212,
+ 119, 21, 224, 1, 227, 15, 236, 229, 246, 227, 5, 242, 78, 21, 224, 1,
+ 227, 15, 236, 229, 246, 227, 228, 8, 242, 78, 21, 224, 1, 204, 76, 236,
+ 229, 246, 227, 212, 36, 21, 224, 1, 204, 76, 236, 229, 246, 227, 228, 7,
+ 21, 215, 195, 212, 120, 236, 229, 246, 226, 21, 215, 195, 52, 236, 229,
+ 246, 226, 21, 215, 195, 250, 253, 236, 229, 246, 226, 21, 224, 1, 245,
+ 88, 236, 229, 239, 205, 212, 36, 21, 224, 1, 245, 88, 236, 229, 239, 205,
+ 228, 7, 21, 224, 1, 236, 14, 236, 229, 239, 205, 5, 242, 78, 21, 224, 1,
+ 236, 14, 236, 229, 239, 205, 228, 8, 242, 78, 21, 224, 1, 236, 14, 236,
+ 229, 239, 205, 208, 70, 5, 208, 69, 21, 224, 1, 236, 14, 236, 229, 239,
+ 205, 208, 70, 228, 8, 208, 69, 21, 224, 1, 227, 15, 236, 229, 239, 205,
+ 5, 212, 119, 21, 224, 1, 227, 15, 236, 229, 239, 205, 228, 8, 212, 119,
+ 21, 224, 1, 227, 15, 236, 229, 239, 205, 5, 242, 78, 21, 224, 1, 227, 15,
+ 236, 229, 239, 205, 228, 8, 242, 78, 21, 224, 1, 204, 76, 236, 229, 239,
+ 205, 212, 36, 21, 224, 1, 204, 76, 236, 229, 239, 205, 228, 7, 21, 215,
+ 195, 212, 120, 236, 229, 239, 204, 21, 215, 195, 52, 236, 229, 239, 204,
+ 21, 215, 195, 250, 253, 236, 229, 239, 204, 21, 224, 1, 245, 88, 212, 36,
+ 21, 224, 1, 245, 88, 225, 9, 21, 224, 1, 245, 88, 228, 7, 21, 224, 1,
+ 245, 88, 228, 5, 21, 224, 1, 245, 88, 245, 237, 21, 224, 1, 236, 14, 212,
+ 36, 21, 224, 1, 227, 15, 212, 36, 21, 224, 1, 204, 76, 212, 24, 21, 224,
+ 1, 204, 76, 212, 36, 21, 224, 1, 204, 76, 228, 7, 21, 215, 195, 212, 119,
+ 21, 215, 195, 242, 78, 21, 215, 195, 250, 252, 21, 224, 1, 213, 72, 219,
+ 81, 21, 223, 255, 250, 107, 246, 62, 5, 212, 119, 21, 223, 255, 250, 107,
+ 246, 62, 225, 10, 212, 119, 21, 223, 255, 250, 107, 246, 62, 5, 242, 78,
+ 21, 223, 255, 250, 107, 246, 62, 225, 10, 242, 78, 21, 224, 1, 250, 107,
+ 246, 62, 236, 229, 204, 100, 5, 212, 119, 21, 224, 1, 250, 107, 246, 62,
+ 236, 229, 204, 100, 225, 10, 212, 119, 21, 224, 1, 250, 107, 246, 62,
+ 236, 229, 204, 100, 228, 8, 212, 119, 21, 224, 1, 250, 107, 246, 62, 236,
+ 229, 204, 100, 5, 242, 78, 21, 224, 1, 250, 107, 246, 62, 236, 229, 204,
+ 100, 225, 10, 242, 78, 21, 224, 1, 250, 107, 246, 62, 236, 229, 204, 100,
+ 228, 8, 242, 78, 21, 223, 255, 203, 221, 246, 62, 239, 119, 212, 119, 21,
+ 223, 255, 203, 221, 246, 62, 239, 119, 242, 78, 21, 224, 1, 203, 221,
+ 246, 62, 236, 229, 204, 100, 212, 119, 21, 224, 1, 203, 221, 246, 62,
+ 236, 229, 204, 100, 242, 78, 21, 223, 255, 240, 3, 246, 59, 212, 119, 21,
+ 223, 255, 240, 3, 246, 59, 242, 78, 21, 224, 1, 240, 3, 246, 59, 236,
+ 229, 204, 100, 212, 119, 21, 224, 1, 240, 3, 246, 59, 236, 229, 204, 100,
+ 242, 78, 21, 242, 4, 250, 95, 212, 36, 21, 242, 4, 250, 95, 228, 7, 21,
+ 242, 4, 240, 74, 21, 242, 4, 212, 39, 21, 242, 4, 209, 145, 21, 242, 4,
+ 216, 115, 21, 242, 4, 212, 125, 21, 242, 4, 212, 126, 250, 252, 21, 242,
+ 4, 240, 221, 219, 221, 208, 221, 21, 242, 4, 238, 12, 21, 237, 64, 21,
+ 237, 65, 216, 1, 21, 237, 65, 223, 255, 211, 52, 21, 237, 65, 223, 255,
+ 208, 224, 21, 237, 65, 224, 1, 211, 52, 21, 237, 65, 223, 255, 245, 87,
+ 21, 237, 65, 224, 1, 245, 87, 21, 237, 65, 224, 4, 246, 61, 21, 240, 103,
+ 243, 166, 218, 34, 221, 168, 239, 152, 208, 222, 21, 240, 103, 243, 166,
+ 218, 34, 221, 168, 112, 219, 245, 242, 70, 21, 240, 103, 243, 166, 218,
+ 34, 221, 168, 112, 219, 245, 121, 208, 222, 21, 240, 190, 211, 53, 206,
+ 224, 21, 240, 190, 211, 53, 222, 215, 21, 240, 190, 211, 53, 242, 70, 21,
+ 242, 57, 240, 190, 222, 216, 242, 70, 21, 242, 57, 240, 190, 121, 222,
+ 215, 21, 242, 57, 240, 190, 112, 222, 215, 21, 242, 57, 240, 190, 222,
+ 216, 206, 224, 21, 239, 164, 222, 215, 21, 239, 164, 245, 197, 21, 239,
+ 164, 203, 224, 21, 240, 185, 220, 8, 21, 240, 185, 211, 172, 21, 240,
+ 185, 246, 15, 21, 240, 192, 248, 34, 212, 119, 21, 240, 192, 248, 34,
+ 223, 225, 21, 240, 185, 162, 220, 8, 21, 240, 185, 204, 27, 220, 8, 21,
+ 240, 185, 162, 246, 15, 21, 240, 185, 204, 25, 224, 3, 21, 240, 192, 204,
+ 9, 21, 240, 186, 206, 224, 21, 240, 186, 242, 70, 21, 240, 186, 239, 191,
+ 21, 240, 188, 211, 52, 21, 240, 188, 211, 53, 242, 78, 21, 240, 188, 211,
+ 53, 250, 252, 21, 240, 189, 211, 52, 21, 240, 189, 211, 53, 242, 78, 21,
+ 240, 189, 211, 53, 250, 252, 21, 240, 188, 245, 85, 21, 240, 189, 245,
+ 85, 21, 240, 188, 246, 56, 21, 246, 164, 217, 182, 21, 246, 164, 222,
+ 215, 21, 246, 164, 210, 234, 21, 209, 146, 246, 164, 236, 244, 21, 209,
+ 146, 246, 164, 224, 148, 21, 209, 146, 246, 164, 227, 0, 21, 241, 181,
+ 21, 221, 168, 222, 215, 21, 221, 168, 245, 197, 21, 221, 168, 203, 222,
+ 21, 221, 168, 204, 22, 21, 251, 55, 248, 27, 219, 211, 21, 251, 55, 210,
+ 233, 231, 49, 21, 251, 55, 248, 29, 5, 215, 193, 21, 251, 55, 210, 235,
+ 5, 215, 193, 21, 247, 216, 231, 22, 21, 247, 216, 240, 210, 21, 224, 8,
+ 246, 16, 222, 215, 21, 224, 8, 246, 16, 239, 151, 21, 224, 8, 246, 16,
+ 245, 197, 21, 224, 8, 212, 31, 21, 224, 8, 212, 32, 203, 224, 21, 224, 8,
+ 212, 32, 220, 8, 21, 224, 8, 239, 115, 21, 224, 8, 239, 116, 203, 224,
+ 21, 224, 8, 239, 116, 220, 8, 21, 224, 8, 171, 246, 61, 21, 224, 8, 171,
+ 239, 151, 21, 224, 8, 171, 203, 224, 21, 224, 8, 171, 219, 204, 21, 224,
+ 8, 171, 219, 205, 203, 224, 21, 224, 8, 171, 219, 205, 203, 59, 21, 224,
+ 8, 171, 216, 143, 21, 224, 8, 171, 216, 144, 203, 224, 21, 224, 8, 171,
+ 216, 144, 203, 59, 21, 224, 8, 229, 66, 21, 224, 8, 229, 67, 239, 151,
+ 21, 224, 8, 229, 67, 203, 224, 21, 224, 8, 209, 145, 21, 224, 8, 209,
+ 146, 239, 151, 21, 224, 8, 209, 146, 210, 234, 21, 227, 99, 217, 239,
+ 208, 169, 21, 227, 101, 226, 251, 115, 206, 220, 21, 227, 101, 206, 221,
+ 115, 226, 250, 21, 224, 8, 245, 164, 21, 224, 8, 203, 223, 212, 119, 21,
+ 224, 8, 203, 223, 242, 78, 21, 208, 151, 211, 72, 219, 212, 240, 76, 21,
+ 208, 151, 227, 144, 227, 98, 21, 208, 151, 208, 211, 248, 104, 227, 98,
+ 21, 208, 151, 208, 211, 208, 127, 231, 7, 224, 7, 21, 208, 151, 231, 7,
+ 224, 8, 216, 115, 21, 208, 151, 223, 254, 251, 79, 246, 165, 21, 208,
+ 151, 246, 218, 211, 72, 219, 211, 21, 208, 151, 246, 218, 231, 7, 224, 7,
+ 21, 209, 172, 21, 209, 173, 224, 3, 21, 209, 173, 220, 32, 208, 150, 21,
+ 209, 173, 220, 32, 208, 151, 224, 3, 21, 209, 173, 220, 32, 227, 98, 21,
+ 209, 173, 220, 32, 227, 99, 224, 3, 21, 209, 173, 248, 50, 227, 98, 21,
+ 223, 255, 230, 165, 21, 224, 1, 230, 165, 21, 222, 237, 21, 237, 145, 21,
+ 240, 213, 21, 212, 211, 236, 234, 211, 203, 21, 212, 211, 236, 234, 218,
+ 33, 21, 204, 98, 212, 211, 236, 234, 224, 6, 21, 239, 203, 212, 211, 236,
+ 234, 224, 6, 21, 212, 211, 208, 223, 239, 120, 204, 104, 21, 208, 134,
+ 211, 53, 211, 41, 21, 208, 134, 245, 86, 248, 120, 21, 208, 135, 207,
+ 137, 21, 206, 221, 248, 18, 208, 223, 239, 120, 236, 234, 230, 95, 21,
+ 227, 126, 245, 238, 21, 227, 126, 227, 195, 21, 227, 126, 227, 194, 21,
+ 227, 126, 227, 193, 21, 227, 126, 227, 192, 21, 227, 126, 227, 191, 21,
+ 227, 126, 227, 190, 21, 227, 126, 227, 189, 21, 240, 2, 21, 227, 45, 211,
+ 228, 21, 227, 46, 211, 228, 21, 227, 47, 237, 41, 21, 227, 47, 204, 23,
+ 21, 227, 47, 244, 24, 21, 227, 47, 237, 65, 222, 237, 21, 227, 47, 208,
+ 136, 21, 227, 47, 227, 125, 243, 198, 21, 245, 233, 21, 239, 102, 211,
+ 61, 21, 213, 143, 21, 245, 242, 21, 219, 76, 21, 240, 10, 224, 66, 21,
+ 240, 10, 224, 65, 21, 240, 10, 224, 64, 21, 240, 10, 224, 63, 21, 240,
+ 10, 224, 62, 21, 215, 197, 224, 66, 21, 215, 197, 224, 65, 21, 215, 197,
+ 224, 64, 21, 215, 197, 224, 63, 21, 215, 197, 224, 62, 21, 215, 197, 224,
+ 61, 21, 215, 197, 224, 60, 21, 215, 197, 224, 59, 21, 215, 197, 224, 73,
+ 21, 215, 197, 224, 72, 21, 215, 197, 224, 71, 21, 215, 197, 224, 70, 21,
+ 215, 197, 224, 69, 21, 215, 197, 224, 68, 21, 215, 197, 224, 67, 73, 72,
+ 4, 226, 184, 229, 100, 73, 72, 4, 226, 180, 173, 73, 72, 4, 226, 178,
+ 228, 209, 73, 72, 4, 226, 54, 229, 198, 73, 72, 4, 226, 24, 229, 201, 73,
+ 72, 4, 226, 43, 229, 6, 73, 72, 4, 226, 71, 229, 26, 73, 72, 4, 225, 196,
+ 228, 203, 73, 72, 4, 226, 175, 204, 30, 73, 72, 4, 226, 173, 204, 111,
+ 73, 72, 4, 226, 171, 203, 217, 73, 72, 4, 225, 249, 204, 55, 73, 72, 4,
+ 226, 1, 204, 62, 73, 72, 4, 226, 5, 203, 244, 73, 72, 4, 226, 74, 204, 0,
+ 73, 72, 4, 225, 181, 203, 213, 73, 72, 4, 225, 232, 204, 53, 73, 72, 4,
+ 226, 58, 203, 201, 73, 72, 4, 226, 70, 203, 203, 73, 72, 4, 225, 236,
+ 203, 202, 73, 72, 4, 226, 169, 224, 110, 73, 72, 4, 226, 167, 225, 122,
+ 73, 72, 4, 226, 165, 223, 219, 73, 72, 4, 226, 60, 224, 240, 73, 72, 4,
+ 226, 25, 224, 54, 73, 72, 4, 225, 221, 223, 243, 73, 72, 4, 225, 186,
+ 223, 237, 73, 72, 4, 226, 163, 248, 86, 73, 72, 4, 226, 160, 249, 32, 73,
+ 72, 4, 226, 158, 247, 193, 73, 72, 4, 225, 225, 248, 150, 73, 72, 4, 226,
+ 22, 248, 162, 73, 72, 4, 226, 16, 248, 10, 73, 72, 4, 225, 237, 248, 23,
+ 73, 72, 4, 226, 148, 75, 73, 72, 4, 226, 146, 63, 73, 72, 4, 226, 144,
+ 68, 73, 72, 4, 225, 212, 241, 161, 73, 72, 4, 226, 19, 74, 73, 72, 4,
+ 225, 210, 220, 18, 73, 72, 4, 225, 228, 78, 73, 72, 4, 225, 238, 241,
+ 145, 73, 72, 4, 225, 244, 231, 49, 73, 72, 4, 225, 240, 231, 49, 73, 72,
+ 4, 225, 180, 250, 231, 73, 72, 4, 225, 197, 241, 92, 73, 72, 4, 226, 133,
+ 212, 162, 73, 72, 4, 226, 131, 215, 36, 73, 72, 4, 226, 129, 211, 10, 73,
+ 72, 4, 225, 213, 214, 165, 73, 72, 4, 226, 3, 214, 177, 73, 72, 4, 225,
+ 239, 211, 250, 73, 72, 4, 226, 40, 212, 13, 73, 72, 4, 225, 179, 212,
+ 161, 73, 72, 4, 226, 119, 227, 148, 73, 72, 4, 226, 117, 228, 113, 73,
+ 72, 4, 226, 115, 226, 239, 73, 72, 4, 226, 35, 227, 226, 73, 72, 4, 226,
+ 46, 227, 234, 73, 72, 4, 226, 65, 227, 18, 73, 72, 4, 225, 222, 227, 49,
+ 73, 72, 4, 226, 9, 163, 227, 234, 73, 72, 4, 226, 141, 243, 233, 73, 72,
+ 4, 226, 138, 244, 212, 73, 72, 4, 226, 135, 242, 42, 73, 72, 4, 226, 30,
+ 244, 61, 73, 72, 4, 225, 195, 243, 90, 73, 72, 4, 225, 194, 243, 113, 73,
+ 72, 4, 226, 127, 209, 2, 73, 72, 4, 226, 124, 210, 22, 73, 72, 4, 226,
+ 122, 207, 203, 73, 72, 4, 226, 28, 209, 176, 73, 72, 4, 226, 64, 209,
+ 187, 73, 72, 4, 226, 15, 208, 148, 73, 72, 4, 226, 50, 135, 73, 72, 4,
+ 226, 113, 230, 141, 73, 72, 4, 226, 110, 230, 181, 73, 72, 4, 226, 108,
+ 230, 82, 73, 72, 4, 225, 218, 230, 159, 73, 72, 4, 226, 6, 230, 161, 73,
+ 72, 4, 225, 215, 230, 91, 73, 72, 4, 226, 56, 230, 101, 73, 72, 4, 225,
+ 200, 163, 230, 101, 73, 72, 4, 226, 106, 203, 11, 73, 72, 4, 226, 103,
+ 198, 73, 72, 4, 226, 101, 202, 213, 73, 72, 4, 226, 10, 203, 49, 73, 72,
+ 4, 226, 39, 203, 52, 73, 72, 4, 225, 234, 202, 232, 73, 72, 4, 225, 254,
+ 202, 247, 73, 72, 4, 226, 97, 240, 26, 73, 72, 4, 226, 95, 240, 108, 73,
+ 72, 4, 226, 93, 239, 108, 73, 72, 4, 226, 41, 240, 53, 73, 72, 4, 226,
+ 44, 240, 60, 73, 72, 4, 225, 242, 239, 175, 73, 72, 4, 226, 31, 239, 186,
+ 73, 72, 4, 225, 178, 239, 107, 73, 72, 4, 226, 18, 240, 81, 73, 72, 4,
+ 226, 91, 222, 68, 73, 72, 4, 226, 89, 223, 83, 73, 72, 4, 226, 87, 221,
+ 40, 73, 72, 4, 226, 2, 222, 230, 73, 72, 4, 225, 206, 221, 185, 73, 72,
+ 4, 225, 199, 237, 3, 73, 72, 4, 226, 82, 152, 73, 72, 4, 225, 189, 236,
+ 26, 73, 72, 4, 226, 85, 237, 48, 73, 72, 4, 226, 23, 237, 67, 73, 72, 4,
+ 226, 80, 236, 117, 73, 72, 4, 225, 235, 236, 136, 73, 72, 4, 226, 36,
+ 237, 47, 73, 72, 4, 225, 247, 236, 110, 73, 72, 4, 226, 66, 236, 238, 73,
+ 72, 4, 225, 245, 237, 126, 73, 72, 4, 226, 32, 236, 13, 73, 72, 4, 226,
+ 67, 237, 33, 73, 72, 4, 225, 182, 236, 120, 73, 72, 4, 226, 73, 236, 25,
+ 73, 72, 4, 226, 29, 222, 168, 73, 72, 4, 226, 78, 222, 182, 73, 72, 4,
+ 226, 37, 222, 165, 73, 72, 4, 226, 4, 222, 176, 73, 72, 4, 225, 229, 222,
+ 177, 73, 72, 4, 225, 219, 222, 166, 73, 72, 4, 225, 255, 222, 167, 73,
+ 72, 4, 225, 216, 222, 181, 73, 72, 4, 225, 248, 222, 164, 73, 72, 4, 226,
+ 33, 163, 222, 177, 73, 72, 4, 226, 13, 163, 222, 166, 73, 72, 4, 225,
+ 192, 163, 222, 167, 73, 72, 4, 225, 220, 238, 81, 73, 72, 4, 226, 8, 239,
+ 8, 73, 72, 4, 225, 207, 237, 230, 73, 72, 4, 225, 185, 238, 182, 73, 72,
+ 4, 225, 209, 237, 216, 73, 72, 4, 225, 208, 237, 226, 73, 72, 4, 225,
+ 191, 222, 187, 73, 72, 4, 226, 62, 222, 124, 73, 72, 4, 225, 198, 222,
+ 113, 73, 72, 4, 226, 51, 218, 167, 73, 72, 4, 226, 20, 185, 73, 72, 4,
+ 226, 69, 217, 191, 73, 72, 4, 226, 38, 219, 23, 73, 72, 4, 226, 68, 219,
+ 34, 73, 72, 4, 226, 17, 218, 45, 73, 72, 4, 226, 53, 218, 69, 73, 72, 4,
+ 225, 230, 225, 39, 73, 72, 4, 226, 57, 225, 54, 73, 72, 4, 225, 253, 225,
+ 33, 73, 72, 4, 226, 72, 225, 46, 73, 72, 4, 225, 187, 225, 46, 73, 72, 4,
+ 226, 47, 225, 47, 73, 72, 4, 225, 203, 225, 34, 73, 72, 4, 225, 201, 225,
+ 35, 73, 72, 4, 225, 188, 225, 27, 73, 72, 4, 225, 214, 163, 225, 47, 73,
+ 72, 4, 226, 14, 163, 225, 34, 73, 72, 4, 225, 233, 163, 225, 35, 73, 72,
+ 4, 225, 243, 228, 236, 73, 72, 4, 226, 27, 228, 244, 73, 72, 4, 226, 45,
+ 228, 232, 73, 72, 4, 226, 76, 228, 239, 73, 72, 4, 226, 11, 228, 240, 73,
+ 72, 4, 226, 7, 228, 234, 73, 72, 4, 225, 217, 228, 235, 73, 72, 4, 225,
+ 251, 238, 199, 73, 72, 4, 226, 63, 238, 207, 73, 72, 4, 225, 227, 238,
+ 194, 73, 72, 4, 226, 26, 238, 203, 73, 72, 4, 226, 12, 238, 204, 73, 72,
+ 4, 226, 48, 238, 195, 73, 72, 4, 226, 49, 238, 197, 73, 72, 4, 225, 204,
+ 216, 220, 73, 72, 4, 225, 252, 223, 10, 73, 72, 4, 225, 246, 223, 25, 73,
+ 72, 4, 225, 250, 222, 248, 73, 72, 4, 225, 184, 223, 16, 73, 72, 4, 226,
+ 0, 223, 17, 73, 72, 4, 226, 52, 222, 253, 73, 72, 4, 226, 55, 223, 1, 73,
+ 72, 4, 225, 223, 222, 48, 73, 72, 4, 225, 183, 222, 18, 73, 72, 4, 225,
+ 226, 222, 39, 73, 72, 4, 225, 241, 222, 22, 73, 72, 4, 225, 193, 205,
+ 230, 73, 72, 4, 225, 190, 206, 86, 73, 72, 4, 225, 224, 204, 163, 73, 72,
+ 4, 225, 202, 206, 50, 73, 72, 4, 226, 34, 206, 55, 73, 72, 4, 225, 231,
+ 205, 176, 73, 72, 4, 226, 42, 205, 189, 73, 72, 4, 225, 211, 220, 242,
+ 73, 72, 4, 226, 61, 221, 5, 73, 72, 4, 225, 205, 220, 224, 73, 72, 4,
+ 226, 21, 220, 253, 73, 72, 4, 226, 59, 220, 231, 73, 72, 17, 105, 73, 72,
+ 17, 108, 73, 72, 17, 147, 73, 72, 17, 149, 73, 72, 17, 170, 73, 72, 17,
+ 195, 73, 72, 17, 213, 111, 73, 72, 17, 199, 73, 72, 17, 222, 63, 73, 72,
+ 39, 42, 209, 174, 73, 72, 39, 42, 209, 147, 73, 72, 39, 42, 236, 10, 73,
+ 72, 39, 42, 209, 34, 73, 72, 39, 42, 209, 153, 209, 34, 73, 72, 39, 42,
+ 236, 12, 209, 34, 73, 72, 39, 42, 224, 113, 10, 13, 251, 30, 10, 13, 248,
+ 138, 10, 13, 230, 158, 10, 13, 244, 184, 10, 13, 204, 70, 10, 13, 202,
+ 107, 10, 13, 237, 148, 10, 13, 209, 251, 10, 13, 203, 47, 10, 13, 230,
+ 22, 10, 13, 228, 28, 10, 13, 225, 5, 10, 13, 221, 178, 10, 13, 214, 161,
+ 10, 13, 251, 59, 10, 13, 240, 47, 10, 13, 215, 28, 10, 13, 217, 119, 10,
+ 13, 216, 122, 10, 13, 213, 39, 10, 13, 209, 169, 10, 13, 209, 88, 10, 13,
+ 229, 140, 10, 13, 209, 100, 10, 13, 244, 207, 10, 13, 202, 110, 10, 13,
+ 238, 114, 10, 13, 243, 84, 248, 138, 10, 13, 243, 84, 221, 178, 10, 13,
+ 243, 84, 240, 47, 10, 13, 243, 84, 217, 119, 10, 13, 81, 248, 138, 10,
+ 13, 81, 230, 158, 10, 13, 81, 237, 43, 10, 13, 81, 237, 148, 10, 13, 81,
+ 203, 47, 10, 13, 81, 230, 22, 10, 13, 81, 228, 28, 10, 13, 81, 225, 5,
+ 10, 13, 81, 221, 178, 10, 13, 81, 214, 161, 10, 13, 81, 251, 59, 10, 13,
+ 81, 240, 47, 10, 13, 81, 215, 28, 10, 13, 81, 217, 119, 10, 13, 81, 213,
+ 39, 10, 13, 81, 209, 169, 10, 13, 81, 209, 88, 10, 13, 81, 229, 140, 10,
+ 13, 81, 244, 207, 10, 13, 81, 238, 114, 10, 13, 209, 247, 230, 158, 10,
+ 13, 209, 247, 237, 148, 10, 13, 209, 247, 203, 47, 10, 13, 209, 247, 228,
+ 28, 10, 13, 209, 247, 221, 178, 10, 13, 209, 247, 214, 161, 10, 13, 209,
+ 247, 251, 59, 10, 13, 209, 247, 215, 28, 10, 13, 209, 247, 217, 119, 10,
+ 13, 209, 247, 213, 39, 10, 13, 209, 247, 229, 140, 10, 13, 209, 247, 244,
+ 207, 10, 13, 209, 247, 238, 114, 10, 13, 209, 247, 243, 84, 221, 178, 10,
+ 13, 209, 247, 243, 84, 217, 119, 10, 13, 211, 40, 248, 138, 10, 13, 211,
+ 40, 230, 158, 10, 13, 211, 40, 237, 43, 10, 13, 211, 40, 237, 148, 10,
+ 13, 211, 40, 209, 251, 10, 13, 211, 40, 203, 47, 10, 13, 211, 40, 230,
+ 22, 10, 13, 211, 40, 225, 5, 10, 13, 211, 40, 221, 178, 10, 13, 211, 40,
+ 214, 161, 10, 13, 211, 40, 251, 59, 10, 13, 211, 40, 240, 47, 10, 13,
+ 211, 40, 215, 28, 10, 13, 211, 40, 217, 119, 10, 13, 211, 40, 213, 39,
+ 10, 13, 211, 40, 209, 169, 10, 13, 211, 40, 209, 88, 10, 13, 211, 40,
+ 229, 140, 10, 13, 211, 40, 244, 207, 10, 13, 211, 40, 202, 110, 10, 13,
+ 211, 40, 238, 114, 10, 13, 211, 40, 243, 84, 248, 138, 10, 13, 211, 40,
+ 243, 84, 240, 47, 10, 13, 227, 13, 251, 30, 10, 13, 227, 13, 248, 138,
+ 10, 13, 227, 13, 230, 158, 10, 13, 227, 13, 244, 184, 10, 13, 227, 13,
+ 237, 43, 10, 13, 227, 13, 204, 70, 10, 13, 227, 13, 202, 107, 10, 13,
+ 227, 13, 237, 148, 10, 13, 227, 13, 209, 251, 10, 13, 227, 13, 203, 47,
+ 10, 13, 227, 13, 228, 28, 10, 13, 227, 13, 225, 5, 10, 13, 227, 13, 221,
+ 178, 10, 13, 227, 13, 214, 161, 10, 13, 227, 13, 251, 59, 10, 13, 227,
+ 13, 240, 47, 10, 13, 227, 13, 215, 28, 10, 13, 227, 13, 217, 119, 10, 13,
+ 227, 13, 216, 122, 10, 13, 227, 13, 213, 39, 10, 13, 227, 13, 209, 169,
+ 10, 13, 227, 13, 209, 88, 10, 13, 227, 13, 229, 140, 10, 13, 227, 13,
+ 209, 100, 10, 13, 227, 13, 244, 207, 10, 13, 227, 13, 202, 110, 10, 13,
+ 227, 13, 238, 114, 10, 13, 169, 248, 138, 10, 13, 169, 230, 158, 10, 13,
+ 169, 244, 184, 10, 13, 169, 204, 70, 10, 13, 169, 202, 107, 10, 13, 169,
+ 237, 148, 10, 13, 169, 209, 251, 10, 13, 169, 203, 47, 10, 13, 169, 228,
+ 28, 10, 13, 169, 225, 5, 10, 13, 169, 221, 178, 10, 13, 169, 214, 161,
+ 10, 13, 169, 251, 59, 10, 13, 169, 240, 47, 10, 13, 169, 215, 28, 10, 13,
+ 169, 217, 119, 10, 13, 169, 216, 122, 10, 13, 169, 213, 39, 10, 13, 169,
+ 209, 169, 10, 13, 169, 209, 88, 10, 13, 169, 229, 140, 10, 13, 169, 209,
+ 100, 10, 13, 169, 244, 207, 10, 13, 169, 202, 110, 10, 13, 169, 238, 114,
+ 10, 13, 219, 255, 83, 3, 151, 3, 209, 209, 10, 13, 219, 255, 151, 3, 244,
+ 184, 225, 142, 99, 241, 176, 204, 16, 225, 142, 99, 211, 238, 204, 16,
+ 225, 142, 99, 204, 46, 204, 16, 225, 142, 99, 153, 204, 16, 225, 142, 99,
+ 216, 138, 242, 61, 225, 142, 99, 237, 244, 242, 61, 225, 142, 99, 61,
+ 242, 61, 225, 142, 99, 118, 76, 246, 181, 225, 142, 99, 120, 76, 246,
+ 181, 225, 142, 99, 126, 76, 246, 181, 225, 142, 99, 239, 147, 76, 246,
+ 181, 225, 142, 99, 239, 233, 76, 246, 181, 225, 142, 99, 212, 88, 76,
+ 246, 181, 225, 142, 99, 213, 112, 76, 246, 181, 225, 142, 99, 241, 143,
+ 76, 246, 181, 225, 142, 99, 222, 64, 76, 246, 181, 225, 142, 99, 118, 76,
+ 248, 243, 225, 142, 99, 120, 76, 248, 243, 225, 142, 99, 126, 76, 248,
+ 243, 225, 142, 99, 239, 147, 76, 248, 243, 225, 142, 99, 239, 233, 76,
+ 248, 243, 225, 142, 99, 212, 88, 76, 248, 243, 225, 142, 99, 213, 112,
+ 76, 248, 243, 225, 142, 99, 241, 143, 76, 248, 243, 225, 142, 99, 222,
+ 64, 76, 248, 243, 225, 142, 99, 118, 76, 246, 58, 225, 142, 99, 120, 76,
+ 246, 58, 225, 142, 99, 126, 76, 246, 58, 225, 142, 99, 239, 147, 76, 246,
+ 58, 225, 142, 99, 239, 233, 76, 246, 58, 225, 142, 99, 212, 88, 76, 246,
+ 58, 225, 142, 99, 213, 112, 76, 246, 58, 225, 142, 99, 241, 143, 76, 246,
+ 58, 225, 142, 99, 222, 64, 76, 246, 58, 225, 142, 99, 218, 79, 225, 142,
+ 99, 219, 242, 225, 142, 99, 248, 244, 225, 142, 99, 246, 99, 225, 142,
+ 99, 211, 183, 225, 142, 99, 210, 216, 225, 142, 99, 250, 21, 225, 142,
+ 99, 204, 7, 225, 142, 99, 230, 94, 225, 142, 99, 249, 25, 161, 99, 236,
+ 106, 249, 25, 161, 99, 236, 104, 161, 99, 236, 103, 161, 99, 236, 102,
+ 161, 99, 236, 101, 161, 99, 236, 100, 161, 99, 236, 99, 161, 99, 236, 98,
+ 161, 99, 236, 97, 161, 99, 236, 96, 161, 99, 236, 95, 161, 99, 236, 94,
+ 161, 99, 236, 93, 161, 99, 236, 92, 161, 99, 236, 91, 161, 99, 236, 90,
+ 161, 99, 236, 89, 161, 99, 236, 88, 161, 99, 236, 87, 161, 99, 236, 86,
+ 161, 99, 236, 85, 161, 99, 236, 84, 161, 99, 236, 83, 161, 99, 236, 82,
+ 161, 99, 236, 81, 161, 99, 236, 80, 161, 99, 236, 79, 161, 99, 236, 78,
+ 161, 99, 236, 77, 161, 99, 236, 76, 161, 99, 236, 75, 161, 99, 236, 74,
+ 161, 99, 236, 73, 161, 99, 236, 72, 161, 99, 236, 71, 161, 99, 236, 70,
+ 161, 99, 236, 69, 161, 99, 236, 68, 161, 99, 236, 67, 161, 99, 236, 66,
+ 161, 99, 236, 65, 161, 99, 236, 64, 161, 99, 236, 63, 161, 99, 236, 62,
+ 161, 99, 236, 61, 161, 99, 236, 60, 161, 99, 236, 59, 161, 99, 236, 58,
+ 161, 99, 236, 57, 161, 99, 236, 56, 161, 99, 80, 249, 25, 161, 99, 206,
+ 37, 161, 99, 206, 36, 161, 99, 206, 35, 161, 99, 206, 34, 161, 99, 206,
+ 33, 161, 99, 206, 32, 161, 99, 206, 31, 161, 99, 206, 30, 161, 99, 206,
+ 29, 161, 99, 206, 28, 161, 99, 206, 27, 161, 99, 206, 26, 161, 99, 206,
+ 25, 161, 99, 206, 24, 161, 99, 206, 23, 161, 99, 206, 22, 161, 99, 206,
+ 21, 161, 99, 206, 20, 161, 99, 206, 19, 161, 99, 206, 18, 161, 99, 206,
+ 17, 161, 99, 206, 16, 161, 99, 206, 15, 161, 99, 206, 14, 161, 99, 206,
+ 13, 161, 99, 206, 12, 161, 99, 206, 11, 161, 99, 206, 10, 161, 99, 206,
+ 9, 161, 99, 206, 8, 161, 99, 206, 7, 161, 99, 206, 6, 161, 99, 206, 5,
+ 161, 99, 206, 4, 161, 99, 206, 3, 161, 99, 206, 2, 161, 99, 206, 1, 161,
+ 99, 206, 0, 161, 99, 205, 255, 161, 99, 205, 254, 161, 99, 205, 253, 161,
+ 99, 205, 252, 161, 99, 205, 251, 161, 99, 205, 250, 161, 99, 205, 249,
+ 161, 99, 205, 248, 161, 99, 205, 247, 161, 99, 205, 246, 161, 99, 205,
+ 245, 218, 88, 247, 38, 249, 25, 218, 88, 247, 38, 251, 132, 76, 211, 225,
+ 218, 88, 247, 38, 120, 76, 211, 225, 218, 88, 247, 38, 126, 76, 211, 225,
+ 218, 88, 247, 38, 239, 147, 76, 211, 225, 218, 88, 247, 38, 239, 233, 76,
+ 211, 225, 218, 88, 247, 38, 212, 88, 76, 211, 225, 218, 88, 247, 38, 213,
+ 112, 76, 211, 225, 218, 88, 247, 38, 241, 143, 76, 211, 225, 218, 88,
+ 247, 38, 222, 64, 76, 211, 225, 218, 88, 247, 38, 209, 153, 76, 211, 225,
+ 218, 88, 247, 38, 230, 179, 76, 211, 225, 218, 88, 247, 38, 229, 32, 76,
+ 211, 225, 218, 88, 247, 38, 217, 49, 76, 211, 225, 218, 88, 247, 38, 229,
+ 82, 76, 211, 225, 218, 88, 247, 38, 251, 132, 76, 237, 53, 218, 88, 247,
+ 38, 120, 76, 237, 53, 218, 88, 247, 38, 126, 76, 237, 53, 218, 88, 247,
+ 38, 239, 147, 76, 237, 53, 218, 88, 247, 38, 239, 233, 76, 237, 53, 218,
+ 88, 247, 38, 212, 88, 76, 237, 53, 218, 88, 247, 38, 213, 112, 76, 237,
+ 53, 218, 88, 247, 38, 241, 143, 76, 237, 53, 218, 88, 247, 38, 222, 64,
+ 76, 237, 53, 218, 88, 247, 38, 209, 153, 76, 237, 53, 218, 88, 247, 38,
+ 230, 179, 76, 237, 53, 218, 88, 247, 38, 229, 32, 76, 237, 53, 218, 88,
+ 247, 38, 217, 49, 76, 237, 53, 218, 88, 247, 38, 229, 82, 76, 237, 53,
+ 218, 88, 247, 38, 216, 138, 230, 94, 218, 88, 247, 38, 251, 132, 76, 243,
+ 220, 218, 88, 247, 38, 120, 76, 243, 220, 218, 88, 247, 38, 126, 76, 243,
+ 220, 218, 88, 247, 38, 239, 147, 76, 243, 220, 218, 88, 247, 38, 239,
+ 233, 76, 243, 220, 218, 88, 247, 38, 212, 88, 76, 243, 220, 218, 88, 247,
+ 38, 213, 112, 76, 243, 220, 218, 88, 247, 38, 241, 143, 76, 243, 220,
+ 218, 88, 247, 38, 222, 64, 76, 243, 220, 218, 88, 247, 38, 209, 153, 76,
+ 243, 220, 218, 88, 247, 38, 230, 179, 76, 243, 220, 218, 88, 247, 38,
+ 229, 32, 76, 243, 220, 218, 88, 247, 38, 217, 49, 76, 243, 220, 218, 88,
+ 247, 38, 229, 82, 76, 243, 220, 218, 88, 247, 38, 62, 230, 94, 218, 88,
+ 247, 38, 251, 132, 76, 246, 2, 218, 88, 247, 38, 120, 76, 246, 2, 218,
+ 88, 247, 38, 126, 76, 246, 2, 218, 88, 247, 38, 239, 147, 76, 246, 2,
+ 218, 88, 247, 38, 239, 233, 76, 246, 2, 218, 88, 247, 38, 212, 88, 76,
+ 246, 2, 218, 88, 247, 38, 213, 112, 76, 246, 2, 218, 88, 247, 38, 241,
+ 143, 76, 246, 2, 218, 88, 247, 38, 222, 64, 76, 246, 2, 218, 88, 247, 38,
+ 209, 153, 76, 246, 2, 218, 88, 247, 38, 230, 179, 76, 246, 2, 218, 88,
+ 247, 38, 229, 32, 76, 246, 2, 218, 88, 247, 38, 217, 49, 76, 246, 2, 218,
+ 88, 247, 38, 229, 82, 76, 246, 2, 218, 88, 247, 38, 61, 230, 94, 218, 88,
+ 247, 38, 239, 173, 218, 88, 247, 38, 208, 48, 218, 88, 247, 38, 208, 37,
+ 218, 88, 247, 38, 208, 34, 218, 88, 247, 38, 208, 33, 218, 88, 247, 38,
+ 208, 32, 218, 88, 247, 38, 208, 31, 218, 88, 247, 38, 208, 30, 218, 88,
+ 247, 38, 208, 29, 218, 88, 247, 38, 208, 28, 218, 88, 247, 38, 208, 47,
+ 218, 88, 247, 38, 208, 46, 218, 88, 247, 38, 208, 45, 218, 88, 247, 38,
+ 208, 44, 218, 88, 247, 38, 208, 43, 218, 88, 247, 38, 208, 42, 218, 88,
+ 247, 38, 208, 41, 218, 88, 247, 38, 208, 40, 218, 88, 247, 38, 208, 39,
+ 218, 88, 247, 38, 208, 38, 218, 88, 247, 38, 208, 36, 218, 88, 247, 38,
+ 208, 35, 17, 202, 85, 239, 102, 211, 61, 17, 202, 85, 245, 233, 17, 118,
+ 245, 233, 17, 120, 245, 233, 17, 126, 245, 233, 17, 239, 147, 245, 233,
+ 17, 239, 233, 245, 233, 17, 212, 88, 245, 233, 17, 213, 112, 245, 233,
+ 17, 241, 143, 245, 233, 17, 222, 64, 245, 233, 243, 174, 43, 41, 17, 202,
+ 84, 243, 174, 182, 43, 41, 17, 202, 84, 102, 8, 6, 1, 63, 102, 8, 6, 1,
+ 249, 255, 102, 8, 6, 1, 247, 125, 102, 8, 6, 1, 245, 51, 102, 8, 6, 1,
+ 74, 102, 8, 6, 1, 240, 174, 102, 8, 6, 1, 239, 75, 102, 8, 6, 1, 237,
+ 171, 102, 8, 6, 1, 75, 102, 8, 6, 1, 230, 184, 102, 8, 6, 1, 230, 54,
+ 102, 8, 6, 1, 159, 102, 8, 6, 1, 226, 185, 102, 8, 6, 1, 223, 163, 102,
+ 8, 6, 1, 78, 102, 8, 6, 1, 219, 184, 102, 8, 6, 1, 217, 134, 102, 8, 6,
+ 1, 146, 102, 8, 6, 1, 194, 102, 8, 6, 1, 210, 69, 102, 8, 6, 1, 68, 102,
+ 8, 6, 1, 206, 164, 102, 8, 6, 1, 204, 144, 102, 8, 6, 1, 203, 196, 102,
+ 8, 6, 1, 203, 124, 102, 8, 6, 1, 202, 159, 208, 133, 213, 33, 247, 226,
+ 8, 6, 1, 194, 43, 37, 8, 6, 1, 247, 125, 43, 37, 8, 6, 1, 146, 43, 246,
+ 239, 43, 203, 198, 103, 8, 6, 1, 63, 103, 8, 6, 1, 249, 255, 103, 8, 6,
+ 1, 247, 125, 103, 8, 6, 1, 245, 51, 103, 8, 6, 1, 74, 103, 8, 6, 1, 240,
+ 174, 103, 8, 6, 1, 239, 75, 103, 8, 6, 1, 237, 171, 103, 8, 6, 1, 75,
+ 103, 8, 6, 1, 230, 184, 103, 8, 6, 1, 230, 54, 103, 8, 6, 1, 159, 103, 8,
+ 6, 1, 226, 185, 103, 8, 6, 1, 223, 163, 103, 8, 6, 1, 78, 103, 8, 6, 1,
+ 219, 184, 103, 8, 6, 1, 217, 134, 103, 8, 6, 1, 146, 103, 8, 6, 1, 194,
+ 103, 8, 6, 1, 210, 69, 103, 8, 6, 1, 68, 103, 8, 6, 1, 206, 164, 103, 8,
+ 6, 1, 204, 144, 103, 8, 6, 1, 203, 196, 103, 8, 6, 1, 203, 124, 103, 8,
+ 6, 1, 202, 159, 103, 235, 255, 103, 223, 187, 103, 214, 179, 103, 211,
+ 167, 103, 218, 10, 103, 204, 63, 182, 43, 8, 6, 1, 63, 182, 43, 8, 6, 1,
+ 249, 255, 182, 43, 8, 6, 1, 247, 125, 182, 43, 8, 6, 1, 245, 51, 182, 43,
+ 8, 6, 1, 74, 182, 43, 8, 6, 1, 240, 174, 182, 43, 8, 6, 1, 239, 75, 182,
+ 43, 8, 6, 1, 237, 171, 182, 43, 8, 6, 1, 75, 182, 43, 8, 6, 1, 230, 184,
+ 182, 43, 8, 6, 1, 230, 54, 182, 43, 8, 6, 1, 159, 182, 43, 8, 6, 1, 226,
+ 185, 182, 43, 8, 6, 1, 223, 163, 182, 43, 8, 6, 1, 78, 182, 43, 8, 6, 1,
+ 219, 184, 182, 43, 8, 6, 1, 217, 134, 182, 43, 8, 6, 1, 146, 182, 43, 8,
+ 6, 1, 194, 182, 43, 8, 6, 1, 210, 69, 182, 43, 8, 6, 1, 68, 182, 43, 8,
+ 6, 1, 206, 164, 182, 43, 8, 6, 1, 204, 144, 182, 43, 8, 6, 1, 203, 196,
+ 182, 43, 8, 6, 1, 203, 124, 182, 43, 8, 6, 1, 202, 159, 216, 188, 225,
+ 26, 54, 216, 188, 225, 23, 54, 182, 103, 8, 6, 1, 63, 182, 103, 8, 6, 1,
+ 249, 255, 182, 103, 8, 6, 1, 247, 125, 182, 103, 8, 6, 1, 245, 51, 182,
+ 103, 8, 6, 1, 74, 182, 103, 8, 6, 1, 240, 174, 182, 103, 8, 6, 1, 239,
+ 75, 182, 103, 8, 6, 1, 237, 171, 182, 103, 8, 6, 1, 75, 182, 103, 8, 6,
+ 1, 230, 184, 182, 103, 8, 6, 1, 230, 54, 182, 103, 8, 6, 1, 159, 182,
+ 103, 8, 6, 1, 226, 185, 182, 103, 8, 6, 1, 223, 163, 182, 103, 8, 6, 1,
+ 78, 182, 103, 8, 6, 1, 219, 184, 182, 103, 8, 6, 1, 217, 134, 182, 103,
+ 8, 6, 1, 146, 182, 103, 8, 6, 1, 194, 182, 103, 8, 6, 1, 210, 69, 182,
+ 103, 8, 6, 1, 68, 182, 103, 8, 6, 1, 206, 164, 182, 103, 8, 6, 1, 204,
+ 144, 182, 103, 8, 6, 1, 203, 196, 182, 103, 8, 6, 1, 203, 124, 182, 103,
+ 8, 6, 1, 202, 159, 245, 128, 182, 103, 8, 6, 1, 219, 184, 182, 103, 235,
+ 164, 182, 103, 185, 182, 103, 215, 36, 182, 103, 251, 232, 182, 103, 204,
+ 63, 51, 243, 132, 103, 246, 42, 103, 245, 176, 103, 239, 129, 103, 235,
+ 155, 103, 222, 213, 103, 222, 205, 103, 220, 51, 103, 211, 245, 103, 112,
+ 3, 240, 212, 82, 103, 205, 166, 216, 130, 231, 32, 16, 1, 63, 216, 130,
+ 231, 32, 16, 1, 249, 255, 216, 130, 231, 32, 16, 1, 247, 125, 216, 130,
+ 231, 32, 16, 1, 245, 51, 216, 130, 231, 32, 16, 1, 74, 216, 130, 231, 32,
+ 16, 1, 240, 174, 216, 130, 231, 32, 16, 1, 239, 75, 216, 130, 231, 32,
+ 16, 1, 237, 171, 216, 130, 231, 32, 16, 1, 75, 216, 130, 231, 32, 16, 1,
+ 230, 184, 216, 130, 231, 32, 16, 1, 230, 54, 216, 130, 231, 32, 16, 1,
+ 159, 216, 130, 231, 32, 16, 1, 226, 185, 216, 130, 231, 32, 16, 1, 223,
+ 163, 216, 130, 231, 32, 16, 1, 78, 216, 130, 231, 32, 16, 1, 219, 184,
+ 216, 130, 231, 32, 16, 1, 217, 134, 216, 130, 231, 32, 16, 1, 146, 216,
+ 130, 231, 32, 16, 1, 194, 216, 130, 231, 32, 16, 1, 210, 69, 216, 130,
+ 231, 32, 16, 1, 68, 216, 130, 231, 32, 16, 1, 206, 164, 216, 130, 231,
+ 32, 16, 1, 204, 144, 216, 130, 231, 32, 16, 1, 203, 196, 216, 130, 231,
+ 32, 16, 1, 203, 124, 216, 130, 231, 32, 16, 1, 202, 159, 51, 172, 236,
+ 130, 103, 67, 229, 14, 103, 67, 215, 36, 103, 12, 206, 239, 233, 100,
+ 103, 12, 206, 239, 233, 104, 103, 12, 206, 239, 233, 112, 103, 67, 244,
+ 75, 103, 12, 206, 239, 233, 119, 103, 12, 206, 239, 233, 106, 103, 12,
+ 206, 239, 233, 78, 103, 12, 206, 239, 233, 105, 103, 12, 206, 239, 233,
+ 118, 103, 12, 206, 239, 233, 92, 103, 12, 206, 239, 233, 85, 103, 12,
+ 206, 239, 233, 94, 103, 12, 206, 239, 233, 115, 103, 12, 206, 239, 233,
+ 101, 103, 12, 206, 239, 233, 117, 103, 12, 206, 239, 233, 93, 103, 12,
+ 206, 239, 233, 116, 103, 12, 206, 239, 233, 79, 103, 12, 206, 239, 233,
+ 84, 103, 12, 206, 239, 233, 77, 103, 12, 206, 239, 233, 107, 103, 12,
+ 206, 239, 233, 109, 103, 12, 206, 239, 233, 87, 103, 12, 206, 239, 233,
+ 98, 103, 12, 206, 239, 233, 96, 103, 12, 206, 239, 233, 122, 103, 12,
+ 206, 239, 233, 121, 103, 12, 206, 239, 233, 75, 103, 12, 206, 239, 233,
+ 102, 103, 12, 206, 239, 233, 120, 103, 12, 206, 239, 233, 111, 103, 12,
+ 206, 239, 233, 97, 103, 12, 206, 239, 233, 76, 103, 12, 206, 239, 233,
+ 99, 103, 12, 206, 239, 233, 81, 103, 12, 206, 239, 233, 80, 103, 12, 206,
+ 239, 233, 110, 103, 12, 206, 239, 233, 88, 103, 12, 206, 239, 233, 90,
+ 103, 12, 206, 239, 233, 91, 103, 12, 206, 239, 233, 83, 103, 12, 206,
+ 239, 233, 114, 103, 12, 206, 239, 233, 108, 208, 133, 213, 33, 247, 226,
+ 12, 206, 239, 233, 89, 208, 133, 213, 33, 247, 226, 12, 206, 239, 233,
+ 121, 208, 133, 213, 33, 247, 226, 12, 206, 239, 233, 119, 208, 133, 213,
+ 33, 247, 226, 12, 206, 239, 233, 103, 208, 133, 213, 33, 247, 226, 12,
+ 206, 239, 233, 86, 208, 133, 213, 33, 247, 226, 12, 206, 239, 233, 99,
+ 208, 133, 213, 33, 247, 226, 12, 206, 239, 233, 82, 208, 133, 213, 33,
+ 247, 226, 12, 206, 239, 233, 113, 208, 133, 213, 33, 247, 226, 12, 206,
+ 239, 233, 95, 43, 189, 251, 111, 43, 189, 251, 136, 245, 62, 239, 184,
+ 246, 16, 207, 3, 222, 80, 3, 211, 91, 210, 209, 115, 224, 11, 210, 208,
+ 246, 46, 250, 50, 242, 17, 210, 207, 115, 247, 182, 216, 189, 247, 208,
+ 250, 50, 222, 79, 204, 81, 204, 75, 205, 181, 224, 118, 204, 65, 241,
+ 180, 238, 46, 240, 228, 241, 180, 238, 46, 250, 238, 241, 180, 238, 46,
+ 250, 68, 238, 46, 3, 224, 231, 222, 214, 224, 30, 97, 204, 67, 245, 139,
+ 224, 30, 97, 239, 245, 217, 56, 224, 30, 97, 204, 67, 238, 77, 224, 30,
+ 97, 239, 102, 224, 30, 97, 204, 94, 238, 77, 224, 30, 97, 228, 1, 217,
+ 56, 224, 30, 97, 204, 94, 245, 139, 224, 30, 97, 245, 139, 224, 29, 222,
+ 214, 224, 30, 3, 240, 102, 239, 245, 217, 56, 224, 30, 3, 240, 102, 228,
+ 1, 217, 56, 224, 30, 3, 240, 102, 239, 102, 224, 30, 3, 240, 102, 210,
+ 215, 3, 240, 102, 238, 44, 211, 94, 212, 233, 211, 94, 209, 80, 62, 242,
+ 49, 61, 210, 214, 61, 210, 215, 3, 5, 246, 7, 61, 210, 215, 248, 135,
+ 246, 7, 61, 210, 215, 248, 135, 246, 8, 3, 216, 190, 246, 8, 3, 216, 190,
+ 246, 8, 3, 212, 19, 246, 8, 3, 227, 131, 246, 8, 3, 208, 137, 239, 185,
+ 204, 17, 248, 27, 240, 102, 236, 47, 243, 102, 210, 2, 247, 158, 246,
+ 148, 214, 163, 240, 222, 208, 95, 244, 69, 208, 95, 219, 135, 208, 95,
+ 247, 85, 236, 47, 218, 248, 207, 193, 246, 152, 248, 30, 215, 202, 237,
+ 2, 210, 212, 248, 30, 241, 184, 76, 225, 131, 241, 184, 76, 216, 52, 237,
+ 28, 239, 147, 227, 230, 246, 6, 225, 104, 227, 229, 240, 85, 227, 229,
+ 227, 230, 239, 192, 231, 50, 204, 16, 223, 196, 208, 165, 250, 33, 238,
+ 5, 224, 249, 204, 79, 209, 225, 227, 199, 248, 239, 218, 120, 216, 138,
+ 250, 157, 237, 244, 250, 157, 219, 29, 219, 31, 246, 153, 211, 45, 237,
+ 132, 212, 51, 76, 218, 100, 225, 16, 220, 32, 248, 11, 218, 21, 227, 210,
+ 216, 53, 245, 145, 216, 53, 248, 251, 245, 179, 216, 52, 245, 89, 25,
+ 216, 52, 211, 79, 247, 237, 211, 224, 247, 219, 239, 128, 239, 124, 215,
+ 223, 210, 165, 218, 23, 244, 163, 220, 75, 210, 183, 239, 125, 212, 204,
+ 239, 244, 247, 79, 3, 210, 158, 244, 13, 212, 7, 235, 163, 245, 143, 213,
+ 51, 235, 162, 235, 163, 245, 143, 242, 73, 245, 178, 246, 114, 142, 247,
+ 51, 227, 32, 245, 81, 236, 119, 218, 25, 212, 217, 248, 116, 247, 233,
+ 218, 26, 76, 239, 174, 245, 177, 239, 163, 25, 229, 33, 209, 184, 204, 3,
+ 237, 102, 215, 13, 247, 250, 25, 245, 99, 204, 13, 238, 49, 245, 251,
+ 238, 49, 208, 51, 242, 54, 248, 146, 223, 235, 246, 23, 248, 146, 223,
+ 234, 249, 28, 247, 249, 239, 163, 25, 229, 34, 3, 218, 89, 247, 250, 3,
+ 218, 38, 245, 167, 218, 40, 216, 54, 203, 227, 217, 242, 248, 58, 247,
+ 78, 230, 178, 246, 106, 208, 95, 240, 68, 246, 105, 239, 247, 239, 248,
+ 211, 222, 248, 250, 219, 66, 218, 39, 245, 215, 248, 251, 209, 229, 208,
+ 95, 245, 128, 239, 219, 218, 121, 244, 66, 230, 169, 243, 96, 247, 27,
+ 211, 44, 204, 17, 246, 130, 224, 30, 205, 217, 246, 204, 214, 196, 214,
+ 223, 238, 11, 247, 48, 237, 56, 3, 208, 211, 220, 32, 209, 93, 227, 222,
+ 247, 243, 76, 239, 196, 224, 119, 225, 13, 216, 110, 216, 54, 31, 229,
+ 150, 3, 230, 177, 211, 15, 224, 152, 227, 167, 212, 49, 245, 184, 229,
+ 30, 248, 158, 250, 78, 31, 221, 155, 248, 158, 244, 19, 31, 221, 155,
+ 240, 6, 239, 133, 251, 114, 208, 252, 247, 28, 236, 49, 240, 35, 204, 36,
+ 215, 213, 245, 252, 239, 239, 218, 54, 25, 239, 243, 224, 152, 223, 253,
+ 247, 65, 246, 65, 237, 60, 250, 85, 219, 138, 208, 145, 237, 83, 246, 51,
+ 209, 144, 208, 253, 246, 37, 248, 20, 218, 241, 250, 84, 205, 226, 238,
+ 238, 243, 167, 236, 230, 212, 42, 225, 172, 248, 69, 238, 239, 243, 213,
+ 247, 236, 239, 198, 218, 88, 247, 36, 31, 221, 160, 223, 226, 31, 221,
+ 155, 214, 209, 237, 214, 31, 229, 149, 208, 27, 205, 206, 31, 214, 189,
+ 215, 126, 212, 246, 3, 214, 226, 209, 149, 216, 209, 25, 248, 251, 212,
+ 67, 25, 212, 67, 248, 4, 248, 213, 25, 236, 112, 246, 154, 239, 225, 212,
+ 18, 215, 127, 210, 188, 211, 189, 225, 13, 208, 52, 236, 50, 216, 210,
+ 250, 239, 239, 171, 215, 139, 239, 171, 210, 160, 204, 51, 227, 136, 238,
+ 30, 216, 211, 224, 18, 216, 211, 247, 39, 245, 136, 248, 210, 25, 248,
+ 251, 205, 180, 240, 25, 236, 133, 211, 73, 25, 248, 251, 235, 163, 236,
+ 133, 211, 73, 25, 217, 184, 210, 9, 209, 149, 219, 156, 25, 248, 251,
+ 212, 20, 247, 44, 224, 12, 247, 63, 248, 161, 3, 207, 3, 247, 184, 245,
+ 198, 236, 39, 247, 182, 246, 45, 244, 23, 236, 39, 247, 183, 246, 35,
+ 247, 183, 244, 15, 244, 16, 230, 208, 223, 67, 219, 72, 211, 104, 236,
+ 39, 247, 183, 236, 39, 3, 238, 222, 220, 67, 247, 183, 230, 169, 218, 31,
+ 220, 66, 240, 227, 218, 31, 220, 66, 236, 48, 248, 235, 250, 23, 209,
+ 157, 225, 172, 236, 44, 227, 1, 236, 44, 245, 182, 211, 57, 214, 195,
+ 244, 26, 211, 57, 240, 91, 230, 189, 228, 13, 230, 169, 247, 19, 240,
+ 227, 247, 19, 61, 219, 3, 62, 219, 3, 204, 73, 61, 239, 225, 204, 73, 62,
+ 239, 225, 215, 201, 62, 215, 201, 228, 105, 249, 12, 216, 209, 25, 212,
+ 183, 247, 241, 25, 47, 250, 234, 241, 98, 65, 239, 234, 207, 119, 241,
+ 98, 65, 239, 234, 207, 116, 241, 98, 65, 239, 234, 207, 114, 241, 98, 65,
+ 239, 234, 207, 112, 241, 98, 65, 239, 234, 207, 110, 216, 172, 224, 9,
+ 219, 193, 204, 81, 247, 188, 245, 149, 208, 245, 227, 183, 216, 212, 247,
+ 17, 242, 61, 245, 135, 204, 39, 212, 26, 212, 24, 236, 49, 216, 184, 238,
+ 35, 213, 37, 224, 48, 215, 205, 246, 140, 243, 102, 218, 131, 248, 21,
+ 241, 114, 220, 78, 211, 202, 213, 32, 247, 187, 250, 198, 236, 118, 228,
+ 98, 248, 144, 239, 243, 208, 51, 239, 243, 248, 28, 207, 171, 237, 81,
+ 246, 141, 249, 28, 246, 141, 239, 118, 249, 28, 246, 141, 248, 60, 219,
+ 5, 229, 24, 218, 44, 242, 51, 247, 67, 249, 17, 247, 67, 243, 95, 224,
+ 10, 240, 102, 245, 150, 240, 102, 208, 246, 240, 102, 216, 213, 240, 102,
+ 247, 18, 240, 102, 242, 62, 240, 102, 211, 187, 204, 39, 236, 50, 240,
+ 102, 224, 49, 240, 102, 243, 103, 240, 102, 218, 132, 240, 102, 239, 122,
+ 240, 102, 237, 129, 240, 102, 203, 253, 240, 102, 248, 156, 240, 102,
+ 219, 120, 240, 102, 218, 132, 221, 167, 219, 46, 217, 230, 246, 125, 240,
+ 184, 240, 191, 241, 183, 221, 167, 224, 7, 208, 150, 61, 112, 218, 59,
+ 249, 23, 231, 35, 61, 121, 218, 59, 249, 23, 231, 35, 61, 49, 218, 59,
+ 249, 23, 231, 35, 61, 50, 218, 59, 249, 23, 231, 35, 239, 237, 237, 124,
+ 54, 204, 73, 237, 124, 54, 220, 52, 237, 124, 54, 209, 20, 112, 54, 209,
+ 20, 121, 54, 246, 36, 237, 100, 54, 171, 237, 100, 54, 245, 122, 203,
+ 249, 237, 83, 240, 187, 222, 236, 210, 68, 230, 160, 242, 56, 229, 85,
+ 248, 71, 203, 249, 246, 9, 217, 165, 237, 103, 218, 22, 225, 112, 212,
+ 239, 250, 46, 212, 239, 236, 243, 212, 239, 203, 249, 214, 240, 203, 249,
+ 248, 3, 239, 169, 247, 150, 231, 50, 212, 136, 247, 149, 231, 50, 212,
+ 136, 247, 232, 238, 60, 225, 122, 203, 250, 240, 82, 225, 123, 25, 203,
+ 251, 236, 127, 237, 99, 120, 224, 241, 236, 127, 237, 99, 120, 203, 248,
+ 236, 127, 237, 99, 218, 51, 220, 65, 203, 251, 3, 247, 168, 241, 181,
+ 247, 209, 3, 206, 46, 218, 230, 3, 248, 32, 237, 145, 225, 123, 3, 237,
+ 227, 218, 168, 225, 108, 225, 123, 3, 207, 180, 220, 44, 225, 122, 220,
+ 44, 203, 250, 249, 27, 245, 199, 203, 234, 217, 235, 230, 169, 220, 61,
+ 230, 169, 238, 34, 238, 89, 249, 28, 250, 221, 240, 196, 251, 20, 251,
+ 21, 224, 39, 231, 55, 212, 62, 231, 25, 244, 12, 218, 229, 237, 221, 244,
+ 167, 227, 97, 223, 91, 218, 50, 240, 103, 225, 74, 237, 144, 248, 229,
+ 218, 53, 210, 88, 218, 124, 229, 67, 82, 227, 1, 227, 174, 215, 252, 238,
+ 180, 211, 63, 229, 66, 247, 242, 245, 152, 3, 237, 55, 204, 58, 248, 154,
+ 237, 55, 247, 203, 237, 55, 120, 237, 53, 211, 220, 237, 55, 237, 237,
+ 237, 55, 237, 56, 3, 47, 248, 26, 237, 55, 237, 244, 237, 55, 203, 45,
+ 237, 55, 217, 166, 237, 55, 237, 56, 3, 216, 54, 216, 67, 237, 53, 237,
+ 56, 244, 66, 243, 222, 213, 63, 3, 34, 70, 231, 6, 241, 117, 157, 247,
+ 180, 250, 220, 97, 248, 12, 212, 54, 97, 245, 244, 97, 211, 196, 210,
+ 167, 97, 242, 49, 244, 145, 97, 218, 125, 76, 218, 45, 239, 210, 248, 83,
+ 243, 133, 97, 211, 212, 248, 250, 209, 38, 248, 250, 61, 239, 197, 236,
+ 12, 218, 57, 97, 224, 53, 249, 10, 245, 92, 240, 214, 79, 243, 97, 54,
+ 245, 141, 247, 37, 248, 234, 3, 203, 43, 54, 248, 234, 3, 243, 97, 54,
+ 248, 234, 3, 240, 230, 54, 248, 234, 3, 218, 20, 54, 224, 53, 3, 204, 11,
+ 246, 178, 3, 177, 208, 91, 25, 203, 43, 54, 214, 174, 218, 228, 245, 220,
+ 247, 207, 224, 108, 239, 202, 243, 154, 219, 248, 243, 159, 242, 12, 240,
+ 11, 239, 182, 171, 240, 11, 239, 182, 219, 154, 3, 245, 95, 219, 154,
+ 240, 95, 206, 224, 247, 72, 209, 183, 247, 72, 247, 38, 231, 35, 246,
+ 178, 3, 177, 208, 90, 246, 178, 3, 183, 208, 90, 248, 231, 246, 177, 246,
+ 22, 217, 161, 215, 191, 217, 161, 219, 94, 211, 53, 215, 133, 208, 82,
+ 215, 133, 248, 8, 210, 7, 227, 227, 221, 158, 221, 159, 3, 244, 65, 245,
+ 151, 246, 16, 248, 9, 171, 248, 9, 237, 244, 248, 9, 248, 26, 248, 9,
+ 219, 243, 248, 9, 248, 6, 223, 85, 249, 14, 214, 182, 224, 242, 209, 162,
+ 216, 152, 219, 152, 240, 65, 225, 172, 214, 222, 250, 195, 217, 185, 251,
+ 119, 227, 3, 246, 162, 224, 254, 219, 210, 208, 98, 231, 46, 208, 98,
+ 219, 161, 241, 236, 97, 231, 43, 241, 57, 241, 58, 3, 183, 53, 55, 246,
+ 16, 225, 137, 3, 226, 249, 239, 225, 246, 16, 225, 137, 3, 216, 188, 239,
+ 225, 171, 225, 137, 3, 216, 188, 239, 225, 171, 225, 137, 3, 226, 249,
+ 239, 225, 218, 28, 218, 29, 236, 53, 222, 210, 224, 80, 218, 176, 224,
+ 80, 218, 177, 3, 86, 53, 250, 50, 227, 222, 205, 229, 224, 79, 224, 80,
+ 218, 177, 220, 68, 221, 192, 224, 80, 218, 175, 250, 196, 3, 248, 220,
+ 247, 65, 247, 66, 3, 239, 218, 205, 226, 247, 65, 209, 159, 216, 204,
+ 205, 225, 240, 6, 217, 217, 218, 35, 211, 74, 217, 254, 248, 160, 207,
+ 138, 86, 250, 91, 246, 18, 86, 25, 96, 171, 246, 62, 250, 91, 246, 18,
+ 86, 25, 96, 171, 246, 62, 250, 92, 3, 43, 118, 219, 199, 246, 18, 183,
+ 25, 177, 171, 246, 62, 250, 91, 250, 194, 183, 25, 177, 171, 246, 62,
+ 250, 91, 124, 247, 206, 97, 138, 247, 206, 97, 211, 217, 3, 247, 58, 95,
+ 211, 216, 211, 217, 3, 118, 211, 241, 204, 75, 211, 217, 3, 126, 211,
+ 241, 204, 74, 248, 203, 241, 117, 218, 81, 227, 217, 225, 149, 238, 49,
+ 216, 11, 225, 149, 238, 49, 227, 43, 3, 231, 17, 219, 9, 246, 16, 227,
+ 43, 3, 229, 151, 229, 151, 227, 42, 171, 227, 42, 248, 128, 248, 129, 3,
+ 247, 58, 95, 248, 7, 227, 105, 97, 216, 205, 247, 145, 249, 26, 3, 96,
+ 53, 55, 241, 84, 3, 96, 53, 55, 220, 32, 3, 240, 212, 131, 3, 49, 50, 53,
+ 55, 211, 249, 3, 86, 53, 55, 208, 145, 3, 177, 53, 55, 221, 192, 118,
+ 206, 248, 241, 141, 97, 229, 148, 209, 152, 231, 11, 16, 35, 8, 6, 227,
+ 173, 231, 11, 16, 35, 8, 5, 227, 173, 231, 11, 16, 35, 221, 45, 231, 11,
+ 16, 35, 210, 102, 231, 11, 16, 35, 8, 227, 173, 239, 249, 241, 117, 208,
+ 140, 203, 225, 237, 130, 221, 28, 25, 248, 14, 236, 134, 218, 106, 224,
+ 151, 209, 160, 245, 112, 248, 251, 212, 88, 218, 61, 211, 95, 3, 101,
+ 243, 85, 230, 169, 16, 35, 248, 141, 208, 80, 241, 100, 62, 51, 247, 145,
+ 61, 51, 247, 145, 228, 8, 216, 138, 246, 61, 228, 8, 248, 26, 246, 61,
+ 228, 8, 219, 243, 243, 221, 228, 8, 248, 26, 243, 221, 5, 219, 243, 243,
+ 221, 5, 248, 26, 243, 221, 206, 223, 216, 138, 208, 85, 242, 69, 216,
+ 138, 208, 85, 206, 223, 5, 216, 138, 208, 85, 242, 69, 5, 216, 138, 208,
+ 85, 226, 251, 50, 213, 77, 61, 246, 61, 206, 221, 50, 213, 77, 61, 246,
+ 61, 43, 245, 131, 218, 48, 245, 131, 218, 49, 3, 237, 136, 56, 245, 131,
+ 218, 48, 221, 162, 49, 213, 146, 3, 126, 243, 83, 221, 162, 50, 213, 146,
+ 3, 126, 243, 83, 16, 35, 225, 87, 246, 184, 61, 8, 245, 130, 79, 8, 245,
+ 130, 246, 222, 245, 130, 220, 40, 97, 242, 72, 76, 219, 32, 230, 39, 224,
+ 22, 210, 96, 224, 237, 3, 222, 64, 247, 222, 247, 238, 76, 235, 222, 246,
+ 20, 240, 103, 118, 220, 83, 246, 20, 240, 103, 120, 220, 83, 246, 20,
+ 240, 103, 126, 220, 83, 246, 20, 240, 103, 239, 147, 220, 83, 246, 20,
+ 240, 103, 239, 233, 220, 83, 246, 20, 240, 103, 212, 88, 220, 83, 246,
+ 20, 240, 103, 213, 112, 220, 83, 246, 20, 240, 103, 241, 143, 220, 83,
+ 246, 20, 240, 103, 222, 64, 220, 83, 246, 20, 240, 103, 209, 153, 220,
+ 83, 246, 20, 240, 103, 241, 113, 220, 83, 246, 20, 240, 103, 207, 155,
+ 220, 83, 246, 20, 240, 103, 220, 27, 246, 20, 240, 103, 207, 132, 246,
+ 20, 240, 103, 209, 26, 246, 20, 240, 103, 239, 143, 246, 20, 240, 103,
+ 239, 231, 246, 20, 240, 103, 212, 84, 246, 20, 240, 103, 213, 110, 246,
+ 20, 240, 103, 241, 142, 246, 20, 240, 103, 222, 62, 246, 20, 240, 103,
+ 209, 151, 246, 20, 240, 103, 241, 111, 246, 20, 240, 103, 207, 153, 50,
+ 211, 216, 50, 211, 217, 3, 118, 211, 241, 204, 75, 50, 211, 217, 3, 126,
+ 211, 241, 204, 74, 247, 175, 247, 176, 3, 211, 241, 204, 74, 215, 251,
+ 248, 128, 248, 9, 247, 56, 225, 109, 246, 19, 62, 212, 63, 25, 245, 129,
+ 221, 192, 218, 112, 236, 126, 225, 123, 231, 50, 247, 152, 210, 228, 227,
+ 166, 212, 52, 219, 245, 211, 178, 244, 150, 210, 210, 211, 205, 211, 206,
+ 204, 59, 230, 83, 49, 237, 124, 209, 162, 216, 152, 209, 162, 216, 153,
+ 3, 219, 153, 50, 237, 124, 209, 162, 216, 152, 61, 208, 126, 209, 161,
+ 62, 208, 126, 209, 161, 209, 162, 220, 32, 208, 145, 76, 224, 76, 246,
+ 40, 224, 80, 218, 176, 249, 26, 76, 241, 57, 211, 100, 241, 57, 241, 58,
+ 3, 227, 131, 239, 189, 241, 57, 219, 10, 115, 211, 100, 241, 57, 227,
+ 104, 219, 93, 62, 217, 161, 226, 251, 49, 219, 8, 226, 251, 49, 248, 246,
+ 219, 9, 226, 251, 49, 239, 149, 219, 9, 226, 251, 49, 219, 147, 226, 251,
+ 49, 245, 144, 49, 203, 220, 237, 123, 207, 174, 220, 52, 237, 124, 54,
+ 216, 188, 237, 124, 3, 239, 254, 211, 195, 216, 73, 216, 188, 237, 124,
+ 3, 239, 254, 211, 195, 216, 73, 209, 20, 112, 54, 216, 73, 209, 20, 121,
+ 54, 216, 73, 205, 228, 237, 123, 216, 73, 237, 124, 3, 101, 240, 3, 240,
+ 201, 216, 188, 237, 124, 3, 219, 71, 248, 104, 101, 25, 215, 253, 239,
+ 253, 61, 121, 218, 59, 49, 237, 124, 231, 35, 212, 154, 61, 49, 218, 59,
+ 231, 35, 212, 154, 61, 50, 218, 59, 231, 35, 212, 154, 62, 49, 218, 59,
+ 231, 35, 212, 154, 62, 50, 218, 59, 231, 35, 62, 49, 218, 59, 249, 23,
+ 231, 35, 62, 50, 218, 59, 249, 23, 231, 35, 212, 154, 61, 112, 218, 59,
+ 231, 35, 212, 154, 61, 121, 218, 59, 231, 35, 212, 154, 62, 112, 218, 59,
+ 231, 35, 212, 154, 62, 121, 218, 59, 231, 35, 62, 112, 218, 59, 249, 23,
+ 231, 35, 62, 121, 218, 59, 249, 23, 231, 35, 244, 11, 245, 220, 229, 150,
+ 25, 224, 9, 126, 222, 218, 245, 219, 217, 231, 218, 67, 247, 74, 62, 237,
+ 91, 213, 33, 239, 202, 243, 154, 61, 237, 91, 213, 33, 239, 202, 243,
+ 154, 212, 7, 213, 33, 239, 202, 243, 154, 209, 221, 247, 22, 204, 6, 229,
+ 149, 118, 247, 146, 224, 9, 120, 247, 146, 224, 9, 126, 247, 146, 224, 9,
+ 208, 117, 38, 218, 228, 245, 220, 237, 91, 243, 154, 214, 184, 217, 232,
+ 235, 156, 240, 65, 235, 156, 219, 248, 243, 160, 235, 156, 243, 107, 3,
+ 209, 112, 243, 107, 3, 209, 113, 25, 218, 161, 243, 107, 3, 218, 161,
+ 239, 135, 3, 218, 161, 239, 135, 3, 208, 225, 239, 135, 3, 250, 232, 203,
+ 196, 62, 239, 182, 239, 182, 171, 239, 182, 247, 38, 122, 243, 140, 247,
+ 38, 240, 11, 247, 233, 240, 11, 247, 87, 241, 94, 221, 160, 241, 94, 221,
+ 161, 219, 153, 241, 94, 221, 161, 219, 159, 221, 160, 221, 161, 219, 153,
+ 221, 161, 219, 159, 241, 94, 243, 106, 241, 94, 219, 153, 241, 94, 219,
+ 151, 243, 106, 219, 153, 219, 151, 204, 85, 211, 202, 221, 161, 219, 159,
+ 211, 202, 247, 73, 219, 159, 244, 11, 204, 15, 224, 105, 225, 64, 219,
+ 201, 246, 18, 50, 25, 49, 213, 146, 250, 91, 247, 58, 203, 196, 231, 41,
+ 239, 176, 212, 72, 97, 244, 64, 239, 176, 212, 72, 97, 245, 221, 38, 229,
+ 151, 215, 214, 222, 210, 219, 154, 3, 43, 209, 112, 211, 65, 246, 177,
+ 244, 196, 229, 33, 227, 98, 211, 215, 237, 65, 231, 50, 212, 136, 126,
+ 216, 163, 55, 126, 216, 163, 56, 126, 216, 163, 227, 222, 126, 216, 163,
+ 216, 16, 49, 211, 212, 247, 192, 50, 211, 212, 247, 192, 120, 211, 212,
+ 247, 191, 126, 211, 212, 247, 191, 49, 209, 38, 247, 192, 50, 209, 38,
+ 247, 192, 49, 250, 220, 247, 192, 50, 250, 220, 247, 192, 224, 34, 247,
+ 192, 227, 132, 224, 34, 247, 192, 227, 132, 224, 33, 248, 248, 98, 3,
+ 248, 247, 248, 248, 132, 203, 196, 248, 248, 98, 3, 132, 203, 196, 248,
+ 248, 26, 132, 203, 196, 248, 248, 98, 3, 26, 132, 203, 196, 157, 246,
+ 169, 82, 248, 248, 98, 3, 26, 246, 168, 203, 233, 225, 106, 224, 14, 239,
+ 103, 208, 167, 208, 122, 211, 86, 76, 227, 146, 212, 137, 76, 230, 170,
+ 223, 251, 237, 241, 240, 102, 237, 241, 240, 103, 3, 212, 30, 240, 184,
+ 240, 103, 3, 209, 179, 76, 230, 85, 212, 30, 240, 103, 3, 171, 224, 7,
+ 212, 30, 240, 103, 3, 171, 224, 8, 25, 212, 30, 240, 184, 212, 30, 240,
+ 103, 3, 171, 224, 8, 25, 245, 246, 210, 166, 212, 30, 240, 103, 3, 171,
+ 224, 8, 25, 208, 243, 240, 184, 212, 30, 240, 103, 3, 237, 135, 212, 30,
+ 240, 103, 3, 236, 52, 204, 8, 240, 102, 212, 30, 240, 103, 3, 212, 30,
+ 240, 184, 240, 103, 214, 214, 244, 45, 239, 174, 216, 113, 240, 102, 212,
+ 30, 240, 103, 3, 237, 54, 240, 184, 212, 30, 240, 103, 3, 210, 210, 212,
+ 29, 240, 102, 222, 216, 240, 102, 240, 203, 240, 102, 206, 253, 240, 102,
+ 240, 103, 3, 245, 246, 210, 166, 219, 1, 240, 102, 245, 212, 240, 102,
+ 245, 213, 240, 102, 229, 65, 240, 102, 240, 103, 209, 23, 34, 229, 66,
+ 229, 65, 240, 103, 3, 212, 30, 240, 184, 229, 65, 240, 103, 3, 246, 16,
+ 240, 184, 240, 103, 3, 211, 16, 208, 150, 240, 103, 3, 211, 16, 208, 151,
+ 25, 204, 8, 240, 191, 240, 103, 3, 211, 16, 208, 151, 25, 208, 243, 240,
+ 184, 243, 161, 240, 102, 203, 232, 240, 102, 250, 214, 240, 102, 218, 19,
+ 240, 102, 245, 114, 240, 102, 218, 232, 240, 102, 240, 103, 3, 227, 17,
+ 76, 208, 62, 243, 161, 247, 148, 216, 113, 240, 102, 239, 114, 240, 103,
+ 3, 171, 224, 7, 250, 212, 240, 102, 240, 58, 240, 102, 204, 60, 240, 102,
+ 212, 53, 240, 102, 208, 205, 240, 102, 237, 242, 240, 102, 227, 4, 245,
+ 114, 240, 102, 240, 103, 3, 171, 224, 7, 236, 2, 240, 102, 240, 103, 3,
+ 171, 224, 8, 25, 245, 246, 210, 166, 240, 103, 214, 186, 231, 50, 240,
+ 59, 250, 56, 240, 102, 239, 194, 240, 102, 212, 54, 240, 102, 243, 133,
+ 240, 102, 240, 103, 204, 3, 224, 7, 240, 103, 3, 225, 12, 225, 76, 237,
+ 241, 247, 18, 240, 103, 3, 212, 30, 240, 184, 247, 18, 240, 103, 3, 209,
+ 179, 76, 230, 85, 212, 30, 247, 18, 240, 103, 3, 171, 224, 7, 212, 30,
+ 247, 18, 240, 103, 3, 237, 54, 240, 184, 247, 18, 240, 103, 3, 203, 218,
+ 212, 31, 229, 65, 247, 18, 240, 103, 3, 246, 16, 240, 184, 218, 19, 247,
+ 18, 240, 102, 245, 114, 247, 18, 240, 102, 204, 60, 247, 18, 240, 102,
+ 212, 47, 239, 114, 240, 102, 212, 47, 212, 30, 240, 102, 206, 218, 240,
+ 102, 240, 103, 3, 215, 212, 240, 184, 240, 103, 3, 221, 192, 238, 27,
+ 238, 160, 240, 103, 3, 220, 52, 238, 160, 218, 230, 247, 239, 244, 59,
+ 214, 164, 224, 48, 237, 57, 224, 48, 211, 218, 224, 48, 237, 93, 218,
+ 230, 216, 187, 118, 237, 123, 218, 230, 216, 187, 247, 251, 237, 100,
+ 231, 50, 246, 224, 218, 230, 239, 113, 218, 230, 3, 218, 19, 240, 102,
+ 218, 230, 3, 239, 183, 237, 99, 153, 204, 46, 218, 59, 227, 229, 211,
+ 238, 204, 46, 218, 59, 227, 229, 153, 241, 176, 218, 59, 227, 229, 211,
+ 238, 241, 176, 218, 59, 227, 229, 207, 174, 153, 204, 46, 218, 59, 227,
+ 229, 207, 174, 211, 238, 204, 46, 218, 59, 227, 229, 207, 174, 153, 241,
+ 176, 218, 59, 227, 229, 207, 174, 211, 238, 241, 176, 218, 59, 227, 229,
+ 153, 204, 46, 218, 59, 205, 212, 227, 229, 211, 238, 204, 46, 218, 59,
+ 205, 212, 227, 229, 153, 241, 176, 218, 59, 205, 212, 227, 229, 211, 238,
+ 241, 176, 218, 59, 205, 212, 227, 229, 79, 153, 204, 46, 218, 59, 205,
+ 212, 227, 229, 79, 211, 238, 204, 46, 218, 59, 205, 212, 227, 229, 79,
+ 153, 241, 176, 218, 59, 205, 212, 227, 229, 79, 211, 238, 241, 176, 218,
+ 59, 205, 212, 227, 229, 153, 204, 46, 218, 59, 247, 189, 211, 238, 204,
+ 46, 218, 59, 247, 189, 153, 241, 176, 218, 59, 247, 189, 211, 238, 241,
+ 176, 218, 59, 247, 189, 79, 153, 204, 46, 218, 59, 247, 189, 79, 211,
+ 238, 204, 46, 218, 59, 247, 189, 79, 153, 241, 176, 218, 59, 247, 189,
+ 79, 211, 238, 241, 176, 218, 59, 247, 189, 236, 125, 217, 40, 51, 219,
+ 233, 236, 125, 217, 40, 51, 219, 234, 231, 50, 62, 211, 177, 212, 2, 217,
+ 40, 51, 219, 233, 212, 2, 217, 40, 51, 219, 234, 231, 50, 62, 211, 177,
+ 96, 215, 218, 177, 215, 218, 86, 215, 218, 183, 215, 218, 132, 32, 240,
+ 251, 219, 233, 79, 132, 32, 240, 251, 219, 233, 32, 171, 240, 251, 219,
+ 233, 79, 32, 171, 240, 251, 219, 233, 79, 250, 236, 219, 233, 210, 169,
+ 250, 236, 219, 233, 41, 79, 52, 207, 174, 245, 234, 217, 31, 131, 219,
+ 233, 41, 79, 52, 245, 234, 217, 31, 131, 219, 233, 41, 79, 124, 52, 245,
+ 234, 217, 31, 131, 219, 233, 79, 230, 248, 219, 233, 41, 230, 248, 219,
+ 233, 79, 41, 230, 248, 219, 233, 205, 242, 79, 212, 0, 205, 242, 79, 216,
+ 74, 212, 0, 246, 167, 248, 20, 216, 74, 246, 167, 248, 20, 215, 218, 237,
+ 38, 211, 81, 227, 40, 216, 193, 247, 39, 236, 240, 208, 110, 236, 240,
+ 208, 111, 3, 247, 178, 221, 167, 208, 110, 224, 213, 157, 216, 194, 211,
+ 87, 208, 108, 208, 109, 247, 39, 247, 153, 220, 29, 247, 153, 208, 59,
+ 247, 154, 211, 61, 224, 109, 250, 240, 239, 250, 241, 77, 218, 51, 247,
+ 39, 220, 29, 218, 51, 247, 39, 209, 197, 220, 29, 209, 197, 250, 22, 220,
+ 29, 250, 22, 216, 145, 206, 47, 244, 41, 208, 50, 250, 86, 227, 8, 208,
+ 116, 224, 42, 224, 13, 216, 192, 210, 182, 216, 192, 224, 13, 247, 86,
+ 251, 95, 208, 107, 212, 251, 215, 188, 211, 210, 236, 106, 208, 114, 227,
+ 134, 80, 208, 114, 227, 134, 245, 199, 54, 218, 51, 247, 24, 216, 67,
+ 227, 134, 208, 82, 239, 226, 220, 32, 218, 30, 243, 88, 221, 192, 241,
+ 63, 54, 212, 28, 97, 221, 192, 212, 28, 97, 217, 160, 227, 87, 231, 50,
+ 230, 198, 218, 97, 97, 243, 114, 221, 166, 227, 87, 97, 218, 24, 204, 81,
+ 97, 221, 182, 204, 81, 97, 248, 82, 221, 192, 248, 81, 248, 80, 224, 13,
+ 248, 80, 219, 25, 221, 192, 219, 24, 246, 132, 245, 123, 224, 236, 97,
+ 203, 247, 97, 216, 83, 249, 28, 97, 208, 168, 204, 81, 246, 13, 212, 209,
+ 248, 206, 248, 204, 219, 57, 245, 183, 245, 79, 249, 7, 246, 41, 49, 226,
+ 229, 208, 86, 3, 215, 189, 245, 164, 217, 220, 54, 43, 231, 25, 211, 239,
+ 247, 231, 97, 238, 59, 97, 245, 157, 25, 228, 18, 212, 54, 251, 135, 212,
+ 231, 249, 6, 248, 127, 248, 128, 248, 151, 218, 97, 76, 203, 231, 237,
+ 131, 25, 203, 225, 213, 8, 220, 56, 242, 46, 224, 17, 216, 193, 208, 118,
+ 224, 19, 248, 19, 206, 223, 224, 119, 251, 52, 206, 223, 251, 52, 206,
+ 223, 5, 251, 52, 5, 251, 52, 221, 171, 251, 52, 251, 53, 244, 25, 251,
+ 53, 250, 97, 214, 221, 220, 29, 239, 250, 241, 77, 243, 211, 227, 40,
+ 219, 60, 212, 251, 136, 16, 35, 217, 36, 136, 16, 35, 251, 54, 136, 16,
+ 35, 239, 249, 136, 16, 35, 241, 179, 136, 16, 35, 204, 80, 136, 16, 35,
+ 250, 146, 136, 16, 35, 250, 147, 216, 132, 136, 16, 35, 250, 147, 216,
+ 131, 136, 16, 35, 250, 147, 205, 195, 136, 16, 35, 250, 147, 205, 194,
+ 136, 16, 35, 205, 209, 136, 16, 35, 205, 208, 136, 16, 35, 205, 207, 136,
+ 16, 35, 210, 221, 136, 16, 35, 218, 184, 210, 221, 136, 16, 35, 62, 210,
+ 221, 136, 16, 35, 224, 235, 210, 252, 136, 16, 35, 224, 235, 210, 251,
+ 136, 16, 35, 224, 235, 210, 250, 136, 16, 35, 246, 64, 136, 16, 35, 215,
+ 1, 136, 16, 35, 222, 51, 136, 16, 35, 205, 193, 136, 16, 35, 205, 192,
+ 136, 16, 35, 215, 219, 215, 1, 136, 16, 35, 215, 219, 215, 0, 136, 16,
+ 35, 238, 31, 136, 16, 35, 212, 133, 136, 16, 35, 230, 221, 219, 239, 136,
+ 16, 35, 230, 221, 219, 238, 136, 16, 35, 245, 134, 76, 230, 220, 136, 16,
+ 35, 216, 128, 76, 230, 220, 136, 16, 35, 245, 174, 219, 239, 136, 16, 35,
+ 230, 219, 219, 239, 136, 16, 35, 210, 253, 76, 245, 173, 136, 16, 35,
+ 245, 134, 76, 245, 173, 136, 16, 35, 245, 134, 76, 245, 172, 136, 16, 35,
+ 245, 174, 250, 188, 136, 16, 35, 215, 2, 76, 245, 174, 250, 188, 136, 16,
+ 35, 210, 253, 76, 215, 2, 76, 245, 173, 136, 16, 35, 206, 42, 136, 16,
+ 35, 208, 218, 219, 239, 136, 16, 35, 227, 233, 219, 239, 136, 16, 35,
+ 250, 187, 219, 239, 136, 16, 35, 210, 253, 76, 250, 186, 136, 16, 35,
+ 215, 2, 76, 250, 186, 136, 16, 35, 210, 253, 76, 215, 2, 76, 250, 186,
+ 136, 16, 35, 205, 210, 76, 250, 186, 136, 16, 35, 216, 128, 76, 250, 186,
+ 136, 16, 35, 216, 128, 76, 250, 185, 136, 16, 35, 216, 127, 136, 16, 35,
+ 216, 126, 136, 16, 35, 216, 125, 136, 16, 35, 216, 124, 136, 16, 35, 251,
+ 17, 136, 16, 35, 251, 16, 136, 16, 35, 225, 97, 136, 16, 35, 215, 7, 136,
+ 16, 35, 250, 90, 136, 16, 35, 216, 155, 136, 16, 35, 216, 154, 136, 16,
+ 35, 250, 25, 136, 16, 35, 248, 52, 219, 239, 136, 16, 35, 209, 216, 136,
+ 16, 35, 209, 215, 136, 16, 35, 217, 42, 227, 123, 136, 16, 35, 248, 0,
+ 136, 16, 35, 247, 255, 136, 16, 35, 247, 254, 136, 16, 35, 250, 249, 136,
+ 16, 35, 220, 55, 136, 16, 35, 211, 198, 136, 16, 35, 208, 216, 136, 16,
+ 35, 237, 210, 136, 16, 35, 204, 68, 136, 16, 35, 218, 18, 136, 16, 35,
+ 247, 70, 136, 16, 35, 207, 166, 136, 16, 35, 247, 41, 224, 23, 136, 16,
+ 35, 214, 199, 76, 230, 87, 136, 16, 35, 247, 83, 136, 16, 35, 208, 79,
+ 136, 16, 35, 211, 92, 208, 79, 136, 16, 35, 227, 39, 136, 16, 35, 212,
+ 11, 136, 16, 35, 206, 202, 136, 16, 35, 236, 50, 242, 27, 136, 16, 35,
+ 250, 70, 136, 16, 35, 218, 26, 250, 70, 136, 16, 35, 247, 210, 136, 16,
+ 35, 218, 17, 247, 210, 136, 16, 35, 250, 246, 136, 16, 35, 211, 48, 210,
+ 202, 211, 47, 136, 16, 35, 211, 48, 210, 202, 211, 46, 136, 16, 35, 210,
+ 249, 136, 16, 35, 217, 247, 136, 16, 35, 243, 150, 136, 16, 35, 243, 152,
+ 136, 16, 35, 243, 151, 136, 16, 35, 217, 169, 136, 16, 35, 217, 158, 136,
+ 16, 35, 245, 121, 136, 16, 35, 245, 120, 136, 16, 35, 245, 119, 136, 16,
+ 35, 245, 118, 136, 16, 35, 245, 117, 136, 16, 35, 251, 29, 136, 16, 35,
+ 248, 207, 76, 225, 81, 136, 16, 35, 248, 207, 76, 206, 74, 136, 16, 35,
+ 216, 81, 136, 16, 35, 236, 42, 136, 16, 35, 222, 79, 136, 16, 35, 244,
+ 132, 136, 16, 35, 224, 37, 136, 16, 35, 162, 242, 59, 136, 16, 35, 162,
+ 219, 214, 62, 227, 217, 230, 204, 50, 208, 85, 62, 206, 223, 230, 204,
+ 50, 208, 85, 62, 216, 11, 230, 204, 50, 208, 85, 62, 242, 69, 230, 204,
+ 50, 208, 85, 62, 212, 47, 5, 246, 61, 225, 10, 26, 61, 246, 61, 26, 61,
+ 246, 61, 79, 61, 246, 61, 205, 242, 79, 61, 246, 61, 240, 195, 79, 61,
+ 246, 61, 61, 246, 62, 245, 195, 62, 5, 246, 61, 215, 191, 209, 217, 62,
+ 208, 213, 211, 177, 62, 212, 47, 5, 211, 177, 157, 61, 211, 177, 225, 10,
+ 61, 211, 177, 26, 61, 211, 177, 79, 61, 211, 177, 205, 242, 79, 61, 211,
+ 177, 240, 195, 79, 61, 211, 177, 61, 51, 245, 195, 62, 205, 242, 5, 211,
+ 177, 61, 51, 245, 195, 62, 225, 10, 211, 177, 51, 209, 217, 62, 208, 213,
+ 243, 221, 62, 205, 242, 5, 243, 221, 62, 225, 10, 5, 243, 221, 61, 243,
+ 222, 245, 195, 62, 205, 242, 5, 243, 221, 61, 243, 222, 245, 195, 62,
+ 225, 10, 243, 221, 243, 222, 209, 217, 62, 208, 213, 226, 246, 62, 205,
+ 242, 5, 226, 246, 62, 225, 10, 5, 226, 246, 61, 226, 247, 245, 195, 62,
+ 5, 226, 246, 209, 63, 30, 245, 130, 157, 30, 245, 130, 225, 10, 30, 245,
+ 130, 26, 30, 245, 130, 205, 242, 26, 30, 245, 130, 205, 242, 79, 30, 245,
+ 130, 240, 195, 79, 30, 245, 130, 209, 63, 214, 254, 157, 214, 254, 225,
+ 10, 214, 254, 26, 214, 254, 79, 214, 254, 205, 242, 79, 214, 254, 240,
+ 195, 79, 214, 254, 157, 239, 233, 211, 191, 250, 59, 225, 10, 239, 233,
+ 211, 191, 250, 59, 26, 239, 233, 211, 191, 250, 59, 79, 239, 233, 211,
+ 191, 250, 59, 205, 242, 79, 239, 233, 211, 191, 250, 59, 240, 195, 79,
+ 239, 233, 211, 191, 250, 59, 157, 212, 88, 211, 191, 250, 59, 225, 10,
+ 212, 88, 211, 191, 250, 59, 26, 212, 88, 211, 191, 250, 59, 79, 212, 88,
+ 211, 191, 250, 59, 205, 242, 79, 212, 88, 211, 191, 250, 59, 240, 195,
+ 79, 212, 88, 211, 191, 250, 59, 157, 241, 143, 211, 191, 250, 59, 225,
+ 10, 241, 143, 211, 191, 250, 59, 26, 241, 143, 211, 191, 250, 59, 79,
+ 241, 143, 211, 191, 250, 59, 205, 242, 79, 241, 143, 211, 191, 250, 59,
+ 157, 126, 218, 61, 62, 211, 94, 225, 10, 126, 218, 61, 62, 211, 94, 126,
+ 218, 61, 62, 211, 94, 225, 10, 126, 218, 61, 218, 118, 211, 94, 157, 239,
+ 147, 218, 61, 62, 211, 94, 225, 10, 239, 147, 218, 61, 62, 211, 94, 239,
+ 147, 218, 61, 62, 211, 94, 225, 10, 239, 147, 218, 61, 218, 118, 211, 94,
+ 216, 74, 157, 239, 147, 218, 61, 218, 118, 211, 94, 157, 239, 233, 218,
+ 61, 62, 211, 94, 79, 239, 233, 218, 61, 62, 211, 94, 225, 10, 212, 88,
+ 218, 61, 62, 211, 94, 79, 212, 88, 218, 61, 62, 211, 94, 212, 88, 218,
+ 61, 218, 118, 211, 94, 225, 10, 241, 143, 218, 61, 62, 211, 94, 79, 241,
+ 143, 218, 61, 62, 211, 94, 205, 242, 79, 241, 143, 218, 61, 62, 211, 94,
+ 79, 241, 143, 218, 61, 218, 118, 211, 94, 157, 207, 155, 218, 61, 62,
+ 211, 94, 79, 207, 155, 218, 61, 62, 211, 94, 79, 207, 155, 218, 61, 218,
+ 118, 211, 94, 96, 53, 3, 5, 208, 86, 250, 94, 177, 53, 3, 5, 208, 86,
+ 250, 94, 86, 53, 3, 5, 208, 86, 250, 94, 183, 53, 3, 5, 208, 86, 250, 94,
+ 96, 53, 3, 225, 10, 208, 86, 250, 94, 177, 53, 3, 225, 10, 208, 86, 250,
+ 94, 86, 53, 3, 225, 10, 208, 86, 250, 94, 183, 53, 3, 225, 10, 208, 86,
+ 250, 94, 96, 53, 3, 228, 8, 208, 86, 250, 94, 177, 53, 3, 228, 8, 208,
+ 86, 250, 94, 86, 53, 3, 228, 8, 208, 86, 250, 94, 183, 53, 3, 228, 8,
+ 208, 86, 250, 94, 96, 53, 3, 5, 241, 31, 250, 94, 177, 53, 3, 5, 241, 31,
+ 250, 94, 86, 53, 3, 5, 241, 31, 250, 94, 183, 53, 3, 5, 241, 31, 250, 94,
+ 96, 53, 3, 241, 31, 250, 94, 177, 53, 3, 241, 31, 250, 94, 86, 53, 3,
+ 241, 31, 250, 94, 183, 53, 3, 241, 31, 250, 94, 79, 96, 53, 3, 241, 31,
+ 250, 94, 79, 177, 53, 3, 241, 31, 250, 94, 79, 86, 53, 3, 241, 31, 250,
+ 94, 79, 183, 53, 3, 241, 31, 250, 94, 79, 96, 53, 3, 228, 8, 241, 31,
+ 250, 94, 79, 177, 53, 3, 228, 8, 241, 31, 250, 94, 79, 86, 53, 3, 228, 8,
+ 241, 31, 250, 94, 79, 183, 53, 3, 228, 8, 241, 31, 250, 94, 96, 208, 84,
+ 53, 3, 223, 73, 213, 75, 177, 208, 84, 53, 3, 223, 73, 213, 75, 86, 208,
+ 84, 53, 3, 223, 73, 213, 75, 183, 208, 84, 53, 3, 223, 73, 213, 75, 96,
+ 208, 84, 53, 3, 225, 10, 213, 75, 177, 208, 84, 53, 3, 225, 10, 213, 75,
+ 86, 208, 84, 53, 3, 225, 10, 213, 75, 183, 208, 84, 53, 3, 225, 10, 213,
+ 75, 96, 208, 84, 53, 3, 26, 213, 75, 177, 208, 84, 53, 3, 26, 213, 75,
+ 86, 208, 84, 53, 3, 26, 213, 75, 183, 208, 84, 53, 3, 26, 213, 75, 96,
+ 208, 84, 53, 3, 79, 213, 75, 177, 208, 84, 53, 3, 79, 213, 75, 86, 208,
+ 84, 53, 3, 79, 213, 75, 183, 208, 84, 53, 3, 79, 213, 75, 96, 208, 84,
+ 53, 3, 205, 242, 79, 213, 75, 177, 208, 84, 53, 3, 205, 242, 79, 213, 75,
+ 86, 208, 84, 53, 3, 205, 242, 79, 213, 75, 183, 208, 84, 53, 3, 205, 242,
+ 79, 213, 75, 96, 240, 1, 47, 177, 240, 1, 47, 86, 240, 1, 47, 183, 240,
+ 1, 47, 96, 103, 47, 177, 103, 47, 86, 103, 47, 183, 103, 47, 96, 245,
+ 222, 47, 177, 245, 222, 47, 86, 245, 222, 47, 183, 245, 222, 47, 96, 79,
+ 245, 222, 47, 177, 79, 245, 222, 47, 86, 79, 245, 222, 47, 183, 79, 245,
+ 222, 47, 96, 79, 47, 177, 79, 47, 86, 79, 47, 183, 79, 47, 96, 41, 47,
+ 177, 41, 47, 86, 41, 47, 183, 41, 47, 153, 204, 46, 41, 47, 153, 241,
+ 176, 41, 47, 211, 238, 241, 176, 41, 47, 211, 238, 204, 46, 41, 47, 49,
+ 50, 41, 47, 112, 121, 41, 47, 204, 26, 96, 157, 150, 47, 204, 26, 177,
+ 157, 150, 47, 204, 26, 86, 157, 150, 47, 204, 26, 183, 157, 150, 47, 204,
+ 26, 153, 204, 46, 157, 150, 47, 204, 26, 153, 241, 176, 157, 150, 47,
+ 204, 26, 211, 238, 241, 176, 157, 150, 47, 204, 26, 211, 238, 204, 46,
+ 157, 150, 47, 204, 26, 96, 150, 47, 204, 26, 177, 150, 47, 204, 26, 86,
+ 150, 47, 204, 26, 183, 150, 47, 204, 26, 153, 204, 46, 150, 47, 204, 26,
+ 153, 241, 176, 150, 47, 204, 26, 211, 238, 241, 176, 150, 47, 204, 26,
+ 211, 238, 204, 46, 150, 47, 204, 26, 96, 225, 10, 150, 47, 204, 26, 177,
+ 225, 10, 150, 47, 204, 26, 86, 225, 10, 150, 47, 204, 26, 183, 225, 10,
+ 150, 47, 204, 26, 153, 204, 46, 225, 10, 150, 47, 204, 26, 153, 241, 176,
+ 225, 10, 150, 47, 204, 26, 211, 238, 241, 176, 225, 10, 150, 47, 204, 26,
+ 211, 238, 204, 46, 225, 10, 150, 47, 204, 26, 96, 79, 150, 47, 204, 26,
+ 177, 79, 150, 47, 204, 26, 86, 79, 150, 47, 204, 26, 183, 79, 150, 47,
+ 204, 26, 153, 204, 46, 79, 150, 47, 204, 26, 153, 241, 176, 79, 150, 47,
+ 204, 26, 211, 238, 241, 176, 79, 150, 47, 204, 26, 211, 238, 204, 46, 79,
+ 150, 47, 204, 26, 96, 205, 242, 79, 150, 47, 204, 26, 177, 205, 242, 79,
+ 150, 47, 204, 26, 86, 205, 242, 79, 150, 47, 204, 26, 183, 205, 242, 79,
+ 150, 47, 204, 26, 153, 204, 46, 205, 242, 79, 150, 47, 204, 26, 153, 241,
+ 176, 205, 242, 79, 150, 47, 204, 26, 211, 238, 241, 176, 205, 242, 79,
+ 150, 47, 204, 26, 211, 238, 204, 46, 205, 242, 79, 150, 47, 96, 208, 86,
+ 250, 94, 177, 208, 86, 250, 94, 86, 208, 86, 250, 94, 183, 208, 86, 250,
+ 94, 96, 61, 53, 204, 5, 208, 86, 250, 94, 177, 61, 53, 204, 5, 208, 86,
+ 250, 94, 86, 61, 53, 204, 5, 208, 86, 250, 94, 183, 61, 53, 204, 5, 208,
+ 86, 250, 94, 96, 53, 3, 221, 162, 209, 248, 177, 53, 3, 221, 162, 209,
+ 248, 86, 53, 3, 221, 162, 209, 248, 183, 53, 3, 221, 162, 209, 248, 79,
+ 53, 213, 76, 204, 24, 105, 79, 53, 213, 76, 204, 24, 120, 209, 57, 79,
+ 53, 213, 76, 204, 24, 118, 237, 137, 79, 53, 213, 76, 204, 24, 118, 209,
+ 60, 96, 247, 245, 61, 47, 86, 247, 248, 213, 78, 61, 47, 96, 208, 145,
+ 213, 78, 61, 47, 86, 208, 145, 213, 78, 61, 47, 96, 227, 216, 61, 47, 86,
+ 216, 10, 61, 47, 96, 216, 10, 61, 47, 86, 227, 216, 61, 47, 96, 249, 24,
+ 213, 77, 61, 47, 86, 249, 24, 213, 77, 61, 47, 96, 239, 117, 213, 77, 61,
+ 47, 86, 239, 117, 213, 77, 61, 47, 61, 53, 213, 76, 204, 24, 105, 61, 53,
+ 213, 76, 204, 24, 120, 209, 57, 202, 26, 240, 102, 224, 52, 240, 102,
+ 240, 103, 3, 209, 80, 222, 222, 240, 102, 209, 62, 240, 102, 240, 103, 3,
+ 237, 63, 215, 221, 240, 102, 236, 20, 240, 102, 2, 76, 209, 93, 236, 52,
+ 245, 146, 227, 102, 240, 102, 214, 188, 207, 179, 206, 240, 240, 102,
+ 246, 161, 204, 57, 12, 15, 235, 152, 12, 15, 235, 151, 12, 15, 235, 150,
+ 12, 15, 235, 149, 12, 15, 235, 148, 12, 15, 235, 147, 12, 15, 235, 146,
+ 12, 15, 235, 145, 12, 15, 235, 144, 12, 15, 235, 143, 12, 15, 235, 142,
+ 12, 15, 235, 141, 12, 15, 235, 140, 12, 15, 235, 139, 12, 15, 235, 138,
+ 12, 15, 235, 137, 12, 15, 235, 136, 12, 15, 235, 135, 12, 15, 235, 134,
+ 12, 15, 235, 133, 12, 15, 235, 132, 12, 15, 235, 131, 12, 15, 235, 130,
+ 12, 15, 235, 129, 12, 15, 235, 128, 12, 15, 235, 127, 12, 15, 235, 126,
+ 12, 15, 235, 125, 12, 15, 235, 124, 12, 15, 235, 123, 12, 15, 235, 122,
+ 12, 15, 235, 121, 12, 15, 235, 120, 12, 15, 235, 119, 12, 15, 235, 118,
+ 12, 15, 235, 117, 12, 15, 235, 116, 12, 15, 235, 115, 12, 15, 235, 114,
+ 12, 15, 235, 113, 12, 15, 235, 112, 12, 15, 235, 111, 12, 15, 235, 110,
+ 12, 15, 235, 109, 12, 15, 235, 108, 12, 15, 235, 107, 12, 15, 235, 106,
+ 12, 15, 235, 105, 12, 15, 235, 104, 12, 15, 235, 103, 12, 15, 235, 102,
+ 12, 15, 235, 101, 12, 15, 235, 100, 12, 15, 235, 99, 12, 15, 235, 98, 12,
+ 15, 235, 97, 12, 15, 235, 96, 12, 15, 235, 95, 12, 15, 235, 94, 12, 15,
+ 235, 93, 12, 15, 235, 92, 12, 15, 235, 91, 12, 15, 235, 90, 12, 15, 235,
+ 89, 12, 15, 235, 88, 12, 15, 235, 87, 12, 15, 235, 86, 12, 15, 235, 85,
+ 12, 15, 235, 84, 12, 15, 235, 83, 12, 15, 235, 82, 12, 15, 235, 81, 12,
+ 15, 235, 80, 12, 15, 235, 79, 12, 15, 235, 78, 12, 15, 235, 77, 12, 15,
+ 235, 76, 12, 15, 235, 75, 12, 15, 235, 74, 12, 15, 235, 73, 12, 15, 235,
+ 72, 12, 15, 235, 71, 12, 15, 235, 70, 12, 15, 235, 69, 12, 15, 235, 68,
+ 12, 15, 235, 67, 12, 15, 235, 66, 12, 15, 235, 65, 12, 15, 235, 64, 12,
+ 15, 235, 63, 12, 15, 235, 62, 12, 15, 235, 61, 12, 15, 235, 60, 12, 15,
+ 235, 59, 12, 15, 235, 58, 12, 15, 235, 57, 12, 15, 235, 56, 12, 15, 235,
+ 55, 12, 15, 235, 54, 12, 15, 235, 53, 12, 15, 235, 52, 12, 15, 235, 51,
+ 12, 15, 235, 50, 12, 15, 235, 49, 12, 15, 235, 48, 12, 15, 235, 47, 12,
+ 15, 235, 46, 12, 15, 235, 45, 12, 15, 235, 44, 12, 15, 235, 43, 12, 15,
+ 235, 42, 12, 15, 235, 41, 12, 15, 235, 40, 12, 15, 235, 39, 12, 15, 235,
+ 38, 12, 15, 235, 37, 12, 15, 235, 36, 12, 15, 235, 35, 12, 15, 235, 34,
+ 12, 15, 235, 33, 12, 15, 235, 32, 12, 15, 235, 31, 12, 15, 235, 30, 12,
+ 15, 235, 29, 12, 15, 235, 28, 12, 15, 235, 27, 12, 15, 235, 26, 12, 15,
+ 235, 25, 12, 15, 235, 24, 12, 15, 235, 23, 12, 15, 235, 22, 12, 15, 235,
+ 21, 12, 15, 235, 20, 12, 15, 235, 19, 12, 15, 235, 18, 12, 15, 235, 17,
+ 12, 15, 235, 16, 12, 15, 235, 15, 12, 15, 235, 14, 12, 15, 235, 13, 12,
+ 15, 235, 12, 12, 15, 235, 11, 12, 15, 235, 10, 12, 15, 235, 9, 12, 15,
+ 235, 8, 12, 15, 235, 7, 12, 15, 235, 6, 12, 15, 235, 5, 12, 15, 235, 4,
+ 12, 15, 235, 3, 12, 15, 235, 2, 12, 15, 235, 1, 12, 15, 235, 0, 12, 15,
+ 234, 255, 12, 15, 234, 254, 12, 15, 234, 253, 12, 15, 234, 252, 12, 15,
+ 234, 251, 12, 15, 234, 250, 12, 15, 234, 249, 12, 15, 234, 248, 12, 15,
+ 234, 247, 12, 15, 234, 246, 12, 15, 234, 245, 12, 15, 234, 244, 12, 15,
+ 234, 243, 12, 15, 234, 242, 12, 15, 234, 241, 12, 15, 234, 240, 12, 15,
+ 234, 239, 12, 15, 234, 238, 12, 15, 234, 237, 12, 15, 234, 236, 12, 15,
+ 234, 235, 12, 15, 234, 234, 12, 15, 234, 233, 12, 15, 234, 232, 12, 15,
+ 234, 231, 12, 15, 234, 230, 12, 15, 234, 229, 12, 15, 234, 228, 12, 15,
+ 234, 227, 12, 15, 234, 226, 12, 15, 234, 225, 12, 15, 234, 224, 12, 15,
+ 234, 223, 12, 15, 234, 222, 12, 15, 234, 221, 12, 15, 234, 220, 12, 15,
+ 234, 219, 12, 15, 234, 218, 12, 15, 234, 217, 12, 15, 234, 216, 12, 15,
+ 234, 215, 12, 15, 234, 214, 12, 15, 234, 213, 12, 15, 234, 212, 12, 15,
+ 234, 211, 12, 15, 234, 210, 12, 15, 234, 209, 12, 15, 234, 208, 12, 15,
+ 234, 207, 12, 15, 234, 206, 12, 15, 234, 205, 12, 15, 234, 204, 12, 15,
+ 234, 203, 12, 15, 234, 202, 12, 15, 234, 201, 12, 15, 234, 200, 12, 15,
+ 234, 199, 12, 15, 234, 198, 12, 15, 234, 197, 12, 15, 234, 196, 12, 15,
+ 234, 195, 12, 15, 234, 194, 12, 15, 234, 193, 12, 15, 234, 192, 12, 15,
+ 234, 191, 12, 15, 234, 190, 12, 15, 234, 189, 12, 15, 234, 188, 12, 15,
+ 234, 187, 12, 15, 234, 186, 12, 15, 234, 185, 12, 15, 234, 184, 12, 15,
+ 234, 183, 12, 15, 234, 182, 12, 15, 234, 181, 12, 15, 234, 180, 12, 15,
+ 234, 179, 12, 15, 234, 178, 12, 15, 234, 177, 12, 15, 234, 176, 12, 15,
+ 234, 175, 12, 15, 234, 174, 12, 15, 234, 173, 12, 15, 234, 172, 12, 15,
+ 234, 171, 12, 15, 234, 170, 12, 15, 234, 169, 12, 15, 234, 168, 12, 15,
+ 234, 167, 12, 15, 234, 166, 12, 15, 234, 165, 12, 15, 234, 164, 12, 15,
+ 234, 163, 12, 15, 234, 162, 12, 15, 234, 161, 12, 15, 234, 160, 12, 15,
+ 234, 159, 12, 15, 234, 158, 12, 15, 234, 157, 12, 15, 234, 156, 12, 15,
+ 234, 155, 12, 15, 234, 154, 12, 15, 234, 153, 12, 15, 234, 152, 12, 15,
+ 234, 151, 12, 15, 234, 150, 12, 15, 234, 149, 12, 15, 234, 148, 12, 15,
+ 234, 147, 12, 15, 234, 146, 12, 15, 234, 145, 12, 15, 234, 144, 12, 15,
+ 234, 143, 12, 15, 234, 142, 12, 15, 234, 141, 12, 15, 234, 140, 12, 15,
+ 234, 139, 12, 15, 234, 138, 12, 15, 234, 137, 12, 15, 234, 136, 12, 15,
+ 234, 135, 12, 15, 234, 134, 12, 15, 234, 133, 12, 15, 234, 132, 12, 15,
+ 234, 131, 12, 15, 234, 130, 12, 15, 234, 129, 12, 15, 234, 128, 12, 15,
+ 234, 127, 12, 15, 234, 126, 12, 15, 234, 125, 12, 15, 234, 124, 12, 15,
+ 234, 123, 12, 15, 234, 122, 12, 15, 234, 121, 12, 15, 234, 120, 12, 15,
+ 234, 119, 12, 15, 234, 118, 12, 15, 234, 117, 12, 15, 234, 116, 12, 15,
+ 234, 115, 12, 15, 234, 114, 12, 15, 234, 113, 12, 15, 234, 112, 12, 15,
+ 234, 111, 12, 15, 234, 110, 12, 15, 234, 109, 12, 15, 234, 108, 12, 15,
+ 234, 107, 12, 15, 234, 106, 12, 15, 234, 105, 12, 15, 234, 104, 12, 15,
+ 234, 103, 12, 15, 234, 102, 12, 15, 234, 101, 12, 15, 234, 100, 12, 15,
+ 234, 99, 12, 15, 234, 98, 12, 15, 234, 97, 12, 15, 234, 96, 12, 15, 234,
+ 95, 12, 15, 234, 94, 12, 15, 234, 93, 12, 15, 234, 92, 12, 15, 234, 91,
+ 12, 15, 234, 90, 12, 15, 234, 89, 12, 15, 234, 88, 12, 15, 234, 87, 12,
+ 15, 234, 86, 12, 15, 234, 85, 12, 15, 234, 84, 12, 15, 234, 83, 12, 15,
+ 234, 82, 12, 15, 234, 81, 12, 15, 234, 80, 12, 15, 234, 79, 12, 15, 234,
+ 78, 12, 15, 234, 77, 12, 15, 234, 76, 12, 15, 234, 75, 12, 15, 234, 74,
+ 12, 15, 234, 73, 12, 15, 234, 72, 12, 15, 234, 71, 12, 15, 234, 70, 12,
+ 15, 234, 69, 12, 15, 234, 68, 12, 15, 234, 67, 12, 15, 234, 66, 12, 15,
+ 234, 65, 12, 15, 234, 64, 12, 15, 234, 63, 12, 15, 234, 62, 12, 15, 234,
+ 61, 12, 15, 234, 60, 12, 15, 234, 59, 12, 15, 234, 58, 12, 15, 234, 57,
+ 12, 15, 234, 56, 12, 15, 234, 55, 12, 15, 234, 54, 12, 15, 234, 53, 12,
+ 15, 234, 52, 12, 15, 234, 51, 12, 15, 234, 50, 12, 15, 234, 49, 12, 15,
+ 234, 48, 12, 15, 234, 47, 12, 15, 234, 46, 12, 15, 234, 45, 12, 15, 234,
+ 44, 12, 15, 234, 43, 12, 15, 234, 42, 12, 15, 234, 41, 12, 15, 234, 40,
+ 12, 15, 234, 39, 12, 15, 234, 38, 12, 15, 234, 37, 12, 15, 234, 36, 12,
+ 15, 234, 35, 12, 15, 234, 34, 12, 15, 234, 33, 12, 15, 234, 32, 12, 15,
+ 234, 31, 12, 15, 234, 30, 12, 15, 234, 29, 12, 15, 234, 28, 12, 15, 234,
+ 27, 12, 15, 234, 26, 12, 15, 234, 25, 12, 15, 234, 24, 12, 15, 234, 23,
+ 12, 15, 234, 22, 12, 15, 234, 21, 12, 15, 234, 20, 12, 15, 234, 19, 12,
+ 15, 234, 18, 12, 15, 234, 17, 12, 15, 234, 16, 12, 15, 234, 15, 12, 15,
+ 234, 14, 12, 15, 234, 13, 12, 15, 234, 12, 12, 15, 234, 11, 12, 15, 234,
+ 10, 12, 15, 234, 9, 12, 15, 234, 8, 12, 15, 234, 7, 12, 15, 234, 6, 12,
+ 15, 234, 5, 12, 15, 234, 4, 12, 15, 234, 3, 12, 15, 234, 2, 12, 15, 234,
+ 1, 12, 15, 234, 0, 12, 15, 233, 255, 12, 15, 233, 254, 12, 15, 233, 253,
+ 12, 15, 233, 252, 12, 15, 233, 251, 12, 15, 233, 250, 12, 15, 233, 249,
+ 12, 15, 233, 248, 12, 15, 233, 247, 12, 15, 233, 246, 12, 15, 233, 245,
+ 12, 15, 233, 244, 12, 15, 233, 243, 12, 15, 233, 242, 12, 15, 233, 241,
+ 12, 15, 233, 240, 12, 15, 233, 239, 12, 15, 233, 238, 12, 15, 233, 237,
+ 12, 15, 233, 236, 12, 15, 233, 235, 12, 15, 233, 234, 12, 15, 233, 233,
+ 12, 15, 233, 232, 12, 15, 233, 231, 12, 15, 233, 230, 12, 15, 233, 229,
+ 12, 15, 233, 228, 12, 15, 233, 227, 12, 15, 233, 226, 12, 15, 233, 225,
+ 12, 15, 233, 224, 12, 15, 233, 223, 12, 15, 233, 222, 12, 15, 233, 221,
+ 12, 15, 233, 220, 12, 15, 233, 219, 12, 15, 233, 218, 12, 15, 233, 217,
+ 12, 15, 233, 216, 12, 15, 233, 215, 12, 15, 233, 214, 12, 15, 233, 213,
+ 12, 15, 233, 212, 12, 15, 233, 211, 12, 15, 233, 210, 12, 15, 233, 209,
+ 12, 15, 233, 208, 12, 15, 233, 207, 12, 15, 233, 206, 12, 15, 233, 205,
+ 12, 15, 233, 204, 12, 15, 233, 203, 12, 15, 233, 202, 12, 15, 233, 201,
+ 12, 15, 233, 200, 12, 15, 233, 199, 12, 15, 233, 198, 12, 15, 233, 197,
+ 12, 15, 233, 196, 12, 15, 233, 195, 12, 15, 233, 194, 12, 15, 233, 193,
+ 12, 15, 233, 192, 12, 15, 233, 191, 12, 15, 233, 190, 12, 15, 233, 189,
+ 12, 15, 233, 188, 12, 15, 233, 187, 12, 15, 233, 186, 12, 15, 233, 185,
+ 12, 15, 233, 184, 12, 15, 233, 183, 12, 15, 233, 182, 12, 15, 233, 181,
+ 12, 15, 233, 180, 12, 15, 233, 179, 12, 15, 233, 178, 12, 15, 233, 177,
+ 12, 15, 233, 176, 12, 15, 233, 175, 12, 15, 233, 174, 12, 15, 233, 173,
+ 12, 15, 233, 172, 12, 15, 233, 171, 12, 15, 233, 170, 12, 15, 233, 169,
+ 12, 15, 233, 168, 12, 15, 233, 167, 12, 15, 233, 166, 12, 15, 233, 165,
+ 12, 15, 233, 164, 12, 15, 233, 163, 12, 15, 233, 162, 12, 15, 233, 161,
+ 12, 15, 233, 160, 12, 15, 233, 159, 12, 15, 233, 158, 12, 15, 233, 157,
+ 12, 15, 233, 156, 12, 15, 233, 155, 12, 15, 233, 154, 12, 15, 233, 153,
+ 12, 15, 233, 152, 12, 15, 233, 151, 12, 15, 233, 150, 12, 15, 233, 149,
+ 12, 15, 233, 148, 12, 15, 233, 147, 12, 15, 233, 146, 12, 15, 233, 145,
+ 12, 15, 233, 144, 12, 15, 233, 143, 12, 15, 233, 142, 12, 15, 233, 141,
+ 12, 15, 233, 140, 12, 15, 233, 139, 12, 15, 233, 138, 12, 15, 233, 137,
+ 12, 15, 233, 136, 12, 15, 233, 135, 12, 15, 233, 134, 12, 15, 233, 133,
+ 12, 15, 233, 132, 12, 15, 233, 131, 12, 15, 233, 130, 12, 15, 233, 129,
+ 12, 15, 233, 128, 12, 15, 233, 127, 12, 15, 233, 126, 12, 15, 233, 125,
+ 12, 15, 233, 124, 12, 15, 233, 123, 228, 14, 209, 255, 160, 211, 228,
+ 160, 240, 212, 82, 160, 217, 31, 82, 160, 42, 54, 160, 243, 97, 54, 160,
+ 218, 246, 54, 160, 250, 235, 160, 250, 160, 160, 49, 219, 76, 160, 50,
+ 219, 76, 160, 250, 59, 160, 91, 54, 160, 245, 233, 160, 235, 219, 160,
+ 239, 102, 211, 61, 160, 212, 0, 160, 17, 202, 84, 160, 17, 105, 160, 17,
+ 108, 160, 17, 147, 160, 17, 149, 160, 17, 170, 160, 17, 195, 160, 17,
+ 213, 111, 160, 17, 199, 160, 17, 222, 63, 160, 245, 242, 160, 213, 143,
+ 160, 227, 179, 54, 160, 241, 35, 54, 160, 237, 247, 54, 160, 217, 47, 82,
+ 160, 245, 231, 250, 49, 160, 8, 6, 1, 63, 160, 8, 6, 1, 249, 255, 160, 8,
+ 6, 1, 247, 125, 160, 8, 6, 1, 245, 51, 160, 8, 6, 1, 74, 160, 8, 6, 1,
+ 240, 174, 160, 8, 6, 1, 239, 75, 160, 8, 6, 1, 237, 171, 160, 8, 6, 1,
+ 75, 160, 8, 6, 1, 230, 184, 160, 8, 6, 1, 230, 54, 160, 8, 6, 1, 159,
+ 160, 8, 6, 1, 226, 185, 160, 8, 6, 1, 223, 163, 160, 8, 6, 1, 78, 160, 8,
+ 6, 1, 219, 184, 160, 8, 6, 1, 217, 134, 160, 8, 6, 1, 146, 160, 8, 6, 1,
+ 194, 160, 8, 6, 1, 210, 69, 160, 8, 6, 1, 68, 160, 8, 6, 1, 206, 164,
+ 160, 8, 6, 1, 204, 144, 160, 8, 6, 1, 203, 196, 160, 8, 6, 1, 203, 124,
+ 160, 8, 6, 1, 202, 159, 160, 49, 51, 155, 160, 216, 74, 212, 0, 160, 50,
+ 51, 155, 160, 246, 53, 251, 138, 160, 124, 227, 114, 160, 237, 254, 251,
+ 138, 160, 8, 5, 1, 63, 160, 8, 5, 1, 249, 255, 160, 8, 5, 1, 247, 125,
+ 160, 8, 5, 1, 245, 51, 160, 8, 5, 1, 74, 160, 8, 5, 1, 240, 174, 160, 8,
+ 5, 1, 239, 75, 160, 8, 5, 1, 237, 171, 160, 8, 5, 1, 75, 160, 8, 5, 1,
+ 230, 184, 160, 8, 5, 1, 230, 54, 160, 8, 5, 1, 159, 160, 8, 5, 1, 226,
+ 185, 160, 8, 5, 1, 223, 163, 160, 8, 5, 1, 78, 160, 8, 5, 1, 219, 184,
+ 160, 8, 5, 1, 217, 134, 160, 8, 5, 1, 146, 160, 8, 5, 1, 194, 160, 8, 5,
+ 1, 210, 69, 160, 8, 5, 1, 68, 160, 8, 5, 1, 206, 164, 160, 8, 5, 1, 204,
+ 144, 160, 8, 5, 1, 203, 196, 160, 8, 5, 1, 203, 124, 160, 8, 5, 1, 202,
+ 159, 160, 49, 245, 93, 155, 160, 80, 227, 114, 160, 50, 245, 93, 155,
+ 160, 208, 227, 247, 60, 209, 255, 57, 214, 71, 57, 214, 60, 57, 214, 49,
+ 57, 214, 37, 57, 214, 26, 57, 214, 15, 57, 214, 4, 57, 213, 249, 57, 213,
+ 238, 57, 213, 230, 57, 213, 229, 57, 213, 228, 57, 213, 227, 57, 213,
+ 225, 57, 213, 224, 57, 213, 223, 57, 213, 222, 57, 213, 221, 57, 213,
+ 220, 57, 213, 219, 57, 213, 218, 57, 213, 217, 57, 213, 216, 57, 213,
+ 214, 57, 213, 213, 57, 213, 212, 57, 213, 211, 57, 213, 210, 57, 213,
+ 209, 57, 213, 208, 57, 213, 207, 57, 213, 206, 57, 213, 205, 57, 213,
+ 203, 57, 213, 202, 57, 213, 201, 57, 213, 200, 57, 213, 199, 57, 213,
+ 198, 57, 213, 197, 57, 213, 196, 57, 213, 195, 57, 213, 194, 57, 213,
+ 192, 57, 213, 191, 57, 213, 190, 57, 213, 189, 57, 213, 188, 57, 213,
+ 187, 57, 213, 186, 57, 213, 185, 57, 213, 184, 57, 213, 183, 57, 213,
+ 181, 57, 213, 180, 57, 213, 179, 57, 213, 178, 57, 213, 177, 57, 213,
+ 176, 57, 213, 175, 57, 213, 174, 57, 213, 173, 57, 213, 172, 57, 213,
+ 170, 57, 213, 169, 57, 213, 168, 57, 213, 167, 57, 213, 166, 57, 213,
+ 165, 57, 213, 164, 57, 213, 163, 57, 213, 162, 57, 213, 161, 57, 213,
+ 159, 57, 213, 158, 57, 213, 157, 57, 213, 156, 57, 213, 155, 57, 213,
+ 154, 57, 213, 153, 57, 213, 152, 57, 213, 151, 57, 213, 150, 57, 214,
+ 147, 57, 214, 146, 57, 214, 145, 57, 214, 144, 57, 214, 143, 57, 214,
+ 142, 57, 214, 141, 57, 214, 140, 57, 214, 139, 57, 214, 138, 57, 214,
+ 136, 57, 214, 135, 57, 214, 134, 57, 214, 133, 57, 214, 132, 57, 214,
+ 131, 57, 214, 130, 57, 214, 129, 57, 214, 128, 57, 214, 127, 57, 214,
+ 125, 57, 214, 124, 57, 214, 123, 57, 214, 122, 57, 214, 121, 57, 214,
+ 120, 57, 214, 119, 57, 214, 118, 57, 214, 117, 57, 214, 116, 57, 214,
+ 114, 57, 214, 113, 57, 214, 112, 57, 214, 111, 57, 214, 110, 57, 214,
+ 109, 57, 214, 108, 57, 214, 107, 57, 214, 106, 57, 214, 105, 57, 214,
+ 103, 57, 214, 102, 57, 214, 101, 57, 214, 100, 57, 214, 99, 57, 214, 98,
+ 57, 214, 97, 57, 214, 96, 57, 214, 95, 57, 214, 94, 57, 214, 92, 57, 214,
+ 91, 57, 214, 90, 57, 214, 89, 57, 214, 88, 57, 214, 87, 57, 214, 86, 57,
+ 214, 85, 57, 214, 84, 57, 214, 83, 57, 214, 81, 57, 214, 80, 57, 214, 79,
+ 57, 214, 78, 57, 214, 77, 57, 214, 76, 57, 214, 75, 57, 214, 74, 57, 214,
+ 73, 57, 214, 72, 57, 214, 70, 57, 214, 69, 57, 214, 68, 57, 214, 67, 57,
+ 214, 66, 57, 214, 65, 57, 214, 64, 57, 214, 63, 57, 214, 62, 57, 214, 61,
+ 57, 214, 59, 57, 214, 58, 57, 214, 57, 57, 214, 56, 57, 214, 55, 57, 214,
+ 54, 57, 214, 53, 57, 214, 52, 57, 214, 51, 57, 214, 50, 57, 214, 48, 57,
+ 214, 47, 57, 214, 46, 57, 214, 45, 57, 214, 44, 57, 214, 43, 57, 214, 42,
+ 57, 214, 41, 57, 214, 40, 57, 214, 39, 57, 214, 36, 57, 214, 35, 57, 214,
+ 34, 57, 214, 33, 57, 214, 32, 57, 214, 31, 57, 214, 30, 57, 214, 29, 57,
+ 214, 28, 57, 214, 27, 57, 214, 25, 57, 214, 24, 57, 214, 23, 57, 214, 22,
+ 57, 214, 21, 57, 214, 20, 57, 214, 19, 57, 214, 18, 57, 214, 17, 57, 214,
+ 16, 57, 214, 14, 57, 214, 13, 57, 214, 12, 57, 214, 11, 57, 214, 10, 57,
+ 214, 9, 57, 214, 8, 57, 214, 7, 57, 214, 6, 57, 214, 5, 57, 214, 3, 57,
+ 214, 2, 57, 214, 1, 57, 214, 0, 57, 213, 255, 57, 213, 254, 57, 213, 253,
+ 57, 213, 252, 57, 213, 251, 57, 213, 250, 57, 213, 248, 57, 213, 247, 57,
+ 213, 246, 57, 213, 245, 57, 213, 244, 57, 213, 243, 57, 213, 242, 57,
+ 213, 241, 57, 213, 240, 57, 213, 239, 57, 213, 237, 57, 213, 236, 57,
+ 213, 235, 57, 213, 234, 57, 213, 233, 57, 213, 232, 57, 213, 231, 221,
+ 48, 221, 50, 211, 90, 76, 237, 61, 212, 3, 211, 90, 76, 209, 112, 211,
+ 12, 241, 84, 76, 209, 112, 240, 240, 241, 84, 76, 208, 105, 241, 47, 241,
+ 71, 241, 72, 251, 130, 251, 131, 251, 27, 248, 131, 249, 19, 247, 199,
+ 167, 210, 5, 236, 106, 210, 5, 236, 31, 210, 10, 227, 115, 240, 51, 222,
+ 214, 227, 114, 241, 84, 76, 227, 114, 227, 163, 221, 253, 241, 50, 227,
+ 115, 210, 5, 80, 210, 5, 204, 165, 239, 159, 240, 51, 240, 30, 247, 25,
+ 216, 77, 245, 147, 213, 7, 219, 211, 227, 41, 105, 212, 13, 213, 7, 231,
+ 49, 227, 41, 202, 84, 212, 162, 244, 139, 227, 105, 241, 9, 243, 123,
+ 244, 8, 245, 184, 105, 244, 128, 244, 8, 245, 184, 108, 244, 127, 244, 8,
+ 245, 184, 147, 244, 126, 244, 8, 245, 184, 149, 244, 125, 182, 251, 130,
+ 223, 89, 210, 95, 231, 112, 210, 99, 241, 84, 76, 208, 106, 248, 33, 240,
+ 247, 247, 59, 247, 61, 241, 84, 76, 225, 9, 241, 48, 210, 242, 211, 3,
+ 241, 9, 241, 10, 231, 25, 213, 131, 149, 240, 11, 213, 130, 239, 112,
+ 231, 25, 213, 131, 147, 237, 238, 213, 130, 237, 235, 231, 25, 213, 131,
+ 108, 216, 149, 213, 130, 215, 150, 231, 25, 213, 131, 105, 206, 236, 213,
+ 130, 206, 193, 211, 231, 244, 46, 244, 48, 219, 157, 246, 182, 219, 159,
+ 138, 220, 80, 217, 240, 236, 109, 247, 218, 218, 236, 237, 27, 247, 230,
+ 221, 192, 247, 218, 237, 27, 223, 53, 231, 35, 231, 37, 222, 208, 227,
+ 114, 222, 231, 211, 90, 76, 214, 152, 250, 120, 211, 164, 241, 84, 76,
+ 214, 152, 250, 120, 241, 12, 167, 210, 6, 213, 117, 236, 106, 210, 6,
+ 213, 117, 236, 28, 167, 210, 6, 3, 230, 66, 236, 106, 210, 6, 3, 230, 66,
+ 236, 29, 227, 115, 210, 6, 213, 117, 80, 210, 6, 213, 117, 204, 164, 219,
+ 69, 227, 115, 239, 151, 219, 69, 227, 115, 242, 70, 218, 87, 219, 69,
+ 227, 115, 249, 18, 219, 69, 227, 115, 206, 224, 218, 82, 216, 74, 227,
+ 115, 240, 51, 216, 74, 231, 35, 216, 57, 212, 120, 213, 7, 108, 212, 117,
+ 211, 166, 212, 120, 213, 7, 147, 212, 116, 211, 165, 244, 8, 245, 184,
+ 211, 34, 244, 123, 217, 227, 206, 192, 105, 217, 227, 206, 190, 217, 190,
+ 217, 227, 206, 192, 108, 217, 227, 206, 189, 217, 189, 213, 118, 208,
+ 104, 211, 89, 211, 17, 247, 60, 246, 182, 247, 1, 224, 224, 204, 103,
+ 223, 181, 211, 90, 76, 237, 223, 250, 120, 211, 90, 76, 217, 208, 250,
+ 120, 211, 230, 241, 84, 76, 237, 223, 250, 120, 241, 84, 76, 217, 208,
+ 250, 120, 241, 45, 211, 90, 76, 211, 34, 211, 245, 212, 120, 238, 3, 167,
+ 230, 241, 213, 95, 212, 120, 167, 230, 241, 214, 191, 245, 184, 213, 127,
+ 230, 241, 245, 111, 211, 35, 209, 138, 211, 108, 220, 0, 210, 84, 245,
+ 232, 219, 226, 217, 228, 224, 223, 218, 72, 250, 156, 217, 222, 245, 232,
+ 250, 172, 223, 41, 212, 171, 8, 6, 1, 238, 119, 8, 5, 1, 238, 119, 246,
+ 201, 251, 8, 210, 89, 210, 248, 245, 243, 212, 68, 227, 222, 200, 1, 227,
+ 68, 228, 12, 1, 239, 187, 239, 178, 228, 12, 1, 239, 187, 240, 63, 228,
+ 12, 1, 215, 227, 228, 12, 1, 227, 49, 77, 131, 248, 45, 212, 238, 238,
+ 82, 224, 173, 216, 64, 239, 89, 239, 88, 239, 87, 223, 183, 201, 243,
+ 201, 244, 201, 246, 226, 243, 215, 235, 226, 245, 215, 237, 219, 37, 226,
+ 242, 215, 234, 221, 223, 224, 86, 204, 2, 226, 244, 215, 236, 239, 111,
+ 219, 36, 204, 52, 241, 107, 239, 99, 224, 154, 220, 32, 206, 194, 97,
+ 224, 154, 244, 145, 97, 96, 208, 84, 53, 3, 52, 80, 95, 86, 208, 84, 53,
+ 3, 52, 80, 95, 11, 4, 230, 199, 82, 217, 241, 239, 159, 35, 80, 50, 61,
+ 227, 185, 155, 205, 165, 205, 54, 204, 242, 204, 231, 204, 220, 204, 209,
+ 204, 198, 204, 187, 204, 176, 205, 164, 205, 153, 205, 142, 205, 131,
+ 205, 120, 205, 109, 205, 98, 247, 130, 219, 241, 82, 248, 13, 201, 245,
+ 9, 2, 221, 57, 209, 141, 9, 2, 221, 57, 115, 221, 57, 247, 161, 115, 247,
+ 160, 60, 31, 16, 239, 110, 212, 64, 246, 102, 206, 65, 205, 87, 205, 76,
+ 205, 65, 205, 53, 205, 42, 205, 31, 205, 20, 205, 9, 204, 254, 204, 246,
+ 204, 245, 204, 244, 204, 243, 204, 241, 204, 240, 204, 239, 204, 238,
+ 204, 237, 204, 236, 204, 235, 204, 234, 204, 233, 204, 232, 204, 230,
+ 204, 229, 204, 228, 204, 227, 204, 226, 204, 225, 204, 224, 204, 223,
+ 204, 222, 204, 221, 204, 219, 204, 218, 204, 217, 204, 216, 204, 215,
+ 204, 214, 204, 213, 204, 212, 204, 211, 204, 210, 204, 208, 204, 207,
+ 204, 206, 204, 205, 204, 204, 204, 203, 204, 202, 204, 201, 204, 200,
+ 204, 199, 204, 197, 204, 196, 204, 195, 204, 194, 204, 193, 204, 192,
+ 204, 191, 204, 190, 204, 189, 204, 188, 204, 186, 204, 185, 204, 184,
+ 204, 183, 204, 182, 204, 181, 204, 180, 204, 179, 204, 178, 204, 177,
+ 204, 175, 204, 174, 204, 173, 204, 172, 204, 171, 204, 170, 204, 169,
+ 204, 168, 204, 167, 204, 166, 205, 163, 205, 162, 205, 161, 205, 160,
+ 205, 159, 205, 158, 205, 157, 205, 156, 205, 155, 205, 154, 205, 152,
+ 205, 151, 205, 150, 205, 149, 205, 148, 205, 147, 205, 146, 205, 145,
+ 205, 144, 205, 143, 205, 141, 205, 140, 205, 139, 205, 138, 205, 137,
+ 205, 136, 205, 135, 205, 134, 205, 133, 205, 132, 205, 130, 205, 129,
+ 205, 128, 205, 127, 205, 126, 205, 125, 205, 124, 205, 123, 205, 122,
+ 205, 121, 205, 119, 205, 118, 205, 117, 205, 116, 205, 115, 205, 114,
+ 205, 113, 205, 112, 205, 111, 205, 110, 205, 108, 205, 107, 205, 106,
+ 205, 105, 205, 104, 205, 103, 205, 102, 205, 101, 205, 100, 205, 99, 205,
+ 97, 205, 96, 205, 95, 205, 94, 205, 93, 205, 92, 205, 91, 205, 90, 205,
+ 89, 205, 88, 205, 86, 205, 85, 205, 84, 205, 83, 205, 82, 205, 81, 205,
+ 80, 205, 79, 205, 78, 205, 77, 205, 75, 205, 74, 205, 73, 205, 72, 205,
+ 71, 205, 70, 205, 69, 205, 68, 205, 67, 205, 66, 205, 64, 205, 63, 205,
+ 62, 205, 61, 205, 60, 205, 59, 205, 58, 205, 57, 205, 56, 205, 55, 205,
+ 52, 205, 51, 205, 50, 205, 49, 205, 48, 205, 47, 205, 46, 205, 45, 205,
+ 44, 205, 43, 205, 41, 205, 40, 205, 39, 205, 38, 205, 37, 205, 36, 205,
+ 35, 205, 34, 205, 33, 205, 32, 205, 30, 205, 29, 205, 28, 205, 27, 205,
+ 26, 205, 25, 205, 24, 205, 23, 205, 22, 205, 21, 205, 19, 205, 18, 205,
+ 17, 205, 16, 205, 15, 205, 14, 205, 13, 205, 12, 205, 11, 205, 10, 205,
+ 8, 205, 7, 205, 6, 205, 5, 205, 4, 205, 3, 205, 2, 205, 1, 205, 0, 204,
+ 255, 204, 253, 204, 252, 204, 251, 204, 250, 204, 249, 204, 248, 204,
+ 247, 8, 6, 1, 34, 3, 225, 171, 25, 237, 253, 8, 5, 1, 34, 3, 225, 171,
+ 25, 237, 253, 8, 6, 1, 188, 3, 80, 227, 115, 56, 8, 5, 1, 188, 3, 80,
+ 227, 115, 56, 8, 6, 1, 188, 3, 80, 227, 115, 248, 126, 25, 237, 253, 8,
+ 5, 1, 188, 3, 80, 227, 115, 248, 126, 25, 237, 253, 8, 6, 1, 188, 3, 80,
+ 227, 115, 248, 126, 25, 165, 8, 5, 1, 188, 3, 80, 227, 115, 248, 126, 25,
+ 165, 8, 6, 1, 188, 3, 246, 53, 25, 225, 170, 8, 5, 1, 188, 3, 246, 53,
+ 25, 225, 170, 8, 6, 1, 188, 3, 246, 53, 25, 247, 29, 8, 5, 1, 188, 3,
+ 246, 53, 25, 247, 29, 8, 6, 1, 235, 206, 3, 225, 171, 25, 237, 253, 8, 5,
+ 1, 235, 206, 3, 225, 171, 25, 237, 253, 8, 5, 1, 235, 206, 3, 70, 87, 25,
+ 165, 8, 5, 1, 222, 206, 3, 208, 228, 55, 8, 6, 1, 158, 3, 80, 227, 115,
+ 56, 8, 5, 1, 158, 3, 80, 227, 115, 56, 8, 6, 1, 158, 3, 80, 227, 115,
+ 248, 126, 25, 237, 253, 8, 5, 1, 158, 3, 80, 227, 115, 248, 126, 25, 237,
+ 253, 8, 6, 1, 158, 3, 80, 227, 115, 248, 126, 25, 165, 8, 5, 1, 158, 3,
+ 80, 227, 115, 248, 126, 25, 165, 8, 6, 1, 215, 94, 3, 80, 227, 115, 56,
+ 8, 5, 1, 215, 94, 3, 80, 227, 115, 56, 8, 6, 1, 106, 3, 225, 171, 25,
+ 237, 253, 8, 5, 1, 106, 3, 225, 171, 25, 237, 253, 8, 6, 1, 34, 3, 220,
+ 63, 25, 165, 8, 5, 1, 34, 3, 220, 63, 25, 165, 8, 6, 1, 34, 3, 220, 63,
+ 25, 208, 227, 8, 5, 1, 34, 3, 220, 63, 25, 208, 227, 8, 6, 1, 188, 3,
+ 220, 63, 25, 165, 8, 5, 1, 188, 3, 220, 63, 25, 165, 8, 6, 1, 188, 3,
+ 220, 63, 25, 208, 227, 8, 5, 1, 188, 3, 220, 63, 25, 208, 227, 8, 6, 1,
+ 188, 3, 70, 87, 25, 165, 8, 5, 1, 188, 3, 70, 87, 25, 165, 8, 6, 1, 188,
+ 3, 70, 87, 25, 208, 227, 8, 5, 1, 188, 3, 70, 87, 25, 208, 227, 8, 5, 1,
+ 235, 206, 3, 70, 87, 25, 237, 253, 8, 5, 1, 235, 206, 3, 70, 87, 25, 208,
+ 227, 8, 6, 1, 235, 206, 3, 220, 63, 25, 165, 8, 5, 1, 235, 206, 3, 220,
+ 63, 25, 70, 87, 25, 165, 8, 6, 1, 235, 206, 3, 220, 63, 25, 208, 227, 8,
+ 5, 1, 235, 206, 3, 220, 63, 25, 70, 87, 25, 208, 227, 8, 6, 1, 230, 185,
+ 3, 208, 227, 8, 5, 1, 230, 185, 3, 70, 87, 25, 208, 227, 8, 6, 1, 228,
+ 131, 3, 208, 227, 8, 5, 1, 228, 131, 3, 208, 227, 8, 6, 1, 226, 186, 3,
+ 208, 227, 8, 5, 1, 226, 186, 3, 208, 227, 8, 6, 1, 217, 1, 3, 208, 227,
+ 8, 5, 1, 217, 1, 3, 208, 227, 8, 6, 1, 106, 3, 220, 63, 25, 165, 8, 5, 1,
+ 106, 3, 220, 63, 25, 165, 8, 6, 1, 106, 3, 220, 63, 25, 208, 227, 8, 5,
+ 1, 106, 3, 220, 63, 25, 208, 227, 8, 6, 1, 106, 3, 225, 171, 25, 165, 8,
+ 5, 1, 106, 3, 225, 171, 25, 165, 8, 6, 1, 106, 3, 225, 171, 25, 208, 227,
+ 8, 5, 1, 106, 3, 225, 171, 25, 208, 227, 8, 5, 1, 251, 110, 3, 237, 253,
+ 8, 5, 1, 171, 158, 3, 237, 253, 8, 5, 1, 171, 158, 3, 165, 8, 5, 1, 207,
+ 174, 206, 165, 3, 237, 253, 8, 5, 1, 207, 174, 206, 165, 3, 165, 8, 5, 1,
+ 214, 193, 3, 237, 253, 8, 5, 1, 214, 193, 3, 165, 8, 5, 1, 236, 115, 214,
+ 193, 3, 237, 253, 8, 5, 1, 236, 115, 214, 193, 3, 165, 10, 213, 127, 89,
+ 3, 237, 128, 87, 3, 251, 30, 10, 213, 127, 89, 3, 237, 128, 87, 3, 204,
+ 70, 10, 213, 127, 89, 3, 237, 128, 87, 3, 137, 225, 129, 10, 213, 127,
+ 89, 3, 237, 128, 87, 3, 220, 73, 10, 213, 127, 89, 3, 237, 128, 87, 3,
+ 68, 10, 213, 127, 89, 3, 237, 128, 87, 3, 202, 213, 10, 213, 127, 89, 3,
+ 237, 128, 87, 3, 74, 10, 213, 127, 89, 3, 237, 128, 87, 3, 251, 109, 10,
+ 213, 127, 221, 179, 3, 229, 189, 179, 1, 229, 119, 44, 109, 230, 54, 44,
+ 109, 222, 205, 44, 109, 247, 125, 44, 109, 221, 13, 44, 109, 207, 244,
+ 44, 109, 221, 228, 44, 109, 210, 69, 44, 109, 223, 163, 44, 109, 219,
+ 184, 44, 109, 226, 185, 44, 109, 203, 124, 44, 109, 146, 44, 109, 159,
+ 44, 109, 206, 164, 44, 109, 227, 69, 44, 109, 227, 78, 44, 109, 215, 186,
+ 44, 109, 221, 210, 44, 109, 230, 184, 44, 109, 213, 92, 44, 109, 211,
+ 167, 44, 109, 194, 44, 109, 237, 171, 44, 109, 228, 224, 44, 4, 230, 41,
+ 44, 4, 229, 100, 44, 4, 229, 87, 44, 4, 228, 209, 44, 4, 228, 174, 44, 4,
+ 229, 201, 44, 4, 229, 198, 44, 4, 230, 18, 44, 4, 229, 26, 44, 4, 229, 6,
+ 44, 4, 229, 219, 44, 4, 222, 202, 44, 4, 222, 151, 44, 4, 222, 147, 44,
+ 4, 222, 116, 44, 4, 222, 108, 44, 4, 222, 190, 44, 4, 222, 188, 44, 4,
+ 222, 199, 44, 4, 222, 128, 44, 4, 222, 123, 44, 4, 222, 192, 44, 4, 247,
+ 91, 44, 4, 246, 79, 44, 4, 246, 69, 44, 4, 245, 110, 44, 4, 245, 76, 44,
+ 4, 246, 238, 44, 4, 246, 230, 44, 4, 247, 80, 44, 4, 245, 254, 44, 4,
+ 245, 180, 44, 4, 247, 15, 44, 4, 221, 10, 44, 4, 220, 248, 44, 4, 220,
+ 243, 44, 4, 220, 226, 44, 4, 220, 218, 44, 4, 221, 1, 44, 4, 221, 0, 44,
+ 4, 221, 7, 44, 4, 220, 233, 44, 4, 220, 230, 44, 4, 221, 4, 44, 4, 207,
+ 240, 44, 4, 207, 220, 44, 4, 207, 219, 44, 4, 207, 208, 44, 4, 207, 205,
+ 44, 4, 207, 236, 44, 4, 207, 235, 44, 4, 207, 239, 44, 4, 207, 218, 44,
+ 4, 207, 217, 44, 4, 207, 238, 44, 4, 221, 226, 44, 4, 221, 212, 44, 4,
+ 221, 211, 44, 4, 221, 195, 44, 4, 221, 194, 44, 4, 221, 222, 44, 4, 221,
+ 221, 44, 4, 221, 225, 44, 4, 221, 197, 44, 4, 221, 196, 44, 4, 221, 224,
+ 44, 4, 210, 18, 44, 4, 209, 2, 44, 4, 208, 242, 44, 4, 207, 203, 44, 4,
+ 207, 165, 44, 4, 209, 187, 44, 4, 209, 176, 44, 4, 209, 250, 44, 4, 135,
+ 44, 4, 208, 148, 44, 4, 209, 207, 44, 4, 223, 106, 44, 4, 222, 100, 44,
+ 4, 222, 75, 44, 4, 221, 84, 44, 4, 221, 25, 44, 4, 222, 240, 44, 4, 222,
+ 235, 44, 4, 223, 92, 44, 4, 221, 191, 44, 4, 221, 180, 44, 4, 223, 65,
+ 44, 4, 219, 168, 44, 4, 218, 167, 44, 4, 218, 129, 44, 4, 217, 191, 44,
+ 4, 217, 157, 44, 4, 219, 34, 44, 4, 219, 23, 44, 4, 219, 148, 44, 4, 218,
+ 69, 44, 4, 218, 45, 44, 4, 219, 48, 44, 4, 225, 175, 44, 4, 224, 155, 44,
+ 4, 224, 125, 44, 4, 223, 246, 44, 4, 223, 192, 44, 4, 225, 20, 44, 4,
+ 225, 8, 44, 4, 225, 140, 44, 4, 224, 82, 44, 4, 224, 35, 44, 4, 225, 67,
+ 44, 4, 203, 110, 44, 4, 203, 11, 44, 4, 203, 2, 44, 4, 202, 213, 44, 4,
+ 202, 181, 44, 4, 203, 52, 44, 4, 203, 49, 44, 4, 203, 89, 44, 4, 202,
+ 247, 44, 4, 202, 232, 44, 4, 203, 62, 44, 4, 216, 216, 44, 4, 216, 57,
+ 44, 4, 216, 3, 44, 4, 215, 145, 44, 4, 215, 114, 44, 4, 216, 158, 44, 4,
+ 216, 135, 44, 4, 216, 197, 44, 4, 215, 227, 44, 4, 215, 208, 44, 4, 216,
+ 167, 44, 4, 228, 112, 44, 4, 227, 148, 44, 4, 227, 130, 44, 4, 226, 239,
+ 44, 4, 226, 210, 44, 4, 227, 234, 44, 4, 227, 226, 44, 4, 228, 86, 44, 4,
+ 227, 49, 44, 4, 227, 18, 44, 4, 227, 251, 44, 4, 206, 85, 44, 4, 205,
+ 230, 44, 4, 205, 215, 44, 4, 204, 163, 44, 4, 204, 156, 44, 4, 206, 55,
+ 44, 4, 206, 50, 44, 4, 206, 81, 44, 4, 205, 189, 44, 4, 205, 176, 44, 4,
+ 206, 61, 44, 4, 227, 67, 44, 4, 227, 62, 44, 4, 227, 61, 44, 4, 227, 58,
+ 44, 4, 227, 57, 44, 4, 227, 64, 44, 4, 227, 63, 44, 4, 227, 66, 44, 4,
+ 227, 60, 44, 4, 227, 59, 44, 4, 227, 65, 44, 4, 227, 76, 44, 4, 227, 71,
+ 44, 4, 227, 70, 44, 4, 227, 54, 44, 4, 227, 53, 44, 4, 227, 73, 44, 4,
+ 227, 72, 44, 4, 227, 75, 44, 4, 227, 56, 44, 4, 227, 55, 44, 4, 227, 74,
+ 44, 4, 215, 184, 44, 4, 215, 173, 44, 4, 215, 172, 44, 4, 215, 165, 44,
+ 4, 215, 158, 44, 4, 215, 180, 44, 4, 215, 179, 44, 4, 215, 183, 44, 4,
+ 215, 171, 44, 4, 215, 170, 44, 4, 215, 182, 44, 4, 221, 208, 44, 4, 221,
+ 203, 44, 4, 221, 202, 44, 4, 221, 199, 44, 4, 221, 198, 44, 4, 221, 205,
+ 44, 4, 221, 204, 44, 4, 221, 207, 44, 4, 221, 201, 44, 4, 221, 200, 44,
+ 4, 221, 206, 44, 4, 230, 180, 44, 4, 230, 141, 44, 4, 230, 134, 44, 4,
+ 230, 82, 44, 4, 230, 64, 44, 4, 230, 161, 44, 4, 230, 159, 44, 4, 230,
+ 174, 44, 4, 230, 101, 44, 4, 230, 91, 44, 4, 230, 167, 44, 4, 213, 85,
+ 44, 4, 213, 11, 44, 4, 213, 6, 44, 4, 212, 199, 44, 4, 212, 182, 44, 4,
+ 213, 43, 44, 4, 213, 41, 44, 4, 213, 74, 44, 4, 212, 242, 44, 4, 212,
+ 236, 44, 4, 213, 52, 44, 4, 211, 163, 44, 4, 211, 132, 44, 4, 211, 128,
+ 44, 4, 211, 119, 44, 4, 211, 116, 44, 4, 211, 138, 44, 4, 211, 137, 44,
+ 4, 211, 162, 44, 4, 211, 124, 44, 4, 211, 123, 44, 4, 211, 140, 44, 4,
+ 215, 33, 44, 4, 212, 162, 44, 4, 212, 142, 44, 4, 211, 10, 44, 4, 210,
+ 179, 44, 4, 214, 177, 44, 4, 214, 165, 44, 4, 215, 18, 44, 4, 212, 13,
+ 44, 4, 211, 250, 44, 4, 214, 217, 44, 4, 237, 157, 44, 4, 237, 3, 44, 4,
+ 236, 239, 44, 4, 236, 26, 44, 4, 236, 1, 44, 4, 237, 67, 44, 4, 237, 48,
+ 44, 4, 237, 147, 44, 4, 236, 136, 44, 4, 236, 117, 44, 4, 237, 76, 44, 4,
+ 228, 223, 44, 4, 228, 222, 44, 4, 228, 217, 44, 4, 228, 216, 44, 4, 228,
+ 213, 44, 4, 228, 212, 44, 4, 228, 219, 44, 4, 228, 218, 44, 4, 228, 221,
+ 44, 4, 228, 215, 44, 4, 228, 214, 44, 4, 228, 220, 44, 4, 212, 205, 140,
+ 109, 2, 203, 75, 140, 109, 2, 216, 186, 140, 109, 2, 216, 102, 114, 1,
+ 207, 95, 85, 109, 2, 245, 249, 173, 85, 109, 2, 245, 249, 229, 144, 85,
+ 109, 2, 245, 249, 229, 26, 85, 109, 2, 245, 249, 229, 115, 85, 109, 2,
+ 245, 249, 222, 128, 85, 109, 2, 245, 249, 247, 92, 85, 109, 2, 245, 249,
+ 246, 199, 85, 109, 2, 245, 249, 245, 254, 85, 109, 2, 245, 249, 246, 116,
+ 85, 109, 2, 245, 249, 220, 233, 85, 109, 2, 245, 249, 244, 212, 85, 109,
+ 2, 245, 249, 207, 229, 85, 109, 2, 245, 249, 243, 113, 85, 109, 2, 245,
+ 249, 207, 224, 85, 109, 2, 245, 249, 201, 201, 85, 109, 2, 245, 249, 210,
+ 22, 85, 109, 2, 245, 249, 209, 108, 85, 109, 2, 245, 249, 135, 85, 109,
+ 2, 245, 249, 209, 47, 85, 109, 2, 245, 249, 221, 191, 85, 109, 2, 245,
+ 249, 249, 32, 85, 109, 2, 245, 249, 218, 208, 85, 109, 2, 245, 249, 218,
+ 69, 85, 109, 2, 245, 249, 218, 180, 85, 109, 2, 245, 249, 224, 82, 85,
+ 109, 2, 245, 249, 202, 247, 85, 109, 2, 245, 249, 215, 227, 85, 109, 2,
+ 245, 249, 227, 49, 85, 109, 2, 245, 249, 205, 189, 85, 109, 2, 245, 249,
+ 213, 90, 85, 109, 2, 245, 249, 211, 164, 85, 109, 2, 245, 249, 215, 36,
+ 85, 109, 2, 245, 249, 152, 85, 109, 2, 245, 249, 228, 113, 85, 22, 2,
+ 245, 249, 217, 126, 85, 231, 36, 22, 2, 245, 249, 217, 65, 85, 231, 36,
+ 22, 2, 245, 249, 215, 102, 85, 231, 36, 22, 2, 245, 249, 215, 95, 85,
+ 231, 36, 22, 2, 245, 249, 217, 106, 85, 22, 2, 220, 39, 85, 22, 2, 251,
+ 242, 172, 1, 248, 79, 222, 203, 172, 1, 248, 79, 222, 151, 172, 1, 248,
+ 79, 222, 116, 172, 1, 248, 79, 222, 190, 172, 1, 248, 79, 222, 128, 67,
+ 1, 248, 79, 222, 203, 67, 1, 248, 79, 222, 151, 67, 1, 248, 79, 222, 116,
+ 67, 1, 248, 79, 222, 190, 67, 1, 248, 79, 222, 128, 67, 1, 251, 57, 246,
+ 238, 67, 1, 251, 57, 207, 203, 67, 1, 251, 57, 135, 67, 1, 251, 57, 219,
+ 184, 65, 1, 240, 198, 240, 197, 245, 188, 143, 142, 65, 1, 240, 197, 240,
+ 198, 245, 188, 143, 142,
};
static unsigned char phrasebook_offset1[] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
- 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
- 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
- 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
- 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 104, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 105, 106, 107, 108, 109,
- 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
- 124, 125, 126, 127, 128, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 129, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 130, 131,
- 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
- 146, 147, 87, 148, 149, 150, 151, 152, 87, 87, 87, 87, 87, 87, 153, 87,
- 154, 155, 156, 87, 157, 87, 158, 87, 87, 87, 159, 87, 87, 87, 160, 161,
- 162, 163, 87, 87, 87, 87, 87, 87, 87, 87, 87, 164, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 165, 166, 167, 168,
- 169, 170, 171, 87, 172, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 173, 174, 175, 176, 177, 178,
- 179, 180, 181, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 182,
- 183, 184, 185, 186, 87, 87, 87, 87, 87, 87, 87, 87, 87, 187, 188, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 189, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 190, 191, 192, 193, 194, 87, 195,
- 87, 196, 197, 198, 199, 200, 201, 202, 203, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 204, 205, 87, 87, 206, 207, 208, 209, 210, 87, 211, 212, 213, 214,
- 215, 216, 217, 218, 219, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 220, 221,
- 222, 223, 224, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 225, 87, 226, 227,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 228, 229, 230, 231, 232, 233, 234, 235, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87,
+ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 53, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 54, 55, 56, 57, 58,
+ 59, 60, 61, 62, 63, 64, 65, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 66, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 67, 68, 69, 70, 71, 72,
+ 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 52, 87, 52, 88,
+ 89, 90, 91, 92, 93, 94, 95, 96, 52, 97, 52, 52, 52, 52, 52, 98, 99, 100,
+ 101, 102, 103, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 104, 105, 106,
+ 107, 108, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 109, 110, 111, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 112, 113, 114, 115, 52, 52, 52, 116, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 117, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 118, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 119, 120,
+ 121, 122, 123, 124, 125, 126, 127, 128, 129, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 130, 52, 52, 52, 52, 52, 131, 52, 132, 133, 134,
+ 135, 136, 137, 138, 139, 140, 141, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 142, 143, 144, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 145, 146, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 147, 148, 149,
+ 150, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
+ 52, 52, 52, 52, 52,
};
static unsigned int phrasebook_offset2[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 6, 9, 11, 14, 17, 19, 21, 24, 27, 29, 31,
- 33, 35, 39, 41, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 69, 72,
- 75, 78, 82, 86, 91, 96, 101, 105, 110, 115, 120, 124, 129, 134, 138, 142,
- 147, 151, 156, 161, 165, 170, 175, 179, 184, 189, 194, 199, 204, 207,
- 211, 214, 218, 221, 225, 229, 234, 239, 244, 248, 253, 258, 263, 267,
- 272, 277, 281, 285, 290, 294, 299, 304, 308, 313, 318, 322, 327, 332,
- 337, 342, 347, 351, 354, 358, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 359, 363, 368,
- 371, 374, 377, 380, 383, 386, 388, 391, 397, 405, 408, 412, 415, 417,
- 420, 423, 426, 429, 433, 436, 439, 443, 445, 448, 454, 462, 469, 476,
- 483, 488, 495, 501, 508, 514, 521, 529, 534, 542, 549, 555, 562, 569,
- 577, 584, 592, 600, 605, 612, 619, 625, 632, 638, 645, 648, 654, 661,
- 667, 674, 681, 688, 693, 700, 707, 713, 720, 726, 733, 741, 746, 754,
- 761, 767, 774, 781, 789, 796, 804, 812, 817, 824, 831, 837, 844, 850,
- 857, 860, 866, 873, 879, 886, 893, 900, 905, 913, 920, 927, 934, 941,
- 948, 955, 962, 969, 977, 985, 993, 1001, 1009, 1017, 1025, 1033, 1040,
- 1047, 1054, 1061, 1068, 1075, 1082, 1089, 1096, 1103, 1110, 1117, 1125,
- 1133, 1141, 1149, 1157, 1165, 1173, 1181, 1189, 1197, 1204, 1211, 1218,
- 1225, 1233, 1241, 1249, 1257, 1265, 1273, 1281, 1287, 1292, 1297, 1305,
- 1313, 1321, 1329, 1334, 1341, 1348, 1356, 1364, 1372, 1380, 1390, 1400,
- 1407, 1414, 1421, 1428, 1436, 1444, 1452, 1460, 1471, 1476, 1481, 1488,
- 1495, 1502, 1509, 1516, 1523, 1528, 1533, 1540, 1547, 1555, 1563, 1571,
- 1579, 1586, 1593, 1601, 1609, 1617, 1625, 1633, 1641, 1649, 1657, 1665,
- 1673, 1680, 1687, 1693, 1699, 1706, 1713, 1720, 1727, 1735, 1743, 1750,
- 1757, 1764, 1771, 1779, 1787, 1795, 1803, 1811, 1818, 1825, 1833, 1841,
- 1849, 1857, 1863, 1869, 1875, 1882, 1889, 1894, 1899, 1904, 1911, 1918,
- 1925, 1932, 1940, 1948, 1955, 1961, 1966, 1971, 1978, 1985, 1992, 1997,
- 2002, 2007, 2014, 2021, 2028, 2035, 2042, 2048, 2056, 2066, 2074, 2081,
- 2088, 2093, 2098, 2105, 2112, 2116, 2121, 2126, 2131, 2139, 2148, 2155,
- 2162, 2171, 2178, 2185, 2190, 2197, 2204, 2211, 2218, 2225, 2230, 2237,
- 2244, 2252, 2257, 2262, 2267, 2277, 2281, 2287, 2293, 2299, 2305, 2313,
- 2326, 2334, 2339, 2349, 2354, 2359, 2369, 2374, 2381, 2388, 2396, 2404,
- 2411, 2418, 2425, 2432, 2442, 2452, 2461, 2470, 2480, 2490, 2500, 2510,
- 2516, 2526, 2536, 2546, 2556, 2564, 2572, 2579, 2586, 2594, 2602, 2610,
- 2618, 2625, 2632, 2642, 2652, 2660, 2668, 2676, 2681, 2691, 2696, 2703,
- 2710, 2715, 2720, 2728, 2736, 2746, 2756, 2763, 2770, 2779, 2788, 2796,
- 2804, 2813, 2822, 2830, 2838, 2847, 2856, 2865, 2874, 2884, 2894, 2902,
- 2910, 2919, 2928, 2937, 2946, 2956, 2966, 2974, 2982, 2991, 3000, 3009,
- 3018, 3027, 3036, 3041, 3046, 3054, 3062, 3072, 3080, 3085, 3090, 3097,
- 3104, 3111, 3118, 3125, 3132, 3142, 3152, 3162, 3172, 3179, 3186, 3196,
- 3206, 3214, 3222, 3230, 3238, 3246, 3253, 3260, 3267, 3273, 3280, 3287,
- 3294, 3303, 3313, 3323, 3330, 3337, 3343, 3348, 3355, 3361, 3367, 3374,
- 3381, 3392, 3402, 3409, 3416, 3423, 3430, 3436, 3441, 3448, 3454, 3459,
- 3467, 3475, 3482, 3488, 3493, 3500, 3505, 3512, 3521, 3530, 3539, 3546,
- 3552, 3558, 3563, 3570, 3577, 3584, 3591, 3598, 3603, 3608, 3617, 3625,
- 3634, 3639, 3645, 3656, 3663, 3671, 3680, 3686, 3692, 3698, 3705, 3710,
- 3716, 3727, 3736, 3745, 3753, 3761, 3771, 3776, 3783, 3790, 3795, 3807,
- 3816, 3824, 3831, 3840, 3845, 3850, 3857, 3864, 3871, 3878, 3884, 3893,
- 3901, 3906, 3914, 3920, 3928, 3936, 3942, 3948, 3954, 3961, 3969, 3975,
- 3983, 3990, 3995, 4002, 4010, 4020, 4027, 4034, 4044, 4051, 4058, 4068,
- 4075, 4082, 4089, 4095, 4101, 4111, 4124, 4129, 4136, 4141, 4145, 4151,
- 4160, 4167, 4172, 4177, 4181, 4186, 4192, 4196, 4202, 4208, 4214, 4220,
- 4228, 4233, 4238, 4243, 4248, 4254, 4256, 4261, 4265, 4271, 4277, 4283,
- 4288, 4295, 4302, 4308, 4315, 4323, 4331, 4336, 4341, 4345, 4350, 4352,
- 4354, 4357, 4359, 4361, 4366, 4371, 4377, 4382, 4386, 4391, 4396, 4405,
- 4411, 4416, 4422, 4427, 4433, 4441, 4449, 4453, 4457, 4462, 4468, 4474,
- 4480, 4486, 4491, 4499, 4508, 4517, 4521, 4527, 4534, 4541, 4548, 4555,
- 4559, 4564, 4569, 4574, 4579, 4584, 4586, 4589, 4592, 4595, 4598, 4601,
- 4605, 4609, 4615, 4618, 4623, 4629, 4635, 4638, 4643, 4649, 4653, 4659,
- 4665, 4671, 4677, 4682, 4687, 4692, 4695, 4701, 4706, 4711, 4715, 4720,
- 4726, 4732, 4735, 4739, 4743, 4747, 4750, 4753, 4758, 4762, 4769, 4773,
- 4779, 4783, 4789, 4793, 4797, 4801, 4806, 4811, 4818, 4824, 4831, 4837,
- 4843, 4849, 4852, 4856, 4860, 4863, 4867, 4872, 4877, 4881, 4885, 4891,
- 4895, 4899, 4904, 4910, 4915, 4921, 4925, 4932, 4937, 4942, 4947, 4952,
- 4958, 4961, 4965, 4970, 4975, 4984, 4990, 4995, 4999, 5004, 5008, 5013,
- 5017, 5021, 5026, 5029, 5035, 5040, 5045, 5050, 5055, 5060, 5065, 5071,
- 5077, 5083, 5088, 5093, 5099, 5105, 5111, 5116, 5121, 5128, 5135, 5139,
- 5145, 5152, 0, 0, 5159, 5162, 5171, 5180, 5191, 0, 0, 0, 0, 0, 5195,
- 5198, 5203, 5211, 5216, 5224, 5232, 0, 5240, 0, 5248, 5256, 5264, 5275,
- 5280, 5285, 5290, 5295, 5300, 5305, 5310, 5315, 5320, 5325, 5330, 5335,
- 5340, 5345, 5350, 5355, 0, 5360, 5365, 5370, 5375, 5380, 5385, 5390,
- 5395, 5403, 5411, 5419, 5427, 5435, 5443, 5454, 5459, 5464, 5469, 5474,
- 5479, 5484, 5489, 5494, 5499, 5504, 5509, 5514, 5519, 5524, 5529, 5534,
- 5539, 5545, 5550, 5555, 5560, 5565, 5570, 5575, 5580, 5588, 5596, 5604,
- 5612, 5620, 5625, 5629, 5633, 5640, 5650, 5660, 5664, 5668, 5672, 5678,
- 5685, 5689, 5694, 5698, 5703, 5707, 5712, 5716, 5721, 5726, 5731, 5736,
- 5741, 5746, 5751, 5756, 5761, 5766, 5771, 5776, 5781, 5786, 5791, 5795,
- 5799, 5805, 5809, 5814, 5820, 5828, 5833, 5838, 5845, 5850, 5855, 5862,
- 5871, 5880, 5891, 5899, 5904, 5909, 5914, 5921, 5926, 5932, 5937, 5942,
- 5947, 5952, 5957, 5962, 5970, 5976, 5981, 5985, 5990, 5995, 6000, 6005,
- 6010, 6015, 6020, 6024, 6030, 6034, 6039, 6044, 6049, 6053, 6058, 6063,
- 6068, 6073, 6077, 6082, 6086, 6091, 6096, 6101, 6106, 6112, 6117, 6123,
- 6127, 6132, 6136, 6140, 6145, 6150, 6155, 6160, 6165, 6170, 6175, 6179,
- 6185, 6189, 6194, 6199, 6204, 6208, 6213, 6218, 6223, 6228, 6232, 6237,
- 6241, 6246, 6251, 6256, 6261, 6267, 6272, 6278, 6282, 6287, 6291, 6299,
- 6304, 6309, 6314, 6321, 6326, 6332, 6337, 6342, 6347, 6352, 6357, 6362,
- 6370, 6376, 6381, 6386, 6391, 6396, 6401, 6407, 6413, 6420, 6427, 6436,
- 6445, 6452, 6459, 6468, 6477, 6482, 6487, 6492, 6497, 6502, 6507, 6512,
- 6517, 6528, 6539, 6544, 6549, 6556, 6563, 6571, 6579, 6584, 6589, 6594,
- 6599, 6603, 6607, 6611, 6617, 6623, 6627, 6634, 6639, 6649, 6659, 6665,
- 6671, 6679, 6687, 6695, 6703, 6710, 6717, 6726, 6735, 6743, 6751, 6759,
- 6767, 6775, 6783, 6791, 6799, 6806, 6813, 6819, 6825, 6833, 6841, 6848,
- 6855, 6864, 6873, 6879, 6885, 6893, 6901, 6909, 6917, 6923, 6929, 6937,
- 6945, 6953, 6961, 6968, 6975, 6983, 6991, 6999, 7007, 7012, 7017, 7024,
- 7031, 7041, 7051, 7055, 7063, 7071, 7078, 7085, 7093, 7101, 7108, 7115,
- 7123, 7131, 7138, 7145, 7153, 7161, 7166, 7173, 7180, 7187, 7194, 7200,
- 7206, 7214, 7222, 7227, 7232, 7240, 7248, 7256, 7264, 7272, 7280, 7287,
- 7294, 7302, 7310, 7318, 7326, 7333, 7340, 7346, 7352, 7361, 7370, 7377,
- 7384, 7391, 7398, 7405, 7412, 7419, 7426, 7434, 7442, 7450, 7458, 7466,
- 7474, 7484, 7494, 7501, 7508, 7515, 7522, 7529, 7536, 7543, 7550, 7557,
- 7564, 7571, 7578, 7585, 7592, 7599, 7606, 7613, 7620, 7627, 7634, 7641,
- 7648, 7655, 7662, 7667, 7672, 7677, 7682, 7687, 7692, 7697, 7702, 7707,
- 7712, 7718, 7724, 7733, 7742, 7751, 7760, 7768, 7776, 7784, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 7792, 7797, 7802, 7807, 7812, 7817, 7822, 7827, 7832,
- 7836, 7841, 7846, 7851, 7856, 7861, 7866, 7871, 7876, 7881, 7886, 7891,
- 7896, 7901, 7906, 7911, 7916, 7921, 7926, 7930, 7935, 7940, 7945, 7950,
- 7955, 7960, 7965, 7970, 7975, 0, 0, 7980, 7987, 7990, 7994, 7998, 8001,
- 8005, 0, 8009, 8014, 8019, 8024, 8029, 8034, 8039, 8044, 8049, 8053,
- 8058, 8063, 8068, 8073, 8078, 8083, 8088, 8093, 8098, 8103, 8108, 8113,
- 8118, 8123, 8128, 8133, 8138, 8143, 8147, 8152, 8157, 8162, 8167, 8172,
- 8177, 8182, 8187, 8192, 8197, 0, 8204, 8209, 0, 0, 0, 0, 8212, 0, 8216,
- 8221, 8226, 8231, 8238, 8245, 8250, 8255, 8260, 8265, 8270, 8275, 8280,
- 8287, 8292, 8299, 8306, 8311, 8318, 8323, 8328, 8333, 8340, 8345, 8350,
- 8357, 8366, 8371, 8376, 8381, 8386, 8392, 8397, 8404, 8411, 8418, 8423,
- 8428, 8433, 8438, 8443, 8448, 8458, 8463, 8471, 8476, 8481, 8486, 8491,
- 8498, 8505, 8512, 8518, 8524, 8531, 0, 0, 0, 0, 0, 0, 0, 0, 8538, 8542,
- 8546, 8550, 8554, 8558, 8562, 8566, 8570, 8574, 8578, 8583, 8587, 8591,
- 8596, 8600, 8605, 8609, 8613, 8617, 8622, 8626, 8631, 8635, 8639, 8643,
- 8647, 0, 0, 0, 0, 0, 8651, 8658, 8666, 8673, 8678, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 8683, 8686, 8690, 8695, 8699, 0, 8703, 8709, 8715, 8718,
- 8725, 8734, 8737, 8740, 8745, 8751, 8755, 8763, 8769, 8775, 8783, 8787,
- 8792, 8803, 8808, 8812, 8816, 8820, 8823, 0, 8826, 8833, 8837, 8843,
- 8847, 8854, 8860, 8867, 8873, 8879, 8883, 8887, 8893, 8897, 8901, 8905,
- 8909, 8913, 8917, 8921, 8925, 8929, 8933, 8937, 8941, 8945, 8949, 8953,
- 8957, 8961, 8969, 8977, 8987, 8996, 9005, 9008, 9012, 9016, 9020, 9024,
- 9028, 9032, 9036, 9040, 9045, 9049, 9052, 9055, 9058, 9061, 9064, 9067,
- 9070, 9073, 9077, 9080, 9083, 9088, 9093, 9099, 9102, 9109, 9118, 9123,
- 9128, 9135, 9140, 9145, 9149, 9153, 9157, 9161, 9165, 9169, 9173, 9177,
- 9181, 9185, 9190, 9195, 9202, 9208, 9214, 9220, 9225, 9233, 9241, 9246,
- 9252, 9258, 9264, 9270, 9274, 9278, 9282, 9289, 9299, 9303, 9307, 9311,
- 9317, 9325, 9329, 9333, 9340, 9344, 9348, 9352, 9359, 9366, 9378, 9382,
- 9386, 9390, 9400, 9409, 9413, 9421, 9428, 9435, 9444, 9455, 9463, 9467,
- 9476, 9487, 9495, 9508, 9516, 9524, 9532, 9540, 9546, 9555, 9562, 9566,
- 9574, 9578, 9585, 9593, 9597, 9603, 9610, 9617, 9621, 9629, 9633, 9640,
- 9644, 9652, 9656, 9664, 9672, 9679, 9687, 9695, 9702, 9708, 9712, 9719,
- 9727, 9733, 9740, 9747, 9753, 9762, 9770, 9777, 9783, 9787, 9790, 9794,
- 9800, 9808, 9812, 9818, 9824, 9831, 9838, 9841, 9848, 9853, 9861, 9866,
- 9870, 9883, 9896, 9902, 9909, 9914, 9920, 9925, 9931, 9941, 9948, 9957,
- 9967, 9973, 9978, 9983, 9987, 9991, 9996, 10001, 10007, 10015, 10023,
- 10034, 10039, 10048, 10057, 10064, 10070, 10076, 10082, 10088, 10094,
- 10100, 10106, 10112, 10118, 10125, 10132, 10139, 10145, 10153, 10162,
- 10168, 10175, 10182, 10187, 10192, 10196, 10203, 10210, 10219, 10228,
- 10231, 10236, 10241, 0, 10246, 10250, 10254, 10260, 10264, 10268, 10274,
- 10278, 10286, 10290, 10294, 10298, 10302, 10306, 10312, 10316, 10322,
- 10326, 10330, 10334, 10338, 10342, 10347, 10350, 10354, 10360, 10364,
- 10368, 10372, 10376, 10380, 10386, 10392, 10398, 10402, 10406, 10411,
- 10415, 10419, 10424, 10428, 10432, 10439, 10446, 10450, 10454, 10459,
- 10463, 10467, 10470, 10475, 10478, 10481, 10486, 10491, 10495, 10499,
- 10505, 10511, 10514, 0, 0, 10517, 10523, 10529, 10535, 10545, 10557,
- 10569, 10586, 10598, 10609, 10617, 10624, 10635, 10650, 10661, 10667,
- 10676, 10684, 10696, 10706, 10714, 10726, 10733, 10741, 10753, 10759,
- 10765, 10773, 10781, 10789, 10795, 10805, 10812, 10822, 10832, 10845,
- 10859, 10873, 10883, 10894, 10905, 10918, 10931, 10945, 10957, 10969,
- 10982, 10995, 11007, 11020, 11029, 11037, 11042, 11047, 11052, 11057,
- 11062, 11067, 11072, 11077, 11082, 11087, 11092, 11097, 11102, 11107,
- 11112, 11117, 11122, 11127, 11132, 11137, 11142, 11147, 11152, 11157,
- 11162, 11167, 11172, 11177, 11182, 11187, 11192, 11197, 11201, 11206,
- 11211, 11216, 11221, 11226, 11230, 11234, 11238, 11242, 11246, 11250,
- 11254, 11258, 11262, 11266, 11270, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 11275, 11280, 11284, 11288, 11292, 11296, 11300, 11304, 11308, 11312,
- 11316, 11320, 11325, 11329, 11333, 11337, 11342, 11346, 11351, 11356,
- 11361, 11365, 11370, 11375, 11380, 11385, 11389, 11394, 11398, 11403,
- 11408, 11412, 11417, 11424, 11428, 11433, 11437, 11441, 11446, 11450,
- 11457, 11464, 11471, 11477, 11485, 11493, 11502, 11510, 11517, 11524,
- 11532, 11538, 11544, 11550, 11556, 11563, 11568, 11572, 11577, 0, 0, 0,
- 0, 0, 11581, 11586, 11591, 11596, 11601, 11606, 11611, 11616, 11621,
- 11626, 11631, 11636, 11641, 11646, 11651, 11656, 11661, 11666, 11671,
- 11676, 11681, 11686, 11691, 11696, 11701, 11706, 11711, 11719, 11726,
- 11732, 11737, 11745, 11752, 11758, 11765, 11771, 11776, 11783, 11790,
- 11796, 11801, 11806, 11812, 11817, 11822, 11828, 0, 0, 11833, 11839,
- 11845, 11851, 11857, 11863, 11869, 11874, 11882, 11888, 11894, 11900,
- 11906, 11912, 11920, 0, 11926, 11931, 11936, 11941, 11946, 11951, 11956,
- 11961, 11966, 11971, 11976, 11981, 11986, 11991, 11996, 12001, 12006,
- 12011, 12016, 12021, 12026, 12031, 12036, 12041, 12046, 12051, 12056,
- 12061, 0, 0, 12066, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 33, 35, 39, 41, 44, 46, 48, 50, 52, 54, 56, 59, 61, 64, 66, 68, 71, 74,
+ 77, 80, 84, 88, 93, 98, 103, 107, 112, 117, 122, 126, 131, 136, 140, 145,
+ 150, 154, 159, 164, 168, 172, 177, 181, 186, 191, 196, 201, 206, 209,
+ 213, 216, 220, 223, 227, 231, 236, 241, 246, 250, 255, 260, 265, 269,
+ 274, 279, 283, 288, 293, 297, 302, 307, 311, 315, 320, 324, 329, 334,
+ 339, 344, 349, 353, 356, 360, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 366, 371,
+ 374, 377, 380, 383, 386, 389, 391, 394, 400, 408, 411, 415, 418, 420,
+ 423, 426, 429, 432, 436, 439, 442, 445, 447, 450, 456, 464, 471, 478,
+ 485, 490, 497, 503, 510, 517, 524, 532, 537, 545, 552, 558, 565, 572,
+ 580, 587, 595, 603, 608, 616, 623, 629, 636, 643, 650, 653, 659, 666,
+ 672, 679, 686, 693, 698, 704, 711, 717, 724, 731, 738, 746, 751, 759,
+ 766, 772, 779, 786, 794, 801, 809, 817, 822, 830, 837, 843, 850, 857,
+ 864, 867, 873, 880, 886, 893, 900, 907, 912, 920, 927, 934, 941, 948,
+ 955, 962, 969, 976, 984, 992, 1000, 1008, 1016, 1024, 1032, 1040, 1047,
+ 1054, 1061, 1068, 1075, 1082, 1089, 1096, 1103, 1110, 1117, 1124, 1132,
+ 1140, 1148, 1156, 1164, 1172, 1180, 1188, 1196, 1204, 1211, 1218, 1226,
+ 1234, 1242, 1250, 1258, 1266, 1274, 1282, 1290, 1296, 1301, 1306, 1314,
+ 1322, 1330, 1338, 1343, 1350, 1357, 1365, 1373, 1381, 1389, 1398, 1407,
+ 1414, 1421, 1428, 1435, 1443, 1451, 1459, 1467, 1478, 1483, 1488, 1495,
+ 1502, 1509, 1516, 1523, 1530, 1535, 1540, 1547, 1554, 1562, 1570, 1578,
+ 1586, 1593, 1600, 1608, 1616, 1624, 1632, 1640, 1648, 1656, 1664, 1672,
+ 1680, 1687, 1694, 1701, 1708, 1715, 1722, 1729, 1736, 1744, 1752, 1759,
+ 1766, 1773, 1780, 1788, 1796, 1804, 1812, 1820, 1827, 1834, 1842, 1850,
+ 1858, 1866, 1871, 1877, 1883, 1890, 1897, 1902, 1907, 1912, 1919, 1926,
+ 1933, 1940, 1948, 1956, 1963, 1969, 1974, 1979, 1986, 1993, 2000, 2005,
+ 2010, 2015, 2022, 2029, 2036, 2043, 2050, 2057, 2065, 2075, 2083, 2090,
+ 2097, 2102, 2107, 2114, 2121, 2125, 2130, 2135, 2140, 2148, 2157, 2164,
+ 2171, 2180, 2187, 2194, 2199, 2206, 2213, 2220, 2227, 2234, 2239, 2246,
+ 2253, 2261, 2266, 2271, 2276, 2286, 2290, 2296, 2302, 2308, 2314, 2322,
+ 2335, 2343, 2348, 2358, 2363, 2368, 2378, 2383, 2390, 2397, 2405, 2413,
+ 2420, 2427, 2434, 2441, 2451, 2461, 2470, 2479, 2489, 2499, 2509, 2519,
+ 2525, 2535, 2545, 2555, 2565, 2573, 2581, 2588, 2595, 2603, 2611, 2619,
+ 2627, 2634, 2641, 2651, 2661, 2669, 2677, 2685, 2690, 2700, 2705, 2712,
+ 2719, 2724, 2729, 2737, 2745, 2755, 2765, 2772, 2779, 2788, 2797, 2805,
+ 2813, 2822, 2831, 2839, 2847, 2856, 2865, 2874, 2883, 2893, 2903, 2911,
+ 2919, 2928, 2937, 2946, 2955, 2965, 2975, 2983, 2991, 3000, 3009, 3018,
+ 3027, 3036, 3045, 3050, 3055, 3063, 3071, 3081, 3089, 3094, 3099, 3106,
+ 3113, 3120, 3127, 3134, 3141, 3151, 3161, 3171, 3181, 3188, 3195, 3205,
+ 3215, 3223, 3231, 3239, 3247, 3255, 3262, 3269, 3276, 3282, 3289, 3296,
+ 3303, 3312, 3322, 3332, 3339, 3346, 3352, 3357, 3364, 3370, 3376, 3383,
+ 3390, 3401, 3411, 3418, 3425, 3432, 3439, 3445, 3450, 3457, 3463, 3468,
+ 3476, 3484, 3491, 3497, 3502, 3509, 3514, 3521, 3530, 3539, 3548, 3555,
+ 3561, 3567, 3572, 3579, 3586, 3593, 3600, 3607, 3612, 3617, 3626, 3634,
+ 3643, 3648, 3655, 3666, 3673, 3681, 3690, 3696, 3702, 3708, 3715, 3720,
+ 3726, 3737, 3746, 3755, 3763, 3771, 3781, 3786, 3793, 3800, 3805, 3817,
+ 3826, 3834, 3841, 3850, 3855, 3860, 3867, 3874, 3881, 3888, 3894, 3903,
+ 3911, 3916, 3924, 3930, 3938, 3946, 3952, 3958, 3964, 3971, 3979, 3985,
+ 3993, 4000, 4005, 4012, 4020, 4030, 4037, 4044, 4054, 4061, 4068, 4078,
+ 4085, 4092, 4099, 4105, 4111, 4121, 4134, 4139, 4146, 4151, 4155, 4161,
+ 4170, 4177, 4182, 4187, 4191, 4196, 4202, 4206, 4212, 4218, 4224, 4230,
+ 4238, 4243, 4248, 4253, 4258, 4264, 4266, 4271, 4275, 4281, 4287, 4293,
+ 4298, 4305, 4312, 4318, 4325, 4333, 4341, 4346, 4351, 4355, 4360, 4362,
+ 4364, 4367, 4369, 4372, 4377, 4382, 4388, 4393, 4397, 4401, 4406, 4415,
+ 4421, 4426, 4432, 4437, 4443, 4451, 4459, 4463, 4467, 4472, 4478, 4484,
+ 4490, 4496, 4501, 4508, 4516, 4524, 4529, 4535, 4542, 4549, 4556, 4563,
+ 4567, 4572, 4577, 4582, 4587, 4592, 4595, 4598, 4601, 4604, 4607, 4610,
+ 4614, 4618, 4624, 4627, 4632, 4638, 4644, 4647, 4652, 4658, 4662, 4668,
+ 4674, 4680, 4686, 4691, 4696, 4701, 4704, 4710, 4715, 4720, 4724, 4729,
+ 4735, 4741, 4744, 4748, 4752, 4756, 4759, 4762, 4767, 4771, 4778, 4782,
+ 4788, 4792, 4798, 4802, 4806, 4810, 4815, 4820, 4827, 4833, 4840, 4846,
+ 4852, 4858, 4861, 4865, 4869, 4873, 4877, 4882, 4887, 4891, 4895, 4901,
+ 4905, 4909, 4914, 4920, 4925, 4931, 4935, 4942, 4947, 4951, 4956, 4961,
+ 4967, 4970, 4974, 4979, 4984, 4993, 4999, 5004, 5008, 5013, 5017, 5022,
+ 5026, 5030, 5035, 5039, 5045, 5050, 5055, 5060, 5065, 5070, 5075, 5081,
+ 5087, 5093, 5099, 5104, 5110, 5116, 5122, 5127, 5132, 5139, 5146, 5150,
+ 5156, 5163, 0, 0, 5170, 5173, 5182, 5191, 5202, 5206, 0, 0, 0, 0, 5211,
+ 5214, 5219, 5227, 5232, 5240, 5248, 0, 5256, 0, 5264, 5272, 5280, 5291,
+ 5296, 5301, 5306, 5311, 5316, 5321, 5326, 5331, 5336, 5341, 5346, 5351,
+ 5356, 5361, 5366, 5371, 0, 5376, 5381, 5386, 5391, 5396, 5401, 5406,
+ 5411, 5419, 5427, 5435, 5443, 5451, 5459, 5470, 5475, 5480, 5485, 5490,
+ 5495, 5500, 5505, 5510, 5515, 5520, 5525, 5530, 5535, 5540, 5545, 5550,
+ 5555, 5561, 5566, 5571, 5576, 5581, 5586, 5591, 5596, 5604, 5612, 5620,
+ 5628, 5636, 5641, 5645, 5649, 5656, 5666, 5676, 5680, 5684, 5688, 5694,
+ 5701, 5705, 5710, 5714, 5719, 5723, 5728, 5732, 5737, 5742, 5747, 5752,
+ 5757, 5762, 5767, 5772, 5777, 5782, 5787, 5792, 5797, 5802, 5807, 5811,
+ 5815, 5821, 5825, 5830, 5836, 5844, 5849, 5854, 5861, 5866, 5871, 5878,
+ 5887, 5896, 5907, 5915, 5920, 5925, 5930, 5937, 5942, 5948, 5953, 5958,
+ 5963, 5968, 5973, 5978, 5986, 5992, 5997, 6001, 6006, 6011, 6016, 6021,
+ 6026, 6031, 6036, 6040, 6046, 6050, 6055, 6060, 6065, 6069, 6074, 6079,
+ 6084, 6089, 6093, 6098, 6102, 6107, 6112, 6117, 6122, 6128, 6133, 6139,
+ 6143, 6148, 6152, 6156, 6161, 6166, 6171, 6176, 6181, 6186, 6191, 6195,
+ 6201, 6205, 6210, 6215, 6220, 6224, 6229, 6234, 6239, 6244, 6248, 6253,
+ 6257, 6262, 6267, 6272, 6277, 6283, 6288, 6294, 6298, 6303, 6307, 6315,
+ 6320, 6325, 6330, 6337, 6342, 6348, 6353, 6358, 6363, 6368, 6373, 6378,
+ 6386, 6392, 6397, 6402, 6407, 6412, 6417, 6423, 6429, 6436, 6443, 6452,
+ 6461, 6468, 6475, 6484, 6493, 6498, 6503, 6508, 6513, 6518, 6523, 6528,
+ 6533, 6544, 6555, 6560, 6565, 6572, 6579, 6587, 6595, 6600, 6605, 6610,
+ 6615, 6619, 6623, 6627, 6633, 6639, 6643, 6650, 6655, 6665, 6675, 6681,
+ 6687, 6695, 6703, 6711, 6719, 6726, 6733, 6741, 6749, 6757, 6765, 6773,
+ 6781, 6789, 6797, 6805, 6813, 6820, 6827, 6833, 6839, 6847, 6855, 6862,
+ 6869, 6877, 6885, 6891, 6897, 6905, 6913, 6921, 6929, 6935, 6941, 6949,
+ 6957, 6965, 6973, 6980, 6987, 6995, 7003, 7011, 7019, 7024, 7029, 7036,
+ 7043, 7053, 7063, 7067, 7075, 7083, 7090, 7097, 7105, 7113, 7120, 7127,
+ 7135, 7143, 7150, 7157, 7165, 7173, 7178, 7185, 7192, 7199, 7206, 7212,
+ 7218, 7226, 7234, 7239, 7244, 7252, 7260, 7268, 7276, 7284, 7292, 7299,
+ 7306, 7314, 7322, 7330, 7338, 7345, 7352, 7358, 7364, 7373, 7382, 7389,
+ 7396, 7403, 7410, 7417, 7424, 7431, 7438, 7446, 7454, 7462, 7470, 7478,
+ 7486, 7496, 7506, 7513, 7520, 7527, 7534, 7541, 7548, 7555, 7562, 7569,
+ 7576, 7583, 7590, 7597, 7604, 7611, 7618, 7625, 7632, 7639, 7646, 7653,
+ 7660, 7667, 7674, 7679, 7684, 7689, 7694, 7699, 7704, 7709, 7714, 7719,
+ 7724, 7730, 7736, 7744, 7752, 7760, 7768, 7776, 7784, 7792, 7800, 7808,
+ 7816, 7821, 7826, 7831, 7836, 7844, 0, 7852, 7857, 7862, 7867, 7872,
+ 7877, 7882, 7887, 7892, 7896, 7901, 7906, 7911, 7916, 7921, 7926, 7931,
+ 7936, 7941, 7946, 7951, 7956, 7961, 7966, 7971, 7976, 7981, 7986, 7991,
+ 7996, 8001, 8006, 8011, 8016, 8021, 8026, 8031, 8036, 0, 0, 8041, 8048,
+ 8051, 8055, 8059, 8062, 8066, 0, 8070, 8075, 8080, 8085, 8090, 8095,
+ 8100, 8105, 8110, 8114, 8119, 8124, 8129, 8134, 8139, 8144, 8149, 8154,
+ 8159, 8164, 8169, 8174, 8179, 8184, 8189, 8194, 8199, 8204, 8209, 8214,
+ 8219, 8224, 8229, 8234, 8239, 8244, 8249, 8254, 8259, 0, 8266, 8271, 0,
+ 0, 8274, 8280, 8286, 0, 8290, 8295, 8300, 8305, 8312, 8319, 8324, 8329,
+ 8334, 8339, 8344, 8349, 8354, 8361, 8366, 8373, 8380, 8385, 8392, 8397,
+ 8402, 8407, 8414, 8419, 8424, 8431, 8440, 8445, 8450, 8455, 8460, 8466,
+ 8471, 8478, 8485, 8492, 8497, 8502, 8507, 8512, 8517, 8522, 8532, 8537,
+ 8546, 8551, 8556, 8561, 8566, 8573, 8580, 8587, 8593, 8599, 8606, 0, 0,
+ 0, 0, 0, 0, 0, 0, 8613, 8617, 8621, 8625, 8629, 8633, 8637, 8641, 8645,
+ 8649, 8653, 8658, 8662, 8666, 8671, 8675, 8680, 8684, 8688, 8692, 8697,
+ 8701, 8706, 8710, 8714, 8718, 8722, 0, 0, 0, 0, 0, 8726, 8733, 8741,
+ 8748, 8753, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8758, 8761, 8765, 8770,
+ 8774, 8778, 8782, 8788, 8794, 8797, 8804, 8813, 8816, 8819, 8824, 8830,
+ 8834, 8842, 8848, 8854, 8862, 8866, 8871, 8882, 8887, 8891, 8895, 8899,
+ 8902, 0, 8905, 8912, 8916, 8922, 8926, 8933, 8940, 8948, 8955, 8962,
+ 8966, 8970, 8976, 8980, 8984, 8988, 8992, 8996, 9000, 9004, 9008, 9012,
+ 9016, 9020, 9024, 9028, 9032, 9036, 9040, 9044, 9052, 9060, 9070, 9079,
+ 9088, 9091, 9095, 9099, 9103, 9107, 9111, 9115, 9119, 9123, 9128, 9132,
+ 9135, 9138, 9141, 9144, 9147, 9150, 9153, 9156, 9160, 9164, 9168, 9173,
+ 9178, 9184, 9187, 9194, 9203, 9208, 9213, 9220, 9226, 9231, 9235, 9239,
+ 9243, 9247, 9251, 9255, 9260, 9264, 9269, 9273, 9278, 9283, 9290, 9296,
+ 9302, 9308, 9313, 9322, 9331, 9336, 9343, 9350, 9357, 9364, 9368, 9372,
+ 9376, 9383, 9393, 9397, 9401, 9405, 9412, 9420, 9424, 9428, 9435, 9439,
+ 9443, 9447, 9454, 9461, 9473, 9477, 9481, 9485, 9495, 9504, 9508, 9516,
+ 9523, 9530, 9539, 9550, 9558, 9562, 9571, 9582, 9590, 9603, 9611, 9619,
+ 9627, 9635, 9641, 9650, 9657, 9661, 9669, 9673, 9680, 9688, 9692, 9698,
+ 9705, 9712, 9716, 9724, 9728, 9735, 9739, 9747, 9751, 9759, 9767, 9774,
+ 9782, 9790, 9797, 9803, 9807, 9814, 9822, 9828, 9835, 9842, 9848, 9858,
+ 9866, 9873, 9879, 9883, 9886, 9890, 9896, 9904, 9908, 9914, 9920, 9927,
+ 9934, 9937, 9944, 9949, 9958, 9963, 9967, 9980, 9993, 9999, 10006, 10011,
+ 10017, 10022, 10028, 10038, 10045, 10054, 10064, 10070, 10075, 10080,
+ 10084, 10088, 10093, 10098, 10104, 10112, 10120, 10131, 10136, 10145,
+ 10154, 10161, 10167, 10173, 10179, 10185, 10191, 10197, 10204, 10210,
+ 10217, 10224, 10231, 10238, 10244, 10252, 10261, 10268, 10276, 10284,
+ 10290, 10296, 10302, 10310, 10318, 10328, 10338, 10342, 10348, 10354, 0,
+ 10360, 10365, 10370, 10377, 10382, 10387, 10394, 10399, 10408, 10413,
+ 10418, 10423, 10428, 10433, 10440, 10445, 10452, 10457, 10462, 10467,
+ 10472, 10477, 10483, 10487, 10492, 10499, 10504, 10509, 10514, 10519,
+ 10524, 10531, 10538, 10545, 10550, 10555, 10561, 10566, 10571, 10577,
+ 10582, 10587, 10595, 10603, 10608, 10613, 10619, 10624, 10629, 10633,
+ 10639, 10643, 10647, 10653, 10659, 10664, 10669, 10676, 10683, 10687, 0,
+ 0, 10691, 10698, 10705, 10712, 10722, 10734, 10745, 10761, 10773, 10784,
+ 10792, 10799, 10809, 10824, 10835, 10841, 10850, 10858, 10869, 10879,
+ 10887, 10898, 10905, 10913, 10924, 10930, 10936, 10944, 10952, 10960,
+ 10966, 10976, 10984, 10994, 11004, 11017, 11031, 11045, 11055, 11066,
+ 11077, 11090, 11103, 11117, 11129, 11141, 11154, 11167, 11179, 11192,
+ 11201, 11209, 11214, 11219, 11224, 11229, 11234, 11239, 11244, 11249,
+ 11254, 11259, 11264, 11269, 11274, 11279, 11284, 11289, 11294, 11299,
+ 11304, 11309, 11314, 11319, 11324, 11329, 11334, 11339, 11344, 11349,
+ 11354, 11359, 11364, 11369, 11373, 11378, 11383, 11388, 11393, 11398,
+ 11402, 11406, 11410, 11414, 11418, 11422, 11426, 11430, 11434, 11438,
+ 11442, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11447, 11452, 11456,
+ 11460, 11464, 11468, 11472, 11476, 11481, 11485, 11490, 11494, 11499,
+ 11503, 11507, 11511, 11516, 11520, 11525, 11530, 11535, 11539, 11544,
+ 11549, 11554, 11559, 11564, 11569, 11574, 11579, 11584, 11588, 11593,
+ 11600, 11604, 11609, 11614, 11618, 11623, 11627, 11634, 11641, 11648,
+ 11655, 11663, 11671, 11680, 11688, 11695, 11702, 11710, 11716, 11722,
+ 11728, 11734, 11741, 11746, 11750, 11755, 0, 0, 0, 0, 0, 11759, 11764,
+ 11769, 11774, 11779, 11784, 11789, 11794, 11799, 11804, 11809, 11814,
+ 11819, 11824, 11829, 11834, 11839, 11844, 11849, 11854, 11859, 11864,
+ 11869, 11874, 11879, 11884, 11889, 11897, 11904, 11910, 11915, 11923,
+ 11930, 11936, 11943, 11949, 11954, 11961, 11968, 11974, 11979, 11984,
+ 11990, 11995, 12000, 12006, 0, 0, 12011, 12017, 12023, 12029, 12035,
+ 12041, 12047, 12052, 12060, 12066, 12072, 12078, 12084, 12090, 12098, 0,
+ 12104, 12109, 12114, 12119, 12124, 12129, 12134, 12139, 12144, 12149,
+ 12154, 12159, 12164, 12169, 12174, 12179, 12184, 12189, 12194, 12199,
+ 12204, 12209, 12214, 12219, 12224, 12229, 12234, 12239, 0, 0, 12244, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12248, 12257, 12265,
+ 12272, 12280, 12292, 12299, 12306, 12313, 12325, 12336, 12343, 12351,
+ 12357, 12362, 12370, 12378, 12386, 12392, 12402, 12410, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12417, 12423, 12428,
+ 12433, 12438, 12443, 12448, 12453, 12458, 12463, 12468, 12473, 12478,
+ 12483, 12487, 12491, 12495, 12500, 12506, 12512, 12518, 12523, 12528,
+ 12533, 12538, 12544, 12553, 12561, 12567, 12575, 12581, 12585, 12589,
+ 12593, 12598, 12601, 12605, 12608, 12612, 12615, 12619, 12623, 12627,
+ 12632, 12637, 12640, 12644, 12649, 12654, 12657, 12661, 12664, 12668,
+ 12672, 12676, 12680, 12684, 12688, 12692, 12696, 12700, 12704, 12708,
+ 12712, 12716, 12720, 12724, 12728, 12732, 12736, 12740, 12744, 12747,
+ 12751, 12755, 12759, 12762, 12765, 12769, 12773, 12777, 12781, 12785,
+ 12789, 12793, 12797, 12801, 12804, 12809, 12814, 12818, 12822, 12827,
+ 12831, 12836, 12840, 12845, 12850, 12856, 12862, 12868, 12872, 12877,
+ 12883, 12889, 12893, 12898, 12902, 12908, 12913, 12916, 12922, 12928,
+ 12933, 12938, 12945, 12950, 12955, 12959, 12963, 12967, 12971, 12975,
+ 12979, 12983, 12987, 12992, 12997, 13002, 13008, 13011, 13015, 13019,
+ 13022, 13025, 13028, 13031, 13034, 13037, 13041, 13044, 13048, 13052,
+ 13059, 13064, 13068, 13072, 13076, 13080, 13084, 13090, 13094, 13098,
+ 13102, 13106, 13112, 13116, 13120, 13123, 13127, 13131, 0, 13135, 13138,
+ 13142, 13145, 13149, 13152, 13156, 13160, 0, 0, 13164, 13167, 0, 0,
+ 13171, 13174, 13178, 13181, 13185, 13189, 13193, 13197, 13201, 13205,
+ 13209, 13213, 13217, 13221, 13225, 13229, 13233, 13237, 13241, 13245,
+ 13249, 13253, 0, 13257, 13260, 13264, 13268, 13272, 13275, 13278, 0,
+ 13282, 0, 0, 0, 13286, 13290, 13294, 13298, 0, 0, 13301, 13305, 13309,
+ 13314, 13318, 13323, 13327, 13332, 13337, 0, 0, 13343, 13347, 0, 0,
+ 13352, 13356, 13361, 13365, 0, 0, 0, 0, 0, 0, 0, 0, 13371, 0, 0, 0, 0,
+ 13377, 13381, 0, 13385, 13389, 13394, 13399, 13404, 0, 0, 13410, 13414,
+ 13417, 13420, 13423, 13426, 13429, 13432, 13436, 13439, 13443, 13451,
+ 13460, 13464, 13468, 13474, 13480, 13486, 13492, 13506, 13513, 13516, 0,
+ 0, 0, 0, 0, 13520, 13527, 13532, 0, 13537, 13541, 13546, 13550, 13555,
+ 13559, 0, 0, 0, 0, 13564, 13569, 0, 0, 13574, 13579, 13584, 13588, 13593,
+ 13598, 13603, 13608, 13613, 13618, 13623, 13628, 13633, 13638, 13643,
+ 13648, 13653, 13658, 13663, 13668, 13673, 13678, 0, 13683, 13687, 13692,
+ 13697, 13702, 13706, 13710, 0, 13715, 13720, 0, 13725, 13730, 0, 13735,
+ 13740, 0, 0, 13744, 0, 13749, 13755, 13760, 13766, 13771, 0, 0, 0, 0,
+ 13777, 13783, 0, 0, 13789, 13795, 13801, 0, 0, 0, 13806, 0, 0, 0, 0, 0,
+ 0, 0, 13811, 13816, 13821, 13826, 0, 13831, 0, 0, 0, 0, 0, 0, 0, 13836,
+ 13841, 13845, 13849, 13853, 13857, 13861, 13865, 13870, 13874, 13879,
+ 13883, 13887, 13891, 13895, 13901, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 13906, 13911, 13916, 0, 13921, 13925, 13930, 13934, 13939, 13943, 13948,
+ 13953, 13958, 0, 13964, 13968, 13973, 0, 13979, 13983, 13988, 13992,
+ 13997, 14002, 14007, 14012, 14017, 14022, 14027, 14032, 14037, 14042,
+ 14047, 14052, 14057, 14062, 14067, 14072, 14077, 14082, 0, 14087, 14091,
+ 14096, 14101, 14106, 14110, 14114, 0, 14119, 14124, 0, 14129, 14134,
+ 14139, 14144, 14149, 0, 0, 14153, 14158, 14163, 14169, 14174, 14180,
+ 14185, 14191, 14197, 14204, 0, 14211, 14216, 14222, 0, 14229, 14234,
+ 14240, 0, 0, 14245, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14249,
+ 14255, 14261, 14267, 0, 0, 14274, 14279, 14283, 14287, 14291, 14295,
+ 14299, 14303, 14308, 14312, 14317, 14322, 0, 0, 0, 0, 0, 0, 0, 14327, 0,
+ 0, 0, 0, 0, 0, 0, 14332, 14336, 14340, 0, 14344, 14347, 14351, 14354,
+ 14358, 14361, 14365, 14369, 0, 0, 14373, 14376, 0, 0, 14380, 14383,
+ 14387, 14390, 14394, 14398, 14402, 14406, 14410, 14414, 14418, 14422,
+ 14426, 14430, 14434, 14438, 14442, 14446, 14450, 14454, 14458, 14462, 0,
+ 14466, 14469, 14473, 14477, 14481, 14484, 14487, 0, 14491, 14495, 0,
+ 14499, 14503, 14507, 14511, 14515, 0, 0, 14518, 14522, 14526, 14531,
+ 14535, 14540, 14544, 14549, 14554, 0, 0, 14560, 14564, 0, 0, 14569,
+ 14573, 14578, 0, 0, 0, 0, 0, 0, 0, 0, 14582, 14588, 0, 0, 0, 0, 14594,
+ 14598, 0, 14602, 14606, 14611, 14616, 14621, 0, 0, 14627, 14631, 14634,
+ 14637, 14640, 14643, 14646, 14649, 14653, 14656, 14660, 14663, 14667,
+ 14673, 14679, 14685, 14691, 14697, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14703,
+ 14707, 0, 14711, 14714, 14718, 14721, 14725, 14728, 0, 0, 0, 14732,
+ 14735, 14739, 0, 14743, 14746, 14750, 14754, 0, 0, 0, 14757, 14761, 0,
+ 14765, 0, 14769, 14773, 0, 0, 0, 14777, 14781, 0, 0, 0, 14785, 14789,
+ 14793, 0, 0, 0, 14796, 14799, 14802, 14806, 14810, 14814, 14818, 14822,
+ 14826, 14830, 14834, 14838, 0, 0, 0, 0, 14841, 14846, 14850, 14855,
+ 14859, 0, 0, 0, 14864, 14868, 14873, 0, 14878, 14882, 14887, 14892, 0, 0,
+ 14896, 0, 0, 0, 0, 0, 0, 14899, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 14905, 14909, 14912, 14915, 14918, 14921, 14924, 14927, 14931, 14934,
+ 14938, 14942, 14947, 14952, 14956, 14960, 14964, 14968, 14972, 14977,
+ 14981, 0, 0, 0, 0, 0, 14984, 14990, 14994, 14998, 0, 15002, 15005, 15009,
+ 15012, 15016, 15019, 15023, 15027, 0, 15031, 15034, 15038, 0, 15042,
+ 15045, 15049, 15053, 15056, 15060, 15064, 15068, 15072, 15076, 15080,
+ 15084, 15088, 15092, 15096, 15100, 15104, 15108, 15112, 15116, 15120,
+ 15124, 15128, 0, 15132, 15135, 15139, 15143, 15147, 15150, 15153, 15157,
+ 15161, 15165, 15169, 15173, 15177, 15181, 15185, 15189, 0, 0, 0, 15192,
+ 15196, 15201, 15205, 15210, 15214, 15219, 15224, 0, 15230, 15234, 15239,
+ 0, 15244, 15248, 15253, 15258, 0, 0, 0, 0, 0, 0, 0, 15262, 15266, 0,
+ 15272, 15276, 15280, 0, 0, 0, 0, 0, 15284, 15289, 15294, 15299, 0, 0,
+ 15305, 15309, 15312, 15315, 15318, 15321, 15324, 15327, 15331, 15334, 0,
+ 0, 0, 0, 0, 0, 0, 0, 15338, 15351, 15363, 15375, 15387, 15399, 15411,
+ 15423, 0, 15427, 15431, 15435, 0, 15439, 15442, 15446, 15449, 15453,
+ 15456, 15460, 15464, 0, 15468, 15471, 15475, 0, 15479, 15482, 15486,
+ 15490, 15493, 15497, 15501, 15505, 15509, 15513, 15517, 15521, 15525,
+ 15529, 15533, 15537, 15541, 15545, 15549, 15553, 15557, 15561, 15565, 0,
+ 15569, 15572, 15576, 15580, 15584, 15587, 15590, 15594, 15598, 15602, 0,
+ 15606, 15610, 15614, 15618, 15622, 0, 0, 15625, 15629, 15633, 15638,
+ 15642, 15647, 15651, 15656, 15661, 0, 15667, 15671, 15676, 0, 15681,
+ 15685, 15690, 15695, 0, 0, 0, 0, 0, 0, 0, 15699, 15703, 0, 0, 0, 0, 0, 0,
+ 0, 15709, 0, 15713, 15718, 15723, 15728, 0, 0, 15734, 15738, 15741,
+ 15744, 15747, 15750, 15753, 15756, 15760, 15763, 0, 15767, 15771, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15775, 15779, 15783, 0, 15787, 15790,
+ 15794, 15797, 15801, 15804, 15808, 15812, 0, 15816, 15819, 15823, 0,
+ 15827, 15830, 15834, 15838, 15841, 15845, 15849, 15853, 15857, 15861,
+ 15865, 15869, 15873, 15877, 15881, 15885, 15889, 15893, 15897, 15901,
+ 15905, 15909, 15913, 15917, 15921, 15924, 15928, 15932, 15936, 15939,
+ 15942, 15946, 15950, 15954, 15958, 15962, 15966, 15970, 15974, 15978,
+ 15981, 0, 0, 15985, 15989, 15994, 15998, 16003, 16007, 16012, 16017, 0,
+ 16023, 16027, 16032, 0, 16037, 16041, 16046, 16051, 16055, 0, 0, 0, 0, 0,
+ 0, 0, 0, 16060, 0, 0, 0, 0, 0, 0, 0, 16066, 16072, 16077, 16082, 16087,
+ 0, 0, 16093, 16097, 16100, 16103, 16106, 16109, 16112, 16115, 16119,
+ 16122, 16126, 16130, 16135, 16140, 16146, 16152, 0, 0, 0, 16158, 16162,
+ 16168, 16174, 16180, 16185, 16191, 0, 0, 16197, 16201, 0, 16205, 16209,
+ 16213, 16217, 16221, 16225, 16229, 16233, 16237, 16241, 16245, 16249,
+ 16253, 16257, 16261, 16265, 16269, 16273, 0, 0, 0, 16277, 16283, 16289,
+ 16295, 16301, 16307, 16313, 16319, 16325, 16331, 16337, 16343, 16351,
+ 16357, 16363, 16369, 16375, 16381, 16387, 16393, 16399, 16405, 16411,
+ 16417, 0, 16423, 16429, 16435, 16441, 16447, 16453, 16457, 16463, 16467,
+ 0, 16471, 0, 0, 16477, 16481, 16487, 16493, 16499, 16503, 16509, 0, 0, 0,
+ 16513, 0, 0, 0, 0, 16517, 16522, 16529, 16536, 16543, 16550, 0, 16557, 0,
+ 16564, 16569, 16574, 16581, 16588, 16597, 16608, 16617, 0, 0, 0, 0, 0, 0,
+ 16622, 16628, 16633, 16638, 16643, 16648, 16653, 16658, 16664, 16669, 0,
+ 0, 16675, 16682, 16689, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16694, 16701,
+ 16708, 16715, 16722, 16729, 16736, 16743, 16750, 16757, 16764, 16771,
+ 16778, 16785, 16792, 16799, 16806, 16813, 16820, 16827, 16834, 16841,
+ 16848, 16855, 16862, 16869, 16876, 16883, 16890, 16897, 16904, 16911,
+ 16918, 16924, 16931, 16938, 16943, 16950, 16955, 16962, 16969, 16976,
+ 16983, 16990, 16997, 17003, 17010, 17015, 17021, 17028, 17035, 17042,
+ 17048, 17055, 17062, 17069, 17075, 17082, 0, 0, 0, 0, 17087, 17094,
+ 17100, 17107, 17113, 17122, 17131, 17136, 17141, 17146, 17153, 17160,
+ 17167, 17174, 17179, 17184, 17189, 17194, 17199, 17203, 17207, 17211,
+ 17215, 17219, 17223, 17228, 17232, 17237, 17242, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 17247, 17252, 0, 17259, 0, 0, 17266, 17271, 0, 17276, 0,
+ 0, 17283, 0, 0, 0, 0, 0, 0, 17288, 17293, 17297, 17304, 0, 17311, 17316,
+ 17321, 17326, 17333, 17340, 17347, 0, 17354, 17359, 17364, 0, 17371, 0,
+ 17378, 0, 0, 17383, 17390, 0, 17397, 17401, 17408, 17412, 17417, 17425,
+ 17431, 17437, 17442, 17448, 17454, 17460, 17465, 0, 17471, 17479, 17486,
+ 0, 0, 17493, 17498, 17504, 17509, 17515, 0, 17521, 0, 17527, 17534,
+ 17541, 17548, 17555, 17560, 0, 0, 17564, 17569, 17573, 17577, 17581,
+ 17585, 17589, 17593, 17598, 17602, 0, 0, 17607, 17613, 17619, 17626, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 17633, 17637, 17648, 17663, 17678, 17688, 17699,
+ 17712, 17723, 17729, 17737, 17747, 17753, 17761, 17765, 17771, 17777,
+ 17785, 17795, 17803, 17816, 17822, 17830, 17838, 17850, 17857, 17865,
+ 17873, 17881, 17889, 17897, 17905, 17915, 17919, 17922, 17925, 17928,
+ 17931, 17934, 17937, 17941, 17944, 17948, 17952, 17956, 17960, 17964,
+ 17968, 17972, 17977, 17981, 17986, 17991, 17997, 18007, 18021, 18031,
+ 18037, 18043, 18051, 18059, 18067, 18075, 18081, 18087, 18090, 18094,
+ 18098, 18102, 18106, 18110, 18114, 0, 18118, 18122, 18126, 18130, 18134,
+ 18138, 18142, 18146, 18150, 18154, 18158, 18162, 18165, 18169, 18173,
+ 18177, 18180, 18184, 18188, 18192, 18196, 18200, 18204, 18208, 18212,
+ 18215, 18219, 18223, 18227, 18231, 18235, 18238, 18241, 18245, 18251,
+ 18255, 0, 0, 0, 0, 18259, 18264, 18268, 18273, 18277, 18282, 18287,
+ 18293, 18298, 18304, 18308, 18313, 18317, 18322, 18332, 18338, 18344,
+ 18351, 18361, 18367, 18371, 18375, 18381, 18387, 18395, 18401, 18409,
+ 18417, 18425, 18435, 18443, 18453, 18458, 18464, 18470, 18476, 18482,
+ 18488, 18494, 0, 18500, 18506, 18512, 18518, 18524, 18530, 18536, 18542,
+ 18548, 18554, 18560, 18566, 18571, 18577, 18583, 18589, 18594, 18600,
+ 18606, 18612, 18618, 18624, 18630, 18636, 18642, 18647, 18653, 18659,
+ 18665, 18671, 18677, 18682, 18687, 18693, 18701, 18708, 0, 18716, 18723,
+ 18736, 18743, 18750, 18758, 18766, 18772, 18778, 18784, 18794, 18799,
+ 18805, 18815, 18825, 0, 18835, 18845, 18853, 18865, 18877, 18883, 18897,
+ 18912, 18917, 18922, 18930, 18938, 18946, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 18954, 18957, 18961, 18965, 18969, 18973, 18977, 18981, 18985,
+ 18989, 18993, 18997, 19001, 19005, 19009, 19013, 19017, 19021, 19025,
+ 19029, 19033, 19037, 19040, 19044, 19048, 19052, 19055, 19058, 19062,
+ 19066, 19070, 19074, 19077, 19081, 19084, 19089, 19092, 19096, 19099,
+ 19103, 19106, 19111, 19114, 19118, 19125, 19130, 19134, 19139, 19143,
+ 19148, 19152, 19157, 19164, 19170, 19175, 19179, 19183, 19187, 19191,
+ 19195, 19200, 19206, 19212, 19217, 19223, 19227, 19230, 19233, 19236,
+ 19239, 19242, 19245, 19249, 19252, 19256, 19262, 19266, 19270, 19274,
+ 19278, 19282, 19286, 19290, 19294, 19299, 19303, 19308, 19313, 19319,
+ 19324, 19330, 19336, 19342, 19348, 19354, 19362, 19369, 19377, 19385,
+ 19394, 19403, 19414, 19424, 19434, 19445, 19456, 19466, 19476, 19486,
+ 19496, 19506, 19516, 19526, 19536, 19544, 19551, 19557, 19564, 19569,
+ 19575, 19581, 19587, 19593, 19599, 19605, 19611, 19617, 19623, 19629,
+ 19635, 19640, 19648, 19655, 19661, 19668, 19676, 19682, 19688, 19694,
+ 19700, 19708, 19716, 19726, 19734, 19742, 19748, 19753, 19758, 19763,
+ 19768, 19773, 19778, 19784, 19789, 19795, 19801, 19807, 19813, 19820,
+ 19825, 19831, 19836, 19841, 19846, 19851, 19856, 19861, 19866, 19871,
+ 19876, 19881, 19886, 19891, 19896, 19901, 19906, 19911, 19916, 19921,
+ 19926, 19931, 19936, 19941, 19946, 19951, 19956, 19961, 19966, 19971,
+ 19976, 19981, 19986, 19991, 19996, 20001, 20006, 20011, 20016, 0, 20021,
+ 0, 0, 0, 0, 0, 20026, 0, 0, 20031, 20035, 20039, 20043, 20047, 20051,
+ 20055, 20059, 20063, 20067, 20071, 20075, 20079, 20083, 20087, 20091,
+ 20095, 20099, 20103, 20107, 20111, 20115, 20119, 20123, 20127, 20131,
+ 20135, 20139, 20143, 20147, 20151, 20155, 20159, 20163, 20167, 20171,
+ 20175, 20179, 20183, 20187, 20191, 20195, 20201, 20205, 20210, 20215,
+ 20219, 20224, 20229, 20233, 20237, 20241, 20245, 20249, 20253, 20257,
+ 20261, 20265, 20269, 20273, 20277, 20281, 20285, 20289, 20293, 20297,
+ 20301, 20305, 20309, 20313, 20317, 20321, 20325, 20329, 20333, 20337,
+ 20341, 20345, 20349, 20353, 20357, 20361, 20365, 20369, 20373, 20377,
+ 20381, 20385, 20389, 20393, 20397, 20401, 20405, 20409, 20413, 20417,
+ 20421, 20425, 20429, 20433, 20437, 20441, 20445, 20449, 20453, 20457,
+ 20461, 20465, 20469, 20473, 20477, 20481, 20485, 20489, 20493, 20497,
+ 20501, 20505, 20509, 20513, 20517, 20521, 20525, 20529, 20533, 20537,
+ 20541, 20545, 20549, 20553, 20557, 20561, 20565, 20569, 20573, 20577,
+ 20581, 20585, 20589, 20593, 20597, 20601, 20605, 20609, 20613, 20617,
+ 20620, 20624, 20627, 20631, 20635, 20638, 20642, 20646, 20649, 20653,
+ 20657, 20661, 20665, 20668, 20672, 20676, 20680, 20684, 20688, 20692,
+ 20695, 20699, 20703, 20707, 20711, 20715, 20719, 20723, 20727, 20731,
+ 20735, 20739, 20743, 20747, 20751, 20755, 20759, 20763, 20767, 20771,
+ 20775, 20779, 20783, 20787, 20791, 20795, 20799, 20803, 20807, 20811,
+ 20815, 20819, 20823, 20827, 20831, 20835, 20839, 20843, 20847, 20851,
+ 20855, 20859, 20863, 20867, 20871, 20875, 20879, 20883, 20887, 20891,
+ 20895, 20899, 20903, 20907, 20911, 20915, 20919, 20923, 20927, 20931,
+ 20935, 20939, 20943, 20947, 20951, 20955, 20959, 20963, 20967, 20971,
+ 20975, 20979, 20983, 20987, 20991, 20995, 20999, 21003, 21007, 21011,
+ 21015, 21019, 21023, 21027, 21031, 21035, 21039, 21043, 21047, 21051,
+ 21055, 21059, 21063, 21067, 21071, 21075, 21079, 21083, 21087, 21091,
+ 21095, 21099, 21103, 21107, 21111, 21115, 21119, 21123, 21127, 21131,
+ 21135, 21139, 21143, 21147, 21151, 21155, 21159, 21163, 21167, 21171,
+ 21175, 21179, 21183, 21187, 21191, 21195, 21199, 21203, 21207, 21211,
+ 21215, 21219, 21223, 21227, 21231, 21235, 21239, 21243, 21247, 21250,
+ 21254, 21258, 21262, 21266, 21270, 21274, 21278, 21282, 21286, 21290,
+ 21294, 21298, 21302, 21306, 21310, 21314, 21318, 21322, 21326, 21330,
+ 21334, 21338, 21342, 21345, 21349, 21353, 21357, 21361, 21365, 21369,
+ 21373, 21377, 21381, 21385, 21389, 21393, 21397, 21401, 21405, 21409,
+ 21413, 21417, 21421, 21425, 21429, 21433, 21437, 21441, 21445, 21449,
+ 21453, 21457, 21461, 21465, 21469, 21473, 21477, 21481, 21485, 21489,
+ 21493, 21497, 21501, 21505, 21509, 21513, 21517, 21521, 21525, 21529,
+ 21533, 0, 21537, 21541, 21545, 21549, 0, 0, 21553, 21557, 21561, 21565,
+ 21569, 21573, 21577, 0, 21581, 0, 21585, 21589, 21593, 21597, 0, 0,
+ 21601, 21605, 21609, 21613, 21617, 21621, 21625, 21629, 21633, 21637,
+ 21641, 21645, 21649, 21653, 21657, 21661, 21665, 21669, 21673, 21677,
+ 21681, 21685, 21689, 21692, 21696, 21700, 21704, 21708, 21712, 21716,
+ 21720, 21724, 21728, 21732, 21736, 21740, 21744, 21748, 21752, 21756,
+ 21760, 0, 21764, 21768, 21772, 21776, 0, 0, 21780, 21784, 21788, 21792,
+ 21796, 21800, 21804, 21808, 21812, 21816, 21820, 21824, 21828, 21832,
+ 21836, 21840, 21844, 21849, 21854, 21859, 21865, 21871, 21876, 21881,
+ 21887, 21890, 21894, 21898, 21902, 21906, 21910, 21914, 21918, 0, 21922,
+ 21926, 21930, 21934, 0, 0, 21938, 21942, 21946, 21950, 21954, 21958,
+ 21962, 0, 21966, 0, 21970, 21974, 21978, 21982, 0, 0, 21986, 21990,
+ 21994, 21998, 22002, 22006, 22010, 22014, 22018, 22023, 22028, 22033,
+ 22039, 22045, 22050, 0, 22055, 22059, 22063, 22067, 22071, 22075, 22079,
+ 22083, 22087, 22091, 22095, 22099, 22103, 22107, 22111, 22115, 22119,
+ 22122, 22126, 22130, 22134, 22138, 22142, 22146, 22150, 22154, 22158,
+ 22162, 22166, 22170, 22174, 22178, 22182, 22186, 22190, 22194, 22198,
+ 22202, 22206, 22210, 22214, 22218, 22222, 22226, 22230, 22234, 22238,
+ 22242, 22246, 22250, 22254, 22258, 22262, 22266, 22270, 22274, 22278, 0,
+ 22282, 22286, 22290, 22294, 0, 0, 22298, 22302, 22306, 22310, 22314,
+ 22318, 22322, 22326, 22330, 22334, 22338, 22342, 22346, 22350, 22354,
+ 22358, 22362, 22366, 22370, 22374, 22378, 22382, 22386, 22390, 22394,
+ 22398, 22402, 22406, 22410, 22414, 22418, 22422, 22426, 22430, 22434,
+ 22438, 22442, 22446, 22450, 22454, 22458, 22462, 22466, 22470, 22474,
+ 22478, 22482, 22486, 22490, 22494, 22498, 22502, 22506, 22510, 22514,
+ 22518, 22522, 22525, 22529, 22533, 22537, 22541, 22545, 22549, 22553,
+ 22557, 22561, 0, 0, 22565, 22574, 22580, 22585, 22589, 22592, 22597,
+ 22600, 22603, 22606, 22611, 22615, 22620, 22623, 22626, 22629, 22632,
+ 22635, 22638, 22642, 22645, 22649, 22653, 22657, 22661, 22665, 22669,
+ 22673, 22677, 22681, 22685, 22689, 0, 0, 0, 22695, 22701, 22705, 22709,
+ 22713, 22719, 22723, 22727, 22731, 22737, 22741, 22745, 22749, 22755,
+ 22759, 22763, 22767, 22773, 22779, 22785, 22793, 22799, 22805, 22811,
+ 22817, 22823, 0, 0, 0, 0, 0, 0, 22829, 22832, 22835, 22838, 22841, 22844,
+ 22848, 22852, 22855, 22859, 22863, 22867, 22871, 22875, 22878, 22882,
+ 22886, 22890, 22894, 22898, 22902, 22906, 22910, 22914, 22918, 22922,
+ 22925, 22929, 22933, 22937, 22941, 22945, 22949, 22953, 22957, 22961,
+ 22965, 22969, 22973, 22977, 22981, 22985, 22989, 22993, 22997, 23001,
+ 23004, 23008, 23012, 23016, 23020, 23024, 23028, 23032, 23036, 23040,
+ 23044, 23048, 23052, 23056, 23060, 23064, 23068, 23072, 23076, 23080,
+ 23084, 23088, 23092, 23096, 23100, 23104, 23108, 23112, 23116, 23120,
+ 23124, 23128, 23132, 23136, 23139, 23143, 23147, 23151, 23155, 23159, 0,
+ 0, 23163, 23168, 23173, 23178, 23183, 23188, 0, 0, 23193, 23197, 23200,
+ 23204, 23207, 23211, 23214, 23218, 23224, 23229, 23233, 23236, 23240,
+ 23244, 23249, 23253, 23258, 23262, 23267, 23271, 23276, 23280, 23285,
+ 23291, 23295, 23300, 23304, 23309, 23315, 23319, 23325, 23331, 23335,
+ 23340, 23348, 23356, 23363, 23368, 23373, 23382, 23388, 23396, 23401,
+ 23407, 23411, 23415, 23419, 23423, 23427, 23431, 23435, 23439, 23443,
+ 23447, 23453, 23458, 23463, 23466, 23470, 23474, 23479, 23483, 23488,
+ 23492, 23497, 23501, 23506, 23510, 23515, 23519, 23524, 23528, 23533,
+ 23539, 23543, 23548, 23553, 23557, 23561, 23565, 23569, 23572, 23576,
+ 23582, 23587, 23592, 23596, 23600, 23604, 23609, 23613, 23618, 23622,
+ 23627, 23630, 23634, 23638, 23643, 23647, 23652, 23656, 23661, 23667,
+ 23671, 23675, 23679, 23683, 23687, 23691, 23695, 23699, 23703, 23707,
+ 23711, 23717, 23720, 23724, 23728, 23733, 23737, 23742, 23746, 23751,
+ 23755, 23760, 23764, 23769, 23773, 23778, 23782, 23787, 23793, 23797,
+ 23801, 23807, 23813, 23819, 23825, 23829, 23833, 23837, 23841, 23845,
+ 23849, 23855, 23859, 23863, 23867, 23872, 23876, 23881, 23885, 23890,
+ 23894, 23899, 23903, 23908, 23912, 23917, 23921, 23926, 23932, 23936,
+ 23942, 23946, 23950, 23954, 23958, 23962, 23966, 23972, 23975, 23979,
+ 23983, 23988, 23992, 23997, 24001, 24006, 24010, 24015, 24019, 24024,
+ 24028, 24033, 24037, 24042, 24048, 24052, 24057, 24061, 24067, 24073,
+ 24077, 24081, 24085, 24089, 24093, 24097, 24103, 24107, 24111, 24115,
+ 24120, 24124, 24129, 24133, 24138, 24144, 24148, 24153, 24157, 24161,
+ 24165, 24169, 24173, 24177, 24181, 24187, 24191, 24195, 24199, 24204,
+ 24208, 24213, 24217, 24222, 24226, 24231, 24235, 24240, 24244, 24249,
+ 24253, 24258, 24261, 24265, 24269, 24273, 24277, 24281, 24285, 24289,
+ 24293, 24299, 24303, 24307, 24311, 24316, 24320, 24325, 24329, 24334,
+ 24338, 24343, 24347, 24352, 24356, 24361, 24365, 24370, 24376, 24379,
+ 24384, 24388, 24393, 24399, 24405, 24411, 24417, 24423, 24429, 24435,
+ 24439, 24443, 24447, 24451, 24455, 24459, 24463, 24467, 24472, 24476,
+ 24481, 24485, 24490, 24494, 24499, 24503, 24508, 24512, 24517, 24521,
+ 24526, 24530, 24534, 24538, 24542, 24546, 24550, 24554, 24560, 24563,
+ 24567, 24571, 24576, 24580, 24585, 24589, 24594, 24598, 24603, 24607,
+ 24612, 24616, 24621, 24625, 24630, 24636, 24640, 24646, 24651, 24657,
+ 24661, 24667, 24672, 24676, 24680, 24684, 24688, 24692, 24697, 24701,
+ 24705, 24710, 24714, 24719, 24722, 24726, 24730, 24734, 24738, 24742,
+ 24746, 24750, 24754, 24758, 24762, 24766, 24771, 24775, 24779, 24785,
+ 24789, 24795, 24799, 24805, 24809, 24813, 24817, 24821, 24825, 24830,
+ 24834, 24838, 24842, 24846, 24850, 24854, 24858, 24862, 24866, 24870,
+ 24876, 24882, 24888, 24894, 24900, 24905, 24911, 24917, 24923, 24927,
+ 24931, 24935, 24939, 24943, 24947, 24951, 24955, 24959, 24963, 24967,
+ 24971, 24975, 24980, 24985, 24990, 24995, 24999, 25003, 25007, 25011,
+ 25015, 25019, 25023, 25027, 25031, 25037, 25043, 25049, 25055, 25061,
+ 25067, 25073, 25079, 25085, 25089, 25093, 25097, 25101, 25105, 25109,
+ 25113, 25119, 25125, 25131, 25137, 25143, 25149, 25155, 25161, 25167,
+ 25172, 25177, 25182, 25187, 25193, 25199, 25205, 25211, 25217, 25223,
+ 25229, 25235, 25241, 25247, 25253, 25258, 25264, 25270, 25276, 25281,
+ 25286, 25291, 25296, 25301, 25306, 25311, 25316, 25321, 25326, 25331,
+ 25336, 25341, 25346, 25351, 25356, 25361, 25366, 25371, 25376, 25381,
+ 25386, 25391, 25396, 25401, 25406, 25411, 25416, 25421, 25426, 25431,
+ 25436, 25441, 25446, 25451, 25456, 25461, 25466, 25471, 25476, 25481,
+ 25486, 25490, 25495, 25500, 25505, 25510, 25515, 25520, 25525, 25530,
+ 25535, 25540, 25545, 25550, 25555, 25560, 25565, 25570, 25575, 25580,
+ 25585, 25590, 25595, 25600, 25605, 25610, 25615, 25620, 25625, 25630,
+ 25635, 25640, 25645, 25649, 25654, 25659, 25664, 25669, 25674, 25678,
+ 25683, 25689, 25694, 25699, 25704, 25709, 25715, 25720, 25725, 25730,
+ 25735, 25740, 25745, 25750, 25755, 25760, 25765, 25770, 25775, 25780,
+ 25785, 25790, 25795, 25800, 25805, 25810, 25815, 25820, 25825, 25830,
+ 25835, 25840, 25845, 25850, 25855, 25860, 25865, 25870, 25875, 25880,
+ 25885, 25890, 25895, 25900, 25905, 25910, 25915, 25920, 25925, 25930,
+ 25935, 25941, 25946, 25951, 25956, 25961, 25966, 25971, 25976, 25981,
+ 25986, 25991, 25996, 26001, 26006, 26011, 26016, 26021, 26026, 26031,
+ 26036, 26041, 26046, 26051, 26056, 26061, 26066, 26071, 26076, 26081,
+ 26086, 26091, 26096, 26101, 26106, 26111, 26116, 26121, 26126, 26131,
+ 26137, 26141, 26145, 26149, 26153, 26157, 26161, 26165, 26169, 26175,
+ 26181, 26187, 26193, 26199, 26205, 26211, 26218, 26224, 26229, 26234,
+ 26239, 26244, 26249, 26254, 26259, 26264, 26269, 26274, 26279, 26284,
+ 26289, 26294, 26299, 26304, 26309, 26314, 26319, 26324, 26329, 26334,
+ 26339, 26344, 26349, 26354, 26359, 26364, 0, 0, 0, 26371, 26381, 26385,
+ 26392, 26396, 26400, 26404, 26412, 26416, 26421, 26426, 26431, 26435,
+ 26440, 26445, 26448, 26452, 26456, 26465, 26469, 26473, 26479, 26483,
+ 26487, 26495, 26499, 26507, 26513, 26519, 26525, 26531, 26541, 26547,
+ 26551, 26560, 26563, 26569, 26573, 26579, 26584, 26590, 26598, 26604,
+ 26609, 26616, 26621, 26625, 26629, 26639, 26645, 26649, 26659, 26665,
+ 26669, 26673, 26680, 26688, 26694, 26700, 26709, 26713, 26717, 26721,
+ 26729, 26736, 26740, 26744, 26748, 26752, 26756, 26760, 26764, 26768,
+ 26772, 26776, 26780, 26785, 26790, 26795, 26799, 26803, 26807, 26811,
+ 26815, 26819, 26827, 26835, 26843, 26851, 0, 0, 0, 0, 0, 0, 0, 26859,
+ 26863, 26867, 26871, 26875, 26880, 26885, 26890, 26895, 26900, 26904,
+ 26909, 26913, 0, 26917, 26922, 26927, 26932, 26936, 26941, 26946, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 26951, 26955, 26959, 26963, 26967, 26972,
+ 26977, 26982, 26987, 26992, 26996, 27001, 27005, 27009, 27014, 27019,
+ 27024, 27029, 27033, 27038, 27043, 27048, 27054, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 27059, 27063, 27067, 27071, 27075, 27080, 27085, 27090, 27095, 27100,
+ 27104, 27109, 27113, 27117, 27122, 27127, 27132, 27137, 27141, 27146, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27151, 27155, 27159, 27163, 27167,
+ 27172, 27177, 27182, 27187, 27192, 27196, 27201, 27205, 0, 27209, 27214,
+ 27219, 0, 27224, 27229, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27234, 27237,
+ 27241, 27245, 27249, 27253, 27257, 27261, 27265, 27269, 27273, 27277,
+ 27281, 27285, 27289, 27293, 27297, 27301, 27304, 27308, 27312, 27316,
+ 27320, 27324, 27328, 27332, 27336, 27340, 27344, 27348, 27352, 27356,
+ 27360, 27363, 27367, 27371, 27377, 27383, 27389, 27395, 27401, 27407,
+ 27413, 27419, 27425, 27431, 27437, 27443, 27449, 27455, 27464, 27473,
+ 27479, 27485, 27491, 27496, 27500, 27505, 27510, 27515, 27519, 27524,
+ 27529, 27534, 27538, 27543, 27547, 27552, 27557, 27562, 27567, 27571,
+ 27575, 27579, 27583, 27587, 27591, 27595, 27599, 27603, 27607, 27613,
+ 27617, 27621, 27625, 27629, 27633, 27641, 27647, 27651, 27657, 27661,
+ 27667, 27671, 0, 0, 27675, 27679, 27682, 27685, 27688, 27691, 27694,
+ 27697, 27701, 27704, 0, 0, 0, 0, 0, 0, 27708, 27716, 27724, 27732, 27740,
+ 27748, 27756, 27764, 27772, 27780, 0, 0, 0, 0, 0, 0, 27788, 27791, 27794,
+ 27797, 27802, 27805, 27810, 27817, 27825, 27830, 27837, 27840, 27847,
+ 27854, 27861, 0, 27865, 27869, 27872, 27875, 27878, 27881, 27884, 27887,
+ 27891, 27894, 0, 0, 0, 0, 0, 0, 27898, 27901, 27904, 27907, 27910, 27913,
+ 27917, 27921, 27925, 27929, 27933, 27937, 27940, 27944, 27948, 27951,
+ 27955, 27959, 27963, 27967, 27971, 27975, 27979, 27982, 27986, 27990,
+ 27994, 27997, 28001, 28005, 28009, 28013, 28017, 28021, 28025, 28029,
+ 28036, 28041, 28046, 28051, 28056, 28062, 28068, 28074, 28080, 28085,
+ 28091, 28097, 28102, 28108, 28114, 28120, 28126, 28132, 28137, 28143,
+ 28148, 28154, 28160, 28166, 28172, 28178, 28183, 28188, 28194, 28200,
+ 28205, 28211, 28216, 28222, 28227, 28232, 28238, 28244, 28250, 28256,
+ 28262, 28268, 28274, 28280, 28286, 28292, 28298, 28304, 28309, 28314,
+ 28320, 28326, 0, 0, 0, 0, 0, 0, 0, 0, 28332, 28341, 28350, 28358, 28366,
+ 28376, 28384, 28393, 28400, 28407, 28414, 28422, 28430, 28438, 28446,
+ 28454, 28462, 28470, 28478, 28485, 28493, 28501, 28509, 28517, 28525,
+ 28535, 28545, 28555, 28565, 28575, 28585, 28595, 28605, 28615, 28625,
+ 28635, 28645, 28655, 28665, 28673, 28681, 28691, 28699, 0, 0, 0, 0, 0,
+ 28709, 28713, 28717, 28721, 28725, 28729, 28733, 28737, 28741, 28745,
+ 28749, 28753, 28757, 28761, 28765, 28769, 28773, 28777, 28781, 28785,
+ 28789, 28793, 28797, 28801, 28807, 28811, 28817, 28821, 28827, 28831,
+ 28837, 28841, 28845, 28849, 28853, 28857, 28861, 28867, 28873, 28879,
+ 28885, 28891, 28897, 28902, 28908, 28914, 28920, 28926, 28933, 28939,
+ 28944, 28949, 28953, 28957, 28961, 28965, 28969, 28973, 28977, 28983,
+ 28989, 28995, 29000, 29007, 29012, 29017, 29023, 29028, 29035, 29042, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 29048, 29054, 29058, 29063, 29068, 29073,
+ 29078, 29083, 29088, 29093, 29098, 29103, 29108, 29113, 29118, 29123,
+ 29128, 29132, 29137, 29142, 29147, 29151, 29155, 29160, 29165, 29170,
+ 29175, 29180, 29185, 29189, 29194, 0, 29199, 29204, 29209, 29214, 29220,
+ 29226, 29232, 29238, 29243, 29248, 29254, 29261, 0, 0, 0, 0, 29268,
+ 29273, 29279, 29285, 29291, 29297, 29302, 29307, 29313, 29319, 29324,
+ 29329, 0, 0, 0, 0, 29334, 0, 0, 0, 29339, 29344, 29349, 29354, 29358,
+ 29362, 29366, 29370, 29374, 29378, 29383, 29387, 29392, 29397, 29403,
+ 29409, 29415, 29421, 29426, 29432, 29438, 29444, 29449, 29455, 29460,
+ 29466, 29472, 29477, 29483, 29489, 29495, 29501, 29506, 29511, 29517,
+ 29523, 29528, 29534, 29539, 29545, 29550, 29556, 0, 0, 29562, 29568,
+ 29574, 29580, 29586, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29592, 29601,
+ 29610, 29618, 29627, 29636, 29644, 29653, 29662, 29671, 29680, 29688,
+ 29697, 29706, 29714, 29723, 29732, 29741, 29750, 29759, 29768, 29776,
+ 29785, 29793, 29801, 29810, 29818, 29827, 29836, 29845, 29854, 29863,
+ 29872, 29880, 29889, 29898, 29906, 29915, 29924, 29933, 29942, 29951,
+ 29960, 29969, 0, 0, 0, 0, 29978, 29988, 29997, 30006, 30014, 30023,
+ 30031, 30040, 30048, 30057, 30066, 30075, 30084, 30093, 30102, 30111,
+ 30120, 30129, 30138, 30147, 30156, 30165, 30174, 30183, 30192, 30200, 0,
+ 0, 0, 0, 0, 0, 30208, 30216, 30223, 30230, 30237, 30244, 30251, 30258,
+ 30266, 30273, 30281, 0, 0, 0, 30289, 30297, 30305, 30309, 30315, 30321,
+ 30327, 30333, 30339, 30345, 30351, 30357, 30363, 30369, 30375, 30381,
+ 30387, 30393, 30399, 30403, 30409, 30415, 30421, 30427, 30433, 30439,
+ 30445, 30451, 30457, 30463, 30469, 30475, 30481, 30487, 30493, 30497,
+ 30502, 30507, 30512, 30516, 30521, 30525, 30530, 30535, 30540, 30545,
+ 30550, 30555, 30560, 30565, 30570, 30574, 30579, 30584, 30589, 30594,
+ 30598, 30602, 30607, 30612, 30617, 30622, 0, 0, 30628, 30632, 30639,
+ 30644, 30650, 30656, 30661, 30667, 30673, 30678, 30684, 30690, 30696,
+ 30702, 30708, 30713, 30718, 30724, 30729, 30735, 30740, 30746, 30752,
+ 30758, 30764, 30769, 30774, 30779, 30785, 30791, 30796, 30802, 30808,
+ 30812, 30817, 30822, 30827, 30832, 30837, 30842, 30847, 30853, 30859,
+ 30865, 30870, 30875, 30879, 30884, 30888, 30893, 30897, 30902, 30907,
+ 30912, 30917, 30924, 30931, 30938, 30948, 30957, 30964, 30970, 30981,
+ 30986, 30992, 0, 30998, 31003, 31008, 31016, 31022, 31030, 31035, 31041,
+ 31047, 31053, 31058, 31064, 31069, 31076, 31082, 31087, 31093, 31099,
+ 31105, 31112, 31119, 31126, 31131, 31136, 31143, 31150, 31157, 31164,
+ 31171, 0, 0, 31178, 31185, 31192, 31198, 31204, 31210, 31216, 31222,
+ 31228, 31235, 31241, 0, 0, 0, 0, 0, 0, 31248, 31254, 31259, 31264, 31269,
+ 31274, 31279, 31284, 31290, 31295, 0, 0, 0, 0, 0, 0, 31301, 31306, 31311,
+ 31316, 31321, 31326, 31331, 31340, 31347, 31352, 31357, 31362, 31367,
+ 31372, 0, 0, 31377, 31384, 31387, 31390, 31393, 31398, 31402, 31408,
+ 31412, 31417, 31424, 31432, 31436, 31441, 31445, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 31450, 31456, 31462, 31466, 31470, 31474,
+ 31478, 31484, 31488, 31494, 31498, 31504, 31510, 31518, 31524, 31532,
+ 31536, 31540, 31544, 31550, 31553, 31559, 31563, 31569, 31573, 31577,
+ 31583, 31587, 31593, 31597, 31603, 31611, 31619, 31627, 31633, 31637,
+ 31643, 31647, 31653, 31657, 31660, 31666, 31670, 31676, 31679, 31682,
+ 31686, 31690, 31694, 31700, 31706, 31710, 31713, 31717, 31722, 31727,
+ 31734, 31739, 31746, 31753, 31762, 31769, 31778, 31783, 31790, 31797,
+ 31806, 31811, 31818, 31823, 31829, 31835, 31841, 31847, 31853, 31859, 0,
+ 0, 0, 0, 31865, 31869, 31872, 31875, 31878, 31881, 31884, 31887, 31891,
+ 31894, 31898, 31901, 31904, 31907, 31912, 31917, 31922, 31925, 31930,
+ 31935, 31940, 31945, 31952, 31957, 31962, 31967, 31972, 31979, 31985,
+ 31991, 31997, 32003, 32009, 32018, 32027, 32033, 32039, 32047, 32055,
+ 32064, 32073, 32081, 32089, 32098, 32107, 0, 0, 0, 32115, 32120, 32125,
+ 32130, 32134, 32138, 32142, 32147, 32151, 32155, 32160, 32164, 32169,
+ 32174, 32179, 32184, 32189, 32194, 32199, 32204, 32209, 32214, 32218,
+ 32223, 32228, 32233, 32237, 32241, 32246, 32251, 32256, 32261, 32266,
+ 32270, 32276, 32282, 32288, 32294, 32300, 32306, 32312, 32318, 32324,
+ 32329, 32334, 32341, 32349, 32354, 32359, 32364, 32368, 32372, 32376,
+ 32380, 32384, 32388, 32393, 32397, 32402, 32406, 32411, 32416, 32421,
+ 32427, 32433, 32437, 32443, 32447, 32453, 32459, 32464, 32471, 32475,
+ 32481, 32486, 32493, 32498, 32505, 32512, 32517, 32524, 32529, 32534,
+ 32539, 32546, 32550, 32556, 32563, 32570, 32575, 32582, 32589, 32593,
+ 32599, 32604, 32609, 32616, 32621, 32626, 32631, 32636, 32640, 32644,
+ 32649, 32654, 32661, 32667, 32672, 32679, 32684, 32691, 32696, 32706,
+ 32712, 32718, 32722, 0, 0, 0, 0, 0, 0, 0, 0, 32726, 32735, 32742, 32749,
+ 32756, 32760, 32765, 32770, 32775, 32780, 32785, 32790, 32795, 32800,
+ 32805, 32810, 32815, 32820, 32825, 32829, 32834, 32839, 32844, 32849,
+ 32854, 32859, 32863, 32868, 32873, 32878, 32883, 32887, 32892, 32897,
+ 32901, 32906, 32911, 32916, 32921, 32926, 32930, 32936, 32943, 32949,
+ 32954, 32959, 32965, 32970, 32976, 32981, 32987, 32993, 32998, 33004,
+ 33010, 33015, 33021, 33027, 33033, 33038, 0, 0, 0, 33043, 33049, 33059,
+ 33065, 33073, 33079, 33084, 33088, 33092, 33096, 33100, 33104, 33108,
+ 33113, 33117, 0, 0, 0, 33122, 33127, 33132, 33137, 33144, 33150, 33156,
+ 33162, 33168, 33174, 33180, 33187, 33193, 33200, 33207, 33214, 33221,
+ 33228, 33235, 33242, 33249, 33256, 33263, 33270, 33277, 33284, 33291,
+ 33298, 33305, 33312, 33319, 33326, 33333, 33340, 33347, 33354, 33361,
+ 33368, 33375, 33382, 33389, 33396, 33403, 33410, 33418, 33426, 33434,
+ 33440, 33446, 33452, 33460, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 12070, 0, 12079, 12086, 12094, 12106, 12113, 12120, 12127, 12138, 12149,
- 12156, 12164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12170, 12175, 12180, 12185, 12190,
- 12195, 12200, 12205, 12210, 12215, 12220, 12225, 12230, 12234, 12238,
- 12242, 12247, 12253, 12259, 12265, 12270, 12275, 12280, 12285, 12291,
- 12300, 12308, 0, 12314, 12320, 12324, 12328, 12332, 12337, 12340, 12344,
- 12347, 12351, 12354, 12358, 12362, 12366, 12371, 12376, 12379, 12383,
- 12388, 12393, 12396, 12400, 12403, 12407, 12411, 12415, 12419, 12423,
- 12427, 12431, 12435, 12439, 12443, 12447, 12451, 12455, 12459, 12463,
- 12467, 12471, 12475, 12478, 12482, 12485, 12489, 12493, 12497, 12500,
- 12503, 12506, 12510, 12514, 12518, 12522, 12526, 12530, 12534, 12537,
- 12540, 12545, 12550, 12554, 12558, 12563, 12567, 12572, 12576, 12581,
- 12586, 12592, 12598, 12604, 12608, 12613, 12619, 12625, 12629, 12634,
- 12638, 12644, 12649, 12652, 12658, 12664, 12669, 12674, 12681, 12686,
- 12691, 12695, 12699, 12703, 12707, 12711, 12715, 12719, 12723, 12728,
- 12733, 12738, 12744, 12747, 12751, 12755, 12758, 12761, 12764, 12767,
- 12770, 12773, 12776, 12779, 12782, 12786, 12793, 12798, 12802, 12806,
- 12810, 12814, 0, 12818, 12822, 12826, 12830, 12834, 12840, 12844, 0,
- 12848, 12852, 12856, 0, 12860, 12863, 12867, 12870, 12874, 12877, 12881,
- 12885, 0, 0, 12889, 12892, 0, 0, 12896, 12899, 12903, 12906, 12910,
- 12914, 12918, 12922, 12926, 12930, 12934, 12938, 12942, 12946, 12950,
- 12954, 12958, 12962, 12966, 12970, 12974, 12978, 0, 12981, 12984, 12988,
- 12992, 12996, 12999, 13002, 0, 13005, 0, 0, 0, 13009, 13013, 13017,
- 13020, 0, 0, 13023, 13027, 13031, 13036, 13040, 13045, 13049, 13054,
- 13059, 0, 0, 13065, 13069, 0, 0, 13074, 13078, 13083, 13087, 0, 0, 0, 0,
- 0, 0, 0, 0, 13093, 0, 0, 0, 0, 13099, 13103, 0, 13107, 13111, 13116,
- 13121, 13126, 0, 0, 13132, 13136, 13139, 13142, 13145, 13148, 13151,
- 13154, 13157, 13160, 13163, 13172, 13181, 13185, 13189, 13195, 13201,
- 13207, 13213, 13227, 13234, 13237, 0, 0, 0, 0, 0, 13241, 13247, 13251, 0,
- 13255, 13258, 13262, 13265, 13269, 13272, 0, 0, 0, 0, 13276, 13280, 0, 0,
- 13284, 13288, 13292, 13295, 13299, 13303, 13307, 13311, 13315, 13319,
- 13323, 13327, 13331, 13335, 13339, 13343, 13347, 13351, 13355, 13359,
- 13363, 13367, 0, 13370, 13373, 13377, 13381, 13385, 13388, 13391, 0,
- 13394, 13398, 0, 13402, 13406, 0, 13410, 13413, 0, 0, 13416, 0, 13420,
- 13425, 13429, 13434, 13438, 0, 0, 0, 0, 13443, 13448, 0, 0, 13453, 13458,
- 13463, 0, 0, 0, 13467, 0, 0, 0, 0, 0, 0, 0, 13471, 13475, 13479, 13483,
- 0, 13487, 0, 0, 0, 0, 0, 0, 0, 13491, 13495, 13498, 13501, 13504, 13507,
- 13510, 13513, 13516, 13519, 13522, 13525, 13528, 13531, 13534, 13539, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13543, 13547, 13551, 0, 13555, 13558,
- 13562, 13565, 13569, 13572, 13576, 13580, 13584, 0, 13589, 13592, 13596,
- 0, 13601, 13604, 13608, 13611, 13615, 13619, 13623, 13627, 13631, 13635,
- 13639, 13643, 13647, 13651, 13655, 13659, 13663, 13667, 13671, 13675,
- 13679, 13683, 0, 13686, 13689, 13693, 13697, 13701, 13704, 13707, 0,
- 13710, 13714, 0, 13718, 13722, 13726, 13730, 13733, 0, 0, 13736, 13740,
- 13744, 13749, 13753, 13758, 13762, 13767, 13772, 13778, 0, 13784, 13788,
- 13793, 0, 13799, 13803, 13808, 0, 0, 13812, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 13815, 13820, 13825, 13830, 0, 0, 13836, 13840, 13843,
- 13846, 13849, 13852, 13855, 13858, 13861, 13864, 13867, 13871, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13875, 13879, 13883, 0, 13887, 13890,
- 13894, 13897, 13901, 13904, 13908, 13912, 0, 0, 13916, 13919, 0, 0,
- 13923, 13926, 13930, 13933, 13937, 13941, 13945, 13949, 13953, 13957,
- 13961, 13965, 13969, 13973, 13977, 13981, 13985, 13989, 13993, 13997,
- 14001, 14005, 0, 14008, 14011, 14015, 14019, 14023, 14026, 14029, 0,
- 14032, 14036, 0, 14040, 14044, 14048, 14052, 14055, 0, 0, 14058, 14062,
- 14066, 14071, 14075, 14080, 14084, 14089, 14094, 0, 0, 14100, 14104, 0,
- 0, 14109, 14113, 14118, 0, 0, 0, 0, 0, 0, 0, 0, 14122, 14128, 0, 0, 0, 0,
- 14134, 14138, 0, 14142, 14146, 14151, 14156, 14161, 0, 0, 14167, 14171,
- 14174, 14177, 14180, 14183, 14186, 14189, 14192, 14195, 14198, 14201,
- 14205, 14211, 14217, 14223, 14229, 14235, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 14241, 14245, 0, 14249, 14252, 14256, 14259, 14263, 14266, 0, 0, 0,
- 14270, 14273, 14277, 0, 14281, 14284, 14288, 14292, 0, 0, 0, 14295,
- 14299, 0, 14303, 0, 14307, 14311, 0, 0, 0, 14315, 14319, 0, 0, 0, 14323,
- 14326, 14330, 0, 0, 0, 14333, 14336, 14339, 14342, 14346, 14350, 14354,
- 14358, 14362, 14366, 14370, 14373, 0, 0, 0, 0, 14376, 14381, 14385,
- 14390, 14394, 0, 0, 0, 14399, 14403, 14408, 0, 14413, 14417, 14422,
- 14427, 0, 0, 14431, 0, 0, 0, 0, 0, 0, 14434, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 14440, 14444, 14447, 14450, 14453, 14456, 14459, 14462,
- 14465, 14468, 14471, 14475, 14480, 14485, 14489, 14493, 14497, 14501,
- 14505, 14510, 14514, 0, 0, 0, 0, 0, 0, 14517, 14521, 14525, 0, 14529,
- 14532, 14536, 14539, 14543, 14546, 14550, 14554, 0, 14558, 14561, 14565,
- 0, 14569, 14572, 14576, 14580, 14583, 14587, 14591, 14595, 14599, 14603,
- 14607, 14611, 14615, 14619, 14623, 14627, 14631, 14635, 14639, 14643,
- 14647, 14651, 14655, 0, 14658, 14661, 14665, 14669, 14673, 14676, 14679,
- 14682, 14686, 14690, 0, 14694, 14698, 14702, 14706, 14709, 0, 0, 0,
- 14712, 14716, 14721, 14725, 14730, 14734, 14739, 14744, 0, 14750, 14754,
- 14759, 0, 14764, 14768, 14773, 14778, 0, 0, 0, 0, 0, 0, 0, 14782, 14786,
- 0, 14792, 14796, 0, 0, 0, 0, 0, 0, 14800, 14805, 14810, 14815, 0, 0,
- 14821, 14825, 14828, 14831, 14834, 14837, 14840, 14843, 14846, 14849, 0,
- 0, 0, 0, 0, 0, 0, 0, 14852, 14865, 14877, 14889, 14901, 14913, 14925,
- 14937, 0, 0, 14941, 14945, 0, 14949, 14952, 14956, 14959, 14963, 14966,
- 14970, 14974, 0, 14978, 14981, 14985, 0, 14989, 14992, 14996, 15000,
- 15003, 15007, 15011, 15015, 15019, 15023, 15027, 15031, 15035, 15039,
- 15043, 15047, 15051, 15055, 15059, 15063, 15067, 15071, 15075, 0, 15078,
- 15081, 15085, 15089, 15093, 15096, 15099, 15102, 15106, 15110, 0, 15114,
- 15118, 15122, 15126, 15129, 0, 0, 15132, 15136, 15140, 15145, 15149,
- 15154, 15158, 15163, 15168, 0, 15174, 15178, 15183, 0, 15188, 15192,
- 15197, 15202, 0, 0, 0, 0, 0, 0, 0, 15206, 15210, 0, 0, 0, 0, 0, 0, 0,
- 15216, 0, 15220, 15225, 15230, 15235, 0, 0, 15241, 15245, 15248, 15251,
- 15254, 15257, 15260, 15263, 15266, 15269, 0, 15272, 15276, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15280, 15284, 0, 15288, 15291, 15295,
- 15298, 15302, 15305, 15309, 15313, 0, 15317, 15320, 15324, 0, 15328,
- 15331, 15335, 15339, 15342, 15346, 15350, 15354, 15358, 15362, 15366,
- 15370, 15374, 15378, 15382, 15386, 15390, 15394, 15398, 15402, 15406,
- 15410, 15414, 15417, 15421, 15424, 15428, 15432, 15436, 15439, 15442,
- 15445, 15449, 15453, 15457, 15461, 15465, 15469, 15473, 15476, 15479, 0,
- 0, 15483, 15487, 15492, 15496, 15501, 15505, 15510, 15515, 0, 15521,
- 15525, 15530, 0, 15535, 15539, 15544, 15549, 15553, 0, 0, 0, 0, 0, 0, 0,
- 0, 15558, 0, 0, 0, 0, 0, 0, 0, 0, 15564, 15569, 15574, 15579, 0, 0,
- 15585, 15589, 15592, 15595, 15598, 15601, 15604, 15607, 15610, 15613,
- 15616, 15620, 15625, 15630, 15636, 15642, 0, 0, 0, 15648, 15652, 15658,
- 15664, 15670, 15675, 15681, 0, 0, 15687, 15691, 0, 15695, 15699, 15703,
- 15707, 15711, 15715, 15719, 15723, 15727, 15731, 15735, 15739, 15743,
- 15747, 15751, 15755, 15759, 15763, 0, 0, 0, 15767, 15773, 15779, 15785,
- 15791, 15797, 15803, 15809, 15815, 15821, 15827, 15833, 15841, 15847,
- 15853, 15859, 15865, 15871, 15877, 15883, 15889, 15895, 15901, 15907, 0,
- 15913, 15919, 15925, 15931, 15937, 15943, 15947, 15953, 15957, 0, 15961,
- 0, 0, 15967, 15971, 15977, 15983, 15989, 15993, 15999, 0, 0, 0, 16003, 0,
- 0, 0, 0, 16007, 16012, 16019, 16026, 16033, 16040, 0, 16047, 0, 16054,
- 16059, 16064, 16071, 16078, 16087, 16098, 16107, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16112, 16119, 16126, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 16131, 16137, 16143, 16149, 16155, 16161, 16167, 16173,
- 16179, 16185, 16191, 16197, 16203, 16209, 16215, 16221, 16227, 16233,
- 16239, 16245, 16251, 16257, 16263, 16269, 16275, 16281, 16287, 16293,
- 16299, 16305, 16311, 16317, 16323, 16328, 16334, 16340, 16344, 16350,
- 16354, 16360, 16366, 16372, 16378, 16384, 16390, 16395, 16401, 16405,
- 16410, 16416, 16422, 16428, 16433, 16439, 16445, 16451, 16456, 16462, 0,
- 0, 0, 0, 16466, 16472, 16477, 16483, 16488, 16496, 16504, 16508, 16512,
- 16516, 16522, 16528, 16534, 16540, 16544, 16548, 16552, 16556, 16560,
- 16563, 16566, 16569, 16572, 16575, 16578, 16581, 16584, 16587, 16591, 0,
+ 0, 33469, 33477, 33485, 33493, 33501, 33511, 33521, 33531, 0, 0, 0, 0, 0,
+ 0, 0, 0, 33541, 33546, 33551, 33556, 33561, 33570, 33581, 33590, 33601,
+ 33607, 33620, 33626, 33633, 33640, 33645, 33651, 33657, 33668, 33677,
+ 33684, 33691, 33700, 33707, 33716, 33726, 33736, 33743, 33750, 33757,
+ 33767, 33772, 33780, 33786, 33794, 33803, 33808, 33815, 33821, 33826, 0,
+ 33831, 33837, 0, 0, 0, 0, 0, 0, 33844, 33849, 33855, 33862, 33870, 33876,
+ 33882, 33888, 33893, 33900, 33906, 33912, 33918, 33926, 33932, 33940,
+ 33945, 33951, 33957, 33964, 33972, 33979, 33985, 33992, 33999, 34005,
+ 34012, 34019, 34025, 34030, 34036, 34044, 34053, 34059, 34065, 34071,
+ 34077, 34085, 34089, 34095, 34101, 34107, 34113, 34119, 34125, 34129,
+ 34134, 34139, 34146, 34151, 34155, 34161, 34166, 34171, 34175, 34180,
+ 34185, 34189, 34194, 34199, 34206, 34210, 34215, 34220, 34224, 34229,
+ 34233, 34238, 34242, 34248, 34253, 34260, 34265, 34270, 34274, 34279,
+ 34284, 34291, 34296, 34302, 34307, 34312, 34317, 34321, 34326, 34333,
+ 34340, 34345, 34350, 34354, 34360, 34367, 34372, 34377, 34382, 34388,
+ 34393, 34399, 34404, 34410, 34416, 34422, 34429, 34436, 34443, 34450,
+ 34457, 34464, 34469, 34477, 34486, 34495, 34504, 34513, 34522, 34531,
+ 34543, 34552, 34561, 34570, 34577, 34582, 34589, 34597, 34605, 34612,
+ 34619, 34626, 34633, 34641, 34650, 34659, 34668, 34677, 34686, 34695,
+ 34704, 34713, 34722, 34731, 34740, 34749, 34758, 34767, 34775, 34784,
+ 34795, 34803, 34812, 34823, 34832, 34841, 34850, 34859, 34867, 34876,
+ 34883, 34888, 34896, 34901, 34908, 34913, 34922, 34928, 34935, 34942,
+ 34947, 34952, 34960, 34968, 34977, 34986, 34991, 34998, 35009, 35017,
+ 35026, 35032, 35038, 35043, 35050, 35055, 35064, 35069, 35074, 35079,
+ 35086, 35093, 35098, 35107, 35115, 35120, 35125, 35132, 35139, 35143,
+ 35147, 35150, 35153, 35156, 35159, 35162, 35165, 35172, 35175, 35178,
+ 35183, 35187, 35191, 35195, 35199, 35203, 35212, 35218, 35224, 35230,
+ 35238, 35246, 35252, 35258, 35265, 35271, 35276, 35282, 35289, 35295,
+ 35302, 35308, 35316, 35321, 35327, 35333, 35339, 35345, 35351, 35357,
+ 35363, 35374, 35384, 35390, 35396, 35406, 35412, 35420, 35428, 35436, 0,
+ 0, 0, 0, 0, 0, 35441, 35448, 35455, 35460, 35469, 35477, 35485, 35492,
+ 35499, 35506, 35513, 35521, 35529, 35539, 35549, 35557, 35565, 35573,
+ 35581, 35590, 35599, 35607, 35615, 35624, 35633, 35643, 35653, 35662,
+ 35671, 35679, 35687, 35695, 35703, 35713, 35723, 35731, 35739, 35747,
+ 35755, 35763, 35771, 35779, 35787, 35795, 35803, 35811, 35819, 35828,
+ 35837, 35846, 35855, 35865, 35875, 35882, 35889, 35897, 35905, 35914,
+ 35923, 35931, 35939, 35951, 35963, 35972, 35981, 35990, 35999, 36006,
+ 36013, 36021, 36029, 36037, 36045, 36053, 36061, 36069, 36077, 36086,
+ 36095, 36104, 36113, 36122, 36131, 36141, 36151, 36161, 36171, 36180,
+ 36189, 36196, 36203, 36211, 36219, 36227, 36235, 36243, 36251, 36263,
+ 36275, 36284, 36293, 36301, 36309, 36317, 36325, 36336, 36347, 36358,
+ 36369, 36381, 36393, 36401, 36409, 36417, 36425, 36434, 36443, 36452,
+ 36461, 36469, 36477, 36485, 36493, 36501, 36509, 36518, 36527, 36537,
+ 36547, 36555, 36563, 36571, 36579, 36587, 36595, 36602, 36609, 36617,
+ 36625, 36633, 36641, 36649, 36657, 36665, 36673, 36681, 36689, 36697,
+ 36705, 36713, 36721, 36729, 36737, 36746, 36755, 36764, 36772, 36781,
+ 36790, 36799, 36808, 36818, 36827, 36833, 36838, 36845, 36852, 36860,
+ 36868, 36877, 36886, 36896, 36906, 36917, 36928, 36938, 36948, 36958,
+ 36968, 36977, 36986, 36996, 37006, 37017, 37028, 37038, 37048, 37058,
+ 37068, 37075, 37082, 37090, 37098, 37105, 37112, 37121, 37130, 37140,
+ 37150, 37161, 37172, 37182, 37192, 37202, 37212, 37221, 37230, 37238,
+ 37246, 37253, 37260, 37268, 37276, 37285, 37294, 37304, 37314, 37325,
+ 37336, 37346, 37356, 37366, 37376, 37385, 37394, 37404, 37414, 37425,
+ 37436, 37446, 37456, 37466, 37476, 37483, 37490, 37498, 37506, 37515,
+ 37524, 37534, 37544, 37555, 37566, 37576, 37586, 37596, 37606, 37614,
+ 37622, 37630, 37638, 37647, 37656, 37664, 37672, 37679, 37686, 37693,
+ 37700, 37708, 37716, 37724, 37732, 37743, 37754, 37765, 37776, 37787,
+ 37798, 37806, 37814, 37825, 37836, 37847, 37858, 37869, 37880, 37888,
+ 37896, 37907, 37918, 37929, 0, 0, 37940, 37948, 37956, 37967, 37978,
+ 37989, 0, 0, 38000, 38008, 38016, 38027, 38038, 38049, 38060, 38071,
+ 38082, 38090, 38098, 38109, 38120, 38131, 38142, 38153, 38164, 38172,
+ 38180, 38191, 38202, 38213, 38224, 38235, 38246, 38254, 38262, 38273,
+ 38284, 38295, 38306, 38317, 38328, 38336, 38344, 38355, 38366, 38377, 0,
+ 0, 38388, 38396, 38404, 38415, 38426, 38437, 0, 0, 38448, 38456, 38464,
+ 38475, 38486, 38497, 38508, 38519, 0, 38530, 0, 38538, 0, 38549, 0,
+ 38560, 38571, 38579, 38587, 38598, 38609, 38620, 38631, 38642, 38653,
+ 38661, 38669, 38680, 38691, 38702, 38713, 38724, 38735, 38743, 38751,
+ 38759, 38767, 38775, 38783, 38791, 38799, 38807, 38815, 38823, 38831,
+ 38839, 0, 0, 38847, 38858, 38869, 38883, 38897, 38911, 38925, 38939,
+ 38953, 38964, 38975, 38989, 39003, 39017, 39031, 39045, 39059, 39070,
+ 39081, 39095, 39109, 39123, 39137, 39151, 39165, 39176, 39187, 39201,
+ 39215, 39229, 39243, 39257, 39271, 39282, 39293, 39307, 39321, 39335,
+ 39349, 39363, 39377, 39388, 39399, 39413, 39427, 39441, 39455, 39469,
+ 39483, 39491, 39499, 39510, 39518, 0, 39529, 39537, 39548, 39556, 39564,
+ 39572, 39580, 39588, 39591, 39594, 39597, 39600, 39606, 39617, 39625, 0,
+ 39636, 39644, 39655, 39663, 39671, 39679, 39687, 39695, 39701, 39707,
+ 39713, 39721, 39729, 39740, 0, 0, 39751, 39759, 39770, 39778, 39786,
+ 39794, 0, 39802, 39808, 39814, 39820, 39828, 39836, 39847, 39858, 39866,
+ 39874, 39882, 39893, 39901, 39909, 39917, 39925, 39933, 39939, 39945, 0,
+ 0, 39948, 39959, 39967, 0, 39978, 39986, 39997, 40005, 40013, 40021,
+ 40029, 40037, 40040, 0, 40043, 40047, 40051, 40055, 40059, 40063, 40067,
+ 40071, 40075, 40079, 40083, 40087, 40093, 40099, 40105, 40108, 40111,
+ 40113, 40117, 40121, 40125, 40129, 40132, 40136, 40140, 40146, 40152,
+ 40159, 40166, 40171, 40176, 40182, 40188, 40190, 40193, 40195, 40199,
+ 40203, 40207, 40211, 40215, 40219, 40223, 40227, 40231, 40237, 40241,
+ 40245, 40251, 40256, 40263, 40265, 40268, 40272, 40276, 40281, 40287,
+ 40289, 40298, 40307, 40310, 40314, 40316, 40318, 40320, 40323, 40329,
+ 40331, 40335, 40339, 40346, 40353, 40357, 40362, 40367, 40372, 40377,
+ 40381, 40385, 40388, 40392, 40396, 40403, 40408, 40412, 40416, 40421,
+ 40425, 40429, 40434, 40439, 40443, 40447, 40451, 40453, 40458, 40463,
+ 40467, 40471, 40475, 40479, 0, 40483, 40487, 40491, 40497, 40503, 40509,
+ 40515, 40522, 40529, 40534, 40539, 40543, 0, 0, 40549, 40552, 40555,
+ 40558, 40562, 40565, 40569, 40573, 40577, 40582, 40587, 40592, 40599,
+ 40603, 40606, 40609, 40612, 40615, 40618, 40621, 40625, 40628, 40632,
+ 40636, 40640, 40645, 40650, 0, 40655, 40661, 40667, 40673, 40680, 40687,
+ 40694, 40701, 40707, 40714, 40721, 40728, 40734, 0, 0, 0, 40741, 40744,
+ 40747, 40750, 40755, 40758, 40761, 40764, 40767, 40770, 40773, 40778,
+ 40781, 40784, 40787, 40790, 40793, 40798, 40801, 40804, 40807, 40810,
+ 40813, 40818, 40821, 40824, 40829, 40834, 40838, 40841, 40844, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40847, 40852, 40857, 40864,
+ 40872, 40877, 40882, 40886, 40890, 40895, 40902, 40909, 40913, 40918,
+ 40923, 40928, 40933, 40940, 40945, 40950, 40955, 40964, 40971, 40978,
+ 40982, 40987, 40993, 40998, 41005, 41013, 41021, 41025, 41029, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41033, 41037, 41045, 41049, 41053,
+ 41058, 41062, 41066, 41070, 41072, 41076, 41080, 41084, 41089, 41093,
+ 41097, 41105, 41108, 41112, 41115, 41118, 41124, 41128, 41131, 41137,
+ 41141, 41145, 41149, 41152, 41156, 41159, 41163, 41165, 41168, 41171,
+ 41175, 41177, 41181, 41184, 41187, 41192, 41197, 41204, 41207, 41210,
+ 41214, 41219, 41222, 41225, 41228, 41232, 41237, 41241, 41244, 41246,
+ 41249, 41252, 41255, 41259, 41264, 41267, 41271, 41275, 41279, 41283,
+ 41288, 41294, 41299, 41304, 41310, 41315, 41320, 41324, 41328, 41333,
+ 41337, 41341, 41344, 41346, 41351, 41357, 41364, 41371, 41378, 41385,
+ 41392, 41399, 41406, 41413, 41421, 41428, 41436, 41443, 41450, 41458,
+ 41466, 41471, 41476, 41481, 41486, 41491, 41496, 41501, 41507, 41512,
+ 41518, 41524, 41530, 41536, 41542, 41549, 41557, 41564, 41570, 41576,
+ 41582, 41588, 41594, 41600, 41607, 41613, 41620, 41627, 41634, 41641,
+ 41648, 41656, 41665, 41673, 41684, 41692, 41700, 41709, 41716, 41725,
+ 41734, 41742, 41751, 41759, 41763, 0, 0, 0, 0, 41767, 41769, 41771,
+ 41773, 41775, 41778, 41781, 41785, 41789, 41794, 41799, 41803, 41807,
+ 41811, 41815, 41820, 41825, 41830, 41835, 41840, 41845, 41850, 41855,
+ 41860, 41865, 41871, 41875, 41879, 41884, 41889, 41894, 41899, 41903,
+ 41910, 41917, 41924, 41931, 41938, 41945, 41952, 41959, 41967, 41979,
+ 41985, 41991, 41998, 42005, 42012, 42019, 42026, 42033, 42040, 42047,
+ 42052, 42058, 42063, 42068, 42073, 42078, 42083, 42090, 42097, 42102,
+ 42108, 42113, 42116, 42119, 42122, 42125, 42129, 42133, 42138, 42143,
+ 42149, 42155, 42159, 42163, 42167, 42171, 42176, 42181, 42185, 42189,
+ 42193, 42197, 42202, 42207, 42210, 42213, 42216, 42219, 42225, 42232,
+ 42243, 42253, 42257, 42265, 42272, 42280, 42289, 42293, 42299, 42305,
+ 42309, 42314, 42319, 42325, 42331, 42337, 42344, 42348, 42352, 42357,
+ 42360, 42362, 42366, 42370, 42378, 42382, 42384, 42386, 42390, 42398,
+ 42403, 42409, 42419, 42426, 42431, 42435, 42439, 42443, 42446, 42449,
+ 42452, 42456, 42460, 42464, 42468, 42472, 42475, 42479, 42483, 42486,
+ 42488, 42491, 42493, 42497, 42501, 42503, 42509, 42512, 42517, 42521,
+ 42525, 42527, 42529, 42531, 42534, 42538, 42542, 42546, 42550, 42554,
+ 42560, 42566, 42568, 42570, 42572, 42574, 42577, 42579, 42583, 42585,
+ 42589, 42593, 42598, 42602, 42606, 42610, 42614, 42618, 42624, 42628,
+ 42638, 42648, 42652, 42658, 42665, 42669, 42673, 42676, 42681, 42685,
+ 42691, 42695, 42708, 42717, 42721, 42725, 42731, 42735, 42738, 42740,
+ 42743, 42747, 42751, 42758, 42762, 42766, 42770, 42773, 42778, 42783,
+ 42789, 42795, 42800, 42805, 42813, 42821, 42825, 42829, 42831, 42836,
+ 42840, 42844, 42852, 42860, 42867, 42874, 42883, 42892, 42898, 42904,
+ 42912, 42920, 42922, 42924, 42930, 42936, 42943, 42950, 42956, 42962,
+ 42966, 42970, 42977, 42984, 42991, 42998, 43008, 43018, 43026, 43034,
+ 43036, 43040, 43044, 43049, 43054, 43062, 43070, 43073, 43076, 43079,
+ 43082, 43085, 43090, 43094, 43099, 43104, 43107, 43110, 43113, 43116,
+ 43119, 43123, 43126, 43129, 43132, 43135, 43137, 43139, 43141, 43143,
+ 43151, 43159, 43165, 43169, 43175, 43185, 43191, 43197, 43203, 43211,
+ 43220, 43232, 43236, 43240, 43242, 43248, 43250, 43252, 43254, 43256,
+ 43262, 43265, 43271, 43277, 43281, 43285, 43289, 43292, 43296, 43300,
+ 43302, 43311, 43320, 43325, 43330, 43336, 43342, 43348, 43351, 43354,
+ 43357, 43360, 43362, 43367, 43372, 43377, 43383, 43389, 43398, 43407,
+ 43414, 43421, 43428, 43435, 43445, 43455, 43465, 43475, 43485, 43495,
+ 43504, 43513, 43522, 43531, 43539, 43551, 43562, 43578, 43581, 43587,
+ 43593, 43599, 43607, 43622, 43638, 43644, 43650, 43657, 43663, 43672,
+ 43679, 43693, 43708, 43713, 43719, 43727, 43730, 43733, 43735, 43738,
+ 43741, 43743, 43745, 43749, 43752, 43755, 43758, 43761, 43766, 43771,
+ 43776, 43781, 43786, 43789, 43791, 43793, 43795, 43799, 43803, 43807,
+ 43813, 43818, 43820, 43822, 43827, 43832, 43837, 43842, 43847, 43852,
+ 43854, 43856, 43866, 43870, 43878, 43887, 43889, 43894, 43899, 43907,
+ 43911, 43913, 43917, 43919, 43923, 43927, 43931, 43933, 43935, 43937,
+ 43944, 43953, 43962, 43971, 43980, 43989, 43998, 44007, 44016, 44024,
+ 44032, 44041, 44050, 44059, 44068, 44076, 44084, 44093, 44102, 44111,
+ 44121, 44130, 44140, 44149, 44159, 44167, 44176, 44186, 44195, 44205,
+ 44214, 44224, 44232, 44241, 44250, 44259, 44268, 44277, 44286, 44296,
+ 44305, 44314, 44323, 44333, 44342, 44351, 44360, 44369, 44379, 44389,
+ 44398, 44407, 44415, 44424, 44431, 44440, 44449, 44460, 44469, 44479,
+ 44489, 44496, 44503, 44510, 44519, 44528, 44537, 44546, 44553, 44558,
+ 44566, 44571, 44574, 44581, 44584, 44589, 44594, 44597, 44600, 44608,
+ 44611, 44616, 44619, 44627, 44632, 44640, 44643, 44646, 44649, 44654,
+ 44659, 44662, 44665, 44673, 44676, 44683, 44690, 44694, 44698, 44703,
+ 44708, 44714, 44719, 44725, 44731, 44736, 44742, 44750, 44756, 44764,
+ 44772, 44778, 44786, 44794, 44802, 44810, 44816, 44824, 44832, 44840,
+ 44844, 44850, 44864, 44878, 44882, 44886, 44890, 44894, 44904, 44908,
+ 44913, 44918, 44924, 44930, 44936, 44942, 44952, 44962, 44970, 44981,
+ 44992, 45000, 45011, 45022, 45030, 45041, 45052, 45060, 45068, 45078,
+ 45088, 45091, 45094, 45097, 45102, 45106, 45112, 45119, 45126, 45134,
+ 45141, 45145, 45149, 45153, 45157, 45159, 45163, 45167, 45172, 45177,
+ 45184, 45191, 45194, 45201, 45203, 45205, 45209, 45213, 45218, 45224,
+ 45230, 45236, 45242, 45251, 45260, 45269, 45273, 45275, 45279, 45286,
+ 45293, 45300, 45307, 45314, 45317, 45322, 0, 0, 0, 0, 0, 45328, 45332,
+ 45339, 45346, 45353, 45360, 45364, 45368, 45372, 45376, 45382, 45388,
+ 45393, 45399, 45405, 45411, 45417, 45425, 45432, 45439, 45446, 45453,
+ 45458, 45464, 45473, 45477, 45484, 45488, 45492, 45498, 45504, 45510,
+ 45516, 45520, 45524, 45527, 45530, 45534, 45541, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45548, 45551, 45555,
+ 45559, 45565, 45571, 45577, 45585, 45592, 45596, 45604, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45609, 45612, 45615, 45618,
+ 45621, 45624, 45627, 45631, 45634, 45638, 45642, 45646, 45650, 45654,
+ 45658, 45662, 45666, 45670, 45674, 45678, 45682, 45685, 45688, 45691,
+ 45694, 45697, 45700, 45704, 45707, 45711, 45715, 45719, 45723, 45727,
+ 45731, 45735, 45739, 45743, 45747, 45751, 45755, 45761, 45767, 45773,
+ 45780, 45787, 45794, 45801, 45808, 45815, 45822, 45829, 45836, 45843,
+ 45850, 45857, 45864, 45871, 45878, 45885, 45892, 45897, 45903, 45909,
+ 45915, 45920, 45926, 45932, 45938, 45943, 45949, 45955, 45960, 45966,
+ 45972, 45977, 45983, 45989, 45994, 45999, 46005, 46010, 46016, 46022,
+ 46028, 46034, 46040, 46045, 46051, 46057, 46063, 46068, 46074, 46080,
+ 46086, 46091, 46097, 46103, 46108, 46114, 46120, 46125, 46131, 46137,
+ 46142, 46147, 46153, 46158, 46164, 46170, 46176, 46182, 46188, 46193,
+ 46199, 46205, 46211, 46216, 46222, 46228, 46234, 46239, 46245, 46251,
+ 46256, 46262, 46268, 46273, 46279, 46285, 46290, 46295, 46301, 46306,
+ 46312, 46318, 46324, 46330, 46336, 46340, 46345, 46350, 46355, 46360,
+ 46365, 46370, 46375, 46380, 46385, 46390, 46394, 46398, 46402, 46406,
+ 46410, 46414, 46419, 46423, 46428, 46433, 46438, 46443, 46448, 46453,
+ 46458, 46467, 46476, 46485, 46494, 46503, 46512, 46521, 46530, 46537,
+ 46545, 46553, 46560, 46567, 46575, 46583, 46590, 46597, 46605, 46613,
+ 46620, 46627, 46635, 46643, 46650, 46657, 46665, 46674, 46683, 46691,
+ 46700, 46709, 46716, 46723, 46731, 46740, 46749, 46757, 46766, 46775,
+ 46782, 46789, 46798, 46807, 46816, 46825, 46834, 46843, 46850, 46857,
+ 46866, 46875, 46884, 46893, 46902, 46911, 46918, 46925, 46934, 46943,
+ 46952, 46962, 46972, 46981, 46991, 47001, 47011, 47021, 47031, 47041,
+ 47050, 47059, 47066, 47074, 47082, 47090, 47098, 47103, 47108, 47117,
+ 47125, 47132, 47141, 47149, 47156, 47165, 47173, 47180, 47189, 47197,
+ 47204, 47213, 47221, 47228, 47237, 47245, 47252, 47262, 47271, 47278,
+ 47288, 47297, 47304, 47314, 47323, 47330, 47339, 47348, 47357, 47366,
+ 47380, 47394, 47401, 47406, 47411, 47416, 47421, 47426, 47431, 47436,
+ 47441, 47449, 47457, 47465, 47473, 47478, 47485, 47492, 47499, 47504,
+ 47512, 47519, 47527, 47531, 47538, 47544, 47551, 47555, 47561, 47567,
+ 47573, 47577, 47580, 47584, 47588, 47595, 47601, 47607, 47613, 47619,
+ 47633, 47643, 47657, 47671, 47677, 47687, 47701, 47704, 47707, 47714,
+ 47722, 47728, 47733, 47741, 47753, 47765, 47773, 47777, 47781, 47784,
+ 47787, 47791, 47795, 47798, 47801, 47806, 47811, 47817, 47823, 47828,
+ 47833, 47839, 47845, 47850, 47855, 47860, 47865, 47871, 47877, 47882,
+ 47887, 47893, 47899, 47904, 47909, 47912, 47915, 47924, 47926, 47928,
+ 47931, 47935, 47941, 47943, 47946, 47953, 47960, 47968, 47976, 47986,
+ 48000, 48005, 48010, 48014, 48019, 48027, 48035, 48044, 48053, 48062,
+ 48071, 48076, 48081, 48087, 48093, 48099, 48105, 48108, 48114, 48120,
+ 48130, 48140, 48148, 48156, 48165, 48174, 48178, 48186, 48194, 48202,
+ 48210, 48219, 48228, 48237, 48246, 48251, 48256, 48261, 48266, 48271,
+ 48277, 48283, 48288, 48294, 48296, 48298, 48300, 48302, 48305, 48308,
+ 48310, 48312, 48314, 48318, 48322, 48324, 48326, 48329, 48332, 48336,
+ 48342, 48348, 48350, 48357, 48361, 48366, 48371, 48373, 48383, 48389,
+ 48395, 48401, 48407, 48413, 48419, 48424, 48427, 48430, 48433, 48435,
+ 48437, 48441, 48445, 48450, 48455, 48460, 48463, 48467, 48472, 48475,
+ 48479, 48484, 48489, 48494, 48499, 48504, 48509, 48514, 48519, 48524,
+ 48529, 48534, 48539, 48545, 48551, 48557, 48559, 48562, 48564, 48567,
+ 48569, 48571, 48573, 48575, 48577, 48579, 48581, 48583, 48585, 48587,
+ 48589, 48591, 48593, 48595, 48597, 48599, 48601, 48606, 48611, 48616,
+ 48621, 48626, 48631, 48636, 48641, 48646, 48651, 48656, 48661, 48666,
+ 48671, 48676, 48681, 48686, 48691, 48696, 48701, 48705, 48709, 48713,
+ 48719, 48725, 48730, 48735, 48740, 48746, 48752, 48757, 48765, 48773,
+ 48781, 48789, 48797, 48805, 48813, 48821, 48827, 48832, 48837, 48842,
+ 48845, 48849, 48853, 48857, 48861, 48865, 48869, 48876, 48883, 48891,
+ 48899, 48904, 48909, 48916, 48923, 48930, 48937, 48940, 48943, 48948,
+ 48950, 48954, 48959, 48961, 48963, 48965, 48967, 48972, 48975, 48977,
+ 48982, 48989, 48996, 48999, 49003, 49008, 49013, 49021, 49027, 49033,
+ 49045, 49052, 49060, 49065, 49070, 49076, 49079, 49082, 49087, 49089,
+ 49093, 49095, 49097, 49099, 49101, 49103, 49105, 49110, 49112, 49114,
+ 49116, 49118, 49122, 49124, 49127, 49132, 49137, 49142, 49147, 49153,
+ 49159, 49161, 49164, 49171, 49178, 49185, 49192, 49196, 49200, 49202,
+ 49204, 49208, 49214, 49219, 49221, 49225, 49234, 49242, 49250, 49256,
+ 49262, 49267, 49273, 49278, 49281, 49295, 49298, 49303, 49308, 49314,
+ 49324, 49326, 49332, 49338, 49342, 49349, 49353, 49355, 49357, 49361,
+ 49367, 49372, 49378, 49380, 49386, 49388, 49394, 49396, 49398, 49403,
+ 49405, 49409, 49414, 49416, 49421, 49426, 49430, 49437, 49447, 49452,
+ 49458, 49461, 49467, 49470, 49475, 49480, 49484, 49486, 49488, 49492,
+ 49496, 49500, 49504, 49509, 49511, 49516, 49519, 49522, 49525, 49529,
+ 49533, 49538, 49542, 49547, 49552, 49556, 49561, 49567, 49570, 49576,
+ 49581, 49585, 49590, 49596, 49602, 49609, 49615, 49622, 49629, 49631,
+ 49638, 49642, 49648, 49654, 49659, 49665, 49669, 49674, 49677, 49682,
+ 49688, 49695, 49703, 49710, 49719, 49729, 49736, 49742, 49746, 49753,
+ 49758, 49767, 49770, 49773, 49782, 49792, 49799, 49801, 49807, 49812,
+ 49814, 49817, 49821, 49829, 49838, 49841, 49846, 49851, 49859, 49867,
+ 49875, 49883, 49889, 49895, 49901, 49909, 49914, 49917, 49921, 49924,
+ 49936, 49946, 49957, 49966, 49977, 49987, 49996, 50002, 50010, 50014,
+ 50022, 50026, 50034, 50041, 50048, 50057, 50066, 50076, 50086, 50096,
+ 50106, 50115, 50124, 50134, 50144, 50153, 50162, 50168, 50174, 50180,
+ 50186, 50192, 50198, 50205, 50211, 50218, 50225, 50231, 50237, 50243,
+ 50249, 50255, 50261, 50268, 50274, 50281, 50288, 50295, 50302, 50309,
+ 50316, 50323, 50330, 50338, 50345, 50353, 50361, 50366, 50369, 50373,
+ 50377, 50383, 50386, 50391, 50397, 50402, 50406, 50411, 50417, 50424,
+ 50427, 50434, 50441, 50445, 50453, 50461, 50466, 50472, 50477, 50482,
+ 50489, 50496, 50504, 50512, 50521, 50525, 50534, 50539, 50543, 50550,
+ 50554, 50560, 50568, 50573, 50580, 50584, 50589, 50593, 50598, 50602,
+ 50607, 50612, 50621, 50623, 50626, 50629, 50636, 50643, 50649, 50657,
+ 50663, 50670, 50675, 50678, 50683, 50688, 50693, 50701, 50705, 50712,
+ 50720, 50728, 50733, 50738, 50744, 50749, 50754, 50760, 50765, 50768,
+ 50772, 50776, 50783, 50793, 50798, 50807, 50816, 50822, 50828, 50833,
+ 50838, 50843, 50848, 50854, 50860, 50868, 50876, 50882, 50888, 50892,
+ 50896, 50903, 50910, 50916, 50919, 50922, 50926, 50930, 50934, 50939,
+ 50945, 50951, 50958, 50965, 50970, 50974, 50978, 50982, 50986, 50990,
+ 50994, 50998, 51002, 51006, 51010, 51014, 51018, 51022, 51026, 51030,
+ 51034, 51038, 51042, 51046, 51050, 51054, 51058, 51062, 51066, 51070,
+ 51074, 51078, 51082, 51086, 51090, 51094, 51098, 51102, 51106, 51110,
+ 51114, 51118, 51122, 51126, 51130, 51134, 51138, 51142, 51146, 51150,
+ 51154, 51158, 51162, 51166, 51170, 51174, 51178, 51182, 51186, 51190,
+ 51194, 51198, 51202, 51206, 51210, 51214, 51218, 51222, 51226, 51230,
+ 51234, 51238, 51242, 51246, 51250, 51254, 51258, 51262, 51266, 51270,
+ 51274, 51278, 51282, 51286, 51290, 51294, 51298, 51302, 51306, 51310,
+ 51314, 51318, 51322, 51326, 51330, 51334, 51338, 51342, 51346, 51350,
+ 51354, 51358, 51362, 51366, 51370, 51374, 51378, 51382, 51386, 51390,
+ 51394, 51398, 51402, 51406, 51410, 51414, 51418, 51422, 51426, 51430,
+ 51434, 51438, 51442, 51446, 51450, 51454, 51458, 51462, 51466, 51470,
+ 51474, 51478, 51482, 51486, 51490, 51494, 51498, 51502, 51506, 51510,
+ 51514, 51518, 51522, 51526, 51530, 51534, 51538, 51542, 51546, 51550,
+ 51554, 51558, 51562, 51566, 51570, 51574, 51578, 51582, 51586, 51590,
+ 51594, 51598, 51602, 51606, 51610, 51614, 51618, 51622, 51626, 51630,
+ 51634, 51638, 51642, 51646, 51650, 51654, 51658, 51662, 51666, 51670,
+ 51674, 51678, 51682, 51686, 51690, 51694, 51698, 51702, 51706, 51710,
+ 51714, 51718, 51722, 51726, 51730, 51734, 51738, 51742, 51746, 51750,
+ 51754, 51758, 51762, 51766, 51770, 51774, 51778, 51782, 51786, 51790,
+ 51794, 51798, 51802, 51806, 51810, 51814, 51818, 51822, 51826, 51830,
+ 51834, 51838, 51842, 51846, 51850, 51854, 51858, 51862, 51866, 51870,
+ 51874, 51878, 51882, 51886, 51890, 51894, 51898, 51902, 51906, 51910,
+ 51914, 51918, 51922, 51926, 51930, 51934, 51938, 51942, 51946, 51950,
+ 51954, 51958, 51962, 51966, 51970, 51974, 51978, 51982, 51986, 51990,
+ 51994, 52001, 52009, 52015, 52021, 52028, 52035, 52041, 52047, 52053,
+ 52059, 52063, 52067, 52072, 52077, 52083, 52089, 52097, 52104, 52109,
+ 52114, 52122, 52131, 52138, 52148, 52159, 52162, 52165, 52169, 52173,
+ 52180, 52187, 52198, 52209, 52218, 52227, 52233, 52239, 52246, 52253,
+ 52262, 52272, 52283, 52293, 52303, 52313, 52324, 52335, 52345, 52356,
+ 52366, 52376, 52385, 52395, 52405, 52415, 52425, 52432, 52439, 52446,
+ 52453, 52463, 52473, 52481, 52489, 52496, 52503, 52510, 52517, 52524,
+ 52529, 52534, 52540, 52548, 52557, 52565, 52573, 52581, 52589, 52597,
+ 52605, 52613, 52621, 52630, 52639, 52648, 52657, 52666, 52675, 52684,
+ 52693, 52702, 52711, 52720, 52729, 52738, 52747, 52756, 52765, 52779,
+ 52794, 52808, 52823, 52837, 52851, 52865, 52879, 52889, 52900, 52910,
+ 52921, 52936, 52951, 52959, 52965, 52972, 52979, 52986, 52993, 52998,
+ 53004, 53009, 53014, 53020, 53025, 53030, 53035, 53040, 53045, 53052,
+ 53058, 53066, 53071, 53076, 53080, 53084, 53092, 53100, 53108, 53116,
+ 53123, 53130, 53143, 53156, 53169, 53182, 53190, 53198, 53204, 53210,
+ 53217, 53224, 53231, 53238, 53242, 53247, 53255, 53263, 53271, 53278,
+ 53282, 53290, 53298, 53302, 53306, 53311, 53318, 53326, 53334, 53353,
+ 53372, 53391, 53410, 53429, 53448, 53467, 53486, 53492, 53499, 53508,
+ 53516, 53524, 53530, 53533, 53536, 53541, 53544, 53564, 53571, 53577,
+ 53583, 53587, 53590, 53593, 53596, 53608, 53622, 53629, 53636, 53639,
+ 53643, 53646, 53651, 53656, 53661, 53667, 53676, 53683, 53690, 53698,
+ 53705, 53712, 53715, 53721, 53727, 53730, 53733, 53738, 53743, 53749,
+ 53755, 53759, 53764, 53771, 53775, 53781, 53785, 53789, 53797, 53809,
+ 53818, 53822, 53824, 53833, 53842, 53848, 53851, 53857, 53863, 53868,
+ 53873, 53878, 53883, 53888, 53893, 53895, 53901, 53906, 53914, 53918,
+ 53924, 53927, 53931, 53938, 53945, 53947, 53949, 53955, 53961, 53967,
+ 53976, 53985, 53992, 53999, 54005, 54012, 54017, 54022, 54027, 54033,
+ 54039, 54044, 54051, 54055, 54059, 54072, 54085, 54097, 54106, 54112,
+ 54119, 54124, 54129, 54134, 54139, 54144, 54146, 54153, 54161, 54169,
+ 54177, 54184, 54192, 54198, 54203, 54209, 54215, 54221, 54228, 54234,
+ 54242, 54250, 54258, 54266, 54274, 54280, 54286, 54295, 54299, 54308,
+ 54317, 54326, 54334, 54338, 54344, 54351, 54358, 54362, 54368, 54376,
+ 54382, 54387, 54393, 54398, 54403, 54410, 54417, 54422, 54427, 54435,
+ 54443, 54453, 54463, 54470, 54477, 54481, 54485, 54497, 54503, 54510,
+ 54515, 54520, 54527, 54534, 54540, 54546, 54556, 54563, 54571, 54579,
+ 54588, 54595, 54601, 54608, 54614, 54622, 54630, 54638, 54646, 54652,
+ 54657, 54667, 54678, 54685, 54694, 54700, 54705, 54710, 54720, 54727,
+ 54733, 54739, 54747, 54752, 54759, 54766, 54777, 54784, 54791, 54798,
+ 54805, 54812, 54820, 54828, 54841, 54854, 54866, 54878, 54892, 54906,
+ 54912, 54918, 54927, 54936, 54943, 54950, 54959, 54968, 54977, 54986,
+ 54994, 55002, 55012, 55022, 55036, 55050, 55059, 55068, 55081, 55094,
+ 55103, 55112, 55123, 55134, 55140, 55146, 55155, 55164, 55169, 55174,
+ 55182, 55188, 55194, 55202, 55210, 55223, 55236, 55240, 55244, 55252,
+ 55260, 55267, 55275, 55283, 55292, 55301, 55307, 55313, 55320, 55327,
+ 55334, 55341, 55350, 55359, 55362, 55365, 55370, 55375, 55381, 55387,
+ 55394, 55401, 55412, 55423, 55430, 55437, 55445, 55453, 55461, 55469,
+ 55477, 55485, 55491, 55497, 55501, 55505, 55513, 55521, 55526, 55531,
+ 55536, 55541, 55547, 55561, 55568, 55575, 55579, 55581, 55583, 55588,
+ 55593, 55598, 55602, 55610, 55617, 55624, 55632, 55644, 55652, 55660,
+ 55671, 55675, 55679, 55685, 55693, 55706, 55713, 55720, 55727, 55733,
+ 55740, 55749, 55758, 55764, 55770, 55776, 55786, 55796, 55804, 55813,
+ 55818, 55821, 55826, 55831, 55836, 55842, 55848, 55852, 55855, 55858,
+ 55861, 55866, 55871, 55877, 55883, 55887, 55891, 55898, 55905, 55912,
+ 55919, 55926, 55933, 55943, 55953, 55960, 55967, 55975, 55983, 55987,
+ 55992, 55997, 56003, 56009, 56012, 56015, 56018, 56021, 56026, 56031,
+ 56036, 56041, 56046, 56051, 56055, 56059, 56063, 56068, 56073, 56077,
+ 56081, 56087, 56091, 56097, 56102, 56109, 56117, 56124, 56132, 56139,
+ 56147, 56156, 56163, 56173, 56184, 56190, 56199, 56205, 56214, 56223,
+ 56229, 56235, 56239, 56243, 56252, 56261, 56268, 56275, 56284, 56293,
+ 56299, 56305, 56312, 56317, 56321, 56325, 56330, 56335, 56340, 56348,
+ 56356, 56359, 56363, 56372, 56382, 56391, 56401, 56412, 56425, 56429,
+ 56433, 56437, 56441, 56446, 56451, 56457, 56463, 56470, 56477, 56483,
+ 56489, 56495, 56501, 56509, 56517, 56524, 56531, 56538, 0, 0, 56545,
+ 56554, 56563, 56573, 56583, 56592, 56601, 56610, 56619, 56625, 56630,
+ 56639, 56649, 56658, 56668, 56675, 56682, 56689, 56696, 56701, 56706,
+ 56711, 56716, 56724, 56733, 56741, 56750, 56754, 56758, 56762, 56766,
+ 56776, 0, 0, 56779, 56788, 56797, 56806, 56815, 56821, 56827, 56833,
+ 56839, 56849, 56859, 56869, 56879, 56889, 56899, 56909, 56919, 56926,
+ 56933, 56940, 56947, 56954, 56961, 56968, 56975, 56981, 56987, 56993,
+ 56999, 57005, 57011, 57017, 57023, 57034, 0, 0, 0, 57044, 57051, 57054,
+ 57058, 57062, 57067, 57072, 57077, 57080, 57089, 57098, 57107, 0, 57116,
+ 57122, 57128, 57136, 57146, 57153, 57162, 57167, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57170, 57179,
+ 57188, 57197, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57206,
+ 57211, 57216, 57221, 57226, 57231, 57236, 57241, 57246, 57251, 57256,
+ 57262, 57266, 57271, 57276, 57281, 57286, 57291, 57296, 57301, 57306,
+ 57311, 57316, 57321, 57326, 57331, 57336, 57341, 57346, 57351, 57356,
+ 57361, 57366, 57371, 57376, 57382, 57387, 57393, 57402, 57407, 57415,
+ 57422, 57431, 57436, 57441, 57446, 57452, 0, 57459, 57464, 57469, 57474,
+ 57479, 57484, 57489, 57494, 57499, 57504, 57509, 57515, 57519, 57524,
+ 57529, 57534, 57539, 57544, 57549, 57554, 57559, 57564, 57569, 57574,
+ 57579, 57584, 57589, 57594, 57599, 57604, 57609, 57614, 57619, 57624,
+ 57629, 57635, 57640, 57646, 57655, 57660, 57668, 57675, 57684, 57689,
+ 57694, 57699, 57705, 0, 57712, 57720, 57728, 57737, 57744, 57752, 57758,
+ 57767, 57775, 57783, 57791, 57799, 57807, 57815, 57820, 57827, 57833,
+ 57840, 57848, 57855, 57862, 57870, 57876, 57882, 57889, 57896, 57906,
+ 57916, 57923, 57930, 57935, 57945, 57955, 57960, 57965, 57970, 57975,
+ 57980, 57985, 57990, 57995, 58000, 58005, 58010, 58015, 58020, 58025,
+ 58030, 58035, 58040, 58045, 58050, 58055, 58060, 58065, 58070, 58075,
+ 58080, 58085, 58090, 58095, 58100, 58105, 58109, 58113, 58118, 58123,
+ 58128, 58133, 58138, 58143, 58148, 58153, 58158, 58163, 58168, 58173,
+ 58178, 58183, 58188, 58193, 58198, 58203, 58210, 58217, 58224, 58231,
+ 58238, 58245, 58252, 58259, 58266, 58273, 58280, 58287, 58294, 58301,
+ 58306, 58311, 58318, 58325, 58332, 58339, 58346, 58353, 58360, 58367,
+ 58374, 58381, 58388, 58395, 58401, 58407, 58413, 58419, 58426, 58433,
+ 58440, 58447, 58454, 58461, 58468, 58475, 58482, 58489, 58497, 58505,
+ 58513, 58521, 58529, 58537, 58545, 58553, 58557, 58563, 58569, 58573,
+ 58579, 58585, 58591, 58598, 58605, 58612, 58619, 58624, 58630, 58636,
+ 58643, 0, 0, 0, 0, 0, 58650, 58658, 58667, 58676, 58684, 58690, 58695,
+ 58700, 58705, 58710, 58715, 58720, 58725, 58730, 58735, 58740, 58745,
+ 58750, 58755, 58760, 58765, 58770, 58775, 58780, 58785, 58790, 58795,
+ 58800, 58805, 58810, 58815, 58820, 58825, 58830, 58835, 58840, 58845,
+ 58850, 58855, 58860, 58865, 58870, 58875, 58880, 58885, 0, 58890, 0, 0,
+ 0, 0, 0, 58895, 0, 0, 58900, 58904, 58909, 58914, 58919, 58924, 58933,
+ 58938, 58943, 58948, 58953, 58958, 58963, 58968, 58973, 58980, 58985,
+ 58990, 58999, 59006, 59011, 59016, 59021, 59028, 59033, 59040, 59045,
+ 59050, 59057, 59064, 59069, 59074, 59079, 59086, 59093, 59098, 59103,
+ 59108, 59113, 59118, 59125, 59132, 59137, 59142, 59147, 59152, 59157,
+ 59162, 59167, 59172, 59177, 59182, 59187, 59194, 59199, 59204, 0, 0, 0,
+ 0, 0, 0, 0, 59209, 59216, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 59221, 59226, 59230, 59234, 59238, 59242, 59246, 59250, 59254, 59258,
+ 59262, 59266, 59272, 59276, 59280, 59284, 59288, 59292, 59296, 59300,
+ 59304, 59308, 59312, 59316, 0, 0, 0, 0, 0, 0, 0, 0, 0, 59320, 59324,
+ 59328, 59332, 59336, 59340, 59344, 0, 59348, 59352, 59356, 59360, 59364,
+ 59368, 59372, 0, 59376, 59380, 59384, 59388, 59392, 59396, 59400, 0,
+ 59404, 59408, 59412, 59416, 59420, 59424, 59428, 0, 59432, 59436, 59440,
+ 59444, 59448, 59452, 59456, 0, 59460, 59464, 59468, 59472, 59476, 59480,
+ 59484, 0, 59488, 59492, 59496, 59500, 59504, 59508, 59512, 0, 59516,
+ 59520, 59524, 59528, 59532, 59536, 59540, 0, 59544, 59549, 59554, 59559,
+ 59564, 59569, 59574, 59578, 59583, 59588, 59593, 59597, 59602, 59607,
+ 59612, 59617, 59621, 59626, 59631, 59636, 59641, 59646, 59651, 59655,
+ 59660, 59665, 59672, 59677, 59682, 59688, 59695, 59702, 59711, 59718,
+ 59727, 59731, 59735, 59741, 59747, 59753, 59761, 59767, 59771, 59775,
+ 59779, 59785, 59791, 59795, 59797, 59801, 59807, 59809, 59813, 59816,
+ 59819, 59825, 59830, 59834, 59838, 59843, 59849, 59854, 59859, 59864,
+ 59869, 59876, 59883, 59888, 59893, 59898, 59903, 59908, 59913, 59917,
+ 59921, 59928, 59935, 59941, 59945, 59950, 59953, 59957, 59964, 59968,
+ 59972, 59976, 59980, 59986, 59992, 59996, 60002, 60006, 60010, 60016,
+ 60021, 60026, 60028, 60031, 60035, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16595, 16600, 0, 16607, 0, 0, 16614,
- 16619, 0, 16624, 0, 0, 16631, 0, 0, 0, 0, 0, 0, 16636, 16641, 16645,
- 16652, 0, 16659, 16664, 16669, 16674, 16681, 16688, 16695, 0, 16702,
- 16707, 16712, 0, 16719, 0, 16726, 0, 0, 16731, 16738, 0, 16745, 16749,
- 16756, 16760, 16765, 16773, 16779, 16785, 16790, 16796, 16802, 16808,
- 16813, 0, 16819, 16827, 16834, 0, 0, 16841, 16846, 16852, 16857, 16863,
- 0, 16869, 0, 16875, 16882, 16889, 16896, 16903, 16908, 0, 0, 16912,
- 16917, 16921, 16925, 16929, 16933, 16937, 16941, 16945, 16949, 0, 0,
- 16953, 16959, 16965, 16972, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16979, 16983, 16994,
- 17009, 17024, 17034, 17045, 17058, 17069, 17075, 17083, 17093, 17099,
- 17107, 17111, 17117, 17123, 17131, 17141, 17149, 17162, 17168, 17176,
- 17184, 17196, 17203, 17211, 17219, 17227, 17235, 17243, 17251, 17261,
- 17265, 17268, 17271, 17274, 17277, 17280, 17283, 17286, 17289, 17292,
- 17296, 17300, 17304, 17308, 17312, 17316, 17320, 17324, 17328, 17333,
- 17339, 17349, 17363, 17373, 17379, 17385, 17393, 17401, 17409, 17417,
- 17423, 17429, 17432, 17436, 17440, 17444, 17448, 17452, 17456, 0, 17460,
- 17464, 17468, 17472, 17476, 17480, 17484, 17488, 17492, 17496, 17500,
- 17503, 17506, 17510, 17514, 17518, 17521, 17525, 17529, 17533, 17537,
- 17541, 17545, 17549, 17553, 17556, 17559, 17563, 17567, 17571, 17574,
- 17577, 17580, 17584, 17589, 17593, 0, 0, 0, 0, 17597, 17602, 17606,
- 17611, 17615, 17620, 17625, 17631, 17636, 17642, 17646, 17651, 17655,
- 17660, 17670, 17676, 17682, 17689, 17699, 17705, 17709, 17713, 17719,
- 17725, 17733, 17739, 17747, 17755, 17763, 17773, 17781, 17791, 17796,
- 17802, 17808, 17814, 17820, 17826, 17832, 0, 17838, 17844, 17850, 17856,
- 17862, 17868, 17874, 17880, 17886, 17892, 17898, 17903, 17908, 17914,
- 17920, 17926, 17931, 17937, 17943, 17949, 17955, 17961, 17967, 17973,
- 17979, 17984, 17989, 17995, 18001, 18007, 18012, 18017, 18022, 18028,
- 18036, 18043, 0, 18050, 18057, 18070, 18077, 18084, 18092, 18100, 18106,
- 18112, 18118, 18128, 18133, 18139, 18149, 18159, 0, 18169, 18179, 18187,
- 18199, 18211, 18217, 18231, 18246, 18251, 18256, 18264, 18272, 18280, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18288, 18291, 18295, 18299, 18303,
- 18307, 18311, 18315, 18319, 18323, 18327, 18331, 18335, 18339, 18343,
- 18347, 18351, 18355, 18359, 18363, 18367, 18370, 18373, 18377, 18381,
- 18385, 18388, 18391, 18394, 18398, 18402, 18405, 18408, 18412, 18415,
- 18420, 18423, 18427, 18430, 18434, 18437, 18442, 18445, 18449, 18456,
- 18461, 18465, 18470, 18474, 18479, 18483, 18488, 18495, 18501, 18506,
- 18510, 18514, 18518, 18522, 18526, 18531, 18536, 18542, 18547, 18552,
- 18556, 18559, 18562, 18565, 18568, 18571, 18574, 18577, 18580, 18583,
- 18589, 18593, 18597, 18601, 18605, 18609, 18613, 18617, 18621, 18626,
- 18630, 18635, 18640, 18646, 18651, 18657, 18663, 18669, 18675, 18681,
- 18688, 18695, 18703, 18711, 18720, 18729, 18740, 18750, 18760, 18771,
- 18782, 18792, 18802, 18812, 18822, 18832, 18842, 18852, 18862, 18870,
- 18877, 18883, 18890, 18895, 18901, 18907, 18913, 18919, 18925, 18931,
- 18936, 18942, 18948, 18954, 18960, 18965, 18973, 18980, 18986, 18993,
- 19001, 19007, 19013, 19019, 19025, 19033, 19041, 19051, 19059, 19067,
- 19073, 19078, 19083, 19088, 19093, 19098, 19103, 19108, 19113, 19118,
- 19124, 19130, 19136, 19143, 19148, 19154, 19159, 19164, 19169, 19174,
- 19179, 19184, 19189, 19194, 19199, 19204, 19209, 19214, 19219, 19224,
- 19229, 19234, 19239, 19244, 19249, 19254, 19259, 19264, 19269, 19274,
- 19279, 19284, 19289, 19294, 19299, 19304, 19309, 19314, 19319, 19324,
- 19329, 19334, 19339, 0, 19344, 0, 0, 0, 0, 0, 19349, 0, 0, 19354, 19358,
- 19362, 19366, 19370, 19374, 19378, 19382, 19386, 19390, 19394, 19398,
- 19402, 19406, 19410, 19414, 19418, 19422, 19426, 19430, 19434, 19438,
- 19442, 19446, 19450, 19454, 19458, 19462, 19466, 19470, 19474, 19478,
- 19482, 19486, 19490, 19494, 19498, 19502, 19506, 19510, 19514, 19518,
- 19524, 19528, 19533, 19538, 19542, 19547, 19552, 19556, 19560, 19564,
- 19568, 19572, 19576, 19580, 19584, 19588, 19592, 19596, 19600, 19604,
- 19608, 19612, 19616, 19620, 19624, 19628, 19632, 19636, 19640, 19644,
- 19648, 19652, 19656, 19660, 19664, 19668, 19672, 19676, 19680, 19684,
- 19688, 19692, 19696, 19700, 19704, 19708, 19712, 19716, 19720, 19724,
- 19728, 19732, 19736, 19740, 19744, 19748, 19752, 19756, 19760, 19764,
- 19768, 19772, 19776, 19780, 19784, 19788, 19792, 19796, 19800, 19804,
- 19808, 19812, 19816, 19820, 19824, 19828, 19832, 19836, 19840, 19844,
- 19848, 19852, 19856, 19860, 19864, 19868, 19872, 19876, 19880, 19884,
- 19888, 19892, 19896, 19900, 19904, 19908, 19912, 19916, 19920, 19924,
- 19928, 19932, 19936, 19940, 19943, 19947, 19950, 19954, 19958, 19961,
- 19965, 19969, 19972, 19976, 19980, 19984, 19988, 19991, 19995, 19999,
- 20003, 20007, 20011, 20015, 20018, 20022, 20026, 20030, 20034, 20038,
- 20042, 20046, 20050, 20054, 20058, 20062, 20066, 20070, 20074, 20078,
- 20082, 20086, 20090, 20094, 20098, 20102, 20106, 20110, 20114, 20118,
- 20122, 20126, 20130, 20134, 20138, 20142, 20146, 20150, 20154, 20158,
- 20162, 20166, 20170, 20174, 20178, 20182, 20186, 20190, 20194, 20198,
- 20202, 20206, 20210, 20214, 20218, 20222, 20226, 20230, 20234, 20238,
- 20242, 20246, 20250, 20254, 20258, 20262, 20266, 20270, 20274, 20278,
- 20282, 20286, 20290, 20294, 20298, 20302, 20306, 20310, 20314, 20318,
- 20322, 20326, 20330, 20334, 20338, 20342, 20346, 20350, 20354, 20358,
- 20362, 20366, 20370, 20374, 20378, 20382, 20386, 20390, 20394, 20398,
- 20402, 20406, 20410, 20414, 20418, 20422, 20426, 20430, 20434, 20438,
- 20442, 20446, 20450, 20454, 20458, 20462, 20466, 20470, 20474, 20478,
- 20482, 20486, 20490, 20494, 20498, 20502, 20506, 20510, 20514, 20518,
- 20522, 20526, 20530, 20534, 20538, 20542, 20546, 20550, 20554, 20558,
- 20562, 20566, 20570, 20573, 20577, 20581, 20585, 20589, 20593, 20597,
- 20601, 20605, 20609, 20613, 20617, 20621, 20625, 20629, 20633, 20637,
- 20641, 20645, 20649, 20653, 20657, 20661, 20665, 20668, 20672, 20676,
- 20680, 20684, 20688, 20692, 20696, 20700, 20704, 20708, 20712, 20716,
- 20720, 20724, 20728, 20731, 20735, 20739, 20743, 20747, 20751, 20755,
- 20759, 20762, 20766, 20770, 20774, 20778, 20782, 20786, 20790, 20794,
- 20798, 20802, 20806, 20810, 20814, 20818, 20822, 20826, 20830, 20834,
- 20838, 20842, 20846, 20850, 20854, 0, 20858, 20862, 20866, 20870, 0, 0,
- 20874, 20878, 20882, 20886, 20890, 20894, 20898, 0, 20902, 0, 20906,
- 20910, 20914, 20918, 0, 0, 20922, 20926, 20930, 20934, 20938, 20942,
- 20946, 20950, 20954, 20958, 20962, 20966, 20970, 20974, 20978, 20982,
- 20986, 20990, 20994, 20998, 21002, 21006, 21010, 21013, 21017, 21021,
- 21025, 21029, 21033, 21037, 21041, 21045, 21049, 21053, 21057, 21061,
- 21065, 21069, 21073, 21077, 21081, 0, 21085, 21089, 21093, 21097, 0, 0,
- 21101, 21104, 21108, 21112, 21116, 21120, 21124, 21128, 21132, 21136,
- 21140, 21144, 21148, 21152, 21156, 21160, 21164, 21169, 21174, 21179,
- 21185, 21191, 21196, 21201, 21207, 21210, 21214, 21218, 21222, 21226,
- 21230, 21234, 21238, 0, 21242, 21246, 21250, 21254, 0, 0, 21258, 21262,
- 21266, 21270, 21274, 21278, 21282, 0, 21286, 0, 21290, 21294, 21298,
- 21302, 0, 0, 21306, 21310, 21314, 21318, 21322, 21326, 21330, 21334,
- 21338, 21343, 21348, 21353, 21359, 21365, 21370, 0, 21375, 21379, 21383,
- 21387, 21391, 21395, 21399, 21403, 21407, 21411, 21415, 21419, 21423,
- 21427, 21431, 21435, 21439, 21442, 21446, 21450, 21454, 21458, 21462,
- 21466, 21470, 21474, 21478, 21482, 21486, 21490, 21494, 21498, 21502,
- 21506, 21510, 21514, 21518, 21522, 21526, 21530, 21534, 21538, 21542,
- 21546, 21550, 21554, 21558, 21562, 21566, 21570, 21574, 21578, 21582,
- 21586, 21590, 21594, 21598, 0, 21602, 21606, 21610, 21614, 0, 0, 21618,
- 21622, 21626, 21630, 21634, 21638, 21642, 21646, 21650, 21654, 21658,
- 21662, 21666, 21670, 21674, 21678, 21682, 21686, 21690, 21694, 21698,
- 21702, 21706, 21710, 21714, 21718, 21722, 21726, 21730, 21734, 21738,
- 21742, 21746, 21750, 21754, 21758, 21762, 21766, 21770, 21774, 21778,
- 21782, 21786, 21790, 21794, 21798, 21802, 21806, 21810, 21814, 21818,
- 21822, 21826, 21830, 21834, 21838, 21842, 21845, 21849, 21853, 21857,
- 21861, 21865, 21869, 21873, 21877, 21881, 0, 0, 21885, 21894, 21900,
- 21905, 21909, 21912, 21917, 21920, 21923, 21926, 21931, 21935, 21940,
- 21943, 21946, 21949, 21952, 21955, 21958, 21961, 21964, 21967, 21971,
- 21975, 21979, 21983, 21987, 21991, 21995, 21999, 22003, 22007, 0, 0, 0,
- 22013, 22019, 22023, 22027, 22031, 22037, 22041, 22045, 22049, 22055,
- 22059, 22063, 22067, 22073, 22077, 22081, 22085, 22091, 22097, 22103,
- 22111, 22117, 22123, 22129, 22135, 22141, 0, 0, 0, 0, 0, 0, 22147, 22150,
- 22153, 22156, 22159, 22162, 22166, 22170, 22173, 22177, 22181, 22185,
- 22189, 22193, 22196, 22200, 22204, 22208, 22212, 22216, 22220, 22224,
- 22228, 22232, 22236, 22240, 22243, 22247, 22251, 22255, 22259, 22262,
- 22266, 22270, 22274, 22278, 22282, 22286, 22290, 22294, 22298, 22302,
- 22306, 22310, 22314, 22317, 22321, 22325, 22329, 22333, 22337, 22341,
- 22345, 22349, 22353, 22357, 22361, 22365, 22369, 22373, 22377, 22381,
- 22385, 22389, 22393, 22397, 22401, 22405, 22409, 22413, 22417, 22421,
- 22425, 22429, 22433, 22437, 22441, 22445, 22449, 22453, 22456, 22460,
- 22464, 22468, 22472, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22476, 22480,
- 22483, 22487, 22490, 22494, 22497, 22501, 22507, 22512, 22516, 22519,
- 22523, 22527, 22532, 22536, 22541, 22545, 22550, 22554, 22559, 22563,
- 22568, 22574, 22578, 22583, 22587, 22592, 22598, 22602, 22608, 22614,
- 22618, 22623, 22631, 22639, 22646, 22651, 22656, 22665, 22672, 22679,
- 22684, 22690, 22694, 22698, 22702, 22706, 22710, 22714, 22718, 22722,
- 22726, 22730, 22736, 22741, 22746, 22749, 22753, 22757, 22762, 22766,
- 22771, 22775, 22780, 22784, 22789, 22793, 22798, 22802, 22807, 22811,
- 22816, 22822, 22826, 22831, 22836, 22840, 22844, 22848, 22852, 22855,
- 22859, 22865, 22870, 22875, 22879, 22883, 22887, 22892, 22896, 22901,
- 22905, 22910, 22913, 22917, 22921, 22926, 22930, 22935, 22939, 22944,
- 22950, 22954, 22958, 22962, 22966, 22970, 22974, 22978, 22982, 22986,
- 22990, 22994, 23000, 23003, 23007, 23011, 23016, 23020, 23025, 23029,
- 23034, 23038, 23043, 23047, 23052, 23056, 23061, 23065, 23070, 23076,
- 23080, 23084, 23090, 23096, 23102, 23108, 23112, 23116, 23120, 23124,
- 23128, 23132, 23138, 23142, 23146, 23150, 23155, 23159, 23164, 23168,
- 23173, 23177, 23182, 23186, 23191, 23195, 23200, 23204, 23209, 23215,
- 23219, 23225, 23229, 23233, 23237, 23241, 23245, 23249, 23255, 23258,
- 23262, 23266, 23271, 23275, 23280, 23284, 23289, 23293, 23298, 23302,
- 23307, 23311, 23316, 23320, 23325, 23331, 23334, 23338, 23342, 23347,
- 23352, 23356, 23360, 23364, 23368, 23372, 23376, 23382, 23385, 23389,
- 23393, 23398, 23402, 23407, 23411, 23416, 23422, 23426, 23431, 23435,
- 23439, 23443, 23447, 23451, 23455, 23459, 23465, 23469, 23473, 23477,
- 23482, 23486, 23491, 23495, 23500, 23504, 23509, 23513, 23518, 23522,
- 23527, 23531, 23536, 23539, 23543, 23547, 23551, 23555, 23559, 23563,
- 23567, 23571, 23577, 23580, 23584, 23588, 23593, 23597, 23602, 23606,
- 23611, 23615, 23620, 23624, 23629, 23633, 23638, 23642, 23647, 23653,
- 23657, 23663, 23667, 23673, 23679, 23685, 23691, 23697, 23703, 23709,
- 23715, 23719, 23723, 23727, 23731, 23735, 23739, 23743, 23747, 23752,
- 23756, 23761, 23765, 23770, 23774, 23779, 23783, 23788, 23792, 23797,
- 23801, 23806, 23810, 23814, 23818, 23822, 23826, 23830, 23834, 23840,
- 23843, 23847, 23851, 23856, 23860, 23865, 23869, 23874, 23878, 23883,
- 23887, 23892, 23896, 23901, 23905, 23910, 23916, 23920, 23926, 23931,
- 23937, 23941, 23947, 23952, 23956, 23960, 23964, 23968, 23972, 23977,
- 23980, 23984, 23989, 23993, 23998, 24001, 24005, 24009, 24013, 24017,
- 24021, 24025, 24029, 24033, 24037, 24041, 24045, 24050, 24054, 24058,
- 24064, 24068, 24074, 24078, 24084, 24088, 24092, 24096, 24100, 24104,
- 24109, 24113, 24117, 24121, 24125, 24129, 24133, 24137, 24141, 24145,
- 24149, 24155, 24161, 24167, 24173, 24179, 24184, 24190, 24196, 24202,
- 24206, 24210, 24214, 24218, 24222, 24226, 24230, 24234, 24238, 24242,
- 24246, 24250, 24254, 24259, 24264, 24269, 24273, 24277, 24281, 24285,
- 24289, 24293, 24297, 24301, 24305, 24309, 24315, 24321, 24327, 24333,
- 24339, 24345, 24351, 24357, 24363, 24367, 24371, 24375, 24379, 24383,
- 24387, 24391, 24397, 24403, 24409, 24415, 24421, 24427, 24433, 24439,
- 24445, 24450, 24455, 24460, 24465, 24471, 24477, 24483, 24489, 24495,
- 24501, 24507, 24512, 24518, 24524, 24530, 24535, 24541, 24547, 24553,
- 24558, 24563, 24568, 24573, 24578, 24583, 24588, 24593, 24598, 24603,
- 24608, 24613, 24617, 24622, 24627, 24632, 24637, 24642, 24647, 24652,
- 24657, 24662, 24667, 24672, 24677, 24682, 24687, 24692, 24697, 24702,
- 24707, 24712, 24717, 24722, 24727, 24732, 24737, 24742, 24747, 24752,
- 24757, 24762, 24766, 24771, 24776, 24781, 24786, 24791, 24796, 24801,
- 24806, 24811, 24816, 24821, 24826, 24831, 24836, 24841, 24846, 24851,
- 24856, 24861, 24866, 24871, 24876, 24881, 24886, 24891, 24895, 24900,
- 24905, 24910, 24915, 24920, 24924, 24929, 24934, 24939, 24944, 24949,
- 24953, 24958, 24964, 24969, 24974, 24979, 24984, 24990, 24995, 25000,
- 25005, 25010, 25015, 25020, 25025, 25030, 25035, 25040, 25045, 25050,
- 25055, 25060, 25065, 25070, 25075, 25080, 25085, 25090, 25095, 25100,
- 25105, 25110, 25115, 25120, 25125, 25130, 25135, 25140, 25145, 25150,
- 25155, 25160, 25165, 25170, 25175, 25180, 25185, 25190, 25195, 25200,
- 25205, 25210, 25216, 25221, 25226, 25231, 25236, 25241, 25246, 25251,
- 25256, 25261, 25266, 25271, 25275, 25280, 25285, 25290, 25295, 25300,
- 25305, 25310, 25315, 25320, 25325, 25330, 25335, 25340, 25345, 25350,
- 25355, 25360, 25365, 25370, 25375, 25380, 25385, 25390, 25395, 25400,
- 25405, 25411, 25415, 25419, 25423, 25427, 25431, 25435, 25439, 25443,
- 25449, 25455, 25461, 25467, 25473, 25479, 25485, 25492, 25498, 25503,
- 25508, 25513, 25518, 25523, 25528, 25533, 25538, 25543, 25548, 25553,
- 25558, 25563, 25568, 25573, 25578, 25583, 25588, 25593, 25598, 25603,
- 25608, 25613, 25618, 25623, 25628, 25633, 25638, 0, 0, 0, 25645, 25655,
- 25659, 25666, 25670, 25674, 25678, 25686, 25690, 25695, 25700, 25705,
- 25709, 25714, 25719, 25722, 25726, 25730, 25739, 25743, 25747, 25753,
- 25757, 25761, 25769, 25773, 25781, 25787, 25793, 25799, 25805, 25815,
- 25821, 25825, 25834, 25837, 25843, 25847, 25853, 25858, 25864, 25872,
- 25878, 25884, 25892, 25898, 25902, 25906, 25916, 25922, 25926, 25936,
- 25942, 25946, 25950, 25957, 25964, 25969, 25974, 25983, 25987, 25991,
- 25995, 26003, 26010, 26014, 26018, 26022, 26026, 26030, 26034, 26038,
- 26042, 26046, 26050, 26054, 26059, 26064, 26069, 26073, 26077, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26081, 26085, 26089, 26093, 26097,
- 26102, 26107, 26112, 26117, 26121, 26125, 26130, 26134, 0, 26138, 26143,
- 26148, 26152, 26156, 26161, 26166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 26171, 26175, 26179, 26183, 26187, 26192, 26197, 26202, 26207, 26211,
- 26215, 26220, 26224, 26228, 26232, 26237, 26242, 26246, 26250, 26255,
- 26260, 26265, 26271, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26276, 26280, 26284,
- 26288, 26292, 26297, 26302, 26307, 26312, 26316, 26320, 26325, 26329,
- 26333, 26337, 26342, 26347, 26351, 26355, 26360, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 26365, 26369, 26373, 26377, 26381, 26386, 26391, 26396,
- 26401, 26405, 26409, 26414, 26418, 0, 26422, 26427, 26432, 0, 26436,
- 26441, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26446, 26449, 26453, 26457,
- 26461, 26465, 26469, 26473, 26477, 26481, 26485, 26489, 26493, 26497,
- 26501, 26505, 26509, 26513, 26516, 26520, 26524, 26528, 26532, 26536,
- 26540, 26544, 26548, 26552, 26556, 26560, 26564, 26568, 26571, 26574,
- 26578, 26582, 26588, 26594, 26600, 26606, 26612, 26618, 26624, 26630,
- 26636, 26642, 26648, 26654, 26660, 26666, 26675, 26684, 26690, 26696,
- 26702, 26707, 26711, 26716, 26721, 26726, 26730, 26735, 26740, 26745,
- 26749, 26754, 26758, 26763, 26768, 26773, 26778, 26782, 26786, 26790,
- 26794, 26798, 26802, 26806, 26810, 26814, 26818, 26824, 26828, 26832,
- 26836, 26840, 26844, 26852, 26858, 26862, 26868, 26872, 26878, 26882, 0,
- 0, 26886, 26890, 26893, 26896, 26899, 26902, 26905, 26908, 26911, 26914,
- 0, 0, 0, 0, 0, 0, 26917, 26925, 26933, 26941, 26949, 26957, 26965, 26973,
- 26981, 26989, 0, 0, 0, 0, 0, 0, 26997, 27000, 27003, 27006, 27011, 27014,
- 27019, 27026, 27034, 27039, 27046, 27049, 27056, 27063, 27070, 0, 27074,
- 27078, 27081, 27084, 27087, 27090, 27093, 27096, 27099, 27102, 0, 0, 0,
- 0, 0, 0, 27105, 27108, 27111, 27114, 27117, 27120, 27124, 27128, 27132,
- 27135, 27139, 27143, 27146, 27150, 27154, 27157, 27161, 27164, 27168,
- 27172, 27176, 27180, 27184, 27187, 27190, 27194, 27198, 27201, 27205,
- 27209, 27213, 27217, 27221, 27225, 27229, 27233, 27240, 27245, 27250,
- 27255, 27260, 27266, 27272, 27278, 27284, 27289, 27295, 27301, 27306,
- 27312, 27318, 27324, 27330, 27336, 27341, 27347, 27352, 27358, 27364,
- 27370, 27376, 27382, 27387, 27392, 27398, 27404, 27409, 27415, 27420,
- 27426, 27431, 27436, 27442, 27448, 27454, 27460, 27466, 27472, 27478,
- 27484, 27490, 27496, 27502, 27508, 27513, 27518, 27523, 27529, 0, 0, 0,
- 0, 0, 0, 0, 0, 27535, 27544, 27553, 27561, 27569, 27579, 27587, 27596,
- 27603, 27610, 27617, 27625, 27633, 27641, 27649, 27657, 27665, 27673,
- 27681, 27688, 27696, 27704, 27712, 27720, 27728, 27738, 27748, 27758,
- 27768, 27778, 27788, 27798, 27808, 27818, 27828, 27838, 27848, 27858,
- 27868, 27876, 27884, 27894, 27902, 0, 0, 0, 0, 0, 27912, 27916, 27920,
- 27924, 27928, 27932, 27936, 27940, 27944, 27948, 27952, 27956, 27960,
- 27964, 27968, 27972, 27976, 27980, 27984, 27988, 27992, 27996, 28000,
- 28004, 28010, 28014, 28020, 28024, 28030, 28034, 28040, 28044, 28048,
- 28052, 28056, 28060, 28064, 28070, 28076, 28082, 28088, 28093, 28099,
- 28105, 28111, 28117, 28123, 28129, 28136, 28142, 28147, 28152, 28156,
- 28160, 28164, 28168, 28172, 28176, 28180, 28186, 28192, 28198, 28203,
- 28210, 28215, 28220, 28226, 28231, 28238, 28245, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 28252, 28258, 28262, 28267, 28272, 28277, 28282, 28287, 28292,
- 28297, 28302, 28307, 28312, 28317, 28322, 28327, 28331, 28335, 28340,
- 28345, 28350, 28354, 28358, 28362, 28367, 28372, 28377, 28382, 28386, 0,
- 0, 0, 28390, 28395, 28400, 28405, 28411, 28417, 28423, 28429, 28434,
- 28439, 28445, 28451, 0, 0, 0, 0, 28458, 28463, 28469, 28475, 28481,
- 28486, 28491, 28496, 28501, 28507, 28512, 28517, 0, 0, 0, 0, 28522, 0, 0,
- 0, 28527, 28532, 28537, 28542, 28546, 28550, 28554, 28558, 28562, 28566,
- 28570, 28574, 28578, 28583, 28589, 28595, 28601, 28606, 28611, 28617,
- 28623, 28629, 28634, 28640, 28645, 28651, 28657, 28662, 28668, 28674,
- 28680, 28685, 28690, 28695, 28701, 28707, 28712, 28718, 28723, 28729,
- 28734, 28740, 0, 0, 28746, 28752, 28758, 28764, 28770, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 28776, 28783, 28790, 28796, 28803, 28810, 28816, 28823,
- 28830, 28837, 28843, 28849, 28856, 28862, 28868, 28875, 28882, 28888,
- 28895, 28902, 28908, 28914, 28921, 28927, 28933, 28940, 28946, 28953,
- 28960, 28967, 28974, 28981, 28988, 28994, 29001, 29008, 29014, 29021,
- 29028, 29035, 29042, 29049, 29056, 29063, 0, 0, 0, 0, 29070, 29078,
- 29085, 29092, 29098, 29105, 29111, 29118, 29124, 29131, 29138, 29145,
- 29152, 29159, 29166, 29173, 29180, 29187, 29194, 29201, 29208, 29214,
- 29221, 29228, 29235, 29241, 0, 0, 0, 0, 0, 0, 29247, 29253, 29258, 29263,
- 29268, 29273, 29278, 29283, 29288, 29293, 29298, 0, 0, 0, 29304, 29310,
- 29316, 29320, 29326, 29332, 29338, 29344, 29350, 29356, 29362, 29368,
- 29374, 29380, 29386, 29392, 29398, 29404, 29410, 29414, 29420, 29426,
- 29432, 29438, 29444, 29450, 29456, 29462, 29468, 29474, 29480, 29486,
- 29492, 29498, 29504, 29508, 29513, 29518, 29523, 29527, 29532, 29536,
- 29541, 29546, 29551, 29555, 29560, 29565, 29570, 29575, 29580, 29584,
- 29588, 29593, 29598, 29602, 29606, 29610, 29615, 29620, 29625, 29630, 0,
- 0, 29636, 29640, 29647, 29652, 29658, 29664, 29669, 29675, 29681, 29686,
- 29692, 29698, 29704, 29709, 29715, 29720, 29725, 29731, 29736, 29742,
- 29747, 29753, 29759, 29765, 29771, 29775, 29780, 29785, 29791, 29797,
- 29802, 29808, 29814, 29818, 29823, 29828, 29832, 29837, 29842, 29847,
- 29852, 29858, 29864, 29869, 29874, 29879, 29883, 29888, 29892, 29897,
- 29901, 29906, 29911, 29916, 29921, 29927, 29933, 29940, 29950, 29959,
- 29966, 29972, 29982, 29987, 29993, 0, 29998, 30003, 30008, 30016, 30022,
- 30030, 30035, 30041, 30047, 30053, 30058, 30064, 30069, 30076, 30082,
- 30087, 30093, 30099, 30105, 30112, 30119, 30126, 30131, 30136, 30143,
- 30150, 30157, 30164, 30171, 0, 0, 30178, 30185, 30192, 30198, 30204,
- 30210, 30216, 30222, 30228, 30234, 30240, 0, 0, 0, 0, 0, 0, 30246, 30252,
- 30257, 30262, 30267, 30272, 30277, 30282, 30287, 30292, 0, 0, 0, 0, 0, 0,
- 30297, 30302, 30307, 30312, 30317, 30322, 30327, 30336, 30343, 30348,
- 30353, 30358, 30363, 30368, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 60041, 60045, 60049, 60054, 60059, 60064, 60068, 60072, 60076, 60081,
+ 60086, 60090, 60094, 60098, 60102, 60107, 60112, 60117, 60122, 60126,
+ 60130, 60135, 60140, 60145, 60150, 60154, 0, 60158, 60162, 60166, 60170,
+ 60174, 60178, 60182, 60187, 60192, 60196, 60201, 60206, 60215, 60219,
+ 60223, 60227, 60234, 60238, 60243, 60248, 60252, 60256, 60262, 60267,
+ 60272, 60277, 60282, 60286, 60290, 60294, 60298, 60302, 60307, 60312,
+ 60316, 60320, 60325, 60330, 60335, 60339, 60343, 60348, 60353, 60359,
+ 60365, 60369, 60375, 60381, 60385, 60391, 60397, 60402, 60407, 60411,
+ 60417, 60421, 60425, 60431, 60437, 60442, 60447, 60451, 60455, 60463,
+ 60469, 60475, 60481, 60486, 60491, 60496, 60502, 60506, 60512, 60516,
+ 60520, 60526, 60532, 60538, 60544, 60550, 60556, 60562, 60568, 60574,
+ 60580, 60586, 60592, 60596, 60602, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 60608, 60611, 60615, 60619, 60623, 60627, 60630, 60633, 60637, 60641,
+ 60645, 60649, 60652, 60657, 60661, 60665, 60669, 60674, 60678, 60682,
+ 60686, 60690, 60696, 60702, 60706, 60710, 60714, 60718, 60722, 60726,
+ 60730, 60734, 60738, 60742, 60746, 60752, 60756, 60760, 60764, 60768,
+ 60772, 60776, 60780, 60784, 60788, 60792, 60796, 60800, 60804, 60808,
+ 60812, 60816, 60822, 60828, 60833, 60838, 60842, 60846, 60850, 60854,
+ 60858, 60862, 60866, 60870, 60874, 60878, 60882, 60886, 60890, 60894,
+ 60898, 60902, 60906, 60910, 60914, 60918, 60922, 60926, 60930, 60934,
+ 60940, 60944, 60948, 60952, 60956, 60960, 60964, 60968, 60972, 60977,
+ 60984, 60988, 60992, 60996, 61000, 61004, 61008, 61012, 61016, 61020,
+ 61024, 61028, 61032, 61039, 61043, 61049, 61053, 61057, 61061, 61065,
+ 61069, 61072, 61076, 61080, 61084, 61088, 61092, 61096, 61100, 61104,
+ 61108, 61112, 61116, 61120, 61124, 61128, 61132, 61136, 61140, 61144,
+ 61148, 61152, 61156, 61160, 61164, 61168, 61172, 61176, 61180, 61184,
+ 61188, 61192, 61196, 61200, 61206, 61210, 61214, 61218, 61222, 61226,
+ 61230, 61234, 61238, 61242, 61246, 61250, 61254, 61258, 61262, 61266,
+ 61270, 61274, 61278, 61282, 61286, 61290, 61294, 61298, 61302, 61306,
+ 61310, 61314, 61322, 61326, 61330, 61334, 61338, 61342, 61348, 61352,
+ 61356, 61360, 61364, 61368, 61372, 61376, 61380, 61384, 61388, 61392,
+ 61396, 61400, 61406, 61410, 61414, 61418, 61422, 61426, 61430, 61434,
+ 61438, 61442, 61446, 61450, 61454, 61458, 61462, 61466, 61470, 61474,
+ 61478, 61482, 61486, 61490, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61494, 61503, 61511, 61522, 61532,
+ 61540, 61549, 61558, 61568, 61580, 61592, 61604, 0, 0, 0, 0, 61610,
+ 61613, 61616, 61621, 61624, 61631, 61635, 61639, 61643, 61647, 61651,
+ 61656, 61661, 61665, 61669, 61674, 61679, 61684, 61689, 61692, 61695,
+ 61701, 61707, 61712, 61717, 61724, 61731, 61735, 61739, 61743, 61751,
+ 61757, 61764, 61769, 61774, 61779, 61784, 61789, 61794, 61799, 61805,
+ 61810, 61816, 61821, 61826, 61831, 61836, 61842, 61847, 61851, 61857,
+ 61868, 61878, 61893, 61903, 61907, 61917, 61923, 61929, 61935, 61940,
+ 61943, 61948, 61952, 0, 61958, 61962, 61965, 61969, 61972, 61976, 61979,
+ 61983, 61986, 61990, 61993, 61996, 62000, 62004, 62008, 62012, 62016,
+ 62020, 62024, 62028, 62032, 62036, 62040, 62044, 62048, 62052, 62056,
+ 62060, 62064, 62068, 62072, 62076, 62080, 62084, 62088, 62093, 62097,
+ 62101, 62105, 62109, 62112, 62116, 62120, 62124, 62128, 62132, 62136,
+ 62139, 62143, 62146, 62150, 62154, 62158, 62162, 62166, 62170, 62174,
+ 62178, 62182, 62186, 62190, 62194, 62197, 62201, 62205, 62209, 62213,
+ 62217, 62220, 62225, 62229, 62234, 62238, 62242, 62246, 62250, 62254,
+ 62258, 62263, 62267, 62271, 62275, 62279, 62283, 62287, 62291, 0, 0,
+ 62296, 62304, 62312, 62319, 62326, 62330, 62336, 62341, 62346, 62350,
+ 62353, 62357, 62360, 62364, 62367, 62371, 62374, 62378, 62381, 62384,
+ 62388, 62392, 62396, 62400, 62404, 62408, 62412, 62416, 62420, 62424,
+ 62428, 62432, 62436, 62440, 62444, 62448, 62452, 62456, 62460, 62464,
+ 62468, 62472, 62476, 62481, 62485, 62489, 62493, 62497, 62500, 62504,
+ 62508, 62512, 62516, 62520, 62524, 62527, 62531, 62534, 62538, 62542,
+ 62546, 62550, 62554, 62558, 62562, 62566, 62570, 62574, 62578, 62582,
+ 62585, 62589, 62593, 62597, 62601, 62605, 62608, 62613, 62617, 62622,
+ 62626, 62630, 62634, 62638, 62642, 62646, 62651, 62655, 62659, 62663,
+ 62667, 62671, 62675, 62679, 62684, 62688, 62692, 62696, 62700, 62704,
+ 62711, 62715, 62721, 0, 0, 0, 0, 0, 62726, 62731, 62736, 62741, 62746,
+ 62751, 62756, 62761, 62765, 62770, 62775, 62780, 62785, 62790, 62795,
+ 62800, 62805, 62810, 62814, 62819, 62824, 62828, 62832, 62836, 62840,
+ 62845, 62850, 62855, 62860, 62865, 62870, 62875, 62880, 62885, 62890,
+ 62894, 62898, 62903, 62908, 62913, 62918, 0, 0, 0, 62923, 62927, 62931,
+ 62935, 62939, 62943, 62947, 62951, 62955, 62959, 62963, 62967, 62971,
+ 62975, 62979, 62983, 62987, 62991, 62995, 62999, 63003, 63007, 63011,
+ 63015, 63019, 63023, 63027, 63031, 63035, 63039, 63043, 63046, 63050,
+ 63053, 63057, 63061, 63064, 63068, 63072, 63075, 63079, 63083, 63087,
+ 63091, 63094, 63098, 63102, 63106, 63110, 63114, 63118, 63121, 63124,
+ 63128, 63132, 63136, 63140, 63144, 63148, 63152, 63156, 63160, 63164,
+ 63168, 63172, 63176, 63180, 63184, 63188, 63192, 63196, 63200, 63204,
+ 63208, 63212, 63216, 63220, 63224, 63228, 63232, 63236, 63240, 63244,
+ 63248, 63252, 63256, 63260, 63264, 63268, 63272, 63276, 63280, 63284,
+ 63288, 0, 63292, 63298, 63304, 63309, 63314, 63319, 63325, 63331, 63336,
+ 63342, 63348, 63354, 63360, 63366, 63372, 63378, 63384, 63389, 63394,
+ 63399, 63404, 63409, 63414, 63419, 63424, 63429, 63434, 63439, 63444,
+ 63449, 63454, 63459, 63464, 63469, 63474, 63479, 63484, 63490, 63496,
+ 63502, 63508, 63513, 63518, 0, 0, 0, 0, 0, 63523, 63528, 63533, 63538,
+ 63543, 63548, 63553, 63558, 63563, 63568, 63573, 63578, 63583, 63588,
+ 63593, 63598, 63603, 63608, 63612, 63617, 63622, 63627, 63632, 63637,
+ 63642, 63647, 63652, 63657, 63662, 63667, 63672, 63677, 63682, 63687,
+ 63692, 63697, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63702, 63707, 63712,
+ 63717, 63721, 63726, 63730, 63735, 63740, 63745, 63750, 63755, 63760,
+ 63765, 63770, 63775, 63780, 63784, 63788, 63792, 63796, 63800, 63804,
+ 63808, 63812, 63816, 63820, 63824, 63828, 63832, 63836, 63841, 63846,
+ 63851, 63856, 63861, 63866, 63871, 63876, 63881, 63886, 63891, 63896,
+ 63901, 63906, 63911, 63917, 0, 63924, 63927, 63930, 63933, 63936, 63939,
+ 63942, 63946, 63949, 63953, 63957, 63961, 63965, 63969, 63973, 63977,
+ 63981, 63985, 63989, 63993, 63997, 64001, 64005, 64009, 64013, 64017,
+ 64021, 64025, 64029, 64033, 64037, 64041, 64045, 64049, 64053, 64057,
+ 64061, 64065, 64069, 64073, 64077, 64086, 64095, 64104, 64113, 64122,
+ 64131, 64140, 64149, 64152, 64157, 64162, 64167, 64172, 64177, 64182,
+ 64188, 64193, 64199, 64203, 64208, 64213, 64218, 64223, 64228, 64232,
+ 64236, 64240, 64244, 64248, 64252, 64256, 64260, 64264, 64268, 64272,
+ 64276, 64280, 64284, 64289, 64294, 64299, 64304, 64309, 64314, 64319,
+ 64324, 64329, 64334, 64339, 64344, 64349, 64354, 64360, 64366, 64371,
+ 64376, 64379, 64382, 64385, 64388, 64391, 64394, 64398, 64401, 64405,
+ 64409, 64413, 64417, 64421, 64425, 64429, 64433, 64437, 64441, 64445,
+ 64449, 64453, 64457, 64461, 64465, 64469, 64473, 64477, 64481, 64485,
+ 64489, 64493, 64497, 64501, 64505, 64509, 64513, 64517, 64521, 64525,
+ 64529, 64533, 64537, 64541, 64545, 64549, 64553, 64557, 64561, 64565,
+ 64570, 64576, 64581, 64587, 64591, 64596, 64601, 64606, 64611, 64616,
+ 64621, 64627, 64632, 64638, 64642, 64649, 64656, 64663, 64670, 64677,
+ 64684, 64691, 64698, 64705, 64712, 64719, 64726, 64729, 64732, 64735,
+ 64740, 64743, 64746, 64749, 64752, 64755, 64758, 64762, 64766, 64770,
+ 64774, 64778, 64782, 64786, 64790, 64794, 64798, 64802, 64806, 64810,
+ 64813, 64817, 64821, 64825, 64829, 64833, 64836, 64840, 64844, 64848,
+ 64852, 64855, 64859, 64863, 64867, 64871, 64874, 64878, 64882, 64886,
+ 64890, 64894, 64898, 64902, 64906, 64910, 64914, 0, 64918, 64921, 64924,
+ 64927, 64930, 64933, 64936, 64939, 64942, 64945, 64948, 64951, 64954,
+ 64957, 64960, 64963, 64966, 64969, 64972, 64975, 64978, 64981, 64984,
+ 64987, 64990, 64993, 64996, 64999, 65002, 65005, 65008, 65011, 65014,
+ 65017, 65020, 65023, 65026, 65029, 65032, 65035, 65038, 65041, 65044,
+ 65047, 65050, 65053, 65056, 65059, 65062, 65065, 65068, 65071, 65074,
+ 65077, 65080, 65083, 65086, 65089, 65092, 65095, 65098, 65101, 65104,
+ 65107, 65110, 65113, 65116, 65119, 65122, 65125, 65128, 65131, 65134,
+ 65137, 65140, 65143, 65146, 65149, 65152, 65155, 65158, 65161, 65164,
+ 65167, 65170, 65173, 65176, 65179, 65182, 65191, 65199, 65207, 65215,
+ 65223, 65231, 65239, 65248, 65256, 65265, 65274, 65283, 65292, 65301,
+ 65310, 65319, 65328, 65337, 65346, 65355, 65364, 65373, 65382, 65391,
+ 65400, 65403, 65406, 65409, 65411, 65414, 65417, 65420, 65425, 65430,
+ 65433, 65440, 65447, 65454, 65461, 65464, 65469, 65472, 65476, 65478,
+ 65480, 65483, 65486, 65489, 65492, 65495, 65498, 65501, 65506, 65511,
+ 65514, 65517, 65520, 65523, 65526, 65529, 65532, 65536, 65539, 65542,
+ 65545, 65548, 65551, 65556, 65559, 65562, 65565, 65570, 65575, 65580,
+ 65585, 65590, 65595, 65600, 65605, 65610, 65618, 65620, 65623, 65626,
+ 65629, 65632, 65637, 65645, 65648, 65651, 65655, 65658, 65661, 65664,
+ 65669, 65672, 65675, 65680, 65683, 65686, 65691, 65694, 65697, 65702,
+ 65707, 65712, 65715, 65718, 65721, 65724, 65730, 65733, 65736, 65739,
+ 65741, 65744, 65747, 65750, 65755, 65758, 65761, 65764, 65767, 65770,
+ 65775, 65778, 65781, 65784, 65787, 65790, 65793, 65796, 65799, 65802,
+ 65808, 65813, 65821, 65829, 65837, 65845, 65853, 65861, 65870, 65878,
+ 65887, 65896, 65905, 65914, 65923, 65932, 65941, 65950, 65959, 65968,
+ 65977, 65986, 65995, 66004, 66013, 66022, 66031, 66040, 66049, 66058,
+ 66067, 66076, 66085, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30373, 30379,
- 30385, 30389, 30393, 30397, 30401, 30407, 30411, 30417, 30421, 30427,
- 30433, 30441, 30447, 30455, 30459, 30463, 30467, 30473, 30476, 30482,
- 30486, 30492, 30496, 30500, 30506, 30510, 30516, 30520, 30526, 30534,
- 30542, 30550, 30556, 30560, 30566, 30570, 30576, 30579, 30582, 30588,
- 30592, 30598, 30601, 30604, 30607, 30611, 30615, 30621, 30627, 30630,
- 30633, 30637, 30642, 30647, 30654, 30659, 30666, 30673, 30682, 30689,
- 30698, 30703, 30710, 30717, 30726, 30731, 30738, 30743, 30749, 30755,
- 30761, 30767, 30773, 30779, 0, 0, 0, 0, 30785, 30789, 30792, 30795,
- 30798, 30801, 30804, 30807, 30810, 30813, 30816, 30819, 30822, 30825,
- 30830, 30835, 30840, 30843, 30848, 30853, 30858, 30863, 30870, 30875,
- 30880, 30885, 30890, 30897, 30903, 30909, 30915, 30921, 30927, 30936,
- 30945, 30951, 30957, 30965, 30973, 30982, 30991, 30999, 31007, 31016,
- 31025, 0, 0, 0, 31033, 31037, 31041, 31045, 31048, 31051, 31054, 31058,
- 31061, 31064, 31068, 31071, 31075, 31079, 31083, 31087, 31091, 31095,
- 31099, 31103, 31107, 31110, 31113, 31117, 31121, 31125, 31128, 31131,
- 31134, 31138, 31142, 31145, 31149, 31152, 31157, 31162, 31167, 31172,
- 31177, 31182, 31187, 31192, 31197, 31201, 31205, 31211, 31218, 31222,
- 31226, 31230, 31233, 31236, 31239, 31242, 31245, 31248, 31251, 31254,
- 31257, 31260, 31264, 31268, 31272, 31277, 31281, 31285, 31291, 31295,
- 31301, 31307, 31312, 31319, 31323, 31329, 31333, 31339, 31344, 31351,
- 31358, 31363, 31370, 31375, 31380, 31384, 31390, 31394, 31400, 31407,
- 31414, 31418, 31424, 31430, 31434, 31440, 31445, 31450, 31457, 31462,
- 31467, 31472, 31477, 31481, 31485, 31490, 31495, 31502, 31508, 31513,
- 31520, 31525, 31532, 31537, 31546, 31552, 31558, 31562, 0, 0, 0, 0, 0, 0,
- 0, 0, 31566, 31575, 31582, 31589, 31596, 31599, 31603, 31607, 31611,
- 31615, 31619, 31623, 31627, 31631, 31635, 31639, 31643, 31647, 31650,
- 31653, 31657, 31661, 31665, 31669, 31673, 31677, 31680, 31684, 31688,
- 31692, 31696, 31699, 31702, 31706, 31709, 31713, 31717, 31720, 31724,
- 31728, 31731, 31736, 31741, 31746, 31750, 31754, 31759, 31763, 31768,
- 31772, 31777, 31781, 31785, 31790, 31795, 31799, 31804, 31809, 31814,
- 31818, 0, 0, 0, 31822, 31827, 31836, 31841, 31848, 31853, 31857, 31860,
- 31863, 31866, 31869, 31872, 31875, 31878, 31881, 0, 0, 0, 31884, 31888,
- 31892, 31896, 31903, 31909, 31915, 31921, 31927, 31933, 31939, 31945,
- 31951, 31957, 31964, 31971, 31978, 31985, 31992, 31999, 32006, 32013,
- 32020, 32027, 32034, 32041, 32048, 32055, 32062, 32069, 32076, 32083,
- 32090, 32097, 32104, 32111, 32118, 32125, 32132, 32139, 32146, 32153,
- 32160, 32167, 32175, 32183, 32191, 32197, 32203, 32209, 32217, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32226, 32233, 32240, 32247, 32254,
- 32263, 32272, 32281, 0, 0, 0, 0, 0, 0, 0, 0, 32290, 32295, 32300, 32305,
- 32310, 32319, 32330, 32339, 32350, 32356, 32369, 32375, 32382, 32389,
- 32394, 32400, 32406, 32417, 32426, 32433, 32440, 32449, 32456, 32465,
- 32475, 32485, 32492, 32499, 32506, 32516, 32521, 32529, 32535, 32543,
- 32552, 32557, 32564, 32570, 32575, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32580,
- 32585, 32591, 32598, 32606, 32612, 32618, 32624, 32629, 32636, 32642,
- 32648, 32654, 32662, 32667, 32675, 32680, 32686, 32692, 32699, 32707,
- 32714, 32720, 32727, 32734, 32740, 32747, 32754, 32760, 32765, 32771,
- 32779, 32787, 32793, 32799, 32805, 32811, 32819, 32823, 32829, 32835,
- 32841, 32847, 32853, 32859, 32863, 32868, 32873, 32880, 32885, 32889,
- 32895, 32900, 32905, 32909, 32914, 32919, 32923, 32927, 32932, 32939,
- 32943, 32948, 32953, 32957, 32962, 32966, 32971, 32975, 32981, 32986,
- 32993, 32998, 33003, 33007, 33012, 33017, 33024, 33029, 33035, 33040,
- 33044, 33049, 33053, 33058, 33065, 33072, 33077, 33082, 33086, 33092,
- 33098, 33103, 33108, 33113, 33119, 33124, 33130, 33135, 33141, 33147,
- 33153, 33160, 33167, 33174, 33181, 33188, 33195, 33200, 33208, 33217,
- 33226, 33235, 33244, 33253, 33262, 33274, 33283, 33292, 33301, 33308,
- 33313, 33320, 33328, 33336, 33343, 33350, 33357, 33364, 33372, 33381,
- 33390, 33399, 33408, 33417, 33426, 33435, 33444, 33453, 33462, 33471,
- 33480, 33489, 33498, 33506, 33515, 33526, 33534, 33543, 33554, 33563,
- 33572, 33581, 33590, 33598, 33607, 33614, 33619, 33627, 33632, 33639,
- 33644, 33653, 33659, 33666, 33673, 33678, 33683, 33691, 33699, 33708,
- 33717, 33722, 33729, 33740, 33748, 33757, 33763, 33769, 33774, 33781,
- 33786, 33795, 33800, 33805, 33810, 33817, 33824, 33829, 33838, 33846,
- 33851, 33856, 33863, 33870, 33874, 33878, 33881, 33884, 33887, 33890,
- 33893, 33896, 33903, 33906, 33909, 33914, 33918, 33922, 33926, 33930,
- 33934, 33943, 33949, 33955, 33961, 33969, 33977, 33983, 33989, 33996,
- 34002, 34007, 34013, 34019, 34025, 34032, 34038, 34046, 34052, 34059, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34065, 34072,
- 34079, 34084, 34093, 34101, 34109, 34116, 34123, 34130, 34137, 34145,
- 34153, 34163, 34173, 34181, 34189, 34197, 34205, 34214, 34223, 34231,
- 34239, 34248, 34257, 34267, 34277, 34286, 34295, 34303, 34311, 34319,
- 34327, 34337, 34347, 34355, 34363, 34371, 34379, 34387, 34395, 34403,
- 34411, 34419, 34427, 34435, 34443, 34452, 34461, 34470, 34479, 34489,
- 34499, 34506, 34513, 34521, 34529, 34538, 34547, 34555, 34563, 34575,
- 34587, 34596, 34605, 34614, 34623, 34630, 34637, 34645, 34653, 34661,
- 34669, 34677, 34685, 34693, 34701, 34710, 34719, 34728, 34737, 34746,
- 34755, 34765, 34775, 34785, 34795, 34804, 34813, 34820, 34827, 34835,
- 34843, 34851, 34859, 34867, 34875, 34887, 34899, 34908, 34917, 34925,
- 34933, 34941, 34949, 34960, 34971, 34982, 34993, 35005, 35017, 35025,
- 35033, 35041, 35049, 35058, 35067, 35076, 35085, 35093, 35101, 35109,
- 35117, 35125, 35133, 35142, 35151, 35161, 35171, 35178, 35185, 35193,
- 35201, 35209, 35217, 35224, 35231, 35239, 35247, 35255, 35263, 35271,
- 35279, 35287, 35295, 35303, 35311, 35319, 35327, 35335, 35343, 35351,
- 35359, 35368, 35377, 35386, 35394, 35403, 35412, 35421, 35430, 35440,
- 35449, 35456, 35461, 35468, 35475, 35483, 35491, 35500, 35509, 35519,
- 35529, 35540, 35551, 35560, 35569, 35579, 35589, 35598, 35607, 35617,
- 35627, 35638, 35649, 35658, 35667, 35677, 35687, 35694, 35701, 35709,
- 35717, 35723, 35729, 35738, 35747, 35757, 35767, 35778, 35789, 35798,
- 35807, 35817, 35827, 35836, 35845, 35853, 35861, 35868, 35875, 35883,
- 35891, 35900, 35909, 35919, 35929, 35940, 35951, 35960, 35969, 35979,
- 35989, 35998, 36007, 36017, 36027, 36038, 36049, 36058, 36067, 36077,
- 36087, 36094, 36101, 36109, 36117, 36126, 36135, 36145, 36155, 36166,
- 36177, 36186, 36195, 36205, 36215, 36223, 36231, 36239, 36247, 36256,
- 36265, 36272, 36279, 36286, 36293, 36300, 36307, 36315, 36323, 36331,
- 36339, 36350, 36361, 36372, 36383, 36394, 36405, 36413, 36421, 36432,
- 36443, 36454, 36465, 36476, 36487, 36495, 36503, 36514, 36525, 36536, 0,
- 0, 36547, 36555, 36563, 36574, 36585, 36596, 0, 0, 36607, 36615, 36623,
- 36634, 36645, 36656, 36667, 36678, 36689, 36697, 36705, 36716, 36727,
- 36738, 36749, 36760, 36771, 36779, 36787, 36798, 36809, 36820, 36831,
- 36842, 36853, 36861, 36869, 36880, 36891, 36902, 36913, 36924, 36935,
- 36943, 36951, 36962, 36973, 36984, 0, 0, 36995, 37003, 37011, 37022,
- 37033, 37044, 0, 0, 37055, 37063, 37071, 37082, 37093, 37104, 37115,
- 37126, 0, 37137, 0, 37145, 0, 37156, 0, 37167, 37178, 37186, 37194,
- 37205, 37216, 37227, 37238, 37249, 37260, 37268, 37276, 37287, 37298,
- 37309, 37320, 37331, 37342, 37350, 37358, 37366, 37374, 37382, 37390,
- 37398, 37406, 37414, 37422, 37430, 37438, 37446, 0, 0, 37454, 37465,
- 37476, 37490, 37504, 37518, 37532, 37546, 37560, 37571, 37582, 37596,
- 37610, 37624, 37638, 37652, 37666, 37677, 37688, 37702, 37716, 37730,
- 37744, 37758, 37772, 37783, 37794, 37808, 37822, 37836, 37850, 37864,
- 37878, 37889, 37900, 37914, 37928, 37942, 37956, 37970, 37984, 37995,
- 38006, 38020, 38034, 38048, 38062, 38076, 38090, 38098, 38106, 38117,
- 38125, 0, 38136, 38144, 38155, 38163, 38171, 38179, 38187, 38195, 38198,
- 38201, 38204, 38207, 38213, 38224, 38232, 0, 38243, 38251, 38262, 38270,
- 38278, 38286, 38294, 38302, 38308, 38314, 38320, 38328, 38336, 38347, 0,
- 0, 38358, 38366, 38377, 38385, 38393, 38401, 0, 38409, 38415, 38421,
- 38427, 38435, 38443, 38454, 38465, 38473, 38481, 38489, 38500, 38508,
- 38516, 38524, 38532, 38540, 38546, 38552, 0, 0, 38555, 38566, 38574, 0,
- 38585, 38593, 38604, 38612, 38620, 38628, 38636, 38644, 38647, 0, 38650,
- 38654, 38658, 38662, 38666, 38670, 38674, 38678, 38682, 38686, 38690,
- 38694, 38700, 38706, 38712, 38715, 38718, 38720, 38724, 38728, 38732,
- 38736, 38738, 38742, 38746, 38752, 38758, 38765, 38772, 38777, 38782,
- 38788, 38794, 38796, 38799, 38801, 38805, 38809, 38813, 38816, 38820,
- 38824, 38828, 38832, 38836, 38842, 38846, 38850, 38856, 38861, 38868,
- 38870, 38873, 38877, 38881, 38886, 38892, 38894, 38903, 38912, 38915,
- 38919, 38921, 38923, 38925, 38928, 38934, 38936, 38940, 38944, 38951,
- 38958, 38962, 38967, 38972, 38977, 38982, 38986, 38990, 38993, 38997,
- 39001, 39008, 39013, 39017, 39021, 39026, 39030, 39034, 39039, 39044,
- 39048, 39052, 39056, 39058, 39063, 39068, 39072, 39076, 39080, 39084, 0,
- 39088, 39092, 39096, 39102, 39108, 39114, 39120, 39127, 39134, 39139,
- 39144, 39148, 0, 0, 39154, 39157, 39160, 39163, 39166, 39169, 39172,
- 39176, 39180, 39185, 39190, 39195, 39202, 39206, 39209, 39212, 39215,
- 39218, 39221, 39224, 39227, 39230, 39233, 39237, 39241, 39246, 39251, 0,
- 39256, 39262, 39268, 39274, 39281, 39288, 39295, 39302, 39308, 39314,
- 39321, 39328, 39335, 0, 0, 0, 39342, 39345, 39348, 39351, 39356, 39359,
- 39362, 39365, 39368, 39371, 39374, 39378, 39381, 39384, 39387, 39390,
- 39393, 39398, 39401, 39404, 39407, 39410, 39413, 39418, 39421, 39424,
- 39429, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 39434, 39439, 39444, 39451, 39459, 39464, 39469, 39473, 39477, 39482,
- 39489, 39496, 39500, 39505, 39510, 39515, 39520, 39527, 39532, 39537,
- 39542, 39551, 39558, 39565, 39569, 39574, 39580, 39585, 39592, 39601,
- 39610, 39614, 39618, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39622,
- 39626, 39634, 39638, 39642, 39647, 39651, 39655, 39659, 39661, 39665,
- 39669, 39673, 39678, 39682, 39686, 39694, 39697, 39701, 39704, 39707,
- 39713, 39717, 39720, 39726, 39730, 39734, 39738, 39741, 39745, 39748,
- 39752, 39754, 39757, 39760, 39764, 39766, 39770, 39773, 39776, 39781,
- 39786, 39793, 39796, 39799, 39803, 39808, 39811, 39814, 39817, 39821,
- 39826, 39829, 39832, 39834, 39837, 39840, 39843, 39847, 39852, 39855,
- 39859, 39863, 39867, 39871, 39876, 39882, 39887, 39892, 39898, 39903,
- 39908, 39912, 39916, 39921, 39925, 39929, 39932, 39934, 39939, 39945,
- 39952, 39959, 39966, 39973, 39980, 39987, 39994, 40001, 40009, 40016,
- 40024, 40031, 40038, 40046, 40054, 40059, 40064, 40069, 40074, 40079,
- 40084, 40089, 40094, 40099, 40104, 40110, 40116, 40122, 40128, 40135,
- 40143, 40150, 40156, 40162, 40168, 40174, 40180, 40186, 40192, 40198,
- 40204, 40211, 40218, 40225, 40232, 40240, 40249, 40257, 40268, 40276,
- 40284, 40293, 40300, 40309, 40318, 40326, 40335, 0, 0, 0, 0, 0, 0, 40343,
- 40345, 40348, 40350, 40353, 40356, 40359, 40364, 40369, 40374, 40379,
- 40383, 40387, 40391, 40395, 40400, 40406, 40411, 40417, 40422, 40427,
- 40432, 40438, 40443, 40449, 40455, 40459, 40463, 40468, 40473, 40478,
- 40483, 40488, 40496, 40504, 40512, 40520, 40527, 40535, 40542, 40549,
- 40558, 40570, 40576, 40582, 40590, 40598, 40607, 40616, 40624, 40632,
- 40641, 40650, 40655, 40663, 40668, 40673, 40679, 40684, 40690, 40697,
- 40704, 40709, 40715, 40720, 40723, 40727, 40730, 40734, 40738, 40742,
- 40748, 40754, 40760, 40766, 40770, 40774, 40778, 40782, 40788, 40794,
- 40798, 40803, 40807, 40812, 40817, 40822, 40825, 40829, 40832, 40836,
- 40843, 40851, 40862, 40873, 40878, 40887, 40894, 40903, 40912, 40916,
- 40922, 40930, 40934, 40939, 40944, 40950, 40956, 40962, 40969, 40973,
- 40977, 40982, 40985, 40987, 40991, 40995, 41003, 41007, 41009, 41011,
- 41015, 41023, 41028, 41034, 41044, 41051, 41056, 41060, 41064, 41068,
- 41071, 41074, 41077, 41081, 41085, 41089, 41093, 41097, 41100, 41104,
- 41108, 41111, 41113, 41116, 41118, 41122, 41126, 41128, 41134, 41137,
- 41142, 41146, 41150, 41152, 41154, 41156, 41159, 41163, 41167, 41171,
- 41175, 41179, 41185, 41191, 41193, 41195, 41197, 41199, 41202, 41204,
- 41208, 41210, 41214, 41217, 41223, 41227, 41231, 41234, 41237, 41241,
- 41247, 41251, 41261, 41271, 41275, 41281, 41287, 41290, 41294, 41297,
- 41302, 41306, 41312, 41316, 41328, 41336, 41340, 41344, 41350, 41354,
- 41357, 41359, 41362, 41366, 41370, 41377, 41381, 41385, 41389, 41392,
- 41397, 41402, 41407, 41412, 41417, 41422, 41430, 41438, 41442, 41446,
- 41448, 41453, 41457, 41461, 41469, 41477, 41483, 41489, 41498, 41507,
- 41512, 41517, 41525, 41533, 41535, 41537, 41542, 41547, 41553, 41559,
- 41565, 41571, 41575, 41579, 41586, 41593, 41599, 41605, 41615, 41625,
- 41633, 41641, 41643, 41647, 41651, 41656, 41661, 41668, 41675, 41678,
- 41681, 41684, 41687, 41690, 41695, 41699, 41704, 41709, 41712, 41715,
- 41718, 41721, 41724, 41728, 41731, 41734, 41737, 41740, 41742, 41744,
- 41746, 41748, 41756, 41764, 41770, 41774, 41780, 41790, 41796, 41802,
- 41808, 41816, 41824, 41835, 41839, 41843, 41845, 41851, 41853, 41855,
- 41857, 41859, 41865, 41868, 41874, 41880, 41884, 41888, 41892, 41895,
- 41899, 41903, 41905, 41914, 41923, 41928, 41933, 41939, 41945, 41951,
- 41954, 41957, 41960, 41963, 41965, 41970, 41975, 41980, 41986, 41992,
- 42000, 42008, 42014, 42020, 42026, 42032, 42041, 42050, 42059, 42068,
- 42077, 42086, 42095, 42104, 42113, 42122, 42130, 42142, 42152, 42167,
- 42170, 42175, 42181, 42187, 42194, 42208, 42223, 42229, 42235, 42242,
- 42248, 42256, 42262, 42275, 42289, 42294, 42300, 42307, 42310, 42313,
- 42315, 42318, 42321, 42323, 42325, 42329, 42332, 42335, 42338, 42341,
- 42346, 42351, 42356, 42361, 42366, 42369, 42371, 42373, 42375, 42379,
- 42383, 42387, 42393, 42398, 42400, 42402, 42407, 42412, 42417, 42422,
- 42427, 42432, 42434, 42436, 42445, 42449, 42457, 42466, 42468, 42473,
- 42478, 42486, 42490, 42492, 42496, 42498, 42502, 42506, 42510, 42512,
- 42514, 42516, 42523, 42532, 42541, 42550, 42559, 42568, 42577, 42586,
- 42595, 42603, 42611, 42620, 42629, 42638, 42647, 42655, 42663, 42672,
- 42681, 42690, 42700, 42709, 42719, 42728, 42738, 42747, 42757, 42767,
- 42776, 42786, 42795, 42805, 42814, 42824, 42833, 42842, 42851, 42860,
- 42869, 42879, 42888, 42897, 42906, 42916, 42925, 42934, 42943, 42952,
- 42962, 42972, 42981, 42990, 42998, 43006, 43013, 43021, 43030, 43041,
- 43050, 43059, 43068, 43075, 43082, 43089, 43098, 43107, 43116, 43125,
- 43132, 43137, 43146, 43151, 43154, 43162, 43165, 43170, 43175, 43178,
- 43181, 43189, 43192, 43197, 43200, 43207, 43212, 43220, 43223, 43226,
- 43229, 43234, 43239, 43242, 43245, 43253, 43256, 43263, 43270, 43274,
- 43278, 43283, 43288, 43294, 43299, 43305, 43311, 43316, 43322, 43330,
- 43336, 43344, 43352, 43358, 43366, 43374, 43383, 43391, 43397, 43405,
- 43414, 43422, 43426, 43431, 43444, 43457, 43461, 43465, 43469, 43473,
- 43483, 43487, 43492, 43497, 43502, 43507, 43512, 43517, 43527, 43537,
- 43545, 43555, 43565, 43573, 43583, 43593, 43601, 43611, 43621, 43629,
- 43637, 43647, 43657, 43660, 43663, 43666, 43671, 43675, 43681, 43688,
- 43695, 43703, 43710, 43714, 43718, 43722, 43726, 43728, 43732, 43736,
- 43741, 43746, 43753, 43760, 43763, 43770, 43772, 43774, 43778, 43782,
- 43787, 43793, 43799, 43805, 43811, 43820, 43829, 43838, 43842, 43844,
- 43848, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43855, 43859, 43866, 43873,
- 43880, 43887, 43891, 43895, 43899, 43903, 43908, 43914, 43919, 43925,
- 43931, 43937, 43943, 43951, 43958, 43965, 43972, 43979, 43984, 43990,
- 43999, 44003, 44010, 44014, 44018, 44024, 44030, 44036, 44042, 44046,
- 44050, 44053, 44056, 44060, 44067, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44074, 44077, 44081, 44085, 44091,
- 44097, 44103, 44111, 44118, 44122, 44130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44135, 44138, 44141, 44144, 44147,
- 44150, 44153, 44156, 44159, 44162, 44166, 44170, 44174, 44178, 44182,
- 44186, 44190, 44194, 44198, 44202, 44206, 44209, 44212, 44215, 44218,
- 44221, 44224, 44227, 44230, 44233, 44237, 44241, 44245, 44249, 44253,
- 44257, 44261, 44265, 44269, 44273, 44277, 44283, 44289, 44295, 44302,
- 44309, 44316, 44323, 44330, 44337, 44344, 44351, 44358, 44365, 44372,
- 44379, 44386, 44393, 44400, 44407, 44414, 44419, 44425, 44431, 44437,
- 44442, 44448, 44454, 44460, 44465, 44471, 44477, 44482, 44487, 44493,
- 44498, 44504, 44510, 44515, 44521, 44527, 44532, 44538, 44544, 44550,
- 44556, 44562, 44567, 44573, 44579, 44585, 44590, 44596, 44602, 44608,
- 44613, 44619, 44625, 44630, 44635, 44641, 44646, 44652, 44658, 44663,
- 44669, 44675, 44680, 44686, 44692, 44698, 44704, 44710, 44715, 44721,
- 44727, 44733, 44738, 44744, 44750, 44756, 44761, 44767, 44773, 44778,
- 44783, 44789, 44794, 44800, 44806, 44811, 44817, 44823, 44828, 44834,
- 44840, 44846, 44852, 44858, 44862, 44867, 44872, 44877, 44882, 44887,
- 44892, 44897, 44902, 44907, 44912, 44916, 44920, 44924, 44928, 44932,
- 44936, 44940, 44944, 44948, 44953, 44958, 44963, 44968, 44973, 44978,
- 44987, 44996, 45005, 45014, 45023, 45032, 45041, 45050, 45057, 45065,
- 45073, 45080, 45087, 45095, 45103, 45110, 45117, 45125, 45133, 45140,
- 45147, 45155, 45163, 45170, 45177, 45185, 45194, 45203, 45211, 45220,
- 45229, 45236, 45243, 45251, 45260, 45269, 45277, 45286, 45295, 45302,
- 45309, 45318, 45327, 45335, 45343, 45352, 45361, 45368, 45375, 45384,
- 45393, 45401, 45409, 45418, 45427, 45434, 45441, 45450, 45459, 45467,
- 45476, 45485, 45493, 45503, 45513, 45523, 45533, 45542, 45551, 45560,
- 45569, 45576, 45584, 45592, 45600, 45608, 45613, 45618, 45627, 45635,
- 45642, 45651, 45659, 45666, 45675, 45683, 45690, 45699, 45707, 45714,
- 45723, 45731, 45738, 45747, 45755, 45762, 45771, 45779, 45786, 45795,
- 45803, 45810, 45819, 45827, 45834, 45843, 45852, 45861, 45870, 45884,
- 45898, 45905, 45910, 45915, 45920, 45925, 45930, 45935, 45940, 45945,
- 45953, 45961, 45969, 45977, 45982, 45989, 45996, 46003, 46008, 46016,
- 46023, 46031, 46035, 46042, 46048, 46055, 46059, 46065, 46071, 46077,
- 46081, 46084, 46088, 46092, 46099, 46105, 46111, 46117, 46123, 46137,
- 46147, 46161, 46175, 46181, 46191, 46205, 46208, 46211, 46218, 46226,
- 46231, 46236, 46244, 46256, 46268, 46276, 46280, 46284, 46287, 46290,
- 46294, 46298, 46301, 46304, 46309, 46314, 46320, 46326, 46331, 46336,
- 46342, 46348, 46353, 46358, 46363, 46368, 46374, 46380, 46385, 46390,
- 46396, 46402, 46407, 46412, 46415, 46418, 46427, 46429, 46431, 46434,
- 46438, 46444, 46446, 46449, 46456, 46463, 46471, 46479, 46489, 46503,
- 46508, 46513, 46517, 46522, 46530, 46538, 46547, 46556, 46565, 46574,
- 46579, 46584, 46590, 46596, 46602, 46608, 46611, 46617, 46623, 46633,
- 46643, 46651, 46659, 46668, 46677, 46681, 46689, 46697, 46705, 46713,
- 46722, 46731, 46740, 46749, 46754, 46759, 46764, 46769, 46774, 46780,
- 46786, 46791, 46797, 46799, 46801, 46803, 46805, 46808, 46811, 46813,
- 46815, 46817, 46821, 46825, 46827, 46829, 46832, 46835, 46839, 46845,
- 46851, 46853, 46860, 46864, 46869, 46874, 46876, 46886, 46892, 46898,
- 46904, 46910, 46916, 46922, 46927, 46930, 46933, 46936, 46938, 46940,
- 46944, 46948, 46953, 46958, 46963, 46966, 46970, 46975, 46978, 46982,
- 46987, 46992, 46997, 47002, 47007, 47012, 47017, 47022, 47027, 47032,
- 47037, 47042, 47048, 47054, 47060, 47062, 47065, 47067, 47070, 47072,
- 47074, 47076, 47078, 47080, 47082, 47084, 47086, 47088, 47090, 47092,
- 47094, 47096, 47098, 47100, 47102, 47104, 47109, 47114, 47119, 47124,
- 47129, 47134, 47139, 47144, 47149, 47154, 47159, 47164, 47169, 47174,
- 47179, 47184, 47189, 47194, 47199, 47204, 47208, 47212, 47216, 47222,
- 47228, 47233, 47238, 47243, 47248, 47253, 47258, 47266, 47274, 47282,
- 47290, 47298, 47306, 47314, 47322, 47328, 47333, 47338, 47343, 47346,
- 47350, 47354, 47358, 47362, 47366, 47370, 47377, 47384, 47392, 47400,
- 47405, 47410, 47417, 47424, 47431, 47438, 47441, 47444, 47449, 47451,
- 47455, 47460, 47462, 47464, 47466, 47468, 47473, 47476, 47478, 47483,
- 47490, 47497, 47500, 47504, 47509, 47514, 47522, 47528, 47534, 47546,
- 47553, 47560, 47565, 47570, 47576, 47579, 47582, 47587, 47589, 47593,
- 47595, 47597, 47599, 47601, 47603, 47605, 47610, 47612, 47614, 47616,
- 47618, 47622, 47624, 47627, 47632, 47637, 47642, 47647, 47653, 47659,
- 47661, 47664, 47671, 47678, 47685, 47692, 47696, 47700, 47702, 47704,
- 47708, 47714, 47719, 47721, 47725, 47734, 47742, 47750, 47756, 47762,
- 47767, 47773, 47778, 47781, 47795, 47798, 47803, 47808, 47814, 47824,
- 47826, 47832, 47838, 47842, 47849, 47853, 47855, 47857, 47861, 47867,
- 47872, 47878, 47880, 47886, 47888, 47894, 47896, 47898, 47903, 47905,
- 47909, 47914, 47916, 47921, 47926, 47930, 47937, 0, 47947, 47953, 47956,
- 47962, 47965, 47970, 47975, 47979, 47981, 47983, 47987, 47991, 47995,
- 47999, 48004, 48006, 48011, 48014, 48017, 48020, 48024, 48028, 48033,
- 48037, 48042, 48047, 48051, 48056, 48062, 48065, 48071, 48076, 48080,
- 48085, 48091, 48097, 48104, 48110, 48117, 48124, 48126, 48133, 48137,
- 48143, 48149, 48154, 48160, 48164, 48169, 48172, 48177, 48183, 48190,
- 48198, 48205, 48214, 48224, 48231, 48237, 48241, 48248, 48253, 48262,
- 48265, 48268, 48277, 48287, 48294, 48296, 48302, 48307, 48309, 48312,
- 48316, 48324, 48333, 48336, 48341, 48346, 48354, 48362, 48370, 48378,
- 48384, 48390, 48396, 48404, 48409, 48412, 48416, 48419, 48431, 48441,
- 48452, 48461, 48472, 48482, 48491, 48497, 48505, 48509, 48517, 48521,
- 48529, 48536, 48543, 48552, 48561, 48571, 48581, 48591, 48601, 48610,
- 48619, 48629, 48639, 48648, 48657, 48663, 48669, 48675, 48681, 48687,
- 48693, 48699, 48705, 48711, 48718, 48724, 48730, 48736, 48742, 48748,
- 48754, 48760, 48766, 48772, 48779, 48786, 48793, 48800, 48807, 48814,
- 48821, 48828, 48835, 48842, 48850, 48855, 48858, 48862, 48866, 48872,
- 48875, 48881, 48887, 48892, 48896, 48901, 48907, 48914, 48917, 48924,
- 48931, 48935, 48944, 48953, 48958, 48964, 48969, 48974, 48981, 48988,
- 48996, 49004, 49013, 49017, 49026, 49031, 49035, 49042, 49046, 49053,
- 49061, 49066, 49074, 49078, 49083, 49087, 49092, 49096, 49101, 49106,
- 49115, 49117, 49120, 49123, 49130, 49137, 49142, 49150, 49156, 49162,
- 49167, 49170, 49175, 49180, 49185, 49193, 49197, 49204, 49212, 49220,
- 49225, 49230, 49236, 49241, 49246, 49252, 49257, 49260, 49264, 49268,
- 49275, 49284, 49289, 49298, 49307, 49313, 49319, 49324, 49329, 49334,
- 49339, 49345, 49351, 49359, 49367, 49373, 49379, 49384, 49389, 49396,
- 49403, 49409, 49412, 49415, 49419, 49423, 49427, 49432, 49438, 49444,
- 49451, 49458, 49463, 49467, 49471, 49475, 49479, 49483, 49487, 49491,
- 49495, 49499, 49503, 49507, 49511, 49515, 49519, 49523, 49527, 49531,
- 49535, 49539, 49543, 49547, 49551, 49555, 49559, 49563, 49567, 49571,
- 49575, 49579, 49583, 49587, 49591, 49595, 49599, 49603, 49607, 49611,
- 49615, 49619, 49623, 49627, 49631, 49635, 49639, 49643, 49647, 49651,
- 49655, 49659, 49663, 49667, 49671, 49675, 49679, 49683, 49687, 49691,
- 49695, 49699, 49703, 49707, 49711, 49715, 49719, 49723, 49727, 49731,
- 49735, 49739, 49743, 49747, 49751, 49755, 49759, 49763, 49767, 49771,
- 49775, 49779, 49783, 49787, 49791, 49795, 49799, 49803, 49807, 49811,
- 49815, 49819, 49823, 49827, 49831, 49835, 49839, 49843, 49847, 49851,
- 49855, 49859, 49863, 49867, 49871, 49875, 49879, 49883, 49887, 49891,
- 49895, 49899, 49903, 49907, 49911, 49915, 49919, 49923, 49927, 49931,
- 49935, 49939, 49943, 49947, 49951, 49955, 49959, 49963, 49967, 49971,
- 49975, 49979, 49983, 49987, 49991, 49995, 49999, 50003, 50007, 50011,
- 50015, 50019, 50023, 50027, 50031, 50035, 50039, 50043, 50047, 50051,
- 50055, 50059, 50063, 50067, 50071, 50075, 50079, 50083, 50087, 50091,
- 50095, 50099, 50103, 50107, 50111, 50115, 50119, 50123, 50127, 50131,
- 50135, 50139, 50143, 50147, 50151, 50155, 50159, 50163, 50167, 50171,
- 50175, 50179, 50183, 50187, 50191, 50195, 50199, 50203, 50207, 50211,
- 50215, 50219, 50223, 50227, 50231, 50235, 50239, 50243, 50247, 50251,
- 50255, 50259, 50263, 50267, 50271, 50275, 50279, 50283, 50287, 50291,
- 50295, 50299, 50303, 50307, 50311, 50315, 50319, 50323, 50327, 50331,
- 50335, 50339, 50343, 50347, 50351, 50355, 50359, 50363, 50367, 50371,
- 50375, 50379, 50383, 50387, 50391, 50395, 50399, 50403, 50407, 50411,
- 50415, 50419, 50423, 50427, 50431, 50435, 50439, 50443, 50447, 50451,
- 50455, 50459, 50463, 50467, 50471, 50475, 50479, 50483, 50487, 50494,
- 50502, 50508, 50514, 50521, 50528, 50534, 50540, 50546, 50552, 50557,
- 50562, 50567, 50572, 50578, 50584, 50592, 50599, 50605, 50611, 50619,
- 50628, 50635, 50645, 50656, 50659, 50662, 50666, 50670, 50677, 50684,
- 50695, 50706, 50716, 50726, 50733, 50740, 50747, 50754, 50765, 50776,
- 50787, 50798, 50808, 50818, 50830, 50842, 50853, 50864, 50876, 50888,
- 50897, 50907, 50917, 50928, 50939, 50946, 50953, 50960, 50967, 50977,
- 50987, 50995, 51003, 51010, 51017, 51024, 51031, 51038, 51043, 51048,
- 51054, 51062, 51072, 51082, 51092, 51102, 51112, 51122, 51132, 51142,
- 51152, 51162, 51172, 51183, 51194, 51204, 51214, 51225, 51236, 51246,
- 51256, 51267, 51278, 51288, 51298, 51309, 51320, 51336, 51355, 51371,
- 51390, 51406, 51422, 51438, 51454, 51465, 51477, 51488, 51500, 51519,
- 51538, 51546, 51552, 51559, 51566, 51573, 51580, 51585, 51591, 51596,
- 51601, 51607, 51612, 51617, 51622, 51627, 51632, 51639, 51644, 51651,
- 51656, 51661, 51665, 51669, 51676, 51683, 51690, 51697, 51704, 51711,
- 51724, 51737, 51750, 51763, 51771, 51779, 51785, 51791, 51798, 51805,
- 51812, 51819, 51823, 51828, 51836, 51844, 51852, 51859, 51863, 51871,
- 51879, 51883, 51887, 51892, 51899, 51907, 51915, 51934, 51953, 51972,
- 51991, 52010, 52029, 52048, 52067, 52073, 52080, 52089, 52097, 52105,
- 52110, 52113, 52116, 52121, 52124, 52143, 52150, 52156, 52162, 52166,
- 52169, 52172, 52175, 52187, 52200, 52207, 52214, 52217, 52221, 52224,
- 52229, 52234, 52239, 52245, 52254, 52261, 52268, 52276, 52283, 52290,
- 52293, 52299, 52305, 52308, 52311, 52316, 52321, 52327, 52333, 52337,
- 52342, 52349, 52353, 52359, 52363, 52367, 52375, 52387, 52396, 52400,
- 52402, 52411, 52420, 52426, 52429, 52435, 52441, 52446, 52451, 52456,
- 52461, 52466, 52471, 52473, 52479, 52484, 52491, 52495, 52501, 52504,
- 52508, 52515, 52522, 52524, 52526, 52532, 52538, 52544, 52553, 52562,
- 52569, 52576, 52582, 52588, 52593, 52598, 52603, 52609, 52615, 52620,
- 52627, 52631, 52635, 52648, 52661, 52673, 52682, 52688, 52695, 52700,
- 52705, 52710, 52715, 52720, 52722, 52729, 52736, 52743, 52750, 52757,
- 52765, 52771, 52776, 52782, 52788, 52794, 52801, 52807, 52815, 52823,
- 52831, 52839, 52846, 52852, 52858, 52867, 52871, 52880, 52889, 52898,
- 52906, 52910, 52916, 52923, 52930, 52934, 52940, 52947, 52952, 52957,
- 52963, 52968, 52973, 52980, 52987, 52992, 52997, 53005, 53013, 53023,
- 53033, 53040, 53047, 53051, 53055, 53067, 53073, 53079, 53084, 53089,
- 53096, 53103, 53109, 53115, 53124, 53132, 53140, 53147, 53154, 53161,
- 53167, 53174, 53180, 53187, 53194, 53201, 53208, 53214, 53219, 53228,
- 53238, 53245, 53254, 53260, 53265, 53270, 53280, 53286, 53292, 53298,
- 53306, 53311, 53318, 53325, 53336, 53343, 53350, 53357, 53364, 53371,
- 53378, 53385, 53397, 53409, 53420, 53431, 53444, 53457, 53462, 53467,
- 53476, 53485, 53492, 53499, 53508, 53517, 53525, 53533, 53541, 53549,
- 53559, 53569, 53583, 53597, 53605, 53613, 53625, 53637, 53645, 53653,
- 53663, 53673, 53678, 53683, 53692, 53701, 53706, 53711, 53719, 53725,
- 53731, 53739, 53747, 53760, 53773, 53777, 53781, 53788, 53795, 53802,
- 53810, 53818, 53827, 53836, 53842, 53848, 53855, 53862, 53869, 53876,
- 53885, 53894, 53897, 53900, 53905, 53910, 53916, 53922, 53929, 53936,
- 53946, 53956, 53963, 53970, 53978, 53986, 53994, 54002, 54010, 54018,
- 54024, 54030, 54034, 54038, 54045, 54052, 54057, 54062, 54067, 54072,
- 54078, 54092, 54099, 54106, 54110, 54112, 54114, 54119, 54124, 54129,
- 54134, 54142, 54149, 54156, 54164, 54176, 54184, 54192, 54203, 54207,
- 54211, 54217, 54225, 54238, 54245, 54252, 54259, 54264, 54271, 54280,
- 54288, 54294, 54300, 54306, 54315, 54324, 54332, 54341, 54346, 54349,
- 54354, 54360, 54366, 54372, 54378, 54382, 54385, 54389, 54393, 54399,
- 54405, 54411, 54417, 54421, 54425, 54432, 54439, 54446, 54453, 54460,
- 54467, 54477, 54487, 54494, 54501, 54509, 54517, 54521, 54526, 54531,
- 54537, 54543, 54546, 54549, 54552, 54555, 54559, 54564, 54569, 54574,
- 54579, 54584, 54588, 54592, 54596, 54600, 54604, 54608, 54612, 54618,
- 54622, 54628, 54633, 54640, 54648, 54655, 54663, 54670, 54678, 54687,
- 54694, 54704, 54715, 54721, 54730, 54736, 54745, 54754, 54760, 54766,
- 54770, 54774, 54783, 54792, 54799, 54806, 54815, 0, 0, 0, 54824, 54829,
- 54833, 54837, 54842, 54847, 54852, 54860, 54868, 54871, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54875, 54880, 54885,
- 54890, 54895, 54900, 54905, 54910, 54915, 54920, 54925, 54931, 54935,
- 54940, 54945, 54950, 54955, 54960, 54965, 54970, 54975, 54980, 54985,
- 54990, 54995, 55000, 55005, 55010, 55015, 55020, 55025, 55030, 55035,
- 55040, 55045, 55051, 55056, 55062, 55071, 55076, 55084, 55091, 55100,
- 55105, 55110, 55115, 55121, 0, 55128, 55133, 55138, 55143, 55148, 55153,
- 55158, 55163, 55168, 55173, 55178, 55184, 55188, 55193, 55198, 55203,
- 55208, 55213, 55218, 55223, 55228, 55233, 55238, 55243, 55248, 55253,
- 55258, 55263, 55268, 55273, 55278, 55283, 55288, 55293, 55298, 55304,
- 55309, 55315, 55324, 55329, 55337, 55344, 55353, 55358, 55363, 55368,
- 55374, 0, 55381, 55389, 55397, 55406, 55413, 55421, 55427, 55436, 55444,
- 55452, 55460, 55468, 55476, 55484, 55489, 55496, 55502, 55509, 55517,
- 55524, 55531, 55539, 55545, 55551, 55558, 55565, 55575, 55585, 55592,
- 55599, 55604, 55614, 55624, 55629, 55634, 55639, 55644, 55649, 55654,
- 55659, 55664, 55669, 55674, 55679, 55684, 55689, 55694, 55699, 55704,
- 55709, 55714, 55719, 55724, 55729, 55734, 55739, 55744, 55749, 55754,
- 55759, 55764, 55769, 55774, 55778, 55782, 55787, 55792, 55797, 55802,
- 55807, 55812, 55817, 55822, 55827, 55832, 55837, 55842, 55847, 55852,
- 55857, 55862, 55867, 55872, 55879, 55886, 55893, 55900, 55907, 55914,
- 55921, 55928, 55935, 55942, 55949, 55956, 55963, 55970, 55975, 55980,
- 55987, 55994, 56001, 56008, 56015, 56022, 56029, 56036, 56043, 56050,
- 56057, 56064, 56070, 56076, 56082, 56088, 56095, 56102, 56109, 56116,
- 56123, 56130, 56137, 56144, 56151, 56158, 56166, 56174, 56182, 56190,
- 56198, 56206, 56214, 56222, 56226, 56232, 56238, 56242, 56248, 56254,
- 56260, 56267, 56274, 56281, 56288, 56293, 56299, 56305, 56312, 0, 0, 0,
- 0, 0, 56319, 56327, 56336, 56345, 56353, 56359, 56364, 56369, 56374,
- 56379, 56384, 56389, 56394, 56399, 56404, 56409, 56414, 56419, 56424,
- 56429, 56434, 56439, 56444, 56449, 56454, 56459, 56464, 56469, 56474,
- 56479, 56484, 56489, 56494, 56499, 56504, 56509, 56514, 56519, 56524,
- 56529, 56534, 56539, 56544, 56549, 56554, 0, 56559, 0, 0, 0, 0, 0, 56564,
- 0, 0, 56569, 56573, 56578, 56583, 56588, 56593, 56602, 56607, 56612,
- 56617, 56622, 56627, 56632, 56637, 56642, 56649, 56654, 56659, 56668,
- 56675, 56680, 56685, 56690, 56697, 56702, 56709, 56714, 56719, 56726,
- 56733, 56738, 56743, 56748, 56755, 56762, 56767, 56772, 56777, 56782,
- 56787, 56794, 56801, 56806, 56811, 56816, 56821, 56826, 56831, 56836,
- 56841, 56846, 56851, 56856, 56863, 56868, 56873, 0, 0, 0, 0, 0, 0, 0,
- 56878, 56885, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56890, 56895,
- 56899, 56903, 56907, 56911, 56915, 56919, 56923, 56927, 56931, 56935,
- 56941, 56945, 56949, 56953, 56957, 56961, 56965, 56969, 56973, 56977,
- 56981, 56985, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56989, 56993, 56997, 57001,
- 57005, 57009, 57013, 0, 57017, 57021, 57025, 57029, 57033, 57037, 57041,
- 0, 57045, 57049, 57053, 57057, 57061, 57065, 57069, 0, 57073, 57077,
- 57081, 57085, 57089, 57093, 57097, 0, 57101, 57105, 57109, 57113, 57117,
- 57121, 57125, 0, 57129, 57133, 57137, 57141, 57145, 57149, 57153, 0,
- 57157, 57161, 57165, 57169, 57173, 57177, 57181, 0, 57185, 57189, 57193,
- 57197, 57201, 57205, 57209, 0, 57213, 57218, 57223, 57228, 57233, 57238,
- 57243, 57247, 57252, 57257, 57262, 57266, 57271, 57276, 57281, 57286,
- 57290, 57295, 57300, 57305, 57310, 57315, 57320, 57324, 57329, 57334,
- 57341, 57346, 57351, 57357, 57364, 57371, 57380, 57387, 57396, 57400,
- 57404, 57410, 57416, 57422, 57430, 57436, 57440, 57444, 57448, 57454,
- 57460, 57464, 57466, 57470, 57476, 57478, 57482, 57486, 57490, 57496,
- 57501, 57505, 57509, 57514, 57520, 57525, 57530, 57535, 57540, 57547,
- 57554, 57559, 57564, 57569, 57574, 57579, 57584, 57588, 57592, 57599,
- 57606, 57612, 57616, 57621, 57623, 57627, 57635, 57639, 57643, 57647,
- 57651, 57657, 57663, 57667, 57673, 57677, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57681, 57685, 57689, 57694, 57699, 57704,
- 57708, 57712, 57716, 57721, 57726, 57730, 57734, 57738, 57742, 57747,
- 57752, 57757, 57762, 57766, 57770, 57775, 57780, 57785, 57790, 57794, 0,
- 57798, 57802, 57806, 57810, 57814, 57818, 57822, 57827, 57832, 57836,
- 57841, 57846, 57855, 57859, 57863, 57867, 57874, 57878, 57883, 57888,
- 57892, 57896, 57902, 57907, 57912, 57917, 57922, 57926, 57930, 57934,
- 57938, 57942, 57947, 57952, 57956, 57960, 57965, 57970, 57975, 57979,
- 57983, 57988, 57993, 57999, 58005, 58009, 58015, 58021, 58025, 58031,
- 58037, 58042, 58047, 58051, 58057, 58061, 58065, 58071, 58077, 58082,
- 58087, 58091, 58095, 58103, 58109, 58115, 58121, 58126, 58131, 58136,
- 58142, 58146, 58152, 58156, 58160, 58166, 58172, 58178, 58184, 58190,
- 58196, 58202, 58208, 58214, 58220, 58226, 58232, 58236, 58242, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 58248, 58251, 58255, 58259, 58263, 58267,
- 58270, 58273, 58277, 58281, 58285, 58289, 58292, 58297, 58301, 58305,
- 58309, 58314, 58318, 58322, 58326, 58330, 58336, 58342, 58346, 58350,
- 58354, 58358, 58362, 58366, 58370, 58374, 58378, 58382, 58386, 58392,
- 58396, 58400, 58404, 58408, 58412, 58416, 58420, 58424, 58428, 58432,
- 58436, 58440, 58444, 58448, 58452, 58456, 58462, 58468, 58473, 58478,
- 58482, 58486, 58490, 58494, 58498, 58502, 58506, 58510, 58514, 58518,
- 58522, 58526, 58530, 58534, 58538, 58542, 58546, 58550, 58554, 58558,
- 58562, 58566, 58570, 58574, 58580, 58584, 58588, 58592, 58596, 58600,
- 58604, 58608, 58612, 58617, 58624, 58628, 58632, 58636, 58640, 58644,
- 58648, 58652, 58656, 58660, 58664, 58668, 58672, 58679, 58683, 58689,
- 58693, 58697, 58701, 58705, 58709, 58712, 58716, 58720, 58724, 58728,
- 58732, 58736, 58740, 58744, 58748, 58752, 58756, 58760, 58764, 58768,
- 58772, 58776, 58780, 58784, 58788, 58792, 58796, 58800, 58804, 58808,
- 58812, 58816, 58820, 58824, 58828, 58832, 58836, 58840, 58846, 58850,
- 58854, 58858, 58862, 58866, 58870, 58874, 58878, 58882, 58886, 58890,
- 58894, 58898, 58902, 58906, 58910, 58914, 58918, 58922, 58926, 58930,
- 58934, 58938, 58942, 58946, 58950, 58954, 58962, 58966, 58970, 58974,
- 58978, 58982, 58988, 58992, 58996, 59000, 59004, 59008, 59012, 59016,
- 59020, 59024, 59028, 59032, 59036, 59040, 59046, 59050, 59054, 59058,
- 59062, 59066, 59070, 59074, 59078, 59082, 59086, 59090, 59094, 59098,
- 59102, 59106, 59110, 59114, 59118, 59122, 59126, 59130, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 59134, 59143,
- 59151, 59163, 59174, 59182, 59191, 59200, 59210, 59222, 59234, 59246, 0,
- 0, 0, 0, 59252, 59255, 59258, 59263, 59266, 59273, 59277, 59281, 59285,
- 59289, 59293, 59298, 59303, 59307, 59311, 59316, 59321, 59326, 59331,
- 59334, 59337, 59343, 59349, 59354, 59359, 59366, 59373, 59377, 59381,
- 59385, 59393, 59399, 59406, 59411, 59416, 59421, 59426, 59431, 59436,
- 59441, 59446, 59451, 59456, 59461, 59466, 59471, 59476, 59482, 59487,
- 59491, 59497, 59508, 59518, 59533, 59543, 59547, 59557, 59563, 59569,
- 59575, 59580, 59583, 59588, 59592, 0, 59598, 59602, 59605, 59609, 59612,
- 59616, 59619, 59623, 59626, 59630, 59633, 59636, 59640, 59644, 59648,
- 59652, 59656, 59660, 59664, 59668, 59672, 59675, 59679, 59683, 59687,
- 59691, 59695, 59699, 59703, 59707, 59711, 59715, 59719, 59723, 59727,
- 59732, 59736, 59740, 59744, 59748, 59751, 59755, 59758, 59762, 59766,
- 59770, 59774, 59777, 59781, 59784, 59788, 59792, 59796, 59800, 59804,
- 59808, 59812, 59816, 59820, 59824, 59828, 59832, 59835, 59839, 59843,
- 59847, 59851, 59855, 59858, 59863, 59867, 59872, 59876, 59879, 59883,
- 59887, 59891, 59895, 59900, 59904, 59908, 59912, 59916, 59920, 59924,
- 59928, 0, 0, 59933, 59941, 59949, 59956, 59963, 59967, 59973, 59978,
- 59983, 59987, 59990, 59994, 59997, 60001, 60004, 60008, 60011, 60015,
- 60018, 60021, 60025, 60029, 60033, 60037, 60041, 60045, 60049, 60053,
- 60057, 60060, 60064, 60068, 60072, 60076, 60080, 60084, 60088, 60092,
- 60096, 60100, 60104, 60108, 60112, 60117, 60121, 60125, 60129, 60133,
- 60136, 60140, 60143, 60147, 60151, 60155, 60159, 60162, 60166, 60169,
- 60173, 60177, 60181, 60185, 60189, 60193, 60197, 60201, 60205, 60209,
- 60213, 60217, 60220, 60224, 60228, 60232, 60236, 60240, 60243, 60248,
- 60252, 60257, 60261, 60264, 60268, 60272, 60276, 60280, 60285, 60289,
- 60293, 60297, 60301, 60305, 60309, 60313, 60318, 60322, 60326, 60330,
- 60334, 60339, 60346, 60350, 60356, 0, 0, 0, 0, 0, 60361, 60366, 60371,
- 60375, 60380, 60385, 60390, 60395, 60399, 60404, 60409, 60414, 60419,
- 60424, 60429, 60434, 60439, 60444, 60448, 60453, 60458, 60463, 60467,
- 60471, 60475, 60480, 60485, 60490, 60495, 60500, 60505, 60510, 60515,
- 60520, 60525, 60529, 60533, 60538, 60543, 60548, 60553, 0, 0, 0, 60558,
- 60562, 60566, 60570, 60574, 60578, 60582, 60586, 60590, 60594, 60598,
- 60602, 60606, 60610, 60614, 60618, 60622, 60626, 60630, 60634, 60638,
- 60642, 60646, 60650, 60654, 60658, 60662, 60666, 60670, 60674, 60678,
- 60681, 60685, 60688, 60692, 60696, 60699, 60703, 60707, 60710, 60714,
- 60718, 60722, 60726, 60729, 60733, 60737, 60741, 60745, 60749, 60753,
- 60756, 60759, 60763, 60767, 60771, 60775, 60779, 60783, 60787, 60791,
- 60795, 60799, 60803, 60807, 60811, 60815, 60819, 60823, 60827, 60831,
- 60835, 60839, 60843, 60847, 60851, 60855, 60859, 60863, 60867, 60871,
- 60875, 60879, 60883, 60887, 60891, 60895, 60899, 60903, 60907, 60911,
- 60915, 60919, 60923, 0, 60927, 60933, 60939, 60944, 60949, 60954, 60960,
- 60966, 60972, 60978, 60984, 60990, 60996, 61002, 61008, 61014, 61020,
- 61025, 61030, 61035, 61040, 61045, 61050, 61055, 61060, 61065, 61070,
- 61075, 61080, 61085, 61090, 61095, 61100, 61105, 61110, 61115, 61120,
- 61126, 61132, 61138, 61144, 61149, 61154, 0, 0, 0, 0, 0, 61159, 61164,
- 61169, 61174, 61179, 61184, 61189, 61194, 61199, 61204, 61209, 61214,
- 61219, 61224, 61229, 61234, 61239, 61244, 61249, 61254, 61259, 61264,
- 61269, 61274, 61279, 61284, 61289, 61294, 61299, 61304, 61309, 61314,
- 61319, 61324, 61329, 61334, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61339,
- 61344, 61349, 61354, 61358, 61363, 61367, 61372, 61377, 61382, 61387,
- 61392, 61396, 61401, 61406, 61411, 61416, 61420, 61424, 61428, 61432,
- 61436, 61440, 61444, 61448, 61452, 61456, 61460, 61464, 61468, 61472,
- 61477, 61482, 61487, 61492, 61497, 61502, 61507, 61512, 61517, 61522,
- 61527, 61532, 61537, 61542, 61547, 61553, 0, 61560, 61563, 61566, 61569,
- 61572, 61575, 61578, 61581, 61584, 61587, 61591, 61595, 61599, 61603,
- 61607, 61611, 61615, 61619, 61623, 61627, 61631, 61635, 61639, 61643,
- 61647, 61651, 61655, 61659, 61663, 61667, 61671, 61675, 61679, 61683,
- 61687, 61691, 61695, 61699, 61703, 61707, 61711, 61720, 61729, 61738,
- 61747, 61756, 61765, 61774, 61783, 61786, 61791, 61796, 61801, 61806,
- 61811, 61816, 61821, 61826, 61831, 61835, 61840, 61845, 61850, 61855,
- 61860, 61864, 61868, 61872, 61876, 61880, 61884, 61888, 61892, 61896,
- 61900, 61904, 61908, 61912, 61916, 61921, 61926, 61931, 61936, 61941,
- 61946, 61951, 61956, 61961, 61966, 61971, 61976, 61981, 61986, 61992,
- 61998, 62003, 62008, 62011, 62014, 62017, 62020, 62023, 62026, 62029,
- 62032, 62035, 62039, 62043, 62047, 62051, 62055, 62059, 62063, 62067,
- 62071, 62075, 62079, 62083, 62087, 62091, 62095, 62099, 62103, 62107,
- 62111, 62115, 62119, 62123, 62127, 62131, 62135, 62139, 62143, 62147,
- 62151, 62155, 62159, 62163, 62167, 62171, 62175, 62179, 62183, 62187,
- 62191, 62195, 62200, 62205, 62210, 62215, 62219, 62224, 62229, 62234,
- 62239, 62244, 62249, 62254, 62259, 62264, 62268, 62275, 62282, 62289,
- 62296, 62303, 62310, 62317, 62324, 62331, 62338, 62345, 62352, 62355,
- 62358, 62361, 62366, 62369, 62372, 62375, 62378, 62381, 62384, 62388,
- 62392, 62396, 62400, 62403, 62407, 62411, 62415, 62419, 62423, 62427,
- 62431, 62435, 62438, 62441, 62445, 62449, 62453, 62457, 62460, 62464,
- 62468, 62472, 62476, 62479, 62483, 62487, 62491, 62495, 62498, 62502,
- 62506, 62509, 62513, 62517, 62521, 62525, 62529, 62533, 62537, 0, 62541,
- 62544, 62547, 62550, 62553, 62556, 62559, 62562, 62565, 62568, 62571,
- 62574, 62577, 62580, 62583, 62586, 62589, 62592, 62595, 62598, 62601,
- 62604, 62607, 62610, 62613, 62616, 62619, 62622, 62625, 62628, 62631,
- 62634, 62637, 62640, 62643, 62646, 62649, 62652, 62655, 62658, 62661,
- 62664, 62667, 62670, 62673, 62676, 62679, 62682, 62685, 62688, 62691,
- 62694, 62697, 62700, 62703, 62706, 62709, 62712, 62715, 62718, 62721,
- 62724, 62727, 62730, 62733, 62736, 62739, 62742, 62745, 62748, 62751,
- 62754, 62757, 62760, 62763, 62766, 62769, 62772, 62775, 62778, 62781,
- 62784, 62787, 62790, 62793, 62796, 62799, 62802, 62805, 62814, 62822,
- 62830, 62838, 62846, 62854, 62862, 62870, 62878, 62886, 62895, 62904,
- 62913, 62922, 62931, 62940, 62949, 62958, 62967, 62976, 62985, 62994,
- 63003, 63012, 63021, 63024, 63027, 63030, 63032, 63035, 63038, 63041,
- 63046, 63051, 63054, 63061, 63068, 63075, 63082, 63085, 63090, 63092,
- 63096, 63098, 63100, 63103, 63106, 63109, 63112, 63115, 63118, 63121,
- 63126, 63131, 63134, 63137, 63140, 63143, 63146, 63149, 63152, 63156,
- 63159, 63162, 63165, 63168, 63171, 63175, 63178, 63181, 63184, 63189,
- 63194, 63199, 63204, 63209, 63214, 63219, 63224, 63230, 63238, 63240,
- 63243, 63246, 63249, 63252, 63258, 63266, 63269, 63272, 63277, 63280,
- 63283, 63286, 63291, 63294, 63297, 63302, 63305, 63308, 63313, 63316,
- 63319, 63324, 63329, 63334, 63337, 63340, 63343, 63346, 63352, 63355,
- 63358, 63361, 63363, 63366, 63369, 63372, 63377, 63380, 63383, 63386,
- 63389, 63392, 63397, 63400, 63403, 63406, 63409, 63412, 63415, 63418,
- 63421, 63424, 63429, 63433, 63441, 63449, 63457, 63465, 63473, 63481,
- 63489, 63497, 63505, 63514, 63523, 63532, 63541, 63550, 63559, 63568,
- 63577, 63586, 63595, 63604, 63613, 63622, 63631, 63640, 63649, 63658,
- 63667, 63676, 63685, 63694, 63703, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 63706, 63715, 63724, 63735, 63742, 63747, 63752, 63759, 63766,
- 63772, 63777, 63782, 63787, 63792, 63799, 63804, 63809, 63814, 63825,
- 63830, 63835, 63842, 63847, 63854, 63859, 63864, 63871, 63878, 63885,
- 63894, 63903, 63908, 63913, 63918, 63925, 63930, 63940, 63947, 63952,
- 63957, 63962, 63967, 63972, 63977, 63986, 63993, 64000, 64005, 64012,
- 64017, 64024, 64033, 64044, 64049, 64058, 64063, 64070, 64079, 64088,
- 64093, 64098, 64105, 64111, 64118, 64125, 64129, 64133, 64136, 64140,
- 64144, 64148, 64152, 64156, 64160, 64164, 64167, 64171, 64175, 64179,
- 64183, 64187, 64191, 64194, 64198, 64202, 64205, 64209, 64213, 64217,
- 64221, 64225, 64229, 64233, 64237, 64241, 64245, 64249, 64253, 64257,
- 64261, 64265, 64269, 64273, 64277, 64281, 64285, 64289, 64293, 64297,
- 64301, 64305, 64309, 64313, 64317, 64321, 64325, 64329, 64333, 64337,
- 64341, 64345, 64349, 64353, 64357, 64361, 64365, 64369, 64373, 64377,
- 64381, 64384, 64388, 64392, 64396, 64400, 64404, 64408, 64412, 64416,
- 64420, 64424, 64428, 64432, 64436, 64440, 64444, 64448, 64452, 64456,
- 64460, 64464, 64468, 64472, 64476, 64480, 64484, 64488, 64492, 64496,
- 64500, 64504, 64508, 64512, 64516, 64520, 64524, 64528, 64532, 64536,
- 64540, 64544, 64548, 64552, 64556, 64560, 64564, 64568, 64572, 64576,
- 64580, 64584, 64588, 64592, 64596, 64600, 64604, 64608, 64612, 64616,
- 64620, 64624, 64628, 64632, 64636, 64640, 64644, 64648, 64652, 64656,
- 64660, 64664, 64668, 64672, 64676, 64680, 64684, 64688, 64692, 64696,
- 64700, 64704, 64708, 64712, 64716, 64720, 64724, 64728, 64732, 64736,
- 64740, 64744, 64748, 64752, 64756, 64760, 64764, 64768, 64772, 64776,
- 64780, 64784, 64788, 64792, 64796, 64800, 64804, 64808, 64812, 64816,
- 64820, 64824, 64828, 64832, 64836, 64840, 64844, 64848, 64852, 64855,
- 64859, 64863, 64867, 64871, 64875, 64879, 64883, 64887, 64891, 64895,
- 64899, 64903, 64907, 64911, 64915, 64919, 64923, 64927, 64931, 64935,
- 64939, 64943, 64947, 64951, 64955, 64959, 64963, 64967, 64971, 64975,
- 64979, 64983, 64987, 64991, 64995, 64999, 65003, 65007, 65011, 65015,
- 65019, 65023, 65027, 65031, 65035, 65039, 65043, 65047, 65051, 65055,
- 65059, 65063, 65067, 65071, 65075, 65079, 65083, 65087, 65091, 65095,
- 65099, 65103, 65107, 65111, 65115, 65119, 65123, 65127, 65131, 65135,
- 65139, 65143, 65147, 65151, 65155, 65159, 65163, 65167, 65171, 65175,
- 65179, 65183, 65187, 65191, 65195, 65199, 65203, 65207, 65211, 65215,
- 65219, 65223, 65227, 65231, 65235, 65239, 65243, 65247, 65251, 65255,
- 65259, 65263, 65267, 65271, 65275, 65279, 65283, 65287, 65291, 65295,
- 65299, 65303, 65307, 65311, 65315, 65318, 65322, 65326, 65330, 65334,
- 65338, 65342, 65346, 65350, 65354, 65358, 65362, 65366, 65370, 65374,
- 65378, 65382, 65386, 65390, 65394, 65398, 65402, 65406, 65410, 65414,
- 65418, 65422, 65426, 65430, 65434, 65438, 65442, 65446, 65450, 65454,
- 65458, 65462, 65466, 65470, 65474, 65478, 65482, 65486, 65490, 65494,
- 65498, 65502, 65506, 65510, 65514, 65518, 65522, 65526, 65530, 65534,
- 65538, 65542, 65546, 65550, 65554, 65558, 65562, 65566, 65570, 65574,
- 65578, 65582, 65586, 65590, 65594, 65598, 65602, 65606, 65610, 65614,
- 65618, 65622, 65626, 65630, 65634, 65638, 65642, 65646, 65650, 65654,
- 65658, 65662, 65666, 65670, 65674, 65677, 65681, 65685, 65689, 65693,
- 65697, 65701, 65705, 65709, 65713, 65717, 65721, 65725, 65729, 65733,
- 65737, 65741, 65745, 65749, 65753, 65757, 65761, 65765, 65769, 65773,
- 65777, 65781, 65785, 65789, 65793, 65797, 65801, 65805, 65809, 65813,
- 65817, 65821, 65825, 65829, 65833, 65837, 65841, 65845, 65849, 65853,
- 65857, 65861, 65865, 65869, 65873, 65877, 65881, 65885, 65889, 65893,
- 65897, 65901, 65905, 65909, 65913, 65917, 65921, 65925, 65929, 65933,
- 65937, 65941, 65945, 65949, 65953, 65957, 65961, 65965, 65969, 65973,
- 65977, 65981, 65985, 65989, 65993, 65997, 66001, 66005, 66009, 66013,
- 66017, 66021, 66025, 66029, 66033, 66037, 66041, 66045, 66049, 66053,
- 66057, 66061, 66065, 66069, 66073, 66077, 66081, 66085, 66089, 66093,
- 66097, 66101, 66105, 66109, 66113, 66117, 66121, 66125, 66129, 66133,
- 66137, 66141, 66145, 66149, 66153, 66157, 66161, 66165, 66169, 66172,
- 66176, 66180, 66184, 66188, 66192, 66196, 66200, 66204, 66208, 66212,
- 66216, 66220, 66224, 66228, 66232, 66236, 66240, 66244, 66248, 66252,
- 66256, 66260, 66264, 66268, 66272, 66276, 66280, 66284, 66288, 66292,
- 66296, 66300, 66304, 66308, 66312, 66316, 66320, 66324, 66328, 66332,
- 66336, 66340, 66344, 66348, 66352, 66356, 66360, 66364, 66368, 66372,
- 66376, 66380, 66384, 66388, 66392, 66396, 66400, 66404, 66408, 66412,
- 66416, 66420, 66424, 66428, 66432, 66436, 66440, 66444, 66448, 66452,
- 66456, 66460, 66464, 66468, 66472, 66476, 66480, 66484, 66488, 66492,
- 66496, 66500, 66504, 66508, 66512, 66516, 66520, 66524, 66528, 66532,
- 66536, 66540, 66544, 66548, 66552, 66556, 66560, 66564, 66568, 66572,
- 66576, 66580, 66584, 66588, 66592, 66596, 66600, 66604, 66608, 66612,
- 66616, 66620, 66624, 66627, 66631, 66635, 66639, 66643, 66647, 66651,
- 66655, 66659, 66663, 66667, 66671, 66675, 66679, 66683, 66687, 66691,
- 66695, 66699, 66703, 66707, 66711, 66715, 66719, 66723, 66727, 66731,
- 66735, 66739, 66743, 66747, 66751, 66755, 66759, 66763, 66767, 66771,
- 66775, 66779, 66783, 66787, 66791, 66795, 66799, 66803, 66807, 66811,
- 66815, 66819, 66823, 66827, 66831, 66835, 66839, 66843, 66847, 66851,
- 66855, 66859, 66863, 66867, 66871, 66875, 66879, 66883, 66887, 66891,
- 66895, 66899, 66903, 66907, 66911, 66915, 66919, 66923, 66927, 66931,
- 66935, 66939, 66943, 66947, 66951, 66955, 66959, 66963, 66967, 66971,
- 66975, 66979, 66983, 66987, 66991, 66995, 66999, 67003, 67007, 67011,
- 67015, 67019, 67023, 67027, 67031, 67035, 67039, 67043, 67047, 67051,
- 67055, 67059, 67063, 67067, 67071, 67075, 67079, 67083, 67087, 67091,
- 67095, 67099, 67103, 67107, 67111, 67115, 67119, 67123, 67127, 67131,
- 67135, 67139, 67143, 67147, 67151, 67155, 67159, 67163, 67167, 67171,
- 67175, 67179, 67183, 67187, 67191, 67195, 67199, 67203, 67207, 67211,
- 67215, 67219, 67223, 67227, 67230, 67234, 67238, 67242, 67246, 67250,
- 67254, 67258, 67261, 67265, 67269, 67273, 67277, 67281, 67285, 67289,
- 67293, 67297, 67301, 67305, 67309, 67313, 67317, 67321, 67325, 67329,
- 67333, 67337, 67341, 67345, 67349, 67353, 67357, 67361, 67365, 67369,
- 67373, 67377, 67381, 67385, 67389, 67393, 67397, 67401, 67405, 67409,
- 67413, 67417, 67421, 67425, 67429, 67433, 67437, 67441, 67445, 67449,
- 67453, 67457, 67461, 67465, 67469, 67473, 67477, 67481, 67485, 67489,
- 67493, 67497, 67501, 67505, 67509, 67513, 67517, 67521, 67525, 67529,
- 67533, 67537, 67541, 67545, 67549, 67553, 67557, 67561, 67565, 67569,
- 67573, 67577, 67581, 67585, 67589, 67593, 67597, 67601, 67605, 67609,
- 67613, 67617, 67621, 67625, 67629, 67633, 67637, 67641, 67645, 67649,
- 67653, 67657, 67661, 67665, 67669, 67673, 67677, 67681, 67685, 67689,
- 67693, 67697, 67701, 67705, 67709, 67713, 67717, 67721, 67725, 67729,
- 67733, 67737, 67741, 67745, 67749, 67753, 67757, 67761, 67765, 67769,
- 67773, 67777, 67781, 67785, 67789, 67793, 67797, 67801, 67805, 67809,
- 67813, 67817, 67821, 67825, 67829, 67833, 67837, 67841, 67845, 67849,
- 67853, 67857, 67861, 67865, 67869, 67873, 67877, 67881, 67885, 67889,
- 67893, 67897, 67901, 67905, 67909, 67913, 67917, 67921, 67925, 67929,
- 67933, 67937, 67941, 67945, 67949, 67953, 67957, 67961, 67965, 67969,
- 67973, 67977, 67981, 67985, 67988, 67992, 67996, 68000, 68004, 68008,
- 68012, 68016, 68020, 68024, 68028, 68032, 68036, 68040, 68044, 68048,
- 68052, 68056, 68060, 68064, 68068, 68072, 68076, 68080, 68084, 68088,
- 68092, 68096, 68100, 68104, 68108, 68112, 68116, 68120, 68124, 68128,
- 68132, 68136, 68140, 68144, 68148, 68152, 68156, 68160, 68164, 68168,
- 68172, 68176, 68180, 68184, 68188, 68192, 68196, 68200, 68204, 68208,
- 68212, 68216, 68220, 68224, 68228, 68232, 68236, 68240, 68244, 68248,
- 68252, 68256, 68260, 68264, 68268, 68272, 68276, 68280, 68284, 68288,
- 68292, 68296, 68300, 68304, 68308, 68312, 68316, 68320, 68324, 68328,
- 68332, 68336, 68340, 68344, 68348, 68352, 68356, 68360, 68364, 68368,
- 68372, 68376, 68380, 68384, 68388, 68392, 68396, 68400, 68404, 68408,
- 68412, 68416, 68420, 68424, 68428, 68432, 68436, 68440, 68444, 68448,
- 68452, 68456, 68460, 68464, 68468, 68472, 68476, 68480, 68484, 68488,
- 68492, 68496, 68500, 68504, 68508, 68512, 68516, 68520, 68524, 68528,
- 68532, 68536, 68540, 68544, 68548, 68552, 68556, 68560, 68564, 68568,
- 68572, 68576, 68580, 68584, 68588, 68592, 68596, 68600, 68604, 68608,
- 68612, 68616, 68620, 68624, 68628, 68632, 68636, 68640, 68644, 68648,
- 68652, 68656, 68660, 68664, 68668, 68672, 68676, 68680, 68684, 68688,
- 68692, 68696, 68700, 68704, 68708, 68712, 68716, 68720, 68724, 68728,
- 68732, 68736, 68740, 68744, 68748, 68752, 68756, 68760, 68764, 68768, 0,
- 0, 0, 68772, 68776, 68780, 68784, 68788, 68792, 68796, 68800, 68804,
- 68808, 68812, 68816, 68820, 68824, 68828, 68832, 68836, 68840, 68844,
- 68848, 68852, 68856, 68860, 68864, 68868, 68872, 68876, 68880, 68884,
- 68888, 68892, 68896, 68900, 68904, 68908, 68912, 68916, 68920, 68924,
- 68928, 68932, 68936, 68940, 68944, 68948, 68952, 68956, 68960, 68964,
- 68968, 68972, 68976, 68980, 68984, 68988, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 68992, 68997, 69001, 69006, 69011, 69016, 69021, 69026, 69030, 69035,
- 69040, 69045, 69050, 69055, 69060, 69065, 69069, 69073, 69078, 69082,
- 69087, 69092, 69097, 69101, 69106, 69111, 69116, 69121, 69126, 69130,
- 69135, 69139, 69144, 69148, 69153, 69157, 69161, 69165, 69170, 69175,
- 69180, 69188, 69196, 69204, 69212, 69219, 69227, 69233, 69241, 69245,
- 69249, 69253, 69257, 69261, 69265, 69269, 69273, 69277, 69281, 69285,
- 69289, 69293, 69297, 69301, 69305, 69309, 69313, 69317, 69321, 69325,
- 69329, 69333, 69337, 69341, 69345, 69349, 69353, 69357, 69361, 69365,
- 69369, 69373, 69377, 69381, 69385, 69388, 69392, 69396, 69400, 69404,
- 69408, 69412, 69416, 69420, 69424, 69428, 69432, 69436, 69440, 69444,
- 69448, 69452, 69456, 69460, 69464, 69468, 69472, 69476, 69480, 69484,
- 69488, 69492, 69496, 69500, 69504, 69508, 69512, 69516, 69520, 69524,
- 69528, 69532, 69535, 69539, 69543, 69546, 69550, 69554, 69558, 69561,
- 69565, 69569, 69573, 69577, 69581, 69585, 69589, 69593, 69597, 69601,
- 69605, 69609, 69613, 69617, 69620, 69624, 69628, 69631, 69635, 69639,
- 69643, 69647, 69651, 69655, 69658, 69661, 69665, 69669, 69673, 69676,
- 69679, 69683, 69687, 69691, 69695, 69699, 69703, 69707, 69711, 69715,
- 69719, 69723, 69727, 69731, 69735, 69739, 69743, 69747, 69751, 69755,
- 69759, 69763, 69767, 69771, 69775, 69779, 69783, 69787, 69791, 69795,
- 69799, 69803, 69807, 69811, 69815, 69819, 69823, 69827, 69830, 69834,
- 69838, 69842, 69846, 69850, 69854, 69858, 69862, 69866, 69870, 69874,
- 69878, 69882, 69886, 69890, 69894, 69898, 69902, 69906, 69910, 69914,
- 69918, 69922, 69926, 69930, 69934, 69938, 69942, 69946, 69950, 69954,
- 69958, 69962, 69966, 69970, 69974, 69977, 69981, 69985, 69989, 69993,
- 69997, 70001, 70005, 70009, 70013, 70017, 70021, 70025, 70029, 70033,
- 70037, 70041, 70044, 70048, 70052, 70056, 70060, 70064, 70068, 70072,
- 70076, 70080, 70084, 70088, 70092, 70096, 70100, 70104, 70108, 70112,
- 70116, 70120, 70124, 70128, 70131, 70135, 70139, 70143, 70147, 70151,
- 70155, 70159, 70163, 70167, 70171, 70175, 70179, 70183, 70187, 70191,
- 70195, 70199, 70203, 70207, 70211, 70215, 70219, 70223, 70227, 70231,
- 70235, 70239, 70243, 70247, 70251, 70255, 70259, 70263, 70267, 70271,
- 70275, 70279, 70283, 70287, 70291, 70295, 70299, 70303, 70306, 70311,
- 70315, 70321, 70326, 70332, 70336, 70340, 70344, 70348, 70352, 70356,
- 70360, 70364, 70368, 70372, 70376, 70380, 70384, 70388, 70391, 70394,
- 70397, 70400, 70403, 70406, 70409, 70412, 70415, 70420, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70426, 70431, 70436, 70441,
- 70446, 70453, 70460, 70465, 70470, 70475, 70480, 70487, 70494, 70501,
- 70508, 70515, 70522, 70532, 70542, 70549, 70556, 70563, 70570, 70576,
- 70582, 70591, 70600, 70607, 70614, 70625, 70636, 70641, 70646, 70653,
- 70660, 70667, 70674, 70681, 70688, 70695, 70702, 70708, 70714, 70720,
- 70726, 70733, 70740, 70745, 70749, 70756, 70763, 70770, 70774, 70781,
- 70785, 70790, 70794, 70800, 70805, 70811, 70816, 70820, 70824, 70827,
- 70830, 70835, 70840, 70845, 70850, 70855, 70860, 70865, 70870, 70875,
- 70880, 70889, 70898, 70903, 70908, 70913, 70918, 70923, 70928, 70933,
- 70938, 70943, 70948, 70953, 0, 0, 0, 0, 0, 0, 0, 70958, 70964, 70967,
- 70970, 70973, 70977, 70981, 70985, 70989, 70992, 70996, 70999, 71003,
- 71006, 71010, 71014, 71018, 71022, 71026, 71030, 71034, 71037, 71041,
- 71045, 71049, 71053, 71057, 71061, 71065, 71069, 71073, 71077, 71081,
- 71085, 71089, 71093, 71096, 71100, 71104, 71108, 71112, 71116, 71120,
- 71124, 71128, 71132, 71136, 71140, 71144, 71148, 71152, 71156, 71160,
- 71164, 71168, 71172, 71176, 71180, 71184, 71188, 71192, 71195, 71199,
- 71203, 71207, 71211, 71215, 71219, 71223, 71226, 71230, 71234, 71238,
- 71242, 71246, 71250, 71254, 71258, 71262, 71266, 71270, 71274, 71279,
- 71284, 71287, 71292, 71295, 71298, 71301, 0, 0, 0, 0, 0, 0, 0, 0, 71305,
- 71314, 71323, 71332, 71341, 71350, 71359, 71368, 71377, 71385, 71392,
- 71400, 71407, 71415, 71425, 71434, 71444, 71453, 71463, 71471, 71478,
- 71486, 71493, 71501, 71506, 71511, 71516, 71525, 71531, 71537, 71544,
- 71553, 71561, 71569, 71577, 71584, 71591, 71598, 71605, 71610, 71615,
- 71620, 71625, 71630, 71635, 71640, 71645, 71653, 71661, 71667, 71673,
- 71678, 71683, 71688, 71693, 71698, 71703, 71708, 71713, 71721, 71729,
- 71734, 71739, 71749, 71759, 71766, 71773, 71782, 71791, 71803, 71815,
- 71821, 71827, 71835, 71843, 71853, 71863, 71870, 71877, 71882, 71887,
- 71899, 71911, 71919, 71927, 71937, 71947, 71959, 71971, 71980, 71989,
- 71996, 72003, 72010, 72017, 72026, 72035, 72040, 72045, 72052, 72059,
- 72066, 72073, 72085, 72097, 72102, 72107, 72112, 72117, 72122, 72127,
- 72132, 72137, 72141, 72146, 72151, 72156, 72161, 72166, 72172, 72177,
- 72182, 72189, 72196, 72203, 72210, 72217, 72226, 72235, 72241, 72247,
- 72253, 72259, 72266, 72273, 72280, 72287, 72294, 72298, 72305, 72310,
- 72315, 72322, 0, 72335, 72343, 72351, 72358, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 72365, 72374, 72383, 72392, 72401, 72410, 72419, 72428, 72437,
- 72446, 72455, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 72462, 72469, 72475, 72482, 72490, 72498,
- 72505, 72513, 72520, 72526, 72532, 72539, 72545, 72551, 72557, 72564,
- 72571, 72578, 72585, 72592, 72599, 72606, 72613, 72620, 72627, 72634,
- 72641, 72648, 72655, 72661, 72668, 72675, 72682, 72689, 72696, 72703,
- 72710, 72717, 72724, 72731, 72738, 72745, 72752, 72759, 72766, 72773,
- 72780, 72787, 72795, 72803, 72811, 72819, 0, 0, 0, 0, 72827, 72836,
- 72845, 72854, 72863, 72872, 72881, 72888, 72895, 72902, 0, 0, 0, 0, 0, 0,
- 72909, 72913, 72918, 72923, 72928, 72933, 72938, 72943, 72948, 72953,
- 72958, 72963, 72967, 72971, 72976, 72981, 72985, 72990, 72995, 73000,
- 73005, 73010, 73015, 73020, 73024, 73028, 73033, 73038, 73042, 73046,
- 73050, 73054, 73058, 73062, 73066, 73071, 73076, 73081, 73086, 73091,
- 73098, 73104, 73109, 73114, 73119, 73124, 73130, 73137, 73143, 73150,
- 73156, 73162, 73167, 73174, 73180, 73185, 0, 0, 0, 0, 0, 0, 0, 0, 73191,
- 73195, 73199, 73202, 73206, 73209, 73213, 73216, 73220, 73224, 73229,
- 73233, 73238, 73241, 73245, 73249, 73252, 73256, 73260, 73263, 73267,
- 73271, 73275, 73279, 73283, 73287, 73291, 73295, 73299, 73303, 73307,
- 73311, 73315, 73319, 73323, 73327, 73331, 73335, 73338, 73341, 73345,
- 73349, 73353, 73356, 73359, 73362, 73366, 73370, 73374, 73378, 73381,
- 73384, 73388, 73393, 73398, 73402, 73407, 73411, 73416, 73421, 73427,
- 73432, 73438, 73442, 73447, 73452, 73456, 73461, 73466, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 73470, 73473, 73477, 73481, 73484, 73487, 73490, 73493, 73496,
- 73499, 73502, 73505, 0, 0, 0, 0, 0, 0, 73508, 73513, 73517, 73521, 73525,
- 73529, 73533, 73537, 73541, 73545, 73549, 73553, 73557, 73561, 73565,
- 73569, 73573, 73578, 73583, 73589, 73595, 73602, 73607, 73612, 73618,
- 73622, 73627, 73630, 0, 0, 0, 0, 73633, 73640, 73646, 73652, 73658,
- 73664, 73670, 73676, 73682, 73688, 73694, 73700, 73707, 73714, 73721,
- 73727, 73734, 73741, 73748, 73755, 73762, 73768, 73774, 73781, 73787,
- 73794, 73801, 73807, 73813, 73820, 73827, 73834, 73840, 73847, 73854,
- 73860, 73867, 73873, 73880, 73887, 73893, 73899, 73906, 73912, 73919,
- 73926, 73935, 73942, 73949, 73953, 73958, 73963, 73968, 73973, 73977,
- 73981, 73986, 73990, 73995, 74000, 74005, 74009, 74013, 74018, 74022,
- 74027, 74031, 74036, 74041, 74046, 74051, 74055, 74060, 74065, 74070,
- 74076, 74081, 74087, 74093, 74099, 74105, 74111, 74116, 74122, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 74126, 74131, 74135, 74139, 74143, 74147, 74151,
- 74155, 74159, 74163, 74167, 74171, 74175, 74179, 74183, 74187, 74191,
- 74195, 74199, 74203, 74207, 74211, 74215, 74219, 74223, 74227, 74231,
- 74235, 74239, 74243, 0, 0, 0, 74247, 74251, 74255, 74259, 74263, 74266,
- 74272, 74275, 74279, 74282, 74288, 74294, 74302, 74305, 74309, 74312,
- 74315, 74321, 74327, 74331, 74337, 74341, 74345, 74351, 74355, 74361,
- 74367, 74371, 74375, 74381, 74385, 74391, 74397, 74401, 74407, 74411,
- 74417, 74420, 74423, 74429, 74433, 74439, 74442, 74445, 74448, 74454,
- 74458, 74462, 74468, 74474, 74477, 74480, 74486, 74491, 74496, 74501,
- 74508, 74513, 74520, 74525, 74532, 74537, 74542, 74547, 74552, 74555,
- 74559, 74563, 74568, 74573, 74578, 74583, 74588, 74593, 74598, 74603,
- 74610, 74615, 0, 74622, 74625, 74629, 74632, 74635, 74638, 74641, 74644,
- 74647, 74650, 74653, 0, 0, 0, 0, 74656, 74663, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 74668, 74671, 74674, 74677, 74680, 74684, 74687, 74690, 74694, 74698,
- 74702, 74706, 74710, 74714, 74718, 74722, 74726, 74730, 74734, 74738,
- 74742, 74746, 74750, 74754, 74758, 74761, 74765, 74768, 74772, 74776,
- 74780, 74784, 74788, 74791, 74795, 74798, 74801, 74805, 74809, 74813,
- 74816, 74819, 74824, 74828, 74833, 74838, 74842, 74847, 74851, 74856,
- 74861, 74866, 74870, 74874, 74879, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74884,
- 74889, 74894, 74899, 74905, 74910, 74915, 74920, 74925, 74930, 74934,
- 74938, 74943, 74948, 0, 0, 74954, 74958, 74961, 74964, 74967, 74970,
- 74973, 74976, 74979, 74982, 0, 0, 74985, 74990, 74995, 75001, 75008,
- 75014, 75020, 75026, 75032, 75038, 75044, 75050, 75056, 75062, 75068,
- 75074, 75079, 75084, 75089, 75095, 75101, 75108, 75114, 75120, 75125,
- 75132, 75139, 75146, 75152, 75157, 75162, 75167, 0, 0, 0, 0, 75175,
- 75181, 75187, 75193, 75199, 75205, 75211, 75217, 75223, 75229, 75235,
- 75241, 75247, 75253, 75259, 75265, 75271, 75277, 75283, 75289, 75295,
- 75300, 75305, 75311, 75317, 75323, 75329, 75335, 75341, 75347, 75353,
- 75359, 75365, 75371, 75377, 75383, 75389, 75395, 75401, 75407, 75413,
- 75419, 75425, 75431, 75437, 75443, 75449, 75454, 75459, 75465, 75470,
- 75474, 75479, 75483, 75487, 75491, 75497, 75502, 75507, 75512, 75517,
- 75522, 75527, 75532, 75539, 75546, 75553, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75560, 75565, 75570, 75575,
- 75582, 75589, 75593, 75597, 75602, 75607, 75612, 75617, 75622, 75627,
- 75632, 75637, 75642, 75648, 75654, 75660, 75666, 75672, 75676, 75682,
- 75686, 75692, 75699, 75705, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75709, 75713,
- 75717, 75721, 75725, 75729, 0, 0, 75733, 75737, 75741, 75745, 75749,
- 75753, 0, 0, 75757, 75761, 75765, 75769, 75773, 75777, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 75781, 75785, 75789, 75793, 75797, 75801, 75805, 0, 75809,
- 75813, 75817, 75821, 75825, 75829, 75833, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 66088, 66097, 66106, 66117, 66124, 66129, 66134, 66141, 66148, 66154,
+ 66159, 66164, 66169, 66174, 66181, 66186, 66191, 66196, 66207, 66212,
+ 66217, 66224, 66229, 66236, 66241, 66246, 66253, 66260, 66267, 66276,
+ 66285, 66290, 66295, 66300, 66307, 66312, 66322, 66329, 66334, 66339,
+ 66344, 66349, 66354, 66359, 66368, 66375, 66382, 66387, 66394, 66399,
+ 66406, 66415, 66426, 66431, 66440, 66445, 66452, 66461, 66470, 66475,
+ 66480, 66487, 66493, 66500, 66507, 66511, 66515, 66518, 66522, 66526,
+ 66530, 66534, 66538, 66542, 66546, 66549, 66553, 66557, 66561, 66565,
+ 66569, 66573, 66576, 66580, 66584, 66587, 66591, 66595, 66599, 66603,
+ 66607, 66611, 66615, 66619, 66623, 66627, 66631, 66635, 66639, 66643,
+ 66647, 66651, 66655, 66659, 66663, 66667, 66671, 66675, 66679, 66683,
+ 66687, 66691, 66695, 66699, 66703, 66707, 66711, 66715, 66719, 66723,
+ 66727, 66731, 66735, 66739, 66743, 66747, 66751, 66755, 66759, 66763,
+ 66766, 66770, 66774, 66778, 66782, 66786, 66790, 66794, 66798, 66802,
+ 66806, 66810, 66814, 66818, 66822, 66826, 66830, 66834, 66838, 66842,
+ 66846, 66850, 66854, 66858, 66862, 66866, 66870, 66874, 66878, 66882,
+ 66886, 66890, 66894, 66898, 66902, 66906, 66910, 66914, 66918, 66922,
+ 66926, 66930, 66934, 66938, 66942, 66946, 66950, 66954, 66958, 66962,
+ 66966, 66970, 66974, 66978, 66982, 66986, 66990, 66994, 66998, 67002,
+ 67006, 67010, 67014, 67018, 67022, 67026, 67030, 67034, 67038, 67042,
+ 67046, 67050, 67054, 67058, 67062, 67066, 67070, 67074, 67078, 67082,
+ 67086, 67090, 67094, 67098, 67102, 67106, 67110, 67114, 67118, 67122,
+ 67126, 67130, 67134, 67138, 67142, 67146, 67150, 67154, 67158, 67162,
+ 67166, 67170, 67174, 67178, 67182, 67186, 67190, 67194, 67198, 67202,
+ 67206, 67210, 67214, 67218, 67222, 67226, 67230, 67234, 67237, 67241,
+ 67245, 67249, 67253, 67257, 67261, 67265, 67269, 67273, 67277, 67281,
+ 67285, 67289, 67293, 67297, 67301, 67305, 67309, 67313, 67317, 67321,
+ 67325, 67329, 67333, 67337, 67341, 67345, 67349, 67353, 67357, 67361,
+ 67365, 67369, 67373, 67377, 67381, 67385, 67389, 67393, 67397, 67401,
+ 67405, 67409, 67413, 67417, 67421, 67425, 67429, 67433, 67437, 67441,
+ 67445, 67449, 67453, 67457, 67461, 67465, 67469, 67473, 67477, 67481,
+ 67485, 67489, 67493, 67497, 67501, 67505, 67509, 67513, 67517, 67521,
+ 67525, 67529, 67533, 67537, 67541, 67545, 67549, 67553, 67557, 67561,
+ 67565, 67569, 67573, 67577, 67581, 67585, 67589, 67593, 67597, 67601,
+ 67605, 67609, 67613, 67617, 67621, 67625, 67629, 67633, 67637, 67641,
+ 67645, 67649, 67653, 67657, 67661, 67665, 67669, 67673, 67677, 67681,
+ 67685, 67689, 67693, 67697, 67700, 67704, 67708, 67712, 67716, 67720,
+ 67724, 67728, 67732, 67736, 67740, 67744, 67748, 67752, 67756, 67760,
+ 67764, 67768, 67772, 67776, 67780, 67784, 67788, 67792, 67796, 67800,
+ 67804, 67808, 67812, 67816, 67820, 67824, 67828, 67832, 67836, 67840,
+ 67844, 67848, 67852, 67856, 67860, 67864, 67868, 67872, 67876, 67880,
+ 67884, 67888, 67892, 67896, 67900, 67904, 67908, 67912, 67916, 67920,
+ 67924, 67928, 67932, 67936, 67940, 67944, 67948, 67952, 67956, 67960,
+ 67964, 67968, 67972, 67976, 67980, 67984, 67988, 67992, 67996, 68000,
+ 68004, 68008, 68012, 68016, 68020, 68024, 68028, 68032, 68036, 68040,
+ 68044, 68048, 68052, 68056, 68060, 68064, 68068, 68072, 68076, 68080,
+ 68084, 68088, 68092, 68096, 68100, 68104, 68108, 68112, 68116, 68120,
+ 68124, 68128, 68132, 68136, 68140, 68144, 68148, 68152, 68156, 68160,
+ 68164, 68168, 68172, 68176, 68180, 68184, 68188, 68192, 68196, 68200,
+ 68204, 68208, 68212, 68216, 68220, 68224, 68228, 68232, 68236, 68240,
+ 68244, 68248, 68252, 68256, 68260, 68264, 68268, 68272, 68276, 68280,
+ 68284, 68288, 68292, 68296, 68300, 68304, 68308, 68312, 68316, 68320,
+ 68324, 68328, 68332, 68336, 68340, 68344, 68348, 68352, 68356, 68360,
+ 68364, 68368, 68372, 68376, 68380, 68384, 68388, 68392, 68396, 68400,
+ 68404, 68408, 68412, 68416, 68420, 68424, 68428, 68432, 68436, 68440,
+ 68444, 68448, 68452, 68456, 68460, 68464, 68468, 68472, 68476, 68480,
+ 68484, 68488, 68492, 68496, 68500, 68504, 68508, 68512, 68516, 68520,
+ 68524, 68528, 68532, 68536, 68540, 68544, 68548, 68552, 68555, 68559,
+ 68563, 68567, 68571, 68575, 68579, 68583, 68587, 68591, 68595, 68599,
+ 68603, 68607, 68611, 68615, 68619, 68623, 68627, 68631, 68635, 68639,
+ 68643, 68647, 68651, 68655, 68659, 68663, 68667, 68671, 68675, 68679,
+ 68683, 68687, 68691, 68695, 68699, 68703, 68707, 68711, 68715, 68719,
+ 68723, 68727, 68731, 68735, 68739, 68743, 68747, 68751, 68755, 68759,
+ 68763, 68767, 68771, 68775, 68779, 68783, 68787, 68791, 68795, 68799,
+ 68803, 68807, 68811, 68815, 68819, 68823, 68827, 68831, 68835, 68839,
+ 68843, 68847, 68851, 68855, 68859, 68863, 68867, 68871, 68875, 68879,
+ 68883, 68887, 68891, 68895, 68899, 68903, 68907, 68911, 68915, 68919,
+ 68923, 68927, 68931, 68935, 68939, 68943, 68947, 68951, 68955, 68959,
+ 68963, 68967, 68971, 68975, 68979, 68983, 68987, 68991, 68995, 68999,
+ 69003, 69007, 69010, 69014, 69018, 69022, 69026, 69030, 69034, 69038,
+ 69042, 69046, 69050, 69054, 69058, 69062, 69066, 69070, 69074, 69078,
+ 69082, 69086, 69090, 69094, 69098, 69102, 69106, 69110, 69114, 69118,
+ 69122, 69126, 69130, 69134, 69138, 69142, 69146, 69150, 69154, 69158,
+ 69162, 69166, 69170, 69174, 69178, 69182, 69186, 69190, 69194, 69198,
+ 69202, 69206, 69210, 69214, 69218, 69222, 69226, 69230, 69234, 69238,
+ 69242, 69246, 69250, 69254, 69258, 69262, 69266, 69270, 69274, 69278,
+ 69282, 69286, 69290, 69294, 69298, 69302, 69306, 69310, 69314, 69318,
+ 69322, 69326, 69330, 69334, 69338, 69342, 69346, 69350, 69354, 69358,
+ 69362, 69366, 69370, 69374, 69378, 69382, 69386, 69390, 69394, 69398,
+ 69402, 69406, 69410, 69414, 69418, 69422, 69426, 69430, 69434, 69438,
+ 69442, 69446, 69450, 69454, 69458, 69462, 69466, 69470, 69474, 69478,
+ 69482, 69486, 69490, 69494, 69498, 69502, 69506, 69510, 69514, 69518,
+ 69522, 69526, 69530, 69534, 69538, 69542, 69546, 69550, 69554, 69558,
+ 69562, 69566, 69570, 69574, 69578, 69582, 69586, 69590, 69594, 69598,
+ 69602, 69606, 69610, 69613, 69617, 69621, 69625, 69629, 69633, 69637,
+ 69641, 69645, 69649, 69653, 69657, 69661, 69665, 69669, 69673, 69677,
+ 69681, 69685, 69689, 69693, 69697, 69701, 69705, 69709, 69713, 69717,
+ 69721, 69725, 69729, 69733, 69737, 69741, 69745, 69749, 69753, 69757,
+ 69761, 69765, 69769, 69773, 69777, 69781, 69785, 69789, 69793, 69797,
+ 69801, 69805, 69809, 69813, 69817, 69821, 69825, 69829, 69833, 69837,
+ 69841, 69845, 69849, 69853, 69857, 69861, 69865, 69869, 69873, 69877,
+ 69881, 69885, 69889, 69893, 69897, 69901, 69905, 69909, 69913, 69917,
+ 69921, 69925, 69929, 69933, 69937, 69941, 69945, 69949, 69953, 69957,
+ 69961, 69965, 69969, 69973, 69977, 69981, 69985, 69989, 69993, 69997,
+ 70001, 70005, 70009, 70013, 70017, 70021, 70025, 70029, 70033, 70037,
+ 70041, 70045, 70049, 70053, 70057, 70061, 70065, 70069, 70073, 70077,
+ 70081, 70085, 70089, 70093, 70097, 70101, 70105, 70109, 70113, 70117,
+ 70121, 70125, 70129, 70133, 70137, 70141, 70145, 70149, 70153, 70157,
+ 70161, 70165, 70169, 70173, 70177, 70181, 70185, 70189, 70193, 70197,
+ 70201, 70205, 70209, 70213, 70217, 70221, 70225, 70229, 70233, 70237,
+ 70241, 70245, 70249, 70253, 70257, 70261, 70265, 70269, 70273, 70277,
+ 70281, 70285, 70289, 70293, 70297, 70301, 70305, 70309, 70313, 70317,
+ 70321, 70325, 70329, 70333, 70337, 70341, 70345, 70349, 70353, 70357,
+ 70361, 70365, 70369, 70373, 70377, 70381, 70385, 70389, 70393, 70397,
+ 70401, 70405, 70409, 70413, 70417, 70421, 70425, 70429, 70433, 70437,
+ 70441, 70445, 70449, 70453, 70457, 70461, 70465, 70469, 70473, 70477,
+ 70481, 70485, 70489, 70493, 70497, 70501, 70505, 70509, 70513, 70517,
+ 70521, 70525, 70529, 70533, 70537, 70541, 70545, 70549, 70553, 70557,
+ 70561, 70565, 70569, 70573, 70577, 70581, 70585, 70589, 70593, 70597,
+ 70601, 70605, 70609, 70613, 70617, 70621, 70625, 70629, 70633, 70637,
+ 70641, 70645, 70649, 70653, 70657, 70661, 70665, 70669, 70673, 70677,
+ 70681, 70685, 70689, 70693, 70697, 70701, 70705, 70709, 70713, 70717,
+ 70721, 70725, 70729, 70733, 70737, 70741, 70745, 70749, 70753, 70757,
+ 70761, 70765, 70769, 70773, 70777, 70781, 70785, 70789, 70793, 70797,
+ 70801, 70805, 70809, 70813, 70817, 70821, 70825, 70829, 70833, 70837,
+ 70841, 70845, 70849, 70853, 70857, 70861, 70865, 70869, 70873, 70877,
+ 70881, 70885, 70889, 70893, 70897, 70901, 70905, 70909, 70913, 70917,
+ 70921, 70925, 70929, 70933, 70937, 70941, 70945, 70949, 70953, 70957,
+ 70961, 70965, 70969, 70973, 70977, 70981, 70985, 70989, 70993, 70997,
+ 71001, 71005, 71009, 71013, 71017, 71021, 71025, 71029, 71033, 71037,
+ 71041, 71045, 71049, 71053, 71057, 71061, 71065, 71069, 71073, 71077,
+ 71081, 71085, 71089, 71093, 71097, 71101, 71105, 71109, 71113, 71117,
+ 71121, 71125, 71129, 71133, 71137, 71141, 71145, 71149, 71153, 0, 0, 0,
+ 71157, 71161, 71165, 71169, 71173, 71177, 71181, 71185, 71189, 71193,
+ 71197, 71201, 71205, 71209, 71213, 71217, 71221, 71225, 71229, 71233,
+ 71237, 71241, 71245, 71249, 71253, 71257, 71261, 71265, 71269, 71273,
+ 71277, 71281, 71285, 71289, 71293, 71297, 71301, 71305, 71309, 71313,
+ 71317, 71321, 71325, 71329, 71333, 71337, 71341, 71345, 71349, 71353,
+ 71357, 71361, 71365, 71369, 71373, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71377,
+ 71382, 71386, 71391, 71396, 71401, 71406, 71411, 71415, 71420, 71425,
+ 71430, 71435, 71440, 71445, 71450, 71454, 71459, 71464, 71469, 71474,
+ 71479, 71484, 71488, 71493, 71498, 71503, 71508, 71513, 71517, 71522,
+ 71526, 71531, 71535, 71540, 71544, 71548, 71552, 71557, 71562, 71567,
+ 71575, 71583, 71591, 71599, 71607, 71615, 71621, 71629, 71633, 71637,
+ 71641, 71645, 71649, 71653, 71657, 71661, 71665, 71669, 71673, 71677,
+ 71681, 71685, 71689, 71693, 71697, 71701, 71705, 71709, 71713, 71717,
+ 71721, 71725, 71729, 71733, 71737, 71741, 71745, 71749, 71753, 71757,
+ 71761, 71765, 71769, 71773, 71776, 71780, 71784, 71788, 71792, 71796,
+ 71800, 71804, 71808, 71812, 71816, 71820, 71824, 71828, 71832, 71836,
+ 71840, 71844, 71848, 71852, 71856, 71860, 71864, 71868, 71872, 71876,
+ 71880, 71884, 71888, 71892, 71896, 71900, 71904, 71908, 71912, 71916,
+ 71920, 71923, 71927, 71931, 71934, 71938, 71942, 71946, 71949, 71953,
+ 71957, 71961, 71965, 71969, 71973, 71977, 71981, 71985, 71989, 71993,
+ 71997, 72001, 72005, 72009, 72013, 72017, 72021, 72025, 72029, 72033,
+ 72037, 72041, 72045, 72048, 72051, 72055, 72059, 72063, 72066, 72070,
+ 72074, 72078, 72082, 72086, 72090, 72094, 72098, 72102, 72106, 72110,
+ 72114, 72118, 72122, 72126, 72130, 72134, 72138, 72142, 72146, 72150,
+ 72154, 72158, 72162, 72166, 72170, 72174, 72178, 72182, 72186, 72190,
+ 72194, 72198, 72202, 72206, 72210, 72214, 72218, 72221, 72225, 72229,
+ 72233, 72237, 72241, 72245, 72249, 72253, 72257, 72261, 72265, 72269,
+ 72273, 72277, 72281, 72285, 72289, 72293, 72297, 72301, 72305, 72309,
+ 72313, 72317, 72321, 72325, 72329, 72333, 72337, 72341, 72345, 72349,
+ 72353, 72357, 72361, 72365, 72368, 72372, 72376, 72380, 72384, 72388,
+ 72392, 72396, 72400, 72404, 72408, 72412, 72416, 72420, 72424, 72428,
+ 72432, 72435, 72439, 72443, 72447, 72451, 72455, 72459, 72463, 72467,
+ 72471, 72475, 72479, 72483, 72487, 72491, 72495, 72499, 72503, 72507,
+ 72511, 72515, 72519, 72522, 72526, 72530, 72534, 72538, 72542, 72546,
+ 72550, 72554, 72558, 72562, 72566, 72570, 72574, 72578, 72582, 72586,
+ 72590, 72594, 72598, 72602, 72606, 72610, 72614, 72618, 72622, 72626,
+ 72630, 72634, 72638, 72642, 72646, 72650, 72654, 72658, 72662, 72666,
+ 72670, 72674, 72678, 72682, 72686, 72690, 72694, 72697, 72702, 72706,
+ 72712, 72717, 72723, 72727, 72731, 72735, 72739, 72743, 72747, 72751,
+ 72755, 72759, 72763, 72767, 72771, 72775, 72779, 72782, 72785, 72788,
+ 72791, 72794, 72797, 72801, 72804, 72808, 72813, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72819, 72824, 72829, 72834, 72839,
+ 72846, 72853, 72858, 72863, 72868, 72873, 72880, 72887, 72894, 72901,
+ 72908, 72915, 72925, 72935, 72942, 72949, 72956, 72963, 72969, 72975,
+ 72984, 72993, 73000, 73007, 73018, 73029, 73034, 73039, 73046, 73053,
+ 73060, 73067, 73074, 73081, 73088, 73095, 73101, 73107, 73113, 73119,
+ 73126, 73133, 73138, 73142, 73149, 73156, 73163, 73167, 73174, 73178,
+ 73183, 73187, 73193, 73198, 73204, 73209, 73213, 73217, 73220, 73223,
+ 73228, 73233, 73238, 73243, 73248, 73253, 73258, 73263, 73268, 73273,
+ 73281, 73289, 73294, 73299, 73304, 73309, 73314, 73319, 73324, 73329,
+ 73334, 73339, 73344, 73349, 73354, 73359, 73365, 73371, 73377, 73383,
+ 73388, 73394, 73397, 73400, 73403, 73407, 73411, 73415, 73419, 73422,
+ 73426, 73429, 73433, 73436, 73440, 73444, 73448, 73452, 73456, 73460,
+ 73464, 73468, 73472, 73476, 73480, 73484, 73488, 73492, 73496, 73500,
+ 73504, 73508, 73512, 73516, 73520, 73524, 73527, 73531, 73535, 73539,
+ 73543, 73547, 73551, 73555, 73559, 73563, 73567, 73571, 73575, 73579,
+ 73583, 73587, 73591, 73595, 73599, 73603, 73607, 73611, 73615, 73619,
+ 73623, 73627, 73631, 73635, 73639, 73643, 73647, 73651, 73655, 73658,
+ 73662, 73666, 73670, 73674, 73678, 73682, 73686, 73690, 73694, 73698,
+ 73702, 73706, 73711, 73716, 73719, 73724, 73727, 73730, 73733, 0, 0, 0,
+ 0, 0, 0, 0, 0, 73737, 73746, 73755, 73764, 73773, 73782, 73791, 73800,
+ 73809, 73817, 73824, 73832, 73839, 73847, 73857, 73866, 73876, 73885,
+ 73895, 73903, 73910, 73918, 73925, 73933, 73938, 73943, 73949, 73958,
+ 73964, 73970, 73977, 73986, 73994, 74002, 74010, 74017, 74024, 74031,
+ 74038, 74043, 74048, 74053, 74058, 74063, 74068, 74073, 74078, 74086,
+ 74094, 74100, 74105, 74110, 74115, 74120, 74125, 74130, 74135, 74140,
+ 74145, 74154, 74163, 74168, 74173, 74183, 74193, 74200, 74207, 74216,
+ 74225, 74237, 74249, 74255, 74261, 74269, 74277, 74287, 74297, 74304,
+ 74311, 74316, 74321, 74333, 74345, 74353, 74361, 74371, 74381, 74393,
+ 74405, 74414, 74423, 74430, 74437, 74444, 74451, 74460, 74469, 74474,
+ 74479, 74486, 74493, 74500, 74507, 74519, 74531, 74536, 74541, 74546,
+ 74551, 74556, 74561, 74566, 74571, 74575, 74580, 74585, 74590, 74595,
+ 74600, 74606, 74611, 74616, 74623, 74630, 74637, 74644, 74651, 74660,
+ 74669, 74675, 74681, 74687, 74693, 74699, 74705, 74712, 74719, 74726,
+ 74730, 74737, 74742, 74747, 74754, 74767, 74773, 74781, 74789, 74796,
+ 74803, 74812, 74821, 74828, 74835, 74842, 74849, 74856, 74863, 74870,
+ 74877, 74884, 74891, 74900, 74909, 74918, 74927, 74936, 74945, 74954,
+ 74963, 74972, 74981, 74988, 74995, 75001, 0, 0, 75009, 75016, 75023,
+ 75031, 75036, 75041, 75046, 75051, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 75056, 75063, 75070, 75076, 75084, 75092, 75100, 75108, 75116,
+ 75124, 75130, 75136, 75143, 75149, 75155, 75161, 75168, 75175, 75182,
+ 75189, 75196, 75203, 75210, 75217, 75224, 75231, 75238, 75245, 75252,
+ 75259, 75265, 75272, 75279, 75286, 75293, 75300, 75307, 75314, 75321,
+ 75328, 75335, 75342, 75349, 75356, 75363, 75370, 75377, 75384, 75391,
+ 75399, 75407, 75415, 75423, 0, 0, 0, 0, 75431, 75439, 75447, 75455,
+ 75463, 75471, 75479, 75485, 75491, 75497, 0, 0, 0, 0, 0, 0, 75503, 75507,
+ 75512, 75517, 75522, 75527, 75532, 75537, 75542, 75547, 75552, 75557,
+ 75562, 75566, 75571, 75576, 75580, 75585, 75590, 75595, 75600, 75605,
+ 75610, 75615, 75619, 75624, 75629, 75634, 75639, 75643, 75647, 75651,
+ 75655, 75659, 75663, 75668, 75673, 75678, 75683, 75688, 75695, 75701,
+ 75706, 75711, 75716, 75721, 75727, 75734, 75740, 75747, 75754, 75761,
+ 75766, 75773, 75779, 75784, 0, 0, 0, 0, 0, 0, 0, 0, 75790, 75795, 75800,
+ 75804, 75809, 75813, 75818, 75822, 75827, 75832, 75838, 75843, 75849,
+ 75853, 75858, 75863, 75867, 75872, 75877, 75881, 75886, 75891, 75896,
+ 75901, 75906, 75911, 75916, 75921, 75926, 75931, 75936, 75941, 75946,
+ 75951, 75956, 75961, 75966, 75971, 75976, 75980, 75985, 75990, 75995,
+ 75999, 76003, 76008, 76013, 76018, 76023, 76028, 76033, 76037, 76042,
+ 76048, 76054, 76059, 76065, 76070, 76076, 76082, 76089, 76095, 76102,
+ 76107, 76113, 76119, 76124, 76130, 76136, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 76141, 76145, 76150, 76155, 76159, 76163, 76167, 76171, 76175, 76179,
+ 76184, 76188, 0, 0, 0, 0, 0, 0, 76193, 76198, 76202, 76206, 76210, 76214,
+ 76218, 76222, 76227, 76231, 76236, 76240, 76244, 76248, 76253, 76257,
+ 76262, 76267, 76272, 76278, 76284, 76291, 76296, 76301, 76307, 76311,
+ 76316, 76319, 76322, 76326, 0, 0, 76331, 76338, 76344, 76350, 76356,
+ 76362, 76368, 76374, 76381, 76387, 76394, 76400, 76407, 76414, 76421,
+ 76428, 76435, 76442, 76449, 76456, 76463, 76470, 76476, 76483, 76489,
+ 76496, 76503, 76510, 76516, 76523, 76530, 76537, 76543, 76550, 76557,
+ 76563, 76570, 76576, 76583, 76590, 76596, 76602, 76609, 76615, 76622,
+ 76629, 76638, 76645, 76652, 76656, 76661, 76666, 76671, 76676, 76681,
+ 76685, 76690, 76694, 76699, 76704, 76709, 76714, 76719, 76724, 76728,
+ 76733, 76737, 76742, 76747, 76752, 76757, 76761, 76766, 76771, 76776,
+ 76782, 76787, 76793, 76799, 76805, 76811, 76817, 76822, 76828, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 76832, 76837, 76841, 76845, 76849, 76853, 76857,
+ 76861, 76865, 76869, 76873, 76877, 76881, 76885, 76889, 76893, 76897,
+ 76901, 76905, 76909, 76913, 76917, 76921, 76925, 76929, 76933, 76937,
+ 76941, 76945, 76949, 0, 0, 0, 76953, 76957, 76961, 76965, 76969, 76972,
+ 76978, 76981, 76985, 76988, 76994, 77000, 77008, 77011, 77015, 77018,
+ 77021, 77027, 77033, 77037, 77043, 77047, 77051, 77057, 77061, 77067,
+ 77073, 77077, 77081, 77087, 77091, 77097, 77103, 77107, 77113, 77117,
+ 77123, 77127, 77130, 77136, 77140, 77146, 77149, 77152, 77156, 77162,
+ 77166, 77170, 77176, 77182, 77186, 77189, 77195, 77200, 77205, 77210,
+ 77217, 77222, 77229, 77234, 77241, 77246, 77251, 77256, 77261, 77264,
+ 77268, 77272, 77277, 77282, 77287, 77292, 77297, 77302, 77307, 77312,
+ 77319, 77324, 0, 77331, 77334, 77338, 77341, 77344, 77347, 77350, 77353,
+ 77356, 77360, 77363, 0, 0, 0, 0, 77367, 77374, 77379, 77385, 77391,
+ 77397, 77403, 77409, 77415, 77422, 77429, 77436, 77443, 77450, 77457,
+ 77464, 77471, 77478, 77485, 77492, 77498, 77504, 77510, 77516, 77522,
+ 77528, 77535, 77541, 77548, 77555, 77562, 77569, 77576, 0, 77583, 77587,
+ 77591, 77595, 77599, 77604, 77608, 77612, 77617, 77622, 77627, 77632,
+ 77637, 77642, 77647, 77652, 77657, 77662, 77667, 77672, 77677, 77682,
+ 77687, 77692, 77697, 77702, 77707, 77711, 77716, 77721, 77726, 77731,
+ 77736, 77740, 77745, 77749, 77754, 77759, 77764, 77769, 77774, 77778,
+ 77784, 77789, 77795, 77801, 77806, 77812, 77817, 77823, 77829, 77835,
+ 77840, 77846, 77852, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77858, 77864, 77870,
+ 77876, 77883, 77889, 77895, 77901, 77907, 77913, 77918, 77923, 77929,
+ 77936, 0, 0, 77943, 77948, 77952, 77956, 77960, 77964, 77968, 77972,
+ 77977, 77981, 0, 0, 77986, 77992, 77998, 78005, 78013, 78019, 78025,
+ 78031, 78037, 78043, 78049, 78055, 78061, 78067, 78073, 78079, 78085,
+ 78091, 78096, 78102, 78108, 78115, 78121, 78127, 78133, 78140, 78147,
+ 78154, 78160, 78165, 78170, 78176, 78184, 78191, 78198, 78206, 78214,
+ 78221, 78228, 78235, 78242, 78249, 78256, 78263, 78270, 78277, 78284,
+ 78291, 78298, 78305, 78312, 78319, 78326, 78333, 78340, 78347, 78354,
+ 78360, 78366, 78373, 78380, 78387, 78394, 78401, 78408, 78415, 78422,
+ 78429, 78436, 78443, 78450, 78457, 78464, 78471, 78478, 78485, 78492,
+ 78499, 78506, 78513, 78520, 78527, 78534, 78540, 78546, 78553, 78559,
+ 78564, 78570, 78575, 78580, 78585, 78592, 78598, 78604, 78610, 78616,
+ 78622, 78628, 78634, 78642, 78650, 78658, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78666, 78672, 78678, 78684,
+ 78692, 78700, 78706, 78712, 78719, 78726, 78733, 78740, 78747, 78754,
+ 78761, 78768, 78775, 78783, 78791, 78799, 78807, 78815, 78821, 78829,
+ 78835, 78843, 78852, 78860, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78866, 78870,
+ 78874, 78878, 78882, 78886, 0, 0, 78890, 78894, 78898, 78902, 78906,
+ 78910, 0, 0, 78914, 78918, 78922, 78926, 78930, 78934, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 78938, 78942, 78946, 78950, 78954, 78958, 78962, 0, 78966,
+ 78970, 78974, 78978, 78982, 78986, 78990, 0, 78994, 79001, 79007, 79013,
+ 79019, 79026, 79033, 79042, 79053, 79063, 79072, 79080, 79088, 79096,
+ 79102, 79110, 79117, 79124, 79133, 79144, 79152, 79162, 79168, 79178,
+ 79187, 79192, 79200, 79209, 79214, 79223, 79230, 79240, 79252, 79257,
+ 79264, 79271, 79276, 79286, 79296, 79306, 79316, 79331, 79344, 79355,
+ 79363, 79368, 79379, 79388, 79395, 79402, 79408, 79414, 79419, 79426, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 79432, 79436, 79440, 79444, 79448, 79452,
+ 79457, 79462, 79466, 79471, 79476, 79481, 79486, 79491, 79495, 79500,
+ 79505, 79510, 79515, 79520, 79525, 79530, 79535, 79540, 79545, 79550,
+ 79554, 79559, 79564, 79569, 79574, 79579, 79584, 79589, 79594, 79599,
+ 79604, 79609, 79614, 79619, 79624, 79629, 79634, 79639, 79644, 79649,
+ 79653, 79658, 79663, 79668, 79673, 79678, 79683, 79688, 79693, 79698,
+ 79703, 79708, 79713, 79718, 79723, 79728, 79733, 79738, 79743, 79748,
+ 79753, 79758, 79763, 79768, 79773, 79778, 79783, 79788, 79793, 79798,
+ 79803, 79808, 79813, 79818, 79822, 79829, 79836, 79843, 79850, 79856,
+ 79863, 79870, 79877, 79884, 79891, 79898, 79905, 79912, 79919, 79926,
+ 79932, 79939, 79946, 79953, 79960, 79967, 79974, 79981, 79988, 79995,
+ 80002, 80009, 80018, 80027, 80036, 80045, 80054, 80063, 80072, 80081,
+ 80089, 80097, 80105, 80113, 80121, 80129, 80137, 80145, 80151, 80159, 0,
+ 0, 80167, 80174, 80180, 80186, 80192, 80198, 80204, 80210, 80217, 80223,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75837, 75842, 75847, 75852,
- 75857, 75861, 75865, 75870, 75875, 75880, 75885, 75890, 75895, 75900,
- 75905, 75910, 75914, 75919, 75924, 75929, 75934, 75939, 75944, 75949,
- 75954, 75959, 75964, 75969, 75976, 75983, 75990, 75997, 76004, 76011,
- 76018, 76025, 76031, 76037, 76043, 76049, 76055, 76061, 76067, 76073,
- 76077, 76083, 0, 0, 76089, 76094, 76098, 76102, 76106, 76110, 76114,
- 76118, 76122, 76126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76130, 76134, 76138, 76142, 76146,
- 76150, 76154, 76158, 76162, 76166, 76170, 76174, 76178, 76182, 76186,
- 76190, 76194, 76198, 76202, 76206, 76210, 76214, 76218, 0, 0, 0, 0,
- 76222, 76226, 76230, 76234, 76238, 76242, 76246, 76250, 76254, 76258,
- 76262, 76266, 76270, 76274, 76278, 76282, 76286, 76290, 76294, 76298,
- 76302, 76306, 76310, 76314, 76318, 76322, 76326, 76330, 76334, 76338,
- 76342, 76346, 76350, 76354, 76358, 76362, 76366, 76370, 76374, 76378,
- 76382, 76386, 76390, 76394, 76398, 76402, 76406, 76410, 76414, 0, 0, 0,
- 0, 76418, 76422, 76426, 76430, 76434, 76438, 76442, 76446, 76450, 76454,
- 76458, 76462, 76466, 76470, 76474, 76478, 76482, 76486, 76490, 76494,
- 76498, 76502, 76506, 76510, 76514, 76518, 76522, 76526, 76530, 76534,
- 76538, 76542, 76546, 76550, 76554, 76558, 76562, 76566, 76570, 76574,
- 76578, 76582, 76586, 76590, 76594, 76598, 76602, 76606, 76610, 76614,
- 76618, 76622, 76626, 76630, 76634, 76638, 76642, 76646, 76650, 76654,
- 76658, 76662, 76666, 76670, 76674, 76678, 76682, 76686, 76690, 76694,
- 76698, 76702, 76706, 76710, 76714, 76718, 76722, 76726, 76730, 76734,
- 76738, 76742, 76746, 76750, 76754, 76758, 76762, 76766, 76770, 76774,
- 76778, 76782, 76786, 76790, 76794, 76798, 76802, 76806, 76810, 76814,
- 76818, 76822, 76826, 76830, 76834, 76838, 76842, 76846, 76850, 76854,
- 76858, 76862, 76866, 76870, 76874, 76878, 76882, 76886, 76890, 76894,
- 76898, 76902, 76906, 76910, 76914, 76918, 76922, 76926, 76930, 76934,
- 76938, 76942, 76946, 76950, 76954, 76958, 76962, 76966, 76970, 76974,
- 76978, 76982, 76986, 76990, 76994, 76998, 77002, 77006, 77010, 77014,
- 77018, 77022, 77026, 77030, 77034, 77038, 77042, 77046, 77050, 77054,
- 77058, 77062, 77066, 77070, 77074, 77078, 77082, 77086, 77090, 77094,
- 77098, 77102, 77106, 77110, 77114, 77118, 77122, 77126, 77130, 77134,
- 77138, 77142, 77146, 77150, 77154, 77158, 77162, 77166, 77170, 77174,
- 77178, 77182, 77186, 77190, 77194, 77198, 77202, 77206, 77210, 77214,
- 77218, 77222, 77226, 77230, 77234, 77238, 77242, 77246, 77250, 77254,
- 77258, 77262, 77266, 77270, 77274, 77278, 77282, 77286, 77290, 77294,
- 77298, 77302, 77306, 77310, 77314, 77318, 77322, 77326, 77330, 77334,
- 77338, 77342, 77346, 77350, 77354, 77358, 77362, 77366, 77370, 77374,
- 77378, 77382, 77386, 77390, 77394, 77398, 77402, 77406, 77410, 77414,
- 77418, 77422, 77426, 77430, 77434, 77438, 77442, 77446, 77450, 77454,
- 77458, 77462, 77466, 77470, 77474, 77478, 77482, 77486, 77490, 77494,
- 77498, 77502, 77506, 77510, 77514, 77518, 77522, 77526, 77530, 77534,
- 77538, 77542, 77546, 77550, 77554, 77558, 77562, 77566, 77570, 77574,
- 77578, 77582, 77586, 77590, 77594, 77598, 77602, 77606, 77610, 77614,
- 77618, 77622, 77626, 77630, 77634, 77638, 77642, 77646, 77650, 77654,
- 77658, 77662, 77666, 77670, 77674, 77678, 77682, 77686, 77690, 77694,
- 77698, 77702, 77706, 77710, 77714, 77718, 77722, 77726, 77730, 77734,
- 77738, 77742, 77746, 77750, 77754, 77758, 77762, 77766, 77770, 77774,
- 77778, 77782, 77786, 77790, 77794, 77798, 77802, 77806, 77810, 77814,
- 77818, 77822, 77826, 77830, 77834, 77838, 77842, 77846, 77850, 77854,
- 77858, 77862, 77866, 77870, 77874, 77878, 0, 0, 77882, 77886, 77890,
- 77894, 77898, 77902, 77906, 77910, 77914, 77918, 77922, 77926, 77930,
- 77934, 77938, 77942, 77946, 77950, 77954, 77958, 77962, 77966, 77970,
- 77974, 77978, 77982, 77986, 77990, 77994, 77998, 78002, 78006, 78010,
- 78014, 78018, 78022, 78026, 78030, 78034, 78038, 78042, 78046, 78050,
- 78054, 78058, 78062, 78066, 78070, 78074, 78078, 78082, 78086, 78090,
- 78094, 78098, 78102, 78106, 78110, 78114, 78118, 78122, 78126, 78130,
- 78134, 78138, 78142, 78146, 78150, 78154, 78158, 78162, 78166, 78170,
- 78174, 78178, 78182, 78186, 78190, 78194, 78198, 78202, 78206, 78210,
- 78214, 78218, 78222, 78226, 78230, 78234, 78238, 78242, 78246, 78250,
- 78254, 78258, 78262, 78266, 78270, 78274, 78278, 78282, 78286, 78290,
- 78294, 78298, 78302, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78306,
- 78311, 78316, 78321, 78326, 78331, 78339, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 78344, 78351, 78358, 78365, 78372, 0, 0, 0, 0, 0, 78379, 78386,
- 78393, 78403, 78409, 78415, 78421, 78427, 78433, 78439, 78446, 78452,
- 78458, 78464, 78473, 78482, 78494, 78506, 78512, 78518, 78524, 78531,
- 78538, 78545, 78552, 78559, 0, 78566, 78573, 78580, 78588, 78595, 0,
- 78602, 0, 78609, 78616, 0, 78623, 78631, 0, 78638, 78645, 78652, 78659,
- 78666, 78673, 78680, 78687, 78694, 78701, 78706, 78713, 78720, 78726,
- 78732, 78738, 78744, 78750, 78756, 78762, 78768, 78774, 78780, 78786,
- 78792, 78798, 78804, 78810, 78816, 78822, 78828, 78834, 78840, 78846,
- 78852, 78858, 78864, 78870, 78876, 78882, 78888, 78894, 78900, 78906,
- 78912, 78918, 78924, 78930, 78936, 78942, 78948, 78954, 78960, 78966,
- 78972, 78978, 78984, 78990, 78996, 79002, 79008, 79014, 79020, 79026,
- 79032, 79038, 79044, 79050, 79056, 79062, 79068, 79074, 79080, 79086,
- 79092, 79098, 79104, 79110, 79116, 79122, 79128, 79134, 79140, 79146,
- 79152, 79158, 79164, 79170, 79176, 79184, 79192, 79198, 79204, 79210,
- 79216, 79225, 79234, 79242, 79250, 79258, 79266, 79274, 79282, 79290,
- 79298, 79305, 79312, 79322, 79332, 79336, 79340, 79345, 79350, 79355,
- 79360, 79369, 79378, 79384, 79390, 79397, 79404, 79411, 79415, 79421, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79427, 79433, 79439,
- 79445, 79451, 79456, 79461, 79467, 79473, 79479, 79485, 79493, 79499,
- 79505, 79513, 79521, 79529, 79537, 79542, 79547, 79552, 79557, 79570,
- 79583, 79593, 79603, 79614, 79625, 79636, 79647, 79657, 79667, 79678,
- 79689, 79700, 79711, 79721, 79731, 79741, 79757, 79773, 79789, 79796,
- 79803, 79810, 79817, 79827, 79837, 79847, 79859, 79869, 79877, 79885,
- 79894, 79902, 79912, 79920, 79928, 79936, 79945, 79953, 79963, 79971,
- 79979, 79987, 79997, 80005, 80012, 80019, 80026, 80033, 80041, 80049,
- 80057, 80065, 80073, 80082, 80090, 80098, 80106, 80114, 80122, 80131,
- 80139, 80147, 80155, 80163, 80171, 80179, 80187, 80195, 80203, 80211,
- 80220, 80228, 80238, 80246, 80254, 80262, 80272, 80280, 80288, 80296,
- 80304, 80313, 80322, 80330, 80340, 80348, 80356, 80364, 80373, 80381,
- 80391, 80399, 80406, 80413, 80421, 80428, 80437, 80444, 80452, 80460,
- 80469, 80477, 80487, 80495, 80503, 80511, 80521, 80529, 80536, 80543,
- 80551, 80558, 80567, 80574, 80584, 80594, 80605, 80614, 80623, 80632,
- 80641, 80650, 80660, 80671, 80682, 80692, 80703, 80715, 80725, 80734,
- 80743, 80751, 80760, 80770, 80778, 80787, 80796, 80804, 80813, 80823,
- 80831, 80840, 80849, 80857, 80866, 80876, 80884, 80894, 80902, 80912,
- 80920, 80928, 80937, 80945, 80955, 80963, 80971, 80981, 80989, 80996,
- 81003, 81012, 81021, 81029, 81038, 81048, 81056, 81067, 81075, 81083,
- 81090, 81098, 81107, 81114, 81124, 81134, 81145, 81155, 81166, 81174,
- 81182, 81191, 81199, 81208, 81216, 81224, 81233, 81241, 81250, 81258,
- 81265, 81272, 81279, 81286, 81294, 81302, 81310, 81318, 81327, 81335,
- 81343, 81352, 81360, 81368, 81376, 81385, 81393, 81401, 81409, 81417,
- 81425, 81433, 81441, 81449, 81457, 81466, 81474, 81482, 81490, 81498,
- 81506, 81515, 81524, 81532, 81540, 81548, 81557, 81565, 81574, 81581,
- 81588, 81596, 81603, 81611, 81619, 81628, 81636, 81645, 81653, 81661,
- 81671, 81678, 81685, 81693, 81700, 81708, 81718, 81729, 81737, 81746,
- 81754, 81763, 81771, 81780, 81788, 81797, 81805, 81814, 81823, 81831,
- 81839, 81847, 81856, 81863, 81871, 81880, 81889, 81898, 81908, 81916,
- 81926, 81934, 81944, 81952, 81962, 81970, 81980, 81988, 81997, 82004,
- 82013, 82020, 82030, 82038, 82048, 82056, 82066, 82074, 82082, 82090,
- 82099, 82107, 82116, 82125, 82134, 82143, 82153, 82161, 82171, 82179,
- 82189, 82197, 82207, 82215, 82225, 82233, 82242, 82249, 82258, 82265,
- 82275, 82283, 82293, 82301, 82311, 82319, 82327, 82335, 82344, 82352,
- 82361, 82370, 82379, 82388, 82396, 82404, 82413, 82421, 82430, 82439,
- 82447, 82455, 82463, 82472, 82480, 82488, 82497, 82505, 82513, 82521,
- 82529, 82534, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82539,
- 82549, 82559, 82569, 82579, 82590, 82600, 82610, 82621, 82630, 82639,
- 82648, 82659, 82669, 82679, 82691, 82701, 82711, 82721, 82731, 82741,
- 82751, 82761, 82771, 82781, 82791, 82801, 82812, 82823, 82833, 82843,
- 82855, 82866, 82877, 82887, 82897, 82907, 82917, 82927, 82937, 82947,
- 82959, 82969, 82979, 82991, 83002, 83013, 83023, 83033, 83043, 83053,
- 83065, 83075, 83085, 83096, 83107, 83117, 83127, 83136, 83145, 83154,
- 83163, 83172, 83182, 0, 0, 83192, 83202, 83212, 83222, 83232, 83244,
- 83254, 83264, 83276, 83286, 83298, 83307, 83316, 83327, 83337, 83349,
- 83360, 83373, 83383, 83395, 83404, 83415, 83426, 83439, 83449, 83459,
- 83469, 83479, 83489, 83498, 83507, 83516, 83525, 83535, 83545, 83555,
- 83565, 83575, 83585, 83595, 83605, 83615, 83625, 83635, 83645, 83654,
- 83663, 83672, 83682, 83692, 83702, 83712, 83722, 83733, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83743, 83758, 83773, 83779, 83785, 83791,
- 83797, 83803, 83809, 83815, 83821, 83829, 83833, 83836, 0, 0, 83844,
- 83847, 83850, 83853, 83856, 83859, 83862, 83865, 83868, 83871, 83874,
- 83877, 83880, 83883, 83886, 83889, 83892, 83900, 83909, 83920, 83928,
- 83936, 83945, 83954, 83965, 83977, 0, 0, 0, 0, 0, 0, 83986, 83991, 83996,
- 84003, 84010, 84016, 84022, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84027, 84037,
- 84047, 84057, 84066, 84077, 84086, 84095, 84105, 84115, 84127, 84139,
- 84150, 84161, 84172, 84183, 84193, 84203, 84213, 84223, 84234, 84245,
- 84249, 84254, 84263, 84272, 84276, 84280, 84284, 84289, 84294, 84299,
- 84304, 84307, 84311, 0, 84316, 84319, 84322, 84326, 84330, 84335, 84339,
- 84343, 84348, 84353, 84360, 84367, 84370, 84373, 84376, 84379, 84382,
- 84386, 84390, 0, 84394, 84399, 84403, 84407, 0, 0, 0, 0, 84412, 84417,
- 84424, 84429, 84434, 0, 84439, 84444, 84449, 84454, 84459, 84464, 84469,
- 84474, 84479, 84484, 84489, 84494, 84503, 84512, 84520, 84528, 84537,
- 84546, 84555, 84564, 84572, 84580, 84588, 84596, 84601, 84606, 84612,
- 84618, 84624, 84630, 84638, 84646, 84652, 84658, 84664, 84670, 84676,
- 84682, 84688, 84694, 84699, 84704, 84709, 84714, 84719, 84724, 84729,
- 84734, 84740, 84746, 84752, 84758, 84764, 84770, 84776, 84782, 84788,
- 84794, 84800, 84806, 84812, 84818, 84824, 84830, 84836, 84842, 84848,
- 84854, 84860, 84866, 84872, 84878, 84884, 84890, 84896, 84902, 84908,
- 84914, 84920, 84926, 84932, 84938, 84944, 84950, 84956, 84962, 84968,
- 84974, 84980, 84986, 84992, 84998, 85004, 85010, 85016, 85022, 85028,
- 85034, 85040, 85046, 85052, 85058, 85064, 85070, 85076, 85082, 85088,
- 85094, 85099, 85104, 85109, 85114, 85120, 85126, 85132, 85138, 85144,
- 85150, 85156, 85162, 85168, 85174, 85181, 85188, 85193, 85198, 85203,
- 85208, 85220, 85232, 85243, 85254, 85266, 85278, 85286, 0, 0, 85294, 0,
- 85302, 85306, 85310, 85313, 85317, 85321, 85324, 85327, 85331, 85335,
- 85338, 85341, 85344, 85347, 85352, 85355, 85359, 85362, 85365, 85368,
- 85371, 85374, 85377, 85380, 85383, 85386, 85389, 85392, 85396, 85400,
- 85404, 85408, 85413, 85418, 85424, 85430, 85436, 85441, 85447, 85453,
- 85459, 85464, 85470, 85476, 85481, 85486, 85492, 85497, 85503, 85509,
- 85514, 85520, 85526, 85531, 85537, 85543, 85549, 85555, 85561, 85565,
- 85570, 85574, 85579, 85583, 85588, 85593, 85599, 85605, 85611, 85616,
- 85622, 85628, 85634, 85639, 85645, 85651, 85656, 85661, 85667, 85672,
- 85678, 85684, 85689, 85695, 85701, 85706, 85712, 85718, 85724, 85730,
- 85736, 85741, 85745, 85750, 85752, 85757, 85762, 85768, 85773, 85778,
- 85782, 85788, 85793, 85798, 85803, 85808, 85813, 85818, 85823, 85829,
- 85835, 85841, 85849, 85853, 85857, 85861, 85865, 85869, 85873, 85878,
- 85883, 85888, 85893, 85897, 85902, 85907, 85912, 85917, 85922, 85927,
- 85932, 85937, 85941, 85945, 85950, 85955, 85960, 85965, 85969, 85974,
- 85979, 85984, 85989, 85993, 85998, 86003, 86008, 86013, 86017, 86022,
- 86027, 86031, 86036, 86041, 86046, 86051, 86056, 86061, 86068, 86075,
- 86079, 86084, 86089, 86094, 86099, 86104, 86109, 86114, 86119, 86124,
- 86129, 86134, 86139, 86144, 86149, 86154, 86159, 86164, 86169, 86174,
- 86179, 86184, 86189, 86194, 86199, 86204, 86209, 86214, 86219, 86224, 0,
- 0, 0, 86229, 86233, 86238, 86242, 86247, 86252, 0, 0, 86256, 86261,
- 86266, 86270, 86275, 86280, 0, 0, 86285, 86290, 86294, 86299, 86304,
- 86309, 0, 0, 86314, 86319, 86324, 0, 0, 0, 86328, 86332, 86336, 86340,
- 86343, 86347, 86351, 0, 86355, 86361, 86364, 86368, 86371, 86375, 86379,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86383, 86389, 86395, 86401, 86407, 0, 0,
- 86411, 86417, 86423, 86429, 86435, 86441, 86448, 86455, 86462, 86469,
- 86476, 86483, 0, 86490, 86497, 86504, 86510, 86517, 86524, 86531, 86538,
- 86544, 86551, 86558, 86565, 86572, 86578, 86585, 86592, 86599, 86606,
- 86612, 86619, 86626, 86633, 86640, 86647, 86654, 86661, 0, 86668, 86674,
- 86681, 86688, 86695, 86702, 86708, 86715, 86722, 86729, 86736, 86743,
- 86750, 86757, 86763, 86770, 86777, 86784, 86791, 0, 86798, 86805, 0,
- 86812, 86819, 86826, 86833, 86840, 86847, 86854, 86861, 86868, 86875,
- 86882, 86889, 86896, 86903, 86910, 0, 0, 86916, 86921, 86926, 86931,
- 86936, 86941, 86946, 86951, 86956, 86961, 86966, 86971, 86976, 86981, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 86986, 86993, 87000, 87007, 87014, 87021,
- 87028, 87035, 87042, 87049, 87056, 87063, 87070, 87077, 87084, 87091,
- 87098, 87105, 87112, 87119, 87127, 87135, 87142, 87149, 87154, 87162,
- 87170, 87177, 87184, 87189, 87196, 87201, 87206, 87213, 87218, 87223,
- 87228, 87236, 87241, 87246, 87253, 87258, 87263, 87270, 87277, 87282,
- 87287, 87292, 87297, 87302, 87307, 87312, 87317, 87322, 87329, 87334,
- 87341, 87346, 87351, 87356, 87361, 87366, 87371, 87376, 87381, 87386,
- 87391, 87396, 87403, 87410, 87417, 87424, 87430, 87435, 87442, 87447,
- 87452, 87461, 87468, 87477, 87484, 87489, 87494, 87502, 87507, 87512,
- 87517, 87522, 87527, 87534, 87539, 87544, 87549, 87554, 87559, 87566,
- 87573, 87580, 87587, 87594, 87601, 87608, 87615, 87622, 87629, 87636,
- 87643, 87650, 87657, 87664, 87671, 87678, 87685, 87692, 87699, 87706,
- 87713, 87720, 87727, 87734, 87741, 87748, 87755, 0, 0, 0, 0, 0, 87762,
- 87770, 87778, 0, 0, 0, 0, 87783, 87787, 87791, 87795, 87799, 87803,
- 87807, 87811, 87815, 87819, 87824, 87829, 87834, 87839, 87844, 87849,
- 87854, 87859, 87864, 87870, 87876, 87882, 87889, 87896, 87903, 87910,
- 87917, 87924, 87930, 87936, 87942, 87949, 87956, 87963, 87970, 87977,
- 87984, 87991, 87998, 88005, 88012, 88019, 88026, 88033, 88040, 0, 0, 0,
- 88047, 88055, 88063, 88071, 88079, 88087, 88097, 88107, 88115, 88123,
- 88131, 88139, 88147, 88153, 88160, 88169, 88178, 88187, 88196, 88205,
- 88214, 88224, 88235, 88245, 88256, 88265, 88274, 88283, 88293, 88304,
- 88314, 88325, 88336, 88345, 88353, 88359, 88365, 88371, 88377, 88385,
- 88393, 88399, 88406, 88416, 88423, 88430, 88437, 88444, 88451, 88461,
- 88468, 88475, 88483, 88491, 88500, 88509, 88518, 88527, 88536, 88544,
- 88553, 88562, 88571, 88575, 88582, 88587, 88592, 88596, 88600, 88604,
- 88608, 88613, 88618, 88624, 88630, 88634, 88640, 88644, 88648, 88652,
- 88656, 88660, 88664, 88670, 0, 0, 0, 0, 0, 88674, 88679, 88684, 88689,
- 88694, 88701, 88706, 88711, 88716, 88721, 88726, 88731, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88736,
- 88743, 88752, 88761, 88768, 88775, 88782, 88789, 88796, 88803, 88809,
- 88816, 88823, 88830, 88837, 88844, 88851, 88858, 88865, 88874, 88881,
- 88888, 88895, 88902, 88909, 88916, 88923, 88930, 88939, 88946, 88953,
- 88960, 88967, 88974, 88981, 88990, 88997, 89004, 89011, 89018, 89027,
- 89034, 89041, 89048, 89056, 89065, 0, 0, 89074, 89078, 89082, 89087,
- 89092, 89097, 89102, 89106, 89111, 89116, 89121, 89126, 89131, 89136,
- 89140, 89144, 89149, 89154, 89159, 89163, 89168, 89173, 89177, 89182,
- 89187, 89192, 89197, 89202, 89207, 0, 0, 0, 89212, 89216, 89221, 89226,
- 89230, 89235, 89239, 89244, 89249, 89254, 89259, 89263, 89267, 89272,
- 89277, 89282, 89287, 89292, 89297, 89301, 89306, 89311, 89316, 89321,
- 89326, 89331, 89335, 89339, 89344, 89349, 89354, 89359, 89364, 89369,
- 89374, 89379, 89384, 89389, 89394, 89399, 89404, 89409, 89414, 89419,
- 89424, 89429, 89434, 89439, 89444, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80230, 80234, 80238, 80242,
+ 80246, 80250, 80254, 80258, 80262, 80266, 80270, 80274, 80278, 80282,
+ 80286, 80290, 80294, 80298, 80302, 80306, 80310, 80314, 80318, 0, 0, 0,
+ 0, 80322, 80326, 80330, 80334, 80338, 80342, 80346, 80350, 80354, 80358,
+ 80362, 80366, 80370, 80374, 80378, 80382, 80386, 80390, 80394, 80398,
+ 80402, 80406, 80410, 80414, 80418, 80422, 80426, 80430, 80434, 80438,
+ 80442, 80446, 80450, 80454, 80458, 80462, 80466, 80470, 80474, 80478,
+ 80482, 80486, 80490, 80494, 80498, 80502, 80506, 80510, 80514, 0, 0, 0,
+ 0, 80518, 80522, 80526, 80530, 80534, 80538, 80542, 80546, 80550, 80554,
+ 80558, 80562, 80566, 80570, 80574, 80578, 80582, 80586, 80590, 80594,
+ 80598, 80602, 80606, 80610, 80614, 80618, 80622, 80626, 80630, 80634,
+ 80638, 80642, 80646, 80650, 80654, 80658, 80662, 80666, 80670, 80674,
+ 80678, 80682, 80686, 80690, 80694, 80698, 80702, 80706, 80710, 80714,
+ 80718, 80722, 80726, 80730, 80734, 80738, 80742, 80746, 80750, 80754,
+ 80758, 80762, 80766, 80770, 80774, 80778, 80782, 80786, 80790, 80794,
+ 80798, 80802, 80806, 80810, 80814, 80818, 80822, 80826, 80830, 80834,
+ 80838, 80842, 80846, 80850, 80854, 80858, 80862, 80866, 80870, 80874,
+ 80878, 80882, 80886, 80890, 80894, 80898, 80902, 80906, 80910, 80914,
+ 80918, 80922, 80926, 80930, 80934, 80938, 80942, 80946, 80950, 80954,
+ 80958, 80962, 80966, 80970, 80974, 80978, 80982, 80986, 80990, 80994,
+ 80998, 81002, 81006, 81010, 81014, 81018, 81022, 81026, 81030, 81034,
+ 81038, 81042, 81046, 81050, 81054, 81058, 81062, 81066, 81070, 81074,
+ 81078, 81082, 81086, 81090, 81094, 81098, 81102, 81106, 81110, 81114,
+ 81118, 81122, 81126, 81130, 81134, 81138, 81142, 81146, 81150, 81154,
+ 81158, 81162, 81166, 81170, 81174, 81178, 81182, 81186, 81190, 81194,
+ 81198, 81202, 81206, 81210, 81214, 81218, 81222, 81226, 81230, 81234,
+ 81238, 81242, 81246, 81250, 81254, 81258, 81262, 81266, 81270, 81274,
+ 81278, 81282, 81286, 81290, 81294, 81298, 81302, 81306, 81310, 81314,
+ 81318, 81322, 81326, 81330, 81334, 81338, 81342, 81346, 81350, 81354,
+ 81358, 81362, 81366, 81370, 81374, 81378, 81382, 81386, 81390, 81394,
+ 81398, 81402, 81406, 81410, 81414, 81418, 81422, 81426, 81430, 81434,
+ 81438, 81442, 81446, 81450, 81454, 81458, 81462, 81466, 81470, 81474,
+ 81478, 81482, 81486, 81490, 81494, 81498, 81502, 81506, 81510, 81514,
+ 81518, 81522, 81526, 81530, 81534, 81538, 81542, 81546, 81550, 81554,
+ 81558, 81562, 81566, 81570, 81574, 81578, 81582, 81586, 81590, 81594,
+ 81598, 81602, 81606, 81610, 81614, 81618, 81622, 81626, 81630, 81634,
+ 81638, 81642, 81646, 81650, 81654, 81658, 81662, 81666, 81670, 81674,
+ 81678, 81682, 81686, 81690, 81694, 81698, 81702, 81706, 81710, 81714,
+ 81718, 81722, 81726, 81730, 81734, 81738, 81742, 81746, 81750, 81754,
+ 81758, 81762, 81766, 81770, 81774, 81778, 81782, 81786, 81790, 81794,
+ 81798, 81802, 81806, 81810, 81814, 81818, 81822, 81826, 81830, 81834,
+ 81838, 81842, 81846, 81850, 81854, 81858, 81862, 81866, 81870, 81874,
+ 81878, 81882, 81886, 81890, 81894, 81898, 81902, 81906, 81910, 81914,
+ 81918, 81922, 81926, 81930, 81934, 81938, 81942, 81946, 81950, 81954,
+ 81958, 81962, 81966, 81970, 81974, 81978, 0, 0, 81982, 81986, 81990,
+ 81994, 81998, 82002, 82006, 82010, 82014, 82018, 82022, 82026, 82030,
+ 82034, 82038, 82042, 82046, 82050, 82054, 82058, 82062, 82066, 82070,
+ 82074, 82078, 82082, 82086, 82090, 82094, 82098, 82102, 82106, 82110,
+ 82114, 82118, 82122, 82126, 82130, 82134, 82138, 82142, 82146, 82150,
+ 82154, 82158, 82162, 82166, 82170, 82174, 82178, 82182, 82186, 82190,
+ 82194, 82198, 82202, 82206, 82210, 82214, 82218, 82222, 82226, 82230,
+ 82234, 82238, 82242, 82246, 82250, 82254, 82258, 82262, 82266, 82270,
+ 82274, 82278, 82282, 82286, 82290, 82294, 82298, 82302, 82306, 82310,
+ 82314, 82318, 82322, 82326, 82330, 82334, 82338, 82342, 82346, 82350,
+ 82354, 82358, 82362, 82366, 82370, 82374, 82378, 82382, 82386, 82390,
+ 82394, 82398, 82402, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82406,
+ 82411, 82416, 82421, 82426, 82431, 82439, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 82444, 82451, 82458, 82465, 82472, 0, 0, 0, 0, 0, 82479, 82486,
+ 82493, 82503, 82509, 82515, 82521, 82527, 82533, 82539, 82546, 82552,
+ 82558, 82564, 82573, 82582, 82594, 82606, 82612, 82618, 82624, 82631,
+ 82638, 82645, 82652, 82659, 0, 82666, 82673, 82680, 82688, 82695, 0,
+ 82702, 0, 82709, 82716, 0, 82723, 82731, 0, 82738, 82745, 82752, 82759,
+ 82766, 82773, 82780, 82787, 82794, 82801, 82806, 82813, 82820, 82826,
+ 82832, 82838, 82844, 82850, 82856, 82862, 82868, 82874, 82880, 82886,
+ 82892, 82898, 82904, 82910, 82916, 82922, 82928, 82934, 82940, 82946,
+ 82952, 82958, 82964, 82970, 82976, 82982, 82988, 82994, 83000, 83006,
+ 83012, 83018, 83024, 83030, 83036, 83042, 83048, 83054, 83060, 83066,
+ 83072, 83078, 83084, 83090, 83096, 83102, 83108, 83114, 83120, 83126,
+ 83132, 83138, 83144, 83150, 83156, 83162, 83168, 83174, 83180, 83186,
+ 83192, 83198, 83204, 83210, 83216, 83222, 83228, 83234, 83240, 83246,
+ 83252, 83258, 83264, 83270, 83276, 83284, 83292, 83298, 83304, 83310,
+ 83316, 83325, 83334, 83342, 83350, 83358, 83366, 83374, 83382, 83390,
+ 83398, 83405, 83412, 83423, 83434, 83438, 83442, 83447, 83452, 83457,
+ 83462, 83470, 83478, 83484, 83490, 83497, 83504, 83511, 83515, 83521, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83527, 83533, 83539,
+ 83545, 83551, 83556, 83561, 83567, 83573, 83579, 83585, 83594, 83600,
+ 83606, 83614, 83622, 83630, 83638, 83643, 83648, 83653, 83658, 83671,
+ 83684, 83695, 83706, 83718, 83730, 83742, 83754, 83765, 83776, 83788,
+ 83800, 83812, 83824, 83835, 83846, 83857, 83874, 83891, 83908, 83915,
+ 83922, 83929, 83936, 83947, 83958, 83969, 83982, 83993, 84001, 84009,
+ 84018, 84026, 84036, 84044, 84052, 84060, 84069, 84077, 84087, 84095,
+ 84103, 84111, 84121, 84129, 84136, 84143, 84150, 84157, 84165, 84173,
+ 84181, 84189, 84197, 84206, 84214, 84222, 84230, 84238, 84246, 84255,
+ 84263, 84271, 84279, 84287, 84295, 84303, 84311, 84319, 84327, 84335,
+ 84344, 84352, 84362, 84370, 84378, 84386, 84396, 84404, 84412, 84420,
+ 84428, 84437, 84446, 84454, 84464, 84472, 84480, 84488, 84497, 84505,
+ 84515, 84523, 84530, 84537, 84545, 84552, 84561, 84568, 84576, 84584,
+ 84593, 84601, 84611, 84619, 84627, 84635, 84645, 84653, 84660, 84667,
+ 84675, 84682, 84691, 84698, 84708, 84718, 84729, 84738, 84747, 84756,
+ 84765, 84774, 84784, 84796, 84808, 84819, 84831, 84844, 84855, 84864,
+ 84873, 84881, 84890, 84900, 84908, 84917, 84926, 84934, 84943, 84953,
+ 84961, 84970, 84979, 84987, 84996, 85006, 85014, 85024, 85032, 85042,
+ 85050, 85058, 85067, 85075, 85085, 85093, 85101, 85111, 85119, 85126,
+ 85133, 85142, 85151, 85159, 85168, 85178, 85186, 85197, 85205, 85213,
+ 85220, 85228, 85237, 85244, 85255, 85266, 85278, 85289, 85301, 85309,
+ 85317, 85326, 85334, 85343, 85351, 85359, 85368, 85376, 85385, 85393,
+ 85400, 85407, 85414, 85421, 85429, 85437, 85445, 85453, 85462, 85470,
+ 85478, 85487, 85495, 85503, 85511, 85520, 85528, 85536, 85544, 85552,
+ 85560, 85568, 85576, 85584, 85592, 85601, 85609, 85617, 85625, 85633,
+ 85641, 85650, 85659, 85667, 85675, 85683, 85692, 85700, 85709, 85716,
+ 85723, 85731, 85738, 85746, 85754, 85763, 85771, 85780, 85788, 85796,
+ 85806, 85813, 85820, 85828, 85835, 85843, 85854, 85866, 85874, 85883,
+ 85891, 85900, 85908, 85917, 85925, 85934, 85942, 85951, 85960, 85968,
+ 85976, 85984, 85993, 86000, 86008, 86017, 86026, 86035, 86045, 86053,
+ 86063, 86071, 86081, 86089, 86099, 86107, 86117, 86125, 86134, 86141,
+ 86150, 86157, 86167, 86175, 86185, 86193, 86203, 86211, 86219, 86227,
+ 86236, 86244, 86253, 86262, 86271, 86280, 86290, 86298, 86308, 86316,
+ 86326, 86334, 86344, 86352, 86362, 86370, 86379, 86386, 86395, 86402,
+ 86412, 86420, 86430, 86438, 86448, 86456, 86464, 86472, 86481, 86489,
+ 86498, 86507, 86516, 86525, 86533, 86541, 86550, 86558, 86567, 86576,
+ 86584, 86592, 86600, 86609, 86617, 86625, 86634, 86642, 86650, 86658,
+ 86666, 86671, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86676,
+ 86686, 86696, 86706, 86716, 86727, 86737, 86747, 86758, 86767, 86776,
+ 86785, 86796, 86806, 86816, 86828, 86838, 86848, 86858, 86868, 86878,
+ 86888, 86898, 86908, 86918, 86928, 86938, 86949, 86960, 86970, 86980,
+ 86992, 87003, 87014, 87024, 87034, 87044, 87054, 87064, 87074, 87084,
+ 87096, 87106, 87116, 87128, 87139, 87150, 87160, 87170, 87180, 87190,
+ 87202, 87212, 87222, 87233, 87244, 87254, 87264, 87273, 87282, 87291,
+ 87300, 87309, 87319, 0, 0, 87329, 87339, 87349, 87359, 87369, 87381,
+ 87391, 87401, 87413, 87423, 87435, 87444, 87453, 87464, 87474, 87486,
+ 87497, 87510, 87520, 87532, 87541, 87552, 87563, 87576, 87586, 87596,
+ 87606, 87616, 87626, 87635, 87644, 87653, 87662, 87672, 87682, 87692,
+ 87702, 87712, 87722, 87732, 87742, 87752, 87762, 87772, 87782, 87791,
+ 87800, 87809, 87819, 87829, 87839, 87849, 87859, 87870, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89449, 89453, 89458, 89463, 89468, 89472,
- 89477, 89482, 89487, 89492, 89496, 89500, 89505, 89510, 89515, 89520,
- 89524, 89529, 89534, 89539, 89544, 89549, 89554, 89558, 89563, 89568,
- 89573, 89578, 89583, 89588, 89593, 0, 89598, 89603, 89608, 89614, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89620, 89625, 89630, 89635, 89640, 89645,
- 89650, 89655, 89660, 89665, 89670, 89675, 89680, 89685, 89690, 89695,
- 89700, 89705, 89710, 89715, 89720, 89725, 89730, 89735, 89740, 89745,
- 89750, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87880, 87895, 87910, 87916, 87922, 87928,
+ 87934, 87940, 87946, 87952, 87958, 87966, 87970, 87973, 0, 0, 87981,
+ 87984, 87987, 87990, 87993, 87996, 87999, 88002, 88005, 88008, 88011,
+ 88014, 88017, 88020, 88023, 88026, 88029, 88037, 88046, 88057, 88065,
+ 88073, 88082, 88091, 88102, 88114, 0, 0, 0, 0, 0, 0, 88124, 88129, 88134,
+ 88141, 88148, 88154, 88160, 88165, 88170, 88175, 88181, 88187, 88193,
+ 88199, 88205, 88212, 88219, 88229, 88239, 88249, 88258, 88269, 88278,
+ 88287, 88297, 88307, 88319, 88331, 88342, 88353, 88364, 88375, 88385,
+ 88395, 88405, 88415, 88426, 88437, 88441, 88446, 88455, 88464, 88468,
+ 88472, 88476, 88481, 88486, 88491, 88496, 88499, 88503, 0, 88508, 88511,
+ 88514, 88518, 88522, 88527, 88531, 88535, 88540, 88545, 88552, 88559,
+ 88562, 88565, 88568, 88571, 88574, 88578, 88582, 0, 88586, 88591, 88595,
+ 88599, 0, 0, 0, 0, 88604, 88609, 88616, 88621, 88626, 0, 88631, 88636,
+ 88641, 88646, 88651, 88656, 88661, 88666, 88671, 88676, 88681, 88687,
+ 88696, 88705, 88714, 88723, 88733, 88743, 88753, 88763, 88772, 88781,
+ 88790, 88799, 88804, 88809, 88815, 88821, 88827, 88833, 88841, 88849,
+ 88855, 88861, 88867, 88873, 88879, 88885, 88891, 88897, 88902, 88907,
+ 88912, 88917, 88922, 88927, 88932, 88937, 88943, 88949, 88955, 88961,
+ 88967, 88973, 88979, 88985, 88991, 88997, 89003, 89009, 89015, 89021,
+ 89027, 89033, 89039, 89045, 89051, 89057, 89063, 89069, 89075, 89081,
+ 89087, 89093, 89099, 89105, 89111, 89117, 89123, 89129, 89135, 89141,
+ 89147, 89153, 89159, 89165, 89171, 89177, 89183, 89189, 89195, 89201,
+ 89207, 89213, 89219, 89225, 89231, 89237, 89243, 89249, 89255, 89261,
+ 89267, 89273, 89279, 89285, 89291, 89297, 89302, 89307, 89312, 89317,
+ 89323, 89329, 89335, 89341, 89347, 89353, 89359, 89365, 89371, 89377,
+ 89384, 89391, 89396, 89401, 89406, 89411, 89423, 89435, 89447, 89459,
+ 89472, 89485, 89493, 0, 0, 89501, 0, 89509, 89513, 89517, 89520, 89524,
+ 89528, 89531, 89534, 89538, 89542, 89545, 89548, 89551, 89554, 89559,
+ 89562, 89566, 89569, 89572, 89575, 89578, 89581, 89584, 89588, 89591,
+ 89595, 89598, 89601, 89605, 89609, 89613, 89617, 89622, 89627, 89633,
+ 89639, 89645, 89650, 89656, 89662, 89668, 89673, 89679, 89685, 89690,
+ 89696, 89702, 89707, 89713, 89719, 89724, 89729, 89735, 89740, 89746,
+ 89752, 89758, 89764, 89770, 89774, 89779, 89783, 89788, 89792, 89797,
+ 89802, 89808, 89814, 89820, 89825, 89831, 89837, 89843, 89848, 89854,
+ 89860, 89865, 89871, 89877, 89882, 89888, 89894, 89899, 89904, 89910,
+ 89915, 89921, 89927, 89933, 89939, 89945, 89950, 89954, 89959, 89962,
+ 89967, 89972, 89978, 89983, 89988, 89992, 89997, 90002, 90007, 90012,
+ 90017, 90022, 90027, 90032, 90038, 90044, 90050, 90058, 90062, 90066,
+ 90070, 90074, 90078, 90082, 90087, 90092, 90097, 90102, 90107, 90112,
+ 90117, 90122, 90127, 90132, 90137, 90142, 90147, 90151, 90156, 90161,
+ 90166, 90171, 90176, 90180, 90185, 90190, 90195, 90200, 90204, 90209,
+ 90214, 90219, 90224, 90228, 90233, 90238, 90243, 90248, 90253, 90258,
+ 90263, 90268, 90273, 90280, 90287, 90291, 90296, 90301, 90306, 90311,
+ 90316, 90321, 90326, 90331, 90336, 90341, 90346, 90351, 90356, 90361,
+ 90366, 90371, 90376, 90381, 90386, 90391, 90396, 90401, 90406, 90411,
+ 90416, 90421, 90426, 90431, 90436, 0, 0, 0, 90441, 90445, 90450, 90454,
+ 90459, 90464, 0, 0, 90468, 90473, 90478, 90482, 90487, 90492, 0, 0,
+ 90497, 90502, 90506, 90511, 90516, 90521, 0, 0, 90526, 90531, 90536, 0,
+ 0, 0, 90540, 90544, 90548, 90552, 90555, 90559, 90563, 0, 90567, 90573,
+ 90576, 90579, 90582, 90585, 90589, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90593,
+ 90599, 90605, 90611, 90617, 0, 0, 90621, 90627, 90633, 90639, 90645,
+ 90651, 90658, 90665, 90672, 90679, 90686, 90693, 0, 90700, 90707, 90714,
+ 90720, 90727, 90734, 90741, 90748, 90754, 90761, 90768, 90775, 90782,
+ 90789, 90796, 90803, 90810, 90817, 90823, 90830, 90837, 90844, 90851,
+ 90858, 90865, 90872, 0, 90879, 90886, 90893, 90900, 90907, 90914, 90921,
+ 90928, 90935, 90942, 90949, 90956, 90963, 90970, 90976, 90983, 90990,
+ 90997, 91004, 0, 91011, 91018, 0, 91025, 91032, 91039, 91046, 91053,
+ 91060, 91067, 91074, 91081, 91088, 91095, 91102, 91109, 91116, 91123, 0,
+ 0, 91129, 91134, 91139, 91144, 91149, 91154, 91159, 91164, 91169, 91174,
+ 91179, 91184, 91189, 91194, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 91199, 91206,
+ 91213, 91220, 91227, 91234, 91241, 91248, 91255, 91262, 91269, 91276,
+ 91283, 91290, 91297, 91304, 91311, 91318, 91325, 91332, 91340, 91348,
+ 91355, 91362, 91367, 91375, 91383, 91390, 91397, 91402, 91409, 91414,
+ 91419, 91426, 91431, 91436, 91441, 91449, 91454, 91459, 91466, 91471,
+ 91476, 91483, 91490, 91495, 91500, 91505, 91510, 91515, 91520, 91525,
+ 91530, 91535, 91542, 91547, 91554, 91559, 91564, 91569, 91574, 91579,
+ 91584, 91589, 91594, 91599, 91604, 91609, 91616, 91623, 91630, 91637,
+ 91643, 91648, 91655, 91660, 91665, 91674, 91681, 91690, 91697, 91702,
+ 91707, 91715, 91720, 91725, 91730, 91735, 91740, 91747, 91752, 91757,
+ 91762, 91767, 91772, 91779, 91786, 91793, 91800, 91807, 91814, 91821,
+ 91828, 91835, 91842, 91849, 91856, 91863, 91870, 91877, 91884, 91891,
+ 91898, 91905, 91912, 91919, 91926, 91933, 91940, 91947, 91954, 91961,
+ 91968, 0, 0, 0, 0, 0, 91975, 91983, 91991, 0, 0, 0, 0, 91996, 92000,
+ 92004, 92008, 92012, 92016, 92020, 92025, 92029, 92034, 92039, 92044,
+ 92049, 92054, 92059, 92064, 92069, 92074, 92079, 92085, 92091, 92097,
+ 92104, 92111, 92118, 92125, 92132, 92139, 92145, 92151, 92157, 92164,
+ 92171, 92178, 92185, 92192, 92199, 92206, 92213, 92220, 92227, 92234,
+ 92241, 92248, 92255, 0, 0, 0, 92262, 92270, 92278, 92286, 92294, 92302,
+ 92312, 92322, 92330, 92338, 92346, 92354, 92362, 92368, 92375, 92384,
+ 92393, 92402, 92411, 92420, 92429, 92439, 92450, 92460, 92471, 92480,
+ 92489, 92498, 92508, 92519, 92529, 92540, 92551, 92560, 92568, 92574,
+ 92580, 92586, 92592, 92600, 92608, 92614, 92621, 92631, 92638, 92645,
+ 92652, 92659, 92666, 92676, 92683, 92690, 92698, 92706, 92715, 92724,
+ 92733, 92742, 92751, 92759, 92768, 92777, 92786, 92790, 92797, 92802,
+ 92807, 92811, 92815, 92819, 92823, 92828, 92833, 92839, 92845, 92849,
+ 92855, 92859, 92863, 92867, 92871, 92875, 92879, 92885, 92889, 92894, 0,
+ 0, 0, 92898, 92903, 92908, 92913, 92918, 92925, 92930, 92935, 92940,
+ 92945, 92950, 92955, 0, 0, 0, 0, 92960, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 89757, 89762, 89767, 89772, 89777, 89782, 89787,
- 89792, 89797, 89802, 89807, 89812, 89817, 89822, 89827, 89832, 89837,
- 89842, 89847, 89852, 89857, 89862, 89867, 89872, 89877, 89882, 89887,
- 89891, 89895, 89899, 0, 89904, 89910, 89915, 89920, 89925, 89930, 89936,
- 89942, 89948, 89954, 89960, 89966, 89972, 89978, 89984, 89990, 89996,
- 90002, 90008, 90013, 90019, 90025, 90030, 90036, 90041, 90047, 90053,
- 90058, 90064, 90070, 90075, 90081, 90087, 90092, 90098, 90104, 90110, 0,
- 0, 0, 0, 90115, 90121, 90127, 90133, 90139, 90145, 90151, 90157, 90163,
- 90170, 90175, 90180, 90186, 90192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92966, 92973, 92982, 92991, 92998,
+ 93005, 93012, 93019, 93026, 93033, 93039, 93046, 93053, 93060, 93067,
+ 93074, 93081, 93088, 93095, 93104, 93111, 93118, 93125, 93132, 93139,
+ 93146, 93153, 93160, 93169, 93176, 93183, 93190, 93197, 93204, 93211,
+ 93220, 93227, 93234, 93241, 93248, 93257, 93264, 93271, 93278, 93286,
+ 93295, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 90198, 90203, 90208, 90213, 90219, 90224, 90230, 90236,
- 90242, 90248, 90255, 90261, 90268, 90273, 90278, 90283, 90288, 90293,
- 90298, 90303, 90308, 90313, 90318, 90323, 90328, 90333, 90338, 90343,
- 90348, 90353, 90358, 90363, 90368, 90373, 90378, 90383, 90388, 90393,
- 90398, 90403, 90408, 90413, 90418, 90423, 90429, 90434, 90440, 90446,
- 90452, 90458, 90465, 90471, 90478, 90483, 90488, 90493, 90498, 90503,
- 90508, 90513, 90518, 90523, 90528, 90533, 90538, 90543, 90548, 90553,
- 90558, 90563, 90568, 90573, 90578, 90583, 90588, 90593, 90598, 90603,
- 90608, 90613, 90618, 90623, 90628, 90633, 90638, 90643, 90648, 90653,
- 90658, 90663, 90668, 90673, 90678, 90683, 90688, 90693, 90698, 90703,
- 90708, 90713, 90718, 90723, 90728, 90733, 90738, 90743, 90748, 90753,
- 90758, 90763, 90768, 90773, 90778, 90783, 90788, 90793, 90798, 90803,
- 90808, 90813, 90818, 90823, 90828, 90833, 90838, 90843, 90848, 90853,
- 90858, 90863, 90868, 90873, 90878, 90883, 90888, 90893, 90897, 90901,
- 90906, 90911, 90916, 90921, 90926, 90931, 90936, 90941, 90946, 90951,
- 90956, 90960, 90964, 90968, 90972, 90976, 90980, 90984, 90989, 90994, 0,
- 0, 90999, 91004, 91008, 91012, 91016, 91020, 91024, 91028, 91032, 91036,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 91040, 91044, 91048, 91052,
- 91056, 91060, 0, 0, 91065, 0, 91070, 91074, 91079, 91084, 91089, 91094,
- 91099, 91104, 91109, 91114, 91119, 91123, 91128, 91133, 91138, 91143,
- 91147, 91152, 91157, 91162, 91167, 91171, 91176, 91181, 91186, 91191,
- 91195, 91200, 91205, 91210, 91215, 91219, 91224, 91229, 91234, 91239,
- 91244, 91249, 91254, 91258, 91263, 91268, 91273, 91278, 0, 91283, 91288,
- 0, 0, 0, 91293, 0, 0, 91298, 91303, 91310, 91317, 91324, 91331, 91338,
- 91345, 91352, 91359, 91366, 91373, 91380, 91387, 91394, 91401, 91408,
- 91415, 91422, 91429, 91436, 91443, 91450, 0, 91457, 91464, 91470, 91476,
- 91482, 91489, 91496, 91504, 91512, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 91521, 91526,
- 91531, 91536, 91541, 91546, 91551, 91556, 91561, 91566, 91571, 91576,
- 91581, 91586, 91591, 91596, 91601, 91606, 91611, 91616, 91621, 91626,
- 91631, 91635, 91640, 91645, 91651, 91655, 0, 0, 0, 91659, 91665, 91669,
- 91674, 91679, 91684, 91688, 91693, 91697, 91702, 91707, 91711, 91715,
- 91720, 91724, 91728, 91733, 91738, 91742, 91747, 91752, 91757, 91762,
- 91767, 91772, 91777, 91782, 0, 0, 0, 0, 0, 91787, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93304, 93308, 93312, 93317, 93322,
+ 93327, 93332, 93336, 93341, 93346, 93351, 93356, 93361, 93366, 93370,
+ 93375, 93380, 93385, 93390, 93394, 93399, 93404, 93408, 93412, 93417,
+ 93422, 93427, 93432, 93437, 0, 0, 0, 93442, 93446, 93451, 93456, 93460,
+ 93465, 93469, 93474, 93479, 93484, 93489, 93494, 93498, 93503, 93508,
+ 93513, 93518, 93522, 93527, 93531, 93536, 93541, 93546, 93551, 93556,
+ 93561, 93565, 93569, 93574, 93579, 93584, 93589, 93594, 93599, 93604,
+ 93609, 93614, 93619, 93624, 93629, 93634, 93639, 93644, 93649, 93654,
+ 93659, 93664, 93669, 93674, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 93679, 93685, 93690, 93695, 93700, 93705, 93710, 93715, 93721, 93726,
+ 93732, 93738, 93744, 93750, 93756, 93762, 93768, 93774, 93780, 93786,
+ 93793, 93800, 93807, 93815, 93823, 93831, 93839, 93847, 0, 0, 0, 0,
+ 93855, 93859, 93864, 93869, 93874, 93878, 93883, 93888, 93893, 93898,
+ 93902, 93906, 93911, 93916, 93921, 93926, 93930, 93935, 93940, 93945,
+ 93950, 93955, 93960, 93964, 93969, 93974, 93979, 93984, 93989, 93994,
+ 93999, 94004, 94009, 94014, 94019, 94025, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 94031, 94036, 94041, 94046, 94051, 94056, 94061, 94066, 94071,
+ 94076, 94081, 94086, 94091, 94096, 94101, 94106, 94111, 94116, 94121,
+ 94126, 94131, 94136, 94141, 94146, 94151, 94156, 94161, 0, 0, 0, 0, 0,
+ 94168, 94174, 94180, 94186, 94192, 94197, 94203, 94209, 94215, 94221,
+ 94226, 94232, 94238, 94244, 94250, 94256, 94262, 94268, 94274, 94280,
+ 94285, 94291, 94297, 94303, 94309, 94315, 94320, 94326, 94332, 94337,
+ 94343, 94349, 94355, 94361, 94367, 94373, 94379, 94384, 94390, 94397,
+ 94404, 94411, 94418, 0, 0, 0, 0, 0, 94425, 94430, 94435, 94440, 94445,
+ 94450, 94455, 94460, 94465, 94470, 94475, 94480, 94485, 94490, 94495,
+ 94500, 94505, 94510, 94515, 94520, 94525, 94530, 94535, 94540, 94545,
+ 94550, 94555, 94559, 94563, 94567, 0, 94572, 94578, 94583, 94588, 94593,
+ 94598, 94604, 94610, 94616, 94622, 94628, 94634, 94640, 94646, 94652,
+ 94658, 94664, 94670, 94676, 94681, 94687, 94693, 94699, 94705, 94710,
+ 94716, 94722, 94727, 94733, 94739, 94745, 94751, 94757, 94763, 94769,
+ 94775, 94781, 0, 0, 0, 0, 94786, 94792, 94798, 94804, 94810, 94816,
+ 94822, 94828, 94834, 94841, 94846, 94851, 94857, 94863, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94869, 94875, 94881, 94887, 94894,
+ 94900, 94907, 94914, 94921, 94928, 94936, 94943, 94951, 94957, 94963,
+ 94969, 94975, 94981, 94987, 94993, 94999, 95005, 95011, 95017, 95023,
+ 95029, 95035, 95041, 95047, 95053, 95059, 95065, 95071, 95077, 95083,
+ 95089, 95095, 95101, 95107, 95113, 95119, 95125, 95131, 95137, 95144,
+ 95150, 95157, 95164, 95171, 95178, 95186, 95193, 95201, 95207, 95213,
+ 95219, 95225, 95231, 95237, 95243, 95249, 95255, 95261, 95267, 95273,
+ 95279, 95285, 95291, 95297, 95303, 95309, 95315, 95321, 95327, 95333,
+ 95339, 95345, 95351, 95357, 95363, 95369, 95374, 95379, 95384, 95389,
+ 95394, 95399, 95404, 95409, 95414, 95419, 95424, 95429, 95434, 95439,
+ 95444, 95449, 95454, 95459, 95464, 95469, 95474, 95479, 95484, 95489,
+ 95494, 95499, 95504, 95509, 95514, 95519, 95524, 95529, 95534, 95539,
+ 95544, 95549, 95554, 95559, 95564, 95569, 95574, 95579, 95584, 95589,
+ 95594, 95599, 95604, 95609, 95614, 95619, 95624, 95629, 95634, 95639,
+ 95644, 95649, 95654, 95659, 95664, 95669, 95674, 95679, 95684, 95689,
+ 95694, 95699, 95704, 95709, 95713, 95717, 95721, 95725, 95729, 95733,
+ 95737, 95742, 95747, 0, 0, 95752, 95757, 95761, 95765, 95769, 95773,
+ 95777, 95781, 95786, 95790, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 91792, 91798, 91804, 91810, 91816, 91822, 91829,
- 91836, 91843, 91849, 91855, 91861, 91868, 91875, 91882, 91888, 91895,
- 91902, 91909, 91916, 91922, 91929, 91936, 91942, 91949, 91956, 91963,
- 91970, 91977, 91983, 91990, 91997, 92004, 92010, 92016, 92022, 92028,
- 92034, 92041, 92048, 92054, 92060, 92066, 92073, 92079, 92086, 92093,
- 92100, 92106, 92114, 92121, 92127, 92134, 92141, 92148, 92154, 0, 0, 0,
- 0, 0, 0, 92161, 92169, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 92177, 92181, 92186, 92191, 0, 92197, 92202, 0, 0, 0, 0, 0, 92207, 92213,
- 92220, 92225, 92230, 92234, 92239, 92244, 0, 92249, 92254, 92259, 0,
- 92264, 92269, 92274, 92279, 92284, 92289, 92294, 92299, 92304, 92309,
- 92314, 92318, 92322, 92327, 92332, 92337, 92341, 92345, 92349, 92354,
- 92359, 92364, 92369, 92373, 92378, 92382, 92387, 0, 0, 0, 0, 92392,
- 92398, 92403, 0, 0, 0, 0, 92408, 92412, 92416, 92420, 92424, 92428,
- 92433, 92438, 92444, 0, 0, 0, 0, 0, 0, 0, 0, 92450, 92456, 92463, 92469,
- 92476, 92482, 92488, 92494, 92501, 0, 0, 0, 0, 0, 0, 0, 92507, 92515,
- 92523, 92531, 92539, 92547, 92555, 92563, 92571, 92579, 92587, 92595,
- 92603, 92611, 92619, 92627, 92635, 92643, 92651, 92659, 92667, 92675,
- 92683, 92691, 92699, 92707, 92715, 92723, 92731, 92739, 92746, 92754,
- 92762, 92766, 92771, 92776, 92781, 92786, 92791, 92796, 92801, 92805,
- 92810, 92814, 92819, 92823, 92828, 92832, 92837, 92842, 92847, 92852,
- 92857, 92862, 92867, 92872, 92877, 92882, 92887, 92892, 92897, 92902,
- 92907, 92912, 92917, 92922, 92927, 92932, 92937, 92942, 92947, 92952,
- 92957, 92962, 92967, 92972, 92977, 92982, 92987, 92992, 92997, 93002,
- 93007, 93012, 93017, 93022, 0, 0, 0, 93027, 93032, 93041, 93049, 93058,
- 93067, 93078, 93089, 93096, 93103, 93110, 93117, 93124, 93131, 93138,
- 93145, 93152, 93159, 93166, 93173, 93180, 93187, 93194, 93201, 93208,
- 93215, 93222, 93229, 93236, 0, 0, 93243, 93249, 93255, 93261, 93267,
- 93274, 93281, 93289, 93297, 93304, 93311, 93318, 93325, 93332, 93339,
- 93346, 93353, 93360, 93367, 93374, 93381, 93388, 93395, 93402, 93409,
- 93416, 93423, 0, 0, 0, 0, 0, 93430, 93436, 93442, 93448, 93454, 93461,
- 93468, 93476, 93484, 93490, 93496, 93503, 93509, 93515, 93521, 93527,
- 93534, 93541, 93548, 93555, 93562, 93569, 93576, 93583, 93590, 93597,
- 93604, 93611, 93618, 93625, 93632, 93639, 93646, 93653, 93660, 93667,
- 93674, 93681, 93688, 93695, 93702, 93709, 93716, 93723, 93730, 93737,
- 93744, 93751, 93758, 93765, 93772, 93779, 93786, 93793, 93800, 93807,
- 93814, 93821, 93828, 93835, 93842, 93849, 93856, 93863, 93870, 93877,
- 93884, 93891, 93898, 93905, 93912, 93919, 93926, 93933, 93940, 93947,
- 93954, 93961, 93968, 93975, 93982, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 95795, 95799, 95804, 95809, 95814, 95819, 95824, 95829, 95834, 95838,
+ 95843, 95848, 95853, 95858, 95862, 95867, 95872, 95877, 95882, 95887,
+ 95892, 95897, 95902, 95906, 95911, 95916, 95921, 95926, 95931, 95936,
+ 95941, 95946, 95950, 95955, 95960, 95965, 95970, 95975, 95980, 95985, 0,
+ 0, 0, 0, 0, 0, 0, 0, 95990, 95997, 96004, 96011, 96018, 96025, 96032,
+ 96039, 96046, 96053, 96060, 96067, 96074, 96081, 96088, 96095, 96102,
+ 96109, 96116, 96123, 96130, 96137, 96144, 96151, 96158, 96165, 96172,
+ 96179, 96186, 96193, 96200, 96207, 96214, 96221, 96228, 96235, 96242,
+ 96249, 96256, 96263, 96270, 96277, 96284, 96291, 96298, 96305, 96312,
+ 96319, 96326, 96333, 96340, 96347, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 96354, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 96361, 96366, 96371, 96376, 96381, 96386, 96391, 96396, 96401,
+ 96406, 96411, 96416, 96421, 96426, 96431, 96436, 96441, 96446, 96451,
+ 96456, 96461, 96466, 96471, 96476, 96481, 96486, 96491, 96496, 96501,
+ 96506, 96511, 96516, 96521, 96526, 96531, 96536, 96541, 96546, 96551,
+ 96556, 96561, 96566, 96571, 96576, 96581, 96586, 96591, 96596, 96601,
+ 96606, 96611, 96616, 96621, 96626, 96631, 96636, 96641, 96646, 96651,
+ 96656, 96661, 96666, 96671, 96676, 96681, 96686, 96691, 96696, 96701,
+ 96706, 96711, 96716, 96721, 96726, 96731, 96736, 96741, 96746, 96751,
+ 96756, 96761, 96766, 96771, 96776, 96781, 96786, 96791, 96796, 96801,
+ 96806, 96811, 96816, 96821, 96826, 96831, 96836, 96841, 96846, 96851,
+ 96856, 96861, 96866, 96871, 96876, 96881, 96886, 96891, 96896, 96901,
+ 96906, 96911, 96916, 96921, 96926, 96931, 96936, 96941, 96946, 96951,
+ 96956, 96961, 96966, 96971, 96976, 96981, 96986, 96991, 96996, 97001,
+ 97006, 97011, 97016, 97021, 97026, 97031, 97036, 97041, 97046, 97051,
+ 97056, 97061, 97066, 97071, 97076, 97081, 97086, 97091, 97096, 97101,
+ 97106, 97111, 97116, 97121, 97126, 97131, 97136, 97141, 97146, 97151,
+ 97156, 97161, 97166, 97171, 97176, 97181, 97186, 97191, 97196, 97201,
+ 97206, 97211, 97216, 97221, 97226, 97231, 97236, 97241, 97246, 97251,
+ 97256, 97261, 97266, 97271, 97276, 97281, 97286, 97291, 97296, 97301,
+ 97306, 97311, 97316, 97321, 97326, 97331, 97336, 97341, 97346, 97351,
+ 97356, 97361, 97366, 97371, 97376, 97381, 97386, 97391, 97396, 97401,
+ 97406, 97411, 97416, 97421, 97426, 97431, 97436, 97441, 97446, 97451,
+ 97456, 97461, 97466, 97471, 97476, 97481, 97486, 97491, 97496, 97501,
+ 97506, 97511, 97516, 97521, 97526, 97531, 97536, 97541, 97546, 97551,
+ 97556, 97561, 97566, 97571, 97576, 97581, 97586, 97591, 97596, 97601,
+ 97606, 97611, 97616, 97621, 97626, 97631, 97636, 97641, 97646, 97651,
+ 97656, 97661, 97666, 97671, 97676, 97681, 97686, 97691, 97696, 97701,
+ 97706, 97711, 97716, 97721, 97726, 97731, 97736, 97741, 97746, 97751,
+ 97756, 97761, 97766, 97771, 97776, 97781, 97786, 97791, 97796, 97801,
+ 97806, 97811, 97816, 97821, 97826, 97831, 97836, 97841, 97846, 97851,
+ 97856, 97861, 97866, 97871, 97876, 97881, 97886, 97891, 97896, 97901,
+ 97906, 97911, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97916, 97922, 97929, 97936,
+ 97942, 97949, 97956, 97963, 97970, 97976, 97983, 97990, 97997, 98004,
+ 98011, 98018, 98025, 98032, 98039, 98046, 98053, 98060, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 98067, 98072, 98077, 98082, 98087, 98092, 98097, 98102, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 98107, 98111, 98115, 98119, 98123, 98127, 0, 0, 98132,
+ 0, 98137, 98141, 98146, 98151, 98156, 98161, 98166, 98171, 98176, 98181,
+ 98186, 98190, 98195, 98200, 98205, 98210, 98215, 98220, 98225, 98230,
+ 98235, 98239, 98244, 98249, 98254, 98259, 98264, 98269, 98274, 98279,
+ 98284, 98289, 98294, 98299, 98304, 98309, 98314, 98319, 98324, 98328,
+ 98333, 98338, 98343, 98348, 0, 98353, 98358, 0, 0, 0, 98363, 0, 0, 98368,
+ 98373, 98380, 98387, 98394, 98401, 98408, 98415, 98422, 98429, 98436,
+ 98443, 98450, 98457, 98464, 98471, 98478, 98485, 98492, 98499, 98506,
+ 98513, 98520, 0, 98527, 98534, 98540, 98546, 98552, 98559, 98566, 98574,
+ 98582, 98591, 98596, 98601, 98606, 98611, 98616, 98621, 98626, 98631,
+ 98636, 98641, 98646, 98651, 98656, 98662, 98667, 98672, 98677, 98682,
+ 98687, 98692, 98697, 98702, 98707, 98713, 98719, 98723, 98727, 98731,
+ 98735, 98739, 98744, 98749, 98755, 98760, 98766, 98771, 98776, 98781,
+ 98787, 98792, 98797, 98802, 98807, 98812, 98818, 98823, 98829, 98834,
+ 98840, 98845, 98851, 98856, 98862, 98867, 98872, 98877, 98882, 98887,
+ 98892, 98897, 98903, 98908, 0, 0, 0, 0, 0, 0, 0, 0, 98913, 98917, 98921,
+ 98925, 98929, 98935, 98939, 98944, 98949, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 98955, 98960, 98965, 98970,
+ 98975, 98980, 98985, 98990, 98995, 99000, 99005, 99010, 99015, 99020,
+ 99025, 99030, 99035, 99040, 99045, 0, 99050, 99055, 0, 0, 0, 0, 0, 99060,
+ 99064, 99068, 99073, 99078, 99084, 99089, 99094, 99099, 99104, 99109,
+ 99114, 99119, 99124, 99129, 99134, 99139, 99144, 99149, 99154, 99159,
+ 99164, 99169, 99174, 99179, 99184, 99189, 99194, 99198, 99203, 99208,
+ 99214, 99218, 0, 0, 0, 99222, 99228, 99232, 99237, 99242, 99247, 99251,
+ 99256, 99260, 99265, 99270, 99274, 99279, 99284, 99288, 99292, 99297,
+ 99302, 99306, 99311, 99316, 99320, 99325, 99330, 99335, 99340, 99345, 0,
+ 0, 0, 0, 0, 99350, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99355,
+ 99360, 99365, 99370, 99375, 99380, 99386, 99392, 99398, 99403, 99408,
+ 99414, 99420, 99426, 99432, 99438, 99444, 99450, 99456, 99462, 99468,
+ 99474, 99480, 99485, 99491, 99497, 99503, 99509, 99515, 99520, 99526,
+ 99532, 99538, 99542, 99546, 99550, 99554, 99558, 99563, 99568, 99572,
+ 99576, 99581, 99586, 99591, 99596, 99601, 99606, 99611, 99618, 99623,
+ 99627, 99632, 99637, 99642, 99646, 0, 0, 0, 0, 99651, 99659, 99666,
+ 99672, 99678, 99682, 99686, 99690, 99694, 99698, 99702, 99707, 99711,
+ 99716, 99721, 99726, 99731, 99736, 99741, 99746, 0, 0, 99751, 99757,
+ 99763, 99769, 99776, 99783, 99790, 99797, 99804, 99811, 99817, 99823,
+ 99829, 99836, 99843, 99850, 99857, 99864, 99871, 99878, 99885, 99892,
+ 99899, 99906, 99913, 99920, 99927, 99934, 99942, 99950, 99958, 99967,
+ 99976, 99985, 99994, 100003, 100012, 100019, 100026, 100033, 100041,
+ 100049, 100057, 100065, 100073, 100081, 100089, 100093, 100098, 100103,
+ 0, 100109, 100114, 0, 0, 0, 0, 0, 100119, 100125, 100132, 100137, 100142,
+ 100146, 100151, 100156, 0, 100161, 100166, 100171, 0, 100176, 100181,
+ 100186, 100191, 100196, 100201, 100206, 100211, 100216, 100221, 100226,
+ 100231, 100235, 100240, 100245, 100250, 100254, 100258, 100263, 100268,
+ 100273, 100278, 100283, 100288, 100293, 100297, 100302, 0, 0, 0, 0,
+ 100307, 100313, 100318, 0, 0, 0, 0, 100323, 100327, 100331, 100335,
+ 100339, 100343, 100348, 100353, 100359, 0, 0, 0, 0, 0, 0, 0, 0, 100365,
+ 100371, 100378, 100384, 100391, 100397, 100403, 100409, 100416, 0, 0, 0,
+ 0, 0, 0, 0, 100422, 100430, 100438, 100446, 100454, 100462, 100470,
+ 100478, 100486, 100494, 100502, 100510, 100518, 100526, 100534, 100542,
+ 100550, 100558, 100566, 100574, 100582, 100590, 100598, 100606, 100614,
+ 100622, 100630, 100638, 100646, 100654, 100661, 100669, 100677, 100684,
+ 100691, 100698, 100705, 100712, 100719, 100726, 100733, 100740, 100747,
+ 100754, 100761, 100768, 100775, 100782, 100789, 100796, 100803, 100810,
+ 100817, 100824, 100831, 100838, 100845, 100852, 100859, 100866, 100873,
+ 100880, 100886, 100893, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100900, 100905, 100910,
+ 100915, 100920, 100925, 100930, 100935, 100940, 100945, 100950, 100955,
+ 100960, 100965, 100970, 100975, 100980, 100985, 100990, 100995, 101000,
+ 101005, 101010, 101015, 101020, 101025, 101030, 101035, 101040, 101045,
+ 101050, 101055, 101060, 101065, 101070, 101075, 101080, 101085, 101091,
+ 0, 0, 0, 0, 101097, 101101, 101105, 101110, 101115, 101121, 101127,
+ 101133, 101143, 101152, 101158, 101165, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 101173, 101177, 101182, 101187, 101192, 101197, 101202, 101207, 101212,
+ 101216, 101221, 101225, 101230, 101234, 101239, 101243, 101248, 101253,
+ 101258, 101263, 101268, 101273, 101278, 101283, 101288, 101293, 101298,
+ 101303, 101308, 101313, 101318, 101323, 101328, 101333, 101338, 101343,
+ 101348, 101353, 101358, 101363, 101368, 101373, 101378, 101383, 101388,
+ 101393, 101398, 101403, 101408, 101413, 101418, 101423, 101428, 101433,
+ 0, 0, 0, 101438, 101443, 101452, 101460, 101469, 101478, 101489, 101500,
+ 101507, 101514, 101521, 101528, 101535, 101542, 101549, 101556, 101563,
+ 101570, 101577, 101584, 101591, 101598, 101605, 101612, 101619, 101626,
+ 101633, 101640, 101647, 0, 0, 101654, 101660, 101666, 101672, 101678,
+ 101685, 101692, 101700, 101708, 101715, 101722, 101729, 101736, 101743,
+ 101750, 101757, 101764, 101771, 101778, 101785, 101792, 101799, 101806,
+ 101813, 101820, 101827, 101834, 0, 0, 0, 0, 0, 101841, 101847, 101853,
+ 101859, 101865, 101872, 101879, 101887, 101895, 101902, 101909, 101916,
+ 101923, 101930, 101937, 101944, 101951, 101958, 101965, 101972, 101979,
+ 101986, 101993, 102000, 102007, 102014, 0, 0, 0, 0, 0, 0, 0, 102021,
+ 102028, 102037, 102047, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102057,
+ 102063, 102069, 102075, 102081, 102088, 102095, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 102103, 102110, 102117, 102125, 102132, 102139, 102146, 102153, 102161,
+ 102169, 102177, 102185, 102193, 102201, 102209, 102217, 102225, 102233,
+ 102241, 102249, 102257, 102265, 102273, 102281, 102289, 102297, 102305,
+ 102313, 102321, 102329, 102337, 102345, 102353, 102361, 102369, 102377,
+ 102385, 102393, 102401, 102409, 102417, 102425, 102433, 102441, 102449,
+ 102457, 102465, 102473, 102481, 102489, 102497, 102505, 102513, 102521,
+ 102529, 102537, 102545, 102553, 102561, 102569, 102577, 102585, 102593,
+ 102601, 102609, 102617, 102625, 102633, 102641, 102649, 102657, 102665,
+ 102673, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 102681, 102686, 102692, 102698, 102704,
+ 102710, 102716, 102722, 102728, 102734, 102739, 102746, 102752, 102758,
+ 102764, 102770, 102776, 102781, 102787, 102793, 102799, 102805, 102811,
+ 102817, 102823, 102829, 102835, 102841, 102846, 102852, 102860, 102868,
+ 102874, 102880, 102886, 102892, 102900, 102906, 102912, 102918, 102924,
+ 102930, 102936, 102941, 102947, 102955, 102963, 102969, 102975, 102981,
+ 102988, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102994, 102999, 103005,
+ 103011, 103017, 103023, 103029, 103035, 103041, 103047, 103052, 103059,
+ 103065, 103071, 103077, 103083, 103089, 103094, 103100, 103106, 103112,
+ 103118, 103124, 103130, 103136, 103142, 103148, 103154, 103159, 103165,
+ 103173, 103181, 103187, 103193, 103199, 103205, 103213, 103219, 103225,
+ 103231, 103237, 103243, 103249, 103254, 103260, 103268, 103276, 103282,
+ 103288, 103294, 103301, 0, 0, 0, 0, 0, 0, 0, 103307, 103311, 103315,
+ 103320, 103325, 103331, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 103337, 103341, 103345, 103349, 103353, 103357,
+ 103361, 103366, 103370, 103375, 103380, 103385, 103390, 103395, 103400,
+ 103405, 103410, 103415, 103420, 103426, 103432, 103438, 103445, 103452,
+ 103459, 103466, 103473, 103480, 103487, 103494, 103501, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 103508, 103512, 103516, 103520, 103524, 103528, 103531, 103535,
+ 103538, 103542, 103545, 103549, 103553, 103558, 103562, 103567, 103570,
+ 103574, 103577, 103581, 103584, 103588, 103592, 103596, 103600, 103604,
+ 103608, 103612, 103616, 103620, 103624, 103628, 103632, 103636, 103640,
+ 103644, 103648, 103652, 103656, 103660, 103663, 103667, 103671, 103675,
+ 103678, 103681, 103685, 103689, 103693, 103697, 103701, 103705, 103708,
+ 103712, 103718, 103724, 103730, 103735, 103742, 103746, 103751, 103755,
+ 103760, 103765, 103771, 103776, 103782, 103786, 103791, 103795, 103800,
+ 103803, 103806, 103810, 103815, 103821, 103826, 103832, 0, 0, 0, 0,
+ 103837, 103840, 103843, 103846, 103849, 103852, 103855, 103859, 103862,
+ 103866, 103870, 103874, 103878, 103882, 103886, 103890, 103894, 103898,
+ 103902, 103907, 103912, 103916, 103919, 103922, 103925, 103928, 103931,
+ 103934, 103938, 103941, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 103945, 103949, 103954, 103959, 103964, 103968, 103973, 103977, 103982,
+ 103986, 103991, 103995, 104000, 104004, 104009, 104013, 104018, 104023,
+ 104028, 104033, 104038, 104043, 104048, 104053, 104058, 104063, 104068,
+ 104073, 104078, 104083, 104088, 104093, 104098, 104103, 104108, 104113,
+ 104118, 104122, 104127, 104132, 104137, 104141, 104145, 104150, 104155,
+ 104160, 104165, 104170, 104175, 104179, 104185, 104190, 104196, 104201,
+ 104207, 104212, 104218, 104223, 104229, 104234, 104239, 104244, 104249,
+ 104253, 104258, 104264, 104268, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 104273, 104280, 104287, 104294, 104301, 104308, 104315, 104322, 104329,
+ 104336, 104343, 104350, 104357, 104364, 104371, 104378, 104385, 104392,
+ 104399, 104406, 104413, 104420, 104427, 104434, 104441, 0, 0, 0, 0, 0, 0,
+ 0, 104448, 104455, 104461, 104467, 104473, 104479, 104485, 104491,
+ 104498, 104504, 0, 0, 0, 0, 0, 0, 104511, 104516, 104521, 104526, 104531,
+ 104535, 104539, 104543, 104548, 104553, 104558, 104563, 104568, 104573,
+ 104578, 104583, 104588, 104593, 104598, 104603, 104608, 104613, 104618,
+ 104623, 104628, 104633, 104638, 104643, 104648, 104653, 104658, 104663,
+ 104668, 104673, 104678, 104683, 104688, 104693, 104698, 104703, 104708,
+ 104713, 104719, 104724, 104730, 104735, 104741, 104746, 104752, 104758,
+ 104762, 104767, 104771, 0, 104775, 104780, 104784, 104788, 104792,
+ 104796, 104800, 104804, 104809, 104813, 104818, 104823, 104827, 104832,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 104837, 104841, 104845, 104849,
+ 104853, 104857, 104861, 104866, 104871, 104876, 104881, 104886, 104891,
+ 104896, 104901, 104906, 104911, 104916, 104921, 104926, 104931, 104936,
+ 104941, 104946, 104951, 104955, 104960, 104965, 104970, 104974, 104979,
+ 104984, 104989, 104994, 104998, 105003, 105008, 105013, 105018, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 105023, 105027, 105031, 105035, 105038, 105042, 105045,
+ 105049, 105052, 105056, 105060, 105065, 105069, 105074, 105077, 105081,
+ 105084, 105088, 105091, 105095, 105099, 105103, 105107, 105111, 105115,
+ 105119, 105123, 105127, 105131, 105135, 105139, 105143, 105147, 105151,
+ 105155, 105159, 105163, 105167, 105170, 105174, 105178, 105182, 105185,
+ 105188, 105192, 105196, 105200, 105204, 105208, 105212, 105216, 105219,
+ 105224, 105228, 105233, 105237, 105242, 105247, 105253, 105258, 105264,
+ 105268, 105273, 105277, 105282, 105286, 105290, 105294, 105298, 105301,
+ 105304, 105308, 105312, 105315, 105319, 105323, 105327, 105334, 0, 0,
+ 105338, 105342, 105345, 105348, 105351, 105354, 105357, 105360, 105364,
+ 105367, 105371, 105374, 105378, 105381, 105385, 105390, 0, 105395,
+ 105400, 105405, 105410, 105415, 105420, 105425, 105431, 105436, 105442,
+ 105448, 105454, 105460, 105466, 105472, 105478, 105484, 105490, 105496,
+ 105503, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 105510, 105514, 105519, 105523,
+ 105527, 105531, 105536, 105540, 105545, 105549, 105554, 105559, 105564,
+ 105569, 105574, 105579, 105584, 105589, 0, 105594, 105599, 105604,
+ 105609, 105614, 105619, 105624, 105629, 105634, 105639, 105644, 105649,
+ 105654, 105658, 105663, 105668, 105673, 105678, 105682, 105686, 105691,
+ 105696, 105701, 105706, 105710, 105715, 105721, 105726, 105732, 105737,
+ 105742, 105748, 105753, 105759, 105764, 105769, 105774, 105779, 105783,
+ 105788, 105794, 105799, 105805, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 105810, 105814, 105818, 105822, 105826, 105830, 105835, 0,
+ 105840, 0, 105845, 105850, 105855, 105860, 0, 105865, 105870, 105875,
+ 105880, 105885, 105890, 105895, 105900, 105905, 105910, 105915, 105920,
+ 105925, 105929, 105934, 0, 105939, 105944, 105948, 105952, 105957,
+ 105962, 105967, 105972, 105976, 105981, 105986, 0, 0, 0, 0, 0, 0, 105991,
+ 105995, 106000, 106004, 106009, 106013, 106018, 106022, 106027, 106031,
+ 106036, 106040, 106045, 106050, 106055, 106060, 106065, 106070, 106075,
+ 106080, 106085, 106090, 106095, 106100, 106105, 106110, 106115, 106120,
+ 106125, 106130, 106135, 106140, 106145, 106150, 106155, 106159, 106164,
+ 106169, 106174, 106179, 106183, 106187, 106192, 106197, 106202, 106207,
+ 106212, 106216, 106221, 106227, 106232, 106238, 106243, 106249, 106254,
+ 106260, 106265, 106271, 106276, 0, 0, 0, 0, 0, 106281, 106286, 106290,
+ 106294, 106298, 106302, 106306, 106310, 106315, 106319, 0, 0, 0, 0, 0, 0,
+ 106324, 106331, 106336, 106341, 0, 106346, 106350, 106355, 106359,
+ 106364, 106368, 106373, 106378, 0, 0, 106383, 106388, 0, 0, 106393,
+ 106398, 106403, 106407, 106412, 106417, 106422, 106427, 106432, 106437,
+ 106442, 106447, 106452, 106457, 106462, 106467, 106472, 106477, 106482,
+ 106487, 106492, 106497, 0, 106502, 106506, 106511, 106516, 106521,
+ 106525, 106529, 0, 106534, 106539, 0, 106544, 106549, 106554, 106559,
+ 106564, 0, 0, 106568, 106573, 106578, 106584, 106589, 106595, 106600,
+ 106606, 106612, 0, 0, 106619, 106625, 0, 0, 106631, 106637, 106643, 0, 0,
+ 106648, 0, 0, 0, 0, 0, 0, 106652, 0, 0, 0, 0, 0, 106659, 106664, 106671,
+ 106679, 106685, 106691, 106697, 0, 0, 106704, 106710, 106715, 106720,
+ 106725, 106730, 106735, 0, 0, 0, 106740, 106745, 106750, 106756, 106762,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 106767, 106771, 106775, 106780, 106784, 106789, 106793, 106798,
+ 106803, 106809, 106814, 106820, 106824, 106829, 106833, 106838, 106842,
+ 106847, 106852, 106857, 106862, 106867, 106872, 106877, 106882, 106887,
+ 106892, 106897, 106902, 106907, 106912, 106917, 106922, 106927, 106932,
+ 106937, 106941, 106946, 106951, 106956, 106960, 106964, 106969, 106974,
+ 106979, 106984, 106989, 106994, 106998, 107004, 107009, 107015, 107020,
+ 107026, 107032, 107039, 107045, 107052, 107057, 107064, 107070, 107075,
+ 107082, 107088, 107093, 107098, 107103, 107108, 107113, 107118, 107122,
+ 107127, 0, 0, 0, 0, 0, 0, 0, 0, 107131, 107136, 107140, 107144, 107148,
+ 107152, 107156, 107160, 107165, 107169, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 107174, 107177, 107181, 107184, 107188,
+ 107191, 107195, 107199, 107204, 107208, 107213, 107216, 107220, 107223,
+ 107227, 107230, 107234, 107238, 107242, 107246, 107250, 107254, 107258,
+ 107262, 107266, 107270, 107274, 107278, 107282, 107286, 107290, 107294,
+ 107298, 107302, 107306, 107309, 107313, 107317, 107321, 107324, 107327,
+ 107331, 107335, 107339, 107343, 107347, 107351, 107354, 107359, 107363,
+ 107368, 107372, 107377, 107382, 0, 0, 107388, 107392, 107397, 107401,
+ 107406, 107410, 107414, 107418, 107422, 107426, 107430, 107433, 107437,
+ 107442, 107446, 107451, 107456, 107461, 107468, 107480, 107492, 107504,
+ 107517, 107531, 107538, 107548, 107556, 107565, 107574, 107583, 107593,
+ 107604, 107616, 107623, 107630, 107638, 107643, 107649, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 107656, 107660, 107665, 107669, 107674, 107678, 107683,
+ 107688, 107694, 107699, 107705, 107709, 107714, 107718, 107723, 107727,
+ 107732, 107737, 107742, 107747, 107752, 107757, 107762, 107767, 107772,
+ 107777, 107782, 107787, 107792, 107797, 107802, 107807, 107812, 107817,
+ 107822, 107826, 107831, 107836, 107841, 107845, 107849, 107854, 107859,
+ 107864, 107869, 107874, 107879, 107883, 107888, 107894, 107899, 107905,
+ 107910, 107916, 107922, 107929, 107935, 107942, 107947, 107953, 107958,
+ 107964, 107969, 107974, 107979, 107984, 107988, 107993, 107998, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 108003, 108008, 108012, 108016, 108020, 108024,
+ 108028, 108032, 108037, 108041, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 108046, 108050, 108055, 108059, 108064, 108068, 108073, 108077, 108082,
+ 108086, 108091, 108095, 108100, 108105, 108110, 108115, 108120, 108125,
+ 108130, 108135, 108140, 108145, 108150, 108155, 108160, 108165, 108170,
+ 108175, 108180, 108185, 108190, 108194, 108199, 108204, 108209, 108213,
+ 108217, 108222, 108227, 108232, 108237, 108242, 108246, 108251, 108256,
+ 108261, 108267, 108272, 108278, 108283, 108289, 108294, 108300, 108305,
+ 108311, 108316, 0, 0, 0, 0, 0, 0, 0, 0, 108321, 108326, 108330, 108334,
+ 108338, 108342, 108346, 108350, 108355, 108359, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 108364,
+ 108368, 108373, 108378, 108383, 108388, 108395, 108399, 108404, 108409,
+ 108413, 108418, 108423, 108428, 108433, 108438, 108443, 108448, 108452,
+ 108456, 108461, 108466, 108471, 108478, 108483, 108488, 0, 0, 0, 108493,
+ 108500, 108507, 108516, 108521, 108527, 108532, 108538, 108543, 108549,
+ 108554, 108560, 108565, 108571, 108577, 0, 0, 0, 0, 108582, 108587,
+ 108591, 108595, 108599, 108603, 108607, 108611, 108616, 108620, 108625,
+ 108630, 108635, 108641, 108646, 108651, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 108656, 108664, 108671, 108679, 108687, 108694, 108702,
+ 108710, 108718, 108725, 108732, 108740, 108748, 108756, 108764, 108772,
+ 108780, 108788, 108796, 108804, 108812, 108820, 108828, 108836, 108844,
+ 108852, 108860, 108868, 108876, 108884, 108892, 108900, 108908, 108916,
+ 108923, 108931, 108939, 108946, 108954, 108962, 108970, 108977, 108984,
+ 108992, 109000, 109008, 109016, 109024, 109032, 109040, 109048, 109056,
+ 109064, 109072, 109080, 109088, 109096, 109104, 109112, 109120, 109128,
+ 109136, 109144, 109152, 109160, 109167, 109173, 109179, 109185, 109191,
+ 109197, 109203, 109210, 109216, 109223, 109230, 109237, 109244, 109251,
+ 109258, 109265, 109272, 109279, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 109286, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 109292, 109300, 109308, 109317, 109325, 109334, 109343, 109352,
+ 109361, 109369, 109378, 109387, 109396, 109405, 109414, 109423, 109432,
+ 109441, 109450, 109459, 109468, 109477, 109485, 109493, 109501, 109509,
+ 109517, 109526, 109535, 109545, 109555, 109565, 109575, 109585, 109594,
+ 109604, 109614, 109624, 109635, 109645, 109657, 109669, 109680, 109694,
+ 109705, 109715, 109727, 109738, 109748, 109760, 109772, 109783, 109794,
+ 109804, 109814, 109826, 109837, 0, 0, 0, 0, 0, 0, 0, 109849, 109852,
+ 109857, 109863, 109871, 109876, 109882, 109890, 109896, 109902, 109906,
+ 109910, 109917, 109926, 109933, 109942, 109948, 109957, 109964, 109971,
+ 109978, 109988, 109994, 109998, 110005, 110014, 110024, 110031, 110038,
+ 110042, 110046, 110053, 110063, 110067, 110074, 110081, 110088, 110094,
+ 110101, 110108, 110115, 110122, 110126, 110130, 110134, 110141, 110145,
+ 110152, 110159, 110173, 110182, 110186, 110190, 110194, 110201, 110205,
+ 110209, 110213, 110221, 110229, 110248, 110258, 110278, 110282, 110286,
+ 110290, 110294, 110298, 110302, 110306, 110313, 110317, 110320, 110324,
+ 110328, 110334, 110341, 110350, 110354, 110363, 110372, 110380, 110384,
+ 110391, 110395, 110399, 110403, 110407, 110418, 110427, 110436, 110445,
+ 110454, 110466, 110475, 110484, 110493, 110501, 110510, 110522, 110531,
+ 110540, 110549, 110561, 110570, 110579, 110591, 110600, 110609, 110621,
+ 110630, 110634, 110638, 110642, 110646, 110650, 110654, 110658, 110665,
+ 110669, 110673, 110684, 110688, 110692, 110699, 110705, 110711, 110715,
+ 110722, 110726, 110730, 110734, 110738, 110742, 110746, 110752, 110760,
+ 110764, 110768, 110771, 110777, 110787, 110791, 110803, 110810, 110817,
+ 110824, 110831, 110837, 110841, 110845, 110849, 110853, 110860, 110869,
+ 110876, 110884, 110892, 110898, 110902, 110906, 110910, 110914, 110920,
+ 110929, 110941, 110948, 110955, 110964, 110975, 110981, 110990, 110999,
+ 111006, 111015, 111022, 111029, 111039, 111046, 111053, 111060, 111067,
+ 111071, 111077, 111081, 111092, 111100, 111109, 111121, 111128, 111135,
+ 111145, 111152, 111162, 111169, 111179, 111186, 111193, 111203, 111210,
+ 111217, 111227, 111234, 111246, 111255, 111262, 111269, 111276, 111285,
+ 111295, 111308, 111315, 111325, 111335, 111342, 111351, 111364, 111371,
+ 111378, 111385, 111395, 111405, 111412, 111422, 111429, 111436, 111446,
+ 111452, 111459, 111466, 111473, 111483, 111490, 111497, 111504, 111510,
+ 111517, 111527, 111534, 111538, 111546, 111550, 111562, 111566, 111580,
+ 111584, 111588, 111592, 111596, 111602, 111609, 111617, 111621, 111625,
+ 111629, 111633, 111640, 111644, 111650, 111656, 111664, 111668, 111675,
+ 111683, 111687, 111691, 111697, 111701, 111710, 111719, 111726, 111736,
+ 111742, 111746, 111750, 111758, 111765, 111772, 111778, 111782, 111790,
+ 111794, 111801, 111813, 111820, 111830, 111836, 111840, 111849, 111856,
+ 111865, 111869, 111873, 111880, 111884, 111888, 111892, 111896, 111899,
+ 111905, 111911, 111915, 111919, 111926, 111933, 111940, 111947, 111954,
+ 111961, 111968, 111975, 111981, 111985, 111989, 111996, 112003, 112010,
+ 112017, 112024, 112028, 112031, 112036, 112040, 112044, 112053, 112062,
+ 112066, 112070, 112076, 112082, 112099, 112105, 112109, 112118, 112122,
+ 112126, 112133, 112141, 112149, 112155, 112159, 112163, 112167, 112171,
+ 112174, 112180, 112187, 112197, 112204, 112211, 112218, 112224, 112231,
+ 112238, 112245, 112252, 112259, 112268, 112275, 112287, 112294, 112301,
+ 112311, 112322, 112329, 112336, 112343, 112350, 112357, 112364, 112371,
+ 112378, 112385, 112392, 112402, 112412, 112422, 112429, 112439, 112446,
+ 112453, 112460, 112467, 112474, 112481, 112488, 112495, 112502, 112509,
+ 112516, 112523, 112530, 112536, 112543, 112550, 112559, 112566, 112573,
+ 112577, 112585, 112589, 112593, 112597, 112601, 112605, 112612, 112616,
+ 112625, 112629, 112636, 112644, 112648, 112652, 112656, 112669, 112685,
+ 112689, 112693, 112700, 112706, 112713, 112717, 112721, 112725, 112729,
+ 112733, 112740, 112744, 112762, 112766, 112770, 112777, 112781, 112785,
+ 112791, 112795, 112799, 112807, 112811, 112815, 112819, 112823, 112829,
+ 112840, 112849, 112858, 112865, 112872, 112883, 112890, 112897, 112904,
+ 112911, 112918, 112925, 112932, 112942, 112948, 112955, 112965, 112974,
+ 112981, 112990, 113000, 113007, 113014, 113021, 113028, 113040, 113047,
+ 113054, 113061, 113068, 113075, 113085, 113092, 113099, 113109, 113122,
+ 113134, 113141, 113151, 113158, 113165, 113172, 113187, 113193, 113201,
+ 113211, 113221, 113228, 113235, 113241, 113245, 113252, 113262, 113268,
+ 113281, 113285, 113289, 113296, 113300, 113307, 113317, 113321, 113325,
+ 113329, 113333, 113337, 113344, 113348, 113355, 113362, 113369, 113378,
+ 113387, 113397, 113404, 113411, 113418, 113428, 113435, 113445, 113452,
+ 113462, 113469, 113476, 113486, 113496, 113503, 113509, 113517, 113525,
+ 113531, 113537, 113541, 113545, 113552, 113560, 113566, 113570, 113574,
+ 113578, 113585, 113597, 113600, 113607, 113613, 113617, 113621, 113625,
+ 113629, 113633, 113637, 113641, 113645, 113649, 113653, 113660, 113664,
+ 113670, 113674, 113678, 113682, 113688, 113695, 113702, 113709, 113721,
+ 113729, 113733, 113739, 113748, 113755, 113761, 113765, 113769, 113773,
+ 113779, 113788, 113796, 113800, 113806, 113810, 113814, 113818, 113824,
+ 113831, 113837, 113841, 113847, 113851, 113855, 113864, 113876, 113880,
+ 113887, 113894, 113904, 113911, 113923, 113930, 113937, 113944, 113955,
+ 113965, 113978, 113988, 113995, 113999, 114003, 114007, 114011, 114020,
+ 114029, 114038, 114055, 114064, 114070, 114077, 114085, 114098, 114102,
+ 114111, 114120, 114129, 114138, 114149, 114158, 114167, 114176, 114185,
+ 114194, 114203, 114213, 114216, 114220, 114224, 114228, 114232, 114236,
+ 114242, 114249, 114256, 114263, 114269, 114275, 114282, 114288, 114295,
+ 114303, 114307, 114314, 114321, 114328, 114336, 114340, 114344, 114348,
+ 114352, 114356, 114362, 114366, 114372, 114379, 114386, 114392, 114399,
+ 114406, 114413, 114420, 114427, 114434, 114441, 114448, 114455, 114462,
+ 114469, 114476, 114483, 114490, 114496, 114500, 114509, 114513, 114517,
+ 114521, 114525, 114531, 114538, 114545, 114552, 114559, 114566, 114572,
+ 114580, 114584, 114588, 114592, 114596, 114602, 114619, 114636, 114640,
+ 114644, 114648, 114652, 114656, 114660, 114666, 114673, 114677, 114683,
+ 114690, 114697, 114704, 114711, 114718, 114727, 114734, 114741, 114748,
+ 114755, 114759, 114763, 114769, 114781, 114785, 114789, 114798, 114802,
+ 114806, 114810, 114816, 114820, 114824, 114833, 114837, 114841, 114845,
+ 114852, 114856, 114860, 114864, 114868, 114872, 114876, 114880, 114884,
+ 114890, 114897, 114904, 114910, 114914, 114931, 114937, 114941, 114947,
+ 114953, 114959, 114965, 114971, 114977, 114981, 114985, 114989, 114995,
+ 114999, 115005, 115009, 115013, 115020, 115027, 115044, 115048, 115052,
+ 115056, 115060, 115064, 115076, 115079, 115084, 115089, 115104, 115114,
+ 115126, 115130, 115134, 115138, 115144, 115151, 115158, 115168, 115180,
+ 115186, 115192, 115201, 115205, 115209, 115216, 115226, 115233, 115239,
+ 115243, 115247, 115254, 115260, 115264, 115270, 115274, 115282, 115288,
+ 115292, 115300, 115309, 115316, 115322, 115329, 115336, 115346, 115356,
+ 115360, 115364, 115368, 115372, 115378, 115385, 115391, 115398, 115405,
+ 115412, 115421, 115428, 115435, 115441, 115448, 115455, 115462, 115469,
+ 115476, 115483, 115489, 115496, 115503, 115510, 115519, 115526, 115533,
+ 115537, 115543, 115547, 115553, 115560, 115567, 115574, 115578, 115582,
+ 115586, 115590, 115594, 115601, 115605, 115609, 115615, 115623, 115627,
+ 115631, 115635, 115639, 115646, 115650, 115654, 115662, 115666, 115670,
+ 115674, 115678, 115684, 115688, 115692, 115698, 115705, 115711, 115718,
+ 115730, 115734, 115741, 115748, 115755, 115762, 115774, 115781, 115785,
+ 115789, 115793, 115800, 115807, 115814, 115821, 115831, 115838, 115844,
+ 115851, 115858, 115865, 115872, 115881, 115891, 115898, 115902, 115909,
+ 115913, 115917, 115921, 115928, 115935, 115945, 115951, 115955, 115964,
+ 115968, 115975, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 115979, 115985, 115991, 115998, 116005,
+ 116012, 116019, 116026, 116033, 116039, 116046, 116053, 116060, 116067,
+ 116074, 116081, 116087, 116093, 116099, 116105, 116111, 116117, 116123,
+ 116129, 116135, 116142, 116149, 116156, 116163, 116170, 116177, 116183,
+ 116189, 116195, 116202, 116209, 116215, 116221, 116230, 116237, 116244,
+ 116251, 116258, 116265, 116272, 116278, 116284, 116290, 116299, 116306,
+ 116313, 116324, 116335, 116341, 116347, 116353, 116362, 116369, 116376,
+ 116386, 116396, 116407, 116418, 116430, 116443, 116454, 116465, 116477,
+ 116490, 116501, 116512, 116523, 116534, 116545, 116557, 116565, 116573,
+ 116582, 116591, 116600, 116606, 116612, 116618, 116625, 116635, 116642,
+ 116652, 116657, 116662, 116668, 116674, 116682, 116690, 116699, 116710,
+ 116721, 116729, 116737, 116746, 116755, 116763, 116770, 116778, 116786,
+ 116793, 116800, 116809, 116818, 116827, 116836, 116845, 0, 116854,
+ 116865, 116872, 116880, 116888, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 116896,
+ 116905, 116912, 116919, 116928, 116935, 116942, 116949, 116959, 116966,
+ 116973, 116980, 116988, 116995, 117002, 117009, 117020, 117027, 117034,
+ 117041, 117048, 117055, 117064, 117071, 117077, 117084, 117093, 117100,
+ 117107, 117114, 117124, 117131, 117138, 117148, 117158, 117165, 117172,
+ 117179, 117186, 117193, 117200, 117209, 117216, 117223, 117229, 117237,
+ 117246, 117255, 117266, 117275, 117284, 117293, 117302, 117311, 117318,
+ 117325, 117334, 117346, 117356, 117363, 117370, 117380, 117390, 117399,
+ 117409, 117416, 117426, 117433, 117440, 117447, 117457, 117467, 117474,
+ 117481, 117491, 117497, 117508, 117517, 117527, 117535, 117548, 117555,
+ 117561, 117569, 117576, 117586, 117590, 117594, 117598, 117602, 117606,
+ 117610, 117614, 117623, 117627, 117634, 117638, 117642, 117646, 117650,
+ 117654, 117658, 117662, 117666, 117670, 117674, 117678, 117682, 117686,
+ 117690, 117694, 117698, 117702, 117706, 117710, 117717, 117724, 117734,
+ 117747, 117757, 117761, 117765, 117769, 117773, 117777, 117781, 117785,
+ 117789, 117793, 117797, 117801, 117808, 117815, 117826, 117833, 117840,
+ 117847, 117854, 117861, 117868, 117875, 117879, 117883, 117890, 117897,
+ 117904, 117913, 117920, 117933, 117943, 117950, 117957, 117961, 117965,
+ 117974, 117981, 117988, 117995, 118008, 118015, 118022, 118032, 118042,
+ 118051, 118058, 118065, 118072, 118079, 118086, 118093, 118103, 118109,
+ 118117, 118124, 118132, 118139, 118150, 118157, 118163, 118170, 118177,
+ 118184, 118191, 118201, 118211, 118218, 118225, 118234, 118242, 118248,
+ 118255, 118262, 118269, 118276, 118280, 118290, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 118300, 118304, 118308, 118312,
+ 118316, 118320, 118324, 118328, 118332, 118336, 118340, 118344, 118348,
+ 118352, 118356, 118360, 118364, 118368, 118372, 118376, 118380, 118384,
+ 118388, 118392, 118396, 118400, 118404, 118408, 118412, 118416, 118420,
+ 118424, 118428, 118432, 118436, 118440, 118444, 118448, 118452, 118456,
+ 118460, 118464, 118468, 118472, 118476, 118480, 118484, 118488, 118492,
+ 118496, 118500, 118504, 118508, 118512, 118516, 118520, 118524, 118528,
+ 118532, 118536, 118540, 118544, 118548, 118552, 118556, 118560, 118564,
+ 118568, 118572, 118576, 118580, 118584, 118588, 118592, 118596, 118600,
+ 118604, 118608, 118612, 118616, 118620, 118624, 118628, 118632, 118636,
+ 118640, 118644, 118648, 118652, 118656, 118660, 118664, 118668, 118672,
+ 118676, 118680, 118684, 118688, 118692, 118696, 118700, 118704, 118708,
+ 118712, 118716, 118720, 118724, 118728, 118732, 118736, 118740, 118744,
+ 118748, 118752, 118756, 118760, 118764, 118768, 118772, 118776, 118780,
+ 118784, 118788, 118792, 118796, 118800, 118804, 118808, 118812, 118816,
+ 118820, 118824, 118828, 118832, 118836, 118840, 118844, 118848, 118852,
+ 118856, 118860, 118864, 118868, 118872, 118876, 118880, 118884, 118888,
+ 118892, 118896, 118900, 118904, 118908, 118912, 118916, 118920, 118924,
+ 118928, 118932, 118936, 118940, 118944, 118948, 118952, 118956, 118960,
+ 118964, 118968, 118972, 118976, 118980, 118984, 118988, 118992, 118996,
+ 119000, 119004, 119008, 119012, 119016, 119020, 119024, 119028, 119032,
+ 119036, 119040, 119044, 119048, 119052, 119056, 119060, 119064, 119068,
+ 119072, 119076, 119080, 119084, 119088, 119092, 119096, 119100, 119104,
+ 119108, 119112, 119116, 119120, 119124, 119128, 119132, 119136, 119140,
+ 119144, 119148, 119152, 119156, 119160, 119164, 119168, 119172, 119176,
+ 119180, 119184, 119188, 119192, 119196, 119200, 119204, 119208, 119212,
+ 119216, 119220, 119224, 119228, 119232, 119236, 119240, 119244, 119248,
+ 119252, 119256, 119260, 119264, 119268, 119272, 119276, 119280, 119284,
+ 119288, 119292, 119296, 119300, 119304, 119308, 119312, 119316, 119320,
+ 119324, 119328, 119332, 119336, 119340, 119344, 119348, 119352, 119356,
+ 119360, 119364, 119368, 119372, 119376, 119380, 119384, 119388, 119392,
+ 119396, 119400, 119404, 119408, 119412, 119416, 119420, 119424, 119428,
+ 119432, 119436, 119440, 119444, 119448, 119452, 119456, 119460, 119464,
+ 119468, 119472, 119476, 119480, 119484, 119488, 119492, 119496, 119500,
+ 119504, 119508, 119512, 119516, 119520, 119524, 119528, 119532, 119536,
+ 119540, 119544, 119548, 119552, 119556, 119560, 119564, 119568, 119572,
+ 119576, 119580, 119584, 119588, 119592, 119596, 119600, 119604, 119608,
+ 119612, 119616, 119620, 119624, 119628, 119632, 119636, 119640, 119644,
+ 119648, 119652, 119656, 119660, 119664, 119668, 119672, 119676, 119680,
+ 119684, 119688, 119692, 119696, 119700, 119704, 119708, 119712, 119716,
+ 119720, 119724, 119728, 119732, 119736, 119740, 119744, 119748, 119752,
+ 119756, 119760, 119764, 119768, 119772, 119776, 119780, 119784, 119788,
+ 119792, 119796, 119800, 119804, 119808, 119812, 119816, 119820, 119824,
+ 119828, 119832, 119836, 119840, 119844, 119848, 119852, 119856, 119860,
+ 119864, 119868, 119872, 119876, 119880, 119884, 119888, 119892, 119896,
+ 119900, 119904, 119908, 119912, 119916, 119920, 119924, 119928, 119932,
+ 119936, 119940, 119944, 119948, 119952, 119956, 119960, 119964, 119968,
+ 119972, 119976, 119980, 119984, 119988, 119992, 119996, 120000, 120004,
+ 120008, 120012, 120016, 120020, 120024, 120028, 120032, 120036, 120040,
+ 120044, 120048, 120052, 120056, 120060, 120064, 120068, 120072, 120076,
+ 120080, 120084, 120088, 120092, 120096, 120100, 120104, 120108, 120112,
+ 120116, 120120, 120124, 120128, 120132, 120136, 120140, 120144, 120148,
+ 120152, 120156, 120160, 120164, 120168, 120172, 120176, 120180, 120184,
+ 120188, 120192, 120196, 120200, 120204, 120208, 120212, 120216, 120220,
+ 120224, 120228, 120232, 120236, 120240, 120244, 120248, 120252, 120256,
+ 120260, 120264, 120268, 120272, 120276, 120280, 120284, 120288, 120292,
+ 120296, 120300, 120304, 120308, 120312, 120316, 120320, 120324, 120328,
+ 120332, 120336, 120340, 120344, 120348, 120352, 120356, 120360, 120364,
+ 120368, 120372, 120376, 120380, 120384, 120388, 120392, 120396, 120400,
+ 120404, 120408, 120412, 120416, 120420, 120424, 120428, 120432, 120436,
+ 120440, 120444, 120448, 120452, 120456, 120460, 120464, 120468, 120472,
+ 120476, 120480, 120484, 120488, 120492, 120496, 120500, 120504, 120508,
+ 120512, 120516, 120520, 120524, 120528, 120532, 120536, 120540, 120544,
+ 120548, 120552, 120556, 120560, 120564, 120568, 120572, 120576, 120580,
+ 120584, 120588, 120592, 120596, 120600, 120604, 120608, 120612, 120616,
+ 120620, 120624, 120628, 120632, 120636, 120640, 120644, 120648, 120652,
+ 120656, 120660, 120664, 120668, 120672, 120676, 120680, 120684, 120688,
+ 120692, 120696, 120700, 120704, 120708, 120712, 120716, 120720, 120724,
+ 120728, 120732, 120736, 120740, 120744, 120748, 120752, 120756, 120760,
+ 120764, 120768, 120772, 120776, 120780, 120784, 120788, 120792, 120796,
+ 120800, 120804, 120808, 120812, 120816, 120820, 120824, 120828, 120832,
+ 120836, 120840, 120844, 120848, 120852, 120856, 120860, 120864, 120868,
+ 120872, 120876, 120880, 120884, 120888, 120892, 120896, 120900, 120904,
+ 120908, 120912, 120916, 120920, 120924, 120928, 120932, 120936, 120940,
+ 120944, 120948, 120952, 120956, 120960, 120964, 120968, 120972, 120976,
+ 120980, 120984, 120988, 120992, 120996, 121000, 121004, 121008, 121012,
+ 121016, 121020, 121024, 121028, 121032, 121036, 121040, 121044, 121048,
+ 121052, 121056, 121060, 121064, 121068, 121072, 121076, 121080, 121084,
+ 121088, 121092, 121096, 121100, 121104, 121108, 121112, 121116, 121120,
+ 121124, 121128, 121132, 121136, 121140, 121144, 121148, 121152, 121156,
+ 121160, 121164, 121168, 121172, 121176, 121180, 121184, 121188, 121192,
+ 121196, 121200, 121204, 121208, 121212, 121216, 121220, 121224, 121228,
+ 121232, 121236, 121240, 121244, 121248, 121252, 121256, 121260, 121264,
+ 121268, 121272, 121276, 121280, 121284, 121288, 121292, 121296, 121300,
+ 121304, 121308, 121312, 121316, 121320, 121324, 121328, 121332, 121336,
+ 121340, 121344, 121348, 121352, 121356, 121360, 121364, 121368, 121372,
+ 121376, 121380, 121384, 121388, 121392, 121396, 121400, 121404, 121408,
+ 121412, 121416, 121420, 121424, 121428, 121432, 121436, 121440, 121444,
+ 121448, 121452, 121456, 121460, 121464, 121468, 121472, 121476, 121480,
+ 121484, 121488, 121492, 121496, 121500, 121504, 121508, 121512, 121516,
+ 121520, 121524, 121528, 121532, 121536, 121540, 121544, 121548, 121552,
+ 121556, 121560, 121564, 121568, 121572, 121576, 121580, 121584, 121588,
+ 121592, 121596, 121600, 121604, 121608, 121612, 121616, 121620, 121624,
+ 121628, 121632, 121636, 121640, 121644, 121648, 121652, 121656, 121660,
+ 121664, 121668, 121672, 121676, 121680, 121684, 121688, 121692, 121696,
+ 121700, 121704, 121708, 121712, 121716, 121720, 121724, 121728, 121732,
+ 121736, 121740, 121744, 121748, 121752, 121756, 121760, 121764, 121768,
+ 121772, 121776, 121780, 121784, 121788, 121792, 121796, 121800, 121804,
+ 121808, 121812, 121816, 121820, 121824, 121828, 121832, 121836, 121840,
+ 121844, 121848, 121852, 121856, 121860, 121864, 121868, 121872, 121876,
+ 121880, 121884, 121888, 121892, 121896, 121900, 121904, 121908, 121912,
+ 121916, 121920, 121924, 121928, 121932, 121936, 121940, 121944, 121948,
+ 121952, 121956, 121960, 121964, 121968, 121972, 121976, 121980, 121984,
+ 121988, 121992, 121996, 122000, 122004, 122008, 122012, 122016, 122020,
+ 122024, 122028, 122032, 122036, 122040, 122044, 122048, 122052, 122056,
+ 122060, 122064, 122068, 122072, 122076, 122080, 122084, 122088, 122092,
+ 122096, 122100, 122104, 122108, 122112, 122116, 122120, 122124, 122128,
+ 122132, 122136, 122140, 122144, 122148, 122152, 122156, 122160, 122164,
+ 122168, 122172, 122176, 122180, 122184, 122188, 122192, 122196, 122200,
+ 122204, 122208, 122212, 122216, 122220, 122224, 122228, 122232, 122236,
+ 122240, 122244, 122248, 122252, 122256, 122260, 122264, 122268, 122272,
+ 122276, 122280, 122284, 122288, 122292, 122296, 122300, 122304, 122308,
+ 122312, 122316, 122320, 122324, 122328, 122332, 122336, 122340, 122344,
+ 122348, 122352, 122356, 122360, 122364, 122368, 122372, 122376, 122380,
+ 122384, 122388, 122392, 122396, 122400, 122404, 122408, 122412, 122416,
+ 122420, 122424, 122428, 122432, 122436, 122440, 122444, 122448, 122452,
+ 122456, 122460, 122464, 122468, 122472, 122476, 122480, 122484, 122488,
+ 122492, 122496, 122500, 122504, 122508, 122512, 122516, 122520, 122524,
+ 122528, 122532, 122536, 122540, 122544, 122548, 122552, 122556, 122560,
+ 122564, 122568, 122572, 122576, 122580, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 122584, 122588, 122592, 122596, 122600, 122604, 122608,
+ 122612, 122616, 122620, 122624, 122628, 122632, 122636, 122640, 122644,
+ 122648, 122652, 122656, 122660, 122664, 122668, 122672, 122676, 122680,
+ 122684, 122688, 122692, 122696, 122700, 122704, 122708, 122712, 122716,
+ 122720, 122724, 122728, 122732, 122736, 122740, 122744, 122748, 122752,
+ 122756, 122760, 122764, 122768, 122772, 122776, 122780, 122784, 122788,
+ 122792, 122796, 122800, 122804, 122808, 122812, 122816, 122820, 122824,
+ 122828, 122832, 122836, 122840, 122844, 122848, 122852, 122856, 122860,
+ 122864, 122868, 122872, 122876, 122880, 122884, 122888, 122892, 122896,
+ 122900, 122904, 122908, 122912, 122916, 122920, 122924, 122928, 122932,
+ 122936, 122940, 122944, 122948, 122952, 122956, 122960, 122964, 122968,
+ 122972, 122976, 122980, 122984, 122988, 122992, 122996, 123000, 123004,
+ 123008, 123012, 123016, 123020, 123024, 123028, 123032, 123036, 123040,
+ 123044, 123048, 123052, 123056, 123060, 123064, 123068, 123072, 123076,
+ 123080, 123084, 123088, 123092, 123096, 123100, 123104, 123108, 123112,
+ 123116, 123120, 123124, 123128, 123132, 123136, 123140, 123144, 123148,
+ 123152, 123156, 123160, 123164, 123168, 123172, 123176, 123180, 123184,
+ 123188, 123192, 123196, 123200, 123204, 123208, 123212, 123216, 123220,
+ 123224, 123228, 123232, 123236, 123240, 123244, 123248, 123252, 123256,
+ 123260, 123264, 123268, 123272, 123276, 123280, 123284, 123288, 123292,
+ 123296, 123300, 123304, 123308, 123312, 123316, 123320, 123324, 123328,
+ 123332, 123336, 123340, 123344, 123348, 123352, 123356, 123360, 123364,
+ 123368, 123372, 123376, 123380, 123384, 123388, 123392, 123396, 123400,
+ 123404, 123408, 123412, 123416, 123420, 123424, 123428, 123432, 123436,
+ 123440, 123444, 123448, 123452, 123456, 123460, 123464, 123468, 123472,
+ 123476, 123480, 123484, 123488, 123492, 123496, 123500, 123504, 123508,
+ 123512, 123516, 123520, 123524, 123528, 123532, 123536, 123540, 123544,
+ 123548, 123552, 123556, 123560, 123564, 123568, 123572, 123576, 123580,
+ 123584, 123588, 123592, 123596, 123600, 123604, 123608, 123612, 123616,
+ 123620, 123624, 123628, 123632, 123636, 123640, 123644, 123648, 123652,
+ 123656, 123660, 123664, 123668, 123672, 123676, 123680, 123684, 123688,
+ 123692, 123696, 123700, 123704, 123708, 123712, 123716, 123720, 123724,
+ 123728, 123732, 123736, 123740, 123744, 123748, 123752, 123756, 123760,
+ 123764, 123768, 123772, 123776, 123780, 123784, 123788, 123792, 123796,
+ 123800, 123804, 123808, 123812, 123816, 123820, 123824, 123828, 123832,
+ 123836, 123840, 123844, 123848, 123852, 123856, 123860, 123864, 123868,
+ 123872, 123876, 123880, 123884, 123888, 123892, 123896, 123900, 123904,
+ 123908, 123912, 123916, 123920, 123924, 123928, 123932, 123936, 123940,
+ 123944, 123948, 123952, 123956, 123960, 123964, 123968, 123972, 123976,
+ 123980, 123984, 123988, 123992, 123996, 124000, 124004, 124008, 124012,
+ 124016, 124020, 124024, 124028, 124032, 124036, 124040, 124044, 124048,
+ 124052, 124056, 124060, 124064, 124068, 124072, 124076, 124080, 124084,
+ 124088, 124092, 124096, 124100, 124104, 124108, 124112, 124116, 124120,
+ 124124, 124128, 124132, 124136, 124140, 124144, 124148, 124152, 124156,
+ 124160, 124164, 124168, 124172, 124176, 124180, 124184, 124188, 124192,
+ 124196, 124200, 124204, 124208, 124212, 124216, 124220, 124224, 124228,
+ 124232, 124236, 124240, 124244, 124248, 124252, 124256, 124260, 124264,
+ 124268, 124272, 124276, 124280, 124284, 124288, 124292, 124296, 124300,
+ 124304, 124308, 124312, 124316, 124326, 124330, 124334, 124338, 124342,
+ 124346, 124350, 124354, 124358, 124362, 124366, 124370, 124375, 124379,
+ 124383, 124387, 124391, 124395, 124399, 124403, 124407, 124411, 124415,
+ 124419, 124423, 124427, 124431, 124435, 124439, 124448, 124457, 124461,
+ 124465, 124469, 124473, 124477, 124481, 124485, 124489, 124493, 124497,
+ 124501, 124505, 124509, 124513, 124517, 124521, 124525, 124529, 124533,
+ 124537, 124541, 124545, 124549, 124553, 124557, 124561, 124565, 124569,
+ 124573, 124577, 124581, 124585, 124589, 124593, 124597, 124601, 124605,
+ 124609, 124613, 124617, 124621, 124625, 124629, 124633, 124637, 124641,
+ 124645, 124649, 124653, 124657, 124661, 124665, 124669, 124673, 124677,
+ 124681, 124685, 124689, 124693, 124697, 124701, 124705, 124709, 124713,
+ 124717, 124721, 124725, 124729, 124733, 124737, 124741, 124745, 124749,
+ 124753, 124757, 124761, 124765, 124769, 124773, 124777, 124781, 124785,
+ 124789, 124793, 124797, 124801, 124805, 124809, 124813, 124817, 124821,
+ 124825, 124829, 124833, 124837, 124841, 124845, 124849, 124853, 124857,
+ 124861, 124865, 124869, 124873, 124877, 124881, 124885, 124889, 124893,
+ 124897, 124901, 124905, 124909, 124913, 124917, 124921, 124925, 124929,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 124933, 124941,
+ 124949, 124959, 124969, 124977, 124983, 124991, 124999, 125009, 125021,
+ 125033, 125039, 125047, 125053, 125059, 125065, 125071, 125077, 125083,
+ 125089, 125095, 125101, 125107, 125113, 125121, 125129, 125135, 125141,
+ 125147, 125153, 125161, 125169, 125178, 125184, 125192, 125198, 125204,
+ 125210, 125216, 125222, 125230, 125238, 125244, 125250, 125256, 125262,
+ 125268, 125274, 125280, 125286, 125292, 125298, 125304, 125310, 125316,
+ 125322, 125328, 125334, 125340, 125346, 125352, 125360, 125366, 125372,
+ 125382, 125390, 125396, 125402, 125408, 125414, 125420, 125426, 125432,
+ 125438, 125444, 125450, 125456, 125462, 125468, 125474, 125480, 125486,
+ 125492, 125498, 125504, 125510, 125516, 125522, 125530, 125536, 125544,
+ 125552, 125560, 125566, 125572, 125578, 125584, 125590, 125598, 125608,
+ 125616, 125624, 125630, 125636, 125644, 125652, 125658, 125666, 125674,
+ 125682, 125688, 125694, 125700, 125706, 125712, 125718, 125726, 125734,
+ 125740, 125746, 125752, 125758, 125764, 125772, 125778, 125784, 125790,
+ 125796, 125802, 125808, 125816, 125822, 125828, 125834, 125840, 125848,
+ 125856, 125862, 125868, 125874, 125879, 125885, 125891, 125898, 125903,
+ 125908, 125913, 125918, 125923, 125928, 125933, 125938, 125943, 125952,
+ 125959, 125964, 125969, 125974, 125981, 125986, 125991, 125996, 126003,
+ 126008, 126013, 126018, 126023, 126028, 126033, 126038, 126043, 126048,
+ 126053, 126058, 126065, 126070, 126077, 126082, 126087, 126094, 126099,
+ 126104, 126109, 126114, 126119, 126124, 126129, 126134, 126139, 126144,
+ 126149, 126154, 126159, 126164, 126169, 126174, 126179, 126184, 126189,
+ 126196, 126201, 126206, 126211, 126216, 126221, 126226, 126231, 126236,
+ 126241, 126246, 126251, 126256, 126261, 126268, 126273, 126278, 126285,
+ 126290, 126295, 126300, 126305, 126310, 126315, 126320, 126325, 126330,
+ 126335, 126342, 126347, 126352, 126357, 126362, 126367, 126374, 126381,
+ 126386, 126391, 126396, 126401, 126406, 126411, 126416, 126421, 126426,
+ 126431, 126436, 126441, 126446, 126451, 126456, 126461, 126466, 126471,
+ 126476, 126481, 126486, 126491, 126496, 126501, 126506, 126511, 126516,
+ 126521, 126526, 126531, 126536, 126541, 126546, 126551, 126556, 126561,
+ 126568, 126573, 126578, 126583, 126588, 126593, 126598, 126603, 126608,
+ 126613, 126618, 126623, 126628, 126633, 126638, 126643, 126648, 126653,
+ 126658, 126663, 126668, 126673, 126678, 126683, 126688, 126693, 126698,
+ 126703, 126708, 126713, 126718, 126723, 126728, 126733, 126738, 126743,
+ 126748, 126753, 126758, 126763, 126768, 126773, 126778, 126783, 126788,
+ 126793, 126798, 126803, 126808, 126813, 126818, 126823, 126828, 126833,
+ 126838, 126843, 126848, 126853, 126858, 126865, 126870, 126875, 126880,
+ 126885, 126890, 126895, 126900, 126905, 126910, 126915, 126920, 126925,
+ 126930, 126935, 126940, 126945, 126950, 126955, 126960, 126965, 126970,
+ 126977, 126982, 126987, 126994, 126999, 127004, 127009, 127014, 127019,
+ 127024, 127029, 127034, 127039, 127044, 127049, 127054, 127059, 127064,
+ 127069, 127074, 127079, 127084, 127089, 127094, 127099, 127104, 127109,
+ 127114, 127119, 127124, 127129, 127134, 127139, 127144, 127149, 127154,
+ 127159, 127164, 127169, 127174, 127179, 127184, 127189, 127194, 127199,
+ 127204, 127209, 127216, 127221, 127226, 127233, 127240, 127245, 127250,
+ 127255, 127260, 127265, 127270, 127275, 127280, 127285, 127290, 127295,
+ 127300, 127305, 127310, 127315, 127320, 127325, 127330, 127335, 127340,
+ 127345, 127350, 127355, 127360, 127365, 127372, 127377, 127382, 127387,
+ 127392, 127397, 127402, 127407, 127412, 127417, 127422, 127427, 127432,
+ 127437, 127442, 127447, 127452, 127457, 127462, 127469, 127474, 127479,
+ 127484, 127489, 127494, 127499, 127504, 127510, 127515, 127520, 127525,
+ 127530, 127535, 127540, 127545, 127550, 127557, 127564, 127569, 127574,
+ 127578, 127583, 127587, 127591, 127596, 127603, 127608, 127613, 127622,
+ 127627, 127632, 127637, 127642, 127649, 127656, 127661, 127666, 127671,
+ 127676, 127683, 127688, 127693, 127698, 127703, 127708, 127713, 127718,
+ 127723, 127728, 127733, 127738, 127743, 127750, 127755, 127760, 127765,
+ 127770, 127775, 127779, 127784, 127789, 127794, 127799, 127804, 127809,
+ 127814, 127819, 127824, 127830, 127836, 127842, 127848, 127854, 127860,
+ 127866, 127872, 127878, 127884, 127890, 127896, 127902, 127908, 127914,
+ 127920, 127926, 127932, 127938, 127944, 127950, 127956, 127962, 127968,
+ 127973, 127979, 127985, 127991, 127997, 128003, 128009, 128015, 128021,
+ 128027, 128033, 128039, 128045, 128051, 128057, 128063, 128069, 128075,
+ 128081, 128087, 128093, 128098, 128104, 128110, 128116, 128122, 128128,
+ 0, 0, 0, 0, 0, 0, 0, 128134, 128139, 128144, 128149, 128154, 128159,
+ 128164, 128168, 128173, 128178, 128183, 128188, 128193, 128198, 128203,
+ 128208, 128213, 128217, 128222, 128226, 128231, 128236, 128241, 128246,
+ 128251, 128255, 128260, 128265, 128270, 128275, 128280, 0, 128285,
+ 128290, 128294, 128298, 128302, 128306, 128310, 128314, 128319, 128323,
+ 0, 0, 0, 0, 128328, 128332, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 128337, 128344, 128350, 128357, 128364,
+ 128371, 128378, 128385, 128392, 128399, 128406, 128413, 128420, 128427,
+ 128434, 128441, 128448, 128455, 128461, 128468, 128475, 128482, 128488,
+ 128495, 128501, 128507, 128514, 128520, 128527, 128533, 0, 0, 128539,
+ 128547, 128555, 128564, 128573, 128582, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 128590, 128595, 128600, 128605, 128610, 128615, 128620, 128625, 128630,
+ 128635, 128640, 128645, 128650, 128655, 128660, 128665, 128670, 128675,
+ 128680, 128685, 128690, 128695, 128700, 128705, 128710, 128715, 128720,
+ 128725, 128730, 128735, 128740, 128745, 128750, 128755, 128760, 128765,
+ 128770, 128775, 128780, 128785, 128790, 128795, 128800, 128805, 128810,
+ 128815, 128820, 128825, 128830, 128837, 128844, 128851, 128858, 128865,
+ 128872, 128879, 128886, 128895, 128902, 128909, 128916, 128923, 128930,
+ 128937, 128944, 128951, 128958, 128965, 128972, 128977, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 128986, 128991, 128995, 128999, 129003, 129007, 129011,
+ 129015, 129020, 129024, 0, 129029, 129034, 129039, 129046, 129051,
+ 129058, 129065, 0, 129070, 129077, 129082, 129087, 129094, 129101,
+ 129106, 129111, 129116, 129121, 129126, 129133, 129140, 129145, 129150,
+ 129155, 129168, 129177, 129184, 129193, 129202, 0, 0, 0, 0, 0, 129211,
+ 129218, 129225, 129232, 129239, 129246, 129253, 129260, 129267, 129274,
+ 129281, 129288, 129295, 129302, 129309, 129316, 129323, 129330, 129337,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 129344, 129347, 129351,
+ 129355, 129359, 129362, 129366, 129371, 129375, 129379, 129383, 129387,
+ 129391, 129396, 129401, 129405, 129409, 129413, 129417, 129422, 129428,
+ 129432, 129436, 129440, 129444, 129448, 129452, 129456, 129460, 129464,
+ 129468, 129471, 129475, 129479, 129483, 129487, 129491, 129495, 129501,
+ 129504, 129508, 129512, 129516, 129520, 129524, 129528, 129532, 129536,
+ 129540, 129545, 129550, 129556, 129560, 129564, 129568, 129572, 129576,
+ 129580, 129585, 129589, 129593, 129597, 129601, 129605, 129611, 129615,
+ 129619, 129623, 129627, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 129631, 129635,
+ 129639, 129645, 129651, 129655, 129660, 129665, 129670, 129675, 129679,
+ 129684, 129689, 129694, 129698, 129703, 129708, 129713, 129717, 129722,
+ 129727, 129732, 129737, 129742, 129747, 129752, 129757, 129761, 129766,
+ 129771, 129776, 129781, 129786, 129791, 129796, 129801, 129806, 129811,
+ 129816, 129823, 129828, 129835, 129840, 129845, 129850, 129855, 129860,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 129865, 129869, 129875,
+ 129878, 129881, 129885, 129889, 129893, 129897, 129901, 129905, 129909,
+ 129915, 129921, 129927, 129933, 129939, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 129945, 129950, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 129956, 129960, 129964, 129968, 129972, 129976,
+ 129980, 129983, 129987, 129991, 129995, 129999, 130002, 130008, 130013,
+ 130019, 130025, 130030, 130034, 130040, 130044, 130048, 130054, 130058,
+ 130062, 130066, 130070, 130074, 130078, 130081, 130087, 130093, 130099,
+ 130105, 130112, 130119, 130126, 130136, 130143, 130150, 130155, 130160,
+ 130165, 130170, 130177, 130184, 130191, 130198, 130207, 130213, 130220,
+ 130226, 130233, 130239, 130246, 130251, 130258, 130262, 130266, 130271,
+ 130277, 130283, 130290, 130297, 130303, 130310, 130313, 130319, 130323,
+ 130326, 130330, 130333, 130336, 130340, 130345, 130349, 130353, 130359,
+ 130364, 130370, 130374, 130378, 130381, 130385, 130389, 130394, 130398,
+ 130403, 130407, 130412, 130416, 130420, 130424, 130428, 130432, 130436,
+ 130440, 130444, 130449, 130454, 130459, 130464, 130470, 130476, 130482,
+ 130488, 130494, 0, 0, 0, 0, 0, 130499, 130507, 130516, 130524, 130531,
+ 130539, 130546, 130553, 130562, 130569, 130576, 130583, 130591, 0, 0, 0,
+ 130599, 130604, 130611, 130617, 130624, 130630, 130636, 130642, 130648,
+ 0, 0, 0, 0, 0, 0, 0, 130654, 130659, 130666, 130672, 130679, 130685,
+ 130691, 130697, 130703, 130709, 0, 0, 130714, 130720, 130726, 130729,
+ 130738, 130745, 130753, 130760, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 130767, 130772, 130777, 130782, 130789, 130796, 130803,
+ 130810, 130815, 130820, 130825, 130830, 130837, 130842, 130849, 130856,
+ 130861, 130866, 130871, 130878, 130883, 130888, 130895, 130902, 130907,
+ 130912, 130917, 130924, 130931, 130938, 130943, 130948, 130955, 130962,
+ 130969, 130976, 130981, 130986, 130991, 130998, 131003, 131008, 131013,
+ 131020, 131029, 131036, 131041, 131046, 131051, 131056, 131061, 131066,
+ 131075, 131082, 131087, 131094, 131101, 131106, 131111, 131116, 131123,
+ 131128, 131135, 131142, 131147, 131152, 131157, 131164, 131171, 131176,
+ 131181, 131188, 131195, 131202, 131207, 131212, 131217, 131222, 131229,
+ 131238, 131247, 131252, 131259, 131268, 131273, 131278, 131283, 131288,
+ 131295, 131302, 131309, 131316, 131321, 131326, 131331, 131338, 131345,
+ 131352, 131357, 131362, 131369, 131374, 131381, 131386, 131393, 131398,
+ 131405, 131412, 131417, 131422, 131427, 131432, 131437, 131442, 131447,
+ 131452, 131457, 131464, 131471, 131478, 131485, 131492, 131501, 131506,
+ 131511, 131518, 131525, 131530, 131537, 131544, 131551, 131558, 131565,
+ 131572, 131577, 131582, 131587, 131592, 131597, 131606, 131615, 131624,
+ 131633, 131642, 131651, 131660, 131669, 131674, 131685, 131696, 131705,
+ 131710, 131715, 131720, 131725, 131734, 131741, 131748, 131755, 131762,
+ 131769, 131776, 131785, 131794, 131805, 131814, 131825, 131834, 131841,
+ 131850, 131861, 131870, 131879, 131888, 131897, 131904, 131911, 131918,
+ 131927, 131936, 131947, 131956, 131965, 131976, 131981, 131986, 131997,
+ 132005, 132014, 132023, 132032, 132043, 132052, 132061, 132072, 132083,
+ 132094, 132105, 132116, 132127, 132134, 132141, 132148, 132155, 132166,
+ 132175, 132182, 132189, 132196, 132207, 132218, 132229, 132240, 132251,
+ 132262, 132273, 132284, 132291, 132298, 132307, 132316, 132323, 132330,
+ 132337, 132346, 132355, 132364, 132371, 132380, 132389, 132398, 132405,
+ 132412, 132417, 132423, 132430, 132437, 132444, 132451, 132458, 132465,
+ 132474, 132483, 132492, 132501, 132508, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 132517, 132523, 132528, 132533, 132540, 132546, 132552, 132558, 132564,
+ 132570, 132576, 132582, 132586, 132590, 132596, 132602, 132608, 132612,
+ 132617, 132622, 132626, 132630, 132633, 132639, 132645, 132651, 132657,
+ 132663, 132669, 132675, 132681, 132687, 132697, 132707, 132713, 132719,
+ 132729, 132739, 132745, 0, 0, 132751, 132759, 132764, 132769, 132775,
+ 132781, 132787, 132793, 132799, 132805, 132812, 132819, 132825, 132831,
+ 132837, 132843, 132849, 132855, 132861, 132867, 132872, 132878, 132884,
+ 132890, 132896, 132902, 132911, 132917, 132922, 132930, 132937, 132944,
+ 132953, 132962, 132971, 132980, 132989, 132998, 133007, 133016, 133026,
+ 133036, 133044, 133052, 133061, 133070, 133076, 133082, 133088, 133094,
+ 133102, 133110, 133114, 133120, 133125, 133131, 133137, 133143, 133149,
+ 133155, 133164, 133169, 133176, 133181, 133186, 133191, 133197, 133203,
+ 133209, 133216, 133221, 133226, 133231, 133236, 133241, 133247, 133253,
+ 133259, 133265, 133271, 133277, 133283, 133289, 133294, 133299, 133304,
+ 133309, 133314, 133319, 133324, 133329, 133335, 133341, 133346, 133351,
+ 133356, 133361, 133366, 133372, 133379, 133383, 133387, 133391, 133395,
+ 133399, 133403, 133407, 133411, 133419, 133429, 133433, 133437, 133443,
+ 133449, 133455, 133461, 133467, 133473, 133479, 133485, 133491, 133497,
+ 133503, 133509, 133515, 133521, 133525, 133529, 133536, 133542, 133548,
+ 133554, 133559, 133566, 133571, 133577, 133583, 133589, 133595, 133600,
+ 133604, 133610, 133614, 133618, 133622, 133628, 133634, 133638, 133644,
+ 133650, 133656, 133662, 133668, 133676, 133684, 133690, 133696, 133702,
+ 133708, 133720, 133732, 133746, 133758, 133770, 133784, 133798, 133812,
+ 133816, 133824, 133832, 133837, 133841, 133845, 133849, 133853, 133857,
+ 133861, 133865, 133871, 133877, 133883, 133889, 133897, 133906, 133913,
+ 133920, 133928, 133935, 133947, 133959, 133971, 133983, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 133990, 133997,
+ 134004, 134011, 134018, 134025, 134032, 134039, 134046, 134053, 134060,
+ 134067, 134074, 134081, 134088, 134095, 134102, 134109, 134116, 134123,
+ 134130, 134137, 134144, 134151, 134158, 134165, 134172, 134179, 134186,
+ 134193, 134200, 134207, 134214, 134221, 134228, 134235, 134242, 134249,
+ 134256, 134263, 134270, 134277, 134284, 134291, 134298, 134305, 134312,
+ 134319, 134326, 134333, 134340, 134347, 134354, 134361, 134368, 134375,
+ 134382, 134389, 134396, 134403, 134410, 134417, 134424, 134431, 134438,
+ 134445, 134452, 134457, 134462, 134467, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 134471, 134476, 134483, 134490, 134497, 134504,
+ 134509, 134514, 134521, 134526, 134531, 134538, 134543, 134548, 134553,
+ 134560, 134569, 134574, 134579, 134584, 134589, 134594, 134599, 134606,
+ 134611, 134616, 134621, 134626, 134631, 134636, 134641, 134646, 134651,
+ 134656, 134661, 134666, 134672, 134677, 134682, 134687, 134692, 134697,
+ 134702, 134707, 134712, 134717, 134726, 134731, 134740, 134745, 134750,
+ 134755, 134760, 134765, 134770, 134775, 134784, 134789, 134794, 134799,
+ 134804, 134809, 134816, 134821, 134828, 134833, 134838, 134843, 134848,
+ 134853, 134858, 134863, 134868, 134873, 134878, 134883, 134888, 134893,
+ 134898, 134903, 134908, 134913, 134918, 134923, 134932, 134937, 134942,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 134947, 134955, 134963, 134971, 134979,
+ 134987, 134995, 135004, 135012, 135021, 135029, 135037, 135045, 135053,
+ 135061, 135069, 135078, 135086, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 135095, 135099, 135104, 135109, 135114, 135118,
+ 135123, 135128, 135133, 135137, 135142, 135147, 135151, 135156, 135161,
+ 135165, 135170, 135175, 135179, 135183, 135188, 135192, 135197, 135202,
+ 135207, 135212, 135217, 135221, 135226, 135231, 135236, 135240, 135245,
+ 135250, 135255, 135259, 135264, 135269, 135273, 135278, 135283, 135287,
+ 135292, 135297, 135301, 135305, 135310, 135314, 135319, 135324, 135329,
+ 135334, 135339, 135343, 135348, 135353, 135358, 135362, 135367, 135372,
+ 135377, 135381, 135386, 135391, 135395, 135400, 135405, 135409, 135414,
+ 135419, 135423, 135427, 135432, 135436, 135441, 135446, 135451, 135456,
+ 135461, 135465, 135470, 135475, 135480, 135484, 135489, 0, 135494,
+ 135498, 135503, 135508, 135512, 135517, 135522, 135526, 135531, 135536,
+ 135540, 135544, 135549, 135553, 135558, 135563, 135568, 135573, 135578,
+ 135583, 135589, 135595, 135601, 135606, 135612, 135618, 135624, 135629,
+ 135635, 135641, 135646, 135652, 135658, 135663, 135669, 135675, 135680,
+ 135685, 135691, 135696, 135702, 135708, 135714, 135720, 135726, 135731,
+ 135737, 135743, 135749, 135754, 135760, 135766, 135772, 135777, 135783,
+ 135789, 135794, 135800, 135806, 135811, 135817, 135823, 135828, 135833,
+ 135839, 135844, 135850, 135856, 135862, 135868, 135874, 0, 135878,
+ 135883, 0, 0, 135888, 0, 0, 135893, 135898, 0, 0, 135903, 135908, 135912,
+ 135917, 0, 135922, 135926, 135931, 135935, 135940, 135945, 135950,
+ 135955, 135960, 135964, 135969, 135974, 0, 135979, 0, 135984, 135989,
+ 135993, 135998, 136003, 136007, 136012, 0, 136017, 136022, 136027,
+ 136031, 136035, 136040, 136044, 136049, 136054, 136059, 136064, 136069,
+ 136074, 136080, 136086, 136092, 136097, 136103, 136109, 136115, 136120,
+ 136126, 136132, 136137, 136143, 136149, 136154, 136160, 136166, 136171,
+ 136176, 136182, 136187, 136193, 136199, 136205, 136211, 136217, 136222,
+ 136228, 136234, 136240, 136245, 136251, 136257, 136263, 136268, 136274,
+ 136280, 136285, 136291, 136297, 136302, 136308, 136314, 136319, 136324,
+ 136330, 136335, 136341, 136347, 136353, 136359, 136365, 136369, 0,
+ 136374, 136379, 136383, 136388, 0, 0, 136393, 136398, 136403, 136407,
+ 136412, 136417, 136421, 136426, 0, 136431, 136435, 136440, 136444,
+ 136449, 136454, 136459, 0, 136464, 136468, 136473, 136478, 136483,
+ 136487, 136492, 136497, 136502, 136506, 136511, 136516, 136520, 136525,
+ 136530, 136534, 136539, 136544, 136548, 136552, 136557, 136561, 136566,
+ 136571, 136576, 136581, 136586, 136590, 0, 136595, 136600, 136604,
+ 136609, 0, 136614, 136618, 136623, 136628, 136632, 0, 136637, 0, 0, 0,
+ 136641, 136645, 136650, 136654, 136659, 136664, 136669, 0, 136674,
+ 136678, 136683, 136688, 136693, 136697, 136702, 136707, 136712, 136716,
+ 136721, 136726, 136730, 136735, 136740, 136744, 136749, 136754, 136758,
+ 136762, 136767, 136771, 136776, 136781, 136786, 136791, 136796, 136801,
+ 136807, 136813, 136819, 136824, 136830, 136836, 136842, 136847, 136853,
+ 136859, 136864, 136870, 136876, 136881, 136887, 136893, 136898, 136903,
+ 136909, 136914, 136920, 136926, 136932, 136938, 136944, 136949, 136955,
+ 136961, 136967, 136972, 136978, 136984, 136990, 136995, 137001, 137007,
+ 137012, 137018, 137024, 137029, 137035, 137041, 137046, 137051, 137057,
+ 137062, 137068, 137074, 137080, 137086, 137092, 137096, 137101, 137106,
+ 137111, 137115, 137120, 137125, 137130, 137134, 137139, 137144, 137148,
+ 137153, 137158, 137162, 137167, 137172, 137176, 137180, 137185, 137189,
+ 137194, 137199, 137204, 137209, 137214, 137218, 137223, 137228, 137233,
+ 137237, 137242, 137247, 137252, 137256, 137261, 137266, 137270, 137275,
+ 137280, 137284, 137289, 137294, 137298, 137302, 137307, 137311, 137316,
+ 137321, 137326, 137331, 137336, 137341, 137347, 137353, 137359, 137364,
+ 137370, 137376, 137382, 137387, 137393, 137399, 137404, 137410, 137416,
+ 137421, 137427, 137433, 137438, 137443, 137449, 137454, 137460, 137466,
+ 137472, 137478, 137484, 137489, 137495, 137501, 137507, 137512, 137518,
+ 137524, 137530, 137535, 137541, 137547, 137552, 137558, 137564, 137569,
+ 137575, 137581, 137586, 137591, 137597, 137602, 137608, 137614, 137620,
+ 137626, 137632, 137637, 137643, 137649, 137655, 137660, 137666, 137672,
+ 137678, 137683, 137689, 137695, 137700, 137706, 137712, 137717, 137723,
+ 137729, 137734, 137739, 137745, 137750, 137756, 137762, 137768, 137774,
+ 137780, 137785, 137791, 137797, 137803, 137808, 137814, 137820, 137826,
+ 137831, 137837, 137843, 137848, 137854, 137860, 137865, 137871, 137877,
+ 137882, 137887, 137893, 137898, 137904, 137910, 137916, 137922, 137928,
+ 137934, 137941, 137948, 137955, 137961, 137968, 137975, 137982, 137988,
+ 137995, 138002, 138008, 138015, 138022, 138028, 138035, 138042, 138048,
+ 138054, 138061, 138067, 138074, 138081, 138088, 138095, 138102, 138108,
+ 138115, 138122, 138129, 138135, 138142, 138149, 138156, 138162, 138169,
+ 138176, 138182, 138189, 138196, 138202, 138209, 138216, 138222, 138228,
+ 138235, 138241, 138248, 138255, 138262, 138269, 138276, 138281, 138287,
+ 138293, 138299, 138304, 138310, 138316, 138322, 138327, 138333, 138339,
+ 138344, 138350, 138356, 138361, 138367, 138373, 138378, 138383, 138389,
+ 138394, 138400, 138406, 138412, 138418, 138424, 138429, 138435, 138441,
+ 138447, 138452, 138458, 138464, 138470, 138475, 138481, 138487, 138492,
+ 138498, 138504, 138509, 138515, 138521, 138526, 138531, 138537, 138542,
+ 138548, 138554, 138560, 138566, 138572, 138578, 0, 0, 138585, 138590,
+ 138595, 138600, 138605, 138610, 138615, 138620, 138625, 138630, 138635,
+ 138640, 138645, 138650, 138655, 138660, 138665, 138670, 138676, 138681,
+ 138686, 138691, 138696, 138701, 138706, 138711, 138715, 138720, 138725,
+ 138730, 138735, 138740, 138745, 138750, 138755, 138760, 138765, 138770,
+ 138775, 138780, 138785, 138790, 138795, 138800, 138806, 138811, 138816,
+ 138821, 138826, 138831, 138836, 138841, 138847, 138852, 138857, 138862,
+ 138867, 138872, 138877, 138882, 138887, 138892, 138897, 138902, 138907,
+ 138912, 138917, 138922, 138927, 138932, 138937, 138942, 138947, 138952,
+ 138957, 138962, 138968, 138973, 138978, 138983, 138988, 138993, 138998,
+ 139003, 139007, 139012, 139017, 139022, 139027, 139032, 139037, 139042,
+ 139047, 139052, 139057, 139062, 139067, 139072, 139077, 139082, 139087,
+ 139092, 139098, 139103, 139108, 139113, 139118, 139123, 139128, 139133,
+ 139139, 139144, 139149, 139154, 139159, 139164, 139169, 139175, 139181,
+ 139187, 139193, 139199, 139205, 139211, 139217, 139223, 139229, 139235,
+ 139241, 139247, 139253, 139259, 139265, 139271, 139278, 139284, 139290,
+ 139296, 139302, 139308, 139314, 139320, 139325, 139331, 139337, 139343,
+ 139349, 139355, 139361, 139367, 139373, 139379, 139385, 139391, 139397,
+ 139403, 139409, 139415, 139421, 139427, 139434, 139440, 139446, 139452,
+ 139458, 139464, 139470, 139476, 139483, 139489, 139495, 139501, 139507,
+ 139513, 139519, 139525, 139531, 139537, 139543, 139549, 139555, 139561,
+ 139567, 139573, 139579, 139585, 139591, 139597, 139603, 139609, 139615,
+ 139621, 139628, 139634, 139640, 139646, 139652, 139658, 139664, 139670,
+ 139675, 139681, 139687, 139693, 139699, 139705, 139711, 139717, 139723,
+ 139729, 139735, 139741, 139747, 139753, 139759, 139765, 139771, 139777,
+ 139784, 139790, 139796, 139802, 139808, 139814, 139820, 139826, 139833,
+ 139839, 139845, 139851, 139857, 139863, 139869, 139876, 139883, 139890,
+ 139897, 139904, 139911, 139918, 139925, 139932, 139939, 139946, 139953,
+ 139960, 139967, 139974, 139981, 139988, 139996, 140003, 140010, 140017,
+ 140024, 140031, 140038, 140045, 140051, 140058, 140065, 140072, 140079,
+ 140086, 140093, 140100, 140107, 140114, 140121, 140128, 140135, 140142,
+ 140149, 140156, 140163, 140170, 140178, 140185, 140192, 140199, 140206,
+ 140213, 140220, 140227, 140235, 140242, 140249, 140256, 140263, 140270,
+ 140277, 140282, 0, 0, 140287, 140292, 140296, 140300, 140304, 140308,
+ 140312, 140316, 140321, 140325, 140330, 140335, 140339, 140343, 140347,
+ 140351, 140355, 140359, 140364, 140368, 140373, 140378, 140382, 140386,
+ 140390, 140394, 140398, 140402, 140407, 140411, 140416, 140422, 140427,
+ 140432, 140437, 140442, 140447, 140452, 140458, 140463, 140469, 140475,
+ 140480, 140485, 140490, 140495, 140500, 140505, 140511, 140516, 140522,
+ 140526, 140531, 140536, 140541, 140546, 140551, 140556, 140562, 140570,
+ 140577, 140582, 140587, 140594, 140600, 140605, 140611, 140617, 140625,
+ 140631, 140638, 140646, 140652, 140661, 140670, 140678, 140686, 140692,
+ 140699, 140707, 140715, 140721, 140728, 140737, 140746, 140753, 140764,
+ 140774, 140784, 140794, 140804, 140811, 140818, 140825, 140832, 140841,
+ 140850, 140861, 140872, 140881, 140890, 140901, 140910, 140919, 140930,
+ 140939, 140948, 140956, 140964, 140975, 140986, 140994, 141003, 141012,
+ 141019, 141030, 141041, 141050, 141059, 141066, 141075, 141084, 141093,
+ 141104, 141113, 141123, 141132, 141141, 141152, 141165, 141180, 141191,
+ 141204, 141216, 141225, 141236, 141247, 141256, 141267, 141281, 141296,
+ 141299, 141308, 141313, 141319, 141327, 141333, 141339, 141348, 141355,
+ 141365, 141377, 141384, 141387, 141393, 141400, 141406, 141411, 141414,
+ 141419, 141422, 141429, 141435, 141443, 141450, 141457, 141463, 141468,
+ 141471, 141474, 141477, 141483, 141490, 141496, 141501, 141508, 141511,
+ 141516, 141523, 141529, 141537, 141544, 141554, 141563, 141566, 141572,
+ 141579, 141586, 141593, 141598, 141606, 141614, 141623, 141629, 141638,
+ 141647, 141656, 141662, 141671, 141678, 141685, 141692, 141700, 141706,
+ 141714, 141720, 141727, 141734, 141742, 141753, 141763, 141769, 141776,
+ 141783, 141790, 141796, 141803, 141810, 141815, 141822, 141830, 141839,
+ 141845, 141857, 141868, 141874, 141882, 141888, 141895, 141902, 141909,
+ 141915, 141922, 141931, 141937, 141943, 141950, 141957, 141965, 141975,
+ 141985, 141995, 142005, 142013, 142021, 142031, 142039, 142044, 142049,
+ 142054, 142060, 142067, 142074, 142080, 142086, 142091, 142098, 142106,
+ 142116, 142124, 142132, 142142, 142152, 142160, 142170, 142180, 142192,
+ 142204, 142216, 142226, 142232, 142238, 142245, 142254, 142263, 142272,
+ 142281, 142291, 142300, 142309, 142318, 142323, 142329, 142338, 142348,
+ 142357, 142363, 142369, 142376, 142383, 142390, 142396, 142403, 142410,
+ 142417, 142423, 142427, 142432, 142439, 142446, 142453, 142458, 142466,
+ 142474, 142483, 142491, 142498, 142506, 142515, 142525, 142528, 142532,
+ 142537, 142542, 142547, 142552, 142557, 142562, 142567, 142572, 142577,
+ 142582, 142587, 142592, 142597, 142602, 142607, 142612, 142617, 142624,
+ 142630, 142637, 142643, 142648, 142655, 142661, 142668, 142674, 142679,
+ 142686, 142693, 142700, 142706, 142712, 142721, 142730, 142741, 142748,
+ 142755, 142764, 142773, 142782, 142791, 142800, 142806, 142814, 142820,
+ 142830, 142835, 142844, 142853, 142860, 142871, 142878, 142885, 142892,
+ 142899, 142906, 142913, 142920, 142927, 142934, 142941, 142947, 142953,
+ 142959, 142966, 142973, 142980, 142987, 142994, 143001, 143008, 143015,
+ 143022, 143029, 143036, 143043, 143048, 143057, 143066, 143075, 143082,
+ 143089, 143096, 143103, 143110, 143117, 143124, 143131, 143140, 143149,
+ 143158, 143167, 143176, 143185, 143194, 143203, 143212, 143221, 143230,
+ 143239, 143248, 143254, 143262, 143268, 143278, 143283, 143292, 143301,
+ 143310, 143321, 143326, 143333, 143340, 143347, 143352, 143358, 143364,
+ 143370, 143377, 143384, 143391, 143398, 143405, 143412, 143419, 143426,
+ 143433, 143440, 143447, 143454, 143459, 143468, 143477, 143486, 143495,
+ 143504, 143513, 143522, 143531, 143542, 143553, 143560, 143567, 143574,
+ 143581, 143588, 143595, 143603, 143613, 143623, 143633, 143644, 143655,
+ 143666, 143675, 143684, 143693, 143698, 143703, 143708, 143713, 143724,
+ 143735, 143746, 143757, 143768, 143778, 143789, 143798, 143807, 143816,
+ 143825, 143834, 143842, 143851, 143862, 143873, 143884, 143895, 143906,
+ 143918, 143931, 143943, 143956, 143968, 143981, 143993, 144006, 144017,
+ 144028, 144037, 144045, 144054, 144065, 144076, 144088, 144101, 144115,
+ 144130, 144142, 144155, 144167, 144180, 144191, 144202, 144211, 144219,
+ 144228, 144235, 144242, 144249, 144256, 144263, 144270, 144277, 144284,
+ 144291, 144298, 144303, 144308, 144313, 144320, 144330, 144341, 144351,
+ 144362, 144376, 144391, 144406, 144420, 144435, 144450, 144461, 144472,
+ 144485, 144498, 144507, 144516, 144529, 144542, 144549, 144556, 144561,
+ 144566, 144571, 144576, 144581, 144588, 144597, 144602, 144605, 144610,
+ 144617, 144624, 144631, 144638, 144645, 144652, 144665, 144679, 144694,
+ 144701, 144708, 144715, 144724, 144732, 144740, 144749, 144754, 144759,
+ 144764, 144769, 144774, 144779, 144786, 144793, 144799, 144806, 144812,
+ 144819, 144824, 144829, 144834, 144839, 144844, 144851, 144858, 144863,
+ 144870, 144877, 144882, 144887, 144892, 144897, 144902, 144907, 144914,
+ 144921, 144928, 144931, 144936, 144941, 144946, 144951, 144958, 144965,
+ 144973, 144981, 144986, 144991, 144998, 145005, 145012, 145017, 145024,
+ 145031, 145036, 145043, 145050, 145056, 145062, 145068, 145074, 145082,
+ 145090, 145096, 145104, 145112, 145117, 145124, 145131, 145136, 145143,
+ 145150, 145157, 145165, 145173, 145178, 145185, 145192, 145201, 145208,
+ 145217, 145228, 145237, 145246, 145255, 145264, 145267, 145272, 145279,
+ 145288, 145295, 145304, 145311, 145316, 145321, 145324, 145327, 145330,
+ 145337, 145344, 145353, 145362, 145371, 145378, 145385, 145390, 145403,
+ 145408, 145413, 145418, 145423, 145428, 145433, 145438, 145443, 145446,
+ 145451, 145456, 145461, 145466, 145471, 145478, 145483, 145490, 145493,
+ 145498, 145501, 145504, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 145507, 145512, 145517, 145522, 145527, 0, 145532, 145537, 145542,
+ 145547, 145552, 145557, 145562, 145567, 145572, 145577, 145582, 145587,
+ 145592, 145597, 145602, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93989, 93993,
- 93997, 94001, 94005, 94009, 94013, 94017, 94021, 94025, 94030, 94035,
- 94040, 94045, 94050, 94055, 94060, 94065, 94070, 94076, 94082, 94088,
- 94095, 94102, 94109, 94116, 94123, 94130, 94137, 94144, 94151, 0, 94158,
- 94162, 94166, 94170, 94174, 94178, 94181, 94185, 94188, 94192, 94195,
- 94199, 94203, 94208, 94212, 94217, 94220, 94224, 94227, 94231, 94234,
- 94238, 94242, 94246, 94250, 94254, 94258, 94262, 94266, 94270, 94274,
- 94278, 94282, 94286, 94290, 94294, 94298, 94302, 94306, 94309, 94312,
- 94316, 94320, 94324, 94327, 94330, 94333, 94337, 94341, 94345, 94349,
- 94352, 94355, 94359, 94365, 94371, 94377, 94382, 94389, 94393, 94398,
- 94402, 94407, 94412, 94418, 94423, 94429, 94433, 94438, 94442, 94447,
- 94450, 94453, 94457, 94462, 94468, 94473, 94479, 0, 0, 0, 0, 94484,
- 94487, 94490, 94493, 94496, 94499, 94502, 94505, 94508, 94511, 94515,
- 94519, 94523, 94527, 94531, 94535, 94539, 94543, 94547, 94552, 94557,
- 94561, 94564, 94567, 94570, 94573, 94576, 94579, 94582, 94585, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94588, 94593, 94598, 94603, 94607,
- 94612, 94616, 94621, 94625, 94630, 94634, 94639, 94643, 94648, 94652,
- 94657, 94662, 94667, 94672, 94677, 94682, 94687, 94692, 94697, 94702,
- 94707, 94712, 94717, 94722, 94727, 94732, 94737, 94742, 94747, 94752,
- 94756, 94760, 94765, 94770, 94775, 94779, 94783, 94787, 94792, 94797,
- 94802, 94807, 94811, 94815, 94821, 94826, 94832, 94837, 94843, 94848,
- 94854, 94859, 94865, 94870, 94875, 94880, 94885, 94889, 94894, 94900,
- 94904, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94909, 94916, 94923,
- 94930, 94937, 94944, 94951, 94958, 94965, 94972, 94979, 94986, 94993,
- 95000, 95007, 95014, 95021, 95028, 95035, 95042, 95049, 95056, 95063,
- 95070, 95077, 0, 0, 0, 0, 0, 0, 0, 95084, 95091, 95097, 95103, 95109,
- 95115, 95121, 95127, 95133, 95139, 0, 0, 0, 0, 0, 0, 95145, 95150, 95155,
- 95160, 95165, 95169, 95173, 95177, 95182, 95187, 95192, 95197, 95202,
- 95207, 95212, 95217, 95222, 95227, 95232, 95237, 95242, 95247, 95252,
- 95257, 95262, 95267, 95272, 95277, 95282, 95287, 95292, 95297, 95302,
- 95307, 95312, 95317, 95322, 95327, 95332, 95337, 95342, 95347, 95353,
- 95358, 95364, 95369, 95375, 95380, 95386, 95392, 95396, 95401, 95405, 0,
- 95409, 95414, 95418, 95422, 95426, 95430, 95434, 95438, 95442, 95446,
- 95450, 95455, 95459, 95464, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95469,
- 95473, 95477, 95481, 95484, 95488, 95491, 95495, 95498, 95502, 95506,
- 95511, 95515, 95520, 95523, 95527, 95530, 95534, 95537, 95541, 95545,
- 95549, 95553, 95557, 95561, 95565, 95569, 95573, 95577, 95581, 95585,
- 95589, 95593, 95597, 95601, 95605, 95609, 95612, 95615, 95619, 95623,
- 95627, 95630, 95633, 95636, 95640, 95644, 95648, 95652, 95656, 95659,
- 95662, 95667, 95671, 95676, 95680, 95685, 95690, 95696, 95701, 95707,
- 95711, 95716, 95720, 95725, 95729, 95733, 95737, 95741, 95744, 95747,
- 95751, 95755, 0, 0, 0, 0, 0, 0, 0, 95758, 95762, 95765, 95768, 95771,
- 95774, 95777, 95780, 95783, 95786, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 145607, 145614, 145620,
+ 145627, 145634, 145641, 145648, 145655, 145662, 145669, 145676, 145683,
+ 145690, 145697, 145704, 145711, 145718, 145725, 145732, 145739, 145746,
+ 145753, 145760, 145767, 145774, 145781, 145788, 145795, 145802, 145809,
+ 145816, 145823, 145830, 145837, 145844, 145850, 145856, 145862, 145869,
+ 145875, 145882, 145888, 145895, 145902, 145909, 145916, 145923, 145930,
+ 145937, 145944, 145951, 145958, 145965, 145972, 145979, 145986, 145993,
+ 146000, 146007, 146014, 146021, 146028, 146036, 146043, 146050, 146057,
+ 146064, 146071, 146078, 146085, 146092, 146099, 146106, 146113, 146120,
+ 146126, 146133, 146140, 146147, 146154, 146161, 146168, 146175, 146183,
+ 146190, 146196, 146203, 146210, 146217, 146224, 146231, 146238, 146245,
+ 146252, 146259, 146266, 146273, 146280, 146287, 146294, 146301, 146308,
+ 146315, 146322, 146329, 146336, 146342, 146349, 146356, 146363, 146370,
+ 146377, 146384, 146391, 146398, 146405, 146412, 146419, 146426, 146433,
+ 146440, 146447, 146454, 146461, 146468, 146475, 146482, 146489, 146496,
+ 146504, 146512, 146520, 146527, 146534, 146541, 146548, 146555, 146562,
+ 146569, 146576, 146583, 146590, 146596, 146603, 146610, 146617, 146624,
+ 146631, 146638, 146645, 146652, 146659, 146666, 146673, 146680, 146687,
+ 146694, 146702, 146710, 146718, 146725, 146732, 146739, 146746, 146753,
+ 146760, 146767, 146774, 146781, 146788, 146795, 146802, 146809, 146816,
+ 146823, 146830, 146837, 146844, 146851, 146858, 146865, 146872, 146879,
+ 146886, 146893, 146900, 146907, 146914, 146921, 146928, 146935, 146942,
+ 146949, 146956, 146963, 146970, 146977, 0, 0, 146984, 146988, 146992,
+ 146996, 147000, 147004, 147008, 147013, 147017, 147022, 147028, 147034,
+ 147040, 147046, 147054, 147062, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 95789, 95793, 95798, 95802, 95807, 95811, 95816, 95820, 95825, 95829,
- 95834, 95838, 95843, 95848, 95853, 95858, 95863, 95868, 95873, 95878,
- 95883, 95888, 95893, 95898, 95903, 95908, 95913, 95918, 95923, 95928,
- 95932, 95936, 95941, 95946, 95951, 95955, 95959, 95963, 95968, 95973,
- 95978, 95982, 95986, 95991, 95996, 96001, 96007, 96012, 96018, 96023,
- 96029, 96034, 96040, 96045, 96051, 96056, 0, 0, 0, 0, 0, 0, 0, 0, 96061,
- 96066, 96070, 96074, 96078, 96082, 96086, 96090, 96094, 96098, 0, 0, 0,
+ 0, 0, 0, 147068, 147072, 147076, 147080, 0, 147084, 147088, 147092,
+ 147096, 147100, 147104, 147108, 147112, 147116, 147120, 147124, 147128,
+ 147132, 147136, 147140, 147144, 147148, 147152, 147156, 147160, 147164,
+ 147168, 147172, 147176, 147182, 147188, 147194, 0, 147200, 147205, 0,
+ 147210, 0, 0, 147215, 0, 147220, 147225, 147230, 147235, 147240, 147245,
+ 147250, 147255, 147260, 147265, 0, 147270, 147275, 147280, 147285, 0,
+ 147290, 0, 147295, 0, 0, 0, 0, 0, 0, 147300, 0, 0, 0, 0, 147306, 0,
+ 147312, 0, 147318, 0, 147324, 147330, 147336, 0, 147342, 147348, 0,
+ 147354, 0, 0, 147360, 0, 147366, 0, 147372, 0, 147378, 0, 147386, 0,
+ 147394, 147400, 0, 147406, 0, 0, 147412, 147418, 147424, 147430, 0,
+ 147436, 147442, 147448, 147454, 147460, 147466, 147472, 0, 147478,
+ 147484, 147490, 147496, 0, 147502, 147508, 147514, 147520, 0, 147528, 0,
+ 147536, 147542, 147548, 147554, 147560, 147566, 147572, 147578, 147584,
+ 147590, 0, 147596, 147602, 147608, 147614, 147620, 147626, 147632,
+ 147638, 147644, 147650, 147656, 147662, 147668, 147674, 147680, 147686,
+ 147692, 0, 0, 0, 0, 0, 147698, 147703, 147708, 0, 147713, 147718, 147723,
+ 147728, 147733, 0, 147738, 147743, 147748, 147753, 147758, 147763,
+ 147768, 147773, 147778, 147783, 147788, 147793, 147798, 147803, 147808,
+ 147813, 147818, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 147823, 147833, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 147841, 147848, 147855, 147862, 147868, 147875, 147882,
+ 147888, 147895, 147902, 147909, 147917, 147925, 147933, 147941, 147949,
+ 147957, 147964, 147971, 147978, 147986, 147994, 148002, 148010, 148018,
+ 148026, 148033, 148040, 148047, 148055, 148063, 148071, 148079, 148087,
+ 148095, 148100, 148105, 148110, 148115, 148120, 148125, 148130, 148135,
+ 148140, 0, 0, 0, 0, 148145, 148151, 148155, 148159, 148163, 148167,
+ 148171, 148175, 148179, 148183, 148187, 148191, 148195, 148199, 148203,
+ 148207, 148211, 148215, 148219, 148223, 148227, 148231, 148235, 148239,
+ 148243, 148247, 148251, 148255, 148259, 148263, 148267, 148271, 148275,
+ 148279, 148283, 148287, 148291, 148295, 148299, 148303, 148307, 148311,
+ 148315, 148319, 148323, 148327, 148331, 148335, 148339, 148343, 148347,
+ 148352, 148356, 148360, 148364, 148368, 148372, 148376, 148380, 148384,
+ 148388, 148392, 148396, 148400, 148404, 148408, 148412, 148416, 148420,
+ 148424, 148428, 148432, 148436, 148440, 148444, 148448, 148452, 148456,
+ 148460, 148464, 148468, 148472, 148476, 148480, 148484, 148488, 148492,
+ 148496, 148500, 148504, 148508, 148512, 148516, 148520, 148524, 148528,
+ 148532, 148536, 148540, 148544, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 148548, 148554, 148563, 148571, 148579, 148588, 148597, 148606, 148615,
+ 148624, 148633, 148642, 148651, 148660, 148669, 0, 0, 148678, 148687,
+ 148695, 148703, 148712, 148721, 148730, 148739, 148748, 148757, 148766,
+ 148775, 148784, 148793, 148802, 0, 148810, 148819, 148827, 148835,
+ 148844, 148853, 148862, 148871, 148880, 148889, 148898, 148907, 148916,
+ 148925, 148934, 0, 148941, 148950, 148958, 148966, 148975, 148984,
+ 148993, 149002, 149011, 149020, 149029, 149038, 149047, 149056, 149065,
+ 149072, 149078, 149084, 149090, 149096, 149102, 149108, 149114, 149120,
+ 149126, 149132, 149138, 149144, 149150, 149156, 149162, 149168, 149174,
+ 149180, 149186, 149192, 149198, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 149204,
+ 149211, 149216, 149220, 149224, 149228, 149233, 149238, 149243, 149248,
+ 149253, 149258, 149265, 0, 0, 0, 149273, 149278, 149284, 149290, 149296,
+ 149301, 149307, 149313, 149319, 149324, 149330, 149336, 149341, 149347,
+ 149353, 149358, 149364, 149370, 149375, 149380, 149386, 149391, 149397,
+ 149403, 149409, 149415, 149421, 149431, 149438, 149444, 149447, 0,
+ 149450, 149455, 149461, 149467, 149473, 149478, 149484, 149490, 149496,
+ 149501, 149507, 149513, 149518, 149524, 149530, 149535, 149541, 149547,
+ 149552, 149557, 149563, 149568, 149574, 149580, 149586, 149592, 149598,
+ 149601, 149604, 149607, 149610, 149613, 149616, 149622, 149629, 149636,
+ 149643, 149649, 149656, 149663, 149670, 149676, 149683, 149690, 149696,
+ 149703, 149710, 149716, 149723, 149730, 149736, 149742, 149749, 149755,
+ 149762, 149769, 149776, 149783, 149790, 149795, 0, 0, 0, 0, 149800,
+ 149806, 149813, 149820, 149827, 149833, 149840, 149847, 149854, 149860,
+ 149867, 149874, 149880, 149887, 149894, 149900, 149907, 149914, 149920,
+ 149926, 149933, 149939, 149946, 149953, 149960, 149967, 149974, 149983,
+ 149987, 149990, 149994, 149998, 150002, 150005, 150008, 150011, 150014,
+ 150017, 150020, 150023, 150026, 150029, 150035, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 96102, 96105, 96110, 96116, 96124, 96129, 96135, 96143, 96149,
- 96155, 96159, 96163, 96170, 96179, 96186, 96195, 96201, 96210, 96217,
- 96224, 96231, 96241, 96247, 96251, 96258, 96267, 96277, 96284, 96291,
- 96295, 96299, 96306, 96316, 96320, 96327, 96334, 96341, 96347, 96354,
- 96361, 96368, 96375, 96379, 96383, 96387, 96394, 96398, 96405, 96412,
- 96426, 96435, 96439, 96443, 96447, 96454, 96458, 96462, 96466, 96474,
- 96482, 96501, 96511, 96531, 96535, 96539, 96543, 96547, 96551, 96555,
- 96559, 96566, 96570, 96573, 96577, 96581, 96587, 96594, 96603, 96607,
- 96616, 96625, 96633, 96637, 96644, 96648, 96652, 96656, 96660, 96671,
- 96680, 96689, 96698, 96707, 96719, 96728, 96737, 96746, 96754, 96763,
- 96775, 96784, 96793, 96802, 96814, 96823, 96832, 96844, 96853, 96862,
- 96874, 96883, 96887, 96891, 96895, 96899, 96903, 96907, 96911, 96918,
- 96922, 96926, 96937, 96941, 96945, 96952, 96958, 96964, 96968, 96975,
- 96979, 96983, 96987, 96991, 96995, 96999, 97005, 97013, 97017, 97021,
- 97024, 97030, 97040, 97044, 97056, 97063, 97070, 97077, 97084, 97090,
- 97094, 97098, 97102, 97106, 97113, 97122, 97129, 97137, 97145, 97151,
- 97155, 97159, 97163, 97167, 97173, 97182, 97194, 97201, 97208, 97217,
- 97228, 97234, 97243, 97252, 97259, 97268, 97275, 97282, 97292, 97299,
- 97306, 97313, 97320, 97324, 97330, 97334, 97345, 97353, 97362, 97374,
- 97381, 97388, 97398, 97405, 97414, 97421, 97430, 97437, 97444, 97454,
- 97461, 97468, 97478, 97485, 97497, 97506, 97513, 97520, 97527, 97536,
- 97546, 97559, 97566, 97576, 97586, 97593, 97602, 97615, 97622, 97629,
- 97636, 97646, 97656, 97663, 97673, 97680, 97687, 97697, 97703, 97710,
- 97717, 97724, 97734, 97741, 97748, 97755, 97761, 97768, 97778, 97785,
- 97789, 97797, 97801, 97813, 97817, 97831, 97835, 97839, 97843, 97847,
- 97853, 97860, 97868, 97872, 97876, 97880, 97884, 97891, 97895, 97901,
- 97907, 97915, 97919, 97926, 97934, 97938, 97942, 97948, 97952, 97961,
- 97970, 97977, 97987, 97993, 97997, 98001, 98009, 98016, 98023, 98029,
- 98033, 98041, 98045, 98052, 98064, 98071, 98081, 98087, 98091, 98100,
- 98107, 98116, 98120, 98124, 98131, 98135, 98139, 98143, 98147, 98150,
- 98156, 98162, 98166, 98170, 98177, 98184, 98191, 98198, 98205, 98212,
- 98219, 98226, 98232, 98236, 98240, 98247, 98254, 98261, 98268, 98275,
- 98279, 98282, 98287, 98291, 98295, 98304, 98313, 98317, 98321, 98327,
- 98333, 98350, 98356, 98360, 98369, 98373, 98377, 98384, 98392, 98400,
- 98406, 98410, 98414, 98418, 98422, 98425, 98431, 98438, 98448, 98455,
- 98462, 98469, 98475, 98482, 98489, 98496, 98503, 98510, 98519, 98526,
- 98538, 98545, 98552, 98562, 98573, 98580, 98587, 98594, 98601, 98608,
- 98615, 98622, 98629, 98636, 98643, 98653, 98663, 98673, 98680, 98690,
- 98697, 98704, 98711, 98718, 98724, 98731, 98738, 98745, 98752, 98759,
- 98766, 98773, 98780, 98786, 98793, 98800, 98809, 98816, 98823, 98827,
- 98835, 98839, 98843, 98847, 98851, 98855, 98862, 98866, 98875, 98879,
- 98886, 98894, 98898, 98902, 98906, 98919, 98935, 98939, 98943, 98950,
- 98956, 98963, 98967, 98971, 98975, 98979, 98983, 98990, 98994, 99012,
- 99016, 99020, 99027, 99031, 99035, 99041, 99045, 99049, 99057, 99061,
- 99065, 99069, 99073, 99079, 99090, 99099, 99108, 99115, 99122, 99133,
- 99140, 99147, 99154, 99161, 99168, 99175, 99182, 99192, 99198, 99205,
- 99215, 99224, 99231, 99240, 99250, 99257, 99264, 99271, 99278, 99290,
- 99297, 99304, 99311, 99318, 99325, 99335, 99342, 99349, 99359, 99372,
- 99384, 99391, 99401, 99408, 99415, 99422, 99436, 99442, 99450, 99460,
- 99470, 99477, 99484, 99490, 99494, 99501, 99511, 99517, 99530, 99534,
- 99538, 99545, 99549, 99556, 99566, 99570, 99574, 99578, 99582, 99586,
- 99593, 99597, 99604, 99611, 99618, 99627, 99636, 99646, 99653, 99660,
- 99667, 99677, 99684, 99694, 99701, 99711, 99718, 99725, 99735, 99745,
- 99752, 99758, 99766, 99774, 99780, 99786, 99790, 99794, 99801, 99809,
- 99815, 99819, 99823, 99827, 99834, 99846, 99849, 99856, 99862, 99866,
- 99870, 99874, 99878, 99882, 99886, 99890, 99894, 99898, 99902, 99909,
- 99913, 99919, 99923, 99927, 99931, 99937, 99944, 99951, 99958, 99969,
- 99977, 99981, 99987, 99996, 100003, 100009, 100012, 100016, 100020,
- 100026, 100035, 100043, 100047, 100053, 100057, 100061, 100065, 100071,
- 100078, 100084, 100088, 100094, 100098, 100102, 100111, 100123, 100127,
- 100134, 100141, 100151, 100158, 100170, 100177, 100184, 100191, 100202,
- 100212, 100225, 100235, 100242, 100246, 100250, 100254, 100258, 100267,
- 100276, 100285, 100302, 100311, 100317, 100324, 100332, 100345, 100349,
- 100358, 100367, 100376, 100385, 100396, 100405, 100414, 100423, 100432,
- 100441, 100450, 100460, 100463, 100467, 100471, 100475, 100479, 100483,
- 100489, 100496, 100503, 100510, 100516, 100522, 100529, 100535, 100542,
- 100550, 100554, 100561, 100568, 100575, 100583, 100586, 100590, 100594,
- 100598, 100601, 100607, 100611, 100617, 100624, 100631, 100637, 100644,
- 100651, 100658, 100665, 100672, 100679, 100686, 100693, 100700, 100707,
- 100714, 100721, 100728, 100735, 100741, 100745, 100754, 100758, 100762,
- 100766, 100770, 100776, 100783, 100790, 100797, 100804, 100811, 100817,
- 100825, 100829, 100833, 100837, 100841, 100847, 100864, 100881, 100885,
- 100889, 100893, 100897, 100901, 100905, 100911, 100918, 100922, 100928,
- 100935, 100942, 100949, 100956, 100963, 100972, 100979, 100986, 100993,
- 101000, 101004, 101008, 101014, 101026, 101030, 101034, 101043, 101047,
- 101051, 101055, 101061, 101065, 101069, 101078, 101082, 101086, 101090,
- 101097, 101101, 101105, 101109, 101113, 101117, 101121, 101125, 101129,
- 101135, 101142, 101149, 101155, 101159, 101176, 101182, 101186, 101192,
- 101198, 101204, 101210, 101216, 101222, 101226, 101230, 101234, 101240,
- 101244, 101250, 101254, 101258, 101265, 101272, 101289, 101293, 101297,
- 101301, 101305, 101309, 101321, 101324, 101329, 101334, 101349, 101359,
- 101371, 101375, 101379, 101383, 101389, 101396, 101403, 101413, 101425,
- 101431, 101437, 101446, 101450, 101454, 101461, 101471, 101478, 101484,
- 101488, 101492, 101499, 101505, 101509, 101515, 101519, 101527, 101533,
- 101537, 101545, 101553, 101560, 101566, 101573, 101580, 101590, 101600,
- 101604, 101608, 101612, 101616, 101622, 101629, 101635, 101642, 101649,
- 101656, 101665, 101672, 101679, 101685, 101692, 101699, 101706, 101713,
- 101720, 101727, 101733, 101740, 101747, 101754, 101763, 101770, 101777,
- 101781, 101787, 101791, 101797, 101804, 101811, 101818, 101822, 101826,
- 101830, 101834, 101838, 101845, 101849, 101853, 101859, 101867, 101871,
- 101875, 101879, 101883, 101890, 101894, 101898, 101906, 101910, 101914,
- 101918, 101922, 101928, 101932, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 101936, 101942, 101948, 101955, 101962, 101969, 101976, 101983,
- 101990, 101996, 102003, 102010, 102017, 102024, 102031, 102038, 102044,
- 102050, 102056, 102062, 102068, 102074, 102080, 102086, 102092, 102099,
- 102106, 102113, 102120, 102127, 102134, 102140, 102146, 102152, 102159,
- 102166, 102172, 102178, 102187, 102194, 102201, 102208, 102215, 102222,
- 102229, 102235, 102241, 102247, 102256, 102263, 102270, 102281, 102292,
- 102298, 102304, 102310, 102319, 102326, 102333, 102343, 102353, 102364,
- 102375, 102387, 102400, 102411, 102422, 102434, 102447, 102458, 102469,
- 102480, 102491, 102502, 102514, 102522, 102530, 102539, 102548, 102557,
- 102563, 102569, 102575, 102582, 102592, 102599, 102609, 102614, 102619,
- 102625, 102631, 102639, 102647, 102656, 102667, 102678, 102686, 102694,
- 102703, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102712, 102723, 102730,
- 102738, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 102746, 102750, 102754,
- 102758, 102762, 102766, 102770, 102774, 102778, 102782, 102786, 102790,
- 102794, 102798, 102802, 102806, 102810, 102814, 102818, 102822, 102826,
- 102830, 102834, 102838, 102842, 102846, 102850, 102854, 102858, 102862,
- 102866, 102870, 102874, 102878, 102882, 102886, 102890, 102894, 102898,
- 102902, 102906, 102910, 102914, 102918, 102922, 102926, 102930, 102934,
- 102938, 102942, 102946, 102950, 102954, 102958, 102962, 102966, 102970,
- 102974, 102978, 102982, 102986, 102990, 102994, 102998, 103002, 103006,
- 103010, 103014, 103018, 103022, 103026, 103030, 103034, 103038, 103042,
- 103046, 103050, 103054, 103058, 103062, 103066, 103070, 103074, 103078,
- 103082, 103086, 103090, 103094, 103098, 103102, 103106, 103110, 103114,
- 103118, 103122, 103126, 103130, 103134, 103138, 103142, 103146, 103150,
- 103154, 103158, 103162, 103166, 103170, 103174, 103178, 103182, 103186,
- 103190, 103194, 103198, 103202, 103206, 103210, 103214, 103218, 103222,
- 103226, 103230, 103234, 103238, 103242, 103246, 103250, 103254, 103258,
- 103262, 103266, 103270, 103274, 103278, 103282, 103286, 103290, 103294,
- 103298, 103302, 103306, 103310, 103314, 103318, 103322, 103326, 103330,
- 103334, 103338, 103342, 103346, 103350, 103354, 103358, 103362, 103366,
- 103370, 103374, 103378, 103382, 103386, 103390, 103394, 103398, 103402,
- 103406, 103410, 103414, 103418, 103422, 103426, 103430, 103434, 103438,
- 103442, 103446, 103450, 103454, 103458, 103462, 103466, 103470, 103474,
- 103478, 103482, 103486, 103490, 103494, 103498, 103502, 103506, 103510,
- 103514, 103518, 103522, 103526, 103530, 103534, 103538, 103542, 103546,
- 103550, 103554, 103558, 103562, 103566, 103570, 103574, 103578, 103582,
- 103586, 103590, 103594, 103598, 103602, 103606, 103610, 103614, 103618,
- 103622, 103626, 103630, 103634, 103638, 103642, 103646, 103650, 103654,
- 103658, 103662, 103666, 103670, 103674, 103678, 103682, 103686, 103690,
- 103694, 103698, 103702, 103706, 103710, 103714, 103718, 103722, 103726,
- 103730, 103734, 103738, 103742, 103746, 103750, 103754, 103758, 103762,
- 103766, 103770, 103774, 103778, 103782, 103786, 103790, 103794, 103798,
- 103802, 103806, 103810, 103814, 103818, 103822, 103826, 103830, 103834,
- 103838, 103842, 103846, 103850, 103854, 103858, 103862, 103866, 103870,
- 103874, 103878, 103882, 103886, 103890, 103894, 103898, 103902, 103906,
- 103910, 103914, 103918, 103922, 103926, 103930, 103934, 103938, 103942,
- 103946, 103950, 103954, 103958, 103962, 103966, 103970, 103974, 103978,
- 103982, 103986, 103990, 103994, 103998, 104002, 104006, 104010, 104014,
- 104018, 104022, 104026, 104030, 104034, 104038, 104042, 104046, 104050,
- 104054, 104058, 104062, 104066, 104070, 104074, 104078, 104082, 104086,
- 104090, 104094, 104098, 104102, 104106, 104110, 104114, 104118, 104122,
- 104126, 104130, 104134, 104138, 104142, 104146, 104150, 104154, 104158,
- 104162, 104166, 104170, 104174, 104178, 104182, 104186, 104190, 104194,
- 104198, 104202, 104206, 104210, 104214, 104218, 104222, 104226, 104230,
- 104234, 104238, 104242, 104246, 104250, 104254, 104258, 104262, 104266,
- 104270, 104274, 104278, 104282, 104286, 104290, 104294, 104298, 104302,
- 104306, 104310, 104314, 104318, 104322, 104326, 104330, 104334, 104338,
- 104342, 104346, 104350, 104354, 104358, 104362, 104366, 104370, 104374,
- 104378, 104382, 104386, 104390, 104394, 104398, 104402, 104406, 104410,
- 104414, 104418, 104422, 104426, 104430, 104434, 104438, 104442, 104446,
- 104450, 104454, 104458, 104462, 104466, 104470, 104474, 104478, 104482,
- 104486, 104490, 104494, 104498, 104502, 104506, 104510, 104514, 104518,
- 104522, 104526, 104530, 104534, 104538, 104542, 104546, 104550, 104554,
- 104558, 104562, 104566, 104570, 104574, 104578, 104582, 104586, 104590,
- 104594, 104598, 104602, 104606, 104610, 104614, 104618, 104622, 104626,
- 104630, 104634, 104638, 104642, 104646, 104650, 104654, 104658, 104662,
- 104666, 104670, 104674, 104678, 104682, 104686, 104690, 104694, 104698,
- 104702, 104706, 104710, 104714, 104718, 104722, 104726, 104730, 104734,
- 104738, 104742, 104746, 104750, 104754, 104758, 104762, 104766, 104770,
- 104774, 104778, 104782, 104786, 104790, 104794, 104798, 104802, 104806,
- 104810, 104814, 104818, 104822, 104826, 104830, 104834, 104838, 104842,
- 104846, 104850, 104854, 104858, 104862, 104866, 104870, 104874, 104878,
- 104882, 104886, 104890, 104894, 104898, 104902, 104906, 104910, 104914,
- 104918, 104922, 104926, 104930, 104934, 104938, 104942, 104946, 104950,
- 104954, 104958, 104962, 104966, 104970, 104974, 104978, 104982, 104986,
- 104990, 104994, 104998, 105002, 105006, 105010, 105014, 105018, 105022,
- 105026, 105030, 105034, 105038, 105042, 105046, 105050, 105054, 105058,
- 105062, 105066, 105070, 105074, 105078, 105082, 105086, 105090, 105094,
- 105098, 105102, 105106, 105110, 105114, 105118, 105122, 105126, 105130,
- 105134, 105138, 105142, 105146, 105150, 105154, 105158, 105162, 105166,
- 105170, 105174, 105178, 105182, 105186, 105190, 105194, 105198, 105202,
- 105206, 105210, 105214, 105218, 105222, 105226, 105230, 105234, 105238,
- 105242, 105246, 105250, 105254, 105258, 105262, 105266, 105270, 105274,
- 105278, 105282, 105286, 105290, 105294, 105298, 105302, 105306, 105310,
- 105314, 105318, 105322, 105326, 105330, 105334, 105338, 105342, 105346,
- 105350, 105354, 105358, 105362, 105366, 105370, 105374, 105378, 105382,
- 105386, 105390, 105394, 105398, 105402, 105406, 105410, 105414, 105418,
- 105422, 105426, 105430, 105434, 105438, 105442, 105446, 105450, 105454,
- 105458, 105462, 105466, 105470, 105474, 105478, 105482, 105486, 105490,
- 105494, 105498, 105502, 105506, 105510, 105514, 105518, 105522, 105526,
- 105530, 105534, 105538, 105542, 105546, 105550, 105554, 105558, 105562,
- 105566, 105570, 105574, 105578, 105582, 105586, 105590, 105594, 105598,
- 105602, 105606, 105610, 105614, 105618, 105622, 105626, 105630, 105634,
- 105638, 105642, 105646, 105650, 105654, 105658, 105662, 105666, 105670,
- 105674, 105678, 105682, 105686, 105690, 105694, 105698, 105702, 105706,
- 105710, 105714, 105718, 105722, 105726, 105730, 105734, 105738, 105742,
- 105746, 105750, 105754, 105758, 105762, 105766, 105770, 105774, 105778,
- 105782, 105786, 105790, 105794, 105798, 105802, 105806, 105810, 105814,
- 105818, 105822, 105826, 105830, 105834, 105838, 105842, 105846, 105850,
- 105854, 105858, 105862, 105866, 105870, 105874, 105878, 105882, 105886,
- 105890, 105894, 105898, 105902, 105906, 105910, 105914, 105918, 105922,
- 105926, 105930, 105934, 105938, 105942, 105946, 105950, 105954, 105958,
- 105962, 105966, 105970, 105974, 105978, 105982, 105986, 105990, 105994,
- 105998, 106002, 106006, 106010, 106014, 106018, 106022, 106026, 106030,
- 106034, 106038, 106042, 106046, 106050, 106054, 106058, 106062, 106066,
- 106070, 106074, 106078, 106082, 106086, 106090, 106094, 106098, 106102,
- 106106, 106110, 106114, 106118, 106122, 106126, 106130, 106134, 106138,
- 106142, 106146, 106150, 106154, 106158, 106162, 106166, 106170, 106174,
- 106178, 106182, 106186, 106190, 106194, 106198, 106202, 106206, 106210,
- 106214, 106218, 106222, 106226, 106230, 106234, 106238, 106242, 106246,
- 106250, 106254, 106258, 106262, 106266, 106270, 106274, 106278, 106282,
- 106286, 106290, 106294, 106298, 106302, 106306, 106310, 106314, 106318,
- 106322, 106326, 106330, 106334, 106338, 106342, 106346, 106350, 106354,
- 106358, 106362, 106366, 106370, 106374, 106378, 106382, 106386, 106390,
- 106394, 106398, 106402, 106406, 106410, 106414, 106418, 106422, 106426,
- 106430, 106434, 106438, 106442, 106446, 106450, 106454, 106458, 106462,
- 106466, 106470, 106474, 106478, 106482, 106486, 106490, 106494, 106498,
- 106502, 106506, 106510, 106514, 106518, 106522, 106526, 106530, 106534,
- 106538, 106542, 106546, 106550, 106554, 106558, 106562, 106566, 106570,
- 106574, 106578, 106582, 106586, 106590, 106594, 106598, 106602, 106606,
- 106610, 106614, 106618, 106622, 106626, 106630, 106634, 106638, 106642,
- 106646, 106650, 106654, 106658, 106662, 106666, 106670, 106674, 106678,
- 106682, 106686, 106690, 106694, 106698, 106702, 106706, 106710, 106714,
- 106718, 106722, 106726, 106730, 106734, 106738, 106742, 106746, 106750,
- 106754, 106758, 106762, 106766, 106770, 106774, 106778, 106782, 106786,
- 106790, 106794, 106798, 106802, 106806, 106810, 106814, 106818, 106822,
- 106826, 106830, 106834, 106838, 106842, 106846, 106850, 106854, 106858,
- 106862, 106866, 106870, 106874, 106878, 106882, 106886, 106890, 106894,
- 106898, 106902, 106906, 106910, 106914, 106918, 106922, 106926, 106930,
- 106934, 106938, 106942, 106946, 106950, 106954, 106958, 106962, 106966,
- 106970, 106974, 106978, 106982, 106986, 106990, 106994, 106998, 107002,
- 107006, 107010, 107014, 107018, 107022, 107026, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 150038, 150045,
+ 150053, 150061, 150069, 150076, 150084, 150092, 150100, 150107, 150115,
+ 150123, 150130, 150138, 150146, 150153, 150161, 150169, 150176, 150183,
+ 150191, 150198, 150206, 150214, 150222, 150230, 150238, 150242, 150246,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 150250, 150256, 150262, 150268,
+ 150272, 150278, 150284, 150290, 150296, 150302, 150308, 150314, 150320,
+ 150326, 150332, 150338, 150344, 150350, 150356, 150362, 150368, 150374,
+ 150380, 150386, 150392, 150398, 150404, 150410, 150416, 150422, 150428,
+ 150434, 150440, 150446, 150452, 150458, 150464, 150470, 150476, 150482,
+ 150488, 150494, 150500, 0, 0, 0, 0, 0, 150506, 150517, 150528, 150539,
+ 150550, 150561, 150572, 150583, 150594, 0, 0, 0, 0, 0, 0, 0, 150605,
+ 150609, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 107030, 107037, 107044, 107053, 107062, 107069, 107074, 107081,
- 107088, 107097, 107108, 107119, 107124, 107131, 107136, 107141, 107146,
- 107151, 107156, 107161, 107166, 107171, 107176, 107181, 107186, 107193,
- 107200, 107205, 107210, 107215, 107220, 107227, 107234, 107242, 107247,
- 107254, 107259, 107264, 107269, 107274, 107279, 107286, 107293, 107298,
- 107303, 107308, 107313, 107318, 107323, 107328, 107333, 107338, 107343,
- 107348, 107353, 107358, 107363, 107368, 107373, 107378, 107383, 107388,
- 107395, 107400, 107405, 107414, 107421, 107426, 107431, 107436, 107441,
- 107446, 107451, 107456, 107461, 107466, 107471, 107476, 107481, 107486,
- 107491, 107496, 107501, 107506, 107511, 107516, 107521, 107526, 107532,
- 107540, 107546, 107554, 107562, 107570, 107576, 107582, 107588, 107594,
- 107600, 107608, 107618, 107626, 107634, 107640, 107646, 107654, 107662,
- 107668, 107676, 107684, 107692, 107698, 107704, 107710, 107716, 107722,
- 107728, 107736, 107744, 107750, 107756, 107762, 107768, 107774, 107782,
- 107788, 107794, 107800, 107806, 107812, 107818, 107826, 107832, 107838,
- 107844, 107850, 107858, 107866, 107872, 107878, 107884, 107889, 107895,
- 107901, 107908, 107913, 107918, 107923, 107928, 107933, 107938, 107943,
- 107948, 107953, 107962, 107969, 107974, 107979, 107984, 107991, 107996,
- 108001, 108006, 108013, 108018, 108023, 108028, 108033, 108038, 108043,
- 108048, 108053, 108058, 108063, 108068, 108075, 108080, 108087, 108092,
- 108097, 108104, 108109, 108114, 108119, 108124, 108129, 108134, 108139,
- 108144, 108149, 108154, 108159, 108164, 108169, 108174, 108179, 108184,
- 108189, 108194, 108199, 108206, 108211, 108216, 108221, 108226, 108231,
- 108236, 108241, 108246, 108251, 108256, 108261, 108266, 108271, 108278,
- 108283, 108288, 108295, 108300, 108305, 108310, 108315, 108320, 108325,
- 108330, 108335, 108340, 108345, 108352, 108357, 108362, 108367, 108372,
- 108377, 108384, 108391, 108396, 108401, 108406, 108411, 108416, 108421,
- 108426, 108431, 108436, 108441, 108446, 108451, 108456, 108461, 108466,
- 108471, 108476, 108481, 108486, 108491, 108496, 108501, 108506, 108511,
- 108516, 108521, 108526, 108531, 108536, 108541, 108546, 108551, 108556,
- 108561, 108566, 108571, 108578, 108583, 108588, 108593, 108598, 108603,
- 108608, 108613, 108618, 108623, 108628, 108633, 108638, 108643, 108648,
- 108653, 108658, 108663, 108668, 108673, 108678, 108683, 108688, 108693,
- 108698, 108703, 108708, 108713, 108718, 108723, 108728, 108733, 108738,
- 108743, 108748, 108753, 108758, 108763, 108768, 108773, 108778, 108783,
- 108788, 108793, 108798, 108803, 108808, 108813, 108818, 108823, 108828,
- 108833, 108838, 108843, 108848, 108853, 108858, 108863, 108868, 108875,
- 108880, 108885, 108890, 108895, 108900, 108905, 108909, 108914, 108919,
- 108924, 108929, 108934, 108939, 108944, 108949, 108954, 108959, 108964,
- 108969, 108974, 108979, 108986, 108991, 108996, 109002, 109007, 109012,
- 109017, 109022, 109027, 109032, 109037, 109042, 109047, 109052, 109057,
- 109062, 109067, 109072, 109077, 109082, 109087, 109092, 109097, 109102,
- 109107, 109112, 109117, 109122, 109127, 109132, 109137, 109142, 109147,
- 109152, 109157, 109162, 109167, 109172, 109177, 109182, 109187, 109192,
- 109197, 109202, 109207, 109212, 109217, 109224, 109229, 109234, 109241,
- 109248, 109253, 109258, 109263, 109268, 109273, 109278, 109283, 109288,
- 109293, 109298, 109303, 109308, 109313, 109318, 109323, 109328, 109333,
- 109338, 109343, 109348, 109353, 109358, 109363, 109368, 109373, 109380,
- 109385, 109390, 109395, 109400, 109405, 109410, 109415, 109420, 109425,
- 109430, 109435, 109440, 109445, 109450, 109455, 109460, 109465, 109470,
- 109477, 109482, 109487, 109492, 109497, 109502, 109507, 109512, 109518,
- 109523, 109528, 109533, 109538, 109543, 109548, 109553, 109558, 109565,
- 109572, 109577, 109582, 109586, 109591, 109595, 109599, 109604, 109611,
- 109616, 109621, 109630, 109635, 109640, 109645, 109650, 109657, 109664,
- 109669, 109674, 109679, 109684, 109691, 109696, 109701, 109706, 109711,
- 109716, 109721, 109726, 109731, 109736, 109741, 109746, 109751, 109758,
- 109762, 109767, 109772, 109777, 109782, 109786, 109791, 109796, 109801,
- 109806, 109811, 109816, 109821, 109826, 109831, 109837, 109843, 109849,
- 109855, 109861, 109867, 109873, 109879, 109885, 109891, 109897, 109903,
- 109908, 109914, 109920, 109926, 109932, 109938, 109944, 109950, 109956,
- 109962, 109968, 109974, 109979, 109985, 109991, 109997, 110003, 110009,
- 110015, 110021, 110027, 110033, 110039, 110045, 110051, 110057, 110063,
- 110069, 110075, 110081, 110087, 110093, 110099, 110104, 110110, 110116,
- 110122, 110128, 110134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 110140, 110143, 110147, 110151, 110155, 110158,
- 110162, 110167, 110171, 110175, 110179, 110183, 110187, 110192, 110197,
- 110201, 110205, 110208, 110212, 110217, 110222, 110226, 110230, 110234,
- 110238, 110242, 110246, 110250, 110254, 110258, 110262, 110265, 110269,
- 110273, 110277, 110281, 110285, 110289, 110295, 110298, 110302, 110306,
- 110310, 110314, 110318, 110322, 110326, 110330, 110334, 110339, 110344,
- 110350, 110354, 110358, 110362, 110366, 110370, 110374, 110379, 110382,
- 110386, 110390, 110394, 110398, 110404, 110408, 110412, 110416, 110420,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 110424, 110428, 110432, 110438, 110444,
- 110448, 110453, 110458, 110463, 110468, 110472, 110477, 110482, 110487,
- 110491, 110496, 110501, 110506, 110510, 110515, 110520, 110525, 110530,
- 110535, 110540, 110545, 110550, 110554, 110559, 110564, 110569, 110574,
- 110579, 110584, 110589, 110594, 110599, 110604, 110609, 110616, 110621,
- 110628, 110633, 110638, 110643, 110648, 110653, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 110658, 110662, 110668, 110671, 110674, 110678,
- 110682, 110686, 110690, 110694, 110698, 110702, 110708, 110714, 110720,
- 110726, 110732, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 150613, 150615, 150617, 150621, 150626, 150631,
+ 150633, 150639, 150644, 150646, 150652, 150656, 150658, 150662, 150668,
+ 150674, 150680, 150685, 150690, 150697, 150704, 150711, 150716, 150723,
+ 150730, 150737, 150741, 150748, 150757, 150766, 150773, 150778, 150782,
+ 150786, 150788, 150791, 150794, 150801, 150808, 150818, 150823, 150828,
+ 150833, 150838, 150840, 150846, 150850, 150852, 150854, 150856, 150858,
+ 150862, 150866, 150870, 150872, 150876, 150878, 150882, 150884, 150886,
+ 150888, 150890, 150895, 150900, 150902, 150908, 150912, 150916, 150924,
+ 150926, 150928, 150930, 150932, 150934, 150936, 150938, 150940, 150942,
+ 150944, 150948, 150952, 150954, 150956, 150958, 150960, 150962, 150967,
+ 150973, 150977, 150981, 150985, 150989, 150994, 150998, 151000, 151002,
+ 151006, 151012, 151014, 151016, 151018, 151022, 151031, 151037, 151041,
+ 151045, 151047, 151049, 151052, 151054, 151056, 151058, 151062, 151064,
+ 151068, 151073, 151075, 151080, 151086, 151093, 151097, 151101, 151105,
+ 151109, 151115, 151119, 151127, 151134, 151136, 151138, 151142, 151146,
+ 151148, 151152, 151156, 151158, 151162, 151164, 151168, 151172, 151176,
+ 151180, 151184, 151188, 151192, 151196, 151202, 151206, 151210, 151221,
+ 151226, 151230, 151234, 151240, 151244, 151248, 151252, 151259, 151266,
+ 151270, 151274, 151278, 151282, 151286, 151293, 151295, 151299, 151301,
+ 151303, 151307, 151311, 151315, 151317, 151321, 151325, 151329, 151333,
+ 151337, 151339, 151343, 151345, 151351, 151354, 151359, 151361, 151363,
+ 151366, 151368, 151370, 151373, 151380, 151387, 151394, 151399, 151403,
+ 151405, 151407, 151409, 151413, 151415, 151419, 151423, 151427, 151429,
+ 151433, 151435, 151439, 151443, 151450, 151452, 151461, 151470, 151479,
+ 151485, 151487, 151492, 151496, 151500, 151502, 151508, 151512, 151514,
+ 151518, 151522, 151524, 151528, 151533, 151537, 151543, 151549, 151551,
+ 151553, 151559, 151561, 151565, 151569, 151571, 151575, 151577, 151581,
+ 151585, 151589, 151592, 151595, 151600, 151605, 151607, 151610, 151612,
+ 151619, 151623, 151625, 151632, 151639, 151646, 151653, 151660, 151662,
+ 151664, 151666, 151670, 151672, 151674, 151676, 151678, 151680, 151682,
+ 151684, 151686, 151688, 151690, 151692, 151694, 151696, 151698, 151700,
+ 151702, 151704, 151706, 151708, 151710, 151712, 151714, 151718, 151720,
+ 151722, 151724, 151728, 151730, 151734, 151736, 151738, 151742, 151746,
+ 151752, 151754, 151756, 151758, 151760, 151764, 151768, 151770, 151774,
+ 151778, 151782, 151786, 151790, 151794, 151798, 151802, 151806, 151810,
+ 151814, 151818, 151822, 151826, 151830, 151834, 151838, 151842, 151844,
+ 151846, 151848, 151850, 151852, 151854, 151856, 151864, 151872, 151880,
+ 151888, 151893, 151898, 151903, 151907, 151911, 151916, 151920, 151922,
+ 151926, 151928, 151930, 151932, 151934, 151936, 151938, 151940, 151944,
+ 151946, 151948, 151950, 151954, 151958, 151962, 151966, 151970, 151972,
+ 151978, 151984, 151986, 151988, 151990, 151992, 151994, 152003, 152010,
+ 152017, 152021, 152028, 152033, 152040, 152049, 152054, 152058, 152062,
+ 152064, 152068, 152070, 152074, 152078, 152080, 152084, 152088, 152092,
+ 152094, 152096, 152102, 152104, 152106, 152108, 152112, 152116, 152118,
+ 152122, 152124, 152126, 152129, 152133, 152135, 152139, 152141, 152143,
+ 152148, 152150, 152154, 152158, 152161, 152165, 152169, 152173, 152177,
+ 152181, 152185, 152189, 152194, 152198, 152202, 152211, 152216, 152219,
+ 152221, 152224, 152227, 152232, 152234, 152237, 152242, 152246, 152249,
+ 152253, 152257, 152260, 152265, 152269, 152273, 152277, 152281, 152287,
+ 152293, 152299, 152305, 152310, 152320, 152322, 152326, 152328, 152330,
+ 152334, 152338, 152340, 152344, 152349, 152354, 152360, 152362, 152366,
+ 152370, 152376, 152382, 152386, 152388, 152390, 152394, 152396, 152400,
+ 152404, 152408, 152410, 152412, 152419, 152423, 152426, 152430, 152434,
+ 152438, 152440, 152444, 152446, 152448, 152452, 152454, 152458, 152462,
+ 152468, 152472, 152476, 152480, 152482, 152485, 152489, 152495, 152504,
+ 152513, 152521, 152529, 152531, 152535, 152537, 152541, 152552, 152556,
+ 152562, 152568, 152573, 152575, 152580, 152584, 152586, 152588, 152590,
+ 152594, 152598, 152602, 152607, 152617, 152632, 152642, 152652, 152656,
+ 152660, 152666, 152668, 152676, 152684, 152686, 152690, 152696, 152702,
+ 152709, 152716, 152718, 152720, 152723, 152725, 152731, 152733, 152736,
+ 152740, 152746, 152752, 152763, 152769, 152775, 152783, 152787, 152795,
+ 152803, 152809, 152815, 152822, 152824, 152828, 152830, 152832, 152837,
+ 152839, 152841, 152843, 152845, 152849, 152859, 152865, 152869, 152873,
+ 152877, 152883, 152889, 152895, 152901, 152906, 152911, 152917, 152923,
+ 152930, 152937, 152945, 152953, 152958, 152966, 152970, 152979, 152988,
+ 152994, 152998, 153002, 153006, 153009, 153014, 153016, 153018, 153020,
+ 153027, 153032, 153039, 153046, 153053, 153061, 153069, 153077, 153085,
+ 153093, 153101, 153109, 153117, 153125, 153131, 153137, 153143, 153149,
+ 153155, 153161, 153167, 153173, 153179, 153185, 153191, 153197, 153200,
+ 153209, 153218, 153220, 153227, 153231, 153233, 153235, 153239, 153245,
+ 153249, 153251, 153261, 153267, 153271, 153273, 153277, 0, 153279,
+ 153286, 153293, 153300, 153305, 153310, 153319, 153325, 153330, 153334,
+ 153339, 153343, 153350, 153354, 153357, 153362, 153369, 153376, 153381,
+ 153386, 153391, 153398, 153407, 153418, 153424, 153430, 153436, 153446,
+ 153461, 153470, 153478, 153486, 153494, 153502, 153510, 153518, 153526,
+ 153534, 153542, 153550, 153558, 0, 153566, 153570, 153575, 153580,
+ 153582, 153586, 153595, 153604, 153612, 153616, 153620, 153625, 153630,
+ 153635, 153637, 153642, 153646, 153648, 153652, 153656, 153662, 153667,
+ 153675, 153680, 153685, 153690, 153697, 153700, 153702, 153705, 153710,
+ 153716, 153720, 153724, 153730, 153736, 153738, 153742, 153746, 153750,
+ 153754, 153758, 153760, 153762, 153764, 153766, 153772, 153778, 153782,
+ 153784, 153786, 153788, 153797, 153801, 153808, 153815, 153817, 153820,
+ 153824, 153830, 153834, 153838, 153840, 153848, 153852, 153856, 153861,
+ 153866, 153871, 153876, 153881, 153886, 153891, 153896, 153901, 153906,
+ 153910, 153916, 153920, 153926, 153931, 153938, 153944, 153952, 153956,
+ 153963, 153967, 153971, 153975, 153980, 153985, 153987, 153991, 154000,
+ 154008, 154016, 154029, 154042, 154055, 154062, 154069, 154073, 154082,
+ 154090, 154094, 154103, 154110, 154114, 154118, 154122, 154126, 154133,
+ 154137, 154141, 154145, 154149, 154156, 154165, 154174, 154181, 154193,
+ 154205, 154209, 154213, 154217, 154221, 154225, 154229, 154237, 154245,
+ 154253, 154257, 154261, 154265, 154269, 154273, 154277, 154283, 154289,
+ 154293, 154304, 154312, 154316, 154320, 154324, 154328, 154334, 154341,
+ 154352, 154362, 154372, 154383, 154392, 154403, 154409, 154415, 154421,
+ 154427, 154433, 154437, 154444, 154453, 154460, 154466, 154470, 154474,
+ 154478, 154487, 154499, 154503, 154510, 154517, 154524, 154532, 154539,
+ 154547, 154556, 154566, 154575, 154585, 154594, 154604, 154613, 154623,
+ 154633, 154644, 154654, 154665, 154672, 154680, 154687, 154695, 154703,
+ 154712, 154720, 154729, 154736, 154748, 154755, 154767, 154770, 154773,
+ 154776, 154779, 154785, 154792, 154798, 154805, 154810, 154816, 154828,
+ 154838, 154849, 154854, 154859, 154865, 154870, 154877, 154881, 154887,
+ 154889, 154891, 154895, 154899, 154903, 154912, 154914, 154916, 154919,
+ 154921, 154923, 154927, 154929, 154933, 154935, 154939, 154941, 154943,
+ 154947, 154951, 154957, 154959, 154963, 154965, 154969, 154973, 154977,
+ 154981, 154983, 154985, 154989, 154993, 154997, 155001, 155003, 155005,
+ 155007, 155013, 155018, 155021, 155029, 155037, 155039, 155044, 155047,
+ 155052, 155063, 155070, 155075, 155080, 155082, 155086, 155088, 155092,
+ 155094, 155098, 155102, 155105, 155108, 155110, 155113, 155115, 155119,
+ 155121, 155123, 155125, 155129, 155131, 155135, 155138, 155145, 155148,
+ 155153, 155156, 155159, 155164, 155168, 155172, 155176, 155178, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 155183, 155188, 155190, 155194,
+ 155196, 155200, 155204, 155210, 155214, 155219, 155222, 155226, 155230,
+ 0, 0, 0, 155234, 155236, 155242, 155246, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 155250, 155255, 155260, 155265, 155270, 155275, 155280, 155287,
+ 155294, 155301, 155308, 155313, 155318, 155323, 155328, 155335, 155341,
+ 155348, 155355, 155362, 155367, 155372, 155377, 155382, 155387, 155394,
+ 155401, 155406, 155411, 155418, 155425, 155433, 155441, 155448, 155455,
+ 155463, 155471, 155479, 155486, 155496, 155507, 155512, 155519, 155526,
+ 155533, 155541, 155549, 155560, 155568, 155576, 155584, 155589, 155594,
+ 155599, 155604, 155609, 155614, 155619, 155624, 155629, 155634, 155639,
+ 155644, 155651, 155656, 155661, 155668, 155673, 155678, 155683, 155688,
+ 155693, 155698, 155703, 155708, 155713, 155718, 155723, 155728, 155735,
+ 155743, 155748, 155753, 155760, 155765, 155770, 155775, 155782, 155787,
+ 155794, 155799, 155806, 155811, 155820, 155829, 155834, 155839, 155844,
+ 155849, 155854, 155859, 155864, 155869, 155874, 155879, 155884, 155889,
+ 155894, 155902, 155910, 155915, 155920, 155925, 155930, 155935, 155941,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 155947, 155955, 155963, 155971,
+ 155979, 155985, 155991, 155995, 155999, 156005, 156011, 156020, 156024,
+ 156029, 156035, 156039, 156044, 156048, 156052, 156058, 156064, 156074,
+ 156083, 156086, 156091, 156097, 156103, 156114, 156124, 156128, 156133,
+ 156139, 156145, 156154, 156159, 156163, 156168, 156172, 156178, 156184,
+ 156190, 156194, 156197, 156201, 156204, 156207, 156212, 156217, 156224,
+ 156232, 156239, 156246, 156255, 156264, 156271, 156279, 156286, 156293,
+ 156302, 156311, 156318, 156326, 156333, 156340, 156349, 156356, 156364,
+ 156370, 156379, 156387, 156396, 156403, 156413, 156424, 156432, 156440,
+ 156449, 156457, 156465, 156474, 156482, 156492, 156501, 156509, 156517,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 110738, 110743, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 156526, 156534,
+ 156542, 156550, 156558, 156567, 156576, 156585, 156594, 156603, 156612,
+ 156621, 0, 0, 0, 0, 156630, 156638, 156646, 156654, 156662, 156669,
+ 156676, 156683, 156690, 156698, 156706, 156714, 156722, 156732, 156742,
+ 156752, 156762, 156771, 156780, 156789, 156798, 156807, 156816, 156825,
+ 156834, 156842, 156850, 156858, 156866, 156874, 156882, 156890, 156898,
+ 156908, 156918, 156928, 156938, 156942, 156946, 156950, 156954, 156957,
+ 156960, 156963, 156966, 156970, 156974, 156978, 156982, 156987, 156992,
+ 156997, 157002, 157005, 157008, 157011, 0, 0, 0, 0, 0, 0, 0, 0, 157014,
+ 157017, 157020, 157023, 157026, 157031, 157036, 157042, 157048, 157052,
+ 0, 0, 0, 0, 0, 0, 157056, 157062, 157068, 157074, 157080, 157088, 157096,
+ 157105, 157114, 157119, 157124, 157129, 157134, 157141, 157148, 157156,
+ 157164, 157171, 157178, 157185, 157192, 157201, 157210, 157220, 157230,
+ 157236, 157242, 157248, 157254, 157262, 157270, 157279, 157288, 157296,
+ 157304, 157312, 157320, 157330, 157340, 157351, 0, 0, 0, 0, 0, 0, 0, 0,
+ 157362, 157367, 157372, 157377, 157382, 157391, 157400, 157409, 157418,
+ 157425, 157432, 157439, 157446, 157453, 157462, 157471, 157480, 157485,
+ 157492, 157499, 157506, 157511, 157516, 157521, 157526, 157533, 157540,
+ 157547, 157554, 157561, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 157570, 157574, 157578, 157583, 157587,
+ 157591, 157596, 157600, 157604, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 110749, 110754, 110759,
- 110764, 110771, 110778, 110785, 110792, 110797, 110802, 110807, 110812,
- 110819, 110824, 110831, 110838, 110843, 110848, 110853, 110860, 110865,
- 110870, 110877, 110884, 110889, 110894, 110899, 110906, 110913, 110920,
- 110925, 110930, 110937, 110944, 110951, 110958, 110963, 110968, 110973,
- 110980, 110985, 110990, 110995, 111002, 111011, 111018, 111023, 111028,
- 111033, 111038, 111043, 111048, 111057, 111064, 111069, 111076, 111083,
- 111088, 111093, 111098, 111105, 111110, 111117, 111124, 111129, 111134,
- 111139, 111146, 111153, 111158, 111163, 111170, 111177, 111184, 111189,
- 111194, 111199, 111204, 111211, 111220, 111229, 111234, 111241, 111250,
- 111255, 111260, 111265, 111270, 111277, 111284, 111291, 111298, 111303,
- 111308, 111313, 111320, 111327, 111334, 111339, 111344, 111351, 111356,
- 111363, 111368, 111375, 111380, 111387, 111394, 111399, 111404, 111409,
- 111414, 111419, 111424, 111429, 111434, 111439, 111446, 111453, 111460,
- 111467, 111474, 111483, 111488, 111493, 111500, 111507, 111512, 111519,
- 111526, 111533, 111540, 111547, 111554, 111559, 111564, 111569, 111574,
- 111579, 111588, 111597, 111606, 111615, 111624, 111633, 111642, 111651,
- 111656, 111667, 111678, 111687, 111692, 111697, 111702, 111707, 111716,
- 111723, 111730, 111737, 111744, 111751, 111758, 111767, 111776, 111787,
- 111796, 111807, 111816, 111823, 111832, 111843, 111852, 111861, 111870,
- 111879, 111886, 111893, 111900, 111909, 111918, 111929, 111938, 111947,
- 111958, 111963, 111968, 111979, 111987, 111996, 112005, 112014, 112025,
- 112034, 112043, 112054, 112065, 112076, 112087, 112098, 112109, 112116,
- 112123, 112130, 112137, 112148, 112157, 112164, 112171, 112178, 112189,
- 112200, 112211, 112222, 112233, 112244, 112255, 112266, 112273, 112280,
- 112289, 112298, 112305, 112312, 112319, 112328, 112337, 112346, 112353,
- 112362, 112371, 112380, 112387, 112394, 112399, 112405, 112412, 112419,
- 112426, 112433, 112440, 112447, 112456, 112465, 112474, 112483, 112490,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 112499, 112505, 112510, 112515, 112522,
- 112528, 112534, 112540, 112546, 112552, 112558, 112564, 112568, 112572,
- 112578, 112584, 112590, 112594, 112599, 112604, 112608, 112612, 112615,
- 112621, 112627, 112633, 112639, 112645, 112651, 112657, 112663, 112669,
- 112679, 112689, 112695, 112701, 112711, 112721, 112727, 0, 0, 112733,
- 112741, 112746, 112751, 112757, 112763, 112769, 112775, 112781, 112787,
- 112794, 112801, 112807, 112813, 112819, 112825, 112831, 112837, 112843,
- 112849, 112854, 112860, 112866, 112872, 112878, 112884, 112893, 112899,
- 112904, 112912, 112919, 112926, 112935, 112944, 112953, 112962, 112971,
- 112980, 112989, 112998, 113008, 113018, 113026, 113034, 113043, 113052,
- 113058, 113064, 113070, 113076, 113084, 113092, 113096, 113102, 113107,
- 113113, 113119, 113125, 113131, 113137, 113146, 113151, 113158, 113163,
- 113168, 113173, 113179, 113185, 113191, 113198, 113203, 113208, 113213,
- 113218, 113223, 113229, 113235, 113241, 113247, 113253, 113259, 113265,
- 113271, 113276, 113281, 113286, 113291, 113296, 113301, 113306, 113311,
- 113317, 113323, 113328, 113333, 113338, 113343, 113348, 113354, 113361,
- 113365, 113369, 113373, 113377, 113381, 113385, 113389, 113393, 113401,
- 113411, 113415, 113419, 113425, 113431, 113437, 113443, 113449, 113455,
- 113461, 113467, 113473, 113479, 113485, 113491, 113497, 113503, 113507,
- 113511, 113518, 113524, 113530, 113536, 113541, 113548, 113553, 113559,
- 113565, 113571, 113577, 113582, 113586, 113592, 113596, 113600, 113604,
- 113610, 113616, 113620, 113626, 113632, 113638, 113644, 113650, 113658,
- 113666, 113672, 113678, 113684, 113690, 113702, 113714, 113728, 113740,
- 113752, 113766, 113780, 113794, 113798, 113806, 113814, 113819, 113823,
- 113827, 113831, 113835, 113839, 113843, 113847, 113853, 113859, 113865,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 113871, 113877, 113883, 113889, 113895,
- 113901, 113907, 113913, 113919, 113925, 113931, 113937, 113943, 113949,
- 113955, 113961, 113967, 113973, 113979, 113985, 113991, 113997, 114003,
- 114009, 114015, 114021, 114027, 114033, 114039, 114045, 114051, 114057,
- 114063, 114069, 114075, 114081, 114087, 114093, 114099, 114105, 114111,
- 114117, 114123, 114129, 114135, 114141, 114147, 114153, 114159, 114165,
- 114171, 114177, 114183, 114189, 114195, 114201, 114207, 114213, 114219,
- 114225, 114231, 114237, 114243, 114249, 114255, 114261, 114267, 114272,
- 114277, 114282, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 114286, 114291, 114298,
- 114305, 114312, 114319, 114324, 114328, 114334, 114338, 114342, 114348,
- 114352, 114356, 114360, 114366, 114373, 114377, 114381, 114385, 114389,
- 114393, 114397, 114403, 114407, 114411, 114415, 114419, 114423, 114427,
- 114431, 114435, 114439, 114443, 114447, 114451, 114456, 114460, 114464,
- 114468, 114472, 114476, 114480, 114484, 114488, 114492, 114499, 114503,
- 114511, 114515, 114519, 114523, 114527, 114531, 114535, 114539, 114546,
- 114550, 114554, 114558, 114562, 114566, 114572, 114576, 114582, 114586,
- 114590, 114594, 114598, 114602, 114606, 114610, 114614, 114618, 114622,
- 114626, 114630, 114634, 114638, 114642, 114646, 114650, 114654, 114658,
- 114666, 114670, 114674, 0, 0, 0, 0, 0, 0, 0, 0, 0, 114678, 114686,
- 114694, 114702, 114710, 114718, 114726, 114734, 114742, 114750, 114758,
- 114766, 114774, 114782, 114790, 114798, 114806, 114814, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 114822, 114826, 114831, 114836, 114841, 114845,
- 114850, 114855, 114860, 114864, 114869, 114874, 114878, 114882, 114887,
- 114891, 114896, 114901, 114905, 114910, 114915, 114919, 114924, 114929,
- 114934, 114939, 114944, 114948, 114953, 114958, 114963, 114967, 114972,
- 114977, 114982, 114986, 114991, 114996, 115000, 115004, 115009, 115013,
- 115018, 115023, 115027, 115032, 115037, 115041, 115046, 115051, 115056,
- 115061, 115066, 115070, 115075, 115080, 115085, 115089, 115094, 115099,
- 115104, 115108, 115113, 115118, 115122, 115126, 115131, 115135, 115140,
- 115145, 115149, 115154, 115159, 115163, 115168, 115173, 115178, 115183,
- 115188, 115192, 115197, 115202, 115207, 115211, 115216, 0, 115221,
- 115225, 115230, 115235, 115239, 115243, 115248, 115252, 115257, 115262,
- 115266, 115271, 115276, 115280, 115285, 115290, 115295, 115300, 115305,
- 115310, 115316, 115322, 115328, 115333, 115339, 115345, 115351, 115356,
- 115362, 115368, 115373, 115378, 115384, 115389, 115395, 115401, 115406,
- 115412, 115418, 115423, 115429, 115435, 115441, 115447, 115453, 115458,
- 115464, 115470, 115476, 115481, 115487, 115493, 115499, 115504, 115510,
- 115516, 115521, 115526, 115532, 115537, 115543, 115549, 115554, 115560,
- 115566, 115571, 115577, 115583, 115589, 115595, 115601, 0, 115605,
- 115610, 0, 0, 115615, 0, 0, 115620, 115625, 0, 0, 115630, 115635, 115639,
- 115644, 0, 115649, 115654, 115659, 115663, 115668, 115673, 115678,
- 115683, 115688, 115692, 115697, 115702, 0, 115707, 0, 115712, 115717,
- 115721, 115726, 115731, 115735, 115739, 0, 115744, 115749, 115754,
- 115758, 115763, 115768, 115772, 115777, 115782, 115787, 115792, 115797,
- 115802, 115808, 115814, 115820, 115825, 115831, 115837, 115843, 115848,
- 115854, 115860, 115865, 115870, 115876, 115881, 115887, 115893, 115898,
- 115904, 115910, 115915, 115921, 115927, 115933, 115939, 115945, 115950,
- 115956, 115962, 115968, 115973, 115979, 115985, 115991, 115996, 116002,
- 116008, 116013, 116018, 116024, 116029, 116035, 116041, 116046, 116052,
- 116058, 116063, 116069, 116075, 116081, 116087, 116093, 116097, 0,
- 116102, 116107, 116111, 116116, 0, 0, 116121, 116126, 116131, 116135,
- 116139, 116144, 116148, 116153, 0, 116158, 116163, 116168, 116172,
- 116177, 116182, 116187, 0, 116192, 116196, 116201, 116206, 116211,
- 116215, 116220, 116225, 116230, 116234, 116239, 116244, 116248, 116252,
- 116257, 116261, 116266, 116271, 116275, 116280, 116285, 116289, 116294,
- 116299, 116304, 116309, 116314, 116318, 0, 116323, 116328, 116332,
- 116337, 0, 116342, 116346, 116351, 116356, 116360, 0, 116364, 0, 0, 0,
- 116368, 116373, 116378, 116382, 116387, 116392, 116397, 0, 116402,
- 116406, 116411, 116416, 116421, 116425, 116430, 116435, 116440, 116444,
- 116449, 116454, 116458, 116462, 116467, 116471, 116476, 116481, 116485,
- 116490, 116495, 116499, 116504, 116509, 116514, 116519, 116524, 116529,
- 116535, 116541, 116547, 116552, 116558, 116564, 116570, 116575, 116581,
- 116587, 116592, 116597, 116603, 116608, 116614, 116620, 116625, 116631,
- 116637, 116642, 116648, 116654, 116660, 116666, 116672, 116677, 116683,
- 116689, 116695, 116700, 116706, 116712, 116718, 116723, 116729, 116735,
- 116740, 116745, 116751, 116756, 116762, 116768, 116773, 116779, 116785,
- 116790, 116796, 116802, 116808, 116814, 116820, 116824, 116829, 116834,
- 116839, 116843, 116848, 116853, 116858, 116862, 116867, 116872, 116876,
- 116880, 116885, 116889, 116894, 116899, 116903, 116908, 116913, 116917,
- 116922, 116927, 116932, 116937, 116942, 116946, 116951, 116956, 116961,
- 116965, 116970, 116975, 116980, 116984, 116989, 116994, 116998, 117002,
- 117007, 117011, 117016, 117021, 117025, 117030, 117035, 117039, 117044,
- 117049, 117054, 117059, 117064, 117069, 117075, 117081, 117087, 117092,
- 117098, 117104, 117110, 117115, 117121, 117127, 117132, 117137, 117143,
- 117148, 117154, 117160, 117165, 117171, 117177, 117182, 117188, 117194,
- 117200, 117206, 117212, 117217, 117223, 117229, 117235, 117240, 117246,
- 117252, 117258, 117263, 117269, 117275, 117280, 117285, 117291, 117296,
- 117302, 117308, 117313, 117319, 117325, 117330, 117336, 117342, 117348,
- 117354, 117360, 117365, 117371, 117377, 117383, 117388, 117394, 117400,
- 117406, 117411, 117417, 117423, 117428, 117433, 117439, 117444, 117450,
- 117456, 117461, 117467, 117473, 117478, 117484, 117490, 117496, 117502,
- 117508, 117513, 117519, 117525, 117531, 117536, 117542, 117548, 117554,
- 117559, 117565, 117571, 117576, 117581, 117587, 117592, 117598, 117604,
- 117609, 117615, 117621, 117626, 117632, 117638, 117644, 117650, 117656,
- 117662, 117669, 117676, 117683, 117689, 117696, 117703, 117710, 117716,
- 117723, 117730, 117736, 117742, 117749, 117755, 117762, 117769, 117775,
- 117782, 117789, 117795, 117802, 117809, 117816, 117823, 117830, 117836,
- 117843, 117850, 117857, 117863, 117870, 117877, 117884, 117890, 117897,
- 117904, 117910, 117916, 117923, 117929, 117936, 117943, 117949, 117956,
- 117963, 117969, 117976, 117983, 117990, 117997, 118004, 118009, 118015,
- 118021, 118027, 118032, 118038, 118044, 118050, 118055, 118061, 118067,
- 118072, 118077, 118083, 118088, 118094, 118100, 118105, 118111, 118117,
- 118122, 118128, 118134, 118140, 118146, 118152, 118157, 118163, 118169,
- 118175, 118180, 118186, 118192, 118198, 118203, 118209, 118215, 118220,
- 118225, 118231, 118236, 118242, 118248, 118253, 118259, 118265, 118270,
- 118276, 118282, 118288, 118294, 118300, 118306, 0, 0, 118313, 118318,
- 118323, 118328, 118333, 118338, 118343, 118348, 118353, 118358, 118363,
- 118368, 118373, 118378, 118383, 118388, 118393, 118398, 118404, 118409,
- 118414, 118419, 118424, 118429, 118434, 118439, 118443, 118448, 118453,
- 118458, 118463, 118468, 118473, 118478, 118483, 118488, 118493, 118498,
- 118503, 118508, 118513, 118518, 118523, 118528, 118534, 118539, 118544,
- 118549, 118554, 118559, 118564, 118569, 118575, 118580, 118585, 118590,
- 118595, 118600, 118605, 118610, 118615, 118620, 118625, 118630, 118635,
- 118640, 118645, 118650, 118655, 118660, 118665, 118670, 118675, 118680,
- 118685, 118690, 118696, 118701, 118706, 118711, 118716, 118721, 118726,
- 118731, 118735, 118740, 118745, 118750, 118755, 118760, 118765, 118770,
- 118775, 118780, 118785, 118790, 118795, 118800, 118805, 118810, 118815,
- 118820, 118826, 118831, 118836, 118841, 118846, 118851, 118856, 118861,
- 118867, 118872, 118877, 118882, 118887, 118892, 118897, 118903, 118909,
- 118915, 118921, 118927, 118933, 118939, 118945, 118951, 118957, 118963,
- 118969, 118975, 118981, 118987, 118993, 118999, 119006, 119012, 119018,
- 119024, 119030, 119036, 119042, 119048, 119053, 119059, 119065, 119071,
- 119077, 119083, 119089, 119095, 119101, 119107, 119113, 119119, 119125,
- 119131, 119137, 119143, 119149, 119155, 119162, 119168, 119174, 119180,
- 119186, 119192, 119198, 119204, 119211, 119217, 119223, 119229, 119235,
- 119241, 119247, 119253, 119259, 119265, 119271, 119277, 119283, 119289,
- 119295, 119301, 119307, 119313, 119319, 119325, 119331, 119337, 119343,
- 119349, 119356, 119362, 119368, 119374, 119380, 119386, 119392, 119398,
- 119403, 119409, 119415, 119421, 119427, 119433, 119439, 119445, 119451,
- 119457, 119463, 119469, 119475, 119481, 119487, 119493, 119499, 119505,
- 119512, 119518, 119524, 119530, 119536, 119542, 119548, 119554, 119561,
- 119567, 119573, 119579, 119585, 119591, 119597, 119604, 119611, 119618,
- 119625, 119632, 119639, 119646, 119653, 119660, 119667, 119674, 119681,
- 119688, 119695, 119702, 119709, 119716, 119724, 119731, 119738, 119745,
- 119752, 119759, 119766, 119773, 119779, 119786, 119793, 119800, 119807,
- 119814, 119821, 119828, 119835, 119842, 119849, 119856, 119863, 119870,
- 119877, 119884, 119891, 119898, 119906, 119913, 119920, 119927, 119934,
- 119941, 119948, 119955, 119963, 119970, 119977, 119984, 119991, 119998,
- 120005, 120010, 0, 0, 120015, 120020, 120024, 120028, 120032, 120036,
- 120040, 120044, 120048, 120052, 120056, 120061, 120065, 120069, 120073,
- 120077, 120081, 120085, 120089, 120093, 120097, 120102, 120106, 120110,
- 120114, 120118, 120122, 120126, 120130, 120134, 120138, 120144, 120149,
- 120154, 120159, 120164, 120169, 120174, 120179, 120184, 120189, 120195,
- 120200, 120205, 120210, 120215, 120220, 120225, 120230, 120235, 120240,
- 120244, 120248, 120252, 0, 120256, 120260, 120264, 120268, 120272,
- 120276, 120280, 120284, 120288, 120292, 120296, 120300, 120304, 120308,
- 120312, 120316, 120320, 120324, 120328, 120332, 120336, 120340, 120344,
- 120348, 120354, 120360, 120366, 0, 120372, 120377, 0, 120382, 0, 0,
- 120387, 0, 120392, 120397, 120402, 120407, 120412, 120417, 120422,
- 120427, 120432, 120437, 0, 120442, 120447, 120452, 120457, 0, 120462, 0,
- 120467, 0, 0, 0, 0, 0, 0, 120472, 0, 0, 0, 0, 120478, 0, 120484, 0,
- 120490, 0, 120496, 120502, 120508, 0, 120514, 120520, 0, 120526, 0, 0,
- 120532, 0, 120538, 0, 120544, 0, 120550, 0, 120558, 0, 120566, 120572, 0,
- 120578, 0, 0, 120584, 120590, 120596, 120602, 0, 120608, 120614, 120620,
- 120626, 120632, 120638, 120644, 0, 120650, 120656, 120662, 120668, 0,
- 120674, 120680, 120686, 120692, 0, 120700, 0, 120708, 120714, 120720,
- 120726, 120732, 120738, 120744, 120750, 120756, 120762, 0, 120768,
- 120774, 120780, 120786, 120792, 120798, 120804, 120810, 120816, 120822,
- 120828, 120834, 120840, 120846, 120852, 120858, 120864, 0, 0, 0, 0, 0,
- 120870, 120875, 120880, 0, 120885, 120890, 120895, 120900, 120905, 0,
- 120910, 120915, 120920, 120925, 120930, 120935, 120940, 120945, 120950,
- 120955, 120960, 120965, 120970, 120975, 120980, 120985, 120990, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 157610, 157612,
+ 157616, 157618, 157620, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 157624, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 120995, 121005, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121013,
- 121020, 121027, 121034, 121041, 121048, 121055, 121061, 121068, 121075,
- 121082, 121090, 121098, 121106, 121114, 121122, 121130, 121137, 121144,
- 121151, 121159, 121167, 121175, 121183, 121191, 121199, 121206, 121213,
- 121220, 121228, 121236, 121244, 121252, 121260, 121268, 121273, 121278,
- 121283, 121288, 121293, 121298, 121303, 121308, 121313, 0, 0, 0, 0,
- 121318, 121323, 121327, 121331, 121335, 121339, 121343, 121347, 121351,
- 121355, 121359, 121363, 121367, 121371, 121375, 121379, 121383, 121387,
- 121391, 121395, 121399, 121403, 121407, 121411, 121415, 121419, 121423,
- 121427, 121431, 121435, 121439, 121443, 121447, 121451, 121455, 121459,
- 121463, 121467, 121471, 121475, 121479, 121483, 121487, 121491, 121495,
- 121499, 121503, 121507, 121511, 121515, 121519, 121524, 121528, 121532,
- 121536, 121540, 121544, 121548, 121552, 121556, 121560, 121564, 121568,
- 121572, 121576, 121580, 121584, 121588, 121592, 121596, 121600, 121604,
- 121608, 121612, 121616, 121620, 121624, 121628, 121632, 121636, 121640,
- 121644, 121648, 121652, 121656, 121660, 121664, 121668, 121672, 121676,
- 121680, 121684, 121688, 121692, 121696, 121700, 121704, 121708, 121712,
- 121716, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 121720, 121726, 121735,
- 121743, 121751, 121760, 121769, 121778, 121787, 121796, 121805, 121814,
- 121823, 121832, 121841, 0, 0, 121850, 121859, 121867, 121875, 121884,
- 121893, 121902, 121911, 121920, 121929, 121938, 121947, 121956, 121965,
- 0, 0, 121974, 121983, 121991, 121999, 122008, 122017, 122026, 122035,
- 122044, 122053, 122062, 122071, 122080, 122089, 122098, 0, 122105,
- 122114, 122122, 122130, 122139, 122148, 122157, 122166, 122175, 122184,
- 122193, 122202, 122211, 122220, 122229, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122236,
- 122243, 122248, 122252, 122256, 122260, 122265, 122270, 122275, 122280,
- 122285, 0, 0, 0, 0, 0, 122290, 122295, 122301, 122307, 122313, 122318,
- 122324, 122330, 122336, 122341, 122347, 122353, 122358, 122363, 122369,
- 122374, 122380, 122386, 122391, 122397, 122403, 122408, 122414, 122420,
- 122426, 122432, 122438, 122449, 122456, 122462, 122465, 0, 122468,
- 122473, 122479, 122485, 122491, 122496, 122502, 122508, 122514, 122519,
- 122525, 122531, 122536, 122541, 122547, 122552, 122558, 122564, 122569,
- 122575, 122581, 122586, 122592, 122598, 122604, 122610, 122616, 122619,
- 122622, 122625, 122628, 122631, 122634, 122640, 122647, 122654, 122661,
- 122667, 122674, 122681, 122688, 122694, 122701, 122708, 122714, 122720,
- 122727, 122733, 122740, 122747, 122753, 122760, 122767, 122773, 122780,
- 122787, 122794, 122801, 122808, 122813, 0, 0, 0, 0, 122818, 122824,
- 122831, 122838, 122845, 122851, 122858, 122865, 122872, 122878, 122885,
- 122892, 122898, 122904, 122911, 122917, 122924, 122931, 122937, 122944,
- 122951, 122957, 122964, 122971, 122978, 122985, 122992, 123001, 123005,
- 123008, 123011, 123015, 123019, 123022, 123025, 123028, 123031, 123034,
- 123037, 123040, 123043, 123046, 123052, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 157628, 157632, 157636, 157640,
+ 157644, 157648, 157652, 157656, 157660, 157664, 157668, 157672, 157676,
+ 157680, 157684, 157688, 157692, 157696, 157700, 157704, 157708, 157712,
+ 157716, 157720, 157724, 157728, 157732, 157736, 157740, 157744, 157748,
+ 157752, 157756, 157760, 157764, 157768, 157772, 157776, 157780, 157784,
+ 157788, 157792, 157796, 157800, 157804, 157808, 157812, 157816, 157820,
+ 157824, 157828, 157832, 157836, 157840, 157844, 157848, 157852, 157856,
+ 157860, 157864, 157868, 157872, 157876, 157880, 157884, 157888, 157892,
+ 157896, 157900, 157904, 157908, 157912, 157916, 157920, 157924, 157928,
+ 157932, 157936, 157940, 157944, 157948, 157952, 157956, 157960, 157964,
+ 157968, 157972, 157976, 157980, 157984, 157988, 157992, 157996, 158000,
+ 158004, 158008, 158012, 158016, 158020, 158024, 158028, 158032, 158036,
+ 158040, 158044, 158048, 158052, 158056, 158060, 158064, 158068, 158072,
+ 158076, 158080, 158084, 158088, 158092, 158096, 158100, 158104, 158108,
+ 158112, 158116, 158120, 158124, 158128, 158132, 158136, 158140, 158144,
+ 158148, 158152, 158156, 158160, 158164, 158168, 158172, 158176, 158180,
+ 158184, 158188, 158192, 158196, 158200, 158204, 158208, 158212, 158216,
+ 158220, 158224, 158228, 158232, 158236, 158240, 158244, 158248, 158252,
+ 158256, 158260, 158264, 158268, 158272, 158276, 158280, 158284, 158288,
+ 158292, 158296, 158300, 158304, 158308, 158312, 158316, 158320, 158324,
+ 158328, 158332, 158336, 158340, 158344, 158348, 158352, 158356, 158360,
+ 158364, 158368, 158372, 158376, 158380, 158384, 158388, 158392, 158396,
+ 158400, 158404, 158408, 158412, 158416, 158420, 158424, 158428, 158432,
+ 158436, 158440, 158444, 158448, 158452, 158456, 158460, 158464, 158468,
+ 158472, 158476, 158480, 158484, 158488, 158492, 158496, 158500, 158504,
+ 158508, 158512, 158516, 158520, 158524, 158528, 158532, 158536, 158540,
+ 158544, 158548, 158552, 158556, 158560, 158564, 158568, 158572, 158576,
+ 158580, 158584, 158588, 158592, 158596, 158600, 158604, 158608, 158612,
+ 158616, 158620, 158624, 158628, 158632, 158636, 158640, 158644, 158648,
+ 158652, 158656, 158660, 158664, 158668, 158672, 158676, 158680, 158684,
+ 158688, 158692, 158696, 158700, 158704, 158708, 158712, 158716, 158720,
+ 158724, 158728, 158732, 158736, 158740, 158744, 158748, 158752, 158756,
+ 158760, 158764, 158768, 158772, 158776, 158780, 158784, 158788, 158792,
+ 158796, 158800, 158804, 158808, 158812, 158816, 158820, 158824, 158828,
+ 158832, 158836, 158840, 158844, 158848, 158852, 158856, 158860, 158864,
+ 158868, 158872, 158876, 158880, 158884, 158888, 158892, 158896, 158900,
+ 158904, 158908, 158912, 158916, 158920, 158924, 158928, 158932, 158936,
+ 158940, 158944, 158948, 158952, 158956, 158960, 158964, 158968, 158972,
+ 158976, 158980, 158984, 158988, 158992, 158996, 159000, 159004, 159008,
+ 159012, 159016, 159020, 159024, 159028, 159032, 159036, 159040, 159044,
+ 159048, 159052, 159056, 159060, 159064, 159068, 159072, 159076, 159080,
+ 159084, 159088, 159092, 159096, 159100, 159104, 159108, 159112, 159116,
+ 159120, 159124, 159128, 159132, 159136, 159140, 159144, 159148, 159152,
+ 159156, 159160, 159164, 159168, 159172, 159176, 159180, 159184, 159188,
+ 159192, 159196, 159200, 159204, 159208, 159212, 159216, 159220, 159224,
+ 159228, 159232, 159236, 159240, 159244, 159248, 159252, 159256, 159260,
+ 159264, 159268, 159272, 159276, 159280, 159284, 159288, 159292, 159296,
+ 159300, 159304, 159308, 159312, 159316, 159320, 159324, 159328, 159332,
+ 159336, 159340, 159344, 159348, 159352, 159356, 159360, 159364, 159368,
+ 159372, 159376, 159380, 159384, 159388, 159392, 159396, 159400, 159404,
+ 159408, 159412, 159416, 159420, 159424, 159428, 159432, 159436, 159440,
+ 159444, 159448, 159452, 159456, 159460, 159464, 159468, 159472, 159476,
+ 159480, 159484, 159488, 159492, 159496, 159500, 159504, 159508, 159512,
+ 159516, 159520, 159524, 159528, 159532, 159536, 159540, 159544, 159548,
+ 159552, 159556, 159560, 159564, 159568, 159572, 159576, 159580, 159584,
+ 159588, 159592, 159596, 159600, 159604, 159608, 159612, 159616, 159620,
+ 159624, 159628, 159632, 159636, 159640, 159644, 159648, 159652, 159656,
+ 159660, 159664, 159668, 159672, 159676, 159680, 159684, 159688, 159692,
+ 159696, 159700, 159704, 159708, 159712, 159716, 159720, 159724, 159728,
+ 159732, 159736, 159740, 159744, 159748, 159752, 159756, 159760, 159764,
+ 159768, 159772, 159776, 159780, 159784, 159788, 159792, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123055, 123062, 123070,
- 123078, 123086, 123093, 123101, 123109, 123117, 123124, 123132, 123140,
- 123147, 123154, 123162, 123169, 123177, 123185, 123192, 123200, 123208,
- 123215, 123223, 123231, 123239, 123247, 123255, 123259, 123263, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123266, 123272, 123278, 123284, 123288,
- 123294, 123300, 123306, 123312, 123318, 123324, 123330, 123336, 123342,
- 123348, 123354, 123360, 123366, 123372, 123378, 123384, 123390, 123396,
- 123402, 123408, 123414, 123420, 123426, 123432, 123438, 123444, 123450,
- 123456, 123462, 123468, 123474, 123480, 123486, 123492, 123498, 123504,
- 123510, 123516, 0, 0, 0, 0, 0, 123522, 123533, 123544, 123555, 123566,
- 123577, 123588, 123599, 123610, 0, 0, 0, 0, 0, 0, 0, 123621, 123625, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123629,
- 123631, 123633, 123637, 123642, 123647, 123649, 123655, 123660, 123662,
- 123668, 123672, 123674, 123678, 123684, 123690, 123696, 123701, 123705,
- 123712, 123719, 123726, 123731, 123738, 123745, 123752, 123756, 123762,
- 123771, 123780, 123787, 123792, 123796, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 123800, 123802, 123804, 123808, 123812, 123816, 0, 123818,
- 123820, 123824, 123826, 123828, 123830, 123832, 123837, 123842, 123844,
- 123850, 123854, 123858, 123866, 123868, 123870, 123872, 123874, 123876,
- 123878, 123880, 123882, 123884, 123886, 123890, 123894, 123896, 123898,
- 123900, 123902, 123904, 123909, 123915, 123919, 123923, 123927, 123931,
- 123936, 123940, 123942, 123944, 123948, 123954, 123956, 123958, 123960,
- 123964, 123973, 123979, 123983, 123987, 123989, 123991, 123994, 123996,
- 123998, 124000, 124004, 124006, 124010, 124015, 124017, 124022, 124028,
- 124035, 124039, 124043, 124047, 124051, 124057, 0, 0, 0, 124061, 124063,
- 124067, 124071, 124073, 124077, 124081, 124083, 124087, 124089, 124093,
- 124097, 124101, 124105, 124109, 124113, 124117, 124121, 124127, 124131,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 124135, 124139, 124143, 124147,
- 124154, 124156, 124160, 124162, 124164, 124168, 124172, 124176, 124178,
- 124182, 124186, 124190, 124194, 124198, 124200, 124204, 124206, 124212,
- 124215, 124220, 124222, 124224, 124227, 124229, 124231, 124234, 124241,
- 124248, 124255, 124260, 124264, 124266, 124268, 0, 124270, 124272,
- 124276, 124280, 124284, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 124286, 124290, 124295, 124299, 124305, 124311, 124313,
- 124315, 124321, 124323, 124327, 124331, 124333, 124337, 124339, 124343,
- 124347, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 124351, 124353,
- 124355, 124357, 124361, 124363, 124365, 124367, 124369, 124371, 124373,
- 124375, 124377, 124379, 124381, 124383, 124385, 124387, 124389, 124391,
- 124393, 124395, 124397, 124399, 124401, 124403, 124405, 124409, 124411,
- 124413, 124415, 124419, 124421, 124425, 124427, 124429, 124433, 124437,
- 124443, 124445, 124447, 124449, 124451, 124455, 124459, 124461, 124465,
- 124469, 124473, 124477, 124481, 124485, 124489, 124493, 124497, 124501,
- 124505, 124509, 124513, 124517, 124521, 124525, 124529, 0, 124533, 0,
- 124535, 124537, 124539, 124541, 124543, 124551, 124559, 124567, 124575,
- 124580, 124585, 124590, 124594, 124598, 124603, 124607, 124609, 124613,
- 124615, 124617, 124619, 124621, 124623, 124625, 124627, 124631, 124633,
- 124635, 124637, 124641, 124645, 124649, 124653, 124657, 124659, 124665,
- 124671, 124673, 124675, 124677, 124679, 124681, 124690, 124697, 124704,
- 124708, 124715, 124720, 124727, 124736, 124741, 124745, 124749, 124751,
- 124755, 124757, 124761, 124765, 124767, 124771, 124775, 124779, 124781,
- 124783, 124789, 124791, 124793, 124795, 124799, 124803, 124805, 124809,
- 124811, 124813, 124816, 124820, 124822, 124826, 124828, 124830, 124835,
- 124837, 124841, 124845, 124848, 124852, 124856, 124860, 124864, 124868,
- 124872, 124876, 124881, 124885, 124889, 124898, 124903, 124906, 124908,
- 124911, 124914, 124919, 124921, 124924, 124929, 124933, 124936, 124940,
- 124944, 124947, 124952, 124956, 124960, 124964, 124968, 124974, 124980,
- 124986, 124992, 124997, 125008, 125010, 125014, 125016, 125018, 125022,
- 125026, 125028, 125032, 125037, 125042, 125048, 125050, 125054, 125058,
- 125065, 125072, 125076, 125078, 125080, 125084, 125086, 125090, 125094,
- 125098, 125100, 125102, 125109, 125113, 125116, 125120, 125124, 125128,
- 125130, 125134, 125136, 125138, 125142, 125144, 125148, 125152, 125158,
- 125162, 125166, 125170, 125172, 125175, 125179, 125186, 125195, 125204,
- 125212, 125220, 125222, 125226, 125228, 125232, 125243, 125247, 125253,
- 125259, 125264, 0, 125266, 125270, 125272, 125274, 0, 0, 0, 125276,
- 125281, 125291, 125306, 125318, 125330, 125334, 125338, 125344, 125346,
- 125354, 125362, 125364, 125368, 125374, 125380, 125387, 125394, 125396,
- 125398, 125401, 125403, 125409, 125411, 125414, 125418, 125424, 125430,
- 125441, 125447, 125454, 125462, 125466, 125474, 125482, 125488, 125494,
- 125501, 125503, 125507, 125509, 125511, 125516, 125518, 125520, 125522,
- 125524, 125528, 125539, 125545, 125549, 125553, 125557, 125563, 125569,
- 125575, 125581, 125586, 125591, 125597, 125603, 125610, 0, 0, 125617,
- 125622, 125630, 125634, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 125643,
- 125650, 125657, 125664, 125672, 125680, 125688, 125696, 125704, 125712,
- 125720, 125728, 125736, 125742, 125748, 125754, 125760, 125766, 125772,
- 125778, 125784, 125790, 125796, 125802, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 125808, 125812, 125816,
- 125821, 125826, 125828, 125832, 125841, 125849, 125857, 125870, 125883,
- 125896, 125903, 125910, 125914, 125923, 125931, 125935, 125944, 125951,
- 125955, 125959, 125963, 125967, 125974, 125978, 125982, 125986, 125990,
- 125997, 126006, 126015, 126022, 126034, 126046, 126050, 126054, 126058,
- 126062, 126066, 126070, 126078, 126086, 126094, 126098, 126102, 126106,
- 126110, 126114, 126118, 126124, 126130, 126134, 126145, 126153, 126157,
- 126161, 126165, 126169, 126175, 126182, 126193, 126203, 126213, 126224,
- 126233, 126244, 126250, 126256, 0, 0, 0, 0, 126262, 126271, 126278,
- 126284, 126288, 126292, 126296, 126305, 126317, 126321, 126328, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 126335,
- 126337, 126339, 126343, 126347, 126351, 126360, 126362, 126364, 126367,
- 126369, 126371, 126375, 126377, 126381, 126383, 126387, 126389, 126391,
- 126395, 126399, 126405, 126407, 126411, 126413, 126417, 126421, 126425,
- 126429, 126431, 126433, 126437, 126441, 126445, 126449, 126451, 126453,
- 126455, 126460, 126465, 126468, 126476, 126484, 126486, 126491, 126494,
- 126499, 126510, 126517, 126522, 126527, 126529, 126533, 126535, 126539,
- 126541, 126545, 126549, 126552, 126555, 126557, 126560, 126562, 126566,
- 126568, 126570, 126572, 126576, 126578, 126582, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 159796, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 159800, 159803, 159807, 159811,
+ 159814, 159818, 159822, 159825, 159828, 159832, 159836, 159839, 159842,
+ 159845, 159848, 159853, 159856, 159860, 159863, 159866, 159869, 159872,
+ 159875, 159878, 159882, 159885, 159889, 159892, 159895, 159899, 159903,
+ 159907, 159911, 159916, 159921, 159927, 159933, 159939, 159944, 159950,
+ 159956, 159962, 159967, 159973, 159979, 159984, 159990, 159996, 160001,
+ 160007, 160013, 160018, 160023, 160029, 160034, 160040, 160046, 160052,
+ 160058, 160064, 160068, 160073, 160077, 160082, 160086, 160091, 160096,
+ 160102, 160108, 160114, 160119, 160125, 160131, 160137, 160142, 160148,
+ 160154, 160159, 160165, 160171, 160176, 160182, 160188, 160193, 160198,
+ 160204, 160209, 160215, 160221, 160227, 160233, 160239, 160244, 160248,
+ 160253, 160256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 126585, 126590, 126595, 126600, 126605, 126610, 126615, 126622,
- 126629, 126636, 126643, 126648, 126653, 126658, 126663, 126670, 126676,
- 126683, 126690, 126697, 126702, 126707, 126712, 126717, 126722, 126729,
- 126736, 126741, 126746, 126753, 126760, 126768, 126776, 126783, 126790,
- 126798, 126806, 126814, 126821, 126831, 126842, 126847, 126854, 126861,
- 126868, 126876, 126884, 126895, 126903, 126911, 126919, 126924, 126929,
- 126934, 126939, 126944, 126949, 126954, 126959, 126964, 126969, 126974,
- 126979, 126986, 126991, 126996, 127003, 127008, 127013, 127018, 127023,
- 127028, 127033, 127038, 127043, 127048, 127053, 127058, 127063, 127070,
- 127078, 127083, 127088, 127095, 127100, 127105, 127110, 127117, 127122,
- 127129, 127134, 127141, 127146, 127155, 127164, 127169, 127174, 127179,
- 127184, 127189, 127194, 127199, 127204, 127209, 127214, 127219, 127224,
- 127229, 127237, 127245, 127250, 127255, 127260, 127265, 127270, 127276,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127282, 127286, 127290, 127294,
- 127298, 127302, 127306, 127310, 127314, 127318, 127322, 127326, 127330,
- 127334, 127338, 127342, 127346, 127350, 127354, 127358, 127362, 127366,
- 127370, 127374, 127378, 127382, 127386, 127390, 127394, 127398, 127402,
- 127406, 127410, 127414, 127418, 127422, 127426, 127430, 127434, 127438,
- 127442, 127446, 127450, 127454, 127458, 127462, 127466, 127470, 127474,
- 127478, 127482, 127486, 127490, 127494, 127498, 127502, 127506, 127510,
- 127514, 127518, 127522, 127526, 127530, 127534, 127538, 127542, 127546,
- 127550, 127554, 127558, 127562, 127566, 127570, 127574, 127578, 127582,
- 127586, 127590, 127594, 127598, 127602, 127606, 127610, 127614, 127618,
- 127622, 127626, 127630, 127634, 127638, 127642, 127646, 127650, 127654,
- 127658, 127662, 127666, 127670, 127674, 127678, 127682, 127686, 127690,
- 127694, 127698, 127702, 127706, 127710, 127714, 127718, 127722, 127726,
- 127730, 127734, 127738, 127742, 127746, 127750, 127754, 127758, 127762,
- 127766, 127770, 127774, 127778, 127782, 127786, 127790, 127794, 127798,
- 127802, 127806, 127810, 127814, 127818, 127822, 127826, 127830, 127834,
- 127838, 127842, 127846, 127850, 127854, 127858, 127862, 127866, 127870,
- 127874, 127878, 127882, 127886, 127890, 127894, 127898, 127902, 127906,
- 127910, 127914, 127918, 127922, 127926, 127930, 127934, 127938, 127942,
- 127946, 127950, 127954, 127958, 127962, 127966, 127970, 127974, 127978,
- 127982, 127986, 127990, 127994, 127998, 128002, 128006, 128010, 128014,
- 128018, 128022, 128026, 128030, 128034, 128038, 128042, 128046, 128050,
- 128054, 128058, 128062, 128066, 128070, 128074, 128078, 128082, 128086,
- 128090, 128094, 128098, 128102, 128106, 128110, 128114, 128118, 128122,
- 128126, 128130, 128134, 128138, 128142, 128146, 128150, 128154, 128158,
- 128162, 128166, 128170, 128174, 128178, 128182, 128186, 128190, 128194,
- 128198, 128202, 128206, 128210, 128214, 128218, 128222, 128226, 128230,
- 128234, 128238, 128242, 128246, 128250, 128254, 128258, 128262, 128266,
- 128270, 128274, 128278, 128282, 128286, 128290, 128294, 128298, 128302,
- 128306, 128310, 128314, 128318, 128322, 128326, 128330, 128334, 128338,
- 128342, 128346, 128350, 128354, 128358, 128362, 128366, 128370, 128374,
- 128378, 128382, 128386, 128390, 128394, 128398, 128402, 128406, 128410,
- 128414, 128418, 128422, 128426, 128430, 128434, 128438, 128442, 128446,
- 128450, 128454, 128458, 128462, 128466, 128470, 128474, 128478, 128482,
- 128486, 128490, 128494, 128498, 128502, 128506, 128510, 128514, 128518,
- 128522, 128526, 128530, 128534, 128538, 128542, 128546, 128550, 128554,
- 128558, 128562, 128566, 128570, 128574, 128578, 128582, 128586, 128590,
- 128594, 128598, 128602, 128606, 128610, 128614, 128618, 128622, 128626,
- 128630, 128634, 128638, 128642, 128646, 128650, 128654, 128658, 128662,
- 128666, 128670, 128674, 128678, 128682, 128686, 128690, 128694, 128698,
- 128702, 128706, 128710, 128714, 128718, 128722, 128726, 128730, 128734,
- 128738, 128742, 128746, 128750, 128754, 128758, 128762, 128766, 128770,
- 128774, 128778, 128782, 128786, 128790, 128794, 128798, 128802, 128806,
- 128810, 128814, 128818, 128822, 128826, 128830, 128834, 128838, 128842,
- 128846, 128850, 128854, 128858, 128862, 128866, 128870, 128874, 128878,
- 128882, 128886, 128890, 128894, 128898, 128902, 128906, 128910, 128914,
- 128918, 128922, 128926, 128930, 128934, 128938, 128942, 128946, 128950,
- 128954, 128958, 128962, 128966, 128970, 128974, 128978, 128982, 128986,
- 128990, 128994, 128998, 129002, 129006, 129010, 129014, 129018, 129022,
- 129026, 129030, 129034, 129038, 129042, 129046, 129050, 129054, 129058,
- 129062, 129066, 129070, 129074, 129078, 129082, 129086, 129090, 129094,
- 129098, 129102, 129106, 129110, 129114, 129118, 129122, 129126, 129130,
- 129134, 129138, 129142, 129146, 129150, 129154, 129158, 129162, 129166,
- 129170, 129174, 129178, 129182, 129186, 129190, 129194, 129198, 129202,
- 129206, 129210, 129214, 129218, 129222, 129226, 129230, 129234, 129238,
- 129242, 129246, 129250, 129254, 129258, 129262, 129266, 129270, 129274,
- 129278, 129282, 129286, 129290, 129294, 129298, 129302, 129306, 129310,
- 129314, 129318, 129322, 129326, 129330, 129334, 129338, 129342, 129346,
- 129350, 129354, 129358, 129362, 129366, 129370, 129374, 129378, 129382,
- 129386, 129390, 129394, 129398, 129402, 129406, 129410, 129414, 129418,
- 129422, 129426, 129430, 129434, 129438, 129442, 129446, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 129450, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 160260, 160263, 160266, 160269,
+ 160272, 160275, 160278, 160281, 160284, 160287, 160290, 160293, 160296,
+ 160299, 160302, 160305, 160308, 160311, 160314, 160317, 160320, 160323,
+ 160326, 160329, 160332, 160335, 160338, 160341, 160344, 160347, 160350,
+ 160353, 160356, 160359, 160362, 160365, 160368, 160371, 160374, 160377,
+ 160380, 160383, 160386, 160389, 160392, 160395, 160398, 160401, 160404,
+ 160407, 160410, 160413, 160416, 160419, 160422, 160425, 160428, 160431,
+ 160434, 160437, 160440, 160443, 160446, 160449, 160452, 160455, 160458,
+ 160461, 160464, 160467, 160470, 160473, 160476, 160479, 160482, 160485,
+ 160488, 160491, 160494, 160497, 160500, 160503, 160506, 160509, 160512,
+ 160515, 160518, 160521, 160524, 160527, 160530, 160533, 160536, 160539,
+ 160542, 160545, 160548, 160551, 160554, 160557, 160560, 160563, 160566,
+ 160569, 160572, 160575, 160578, 160581, 160584, 160587, 160590, 160593,
+ 160596, 160599, 160602, 160605, 160608, 160611, 160614, 160617, 160620,
+ 160623, 160626, 160629, 160632, 160635, 160638, 160641, 160644, 160647,
+ 160650, 160653, 160656, 160659, 160662, 160665, 160668, 160671, 160674,
+ 160677, 160680, 160683, 160686, 160689, 160692, 160695, 160698, 160701,
+ 160704, 160707, 160710, 160713, 160716, 160719, 160722, 160725, 160728,
+ 160731, 160734, 160737, 160740, 160743, 160746, 160749, 160752, 160755,
+ 160758, 160761, 160764, 160767, 160770, 160773, 160776, 160779, 160782,
+ 160785, 160788, 160791, 160794, 160797, 160800, 160803, 160806, 160809,
+ 160812, 160815, 160818, 160821, 160824, 160827, 160830, 160833, 160836,
+ 160839, 160842, 160845, 160848, 160851, 160854, 160857, 160860, 160863,
+ 160866, 160869, 160872, 160875, 160878, 160881, 160884, 160887, 160890,
+ 160893, 160896, 160899, 160902, 160905, 160908, 160911, 160914, 160917,
+ 160920, 160923, 160926, 160929, 160932, 160935, 160938, 160941, 160944,
+ 160947, 160950, 160953, 160956, 160959, 160962, 160965, 160968, 160971,
+ 160974, 160977, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 160980,
+ 160982, 160984, 160989, 160991, 160996, 160998, 161003, 161005, 161010,
+ 161012, 161014, 161016, 161018, 161020, 161022, 161024, 161026, 161028,
+ 161031, 161035, 161037, 161039, 161043, 161047, 161052, 161054, 161056,
+ 161058, 161062, 161065, 161067, 161071, 161073, 161077, 161079, 161083,
+ 161086, 161088, 161092, 161096, 161098, 161104, 161106, 161111, 161113,
+ 161118, 161120, 161125, 161127, 161132, 161134, 161137, 161139, 161143,
+ 161145, 161152, 161154, 161156, 161158, 161163, 161165, 161167, 161169,
+ 161171, 161173, 161178, 161182, 161184, 161189, 161193, 161195, 161200,
+ 161204, 161206, 161211, 161215, 161217, 161219, 161221, 161223, 161227,
+ 161229, 161234, 161236, 161242, 161244, 161250, 161252, 161254, 161256,
+ 161260, 161262, 161269, 161271, 161278, 161280, 161285, 161291, 161293,
+ 161299, 161306, 161308, 161314, 161319, 161321, 161327, 161333, 161335,
+ 161341, 161347, 161349, 161355, 161359, 161361, 161366, 161368, 161370,
+ 161375, 161377, 161379, 161385, 161387, 161392, 161396, 161398, 161403,
+ 161407, 161409, 161415, 161417, 161421, 161423, 161427, 161429, 161436,
+ 161443, 161445, 161452, 161459, 161461, 161466, 161468, 161475, 161477,
+ 161482, 161484, 161490, 161492, 161496, 161498, 161504, 161506, 161510,
+ 161512, 161518, 161520, 161522, 161524, 161529, 161534, 161536, 161538,
+ 161548, 161552, 161559, 161566, 161571, 161576, 161588, 161590, 161592,
+ 161594, 161596, 161598, 161600, 161602, 161604, 161606, 161608, 161610,
+ 161612, 161614, 161616, 161618, 161620, 161622, 161624, 161626, 161628,
+ 161630, 161636, 161643, 161648, 161656, 161664, 161669, 161680, 161682,
+ 161684, 161686, 161688, 161690, 161692, 161694, 161696, 161698, 161700,
+ 161702, 161704, 161706, 161708, 161710, 161712, 161717, 161719, 161721,
+ 161727, 161739, 161750, 161752, 161754, 161756, 161758, 161760, 161762,
+ 161764, 161766, 161768, 161770, 161772, 161774, 161776, 161778, 161780,
+ 161782, 161784, 161786, 161788, 161790, 161792, 161794, 161796, 161798,
+ 161800, 161802, 161804, 161806, 161808, 161810, 161812, 161814, 161816,
+ 161818, 161820, 161822, 161824, 161826, 161828, 161830, 161832, 161834,
+ 161836, 161838, 161840, 161842, 161844, 161846, 161848, 161850, 161852,
+ 161854, 161856, 161858, 161860, 161862, 161864, 161866, 161868, 161870,
+ 161872, 161874, 161876, 161878, 161880, 161882, 161884, 161886, 161888,
+ 161890, 161892, 161894, 161896, 161898, 161900, 161902, 161904, 161906,
+ 161908, 161910, 161912, 161914, 161916, 161918, 161920, 161922, 161924,
+ 161926, 161928, 161930, 161932, 161934, 161936, 161938, 161940, 161942,
+ 161944, 161946, 161948, 161950, 161952, 161954, 161956, 161958, 161960,
+ 161962, 161964, 161966, 161968, 161970, 161972, 161974, 161976, 161978,
+ 161980, 161982, 161984, 161986, 161988, 161990, 161992, 161994, 161996,
+ 161998, 162000, 162002, 162004, 162006, 162008, 162010, 162012, 162014,
+ 162016, 162018, 162020, 162022, 162024, 162026, 162028, 162030, 162032,
+ 162034, 162036, 162038, 162040, 162042, 162044, 162046, 162048, 162050,
+ 162052, 162054, 162056, 162058, 162060, 162062, 162064, 162066, 162068,
+ 162070, 162072, 162074, 162076, 162078, 162080, 162082, 162084, 162086,
+ 162088, 162090, 162092, 162094, 162096, 162098, 162100, 162102, 162104,
+ 162106, 162108, 162110, 162112, 162114, 162116, 162118, 162120, 162122,
+ 162124, 162126, 162128, 162130, 162132, 162134, 162136, 162138, 162140,
+ 162142, 162144, 162146, 162148, 162150, 162152, 162154, 162156, 162158,
+ 162160, 162162, 162164, 162166, 162168, 162170, 162172, 162174, 162176,
+ 162178, 162180, 162182, 162184, 162186, 162188, 162190, 162192, 162194,
+ 162196, 162198, 162200, 162202, 162204, 162206, 162208, 162210, 162212,
+ 162214, 162216, 162218, 162220, 162222, 162224, 162226, 162228, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 129454, 129457, 129461, 129465, 129468, 129472, 129476,
- 129479, 129482, 129486, 129490, 129493, 129496, 129499, 129502, 129507,
- 129510, 129514, 129517, 129520, 129523, 129526, 129529, 129532, 129535,
- 129538, 129541, 129544, 129547, 129551, 129555, 129559, 129563, 129568,
- 129573, 129579, 129585, 129591, 129596, 129602, 129608, 129614, 129619,
- 129625, 129631, 129636, 129641, 129647, 129652, 129658, 129664, 129669,
- 129675, 129681, 129686, 129692, 129698, 129704, 129710, 129716, 129720,
- 129725, 129729, 129734, 129738, 129743, 129748, 129754, 129760, 129766,
- 129771, 129777, 129783, 129789, 129794, 129800, 129806, 129811, 129816,
- 129822, 129827, 129833, 129839, 129844, 129850, 129856, 129861, 129867,
- 129873, 129879, 129885, 129891, 129896, 129900, 129905, 129907, 129911,
- 129914, 129917, 129920, 129923, 129926, 129929, 129932, 129935, 129938,
- 129941, 129944, 129947, 129950, 129953, 129956, 129959, 129962, 129965,
- 129968, 129971, 129974, 129977, 129980, 129983, 129986, 129989, 129992,
- 129995, 129998, 130001, 130004, 130007, 130010, 130013, 130016, 130019,
- 130022, 130025, 130028, 130031, 130034, 130037, 130040, 130043, 130046,
- 130049, 130052, 130055, 130058, 130061, 130064, 130067, 130070, 130073,
- 130076, 130079, 130082, 130085, 130088, 130091, 130094, 130097, 130100,
- 130103, 130106, 130109, 130112, 130115, 130118, 130121, 130124, 130127,
- 130130, 130133, 130136, 130139, 130142, 130145, 130148, 130151, 130154,
- 130157, 130160, 130163, 130166, 130169, 130172, 130175, 130178, 130181,
- 130184, 130187, 130190, 130193, 130196, 130199, 130202, 130205, 130208,
- 130211, 130214, 130217, 130220, 130223, 130226, 130229, 130232, 130235,
- 130238, 130241, 130244, 130247, 130250, 130253, 130256, 130259, 130262,
- 130265, 130268, 130271, 130274, 130277, 130280, 130283, 130286, 130289,
- 130292, 130295, 130298, 130301, 130304, 130307, 130310, 130313, 130316,
- 130319, 130322, 130325, 130328, 130331, 130334, 130337, 130340, 130343,
- 130346, 130349, 130352, 130355, 130358, 130361, 130364, 130367, 130370,
- 130373, 130376, 130379, 130382, 130385, 130388, 130391, 130394, 130397,
- 130400, 130403, 130406, 130409, 130412, 130415, 130418, 130421, 130424,
- 130427, 130430, 130433, 130436, 130439, 130442, 130445, 130448, 130451,
- 130454, 130457, 130460, 130463, 130466, 130469, 130472, 130475, 130478,
- 130481, 130484, 130487, 130490, 130493, 130496, 130499, 130502, 130505,
- 130508, 130511, 130514, 130517, 130520, 130523, 130526, 130529, 130532,
- 130535, 130538, 130541, 130544, 130547, 130550, 130553, 130556, 130559,
- 130562, 130565, 130568, 130571, 130574, 130577, 130580, 130583, 130586,
- 130589, 130592, 130595, 130598, 130601, 130604, 130607, 130610, 130613,
- 130616, 130619, 130622, 130625, 130628, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 130631, 130633, 130635, 130640, 130642, 130647, 130649,
- 130654, 130656, 130661, 130663, 130665, 130667, 130669, 130671, 130673,
- 130675, 130677, 130679, 130682, 130685, 130687, 130689, 130693, 130696,
- 130701, 130703, 130705, 130707, 130711, 130714, 130716, 130720, 130722,
- 130726, 130728, 130732, 130735, 130737, 130741, 130745, 130747, 130753,
- 130755, 130760, 130762, 130767, 130769, 130774, 130776, 130781, 130783,
- 130786, 130788, 130792, 130794, 130801, 130803, 130805, 130807, 130812,
- 130814, 130816, 130818, 130820, 130822, 130827, 130831, 130833, 130838,
- 130842, 130844, 130849, 130853, 130855, 130860, 130864, 130866, 130868,
- 130870, 130872, 130876, 130878, 130883, 130885, 130891, 130893, 130899,
- 130901, 130903, 130905, 130909, 130911, 130918, 130920, 130927, 130929,
- 130934, 130939, 130941, 130947, 130953, 130955, 130961, 130966, 130968,
- 130974, 130980, 130982, 130988, 130994, 130996, 131002, 131006, 131008,
- 131013, 131015, 131017, 131022, 131024, 131026, 131032, 131034, 131039,
- 131043, 131045, 131050, 131054, 131056, 131062, 131064, 131068, 131070,
- 131074, 131076, 131083, 131090, 131092, 131099, 131106, 131108, 131113,
- 131115, 131122, 131124, 131129, 131131, 131137, 131139, 131143, 131145,
- 131151, 131153, 131157, 131159, 131165, 131167, 131169, 131171, 131176,
- 131181, 131183, 131185, 131194, 131198, 131205, 131212, 131217, 131222,
- 131234, 131236, 131238, 131240, 131242, 131244, 131246, 131248, 131250,
- 131252, 131254, 131256, 131258, 131260, 131262, 131264, 131266, 131268,
- 131270, 131272, 131274, 131276, 131282, 131289, 131294, 131299, 131310,
- 131312, 131314, 131316, 131318, 131320, 131322, 131324, 131326, 131328,
- 131330, 131332, 131334, 131336, 131338, 131340, 131342, 131347, 131349,
- 131351, 131357, 131369, 131380, 131382, 131384, 131386, 131388, 131390,
- 131392, 131394, 131396, 131398, 131400, 131402, 131404, 131406, 131408,
- 131410, 131412, 131414, 131416, 131418, 131420, 131422, 131424, 131426,
- 131428, 131430, 131432, 131434, 131436, 131438, 131440, 131442, 131444,
- 131446, 131448, 131450, 131452, 131454, 131456, 131458, 131460, 131462,
- 131464, 131466, 131468, 131470, 131472, 131474, 131476, 131478, 131480,
- 131482, 131484, 131486, 131488, 131490, 131492, 131494, 131496, 131498,
- 131500, 131502, 131504, 131506, 131508, 131510, 131512, 131514, 131516,
- 131518, 131520, 131522, 131524, 131526, 131528, 131530, 131532, 131534,
- 131536, 131538, 131540, 131542, 131544, 131546, 131548, 131550, 131552,
- 131554, 131556, 131558, 131560, 131562, 131564, 131566, 131568, 131570,
- 131572, 131574, 131576, 131578, 131580, 131582, 131584, 131586, 131588,
- 131590, 131592, 131594, 131596, 131598, 131600, 131602, 131604, 131606,
- 131608, 131610, 131612, 131614, 131616, 131618, 131620, 131622, 131624,
- 131626, 131628, 131630, 131632, 131634, 131636, 131638, 131640, 131642,
- 131644, 131646, 131648, 131650, 131652, 131654, 131656, 131658, 131660,
- 131662, 131664, 131666, 131668, 131670, 131672, 131674, 131676, 131678,
- 131680, 131682, 131684, 131686, 131688, 131690, 131692, 131694, 131696,
- 131698, 131700, 131702, 131704, 131706, 131708, 131710, 131712, 131714,
- 131716, 131718, 131720, 131722, 131724, 131726, 131728, 131730, 131732,
- 131734, 131736, 131738, 131740, 131742, 131744, 131746, 131748, 131750,
- 131752, 131754, 131756, 131758, 131760, 131762, 131764, 131766, 131768,
- 131770, 131772, 131774, 131776, 131778, 131780, 131782, 131784, 131786,
- 131788, 131790, 131792, 131794, 131796, 131798, 131800, 131802, 131804,
- 131806, 131808, 131810, 131812, 131814, 131816, 131818, 131820, 131822,
- 131824, 131826, 131828, 131830, 131832, 131834, 131836, 131838, 131840,
- 131842, 131844, 131846, 131848, 131850, 131852, 131854, 131856, 131858,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 162230, 162240, 162250, 162259, 162268, 162281, 162294, 162306,
+ 162318, 162328, 162338, 162348, 162358, 162369, 162380, 162390, 162399,
+ 162408, 162417, 162430, 162443, 162455, 162467, 162477, 162487, 162497,
+ 162507, 162516, 162525, 162535, 162545, 162554, 162563, 162573, 162583,
+ 162592, 162601, 162611, 162621, 162632, 162643, 162653, 162666, 162677,
+ 162691, 162699, 162710, 162718, 162726, 162734, 162742, 162750, 162758,
+ 162767, 162776, 162786, 162796, 162805, 162814, 162824, 162834, 162842,
+ 162850, 162857, 162867, 162876, 162884, 162891, 162901, 162910, 162921,
+ 162932, 162944, 162955, 162965, 162976, 162986, 162997, 163005, 163009,
+ 163013, 163017, 163021, 163025, 163029, 163033, 163037, 163041, 163045,
+ 163049, 163053, 163056, 163059, 163063, 163067, 163071, 163075, 163079,
+ 163083, 163087, 163091, 163094, 163098, 163102, 163106, 163110, 163114,
+ 163118, 163122, 163126, 163130, 163134, 163138, 163142, 163146, 163150,
+ 163154, 163158, 163162, 163166, 163170, 163174, 163178, 163182, 163186,
+ 163190, 163194, 163198, 163202, 163206, 163210, 163214, 163218, 163222,
+ 163226, 163230, 163234, 163238, 163242, 163246, 163250, 163254, 163258,
+ 163262, 163266, 163270, 163274, 163278, 163282, 163286, 163290, 163294,
+ 163298, 163302, 163306, 163310, 163314, 163318, 163322, 163326, 163330,
+ 163334, 163338, 163342, 163346, 163350, 163354, 163358, 163362, 163366,
+ 163370, 163374, 163378, 163382, 163386, 163390, 163394, 163398, 163401,
+ 163405, 163409, 163413, 163417, 163421, 163425, 163429, 163433, 163437,
+ 163441, 163445, 163449, 163453, 163457, 163461, 163465, 163469, 163473,
+ 163477, 163481, 163485, 163489, 163493, 163497, 163501, 163505, 163509,
+ 163513, 163517, 163521, 163525, 163529, 163533, 163537, 163541, 163545,
+ 163549, 163553, 163557, 163561, 163565, 163569, 163573, 163577, 163581,
+ 163585, 163589, 163593, 163597, 163601, 163605, 163609, 163613, 163617,
+ 163621, 163625, 163629, 163633, 163637, 163641, 163645, 163649, 163653,
+ 163657, 163661, 163665, 163669, 163673, 163677, 163681, 163685, 163689,
+ 163693, 163697, 163701, 163705, 163709, 163713, 163717, 163721, 163725,
+ 163729, 163733, 163737, 163741, 163745, 163749, 163753, 163757, 163761,
+ 163765, 163769, 163773, 163777, 163781, 163785, 163789, 163793, 163797,
+ 163801, 163805, 163809, 163813, 163817, 163821, 163825, 163829, 163833,
+ 163837, 163841, 163845, 163849, 163853, 163857, 163861, 163865, 163869,
+ 163873, 163877, 163881, 163885, 163889, 163893, 163897, 163901, 163905,
+ 163909, 163913, 163917, 163921, 163925, 163929, 163933, 163937, 163941,
+ 163945, 163949, 163953, 163957, 163961, 163965, 163969, 163973, 163977,
+ 163981, 163985, 163989, 163993, 163997, 164001, 164005, 164009, 164013,
+ 164017, 164021, 164025, 164029, 164033, 164037, 164041, 164045, 164049,
+ 164053, 164057, 164061, 164065, 164069, 164073, 164077, 164081, 164085,
+ 164089, 164093, 164097, 164101, 164105, 164109, 164113, 164117, 164121,
+ 164125, 164129, 164133, 164137, 164141, 164145, 164149, 164153, 164157,
+ 164161, 164165, 164170, 164175, 164180, 164184, 164190, 164197, 164204,
+ 164211, 164218, 164225, 164232, 164239, 164246, 164253, 164260, 164267,
+ 164274, 164281, 164288, 164295, 164302, 164308, 164315, 164322, 164329,
+ 164336, 164343, 164350, 164357, 164364, 164371, 164378, 164385, 164392,
+ 164399, 164406, 164412, 164419, 164426, 164435, 164444, 164453, 164462,
+ 164467, 164472, 164478, 164484, 164490, 164496, 164502, 164508, 164514,
+ 164520, 164526, 164532, 164538, 164544, 164549, 164555, 164565, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 131860, 131870, 131880, 131889, 131898, 131911,
- 131924, 131936, 131948, 131958, 131968, 131978, 131988, 131999, 132010,
- 132020, 132029, 132038, 132047, 132060, 132073, 132085, 132097, 132107,
- 132117, 132127, 132137, 132146, 132155, 132164, 132173, 132182, 132191,
- 132200, 132209, 132218, 132227, 132236, 132245, 132256, 132266, 132276,
- 132289, 132299, 132312, 132319, 132329, 132336, 132343, 132350, 132357,
- 132364, 132371, 132380, 132389, 132398, 132407, 132416, 132425, 132434,
- 132443, 132451, 132459, 132466, 132476, 132485, 132493, 132500, 132510,
- 132519, 132529, 132539, 132550, 132560, 132569, 132579, 132588, 132598,
- 132606, 132610, 132614, 132618, 132622, 132626, 132630, 132634, 132638,
- 132642, 132646, 132649, 132653, 132656, 132659, 132663, 132667, 132671,
- 132675, 132679, 132683, 132687, 132691, 132695, 132699, 132703, 132707,
- 132711, 132715, 132719, 132723, 132727, 132731, 132735, 132739, 132743,
- 132747, 132751, 132755, 132759, 132763, 132767, 132771, 132775, 132779,
- 132783, 132787, 132791, 132795, 132799, 132803, 132807, 132811, 132815,
- 132819, 132823, 132827, 132831, 132835, 132839, 132843, 132847, 132851,
- 132855, 132859, 132863, 132867, 132871, 132875, 132879, 132883, 132887,
- 132891, 132895, 132899, 132903, 132907, 132911, 132915, 132919, 132923,
- 132927, 132931, 132935, 132939, 132943, 132947, 132951, 132955, 132959,
- 132963, 132967, 132971, 132975, 132979, 132983, 132987, 132991, 132995,
- 132999, 133002, 133006, 133010, 133014, 133018, 133022, 133026, 133030,
- 133034, 133038, 133042, 133046, 133050, 133054, 133058, 133062, 133066,
- 133070, 133074, 133078, 133082, 133086, 133090, 133094, 133098, 133102,
- 133106, 133110, 133114, 133118, 133122, 133126, 133130, 133134, 133138,
- 133142, 133146, 133150, 133154, 133158, 133162, 133166, 133170, 133174,
- 133178, 133182, 133186, 133190, 133194, 133198, 133202, 133206, 133210,
- 133214, 133218, 133222, 133226, 133230, 133234, 133238, 133242, 133246,
- 133250, 133254, 133258, 133262, 133266, 133270, 133274, 133278, 133282,
- 133286, 133290, 133294, 133298, 133302, 133306, 133310, 133314, 133318,
- 133322, 133326, 133330, 133334, 133338, 133342, 133346, 133350, 133354,
- 133358, 133362, 133366, 133370, 133374, 133378, 133382, 133386, 133390,
- 133394, 133398, 133402, 133406, 133410, 133414, 133418, 133422, 133426,
- 133430, 133434, 133438, 133442, 133446, 133450, 133454, 133458, 133462,
- 133466, 133470, 133474, 133478, 133482, 133486, 133490, 133494, 133498,
- 133502, 133506, 133510, 133514, 133518, 133522, 133526, 133530, 133534,
- 133538, 133542, 133546, 133550, 133554, 133558, 133562, 133566, 133570,
- 133574, 133578, 133582, 133586, 133590, 133594, 133598, 133602, 133606,
- 133610, 133614, 133618, 133622, 133626, 133630, 133634, 133638, 133642,
- 133646, 133650, 133654, 133658, 133662, 133666, 133670, 133674, 133678,
- 133682, 133686, 133690, 133694, 133698, 133702, 133706, 133710, 133714,
- 133718, 133722, 133726, 133730, 133734, 133738, 133742, 133746, 133750,
- 133754, 133758, 133762, 133766, 133771, 133776, 133781, 133785, 133791,
- 133798, 133805, 133812, 133819, 133826, 133833, 133840, 133847, 133854,
- 133861, 133868, 133875, 133882, 133888, 133895, 133902, 133908, 133915,
- 133922, 133929, 133936, 133943, 133950, 133957, 133964, 133971, 133978,
- 133985, 133992, 133999, 134005, 134011, 134018, 134025, 134034, 134043,
- 134052, 134061, 134066, 134071, 134077, 134083, 134089, 134095, 134101,
- 134107, 134113, 134119, 134125, 134131, 134137, 134143, 134148, 134154,
- 134164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0,
};
/* name->code dictionary */
static unsigned int code_hash[] = {
- 74224, 4851, 0, 78156, 78499, 128685, 7929, 0, 194682, 127766, 78500,
- 66480, 0, 42833, 74529, 12064, 0, 596, 983821, 69850, 13192, 8651, 0, 0,
- 120218, 12995, 64865, 1373, 0, 0, 5816, 119067, 64810, 4231, 6825, 42897,
- 4233, 4234, 4232, 917836, 74415, 120210, 6384, 917840, 78108, 8851, 0,
- 128553, 0, 41601, 8874, 983783, 7748, 0, 0, 0, 127939, 41603, 9784, 0,
- 9188, 41600, 0, 120618, 128343, 1457, 3535, 0, 0, 0, 0, 65240, 11951, 0,
- 3404, 0, 0, 0, 1759, 0, 41076, 68383, 120572, 119205, 66577, 94014,
- 127764, 65859, 0, 7404, 0, 0, 0, 0, 65908, 9834, 3055, 9852, 983860,
- 65288, 0, 11398, 0, 92417, 119255, 0, 0, 603, 74398, 43548, 0, 0, 917824,
- 3350, 120817, 64318, 917828, 127089, 3390, 74483, 43265, 120599, 917830,
- 78573, 0, 1919, 3400, 120651, 127944, 11647, 917540, 66446, 64141, 8562,
- 2121, 64138, 4043, 8712, 64134, 64133, 11297, 983688, 983152, 11966,
- 64128, 128587, 0, 0, 64132, 10867, 64130, 64129, 983844, 43374, 9779,
- 2764, 66002, 10167, 9471, 0, 66021, 0, 0, 5457, 5440, 8857, 93981, 65282,
- 2843, 5355, 127928, 983965, 0, 5194, 11657, 43984, 128292, 0, 983620, 0,
- 0, 127027, 10717, 64570, 5630, 5396, 64143, 10682, 0, 10602, 800, 42499,
- 66186, 0, 0, 64930, 11631, 64146, 64145, 64144, 762, 13172, 118859,
- 194661, 64468, 10906, 1353, 6960, 0, 0, 5828, 8724, 917806, 8933, 1601,
- 42244, 858, 7080, 64109, 64108, 8090, 0, 74401, 917811, 587, 0, 128131,
- 0, 0, 0, 78214, 2750, 74218, 556, 64158, 64157, 983949, 12213, 194678,
- 2760, 0, 0, 0, 194794, 64156, 64155, 42496, 0, 64151, 64150, 12679,
- 10053, 10421, 11093, 64153, 64152, 0, 0, 4839, 0, 0, 1874, 119016, 0,
- 6577, 64125, 64124, 64123, 0, 127531, 92534, 7007, 7590, 65443, 9036,
- 92550, 64122, 74422, 66609, 0, 64117, 64116, 6287, 64114, 2725, 64120,
- 64119, 43981, 42128, 127842, 1177, 65601, 12322, 64106, 69640, 127306,
- 64102, 7859, 1945, 64099, 0, 10453, 64104, 7188, 7997, 0, 7389, 983161,
- 8705, 64097, 64096, 9571, 528, 128671, 44017, 11429, 71347, 0, 983077,
- 917990, 73841, 0, 0, 9056, 64313, 6188, 120019, 6155, 64068, 1823, 64066,
- 64065, 64072, 64071, 63, 7233, 92212, 0, 41904, 6639, 64064, 983775,
- 128344, 0, 1176, 118959, 127930, 8162, 128667, 983831, 0, 120519, 66376,
- 66242, 11415, 4333, 9855, 64112, 64642, 0, 5388, 0, 0, 0, 7714, 66222,
- 69902, 7768, 0, 4199, 64708, 983421, 0, 0, 8708, 9560, 64077, 64076,
- 8996, 4992, 4471, 42622, 64079, 64078, 92179, 0, 126570, 0, 64615, 41915,
- 0, 12075, 70062, 0, 5174, 983217, 0, 127557, 3123, 0, 12685, 127904,
- 8408, 64704, 0, 0, 9223, 0, 41616, 67999, 73797, 0, 1116, 128204, 43049,
- 7136, 43050, 8548, 120485, 0, 119061, 917999, 0, 13115, 43675, 64091,
- 9322, 0, 120595, 64095, 64094, 8111, 66247, 42332, 64089, 64088, 6199, 0,
- 0, 11434, 64083, 64082, 11329, 7737, 64087, 64086, 64085, 64084, 194817,
- 9927, 41335, 4118, 1797, 0, 41334, 0, 46, 43448, 127881, 298, 0, 128114,
- 0, 42627, 0, 32, 6187, 119052, 11495, 11459, 3665, 983600, 42871, 0,
- 19923, 74335, 0, 127192, 66239, 42264, 64403, 4412, 7240, 92495, 0,
- 983466, 65758, 12750, 4181, 8544, 0, 120199, 917897, 120198, 69809, 6181,
- 65014, 0, 0, 983196, 3639, 119588, 0, 0, 118904, 10073, 120206, 128862,
- 127186, 68409, 42844, 7498, 1098, 92565, 120205, 0, 983118, 10207, 8789,
- 983225, 0, 0, 983472, 9234, 0, 6182, 983474, 65058, 0, 983478, 983475, 0,
- 5471, 9461, 5573, 118936, 5473, 44, 0, 66244, 94072, 0, 66238, 12844, 0,
- 1622, 7767, 1900, 41339, 11458, 0, 0, 6581, 5576, 0, 64405, 41337, 0,
- 41631, 8947, 68390, 127844, 41694, 0, 0, 7908, 0, 10408, 6579, 0, 64618,
- 0, 120147, 2138, 6583, 7761, 127010, 120504, 194828, 0, 5058, 41010,
- 9992, 128299, 5057, 0, 0, 74538, 5054, 118951, 194971, 78606, 0, 1437,
- 41617, 658, 3497, 128509, 7486, 5061, 5060, 4235, 127878, 0, 128529,
- 12113, 4236, 4727, 0, 0, 7693, 10749, 0, 7488, 5773, 978, 128134, 0,
- 41619, 10239, 68611, 0, 66209, 0, 128700, 9748, 983956, 127524, 0, 0, 0,
- 0, 195083, 0, 983843, 0, 0, 0, 0, 0, 9341, 119596, 2379, 11325, 0, 64668,
- 67854, 8125, 120545, 6743, 119175, 917940, 2369, 0, 983972, 983973,
- 119235, 74092, 73936, 7008, 43660, 0, 0, 0, 2367, 127827, 983857, 264,
- 2375, 8060, 6194, 119858, 1844, 119084, 0, 6019, 0, 0, 6961, 0, 118839,
- 0, 8800, 0, 42862, 4463, 65581, 6192, 194676, 42771, 0, 92333, 725,
- 65042, 118797, 120800, 983040, 12892, 0, 0, 0, 0, 0, 0, 127261, 120707,
- 983128, 0, 5074, 5073, 128790, 8983, 118981, 74493, 983561, 5072, 93977,
- 6198, 11614, 0, 196, 0, 0, 0, 4929, 120342, 0, 0, 0, 0, 42847, 0, 0, 0,
- 4934, 0, 41323, 9758, 0, 92289, 127917, 42584, 0, 4329, 41321, 4979,
- 3048, 7752, 41320, 983042, 74418, 12819, 0, 5071, 0, 3642, 0, 5070,
- 10042, 118835, 3987, 5068, 0, 8909, 78650, 78649, 69917, 10636, 73981,
- 11806, 43167, 4531, 1245, 9105, 66463, 4921, 120219, 4926, 65544, 73884,
- 194619, 0, 0, 64709, 0, 194620, 78880, 4922, 325, 992, 119568, 4925, 0,
- 0, 9526, 4920, 0, 948, 0, 120208, 4930, 0, 92175, 120275, 4933, 120211,
- 0, 118985, 4928, 0, 0, 74770, 120194, 126548, 722, 194934, 19908, 12637,
- 127485, 119855, 8753, 1509, 0, 5468, 9511, 127474, 127477, 1672, 6205,
- 10864, 74586, 127480, 70103, 127466, 78555, 127468, 73863, 126577,
- 126503, 41607, 120115, 1679, 120116, 120180, 120113, 127462, 7005, 41609,
- 9580, 0, 401, 69949, 43779, 6968, 5761, 342, 8553, 0, 8143, 127115,
- 11983, 92249, 624, 74508, 4057, 43788, 5078, 74258, 12478, 0, 5076, 0,
- 194609, 0, 8295, 685, 9025, 1524, 12618, 0, 5539, 0, 92523, 120102, 7138,
- 120552, 0, 194611, 78752, 0, 12520, 8058, 9732, 0, 5080, 64775, 5036,
- 5035, 120590, 42604, 983656, 0, 8074, 275, 13291, 1907, 78838, 4432,
- 127271, 5033, 127273, 127272, 4836, 3888, 73792, 10729, 64546, 127262,
- 43704, 127264, 127251, 67588, 119000, 127252, 127255, 8858, 6409, 127256,
- 120252, 128100, 0, 0, 66321, 0, 12814, 127248, 3432, 10218, 0, 6094,
- 7641, 42445, 0, 92487, 42406, 1676, 74320, 194607, 983177, 5030, 0, 0, 0,
- 73869, 9622, 0, 69944, 6787, 0, 0, 0, 983583, 10544, 12919, 0, 92218, 0,
- 0, 69906, 120789, 0, 947, 119835, 194586, 194585, 10969, 119935, 7613,
+ 74224, 4851, 125138, 78156, 78499, 72391, 7929, 66910, 194682, 127766,
+ 78500, 66480, 64038, 42833, 74529, 12064, 72385, 596, 983821, 69850,
+ 13192, 8651, 120217, 126542, 120218, 12995, 64865, 1373, 119856, 113752,
+ 5816, 119067, 64810, 4231, 6825, 42897, 4233, 4234, 4232, 120889, 74415,
+ 120210, 6384, 70351, 78108, 8851, 67698, 128553, 82954, 41601, 8874,
+ 72392, 7748, 125083, 0, 127026, 127939, 41603, 9784, 0, 9188, 41600, 0,
+ 120618, 128343, 1457, 3535, 128635, 6381, 0, 0, 65240, 11951, 0, 3404,
+ 983079, 70487, 72411, 1759, 120853, 41076, 68383, 69972, 119205, 66577,
+ 94014, 127764, 65859, 0, 7404, 0, 0, 69970, 128387, 65908, 9834, 3055,
+ 9852, 128360, 65288, 121291, 11398, 0, 92417, 93016, 128380, 127337, 603,
+ 74398, 43548, 0, 71865, 917824, 3350, 120817, 64318, 194698, 78121, 3390,
+ 74483, 43265, 92399, 917830, 78573, 118803, 1919, 3400, 120651, 83296,
+ 11647, 83298, 66446, 64141, 8562, 2121, 64138, 4043, 8712, 64134, 64133,
+ 11297, 983688, 983152, 11966, 64128, 66286, 93042, 128830, 64132, 10867,
+ 64130, 64129, 121255, 43374, 9779, 2764, 66002, 10167, 9471, 83458,
+ 66021, 74509, 0, 5457, 5440, 8857, 93981, 65282, 2843, 5355, 68858,
+ 983342, 69971, 5194, 11657, 43984, 128292, 113724, 128872, 0, 0, 72393,
+ 10717, 64570, 5630, 5396, 64143, 10682, 83300, 10602, 800, 42499, 66186,
+ 0, 0, 64930, 11631, 64146, 64145, 64144, 762, 13172, 75008, 77928, 43929,
+ 10906, 1353, 6960, 83032, 128779, 5828, 8724, 917806, 8933, 1601, 42244,
+ 858, 7080, 64109, 64108, 8090, 70455, 72388, 74606, 587, 917907, 82971,
+ 0, 0, 0, 78214, 2750, 74218, 556, 64158, 64157, 78707, 12213, 83290,
+ 2760, 83284, 83285, 78708, 83287, 64156, 64155, 42496, 83283, 64151,
+ 64150, 12679, 10053, 10421, 11093, 64153, 64152, 125016, 0, 4839, 68527,
+ 0, 1874, 119016, 120091, 6577, 64125, 64124, 64123, 0, 127531, 92534,
+ 7007, 7590, 65443, 9036, 78847, 64122, 66389, 66609, 121347, 64117,
+ 64116, 6287, 64114, 2725, 64120, 64119, 43981, 42128, 127842, 1177,
+ 65601, 12322, 64106, 69640, 92895, 64102, 7859, 1945, 64099, 0, 10453,
+ 64104, 7188, 7997, 0, 7389, 983161, 8705, 64097, 64096, 9571, 528,
+ 128545, 44017, 11429, 71347, 0, 983077, 120864, 73841, 83339, 83340,
+ 9056, 64313, 6188, 74360, 6155, 64068, 1823, 64066, 64065, 64072, 64071,
+ 63, 7233, 92212, 72414, 41904, 6639, 64064, 983775, 128344, 121388, 1176,
+ 118959, 127930, 8162, 127019, 128197, 92747, 120519, 42931, 66242, 11415,
+ 4333, 9855, 64112, 64642, 0, 5388, 0, 121271, 983649, 7714, 66222, 69902,
+ 7768, 72403, 4199, 64708, 65064, 70117, 0, 8708, 9560, 64077, 64076,
+ 8996, 4992, 4471, 42622, 64079, 64078, 92179, 71878, 126570, 121256,
+ 64615, 41915, 0, 12075, 42041, 194825, 5174, 983217, 0, 127557, 3123,
+ 125100, 12685, 119216, 8408, 64704, 83328, 0, 9223, 0, 41616, 67999,
+ 73797, 83327, 1116, 75067, 43049, 7136, 43050, 8548, 120485, 0, 75031,
+ 917622, 128168, 13115, 43675, 64091, 9322, 83338, 83331, 64095, 64094,
+ 8111, 66247, 42332, 64089, 64088, 6199, 67249, 66398, 11434, 64083,
+ 64082, 11329, 7737, 64087, 64086, 64085, 64084, 83033, 9927, 41335, 4118,
+ 1797, 83312, 41334, 0, 46, 43448, 83309, 298, 83303, 83304, 83305, 42627,
+ 125011, 32, 6187, 83037, 11495, 11459, 3665, 83036, 42871, 0, 19923,
+ 74335, 0, 127192, 66239, 42264, 64403, 4412, 7240, 83314, 71444, 983468,
+ 65758, 12750, 4181, 8544, 83461, 68053, 83407, 120198, 69809, 6181,
+ 65014, 983422, 128484, 983196, 3639, 119588, 118851, 83039, 118904,
+ 10073, 120206, 83038, 127186, 68409, 42844, 7498, 1098, 92565, 120205, 0,
+ 128915, 10207, 8789, 93070, 120338, 92973, 128325, 9234, 917895, 6182,
+ 983475, 65058, 120319, 983480, 68064, 917831, 5471, 9461, 5573, 118936,
+ 5473, 44, 0, 66244, 94072, 0, 66238, 12844, 66894, 1622, 7767, 1900,
+ 41339, 11458, 119061, 0, 6581, 5576, 128618, 43855, 41337, 0, 41631,
+ 8947, 68390, 69683, 41694, 983848, 72396, 7908, 0, 10408, 6579, 917872,
+ 64618, 0, 120147, 2138, 6583, 7761, 70005, 120504, 194828, 128961, 5058,
+ 41010, 9992, 128299, 5057, 917941, 0, 74538, 5054, 118951, 194971, 78606,
+ 0, 1437, 41617, 658, 3497, 128509, 7486, 5061, 5060, 4235, 127878,
+ 128322, 128529, 12113, 4236, 4727, 128487, 0, 7693, 10749, 120332, 7488,
+ 5773, 978, 128134, 983699, 41619, 10239, 68611, 71864, 66209, 127233,
+ 74135, 9748, 983956, 127524, 0, 983316, 194676, 194675, 128081, 0,
+ 983313, 983302, 0, 127865, 0, 92776, 9341, 78821, 2379, 11325, 917902,
+ 64668, 67854, 8125, 120545, 6743, 83164, 917940, 2369, 83406, 983323,
+ 127966, 119235, 71868, 73936, 7008, 43660, 120346, 0, 43841, 2367,
+ 127827, 983857, 264, 2375, 8060, 6194, 119858, 1844, 119084, 129049,
+ 6019, 128975, 0, 6961, 0, 70435, 67171, 8800, 127332, 42862, 4463, 65581,
+ 6192, 119610, 42771, 0, 92333, 725, 65042, 93014, 120800, 74942, 12892,
+ 0, 67149, 74899, 73931, 0, 120495, 127261, 12224, 983128, 129061, 5074,
+ 5073, 121164, 8983, 118981, 74493, 71231, 5072, 74547, 6198, 11614, 0,
+ 196, 983154, 0, 983936, 4929, 120342, 129145, 0, 127987, 121455, 42847,
+ 92953, 0, 67754, 4934, 983981, 41323, 9758, 0, 92289, 70181, 42584, 0,
+ 4329, 41321, 4979, 3048, 7752, 41320, 983042, 64667, 12819, 983870, 5071,
+ 127915, 3642, 67334, 5070, 10042, 113813, 3987, 5068, 983460, 8909,
+ 78650, 78649, 69917, 10636, 73981, 11806, 43167, 4531, 1245, 9105, 66463,
+ 4921, 120219, 4926, 65544, 73884, 121359, 128028, 0, 64709, 83269,
+ 128854, 78880, 4922, 325, 992, 119568, 4925, 127218, 0, 9526, 4920,
+ 128617, 948, 0, 120208, 4930, 127857, 92175, 120275, 4933, 113779,
+ 121049, 118985, 4928, 983149, 83514, 74770, 120194, 126548, 722, 194934,
+ 19908, 12637, 127485, 82999, 8753, 1509, 0, 5468, 9511, 43493, 127477,
+ 1672, 6205, 10864, 74586, 127480, 70103, 92694, 78555, 127468, 73863,
+ 126577, 68336, 41607, 120115, 1679, 120116, 120180, 92761, 127462, 7005,
+ 41609, 9580, 70431, 401, 69949, 43779, 6968, 5761, 342, 8553, 127900,
+ 8143, 127115, 11983, 92249, 624, 74508, 4057, 43788, 5078, 74258, 12478,
+ 0, 5076, 128702, 82991, 0, 8295, 685, 9025, 1524, 12618, 0, 5539, 129182,
+ 92523, 71435, 7138, 120552, 43504, 194611, 66914, 65794, 12520, 8058,
+ 9732, 92480, 5080, 64775, 5036, 5035, 120590, 42604, 983656, 0, 8074,
+ 275, 13291, 1907, 78838, 4432, 121313, 5033, 120341, 120818, 4836, 3888,
+ 73792, 10729, 64546, 127262, 43704, 127264, 92957, 67588, 68061, 124983,
+ 70360, 8858, 6409, 7663, 120252, 128100, 119007, 0, 66321, 94052, 12814,
+ 127248, 3432, 10218, 0, 6094, 7641, 42445, 128792, 92487, 42406, 1676,
+ 67362, 74862, 67365, 5030, 67364, 118810, 195008, 73869, 9622, 113763,
+ 69944, 6787, 67361, 983270, 0, 68319, 10544, 12919, 71484, 72397, 0, 0,
+ 69906, 120789, 983041, 947, 67695, 67367, 128528, 10969, 67228, 7613,
92562, 119936, 4795, 119930, 7018, 7376, 120181, 120192, 120268, 0,
- 43567, 74056, 917910, 11833, 119919, 7216, 65232, 7217, 251, 7218, 7895,
- 4395, 43538, 119926, 119929, 119928, 7213, 119922, 7214, 7215, 983836,
- 74141, 8880, 7685, 66459, 120173, 65540, 119618, 625, 8187, 42861, 1113,
- 7236, 7915, 3630, 120176, 8179, 74264, 67886, 9316, 10980, 2489, 65624,
- 8150, 1359, 67652, 127329, 127330, 73756, 5042, 5041, 42769, 12084,
- 127324, 127321, 92279, 127319, 127320, 127317, 127318, 127315, 12283,
- 1616, 3795, 0, 8795, 66245, 0, 0, 0, 1138, 73905, 12677, 0, 0, 3239,
- 127311, 0, 0, 8431, 0, 42164, 0, 11778, 12620, 6826, 73773, 119073, 5040,
- 0, 0, 983443, 78420, 0, 5039, 0, 78418, 0, 5038, 0, 0, 13184, 74293, 0,
- 64648, 0, 9359, 78416, 0, 128770, 65157, 6662, 0, 0, 3863, 73909, 4835,
- 55266, 43432, 127822, 4309, 7127, 194569, 0, 194568, 1301, 0, 42589, 569,
- 0, 73813, 711, 4389, 7133, 0, 73880, 11610, 11368, 0, 194570, 41331,
- 1006, 74240, 0, 1550, 8201, 73737, 7627, 5499, 5031, 77908, 42738, 65784,
- 77907, 65267, 3758, 0, 65781, 64734, 70073, 2440, 65780, 77913, 8449, 0,
- 5008, 983572, 2118, 0, 12121, 8255, 5512, 73875, 2128, 2130, 2131, 2126,
- 2133, 1119, 127068, 2114, 2116, 2455, 0, 2122, 2123, 2124, 2125, 127486,
- 8714, 983820, 2113, 0, 2115, 128177, 127907, 43713, 5052, 66220, 5821,
- 6186, 65778, 65775, 5051, 65773, 1429, 42647, 5050, 302, 388, 41115, 735,
- 6637, 5907, 65088, 0, 12726, 74594, 9117, 983181, 12003, 5513, 6666,
- 5053, 74230, 5510, 78451, 0, 78447, 2470, 78437, 0, 1925, 0, 92237,
- 74807, 0, 5048, 5047, 0, 0, 0, 92313, 0, 74497, 92395, 8089, 6929, 639,
- 983563, 68179, 64442, 0, 92348, 4599, 41402, 6674, 43397, 43294, 1476,
- 648, 0, 65819, 3233, 0, 41782, 6951, 94017, 983976, 3530, 9750, 128317,
- 0, 6656, 42618, 0, 5046, 8512, 65856, 74261, 8967, 0, 5045, 42026, 1916,
- 7986, 5044, 120556, 9006, 13128, 5043, 0, 7853, 74068, 74004, 9669,
- 12341, 12703, 8402, 0, 119070, 917600, 41750, 3586, 64508, 43148, 0, 0,
- 119606, 67983, 13296, 517, 0, 128534, 194946, 41528, 123, 65454, 0, 0,
- 74478, 10531, 7784, 41526, 10829, 73991, 8057, 1126, 73895, 0, 194591, 0,
- 3925, 4251, 8069, 10517, 120439, 489, 0, 4250, 120441, 120452, 43151,
- 983178, 194851, 66200, 0, 0, 0, 78423, 0, 0, 8711, 6183, 0, 0, 0, 120448,
- 7623, 118925, 118889, 9235, 12760, 74176, 69662, 66445, 43540, 10062,
- 3743, 11514, 11078, 0, 12136, 0, 126597, 120435, 0, 7726, 0, 19922, 267,
- 3393, 42198, 1371, 194849, 69233, 2458, 0, 6201, 0, 41074, 4266, 10652,
- 41612, 41077, 3402, 9050, 3398, 0, 983348, 0, 3391, 41075, 2476, 0,
- 128017, 0, 10625, 0, 12767, 13017, 78743, 64261, 64934, 127537, 13014,
- 13013, 0, 6673, 0, 0, 0, 12438, 0, 983342, 0, 983880, 126638, 9053,
- 13015, 74523, 0, 704, 66215, 6195, 983828, 6660, 78758, 917760, 917793,
- 42212, 12629, 11435, 0, 55256, 65538, 0, 127940, 983341, 74547, 126585,
- 65448, 78100, 12948, 119001, 195002, 119238, 195004, 78099, 127085, 0,
- 128320, 4287, 8276, 4902, 1131, 0, 78458, 66728, 1816, 0, 42533, 168,
- 42845, 4898, 64298, 983141, 0, 4901, 1821, 0, 578, 3653, 0, 791, 9162,
- 6977, 0, 78889, 74561, 0, 73731, 8354, 43590, 119303, 983449, 7557,
- 119339, 119301, 8234, 7241, 0, 120671, 119167, 194996, 12811, 65925,
- 3946, 78078, 10998, 78080, 673, 194867, 64397, 128276, 74599, 78449,
- 8890, 194977, 194976, 2448, 78085, 10267, 8424, 2452, 78083, 128824,
- 8729, 78456, 0, 7845, 917917, 71302, 4408, 4122, 6772, 11039, 8723,
- 194990, 71310, 119302, 731, 119304, 92286, 2438, 64855, 119300, 119299,
- 1175, 0, 42135, 373, 119172, 2119, 11457, 11521, 7723, 0, 0, 0, 41952, 0,
- 5273, 2127, 5269, 6337, 5202, 2404, 5267, 42823, 11291, 19915, 5277,
- 12963, 127864, 6189, 4125, 1314, 12133, 120340, 118873, 1271, 983640, 0,
- 66024, 41482, 3864, 74539, 0, 3879, 0, 12978, 4166, 4574, 0, 7567, 7459,
- 983160, 41390, 5384, 41882, 67647, 92548, 5759, 983912, 0, 41388, 64446,
- 41392, 64288, 41387, 0, 8706, 5552, 983187, 700, 0, 5553, 0, 7088, 5356,
- 7499, 68007, 66596, 74066, 0, 10263, 5554, 0, 12344, 10311, 78113, 6665,
- 92626, 0, 7618, 8517, 11455, 78440, 64632, 64447, 5555, 78088, 78093,
- 78091, 0, 42803, 65033, 9143, 6668, 195067, 67995, 195069, 656, 195071,
- 65037, 4577, 64624, 0, 0, 0, 983649, 4269, 73885, 917775, 42846, 69644,
- 950, 0, 92273, 66580, 118895, 66683, 10554, 917778, 119121, 0, 5098,
- 917770, 0, 119099, 5097, 4935, 9848, 10381, 0, 128870, 983701, 3651, 0,
- 120730, 127556, 5102, 5101, 10269, 12983, 8138, 4517, 1932, 5100, 1439,
- 12093, 1247, 10034, 195064, 5099, 78373, 1441, 42087, 3063, 650, 0, 7838,
- 0, 195041, 195040, 119142, 9031, 120790, 128582, 9078, 8545, 66356,
- 128799, 0, 9154, 9118, 126543, 0, 2676, 2277, 0, 73812, 6190, 8599,
- 195053, 69918, 10795, 9857, 7014, 9856, 195033, 92620, 12129, 0, 8481, 0,
- 6202, 195035, 10920, 128237, 5203, 195039, 195038, 5108, 5107, 65818,
- 66019, 9762, 0, 5541, 74772, 0, 12613, 5284, 6657, 207, 128806, 4275,
- 74819, 854, 68147, 74381, 0, 78786, 5103, 127861, 64348, 41368, 43974,
- 488, 69811, 0, 71339, 10157, 0, 43034, 11438, 64674, 0, 92694, 68431,
- 41771, 5106, 6669, 8504, 65154, 69813, 41367, 5105, 127509, 69720, 6476,
- 5104, 983749, 304, 3176, 119010, 0, 932, 120633, 6567, 238, 69656,
- 195011, 194595, 19905, 120577, 195015, 78870, 41044, 67640, 194902,
- 42055, 9912, 65939, 10670, 74093, 13273, 0, 12552, 195019, 8803, 309,
- 6622, 8151, 10858, 78706, 67636, 0, 12568, 0, 12553, 10814, 43275, 6950,
- 9712, 68680, 43970, 983198, 65165, 92725, 0, 66466, 0, 0, 0, 66725, 6191,
- 11351, 10437, 11316, 67634, 43763, 0, 41754, 67635, 9370, 2720, 194975,
- 68462, 8232, 118817, 0, 3222, 0, 0, 0, 66663, 0, 0, 10834, 0, 0, 65732,
- 94095, 917547, 92682, 67679, 195020, 0, 7781, 41383, 64568, 0, 120738,
- 12077, 0, 64586, 917620, 42396, 55255, 3475, 128035, 2479, 0, 3632,
- 120728, 10698, 8376, 3648, 194960, 74844, 67639, 3636, 67894, 3650, 8837,
- 65229, 1843, 42283, 43250, 41562, 9100, 74548, 917630, 3640, 127190,
- 42321, 7284, 194974, 194973, 194950, 194949, 194952, 194951, 126649,
- 194953, 42080, 2529, 0, 0, 0, 42083, 120678, 68398, 194957, 67619, 66367,
- 194958, 9634, 92380, 9988, 0, 41068, 0, 4295, 65264, 68006, 0, 92545, 0,
- 785, 8236, 128647, 9027, 68160, 67623, 64383, 120265, 925, 127156, 0,
- 41985, 41071, 9586, 0, 41984, 9217, 0, 0, 0, 9186, 2067, 4016, 983803, 0,
- 381, 12936, 0, 42077, 0, 69880, 5184, 42078, 194947, 10810, 128531, 4585,
- 19943, 5860, 67633, 0, 0, 812, 3615, 0, 5178, 44000, 120548, 78807, 5188,
- 74287, 67629, 3605, 10692, 1166, 64429, 42639, 924, 0, 67631, 42616,
- 120670, 2442, 10703, 78789, 67632, 917924, 12771, 12736, 12753, 66708,
- 73933, 67626, 42401, 0, 69872, 127373, 42288, 12751, 0, 8542, 13145,
- 194963, 2468, 66706, 41294, 3626, 3883, 64388, 42479, 0, 41117, 0, 92580,
- 0, 0, 67624, 0, 1290, 0, 65585, 2715, 806, 65208, 41884, 917883, 1318,
- 64731, 126578, 0, 0, 66325, 3465, 2405, 9240, 0, 12756, 65259, 0, 983781,
- 12752, 5833, 1432, 0, 41883, 73912, 9799, 0, 41886, 2480, 0, 2062,
- 127293, 6494, 5537, 78656, 0, 194587, 0, 1211, 0, 0, 0, 118832, 12318, 0,
- 0, 68005, 10622, 983779, 0, 78654, 6566, 78659, 0, 73780, 119196, 64864,
- 0, 78660, 0, 8284, 13081, 0, 3589, 42051, 4035, 6492, 92236, 4265, 6642,
- 3977, 74186, 41778, 836, 119216, 2488, 0, 4582, 0, 0, 41777, 12926,
- 983377, 7528, 10550, 0, 92706, 0, 10961, 0, 1374, 64878, 119014, 0,
- 42389, 41374, 2286, 0, 78492, 41377, 127909, 0, 400, 12597, 120586, 0, 0,
- 6661, 983145, 64827, 0, 73817, 390, 0, 71301, 983862, 3473, 7718, 0, 0,
- 0, 55285, 0, 0, 0, 11969, 983390, 127841, 6365, 1887, 6763, 983370, 8080,
- 7006, 0, 983371, 6757, 64351, 1544, 0, 6766, 64677, 120716, 983372, 6146,
- 0, 771, 983373, 0, 12812, 13168, 42272, 12200, 917927, 7904, 0, 953,
- 12917, 119560, 12300, 0, 11491, 9724, 10341, 983773, 9524, 7490, 11389,
- 7489, 3379, 0, 7487, 0, 471, 7484, 7482, 6753, 7480, 5764, 7478, 7477,
- 6501, 7475, 6918, 7473, 7472, 2474, 7470, 7468, 10232, 10615, 10213,
- 127288, 92357, 10049, 11834, 3544, 0, 6017, 65311, 127481, 120216, 13306,
- 10533, 7870, 73949, 7625, 0, 120544, 0, 0, 92660, 0, 0, 0, 19961, 2472,
- 42665, 92341, 0, 2139, 4256, 120776, 74380, 0, 42675, 42658, 12845, 0, 0,
- 65138, 119355, 67862, 0, 65671, 7083, 120008, 8066, 7678, 74865, 0, 0, 0,
- 0, 7186, 0, 120555, 0, 445, 120566, 128308, 0, 0, 8330, 0, 0, 42797,
- 983150, 120215, 0, 3902, 0, 1770, 0, 128866, 1560, 120209, 194972, 4584,
- 73843, 0, 11712, 10866, 118928, 1118, 71334, 0, 0, 1081, 7436, 68420,
- 7252, 0, 5996, 69921, 4903, 0, 41386, 5162, 119189, 1330, 0, 7139, 0,
- 12047, 41384, 0, 0, 1848, 4334, 6324, 41975, 64777, 10674, 12308, 12186,
- 0, 0, 983741, 12715, 68002, 983479, 126630, 2018, 66672, 41979, 66685,
- 119157, 68000, 92464, 0, 126984, 68001, 9334, 92705, 92315, 70101, 7975,
- 0, 77957, 0, 66621, 4884, 66597, 69732, 0, 0, 6313, 65513, 69857, 0, 0,
- 0, 2345, 43697, 463, 0, 0, 119607, 3117, 5460, 0, 0, 983387, 0, 42279,
- 194577, 0, 78415, 0, 195008, 983384, 13248, 0, 0, 0, 0, 0, 0, 5663, 0, 0,
- 0, 0, 2482, 1471, 0, 0, 42247, 12378, 73925, 69664, 0, 12374, 0, 0, 0,
- 983694, 2460, 0, 11944, 12376, 127868, 64679, 0, 12380, 10557, 64473,
- 5870, 0, 2024, 127180, 0, 0, 539, 0, 127765, 94052, 3853, 65180, 127923,
- 120796, 120245, 92324, 0, 8659, 0, 12474, 92579, 9503, 194969, 2478, 0,
- 4162, 0, 4260, 12953, 69633, 120089, 12470, 0, 74189, 2742, 12476, 11798,
- 10946, 127310, 5000, 0, 983579, 0, 69672, 8213, 74017, 7771, 6161, 68018,
- 6709, 0, 78885, 983708, 127971, 120582, 78547, 0, 10301, 10333, 10397, 0,
- 0, 73791, 0, 0, 0, 0, 119123, 4014, 12842, 73952, 12015, 127290, 8275,
- 3893, 983264, 0, 12210, 7221, 42147, 0, 74550, 74465, 64747, 118841, 0,
- 12516, 4444, 0, 92271, 74537, 10892, 8231, 0, 6473, 41968, 78388, 41973,
- 3591, 41969, 0, 2453, 128549, 92666, 64705, 0, 0, 10349, 10413, 43591,
- 41962, 3202, 74353, 0, 8316, 0, 0, 94060, 687, 0, 0, 0, 1840, 0, 68671,
- 119809, 4883, 285, 4723, 70099, 92692, 4459, 74577, 42921, 41720, 11089,
- 240, 19906, 0, 42323, 0, 9743, 120232, 13134, 126535, 0, 0, 0, 0, 42634,
- 983343, 43437, 3081, 11463, 120154, 0, 0, 10445, 0, 0, 66717, 2614, 9125,
- 119023, 1729, 0, 120236, 65221, 63883, 43334, 64852, 0, 65194, 66201, 0,
- 66578, 5001, 41879, 74427, 4121, 5003, 884, 66700, 63879, 4943, 5150,
- 73889, 74182, 127915, 643, 3086, 0, 42448, 42299, 58, 0, 917952, 120083,
- 63873, 8491, 0, 0, 983623, 4530, 42409, 7126, 194575, 2721, 120074,
- 119096, 19929, 0, 194574, 0, 4242, 4264, 120077, 120530, 66179, 42412,
- 65941, 13114, 64522, 10740, 3094, 0, 9754, 119102, 4437, 73948, 127074,
- 983238, 55280, 42174, 194925, 42430, 0, 0, 42355, 66026, 4306, 41380,
- 68432, 92586, 0, 66667, 127309, 0, 126521, 42200, 42566, 0, 0, 5088,
- 6948, 0, 8524, 0, 0, 12385, 0, 0, 69646, 1386, 64580, 11480, 6116, 65039,
- 65038, 12392, 65036, 8064, 0, 12101, 5822, 119004, 2080, 710, 77999,
- 11663, 1666, 42091, 119657, 12383, 43671, 42092, 68418, 4289, 0, 63896,
- 12061, 42096, 43621, 3362, 12377, 983832, 983834, 68449, 7461, 73901,
- 1244, 331, 73786, 12683, 10662, 0, 8112, 0, 65852, 0, 12379, 194877,
- 120818, 41964, 42208, 63843, 2084, 41965, 0, 65866, 4327, 0, 63840,
- 78549, 41220, 13032, 0, 584, 12933, 43177, 12373, 69855, 13000, 1351,
- 2935, 8698, 12665, 0, 1930, 0, 78229, 12427, 66514, 69859, 13031, 0,
- 63901, 0, 3657, 128572, 65202, 6000, 119206, 12426, 127181, 0, 41740,
- 12428, 41283, 41916, 119210, 0, 0, 12429, 6727, 0, 7562, 0, 5170, 0,
- 41755, 676, 0, 66704, 66664, 9978, 66491, 3536, 0, 9752, 92397, 6162, 0,
- 69228, 10113, 41829, 65886, 5159, 12422, 41832, 439, 43077, 0, 42207,
- 74549, 11796, 40970, 41830, 0, 917799, 8308, 917797, 917796, 0, 67864,
- 917801, 917800, 12336, 4135, 69805, 341, 2727, 4129, 3539, 0, 63861, 0,
- 7913, 0, 63859, 4131, 63868, 0, 63867, 4133, 11371, 210, 4600, 0, 74560,
- 4137, 8082, 78506, 119062, 78504, 6704, 4591, 128029, 0, 0, 9680, 0,
- 120623, 561, 12159, 195, 78508, 41501, 0, 42031, 5719, 7172, 42687, 8368,
- 0, 41499, 0, 0, 42242, 41498, 917794, 42025, 78565, 65805, 42463, 0,
- 2924, 0, 120510, 0, 0, 119213, 73941, 0, 42330, 917784, 3969, 0, 0, 7169,
- 1992, 9652, 73977, 7246, 42086, 126615, 2219, 0, 0, 128801, 194837, 0,
- 327, 0, 9042, 917777, 917776, 65148, 12433, 917781, 127276, 917779,
- 12431, 8668, 12434, 983835, 917782, 5999, 0, 7712, 12432, 128243, 43653,
- 1726, 1015, 0, 8212, 0, 128014, 42423, 119066, 0, 128108, 66709, 0, 8811,
- 927, 0, 0, 12436, 983245, 42021, 0, 0, 1299, 12240, 42350, 65143, 0,
- 195016, 0, 78197, 11348, 0, 78037, 9194, 983184, 0, 19914, 12179, 983812,
- 2296, 194923, 63836, 63832, 917773, 10967, 63816, 2594, 3444, 63817,
- 64651, 0, 41503, 127478, 11265, 0, 120756, 194922, 0, 5664, 3972, 0, 0,
- 0, 128508, 12416, 917764, 119608, 10816, 917769, 917768, 12418, 74111,
- 3882, 8532, 917771, 1573, 128648, 119847, 4596, 66339, 12417, 66001,
- 65343, 126491, 12414, 8287, 68219, 195017, 68108, 1143, 119169, 119846,
- 12415, 6626, 42763, 0, 118884, 9021, 120783, 0, 11724, 0, 0, 127104,
- 126619, 0, 0, 8027, 10997, 9171, 12741, 11400, 71305, 194799, 0, 128239,
- 0, 128881, 119604, 127523, 120190, 194773, 67608, 128214, 42368, 0, 7715,
- 3881, 41487, 12118, 42514, 68651, 0, 983895, 3009, 41476, 41489, 69825,
- 3007, 1448, 3018, 194809, 3889, 8521, 5083, 5082, 119859, 120184, 8519,
- 983241, 3014, 5081, 65853, 120715, 0, 68014, 69951, 5079, 64802, 42210,
- 4597, 65532, 11828, 120185, 12371, 0, 8407, 0, 10805, 8518, 10779,
- 120188, 71303, 983933, 12367, 42170, 0, 92557, 629, 1924, 0, 12037,
- 74366, 5987, 8462, 8005, 12365, 63933, 69735, 120815, 12369, 10649,
- 67981, 5077, 120174, 10880, 63927, 5075, 917881, 0, 65075, 0, 11007,
- 983705, 66659, 92607, 0, 66684, 0, 3434, 4954, 1904, 0, 5266, 126980,
- 5272, 10499, 4507, 9578, 63923, 120177, 7979, 0, 9831, 0, 194926, 461,
- 9803, 0, 4504, 1505, 0, 6325, 5276, 43021, 120488, 0, 55236, 0, 66461,
- 5177, 41324, 12055, 8722, 0, 41327, 0, 66695, 4114, 409, 4383, 8900,
- 8948, 41325, 0, 721, 10182, 9108, 71311, 0, 119185, 42229, 194912, 0,
- 5998, 0, 42353, 74825, 0, 12587, 94104, 78571, 0, 71328, 194562, 41576,
- 42215, 78570, 119207, 0, 8578, 5995, 7573, 41575, 74789, 74752, 63944,
- 63949, 64767, 2670, 4167, 194796, 11723, 0, 74120, 0, 65076, 938, 43414,
- 73854, 11737, 9721, 0, 0, 0, 11742, 2419, 0, 11493, 12334, 194913, 4153,
- 12302, 10793, 5250, 12407, 11978, 4404, 9189, 12401, 42007, 5775, 6759,
- 65806, 43997, 0, 42002, 12404, 983553, 0, 4940, 12410, 7683, 1167, 73729,
- 4983, 120507, 861, 0, 0, 0, 0, 43757, 43370, 0, 0, 11956, 0, 0, 0, 9616,
- 6631, 0, 12816, 43759, 42218, 12710, 68674, 12721, 4101, 66185, 0, 5992,
- 7616, 195044, 0, 12577, 0, 983884, 853, 42693, 195014, 0, 983647, 5016,
- 43535, 63893, 42835, 9491, 917913, 0, 917914, 0, 12712, 7105, 127807,
- 65060, 120797, 9900, 7750, 0, 194919, 0, 127830, 0, 64778, 12585, 10565,
- 128151, 12177, 0, 0, 0, 77824, 0, 4900, 127874, 12878, 92630, 8984, 4119,
- 74768, 8971, 78593, 43113, 9702, 78594, 11025, 9245, 13048, 4927, 4138,
- 74185, 92481, 92710, 12397, 77827, 0, 13054, 12394, 0, 0, 0, 13053, 0,
- 3948, 10781, 1546, 0, 5010, 1680, 10507, 78590, 78583, 0, 0, 0, 194915,
- 7267, 0, 74833, 128181, 5993, 2819, 0, 12706, 77840, 1893, 7266, 63915,
- 7264, 7265, 0, 1363, 0, 63997, 63910, 63996, 3077, 0, 0, 1512, 69929,
- 12589, 41479, 128313, 0, 43339, 73776, 9836, 120727, 0, 41481, 43335,
- 7832, 42343, 3090, 43337, 817, 1664, 1850, 128841, 3079, 11340, 42408,
- 42447, 127140, 120020, 42307, 12386, 42304, 917555, 0, 12389, 0, 92366,
- 41996, 11526, 63985, 5864, 1147, 63992, 42887, 1987, 92718, 5480, 7858,
- 11653, 4116, 12391, 66193, 0, 4939, 12384, 0, 0, 41686, 63905, 119601,
- 194688, 983190, 0, 12649, 0, 0, 8247, 507, 91, 2042, 120775, 43643,
- 194689, 66028, 10036, 41844, 119813, 774, 119829, 0, 119815, 5994, 12539,
- 0, 78375, 120597, 119833, 983105, 119600, 0, 0, 7719, 6026, 2486, 128312,
- 119808, 162, 0, 65219, 41073, 9687, 41681, 6304, 119812, 66196, 194881,
- 5262, 0, 55233, 12681, 42379, 0, 7534, 12219, 0, 127528, 42810, 10492, 0,
- 983661, 0, 43119, 0, 120753, 12403, 2500, 195013, 0, 4899, 12729, 0, 0,
- 74113, 2343, 4103, 19946, 74112, 77851, 13112, 0, 195012, 12859, 70087,
- 120148, 66369, 5861, 127758, 11999, 12400, 0, 983839, 12645, 5146, 11320,
- 68410, 6748, 65040, 0, 64184, 12974, 64183, 67613, 120645, 5147, 0, 0,
- 74524, 0, 1928, 0, 67649, 5991, 3445, 67609, 4976, 64176, 0, 67610, 8241,
- 0, 77868, 4206, 0, 0, 0, 128298, 0, 10138, 0, 0, 8897, 120234, 0, 8357,
- 4124, 77862, 65836, 120641, 127926, 77859, 0, 0, 1123, 963, 41553, 10120,
- 12405, 120150, 92664, 398, 13278, 9723, 6366, 120311, 7945, 0, 4402,
- 9970, 12402, 983136, 42392, 1305, 12408, 0, 44007, 0, 0, 41464, 12411,
- 12969, 120824, 41465, 983565, 8528, 1575, 0, 63955, 165, 3024, 41467,
- 119163, 0, 9093, 0, 9147, 128787, 63958, 0, 9148, 9692, 4096, 53, 8296,
- 6750, 195018, 0, 9594, 0, 0, 43527, 0, 727, 194703, 195023, 5805, 0,
- 6726, 0, 42176, 12370, 11655, 119095, 10591, 2280, 0, 12372, 120642,
- 120307, 0, 92343, 0, 12366, 10963, 6066, 1329, 0, 3052, 9220, 0, 64478,
- 194701, 10803, 4132, 120306, 68474, 92473, 0, 983313, 74837, 120155,
- 1499, 0, 8055, 42740, 63965, 0, 63962, 74042, 8924, 43123, 5988, 3660,
- 63969, 11781, 42718, 8788, 1357, 64851, 65743, 0, 8774, 0, 127086, 9941,
- 120172, 0, 1933, 69655, 9564, 0, 92435, 73866, 0, 0, 2487, 67614, 3121,
- 1804, 3311, 67615, 70081, 78302, 12220, 67616, 120598, 127475, 0, 68200,
- 6675, 128144, 0, 67592, 120685, 0, 64771, 1198, 9132, 0, 64619, 510,
- 64663, 0, 0, 4561, 2101, 1398, 0, 92554, 74034, 41569, 92684, 11406,
- 8167, 12127, 0, 840, 0, 126518, 7101, 6967, 0, 194898, 9796, 0, 333,
- 69891, 0, 8144, 2117, 0, 983595, 12406, 0, 19931, 119089, 6678, 7769, 0,
- 12621, 0, 127366, 10227, 4764, 43101, 9981, 0, 40986, 4127, 66487, 0,
- 42202, 12754, 195022, 0, 0, 94097, 67594, 2048, 12944, 4050, 67595,
- 917967, 43102, 10581, 12985, 4533, 195021, 74003, 6490, 0, 12038, 0, 0,
- 120704, 65461, 9798, 69704, 0, 1948, 69841, 0, 952, 128235, 0, 0, 120802,
- 6449, 9494, 120313, 0, 43098, 4843, 8142, 64160, 4098, 64170, 0, 0, 3436,
- 119973, 0, 12817, 67597, 6676, 3930, 42615, 0, 0, 67598, 0, 0, 0, 65591,
- 41581, 65916, 1453, 0, 0, 0, 8500, 42222, 120142, 73743, 120400, 4317,
- 11543, 67676, 64676, 0, 0, 67606, 119083, 0, 42217, 13102, 0, 66003,
- 6672, 0, 0, 0, 983747, 63841, 9613, 9001, 4526, 11274, 67601, 64520,
- 64210, 6664, 78704, 42056, 10228, 64957, 11281, 0, 3807, 1469, 66640,
- 65381, 42197, 4988, 42372, 0, 9598, 904, 352, 42225, 1451, 8061, 8453,
- 4134, 0, 74847, 66576, 127916, 0, 10520, 8575, 9960, 1201, 127289, 12846,
- 127291, 127292, 11919, 64962, 127287, 43739, 127281, 8511, 9460, 823,
- 11587, 12305, 0, 64695, 127305, 12387, 1253, 13183, 65766, 500, 42783,
- 65765, 64208, 64369, 65760, 65761, 119585, 11606, 64784, 11702, 66498,
- 9821, 64304, 0, 5152, 11048, 7533, 68366, 64410, 92305, 0, 4323, 120062,
- 92669, 71332, 127052, 42587, 42214, 41394, 0, 4763, 4112, 118935, 0,
- 5260, 43143, 94038, 326, 120131, 68423, 0, 10771, 2876, 74074, 92530,
- 194924, 41398, 7382, 9802, 127077, 127076, 453, 41396, 120524, 42720,
- 12140, 9572, 0, 7003, 194883, 42334, 7704, 126490, 194885, 43144, 4123,
- 8494, 43146, 9977, 0, 0, 65759, 10765, 64061, 4465, 9808, 64056, 65582,
- 4126, 0, 9521, 9589, 64755, 0, 64020, 126604, 10464, 0, 0, 194869, 64514,
- 11528, 64024, 128072, 679, 64013, 0, 5850, 758, 7536, 0, 92234, 41441,
- 10693, 64006, 983567, 64005, 4058, 119019, 126487, 64660, 0, 119050, 0,
- 983069, 1139, 43298, 64027, 64029, 8970, 0, 9934, 983094, 10774, 128020,
- 42201, 12421, 128216, 0, 1852, 3057, 64046, 73744, 64034, 64039, 0, 0, 0,
- 194899, 92322, 7645, 12854, 74338, 3496, 0, 0, 0, 9102, 627, 127795,
- 6158, 8327, 74553, 66632, 12419, 13309, 11570, 127811, 19960, 11696, 0,
- 1018, 118970, 194909, 194897, 1682, 194896, 194911, 42756, 6765, 194906,
- 0, 0, 73814, 11412, 6768, 10728, 194830, 71316, 118863, 43311, 64966,
- 11577, 0, 43040, 1833, 11576, 0, 74779, 0, 185, 65085, 74533, 64754,
- 194848, 7535, 8085, 42525, 120387, 9749, 41701, 6131, 1949, 4117, 7847,
- 120489, 194711, 64483, 65693, 0, 0, 0, 69695, 42240, 0, 126651, 42864,
- 126498, 64667, 41868, 1184, 0, 815, 11484, 127535, 67840, 983651, 0,
- 66197, 0, 10986, 64683, 983785, 0, 3455, 0, 0, 9879, 0, 0, 4158, 128050,
- 68166, 0, 0, 0, 0, 69645, 332, 118808, 0, 5142, 2407, 69643, 42199, 0,
- 92404, 74373, 0, 55217, 0, 63870, 43163, 0, 0, 92390, 42867, 1834, 0,
- 92461, 69817, 10940, 65249, 119040, 8662, 0, 0, 2652, 120527, 7164,
- 10784, 195093, 67674, 0, 92233, 92482, 194749, 74562, 917505, 1828,
- 74474, 120327, 78620, 8531, 12499, 6280, 12324, 118854, 65238, 68374,
- 4832, 65573, 0, 6279, 12508, 12904, 12502, 9161, 0, 1620, 64436, 3601,
- 195094, 128073, 983562, 609, 11555, 983099, 12496, 127839, 74181, 4343,
- 12505, 0, 127863, 0, 11377, 239, 0, 637, 0, 0, 42671, 0, 0, 0, 43565,
- 71306, 126493, 12696, 128256, 0, 94062, 12929, 0, 712, 0, 4197, 983206,
- 42818, 126632, 0, 120490, 0, 119137, 1506, 43562, 0, 92491, 0, 12651, 0,
- 64628, 74517, 12058, 74084, 917838, 7494, 0, 4924, 65592, 118844, 0,
- 127088, 355, 9719, 127087, 13066, 64796, 0, 0, 12033, 42178, 0, 69760,
- 42571, 92635, 0, 0, 0, 0, 0, 127176, 3178, 0, 0, 92704, 0, 9080, 127000,
- 120352, 0, 68209, 0, 11082, 0, 5699, 195100, 66000, 9488, 65166, 119112,
- 0, 0, 0, 0, 71313, 0, 5265, 69235, 0, 11487, 67858, 12464, 0, 43045, 0,
- 0, 43345, 0, 10770, 118994, 6807, 465, 9829, 0, 74348, 0, 43346, 8116,
- 795, 0, 0, 12462, 10930, 10831, 0, 118952, 64362, 74334, 983602, 120811,
- 0, 12468, 8607, 1008, 0, 10092, 195078, 917842, 67855, 55257, 73771,
- 1766, 11282, 11996, 1820, 4547, 0, 0, 0, 0, 13223, 128665, 64595, 127294,
- 0, 92311, 4345, 12616, 0, 0, 0, 74467, 0, 0, 0, 5382, 0, 0, 0, 119060,
- 64953, 5406, 19920, 69897, 66510, 3590, 194864, 1130, 0, 0, 42016, 11823,
- 43023, 0, 118896, 7742, 0, 13280, 71323, 9326, 73826, 5310, 74812, 78584,
- 92229, 8959, 43589, 6747, 66723, 0, 8568, 0, 120496, 73816, 120803,
- 983848, 42670, 0, 11621, 12460, 0, 120631, 0, 43063, 74519, 127182, 0,
- 73917, 7843, 69783, 11689, 5410, 5783, 10468, 8403, 5400, 11594, 128247,
- 0, 118990, 10491, 69842, 64412, 0, 0, 5587, 42865, 64404, 8268, 4923,
- 65086, 8981, 12382, 42133, 120755, 9706, 69738, 0, 66610, 10461, 12103,
- 0, 8642, 0, 42766, 983866, 2210, 9983, 0, 94009, 0, 0, 0, 7398, 41515, 0,
- 11802, 8041, 1461, 910, 119133, 0, 6749, 3658, 93964, 120525, 0, 7617,
- 194841, 12888, 127983, 67668, 13143, 0, 9193, 11097, 5703, 0, 41517,
- 41504, 41519, 10016, 64305, 0, 65864, 623, 781, 670, 10660, 5769, 613,
- 7543, 120279, 477, 41083, 92521, 0, 592, 1578, 12459, 43449, 0, 0, 8225,
- 0, 654, 11345, 653, 652, 0, 647, 0, 633, 120744, 0, 126472, 12480, 43243,
- 0, 39, 12487, 0, 120529, 74199, 12482, 0, 12489, 0, 3195, 5550, 983554,
- 7897, 0, 1203, 74396, 1813, 64544, 41311, 12090, 0, 2877, 0, 0, 1675,
- 69840, 0, 0, 0, 10070, 10595, 0, 119077, 194777, 983611, 0, 0, 0, 43244,
- 0, 0, 983916, 119561, 983078, 0, 194921, 128160, 9939, 0, 983151, 77860,
- 0, 0, 270, 0, 10714, 0, 0, 0, 0, 0, 65372, 0, 74038, 119558, 6273, 66679,
- 364, 9595, 194908, 0, 0, 707, 0, 0, 9282, 66489, 224, 0, 68670, 9332,
- 4966, 68677, 0, 68644, 0, 3841, 68634, 0, 10732, 68640, 850, 4972, 0,
- 12890, 2909, 68619, 44008, 68627, 983718, 11544, 10203, 9608, 0, 0,
- 11962, 194694, 12507, 1196, 128687, 128311, 777, 120187, 4375, 65271,
- 67678, 0, 12198, 0, 64824, 119343, 983236, 9454, 63778, 8658, 42528,
- 78000, 2705, 917975, 41520, 0, 0, 11986, 7765, 42502, 8280, 74520, 2701,
- 0, 127002, 5767, 0, 0, 9809, 8353, 63747, 66701, 63772, 983814, 63745,
- 1748, 63770, 0, 0, 0, 65542, 63766, 55244, 3061, 0, 63764, 63787, 9067,
- 6096, 0, 7694, 0, 7257, 63768, 3485, 12987, 0, 127522, 120628, 63807,
- 1591, 0, 6386, 63783, 0, 0, 92535, 0, 0, 0, 74575, 0, 65719, 13083,
- 64574, 65012, 0, 1640, 12495, 66691, 7624, 3138, 10996, 92247, 1922, 0,
- 12498, 10987, 69936, 69939, 3894, 65543, 0, 194842, 983588, 493, 0,
- 43197, 1717, 4228, 479, 10303, 74020, 0, 917935, 10335, 3520, 917932,
- 12490, 64315, 0, 127039, 12493, 6233, 42681, 1002, 12491, 0, 64911,
- 92615, 2096, 65120, 0, 78219, 983081, 8378, 11632, 127041, 66213, 63864,
+ 43567, 74056, 120266, 11833, 119919, 7216, 65232, 7217, 251, 7218, 7895,
+ 4395, 43538, 119926, 119834, 119928, 7213, 68476, 7214, 7215, 5879,
+ 74141, 8880, 7685, 66459, 120173, 65540, 67359, 625, 8187, 42861, 1113,
+ 7236, 7915, 3630, 120176, 8179, 70163, 67886, 9316, 10980, 2489, 65624,
+ 8150, 1359, 67652, 70464, 127330, 73756, 5042, 5041, 42769, 12084,
+ 127324, 127321, 74410, 127319, 127320, 127317, 121284, 127315, 12283,
+ 1616, 3795, 67732, 8795, 66245, 0, 0, 0, 1138, 73905, 12677, 128280,
+ 67724, 3239, 66893, 128818, 0, 8431, 0, 42164, 71229, 11778, 12620, 6826,
+ 73773, 70169, 5040, 127969, 0, 67094, 78420, 0, 5039, 983241, 78418, 0,
+ 5038, 0, 983862, 13184, 43960, 120931, 64648, 0, 9359, 78416, 917623,
+ 128770, 65157, 6662, 0, 70182, 3863, 73909, 4835, 55266, 43432, 127822,
+ 4309, 7127, 194569, 0, 194568, 1301, 0, 42589, 569, 128804, 73813, 711,
+ 4389, 7133, 120643, 73880, 11610, 11368, 0, 194570, 41331, 1006, 74240,
+ 67224, 1550, 8201, 70453, 7627, 5499, 5031, 77908, 42738, 65784, 43957,
+ 65267, 3758, 0, 65781, 64734, 67222, 2440, 43955, 70787, 8449, 0, 5008,
+ 983572, 2118, 126508, 12121, 8255, 5512, 73875, 2128, 2130, 2131, 2126,
+ 2133, 1119, 121250, 2114, 2116, 2455, 113798, 2122, 2123, 2124, 2125,
+ 127486, 8714, 983820, 2113, 195049, 2115, 128177, 127907, 43713, 5052,
+ 66220, 5821, 6186, 65778, 65775, 5051, 65773, 1429, 42647, 5050, 302,
+ 388, 41115, 735, 6637, 5907, 65088, 0, 12726, 74594, 9117, 983181, 12003,
+ 5513, 5109, 5053, 74230, 5510, 78451, 0, 78447, 2470, 78437, 0, 1925,
+ 71251, 92237, 74807, 983062, 5048, 5047, 194837, 983380, 74201, 92313,
+ 194802, 74497, 82982, 8089, 6929, 639, 82981, 68179, 64442, 70180, 82984,
+ 4599, 41402, 6674, 43397, 43294, 1476, 648, 0, 65819, 3233, 0, 41782,
+ 6951, 94017, 129197, 3530, 9750, 128317, 120991, 6656, 42618, 70175,
+ 5046, 8512, 65856, 74261, 8967, 0, 5045, 42026, 1916, 7986, 5044, 120556,
+ 9006, 13128, 5043, 121335, 7853, 67808, 74004, 9669, 12341, 12703, 8402,
+ 128883, 119070, 70174, 41750, 3586, 64508, 43148, 0, 127971, 119606,
+ 67983, 13296, 517, 0, 128467, 194946, 41528, 123, 65454, 0, 121326,
+ 74478, 10531, 7784, 41526, 10829, 73991, 8057, 1126, 73895, 194857,
+ 194591, 0, 3925, 4251, 8069, 10517, 71112, 489, 71110, 4250, 92266,
+ 120452, 43151, 983178, 92738, 66200, 0, 0, 125026, 74298, 128879, 983476,
+ 8711, 6183, 83448, 983952, 72402, 120448, 7623, 118925, 66376, 9235,
+ 12760, 74176, 69662, 66445, 43540, 10062, 3743, 11514, 11078, 0, 12136,
+ 0, 126597, 120434, 194850, 7726, 195095, 19922, 267, 3393, 42198, 1371,
+ 194849, 69233, 2458, 0, 6201, 0, 41074, 4266, 10652, 41612, 41077, 3402,
+ 9050, 3398, 128424, 983350, 0, 3391, 41075, 2476, 0, 128017, 0, 10625,
+ 129106, 12767, 13017, 78743, 64261, 64934, 70152, 13014, 13013, 121198,
+ 6673, 0, 0, 121324, 12438, 0, 983344, 83106, 71128, 120062, 9053, 13015,
+ 74523, 0, 704, 66215, 6195, 74949, 6660, 78758, 917760, 74861, 42212,
+ 12629, 11435, 0, 55256, 65538, 67343, 121437, 129086, 43876, 92941,
+ 65448, 78100, 12948, 119001, 128595, 43949, 120048, 78099, 127085, 0,
+ 128320, 4287, 8276, 4902, 1131, 983606, 78458, 66728, 1816, 43952, 42533,
+ 168, 42845, 4898, 64298, 43950, 78105, 4901, 1821, 43951, 578, 3653,
+ 128946, 791, 9162, 6977, 74196, 78889, 70160, 0, 73731, 8354, 43590,
+ 119303, 983451, 7557, 119108, 67378, 8234, 7241, 128608, 113735, 119167,
+ 194996, 12811, 65925, 3946, 78078, 10998, 78080, 673, 194867, 64397,
+ 128276, 74599, 78449, 8890, 194977, 194976, 2448, 78085, 10267, 8424,
+ 2452, 78083, 67217, 8729, 78456, 0, 7845, 126564, 71302, 4408, 4122,
+ 6772, 11039, 8723, 65896, 71310, 119302, 731, 119304, 71904, 2438, 64855,
+ 119300, 119299, 1175, 0, 42135, 373, 119172, 2119, 11457, 11521, 7723,
+ 128639, 0, 0, 41952, 93023, 5273, 2127, 5269, 6337, 5202, 2404, 5267,
+ 42823, 11291, 19915, 5277, 12963, 70320, 6189, 4125, 1314, 12133, 120340,
+ 118873, 1271, 983640, 129112, 66024, 41482, 3864, 9204, 0, 3879, 0,
+ 12978, 4166, 4574, 128111, 7567, 7459, 78128, 41390, 5384, 41882, 67647,
+ 70154, 5759, 194869, 121413, 41388, 64446, 41392, 64288, 41387, 67201,
+ 8706, 5552, 68837, 700, 0, 5553, 0, 7088, 5356, 7499, 68007, 66596,
+ 74066, 67251, 10263, 5554, 0, 12344, 10311, 78113, 6665, 11115, 121035,
+ 7618, 8517, 11455, 78440, 64632, 64447, 5555, 78088, 78093, 78091, 0,
+ 42803, 65033, 9143, 6668, 67288, 67995, 195069, 656, 195071, 65037, 4577,
+ 64624, 0, 0, 71912, 194908, 4269, 73885, 917775, 42846, 69644, 950, 0,
+ 92273, 66580, 77992, 66683, 10554, 119008, 119121, 6832, 5098, 917768,
+ 194668, 70403, 5097, 4935, 9848, 10381, 0, 67296, 92896, 3651, 0, 67294,
+ 70848, 5102, 5101, 10269, 12983, 8138, 4517, 1932, 5100, 1439, 12093,
+ 1247, 10034, 121340, 5099, 78373, 1441, 42087, 3063, 650, 119953, 7838,
+ 0, 128655, 195040, 119142, 9031, 70829, 78427, 9078, 8545, 66356, 128799,
+ 194923, 9154, 9118, 126543, 119586, 2676, 2277, 128422, 68237, 6190,
+ 8599, 125118, 69918, 10795, 9857, 7014, 9856, 195033, 71903, 12129,
+ 126651, 8481, 83068, 6202, 67711, 10920, 113726, 5203, 195039, 195038,
+ 5108, 5107, 65818, 66019, 9762, 11205, 5541, 74772, 0, 12613, 5284, 6657,
+ 207, 121206, 4275, 74819, 854, 68147, 74381, 66816, 78786, 5103, 127861,
+ 64348, 41368, 43974, 488, 69811, 0, 71339, 10157, 194612, 43034, 11438,
+ 64674, 0, 70158, 68431, 41771, 5106, 6669, 8504, 65154, 69813, 41367,
+ 5105, 65266, 69720, 6476, 5104, 983749, 304, 3176, 78871, 70149, 932,
+ 113683, 6567, 238, 69656, 78432, 194595, 19905, 43850, 195015, 78870,
+ 41044, 67640, 67302, 42055, 9912, 65939, 10670, 74093, 13273, 0, 12552,
+ 93039, 8803, 309, 6622, 8151, 10858, 78706, 67636, 70171, 12568, 127917,
+ 12553, 10814, 43275, 6950, 9712, 68680, 43970, 126535, 65165, 92725, 0,
+ 66466, 124986, 127784, 0, 66725, 6191, 11351, 10437, 11316, 67634, 43763,
+ 0, 41754, 67635, 9370, 2720, 194600, 68462, 8232, 118817, 121056, 3222,
+ 121439, 121137, 0, 66663, 983047, 93067, 10834, 983127, 0, 65732, 94095,
+ 917547, 92682, 67679, 120734, 67309, 7781, 41383, 64568, 67311, 120738,
+ 12077, 74433, 64586, 917620, 42396, 55255, 3475, 67260, 2479, 67306,
+ 3632, 120728, 10698, 8376, 3648, 67263, 74844, 67639, 3636, 67894, 3650,
+ 8837, 65229, 1843, 42283, 43250, 41562, 9100, 74548, 68826, 3640, 127190,
+ 42321, 7284, 92880, 118987, 194950, 194949, 74115, 194951, 126649,
+ 194953, 42080, 2529, 0, 983784, 66010, 42083, 74952, 68398, 194957,
+ 67619, 66367, 194958, 9634, 92380, 9988, 0, 41068, 0, 4295, 65264, 68006,
+ 0, 67835, 0, 785, 8236, 128647, 9027, 68160, 67623, 64383, 120265, 925,
+ 127156, 0, 41985, 41071, 9586, 120988, 41984, 9217, 128372, 92510, 92218,
+ 9186, 2067, 4016, 983803, 0, 381, 12936, 0, 42077, 92985, 69880, 5184,
+ 42078, 194607, 10810, 128531, 4585, 19943, 5860, 67633, 121334, 127104,
+ 812, 3615, 72401, 5178, 44000, 92436, 78807, 5188, 74287, 67629, 3605,
+ 10692, 1166, 64429, 42639, 924, 127793, 67631, 42616, 120670, 2442,
+ 10703, 67317, 67632, 67316, 12771, 12736, 12753, 66708, 73933, 67626,
+ 42401, 194865, 69872, 127373, 42288, 12751, 74906, 8542, 13145, 194963,
+ 2468, 66706, 41294, 3626, 3883, 64388, 42479, 71220, 41117, 0, 92580,
+ 128624, 74939, 67624, 127976, 1290, 0, 65585, 2715, 806, 65208, 41884,
+ 917883, 1318, 64731, 78004, 0, 0, 66325, 3465, 2405, 9240, 983858, 12756,
+ 65259, 0, 983781, 12752, 5833, 1432, 11246, 41883, 73912, 9799, 917893,
+ 41886, 2480, 127906, 2062, 67326, 6494, 5537, 78656, 0, 194587, 124969,
+ 1211, 0, 120971, 67269, 118832, 12318, 129024, 113796, 68005, 10622,
+ 983779, 0, 68821, 6566, 71195, 0, 73780, 119196, 64864, 0, 78660, 0,
+ 8284, 13081, 119206, 3589, 42051, 4035, 6492, 83003, 4265, 6642, 3977,
+ 74186, 41778, 836, 92947, 2488, 125096, 4582, 0, 71426, 41777, 12926,
+ 983379, 7528, 10550, 113761, 92706, 983955, 10961, 93977, 1374, 64878,
+ 119014, 67720, 42389, 41374, 2286, 917604, 78492, 41377, 127909, 195047,
+ 400, 12597, 120586, 128097, 129071, 6661, 917961, 64827, 0, 73817, 390,
+ 0, 71301, 127292, 3473, 7718, 113755, 68814, 0, 55285, 73784, 66394, 0,
+ 11969, 120461, 127841, 6365, 1887, 6763, 92551, 8080, 7006, 0, 118902,
+ 6757, 64351, 1544, 67156, 6766, 64677, 120716, 67088, 6146, 74031, 771,
+ 120682, 0, 12812, 13168, 42272, 12200, 66423, 7904, 0, 953, 12917,
+ 119560, 12300, 67089, 11491, 9724, 10341, 983773, 9524, 7490, 11389,
+ 7489, 3379, 0, 7487, 194624, 471, 7484, 7482, 6753, 7480, 5764, 7478,
+ 7477, 6501, 7475, 6918, 7473, 7472, 2474, 7470, 7468, 10232, 10615,
+ 10213, 127288, 92357, 10049, 11834, 3544, 983785, 6017, 65311, 74935,
+ 120216, 13306, 10533, 7870, 73949, 7625, 194882, 120544, 0, 127950,
+ 92660, 983356, 77889, 0, 19961, 2472, 42665, 92341, 121133, 2139, 4256,
+ 120776, 74380, 43836, 42675, 42658, 12845, 6666, 70508, 65138, 119355,
+ 67862, 0, 65671, 7083, 120008, 8066, 7678, 74865, 125134, 120321, 127283,
+ 983396, 7186, 0, 120555, 0, 445, 120566, 66849, 125141, 0, 8330, 0, 0,
+ 42797, 113736, 120215, 83001, 3902, 0, 1770, 43959, 125067, 1560, 43958,
+ 92167, 4584, 73843, 0, 11712, 10866, 67092, 1118, 71334, 74888, 0, 1081,
+ 7436, 11147, 7252, 70093, 5996, 69921, 4903, 68142, 41386, 5162, 119189,
+ 1330, 128613, 7139, 0, 12047, 41384, 0, 0, 1848, 4334, 6324, 41975,
+ 64777, 10674, 12308, 12186, 0, 0, 983741, 12715, 68002, 194576, 83256,
+ 2018, 66672, 41979, 66685, 119157, 68000, 78490, 0, 126984, 68001, 9334,
+ 92705, 70800, 70101, 7975, 0, 77957, 0, 43494, 4884, 66597, 69732, 0,
+ 121010, 6313, 65513, 69857, 0, 0, 0, 2345, 43697, 463, 0, 127890, 68178,
+ 3117, 5460, 121423, 128717, 983389, 0, 42279, 127142, 126503, 78415,
+ 983228, 68524, 983386, 13248, 125027, 983843, 43956, 128415, 983153,
+ 121009, 5663, 71120, 128472, 128958, 0, 2482, 1471, 194583, 113747,
+ 42247, 12378, 73925, 69664, 71427, 12374, 121357, 127067, 0, 118828,
+ 2460, 71882, 11944, 12376, 92342, 64679, 92893, 12380, 10557, 64473,
+ 5870, 11122, 2024, 127180, 983391, 71879, 539, 0, 120302, 70120, 3853,
+ 65180, 127923, 120796, 120245, 92324, 0, 8659, 0, 12474, 67241, 9503,
+ 194969, 2478, 120248, 4162, 0, 4260, 12953, 69633, 82966, 12470, 92640,
+ 74189, 2742, 12476, 11798, 10946, 127310, 5000, 113687, 983579, 128190,
+ 69672, 8213, 43824, 7771, 6161, 68018, 6709, 194967, 78885, 119243,
+ 68235, 120582, 78547, 113709, 10301, 10333, 10397, 119044, 0, 73791, 0,
+ 83030, 0, 121482, 119123, 4014, 12842, 73952, 12015, 127290, 8275, 3893,
+ 74903, 120927, 12210, 7221, 42147, 74868, 74550, 71215, 64747, 118841,
+ 128086, 12516, 4444, 0, 92271, 74537, 10892, 8231, 0, 6473, 41968, 78388,
+ 41973, 3591, 41969, 83008, 2453, 118899, 92666, 64705, 71068, 0, 10349,
+ 10413, 43591, 41962, 3202, 74353, 129175, 8316, 129174, 0, 94060, 687,
+ 93055, 129074, 0, 1840, 127809, 68671, 11121, 4883, 285, 4723, 11175,
+ 92692, 4459, 74577, 42921, 41720, 11089, 240, 19906, 0, 42323, 74640,
+ 9743, 120232, 13134, 93065, 128956, 65931, 92579, 128329, 42634, 983345,
+ 43437, 3081, 11463, 120154, 0, 195013, 10445, 121322, 92969, 66717, 2614,
+ 9125, 71125, 1729, 129034, 72420, 65221, 63883, 43334, 64852, 124929,
+ 65194, 66201, 0, 66578, 5001, 41879, 74427, 4121, 5003, 884, 66700,
+ 63879, 4943, 5150, 73889, 73764, 4039, 643, 3086, 92533, 42448, 42299,
+ 58, 120084, 917952, 120083, 63873, 8491, 0, 0, 983623, 4530, 42409, 7126,
+ 194575, 2721, 120073, 119096, 19929, 118941, 128797, 92975, 4242, 4264,
+ 120077, 120530, 66179, 42412, 65941, 13114, 64522, 10740, 3094, 983199,
+ 9754, 119102, 4437, 73948, 127074, 983240, 55280, 42174, 127954, 42430,
+ 0, 983452, 42355, 66026, 4306, 41380, 68432, 92586, 68314, 66667, 119351,
+ 194982, 121172, 42200, 42566, 70000, 128928, 5088, 6948, 0, 8524, 125040,
+ 0, 12385, 0, 74926, 69646, 1386, 64580, 11480, 6116, 65039, 65038, 12392,
+ 65036, 8064, 127558, 12101, 5822, 119004, 2080, 710, 77999, 11663, 1666,
+ 42091, 119657, 12383, 43671, 42092, 68418, 4289, 127897, 63896, 12061,
+ 42096, 43621, 3362, 12377, 119934, 983834, 68449, 7461, 73901, 1244, 331,
+ 73786, 12683, 10662, 0, 8112, 0, 65852, 74629, 12379, 127107, 92930,
+ 41964, 42208, 63843, 2084, 41965, 70089, 65866, 4327, 0, 63840, 66413,
+ 41220, 13032, 92980, 584, 12933, 43177, 12373, 69855, 13000, 1351, 2935,
+ 8698, 12665, 0, 1930, 0, 78229, 12427, 66514, 69859, 13031, 0, 63901, 0,
+ 3657, 119611, 65202, 6000, 113786, 12426, 121058, 119935, 41740, 12428,
+ 41283, 41916, 119210, 128318, 0, 12429, 6727, 983948, 7562, 125129, 5170,
+ 983915, 41755, 676, 0, 66704, 66664, 9978, 66491, 3536, 0, 9752, 92397,
+ 6162, 78320, 69228, 10113, 41829, 65886, 5159, 12422, 41832, 439, 3072,
+ 917828, 42207, 74549, 11796, 40970, 41830, 125021, 70151, 8308, 917797,
+ 70807, 119258, 67864, 113696, 917800, 12336, 4135, 67231, 341, 2727,
+ 4129, 3539, 0, 63861, 0, 7913, 0, 63859, 4131, 63868, 129085, 63867,
+ 4133, 11371, 210, 4600, 983897, 74560, 4137, 8082, 78506, 119062, 78504,
+ 6704, 4591, 128029, 43873, 120753, 9680, 12937, 120623, 561, 12159, 195,
+ 68321, 41501, 194581, 42031, 5719, 7172, 42687, 8368, 128306, 41499,
+ 93068, 71047, 42242, 41498, 917794, 42025, 78565, 65805, 42463, 67182,
+ 2924, 67183, 120510, 0, 983972, 92766, 73941, 67186, 42330, 67187, 3969,
+ 121405, 0, 7169, 1992, 9652, 73977, 7246, 42086, 126615, 2219, 121349, 0,
+ 128801, 67180, 127569, 327, 121277, 9042, 917777, 917776, 65148, 12433,
+ 917781, 120222, 83129, 12431, 8668, 12434, 67194, 113812, 5999, 75013,
+ 7712, 12432, 128243, 43653, 1726, 1015, 74079, 8212, 128065, 113754,
+ 42423, 119066, 194613, 72398, 66709, 121061, 8811, 927, 92532, 0, 12436,
+ 120087, 42021, 0, 67644, 1299, 12240, 42350, 65143, 0, 195016, 127972,
+ 78197, 11348, 0, 78037, 9194, 983184, 0, 19914, 12179, 128740, 2296,
+ 128932, 63836, 63832, 917773, 10967, 63816, 2594, 3444, 63817, 11178,
+ 917584, 41503, 127478, 11265, 68295, 120756, 194922, 67285, 5664, 3972,
+ 120891, 128583, 129408, 67284, 12416, 917764, 119608, 10816, 917769,
+ 11210, 12418, 8586, 3882, 8532, 917771, 1573, 68081, 119847, 4596, 66339,
+ 12417, 66001, 65343, 126491, 12414, 8287, 68219, 195017, 68108, 1143,
+ 119169, 119846, 12415, 6626, 42763, 917594, 118884, 9021, 120783, 119931,
+ 11724, 127787, 0, 71122, 126619, 0, 983661, 8027, 10997, 9171, 12741,
+ 11400, 43943, 194799, 66833, 128239, 983707, 92557, 93976, 127523,
+ 120190, 1324, 67608, 128214, 42368, 983873, 7715, 3881, 41487, 12118,
+ 42514, 68651, 128210, 128594, 3009, 41476, 41489, 69825, 3007, 1448,
+ 3018, 194809, 3889, 8521, 5083, 5082, 119859, 78255, 8519, 121226, 3014,
+ 5081, 65853, 120715, 194992, 68014, 69951, 5079, 64802, 42210, 4597,
+ 65532, 11828, 120185, 12371, 11105, 8407, 67163, 10805, 8518, 10779,
+ 120188, 71303, 121240, 12367, 42170, 0, 67290, 629, 1924, 127098, 12037,
+ 67158, 5987, 8462, 8005, 12365, 63933, 69735, 120815, 12369, 10649,
+ 67981, 5077, 120174, 10880, 63927, 5075, 121109, 127300, 65075, 0, 11007,
+ 70851, 66659, 92607, 917933, 66684, 128063, 3434, 4954, 1904, 92679,
+ 5266, 126980, 5272, 10499, 4507, 9578, 63923, 120177, 7979, 0, 9831, 0,
+ 194926, 461, 9803, 42282, 4504, 1505, 127893, 6325, 5276, 43021, 120488,
+ 0, 55236, 92659, 66461, 5177, 41324, 12055, 8722, 120805, 41327, 983732,
+ 66695, 4114, 409, 4383, 8900, 8948, 41325, 74930, 721, 10182, 9108,
+ 71311, 0, 119185, 42229, 74963, 121014, 5998, 0, 42353, 74825, 0, 12587,
+ 94104, 78571, 74889, 71328, 128955, 41576, 42215, 78570, 74037, 0, 8578,
+ 5995, 7573, 41575, 74789, 74752, 63944, 63949, 64767, 2670, 4167, 194796,
+ 11723, 0, 74120, 126642, 65076, 938, 43414, 73854, 11737, 9721, 0, 67179,
+ 67168, 11742, 2419, 67177, 11493, 12334, 92494, 4153, 12302, 10793, 5250,
+ 12407, 11978, 4404, 9189, 12401, 42007, 5775, 6759, 65806, 43997, 0,
+ 42002, 12404, 68092, 74928, 4940, 12410, 7683, 1167, 73729, 4983, 120507,
+ 861, 67699, 74880, 68297, 983807, 43757, 43370, 129298, 0, 11956, 124967,
+ 121263, 70815, 9616, 6631, 92338, 12816, 43759, 42218, 12710, 68674,
+ 12721, 4101, 66185, 0, 5992, 7616, 195044, 0, 12577, 93017, 128289, 853,
+ 42693, 194647, 119027, 983284, 5016, 43535, 63893, 42835, 9491, 917913,
+ 0, 917914, 0, 12712, 7105, 127807, 65060, 66875, 9900, 7750, 917946,
+ 127896, 74619, 119265, 983587, 64778, 12585, 10565, 128151, 12177,
+ 119843, 983260, 0, 77824, 0, 4900, 127874, 12878, 92630, 8984, 4119,
+ 74768, 8971, 78593, 43113, 9702, 66852, 11025, 9245, 13048, 4927, 4138,
+ 74185, 92481, 92710, 12397, 77827, 119040, 13054, 12394, 0, 0, 194954,
+ 13053, 118974, 3948, 10781, 1546, 0, 5010, 1680, 10507, 78590, 78583,
+ 92431, 121037, 126644, 194915, 7267, 127479, 74833, 128181, 5993, 2819,
+ 128788, 12706, 71063, 1893, 7266, 63915, 7264, 7265, 0, 1363, 983580,
+ 42923, 63910, 63996, 3077, 120018, 0, 1512, 69929, 12589, 41479, 128313,
+ 71048, 43339, 73776, 9836, 120727, 983909, 41481, 43335, 7832, 42343,
+ 3090, 43337, 817, 1664, 1850, 83177, 3079, 11340, 42408, 42447, 74932,
+ 74044, 42307, 12386, 42304, 917555, 83428, 12389, 121079, 92366, 41996,
+ 11526, 63985, 5864, 1147, 43849, 42887, 1987, 92718, 5480, 7858, 11653,
+ 4116, 12391, 66193, 121383, 4939, 12384, 0, 127778, 41686, 63905, 119601,
+ 70285, 67398, 128820, 12649, 120022, 0, 8247, 507, 91, 2042, 120775,
+ 43643, 121445, 66028, 10036, 41844, 119813, 774, 119829, 77840, 119815,
+ 5994, 12539, 0, 78375, 120597, 119833, 983105, 78377, 983237, 917628,
+ 7719, 6026, 2486, 128312, 119808, 162, 0, 65219, 41073, 9687, 41681,
+ 6304, 119812, 66196, 194881, 5262, 0, 55233, 12681, 42379, 0, 7534,
+ 12219, 2226, 70499, 42810, 10492, 121510, 121148, 121509, 43119, 0,
+ 78537, 12403, 2500, 70145, 83246, 4899, 12729, 983399, 194619, 74113,
+ 2343, 4103, 19946, 74112, 77851, 13112, 129046, 74834, 12859, 70087,
+ 120148, 66369, 5861, 127758, 11999, 12400, 43641, 128183, 12645, 5146,
+ 11320, 68410, 6748, 65040, 194786, 64184, 12974, 64183, 67613, 120645,
+ 5147, 125019, 0, 74524, 128356, 1928, 0, 67649, 5991, 3445, 67609, 4976,
+ 64176, 0, 67610, 8241, 0, 77868, 4206, 0, 78662, 129029, 128298, 67277,
+ 10138, 67238, 128785, 8897, 120234, 1422, 8357, 4124, 77862, 65836,
+ 120641, 127926, 77859, 0, 120930, 1123, 963, 41553, 10120, 12405, 120150,
+ 92664, 398, 13278, 9723, 6366, 120311, 7945, 129126, 4402, 9970, 12402,
+ 93062, 42392, 1305, 12408, 92384, 44007, 128563, 127216, 41464, 12411,
+ 12969, 67268, 41465, 121092, 8528, 1575, 0, 63955, 165, 3024, 41467,
+ 119163, 70119, 9093, 128535, 6833, 92574, 63958, 0, 9148, 9692, 4096, 53,
+ 8296, 6750, 66855, 128410, 9594, 120308, 120938, 43527, 121192, 727,
+ 74192, 93060, 5805, 0, 6726, 0, 42176, 12370, 11655, 119095, 10591, 2280,
+ 983234, 12372, 120642, 120307, 71209, 92343, 983872, 12366, 10963, 6066,
+ 1329, 0, 3052, 9220, 121045, 64478, 194701, 10803, 4132, 120306, 68474,
+ 92473, 983247, 120712, 74837, 120155, 1499, 0, 8055, 42740, 63965,
+ 120305, 63962, 74042, 8924, 43123, 5988, 3660, 63969, 11781, 42718, 8788,
+ 1357, 64851, 65743, 92894, 8774, 70337, 127086, 9941, 120172, 92748,
+ 1933, 69655, 9564, 120016, 92435, 73866, 0, 121241, 2487, 67614, 3121,
+ 1804, 3311, 67615, 70081, 78302, 12220, 67616, 92769, 120020, 194594,
+ 68200, 6675, 128144, 0, 67592, 120685, 0, 64771, 1198, 9132, 0, 64619,
+ 510, 64663, 0, 121500, 4561, 2101, 1398, 917972, 92554, 74034, 41569,
+ 92684, 11406, 8167, 12127, 120505, 840, 983283, 69992, 7101, 6967, 0,
+ 194898, 9796, 127000, 333, 69891, 0, 8144, 2117, 0, 121155, 12406,
+ 917970, 19931, 66388, 6678, 7769, 983124, 12621, 0, 127366, 10227, 4764,
+ 43101, 9981, 0, 40986, 4127, 66487, 983576, 42202, 12754, 195021, 983191,
+ 0, 94097, 67594, 2048, 12944, 4050, 67595, 917967, 43102, 10581, 11184,
+ 4533, 127212, 74003, 6490, 0, 12038, 0, 0, 68225, 65461, 9798, 69704,
+ 128912, 1948, 69841, 0, 952, 128235, 125107, 983354, 70296, 6449, 9494,
+ 120313, 0, 43098, 4843, 8142, 64160, 4098, 64170, 983341, 0, 3436,
+ 119973, 0, 12817, 67597, 6676, 3930, 42615, 66407, 69991, 67598, 0, 0, 0,
+ 65591, 41581, 65916, 1453, 194993, 121458, 127859, 8500, 42222, 120142,
+ 73743, 120400, 4317, 11543, 67676, 64676, 0, 127833, 67606, 119083,
+ 121083, 42217, 13102, 0, 66003, 6672, 0, 0, 66880, 77912, 63841, 9613,
+ 9001, 4526, 11274, 67601, 64520, 64210, 6664, 78704, 42056, 10228, 64957,
+ 11281, 0, 3807, 1469, 66640, 65381, 42197, 4988, 42372, 0, 9598, 904,
+ 352, 42225, 1451, 8061, 8453, 4134, 83485, 67223, 66576, 127916, 127831,
+ 10520, 8575, 9960, 1201, 127289, 12846, 127291, 68040, 11919, 64962,
+ 127081, 43739, 127281, 8511, 9460, 823, 11587, 12305, 0, 64695, 127305,
+ 12387, 1253, 13183, 65766, 500, 42783, 65765, 64208, 64369, 65760, 65761,
+ 70334, 11606, 64784, 11702, 66498, 9821, 64304, 127369, 5152, 11048,
+ 7533, 68366, 64410, 92305, 0, 4323, 70276, 92669, 71332, 120158, 42587,
+ 42214, 41394, 11188, 4763, 4112, 118935, 0, 5260, 43143, 94038, 326,
+ 120131, 68423, 119218, 10771, 2876, 74074, 92530, 128460, 41398, 7382,
+ 9802, 127077, 127076, 453, 41396, 120524, 13159, 12140, 9572, 983132,
+ 7003, 194883, 42334, 7704, 125069, 125020, 43144, 4123, 8494, 43146,
+ 9977, 0, 121283, 65759, 10765, 64061, 4465, 9808, 64056, 65582, 4126, 0,
+ 9521, 9589, 64755, 0, 64020, 126604, 10464, 0, 92968, 194610, 64514,
+ 11528, 64024, 128072, 679, 64013, 983555, 5850, 758, 7536, 120538, 92234,
+ 41441, 10693, 64006, 75044, 64005, 4058, 119019, 126487, 64660, 128176,
+ 119050, 0, 983069, 1139, 43298, 64027, 64029, 8970, 0, 9934, 128685,
+ 10774, 67104, 42201, 12421, 128216, 127006, 1852, 3057, 64046, 73744,
+ 64034, 64039, 68065, 0, 983690, 92913, 92322, 7645, 12854, 74338, 3496,
+ 0, 121323, 113710, 9102, 627, 127795, 6158, 8327, 74553, 66632, 12419,
+ 13309, 11570, 127811, 19960, 11696, 0, 1018, 118970, 129075, 194897,
+ 1682, 43863, 194896, 42756, 6765, 194906, 67717, 74358, 73814, 11412,
+ 6768, 10728, 119982, 71316, 71099, 43311, 64966, 11577, 127832, 43040,
+ 1833, 11576, 70054, 74779, 0, 185, 65085, 74533, 64754, 119334, 7535,
+ 8085, 42525, 119944, 9749, 41701, 6131, 1949, 4117, 7847, 120489, 120997,
+ 64483, 65693, 983711, 983495, 128615, 69695, 42240, 128587, 121352,
+ 42864, 126498, 43168, 41868, 1184, 0, 815, 11484, 127535, 67840, 983651,
+ 0, 66197, 983474, 10986, 64683, 128549, 128454, 3455, 126530, 0, 9879, 0,
+ 0, 4158, 70307, 68166, 0, 128091, 0, 0, 69645, 332, 118808, 83368, 5142,
+ 2407, 69643, 42199, 0, 92404, 74373, 83372, 55217, 71457, 63870, 43163,
+ 0, 0, 12985, 42867, 1834, 120387, 92461, 69817, 10940, 65249, 70385,
+ 8662, 120324, 0, 2652, 120527, 7164, 10784, 195093, 67674, 0, 83359,
+ 92482, 194749, 74562, 917505, 1828, 74474, 120019, 68078, 8531, 12499,
+ 6280, 12324, 72434, 65238, 68374, 4832, 65573, 43851, 6279, 12508, 12904,
+ 12502, 9161, 128555, 1620, 11247, 3601, 121301, 83353, 67246, 609, 11555,
+ 83456, 12496, 11980, 74181, 4343, 12505, 82960, 127863, 0, 11377, 239,
+ 128114, 637, 0, 128678, 42671, 0, 93032, 83095, 43565, 71306, 126493,
+ 12696, 128256, 917600, 94062, 12929, 0, 712, 0, 4197, 983206, 42818,
+ 126632, 70306, 120490, 70333, 119137, 1506, 43562, 119913, 92491, 68076,
+ 12651, 120917, 64628, 74517, 12058, 74084, 194633, 7494, 0, 4924, 65592,
+ 118844, 194823, 127088, 355, 9719, 127087, 13066, 64796, 121077, 983297,
+ 12033, 42178, 194754, 69760, 42571, 92635, 11430, 0, 70299, 121508,
+ 124951, 68324, 3178, 126488, 128633, 92704, 917566, 9080, 120943, 67697,
+ 195101, 68209, 72418, 11082, 71485, 5699, 83373, 66000, 9488, 65166,
+ 119112, 70477, 11170, 68662, 128120, 71313, 0, 5265, 69235, 83384, 11487,
+ 67858, 12464, 983365, 43045, 983831, 70345, 43345, 983276, 10770, 118994,
+ 6807, 465, 9829, 69997, 74348, 0, 43346, 8116, 795, 120352, 72412, 12462,
+ 10930, 10831, 121320, 118952, 64362, 74334, 93056, 83047, 983933, 12468,
+ 8607, 1008, 118948, 10092, 125122, 128851, 67855, 55257, 73771, 1766,
+ 11282, 11996, 1820, 4547, 0, 11202, 120243, 128345, 13223, 74934, 64595,
+ 127294, 83374, 68489, 4345, 12616, 917784, 128947, 983155, 74467, 0,
+ 983819, 128291, 5382, 127779, 0, 67233, 119060, 64953, 5406, 19920,
+ 69897, 66510, 3590, 194835, 1130, 917766, 120977, 42016, 11823, 43023,
+ 121002, 118896, 7742, 127374, 13280, 71323, 9326, 73826, 5310, 43509,
+ 78584, 92229, 8959, 43589, 6747, 66723, 64757, 8568, 194684, 120496,
+ 73816, 83060, 128418, 42670, 0, 11621, 12460, 1326, 120631, 83393, 43063,
+ 43239, 65678, 194840, 73917, 7843, 69783, 11689, 5410, 5783, 10468, 8403,
+ 5400, 11594, 120405, 68333, 83390, 10491, 69842, 64412, 0, 128012, 5587,
+ 42865, 64404, 8268, 4923, 65086, 8981, 12382, 42133, 120755, 9706, 69738,
+ 70294, 66610, 10461, 12103, 0, 8642, 83388, 42766, 83387, 2210, 9983,
+ 128689, 94009, 0, 0, 0, 7398, 41515, 0, 11802, 8041, 1461, 910, 119133,
+ 0, 6749, 3658, 93964, 120525, 0, 7617, 194841, 12888, 127983, 67668,
+ 13143, 0, 9193, 11097, 5703, 128247, 41517, 41504, 41519, 10016, 64305,
+ 0, 65864, 623, 781, 670, 10660, 5769, 613, 7543, 120279, 477, 41083,
+ 92521, 0, 592, 1578, 12459, 43449, 0, 0, 8225, 121191, 654, 11345, 653,
+ 652, 0, 647, 83266, 633, 120744, 983809, 126472, 12480, 43243, 194909,
+ 39, 12487, 121247, 120529, 74199, 12482, 0, 12489, 119607, 3195, 5550,
+ 129121, 7897, 127089, 1203, 74396, 1813, 64544, 41311, 12090, 983634,
+ 2877, 121518, 70496, 1675, 69840, 0, 0, 119078, 10070, 10595, 0, 119077,
+ 194777, 121162, 67170, 120790, 118787, 43244, 92233, 917835, 983916,
+ 119561, 983078, 194914, 194921, 128160, 9939, 0, 983151, 77860, 128948,
+ 83440, 270, 0, 10714, 118983, 72437, 0, 119942, 119338, 65372, 73803,
+ 74038, 68251, 6273, 66679, 364, 9595, 71440, 0, 0, 707, 194839, 128409,
+ 9282, 11163, 224, 128588, 68670, 9332, 4966, 68677, 194586, 68644,
+ 983131, 3841, 67357, 67341, 10732, 68640, 850, 4972, 127181, 12890, 2909,
+ 68619, 44008, 68627, 120699, 11544, 10203, 9608, 0, 917943, 11962,
+ 121397, 12507, 1196, 67684, 67100, 777, 120187, 4375, 65271, 67678, 0,
+ 12198, 917887, 64824, 119343, 127243, 9454, 63778, 8658, 42528, 70073,
+ 2705, 128680, 41520, 195098, 120379, 11986, 7765, 42502, 8280, 74520,
+ 2701, 0, 120240, 5767, 0, 195018, 9809, 8353, 63747, 66701, 63772,
+ 121233, 63745, 1748, 63770, 121419, 121078, 0, 65542, 63766, 55244, 3061,
+ 78609, 63764, 63787, 9067, 6096, 0, 7694, 0, 7257, 63768, 3485, 12987,
+ 127781, 127522, 120628, 63807, 1591, 0, 6386, 63783, 120990, 125041,
+ 92535, 0, 0, 68249, 74575, 127010, 65719, 13083, 64574, 65012, 121452,
+ 1640, 12495, 66691, 7624, 3138, 10996, 11171, 1922, 127275, 12498, 10987,
+ 69936, 69939, 3894, 65543, 129183, 194842, 128112, 493, 0, 43197, 1717,
+ 4228, 479, 10303, 74020, 0, 917935, 10335, 3520, 917932, 12490, 64315,
+ 92170, 127039, 12493, 6233, 42681, 1002, 12491, 83519, 64911, 83521,
+ 2096, 65120, 83516, 78219, 83270, 8378, 11632, 68838, 66213, 63864,
66221, 66226, 66229, 13218, 66231, 66216, 8507, 66236, 66211, 66218,
92672, 66240, 78041, 66233, 8928, 983552, 7909, 66234, 11605, 63759,
- 983654, 66208, 73999, 63799, 63803, 244, 11542, 12898, 12494, 73761,
- 12492, 12669, 0, 0, 74153, 0, 128278, 120680, 4882, 13040, 0, 8612, 4885,
- 74053, 0, 13042, 4880, 64662, 2429, 1360, 248, 0, 63797, 92394, 42358, 0,
- 7292, 0, 63756, 42786, 66693, 0, 1870, 78040, 470, 78038, 78035, 78036,
- 70028, 78034, 4579, 128090, 0, 12511, 74453, 12514, 0, 74579, 7239, 7001,
- 8623, 94011, 128052, 128048, 7378, 12512, 11615, 6104, 0, 0, 659, 6098,
- 0, 12234, 127307, 127067, 8311, 12510, 41803, 13039, 127072, 12513,
- 10202, 12471, 0, 8747, 983920, 0, 0, 2323, 0, 2319, 77917, 12477, 77916,
- 2311, 0, 4415, 237, 6281, 127280, 0, 0, 2309, 1312, 8173, 128871, 12469,
- 0, 78505, 64335, 10609, 0, 128111, 9397, 11524, 9395, 9396, 9393, 9394,
- 9391, 9392, 9389, 6209, 9387, 9388, 4932, 9386, 9383, 9384, 6740, 0,
- 65451, 8185, 0, 917832, 43024, 43336, 67659, 2313, 128167, 7948, 9236,
- 92571, 0, 0, 10570, 43473, 6289, 10484, 0, 0, 11998, 12082, 10924, 3147,
- 0, 120684, 12524, 119081, 2310, 11818, 9381, 9382, 9379, 9380, 9377,
- 9378, 9375, 9376, 1683, 9374, 983778, 9372, 12444, 0, 0, 13016, 8210,
- 983958, 42029, 11079, 12331, 43451, 42032, 8744, 726, 0, 983837, 4155, 0,
- 0, 42030, 5007, 12522, 43088, 0, 4951, 127805, 127240, 0, 9922, 43309,
- 983841, 12525, 983471, 12016, 65770, 9548, 67665, 403, 78230, 12503, 0,
- 0, 11030, 0, 92567, 65691, 63998, 1819, 10496, 0, 0, 119920, 0, 194668,
- 0, 12506, 0, 12231, 0, 12500, 44023, 12509, 64393, 78830, 3389, 10589,
- 6608, 41047, 120321, 78395, 78394, 74069, 77995, 78391, 3608, 8281,
- 120320, 1107, 0, 9076, 8862, 69743, 41052, 13084, 64766, 43217, 7803,
- 13222, 74165, 74782, 126514, 8546, 11553, 63995, 13177, 9043, 6303,
- 983947, 498, 64471, 120324, 128567, 12529, 8042, 0, 2344, 12528, 8031,
- 2414, 0, 69719, 3231, 0, 6422, 66512, 69653, 12530, 2537, 78405, 41429,
- 12658, 13036, 65772, 0, 78738, 41433, 4719, 469, 0, 4363, 3313, 41428,
- 78407, 2023, 1772, 78224, 78225, 65706, 10051, 64812, 78220, 0, 9920,
- 12215, 0, 4931, 1951, 12497, 119363, 9607, 0, 9663, 983228, 119634, 6503,
- 41110, 0, 1491, 0, 0, 127304, 41061, 0, 194838, 127187, 65026, 41993,
- 41509, 11045, 65028, 78602, 66476, 41108, 9738, 41995, 1075, 1958, 12535,
- 41992, 41506, 0, 41687, 0, 120717, 127776, 9940, 127299, 7692, 983833,
- 8008, 41131, 330, 8566, 65083, 41133, 9816, 126517, 12532, 78550, 78546,
- 3508, 127058, 43235, 0, 127298, 64139, 78231, 6411, 12910, 78554, 66644,
- 13028, 6737, 12537, 0, 0, 64136, 12536, 2350, 13029, 78233, 0, 983103,
- 13030, 6702, 4527, 0, 12538, 128810, 983645, 65599, 65717, 9966, 0, 4948,
- 12484, 4032, 128149, 12623, 0, 6207, 0, 6117, 65930, 8412, 0, 7438, 1296,
- 2325, 41511, 126625, 10149, 74118, 0, 127286, 12481, 0, 12488, 66713, 0,
- 41556, 64414, 118802, 2354, 42619, 73766, 0, 6295, 901, 41510, 7953, 0,
- 65032, 41513, 983166, 11927, 66584, 78559, 78560, 78557, 78558, 0, 78556,
- 848, 9868, 0, 6424, 78568, 119338, 69922, 74031, 78563, 78564, 2352,
- 78572, 893, 64576, 11289, 1407, 67973, 0, 13026, 6762, 78579, 78580,
- 13023, 8903, 9777, 66715, 1871, 8099, 0, 0, 1343, 983823, 0, 9325, 6818,
- 6283, 11738, 0, 983934, 0, 11741, 0, 0, 9216, 8263, 11279, 194752,
- 983825, 194754, 13021, 64494, 3136, 194758, 194757, 194760, 13022, 42737,
- 9956, 0, 0, 74552, 10014, 0, 41260, 119340, 13020, 10024, 194764, 74583,
- 74340, 69681, 0, 43001, 8029, 0, 0, 983780, 3335, 0, 0, 9776, 120526,
+ 127308, 66208, 67339, 13002, 63803, 244, 11542, 12898, 12494, 73761,
+ 12492, 12669, 94070, 0, 74153, 120310, 128278, 120680, 4882, 13040,
+ 983362, 8612, 4885, 74053, 127830, 13042, 4880, 64662, 2429, 1360, 248,
+ 129066, 63797, 92394, 42358, 0, 7292, 0, 63756, 42786, 66693, 0, 1870,
+ 78040, 470, 78038, 78035, 78036, 70028, 78034, 4579, 69232, 0, 12511,
+ 74453, 12514, 0, 71130, 7239, 7001, 8623, 94011, 125137, 128048, 7378,
+ 12512, 11615, 6104, 0, 120900, 659, 6098, 0, 12234, 83511, 67358, 8311,
+ 12510, 7669, 13039, 83509, 12513, 10202, 12471, 0, 8747, 121385, 70193,
+ 128354, 2323, 0, 2319, 77917, 12477, 77916, 2311, 7666, 4415, 237, 6281,
+ 127280, 983311, 83020, 2309, 1312, 8173, 83013, 12469, 83015, 78505,
+ 64335, 10609, 83011, 78006, 9397, 11524, 9395, 9396, 9393, 9394, 9391,
+ 9392, 9389, 6209, 9387, 9388, 4932, 9386, 9383, 9384, 6740, 127990,
+ 65451, 8185, 128931, 194843, 43024, 43336, 67659, 2313, 128167, 7948,
+ 9236, 77942, 0, 0, 10570, 43473, 6289, 10484, 83006, 83007, 11998, 12082,
+ 10924, 3147, 83004, 66406, 12524, 119081, 2310, 11818, 9381, 9382, 9379,
+ 9380, 9377, 9378, 9375, 9376, 1683, 9374, 983778, 9372, 12444, 74256, 0,
+ 13016, 8210, 121062, 42029, 11079, 12331, 43451, 42032, 8744, 726, 0,
+ 120630, 4155, 121090, 120704, 42030, 5007, 12522, 43088, 0, 4951, 113826,
+ 127217, 983202, 9922, 43309, 11211, 12525, 983473, 12016, 65770, 9548,
+ 67665, 403, 78230, 12503, 194689, 127191, 11030, 43916, 92567, 65691,
+ 63998, 1819, 10496, 0, 0, 119920, 0, 129143, 121072, 12506, 983838,
+ 11146, 71477, 12500, 44023, 12509, 64393, 78830, 3389, 10589, 6608,
+ 11208, 120236, 78395, 78394, 74069, 71446, 78391, 3608, 8281, 113732,
+ 1107, 113745, 9076, 8862, 69743, 41052, 13084, 64766, 43217, 7803, 13222,
+ 74165, 74782, 43499, 8546, 11553, 63995, 13177, 9043, 6303, 113664, 498,
+ 64471, 77987, 92974, 12529, 8042, 43899, 2344, 12528, 8031, 2414, 74506,
+ 69719, 3231, 917836, 6422, 66512, 69653, 12530, 2537, 78405, 41429,
+ 12658, 13036, 65772, 0, 78738, 41433, 4719, 469, 917810, 4363, 3313,
+ 41428, 78407, 2023, 1772, 78224, 78225, 65706, 10051, 64812, 78220,
+ 74237, 9920, 12215, 82978, 4931, 1951, 12497, 119363, 9607, 70368, 9663,
+ 66838, 119634, 6503, 41110, 983467, 1491, 66847, 129169, 127304, 41061,
+ 70454, 194838, 127187, 65026, 41993, 41509, 11045, 65028, 71181, 66476,
+ 41108, 9738, 41995, 1075, 1958, 12535, 41992, 41506, 127002, 41687, 0,
+ 120717, 127776, 9940, 127299, 7692, 983833, 8008, 41131, 330, 8566,
+ 65083, 6839, 9816, 126517, 12532, 78550, 78546, 3508, 127058, 43235,
+ 120351, 127298, 64139, 78231, 6411, 12910, 67710, 66644, 13028, 6737,
+ 12537, 0, 43506, 64136, 12536, 2350, 13029, 78233, 120914, 43897, 13030,
+ 6702, 4527, 71250, 12538, 128810, 983645, 65599, 65717, 9966, 93046,
+ 4948, 12484, 4032, 121177, 12623, 0, 6207, 983225, 6117, 65930, 8412,
+ 127183, 7438, 1296, 2325, 41511, 121020, 10149, 74118, 0, 120233, 12481,
+ 121280, 12488, 66713, 0, 41556, 64414, 118802, 2354, 42619, 73766,
+ 119244, 6295, 901, 41510, 7953, 0, 65032, 41513, 120209, 11927, 66584,
+ 78559, 78560, 78557, 71459, 83034, 67603, 848, 9868, 67220, 6424, 78568,
+ 67226, 69922, 70190, 78563, 78564, 2352, 67219, 893, 64576, 11289, 1407,
+ 67973, 983193, 13026, 6762, 78579, 70192, 13023, 8903, 9777, 66715, 1871,
+ 8099, 127984, 0, 1343, 917999, 120784, 9325, 6818, 6283, 11738, 0, 72436,
+ 113713, 11741, 917986, 75043, 9216, 8263, 11279, 83023, 83024, 83025,
+ 13021, 64494, 3136, 194758, 194757, 194760, 13022, 42737, 9956, 0, 43954,
+ 74552, 10014, 0, 41260, 119340, 13020, 10024, 194764, 74583, 74340,
+ 69681, 0, 43001, 8029, 0, 0, 983780, 3335, 119341, 9209, 9776, 120526,
194748, 5215, 42644, 3333, 1632, 194751, 64849, 3342, 78582, 5363, 12957,
- 78581, 4156, 0, 0, 6421, 78591, 1611, 78589, 13018, 74257, 78588, 74542,
- 3337, 4537, 67895, 11736, 0, 68608, 6482, 4214, 73790, 11945, 0, 13046,
- 8838, 425, 4025, 10709, 78595, 2108, 2392, 13047, 0, 0, 6819, 13049,
- 6499, 92243, 12424, 68614, 73944, 13050, 9924, 194745, 6507, 127919,
- 94073, 128069, 3277, 8929, 4947, 41055, 0, 194722, 194721, 194724, 13045,
- 64626, 66034, 7751, 194727, 8371, 194729, 3997, 12806, 8768, 13044, 0,
- 12420, 4024, 194730, 41054, 1078, 9757, 69736, 41057, 0, 0, 0, 0, 983791,
- 92210, 92411, 0, 41496, 0, 9165, 1572, 11911, 0, 118842, 2346, 13270,
- 8958, 0, 9646, 3773, 43183, 6401, 5831, 0, 0, 13043, 8056, 92494, 65681,
- 208, 127382, 41514, 0, 0, 0, 10699, 6408, 92227, 7825, 5661, 0, 120630,
- 3603, 41109, 2398, 3548, 126596, 0, 119933, 0, 3115, 9918, 0, 8294,
- 42912, 0, 0, 194726, 4876, 65804, 0, 0, 43468, 983274, 41558, 41471,
+ 78581, 4156, 0, 127329, 6421, 78039, 1611, 78589, 13018, 74257, 78588,
+ 74542, 3337, 4537, 67895, 11736, 0, 68608, 6482, 4214, 73790, 11945,
+ 43925, 13046, 8838, 425, 4025, 10709, 78595, 2108, 2392, 13047, 92745, 0,
+ 6819, 13049, 6499, 92243, 12424, 68614, 65827, 13050, 9924, 194745, 6507,
+ 127919, 94073, 128069, 3277, 8929, 4947, 41055, 0, 194722, 194721,
+ 194724, 13045, 64626, 66034, 7751, 194727, 8371, 121036, 3997, 12806,
+ 8768, 13044, 0, 12420, 4024, 128000, 41054, 1078, 9757, 69736, 41057,
+ 68307, 917842, 0, 0, 983791, 92210, 92411, 129303, 41496, 0, 9165, 1572,
+ 11911, 124990, 118842, 2346, 13270, 8958, 0, 9646, 3773, 43183, 6401,
+ 5831, 0, 120865, 13043, 8056, 70108, 65681, 208, 127382, 41514, 0,
+ 121048, 983884, 10699, 6408, 92227, 7825, 5661, 82972, 82973, 3603,
+ 41109, 2398, 3548, 82969, 82970, 119933, 82964, 3115, 9918, 127823, 8294,
+ 42912, 0, 127287, 194726, 4876, 65804, 0, 0, 43468, 121221, 41558, 41471,
73950, 8158, 9944, 41472, 120298, 13051, 78689, 3143, 194674, 6701,
- 41559, 1896, 66256, 13052, 194680, 5665, 0, 119071, 7025, 63974, 0,
+ 41559, 1896, 65215, 13052, 194680, 5665, 78594, 119071, 7025, 63974, 0,
74352, 74161, 4154, 9863, 43550, 12310, 5662, 42382, 1564, 73924, 1121,
- 78319, 63959, 0, 9942, 13231, 0, 64752, 4732, 194666, 11596, 119931,
- 65187, 1626, 63983, 10110, 64772, 42024, 6420, 42028, 0, 10509, 2795,
- 4910, 194728, 69231, 64753, 6275, 93957, 118830, 63978, 11044, 3229,
- 6423, 42774, 0, 0, 0, 12823, 2331, 917810, 7085, 6137, 0, 7524, 0,
- 917809, 8346, 0, 8338, 128315, 65043, 0, 822, 127984, 9903, 64721, 42722,
- 69877, 194659, 78655, 78661, 194660, 78662, 41265, 5311, 1795, 965,
- 118791, 10587, 78055, 11278, 78632, 194640, 0, 12946, 194641, 119341,
- 120349, 6294, 3144, 194648, 194647, 65019, 194649, 73990, 0, 983960, 748,
- 41067, 2330, 535, 3148, 12375, 78799, 194629, 10556, 2475, 12388, 4889,
- 8968, 67863, 3593, 0, 0, 2342, 0, 194634, 65206, 4894, 194635, 4890,
- 194637, 917804, 581, 4893, 983616, 6571, 65545, 4888, 4157, 78048, 78049,
- 78046, 78047, 0, 10119, 6415, 42893, 0, 69702, 0, 0, 11375, 64746, 2332,
- 78063, 412, 78061, 64932, 42880, 43587, 0, 0, 0, 0, 65197, 78066, 12203,
- 78064, 78065, 8913, 65854, 4875, 65811, 120381, 120389, 118888, 9344,
- 8826, 120386, 120395, 13104, 74781, 11997, 120393, 78075, 0, 3134, 0,
- 65696, 92331, 0, 66217, 0, 8334, 119344, 0, 3449, 0, 0, 78414, 78413,
- 118950, 74011, 0, 0, 0, 0, 1908, 120167, 4328, 10734, 127014, 0, 127914,
- 7804, 78272, 10811, 6250, 11339, 4914, 11367, 0, 78054, 4917, 74516,
- 74208, 64285, 4912, 5464, 127836, 118893, 2361, 7971, 78072, 78073,
- 55243, 78071, 0, 8086, 74317, 6707, 8319, 2312, 40977, 10960, 40962,
- 8305, 12573, 983608, 40980, 983964, 13202, 0, 12582, 78282, 983048,
- 69856, 42438, 55221, 6288, 78280, 127946, 5653, 42400, 10891, 7698, 5658,
- 74045, 70039, 0, 0, 4913, 0, 983959, 71333, 42326, 128194, 12728, 92685,
- 42478, 2327, 0, 12563, 42287, 12705, 0, 0, 12588, 8821, 6153, 2867,
- 194708, 66312, 698, 128007, 194606, 10356, 70017, 194713, 651, 12641, 0,
- 0, 0, 0, 41552, 65115, 78465, 78467, 78463, 78464, 128851, 78461, 194697,
- 74356, 64945, 4716, 43277, 0, 78474, 12340, 120568, 0, 194700, 55264,
- 41211, 120676, 8703, 5462, 917629, 983495, 10101, 0, 70049, 8479, 4151,
- 41933, 0, 0, 66254, 120821, 0, 0, 128654, 0, 119194, 74050, 92701, 0, 0,
- 0, 0, 0, 12278, 0, 0, 0, 2700, 12576, 7842, 12899, 0, 0, 2699, 0, 73845,
- 2985, 92568, 126475, 917845, 12192, 119314, 0, 119312, 9827, 119310,
- 119311, 119308, 119309, 119306, 11481, 41210, 119305, 0, 35, 78481,
- 78482, 66694, 68479, 78477, 78478, 43596, 6090, 64257, 7812, 10534, 0,
- 78485, 73848, 67975, 4272, 0, 40967, 40964, 917825, 12704, 78487, 43306,
- 0, 64497, 12138, 7930, 0, 2292, 68216, 0, 917826, 5244, 4189, 94108,
- 67596, 127504, 4188, 1879, 0, 968, 0, 43743, 0, 8873, 2279, 0, 917827,
- 65555, 12574, 0, 0, 0, 74490, 127099, 43657, 0, 0, 0, 42682, 12578,
- 12720, 0, 41227, 0, 12346, 127101, 64848, 0, 0, 7251, 0, 0, 118850,
- 119141, 128546, 66015, 0, 959, 8885, 12564, 66457, 78808, 9469, 9632,
- 92323, 74761, 64323, 127335, 0, 0, 0, 310, 0, 41281, 10976, 0, 71325, 0,
- 74266, 10054, 6497, 8574, 0, 9012, 19958, 74420, 65089, 13215, 12730,
- 65163, 74044, 374, 43195, 816, 120161, 0, 0, 41934, 7465, 0, 128168,
- 983268, 4715, 6101, 94106, 41936, 0, 4879, 0, 65446, 0, 307, 127147,
- 9585, 5374, 983267, 128059, 0, 0, 126618, 120390, 0, 65567, 120614, 1929,
- 0, 12142, 0, 12236, 41419, 194618, 120610, 12982, 194623, 5378, 78791,
- 128679, 41421, 0, 4462, 0, 126599, 128092, 821, 0, 2498, 5800, 120157,
- 983115, 1760, 2421, 4469, 2324, 828, 3611, 78400, 757, 1185, 0, 78770,
- 43597, 10628, 74808, 194572, 7999, 43971, 0, 0, 10634, 10942, 7713, 2348,
- 0, 64374, 4380, 194608, 119044, 9982, 64324, 41240, 862, 65626, 78462,
- 1810, 3673, 5137, 194617, 0, 7277, 65622, 0, 7566, 64688, 194593, 194592,
- 78092, 74357, 194597, 4748, 92228, 194598, 194601, 42260, 5871, 119075,
- 0, 74576, 44019, 0, 128189, 3967, 194604, 13137, 8775, 127945, 0, 2963,
- 0, 8410, 4454, 723, 127882, 966, 4449, 92330, 92238, 0, 7819, 2320,
- 194589, 339, 4968, 194590, 120399, 8075, 55276, 0, 8047, 0, 78827, 12634,
- 41542, 78780, 7466, 6705, 12174, 42610, 0, 74452, 983763, 1584, 66645,
- 6045, 6729, 120640, 65218, 11559, 0, 78062, 7537, 0, 11370, 0, 10330, 0,
- 10394, 0, 74194, 0, 127929, 9780, 0, 13092, 194576, 77950, 194578, 7074,
- 92648, 194579, 194582, 11414, 128868, 2531, 13034, 0, 0, 4211, 1259,
- 7517, 0, 0, 194561, 40996, 13037, 7092, 641, 5219, 94034, 194566, 11064,
- 41129, 0, 42850, 13035, 9075, 92387, 5466, 128153, 0, 64098, 65793, 4535,
- 194573, 4271, 78417, 128357, 6769, 41410, 983452, 64262, 6767, 41407, 0,
- 0, 6755, 118864, 9046, 127934, 126608, 0, 0, 0, 0, 67675, 0, 0, 0, 64338,
- 2563, 13033, 247, 118915, 0, 12338, 4651, 69895, 11270, 0, 0, 11933, 0,
- 0, 41903, 43447, 11001, 0, 42255, 0, 92661, 69821, 41905, 0, 0, 10775,
- 9793, 5009, 0, 42269, 64587, 983063, 42535, 69812, 64529, 41408, 42853,
- 3877, 120795, 42674, 8147, 43566, 119021, 983776, 10236, 65918, 43782, 0,
- 0, 64506, 69652, 118921, 4747, 128058, 69844, 43200, 5832, 0, 0, 5141,
- 42600, 0, 43203, 0, 983799, 43286, 0, 128211, 43778, 0, 41305, 78776,
- 43781, 11303, 65547, 0, 7031, 859, 0, 0, 0, 6059, 126985, 55235, 0, 8535,
- 0, 65196, 194787, 66032, 11488, 120481, 120786, 42233, 64140, 9946,
- 63885, 194792, 11822, 0, 43189, 983898, 0, 1788, 1579, 120482, 71298, 0,
- 0, 0, 9028, 119571, 69234, 94055, 0, 1285, 64882, 41242, 70086, 0, 12640,
- 0, 7401, 0, 12625, 68198, 0, 70082, 3940, 41597, 43754, 3396, 12642,
- 8665, 0, 0, 12630, 1653, 917815, 10153, 0, 6166, 120516, 118989, 0, 8815,
- 66673, 65046, 9285, 913, 42259, 119317, 119318, 2142, 68454, 42485,
- 94012, 7878, 8211, 42293, 64377, 0, 92643, 0, 194673, 12032, 0, 9725, 0,
- 78431, 5263, 12818, 78430, 41939, 10022, 65387, 78419, 42777, 10139, 980,
- 43698, 65386, 2208, 0, 43701, 43198, 7184, 120673, 194797, 917819, 10085,
- 119992, 0, 119993, 6634, 92373, 0, 119323, 8072, 119321, 43700, 0, 8872,
- 7783, 917992, 12398, 8237, 0, 0, 12395, 0, 126977, 120565, 9914, 2217,
- 917854, 73975, 6367, 6351, 66688, 0, 78107, 0, 64735, 41243, 92199, 7808,
- 1829, 0, 41937, 4358, 43272, 6353, 0, 0, 120422, 0, 1710, 0, 0, 65607, 0,
- 49, 6627, 0, 6258, 10683, 78672, 9741, 78329, 5649, 78441, 43443, 64418,
- 1643, 65213, 8405, 3470, 128225, 13213, 42452, 78331, 120664, 78445, 0,
- 1072, 78457, 78452, 78454, 6576, 41988, 41132, 65675, 1080, 120002, 9886,
- 55225, 1101, 68404, 12309, 55227, 0, 12632, 1086, 1869, 78685, 7680, 0,
- 65458, 120714, 12639, 3380, 8123, 1091, 12638, 7977, 4501, 41099, 0,
- 66309, 0, 0, 1494, 983146, 126613, 0, 11693, 126513, 10494, 92655, 65872,
- 12363, 11386, 0, 0, 0, 0, 64582, 0, 73794, 0, 8022, 0, 120462, 74106,
- 12413, 94069, 917994, 917993, 917995, 5570, 1881, 7210, 0, 1012, 43752,
- 0, 120709, 7208, 66442, 5569, 983242, 42339, 0, 6063, 0, 78383, 119594,
- 6053, 65602, 0, 92201, 64727, 9160, 194827, 0, 0, 92180, 10503, 118810,
- 6055, 3870, 4279, 8490, 120114, 4319, 64786, 8602, 120110, 11326, 92204,
- 983116, 0, 120119, 78333, 120117, 120118, 120099, 120100, 65087, 5571,
- 3674, 9740, 9121, 5568, 120107, 120108, 42085, 10107, 42159, 42870,
- 120101, 589, 7050, 983800, 43281, 10233, 41263, 66251, 65729, 66253,
- 126497, 74099, 42645, 0, 194815, 8583, 0, 5847, 6928, 128074, 0, 0, 0, 0,
- 66592, 12204, 917962, 19966, 77856, 42561, 120626, 983251, 0, 8120,
- 120701, 0, 0, 128012, 41063, 0, 10664, 0, 8369, 0, 4551, 194964, 3369, 0,
- 0, 9673, 66334, 65580, 10478, 118960, 12517, 557, 9457, 12034, 983671,
- 6355, 12519, 41004, 0, 195025, 74094, 0, 0, 77970, 983560, 0, 128175,
- 12111, 3927, 0, 12515, 1474, 67893, 5492, 6923, 92281, 10441, 73836, 0,
- 43990, 5493, 0, 74319, 0, 66635, 12019, 0, 1618, 0, 120474, 9645, 10430,
- 917959, 5853, 13063, 10363, 0, 12956, 128169, 120729, 11314, 917582,
- 12060, 0, 78392, 12826, 6329, 0, 10514, 65517, 74395, 2707, 8309, 0,
- 127054, 78398, 43570, 2697, 43420, 78396, 127057, 2695, 42171, 0, 0, 0,
- 67617, 118971, 0, 2693, 12125, 12766, 0, 1164, 128817, 0, 41918, 983168,
- 127542, 8687, 66009, 12178, 7053, 128001, 7469, 0, 5248, 12218, 120538,
- 6427, 42884, 41123, 0, 0, 42873, 41126, 9991, 41128, 74371, 127031, 0,
- 9873, 0, 42877, 7994, 64762, 2053, 42843, 6591, 9340, 0, 1589, 0, 296,
- 74438, 78852, 0, 67841, 74370, 0, 8922, 128068, 74600, 12700, 74836, 0,
- 12579, 0, 12575, 6416, 5656, 2891, 13262, 65590, 5299, 0, 11473, 5449,
- 1252, 0, 78404, 41431, 74369, 65373, 5295, 917569, 74114, 1223, 1642,
- 174, 78399, 883, 4161, 12691, 42603, 41413, 3212, 41459, 3211, 74810,
- 41425, 127029, 78412, 74450, 9728, 3846, 8070, 6150, 6636, 4370, 0, 0,
- 74178, 74587, 74117, 0, 0, 0, 4986, 12189, 0, 67648, 120499, 94001, 4257,
- 12104, 77942, 6220, 9004, 65561, 0, 77949, 0, 68135, 917576, 77946, 0,
- 69679, 69684, 9890, 78561, 12971, 78453, 92556, 73898, 11979, 70051,
- 118900, 917894, 0, 9635, 12600, 8871, 0, 0, 0, 6469, 74227, 0, 65304,
- 4679, 10230, 64300, 64867, 3427, 4240, 0, 0, 0, 0, 42916, 0, 0, 0, 7282,
- 78728, 65733, 4445, 127138, 128082, 3494, 74606, 6555, 0, 77976, 0, 0,
- 78566, 0, 983189, 65898, 983244, 65312, 5447, 0, 12895, 65593, 4010, 0,
- 41106, 0, 64448, 0, 41105, 0, 65820, 6232, 0, 128280, 0, 43608, 119091,
- 0, 6538, 4335, 78364, 3941, 41122, 11061, 78363, 64892, 9113, 1954,
- 12155, 983674, 42878, 11500, 0, 0, 74578, 0, 65832, 0, 0, 0, 77975,
- 119230, 4586, 0, 350, 10951, 0, 509, 0, 0, 92307, 0, 0, 5133, 0, 0, 9500,
- 0, 4957, 64741, 2422, 2212, 983080, 0, 0, 2496, 11516, 944, 118851, 3890,
- 12168, 1438, 0, 983117, 0, 41947, 1220, 120828, 128555, 0, 0, 1571,
- 42630, 41949, 42805, 8270, 943, 564, 0, 312, 41980, 983944, 0, 78120,
- 8877, 269, 4429, 6272, 9617, 1460, 6954, 78657, 41120, 65121, 10862,
- 6060, 41119, 41416, 74355, 4173, 0, 0, 0, 1906, 917986, 11532, 74073,
- 127338, 0, 1985, 6296, 9582, 917895, 64287, 0, 78115, 11428, 1730, 2457,
- 917808, 19918, 10469, 0, 0, 7703, 8840, 8035, 0, 0, 92230, 0, 6129, 0,
- 128528, 128268, 0, 7874, 8681, 119092, 0, 13136, 0, 0, 70102, 63886,
- 118881, 9605, 71308, 13220, 128776, 120274, 5514, 0, 9228, 0, 0, 0, 5240,
- 9811, 10012, 3096, 0, 0, 983351, 66676, 65873, 0, 0, 0, 9501, 0, 1272,
- 64536, 65465, 64654, 7467, 0, 1467, 10158, 10040, 0, 9519, 0, 917812, 0,
- 118899, 12193, 0, 0, 0, 0, 983353, 19935, 0, 92162, 69676, 0, 0, 0, 5275,
- 0, 0, 8637, 0, 0, 3789, 63880, 11471, 43554, 65862, 11474, 66332, 66603,
- 128138, 2426, 12042, 92194, 983911, 9537, 3961, 12115, 77953, 2605, 4500,
- 64561, 55224, 4981, 0, 0, 63876, 11667, 42686, 77973, 42362, 64686, 4499,
- 41649, 7589, 0, 0, 3237, 0, 68215, 917904, 8541, 78298, 70034, 41866, 0,
- 0, 0, 0, 69924, 43555, 2823, 9559, 10060, 41940, 8299, 41945, 7132,
- 41941, 3308, 7190, 64880, 8614, 65220, 41493, 0, 41699, 10762, 43780,
- 12999, 0, 0, 8106, 4128, 0, 6274, 4494, 0, 4012, 10395, 983591, 43633,
- 65447, 126511, 0, 11004, 695, 739, 696, 7611, 0, 42755, 74802, 9227,
- 7506, 7510, 69937, 691, 738, 7511, 7512, 7515, 3868, 688, 41847, 690,
- 2548, 737, 974, 8003, 7406, 917911, 0, 128688, 3985, 917912, 65860,
- 63921, 7051, 69777, 4682, 917805, 12809, 6406, 4685, 92505, 10879, 10347,
- 4680, 6341, 0, 3851, 8132, 74325, 0, 917907, 0, 41958, 119176, 917908, 0,
- 0, 42657, 92468, 7643, 42373, 11714, 67587, 43568, 983175, 11717, 7650,
- 10594, 64951, 7647, 7649, 128155, 7646, 0, 78082, 9651, 0, 3891, 0, 0,
- 2337, 1735, 74324, 67860, 2363, 983135, 0, 43561, 0, 0, 74146, 1860,
- 7495, 7580, 5812, 7497, 7584, 119140, 127853, 0, 120347, 7727, 0, 8498,
- 69818, 8949, 3065, 42719, 7135, 1569, 92375, 12534, 12124, 7690, 0,
- 12533, 983879, 6418, 4543, 78086, 6969, 0, 74800, 0, 67974, 11980,
- 128650, 983801, 63894, 120760, 12282, 66192, 0, 74592, 8850, 74275, 9238,
- 10617, 917545, 0, 92625, 0, 12791, 0, 0, 127843, 4447, 73732, 12793,
- 12900, 92377, 10950, 0, 78087, 12790, 41400, 119128, 66607, 12792, 42232,
- 194938, 1744, 12789, 10366, 12317, 41310, 983869, 41399, 0, 0, 55258, 0,
- 12690, 0, 0, 43672, 127840, 41652, 2974, 9010, 11315, 0, 278, 0, 41405,
- 119254, 0, 10077, 63853, 74557, 42586, 0, 0, 6002, 0, 43553, 0, 67903, 0,
- 12787, 41308, 7934, 65306, 0, 0, 0, 8646, 983186, 77829, 71360, 0, 6413,
- 6550, 0, 1940, 0, 43637, 220, 65193, 43551, 10678, 10044, 128322, 0, 0,
- 68659, 6403, 5707, 10393, 127532, 0, 66614, 0, 0, 0, 10297, 0, 3742, 0,
- 3959, 0, 0, 0, 2467, 0, 6003, 63844, 6663, 8040, 0, 43758, 4182, 78171,
- 4676, 120501, 0, 0, 2510, 0, 10208, 78168, 92361, 11540, 43546, 6692, 0,
- 41060, 0, 4668, 9083, 0, 0, 78144, 1559, 63831, 9677, 120260, 0, 65256,
- 0, 74070, 0, 0, 365, 12056, 43027, 120423, 41716, 128236, 0, 120472,
- 5516, 2845, 7717, 8036, 41717, 73827, 544, 12045, 6278, 0, 5515, 0, 0,
- 983051, 65339, 43221, 2211, 0, 5517, 0, 0, 74841, 67884, 0, 67890, 67885,
- 67880, 67881, 67882, 67883, 0, 0, 67879, 127188, 1902, 67887, 9638,
- 12976, 126546, 12483, 12368, 41769, 42726, 41765, 7361, 6667, 67874,
- 7556, 67878, 74351, 11264, 989, 42677, 67889, 0, 1311, 917966, 4326,
- 11000, 63824, 13068, 10932, 128880, 6917, 78155, 0, 949, 78162, 0, 6148,
- 8605, 42253, 78177, 0, 0, 42715, 0, 0, 0, 63871, 0, 41796, 1269, 6530, 0,
- 65057, 0, 5144, 12221, 42716, 0, 4431, 4331, 983729, 128675, 41834, 5279,
- 0, 10336, 8312, 0, 42701, 128825, 0, 78165, 66036, 0, 0, 6428, 42270, 0,
- 983596, 43059, 42666, 5256, 1067, 255, 12131, 983722, 9493, 983968,
- 41014, 11793, 194920, 0, 74394, 43460, 10653, 42723, 983854, 119632, 0,
- 6560, 7016, 74274, 983615, 43556, 3929, 67977, 6614, 2768, 92504, 9746,
- 5135, 11811, 12796, 11953, 0, 69761, 5139, 346, 74303, 6305, 12795, 4675,
- 5168, 78552, 127753, 74315, 74361, 8253, 8817, 1136, 0, 43563, 92232, 0,
- 194750, 7392, 8230, 9365, 0, 0, 983607, 0, 0, 4041, 0, 2357, 43240,
- 12786, 229, 119885, 119884, 44004, 7142, 119881, 12350, 65554, 119882,
- 119877, 119876, 12785, 63863, 43795, 7770, 10712, 64853, 12686, 118916,
- 42375, 0, 127238, 66352, 10470, 0, 11059, 10791, 917944, 450, 119328, 0,
- 10432, 12097, 5450, 64691, 1233, 0, 44009, 78284, 66338, 0, 0, 1839,
- 118799, 983219, 10927, 1701, 983664, 2388, 41749, 41761, 5453, 8361,
- 119865, 41758, 5444, 41763, 64889, 7143, 92493, 78677, 0, 92429, 78174,
- 66432, 8801, 3053, 4340, 983044, 0, 65812, 917831, 0, 41824, 67985,
- 120203, 194800, 194803, 42700, 194805, 127980, 194807, 78676, 92356,
- 194808, 0, 0, 4493, 4336, 0, 2314, 43602, 78826, 119325, 194811, 42439,
- 64638, 42327, 43528, 4489, 71331, 0, 194793, 1912, 42385, 10306, 10370,
- 0, 0, 8867, 10250, 10258, 2712, 1635, 78821, 1410, 92671, 983250, 118878,
- 0, 0, 9919, 120528, 559, 128157, 41825, 127975, 78188, 4892, 74016,
- 194781, 6542, 41957, 128865, 5777, 0, 759, 65749, 2079, 65248, 12788,
- 64487, 64552, 0, 10223, 42062, 0, 0, 126573, 3668, 65754, 43560, 12226,
- 67991, 65149, 2340, 41959, 194786, 194785, 194788, 43618, 65747, 10937,
- 2962, 0, 2321, 3587, 65745, 92436, 8921, 9952, 0, 0, 42714, 9951, 43409,
- 194770, 2949, 66012, 194775, 194774, 2958, 68359, 41820, 2300, 2395,
- 128563, 9976, 120043, 120050, 120058, 68220, 128143, 42809, 42807, 0,
- 120046, 10198, 4150, 64371, 8318, 41790, 67976, 41898, 2360, 41794,
- 917942, 71314, 127818, 0, 0, 2418, 983098, 2411, 11336, 799, 63823,
- 10276, 10308, 10372, 917541, 41772, 42813, 2317, 10260, 118980, 55284,
- 92203, 0, 10384, 983220, 0, 0, 7753, 2351, 6655, 64489, 69931, 0, 77872,
- 4443, 42779, 230, 0, 0, 43549, 4855, 42150, 65739, 5441, 41896, 10288,
- 10320, 0, 855, 7046, 6109, 65045, 63839, 78198, 2049, 10098, 0, 74145,
- 127943, 10264, 10280, 9184, 10376, 7013, 4467, 0, 0, 0, 41887, 0, 4862,
- 9735, 6537, 120591, 74286, 3914, 92178, 93976, 9065, 12961, 0, 0, 92253,
- 0, 289, 0, 4694, 11420, 4690, 0, 120514, 917978, 4693, 73893, 42724, 0,
- 4688, 120454, 0, 0, 67994, 8238, 3110, 120162, 983908, 120163, 6528,
- 127553, 43035, 69898, 218, 0, 1520, 0, 4786, 0, 43225, 4602, 0, 78167,
- 10088, 6548, 0, 120156, 43978, 8988, 8888, 0, 0, 0, 0, 10666, 0, 73902,
- 69740, 0, 0, 9975, 128039, 119902, 4689, 8932, 0, 65560, 119209, 74441,
- 78810, 0, 0, 67987, 0, 0, 0, 67989, 0, 10065, 8207, 0, 92613, 128011, 0,
- 662, 0, 9244, 194863, 0, 119261, 983428, 0, 0, 0, 41929, 0, 0, 66674,
- 41926, 120408, 120443, 10513, 64637, 194862, 68013, 52, 13118, 6475, 0,
- 120341, 12095, 10225, 4812, 92578, 0, 67992, 74085, 0, 3978, 0, 917945,
- 127823, 11582, 120761, 12281, 0, 6544, 13241, 93961, 69782, 128557,
- 194860, 11765, 65258, 10369, 0, 1585, 7192, 10249, 422, 1500, 2036, 986,
- 194859, 64394, 5781, 5599, 64294, 2494, 120450, 4861, 74021, 64334,
- 78203, 127808, 0, 92266, 65102, 8961, 65842, 10243, 10245, 74191, 120410,
- 0, 120453, 64821, 9478, 2508, 92683, 0, 202, 128246, 74131, 1242, 65514,
- 0, 63940, 128706, 64533, 120129, 0, 67842, 11990, 92430, 63939, 43375,
- 65440, 2504, 0, 78671, 64829, 983910, 6943, 917934, 5859, 0, 2858,
- 983361, 74294, 983914, 69239, 0, 119027, 12992, 2753, 1936, 70078, 92574,
- 2751, 12662, 2763, 8953, 64701, 10731, 12922, 7052, 917839, 0, 0, 0,
- 63920, 74128, 2856, 119910, 47, 69908, 126986, 65858, 0, 0, 0, 7899, 0,
- 8417, 43798, 7072, 0, 0, 4033, 128164, 43992, 0, 0, 212, 64600, 1903,
- 12320, 0, 0, 194563, 0, 8915, 2759, 945, 6689, 0, 0, 0, 0, 1291, 74828,
- 0, 0, 9531, 13155, 8505, 68379, 12062, 0, 0, 65487, 92189, 41837, 120611,
- 120432, 0, 0, 0, 120433, 0, 63935, 73962, 120806, 64787, 43524, 0, 64426,
- 0, 194948, 0, 0, 65664, 6693, 9843, 0, 8674, 119887, 128812, 92715, 0,
- 12624, 0, 1673, 4811, 92383, 5986, 9338, 3046, 74480, 5985, 917928,
- 119598, 9820, 0, 12187, 0, 0, 5984, 0, 43308, 4393, 67650, 0, 0, 0, 0,
- 74826, 64733, 0, 0, 3491, 0, 0, 128219, 3514, 65485, 0, 7492, 0, 74605,
- 92483, 7514, 983367, 0, 194731, 7502, 7587, 68353, 0, 0, 63925, 0, 7610,
- 219, 0, 0, 692, 43588, 74433, 41635, 43241, 9688, 7147, 9535, 0, 93991,
- 0, 64530, 0, 64610, 11804, 0, 7149, 7453, 0, 8013, 0, 92301, 0, 8895,
- 5253, 70025, 5458, 0, 2866, 0, 127860, 65111, 68433, 6700, 120484, 0,
- 120583, 0, 8962, 77960, 9641, 43694, 7059, 983677, 0, 9604, 78700, 7441,
- 63826, 67970, 118941, 64392, 194735, 983687, 2844, 983941, 41974, 0,
- 12139, 67971, 0, 0, 3358, 65295, 0, 3104, 194734, 0, 194765, 983233,
- 5308, 0, 290, 0, 0, 2862, 2792, 195088, 983070, 0, 3268, 66591, 0, 6552,
- 42367, 7035, 120558, 0, 0, 1814, 0, 10240, 92338, 74305, 0, 74528, 65903,
- 0, 42646, 7606, 2591, 2837, 4341, 77956, 64482, 127337, 8163, 65270, 0,
- 77932, 0, 9112, 74431, 863, 9490, 119898, 128349, 43323, 120513, 119897,
- 9071, 127333, 0, 3654, 7789, 9637, 0, 2535, 65504, 7653, 40993, 119899,
- 66587, 195098, 0, 92401, 983894, 11006, 12927, 7807, 8073, 0, 10629, 0,
- 74088, 3056, 10823, 128797, 127327, 8762, 10508, 69689, 73770, 43969,
- 43193, 10737, 3463, 983065, 0, 66633, 8695, 4815, 11322, 5811, 12345,
- 7049, 119911, 5195, 195081, 0, 66639, 0, 0, 0, 128041, 0, 92385, 1262, 0,
- 6561, 19939, 0, 0, 128535, 119906, 0, 0, 983097, 0, 983667, 119907,
- 64612, 11991, 0, 0, 0, 1502, 917568, 0, 9107, 127316, 5702, 3655, 67661,
- 8430, 0, 74132, 120758, 0, 74057, 9603, 0, 5254, 120742, 7724, 74388,
- 68375, 10796, 5129, 0, 0, 590, 7579, 5614, 5893, 92280, 11720, 92496,
- 11721, 0, 4798, 0, 119316, 66038, 4793, 67851, 11726, 127541, 74204,
- 68610, 0, 68626, 894, 300, 917813, 12306, 66235, 8004, 0, 0, 2562,
- 126555, 0, 42503, 0, 11652, 0, 0, 119241, 64699, 126569, 5096, 5095,
- 2863, 3424, 92244, 10454, 42530, 5094, 119638, 0, 13156, 0, 10832, 5093,
- 0, 69852, 0, 5092, 10708, 11327, 0, 5091, 176, 0, 9153, 4104, 78599,
- 78601, 1215, 42712, 5744, 12272, 9832, 11777, 71299, 127371, 42881, 0,
- 8980, 118988, 67861, 8844, 7209, 0, 0, 4278, 0, 0, 194789, 0, 9074, 4348,
- 0, 65558, 65946, 8113, 7087, 5255, 1786, 661, 0, 0, 0, 74423, 71345, 586,
- 74414, 64359, 1267, 128269, 65468, 0, 65731, 0, 127179, 3621, 120473,
- 66666, 64211, 0, 6562, 12928, 0, 1228, 65490, 11383, 0, 0, 0, 1714,
- 74406, 127831, 0, 983921, 0, 66225, 0, 0, 42660, 11436, 2070, 64, 120694,
- 0, 10291, 10323, 2826, 0, 0, 0, 42008, 9708, 42710, 0, 42011, 41999,
- 92164, 12206, 5839, 1702, 1240, 74065, 6286, 0, 983969, 65833, 77848, 0,
- 1765, 0, 0, 65588, 0, 0, 0, 8401, 0, 42014, 0, 7030, 194704, 10479,
- 64959, 2852, 0, 0, 0, 0, 128586, 917951, 6963, 0, 12667, 64540, 74786,
- 10147, 12935, 127568, 126483, 0, 0, 0, 78757, 0, 0, 0, 0, 9994, 12467,
- 2864, 64719, 1148, 10435, 11462, 41675, 7084, 2765, 0, 43382, 0, 120719,
- 128188, 92516, 66662, 0, 78133, 9364, 194685, 74416, 0, 0, 77988, 263,
- 10449, 41288, 0, 41839, 78387, 983742, 77986, 0, 6931, 69722, 64355,
- 7177, 70105, 0, 0, 0, 4262, 10285, 10722, 42020, 126575, 6806, 6992,
- 42019, 0, 41290, 983716, 750, 0, 71304, 10163, 63913, 71300, 7032, 5954,
- 64931, 4314, 0, 198, 68453, 730, 120094, 63907, 77993, 78891, 13165,
- 7107, 74171, 42804, 678, 8240, 78015, 128784, 41378, 11008, 6938, 70026,
- 92637, 2097, 66246, 120560, 0, 0, 0, 3892, 68632, 69642, 6712, 66045,
- 41470, 64805, 0, 0, 128215, 64801, 0, 497, 12100, 5953, 92667, 7796,
- 69669, 43254, 73831, 0, 10293, 5952, 1281, 43747, 0, 0, 10677, 604,
- 41097, 9182, 1859, 0, 92603, 3425, 127488, 0, 2836, 0, 0, 9707, 0, 43202,
- 0, 0, 65199, 1738, 917818, 128158, 2832, 92702, 9670, 12937, 0, 66374,
- 917956, 0, 2822, 68122, 4436, 92519, 983723, 73752, 0, 64872, 92340,
- 1331, 0, 0, 0, 12708, 0, 5090, 5089, 127977, 0, 119109, 0, 128681, 319,
- 118847, 43479, 9477, 0, 0, 5087, 92325, 7640, 96, 5086, 0, 92379, 0,
- 5085, 64286, 92665, 0, 41422, 0, 119901, 42356, 3772, 0, 0, 5011, 0, 0,
- 126587, 0, 127165, 127241, 6677, 7601, 0, 591, 64419, 118953, 92262, 0,
- 118923, 70084, 0, 10939, 6106, 6933, 41271, 6760, 71343, 4534, 41270,
- 128876, 0, 65574, 0, 9224, 69853, 3671, 8976, 126474, 0, 41275, 6372,
- 128084, 55261, 7963, 6371, 0, 568, 0, 41273, 983730, 0, 6728, 0, 9715, 0,
- 8258, 11753, 74820, 0, 9602, 118919, 42, 0, 43688, 0, 0, 7458, 0, 0,
- 65385, 119900, 0, 11958, 0, 917822, 0, 6254, 42721, 66336, 8045, 11550,
- 0, 0, 983597, 42858, 11789, 65868, 5557, 10133, 9737, 13109, 0, 9467,
- 5558, 8878, 128136, 195036, 7451, 6706, 10146, 0, 9086, 64566, 0, 64584,
- 7437, 7454, 12594, 128690, 68362, 4546, 7731, 0, 70048, 74243, 0, 3805,
- 0, 194565, 44001, 41008, 0, 6307, 19949, 983790, 7544, 983045, 43469, 0,
- 0, 10152, 64422, 65091, 119113, 7602, 64729, 0, 43521, 0, 42302, 43711,
- 43523, 41447, 5559, 0, 8704, 2397, 5556, 0, 0, 0, 9011, 9630, 92633, 0,
- 93998, 5506, 0, 1911, 66652, 0, 9961, 8845, 66698, 0, 10792, 8889, 0,
- 2098, 0, 64751, 0, 66622, 0, 0, 74364, 0, 0, 983805, 74365, 7552, 0, 0,
- 65384, 7223, 4559, 0, 1956, 43138, 7024, 65728, 64501, 1210, 195077,
- 65175, 10184, 43140, 43654, 0, 0, 0, 38, 8533, 66669, 119124, 983293,
- 983792, 0, 4357, 0, 119837, 917863, 74233, 9967, 78884, 42860, 119838,
- 10941, 65721, 6962, 0, 0, 119324, 0, 11014, 127972, 8942, 12000, 69224,
- 92267, 128536, 11974, 92213, 42772, 127518, 11650, 5013, 92663, 126583,
- 66210, 118914, 6613, 92476, 0, 43819, 983770, 0, 64714, 0, 0, 12162,
- 12120, 43476, 983766, 11024, 74811, 66228, 10563, 0, 127196, 43522, 2462,
- 0, 1837, 0, 63972, 6957, 0, 120559, 4952, 65718, 65827, 5504, 65720,
- 65714, 65715, 65716, 0, 127005, 127119, 3109, 63975, 74028, 0, 8107,
- 119234, 1127, 455, 0, 63968, 127924, 3483, 119593, 1989, 0, 69678, 9104,
- 3503, 65375, 92509, 6694, 42633, 1864, 0, 74306, 41446, 2540, 7736, 0,
- 74064, 0, 10521, 0, 42173, 9705, 74124, 8604, 6955, 10916, 43684, 6149,
- 3887, 19956, 1411, 2824, 0, 10106, 127862, 1403, 128839, 1347, 9631,
- 74444, 0, 0, 0, 0, 8640, 0, 258, 1654, 0, 0, 0, 43314, 0, 0, 4042, 11478,
- 2873, 63977, 11522, 41668, 8549, 10861, 0, 63976, 0, 68623, 0, 74585,
- 41391, 0, 917903, 376, 6987, 9221, 0, 0, 8823, 128697, 12943, 65185,
- 41869, 12619, 0, 10154, 983043, 74439, 2039, 0, 7446, 1684, 63979, 10974,
- 458, 120620, 0, 69791, 127161, 11916, 65016, 0, 69671, 42115, 983133,
- 12288, 78057, 0, 1493, 42111, 7553, 4097, 128199, 13080, 0, 65808, 6610,
- 6030, 8059, 7508, 13131, 0, 983431, 0, 8794, 41278, 41629, 12154, 128192,
- 41277, 64658, 0, 64380, 6625, 74354, 19904, 0, 0, 0, 65371, 7078, 0, 833,
- 0, 6369, 0, 10979, 41953, 0, 41434, 6062, 0, 0, 19916, 6913, 933, 1341,
- 9842, 6720, 65744, 0, 983592, 128295, 0, 7405, 10105, 65810, 0, 41632,
- 7493, 55290, 0, 41622, 0, 0, 119556, 74584, 7632, 9716, 19954, 9805,
- 5990, 900, 0, 63957, 0, 0, 3612, 0, 64376, 93987, 5389, 92597, 0, 65938,
- 2839, 9621, 582, 0, 74368, 3749, 6949, 7569, 74061, 0, 0, 6956, 4403,
- 19962, 65559, 3299, 0, 917566, 119127, 9002, 0, 74372, 74236, 8478, 7598,
- 546, 42469, 65569, 1918, 9542, 472, 7716, 10319, 10383, 6996, 0, 63952,
- 8425, 3602, 8328, 11764, 118894, 0, 69796, 41183, 12907, 10271, 10287,
- 684, 43525, 0, 2854, 119586, 4592, 65755, 0, 92256, 11963, 43620, 0,
- 78249, 0, 128551, 128809, 9881, 43115, 65757, 3415, 119131, 0, 8648, 0,
- 6741, 43047, 0, 13180, 128517, 418, 917972, 64495, 10295, 10327, 10391,
- 41752, 74339, 8641, 41449, 0, 74100, 0, 10911, 6942, 0, 1024, 42849,
- 41751, 69776, 8941, 983556, 4554, 0, 9023, 11685, 0, 9928, 78617, 0,
- 11437, 43741, 92163, 120700, 63967, 983483, 41206, 120724, 9049, 41185,
- 43166, 0, 11680, 92619, 11686, 78544, 65224, 4565, 4655, 119553, 0,
- 92183, 64523, 10343, 10407, 0, 66671, 11466, 0, 128003, 42890, 74013,
- 12050, 68201, 2860, 0, 0, 0, 42792, 5743, 10424, 12065, 42872, 0, 92342,
- 0, 8875, 0, 0, 917991, 7531, 12847, 2413, 0, 78635, 962, 0, 12855, 41196,
- 42564, 0, 1582, 983715, 5508, 0, 0, 0, 10801, 69876, 92354, 0, 7173, 496,
- 10439, 4313, 64607, 69638, 7860, 0, 906, 42793, 2842, 6405, 64722, 13132,
- 798, 64694, 12801, 8406, 1153, 92173, 64788, 0, 8054, 9174, 128652,
- 917976, 9964, 74409, 41611, 4642, 66574, 11556, 917982, 0, 78857, 42089,
- 78855, 9008, 0, 126592, 195096, 42079, 917981, 77924, 42513, 77927,
- 42842, 73985, 65285, 118974, 127003, 983702, 0, 0, 0, 11335, 64069,
- 42093, 3920, 0, 0, 0, 0, 4580, 41967, 983732, 64384, 92167, 93984, 3021,
- 42004, 0, 0, 42317, 41998, 0, 6946, 0, 0, 0, 128193, 65204, 0, 68113,
- 42690, 9880, 42010, 74824, 64589, 10111, 64875, 127880, 68399, 43998,
- 11360, 0, 0, 0, 118826, 42149, 0, 0, 0, 64941, 77919, 120421, 128077, 0,
- 55247, 4110, 66005, 6959, 10929, 119110, 0, 66703, 77921, 8617, 41982,
- 6025, 69242, 983176, 0, 0, 0, 9597, 42099, 43172, 983376, 10117, 983169,
- 92297, 41636, 0, 0, 120681, 8301, 0, 0, 187, 0, 65669, 128339, 4963, 0,
- 127517, 0, 8964, 65676, 7775, 0, 41948, 0, 0, 0, 41942, 65449, 3160,
- 10081, 13226, 42121, 42475, 42663, 128210, 41766, 119114, 65882, 78849,
- 41760, 1189, 905, 480, 10985, 41733, 67859, 9629, 6742, 1745, 43625,
- 73835, 7888, 0, 3980, 0, 42656, 41507, 8806, 7023, 0, 74279, 9447, 78651,
- 7867, 69218, 6236, 983134, 0, 10505, 0, 12851, 118948, 348, 5474, 128843,
- 3103, 0, 41753, 128540, 0, 0, 78844, 78845, 41739, 78843, 42515, 10931,
- 41756, 43347, 42560, 5391, 41746, 119147, 92591, 41259, 5561, 69930,
- 2691, 0, 65553, 7933, 5562, 69800, 128265, 41262, 128146, 64421, 74846,
- 41251, 0, 0, 3979, 0, 0, 74813, 983739, 0, 0, 0, 92524, 41266, 0, 66566,
- 128836, 10585, 65741, 41737, 9574, 2666, 0, 41738, 831, 419, 13126,
- 10716, 0, 42822, 0, 6434, 0, 6939, 7766, 6432, 128106, 69932, 916, 769,
- 41742, 11968, 74805, 6433, 5563, 547, 1943, 6439, 5560, 4994, 487,
- 126537, 4497, 3754, 127056, 120424, 9039, 0, 41776, 0, 8716, 1595, 41615,
- 0, 0, 74260, 0, 42854, 43219, 128709, 983460, 12185, 128879, 70072,
- 68355, 68357, 0, 42856, 8634, 0, 983397, 4209, 120702, 0, 65879, 41538,
- 65612, 127543, 669, 5679, 0, 69786, 92540, 0, 983464, 5678, 11821, 0,
- 6711, 460, 0, 0, 983461, 0, 120747, 0, 0, 78050, 119022, 0, 983462, 0,
- 7782, 9044, 4974, 11760, 78494, 7577, 65711, 41912, 1216, 0, 128079,
- 5792, 0, 0, 78501, 0, 2933, 12244, 0, 5683, 983392, 0, 78119, 1549, 0, 0,
- 120398, 5682, 6206, 8670, 10256, 5680, 69935, 10001, 128512, 69768, 1449,
- 10241, 78290, 128228, 0, 10552, 64342, 41922, 128548, 8584, 68030, 5567,
- 2717, 0, 0, 5564, 42886, 41908, 42882, 5565, 983256, 128026, 0, 65708,
- 65709, 5566, 69803, 65704, 65705, 11904, 42875, 43373, 42539, 5942, 8468,
- 120561, 10361, 10425, 65697, 65698, 65699, 0, 66598, 0, 64664, 10647,
- 78702, 78703, 78690, 457, 78502, 65701, 1934, 43006, 119903, 8802, 78710,
- 65130, 11747, 78709, 6087, 78705, 78716, 41757, 78711, 8043, 8950, 65694,
- 64485, 43534, 10457, 0, 11961, 78725, 78722, 78723, 78720, 78721, 0,
- 65515, 9499, 10035, 13069, 71309, 0, 9889, 68184, 42806, 0, 7256, 0, 0,
- 1667, 42161, 0, 42428, 0, 6934, 0, 10802, 64861, 6556, 78390, 0, 8101,
- 3610, 983199, 41748, 4995, 955, 65907, 119208, 5350, 64339, 78306, 64549,
- 10875, 128662, 5477, 65692, 0, 128532, 120397, 12896, 10456, 917954, 0,
- 3874, 0, 0, 983619, 120331, 0, 0, 65603, 0, 65687, 0, 41038, 74009,
- 119570, 42239, 8536, 78740, 78324, 78726, 74432, 724, 0, 1455, 78749,
- 7183, 64583, 78747, 68443, 4175, 78741, 43614, 69801, 939, 0, 43520,
- 68613, 74569, 917958, 0, 78763, 78764, 78760, 10788, 6088, 78759, 78755,
- 190, 0, 12593, 0, 8188, 64408, 0, 4417, 983213, 92261, 6370, 0, 7827,
- 68441, 6965, 0, 0, 13201, 128205, 69896, 0, 74382, 73781, 7918, 73988, 0,
- 0, 917884, 1728, 0, 43764, 178, 12972, 92679, 0, 917887, 92563, 983381,
- 0, 78327, 120405, 65690, 0, 0, 119054, 0, 9252, 917889, 4652, 68371, 0,
- 0, 0, 13065, 9923, 10806, 0, 11763, 70016, 120688, 6723, 78187, 0, 6993,
- 0, 0, 8333, 0, 0, 11390, 0, 74464, 0, 92320, 74080, 983315, 69911, 11910,
- 92559, 8278, 8963, 4034, 128560, 0, 65344, 120517, 41747, 0, 0, 8677, 0,
- 12707, 9350, 66037, 128180, 8836, 12315, 12747, 8300, 983750, 0, 7491,
- 8856, 71361, 0, 43150, 127768, 120404, 65389, 120402, 120403, 10813,
- 2592, 12853, 43269, 7263, 120244, 6536, 120238, 120239, 65516, 12321,
- 120391, 120388, 55287, 10007, 120246, 9588, 120248, 1596, 120383, 41994,
- 65801, 128808, 0, 66572, 0, 0, 10613, 6697, 12805, 41928, 40981, 78403,
- 78409, 5006, 64328, 0, 9931, 0, 8825, 74555, 65940, 43259, 0, 6107, 0,
- 119177, 0, 78401, 128641, 11783, 335, 120227, 64689, 438, 4510, 5765,
- 8721, 120233, 119227, 6092, 12840, 43112, 8876, 120231, 8096, 10284,
- 128515, 0, 0, 10380, 8733, 983072, 128240, 41602, 0, 92308, 74831,
- 917901, 0, 73747, 65399, 0, 64591, 42405, 0, 120820, 843, 11541, 0,
- 917898, 2065, 41935, 74496, 41902, 0, 0, 215, 41258, 77875, 43159, 1953,
- 9579, 41938, 1256, 3910, 9407, 6242, 0, 983100, 41257, 41900, 8675,
- 10700, 8805, 1742, 0, 9333, 8202, 127750, 0, 983197, 0, 0, 73882, 499,
- 983049, 43467, 0, 43818, 0, 1712, 5932, 77845, 41762, 983104, 0, 11967,
- 1775, 0, 0, 0, 0, 128009, 9458, 0, 6470, 9180, 120380, 43176, 0, 0,
- 42782, 0, 0, 0, 128309, 74777, 120669, 9414, 120382, 73782, 73969, 565,
- 42484, 5794, 201, 2662, 42292, 0, 8254, 0, 10975, 0, 120625, 74763, 1022,
- 4108, 3880, 74247, 0, 0, 92263, 917980, 7507, 0, 43149, 0, 65031, 7961,
- 1636, 0, 65029, 65024, 0, 12473, 6534, 0, 99, 98, 97, 120571, 67584,
- 4049, 74163, 127065, 7090, 0, 7892, 917969, 10777, 917803, 65310, 65562,
- 66599, 66722, 0, 8039, 3363, 66594, 43434, 0, 0, 12596, 66595, 42258,
- 42570, 5593, 119148, 120711, 92425, 10100, 6061, 64854, 119, 118, 117,
- 116, 12998, 122, 121, 120, 111, 110, 109, 108, 115, 114, 113, 112, 103,
- 102, 101, 100, 107, 106, 105, 104, 6436, 73974, 534, 41212, 77931, 1536,
- 64093, 73970, 77930, 127157, 0, 6020, 12716, 127112, 12744, 475, 120394,
- 13266, 127813, 127111, 0, 73926, 0, 10645, 1212, 6543, 983307, 8134,
- 128028, 2913, 73870, 127113, 1866, 983229, 195095, 0, 8923, 1645, 12059,
- 66585, 71297, 3196, 0, 0, 5935, 1250, 127066, 8174, 9787, 6733, 9859,
- 7916, 9861, 9860, 5258, 1882, 1892, 6731, 10882, 405, 11454, 73911, 0,
- 128781, 41169, 8939, 41245, 0, 41170, 1454, 11369, 6477, 12157, 0, 0, 0,
- 41172, 7855, 0, 0, 10480, 0, 0, 77936, 8264, 12610, 983308, 645, 126616,
+ 78319, 63959, 0, 9942, 13231, 983578, 64752, 4732, 194666, 11596, 78142,
+ 65187, 1626, 63983, 10110, 64772, 42024, 6420, 42028, 92294, 10509, 2795,
+ 4910, 129193, 69231, 64753, 6275, 93957, 118830, 63978, 11044, 3229,
+ 6423, 42774, 0, 0, 68526, 12823, 2331, 127788, 7085, 6137, 0, 7524,
+ 120721, 917809, 8346, 128438, 8338, 128315, 65043, 77982, 822, 70412,
+ 9903, 64721, 42722, 69877, 82956, 78655, 66882, 82959, 78484, 41265,
+ 5311, 1795, 965, 118791, 10587, 43962, 11278, 78632, 74111, 128095,
+ 12946, 121076, 71921, 120349, 6294, 3144, 113706, 127967, 65019, 74078,
+ 73990, 65111, 983960, 748, 41067, 2330, 535, 3148, 12375, 78799, 194629,
+ 10556, 2475, 12388, 4889, 8968, 67863, 3593, 74076, 82949, 2342, 82951,
+ 82944, 65206, 4894, 82947, 4890, 121059, 64433, 581, 4893, 42929, 6571,
+ 65545, 4888, 4157, 78048, 78049, 64651, 78047, 0, 10119, 6415, 42893, 0,
+ 69702, 983937, 0, 11375, 64746, 2332, 78063, 412, 78061, 42928, 42880,
+ 43587, 121098, 0, 0, 70461, 65197, 78066, 12203, 78064, 78065, 8913,
+ 65854, 4875, 65811, 75024, 120389, 71854, 9344, 8826, 92916, 120395,
+ 13104, 67828, 11997, 120393, 78075, 0, 3134, 83096, 65696, 72432, 121412,
+ 66217, 121190, 8334, 92755, 83207, 3449, 121264, 13100, 78414, 78413,
+ 83216, 66405, 70430, 83089, 83203, 127250, 1908, 120167, 4328, 10734,
+ 127014, 83198, 67825, 7804, 78272, 10811, 6250, 11339, 4914, 11367,
+ 83510, 78054, 4917, 74516, 74208, 64285, 4912, 5464, 127836, 83100, 2361,
+ 7971, 78072, 78073, 55243, 78071, 983575, 8086, 74317, 6707, 8319, 2312,
+ 40977, 10960, 40962, 8305, 12573, 71131, 40980, 983964, 13202, 127816,
+ 12582, 78282, 983048, 69856, 42438, 55221, 6288, 78280, 127946, 5653,
+ 42400, 10891, 7698, 5658, 70401, 70039, 0, 70460, 4913, 71060, 128562,
+ 71333, 42326, 121119, 12728, 92685, 42478, 2327, 0, 12563, 42287, 12705,
+ 120829, 83081, 12588, 8821, 6153, 2867, 83085, 66312, 698, 83076, 83087,
+ 10356, 70017, 128570, 651, 12641, 83138, 125098, 120710, 129064, 41552,
+ 65115, 78465, 78467, 78463, 74905, 127516, 78461, 92960, 66927, 64945,
+ 4716, 43277, 120932, 78474, 12340, 120568, 120928, 194700, 55264, 41211,
+ 120676, 8703, 5462, 83195, 83185, 10101, 0, 70049, 8479, 4151, 41933,
+ 83189, 0, 66254, 120821, 68497, 0, 128654, 113799, 83159, 74050, 42651,
+ 127371, 0, 0, 83225, 83218, 12278, 75011, 128405, 0, 2700, 12576, 7842,
+ 12899, 83155, 0, 2699, 129304, 73845, 2985, 83149, 68648, 83146, 12192,
+ 119314, 0, 66489, 9827, 119310, 8609, 119308, 67426, 119306, 11481,
+ 41210, 119305, 0, 35, 70838, 67431, 66694, 68479, 78477, 67428, 43596,
+ 6090, 64257, 7812, 10534, 0, 78485, 73848, 67975, 4272, 78321, 40967,
+ 40964, 917825, 12704, 78487, 43306, 0, 64497, 12138, 7930, 0, 2292,
+ 68216, 194871, 121390, 5244, 4189, 92697, 67596, 127504, 4188, 1879,
+ 70463, 968, 0, 43743, 0, 8873, 2279, 127100, 917827, 65555, 12574, 0,
+ 92749, 92753, 74490, 127099, 11838, 75001, 0, 0, 42682, 12578, 12720, 0,
+ 41227, 0, 12346, 127101, 64848, 69950, 917950, 7251, 0, 120382, 118850,
+ 119141, 128461, 66015, 67332, 959, 8885, 12564, 66457, 78808, 9469, 9632,
+ 92231, 74761, 64323, 127335, 128842, 0, 11132, 310, 120924, 41281, 10976,
+ 0, 71325, 128364, 74266, 10054, 6497, 8574, 917823, 9012, 19958, 74420,
+ 65089, 13215, 12730, 65163, 64260, 374, 43195, 816, 92783, 0, 83191,
+ 41934, 7465, 74615, 92752, 127895, 4715, 6101, 71089, 41936, 82967, 4879,
+ 43965, 65446, 0, 307, 127147, 9585, 5374, 127962, 128059, 0, 129189,
+ 126618, 120390, 74953, 65567, 120614, 1929, 120984, 12142, 194696, 12236,
+ 41419, 194618, 120610, 12982, 75003, 5378, 75004, 120957, 41421, 75005,
+ 4462, 0, 126599, 128092, 821, 0, 2498, 5800, 120157, 67758, 1760, 2421,
+ 4469, 2324, 828, 3611, 78400, 757, 1185, 0, 78770, 43597, 10628, 74808,
+ 68849, 7999, 43971, 11217, 121224, 10634, 10942, 7713, 2348, 0, 64374,
+ 4380, 128284, 83061, 9982, 64324, 41240, 862, 64468, 78462, 1810, 3673,
+ 5137, 194617, 0, 7277, 65622, 65069, 7566, 64688, 67143, 194592, 74957,
+ 43912, 128385, 4748, 92228, 129185, 194601, 42260, 5871, 119075, 121278,
+ 74576, 44019, 194720, 128189, 3967, 71098, 13137, 8775, 127945, 0, 2963,
+ 917785, 8410, 4454, 723, 83084, 966, 4449, 92330, 92238, 75022, 7819,
+ 2320, 194589, 339, 4968, 194590, 120399, 8075, 55276, 83057, 8047, 0,
+ 78827, 12634, 41542, 78780, 7466, 6705, 12174, 42610, 124934, 74452,
+ 983763, 1584, 66645, 6045, 6729, 120640, 65218, 11559, 194983, 78062,
+ 7537, 124991, 11370, 125093, 10330, 78798, 10394, 92236, 74194, 0,
+ 127929, 9780, 0, 11117, 74993, 77950, 67091, 7074, 92648, 194579, 194582,
+ 11414, 68781, 2531, 13034, 129159, 0, 4211, 1259, 7517, 70866, 70198,
+ 83122, 40996, 13037, 7092, 641, 5219, 83125, 194566, 11064, 41129,
+ 121253, 42850, 13035, 9075, 92387, 5466, 74293, 74530, 64098, 65793,
+ 4535, 121267, 4271, 78417, 127059, 6769, 41410, 127257, 64262, 6767,
+ 41407, 66273, 917816, 6755, 118864, 9046, 120886, 126608, 70830, 0,
+ 83232, 0, 67675, 983694, 83234, 121254, 64338, 2563, 13033, 247, 83229,
+ 0, 12338, 4651, 67355, 11270, 0, 74630, 11933, 70107, 0, 41903, 43447,
+ 11001, 73827, 42255, 83243, 83238, 69821, 41905, 67350, 0, 10775, 9793,
+ 5009, 128774, 42269, 64587, 983063, 42535, 69812, 64529, 41408, 42853,
+ 3877, 120795, 42674, 8147, 43566, 119021, 67342, 10236, 65918, 43782,
+ 78769, 78060, 64506, 69652, 118921, 4747, 83251, 69844, 43200, 5832,
+ 71208, 83250, 5141, 42600, 71866, 43203, 127208, 120129, 43286, 0,
+ 128211, 43778, 7657, 41305, 71132, 43781, 11303, 65547, 128609, 7031,
+ 859, 128488, 83262, 83237, 6059, 126985, 55235, 194817, 8535, 128638,
+ 65196, 125084, 66032, 11488, 120481, 120786, 42233, 64140, 9946, 7667,
+ 194792, 11822, 128591, 11135, 983600, 0, 1788, 1579, 120482, 71298, 0,
+ 983461, 0, 9028, 119571, 69234, 71061, 92545, 1285, 64882, 41242, 70086,
+ 83111, 12640, 83112, 7401, 0, 12625, 68198, 0, 70082, 3940, 41597, 43754,
+ 3396, 12642, 8665, 983610, 983609, 12630, 1653, 917815, 10153, 0, 6166,
+ 70825, 118989, 129409, 8815, 66673, 65046, 9285, 913, 42259, 11180,
+ 119318, 2142, 68454, 42485, 94012, 7878, 8211, 42293, 64377, 120478,
+ 92643, 121118, 194673, 12032, 0, 9725, 983491, 78431, 5263, 12818, 78430,
+ 41939, 10022, 65387, 78419, 42777, 10139, 980, 43698, 65386, 2208, 68848,
+ 43701, 43198, 7184, 92542, 128423, 128875, 10085, 74979, 0, 67394, 6634,
+ 92373, 125085, 83413, 8072, 119321, 43700, 0, 8872, 7783, 917991, 12398,
+ 8237, 0, 0, 12395, 0, 126977, 74891, 9914, 2217, 92323, 73975, 6367,
+ 6351, 66688, 92740, 68766, 0, 64735, 41243, 92199, 7808, 1829, 126541,
+ 41937, 4358, 43272, 6353, 0, 0, 120422, 93045, 1710, 120140, 0, 65607,
+ 67234, 49, 6627, 0, 6258, 10683, 78672, 9741, 78329, 5649, 78441, 43443,
+ 64418, 1643, 65213, 8405, 3470, 67244, 13213, 42452, 78331, 78013, 78445,
+ 125124, 1072, 78457, 78452, 78454, 6576, 41988, 41132, 65675, 1080,
+ 70824, 9886, 55225, 1101, 68404, 12309, 55227, 71082, 12632, 1086, 1869,
+ 78685, 7680, 0, 65458, 120714, 12639, 3380, 8123, 1091, 12638, 7977,
+ 4501, 41099, 0, 66309, 120141, 92758, 1494, 113716, 126613, 0, 11693,
+ 71255, 10494, 92655, 65872, 12363, 11386, 113727, 0, 0, 78771, 64582, 0,
+ 73794, 67395, 8022, 120989, 120462, 74106, 12413, 66883, 917994, 93035,
+ 75007, 5570, 1881, 7210, 120425, 1012, 43752, 0, 120709, 7208, 66442,
+ 5569, 195007, 42339, 92997, 6063, 67888, 69981, 119594, 6053, 65602, 0,
+ 92201, 64727, 9160, 70301, 0, 92905, 92180, 10503, 70387, 3423, 3870,
+ 4279, 8490, 120114, 4319, 64786, 8602, 120110, 11326, 92204, 983116, 0,
+ 74961, 78333, 120117, 120118, 120099, 92385, 65087, 5571, 3674, 9740,
+ 9121, 5568, 71464, 120108, 42085, 10107, 42159, 42870, 113700, 589, 7050,
+ 983800, 43281, 10233, 41263, 66251, 65729, 66253, 126497, 74099, 42645,
+ 92331, 121358, 8583, 121123, 5847, 6928, 128074, 0, 0, 0, 0, 66592,
+ 12204, 917962, 19966, 77856, 42561, 120626, 129170, 66854, 8120, 70311,
+ 194585, 0, 70308, 41063, 120417, 10664, 0, 8369, 0, 4551, 194964, 3369,
+ 74971, 121094, 9673, 66334, 65580, 10478, 118960, 12517, 557, 9457,
+ 12034, 68496, 6355, 12519, 41004, 0, 74937, 74094, 917888, 125060, 77970,
+ 92171, 127219, 128175, 12111, 3927, 0, 12515, 1474, 67893, 5492, 6923,
+ 92281, 10441, 73836, 0, 43990, 5493, 0, 74319, 0, 66635, 12019, 0, 1618,
+ 0, 120474, 9645, 10430, 126636, 5853, 13063, 10363, 983898, 12956,
+ 113666, 120729, 11314, 917582, 12060, 128648, 78392, 12826, 6329, 0,
+ 10514, 65517, 74395, 2707, 8309, 0, 127054, 78398, 43570, 2697, 43420,
+ 78396, 68247, 2695, 42171, 70809, 68334, 0, 67617, 118971, 0, 2693,
+ 12125, 12766, 120409, 1164, 113729, 70283, 41918, 77849, 67150, 8687,
+ 66009, 12178, 7053, 92540, 7469, 0, 5248, 12218, 69988, 6427, 42884,
+ 41123, 11176, 0, 42873, 41126, 9991, 41128, 74371, 127031, 983932, 9873,
+ 0, 42877, 7994, 64762, 2053, 42843, 6591, 9340, 128841, 1589, 128691,
+ 296, 67712, 78852, 121409, 67841, 74370, 128504, 8922, 128068, 43829,
+ 12700, 74836, 0, 12579, 0, 12575, 6416, 5656, 2891, 13262, 65590, 5299,
+ 78837, 11473, 5449, 1252, 127328, 78404, 41431, 74369, 65373, 5295,
+ 917569, 68320, 1223, 1642, 174, 78399, 883, 4161, 12691, 42603, 41413,
+ 3212, 41459, 3211, 74810, 41425, 74598, 78412, 74450, 9728, 3846, 8070,
+ 6150, 6636, 4370, 128619, 129158, 74178, 74587, 74117, 195094, 0, 113748,
+ 4986, 12189, 127512, 67648, 120499, 94001, 4257, 12104, 71176, 6220,
+ 9004, 65561, 983881, 77949, 0, 68135, 917576, 77946, 83453, 69679, 69684,
+ 9890, 78561, 12971, 78453, 92556, 73898, 11979, 70051, 71897, 83451, 0,
+ 9635, 12600, 8871, 67366, 68491, 0, 6469, 74227, 118900, 65304, 4679,
+ 10230, 64300, 64867, 3427, 4240, 67376, 67375, 67374, 67373, 42916,
+ 129155, 128279, 67377, 7282, 78728, 65733, 4445, 67372, 67371, 3494,
+ 67369, 6555, 129148, 77976, 0, 0, 78566, 0, 983189, 65898, 983246, 65312,
+ 5447, 0, 12895, 65593, 4010, 83154, 41106, 74357, 64448, 93994, 41105,
+ 74114, 65820, 6232, 68233, 126625, 0, 43608, 119091, 78118, 6538, 4335,
+ 78364, 3941, 41122, 11061, 78363, 64892, 9113, 1954, 12155, 983674,
+ 42878, 11500, 67405, 128152, 74578, 0, 65832, 128667, 0, 70789, 67333,
+ 119230, 4586, 0, 350, 10951, 0, 509, 67336, 983879, 92307, 0, 0, 5133,
+ 67382, 0, 9500, 0, 4957, 64741, 2422, 2212, 983080, 67381, 67380, 2496,
+ 11516, 944, 67817, 3890, 12168, 1438, 67813, 68335, 70003, 41947, 1220,
+ 120828, 74946, 70854, 74058, 1571, 42630, 41949, 42805, 8270, 943, 564,
+ 0, 312, 41980, 983944, 128295, 70797, 8877, 269, 4429, 6272, 9617, 1460,
+ 6954, 78657, 41120, 65121, 10862, 6060, 41119, 41416, 74355, 4173, 0,
+ 82948, 0, 1906, 121169, 11532, 74073, 127338, 0, 1985, 6296, 9582, 75071,
+ 64287, 128406, 78115, 11428, 1730, 2457, 917808, 19918, 10469, 0, 68088,
+ 7703, 8840, 8035, 120711, 0, 92230, 983357, 6129, 128437, 78586, 128268,
+ 0, 7874, 8681, 119092, 11206, 13136, 0, 0, 70102, 63886, 70450, 9605,
+ 71308, 13220, 67348, 67354, 5514, 74960, 9228, 67349, 67356, 67346, 5240,
+ 9811, 10012, 3096, 0, 0, 74526, 66676, 65873, 0, 128179, 0, 9501, 120832,
+ 1272, 64536, 65465, 64654, 7467, 0, 1467, 10158, 10040, 0, 9519, 68759,
+ 70312, 195085, 68820, 12193, 70400, 127240, 121373, 0, 983355, 19935,
+ 120733, 92162, 68801, 127955, 83133, 93057, 5275, 120195, 128632, 8637,
+ 43682, 0, 3789, 63880, 11471, 43554, 65862, 11474, 66332, 66603, 68784,
+ 2426, 12042, 92194, 983911, 9537, 3961, 12115, 77953, 2605, 4500, 64561,
+ 55224, 4981, 74644, 0, 41646, 11667, 42686, 74991, 42362, 64686, 4499,
+ 41649, 7589, 128776, 0, 3237, 0, 66895, 68296, 8541, 78298, 70034, 41866,
+ 0, 983814, 94056, 11174, 69924, 43555, 2823, 9559, 10060, 41940, 8299,
+ 41945, 7132, 41941, 3308, 7190, 64880, 8614, 65220, 41493, 128679, 41699,
+ 10762, 43780, 12999, 119245, 128494, 8106, 4128, 0, 6274, 4494, 983082,
+ 4012, 10395, 983591, 43633, 65447, 78260, 120973, 11004, 695, 739, 696,
+ 7611, 121073, 42755, 74802, 9227, 7506, 7510, 69937, 691, 738, 7511,
+ 7512, 7515, 3868, 688, 41847, 690, 2548, 737, 974, 8003, 7406, 127353,
+ 120166, 128688, 3985, 66425, 65860, 41851, 7051, 69777, 4682, 71873,
+ 12809, 6406, 4685, 92505, 10879, 10347, 4680, 6341, 0, 3851, 8132, 74325,
+ 119263, 120855, 127948, 41958, 119176, 917908, 194855, 0, 42657, 71075,
+ 7643, 42373, 11714, 67587, 43568, 983175, 11717, 7650, 10594, 64951,
+ 7647, 7649, 128155, 7646, 0, 78082, 9651, 126475, 3891, 127205, 0, 2337,
+ 1735, 74324, 11134, 2363, 121008, 92443, 43561, 67706, 128032, 74146,
+ 1860, 7495, 7580, 5812, 7497, 7584, 119140, 127853, 78753, 120347, 7727,
+ 0, 8498, 69818, 8949, 3065, 42719, 7135, 1569, 92375, 12534, 12124, 7690,
+ 0, 12533, 983796, 6418, 4543, 78086, 6969, 128444, 74800, 71051, 67974,
+ 10859, 128650, 983801, 63894, 120760, 12282, 66192, 983583, 74592, 8850,
+ 74275, 9238, 10617, 68063, 917909, 92625, 917801, 12791, 0, 94069,
+ 127843, 4447, 71065, 12793, 12900, 92377, 10950, 983449, 74639, 12790,
+ 41400, 119128, 66607, 12792, 42232, 119239, 1744, 12789, 10366, 12317,
+ 41310, 120730, 41399, 0, 0, 55258, 0, 12690, 127763, 0, 43672, 127840,
+ 41652, 2974, 9010, 11315, 983808, 278, 121204, 41405, 43871, 0, 10077,
+ 63853, 74557, 42586, 0, 0, 6002, 67335, 43553, 11189, 67338, 67337,
+ 12787, 41308, 7934, 65306, 120263, 120940, 94042, 8646, 128257, 77829,
+ 71360, 0, 6413, 6550, 113759, 1940, 2809, 43637, 220, 65193, 43551,
+ 10678, 10044, 68841, 128121, 983816, 68290, 6403, 5707, 10393, 127532, 0,
+ 66614, 0, 0, 0, 10297, 0, 3742, 67331, 3959, 0, 120466, 0, 2467, 68806,
+ 6003, 63844, 6663, 8040, 983220, 43758, 4182, 78171, 4676, 120501, 9210,
+ 0, 2510, 0, 10208, 78168, 92361, 11540, 43546, 6692, 6837, 41060, 128018,
+ 4668, 9083, 0, 0, 78144, 1559, 63831, 9677, 67340, 67347, 65256, 67345,
+ 67344, 983352, 983266, 365, 12056, 43027, 120423, 41716, 128236, 67352,
+ 67351, 5516, 2845, 7717, 8036, 41717, 67353, 544, 12045, 6278, 74632,
+ 5515, 129186, 120884, 983051, 65339, 43221, 2211, 0, 5517, 70116, 74225,
+ 74841, 67884, 128414, 67890, 67885, 67880, 67881, 67882, 67883, 120199,
+ 118883, 67879, 127188, 1902, 67887, 9638, 12976, 126546, 12483, 12368,
+ 41769, 42726, 41765, 7361, 6667, 67874, 7556, 67878, 74351, 11264, 989,
+ 42677, 67889, 93040, 1311, 128949, 4326, 11000, 63824, 13068, 10932,
+ 128880, 6917, 78155, 120837, 949, 77882, 917968, 6148, 8605, 42253,
+ 78177, 66906, 0, 42715, 71432, 70282, 983373, 63871, 0, 41796, 1269,
+ 6530, 121414, 65057, 70493, 5144, 12221, 42716, 68299, 4431, 4331,
+ 983729, 128675, 41834, 5279, 121362, 10336, 8312, 0, 42701, 92959, 0,
+ 78165, 66036, 70166, 120937, 6428, 42270, 983726, 983596, 43059, 42666,
+ 5256, 1067, 255, 12131, 128742, 9493, 74990, 41014, 11793, 194920,
+ 121195, 74394, 43460, 10653, 42723, 983854, 119632, 70427, 6560, 7016,
+ 74274, 69986, 43556, 3929, 67977, 6614, 2768, 92504, 9746, 5135, 11811,
+ 12796, 11953, 0, 69761, 5139, 346, 74303, 6305, 12795, 4675, 5168, 78552,
+ 43845, 74315, 74361, 8253, 8817, 1136, 917931, 43563, 92232, 128914,
+ 66410, 7392, 8230, 9365, 71194, 127109, 983607, 66915, 128402, 4041, 0,
+ 2357, 43240, 12786, 229, 43834, 119884, 44004, 7142, 119881, 12350,
+ 65554, 119882, 71305, 119876, 12785, 63863, 43795, 7770, 10712, 64853,
+ 12686, 43831, 42375, 65780, 124944, 66352, 10470, 71119, 11059, 10791,
+ 917944, 450, 119328, 127254, 10432, 12097, 5450, 64691, 1233, 0, 44009,
+ 78284, 66338, 66395, 917832, 1839, 118799, 983219, 10927, 1701, 983664,
+ 2388, 41749, 41761, 5453, 8361, 119865, 895, 5444, 41763, 64889, 7143,
+ 92493, 78677, 983137, 92429, 69983, 66432, 8801, 3053, 4340, 983044,
+ 128013, 65812, 120675, 70001, 41824, 67985, 120203, 92600, 127053, 42700,
+ 194805, 127980, 194807, 78676, 92356, 194808, 127844, 0, 4493, 4336,
+ 129171, 2314, 43602, 78826, 119325, 194811, 42439, 64638, 42327, 43528,
+ 4489, 68750, 125116, 194793, 1912, 42385, 10306, 10370, 0, 194761, 8867,
+ 10250, 10258, 2712, 1635, 71064, 1410, 78763, 983252, 118878, 983567,
+ 128715, 9919, 120528, 559, 128157, 41825, 121274, 74641, 4892, 74016,
+ 121502, 6542, 41957, 128865, 5777, 127167, 759, 65749, 2079, 65248,
+ 12788, 64487, 64552, 93063, 10223, 42062, 121279, 0, 74246, 3668, 65754,
+ 43560, 12226, 67991, 65149, 2340, 41959, 71463, 194785, 194788, 43618,
+ 65747, 10937, 2962, 0, 2321, 3587, 65745, 67236, 8921, 9952, 128941, 0,
+ 42714, 9951, 43409, 194770, 2949, 66012, 194775, 194774, 2958, 68359,
+ 41820, 2300, 2395, 120061, 9976, 120043, 120050, 71896, 68220, 128143,
+ 42809, 42807, 70798, 66290, 10198, 4150, 64371, 8318, 41790, 67976,
+ 41898, 2360, 41794, 917942, 70796, 92163, 93033, 0, 2418, 983098, 2411,
+ 11336, 799, 63823, 10276, 10308, 10372, 917541, 41772, 42813, 2317,
+ 10260, 118980, 55284, 78686, 127177, 10384, 194794, 121147, 129111, 7753,
+ 2351, 6655, 64489, 69931, 70199, 77872, 4443, 42779, 230, 0, 68067,
+ 43549, 4855, 42150, 65739, 5441, 41896, 10288, 10320, 0, 855, 7046, 6109,
+ 65045, 63839, 78198, 2049, 10098, 917779, 74145, 127943, 10264, 10280,
+ 9184, 10376, 7013, 4467, 78684, 917554, 92260, 41887, 0, 4862, 9735,
+ 6537, 120591, 74286, 3914, 92178, 68823, 9065, 12961, 0, 120456, 92253,
+ 128204, 289, 128714, 4694, 11420, 4690, 0, 120514, 917978, 4693, 73893,
+ 42724, 69977, 4688, 120454, 128507, 0, 67994, 8238, 3110, 120162, 3565,
+ 120163, 6528, 78387, 43035, 69898, 218, 983850, 1520, 0, 4786, 983168,
+ 43225, 4602, 92400, 78167, 10088, 6548, 121157, 120156, 43978, 8988,
+ 8888, 92724, 74812, 69709, 983967, 10666, 0, 73902, 69740, 121436, 0,
+ 9975, 113704, 119902, 4689, 8932, 0, 65560, 119209, 74441, 78810, 0, 0,
+ 67987, 0, 128828, 0, 67989, 119029, 10065, 8207, 71900, 92613, 128011,
+ 121028, 662, 128720, 9244, 194863, 83183, 119261, 983430, 0, 120901,
+ 917838, 41929, 0, 71084, 66674, 41926, 69994, 120443, 10513, 64637,
+ 194862, 68013, 52, 13118, 6475, 195004, 83479, 12095, 10225, 4812, 92578,
+ 128486, 67992, 74085, 0, 3978, 128425, 917945, 74015, 11582, 92768,
+ 12281, 127043, 6544, 13241, 93961, 69782, 125014, 194860, 11765, 65258,
+ 10369, 0, 1585, 7192, 10249, 422, 1500, 2036, 986, 194859, 64394, 5781,
+ 5599, 64294, 2494, 120450, 4861, 74021, 64334, 78203, 127808, 0, 83444,
+ 65102, 8961, 65842, 10243, 10245, 71907, 120410, 0, 120453, 64821, 9478,
+ 2508, 92683, 0, 202, 128246, 74131, 1242, 65514, 121170, 63940, 121363,
+ 64533, 71883, 120446, 67842, 11990, 92405, 63939, 43375, 65440, 2504, 0,
+ 78671, 64829, 93020, 6943, 917934, 5859, 0, 2858, 983363, 74294, 983914,
+ 69239, 0, 67871, 12992, 2753, 1936, 70078, 67701, 2751, 12662, 2763,
+ 8953, 64701, 10731, 12922, 7052, 917839, 66424, 63992, 0, 63920, 74128,
+ 2856, 119910, 47, 69908, 71053, 65858, 194806, 0, 67829, 7899, 0, 8417,
+ 43798, 7072, 74195, 0, 4033, 121289, 43992, 121081, 0, 212, 64600, 1903,
+ 12320, 83484, 120894, 194563, 0, 8915, 2759, 945, 6689, 93064, 0, 0,
+ 118798, 1291, 74828, 0, 120435, 9531, 13155, 8505, 68379, 12062, 128198,
+ 121216, 65487, 92189, 41837, 120611, 8246, 128874, 93066, 0, 120433, 0,
+ 63935, 73962, 120806, 64787, 43524, 0, 64426, 983092, 194948, 917866,
+ 917788, 65664, 6693, 9843, 0, 8674, 119887, 128812, 92715, 70788, 1320,
+ 121461, 1673, 4811, 92383, 5986, 9338, 3046, 74480, 5985, 917928, 119598,
+ 9820, 119892, 12187, 983841, 71041, 5984, 0, 43308, 4393, 67650, 983227,
+ 0, 74822, 0, 74826, 64733, 983214, 127898, 3491, 67146, 121142, 128219,
+ 3514, 65485, 72428, 7492, 128860, 74605, 92483, 7514, 983369, 126585,
+ 194731, 7502, 7587, 68353, 63921, 121178, 63925, 120161, 7610, 219,
+ 128158, 78722, 692, 43588, 68485, 41635, 43241, 9688, 7147, 9535, 0,
+ 93991, 0, 64530, 0, 64610, 11804, 0, 7149, 7453, 0, 8013, 66396, 92301,
+ 0, 8895, 5253, 70025, 5458, 917629, 2866, 129045, 127860, 11098, 68433,
+ 6700, 120484, 0, 120583, 194824, 8962, 77960, 9641, 43694, 7059, 983677,
+ 63997, 9604, 78700, 7441, 63826, 67970, 83435, 64392, 92626, 983687,
+ 2844, 74610, 41974, 67397, 12139, 67971, 0, 0, 3358, 65295, 983899, 3104,
+ 194734, 0, 121304, 983235, 5308, 83434, 290, 0, 121338, 2862, 2792,
+ 195088, 92963, 77984, 3268, 66591, 0, 6552, 42367, 7035, 120558, 0, 0,
+ 1814, 78464, 10240, 66285, 74305, 128382, 74528, 65903, 71454, 42646,
+ 7606, 2591, 2837, 4341, 43513, 64482, 92524, 8163, 65270, 0, 77932, 0,
+ 9112, 74431, 863, 9490, 75037, 128349, 43323, 120513, 119897, 9071,
+ 68054, 0, 3654, 7789, 9637, 121136, 2535, 65504, 7653, 40993, 92415,
+ 66587, 124987, 0, 92401, 43927, 11006, 12927, 7807, 8073, 120980, 10629,
+ 127869, 74088, 3056, 10823, 127267, 92391, 8762, 10508, 69689, 73770,
+ 43969, 43193, 10737, 3463, 120975, 983351, 66633, 8695, 4815, 11322,
+ 5811, 12345, 7049, 118811, 5195, 195081, 0, 66639, 92939, 0, 0, 128041,
+ 67903, 67739, 1262, 120165, 6561, 19939, 128673, 0, 127318, 119906,
+ 70300, 0, 983097, 0, 983667, 119907, 64612, 11991, 120654, 0, 92943,
+ 1502, 917568, 127988, 9107, 127316, 5702, 3655, 67661, 8430, 0, 71223,
+ 120758, 0, 74057, 9603, 128079, 5254, 120742, 7724, 74388, 68375, 10796,
+ 5129, 0, 70816, 590, 7579, 5614, 5893, 92280, 11720, 92496, 11721, 70804,
+ 4798, 121468, 119316, 66038, 4793, 67851, 11726, 127541, 74204, 68610,
+ 68824, 68626, 894, 300, 120875, 12306, 66235, 8004, 0, 119574, 2562,
+ 70156, 120856, 42503, 92900, 11652, 917813, 917799, 119241, 64699,
+ 126569, 5096, 5095, 2863, 3424, 92244, 10454, 42530, 5094, 70873, 0,
+ 13156, 129057, 10832, 5093, 0, 69852, 72430, 5092, 10708, 11327, 0, 5091,
+ 176, 0, 9153, 4104, 78599, 78601, 1215, 42712, 5744, 12272, 9832, 11777,
+ 71299, 66817, 42881, 0, 8980, 118988, 67861, 8844, 7209, 0, 0, 4278,
+ 128809, 0, 119160, 70821, 9074, 4348, 0, 65558, 65946, 8113, 7087, 5255,
+ 1786, 661, 128116, 0, 917925, 74423, 71345, 586, 74414, 64359, 1267,
+ 128269, 65468, 194966, 65731, 0, 72405, 3621, 92932, 66666, 64211, 0,
+ 6562, 12928, 194904, 1228, 65490, 11383, 0, 127953, 70343, 1714, 74406,
+ 120751, 0, 121113, 983976, 66225, 70110, 70867, 42660, 11436, 2070, 64,
+ 120694, 121025, 10291, 10323, 2826, 113809, 126510, 0, 42008, 9708,
+ 42710, 0, 42011, 41999, 92164, 12206, 5839, 1702, 1240, 74065, 6286,
+ 9689, 983969, 65833, 77848, 0, 1765, 0, 128622, 65588, 92350, 983281, 0,
+ 8401, 983924, 42014, 127307, 7030, 120969, 10479, 64959, 2852, 0, 121225,
+ 0, 70819, 128586, 917951, 6963, 126704, 12667, 64540, 74786, 10147,
+ 12935, 127568, 126483, 121281, 0, 0, 78757, 0, 113815, 121302, 0, 9994,
+ 12467, 2864, 64719, 1148, 10435, 11462, 41675, 7084, 2765, 78466, 43382,
+ 0, 120719, 128188, 92516, 66662, 0, 78133, 9364, 194685, 74416, 127797,
+ 0, 77988, 263, 10449, 41288, 0, 41839, 78385, 983742, 70313, 129140,
+ 6931, 69722, 43261, 7177, 70105, 92652, 0, 0, 4262, 10285, 10722, 42020,
+ 126575, 6806, 6992, 42019, 0, 41290, 983716, 750, 0, 71304, 10163, 63913,
+ 71300, 7032, 5954, 64931, 4314, 128600, 198, 68453, 730, 120094, 63907,
+ 77993, 70818, 13165, 7107, 74171, 42804, 678, 8240, 78015, 125005, 41378,
+ 11008, 6938, 70026, 92637, 2097, 66246, 120560, 70823, 194990, 983604,
+ 3892, 68632, 69642, 6712, 66045, 41470, 64805, 0, 983213, 126511, 64801,
+ 127818, 497, 12100, 5953, 92667, 7796, 69669, 43254, 73831, 0, 10293,
+ 5952, 1281, 43747, 0, 121399, 10677, 604, 41097, 9182, 1859, 0, 92603,
+ 3425, 127488, 126523, 2836, 983738, 0, 9707, 113718, 43202, 0, 0, 65199,
+ 1738, 128311, 67707, 2832, 92702, 9670, 11101, 0, 66374, 917956, 119552,
+ 2822, 68122, 4436, 92519, 983081, 73752, 70305, 64872, 92340, 1331, 0, 0,
+ 121377, 12708, 917954, 5090, 5089, 127977, 917953, 119109, 0, 70826, 319,
+ 118847, 43479, 9477, 0, 0, 5087, 74886, 7640, 96, 5086, 983597, 92379, 0,
+ 5085, 64286, 92665, 113717, 41422, 119617, 119901, 42356, 3772, 119042,
+ 0, 5011, 0, 983329, 126587, 0, 120698, 118874, 6677, 7601, 0, 591, 64419,
+ 118953, 92262, 118895, 70799, 70084, 0, 10939, 6106, 6933, 41271, 6760,
+ 71343, 4534, 41270, 128876, 67138, 65574, 194947, 9224, 67140, 3671,
+ 8976, 67139, 0, 41275, 6372, 82997, 55261, 7963, 6371, 0, 568, 92368,
+ 41273, 121448, 74531, 6728, 0, 9715, 129297, 8258, 11753, 74820, 0, 9602,
+ 118919, 42, 11191, 43688, 68243, 0, 7458, 0, 0, 65385, 67135, 67134,
+ 11958, 11165, 917822, 125087, 6254, 42721, 66336, 8045, 11550, 195064,
+ 67132, 67131, 42858, 11789, 65868, 5557, 10133, 9737, 13109, 0, 9467,
+ 5558, 8878, 43844, 195036, 7451, 6706, 10146, 0, 9086, 64566, 983185,
+ 64584, 7437, 7454, 12594, 73749, 68362, 4546, 7731, 0, 70048, 74243,
+ 125092, 3805, 0, 67128, 44001, 41008, 128052, 6307, 19949, 67129, 7544,
+ 124989, 43469, 121095, 983735, 10152, 64422, 65091, 67124, 7602, 64729,
+ 0, 43521, 0, 42302, 43711, 43523, 41447, 5559, 68483, 8704, 2397, 5556,
+ 0, 0, 0, 9011, 9630, 11166, 0, 93998, 5506, 92498, 1911, 66652, 67686,
+ 9961, 8845, 66698, 68325, 10792, 8889, 121402, 2098, 0, 64751, 70309,
+ 66622, 126626, 0, 74364, 68816, 129152, 983805, 42909, 7552, 70092,
+ 194567, 65384, 7223, 4559, 93015, 1956, 43138, 7024, 65728, 43490, 1210,
+ 195077, 65175, 10184, 43140, 43654, 0, 983233, 125045, 38, 8533, 66669,
+ 119124, 983295, 983792, 0, 4357, 0, 70289, 917863, 74233, 9967, 78884,
+ 42860, 119838, 10941, 65721, 6962, 0, 83279, 113808, 0, 11014, 120126,
+ 8942, 12000, 69224, 92267, 128536, 11974, 67363, 42772, 42650, 11650,
+ 5013, 92663, 68810, 66210, 118914, 6613, 92476, 0, 11193, 983770, 0,
+ 64714, 71479, 70802, 12162, 12120, 43476, 983766, 11024, 74811, 66228,
+ 10563, 92954, 127196, 43522, 2462, 92955, 1837, 125086, 63972, 6957, 0,
+ 113820, 4952, 65718, 64405, 5504, 65720, 65714, 65715, 65716, 128026,
+ 75016, 127119, 3109, 63975, 74028, 127213, 8107, 67154, 1127, 455, 0,
+ 63968, 127835, 3483, 119593, 1989, 983176, 69678, 9104, 3503, 65375,
+ 68300, 6694, 42633, 1864, 0, 74306, 41446, 2540, 7736, 121434, 74064,
+ 128601, 10521, 70786, 42173, 9705, 74124, 8604, 6955, 10916, 43684, 6149,
+ 3887, 19956, 1411, 2824, 0, 10106, 127862, 1403, 125053, 1347, 9631,
+ 74444, 983753, 127997, 92951, 74897, 8640, 0, 258, 1654, 0, 0, 983479,
+ 43314, 0, 0, 4042, 11478, 2873, 63977, 11522, 41668, 8549, 10861, 121053,
+ 63976, 70377, 68623, 67082, 67081, 41391, 67084, 83465, 376, 6987, 9221,
+ 0, 0, 8823, 128697, 12943, 65185, 41869, 12619, 128067, 10154, 983043,
+ 74439, 2039, 0, 7446, 1684, 63979, 10974, 458, 120620, 82950, 69791,
+ 127161, 11916, 65016, 0, 69671, 42115, 121057, 12288, 78057, 67080, 1493,
+ 42111, 7553, 4097, 128199, 13080, 0, 65808, 6610, 6030, 8059, 7508,
+ 13131, 67074, 67073, 128506, 8794, 41278, 41629, 12154, 75073, 41277,
+ 64658, 983456, 64380, 6625, 42911, 19904, 0, 121305, 71193, 65371, 7078,
+ 128699, 833, 128228, 6369, 194815, 10979, 41953, 983370, 41434, 6062, 0,
+ 0, 19916, 6913, 933, 1341, 9842, 6720, 65744, 71200, 983592, 121223,
+ 126567, 7405, 10105, 65810, 0, 41632, 7493, 55290, 92890, 41622, 0, 0,
+ 119556, 74584, 7632, 9716, 19954, 9805, 5990, 900, 0, 63957, 119638, 0,
+ 3612, 0, 64376, 93987, 5389, 92597, 0, 65938, 2839, 9621, 582, 0, 74368,
+ 3749, 6949, 7569, 74061, 83222, 83223, 6956, 4403, 19962, 65559, 3299,
+ 121005, 194939, 119127, 9002, 0, 74372, 74236, 8478, 7598, 546, 42469,
+ 65569, 1918, 9542, 472, 7716, 10319, 10383, 6996, 43077, 63952, 8425,
+ 3602, 8328, 11764, 83199, 83200, 65065, 41183, 12907, 10271, 10287, 684,
+ 43525, 127996, 2854, 83214, 4592, 65755, 83217, 67120, 11963, 43620,
+ 67117, 78249, 67123, 67122, 67121, 9881, 43115, 65757, 3415, 69677,
+ 67116, 8648, 128377, 6741, 43047, 119900, 13180, 78077, 418, 120653,
+ 64495, 10295, 10327, 10391, 41752, 66846, 8641, 41449, 83194, 74100,
+ 83186, 10911, 6942, 120879, 1024, 42849, 41751, 69776, 8941, 983556,
+ 4554, 66892, 9023, 11685, 121476, 9928, 67109, 66865, 11437, 43741,
+ 67113, 67112, 63967, 129056, 41206, 12624, 9049, 41185, 43166, 121275,
+ 8159, 92619, 11686, 71478, 65224, 4565, 4655, 119553, 129090, 92183,
+ 64523, 10343, 10407, 92764, 66671, 11466, 0, 128003, 42890, 74013, 12050,
+ 68201, 2860, 0, 127934, 70828, 42792, 5743, 10424, 12065, 42872, 121401,
+ 43875, 67103, 8875, 0, 67102, 67105, 7531, 12847, 2413, 118917, 67404,
+ 962, 0, 12855, 41196, 42564, 127975, 1582, 983715, 5508, 0, 120904,
+ 74588, 10801, 69876, 92354, 119207, 7173, 496, 10439, 4313, 64607, 69638,
+ 7860, 128049, 906, 42793, 2842, 6405, 64722, 13132, 798, 64694, 12801,
+ 8406, 1153, 83263, 64788, 83265, 8054, 9174, 67087, 67086, 9964, 67096,
+ 41611, 4642, 66574, 11556, 42512, 0, 78857, 42089, 74613, 9008, 0,
+ 126592, 195096, 42079, 83248, 77924, 42513, 77927, 42842, 73985, 65285,
+ 68338, 83239, 83240, 83241, 83242, 983590, 11335, 64069, 42093, 3920,
+ 917869, 0, 11110, 83255, 4580, 41967, 83258, 64384, 83252, 83253, 3021,
+ 42004, 983096, 83249, 42317, 41998, 0, 6946, 194755, 92967, 128455,
+ 128193, 65204, 0, 68113, 42690, 9880, 42010, 74824, 64589, 10111, 64875,
+ 127880, 68035, 43998, 11360, 83233, 74182, 83235, 83228, 42149, 83230,
+ 68508, 917993, 64941, 77919, 120421, 128077, 74885, 55247, 4110, 66005,
+ 6959, 10929, 42907, 128080, 66703, 77921, 8617, 41982, 6025, 69242,
+ 121068, 194854, 125139, 0, 9597, 42099, 43172, 983378, 10117, 983169,
+ 92297, 41636, 194889, 73738, 120681, 8301, 0, 0, 187, 128237, 65669,
+ 128339, 4963, 0, 68765, 0, 8964, 65676, 7775, 983849, 41948, 125003, 0,
+ 83236, 41942, 65449, 3160, 10081, 13226, 42121, 42475, 42663, 120616,
+ 41766, 74948, 65882, 78849, 41760, 1189, 905, 480, 10985, 41733, 67859,
+ 9629, 6742, 1745, 43625, 73835, 7888, 83405, 3980, 70373, 42656, 41507,
+ 8806, 7023, 0, 74279, 9447, 78651, 7867, 69218, 6236, 127162, 0, 10505,
+ 126638, 12851, 83489, 348, 5474, 121382, 3103, 0, 41753, 71109, 128604,
+ 0, 78844, 78845, 41739, 78843, 42515, 10931, 41756, 43347, 42560, 5391,
+ 41746, 119147, 92591, 41259, 5561, 69930, 2691, 68752, 65553, 7933, 5562,
+ 69800, 128265, 41262, 128146, 64421, 74846, 41251, 127242, 0, 3979,
+ 71248, 194899, 68331, 917912, 68847, 983697, 83382, 74633, 41266, 68836,
+ 66566, 128836, 10585, 65741, 41737, 2275, 2666, 121232, 41738, 831, 419,
+ 13126, 10716, 83400, 42822, 0, 6434, 74857, 6939, 7766, 6432, 128106,
+ 69932, 916, 769, 41742, 11968, 74805, 6433, 5563, 547, 1943, 6439, 5560,
+ 4994, 487, 126537, 4497, 3754, 83072, 83105, 9039, 0, 41776, 0, 8716,
+ 1595, 41615, 121001, 0, 74260, 74860, 42854, 43219, 83311, 121107, 12185,
+ 113810, 70072, 68355, 68357, 68421, 42856, 8634, 0, 119988, 4209, 75057,
+ 68832, 65879, 41538, 65612, 68822, 669, 5679, 68813, 68815, 68811, 68812,
+ 68804, 5678, 11821, 68802, 6711, 460, 121513, 0, 983463, 70114, 120747,
+ 194718, 121519, 78050, 119022, 0, 121515, 121514, 7782, 9044, 4974,
+ 11760, 78494, 7577, 65711, 41912, 1216, 0, 127017, 5792, 126643, 128319,
+ 78501, 0, 2933, 12244, 983702, 5683, 917896, 120895, 78119, 1549, 0,
+ 983223, 120398, 5682, 6206, 8670, 10256, 5680, 69935, 10001, 67237,
+ 69768, 1449, 10241, 78290, 119587, 194891, 10552, 64342, 41922, 70330,
+ 8584, 68030, 5567, 2717, 83179, 71448, 5564, 42886, 41908, 42882, 5565,
+ 917611, 120881, 0, 65708, 65709, 5566, 69803, 65704, 65705, 11904, 42875,
+ 43373, 42539, 5942, 8468, 120561, 10361, 10425, 65697, 65698, 65699,
+ 68052, 66598, 110592, 64664, 10647, 78702, 78703, 78690, 457, 78502,
+ 65701, 1934, 43006, 83280, 8802, 78710, 65130, 11747, 78709, 6087, 78705,
+ 78716, 41757, 78711, 8043, 8950, 65694, 64485, 43534, 10457, 0, 11961,
+ 78725, 66850, 78723, 78720, 78721, 127899, 65515, 9499, 10035, 13069,
+ 71309, 0, 9889, 68184, 42806, 125061, 7256, 0, 68094, 1667, 42161,
+ 120981, 42428, 0, 6934, 0, 10802, 64861, 6556, 78390, 0, 8101, 3610,
+ 68420, 41748, 4995, 955, 65907, 119208, 5350, 64339, 78306, 64549, 10875,
+ 125052, 5477, 65692, 0, 128532, 120397, 12896, 10456, 68298, 0, 3874, 0,
+ 0, 983619, 120331, 128773, 113665, 65603, 83272, 65687, 0, 41038, 74009,
+ 9207, 42239, 8536, 78740, 78324, 78726, 74432, 724, 83058, 1455, 78749,
+ 7183, 64583, 78747, 68443, 4175, 78741, 43614, 69801, 939, 75021, 43520,
+ 68613, 74569, 917958, 0, 70168, 78764, 78760, 10788, 6088, 78759, 78755,
+ 190, 119899, 12593, 0, 8188, 64408, 0, 4417, 121303, 92261, 6370, 125128,
+ 7827, 68441, 6965, 128581, 128868, 13201, 128205, 69896, 78868, 74382,
+ 11841, 7918, 73988, 0, 113668, 917884, 1728, 983705, 43764, 178, 12972,
+ 74620, 113671, 71103, 11168, 983383, 113672, 78327, 75042, 65690, 8382,
+ 71107, 119054, 194968, 9252, 917889, 4652, 68371, 0, 121327, 74070,
+ 13065, 9923, 10806, 194596, 11763, 70016, 120688, 6723, 78187, 0, 6993,
+ 71044, 121312, 8333, 121329, 0, 11390, 0, 74464, 0, 92320, 74080, 983317,
+ 69911, 11910, 92559, 8278, 8963, 4034, 128560, 983113, 65344, 120517,
+ 41747, 0, 128110, 8677, 0, 12707, 9350, 66037, 128180, 8836, 12315,
+ 12747, 8300, 194562, 124984, 7491, 8856, 71361, 0, 43150, 127768, 120404,
+ 65389, 120402, 120403, 10813, 2592, 12853, 43269, 7263, 83308, 6536,
+ 120238, 71891, 65516, 12321, 120391, 120388, 55287, 10007, 120246, 9588,
+ 68494, 1596, 120383, 41994, 65801, 128808, 6838, 3561, 119867, 0, 10613,
+ 6697, 12805, 41928, 40981, 10804, 78409, 5006, 64328, 0, 9931, 0, 8825,
+ 74555, 65940, 43259, 126586, 6107, 83455, 119177, 77941, 78401, 119270,
+ 11783, 335, 120227, 64689, 438, 4510, 5765, 8721, 119570, 119227, 6092,
+ 12840, 43112, 8876, 120231, 8096, 10284, 120935, 0, 0, 10380, 8733,
+ 10316, 70121, 41602, 917575, 92308, 74831, 93984, 0, 68482, 65399,
+ 917820, 64591, 42405, 83466, 120820, 843, 11541, 128326, 70321, 2065,
+ 41935, 74496, 41902, 0, 983306, 215, 41258, 77875, 43159, 1953, 9579,
+ 41938, 1256, 3910, 9407, 6242, 0, 83464, 41257, 41900, 8675, 10700, 8805,
+ 1742, 113722, 9333, 8202, 72399, 0, 983197, 127252, 0, 73882, 499,
+ 983049, 43467, 0, 43818, 83482, 1712, 5932, 77845, 41762, 983103, 0,
+ 11967, 1775, 125006, 75009, 11118, 121391, 128009, 9458, 92935, 6470,
+ 9180, 120380, 43176, 128307, 0, 42782, 0, 124999, 983135, 128309, 73849,
+ 120669, 9414, 74647, 73782, 73969, 565, 42484, 5794, 201, 2662, 42292,
+ 194870, 8254, 0, 10975, 43518, 120625, 74763, 1022, 4108, 3880, 74247,
+ 127153, 0, 92263, 917980, 7507, 983118, 43149, 71059, 65031, 7961, 1636,
+ 0, 65029, 65024, 119099, 12473, 6534, 120633, 99, 98, 97, 68226, 67584,
+ 4049, 74163, 127065, 7090, 83274, 7892, 127064, 10777, 917803, 65310,
+ 65562, 66599, 66722, 194955, 8039, 3363, 66594, 43434, 127062, 71191,
+ 12596, 66595, 42258, 42570, 5593, 119148, 120534, 92425, 10100, 6061,
+ 64854, 119, 118, 117, 116, 12998, 122, 121, 120, 111, 110, 109, 108, 115,
+ 114, 113, 112, 103, 102, 101, 100, 107, 106, 105, 104, 6436, 73974, 534,
+ 41212, 67713, 1536, 64093, 73970, 77930, 121093, 0, 6020, 12716, 127112,
+ 12744, 475, 120394, 13266, 127813, 127111, 78842, 73926, 66291, 10645,
+ 1212, 6543, 983309, 8134, 42935, 2913, 73870, 127113, 1866, 983229,
+ 71892, 120996, 8923, 1645, 12059, 66585, 71297, 3196, 72404, 194827,
+ 5935, 1250, 127066, 8174, 9787, 6733, 9859, 7916, 9861, 9860, 5258, 1882,
+ 1892, 6731, 10882, 405, 11454, 73911, 113787, 73819, 41169, 8939, 41245,
+ 128775, 41170, 1454, 11369, 6477, 12157, 120861, 0, 0, 41172, 7855, 0,
+ 71472, 10480, 43258, 126596, 77936, 8264, 12610, 983310, 645, 126616,
7609, 40973, 69943, 73833, 69948, 5824, 984, 77918, 10688, 5851, 0, 7729,
- 73982, 120518, 0, 195086, 43369, 0, 128140, 68415, 983093, 4538, 120406,
- 43141, 0, 983210, 74214, 73886, 0, 0, 118902, 43005, 78448, 9552, 0, 0,
- 983159, 12997, 0, 0, 0, 0, 2381, 12883, 10994, 10529, 41906, 0, 0, 0,
- 12425, 10661, 10856, 9614, 2428, 41478, 8582, 10064, 73930, 0, 0, 0,
- 64896, 119162, 1952, 92181, 8455, 10082, 11575, 983490, 119566, 0, 12808,
- 12183, 6145, 118955, 64929, 92433, 0, 983193, 43186, 42509, 0, 3922,
- 9187, 983614, 0, 10191, 119057, 11752, 3353, 9358, 0, 71366, 66680,
- 120090, 8248, 7931, 8558, 9795, 68380, 983297, 0, 120082, 120081, 120084,
- 41027, 120086, 0, 120088, 7366, 7019, 120073, 0, 11751, 120078, 78294,
- 64657, 8657, 120048, 8594, 120068, 0, 0, 120069, 120072, 120071, 0, 0,
- 43154, 41029, 0, 11332, 65380, 7728, 94077, 11294, 0, 66665, 7851, 0,
- 8375, 8699, 0, 42524, 0, 9085, 94041, 7504, 9327, 6160, 128095, 983864,
- 0, 8088, 0, 74012, 92500, 0, 4439, 6926, 983047, 12924, 128227, 42369,
- 4350, 65491, 65145, 9041, 43559, 64577, 10826, 0, 11296, 983283, 0, 0,
- 65825, 9577, 68199, 0, 64670, 983121, 78056, 6793, 11295, 0, 78053,
- 73872, 0, 0, 10902, 0, 0, 78070, 78068, 10472, 2995, 0, 0, 64682, 2371,
- 78069, 120808, 259, 1009, 92171, 2402, 2333, 6440, 194741, 0, 65125,
- 41244, 0, 13271, 9103, 2278, 0, 0, 0, 0, 10219, 0, 0, 0, 0, 43178,
- 127070, 41261, 119362, 43640, 8613, 0, 94049, 6736, 195092, 41492, 12005,
- 69927, 0, 1890, 120056, 0, 0, 0, 7293, 7991, 0, 10578, 0, 78076, 194738,
- 78077, 69928, 0, 78800, 92653, 64445, 42668, 6635, 0, 6164, 65170, 0, 0,
- 7676, 11664, 0, 983658, 69707, 0, 118812, 0, 0, 128045, 9175, 11925,
- 78045, 9088, 0, 64545, 1396, 0, 7546, 3847, 127177, 127835, 4985, 13288,
- 672, 8098, 43196, 194746, 983096, 128126, 42655, 74043, 65072, 1577,
- 11772, 13041, 5928, 4525, 10658, 65911, 1266, 10180, 0, 128584, 12622, 0,
- 0, 0, 194714, 127139, 13310, 773, 19933, 1539, 0, 126983, 42731, 67972,
- 0, 0, 0, 3051, 5862, 7823, 92478, 0, 120411, 3250, 43991, 69687, 66649,
- 9510, 66237, 983302, 0, 41066, 64673, 917963, 917964, 0, 3505, 8707,
- 917968, 6725, 128013, 917971, 92314, 3471, 917970, 5479, 882, 6686,
- 119584, 11613, 120772, 42754, 0, 983306, 92696, 0, 0, 0, 128523, 3225,
- 917996, 4433, 41156, 43973, 43173, 1443, 4381, 0, 0, 10926, 11756, 11757,
- 64879, 917949, 917950, 127848, 13227, 0, 10021, 5160, 1387, 0, 917953,
- 41418, 0, 65914, 6721, 217, 917955, 917960, 917961, 10443, 10789, 41158,
- 119257, 4274, 983300, 41483, 0, 41250, 0, 42179, 0, 5931, 11744, 69232,
- 0, 41252, 66682, 0, 119637, 41249, 1366, 64635, 65047, 12466, 0, 0, 4397,
- 128037, 128336, 41296, 9545, 41291, 128049, 0, 41485, 3511, 41282, 5923,
- 10400, 0, 128818, 760, 0, 12088, 5786, 0, 42256, 119869, 119860, 417,
- 41474, 119562, 41565, 0, 5934, 119867, 66583, 119231, 64877, 2284, 64481,
- 78614, 66013, 41956, 43455, 126995, 0, 0, 0, 42273, 5819, 0, 917556, 0,
- 126643, 0, 65910, 127747, 10246, 120816, 65785, 1237, 10274, 4552,
- 119576, 0, 0, 1375, 66705, 43573, 65260, 42063, 0, 42811, 10312, 69845,
- 120794, 7840, 0, 43630, 10252, 0, 128104, 43185, 0, 4396, 0, 119880,
- 10769, 9676, 119041, 0, 9753, 0, 8944, 0, 0, 10473, 0, 0, 6072, 43025,
- 10299, 0, 0, 120608, 66326, 983447, 127794, 0, 43811, 9330, 120596, 7222,
- 10283, 10315, 10379, 4996, 983782, 13281, 66517, 7865, 10087, 78343, 0,
- 78347, 0, 0, 7565, 66363, 12952, 64806, 43180, 77928, 7414, 77929, 43982,
- 74288, 622, 74023, 885, 43405, 1602, 0, 0, 852, 0, 12160, 0, 10212,
- 65435, 0, 12071, 9609, 12156, 917983, 917984, 43586, 11035, 10411,
- 917988, 10255, 6710, 10279, 4194, 10375, 73900, 0, 4315, 12644, 127516,
- 77937, 43639, 43343, 78777, 917998, 11501, 41177, 128689, 0, 917792, 0,
- 92413, 8715, 0, 41179, 0, 43313, 0, 41176, 0, 994, 0, 8452, 127103,
- 73966, 0, 0, 5921, 0, 2597, 0, 5922, 118903, 77943, 4186, 92531, 119967,
- 127105, 6718, 0, 4406, 74601, 8480, 9192, 9747, 126530, 4413, 92196,
- 42268, 3198, 5924, 5920, 92469, 6921, 78081, 74007, 42869, 8418, 11681,
- 43169, 10176, 0, 742, 0, 2893, 10772, 65276, 5937, 1914, 2553, 11682,
- 6756, 128590, 128646, 8363, 0, 2993, 7772, 3916, 4301, 120494, 1141,
- 42407, 8159, 718, 7572, 973, 0, 120718, 3235, 2415, 43164, 0, 8018,
- 42333, 74756, 10675, 6937, 42486, 43381, 65390, 10067, 0, 1202, 0, 0,
- 65863, 0, 0, 94013, 78182, 64542, 3260, 73829, 65388, 9945, 8419, 78042,
- 6738, 0, 43681, 69728, 2059, 0, 0, 55237, 1431, 0, 66565, 10821, 0,
- 12804, 128076, 8229, 1235, 3307, 11472, 78089, 78184, 4544, 0, 0, 0,
- 1740, 78097, 8758, 985, 12872, 64511, 78094, 12068, 78102, 0, 10141, 0,
- 63761, 8785, 4476, 78109, 63763, 12655, 8907, 78105, 78106, 78103, 78104,
- 0, 119572, 10665, 64616, 41572, 0, 127160, 0, 41573, 0, 3931, 120295,
- 74143, 0, 0, 0, 78460, 11982, 0, 0, 0, 128016, 64484, 0, 41167, 0, 41735,
- 94019, 717, 10754, 0, 0, 127979, 0, 63767, 0, 1780, 6936, 0, 92254, 819,
- 10611, 9694, 126978, 0, 0, 0, 0, 8343, 8342, 8345, 8344, 6578, 7009,
- 7523, 6922, 8348, 8347, 7525, 3346, 8339, 128165, 128338, 575, 268,
- 78111, 8563, 5754, 120343, 41541, 65565, 8336, 5936, 7290, 78117, 8337,
- 8341, 308, 11388, 7522, 120721, 78123, 65466, 11090, 6953, 0, 120346, 0,
- 78132, 5926, 78128, 78130, 78126, 78127, 78124, 78125, 9038, 7887, 43456,
- 7830, 11651, 13093, 64002, 0, 65742, 12874, 119597, 11590, 0, 74048,
- 128350, 8595, 0, 917947, 43703, 13097, 0, 64643, 13283, 12697, 0, 12381,
- 3488, 5933, 10033, 73738, 66241, 65570, 0, 12297, 119153, 1955, 0, 5349,
- 42538, 0, 0, 7411, 9462, 917554, 0, 0, 0, 42736, 0, 5756, 983221, 7638,
- 41642, 42764, 0, 43109, 7637, 5752, 74037, 0, 73832, 128827, 120635,
- 128231, 78334, 0, 7636, 65171, 9124, 0, 78892, 120798, 291, 0, 0, 2027,
- 66230, 10080, 78136, 10403, 0, 4640, 64713, 10224, 120429, 42512, 120431,
- 120430, 0, 128351, 127489, 127148, 0, 92499, 0, 119094, 74213, 7824, 0,
- 0, 41274, 5778, 6302, 0, 0, 12680, 119130, 1417, 77889, 194914, 9452, 0,
- 74393, 11552, 0, 127855, 128217, 65391, 0, 10172, 65453, 63789, 41264,
- 78658, 6426, 4641, 9179, 64819, 55278, 41255, 42036, 41469, 41269,
- 120412, 41267, 4646, 120425, 865, 42034, 78274, 78273, 4645, 42033,
- 78270, 127982, 983172, 64728, 0, 78673, 78674, 1659, 919, 42784, 1671,
- 195089, 6069, 9219, 128558, 1661, 13120, 63784, 69819, 10140, 9713,
- 119143, 0, 0, 94050, 2306, 10485, 118943, 6068, 10612, 195099, 119567,
- 195101, 92561, 41462, 120470, 195079, 5422, 128234, 983629, 0, 0, 10229,
- 10635, 826, 128081, 195082, 195085, 195084, 195087, 6483, 92211, 1808,
- 7848, 0, 8100, 78227, 78669, 78670, 13301, 78667, 9667, 78665, 78872, 0,
- 11003, 9904, 0, 0, 120690, 9144, 10921, 0, 78680, 9840, 65131, 78678,
- 77841, 10313, 0, 0, 64320, 10265, 78686, 10962, 78684, 43008, 8945,
- 78683, 0, 41, 195072, 1792, 120515, 195073, 8655, 195075, 92544, 77951,
- 12066, 0, 385, 4152, 2585, 127804, 119068, 3126, 0, 74136, 10957, 983703,
- 43258, 119116, 127873, 13157, 0, 917544, 3570, 0, 7443, 0, 44006, 6997,
- 68004, 126631, 7879, 8739, 11075, 0, 65216, 0, 69795, 2593, 8463, 7810,
- 917862, 7839, 119913, 78806, 119912, 9691, 4411, 78802, 0, 0, 43442,
- 69851, 65254, 10066, 983889, 0, 0, 0, 13061, 8016, 78687, 19932, 64831,
- 0, 119923, 12390, 119171, 1634, 68115, 0, 11056, 983574, 119925, 0,
- 41165, 11328, 12450, 0, 41166, 0, 12456, 119914, 171, 5941, 12452,
- 194709, 12458, 12531, 78779, 43013, 63800, 74162, 127569, 120483, 9969,
- 120767, 12454, 63806, 42132, 12063, 78425, 78424, 3230, 0, 0, 0, 5209,
- 297, 5810, 8522, 8415, 119937, 78429, 78428, 7077, 2497, 128651, 960,
- 74156, 6981, 92374, 12938, 4292, 0, 74815, 10512, 0, 74814, 78875,
- 127505, 78876, 2503, 73778, 1762, 69794, 2495, 78873, 5844, 68031,
- 118838, 0, 12654, 4663, 1899, 78877, 2507, 64121, 8726, 65594, 0, 0, 0,
- 8892, 0, 92339, 0, 983073, 5782, 420, 0, 0, 43796, 10797, 63794, 0, 0,
- 64814, 63796, 77965, 0, 66581, 119204, 41608, 0, 0, 63792, 4659, 120788,
- 0, 43676, 0, 69673, 0, 0, 0, 329, 77968, 92707, 917548, 7399, 0, 41188,
- 13244, 120466, 42167, 7435, 78193, 5380, 119086, 69225, 1155, 11365,
- 43126, 77972, 0, 65684, 0, 5601, 65192, 42765, 63752, 0, 7987, 128543,
- 1172, 69799, 6786, 43601, 120476, 74126, 5603, 0, 4473, 0, 194823, 0,
- 65347, 65346, 65345, 0, 127384, 5347, 69802, 983632, 73868, 118944,
- 10588, 0, 0, 63755, 0, 5343, 78422, 120661, 4555, 5341, 0, 70071, 128670,
- 5351, 78675, 43104, 65244, 917892, 64541, 42519, 74472, 0, 0, 74765,
- 917888, 127510, 6638, 0, 65113, 271, 74180, 65370, 8835, 65368, 12653,
- 65366, 42172, 41086, 65363, 65362, 65361, 11912, 43410, 11323, 65357,
- 11800, 65355, 5345, 65353, 65352, 65351, 761, 65349, 19959, 69718, 63856,
- 126635, 2423, 77958, 64647, 77959, 11957, 4699, 0, 0, 0, 0, 64605, 0, 0,
- 0, 4916, 0, 380, 10958, 66563, 77955, 69773, 9773, 13167, 12918, 41096,
- 73980, 69245, 78254, 917893, 10684, 0, 917896, 0, 7946, 12541, 8182,
- 67586, 69780, 0, 0, 0, 0, 9005, 1225, 6630, 0, 0, 0, 68011, 8847, 0,
- 65876, 5535, 8329, 74590, 983208, 92609, 0, 0, 3127, 2595, 65713, 42013,
- 983858, 5607, 41089, 0, 0, 74256, 2665, 11304, 43751, 74200, 4970, 8764,
- 120459, 8934, 92726, 41566, 4492, 0, 65011, 41090, 0, 0, 1188, 7254,
- 1100, 0, 128301, 41081, 2912, 11749, 69792, 0, 68019, 3572, 10023, 4959,
- 13079, 0, 983276, 9729, 0, 0, 0, 43361, 0, 0, 11803, 7996, 9907, 41450,
- 13304, 128290, 127260, 41451, 0, 11095, 8273, 127533, 3451, 983309, 972,
- 41453, 983442, 0, 73883, 68022, 73945, 983735, 2288, 19955, 9538, 0,
- 69807, 0, 0, 0, 0, 11396, 983440, 11019, 0, 0, 0, 68020, 41078, 71365,
- 261, 5927, 7791, 0, 7362, 0, 10696, 0, 6073, 9838, 118920, 0, 6075,
- 93995, 282, 126510, 6437, 74078, 128000, 9801, 0, 74177, 0, 0, 3474,
- 118787, 0, 120655, 6081, 0, 78874, 74076, 78879, 0, 0, 0, 0, 0, 8751,
- 11499, 120273, 7816, 12636, 4665, 12628, 4670, 92608, 120272, 68017,
- 9642, 10912, 958, 0, 11387, 78878, 4666, 0, 4915, 0, 4669, 0, 68099,
- 13287, 4664, 10836, 120550, 0, 69775, 0, 43595, 7450, 0, 917875, 8664,
- 9697, 3606, 917873, 0, 0, 64815, 1063, 120250, 120251, 9772, 7255, 8886,
- 1389, 127932, 120257, 120258, 120259, 12941, 42661, 92381, 120255,
- 120256, 12301, 120266, 69820, 41102, 64428, 120262, 120263, 120264, 1017,
- 66600, 523, 505, 1447, 74436, 0, 0, 0, 8608, 42789, 120613, 128704, 0,
- 73855, 11307, 66707, 917871, 127751, 11745, 7919, 0, 1641, 0, 0, 8966, 0,
- 0, 5908, 0, 0, 6744, 128355, 1699, 69861, 74843, 917933, 0, 6306, 10169,
- 71324, 119251, 10068, 3766, 2389, 120456, 120455, 6611, 257, 43170,
- 13153, 0, 42386, 0, 9436, 2599, 0, 6496, 9449, 5930, 11476, 11033, 11447,
- 10541, 5622, 120436, 8477, 3760, 1718, 9442, 66433, 3776, 0, 41435, 4352,
- 983610, 2435, 120809, 5621, 120385, 4201, 3778, 4203, 4202, 4205, 4204,
- 120447, 3768, 68142, 765, 41440, 3764, 8473, 6373, 8469, 120438, 12947,
- 4564, 0, 0, 74271, 73753, 8374, 983156, 0, 6829, 5225, 128807, 127385, 0,
- 0, 119615, 0, 74793, 5626, 73807, 11771, 74075, 127236, 128019, 42614,
- 5353, 5625, 74179, 0, 0, 1010, 64572, 41780, 42623, 64277, 69942, 6952,
- 983272, 120752, 78762, 2590, 5629, 65552, 7551, 10325, 5632, 10471,
- 120038, 120027, 120028, 120025, 5628, 120031, 970, 120029, 4772, 2400,
- 5627, 120017, 120018, 120023, 64275, 120021, 8786, 0, 203, 0, 0, 0, 0,
- 78350, 0, 64378, 42054, 0, 0, 554, 119649, 11358, 0, 12182, 42048, 11065,
- 126464, 73891, 0, 0, 5694, 7689, 69798, 9323, 4325, 3047, 10317, 175, 0,
- 0, 69764, 0, 0, 1243, 42154, 5431, 6652, 0, 69770, 43651, 0, 68118,
- 128024, 1129, 126574, 0, 65900, 1986, 7846, 78804, 8661, 917772, 65255,
- 0, 3845, 4490, 118969, 6649, 74400, 1456, 7530, 11977, 7249, 8366, 0,
- 7756, 12342, 128568, 51, 41516, 0, 8570, 9568, 71318, 456, 7026, 8145,
- 1168, 9251, 9082, 119964, 64055, 42781, 3866, 12323, 41512, 73805, 68121,
- 0, 41494, 92316, 4660, 0, 10405, 0, 78803, 0, 0, 42040, 73918, 119627,
- 7944, 41454, 12605, 0, 42205, 41455, 236, 64051, 78867, 8214, 0, 0, 0,
- 41457, 983970, 119589, 1969, 2384, 8097, 917864, 7413, 68012, 78029,
- 8766, 0, 78079, 5854, 127974, 10583, 0, 119989, 0, 10416, 917869, 3872,
- 917868, 0, 8429, 0, 118806, 2838, 128802, 0, 917866, 0, 0, 0, 983967,
- 94005, 11096, 120813, 10553, 1662, 8483, 120396, 43605, 5892, 43418, 0,
- 73742, 66, 65, 68, 67, 70, 69, 72, 71, 74, 73, 76, 75, 78, 77, 80, 79,
- 82, 81, 84, 83, 86, 85, 88, 87, 90, 89, 119862, 10357, 7385, 8170, 1704,
- 8556, 0, 9659, 0, 0, 0, 9556, 0, 4503, 11353, 9647, 0, 78185, 0, 0,
- 92713, 78886, 0, 0, 74229, 66593, 6438, 917979, 9109, 78882, 1289, 64599,
- 0, 68009, 0, 65507, 2447, 0, 0, 128042, 126545, 983137, 0, 6334, 0, 0,
- 19937, 0, 92368, 0, 5675, 254, 0, 0, 69686, 42425, 8918, 64003, 5716,
- 42312, 0, 0, 6972, 42826, 0, 42464, 120567, 0, 92645, 74796, 64400,
- 64693, 0, 77861, 65429, 9515, 4435, 0, 42522, 0, 68008, 11785, 7412,
- 64671, 41978, 1412, 4594, 1391, 10536, 8067, 9901, 7103, 128293, 7102,
- 74588, 120748, 3140, 128854, 7960, 43271, 0, 12518, 10909, 127508, 1428,
- 12472, 0, 69864, 7699, 12393, 0, 0, 0, 74518, 8223, 0, 4261, 0, 0, 0, 0,
- 0, 128302, 0, 128046, 43419, 0, 64554, 10574, 3878, 0, 42352, 1752,
- 73785, 0, 42506, 128541, 10199, 0, 0, 68021, 65919, 0, 6695, 720, 324, 0,
- 0, 43406, 983736, 1464, 40985, 0, 7974, 0, 43474, 0, 64488, 0, 0, 64041,
- 74787, 0, 78865, 92258, 65597, 0, 78863, 0, 1302, 0, 78861, 119134, 0, 0,
- 5204, 74774, 43404, 11835, 0, 3995, 68360, 65608, 3714, 92190, 0, 0,
- 10999, 11750, 0, 43251, 68660, 43301, 0, 120557, 8130, 8672, 10845,
- 11964, 0, 983185, 0, 0, 68455, 42863, 73839, 0, 0, 0, 0, 126629, 0, 468,
- 612, 0, 64401, 66448, 68376, 0, 1674, 0, 5823, 983163, 12280, 0, 540,
- 74564, 119017, 0, 8432, 0, 11073, 0, 64316, 0, 0, 820, 41741, 0, 120667,
- 0, 64684, 126992, 3359, 7800, 69934, 65177, 6226, 353, 12396, 0, 119612,
- 64742, 128682, 120282, 0, 983450, 12412, 19941, 0, 120277, 78847, 1884,
- 9481, 42418, 70059, 41157, 0, 1195, 64898, 7924, 0, 41151, 2010, 0,
- 41328, 42344, 0, 12409, 0, 4360, 127009, 9739, 128550, 69933, 73921, 0,
- 42521, 8539, 983725, 0, 118986, 0, 4788, 0, 68023, 65734, 983455, 43790,
- 0, 13075, 74429, 94063, 64569, 43532, 10837, 2492, 127197, 118901, 68637,
- 41136, 43785, 11813, 9649, 41154, 119617, 5128, 4038, 41143, 65604,
- 64859, 41592, 6771, 1648, 5435, 917837, 6734, 41343, 119848, 65439,
- 12709, 6986, 92364, 68015, 0, 41349, 70021, 12581, 10374, 5175, 0, 73806,
- 10254, 0, 10278, 10262, 69858, 41346, 0, 607, 0, 119852, 128846, 12923,
- 10314, 10282, 65477, 10378, 120297, 40976, 8265, 0, 119834, 40975, 5840,
- 42838, 0, 40978, 983897, 119840, 0, 983071, 0, 66444, 10538, 0, 2550,
- 119836, 6779, 0, 0, 3525, 6824, 118886, 0, 0, 5619, 65822, 126567,
- 194882, 7455, 0, 5616, 11486, 9656, 0, 0, 10727, 5615, 0, 120551, 42380,
- 64895, 43693, 66451, 808, 5455, 11347, 0, 1026, 5620, 194887, 0, 11350,
- 5617, 0, 9225, 64639, 127073, 9145, 128060, 1338, 120581, 983158, 12739,
- 4603, 3084, 983155, 92484, 9858, 6037, 0, 3974, 78213, 10290, 983704,
- 3083, 10322, 0, 0, 0, 41036, 0, 0, 43321, 65606, 0, 41032, 42388, 0,
- 64700, 10011, 1445, 40961, 0, 119105, 0, 40960, 0, 194891, 0, 40963,
- 64952, 10402, 0, 0, 92304, 10603, 0, 0, 983113, 0, 6714, 10083, 127069,
- 194895, 78367, 127377, 0, 93963, 9073, 42585, 64302, 10704, 65030, 4787,
- 0, 74829, 0, 65423, 0, 128118, 9570, 55260, 9525, 2689, 917626, 65426, 0,
- 917624, 43740, 0, 40966, 917622, 13286, 3998, 42598, 42596, 503, 74237,
- 8735, 2690, 66488, 42836, 127150, 41954, 917617, 1652, 772, 6688, 8310,
- 65428, 3487, 43416, 3585, 10194, 43320, 119159, 128183, 194874, 6468,
- 41976, 9720, 917606, 11767, 41970, 194596, 5836, 12358, 0, 4355, 9048,
- 12180, 65027, 64680, 13038, 43699, 0, 41488, 128087, 8527, 194917, 12362,
- 12435, 12360, 41053, 3266, 0, 12356, 8616, 41466, 0, 92588, 11450, 0,
- 3638, 12354, 0, 3216, 0, 2358, 92606, 8633, 0, 983745, 119182, 69244, 0,
- 0, 11759, 194903, 6368, 74823, 0, 41423, 8078, 10504, 127558, 41698,
- 42237, 0, 7002, 983678, 41430, 42267, 41051, 41484, 0, 0, 41050, 41473,
- 10466, 13099, 0, 0, 0, 6435, 0, 11362, 0, 0, 65382, 0, 41420, 0, 3625,
- 78157, 41409, 0, 69639, 2041, 9178, 9672, 41427, 43541, 43317, 0, 0, 0,
- 41424, 917598, 120546, 0, 128212, 0, 41417, 1261, 0, 0, 12102, 119662,
- 41401, 0, 127538, 0, 78251, 0, 42290, 3275, 92472, 42329, 74759, 0, 0, 0,
- 92388, 69649, 10989, 74234, 983140, 10598, 7410, 2669, 903, 0, 2920, 0,
- 127232, 74603, 64504, 19928, 0, 0, 3917, 0, 11732, 0, 983180, 41448,
- 41461, 128823, 0, 127912, 0, 8819, 12663, 0, 41184, 74014, 232, 74835,
- 120646, 9168, 65786, 0, 0, 0, 9094, 0, 11758, 68425, 0, 1064, 42467,
- 128044, 10115, 19924, 92711, 0, 7862, 64551, 13224, 8516, 41862, 66650,
- 7561, 78618, 69793, 1878, 0, 983269, 2911, 0, 41178, 5427, 64823, 0, 0,
- 3787, 41174, 0, 41458, 0, 41463, 42413, 11292, 2406, 775, 0, 65584,
- 69923, 6074, 9618, 128668, 983952, 43440, 0, 194901, 41436, 3656, 0,
- 120600, 41456, 0, 1599, 11333, 0, 6703, 8513, 0, 1613, 0, 68456, 12598,
- 983191, 120734, 78745, 74500, 41460, 10145, 10542, 9937, 78746, 70029,
- 9905, 0, 65730, 0, 120374, 8427, 120375, 55246, 120376, 0, 11497, 64687,
- 74008, 42592, 3871, 0, 128305, 9111, 5741, 0, 194846, 120366, 119111,
- 120745, 0, 120368, 0, 11648, 0, 194873, 120364, 41587, 120365, 0, 74322,
- 42113, 0, 127155, 12172, 0, 74530, 65298, 65723, 194840, 73871, 65724,
- 7928, 120354, 983095, 41595, 73730, 0, 42118, 73830, 66042, 10355,
- 983110, 7875, 0, 41598, 3993, 0, 1545, 40971, 536, 128521, 43029, 0, 0,
- 65173, 65286, 0, 0, 0, 0, 0, 0, 41375, 5402, 0, 0, 1687, 120503, 917817,
- 0, 78194, 64326, 40969, 10526, 78753, 8323, 40968, 1339, 11731, 78756, 0,
- 65460, 12242, 128513, 8020, 10843, 11554, 0, 0, 8266, 41006, 65722, 0,
- 10710, 0, 118942, 67667, 64567, 119155, 195091, 0, 119636, 67857, 120687,
- 0, 983066, 11755, 66305, 0, 0, 10917, 93979, 0, 11272, 2040, 41247,
- 41326, 195060, 1741, 42370, 1227, 0, 0, 11413, 0, 0, 5283, 1586, 4978, 0,
- 1984, 11830, 0, 92293, 40984, 128306, 9373, 0, 12916, 6284, 0, 41663, 0,
- 0, 0, 9237, 9385, 41648, 0, 194580, 2299, 41666, 1830, 73783, 2056,
- 41287, 92610, 0, 0, 42219, 128257, 0, 41987, 41676, 983059, 120823,
- 983144, 41670, 0, 92590, 2796, 55291, 11683, 9902, 74521, 67988, 11451,
- 983111, 128822, 42631, 2359, 0, 67844, 74164, 41238, 548, 11405, 13133,
- 64368, 983239, 128795, 0, 397, 43622, 42139, 9547, 9590, 128238, 1614,
- 43661, 64356, 66307, 6651, 1358, 0, 428, 9620, 1466, 78112, 10982,
- 118831, 1333, 7104, 407, 6425, 128834, 74253, 0, 0, 0, 5804, 11976, 8554,
- 92721, 0, 0, 9057, 42294, 41218, 0, 0, 78137, 1883, 10952, 8048, 78142,
- 41225, 92621, 42915, 983676, 128684, 0, 4407, 0, 65809, 119074, 194821,
- 8448, 7141, 74183, 0, 12675, 12659, 0, 42363, 120624, 194824, 55273,
- 10766, 12012, 2386, 64732, 9170, 917821, 9123, 64585, 120500, 119158,
- 7140, 10977, 127378, 4164, 9081, 0, 120569, 42049, 42042, 8709, 128283,
- 126477, 120637, 42419, 64799, 42047, 0, 0, 8470, 11807, 65897, 577, 0,
- 983760, 74300, 0, 127308, 74840, 0, 0, 128791, 92224, 8736, 1414, 42643,
- 9683, 43486, 74344, 0, 2536, 0, 66330, 0, 0, 0, 0, 0, 0, 0, 66317, 69945,
- 66315, 2106, 120222, 11273, 0, 43004, 7541, 0, 0, 961, 64307, 66324,
- 64906, 128591, 3106, 65917, 41284, 1696, 0, 891, 12105, 0, 42624, 12802,
- 3264, 8824, 13268, 43003, 10936, 0, 0, 0, 194826, 92688, 0, 2322, 120371,
- 983584, 11449, 128187, 42868, 41285, 3547, 0, 0, 128793, 983398, 43216,
- 6089, 78682, 0, 120578, 4170, 1029, 127761, 127036, 119224, 42374, 0,
- 744, 0, 0, 0, 65823, 127826, 0, 3551, 0, 0, 4623, 55268, 0, 4598, 983162,
- 65136, 127136, 0, 0, 10851, 0, 6179, 92602, 6180, 0, 11952, 120778,
- 78648, 11972, 78646, 78647, 78644, 78645, 177, 78643, 6176, 120580, 0, 0,
- 6177, 9020, 78652, 78653, 6178, 120249, 120242, 128027, 67673, 2214,
- 8754, 0, 120237, 2137, 43081, 0, 0, 9136, 120240, 4401, 41280, 0, 8974,
- 2308, 0, 74149, 0, 2318, 983183, 66361, 8198, 0, 64360, 12601, 42536,
- 65266, 120827, 74307, 92462, 6970, 5404, 43332, 3667, 7936, 12925,
- 126989, 6385, 0, 0, 118949, 10874, 65505, 128083, 0, 42053, 2075, 42057,
- 11083, 42052, 0, 0, 67651, 0, 9665, 92300, 983666, 13181, 0, 0, 0, 70088,
- 74148, 0, 0, 120225, 120229, 120224, 74172, 41145, 0, 94096, 983946,
- 41148, 8683, 7594, 127519, 0, 119090, 10869, 43458, 41146, 92407, 11441,
- 0, 3512, 119633, 983709, 8103, 0, 0, 65184, 11780, 41563, 42796, 0,
- 69742, 41544, 65146, 0, 0, 0, 0, 19942, 0, 118908, 7988, 10436, 74273,
- 3271, 73804, 64711, 0, 94064, 0, 0, 3804, 13070, 11557, 42044, 0, 1095,
- 0, 3599, 127774, 0, 128861, 8514, 0, 0, 0, 74346, 66697, 0, 11684, 0,
- 92486, 917603, 0, 42043, 43232, 66677, 0, 42046, 78241, 4036, 126481, 0,
- 128213, 194861, 0, 11954, 93978, 1450, 12986, 1340, 0, 65441, 92722, 0,
- 0, 127772, 0, 917542, 0, 0, 6539, 0, 0, 0, 194856, 0, 120492, 41190,
- 3973, 119365, 4575, 41193, 7982, 429, 0, 127194, 0, 194854, 65792, 0,
- 118968, 6417, 118918, 78178, 0, 194850, 0, 0, 4919, 10590, 128556, 7755,
- 0, 0, 64548, 120506, 1621, 10214, 65126, 0, 127004, 0, 12188, 983668,
- 1617, 8050, 0, 5015, 0, 119174, 42590, 194871, 1756, 78181, 0, 65768,
- 6352, 41892, 0, 7555, 13103, 5408, 2817, 1214, 69919, 92335, 983125, 0,
- 0, 0, 127195, 7957, 8689, 64723, 1056, 42896, 74147, 194813, 0, 55286,
- 7073, 65850, 12327, 983948, 119028, 0, 0, 0, 2341, 8450, 8484, 8474,
- 983260, 0, 70079, 8461, 128102, 12153, 12799, 0, 43709, 43708, 9451,
- 7571, 13073, 0, 0, 681, 983252, 703, 0, 3272, 8781, 12894, 70077, 11709,
- 92288, 74446, 0, 92532, 0, 11338, 120768, 3276, 0, 0, 65928, 0, 0, 65021,
- 64795, 74574, 0, 10047, 78814, 3262, 78811, 42711, 0, 0, 68478, 163, 576,
- 9895, 1655, 78817, 74591, 78815, 78816, 983122, 0, 0, 0, 10039, 0,
- 983945, 5623, 5717, 5776, 0, 0, 0, 41591, 11036, 65252, 92382, 0, 0, 0,
- 67848, 0, 0, 0, 8887, 127521, 7295, 11031, 0, 43157, 0, 8946, 10348,
- 10412, 8755, 0, 0, 5718, 13221, 0, 0, 78135, 0, 983711, 8810, 74499, 686,
- 0, 71362, 4619, 118954, 6654, 73769, 74426, 0, 12040, 65689, 10128,
- 65118, 0, 119151, 74205, 92651, 0, 2401, 68144, 8792, 983648, 0, 65455,
- 0, 92246, 0, 119129, 0, 12886, 127920, 66624, 0, 43557, 10300, 10161,
- 10396, 74135, 983453, 118945, 78118, 73851, 3010, 6441, 78122, 1458,
- 41475, 128672, 93975, 0, 11479, 0, 120356, 6350, 12864, 69674, 78114,
- 1061, 64780, 2001, 43111, 55230, 128686, 4052, 0, 7626, 0, 0, 1045, 0,
- 5631, 41113, 0, 0, 43707, 74127, 0, 0, 8486, 0, 73758, 2335, 4362,
- 983195, 126561, 69221, 1025, 0, 42625, 917627, 78084, 41443, 0, 128206,
- 0, 1774, 1523, 0, 0, 41445, 78236, 0, 8567, 41442, 3988, 0, 78237,
- 118910, 0, 65274, 8564, 78199, 78238, 127515, 0, 0, 43446, 0, 66513,
- 6256, 0, 579, 55218, 10206, 983075, 6375, 2673, 0, 11814, 0, 4488, 0,
- 127336, 68451, 10444, 118846, 127334, 11799, 74407, 68466, 4487, 127849,
- 42832, 1032, 120267, 43450, 78257, 7203, 0, 614, 78191, 127325, 120615,
- 0, 78262, 128669, 127323, 0, 43121, 0, 0, 92513, 1050, 7549, 0, 0, 9314,
- 0, 0, 120616, 0, 10057, 0, 127313, 0, 66504, 983171, 0, 2307, 0, 64333,
- 127312, 128547, 73873, 0, 94035, 0, 127973, 128708, 0, 10360, 6746, 0,
- 92245, 440, 0, 13085, 9233, 74216, 0, 0, 9957, 128285, 66447, 8046,
- 64963, 65777, 10125, 74212, 42819, 10910, 0, 1521, 9896, 93965, 10487,
- 69878, 12527, 0, 7970, 0, 128660, 0, 65769, 5243, 9849, 5239, 65771,
- 983235, 0, 5237, 69714, 0, 10103, 5247, 4769, 0, 118977, 12873, 2283,
- 983237, 0, 3008, 4896, 0, 12087, 0, 55231, 41103, 0, 64565, 4773, 0,
- 92717, 70074, 4770, 0, 917567, 8731, 65378, 127362, 120619, 9122, 128033,
- 126600, 4774, 3019, 9997, 12834, 0, 9456, 10215, 120547, 0, 0, 0, 0,
- 74776, 4281, 4768, 0, 41535, 4099, 9017, 0, 0, 78095, 0, 78096, 0, 0, 0,
- 78098, 0, 42814, 880, 0, 0, 128021, 2134, 0, 10116, 9877, 92329, 0, 0,
- 7095, 0, 74116, 6778, 0, 78090, 8243, 2427, 128141, 7093, 0, 11585,
- 195003, 9962, 0, 12223, 0, 0, 1434, 120254, 5637, 11573, 0, 0, 0, 19951,
- 0, 78121, 0, 0, 55283, 0, 0, 74437, 1156, 8740, 92415, 3782, 64331, 0,
- 41370, 1014, 8261, 0, 0, 10835, 0, 65536, 0, 120463, 0, 7702, 118824, 0,
- 43010, 65779, 65783, 1150, 10547, 5700, 0, 120603, 65383, 2339, 42594,
- 5697, 118788, 0, 128576, 0, 42257, 5696, 92677, 120465, 3862, 9643, 0, 0,
- 7634, 65167, 9845, 0, 0, 5701, 9722, 41490, 983153, 1426, 68217, 0,
- 68447, 42204, 55270, 8571, 194991, 78067, 0, 78818, 92719, 43182, 12184,
- 0, 42022, 0, 10281, 0, 5650, 43194, 64712, 10744, 0, 990, 5647, 0, 7387,
- 78734, 41114, 11477, 5646, 12879, 11018, 983930, 3945, 92589, 0, 0, 0, 0,
- 78212, 127746, 1020, 73763, 0, 78731, 5648, 64748, 194910, 78733, 10205,
- 3545, 983585, 6984, 0, 74051, 983655, 43242, 120458, 2667, 0, 0, 0, 9911,
- 0, 65020, 10097, 119166, 127145, 983662, 118836, 983748, 78427, 1140,
- 78426, 0, 10159, 0, 0, 8128, 0, 0, 917965, 1815, 19910, 890, 0, 3267,
- 92291, 0, 10123, 0, 4410, 1041, 10576, 6354, 92581, 580, 74232, 0,
- 128347, 0, 0, 0, 19938, 65906, 127819, 0, 0, 3298, 5375, 10142, 0, 8215,
- 0, 6134, 41246, 64402, 0, 69899, 0, 0, 0, 41382, 0, 128653, 5173, 65348,
- 527, 0, 0, 92612, 128250, 78797, 11915, 0, 0, 10072, 0, 42695, 2329,
- 42250, 0, 128864, 69667, 12245, 1568, 94033, 0, 0, 128120, 0, 74328,
- 92708, 74769, 0, 119087, 9069, 6144, 0, 0, 73822, 0, 128010, 64917,
- 41521, 118934, 494, 13250, 0, 65098, 6364, 956, 0, 12830, 10462, 73740,
- 73734, 0, 0, 0, 66449, 13263, 74281, 69217, 13171, 127796, 0, 0, 92294,
- 0, 1044, 41276, 0, 0, 0, 42068, 11795, 0, 0, 0, 0, 42450, 3907, 0, 64526,
- 11829, 68197, 12295, 0, 11475, 0, 3020, 11537, 0, 66441, 983454, 7098, 0,
- 0, 1057, 566, 42696, 0, 3016, 42274, 43464, 66490, 12921, 66571, 78472,
- 92510, 3006, 4620, 127237, 983578, 0, 0, 64659, 0, 127749, 55253, 6357,
- 6362, 8626, 71337, 2216, 9090, 65377, 41596, 0, 42920, 1698, 0, 64477, 0,
- 43813, 1053, 0, 78269, 0, 126586, 1052, 1051, 459, 1060, 74349, 66479, 0,
- 0, 0, 0, 42490, 689, 6508, 4163, 42298, 8639, 66641, 4246, 0, 0, 12130,
- 0, 42337, 64596, 64375, 66481, 127850, 0, 0, 6359, 0, 43471, 983768, 0,
- 0, 127274, 0, 6358, 6361, 1926, 6356, 92627, 7898, 8110, 10935, 0, 10069,
- 5830, 0, 43685, 0, 0, 0, 0, 8693, 78611, 119565, 983808, 120413, 0,
- 127257, 65894, 0, 0, 0, 983923, 0, 0, 119187, 2135, 78868, 0, 0, 78869,
- 42313, 5579, 92412, 0, 983082, 94002, 0, 5578, 41774, 128115, 42023,
- 6234, 5669, 92275, 0, 0, 0, 127506, 68202, 5583, 0, 0, 42426, 5580,
- 42276, 2923, 892, 2220, 42465, 41330, 194987, 5795, 65512, 119006, 65702,
- 0, 120801, 65251, 0, 65710, 0, 0, 67672, 0, 5370, 0, 2931, 1638, 10966,
- 10188, 65878, 118848, 0, 69694, 69879, 128830, 8172, 42017, 0, 10844, 0,
- 128195, 92424, 6374, 0, 0, 286, 78023, 1062, 0, 119999, 0, 7395, 0, 1070,
- 64900, 7153, 6095, 41865, 0, 3015, 128023, 126465, 5211, 983083, 6400, 0,
- 194983, 70054, 8189, 11276, 0, 0, 372, 128829, 0, 118874, 42102, 41585,
- 128202, 0, 42101, 276, 78402, 0, 33, 74226, 127303, 9007, 118796, 41588,
- 66033, 427, 10763, 118819, 0, 127884, 0, 1031, 6257, 0, 42104, 0, 983980,
- 2328, 92409, 1071, 42899, 0, 74848, 0, 983580, 0, 1047, 0, 0, 64790, 0,
- 69723, 10651, 0, 0, 0, 0, 92206, 119181, 5711, 41633, 12098, 65571, 9166,
- 0, 5710, 0, 6790, 65168, 13216, 0, 69716, 69726, 0, 64611, 41623, 195001,
- 5715, 69654, 0, 0, 5712, 2761, 41620, 68124, 3074, 5722, 0, 8643, 73768,
- 0, 118906, 2757, 11067, 9718, 74498, 8910, 10689, 6479, 0, 0, 0, 78607,
- 9196, 69670, 0, 0, 0, 0, 118911, 0, 0, 0, 0, 0, 120010, 0, 8701, 68130,
- 119616, 120522, 0, 42477, 194994, 12123, 4495, 43569, 0, 0, 0, 64946,
- 10992, 0, 120009, 0, 0, 9318, 93986, 13249, 65679, 73808, 0, 65457,
- 42249, 7639, 43995, 67845, 42641, 5454, 0, 0, 194997, 120005, 0, 983966,
- 5084, 0, 0, 118861, 0, 733, 917876, 78014, 78436, 78435, 41677, 0, 9218,
- 1731, 0, 983746, 0, 67990, 0, 0, 0, 120001, 127018, 92492, 5155, 120000,
- 5358, 983744, 0, 917767, 64424, 983231, 3840, 64314, 41432, 0, 78315,
- 68430, 67980, 43253, 65943, 0, 3371, 10988, 0, 8771, 1479, 0, 0, 1109,
- 11580, 0, 64601, 12205, 0, 0, 64507, 8868, 399, 67978, 74842, 983284,
- 983721, 12149, 13088, 551, 0, 10156, 12119, 92572, 0, 2544, 65074,
- 119211, 0, 0, 78011, 351, 119149, 0, 0, 55229, 0, 74268, 0, 0, 0, 42377,
- 0, 0, 0, 983924, 0, 9013, 4054, 0, 983570, 983628, 0, 73960, 5585, 65881,
- 2549, 74469, 0, 0, 5584, 8358, 0, 64215, 92219, 10919, 0, 7980, 126601,
- 983784, 2218, 41800, 5589, 0, 2664, 41613, 5586, 118890, 0, 11356, 0, 0,
- 43452, 78609, 0, 42573, 67856, 0, 78129, 0, 0, 74392, 8135, 6450, 10055,
- 77996, 0, 0, 119225, 5657, 0, 9626, 0, 77994, 10179, 5654, 12939, 92573,
- 120799, 0, 0, 5652, 10945, 0, 66486, 0, 3661, 7863, 0, 0, 0, 74509,
- 983852, 5659, 0, 78692, 66729, 5655, 983626, 42168, 0, 1055, 917628,
- 127792, 66310, 74030, 0, 12146, 73955, 73956, 11618, 0, 126990, 0, 10272,
- 10304, 10368, 42518, 594, 10244, 10248, 7407, 983887, 64870, 0, 3467,
- 983891, 0, 3331, 946, 10231, 1495, 8131, 74330, 0, 9562, 69222, 65927, 0,
- 70036, 69696, 69769, 64656, 983726, 0, 94020, 70056, 5666, 65227, 5318,
- 63994, 0, 9091, 10798, 0, 128166, 10186, 0, 7732, 983724, 64556, 0, 0,
- 5668, 74445, 0, 128663, 5670, 126610, 127297, 11820, 2992, 7826, 5667,
- 19952, 120807, 0, 12749, 74551, 0, 0, 66496, 4361, 119260, 1306, 9286,
- 1497, 128286, 94004, 0, 0, 3571, 13247, 0, 7973, 66353, 68435, 78278,
- 67896, 43192, 0, 78265, 553, 120653, 0, 128554, 5829, 0, 4587, 78285,
- 65912, 0, 12746, 0, 0, 119924, 5633, 119927, 94101, 94102, 94099, 64905,
- 94105, 9512, 94103, 12742, 6443, 983806, 0, 9135, 0, 41564, 0, 55219,
- 128832, 983851, 0, 12148, 0, 78297, 0, 64256, 0, 11669, 0, 5634, 4524, 0,
- 127270, 0, 118880, 2425, 65182, 128769, 43636, 5221, 78410, 328, 0,
- 983809, 69815, 5636, 0, 5329, 0, 5638, 119918, 7940, 64938, 43223, 43760,
- 5635, 3373, 2986, 78292, 74223, 3437, 78291, 6203, 4247, 0, 11920, 8274,
- 0, 0, 1657, 41561, 78299, 78295, 5639, 2954, 5660, 5640, 78303, 983685,
- 78300, 42227, 0, 0, 41637, 67872, 0, 78310, 41625, 43362, 78309, 120713,
- 11705, 5642, 0, 5486, 0, 4356, 11710, 0, 12051, 69938, 0, 5641, 8259, 0,
- 1058, 0, 67630, 0, 0, 1144, 78750, 0, 42228, 0, 73890, 118972, 0, 2800,
- 0, 5645, 64964, 8652, 2547, 66484, 43634, 0, 5608, 65890, 43808, 0,
- 67621, 119934, 9000, 0, 0, 92673, 1865, 0, 5613, 69950, 0, 0, 5610, 0, 0,
- 65826, 2069, 0, 10787, 43999, 2997, 0, 5609, 78316, 65319, 78313, 12316,
- 65376, 2412, 0, 8186, 9807, 74269, 92547, 13130, 65874, 0, 5807, 0,
- 10030, 5306, 12364, 128064, 0, 11704, 0, 92583, 10211, 0, 0, 0, 0, 11706,
- 9710, 0, 0, 0, 413, 65623, 7118, 0, 9133, 74262, 0, 1042, 0, 64779,
- 12171, 119240, 6185, 64776, 4984, 0, 708, 11391, 0, 12241, 92720, 983899,
- 1308, 0, 2534, 810, 0, 0, 0, 0, 0, 1917, 3000, 0, 0, 120739, 2364, 92443,
- 74470, 66618, 65680, 120779, 10027, 0, 128154, 12337, 120722, 127368,
- 983167, 2980, 755, 69774, 931, 13124, 68182, 6363, 2748, 0, 0, 65041,
- 92276, 44011, 8730, 983067, 127854, 78312, 7274, 119250, 0, 7275, 78304,
- 935, 0, 65840, 377, 42325, 11649, 127363, 65253, 64301, 128835, 78308,
- 42341, 65284, 2417, 0, 12884, 19912, 7907, 10768, 0, 194998, 0, 10673,
- 119217, 7248, 0, 128346, 1781, 5496, 3627, 62, 1649, 0, 964, 0, 127876,
- 78226, 128775, 127512, 0, 0, 0, 0, 43689, 127911, 13142, 78812, 42415,
- 66575, 4542, 69909, 43547, 0, 0, 7677, 2991, 4946, 42454, 11565, 7949, 0,
- 983918, 11341, 42494, 3073, 65625, 9714, 11692, 4657, 0, 92724, 6478,
- 9898, 43673, 65237, 6241, 7106, 4877, 983795, 6238, 0, 10548, 127049,
- 4409, 0, 0, 64798, 0, 5346, 0, 94047, 6237, 4874, 0, 9176, 0, 126553,
- 65231, 65884, 12678, 78748, 118912, 11378, 44018, 42785, 2408, 3251, 0,
- 0, 5685, 0, 2461, 11052, 7091, 5342, 8317, 0, 68163, 5340, 0, 127820,
- 43635, 73928, 127529, 0, 0, 0, 128510, 65482, 0, 9142, 0, 126470, 0,
- 10938, 0, 118790, 1182, 2542, 4826, 0, 0, 128176, 529, 8580, 0, 0, 10586,
- 10790, 10839, 66023, 41593, 41207, 0, 0, 41594, 225, 42828, 0, 0, 983938,
- 11376, 74379, 10721, 67664, 3438, 42097, 127267, 11084, 3194, 41870, 266,
- 78305, 120183, 41873, 120575, 11324, 120531, 0, 8420, 64918, 128844,
- 41871, 41338, 3734, 7734, 43683, 8750, 66605, 66011, 92514, 40965,
- 127937, 0, 5161, 10572, 0, 0, 0, 64349, 7287, 42162, 127552, 0, 126605,
- 11948, 69220, 12359, 43429, 41369, 1697, 12191, 0, 68633, 7286, 0, 68635,
- 10031, 0, 9870, 68645, 8620, 65824, 0, 11938, 0, 7285, 0, 119577, 42678,
- 0, 43677, 41583, 0, 65799, 92623, 0, 0, 983936, 78169, 66199, 0, 3609,
- 68624, 0, 832, 120693, 120770, 78473, 66007, 78471, 65703, 0, 0, 42732,
- 5180, 92699, 41395, 41530, 11691, 64773, 92214, 74002, 0, 0, 128645,
- 6348, 243, 13200, 983813, 6024, 92309, 9979, 10037, 41529, 10648, 8538,
- 43687, 0, 0, 4285, 66195, 0, 4230, 0, 7367, 43256, 92353, 7563, 42376, 0,
- 68442, 120512, 0, 0, 214, 0, 0, 78466, 65893, 12208, 9973, 0, 66311,
- 65589, 128277, 2603, 0, 0, 0, 70047, 0, 6022, 0, 2884, 0, 11620, 0, 43,
- 0, 66453, 1016, 41107, 0, 41121, 3885, 92, 65456, 64608, 0, 74801, 0,
- 2074, 0, 78283, 0, 12453, 128128, 983826, 74241, 126568, 6791, 12457,
- 78268, 0, 0, 0, 78279, 0, 0, 92358, 66637, 7995, 8759, 43421, 78277,
- 12449, 128552, 0, 0, 8752, 3197, 4720, 10165, 0, 119249, 0, 11595, 64893,
- 0, 43435, 0, 0, 4993, 0, 6168, 10934, 1946, 741, 0, 5494, 4639, 983147,
- 1990, 66589, 4498, 78664, 119183, 0, 0, 69734, 2960, 73779, 0, 8969,
- 128117, 43424, 127059, 0, 2950, 119579, 6210, 65753, 370, 0, 0, 0, 4953,
- 983682, 0, 0, 0, 69230, 0, 0, 65688, 983246, 5063, 3517, 2964, 43663,
- 917762, 6344, 74791, 10566, 10144, 66333, 8252, 729, 66016, 78253, 0,
- 71317, 64923, 128040, 43669, 9032, 78263, 78264, 0, 41215, 0, 65883, 0,
- 917774, 120602, 3761, 0, 0, 70068, 0, 12912, 119012, 3850, 128191, 0, 0,
- 0, 0, 908, 0, 8611, 0, 0, 127555, 43691, 41197, 0, 8978, 120540, 119135,
- 41586, 10527, 0, 917848, 3848, 78739, 194937, 127536, 65241, 5336,
- 983259, 128786, 663, 0, 10780, 0, 0, 78767, 983257, 127163, 68193, 347,
- 0, 0, 78775, 64675, 41582, 78774, 78744, 65579, 12980, 78769, 12143,
- 69657, 78512, 0, 43441, 41804, 78523, 0, 78525, 0, 128859, 41584, 10681,
- 0, 983695, 73938, 0, 128022, 4800, 66661, 0, 66306, 64715, 78534, 9518,
- 6609, 10434, 0, 11319, 1097, 0, 917850, 41730, 983214, 0, 73847, 78761,
- 65172, 41728, 41721, 0, 0, 0, 41203, 917612, 13110, 41726, 983855, 0,
- 1000, 69651, 0, 41140, 1209, 73978, 0, 73750, 1073, 6321, 77878, 41138,
- 0, 68213, 0, 12167, 1115, 41605, 9794, 127062, 67671, 55248, 12237,
- 78787, 66314, 6587, 9290, 78782, 78783, 9231, 78781, 2959, 7926, 0, 0, 0,
- 64398, 0, 119970, 12311, 983727, 78796, 78798, 78794, 78795, 68434,
- 78793, 66670, 0, 0, 12290, 120169, 0, 119873, 42142, 9968, 8205, 0, 5131,
- 0, 9627, 78536, 78542, 78535, 983212, 1944, 1248, 10148, 127755, 119990,
- 119991, 12701, 78376, 11308, 119995, 0, 119997, 119998, 65305, 65100,
- 4031, 42794, 120003, 7075, 8154, 119985, 120007, 41817, 73934, 42275,
- 120011, 120012, 78526, 120014, 120015, 6041, 0, 41899, 0, 8002, 0, 4364,
- 0, 0, 64332, 0, 7813, 9064, 119986, 10124, 7526, 8601, 7281, 78455, 7279,
- 12041, 1418, 10885, 12673, 0, 0, 9660, 983280, 13012, 4571, 0, 0, 120164,
- 12078, 2970, 0, 10933, 0, 77870, 0, 127015, 0, 41599, 0, 128831, 0,
- 12950, 92160, 3486, 0, 78311, 4239, 0, 127799, 66511, 0, 2637, 64629,
- 8460, 127053, 8476, 983975, 0, 0, 0, 65673, 1019, 78495, 4148, 0, 12289,
- 0, 4316, 0, 13119, 8488, 5412, 66243, 9935, 0, 73864, 983203, 41734,
- 8206, 74081, 9163, 3286, 9072, 5867, 13302, 7622, 7120, 41736, 92546,
- 41731, 0, 7400, 5416, 68663, 118924, 10817, 0, 41539, 127284, 0, 73963,
- 41855, 41867, 65564, 11277, 65892, 11536, 10620, 92272, 7115, 66030,
- 73932, 5498, 73942, 41536, 0, 68204, 92587, 3459, 8997, 0, 0, 0, 0,
- 92512, 0, 66377, 69781, 0, 983699, 78511, 3161, 295, 120207, 0, 92223,
- 127856, 78742, 9016, 43454, 63903, 63902, 43641, 0, 3971, 0, 70063, 2952,
- 78765, 11038, 10901, 63900, 63899, 63898, 94043, 667, 12332, 63887, 6086,
- 41722, 0, 5172, 0, 983278, 4159, 0, 0, 9815, 63884, 19934, 63882, 41198,
- 8555, 63878, 63877, 42460, 6050, 42708, 63881, 63872, 0, 42421, 0, 41723,
- 63875, 63874, 11460, 7432, 1913, 41913, 63852, 126636, 0, 42348, 73892,
- 6752, 446, 41911, 127906, 63851, 63850, 41910, 0, 63846, 2972, 12932,
- 7262, 0, 63849, 63848, 63847, 128070, 6570, 8302, 7259, 63842, 4178,
- 10746, 7250, 13214, 10041, 8105, 63892, 0, 118983, 1105, 4180, 0, 12094,
- 9497, 0, 63891, 63890, 63889, 63888, 5538, 9987, 0, 118932, 1678, 13274,
- 552, 120654, 44010, 10785, 0, 119170, 4557, 74459, 9159, 10171, 13125,
- 63860, 5540, 63858, 63865, 281, 13242, 63862, 74154, 0, 5536, 65568,
- 63857, 1388, 74169, 0, 1077, 983577, 65099, 11531, 5834, 0, 0, 0, 0,
- 42773, 0, 0, 0, 119220, 0, 3663, 0, 1112, 119122, 8686, 0, 5334, 65081,
- 43249, 74778, 127968, 11077, 0, 6509, 0, 5327, 0, 19907, 63869, 3478,
- 7583, 7679, 2903, 0, 3001, 1158, 8745, 43746, 73748, 63866, 78626, 1915,
- 4846, 0, 66371, 118984, 42105, 2990, 120128, 805, 69238, 64438, 12070,
- 8760, 1117, 118987, 12212, 120123, 65174, 42357, 63835, 63834, 0, 78240,
- 12225, 63838, 63837, 983853, 983804, 63833, 6042, 66360, 8083, 0, 0,
- 63821, 63820, 63819, 63818, 983904, 5227, 9047, 63822, 127162, 6091, 0,
- 10691, 560, 5643, 8226, 119578, 63812, 63811, 63810, 63809, 2289, 63815,
- 63814, 63813, 6047, 1597, 120143, 780, 206, 77925, 4936, 65147, 8168,
- 63930, 2076, 1093, 9882, 63934, 2082, 63932, 128150, 63929, 3546, 1605,
- 77934, 9806, 43472, 77933, 8400, 11343, 2086, 0, 63926, 2984, 5968, 9287,
- 0, 4618, 42209, 43431, 13169, 5290, 2089, 1695, 10743, 1088, 63825, 7268,
- 1084, 1085, 63829, 1083, 10131, 7283, 0, 63970, 128358, 1092, 4754, 7273,
- 5252, 44016, 43627, 127921, 0, 7408, 11809, 917618, 0, 0, 2965, 7258,
- 8808, 0, 1089, 4187, 63937, 42119, 42120, 0, 940, 5787, 10099, 63938, 0,
- 74494, 12463, 2994, 0, 118827, 0, 9664, 77939, 77940, 67892, 77938,
- 74343, 0, 0, 660, 10127, 666, 9022, 5532, 43667, 5533, 77941, 78507,
- 6118, 222, 979, 3884, 0, 74151, 92652, 6502, 0, 127118, 128695, 63951,
- 12465, 0, 0, 128782, 63946, 1707, 63924, 12461, 63950, 63897, 63948,
- 63947, 63945, 6038, 63943, 63942, 64685, 63895, 65838, 2276, 7776, 94076,
- 0, 127773, 120444, 69730, 801, 43165, 1690, 63919, 63918, 63917, 13277,
- 43659, 12951, 120638, 9906, 2054, 2334, 78515, 63916, 5483, 63914, 69737,
- 63911, 5484, 63909, 63908, 2539, 0, 43980, 5485, 0, 42697, 9061, 5534,
- 10672, 4502, 0, 253, 0, 68208, 0, 9203, 74231, 0, 11530, 92542, 68668, 0,
- 118907, 0, 10474, 43426, 13257, 42354, 128099, 983698, 70044, 195065, 0,
- 8413, 983816, 0, 5693, 7272, 0, 13209, 64470, 65831, 74350, 195063, 0, 0,
- 0, 126639, 120097, 0, 94078, 128133, 127767, 66608, 3111, 41863, 8804,
- 42913, 92187, 7270, 0, 66606, 6628, 1076, 7433, 1436, 73844, 55226,
- 128353, 63982, 7393, 12807, 43413, 63906, 1598, 63904, 0, 0, 41729, 4423,
- 1307, 0, 10515, 41589, 128698, 0, 6218, 0, 1430, 0, 0, 120606, 78754,
- 5413, 7619, 3255, 3493, 74032, 11549, 10735, 41743, 73937, 6801, 983633,
- 4518, 10990, 65073, 5167, 4481, 3771, 120158, 2710, 0, 69243, 41724, 0,
- 43073, 41690, 12479, 983635, 0, 0, 983818, 70046, 1628, 127149, 983487,
- 983731, 65262, 6333, 10783, 42315, 0, 63855, 94056, 0, 0, 5339, 74323, 0,
- 13004, 0, 4457, 0, 0, 194818, 0, 5684, 8678, 10914, 0, 5689, 65807, 0,
- 68464, 12633, 12870, 69705, 65183, 5688, 11926, 6033, 6310, 5686, 0,
- 74251, 0, 120647, 0, 50, 10558, 9871, 42612, 43655, 0, 0, 0, 66468, 0,
- 13259, 4448, 0, 983845, 0, 70043, 67853, 0, 10640, 11539, 1151, 0,
- 917607, 127544, 127079, 195050, 127852, 0, 0, 0, 12501, 64604, 0, 11527,
- 118870, 8812, 0, 11538, 8673, 12650, 11020, 0, 66467, 2105, 8087, 78163,
- 69632, 9894, 0, 0, 0, 4636, 55262, 78513, 4515, 2382, 0, 127055, 0,
- 120495, 0, 128284, 12277, 194627, 11995, 92553, 0, 12158, 0, 8741, 10197,
- 0, 92426, 0, 6531, 0, 127846, 473, 43415, 0, 983650, 1873, 1087, 0, 0, 0,
- 78527, 66439, 43218, 983123, 194716, 7237, 12504, 74282, 0, 983571, 0,
- 9489, 0, 0, 4384, 74220, 63845, 2058, 128863, 13295, 43191, 128030, 0,
- 1154, 3857, 1205, 0, 0, 13100, 12958, 120706, 74168, 0, 0, 4421, 10592,
- 0, 495, 119007, 41712, 7983, 0, 93997, 0, 6347, 120165, 7654, 41710,
- 4196, 0, 437, 41709, 73772, 0, 0, 9465, 13290, 119180, 4997, 64306, 0, 0,
- 4999, 194642, 0, 126582, 4711, 120769, 0, 2739, 0, 8044, 74834, 194643,
- 41789, 128142, 10809, 0, 0, 0, 1779, 6600, 6601, 41543, 5325, 642, 64187,
- 13058, 120449, 12875, 0, 92186, 13229, 0, 10575, 43399, 0, 0, 41791,
- 1104, 0, 0, 10655, 0, 0, 0, 0, 1082, 195049, 8428, 6569, 0, 0, 0, 69849,
- 6783, 0, 12993, 8049, 41548, 44021, 6458, 983807, 128882, 4761, 63828,
- 4766, 64623, 1273, 43407, 0, 118876, 195045, 6912, 1313, 6322, 10483,
- 983603, 41545, 0, 92449, 0, 0, 0, 0, 78624, 3484, 74337, 0, 0, 8503,
- 5122, 41527, 0, 66320, 983811, 0, 0, 0, 41537, 69683, 8303, 8282, 11817,
- 73857, 10003, 73859, 65904, 7363, 1686, 0, 78406, 11467, 3664, 65921,
- 64299, 194664, 0, 0, 4324, 126, 42246, 119152, 0, 74378, 65926, 7744,
- 194636, 74277, 74302, 78052, 43817, 6966, 43822, 8136, 0, 65600, 1633, 0,
- 0, 4762, 1103, 0, 0, 4765, 983492, 13078, 0, 4760, 63827, 2050, 10871,
- 43199, 1102, 0, 42236, 128867, 194667, 11546, 74794, 337, 0, 42591, 8627,
- 12279, 1111, 0, 92161, 4707, 68206, 10143, 7883, 127081, 7880, 4522,
- 8645, 5704, 13010, 0, 8304, 917561, 0, 119575, 2293, 0, 66654, 0, 92676,
- 0, 13008, 0, 4385, 0, 13011, 0, 92569, 119161, 13009, 160, 2677, 0, 0,
- 41793, 65763, 74221, 120141, 41792, 42770, 94054, 65762, 118829, 43821,
- 5709, 0, 94053, 43816, 0, 0, 1079, 3867, 5708, 0, 0, 43797, 5706, 64768,
- 5705, 8791, 4005, 0, 10237, 10991, 128816, 43459, 9173, 917581, 917580,
- 13170, 12540, 917577, 42605, 120765, 126617, 68647, 917572, 10058, 0,
- 74867, 194654, 127078, 3339, 11448, 1106, 917591, 917590, 917593, 3340,
- 917587, 917586, 917589, 917588, 120541, 10605, 1309, 63966, 120743, 1754,
- 92226, 13246, 864, 0, 118926, 8972, 0, 7849, 120092, 92533, 13240,
- 195068, 5192, 4338, 67982, 10948, 917601, 13199, 92575, 1236, 13208,
- 13261, 13189, 13188, 93993, 0, 7440, 0, 120153, 9553, 1590, 63777, 63776,
- 13178, 63782, 63781, 63780, 63779, 1583, 0, 13260, 4550, 0, 64205, 0, 0,
- 41522, 983915, 92168, 983772, 917858, 11354, 94071, 0, 42795, 0, 119195,
+ 73982, 120518, 83473, 195086, 43369, 983177, 128140, 68415, 77861, 4538,
+ 93978, 43141, 983769, 82976, 74214, 73886, 67709, 917599, 71918, 43005,
+ 71114, 9552, 0, 70129, 129173, 12997, 83477, 0, 128897, 195030, 2381,
+ 12883, 10994, 10529, 41906, 0, 74618, 0, 12425, 10661, 10856, 9614, 2428,
+ 41478, 8582, 10064, 73930, 82977, 70437, 121251, 64896, 119162, 1952,
+ 92181, 8455, 10082, 11575, 128450, 119566, 128093, 12808, 12183, 6145,
+ 75020, 64929, 74985, 71916, 74984, 43186, 42509, 0, 3922, 9187, 83277,
+ 83278, 10191, 83271, 11752, 3353, 9358, 983462, 71366, 66680, 120090,
+ 8248, 7931, 8558, 9795, 68380, 120047, 983056, 83470, 120081, 119052,
+ 41027, 120086, 71449, 120088, 7366, 7019, 70378, 0, 11751, 120078, 78294,
+ 64657, 8657, 83472, 8594, 120068, 0, 983789, 120069, 120072, 120071, 0,
+ 113711, 43154, 41029, 119956, 11332, 65380, 7728, 94077, 11294, 0, 66665,
+ 7851, 0, 8375, 8699, 127949, 42524, 68419, 9085, 94041, 7504, 9327, 6160,
+ 73842, 983864, 194929, 8088, 128937, 74012, 66562, 0, 4439, 6926, 72423,
+ 12924, 128227, 42369, 4350, 65491, 65145, 9041, 43559, 64577, 10826,
+ 127476, 11296, 983285, 983409, 0, 65825, 9577, 68199, 983393, 64670,
+ 983121, 78056, 6793, 11295, 70409, 78053, 73872, 78055, 119993, 10902, 0,
+ 0, 78070, 11200, 10472, 2995, 121438, 120138, 64682, 2371, 78069, 118893,
+ 259, 1009, 70405, 2402, 2333, 6440, 194741, 113757, 65125, 41244, 70407,
+ 13271, 9103, 2278, 983146, 194728, 129120, 0, 10219, 74968, 194740, 0,
+ 67718, 43178, 127070, 41261, 119362, 43640, 8613, 0, 94049, 6736, 83439,
+ 41492, 12005, 69927, 127068, 1890, 120056, 0, 83443, 0, 7293, 7991,
+ 74052, 10578, 121141, 78076, 128620, 67368, 69928, 71850, 78800, 92653,
+ 64445, 42668, 6635, 128308, 6164, 65170, 74936, 121182, 7676, 11664, 0,
+ 93025, 69707, 93022, 118812, 0, 71096, 128045, 9175, 11925, 78045, 9088,
+ 119145, 64545, 1396, 120664, 7546, 3847, 71088, 93037, 4985, 13288, 672,
+ 8098, 43196, 194746, 120723, 128126, 42655, 74043, 65072, 1577, 11772,
+ 13041, 5928, 4525, 10658, 65911, 1266, 10180, 194711, 128371, 12622,
+ 127234, 124948, 0, 121214, 127139, 13310, 773, 19933, 1539, 0, 74969,
+ 42731, 67972, 74970, 71066, 983200, 3051, 5862, 7823, 92478, 92746,
+ 120411, 3250, 43991, 69687, 66649, 9510, 66237, 983304, 0, 41066, 64673,
+ 917963, 92381, 128636, 3505, 8707, 74925, 6725, 120802, 121296, 75041,
+ 3471, 66391, 5479, 882, 6686, 119584, 11613, 120772, 42754, 74608,
+ 125029, 83433, 121237, 120845, 0, 83431, 3225, 917996, 4433, 41156,
+ 43973, 43173, 1443, 4381, 0, 983642, 10926, 11756, 11757, 64879, 121106,
+ 42654, 127848, 13227, 120320, 10021, 5160, 1387, 0, 92644, 41418, 128933,
+ 65914, 6721, 217, 917955, 917960, 121082, 10443, 10789, 41158, 119257,
+ 4274, 11143, 41483, 0, 41250, 128904, 42179, 128375, 5931, 11744, 11215,
+ 74446, 41252, 66682, 0, 119637, 41249, 1366, 64635, 65047, 12466, 983458,
+ 120813, 4397, 128037, 128336, 41296, 9545, 41291, 120893, 0, 41485, 3511,
+ 41282, 5923, 10400, 0, 120493, 760, 0, 12088, 5786, 68252, 42256, 119869,
+ 67145, 417, 41474, 119562, 41565, 74965, 5934, 74572, 66583, 74904,
+ 64877, 2284, 64481, 78614, 66013, 41956, 43455, 67240, 194656, 0, 0,
+ 42273, 5819, 0, 128056, 0, 119129, 983100, 65910, 127747, 10246, 120816,
+ 65785, 1237, 10274, 4552, 119576, 128287, 0, 1375, 66705, 43573, 65260,
+ 3329, 0, 42811, 10312, 69845, 120794, 7840, 0, 43630, 10252, 119242,
+ 128104, 43185, 0, 4396, 195051, 119880, 10769, 9676, 119041, 0, 9753,
+ 92762, 8944, 983164, 0, 10473, 983823, 120472, 6072, 43025, 10299,
+ 128436, 68845, 120608, 66326, 67412, 92952, 0, 43811, 9330, 120596, 7222,
+ 10283, 10315, 10379, 4996, 127902, 13281, 66517, 7865, 10087, 78343,
+ 74938, 43324, 0, 0, 7565, 66363, 12952, 64806, 43180, 74967, 7414, 77929,
+ 43982, 74288, 622, 74023, 885, 43405, 1602, 0, 983731, 852, 0, 12160,
+ 83491, 10212, 65435, 129092, 12071, 9609, 12156, 917983, 917984, 43586,
+ 11035, 10411, 917988, 10255, 6710, 10279, 4194, 10375, 43853, 128599,
+ 4315, 12644, 83490, 77937, 43639, 43343, 67408, 128945, 11501, 41177,
+ 121180, 128866, 43431, 127097, 92413, 8715, 0, 41179, 983358, 43313,
+ 120230, 41176, 128780, 994, 983045, 8452, 77973, 73966, 66890, 70812,
+ 5921, 0, 2597, 92423, 5922, 118903, 66873, 4186, 92531, 119967, 127105,
+ 6718, 127029, 4406, 74601, 8480, 9192, 9747, 121040, 4413, 92196, 42268,
+ 3198, 5924, 5920, 92469, 6921, 78081, 74007, 42869, 8418, 11681, 43169,
+ 10176, 0, 742, 74881, 2893, 10772, 65276, 5937, 1914, 2553, 11682, 6756,
+ 125104, 121126, 8363, 0, 2993, 7772, 3916, 4301, 120494, 1141, 42407,
+ 7417, 718, 7572, 973, 119599, 120718, 3235, 2415, 43164, 0, 8018, 42333,
+ 74756, 10675, 6937, 42486, 43381, 65390, 10067, 120849, 1202, 0, 983910,
+ 65863, 0, 68484, 94013, 78182, 64542, 3260, 73829, 65388, 9945, 8419,
+ 78042, 6738, 0, 43681, 69728, 2059, 92422, 0, 55237, 1431, 119194, 66565,
+ 10821, 0, 12804, 128076, 8229, 1235, 3307, 11472, 78089, 78184, 4544,
+ 71228, 917982, 129188, 1740, 78097, 8758, 985, 12872, 64511, 78094,
+ 12068, 78102, 71226, 10141, 74922, 63761, 8785, 4476, 65071, 63763,
+ 12655, 8907, 9147, 78106, 78103, 78104, 120898, 119572, 10665, 64616,
+ 41572, 127979, 127160, 983554, 41573, 83160, 3931, 120295, 74143, 83156,
+ 83157, 83158, 78460, 11982, 0, 83067, 128381, 92712, 64484, 119266,
+ 41167, 0, 41735, 94019, 717, 10754, 83168, 83169, 72413, 83163, 63767,
+ 83165, 1780, 6936, 0, 83161, 819, 10611, 9694, 126978, 71474, 0, 127871,
+ 129069, 8343, 8342, 8345, 8344, 6578, 7009, 7523, 6922, 8348, 8347, 7525,
+ 3346, 8339, 128165, 128208, 575, 268, 78111, 8563, 5754, 120343, 41541,
+ 65565, 8336, 5936, 7290, 78117, 8337, 8341, 308, 11388, 7522, 83151,
+ 78123, 65466, 11090, 6953, 0, 83375, 74973, 78132, 5926, 68250, 78130,
+ 78126, 78127, 78124, 78125, 9038, 7887, 43456, 7830, 11651, 13093, 64002,
+ 983559, 65742, 12874, 119597, 11590, 0, 74048, 67379, 8595, 9835, 917947,
+ 43703, 13097, 0, 64643, 13283, 12697, 74975, 12381, 3488, 5933, 10033,
+ 71101, 66241, 65570, 119154, 12297, 71212, 1955, 127970, 5349, 42538, 0,
+ 124932, 7411, 9462, 128150, 0, 128465, 43920, 42736, 121017, 5756,
+ 128324, 7638, 41642, 42764, 983717, 43109, 7637, 5752, 11213, 83481,
+ 73832, 128827, 83486, 128231, 78334, 917957, 7636, 65171, 9124, 983210,
+ 78892, 120798, 291, 0, 983221, 2027, 66230, 10080, 78136, 10403, 70869,
+ 4640, 64713, 10224, 120429, 11183, 120431, 120430, 0, 128351, 127489,
+ 127138, 0, 92499, 0, 119094, 74213, 7824, 0, 194648, 41274, 5778, 6302,
+ 121432, 0, 12680, 119130, 1417, 67242, 93041, 9452, 128153, 74393, 11552,
+ 0, 127855, 128217, 65391, 128614, 10172, 65453, 63789, 41264, 78658,
+ 6426, 4641, 9179, 64819, 55278, 41255, 42036, 41469, 41269, 120412,
+ 41267, 4646, 67759, 865, 42034, 78274, 78273, 4645, 42033, 78270, 127982,
+ 983172, 43948, 195100, 68840, 78674, 1659, 919, 42784, 1671, 127892,
+ 6069, 9219, 128558, 1661, 13120, 63784, 69819, 10140, 9713, 119143, 0,
+ 71462, 94050, 2306, 10485, 118943, 6068, 10612, 195099, 119567, 67705,
+ 92561, 41462, 120470, 195079, 5422, 128234, 983629, 128611, 83474, 10229,
+ 10635, 826, 83475, 195082, 127003, 195084, 71455, 6483, 92211, 1808,
+ 7848, 113788, 8100, 78227, 71198, 78670, 13301, 78667, 9667, 78665,
+ 67704, 983921, 11003, 9904, 83410, 983919, 120690, 9144, 10921, 92992,
+ 78680, 9840, 65131, 78678, 71092, 10313, 83408, 83500, 64320, 10265,
+ 67252, 10962, 66904, 43008, 8945, 78683, 120995, 41, 195072, 1792,
+ 120515, 195073, 8655, 68254, 92544, 77951, 12066, 67258, 385, 4152, 2585,
+ 127804, 119068, 3126, 917852, 73983, 10957, 127037, 11160, 119116,
+ 127873, 13157, 0, 128024, 3570, 129187, 7443, 118804, 44006, 6997, 68004,
+ 126631, 7879, 8739, 11075, 917971, 65216, 70196, 69795, 2593, 8463, 7810,
+ 128543, 7839, 92612, 78806, 75064, 9691, 4411, 78802, 121219, 120854,
+ 43442, 69851, 65254, 10066, 983889, 72419, 0, 0, 13061, 8016, 78687,
+ 19932, 64831, 0, 113684, 12390, 119171, 1634, 68115, 65070, 11056,
+ 983574, 119925, 983099, 41165, 11328, 12450, 983811, 41166, 0, 12456,
+ 119914, 171, 5941, 12452, 194709, 12458, 12531, 78779, 43013, 63800,
+ 74162, 119320, 120483, 9969, 120767, 12454, 63806, 42132, 12063, 78425,
+ 78424, 3230, 68773, 983497, 75025, 5209, 297, 5810, 8522, 8415, 119937,
+ 78429, 78428, 7077, 2497, 128651, 960, 74156, 6981, 92374, 12938, 4292,
+ 78893, 74815, 10512, 0, 74814, 78875, 127505, 78876, 2503, 73778, 1762,
+ 69794, 2495, 74911, 5844, 68031, 118838, 127947, 12654, 4663, 1899,
+ 78877, 2507, 64121, 8726, 65594, 92972, 0, 119000, 8892, 78872, 92339,
+ 71232, 983073, 5782, 420, 127348, 917871, 43796, 10797, 63794, 0, 128533,
+ 64814, 63796, 43861, 0, 66581, 119204, 41608, 128479, 121144, 63792,
+ 4659, 120788, 77971, 43676, 74944, 69673, 121029, 11129, 92929, 329,
+ 77968, 92707, 83496, 7399, 0, 41188, 13244, 67692, 42167, 7435, 78193,
+ 5380, 119086, 69225, 1155, 11365, 43126, 77972, 0, 65684, 0, 5601, 65192,
+ 42765, 63752, 0, 7987, 69676, 1172, 69799, 6786, 43601, 120476, 74126,
+ 5603, 0, 4473, 121085, 72426, 124947, 65347, 65346, 65345, 128548,
+ 119213, 5347, 69802, 917973, 73868, 70852, 10588, 0, 0, 63755, 128271,
+ 5343, 78422, 120661, 4555, 5341, 83459, 70071, 74916, 5351, 78675, 43104,
+ 65244, 121365, 64541, 42519, 68134, 128916, 126986, 74765, 128979,
+ 127510, 6638, 0, 65113, 271, 74180, 65370, 8835, 65368, 12653, 65366,
+ 42172, 41086, 65363, 65362, 65361, 11912, 43410, 11323, 65357, 11800,
+ 65355, 5345, 11103, 65352, 65351, 761, 65349, 19959, 69718, 63856,
+ 126635, 2423, 74518, 64647, 77959, 11957, 4699, 126573, 128670, 983787,
+ 0, 64605, 0, 68074, 983977, 4916, 128568, 380, 10958, 66563, 77955,
+ 69773, 9773, 13167, 12918, 41096, 73980, 69245, 78254, 83450, 10684, 0,
+ 125063, 92906, 7946, 12541, 8182, 67586, 69780, 0, 128207, 0, 983654,
+ 9005, 1225, 6630, 0, 0, 118854, 68011, 8847, 92371, 65876, 5535, 8329,
+ 74590, 125036, 92609, 0, 66874, 3127, 2595, 65713, 42013, 121211, 5607,
+ 41089, 128626, 0, 70292, 2665, 11304, 43751, 74200, 4970, 8764, 120459,
+ 8934, 92726, 41566, 4492, 67271, 65011, 41090, 0, 83417, 1188, 7254,
+ 1100, 0, 67270, 41081, 2912, 11749, 67282, 67281, 67280, 3572, 10023,
+ 4959, 13079, 0, 67275, 9729, 125110, 121042, 67278, 43361, 127355, 67276,
+ 11803, 7996, 9907, 41450, 13304, 83392, 83369, 41451, 83370, 11095, 8273,
+ 74322, 3451, 70291, 972, 41453, 68164, 119327, 73883, 68022, 73945,
+ 83363, 2288, 19955, 9538, 83366, 69807, 0, 129095, 0, 83381, 11396,
+ 83385, 11019, 0, 128416, 121205, 68020, 41078, 71365, 261, 5927, 7791,
+ 128681, 7362, 0, 10696, 70124, 6073, 9838, 118920, 0, 6075, 93995, 282,
+ 119178, 6437, 68830, 121459, 9801, 66399, 74177, 0, 917959, 3474, 67287,
+ 0, 67286, 6081, 83469, 78874, 67289, 67283, 83471, 70002, 42930, 0,
+ 93013, 8751, 11499, 67297, 7816, 12636, 4665, 12628, 4670, 67298, 120272,
+ 68017, 9642, 10912, 958, 67293, 11387, 67291, 4666, 70792, 4915, 67715,
+ 4669, 0, 68099, 13287, 4664, 10836, 120550, 75053, 69775, 0, 43595, 7450,
+ 0, 917875, 8664, 9697, 3606, 83446, 983978, 917874, 64815, 1063, 120250,
+ 67312, 9772, 7255, 8886, 1389, 127932, 120257, 120258, 120259, 12941,
+ 42661, 83438, 120255, 120256, 12301, 67836, 69820, 41102, 64428, 120262,
+ 66602, 120264, 1017, 66600, 523, 505, 1447, 74436, 0, 70340, 83437, 8608,
+ 42789, 120613, 83436, 0, 71906, 11307, 66707, 67301, 67300, 11745, 7919,
+ 67304, 1641, 0, 0, 8966, 128900, 74919, 5908, 71870, 67853, 6744, 67310,
+ 1699, 67308, 67307, 67314, 67313, 6306, 10169, 71324, 119251, 10068,
+ 3766, 2389, 67305, 120455, 6611, 257, 43170, 13153, 0, 42386, 983815,
+ 9436, 2599, 0, 6496, 9449, 5930, 11476, 11033, 11447, 10541, 5622,
+ 120436, 8477, 3760, 1718, 9442, 66433, 3776, 917837, 41435, 4352, 67324,
+ 2435, 71211, 5621, 120385, 4201, 3778, 4203, 4202, 4205, 4204, 120447,
+ 3768, 41774, 765, 41440, 3764, 8473, 6373, 8469, 120438, 12947, 4564,
+ 119049, 74623, 74271, 73753, 8374, 127201, 0, 6829, 5225, 66901, 127385,
+ 0, 0, 119615, 67319, 67318, 3162, 43507, 11771, 67322, 67321, 67320,
+ 42614, 5353, 5625, 74179, 67315, 0, 1010, 64572, 41780, 42623, 64277,
+ 69942, 6952, 67329, 67328, 67327, 2590, 5629, 65552, 7551, 10325, 5632,
+ 10471, 120038, 120027, 120028, 120025, 5628, 120031, 970, 120029, 4772,
+ 2400, 5627, 120017, 67330, 120023, 64275, 120021, 8786, 113693, 203,
+ 74365, 0, 0, 69985, 78350, 113703, 64378, 42054, 128575, 0, 554, 119649,
+ 11358, 71172, 12182, 42048, 11065, 125114, 73891, 83423, 83019, 5694,
+ 7689, 69798, 9323, 4325, 3047, 10317, 175, 120962, 93029, 69764, 0, 0,
+ 1243, 42154, 5431, 6652, 917561, 67753, 43651, 129129, 68118, 68093,
+ 1129, 126574, 0, 65900, 1986, 7846, 78804, 8661, 75058, 65255, 93992,
+ 3845, 4490, 118969, 6649, 74136, 1456, 7530, 11977, 7249, 8366, 0, 7756,
+ 12342, 120697, 51, 41516, 0, 8570, 9568, 71318, 456, 7026, 8145, 1168,
+ 9251, 9082, 119964, 64055, 42781, 3866, 12323, 41512, 73805, 68121,
+ 917850, 41494, 92316, 4660, 67114, 10405, 127195, 78803, 0, 129176,
+ 42040, 73918, 119627, 7944, 41454, 12605, 0, 42205, 41455, 236, 64051,
+ 78867, 8214, 83421, 113784, 120037, 41457, 983970, 119589, 1969, 2384,
+ 8097, 128019, 7413, 68012, 78029, 8766, 43864, 78079, 5854, 125000,
+ 10583, 0, 119989, 127556, 10416, 68070, 3872, 83424, 983839, 8429,
+ 121230, 118806, 2838, 6429, 0, 83426, 0, 128478, 0, 194620, 94005, 11096,
+ 83422, 10553, 1662, 8483, 120396, 43605, 5892, 43418, 67819, 73742, 66,
+ 65, 68, 67, 70, 69, 72, 71, 74, 73, 76, 75, 78, 77, 80, 79, 82, 81, 84,
+ 83, 86, 85, 88, 87, 90, 89, 119862, 10357, 7385, 8170, 1704, 8556,
+ 917975, 9659, 0, 0, 0, 9556, 0, 4503, 11353, 9647, 125015, 78185, 128959,
+ 0, 71437, 78886, 0, 0, 74229, 66593, 6438, 83364, 9109, 78882, 1289,
+ 64599, 118915, 68009, 128302, 65507, 2447, 119911, 128694, 128042,
+ 126545, 66589, 0, 6334, 128369, 0, 19937, 917793, 1322, 92359, 5675, 254,
+ 0, 0, 69686, 42425, 8918, 64003, 5716, 42312, 0, 194692, 6972, 42826,
+ 74409, 42464, 120567, 66899, 67155, 74796, 64400, 64693, 128805, 67687,
+ 65429, 9515, 4435, 0, 42522, 0, 68008, 11785, 7412, 43867, 41978, 1412,
+ 4594, 1391, 10536, 8067, 9901, 7103, 128293, 7102, 71428, 120748, 3140,
+ 127276, 7960, 43271, 121099, 12518, 10909, 127508, 1428, 12472, 67254,
+ 67253, 7699, 12393, 67257, 0, 67256, 67255, 8223, 0, 4261, 121460,
+ 120910, 74308, 983827, 113712, 67153, 983571, 128046, 43419, 983471,
+ 64554, 10574, 3878, 67691, 42352, 1752, 73785, 128171, 42506, 128541,
+ 10199, 917865, 125142, 68021, 65919, 0, 6695, 720, 324, 0, 129035, 43406,
+ 983736, 1464, 40985, 0, 7974, 0, 43474, 68082, 64488, 128977, 120951,
+ 64041, 74787, 0, 78865, 92258, 65597, 121416, 78863, 0, 1302, 66288,
+ 78861, 119134, 0, 67152, 5204, 74774, 43404, 11835, 120923, 3995, 68360,
+ 65608, 3714, 92190, 120026, 67262, 10999, 11750, 67259, 43251, 67264,
+ 43301, 0, 120557, 8130, 8672, 10845, 11964, 121268, 128014, 92173, 0,
+ 68455, 42863, 73839, 127529, 0, 67700, 917812, 113701, 43645, 468, 612,
+ 0, 64401, 66448, 68376, 0, 1674, 0, 5823, 128625, 12280, 70367, 540,
+ 74564, 119017, 66422, 8432, 78873, 11073, 0, 64316, 0, 121070, 820,
+ 41741, 983477, 120667, 124981, 64684, 126992, 3359, 7800, 69934, 65177,
+ 6226, 353, 12396, 121176, 119612, 64742, 128682, 78879, 983478, 127938,
+ 12412, 19941, 0, 120277, 70352, 1884, 9481, 42418, 70059, 41157, 983142,
+ 1195, 64898, 7924, 119870, 41151, 2010, 71430, 41328, 42344, 0, 12409, 0,
+ 4360, 121023, 9739, 128550, 69933, 73921, 917631, 42521, 8539, 128606, 0,
+ 118986, 127148, 4788, 121345, 68023, 65734, 983457, 43790, 120274, 13075,
+ 74429, 94063, 64569, 43532, 10837, 2492, 127197, 118901, 68637, 41136,
+ 43785, 11813, 9649, 41154, 113731, 5128, 4038, 41143, 65604, 64859,
+ 41592, 6771, 1648, 5435, 67295, 6734, 41343, 119848, 65439, 12709, 6986,
+ 92364, 68015, 120533, 41349, 70021, 12581, 10374, 5175, 0, 73806, 10254,
+ 113681, 10278, 10262, 69858, 41346, 120870, 607, 0, 68182, 128846, 12923,
+ 10314, 10282, 65477, 10378, 120297, 40976, 8265, 129149, 78639, 40975,
+ 5840, 42838, 74987, 40978, 121386, 92945, 128020, 119809, 0, 66444,
+ 10538, 120810, 2550, 119836, 6779, 129130, 0, 3525, 6824, 118886, 983582,
+ 0, 5619, 65822, 113751, 113738, 7455, 71424, 5616, 11486, 9656, 0, 0,
+ 10727, 5615, 120873, 120551, 42380, 64895, 43693, 66451, 808, 5455,
+ 11347, 0, 1026, 5620, 194887, 0, 11350, 5617, 0, 9225, 64639, 127073,
+ 9145, 128060, 1338, 120581, 983158, 12739, 4603, 3084, 70408, 92484,
+ 9858, 6037, 983465, 3974, 78213, 10290, 983704, 3083, 10322, 129048,
+ 129030, 75038, 41036, 66897, 0, 43321, 65606, 127071, 41032, 42388, 0,
+ 64700, 10011, 1445, 40961, 0, 119105, 0, 40960, 194907, 67727, 125106,
+ 2223, 64952, 10402, 128358, 125049, 92304, 10603, 0, 983403, 71438, 0,
+ 6714, 10083, 127069, 121019, 78367, 69976, 0, 43872, 9073, 42585, 64302,
+ 10704, 65030, 4787, 129031, 74829, 0, 65423, 121306, 128118, 9570, 55260,
+ 9525, 2689, 917626, 65426, 194872, 917624, 43740, 121163, 40966, 120009,
+ 13286, 3998, 42598, 42596, 503, 71433, 8735, 2690, 66488, 42836, 127150,
+ 41954, 917615, 1652, 772, 6688, 8310, 65428, 3487, 43416, 3585, 10194,
+ 43320, 119159, 73955, 92315, 6468, 41976, 9720, 74964, 11179, 41970,
+ 66255, 5836, 12358, 0, 4355, 9048, 12180, 65027, 64680, 13038, 43699, 0,
+ 41488, 128087, 8527, 194917, 12362, 12435, 12360, 41053, 3266, 0, 12356,
+ 8616, 41466, 42924, 2227, 11450, 983691, 3638, 12354, 67299, 3216, 83099,
+ 2358, 83092, 8633, 71201, 983745, 119182, 69244, 83090, 70375, 11759,
+ 194903, 6368, 74823, 67303, 41423, 8078, 10504, 83104, 41698, 42237,
+ 983454, 7002, 83101, 41430, 42267, 41051, 41484, 0, 71467, 41050, 41473,
+ 10466, 13099, 71445, 70371, 120897, 6435, 74331, 11362, 128973, 83088,
+ 65382, 92770, 41420, 83083, 3625, 74915, 41409, 71441, 69639, 2041, 9178,
+ 9672, 41427, 43541, 43317, 74924, 0, 128557, 41424, 917598, 120546, 0,
+ 128212, 0, 41417, 1261, 0, 0, 12102, 119662, 41401, 0, 127538, 0, 78251,
+ 124943, 42290, 3275, 92472, 42329, 68850, 74901, 0, 127951, 92388, 69649,
+ 10989, 74234, 113781, 10598, 7410, 2669, 903, 0, 2920, 0, 127232, 74603,
+ 64504, 19928, 0, 128411, 3917, 983119, 11732, 0, 983180, 41448, 41461,
+ 128823, 0, 113721, 113758, 8819, 12663, 0, 41184, 74014, 232, 74835,
+ 120646, 9168, 65786, 0, 83293, 121007, 9094, 983926, 11758, 68425, 71886,
+ 1064, 42467, 128044, 10115, 19924, 92711, 113682, 7862, 64551, 13224,
+ 8516, 41862, 66650, 7561, 78618, 69793, 1878, 0, 71434, 2911, 83074,
+ 41178, 5427, 64823, 83062, 83066, 3787, 41174, 83055, 41458, 67147,
+ 41463, 42413, 11292, 2406, 775, 0, 65584, 69923, 6074, 9618, 68056,
+ 121480, 43440, 74539, 194901, 41436, 3656, 917805, 120600, 41456, 67694,
+ 1599, 11333, 83139, 6703, 8513, 83134, 1613, 83136, 68456, 12598, 83131,
+ 83132, 78745, 74500, 41460, 10145, 10542, 9937, 78746, 67144, 9905,
+ 83145, 65730, 83147, 120374, 8427, 83142, 55246, 120376, 42895, 11497,
+ 64687, 74008, 42592, 3871, 983584, 128305, 9111, 5741, 83325, 120987,
+ 120366, 119111, 11150, 0, 120368, 128855, 11648, 83126, 83127, 83128,
+ 41587, 70391, 83123, 71108, 42113, 983588, 127155, 12172, 83121, 71443,
+ 65298, 65723, 68289, 73871, 65724, 7928, 120354, 983095, 41595, 73730,
+ 64671, 42118, 73830, 66042, 10355, 983110, 7875, 983669, 41598, 3993,
+ 121269, 1545, 40971, 536, 127075, 43029, 0, 121000, 65173, 65286, 0,
+ 70331, 195012, 0, 94065, 0, 41375, 5402, 83035, 128192, 1687, 120503,
+ 917817, 0, 78194, 64326, 40969, 10526, 73747, 8323, 40968, 1339, 11731,
+ 78756, 127108, 65460, 12242, 128513, 8020, 10843, 11554, 917867, 0, 8266,
+ 41006, 65722, 83041, 10710, 74045, 118942, 67667, 64567, 119155, 83313,
+ 128778, 71889, 67857, 120687, 0, 92958, 11755, 66305, 68332, 0, 10917,
+ 93979, 0, 11272, 2040, 41247, 41326, 195060, 1741, 42370, 1227, 83119,
+ 83120, 11413, 126583, 83115, 5283, 1586, 4978, 68050, 1984, 11830, 43819,
+ 92293, 40984, 42904, 9373, 0, 12916, 6284, 194888, 41663, 983093, 0,
+ 68313, 9237, 9385, 41648, 0, 128953, 2299, 41666, 1830, 73783, 2056,
+ 41287, 92610, 0, 71917, 42219, 68086, 120327, 41987, 41676, 983059,
+ 120823, 126553, 41670, 0, 92590, 2796, 55291, 11683, 9902, 74521, 67988,
+ 11451, 82995, 78855, 42631, 2359, 71890, 67844, 74164, 41238, 548, 11405,
+ 13133, 64368, 127270, 120925, 66272, 397, 43622, 42139, 9547, 9590,
+ 128238, 1614, 43661, 64356, 66307, 6651, 1358, 120871, 428, 9620, 1466,
+ 78112, 10982, 113785, 1333, 7104, 407, 6425, 128834, 74253, 127993, 0, 0,
+ 5804, 11976, 8554, 92721, 0, 70167, 9057, 42294, 41218, 125097, 121290,
+ 78137, 1883, 10952, 8048, 70443, 41225, 92621, 42915, 128616, 128512,
+ 128629, 4407, 74648, 65809, 11837, 194821, 8448, 7141, 74183, 120334,
+ 12675, 12659, 74634, 42363, 120624, 68077, 55273, 10766, 12012, 2386,
+ 64732, 9170, 917821, 9123, 64585, 10296, 119158, 7140, 10977, 127378,
+ 4164, 9081, 0, 120569, 42049, 42042, 8709, 128283, 126477, 120637, 42419,
+ 64799, 42047, 0, 194820, 8470, 11807, 65897, 577, 0, 983760, 74300, 0,
+ 68087, 74840, 126474, 0, 128791, 92224, 8736, 1414, 42643, 9683, 43486,
+ 74344, 0, 2536, 983941, 66330, 121238, 0, 0, 0, 0, 0, 194830, 66317,
+ 69945, 66315, 2106, 67809, 11273, 120986, 43004, 7541, 82988, 0, 961,
+ 64307, 66324, 64906, 125080, 3106, 65917, 41284, 1696, 983130, 891,
+ 12105, 0, 42624, 12802, 3264, 8824, 13268, 43003, 10936, 120878, 0, 0,
+ 194826, 92688, 3566, 2322, 120371, 70831, 11449, 128187, 42868, 41285,
+ 3547, 0, 0, 113746, 983400, 43216, 6089, 78682, 68490, 120578, 4170,
+ 1029, 127761, 127036, 119224, 42374, 0, 744, 92883, 113739, 0, 65823,
+ 127826, 11182, 3551, 92938, 983891, 4623, 55268, 128738, 4598, 983162,
+ 65136, 127136, 0, 128169, 10851, 120876, 6179, 92602, 6180, 0, 11952,
+ 74579, 78648, 11972, 78646, 78647, 78644, 78645, 177, 78643, 6176,
+ 120580, 983696, 125135, 6177, 9020, 78652, 78653, 6178, 120249, 120242,
+ 128027, 67673, 2214, 8754, 127051, 120237, 2137, 43081, 194663, 119114,
+ 9136, 66889, 4401, 41280, 70801, 8974, 2308, 194750, 74149, 128327, 2318,
+ 983183, 66361, 8198, 65626, 64360, 12601, 42536, 43931, 120827, 43930,
+ 92462, 6970, 5404, 43332, 3667, 7936, 12925, 126989, 6385, 128482,
+ 128403, 118949, 10874, 65505, 120002, 129151, 42053, 2075, 42057, 11083,
+ 42052, 0, 67266, 67651, 121104, 9665, 92300, 983666, 13181, 917617, 0, 0,
+ 70088, 74148, 0, 70419, 120225, 120229, 120224, 74172, 41145, 66404,
+ 94096, 74422, 41148, 8683, 7594, 113686, 75033, 119090, 10869, 43458,
+ 41146, 92407, 11441, 121456, 3512, 119633, 92965, 8103, 78140, 120847,
+ 65184, 11780, 41563, 42796, 129055, 69742, 41544, 65146, 71314, 0, 78109,
+ 129177, 19942, 983244, 118908, 7988, 10436, 74273, 3271, 73804, 64711, 0,
+ 94064, 983071, 128652, 3804, 13070, 11557, 42044, 0, 1095, 0, 3599,
+ 127774, 0, 128861, 8514, 0, 0, 0, 74346, 66697, 0, 11684, 0, 92486,
+ 917603, 0, 42043, 43232, 66677, 74927, 42046, 74157, 4036, 126481, 0,
+ 128213, 194861, 83355, 11954, 70348, 1450, 12986, 1340, 0, 65441, 92722,
+ 0, 0, 125117, 0, 917542, 73812, 83053, 6539, 92948, 126607, 120702,
+ 92390, 0, 120492, 41190, 3973, 119365, 4575, 41193, 7982, 429, 917979,
+ 78891, 0, 194848, 65792, 128408, 83282, 6417, 118918, 78178, 0, 128970,
+ 0, 0, 4919, 10590, 128556, 7755, 0, 92942, 64548, 120506, 1621, 10214,
+ 65126, 68253, 127004, 983616, 12188, 983668, 1617, 8050, 0, 5015, 0,
+ 119174, 42590, 70354, 1756, 78181, 0, 65768, 6352, 41892, 0, 7555, 13103,
+ 5408, 2817, 1214, 69919, 92335, 121208, 0, 68224, 120872, 41764, 7957,
+ 8689, 64723, 1056, 42896, 74147, 3559, 983918, 55286, 7073, 65850, 12327,
+ 70853, 119028, 0, 128122, 128442, 2341, 8450, 8484, 8474, 194884, 68322,
+ 70079, 8461, 67721, 12153, 12799, 0, 43709, 43708, 9451, 7571, 13073,
+ 43847, 0, 681, 983254, 703, 127518, 3272, 8781, 12894, 70077, 11709,
+ 92288, 70514, 983900, 83175, 71436, 11338, 120768, 3276, 128968, 917989,
+ 65928, 0, 121367, 65021, 64795, 74574, 0, 10047, 78814, 3262, 78811,
+ 42711, 0, 0, 68478, 163, 576, 9895, 1655, 70131, 74591, 78815, 78816,
+ 66888, 0, 0, 70513, 10039, 120426, 5626, 5623, 5717, 5776, 43488, 83497,
+ 66885, 41591, 11036, 65252, 92382, 0, 0, 120111, 67848, 128128, 983595,
+ 983472, 8887, 127521, 7295, 11031, 983336, 43157, 0, 8946, 10348, 10412,
+ 8755, 119152, 0, 5718, 13221, 0, 0, 78135, 70515, 917616, 8810, 74499,
+ 686, 0, 71362, 4619, 118954, 6654, 73769, 74426, 0, 12040, 65689, 10128,
+ 65118, 68029, 119151, 74205, 92651, 128902, 2401, 68144, 8792, 983648,
+ 68044, 65455, 0, 74328, 0, 74561, 120763, 12886, 120952, 66624, 126578,
+ 43557, 10300, 10161, 10396, 71210, 78602, 118945, 9984, 73851, 3010,
+ 6441, 70349, 1458, 41475, 72429, 93975, 127910, 11479, 121355, 120356,
+ 6350, 12864, 69674, 71473, 1061, 64780, 2001, 43111, 55230, 124946, 4052,
+ 113673, 7626, 0, 120907, 1045, 0, 5631, 41113, 127544, 0, 43707, 74127,
+ 0, 983718, 8486, 0, 73758, 2335, 4362, 983195, 126561, 69221, 1025,
+ 127277, 42625, 70325, 78084, 41443, 0, 128206, 0, 1774, 1523, 121330,
+ 68059, 41445, 78236, 11207, 8567, 41442, 3988, 74843, 78237, 118910, 0,
+ 65274, 8564, 78199, 78238, 127515, 121272, 0, 43446, 0, 66513, 6256,
+ 917807, 579, 55218, 10206, 78195, 6375, 2673, 983886, 11814, 0, 4488,
+ 128716, 120554, 68451, 10444, 118846, 127334, 11799, 74407, 68466, 4487,
+ 127849, 42832, 1032, 120267, 43450, 78257, 7203, 124998, 614, 70361,
+ 127215, 120615, 119622, 78262, 127271, 127323, 0, 43121, 127211, 128366,
+ 92513, 1050, 7549, 121260, 82994, 9314, 70365, 92898, 68039, 127061,
+ 10057, 70434, 127313, 128577, 66504, 120963, 82992, 2307, 128456, 64333,
+ 127312, 128230, 73873, 983710, 94035, 0, 127973, 128708, 70446, 10360,
+ 6746, 120473, 92245, 440, 0, 13085, 9233, 74216, 0, 127785, 9957, 128285,
+ 66447, 8046, 64963, 65777, 10125, 74212, 42819, 10910, 120424, 1521,
+ 9896, 93965, 10487, 69878, 12527, 68737, 7970, 125073, 128660, 0, 65769,
+ 5243, 9849, 5239, 65771, 121429, 0, 5237, 69714, 68756, 10103, 5247,
+ 4769, 129302, 118977, 12873, 2283, 92931, 0, 3008, 4896, 128102, 12087,
+ 0, 55231, 41103, 92256, 64565, 4773, 120846, 78549, 70074, 4770, 66891,
+ 917567, 8731, 65378, 66911, 120619, 9122, 128033, 126600, 4774, 3019,
+ 9997, 12834, 0, 9456, 10215, 120547, 0, 78556, 0, 121332, 74776, 4281,
+ 4768, 120572, 41535, 4099, 9017, 69993, 983692, 78095, 2225, 78096,
+ 118946, 121097, 0, 78098, 0, 42814, 880, 0, 113764, 66870, 2134, 0,
+ 10116, 9877, 92329, 128960, 0, 7095, 8379, 74116, 6778, 0, 78090, 8243,
+ 2427, 128141, 7093, 0, 11585, 195003, 9962, 82990, 12223, 128485, 92430,
+ 1434, 120254, 5637, 11573, 0, 0, 0, 19951, 83389, 74419, 0, 194686,
+ 55283, 0, 70363, 74437, 1156, 8740, 83295, 3782, 64331, 0, 41370, 1014,
+ 8261, 120956, 917596, 10835, 917966, 65536, 83294, 120463, 125051, 7702,
+ 118824, 128976, 43010, 65779, 65783, 1150, 10547, 5700, 0, 120603, 65383,
+ 2339, 42594, 5697, 118788, 75018, 128576, 74923, 42257, 5696, 92677,
+ 120465, 3862, 9643, 0, 70183, 7634, 65167, 9845, 0, 0, 5701, 9722, 41490,
+ 128719, 1426, 68217, 983614, 68447, 42204, 55270, 8571, 67403, 78067,
+ 43859, 78818, 92719, 43182, 12184, 0, 42022, 0, 10281, 0, 5650, 43194,
+ 64712, 10744, 78887, 990, 5647, 0, 7387, 78734, 41114, 11477, 5646,
+ 12879, 11018, 128362, 3945, 92589, 983466, 194989, 78883, 0, 78212,
+ 127746, 1020, 73763, 983835, 78731, 5648, 64748, 120920, 78733, 10205,
+ 3545, 983585, 6984, 128008, 74051, 128901, 43242, 120458, 2667, 128173,
+ 125037, 0, 9911, 0, 65020, 10097, 119166, 127145, 983662, 118836, 983748,
+ 78208, 1140, 78426, 0, 10159, 0, 0, 8128, 128644, 68326, 194911, 1815,
+ 19910, 890, 124935, 3267, 92291, 0, 10123, 121398, 4410, 1041, 10576,
+ 6354, 92581, 580, 74232, 983746, 128347, 0, 0, 128098, 19938, 65906,
+ 127819, 917811, 0, 3298, 5375, 10142, 0, 8215, 92633, 6134, 41246, 64402,
+ 983147, 69899, 194938, 0, 121426, 41382, 917927, 128653, 5173, 65348,
+ 527, 121174, 113782, 78469, 128250, 78797, 11915, 0, 0, 10072, 0, 42695,
+ 2329, 42250, 0, 11187, 69667, 12245, 1568, 94033, 83460, 0, 113705,
+ 917910, 11201, 92708, 74769, 126470, 67680, 9069, 6144, 0, 119840, 73822,
+ 0, 128010, 64917, 41521, 118934, 494, 13250, 92250, 65098, 6364, 956,
+ 113792, 12830, 10462, 73740, 73734, 0, 0, 983739, 66449, 13263, 74281,
+ 69217, 13171, 127796, 120564, 0, 63885, 127251, 1044, 41276, 128363, 0,
+ 0, 42068, 11795, 124985, 0, 127202, 0, 42450, 3907, 0, 64526, 11829,
+ 68197, 12295, 0, 11475, 70329, 3020, 11537, 0, 66441, 120761, 7098,
+ 125071, 0, 1057, 566, 42696, 127239, 3016, 42274, 43464, 66490, 12921,
+ 66571, 78472, 71207, 3006, 4620, 127237, 983330, 0, 0, 64659, 0, 127749,
+ 55253, 6357, 6362, 8626, 71337, 2216, 9090, 65377, 41596, 0, 42920, 1698,
+ 0, 64477, 917853, 43813, 1053, 0, 78269, 0, 92977, 1052, 1051, 459, 1060,
+ 74349, 66479, 67689, 66871, 917845, 70327, 42490, 689, 6508, 4163, 42298,
+ 8639, 66641, 4246, 0, 43514, 12130, 983308, 42337, 64596, 64375, 66481,
+ 127850, 983144, 127828, 6359, 0, 43471, 983768, 0, 83345, 75065, 0, 6358,
+ 6361, 1926, 6356, 92627, 7898, 8110, 10935, 0, 10069, 5830, 127773,
+ 43685, 74307, 0, 42910, 83301, 8693, 78611, 119565, 128621, 120413,
+ 92192, 121454, 65894, 194694, 0, 64296, 983681, 983644, 194959, 119187,
+ 2135, 11836, 0, 0, 78869, 42313, 5579, 92412, 70384, 129113, 43854,
+ 71913, 5578, 11840, 128115, 42023, 6234, 5669, 92275, 78620, 121171,
+ 68833, 92254, 68202, 5583, 0, 0, 42426, 5580, 42276, 2923, 892, 2220,
+ 42465, 41330, 194987, 5795, 65512, 68774, 65702, 68770, 120801, 65251,
+ 68228, 65710, 128399, 128429, 67672, 68783, 5370, 70465, 2931, 1638,
+ 10966, 10188, 65878, 118848, 0, 69694, 69879, 74585, 8172, 42017, 92756,
+ 10844, 121016, 128195, 92424, 6374, 119998, 121075, 286, 78023, 1062, 0,
+ 119999, 0, 7395, 127783, 1070, 64900, 7153, 6095, 41865, 194640, 3015,
+ 68743, 68740, 5211, 68805, 6400, 68749, 68748, 68760, 8189, 11276, 68754,
+ 70284, 372, 128829, 68761, 113783, 42102, 41585, 127751, 0, 42101, 276,
+ 78402, 67427, 33, 67425, 67424, 9007, 67430, 41588, 66033, 427, 10763,
+ 118819, 70872, 127884, 983943, 1031, 6257, 92489, 42104, 0, 983980, 2328,
+ 66837, 1071, 42899, 125088, 74848, 120857, 113793, 194981, 1047, 0,
+ 194943, 42908, 128480, 69723, 10651, 70356, 0, 125113, 72433, 66829,
+ 70817, 5711, 41633, 12098, 65571, 9166, 0, 5710, 128551, 6790, 65168,
+ 13216, 983150, 69716, 69726, 0, 64611, 41623, 195001, 5715, 69654, 71915,
+ 0, 5712, 2761, 41620, 68124, 3074, 5722, 0, 8643, 68525, 0, 118906, 2757,
+ 11067, 9718, 66419, 8910, 10689, 6479, 0, 0, 71173, 78607, 9196, 69670,
+ 125070, 0, 128338, 120335, 118911, 0, 94043, 129194, 0, 0, 120010, 73795,
+ 8701, 68130, 119616, 120522, 0, 42477, 194994, 12123, 4495, 43569, 0,
+ 129296, 0, 64946, 10992, 0, 74566, 70336, 113688, 9318, 93986, 13249,
+ 42902, 73808, 0, 65457, 42249, 7639, 43995, 67845, 42641, 5454, 0, 0,
+ 70366, 120005, 119585, 121212, 5084, 121189, 121134, 75062, 0, 733,
+ 74646, 78014, 68767, 78435, 11204, 0, 9218, 1731, 0, 92937, 71070, 67990,
+ 983125, 0, 0, 70323, 121371, 92492, 5155, 120000, 5358, 983744, 0,
+ 917767, 64424, 71236, 3840, 64314, 41432, 121316, 78315, 68430, 67980,
+ 43253, 65943, 0, 3371, 10988, 127960, 8771, 1479, 0, 0, 1109, 11580,
+ 43657, 64601, 12205, 92782, 0, 64507, 8868, 399, 67978, 74842, 983286,
+ 121336, 12149, 13088, 551, 0, 10156, 12119, 92572, 118916, 2544, 65074,
+ 119211, 983298, 0, 78011, 351, 68764, 0, 128713, 55229, 0, 74268, 78008,
+ 128094, 0, 42377, 0, 0, 0, 113767, 74320, 9013, 4054, 0, 194580, 113740,
+ 0, 73960, 5585, 65881, 2549, 74469, 74457, 11104, 5584, 8358, 126473,
+ 64215, 66864, 10919, 70480, 7980, 126601, 113698, 2218, 41800, 5589,
+ 82983, 2664, 41613, 5586, 118890, 0, 11356, 121120, 194833, 43452, 67245,
+ 92993, 42573, 66879, 83329, 67810, 69767, 78752, 74392, 8135, 6450,
+ 10055, 77996, 119948, 983173, 119225, 5657, 0, 9626, 121453, 77994,
+ 10179, 5654, 12939, 92573, 120799, 71860, 0, 5652, 10945, 194599, 66486,
+ 0, 3661, 7863, 0, 68069, 983675, 70332, 127194, 5659, 194606, 78692,
+ 66729, 5655, 983626, 42168, 121131, 1055, 71171, 71888, 66310, 74030,
+ 70516, 12146, 70362, 73956, 11618, 0, 42720, 92949, 10272, 10304, 10368,
+ 42518, 594, 10244, 10248, 7407, 74978, 64870, 74191, 3467, 71073, 7881,
+ 3331, 946, 10231, 1495, 8131, 74330, 0, 9562, 69222, 65927, 0, 70036,
+ 69696, 69769, 64656, 917995, 0, 92409, 70056, 5666, 65227, 5318, 63994,
+ 119596, 9091, 10798, 78664, 78508, 10186, 983265, 7732, 983724, 64556, 0,
+ 983979, 5668, 74445, 74982, 74645, 5670, 113795, 127297, 11820, 2992,
+ 7826, 5667, 19952, 120807, 74981, 12749, 74551, 67757, 0, 66496, 4361,
+ 119260, 1306, 9286, 1497, 128286, 94004, 70359, 0, 3571, 13247, 5874,
+ 7973, 66353, 68435, 78278, 67896, 43192, 74621, 78265, 553, 113768,
+ 127012, 93053, 5829, 0, 4587, 78285, 65912, 194919, 12746, 128671, 70338,
+ 119924, 5633, 119927, 74259, 94102, 94099, 64905, 94105, 9512, 94103,
+ 12742, 6443, 983806, 0, 9135, 128863, 41564, 121517, 55219, 128832,
+ 983851, 194877, 12148, 0, 78297, 0, 64256, 0, 11669, 0, 5634, 4524,
+ 128903, 124936, 128390, 83215, 2425, 65182, 128769, 43636, 5221, 78410,
+ 328, 121031, 68736, 69815, 5636, 119917, 5329, 121293, 5638, 83166, 7940,
+ 64938, 43223, 43760, 5635, 3373, 2986, 78292, 74223, 3437, 68763, 6203,
+ 4247, 71169, 11920, 8274, 68240, 983658, 1657, 41561, 68778, 78295, 5639,
+ 2954, 5660, 5640, 78303, 983685, 71179, 42227, 68301, 83322, 41637,
+ 67872, 121105, 78310, 41625, 43362, 78309, 120713, 11705, 5642, 0, 5486,
+ 0, 4356, 11710, 0, 12051, 69938, 0, 5641, 8259, 126994, 1058, 0, 67630,
+ 0, 128927, 1144, 78750, 127293, 42228, 983714, 73890, 118972, 127352,
+ 2800, 83209, 5645, 64964, 8652, 2547, 66484, 43634, 121356, 5608, 65890,
+ 43808, 194972, 67621, 64932, 9000, 71204, 67235, 92673, 1865, 128706,
+ 5613, 66401, 121145, 0, 5610, 983226, 71199, 65826, 2069, 0, 10787,
+ 43999, 2997, 119932, 5609, 78316, 65319, 78313, 12316, 5875, 2412, 83206,
+ 8186, 9807, 74269, 66294, 13130, 65874, 71855, 5807, 113678, 10030, 5306,
+ 12364, 118863, 92970, 11704, 83202, 92583, 10211, 0, 120579, 0, 121063,
+ 11706, 9710, 125022, 82985, 120655, 413, 65623, 7118, 83167, 9133, 74262,
+ 917964, 1042, 125068, 64779, 12171, 119240, 6185, 64776, 4984, 121266,
+ 708, 11391, 0, 12241, 92720, 83399, 1308, 121258, 2534, 810, 125089,
+ 120933, 128016, 71849, 71869, 1917, 3000, 125140, 120184, 120739, 2364,
+ 66387, 74470, 66618, 65680, 66411, 10027, 71841, 128154, 12337, 74283,
+ 127368, 983167, 2980, 755, 69774, 931, 13124, 68068, 6363, 2748, 121022,
+ 0, 65041, 92276, 44011, 8730, 194997, 127854, 78312, 7274, 119250, 92988,
+ 7275, 78304, 935, 127052, 65840, 377, 42325, 11649, 127363, 65253, 64301,
+ 128835, 78308, 42341, 65284, 2417, 0, 12884, 19912, 7907, 10768, 78300,
+ 194998, 194912, 10673, 68779, 7248, 68786, 43515, 1781, 5496, 3627, 62,
+ 1649, 67876, 964, 121034, 66403, 78226, 66393, 92897, 70355, 66409, 0,
+ 83398, 43689, 127911, 13142, 78812, 42415, 66575, 4542, 69909, 43547,
+ 83028, 0, 7677, 2991, 4946, 42454, 11565, 7949, 0, 69759, 11341, 42494,
+ 3073, 65625, 9714, 11692, 4657, 0, 70810, 6478, 9898, 43673, 65237, 6241,
+ 7106, 4877, 129108, 6238, 0, 10548, 127049, 4409, 0, 0, 64798, 70805,
+ 5346, 128240, 94047, 6237, 4874, 66851, 9176, 92882, 121153, 65231,
+ 65884, 12678, 78748, 118912, 11378, 44018, 42785, 2408, 3251, 11203,
+ 983159, 5685, 0, 2461, 11052, 7091, 5342, 8317, 121446, 68163, 5340,
+ 120559, 127820, 43635, 73928, 125001, 71069, 83318, 0, 83317, 65482,
+ 121394, 9142, 0, 68506, 0, 10938, 0, 118790, 1182, 2542, 4826, 0, 126648,
+ 72438, 529, 8580, 127490, 0, 10586, 10790, 10839, 66023, 41593, 41207,
+ 68744, 983825, 41594, 225, 42828, 0, 67821, 121200, 11376, 74379, 10721,
+ 67664, 3438, 42097, 68862, 11084, 3194, 41870, 266, 78305, 120183, 41873,
+ 120575, 11324, 120531, 0, 8420, 64918, 128839, 41871, 41338, 3734, 7734,
+ 43683, 8750, 66605, 66011, 92514, 40965, 127937, 983216, 5161, 10572,
+ 917558, 42906, 0, 64349, 7287, 42162, 120406, 983643, 126605, 11167,
+ 69220, 12359, 43429, 41369, 1697, 12191, 0, 68633, 7286, 0, 68635, 10031,
+ 113766, 9870, 67726, 8620, 65824, 917855, 11938, 121308, 7285, 983557,
+ 119577, 42678, 66842, 43677, 41583, 0, 65799, 92623, 0, 129168, 128267,
+ 78169, 66199, 0, 3609, 68624, 70280, 832, 120693, 120770, 78473, 66007,
+ 78471, 65703, 71256, 128517, 42732, 5180, 92699, 41395, 41530, 11691,
+ 64773, 92214, 74002, 127790, 120548, 128645, 6348, 243, 13200, 120160,
+ 6024, 92309, 9979, 10037, 41529, 10648, 8538, 43687, 0, 917844, 4285,
+ 66195, 121370, 4230, 92886, 7367, 43256, 92353, 7563, 42376, 983271,
+ 68442, 120512, 0, 0, 214, 128578, 0, 74856, 65893, 12208, 9973, 128386,
+ 66311, 65589, 128277, 2603, 0, 70155, 78622, 70047, 127273, 6022, 195023,
+ 2884, 0, 11620, 0, 43, 195020, 12682, 1016, 41107, 0, 41121, 3885, 92,
+ 65456, 64608, 0, 74801, 70855, 2074, 113742, 78283, 0, 12453, 70847,
+ 983826, 74241, 126568, 6791, 12457, 78268, 0, 66278, 0, 78279, 0, 0,
+ 92358, 66637, 7995, 8759, 43421, 78277, 12449, 128552, 71224, 43868,
+ 8752, 3197, 4720, 10165, 113765, 119249, 113715, 11595, 64893, 118905,
+ 43435, 124964, 125030, 4993, 0, 6168, 10934, 1946, 741, 120650, 5494,
+ 4639, 127559, 1990, 11107, 4498, 74169, 67736, 83273, 127272, 69734,
+ 2960, 73779, 0, 8969, 128117, 43424, 73959, 126464, 2950, 119579, 6210,
+ 65753, 370, 121360, 0, 0, 4953, 195009, 121054, 113708, 0, 69230, 0,
+ 195010, 65688, 74951, 5063, 3517, 2964, 43663, 917762, 6344, 74791,
+ 10566, 10144, 66333, 8252, 729, 66016, 78253, 0, 71317, 64923, 120571,
+ 43669, 9032, 78263, 78264, 0, 41215, 0, 65883, 0, 917774, 74914, 3761, 0,
+ 0, 70068, 120408, 12912, 119012, 3850, 128191, 983256, 128389, 0, 0, 908,
+ 0, 8611, 121384, 0, 74642, 43691, 41197, 0, 8978, 120540, 119135, 41586,
+ 10527, 70426, 917848, 3848, 78739, 74917, 127536, 65241, 5336, 74883,
+ 128786, 663, 0, 10780, 0, 0, 78767, 983259, 127163, 68193, 347, 0,
+ 917544, 78775, 64675, 41582, 78774, 78744, 65579, 12980, 68046, 12143,
+ 69657, 78512, 128493, 11153, 41804, 78523, 0, 78525, 0, 128859, 41584,
+ 10681, 0, 120979, 73938, 73781, 128022, 4800, 66661, 0, 66306, 64715,
+ 66384, 9518, 6609, 10434, 70845, 11319, 1097, 128964, 917564, 41730,
+ 129181, 121501, 73847, 74845, 65172, 41728, 41721, 194780, 194769,
+ 121499, 41203, 127056, 13110, 41726, 194856, 67077, 1000, 69651, 127509,
+ 41140, 1209, 73978, 125059, 73750, 1073, 6321, 77878, 41138, 983968,
+ 68213, 78000, 12167, 1115, 41605, 9794, 119904, 67671, 55248, 12237,
+ 78787, 66314, 6587, 9290, 78782, 78783, 9231, 78781, 2959, 7926, 0,
+ 917601, 128833, 64398, 71124, 119970, 12311, 119181, 78796, 68768, 78794,
+ 78795, 68434, 78793, 66670, 113797, 128579, 12290, 120169, 129093,
+ 119873, 42142, 9968, 8205, 0, 5131, 113694, 9627, 43646, 78542, 78535,
+ 983212, 1944, 1248, 10148, 127755, 119990, 119991, 12701, 78376, 11308,
+ 119995, 983493, 113702, 66836, 65305, 65100, 4031, 42794, 120003, 7075,
+ 8154, 119985, 120007, 41817, 73934, 42275, 120011, 120012, 78526, 120014,
+ 120015, 6041, 120520, 41899, 983288, 8002, 128367, 4364, 73732, 983570,
+ 64332, 120976, 7813, 9064, 119986, 10124, 7526, 8601, 7281, 68246, 7279,
+ 12041, 1418, 10885, 12673, 121152, 121381, 9660, 917929, 13012, 4571,
+ 917588, 0, 118940, 12078, 2970, 129122, 10933, 0, 77870, 121243, 77841,
+ 0, 41599, 70159, 121342, 120885, 12950, 92160, 3486, 983973, 78311, 4239,
+ 128073, 127799, 66511, 68066, 2637, 64629, 8460, 66834, 8476, 983975, 0,
+ 68312, 78489, 65673, 1019, 78495, 4148, 0, 12289, 0, 4316, 0, 13119,
+ 8488, 5412, 66243, 9935, 92777, 73864, 983203, 41734, 8206, 74081, 9163,
+ 3286, 9072, 5867, 13302, 7622, 7120, 41736, 92546, 41731, 0, 7400, 5416,
+ 68663, 118924, 10817, 0, 41539, 127284, 66853, 73963, 41855, 41867,
+ 65564, 11277, 65892, 11536, 10620, 92272, 7115, 66030, 73932, 5498,
+ 63876, 41536, 0, 68204, 92587, 3459, 8997, 194719, 92714, 0, 127782,
+ 92512, 0, 66377, 69781, 0, 124972, 78511, 3161, 295, 71257, 0, 92223,
+ 121328, 78742, 9016, 43454, 63903, 63902, 43501, 68210, 3971, 983959,
+ 70063, 2952, 78765, 11038, 10901, 63900, 63899, 63898, 68095, 667, 12332,
+ 63887, 6086, 41722, 0, 5172, 0, 983280, 4159, 983562, 0, 9815, 63884,
+ 19934, 63882, 41198, 8555, 63878, 63877, 42460, 6050, 42708, 63881,
+ 63872, 120941, 42421, 195035, 41723, 63875, 63874, 11460, 7432, 1913,
+ 41913, 63852, 66869, 128971, 42348, 73892, 6752, 446, 41911, 127901,
+ 63851, 63850, 41910, 128637, 63846, 2972, 12932, 7262, 69968, 63849,
+ 63848, 63847, 113749, 6570, 8302, 7259, 63842, 4178, 10746, 7250, 13214,
+ 10041, 8105, 63892, 127780, 69969, 1105, 4180, 127786, 12094, 9497, 0,
+ 63891, 63890, 63889, 63888, 5538, 9987, 0, 92739, 1678, 13274, 552,
+ 118834, 44010, 10785, 0, 11192, 4557, 74459, 9159, 10171, 13125, 63860,
+ 5540, 63858, 63865, 281, 13242, 63862, 74154, 0, 5536, 65568, 9574, 1388,
+ 71902, 0, 1077, 195000, 65099, 11531, 5834, 0, 0, 917789, 0, 42773,
+ 121331, 0, 0, 119220, 120912, 3663, 127027, 1112, 70335, 8686, 126611,
+ 5334, 65081, 43249, 74778, 127968, 11077, 125017, 6509, 0, 5327, 78776,
+ 19907, 63869, 3478, 7583, 7679, 2903, 0, 3001, 1158, 8745, 43746, 73748,
+ 63866, 78626, 1915, 4846, 67755, 66371, 118984, 42105, 2990, 120128, 805,
+ 69238, 64438, 12070, 8760, 1117, 113750, 12212, 120123, 65174, 42357,
+ 63835, 63834, 983947, 78240, 12225, 63838, 63837, 983853, 70173, 63833,
+ 6042, 66360, 8083, 128166, 983733, 63821, 63820, 63819, 63818, 983904,
+ 5227, 9047, 63822, 74797, 6091, 0, 10691, 560, 5643, 8226, 119578, 63812,
+ 63811, 63810, 63809, 2289, 63815, 63814, 63813, 6047, 1597, 120143, 780,
+ 206, 70126, 4936, 65147, 8168, 63930, 2076, 1093, 9882, 63934, 2082,
+ 63932, 75050, 63929, 3546, 1605, 77934, 9806, 43472, 77933, 8400, 11343,
+ 2086, 0, 63926, 2984, 5968, 9287, 0, 4618, 42209, 11137, 13169, 5290,
+ 2089, 1695, 10743, 1088, 63825, 7268, 1084, 1085, 63829, 1083, 10131,
+ 7283, 0, 63970, 121165, 1092, 4754, 7273, 5252, 44016, 43627, 127921,
+ 128920, 7408, 11809, 83220, 121181, 0, 2965, 7258, 8808, 66572, 1089,
+ 4187, 63937, 42119, 42120, 11106, 940, 5787, 10099, 63938, 0, 74494,
+ 12463, 2994, 125136, 118827, 68522, 9664, 70834, 77940, 67892, 77938,
+ 74343, 67370, 0, 660, 10127, 666, 9022, 5532, 43667, 5533, 12580, 78507,
+ 6118, 222, 979, 3884, 983394, 74151, 83227, 6502, 983855, 11085, 121261,
+ 63951, 12465, 917862, 0, 128782, 63946, 1707, 63924, 12461, 63950, 63897,
+ 63948, 63947, 63945, 6038, 63943, 63942, 64685, 63895, 65838, 2276, 7776,
+ 94076, 121086, 92464, 120444, 69730, 801, 43165, 1690, 63919, 63918,
+ 63917, 13277, 43659, 12951, 120638, 9906, 2054, 2334, 78515, 63916, 5483,
+ 63914, 69737, 63911, 5484, 63909, 63908, 2539, 120102, 43980, 5485, 0,
+ 42697, 9061, 5534, 10672, 4502, 68057, 253, 0, 68208, 120439, 9203,
+ 74231, 0, 11530, 68634, 68668, 121242, 11127, 0, 10474, 43426, 13257,
+ 42354, 128099, 983698, 70044, 195065, 0, 8413, 66841, 0, 5693, 7272, 0,
+ 13209, 64470, 65831, 74350, 195063, 0, 0, 0, 126639, 120097, 0, 94078,
+ 66840, 127165, 66608, 3111, 41863, 8804, 42913, 78347, 7270, 0, 66606,
+ 6628, 1076, 7433, 1436, 73844, 55226, 128353, 63982, 7393, 12807, 43413,
+ 63906, 1598, 63904, 71187, 70393, 41729, 4423, 1307, 113692, 10515,
+ 41589, 128698, 128918, 6218, 92917, 1430, 0, 126513, 120606, 78754, 5413,
+ 7619, 3255, 3493, 74032, 11549, 10735, 41743, 73937, 6801, 983633, 4518,
+ 10990, 65073, 5167, 4481, 3771, 67093, 2710, 983593, 66277, 41724, 67716,
+ 43073, 41690, 12479, 983635, 8380, 121071, 71852, 70046, 1628, 121229,
+ 128817, 129067, 65262, 6333, 10783, 11172, 121473, 63855, 70840, 113679,
+ 0, 5339, 74323, 120946, 13004, 66843, 4457, 0, 127756, 194818, 127116,
+ 5684, 8678, 10914, 43632, 5689, 65807, 70814, 68464, 12633, 12870, 69705,
+ 65183, 5688, 11926, 6033, 6310, 5686, 119076, 74251, 0, 120647, 128930,
+ 50, 10558, 9871, 42612, 43655, 74403, 983818, 74284, 66468, 66905, 13259,
+ 4448, 119150, 121406, 83349, 70043, 1321, 0, 10640, 11539, 1151, 121186,
+ 917607, 124958, 127079, 71106, 127852, 0, 0, 983075, 12501, 64604,
+ 128657, 11527, 118870, 8812, 983706, 11538, 8673, 12650, 11020, 0, 66467,
+ 2105, 8087, 78163, 69632, 9894, 127137, 127856, 69995, 4636, 55262,
+ 78513, 4515, 2382, 0, 127055, 983695, 113780, 0, 118968, 12277, 121239,
+ 11995, 92553, 121006, 12158, 70170, 8741, 10197, 68780, 92426, 121285,
+ 6531, 83051, 127846, 473, 43415, 92936, 983650, 1873, 1087, 124966, 0,
+ 74280, 78527, 66439, 43218, 983123, 194716, 7237, 12504, 71113, 126559,
+ 128748, 120887, 9489, 0, 70843, 4384, 74220, 63845, 2058, 69741, 13295,
+ 43191, 128030, 128571, 1154, 3857, 1205, 0, 0, 6055, 12958, 120706,
+ 74168, 128388, 70846, 4421, 10592, 0, 495, 66400, 41712, 7983, 70833,
+ 93997, 983332, 6347, 78715, 7654, 41710, 4196, 0, 437, 41709, 73772,
+ 70832, 0, 9465, 13290, 119180, 4997, 64306, 121309, 0, 4999, 194642,
+ 67401, 126582, 4711, 120769, 120602, 2739, 0, 8044, 74313, 194643, 41789,
+ 128142, 10809, 66279, 0, 0, 1779, 6600, 6601, 41543, 5325, 642, 64187,
+ 13058, 120449, 12875, 983804, 92186, 13229, 71845, 10575, 43399, 194577,
+ 0, 41791, 1104, 0, 983725, 10655, 983334, 983561, 120164, 0, 1082,
+ 121024, 8428, 6569, 0, 0, 78534, 69849, 6783, 194671, 12993, 8049, 41548,
+ 44021, 6458, 64728, 128882, 4761, 63828, 4766, 64623, 1273, 43407,
+ 120677, 118876, 195045, 6912, 1313, 6322, 10483, 128627, 41545, 126465,
+ 92449, 0, 11216, 121307, 0, 78624, 3484, 74337, 0, 0, 8503, 5122, 41527,
+ 71910, 66320, 70161, 74907, 0, 0, 41537, 66453, 8303, 8282, 11817, 73857,
+ 10003, 73859, 65904, 7363, 1686, 0, 70115, 11467, 3664, 65921, 64299,
+ 124939, 128462, 128001, 4324, 126, 42246, 75030, 69984, 67725, 65926,
+ 7744, 68859, 74277, 66283, 78052, 43817, 6966, 43822, 8136, 0, 65600,
+ 1633, 0, 126614, 4762, 1103, 70827, 70157, 4765, 983494, 13078, 0, 4760,
+ 63827, 2050, 10871, 43199, 1102, 194652, 42236, 128867, 127072, 11546,
+ 74794, 337, 121196, 42591, 8627, 12279, 1111, 0, 75047, 4707, 68206,
+ 10143, 7883, 121444, 7880, 4522, 8645, 5704, 13010, 69796, 8304, 92982,
+ 194688, 119575, 2293, 70195, 66654, 129077, 92676, 0, 13008, 121194,
+ 4385, 128736, 13011, 125004, 92569, 119161, 13009, 160, 2677, 70388,
+ 983282, 41793, 65763, 74221, 70790, 41792, 42770, 94054, 65762, 118829,
+ 43821, 5709, 128296, 71076, 43816, 983087, 983896, 1079, 3867, 5708, 0,
+ 0, 43797, 5706, 64768, 5705, 8791, 4005, 121091, 10237, 10991, 128816,
+ 43459, 9173, 917581, 917580, 13170, 12540, 129178, 42605, 120765, 126617,
+ 68647, 917572, 10058, 68058, 74867, 67730, 127078, 3339, 11448, 1106,
+ 917591, 917540, 917593, 3340, 74017, 917586, 120994, 129141, 120541,
+ 10605, 1309, 63966, 120743, 1754, 92226, 13246, 864, 983171, 118926,
+ 8972, 119918, 7849, 120092, 83130, 13240, 195068, 5192, 4338, 67982,
+ 10948, 66825, 13199, 92575, 1236, 13208, 13261, 13189, 13188, 93993,
+ 71847, 7440, 0, 120153, 9553, 1590, 63777, 63776, 13178, 63782, 63781,
+ 63780, 63779, 1583, 119923, 13260, 4550, 120598, 64205, 129107, 71071,
+ 41522, 41523, 68523, 983772, 118923, 11354, 94071, 0, 42795, 0, 119195,
11394, 194646, 13236, 13272, 13194, 1334, 69926, 4479, 1178, 65586,
- 120663, 66681, 119193, 4601, 0, 0, 983765, 0, 0, 194658, 0, 6809, 63786,
- 6031, 0, 63791, 63790, 1145, 63788, 7910, 63785, 43153, 754, 10192,
- 13105, 8183, 120741, 2037, 0, 0, 10747, 125, 0, 64890, 0, 983131, 0,
- 41719, 63758, 3523, 1074, 13258, 9536, 74077, 0, 4427, 74242, 63757,
- 43145, 12217, 63754, 41532, 1349, 63750, 63749, 0, 0, 0, 63753, 63802,
- 41084, 120622, 68133, 41930, 63805, 63804, 43632, 63801, 41082, 8140,
- 63798, 6260, 0, 0, 94074, 63793, 11988, 3898, 128241, 10201, 12238,
- 63795, 42194, 10367, 12521, 10431, 42114, 41932, 1068, 0, 12523, 12945,
- 983329, 42203, 7950, 10804, 63771, 42787, 4386, 12224, 6973, 2793, 12475,
- 0, 0, 63769, 9530, 983119, 12232, 13135, 8596, 5681, 63762, 4595, 63760,
- 792, 0, 64803, 0, 8742, 0, 11053, 128796, 63744, 128107, 0, 7588, 63748,
- 1693, 63746, 43204, 5055, 68426, 917853, 1090, 120679, 128356, 11665,
- 74133, 4558, 65685, 9523, 0, 0, 78681, 11513, 0, 6157, 63775, 63774,
- 63773, 13191, 12170, 3500, 3139, 0, 3170, 12485, 0, 10872, 78271, 13006,
- 64433, 0, 0, 941, 0, 0, 0, 65541, 11063, 0, 8228, 0, 42065, 0, 0, 94039,
- 0, 92455, 7386, 0, 64444, 0, 119863, 43603, 94075, 65397, 288, 0, 0, 0,
- 10025, 69915, 2918, 0, 65300, 119871, 9883, 64726, 2790, 65395, 3793, 0,
- 127829, 65393, 0, 74138, 0, 0, 0, 74139, 92712, 65394, 11548, 5270, 0,
- 65396, 0, 65813, 13256, 1282, 120771, 0, 0, 10888, 983604, 65242, 0,
- 3330, 0, 0, 983974, 0, 0, 74259, 3304, 42753, 0, 0, 0, 1627, 0, 0, 0,
- 5371, 13116, 0, 1826, 118794, 0, 43094, 70023, 43650, 94037, 0, 9035, 0,
- 0, 128005, 0, 92207, 68125, 0, 164, 0, 94067, 94000, 6958, 0, 43116, 0,
- 70019, 13245, 0, 0, 127376, 0, 70031, 127756, 12666, 13175, 13207,
- 120414, 66014, 120428, 7447, 5929, 0, 65509, 0, 7449, 11306, 0, 73920,
- 3180, 0, 63808, 9054, 971, 13062, 0, 0, 65195, 10164, 92252, 74428, 0,
- 78146, 92611, 0, 0, 0, 10045, 12882, 13275, 128161, 11057, 0, 13276, 0,
- 41525, 78150, 7271, 11444, 0, 0, 0, 12229, 41523, 0, 43411, 73751, 0,
- 64813, 0, 0, 10476, 3858, 0, 3932, 64958, 0, 0, 73989, 68192, 0, 69847,
- 369, 0, 41784, 0, 64163, 0, 0, 0, 65474, 4796, 12292, 126595, 65479, 0,
- 41781, 10486, 41480, 43002, 9899, 0, 0, 404, 12821, 3741, 0, 5788, 8092,
- 68212, 41222, 1831, 66020, 3982, 0, 4388, 0, 746, 120784, 0, 0, 12018,
- 65294, 0, 0, 0, 0, 4422, 4708, 3799, 74292, 119357, 0, 74430, 0, 11700,
- 4374, 0, 128179, 1364, 0, 8038, 0, 917597, 12868, 69814, 0, 6735, 73979,
- 13174, 73968, 13225, 0, 69808, 65835, 0, 2365, 7841, 0, 42855, 118856,
- 42866, 0, 0, 0, 66438, 41785, 12617, 64172, 13173, 4372, 119354, 0,
- 983568, 0, 0, 92402, 128062, 12965, 384, 64512, 10404, 10340, 119352,
- 1556, 5274, 13210, 120125, 10017, 9733, 41787, 983243, 126994, 41373,
- 78039, 12303, 0, 13232, 13233, 349, 4863, 41371, 11656, 0, 120703,
- 119883, 12861, 4398, 8543, 65618, 128018, 1096, 0, 0, 42688, 12441,
- 12355, 119348, 119347, 4318, 10452, 0, 8032, 13243, 13237, 12719, 126646,
- 119101, 0, 64884, 119872, 119345, 8597, 0, 0, 9864, 0, 120785, 119874,
- 94107, 13195, 41452, 64961, 7722, 0, 10459, 119878, 0, 119879, 66590,
- 128123, 41533, 66337, 0, 92184, 0, 4965, 43445, 917536, 73849, 0, 43638,
- 78537, 128287, 6261, 119342, 43147, 66570, 1957, 10420, 982, 2756, 13292,
- 13206, 128828, 0, 2925, 73809, 13056, 127559, 13212, 43238, 0, 13190,
- 13187, 92541, 13198, 118793, 0, 5242, 119179, 64476, 1694, 8216, 71369,
+ 68311, 66681, 119193, 4601, 0, 127885, 983765, 66828, 128972, 127839,
+ 74580, 6809, 63786, 6031, 67402, 63791, 63790, 1145, 63788, 7910, 63785,
+ 43153, 754, 10192, 13105, 8183, 120741, 2037, 0, 64710, 10747, 125,
+ 120803, 64890, 983064, 127376, 0, 41719, 63758, 3523, 1074, 13258, 9536,
+ 71056, 0, 4427, 74242, 63757, 43145, 12217, 63754, 41532, 1349, 63750,
+ 63749, 129025, 0, 127928, 63753, 63802, 41084, 120622, 68133, 41930,
+ 63805, 63804, 11140, 63801, 41082, 8140, 63798, 6260, 0, 128391, 94074,
+ 63793, 11988, 3898, 92246, 10201, 12238, 63795, 42194, 10367, 12521,
+ 10431, 42114, 41932, 1068, 0, 12523, 12945, 983331, 42203, 7950, 3124,
+ 63771, 42787, 4386, 11148, 6973, 2793, 12475, 129180, 75056, 63769, 9530,
+ 121248, 12232, 13135, 8596, 5681, 63762, 4595, 63760, 792, 113674, 64803,
+ 0, 8742, 195029, 11053, 128796, 63744, 128107, 128942, 7588, 63748, 1693,
+ 63746, 43204, 5055, 68426, 42063, 1090, 68803, 120778, 11665, 74133,
+ 4558, 65685, 9523, 983453, 63857, 71216, 11513, 0, 6157, 63775, 63774,
+ 63773, 13191, 12170, 3500, 3139, 68071, 3170, 12485, 43891, 10872, 43892,
+ 13006, 43933, 120074, 0, 941, 0, 129079, 120967, 65541, 11063, 0, 8228,
+ 0, 42065, 128368, 43889, 94039, 129299, 92455, 7386, 0, 64444, 70295,
+ 119863, 43603, 94075, 65397, 288, 83409, 0, 0, 10025, 69915, 2918, 66820,
+ 65300, 119871, 9883, 64726, 2790, 65395, 3793, 983620, 127829, 65393,
+ 120592, 74138, 83505, 92751, 75019, 74139, 78777, 65394, 11548, 5270,
+ 983238, 65396, 74998, 65813, 13256, 1282, 120771, 75012, 0, 10888,
+ 120934, 65242, 0, 3330, 0, 0, 68340, 0, 0, 71202, 3304, 42753, 92588,
+ 70298, 74643, 1627, 0, 127765, 194735, 5371, 13116, 0, 1826, 118794, 0,
+ 43094, 70023, 43650, 94037, 68317, 9035, 11141, 917977, 128005, 0, 92207,
+ 68125, 74898, 164, 68309, 94067, 94000, 6958, 0, 43116, 67719, 70019,
+ 13245, 0, 68808, 66818, 0, 70031, 11099, 12666, 13175, 13207, 120414,
+ 66014, 120428, 7447, 5929, 0, 65509, 129192, 7449, 11306, 0, 73920, 3180,
+ 125102, 63808, 9054, 971, 13062, 71090, 0, 65195, 10164, 92252, 74428,
+ 983321, 78146, 92611, 0, 70204, 0, 10045, 12882, 13275, 2303, 11057,
+ 917976, 13276, 125133, 41525, 78150, 7271, 11444, 126479, 127904, 121203,
+ 12229, 11680, 92956, 43411, 73751, 0, 64813, 195089, 0, 10476, 3858,
+ 64175, 3932, 64958, 120432, 983678, 73989, 68192, 0, 69847, 369, 74908,
+ 41784, 119175, 64163, 77997, 0, 92645, 65474, 4796, 12292, 126595, 65479,
+ 128631, 41781, 10486, 41480, 43002, 9899, 92608, 0, 404, 12821, 3741, 0,
+ 5788, 8092, 68212, 41222, 1831, 66020, 3982, 0, 4388, 194913, 746,
+ 118826, 74783, 0, 12018, 65294, 127545, 194925, 68835, 983488, 4422,
+ 4708, 3799, 74292, 119357, 121146, 74430, 0, 11700, 4374, 120377, 121151,
+ 1364, 0, 8038, 120883, 917597, 12868, 69814, 70425, 6735, 73979, 13174,
+ 73968, 13225, 194902, 69808, 65835, 0, 2365, 7841, 71476, 42855, 118856,
+ 42866, 0, 0, 127986, 66438, 41785, 12617, 64172, 13173, 4372, 119354,
+ 983920, 983568, 128871, 127821, 67685, 128062, 12965, 384, 64512, 10404,
+ 10340, 119352, 1556, 5274, 13210, 120125, 10017, 9733, 41787, 983245,
+ 121149, 41373, 68486, 12303, 128476, 13232, 13233, 349, 4863, 41371,
+ 11656, 0, 120703, 119883, 12861, 4398, 8543, 65618, 92737, 1096, 43852,
+ 121433, 42688, 12441, 12355, 119348, 119347, 4318, 10452, 92902, 8032,
+ 13243, 13237, 12719, 126646, 119101, 121156, 64884, 92909, 119345, 8597,
+ 71100, 129062, 9864, 0, 120785, 119874, 94107, 13195, 41452, 64961, 7722,
+ 0, 10459, 119878, 124949, 119879, 66590, 128123, 41533, 66337, 128663,
+ 92184, 0, 4965, 43445, 917536, 67856, 0, 43638, 78536, 121187, 6261,
+ 119342, 43147, 66570, 1957, 10420, 982, 2756, 13292, 13206, 125064,
+ 917795, 2925, 73809, 13056, 92914, 13212, 43238, 121396, 13190, 13187,
+ 92541, 13198, 118793, 121089, 5242, 119179, 64476, 1694, 8216, 71369,
6770, 43331, 0, 65620, 983728, 43544, 126466, 0, 41444, 65621, 69955,
9197, 5246, 119106, 13185, 9709, 120323, 120322, 12314, 65616, 5238,
- 119333, 0, 119337, 5236, 40979, 0, 74201, 8286, 128537, 3936, 119331,
- 11699, 41347, 127249, 13235, 8842, 41248, 0, 4379, 13239, 12692, 7969,
- 127266, 7219, 127250, 128251, 120509, 0, 66224, 734, 2979, 120303, 65619,
- 9872, 957, 64921, 1846, 66631, 41477, 119256, 120310, 74511, 41770, 1670,
- 6442, 120317, 42446, 5379, 120318, 41163, 74832, 120315, 120314, 11506,
- 0, 42841, 13267, 0, 0, 41775, 0, 7130, 41773, 0, 10663, 0, 0, 0, 6151,
- 12110, 42673, 65572, 65293, 65250, 13265, 13264, 64518, 0, 6100, 0,
- 92647, 5808, 65922, 0, 12967, 66041, 5612, 4583, 0, 0, 68097, 64575,
- 126637, 11965, 0, 68358, 0, 69789, 0, 92260, 68102, 9698, 7814, 74476,
- 119651, 128514, 0, 41921, 118858, 9756, 6985, 119258, 78490, 74219, 0, 0,
- 118997, 8012, 5674, 12353, 0, 12361, 5677, 5588, 0, 41925, 128124, 41920,
- 5673, 120534, 5676, 41923, 12694, 118978, 5672, 1294, 0, 78059, 0, 42511,
- 1727, 120725, 42436, 0, 0, 0, 74222, 8718, 3550, 736, 10268, 4505, 10316,
- 74090, 5826, 55232, 5813, 0, 120712, 5841, 5837, 55234, 0, 3105, 12829,
- 5838, 5796, 0, 119592, 5793, 0, 5866, 5797, 41011, 5865, 120091, 7956,
- 598, 0, 64649, 5806, 42398, 0, 9037, 5671, 120041, 983255, 0, 0, 128855,
- 0, 847, 128242, 9529, 0, 66657, 6980, 78483, 120035, 78484, 983491, 0,
- 120033, 78486, 0, 0, 120039, 42683, 0, 983055, 7114, 0, 0, 43190, 65463,
- 1554, 0, 42611, 42563, 0, 5651, 2929, 6792, 43201, 0, 19963, 5698, 0, 0,
- 0, 0, 5644, 10292, 65546, 69727, 68141, 8372, 0, 65116, 0, 120022, 10175,
- 10388, 42799, 94100, 41013, 10568, 0, 983618, 2869, 0, 41015, 194692,
- 2785, 4366, 0, 10954, 41802, 0, 42608, 78469, 9884, 4759, 0, 0, 10266,
- 41359, 1170, 43365, 69810, 73908, 1609, 902, 0, 63936, 128875, 11661,
- 8122, 5818, 0, 0, 3861, 9540, 11028, 2554, 5158, 5714, 2213, 0, 0, 807,
- 43079, 0, 78475, 976, 5511, 64553, 0, 42155, 0, 41356, 74110, 118801,
- 126614, 0, 8676, 983291, 0, 5582, 451, 63941, 5798, 9349, 42018, 127858,
- 0, 0, 43609, 5906, 120553, 1440, 0, 128853, 120016, 74283, 11005, 0,
- 66656, 66044, 0, 194698, 0, 0, 43393, 10094, 0, 11529, 10857, 120643,
- 66436, 6546, 93, 8102, 0, 68405, 0, 0, 8171, 0, 119097, 127064, 917543,
- 383, 7154, 41656, 92634, 94040, 0, 5187, 71296, 127277, 11286, 68620,
- 64217, 0, 5232, 0, 41009, 0, 41005, 0, 0, 983827, 8292, 195074, 4980,
- 8860, 73947, 10028, 65291, 7076, 13182, 194705, 0, 0, 10631, 66031, 7972,
- 0, 78785, 0, 7900, 0, 11309, 3806, 4198, 42725, 0, 67656, 9995, 0, 92552,
- 0, 12931, 0, 42684, 74285, 2088, 64213, 64366, 65156, 8814, 42238, 74771,
- 0, 0, 12836, 0, 0, 74342, 8593, 0, 0, 68445, 13255, 0, 0, 7464, 0, 65865,
- 0, 194650, 127144, 0, 9342, 120464, 0, 64516, 0, 78792, 10129, 41007,
- 74375, 0, 40995, 12209, 41012, 119136, 0, 0, 69724, 40992, 92264, 127153,
- 68653, 43558, 5522, 0, 61, 0, 74105, 3633, 983900, 65162, 41234, 12089,
- 78281, 9771, 983905, 13251, 128701, 0, 6262, 2784, 42743, 0, 8126, 66483,
- 0, 0, 441, 42621, 0, 0, 41002, 40999, 119623, 43266, 7108, 194779, 10890,
- 74481, 65834, 8324, 119103, 64417, 74817, 127465, 64737, 0, 983659, 8930,
- 66678, 74249, 1193, 10056, 1800, 13253, 13252, 7829, 0, 0, 7743, 0, 0,
- 77904, 92640, 77905, 9034, 6039, 0, 10075, 0, 41018, 65683, 10338, 66469,
- 0, 0, 0, 42815, 0, 41966, 0, 127471, 0, 11792, 43064, 41025, 911, 7539,
- 0, 0, 120339, 65159, 64390, 0, 0, 5520, 11662, 0, 65330, 42812, 0, 0,
- 12326, 983856, 0, 42808, 128337, 9348, 64901, 983861, 0, 0, 0, 0, 0,
- 917584, 43702, 983576, 5857, 65342, 92727, 119120, 120079, 8644, 0, 0, 0,
- 74296, 41909, 0, 120332, 2791, 69663, 1891, 69824, 0, 41907, 66647,
- 118939, 8761, 12942, 5748, 0, 10773, 0, 0, 8796, 78149, 6412, 2061, 8520,
- 13146, 127185, 63931, 0, 65902, 2882, 0, 0, 12843, 4520, 120345, 92459,
- 0, 983660, 0, 73860, 0, 0, 64345, 0, 9201, 128314, 194940, 0, 0, 43679,
- 917585, 65117, 92270, 0, 10427, 0, 3844, 120675, 9755, 1110, 6612, 12222,
- 0, 128789, 0, 0, 783, 194935, 0, 0, 983064, 194720, 65056, 3620, 41180,
- 68378, 4556, 0, 0, 194933, 74250, 0, 67657, 10510, 4382, 66482, 0, 0,
- 127527, 9177, 8902, 93958, 9839, 0, 12891, 983755, 983636, 63999, 2016,
- 41917, 9788, 63928, 0, 1862, 65800, 9155, 66623, 9786, 65082, 41919,
- 8579, 41914, 7981, 0, 66017, 4508, 64883, 92456, 92522, 127814, 0, 64592,
- 74276, 120080, 6784, 78788, 68181, 0, 0, 0, 127534, 12147, 9024, 66378,
- 66472, 983929, 64289, 65289, 78151, 66658, 194929, 64509, 78152, 0,
- 126505, 11051, 983296, 0, 11355, 65885, 0, 128310, 41214, 0, 12299, 0,
- 7500, 4506, 7773, 0, 0, 9963, 68649, 126609, 4040, 120570, 6167, 0,
- 63922, 6594, 983740, 0, 0, 3624, 43036, 0, 6387, 63990, 19947, 63988,
- 41955, 0, 63993, 10440, 9611, 65605, 6803, 0, 7738, 63986, 11446, 63984,
- 92641, 3435, 78164, 43814, 43810, 7029, 64258, 41292, 118898, 12748,
- 42742, 9517, 11518, 0, 78790, 0, 67993, 63956, 42458, 63954, 63953,
- 63960, 9591, 4516, 10217, 68370, 11469, 69697, 42306, 2723, 118947, 0, 0,
- 0, 0, 0, 11397, 2880, 0, 0, 2872, 0, 0, 3498, 4378, 917539, 4270, 0,
- 65551, 68205, 6633, 43387, 0, 5230, 0, 0, 0, 0, 0, 8161, 393, 12013, 0,
- 0, 126479, 415, 63964, 63963, 42345, 92310, 5183, 1877, 42498, 0, 2927,
- 0, 63961, 4472, 0, 0, 78159, 69699, 917936, 42340, 4756, 128078, 7081,
- 10730, 7691, 10331, 63830, 119625, 42922, 42103, 8628, 9813, 0, 42453,
- 1604, 9565, 10539, 69701, 65764, 41415, 65767, 0, 8457, 42301, 11372,
- 64873, 11992, 0, 0, 63980, 11801, 3622, 983124, 64336, 12017, 10463,
- 63981, 4967, 64189, 1966, 43628, 0, 983292, 0, 0, 63971, 4347, 4416,
- 42098, 11009, 10694, 63973, 402, 0, 13147, 128692, 42100, 64646, 13228,
- 0, 41875, 3515, 74252, 11805, 0, 11302, 6259, 43395, 0, 0, 194670, 0,
- 92351, 0, 74425, 11299, 1561, 0, 92359, 64942, 983559, 194733, 983686,
- 194732, 0, 74301, 0, 11280, 0, 69784, 74060, 0, 0, 119664, 5145, 12486,
- 65018, 66516, 5409, 127379, 194669, 7402, 5399, 9685, 74089, 7952, 5401,
- 0, 66616, 68421, 983919, 0, 5405, 127875, 64866, 0, 119583, 128345,
- 78784, 74248, 11330, 194723, 64690, 3254, 0, 0, 128207, 42390, 43678,
- 194725, 983909, 65077, 0, 6388, 3355, 9508, 9867, 5723, 11520, 5611, 0,
- 3377, 0, 0, 0, 0, 78228, 0, 983762, 42691, 917886, 127198, 74767, 0,
- 127075, 1379, 246, 0, 983761, 3788, 983106, 11041, 92549, 66304, 0, 0,
- 8917, 42403, 301, 0, 0, 0, 0, 0, 983697, 10656, 0, 65214, 119242, 42567,
- 92217, 13163, 983204, 120831, 74597, 3182, 0, 0, 0, 65034, 65889, 42169,
- 4755, 74244, 194621, 11443, 0, 66319, 74598, 608, 600, 0, 1219, 3934,
- 64206, 11483, 74510, 0, 74485, 42442, 65470, 983907, 64202, 13160, 7759,
- 42482, 485, 128006, 0, 9828, 0, 0, 42280, 0, 9351, 7778, 64379, 7496,
- 42431, 6916, 1208, 0, 119631, 11002, 42470, 0, 118946, 0, 0, 74041, 0,
- 70045, 43539, 5411, 42196, 0, 0, 0, 9150, 0, 42393, 13086, 1310, 194687,
- 9337, 12052, 10643, 55271, 983179, 12166, 2546, 194683, 213, 118852,
- 65611, 0, 0, 194756, 74310, 6554, 0, 11914, 5452, 0, 0, 0, 0, 0, 194681,
- 92560, 2713, 0, 9650, 43330, 0, 194675, 1406, 0, 0, 92659, 0, 68223,
- 4143, 194677, 0, 65748, 4141, 9682, 65287, 1508, 127013, 8779, 10569,
- 8725, 13299, 66638, 65750, 42263, 4145, 6380, 65751, 66613, 43994, 65738,
- 55250, 9185, 9550, 0, 43403, 0, 0, 0, 65736, 41951, 64816, 65756, 983205,
- 12955, 10596, 2888, 194645, 0, 0, 9657, 9019, 194766, 0, 2878, 5390, 0,
- 194961, 0, 68679, 43552, 7501, 6328, 0, 10429, 10365, 0, 0, 41946, 7503,
- 5235, 803, 68381, 0, 0, 8986, 126542, 10632, 11934, 11452, 1332, 0, 0,
- 126647, 0, 118887, 1791, 5191, 9288, 64822, 2892, 0, 43394, 555, 0, 0,
- 66646, 0, 119002, 13151, 74512, 7289, 74055, 64161, 8854, 64162, 5858,
- 41927, 10582, 0, 1784, 1361, 195047, 0, 7905, 0, 64868, 128813, 13158,
- 92166, 7211, 0, 9371, 73973, 917553, 6828, 1625, 92302, 0, 1342, 68440,
- 64171, 126704, 10903, 983494, 0, 0, 0, 0, 4482, 41606, 0, 128569, 983112,
- 0, 64381, 0, 0, 195090, 42245, 126467, 41972, 0, 444, 0, 9127, 66687,
- 66619, 126489, 78025, 0, 11349, 40991, 917570, 0, 119599, 120830, 0,
- 1197, 128282, 1149, 194970, 0, 0, 40990, 43765, 0, 3492, 0, 127942, 0, 0,
- 0, 12838, 983978, 19948, 0, 3099, 0, 0, 41087, 0, 0, 0, 119059, 12036,
- 41309, 0, 0, 8152, 0, 41550, 12227, 983613, 0, 12828, 127511, 0, 0,
- 120708, 0, 0, 10386, 119574, 0, 0, 92680, 983789, 68154, 0, 1743, 0, 0,
- 92239, 65186, 917571, 0, 9606, 0, 0, 64439, 0, 0, 92686, 0, 0, 194967, 0,
- 0, 3395, 9362, 10878, 0, 0, 78362, 64830, 0, 126557, 41091, 3426, 1344,
- 8870, 0, 0, 4735, 127017, 6119, 12822, 42699, 0, 983824, 74818, 1423, 0,
- 42637, 41080, 0, 12039, 10559, 0, 118892, 0, 9472, 0, 11929, 0, 7170,
- 9596, 6130, 128826, 43629, 11579, 78713, 0, 194740, 128691, 92185, 66699,
- 64440, 1004, 92584, 194737, 43234, 66008, 12627, 0, 68414, 0, 43619,
- 43303, 11300, 43304, 9686, 5890, 11776, 7558, 127158, 65627, 0, 10718,
- 13154, 3461, 9139, 0, 0, 0, 0, 65365, 73877, 65628, 78019, 120319, 0,
- 41708, 12860, 2641, 12069, 10838, 5403, 10352, 70085, 10061, 43237, 0,
- 5140, 209, 128847, 41704, 41056, 43078, 128125, 118809, 0, 10899, 65469,
- 92362, 0, 0, 2410, 993, 0, 120589, 120689, 78693, 0, 0, 7232, 0, 119253,
- 0, 7110, 74462, 2066, 10489, 42166, 43463, 10659, 3600, 0, 4224, 1336,
- 41518, 0, 0, 0, 0, 41139, 64820, 92538, 12966, 41134, 0, 0, 0, 0, 272,
- 4263, 8793, 0, 0, 41502, 0, 983, 12549, 0, 0, 1190, 4109, 1335, 841,
- 5888, 41358, 64863, 9544, 43481, 0, 194806, 70027, 2099, 5120, 2409,
- 7799, 0, 74424, 0, 0, 4731, 0, 66629, 0, 0, 1255, 4149, 9247, 0, 9913, 0,
- 0, 64914, 917787, 65101, 0, 11694, 92475, 11690, 5835, 127164, 66625,
- 10842, 41354, 42123, 43097, 11688, 66634, 1094, 194, 64692, 0, 8180, 0,
- 0, 9972, 73865, 4519, 6114, 10898, 43072, 0, 0, 93960, 983322, 126581,
- 10695, 0, 7540, 0, 881, 7857, 6067, 65164, 0, 0, 0, 13311, 68403, 41857,
- 64321, 8359, 0, 12689, 0, 194594, 0, 983312, 983881, 68183, 0, 983314,
- 1287, 5436, 0, 983317, 74142, 92328, 74152, 119078, 6051, 10497, 69668,
- 8985, 12109, 983323, 0, 127242, 0, 0, 3652, 10537, 0, 1276, 120440, 6549,
- 279, 73745, 0, 0, 0, 1489, 0, 0, 0, 3899, 1007, 42124, 983557, 42122,
- 92337, 92367, 0, 11985, 1345, 78600, 0, 0, 8956, 43083, 94057, 42138,
- 78610, 0, 12151, 78608, 78604, 78605, 6285, 78603, 78612, 78613, 65942,
- 492, 8685, 0, 983759, 0, 78622, 43712, 2582, 11470, 64538, 7444, 78615,
- 78616, 2297, 0, 73837, 119823, 2527, 119824, 197, 2799, 92594, 41944,
- 120276, 9933, 0, 66515, 767, 5524, 7028, 0, 0, 119827, 119817, 119828,
- 78633, 10896, 0, 1799, 120497, 6971, 74336, 128342, 0, 65340, 118979,
- 41551, 2434, 94018, 0, 120579, 0, 4631, 0, 0, 6407, 0, 6338, 43214, 0,
- 7570, 0, 3192, 0, 8414, 0, 93983, 0, 0, 0, 9164, 66612, 93959, 3171,
- 6623, 4961, 68396, 886, 55216, 8654, 78832, 9993, 74390, 64603, 70066,
- 69241, 9599, 78629, 43084, 78627, 78628, 78625, 2399, 69693, 8994, 10944,
- 41208, 983713, 41168, 8178, 0, 3367, 92334, 42510, 78641, 78636, 6804,
- 78634, 1947, 0, 0, 92681, 42759, 11068, 1705, 9331, 0, 74798, 9181,
- 65359, 0, 8017, 119831, 65096, 66720, 0, 43475, 0, 4909, 12126, 128673,
- 120696, 4904, 983333, 69650, 1365, 9253, 42757, 43436, 7462, 0, 0, 0, 0,
- 119587, 64415, 0, 0, 5398, 0, 127386, 93953, 0, 0, 119015, 0, 0, 9476, 0,
- 983777, 12763, 126603, 3629, 0, 13005, 0, 3628, 0, 0, 92502, 3469, 42107,
- 42116, 917578, 64809, 2928, 4905, 9853, 851, 9040, 0, 64665, 43086, 9114,
- 0, 42583, 9315, 4822, 4906, 3852, 2847, 119821, 3236, 11317, 1251, 7777,
- 41852, 11410, 10964, 0, 43222, 12646, 120269, 10259, 9865, 65821, 0,
- 6018, 92290, 0, 12276, 0, 68372, 0, 92259, 119244, 0, 983230, 10467, 0,
- 2443, 10918, 78217, 119825, 1001, 9241, 1927, 0, 0, 73987, 127885, 0, 0,
- 118828, 120271, 65678, 12867, 0, 8260, 77945, 7519, 11505, 12274, 8904,
- 518, 65857, 0, 128674, 13204, 4387, 857, 0, 65369, 0, 92336, 43125,
- 120592, 0, 0, 0, 0, 5136, 1968, 983041, 126627, 1337, 64967, 1629, 0,
- 796, 66506, 0, 74123, 12877, 120649, 42314, 43388, 0, 74403, 6120, 478,
- 65151, 68128, 128147, 43082, 6016, 0, 42284, 128507, 4276, 1206, 3619,
- 41638, 69691, 3843, 12011, 8853, 3361, 0, 490, 10715, 7578, 68384, 0,
- 65350, 10530, 12348, 8653, 74314, 42435, 6154, 9551, 65354, 78522, 784,
- 42397, 334, 0, 42416, 65356, 65273, 77987, 69666, 4442, 10364, 0, 778,
- 41626, 42455, 7989, 74063, 3227, 69907, 127275, 73983, 2915, 11502,
- 41022, 41702, 10309, 127035, 78320, 0, 6975, 0, 5415, 12176, 0, 74193,
- 3462, 65215, 42629, 78691, 73784, 0, 0, 9759, 0, 70057, 127254, 8114,
- 78698, 78697, 78696, 78695, 8710, 42495, 118956, 0, 4051, 10460, 43364,
- 118917, 1356, 12161, 42713, 128857, 127268, 1619, 9703, 43152, 42489,
- 42112, 127978, 1875, 10808, 42109, 120284, 41860, 64862, 13305, 64907,
- 5289, 13144, 128658, 0, 5575, 9675, 0, 5940, 226, 2649, 6336, 983277,
- 119830, 43236, 3382, 42449, 6498, 1658, 11936, 78232, 0, 11269, 10151,
- 73759, 43100, 69888, 65508, 0, 0, 0, 8935, 917985, 0, 0, 0, 616, 74753,
- 65178, 4684, 78701, 119653, 0, 126551, 0, 6048, 74460, 42110, 73965,
- 10870, 8557, 11054, 68664, 119049, 9681, 4475, 0, 41142, 2100, 0, 120731,
- 6035, 0, 7651, 10296, 64443, 0, 983295, 917987, 0, 118966, 74144, 40997,
- 0, 10392, 10328, 40998, 43462, 74488, 0, 9800, 8979, 0, 13307, 41000, 0,
- 119239, 6487, 3386, 0, 10344, 0, 65299, 5394, 43246, 78243, 10220, 66505,
- 41200, 128583, 4425, 0, 0, 0, 43074, 73799, 983200, 78147, 0, 12173,
- 78545, 0, 127011, 65338, 0, 0, 119582, 4474, 0, 43093, 128644, 1587, 0,
- 127372, 64475, 128098, 1369, 983672, 9959, 7927, 0, 4560, 0, 0, 92277,
- 983621, 64948, 4430, 74347, 42601, 4514, 66434, 93955, 8194, 65462,
- 10626, 10965, 0, 8893, 983301, 12542, 0, 65341, 0, 65829, 7925, 119822,
- 10475, 0, 0, 1352, 11069, 7707, 127560, 126486, 65279, 127102, 68207,
- 127100, 7099, 6040, 127097, 10071, 0, 9336, 43750, 0, 8899, 7798, 64474,
- 64259, 69873, 65188, 7820, 43018, 127082, 0, 7746, 1492, 78551, 10884,
- 77982, 0, 5127, 11285, 42501, 5495, 4273, 43095, 41426, 10849, 5730,
- 2999, 6342, 68636, 74304, 371, 64373, 6023, 169, 5497, 11708, 0, 0, 6323,
- 194684, 8224, 0, 8938, 6043, 12738, 0, 983076, 5321, 0, 194798, 0, 2589,
- 74332, 1689, 7802, 4683, 74318, 42704, 120296, 11905, 0, 0, 128516,
- 128163, 74513, 6049, 0, 4027, 834, 118962, 1803, 0, 1503, 0, 0, 71312,
- 5731, 1381, 2387, 0, 0, 8289, 64525, 65817, 2881, 43142, 0, 9601, 2879,
- 9668, 9766, 0, 5729, 917833, 74410, 6036, 64881, 4026, 9361, 127091,
- 2887, 0, 3526, 6298, 0, 77897, 120095, 78519, 0, 8572, 6021, 77896,
- 128288, 77895, 43155, 0, 119849, 3146, 10959, 9483, 0, 77893, 10981, 166,
- 917841, 8635, 983606, 10623, 408, 119058, 127507, 13298, 0, 7426, 41641,
- 12717, 0, 7607, 10639, 43396, 0, 0, 41643, 74134, 983054, 8713, 41640,
- 10221, 41645, 66712, 6645, 646, 66726, 66711, 42129, 93994, 77901, 3472,
- 8697, 0, 0, 983815, 0, 0, 0, 5809, 1950, 119356, 92432, 74572, 0, 42136,
- 0, 0, 0, 0, 3247, 119854, 65017, 983953, 68428, 66668, 0, 0, 10983, 0, 0,
- 0, 41567, 0, 0, 0, 194624, 119853, 0, 0, 8285, 0, 4509, 0, 66471, 12216,
- 0, 40988, 92592, 74809, 41727, 0, 42848, 2396, 917766, 0, 74018, 917538,
- 64940, 7027, 3886, 0, 42457, 119008, 0, 996, 68123, 94058, 4249, 0,
- 917594, 11707, 8222, 0, 7939, 92454, 92460, 127801, 917592, 128359, 8534,
- 127154, 40983, 0, 983240, 0, 7201, 12561, 0, 42371, 12558, 1540, 917549,
- 10052, 40982, 0, 0, 1488, 0, 0, 0, 917559, 0, 0, 1563, 128034, 9619,
- 983940, 0, 0, 127872, 71363, 5803, 7797, 6070, 10006, 0, 2922, 6082, 0,
- 65009, 983942, 12567, 128703, 0, 41412, 0, 0, 3607, 9200, 10046, 9612,
- 42153, 8218, 9485, 0, 2032, 78354, 0, 0, 0, 0, 0, 43085, 6057, 508,
- 93968, 128015, 67968, 0, 92405, 0, 0, 638, 6083, 119072, 0, 0, 2305,
- 78348, 68096, 0, 6056, 6659, 67969, 0, 6085, 0, 0, 3915, 41634, 0, 41639,
- 63912, 11941, 0, 4028, 1787, 42180, 43096, 43753, 3249, 1768, 93982,
- 12328, 501, 93985, 10601, 0, 583, 0, 41977, 0, 66004, 119350, 6505,
- 74010, 0, 13064, 55267, 120810, 6500, 5526, 65049, 0, 73764, 0, 92376,
- 12745, 9678, 0, 120587, 9869, 128815, 1771, 0, 8936, 0, 0, 4208, 78341,
- 78567, 78342, 0, 983456, 74101, 0, 11762, 0, 92422, 77997, 68010, 66475,
- 0, 5027, 78172, 128878, 0, 5069, 73862, 5028, 9897, 0, 73739, 5026,
- 983253, 68639, 6331, 10079, 8931, 0, 1415, 8866, 41901, 74790, 78138,
- 119361, 983564, 43106, 5029, 65309, 1580, 3598, 68424, 41070, 77903, 0,
- 3440, 78215, 1562, 128656, 127175, 119358, 1716, 983679, 10600, 917867,
- 620, 41001, 6028, 0, 42892, 0, 74822, 5024, 120829, 41003, 0, 5025,
- 69892, 983209, 0, 118885, 0, 65557, 0, 74541, 983587, 11599, 128209,
- 11602, 6243, 11574, 11581, 11597, 11598, 6253, 6105, 11584, 74195, 11569,
- 65275, 8906, 127096, 5755, 2636, 983227, 10815, 11619, 2301, 41540, 7815,
- 11616, 6979, 12080, 7721, 11604, 7869, 1592, 0, 42152, 78498, 41048,
- 917763, 829, 0, 92406, 19950, 0, 126482, 6616, 0, 118875, 10953, 391, 0,
- 69785, 482, 42296, 11588, 0, 43606, 0, 68397, 66370, 74506, 42335,
- 983188, 0, 0, 7538, 5315, 120644, 42491, 0, 42061, 128088, 4576, 0,
- 68417, 43809, 4277, 0, 4039, 64472, 42338, 368, 42058, 3960, 11043,
- 11337, 78209, 917820, 63989, 3958, 12132, 1849, 0, 9921, 42451, 4253,
- 41147, 42064, 11959, 42404, 41160, 0, 3618, 78338, 0, 43300, 5156, 92629,
- 0, 929, 6827, 42035, 42437, 1555, 0, 8691, 66435, 2215, 41662, 94010, 0,
- 0, 0, 93952, 4578, 64513, 41664, 983734, 42578, 128794, 41661, 78715,
- 43267, 9356, 0, 0, 0, 1286, 10166, 0, 0, 64707, 983127, 42476, 7730,
- 983859, 128522, 42483, 0, 0, 42324, 42291, 10020, 43359, 0, 6641, 525,
- 41627, 917923, 8763, 128304, 41628, 533, 11931, 65225, 8321, 42504,
- 42581, 0, 6915, 42310, 4377, 8559, 0, 74360, 0, 13193, 64350, 11666,
- 8679, 41924, 1576, 7735, 92398, 0, 73840, 983092, 11374, 78043, 10889,
- 43461, 7757, 42462, 120226, 10029, 66493, 2718, 4168, 73842, 13308,
- 120112, 0, 1179, 4440, 0, 77948, 363, 11015, 77947, 77944, 64296, 127090,
- 66692, 120826, 0, 66492, 6593, 64625, 41963, 92177, 119329, 0, 10013,
- 64434, 92520, 127095, 9492, 11782, 64382, 12833, 77830, 0, 1297, 41630,
- 630, 127094, 0, 120774, 92465, 1043, 43652, 66223, 10090, 0, 128664, 313,
- 917563, 41881, 0, 42311, 7445, 0, 5750, 10759, 9419, 55222, 9405, 11268,
- 42919, 9398, 8526, 9399, 9422, 0, 66495, 0, 0, 127239, 41718, 10707,
- 1603, 0, 119003, 0, 631, 77952, 69703, 13161, 65272, 0, 10546, 74210,
- 78101, 11600, 77961, 2797, 73821, 42427, 306, 714, 3058, 42381, 77962,
- 127080, 12351, 42395, 0, 11607, 0, 42282, 77971, 77967, 9157, 73765,
- 66364, 42433, 77964, 7603, 12803, 180, 42141, 0, 120612, 66494, 12674,
- 8244, 362, 92439, 0, 8037, 43777, 11535, 0, 74845, 5185, 7165, 5521,
- 10334, 2093, 71329, 10302, 128112, 10104, 1027, 5181, 0, 0, 10523, 1446,
- 42320, 41646, 991, 5189, 42472, 41647, 120105, 1722, 5581, 42898, 3405,
- 0, 194644, 5523, 0, 42620, 92447, 983819, 9549, 0, 10549, 55282, 9661,
- 43682, 0, 77910, 120026, 78708, 0, 77911, 0, 41991, 983893, 0, 7630,
- 9846, 7684, 10350, 0, 1174, 77981, 42733, 77978, 77980, 66485, 77977,
- 42277, 77974, 42456, 65667, 127037, 12330, 128272, 0, 42417, 42383,
- 66630, 41344, 6293, 0, 66252, 77984, 74443, 0, 10209, 8313, 4195, 74435,
- 1316, 66690, 120032, 6332, 64894, 0, 65871, 78060, 1736, 983684, 3901,
- 12228, 120151, 65200, 3383, 10446, 78841, 693, 9130, 314, 64149, 42420,
- 11949, 983669, 120152, 11026, 128788, 5332, 6940, 64154, 12635, 127007,
- 42706, 1751, 273, 8165, 13166, 120763, 78840, 71368, 12824, 0, 4528,
- 5320, 6301, 43662, 6133, 9339, 9463, 42346, 10922, 64560, 3757, 0, 0, 0,
- 65869, 73760, 2569, 0, 2326, 65740, 2565, 42459, 7596, 7921, 983868,
- 74095, 127981, 41848, 2567, 66006, 0, 4044, 92646, 0, 12233, 983871,
- 1023, 474, 0, 119818, 0, 0, 42487, 65556, 0, 127866, 42295, 0, 0, 71322,
- 92518, 9835, 66499, 0, 5417, 12275, 10895, 0, 274, 0, 1858, 0, 0, 55251,
- 10118, 3133, 128008, 73795, 0, 9610, 8068, 8197, 0, 699, 0, 41665, 5868,
- 0, 92695, 42182, 7581, 19940, 43668, 41667, 128057, 0, 1923, 65583,
- 65802, 93970, 64597, 43444, 119184, 92197, 0, 6464, 7036, 2996, 1937,
- 983751, 0, 41835, 4047, 41842, 0, 64107, 0, 0, 11017, 120601, 0, 293,
- 77966, 92169, 64791, 41827, 42466, 43422, 10579, 8560, 71350, 65413,
- 77963, 4803, 12964, 1739, 1941, 3900, 0, 1713, 77969, 0, 73957, 11407,
- 42441, 41971, 6297, 120098, 64105, 128080, 42481, 11716, 66473, 7179,
- 42289, 0, 64103, 969, 0, 9352, 0, 6165, 64100, 0, 6632, 73861, 42402,
- 74327, 7806, 0, 8914, 0, 0, 3183, 1435, 64876, 2969, 6046, 64441, 6208,
- 67849, 5746, 73749, 0, 64416, 42422, 0, 983046, 7082, 73775, 338, 5059,
- 194719, 0, 42328, 10767, 0, 8115, 0, 74758, 0, 8227, 2073, 1218, 917790,
- 0, 65848, 0, 0, 69863, 0, 126987, 4486, 0, 0, 0, 10925, 0, 0, 0, 983586,
- 42309, 10257, 65191, 10273, 0, 10305, 42461, 0, 42349, 8832, 78051,
- 64127, 10644, 42662, 78828, 42278, 74451, 126988, 69874, 7794, 0, 42429,
- 6377, 42316, 119026, 3669, 3968, 42468, 71319, 69658, 0, 65402, 119581,
- 0, 0, 64933, 0, 41960, 6699, 0, 0, 128354, 6823, 42391, 1588, 65400,
- 8409, 78223, 19967, 65398, 787, 71315, 917939, 127744, 6115, 2078, 41654,
- 42480, 0, 92650, 41655, 65401, 43975, 0, 0, 0, 644, 65500, 41657, 10778,
- 3659, 9533, 184, 1553, 13107, 65484, 69648, 10502, 74457, 0, 0, 41554, 0,
- 8220, 917943, 41557, 0, 0, 11070, 119221, 5157, 4020, 73858, 41555, 9514,
- 64818, 65103, 64641, 64303, 78131, 7520, 0, 74377, 11029, 66651, 983068,
- 0, 118930, 64527, 0, 7877, 73803, 983798, 127348, 120096, 74602, 9955,
- 119557, 4055, 42817, 0, 65212, 11715, 12190, 12319, 78630, 0, 78631,
- 9502, 65427, 0, 65424, 12607, 0, 9734, 65425, 0, 0, 127357, 78835, 92410,
- 10112, 10827, 0, 9866, 74527, 66675, 0, 8625, 64346, 11290, 10477, 0,
- 8636, 983927, 8315, 65444, 983793, 0, 74595, 6152, 0, 0, 6629, 127108,
- 120171, 0, 74589, 43993, 0, 69790, 64435, 0, 43690, 11046, 11490, 42730,
- 4485, 127107, 0, 64926, 0, 0, 0, 5869, 12437, 42728, 0, 7040, 3588, 0,
- 12825, 0, 0, 12725, 0, 127106, 78642, 223, 0, 69675, 120166, 42444, 0,
- 64499, 65245, 0, 1171, 0, 69717, 0, 1805, 8772, 43820, 0, 9930, 65247,
- 78619, 120111, 2338, 0, 118853, 0, 42676, 0, 64800, 65236, 67644, 68126,
- 1213, 0, 64075, 797, 64074, 8734, 4212, 127369, 64387, 4115, 0, 5005,
- 64070, 64073, 10679, 0, 77954, 9402, 64276, 426, 0, 0, 8251, 10136,
- 65436, 0, 2120, 43302, 1224, 0, 65576, 74192, 10701, 1764, 3101, 127815,
- 12858, 120159, 0, 11373, 6378, 127859, 120103, 8663, 9312, 41644, 4539,
- 2129, 0, 9222, 983738, 0, 4259, 9092, 74567, 41961, 0, 12724, 66357,
- 42331, 64935, 0, 0, 1293, 7947, 2132, 983767, 74593, 120308, 2454, 42717,
- 3613, 128837, 0, 0, 65888, 8816, 10978, 10840, 0, 10668, 0, 43087, 12595,
- 120304, 983114, 8822, 0, 1157, 64903, 8638, 0, 0, 0, 0, 69848, 8235,
- 120316, 4405, 10086, 120247, 0, 69216, 0, 65430, 71321, 6079, 6817,
- 10764, 127910, 64291, 128051, 998, 120312, 11062, 1317, 64327, 1558, 0,
- 1991, 7882, 42254, 0, 41700, 530, 0, 10428, 119335, 12002, 119336, 5742,
- 43076, 4692, 64630, 41823, 4007, 5004, 119334, 7896, 751, 6595, 6596,
- 120325, 66373, 0, 0, 64908, 92691, 6311, 0, 12004, 119192, 12049, 43108,
- 120326, 0, 41705, 92188, 6598, 0, 6599, 120334, 0, 42148, 118825, 66027,
- 0, 6597, 9412, 8340, 11824, 64745, 2281, 69904, 0, 1988, 5407, 67865,
- 2430, 41678, 0, 120243, 2336, 983903, 0, 78871, 120442, 983769, 1921,
- 10947, 19927, 0, 65406, 0, 19913, 4284, 13217, 0, 43789, 12841, 9229,
- 10956, 42285, 41674, 19964, 41679, 65084, 3521, 0, 5774, 8325, 0, 65403,
- 983089, 1854, 10794, 0, 67660, 69846, 0, 78359, 5280, 0, 4344, 12905,
+ 43825, 71085, 119337, 5236, 40979, 983140, 71874, 8286, 128537, 3936,
+ 119331, 11699, 41347, 69739, 13235, 8842, 41248, 0, 4379, 13239, 12692,
+ 7969, 127266, 7219, 71875, 128251, 120509, 92907, 66224, 734, 2979,
+ 120303, 65619, 9872, 957, 64921, 1846, 66631, 41477, 119256, 71192,
+ 74511, 41770, 1670, 6442, 120317, 42446, 5379, 120318, 41163, 74832,
+ 11136, 71876, 11506, 128395, 42841, 13267, 128421, 0, 41775, 0, 7130,
+ 41773, 0, 10663, 70130, 0, 983974, 6151, 12110, 42673, 65572, 65293,
+ 65250, 13265, 13264, 64518, 0, 6100, 127964, 92647, 5808, 65922, 67814,
+ 12967, 66041, 5612, 4583, 70004, 43386, 68097, 64575, 126637, 11965,
+ 194930, 68358, 71483, 69789, 42653, 83181, 68102, 9698, 7814, 71045,
+ 119651, 128514, 0, 41921, 118858, 9756, 6985, 66418, 66621, 74219, 66412,
+ 128822, 118997, 8012, 5674, 12353, 66421, 12361, 5677, 5588, 92348,
+ 41925, 128124, 41920, 5673, 83113, 5676, 41923, 12694, 118978, 5672,
+ 1294, 0, 78059, 983962, 42511, 1727, 120725, 42436, 121400, 121183, 0,
+ 74222, 8718, 3550, 736, 10268, 4505, 5873, 74090, 5826, 55232, 5813,
+ 129032, 92889, 5841, 5837, 55234, 194864, 3105, 12829, 5838, 5796, 0,
+ 119592, 5793, 0, 5866, 5797, 41011, 5865, 93009, 7956, 598, 0, 64649,
+ 5806, 42398, 0, 9037, 5671, 120041, 983257, 83478, 983929, 83184, 0, 847,
+ 128242, 9529, 83018, 66657, 6980, 78483, 43510, 78122, 92219, 0, 67411,
+ 78486, 83017, 127260, 120039, 42683, 71848, 983055, 7114, 126521, 0,
+ 43190, 65463, 1554, 0, 42611, 42563, 0, 5651, 2929, 6792, 43201, 75059,
+ 19963, 5698, 194768, 983272, 92933, 71887, 5644, 10292, 65546, 69727,
+ 68141, 8372, 0, 65116, 0, 70304, 10175, 10388, 42799, 94100, 41013,
+ 10568, 0, 983618, 2869, 917843, 41015, 74473, 2785, 4366, 0, 10954,
+ 41802, 983652, 42608, 78468, 9884, 4759, 73768, 120296, 10266, 41359,
+ 1170, 43365, 69810, 73908, 1609, 902, 92773, 63936, 83247, 11661, 8122,
+ 5818, 83245, 0, 3861, 9540, 11028, 2554, 5158, 5714, 2213, 983966, 0,
+ 807, 43079, 78092, 78475, 976, 5511, 64553, 120863, 42155, 983319, 41356,
+ 74110, 118801, 71043, 120080, 8676, 983293, 94002, 5582, 451, 63941,
+ 5798, 9349, 42018, 127858, 128521, 78681, 43609, 5906, 120553, 1440, 0,
+ 128853, 74933, 70342, 11005, 194699, 66656, 66044, 194636, 120079,
+ 128793, 0, 43393, 10094, 70164, 11529, 10857, 92944, 66436, 6546, 93,
+ 8102, 67323, 68405, 0, 194714, 8171, 118888, 119097, 82996, 917543, 383,
+ 7154, 41656, 43495, 94040, 67162, 5187, 71296, 71086, 11286, 68620,
+ 64217, 0, 5232, 0, 41009, 127377, 41005, 983810, 0, 128471, 8292, 125108,
+ 4980, 8860, 71054, 10028, 65291, 7076, 13182, 194705, 74912, 127974,
+ 10631, 11244, 7972, 68042, 78785, 0, 7900, 128590, 11309, 3806, 4198,
+ 42725, 0, 67656, 9995, 0, 92552, 0, 12931, 121110, 42684, 74285, 2088,
+ 64213, 64366, 65156, 8814, 42238, 74771, 127920, 194713, 12836, 0,
+ 113800, 74342, 8593, 0, 0, 68445, 13255, 121333, 128843, 7464, 0, 65865,
+ 0, 194650, 127144, 92395, 9342, 120464, 70376, 64516, 0, 78792, 10129,
+ 41007, 74375, 983701, 40995, 12209, 41012, 83501, 0, 83257, 69724, 40992,
+ 92264, 119136, 68653, 43558, 5522, 75026, 61, 120959, 74105, 3633,
+ 120082, 65162, 41234, 12089, 78281, 9771, 83281, 13251, 128701, 0, 6262,
+ 2784, 42743, 71078, 8126, 66483, 0, 0, 441, 42621, 0, 0, 41002, 40999,
+ 119623, 43266, 7108, 194779, 10890, 74481, 65834, 8324, 118944, 64417,
+ 74817, 127465, 64737, 74853, 983659, 8930, 66678, 67216, 1193, 10056,
+ 1800, 13253, 13252, 7829, 120992, 121175, 7743, 83502, 124996, 77904,
+ 77913, 77905, 9034, 6039, 129139, 10075, 0, 41018, 65683, 10338, 66469,
+ 0, 0, 194637, 42815, 92984, 41966, 0, 127471, 0, 11792, 43064, 41025,
+ 911, 7539, 0, 40963, 120339, 65159, 64390, 0, 983160, 5520, 11662,
+ 127473, 65330, 42812, 983215, 0, 12326, 71081, 194638, 42808, 128337,
+ 9348, 64901, 983861, 983892, 121050, 66839, 0, 0, 121004, 43702, 983148,
+ 5857, 65342, 92727, 119120, 83503, 8644, 121227, 83332, 11186, 74296,
+ 41909, 0, 66900, 2791, 69663, 1891, 69824, 66397, 41907, 66647, 118939,
+ 8761, 12942, 5748, 92713, 10773, 70868, 83174, 8796, 78149, 6412, 2061,
+ 8520, 13146, 127096, 63931, 83275, 65902, 2882, 83334, 0, 12843, 4520,
+ 120345, 92459, 0, 983660, 0, 73860, 83335, 0, 64345, 0, 9201, 128314,
+ 70871, 0, 917864, 43679, 121026, 65117, 92270, 0, 10427, 121506, 3844,
+ 6842, 9755, 1110, 6612, 12222, 93030, 128789, 983638, 92928, 783, 194935,
+ 92185, 127221, 73855, 68032, 65056, 3620, 41180, 68378, 4556, 67839,
+ 68480, 194933, 74250, 0, 67657, 10510, 4382, 66482, 67823, 0, 127527,
+ 9177, 8902, 93958, 9839, 120700, 12891, 983755, 983636, 63999, 2016,
+ 41917, 9788, 63928, 67696, 1862, 65800, 9155, 66623, 9786, 65082, 41919,
+ 8579, 41914, 7981, 0, 66017, 4508, 64883, 92456, 92522, 127814, 120834,
+ 64592, 74276, 67688, 6784, 78788, 68181, 0, 71218, 113821, 66366, 12147,
+ 9024, 66378, 66472, 124976, 64289, 65289, 78151, 66658, 71935, 64509,
+ 78152, 113697, 126505, 11051, 194928, 0, 11355, 65885, 121319, 127941,
+ 41214, 0, 12299, 0, 7500, 4506, 7773, 0, 0, 9963, 68649, 126609, 4040,
+ 120570, 6167, 74519, 63922, 6594, 983740, 0, 0, 3624, 43036, 129472,
+ 6387, 63990, 19947, 63988, 41955, 126990, 63993, 10440, 9611, 65605,
+ 6803, 120968, 7738, 63986, 11446, 63984, 92641, 3435, 78164, 43814,
+ 43810, 7029, 64258, 41292, 118898, 12748, 42742, 9517, 11518, 83292,
+ 78790, 983381, 67993, 63956, 42458, 63954, 63953, 63960, 9591, 4516,
+ 10217, 68370, 11469, 69697, 42306, 2723, 118947, 0, 92325, 0, 68079,
+ 121344, 11397, 2880, 70806, 917829, 2872, 0, 83321, 3498, 4378, 917539,
+ 4270, 0, 65551, 68205, 6633, 43387, 0, 5230, 194991, 0, 983040, 194910,
+ 121392, 8161, 393, 12013, 0, 983198, 119103, 415, 63964, 63963, 42345,
+ 92310, 5183, 1877, 42498, 0, 2927, 71058, 63961, 4472, 983299, 0, 78159,
+ 69699, 127301, 42340, 4756, 128078, 7081, 10730, 7691, 10331, 63830,
+ 119625, 42922, 42103, 8628, 9813, 78654, 42453, 1604, 9565, 10539, 69701,
+ 65764, 41415, 65767, 129196, 8457, 42301, 11372, 64873, 11992, 0, 0,
+ 63980, 11801, 3622, 195092, 64336, 12017, 10463, 63981, 4967, 64189,
+ 1966, 43628, 983908, 983294, 83267, 121052, 63971, 4347, 4416, 42098,
+ 11009, 10694, 63973, 402, 92213, 13147, 128692, 42100, 64646, 13228, 0,
+ 41875, 3515, 74252, 11805, 983157, 11302, 6259, 43395, 0, 83323, 194670,
+ 120836, 92351, 74813, 74425, 11299, 1561, 118881, 92318, 64942, 93021,
+ 194733, 70411, 78718, 121140, 74301, 68825, 11280, 128489, 69784, 74060,
+ 128392, 0, 119664, 5145, 12486, 65018, 66516, 5409, 127379, 124988, 7402,
+ 5399, 9685, 74089, 7952, 5401, 0, 66616, 66832, 92966, 120852, 5405,
+ 127875, 64866, 120965, 119583, 119122, 78784, 74248, 11330, 194723,
+ 64690, 3254, 983166, 128944, 92696, 42390, 43678, 194725, 129127, 65077,
+ 129059, 6388, 3355, 9508, 9867, 5723, 11520, 5611, 83021, 3377, 0, 0,
+ 74354, 194578, 78228, 983722, 983762, 42691, 127886, 120948, 68091,
+ 128404, 75023, 1379, 246, 74649, 983761, 3788, 92520, 11041, 67202,
+ 66304, 0, 121213, 8917, 42403, 301, 0, 128500, 127046, 0, 0, 113822,
+ 10656, 125042, 65214, 92987, 42567, 92217, 13163, 983204, 120831, 74597,
+ 3182, 0, 0, 0, 65034, 65889, 42169, 4755, 74244, 194574, 11443, 983603,
+ 66319, 6841, 608, 600, 0, 1219, 3934, 64206, 11483, 74510, 119117, 74485,
+ 42442, 65470, 983907, 64202, 13160, 7759, 42482, 485, 69982, 70505, 9828,
+ 0, 43505, 42280, 0, 9351, 7778, 64379, 7496, 42431, 6916, 1208, 0,
+ 119631, 11002, 42470, 0, 68315, 0, 0, 74041, 83144, 70045, 43539, 5411,
+ 42196, 0, 0, 0, 9150, 66831, 42393, 13086, 1310, 66848, 9337, 12052,
+ 10643, 55271, 128951, 12166, 2546, 194683, 213, 118852, 65611, 83316,
+ 194822, 194756, 74310, 6554, 94059, 11914, 5452, 0, 0, 92772, 0, 917880,
+ 194681, 92560, 2713, 119564, 9650, 43330, 121033, 128505, 1406, 125007,
+ 42925, 74638, 194593, 66256, 4143, 128136, 194762, 65748, 4141, 9682,
+ 65287, 1508, 127013, 8779, 10569, 8725, 13299, 66638, 65750, 42263, 4145,
+ 6380, 65751, 66613, 43994, 65738, 55250, 9185, 9550, 42932, 43403, 0, 0,
+ 194783, 65736, 41951, 64816, 65756, 983205, 12955, 10596, 2888, 83190, 0,
+ 121354, 9657, 9019, 121154, 0, 2878, 5390, 0, 194961, 67325, 68679,
+ 43552, 7501, 6328, 194960, 10429, 10365, 0, 0, 41946, 7503, 5235, 803,
+ 68381, 0, 0, 8986, 43838, 10632, 11934, 11452, 1332, 0, 194970, 126647,
+ 0, 118887, 1791, 5191, 9288, 64822, 2892, 83192, 43394, 555, 0, 0, 66646,
+ 128980, 119002, 13151, 74512, 7289, 74055, 64161, 8854, 64162, 5858,
+ 41927, 10582, 120457, 1784, 1361, 120921, 121516, 7905, 0, 64868, 128813,
+ 13158, 92166, 7211, 71884, 9371, 73973, 128441, 6828, 1625, 7664, 128768,
+ 1342, 68440, 64171, 92642, 10903, 983496, 0, 92527, 0, 70438, 4482,
+ 41606, 128934, 125033, 121475, 0, 64381, 983940, 194974, 195090, 42245,
+ 126467, 41972, 0, 444, 983439, 9127, 66687, 66619, 126489, 78025, 0,
+ 11349, 40991, 917570, 0, 70177, 120830, 0, 1197, 128282, 1149, 68316, 0,
+ 983258, 40990, 43765, 121262, 3492, 917906, 118784, 129026, 0, 983566,
+ 12838, 67208, 19948, 41677, 3099, 0, 0, 41087, 0, 0, 983261, 119059,
+ 12036, 41309, 128161, 0, 8152, 0, 41550, 12227, 983613, 0, 12828, 127511,
+ 75015, 120964, 120708, 0, 0, 10386, 75068, 119955, 127303, 92680, 983134,
+ 68154, 127876, 1743, 0, 0, 92239, 65186, 917571, 0, 9606, 0, 70052,
+ 64439, 128864, 68062, 92686, 983875, 0, 43866, 128881, 0, 3395, 9362,
+ 10878, 43260, 0, 78362, 64830, 0, 125046, 41091, 3426, 1344, 8870,
+ 121100, 71344, 4735, 11111, 6119, 12822, 42699, 0, 983824, 74818, 1423,
+ 128923, 42637, 41080, 0, 12039, 10559, 128634, 118892, 0, 9472, 67734,
+ 11929, 126557, 7170, 9596, 6130, 128826, 43629, 11579, 71475, 0, 92501,
+ 125081, 78046, 66699, 64440, 1004, 92584, 194736, 43234, 66008, 12627, 0,
+ 68414, 74614, 43619, 43303, 11300, 43304, 9686, 5890, 11776, 7558, 70109,
+ 65627, 0, 10718, 13154, 3461, 9139, 0, 983094, 0, 119023, 65365, 73877,
+ 65628, 78019, 119272, 83118, 41708, 12860, 2641, 12069, 10838, 5403,
+ 10352, 70085, 10061, 43237, 125057, 5140, 209, 128847, 41704, 41056,
+ 43078, 127789, 118809, 67232, 10899, 65469, 70125, 0, 0, 2410, 993,
+ 83117, 120589, 120689, 78693, 0, 0, 7232, 0, 119253, 124963, 7110, 74462,
+ 2066, 10489, 42166, 43463, 10659, 3600, 68863, 4224, 1336, 41518, 121311,
+ 0, 0, 0, 41139, 64820, 92538, 12966, 41134, 0, 0, 119153, 120441, 272,
+ 4263, 8793, 983856, 0, 41502, 128133, 983, 12549, 124940, 0, 1190, 4109,
+ 1335, 841, 5888, 41358, 64863, 9544, 43481, 0, 120926, 70027, 2099, 5120,
+ 2409, 7799, 0, 74424, 0, 121041, 4731, 92279, 66629, 128127, 92525, 1255,
+ 4149, 9247, 74977, 9913, 983828, 121101, 64914, 917787, 65101, 113714,
+ 11694, 92475, 11690, 5835, 127164, 66625, 10842, 41354, 42123, 43097,
+ 11688, 66634, 1094, 194, 64692, 917900, 8180, 125055, 0, 9972, 73865,
+ 4519, 6114, 10898, 43072, 92465, 0, 93960, 983324, 126581, 10695, 0,
+ 7540, 0, 881, 7857, 6067, 65164, 0, 917897, 129134, 13311, 68403, 41857,
+ 64321, 8359, 83286, 12689, 983312, 11245, 128105, 983314, 71859, 68183,
+ 983415, 194829, 1287, 5436, 0, 71097, 74142, 92328, 74152, 70205, 6051,
+ 10497, 69668, 8985, 12109, 82962, 128908, 93043, 121013, 0, 3652, 10537,
+ 120282, 1276, 120440, 6549, 279, 73745, 0, 128664, 83244, 1489, 0, 0, 0,
+ 3899, 1007, 42124, 43828, 42122, 92337, 92367, 0, 11985, 1345, 78600,
+ 119832, 917563, 8956, 43083, 94057, 42138, 78610, 129131, 6430, 78608,
+ 78604, 78605, 6285, 78603, 78612, 78613, 65942, 492, 8685, 128481,
+ 121270, 0, 75027, 43712, 2582, 11470, 64538, 7444, 78615, 78616, 2297, 0,
+ 73837, 119823, 2527, 119824, 197, 2799, 92594, 41944, 83152, 9933, 74011,
+ 66515, 767, 5524, 7028, 0, 92168, 119827, 119817, 92950, 78633, 10896, 0,
+ 1799, 120497, 6971, 74336, 128342, 0, 65340, 118979, 41551, 2434, 94018,
+ 118823, 65353, 0, 4631, 118996, 0, 6407, 113737, 6338, 43214, 0, 7570, 0,
+ 3192, 120330, 8414, 983392, 93983, 195043, 0, 0, 9164, 66612, 93959,
+ 3171, 6623, 4961, 68396, 886, 55216, 8654, 78832, 9993, 74390, 64603,
+ 70066, 69241, 9599, 78629, 43084, 78627, 78628, 78625, 2399, 69693, 8994,
+ 10944, 41208, 983713, 41168, 8178, 74859, 3367, 92334, 42510, 78641,
+ 78636, 6804, 70475, 1947, 917579, 0, 92681, 42759, 11068, 1705, 9331, 0,
+ 74798, 9181, 65359, 125065, 8017, 119831, 65096, 66720, 68223, 43475,
+ 917548, 4909, 12126, 127540, 120696, 4904, 92961, 43503, 1365, 9253,
+ 42757, 43436, 7462, 127772, 0, 0, 83173, 66845, 64415, 120500, 83172,
+ 5398, 125035, 127386, 93953, 127362, 983782, 119015, 83171, 127007, 9476,
+ 983887, 120695, 12763, 126603, 3629, 120844, 13005, 11181, 3628, 0, 0,
+ 92502, 3469, 42107, 42116, 917578, 64809, 2928, 4905, 9853, 851, 9040,
+ 120372, 64665, 43086, 9114, 43870, 42583, 9315, 4822, 4906, 3852, 2847,
+ 119821, 3236, 11317, 1251, 7777, 41852, 11410, 10964, 0, 43222, 12646,
+ 120269, 10259, 9865, 65821, 75046, 6018, 68293, 125010, 12276, 119110,
+ 68372, 128255, 92259, 71893, 0, 119828, 10467, 0, 2443, 10918, 78217,
+ 77947, 1001, 9241, 1927, 0, 124942, 73987, 127882, 71895, 93012, 7992,
+ 77943, 43939, 12867, 128649, 8260, 77945, 7519, 11505, 12274, 8904, 518,
+ 65857, 128361, 128674, 13204, 4387, 857, 121252, 65369, 0, 92336, 43125,
+ 11842, 0, 71072, 121462, 0, 5136, 1968, 128906, 126627, 1337, 64967,
+ 1629, 0, 796, 66506, 0, 74123, 12877, 120649, 42314, 43388, 43826, 43944,
+ 6120, 478, 65151, 68128, 128147, 43082, 6016, 0, 42284, 71894, 4276,
+ 1206, 3619, 41638, 69691, 3843, 12011, 8853, 3361, 0, 490, 10715, 7578,
+ 68384, 92754, 65350, 10530, 12348, 8653, 68245, 42435, 6154, 9551, 65354,
+ 78522, 784, 42397, 334, 121084, 42416, 65356, 65273, 43937, 69666, 4442,
+ 10364, 43935, 778, 41626, 42455, 7989, 74063, 3227, 69907, 43932, 11102,
+ 2915, 11502, 41022, 41702, 10309, 127035, 75032, 120273, 6975, 0, 5415,
+ 12176, 983709, 74193, 3462, 43940, 42629, 78691, 71175, 43942, 127256,
+ 9759, 127255, 70057, 121442, 8114, 78698, 78697, 78696, 78695, 8710,
+ 42495, 118956, 70189, 4051, 10460, 43364, 71206, 1356, 12161, 42713,
+ 128857, 127268, 1619, 9703, 43152, 42489, 42112, 64436, 1875, 10808,
+ 42109, 120284, 41860, 64862, 13305, 64907, 5289, 13144, 128658, 983224,
+ 5575, 9675, 71129, 5940, 226, 2649, 6336, 983279, 92979, 43236, 3382,
+ 42449, 6498, 1658, 11936, 78232, 113814, 11269, 10151, 73759, 43100,
+ 69888, 65508, 983143, 0, 121451, 8935, 78234, 0, 983757, 0, 616, 74753,
+ 65178, 4684, 78701, 119653, 74631, 126551, 124992, 6048, 74460, 42110,
+ 73965, 10870, 8557, 11054, 68664, 75051, 9681, 4475, 67429, 41142, 2100,
+ 125024, 120731, 6035, 73796, 7651, 6846, 64443, 983957, 983296, 917987,
+ 0, 118966, 74144, 40997, 68488, 10392, 10328, 40998, 43462, 74488, 71182,
+ 9800, 8979, 0, 13307, 41000, 0, 5114, 6487, 3386, 129094, 10344, 0, 5115,
+ 5394, 43246, 78243, 5113, 66505, 41200, 128582, 4425, 194669, 0, 0,
+ 43074, 73799, 129076, 78147, 5112, 12173, 78545, 128771, 66824, 65338,
+ 983676, 0, 119582, 4474, 128936, 43093, 43964, 1587, 0, 127372, 64475,
+ 119217, 1369, 983672, 9959, 7927, 43963, 4560, 120793, 67811, 92277,
+ 983621, 64948, 4430, 43961, 42601, 4514, 66434, 93955, 8194, 65462,
+ 10626, 10965, 120905, 8893, 983303, 12542, 0, 65341, 67703, 65829, 7925,
+ 119822, 10475, 113825, 127011, 1352, 11069, 7707, 127560, 126486, 65279,
+ 127102, 68207, 74956, 7099, 6040, 67681, 10071, 78554, 9336, 43750,
+ 121074, 8899, 7798, 64474, 64259, 69873, 65188, 7820, 43018, 127082,
+ 128898, 7746, 1492, 78551, 10884, 75075, 66866, 5127, 11285, 42501, 5495,
+ 4273, 43095, 41426, 10849, 5730, 2999, 6342, 68636, 74304, 371, 64373,
+ 6023, 169, 5497, 11708, 75028, 128603, 6323, 129065, 8224, 128417, 8938,
+ 6043, 12738, 120671, 983076, 5321, 68645, 194798, 120251, 2589, 74332,
+ 1689, 7802, 4683, 74318, 42704, 92940, 11905, 983615, 0, 128516, 128163,
+ 74513, 6049, 0, 4027, 834, 118962, 1803, 983822, 1503, 78336, 127173,
+ 71312, 5731, 1381, 2387, 126610, 70808, 8289, 64525, 65817, 2881, 43142,
+ 0, 9601, 2879, 9668, 9766, 0, 5729, 129110, 71230, 6036, 64881, 4026,
+ 9361, 127091, 2887, 70389, 3526, 6298, 119851, 77897, 120095, 78519,
+ 118964, 8572, 6021, 77896, 128288, 71174, 43155, 0, 71197, 3146, 10959,
+ 9483, 83219, 77893, 10981, 166, 917841, 8635, 917840, 10623, 408, 119058,
+ 127507, 13298, 127253, 7426, 41641, 12717, 983795, 7607, 10639, 43396,
+ 129300, 119089, 41643, 74134, 983054, 8713, 41640, 10221, 41645, 66293,
+ 6645, 646, 66726, 66711, 42129, 68255, 77901, 3472, 8697, 0, 120936,
+ 121069, 0, 118859, 0, 5809, 1950, 119356, 92432, 68339, 128943, 42136,
+ 121440, 0, 0, 0, 3247, 92402, 65017, 128794, 68428, 66668, 0, 121112,
+ 10983, 0, 128787, 0, 41567, 119852, 0, 0, 78446, 119853, 127922, 0, 8285,
+ 126516, 4509, 121043, 66471, 12216, 128806, 40988, 83221, 74809, 41727,
+ 0, 42848, 2396, 128083, 194892, 74018, 917538, 64940, 7027, 3886, 0,
+ 42457, 92888, 83299, 996, 68123, 94058, 4249, 92410, 69650, 11707, 8222,
+ 73825, 7939, 71213, 92460, 127801, 121408, 128359, 8534, 69853, 40983, 0,
+ 121421, 0, 7201, 12561, 120866, 42371, 12558, 1540, 917549, 10052, 40982,
+ 119841, 0, 1488, 71177, 0, 194831, 917559, 128401, 0, 1563, 128034, 9619,
+ 120840, 917905, 120954, 127872, 71363, 3560, 7797, 6070, 10006, 128922,
+ 2922, 6082, 70147, 65009, 983942, 12567, 66712, 0, 41412, 128131, 119591,
+ 3607, 9200, 10046, 9612, 42153, 8218, 9485, 0, 2032, 78354, 83462,
+ 119131, 0, 0, 67826, 43085, 6057, 508, 93968, 92989, 67968, 0, 92198, 0,
+ 128831, 638, 6083, 119072, 124950, 0, 2305, 78348, 68096, 917772, 6056,
+ 6659, 67969, 983290, 6085, 0, 0, 3915, 41634, 0, 41639, 63912, 11941,
+ 983783, 4028, 1787, 42180, 43096, 43753, 3249, 1768, 93982, 12328, 501,
+ 93985, 10601, 0, 583, 0, 41977, 0, 66004, 66416, 6505, 74010, 983250,
+ 13064, 55267, 119113, 6500, 5526, 65049, 0, 12990, 0, 92376, 12745, 9678,
+ 121108, 120587, 9869, 83150, 1771, 128965, 8936, 92964, 0, 4208, 78341,
+ 78567, 78342, 67742, 983208, 74101, 128605, 11762, 0, 70096, 6835, 68010,
+ 66475, 120260, 5027, 78172, 128878, 119830, 5069, 73736, 5028, 9897,
+ 92774, 73739, 5026, 983255, 68639, 6331, 10079, 8931, 0, 1415, 8866,
+ 41901, 74790, 78138, 119361, 983564, 43106, 5029, 65309, 1580, 3598,
+ 68424, 41070, 77903, 7658, 3440, 78215, 1562, 128656, 127175, 119358,
+ 1716, 983679, 10600, 78558, 620, 41001, 6028, 70445, 42892, 0, 71116,
+ 5024, 74945, 41003, 68137, 5025, 69892, 983209, 75039, 118885, 127956,
+ 65557, 0, 74541, 128924, 11599, 128209, 11602, 6243, 11574, 11581, 11597,
+ 11598, 6253, 6105, 11584, 70273, 11569, 65275, 8906, 43945, 5755, 2636,
+ 71203, 10815, 11619, 2301, 41540, 7815, 11616, 6979, 12080, 7721, 11604,
+ 7869, 1592, 0, 42152, 78498, 41048, 917763, 829, 0, 92406, 19950, 66886,
+ 64131, 6616, 0, 118875, 10953, 391, 0, 69785, 482, 42296, 11588, 0,
+ 43606, 71185, 68397, 66370, 74282, 42335, 69786, 72421, 82998, 7538,
+ 5315, 83367, 42491, 92901, 42061, 128002, 4576, 0, 68417, 43809, 4277, 0,
+ 3563, 64472, 42338, 368, 42058, 3960, 11043, 11337, 78209, 120244, 63989,
+ 3958, 12132, 1849, 0, 9921, 42451, 4253, 41147, 42064, 11959, 42404,
+ 41160, 121481, 3618, 78338, 194924, 43300, 5156, 92629, 70350, 929, 6827,
+ 42035, 42437, 1555, 0, 8691, 66435, 2215, 41662, 94010, 119262, 0,
+ 128824, 93952, 4578, 64513, 41664, 983734, 42578, 71049, 41661, 78351,
+ 43267, 9356, 0, 194880, 983401, 1286, 10166, 983117, 0, 64707, 128925,
+ 42476, 7730, 11156, 128522, 42483, 129083, 74940, 42324, 42291, 10020,
+ 43359, 0, 6641, 525, 41627, 917923, 8763, 128304, 41628, 533, 11931,
+ 65225, 8321, 42504, 42581, 0, 6915, 42310, 4377, 8559, 128321, 8587,
+ 121318, 13193, 64350, 11666, 8679, 41924, 1576, 7735, 92398, 0, 73840,
+ 83153, 11374, 78043, 10889, 43461, 7757, 42462, 120226, 10029, 66493,
+ 2718, 4168, 43904, 13308, 120112, 0, 1179, 4440, 43902, 77948, 363,
+ 11015, 43903, 77944, 43857, 83049, 66692, 120826, 0, 66492, 6593, 64625,
+ 41963, 92177, 119329, 0, 10013, 64434, 75010, 127095, 9492, 11782, 64382,
+ 12833, 77830, 0, 1297, 41630, 630, 120960, 983923, 120774, 70165, 1043,
+ 43652, 66223, 10090, 0, 124945, 313, 121483, 41881, 194658, 42311, 7445,
+ 43906, 5750, 10759, 9419, 55222, 9405, 11268, 42919, 9398, 8526, 9399,
+ 9422, 43894, 66495, 69990, 983885, 92990, 41718, 10707, 1603, 983703,
+ 119003, 0, 631, 77952, 69703, 13161, 65272, 71067, 10546, 74210, 78101,
+ 11600, 77961, 2797, 43924, 42427, 306, 714, 3058, 42381, 77962, 127080,
+ 12351, 42395, 0, 11607, 127528, 11198, 66821, 77967, 9157, 73765, 66364,
+ 42433, 77964, 7603, 12803, 180, 42141, 0, 120612, 66494, 12674, 8244,
+ 362, 92439, 43890, 8037, 43777, 11535, 126539, 43893, 5185, 7165, 5521,
+ 10334, 2093, 71329, 10302, 125131, 10104, 1027, 5181, 128435, 5117,
+ 10523, 1446, 42320, 6845, 991, 5189, 42472, 41647, 120105, 1722, 5581,
+ 42898, 3405, 0, 194644, 5523, 43915, 42620, 92447, 74943, 9549, 0, 10549,
+ 43923, 9661, 42933, 74884, 77910, 78068, 43921, 0, 71184, 983070, 41991,
+ 983893, 0, 7630, 9846, 7684, 10350, 128453, 1174, 77981, 42733, 77978,
+ 77980, 66485, 77977, 42277, 77974, 42456, 43909, 74438, 12330, 128272, 0,
+ 42417, 42383, 66630, 41344, 6293, 0, 66252, 43908, 74443, 127894, 10209,
+ 8313, 4195, 74435, 1316, 66690, 75072, 6332, 64894, 983156, 65871, 67250,
+ 1736, 983684, 3901, 12228, 120151, 65200, 3383, 10446, 78241, 693, 9130,
+ 314, 64149, 42420, 11949, 127200, 120152, 11026, 120516, 5332, 6940,
+ 64154, 12635, 124980, 42706, 1751, 273, 8165, 13166, 83307, 78840, 71368,
+ 12824, 43911, 4528, 5320, 6301, 43662, 6133, 9339, 9463, 42346, 10922,
+ 64560, 3757, 0, 0, 74302, 65869, 73760, 2569, 74976, 2326, 65740, 2565,
+ 42459, 7596, 7921, 983868, 73862, 127981, 41848, 2567, 66006, 92622,
+ 4044, 92646, 43953, 12233, 983871, 1023, 474, 194940, 119818, 0, 0,
+ 42487, 65556, 121168, 127866, 42295, 128203, 121474, 71322, 92518, 2222,
+ 66499, 0, 5417, 12275, 10895, 0, 274, 0, 1858, 983455, 0, 55251, 10118,
+ 3133, 127771, 71857, 121201, 9610, 8068, 8197, 917545, 699, 0, 41665,
+ 5868, 128710, 92695, 42182, 7581, 19940, 43668, 41667, 128057, 0, 1923,
+ 65583, 65802, 93970, 64597, 43444, 78129, 68751, 0, 6464, 7036, 2996,
+ 1937, 983751, 68481, 41835, 4047, 41842, 0, 64107, 77965, 119837, 11017,
+ 120601, 0, 293, 77966, 92169, 64791, 41827, 42466, 43422, 10579, 8560,
+ 71350, 65413, 77963, 4803, 12964, 1739, 1941, 3900, 128967, 1713, 77969,
+ 121292, 73957, 11407, 42441, 41971, 6297, 120098, 64105, 120565, 42481,
+ 11716, 66473, 7179, 42289, 125095, 64103, 969, 0, 9352, 71481, 6165,
+ 64100, 917819, 6632, 73861, 42402, 74327, 7806, 113762, 8914, 66908,
+ 124954, 3183, 1435, 64876, 2969, 6046, 64441, 6208, 67849, 5746, 66408,
+ 0, 64416, 42422, 83506, 983046, 7082, 73775, 338, 5059, 121369, 83524,
+ 42328, 10767, 128862, 8115, 83454, 74758, 0, 8227, 2073, 1218, 917790,
+ 983230, 65848, 92884, 83517, 69863, 128328, 126987, 4486, 128082, 917796,
+ 0, 10925, 0, 83515, 83507, 124952, 42309, 10257, 65191, 10273, 7668,
+ 10305, 42461, 74882, 42349, 8832, 78051, 64127, 10644, 42662, 78828,
+ 42278, 74451, 126988, 69874, 7794, 119214, 42429, 6377, 42316, 119026,
+ 3669, 3968, 42468, 71319, 69658, 0, 65402, 119581, 194973, 128747, 64933,
+ 194627, 41960, 6699, 42903, 128755, 125013, 6823, 42391, 1588, 43502,
+ 8409, 78223, 19967, 65398, 787, 71315, 128335, 127744, 6115, 2078, 41654,
+ 42480, 917949, 92650, 41655, 65401, 43975, 72427, 0, 113816, 644, 65500,
+ 41657, 10778, 3659, 9533, 184, 1553, 13107, 65484, 69648, 10502, 66296,
+ 0, 0, 41554, 0, 8220, 128432, 41557, 0, 128938, 11070, 119221, 5157,
+ 4020, 73858, 41555, 9514, 64818, 65103, 64641, 64303, 78131, 7520, 73888,
+ 74377, 11029, 66651, 983068, 128492, 118930, 64527, 121395, 7877, 12723,
+ 983798, 68776, 120096, 74602, 9955, 119557, 4055, 42817, 0, 65212, 11715,
+ 12190, 12319, 78630, 0, 78631, 9502, 65427, 125048, 65424, 12607, 120966,
+ 9734, 65425, 0, 121431, 127357, 74890, 78836, 10112, 10827, 194635, 9866,
+ 74527, 66675, 118867, 8625, 64346, 11290, 10477, 67738, 8636, 983927,
+ 8315, 65444, 983793, 195011, 74595, 6152, 78820, 73947, 6629, 125056,
+ 120171, 0, 74589, 43993, 128346, 69790, 64435, 64955, 43690, 11046,
+ 11490, 42730, 4485, 71126, 128194, 64926, 0, 983133, 43830, 5869, 12437,
+ 42728, 0, 7040, 3588, 0, 12825, 121158, 0, 12725, 74092, 127106, 78634,
+ 223, 78635, 69675, 120119, 42444, 128449, 64499, 65245, 129104, 1171,
+ 128802, 69717, 120113, 1805, 8772, 43820, 0, 9930, 65247, 78619, 74954,
+ 2338, 120032, 118853, 0, 42676, 0, 64800, 13092, 11185, 68126, 1213,
+ 128419, 64075, 797, 64074, 8734, 4212, 83005, 64387, 4115, 71331, 5005,
+ 64070, 64073, 10679, 83000, 77954, 9402, 64276, 426, 83358, 83010, 8251,
+ 10136, 65436, 0, 2120, 43302, 1224, 0, 65576, 70795, 10701, 1764, 3101,
+ 127815, 12858, 120159, 120101, 11373, 6378, 71093, 120103, 8663, 9312,
+ 41644, 4539, 2129, 70785, 9222, 121479, 118907, 4259, 9092, 74567, 41961,
+ 128515, 12724, 66357, 42331, 64935, 0, 0, 1293, 7947, 2132, 983767,
+ 71858, 72440, 2454, 42717, 3613, 128837, 71117, 0, 65888, 8816, 10978,
+ 10840, 0, 10668, 113723, 43087, 12595, 120304, 983114, 8822, 0, 1157,
+ 64903, 8638, 127265, 917886, 127905, 0, 69848, 8235, 120316, 4405, 10086,
+ 120247, 11128, 69216, 121065, 65430, 71321, 6079, 6817, 10764, 120314,
+ 64291, 120315, 998, 120312, 11062, 1317, 64327, 1558, 194572, 1991, 7882,
+ 42254, 128954, 41700, 530, 0, 10428, 119335, 12002, 119336, 5742, 43076,
+ 4692, 64630, 41823, 4007, 5004, 74033, 7896, 751, 6595, 6596, 120325,
+ 66373, 983249, 128746, 64908, 92691, 6311, 93019, 12004, 119192, 12049,
+ 43108, 120326, 71083, 41705, 92188, 6598, 121298, 6599, 66822, 93031,
+ 42148, 118825, 66027, 121055, 6597, 9412, 8340, 11824, 64745, 2281,
+ 69904, 128495, 1988, 5407, 67865, 2430, 41678, 93059, 83114, 2336,
+ 983903, 0, 67169, 120442, 127092, 1921, 10947, 19927, 70390, 65406,
+ 983464, 19913, 4284, 13217, 0, 43789, 12841, 9229, 10956, 42285, 41674,
+ 19964, 41679, 65084, 3521, 124957, 5774, 8325, 69864, 65403, 983089,
+ 1854, 10794, 93054, 67660, 69846, 194765, 78359, 5280, 0, 4344, 12905,
65433, 6076, 64793, 41610, 768, 12074, 442, 0, 68162, 64081, 12934,
41682, 65432, 41693, 0, 6071, 65434, 127467, 4804, 4053, 0, 127469,
- 194653, 41696, 467, 69823, 127463, 69797, 194652, 127473, 8421, 127472,
- 69682, 43705, 502, 0, 65431, 119056, 69954, 12043, 1303, 316, 7364, 2029,
- 2136, 119246, 11533, 64365, 43480, 92639, 4860, 126648, 127877, 42488, 0,
- 9583, 128849, 5546, 8019, 73856, 0, 0, 0, 5544, 2355, 12150, 65725, 5543,
- 77989, 63751, 12137, 5548, 77985, 0, 65727, 68388, 65726, 6077, 128352,
- 65452, 0, 11301, 78013, 78008, 78010, 9874, 78007, 0, 1319, 3050, 65410,
- 0, 0, 78016, 78017, 42830, 43996, 66716, 128137, 4691, 92242, 9345, 621,
- 92709, 128222, 0, 65411, 0, 41182, 73881, 65408, 73899, 78024, 9474,
- 10545, 119118, 10887, 3786, 65409, 8894, 43179, 119611, 7923, 3716,
- 92363, 9996, 8508, 0, 7012, 8195, 127834, 9566, 0, 3722, 0, 41707, 8493,
- 545, 9575, 41379, 10050, 12718, 69854, 8859, 6820, 74345, 65110, 120740,
- 0, 0, 9119, 2787, 7920, 118823, 4021, 2012, 7985, 0, 119663, 0, 0, 78021,
- 78022, 410, 78020, 1802, 78018, 74107, 0, 41659, 41671, 1827, 0, 64396,
- 10126, 12116, 41673, 120370, 11422, 78141, 120373, 3860, 120367, 68412,
- 41345, 120362, 120363, 11748, 42158, 7941, 11076, 8749, 120361, 2104,
- 64858, 361, 120357, 845, 0, 41560, 11970, 4562, 917920, 2926, 917919,
- 4569, 74130, 0, 43487, 194630, 611, 74129, 64871, 118891, 65629, 0,
- 194858, 0, 0, 127545, 120543, 0, 0, 6291, 0, 78639, 41669, 7094, 917921,
- 0, 983581, 74054, 127754, 195029, 0, 839, 983319, 7695, 8769, 65246,
- 4829, 194663, 4859, 64467, 0, 983963, 118998, 7206, 0, 6647, 43986, 0,
- 69766, 0, 64764, 4210, 983863, 127936, 804, 0, 0, 12298, 0, 66653, 0,
- 64924, 10091, 73931, 9468, 74245, 0, 0, 74246, 92503, 12839, 64669,
- 92202, 0, 1279, 1425, 6224, 119229, 11049, 0, 92697, 43239, 8482, 92440,
- 0, 5032, 69677, 11940, 67888, 664, 120437, 5034, 0, 0, 127525, 42702,
- 73888, 983149, 13294, 67873, 64869, 6032, 0, 9115, 7430, 120377, 0,
+ 194653, 41696, 467, 69823, 127463, 69797, 121403, 121294, 8421, 127472,
+ 69682, 43705, 502, 75029, 65431, 119056, 69954, 12043, 1303, 316, 7364,
+ 2029, 2136, 119246, 11533, 64365, 43480, 92639, 4860, 70372, 127877,
+ 42488, 70339, 9583, 128849, 5546, 8019, 73856, 983840, 124960, 120839,
+ 5544, 2355, 12150, 65725, 5543, 75034, 63751, 12137, 5548, 77985, 0,
+ 65727, 68388, 65726, 6077, 128352, 65452, 0, 11301, 11214, 65952, 78010,
+ 9874, 78007, 983115, 1319, 3050, 65410, 67399, 92606, 78016, 78017,
+ 42830, 43996, 66716, 83050, 4691, 92242, 9345, 621, 83512, 128222, 0,
+ 65411, 0, 41182, 73881, 65408, 73899, 78024, 9474, 10545, 119118, 10887,
+ 3786, 65409, 8894, 43179, 71042, 7923, 3716, 92363, 9996, 8508, 127794,
+ 7012, 8195, 127834, 9566, 0, 3722, 983374, 41707, 8493, 545, 9575, 41379,
+ 10050, 12718, 69854, 8859, 6820, 74345, 65110, 120740, 128978, 55282,
+ 9119, 2787, 7920, 70091, 4021, 2012, 7985, 0, 119663, 917792, 0, 78021,
+ 78022, 410, 78020, 1802, 78018, 74107, 74895, 41659, 41671, 1827, 0,
+ 64396, 10126, 12116, 41673, 120370, 11422, 71846, 120373, 3860, 120367,
+ 68412, 41345, 120362, 120363, 11748, 42158, 7941, 11076, 8749, 120361,
+ 2104, 64858, 361, 120357, 845, 92174, 41560, 11970, 4562, 128473, 2926,
+ 68495, 4569, 74130, 128659, 43487, 194630, 611, 74129, 64871, 118891,
+ 65629, 0, 194858, 74854, 0, 70466, 67392, 66385, 71439, 6291, 0, 68487,
+ 41669, 7094, 121051, 0, 120999, 74054, 127754, 128917, 0, 839, 121315,
+ 7695, 8769, 65246, 4829, 67756, 4859, 64467, 0, 83525, 118998, 7206,
+ 119636, 6647, 43986, 83518, 69766, 194664, 64764, 4210, 128300, 127936,
+ 804, 83520, 0, 12298, 70344, 66653, 126983, 64924, 10091, 67200, 9468,
+ 67206, 67205, 67204, 67203, 92503, 12839, 64669, 92202, 71851, 1279,
+ 1425, 6224, 119229, 11049, 127123, 71480, 42649, 8482, 92440, 0, 5032,
+ 67209, 11940, 67207, 664, 120437, 5034, 92495, 70200, 127525, 42702,
+ 70194, 93061, 13294, 67873, 64869, 6032, 67218, 9115, 7430, 77837, 70191,
120819, 68387, 120168, 73913, 120170, 41161, 5518, 4174, 10993, 41162,
- 120160, 64528, 1169, 434, 41437, 1905, 6034, 41164, 64744, 9528, 118867,
- 128800, 524, 0, 74029, 788, 74027, 0, 194638, 0, 1663, 10419, 74025,
- 42636, 0, 69725, 0, 120656, 0, 67876, 0, 0, 0, 67897, 74039, 0, 0, 11395,
- 0, 119107, 43612, 64344, 0, 0, 10855, 5445, 9355, 0, 65198, 7391, 8989,
- 221, 65686, 0, 0, 8010, 7191, 4962, 69772, 8855, 0, 0, 64469, 120426,
- 10555, 0, 43333, 92299, 0, 120427, 10451, 0, 67653, 7245, 12443, 74405,
- 9947, 120149, 78317, 3873, 8367, 0, 120146, 43433, 43649, 11987, 0, 0,
- 11010, 12723, 74059, 74062, 6217, 5896, 0, 7682, 74049, 1462, 10235, 0,
- 0, 0, 0, 0, 0, 42595, 0, 74402, 118860, 0, 120419, 92497, 74052, 0,
- 92378, 120549, 119082, 64295, 120418, 0, 64765, 73923, 120417, 120662,
- 69920, 194702, 6216, 0, 10755, 9455, 0, 8124, 127042, 9470, 6944, 127540,
- 0, 69680, 2828, 0, 531, 42638, 0, 0, 0, 43428, 8204, 3614, 2827, 9696, 0,
- 0, 8728, 4354, 10904, 78562, 19936, 7833, 120691, 0, 42599, 42597, 42709,
- 120409, 127044, 0, 8537, 0, 0, 9354, 983164, 128833, 41199, 10121, 2028,
- 0, 983194, 69715, 0, 3062, 0, 74447, 12608, 0, 66440, 7545, 9700, 12580,
- 92205, 120777, 120502, 41155, 0, 74071, 0, 983457, 12713, 0, 0, 0, 78772,
- 0, 1734, 0, 0, 127040, 64594, 2456, 231, 0, 74167, 542, 0, 118786, 0,
- 983979, 1230, 0, 0, 3597, 4446, 10584, 74235, 92215, 4037, 127938, 8352,
- 0, 5687, 0, 64515, 0, 194801, 55265, 67846, 78434, 9704, 0, 0, 70080,
- 71338, 0, 8660, 126495, 0, 0, 78773, 74482, 4483, 1709, 69721, 9909,
- 6080, 0, 120358, 1746, 1315, 8667, 0, 0, 13140, 65899, 10604, 0, 4480,
- 11266, 128152, 1226, 6930, 67979, 983690, 6360, 10897, 41230, 605, 0,
- 74785, 69875, 0, 0, 41500, 0, 311, 11453, 6221, 10608, 64943, 74280,
- 10877, 118868, 64885, 74272, 0, 0, 128559, 120736, 74312, 345, 0, 74456,
- 64606, 9917, 0, 92231, 5037, 0, 1776, 8422, 0, 118814, 41508, 41201, 323,
- 43328, 0, 42698, 1295, 194853, 4625, 0, 4630, 13117, 0, 128772, 65123,
- 11293, 2668, 11288, 0, 42640, 65666, 2519, 92369, 65420, 92479, 0, 4252,
- 5049, 42659, 119011, 706, 7754, 10854, 8738, 0, 65419, 0, 0, 649, 65421,
- 0, 66702, 0, 12670, 1013, 0, 64919, 705, 0, 65422, 127803, 1183, 126519,
- 7017, 42852, 0, 8157, 9736, 64503, 65418, 0, 983878, 74035, 0, 11913,
- 73874, 6696, 0, 8920, 119298, 0, 7962, 12211, 9837, 2051, 66227, 0, 4184,
- 0, 0, 10177, 73777, 1857, 194657, 4626, 8464, 8472, 0, 4629, 8499, 78321,
- 78322, 4624, 7818, 119173, 0, 0, 7805, 0, 94007, 6935, 92292, 78325,
- 78326, 78323, 43327, 43989, 119046, 8492, 8250, 8459, 0, 8497, 8496, 0,
- 0, 78336, 78339, 9543, 78335, 78332, 77832, 65849, 77831, 983961, 0,
- 12451, 0, 8684, 0, 6102, 0, 5298, 0, 5294, 0, 0, 983459, 195062, 9949,
- 119826, 43617, 119215, 0, 12073, 0, 0, 77863, 13108, 120617, 11439,
- 41468, 983757, 0, 5292, 55272, 983883, 1939, 5302, 3970, 917879, 12455,
- 1793, 0, 0, 0, 6643, 92477, 65263, 0, 78330, 41293, 78328, 65923, 0,
- 13219, 9569, 0, 74383, 0, 74197, 0, 5500, 8813, 0, 0, 74566, 5322, 0,
- 78340, 43631, 5324, 66443, 3784, 41614, 65269, 6230, 78349, 78345, 43324,
- 3360, 78344, 11523, 0, 92488, 9926, 7197, 0, 68429, 42894, 41821, 1249,
- 78360, 78361, 78356, 78358, 78353, 64899, 64763, 41149, 41807, 43162,
- 41815, 41150, 0, 10571, 10096, 0, 0, 78074, 6947, 41152, 887, 9249, 6565,
- 78510, 41990, 78509, 41811, 74466, 93966, 6670, 77882, 0, 0, 43092,
- 43325, 0, 10168, 0, 9781, 128655, 9190, 0, 9666, 8269, 65944, 74005,
- 13019, 11670, 69860, 315, 12813, 983458, 78432, 78256, 78351, 78352, 0,
- 983657, 0, 0, 1378, 9509, 0, 0, 74475, 3066, 92220, 67847, 0, 92355, 0,
- 78365, 8787, 120379, 194616, 41618, 194615, 78261, 194614, 0, 64652, 0,
- 194612, 0, 78366, 42088, 0, 195061, 7176, 43756, 10137, 6121, 10995,
- 78259, 74534, 8119, 64874, 917816, 127199, 194939, 0, 74525, 0, 0, 12930,
- 1394, 74514, 0, 74515, 0, 118804, 2998, 9527, 120659, 65190, 12977,
- 42090, 119165, 0, 119100, 41236, 92235, 42005, 42003, 41237, 5848, 0, 0,
- 3670, 128657, 194600, 0, 0, 7890, 0, 11298, 43315, 0, 6229, 1593, 0, 0,
- 619, 4635, 65080, 0, 128002, 4120, 65337, 65336, 0, 11808, 119214, 74115,
- 9366, 42790, 42006, 119115, 65327, 65326, 65325, 10757, 1507, 42216,
- 65321, 65320, 65335, 65334, 65333, 65332, 65331, 42059, 65329, 42689,
- 92427, 9128, 94045, 42073, 6785, 64590, 983830, 4371, 7196, 65318, 2035,
- 65316, 4106, 65314, 65313, 42074, 127847, 41228, 0, 65609, 41241, 7903,
- 41239, 43533, 78459, 7189, 0, 0, 0, 12357, 42802, 78450, 8487, 9131, 0,
- 4615, 12695, 127752, 0, 12175, 0, 64535, 0, 7809, 0, 0, 562, 12169, 6590,
- 69762, 66455, 64738, 3219, 68654, 983787, 0, 1037, 0, 2025, 128263,
- 13098, 78442, 10637, 4568, 549, 1570, 0, 2835, 0, 10624, 43623, 11072,
- 127191, 0, 0, 12606, 78433, 2825, 0, 10825, 8079, 2821, 41046, 92327,
- 7365, 983753, 120593, 13071, 0, 452, 41049, 42840, 6346, 2831, 5461,
- 74596, 11465, 5212, 0, 64703, 119191, 42308, 7181, 0, 41332, 0, 12333, 0,
- 1668, 0, 0, 0, 1187, 983385, 42628, 78575, 0, 128777, 0, 3240, 128518,
- 12194, 0, 11591, 41065, 5323, 8166, 0, 0, 0, 74535, 1623, 65297, 128856,
- 571, 0, 4918, 0, 5288, 127295, 8916, 65048, 1909, 8864, 0, 0, 10736,
- 92508, 11571, 7615, 127300, 92296, 4237, 92576, 1035, 65815, 0, 7881,
- 701, 65936, 3489, 0, 0, 120751, 11403, 0, 0, 127146, 3796, 6800, 0, 3994,
- 11421, 0, 195076, 0, 983922, 0, 0, 64857, 128105, 2855, 127828, 66308,
- 41621, 68214, 127283, 127817, 10654, 0, 119226, 12164, 3246, 7906, 43972,
- 65847, 7182, 0, 13024, 194822, 74270, 128289, 0, 0, 0, 1496, 747, 0, 942,
- 2378, 43136, 127905, 8466, 983575, 9320, 8001, 1232, 8139, 11617, 0, 0,
- 11409, 68373, 6382, 0, 64634, 128279, 0, 11612, 0, 67600, 2374, 94066,
- 8475, 11609, 66313, 0, 0, 5286, 119297, 0, 0, 64925, 120283, 194584,
- 118982, 194583, 7705, 11942, 11305, 194581, 3309, 0, 0, 0, 0, 6802, 0,
- 41653, 1280, 1241, 7168, 12096, 0, 66615, 42565, 41651, 0, 0, 0, 41650,
- 66507, 66470, 0, 12914, 41491, 66010, 119552, 6078, 9954, 0, 1475,
- 119247, 9938, 6084, 917546, 41064, 41062, 0, 0, 3256, 10189, 42076,
- 43252, 78823, 917906, 8727, 0, 65875, 0, 0, 127762, 10562, 74215, 43065,
- 0, 0, 3248, 74297, 3261, 9015, 71351, 0, 3635, 64337, 983281, 0, 0, 7195,
- 0, 2007, 64431, 0, 0, 0, 0, 635, 0, 0, 65613, 77909, 92420, 73997, 0, 0,
- 119218, 7984, 8600, 74434, 127770, 4176, 70050, 2034, 92551, 120805,
- 65891, 127038, 0, 318, 2038, 128860, 78596, 0, 3649, 13149, 42145, 42798,
- 3634, 120291, 118927, 67677, 120124, 7866, 0, 11402, 42146, 94032, 74238,
- 42664, 2849, 127034, 0, 7938, 12960, 1761, 11812, 65379, 68386, 128185,
- 1159, 0, 69729, 0, 0, 7178, 194632, 0, 41680, 0, 128203, 11534, 1514,
- 11668, 67891, 9313, 7015, 0, 67877, 194567, 12989, 66474, 9368, 12848,
- 1624, 43270, 0, 74278, 10818, 126644, 9953, 0, 78421, 1194, 3242, 9761,
- 9555, 8598, 120299, 6169, 12871, 1551, 2798, 65176, 4958, 42752, 119025,
- 0, 67875, 120301, 3495, 66648, 194768, 0, 68364, 983224, 4891, 0, 10641,
- 0, 73746, 0, 68352, 0, 73787, 194829, 194633, 7199, 64955, 0, 0, 0, 0, 0,
- 42685, 42679, 193, 0, 0, 0, 42667, 0, 5271, 92318, 92517, 118882, 1362,
- 13297, 0, 128094, 0, 983331, 73789, 0, 6658, 4426, 0, 92628, 983842,
- 92319, 7276, 42163, 5220, 0, 0, 983330, 2416, 3310, 42703, 0, 379, 0,
- 43755, 0, 0, 3223, 65492, 1284, 194771, 4549, 0, 0, 983154, 127763,
- 10807, 9558, 194613, 0, 8515, 8688, 12866, 65308, 3294, 983332, 8529,
- 128101, 43385, 7564, 0, 43329, 0, 92458, 73757, 66456, 42359, 0, 2031, 0,
- 7202, 0, 12676, 42729, 92198, 3215, 0, 7710, 1610, 73801, 0, 0, 65682, 0,
- 120537, 65924, 9974, 228, 66354, 1501, 0, 64395, 5179, 7200, 6225, 0,
- 65794, 1725, 65533, 8196, 7476, 74399, 0, 0, 7152, 8502, 5762, 1967,
- 7483, 0, 0, 8104, 0, 7474, 77979, 0, 126507, 10414, 13001, 8141, 0,
- 42537, 1557, 43594, 128642, 6330, 6805, 8631, 2545, 70052, 127166, 0,
- 74190, 0, 0, 983786, 42762, 0, 42914, 1650, 262, 1637, 0, 7901, 3238,
- 128173, 41861, 0, 128585, 65158, 10860, 94059, 43658, 7527, 0, 43319,
- 6419, 0, 45, 0, 64588, 93989, 0, 119810, 7194, 5291, 0, 43666, 13129, 0,
- 9084, 0, 8737, 0, 12881, 0, 12906, 9639, 7912, 2620, 0, 0, 0, 983875,
- 179, 65896, 0, 64756, 2853, 78443, 118813, 983890, 118996, 119009, 2850,
- 8084, 983085, 73850, 2801, 92284, 42069, 119839, 74754, 119841, 42072,
- 119843, 119842, 10398, 983056, 0, 8377, 127116, 8245, 68401, 3158, 92396,
- 3983, 43656, 923, 119857, 119856, 292, 13002, 119845, 119844, 3221, 1763,
- 92463, 4612, 119851, 119850, 7253, 127110, 68391, 0, 10782, 3637, 12996,
- 43542, 0, 64578, 983675, 3228, 69636, 8783, 0, 119614, 2731, 0, 0, 78585,
- 4102, 7696, 73878, 0, 0, 78586, 43316, 4177, 11283, 9089, 0, 73996,
- 983173, 64500, 43674, 0, 64947, 1856, 0, 0, 6379, 0, 0, 0, 3208, 12975,
- 74775, 127380, 983931, 92389, 74072, 55269, 0, 0, 983683, 2033, 78577,
- 78576, 195026, 55254, 7740, 0, 0, 0, 73964, 0, 93988, 67612, 65674,
- 128244, 94110, 41689, 0, 74006, 64909, 6646, 11790, 74019, 0, 128066,
- 128031, 8561, 4573, 0, 5326, 0, 120605, 7230, 8257, 0, 8778, 41688, 0,
- 65776, 2071, 8314, 6459, 0, 7628, 65092, 73903, 66721, 11342, 128561, 0,
- 0, 128226, 127001, 0, 11810, 13164, 10723, 967, 983951, 126469, 11946, 0,
- 3257, 0, 12307, 1845, 983157, 43526, 0, 0, 1886, 42342, 10089, 870, 7648,
- 3499, 8609, 7652, 876, 871, 877, 0, 878, 42015, 879, 43692, 4563, 0, 0,
- 7591, 65887, 867, 9520, 872, 126607, 868, 873, 7642, 0, 869, 874, 7644,
- 120674, 875, 790, 128303, 0, 0, 0, 66182, 983258, 5429, 195055, 66180,
- 126480, 66181, 68452, 983289, 983248, 42067, 0, 5433, 10657, 7911,
- 194622, 1547, 66176, 42012, 120576, 5425, 4977, 9999, 5317, 5423, 4611,
- 0, 67637, 0, 9679, 74122, 0, 0, 0, 66194, 4418, 66184, 4628, 4245,
- 119648, 0, 0, 1851, 0, 127189, 11908, 0, 9360, 118897, 983202, 42776,
- 66187, 12837, 8829, 7711, 92714, 0, 92321, 43318, 0, 8809, 69881, 0,
- 983142, 120604, 983052, 983882, 0, 983270, 0, 0, 7427, 9958, 4588, 43680,
- 0, 74484, 194968, 2433, 0, 119622, 3352, 74363, 983885, 0, 793, 74404, 0,
- 305, 567, 67662, 842, 128519, 8208, 0, 41695, 1647, 118877, 0, 7837,
- 917625, 818, 5337, 194628, 917621, 41376, 119978, 126576, 120594, 74086,
- 917615, 917614, 917613, 10973, 66359, 1372, 127172, 917608, 4969, 1254,
- 917605, 917604, 93967, 917602, 65228, 78221, 126612, 0, 2840, 0, 119982,
- 983939, 0, 3245, 9068, 68194, 64725, 0, 0, 12991, 0, 2651, 68016, 983265,
- 917611, 127026, 128883, 0, 0, 43648, 120812, 0, 43322, 92662, 0, 0,
- 64372, 92698, 3226, 655, 752, 7457, 7456, 7452, 3285, 128779, 127821,
- 119988, 65610, 2391, 0, 92248, 671, 250, 7434, 618, 668, 610, 42800,
- 7431, 1152, 42801, 640, 120666, 7448, 7439, 628, 3905, 73810, 0, 128266,
- 64749, 67850, 2107, 0, 0, 4605, 128174, 983192, 43372, 65945, 128838, 0,
- 119590, 0, 0, 0, 987, 6927, 11572, 42261, 11464, 3365, 9971, 0, 0,
- 128297, 0, 0, 0, 0, 11334, 43326, 12609, 11519, 11503, 5530, 5210, 0,
- 4627, 983892, 5208, 0, 128842, 10332, 5218, 7976, 9156, 0, 3244, 5529,
- 69647, 73894, 128852, 5432, 64965, 5527, 74033, 10516, 7790, 5528, 0,
- 42140, 120281, 0, 0, 43545, 9887, 0, 4000, 7429, 7428, 665, 7424, 3206,
- 120278, 7884, 0, 128566, 917989, 128666, 211, 2509, 128858, 120573,
- 68672, 3220, 42235, 0, 10690, 8951, 5214, 42474, 8118, 0, 7048, 4590,
- 127258, 5852, 0, 0, 127259, 1708, 0, 983165, 2623, 11943, 0, 69226, 0,
- 4698, 66509, 1066, 119921, 4701, 983876, 120285, 74225, 94111, 8267, 0,
- 127265, 0, 7516, 0, 2625, 983977, 8034, 74309, 0, 3631, 10955, 7850,
- 120293, 8416, 0, 0, 0, 43384, 12660, 0, 0, 0, 74850, 41069, 0, 128156,
- 12099, 4310, 10032, 6252, 713, 7990, 0, 3990, 0, 983262, 66368, 5017,
- 64956, 7071, 0, 119144, 1030, 118800, 983120, 9513, 41059, 9357, 0, 1773,
- 0, 120350, 0, 6339, 7745, 9844, 0, 64650, 94, 1880, 74766, 983838, 8908,
- 0, 128707, 65913, 78470, 10752, 13003, 0, 126572, 41307, 8732, 120338, 0,
- 1757, 6964, 4696, 0, 120335, 64785, 7394, 3641, 5419, 128055, 0, 127883,
- 0, 120344, 43988, 0, 8610, 43062, 7592, 856, 74299, 936, 13289, 69894,
- 43171, 1459, 0, 65243, 78638, 19953, 0, 1504, 70064, 0, 12913, 74206,
- 7529, 0, 128699, 983957, 120782, 4113, 0, 2372, 336, 0, 7509, 12152, 0,
- 682, 66458, 41505, 0, 64743, 10593, 1703, 0, 983955, 8033, 69953, 0,
- 9810, 127269, 0, 12970, 0, 42351, 10109, 917623, 0, 194693, 0, 92690, 0,
- 0, 74291, 1965, 7069, 43312, 0, 73887, 0, 2087, 64370, 6314, 41714, 8501,
- 0, 0, 74239, 41317, 92614, 2091, 74545, 2090, 0, 9353, 7117, 2077, 77886,
- 0, 10498, 2083, 77888, 0, 0, 119236, 634, 0, 0, 0, 69779, 4165, 8746, 0,
- 9654, 12856, 6924, 0, 7066, 983719, 0, 128135, 41037, 42692, 7786, 12959,
- 41039, 127483, 0, 680, 2302, 128200, 1181, 7056, 3174, 126516, 0, 92668,
- 65665, 127375, 126506, 6920, 0, 92295, 0, 118965, 0, 64644, 126981,
- 74119, 0, 41028, 0, 6231, 2613, 65302, 40989, 0, 194696, 0, 42760, 0,
- 983566, 0, 40987, 4667, 0, 983932, 8828, 0, 0, 1246, 4746, 0, 0, 11021,
- 4749, 92675, 0, 921, 4744, 0, 12702, 242, 0, 1566, 8217, 0, 64653, 78386,
- 128121, 74036, 74505, 43274, 5313, 951, 0, 0, 983867, 7604, 983290, 4009,
- 127816, 983710, 120562, 0, 983720, 64860, 119138, 119069, 0, 127370,
- 4048, 983598, 0, 70024, 1646, 77890, 64534, 73995, 120705, 0, 119890,
- 2579, 119905, 3177, 11357, 9099, 4107, 3441, 119894, 2975, 74442, 9822,
- 983935, 55220, 10084, 73943, 118840, 0, 917562, 194610, 3399, 9851,
- 983717, 11909, 9059, 0, 7687, 0, 6789, 0, 0, 0, 71367, 0, 0, 1777, 9151,
- 1137, 69767, 749, 42366, 0, 5385, 128574, 128218, 0, 0, 5989, 0, 0,
- 128091, 0, 41685, 69223, 0, 9769, 41684, 983216, 519, 0, 11740, 5766, 0,
- 0, 2600, 8848, 120138, 41297, 0, 3666, 74473, 41300, 74468, 65160, 0,
- 69688, 69771, 74479, 0, 6558, 0, 0, 69765, 120750, 252, 0, 41302, 0, 0,
- 0, 69763, 0, 11729, 8719, 9060, 0, 120139, 10761, 0, 0, 0, 118792, 11734,
- 983223, 11730, 0, 9593, 5757, 2403, 64808, 55275, 0, 11728, 43572, 0, 0,
- 7764, 983714, 11094, 120825, 0, 983226, 4282, 8298, 0, 0, 0, 0, 0, 64449,
- 0, 126650, 63854, 8456, 0, 74783, 65670, 0, 78250, 0, 7774, 10607, 9792,
- 0, 0, 0, 0, 120764, 0, 10019, 74762, 0, 3458, 4365, 70053, 983712, 3647,
- 0, 2602, 128341, 0, 194707, 41135, 0, 0, 0, 64631, 172, 4971, 41219,
- 41137, 1889, 7238, 6545, 126476, 92193, 7597, 10528, 0, 0, 3732, 73910,
- 194588, 5344, 0, 43366, 43363, 9062, 119252, 0, 0, 0, 64479, 9232, 92596,
- 0, 0, 194712, 10900, 41531, 1263, 3720, 12048, 0, 64292, 41524, 7227,
- 119635, 6099, 41534, 0, 127354, 127345, 299, 917957, 8525, 127347, 3524,
- 917565, 8831, 127349, 92564, 3075, 67867, 127352, 0, 66362, 0, 64353, 0,
- 0, 5845, 0, 0, 0, 2581, 8200, 65114, 68460, 0, 43283, 5551, 0, 120735,
- 983201, 6340, 118855, 0, 78134, 8680, 7204, 70065, 2588, 2914, 7011,
- 55281, 0, 2471, 194631, 2883, 2749, 119563, 73774, 10913, 0, 0, 8666,
- 675, 42493, 0, 43571, 0, 6219, 0, 9980, 41232, 10928, 0, 41153, 41229,
- 118967, 0, 3738, 94016, 0, 12711, 3181, 66212, 74289, 68472, 42857, 8262,
- 983379, 0, 983222, 0, 42347, 12092, 9615, 7234, 74047, 983088, 0, 43744,
- 0, 0, 73846, 2934, 12722, 120762, 922, 43983, 74507, 983126, 74461, 3218,
- 120471, 74290, 120469, 64562, 120475, 8569, 11404, 11932, 73728, 3214,
- 120461, 120468, 12128, 3207, 65486, 78729, 1901, 78727, 127326, 120460,
- 7425, 3205, 68003, 78737, 78736, 78735, 43383, 69940, 65459, 2606, 78730,
- 73897, 0, 11496, 1173, 0, 41272, 119661, 0, 0, 983321, 120737, 0, 983971,
- 983320, 378, 2610, 0, 65079, 983325, 65695, 126559, 37, 7068, 0, 120480,
- 120479, 3209, 120477, 0, 10638, 9768, 69952, 119909, 983399, 0, 0, 0, 0,
- 65510, 0, 0, 5233, 983335, 64792, 983334, 0, 126633, 0, 7060, 9847,
- 120144, 1685, 595, 0, 73971, 1292, 8940, 7380, 11088, 0, 10004, 126997,
- 0, 6541, 0, 0, 0, 3243, 9014, 5606, 0, 538, 64620, 5602, 8467, 74391,
- 6547, 128132, 8203, 78488, 983090, 8458, 65211, 8495, 119904, 0, 917552,
- 779, 78314, 64367, 2465, 69901, 8193, 55279, 9730, 9280, 0, 7065, 74155,
- 4346, 0, 73798, 504, 0, 92414, 8982, 0, 0, 0, 782, 0, 10883, 0, 194852,
- 732, 3737, 127253, 1548, 68650, 92507, 1832, 5604, 5735, 41141, 119020,
- 4376, 0, 11787, 3745, 0, 0, 42888, 65712, 983304, 3869, 11937, 5725,
- 127539, 1783, 68648, 5728, 0, 0, 0, 11918, 66567, 5724, 0, 5727, 78521,
- 0, 0, 764, 0, 128116, 43531, 0, 9033, 0, 42532, 6223, 11042, 120749,
- 11423, 0, 119861, 71344, 43465, 0, 128267, 6559, 64557, 71348, 92649,
- 120648, 43019, 43477, 10238, 74491, 0, 43377, 92282, 71346, 1478, 9783,
- 11825, 2607, 64740, 0, 7739, 74543, 0, 0, 0, 6132, 0, 63765, 0, 70058,
- 41144, 0, 92438, 43537, 6761, 10093, 4369, 917791, 0, 983148, 8820, 3947,
- 0, 0, 11515, 526, 128103, 41295, 194603, 917785, 194932, 0, 7688, 917786,
- 7686, 8288, 11815, 0, 0, 983382, 1543, 3713, 41221, 12423, 42281, 917788,
- 74024, 12293, 0, 64357, 11794, 42082, 0, 1737, 8987, 42081, 0, 7205, 0,
- 9335, 12850, 119870, 6553, 7055, 0, 8277, 0, 0, 5475, 74795, 6780, 0, 0,
- 12990, 1160, 42084, 119650, 41217, 119660, 10018, 360, 0, 0, 68176, 5863,
- 3137, 0, 4147, 983170, 41216, 7844, 2616, 119190, 68461, 65234, 983294,
- 13076, 3135, 983287, 78143, 119139, 3142, 92451, 94068, 10819, 119580,
- 10183, 0, 2608, 1470, 73967, 94008, 6227, 0, 127173, 69741, 983582, 6163,
- 983558, 0, 127314, 0, 0, 8603, 0, 119866, 3306, 10876, 43392, 119573,
- 127931, 5751, 0, 6222, 0, 0, 12086, 7403, 1600, 64309, 64939, 0, 64783,
- 92658, 11310, 0, 8882, 0, 0, 2570, 7021, 0, 0, 43110, 0, 1234, 6540,
- 6974, 0, 0, 983211, 5002, 0, 41286, 69946, 127019, 0, 43585, 0, 6551,
- 983962, 128229, 0, 41289, 0, 194602, 0, 8977, 602, 120814, 0, 128778,
- 128661, 0, 983375, 41279, 0, 0, 0, 11081, 43615, 0, 0, 0, 983612, 12727,
- 0, 0, 78397, 9475, 7112, 65105, 0, 9633, 10886, 43592, 7831, 983829,
- 194571, 0, 73915, 8076, 43048, 8290, 8291, 43051, 92570, 0, 2596, 43584,
- 0, 13113, 0, 127757, 2393, 7058, 9087, 74067, 68673, 41574, 78337, 0,
- 74058, 6376, 0, 0, 0, 0, 9854, 127748, 64696, 0, 128220, 0, 6994, 0,
- 1720, 0, 0, 0, 6529, 7063, 983182, 3751, 9120, 983485, 0, 1798, 709, 0,
- 1354, 1876, 13152, 6557, 12430, 8137, 94098, 92642, 0, 0, 245, 128097,
- 11456, 41233, 7070, 0, 94046, 6136, 917609, 65677, 8682, 41235, 92595,
- 42045, 9804, 118963, 432, 3595, 194945, 65437, 0, 74455, 42399, 0, 0,
- 128274, 0, 119658, 0, 0, 0, 77894, 8797, 0, 9052, 64888, 7167, 2356, 95,
- 74784, 10580, 0, 42286, 0, 64640, 0, 94109, 0, 74137, 70035, 10063,
- 12652, 12199, 92480, 0, 2566, 11971, 983737, 0, 1065, 0, 0, 43400, 2576,
- 66696, 93999, 0, 43604, 0, 0, 74082, 514, 74502, 70032, 2921, 43215,
- 64493, 5772, 12968, 70055, 194944, 74580, 43398, 2580, 983810, 41341,
- 41223, 6564, 1463, 41342, 0, 5293, 70020, 0, 3733, 11346, 0, 12054, 0,
- 74098, 42827, 0, 13091, 0, 0, 0, 917915, 0, 127025, 0, 74821, 0, 983733,
- 119042, 0, 127865, 13090, 66643, 0, 1270, 1132, 42360, 0, 74096, 66655,
- 42569, 127824, 0, 64761, 0, 41021, 8510, 42432, 0, 0, 194782, 0, 64496,
- 74109, 70030, 9915, 0, 983218, 7061, 41336, 3854, 69700, 13141, 68413,
- 43401, 42319, 13082, 0, 7067, 68221, 0, 127383, 127171, 0, 0, 127797,
- 9029, 43543, 119315, 2353, 6308, 0, 74792, 2611, 119186, 0, 0, 0, 43664,
- 92399, 66627, 0, 4484, 8509, 118976, 11066, 65233, 0, 41224, 41017, 0,
- 3747, 10522, 0, 0, 1691, 41226, 0, 12107, 7100, 10905, 65010, 194986,
- 697, 66018, 9284, 4244, 0, 0, 92644, 13121, 120036, 0, 12010, 128573,
- 128221, 0, 0, 0, 127193, 65816, 68111, 0, 127933, 65668, 92257, 6618,
- 118784, 66365, 0, 42234, 12648, 78110, 7123, 70038, 5785, 9198, 9764,
- 41316, 65877, 7383, 13230, 41299, 0, 0, 68365, 128258, 0, 0, 0, 13122, 0,
- 191, 70060, 8585, 8000, 64411, 120652, 42889, 64850, 41072, 41578, 0,
- 41577, 0, 10002, 0, 6533, 73802, 41570, 0, 683, 396, 41580, 68146, 0,
- 12901, 43058, 0, 343, 7129, 42680, 41360, 78154, 0, 4743, 0, 0, 74040,
- 74108, 8743, 1724, 1433, 119322, 0, 3739, 6263, 71349, 0, 3964, 6592, 0,
- 128693, 66040, 0, 42568, 69806, 128113, 1778, 3956, 0, 42070, 6563,
- 43075, 9018, 94006, 983396, 12067, 41312, 0, 5547, 74531, 127969, 0,
- 8175, 0, 284, 8108, 934, 0, 74001, 173, 66460, 7174, 92703, 118822, 1750,
- 0, 4394, 68368, 1807, 983888, 92298, 0, 5889, 0, 7180, 0, 119145, 0,
- 917558, 42471, 6982, 1721, 44022, 7891, 42243, 42160, 2583, 4512, 119360,
- 65230, 128109, 0, 0, 3855, 0, 0, 0, 0, 74295, 0, 0, 92416, 3975, 0,
- 74087, 0, 12672, 3798, 2703, 983599, 0, 2109, 9774, 1275, 0, 0, 41095,
- 3962, 0, 2932, 41101, 3954, 6457, 4513, 0, 0, 73994, 73992, 1468, 0, 0,
- 41851, 128230, 41846, 0, 55238, 7633, 41849, 68385, 4320, 3224, 0,
- 128032, 0, 42531, 119108, 1510, 0, 8256, 0, 11393, 0, 8879, 128075,
- 92474, 8770, 0, 0, 78377, 1910, 8671, 78374, 4283, 0, 127117, 68361,
- 78318, 2654, 7893, 195007, 0, 0, 0, 65106, 42761, 12857, 4581, 8411,
- 78372, 78371, 78370, 78369, 78368, 0, 0, 0, 1733, 4392, 2568, 10786,
- 69661, 0, 8184, 41486, 0, 7396, 7116, 0, 69788, 0, 7185, 7965, 0, 0,
- 92347, 983087, 41350, 9129, 0, 0, 2294, 0, 92489, 0, 10481, 0, 70022,
- 7171, 0, 340, 92498, 93972, 0, 0, 92200, 0, 0, 6764, 127487, 0, 0, 0, 0,
- 65203, 11392, 119098, 119359, 0, 3210, 0, 0, 118795, 0, 0, 127970,
- 917619, 0, 0, 10043, 0, 1186, 41571, 6999, 617, 9464, 126642, 3675, 5207,
- 65062, 5213, 194769, 2617, 41348, 41568, 128803, 3253, 120535, 0, 8630,
- 128544, 0, 5596, 5545, 7288, 2586, 64887, 0, 5217, 71336, 0, 0, 0, 64293,
- 68098, 2635, 0, 0, 983846, 0, 983641, 7835, 70040, 0, 194988, 92285,
- 64558, 127122, 0, 127121, 0, 127913, 0, 5784, 983102, 0, 0, 70033, 4011,
- 917616, 68101, 0, 7864, 4254, 65095, 983496, 5600, 3903, 127083, 10447,
- 5598, 1207, 120521, 66689, 3501, 42582, 43600, 194780, 0, 1124, 5597,
- 194778, 194772, 9321, 983484, 983481, 983482, 0, 1719, 68356, 68354,
- 9671, 1125, 4399, 127479, 917610, 983488, 7631, 5488, 7128, 120532, 0,
- 5491, 0, 8937, 43044, 2604, 74187, 5490, 43046, 5489, 7212, 11768, 43043,
- 6300, 0, 7122, 0, 4390, 454, 41397, 0, 9875, 7593, 194791, 92274, 118913,
- 7207, 0, 65901, 2394, 2575, 0, 3746, 11016, 65752, 120037, 0, 43423,
- 128683, 11989, 0, 0, 0, 0, 0, 8249, 128172, 0, 78531, 6640, 74806, 2598,
- 513, 0, 6586, 8656, 0, 120710, 65008, 0, 194784, 194989, 194795, 983473,
- 92515, 68475, 93973, 0, 0, 78637, 12647, 0, 128043, 69893, 1036, 983477,
- 92419, 1723, 128056, 74217, 0, 41579, 2444, 0, 10705, 73876, 983469,
- 74486, 983467, 740, 119222, 194978, 194984, 0, 4238, 11071, 9459, 68437,
- 78140, 78139, 194985, 8121, 10438, 74487, 42574, 13285, 55263, 11907,
- 195000, 5690, 92255, 93992, 0, 43181, 13095, 0, 127857, 64498, 0, 9506,
- 6978, 194993, 77992, 0, 0, 194992, 0, 127845, 1122, 317, 0, 0, 0, 0,
- 1920, 0, 10173, 827, 0, 0, 78378, 120126, 5223, 1304, 0, 119564, 5226,
- 12602, 94044, 0, 9329, 7758, 9239, 41173, 5224, 5487, 1222, 5692, 41725,
- 69229, 9674, 5695, 41711, 64627, 19909, 0, 74604, 5691, 287, 866, 233,
- 127490, 983441, 42816, 94036, 65140, 74797, 0, 8830, 6568, 42300, 10524,
- 41175, 983448, 983445, 983446, 5296, 983444, 42492, 43402, 92466, 3302,
- 0, 0, 6516, 6515, 6514, 6513, 6512, 0, 7856, 8690, 0, 0, 12122, 119602,
- 43976, 0, 1785, 69925, 68622, 65153, 194810, 5138, 0, 0, 118869, 0, 4540,
- 41181, 0, 6200, 0, 5134, 0, 322, 4643, 5132, 0, 6389, 128533, 5143, 0,
- 8790, 128694, 0, 194802, 0, 8869, 69916, 0, 42060, 71326, 9648, 194804,
- 127012, 10270, 10286, 10318, 10382, 43529, 66477, 0, 0, 74170, 0, 3234,
- 0, 0, 74376, 43139, 118815, 127084, 120627, 8767, 0, 74489, 9695, 120746,
- 5201, 0, 6215, 12714, 6214, 13101, 0, 194999, 65268, 0, 0, 0, 11027, 0,
- 10059, 10511, 42075, 9767, 789, 1749, 78890, 127071, 983670, 320, 0,
- 8647, 0, 3049, 0, 6471, 42071, 43156, 9925, 127356, 127355, 66478, 4960,
- 5549, 127359, 127346, 8485, 4671, 5418, 127350, 3351, 127006, 127351,
- 10610, 5414, 3064, 6212, 4286, 5421, 127344, 9554, 0, 94048, 127109,
- 6653, 128811, 0, 64510, 6213, 12885, 0, 119045, 64720, 0, 120759, 73741,
- 12603, 7131, 11430, 4566, 7518, 9317, 3801, 10342, 10406, 0, 119259,
- 42576, 0, 5200, 126611, 917948, 0, 9183, 127361, 74458, 73825, 395, 5482,
- 5198, 4349, 10390, 74202, 5196, 43224, 6113, 42009, 5205, 0, 43307, 0,
- 118973, 0, 12134, 0, 0, 118843, 9126, 435, 983624, 12014, 10377, 8093,
- 9079, 3203, 192, 65109, 3385, 0, 64430, 5383, 10294, 10326, 128178, 5738,
- 983215, 3336, 78355, 5361, 3623, 41159, 0, 68112, 7872, 8581, 0, 1260,
- 3149, 5359, 120134, 0, 7914, 5357, 92170, 128659, 2624, 5364, 0, 11431,
- 120030, 9101, 11058, 78288, 0, 78293, 42271, 78289, 42917, 120793, 0,
- 65566, 6717, 10619, 43360, 78385, 78384, 11832, 78382, 78381, 78380,
- 78379, 9319, 7097, 119055, 77906, 3232, 73824, 74581, 120632, 0, 0,
- 41889, 92453, 0, 1161, 41895, 74103, 9701, 8622, 0, 0, 73819, 120588,
- 5012, 77912, 41362, 69862, 78296, 11921, 0, 11769, 0, 68609, 41364, 0,
- 74228, 41352, 41361, 0, 41366, 0, 3356, 11611, 917, 68422, 119915, 7134,
- 8199, 78389, 119917, 677, 119916, 0, 119932, 127169, 0, 0, 0, 3349,
- 74125, 7022, 8927, 4739, 0, 5802, 0, 8615, 0, 0, 491, 128819, 10190,
- 120698, 65837, 128820, 8426, 11092, 9891, 0, 42497, 7113, 7586, 42305,
- 10852, 0, 0, 4606, 68448, 9095, 7741, 12684, 41885, 1046, 7124, 0, 0,
- 5815, 5171, 65539, 68612, 6932, 74267, 42394, 41878, 74849, 120621, 0,
- 5169, 11935, 0, 0, 3175, 120822, 1537, 120804, 5176, 8905, 4136, 4871,
- 78287, 0, 9833, 0, 0, 1128, 65920, 0, 9711, 7057, 9408, 9409, 9410, 9411,
- 3662, 9413, 3378, 9415, 9416, 9417, 9418, 6320, 9420, 9421, 5897, 9423,
- 5165, 5126, 41385, 0, 41389, 917938, 8955, 3374, 9400, 9401, 7119, 9403,
- 9404, 3507, 9406, 7629, 983617, 19925, 42669, 68463, 183, 43985, 2631, 0,
- 10627, 41130, 78260, 3996, 0, 78771, 0, 119313, 119307, 78768, 6580,
- 4332, 64825, 66329, 10726, 66686, 41125, 5899, 41365, 917918, 12085, 0,
- 574, 917922, 77825, 73828, 5448, 41058, 5446, 69709, 41322, 42211, 5442,
- 4190, 77834, 77835, 5451, 77833, 3616, 77828, 77837, 77838, 7708, 77836,
- 10859, 65867, 10345, 10409, 4191, 0, 77844, 73800, 42181, 77843, 77839,
- 2060, 0, 7111, 11788, 65587, 68129, 10415, 74102, 0, 205, 0, 10351,
- 119076, 0, 9862, 6588, 43257, 64697, 73998, 41355, 5505, 119154, 5503,
- 8021, 0, 7125, 9819, 41357, 8011, 42885, 5507, 12044, 92636, 0, 10026,
- 5472, 7109, 1191, 13106, 5470, 10329, 5476, 8991, 66322, 69778, 78267,
- 42874, 8550, 42876, 5592, 2919, 0, 2675, 5595, 78411, 43762, 4367, 0, 0,
- 5478, 5904, 5594, 0, 74150, 7291, 5590, 43761, 13067, 118909, 120372,
- 983108, 9731, 69731, 64633, 77857, 77854, 77855, 77852, 77853, 77850,
- 10750, 43714, 77858, 7137, 0, 128296, 12887, 10551, 194564, 77866, 77867,
- 77864, 77865, 9929, 5199, 9936, 1120, 42387, 0, 1444, 9486, 7554, 65839,
- 55252, 73972, 1442, 0, 5894, 70069, 0, 41171, 92511, 74313, 0, 13162, 0,
- 3334, 195010, 118803, 77881, 66022, 0, 0, 1651, 128771, 8861, 0, 0, 1142,
- 0, 8271, 0, 983058, 126645, 12903, 0, 4002, 43626, 10442, 10676, 3344, 0,
- 0, 12920, 194560, 0, 0, 66642, 1277, 0, 7871, 0, 194686, 78853, 0, 78854,
- 120360, 0, 11784, 0, 78012, 4700, 66366, 78858, 120359, 11012, 0, 78856,
- 92400, 77879, 4973, 8784, 77877, 74804, 77874, 77869, 77871, 42440, 0,
- 43118, 0, 42364, 6774, 6773, 917560, 120369, 10346, 10410, 78859, 9243,
- 2464, 74263, 6108, 3372, 0, 6247, 43117, 74526, 7121, 74166, 0, 120355,
- 92537, 0, 0, 195034, 0, 0, 0, 70083, 3354, 195037, 4192, 9289, 118999,
- 41191, 3876, 0, 70067, 120660, 43696, 43380, 0, 983091, 0, 0, 11603,
- 983954, 0, 6589, 128588, 194679, 0, 0, 983700, 0, 0, 42572, 128264,
- 10630, 74827, 1963, 11622, 127098, 11654, 0, 7550, 10686, 5903, 0, 78009,
- 41329, 9662, 917937, 64698, 3366, 10399, 0, 5542, 11013, 127927, 128300,
- 0, 78621, 194672, 6925, 0, 0, 917929, 0, 11568, 983673, 43367, 64579,
- 917930, 7852, 0, 0, 6754, 6312, 0, 64672, 65296, 0, 118957, 0, 416,
- 12296, 68457, 73834, 68177, 11050, 10984, 92208, 0, 0, 92182, 0, 983605,
- 9532, 66355, 0, 983234, 917925, 64343, 195032, 128281, 195031, 0, 195030,
- 195057, 11445, 0, 2112, 195056, 128814, 10185, 1021, 128130, 9507, 10210,
- 74544, 8023, 1200, 12243, 78001, 5282, 78003, 9624, 11545, 0, 120493,
- 3343, 4424, 11047, 1885, 43268, 3896, 78444, 66497, 2947, 392, 7894,
- 4391, 68139, 983062, 13059, 74816, 77998, 3381, 7942, 0, 69219, 0, 64757,
- 0, 3913, 0, 0, 78235, 7044, 1265, 0, 6309, 7045, 7175, 7047, 78239,
- 11791, 0, 0, 8221, 78307, 41864, 0, 0, 0, 0, 167, 983906, 78301, 983653,
- 74211, 41897, 68477, 0, 917583, 983634, 94065, 2493, 0, 118811, 0, 0,
- 64354, 0, 8777, 0, 406, 8884, 2385, 0, 92450, 0, 917573, 43030, 42027,
- 12114, 0, 917579, 64936, 194695, 0, 120629, 10561, 0, 8365, 120539,
- 983774, 65841, 120787, 11601, 0, 74121, 0, 917575, 7834, 74159, 0,
- 917574, 10298, 6624, 4908, 917596, 1639, 0, 0, 74157, 6327, 6724, 0,
- 128086, 92566, 69910, 4817, 78446, 194759, 92536, 7043, 9600, 11022, 0,
- 0, 0, 0, 0, 0, 7548, 64794, 42050, 12291, 55289, 194761, 12343, 657,
- 195054, 42705, 4461, 1134, 1838, 78438, 2057, 0, 4468, 0, 0, 0, 4456,
- 5206, 10720, 0, 42523, 127520, 0, 0, 917595, 65550, 260, 4816, 67658,
- 10687, 0, 4821, 4466, 0, 195043, 4818, 195048, 41403, 119977, 0, 0,
- 41406, 43273, 74160, 119983, 73939, 92638, 119984, 119979, 41404, 1165,
- 119980, 4451, 13087, 0, 11284, 119987, 70097, 65155, 43014, 5439, 9363,
- 70070, 3375, 128869, 5900, 93990, 7889, 2722, 42262, 0, 0, 128774, 0,
- 2282, 0, 127810, 11401, 983822, 0, 68459, 0, 0, 0, 0, 65438, 0, 7280,
- 127887, 0, 127381, 4868, 8297, 119966, 118798, 0, 0, 43161, 0, 92360, 0,
- 5182, 0, 120542, 0, 0, 4226, 119243, 12135, 5732, 4464, 0, 71330, 977,
- 4458, 0, 0, 64770, 74838, 0, 344, 0, 194790, 1395, 64279, 0, 92240, 0,
- 786, 0, 43174, 64340, 0, 194767, 120723, 43026, 7612, 10132, 64413,
- 65025, 0, 0, 0, 93956, 0, 68444, 0, 92437, 0, 119160, 10204, 92656, 0,
- 127809, 983644, 1399, 983652, 65217, 0, 8852, 128571, 241, 128780, 4907,
- 0, 983639, 7932, 9727, 128873, 74255, 8748, 0, 0, 983643, 0, 42780, 0, 0,
- 0, 4217, 0, 8650, 0, 0, 0, 69900, 118872, 43099, 3965, 119119, 6719, 0,
- 13300, 78439, 93971, 43057, 66588, 118991, 0, 0, 73815, 4420, 0, 6410,
- 7760, 0, 0, 0, 0, 0, 7294, 0, 0, 0, 9066, 0, 11993, 43188, 2626, 7762, 0,
- 0, 0, 92601, 42825, 41854, 5304, 0, 78516, 6919, 8619, 119655, 10038,
- 66454, 9592, 42851, 126993, 1542, 92303, 0, 0, 0, 0, 74311, 78497, 0,
- 10181, 0, 43624, 0, 7779, 0, 10195, 9479, 6029, 0, 92268, 9689, 0, 65577,
- 8993, 66358, 0, 42378, 3368, 606, 127030, 7697, 69237, 69787, 2030, 0,
- 6027, 8370, 4322, 0, 65207, 0, 983339, 983338, 983337, 983336, 2735,
- 42831, 77935, 127120, 74866, 8881, 119047, 0, 0, 73946, 0, 0, 0, 68140,
- 983928, 9576, 128872, 3347, 4160, 5154, 55288, 3794, 66564, 8530, 127063,
- 7709, 41112, 983132, 66560, 42041, 4572, 12876, 66561, 983758, 6758,
- 983926, 1615, 5855, 809, 0, 92283, 128316, 128004, 5799, 983328, 70100,
- 983326, 7260, 983324, 43031, 64425, 65128, 78819, 64386, 65257, 0, 68616,
- 120607, 9347, 128067, 6532, 0, 0, 0, 127060, 65828, 0, 283, 68665, 78813,
- 532, 78663, 0, 983796, 120609, 0, 3370, 0, 11361, 5443, 78778, 8153,
- 73767, 0, 10741, 0, 2298, 0, 983917, 65495, 64706, 983318, 43344, 983316,
- 7144, 9466, 78866, 9824, 983311, 983310, 0, 0, 915, 43425, 0, 0, 0, 0,
- 127178, 43264, 70096, 0, 0, 43038, 78864, 6730, 78862, 68161, 64550,
- 5186, 7360, 127837, 0, 12108, 0, 65124, 43127, 66043, 0, 6326, 43107,
- 77826, 0, 42562, 0, 128821, 0, 128520, 11485, 6103, 127123, 983305,
- 11718, 983303, 12889, 92657, 127137, 0, 0, 0, 55245, 0, 1630, 128232,
- 65483, 0, 12565, 0, 65476, 120013, 0, 119554, 9283, 7700, 917537, 9690,
- 65499, 0, 64593, 512, 3376, 68210, 0, 128677, 77892, 632, 12940, 77891,
- 42529, 78587, 0, 5957, 110593, 8926, 983299, 983298, 128273, 10745,
- 10174, 7379, 64581, 5386, 120686, 11713, 10633, 69708, 5056, 0, 0, 0,
- 120773, 0, 9812, 0, 4460, 0, 0, 71307, 128038, 0, 0, 127174, 64278,
- 92370, 43466, 0, 0, 64389, 2953, 73879, 1801, 12835, 119029, 0, 73823, 0,
- 66375, 2085, 702, 42579, 77884, 77885, 13074, 77883, 983286, 983285,
- 128570, 12106, 983282, 74207, 1755, 10482, 12863, 77898, 1163, 2951,
- 9522, 74079, 78266, 66604, 0, 3384, 69227, 10702, 830, 77902, 77899,
- 77900, 8451, 0, 0, 0, 69739, 0, 0, 0, 0, 2908, 0, 43386, 64902, 4243, 0,
- 12239, 0, 0, 4441, 0, 983279, 73940, 64352, 127513, 983275, 411, 983273,
- 9199, 983271, 4056, 118992, 41890, 0, 2730, 41604, 983937, 5428, 194743,
- 3364, 42265, 64437, 127935, 118816, 194742, 9684, 216, 0, 1401, 128053,
- 44012, 0, 0, 92585, 9158, 77842, 69905, 5768, 0, 0, 0, 484, 194739, 0, 0,
- 65895, 0, 0, 3338, 73935, 572, 7041, 2736, 67605, 983263, 93962, 2794,
- 8807, 64491, 77847, 5438, 5222, 5381, 43114, 0, 5193, 5125, 5456, 5509,
- 77846, 194747, 9534, 0, 0, 0, 3430, 0, 0, 78717, 0, 981, 0, 4330, 73929,
- 120536, 1824, 10908, 0, 7034, 41683, 64617, 0, 73754, 3957, 64358, 64547,
- 128259, 674, 63991, 983249, 2946, 5354, 5251, 5328, 5307, 3759, 11411,
- 8364, 5123, 119628, 5281, 5469, 5121, 119245, 118993, 0, 5130, 0, 0,
- 77990, 0, 120726, 1221, 2733, 11746, 77991, 5216, 0, 0, 0, 0, 3468, 7033,
- 9230, 5939, 195052, 0, 0, 120677, 68400, 7278, 10321, 10289, 64613,
- 10385, 41706, 0, 0, 983413, 0, 11739, 983426, 41981, 0, 5938, 0, 43766,
- 12448, 7576, 10401, 10337, 73852, 0, 13057, 0, 126976, 0, 10009, 0,
- 41703, 983638, 12165, 0, 0, 9885, 0, 8077, 0, 127908, 0, 0, 0, 92457, 0,
- 4220, 10725, 10433, 0, 68395, 4987, 64519, 0, 128340, 0, 0, 0, 10970,
- 11733, 0, 120792, 0, 19944, 0, 9009, 8551, 92345, 11468, 64636, 7575, 0,
- 2724, 0, 0, 12313, 110592, 515, 119947, 42791, 63987, 78286, 119943,
- 119940, 119941, 119938, 9775, 4046, 4589, 4521, 68629, 9141, 0, 78850,
- 2741, 64399, 6197, 1370, 0, 0, 0, 0, 0, 0, 6184, 8606, 3303, 41372,
- 11786, 9473, 66203, 66177, 92446, 11593, 43007, 4478, 66178, 0, 0, 2744,
- 0, 4477, 118964, 814, 42066, 66183, 66204, 43786, 119961, 66198, 41880,
- 66188, 11623, 78148, 11955, 66190, 66191, 41111, 66189, 73788, 7788,
- 4847, 0, 127759, 0, 0, 0, 1581, 6535, 78161, 12954, 430, 78160, 55259,
- 78158, 128036, 5278, 4945, 42883, 4950, 983438, 68625, 983436, 7269, 0,
- 5964, 12908, 983555, 0, 74764, 74477, 119146, 194936, 4949, 983429, 443,
- 983427, 4944, 5467, 119603, 983254, 65137, 6044, 65392, 0, 4213, 0,
- 41303, 0, 194931, 119962, 41306, 73984, 2698, 127159, 0, 12072, 3193, 0,
- 41304, 824, 128676, 12091, 78893, 78894, 119816, 4673, 64804, 4678,
- 119820, 119819, 65059, 0, 6739, 0, 5481, 3490, 1199, 119811, 8356, 69947,
- 119832, 4677, 12688, 3102, 0, 4672, 78173, 78175, 5531, 68367, 42575,
- 78170, 78166, 4674, 4548, 44005, 119949, 68658, 119946, 8025, 68630,
- 127024, 1855, 983412, 68669, 983410, 92445, 127554, 0, 127339, 119652,
- 2745, 11797, 983418, 128159, 9202, 4654, 983414, 983416, 68638, 73993,
- 10525, 4649, 65209, 983417, 0, 4648, 43080, 983406, 983407, 983404, 6246,
- 64950, 7828, 4650, 6777, 6776, 6775, 4653, 7822, 78005, 92384, 43187,
- 8669, 983415, 6821, 65093, 0, 78881, 2716, 0, 983060, 983419, 0, 68369,
- 120054, 11060, 8547, 2711, 42165, 78027, 78026, 7992, 0, 0, 4662, 78033,
- 78032, 9149, 9146, 599, 2081, 78031, 78030, 194962, 4656, 10130, 68450,
- 7811, 40994, 194965, 6414, 5967, 4658, 3725, 5713, 5814, 4661, 42434,
- 983411, 0, 0, 64904, 9026, 10833, 74864, 7547, 4867, 0, 10008, 10222,
- 3054, 194956, 9744, 78860, 7605, 4622, 119656, 983395, 94070, 983393,
- 983394, 983391, 9045, 78888, 4225, 19926, 78887, 12880, 65307, 4617,
- 78883, 983386, 41732, 4616, 10518, 10423, 10359, 983380, 5958, 0, 983433,
- 4215, 9789, 917941, 4321, 4621, 983389, 41313, 522, 5368, 0, 65803, 0,
- 5366, 12201, 5372, 0, 983409, 0, 7720, 7390, 2696, 983400, 0, 4638,
- 983405, 1790, 78242, 5965, 64363, 66569, 68646, 127833, 5376, 1835, 5335,
- 194966, 128089, 4633, 0, 68119, 1180, 4632, 128093, 5387, 5333, 0, 0,
- 42094, 5331, 4634, 11928, 983594, 5338, 4637, 128170, 5971, 42414, 0,
- 1268, 65097, 42361, 0, 0, 73853, 1427, 0, 0, 5970, 3431, 0, 10358, 10422,
- 4758, 983374, 1608, 2738, 0, 10455, 4753, 74026, 11344, 4222, 6240, 5231,
- 74384, 983378, 68377, 6248, 983362, 983363, 983360, 42318, 92582, 5229,
- 4757, 0, 0, 2728, 4752, 64563, 65235, 5234, 0, 128145, 0, 10713, 7166, 0,
- 2622, 7460, 127302, 0, 0, 8954, 74760, 65189, 2632, 42617, 10108, 1011,
- 5574, 1853, 2709, 65139, 5577, 0, 0, 118871, 68641, 8965, 7635, 42177,
- 5316, 0, 5314, 6451, 5572, 66464, 5312, 0, 5525, 5330, 5319, 983420,
- 983872, 194907, 44003, 0, 983480, 983423, 120498, 127851, 195009, 983865,
- 74022, 983422, 64609, 68643, 120634, 983489, 5721, 983401, 5519, 8632,
- 66465, 11267, 73961, 92278, 5720, 983352, 1692, 4219, 4610, 8696, 4305,
- 0, 4609, 43478, 4614, 541, 983355, 5287, 5309, 5285, 68389, 5961, 4647,
- 56, 4216, 10577, 41381, 601, 4613, 983349, 983346, 77849, 4608, 64260,
- 41124, 5190, 67628, 0, 68145, 7086, 0, 67998, 67620, 0, 2734, 11074, 0,
- 67627, 43593, 0, 67625, 5960, 0, 8992, 42593, 128260, 1782, 67622, 68114,
- 119939, 0, 68180, 5501, 119952, 42508, 7442, 43665, 359, 41253, 68392,
- 6239, 119956, 41256, 0, 68134, 0, 74209, 917550, 9346, 69660, 41254,
- 128047, 43291, 3767, 5737, 0, 4865, 0, 5740, 917997, 5736, 4368, 64724,
- 7193, 68137, 0, 5739, 41024, 4866, 0, 73904, 983840, 4869, 120563, 0,
- 4223, 128201, 6650, 126509, 0, 983463, 127890, 4870, 120445, 68661, 6716,
- 78176, 68667, 68382, 68676, 127925, 10122, 4864, 66568, 4144, 7937, 0,
- 6245, 68652, 2732, 42734, 745, 0, 195097, 92195, 4777, 7821, 0, 68631,
- 42775, 0, 194954, 0, 3097, 0, 5966, 983486, 4778, 0, 10863, 0, 4781, 0,
- 64407, 0, 128323, 8577, 128562, 68196, 43285, 10216, 4782, 0, 0, 120757,
- 68618, 12325, 43056, 8717, 0, 0, 4776, 73818, 11492, 8700, 0, 13176,
- 68363, 10426, 0, 917599, 10362, 194706, 1715, 4849, 8242, 9561, 73922,
- 43278, 42635, 0, 0, 5963, 917926, 0, 0, 4850, 0, 1607, 466, 4853, 118995,
- 4854, 127918, 5164, 983870, 1350, 5124, 64420, 1993, 5362, 8471, 2708,
- 92471, 12445, 3785, 234, 3199, 0, 41268, 4848, 2530, 917909, 2068, 1964,
- 0, 73762, 10458, 0, 8576, 78543, 0, 2704, 4794, 0, 68211, 8322, 4797,
- 5753, 0, 2694, 4792, 0, 2439, 65104, 69804, 983424, 303, 983101, 92622,
- 983425, 2437, 0, 4221, 4844, 92216, 0, 0, 0, 70042, 0, 43292, 0, 2441,
- 10739, 65090, 0, 119327, 126541, 2451, 2714, 119326, 0, 43379, 4937,
- 43376, 753, 5849, 10597, 43089, 11722, 9248, 92555, 42879, 11725, 0, 0,
- 2726, 3107, 73958, 4941, 64937, 119233, 9140, 1408, 5261, 4607, 0, 181,
- 983430, 4942, 9539, 4938, 0, 65201, 5259, 9369, 64185, 4142, 5257,
- 983601, 0, 4964, 5264, 64178, 64177, 12979, 41411, 64182, 64181, 64180,
- 64179, 9482, 4873, 41231, 1822, 42526, 128581, 12758, 3865, 0, 0, 10500,
- 0, 119024, 78028, 92408, 9830, 43642, 389, 10893, 7521, 127879, 4872,
- 5463, 0, 3125, 9567, 0, 4878, 5459, 4604, 917931, 9557, 5465, 68617, 0,
- 11494, 126492, 9563, 10865, 74570, 43279, 64186, 983439, 78714, 64191,
- 64190, 8898, 64188, 0, 41030, 78836, 0, 917835, 78820, 917834, 0, 78805,
- 41031, 78801, 11960, 6745, 3082, 983437, 78539, 73919, 10573, 41744,
- 7079, 5856, 127043, 5163, 78809, 128162, 1817, 66724, 78538, 0, 10564,
- 7763, 13077, 41813, 4400, 41745, 64207, 10275, 8925, 10371, 10307, 41814,
- 4248, 0, 0, 4541, 6299, 64204, 64203, 64201, 64200, 64199, 64198, 126471,
+ 77836, 64528, 1169, 434, 41437, 1905, 6034, 41164, 64744, 9528, 67741,
+ 128800, 524, 0, 74029, 788, 74027, 194667, 71881, 0, 1663, 10419, 42901,
+ 42636, 67211, 67210, 129147, 120656, 67215, 67214, 67213, 67212, 0,
+ 67897, 74039, 0, 0, 11395, 0, 119107, 43612, 64344, 194732, 0, 10855,
+ 5445, 9355, 67221, 65198, 7391, 8989, 221, 65686, 983874, 119238, 8010,
+ 7191, 4962, 69772, 8855, 74612, 70820, 64469, 92592, 10555, 67227, 43333,
+ 67225, 128483, 120427, 10451, 67229, 67653, 7245, 12443, 74405, 9947,
+ 120149, 78317, 3873, 8367, 77842, 120146, 43433, 43649, 11987, 83343,
+ 983581, 11010, 11164, 74059, 74062, 6217, 5896, 43846, 7682, 74049, 1462,
+ 10235, 0, 0, 983325, 43441, 127924, 127777, 42595, 126641, 74402, 118860,
+ 78661, 120419, 92497, 66287, 120420, 92378, 120549, 119082, 64295,
+ 120418, 0, 64765, 73923, 83210, 120662, 69920, 194702, 6216, 67230,
+ 10755, 9455, 11155, 8124, 127042, 9470, 6944, 121125, 0, 69680, 2828, 0,
+ 531, 42638, 194804, 917856, 120961, 43428, 8204, 3614, 2827, 9696,
+ 120365, 0, 8728, 4354, 10904, 78562, 19936, 7833, 120691, 120850, 42599,
+ 42597, 42709, 68829, 125012, 0, 8537, 127306, 0, 9354, 121244, 121348,
+ 41199, 10121, 2028, 74950, 120253, 69715, 128525, 3062, 0, 74447, 12608,
+ 983657, 66440, 7545, 9700, 11948, 92205, 120777, 120502, 41155, 68306,
+ 74071, 0, 983459, 12713, 127519, 70402, 0, 78772, 113770, 1734, 0, 78141,
+ 127040, 64594, 2456, 231, 68227, 74167, 542, 917981, 118786, 983859,
+ 194797, 1230, 125018, 121343, 3597, 4446, 10584, 74235, 92215, 4037,
+ 67737, 8352, 78436, 5687, 127018, 64515, 121378, 194801, 55265, 67846,
+ 78434, 9704, 0, 194573, 70080, 71338, 0, 8660, 126478, 0, 128569, 78773,
+ 74482, 4483, 1709, 69721, 9909, 6080, 194851, 120358, 1746, 1315, 8667,
+ 983101, 0, 13140, 65899, 10604, 0, 4480, 11266, 121114, 1226, 6930,
+ 67979, 195019, 6360, 10897, 41230, 605, 68302, 74785, 69875, 0, 121478,
+ 41500, 0, 311, 11453, 6221, 10608, 64943, 67682, 10877, 118868, 64885,
+ 74272, 0, 194672, 128559, 120736, 74312, 345, 124933, 74456, 64606, 9917,
+ 0, 74855, 5037, 119912, 1776, 8422, 128935, 118814, 41508, 41201, 323,
+ 43328, 0, 42698, 1295, 194853, 4625, 77855, 4630, 13117, 83002, 128772,
+ 65123, 11293, 2668, 11288, 0, 42640, 65666, 2519, 92369, 65420, 92479, 0,
+ 4252, 5049, 42659, 119011, 706, 7754, 10854, 8738, 983949, 65419, 0,
+ 128496, 649, 65421, 0, 66702, 983721, 12670, 1013, 0, 64919, 705, 0,
+ 65422, 127803, 1183, 126519, 7017, 42852, 917826, 8157, 9736, 64503,
+ 65418, 129050, 983878, 74035, 194918, 11913, 73874, 6696, 120916, 8920,
+ 119298, 128426, 7962, 12211, 9837, 2051, 66227, 0, 4184, 119825, 128598,
+ 10177, 73777, 1857, 194657, 4626, 8464, 8472, 68844, 4629, 8499, 74627,
+ 78322, 4624, 7818, 118861, 128108, 0, 7805, 128754, 94007, 6935, 92292,
+ 78325, 78326, 78323, 43327, 43989, 119046, 8492, 8250, 8459, 0, 8497,
+ 8496, 83499, 74582, 75052, 78339, 9543, 67860, 78332, 77832, 65849,
+ 77831, 983961, 194649, 12451, 74376, 8684, 128301, 6102, 0, 5298, 917847,
+ 5294, 0, 83016, 68043, 195062, 9949, 83014, 43617, 119215, 0, 12073, 0,
+ 128646, 77863, 13108, 120617, 11439, 41468, 83012, 0, 5292, 55272,
+ 983883, 1939, 5302, 3970, 917877, 12455, 1793, 124982, 0, 75036, 6643,
+ 92477, 65263, 0, 78330, 41293, 78328, 65923, 78835, 13219, 9569, 129041,
+ 74383, 0, 74197, 129089, 5500, 8813, 0, 128612, 68860, 5322, 120944,
+ 78340, 43631, 5324, 66443, 3784, 41614, 65269, 6230, 78349, 78345, 13282,
+ 3360, 78344, 11523, 0, 92488, 9926, 7197, 128248, 68429, 42894, 41821,
+ 1249, 78360, 78361, 78356, 78358, 78353, 64899, 64763, 41149, 41807,
+ 43162, 41815, 41150, 128911, 10571, 10096, 67161, 67160, 67159, 6947,
+ 41152, 887, 9249, 6565, 78510, 41990, 78509, 41811, 67157, 93966, 6670,
+ 67175, 67174, 0, 43092, 43325, 67178, 10168, 67176, 9781, 68248, 9190,
+ 128497, 9666, 8269, 65944, 74005, 13019, 11670, 69860, 315, 12813,
+ 129132, 72409, 78256, 72408, 78352, 0, 75063, 0, 0, 1378, 9509, 194634,
+ 92996, 72407, 3066, 92220, 67847, 72406, 92355, 917890, 78365, 8787,
+ 67189, 194616, 41618, 194615, 78261, 127384, 0, 64652, 121222, 121012, 0,
+ 78366, 42088, 71040, 195061, 7176, 43756, 10137, 6121, 10995, 78259,
+ 71050, 8119, 64874, 71052, 78174, 128690, 128630, 74525, 0, 0, 12930,
+ 1394, 74514, 128413, 74515, 983727, 67184, 2998, 9527, 67181, 65190,
+ 12977, 42090, 67185, 983647, 119100, 41236, 92235, 42005, 42003, 41237,
+ 5848, 67193, 67192, 3670, 67190, 67197, 67196, 67195, 7890, 128070,
+ 11298, 43315, 983315, 6229, 1593, 0, 125120, 619, 4635, 65080, 127158,
+ 12194, 4120, 65337, 65336, 128407, 11808, 67199, 67198, 9366, 42790,
+ 42006, 119115, 65327, 65326, 65325, 10757, 1507, 42216, 65321, 65320,
+ 43947, 65334, 43946, 65332, 65331, 42059, 65329, 42689, 92427, 9128,
+ 94045, 42073, 6785, 64590, 983830, 4371, 7196, 65318, 2035, 65316, 4106,
+ 65314, 65313, 42074, 127847, 41228, 120862, 65609, 41241, 7903, 41239,
+ 43533, 78459, 7189, 0, 0, 43941, 12357, 42802, 78450, 8487, 9131, 66292,
+ 4615, 12695, 127752, 0, 12175, 0, 64535, 0, 7809, 0, 121351, 562, 12169,
+ 6590, 69762, 66455, 64738, 3219, 68654, 121096, 128281, 1037, 128677,
+ 2025, 128263, 13098, 78442, 10637, 4568, 549, 1570, 43839, 2835, 83052,
+ 10624, 43623, 11072, 83045, 128523, 83046, 12606, 78433, 2825, 83048,
+ 10825, 8079, 2821, 41046, 92327, 7365, 83043, 120593, 13071, 121288, 452,
+ 41049, 42840, 6346, 2831, 5461, 74596, 11465, 5212, 917917, 64703,
+ 119191, 42308, 7181, 0, 41332, 0, 12333, 41047, 1668, 119849, 121150,
+ 128275, 1187, 983387, 42628, 78575, 82953, 71863, 82955, 3240, 128518,
+ 12151, 0, 11591, 41065, 5323, 8166, 0, 118932, 0, 66827, 1623, 65297,
+ 128856, 571, 0, 4918, 0, 5288, 127295, 1541, 65048, 1909, 8864, 0, 66402,
+ 10736, 92508, 11571, 7615, 70476, 92296, 4237, 92576, 1035, 65815, 68083,
+ 3567, 701, 65936, 3489, 120899, 70462, 70172, 11403, 0, 0, 82986, 3796,
+ 6800, 70472, 3994, 11421, 74611, 195076, 195078, 68036, 0, 0, 64857,
+ 83508, 2855, 74418, 66308, 41621, 68214, 83513, 127817, 10654, 82945,
+ 119226, 12164, 3246, 7906, 43972, 65847, 7182, 0, 13024, 66276, 74270,
+ 83069, 125090, 121115, 0, 1496, 747, 0, 942, 2378, 43136, 83031, 8466,
+ 83075, 9320, 8001, 1232, 8139, 11617, 74637, 0, 11409, 68373, 6382,
+ 126500, 64634, 92362, 70202, 11612, 93008, 67600, 2374, 94066, 8475,
+ 11609, 66313, 92568, 0, 5286, 119297, 83059, 983253, 64925, 120283,
+ 127204, 118982, 71905, 7705, 11942, 11305, 127203, 3309, 82979, 9206,
+ 82980, 113824, 6802, 70353, 41653, 1280, 1241, 7168, 12096, 0, 66615,
+ 42565, 41651, 0, 917627, 83042, 41650, 66507, 66470, 74472, 12914, 41491,
+ 43901, 94106, 6078, 9954, 78822, 1475, 119247, 9938, 6084, 917546, 41064,
+ 41062, 0, 113680, 3256, 10189, 42076, 43252, 78823, 68089, 8727, 120922,
+ 65875, 0, 0, 127762, 10562, 74215, 43065, 120906, 0, 3248, 74297, 3261,
+ 9015, 71351, 0, 3635, 64337, 92759, 125054, 0, 7195, 83346, 2007, 64431,
+ 195075, 0, 92197, 127090, 635, 0, 129082, 65613, 77909, 92420, 73997,
+ 128510, 121457, 43905, 7984, 8600, 74434, 127770, 4176, 70050, 2034,
+ 78423, 11154, 65891, 127038, 0, 318, 2038, 128544, 78596, 194602, 3649,
+ 13149, 42145, 42798, 3634, 120291, 71885, 67677, 120124, 7866, 75045,
+ 11402, 42146, 94032, 74238, 42664, 2849, 127034, 0, 7938, 12960, 1761,
+ 11812, 65379, 68386, 128185, 1159, 71183, 69729, 0, 120797, 7178, 120851,
+ 983836, 41680, 128469, 83098, 11534, 1514, 11668, 67891, 9313, 7015,
+ 128490, 67877, 194561, 12989, 66474, 9368, 12848, 1624, 43270, 0, 74278,
+ 10818, 83091, 9953, 194895, 78421, 1194, 3242, 9761, 9555, 8598, 120299,
+ 6169, 12871, 1551, 2798, 65176, 4958, 42752, 119025, 917924, 67875,
+ 120301, 3495, 66648, 125079, 83354, 68364, 120779, 4891, 0, 10641, 0,
+ 73746, 120945, 68352, 0, 73787, 128858, 127094, 7199, 11131, 0, 0, 0,
+ 983852, 126979, 42685, 42679, 193, 78789, 0, 0, 42667, 0, 5271, 68323,
+ 92517, 83356, 1362, 13297, 0, 71880, 0, 983333, 73789, 0, 6658, 4426, 0,
+ 66830, 983842, 83103, 7276, 42163, 5220, 0, 78621, 67822, 2416, 3310,
+ 42703, 83107, 379, 0, 43755, 70504, 43647, 3223, 65492, 1284, 194771,
+ 4549, 194738, 0, 71253, 70784, 10807, 9558, 93027, 0, 8515, 8688, 12866,
+ 65308, 3294, 83143, 8529, 128101, 43385, 7564, 0, 43329, 83148, 92458,
+ 73757, 66456, 42359, 128439, 2031, 983890, 7202, 128232, 12676, 42729,
+ 74777, 3215, 120982, 7710, 1610, 73801, 128807, 0, 65682, 0, 43917,
+ 65924, 9974, 228, 43922, 1501, 127994, 64395, 5179, 7200, 6225, 118927,
+ 42999, 1725, 65533, 8196, 7476, 74399, 0, 66868, 7152, 8502, 5762, 1967,
+ 7483, 43898, 0, 8104, 70128, 7474, 43914, 83080, 126507, 10414, 13001,
+ 8141, 983239, 42537, 1557, 43594, 128642, 6330, 6805, 8631, 2545, 42934,
+ 127166, 0, 74190, 128477, 70410, 983786, 42762, 194708, 42914, 1650, 262,
+ 1637, 128502, 7901, 3238, 83026, 41861, 0, 120211, 65158, 10860, 74959,
+ 43658, 7527, 83086, 43319, 6419, 0, 45, 0, 64588, 93989, 127753, 119810,
+ 7194, 5291, 0, 43666, 13129, 128684, 9084, 121039, 8737, 983165, 12881,
+ 75066, 12906, 9639, 7912, 2620, 983882, 3564, 0, 69978, 179, 43644,
+ 75049, 64756, 2853, 78443, 118813, 129042, 70347, 119009, 2850, 8084,
+ 983085, 73850, 2801, 92284, 42069, 119839, 74754, 83522, 42072, 92736,
+ 119842, 10398, 83386, 83523, 8377, 119312, 8245, 68401, 3158, 92396,
+ 3983, 43656, 923, 119857, 92470, 292, 11119, 119845, 119844, 3221, 1763,
+ 92463, 4612, 67729, 119850, 7253, 70456, 68391, 75002, 10782, 3637,
+ 12996, 43542, 113676, 64578, 83449, 3228, 69636, 8783, 983632, 119614,
+ 2731, 0, 120833, 78585, 4102, 7696, 73878, 121417, 128132, 70813, 43316,
+ 4177, 11283, 9089, 120918, 73996, 121111, 64500, 43674, 0, 64947, 1856,
+ 0, 0, 6379, 917804, 11142, 127176, 3208, 12975, 74775, 127380, 983931,
+ 92389, 74072, 55269, 0, 124962, 983683, 2033, 78577, 78576, 82965, 55254,
+ 7740, 82974, 70448, 126555, 73964, 68505, 93988, 67612, 65674, 128244,
+ 94110, 41689, 0, 74006, 64909, 6646, 11790, 74019, 128520, 128066,
+ 128031, 8561, 4573, 121375, 5326, 92571, 120605, 7230, 8257, 121415,
+ 8778, 41688, 0, 65776, 2071, 8314, 6459, 43511, 7628, 65092, 73903,
+ 64355, 11342, 128561, 0, 983434, 128226, 127001, 0, 11810, 13164, 10723,
+ 967, 983335, 120985, 11946, 983602, 3257, 127209, 12307, 1845, 129072,
+ 43526, 0, 119573, 1886, 42342, 10089, 870, 7648, 3499, 7662, 7652, 876,
+ 871, 877, 7665, 878, 42015, 879, 43692, 4563, 0, 917892, 7591, 65887,
+ 867, 9520, 872, 7656, 868, 873, 7642, 7659, 869, 874, 7644, 120674, 875,
+ 790, 128303, 118938, 195053, 93038, 66182, 194623, 5429, 195055, 66180,
+ 126480, 66181, 68452, 983291, 127214, 42067, 0, 5433, 10657, 7911,
+ 125119, 1547, 66176, 42012, 120576, 5425, 4977, 9999, 5317, 5423, 4611,
+ 125094, 67637, 127286, 9679, 74122, 92978, 917585, 0, 66194, 4418, 66184,
+ 4628, 4245, 119648, 0, 127263, 1851, 124995, 83320, 11908, 0, 9360,
+ 118897, 120874, 42776, 66187, 12837, 8829, 7711, 11112, 0, 92321, 43318,
+ 92302, 8809, 69881, 0, 126518, 120604, 983052, 983277, 983433, 128412, 0,
+ 120577, 7427, 9958, 4588, 43680, 0, 74484, 127185, 2433, 128602, 69973,
+ 3352, 74363, 128668, 121341, 793, 74404, 11197, 305, 567, 67662, 842,
+ 69979, 8208, 68308, 41695, 1647, 118877, 70841, 7837, 917625, 818, 5337,
+ 194628, 917621, 41376, 119978, 68742, 120594, 74086, 68777, 70179,
+ 917613, 10973, 66359, 1372, 127172, 917608, 4969, 1254, 917605, 194654,
+ 93967, 917602, 65228, 78221, 126612, 67723, 2840, 983905, 78829, 983939,
+ 66887, 3245, 9068, 68194, 64725, 121161, 128051, 12991, 124971, 2651,
+ 68016, 983267, 127326, 125038, 70835, 0, 70844, 43648, 120812, 917833,
+ 43322, 92662, 0, 0, 64372, 92698, 3226, 655, 752, 7457, 7456, 7452, 3285,
+ 74894, 11152, 92903, 65610, 2391, 92908, 92248, 671, 250, 7434, 618, 668,
+ 610, 42800, 7431, 1152, 42801, 640, 120666, 7448, 7439, 628, 3905, 73810,
+ 128340, 128266, 64749, 67850, 2107, 128290, 74249, 4605, 128174, 983192,
+ 43372, 65945, 127249, 11113, 119590, 0, 0, 70495, 987, 6927, 11572,
+ 42261, 11464, 3365, 9971, 0, 983951, 128297, 0, 78762, 127867, 121368,
+ 11334, 43326, 12609, 11519, 11503, 5530, 5210, 0, 4627, 119269, 5208, 0,
+ 70090, 10332, 2424, 7976, 9156, 0, 3244, 5529, 69647, 73894, 128852,
+ 5432, 64965, 5527, 42315, 10516, 7790, 5528, 128838, 42140, 120281, 0,
+ 983777, 43545, 9887, 121477, 4000, 7429, 7428, 665, 7424, 3206, 120278,
+ 7884, 0, 128566, 74910, 128666, 211, 2509, 92904, 70822, 68672, 3220,
+ 42235, 78480, 10690, 8951, 5214, 42474, 8118, 0, 7048, 4590, 127258,
+ 5852, 0, 78482, 127259, 1708, 0, 78481, 2623, 11943, 128700, 69226,
+ 69974, 4698, 66509, 1066, 119921, 4701, 983876, 120285, 70447, 94111,
+ 8267, 0, 1421, 66426, 7516, 127552, 2625, 983641, 8034, 74309, 0, 3631,
+ 10955, 7850, 120293, 8416, 0, 983065, 0, 43384, 12660, 128693, 128270, 0,
+ 74850, 41069, 70185, 128156, 12099, 4310, 10032, 6252, 713, 7990, 983489,
+ 3990, 125050, 983264, 66368, 5017, 64956, 7071, 0, 70457, 1030, 118800,
+ 92563, 9513, 41059, 9357, 74988, 1773, 77939, 120350, 124961, 6339, 7745,
+ 9844, 127220, 64650, 94, 1880, 74766, 113719, 8908, 983222, 128707,
+ 65913, 78470, 10752, 13003, 68769, 126572, 41307, 8732, 120336, 0, 1757,
+ 6964, 4696, 0, 120333, 64785, 7394, 3641, 5419, 128055, 0, 127883,
+ 194707, 120344, 43988, 70423, 8610, 43062, 7592, 856, 74299, 936, 13289,
+ 69894, 43171, 1459, 128224, 65243, 78638, 19953, 129078, 1504, 70064, 0,
+ 12913, 74206, 7529, 128745, 127868, 70203, 120782, 4113, 120929, 2372,
+ 336, 0, 7509, 12152, 194885, 682, 7655, 41505, 0, 64743, 10593, 1703,
+ 92467, 77911, 8033, 69953, 0, 9810, 127269, 120013, 12970, 0, 42351,
+ 10109, 74535, 74068, 74921, 0, 92690, 0, 65068, 74291, 1965, 7069, 43312,
+ 0, 73887, 11130, 2087, 64370, 6314, 41714, 8501, 11145, 121117, 74239,
+ 41317, 92614, 2091, 74545, 2090, 69912, 9353, 7117, 2077, 77886, 11161,
+ 10498, 2083, 77888, 71196, 0, 119236, 634, 124970, 92290, 194886, 69779,
+ 4165, 8746, 195048, 9654, 12856, 6924, 7660, 7066, 194693, 70415, 128135,
+ 41037, 42692, 7786, 12959, 41039, 127483, 124965, 680, 2302, 128200,
+ 1181, 7056, 3174, 67248, 0, 92668, 65665, 127375, 113776, 6920, 0, 92295,
+ 126606, 118965, 68318, 64644, 126981, 74119, 68238, 41028, 74025, 6231,
+ 2613, 65302, 40989, 68239, 68230, 68234, 42760, 0, 43896, 0, 40987, 4667,
+ 0, 71843, 8828, 77995, 70506, 1246, 4746, 128501, 128508, 11021, 4749,
+ 92675, 917882, 921, 4744, 0, 12702, 242, 0, 1566, 8217, 127210, 64653,
+ 78386, 74617, 74036, 74505, 43274, 5313, 951, 74568, 92983, 983867, 7604,
+ 983292, 4009, 70277, 71844, 120562, 0, 983720, 64860, 119138, 119069, 0,
+ 127370, 4048, 983598, 83009, 70024, 1646, 77890, 64534, 73995, 120705,
+ 129047, 119890, 2579, 119905, 3177, 11357, 9099, 4107, 3441, 119894,
+ 2975, 74442, 9822, 983935, 55220, 10084, 73943, 118840, 0, 917562, 78299,
+ 3399, 9851, 917609, 11909, 9059, 0, 7687, 0, 6789, 127767, 0, 71842,
+ 70178, 92314, 0, 1777, 9151, 1137, 66867, 749, 42366, 70444, 5385, 70791,
+ 72435, 70127, 83377, 5989, 128905, 74636, 120848, 0, 41685, 69223, 0,
+ 9769, 41684, 194737, 519, 119231, 11740, 5766, 0, 0, 2600, 8848, 70416,
+ 41297, 0, 3666, 70420, 41300, 74468, 65160, 0, 69688, 69771, 74479, 0,
+ 6558, 127149, 128064, 69765, 92775, 252, 0, 41302, 119350, 83504, 118839,
+ 69763, 68762, 11729, 8719, 9060, 129091, 120139, 10761, 0, 0, 129410,
+ 118792, 11734, 93011, 11730, 113741, 9593, 5757, 2403, 64808, 55275, 0,
+ 11728, 43572, 983139, 0, 7764, 68741, 11094, 120825, 0, 43489, 4282,
+ 8298, 0, 0, 70328, 194986, 70324, 64449, 0, 126650, 63854, 8456, 65587,
+ 70442, 65670, 983963, 78250, 0, 7774, 10607, 9792, 983869, 70326, 0,
+ 71460, 120764, 70322, 10019, 74762, 0, 3458, 4365, 70053, 983712, 3647,
+ 120207, 2602, 128341, 121103, 125043, 41135, 83498, 0, 121325, 64631,
+ 172, 4971, 41219, 41137, 1889, 7238, 6545, 126476, 77926, 7597, 10528,
+ 75054, 0, 3732, 73910, 194588, 5344, 983971, 43366, 43363, 9062, 119252,
+ 121441, 92528, 0, 64479, 9232, 92596, 83330, 113707, 194712, 10900,
+ 41531, 1263, 3720, 12048, 74075, 64292, 41524, 7227, 119635, 6099, 41534,
+ 0, 127354, 127345, 299, 83022, 8525, 127347, 3524, 917565, 8831, 127349,
+ 92564, 3075, 67867, 94053, 0, 66362, 0, 64353, 70440, 0, 5845, 121310, 0,
+ 121185, 2581, 8200, 65114, 68460, 983693, 43283, 5551, 0, 120735, 983201,
+ 6340, 118855, 121027, 78134, 8680, 7204, 70065, 2588, 2914, 7011, 55281,
+ 0, 2471, 194631, 2883, 2749, 119563, 73774, 10913, 83116, 983086, 8666,
+ 675, 42493, 121297, 43571, 0, 6219, 128584, 9980, 41232, 10928, 0, 41153,
+ 41229, 118967, 0, 3738, 94016, 983243, 12711, 3181, 66212, 74289, 68472,
+ 42857, 8262, 93036, 0, 74476, 0, 42347, 12092, 9615, 7234, 74047, 983088,
+ 128137, 43744, 0, 0, 73846, 2934, 12722, 120762, 922, 43983, 74507,
+ 983126, 74461, 3218, 120471, 74290, 120469, 64562, 120475, 8569, 11404,
+ 11932, 73728, 3214, 11212, 120468, 12128, 3207, 65486, 78729, 1901,
+ 78727, 65667, 120460, 7425, 3205, 68003, 78737, 78736, 78735, 43383,
+ 69940, 65459, 2606, 78730, 73897, 129043, 11496, 1173, 0, 41272, 119661,
+ 0, 0, 83178, 120737, 120953, 194773, 983322, 378, 2610, 983328, 65079,
+ 983327, 65695, 121220, 37, 7068, 0, 120480, 68236, 3209, 120477, 120835,
+ 10638, 9768, 69952, 119909, 71486, 92225, 983953, 983340, 0, 43840, 0, 0,
+ 5233, 983337, 64792, 71233, 128223, 126633, 128919, 7060, 9847, 120144,
+ 1685, 595, 83197, 70428, 1292, 8940, 7380, 11088, 0, 10004, 126997, 0,
+ 6541, 43837, 71465, 121030, 3243, 9014, 5606, 125032, 538, 64620, 5602,
+ 8467, 74391, 6547, 71466, 8203, 66420, 68241, 8458, 65211, 8495, 92311,
+ 127481, 917552, 779, 78314, 64367, 2465, 69901, 8193, 55279, 9730, 9280,
+ 120913, 7065, 74155, 4346, 113690, 73798, 504, 125115, 92414, 8982, 0,
+ 121471, 119170, 782, 129028, 10883, 128446, 194852, 732, 3737, 121188,
+ 1548, 68650, 92507, 1832, 5604, 5735, 41141, 119020, 4376, 983372, 11787,
+ 3745, 917868, 119885, 42888, 65712, 127913, 3869, 11937, 5725, 127539,
+ 1783, 7416, 5728, 0, 128457, 119554, 11918, 66567, 5724, 127965, 5727,
+ 78521, 121121, 0, 764, 0, 121011, 43531, 113670, 9033, 127182, 42532,
+ 6223, 11042, 120749, 11423, 74852, 119861, 68303, 43465, 0, 74767, 6559,
+ 64557, 71348, 92649, 120648, 43019, 43477, 10238, 74491, 128711, 43377,
+ 92282, 71346, 1478, 9783, 11825, 2607, 64740, 113689, 7739, 74543,
+ 917765, 67393, 0, 6132, 0, 63765, 128396, 70058, 41144, 71899, 92438,
+ 43537, 6761, 10093, 4369, 917791, 128394, 194776, 8820, 3947, 0, 65299,
+ 11515, 526, 128103, 41295, 194603, 125002, 194932, 113691, 7688, 917786,
+ 7686, 8288, 11815, 983188, 121411, 983384, 1543, 3713, 41221, 12423,
+ 42281, 78544, 74024, 12293, 983680, 64357, 11794, 42082, 128125, 1737,
+ 8987, 42081, 0, 7205, 83264, 9335, 12850, 119173, 6553, 7055, 68041,
+ 8277, 0, 67751, 5475, 74795, 6780, 65067, 0, 1327, 1160, 42084, 93963,
+ 41217, 119660, 10018, 360, 129070, 983865, 68176, 5863, 3137, 0, 4147,
+ 983170, 41216, 7844, 2616, 70197, 68461, 65234, 68341, 13076, 3135,
+ 983289, 78143, 119139, 3142, 92451, 94068, 10819, 119580, 10183, 74635,
+ 2608, 1470, 73967, 94008, 6227, 121257, 83268, 65236, 917878, 6163,
+ 983558, 113728, 127314, 128138, 983236, 8603, 127959, 119866, 3306,
+ 10876, 43392, 83187, 127931, 5751, 127517, 6222, 0, 127466, 12086, 7403,
+ 1600, 64309, 64939, 0, 64783, 92658, 11310, 0, 8882, 119903, 0, 2570,
+ 7021, 74902, 194742, 43110, 0, 1234, 6540, 6974, 92750, 0, 983211, 5002,
+ 983563, 41286, 69946, 74465, 71074, 43585, 113720, 6551, 983375, 128229,
+ 983274, 41289, 125130, 71080, 127958, 8977, 602, 120814, 0, 128350,
+ 128661, 194890, 983377, 41279, 0, 0, 94108, 11081, 43615, 0, 0, 127888,
+ 983612, 12727, 43895, 0, 78397, 9475, 7112, 65105, 0, 9633, 10886, 43592,
+ 7831, 983829, 194571, 0, 73915, 8076, 43048, 8290, 8291, 43051, 92570, 0,
+ 2596, 43584, 120983, 13113, 0, 127757, 2393, 7058, 9087, 74067, 68673,
+ 41574, 78337, 70498, 42900, 6376, 0, 0, 0, 0, 9854, 127748, 64696, 73879,
+ 128220, 120752, 6994, 0, 1720, 0, 0, 0, 6529, 7063, 983179, 3751, 9120,
+ 983487, 68038, 1798, 709, 0, 1354, 1876, 13152, 6557, 12430, 8137, 94098,
+ 67752, 70850, 119057, 245, 121066, 11456, 41233, 7070, 0, 94046, 6136,
+ 68304, 65677, 8682, 41235, 92595, 42045, 9804, 118963, 432, 3595, 127015,
+ 65437, 0, 74455, 42399, 983136, 0, 128274, 0, 119658, 128184, 0, 0,
+ 77894, 8797, 0, 9052, 64888, 7167, 2356, 95, 74784, 10580, 0, 42286,
+ 71123, 64640, 69999, 94109, 120877, 74137, 70035, 10063, 12652, 12199,
+ 74622, 43492, 2566, 11971, 983737, 120882, 1065, 0, 127005, 43400, 2576,
+ 66696, 66819, 83333, 43604, 127891, 0, 3201, 514, 74502, 70032, 2921,
+ 43215, 64493, 5772, 12968, 70055, 194944, 70310, 43398, 2580, 195025,
+ 41341, 41223, 6564, 1463, 41342, 0, 5293, 70020, 127870, 3733, 11346, 0,
+ 12054, 0, 74098, 42827, 195074, 13091, 0, 128580, 0, 917915, 127961,
+ 127025, 128334, 74821, 71104, 66295, 68037, 0, 121116, 13090, 66643, 0,
+ 1270, 1132, 42360, 0, 74096, 66655, 42569, 127824, 66898, 64761, 0,
+ 41021, 8510, 42432, 119898, 119317, 194782, 194641, 64496, 74109, 70030,
+ 9915, 983083, 983218, 7061, 41336, 3854, 69700, 13141, 68413, 43401,
+ 42319, 13082, 78114, 7067, 68221, 127881, 127383, 127171, 0, 120745,
+ 74209, 9029, 43543, 70836, 2353, 6308, 129154, 74792, 2611, 119186,
+ 66881, 127241, 65063, 43664, 92319, 66627, 92912, 4484, 8509, 118976,
+ 11066, 65233, 127146, 41224, 41017, 128149, 3747, 10522, 0, 194876, 1691,
+ 41226, 74962, 12107, 7100, 10905, 65010, 121299, 697, 66018, 9284, 4244,
+ 983343, 93058, 74781, 13121, 120036, 0, 12010, 128573, 128221, 120949,
+ 121032, 0, 127193, 65816, 68111, 118950, 127933, 65668, 92257, 6618,
+ 3562, 66365, 0, 42234, 12648, 78110, 7123, 70038, 5785, 9198, 9764,
+ 41316, 65877, 7383, 13230, 41299, 0, 0, 68365, 128258, 195027, 0, 0,
+ 13122, 0, 191, 70060, 8585, 8000, 64411, 120652, 42889, 64850, 41072,
+ 41578, 983104, 41577, 0, 10002, 121364, 6533, 73802, 41570, 917919, 683,
+ 396, 41580, 68146, 983067, 12901, 43058, 0, 343, 7129, 42680, 41360,
+ 78154, 983397, 4743, 69987, 0, 74040, 74108, 8743, 1724, 1433, 119322,
+ 128665, 3739, 6263, 71349, 128811, 3964, 6592, 121424, 68288, 66040,
+ 82946, 42568, 69806, 128113, 1778, 3956, 128443, 42070, 6563, 43075,
+ 9018, 94006, 983398, 12067, 41312, 92763, 5547, 8916, 120869, 128950,
+ 8175, 94034, 284, 8108, 934, 128039, 74001, 173, 66460, 7174, 92703,
+ 118822, 1750, 128686, 4394, 68368, 1807, 983888, 92298, 0, 5889, 128795,
+ 7180, 0, 67127, 0, 67126, 42471, 6982, 1721, 44022, 7891, 42243, 42160,
+ 2583, 4512, 119360, 65230, 128109, 0, 917630, 3855, 194810, 11767,
+ 127998, 0, 74295, 194651, 0, 92416, 3975, 67125, 74087, 74989, 12672,
+ 3798, 2703, 194608, 0, 2109, 9774, 1275, 0, 983750, 41095, 3962, 68242,
+ 2932, 41101, 3954, 6457, 4513, 74536, 127189, 73994, 73992, 1468, 120033,
+ 983057, 41803, 127999, 41846, 127244, 55238, 7633, 41849, 68385, 4320,
+ 3224, 113734, 92741, 66281, 42531, 74593, 1510, 128384, 8256, 0, 11393,
+ 0, 8879, 128075, 92474, 8770, 72416, 120811, 72415, 1910, 8671, 78374,
+ 4283, 68842, 120824, 68361, 78318, 2654, 7893, 195006, 128241, 0, 72394,
+ 65106, 42761, 12857, 4581, 8411, 78372, 78371, 78370, 78369, 78368,
+ 74475, 983444, 0, 1733, 4392, 2568, 10786, 69661, 0, 8184, 41486, 0,
+ 7396, 7116, 0, 69788, 0, 7185, 7965, 119144, 128447, 92347, 195066,
+ 41350, 9129, 983448, 0, 2294, 64501, 68034, 83326, 10481, 0, 70022, 7171,
+ 0, 340, 71105, 93972, 67360, 0, 92200, 128249, 124979, 6764, 127487,
+ 128393, 0, 92509, 128962, 65203, 11392, 119098, 119359, 119073, 3210, 0,
+ 0, 118795, 82958, 94101, 127484, 917619, 119149, 0, 10043, 121215, 1186,
+ 41571, 6999, 617, 9464, 125123, 3675, 5207, 65062, 5213, 74616, 2617,
+ 41348, 41568, 128803, 3253, 120535, 0, 8630, 121209, 0, 5596, 5545, 7288,
+ 2586, 64887, 119826, 5217, 71336, 128687, 917614, 121038, 64293, 68098,
+ 2635, 92760, 83137, 983846, 0, 92742, 7835, 70040, 120707, 194988, 92285,
+ 64558, 127122, 121425, 67083, 67085, 70099, 71118, 5784, 983102, 195050,
+ 983812, 70033, 4011, 194565, 68101, 124978, 7864, 4254, 65095, 983498,
+ 5600, 3903, 127083, 10447, 5598, 1207, 120521, 66689, 3501, 42582, 43600,
+ 129054, 127103, 1124, 5597, 194778, 194772, 9321, 983486, 75040, 983484,
+ 67400, 1719, 68356, 68354, 9671, 1125, 4399, 68775, 66274, 983490, 7631,
+ 5488, 7128, 120532, 0, 5491, 118797, 8937, 43044, 2604, 74187, 5490,
+ 43046, 5489, 7212, 11768, 43043, 6300, 127121, 7122, 983090, 4390, 454,
+ 41397, 0, 9875, 7593, 194791, 92274, 118913, 7207, 0, 65901, 2394, 2575,
+ 119184, 3746, 11016, 65752, 92757, 0, 43423, 128683, 11989, 118889,
+ 127791, 127995, 78296, 0, 8249, 128172, 11109, 78531, 6640, 74806, 2598,
+ 513, 127118, 6586, 8656, 129301, 69792, 65008, 194597, 71111, 78383,
+ 194795, 127474, 92515, 68475, 93973, 194584, 63799, 78637, 12647, 917606,
+ 128043, 69893, 1036, 68090, 92419, 1723, 68215, 74217, 0, 41579, 2444,
+ 120722, 10705, 73876, 195054, 74486, 983469, 740, 119222, 194978, 194984,
+ 0, 4238, 11071, 9459, 43936, 43938, 78139, 194985, 8121, 10438, 74487,
+ 42574, 13285, 43967, 11907, 43928, 5690, 92255, 5116, 0, 43181, 13095,
+ 77925, 43926, 64498, 0, 9506, 6978, 70176, 74931, 0, 113743, 78379,
+ 43934, 127845, 1122, 317, 0, 71055, 120621, 0, 1920, 0, 10173, 827, 0, 0,
+ 78378, 119600, 5223, 1304, 0, 83526, 5226, 12602, 94044, 5880, 9329,
+ 7758, 9239, 41173, 5224, 5487, 1222, 5692, 41725, 69229, 9674, 5695,
+ 41711, 64627, 19909, 71077, 74604, 5691, 287, 866, 233, 68138, 983443,
+ 42816, 94036, 65140, 68028, 83093, 8830, 6568, 42300, 10524, 41175,
+ 83094, 983447, 68827, 5296, 983446, 42492, 43402, 92466, 3302, 0, 74858,
+ 6516, 6515, 6514, 6513, 6512, 0, 7856, 8690, 983686, 70870, 12122,
+ 119602, 43976, 194937, 1785, 69925, 68622, 65153, 68809, 5138, 983637,
+ 71922, 118869, 0, 4540, 41181, 917920, 6200, 0, 5134, 69980, 322, 4643,
+ 5132, 121184, 6389, 120998, 5143, 83205, 8790, 120911, 120121, 128695,
+ 71168, 8869, 69916, 93069, 42060, 71326, 9648, 83109, 71170, 10270,
+ 10286, 10318, 10382, 43529, 66477, 194800, 128534, 74170, 0, 3234, 43835,
+ 917818, 70111, 43139, 118815, 127084, 120627, 8767, 68231, 74489, 9695,
+ 72439, 5201, 75061, 6215, 12714, 6214, 13101, 0, 194999, 65268, 7661, 0,
+ 120909, 11027, 128596, 10059, 10511, 42075, 9767, 789, 1749, 78890,
+ 67115, 983670, 320, 0, 8647, 83054, 3049, 0, 6471, 42071, 43156, 9925,
+ 127356, 118894, 66478, 4960, 5549, 127359, 127346, 8485, 4671, 5418,
+ 127350, 3351, 120892, 127351, 10610, 5414, 3064, 6212, 4286, 5421,
+ 127344, 9554, 68051, 94048, 66896, 6653, 83044, 83102, 64510, 6213,
+ 12885, 0, 119045, 64720, 917873, 120759, 73741, 12603, 7131, 11108, 4566,
+ 7518, 9317, 3801, 10342, 10406, 124938, 119259, 42576, 0, 5200, 92946,
+ 121435, 983895, 9183, 127361, 74458, 66282, 395, 5482, 5198, 4349, 10390,
+ 74202, 5196, 43224, 6113, 42009, 5205, 128383, 43307, 70297, 118973,
+ 70467, 12134, 121167, 0, 118843, 9126, 435, 983624, 12014, 10377, 8093,
+ 9079, 3203, 192, 65109, 3385, 125075, 64430, 5383, 10294, 10326, 127309,
+ 5738, 120089, 3336, 78355, 5361, 3623, 41159, 83378, 68112, 7872, 8581,
+ 0, 1260, 3149, 5359, 120134, 74955, 7914, 5357, 71190, 74339, 2624, 5364,
+ 983608, 11431, 120030, 9101, 11058, 78288, 67107, 78293, 42271, 78289,
+ 42917, 67111, 129179, 65566, 6717, 10619, 43360, 78291, 78384, 11832,
+ 78382, 78381, 78380, 69861, 9319, 7097, 119055, 77906, 3232, 73824,
+ 74581, 78087, 0, 71205, 41889, 92453, 129144, 1161, 41895, 74103, 9701,
+ 8622, 125025, 0, 68772, 120588, 5012, 71453, 41362, 69862, 68507, 11921,
+ 0, 11769, 68782, 68609, 41364, 120947, 74228, 41352, 41361, 917903,
+ 41366, 0, 3356, 11611, 917, 68422, 119915, 7134, 8199, 78389, 119618,
+ 677, 119916, 917876, 71482, 127169, 68747, 0, 68738, 3349, 74125, 7022,
+ 8927, 4739, 92599, 5802, 194874, 8615, 0, 128058, 491, 74401, 10190,
+ 68755, 65837, 68800, 8426, 11092, 9891, 0, 42497, 7113, 7586, 42305,
+ 10852, 0, 42648, 4606, 68448, 9095, 7741, 12684, 41885, 1046, 7124,
+ 128610, 68753, 5815, 5171, 65539, 68612, 6932, 74267, 42394, 41878,
+ 74849, 74947, 72424, 5169, 11935, 0, 0, 3175, 120822, 1537, 120804, 5176,
+ 8905, 4136, 4871, 78287, 120663, 9833, 0, 113730, 1128, 65920, 917879,
+ 9711, 7057, 9408, 9409, 9410, 9411, 3662, 9413, 3378, 9415, 9416, 9417,
+ 9418, 6320, 9420, 9421, 5897, 9423, 5165, 5126, 41385, 983938, 41389,
+ 127963, 8955, 3374, 9400, 9401, 7119, 9403, 9404, 3507, 9406, 7629,
+ 983617, 19925, 42669, 68463, 183, 43985, 2631, 70811, 10627, 41130,
+ 71079, 3996, 0, 71442, 128913, 119313, 119307, 78768, 6580, 4332, 64825,
+ 66329, 10726, 66686, 41125, 5899, 41365, 127206, 12085, 66902, 574,
+ 126705, 77825, 73828, 5448, 41058, 5446, 65932, 41322, 42211, 5442, 4190,
+ 77834, 77835, 5451, 77833, 3616, 77828, 68817, 77838, 7708, 74759, 2228,
+ 65867, 10345, 10409, 4191, 120378, 77844, 73800, 42181, 77843, 77839,
+ 2060, 121193, 7111, 11788, 65376, 68129, 10415, 74102, 983625, 205,
+ 83040, 10351, 67151, 0, 9862, 6588, 43257, 64697, 73998, 41355, 5505,
+ 74966, 5503, 8021, 128035, 7125, 9819, 41357, 8011, 42885, 5507, 12044,
+ 92636, 0, 10026, 5472, 7109, 1191, 13106, 5470, 10329, 5476, 8991, 66322,
+ 69778, 11133, 42874, 8550, 42876, 5592, 2919, 129052, 2675, 5595, 78411,
+ 43762, 4367, 127912, 917782, 5478, 5904, 5594, 0, 74150, 7291, 5590,
+ 43761, 13067, 118909, 75069, 983108, 9731, 69731, 64633, 77857, 77854,
+ 71217, 77852, 71227, 77850, 10750, 43714, 77858, 7137, 0, 66909, 12887,
+ 10551, 194564, 77866, 77867, 77864, 77865, 9929, 5199, 9936, 1120, 42387,
+ 0, 1444, 9486, 7554, 65839, 55252, 73972, 1442, 129080, 5894, 70069,
+ 128672, 41171, 92511, 70358, 1323, 13162, 120599, 3334, 128704, 92709,
+ 77881, 66022, 0, 69770, 1651, 120364, 8861, 0, 0, 1142, 983112, 8271, 0,
+ 983058, 126645, 12903, 78406, 4002, 43626, 10442, 10676, 3344, 128910,
+ 194787, 12920, 194560, 70497, 194687, 66642, 1277, 66876, 7871, 67106,
+ 71487, 78853, 129068, 78854, 120360, 983492, 11784, 0, 78012, 4700,
+ 43856, 78858, 120359, 11012, 983627, 78856, 78448, 77879, 4973, 8784,
+ 77877, 74804, 77874, 77869, 77871, 42440, 71225, 43118, 119875, 42364,
+ 6774, 6773, 917560, 120369, 10346, 10410, 78859, 9243, 2464, 74263, 6108,
+ 3372, 0, 6247, 43117, 70364, 7121, 74166, 124973, 120355, 92537, 194846,
+ 119877, 195034, 70357, 119922, 0, 67119, 3354, 195037, 4192, 9289,
+ 118999, 41191, 3876, 0, 70067, 120660, 43696, 43380, 0, 983091, 983965,
+ 983758, 11603, 983954, 75074, 6589, 128564, 82975, 120993, 67812, 983700,
+ 0, 129087, 42572, 128264, 10630, 74827, 1963, 11622, 118882, 11654,
+ 121287, 7550, 10686, 5903, 67098, 78009, 41329, 9662, 917937, 64698,
+ 3366, 10399, 917938, 5542, 11013, 127927, 71062, 194677, 71461, 67090,
+ 6925, 0, 0, 92892, 71856, 11568, 983673, 43367, 64579, 917930, 7852,
+ 11138, 0, 6754, 6312, 77956, 64672, 65296, 0, 118957, 0, 416, 12296,
+ 68457, 73834, 68177, 11050, 10984, 92208, 0, 0, 92182, 129146, 983605,
+ 9532, 66355, 119264, 68073, 113695, 64343, 195032, 92744, 195031, 0,
+ 194847, 195057, 11445, 68294, 2112, 128741, 128814, 10185, 1021, 128130,
+ 9507, 10210, 74544, 8023, 1200, 12243, 78001, 5282, 78003, 9624, 11545,
+ 0, 120276, 3343, 4424, 11047, 1885, 43268, 3896, 78444, 66497, 2947, 392,
+ 7894, 4391, 68139, 121064, 13059, 74816, 77998, 3381, 7942, 0, 69219,
+ 92433, 3558, 129190, 3913, 70429, 121376, 78235, 7044, 1265, 0, 6309,
+ 7045, 7175, 7047, 78239, 11791, 983122, 917587, 8221, 78307, 41864, 0, 0,
+ 67075, 71219, 167, 983906, 78301, 983653, 74211, 41897, 67072, 0, 917583,
+ 127140, 67076, 2493, 0, 113778, 121245, 78107, 64354, 0, 8777, 127940,
+ 406, 8884, 2385, 78210, 92450, 917590, 917573, 43030, 42027, 12114, 0,
+ 128597, 64936, 194695, 119267, 120629, 10561, 128940, 8365, 120539,
+ 983774, 65841, 120787, 11601, 0, 74121, 128896, 83176, 7834, 74159, 0,
+ 917574, 10298, 6624, 4908, 917577, 1639, 120842, 0, 70803, 6327, 6724,
+ 124953, 66354, 92566, 69910, 4817, 11087, 194759, 92536, 7043, 9600,
+ 11022, 0, 0, 0, 983599, 0, 73954, 7548, 64794, 42050, 12291, 55289,
+ 128781, 12343, 657, 67110, 42705, 4461, 1134, 1838, 78438, 2057, 0, 4468,
+ 92891, 194945, 83056, 4456, 5206, 10720, 0, 42523, 127520, 0, 93044,
+ 129411, 65550, 260, 4816, 67658, 10687, 0, 4821, 4466, 0, 83182, 4818,
+ 129058, 41403, 119977, 72422, 128458, 41406, 43273, 74160, 69805, 73939,
+ 92638, 119984, 119979, 41404, 1165, 119980, 4451, 13087, 0, 11284,
+ 119987, 70097, 65155, 43014, 5439, 9363, 70070, 3375, 128448, 5900,
+ 93990, 7889, 2722, 42262, 983481, 0, 67078, 128451, 2282, 121422, 127810,
+ 11401, 67079, 0, 68459, 125028, 983141, 0, 70150, 65438, 0, 7280, 127887,
+ 68055, 70146, 4868, 8297, 119966, 70148, 125008, 128744, 43161, 70144,
+ 92360, 0, 5182, 0, 120542, 0, 0, 4226, 70186, 12135, 5732, 4464, 195083,
+ 71330, 977, 4458, 43827, 92971, 64770, 74838, 0, 344, 0, 121228, 1395,
+ 64279, 0, 92240, 121179, 786, 126995, 43174, 64340, 83077, 194767, 73971,
+ 43026, 7612, 10132, 64413, 65025, 0, 0, 0, 93956, 983917, 68444, 0,
+ 92437, 124928, 92549, 10204, 92656, 83078, 119271, 128431, 1399, 121463,
+ 65217, 121465, 8852, 120808, 241, 121469, 4907, 128427, 983639, 7932,
+ 9727, 128463, 74255, 8748, 0, 128428, 983631, 0, 42780, 55263, 113677,
+ 983560, 4217, 93034, 8650, 127991, 120673, 128215, 69900, 118872, 43099,
+ 3965, 119119, 6719, 128007, 13300, 78439, 93971, 43057, 66588, 118991,
+ 66289, 120902, 73815, 4420, 983120, 6410, 7760, 0, 70468, 128752, 120684,
+ 121246, 7294, 128218, 43869, 120859, 9066, 121321, 11993, 43188, 2626,
+ 7762, 983866, 118831, 92899, 92601, 42825, 41854, 5304, 70290, 78516,
+ 6919, 8619, 119655, 10038, 66454, 9592, 42851, 120537, 1542, 92303,
+ 128819, 0, 127327, 121199, 74311, 78497, 0, 10181, 124937, 43624, 129060,
+ 7779, 917551, 10195, 9479, 6029, 128374, 92268, 2224, 0, 65577, 8993,
+ 66358, 0, 42378, 3368, 606, 127030, 7697, 69237, 69787, 2030, 70106,
+ 6027, 8370, 4322, 0, 65207, 0, 70386, 127903, 983339, 983338, 2735,
+ 42831, 77935, 70439, 74866, 8881, 119047, 0, 70433, 73946, 0, 194703, 0,
+ 68140, 983928, 9576, 70288, 3347, 4160, 5154, 55288, 3794, 66564, 8530,
+ 127063, 7709, 41112, 119868, 66560, 8381, 4572, 12876, 66561, 128921,
+ 6758, 66031, 1615, 5855, 809, 127117, 92283, 128316, 128004, 5799,
+ 128929, 70100, 128607, 7260, 983326, 43031, 64425, 65128, 78819, 64386,
+ 65257, 74909, 68616, 120607, 9347, 83360, 6532, 0, 917918, 120860,
+ 127060, 65828, 120006, 283, 68665, 78813, 532, 78663, 78817, 128021,
+ 120609, 0, 3370, 917881, 11361, 5443, 71431, 8153, 73767, 0, 10741,
+ 121503, 2298, 0, 125039, 65495, 64706, 983320, 43344, 983318, 7144, 9466,
+ 78866, 9824, 67142, 128963, 67133, 67130, 915, 43425, 67292, 43865,
+ 68232, 983111, 120888, 43264, 67136, 67137, 0, 43038, 78864, 6730, 78862,
+ 68161, 64550, 5186, 7360, 127837, 70451, 12108, 120644, 65124, 43127,
+ 66043, 0, 6326, 43107, 77826, 0, 42562, 0, 128821, 128178, 120919, 11485,
+ 6103, 92468, 983307, 11718, 983305, 12889, 92657, 125034, 120635, 127157,
+ 121128, 55245, 128709, 1630, 83027, 65483, 120634, 12565, 0, 65476,
+ 70369, 983072, 83029, 9283, 7700, 917537, 9690, 65499, 0, 64593, 512,
+ 3376, 68080, 0, 128253, 77892, 632, 12940, 77891, 42529, 78587, 194604,
+ 5957, 110593, 8926, 983301, 983300, 128273, 10745, 10174, 7379, 64581,
+ 5386, 120686, 11713, 10633, 69708, 5056, 0, 0, 0, 120773, 94055, 9812, 0,
+ 4460, 78791, 124956, 71307, 128038, 0, 121135, 127174, 64278, 92370,
+ 43466, 0, 0, 64389, 2953, 70122, 1801, 12835, 74847, 120867, 73823,
+ 83110, 66375, 2085, 702, 42579, 77884, 77885, 13074, 77883, 66299,
+ 983287, 71447, 12106, 120972, 74207, 1755, 10482, 12863, 77898, 1163,
+ 2951, 9522, 67816, 78266, 66604, 983860, 3384, 69227, 10702, 830, 77902,
+ 77899, 77900, 8451, 83324, 0, 0, 66458, 128957, 128870, 74896, 0, 2908,
+ 0, 11177, 64902, 4243, 92454, 12239, 121003, 124959, 4441, 0, 82968,
+ 73940, 64352, 127513, 125031, 411, 983275, 9199, 983273, 4056, 118992,
+ 41890, 128592, 2730, 41604, 128355, 5428, 194743, 3364, 42265, 64437,
+ 127935, 118816, 71458, 9684, 216, 71367, 1401, 128053, 44012, 92628,
+ 71456, 92585, 9158, 66878, 11126, 5768, 0, 983759, 0, 484, 194739, 0, 0,
+ 65895, 125076, 121380, 3338, 73935, 572, 7041, 2736, 67605, 127543,
+ 93962, 2794, 8807, 64491, 77847, 5438, 5222, 5381, 43114, 0, 5193, 5125,
+ 5456, 5509, 77846, 194747, 9534, 129109, 129040, 0, 3430, 0, 42905,
+ 78717, 74929, 981, 129184, 4330, 73929, 120536, 1824, 10908, 126506,
+ 7034, 41683, 64617, 0, 73754, 3957, 64358, 64547, 128259, 674, 63991,
+ 983251, 2946, 5354, 5251, 5328, 5307, 3759, 11411, 8364, 5123, 119628,
+ 5281, 5469, 5121, 77989, 118993, 0, 5130, 83180, 128357, 77990, 0,
+ 120726, 1221, 2733, 11746, 77991, 5216, 119268, 0, 128475, 92187, 3468,
+ 7033, 9230, 5939, 128397, 0, 5803, 71867, 68400, 7278, 10321, 10289,
+ 64613, 10385, 41706, 0, 0, 917939, 0, 11739, 77986, 41981, 92743, 5938,
+ 0, 43766, 12448, 7576, 10401, 10337, 73852, 124994, 13057, 0, 126976,
+ 129081, 10009, 0, 41703, 120950, 12165, 129191, 0, 9885, 0, 8077, 92620,
+ 127908, 121044, 194995, 0, 92457, 129138, 4220, 10725, 10433, 0, 68395,
+ 4987, 64519, 121265, 125078, 0, 194813, 128574, 10970, 11733, 0, 120792,
+ 126490, 19944, 74356, 9009, 8551, 92345, 11468, 64636, 7575, 0, 2724,
+ 128899, 0, 12313, 11151, 515, 119947, 42791, 63987, 78286, 119943,
+ 119940, 119941, 119938, 9775, 4046, 4589, 4521, 68629, 9141, 917904,
+ 78850, 2741, 64399, 6197, 1370, 0, 120841, 0, 125062, 983441, 120843,
+ 6184, 8606, 3303, 41372, 11786, 9473, 66203, 66177, 92446, 11593, 43007,
+ 4478, 66178, 0, 0, 2744, 0, 4477, 78267, 814, 42066, 66183, 66204, 43786,
+ 119961, 66198, 41880, 66188, 11623, 78148, 11955, 66190, 66191, 41111,
+ 66189, 73788, 7788, 4847, 983428, 127759, 0, 128433, 2221, 1581, 6535,
+ 78161, 12954, 430, 78160, 55259, 73944, 128036, 5278, 4945, 42883, 4950,
+ 983440, 68625, 983438, 7269, 128499, 5964, 12908, 124997, 0, 74764,
+ 43512, 119146, 194936, 4949, 983431, 443, 983429, 4944, 5467, 119603,
+ 70865, 65137, 6044, 65392, 0, 4213, 0, 41303, 917556, 194931, 119962,
+ 41306, 73984, 2698, 127159, 0, 12072, 3193, 0, 41304, 824, 128676, 12091,
+ 67118, 78894, 119816, 4673, 64804, 4678, 119820, 119819, 65059, 43860,
+ 6739, 66844, 5481, 3490, 1199, 119811, 8356, 69947, 67702, 4677, 12688,
+ 3102, 0, 4672, 78173, 78175, 5531, 68367, 42575, 78170, 78166, 4674,
+ 4548, 44005, 71087, 68658, 119946, 8025, 68630, 127024, 1855, 127475,
+ 68669, 118990, 92445, 127554, 126630, 127339, 119652, 2745, 11797,
+ 983419, 128159, 9202, 4654, 6840, 983416, 68638, 73993, 10525, 4649,
+ 65209, 121512, 121511, 4648, 43080, 75070, 121507, 983406, 6246, 64950,
+ 7828, 4650, 6777, 6776, 6775, 4653, 7822, 70287, 74624, 43187, 8669,
+ 120659, 6821, 65093, 983565, 78881, 2716, 983412, 983060, 70503, 194952,
+ 68369, 120054, 11060, 8547, 2711, 42165, 78027, 78026, 6836, 983423, 0,
+ 4662, 78033, 78032, 9149, 9146, 599, 2081, 78031, 78030, 194962, 4656,
+ 10130, 68450, 7811, 40994, 194965, 6414, 5967, 4658, 3725, 5713, 5814,
+ 4661, 42434, 983413, 128737, 11190, 64904, 9026, 10833, 74864, 7547,
+ 4867, 11100, 10008, 10222, 3054, 194956, 9744, 78860, 7605, 4622, 119656,
+ 43888, 70303, 983395, 69905, 67188, 9045, 78888, 4225, 19926, 68831,
+ 12880, 65307, 4617, 68757, 983388, 41732, 4616, 10518, 10423, 10359,
+ 983382, 5958, 0, 983435, 4215, 9789, 119619, 4321, 4621, 195028, 41313,
+ 522, 5368, 11139, 65803, 128546, 5366, 12201, 5372, 121060, 119949,
+ 194975, 7720, 7390, 2696, 983402, 0, 4638, 983407, 1790, 78242, 5965,
+ 64363, 66569, 68646, 68477, 5376, 1835, 5335, 121505, 128089, 4633, 0,
+ 68119, 1180, 4632, 67191, 5387, 5333, 0, 125132, 42094, 5331, 4634,
+ 11928, 983594, 5338, 4637, 128170, 5971, 42414, 43500, 1268, 65097,
+ 42361, 0, 0, 73853, 1427, 128440, 0, 5970, 3431, 0, 10358, 10422, 4758,
+ 983376, 1608, 2738, 125066, 10455, 4753, 74026, 11344, 4222, 6240, 5231,
+ 74384, 66611, 68377, 6248, 983364, 67815, 78878, 42318, 92582, 5229,
+ 4757, 0, 126576, 2728, 4752, 64563, 65235, 5234, 0, 128145, 128926,
+ 10713, 7166, 0, 2622, 7460, 83124, 67101, 126495, 8954, 74760, 65189,
+ 2632, 42617, 10108, 1011, 5574, 1853, 2709, 65139, 5577, 128966, 0,
+ 118871, 68641, 8965, 7635, 42177, 5316, 0, 5314, 6451, 5572, 66464, 5312,
+ 0, 5525, 5330, 5319, 68292, 127311, 65066, 44003, 68437, 983482, 43843,
+ 120498, 127851, 43918, 74851, 74022, 983424, 64609, 68643, 67410, 128593,
+ 5721, 74892, 5519, 8632, 66465, 11267, 73961, 92278, 5720, 78778, 1692,
+ 4219, 4610, 8696, 4305, 0, 4609, 43478, 4614, 541, 983242, 5287, 5309,
+ 5285, 68389, 5961, 4647, 56, 4216, 10577, 41381, 601, 4613, 120479,
+ 983348, 9208, 4608, 43966, 41124, 5190, 67628, 66826, 68145, 7086, 0,
+ 67998, 67620, 93047, 2734, 11074, 0, 67627, 43593, 0, 67625, 5960, 67722,
+ 8992, 42593, 128260, 1782, 67622, 68114, 119939, 0, 68180, 5501, 119952,
+ 42508, 7442, 43665, 359, 41253, 68392, 6239, 43900, 41256, 74132, 67740,
+ 0, 71178, 917550, 9346, 69660, 41254, 128047, 43291, 3767, 5737, 0, 4865,
+ 0, 5740, 917997, 5736, 4368, 64724, 7193, 67097, 128844, 5739, 41024,
+ 4866, 983880, 73904, 121420, 4869, 120563, 129172, 4223, 128201, 6650,
+ 126509, 0, 120212, 119872, 4870, 120445, 68661, 6716, 78176, 68667,
+ 68382, 68676, 127925, 10122, 4864, 66568, 4144, 7937, 83193, 6245, 68652,
+ 2732, 42734, 745, 68045, 195097, 92195, 4777, 7821, 129136, 68631, 42775,
+ 194661, 128445, 120679, 3097, 120908, 5966, 121197, 4778, 126469, 10863,
+ 127506, 4781, 92986, 64407, 128503, 128323, 8577, 71221, 68196, 43285,
+ 10216, 4782, 983485, 983411, 120757, 68618, 12325, 43056, 8717, 0, 0,
+ 4776, 73818, 11492, 8700, 129128, 13176, 68363, 10426, 67247, 71091,
+ 10362, 194706, 1715, 4849, 8242, 9561, 73922, 43278, 42635, 0, 127207,
+ 5963, 917926, 983483, 0, 4850, 73900, 1607, 466, 4853, 118995, 4854,
+ 127918, 5164, 73807, 1350, 5124, 64420, 1993, 5362, 8471, 2708, 92471,
+ 12445, 3785, 234, 3199, 121273, 41268, 4848, 2530, 74941, 2068, 1964, 0,
+ 73762, 10458, 983417, 8576, 78543, 0, 2704, 4794, 121102, 68211, 8322,
+ 4797, 5753, 0, 2694, 4792, 0, 2439, 65104, 69804, 983426, 303, 74625,
+ 68229, 983427, 2437, 78659, 4221, 4844, 92216, 0, 0, 0, 70042, 74095,
+ 43292, 0, 2441, 10739, 65090, 194622, 70436, 118929, 2451, 2714, 119326,
+ 0, 43379, 4937, 43376, 753, 5849, 10597, 43089, 11722, 9248, 92555,
+ 42879, 11725, 917969, 0, 2726, 3107, 73958, 4941, 64937, 119233, 9140,
+ 1408, 5261, 4607, 194715, 181, 983432, 4942, 9539, 4938, 0, 65201, 5259,
+ 9369, 64185, 4142, 5257, 983601, 6844, 4964, 5264, 64178, 64177, 12979,
+ 41411, 64182, 64181, 64180, 64179, 9482, 4873, 41231, 1822, 42526,
+ 127989, 12758, 3865, 194660, 121129, 10500, 0, 119024, 78028, 92408,
+ 9830, 43642, 389, 10893, 7521, 127879, 4872, 5463, 128119, 3125, 9567, 0,
+ 4878, 5459, 4604, 119650, 9557, 5465, 68617, 0, 11494, 126492, 9563,
+ 10865, 74570, 43279, 64186, 68521, 78714, 64191, 64190, 8898, 64188,
+ 129153, 41030, 74226, 78713, 74600, 74994, 917834, 0, 78805, 41031,
+ 78801, 11960, 6745, 3082, 983269, 78539, 73919, 10573, 41744, 7079, 5856,
+ 67838, 5163, 78809, 128162, 1817, 66724, 78538, 119010, 10564, 7763,
+ 13077, 41813, 4400, 41745, 64207, 10275, 8925, 10371, 10307, 41814, 4248,
+ 77979, 0, 4541, 6299, 64204, 64203, 64201, 64200, 64199, 64198, 126471,
42156, 78688, 0, 64193, 64192, 65223, 9943, 64197, 64196, 64195, 64194,
- 13282, 64175, 64174, 64173, 78189, 846, 78186, 9965, 0, 0, 0, 0, 2543,
- 12163, 3108, 9745, 64167, 64166, 64165, 64164, 2110, 92176, 64169, 64168,
- 64949, 10972, 10251, 10247, 42768, 715, 2295, 43299, 9453, 5348, 10943,
- 120378, 0, 11352, 550, 9910, 126705, 0, 66579, 11551, 0, 195080, 9504,
- 7187, 0, 10373, 0, 120791, 10261, 10253, 6404, 10277, 78183, 11984, 1552,
- 65222, 6998, 78180, 0, 3128, 4789, 5067, 5066, 118849, 4784, 0, 8827,
- 1146, 5065, 69890, 78192, 68136, 78190, 43412, 5064, 2431, 0, 9450, 1809,
- 0, 78200, 78201, 5062, 1264, 64817, 13254, 11697, 126598, 9785, 64716, 0,
- 3933, 74559, 4740, 7954, 0, 0, 42609, 0, 74175, 0, 127016, 0, 983873,
- 42130, 0, 5151, 917829, 917823, 0, 93980, 0, 7620, 3800, 65122, 0, 0,
- 8355, 7854, 0, 954, 64927, 4185, 41045, 127141, 41438, 41439, 68666,
- 10711, 4593, 127745, 120584, 983408, 64774, 8053, 10532, 66727, 0, 0, 0,
- 64759, 6381, 5166, 9888, 127800, 5148, 42834, 0, 78205, 78206, 43787,
- 78204, 64131, 3119, 917814, 0, 3060, 64135, 9986, 0, 77876, 636, 11698,
- 0, 983451, 9916, 11701, 7836, 42741, 64137, 8320, 78640, 8863, 92431,
- 119960, 1477, 43289, 0, 74358, 8618, 983402, 9908, 983981, 0, 0, 3937,
- 12312, 0, 983403, 0, 64781, 912, 6349, 4536, 93954, 74532, 126594, 6244,
- 92209, 71341, 3935, 120665, 983476, 0, 11950, 5392, 42248, 65129, 68656,
- 5397, 0, 12046, 12599, 0, 128261, 5395, 0, 5393, 354, 68615, 119948,
- 78503, 0, 0, 42039, 0, 0, 64142, 626, 0, 5895, 0, 0, 5780, 0, 0, 128874,
- 0, 0, 43297, 983079, 4311, 4644, 8818, 0, 128186, 0, 7145, 3918, 66452,
- 3797, 1644, 92346, 9658, 4140, 11385, 65947, 6455, 9030, 813, 119945,
- 68131, 4146, 119957, 5360, 2466, 0, 67669, 119942, 6249, 42117, 92287,
- 128224, 0, 0, 74046, 43745, 4911, 988, 917807, 0, 983468, 43061, 7054,
- 64147, 0, 64920, 68195, 6698, 118933, 92506, 0, 120006, 11981, 12202, 0,
- 11032, 67654, 6093, 11608, 975, 68662, 65843, 170, 0, 0, 4169, 0, 41859,
- 6058, 120401, 13203, 120657, 0, 0, 68657, 9818, 10178, 10324, 42106,
- 5898, 74540, 4738, 41856, 7062, 917865, 4737, 11779, 4742, 120564, 92391,
- 73736, 983364, 9825, 6448, 6715, 127008, 4831, 0, 92525, 0, 5300, 4741,
- 42108, 983354, 64159, 4736, 64148, 0, 849, 92191, 78491, 43288, 0, 66620,
- 917916, 127331, 65549, 9496, 64598, 118866, 983366, 7876, 68132, 917872,
- 3928, 917870, 43378, 10706, 7198, 0, 4842, 12053, 128129, 0, 4841, 0,
- 4171, 12008, 6251, 3923, 1490, 0, 119591, 126512, 40972, 5245, 0, 10114,
- 42001, 41888, 4845, 8332, 40974, 64347, 4840, 9077, 78346, 1747, 917849,
- 4825, 69240, 917852, 68655, 0, 983388, 0, 0, 68628, 983347, 9850, 118937,
- 367, 1472, 917859, 6687, 1274, 0, 5905, 12339, 8919, 73953, 10907, 65261,
- 11023, 119559, 4830, 9134, 78666, 64126, 43011, 0, 126626, 64101, 0, 0,
- 4824, 10614, 119659, 0, 1888, 1960, 7861, 917856, 78524, 41836, 43012,
- 6052, 6064, 54, 43009, 12214, 0, 6211, 0, 358, 41997, 41833, 11442,
- 10758, 65774, 0, 120384, 64115, 92221, 70018, 0, 0, 119053, 0, 12765,
- 64118, 126998, 12962, 0, 126580, 4017, 12827, 5241, 120392, 0, 41118,
- 3924, 0, 11366, 917843, 0, 0, 917846, 41116, 917844, 917564, 0, 11363,
- 12057, 11917, 1567, 74000, 4721, 126641, 66202, 8957, 4139, 0, 0, 0, 0,
- 0, 12740, 128702, 4722, 6816, 127793, 12759, 4725, 983383, 4726, 0,
- 194892, 983622, 128321, 917905, 0, 12755, 12762, 4015, 0, 8052, 476, 0,
- 0, 128294, 64212, 41020, 1382, 64209, 64216, 44002, 64214, 1656, 41831,
- 0, 0, 41843, 8720, 3908, 1452, 13111, 0, 64067, 127328, 8552, 64113,
- 41845, 3849, 78732, 66232, 9778, 120066, 5891, 7064, 55, 9948, 119085, 0,
- 0, 7935, 2420, 0, 1114, 92599, 67585, 70104, 120053, 92350, 120051, 3938,
- 120057, 65417, 64717, 120060, 120061, 65415, 120059, 6292, 65303, 7955,
- 6452, 4713, 128196, 66249, 917885, 917890, 917891, 65152, 719, 120044,
- 78623, 120042, 6713, 4532, 65412, 69822, 10868, 4717, 2349, 5902, 66450,
- 4712, 917902, 917899, 917900, 65416, 8155, 4718, 3942, 4714, 9625, 0,
- 6383, 194744, 12006, 128565, 0, 0, 0, 0, 65414, 6454, 1229, 126606,
- 66437, 66025, 78699, 0, 42500, 120508, 4809, 9623, 917874, 78694, 917880,
- 917877, 917878, 65405, 68159, 12893, 917882, 5365, 4545, 8901, 92421,
- 119555, 4813, 128262, 0, 5925, 4808, 64330, 0, 65475, 118940, 195028,
- 4814, 0, 4810, 0, 0, 64928, 10543, 0, 3522, 71335, 414, 65404, 0, 195027,
- 6456, 73820, 0, 6691, 42193, 92225, 128171, 0, 74495, 0, 0, 0, 118820,
- 9751, 65407, 128085, 11770, 3919, 0, 0, 65061, 0, 0, 0, 12235, 0, 0,
- 127233, 64092, 983470, 64080, 0, 64090, 0, 69913, 10162, 10310, 0, 8454,
- 127888, 42038, 387, 41363, 12737, 0, 4780, 43368, 0, 64310, 64621, 6732,
- 78116, 0, 983139, 0, 983074, 8896, 0, 375, 6976, 66582, 119005, 983874,
- 0, 983434, 119202, 119203, 12526, 43120, 2315, 0, 1938, 119197, 0, 4529,
- 119200, 119201, 119198, 119199, 69692, 983432, 69698, 13150, 64492, 0, 0,
- 2291, 12902, 0, 42891, 66327, 74298, 917857, 10799, 69690, 2587, 66372,
- 0, 4193, 92250, 4241, 983057, 7998, 0, 0, 0, 126640, 2316, 118821, 0, 0,
- 0, 64297, 74799, 92442, 74140, 0, 5373, 0, 983886, 3762, 10015, 120672,
- 119232, 0, 41590, 0, 70098, 3780, 7485, 5779, 0, 42037, 0, 3906, 12349,
- 0, 8326, 0, 65498, 3763, 6983, 5618, 0, 3779, 0, 43613, 0, 0, 0, 0, 0, 0,
- 280, 74558, 127332, 68138, 13072, 1894, 0, 0, 65478, 43310, 7231, 0,
- 11773, 0, 0, 0, 0, 2551, 0, 6453, 10200, 6235, 983752, 119237, 0, 128805,
- 4470, 11826, 917557, 7780, 5369, 118958, 5249, 0, 5367, 8756, 127143, 0,
- 5377, 120585, 68143, 1688, 78245, 983356, 69685, 983756, 0, 0, 44020,
- 6808, 41319, 1300, 10650, 41692, 64505, 2290, 0, 119624, 1465, 10850,
- 3943, 0, 41205, 41315, 118961, 0, 0, 5352, 0, 0, 8839, 41314, 7384, 7785,
- 41204, 127322, 41209, 69637, 92241, 43607, 0, 0, 5420, 3897, 10134, 0,
- 74417, 4018, 7150, 68127, 0, 0, 0, 0, 127526, 2561, 68621, 3542, 7148,
- 12076, 7951, 68152, 118857, 5303, 6276, 1706, 0, 78751, 7146, 0, 65150,
- 41819, 0, 73951, 10847, 41822, 9985, 860, 0, 10506, 983435, 69641, 10753,
- 10830, 0, 615, 64490, 7574, 92617, 77922, 0, 12909, 43016, 64559, 127028,
- 0, 0, 67996, 2020, 0, 4022, 128783, 0, 77923, 126593, 41691, 0, 0, 74329,
- 0, 64622, 9070, 0, 68411, 3911, 42829, 43122, 1033, 74440, 0, 7000, 3904,
- 0, 128198, 0, 118931, 119630, 13123, 10846, 3450, 127360, 7397, 118807,
- 0, 42778, 10000, 41088, 449, 0, 3777, 68458, 0, 9636, 0, 10738, 69634,
- 9367, 593, 41085, 3999, 65226, 41713, 12764, 0, 64409, 3596, 0, 0, 9763,
- 120280, 92192, 12347, 124, 12981, 41127, 2092, 92687, 0, 0, 0, 10820,
- 43987, 0, 0, 1769, 41715, 2463, 78489, 0, 12770, 126500, 1538, 0, 43124,
- 0, 195058, 7795, 120300, 0, 4828, 1258, 127802, 2006, 0, 0, 9498, 127032,
+ 12231, 42652, 64174, 64173, 78189, 846, 78186, 9965, 74495, 83492, 83493,
+ 83494, 2543, 12163, 3108, 9745, 64167, 64166, 64165, 64164, 2110, 92176,
+ 64169, 64168, 64949, 10972, 10251, 10247, 42768, 715, 2295, 43299, 9453,
+ 5348, 10943, 66390, 0, 11352, 550, 9910, 125127, 0, 66579, 11551, 128464,
+ 195080, 9504, 7187, 82957, 10373, 983418, 120375, 10261, 10253, 6404,
+ 10277, 78183, 11984, 1552, 65222, 6998, 78180, 71429, 3128, 4789, 5067,
+ 5066, 118849, 4784, 0, 8827, 1146, 5065, 69890, 78192, 68136, 78190,
+ 43412, 5064, 2431, 0, 9450, 1809, 0, 78200, 78201, 5062, 1264, 64817,
+ 13254, 11697, 126598, 9785, 64716, 0, 3933, 74559, 4740, 7954, 0, 125023,
+ 42609, 119855, 74175, 66912, 127016, 0, 121300, 42130, 121046, 5151,
+ 121346, 83488, 0, 93980, 917802, 7620, 3800, 65122, 83487, 83480, 8355,
+ 7854, 83483, 954, 64927, 4185, 41045, 127141, 41438, 41439, 68666, 10711,
+ 4593, 82993, 120584, 983410, 64774, 8053, 10532, 66727, 983414, 0, 78642,
+ 64759, 1325, 5166, 9888, 127800, 5148, 42834, 0, 78205, 78206, 43787,
+ 78204, 43913, 3119, 917814, 0, 3060, 64135, 9986, 74996, 77876, 636,
+ 11698, 83476, 82961, 9916, 11701, 7836, 42741, 64137, 8320, 78640, 8863,
+ 70201, 119960, 1477, 43289, 68492, 67164, 8618, 983404, 9908, 74972, 0,
+ 0, 3937, 12312, 0, 983405, 0, 64781, 912, 6349, 4536, 93954, 74532,
+ 126594, 6244, 92209, 71341, 3935, 120665, 128969, 0, 11950, 5392, 42248,
+ 65129, 68656, 5397, 128310, 12046, 12599, 67407, 128261, 5395, 0, 5393,
+ 354, 68615, 77853, 74366, 121404, 0, 42039, 113817, 0, 64142, 626, 0,
+ 5895, 0, 43910, 5780, 0, 10220, 121337, 43907, 71121, 43297, 70188, 4311,
+ 4644, 8818, 78158, 128186, 128869, 7145, 3918, 66452, 3797, 1644, 92346,
+ 9658, 4140, 11385, 65947, 6455, 9030, 813, 119945, 68131, 4146, 119957,
+ 5360, 2466, 0, 67669, 94020, 6249, 42117, 68828, 92206, 128023, 119255,
+ 74046, 43745, 4911, 988, 71180, 0, 983470, 43061, 7054, 64147, 983847,
+ 64920, 68195, 6698, 118933, 92506, 0, 70849, 11981, 12202, 195087, 11032,
+ 67654, 6093, 11608, 975, 66415, 65843, 170, 0, 67239, 4169, 0, 41859,
+ 6058, 120401, 13203, 120657, 70507, 125091, 68657, 9818, 10178, 10324,
+ 42106, 5898, 74540, 4738, 41856, 7062, 127120, 4737, 11779, 4742, 83425,
+ 68758, 68342, 83420, 9825, 6448, 6715, 127008, 4831, 83418, 83419, 67731,
+ 5300, 4741, 42108, 127057, 64159, 4736, 64148, 92634, 849, 92191, 78491,
+ 43288, 0, 66620, 127533, 127331, 65549, 9496, 64598, 118866, 983368,
+ 7876, 68132, 66280, 3928, 917870, 43378, 10706, 7198, 120890, 4842,
+ 12053, 128129, 68746, 4841, 0, 4171, 12008, 6251, 3923, 1490, 83411,
+ 83412, 126512, 40972, 5245, 70794, 10114, 42001, 41888, 4845, 8332,
+ 40974, 64347, 4840, 9077, 78346, 1747, 917849, 4825, 69240, 121443,
+ 68655, 0, 983390, 0, 0, 68628, 983349, 9850, 118937, 367, 1472, 917859,
+ 6687, 1274, 195022, 5905, 12339, 8919, 73953, 10907, 65261, 11023,
+ 119559, 4830, 9134, 78666, 64126, 43011, 83297, 78669, 64101, 0, 128434,
+ 4824, 10614, 119659, 126993, 1888, 1960, 7861, 83416, 78524, 41836,
+ 43012, 6052, 6064, 54, 43009, 12214, 83260, 6211, 120386, 358, 41997,
+ 41833, 11442, 10758, 65774, 113823, 120384, 64115, 92221, 70018, 983611,
+ 983708, 119053, 0, 12765, 64118, 126998, 12962, 0, 126580, 4017, 12827,
+ 5241, 120392, 0, 41118, 3924, 983894, 11366, 129084, 0, 0, 83401, 41116,
+ 83403, 83404, 83397, 11363, 12057, 11917, 1567, 74000, 4721, 83396,
+ 66202, 8957, 4139, 70512, 0, 983074, 0, 0, 12740, 121470, 4722, 6816,
+ 124974, 12759, 4725, 67099, 4726, 83467, 83468, 983622, 70029, 83463,
+ 74913, 12755, 12762, 4015, 67690, 8052, 476, 0, 74893, 128294, 64212,
+ 41020, 1382, 64209, 64216, 44002, 64214, 1656, 41831, 127553, 125121,
+ 41843, 8720, 3908, 1452, 13111, 983421, 64067, 92287, 8552, 64113, 41845,
+ 3849, 78732, 66232, 9778, 120066, 5891, 7064, 55, 9948, 119085, 83302,
+ 917610, 7935, 2420, 0, 1114, 78120, 67585, 70104, 70432, 83447, 74920,
+ 3938, 120057, 65417, 64717, 120060, 71920, 65415, 66884, 6292, 65303,
+ 7955, 6452, 4713, 128196, 66249, 917885, 194766, 129073, 65152, 719,
+ 120044, 78623, 120042, 6713, 4532, 65412, 69822, 10868, 4717, 2349, 5902,
+ 66450, 4712, 75055, 917899, 65400, 65416, 8155, 4718, 3942, 4714, 9625,
+ 0, 6383, 194744, 12006, 128565, 194789, 0, 113756, 0, 65414, 6454, 1229,
+ 83457, 66437, 66025, 78699, 83452, 42500, 120508, 4809, 9623, 129137,
+ 78694, 121173, 128777, 917858, 65405, 68159, 12893, 78617, 5365, 4545,
+ 8901, 92421, 119555, 4813, 128262, 194729, 5925, 4808, 64330, 128400,
+ 65475, 83432, 68244, 4814, 83427, 4810, 83429, 83430, 64928, 10543,
+ 71249, 3522, 71335, 414, 65404, 0, 83442, 6456, 73820, 83445, 6691,
+ 42193, 66284, 83441, 0, 68337, 0, 43858, 43832, 118820, 9751, 65407,
+ 128085, 11770, 3919, 120724, 0, 65061, 983945, 917894, 129142, 12235,
+ 128572, 92701, 121087, 64092, 68739, 64080, 129063, 64090, 983586, 69913,
+ 10162, 10310, 121210, 8454, 121387, 42038, 387, 41363, 12737, 0, 4780,
+ 43368, 0, 64310, 64621, 6732, 78116, 0, 121295, 195024, 92193, 8896, 0,
+ 375, 6976, 66582, 119005, 74997, 127325, 983436, 119202, 119203, 12526,
+ 43120, 2315, 0, 1938, 119197, 128452, 4529, 119200, 119201, 119198,
+ 119199, 69692, 129124, 69698, 13150, 64492, 128974, 78761, 2291, 12902,
+ 0, 42891, 66327, 70502, 917857, 10799, 69690, 2587, 66372, 128628, 4193,
+ 66823, 4241, 129195, 7998, 83276, 0, 127009, 126640, 2316, 118821, 0,
+ 983934, 0, 64297, 74799, 92442, 74140, 128148, 5373, 128798, 70370, 3762,
+ 10015, 120672, 119232, 125109, 41590, 0, 70098, 3780, 7485, 5779, 917898,
+ 42037, 0, 3906, 12349, 74793, 8326, 127333, 65498, 3763, 6983, 5618, 0,
+ 3779, 983194, 43613, 70132, 0, 83288, 78335, 83289, 0, 280, 74558,
+ 121353, 67396, 13072, 1894, 83291, 67735, 65478, 43310, 7231, 0, 11773,
+ 0, 119165, 11144, 917778, 2551, 0, 6453, 10200, 6235, 983752, 119237,
+ 71877, 128669, 4470, 11826, 917557, 7780, 5369, 118958, 5249, 983066,
+ 5367, 8756, 127143, 119183, 5377, 120585, 68143, 1688, 78245, 5218,
+ 69685, 983756, 0, 113794, 44020, 6808, 41319, 1300, 10650, 41692, 64505,
+ 2290, 71057, 119624, 1465, 10850, 3943, 0, 41205, 41315, 118961, 119333,
+ 67148, 5352, 113753, 0, 8839, 41314, 7384, 7785, 41204, 127322, 41209,
+ 69637, 92241, 43607, 71254, 0, 5420, 3897, 10134, 120381, 74417, 4018,
+ 7150, 68127, 71425, 0, 121427, 127864, 127526, 2561, 68621, 3542, 7148,
+ 12076, 7951, 68152, 118857, 5303, 6276, 1706, 120750, 78751, 7146,
+ 983682, 65150, 41819, 0, 73951, 10847, 41822, 9985, 860, 0, 10506,
+ 983437, 69641, 10753, 10830, 119339, 615, 64490, 7574, 74082, 77922, 0,
+ 12909, 43016, 64559, 127028, 0, 121231, 67996, 2020, 128790, 4022,
+ 128783, 120701, 77923, 126593, 41691, 0, 75060, 74329, 0, 64622, 9070, 0,
+ 68411, 3911, 42829, 43122, 1033, 74440, 983813, 7000, 3904, 983628,
+ 73737, 125105, 118931, 119630, 13123, 10846, 3450, 127360, 7397, 118807,
+ 917891, 42778, 10000, 41088, 449, 0, 3777, 68458, 113725, 9636, 0, 10738,
+ 69634, 9367, 593, 41085, 3999, 65226, 41713, 12764, 983723, 64409, 3596,
+ 129044, 128090, 9763, 120280, 74609, 12347, 124, 12981, 41127, 2092,
+ 92687, 0, 127555, 194632, 10820, 43987, 0, 128907, 1769, 41715, 2463,
+ 71214, 83070, 12770, 71222, 1538, 92617, 43124, 194614, 195058, 7795,
+ 120300, 129053, 4828, 1258, 127802, 2006, 0, 121130, 9498, 127032,
127033, 120289, 120288, 3939, 120290, 8846, 8943, 120287, 120286, 2650,
- 4491, 1961, 42602, 11525, 120292, 1959, 120294, 55228, 11774, 41016, 0,
- 68675, 128054, 1511, 9324, 78211, 10519, 66331, 3454, 19930, 0, 41019, 0,
- 0, 65292, 6822, 12862, 0, 0, 42143, 41828, 78207, 65531, 78208, 118879,
- 55223, 0, 128071, 41826, 8865, 6402, 0, 13279, 7917, 74755, 0, 7733, 0,
- 4998, 983896, 92332, 41950, 0, 4268, 0, 0, 70061, 4013, 0, 10881, 0, 0,
- 0, 74788, 2014, 0, 0, 9765, 0, 0, 0, 195059, 78357, 65281, 127825, 10949,
- 0, 0, 0, 2015, 0, 0, 0, 66318, 43233, 0, 42517, 0, 0, 0, 12698, 8094,
- 10135, 65909, 6474, 794, 0, 12656, 128122, 119353, 128270, 1665, 0, 4833,
- 983053, 119351, 127367, 0, 189, 12611, 0, 0, 2859, 4838, 0, 4834, 65078,
- 0, 0, 4837, 127061, 770, 0, 811, 0, 41042, 917551, 41318, 64427, 0,
- 128208, 78848, 3895, 0, 74341, 3976, 0, 42859, 10193, 3116, 7747, 0, 0,
- 0, 0, 0, 43686, 78846, 41877, 0, 2871, 64614, 128785, 999, 0, 6345,
- 41876, 2663, 2017, 0, 0, 11040, 10150, 0, 64308, 1522, 597, 4775, 12555,
- 12571, 12550, 12583, 12560, 2019, 12556, 12584, 3092, 0, 12562, 4783,
- 12566, 12569, 12554, 0, 10812, 78851, 0, 0, 3078, 1402, 0, 128275, 0, 0,
- 119248, 394, 3088, 0, 92172, 0, 3991, 64391, 0, 128524, 424, 66328, 1999,
- 69659, 73914, 0, 0, 0, 0, 42231, 8246, 0, 0, 0, 41840, 983609, 2377,
+ 4491, 1961, 42602, 11525, 120292, 1959, 120294, 55228, 11774, 41016,
+ 983262, 68675, 128054, 1511, 9324, 78211, 10519, 66331, 3454, 19930, 0,
+ 41019, 127944, 0, 65292, 6822, 12862, 0, 0, 42143, 41828, 78207, 65531,
+ 70864, 118879, 55223, 0, 128071, 41826, 8865, 6402, 113827, 13279, 7917,
+ 74755, 917948, 7733, 983408, 4998, 68493, 92332, 41950, 0, 4268, 194790,
+ 195056, 70061, 4013, 128718, 10881, 0, 983163, 0, 74788, 2014, 2432,
+ 71901, 9765, 195052, 0, 917854, 195059, 78357, 65281, 127825, 10949, 0,
+ 0, 119315, 2015, 121088, 92765, 71840, 66318, 43233, 917992, 42517,
+ 68060, 0, 0, 12698, 8094, 10135, 65909, 6474, 794, 43497, 12656, 66335,
+ 119353, 67279, 1665, 71853, 4833, 917985, 71188, 127367, 121464, 189,
+ 12611, 0, 983420, 2859, 4838, 983930, 4834, 65078, 0, 92991, 4837, 67413,
+ 770, 92671, 811, 70062, 41042, 83073, 41318, 64427, 73999, 67693, 78848,
+ 3895, 92615, 74341, 3976, 128466, 42859, 10193, 3116, 7747, 78488, 0,
+ 43496, 0, 121015, 43686, 78846, 41877, 983743, 2871, 64614, 68843, 999,
+ 983844, 6345, 41876, 2663, 2017, 121234, 67824, 11040, 10150, 120678,
+ 64308, 1522, 597, 4775, 12555, 12571, 12550, 12583, 12560, 2019, 12556,
+ 12584, 3092, 0, 12562, 4783, 12566, 12569, 12554, 83344, 10812, 78851, 0,
+ 83342, 3078, 1402, 0, 83348, 0, 125072, 119248, 394, 3088, 83347, 92172,
+ 917965, 3991, 64391, 83341, 128524, 424, 66328, 1999, 69659, 73914, 0,
+ 127534, 66903, 128468, 42231, 2209, 125103, 0, 0, 41840, 66913, 2377,
1298, 64011, 12572, 11318, 12557, 12559, 12570, 7479, 1003, 2373, 9446,
- 7481, 9448, 48, 0, 9480, 481, 0, 9438, 9439, 9440, 9441, 8465, 9443,
- 9444, 9445, 9430, 9431, 9432, 9433, 9434, 9435, 3984, 9437, 0, 0, 9424,
- 9425, 9426, 9427, 9428, 9429, 64758, 2362, 9655, 0, 2004, 9096, 9782,
- 128848, 9172, 128545, 19965, 0, 5955, 67666, 1108, 0, 74773, 0, 0, 64782,
- 3926, 92448, 65210, 8798, 0, 92165, 1392, 0, 0, 127364, 10606, 8065,
- 118805, 10353, 10417, 0, 0, 64524, 92418, 4019, 0, 983288, 43280, 8219,
- 68402, 1812, 119963, 983692, 0, 126488, 42410, 74448, 119132, 6054,
- 10697, 3169, 42297, 42322, 10642, 3909, 9950, 0, 128139, 983261, 68678,
- 0, 0, 1049, 0, 65707, 2304, 41806, 92326, 42336, 3921, 0, 11775, 64760,
+ 7481, 9448, 48, 983084, 9480, 481, 0, 9438, 9439, 9440, 9441, 8465, 9443,
+ 9444, 9445, 9430, 9431, 9432, 9433, 9434, 9435, 3984, 9437, 129135,
+ 92934, 9424, 9425, 9426, 9427, 9428, 9429, 64758, 2362, 9655, 128050,
+ 2004, 9096, 9782, 70842, 9172, 83071, 19965, 0, 5955, 67666, 1108, 0,
+ 74773, 78271, 128909, 64782, 3926, 92448, 65210, 8798, 0, 92165, 1392,
+ 983817, 120838, 127364, 10606, 8065, 118805, 10353, 10417, 127238,
+ 128739, 64524, 92418, 4019, 0, 125082, 43280, 8219, 68402, 1812, 119963,
+ 121067, 128430, 120939, 42410, 74448, 119132, 6054, 10697, 3169, 42297,
+ 42322, 10642, 3909, 9950, 128848, 128139, 983263, 68678, 74986, 983790,
+ 1049, 43517, 65707, 2304, 41806, 92326, 42336, 3921, 0, 11775, 64760,
11766, 1038, 42303, 9823, 127278, 69236, 4008, 64004, 8773, 10733, 36, 0,
- 5153, 41805, 0, 73735, 763, 41808, 64910, 983130, 2009, 0, 0, 127142,
- 9640, 119951, 0, 120695, 8621, 120523, 12852, 3031, 983050, 64361, 0,
- 182, 194718, 92716, 92598, 119950, 42613, 9058, 366, 0, 9892, 5969,
- 11754, 10848, 4570, 65301, 44013, 4255, 127889, 10102, 41189, 4003,
- 41026, 68109, 13293, 41192, 69635, 0, 42251, 0, 42534, 65179, 11287,
- 6128, 0, 11034, 10923, 64423, 0, 65506, 0, 65861, 74083, 92600, 9932, 0,
- 92423, 119955, 0, 9817, 0, 120140, 0, 12117, 66586, 4183, 10540, 66250,
- 9063, 127045, 0, 119954, 0, 12897, 3792, 2011, 0, 6065, 43160, 0, 194715,
- 8692, 41186, 41816, 41023, 41818, 41187, 11659, 7922, 12614, 2005, 8523,
- 78002, 0, 7513, 1863, 4710, 0, 5956, 7621, 78006, 92624, 4705, 716,
- 78004, 0, 4704, 120040, 120270, 42241, 161, 43977, 74546, 66214, 4706, 0,
- 69914, 42672, 4709, 10680, 119065, 43293, 119944, 0, 119164, 120328,
- 92467, 10187, 1700, 119223, 0, 0, 128119, 4004, 0, 10968, 43296, 983642,
- 8506, 0, 0, 126996, 1005, 937, 78216, 4734, 2870, 0, 78218, 983109, 7463,
- 4729, 0, 235, 1384, 4728, 0, 120420, 92490, 74449, 8109, 43105, 983174,
- 4730, 447, 13186, 1513, 4733, 120415, 0, 0, 42527, 12911, 43427, 1383,
- 8565, 2469, 120024, 6690, 6156, 68117, 43439, 7993, 4288, 120416, 2674,
- 13238, 11922, 0, 120330, 3510, 13234, 0, 120407, 5605, 42095, 11364, 0,
- 1380, 65617, 120253, 120261, 13196, 13197, 120309, 120682, 9495, 119346,
- 0, 5959, 67984, 73976, 120305, 43371, 6941, 119349, 13205, 13211, 5801,
- 12769, 65905, 41697, 1283, 120302, 4779, 0, 3719, 4006, 983569, 19957,
- 128773, 2021, 119332, 120699, 119150, 43028, 65493, 41838, 3875, 5962,
- 64341, 92616, 9814, 43457, 5827, 3314, 7787, 78234, 65494, 68153, 0, 0,
- 120636, 64531, 120692, 194626, 0, 0, 66316, 65467, 5771, 41298, 983794,
- 9742, 521, 0, 10800, 92222, 8404, 194625, 483, 7096, 7089, 66323, 928, 0,
- 0, 119018, 10599, 11586, 3989, 10971, 43748, 65782, 9841, 8843, 12145,
- 92470, 10074, 78548, 0, 3769, 0, 0, 0, 983107, 9573, 0, 65290, 8849, 0,
- 65855, 65112, 1796, 120505, 0, 69665, 8164, 41301, 3502, 0, 7388, 10621,
- 73838, 78553, 5825, 13007, 68165, 0, 120457, 12661, 7608, 10354, 10418,
- 42411, 2022, 0, 1409, 12195, 4001, 3112, 10824, 120639, 1390, 0, 0, 421,
- 43536, 5846, 120120, 4130, 127775, 7595, 42588, 7600, 120121, 66035,
- 983913, 0, 65851, 42607, 128190, 92403, 3168, 0, 42134, 11831, 2370,
- 2846, 92605, 0, 0, 120132, 0, 1836, 0, 0, 92558, 3740, 69843, 6290,
- 65374, 120451, 2390, 3944, 66628, 120434, 0, 6135, 3118, 74265, 119093,
- 120446, 0, 0, 8127, 8975, 64739, 7943, 983743, 0, 10618, 2584, 0, 0, 0,
- 9998, 128564, 0, 0, 0, 0, 6204, 0, 0, 8279, 8776, 64954, 4975, 70075,
- 120130, 4267, 1631, 42206, 77983, 0, 195046, 65700, 66562, 0, 64645, 0,
- 0, 126588, 12586, 0, 9242, 127922, 0, 4523, 5842, 10495, 3122, 983797,
- 7793, 78275, 9328, 119104, 78393, 12604, 0, 6615, 2285, 92344, 3986,
- 44025, 0, 8912, 64555, 7409, 0, 983358, 9541, 78276, 0, 11275, 8540,
- 11498, 0, 983357, 41040, 2459, 0, 13060, 41041, 74413, 983138, 0, 0,
- 68427, 10450, 12551, 41043, 7020, 120353, 3765, 983350, 0, 1606, 120348,
- 120351, 3093, 68436, 0, 983061, 119613, 0, 0, 4312, 74091, 120337,
- 120336, 11923, 4023, 120333, 5763, 94015, 4827, 10894, 12810, 64406,
- 118785, 4455, 74321, 433, 119620, 66660, 2499, 0, 0, 118837, 11973,
- 13089, 4293, 120329, 42224, 42758, 12196, 42837, 42226, 119319, 0,
- 119126, 5817, 127806, 55277, 3120, 9797, 0, 0, 0, 10389, 126485, 0, 4895,
- 65358, 0, 4359, 585, 2383, 3509, 70037, 486, 4290, 5758, 127546, 0, 0,
- 7004, 0, 65880, 127886, 119048, 2380, 11380, 0, 93996, 2376, 0, 119320,
- 0, 5197, 127046, 127047, 127048, 2366, 127050, 127051, 120554, 120045, 0,
- 0, 0, 983084, 0, 0, 0, 74188, 71342, 983086, 983573, 120047, 128575, 0,
- 0, 120049, 0, 1847, 0, 10339, 983365, 42384, 0, 4227, 74158, 0, 92501,
- 43032, 0, 42365, 0, 12671, 11384, 0, 983465, 0, 64797, 983345, 5820,
- 983344, 120052, 120065, 0, 120064, 120650, 42137, 9893, 2754, 12664,
- 120063, 0, 7377, 127867, 41799, 65530, 1711, 12984, 43039, 3114, 6255,
- 983340, 118938, 0, 10853, 926, 983369, 74184, 983368, 120055, 0, 43175,
- 0, 43037, 41798, 41035, 11583, 127769, 41801, 119088, 119605, 520, 4200,
- 12699, 8331, 0, 3091, 41034, 127353, 983681, 8360, 0, 78044, 321, 4229,
- 64543, 917946, 65563, 0, 917974, 2861, 43793, 10095, 0, 9195, 92386,
- 1861, 0, 73733, 0, 0, 43041, 0, 43794, 128530, 3859, 12181, 41660, 8209,
- 0, 73867, 12973, 0, 74757, 127514, 41658, 0, 0, 5760, 0, 743, 4414,
- 120766, 0, 42632, 917973, 65161, 73896, 128589, 0, 1405, 119063, 43220,
- 43341, 0, 19919, 0, 64532, 65367, 43710, 0, 0, 3513, 0, 118883, 43342,
- 119064, 65529, 65364, 128197, 0, 6485, 1397, 0, 41986, 92678, 0, 0,
- 74097, 0, 7471, 12079, 67997, 12682, 43287, 92317, 0, 983143, 983707, 0,
- 0, 1099, 10490, 0, 10501, 65181, 74463, 0, 464, 41624, 65283, 67663,
- 78222, 1346, 0, 917631, 64573, 64897, 423, 1818, 65144, 0, 8272, 127812,
- 19911, 4218, 3087, 64960, 127234, 43564, 0, 0, 9584, 10465, 983902,
- 74359, 12626, 9106, 0, 42642, 120230, 64750, 9390, 0, 41797, 0, 0, 265,
- 41795, 64666, 126508, 43530, 2752, 0, 0, 983493, 59, 0, 983593, 0, 92371,
- 77873, 41810, 0, 7010, 0, 41809, 41495, 119364, 0, 42252, 42213, 8009,
- 3305, 43033, 511, 92700, 66255, 13127, 120067, 0, 74397, 120235, 917977,
- 65915, 1400, 41812, 10685, 194870, 2103, 10387, 4453, 43276, 917783,
- 13159, 0, 6481, 41213, 0, 0, 0, 0, 41983, 74198, 6617, 9116, 119654, 0,
- 462, 68110, 10493, 0, 8129, 0, 0, 74471, 6644, 11658, 0, 128245, 3452,
- 11906, 9581, 1385, 3098, 0, 119013, 43340, 0, 41033, 6493, 42626, 0, 0,
- 11426, 77887, 1681, 118789, 1204, 3755, 64661, 7235, 10170, 3966, 8911,
- 0, 41841, 43338, 0, 0, 5726, 64915, 42175, 0, 0, 41497, 65044, 120109,
- 2851, 43017, 983589, 0, 4373, 78058, 0, 9587, 1789, 6671, 128840, 3100,
- 0, 65360, 0, 92365, 917789, 64922, 0, 8190, 12083, 0, 0, 6506, 64312,
- 74374, 2368, 0, 4419, 983847, 119125, 3439, 1825, 1192, 120106, 8891,
- 3080, 120228, 2347, 5430, 0, 8990, 2848, 0, 128223, 92528, 249, 0, 0, 0,
- 120658, 0, 0, 8883, 917802, 728, 68178, 995, 0, 0, 64826, 0, 917798,
- 128348, 0, 19945, 8091, 558, 0, 12273, 194814, 983850, 12112, 69912, 0,
- 0, 74419, 12335, 120104, 917795, 3443, 3129, 0, 2102, 65445, 78258,
- 64891, 0, 7725, 65108, 78255, 0, 8624, 69246, 12446, 43295, 0, 41894, 0,
- 6277, 41672, 41893, 10010, 128678, 3540, 128649, 835, 71340, 69816,
- 119868, 74408, 0, 73959, 5426, 4258, 0, 0, 5424, 128127, 8283, 0, 5434,
- 983590, 0, 19917, 11408, 0, 11947, 0, 1404, 3095, 11432, 128307, 3464,
- 6486, 4819, 128233, 0, 570, 8095, 3672, 119864, 1498, 67866, 0, 128539,
- 431, 0, 0, 128182, 128096, 68167, 983663, 13096, 128643, 0, 43408, 9516,
- 128538, 5268, 42230, 42220, 0, 4450, 120511, 11547, 43417, 128542, 356,
- 3477, 227, 10488, 68203, 382, 11418, 0, 195066, 0, 0, 0, 0, 6484, 2541,
- 66039, 0, 78718, 92723, 3549, 0, 9110, 119665, 2743, 0, 43290, 194812,
- 9097, 0, 43015, 8782, 0, 776, 2524, 42707, 8573, 0, 126494, 0, 0, 42694,
- 64944, 8952, 3856, 118818, 0, 5872, 6495, 0, 0, 0, 92543, 0, 120733,
- 12849, 3953, 1897, 0, 65094, 11994, 4339, 74556, 92654, 67843, 0, 0, 0,
- 68473, 74104, 5228, 128804, 7868, 43184, 0, 0, 73986, 43438, 0, 43022, 0,
- 1162, 917847, 2671, 0, 0, 92632, 92631, 118865, 4553, 73811, 0, 195005,
- 0, 0, 19921, 74331, 11424, 195006, 4567, 41891, 0, 983788, 55249, 4820,
- 65239, 194662, 0, 194665, 43042, 119212, 1377, 12869, 4897, 42821, 9250,
- 0, 4438, 64385, 0, 1753, 11331, 6147, 194941, 43282, 8833, 0, 0, 6504,
- 78408, 126979, 10719, 0, 1898, 1413, 42443, 0, 802, 12141, 0, 194671,
- 6648, 10671, 2528, 0, 64789, 9169, 838, 120087, 120697, 844, 5014, 0,
- 256, 0, 9990, 0, 42739, 917851, 7542, 65464, 9726, 0, 6489, 10048, 74326,
- 78719, 66573, 0, 78724, 78712, 11761, 194655, 0, 41094, 0, 0, 194893, 0,
- 92689, 6196, 6945, 93969, 194890, 128184, 120491, 11816, 194943, 5733,
- 2930, 0, 0, 41098, 0, 41093, 0, 66626, 588, 9760, 0, 194717, 1238, 200,
- 983207, 1660, 73916, 0, 118905, 74362, 0, 92485, 194651, 0, 983706, 3394,
- 194894, 120668, 0, 0, 127358, 66219, 127183, 43284, 194656, 7817, 1841,
- 11055, 120533, 194979, 194982, 1669, 10776, 194981, 7701, 194980, 0,
- 194995, 1732, 4030, 0, 3963, 66611, 127530, 41768, 6491, 0, 65324, 914,
- 65323, 8071, 3538, 0, 2287, 65328, 92441, 74367, 7614, 0, 11819, 0,
- 12009, 12399, 0, 67852, 65537, 0, 10841, 43430, 5301, 0, 92618, 5734,
- 8960, 0, 92527, 65317, 77880, 0, 0, 0, 12304, 0, 0, 65315, 92670, 128511,
- 0, 0, 0, 119621, 92529, 74536, 12447, 64486, 127374, 126562, 983129, 0,
- 0, 983802, 42767, 10915, 0, 12007, 43695, 120520, 11975, 194878, 0,
- 92604, 2555, 8629, 128640, 43168, 41872, 43706, 4496, 194879, 128148,
- 120241, 0, 0, 0, 0, 64730, 70041, 66714, 68222, 0, 70076, 65596, 92306,
- 11416, 4280, 67655, 8765, 12784, 7792, 1393, 126473, 67871, 74386, 0,
- 8233, 12820, 0, 6683, 194876, 3442, 12144, 2841, 12543, 0, 1473, 42820,
- 64329, 127832, 0, 68642, 6488, 357, 1048, 41100, 0, 41104, 94003, 3406,
- 1054, 71320, 1040, 65450, 0, 4434, 1069, 0, 118862, 65737, 917765,
- 128705, 0, 983693, 9693, 41943, 126564, 41931, 41759, 12757, 4353, 0,
- 1059, 9790, 8995, 119974, 983696, 65937, 0, 41764, 10646, 0, 118833,
- 92372, 0, 74830, 78569, 12743, 983689, 6480, 917761, 41779, 42580, 66601,
- 12207, 119619, 6335, 66602, 11312, 64807, 0, 0, 41767, 119629, 983764,
- 43020, 128271, 3955, 74254, 0, 983754, 917861, 0, 77926, 9770, 9246,
- 12230, 0, 0, 0, 10448, 41783, 41786, 127093, 12797, 2755, 64571, 78578,
- 194927, 4857, 0, 4428, 12794, 73755, 128061, 78574, 0, 74284, 0, 5747,
- 78825, 0, 7978, 41092, 74571, 0, 11924, 43812, 42144, 65015, 0, 563, 0,
- 983691, 12798, 11271, 57, 0, 0, 917860, 119043, 0, 94051, 43137, 694, 0,
- 9876, 0, 119168, 0, 78822, 64537, 0, 277, 74385, 7229, 12761, 0, 0,
- 13025, 64811, 8757, 78824, 126478, 1574, 7381, 0, 2525, 4852, 5749,
- 68465, 13027, 42824, 120574, 1039, 7151, 10155, 5745, 188, 41858, 11592,
- 0, 74015, 9055, 41853, 4858, 917780, 0, 436, 4771, 0, 2786, 0, 4856,
- 8051, 0, 119609, 71327, 9644, 0, 0, 0, 194916, 120732, 66710, 118834,
- 983359, 73906, 128680, 127114, 0, 10234, 5843, 11939, 0, 42157, 0, 3157,
- 194918, 68393, 0, 3504, 119178, 0, 10822, 5149, 66029, 10226, 65142,
- 128025, 3594, 42424, 194959, 40, 12657, 983665, 0, 386, 0, 8834, 0,
- 12815, 43574, 0, 73907, 0, 74196, 7220, 74504, 0, 74316, 0, 65322, 4304,
- 74503, 8160, 78707, 194753, 0, 0, 128526, 1348, 92349, 78597, 126539,
- 13303, 0, 92392, 194755, 7599, 1278, 43616, 13269, 0, 0, 74387, 78179,
- 78598, 74492, 6097, 7568, 8780, 4982, 127464, 74501, 194763, 78592,
- 194762, 2672, 3735, 127470, 13138, 42266, 9484, 10724, 41202, 71364, 0,
- 43742, 0, 9487, 119959, 119117, 3842, 128768, 78668, 12442, 6193, 9791,
- 127976, 0, 42516, 7228, 7559, 74803, 78468, 7873, 11399, 119219, 194691,
- 194855, 194690, 194857, 3604, 120683, 119188, 128877, 78540, 78541,
- 42507, 1962, 43305, 78476, 42505, 11660, 0, 2072, 92312, 6995, 74173,
- 5437, 74174, 10669, 8702, 7964, 92352, 0, 199, 194843, 4105, 194845,
- 194699, 194847, 194710, 119875, 13148, 7560, 78479, 9226, 78480, 195070,
- 6472, 65814, 73954, 0, 4724, 0, 0, 9191, 0, 64432, 983817, 983247,
- 195024, 10196, 7886, 0, 6585, 0, 6680, 195042, 0, 195051, 6679, 74412,
- 92251, 194866, 74421, 11382, 983631, 983637, 127891, 127484, 194833,
- 194832, 6681, 127482, 12693, 194836, 42727, 78196, 128252, 78195, 65442,
- 119610, 69733, 9989, 43248, 66248, 194816, 0, 11321, 128845, 194820,
- 194819, 5297, 7042, 13284, 6112, 7968, 194825, 73927, 92444, 194736,
- 65746, 127476, 69889, 74389, 128696, 4342, 42839, 194831, 1677, 0, 0,
- 126590, 917855, 11091, 11011, 2719, 0, 0, 119595, 10160, 0, 0, 7585,
- 65169, 2052, 4308, 92174, 43000, 7505, 543, 64916, 64736, 0, 0, 64655, 0,
- 118922, 2064, 0, 43158, 7902, 0, 65265, 194639, 0, 127170, 0, 983625, 0,
- 0, 12994, 92728, 10828, 983943, 6228, 4307, 3482, 128527, 0, 0, 0, 506,
- 74573, 41194, 65735, 2055, 43255, 41195, 0, 8169, 983680, 8841, 0, 516,
- 93974, 2063, 119051, 34, 128850, 120186, 11504, 1612, 74333, 120182,
- 11827, 74308, 12001, 120178, 10242, 64564, 120179, 67986, 6584, 7749,
- 11037, 0, 1758, 127092, 10667, 10560, 120197, 92593, 1935, 11517, 120193,
- 120196, 120195, 1931, 120189, 74839, 120191, 1217, 64702, 12643, 825,
- 127838, 194905, 12294, 92428, 78834, 9138, 78831, 78833, 12631, 78829,
- 11080, 74554, 64000, 5591, 1239, 0, 11313, 0, 3403, 0, 0, 64364, 92269,
- 0, 74582, 8998, 12988, 0, 9152, 983849, 0, 126484, 67589, 41850, 64290,
- 3433, 92393, 12615, 1594, 42192, 6914, 67603, 0, 119569, 74565, 41353,
- 67602, 67611, 4337, 0, 127296, 918, 65035, 41351, 7681, 194900, 42577,
- 41393, 12668, 194904, 2477, 127285, 0, 127301, 0, 67604, 194880, 127235,
- 573, 127282, 194884, 11417, 194886, 119814, 194888, 67599, 0, 194889,
- 67607, 11482, 0, 3981, 3357, 0, 42223, 4207, 1288, 78842, 78839, 68419,
- 78837, 11589, 42195, 194872, 194599, 127263, 64602, 67618, 92539, 0,
- 42788, 68416, 64480, 194875, 8423, 3348, 448, 68476, 9717, 0, 0, 997, 0,
- 0, 92577, 0, 11440, 11379, 42000, 13139, 42221, 65013, 126999, 127760,
- 73796, 0, 119228, 12035, 0, 2818, 0, 74411, 73793, 0, 4172, 0, 0, 8373,
- 10873, 12197, 0, 0, 92265, 69706, 0, 78210, 0, 128110, 194865, 126982,
- 74563, 64828, 11419, 194868, 766, 1257, 0, 118845, 11381, 3265, 66617,
- 3274, 127365, 126523, 94042, 983950, 74522, 41989, 0, 0, 128798, 3263, 0,
- 65672, 0, 3270, 64539, 11489, 0, 0, 0, 0, 9505, 65518, 194776, 756,
- 194605, 0, 0, 0, 7261, 0, 186, 0, 119156, 5770, 13179, 65830, 12612,
- 12949, 64856, 12800, 983901, 74203, 64718, 11507, 0, 92434, 118929, 0,
- 11578, 0, 119296, 0, 0, 0, 0, 74568, 9254, 0, 1794, 120217, 64521, 5624,
- 120220, 120221, 119958, 120223, 3617, 66636, 64886, 94061, 120212,
- 120213, 120214, 1872, 66508, 120467, 41079, 10748, 5502, 119330, 4452, 0,
- 983771, 92526, 4511, 0, 983877, 64678, 11425, 0, 43245, 1231, 194783,
- 69903, 0, 9003, 8192, 0, 5305, 9653, 10616, 8694, 9546, 0, 0, 120478,
- 120200, 65205, 120202, 64063, 9878, 74780, 119626, 78202, 64058, 8799,
- 42131, 0, 64062, 1028, 64060, 64059, 837, 10567, 0, 43103, 0, 120754,
- 11427, 2902, 64043, 64042, 43749, 10756, 64047, 42606, 64045, 64044,
- 43979, 10076, 64040, 43060, 194942, 1034, 3392, 127771, 43091, 64033,
- 64032, 42735, 64038, 64037, 64036, 64035, 4291, 194928, 64015, 64014,
- 64681, 194930, 0, 78145, 0, 43090, 0, 3476, 8973, 64012, 42473, 64010,
- 64008, 64007, 2003, 7706, 64517, 78153, 2538, 64009, 204, 0, 4802, 4111,
- 8239, 9098, 4805, 64001, 64057, 7885, 7247, 64054, 983266, 0, 4767, 9343,
- 64049, 64048, 120034, 1133, 64053, 64052, 43453, 64050, 41340, 118975,
- 194835, 10005, 12329, 41333, 0, 8489, 1942, 0, 194834, 42520, 128249, 0,
- 0, 10760, 64023, 64022, 64021, 6582, 43670, 0, 64025, 9167, 42151, 78244,
- 983232, 2026, 64019, 64018, 64017, 64016, 12768, 0, 7582, 78252, 78248,
- 77914, 78246, 78247, 0, 77915, 78766, 6788, 13094, 77920, 7532, 41414,
- 78520, 3179, 78518, 64769, 78514, 78517, 11461, 74454, 10751, 9051,
- 120720, 6708, 10535, 983627, 68218, 55274, 2008, 64031, 64030, 294,
- 41874, 0, 126991, 65929, 0, 0, 0, 0, 64028, 8146, 64026, 41788, 194844,
- 0, 4351, 6343, 43247, 119888, 0, 119886, 119891, 119892, 119889, 11433,
- 119895, 119896, 0, 7801, 65578, 194839, 12915, 43968, 3297, 9699, 194955,
- 1135, 0, 0, 128525, 1995, 6722, 983925, 0, 2552, 41546, 60, 68394, 8649,
- 41549, 78496, 983327, 0, 6682, 0, 78679, 64710, 41547, 983630, 2013,
- 128291, 78530, 78532, 78528, 78529, 12832, 78493, 8081, 8362, 3537,
- 119908, 9137, 7155, 8999, 0, 78533, 3466, 0, 0, 1996, 0, 3453, 6282, 0,
- 2002, 2000, 120175, 537, 0, 4179, 65119, 1998, 0, 1842, 0, 92674, 9628,
- 68446, 12081, 9826, 64502, 1767, 0, 0, 0, 120201, 983646, 0, 0, 3059,
- 44024, 120204, 119953, 92693, 0, 0, 92452, 4100, 920, 1811, 1355, 0, 0,
- 3592, 10078, 0, 0, 0, 8592, 65870, 68164, 128792, 10742, 0, 42918, 1994,
- 9281, 3296, 12865, 1997, 1895,
+ 5153, 41805, 0, 73735, 763, 41808, 64910, 121389, 2009, 0, 127985, 74245,
+ 9640, 119951, 0, 69895, 8621, 120523, 12852, 3031, 983050, 64361, 129088,
+ 182, 66414, 92716, 92598, 119950, 42613, 9058, 366, 0, 9892, 5969, 11754,
+ 10848, 4570, 65301, 44013, 4255, 127889, 10102, 41189, 4003, 41026,
+ 68109, 13293, 41192, 69635, 124977, 42251, 0, 42534, 65179, 11287, 6128,
+ 113811, 11034, 10923, 64423, 125058, 65506, 983912, 65861, 74083, 66872,
+ 9932, 43516, 83063, 83065, 83064, 9817, 0, 71234, 0, 12117, 66586, 4183,
+ 10540, 66250, 9063, 127045, 128547, 119954, 113685, 12897, 3792, 2011,
+ 121418, 6065, 43160, 128379, 120595, 8692, 41186, 41816, 41023, 41818,
+ 41187, 11659, 7922, 12614, 2005, 8523, 78002, 120035, 7513, 1863, 4710,
+ 0, 5956, 7621, 78005, 92624, 4705, 716, 74918, 0, 4704, 120040, 93024,
+ 42241, 161, 43977, 74546, 66214, 4706, 74077, 69914, 42672, 4709, 10680,
+ 119065, 43293, 68771, 983190, 119164, 120328, 83319, 10187, 1700, 119223,
+ 83315, 0, 74980, 4004, 917595, 10968, 43296, 128331, 8506, 113744,
+ 194812, 126996, 1005, 937, 78216, 4734, 2870, 121350, 78218, 983109,
+ 7463, 4729, 0, 235, 1384, 4728, 74887, 70494, 92490, 74449, 8109, 43105,
+ 128623, 4730, 447, 13186, 1513, 4733, 120415, 92548, 0, 42527, 12911,
+ 43427, 1383, 8565, 2469, 120024, 6690, 6156, 68117, 43439, 7993, 4288,
+ 120416, 2674, 13238, 11922, 0, 92529, 3510, 13234, 983832, 120407, 5605,
+ 42095, 11364, 92286, 1380, 65617, 11162, 120261, 13196, 13197, 120309,
+ 67708, 9495, 119346, 127154, 5959, 67984, 73976, 66275, 43371, 6941,
+ 119349, 13205, 13211, 5801, 12769, 65905, 41697, 1283, 82952, 4779,
+ 983922, 3719, 4006, 983569, 19957, 71186, 2021, 119332, 43877, 83140,
+ 43028, 65493, 41838, 3875, 5962, 64341, 92616, 9814, 43457, 5827, 3314,
+ 7787, 71189, 65494, 68153, 126991, 194697, 120636, 64531, 120692, 194626,
+ 128753, 983958, 66316, 65467, 5771, 41298, 983794, 9742, 521, 0, 10800,
+ 92222, 8404, 194625, 483, 7096, 7089, 66323, 928, 0, 0, 119018, 10599,
+ 11586, 3989, 10971, 43748, 65782, 9841, 8843, 12145, 67261, 10074, 78548,
+ 93999, 3769, 0, 0, 128703, 983107, 9573, 917998, 65290, 8849, 119254,
+ 65855, 65112, 1796, 71046, 0, 69665, 8164, 41301, 3502, 83135, 7388,
+ 10621, 73838, 78553, 5825, 13007, 68165, 92203, 92915, 12661, 7608,
+ 10354, 10418, 42411, 2022, 0, 1409, 12195, 4001, 3112, 10824, 120639,
+ 1390, 70184, 194704, 421, 43536, 5846, 120120, 4130, 127775, 7595, 42588,
+ 7600, 74400, 66035, 195091, 0, 65851, 42607, 124955, 92403, 3168, 67733,
+ 42134, 11831, 2370, 2846, 92605, 128084, 0, 120132, 127745, 1836, 0,
+ 121207, 92558, 3740, 69843, 6290, 65374, 120451, 2390, 3944, 66628,
+ 119006, 0, 6135, 3118, 74265, 119093, 83310, 77975, 0, 8127, 8975, 64739,
+ 7943, 124968, 119234, 10618, 2584, 0, 0, 128225, 9998, 120573, 83306, 0,
+ 127750, 43508, 6204, 127044, 121374, 8279, 8776, 64954, 4975, 70075,
+ 120130, 4267, 1631, 42206, 77983, 128015, 195046, 65700, 66386, 0, 64645,
+ 0, 92887, 126588, 12586, 0, 9242, 120100, 0, 4523, 5842, 10495, 3122,
+ 983797, 7793, 78275, 9328, 119104, 78393, 12604, 92885, 6615, 2285,
+ 92344, 3986, 44025, 0, 8912, 64555, 7409, 92247, 983360, 9541, 78276,
+ 113669, 11275, 8540, 11498, 120868, 983359, 41040, 2459, 127302, 13060,
+ 41041, 74413, 983138, 0, 77931, 68427, 10450, 12551, 41043, 7020, 120353,
+ 3765, 92881, 917612, 1606, 120348, 92299, 3093, 68436, 128040, 983061,
+ 119613, 0, 0, 4312, 74091, 120337, 74983, 11923, 4023, 68399, 5763,
+ 94015, 4827, 10894, 12810, 64406, 118785, 4455, 74321, 433, 119620,
+ 66660, 2499, 67167, 67166, 118837, 11973, 13089, 4293, 120329, 42224,
+ 42758, 12196, 42837, 42226, 119319, 127992, 119126, 5817, 127806, 55277,
+ 3120, 9797, 0, 0, 11086, 10389, 126485, 128784, 4895, 65358, 124941,
+ 4359, 585, 2383, 3509, 70037, 486, 4290, 5758, 127546, 121160, 983106,
+ 7004, 113667, 65880, 126514, 119048, 2380, 11380, 983863, 93996, 2376,
+ 78841, 83402, 0, 5197, 70839, 127047, 127048, 2366, 127050, 119604,
+ 70837, 120045, 0, 128554, 0, 917846, 0, 0, 0, 74188, 71342, 78455, 75048,
+ 113675, 74900, 120046, 127542, 120049, 983366, 1847, 120978, 10339,
+ 983367, 42384, 121379, 4227, 74158, 0, 74498, 43032, 121124, 42365, 0,
+ 12671, 11384, 120059, 74264, 120058, 64797, 983347, 5820, 983346, 120052,
+ 120065, 128825, 120064, 120053, 42137, 9893, 2754, 12664, 120063, 121286,
+ 7377, 120051, 41799, 65530, 1711, 12984, 43039, 3114, 6255, 121132,
+ 68660, 0, 10853, 926, 983371, 74184, 120915, 120055, 119301, 43175, 0,
+ 43037, 41798, 41035, 11583, 127769, 41801, 119088, 119605, 520, 4200,
+ 12699, 8331, 70118, 3091, 41034, 66298, 70293, 8360, 983445, 78044, 321,
+ 4229, 64543, 128470, 65563, 194873, 917974, 2861, 43793, 10095, 121428,
+ 9195, 92386, 1861, 0, 73733, 917780, 68839, 43041, 0, 43794, 128530,
+ 3859, 12181, 41660, 8209, 70793, 73867, 12973, 75014, 74757, 127514,
+ 41658, 128376, 121235, 5760, 113699, 743, 4414, 120766, 0, 42632, 127236,
+ 65161, 73896, 128589, 0, 1405, 119063, 43220, 43341, 0, 19919, 70278,
+ 64532, 65367, 43710, 11199, 125077, 3513, 71115, 70341, 43342, 119064,
+ 65529, 65364, 83208, 83170, 6485, 1397, 194781, 41986, 92678, 83204,
+ 83212, 74097, 83213, 7471, 12079, 67997, 6843, 43287, 92317, 0, 67406,
+ 120239, 194678, 71914, 1099, 10490, 83201, 10501, 65181, 74463, 128952,
+ 464, 41624, 65283, 67663, 78222, 1346, 194609, 65679, 64573, 64897, 423,
+ 1818, 65144, 82963, 8272, 127812, 19911, 4218, 3087, 64960, 121447,
+ 43564, 0, 983182, 9584, 10465, 983902, 74359, 12626, 9106, 0, 42642,
+ 71235, 64750, 9390, 0, 41797, 194730, 128333, 265, 41795, 64666, 74628,
+ 43530, 2752, 127365, 128459, 126482, 59, 983671, 121410, 11149, 78074,
+ 77873, 41810, 83162, 7010, 0, 41809, 41495, 119364, 5877, 42252, 42213,
+ 8009, 3305, 43033, 511, 92700, 43848, 13127, 120067, 983946, 74397,
+ 120235, 128641, 65915, 1400, 41812, 10685, 75017, 2103, 10387, 4453,
+ 43276, 917783, 11169, 128939, 6481, 41213, 0, 0, 129133, 119929, 41983,
+ 74198, 6617, 9116, 119654, 92995, 462, 68110, 10493, 121449, 8129, 92994,
+ 128365, 74471, 6644, 11658, 0, 128245, 3452, 11906, 9581, 1385, 3098, 0,
+ 119013, 43340, 11123, 41033, 6493, 42626, 0, 129051, 11426, 77887, 1681,
+ 118789, 1204, 3755, 64661, 7235, 10170, 3966, 8911, 0, 41841, 43338, 0,
+ 119323, 5726, 64915, 42175, 983913, 0, 41497, 65044, 120109, 2851, 43017,
+ 983589, 120896, 4373, 78058, 0, 9587, 1789, 6671, 128840, 3100, 0, 65360,
+ 917589, 92365, 128202, 64922, 0, 8190, 12083, 0, 83141, 6506, 64312,
+ 74374, 2368, 983187, 4419, 121259, 119125, 3439, 1825, 1192, 120106,
+ 8891, 3080, 120228, 2347, 5430, 120107, 8990, 2848, 92981, 121372, 73942,
+ 249, 0, 0, 0, 120658, 119324, 128712, 8883, 119860, 728, 11173, 995, 0,
+ 121047, 64826, 124931, 917798, 128348, 0, 19945, 8091, 558, 0, 12273,
+ 194814, 67714, 12112, 67272, 67265, 67273, 67274, 12335, 120104, 68019,
+ 3443, 3129, 67267, 2102, 65445, 78258, 64891, 0, 7725, 65108, 11120,
+ 9205, 8624, 69246, 12446, 43295, 128519, 41894, 0, 6277, 41672, 41893,
+ 10010, 127381, 3540, 121450, 835, 71340, 69816, 119854, 74408, 0, 67108,
+ 5426, 4258, 83188, 120858, 5424, 92306, 8283, 127978, 5434, 83196,
+ 129027, 19917, 11408, 0, 11947, 128330, 1404, 3095, 11432, 121122, 3464,
+ 6486, 4819, 128233, 129123, 570, 8095, 3672, 119864, 1498, 67866, 0,
+ 128539, 431, 67820, 0, 128182, 128096, 68167, 983663, 13096, 128643,
+ 121018, 43408, 9516, 128538, 5268, 42230, 42220, 0, 4450, 120511, 11547,
+ 43417, 128542, 356, 3477, 227, 10488, 68203, 382, 11418, 0, 5878, 983799,
+ 0, 0, 0, 6484, 2541, 66039, 113777, 78157, 92723, 3549, 195067, 9110,
+ 119665, 2743, 0, 43290, 128585, 9097, 195026, 43015, 8782, 0, 776, 2524,
+ 42707, 8573, 120903, 126494, 0, 71102, 42694, 64944, 8952, 3856, 118818,
+ 125111, 5872, 6495, 129125, 0, 0, 92543, 67173, 67172, 12849, 3953, 1897,
+ 93071, 65094, 11994, 4339, 74556, 92654, 67843, 0, 0, 119087, 68473,
+ 74104, 5228, 119835, 7868, 43184, 0, 120955, 73986, 43438, 0, 43022,
+ 917553, 1162, 74995, 2671, 128567, 127198, 92632, 92631, 118865, 4553,
+ 73811, 983573, 195005, 118928, 68085, 19921, 73821, 11424, 195002, 4567,
+ 41891, 0, 983788, 55249, 4820, 65239, 194662, 0, 194665, 43042, 119212,
+ 1377, 12869, 4897, 42821, 9250, 70272, 4438, 64385, 0, 1753, 11331, 6147,
+ 194941, 43282, 8833, 69998, 0, 6504, 78408, 121166, 10719, 70275, 1898,
+ 1413, 42443, 0, 802, 12141, 121138, 83097, 6648, 10671, 2528, 0, 64789,
+ 9169, 838, 68819, 68807, 844, 5014, 66297, 256, 68818, 9990, 128398,
+ 42739, 917851, 7542, 65464, 9726, 83224, 6489, 10048, 74326, 78719,
+ 66573, 0, 78724, 78712, 11761, 121314, 83226, 41094, 0, 77958, 194893,
+ 78403, 92689, 6196, 6945, 93969, 120942, 67095, 120491, 11816, 68846,
+ 5733, 2930, 70274, 127179, 41098, 92771, 41093, 68834, 66626, 588, 9760,
+ 125099, 194717, 1238, 200, 983207, 1660, 73916, 0, 67141, 74362, 0,
+ 92485, 124930, 0, 74999, 3394, 194894, 120668, 0, 69996, 127358, 66219,
+ 72425, 43284, 68072, 7817, 1841, 11055, 66835, 194979, 74607, 1669,
+ 10776, 74534, 7701, 194980, 983450, 74992, 1732, 4030, 983442, 3963,
+ 65335, 127530, 41768, 6491, 65333, 65324, 914, 65323, 8071, 3538, 983845,
+ 2287, 65328, 92441, 74367, 7614, 0, 11819, 71908, 12009, 12399, 121217,
+ 67852, 65537, 0, 10841, 43430, 5301, 0, 92618, 5734, 8960, 0, 70123,
+ 65317, 77880, 0, 5876, 70374, 12304, 0, 0, 65315, 92670, 128511, 71862,
+ 0, 127957, 119621, 11114, 71909, 12447, 64486, 121236, 126562, 983129, 0,
+ 121393, 983802, 42767, 10915, 983174, 12007, 43695, 68033, 11975, 194878,
+ 0, 92604, 2555, 8629, 128640, 41133, 41872, 43706, 4496, 194879, 83108,
+ 120241, 128164, 0, 0, 983553, 64730, 70041, 66714, 68222, 0, 70076,
+ 65596, 67837, 11416, 4280, 67655, 8765, 12784, 7792, 1393, 78191, 11157,
+ 74386, 127274, 8233, 12820, 983730, 6683, 125112, 3442, 12144, 2841,
+ 12543, 0, 1473, 42820, 64329, 120880, 67243, 68642, 6488, 357, 1048,
+ 41100, 72417, 41104, 94003, 3406, 1054, 71320, 1040, 65450, 983385, 4434,
+ 1069, 194784, 118862, 65737, 121202, 128705, 0, 83211, 9693, 41943,
+ 68305, 41931, 41759, 12757, 4353, 983353, 1059, 9790, 8995, 119974,
+ 917770, 65937, 78572, 41758, 10646, 121159, 118833, 92372, 70424, 74830,
+ 78569, 12743, 983689, 6480, 917761, 41779, 42580, 66601, 12207, 77895,
+ 6335, 43919, 11312, 64807, 92962, 69989, 41767, 119629, 983764, 43020,
+ 74974, 3955, 74254, 120632, 983754, 917861, 70187, 69975, 9770, 9246,
+ 12230, 125047, 129105, 78580, 10448, 41783, 41786, 127093, 12797, 2755,
+ 64571, 78578, 194927, 4857, 983577, 4428, 12794, 73755, 128061, 78574, 0,
+ 11116, 43842, 5747, 78825, 70471, 7978, 41092, 74571, 0, 11924, 43812,
+ 42144, 65015, 0, 563, 0, 129412, 12798, 11271, 57, 92717, 83495, 917860,
+ 119043, 917618, 94051, 43137, 694, 983719, 9876, 0, 119168, 0, 70392,
+ 64537, 127914, 277, 74385, 7229, 12761, 983145, 74466, 13025, 64811,
+ 8757, 78824, 78188, 1574, 7381, 0, 2525, 4852, 5749, 68465, 13027, 42824,
+ 120574, 1039, 7151, 10155, 5745, 188, 41858, 11592, 129156, 69725, 9055,
+ 41853, 4858, 75000, 917990, 436, 4771, 917936, 2786, 93028, 4856, 8051,
+ 92500, 119609, 71327, 9644, 71133, 125009, 128873, 194916, 120732, 66710,
+ 68084, 983361, 73906, 67409, 127114, 917916, 10234, 5843, 11939, 70346,
+ 42157, 0, 3157, 194659, 68393, 75035, 3504, 70422, 0, 10822, 5149, 66029,
+ 10226, 65142, 128025, 3594, 42424, 124993, 40, 12657, 983665, 0, 386,
+ 121467, 8834, 120974, 12815, 43574, 121430, 73907, 127792, 70113, 7220,
+ 11839, 121143, 74316, 194752, 65322, 4304, 74503, 8160, 74314, 194753,
+ 121276, 0, 128526, 1348, 92349, 78597, 121139, 13303, 70406, 92392,
+ 128474, 7599, 1278, 43616, 13269, 127805, 127110, 74387, 78179, 78598,
+ 74492, 6097, 7568, 8780, 4982, 127464, 74501, 194763, 78592, 68745, 2672,
+ 3735, 127470, 13138, 42266, 9484, 10724, 41202, 71364, 128370, 43742,
+ 128373, 9487, 119959, 68785, 3842, 71911, 78668, 12442, 6193, 9791,
+ 119344, 0, 42516, 7228, 7559, 74803, 66721, 7873, 11399, 119219, 194691,
+ 70006, 194690, 127537, 3604, 120683, 119188, 128877, 78540, 78541, 42507,
+ 1962, 43305, 78476, 42505, 11660, 121021, 2072, 92312, 6995, 74173, 5437,
+ 74174, 10669, 8702, 7964, 92352, 983776, 199, 68075, 4105, 194845,
+ 127942, 75006, 194710, 67818, 13148, 7560, 78479, 9226, 78478, 195070,
+ 6472, 65814, 71919, 121218, 4724, 128491, 195041, 9191, 194645, 64432,
+ 120270, 82987, 119190, 10196, 7886, 0, 6585, 0, 6680, 195042, 983425,
+ 71872, 6679, 74412, 92251, 194866, 74421, 11382, 128254, 43862, 78591,
+ 113733, 194679, 194832, 6681, 127482, 12693, 194836, 42727, 78196,
+ 128252, 43874, 65442, 68047, 69733, 9989, 43248, 66248, 194816, 0, 11321,
+ 128845, 120809, 194819, 5297, 7042, 13284, 6112, 7968, 93010, 73927,
+ 92444, 127336, 65746, 118796, 69889, 74389, 128696, 4342, 42839, 121339,
+ 1677, 917592, 82989, 126590, 83415, 11091, 11011, 2719, 0, 0, 119595,
+ 10160, 0, 129150, 7585, 65169, 2052, 4308, 83414, 43000, 7505, 543,
+ 64916, 64736, 118835, 0, 64655, 983053, 118922, 2064, 0, 43158, 7902,
+ 983231, 65265, 194639, 121080, 127170, 127041, 128006, 92550, 983186,
+ 12994, 92728, 10828, 74378, 6228, 4307, 3482, 128527, 83231, 72389,
+ 83079, 506, 74573, 41194, 65735, 2055, 43255, 41195, 0, 8169, 121407,
+ 8841, 983747, 516, 93974, 2063, 119051, 34, 128850, 120186, 11504, 1612,
+ 74333, 120182, 11827, 67165, 12001, 120178, 10242, 64564, 120179, 67986,
+ 6584, 7749, 11037, 128743, 1758, 119074, 10667, 10560, 120197, 92593,
+ 1935, 11517, 120193, 120196, 83082, 1931, 120189, 74839, 120191, 1217,
+ 64702, 12643, 825, 127838, 194905, 12294, 92428, 78834, 9138, 78831,
+ 78833, 12631, 71871, 11080, 74554, 64000, 5591, 1239, 127199, 11313,
+ 194803, 3403, 983655, 120271, 64364, 92269, 121282, 72431, 8998, 12988,
+ 119983, 9152, 92161, 0, 126484, 67589, 41850, 64290, 3433, 92393, 12615,
+ 1594, 42192, 6914, 66392, 0, 119569, 74565, 41353, 67602, 67611, 4337, 0,
+ 127296, 918, 65035, 41351, 7681, 194900, 42577, 41393, 12668, 72395,
+ 2477, 127285, 121249, 118880, 0, 67604, 67683, 127235, 573, 127282,
+ 120543, 11417, 92661, 119814, 119309, 67599, 0, 72410, 67607, 11482, 0,
+ 3981, 3357, 0, 42223, 4207, 1288, 78503, 78839, 67728, 77907, 11589,
+ 42195, 74477, 119997, 127178, 64602, 67618, 92539, 121366, 42788, 68416,
+ 64480, 194875, 8423, 3348, 448, 66907, 9717, 119311, 0, 997, 0, 0, 92577,
+ 0, 11440, 11379, 42000, 13139, 42221, 65013, 126999, 127760, 72390, 0,
+ 119228, 12035, 0, 2818, 0, 74411, 73793, 983278, 4172, 71252, 119992,
+ 8373, 10873, 12197, 125074, 195014, 92265, 69706, 128540, 6834, 74347,
+ 74958, 129033, 126982, 74563, 64828, 11419, 194868, 766, 1257, 194598,
+ 118845, 11381, 3265, 66617, 3274, 126629, 83254, 71861, 983950, 74522,
+ 41989, 121317, 0, 113769, 3263, 917922, 65672, 69243, 3270, 64539, 11489,
+ 917911, 0, 0, 71127, 9505, 65518, 128498, 756, 194605, 0, 0, 194621,
+ 7261, 92547, 186, 0, 119156, 5770, 13179, 65830, 12612, 12949, 64856,
+ 12800, 983901, 74203, 64718, 11507, 78673, 92434, 74626, 113760, 11578,
+ 983837, 119296, 120970, 121127, 125101, 0, 70083, 9254, 66877, 1794,
+ 68310, 64521, 5624, 120220, 120221, 119958, 120223, 3617, 66636, 64886,
+ 94061, 68659, 120213, 120214, 1872, 66508, 120467, 41079, 10748, 5502,
+ 119330, 4452, 128088, 983771, 92526, 4511, 120958, 983877, 64678, 11425,
+ 0, 43245, 1231, 68861, 69903, 0, 9003, 8192, 0, 5305, 9653, 10616, 8694,
+ 9546, 0, 128332, 70421, 120200, 65205, 120202, 64063, 9878, 74780,
+ 119626, 78202, 64058, 8799, 42131, 128662, 64062, 1028, 64060, 64059,
+ 837, 10567, 72384, 43103, 0, 120754, 11427, 2902, 64043, 64042, 43749,
+ 10756, 64047, 42606, 64045, 64044, 43979, 10076, 64040, 43060, 194942,
+ 1034, 3392, 83336, 43091, 64033, 64032, 42735, 43498, 64037, 64036,
+ 64035, 4291, 129157, 64015, 64014, 64681, 83394, 83395, 78145, 71898,
+ 43090, 83391, 3476, 8973, 64012, 42473, 64010, 64008, 64007, 2003, 7706,
+ 64517, 78153, 2538, 64009, 204, 0, 4802, 4111, 8239, 9098, 4805, 64001,
+ 64057, 7885, 7247, 64054, 983268, 0, 4767, 9343, 64049, 64048, 120034,
+ 1133, 64053, 64052, 43453, 64050, 41340, 118975, 83261, 10005, 12329,
+ 41333, 83259, 8489, 1942, 917921, 194834, 42520, 65510, 125044, 68291,
+ 10760, 64023, 64022, 64021, 6582, 43670, 127798, 64025, 9167, 42151,
+ 78244, 983232, 2026, 64019, 64018, 64017, 64016, 12768, 121361, 7582,
+ 78252, 78248, 77914, 78246, 78247, 120791, 77915, 78766, 6788, 13094,
+ 77920, 7532, 41414, 78520, 3179, 78518, 64769, 78514, 78517, 11461,
+ 74454, 10751, 9051, 120720, 6708, 10535, 118955, 68218, 55274, 2008,
+ 64031, 64030, 294, 41874, 83383, 64790, 65929, 83376, 83337, 83379,
+ 83380, 64028, 8146, 64026, 41788, 194844, 0, 4351, 6343, 43247, 119888,
+ 70153, 119886, 119891, 72387, 119889, 11433, 119895, 119896, 194655,
+ 7801, 65578, 83361, 12915, 43968, 3297, 9699, 83357, 1135, 83350, 83351,
+ 83352, 1995, 6722, 983925, 128815, 2552, 41546, 60, 68394, 8649, 41549,
+ 78496, 72386, 83371, 6682, 83365, 78679, 43833, 41547, 983630, 2013,
+ 83362, 78530, 78532, 78528, 78529, 12832, 78493, 8081, 8362, 3537,
+ 119908, 9137, 7155, 8999, 917901, 78533, 3466, 0, 121466, 1996, 0, 3453,
+ 6282, 0, 2002, 2000, 120175, 537, 92976, 4179, 65119, 1998, 120746, 1842,
+ 0, 92674, 9628, 68446, 12081, 9826, 64502, 1767, 0, 983248, 120001,
+ 120201, 983646, 124975, 127952, 3059, 44024, 120204, 43491, 92693, 0,
+ 121472, 92452, 4100, 920, 1811, 1355, 43189, 0, 3592, 10078, 0, 78162,
+ 119558, 8592, 65870, 66417, 74504, 10742, 72400, 42918, 1994, 9281, 3296,
+ 12865, 1997, 1895,
};
#define code_magic 47
@@ -19839,7 +23265,7 @@ static unsigned int code_hash[] = {
#define code_poly 32771
static const unsigned int aliases_start = 0xf0000;
-static const unsigned int aliases_end = 0xf01c9;
+static const unsigned int aliases_end = 0xf01cb;
static const unsigned int name_aliases[] = {
0x0000,
0x0000,
@@ -20034,6 +23460,8 @@ static const unsigned int name_aliases[] = {
0x2118,
0x2448,
0x2449,
+ 0x2B7A,
+ 0x2B7C,
0xA015,
0xFE18,
0xFE00,
diff --git a/Modules/winreparse.h b/Modules/winreparse.h
new file mode 100644
index 0000000000..66f7775dd2
--- /dev/null
+++ b/Modules/winreparse.h
@@ -0,0 +1,53 @@
+#ifndef Py_WINREPARSE_H
+#define Py_WINREPARSE_H
+
+#ifdef MS_WINDOWS
+#include <Windows.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* The following structure was copied from
+ http://msdn.microsoft.com/en-us/library/ff552012.aspx as the required
+ include doesn't seem to be present in the Windows SDK (at least as included
+ with Visual Studio Express). */
+typedef struct _REPARSE_DATA_BUFFER {
+ ULONG ReparseTag;
+ USHORT ReparseDataLength;
+ USHORT Reserved;
+ union {
+ struct {
+ USHORT SubstituteNameOffset;
+ USHORT SubstituteNameLength;
+ USHORT PrintNameOffset;
+ USHORT PrintNameLength;
+ ULONG Flags;
+ WCHAR PathBuffer[1];
+ } SymbolicLinkReparseBuffer;
+
+ struct {
+ USHORT SubstituteNameOffset;
+ USHORT SubstituteNameLength;
+ USHORT PrintNameOffset;
+ USHORT PrintNameLength;
+ WCHAR PathBuffer[1];
+ } MountPointReparseBuffer;
+
+ struct {
+ UCHAR DataBuffer[1];
+ } GenericReparseBuffer;
+ };
+} REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;
+
+#define REPARSE_DATA_BUFFER_HEADER_SIZE FIELD_OFFSET(REPARSE_DATA_BUFFER,\
+ GenericReparseBuffer)
+#define MAXIMUM_REPARSE_DATA_BUFFER_SIZE ( 16 * 1024 )
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* MS_WINDOWS */
+
+#endif /* !Py_WINREPARSE_H */
diff --git a/Modules/xxlimited.c b/Modules/xxlimited.c
index eecdab9697..40c176063d 100644
--- a/Modules/xxlimited.c
+++ b/Modules/xxlimited.c
@@ -40,11 +40,18 @@ newXxoObject(PyObject *arg)
/* Xxo methods */
-static void
-Xxo_dealloc(XxoObject *self)
+static int
+Xxo_traverse(XxoObject *self, visitproc visit, void *arg)
+{
+ Py_VISIT(self->x_attr);
+ return 0;
+}
+
+static int
+Xxo_finalize(XxoObject *self)
{
- Py_XDECREF(self->x_attr);
- ((freefunc)PyType_GetSlot(Py_TYPE(self), Py_tp_free))(self);
+ Py_CLEAR(self->x_attr);
+ return 0;
}
static PyObject *
@@ -102,7 +109,8 @@ Xxo_setattr(XxoObject *self, char *name, PyObject *v)
static PyType_Slot Xxo_Type_slots[] = {
{Py_tp_doc, "The Xxo type"},
- {Py_tp_dealloc, Xxo_dealloc},
+ {Py_tp_traverse, Xxo_traverse},
+ {Py_tp_finalize, Xxo_finalize},
{Py_tp_getattro, Xxo_getattro},
{Py_tp_setattr, Xxo_setattr},
{Py_tp_methods, Xxo_methods},
@@ -113,7 +121,7 @@ static PyType_Spec Xxo_Type_spec = {
"xxlimited.Xxo",
sizeof(XxoObject),
0,
- Py_TPFLAGS_DEFAULT,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
Xxo_Type_slots
};
@@ -169,7 +177,7 @@ xx_roj(PyObject *self, PyObject *args)
/* ---------- */
-static PyType_Slot Str_Type_slots[] = {
+static PyType_Slot Str_Type_slots[] = {
{Py_tp_base, NULL}, /* filled out in module init function */
{0, 0},
};
@@ -222,25 +230,9 @@ static PyMethodDef xx_methods[] = {
PyDoc_STRVAR(module_doc,
"This is a template module just for instruction.");
-/* Initialization function for the module (*must* be called PyInit_xx) */
-
-
-static struct PyModuleDef xxmodule = {
- PyModuleDef_HEAD_INIT,
- "xxlimited",
- module_doc,
- -1,
- xx_methods,
- NULL,
- NULL,
- NULL,
- NULL
-};
-
-PyMODINIT_FUNC
-PyInit_xxlimited(void)
+static int
+xx_modexec(PyObject *m)
{
- PyObject *m = NULL;
PyObject *o;
/* Due to cross platform compiler issues the slots must be filled
@@ -254,11 +246,6 @@ PyInit_xxlimited(void)
if (Xxo_Type == NULL)
goto fail;
- /* Create the module and add the functions */
- m = PyModule_Create(&xxmodule);
- if (m == NULL)
- goto fail;
-
/* Add some symbolic constants to the module */
if (ErrorObject == NULL) {
ErrorObject = PyErr_NewException("xxlimited.error", NULL, NULL);
@@ -268,6 +255,12 @@ PyInit_xxlimited(void)
Py_INCREF(ErrorObject);
PyModule_AddObject(m, "error", ErrorObject);
+ /* Add Xxo */
+ o = PyType_FromSpec(&Xxo_Type_spec);
+ if (o == NULL)
+ goto fail;
+ PyModule_AddObject(m, "Xxo", o);
+
/* Add Str */
o = PyType_FromSpec(&Str_Type_spec);
if (o == NULL)
@@ -279,8 +272,34 @@ PyInit_xxlimited(void)
if (o == NULL)
goto fail;
PyModule_AddObject(m, "Null", o);
- return m;
+ return 0;
fail:
Py_XDECREF(m);
- return NULL;
+ return -1;
+}
+
+
+static PyModuleDef_Slot xx_slots[] = {
+ {Py_mod_exec, xx_modexec},
+ {0, NULL}
+};
+
+static struct PyModuleDef xxmodule = {
+ PyModuleDef_HEAD_INIT,
+ "xxlimited",
+ module_doc,
+ 0,
+ xx_methods,
+ xx_slots,
+ NULL,
+ NULL,
+ NULL
+};
+
+/* Export function for the module (*must* be called PyInit_xx) */
+
+PyMODINIT_FUNC
+PyInit_xxlimited(void)
+{
+ return PyModuleDef_Init(&xxmodule);
}
diff --git a/Modules/xxmodule.c b/Modules/xxmodule.c
index 0feff662d5..85230d9c97 100644
--- a/Modules/xxmodule.c
+++ b/Modules/xxmodule.c
@@ -334,26 +334,10 @@ static PyMethodDef xx_methods[] = {
PyDoc_STRVAR(module_doc,
"This is a template module just for instruction.");
-/* Initialization function for the module (*must* be called PyInit_xx) */
-
-static struct PyModuleDef xxmodule = {
- PyModuleDef_HEAD_INIT,
- "xx",
- module_doc,
- -1,
- xx_methods,
- NULL,
- NULL,
- NULL,
- NULL
-};
-
-PyMODINIT_FUNC
-PyInit_xx(void)
+static int
+xx_exec(PyObject *m)
{
- PyObject *m = NULL;
-
/* Due to cross platform compiler issues the slots must be filled
* here. It's required for portability to Windows without requiring
* C++. */
@@ -366,11 +350,6 @@ PyInit_xx(void)
if (PyType_Ready(&Xxo_Type) < 0)
goto fail;
- /* Create the module and add the functions */
- m = PyModule_Create(&xxmodule);
- if (m == NULL)
- goto fail;
-
/* Add some symbolic constants to the module */
if (ErrorObject == NULL) {
ErrorObject = PyErr_NewException("xx.error", NULL, NULL);
@@ -389,8 +368,33 @@ PyInit_xx(void)
if (PyType_Ready(&Null_Type) < 0)
goto fail;
PyModule_AddObject(m, "Null", (PyObject *)&Null_Type);
- return m;
+ return 0;
fail:
Py_XDECREF(m);
- return NULL;
+ return -1;
+}
+
+static struct PyModuleDef_Slot xx_slots[] = {
+ {Py_mod_exec, xx_exec},
+ {0, NULL},
+};
+
+static struct PyModuleDef xxmodule = {
+ PyModuleDef_HEAD_INIT,
+ "xx",
+ module_doc,
+ 0,
+ xx_methods,
+ xx_slots,
+ NULL,
+ NULL,
+ NULL
+};
+
+/* Export function for the module (*must* be called PyInit_xx) */
+
+PyMODINIT_FUNC
+PyInit_xx(void)
+{
+ return PyModuleDef_Init(&xxmodule);
}
diff --git a/Modules/xxsubtype.c b/Modules/xxsubtype.c
index 6944e37703..8d0d6ae814 100644
--- a/Modules/xxsubtype.c
+++ b/Modules/xxsubtype.c
@@ -257,53 +257,58 @@ static PyMethodDef xxsubtype_functions[] = {
{NULL, NULL} /* sentinel */
};
-static struct PyModuleDef xxsubtypemodule = {
- PyModuleDef_HEAD_INIT,
- "xxsubtype",
- xxsubtype__doc__,
- -1,
- xxsubtype_functions,
- NULL,
- NULL,
- NULL,
- NULL
-};
-
-
-PyMODINIT_FUNC
-PyInit_xxsubtype(void)
+static int
+xxsubtype_exec(PyObject* m)
{
- PyObject *m;
-
/* Fill in deferred data addresses. This must be done before
PyType_Ready() is called. Note that PyType_Ready() automatically
initializes the ob.ob_type field to &PyType_Type if it's NULL,
so it's not necessary to fill in ob_type first. */
spamdict_type.tp_base = &PyDict_Type;
if (PyType_Ready(&spamdict_type) < 0)
- return NULL;
+ return -1;
spamlist_type.tp_base = &PyList_Type;
if (PyType_Ready(&spamlist_type) < 0)
- return NULL;
-
- m = PyModule_Create(&xxsubtypemodule);
- if (m == NULL)
- return NULL;
+ return -1;
if (PyType_Ready(&spamlist_type) < 0)
- return NULL;
+ return -1;
if (PyType_Ready(&spamdict_type) < 0)
- return NULL;
+ return -1;
Py_INCREF(&spamlist_type);
if (PyModule_AddObject(m, "spamlist",
(PyObject *) &spamlist_type) < 0)
- return NULL;
+ return -1;
Py_INCREF(&spamdict_type);
if (PyModule_AddObject(m, "spamdict",
(PyObject *) &spamdict_type) < 0)
- return NULL;
- return m;
+ return -1;
+ return 0;
+}
+
+static struct PyModuleDef_Slot xxsubtype_slots[] = {
+ {Py_mod_exec, xxsubtype_exec},
+ {0, NULL},
+};
+
+static struct PyModuleDef xxsubtypemodule = {
+ PyModuleDef_HEAD_INIT,
+ "xxsubtype",
+ xxsubtype__doc__,
+ 0,
+ xxsubtype_functions,
+ xxsubtype_slots,
+ NULL,
+ NULL,
+ NULL
+};
+
+
+PyMODINIT_FUNC
+PyInit_xxsubtype(void)
+{
+ return PyModuleDef_Init(&xxsubtypemodule);
}
diff --git a/Modules/zipimport.c b/Modules/zipimport.c
index 4594dd4f2f..e840271bfd 100644
--- a/Modules/zipimport.c
+++ b/Modules/zipimport.c
@@ -20,15 +20,13 @@ _Py_IDENTIFIER(replace);
/* zip_searchorder defines how we search for a module in the Zip
archive: we first search for a package __init__, then for
- non-package .pyc, .pyo and .py entries. The .pyc and .pyo entries
+ non-package .pyc, and .py entries. The .pyc entries
are swapped by initzipimport() if we run in optimized mode. Also,
'/' is replaced by SEP there. */
static struct st_zip_searchorder zip_searchorder[] = {
{"/__init__.pyc", IS_PACKAGE | IS_BYTECODE},
- {"/__init__.pyo", IS_PACKAGE | IS_BYTECODE},
{"/__init__.py", IS_PACKAGE | IS_SOURCE},
{".pyc", IS_BYTECODE},
- {".pyo", IS_BYTECODE},
{".py", IS_SOURCE},
{"", 0}
};
@@ -157,8 +155,7 @@ zipimporter_init(ZipImporter *self, PyObject *args, PyObject *kwds)
tmp = PyUnicode_FromFormat("%U%c", self->prefix, SEP);
if (tmp == NULL)
goto error;
- Py_DECREF(self->prefix);
- self->prefix = tmp;
+ Py_SETREF(self->prefix, tmp);
}
}
else
@@ -327,17 +324,14 @@ get_module_info(ZipImporter *self, PyObject *fullname)
}
typedef enum {
- FL_ERROR,
- FL_NOT_FOUND,
- FL_MODULE_FOUND,
- FL_NS_FOUND
+ FL_ERROR = -1, /* error */
+ FL_NOT_FOUND, /* no loader or namespace portions found */
+ FL_MODULE_FOUND, /* module/package found */
+ FL_NS_FOUND /* namespace portion found: */
+ /* *namespace_portion will point to the name */
} find_loader_result;
-/* The guts of "find_loader" and "find_module". Return values:
- -1: error
- 0: no loader or namespace portions found
- 1: module/package found
- 2: namespace portion found: *namespace_portion will point to the name
+/* The guts of "find_loader" and "find_module".
*/
static find_loader_result
find_loader(ZipImporter *self, PyObject *fullname, PyObject **namespace_portion)
@@ -352,21 +346,34 @@ find_loader(ZipImporter *self, PyObject *fullname, PyObject **namespace_portion)
if (mi == MI_NOT_FOUND) {
/* Not a module or regular package. See if this is a directory, and
therefore possibly a portion of a namespace package. */
- int is_dir = check_is_directory(self, self->prefix, fullname);
+ find_loader_result result = FL_NOT_FOUND;
+ PyObject *subname;
+ int is_dir;
+
+ /* We're only interested in the last path component of fullname;
+ earlier components are recorded in self->prefix. */
+ subname = get_subname(fullname);
+ if (subname == NULL) {
+ return FL_ERROR;
+ }
+
+ is_dir = check_is_directory(self, self->prefix, subname);
if (is_dir < 0)
- return -1;
- if (is_dir) {
+ result = FL_ERROR;
+ else if (is_dir) {
/* This is possibly a portion of a namespace
package. Return the string representing its path,
without a trailing separator. */
*namespace_portion = PyUnicode_FromFormat("%U%c%U%U",
self->archive, SEP,
- self->prefix, fullname);
+ self->prefix, subname);
if (*namespace_portion == NULL)
- return FL_ERROR;
- return FL_NS_FOUND;
+ result = FL_ERROR;
+ else
+ result = FL_NS_FOUND;
}
- return FL_NOT_FOUND;
+ Py_DECREF(subname);
+ return result;
}
/* This is a module or package. */
return FL_MODULE_FOUND;
@@ -400,6 +407,9 @@ zipimporter_find_module(PyObject *obj, PyObject *args)
case FL_MODULE_FOUND:
result = (PyObject *)self;
break;
+ default:
+ PyErr_BadInternalCall();
+ return NULL;
}
Py_INCREF(result);
return result;
@@ -436,6 +446,9 @@ zipimporter_find_loader(PyObject *obj, PyObject *args)
result = Py_BuildValue("O[O]", Py_None, namespace_portion);
Py_DECREF(namespace_portion);
return result;
+ default:
+ PyErr_BadInternalCall();
+ return NULL;
}
return result;
}
@@ -814,23 +827,43 @@ static PyTypeObject ZipImporter_Type = {
/* implementation */
-/* Given a buffer, return the long that is represented by the first
+/* Given a buffer, return the unsigned int that is represented by the first
4 bytes, encoded as little endian. This partially reimplements
marshal.c:r_long() */
-static long
-get_long(unsigned char *buf) {
- long x;
+static unsigned int
+get_uint32(const unsigned char *buf)
+{
+ unsigned int x;
x = buf[0];
- x |= (long)buf[1] << 8;
- x |= (long)buf[2] << 16;
- x |= (long)buf[3] << 24;
-#if SIZEOF_LONG > 4
- /* Sign extension for 64-bit machines */
- x |= -(x & 0x80000000L);
-#endif
+ x |= (unsigned int)buf[1] << 8;
+ x |= (unsigned int)buf[2] << 16;
+ x |= (unsigned int)buf[3] << 24;
+ return x;
+}
+
+/* Given a buffer, return the unsigned int that is represented by the first
+ 2 bytes, encoded as little endian. This partially reimplements
+ marshal.c:r_short() */
+static unsigned short
+get_uint16(const unsigned char *buf)
+{
+ unsigned short x;
+ x = buf[0];
+ x |= (unsigned short)buf[1] << 8;
return x;
}
+static void
+set_file_error(PyObject *archive, int eof)
+{
+ if (eof) {
+ PyErr_SetString(PyExc_EOFError, "EOF read where not expected");
+ }
+ else {
+ PyErr_SetFromErrnoWithFilenameObject(PyExc_OSError, archive);
+ }
+}
+
/*
read_directory(archive) -> files dict (new reference)
@@ -858,111 +891,137 @@ read_directory(PyObject *archive)
{
PyObject *files = NULL;
FILE *fp;
- unsigned short flags;
- short compress, time, date, name_size;
- long crc, data_size, file_size, header_size;
- Py_ssize_t file_offset, header_position, header_offset;
- long l, count;
- Py_ssize_t i;
+ unsigned short flags, compress, time, date, name_size;
+ unsigned int crc, data_size, file_size, header_size, header_offset;
+ unsigned long file_offset, header_position;
+ unsigned long arc_offset; /* Absolute offset to start of the zip-archive. */
+ unsigned int count, i;
+ unsigned char buffer[46];
char name[MAXPATHLEN + 5];
- char dummy[8]; /* Buffer to read unused header values into */
PyObject *nameobj = NULL;
- char *p, endof_central_dir[22];
- Py_ssize_t arc_offset; /* Absolute offset to start of the zip-archive. */
PyObject *path;
const char *charset;
int bootstrap;
+ const char *errmsg = NULL;
fp = _Py_fopen_obj(archive, "rb");
if (fp == NULL) {
- if (!PyErr_Occurred())
+ if (PyErr_ExceptionMatches(PyExc_OSError)) {
+ PyObject *exc, *val, *tb;
+ PyErr_Fetch(&exc, &val, &tb);
PyErr_Format(ZipImportError, "can't open Zip file: %R", archive);
+ _PyErr_ChainExceptions(exc, val, tb);
+ }
return NULL;
}
if (fseek(fp, -22, SEEK_END) == -1) {
- fclose(fp);
- PyErr_Format(ZipImportError, "can't read Zip file: %R", archive);
- return NULL;
+ goto file_error;
}
- header_position = ftell(fp);
- if (fread(endof_central_dir, 1, 22, fp) != 22) {
- fclose(fp);
- PyErr_Format(ZipImportError, "can't read Zip file: %R", archive);
- return NULL;
+ header_position = (unsigned long)ftell(fp);
+ if (header_position == (unsigned long)-1) {
+ goto file_error;
+ }
+ assert(header_position <= (unsigned long)LONG_MAX);
+ if (fread(buffer, 1, 22, fp) != 22) {
+ goto file_error;
}
- if (get_long((unsigned char *)endof_central_dir) != 0x06054B50) {
+ if (get_uint32(buffer) != 0x06054B50u) {
/* Bad: End of Central Dir signature */
- fclose(fp);
- PyErr_Format(ZipImportError, "not a Zip file: %R", archive);
- return NULL;
+ errmsg = "not a Zip file";
+ goto invalid_header;
}
- header_size = get_long((unsigned char *)endof_central_dir + 12);
- header_offset = get_long((unsigned char *)endof_central_dir + 16);
- arc_offset = header_position - header_offset - header_size;
- header_offset += arc_offset;
+ header_size = get_uint32(buffer + 12);
+ header_offset = get_uint32(buffer + 16);
+ if (header_position < header_size) {
+ errmsg = "bad central directory size";
+ goto invalid_header;
+ }
+ if (header_position < header_offset) {
+ errmsg = "bad central directory offset";
+ goto invalid_header;
+ }
+ if (header_position - header_size < header_offset) {
+ errmsg = "bad central directory size or offset";
+ goto invalid_header;
+ }
+ header_position -= header_size;
+ arc_offset = header_position - header_offset;
files = PyDict_New();
- if (files == NULL)
+ if (files == NULL) {
goto error;
-
+ }
/* Start of Central Directory */
count = 0;
- if (fseek(fp, header_offset, 0) == -1)
+ if (fseek(fp, (long)header_position, 0) == -1) {
goto file_error;
+ }
for (;;) {
PyObject *t;
+ size_t n;
int err;
+ n = fread(buffer, 1, 46, fp);
+ if (n < 4) {
+ goto eof_error;
+ }
/* Start of file header */
- l = PyMarshal_ReadLongFromFile(fp);
- if (l == -1 && PyErr_Occurred())
- goto error;
- if (l != 0x02014B50)
+ if (get_uint32(buffer) != 0x02014B50u) {
break; /* Bad: Central Dir File Header */
+ }
+ if (n != 46) {
+ goto eof_error;
+ }
+ flags = get_uint16(buffer + 8);
+ compress = get_uint16(buffer + 10);
+ time = get_uint16(buffer + 12);
+ date = get_uint16(buffer + 14);
+ crc = get_uint32(buffer + 16);
+ data_size = get_uint32(buffer + 20);
+ file_size = get_uint32(buffer + 24);
+ name_size = get_uint16(buffer + 28);
+ header_size = (unsigned int)name_size +
+ get_uint16(buffer + 30) /* extra field */ +
+ get_uint16(buffer + 32) /* comment */;
+
+ file_offset = get_uint32(buffer + 42);
+ if (file_offset > header_offset) {
+ errmsg = "bad local header offset";
+ goto invalid_header;
+ }
+ file_offset += arc_offset;
- /* On Windows, calling fseek to skip over the fields we don't use is
- slower than reading the data into a dummy buffer because fseek flushes
- stdio's internal buffers. See issue #8745. */
- if (fread(dummy, 1, 4, fp) != 4) /* Skip unused fields, avoid fseek */
- goto file_error;
-
- flags = (unsigned short)PyMarshal_ReadShortFromFile(fp);
- compress = PyMarshal_ReadShortFromFile(fp);
- time = PyMarshal_ReadShortFromFile(fp);
- date = PyMarshal_ReadShortFromFile(fp);
- crc = PyMarshal_ReadLongFromFile(fp);
- data_size = PyMarshal_ReadLongFromFile(fp);
- file_size = PyMarshal_ReadLongFromFile(fp);
- name_size = PyMarshal_ReadShortFromFile(fp);
- header_size = name_size +
- PyMarshal_ReadShortFromFile(fp) +
- PyMarshal_ReadShortFromFile(fp);
- if (fread(dummy, 1, 8, fp) != 8) /* Skip unused fields, avoid fseek */
- goto file_error;
- file_offset = PyMarshal_ReadLongFromFile(fp) + arc_offset;
- if (PyErr_Occurred())
- goto error;
-
- if (name_size > MAXPATHLEN)
+ if (name_size > MAXPATHLEN) {
name_size = MAXPATHLEN;
-
- p = name;
- for (i = 0; i < (Py_ssize_t)name_size; i++) {
- *p = (char)getc(fp);
- if (*p == '/')
- *p = SEP;
- p++;
}
- *p = 0; /* Add terminating null byte */
- for (; i < header_size; i++) /* Skip the rest of the header */
- if(getc(fp) == EOF) /* Avoid fseek */
+ if (fread(name, 1, name_size, fp) != name_size) {
+ goto file_error;
+ }
+ name[name_size] = '\0'; /* Add terminating null byte */
+ if (SEP != '/') {
+ for (i = 0; i < name_size; i++) {
+ if (name[i] == '/') {
+ name[i] = SEP;
+ }
+ }
+ }
+ /* Skip the rest of the header.
+ * On Windows, calling fseek to skip over the fields we don't use is
+ * slower than reading the data because fseek flushes stdio's
+ * internal buffers. See issue #8745. */
+ assert(header_size <= 3*0xFFFFu);
+ for (i = name_size; i < header_size; i++) {
+ if (getc(fp) == EOF) {
goto file_error;
+ }
+ }
bootstrap = 0;
- if (flags & 0x0800)
+ if (flags & 0x0800) {
charset = "utf-8";
+ }
else if (!PyThreadState_GET()->interp->codecs_initialized) {
/* During bootstrap, we may need to load the encodings
package from a ZIP file. But the cp437 encoding is implemented
@@ -973,44 +1032,59 @@ read_directory(PyObject *archive)
charset = "ascii";
bootstrap = 1;
}
- else
+ else {
charset = "cp437";
+ }
nameobj = PyUnicode_Decode(name, name_size, charset, NULL);
if (nameobj == NULL) {
- if (bootstrap)
+ if (bootstrap) {
PyErr_Format(PyExc_NotImplementedError,
"bootstrap issue: python%i%i.zip contains non-ASCII "
"filenames without the unicode flag",
PY_MAJOR_VERSION, PY_MINOR_VERSION);
+ }
goto error;
}
- if (PyUnicode_READY(nameobj) == -1)
+ if (PyUnicode_READY(nameobj) == -1) {
goto error;
+ }
path = PyUnicode_FromFormat("%U%c%U", archive, SEP, nameobj);
- if (path == NULL)
+ if (path == NULL) {
goto error;
- t = Py_BuildValue("Nhllnhhl", path, compress, data_size,
+ }
+ t = Py_BuildValue("NHIIkHHI", path, compress, data_size,
file_size, file_offset, time, date, crc);
- if (t == NULL)
+ if (t == NULL) {
goto error;
+ }
err = PyDict_SetItem(files, nameobj, t);
Py_CLEAR(nameobj);
Py_DECREF(t);
- if (err != 0)
+ if (err != 0) {
goto error;
+ }
count++;
}
fclose(fp);
- if (Py_VerboseFlag)
- PySys_FormatStderr("# zipimport: found %ld names in %R\n",
+ if (Py_VerboseFlag) {
+ PySys_FormatStderr("# zipimport: found %u names in %R\n",
count, archive);
+ }
return files;
+
+eof_error:
+ set_file_error(archive, !ferror(fp));
+ goto error;
+
file_error:
- fclose(fp);
- Py_XDECREF(files);
- Py_XDECREF(nameobj);
PyErr_Format(ZipImportError, "can't read Zip file: %R", archive);
- return NULL;
+ goto error;
+
+invalid_header:
+ assert(errmsg != NULL);
+ PyErr_Format(ZipImportError, "%s: %R", errmsg, archive);
+ goto error;
+
error:
fclose(fp);
Py_XDECREF(files);
@@ -1056,17 +1130,18 @@ get_decompress_func(void)
static PyObject *
get_data(PyObject *archive, PyObject *toc_entry)
{
- PyObject *raw_data, *data = NULL, *decompress;
+ PyObject *raw_data = NULL, *data, *decompress;
char *buf;
FILE *fp;
- int err;
- Py_ssize_t bytes_read = 0;
- long l;
PyObject *datapath;
- long compress, data_size, file_size, file_offset, bytes_size;
- long time, date, crc;
-
- if (!PyArg_ParseTuple(toc_entry, "Olllllll", &datapath, &compress,
+ unsigned short compress, time, date;
+ unsigned int crc;
+ Py_ssize_t data_size, file_size, bytes_size;
+ long file_offset, header_size;
+ unsigned char buffer[30];
+ const char *errmsg = NULL;
+
+ if (!PyArg_ParseTuple(toc_entry, "OHnnlHHI", &datapath, &compress,
&data_size, &file_size, &file_offset, &time,
&date, &crc)) {
return NULL;
@@ -1078,42 +1153,29 @@ get_data(PyObject *archive, PyObject *toc_entry)
fp = _Py_fopen_obj(archive, "rb");
if (!fp) {
- if (!PyErr_Occurred())
- PyErr_Format(PyExc_IOError,
- "zipimport: can not open file %U", archive);
return NULL;
}
-
/* Check to make sure the local file header is correct */
if (fseek(fp, file_offset, 0) == -1) {
- fclose(fp);
- PyErr_Format(ZipImportError, "can't read Zip file: %R", archive);
- return NULL;
+ goto file_error;
}
-
- l = PyMarshal_ReadLongFromFile(fp);
- if (l != 0x04034B50) {
- /* Bad: Local File Header */
- if (!PyErr_Occurred())
- PyErr_Format(ZipImportError,
- "bad local file header in %U",
- archive);
- fclose(fp);
- return NULL;
+ if (fread(buffer, 1, 30, fp) != 30) {
+ goto eof_error;
}
- if (fseek(fp, file_offset + 26, 0) == -1) {
- fclose(fp);
- PyErr_Format(ZipImportError, "can't read Zip file: %R", archive);
- return NULL;
+ if (get_uint32(buffer) != 0x04034B50u) {
+ /* Bad: Local File Header */
+ errmsg = "bad local file header";
+ goto invalid_header;
}
- l = 30 + PyMarshal_ReadShortFromFile(fp) +
- PyMarshal_ReadShortFromFile(fp); /* local header size */
- if (PyErr_Occurred()) {
- fclose(fp);
- return NULL;
+ header_size = (unsigned int)30 +
+ get_uint16(buffer + 26) /* file name */ +
+ get_uint16(buffer + 28) /* extra field */;
+ if (file_offset > LONG_MAX - header_size) {
+ errmsg = "bad local file header size";
+ goto invalid_header;
}
- file_offset += l; /* Start of file data */
+ file_offset += header_size; /* Start of file data */
if (data_size > LONG_MAX - 1) {
fclose(fp);
@@ -1121,33 +1183,27 @@ get_data(PyObject *archive, PyObject *toc_entry)
return NULL;
}
bytes_size = compress == 0 ? data_size : data_size + 1;
- if (bytes_size == 0)
+ if (bytes_size == 0) {
bytes_size++;
+ }
raw_data = PyBytes_FromStringAndSize((char *)NULL, bytes_size);
-
if (raw_data == NULL) {
- fclose(fp);
- return NULL;
+ goto error;
}
buf = PyBytes_AsString(raw_data);
- err = fseek(fp, file_offset, 0);
- if (err == 0) {
- bytes_read = fread(buf, 1, data_size, fp);
- } else {
- fclose(fp);
- Py_DECREF(raw_data);
- PyErr_Format(ZipImportError, "can't read Zip file: %R", archive);
- return NULL;
+ if (fseek(fp, file_offset, 0) == -1) {
+ goto file_error;
}
- fclose(fp);
- if (err || bytes_read != data_size) {
+ if (fread(buf, 1, data_size, fp) != (size_t)data_size) {
PyErr_SetString(PyExc_IOError,
"zipimport: can't read data");
- Py_DECREF(raw_data);
- return NULL;
+ goto error;
}
+ fclose(fp);
+ fp = NULL;
+
if (compress != 0) {
buf[data_size] = 'Z'; /* saw this in zipfile.py */
data_size++;
@@ -1170,9 +1226,28 @@ get_data(PyObject *archive, PyObject *toc_entry)
}
data = PyObject_CallFunction(decompress, "Oi", raw_data, -15);
Py_DECREF(decompress);
-error:
Py_DECREF(raw_data);
return data;
+
+eof_error:
+ set_file_error(archive, !ferror(fp));
+ goto error;
+
+file_error:
+ PyErr_Format(ZipImportError, "can't read Zip file: %R", archive);
+ goto error;
+
+invalid_header:
+ assert(errmsg != NULL);
+ PyErr_Format(ZipImportError, "%s: %R", errmsg, archive);
+ goto error;
+
+error:
+ if (fp != NULL) {
+ fclose(fp);
+ }
+ Py_XDECREF(raw_data);
+ return NULL;
}
/* Lenient date/time comparison function. The precision of the mtime
@@ -1197,37 +1272,39 @@ static PyObject *
unmarshal_code(PyObject *pathname, PyObject *data, time_t mtime)
{
PyObject *code;
- char *buf = PyBytes_AsString(data);
+ unsigned char *buf = (unsigned char *)PyBytes_AsString(data);
Py_ssize_t size = PyBytes_Size(data);
- if (size <= 9) {
+ if (size < 12) {
PyErr_SetString(ZipImportError,
"bad pyc data");
return NULL;
}
- if (get_long((unsigned char *)buf) != PyImport_GetMagicNumber()) {
- if (Py_VerboseFlag)
+ if (get_uint32(buf) != (unsigned int)PyImport_GetMagicNumber()) {
+ if (Py_VerboseFlag) {
PySys_FormatStderr("# %R has bad magic\n",
pathname);
+ }
Py_INCREF(Py_None);
return Py_None; /* signal caller to try alternative */
}
- if (mtime != 0 && !eq_mtime(get_long((unsigned char *)buf + 4),
- mtime)) {
- if (Py_VerboseFlag)
+ if (mtime != 0 && !eq_mtime(get_uint32(buf + 4), mtime)) {
+ if (Py_VerboseFlag) {
PySys_FormatStderr("# %R has bad mtime\n",
pathname);
+ }
Py_INCREF(Py_None);
return Py_None; /* signal caller to try alternative */
}
/* XXX the pyc's size field is ignored; timestamp collisions are probably
unimportant with zip files. */
- code = PyMarshal_ReadObjectFromString(buf + 12, size - 12);
- if (code == NULL)
+ code = PyMarshal_ReadObjectFromString((char *)buf + 12, size - 12);
+ if (code == NULL) {
return NULL;
+ }
if (!PyCode_Check(code)) {
Py_DECREF(code);
PyErr_Format(PyExc_TypeError,
@@ -1325,7 +1402,7 @@ parse_dostime(int dostime, int dosdate)
return mktime(&stm);
}
-/* Given a path to a .pyc or .pyo file in the archive, return the
+/* Given a path to a .pyc file in the archive, return the
modification time of the matching .py file, or 0 if no source
is available. */
static time_t
@@ -1488,17 +1565,6 @@ PyInit_zipimport(void)
/* Correct directory separator */
zip_searchorder[0].suffix[0] = SEP;
zip_searchorder[1].suffix[0] = SEP;
- zip_searchorder[2].suffix[0] = SEP;
- if (Py_OptimizeFlag) {
- /* Reverse *.pyc and *.pyo */
- struct st_zip_searchorder tmp;
- tmp = zip_searchorder[0];
- zip_searchorder[0] = zip_searchorder[1];
- zip_searchorder[1] = tmp;
- tmp = zip_searchorder[3];
- zip_searchorder[3] = zip_searchorder[4];
- zip_searchorder[4] = tmp;
- }
mod = PyModule_Create(&zipimportmodule);
if (mod == NULL)
diff --git a/Modules/zlibmodule.c b/Modules/zlibmodule.c
index 0d2e188b43..16cc17886b 100644
--- a/Modules/zlibmodule.c
+++ b/Modules/zlibmodule.c
@@ -22,6 +22,10 @@
#define LEAVE_ZLIB(obj)
#endif
+#if defined(ZLIB_VERNUM) && ZLIB_VERNUM >= 0x1221
+#define AT_LEAST_ZLIB_1_2_2_1
+#endif
+
/* The following parameters are copied from zutil.h, version 0.95 */
#define DEFLATED 8
#if MAX_MEM_LEVEL >= 8
@@ -82,12 +86,11 @@ zlib_error(z_stream zst, int err, char *msg)
}
/*[clinic input]
-output preset file
module zlib
class zlib.Compress "compobject *" "&Comptype"
class zlib.Decompress "compobject *" "&Decomptype"
[clinic start generated code]*/
-/*[clinic end generated code: output=da39a3ee5e6b4b0d input=bfd4c340573ba91d]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=093935115c3e3158]*/
static compobject *
newcompobject(PyTypeObject *type)
@@ -227,42 +230,42 @@ zlib_compress_impl(PyModuleDef *module, Py_buffer *bytes, int level)
/*[python input]
-class uint_converter(CConverter):
+class capped_uint_converter(CConverter):
type = 'unsigned int'
- converter = 'uint_converter'
+ converter = 'capped_uint_converter'
c_ignored_default = "0"
[python start generated code]*/
-/*[python end generated code: output=da39a3ee5e6b4b0d input=22263855f7a3ebfd]*/
+/*[python end generated code: output=da39a3ee5e6b4b0d input=35521e4e733823c7]*/
static int
-uint_converter(PyObject *obj, void *ptr)
+capped_uint_converter(PyObject *obj, void *ptr)
{
- long val;
- unsigned long uval;
+ PyObject *long_obj;
+ Py_ssize_t val;
- val = PyLong_AsLong(obj);
- if (val == -1 && PyErr_Occurred()) {
- uval = PyLong_AsUnsignedLong(obj);
- if (uval == (unsigned long)-1 && PyErr_Occurred())
- return 0;
+ long_obj = (PyObject *)_PyLong_FromNbInt(obj);
+ if (long_obj == NULL) {
+ return 0;
}
- else {
- if (val < 0) {
- PyErr_SetString(PyExc_ValueError,
- "value must be positive");
- return 0;
- }
- uval = (unsigned long)val;
+ val = PyLong_AsSsize_t(long_obj);
+ Py_DECREF(long_obj);
+ if (val == -1 && PyErr_Occurred()) {
+ return 0;
}
-
- if (uval > UINT_MAX) {
- PyErr_SetString(PyExc_OverflowError,
- "Python int too large for C unsigned int");
+ if (val < 0) {
+ PyErr_SetString(PyExc_ValueError,
+ "value must be positive");
return 0;
}
- *(unsigned int *)ptr = Py_SAFE_DOWNCAST(uval, unsigned long, unsigned int);
+ if ((size_t)val > UINT_MAX) {
+ *(unsigned int *)ptr = UINT_MAX;
+ }
+ else {
+ *(unsigned int *)ptr = Py_SAFE_DOWNCAST(val, Py_ssize_t,
+ unsigned int);
+ }
return 1;
}
@@ -272,8 +275,8 @@ zlib.decompress
data: Py_buffer
Compressed data.
wbits: int(c_default="MAX_WBITS") = MAX_WBITS
- The window buffer size.
- bufsize: uint(c_default="DEF_BUF_SIZE") = DEF_BUF_SIZE
+ The window buffer size and container format.
+ bufsize: capped_uint(c_default="DEF_BUF_SIZE") = DEF_BUF_SIZE
The initial output buffer size.
/
@@ -281,8 +284,9 @@ Returns a bytes object containing the uncompressed data.
[clinic start generated code]*/
static PyObject *
-zlib_decompress_impl(PyModuleDef *module, Py_buffer *data, int wbits, unsigned int bufsize)
-/*[clinic end generated code: output=9e5464e72df9cb5f input=0f4b9abb7103f50e]*/
+zlib_decompress_impl(PyModuleDef *module, Py_buffer *data, int wbits,
+ unsigned int bufsize)
+/*[clinic end generated code: output=444d0987f3429574 input=75123b0d4ff0541d]*/
{
PyObject *result_str = NULL;
Byte *input;
@@ -390,12 +394,16 @@ zlib_decompress_impl(PyModuleDef *module, Py_buffer *data, int wbits, unsigned i
zlib.compressobj
level: int(c_default="Z_DEFAULT_COMPRESSION") = Z_DEFAULT_COMPRESSION
- The compression level (an integer in the range 0-9; default is 6).
- Higher compression levels are slower, but produce smaller results.
+ The compression level (an integer in the range 0-9 or -1; default is
+ currently equivalent to 6). Higher compression levels are slower,
+ but produce smaller results.
method: int(c_default="DEFLATED") = DEFLATED
The compression algorithm. If given, this must be DEFLATED.
wbits: int(c_default="MAX_WBITS") = MAX_WBITS
- The base two logarithm of the window size (range: 8..15).
+ +9 to +15: The base-two logarithm of the window size. Include a zlib
+ container.
+ -9 to -15: Generate a raw stream.
+ +25 to +31: Include a gzip container.
memLevel: int(c_default="DEF_MEM_LEVEL") = DEF_MEM_LEVEL
Controls the amount of memory used for internal compression state.
Valid values range from 1 to 9. Higher values result in higher memory
@@ -411,8 +419,9 @@ Return a compressor object.
[clinic start generated code]*/
static PyObject *
-zlib_compressobj_impl(PyModuleDef *module, int level, int method, int wbits, int memLevel, int strategy, Py_buffer *zdict)
-/*[clinic end generated code: output=89e5a6c1449caa9e input=b034847f8821f6af]*/
+zlib_compressobj_impl(PyModuleDef *module, int level, int method, int wbits,
+ int memLevel, int strategy, Py_buffer *zdict)
+/*[clinic end generated code: output=2949bbb9a5723ccd input=2fa3d026f90ab8d5]*/
{
compobject *self = NULL;
int err;
@@ -469,11 +478,36 @@ zlib_compressobj_impl(PyModuleDef *module, int level, int method, int wbits, int
return (PyObject*)self;
}
+static int
+set_inflate_zdict(compobject *self)
+{
+ Py_buffer zdict_buf;
+ int err;
+
+ if (PyObject_GetBuffer(self->zdict, &zdict_buf, PyBUF_SIMPLE) == -1) {
+ return -1;
+ }
+ if ((size_t)zdict_buf.len > UINT_MAX) {
+ PyErr_SetString(PyExc_OverflowError,
+ "zdict length does not fit in an unsigned int");
+ PyBuffer_Release(&zdict_buf);
+ return -1;
+ }
+ err = inflateSetDictionary(&(self->zst),
+ zdict_buf.buf, (unsigned int)zdict_buf.len);
+ PyBuffer_Release(&zdict_buf);
+ if (err != Z_OK) {
+ zlib_error(self->zst, err, "while setting zdict");
+ return -1;
+ }
+ return 0;
+}
+
/*[clinic input]
zlib.decompressobj
wbits: int(c_default="MAX_WBITS") = MAX_WBITS
- The window buffer size.
+ The window buffer size and container format.
zdict: object(c_default="NULL") = b''
The predefined compression dictionary. This must be the same
dictionary as used by the compressor that produced the input data.
@@ -483,7 +517,7 @@ Return a decompressor object.
static PyObject *
zlib_decompressobj_impl(PyModuleDef *module, int wbits, PyObject *zdict)
-/*[clinic end generated code: output=8ccd583fbd631798 input=67f05145a6920127]*/
+/*[clinic end generated code: output=8ccd583fbd631798 input=d3832b8511fc977b]*/
{
int err;
compobject *self;
@@ -510,6 +544,20 @@ zlib_decompressobj_impl(PyModuleDef *module, int wbits, PyObject *zdict)
switch(err) {
case (Z_OK):
self->is_initialised = 1;
+ if (self->zdict != NULL && wbits < 0) {
+#ifdef AT_LEAST_ZLIB_1_2_2_1
+ if (set_inflate_zdict(self) < 0) {
+ Py_DECREF(self);
+ return NULL;
+ }
+#else
+ PyErr_Format(ZlibError,
+ "zlib version %s does not allow raw inflate with dictionary",
+ ZLIB_VERSION);
+ Py_DECREF(self);
+ return NULL;
+#endif
+ }
return (PyObject*)self;
case(Z_STREAM_ERROR):
Py_DECREF(self);
@@ -666,8 +714,7 @@ save_unconsumed_input(compobject *self, int err)
PyBytes_AS_STRING(self->unused_data), old_size);
Py_MEMCPY(PyBytes_AS_STRING(new_data) + old_size,
self->zst.next_in, self->zst.avail_in);
- Py_DECREF(self->unused_data);
- self->unused_data = new_data;
+ Py_SETREF(self->unused_data, new_data);
self->zst.avail_in = 0;
}
}
@@ -679,8 +726,7 @@ save_unconsumed_input(compobject *self, int err)
(char *)self->zst.next_in, self->zst.avail_in);
if (new_data == NULL)
return -1;
- Py_DECREF(self->unconsumed_tail);
- self->unconsumed_tail = new_data;
+ Py_SETREF(self->unconsumed_tail, new_data);
}
return 0;
}
@@ -690,7 +736,7 @@ zlib.Decompress.decompress
data: Py_buffer
The binary data to decompress.
- max_length: uint = 0
+ max_length: capped_uint = 0
The maximum allowable length of the decompressed data.
Unconsumed input data will be stored in
the unconsumed_tail attribute.
@@ -704,8 +750,9 @@ Call the flush() method to clear these buffers.
[clinic start generated code]*/
static PyObject *
-zlib_Decompress_decompress_impl(compobject *self, Py_buffer *data, unsigned int max_length)
-/*[clinic end generated code: output=755cccc9087bfe55 input=02cfc047377cec86]*/
+zlib_Decompress_decompress_impl(compobject *self, Py_buffer *data,
+ unsigned int max_length)
+/*[clinic end generated code: output=b82e2a2c19f5fe7b input=68b6508ab07c2cf0]*/
{
int err;
unsigned int old_length, length = DEF_BUF_SIZE;
@@ -737,29 +784,12 @@ zlib_Decompress_decompress_impl(compobject *self, Py_buffer *data, unsigned int
Py_END_ALLOW_THREADS
if (err == Z_NEED_DICT && self->zdict != NULL) {
- Py_buffer zdict_buf;
- if (PyObject_GetBuffer(self->zdict, &zdict_buf, PyBUF_SIMPLE) == -1) {
+ if (set_inflate_zdict(self) < 0) {
Py_DECREF(RetVal);
RetVal = NULL;
goto error;
}
- if ((size_t)zdict_buf.len > UINT_MAX) {
- PyErr_SetString(PyExc_OverflowError,
- "zdict length does not fit in an unsigned int");
- PyBuffer_Release(&zdict_buf);
- Py_CLEAR(RetVal);
- goto error;
- }
-
- err = inflateSetDictionary(&(self->zst),
- zdict_buf.buf, (unsigned int)zdict_buf.len);
- PyBuffer_Release(&zdict_buf);
- if (err != Z_OK) {
- zlib_error(self->zst, err, "while decompressing data");
- Py_CLEAR(RetVal);
- goto error;
- }
/* Repeat the call to inflate. */
Py_BEGIN_ALLOW_THREADS
err = inflate(&(self->zst), Z_SYNC_FLUSH);
@@ -961,14 +991,11 @@ zlib_Compress_copy_impl(compobject *self)
goto error;
}
Py_INCREF(self->unused_data);
+ Py_XSETREF(retval->unused_data, self->unused_data);
Py_INCREF(self->unconsumed_tail);
+ Py_XSETREF(retval->unconsumed_tail, self->unconsumed_tail);
Py_XINCREF(self->zdict);
- Py_XDECREF(retval->unused_data);
- Py_XDECREF(retval->unconsumed_tail);
- Py_XDECREF(retval->zdict);
- retval->unused_data = self->unused_data;
- retval->unconsumed_tail = self->unconsumed_tail;
- retval->zdict = self->zdict;
+ Py_XSETREF(retval->zdict, self->zdict);
retval->eof = self->eof;
/* Mark it as being initialized */
@@ -1020,14 +1047,11 @@ zlib_Decompress_copy_impl(compobject *self)
}
Py_INCREF(self->unused_data);
+ Py_XSETREF(retval->unused_data, self->unused_data);
Py_INCREF(self->unconsumed_tail);
+ Py_XSETREF(retval->unconsumed_tail, self->unconsumed_tail);
Py_XINCREF(self->zdict);
- Py_XDECREF(retval->unused_data);
- Py_XDECREF(retval->unconsumed_tail);
- Py_XDECREF(retval->zdict);
- retval->unused_data = self->unused_data;
- retval->unconsumed_tail = self->unconsumed_tail;
- retval->zdict = self->zdict;
+ Py_XSETREF(retval->zdict, self->zdict);
retval->eof = self->eof;
/* Mark it as being initialized */
@@ -1046,7 +1070,7 @@ error:
/*[clinic input]
zlib.Decompress.flush
- length: uint(c_default="DEF_BUF_SIZE") = zlib.DEF_BUF_SIZE
+ length: capped_uint(c_default="DEF_BUF_SIZE") = zlib.DEF_BUF_SIZE
the initial size of the output buffer.
/
@@ -1055,7 +1079,7 @@ Return a bytes object containing any remaining decompressed data.
static PyObject *
zlib_Decompress_flush_impl(compobject *self, unsigned int length)
-/*[clinic end generated code: output=db6fb753ab698e22 input=1580956505978993]*/
+/*[clinic end generated code: output=db6fb753ab698e22 input=1bb961eb21b62aa0]*/
{
int err;
unsigned int new_length;
@@ -1334,7 +1358,7 @@ PyDoc_STRVAR(zlib_module_documentation,
"decompress(string,[wbits],[bufsize]) -- Decompresses a compressed string.\n"
"decompressobj([wbits[, zdict]]]) -- Return a decompressor object.\n"
"\n"
-"'wbits' is window buffer size.\n"
+"'wbits' is window buffer size and container format.\n"
"Compressor objects support compress() and flush() methods; decompressor\n"
"objects support decompress() and flush().");
diff --git a/Objects/README b/Objects/README
new file mode 100644
index 0000000000..854b103f7b
--- /dev/null
+++ b/Objects/README
@@ -0,0 +1 @@
+Source files for various builtin objects
diff --git a/Objects/abstract.c b/Objects/abstract.c
index 5e9613816a..a0362e74e4 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -305,7 +305,7 @@ int PyObject_AsWriteBuffer(PyObject *obj,
pb->bf_getbuffer == NULL ||
((*pb->bf_getbuffer)(obj, &view, PyBUF_WRITABLE) != 0)) {
PyErr_SetString(PyExc_TypeError,
- "expected an object with a writable buffer interface");
+ "expected a writable bytes-like object");
return -1;
}
@@ -324,7 +324,7 @@ PyObject_GetBuffer(PyObject *obj, Py_buffer *view, int flags)
if (pb == NULL || pb->bf_getbuffer == NULL) {
PyErr_Format(PyExc_TypeError,
- "'%.100s' does not support the buffer interface",
+ "a bytes-like object is required, not '%.100s'",
Py_TYPE(obj)->tp_name);
return -1;
}
@@ -337,16 +337,35 @@ _IsFortranContiguous(const Py_buffer *view)
Py_ssize_t sd, dim;
int i;
- if (view->ndim == 0) return 1;
- if (view->strides == NULL) return (view->ndim == 1);
+ /* 1) len = product(shape) * itemsize
+ 2) itemsize > 0
+ 3) len = 0 <==> exists i: shape[i] = 0 */
+ if (view->len == 0) return 1;
+ if (view->strides == NULL) { /* C-contiguous by definition */
+ /* Trivially F-contiguous */
+ if (view->ndim <= 1) return 1;
+
+ /* ndim > 1 implies shape != NULL */
+ assert(view->shape != NULL);
+
+ /* Effectively 1-d */
+ sd = 0;
+ for (i=0; i<view->ndim; i++) {
+ if (view->shape[i] > 1) sd += 1;
+ }
+ return sd <= 1;
+ }
+
+ /* strides != NULL implies both of these */
+ assert(view->ndim > 0);
+ assert(view->shape != NULL);
sd = view->itemsize;
- if (view->ndim == 1) return (view->shape[0] == 1 ||
- sd == view->strides[0]);
for (i=0; i<view->ndim; i++) {
dim = view->shape[i];
- if (dim == 0) return 1;
- if (view->strides[i] != sd) return 0;
+ if (dim > 1 && view->strides[i] != sd) {
+ return 0;
+ }
sd *= dim;
}
return 1;
@@ -358,16 +377,22 @@ _IsCContiguous(const Py_buffer *view)
Py_ssize_t sd, dim;
int i;
- if (view->ndim == 0) return 1;
- if (view->strides == NULL) return 1;
+ /* 1) len = product(shape) * itemsize
+ 2) itemsize > 0
+ 3) len = 0 <==> exists i: shape[i] = 0 */
+ if (view->len == 0) return 1;
+ if (view->strides == NULL) return 1; /* C-contiguous by definition */
+
+ /* strides != NULL implies both of these */
+ assert(view->ndim > 0);
+ assert(view->shape != NULL);
sd = view->itemsize;
- if (view->ndim == 1) return (view->shape[0] == 1 ||
- sd == view->strides[0]);
for (i=view->ndim-1; i>=0; i--) {
dim = view->shape[i];
- if (dim == 0) return 1;
- if (view->strides[i] != sd) return 0;
+ if (dim > 1 && view->strides[i] != sd) {
+ return 0;
+ }
sd *= dim;
}
return 1;
@@ -499,8 +524,8 @@ int PyObject_CopyData(PyObject *dest, PyObject *src)
if (!PyObject_CheckBuffer(dest) ||
!PyObject_CheckBuffer(src)) {
PyErr_SetString(PyExc_TypeError,
- "both destination and source must have the "\
- "buffer interface");
+ "both destination and source must be "\
+ "bytes-like objects");
return -1;
}
@@ -587,7 +612,12 @@ int
PyBuffer_FillInfo(Py_buffer *view, PyObject *obj, void *buf, Py_ssize_t len,
int readonly, int flags)
{
- if (view == NULL) return 0; /* XXX why not -1? */
+ if (view == NULL) {
+ PyErr_SetString(PyExc_BufferError,
+ "PyBuffer_FillInfo: view==NULL argument is obsolete");
+ return -1;
+ }
+
if (((flags & PyBUF_WRITABLE) == PyBUF_WRITABLE) &&
(readonly == 1)) {
PyErr_SetString(PyExc_BufferError,
@@ -660,8 +690,9 @@ PyObject_Format(PyObject *obj, PyObject *format_spec)
Py_DECREF(meth);
if (result && !PyUnicode_Check(result)) {
- PyErr_SetString(PyExc_TypeError,
- "__format__ method did not return string");
+ PyErr_Format(PyExc_TypeError,
+ "__format__ must return a str, not %.200s",
+ Py_TYPE(result)->tp_name);
Py_DECREF(result);
result = NULL;
goto done;
@@ -905,6 +936,12 @@ PyNumber_Multiply(PyObject *v, PyObject *w)
}
PyObject *
+PyNumber_MatrixMultiply(PyObject *v, PyObject *w)
+{
+ return binary_op(v, w, NB_SLOT(nb_matrix_multiply), "@");
+}
+
+PyObject *
PyNumber_FloorDivide(PyObject *v, PyObject *w)
{
return binary_op(v, w, NB_SLOT(nb_floor_divide), "//");
@@ -985,6 +1022,7 @@ INPLACE_BINOP(PyNumber_InPlaceAnd, nb_inplace_and, nb_and, "&=")
INPLACE_BINOP(PyNumber_InPlaceLshift, nb_inplace_lshift, nb_lshift, "<<=")
INPLACE_BINOP(PyNumber_InPlaceRshift, nb_inplace_rshift, nb_rshift, ">>=")
INPLACE_BINOP(PyNumber_InPlaceSubtract, nb_inplace_subtract, nb_subtract, "-=")
+INPLACE_BINOP(PyNumber_InMatrixMultiply, nb_inplace_matrix_multiply, nb_matrix_multiply, "@=")
PyObject *
PyNumber_InPlaceFloorDivide(PyObject *v, PyObject *w)
@@ -1051,6 +1089,13 @@ PyNumber_InPlaceMultiply(PyObject *v, PyObject *w)
}
PyObject *
+PyNumber_InPlaceMatrixMultiply(PyObject *v, PyObject *w)
+{
+ return binary_iop(v, w, NB_SLOT(nb_inplace_matrix_multiply),
+ NB_SLOT(nb_matrix_multiply), "@=");
+}
+
+PyObject *
PyNumber_InPlaceRemainder(PyObject *v, PyObject *w)
{
return binary_iop(v, w, NB_SLOT(nb_inplace_remainder),
@@ -2046,32 +2091,82 @@ PyObject_CallObject(PyObject *o, PyObject *a)
return PyEval_CallObjectWithKeywords(o, a, NULL);
}
-PyObject *
-PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw)
+PyObject*
+_Py_CheckFunctionResult(PyObject *func, PyObject *result, const char *where)
{
- ternaryfunc call;
+ int err_occurred = (PyErr_Occurred() != NULL);
+
+ assert((func != NULL) ^ (where != NULL));
- if ((call = func->ob_type->tp_call) != NULL) {
- PyObject *result;
- if (Py_EnterRecursiveCall(" while calling a Python object"))
+ if (result == NULL) {
+ if (!err_occurred) {
+ if (func)
+ PyErr_Format(PyExc_SystemError,
+ "%R returned NULL without setting an error",
+ func);
+ else
+ PyErr_Format(PyExc_SystemError,
+ "%s returned NULL without setting an error",
+ where);
+#ifdef Py_DEBUG
+ /* Ensure that the bug is catched in debug mode */
+ Py_FatalError("a function returned NULL without setting an error");
+#endif
return NULL;
- result = (*call)(func, arg, kw);
- Py_LeaveRecursiveCall();
-#ifdef NDEBUG
- if (result == NULL && !PyErr_Occurred()) {
- PyErr_SetString(
- PyExc_SystemError,
- "NULL result without error in PyObject_Call");
}
-#else
- assert((result != NULL && !PyErr_Occurred())
- || (result == NULL && PyErr_Occurred()));
+ }
+ else {
+ if (err_occurred) {
+ PyObject *exc, *val, *tb;
+ PyErr_Fetch(&exc, &val, &tb);
+
+ Py_DECREF(result);
+
+ if (func)
+ PyErr_Format(PyExc_SystemError,
+ "%R returned a result with an error set",
+ func);
+ else
+ PyErr_Format(PyExc_SystemError,
+ "%s returned a result with an error set",
+ where);
+ _PyErr_ChainExceptions(exc, val, tb);
+#ifdef Py_DEBUG
+ /* Ensure that the bug is catched in debug mode */
+ Py_FatalError("a function returned a result with an error set");
#endif
- return result;
+ return NULL;
+ }
}
- PyErr_Format(PyExc_TypeError, "'%.200s' object is not callable",
- func->ob_type->tp_name);
- return NULL;
+ return result;
+}
+
+PyObject *
+PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw)
+{
+ ternaryfunc call;
+ PyObject *result;
+
+ /* PyObject_Call() must not be called with an exception set,
+ because it may clear it (directly or indirectly) and so the
+ caller loses its exception */
+ assert(!PyErr_Occurred());
+
+ call = func->ob_type->tp_call;
+ if (call == NULL) {
+ PyErr_Format(PyExc_TypeError, "'%.200s' object is not callable",
+ func->ob_type->tp_name);
+ return NULL;
+ }
+
+ if (Py_EnterRecursiveCall(" while calling a Python object"))
+ return NULL;
+
+ result = (*call)(func, arg, kw);
+
+ Py_LeaveRecursiveCall();
+
+ return _Py_CheckFunctionResult(func, result, NULL);
}
static PyObject*
@@ -2510,6 +2605,11 @@ PyObject_IsInstance(PyObject *inst, PyObject *cls)
if (Py_TYPE(inst) == (PyTypeObject *)cls)
return 1;
+ /* We know what type's __instancecheck__ does. */
+ if (PyType_CheckExact(cls)) {
+ return recursive_isinstance(inst, cls);
+ }
+
if (PyTuple_Check(cls)) {
Py_ssize_t i;
Py_ssize_t n;
@@ -2548,6 +2648,7 @@ PyObject_IsInstance(PyObject *inst, PyObject *cls)
}
else if (PyErr_Occurred())
return -1;
+ /* Probably never reached anymore. */
return recursive_isinstance(inst, cls);
}
@@ -2575,6 +2676,14 @@ PyObject_IsSubclass(PyObject *derived, PyObject *cls)
_Py_IDENTIFIER(__subclasscheck__);
PyObject *checker;
+ /* We know what type's __subclasscheck__ does. */
+ if (PyType_CheckExact(cls)) {
+ /* Quick test for an exact match */
+ if (derived == cls)
+ return 1;
+ return recursive_issubclass(derived, cls);
+ }
+
if (PyTuple_Check(cls)) {
Py_ssize_t i;
Py_ssize_t n;
@@ -2613,6 +2722,7 @@ PyObject_IsSubclass(PyObject *derived, PyObject *cls)
}
else if (PyErr_Occurred())
return -1;
+ /* Probably never reached anymore. */
return recursive_issubclass(derived, cls);
}
diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c
index 15c525c442..277be59ad8 100644
--- a/Objects/bytearrayobject.c
+++ b/Objects/bytearrayobject.c
@@ -4,6 +4,13 @@
#include "Python.h"
#include "structmember.h"
#include "bytes_methods.h"
+#include "bytesobject.h"
+#include "pystrhex.h"
+
+/*[clinic input]
+class bytearray "PyByteArrayObject *" "&PyByteArray_Type"
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=5535b77c37a119e0]*/
char _PyByteArray_empty_string[] = "";
@@ -54,18 +61,17 @@ _getbytevalue(PyObject* arg, int *value)
static int
bytearray_getbuffer(PyByteArrayObject *obj, Py_buffer *view, int flags)
{
- int ret;
void *ptr;
if (view == NULL) {
- obj->ob_exports++;
- return 0;
+ PyErr_SetString(PyExc_BufferError,
+ "bytearray_getbuffer: view==NULL argument is obsolete");
+ return -1;
}
ptr = (void *) PyByteArray_AS_STRING(obj);
- ret = PyBuffer_FillInfo(view, (PyObject*)obj, ptr, Py_SIZE(obj), 0, flags);
- if (ret >= 0) {
- obj->ob_exports++;
- }
- return ret;
+ /* cannot fail if view != NULL and readonly == 0 */
+ (void)PyBuffer_FillInfo(view, (PyObject*)obj, ptr, Py_SIZE(obj), 0, flags);
+ obj->ob_exports++;
+ return 0;
}
static void
@@ -85,6 +91,8 @@ _canresize(PyByteArrayObject *self)
return 1;
}
+#include "clinic/bytearrayobject.c.h"
+
/* Direct API functions */
PyObject *
@@ -271,6 +279,31 @@ PyByteArray_Concat(PyObject *a, PyObject *b)
return (PyObject *)result;
}
+static PyObject *
+bytearray_format(PyByteArrayObject *self, PyObject *args)
+{
+ PyObject *bytes_in, *bytes_out, *res;
+ char *bytestring;
+
+ if (self == NULL || !PyByteArray_Check(self) || args == NULL) {
+ PyErr_BadInternalCall();
+ return NULL;
+ }
+ bytestring = PyByteArray_AS_STRING(self);
+ bytes_in = PyBytes_FromString(bytestring);
+ if (bytes_in == NULL)
+ return NULL;
+ bytes_out = _PyBytes_Format(bytes_in, args);
+ Py_DECREF(bytes_in);
+ if (bytes_out == NULL)
+ return NULL;
+ res = PyByteArray_FromObject(bytes_out);
+ Py_DECREF(bytes_out);
+ if (res == NULL)
+ return NULL;
+ return res;
+}
+
/* Functions stuffed into the type object */
static Py_ssize_t
@@ -425,7 +458,9 @@ bytearray_subscript(PyByteArrayObject *self, PyObject *index)
}
}
else {
- PyErr_SetString(PyExc_TypeError, "bytearray indices must be integers");
+ PyErr_Format(PyExc_TypeError,
+ "bytearray indices must be integers or slices, not %.200s",
+ Py_TYPE(index)->tp_name);
return NULL;
}
}
@@ -630,7 +665,9 @@ bytearray_ass_subscript(PyByteArrayObject *self, PyObject *index, PyObject *valu
}
}
else {
- PyErr_SetString(PyExc_TypeError, "bytearray indices must be integer");
+ PyErr_Format(PyExc_TypeError,
+ "bytearray indices must be integers or slices, not %.200s",
+ Py_TYPE(index)->tp_name);
return -1;
}
@@ -1110,7 +1147,7 @@ bytearray_find_internal(PyByteArrayObject *self, PyObject *args, int dir)
char byte;
Py_buffer subbuf;
const char *sub;
- Py_ssize_t sub_len;
+ Py_ssize_t len, sub_len;
Py_ssize_t start=0, end=PY_SSIZE_T_MAX;
Py_ssize_t res;
@@ -1129,15 +1166,34 @@ bytearray_find_internal(PyByteArrayObject *self, PyObject *args, int dir)
sub = &byte;
sub_len = 1;
}
+ len = PyByteArray_GET_SIZE(self);
- if (dir > 0)
- res = stringlib_find_slice(
- PyByteArray_AS_STRING(self), PyByteArray_GET_SIZE(self),
- sub, sub_len, start, end);
- else
- res = stringlib_rfind_slice(
- PyByteArray_AS_STRING(self), PyByteArray_GET_SIZE(self),
- sub, sub_len, start, end);
+ ADJUST_INDICES(start, end, len);
+ if (end - start < sub_len)
+ res = -1;
+ else if (sub_len == 1
+#ifndef HAVE_MEMRCHR
+ && dir > 0
+#endif
+ ) {
+ unsigned char needle = *sub;
+ int mode = (dir > 0) ? FAST_SEARCH : FAST_RSEARCH;
+ res = stringlib_fastsearch_memchr_1char(
+ PyByteArray_AS_STRING(self) + start, end - start,
+ needle, needle, mode);
+ if (res >= 0)
+ res += start;
+ }
+ else {
+ if (dir > 0)
+ res = stringlib_find_slice(
+ PyByteArray_AS_STRING(self), len,
+ sub, sub_len, start, end);
+ else
+ res = stringlib_rfind_slice(
+ PyByteArray_AS_STRING(self), len,
+ sub, sub_len, start, end);
+ }
if (subobj)
PyBuffer_Release(&subbuf);
@@ -1210,26 +1266,34 @@ bytearray_count(PyByteArrayObject *self, PyObject *args)
return count_obj;
}
-PyDoc_STRVAR(clear__doc__,
-"B.clear() -> None\n\
-\n\
-Remove all items from B.");
+/*[clinic input]
+bytearray.clear
+
+ self: self(type="PyByteArrayObject *")
+
+Remove all items from the bytearray.
+[clinic start generated code]*/
static PyObject *
-bytearray_clear(PyByteArrayObject *self)
+bytearray_clear_impl(PyByteArrayObject *self)
+/*[clinic end generated code: output=85c2fe6aede0956c input=e524fd330abcdc18]*/
{
if (PyByteArray_Resize((PyObject *)self, 0) < 0)
return NULL;
Py_RETURN_NONE;
}
-PyDoc_STRVAR(copy__doc__,
-"B.copy() -> bytearray\n\
-\n\
-Return a copy of B.");
+/*[clinic input]
+bytearray.copy
+
+ self: self(type="PyByteArrayObject *")
+
+Return a copy of B.
+[clinic start generated code]*/
static PyObject *
-bytearray_copy(PyByteArrayObject *self)
+bytearray_copy_impl(PyByteArrayObject *self)
+/*[clinic end generated code: output=68cfbcfed484c132 input=6d5d2975aa0f33f3]*/
{
return PyByteArray_FromStringAndSize(PyByteArray_AS_STRING((PyObject *)self),
PyByteArray_GET_SIZE(self));
@@ -1448,36 +1512,42 @@ bytearray_endswith(PyByteArrayObject *self, PyObject *args)
}
-PyDoc_STRVAR(translate__doc__,
-"B.translate(table[, deletechars]) -> bytearray\n\
-\n\
-Return a copy of B, where all characters occurring in the\n\
-optional argument deletechars are removed, and the remaining\n\
-characters have been mapped through the given translation\n\
-table, which must be a bytes object of length 256.");
+/*[clinic input]
+bytearray.translate
+
+ self: self(type="PyByteArrayObject *")
+ table: object
+ Translation table, which must be a bytes object of length 256.
+ [
+ deletechars: object
+ ]
+ /
+
+Return a copy with each character mapped by the given translation table.
+
+All characters occurring in the optional argument deletechars are removed.
+The remaining characters are mapped through the given translation table.
+[clinic start generated code]*/
static PyObject *
-bytearray_translate(PyByteArrayObject *self, PyObject *args)
+bytearray_translate_impl(PyByteArrayObject *self, PyObject *table,
+ int group_right_1, PyObject *deletechars)
+/*[clinic end generated code: output=2bebc86a9a1ff083 input=b749ad85f4860824]*/
{
char *input, *output;
- const char *table;
+ const char *table_chars;
Py_ssize_t i, c;
PyObject *input_obj = (PyObject*)self;
const char *output_start;
Py_ssize_t inlen;
PyObject *result = NULL;
int trans_table[256];
- PyObject *tableobj = NULL, *delobj = NULL;
Py_buffer vtable, vdel;
- if (!PyArg_UnpackTuple(args, "translate", 1, 2,
- &tableobj, &delobj))
- return NULL;
-
- if (tableobj == Py_None) {
+ if (table == Py_None) {
+ table_chars = NULL;
table = NULL;
- tableobj = NULL;
- } else if (PyObject_GetBuffer(tableobj, &vtable, PyBUF_SIMPLE) != 0) {
+ } else if (PyObject_GetBuffer(table, &vtable, PyBUF_SIMPLE) != 0) {
return NULL;
} else {
if (vtable.len != 256) {
@@ -1486,12 +1556,12 @@ bytearray_translate(PyByteArrayObject *self, PyObject *args)
PyBuffer_Release(&vtable);
return NULL;
}
- table = (const char*)vtable.buf;
+ table_chars = (const char*)vtable.buf;
}
- if (delobj != NULL) {
- if (PyObject_GetBuffer(delobj, &vdel, PyBUF_SIMPLE) != 0) {
- if (tableobj != NULL)
+ if (deletechars != NULL) {
+ if (PyObject_GetBuffer(deletechars, &vdel, PyBUF_SIMPLE) != 0) {
+ if (table != NULL)
PyBuffer_Release(&vtable);
return NULL;
}
@@ -1508,21 +1578,21 @@ bytearray_translate(PyByteArrayObject *self, PyObject *args)
output_start = output = PyByteArray_AsString(result);
input = PyByteArray_AS_STRING(input_obj);
- if (vdel.len == 0 && table != NULL) {
+ if (vdel.len == 0 && table_chars != NULL) {
/* If no deletions are required, use faster code */
for (i = inlen; --i >= 0; ) {
c = Py_CHARMASK(*input++);
- *output++ = table[c];
+ *output++ = table_chars[c];
}
goto done;
}
- if (table == NULL) {
+ if (table_chars == NULL) {
for (i = 0; i < 256; i++)
trans_table[i] = Py_CHARMASK(i);
} else {
for (i = 0; i < 256; i++)
- trans_table[i] = Py_CHARMASK(table[i]);
+ trans_table[i] = Py_CHARMASK(table_chars[i]);
}
for (i = 0; i < vdel.len; i++)
@@ -1542,18 +1612,36 @@ bytearray_translate(PyByteArrayObject *self, PyObject *args)
}
done:
- if (tableobj != NULL)
+ if (table != NULL)
PyBuffer_Release(&vtable);
- if (delobj != NULL)
+ if (deletechars != NULL)
PyBuffer_Release(&vdel);
return result;
}
+/*[clinic input]
+
+@staticmethod
+bytearray.maketrans
+
+ frm: Py_buffer
+ to: Py_buffer
+ /
+
+Return a translation table useable for the bytes or bytearray translate method.
+
+The returned table will be one where each byte in frm is mapped to the byte at
+the same position in to.
+
+The bytes objects frm and to must be of the same length.
+[clinic start generated code]*/
+
static PyObject *
-bytearray_maketrans(PyObject *null, PyObject *args)
+bytearray_maketrans_impl(Py_buffer *frm, Py_buffer *to)
+/*[clinic end generated code: output=1df267d99f56b15e input=5925a81d2fbbf151]*/
{
- return _Py_bytes_maketrans(args);
+ return _Py_bytes_maketrans(frm, to);
}
@@ -2044,61 +2132,63 @@ replace(PyByteArrayObject *self,
}
-PyDoc_STRVAR(replace__doc__,
-"B.replace(old, new[, count]) -> bytearray\n\
-\n\
-Return a copy of B with all occurrences of subsection\n\
-old replaced by new. If the optional argument count is\n\
-given, only the first count occurrences are replaced.");
+/*[clinic input]
+bytearray.replace
-static PyObject *
-bytearray_replace(PyByteArrayObject *self, PyObject *args)
-{
- PyObject *res;
- Py_buffer old = {NULL, NULL};
- Py_buffer new = {NULL, NULL};
- Py_ssize_t count = -1;
+ old: Py_buffer
+ new: Py_buffer
+ count: Py_ssize_t = -1
+ Maximum number of occurrences to replace.
+ -1 (the default value) means replace all occurrences.
+ /
- if (!PyArg_ParseTuple(args, "y*y*|n:replace", &old, &new, &count))
- return NULL;
+Return a copy with all occurrences of substring old replaced by new.
- res = (PyObject *)replace((PyByteArrayObject *) self,
- (const char *)old.buf, old.len,
- (const char *)new.buf, new.len, count);
+If the optional argument count is given, only the first count occurrences are
+replaced.
+[clinic start generated code]*/
- PyBuffer_Release(&old);
- PyBuffer_Release(&new);
- return res;
+static PyObject *
+bytearray_replace_impl(PyByteArrayObject *self, Py_buffer *old,
+ Py_buffer *new, Py_ssize_t count)
+/*[clinic end generated code: output=d39884c4dc59412a input=aa379d988637c7fb]*/
+{
+ return (PyObject *)replace((PyByteArrayObject *) self,
+ old->buf, old->len,
+ new->buf, new->len, count);
}
-PyDoc_STRVAR(split__doc__,
-"B.split(sep=None, maxsplit=-1) -> list of bytearrays\n\
-\n\
-Return a list of the sections in B, using sep as the delimiter.\n\
-If sep is not given, B is split on ASCII whitespace characters\n\
-(space, tab, return, newline, formfeed, vertical tab).\n\
-If maxsplit is given, at most maxsplit splits are done.");
+/*[clinic input]
+bytearray.split
+
+ sep: object = None
+ The delimiter according which to split the bytearray.
+ None (the default value) means split on ASCII whitespace characters
+ (space, tab, return, newline, formfeed, vertical tab).
+ maxsplit: Py_ssize_t = -1
+ Maximum number of splits to do.
+ -1 (the default value) means no limit.
+
+Return a list of the sections in the bytearray, using sep as the delimiter.
+[clinic start generated code]*/
static PyObject *
-bytearray_split(PyByteArrayObject *self, PyObject *args, PyObject *kwds)
+bytearray_split_impl(PyByteArrayObject *self, PyObject *sep,
+ Py_ssize_t maxsplit)
+/*[clinic end generated code: output=833e2cf385d9a04d input=24f82669f41bf523]*/
{
- static char *kwlist[] = {"sep", "maxsplit", 0};
Py_ssize_t len = PyByteArray_GET_SIZE(self), n;
- Py_ssize_t maxsplit = -1;
const char *s = PyByteArray_AS_STRING(self), *sub;
- PyObject *list, *subobj = Py_None;
+ PyObject *list;
Py_buffer vsub;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|On:split",
- kwlist, &subobj, &maxsplit))
- return NULL;
if (maxsplit < 0)
maxsplit = PY_SSIZE_T_MAX;
- if (subobj == Py_None)
+ if (sep == Py_None)
return stringlib_split_whitespace((PyObject*) self, s, len, maxsplit);
- if (PyObject_GetBuffer(subobj, &vsub, PyBUF_SIMPLE) != 0)
+ if (PyObject_GetBuffer(sep, &vsub, PyBUF_SIMPLE) != 0)
return NULL;
sub = vsub.buf;
n = vsub.len;
@@ -2110,19 +2200,30 @@ bytearray_split(PyByteArrayObject *self, PyObject *args, PyObject *kwds)
return list;
}
-PyDoc_STRVAR(partition__doc__,
-"B.partition(sep) -> (head, sep, tail)\n\
-\n\
-Search for the separator sep in B, and return the part before it,\n\
-the separator itself, and the part after it. If the separator is not\n\
-found, returns B and two empty bytearray objects.");
+/*[clinic input]
+bytearray.partition
+
+ self: self(type="PyByteArrayObject *")
+ sep: object
+ /
+
+Partition the bytearray into three parts using the given separator.
+
+This will search for the separator sep in the bytearray. If the separator is
+found, returns a 3-tuple containing the part before the separator, the
+separator itself, and the part after it.
+
+If the separator is not found, returns a 3-tuple containing the original
+bytearray object and two empty bytearray objects.
+[clinic start generated code]*/
static PyObject *
-bytearray_partition(PyByteArrayObject *self, PyObject *sep_obj)
+bytearray_partition(PyByteArrayObject *self, PyObject *sep)
+/*[clinic end generated code: output=45d2525ddd35f957 input=7d7fe37b1696d506]*/
{
PyObject *bytesep, *result;
- bytesep = PyByteArray_FromObject(sep_obj);
+ bytesep = PyByteArray_FromObject(sep);
if (! bytesep)
return NULL;
@@ -2137,20 +2238,30 @@ bytearray_partition(PyByteArrayObject *self, PyObject *sep_obj)
return result;
}
-PyDoc_STRVAR(rpartition__doc__,
-"B.rpartition(sep) -> (head, sep, tail)\n\
-\n\
-Search for the separator sep in B, starting at the end of B,\n\
-and return the part before it, the separator itself, and the\n\
-part after it. If the separator is not found, returns two empty\n\
-bytearray objects and B.");
+/*[clinic input]
+bytearray.rpartition
+
+ self: self(type="PyByteArrayObject *")
+ sep: object
+ /
+
+Partition the bytes into three parts using the given separator.
+
+This will search for the separator sep in the bytearray, starting and the end.
+If the separator is found, returns a 3-tuple containing the part before the
+separator, the separator itself, and the part after it.
+
+If the separator is not found, returns a 3-tuple containing two empty bytearray
+objects and the original bytearray object.
+[clinic start generated code]*/
static PyObject *
-bytearray_rpartition(PyByteArrayObject *self, PyObject *sep_obj)
+bytearray_rpartition(PyByteArrayObject *self, PyObject *sep)
+/*[clinic end generated code: output=440de3c9426115e8 input=9b8cd540c1b75853]*/
{
PyObject *bytesep, *result;
- bytesep = PyByteArray_FromObject(sep_obj);
+ bytesep = PyByteArray_FromObject(sep);
if (! bytesep)
return NULL;
@@ -2165,35 +2276,31 @@ bytearray_rpartition(PyByteArrayObject *self, PyObject *sep_obj)
return result;
}
-PyDoc_STRVAR(rsplit__doc__,
-"B.rsplit(sep=None, maxsplit=-1) -> list of bytearrays\n\
-\n\
-Return a list of the sections in B, using sep as the delimiter,\n\
-starting at the end of B and working to the front.\n\
-If sep is not given, B is split on ASCII whitespace characters\n\
-(space, tab, return, newline, formfeed, vertical tab).\n\
-If maxsplit is given, at most maxsplit splits are done.");
+/*[clinic input]
+bytearray.rsplit = bytearray.split
+
+Return a list of the sections in the bytearray, using sep as the delimiter.
+
+Splitting is done starting at the end of the bytearray and working to the front.
+[clinic start generated code]*/
static PyObject *
-bytearray_rsplit(PyByteArrayObject *self, PyObject *args, PyObject *kwds)
+bytearray_rsplit_impl(PyByteArrayObject *self, PyObject *sep,
+ Py_ssize_t maxsplit)
+/*[clinic end generated code: output=a55e0b5a03cb6190 input=a68286e4dd692ffe]*/
{
- static char *kwlist[] = {"sep", "maxsplit", 0};
Py_ssize_t len = PyByteArray_GET_SIZE(self), n;
- Py_ssize_t maxsplit = -1;
const char *s = PyByteArray_AS_STRING(self), *sub;
- PyObject *list, *subobj = Py_None;
+ PyObject *list;
Py_buffer vsub;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|On:rsplit",
- kwlist, &subobj, &maxsplit))
- return NULL;
if (maxsplit < 0)
maxsplit = PY_SSIZE_T_MAX;
- if (subobj == Py_None)
+ if (sep == Py_None)
return stringlib_rsplit_whitespace((PyObject*) self, s, len, maxsplit);
- if (PyObject_GetBuffer(subobj, &vsub, PyBUF_SIMPLE) != 0)
+ if (PyObject_GetBuffer(sep, &vsub, PyBUF_SIMPLE) != 0)
return NULL;
sub = vsub.buf;
n = vsub.len;
@@ -2205,12 +2312,17 @@ bytearray_rsplit(PyByteArrayObject *self, PyObject *args, PyObject *kwds)
return list;
}
-PyDoc_STRVAR(reverse__doc__,
-"B.reverse() -> None\n\
-\n\
-Reverse the order of the values in B in place.");
+/*[clinic input]
+bytearray.reverse
+
+ self: self(type="PyByteArrayObject *")
+
+Reverse the order of the values in B in place.
+[clinic start generated code]*/
+
static PyObject *
-bytearray_reverse(PyByteArrayObject *self, PyObject *unused)
+bytearray_reverse_impl(PyByteArrayObject *self)
+/*[clinic end generated code: output=9f7616f29ab309d3 input=7933a499b8597bd1]*/
{
char swap, *head, *tail;
Py_ssize_t i, j, n = Py_SIZE(self);
@@ -2227,57 +2339,74 @@ bytearray_reverse(PyByteArrayObject *self, PyObject *unused)
Py_RETURN_NONE;
}
-PyDoc_STRVAR(insert__doc__,
-"B.insert(index, int) -> None\n\
-\n\
-Insert a single item into the bytearray before the given index.");
+
+/*[python input]
+class bytesvalue_converter(CConverter):
+ type = 'int'
+ converter = '_getbytevalue'
+[python start generated code]*/
+/*[python end generated code: output=da39a3ee5e6b4b0d input=29c2e7c26c212812]*/
+
+
+/*[clinic input]
+bytearray.insert
+
+ self: self(type="PyByteArrayObject *")
+ index: Py_ssize_t
+ The index where the value is to be inserted.
+ item: bytesvalue
+ The item to be inserted.
+ /
+
+Insert a single item into the bytearray before the given index.
+[clinic start generated code]*/
+
static PyObject *
-bytearray_insert(PyByteArrayObject *self, PyObject *args)
+bytearray_insert_impl(PyByteArrayObject *self, Py_ssize_t index, int item)
+/*[clinic end generated code: output=76c775a70e7b07b7 input=833766836ba30e1e]*/
{
- PyObject *value;
- int ival;
- Py_ssize_t where, n = Py_SIZE(self);
+ Py_ssize_t n = Py_SIZE(self);
char *buf;
- if (!PyArg_ParseTuple(args, "nO:insert", &where, &value))
- return NULL;
-
if (n == PY_SSIZE_T_MAX) {
PyErr_SetString(PyExc_OverflowError,
"cannot add more objects to bytearray");
return NULL;
}
- if (!_getbytevalue(value, &ival))
- return NULL;
if (PyByteArray_Resize((PyObject *)self, n + 1) < 0)
return NULL;
buf = PyByteArray_AS_STRING(self);
- if (where < 0) {
- where += n;
- if (where < 0)
- where = 0;
+ if (index < 0) {
+ index += n;
+ if (index < 0)
+ index = 0;
}
- if (where > n)
- where = n;
- memmove(buf + where + 1, buf + where, n - where);
- buf[where] = ival;
+ if (index > n)
+ index = n;
+ memmove(buf + index + 1, buf + index, n - index);
+ buf[index] = item;
Py_RETURN_NONE;
}
-PyDoc_STRVAR(append__doc__,
-"B.append(int) -> None\n\
-\n\
-Append a single item to the end of B.");
+/*[clinic input]
+bytearray.append
+
+ self: self(type="PyByteArrayObject *")
+ item: bytesvalue
+ The item to be appended.
+ /
+
+Append a single item to the end of the bytearray.
+[clinic start generated code]*/
+
static PyObject *
-bytearray_append(PyByteArrayObject *self, PyObject *arg)
+bytearray_append_impl(PyByteArrayObject *self, int item)
+/*[clinic end generated code: output=a154e19ed1886cb6 input=ae56ea87380407cc]*/
{
- int value;
Py_ssize_t n = Py_SIZE(self);
- if (! _getbytevalue(arg, &value))
- return NULL;
if (n == PY_SSIZE_T_MAX) {
PyErr_SetString(PyExc_OverflowError,
"cannot add more objects to bytearray");
@@ -2286,18 +2415,25 @@ bytearray_append(PyByteArrayObject *self, PyObject *arg)
if (PyByteArray_Resize((PyObject *)self, n + 1) < 0)
return NULL;
- PyByteArray_AS_STRING(self)[n] = value;
+ PyByteArray_AS_STRING(self)[n] = item;
Py_RETURN_NONE;
}
-PyDoc_STRVAR(extend__doc__,
-"B.extend(iterable_of_ints) -> None\n\
-\n\
-Append all the elements from the iterator or sequence to the\n\
-end of B.");
+/*[clinic input]
+bytearray.extend
+
+ self: self(type="PyByteArrayObject *")
+ iterable_of_ints: object
+ The iterable of items to append.
+ /
+
+Append all the items from the iterator or sequence to the end of the bytearray.
+[clinic start generated code]*/
+
static PyObject *
-bytearray_extend(PyByteArrayObject *self, PyObject *arg)
+bytearray_extend(PyByteArrayObject *self, PyObject *iterable_of_ints)
+/*[clinic end generated code: output=98155dbe249170b1 input=ce83a5d75b70d850]*/
{
PyObject *it, *item, *bytearray_obj;
Py_ssize_t buf_size = 0, len = 0;
@@ -2305,19 +2441,19 @@ bytearray_extend(PyByteArrayObject *self, PyObject *arg)
char *buf;
/* bytearray_setslice code only accepts something supporting PEP 3118. */
- if (PyObject_CheckBuffer(arg)) {
- if (bytearray_setslice(self, Py_SIZE(self), Py_SIZE(self), arg) == -1)
+ if (PyObject_CheckBuffer(iterable_of_ints)) {
+ if (bytearray_setslice(self, Py_SIZE(self), Py_SIZE(self), iterable_of_ints) == -1)
return NULL;
Py_RETURN_NONE;
}
- it = PyObject_GetIter(arg);
+ it = PyObject_GetIter(iterable_of_ints);
if (it == NULL)
return NULL;
/* Try to determine the length of the argument. 32 is arbitrary. */
- buf_size = PyObject_LengthHint(arg, 32);
+ buf_size = PyObject_LengthHint(iterable_of_ints, 32);
if (buf_size == -1) {
Py_DECREF(it);
return NULL;
@@ -2369,29 +2505,36 @@ bytearray_extend(PyByteArrayObject *self, PyObject *arg)
Py_RETURN_NONE;
}
-PyDoc_STRVAR(pop__doc__,
-"B.pop([index]) -> int\n\
-\n\
-Remove and return a single item from B. If no index\n\
-argument is given, will pop the last value.");
+/*[clinic input]
+bytearray.pop
+
+ self: self(type="PyByteArrayObject *")
+ index: Py_ssize_t = -1
+ The index from where to remove the item.
+ -1 (the default value) means remove the last item.
+ /
+
+Remove and return a single item from B.
+
+If no index argument is given, will pop the last item.
+[clinic start generated code]*/
+
static PyObject *
-bytearray_pop(PyByteArrayObject *self, PyObject *args)
+bytearray_pop_impl(PyByteArrayObject *self, Py_ssize_t index)
+/*[clinic end generated code: output=e0ccd401f8021da8 input=0797e6c0ca9d5a85]*/
{
int value;
- Py_ssize_t where = -1, n = Py_SIZE(self);
+ Py_ssize_t n = Py_SIZE(self);
char *buf;
- if (!PyArg_ParseTuple(args, "|n:pop", &where))
- return NULL;
-
if (n == 0) {
PyErr_SetString(PyExc_IndexError,
"pop from empty bytearray");
return NULL;
}
- if (where < 0)
- where += Py_SIZE(self);
- if (where < 0 || where >= Py_SIZE(self)) {
+ if (index < 0)
+ index += Py_SIZE(self);
+ if (index < 0 || index >= Py_SIZE(self)) {
PyErr_SetString(PyExc_IndexError, "pop index out of range");
return NULL;
}
@@ -2399,40 +2542,41 @@ bytearray_pop(PyByteArrayObject *self, PyObject *args)
return NULL;
buf = PyByteArray_AS_STRING(self);
- value = buf[where];
- memmove(buf + where, buf + where + 1, n - where);
+ value = buf[index];
+ memmove(buf + index, buf + index + 1, n - index);
if (PyByteArray_Resize((PyObject *)self, n - 1) < 0)
return NULL;
return PyLong_FromLong((unsigned char)value);
}
-PyDoc_STRVAR(remove__doc__,
-"B.remove(int) -> None\n\
-\n\
-Remove the first occurrence of a value in B.");
+/*[clinic input]
+bytearray.remove
+
+ self: self(type="PyByteArrayObject *")
+ value: bytesvalue
+ The value to remove.
+ /
+
+Remove the first occurrence of a value in the bytearray.
+[clinic start generated code]*/
+
static PyObject *
-bytearray_remove(PyByteArrayObject *self, PyObject *arg)
+bytearray_remove_impl(PyByteArrayObject *self, int value)
+/*[clinic end generated code: output=d659e37866709c13 input=47560b11fd856c24]*/
{
- int value;
- Py_ssize_t where, n = Py_SIZE(self);
+ Py_ssize_t n = Py_SIZE(self);
char *buf = PyByteArray_AS_STRING(self);
+ char *where = memchr(buf, value, n);
- if (! _getbytevalue(arg, &value))
- return NULL;
-
- for (where = 0; where < n; where++) {
- if (buf[where] == value)
- break;
- }
- if (where == n) {
+ if (!where) {
PyErr_SetString(PyExc_ValueError, "value not found in bytearray");
return NULL;
}
if (!_canresize(self))
return NULL;
- memmove(buf + where, buf + where + 1, n - where);
+ memmove(where, where + 1, buf + n - where);
if (PyByteArray_Resize((PyObject *)self, n - 1) < 0)
return NULL;
@@ -2461,132 +2605,145 @@ rstrip_helper(char *myptr, Py_ssize_t mysize,
return i + 1;
}
-PyDoc_STRVAR(strip__doc__,
-"B.strip([bytes]) -> bytearray\n\
-\n\
-Strip leading and trailing bytes contained in the argument\n\
-and return the result as a new bytearray.\n\
-If the argument is omitted, strip ASCII whitespace.");
+/*[clinic input]
+bytearray.strip
+
+ bytes: object = None
+ /
+
+Strip leading and trailing bytes contained in the argument.
+
+If the argument is omitted or None, strip leading and trailing ASCII whitespace.
+[clinic start generated code]*/
+
static PyObject *
-bytearray_strip(PyByteArrayObject *self, PyObject *args)
+bytearray_strip_impl(PyByteArrayObject *self, PyObject *bytes)
+/*[clinic end generated code: output=760412661a34ad5a input=ef7bb59b09c21d62]*/
{
- Py_ssize_t left, right, mysize, argsize;
- char *myptr, *argptr;
- PyObject *arg = Py_None;
- Py_buffer varg;
- if (!PyArg_ParseTuple(args, "|O:strip", &arg))
- return NULL;
- if (arg == Py_None) {
- argptr = "\t\n\r\f\v ";
- argsize = 6;
+ Py_ssize_t left, right, mysize, byteslen;
+ char *myptr, *bytesptr;
+ Py_buffer vbytes;
+
+ if (bytes == Py_None) {
+ bytesptr = "\t\n\r\f\v ";
+ byteslen = 6;
}
else {
- if (PyObject_GetBuffer(arg, &varg, PyBUF_SIMPLE) != 0)
+ if (PyObject_GetBuffer(bytes, &vbytes, PyBUF_SIMPLE) != 0)
return NULL;
- argptr = (char *) varg.buf;
- argsize = varg.len;
+ bytesptr = (char *) vbytes.buf;
+ byteslen = vbytes.len;
}
myptr = PyByteArray_AS_STRING(self);
mysize = Py_SIZE(self);
- left = lstrip_helper(myptr, mysize, argptr, argsize);
+ left = lstrip_helper(myptr, mysize, bytesptr, byteslen);
if (left == mysize)
right = left;
else
- right = rstrip_helper(myptr, mysize, argptr, argsize);
- if (arg != Py_None)
- PyBuffer_Release(&varg);
+ right = rstrip_helper(myptr, mysize, bytesptr, byteslen);
+ if (bytes != Py_None)
+ PyBuffer_Release(&vbytes);
return PyByteArray_FromStringAndSize(myptr + left, right - left);
}
-PyDoc_STRVAR(lstrip__doc__,
-"B.lstrip([bytes]) -> bytearray\n\
-\n\
-Strip leading bytes contained in the argument\n\
-and return the result as a new bytearray.\n\
-If the argument is omitted, strip leading ASCII whitespace.");
+/*[clinic input]
+bytearray.lstrip
+
+ bytes: object = None
+ /
+
+Strip leading bytes contained in the argument.
+
+If the argument is omitted or None, strip leading ASCII whitespace.
+[clinic start generated code]*/
+
static PyObject *
-bytearray_lstrip(PyByteArrayObject *self, PyObject *args)
+bytearray_lstrip_impl(PyByteArrayObject *self, PyObject *bytes)
+/*[clinic end generated code: output=d005c9d0ab909e66 input=80843f975dd7c480]*/
{
- Py_ssize_t left, right, mysize, argsize;
- char *myptr, *argptr;
- PyObject *arg = Py_None;
- Py_buffer varg;
- if (!PyArg_ParseTuple(args, "|O:lstrip", &arg))
- return NULL;
- if (arg == Py_None) {
- argptr = "\t\n\r\f\v ";
- argsize = 6;
+ Py_ssize_t left, right, mysize, byteslen;
+ char *myptr, *bytesptr;
+ Py_buffer vbytes;
+
+ if (bytes == Py_None) {
+ bytesptr = "\t\n\r\f\v ";
+ byteslen = 6;
}
else {
- if (PyObject_GetBuffer(arg, &varg, PyBUF_SIMPLE) != 0)
+ if (PyObject_GetBuffer(bytes, &vbytes, PyBUF_SIMPLE) != 0)
return NULL;
- argptr = (char *) varg.buf;
- argsize = varg.len;
+ bytesptr = (char *) vbytes.buf;
+ byteslen = vbytes.len;
}
myptr = PyByteArray_AS_STRING(self);
mysize = Py_SIZE(self);
- left = lstrip_helper(myptr, mysize, argptr, argsize);
+ left = lstrip_helper(myptr, mysize, bytesptr, byteslen);
right = mysize;
- if (arg != Py_None)
- PyBuffer_Release(&varg);
+ if (bytes != Py_None)
+ PyBuffer_Release(&vbytes);
return PyByteArray_FromStringAndSize(myptr + left, right - left);
}
-PyDoc_STRVAR(rstrip__doc__,
-"B.rstrip([bytes]) -> bytearray\n\
-\n\
-Strip trailing bytes contained in the argument\n\
-and return the result as a new bytearray.\n\
-If the argument is omitted, strip trailing ASCII whitespace.");
+/*[clinic input]
+bytearray.rstrip
+
+ bytes: object = None
+ /
+
+Strip trailing bytes contained in the argument.
+
+If the argument is omitted or None, strip trailing ASCII whitespace.
+[clinic start generated code]*/
+
static PyObject *
-bytearray_rstrip(PyByteArrayObject *self, PyObject *args)
+bytearray_rstrip_impl(PyByteArrayObject *self, PyObject *bytes)
+/*[clinic end generated code: output=030e2fbd2f7276bd input=e728b994954cfd91]*/
{
- Py_ssize_t right, mysize, argsize;
- char *myptr, *argptr;
- PyObject *arg = Py_None;
- Py_buffer varg;
- if (!PyArg_ParseTuple(args, "|O:rstrip", &arg))
- return NULL;
- if (arg == Py_None) {
- argptr = "\t\n\r\f\v ";
- argsize = 6;
+ Py_ssize_t right, mysize, byteslen;
+ char *myptr, *bytesptr;
+ Py_buffer vbytes;
+
+ if (bytes == Py_None) {
+ bytesptr = "\t\n\r\f\v ";
+ byteslen = 6;
}
else {
- if (PyObject_GetBuffer(arg, &varg, PyBUF_SIMPLE) != 0)
+ if (PyObject_GetBuffer(bytes, &vbytes, PyBUF_SIMPLE) != 0)
return NULL;
- argptr = (char *) varg.buf;
- argsize = varg.len;
+ bytesptr = (char *) vbytes.buf;
+ byteslen = vbytes.len;
}
myptr = PyByteArray_AS_STRING(self);
mysize = Py_SIZE(self);
- right = rstrip_helper(myptr, mysize, argptr, argsize);
- if (arg != Py_None)
- PyBuffer_Release(&varg);
+ right = rstrip_helper(myptr, mysize, bytesptr, byteslen);
+ if (bytes != Py_None)
+ PyBuffer_Release(&vbytes);
return PyByteArray_FromStringAndSize(myptr, right);
}
-PyDoc_STRVAR(decode_doc,
-"B.decode(encoding='utf-8', errors='strict') -> str\n\
-\n\
-Decode B using the codec registered for encoding. Default encoding\n\
-is 'utf-8'. errors may be given to set a different error\n\
-handling scheme. Default is 'strict' meaning that encoding errors raise\n\
-a UnicodeDecodeError. Other possible values are 'ignore' and 'replace'\n\
-as well as any other name registered with codecs.register_error that is\n\
-able to handle UnicodeDecodeErrors.");
+/*[clinic input]
+bytearray.decode
+
+ encoding: str(c_default="NULL") = 'utf-8'
+ The encoding with which to decode the bytearray.
+ errors: str(c_default="NULL") = 'strict'
+ The error handling scheme to use for the handling of decoding errors.
+ The default is 'strict' meaning that decoding errors raise a
+ UnicodeDecodeError. Other possible values are 'ignore' and 'replace'
+ as well as any other name registered with codecs.register_error that
+ can handle UnicodeDecodeErrors.
+
+Decode the bytearray using the codec registered for encoding.
+[clinic start generated code]*/
static PyObject *
-bytearray_decode(PyObject *self, PyObject *args, PyObject *kwargs)
+bytearray_decode_impl(PyByteArrayObject *self, const char *encoding,
+ const char *errors)
+/*[clinic end generated code: output=f57d43f4a00b42c5 input=f28d8f903020257b]*/
{
- const char *encoding = NULL;
- const char *errors = NULL;
- static char *kwlist[] = {"encoding", "errors", 0};
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|ss:decode", kwlist, &encoding, &errors))
- return NULL;
if (encoding == NULL)
encoding = PyUnicode_GetDefaultEncoding();
- return PyUnicode_FromEncodedObject(self, encoding, errors);
+ return PyUnicode_FromEncodedObject((PyObject*)self, encoding, errors);
}
PyDoc_STRVAR(alloc_doc,
@@ -2600,48 +2757,47 @@ bytearray_alloc(PyByteArrayObject *self)
return PyLong_FromSsize_t(self->ob_alloc);
}
-PyDoc_STRVAR(join_doc,
-"B.join(iterable_of_bytes) -> bytearray\n\
-\n\
-Concatenate any number of bytes/bytearray objects, with B\n\
-in between each pair, and return the result as a new bytearray.");
+/*[clinic input]
+bytearray.join
+
+ iterable_of_bytes: object
+ /
+
+Concatenate any number of bytes/bytearray objects.
+
+The bytearray whose method is called is inserted in between each pair.
+
+The result is returned as a new bytearray object.
+[clinic start generated code]*/
static PyObject *
-bytearray_join(PyObject *self, PyObject *iterable)
+bytearray_join(PyByteArrayObject *self, PyObject *iterable_of_bytes)
+/*[clinic end generated code: output=a8516370bf68ae08 input=aba6b1f9b30fcb8e]*/
{
- return stringlib_bytes_join(self, iterable);
+ return stringlib_bytes_join((PyObject*)self, iterable_of_bytes);
}
-PyDoc_STRVAR(splitlines__doc__,
-"B.splitlines([keepends]) -> list of lines\n\
-\n\
-Return a list of the lines in B, breaking at line boundaries.\n\
-Line breaks are not included in the resulting list unless keepends\n\
-is given and true.");
+/*[clinic input]
+bytearray.splitlines
-static PyObject*
-bytearray_splitlines(PyObject *self, PyObject *args, PyObject *kwds)
-{
- static char *kwlist[] = {"keepends", 0};
- int keepends = 0;
+ keepends: int(c_default="0") = False
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|i:splitlines",
- kwlist, &keepends))
- return NULL;
+Return a list of the lines in the bytearray, breaking at line boundaries.
+Line breaks are not included in the resulting list unless keepends is given and
+true.
+[clinic start generated code]*/
+
+static PyObject *
+bytearray_splitlines_impl(PyByteArrayObject *self, int keepends)
+/*[clinic end generated code: output=4223c94b895f6ad9 input=8ccade941e5ea0bd]*/
+{
return stringlib_splitlines(
(PyObject*) self, PyByteArray_AS_STRING(self),
PyByteArray_GET_SIZE(self), keepends
);
}
-PyDoc_STRVAR(fromhex_doc,
-"bytearray.fromhex(string) -> bytearray (static method)\n\
-\n\
-Create a bytearray object from a string of hexadecimal numbers.\n\
-Spaces between two numbers are accepted.\n\
-Example: bytearray.fromhex('B9 01EF') -> bytearray(b'\\xb9\\x01\\xef').");
-
static int
hex_digit_to_int(Py_UCS4 c)
{
@@ -2658,24 +2814,37 @@ hex_digit_to_int(Py_UCS4 c)
return -1;
}
+/*[clinic input]
+@classmethod
+bytearray.fromhex
+
+ cls: self(type="PyObject*")
+ string: unicode
+ /
+
+Create a bytearray object from a string of hexadecimal numbers.
+
+Spaces between two numbers are accepted.
+Example: bytearray.fromhex('B9 01EF') -> bytearray(b'\\xb9\\x01\\xef')
+[clinic start generated code]*/
+
static PyObject *
-bytearray_fromhex(PyObject *cls, PyObject *args)
+bytearray_fromhex_impl(PyObject*cls, PyObject *string)
+/*[clinic end generated code: output=df3da60129b3700c input=907bbd2d34d9367a]*/
{
- PyObject *newbytes, *hexobj;
+ PyObject *newbytes;
char *buf;
Py_ssize_t hexlen, byteslen, i, j;
int top, bot;
void *data;
unsigned int kind;
- if (!PyArg_ParseTuple(args, "U:fromhex", &hexobj))
+ assert(PyUnicode_Check(string));
+ if (PyUnicode_READY(string))
return NULL;
- assert(PyUnicode_Check(hexobj));
- if (PyUnicode_READY(hexobj))
- return NULL;
- kind = PyUnicode_KIND(hexobj);
- data = PyUnicode_DATA(hexobj);
- hexlen = PyUnicode_GET_LENGTH(hexobj);
+ kind = PyUnicode_KIND(string);
+ data = PyUnicode_DATA(string);
+ hexlen = PyUnicode_GET_LENGTH(string);
byteslen = hexlen/2; /* This overestimates if there are spaces */
newbytes = PyByteArray_FromStringAndSize(NULL, byteslen);
@@ -2707,6 +2876,19 @@ bytearray_fromhex(PyObject *cls, PyObject *args)
return NULL;
}
+PyDoc_STRVAR(hex__doc__,
+"B.hex() -> string\n\
+\n\
+Create a string of hexadecimal numbers from a bytearray object.\n\
+Example: bytearray([0xb9, 0x01, 0xef]).hex() -> 'b901ef'.");
+
+static PyObject *
+bytearray_hex(PyBytesObject *self)
+{
+ char* argbuf = PyByteArray_AS_STRING(self);
+ Py_ssize_t arglen = PyByteArray_GET_SIZE(self);
+ return _Py_strhex(argbuf, arglen);
+}
static PyObject *
_common_reduce(PyByteArrayObject *self, int proto)
@@ -2743,37 +2925,53 @@ _common_reduce(PyByteArrayObject *self, int proto)
}
}
-PyDoc_STRVAR(reduce_doc, "Return state information for pickling.");
+/*[clinic input]
+bytearray.__reduce__ as bytearray_reduce
+
+ self: self(type="PyByteArrayObject *")
+
+Return state information for pickling.
+[clinic start generated code]*/
static PyObject *
-bytearray_reduce(PyByteArrayObject *self)
+bytearray_reduce_impl(PyByteArrayObject *self)
+/*[clinic end generated code: output=52bf304086464cab input=fbb07de4d102a03a]*/
{
return _common_reduce(self, 2);
}
-PyDoc_STRVAR(reduce_ex_doc, "Return state information for pickling.");
+/*[clinic input]
+bytearray.__reduce_ex__ as bytearray_reduce_ex
-static PyObject *
-bytearray_reduce_ex(PyByteArrayObject *self, PyObject *args)
-{
- int proto = 0;
+ self: self(type="PyByteArrayObject *")
+ proto: int = 0
+ /
- if (!PyArg_ParseTuple(args, "|i:__reduce_ex__", &proto))
- return NULL;
+Return state information for pickling.
+[clinic start generated code]*/
+static PyObject *
+bytearray_reduce_ex_impl(PyByteArrayObject *self, int proto)
+/*[clinic end generated code: output=52eac33377197520 input=0e091a42ca6dbd91]*/
+{
return _common_reduce(self, proto);
}
-PyDoc_STRVAR(sizeof_doc,
-"B.__sizeof__() -> int\n\
- \n\
-Returns the size of B in memory, in bytes");
+/*[clinic input]
+bytearray.__sizeof__ as bytearray_sizeof
+
+ self: self(type="PyByteArrayObject *")
+
+Returns the size of the bytearray object in memory, in bytes.
+[clinic start generated code]*/
+
static PyObject *
-bytearray_sizeof(PyByteArrayObject *self)
+bytearray_sizeof_impl(PyByteArrayObject *self)
+/*[clinic end generated code: output=738abdd17951c427 input=6b23d305362b462b]*/
{
Py_ssize_t res;
- res = sizeof(PyByteArrayObject) + self->ob_alloc * sizeof(char);
+ res = _PyObject_SIZE(Py_TYPE(self)) + self->ob_alloc * sizeof(char);
return PyLong_FromSsize_t(res);
}
@@ -2804,26 +3002,26 @@ static PyBufferProcs bytearray_as_buffer = {
static PyMethodDef
bytearray_methods[] = {
{"__alloc__", (PyCFunction)bytearray_alloc, METH_NOARGS, alloc_doc},
- {"__reduce__", (PyCFunction)bytearray_reduce, METH_NOARGS, reduce_doc},
- {"__reduce_ex__", (PyCFunction)bytearray_reduce_ex, METH_VARARGS, reduce_ex_doc},
- {"__sizeof__", (PyCFunction)bytearray_sizeof, METH_NOARGS, sizeof_doc},
- {"append", (PyCFunction)bytearray_append, METH_O, append__doc__},
+ BYTEARRAY_REDUCE_METHODDEF
+ BYTEARRAY_REDUCE_EX_METHODDEF
+ BYTEARRAY_SIZEOF_METHODDEF
+ BYTEARRAY_APPEND_METHODDEF
{"capitalize", (PyCFunction)stringlib_capitalize, METH_NOARGS,
_Py_capitalize__doc__},
{"center", (PyCFunction)stringlib_center, METH_VARARGS, center__doc__},
- {"clear", (PyCFunction)bytearray_clear, METH_NOARGS, clear__doc__},
- {"copy", (PyCFunction)bytearray_copy, METH_NOARGS, copy__doc__},
+ BYTEARRAY_CLEAR_METHODDEF
+ BYTEARRAY_COPY_METHODDEF
{"count", (PyCFunction)bytearray_count, METH_VARARGS, count__doc__},
- {"decode", (PyCFunction)bytearray_decode, METH_VARARGS | METH_KEYWORDS, decode_doc},
+ BYTEARRAY_DECODE_METHODDEF
{"endswith", (PyCFunction)bytearray_endswith, METH_VARARGS, endswith__doc__},
{"expandtabs", (PyCFunction)stringlib_expandtabs, METH_VARARGS | METH_KEYWORDS,
expandtabs__doc__},
- {"extend", (PyCFunction)bytearray_extend, METH_O, extend__doc__},
+ BYTEARRAY_EXTEND_METHODDEF
{"find", (PyCFunction)bytearray_find, METH_VARARGS, find__doc__},
- {"fromhex", (PyCFunction)bytearray_fromhex, METH_VARARGS|METH_CLASS,
- fromhex_doc},
+ BYTEARRAY_FROMHEX_METHODDEF
+ {"hex", (PyCFunction)bytearray_hex, METH_NOARGS, hex__doc__},
{"index", (PyCFunction)bytearray_index, METH_VARARGS, index__doc__},
- {"insert", (PyCFunction)bytearray_insert, METH_VARARGS, insert__doc__},
+ BYTEARRAY_INSERT_METHODDEF
{"isalnum", (PyCFunction)stringlib_isalnum, METH_NOARGS,
_Py_isalnum__doc__},
{"isalpha", (PyCFunction)stringlib_isalpha, METH_NOARGS,
@@ -2838,39 +3036,51 @@ bytearray_methods[] = {
_Py_istitle__doc__},
{"isupper", (PyCFunction)stringlib_isupper, METH_NOARGS,
_Py_isupper__doc__},
- {"join", (PyCFunction)bytearray_join, METH_O, join_doc},
+ BYTEARRAY_JOIN_METHODDEF
{"ljust", (PyCFunction)stringlib_ljust, METH_VARARGS, ljust__doc__},
{"lower", (PyCFunction)stringlib_lower, METH_NOARGS, _Py_lower__doc__},
- {"lstrip", (PyCFunction)bytearray_lstrip, METH_VARARGS, lstrip__doc__},
- {"maketrans", (PyCFunction)bytearray_maketrans, METH_VARARGS|METH_STATIC,
- _Py_maketrans__doc__},
- {"partition", (PyCFunction)bytearray_partition, METH_O, partition__doc__},
- {"pop", (PyCFunction)bytearray_pop, METH_VARARGS, pop__doc__},
- {"remove", (PyCFunction)bytearray_remove, METH_O, remove__doc__},
- {"replace", (PyCFunction)bytearray_replace, METH_VARARGS, replace__doc__},
- {"reverse", (PyCFunction)bytearray_reverse, METH_NOARGS, reverse__doc__},
+ BYTEARRAY_LSTRIP_METHODDEF
+ BYTEARRAY_MAKETRANS_METHODDEF
+ BYTEARRAY_PARTITION_METHODDEF
+ BYTEARRAY_POP_METHODDEF
+ BYTEARRAY_REMOVE_METHODDEF
+ BYTEARRAY_REPLACE_METHODDEF
+ BYTEARRAY_REVERSE_METHODDEF
{"rfind", (PyCFunction)bytearray_rfind, METH_VARARGS, rfind__doc__},
{"rindex", (PyCFunction)bytearray_rindex, METH_VARARGS, rindex__doc__},
{"rjust", (PyCFunction)stringlib_rjust, METH_VARARGS, rjust__doc__},
- {"rpartition", (PyCFunction)bytearray_rpartition, METH_O, rpartition__doc__},
- {"rsplit", (PyCFunction)bytearray_rsplit, METH_VARARGS | METH_KEYWORDS, rsplit__doc__},
- {"rstrip", (PyCFunction)bytearray_rstrip, METH_VARARGS, rstrip__doc__},
- {"split", (PyCFunction)bytearray_split, METH_VARARGS | METH_KEYWORDS, split__doc__},
- {"splitlines", (PyCFunction)bytearray_splitlines,
- METH_VARARGS | METH_KEYWORDS, splitlines__doc__},
+ BYTEARRAY_RPARTITION_METHODDEF
+ BYTEARRAY_RSPLIT_METHODDEF
+ BYTEARRAY_RSTRIP_METHODDEF
+ BYTEARRAY_SPLIT_METHODDEF
+ BYTEARRAY_SPLITLINES_METHODDEF
{"startswith", (PyCFunction)bytearray_startswith, METH_VARARGS ,
startswith__doc__},
- {"strip", (PyCFunction)bytearray_strip, METH_VARARGS, strip__doc__},
+ BYTEARRAY_STRIP_METHODDEF
{"swapcase", (PyCFunction)stringlib_swapcase, METH_NOARGS,
_Py_swapcase__doc__},
{"title", (PyCFunction)stringlib_title, METH_NOARGS, _Py_title__doc__},
- {"translate", (PyCFunction)bytearray_translate, METH_VARARGS,
- translate__doc__},
+ BYTEARRAY_TRANSLATE_METHODDEF
{"upper", (PyCFunction)stringlib_upper, METH_NOARGS, _Py_upper__doc__},
{"zfill", (PyCFunction)stringlib_zfill, METH_VARARGS, zfill__doc__},
{NULL}
};
+static PyObject *
+bytearray_mod(PyObject *v, PyObject *w)
+{
+ if (!PyByteArray_Check(v))
+ Py_RETURN_NOTIMPLEMENTED;
+ return bytearray_format((PyByteArrayObject *)v, w);
+}
+
+static PyNumberMethods bytearray_as_number = {
+ 0, /*nb_add*/
+ 0, /*nb_subtract*/
+ 0, /*nb_multiply*/
+ bytearray_mod, /*nb_remainder*/
+};
+
PyDoc_STRVAR(bytearray_doc,
"bytearray(iterable_of_ints) -> bytearray\n\
bytearray(string, encoding[, errors]) -> bytearray\n\
@@ -2878,7 +3088,7 @@ bytearray(bytes_or_buffer) -> mutable copy of bytes_or_buffer\n\
bytearray(int) -> bytes array of size given by the parameter initialized with null bytes\n\
bytearray() -> empty bytes array\n\
\n\
-Construct an mutable bytearray object from:\n\
+Construct a mutable bytearray object from:\n\
- an iterable yielding integers in range(256)\n\
- a text string encoded using the specified encoding\n\
- a bytes or a buffer object\n\
@@ -2899,7 +3109,7 @@ PyTypeObject PyByteArray_Type = {
0, /* tp_setattr */
0, /* tp_reserved */
(reprfunc)bytearray_repr, /* tp_repr */
- 0, /* tp_as_number */
+ &bytearray_as_number, /* tp_as_number */
&bytearray_as_sequence, /* tp_as_sequence */
&bytearray_as_mapping, /* tp_as_mapping */
0, /* tp_hash */
@@ -2973,8 +3183,8 @@ bytearrayiter_next(bytesiterobject *it)
return item;
}
- Py_DECREF(seq);
it->it_seq = NULL;
+ Py_DECREF(seq);
return NULL;
}
@@ -3026,7 +3236,7 @@ static PyMethodDef bytearrayiter_methods[] = {
{"__length_hint__", (PyCFunction)bytearrayiter_length_hint, METH_NOARGS,
length_hint_doc},
{"__reduce__", (PyCFunction)bytearrayiter_reduce, METH_NOARGS,
- reduce_doc},
+ bytearray_reduce__doc__},
{"__setstate__", (PyCFunction)bytearrayiter_setstate, METH_O,
setstate_doc},
{NULL, NULL} /* sentinel */
diff --git a/Objects/bytes_methods.c b/Objects/bytes_methods.c
index 9ff7ace0dd..a29991584a 100644
--- a/Objects/bytes_methods.c
+++ b/Objects/bytes_methods.c
@@ -364,39 +364,26 @@ in frm is mapped to the byte at the same position in to.\n\
The bytes objects frm and to must be of the same length.");
PyObject *
-_Py_bytes_maketrans(PyObject *args)
+_Py_bytes_maketrans(Py_buffer *frm, Py_buffer *to)
{
PyObject *res = NULL;
- Py_buffer bfrm = {NULL, NULL};
- Py_buffer bto = {NULL, NULL};
Py_ssize_t i;
char *p;
- bfrm.len = -1;
- bto.len = -1;
-
- if (!PyArg_ParseTuple(args, "y*y*:maketrans", &bfrm, &bto))
- return NULL;
- if (bfrm.len != bto.len) {
+ if (frm->len != to->len) {
PyErr_Format(PyExc_ValueError,
"maketrans arguments must have same length");
- goto done;
+ return NULL;
}
res = PyBytes_FromStringAndSize(NULL, 256);
- if (!res) {
- goto done;
- }
+ if (!res)
+ return NULL;
p = PyBytes_AS_STRING(res);
for (i = 0; i < 256; i++)
p[i] = (char) i;
- for (i = 0; i < bfrm.len; i++) {
- p[((unsigned char *)bfrm.buf)[i]] = ((char *)bto.buf)[i];
+ for (i = 0; i < frm->len; i++) {
+ p[((unsigned char *)frm->buf)[i]] = ((char *)to->buf)[i];
}
-done:
- if (bfrm.obj != NULL)
- PyBuffer_Release(&bfrm);
- if (bfrm.obj != NULL)
- PyBuffer_Release(&bto);
return res;
}
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index 27f4069472..c2aa65c3bc 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -5,8 +5,16 @@
#include "Python.h"
#include "bytes_methods.h"
+#include "pystrhex.h"
#include <stddef.h>
+/*[clinic input]
+class bytes "PyBytesObject*" "&PyBytes_Type"
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=1a1d9102afc1b00c]*/
+
+#include "clinic/bytesobject.c.h"
+
#ifdef COUNT_ALLOCS
Py_ssize_t null_strings, one_strings;
#endif
@@ -26,7 +34,7 @@ static PyBytesObject *nullstring;
For PyBytes_FromString(), the parameter `str' points to a null-terminated
string containing exactly `size' bytes.
- For PyBytes_FromStringAndSize(), the parameter the parameter `str' is
+ For PyBytes_FromStringAndSize(), the parameter `str' is
either NULL or else points to a string containing at least `size' bytes.
For PyBytes_FromStringAndSize(), the string in the `str' parameter does
not have to be null-terminated. (Therefore it is safe to construct a
@@ -44,15 +52,12 @@ static PyBytesObject *nullstring;
PyBytes_FromStringAndSize()) or the length of the string in the `str'
parameter (for PyBytes_FromString()).
*/
-PyObject *
-PyBytes_FromStringAndSize(const char *str, Py_ssize_t size)
+static PyObject *
+_PyBytes_FromSize(Py_ssize_t size, int use_calloc)
{
PyBytesObject *op;
- if (size < 0) {
- PyErr_SetString(PyExc_SystemError,
- "Negative size passed to PyBytes_FromStringAndSize");
- return NULL;
- }
+ assert(size >= 0);
+
if (size == 0 && (op = nullstring) != NULL) {
#ifdef COUNT_ALLOCS
null_strings++;
@@ -60,36 +65,60 @@ PyBytes_FromStringAndSize(const char *str, Py_ssize_t size)
Py_INCREF(op);
return (PyObject *)op;
}
- if (size == 1 && str != NULL &&
- (op = characters[*str & UCHAR_MAX]) != NULL)
- {
-#ifdef COUNT_ALLOCS
- one_strings++;
-#endif
- Py_INCREF(op);
- return (PyObject *)op;
- }
- if (size > PY_SSIZE_T_MAX - PyBytesObject_SIZE) {
+ if ((size_t)size > (size_t)PY_SSIZE_T_MAX - PyBytesObject_SIZE) {
PyErr_SetString(PyExc_OverflowError,
"byte string is too large");
return NULL;
}
/* Inline PyObject_NewVar */
- op = (PyBytesObject *)PyObject_MALLOC(PyBytesObject_SIZE + size);
+ if (use_calloc)
+ op = (PyBytesObject *)PyObject_Calloc(1, PyBytesObject_SIZE + size);
+ else
+ op = (PyBytesObject *)PyObject_Malloc(PyBytesObject_SIZE + size);
if (op == NULL)
return PyErr_NoMemory();
(void)PyObject_INIT_VAR(op, &PyBytes_Type, size);
op->ob_shash = -1;
- if (str != NULL)
- Py_MEMCPY(op->ob_sval, str, size);
- op->ob_sval[size] = '\0';
- /* share short strings */
+ if (!use_calloc)
+ op->ob_sval[size] = '\0';
+ /* empty byte string singleton */
if (size == 0) {
nullstring = op;
Py_INCREF(op);
- } else if (size == 1 && str != NULL) {
+ }
+ return (PyObject *) op;
+}
+
+PyObject *
+PyBytes_FromStringAndSize(const char *str, Py_ssize_t size)
+{
+ PyBytesObject *op;
+ if (size < 0) {
+ PyErr_SetString(PyExc_SystemError,
+ "Negative size passed to PyBytes_FromStringAndSize");
+ return NULL;
+ }
+ if (size == 1 && str != NULL &&
+ (op = characters[*str & UCHAR_MAX]) != NULL)
+ {
+#ifdef COUNT_ALLOCS
+ one_strings++;
+#endif
+ Py_INCREF(op);
+ return (PyObject *)op;
+ }
+
+ op = (PyBytesObject *)_PyBytes_FromSize(size, 0);
+ if (op == NULL)
+ return NULL;
+ if (str == NULL)
+ return (PyObject *) op;
+
+ Py_MEMCPY(op->ob_sval, str, size);
+ /* share short strings */
+ if (size == 1) {
characters[*str & UCHAR_MAX] = op;
Py_INCREF(op);
}
@@ -347,6 +376,580 @@ PyBytes_FromFormat(const char *format, ...)
return ret;
}
+/* Helpers for formatstring */
+
+Py_LOCAL_INLINE(PyObject *)
+getnextarg(PyObject *args, Py_ssize_t arglen, Py_ssize_t *p_argidx)
+{
+ Py_ssize_t argidx = *p_argidx;
+ if (argidx < arglen) {
+ (*p_argidx)++;
+ if (arglen < 0)
+ return args;
+ else
+ return PyTuple_GetItem(args, argidx);
+ }
+ PyErr_SetString(PyExc_TypeError,
+ "not enough arguments for format string");
+ return NULL;
+}
+
+/* Format codes
+ * F_LJUST '-'
+ * F_SIGN '+'
+ * F_BLANK ' '
+ * F_ALT '#'
+ * F_ZERO '0'
+ */
+#define F_LJUST (1<<0)
+#define F_SIGN (1<<1)
+#define F_BLANK (1<<2)
+#define F_ALT (1<<3)
+#define F_ZERO (1<<4)
+
+/* Returns a new reference to a PyBytes object, or NULL on failure. */
+
+static PyObject *
+formatfloat(PyObject *v, int flags, int prec, int type)
+{
+ char *p;
+ PyObject *result;
+ double x;
+
+ x = PyFloat_AsDouble(v);
+ if (x == -1.0 && PyErr_Occurred()) {
+ PyErr_Format(PyExc_TypeError, "float argument required, "
+ "not %.200s", Py_TYPE(v)->tp_name);
+ return NULL;
+ }
+
+ if (prec < 0)
+ prec = 6;
+
+ p = PyOS_double_to_string(x, type, prec,
+ (flags & F_ALT) ? Py_DTSF_ALT : 0, NULL);
+
+ if (p == NULL)
+ return NULL;
+ result = PyBytes_FromStringAndSize(p, strlen(p));
+ PyMem_Free(p);
+ return result;
+}
+
+static PyObject *
+formatlong(PyObject *v, int flags, int prec, int type)
+{
+ PyObject *result, *iobj;
+ if (type == 'i')
+ type = 'd';
+ if (PyLong_Check(v))
+ return _PyUnicode_FormatLong(v, flags & F_ALT, prec, type);
+ if (PyNumber_Check(v)) {
+ /* make sure number is a type of integer for o, x, and X */
+ if (type == 'o' || type == 'x' || type == 'X')
+ iobj = PyNumber_Index(v);
+ else
+ iobj = PyNumber_Long(v);
+ if (iobj == NULL) {
+ if (!PyErr_ExceptionMatches(PyExc_TypeError))
+ return NULL;
+ }
+ else if (!PyLong_Check(iobj))
+ Py_CLEAR(iobj);
+ if (iobj != NULL) {
+ result = _PyUnicode_FormatLong(iobj, flags & F_ALT, prec, type);
+ Py_DECREF(iobj);
+ return result;
+ }
+ }
+ PyErr_Format(PyExc_TypeError,
+ "%%%c format: %s is required, not %.200s", type,
+ (type == 'o' || type == 'x' || type == 'X') ? "an integer"
+ : "a number",
+ Py_TYPE(v)->tp_name);
+ return NULL;
+}
+
+static int
+byte_converter(PyObject *arg, char *p)
+{
+ if (PyBytes_Check(arg) && PyBytes_Size(arg) == 1) {
+ *p = PyBytes_AS_STRING(arg)[0];
+ return 1;
+ }
+ else if (PyByteArray_Check(arg) && PyByteArray_Size(arg) == 1) {
+ *p = PyByteArray_AS_STRING(arg)[0];
+ return 1;
+ }
+ else {
+ PyObject *iobj;
+ long ival;
+ int overflow;
+ /* make sure number is a type of integer */
+ if (PyLong_Check(arg)) {
+ ival = PyLong_AsLongAndOverflow(arg, &overflow);
+ }
+ else {
+ iobj = PyNumber_Index(arg);
+ if (iobj == NULL) {
+ if (!PyErr_ExceptionMatches(PyExc_TypeError))
+ return 0;
+ goto onError;
+ }
+ ival = PyLong_AsLongAndOverflow(iobj, &overflow);
+ Py_DECREF(iobj);
+ }
+ if (!overflow && ival == -1 && PyErr_Occurred())
+ goto onError;
+ if (overflow || !(0 <= ival && ival <= 255)) {
+ PyErr_SetString(PyExc_OverflowError,
+ "%c arg not in range(256)");
+ return 0;
+ }
+ *p = (char)ival;
+ return 1;
+ }
+ onError:
+ PyErr_SetString(PyExc_TypeError,
+ "%c requires an integer in range(256) or a single byte");
+ return 0;
+}
+
+static PyObject *
+format_obj(PyObject *v, const char **pbuf, Py_ssize_t *plen)
+{
+ PyObject *func, *result;
+ _Py_IDENTIFIER(__bytes__);
+ /* is it a bytes object? */
+ if (PyBytes_Check(v)) {
+ *pbuf = PyBytes_AS_STRING(v);
+ *plen = PyBytes_GET_SIZE(v);
+ Py_INCREF(v);
+ return v;
+ }
+ if (PyByteArray_Check(v)) {
+ *pbuf = PyByteArray_AS_STRING(v);
+ *plen = PyByteArray_GET_SIZE(v);
+ Py_INCREF(v);
+ return v;
+ }
+ /* does it support __bytes__? */
+ func = _PyObject_LookupSpecial(v, &PyId___bytes__);
+ if (func != NULL) {
+ result = PyObject_CallFunctionObjArgs(func, NULL);
+ Py_DECREF(func);
+ if (result == NULL)
+ return NULL;
+ if (!PyBytes_Check(result)) {
+ PyErr_Format(PyExc_TypeError,
+ "__bytes__ returned non-bytes (type %.200s)",
+ Py_TYPE(result)->tp_name);
+ Py_DECREF(result);
+ return NULL;
+ }
+ *pbuf = PyBytes_AS_STRING(result);
+ *plen = PyBytes_GET_SIZE(result);
+ return result;
+ }
+ PyErr_Format(PyExc_TypeError,
+ "%%b requires bytes, or an object that implements __bytes__, not '%.100s'",
+ Py_TYPE(v)->tp_name);
+ return NULL;
+}
+
+/* fmt%(v1,v2,...) is roughly equivalent to sprintf(fmt, v1, v2, ...)
+
+ FORMATBUFLEN is the length of the buffer in which the ints &
+ chars are formatted. XXX This is a magic number. Each formatting
+ routine does bounds checking to ensure no overflow, but a better
+ solution may be to malloc a buffer of appropriate size for each
+ format. For now, the current solution is sufficient.
+*/
+#define FORMATBUFLEN (size_t)120
+
+PyObject *
+_PyBytes_Format(PyObject *format, PyObject *args)
+{
+ char *fmt, *res;
+ Py_ssize_t arglen, argidx;
+ Py_ssize_t reslen, rescnt, fmtcnt;
+ int args_owned = 0;
+ PyObject *result;
+ PyObject *dict = NULL;
+ if (format == NULL || !PyBytes_Check(format) || args == NULL) {
+ PyErr_BadInternalCall();
+ return NULL;
+ }
+ fmt = PyBytes_AS_STRING(format);
+ fmtcnt = PyBytes_GET_SIZE(format);
+ reslen = rescnt = fmtcnt + 100;
+ result = PyBytes_FromStringAndSize((char *)NULL, reslen);
+ if (result == NULL)
+ return NULL;
+ res = PyBytes_AsString(result);
+ if (PyTuple_Check(args)) {
+ arglen = PyTuple_GET_SIZE(args);
+ argidx = 0;
+ }
+ else {
+ arglen = -1;
+ argidx = -2;
+ }
+ if (Py_TYPE(args)->tp_as_mapping && Py_TYPE(args)->tp_as_mapping->mp_subscript &&
+ !PyTuple_Check(args) && !PyBytes_Check(args) && !PyUnicode_Check(args) &&
+ !PyByteArray_Check(args)) {
+ dict = args;
+ }
+ while (--fmtcnt >= 0) {
+ if (*fmt != '%') {
+ if (--rescnt < 0) {
+ rescnt = fmtcnt + 100;
+ reslen += rescnt;
+ if (_PyBytes_Resize(&result, reslen))
+ return NULL;
+ res = PyBytes_AS_STRING(result)
+ + reslen - rescnt;
+ --rescnt;
+ }
+ *res++ = *fmt++;
+ }
+ else {
+ /* Got a format specifier */
+ int flags = 0;
+ Py_ssize_t width = -1;
+ int prec = -1;
+ int c = '\0';
+ int fill;
+ PyObject *v = NULL;
+ PyObject *temp = NULL;
+ const char *pbuf = NULL;
+ int sign;
+ Py_ssize_t len = 0;
+ char onechar; /* For byte_converter() */
+
+ fmt++;
+ if (*fmt == '(') {
+ char *keystart;
+ Py_ssize_t keylen;
+ PyObject *key;
+ int pcount = 1;
+
+ if (dict == NULL) {
+ PyErr_SetString(PyExc_TypeError,
+ "format requires a mapping");
+ goto error;
+ }
+ ++fmt;
+ --fmtcnt;
+ keystart = fmt;
+ /* Skip over balanced parentheses */
+ while (pcount > 0 && --fmtcnt >= 0) {
+ if (*fmt == ')')
+ --pcount;
+ else if (*fmt == '(')
+ ++pcount;
+ fmt++;
+ }
+ keylen = fmt - keystart - 1;
+ if (fmtcnt < 0 || pcount > 0) {
+ PyErr_SetString(PyExc_ValueError,
+ "incomplete format key");
+ goto error;
+ }
+ key = PyBytes_FromStringAndSize(keystart,
+ keylen);
+ if (key == NULL)
+ goto error;
+ if (args_owned) {
+ Py_DECREF(args);
+ args_owned = 0;
+ }
+ args = PyObject_GetItem(dict, key);
+ Py_DECREF(key);
+ if (args == NULL) {
+ goto error;
+ }
+ args_owned = 1;
+ arglen = -1;
+ argidx = -2;
+ }
+ while (--fmtcnt >= 0) {
+ switch (c = *fmt++) {
+ case '-': flags |= F_LJUST; continue;
+ case '+': flags |= F_SIGN; continue;
+ case ' ': flags |= F_BLANK; continue;
+ case '#': flags |= F_ALT; continue;
+ case '0': flags |= F_ZERO; continue;
+ }
+ break;
+ }
+ if (c == '*') {
+ v = getnextarg(args, arglen, &argidx);
+ if (v == NULL)
+ goto error;
+ if (!PyLong_Check(v)) {
+ PyErr_SetString(PyExc_TypeError,
+ "* wants int");
+ goto error;
+ }
+ width = PyLong_AsSsize_t(v);
+ if (width == -1 && PyErr_Occurred())
+ goto error;
+ if (width < 0) {
+ flags |= F_LJUST;
+ width = -width;
+ }
+ if (--fmtcnt >= 0)
+ c = *fmt++;
+ }
+ else if (c >= 0 && isdigit(c)) {
+ width = c - '0';
+ while (--fmtcnt >= 0) {
+ c = Py_CHARMASK(*fmt++);
+ if (!isdigit(c))
+ break;
+ if (width > (PY_SSIZE_T_MAX - ((int)c - '0')) / 10) {
+ PyErr_SetString(
+ PyExc_ValueError,
+ "width too big");
+ goto error;
+ }
+ width = width*10 + (c - '0');
+ }
+ }
+ if (c == '.') {
+ prec = 0;
+ if (--fmtcnt >= 0)
+ c = *fmt++;
+ if (c == '*') {
+ v = getnextarg(args, arglen, &argidx);
+ if (v == NULL)
+ goto error;
+ if (!PyLong_Check(v)) {
+ PyErr_SetString(
+ PyExc_TypeError,
+ "* wants int");
+ goto error;
+ }
+ prec = _PyLong_AsInt(v);
+ if (prec == -1 && PyErr_Occurred())
+ goto error;
+ if (prec < 0)
+ prec = 0;
+ if (--fmtcnt >= 0)
+ c = *fmt++;
+ }
+ else if (c >= 0 && isdigit(c)) {
+ prec = c - '0';
+ while (--fmtcnt >= 0) {
+ c = Py_CHARMASK(*fmt++);
+ if (!isdigit(c))
+ break;
+ if (prec > (INT_MAX - ((int)c - '0')) / 10) {
+ PyErr_SetString(
+ PyExc_ValueError,
+ "prec too big");
+ goto error;
+ }
+ prec = prec*10 + (c - '0');
+ }
+ }
+ } /* prec */
+ if (fmtcnt >= 0) {
+ if (c == 'h' || c == 'l' || c == 'L') {
+ if (--fmtcnt >= 0)
+ c = *fmt++;
+ }
+ }
+ if (fmtcnt < 0) {
+ PyErr_SetString(PyExc_ValueError,
+ "incomplete format");
+ goto error;
+ }
+ if (c != '%') {
+ v = getnextarg(args, arglen, &argidx);
+ if (v == NULL)
+ goto error;
+ }
+ sign = 0;
+ fill = ' ';
+ switch (c) {
+ case '%':
+ pbuf = "%";
+ len = 1;
+ break;
+ case 'r':
+ // %r is only for 2/3 code; 3 only code should use %a
+ case 'a':
+ temp = PyObject_ASCII(v);
+ if (temp == NULL)
+ goto error;
+ assert(PyUnicode_IS_ASCII(temp));
+ pbuf = (const char *)PyUnicode_1BYTE_DATA(temp);
+ len = PyUnicode_GET_LENGTH(temp);
+ if (prec >= 0 && len > prec)
+ len = prec;
+ break;
+ case 's':
+ // %s is only for 2/3 code; 3 only code should use %b
+ case 'b':
+ temp = format_obj(v, &pbuf, &len);
+ if (temp == NULL)
+ goto error;
+ if (prec >= 0 && len > prec)
+ len = prec;
+ break;
+ case 'i':
+ case 'd':
+ case 'u':
+ case 'o':
+ case 'x':
+ case 'X':
+ temp = formatlong(v, flags, prec, c);
+ if (!temp)
+ goto error;
+ assert(PyUnicode_IS_ASCII(temp));
+ pbuf = (const char *)PyUnicode_1BYTE_DATA(temp);
+ len = PyUnicode_GET_LENGTH(temp);
+ sign = 1;
+ if (flags & F_ZERO)
+ fill = '0';
+ break;
+ case 'e':
+ case 'E':
+ case 'f':
+ case 'F':
+ case 'g':
+ case 'G':
+ temp = formatfloat(v, flags, prec, c);
+ if (temp == NULL)
+ goto error;
+ pbuf = PyBytes_AS_STRING(temp);
+ len = PyBytes_GET_SIZE(temp);
+ sign = 1;
+ if (flags & F_ZERO)
+ fill = '0';
+ break;
+ case 'c':
+ pbuf = &onechar;
+ len = byte_converter(v, &onechar);
+ if (!len)
+ goto error;
+ break;
+ default:
+ PyErr_Format(PyExc_ValueError,
+ "unsupported format character '%c' (0x%x) "
+ "at index %zd",
+ c, c,
+ (Py_ssize_t)(fmt - 1 -
+ PyBytes_AsString(format)));
+ goto error;
+ }
+ if (sign) {
+ if (*pbuf == '-' || *pbuf == '+') {
+ sign = *pbuf++;
+ len--;
+ }
+ else if (flags & F_SIGN)
+ sign = '+';
+ else if (flags & F_BLANK)
+ sign = ' ';
+ else
+ sign = 0;
+ }
+ if (width < len)
+ width = len;
+ if (rescnt - (sign != 0) < width) {
+ reslen -= rescnt;
+ rescnt = width + fmtcnt + 100;
+ reslen += rescnt;
+ if (reslen < 0) {
+ Py_DECREF(result);
+ Py_XDECREF(temp);
+ return PyErr_NoMemory();
+ }
+ if (_PyBytes_Resize(&result, reslen)) {
+ Py_XDECREF(temp);
+ return NULL;
+ }
+ res = PyBytes_AS_STRING(result)
+ + reslen - rescnt;
+ }
+ if (sign) {
+ if (fill != ' ')
+ *res++ = sign;
+ rescnt--;
+ if (width > len)
+ width--;
+ }
+ if ((flags & F_ALT) && (c == 'x' || c == 'X')) {
+ assert(pbuf[0] == '0');
+ assert(pbuf[1] == c);
+ if (fill != ' ') {
+ *res++ = *pbuf++;
+ *res++ = *pbuf++;
+ }
+ rescnt -= 2;
+ width -= 2;
+ if (width < 0)
+ width = 0;
+ len -= 2;
+ }
+ if (width > len && !(flags & F_LJUST)) {
+ do {
+ --rescnt;
+ *res++ = fill;
+ } while (--width > len);
+ }
+ if (fill == ' ') {
+ if (sign)
+ *res++ = sign;
+ if ((flags & F_ALT) &&
+ (c == 'x' || c == 'X')) {
+ assert(pbuf[0] == '0');
+ assert(pbuf[1] == c);
+ *res++ = *pbuf++;
+ *res++ = *pbuf++;
+ }
+ }
+ Py_MEMCPY(res, pbuf, len);
+ res += len;
+ rescnt -= len;
+ while (--width >= len) {
+ --rescnt;
+ *res++ = ' ';
+ }
+ if (dict && (argidx < arglen) && c != '%') {
+ PyErr_SetString(PyExc_TypeError,
+ "not all arguments converted during bytes formatting");
+ Py_XDECREF(temp);
+ goto error;
+ }
+ Py_XDECREF(temp);
+ } /* '%' */
+ } /* until end */
+ if (argidx < arglen && !dict) {
+ PyErr_SetString(PyExc_TypeError,
+ "not all arguments converted during bytes formatting");
+ goto error;
+ }
+ if (args_owned) {
+ Py_DECREF(args);
+ }
+ if (_PyBytes_Resize(&result, reslen - rescnt))
+ return NULL;
+ return result;
+
+ error:
+ Py_DECREF(result);
+ if (args_owned) {
+ Py_DECREF(args);
+ }
+ return NULL;
+}
+
+/* =-= */
+
static void
bytes_dealloc(PyObject *op)
{
@@ -540,8 +1143,8 @@ PyBytes_AsStringAndSize(PyObject *obj,
if (len != NULL)
*len = PyBytes_GET_SIZE(obj);
else if (strlen(*s) != (size_t)PyBytes_GET_SIZE(obj)) {
- PyErr_SetString(PyExc_TypeError,
- "expected bytes with no null");
+ PyErr_SetString(PyExc_ValueError,
+ "embedded null byte");
return -1;
}
return 0;
@@ -833,6 +1436,20 @@ bytes_richcompare(PyBytesObject *a, PyBytesObject *b, int op)
"Comparison between bytes and string", 1))
return NULL;
}
+ else {
+ rc = PyObject_IsInstance((PyObject*)a,
+ (PyObject*)&PyLong_Type);
+ if (!rc)
+ rc = PyObject_IsInstance((PyObject*)b,
+ (PyObject*)&PyLong_Type);
+ if (rc < 0)
+ return NULL;
+ if (rc) {
+ if (PyErr_WarnEx(PyExc_BytesWarning,
+ "Comparison between bytes and int", 1))
+ return NULL;
+ }
+ }
}
result = Py_NotImplemented;
}
@@ -957,7 +1574,7 @@ bytes_subscript(PyBytesObject* self, PyObject* item)
}
else {
PyErr_Format(PyExc_TypeError,
- "byte indices must be integers, not %.200s",
+ "byte indices must be integers or slices, not %.200s",
Py_TYPE(item)->tp_name);
return NULL;
}
@@ -997,37 +1614,34 @@ static PyBufferProcs bytes_as_buffer = {
#define RIGHTSTRIP 1
#define BOTHSTRIP 2
-/* Arrays indexed by above */
-static const char *stripformat[] = {"|O:lstrip", "|O:rstrip", "|O:strip"};
+/*[clinic input]
+bytes.split
-#define STRIPNAME(i) (stripformat[i]+3)
+ sep: object = None
+ The delimiter according which to split the bytes.
+ None (the default value) means split on ASCII whitespace characters
+ (space, tab, return, newline, formfeed, vertical tab).
+ maxsplit: Py_ssize_t = -1
+ Maximum number of splits to do.
+ -1 (the default value) means no limit.
-PyDoc_STRVAR(split__doc__,
-"B.split(sep=None, maxsplit=-1) -> list of bytes\n\
-\n\
-Return a list of the sections in B, using sep as the delimiter.\n\
-If sep is not specified or is None, B is split on ASCII whitespace\n\
-characters (space, tab, return, newline, formfeed, vertical tab).\n\
-If maxsplit is given, at most maxsplit splits are done.");
+Return a list of the sections in the bytes, using sep as the delimiter.
+[clinic start generated code]*/
static PyObject *
-bytes_split(PyBytesObject *self, PyObject *args, PyObject *kwds)
+bytes_split_impl(PyBytesObject*self, PyObject *sep, Py_ssize_t maxsplit)
+/*[clinic end generated code: output=8bde44dacb36ef2e input=8b809b39074abbfa]*/
{
- static char *kwlist[] = {"sep", "maxsplit", 0};
Py_ssize_t len = PyBytes_GET_SIZE(self), n;
- Py_ssize_t maxsplit = -1;
const char *s = PyBytes_AS_STRING(self), *sub;
Py_buffer vsub;
- PyObject *list, *subobj = Py_None;
+ PyObject *list;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|On:split",
- kwlist, &subobj, &maxsplit))
- return NULL;
if (maxsplit < 0)
maxsplit = PY_SSIZE_T_MAX;
- if (subobj == Py_None)
+ if (sep == Py_None)
return stringlib_split_whitespace((PyObject*) self, s, len, maxsplit);
- if (PyObject_GetBuffer(subobj, &vsub, PyBUF_SIMPLE) != 0)
+ if (PyObject_GetBuffer(sep, &vsub, PyBUF_SIMPLE) != 0)
return NULL;
sub = vsub.buf;
n = vsub.len;
@@ -1037,85 +1651,84 @@ bytes_split(PyBytesObject *self, PyObject *args, PyObject *kwds)
return list;
}
-PyDoc_STRVAR(partition__doc__,
-"B.partition(sep) -> (head, sep, tail)\n\
-\n\
-Search for the separator sep in B, and return the part before it,\n\
-the separator itself, and the part after it. If the separator is not\n\
-found, returns B and two empty bytes objects.");
+/*[clinic input]
+bytes.partition
-static PyObject *
-bytes_partition(PyBytesObject *self, PyObject *sep_obj)
-{
- Py_buffer sep = {NULL, NULL};
- PyObject *res;
+ self: self(type="PyBytesObject *")
+ sep: Py_buffer
+ /
- if (PyObject_GetBuffer(sep_obj, &sep, PyBUF_SIMPLE) != 0)
- return NULL;
+Partition the bytes into three parts using the given separator.
+
+This will search for the separator sep in the bytes. If the separator is found,
+returns a 3-tuple containing the part before the separator, the separator
+itself, and the part after it.
- res = stringlib_partition(
+If the separator is not found, returns a 3-tuple containing the original bytes
+object and two empty bytes objects.
+[clinic start generated code]*/
+
+static PyObject *
+bytes_partition_impl(PyBytesObject *self, Py_buffer *sep)
+/*[clinic end generated code: output=f532b392a17ff695 input=bc855dc63ca949de]*/
+{
+ return stringlib_partition(
(PyObject*) self,
PyBytes_AS_STRING(self), PyBytes_GET_SIZE(self),
- sep_obj, sep.buf, sep.len
+ sep->obj, (const char *)sep->buf, sep->len
);
- PyBuffer_Release(&sep);
- return res;
}
-PyDoc_STRVAR(rpartition__doc__,
-"B.rpartition(sep) -> (head, sep, tail)\n\
-\n\
-Search for the separator sep in B, starting at the end of B,\n\
-and return the part before it, the separator itself, and the\n\
-part after it. If the separator is not found, returns two empty\n\
-bytes objects and B.");
+/*[clinic input]
+bytes.rpartition
-static PyObject *
-bytes_rpartition(PyBytesObject *self, PyObject *sep_obj)
-{
- Py_buffer sep = {NULL, NULL};
- PyObject *res;
+ self: self(type="PyBytesObject *")
+ sep: Py_buffer
+ /
- if (PyObject_GetBuffer(sep_obj, &sep, PyBUF_SIMPLE) != 0)
- return NULL;
+Partition the bytes into three parts using the given separator.
+
+This will search for the separator sep in the bytes, starting and the end. If
+the separator is found, returns a 3-tuple containing the part before the
+separator, the separator itself, and the part after it.
- res = stringlib_rpartition(
+If the separator is not found, returns a 3-tuple containing two empty bytes
+objects and the original bytes object.
+[clinic start generated code]*/
+
+static PyObject *
+bytes_rpartition_impl(PyBytesObject *self, Py_buffer *sep)
+/*[clinic end generated code: output=191b114cbb028e50 input=6588fff262a9170e]*/
+{
+ return stringlib_rpartition(
(PyObject*) self,
PyBytes_AS_STRING(self), PyBytes_GET_SIZE(self),
- sep_obj, sep.buf, sep.len
+ sep->obj, (const char *)sep->buf, sep->len
);
- PyBuffer_Release(&sep);
- return res;
}
-PyDoc_STRVAR(rsplit__doc__,
-"B.rsplit(sep=None, maxsplit=-1) -> list of bytes\n\
-\n\
-Return a list of the sections in B, using sep as the delimiter,\n\
-starting at the end of B and working to the front.\n\
-If sep is not given, B is split on ASCII whitespace characters\n\
-(space, tab, return, newline, formfeed, vertical tab).\n\
-If maxsplit is given, at most maxsplit splits are done.");
+/*[clinic input]
+bytes.rsplit = bytes.split
+Return a list of the sections in the bytes, using sep as the delimiter.
+
+Splitting is done starting at the end of the bytes and working to the front.
+[clinic start generated code]*/
static PyObject *
-bytes_rsplit(PyBytesObject *self, PyObject *args, PyObject *kwds)
+bytes_rsplit_impl(PyBytesObject*self, PyObject *sep, Py_ssize_t maxsplit)
+/*[clinic end generated code: output=0b6570b977911d88 input=0f86c9f28f7d7b7b]*/
{
- static char *kwlist[] = {"sep", "maxsplit", 0};
Py_ssize_t len = PyBytes_GET_SIZE(self), n;
- Py_ssize_t maxsplit = -1;
const char *s = PyBytes_AS_STRING(self), *sub;
Py_buffer vsub;
- PyObject *list, *subobj = Py_None;
+ PyObject *list;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|On:rsplit",
- kwlist, &subobj, &maxsplit))
- return NULL;
if (maxsplit < 0)
maxsplit = PY_SSIZE_T_MAX;
- if (subobj == Py_None)
+ if (sep == Py_None)
return stringlib_rsplit_whitespace((PyObject*) self, s, len, maxsplit);
- if (PyObject_GetBuffer(subobj, &vsub, PyBUF_SIMPLE) != 0)
+ if (PyObject_GetBuffer(sep, &vsub, PyBUF_SIMPLE) != 0)
return NULL;
sub = vsub.buf;
n = vsub.len;
@@ -1126,16 +1739,26 @@ bytes_rsplit(PyBytesObject *self, PyObject *args, PyObject *kwds)
}
-PyDoc_STRVAR(join__doc__,
-"B.join(iterable_of_bytes) -> bytes\n\
-\n\
-Concatenate any number of bytes objects, with B in between each pair.\n\
-Example: b'.'.join([b'ab', b'pq', b'rs']) -> b'ab.pq.rs'.");
+/*[clinic input]
+bytes.join
+
+ iterable_of_bytes: object
+ /
+
+Concatenate any number of bytes objects.
+
+The bytes whose method is called is inserted in between each pair.
+
+The result is returned as a new bytes object.
+
+Example: b'.'.join([b'ab', b'pq', b'rs']) -> b'ab.pq.rs'.
+[clinic start generated code]*/
static PyObject *
-bytes_join(PyObject *self, PyObject *iterable)
+bytes_join(PyBytesObject*self, PyObject *iterable_of_bytes)
+/*[clinic end generated code: output=634aff14764ff997 input=7fe377b95bd549d2]*/
{
- return stringlib_bytes_join(self, iterable);
+ return stringlib_bytes_join((PyObject*)self, iterable_of_bytes);
}
PyObject *
@@ -1143,7 +1766,7 @@ _PyBytes_Join(PyObject *sep, PyObject *x)
{
assert(sep != NULL && PyBytes_Check(sep));
assert(x != NULL);
- return bytes_join(sep, x);
+ return bytes_join((PyBytesObject*)sep, x);
}
/* helper macro to fixup start/end slice values */
@@ -1168,7 +1791,7 @@ bytes_find_internal(PyBytesObject *self, PyObject *args, int dir)
char byte;
Py_buffer subbuf;
const char *sub;
- Py_ssize_t sub_len;
+ Py_ssize_t len, sub_len;
Py_ssize_t start=0, end=PY_SSIZE_T_MAX;
Py_ssize_t res;
@@ -1187,15 +1810,34 @@ bytes_find_internal(PyBytesObject *self, PyObject *args, int dir)
sub = &byte;
sub_len = 1;
}
+ len = PyBytes_GET_SIZE(self);
- if (dir > 0)
- res = stringlib_find_slice(
- PyBytes_AS_STRING(self), PyBytes_GET_SIZE(self),
- sub, sub_len, start, end);
- else
- res = stringlib_rfind_slice(
- PyBytes_AS_STRING(self), PyBytes_GET_SIZE(self),
- sub, sub_len, start, end);
+ ADJUST_INDICES(start, end, len);
+ if (end - start < sub_len)
+ res = -1;
+ else if (sub_len == 1
+#ifndef HAVE_MEMRCHR
+ && dir > 0
+#endif
+ ) {
+ unsigned char needle = *sub;
+ int mode = (dir > 0) ? FAST_SEARCH : FAST_RSEARCH;
+ res = stringlib_fastsearch_memchr_1char(
+ PyBytes_AS_STRING(self) + start, end - start,
+ needle, needle, mode);
+ if (res >= 0)
+ res += start;
+ }
+ else {
+ if (dir > 0)
+ res = stringlib_find_slice(
+ PyBytes_AS_STRING(self), len,
+ sub, sub_len, start, end);
+ else
+ res = stringlib_rfind_slice(
+ PyBytes_AS_STRING(self), len,
+ sub, sub_len, start, end);
+ }
if (subobj)
PyBuffer_Release(&subbuf);
@@ -1354,62 +1996,69 @@ do_strip(PyBytesObject *self, int striptype)
Py_LOCAL_INLINE(PyObject *)
-do_argstrip(PyBytesObject *self, int striptype, PyObject *args)
+do_argstrip(PyBytesObject *self, int striptype, PyObject *bytes)
{
- PyObject *sep = NULL;
-
- if (!PyArg_ParseTuple(args, stripformat[striptype], &sep))
- return NULL;
-
- if (sep != NULL && sep != Py_None) {
- return do_xstrip(self, striptype, sep);
+ if (bytes != NULL && bytes != Py_None) {
+ return do_xstrip(self, striptype, bytes);
}
return do_strip(self, striptype);
}
+/*[clinic input]
+bytes.strip
+
+ self: self(type="PyBytesObject *")
+ bytes: object = None
+ /
+
+Strip leading and trailing bytes contained in the argument.
+
+If the argument is omitted or None, strip leading and trailing ASCII whitespace.
+[clinic start generated code]*/
-PyDoc_STRVAR(strip__doc__,
-"B.strip([bytes]) -> bytes\n\
-\n\
-Strip leading and trailing bytes contained in the argument.\n\
-If the argument is omitted, strip leading and trailing ASCII whitespace.");
static PyObject *
-bytes_strip(PyBytesObject *self, PyObject *args)
+bytes_strip_impl(PyBytesObject *self, PyObject *bytes)
+/*[clinic end generated code: output=c7c228d3bd104a1b input=37daa5fad1395d95]*/
{
- if (PyTuple_GET_SIZE(args) == 0)
- return do_strip(self, BOTHSTRIP); /* Common case */
- else
- return do_argstrip(self, BOTHSTRIP, args);
+ return do_argstrip(self, BOTHSTRIP, bytes);
}
+/*[clinic input]
+bytes.lstrip
+
+ self: self(type="PyBytesObject *")
+ bytes: object = None
+ /
+
+Strip leading bytes contained in the argument.
+
+If the argument is omitted or None, strip leading ASCII whitespace.
+[clinic start generated code]*/
-PyDoc_STRVAR(lstrip__doc__,
-"B.lstrip([bytes]) -> bytes\n\
-\n\
-Strip leading bytes contained in the argument.\n\
-If the argument is omitted, strip leading ASCII whitespace.");
static PyObject *
-bytes_lstrip(PyBytesObject *self, PyObject *args)
+bytes_lstrip_impl(PyBytesObject *self, PyObject *bytes)
+/*[clinic end generated code: output=28602e586f524e82 input=88811b09dfbc2988]*/
{
- if (PyTuple_GET_SIZE(args) == 0)
- return do_strip(self, LEFTSTRIP); /* Common case */
- else
- return do_argstrip(self, LEFTSTRIP, args);
+ return do_argstrip(self, LEFTSTRIP, bytes);
}
+/*[clinic input]
+bytes.rstrip
+
+ self: self(type="PyBytesObject *")
+ bytes: object = None
+ /
+
+Strip trailing bytes contained in the argument.
+
+If the argument is omitted or None, strip trailing ASCII whitespace.
+[clinic start generated code]*/
-PyDoc_STRVAR(rstrip__doc__,
-"B.rstrip([bytes]) -> bytes\n\
-\n\
-Strip trailing bytes contained in the argument.\n\
-If the argument is omitted, strip trailing ASCII whitespace.");
static PyObject *
-bytes_rstrip(PyBytesObject *self, PyObject *args)
+bytes_rstrip_impl(PyBytesObject *self, PyObject *bytes)
+/*[clinic end generated code: output=547e3815c95447da input=8f93c9cd361f0140]*/
{
- if (PyTuple_GET_SIZE(args) == 0)
- return do_strip(self, RIGHTSTRIP); /* Common case */
- else
- return do_argstrip(self, RIGHTSTRIP, args);
+ return do_argstrip(self, RIGHTSTRIP, bytes);
}
@@ -1461,45 +2110,51 @@ bytes_count(PyBytesObject *self, PyObject *args)
}
-PyDoc_STRVAR(translate__doc__,
-"B.translate(table[, deletechars]) -> bytes\n\
-\n\
-Return a copy of B, where all characters occurring in the\n\
-optional argument deletechars are removed, and the remaining\n\
-characters have been mapped through the given translation\n\
-table, which must be a bytes object of length 256.");
+/*[clinic input]
+bytes.translate
+
+ self: self(type="PyBytesObject *")
+ table: object
+ Translation table, which must be a bytes object of length 256.
+ [
+ deletechars: object
+ ]
+ /
+
+Return a copy with each character mapped by the given translation table.
+
+All characters occurring in the optional argument deletechars are removed.
+The remaining characters are mapped through the given translation table.
+[clinic start generated code]*/
static PyObject *
-bytes_translate(PyBytesObject *self, PyObject *args)
+bytes_translate_impl(PyBytesObject *self, PyObject *table, int group_right_1,
+ PyObject *deletechars)
+/*[clinic end generated code: output=233df850eb50bf8d input=d8fa5519d7cc4be7]*/
{
char *input, *output;
Py_buffer table_view = {NULL, NULL};
Py_buffer del_table_view = {NULL, NULL};
- const char *table;
+ const char *table_chars;
Py_ssize_t i, c, changed = 0;
PyObject *input_obj = (PyObject*)self;
- const char *output_start, *del_table=NULL;
+ const char *output_start, *del_table_chars=NULL;
Py_ssize_t inlen, tablen, dellen = 0;
PyObject *result;
int trans_table[256];
- PyObject *tableobj, *delobj = NULL;
-
- if (!PyArg_UnpackTuple(args, "translate", 1, 2,
- &tableobj, &delobj))
- return NULL;
- if (PyBytes_Check(tableobj)) {
- table = PyBytes_AS_STRING(tableobj);
- tablen = PyBytes_GET_SIZE(tableobj);
+ if (PyBytes_Check(table)) {
+ table_chars = PyBytes_AS_STRING(table);
+ tablen = PyBytes_GET_SIZE(table);
}
- else if (tableobj == Py_None) {
- table = NULL;
+ else if (table == Py_None) {
+ table_chars = NULL;
tablen = 256;
}
else {
- if (PyObject_GetBuffer(tableobj, &table_view, PyBUF_SIMPLE) != 0)
+ if (PyObject_GetBuffer(table, &table_view, PyBUF_SIMPLE) != 0)
return NULL;
- table = table_view.buf;
+ table_chars = table_view.buf;
tablen = table_view.len;
}
@@ -1510,22 +2165,22 @@ bytes_translate(PyBytesObject *self, PyObject *args)
return NULL;
}
- if (delobj != NULL) {
- if (PyBytes_Check(delobj)) {
- del_table = PyBytes_AS_STRING(delobj);
- dellen = PyBytes_GET_SIZE(delobj);
+ if (deletechars != NULL) {
+ if (PyBytes_Check(deletechars)) {
+ del_table_chars = PyBytes_AS_STRING(deletechars);
+ dellen = PyBytes_GET_SIZE(deletechars);
}
else {
- if (PyObject_GetBuffer(delobj, &del_table_view, PyBUF_SIMPLE) != 0) {
+ if (PyObject_GetBuffer(deletechars, &del_table_view, PyBUF_SIMPLE) != 0) {
PyBuffer_Release(&table_view);
return NULL;
}
- del_table = del_table_view.buf;
+ del_table_chars = del_table_view.buf;
dellen = del_table_view.len;
}
}
else {
- del_table = NULL;
+ del_table_chars = NULL;
dellen = 0;
}
@@ -1539,11 +2194,11 @@ bytes_translate(PyBytesObject *self, PyObject *args)
output_start = output = PyBytes_AsString(result);
input = PyBytes_AS_STRING(input_obj);
- if (dellen == 0 && table != NULL) {
+ if (dellen == 0 && table_chars != NULL) {
/* If no deletions are required, use faster code */
for (i = inlen; --i >= 0; ) {
c = Py_CHARMASK(*input++);
- if (Py_CHARMASK((*output++ = table[c])) != c)
+ if (Py_CHARMASK((*output++ = table_chars[c])) != c)
changed = 1;
}
if (!changed && PyBytes_CheckExact(input_obj)) {
@@ -1556,17 +2211,17 @@ bytes_translate(PyBytesObject *self, PyObject *args)
return result;
}
- if (table == NULL) {
+ if (table_chars == NULL) {
for (i = 0; i < 256; i++)
trans_table[i] = Py_CHARMASK(i);
} else {
for (i = 0; i < 256; i++)
- trans_table[i] = Py_CHARMASK(table[i]);
+ trans_table[i] = Py_CHARMASK(table_chars[i]);
}
PyBuffer_Release(&table_view);
for (i = 0; i < dellen; i++)
- trans_table[(int) Py_CHARMASK(del_table[i])] = -1;
+ trans_table[(int) Py_CHARMASK(del_table_chars[i])] = -1;
PyBuffer_Release(&del_table_view);
for (i = inlen; --i >= 0; ) {
@@ -1588,10 +2243,28 @@ bytes_translate(PyBytesObject *self, PyObject *args)
}
+/*[clinic input]
+
+@staticmethod
+bytes.maketrans
+
+ frm: Py_buffer
+ to: Py_buffer
+ /
+
+Return a translation table useable for the bytes or bytearray translate method.
+
+The returned table will be one where each byte in frm is mapped to the byte at
+the same position in to.
+
+The bytes objects frm and to must be of the same length.
+[clinic start generated code]*/
+
static PyObject *
-bytes_maketrans(PyObject *null, PyObject *args)
+bytes_maketrans_impl(Py_buffer *frm, Py_buffer *to)
+/*[clinic end generated code: output=a36f6399d4b77f6f input=de7a8fc5632bb8f1]*/
{
- return _Py_bytes_maketrans(args);
+ return _Py_bytes_maketrans(frm, to);
}
/* find and count characters and substrings */
@@ -2086,31 +2759,31 @@ replace(PyBytesObject *self,
}
}
-PyDoc_STRVAR(replace__doc__,
-"B.replace(old, new[, count]) -> bytes\n\
-\n\
-Return a copy of B with all occurrences of subsection\n\
-old replaced by new. If the optional argument count is\n\
-given, only first count occurances are replaced.");
-static PyObject *
-bytes_replace(PyBytesObject *self, PyObject *args)
-{
- PyObject *res;
- Py_buffer old = {NULL, NULL};
- Py_buffer new = {NULL, NULL};
- Py_ssize_t count = -1;
+/*[clinic input]
+bytes.replace
- if (!PyArg_ParseTuple(args, "y*y*|n:replace", &old, &new, &count))
- return NULL;
+ old: Py_buffer
+ new: Py_buffer
+ count: Py_ssize_t = -1
+ Maximum number of occurrences to replace.
+ -1 (the default value) means replace all occurrences.
+ /
- res = (PyObject *)replace((PyBytesObject *) self,
- (const char *)old.buf, old.len,
- (const char *)new.buf, new.len, count);
+Return a copy with all occurrences of substring old replaced by new.
- PyBuffer_Release(&old);
- PyBuffer_Release(&new);
- return res;
+If the optional argument count is given, only the first count occurrences are
+replaced.
+[clinic start generated code]*/
+
+static PyObject *
+bytes_replace_impl(PyBytesObject*self, Py_buffer *old, Py_buffer *new,
+ Py_ssize_t count)
+/*[clinic end generated code: output=403dc9d7a83c5a1d input=b2fbbf0bf04de8e5]*/
+{
+ return (PyObject *)replace((PyBytesObject *) self,
+ (const char *)old->buf, old->len,
+ (const char *)new->buf, new->len, count);
}
/** End DALKE **/
@@ -2257,60 +2930,51 @@ bytes_endswith(PyBytesObject *self, PyObject *args)
}
-PyDoc_STRVAR(decode__doc__,
-"B.decode(encoding='utf-8', errors='strict') -> str\n\
-\n\
-Decode B using the codec registered for encoding. Default encoding\n\
-is 'utf-8'. errors may be given to set a different error\n\
-handling scheme. Default is 'strict' meaning that encoding errors raise\n\
-a UnicodeDecodeError. Other possible values are 'ignore' and 'replace'\n\
-as well as any other name registerd with codecs.register_error that is\n\
-able to handle UnicodeDecodeErrors.");
+/*[clinic input]
+bytes.decode
+
+ encoding: str(c_default="NULL") = 'utf-8'
+ The encoding with which to decode the bytes.
+ errors: str(c_default="NULL") = 'strict'
+ The error handling scheme to use for the handling of decoding errors.
+ The default is 'strict' meaning that decoding errors raise a
+ UnicodeDecodeError. Other possible values are 'ignore' and 'replace'
+ as well as any other name registered with codecs.register_error that
+ can handle UnicodeDecodeErrors.
+
+Decode the bytes using the codec registered for encoding.
+[clinic start generated code]*/
static PyObject *
-bytes_decode(PyObject *self, PyObject *args, PyObject *kwargs)
+bytes_decode_impl(PyBytesObject*self, const char *encoding,
+ const char *errors)
+/*[clinic end generated code: output=2d2016ff8e0bb176 input=958174769d2a40ca]*/
{
- const char *encoding = NULL;
- const char *errors = NULL;
- static char *kwlist[] = {"encoding", "errors", 0};
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|ss:decode", kwlist, &encoding, &errors))
- return NULL;
- return PyUnicode_FromEncodedObject(self, encoding, errors);
+ return PyUnicode_FromEncodedObject((PyObject*)self, encoding, errors);
}
-PyDoc_STRVAR(splitlines__doc__,
-"B.splitlines([keepends]) -> list of lines\n\
-\n\
-Return a list of the lines in B, breaking at line boundaries.\n\
-Line breaks are not included in the resulting list unless keepends\n\
-is given and true.");
+/*[clinic input]
+bytes.splitlines
-static PyObject*
-bytes_splitlines(PyObject *self, PyObject *args, PyObject *kwds)
-{
- static char *kwlist[] = {"keepends", 0};
- int keepends = 0;
+ keepends: int(c_default="0") = False
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|i:splitlines",
- kwlist, &keepends))
- return NULL;
+Return a list of the lines in the bytes, breaking at line boundaries.
+
+Line breaks are not included in the resulting list unless keepends is given and
+true.
+[clinic start generated code]*/
+static PyObject *
+bytes_splitlines_impl(PyBytesObject*self, int keepends)
+/*[clinic end generated code: output=995c3598f7833cad input=7f4aac67144f9944]*/
+{
return stringlib_splitlines(
(PyObject*) self, PyBytes_AS_STRING(self),
PyBytes_GET_SIZE(self), keepends
);
}
-
-PyDoc_STRVAR(fromhex_doc,
-"bytes.fromhex(string) -> bytes\n\
-\n\
-Create a bytes object from a string of hexadecimal numbers.\n\
-Spaces between two numbers are accepted.\n\
-Example: bytes.fromhex('B9 01EF') -> b'\\xb9\\x01\\xef'.");
-
static int
hex_digit_to_int(Py_UCS4 c)
{
@@ -2327,24 +2991,36 @@ hex_digit_to_int(Py_UCS4 c)
return -1;
}
+/*[clinic input]
+@classmethod
+bytes.fromhex
+
+ string: unicode
+ /
+
+Create a bytes object from a string of hexadecimal numbers.
+
+Spaces between two numbers are accepted.
+Example: bytes.fromhex('B9 01EF') -> b'\\xb9\\x01\\xef'.
+[clinic start generated code]*/
+
static PyObject *
-bytes_fromhex(PyObject *cls, PyObject *args)
+bytes_fromhex_impl(PyTypeObject *type, PyObject *string)
+/*[clinic end generated code: output=0973acc63661bb2e input=bf4d1c361670acd3]*/
{
- PyObject *newstring, *hexobj;
+ PyObject *newstring;
char *buf;
Py_ssize_t hexlen, byteslen, i, j;
int top, bot;
void *data;
unsigned int kind;
- if (!PyArg_ParseTuple(args, "U:fromhex", &hexobj))
- return NULL;
- assert(PyUnicode_Check(hexobj));
- if (PyUnicode_READY(hexobj))
+ assert(PyUnicode_Check(string));
+ if (PyUnicode_READY(string))
return NULL;
- kind = PyUnicode_KIND(hexobj);
- data = PyUnicode_DATA(hexobj);
- hexlen = PyUnicode_GET_LENGTH(hexobj);
+ kind = PyUnicode_KIND(string);
+ data = PyUnicode_DATA(string);
+ hexlen = PyUnicode_GET_LENGTH(string);
byteslen = hexlen/2; /* This overestimates if there are spaces */
newstring = PyBytes_FromStringAndSize(NULL, byteslen);
@@ -2376,6 +3052,20 @@ bytes_fromhex(PyObject *cls, PyObject *args)
return NULL;
}
+PyDoc_STRVAR(hex__doc__,
+"B.hex() -> string\n\
+\n\
+Create a string of hexadecimal numbers from a bytes object.\n\
+Example: b'\\xb9\\x01\\xef'.hex() -> 'b901ef'.");
+
+static PyObject *
+bytes_hex(PyBytesObject *self)
+{
+ char* argbuf = PyBytes_AS_STRING(self);
+ Py_ssize_t arglen = PyBytes_GET_SIZE(self);
+ return _Py_strhex(argbuf, arglen);
+}
+
static PyObject *
bytes_getnewargs(PyBytesObject *v)
{
@@ -2390,14 +3080,14 @@ bytes_methods[] = {
_Py_capitalize__doc__},
{"center", (PyCFunction)stringlib_center, METH_VARARGS, center__doc__},
{"count", (PyCFunction)bytes_count, METH_VARARGS, count__doc__},
- {"decode", (PyCFunction)bytes_decode, METH_VARARGS | METH_KEYWORDS, decode__doc__},
+ BYTES_DECODE_METHODDEF
{"endswith", (PyCFunction)bytes_endswith, METH_VARARGS,
endswith__doc__},
{"expandtabs", (PyCFunction)stringlib_expandtabs, METH_VARARGS | METH_KEYWORDS,
expandtabs__doc__},
{"find", (PyCFunction)bytes_find, METH_VARARGS, find__doc__},
- {"fromhex", (PyCFunction)bytes_fromhex, METH_VARARGS|METH_CLASS,
- fromhex_doc},
+ BYTES_FROMHEX_METHODDEF
+ {"hex", (PyCFunction)bytes_hex, METH_NOARGS, hex__doc__},
{"index", (PyCFunction)bytes_index, METH_VARARGS, index__doc__},
{"isalnum", (PyCFunction)stringlib_isalnum, METH_NOARGS,
_Py_isalnum__doc__},
@@ -2413,38 +3103,49 @@ bytes_methods[] = {
_Py_istitle__doc__},
{"isupper", (PyCFunction)stringlib_isupper, METH_NOARGS,
_Py_isupper__doc__},
- {"join", (PyCFunction)bytes_join, METH_O, join__doc__},
+ BYTES_JOIN_METHODDEF
{"ljust", (PyCFunction)stringlib_ljust, METH_VARARGS, ljust__doc__},
{"lower", (PyCFunction)stringlib_lower, METH_NOARGS, _Py_lower__doc__},
- {"lstrip", (PyCFunction)bytes_lstrip, METH_VARARGS, lstrip__doc__},
- {"maketrans", (PyCFunction)bytes_maketrans, METH_VARARGS|METH_STATIC,
- _Py_maketrans__doc__},
- {"partition", (PyCFunction)bytes_partition, METH_O, partition__doc__},
- {"replace", (PyCFunction)bytes_replace, METH_VARARGS, replace__doc__},
+ BYTES_LSTRIP_METHODDEF
+ BYTES_MAKETRANS_METHODDEF
+ BYTES_PARTITION_METHODDEF
+ BYTES_REPLACE_METHODDEF
{"rfind", (PyCFunction)bytes_rfind, METH_VARARGS, rfind__doc__},
{"rindex", (PyCFunction)bytes_rindex, METH_VARARGS, rindex__doc__},
{"rjust", (PyCFunction)stringlib_rjust, METH_VARARGS, rjust__doc__},
- {"rpartition", (PyCFunction)bytes_rpartition, METH_O,
- rpartition__doc__},
- {"rsplit", (PyCFunction)bytes_rsplit, METH_VARARGS | METH_KEYWORDS, rsplit__doc__},
- {"rstrip", (PyCFunction)bytes_rstrip, METH_VARARGS, rstrip__doc__},
- {"split", (PyCFunction)bytes_split, METH_VARARGS | METH_KEYWORDS, split__doc__},
- {"splitlines", (PyCFunction)bytes_splitlines, METH_VARARGS | METH_KEYWORDS,
- splitlines__doc__},
+ BYTES_RPARTITION_METHODDEF
+ BYTES_RSPLIT_METHODDEF
+ BYTES_RSTRIP_METHODDEF
+ BYTES_SPLIT_METHODDEF
+ BYTES_SPLITLINES_METHODDEF
{"startswith", (PyCFunction)bytes_startswith, METH_VARARGS,
startswith__doc__},
- {"strip", (PyCFunction)bytes_strip, METH_VARARGS, strip__doc__},
+ BYTES_STRIP_METHODDEF
{"swapcase", (PyCFunction)stringlib_swapcase, METH_NOARGS,
_Py_swapcase__doc__},
{"title", (PyCFunction)stringlib_title, METH_NOARGS, _Py_title__doc__},
- {"translate", (PyCFunction)bytes_translate, METH_VARARGS,
- translate__doc__},
+ BYTES_TRANSLATE_METHODDEF
{"upper", (PyCFunction)stringlib_upper, METH_NOARGS, _Py_upper__doc__},
{"zfill", (PyCFunction)stringlib_zfill, METH_VARARGS, zfill__doc__},
{NULL, NULL} /* sentinel */
};
static PyObject *
+bytes_mod(PyObject *v, PyObject *w)
+{
+ if (!PyBytes_Check(v))
+ Py_RETURN_NOTIMPLEMENTED;
+ return _PyBytes_Format(v, w);
+}
+
+static PyNumberMethods bytes_as_number = {
+ 0, /*nb_add*/
+ 0, /*nb_subtract*/
+ 0, /*nb_multiply*/
+ bytes_mod, /*nb_remainder*/
+};
+
+static PyObject *
bytes_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
static PyObject *
@@ -2471,14 +3172,14 @@ bytes_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
"argument");
return NULL;
}
- return PyBytes_FromString("");
+ return PyBytes_FromStringAndSize(NULL, 0);
}
- if (PyUnicode_Check(x)) {
+ if (encoding != NULL) {
/* Encode via the codec registry */
- if (encoding == NULL) {
+ if (!PyUnicode_Check(x)) {
PyErr_SetString(PyExc_TypeError,
- "string argument without an encoding");
+ "encoding without a string argument");
return NULL;
}
new = PyUnicode_AsEncodedString(x, encoding, errors);
@@ -2488,10 +3189,11 @@ bytes_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
return new;
}
- /* If it's not unicode, there can't be encoding or errors */
- if (encoding != NULL || errors != NULL) {
+ if (errors != NULL) {
PyErr_SetString(PyExc_TypeError,
- "encoding or errors without a string argument");
+ PyUnicode_Check(x) ?
+ "string argument without an encoding" :
+ "errors without a string argument");
return NULL;
}
@@ -2516,6 +3218,11 @@ bytes_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
else if (PyErr_Occurred())
return NULL;
+ if (PyUnicode_Check(x)) {
+ PyErr_SetString(PyExc_TypeError,
+ "string argument without an encoding");
+ return NULL;
+ }
/* Is it an integer? */
size = PyNumber_AsSsize_t(x, PyExc_OverflowError);
if (size == -1 && PyErr_Occurred()) {
@@ -2528,11 +3235,9 @@ bytes_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
return NULL;
}
else {
- new = PyBytes_FromStringAndSize(NULL, size);
+ new = _PyBytes_FromSize(size, 1);
if (new == NULL)
return NULL;
- if (size > 0)
- memset(((PyBytesObject*)new)->ob_sval, 0, size);
return new;
}
@@ -2630,10 +3335,12 @@ PyBytes_FromObject(PyObject *x)
returning a shared empty bytes string. This required because we
want to call _PyBytes_Resize() the returned object, which we can
only do on bytes objects with refcount == 1. */
- size += 1;
+ if (size == 0)
+ size = 1;
new = PyBytes_FromStringAndSize(NULL, size);
if (new == NULL)
return NULL;
+ assert(Py_REFCNT(new) == 1);
/* Get the iterator */
it = PyObject_GetIter(x);
@@ -2735,7 +3442,7 @@ PyTypeObject PyBytes_Type = {
0, /* tp_setattr */
0, /* tp_reserved */
(reprfunc)bytes_repr, /* tp_repr */
- 0, /* tp_as_number */
+ &bytes_as_number, /* tp_as_number */
&bytes_as_sequence, /* tp_as_sequence */
&bytes_as_mapping, /* tp_as_mapping */
(hashfunc)bytes_hash, /* tp_hash */
@@ -2770,7 +3477,6 @@ PyTypeObject PyBytes_Type = {
void
PyBytes_Concat(PyObject **pv, PyObject *w)
{
- PyObject *v;
assert(pv != NULL);
if (*pv == NULL)
return;
@@ -2778,9 +3484,44 @@ PyBytes_Concat(PyObject **pv, PyObject *w)
Py_CLEAR(*pv);
return;
}
- v = bytes_concat(*pv, w);
- Py_DECREF(*pv);
- *pv = v;
+
+ if (Py_REFCNT(*pv) == 1 && PyBytes_CheckExact(*pv)) {
+ /* Only one reference, so we can resize in place */
+ Py_ssize_t oldsize;
+ Py_buffer wb;
+
+ wb.len = -1;
+ if (PyObject_GetBuffer(w, &wb, PyBUF_SIMPLE) != 0) {
+ PyErr_Format(PyExc_TypeError, "can't concat %.100s to %.100s",
+ Py_TYPE(w)->tp_name, Py_TYPE(*pv)->tp_name);
+ Py_CLEAR(*pv);
+ return;
+ }
+
+ oldsize = PyBytes_GET_SIZE(*pv);
+ if (oldsize > PY_SSIZE_T_MAX - wb.len) {
+ PyErr_NoMemory();
+ goto error;
+ }
+ if (_PyBytes_Resize(pv, oldsize + wb.len) < 0)
+ goto error;
+
+ memcpy(PyBytes_AS_STRING(*pv) + oldsize, wb.buf, wb.len);
+ PyBuffer_Release(&wb);
+ return;
+
+ error:
+ PyBuffer_Release(&wb);
+ Py_CLEAR(*pv);
+ return;
+ }
+
+ else {
+ /* Multiple references, need to create new object */
+ PyObject *v;
+ v = bytes_concat(*pv, w);
+ Py_SETREF(*pv, v);
+ }
}
void
@@ -2791,14 +3532,14 @@ PyBytes_ConcatAndDel(PyObject **pv, PyObject *w)
}
-/* The following function breaks the notion that strings are immutable:
- it changes the size of a string. We get away with this only if there
+/* The following function breaks the notion that bytes are immutable:
+ it changes the size of a bytes object. We get away with this only if there
is only one module referencing the object. You can also think of it
- as creating a new string object and destroying the old one, only
- more efficiently. In any case, don't use this if the string may
+ as creating a new bytes object and destroying the old one, only
+ more efficiently. In any case, don't use this if the bytes object may
already be known to some other part of the code...
- Note that if there's not enough memory to resize the string, the original
- string object at *pv is deallocated, *pv is set to NULL, an "out of
+ Note that if there's not enough memory to resize the bytes object, the
+ original bytes object at *pv is deallocated, *pv is set to NULL, an "out of
memory" exception is set, and -1 is returned. Else (on success) 0 is
returned, and the value in *pv may or may not be the same as on input.
As always, an extra byte is allocated for a trailing \0 byte (newsize
@@ -2821,7 +3562,7 @@ _PyBytes_Resize(PyObject **pv, Py_ssize_t newsize)
_Py_DEC_REFTOTAL;
_Py_ForgetReference(v);
*pv = (PyObject *)
- PyObject_REALLOC((char *)v, PyBytesObject_SIZE + newsize);
+ PyObject_REALLOC(v, PyBytesObject_SIZE + newsize);
if (*pv == NULL) {
PyObject_Del(v);
PyErr_NoMemory();
@@ -2887,8 +3628,8 @@ striter_next(striterobject *it)
return item;
}
- Py_DECREF(seq);
it->it_seq = NULL;
+ Py_DECREF(seq);
return NULL;
}
diff --git a/Objects/cellobject.c b/Objects/cellobject.c
index eb5ad98e68..9f4eddb846 100644
--- a/Objects/cellobject.c
+++ b/Objects/cellobject.c
@@ -150,8 +150,8 @@ PyTypeObject PyCell_Type = {
"cell",
sizeof(PyCellObject),
0,
- (destructor)cell_dealloc, /* tp_dealloc */
- 0, /* tp_print */
+ (destructor)cell_dealloc, /* tp_dealloc */
+ 0, /* tp_print */
0, /* tp_getattr */
0, /* tp_setattr */
0, /* tp_reserved */
@@ -165,7 +165,7 @@ PyTypeObject PyCell_Type = {
PyObject_GenericGetAttr, /* tp_getattro */
0, /* tp_setattro */
0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,/* tp_flags */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */
0, /* tp_doc */
(traverseproc)cell_traverse, /* tp_traverse */
(inquiry)cell_clear, /* tp_clear */
diff --git a/Objects/classobject.c b/Objects/classobject.c
index 0c0bd47fbb..5e8ac59df2 100644
--- a/Objects/classobject.c
+++ b/Objects/classobject.c
@@ -15,6 +15,7 @@ static int numfree = 0;
#endif
_Py_IDENTIFIER(__name__);
+_Py_IDENTIFIER(__qualname__);
PyObject *
PyMethod_Function(PyObject *im)
@@ -243,51 +244,33 @@ method_repr(PyMethodObject *a)
{
PyObject *self = a->im_self;
PyObject *func = a->im_func;
- PyObject *klass;
- PyObject *funcname = NULL ,*klassname = NULL, *result = NULL;
- char *defname = "?";
+ PyObject *funcname = NULL, *result = NULL;
+ const char *defname = "?";
- if (self == NULL) {
- PyErr_BadInternalCall();
- return NULL;
- }
- klass = (PyObject*)Py_TYPE(self);
-
- funcname = _PyObject_GetAttrId(func, &PyId___name__);
+ funcname = _PyObject_GetAttrId(func, &PyId___qualname__);
if (funcname == NULL) {
if (!PyErr_ExceptionMatches(PyExc_AttributeError))
return NULL;
PyErr_Clear();
- }
- else if (!PyUnicode_Check(funcname)) {
- Py_DECREF(funcname);
- funcname = NULL;
- }
- if (klass == NULL)
- klassname = NULL;
- else {
- klassname = _PyObject_GetAttrId(klass, &PyId___name__);
- if (klassname == NULL) {
- if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
- Py_XDECREF(funcname);
+ funcname = _PyObject_GetAttrId(func, &PyId___name__);
+ if (funcname == NULL) {
+ if (!PyErr_ExceptionMatches(PyExc_AttributeError))
return NULL;
- }
PyErr_Clear();
}
- else if (!PyUnicode_Check(klassname)) {
- Py_DECREF(klassname);
- klassname = NULL;
- }
+ }
+
+ if (funcname != NULL && !PyUnicode_Check(funcname)) {
+ Py_DECREF(funcname);
+ funcname = NULL;
}
/* XXX Shouldn't use repr()/%R here! */
- result = PyUnicode_FromFormat("<bound method %V.%V of %R>",
- klassname, defname,
+ result = PyUnicode_FromFormat("<bound method %V of %R>",
funcname, defname, self);
Py_XDECREF(funcname);
- Py_XDECREF(klassname);
return result;
}
diff --git a/Objects/clinic/bytearrayobject.c.h b/Objects/clinic/bytearrayobject.c.h
new file mode 100644
index 0000000000..e87a22127c
--- /dev/null
+++ b/Objects/clinic/bytearrayobject.c.h
@@ -0,0 +1,698 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(bytearray_clear__doc__,
+"clear($self, /)\n"
+"--\n"
+"\n"
+"Remove all items from the bytearray.");
+
+#define BYTEARRAY_CLEAR_METHODDEF \
+ {"clear", (PyCFunction)bytearray_clear, METH_NOARGS, bytearray_clear__doc__},
+
+static PyObject *
+bytearray_clear_impl(PyByteArrayObject *self);
+
+static PyObject *
+bytearray_clear(PyByteArrayObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return bytearray_clear_impl(self);
+}
+
+PyDoc_STRVAR(bytearray_copy__doc__,
+"copy($self, /)\n"
+"--\n"
+"\n"
+"Return a copy of B.");
+
+#define BYTEARRAY_COPY_METHODDEF \
+ {"copy", (PyCFunction)bytearray_copy, METH_NOARGS, bytearray_copy__doc__},
+
+static PyObject *
+bytearray_copy_impl(PyByteArrayObject *self);
+
+static PyObject *
+bytearray_copy(PyByteArrayObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return bytearray_copy_impl(self);
+}
+
+PyDoc_STRVAR(bytearray_translate__doc__,
+"translate(table, [deletechars])\n"
+"Return a copy with each character mapped by the given translation table.\n"
+"\n"
+" table\n"
+" Translation table, which must be a bytes object of length 256.\n"
+"\n"
+"All characters occurring in the optional argument deletechars are removed.\n"
+"The remaining characters are mapped through the given translation table.");
+
+#define BYTEARRAY_TRANSLATE_METHODDEF \
+ {"translate", (PyCFunction)bytearray_translate, METH_VARARGS, bytearray_translate__doc__},
+
+static PyObject *
+bytearray_translate_impl(PyByteArrayObject *self, PyObject *table,
+ int group_right_1, PyObject *deletechars);
+
+static PyObject *
+bytearray_translate(PyByteArrayObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *table;
+ int group_right_1 = 0;
+ PyObject *deletechars = NULL;
+
+ switch (PyTuple_GET_SIZE(args)) {
+ case 1:
+ if (!PyArg_ParseTuple(args, "O:translate", &table))
+ goto exit;
+ break;
+ case 2:
+ if (!PyArg_ParseTuple(args, "OO:translate", &table, &deletechars))
+ goto exit;
+ group_right_1 = 1;
+ break;
+ default:
+ PyErr_SetString(PyExc_TypeError, "bytearray.translate requires 1 to 2 arguments");
+ goto exit;
+ }
+ return_value = bytearray_translate_impl(self, table, group_right_1, deletechars);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(bytearray_maketrans__doc__,
+"maketrans(frm, to, /)\n"
+"--\n"
+"\n"
+"Return a translation table useable for the bytes or bytearray translate method.\n"
+"\n"
+"The returned table will be one where each byte in frm is mapped to the byte at\n"
+"the same position in to.\n"
+"\n"
+"The bytes objects frm and to must be of the same length.");
+
+#define BYTEARRAY_MAKETRANS_METHODDEF \
+ {"maketrans", (PyCFunction)bytearray_maketrans, METH_VARARGS|METH_STATIC, bytearray_maketrans__doc__},
+
+static PyObject *
+bytearray_maketrans_impl(Py_buffer *frm, Py_buffer *to);
+
+static PyObject *
+bytearray_maketrans(void *null, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_buffer frm = {NULL, NULL};
+ Py_buffer to = {NULL, NULL};
+
+ if (!PyArg_ParseTuple(args, "y*y*:maketrans",
+ &frm, &to))
+ goto exit;
+ return_value = bytearray_maketrans_impl(&frm, &to);
+
+exit:
+ /* Cleanup for frm */
+ if (frm.obj)
+ PyBuffer_Release(&frm);
+ /* Cleanup for to */
+ if (to.obj)
+ PyBuffer_Release(&to);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(bytearray_replace__doc__,
+"replace($self, old, new, count=-1, /)\n"
+"--\n"
+"\n"
+"Return a copy with all occurrences of substring old replaced by new.\n"
+"\n"
+" count\n"
+" Maximum number of occurrences to replace.\n"
+" -1 (the default value) means replace all occurrences.\n"
+"\n"
+"If the optional argument count is given, only the first count occurrences are\n"
+"replaced.");
+
+#define BYTEARRAY_REPLACE_METHODDEF \
+ {"replace", (PyCFunction)bytearray_replace, METH_VARARGS, bytearray_replace__doc__},
+
+static PyObject *
+bytearray_replace_impl(PyByteArrayObject *self, Py_buffer *old,
+ Py_buffer *new, Py_ssize_t count);
+
+static PyObject *
+bytearray_replace(PyByteArrayObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_buffer old = {NULL, NULL};
+ Py_buffer new = {NULL, NULL};
+ Py_ssize_t count = -1;
+
+ if (!PyArg_ParseTuple(args, "y*y*|n:replace",
+ &old, &new, &count))
+ goto exit;
+ return_value = bytearray_replace_impl(self, &old, &new, count);
+
+exit:
+ /* Cleanup for old */
+ if (old.obj)
+ PyBuffer_Release(&old);
+ /* Cleanup for new */
+ if (new.obj)
+ PyBuffer_Release(&new);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(bytearray_split__doc__,
+"split($self, /, sep=None, maxsplit=-1)\n"
+"--\n"
+"\n"
+"Return a list of the sections in the bytearray, using sep as the delimiter.\n"
+"\n"
+" sep\n"
+" The delimiter according which to split the bytearray.\n"
+" None (the default value) means split on ASCII whitespace characters\n"
+" (space, tab, return, newline, formfeed, vertical tab).\n"
+" maxsplit\n"
+" Maximum number of splits to do.\n"
+" -1 (the default value) means no limit.");
+
+#define BYTEARRAY_SPLIT_METHODDEF \
+ {"split", (PyCFunction)bytearray_split, METH_VARARGS|METH_KEYWORDS, bytearray_split__doc__},
+
+static PyObject *
+bytearray_split_impl(PyByteArrayObject *self, PyObject *sep,
+ Py_ssize_t maxsplit);
+
+static PyObject *
+bytearray_split(PyByteArrayObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"sep", "maxsplit", NULL};
+ PyObject *sep = Py_None;
+ Py_ssize_t maxsplit = -1;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|On:split", _keywords,
+ &sep, &maxsplit))
+ goto exit;
+ return_value = bytearray_split_impl(self, sep, maxsplit);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(bytearray_partition__doc__,
+"partition($self, sep, /)\n"
+"--\n"
+"\n"
+"Partition the bytearray into three parts using the given separator.\n"
+"\n"
+"This will search for the separator sep in the bytearray. If the separator is\n"
+"found, returns a 3-tuple containing the part before the separator, the\n"
+"separator itself, and the part after it.\n"
+"\n"
+"If the separator is not found, returns a 3-tuple containing the original\n"
+"bytearray object and two empty bytearray objects.");
+
+#define BYTEARRAY_PARTITION_METHODDEF \
+ {"partition", (PyCFunction)bytearray_partition, METH_O, bytearray_partition__doc__},
+
+PyDoc_STRVAR(bytearray_rpartition__doc__,
+"rpartition($self, sep, /)\n"
+"--\n"
+"\n"
+"Partition the bytes into three parts using the given separator.\n"
+"\n"
+"This will search for the separator sep in the bytearray, starting and the end.\n"
+"If the separator is found, returns a 3-tuple containing the part before the\n"
+"separator, the separator itself, and the part after it.\n"
+"\n"
+"If the separator is not found, returns a 3-tuple containing two empty bytearray\n"
+"objects and the original bytearray object.");
+
+#define BYTEARRAY_RPARTITION_METHODDEF \
+ {"rpartition", (PyCFunction)bytearray_rpartition, METH_O, bytearray_rpartition__doc__},
+
+PyDoc_STRVAR(bytearray_rsplit__doc__,
+"rsplit($self, /, sep=None, maxsplit=-1)\n"
+"--\n"
+"\n"
+"Return a list of the sections in the bytearray, using sep as the delimiter.\n"
+"\n"
+" sep\n"
+" The delimiter according which to split the bytearray.\n"
+" None (the default value) means split on ASCII whitespace characters\n"
+" (space, tab, return, newline, formfeed, vertical tab).\n"
+" maxsplit\n"
+" Maximum number of splits to do.\n"
+" -1 (the default value) means no limit.\n"
+"\n"
+"Splitting is done starting at the end of the bytearray and working to the front.");
+
+#define BYTEARRAY_RSPLIT_METHODDEF \
+ {"rsplit", (PyCFunction)bytearray_rsplit, METH_VARARGS|METH_KEYWORDS, bytearray_rsplit__doc__},
+
+static PyObject *
+bytearray_rsplit_impl(PyByteArrayObject *self, PyObject *sep,
+ Py_ssize_t maxsplit);
+
+static PyObject *
+bytearray_rsplit(PyByteArrayObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"sep", "maxsplit", NULL};
+ PyObject *sep = Py_None;
+ Py_ssize_t maxsplit = -1;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|On:rsplit", _keywords,
+ &sep, &maxsplit))
+ goto exit;
+ return_value = bytearray_rsplit_impl(self, sep, maxsplit);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(bytearray_reverse__doc__,
+"reverse($self, /)\n"
+"--\n"
+"\n"
+"Reverse the order of the values in B in place.");
+
+#define BYTEARRAY_REVERSE_METHODDEF \
+ {"reverse", (PyCFunction)bytearray_reverse, METH_NOARGS, bytearray_reverse__doc__},
+
+static PyObject *
+bytearray_reverse_impl(PyByteArrayObject *self);
+
+static PyObject *
+bytearray_reverse(PyByteArrayObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return bytearray_reverse_impl(self);
+}
+
+PyDoc_STRVAR(bytearray_insert__doc__,
+"insert($self, index, item, /)\n"
+"--\n"
+"\n"
+"Insert a single item into the bytearray before the given index.\n"
+"\n"
+" index\n"
+" The index where the value is to be inserted.\n"
+" item\n"
+" The item to be inserted.");
+
+#define BYTEARRAY_INSERT_METHODDEF \
+ {"insert", (PyCFunction)bytearray_insert, METH_VARARGS, bytearray_insert__doc__},
+
+static PyObject *
+bytearray_insert_impl(PyByteArrayObject *self, Py_ssize_t index, int item);
+
+static PyObject *
+bytearray_insert(PyByteArrayObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_ssize_t index;
+ int item;
+
+ if (!PyArg_ParseTuple(args, "nO&:insert",
+ &index, _getbytevalue, &item))
+ goto exit;
+ return_value = bytearray_insert_impl(self, index, item);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(bytearray_append__doc__,
+"append($self, item, /)\n"
+"--\n"
+"\n"
+"Append a single item to the end of the bytearray.\n"
+"\n"
+" item\n"
+" The item to be appended.");
+
+#define BYTEARRAY_APPEND_METHODDEF \
+ {"append", (PyCFunction)bytearray_append, METH_O, bytearray_append__doc__},
+
+static PyObject *
+bytearray_append_impl(PyByteArrayObject *self, int item);
+
+static PyObject *
+bytearray_append(PyByteArrayObject *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int item;
+
+ if (!PyArg_Parse(arg, "O&:append", _getbytevalue, &item))
+ goto exit;
+ return_value = bytearray_append_impl(self, item);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(bytearray_extend__doc__,
+"extend($self, iterable_of_ints, /)\n"
+"--\n"
+"\n"
+"Append all the items from the iterator or sequence to the end of the bytearray.\n"
+"\n"
+" iterable_of_ints\n"
+" The iterable of items to append.");
+
+#define BYTEARRAY_EXTEND_METHODDEF \
+ {"extend", (PyCFunction)bytearray_extend, METH_O, bytearray_extend__doc__},
+
+PyDoc_STRVAR(bytearray_pop__doc__,
+"pop($self, index=-1, /)\n"
+"--\n"
+"\n"
+"Remove and return a single item from B.\n"
+"\n"
+" index\n"
+" The index from where to remove the item.\n"
+" -1 (the default value) means remove the last item.\n"
+"\n"
+"If no index argument is given, will pop the last item.");
+
+#define BYTEARRAY_POP_METHODDEF \
+ {"pop", (PyCFunction)bytearray_pop, METH_VARARGS, bytearray_pop__doc__},
+
+static PyObject *
+bytearray_pop_impl(PyByteArrayObject *self, Py_ssize_t index);
+
+static PyObject *
+bytearray_pop(PyByteArrayObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_ssize_t index = -1;
+
+ if (!PyArg_ParseTuple(args, "|n:pop",
+ &index))
+ goto exit;
+ return_value = bytearray_pop_impl(self, index);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(bytearray_remove__doc__,
+"remove($self, value, /)\n"
+"--\n"
+"\n"
+"Remove the first occurrence of a value in the bytearray.\n"
+"\n"
+" value\n"
+" The value to remove.");
+
+#define BYTEARRAY_REMOVE_METHODDEF \
+ {"remove", (PyCFunction)bytearray_remove, METH_O, bytearray_remove__doc__},
+
+static PyObject *
+bytearray_remove_impl(PyByteArrayObject *self, int value);
+
+static PyObject *
+bytearray_remove(PyByteArrayObject *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int value;
+
+ if (!PyArg_Parse(arg, "O&:remove", _getbytevalue, &value))
+ goto exit;
+ return_value = bytearray_remove_impl(self, value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(bytearray_strip__doc__,
+"strip($self, bytes=None, /)\n"
+"--\n"
+"\n"
+"Strip leading and trailing bytes contained in the argument.\n"
+"\n"
+"If the argument is omitted or None, strip leading and trailing ASCII whitespace.");
+
+#define BYTEARRAY_STRIP_METHODDEF \
+ {"strip", (PyCFunction)bytearray_strip, METH_VARARGS, bytearray_strip__doc__},
+
+static PyObject *
+bytearray_strip_impl(PyByteArrayObject *self, PyObject *bytes);
+
+static PyObject *
+bytearray_strip(PyByteArrayObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *bytes = Py_None;
+
+ if (!PyArg_UnpackTuple(args, "strip",
+ 0, 1,
+ &bytes))
+ goto exit;
+ return_value = bytearray_strip_impl(self, bytes);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(bytearray_lstrip__doc__,
+"lstrip($self, bytes=None, /)\n"
+"--\n"
+"\n"
+"Strip leading bytes contained in the argument.\n"
+"\n"
+"If the argument is omitted or None, strip leading ASCII whitespace.");
+
+#define BYTEARRAY_LSTRIP_METHODDEF \
+ {"lstrip", (PyCFunction)bytearray_lstrip, METH_VARARGS, bytearray_lstrip__doc__},
+
+static PyObject *
+bytearray_lstrip_impl(PyByteArrayObject *self, PyObject *bytes);
+
+static PyObject *
+bytearray_lstrip(PyByteArrayObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *bytes = Py_None;
+
+ if (!PyArg_UnpackTuple(args, "lstrip",
+ 0, 1,
+ &bytes))
+ goto exit;
+ return_value = bytearray_lstrip_impl(self, bytes);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(bytearray_rstrip__doc__,
+"rstrip($self, bytes=None, /)\n"
+"--\n"
+"\n"
+"Strip trailing bytes contained in the argument.\n"
+"\n"
+"If the argument is omitted or None, strip trailing ASCII whitespace.");
+
+#define BYTEARRAY_RSTRIP_METHODDEF \
+ {"rstrip", (PyCFunction)bytearray_rstrip, METH_VARARGS, bytearray_rstrip__doc__},
+
+static PyObject *
+bytearray_rstrip_impl(PyByteArrayObject *self, PyObject *bytes);
+
+static PyObject *
+bytearray_rstrip(PyByteArrayObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *bytes = Py_None;
+
+ if (!PyArg_UnpackTuple(args, "rstrip",
+ 0, 1,
+ &bytes))
+ goto exit;
+ return_value = bytearray_rstrip_impl(self, bytes);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(bytearray_decode__doc__,
+"decode($self, /, encoding=\'utf-8\', errors=\'strict\')\n"
+"--\n"
+"\n"
+"Decode the bytearray using the codec registered for encoding.\n"
+"\n"
+" encoding\n"
+" The encoding with which to decode the bytearray.\n"
+" errors\n"
+" The error handling scheme to use for the handling of decoding errors.\n"
+" The default is \'strict\' meaning that decoding errors raise a\n"
+" UnicodeDecodeError. Other possible values are \'ignore\' and \'replace\'\n"
+" as well as any other name registered with codecs.register_error that\n"
+" can handle UnicodeDecodeErrors.");
+
+#define BYTEARRAY_DECODE_METHODDEF \
+ {"decode", (PyCFunction)bytearray_decode, METH_VARARGS|METH_KEYWORDS, bytearray_decode__doc__},
+
+static PyObject *
+bytearray_decode_impl(PyByteArrayObject *self, const char *encoding,
+ const char *errors);
+
+static PyObject *
+bytearray_decode(PyByteArrayObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"encoding", "errors", NULL};
+ const char *encoding = NULL;
+ const char *errors = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|ss:decode", _keywords,
+ &encoding, &errors))
+ goto exit;
+ return_value = bytearray_decode_impl(self, encoding, errors);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(bytearray_join__doc__,
+"join($self, iterable_of_bytes, /)\n"
+"--\n"
+"\n"
+"Concatenate any number of bytes/bytearray objects.\n"
+"\n"
+"The bytearray whose method is called is inserted in between each pair.\n"
+"\n"
+"The result is returned as a new bytearray object.");
+
+#define BYTEARRAY_JOIN_METHODDEF \
+ {"join", (PyCFunction)bytearray_join, METH_O, bytearray_join__doc__},
+
+PyDoc_STRVAR(bytearray_splitlines__doc__,
+"splitlines($self, /, keepends=False)\n"
+"--\n"
+"\n"
+"Return a list of the lines in the bytearray, breaking at line boundaries.\n"
+"\n"
+"Line breaks are not included in the resulting list unless keepends is given and\n"
+"true.");
+
+#define BYTEARRAY_SPLITLINES_METHODDEF \
+ {"splitlines", (PyCFunction)bytearray_splitlines, METH_VARARGS|METH_KEYWORDS, bytearray_splitlines__doc__},
+
+static PyObject *
+bytearray_splitlines_impl(PyByteArrayObject *self, int keepends);
+
+static PyObject *
+bytearray_splitlines(PyByteArrayObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"keepends", NULL};
+ int keepends = 0;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i:splitlines", _keywords,
+ &keepends))
+ goto exit;
+ return_value = bytearray_splitlines_impl(self, keepends);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(bytearray_fromhex__doc__,
+"fromhex($type, string, /)\n"
+"--\n"
+"\n"
+"Create a bytearray object from a string of hexadecimal numbers.\n"
+"\n"
+"Spaces between two numbers are accepted.\n"
+"Example: bytearray.fromhex(\'B9 01EF\') -> bytearray(b\'\\\\xb9\\\\x01\\\\xef\')");
+
+#define BYTEARRAY_FROMHEX_METHODDEF \
+ {"fromhex", (PyCFunction)bytearray_fromhex, METH_O|METH_CLASS, bytearray_fromhex__doc__},
+
+static PyObject *
+bytearray_fromhex_impl(PyObject*cls, PyObject *string);
+
+static PyObject *
+bytearray_fromhex(PyTypeObject *cls, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ PyObject *string;
+
+ if (!PyArg_Parse(arg, "U:fromhex", &string))
+ goto exit;
+ return_value = bytearray_fromhex_impl((PyObject*)cls, string);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(bytearray_reduce__doc__,
+"__reduce__($self, /)\n"
+"--\n"
+"\n"
+"Return state information for pickling.");
+
+#define BYTEARRAY_REDUCE_METHODDEF \
+ {"__reduce__", (PyCFunction)bytearray_reduce, METH_NOARGS, bytearray_reduce__doc__},
+
+static PyObject *
+bytearray_reduce_impl(PyByteArrayObject *self);
+
+static PyObject *
+bytearray_reduce(PyByteArrayObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return bytearray_reduce_impl(self);
+}
+
+PyDoc_STRVAR(bytearray_reduce_ex__doc__,
+"__reduce_ex__($self, proto=0, /)\n"
+"--\n"
+"\n"
+"Return state information for pickling.");
+
+#define BYTEARRAY_REDUCE_EX_METHODDEF \
+ {"__reduce_ex__", (PyCFunction)bytearray_reduce_ex, METH_VARARGS, bytearray_reduce_ex__doc__},
+
+static PyObject *
+bytearray_reduce_ex_impl(PyByteArrayObject *self, int proto);
+
+static PyObject *
+bytearray_reduce_ex(PyByteArrayObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int proto = 0;
+
+ if (!PyArg_ParseTuple(args, "|i:__reduce_ex__",
+ &proto))
+ goto exit;
+ return_value = bytearray_reduce_ex_impl(self, proto);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(bytearray_sizeof__doc__,
+"__sizeof__($self, /)\n"
+"--\n"
+"\n"
+"Returns the size of the bytearray object in memory, in bytes.");
+
+#define BYTEARRAY_SIZEOF_METHODDEF \
+ {"__sizeof__", (PyCFunction)bytearray_sizeof, METH_NOARGS, bytearray_sizeof__doc__},
+
+static PyObject *
+bytearray_sizeof_impl(PyByteArrayObject *self);
+
+static PyObject *
+bytearray_sizeof(PyByteArrayObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return bytearray_sizeof_impl(self);
+}
+/*[clinic end generated code: output=966c15ff22c5e243 input=a9049054013a1b77]*/
diff --git a/Objects/clinic/bytesobject.c.h b/Objects/clinic/bytesobject.c.h
new file mode 100644
index 0000000000..5a1a5e91a6
--- /dev/null
+++ b/Objects/clinic/bytesobject.c.h
@@ -0,0 +1,487 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(bytes_split__doc__,
+"split($self, /, sep=None, maxsplit=-1)\n"
+"--\n"
+"\n"
+"Return a list of the sections in the bytes, using sep as the delimiter.\n"
+"\n"
+" sep\n"
+" The delimiter according which to split the bytes.\n"
+" None (the default value) means split on ASCII whitespace characters\n"
+" (space, tab, return, newline, formfeed, vertical tab).\n"
+" maxsplit\n"
+" Maximum number of splits to do.\n"
+" -1 (the default value) means no limit.");
+
+#define BYTES_SPLIT_METHODDEF \
+ {"split", (PyCFunction)bytes_split, METH_VARARGS|METH_KEYWORDS, bytes_split__doc__},
+
+static PyObject *
+bytes_split_impl(PyBytesObject*self, PyObject *sep, Py_ssize_t maxsplit);
+
+static PyObject *
+bytes_split(PyBytesObject*self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"sep", "maxsplit", NULL};
+ PyObject *sep = Py_None;
+ Py_ssize_t maxsplit = -1;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|On:split", _keywords,
+ &sep, &maxsplit))
+ goto exit;
+ return_value = bytes_split_impl(self, sep, maxsplit);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(bytes_partition__doc__,
+"partition($self, sep, /)\n"
+"--\n"
+"\n"
+"Partition the bytes into three parts using the given separator.\n"
+"\n"
+"This will search for the separator sep in the bytes. If the separator is found,\n"
+"returns a 3-tuple containing the part before the separator, the separator\n"
+"itself, and the part after it.\n"
+"\n"
+"If the separator is not found, returns a 3-tuple containing the original bytes\n"
+"object and two empty bytes objects.");
+
+#define BYTES_PARTITION_METHODDEF \
+ {"partition", (PyCFunction)bytes_partition, METH_O, bytes_partition__doc__},
+
+static PyObject *
+bytes_partition_impl(PyBytesObject *self, Py_buffer *sep);
+
+static PyObject *
+bytes_partition(PyBytesObject *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_buffer sep = {NULL, NULL};
+
+ if (!PyArg_Parse(arg, "y*:partition", &sep))
+ goto exit;
+ return_value = bytes_partition_impl(self, &sep);
+
+exit:
+ /* Cleanup for sep */
+ if (sep.obj)
+ PyBuffer_Release(&sep);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(bytes_rpartition__doc__,
+"rpartition($self, sep, /)\n"
+"--\n"
+"\n"
+"Partition the bytes into three parts using the given separator.\n"
+"\n"
+"This will search for the separator sep in the bytes, starting and the end. If\n"
+"the separator is found, returns a 3-tuple containing the part before the\n"
+"separator, the separator itself, and the part after it.\n"
+"\n"
+"If the separator is not found, returns a 3-tuple containing two empty bytes\n"
+"objects and the original bytes object.");
+
+#define BYTES_RPARTITION_METHODDEF \
+ {"rpartition", (PyCFunction)bytes_rpartition, METH_O, bytes_rpartition__doc__},
+
+static PyObject *
+bytes_rpartition_impl(PyBytesObject *self, Py_buffer *sep);
+
+static PyObject *
+bytes_rpartition(PyBytesObject *self, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_buffer sep = {NULL, NULL};
+
+ if (!PyArg_Parse(arg, "y*:rpartition", &sep))
+ goto exit;
+ return_value = bytes_rpartition_impl(self, &sep);
+
+exit:
+ /* Cleanup for sep */
+ if (sep.obj)
+ PyBuffer_Release(&sep);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(bytes_rsplit__doc__,
+"rsplit($self, /, sep=None, maxsplit=-1)\n"
+"--\n"
+"\n"
+"Return a list of the sections in the bytes, using sep as the delimiter.\n"
+"\n"
+" sep\n"
+" The delimiter according which to split the bytes.\n"
+" None (the default value) means split on ASCII whitespace characters\n"
+" (space, tab, return, newline, formfeed, vertical tab).\n"
+" maxsplit\n"
+" Maximum number of splits to do.\n"
+" -1 (the default value) means no limit.\n"
+"\n"
+"Splitting is done starting at the end of the bytes and working to the front.");
+
+#define BYTES_RSPLIT_METHODDEF \
+ {"rsplit", (PyCFunction)bytes_rsplit, METH_VARARGS|METH_KEYWORDS, bytes_rsplit__doc__},
+
+static PyObject *
+bytes_rsplit_impl(PyBytesObject*self, PyObject *sep, Py_ssize_t maxsplit);
+
+static PyObject *
+bytes_rsplit(PyBytesObject*self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"sep", "maxsplit", NULL};
+ PyObject *sep = Py_None;
+ Py_ssize_t maxsplit = -1;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|On:rsplit", _keywords,
+ &sep, &maxsplit))
+ goto exit;
+ return_value = bytes_rsplit_impl(self, sep, maxsplit);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(bytes_join__doc__,
+"join($self, iterable_of_bytes, /)\n"
+"--\n"
+"\n"
+"Concatenate any number of bytes objects.\n"
+"\n"
+"The bytes whose method is called is inserted in between each pair.\n"
+"\n"
+"The result is returned as a new bytes object.\n"
+"\n"
+"Example: b\'.\'.join([b\'ab\', b\'pq\', b\'rs\']) -> b\'ab.pq.rs\'.");
+
+#define BYTES_JOIN_METHODDEF \
+ {"join", (PyCFunction)bytes_join, METH_O, bytes_join__doc__},
+
+PyDoc_STRVAR(bytes_strip__doc__,
+"strip($self, bytes=None, /)\n"
+"--\n"
+"\n"
+"Strip leading and trailing bytes contained in the argument.\n"
+"\n"
+"If the argument is omitted or None, strip leading and trailing ASCII whitespace.");
+
+#define BYTES_STRIP_METHODDEF \
+ {"strip", (PyCFunction)bytes_strip, METH_VARARGS, bytes_strip__doc__},
+
+static PyObject *
+bytes_strip_impl(PyBytesObject *self, PyObject *bytes);
+
+static PyObject *
+bytes_strip(PyBytesObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *bytes = Py_None;
+
+ if (!PyArg_UnpackTuple(args, "strip",
+ 0, 1,
+ &bytes))
+ goto exit;
+ return_value = bytes_strip_impl(self, bytes);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(bytes_lstrip__doc__,
+"lstrip($self, bytes=None, /)\n"
+"--\n"
+"\n"
+"Strip leading bytes contained in the argument.\n"
+"\n"
+"If the argument is omitted or None, strip leading ASCII whitespace.");
+
+#define BYTES_LSTRIP_METHODDEF \
+ {"lstrip", (PyCFunction)bytes_lstrip, METH_VARARGS, bytes_lstrip__doc__},
+
+static PyObject *
+bytes_lstrip_impl(PyBytesObject *self, PyObject *bytes);
+
+static PyObject *
+bytes_lstrip(PyBytesObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *bytes = Py_None;
+
+ if (!PyArg_UnpackTuple(args, "lstrip",
+ 0, 1,
+ &bytes))
+ goto exit;
+ return_value = bytes_lstrip_impl(self, bytes);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(bytes_rstrip__doc__,
+"rstrip($self, bytes=None, /)\n"
+"--\n"
+"\n"
+"Strip trailing bytes contained in the argument.\n"
+"\n"
+"If the argument is omitted or None, strip trailing ASCII whitespace.");
+
+#define BYTES_RSTRIP_METHODDEF \
+ {"rstrip", (PyCFunction)bytes_rstrip, METH_VARARGS, bytes_rstrip__doc__},
+
+static PyObject *
+bytes_rstrip_impl(PyBytesObject *self, PyObject *bytes);
+
+static PyObject *
+bytes_rstrip(PyBytesObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *bytes = Py_None;
+
+ if (!PyArg_UnpackTuple(args, "rstrip",
+ 0, 1,
+ &bytes))
+ goto exit;
+ return_value = bytes_rstrip_impl(self, bytes);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(bytes_translate__doc__,
+"translate(table, [deletechars])\n"
+"Return a copy with each character mapped by the given translation table.\n"
+"\n"
+" table\n"
+" Translation table, which must be a bytes object of length 256.\n"
+"\n"
+"All characters occurring in the optional argument deletechars are removed.\n"
+"The remaining characters are mapped through the given translation table.");
+
+#define BYTES_TRANSLATE_METHODDEF \
+ {"translate", (PyCFunction)bytes_translate, METH_VARARGS, bytes_translate__doc__},
+
+static PyObject *
+bytes_translate_impl(PyBytesObject *self, PyObject *table, int group_right_1,
+ PyObject *deletechars);
+
+static PyObject *
+bytes_translate(PyBytesObject *self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *table;
+ int group_right_1 = 0;
+ PyObject *deletechars = NULL;
+
+ switch (PyTuple_GET_SIZE(args)) {
+ case 1:
+ if (!PyArg_ParseTuple(args, "O:translate", &table))
+ goto exit;
+ break;
+ case 2:
+ if (!PyArg_ParseTuple(args, "OO:translate", &table, &deletechars))
+ goto exit;
+ group_right_1 = 1;
+ break;
+ default:
+ PyErr_SetString(PyExc_TypeError, "bytes.translate requires 1 to 2 arguments");
+ goto exit;
+ }
+ return_value = bytes_translate_impl(self, table, group_right_1, deletechars);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(bytes_maketrans__doc__,
+"maketrans(frm, to, /)\n"
+"--\n"
+"\n"
+"Return a translation table useable for the bytes or bytearray translate method.\n"
+"\n"
+"The returned table will be one where each byte in frm is mapped to the byte at\n"
+"the same position in to.\n"
+"\n"
+"The bytes objects frm and to must be of the same length.");
+
+#define BYTES_MAKETRANS_METHODDEF \
+ {"maketrans", (PyCFunction)bytes_maketrans, METH_VARARGS|METH_STATIC, bytes_maketrans__doc__},
+
+static PyObject *
+bytes_maketrans_impl(Py_buffer *frm, Py_buffer *to);
+
+static PyObject *
+bytes_maketrans(void *null, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_buffer frm = {NULL, NULL};
+ Py_buffer to = {NULL, NULL};
+
+ if (!PyArg_ParseTuple(args, "y*y*:maketrans",
+ &frm, &to))
+ goto exit;
+ return_value = bytes_maketrans_impl(&frm, &to);
+
+exit:
+ /* Cleanup for frm */
+ if (frm.obj)
+ PyBuffer_Release(&frm);
+ /* Cleanup for to */
+ if (to.obj)
+ PyBuffer_Release(&to);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(bytes_replace__doc__,
+"replace($self, old, new, count=-1, /)\n"
+"--\n"
+"\n"
+"Return a copy with all occurrences of substring old replaced by new.\n"
+"\n"
+" count\n"
+" Maximum number of occurrences to replace.\n"
+" -1 (the default value) means replace all occurrences.\n"
+"\n"
+"If the optional argument count is given, only the first count occurrences are\n"
+"replaced.");
+
+#define BYTES_REPLACE_METHODDEF \
+ {"replace", (PyCFunction)bytes_replace, METH_VARARGS, bytes_replace__doc__},
+
+static PyObject *
+bytes_replace_impl(PyBytesObject*self, Py_buffer *old, Py_buffer *new,
+ Py_ssize_t count);
+
+static PyObject *
+bytes_replace(PyBytesObject*self, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_buffer old = {NULL, NULL};
+ Py_buffer new = {NULL, NULL};
+ Py_ssize_t count = -1;
+
+ if (!PyArg_ParseTuple(args, "y*y*|n:replace",
+ &old, &new, &count))
+ goto exit;
+ return_value = bytes_replace_impl(self, &old, &new, count);
+
+exit:
+ /* Cleanup for old */
+ if (old.obj)
+ PyBuffer_Release(&old);
+ /* Cleanup for new */
+ if (new.obj)
+ PyBuffer_Release(&new);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(bytes_decode__doc__,
+"decode($self, /, encoding=\'utf-8\', errors=\'strict\')\n"
+"--\n"
+"\n"
+"Decode the bytes using the codec registered for encoding.\n"
+"\n"
+" encoding\n"
+" The encoding with which to decode the bytes.\n"
+" errors\n"
+" The error handling scheme to use for the handling of decoding errors.\n"
+" The default is \'strict\' meaning that decoding errors raise a\n"
+" UnicodeDecodeError. Other possible values are \'ignore\' and \'replace\'\n"
+" as well as any other name registered with codecs.register_error that\n"
+" can handle UnicodeDecodeErrors.");
+
+#define BYTES_DECODE_METHODDEF \
+ {"decode", (PyCFunction)bytes_decode, METH_VARARGS|METH_KEYWORDS, bytes_decode__doc__},
+
+static PyObject *
+bytes_decode_impl(PyBytesObject*self, const char *encoding,
+ const char *errors);
+
+static PyObject *
+bytes_decode(PyBytesObject*self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"encoding", "errors", NULL};
+ const char *encoding = NULL;
+ const char *errors = NULL;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|ss:decode", _keywords,
+ &encoding, &errors))
+ goto exit;
+ return_value = bytes_decode_impl(self, encoding, errors);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(bytes_splitlines__doc__,
+"splitlines($self, /, keepends=False)\n"
+"--\n"
+"\n"
+"Return a list of the lines in the bytes, breaking at line boundaries.\n"
+"\n"
+"Line breaks are not included in the resulting list unless keepends is given and\n"
+"true.");
+
+#define BYTES_SPLITLINES_METHODDEF \
+ {"splitlines", (PyCFunction)bytes_splitlines, METH_VARARGS|METH_KEYWORDS, bytes_splitlines__doc__},
+
+static PyObject *
+bytes_splitlines_impl(PyBytesObject*self, int keepends);
+
+static PyObject *
+bytes_splitlines(PyBytesObject*self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"keepends", NULL};
+ int keepends = 0;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i:splitlines", _keywords,
+ &keepends))
+ goto exit;
+ return_value = bytes_splitlines_impl(self, keepends);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(bytes_fromhex__doc__,
+"fromhex($type, string, /)\n"
+"--\n"
+"\n"
+"Create a bytes object from a string of hexadecimal numbers.\n"
+"\n"
+"Spaces between two numbers are accepted.\n"
+"Example: bytes.fromhex(\'B9 01EF\') -> b\'\\\\xb9\\\\x01\\\\xef\'.");
+
+#define BYTES_FROMHEX_METHODDEF \
+ {"fromhex", (PyCFunction)bytes_fromhex, METH_O|METH_CLASS, bytes_fromhex__doc__},
+
+static PyObject *
+bytes_fromhex_impl(PyTypeObject *type, PyObject *string);
+
+static PyObject *
+bytes_fromhex(PyTypeObject *type, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ PyObject *string;
+
+ if (!PyArg_Parse(arg, "U:fromhex", &string))
+ goto exit;
+ return_value = bytes_fromhex_impl(type, string);
+
+exit:
+ return return_value;
+}
+/*[clinic end generated code: output=bd0ce8f25d7e18f4 input=a9049054013a1b77]*/
diff --git a/Objects/clinic/dictobject.c.h b/Objects/clinic/dictobject.c.h
new file mode 100644
index 0000000000..5288b9a8b3
--- /dev/null
+++ b/Objects/clinic/dictobject.c.h
@@ -0,0 +1,42 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(dict_fromkeys__doc__,
+"fromkeys($type, iterable, value=None, /)\n"
+"--\n"
+"\n"
+"Returns a new dict with keys from iterable and values equal to value.");
+
+#define DICT_FROMKEYS_METHODDEF \
+ {"fromkeys", (PyCFunction)dict_fromkeys, METH_VARARGS|METH_CLASS, dict_fromkeys__doc__},
+
+static PyObject *
+dict_fromkeys_impl(PyTypeObject *type, PyObject *iterable, PyObject *value);
+
+static PyObject *
+dict_fromkeys(PyTypeObject *type, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *iterable;
+ PyObject *value = Py_None;
+
+ if (!PyArg_UnpackTuple(args, "fromkeys",
+ 1, 2,
+ &iterable, &value))
+ goto exit;
+ return_value = dict_fromkeys_impl(type, iterable, value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(dict___contains____doc__,
+"__contains__($self, key, /)\n"
+"--\n"
+"\n"
+"True if D has a key k, else False.");
+
+#define DICT___CONTAINS___METHODDEF \
+ {"__contains__", (PyCFunction)dict___contains__, METH_O|METH_COEXIST, dict___contains____doc__},
+/*[clinic end generated code: output=fe74d676332fdba6 input=a9049054013a1b77]*/
diff --git a/Objects/clinic/unicodeobject.c.h b/Objects/clinic/unicodeobject.c.h
new file mode 100644
index 0000000000..d42a70002a
--- /dev/null
+++ b/Objects/clinic/unicodeobject.c.h
@@ -0,0 +1,41 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(unicode_maketrans__doc__,
+"maketrans(x, y=None, z=None, /)\n"
+"--\n"
+"\n"
+"Return a translation table usable for str.translate().\n"
+"\n"
+"If there is only one argument, it must be a dictionary mapping Unicode\n"
+"ordinals (integers) or characters to Unicode ordinals, strings or None.\n"
+"Character keys will be then converted to ordinals.\n"
+"If there are two arguments, they must be strings of equal length, and\n"
+"in the resulting dictionary, each character in x will be mapped to the\n"
+"character at the same position in y. If there is a third argument, it\n"
+"must be a string, whose characters will be mapped to None in the result.");
+
+#define UNICODE_MAKETRANS_METHODDEF \
+ {"maketrans", (PyCFunction)unicode_maketrans, METH_VARARGS|METH_STATIC, unicode_maketrans__doc__},
+
+static PyObject *
+unicode_maketrans_impl(PyObject *x, PyObject *y, PyObject *z);
+
+static PyObject *
+unicode_maketrans(void *null, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *x;
+ PyObject *y = NULL;
+ PyObject *z = NULL;
+
+ if (!PyArg_ParseTuple(args, "O|UU:maketrans",
+ &x, &y, &z))
+ goto exit;
+ return_value = unicode_maketrans_impl(x, y, z);
+
+exit:
+ return return_value;
+}
+/*[clinic end generated code: output=94affdff5b2daff5 input=a9049054013a1b77]*/
diff --git a/Objects/codeobject.c b/Objects/codeobject.c
index 353f414a38..964ae62146 100644
--- a/Objects/codeobject.c
+++ b/Objects/codeobject.c
@@ -384,7 +384,7 @@ code_sizeof(PyCodeObject *co, void *unused)
{
Py_ssize_t res;
- res = sizeof(PyCodeObject);
+ res = _PyObject_SIZE(Py_TYPE(co));
if (co->co_cell2arg != NULL && co->co_cellvars != NULL)
res += PyTuple_GET_SIZE(co->co_cellvars) * sizeof(unsigned char);
return PyLong_FromSsize_t(res);
@@ -409,11 +409,135 @@ code_repr(PyCodeObject *co)
}
}
+PyObject*
+_PyCode_ConstantKey(PyObject *op)
+{
+ PyObject *key;
+
+ /* Py_None and Py_Ellipsis are singleton */
+ if (op == Py_None || op == Py_Ellipsis
+ || PyLong_CheckExact(op)
+ || PyBool_Check(op)
+ || PyBytes_CheckExact(op)
+ || PyUnicode_CheckExact(op)
+ /* code_richcompare() uses _PyCode_ConstantKey() internally */
+ || PyCode_Check(op)) {
+ key = PyTuple_Pack(2, Py_TYPE(op), op);
+ }
+ else if (PyFloat_CheckExact(op)) {
+ double d = PyFloat_AS_DOUBLE(op);
+ /* all we need is to make the tuple different in either the 0.0
+ * or -0.0 case from all others, just to avoid the "coercion".
+ */
+ if (d == 0.0 && copysign(1.0, d) < 0.0)
+ key = PyTuple_Pack(3, Py_TYPE(op), op, Py_None);
+ else
+ key = PyTuple_Pack(2, Py_TYPE(op), op);
+ }
+ else if (PyComplex_CheckExact(op)) {
+ Py_complex z;
+ int real_negzero, imag_negzero;
+ /* For the complex case we must make complex(x, 0.)
+ different from complex(x, -0.) and complex(0., y)
+ different from complex(-0., y), for any x and y.
+ All four complex zeros must be distinguished.*/
+ z = PyComplex_AsCComplex(op);
+ real_negzero = z.real == 0.0 && copysign(1.0, z.real) < 0.0;
+ imag_negzero = z.imag == 0.0 && copysign(1.0, z.imag) < 0.0;
+ /* use True, False and None singleton as tags for the real and imag
+ * sign, to make tuples different */
+ if (real_negzero && imag_negzero) {
+ key = PyTuple_Pack(3, Py_TYPE(op), op, Py_True);
+ }
+ else if (imag_negzero) {
+ key = PyTuple_Pack(3, Py_TYPE(op), op, Py_False);
+ }
+ else if (real_negzero) {
+ key = PyTuple_Pack(3, Py_TYPE(op), op, Py_None);
+ }
+ else {
+ key = PyTuple_Pack(2, Py_TYPE(op), op);
+ }
+ }
+ else if (PyTuple_CheckExact(op)) {
+ Py_ssize_t i, len;
+ PyObject *tuple;
+
+ len = PyTuple_GET_SIZE(op);
+ tuple = PyTuple_New(len);
+ if (tuple == NULL)
+ return NULL;
+
+ for (i=0; i < len; i++) {
+ PyObject *item, *item_key;
+
+ item = PyTuple_GET_ITEM(op, i);
+ item_key = _PyCode_ConstantKey(item);
+ if (item_key == NULL) {
+ Py_DECREF(tuple);
+ return NULL;
+ }
+
+ PyTuple_SET_ITEM(tuple, i, item_key);
+ }
+
+ key = PyTuple_Pack(3, Py_TYPE(op), op, tuple);
+ Py_DECREF(tuple);
+ }
+ else if (PyFrozenSet_CheckExact(op)) {
+ Py_ssize_t pos = 0;
+ PyObject *item;
+ Py_hash_t hash;
+ Py_ssize_t i, len;
+ PyObject *tuple, *set;
+
+ len = PySet_GET_SIZE(op);
+ tuple = PyTuple_New(len);
+ if (tuple == NULL)
+ return NULL;
+
+ i = 0;
+ while (_PySet_NextEntry(op, &pos, &item, &hash)) {
+ PyObject *item_key;
+
+ item_key = _PyCode_ConstantKey(item);
+ if (item_key == NULL) {
+ Py_DECREF(tuple);
+ return NULL;
+ }
+
+ assert(i < len);
+ PyTuple_SET_ITEM(tuple, i, item_key);
+ i++;
+ }
+ set = PyFrozenSet_New(tuple);
+ Py_DECREF(tuple);
+ if (set == NULL)
+ return NULL;
+
+ key = PyTuple_Pack(3, Py_TYPE(op), op, set);
+ Py_DECREF(set);
+ return key;
+ }
+ else {
+ /* for other types, use the object identifier as a unique identifier
+ * to ensure that they are seen as unequal. */
+ PyObject *obj_id = PyLong_FromVoidPtr(op);
+ if (obj_id == NULL)
+ return NULL;
+
+ key = PyTuple_Pack(3, Py_TYPE(op), op, obj_id);
+ Py_DECREF(obj_id);
+ }
+ return key;
+}
+
static PyObject *
code_richcompare(PyObject *self, PyObject *other, int op)
{
PyCodeObject *co, *cp;
int eq;
+ PyObject *consts1, *consts2;
PyObject *res;
if ((op != Py_EQ && op != Py_NE) ||
@@ -439,8 +563,21 @@ code_richcompare(PyObject *self, PyObject *other, int op)
if (!eq) goto unequal;
eq = PyObject_RichCompareBool(co->co_code, cp->co_code, Py_EQ);
if (eq <= 0) goto unequal;
- eq = PyObject_RichCompareBool(co->co_consts, cp->co_consts, Py_EQ);
+
+ /* compare constants */
+ consts1 = _PyCode_ConstantKey(co->co_consts);
+ if (!consts1)
+ return NULL;
+ consts2 = _PyCode_ConstantKey(cp->co_consts);
+ if (!consts2) {
+ Py_DECREF(consts1);
+ return NULL;
+ }
+ eq = PyObject_RichCompareBool(consts1, consts2, Py_EQ);
+ Py_DECREF(consts1);
+ Py_DECREF(consts2);
if (eq <= 0) goto unequal;
+
eq = PyObject_RichCompareBool(co->co_names, cp->co_names, Py_EQ);
if (eq <= 0) goto unequal;
eq = PyObject_RichCompareBool(co->co_varnames, cp->co_varnames, Py_EQ);
diff --git a/Objects/complexobject.c b/Objects/complexobject.c
index 7aaaeab7d2..a5bfb667c4 100644
--- a/Objects/complexobject.c
+++ b/Objects/complexobject.c
@@ -13,7 +13,7 @@
static Py_complex c_1 = {1., 0.};
Py_complex
-c_sum(Py_complex a, Py_complex b)
+_Py_c_sum(Py_complex a, Py_complex b)
{
Py_complex r;
r.real = a.real + b.real;
@@ -22,7 +22,7 @@ c_sum(Py_complex a, Py_complex b)
}
Py_complex
-c_diff(Py_complex a, Py_complex b)
+_Py_c_diff(Py_complex a, Py_complex b)
{
Py_complex r;
r.real = a.real - b.real;
@@ -31,7 +31,7 @@ c_diff(Py_complex a, Py_complex b)
}
Py_complex
-c_neg(Py_complex a)
+_Py_c_neg(Py_complex a)
{
Py_complex r;
r.real = -a.real;
@@ -40,7 +40,7 @@ c_neg(Py_complex a)
}
Py_complex
-c_prod(Py_complex a, Py_complex b)
+_Py_c_prod(Py_complex a, Py_complex b)
{
Py_complex r;
r.real = a.real*b.real - a.imag*b.imag;
@@ -49,7 +49,7 @@ c_prod(Py_complex a, Py_complex b)
}
Py_complex
-c_quot(Py_complex a, Py_complex b)
+_Py_c_quot(Py_complex a, Py_complex b)
{
/******************************************************************
This was the original algorithm. It's grossly prone to spurious
@@ -107,7 +107,7 @@ c_quot(Py_complex a, Py_complex b)
}
Py_complex
-c_pow(Py_complex a, Py_complex b)
+_Py_c_pow(Py_complex a, Py_complex b)
{
Py_complex r;
double vabs,len,at,phase;
@@ -145,9 +145,9 @@ c_powu(Py_complex x, long n)
p = x;
while (mask > 0 && n >= mask) {
if (n & mask)
- r = c_prod(r,p);
+ r = _Py_c_prod(r,p);
mask <<= 1;
- p = c_prod(p,p);
+ p = _Py_c_prod(p,p);
}
return r;
}
@@ -160,17 +160,17 @@ c_powi(Py_complex x, long n)
if (n > 100 || n < -100) {
cn.real = (double) n;
cn.imag = 0.;
- return c_pow(x,cn);
+ return _Py_c_pow(x,cn);
}
else if (n > 0)
return c_powu(x,n);
else
- return c_quot(c_1,c_powu(x,-n));
+ return _Py_c_quot(c_1, c_powu(x,-n));
}
double
-c_abs(Py_complex z)
+_Py_c_abs(Py_complex z)
{
/* sets errno = ERANGE on overflow; otherwise errno = 0 */
double result;
@@ -445,7 +445,7 @@ complex_add(PyObject *v, PyObject *w)
TO_COMPLEX(v, a);
TO_COMPLEX(w, b);
PyFPE_START_PROTECT("complex_add", return 0)
- result = c_sum(a, b);
+ result = _Py_c_sum(a, b);
PyFPE_END_PROTECT(result)
return PyComplex_FromCComplex(result);
}
@@ -458,7 +458,7 @@ complex_sub(PyObject *v, PyObject *w)
TO_COMPLEX(v, a);
TO_COMPLEX(w, b);
PyFPE_START_PROTECT("complex_sub", return 0)
- result = c_diff(a, b);
+ result = _Py_c_diff(a, b);
PyFPE_END_PROTECT(result)
return PyComplex_FromCComplex(result);
}
@@ -471,7 +471,7 @@ complex_mul(PyObject *v, PyObject *w)
TO_COMPLEX(v, a);
TO_COMPLEX(w, b);
PyFPE_START_PROTECT("complex_mul", return 0)
- result = c_prod(a, b);
+ result = _Py_c_prod(a, b);
PyFPE_END_PROTECT(result)
return PyComplex_FromCComplex(result);
}
@@ -485,7 +485,7 @@ complex_div(PyObject *v, PyObject *w)
TO_COMPLEX(w, b);
PyFPE_START_PROTECT("complex_div", return 0)
errno = 0;
- quot = c_quot(a, b);
+ quot = _Py_c_quot(a, b);
PyFPE_END_PROTECT(quot)
if (errno == EDOM) {
PyErr_SetString(PyExc_ZeroDivisionError, "complex division by zero");
@@ -532,7 +532,7 @@ complex_pow(PyObject *v, PyObject *w, PyObject *z)
if (exponent.imag == 0. && exponent.real == int_exponent)
p = c_powi(a, int_exponent);
else
- p = c_pow(a, exponent);
+ p = _Py_c_pow(a, exponent);
PyFPE_END_PROTECT(p)
Py_ADJUST_ERANGE2(p.real, p.imag);
@@ -583,7 +583,7 @@ complex_abs(PyComplexObject *v)
double result;
PyFPE_START_PROTECT("complex_abs", return 0)
- result = c_abs(v->cval);
+ result = _Py_c_abs(v->cval);
PyFPE_END_PROTECT(result)
if (errno == ERANGE) {
diff --git a/Objects/descrobject.c b/Objects/descrobject.c
index 615f499fad..da68e3be26 100644
--- a/Objects/descrobject.c
+++ b/Objects/descrobject.c
@@ -1313,7 +1313,7 @@ static PyMemberDef property_members[] = {
{"fget", T_OBJECT, offsetof(propertyobject, prop_get), READONLY},
{"fset", T_OBJECT, offsetof(propertyobject, prop_set), READONLY},
{"fdel", T_OBJECT, offsetof(propertyobject, prop_del), READONLY},
- {"__doc__", T_OBJECT, offsetof(propertyobject, prop_doc), READONLY},
+ {"__doc__", T_OBJECT, offsetof(propertyobject, prop_doc), 0},
{0}
};
@@ -1372,6 +1372,9 @@ property_dealloc(PyObject *self)
static PyObject *
property_descr_get(PyObject *self, PyObject *obj, PyObject *type)
{
+ static PyObject * volatile cached_args = NULL;
+ PyObject *args;
+ PyObject *ret;
propertyobject *gs = (propertyobject *)self;
if (obj == NULL || obj == Py_None) {
@@ -1382,7 +1385,29 @@ property_descr_get(PyObject *self, PyObject *obj, PyObject *type)
PyErr_SetString(PyExc_AttributeError, "unreadable attribute");
return NULL;
}
- return PyObject_CallFunctionObjArgs(gs->prop_get, obj, NULL);
+ args = cached_args;
+ cached_args = NULL;
+ if (!args) {
+ args = PyTuple_New(1);
+ if (!args)
+ return NULL;
+ _PyObject_GC_UNTRACK(args);
+ }
+ Py_INCREF(obj);
+ PyTuple_SET_ITEM(args, 0, obj);
+ ret = PyObject_Call(gs->prop_get, args, NULL);
+ if (cached_args == NULL && Py_REFCNT(args) == 1) {
+ assert(Py_SIZE(args) == 1);
+ assert(PyTuple_GET_ITEM(args, 0) == obj);
+ cached_args = args;
+ Py_DECREF(obj);
+ }
+ else {
+ assert(Py_REFCNT(args) >= 1);
+ _PyObject_GC_TRACK(args);
+ Py_DECREF(args);
+ }
+ return ret;
}
static int
@@ -1484,8 +1509,7 @@ property_init(PyObject *self, PyObject *args, PyObject *kwds)
PyObject *get_doc = _PyObject_GetAttrId(get, &PyId___doc__);
if (get_doc) {
if (Py_TYPE(self) == &PyProperty_Type) {
- Py_XDECREF(prop->prop_doc);
- prop->prop_doc = get_doc;
+ Py_XSETREF(prop->prop_doc, get_doc);
}
else {
/* If this is a property subclass, put __doc__
@@ -1584,6 +1608,14 @@ property_traverse(PyObject *self, visitproc visit, void *arg)
return 0;
}
+static int
+property_clear(PyObject *self)
+{
+ propertyobject *pp = (propertyobject *)self;
+ Py_CLEAR(pp->prop_doc);
+ return 0;
+}
+
PyTypeObject PyProperty_Type = {
PyVarObject_HEAD_INIT(&PyType_Type, 0)
"property", /* tp_name */
@@ -1609,7 +1641,7 @@ PyTypeObject PyProperty_Type = {
Py_TPFLAGS_BASETYPE, /* tp_flags */
property_doc, /* tp_doc */
property_traverse, /* tp_traverse */
- 0, /* tp_clear */
+ (inquiry)property_clear, /* tp_clear */
0, /* tp_richcompare */
0, /* tp_weaklistoffset */
0, /* tp_iter */
diff --git a/Objects/dict-common.h b/Objects/dict-common.h
new file mode 100644
index 0000000000..2912eb94ea
--- /dev/null
+++ b/Objects/dict-common.h
@@ -0,0 +1,22 @@
+#ifndef Py_DICT_COMMON_H
+#define Py_DICT_COMMON_H
+
+typedef struct {
+ /* Cached hash code of me_key. */
+ Py_hash_t me_hash;
+ PyObject *me_key;
+ PyObject *me_value; /* This field is only meaningful for combined tables */
+} PyDictKeyEntry;
+
+typedef PyDictKeyEntry *(*dict_lookup_func)
+(PyDictObject *mp, PyObject *key, Py_hash_t hash, PyObject ***value_addr);
+
+struct _dictkeysobject {
+ Py_ssize_t dk_refcnt;
+ Py_ssize_t dk_size;
+ dict_lookup_func dk_lookup;
+ Py_ssize_t dk_usable;
+ PyDictKeyEntry dk_entries[1];
+};
+
+#endif
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index 25619c116b..d7745860e4 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -67,6 +67,7 @@ to the combined-table form.
#define PyDict_MINSIZE_COMBINED 8
#include "Python.h"
+#include "dict-common.h"
#include "stringlib/eq.h"
/*[clinic input]
@@ -74,24 +75,6 @@ class dict "PyDictObject *" "&PyDict_Type"
[clinic start generated code]*/
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=f157a5a0ce9589d6]*/
-typedef struct {
- /* Cached hash code of me_key. */
- Py_hash_t me_hash;
- PyObject *me_key;
- PyObject *me_value; /* This field is only meaningful for combined tables */
-} PyDictKeyEntry;
-
-typedef PyDictKeyEntry *(*dict_lookup_func)
-(PyDictObject *mp, PyObject *key, Py_hash_t hash, PyObject ***value_addr);
-
-struct _dictkeysobject {
- Py_ssize_t dk_refcnt;
- Py_ssize_t dk_size;
- dict_lookup_func dk_lookup;
- Py_ssize_t dk_usable;
- PyDictKeyEntry dk_entries[1];
-};
-
/*
To ensure the lookup algorithm terminates, there must be at least one Unused
@@ -233,6 +216,8 @@ static int dictresize(PyDictObject *mp, Py_ssize_t minused);
static PyDictObject *free_list[PyDict_MAXFREELIST];
static int numfree = 0;
+#include "clinic/dictobject.c.h"
+
int
PyDict_ClearFreeList(void)
{
@@ -1079,8 +1064,44 @@ PyDict_GetItem(PyObject *op, PyObject *key)
Let's just hope that no exception occurs then... This must be
_PyThreadState_Current and not PyThreadState_GET() because in debug
mode, the latter complains if tstate is NULL. */
- tstate = (PyThreadState*)_Py_atomic_load_relaxed(
- &_PyThreadState_Current);
+ tstate = _PyThreadState_UncheckedGet();
+ if (tstate != NULL && tstate->curexc_type != NULL) {
+ /* preserve the existing exception */
+ PyObject *err_type, *err_value, *err_tb;
+ PyErr_Fetch(&err_type, &err_value, &err_tb);
+ ep = (mp->ma_keys->dk_lookup)(mp, key, hash, &value_addr);
+ /* ignore errors */
+ PyErr_Restore(err_type, err_value, err_tb);
+ if (ep == NULL)
+ return NULL;
+ }
+ else {
+ ep = (mp->ma_keys->dk_lookup)(mp, key, hash, &value_addr);
+ if (ep == NULL) {
+ PyErr_Clear();
+ return NULL;
+ }
+ }
+ return *value_addr;
+}
+
+PyObject *
+_PyDict_GetItem_KnownHash(PyObject *op, PyObject *key, Py_hash_t hash)
+{
+ PyDictObject *mp = (PyDictObject *)op;
+ PyDictKeyEntry *ep;
+ PyThreadState *tstate;
+ PyObject **value_addr;
+
+ if (!PyDict_Check(op))
+ return NULL;
+
+ /* We can arrive here with a NULL tstate during initialization: try
+ running "python -Wi" for an example related to string interning.
+ Let's just hope that no exception occurs then... This must be
+ _PyThreadState_Current and not PyThreadState_GET() because in debug
+ mode, the latter complains if tstate is NULL. */
+ tstate = _PyThreadState_UncheckedGet();
if (tstate != NULL && tstate->curexc_type != NULL) {
/* preserve the existing exception */
PyObject *err_type, *err_value, *err_tb;
@@ -1208,6 +1229,25 @@ PyDict_SetItem(PyObject *op, PyObject *key, PyObject *value)
}
int
+_PyDict_SetItem_KnownHash(PyObject *op, PyObject *key, PyObject *value,
+ Py_hash_t hash)
+{
+ PyDictObject *mp;
+
+ if (!PyDict_Check(op)) {
+ PyErr_BadInternalCall();
+ return -1;
+ }
+ assert(key);
+ assert(value);
+ assert(hash != -1);
+ mp = (PyDictObject *)op;
+
+ /* insertdict() handles any resizing that might be necessary */
+ return insertdict(mp, key, hash, value);
+}
+
+int
PyDict_DelItem(PyObject *op, PyObject *key)
{
PyDictObject *mp;
@@ -1249,6 +1289,42 @@ PyDict_DelItem(PyObject *op, PyObject *key)
return 0;
}
+int
+_PyDict_DelItem_KnownHash(PyObject *op, PyObject *key, Py_hash_t hash)
+{
+ PyDictObject *mp;
+ PyDictKeyEntry *ep;
+ PyObject *old_key, *old_value;
+ PyObject **value_addr;
+
+ if (!PyDict_Check(op)) {
+ PyErr_BadInternalCall();
+ return -1;
+ }
+ assert(key);
+ assert(hash != -1);
+ mp = (PyDictObject *)op;
+ ep = (mp->ma_keys->dk_lookup)(mp, key, hash, &value_addr);
+ if (ep == NULL)
+ return -1;
+ if (*value_addr == NULL) {
+ _PyErr_SetKeyError(key);
+ return -1;
+ }
+ old_value = *value_addr;
+ *value_addr = NULL;
+ mp->ma_used--;
+ if (!_PyDict_HasSplitTable(mp)) {
+ ENSURE_ALLOWS_DELETIONS(mp);
+ old_key = ep->me_key;
+ Py_INCREF(dummy);
+ ep->me_key = dummy;
+ Py_DECREF(old_key);
+ }
+ Py_DECREF(old_value);
+ return 0;
+}
+
void
PyDict_Clear(PyObject *op)
{
@@ -1367,6 +1443,141 @@ _PyDict_Next(PyObject *op, Py_ssize_t *ppos, PyObject **pkey,
return 1;
}
+/* Internal version of dict.pop(). */
+PyObject *
+_PyDict_Pop(PyDictObject *mp, PyObject *key, PyObject *deflt)
+{
+ Py_hash_t hash;
+ PyObject *old_value, *old_key;
+ PyDictKeyEntry *ep;
+ PyObject **value_addr;
+
+ if (mp->ma_used == 0) {
+ if (deflt) {
+ Py_INCREF(deflt);
+ return deflt;
+ }
+ _PyErr_SetKeyError(key);
+ return NULL;
+ }
+ if (!PyUnicode_CheckExact(key) ||
+ (hash = ((PyASCIIObject *) key)->hash) == -1) {
+ hash = PyObject_Hash(key);
+ if (hash == -1)
+ return NULL;
+ }
+ ep = (mp->ma_keys->dk_lookup)(mp, key, hash, &value_addr);
+ if (ep == NULL)
+ return NULL;
+ old_value = *value_addr;
+ if (old_value == NULL) {
+ if (deflt) {
+ Py_INCREF(deflt);
+ return deflt;
+ }
+ _PyErr_SetKeyError(key);
+ return NULL;
+ }
+ *value_addr = NULL;
+ mp->ma_used--;
+ if (!_PyDict_HasSplitTable(mp)) {
+ ENSURE_ALLOWS_DELETIONS(mp);
+ old_key = ep->me_key;
+ Py_INCREF(dummy);
+ ep->me_key = dummy;
+ Py_DECREF(old_key);
+ }
+ return old_value;
+}
+
+/* Internal version of dict.from_keys(). It is subclass-friendly. */
+PyObject *
+_PyDict_FromKeys(PyObject *cls, PyObject *iterable, PyObject *value)
+{
+ PyObject *it; /* iter(iterable) */
+ PyObject *key;
+ PyObject *d;
+ int status;
+
+ d = PyObject_CallObject(cls, NULL);
+ if (d == NULL)
+ return NULL;
+
+ if (PyDict_CheckExact(d) && ((PyDictObject *)d)->ma_used == 0) {
+ if (PyDict_CheckExact(iterable)) {
+ PyDictObject *mp = (PyDictObject *)d;
+ PyObject *oldvalue;
+ Py_ssize_t pos = 0;
+ PyObject *key;
+ Py_hash_t hash;
+
+ if (dictresize(mp, Py_SIZE(iterable))) {
+ Py_DECREF(d);
+ return NULL;
+ }
+
+ while (_PyDict_Next(iterable, &pos, &key, &oldvalue, &hash)) {
+ if (insertdict(mp, key, hash, value)) {
+ Py_DECREF(d);
+ return NULL;
+ }
+ }
+ return d;
+ }
+ if (PyAnySet_CheckExact(iterable)) {
+ PyDictObject *mp = (PyDictObject *)d;
+ Py_ssize_t pos = 0;
+ PyObject *key;
+ Py_hash_t hash;
+
+ if (dictresize(mp, PySet_GET_SIZE(iterable))) {
+ Py_DECREF(d);
+ return NULL;
+ }
+
+ while (_PySet_NextEntry(iterable, &pos, &key, &hash)) {
+ if (insertdict(mp, key, hash, value)) {
+ Py_DECREF(d);
+ return NULL;
+ }
+ }
+ return d;
+ }
+ }
+
+ it = PyObject_GetIter(iterable);
+ if (it == NULL){
+ Py_DECREF(d);
+ return NULL;
+ }
+
+ if (PyDict_CheckExact(d)) {
+ while ((key = PyIter_Next(it)) != NULL) {
+ status = PyDict_SetItem(d, key, value);
+ Py_DECREF(key);
+ if (status < 0)
+ goto Fail;
+ }
+ } else {
+ while ((key = PyIter_Next(it)) != NULL) {
+ status = PyObject_SetItem(d, key, value);
+ Py_DECREF(key);
+ if (status < 0)
+ goto Fail;
+ }
+ }
+
+ if (PyErr_Occurred())
+ goto Fail;
+ Py_DECREF(it);
+ return d;
+
+Fail:
+ Py_DECREF(it);
+ Py_DECREF(d);
+ return NULL;
+}
+
/* Methods */
static void
@@ -1701,121 +1912,11 @@ dict.fromkeys
Returns a new dict with keys from iterable and values equal to value.
[clinic start generated code]*/
-PyDoc_STRVAR(dict_fromkeys__doc__,
-"fromkeys($type, iterable, value=None, /)\n"
-"--\n"
-"\n"
-"Returns a new dict with keys from iterable and values equal to value.");
-
-#define DICT_FROMKEYS_METHODDEF \
- {"fromkeys", (PyCFunction)dict_fromkeys, METH_VARARGS|METH_CLASS, dict_fromkeys__doc__},
-
-static PyObject *
-dict_fromkeys_impl(PyTypeObject *type, PyObject *iterable, PyObject *value);
-
-static PyObject *
-dict_fromkeys(PyTypeObject *type, PyObject *args)
-{
- PyObject *return_value = NULL;
- PyObject *iterable;
- PyObject *value = Py_None;
-
- if (!PyArg_UnpackTuple(args, "fromkeys",
- 1, 2,
- &iterable, &value))
- goto exit;
- return_value = dict_fromkeys_impl(type, iterable, value);
-
-exit:
- return return_value;
-}
-
static PyObject *
dict_fromkeys_impl(PyTypeObject *type, PyObject *iterable, PyObject *value)
-/*[clinic end generated code: output=55f8dc0ffa87406f input=b85a667f9bf4669d]*/
+/*[clinic end generated code: output=8fb98e4b10384999 input=b85a667f9bf4669d]*/
{
- PyObject *it; /* iter(seq) */
- PyObject *key;
- PyObject *d;
- int status;
-
- d = PyObject_CallObject((PyObject *)type, NULL);
- if (d == NULL)
- return NULL;
-
- if (PyDict_CheckExact(d) && ((PyDictObject *)d)->ma_used == 0) {
- if (PyDict_CheckExact(iterable)) {
- PyDictObject *mp = (PyDictObject *)d;
- PyObject *oldvalue;
- Py_ssize_t pos = 0;
- PyObject *key;
- Py_hash_t hash;
-
- if (dictresize(mp, Py_SIZE(iterable))) {
- Py_DECREF(d);
- return NULL;
- }
-
- while (_PyDict_Next(iterable, &pos, &key, &oldvalue, &hash)) {
- if (insertdict(mp, key, hash, value)) {
- Py_DECREF(d);
- return NULL;
- }
- }
- return d;
- }
- if (PyAnySet_CheckExact(iterable)) {
- PyDictObject *mp = (PyDictObject *)d;
- Py_ssize_t pos = 0;
- PyObject *key;
- Py_hash_t hash;
-
- if (dictresize(mp, PySet_GET_SIZE(iterable))) {
- Py_DECREF(d);
- return NULL;
- }
-
- while (_PySet_NextEntry(iterable, &pos, &key, &hash)) {
- if (insertdict(mp, key, hash, value)) {
- Py_DECREF(d);
- return NULL;
- }
- }
- return d;
- }
- }
-
- it = PyObject_GetIter(iterable);
- if (it == NULL){
- Py_DECREF(d);
- return NULL;
- }
-
- if (PyDict_CheckExact(d)) {
- while ((key = PyIter_Next(it)) != NULL) {
- status = PyDict_SetItem(d, key, value);
- Py_DECREF(key);
- if (status < 0)
- goto Fail;
- }
- } else {
- while ((key = PyIter_Next(it)) != NULL) {
- status = PyObject_SetItem(d, key, value);
- Py_DECREF(key);
- if (status < 0)
- goto Fail;
- }
- }
-
- if (PyErr_Occurred())
- goto Fail;
- Py_DECREF(it);
- return d;
-
-Fail:
- Py_DECREF(it);
- Py_DECREF(d);
- return NULL;
+ return _PyDict_FromKeys((PyObject *)type, iterable, value);
}
static int
@@ -2222,18 +2323,9 @@ dict.__contains__
True if D has a key k, else False.
[clinic start generated code]*/
-PyDoc_STRVAR(dict___contains____doc__,
-"__contains__($self, key, /)\n"
-"--\n"
-"\n"
-"True if D has a key k, else False.");
-
-#define DICT___CONTAINS___METHODDEF \
- {"__contains__", (PyCFunction)dict___contains__, METH_O|METH_COEXIST, dict___contains____doc__},
-
static PyObject *
dict___contains__(PyDictObject *self, PyObject *key)
-/*[clinic end generated code: output=3cf3f8aaf2cc5cc3 input=b852b2a19b51ab24]*/
+/*[clinic end generated code: output=a3d03db709ed6e6b input=b852b2a19b51ab24]*/
{
register PyDictObject *mp = self;
Py_hash_t hash;
@@ -2348,50 +2440,12 @@ dict_clear(PyDictObject *mp)
static PyObject *
dict_pop(PyDictObject *mp, PyObject *args)
{
- Py_hash_t hash;
- PyObject *old_value, *old_key;
PyObject *key, *deflt = NULL;
- PyDictKeyEntry *ep;
- PyObject **value_addr;
if(!PyArg_UnpackTuple(args, "pop", 1, 2, &key, &deflt))
return NULL;
- if (mp->ma_used == 0) {
- if (deflt) {
- Py_INCREF(deflt);
- return deflt;
- }
- _PyErr_SetKeyError(key);
- return NULL;
- }
- if (!PyUnicode_CheckExact(key) ||
- (hash = ((PyASCIIObject *) key)->hash) == -1) {
- hash = PyObject_Hash(key);
- if (hash == -1)
- return NULL;
- }
- ep = (mp->ma_keys->dk_lookup)(mp, key, hash, &value_addr);
- if (ep == NULL)
- return NULL;
- old_value = *value_addr;
- if (old_value == NULL) {
- if (deflt) {
- Py_INCREF(deflt);
- return deflt;
- }
- _PyErr_SetKeyError(key);
- return NULL;
- }
- *value_addr = NULL;
- mp->ma_used--;
- if (!_PyDict_HasSplitTable(mp)) {
- ENSURE_ALLOWS_DELETIONS(mp);
- old_key = ep->me_key;
- Py_INCREF(dummy);
- ep->me_key = dummy;
- Py_DECREF(old_key);
- }
- return old_value;
+
+ return _PyDict_Pop(mp, key, deflt);
}
static PyObject *
@@ -2498,20 +2552,20 @@ dict_tp_clear(PyObject *op)
static PyObject *dictiter_new(PyDictObject *, PyTypeObject *);
-static PyObject *
-dict_sizeof(PyDictObject *mp)
+Py_ssize_t
+_PyDict_SizeOf(PyDictObject *mp)
{
Py_ssize_t size, res;
size = DK_SIZE(mp->ma_keys);
- res = sizeof(PyDictObject);
+ res = _PyObject_SIZE(Py_TYPE(mp));
if (mp->ma_values)
res += size * sizeof(PyObject*);
/* If the dictionary is split, the keys portion is accounted-for
in the type object. */
if (mp->ma_keys->dk_refcnt == 1)
res += sizeof(PyDictKeysObject) + (size-1) * sizeof(PyDictKeyEntry);
- return PyLong_FromSsize_t(res);
+ return res;
}
Py_ssize_t
@@ -2520,6 +2574,12 @@ _PyDict_KeysSize(PyDictKeysObject *keys)
return sizeof(PyDictKeysObject) + (DK_SIZE(keys)-1) * sizeof(PyDictKeyEntry);
}
+static PyObject *
+dict_sizeof(PyDictObject *mp)
+{
+ return PyLong_FromSsize_t(_PyDict_SizeOf(mp));
+}
+
PyDoc_STRVAR(getitem__doc__, "x.__getitem__(y) <==> x[y]");
PyDoc_STRVAR(sizeof__doc__,
@@ -2925,8 +2985,8 @@ static PyObject *dictiter_iternextkey(dictiterobject *di)
return key;
fail:
- Py_DECREF(d);
di->di_dict = NULL;
+ Py_DECREF(d);
return NULL;
}
@@ -3006,8 +3066,8 @@ static PyObject *dictiter_iternextvalue(dictiterobject *di)
return value;
fail:
- Py_DECREF(d);
di->di_dict = NULL;
+ Py_DECREF(d);
return NULL;
}
@@ -3096,13 +3156,13 @@ static PyObject *dictiter_iternextitem(dictiterobject *di)
value = *value_ptr;
Py_INCREF(key);
Py_INCREF(value);
- PyTuple_SET_ITEM(result, 0, key);
- PyTuple_SET_ITEM(result, 1, value);
+ PyTuple_SET_ITEM(result, 0, key); /* steals reference */
+ PyTuple_SET_ITEM(result, 1, value); /* steals reference */
return result;
fail:
- Py_DECREF(d);
di->di_dict = NULL;
+ Py_DECREF(d);
return NULL;
}
@@ -3192,28 +3252,22 @@ dictiter_reduce(dictiterobject *di)
/* The instance lay-out is the same for all three; but the type differs. */
-typedef struct {
- PyObject_HEAD
- PyDictObject *dv_dict;
-} dictviewobject;
-
-
static void
-dictview_dealloc(dictviewobject *dv)
+dictview_dealloc(_PyDictViewObject *dv)
{
Py_XDECREF(dv->dv_dict);
PyObject_GC_Del(dv);
}
static int
-dictview_traverse(dictviewobject *dv, visitproc visit, void *arg)
+dictview_traverse(_PyDictViewObject *dv, visitproc visit, void *arg)
{
Py_VISIT(dv->dv_dict);
return 0;
}
static Py_ssize_t
-dictview_len(dictviewobject *dv)
+dictview_len(_PyDictViewObject *dv)
{
Py_ssize_t len = 0;
if (dv->dv_dict != NULL)
@@ -3221,10 +3275,10 @@ dictview_len(dictviewobject *dv)
return len;
}
-static PyObject *
-dictview_new(PyObject *dict, PyTypeObject *type)
+PyObject *
+_PyDictView_New(PyObject *dict, PyTypeObject *type)
{
- dictviewobject *dv;
+ _PyDictViewObject *dv;
if (dict == NULL) {
PyErr_BadInternalCall();
return NULL;
@@ -3236,7 +3290,7 @@ dictview_new(PyObject *dict, PyTypeObject *type)
type->tp_name, dict->ob_type->tp_name);
return NULL;
}
- dv = PyObject_GC_New(dictviewobject, type);
+ dv = PyObject_GC_New(_PyDictViewObject, type);
if (dv == NULL)
return NULL;
Py_INCREF(dict);
@@ -3340,7 +3394,7 @@ dictview_richcompare(PyObject *self, PyObject *other, int op)
}
static PyObject *
-dictview_repr(dictviewobject *dv)
+dictview_repr(_PyDictViewObject *dv)
{
PyObject *seq;
PyObject *result;
@@ -3357,7 +3411,7 @@ dictview_repr(dictviewobject *dv)
/*** dict_keys ***/
static PyObject *
-dictkeys_iter(dictviewobject *dv)
+dictkeys_iter(_PyDictViewObject *dv)
{
if (dv->dv_dict == NULL) {
Py_RETURN_NONE;
@@ -3366,7 +3420,7 @@ dictkeys_iter(dictviewobject *dv)
}
static int
-dictkeys_contains(dictviewobject *dv, PyObject *obj)
+dictkeys_contains(_PyDictViewObject *dv, PyObject *obj)
{
if (dv->dv_dict == NULL)
return 0;
@@ -3404,8 +3458,8 @@ dictviews_sub(PyObject* self, PyObject *other)
return result;
}
-static PyObject*
-dictviews_and(PyObject* self, PyObject *other)
+PyObject*
+_PyDictView_Intersect(PyObject* self, PyObject *other)
{
PyObject *result = PySet_New(self);
PyObject *tmp;
@@ -3478,7 +3532,7 @@ static PyNumberMethods dictviews_as_number = {
0, /*nb_invert*/
0, /*nb_lshift*/
0, /*nb_rshift*/
- (binaryfunc)dictviews_and, /*nb_and*/
+ (binaryfunc)_PyDictView_Intersect, /*nb_and*/
(binaryfunc)dictviews_xor, /*nb_xor*/
(binaryfunc)dictviews_or, /*nb_or*/
};
@@ -3490,7 +3544,7 @@ dictviews_isdisjoint(PyObject *self, PyObject *other)
PyObject *item = NULL;
if (self == other) {
- if (dictview_len((dictviewobject *)self) == 0)
+ if (dictview_len((_PyDictViewObject *)self) == 0)
Py_RETURN_TRUE;
else
Py_RETURN_FALSE;
@@ -3499,7 +3553,7 @@ dictviews_isdisjoint(PyObject *self, PyObject *other)
/* Iterate over the shorter object (only if other is a set,
* because PySequence_Contains may be expensive otherwise): */
if (PyAnySet_Check(other) || PyDictViewSet_Check(other)) {
- Py_ssize_t len_self = dictview_len((dictviewobject *)self);
+ Py_ssize_t len_self = dictview_len((_PyDictViewObject *)self);
Py_ssize_t len_other = PyObject_Size(other);
if (len_other == -1)
return NULL;
@@ -3546,7 +3600,7 @@ static PyMethodDef dictkeys_methods[] = {
PyTypeObject PyDictKeys_Type = {
PyVarObject_HEAD_INIT(&PyType_Type, 0)
"dict_keys", /* tp_name */
- sizeof(dictviewobject), /* tp_basicsize */
+ sizeof(_PyDictViewObject), /* tp_basicsize */
0, /* tp_itemsize */
/* methods */
(destructor)dictview_dealloc, /* tp_dealloc */
@@ -3579,13 +3633,13 @@ PyTypeObject PyDictKeys_Type = {
static PyObject *
dictkeys_new(PyObject *dict)
{
- return dictview_new(dict, &PyDictKeys_Type);
+ return _PyDictView_New(dict, &PyDictKeys_Type);
}
/*** dict_items ***/
static PyObject *
-dictitems_iter(dictviewobject *dv)
+dictitems_iter(_PyDictViewObject *dv)
{
if (dv->dv_dict == NULL) {
Py_RETURN_NONE;
@@ -3594,7 +3648,7 @@ dictitems_iter(dictviewobject *dv)
}
static int
-dictitems_contains(dictviewobject *dv, PyObject *obj)
+dictitems_contains(_PyDictViewObject *dv, PyObject *obj)
{
PyObject *key, *value, *found;
if (dv->dv_dict == NULL)
@@ -3632,7 +3686,7 @@ static PyMethodDef dictitems_methods[] = {
PyTypeObject PyDictItems_Type = {
PyVarObject_HEAD_INIT(&PyType_Type, 0)
"dict_items", /* tp_name */
- sizeof(dictviewobject), /* tp_basicsize */
+ sizeof(_PyDictViewObject), /* tp_basicsize */
0, /* tp_itemsize */
/* methods */
(destructor)dictview_dealloc, /* tp_dealloc */
@@ -3665,13 +3719,13 @@ PyTypeObject PyDictItems_Type = {
static PyObject *
dictitems_new(PyObject *dict)
{
- return dictview_new(dict, &PyDictItems_Type);
+ return _PyDictView_New(dict, &PyDictItems_Type);
}
/*** dict_values ***/
static PyObject *
-dictvalues_iter(dictviewobject *dv)
+dictvalues_iter(_PyDictViewObject *dv)
{
if (dv->dv_dict == NULL) {
Py_RETURN_NONE;
@@ -3697,7 +3751,7 @@ static PyMethodDef dictvalues_methods[] = {
PyTypeObject PyDictValues_Type = {
PyVarObject_HEAD_INIT(&PyType_Type, 0)
"dict_values", /* tp_name */
- sizeof(dictviewobject), /* tp_basicsize */
+ sizeof(_PyDictViewObject), /* tp_basicsize */
0, /* tp_itemsize */
/* methods */
(destructor)dictview_dealloc, /* tp_dealloc */
@@ -3730,7 +3784,7 @@ PyTypeObject PyDictValues_Type = {
static PyObject *
dictvalues_new(PyObject *dict)
{
- return dictview_new(dict, &PyDictValues_Type);
+ return _PyDictView_New(dict, &PyDictValues_Type);
}
/* Returns NULL if cannot allocate a new PyDictKeysObject,
diff --git a/Objects/exceptions.c b/Objects/exceptions.c
index 1a218c123d..aaff0bc63d 100644
--- a/Objects/exceptions.c
+++ b/Objects/exceptions.c
@@ -206,8 +206,7 @@ BaseException_set_args(PyBaseExceptionObject *self, PyObject *val)
seq = PySequence_Tuple(val);
if (!seq)
return -1;
- Py_CLEAR(self->args);
- self->args = seq;
+ Py_XSETREF(self->args, seq);
return 0;
}
@@ -236,8 +235,7 @@ BaseException_set_tb(PyBaseExceptionObject *self, PyObject *tb)
}
Py_XINCREF(tb);
- Py_XDECREF(self->traceback);
- self->traceback = tb;
+ Py_XSETREF(self->traceback, tb);
return 0;
}
@@ -473,6 +471,13 @@ SimpleExtendsException(PyExc_Exception, TypeError,
/*
+ * StopAsyncIteration extends Exception
+ */
+SimpleExtendsException(PyExc_Exception, StopAsyncIteration,
+ "Signal the end from iterator.__anext__().");
+
+
+/*
* StopIteration extends Exception
*/
@@ -556,12 +561,14 @@ SystemExit_init(PySystemExitObject *self, PyObject *args, PyObject *kwds)
if (size == 0)
return 0;
- Py_CLEAR(self->code);
- if (size == 1)
- self->code = PyTuple_GET_ITEM(args, 0);
- else /* size > 1 */
- self->code = args;
- Py_INCREF(self->code);
+ if (size == 1) {
+ Py_INCREF(PyTuple_GET_ITEM(args, 0));
+ Py_XSETREF(self->code, PyTuple_GET_ITEM(args, 0));
+ }
+ else { /* size > 1 */
+ Py_INCREF(args);
+ Py_XSETREF(self->code, args);
+ }
return 0;
}
@@ -620,9 +627,8 @@ ImportError_init(PyImportErrorObject *self, PyObject *args, PyObject *kwds)
#define GET_KWD(kwd) { \
kwd = PyDict_GetItemString(kwds, #kwd); \
if (kwd) { \
- Py_CLEAR(self->kwd); \
- self->kwd = kwd; \
- Py_INCREF(self->kwd);\
+ Py_INCREF(kwd); \
+ Py_XSETREF(self->kwd, kwd); \
if (PyDict_DelItemString(kwds, #kwd)) \
return -1; \
} \
@@ -640,9 +646,8 @@ ImportError_init(PyImportErrorObject *self, PyObject *args, PyObject *kwds)
if (!PyArg_UnpackTuple(args, "ImportError", 1, 1, &msg))
return -1;
- Py_CLEAR(self->msg); /* replacing */
- self->msg = msg;
- Py_INCREF(self->msg);
+ Py_INCREF(msg);
+ Py_XSETREF(self->msg, msg);
return 0;
}
@@ -852,8 +857,7 @@ oserror_init(PyOSErrorObject *self, PyObject **p_args,
#endif
/* Steals the reference to args */
- Py_CLEAR(self->args);
- self->args = args;
+ Py_XSETREF(self->args, args);
*p_args = args = NULL;
return 0;
@@ -872,7 +876,7 @@ oserror_use_init(PyTypeObject *type)
solution, given __new__ takes a variable number of arguments,
is to defer arg parsing and initialization to __init__.
- But when __new__ is overriden as well, it should call our __new__
+ But when __new__ is overridden as well, it should call our __new__
with the right arguments.
(see http://bugs.python.org/issue12555#msg148829 )
@@ -1224,6 +1228,11 @@ SimpleExtendsException(PyExc_Exception, EOFError,
SimpleExtendsException(PyExc_Exception, RuntimeError,
"Unspecified run-time error.");
+/*
+ * RecursionError extends RuntimeError
+ */
+SimpleExtendsException(PyExc_RuntimeError, RecursionError,
+ "Recursion limit exceeded.");
/*
* NotImplementedError extends RuntimeError
@@ -1267,9 +1276,8 @@ SyntaxError_init(PySyntaxErrorObject *self, PyObject *args, PyObject *kwds)
return -1;
if (lenargs >= 1) {
- Py_CLEAR(self->msg);
- self->msg = PyTuple_GET_ITEM(args, 0);
- Py_INCREF(self->msg);
+ Py_INCREF(PyTuple_GET_ITEM(args, 0));
+ Py_XSETREF(self->msg, PyTuple_GET_ITEM(args, 0));
}
if (lenargs == 2) {
info = PyTuple_GET_ITEM(args, 1);
@@ -1284,21 +1292,17 @@ SyntaxError_init(PySyntaxErrorObject *self, PyObject *args, PyObject *kwds)
return -1;
}
- Py_CLEAR(self->filename);
- self->filename = PyTuple_GET_ITEM(info, 0);
- Py_INCREF(self->filename);
+ Py_INCREF(PyTuple_GET_ITEM(info, 0));
+ Py_XSETREF(self->filename, PyTuple_GET_ITEM(info, 0));
- Py_CLEAR(self->lineno);
- self->lineno = PyTuple_GET_ITEM(info, 1);
- Py_INCREF(self->lineno);
+ Py_INCREF(PyTuple_GET_ITEM(info, 1));
+ Py_XSETREF(self->lineno, PyTuple_GET_ITEM(info, 1));
- Py_CLEAR(self->offset);
- self->offset = PyTuple_GET_ITEM(info, 2);
- Py_INCREF(self->offset);
+ Py_INCREF(PyTuple_GET_ITEM(info, 2));
+ Py_XSETREF(self->offset, PyTuple_GET_ITEM(info, 2));
- Py_CLEAR(self->text);
- self->text = PyTuple_GET_ITEM(info, 3);
- Py_INCREF(self->text);
+ Py_INCREF(PyTuple_GET_ITEM(info, 3));
+ Py_XSETREF(self->text, PyTuple_GET_ITEM(info, 3));
Py_DECREF(info);
@@ -1543,8 +1547,7 @@ set_unicodefromstring(PyObject **attr, const char *value)
PyObject *obj = PyUnicode_FromString(value);
if (!obj)
return -1;
- Py_CLEAR(*attr);
- *attr = obj;
+ Py_XSETREF(*attr, obj);
return 0;
}
@@ -1950,8 +1953,7 @@ UnicodeDecodeError_init(PyObject *self, PyObject *args, PyObject *kwds)
Py_buffer view;
if (PyObject_GetBuffer(ude->object, &view, PyBUF_SIMPLE) != 0)
goto error;
- Py_CLEAR(ude->object);
- ude->object = PyBytes_FromStringAndSize(view.buf, view.len);
+ Py_XSETREF(ude->object, PyBytes_FromStringAndSize(view.buf, view.len));
PyBuffer_Release(&view);
if (!ude->object)
goto error;
@@ -2373,7 +2375,7 @@ SimpleExtendsException(PyExc_Warning, ResourceWarning,
-/* Pre-computed RuntimeError instance for when recursion depth is reached.
+/* Pre-computed RecursionError instance for when recursion depth is reached.
Meant to be used when normalizing the exception for exceeding the recursion
depth will cause its own infinite recursion.
*/
@@ -2468,6 +2470,7 @@ _PyExc_Init(PyObject *bltinmod)
PRE_INIT(BaseException)
PRE_INIT(Exception)
PRE_INIT(TypeError)
+ PRE_INIT(StopAsyncIteration)
PRE_INIT(StopIteration)
PRE_INIT(GeneratorExit)
PRE_INIT(SystemExit)
@@ -2476,6 +2479,7 @@ _PyExc_Init(PyObject *bltinmod)
PRE_INIT(OSError)
PRE_INIT(EOFError)
PRE_INIT(RuntimeError)
+ PRE_INIT(RecursionError)
PRE_INIT(NotImplementedError)
PRE_INIT(NameError)
PRE_INIT(UnboundLocalError)
@@ -2538,6 +2542,7 @@ _PyExc_Init(PyObject *bltinmod)
POST_INIT(BaseException)
POST_INIT(Exception)
POST_INIT(TypeError)
+ POST_INIT(StopAsyncIteration)
POST_INIT(StopIteration)
POST_INIT(GeneratorExit)
POST_INIT(SystemExit)
@@ -2551,6 +2556,7 @@ _PyExc_Init(PyObject *bltinmod)
#endif
POST_INIT(EOFError)
POST_INIT(RuntimeError)
+ POST_INIT(RecursionError)
POST_INIT(NotImplementedError)
POST_INIT(NameError)
POST_INIT(UnboundLocalError)
@@ -2634,9 +2640,9 @@ _PyExc_Init(PyObject *bltinmod)
preallocate_memerrors();
if (!PyExc_RecursionErrorInst) {
- PyExc_RecursionErrorInst = BaseException_new(&_PyExc_RuntimeError, NULL, NULL);
+ PyExc_RecursionErrorInst = BaseException_new(&_PyExc_RecursionError, NULL, NULL);
if (!PyExc_RecursionErrorInst)
- Py_FatalError("Cannot pre-allocate RuntimeError instance for "
+ Py_FatalError("Cannot pre-allocate RecursionError instance for "
"recursion errors");
else {
PyBaseExceptionObject *err_inst =
@@ -2645,15 +2651,15 @@ _PyExc_Init(PyObject *bltinmod)
PyObject *exc_message;
exc_message = PyUnicode_FromString("maximum recursion depth exceeded");
if (!exc_message)
- Py_FatalError("cannot allocate argument for RuntimeError "
+ Py_FatalError("cannot allocate argument for RecursionError "
"pre-allocation");
args_tuple = PyTuple_Pack(1, exc_message);
if (!args_tuple)
- Py_FatalError("cannot allocate tuple for RuntimeError "
+ Py_FatalError("cannot allocate tuple for RecursionError "
"pre-allocation");
Py_DECREF(exc_message);
if (BaseException_init(err_inst, args_tuple, NULL))
- Py_FatalError("init of pre-allocated RuntimeError failed");
+ Py_FatalError("init of pre-allocated RecursionError failed");
Py_DECREF(args_tuple);
}
}
@@ -2718,7 +2724,7 @@ _PyErr_TrySetFromCause(const char *format, ...)
same_basic_size = (
caught_type_size == base_exc_size ||
(PyType_SUPPORTS_WEAKREFS(caught_type) &&
- (caught_type_size == base_exc_size + sizeof(PyObject *))
+ (caught_type_size == base_exc_size + (Py_ssize_t)sizeof(PyObject *))
)
);
if (caught_type->tp_init != (initproc)BaseException_init ||
@@ -2856,9 +2862,8 @@ _check_for_legacy_statements(PySyntaxErrorObject *self, Py_ssize_t start)
}
if (PyUnicode_Tailmatch(self->text, print_prefix,
start, text_len, -1)) {
- Py_CLEAR(self->msg);
- self->msg = PyUnicode_FromString(
- "Missing parentheses in call to 'print'");
+ Py_XSETREF(self->msg,
+ PyUnicode_FromString("Missing parentheses in call to 'print'"));
return 1;
}
@@ -2871,9 +2876,8 @@ _check_for_legacy_statements(PySyntaxErrorObject *self, Py_ssize_t start)
}
if (PyUnicode_Tailmatch(self->text, exec_prefix,
start, text_len, -1)) {
- Py_CLEAR(self->msg);
- self->msg = PyUnicode_FromString(
- "Missing parentheses in call to 'exec'");
+ Py_XSETREF(self->msg,
+ PyUnicode_FromString("Missing parentheses in call to 'exec'"));
return 1;
}
/* Fall back to the default error message */
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index 1a93a6dd6b..234d07e5c6 100644
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -402,26 +402,17 @@ stdprinter_write(PyStdPrinter_Object *self, PyObject *args)
}
}
- Py_BEGIN_ALLOW_THREADS
- errno = 0;
-#ifdef MS_WINDOWS
- if (n > INT_MAX)
- n = INT_MAX;
- n = write(self->fd, str, (int)n);
-#else
- n = write(self->fd, str, n);
-#endif
+ n = _Py_write(self->fd, str, n);
/* save errno, it can be modified indirectly by Py_XDECREF() */
err = errno;
- Py_END_ALLOW_THREADS
Py_XDECREF(bytes);
- if (n < 0) {
- if (err == EAGAIN)
+ if (n == -1) {
+ if (err == EAGAIN) {
+ PyErr_Clear();
Py_RETURN_NONE;
- errno = err;
- PyErr_SetFromErrno(PyExc_IOError);
+ }
return NULL;
}
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index acd88d6fd3..d92bec35b5 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -1001,8 +1001,9 @@ float_round(PyObject *v, PyObject *args)
x = PyFloat_AsDouble(v);
if (!PyArg_ParseTuple(args, "|O", &o_ndigits))
return NULL;
- if (o_ndigits == NULL) {
- /* single-argument round: round to nearest integer */
+ if (o_ndigits == NULL || o_ndigits == Py_None) {
+ /* single-argument round or with None ndigits:
+ * round to nearest integer */
rounded = round(x);
if (fabs(x-rounded) == 0.5)
/* halfway case: round to even */
@@ -2048,7 +2049,7 @@ _PyFloat_Pack4(double x, unsigned char *p, int le)
}
else {
float y = (float)x;
- const char *s = (char*)&y;
+ const unsigned char *s = (unsigned char*)&y;
int i, incr = 1;
if (Py_IS_INFINITY(y) && !Py_IS_INFINITY(x))
@@ -2184,7 +2185,7 @@ _PyFloat_Pack8(double x, unsigned char *p, int le)
return -1;
}
else {
- const char *s = (char*)&x;
+ const unsigned char *s = (unsigned char*)&x;
int i, incr = 1;
if ((double_format == ieee_little_endian_format && !le)
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index 55ee5630f6..9aadd61019 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -196,6 +196,7 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno)
case SETUP_EXCEPT:
case SETUP_FINALLY:
case SETUP_WITH:
+ case SETUP_ASYNC_WITH:
blockstack[blockstack_top++] = addr;
in_finally[blockstack_top-1] = 0;
break;
@@ -203,7 +204,8 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno)
case POP_BLOCK:
assert(blockstack_top > 0);
setup_op = code[blockstack[blockstack_top-1]];
- if (setup_op == SETUP_FINALLY || setup_op == SETUP_WITH) {
+ if (setup_op == SETUP_FINALLY || setup_op == SETUP_WITH
+ || setup_op == SETUP_ASYNC_WITH) {
in_finally[blockstack_top-1] = 1;
}
else {
@@ -218,7 +220,8 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno)
* be seeing such an END_FINALLY.) */
if (blockstack_top > 0) {
setup_op = code[blockstack[blockstack_top-1]];
- if (setup_op == SETUP_FINALLY || setup_op == SETUP_WITH) {
+ if (setup_op == SETUP_FINALLY || setup_op == SETUP_WITH
+ || setup_op == SETUP_ASYNC_WITH) {
blockstack_top--;
}
}
@@ -281,6 +284,7 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno)
case SETUP_EXCEPT:
case SETUP_FINALLY:
case SETUP_WITH:
+ case SETUP_ASYNC_WITH:
delta_iblock++;
break;
@@ -345,15 +349,13 @@ frame_gettrace(PyFrameObject *f, void *closure)
static int
frame_settrace(PyFrameObject *f, PyObject* v, void *closure)
{
- PyObject* old_value;
-
/* We rely on f_lineno being accurate when f_trace is set. */
f->f_lineno = PyFrame_GetLineNumber(f);
- old_value = f->f_trace;
+ if (v == Py_None)
+ v = NULL;
Py_XINCREF(v);
- f->f_trace = v;
- Py_XDECREF(old_value);
+ Py_XSETREF(f->f_trace, v);
return 0;
}
@@ -853,8 +855,7 @@ dict_to_map(PyObject *map, Py_ssize_t nmap, PyObject *dict, PyObject **values,
}
} else if (values[j] != value) {
Py_XINCREF(value);
- Py_XDECREF(values[j]);
- values[j] = value;
+ Py_XSETREF(values[j], value);
}
Py_XDECREF(value);
}
diff --git a/Objects/funcobject.c b/Objects/funcobject.c
index b04393415a..e6c327d22f 100644
--- a/Objects/funcobject.c
+++ b/Objects/funcobject.c
@@ -127,8 +127,7 @@ PyFunction_SetDefaults(PyObject *op, PyObject *defaults)
PyErr_SetString(PyExc_SystemError, "non-tuple default args");
return -1;
}
- Py_XDECREF(((PyFunctionObject *) op) -> func_defaults);
- ((PyFunctionObject *) op) -> func_defaults = defaults;
+ Py_XSETREF(((PyFunctionObject *)op)->func_defaults, defaults);
return 0;
}
@@ -159,8 +158,7 @@ PyFunction_SetKwDefaults(PyObject *op, PyObject *defaults)
"non-dict keyword only default args");
return -1;
}
- Py_XDECREF(((PyFunctionObject *)op) -> func_kwdefaults);
- ((PyFunctionObject *) op) -> func_kwdefaults = defaults;
+ Py_XSETREF(((PyFunctionObject *)op)->func_kwdefaults, defaults);
return 0;
}
@@ -192,8 +190,7 @@ PyFunction_SetClosure(PyObject *op, PyObject *closure)
closure->ob_type->tp_name);
return -1;
}
- Py_XDECREF(((PyFunctionObject *) op) -> func_closure);
- ((PyFunctionObject *) op) -> func_closure = closure;
+ Py_XSETREF(((PyFunctionObject *)op)->func_closure, closure);
return 0;
}
@@ -224,8 +221,7 @@ PyFunction_SetAnnotations(PyObject *op, PyObject *annotations)
"non-dict annotations");
return -1;
}
- Py_XDECREF(((PyFunctionObject *)op) -> func_annotations);
- ((PyFunctionObject *) op) -> func_annotations = annotations;
+ Py_XSETREF(((PyFunctionObject *)op)->func_annotations, annotations);
return 0;
}
@@ -531,8 +527,7 @@ func_new(PyTypeObject* type, PyObject* args, PyObject* kw)
if (name != Py_None) {
Py_INCREF(name);
- Py_DECREF(newfunc->func_name);
- newfunc->func_name = name;
+ Py_SETREF(newfunc->func_name, name);
}
if (defaults != Py_None) {
Py_INCREF(defaults);
diff --git a/Objects/genobject.c b/Objects/genobject.c
index 67e6ef9e00..b3e0a46e8b 100644
--- a/Objects/genobject.c
+++ b/Objects/genobject.c
@@ -12,6 +12,8 @@ gen_traverse(PyGenObject *gen, visitproc visit, void *arg)
{
Py_VISIT((PyObject *)gen->gi_frame);
Py_VISIT(gen->gi_code);
+ Py_VISIT(gen->gi_name);
+ Py_VISIT(gen->gi_qualname);
return 0;
}
@@ -22,6 +24,18 @@ _PyGen_Finalize(PyObject *self)
PyObject *res;
PyObject *error_type, *error_value, *error_traceback;
+ /* If `gen` is a coroutine, and if it was never awaited on,
+ issue a RuntimeWarning. */
+ if (gen->gi_code != NULL
+ && ((PyCodeObject *)gen->gi_code)->co_flags & CO_COROUTINE
+ && gen->gi_frame != NULL
+ && gen->gi_frame->f_lasti == -1
+ && !PyErr_Occurred()
+ && PyErr_WarnFormat(PyExc_RuntimeWarning, 1,
+ "coroutine '%.50S' was never awaited",
+ gen->gi_qualname))
+ return;
+
if (gen->gi_frame == NULL || gen->gi_frame->f_stacktop == NULL)
/* Generator isn't paused, so no need to close */
return;
@@ -58,33 +72,49 @@ gen_dealloc(PyGenObject *gen)
_PyObject_GC_UNTRACK(self);
Py_CLEAR(gen->gi_frame);
Py_CLEAR(gen->gi_code);
+ Py_CLEAR(gen->gi_name);
+ Py_CLEAR(gen->gi_qualname);
PyObject_GC_Del(gen);
}
static PyObject *
-gen_send_ex(PyGenObject *gen, PyObject *arg, int exc)
+gen_send_ex(PyGenObject *gen, PyObject *arg, int exc, int closing)
{
PyThreadState *tstate = PyThreadState_GET();
PyFrameObject *f = gen->gi_frame;
PyObject *result;
if (gen->gi_running) {
- PyErr_SetString(PyExc_ValueError,
- "generator already executing");
+ char *msg = "generator already executing";
+ if (PyCoro_CheckExact(gen))
+ msg = "coroutine already executing";
+ PyErr_SetString(PyExc_ValueError, msg);
return NULL;
}
if (f == NULL || f->f_stacktop == NULL) {
- /* Only set exception if called from send() */
- if (arg && !exc)
+ if (PyCoro_CheckExact(gen) && !closing) {
+ /* `gen` is an exhausted coroutine: raise an error,
+ except when called from gen_close(), which should
+ always be a silent method. */
+ PyErr_SetString(
+ PyExc_RuntimeError,
+ "cannot reuse already awaited coroutine");
+ } else if (arg && !exc) {
+ /* `gen` is an exhausted generator:
+ only set exception if called from send(). */
PyErr_SetNone(PyExc_StopIteration);
+ }
return NULL;
}
if (f->f_lasti == -1) {
if (arg && arg != Py_None) {
- PyErr_SetString(PyExc_TypeError,
- "can't send non-None value to a "
- "just-started generator");
+ char *msg = "can't send non-None value to a "
+ "just-started generator";
+ if (PyCoro_CheckExact(gen))
+ msg = "can't send non-None value to a "
+ "just-started coroutine";
+ PyErr_SetString(PyExc_TypeError, msg);
return NULL;
}
} else {
@@ -126,6 +156,50 @@ gen_send_ex(PyGenObject *gen, PyObject *arg, int exc)
}
Py_CLEAR(result);
}
+ else if (!result && PyErr_ExceptionMatches(PyExc_StopIteration)) {
+ /* Check for __future__ generator_stop and conditionally turn
+ * a leaking StopIteration into RuntimeError (with its cause
+ * set appropriately). */
+ if (((PyCodeObject *)gen->gi_code)->co_flags &
+ (CO_FUTURE_GENERATOR_STOP | CO_COROUTINE | CO_ITERABLE_COROUTINE))
+ {
+ PyObject *exc, *val, *val2, *tb;
+ char *msg = "generator raised StopIteration";
+ if (PyCoro_CheckExact(gen))
+ msg = "coroutine raised StopIteration";
+ PyErr_Fetch(&exc, &val, &tb);
+ PyErr_NormalizeException(&exc, &val, &tb);
+ if (tb != NULL)
+ PyException_SetTraceback(val, tb);
+ Py_DECREF(exc);
+ Py_XDECREF(tb);
+ PyErr_SetString(PyExc_RuntimeError, msg);
+ PyErr_Fetch(&exc, &val2, &tb);
+ PyErr_NormalizeException(&exc, &val2, &tb);
+ Py_INCREF(val);
+ PyException_SetCause(val2, val);
+ PyException_SetContext(val2, val);
+ PyErr_Restore(exc, val2, tb);
+ }
+ else {
+ PyObject *exc, *val, *tb;
+
+ /* Pop the exception before issuing a warning. */
+ PyErr_Fetch(&exc, &val, &tb);
+
+ if (PyErr_WarnFormat(PyExc_PendingDeprecationWarning, 1,
+ "generator '%.50S' raised StopIteration",
+ gen->gi_qualname)) {
+ /* Warning was converted to an error. */
+ Py_XDECREF(exc);
+ Py_XDECREF(val);
+ Py_XDECREF(tb);
+ }
+ else {
+ PyErr_Restore(exc, val, tb);
+ }
+ }
+ }
if (!result || f->f_stacktop == NULL) {
/* generator can't be rerun, so release the frame */
@@ -155,7 +229,7 @@ return next yielded value or raise StopIteration.");
PyObject *
_PyGen_Send(PyGenObject *gen, PyObject *arg)
{
- return gen_send_ex(gen, arg, 0);
+ return gen_send_ex(gen, arg, 0, 0);
}
PyDoc_STRVAR(close_doc,
@@ -193,8 +267,8 @@ gen_close_iter(PyObject *yf)
return 0;
}
-static PyObject *
-gen_yf(PyGenObject *gen)
+PyObject *
+_PyGen_yf(PyGenObject *gen)
{
PyObject *yf = NULL;
PyFrameObject *f = gen->gi_frame;
@@ -216,7 +290,7 @@ static PyObject *
gen_close(PyGenObject *gen, PyObject *args)
{
PyObject *retval;
- PyObject *yf = gen_yf(gen);
+ PyObject *yf = _PyGen_yf(gen);
int err = 0;
if (yf) {
@@ -227,11 +301,13 @@ gen_close(PyGenObject *gen, PyObject *args)
}
if (err == 0)
PyErr_SetNone(PyExc_GeneratorExit);
- retval = gen_send_ex(gen, Py_None, 1);
+ retval = gen_send_ex(gen, Py_None, 1, 1);
if (retval) {
+ char *msg = "generator ignored GeneratorExit";
+ if (PyCoro_CheckExact(gen))
+ msg = "coroutine ignored GeneratorExit";
Py_DECREF(retval);
- PyErr_SetString(PyExc_RuntimeError,
- "generator ignored GeneratorExit");
+ PyErr_SetString(PyExc_RuntimeError, msg);
return NULL;
}
if (PyErr_ExceptionMatches(PyExc_StopIteration)
@@ -254,7 +330,7 @@ gen_throw(PyGenObject *gen, PyObject *args)
PyObject *typ;
PyObject *tb = NULL;
PyObject *val = NULL;
- PyObject *yf = gen_yf(gen);
+ PyObject *yf = _PyGen_yf(gen);
_Py_IDENTIFIER(throw);
if (!PyArg_UnpackTuple(args, "throw", 1, 3, &typ, &val, &tb))
@@ -269,7 +345,7 @@ gen_throw(PyGenObject *gen, PyObject *args)
gen->gi_running = 0;
Py_DECREF(yf);
if (err < 0)
- return gen_send_ex(gen, Py_None, 1);
+ return gen_send_ex(gen, Py_None, 1, 0);
goto throw_here;
}
if (PyGen_CheckExact(yf)) {
@@ -302,10 +378,10 @@ gen_throw(PyGenObject *gen, PyObject *args)
/* Termination repetition of YIELD_FROM */
gen->gi_frame->f_lasti++;
if (_PyGen_FetchStopIterationValue(&val) == 0) {
- ret = gen_send_ex(gen, val, 0);
+ ret = gen_send_ex(gen, val, 0, 0);
Py_DECREF(val);
} else {
- ret = gen_send_ex(gen, Py_None, 1);
+ ret = gen_send_ex(gen, Py_None, 1, 0);
}
}
return ret;
@@ -359,7 +435,7 @@ throw_here:
}
PyErr_Restore(typ, val, tb);
- return gen_send_ex(gen, Py_None, 1);
+ return gen_send_ex(gen, Py_None, 1, 0);
failed_throw:
/* Didn't use our arguments, so restore their original refcounts */
@@ -373,11 +449,7 @@ failed_throw:
static PyObject *
gen_iternext(PyGenObject *gen)
{
- PyObject *val = NULL;
- PyObject *ret;
- ret = gen_send_ex(gen, val, 0);
- Py_XDECREF(val);
- return ret;
+ return gen_send_ex(gen, NULL, 0, 0);
}
/*
@@ -434,33 +506,84 @@ static PyObject *
gen_repr(PyGenObject *gen)
{
return PyUnicode_FromFormat("<generator object %S at %p>",
- ((PyCodeObject *)gen->gi_code)->co_name,
- gen);
+ gen->gi_qualname, gen);
}
+static PyObject *
+gen_get_name(PyGenObject *op)
+{
+ Py_INCREF(op->gi_name);
+ return op->gi_name;
+}
+
+static int
+gen_set_name(PyGenObject *op, PyObject *value)
+{
+ PyObject *tmp;
+
+ /* Not legal to del gen.gi_name or to set it to anything
+ * other than a string object. */
+ if (value == NULL || !PyUnicode_Check(value)) {
+ PyErr_SetString(PyExc_TypeError,
+ "__name__ must be set to a string object");
+ return -1;
+ }
+ tmp = op->gi_name;
+ Py_INCREF(value);
+ op->gi_name = value;
+ Py_DECREF(tmp);
+ return 0;
+}
static PyObject *
-gen_get_name(PyGenObject *gen)
+gen_get_qualname(PyGenObject *op)
{
- PyObject *name = ((PyCodeObject *)gen->gi_code)->co_name;
- Py_INCREF(name);
- return name;
+ Py_INCREF(op->gi_qualname);
+ return op->gi_qualname;
}
+static int
+gen_set_qualname(PyGenObject *op, PyObject *value)
+{
+ PyObject *tmp;
+
+ /* Not legal to del gen.__qualname__ or to set it to anything
+ * other than a string object. */
+ if (value == NULL || !PyUnicode_Check(value)) {
+ PyErr_SetString(PyExc_TypeError,
+ "__qualname__ must be set to a string object");
+ return -1;
+ }
+ tmp = op->gi_qualname;
+ Py_INCREF(value);
+ op->gi_qualname = value;
+ Py_DECREF(tmp);
+ return 0;
+}
-PyDoc_STRVAR(gen__name__doc__,
-"Return the name of the generator's associated code object.");
+static PyObject *
+gen_getyieldfrom(PyGenObject *gen)
+{
+ PyObject *yf = _PyGen_yf(gen);
+ if (yf == NULL)
+ Py_RETURN_NONE;
+ return yf;
+}
static PyGetSetDef gen_getsetlist[] = {
- {"__name__", (getter)gen_get_name, NULL, gen__name__doc__},
- {NULL}
+ {"__name__", (getter)gen_get_name, (setter)gen_set_name,
+ PyDoc_STR("name of the generator")},
+ {"__qualname__", (getter)gen_get_qualname, (setter)gen_set_qualname,
+ PyDoc_STR("qualified name of the generator")},
+ {"gi_yieldfrom", (getter)gen_getyieldfrom, NULL,
+ PyDoc_STR("object being iterated by yield from, or None")},
+ {NULL} /* Sentinel */
};
-
static PyMemberDef gen_memberlist[] = {
- {"gi_frame", T_OBJECT, offsetof(PyGenObject, gi_frame), READONLY},
- {"gi_running", T_BOOL, offsetof(PyGenObject, gi_running), READONLY},
- {"gi_code", T_OBJECT, offsetof(PyGenObject, gi_code), READONLY},
+ {"gi_frame", T_OBJECT, offsetof(PyGenObject, gi_frame), READONLY},
+ {"gi_running", T_BOOL, offsetof(PyGenObject, gi_running), READONLY},
+ {"gi_code", T_OBJECT, offsetof(PyGenObject, gi_code), READONLY},
{NULL} /* Sentinel */
};
@@ -481,7 +604,7 @@ PyTypeObject PyGen_Type = {
0, /* tp_print */
0, /* tp_getattr */
0, /* tp_setattr */
- 0, /* tp_reserved */
+ 0, /* tp_as_async */
(reprfunc)gen_repr, /* tp_repr */
0, /* tp_as_number */
0, /* tp_as_sequence */
@@ -525,10 +648,11 @@ PyTypeObject PyGen_Type = {
_PyGen_Finalize, /* tp_finalize */
};
-PyObject *
-PyGen_New(PyFrameObject *f)
+static PyObject *
+gen_new_with_qualname(PyTypeObject *type, PyFrameObject *f,
+ PyObject *name, PyObject *qualname)
{
- PyGenObject *gen = PyObject_GC_New(PyGenObject, &PyGen_Type);
+ PyGenObject *gen = PyObject_GC_New(PyGenObject, type);
if (gen == NULL) {
Py_DECREF(f);
return NULL;
@@ -539,10 +663,32 @@ PyGen_New(PyFrameObject *f)
gen->gi_code = (PyObject *)(f->f_code);
gen->gi_running = 0;
gen->gi_weakreflist = NULL;
+ if (name != NULL)
+ gen->gi_name = name;
+ else
+ gen->gi_name = ((PyCodeObject *)gen->gi_code)->co_name;
+ Py_INCREF(gen->gi_name);
+ if (qualname != NULL)
+ gen->gi_qualname = qualname;
+ else
+ gen->gi_qualname = gen->gi_name;
+ Py_INCREF(gen->gi_qualname);
_PyObject_GC_TRACK(gen);
return (PyObject *)gen;
}
+PyObject *
+PyGen_NewWithQualName(PyFrameObject *f, PyObject *name, PyObject *qualname)
+{
+ return gen_new_with_qualname(&PyGen_Type, f, name, qualname);
+}
+
+PyObject *
+PyGen_New(PyFrameObject *f)
+{
+ return gen_new_with_qualname(&PyGen_Type, f, NULL, NULL);
+}
+
int
PyGen_NeedsFinalizing(PyGenObject *gen)
{
@@ -560,3 +706,383 @@ PyGen_NeedsFinalizing(PyGenObject *gen)
/* No blocks except loops, it's safe to skip finalization. */
return 0;
}
+
+/* Coroutine Object */
+
+typedef struct {
+ PyObject_HEAD
+ PyCoroObject *cw_coroutine;
+} PyCoroWrapper;
+
+static int
+gen_is_coroutine(PyObject *o)
+{
+ if (PyGen_CheckExact(o)) {
+ PyCodeObject *code = (PyCodeObject *)((PyGenObject*)o)->gi_code;
+ if (code->co_flags & CO_ITERABLE_COROUTINE) {
+ return 1;
+ }
+ }
+ return 0;
+}
+
+/*
+ * This helper function returns an awaitable for `o`:
+ * - `o` if `o` is a coroutine-object;
+ * - `type(o)->tp_as_async->am_await(o)`
+ *
+ * Raises a TypeError if it's not possible to return
+ * an awaitable and returns NULL.
+ */
+PyObject *
+_PyCoro_GetAwaitableIter(PyObject *o)
+{
+ unaryfunc getter = NULL;
+ PyTypeObject *ot;
+
+ if (PyCoro_CheckExact(o) || gen_is_coroutine(o)) {
+ /* 'o' is a coroutine. */
+ Py_INCREF(o);
+ return o;
+ }
+
+ ot = Py_TYPE(o);
+ if (ot->tp_as_async != NULL) {
+ getter = ot->tp_as_async->am_await;
+ }
+ if (getter != NULL) {
+ PyObject *res = (*getter)(o);
+ if (res != NULL) {
+ if (PyCoro_CheckExact(res) || gen_is_coroutine(res)) {
+ /* __await__ must return an *iterator*, not
+ a coroutine or another awaitable (see PEP 492) */
+ PyErr_SetString(PyExc_TypeError,
+ "__await__() returned a coroutine");
+ Py_CLEAR(res);
+ } else if (!PyIter_Check(res)) {
+ PyErr_Format(PyExc_TypeError,
+ "__await__() returned non-iterator "
+ "of type '%.100s'",
+ Py_TYPE(res)->tp_name);
+ Py_CLEAR(res);
+ }
+ }
+ return res;
+ }
+
+ PyErr_Format(PyExc_TypeError,
+ "object %.100s can't be used in 'await' expression",
+ ot->tp_name);
+ return NULL;
+}
+
+static PyObject *
+coro_repr(PyCoroObject *coro)
+{
+ return PyUnicode_FromFormat("<coroutine object %S at %p>",
+ coro->cr_qualname, coro);
+}
+
+static PyObject *
+coro_await(PyCoroObject *coro)
+{
+ PyCoroWrapper *cw = PyObject_GC_New(PyCoroWrapper, &_PyCoroWrapper_Type);
+ if (cw == NULL) {
+ return NULL;
+ }
+ Py_INCREF(coro);
+ cw->cw_coroutine = coro;
+ _PyObject_GC_TRACK(cw);
+ return (PyObject *)cw;
+}
+
+static PyObject *
+coro_get_cr_await(PyCoroObject *coro)
+{
+ PyObject *yf = _PyGen_yf((PyGenObject *) coro);
+ if (yf == NULL)
+ Py_RETURN_NONE;
+ return yf;
+}
+
+static PyGetSetDef coro_getsetlist[] = {
+ {"__name__", (getter)gen_get_name, (setter)gen_set_name,
+ PyDoc_STR("name of the coroutine")},
+ {"__qualname__", (getter)gen_get_qualname, (setter)gen_set_qualname,
+ PyDoc_STR("qualified name of the coroutine")},
+ {"cr_await", (getter)coro_get_cr_await, NULL,
+ PyDoc_STR("object being awaited on, or None")},
+ {NULL} /* Sentinel */
+};
+
+static PyMemberDef coro_memberlist[] = {
+ {"cr_frame", T_OBJECT, offsetof(PyCoroObject, cr_frame), READONLY},
+ {"cr_running", T_BOOL, offsetof(PyCoroObject, cr_running), READONLY},
+ {"cr_code", T_OBJECT, offsetof(PyCoroObject, cr_code), READONLY},
+ {NULL} /* Sentinel */
+};
+
+PyDoc_STRVAR(coro_send_doc,
+"send(arg) -> send 'arg' into coroutine,\n\
+return next iterated value or raise StopIteration.");
+
+PyDoc_STRVAR(coro_throw_doc,
+"throw(typ[,val[,tb]]) -> raise exception in coroutine,\n\
+return next iterated value or raise StopIteration.");
+
+PyDoc_STRVAR(coro_close_doc,
+"close() -> raise GeneratorExit inside coroutine.");
+
+static PyMethodDef coro_methods[] = {
+ {"send",(PyCFunction)_PyGen_Send, METH_O, coro_send_doc},
+ {"throw",(PyCFunction)gen_throw, METH_VARARGS, coro_throw_doc},
+ {"close",(PyCFunction)gen_close, METH_NOARGS, coro_close_doc},
+ {NULL, NULL} /* Sentinel */
+};
+
+static PyAsyncMethods coro_as_async = {
+ (unaryfunc)coro_await, /* am_await */
+ 0, /* am_aiter */
+ 0 /* am_anext */
+};
+
+PyTypeObject PyCoro_Type = {
+ PyVarObject_HEAD_INIT(&PyType_Type, 0)
+ "coroutine", /* tp_name */
+ sizeof(PyCoroObject), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ /* methods */
+ (destructor)gen_dealloc, /* tp_dealloc */
+ 0, /* tp_print */
+ 0, /* tp_getattr */
+ 0, /* tp_setattr */
+ &coro_as_async, /* tp_as_async */
+ (reprfunc)coro_repr, /* tp_repr */
+ 0, /* tp_as_number */
+ 0, /* tp_as_sequence */
+ 0, /* tp_as_mapping */
+ 0, /* tp_hash */
+ 0, /* tp_call */
+ 0, /* tp_str */
+ PyObject_GenericGetAttr, /* tp_getattro */
+ 0, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
+ Py_TPFLAGS_HAVE_FINALIZE, /* tp_flags */
+ 0, /* tp_doc */
+ (traverseproc)gen_traverse, /* tp_traverse */
+ 0, /* tp_clear */
+ 0, /* tp_richcompare */
+ offsetof(PyCoroObject, cr_weakreflist), /* tp_weaklistoffset */
+ 0, /* tp_iter */
+ 0, /* tp_iternext */
+ coro_methods, /* tp_methods */
+ coro_memberlist, /* tp_members */
+ coro_getsetlist, /* tp_getset */
+ 0, /* tp_base */
+ 0, /* tp_dict */
+ 0, /* tp_descr_get */
+ 0, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ 0, /* tp_init */
+ 0, /* tp_alloc */
+ 0, /* tp_new */
+ 0, /* tp_free */
+ 0, /* tp_is_gc */
+ 0, /* tp_bases */
+ 0, /* tp_mro */
+ 0, /* tp_cache */
+ 0, /* tp_subclasses */
+ 0, /* tp_weaklist */
+ 0, /* tp_del */
+ 0, /* tp_version_tag */
+ _PyGen_Finalize, /* tp_finalize */
+};
+
+static void
+coro_wrapper_dealloc(PyCoroWrapper *cw)
+{
+ _PyObject_GC_UNTRACK((PyObject *)cw);
+ Py_CLEAR(cw->cw_coroutine);
+ PyObject_GC_Del(cw);
+}
+
+static PyObject *
+coro_wrapper_iternext(PyCoroWrapper *cw)
+{
+ return gen_send_ex((PyGenObject *)cw->cw_coroutine, NULL, 0, 0);
+}
+
+static PyObject *
+coro_wrapper_send(PyCoroWrapper *cw, PyObject *arg)
+{
+ return gen_send_ex((PyGenObject *)cw->cw_coroutine, arg, 0, 0);
+}
+
+static PyObject *
+coro_wrapper_throw(PyCoroWrapper *cw, PyObject *args)
+{
+ return gen_throw((PyGenObject *)cw->cw_coroutine, args);
+}
+
+static PyObject *
+coro_wrapper_close(PyCoroWrapper *cw, PyObject *args)
+{
+ return gen_close((PyGenObject *)cw->cw_coroutine, args);
+}
+
+static int
+coro_wrapper_traverse(PyCoroWrapper *cw, visitproc visit, void *arg)
+{
+ Py_VISIT((PyObject *)cw->cw_coroutine);
+ return 0;
+}
+
+static PyMethodDef coro_wrapper_methods[] = {
+ {"send",(PyCFunction)coro_wrapper_send, METH_O, coro_send_doc},
+ {"throw",(PyCFunction)coro_wrapper_throw, METH_VARARGS, coro_throw_doc},
+ {"close",(PyCFunction)coro_wrapper_close, METH_NOARGS, coro_close_doc},
+ {NULL, NULL} /* Sentinel */
+};
+
+PyTypeObject _PyCoroWrapper_Type = {
+ PyVarObject_HEAD_INIT(&PyType_Type, 0)
+ "coroutine_wrapper",
+ sizeof(PyCoroWrapper), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)coro_wrapper_dealloc, /* destructor tp_dealloc */
+ 0, /* tp_print */
+ 0, /* tp_getattr */
+ 0, /* tp_setattr */
+ 0, /* tp_as_async */
+ 0, /* tp_repr */
+ 0, /* tp_as_number */
+ 0, /* tp_as_sequence */
+ 0, /* tp_as_mapping */
+ 0, /* tp_hash */
+ 0, /* tp_call */
+ 0, /* tp_str */
+ PyObject_GenericGetAttr, /* tp_getattro */
+ 0, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */
+ "A wrapper object implementing __await__ for coroutines.",
+ (traverseproc)coro_wrapper_traverse, /* tp_traverse */
+ 0, /* tp_clear */
+ 0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ PyObject_SelfIter, /* tp_iter */
+ (iternextfunc)coro_wrapper_iternext, /* tp_iternext */
+ coro_wrapper_methods, /* tp_methods */
+ 0, /* tp_members */
+ 0, /* tp_getset */
+ 0, /* tp_base */
+ 0, /* tp_dict */
+ 0, /* tp_descr_get */
+ 0, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ 0, /* tp_init */
+ 0, /* tp_alloc */
+ 0, /* tp_new */
+ PyObject_Del, /* tp_free */
+};
+
+PyObject *
+PyCoro_New(PyFrameObject *f, PyObject *name, PyObject *qualname)
+{
+ return gen_new_with_qualname(&PyCoro_Type, f, name, qualname);
+}
+
+
+/* __aiter__ wrapper; see http://bugs.python.org/issue27243 for details. */
+
+typedef struct {
+ PyObject_HEAD
+ PyObject *aw_aiter;
+} PyAIterWrapper;
+
+
+static PyObject *
+aiter_wrapper_iternext(PyAIterWrapper *aw)
+{
+ PyErr_SetObject(PyExc_StopIteration, aw->aw_aiter);
+ return NULL;
+}
+
+static int
+aiter_wrapper_traverse(PyAIterWrapper *aw, visitproc visit, void *arg)
+{
+ Py_VISIT((PyObject *)aw->aw_aiter);
+ return 0;
+}
+
+static void
+aiter_wrapper_dealloc(PyAIterWrapper *aw)
+{
+ _PyObject_GC_UNTRACK((PyObject *)aw);
+ Py_CLEAR(aw->aw_aiter);
+ PyObject_GC_Del(aw);
+}
+
+static PyAsyncMethods aiter_wrapper_as_async = {
+ PyObject_SelfIter, /* am_await */
+ 0, /* am_aiter */
+ 0 /* am_anext */
+};
+
+PyTypeObject _PyAIterWrapper_Type = {
+ PyVarObject_HEAD_INIT(&PyType_Type, 0)
+ "aiter_wrapper",
+ sizeof(PyAIterWrapper), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)aiter_wrapper_dealloc, /* destructor tp_dealloc */
+ 0, /* tp_print */
+ 0, /* tp_getattr */
+ 0, /* tp_setattr */
+ &aiter_wrapper_as_async, /* tp_as_async */
+ 0, /* tp_repr */
+ 0, /* tp_as_number */
+ 0, /* tp_as_sequence */
+ 0, /* tp_as_mapping */
+ 0, /* tp_hash */
+ 0, /* tp_call */
+ 0, /* tp_str */
+ PyObject_GenericGetAttr, /* tp_getattro */
+ 0, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */
+ "A wrapper object for __aiter__ bakwards compatibility.",
+ (traverseproc)aiter_wrapper_traverse, /* tp_traverse */
+ 0, /* tp_clear */
+ 0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ PyObject_SelfIter, /* tp_iter */
+ (iternextfunc)aiter_wrapper_iternext, /* tp_iternext */
+ 0, /* tp_methods */
+ 0, /* tp_members */
+ 0, /* tp_getset */
+ 0, /* tp_base */
+ 0, /* tp_dict */
+ 0, /* tp_descr_get */
+ 0, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ 0, /* tp_init */
+ 0, /* tp_alloc */
+ 0, /* tp_new */
+ PyObject_Del, /* tp_free */
+};
+
+
+PyObject *
+_PyAIterWrapper_New(PyObject *aiter)
+{
+ PyAIterWrapper *aw = PyObject_GC_New(PyAIterWrapper,
+ &_PyAIterWrapper_Type);
+ if (aw == NULL) {
+ return NULL;
+ }
+ Py_INCREF(aiter);
+ aw->aw_aiter = aiter;
+ _PyObject_GC_TRACK(aw);
+ return (PyObject *)aw;
+}
diff --git a/Objects/iterobject.c b/Objects/iterobject.c
index 3047d6b02f..ab29ff81a9 100644
--- a/Objects/iterobject.c
+++ b/Objects/iterobject.c
@@ -69,8 +69,8 @@ iter_iternext(PyObject *iterator)
PyErr_ExceptionMatches(PyExc_StopIteration))
{
PyErr_Clear();
- Py_DECREF(seq);
it->it_seq = NULL;
+ Py_DECREF(seq);
}
return NULL;
}
@@ -217,7 +217,7 @@ calliter_iternext(calliterobject *it)
Py_DECREF(args);
if (result != NULL) {
int ok;
- ok = PyObject_RichCompareBool(it->it_sentinel, result, Py_EQ);
+ ok = PyObject_RichCompareBool(it->it_sentinel, result, Py_EQ);
if (ok == 0)
return result; /* Common case, fast path */
Py_DECREF(result);
diff --git a/Objects/listobject.c b/Objects/listobject.c
index 19967cad0b..d688179d6b 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -2324,7 +2324,7 @@ list_sizeof(PyListObject *self)
{
Py_ssize_t res;
- res = sizeof(PyListObject) + self->allocated * sizeof(void*);
+ res = _PyObject_SIZE(Py_TYPE(self)) + self->allocated * sizeof(void*);
return PyLong_FromSsize_t(res);
}
@@ -2447,7 +2447,7 @@ list_subscript(PyListObject* self, PyObject* item)
}
else {
PyErr_Format(PyExc_TypeError,
- "list indices must be integers, not %.200s",
+ "list indices must be integers or slices, not %.200s",
item->ob_type->tp_name);
return NULL;
}
@@ -2611,7 +2611,7 @@ list_ass_subscript(PyListObject* self, PyObject* item, PyObject* value)
}
else {
PyErr_Format(PyExc_TypeError,
- "list indices must be integers, not %.200s",
+ "list indices must be integers or slices, not %.200s",
item->ob_type->tp_name);
return -1;
}
@@ -2782,8 +2782,8 @@ listiter_next(listiterobject *it)
return item;
}
- Py_DECREF(seq);
it->it_seq = NULL;
+ Py_DECREF(seq);
return NULL;
}
@@ -2912,9 +2912,17 @@ static PyObject *
listreviter_next(listreviterobject *it)
{
PyObject *item;
- Py_ssize_t index = it->it_index;
- PyListObject *seq = it->it_seq;
+ Py_ssize_t index;
+ PyListObject *seq;
+
+ assert(it != NULL);
+ seq = it->it_seq;
+ if (seq == NULL) {
+ return NULL;
+ }
+ assert(PyList_Check(seq));
+ index = it->it_index;
if (index>=0 && index < PyList_GET_SIZE(seq)) {
item = PyList_GET_ITEM(seq, index);
it->it_index--;
@@ -2922,10 +2930,8 @@ listreviter_next(listreviterobject *it)
return item;
}
it->it_index = -1;
- if (seq != NULL) {
- it->it_seq = NULL;
- Py_DECREF(seq);
- }
+ it->it_seq = NULL;
+ Py_DECREF(seq);
return NULL;
}
diff --git a/Objects/longobject.c b/Objects/longobject.c
index 3a64b530ee..f68d15e615 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -21,7 +21,6 @@
Py_SIZE(x) < 0 ? -(sdigit)(x)->ob_digit[0] : \
(Py_SIZE(x) == 0 ? (sdigit)0 : \
(sdigit)(x)->ob_digit[0]))
-#define ABS(x) ((x) < 0 ? -(x) : (x))
#if NSMALLNEGINTS + NSMALLPOSINTS > 0
/* Small integers are preallocated in this array so that they
@@ -57,7 +56,7 @@ get_small_int(sdigit ival)
static PyLongObject *
maybe_small_long(PyLongObject *v)
{
- if (v && ABS(Py_SIZE(v)) <= 1) {
+ if (v && Py_ABS(Py_SIZE(v)) <= 1) {
sdigit ival = MEDIUM_VALUE(v);
if (-NSMALLNEGINTS <= ival && ival < NSMALLPOSINTS) {
Py_DECREF(v);
@@ -114,7 +113,7 @@ _PyLong_Negate(PyLongObject **x_p)
static PyLongObject *
long_normalize(PyLongObject *v)
{
- Py_ssize_t j = ABS(Py_SIZE(v));
+ Py_ssize_t j = Py_ABS(Py_SIZE(v));
Py_ssize_t i = j;
while (i > 0 && v->ob_digit[i-1] == 0)
@@ -718,7 +717,7 @@ _PyLong_NumBits(PyObject *vv)
assert(v != NULL);
assert(PyLong_Check(v));
- ndigits = ABS(Py_SIZE(v));
+ ndigits = Py_ABS(Py_SIZE(v));
assert(ndigits == 0 || v->ob_digit[ndigits - 1] != 0);
if (ndigits > 0) {
digit msd = v->ob_digit[ndigits - 1];
@@ -1565,7 +1564,7 @@ inplace_divrem1(digit *pout, digit *pin, Py_ssize_t size, digit n)
static PyLongObject *
divrem1(PyLongObject *a, digit n, digit *prem)
{
- const Py_ssize_t size = ABS(Py_SIZE(a));
+ const Py_ssize_t size = Py_ABS(Py_SIZE(a));
PyLongObject *z;
assert(n > 0 && n <= PyLong_MASK);
@@ -1597,7 +1596,7 @@ long_to_decimal_string_internal(PyObject *aa,
PyErr_BadInternalCall();
return -1;
}
- size_a = ABS(Py_SIZE(a));
+ size_a = Py_ABS(Py_SIZE(a));
negative = Py_SIZE(a) < 0;
/* quick and dirty upper bound for the number of digits
@@ -1766,7 +1765,7 @@ long_format_binary(PyObject *aa, int base, int alternate,
PyErr_BadInternalCall();
return -1;
}
- size_a = ABS(Py_SIZE(a));
+ size_a = Py_ABS(Py_SIZE(a));
negative = Py_SIZE(a) < 0;
/* Compute a rough upper bound for the length of the string */
@@ -2313,7 +2312,7 @@ _PyLong_FromBytes(const char *s, Py_ssize_t len, int base)
PyObject *result, *strobj;
char *end = NULL;
- result = PyLong_FromString((char*)s, &end, base);
+ result = PyLong_FromString(s, &end, base);
if (end == NULL || (result != NULL && end == s + len))
return result;
Py_XDECREF(result);
@@ -2380,7 +2379,7 @@ static int
long_divrem(PyLongObject *a, PyLongObject *b,
PyLongObject **pdiv, PyLongObject **prem)
{
- Py_ssize_t size_a = ABS(Py_SIZE(a)), size_b = ABS(Py_SIZE(b));
+ Py_ssize_t size_a = Py_ABS(Py_SIZE(a)), size_b = Py_ABS(Py_SIZE(b));
PyLongObject *z;
if (size_b == 0) {
@@ -2439,7 +2438,7 @@ long_divrem(PyLongObject *a, PyLongObject *b,
}
/* Unsigned int division with remainder -- the algorithm. The arguments v1
- and w1 should satisfy 2 <= ABS(Py_SIZE(w1)) <= ABS(Py_SIZE(v1)). */
+ and w1 should satisfy 2 <= Py_ABS(Py_SIZE(w1)) <= Py_ABS(Py_SIZE(v1)). */
static PyLongObject *
x_divrem(PyLongObject *v1, PyLongObject *w1, PyLongObject **prem)
@@ -2459,8 +2458,8 @@ x_divrem(PyLongObject *v1, PyLongObject *w1, PyLongObject **prem)
that won't overflow a digit. */
/* allocate space; w will also be used to hold the final remainder */
- size_v = ABS(Py_SIZE(v1));
- size_w = ABS(Py_SIZE(w1));
+ size_v = Py_ABS(Py_SIZE(v1));
+ size_w = Py_ABS(Py_SIZE(w1));
assert(size_v >= size_w && size_w >= 2); /* Assert checks by div() */
v = _PyLong_New(size_v+1);
if (v == NULL) {
@@ -2591,7 +2590,7 @@ _PyLong_Frexp(PyLongObject *a, Py_ssize_t *e)
multiple of 4, rounding ties to a multiple of 8. */
static const int half_even_correction[8] = {0, -1, -2, 1, 0, -1, 2, 1};
- a_size = ABS(Py_SIZE(a));
+ a_size = Py_ABS(Py_SIZE(a));
if (a_size == 0) {
/* Special case for 0: significand 0.0, exponent 0. */
*e = 0;
@@ -2732,7 +2731,7 @@ long_compare(PyLongObject *a, PyLongObject *b)
sign = Py_SIZE(a) - Py_SIZE(b);
}
else {
- Py_ssize_t i = ABS(Py_SIZE(a));
+ Py_ssize_t i = Py_ABS(Py_SIZE(a));
while (--i >= 0 && a->ob_digit[i] == b->ob_digit[i])
;
if (i < 0)
@@ -2850,7 +2849,7 @@ long_hash(PyLongObject *v)
static PyLongObject *
x_add(PyLongObject *a, PyLongObject *b)
{
- Py_ssize_t size_a = ABS(Py_SIZE(a)), size_b = ABS(Py_SIZE(b));
+ Py_ssize_t size_a = Py_ABS(Py_SIZE(a)), size_b = Py_ABS(Py_SIZE(b));
PyLongObject *z;
Py_ssize_t i;
digit carry = 0;
@@ -2884,7 +2883,7 @@ x_add(PyLongObject *a, PyLongObject *b)
static PyLongObject *
x_sub(PyLongObject *a, PyLongObject *b)
{
- Py_ssize_t size_a = ABS(Py_SIZE(a)), size_b = ABS(Py_SIZE(b));
+ Py_ssize_t size_a = Py_ABS(Py_SIZE(a)), size_b = Py_ABS(Py_SIZE(b));
PyLongObject *z;
Py_ssize_t i;
int sign = 1;
@@ -2944,7 +2943,7 @@ long_add(PyLongObject *a, PyLongObject *b)
CHECK_BINOP(a, b);
- if (ABS(Py_SIZE(a)) <= 1 && ABS(Py_SIZE(b)) <= 1) {
+ if (Py_ABS(Py_SIZE(a)) <= 1 && Py_ABS(Py_SIZE(b)) <= 1) {
PyObject *result = PyLong_FromLong(MEDIUM_VALUE(a) +
MEDIUM_VALUE(b));
return result;
@@ -2974,7 +2973,7 @@ long_sub(PyLongObject *a, PyLongObject *b)
CHECK_BINOP(a, b);
- if (ABS(Py_SIZE(a)) <= 1 && ABS(Py_SIZE(b)) <= 1) {
+ if (Py_ABS(Py_SIZE(a)) <= 1 && Py_ABS(Py_SIZE(b)) <= 1) {
PyObject* r;
r = PyLong_FromLong(MEDIUM_VALUE(a)-MEDIUM_VALUE(b));
return r;
@@ -3003,8 +3002,8 @@ static PyLongObject *
x_mul(PyLongObject *a, PyLongObject *b)
{
PyLongObject *z;
- Py_ssize_t size_a = ABS(Py_SIZE(a));
- Py_ssize_t size_b = ABS(Py_SIZE(b));
+ Py_ssize_t size_a = Py_ABS(Py_SIZE(a));
+ Py_ssize_t size_b = Py_ABS(Py_SIZE(b));
Py_ssize_t i;
z = _PyLong_New(size_a + size_b);
@@ -3098,7 +3097,7 @@ kmul_split(PyLongObject *n,
{
PyLongObject *hi, *lo;
Py_ssize_t size_lo, size_hi;
- const Py_ssize_t size_n = ABS(Py_SIZE(n));
+ const Py_ssize_t size_n = Py_ABS(Py_SIZE(n));
size_lo = Py_MIN(size_n, size);
size_hi = size_n - size_lo;
@@ -3127,8 +3126,8 @@ static PyLongObject *k_lopsided_mul(PyLongObject *a, PyLongObject *b);
static PyLongObject *
k_mul(PyLongObject *a, PyLongObject *b)
{
- Py_ssize_t asize = ABS(Py_SIZE(a));
- Py_ssize_t bsize = ABS(Py_SIZE(b));
+ Py_ssize_t asize = Py_ABS(Py_SIZE(a));
+ Py_ssize_t bsize = Py_ABS(Py_SIZE(b));
PyLongObject *ah = NULL;
PyLongObject *al = NULL;
PyLongObject *bh = NULL;
@@ -3348,8 +3347,8 @@ ah*bh and al*bl too.
static PyLongObject *
k_lopsided_mul(PyLongObject *a, PyLongObject *b)
{
- const Py_ssize_t asize = ABS(Py_SIZE(a));
- Py_ssize_t bsize = ABS(Py_SIZE(b));
+ const Py_ssize_t asize = Py_ABS(Py_SIZE(a));
+ Py_ssize_t bsize = Py_ABS(Py_SIZE(b));
Py_ssize_t nbdone; /* # of b digits already multiplied */
PyLongObject *ret;
PyLongObject *bslice = NULL;
@@ -3407,7 +3406,7 @@ long_mul(PyLongObject *a, PyLongObject *b)
CHECK_BINOP(a, b);
/* fast path for single-digit multiplication */
- if (ABS(Py_SIZE(a)) <= 1 && ABS(Py_SIZE(b)) <= 1) {
+ if (Py_ABS(Py_SIZE(a)) <= 1 && Py_ABS(Py_SIZE(b)) <= 1) {
stwodigits v = (stwodigits)(MEDIUM_VALUE(a)) * MEDIUM_VALUE(b);
#ifdef HAVE_LONG_LONG
return PyLong_FromLongLong((PY_LONG_LONG)v);
@@ -3614,8 +3613,8 @@ long_true_divide(PyObject *v, PyObject *w)
*/
/* Reduce to case where a and b are both positive. */
- a_size = ABS(Py_SIZE(a));
- b_size = ABS(Py_SIZE(b));
+ a_size = Py_ABS(Py_SIZE(a));
+ b_size = Py_ABS(Py_SIZE(b));
negate = (Py_SIZE(a) < 0) ^ (Py_SIZE(b) < 0);
if (b_size == 0) {
PyErr_SetString(PyExc_ZeroDivisionError,
@@ -3731,7 +3730,7 @@ long_true_divide(PyObject *v, PyObject *w)
inexact = 1;
Py_DECREF(rem);
}
- x_size = ABS(Py_SIZE(x));
+ x_size = Py_ABS(Py_SIZE(x));
assert(x_size > 0); /* result of division is never zero */
x_bits = (x_size-1)*PyLong_SHIFT+bits_in_digit(x->ob_digit[x_size-1]);
@@ -3841,7 +3840,7 @@ long_pow(PyObject *v, PyObject *w, PyObject *x)
if (Py_SIZE(b) < 0) { /* if exponent is negative */
if (c) {
- PyErr_SetString(PyExc_TypeError, "pow() 2nd argument "
+ PyErr_SetString(PyExc_ValueError, "pow() 2nd argument "
"cannot be negative when 3rd argument specified");
goto Error;
}
@@ -4003,7 +4002,7 @@ long_invert(PyLongObject *v)
/* Implement ~x as -(x+1) */
PyLongObject *x;
PyLongObject *w;
- if (ABS(Py_SIZE(v)) <=1)
+ if (Py_ABS(Py_SIZE(v)) <=1)
return PyLong_FromLong(-(MEDIUM_VALUE(v)+1));
w = (PyLongObject *)PyLong_FromLong(1L);
if (w == NULL)
@@ -4020,7 +4019,7 @@ static PyObject *
long_neg(PyLongObject *v)
{
PyLongObject *z;
- if (ABS(Py_SIZE(v)) <= 1)
+ if (Py_ABS(Py_SIZE(v)) <= 1)
return PyLong_FromLong(-MEDIUM_VALUE(v));
z = (PyLongObject *)_PyLong_Copy(v);
if (z != NULL)
@@ -4075,7 +4074,7 @@ long_rshift(PyLongObject *a, PyLongObject *b)
goto rshift_error;
}
wordshift = shiftby / PyLong_SHIFT;
- newsize = ABS(Py_SIZE(a)) - wordshift;
+ newsize = Py_ABS(Py_SIZE(a)) - wordshift;
if (newsize <= 0)
return PyLong_FromLong(0);
loshift = shiftby % PyLong_SHIFT;
@@ -4122,7 +4121,7 @@ long_lshift(PyObject *v, PyObject *w)
wordshift = shiftby / PyLong_SHIFT;
remshift = shiftby - wordshift * PyLong_SHIFT;
- oldsize = ABS(Py_SIZE(a));
+ oldsize = Py_ABS(Py_SIZE(a));
newsize = oldsize + wordshift;
if (remshift)
++newsize;
@@ -4183,7 +4182,7 @@ long_bitwise(PyLongObject *a,
result back to sign-magnitude at the end. */
/* If a is negative, replace it by its two's complement. */
- size_a = ABS(Py_SIZE(a));
+ size_a = Py_ABS(Py_SIZE(a));
nega = Py_SIZE(a) < 0;
if (nega) {
z = _PyLong_New(size_a);
@@ -4197,7 +4196,7 @@ long_bitwise(PyLongObject *a,
Py_INCREF(a);
/* Same for b. */
- size_b = ABS(Py_SIZE(b));
+ size_b = Py_ABS(Py_SIZE(b));
negb = Py_SIZE(b) < 0;
if (negb) {
z = _PyLong_New(size_b);
@@ -4328,6 +4327,213 @@ long_long(PyObject *v)
return v;
}
+PyObject *
+_PyLong_GCD(PyObject *aarg, PyObject *barg)
+{
+ PyLongObject *a, *b, *c = NULL, *d = NULL, *r;
+ stwodigits x, y, q, s, t, c_carry, d_carry;
+ stwodigits A, B, C, D, T;
+ int nbits, k;
+ Py_ssize_t size_a, size_b, alloc_a, alloc_b;
+ digit *a_digit, *b_digit, *c_digit, *d_digit, *a_end, *b_end;
+
+ a = (PyLongObject *)aarg;
+ b = (PyLongObject *)barg;
+ size_a = Py_SIZE(a);
+ size_b = Py_SIZE(b);
+ if (-2 <= size_a && size_a <= 2 && -2 <= size_b && size_b <= 2) {
+ Py_INCREF(a);
+ Py_INCREF(b);
+ goto simple;
+ }
+
+ /* Initial reduction: make sure that 0 <= b <= a. */
+ a = (PyLongObject *)long_abs(a);
+ if (a == NULL)
+ return NULL;
+ b = (PyLongObject *)long_abs(b);
+ if (b == NULL) {
+ Py_DECREF(a);
+ return NULL;
+ }
+ if (long_compare(a, b) < 0) {
+ r = a;
+ a = b;
+ b = r;
+ }
+ /* We now own references to a and b */
+
+ alloc_a = Py_SIZE(a);
+ alloc_b = Py_SIZE(b);
+ /* reduce until a fits into 2 digits */
+ while ((size_a = Py_SIZE(a)) > 2) {
+ nbits = bits_in_digit(a->ob_digit[size_a-1]);
+ /* extract top 2*PyLong_SHIFT bits of a into x, along with
+ corresponding bits of b into y */
+ size_b = Py_SIZE(b);
+ assert(size_b <= size_a);
+ if (size_b == 0) {
+ if (size_a < alloc_a) {
+ r = (PyLongObject *)_PyLong_Copy(a);
+ Py_DECREF(a);
+ }
+ else
+ r = a;
+ Py_DECREF(b);
+ Py_XDECREF(c);
+ Py_XDECREF(d);
+ return (PyObject *)r;
+ }
+ x = (((twodigits)a->ob_digit[size_a-1] << (2*PyLong_SHIFT-nbits)) |
+ ((twodigits)a->ob_digit[size_a-2] << (PyLong_SHIFT-nbits)) |
+ (a->ob_digit[size_a-3] >> nbits));
+
+ y = ((size_b >= size_a - 2 ? b->ob_digit[size_a-3] >> nbits : 0) |
+ (size_b >= size_a - 1 ? (twodigits)b->ob_digit[size_a-2] << (PyLong_SHIFT-nbits) : 0) |
+ (size_b >= size_a ? (twodigits)b->ob_digit[size_a-1] << (2*PyLong_SHIFT-nbits) : 0));
+
+ /* inner loop of Lehmer's algorithm; A, B, C, D never grow
+ larger than PyLong_MASK during the algorithm. */
+ A = 1; B = 0; C = 0; D = 1;
+ for (k=0;; k++) {
+ if (y-C == 0)
+ break;
+ q = (x+(A-1))/(y-C);
+ s = B+q*D;
+ t = x-q*y;
+ if (s > t)
+ break;
+ x = y; y = t;
+ t = A+q*C; A = D; B = C; C = s; D = t;
+ }
+
+ if (k == 0) {
+ /* no progress; do a Euclidean step */
+ if (l_divmod(a, b, NULL, &r) < 0)
+ goto error;
+ Py_DECREF(a);
+ a = b;
+ b = r;
+ alloc_a = alloc_b;
+ alloc_b = Py_SIZE(b);
+ continue;
+ }
+
+ /*
+ a, b = A*b-B*a, D*a-C*b if k is odd
+ a, b = A*a-B*b, D*b-C*a if k is even
+ */
+ if (k&1) {
+ T = -A; A = -B; B = T;
+ T = -C; C = -D; D = T;
+ }
+ if (c != NULL)
+ Py_SIZE(c) = size_a;
+ else if (Py_REFCNT(a) == 1) {
+ Py_INCREF(a);
+ c = a;
+ }
+ else {
+ alloc_a = size_a;
+ c = _PyLong_New(size_a);
+ if (c == NULL)
+ goto error;
+ }
+
+ if (d != NULL)
+ Py_SIZE(d) = size_a;
+ else if (Py_REFCNT(b) == 1 && size_a <= alloc_b) {
+ Py_INCREF(b);
+ d = b;
+ Py_SIZE(d) = size_a;
+ }
+ else {
+ alloc_b = size_a;
+ d = _PyLong_New(size_a);
+ if (d == NULL)
+ goto error;
+ }
+ a_end = a->ob_digit + size_a;
+ b_end = b->ob_digit + size_b;
+
+ /* compute new a and new b in parallel */
+ a_digit = a->ob_digit;
+ b_digit = b->ob_digit;
+ c_digit = c->ob_digit;
+ d_digit = d->ob_digit;
+ c_carry = 0;
+ d_carry = 0;
+ while (b_digit < b_end) {
+ c_carry += (A * *a_digit) - (B * *b_digit);
+ d_carry += (D * *b_digit++) - (C * *a_digit++);
+ *c_digit++ = (digit)(c_carry & PyLong_MASK);
+ *d_digit++ = (digit)(d_carry & PyLong_MASK);
+ c_carry >>= PyLong_SHIFT;
+ d_carry >>= PyLong_SHIFT;
+ }
+ while (a_digit < a_end) {
+ c_carry += A * *a_digit;
+ d_carry -= C * *a_digit++;
+ *c_digit++ = (digit)(c_carry & PyLong_MASK);
+ *d_digit++ = (digit)(d_carry & PyLong_MASK);
+ c_carry >>= PyLong_SHIFT;
+ d_carry >>= PyLong_SHIFT;
+ }
+ assert(c_carry == 0);
+ assert(d_carry == 0);
+
+ Py_INCREF(c);
+ Py_INCREF(d);
+ Py_DECREF(a);
+ Py_DECREF(b);
+ a = long_normalize(c);
+ b = long_normalize(d);
+ }
+ Py_XDECREF(c);
+ Py_XDECREF(d);
+
+simple:
+ assert(Py_REFCNT(a) > 0);
+ assert(Py_REFCNT(b) > 0);
+/* Issue #24999: use two shifts instead of ">> 2*PyLong_SHIFT" to avoid
+ undefined behaviour when LONG_MAX type is smaller than 60 bits */
+#if LONG_MAX >> PyLong_SHIFT >> PyLong_SHIFT
+ /* a fits into a long, so b must too */
+ x = PyLong_AsLong((PyObject *)a);
+ y = PyLong_AsLong((PyObject *)b);
+#elif defined(PY_LONG_LONG) && PY_LLONG_MAX >> PyLong_SHIFT >> PyLong_SHIFT
+ x = PyLong_AsLongLong((PyObject *)a);
+ y = PyLong_AsLongLong((PyObject *)b);
+#else
+# error "_PyLong_GCD"
+#endif
+ x = Py_ABS(x);
+ y = Py_ABS(y);
+ Py_DECREF(a);
+ Py_DECREF(b);
+
+ /* usual Euclidean algorithm for longs */
+ while (y != 0) {
+ t = y;
+ y = x % y;
+ x = t;
+ }
+#if LONG_MAX >> PyLong_SHIFT >> PyLong_SHIFT
+ return PyLong_FromLong(x);
+#elif defined(PY_LONG_LONG) && PY_LLONG_MAX >> PyLong_SHIFT >> PyLong_SHIFT
+ return PyLong_FromLongLong(x);
+#else
+# error "_PyLong_GCD"
+#endif
+
+error:
+ Py_DECREF(a);
+ Py_DECREF(b);
+ Py_XDECREF(c);
+ Py_XDECREF(d);
+ return NULL;
+}
+
static PyObject *
long_float(PyObject *v)
{
@@ -4630,7 +4836,7 @@ long_sizeof(PyLongObject *v)
{
Py_ssize_t res;
- res = offsetof(PyLongObject, ob_digit) + ABS(Py_SIZE(v))*sizeof(digit);
+ res = offsetof(PyLongObject, ob_digit) + Py_ABS(Py_SIZE(v))*sizeof(digit);
return PyLong_FromSsize_t(res);
}
@@ -4644,7 +4850,7 @@ long_bit_length(PyLongObject *v)
assert(v != NULL);
assert(PyLong_Check(v));
- ndigits = ABS(Py_SIZE(v));
+ ndigits = Py_ABS(Py_SIZE(v));
if (ndigits == 0)
return PyLong_FromLong(0);
@@ -4843,27 +5049,9 @@ long_from_bytes(PyTypeObject *type, PyObject *args, PyObject *kwds)
little_endian, is_signed);
Py_DECREF(bytes);
- /* If from_bytes() was used on subclass, allocate new subclass
- * instance, initialize it with decoded int value and return it.
- */
- if (type != &PyLong_Type && PyType_IsSubtype(type, &PyLong_Type)) {
- PyLongObject *newobj;
- int i;
- Py_ssize_t n = ABS(Py_SIZE(long_obj));
-
- newobj = (PyLongObject *)type->tp_alloc(type, n);
- if (newobj == NULL) {
- Py_DECREF(long_obj);
- return NULL;
- }
- assert(PyLong_Check(newobj));
- Py_SIZE(newobj) = Py_SIZE(long_obj);
- for (i = 0; i < n; i++) {
- newobj->ob_digit[i] =
- ((PyLongObject *)long_obj)->ob_digit[i];
- }
- Py_DECREF(long_obj);
- return (PyObject *)newobj;
+ if (type != &PyLong_Type) {
+ Py_SETREF(long_obj, PyObject_CallFunctionObjArgs((PyObject *)type,
+ long_obj, NULL));
}
return long_obj;
@@ -4874,9 +5062,7 @@ PyDoc_STRVAR(long_from_bytes_doc,
\n\
Return the integer represented by the given array of bytes.\n\
\n\
-The bytes argument must either support the buffer protocol or be an\n\
-iterable object producing bytes. Bytes and bytearray are examples of\n\
-built-in objects that support the buffer protocol.\n\
+The bytes argument must be a bytes-like object (e.g. bytes or bytearray).\n\
\n\
The byteorder argument determines the byte order used to represent the\n\
integer. If byteorder is 'big', the most significant byte is at the\n\
@@ -5095,13 +5281,13 @@ _PyLong_Init(void)
* to the original refcnt + 1 */
Py_REFCNT(op) = refcnt + 1;
assert(Py_SIZE(op) == size);
- assert(v->ob_digit[0] == abs(ival));
+ assert(v->ob_digit[0] == (digit)abs(ival));
}
else {
(void)PyObject_INIT(v, &PyLong_Type);
}
Py_SIZE(v) = size;
- v->ob_digit[0] = abs(ival);
+ v->ob_digit[0] = (digit)abs(ival);
}
#endif
/* initialize int_info */
diff --git a/Objects/memoryobject.c b/Objects/memoryobject.c
index 0be84939ab..10162cb92d 100644
--- a/Objects/memoryobject.c
+++ b/Objects/memoryobject.c
@@ -1,6 +1,7 @@
/* Memoryview object implementation */
#include "Python.h"
+#include "pystrhex.h"
#include <stddef.h>
@@ -48,9 +49,6 @@
*/
-#define XSTRINGIZE(v) #v
-#define STRINGIZE(v) XSTRINGIZE(v)
-
#define CHECK_MBUF_RELEASED(mbuf) \
if (((_PyManagedBufferObject *)mbuf)->flags&_Py_MANAGED_BUFFER_RELEASED) { \
PyErr_SetString(PyExc_ValueError, \
@@ -195,10 +193,10 @@ PyTypeObject _PyManagedBuffer_Type = {
#define VIEW_ADDR(mv) (&((PyMemoryViewObject *)mv)->view)
/* Check for the presence of suboffsets in the first dimension. */
-#define HAVE_PTR(suboffsets) (suboffsets && suboffsets[0] >= 0)
+#define HAVE_PTR(suboffsets, dim) (suboffsets && suboffsets[dim] >= 0)
/* Adjust ptr if suboffsets are present. */
-#define ADJUST_PTR(ptr, suboffsets) \
- (HAVE_PTR(suboffsets) ? *((char**)ptr) + suboffsets[0] : ptr)
+#define ADJUST_PTR(ptr, suboffsets, dim) \
+ (HAVE_PTR(suboffsets, dim) ? *((char**)ptr) + suboffsets[dim] : ptr)
/* Memoryview buffer properties */
#define MV_C_CONTIGUOUS(flags) (flags&(_Py_MEMORYVIEW_SCALAR|_Py_MEMORYVIEW_C))
@@ -223,7 +221,7 @@ PyTypeObject _PyManagedBuffer_Type = {
PyDoc_STRVAR(memory_doc,
-"memoryview(object)\n\
+"memoryview($module, object)\n--\n\
\n\
Create a new memoryview object which references the given object.");
@@ -335,11 +333,11 @@ copy_base(const Py_ssize_t *shape, Py_ssize_t itemsize,
char *p;
Py_ssize_t i;
for (i=0, p=mem; i < shape[0]; p+=itemsize, sptr+=sstrides[0], i++) {
- char *xsptr = ADJUST_PTR(sptr, ssuboffsets);
+ char *xsptr = ADJUST_PTR(sptr, ssuboffsets, 0);
memcpy(p, xsptr, itemsize);
}
for (i=0, p=mem; i < shape[0]; p+=itemsize, dptr+=dstrides[0], i++) {
- char *xdptr = ADJUST_PTR(dptr, dsuboffsets);
+ char *xdptr = ADJUST_PTR(dptr, dsuboffsets, 0);
memcpy(xdptr, p, itemsize);
}
}
@@ -367,8 +365,8 @@ copy_rec(const Py_ssize_t *shape, Py_ssize_t ndim, Py_ssize_t itemsize,
}
for (i = 0; i < shape[0]; dptr+=dstrides[0], sptr+=sstrides[0], i++) {
- char *xdptr = ADJUST_PTR(dptr, dsuboffsets);
- char *xsptr = ADJUST_PTR(sptr, ssuboffsets);
+ char *xdptr = ADJUST_PTR(dptr, dsuboffsets, 0);
+ char *xsptr = ADJUST_PTR(sptr, ssuboffsets, 0);
copy_rec(shape+1, ndim-1, itemsize,
xdptr, dstrides+1, dsuboffsets ? dsuboffsets+1 : NULL,
@@ -660,7 +658,7 @@ mbuf_add_view(_PyManagedBufferObject *mbuf, const Py_buffer *src)
if (src->ndim > PyBUF_MAX_NDIM) {
PyErr_SetString(PyExc_ValueError,
"memoryview: number of dimensions must not exceed "
- STRINGIZE(PyBUF_MAX_NDIM));
+ Py_STRINGIFY(PyBUF_MAX_NDIM));
return NULL;
}
@@ -795,7 +793,7 @@ PyMemoryView_FromObject(PyObject *v)
}
PyErr_Format(PyExc_TypeError,
- "memoryview: %.200s object does not have the buffer interface",
+ "memoryview: a bytes-like object is required, not '%.200s'",
Py_TYPE(v)->tp_name);
return NULL;
}
@@ -895,7 +893,7 @@ memory_from_contiguous_copy(Py_buffer *src, char order)
The logical structure of the input and output buffers is the same
(i.e. tolist(input) == tolist(output)), but the physical layout in
memory can be explicitly chosen.
-
+
As usual, if buffertype=PyBUF_WRITE, the exporter's buffer must be writable,
otherwise it may be writable or read-only.
@@ -1199,13 +1197,6 @@ cast_to_1D(PyMemoryViewObject *mv, PyObject *format)
assert(view->strides == mv->ob_array + view->ndim);
assert(view->suboffsets == mv->ob_array + 2*view->ndim);
- if (get_native_fmtchar(&srcchar, view->format) < 0) {
- PyErr_SetString(PyExc_ValueError,
- "memoryview: source format must be a native single character "
- "format prefixed with an optional '@'");
- return ret;
- }
-
asciifmt = PyUnicode_AsASCIIString(format);
if (asciifmt == NULL)
return ret;
@@ -1218,7 +1209,8 @@ cast_to_1D(PyMemoryViewObject *mv, PyObject *format)
goto out;
}
- if (!IS_BYTE_FORMAT(srcchar) && !IS_BYTE_FORMAT(destchar)) {
+ if ((get_native_fmtchar(&srcchar, view->format) < 0 ||
+ !IS_BYTE_FORMAT(srcchar)) && !IS_BYTE_FORMAT(destchar)) {
PyErr_SetString(PyExc_TypeError,
"memoryview: cannot cast between two non-byte formats");
goto out;
@@ -1244,7 +1236,7 @@ cast_to_1D(PyMemoryViewObject *mv, PyObject *format)
view->suboffsets = NULL;
init_flags(mv);
-
+
ret = 0;
out:
@@ -1389,7 +1381,7 @@ memory_cast(PyMemoryViewObject *self, PyObject *args, PyObject *kwds)
if (ndim > PyBUF_MAX_NDIM) {
PyErr_SetString(PyExc_ValueError,
"memoryview: number of dimensions must not exceed "
- STRINGIZE(PyBUF_MAX_NDIM));
+ Py_STRINGIFY(PyBUF_MAX_NDIM));
return NULL;
}
if (self->view.ndim != 1 && ndim != 1) {
@@ -2060,7 +2052,7 @@ tolist_base(const char *ptr, const Py_ssize_t *shape,
return NULL;
for (i = 0; i < shape[0]; ptr+=strides[0], i++) {
- const char *xptr = ADJUST_PTR(ptr, suboffsets);
+ const char *xptr = ADJUST_PTR(ptr, suboffsets, 0);
item = unpack_single(xptr, fmt);
if (item == NULL) {
Py_DECREF(lst);
@@ -2094,7 +2086,7 @@ tolist_rec(const char *ptr, Py_ssize_t ndim, const Py_ssize_t *shape,
return NULL;
for (i = 0; i < shape[0]; ptr+=strides[0], i++) {
- const char *xptr = ADJUST_PTR(ptr, suboffsets);
+ const char *xptr = ADJUST_PTR(ptr, suboffsets, 0);
item = tolist_rec(xptr, ndim-1, shape+1,
strides+1, suboffsets ? suboffsets+1 : NULL,
fmt);
@@ -2161,6 +2153,29 @@ memory_tobytes(PyMemoryViewObject *self, PyObject *dummy)
}
static PyObject *
+memory_hex(PyMemoryViewObject *self, PyObject *dummy)
+{
+ Py_buffer *src = VIEW_ADDR(self);
+ PyObject *bytes;
+ PyObject *ret;
+
+ CHECK_RELEASED(self);
+
+ if (MV_C_CONTIGUOUS(self->flags)) {
+ return _Py_strhex(src->buf, src->len);
+ }
+
+ bytes = memory_tobytes(self, dummy);
+ if (bytes == NULL)
+ return NULL;
+
+ ret = _Py_strhex(PyBytes_AS_STRING(bytes), Py_SIZE(bytes));
+ Py_DECREF(bytes);
+
+ return ret;
+}
+
+static PyObject *
memory_repr(PyMemoryViewObject *self)
{
if (self->flags & _Py_MEMORYVIEW_RELEASED)
@@ -2174,30 +2189,63 @@ memory_repr(PyMemoryViewObject *self)
/* Indexing and slicing */
/**************************************************************************/
-/* Get the pointer to the item at index. */
static char *
-ptr_from_index(Py_buffer *view, Py_ssize_t index)
+lookup_dimension(Py_buffer *view, char *ptr, int dim, Py_ssize_t index)
{
- char *ptr;
- Py_ssize_t nitems; /* items in the first dimension */
+ Py_ssize_t nitems; /* items in the given dimension */
assert(view->shape);
assert(view->strides);
- nitems = view->shape[0];
+ nitems = view->shape[dim];
if (index < 0) {
index += nitems;
}
if (index < 0 || index >= nitems) {
- PyErr_SetString(PyExc_IndexError, "index out of bounds");
+ PyErr_Format(PyExc_IndexError,
+ "index out of bounds on dimension %d", dim + 1);
return NULL;
}
- ptr = (char *)view->buf;
- ptr += view->strides[0] * index;
+ ptr += view->strides[dim] * index;
- ptr = ADJUST_PTR(ptr, view->suboffsets);
+ ptr = ADJUST_PTR(ptr, view->suboffsets, dim);
+
+ return ptr;
+}
+
+/* Get the pointer to the item at index. */
+static char *
+ptr_from_index(Py_buffer *view, Py_ssize_t index)
+{
+ char *ptr = (char *)view->buf;
+ return lookup_dimension(view, ptr, 0, index);
+}
+/* Get the pointer to the item at tuple. */
+static char *
+ptr_from_tuple(Py_buffer *view, PyObject *tup)
+{
+ char *ptr = (char *)view->buf;
+ Py_ssize_t dim, nindices = PyTuple_GET_SIZE(tup);
+
+ if (nindices > view->ndim) {
+ PyErr_Format(PyExc_TypeError,
+ "cannot index %zd-dimension view with %zd-element tuple",
+ view->ndim, nindices);
+ return NULL;
+ }
+
+ for (dim = 0; dim < nindices; dim++) {
+ Py_ssize_t index;
+ index = PyNumber_AsSsize_t(PyTuple_GET_ITEM(tup, dim),
+ PyExc_IndexError);
+ if (index == -1 && PyErr_Occurred())
+ return NULL;
+ ptr = lookup_dimension(view, ptr, (int)dim, index);
+ if (ptr == NULL)
+ return NULL;
+ }
return ptr;
}
@@ -2232,6 +2280,32 @@ memory_item(PyMemoryViewObject *self, Py_ssize_t index)
return NULL;
}
+/* Return the item at position *key* (a tuple of indices). */
+static PyObject *
+memory_item_multi(PyMemoryViewObject *self, PyObject *tup)
+{
+ Py_buffer *view = &(self->view);
+ const char *fmt;
+ Py_ssize_t nindices = PyTuple_GET_SIZE(tup);
+ char *ptr;
+
+ CHECK_RELEASED(self);
+
+ fmt = adjust_fmt(view);
+ if (fmt == NULL)
+ return NULL;
+
+ if (nindices < view->ndim) {
+ PyErr_SetString(PyExc_NotImplementedError,
+ "sub-views are not implemented");
+ return NULL;
+ }
+ ptr = ptr_from_tuple(view, tup);
+ if (ptr == NULL)
+ return NULL;
+ return unpack_single(ptr, fmt);
+}
+
Py_LOCAL_INLINE(int)
init_slice(Py_buffer *base, PyObject *key, int dim)
{
@@ -2280,6 +2354,22 @@ is_multislice(PyObject *key)
return 1;
}
+static Py_ssize_t
+is_multiindex(PyObject *key)
+{
+ Py_ssize_t size, i;
+
+ if (!PyTuple_Check(key))
+ return 0;
+ size = PyTuple_GET_SIZE(key);
+ for (i = 0; i < size; i++) {
+ PyObject *x = PyTuple_GET_ITEM(key, i);
+ if (!PyIndex_Check(x))
+ return 0;
+ }
+ return 1;
+}
+
/* mv[obj] returns an object holding the data for one element if obj
fully indexes the memoryview or another memoryview object if it
does not.
@@ -2291,7 +2381,7 @@ memory_subscript(PyMemoryViewObject *self, PyObject *key)
{
Py_buffer *view;
view = &(self->view);
-
+
CHECK_RELEASED(self);
if (view->ndim == 0) {
@@ -2335,6 +2425,9 @@ memory_subscript(PyMemoryViewObject *self, PyObject *key)
return (PyObject *)sliced;
}
+ else if (is_multiindex(key)) {
+ return memory_item_multi(self, key);
+ }
else if (is_multislice(key)) {
PyErr_SetString(PyExc_NotImplementedError,
"multi-dimensional slicing is not implemented");
@@ -2379,14 +2472,15 @@ memory_ass_sub(PyMemoryViewObject *self, PyObject *key, PyObject *value)
return -1;
}
}
- if (view->ndim != 1) {
- PyErr_SetString(PyExc_NotImplementedError,
- "memoryview assignments are currently restricted to ndim = 1");
- return -1;
- }
if (PyIndex_Check(key)) {
- Py_ssize_t index = PyNumber_AsSsize_t(key, PyExc_IndexError);
+ Py_ssize_t index;
+ if (1 < view->ndim) {
+ PyErr_SetString(PyExc_NotImplementedError,
+ "sub-views are not implemented");
+ return -1;
+ }
+ index = PyNumber_AsSsize_t(key, PyExc_IndexError);
if (index == -1 && PyErr_Occurred())
return -1;
ptr = ptr_from_index(view, index);
@@ -2421,7 +2515,19 @@ memory_ass_sub(PyMemoryViewObject *self, PyObject *key, PyObject *value)
PyBuffer_Release(&src);
return ret;
}
- else if (PySlice_Check(key) || is_multislice(key)) {
+ if (is_multiindex(key)) {
+ char *ptr;
+ if (PyTuple_GET_SIZE(key) < view->ndim) {
+ PyErr_SetString(PyExc_NotImplementedError,
+ "sub-views are not implemented");
+ return -1;
+ }
+ ptr = ptr_from_tuple(view, key);
+ if (ptr == NULL)
+ return -1;
+ return pack_single(ptr, value, fmt);
+ }
+ if (PySlice_Check(key) || is_multislice(key)) {
/* Call memory_subscript() to produce a sliced lvalue, then copy
rvalue into lvalue. This is already implemented in _testbuffer.c. */
PyErr_SetString(PyExc_NotImplementedError,
@@ -2594,8 +2700,8 @@ cmp_base(const char *p, const char *q, const Py_ssize_t *shape,
int equal;
for (i = 0; i < shape[0]; p+=pstrides[0], q+=qstrides[0], i++) {
- const char *xp = ADJUST_PTR(p, psuboffsets);
- const char *xq = ADJUST_PTR(q, qsuboffsets);
+ const char *xp = ADJUST_PTR(p, psuboffsets, 0);
+ const char *xq = ADJUST_PTR(q, qsuboffsets, 0);
equal = unpack_cmp(xp, xq, fmt, unpack_p, unpack_q);
if (equal <= 0)
return equal;
@@ -2629,8 +2735,8 @@ cmp_rec(const char *p, const char *q,
}
for (i = 0; i < shape[0]; p+=pstrides[0], q+=qstrides[0], i++) {
- const char *xp = ADJUST_PTR(p, psuboffsets);
- const char *xq = ADJUST_PTR(q, qsuboffsets);
+ const char *xp = ADJUST_PTR(p, psuboffsets, 0);
+ const char *xq = ADJUST_PTR(q, qsuboffsets, 0);
equal = cmp_rec(xp, xq, ndim-1, shape+1,
pstrides+1, psuboffsets ? psuboffsets+1 : NULL,
qstrides+1, qsuboffsets ? qsuboffsets+1 : NULL,
@@ -2948,6 +3054,7 @@ PyDoc_STRVAR(memory_f_contiguous_doc,
PyDoc_STRVAR(memory_contiguous_doc,
"A bool indicating whether the memory is contiguous.");
+
static PyGetSetDef memory_getsetlist[] = {
{"obj", (getter)memory_obj_get, NULL, memory_obj_doc},
{"nbytes", (getter)memory_nbytes_get, NULL, memory_nbytes_doc},
@@ -2965,25 +3072,30 @@ static PyGetSetDef memory_getsetlist[] = {
};
PyDoc_STRVAR(memory_release_doc,
-"M.release() -> None\n\
+"release($self, /)\n--\n\
\n\
Release the underlying buffer exposed by the memoryview object.");
PyDoc_STRVAR(memory_tobytes_doc,
-"M.tobytes() -> bytes\n\
+"tobytes($self, /)\n--\n\
\n\
Return the data in the buffer as a byte string.");
+PyDoc_STRVAR(memory_hex_doc,
+"hex($self, /)\n--\n\
+\n\
+Return the data in the buffer as a string of hexadecimal numbers.");
PyDoc_STRVAR(memory_tolist_doc,
-"M.tolist() -> list\n\
+"tolist($self, /)\n--\n\
\n\
Return the data in the buffer as a list of elements.");
PyDoc_STRVAR(memory_cast_doc,
-"M.cast(format[, shape]) -> memoryview\n\
+"cast($self, /, format, *, shape)\n--\n\
\n\
Cast a memoryview to a new format or shape.");
static PyMethodDef memory_methods[] = {
{"release", (PyCFunction)memory_release, METH_NOARGS, memory_release_doc},
{"tobytes", (PyCFunction)memory_tobytes, METH_NOARGS, memory_tobytes_doc},
+ {"hex", (PyCFunction)memory_hex, METH_NOARGS, memory_hex_doc},
{"tolist", (PyCFunction)memory_tolist, METH_NOARGS, memory_tolist_doc},
{"cast", (PyCFunction)memory_cast, METH_VARARGS|METH_KEYWORDS, memory_cast_doc},
{"__enter__", memory_enter, METH_NOARGS, NULL},
diff --git a/Objects/methodobject.c b/Objects/methodobject.c
index 9b6e5e42eb..946357f24a 100644
--- a/Objects/methodobject.c
+++ b/Objects/methodobject.c
@@ -37,6 +37,7 @@ PyCFunction_NewEx(PyMethodDef *ml, PyObject *self, PyObject *module)
if (op == NULL)
return NULL;
}
+ op->m_weakreflist = NULL;
op->m_ml = ml;
Py_XINCREF(self);
op->m_self = self;
@@ -77,68 +78,71 @@ PyCFunction_GetFlags(PyObject *op)
}
PyObject *
-PyCFunction_Call(PyObject *func, PyObject *arg, PyObject *kw)
+PyCFunction_Call(PyObject *func, PyObject *args, PyObject *kwds)
{
-#define CHECK_RESULT(res) assert(res != NULL || PyErr_Occurred())
-
PyCFunctionObject* f = (PyCFunctionObject*)func;
PyCFunction meth = PyCFunction_GET_FUNCTION(func);
PyObject *self = PyCFunction_GET_SELF(func);
- PyObject *res;
+ PyObject *arg, *res;
Py_ssize_t size;
+ int flags;
- switch (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)) {
- case METH_VARARGS:
- if (kw == NULL || PyDict_Size(kw) == 0) {
- res = (*meth)(self, arg);
- CHECK_RESULT(res);
- return res;
- }
- break;
- case METH_VARARGS | METH_KEYWORDS:
- res = (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
- CHECK_RESULT(res);
- return res;
- case METH_NOARGS:
- if (kw == NULL || PyDict_Size(kw) == 0) {
- size = PyTuple_GET_SIZE(arg);
- if (size == 0) {
- res = (*meth)(self, NULL);
- CHECK_RESULT(res);
- return res;
- }
- PyErr_Format(PyExc_TypeError,
- "%.200s() takes no arguments (%zd given)",
- f->m_ml->ml_name, size);
+ /* PyCFunction_Call() must not be called with an exception set,
+ because it may clear it (directly or indirectly) and so the
+ caller loses its exception */
+ assert(!PyErr_Occurred());
+
+ flags = PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
+
+ if (flags == (METH_VARARGS | METH_KEYWORDS)) {
+ res = (*(PyCFunctionWithKeywords)meth)(self, args, kwds);
+ }
+ else {
+ if (kwds != NULL && PyDict_Size(kwds) != 0) {
+ PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
+ f->m_ml->ml_name);
return NULL;
}
- break;
- case METH_O:
- if (kw == NULL || PyDict_Size(kw) == 0) {
- size = PyTuple_GET_SIZE(arg);
- if (size == 1) {
- res = (*meth)(self, PyTuple_GET_ITEM(arg, 0));
- CHECK_RESULT(res);
- return res;
+
+ switch (flags) {
+ case METH_VARARGS:
+ res = (*meth)(self, args);
+ break;
+
+ case METH_NOARGS:
+ size = PyTuple_GET_SIZE(args);
+ if (size != 0) {
+ PyErr_Format(PyExc_TypeError,
+ "%.200s() takes no arguments (%zd given)",
+ f->m_ml->ml_name, size);
+ return NULL;
}
- PyErr_Format(PyExc_TypeError,
- "%.200s() takes exactly one argument (%zd given)",
- f->m_ml->ml_name, size);
+
+ res = (*meth)(self, NULL);
+ break;
+
+ case METH_O:
+ size = PyTuple_GET_SIZE(args);
+ if (size != 1) {
+ PyErr_Format(PyExc_TypeError,
+ "%.200s() takes exactly one argument (%zd given)",
+ f->m_ml->ml_name, size);
+ return NULL;
+ }
+
+ arg = PyTuple_GET_ITEM(args, 0);
+ res = (*meth)(self, arg);
+ break;
+
+ default:
+ PyErr_SetString(PyExc_SystemError,
+ "Bad call flags in PyCFunction_Call. "
+ "METH_OLDARGS is no longer supported!");
return NULL;
}
- break;
- default:
- PyErr_SetString(PyExc_SystemError, "Bad call flags in "
- "PyCFunction_Call. METH_OLDARGS is no "
- "longer supported!");
-
- return NULL;
}
- PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
- f->m_ml->ml_name);
- return NULL;
-#undef CHECK_RESULT
+ return _Py_CheckFunctionResult(func, res, NULL);
}
/* Methods (the standard built-in methods, that is) */
@@ -147,6 +151,9 @@ static void
meth_dealloc(PyCFunctionObject *m)
{
_PyObject_GC_UNTRACK(m);
+ if (m->m_weakreflist != NULL) {
+ PyObject_ClearWeakRefs((PyObject*) m);
+ }
Py_XDECREF(m->m_self);
Py_XDECREF(m->m_module);
if (numfree < PyCFunction_MAXFREELIST) {
@@ -352,7 +359,7 @@ PyTypeObject PyCFunction_Type = {
(traverseproc)meth_traverse, /* tp_traverse */
0, /* tp_clear */
meth_richcompare, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
+ offsetof(PyCFunctionObject, m_weakreflist), /* tp_weaklistoffset */
0, /* tp_iter */
0, /* tp_iternext */
meth_methods, /* tp_methods */
diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c
index f509932a30..a4cdc206c1 100644
--- a/Objects/moduleobject.c
+++ b/Objects/moduleobject.c
@@ -20,7 +20,7 @@ static PyMemberDef module_members[] = {
{0}
};
-static PyTypeObject moduledef_type = {
+PyTypeObject PyModuleDef_Type = {
PyVarObject_HEAD_INIT(&PyType_Type, 0)
"moduledef", /* tp_name */
sizeof(struct PyModuleDef), /* tp_size */
@@ -28,29 +28,48 @@ static PyTypeObject moduledef_type = {
};
+PyObject*
+PyModuleDef_Init(struct PyModuleDef* def)
+{
+ if (PyType_Ready(&PyModuleDef_Type) < 0)
+ return NULL;
+ if (def->m_base.m_index == 0) {
+ max_module_number++;
+ Py_REFCNT(def) = 1;
+ Py_TYPE(def) = &PyModuleDef_Type;
+ def->m_base.m_index = max_module_number;
+ }
+ return (PyObject*)def;
+}
+
static int
module_init_dict(PyModuleObject *mod, PyObject *md_dict,
PyObject *name, PyObject *doc)
{
+ _Py_IDENTIFIER(__name__);
+ _Py_IDENTIFIER(__doc__);
+ _Py_IDENTIFIER(__package__);
+ _Py_IDENTIFIER(__loader__);
+ _Py_IDENTIFIER(__spec__);
+
if (md_dict == NULL)
return -1;
if (doc == NULL)
doc = Py_None;
- if (PyDict_SetItemString(md_dict, "__name__", name) != 0)
+ if (_PyDict_SetItemId(md_dict, &PyId___name__, name) != 0)
return -1;
- if (PyDict_SetItemString(md_dict, "__doc__", doc) != 0)
+ if (_PyDict_SetItemId(md_dict, &PyId___doc__, doc) != 0)
return -1;
- if (PyDict_SetItemString(md_dict, "__package__", Py_None) != 0)
+ if (_PyDict_SetItemId(md_dict, &PyId___package__, Py_None) != 0)
return -1;
- if (PyDict_SetItemString(md_dict, "__loader__", Py_None) != 0)
+ if (_PyDict_SetItemId(md_dict, &PyId___loader__, Py_None) != 0)
return -1;
- if (PyDict_SetItemString(md_dict, "__spec__", Py_None) != 0)
+ if (_PyDict_SetItemId(md_dict, &PyId___spec__, Py_None) != 0)
return -1;
if (PyUnicode_CheckExact(name)) {
Py_INCREF(name);
- Py_XDECREF(mod->md_name);
- mod->md_name = name;
+ Py_XSETREF(mod->md_name, name);
}
return 0;
@@ -91,35 +110,45 @@ PyModule_New(const char *name)
return module;
}
+/* Check API/ABI version
+ * Issues a warning on mismatch, which is usually not fatal.
+ * Returns 0 if an exception is raised.
+ */
+static int
+check_api_version(const char *name, int module_api_version)
+{
+ if (module_api_version != PYTHON_API_VERSION && module_api_version != PYTHON_ABI_VERSION) {
+ int err;
+ err = PyErr_WarnFormat(PyExc_RuntimeWarning, 1,
+ "Python C API version mismatch for module %.100s: "
+ "This Python has API version %d, module %.100s has version %d.",
+ name,
+ PYTHON_API_VERSION, name, module_api_version);
+ if (err)
+ return 0;
+ }
+ return 1;
+}
PyObject *
PyModule_Create2(struct PyModuleDef* module, int module_api_version)
{
- PyObject *d, *v, *n;
- PyMethodDef *ml;
const char* name;
PyModuleObject *m;
PyInterpreterState *interp = PyThreadState_Get()->interp;
if (interp->modules == NULL)
Py_FatalError("Python import machinery not initialized");
- if (PyType_Ready(&moduledef_type) < 0)
+ if (!PyModuleDef_Init(module))
return NULL;
- if (module->m_base.m_index == 0) {
- max_module_number++;
- Py_REFCNT(module) = 1;
- Py_TYPE(module) = &moduledef_type;
- module->m_base.m_index = max_module_number;
- }
name = module->m_name;
- if (module_api_version != PYTHON_API_VERSION && module_api_version != PYTHON_ABI_VERSION) {
- int err;
- err = PyErr_WarnFormat(PyExc_RuntimeWarning, 1,
- "Python C API version mismatch for module %.100s: "
- "This Python has API version %d, module %.100s has version %d.",
- name,
- PYTHON_API_VERSION, name, module_api_version);
- if (err)
- return NULL;
+ if (!check_api_version(name, module_api_version)) {
+ return NULL;
+ }
+ if (module->m_slots) {
+ PyErr_Format(
+ PyExc_SystemError,
+ "module %s: PyModule_Create is incompatible with m_slots", name);
+ return NULL;
}
/* Make sure name is fully qualified.
@@ -150,52 +179,261 @@ PyModule_Create2(struct PyModuleDef* module, int module_api_version)
memset(m->md_state, 0, module->m_size);
}
- d = PyModule_GetDict((PyObject*)m);
if (module->m_methods != NULL) {
- n = PyUnicode_FromString(name);
- if (n == NULL) {
+ if (PyModule_AddFunctions((PyObject *) m, module->m_methods) != 0) {
Py_DECREF(m);
return NULL;
}
- for (ml = module->m_methods; ml->ml_name != NULL; ml++) {
- if ((ml->ml_flags & METH_CLASS) ||
- (ml->ml_flags & METH_STATIC)) {
- PyErr_SetString(PyExc_ValueError,
- "module functions cannot set"
- " METH_CLASS or METH_STATIC");
- Py_DECREF(n);
- Py_DECREF(m);
- return NULL;
- }
- v = PyCFunction_NewEx(ml, (PyObject*)m, n);
- if (v == NULL) {
- Py_DECREF(n);
- Py_DECREF(m);
- return NULL;
- }
- if (PyDict_SetItemString(d, ml->ml_name, v) != 0) {
- Py_DECREF(v);
- Py_DECREF(n);
- Py_DECREF(m);
- return NULL;
- }
- Py_DECREF(v);
- }
- Py_DECREF(n);
}
if (module->m_doc != NULL) {
- v = PyUnicode_FromString(module->m_doc);
- if (v == NULL || PyDict_SetItemString(d, "__doc__", v) != 0) {
- Py_XDECREF(v);
+ if (PyModule_SetDocString((PyObject *) m, module->m_doc) != 0) {
Py_DECREF(m);
return NULL;
}
- Py_DECREF(v);
}
m->md_def = module;
return (PyObject*)m;
}
+PyObject *
+PyModule_FromDefAndSpec2(struct PyModuleDef* def, PyObject *spec, int module_api_version)
+{
+ PyModuleDef_Slot* cur_slot;
+ PyObject *(*create)(PyObject *, PyModuleDef*) = NULL;
+ PyObject *nameobj;
+ PyObject *m = NULL;
+ int has_execution_slots = 0;
+ char *name;
+ int ret;
+
+ PyModuleDef_Init(def);
+
+ nameobj = PyObject_GetAttrString(spec, "name");
+ if (nameobj == NULL) {
+ return NULL;
+ }
+ name = PyUnicode_AsUTF8(nameobj);
+ if (name == NULL) {
+ goto error;
+ }
+
+ if (!check_api_version(name, module_api_version)) {
+ goto error;
+ }
+
+ if (def->m_size < 0) {
+ PyErr_Format(
+ PyExc_SystemError,
+ "module %s: m_size may not be negative for multi-phase initialization",
+ name);
+ goto error;
+ }
+
+ for (cur_slot = def->m_slots; cur_slot && cur_slot->slot; cur_slot++) {
+ if (cur_slot->slot == Py_mod_create) {
+ if (create) {
+ PyErr_Format(
+ PyExc_SystemError,
+ "module %s has multiple create slots",
+ name);
+ goto error;
+ }
+ create = cur_slot->value;
+ } else if (cur_slot->slot < 0 || cur_slot->slot > _Py_mod_LAST_SLOT) {
+ PyErr_Format(
+ PyExc_SystemError,
+ "module %s uses unknown slot ID %i",
+ name, cur_slot->slot);
+ goto error;
+ } else {
+ has_execution_slots = 1;
+ }
+ }
+
+ if (create) {
+ m = create(spec, def);
+ if (m == NULL) {
+ if (!PyErr_Occurred()) {
+ PyErr_Format(
+ PyExc_SystemError,
+ "creation of module %s failed without setting an exception",
+ name);
+ }
+ goto error;
+ } else {
+ if (PyErr_Occurred()) {
+ PyErr_Format(PyExc_SystemError,
+ "creation of module %s raised unreported exception",
+ name);
+ goto error;
+ }
+ }
+ } else {
+ m = PyModule_New(name);
+ if (m == NULL) {
+ goto error;
+ }
+ }
+
+ if (PyModule_Check(m)) {
+ ((PyModuleObject*)m)->md_state = NULL;
+ ((PyModuleObject*)m)->md_def = def;
+ } else {
+ if (def->m_size > 0 || def->m_traverse || def->m_clear || def->m_free) {
+ PyErr_Format(
+ PyExc_SystemError,
+ "module %s is not a module object, but requests module state",
+ name);
+ goto error;
+ }
+ if (has_execution_slots) {
+ PyErr_Format(
+ PyExc_SystemError,
+ "module %s specifies execution slots, but did not create "
+ "a ModuleType instance",
+ name);
+ goto error;
+ }
+ }
+
+ if (def->m_methods != NULL) {
+ ret = PyModule_AddFunctions(m, def->m_methods);
+ if (ret != 0) {
+ goto error;
+ }
+ }
+
+ if (def->m_doc != NULL) {
+ ret = PyModule_SetDocString(m, def->m_doc);
+ if (ret != 0) {
+ goto error;
+ }
+ }
+
+ Py_DECREF(nameobj);
+ return m;
+
+error:
+ Py_DECREF(nameobj);
+ Py_XDECREF(m);
+ return NULL;
+}
+
+int
+PyModule_ExecDef(PyObject *module, PyModuleDef *def)
+{
+ PyModuleDef_Slot *cur_slot;
+ const char *name;
+ int ret;
+
+ name = PyModule_GetName(module);
+ if (name == NULL) {
+ return -1;
+ }
+
+ if (PyModule_Check(module) && def->m_size >= 0) {
+ PyModuleObject *md = (PyModuleObject*)module;
+ if (md->md_state == NULL) {
+ /* Always set a state pointer; this serves as a marker to skip
+ * multiple initialization (importlib.reload() is no-op) */
+ md->md_state = PyMem_MALLOC(def->m_size);
+ if (!md->md_state) {
+ PyErr_NoMemory();
+ return -1;
+ }
+ memset(md->md_state, 0, def->m_size);
+ }
+ }
+
+ if (def->m_slots == NULL) {
+ return 0;
+ }
+
+ for (cur_slot = def->m_slots; cur_slot && cur_slot->slot; cur_slot++) {
+ switch (cur_slot->slot) {
+ case Py_mod_create:
+ /* handled in PyModule_CreateFromSlots */
+ break;
+ case Py_mod_exec:
+ ret = ((int (*)(PyObject *))cur_slot->value)(module);
+ if (ret != 0) {
+ if (!PyErr_Occurred()) {
+ PyErr_Format(
+ PyExc_SystemError,
+ "execution of module %s failed without setting an exception",
+ name);
+ }
+ return -1;
+ }
+ if (PyErr_Occurred()) {
+ PyErr_Format(
+ PyExc_SystemError,
+ "execution of module %s raised unreported exception",
+ name);
+ return -1;
+ }
+ break;
+ default:
+ PyErr_Format(
+ PyExc_SystemError,
+ "module %s initialized with unknown slot %i",
+ name, cur_slot->slot);
+ return -1;
+ }
+ }
+ return 0;
+}
+
+int
+PyModule_AddFunctions(PyObject *m, PyMethodDef *functions)
+{
+ PyObject *name, *func;
+ PyMethodDef *fdef;
+
+ name = PyModule_GetNameObject(m);
+ if (name == NULL) {
+ return -1;
+ }
+
+ for (fdef = functions; fdef->ml_name != NULL; fdef++) {
+ if ((fdef->ml_flags & METH_CLASS) ||
+ (fdef->ml_flags & METH_STATIC)) {
+ PyErr_SetString(PyExc_ValueError,
+ "module functions cannot set"
+ " METH_CLASS or METH_STATIC");
+ Py_DECREF(name);
+ return -1;
+ }
+ func = PyCFunction_NewEx(fdef, (PyObject*)m, name);
+ if (func == NULL) {
+ Py_DECREF(name);
+ return -1;
+ }
+ if (PyObject_SetAttrString(m, fdef->ml_name, func) != 0) {
+ Py_DECREF(func);
+ Py_DECREF(name);
+ return -1;
+ }
+ Py_DECREF(func);
+ }
+ Py_DECREF(name);
+ return 0;
+}
+
+int
+PyModule_SetDocString(PyObject *m, const char *doc)
+{
+ PyObject *v;
+ _Py_IDENTIFIER(__doc__);
+
+ v = PyUnicode_FromString(doc);
+ if (v == NULL || _PyObject_SetAttrId(m, &PyId___doc__, v) != 0) {
+ Py_XDECREF(v);
+ return -1;
+ }
+ Py_DECREF(v);
+ return 0;
+}
PyObject *
PyModule_GetDict(PyObject *m)
@@ -214,6 +452,7 @@ PyModule_GetDict(PyObject *m)
PyObject*
PyModule_GetNameObject(PyObject *m)
{
+ _Py_IDENTIFIER(__name__);
PyObject *d;
PyObject *name;
if (!PyModule_Check(m)) {
@@ -222,7 +461,7 @@ PyModule_GetNameObject(PyObject *m)
}
d = ((PyModuleObject *)m)->md_dict;
if (d == NULL ||
- (name = PyDict_GetItemString(d, "__name__")) == NULL ||
+ (name = _PyDict_GetItemId(d, &PyId___name__)) == NULL ||
!PyUnicode_Check(name))
{
PyErr_SetString(PyExc_SystemError, "nameless module");
@@ -245,6 +484,7 @@ PyModule_GetName(PyObject *m)
PyObject*
PyModule_GetFilenameObject(PyObject *m)
{
+ _Py_IDENTIFIER(__file__);
PyObject *d;
PyObject *fileobj;
if (!PyModule_Check(m)) {
@@ -253,7 +493,7 @@ PyModule_GetFilenameObject(PyObject *m)
}
d = ((PyModuleObject *)m)->md_dict;
if (d == NULL ||
- (fileobj = PyDict_GetItemString(d, "__file__")) == NULL ||
+ (fileobj = _PyDict_GetItemId(d, &PyId___file__)) == NULL ||
!PyUnicode_Check(fileobj))
{
PyErr_SetString(PyExc_SystemError, "module filename missing");
@@ -411,6 +651,31 @@ module_repr(PyModuleObject *m)
return PyObject_CallMethod(interp->importlib, "_module_repr", "O", m);
}
+static PyObject*
+module_getattro(PyModuleObject *m, PyObject *name)
+{
+ PyObject *attr, *mod_name;
+ attr = PyObject_GenericGetAttr((PyObject *)m, name);
+ if (attr || !PyErr_ExceptionMatches(PyExc_AttributeError))
+ return attr;
+ PyErr_Clear();
+ if (m->md_dict) {
+ _Py_IDENTIFIER(__name__);
+ mod_name = _PyDict_GetItemId(m->md_dict, &PyId___name__);
+ if (mod_name) {
+ PyErr_Format(PyExc_AttributeError,
+ "module '%U' has no attribute '%U'", mod_name, name);
+ return NULL;
+ }
+ else if (PyErr_Occurred()) {
+ PyErr_Clear();
+ }
+ }
+ PyErr_Format(PyExc_AttributeError,
+ "module has no attribute '%U'", name);
+ return NULL;
+}
+
static int
module_traverse(PyModuleObject *m, visitproc visit, void *arg)
{
@@ -464,7 +729,6 @@ static PyMethodDef module_methods[] = {
{0}
};
-
PyDoc_STRVAR(module_doc,
"module(name[, doc])\n\
\n\
@@ -488,7 +752,7 @@ PyTypeObject PyModule_Type = {
0, /* tp_hash */
0, /* tp_call */
0, /* tp_str */
- PyObject_GenericGetAttr, /* tp_getattro */
+ (getattrofunc)module_getattro, /* tp_getattro */
PyObject_GenericSetAttr, /* tp_setattro */
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
diff --git a/Objects/object.c b/Objects/object.c
index 307e3ac321..8024889008 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -33,6 +33,22 @@ _Py_GetRefTotal(void)
total -= o->ob_refcnt;
return total;
}
+
+void
+_PyDebug_PrintTotalRefs(void) {
+ PyObject *xoptions, *value;
+ _Py_IDENTIFIER(showrefcount);
+
+ xoptions = PySys_GetXOptions();
+ if (xoptions == NULL)
+ return;
+ value = _PyDict_GetItemId(xoptions, &PyId_showrefcount);
+ if (value == Py_True)
+ fprintf(stderr,
+ "[%" PY_FORMAT_SIZE_T "d refs, "
+ "%" PY_FORMAT_SIZE_T "d blocks]\n",
+ _Py_GetRefTotal(), _Py_GetAllocatedBlocks());
+}
#endif /* Py_REF_DEBUG */
/* Object allocation routines used by NEWOBJ and NEWVAROBJ macros.
@@ -1543,6 +1559,9 @@ PyObject _Py_NotImplementedStruct = {
void
_Py_ReadyTypes(void)
{
+ if (PyType_Ready(&PyBaseObject_Type) < 0)
+ Py_FatalError("Can't initialize object type");
+
if (PyType_Ready(&PyType_Type) < 0)
Py_FatalError("Can't initialize type type");
@@ -1555,6 +1574,9 @@ _Py_ReadyTypes(void)
if (PyType_Ready(&_PyWeakref_ProxyType) < 0)
Py_FatalError("Can't initialize weakref proxy type");
+ if (PyType_Ready(&PyLong_Type) < 0)
+ Py_FatalError("Can't initialize int type");
+
if (PyType_Ready(&PyBool_Type) < 0)
Py_FatalError("Can't initialize bool type");
@@ -1579,15 +1601,27 @@ _Py_ReadyTypes(void)
if (PyType_Ready(&PySuper_Type) < 0)
Py_FatalError("Can't initialize super type");
- if (PyType_Ready(&PyBaseObject_Type) < 0)
- Py_FatalError("Can't initialize object type");
-
if (PyType_Ready(&PyRange_Type) < 0)
Py_FatalError("Can't initialize range type");
if (PyType_Ready(&PyDict_Type) < 0)
Py_FatalError("Can't initialize dict type");
+ if (PyType_Ready(&PyODict_Type) < 0)
+ Py_FatalError("Can't initialize OrderedDict type");
+
+ if (PyType_Ready(&PyODictKeys_Type) < 0)
+ Py_FatalError("Can't initialize odict_keys type");
+
+ if (PyType_Ready(&PyODictItems_Type) < 0)
+ Py_FatalError("Can't initialize odict_items type");
+
+ if (PyType_Ready(&PyODictValues_Type) < 0)
+ Py_FatalError("Can't initialize odict_values type");
+
+ if (PyType_Ready(&PyODictIter_Type) < 0)
+ Py_FatalError("Can't initialize odict_keyiterator type");
+
if (PyType_Ready(&PySet_Type) < 0)
Py_FatalError("Can't initialize set type");
@@ -1606,9 +1640,6 @@ _Py_ReadyTypes(void)
if (PyType_Ready(&PyFloat_Type) < 0)
Py_FatalError("Can't initialize float type");
- if (PyType_Ready(&PyLong_Type) < 0)
- Py_FatalError("Can't initialize int type");
-
if (PyType_Ready(&PyFrozenSet_Type) < 0)
Py_FatalError("Can't initialize frozenset type");
@@ -1695,6 +1726,12 @@ _Py_ReadyTypes(void)
if (PyType_Ready(&PySeqIter_Type) < 0)
Py_FatalError("Can't initialize sequence iterator type");
+
+ if (PyType_Ready(&PyCoro_Type) < 0)
+ Py_FatalError("Can't initialize coroutine type");
+
+ if (PyType_Ready(&_PyCoroWrapper_Type) < 0)
+ Py_FatalError("Can't initialize coroutine wrapper type");
}
@@ -1809,9 +1846,6 @@ _Py_GetObjects(PyObject *self, PyObject *args)
#endif
-/* Hack to force loading of pycapsule.o */
-PyTypeObject *_PyCapsule_hack = &PyCapsule_Type;
-
/* Hack to force loading of abstract.o */
Py_ssize_t (*_Py_abstract_hack)(PyObject *) = PyObject_Size;
@@ -1831,7 +1865,7 @@ _PyObject_DebugTypeStats(FILE *out)
/* These methods are used to control infinite recursion in repr, str, print,
etc. Container objects that may recursively contain themselves,
- e.g. builtin dictionaries and lists, should used Py_ReprEnter() and
+ e.g. builtin dictionaries and lists, should use Py_ReprEnter() and
Py_ReprLeave() to avoid infinite recursion.
Py_ReprEnter() returns 0 the first time it is called for a particular
diff --git a/Objects/obmalloc.c b/Objects/obmalloc.c
index 3c33255170..7cc889f817 100644
--- a/Objects/obmalloc.c
+++ b/Objects/obmalloc.c
@@ -5,6 +5,7 @@
#ifdef PYMALLOC_DEBUG /* WITH_PYMALLOC && PYMALLOC_DEBUG */
/* Forward declaration */
static void* _PyMem_DebugMalloc(void *ctx, size_t size);
+static void* _PyMem_DebugCalloc(void *ctx, size_t nelem, size_t elsize);
static void _PyMem_DebugFree(void *ctx, void *p);
static void* _PyMem_DebugRealloc(void *ctx, void *ptr, size_t size);
@@ -43,6 +44,7 @@ static void _PyMem_DebugCheckAddress(char api_id, const void *p);
/* Forward declaration */
static void* _PyObject_Malloc(void *ctx, size_t size);
+static void* _PyObject_Calloc(void *ctx, size_t nelem, size_t elsize);
static void _PyObject_Free(void *ctx, void *p);
static void* _PyObject_Realloc(void *ctx, void *ptr, size_t size);
#endif
@@ -51,7 +53,7 @@ static void* _PyObject_Realloc(void *ctx, void *ptr, size_t size);
static void *
_PyMem_RawMalloc(void *ctx, size_t size)
{
- /* PyMem_Malloc(0) means malloc(1). Some systems would return NULL
+ /* PyMem_RawMalloc(0) means malloc(1). Some systems would return NULL
for malloc(0), which would be treated as an error. Some platforms would
return a pointer with no memory behind it, which would break pymalloc.
To solve these problems, allocate an extra byte. */
@@ -61,6 +63,20 @@ _PyMem_RawMalloc(void *ctx, size_t size)
}
static void *
+_PyMem_RawCalloc(void *ctx, size_t nelem, size_t elsize)
+{
+ /* PyMem_RawCalloc(0, 0) means calloc(1, 1). Some systems would return NULL
+ for calloc(0, 0), which would be treated as an error. Some platforms
+ would return a pointer with no memory behind it, which would break
+ pymalloc. To solve these problems, allocate an extra byte. */
+ if (nelem == 0 || elsize == 0) {
+ nelem = 1;
+ elsize = 1;
+ }
+ return calloc(nelem, elsize);
+}
+
+static void *
_PyMem_RawRealloc(void *ctx, void *ptr, size_t size)
{
if (size == 0)
@@ -123,9 +139,9 @@ _PyObject_ArenaFree(void *ctx, void *ptr, size_t size)
#endif
-#define PYRAW_FUNCS _PyMem_RawMalloc, _PyMem_RawRealloc, _PyMem_RawFree
+#define PYRAW_FUNCS _PyMem_RawMalloc, _PyMem_RawCalloc, _PyMem_RawRealloc, _PyMem_RawFree
#ifdef WITH_PYMALLOC
-# define PYOBJ_FUNCS _PyObject_Malloc, _PyObject_Realloc, _PyObject_Free
+# define PYOBJ_FUNCS _PyObject_Malloc, _PyObject_Calloc, _PyObject_Realloc, _PyObject_Free
#else
# define PYOBJ_FUNCS PYRAW_FUNCS
#endif
@@ -135,7 +151,7 @@ _PyObject_ArenaFree(void *ctx, void *ptr, size_t size)
typedef struct {
/* We tag each block with an API ID in order to tag API violations */
char api_id;
- PyMemAllocator alloc;
+ PyMemAllocatorEx alloc;
} debug_alloc_api_t;
static struct {
debug_alloc_api_t raw;
@@ -147,10 +163,10 @@ static struct {
{'o', {NULL, PYOBJ_FUNCS}}
};
-#define PYDBG_FUNCS _PyMem_DebugMalloc, _PyMem_DebugRealloc, _PyMem_DebugFree
+#define PYDBG_FUNCS _PyMem_DebugMalloc, _PyMem_DebugCalloc, _PyMem_DebugRealloc, _PyMem_DebugFree
#endif
-static PyMemAllocator _PyMem_Raw = {
+static PyMemAllocatorEx _PyMem_Raw = {
#ifdef PYMALLOC_DEBUG
&_PyMem_Debug.raw, PYDBG_FUNCS
#else
@@ -158,7 +174,7 @@ static PyMemAllocator _PyMem_Raw = {
#endif
};
-static PyMemAllocator _PyMem = {
+static PyMemAllocatorEx _PyMem = {
#ifdef PYMALLOC_DEBUG
&_PyMem_Debug.mem, PYDBG_FUNCS
#else
@@ -166,7 +182,7 @@ static PyMemAllocator _PyMem = {
#endif
};
-static PyMemAllocator _PyObject = {
+static PyMemAllocatorEx _PyObject = {
#ifdef PYMALLOC_DEBUG
&_PyMem_Debug.obj, PYDBG_FUNCS
#else
@@ -193,9 +209,10 @@ void
PyMem_SetupDebugHooks(void)
{
#ifdef PYMALLOC_DEBUG
- PyMemAllocator alloc;
+ PyMemAllocatorEx alloc;
alloc.malloc = _PyMem_DebugMalloc;
+ alloc.calloc = _PyMem_DebugCalloc;
alloc.realloc = _PyMem_DebugRealloc;
alloc.free = _PyMem_DebugFree;
@@ -220,7 +237,7 @@ PyMem_SetupDebugHooks(void)
}
void
-PyMem_GetAllocator(PyMemAllocatorDomain domain, PyMemAllocator *allocator)
+PyMem_GetAllocator(PyMemAllocatorDomain domain, PyMemAllocatorEx *allocator)
{
switch(domain)
{
@@ -228,16 +245,17 @@ PyMem_GetAllocator(PyMemAllocatorDomain domain, PyMemAllocator *allocator)
case PYMEM_DOMAIN_MEM: *allocator = _PyMem; break;
case PYMEM_DOMAIN_OBJ: *allocator = _PyObject; break;
default:
- /* unknown domain */
+ /* unknown domain: set all attributes to NULL */
allocator->ctx = NULL;
allocator->malloc = NULL;
+ allocator->calloc = NULL;
allocator->realloc = NULL;
allocator->free = NULL;
}
}
void
-PyMem_SetAllocator(PyMemAllocatorDomain domain, PyMemAllocator *allocator)
+PyMem_SetAllocator(PyMemAllocatorDomain domain, PyMemAllocatorEx *allocator)
{
switch(domain)
{
@@ -272,10 +290,18 @@ PyMem_RawMalloc(size_t size)
*/
if (size > (size_t)PY_SSIZE_T_MAX)
return NULL;
-
return _PyMem_Raw.malloc(_PyMem_Raw.ctx, size);
}
+void *
+PyMem_RawCalloc(size_t nelem, size_t elsize)
+{
+ /* see PyMem_RawMalloc() */
+ if (elsize != 0 && nelem > (size_t)PY_SSIZE_T_MAX / elsize)
+ return NULL;
+ return _PyMem_Raw.calloc(_PyMem_Raw.ctx, nelem, elsize);
+}
+
void*
PyMem_RawRealloc(void *ptr, size_t new_size)
{
@@ -300,6 +326,15 @@ PyMem_Malloc(size_t size)
}
void *
+PyMem_Calloc(size_t nelem, size_t elsize)
+{
+ /* see PyMem_RawMalloc() */
+ if (elsize != 0 && nelem > (size_t)PY_SSIZE_T_MAX / elsize)
+ return NULL;
+ return _PyMem.calloc(_PyMem.ctx, nelem, elsize);
+}
+
+void *
PyMem_Realloc(void *ptr, size_t new_size)
{
/* see PyMem_RawMalloc() */
@@ -352,6 +387,15 @@ PyObject_Malloc(size_t size)
}
void *
+PyObject_Calloc(size_t nelem, size_t elsize)
+{
+ /* see PyMem_RawMalloc() */
+ if (elsize != 0 && nelem > (size_t)PY_SSIZE_T_MAX / elsize)
+ return NULL;
+ return _PyObject.calloc(_PyObject.ctx, nelem, elsize);
+}
+
+void *
PyObject_Realloc(void *ptr, size_t new_size)
{
/* see PyMem_RawMalloc() */
@@ -1122,8 +1166,9 @@ int Py_ADDRESS_IN_RANGE(void *P, poolp pool) Py_NO_INLINE;
*/
static void *
-_PyObject_Malloc(void *ctx, size_t nbytes)
+_PyObject_Alloc(int use_calloc, void *ctx, size_t nelem, size_t elsize)
{
+ size_t nbytes;
block *bp;
poolp pool;
poolp next;
@@ -1131,6 +1176,9 @@ _PyObject_Malloc(void *ctx, size_t nbytes)
_Py_AllocatedBlocks++;
+ assert(nelem <= PY_SSIZE_T_MAX / elsize);
+ nbytes = nelem * elsize;
+
#ifdef WITH_VALGRIND
if (UNLIKELY(running_on_valgrind == -1))
running_on_valgrind = RUNNING_ON_VALGRIND;
@@ -1138,9 +1186,9 @@ _PyObject_Malloc(void *ctx, size_t nbytes)
goto redirect;
#endif
- /*
- * This implicitly redirects malloc(0).
- */
+ if (nelem == 0 || elsize == 0)
+ goto redirect;
+
if ((nbytes - 1) < SMALL_REQUEST_THRESHOLD) {
LOCK();
/*
@@ -1158,6 +1206,8 @@ _PyObject_Malloc(void *ctx, size_t nbytes)
assert(bp != NULL);
if ((pool->freeblock = *(block **)bp) != NULL) {
UNLOCK();
+ if (use_calloc)
+ memset(bp, 0, nbytes);
return (void *)bp;
}
/*
@@ -1170,6 +1220,8 @@ _PyObject_Malloc(void *ctx, size_t nbytes)
pool->nextoffset += INDEX2SIZE(size);
*(block **)(pool->freeblock) = NULL;
UNLOCK();
+ if (use_calloc)
+ memset(bp, 0, nbytes);
return (void *)bp;
}
/* Pool is full, unlink from used pools. */
@@ -1178,6 +1230,8 @@ _PyObject_Malloc(void *ctx, size_t nbytes)
next->prevpool = pool;
pool->nextpool = next;
UNLOCK();
+ if (use_calloc)
+ memset(bp, 0, nbytes);
return (void *)bp;
}
@@ -1257,6 +1311,8 @@ _PyObject_Malloc(void *ctx, size_t nbytes)
assert(bp != NULL);
pool->freeblock = *(block **)bp;
UNLOCK();
+ if (use_calloc)
+ memset(bp, 0, nbytes);
return (void *)bp;
}
/*
@@ -1272,6 +1328,8 @@ _PyObject_Malloc(void *ctx, size_t nbytes)
pool->freeblock = bp + size;
*(block **)(pool->freeblock) = NULL;
UNLOCK();
+ if (use_calloc)
+ memset(bp, 0, nbytes);
return (void *)bp;
}
@@ -1281,7 +1339,7 @@ _PyObject_Malloc(void *ctx, size_t nbytes)
pool = (poolp)usable_arenas->pool_address;
assert((block*)pool <= (block*)usable_arenas->address +
ARENA_SIZE - POOL_SIZE);
- pool->arenaindex = usable_arenas - arenas;
+ pool->arenaindex = (uint)(usable_arenas - arenas);
assert(&arenas[pool->arenaindex] == usable_arenas);
pool->szidx = DUMMY_SIZE_IDX;
usable_arenas->pool_address += POOL_SIZE;
@@ -1311,13 +1369,29 @@ redirect:
* has been reached.
*/
{
- void *result = PyMem_RawMalloc(nbytes);
+ void *result;
+ if (use_calloc)
+ result = PyMem_RawCalloc(nelem, elsize);
+ else
+ result = PyMem_RawMalloc(nbytes);
if (!result)
_Py_AllocatedBlocks--;
return result;
}
}
+static void *
+_PyObject_Malloc(void *ctx, size_t nbytes)
+{
+ return _PyObject_Alloc(0, ctx, 1, nbytes);
+}
+
+static void *
+_PyObject_Calloc(void *ctx, size_t nelem, size_t elsize)
+{
+ return _PyObject_Alloc(1, ctx, nelem, elsize);
+}
+
/* free */
ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS
@@ -1561,7 +1635,7 @@ _PyObject_Realloc(void *ctx, void *p, size_t nbytes)
#endif
if (p == NULL)
- return _PyObject_Malloc(ctx, nbytes);
+ return _PyObject_Alloc(0, ctx, 1, nbytes);
#ifdef WITH_VALGRIND
/* Treat running_on_valgrind == -1 the same as 0 */
@@ -1589,7 +1663,7 @@ _PyObject_Realloc(void *ctx, void *p, size_t nbytes)
}
size = nbytes;
}
- bp = _PyObject_Malloc(ctx, nbytes);
+ bp = _PyObject_Alloc(0, ctx, 1, nbytes);
if (bp != NULL) {
memcpy(bp, p, size);
_PyObject_Free(ctx, p);
@@ -1745,7 +1819,7 @@ p[2*S+n+S: 2*S+n+2*S]
*/
static void *
-_PyMem_DebugMalloc(void *ctx, size_t nbytes)
+_PyMem_DebugAlloc(int use_calloc, void *ctx, size_t nbytes)
{
debug_alloc_api_t *api = (debug_alloc_api_t *)ctx;
uchar *p; /* base address of malloc'ed block */
@@ -1758,7 +1832,10 @@ _PyMem_DebugMalloc(void *ctx, size_t nbytes)
/* overflow: can't represent total as a Py_ssize_t */
return NULL;
- p = (uchar *)api->alloc.malloc(api->alloc.ctx, total);
+ if (use_calloc)
+ p = (uchar *)api->alloc.calloc(api->alloc.ctx, 1, total);
+ else
+ p = (uchar *)api->alloc.malloc(api->alloc.ctx, total);
if (p == NULL)
return NULL;
@@ -1767,7 +1844,7 @@ _PyMem_DebugMalloc(void *ctx, size_t nbytes)
p[SST] = (uchar)api->api_id;
memset(p + SST + 1, FORBIDDENBYTE, SST-1);
- if (nbytes > 0)
+ if (nbytes > 0 && !use_calloc)
memset(p + 2*SST, CLEANBYTE, nbytes);
/* at tail, write pad (SST bytes) and serialno (SST bytes) */
@@ -1778,6 +1855,21 @@ _PyMem_DebugMalloc(void *ctx, size_t nbytes)
return p + 2*SST;
}
+static void *
+_PyMem_DebugMalloc(void *ctx, size_t nbytes)
+{
+ return _PyMem_DebugAlloc(0, ctx, nbytes);
+}
+
+static void *
+_PyMem_DebugCalloc(void *ctx, size_t nelem, size_t elsize)
+{
+ size_t nbytes;
+ assert(elsize == 0 || nelem <= PY_SSIZE_T_MAX / elsize);
+ nbytes = nelem * elsize;
+ return _PyMem_DebugAlloc(1, ctx, nbytes);
+}
+
/* The debug free first checks the 2*SST bytes on each end for sanity (in
particular, that the FORBIDDENBYTEs with the api ID are still intact).
Then fills the original bytes with DEADBYTE.
@@ -1811,7 +1903,7 @@ _PyMem_DebugRealloc(void *ctx, void *p, size_t nbytes)
int i;
if (p == NULL)
- return _PyMem_DebugMalloc(ctx, nbytes);
+ return _PyMem_DebugAlloc(0, ctx, nbytes);
_PyMem_DebugCheckAddress(api->api_id, p);
bumpserialno();
diff --git a/Objects/odictobject.c b/Objects/odictobject.c
new file mode 100644
index 0000000000..1abdd02cdf
--- /dev/null
+++ b/Objects/odictobject.c
@@ -0,0 +1,2431 @@
+/* Ordered Dictionary object implementation.
+
+This implementation is necessarily explicitly equivalent to the pure Python
+OrderedDict class in Lib/collections/__init__.py. The strategy there
+involves using a doubly-linked-list to capture the order. We keep to that
+strategy, using a lower-level linked-list.
+
+About the Linked-List
+=====================
+
+For the linked list we use a basic doubly-linked-list. Using a circularly-
+linked-list does have some benefits, but they don't apply so much here
+since OrderedDict is focused on the ends of the list (for the most part).
+Furthermore, there are some features of generic linked-lists that we simply
+don't need for OrderedDict. Thus a simple custom implementation meets our
+needs. Alternatives to our simple approach include the QCIRCLE_*
+macros from BSD's queue.h, and the linux's list.h.
+
+Getting O(1) Node Lookup
+------------------------
+
+One invariant of Python's OrderedDict is that it preserves time complexity
+of dict's methods, particularly the O(1) operations. Simply adding a
+linked-list on top of dict is not sufficient here; operations for nodes in
+the middle of the linked-list implicitly require finding the node first.
+With a simple linked-list like we're using, that is an O(n) operation.
+Consequently, methods like __delitem__() would change from O(1) to O(n),
+which is unacceptable.
+
+In order to preserve O(1) performance for node removal (finding nodes), we
+must do better than just looping through the linked-list. Here are options
+we've considered:
+
+1. use a second dict to map keys to nodes (a la the pure Python version).
+2. keep a simple hash table mirroring the order of dict's, mapping each key
+ to the corresponding node in the linked-list.
+3. use a version of shared keys (split dict) that allows non-unicode keys.
+4. have the value stored for each key be a (value, node) pair, and adjust
+ __getitem__(), get(), etc. accordingly.
+
+The approach with the least performance impact (time and space) is #2,
+mirroring the key order of dict's dk_enties with an array of node pointers.
+While lookdict() and friends (dk_lookup) don't give us the index into the
+array, we make use of pointer arithmetic to get that index. An alternative
+would be to refactor lookdict() to provide the index, explicitly exposing
+the implementation detail. We could even just use a custom lookup function
+for OrderedDict that facilitates our need. However, both approaches are
+significantly more complicated than just using pointer arithmetic.
+
+The catch with mirroring the hash table ordering is that we have to keep
+the ordering in sync through any dict resizes. However, that order only
+matters during node lookup. We can simply defer any potential resizing
+until we need to do a lookup.
+
+Linked-List Nodes
+-----------------
+
+The current implementation stores a pointer to the associated key only.
+One alternative would be to store a pointer to the PyDictKeyEntry instead.
+This would save one pointer de-reference per item, which is nice during
+calls to values() and items(). However, it adds unnecessary overhead
+otherwise, so we stick with just the key.
+
+Linked-List API
+---------------
+
+As noted, the linked-list implemented here does not have all the bells and
+whistles. However, we recognize that the implementation may need to
+change to accommodate performance improvements or extra functionality. To
+that end, We use a simple API to interact with the linked-list. Here's a
+summary of the methods/macros:
+
+Node info:
+
+* _odictnode_KEY(node)
+* _odictnode_VALUE(od, node)
+* _odictnode_PREV(node)
+* _odictnode_NEXT(node)
+
+Linked-List info:
+
+* _odict_FIRST(od)
+* _odict_LAST(od)
+* _odict_EMPTY(od)
+* _odict_FOREACH(od, node) - used in place of `for (node=...)`
+
+For adding nodes:
+
+* _odict_add_head(od, node)
+* _odict_add_tail(od, node)
+* _odict_add_new_node(od, key, hash)
+
+For removing nodes:
+
+* _odict_clear_node(od, node, key, hash)
+* _odict_clear_nodes(od, clear_each)
+
+Others:
+
+* _odict_find_node_hash(od, key, hash)
+* _odict_find_node(od, key)
+* _odict_keys_equal(od1, od2)
+
+Used, but specific to the linked-list implementation:
+
+* _odict_free_fast_nodes(od)
+
+And here's a look at how the linked-list relates to the OrderedDict API:
+
+============ === === ==== ==== ==== === ==== ===== ==== ==== === ==== === ===
+method key val prev next mem 1st last empty iter find add rmv clr keq
+============ === === ==== ==== ==== === ==== ===== ==== ==== === ==== === ===
+__del__ ~ X
+__delitem__ free ~ node
+__eq__ ~ X
+__iter__ X X
+__new__ X X
+__reduce__ X ~ X
+__repr__ X X X
+__reversed__ X X
+__setitem__ key
+__sizeof__ size X
+clear ~ ~ X
+copy X X X
+items X X X
+keys X X
+move_to_end X X X ~ h/t key
+pop free key
+popitem X X free X X node
+setdefault ~ ? ~
+values X X
+============ === === ==== ==== ==== === ==== ===== ==== ==== === ==== === ===
+
+__delitem__ is the only method that directly relies on finding an arbitrary
+node in the linked-list. Everything else is iteration or relates to the
+ends of the linked-list.
+
+Situation that Endangers Consistency
+------------------------------------
+Using a raw linked-list for OrderedDict exposes a key situation that can
+cause problems. If a node is stored in a variable, there is a chance that
+the node may have been deallocated before the variable gets used, thus
+potentially leading to a segmentation fault. A key place where this shows
+up is during iteration through the linked list (via _odict_FOREACH or
+otherwise).
+
+A number of solutions are available to resolve this situation:
+
+* defer looking up the node until as late as possible and certainly after
+ any code that could possibly result in a deletion;
+* if the node is needed both before and after a point where the node might
+ be removed, do a check before using the node at the "after" location to
+ see if the node is still valid;
+* like the last one, but simply pull the node again to ensure it's right;
+* keep the key in the variable instead of the node and then look up the
+ node using the key at the point where the node is needed (this is what
+ we do for the iterators).
+
+Another related problem, preserving consistent ordering during iteration,
+is described below. That one is not exclusive to using linked-lists.
+
+
+Challenges from Subclassing dict
+================================
+
+OrderedDict subclasses dict, which is an unusual relationship between two
+builtin types (other than the base object type). Doing so results in
+some complication and deserves further explanation. There are two things
+to consider here. First, in what circumstances or with what adjustments
+can OrderedDict be used as a drop-in replacement for dict (at the C level)?
+Second, how can the OrderedDict implementation leverage the dict
+implementation effectively without introducing unnecessary coupling or
+inefficiencies?
+
+This second point is reflected here and in the implementation, so the
+further focus is on the first point. It is worth noting that for
+overridden methods, the dict implementation is deferred to as much as
+possible. Furthermore, coupling is limited to as little as is reasonable.
+
+Concrete API Compatibility
+--------------------------
+
+Use of the concrete C-API for dict (PyDict_*) with OrderedDict is
+problematic. (See http://bugs.python.org/issue10977.) The concrete API
+has a number of hard-coded assumptions tied to the dict implementation.
+This is, in part, due to performance reasons, which is understandable
+given the part dict plays in Python.
+
+Any attempt to replace dict with OrderedDict for any role in the
+interpreter (e.g. **kwds) faces a challenge. Such any effort must
+recognize that the instances in affected locations currently interact with
+the concrete API.
+
+Here are some ways to address this challenge:
+
+1. Change the relevant usage of the concrete API in CPython and add
+ PyDict_CheckExact() calls to each of the concrete API funcions.
+2. Adjust the relevant concrete API functions to explicitly accommodate
+ OrderedDict.
+3. As with #1, add the checks, but improve the abstract API with smart fast
+ paths for dict and OrderedDict, and refactor CPython to use the abstract
+ API. Improvements to the abstract API would be valuable regardless.
+
+Adding the checks to the concrete API would help make any interpreter
+switch to OrderedDict less painful for extension modules. However, this
+won't work. The equivalent C API call to `dict.__setitem__(obj, k, v)`
+is 'PyDict_SetItem(obj, k, v)`. This illustrates how subclasses in C call
+the base class's methods, since there is no equivalent of super() in the
+C API. Calling into Python for parent class API would work, but some
+extension modules already rely on this feature of the concrete API.
+
+For reference, here is a breakdown of some of the dict concrete API:
+
+========================== ============= =======================
+concrete API uses abstract API
+========================== ============= =======================
+PyDict_Check PyMapping_Check
+(PyDict_CheckExact) -
+(PyDict_New) -
+(PyDictProxy_New) -
+PyDict_Clear -
+PyDict_Contains PySequence_Contains
+PyDict_Copy -
+PyDict_SetItem PyObject_SetItem
+PyDict_SetItemString PyMapping_SetItemString
+PyDict_DelItem PyMapping_DelItem
+PyDict_DelItemString PyMapping_DelItemString
+PyDict_GetItem -
+PyDict_GetItemWithError PyObject_GetItem
+_PyDict_GetItemIdWithError -
+PyDict_GetItemString PyMapping_GetItemString
+PyDict_Items PyMapping_Items
+PyDict_Keys PyMapping_Keys
+PyDict_Values PyMapping_Values
+PyDict_Size PyMapping_Size
+ PyMapping_Length
+PyDict_Next PyIter_Next
+_PyDict_Next -
+PyDict_Merge -
+PyDict_Update -
+PyDict_MergeFromSeq2 -
+PyDict_ClearFreeList -
+- PyMapping_HasKeyString
+- PyMapping_HasKey
+========================== ============= =======================
+
+
+The dict Interface Relative to OrderedDict
+==========================================
+
+Since OrderedDict subclasses dict, understanding the various methods and
+attributes of dict is important for implementing OrderedDict.
+
+Relevant Type Slots
+-------------------
+
+================= ================ =================== ================
+slot attribute object dict
+================= ================ =================== ================
+tp_dealloc - object_dealloc dict_dealloc
+tp_repr __repr__ object_repr dict_repr
+sq_contains __contains__ - dict_contains
+mp_length __len__ - dict_length
+mp_subscript __getitem__ - dict_subscript
+mp_ass_subscript __setitem__ - dict_ass_sub
+ __delitem__
+tp_hash __hash__ _Py_HashPointer ..._HashNotImpl
+tp_str __str__ object_str -
+tp_getattro __getattribute__ ..._GenericGetAttr (repeated)
+ __getattr__
+tp_setattro __setattr__ ..._GenericSetAttr (disabled)
+tp_doc __doc__ (literal) dictionary_doc
+tp_traverse - - dict_traverse
+tp_clear - - dict_tp_clear
+tp_richcompare __eq__ object_richcompare dict_richcompare
+ __ne__
+tp_weaklistoffset (__weakref__) - -
+tp_iter __iter__ - dict_iter
+tp_dictoffset (__dict__) - -
+tp_init __init__ object_init dict_init
+tp_alloc - PyType_GenericAlloc (repeated)
+tp_new __new__ object_new dict_new
+tp_free - PyObject_Del PyObject_GC_Del
+================= ================ =================== ================
+
+Relevant Methods
+----------------
+
+================ =================== ===============
+method object dict
+================ =================== ===============
+__reduce__ object_reduce -
+__sizeof__ object_sizeof dict_sizeof
+clear - dict_clear
+copy - dict_copy
+fromkeys - dict_fromkeys
+get - dict_get
+items - dictitems_new
+keys - dictkeys_new
+pop - dict_pop
+popitem - dict_popitem
+setdefault - dict_setdefault
+update - dict_update
+values - dictvalues_new
+================ =================== ===============
+
+
+Pure Python OrderedDict
+=======================
+
+As already noted, compatibility with the pure Python OrderedDict
+implementation is a key goal of this C implementation. To further that
+goal, here's a summary of how OrderedDict-specific methods are implemented
+in collections/__init__.py. Also provided is an indication of which
+methods directly mutate or iterate the object, as well as any relationship
+with the underlying linked-list.
+
+============= ============== == ================ === === ====
+method impl used ll uses inq mut iter
+============= ============== == ================ === === ====
+__contains__ dict - - X
+__delitem__ OrderedDict Y dict.__delitem__ X
+__eq__ OrderedDict N OrderedDict ~
+ dict.__eq__
+ __iter__
+__getitem__ dict - - X
+__iter__ OrderedDict Y - X
+__init__ OrderedDict N update
+__len__ dict - - X
+__ne__ MutableMapping - __eq__ ~
+__reduce__ OrderedDict N OrderedDict ~
+ __iter__
+ __getitem__
+__repr__ OrderedDict N __class__ ~
+ items
+__reversed__ OrderedDict Y - X
+__setitem__ OrderedDict Y __contains__ X
+ dict.__setitem__
+__sizeof__ OrderedDict Y __len__ ~
+ __dict__
+clear OrderedDict Y dict.clear X
+copy OrderedDict N __class__
+ __init__
+fromkeys OrderedDict N __setitem__
+get dict - - ~
+items MutableMapping - ItemsView X
+keys MutableMapping - KeysView X
+move_to_end OrderedDict Y - X
+pop OrderedDict N __contains__ X
+ __getitem__
+ __delitem__
+popitem OrderedDict Y dict.pop X
+setdefault OrderedDict N __contains__ ~
+ __getitem__
+ __setitem__
+update MutableMapping - __setitem__ ~
+values MutableMapping - ValuesView X
+============= ============== == ================ === === ====
+
+__reversed__ and move_to_end are both exclusive to OrderedDict.
+
+
+C OrderedDict Implementation
+============================
+
+================= ================
+slot impl
+================= ================
+tp_dealloc odict_dealloc
+tp_repr odict_repr
+mp_ass_subscript odict_ass_sub
+tp_doc odict_doc
+tp_traverse odict_traverse
+tp_clear odict_tp_clear
+tp_richcompare odict_richcompare
+tp_weaklistoffset (offset)
+tp_iter odict_iter
+tp_dictoffset (offset)
+tp_init odict_init
+tp_alloc (repeated)
+tp_new odict_new
+================= ================
+
+================= ================
+method impl
+================= ================
+__reduce__ odict_reduce
+__sizeof__ odict_sizeof
+clear odict_clear
+copy odict_copy
+fromkeys odict_fromkeys
+items odictitems_new
+keys odictkeys_new
+pop odict_pop
+popitem odict_popitem
+setdefault odict_setdefault
+update odict_update
+values odictvalues_new
+================= ================
+
+Inherited unchanged from object/dict:
+
+================ ==========================
+method type field
+================ ==========================
+- tp_free
+__contains__ tp_as_sequence.sq_contains
+__getattr__ tp_getattro
+__getattribute__ tp_getattro
+__getitem__ tp_as_mapping.mp_subscript
+__hash__ tp_hash
+__len__ tp_as_mapping.mp_length
+__setattr__ tp_setattro
+__str__ tp_str
+get -
+================ ==========================
+
+
+Other Challenges
+================
+
+Preserving Ordering During Iteration
+------------------------------------
+During iteration through an OrderedDict, it is possible that items could
+get added, removed, or reordered. For a linked-list implementation, as
+with some other implementations, that situation may lead to undefined
+behavior. The documentation for dict mentions this in the `iter()` section
+of http://docs.python.org/3.4/library/stdtypes.html#dictionary-view-objects.
+In this implementation we follow dict's lead (as does the pure Python
+implementation) for __iter__(), keys(), values(), and items().
+
+For internal iteration (using _odict_FOREACH or not), there is still the
+risk that not all nodes that we expect to be seen in the loop actually get
+seen. Thus, we are careful in each of those places to ensure that they
+are. This comes, of course, at a small price at each location. The
+solutions are much the same as those detailed in the `Situation that
+Endangers Consistency` section above.
+
+
+Potential Optimizations
+=======================
+
+* Allocate the nodes as a block via od_fast_nodes instead of individually.
+ - Set node->key to NULL to indicate the node is not-in-use.
+ - Add _odict_EXISTS()?
+ - How to maintain consistency across resizes? Existing node pointers
+ would be invalidate after a resize, which is particularly problematic
+ for the iterators.
+* Use a more stream-lined implementation of update() and, likely indirectly,
+ __init__().
+
+*/
+
+/* TODO
+
+sooner:
+- reentrancy (make sure everything is at a thread-safe state when calling
+ into Python). I've already checked this multiple times, but want to
+ make one more pass.
+- add unit tests for reentrancy?
+
+later:
+- make the dict views support the full set API (the pure Python impl does)
+- implement a fuller MutableMapping API in C?
+- move the MutableMapping implementation to abstract.c?
+- optimize mutablemapping_update
+- use PyObject_MALLOC (small object allocator) for odict nodes?
+- support subclasses better (e.g. in odict_richcompare)
+
+*/
+
+#include "Python.h"
+#include "structmember.h"
+#include "dict-common.h"
+#include <stddef.h>
+
+
+typedef struct _odictnode _ODictNode;
+
+/* PyODictObject */
+struct _odictobject {
+ PyDictObject od_dict; /* the underlying dict */
+ _ODictNode *od_first; /* first node in the linked list, if any */
+ _ODictNode *od_last; /* last node in the linked list, if any */
+ /* od_fast_nodes, od_fast_nodes_size and od_resize_sentinel are managed
+ * by _odict_resize().
+ * Note that we rely on implementation details of dict for both. */
+ _ODictNode **od_fast_nodes; /* hash table that mirrors the dict table */
+ Py_ssize_t od_fast_nodes_size;
+ void *od_resize_sentinel; /* changes if odict should be resized */
+
+ size_t od_state; /* incremented whenever the LL changes */
+ PyObject *od_inst_dict; /* OrderedDict().__dict__ */
+ PyObject *od_weakreflist; /* holds weakrefs to the odict */
+};
+
+
+/* ----------------------------------------------
+ * odict keys (a simple doubly-linked list)
+ */
+
+struct _odictnode {
+ PyObject *key;
+ Py_hash_t hash;
+ _ODictNode *next;
+ _ODictNode *prev;
+};
+
+#define _odictnode_KEY(node) \
+ (node->key)
+#define _odictnode_HASH(node) \
+ (node->hash)
+/* borrowed reference */
+#define _odictnode_VALUE(node, od) \
+ PyODict_GetItemWithError((PyObject *)od, _odictnode_KEY(node))
+#define _odictnode_PREV(node) (node->prev)
+#define _odictnode_NEXT(node) (node->next)
+
+#define _odict_FIRST(od) (((PyODictObject *)od)->od_first)
+#define _odict_LAST(od) (((PyODictObject *)od)->od_last)
+#define _odict_EMPTY(od) (_odict_FIRST(od) == NULL)
+#define _odict_FOREACH(od, node) \
+ for (node = _odict_FIRST(od); node != NULL; node = _odictnode_NEXT(node))
+
+#define _odict_FAST_SIZE(od) ((PyDictObject *)od)->ma_keys->dk_size
+
+static void
+_odict_free_fast_nodes(PyODictObject *od) {
+ if (od->od_fast_nodes) {
+ PyMem_FREE(od->od_fast_nodes);
+ }
+}
+
+/* Return the index into the hash table, regardless of a valid node. */
+static Py_ssize_t
+_odict_get_index_raw(PyODictObject *od, PyObject *key, Py_hash_t hash)
+{
+ PyObject **value_addr = NULL;
+ PyDictKeyEntry *ep;
+ PyDictKeysObject *keys = ((PyDictObject *)od)->ma_keys;
+
+ ep = (keys->dk_lookup)((PyDictObject *)od, key, hash, &value_addr);
+ if (ep == NULL)
+ return -1;
+ /* We use pointer arithmetic to get the entry's index into the table. */
+ return ep - keys->dk_entries;
+}
+
+/* Replace od->od_fast_nodes with a new table matching the size of dict's. */
+static int
+_odict_resize(PyODictObject *od) {
+ Py_ssize_t size, i;
+ _ODictNode **fast_nodes, *node;
+
+ /* Initialize a new "fast nodes" table. */
+ size = ((PyDictObject *)od)->ma_keys->dk_size;
+ fast_nodes = PyMem_NEW(_ODictNode *, size);
+ if (fast_nodes == NULL) {
+ PyErr_NoMemory();
+ return -1;
+ }
+ for (i = 0; i < size; i++)
+ fast_nodes[i] = NULL;
+
+ /* Copy the current nodes into the table. */
+ _odict_FOREACH(od, node) {
+ i = _odict_get_index_raw(od, _odictnode_KEY(node),
+ _odictnode_HASH(node));
+ if (i < 0) {
+ PyMem_FREE(fast_nodes);
+ return -1;
+ }
+ fast_nodes[i] = node;
+ }
+
+ /* Replace the old fast nodes table. */
+ _odict_free_fast_nodes(od);
+ od->od_fast_nodes = fast_nodes;
+ od->od_fast_nodes_size = size;
+ od->od_resize_sentinel = ((PyDictObject *)od)->ma_keys;
+ return 0;
+}
+
+/* Return the index into the hash table, regardless of a valid node. */
+static Py_ssize_t
+_odict_get_index(PyODictObject *od, PyObject *key, Py_hash_t hash)
+{
+ PyDictKeysObject *keys;
+
+ assert(key != NULL);
+ keys = ((PyDictObject *)od)->ma_keys;
+
+ /* Ensure od_fast_nodes and dk_entries are in sync. */
+ if (od->od_resize_sentinel != keys ||
+ od->od_fast_nodes_size != keys->dk_size) {
+ int resize_res = _odict_resize(od);
+ if (resize_res < 0)
+ return -1;
+ }
+
+ return _odict_get_index_raw(od, key, hash);
+}
+
+/* Returns NULL if there was some error or the key was not found. */
+static _ODictNode *
+_odict_find_node_hash(PyODictObject *od, PyObject *key, Py_hash_t hash)
+{
+ Py_ssize_t index;
+
+ if (_odict_EMPTY(od))
+ return NULL;
+ index = _odict_get_index(od, key, hash);
+ if (index < 0)
+ return NULL;
+ return od->od_fast_nodes[index];
+}
+
+static _ODictNode *
+_odict_find_node(PyODictObject *od, PyObject *key)
+{
+ Py_ssize_t index;
+ Py_hash_t hash;
+
+ if (_odict_EMPTY(od))
+ return NULL;
+ hash = PyObject_Hash(key);
+ if (hash == -1)
+ return NULL;
+ index = _odict_get_index(od, key, hash);
+ if (index < 0)
+ return NULL;
+ return od->od_fast_nodes[index];
+}
+
+static void
+_odict_add_head(PyODictObject *od, _ODictNode *node)
+{
+ _odictnode_PREV(node) = NULL;
+ _odictnode_NEXT(node) = _odict_FIRST(od);
+ if (_odict_FIRST(od) == NULL)
+ _odict_LAST(od) = node;
+ else
+ _odictnode_PREV(_odict_FIRST(od)) = node;
+ _odict_FIRST(od) = node;
+ od->od_state++;
+}
+
+static void
+_odict_add_tail(PyODictObject *od, _ODictNode *node)
+{
+ _odictnode_PREV(node) = _odict_LAST(od);
+ _odictnode_NEXT(node) = NULL;
+ if (_odict_LAST(od) == NULL)
+ _odict_FIRST(od) = node;
+ else
+ _odictnode_NEXT(_odict_LAST(od)) = node;
+ _odict_LAST(od) = node;
+ od->od_state++;
+}
+
+/* adds the node to the end of the list */
+static int
+_odict_add_new_node(PyODictObject *od, PyObject *key, Py_hash_t hash)
+{
+ Py_ssize_t i;
+ _ODictNode *node;
+
+ Py_INCREF(key);
+ i = _odict_get_index(od, key, hash);
+ if (i < 0) {
+ if (!PyErr_Occurred())
+ PyErr_SetObject(PyExc_KeyError, key);
+ Py_DECREF(key);
+ return -1;
+ }
+ else if (od->od_fast_nodes[i] != NULL) {
+ /* We already have a node for the key so there's no need to add one. */
+ Py_DECREF(key);
+ return 0;
+ }
+
+ /* must not be added yet */
+ node = (_ODictNode *)PyMem_MALLOC(sizeof(_ODictNode));
+ if (node == NULL) {
+ Py_DECREF(key);
+ PyErr_NoMemory();
+ return -1;
+ }
+
+ _odictnode_KEY(node) = key;
+ _odictnode_HASH(node) = hash;
+ _odict_add_tail(od, node);
+ od->od_fast_nodes[i] = node;
+ return 0;
+}
+
+/* Putting the decref after the free causes problems. */
+#define _odictnode_DEALLOC(node) \
+ do { \
+ Py_DECREF(_odictnode_KEY(node)); \
+ PyMem_FREE((void *)node); \
+ } while (0)
+
+/* Repeated calls on the same node are no-ops. */
+static void
+_odict_remove_node(PyODictObject *od, _ODictNode *node)
+{
+ if (_odict_FIRST(od) == node)
+ _odict_FIRST(od) = _odictnode_NEXT(node);
+ else if (_odictnode_PREV(node) != NULL)
+ _odictnode_NEXT(_odictnode_PREV(node)) = _odictnode_NEXT(node);
+
+ if (_odict_LAST(od) == node)
+ _odict_LAST(od) = _odictnode_PREV(node);
+ else if (_odictnode_NEXT(node) != NULL)
+ _odictnode_PREV(_odictnode_NEXT(node)) = _odictnode_PREV(node);
+
+ _odictnode_PREV(node) = NULL;
+ _odictnode_NEXT(node) = NULL;
+ od->od_state++;
+}
+
+/* If someone calls PyDict_DelItem() directly on an OrderedDict, we'll
+ get all sorts of problems here. In PyODict_DelItem we make sure to
+ call _odict_clear_node first.
+
+ This matters in the case of colliding keys. Suppose we add 3 keys:
+ [A, B, C], where the hash of C collides with A and the next possible
+ index in the hash table is occupied by B. If we remove B then for C
+ the dict's looknode func will give us the old index of B instead of
+ the index we got before deleting B. However, the node for C in
+ od_fast_nodes is still at the old dict index of C. Thus to be sure
+ things don't get out of sync, we clear the node in od_fast_nodes
+ *before* calling PyDict_DelItem.
+
+ The same must be done for any other OrderedDict operations where
+ we modify od_fast_nodes.
+*/
+static int
+_odict_clear_node(PyODictObject *od, _ODictNode *node, PyObject *key,
+ Py_hash_t hash)
+{
+ Py_ssize_t i;
+
+ assert(key != NULL);
+ if (_odict_EMPTY(od)) {
+ /* Let later code decide if this is a KeyError. */
+ return 0;
+ }
+
+ i = _odict_get_index(od, key, hash);
+ if (i < 0)
+ return PyErr_Occurred() ? -1 : 0;
+
+ if (node == NULL)
+ node = od->od_fast_nodes[i];
+ assert(node == od->od_fast_nodes[i]);
+ if (node == NULL) {
+ /* Let later code decide if this is a KeyError. */
+ return 0;
+ }
+
+ // Now clear the node.
+ od->od_fast_nodes[i] = NULL;
+ _odict_remove_node(od, node);
+ _odictnode_DEALLOC(node);
+ return 0;
+}
+
+static void
+_odict_clear_nodes(PyODictObject *od)
+{
+ _ODictNode *node, *next;
+
+ _odict_free_fast_nodes(od);
+ od->od_fast_nodes = NULL;
+
+ node = _odict_FIRST(od);
+ _odict_FIRST(od) = NULL;
+ _odict_LAST(od) = NULL;
+ while (node != NULL) {
+ next = _odictnode_NEXT(node);
+ _odictnode_DEALLOC(node);
+ node = next;
+ }
+}
+
+/* There isn't any memory management of nodes past this point. */
+#undef _odictnode_DEALLOC
+
+static int
+_odict_keys_equal(PyODictObject *a, PyODictObject *b)
+{
+ _ODictNode *node_a, *node_b;
+
+ node_a = _odict_FIRST(a);
+ node_b = _odict_FIRST(b);
+ while (1) {
+ if (node_a == NULL && node_b == NULL)
+ /* success: hit the end of each at the same time */
+ return 1;
+ else if (node_a == NULL || node_b == NULL)
+ /* unequal length */
+ return 0;
+ else {
+ int res = PyObject_RichCompareBool(
+ (PyObject *)_odictnode_KEY(node_a),
+ (PyObject *)_odictnode_KEY(node_b),
+ Py_EQ);
+ if (res < 0)
+ return res;
+ else if (res == 0)
+ return 0;
+
+ /* otherwise it must match, so move on to the next one */
+ node_a = _odictnode_NEXT(node_a);
+ node_b = _odictnode_NEXT(node_b);
+ }
+ }
+}
+
+
+/* ----------------------------------------------
+ * OrderedDict mapping methods
+ */
+
+/* mp_ass_subscript: __setitem__() and __delitem__() */
+
+static int
+odict_mp_ass_sub(PyODictObject *od, PyObject *v, PyObject *w)
+{
+ if (w == NULL)
+ return PyODict_DelItem((PyObject *)od, v);
+ else
+ return PyODict_SetItem((PyObject *)od, v, w);
+}
+
+/* tp_as_mapping */
+
+static PyMappingMethods odict_as_mapping = {
+ 0, /*mp_length*/
+ 0, /*mp_subscript*/
+ (objobjargproc)odict_mp_ass_sub, /*mp_ass_subscript*/
+};
+
+
+/* ----------------------------------------------
+ * OrderedDict methods
+ */
+
+/* __delitem__() */
+
+PyDoc_STRVAR(odict_delitem__doc__, "od.__delitem__(y) <==> del od[y]");
+
+/* __eq__() */
+
+PyDoc_STRVAR(odict_eq__doc__,
+"od.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive \n\
+ while comparison to a regular mapping is order-insensitive.\n\
+ ");
+
+/* forward */
+static PyObject * odict_richcompare(PyObject *v, PyObject *w, int op);
+
+static PyObject *
+odict_eq(PyObject *a, PyObject *b)
+{
+ return odict_richcompare(a, b, Py_EQ);
+}
+
+/* __init__() */
+
+PyDoc_STRVAR(odict_init__doc__,
+"Initialize an ordered dictionary. The signature is the same as\n\
+ regular dictionaries, but keyword arguments are not recommended because\n\
+ their insertion order is arbitrary.\n\
+\n\
+ ");
+
+/* forward */
+static int odict_init(PyObject *self, PyObject *args, PyObject *kwds);
+
+/* __iter__() */
+
+PyDoc_STRVAR(odict_iter__doc__, "od.__iter__() <==> iter(od)");
+
+static PyObject * odict_iter(PyODictObject *self); /* forward */
+
+/* __ne__() */
+
+/* Mapping.__ne__() does not have a docstring. */
+PyDoc_STRVAR(odict_ne__doc__, "");
+
+static PyObject *
+odict_ne(PyObject *a, PyObject *b)
+{
+ return odict_richcompare(a, b, Py_NE);
+}
+
+/* __repr__() */
+
+PyDoc_STRVAR(odict_repr__doc__, "od.__repr__() <==> repr(od)");
+
+static PyObject * odict_repr(PyODictObject *self); /* forward */
+
+/* __setitem__() */
+
+PyDoc_STRVAR(odict_setitem__doc__, "od.__setitem__(i, y) <==> od[i]=y");
+
+/* fromkeys() */
+
+PyDoc_STRVAR(odict_fromkeys__doc__,
+"OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S.\n\
+ If not specified, the value defaults to None.\n\
+\n\
+ ");
+
+static PyObject *
+odict_fromkeys(PyObject *cls, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = {"iterable", "value", 0};
+ PyObject *seq;
+ PyObject *value = Py_None;
+
+ /* both borrowed */
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:fromkeys", kwlist,
+ &seq, &value)) {
+ return NULL;
+ }
+ return _PyDict_FromKeys(cls, seq, value);
+}
+
+/* __sizeof__() */
+
+/* OrderedDict.__sizeof__() does not have a docstring. */
+PyDoc_STRVAR(odict_sizeof__doc__, "");
+
+static PyObject *
+odict_sizeof(PyODictObject *od)
+{
+ Py_ssize_t res = _PyDict_SizeOf((PyDictObject *)od);
+ res += sizeof(_ODictNode *) * _odict_FAST_SIZE(od); /* od_fast_nodes */
+ if (!_odict_EMPTY(od)) {
+ res += sizeof(_ODictNode) * PyODict_SIZE(od); /* linked-list */
+ }
+ return PyLong_FromSsize_t(res);
+}
+
+/* __reduce__() */
+
+PyDoc_STRVAR(odict_reduce__doc__, "Return state information for pickling");
+
+static PyObject *
+odict_reduce(register PyODictObject *od)
+{
+ _Py_IDENTIFIER(__dict__);
+ _Py_IDENTIFIER(items);
+ PyObject *dict = NULL, *result = NULL;
+ PyObject *items_iter, *items, *args = NULL;
+
+ /* capture any instance state */
+ dict = _PyObject_GetAttrId((PyObject *)od, &PyId___dict__);
+ if (dict == NULL)
+ goto Done;
+ else {
+ /* od.__dict__ isn't necessarily a dict... */
+ Py_ssize_t dict_len = PyObject_Length(dict);
+ if (dict_len == -1)
+ goto Done;
+ if (!dict_len) {
+ /* nothing to pickle in od.__dict__ */
+ Py_CLEAR(dict);
+ }
+ }
+
+ /* build the result */
+ args = PyTuple_New(0);
+ if (args == NULL)
+ goto Done;
+
+ items = _PyObject_CallMethodIdObjArgs((PyObject *)od, &PyId_items, NULL);
+ if (items == NULL)
+ goto Done;
+
+ items_iter = PyObject_GetIter(items);
+ Py_DECREF(items);
+ if (items_iter == NULL)
+ goto Done;
+
+ result = PyTuple_Pack(5, Py_TYPE(od), args, dict ? dict : Py_None, Py_None, items_iter);
+ Py_DECREF(items_iter);
+
+Done:
+ Py_XDECREF(dict);
+ Py_XDECREF(args);
+
+ return result;
+}
+
+/* setdefault() */
+
+PyDoc_STRVAR(odict_setdefault__doc__,
+ "od.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in od");
+
+/* Skips __missing__() calls. */
+static PyObject *
+odict_setdefault(register PyODictObject *od, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = {"key", "default", 0};
+ PyObject *key, *result = NULL;
+ PyObject *failobj = Py_None;
+
+ /* both borrowed */
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:setdefault", kwlist,
+ &key, &failobj)) {
+ return NULL;
+ }
+
+ if (PyODict_CheckExact(od)) {
+ result = PyODict_GetItemWithError(od, key); /* borrowed */
+ if (result == NULL) {
+ if (PyErr_Occurred())
+ return NULL;
+ assert(_odict_find_node(od, key) == NULL);
+ if (PyODict_SetItem((PyObject *)od, key, failobj) >= 0) {
+ result = failobj;
+ Py_INCREF(failobj);
+ }
+ }
+ else {
+ Py_INCREF(result);
+ }
+ }
+ else {
+ int exists = PySequence_Contains((PyObject *)od, key);
+ if (exists < 0) {
+ return NULL;
+ }
+ else if (exists) {
+ result = PyObject_GetItem((PyObject *)od, key);
+ }
+ else if (PyObject_SetItem((PyObject *)od, key, failobj) >= 0) {
+ result = failobj;
+ Py_INCREF(failobj);
+ }
+ }
+
+ return result;
+}
+
+/* pop() */
+
+PyDoc_STRVAR(odict_pop__doc__,
+"od.pop(k[,d]) -> v, remove specified key and return the corresponding\n\
+ value. If key is not found, d is returned if given, otherwise KeyError\n\
+ is raised.\n\
+\n\
+ ");
+
+/* forward */
+static PyObject * _odict_popkey(PyObject *, PyObject *, PyObject *);
+
+/* Skips __missing__() calls. */
+static PyObject *
+odict_pop(PyObject *od, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = {"key", "default", 0};
+ PyObject *key, *failobj = NULL;
+
+ /* borrowed */
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:pop", kwlist,
+ &key, &failobj)) {
+ return NULL;
+ }
+
+ return _odict_popkey(od, key, failobj);
+}
+
+static PyObject *
+_odict_popkey_hash(PyObject *od, PyObject *key, PyObject *failobj,
+ Py_hash_t hash)
+{
+ _ODictNode *node;
+ PyObject *value = NULL;
+
+ /* Pop the node first to avoid a possible dict resize (due to
+ eval loop reentrancy) and complications due to hash collision
+ resolution. */
+ node = _odict_find_node_hash((PyODictObject *)od, key, hash);
+ if (node == NULL) {
+ if (PyErr_Occurred())
+ return NULL;
+ }
+ else {
+ int res = _odict_clear_node((PyODictObject *)od, node, key, hash);
+ if (res < 0) {
+ return NULL;
+ }
+ }
+
+ /* Now delete the value from the dict. */
+ if (PyODict_CheckExact(od)) {
+ if (node != NULL) {
+ value = _PyDict_GetItem_KnownHash(od, key, hash); /* borrowed */
+ if (value != NULL) {
+ Py_INCREF(value);
+ if (_PyDict_DelItem_KnownHash(od, key, hash) < 0) {
+ Py_DECREF(value);
+ return NULL;
+ }
+ }
+ }
+ }
+ else {
+ int exists = PySequence_Contains(od, key);
+ if (exists < 0)
+ return NULL;
+ if (exists) {
+ value = PyObject_GetItem(od, key);
+ if (value != NULL) {
+ if (PyObject_DelItem(od, key) == -1) {
+ Py_CLEAR(value);
+ }
+ }
+ }
+ }
+
+ /* Apply the fallback value, if necessary. */
+ if (value == NULL && !PyErr_Occurred()) {
+ if (failobj) {
+ value = failobj;
+ Py_INCREF(failobj);
+ }
+ else {
+ PyErr_SetObject(PyExc_KeyError, key);
+ }
+ }
+
+ return value;
+}
+
+static PyObject *
+_odict_popkey(PyObject *od, PyObject *key, PyObject *failobj)
+{
+ Py_hash_t hash = PyObject_Hash(key);
+ if (hash == -1)
+ return NULL;
+
+ return _odict_popkey_hash(od, key, failobj, hash);
+}
+
+/* popitem() */
+
+PyDoc_STRVAR(odict_popitem__doc__,
+"od.popitem() -> (k, v), return and remove a (key, value) pair.\n\
+ Pairs are returned in LIFO order if last is true or FIFO order if false.\n\
+\n\
+ ");
+
+static PyObject *
+odict_popitem(PyObject *od, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = {"last", 0};
+ PyObject *key, *value, *item = NULL;
+ _ODictNode *node;
+ int last = 1;
+
+ /* pull the item */
+
+ /* borrowed */
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|p:popitem", kwlist,
+ &last)) {
+ return NULL;
+ }
+
+ if (_odict_EMPTY(od)) {
+ PyErr_SetString(PyExc_KeyError, "dictionary is empty");
+ return NULL;
+ }
+
+ node = last ? _odict_LAST(od) : _odict_FIRST(od);
+ key = _odictnode_KEY(node);
+ Py_INCREF(key);
+ value = _odict_popkey_hash(od, key, NULL, _odictnode_HASH(node));
+ if (value == NULL)
+ return NULL;
+ item = PyTuple_Pack(2, key, value);
+ Py_DECREF(key);
+ Py_DECREF(value);
+ return item;
+}
+
+/* keys() */
+
+/* MutableMapping.keys() does not have a docstring. */
+PyDoc_STRVAR(odict_keys__doc__, "");
+
+static PyObject * odictkeys_new(PyObject *od); /* forward */
+
+/* values() */
+
+/* MutableMapping.values() does not have a docstring. */
+PyDoc_STRVAR(odict_values__doc__, "");
+
+static PyObject * odictvalues_new(PyObject *od); /* forward */
+
+/* items() */
+
+/* MutableMapping.items() does not have a docstring. */
+PyDoc_STRVAR(odict_items__doc__, "");
+
+static PyObject * odictitems_new(PyObject *od); /* forward */
+
+/* update() */
+
+/* MutableMapping.update() does not have a docstring. */
+PyDoc_STRVAR(odict_update__doc__, "");
+
+/* forward */
+static PyObject * mutablemapping_update(PyObject *, PyObject *, PyObject *);
+
+#define odict_update mutablemapping_update
+
+/* clear() */
+
+PyDoc_STRVAR(odict_clear__doc__,
+ "od.clear() -> None. Remove all items from od.");
+
+static PyObject *
+odict_clear(register PyODictObject *od)
+{
+ PyDict_Clear((PyObject *)od);
+ _odict_clear_nodes(od);
+ if (_odict_resize(od) < 0)
+ return NULL;
+ Py_RETURN_NONE;
+}
+
+/* copy() */
+
+/* forward */
+static int _PyODict_SetItem_KnownHash(PyObject *, PyObject *, PyObject *,
+ Py_hash_t);
+
+PyDoc_STRVAR(odict_copy__doc__, "od.copy() -> a shallow copy of od");
+
+static PyObject *
+odict_copy(register PyODictObject *od)
+{
+ _ODictNode *node;
+ PyObject *od_copy;
+
+ if (PyODict_CheckExact(od))
+ od_copy = PyODict_New();
+ else
+ od_copy = PyObject_CallFunctionObjArgs((PyObject *)Py_TYPE(od), NULL);
+ if (od_copy == NULL)
+ return NULL;
+
+ if (PyODict_CheckExact(od)) {
+ _odict_FOREACH(od, node) {
+ PyObject *key = _odictnode_KEY(node);
+ PyObject *value = _odictnode_VALUE(node, od);
+ if (value == NULL) {
+ if (!PyErr_Occurred())
+ PyErr_SetObject(PyExc_KeyError, key);
+ goto fail;
+ }
+ if (_PyODict_SetItem_KnownHash((PyObject *)od_copy, key, value,
+ _odictnode_HASH(node)) != 0)
+ goto fail;
+ }
+ }
+ else {
+ _odict_FOREACH(od, node) {
+ int res;
+ PyObject *value = PyObject_GetItem((PyObject *)od,
+ _odictnode_KEY(node));
+ if (value == NULL)
+ goto fail;
+ res = PyObject_SetItem((PyObject *)od_copy,
+ _odictnode_KEY(node), value);
+ Py_DECREF(value);
+ if (res != 0)
+ goto fail;
+ }
+ }
+ return od_copy;
+
+fail:
+ Py_DECREF(od_copy);
+ return NULL;
+}
+
+/* __reversed__() */
+
+PyDoc_STRVAR(odict_reversed__doc__, "od.__reversed__() <==> reversed(od)");
+
+#define _odict_ITER_REVERSED 1
+#define _odict_ITER_KEYS 2
+#define _odict_ITER_VALUES 4
+
+/* forward */
+static PyObject * odictiter_new(PyODictObject *, int);
+
+static PyObject *
+odict_reversed(PyODictObject *od)
+{
+ return odictiter_new(od, _odict_ITER_KEYS|_odict_ITER_REVERSED);
+}
+
+/* move_to_end() */
+
+PyDoc_STRVAR(odict_move_to_end__doc__,
+"Move an existing element to the end (or beginning if last==False).\n\
+\n\
+ Raises KeyError if the element does not exist.\n\
+ When last=True, acts like a fast version of self[key]=self.pop(key).\n\
+\n\
+ ");
+
+static PyObject *
+odict_move_to_end(PyODictObject *od, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = {"key", "last", 0};
+ PyObject *key;
+ int last = 1;
+ _ODictNode *node;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|p:move_to_end", kwlist,
+ &key, &last)) {
+ return NULL;
+ }
+
+ if (_odict_EMPTY(od)) {
+ PyErr_SetObject(PyExc_KeyError, key);
+ return NULL;
+ }
+ node = last ? _odict_LAST(od) : _odict_FIRST(od);
+ if (key != _odictnode_KEY(node)) {
+ node = _odict_find_node(od, key);
+ if (node == NULL) {
+ if (!PyErr_Occurred())
+ PyErr_SetObject(PyExc_KeyError, key);
+ return NULL;
+ }
+ if (last) {
+ /* Only move if not already the last one. */
+ if (node != _odict_LAST(od)) {
+ _odict_remove_node(od, node);
+ _odict_add_tail(od, node);
+ }
+ }
+ else {
+ /* Only move if not already the first one. */
+ if (node != _odict_FIRST(od)) {
+ _odict_remove_node(od, node);
+ _odict_add_head(od, node);
+ }
+ }
+ }
+ Py_RETURN_NONE;
+}
+
+
+/* tp_methods */
+
+static PyMethodDef odict_methods[] = {
+
+ /* explicitly defined so we can align docstrings with
+ * collections.OrderedDict */
+ {"__delitem__", (PyCFunction)odict_mp_ass_sub, METH_NOARGS,
+ odict_delitem__doc__},
+ {"__eq__", (PyCFunction)odict_eq, METH_NOARGS,
+ odict_eq__doc__},
+ {"__init__", (PyCFunction)odict_init, METH_NOARGS,
+ odict_init__doc__},
+ {"__iter__", (PyCFunction)odict_iter, METH_NOARGS,
+ odict_iter__doc__},
+ {"__ne__", (PyCFunction)odict_ne, METH_NOARGS,
+ odict_ne__doc__},
+ {"__repr__", (PyCFunction)odict_repr, METH_NOARGS,
+ odict_repr__doc__},
+ {"__setitem__", (PyCFunction)odict_mp_ass_sub, METH_NOARGS,
+ odict_setitem__doc__},
+ {"fromkeys", (PyCFunction)odict_fromkeys,
+ METH_VARARGS | METH_KEYWORDS | METH_CLASS, odict_fromkeys__doc__},
+
+ /* overridden dict methods */
+ {"__sizeof__", (PyCFunction)odict_sizeof, METH_NOARGS,
+ odict_sizeof__doc__},
+ {"__reduce__", (PyCFunction)odict_reduce, METH_NOARGS,
+ odict_reduce__doc__},
+ {"setdefault", (PyCFunction)odict_setdefault,
+ METH_VARARGS | METH_KEYWORDS, odict_setdefault__doc__},
+ {"pop", (PyCFunction)odict_pop,
+ METH_VARARGS | METH_KEYWORDS, odict_pop__doc__},
+ {"popitem", (PyCFunction)odict_popitem,
+ METH_VARARGS | METH_KEYWORDS, odict_popitem__doc__},
+ {"keys", (PyCFunction)odictkeys_new, METH_NOARGS,
+ odict_keys__doc__},
+ {"values", (PyCFunction)odictvalues_new, METH_NOARGS,
+ odict_values__doc__},
+ {"items", (PyCFunction)odictitems_new, METH_NOARGS,
+ odict_items__doc__},
+ {"update", (PyCFunction)odict_update, METH_VARARGS | METH_KEYWORDS,
+ odict_update__doc__},
+ {"clear", (PyCFunction)odict_clear, METH_NOARGS,
+ odict_clear__doc__},
+ {"copy", (PyCFunction)odict_copy, METH_NOARGS,
+ odict_copy__doc__},
+
+ /* new methods */
+ {"__reversed__", (PyCFunction)odict_reversed, METH_NOARGS,
+ odict_reversed__doc__},
+ {"move_to_end", (PyCFunction)odict_move_to_end,
+ METH_VARARGS | METH_KEYWORDS, odict_move_to_end__doc__},
+
+ {NULL, NULL} /* sentinel */
+};
+
+
+/* ----------------------------------------------
+ * OrderedDict members
+ */
+
+/* tp_members */
+
+static PyMemberDef odict_members[] = {
+ {"__dict__", T_OBJECT, offsetof(PyODictObject, od_inst_dict), READONLY},
+ {0}
+};
+
+
+/* ----------------------------------------------
+ * OrderedDict type slot methods
+ */
+
+/* tp_dealloc */
+
+static void
+odict_dealloc(PyODictObject *self)
+{
+ PyThreadState *tstate = PyThreadState_GET();
+
+ PyObject_GC_UnTrack(self);
+ Py_TRASHCAN_SAFE_BEGIN(self)
+
+ Py_XDECREF(self->od_inst_dict);
+ if (self->od_weakreflist != NULL)
+ PyObject_ClearWeakRefs((PyObject *)self);
+
+ _odict_clear_nodes(self);
+
+ /* Call the base tp_dealloc(). Since it too uses the trashcan mechanism,
+ * temporarily decrement trash_delete_nesting to prevent triggering it
+ * and putting the partially deallocated object on the trashcan's
+ * to-be-deleted-later list.
+ */
+ --tstate->trash_delete_nesting;
+ assert(_tstate->trash_delete_nesting < PyTrash_UNWIND_LEVEL);
+ PyDict_Type.tp_dealloc((PyObject *)self);
+ ++tstate->trash_delete_nesting;
+
+ Py_TRASHCAN_SAFE_END(self)
+};
+
+/* tp_repr */
+
+static PyObject *
+odict_repr(PyODictObject *self)
+{
+ int i;
+ _Py_IDENTIFIER(items);
+ PyObject *pieces = NULL, *result = NULL;
+ const char *classname;
+
+ classname = strrchr(Py_TYPE(self)->tp_name, '.');
+ if (classname == NULL)
+ classname = Py_TYPE(self)->tp_name;
+ else
+ classname++;
+
+ if (PyODict_SIZE(self) == 0)
+ return PyUnicode_FromFormat("%s()", classname);
+
+ i = Py_ReprEnter((PyObject *)self);
+ if (i != 0) {
+ return i > 0 ? PyUnicode_FromString("...") : NULL;
+ }
+
+ if (PyODict_CheckExact(self)) {
+ Py_ssize_t count = 0;
+ _ODictNode *node;
+ pieces = PyList_New(PyODict_SIZE(self));
+ if (pieces == NULL)
+ goto Done;
+
+ _odict_FOREACH(self, node) {
+ PyObject *pair;
+ PyObject *key = _odictnode_KEY(node);
+ PyObject *value = _odictnode_VALUE(node, self);
+ if (value == NULL) {
+ if (!PyErr_Occurred())
+ PyErr_SetObject(PyExc_KeyError, key);
+ goto Done;
+ }
+ pair = PyTuple_Pack(2, key, value);
+ if (pair == NULL)
+ goto Done;
+
+ if (count < PyList_GET_SIZE(pieces))
+ PyList_SET_ITEM(pieces, count, pair); /* steals reference */
+ else {
+ if (PyList_Append(pieces, pair) < 0) {
+ Py_DECREF(pair);
+ goto Done;
+ }
+ Py_DECREF(pair);
+ }
+ count++;
+ }
+ if (count < PyList_GET_SIZE(pieces))
+ PyList_GET_SIZE(pieces) = count;
+ }
+ else {
+ PyObject *items = _PyObject_CallMethodIdObjArgs((PyObject *)self,
+ &PyId_items, NULL);
+ if (items == NULL)
+ goto Done;
+ pieces = PySequence_List(items);
+ Py_DECREF(items);
+ if (pieces == NULL)
+ goto Done;
+ }
+
+ result = PyUnicode_FromFormat("%s(%R)", classname, pieces);
+
+Done:
+ Py_XDECREF(pieces);
+ Py_ReprLeave((PyObject *)self);
+ return result;
+};
+
+/* tp_doc */
+
+PyDoc_STRVAR(odict_doc,
+ "Dictionary that remembers insertion order");
+
+/* tp_traverse */
+
+static int
+odict_traverse(PyODictObject *od, visitproc visit, void *arg)
+{
+ _ODictNode *node;
+
+ Py_VISIT(od->od_inst_dict);
+ Py_VISIT(od->od_weakreflist);
+ _odict_FOREACH(od, node) {
+ Py_VISIT(_odictnode_KEY(node));
+ }
+ return PyDict_Type.tp_traverse((PyObject *)od, visit, arg);
+}
+
+/* tp_clear */
+
+static int
+odict_tp_clear(PyODictObject *od)
+{
+ PyObject *res;
+ Py_CLEAR(od->od_inst_dict);
+ Py_CLEAR(od->od_weakreflist);
+ res = odict_clear(od);
+ if (res == NULL)
+ return -1;
+ Py_DECREF(res);
+ return 0;
+}
+
+/* tp_richcompare */
+
+static PyObject *
+odict_richcompare(PyObject *v, PyObject *w, int op)
+{
+ if (!PyODict_Check(v) || !PyDict_Check(w)) {
+ Py_RETURN_NOTIMPLEMENTED;
+ }
+
+ if (op == Py_EQ || op == Py_NE) {
+ PyObject *res, *cmp;
+ int eq;
+
+ cmp = PyDict_Type.tp_richcompare(v, w, op);
+ if (cmp == NULL)
+ return NULL;
+ if (!PyODict_Check(w))
+ return cmp;
+ if (op == Py_EQ && cmp == Py_False)
+ return cmp;
+ if (op == Py_NE && cmp == Py_True)
+ return cmp;
+ Py_DECREF(cmp);
+
+ /* Try comparing odict keys. */
+ eq = _odict_keys_equal((PyODictObject *)v, (PyODictObject *)w);
+ if (eq < 0)
+ return NULL;
+
+ res = (eq == (op == Py_EQ)) ? Py_True : Py_False;
+ Py_INCREF(res);
+ return res;
+ } else {
+ Py_RETURN_NOTIMPLEMENTED;
+ }
+};
+
+/* tp_iter */
+
+static PyObject *
+odict_iter(PyODictObject *od)
+{
+ return odictiter_new(od, _odict_ITER_KEYS);
+};
+
+/* tp_init */
+
+static int
+odict_init(PyObject *self, PyObject *args, PyObject *kwds)
+{
+ PyObject *res;
+ Py_ssize_t len = PyObject_Length(args);
+
+ if (len == -1)
+ return -1;
+ if (len > 1) {
+ char *msg = "expected at most 1 arguments, got %d";
+ PyErr_Format(PyExc_TypeError, msg, len);
+ return -1;
+ }
+
+ /* __init__() triggering update() is just the way things are! */
+ res = odict_update(self, args, kwds);
+ if (res == NULL) {
+ return -1;
+ } else {
+ Py_DECREF(res);
+ return 0;
+ }
+};
+
+/* tp_new */
+
+static PyObject *
+odict_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+{
+ PyObject *dict;
+ PyODictObject *od;
+
+ dict = PyDict_New();
+ if (dict == NULL)
+ return NULL;
+
+ od = (PyODictObject *)PyDict_Type.tp_new(type, args, kwds);
+ if (od == NULL) {
+ Py_DECREF(dict);
+ return NULL;
+ }
+
+ od->od_inst_dict = dict;
+ /* type constructor fills the memory with zeros (see
+ PyType_GenericAlloc()), there is no need to set them to zero again */
+ if (_odict_resize(od) < 0) {
+ Py_DECREF(od);
+ return NULL;
+ }
+
+ return (PyObject*)od;
+}
+
+/* PyODict_Type */
+
+PyTypeObject PyODict_Type = {
+ PyVarObject_HEAD_INIT(&PyType_Type, 0)
+ "collections.OrderedDict", /* tp_name */
+ sizeof(PyODictObject), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ (destructor)odict_dealloc, /* tp_dealloc */
+ 0, /* tp_print */
+ 0, /* tp_getattr */
+ 0, /* tp_setattr */
+ 0, /* tp_reserved */
+ (reprfunc)odict_repr, /* tp_repr */
+ 0, /* tp_as_number */
+ 0, /* tp_as_sequence */
+ &odict_as_mapping, /* tp_as_mapping */
+ 0, /* tp_hash */
+ 0, /* tp_call */
+ 0, /* tp_str */
+ 0, /* tp_getattro */
+ 0, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC,/* tp_flags */
+ odict_doc, /* tp_doc */
+ (traverseproc)odict_traverse, /* tp_traverse */
+ (inquiry)odict_tp_clear, /* tp_clear */
+ (richcmpfunc)odict_richcompare, /* tp_richcompare */
+ offsetof(PyODictObject, od_weakreflist), /* tp_weaklistoffset */
+ (getiterfunc)odict_iter, /* tp_iter */
+ 0, /* tp_iternext */
+ odict_methods, /* tp_methods */
+ odict_members, /* tp_members */
+ 0, /* tp_getset */
+ &PyDict_Type, /* tp_base */
+ 0, /* tp_dict */
+ 0, /* tp_descr_get */
+ 0, /* tp_descr_set */
+ offsetof(PyODictObject, od_inst_dict), /* tp_dictoffset */
+ (initproc)odict_init, /* tp_init */
+ PyType_GenericAlloc, /* tp_alloc */
+ (newfunc)odict_new, /* tp_new */
+ 0, /* tp_free */
+};
+
+
+/* ----------------------------------------------
+ * the public OrderedDict API
+ */
+
+PyObject *
+PyODict_New(void) {
+ return odict_new(&PyODict_Type, NULL, NULL);
+};
+
+static int
+_PyODict_SetItem_KnownHash(PyObject *od, PyObject *key, PyObject *value,
+ Py_hash_t hash)
+{
+ int res = _PyDict_SetItem_KnownHash(od, key, value, hash);
+ if (res == 0) {
+ res = _odict_add_new_node((PyODictObject *)od, key, hash);
+ if (res < 0) {
+ /* Revert setting the value on the dict */
+ PyObject *exc, *val, *tb;
+ PyErr_Fetch(&exc, &val, &tb);
+ (void) _PyDict_DelItem_KnownHash(od, key, hash);
+ _PyErr_ChainExceptions(exc, val, tb);
+ }
+ }
+ return res;
+};
+
+int
+PyODict_SetItem(PyObject *od, PyObject *key, PyObject *value)
+{
+ Py_hash_t hash = PyObject_Hash(key);
+ if (hash == -1)
+ return -1;
+ return _PyODict_SetItem_KnownHash(od, key, value, hash);
+};
+
+int
+PyODict_DelItem(PyObject *od, PyObject *key)
+{
+ int res;
+ Py_hash_t hash = PyObject_Hash(key);
+ if (hash == -1)
+ return -1;
+ res = _odict_clear_node((PyODictObject *)od, NULL, key, hash);
+ if (res < 0)
+ return -1;
+ return _PyDict_DelItem_KnownHash(od, key, hash);
+};
+
+
+/* -------------------------------------------
+ * The OrderedDict views (keys/values/items)
+ */
+
+typedef struct {
+ PyObject_HEAD
+ int kind;
+ PyODictObject *di_odict;
+ Py_ssize_t di_size;
+ size_t di_state;
+ PyObject *di_current;
+ PyObject *di_result; /* reusable result tuple for iteritems */
+} odictiterobject;
+
+static void
+odictiter_dealloc(odictiterobject *di)
+{
+ _PyObject_GC_UNTRACK(di);
+ Py_XDECREF(di->di_odict);
+ Py_XDECREF(di->di_current);
+ if (di->kind & (_odict_ITER_KEYS | _odict_ITER_VALUES)) {
+ Py_DECREF(di->di_result);
+ }
+ PyObject_GC_Del(di);
+}
+
+static int
+odictiter_traverse(odictiterobject *di, visitproc visit, void *arg)
+{
+ Py_VISIT(di->di_odict);
+ Py_VISIT(di->di_current); /* A key could be any type, not just str. */
+ Py_VISIT(di->di_result);
+ return 0;
+}
+
+/* In order to protect against modifications during iteration, we track
+ * the current key instead of the current node. */
+static PyObject *
+odictiter_nextkey(odictiterobject *di)
+{
+ PyObject *key = NULL;
+ _ODictNode *node;
+ int reversed = di->kind & _odict_ITER_REVERSED;
+
+ if (di->di_odict == NULL)
+ return NULL;
+ if (di->di_current == NULL)
+ goto done; /* We're already done. */
+
+ /* Check for unsupported changes. */
+ if (di->di_odict->od_state != di->di_state) {
+ PyErr_SetString(PyExc_RuntimeError,
+ "OrderedDict mutated during iteration");
+ goto done;
+ }
+ if (di->di_size != PyODict_SIZE(di->di_odict)) {
+ PyErr_SetString(PyExc_RuntimeError,
+ "OrderedDict changed size during iteration");
+ di->di_size = -1; /* Make this state sticky */
+ return NULL;
+ }
+
+ /* Get the key. */
+ node = _odict_find_node(di->di_odict, di->di_current);
+ if (node == NULL) {
+ if (!PyErr_Occurred())
+ PyErr_SetObject(PyExc_KeyError, di->di_current);
+ /* Must have been deleted. */
+ Py_CLEAR(di->di_current);
+ return NULL;
+ }
+ key = di->di_current;
+
+ /* Advance to the next key. */
+ node = reversed ? _odictnode_PREV(node) : _odictnode_NEXT(node);
+ if (node == NULL) {
+ /* Reached the end. */
+ di->di_current = NULL;
+ }
+ else {
+ di->di_current = _odictnode_KEY(node);
+ Py_INCREF(di->di_current);
+ }
+
+ return key;
+
+done:
+ Py_CLEAR(di->di_odict);
+ return key;
+}
+
+static PyObject *
+odictiter_iternext(odictiterobject *di)
+{
+ PyObject *result, *value;
+ PyObject *key = odictiter_nextkey(di); /* new reference */
+
+ if (key == NULL)
+ return NULL;
+
+ /* Handle the keys case. */
+ if (! (di->kind & _odict_ITER_VALUES)) {
+ return key;
+ }
+
+ value = PyODict_GetItem((PyObject *)di->di_odict, key); /* borrowed */
+ if (value == NULL) {
+ if (!PyErr_Occurred())
+ PyErr_SetObject(PyExc_KeyError, key);
+ Py_DECREF(key);
+ goto done;
+ }
+ Py_INCREF(value);
+
+ /* Handle the values case. */
+ if (!(di->kind & _odict_ITER_KEYS)) {
+ Py_DECREF(key);
+ return value;
+ }
+
+ /* Handle the items case. */
+ result = di->di_result;
+
+ if (Py_REFCNT(result) == 1) {
+ /* not in use so we can reuse it
+ * (the common case during iteration) */
+ Py_INCREF(result);
+ Py_DECREF(PyTuple_GET_ITEM(result, 0)); /* borrowed */
+ Py_DECREF(PyTuple_GET_ITEM(result, 1)); /* borrowed */
+ }
+ else {
+ result = PyTuple_New(2);
+ if (result == NULL) {
+ Py_DECREF(key);
+ Py_DECREF(value);
+ goto done;
+ }
+ }
+
+ PyTuple_SET_ITEM(result, 0, key); /* steals reference */
+ PyTuple_SET_ITEM(result, 1, value); /* steals reference */
+ return result;
+
+done:
+ Py_CLEAR(di->di_current);
+ Py_CLEAR(di->di_odict);
+ return NULL;
+}
+
+/* No need for tp_clear because odictiterobject is not mutable. */
+
+PyDoc_STRVAR(reduce_doc, "Return state information for pickling");
+
+static PyObject *
+odictiter_reduce(odictiterobject *di)
+{
+ PyObject *list, *iter;
+
+ list = PyList_New(0);
+ if (!list)
+ return NULL;
+
+ /* iterate the temporary into a list */
+ for(;;) {
+ PyObject *element = odictiter_iternext(di);
+ if (element) {
+ if (PyList_Append(list, element)) {
+ Py_DECREF(element);
+ Py_DECREF(list);
+ return NULL;
+ }
+ Py_DECREF(element);
+ }
+ else {
+ /* done iterating? */
+ break;
+ }
+ }
+ if (PyErr_Occurred()) {
+ Py_DECREF(list);
+ return NULL;
+ }
+ iter = _PyObject_GetBuiltin("iter");
+ if (iter == NULL) {
+ Py_DECREF(list);
+ return NULL;
+ }
+ return Py_BuildValue("N(N)", iter, list);
+}
+
+static PyMethodDef odictiter_methods[] = {
+ {"__reduce__", (PyCFunction)odictiter_reduce, METH_NOARGS, reduce_doc},
+ {NULL, NULL} /* sentinel */
+};
+
+PyTypeObject PyODictIter_Type = {
+ PyVarObject_HEAD_INIT(&PyType_Type, 0)
+ "odict_iterator", /* tp_name */
+ sizeof(odictiterobject), /* tp_basicsize */
+ 0, /* tp_itemsize */
+ /* methods */
+ (destructor)odictiter_dealloc, /* tp_dealloc */
+ 0, /* tp_print */
+ 0, /* tp_getattr */
+ 0, /* tp_setattr */
+ 0, /* tp_reserved */
+ 0, /* tp_repr */
+ 0, /* tp_as_number */
+ 0, /* tp_as_sequence */
+ 0, /* tp_as_mapping */
+ 0, /* tp_hash */
+ 0, /* tp_call */
+ 0, /* tp_str */
+ PyObject_GenericGetAttr, /* tp_getattro */
+ 0, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */
+ 0, /* tp_doc */
+ (traverseproc)odictiter_traverse, /* tp_traverse */
+ 0, /* tp_clear */
+ 0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ PyObject_SelfIter, /* tp_iter */
+ (iternextfunc)odictiter_iternext, /* tp_iternext */
+ odictiter_methods, /* tp_methods */
+ 0,
+};
+
+static PyObject *
+odictiter_new(PyODictObject *od, int kind)
+{
+ odictiterobject *di;
+ _ODictNode *node;
+ int reversed = kind & _odict_ITER_REVERSED;
+
+ di = PyObject_GC_New(odictiterobject, &PyODictIter_Type);
+ if (di == NULL)
+ return NULL;
+
+ if (kind & (_odict_ITER_KEYS | _odict_ITER_VALUES)){
+ di->di_result = PyTuple_Pack(2, Py_None, Py_None);
+ if (di->di_result == NULL) {
+ Py_DECREF(di);
+ return NULL;
+ }
+ }
+ else
+ di->di_result = NULL;
+
+ di->kind = kind;
+ node = reversed ? _odict_LAST(od) : _odict_FIRST(od);
+ di->di_current = node ? _odictnode_KEY(node) : NULL;
+ Py_XINCREF(di->di_current);
+ di->di_size = PyODict_SIZE(od);
+ di->di_state = od->od_state;
+ di->di_odict = od;
+ Py_INCREF(od);
+
+ _PyObject_GC_TRACK(di);
+ return (PyObject *)di;
+}
+
+/* keys() */
+
+static PyObject *
+odictkeys_iter(_PyDictViewObject *dv)
+{
+ if (dv->dv_dict == NULL) {
+ Py_RETURN_NONE;
+ }
+ return odictiter_new((PyODictObject *)dv->dv_dict,
+ _odict_ITER_KEYS);
+}
+
+static PyObject *
+odictkeys_reversed(_PyDictViewObject *dv)
+{
+ if (dv->dv_dict == NULL) {
+ Py_RETURN_NONE;
+ }
+ return odictiter_new((PyODictObject *)dv->dv_dict,
+ _odict_ITER_KEYS|_odict_ITER_REVERSED);
+}
+
+static PyMethodDef odictkeys_methods[] = {
+ {"__reversed__", (PyCFunction)odictkeys_reversed, METH_NOARGS, NULL},
+ {NULL, NULL} /* sentinel */
+};
+
+PyTypeObject PyODictKeys_Type = {
+ PyVarObject_HEAD_INIT(&PyType_Type, 0)
+ "odict_keys", /* tp_name */
+ 0, /* tp_basicsize */
+ 0, /* tp_itemsize */
+ 0, /* tp_dealloc */
+ 0, /* tp_print */
+ 0, /* tp_getattr */
+ 0, /* tp_setattr */
+ 0, /* tp_reserved */
+ 0, /* tp_repr */
+ 0, /* tp_as_number */
+ 0, /* tp_as_sequence */
+ 0, /* tp_as_mapping */
+ 0, /* tp_hash */
+ 0, /* tp_call */
+ 0, /* tp_str */
+ 0, /* tp_getattro */
+ 0, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ 0, /* tp_flags */
+ 0, /* tp_doc */
+ 0, /* tp_traverse */
+ 0, /* tp_clear */
+ 0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ (getiterfunc)odictkeys_iter, /* tp_iter */
+ 0, /* tp_iternext */
+ odictkeys_methods, /* tp_methods */
+ 0, /* tp_members */
+ 0, /* tp_getset */
+ &PyDictKeys_Type, /* tp_base */
+};
+
+static PyObject *
+odictkeys_new(PyObject *od)
+{
+ return _PyDictView_New(od, &PyODictKeys_Type);
+}
+
+/* items() */
+
+static PyObject *
+odictitems_iter(_PyDictViewObject *dv)
+{
+ if (dv->dv_dict == NULL) {
+ Py_RETURN_NONE;
+ }
+ return odictiter_new((PyODictObject *)dv->dv_dict,
+ _odict_ITER_KEYS|_odict_ITER_VALUES);
+}
+
+static PyObject *
+odictitems_reversed(_PyDictViewObject *dv)
+{
+ if (dv->dv_dict == NULL) {
+ Py_RETURN_NONE;
+ }
+ return odictiter_new((PyODictObject *)dv->dv_dict,
+ _odict_ITER_KEYS|_odict_ITER_VALUES|_odict_ITER_REVERSED);
+}
+
+static PyMethodDef odictitems_methods[] = {
+ {"__reversed__", (PyCFunction)odictitems_reversed, METH_NOARGS, NULL},
+ {NULL, NULL} /* sentinel */
+};
+
+PyTypeObject PyODictItems_Type = {
+ PyVarObject_HEAD_INIT(&PyType_Type, 0)
+ "odict_items", /* tp_name */
+ 0, /* tp_basicsize */
+ 0, /* tp_itemsize */
+ 0, /* tp_dealloc */
+ 0, /* tp_print */
+ 0, /* tp_getattr */
+ 0, /* tp_setattr */
+ 0, /* tp_reserved */
+ 0, /* tp_repr */
+ 0, /* tp_as_number */
+ 0, /* tp_as_sequence */
+ 0, /* tp_as_mapping */
+ 0, /* tp_hash */
+ 0, /* tp_call */
+ 0, /* tp_str */
+ 0, /* tp_getattro */
+ 0, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ 0, /* tp_flags */
+ 0, /* tp_doc */
+ 0, /* tp_traverse */
+ 0, /* tp_clear */
+ 0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ (getiterfunc)odictitems_iter, /* tp_iter */
+ 0, /* tp_iternext */
+ odictitems_methods, /* tp_methods */
+ 0, /* tp_members */
+ 0, /* tp_getset */
+ &PyDictItems_Type, /* tp_base */
+};
+
+static PyObject *
+odictitems_new(PyObject *od)
+{
+ return _PyDictView_New(od, &PyODictItems_Type);
+}
+
+/* values() */
+
+static PyObject *
+odictvalues_iter(_PyDictViewObject *dv)
+{
+ if (dv->dv_dict == NULL) {
+ Py_RETURN_NONE;
+ }
+ return odictiter_new((PyODictObject *)dv->dv_dict,
+ _odict_ITER_VALUES);
+}
+
+static PyObject *
+odictvalues_reversed(_PyDictViewObject *dv)
+{
+ if (dv->dv_dict == NULL) {
+ Py_RETURN_NONE;
+ }
+ return odictiter_new((PyODictObject *)dv->dv_dict,
+ _odict_ITER_VALUES|_odict_ITER_REVERSED);
+}
+
+static PyMethodDef odictvalues_methods[] = {
+ {"__reversed__", (PyCFunction)odictvalues_reversed, METH_NOARGS, NULL},
+ {NULL, NULL} /* sentinel */
+};
+
+PyTypeObject PyODictValues_Type = {
+ PyVarObject_HEAD_INIT(&PyType_Type, 0)
+ "odict_values", /* tp_name */
+ 0, /* tp_basicsize */
+ 0, /* tp_itemsize */
+ 0, /* tp_dealloc */
+ 0, /* tp_print */
+ 0, /* tp_getattr */
+ 0, /* tp_setattr */
+ 0, /* tp_reserved */
+ 0, /* tp_repr */
+ 0, /* tp_as_number */
+ 0, /* tp_as_sequence */
+ 0, /* tp_as_mapping */
+ 0, /* tp_hash */
+ 0, /* tp_call */
+ 0, /* tp_str */
+ 0, /* tp_getattro */
+ 0, /* tp_setattro */
+ 0, /* tp_as_buffer */
+ 0, /* tp_flags */
+ 0, /* tp_doc */
+ 0, /* tp_traverse */
+ 0, /* tp_clear */
+ 0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ (getiterfunc)odictvalues_iter, /* tp_iter */
+ 0, /* tp_iternext */
+ odictvalues_methods, /* tp_methods */
+ 0, /* tp_members */
+ 0, /* tp_getset */
+ &PyDictValues_Type, /* tp_base */
+};
+
+static PyObject *
+odictvalues_new(PyObject *od)
+{
+ return _PyDictView_New(od, &PyODictValues_Type);
+}
+
+
+/* ----------------------------------------------
+ MutableMappping implementations
+
+Mapping:
+
+============ ===========
+method uses
+============ ===========
+__contains__ __getitem__
+__eq__ items
+__getitem__ +
+__iter__ +
+__len__ +
+__ne__ __eq__
+get __getitem__
+items ItemsView
+keys KeysView
+values ValuesView
+============ ===========
+
+ItemsView uses __len__, __iter__, and __getitem__.
+KeysView uses __len__, __iter__, and __contains__.
+ValuesView uses __len__, __iter__, and __getitem__.
+
+MutableMapping:
+
+============ ===========
+method uses
+============ ===========
+__delitem__ +
+__setitem__ +
+clear popitem
+pop __getitem__
+ __delitem__
+popitem __iter__
+ _getitem__
+ __delitem__
+setdefault __getitem__
+ __setitem__
+update __setitem__
+============ ===========
+*/
+
+static int
+mutablemapping_add_pairs(PyObject *self, PyObject *pairs)
+{
+ PyObject *pair, *iterator, *unexpected;
+ int res = 0;
+
+ iterator = PyObject_GetIter(pairs);
+ if (iterator == NULL)
+ return -1;
+ PyErr_Clear();
+
+ while ((pair = PyIter_Next(iterator)) != NULL) {
+ /* could be more efficient (see UNPACK_SEQUENCE in ceval.c) */
+ PyObject *key = NULL, *value = NULL;
+ PyObject *pair_iterator = PyObject_GetIter(pair);
+ if (pair_iterator == NULL)
+ goto Done;
+
+ key = PyIter_Next(pair_iterator);
+ if (key == NULL) {
+ if (!PyErr_Occurred())
+ PyErr_SetString(PyExc_ValueError,
+ "need more than 0 values to unpack");
+ goto Done;
+ }
+
+ value = PyIter_Next(pair_iterator);
+ if (value == NULL) {
+ if (!PyErr_Occurred())
+ PyErr_SetString(PyExc_ValueError,
+ "need more than 1 value to unpack");
+ goto Done;
+ }
+
+ unexpected = PyIter_Next(pair_iterator);
+ if (unexpected != NULL) {
+ Py_DECREF(unexpected);
+ PyErr_SetString(PyExc_ValueError,
+ "too many values to unpack (expected 2)");
+ goto Done;
+ }
+ else if (PyErr_Occurred())
+ goto Done;
+
+ res = PyObject_SetItem(self, key, value);
+
+Done:
+ Py_DECREF(pair);
+ Py_XDECREF(pair_iterator);
+ Py_XDECREF(key);
+ Py_XDECREF(value);
+ if (PyErr_Occurred())
+ break;
+ }
+ Py_DECREF(iterator);
+
+ if (res < 0 || PyErr_Occurred() != NULL)
+ return -1;
+ else
+ return 0;
+}
+
+static PyObject *
+mutablemapping_update(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+ int res = 0;
+ Py_ssize_t len;
+ _Py_IDENTIFIER(items);
+ _Py_IDENTIFIER(keys);
+
+ /* first handle args, if any */
+ assert(args == NULL || PyTuple_Check(args));
+ len = (args != NULL) ? PyTuple_GET_SIZE(args) : 0;
+ if (len > 1) {
+ char *msg = "update() takes at most 1 positional argument (%d given)";
+ PyErr_Format(PyExc_TypeError, msg, len);
+ return NULL;
+ }
+
+ if (len) {
+ PyObject *other = PyTuple_GET_ITEM(args, 0); /* borrowed reference */
+ assert(other != NULL);
+ Py_INCREF(other);
+ if (PyDict_CheckExact(other) ||
+ _PyObject_HasAttrId(other, &PyId_items)) { /* never fails */
+ PyObject *items;
+ if (PyDict_CheckExact(other))
+ items = PyDict_Items(other);
+ else
+ items = _PyObject_CallMethodId(other, &PyId_items, NULL);
+ Py_DECREF(other);
+ if (items == NULL)
+ return NULL;
+ res = mutablemapping_add_pairs(self, items);
+ Py_DECREF(items);
+ if (res == -1)
+ return NULL;
+ }
+ else if (_PyObject_HasAttrId(other, &PyId_keys)) { /* never fails */
+ PyObject *keys, *iterator, *key;
+ keys = _PyObject_CallMethodIdObjArgs(other, &PyId_keys, NULL);
+ if (keys == NULL) {
+ Py_DECREF(other);
+ return NULL;
+ }
+ iterator = PyObject_GetIter(keys);
+ Py_DECREF(keys);
+ if (iterator == NULL) {
+ Py_DECREF(other);
+ return NULL;
+ }
+ while (res == 0 && (key = PyIter_Next(iterator))) {
+ PyObject *value = PyObject_GetItem(other, key);
+ if (value != NULL) {
+ res = PyObject_SetItem(self, key, value);
+ Py_DECREF(value);
+ }
+ else {
+ res = -1;
+ }
+ Py_DECREF(key);
+ }
+ Py_DECREF(other);
+ Py_DECREF(iterator);
+ if (res != 0 || PyErr_Occurred())
+ return NULL;
+ }
+ else {
+ res = mutablemapping_add_pairs(self, other);
+ Py_DECREF(other);
+ if (res != 0)
+ return NULL;
+ }
+ }
+
+ /* now handle kwargs */
+ assert(kwargs == NULL || PyDict_Check(kwargs));
+ len = (kwargs != NULL) ? PyDict_Size(kwargs) : 0;
+ if (len > 0) {
+ PyObject *items = PyDict_Items(kwargs);
+ if (items == NULL)
+ return NULL;
+ res = mutablemapping_add_pairs(self, items);
+ Py_DECREF(items);
+ if (res == -1)
+ return NULL;
+ }
+
+ Py_RETURN_NONE;
+}
diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c
index c4ba715018..0e9eb20154 100644
--- a/Objects/rangeobject.c
+++ b/Objects/rangeobject.c
@@ -5,7 +5,7 @@
/* Support objects whose length is > PY_SSIZE_T_MAX.
- This could be sped up for small PyLongs if they fit in an Py_ssize_t.
+ This could be sped up for small PyLongs if they fit in a Py_ssize_t.
This only matters on Win64. Though we could use PY_LONG_LONG which
would presumably help perf.
*/
@@ -994,15 +994,14 @@ static PyObject *
longrangeiter_setstate(longrangeiterobject *r, PyObject *state)
{
int cmp;
-
+
/* clip the value */
PyObject *zero = PyLong_FromLong(0);
if (zero == NULL)
return NULL;
cmp = PyObject_RichCompareBool(state, zero, Py_LT);
if (cmp > 0) {
- Py_CLEAR(r->index);
- r->index = zero;
+ Py_XSETREF(r->index, zero);
Py_RETURN_NONE;
}
Py_DECREF(zero);
@@ -1014,10 +1013,9 @@ longrangeiter_setstate(longrangeiterobject *r, PyObject *state)
return NULL;
if (cmp > 0)
state = r->len;
-
- Py_CLEAR(r->index);
- r->index = state;
- Py_INCREF(r->index);
+
+ Py_INCREF(state);
+ Py_XSETREF(r->index, state);
Py_RETURN_NONE;
}
@@ -1066,8 +1064,7 @@ longrangeiter_next(longrangeiterobject *r)
result = PyNumber_Add(r->start, product);
Py_DECREF(product);
if (result) {
- Py_DECREF(r->index);
- r->index = new_index;
+ Py_SETREF(r->index, new_index);
}
else {
Py_DECREF(new_index);
diff --git a/Objects/setobject.c b/Objects/setobject.c
index 61f1d94e46..4ef692db33 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -20,7 +20,7 @@
All arithmetic on hash should ignore overflow.
- Unlike the dictionary implementation, the lookkey functions can return
+ Unlike the dictionary implementation, the lookkey function can return
NULL if the rich comparison returns an error.
*/
@@ -53,120 +53,73 @@ set_lookkey(PySetObject *so, PyObject *key, Py_hash_t hash)
setentry *entry;
size_t perturb = hash;
size_t mask = so->mask;
- size_t i = (size_t)hash; /* Unsigned for defined overflow behavior. */
+ size_t i = (size_t)hash & mask; /* Unsigned for defined overflow behavior */
size_t j;
int cmp;
- entry = &table[i & mask];
+ entry = &table[i];
if (entry->key == NULL)
return entry;
while (1) {
- if (entry->key == key)
- return entry;
- if (entry->hash == hash && entry->key != dummy) {
+ if (entry->hash == hash) {
PyObject *startkey = entry->key;
+ /* startkey cannot be a dummy because the dummy hash field is -1 */
+ assert(startkey != dummy);
+ if (startkey == key)
+ return entry;
+ if (PyUnicode_CheckExact(startkey)
+ && PyUnicode_CheckExact(key)
+ && unicode_eq(startkey, key))
+ return entry;
Py_INCREF(startkey);
cmp = PyObject_RichCompareBool(startkey, key, Py_EQ);
Py_DECREF(startkey);
- if (cmp < 0)
+ if (cmp < 0) /* unlikely */
return NULL;
- if (table != so->table || entry->key != startkey)
+ if (table != so->table || entry->key != startkey) /* unlikely */
return set_lookkey(so, key, hash);
- if (cmp > 0)
+ if (cmp > 0) /* likely */
return entry;
+ mask = so->mask; /* help avoid a register spill */
}
- if (entry->key == dummy && freeslot == NULL)
+ if (entry->hash == -1 && freeslot == NULL)
freeslot = entry;
- for (j = 1 ; j <= LINEAR_PROBES ; j++) {
- entry = &table[(i + j) & mask];
- if (entry->key == NULL)
- goto found_null;
- if (entry->key == key)
- return entry;
- if (entry->hash == hash && entry->key != dummy) {
- PyObject *startkey = entry->key;
- Py_INCREF(startkey);
- cmp = PyObject_RichCompareBool(startkey, key, Py_EQ);
- Py_DECREF(startkey);
- if (cmp < 0)
- return NULL;
- if (table != so->table || entry->key != startkey)
- return set_lookkey(so, key, hash);
- if (cmp > 0)
- return entry;
+ if (i + LINEAR_PROBES <= mask) {
+ for (j = 0 ; j < LINEAR_PROBES ; j++) {
+ entry++;
+ if (entry->key == NULL)
+ goto found_null;
+ if (entry->hash == hash) {
+ PyObject *startkey = entry->key;
+ assert(startkey != dummy);
+ if (startkey == key)
+ return entry;
+ if (PyUnicode_CheckExact(startkey)
+ && PyUnicode_CheckExact(key)
+ && unicode_eq(startkey, key))
+ return entry;
+ Py_INCREF(startkey);
+ cmp = PyObject_RichCompareBool(startkey, key, Py_EQ);
+ Py_DECREF(startkey);
+ if (cmp < 0)
+ return NULL;
+ if (table != so->table || entry->key != startkey)
+ return set_lookkey(so, key, hash);
+ if (cmp > 0)
+ return entry;
+ mask = so->mask;
+ }
+ if (entry->hash == -1 && freeslot == NULL)
+ freeslot = entry;
}
- if (entry->key == dummy && freeslot == NULL)
- freeslot = entry;
}
perturb >>= PERTURB_SHIFT;
- i = i * 5 + 1 + perturb;
+ i = (i * 5 + 1 + perturb) & mask;
- entry = &table[i & mask];
- if (entry->key == NULL)
- goto found_null;
- }
- found_null:
- return freeslot == NULL ? entry : freeslot;
-}
-
-/*
- * Hacked up version of set_lookkey which can assume keys are always unicode;
- * This means we can always use unicode_eq directly and not have to check to
- * see if the comparison altered the table.
- */
-static setentry *
-set_lookkey_unicode(PySetObject *so, PyObject *key, Py_hash_t hash)
-{
- setentry *table = so->table;
- setentry *freeslot = NULL;
- setentry *entry;
- size_t perturb = hash;
- size_t mask = so->mask;
- size_t i = (size_t)hash;
- size_t j;
-
- /* Make sure this function doesn't have to handle non-unicode keys,
- including subclasses of str; e.g., one reason to subclass
- strings is to override __eq__, and for speed we don't cater to
- that here. */
- if (!PyUnicode_CheckExact(key)) {
- so->lookup = set_lookkey;
- return set_lookkey(so, key, hash);
- }
-
- entry = &table[i & mask];
- if (entry->key == NULL)
- return entry;
-
- while (1) {
- if (entry->key == key
- || (entry->hash == hash
- && entry->key != dummy
- && unicode_eq(entry->key, key)))
- return entry;
- if (entry->key == dummy && freeslot == NULL)
- freeslot = entry;
-
- for (j = 1 ; j <= LINEAR_PROBES ; j++) {
- entry = &table[(i + j) & mask];
- if (entry->key == NULL)
- goto found_null;
- if (entry->key == key
- || (entry->hash == hash
- && entry->key != dummy
- && unicode_eq(entry->key, key)))
- return entry;
- if (entry->key == dummy && freeslot == NULL)
- freeslot = entry;
- }
-
- perturb >>= PERTURB_SHIFT;
- i = i * 5 + 1 + perturb;
-
- entry = &table[i & mask];
+ entry = &table[i];
if (entry->key == NULL)
goto found_null;
}
@@ -189,20 +142,22 @@ set_insert_clean(PySetObject *so, PyObject *key, Py_hash_t hash)
setentry *entry;
size_t perturb = hash;
size_t mask = (size_t)so->mask;
- size_t i = (size_t)hash;
+ size_t i = (size_t)hash & mask;
size_t j;
while (1) {
- entry = &table[i & mask];
+ entry = &table[i];
if (entry->key == NULL)
goto found_null;
- for (j = 1 ; j <= LINEAR_PROBES ; j++) {
- entry = &table[(i + j) & mask];
- if (entry->key == NULL)
- goto found_null;
+ if (i + LINEAR_PROBES <= mask) {
+ for (j = 0; j < LINEAR_PROBES; j++) {
+ entry++;
+ if (entry->key == NULL)
+ goto found_null;
+ }
}
perturb >>= PERTURB_SHIFT;
- i = i * 5 + 1 + perturb;
+ i = (i * 5 + 1 + perturb) & mask;
}
found_null:
entry->key = key;
@@ -225,15 +180,14 @@ set_insert_key(PySetObject *so, PyObject *key, Py_hash_t hash)
{
setentry *entry;
- assert(so->lookup != NULL);
- entry = so->lookup(so, key, hash);
+ entry = set_lookkey(so, key, hash);
if (entry == NULL)
return -1;
if (entry->key == NULL) {
/* UNUSED */
- so->fill++;
entry->key = key;
entry->hash = hash;
+ so->fill++;
so->used++;
} else if (entry->key == dummy) {
/* DUMMY */
@@ -257,13 +211,15 @@ set_table_resize(PySetObject *so, Py_ssize_t minused)
{
Py_ssize_t newsize;
setentry *oldtable, *newtable, *entry;
- Py_ssize_t i;
+ Py_ssize_t oldfill = so->fill;
+ Py_ssize_t oldused = so->used;
int is_oldtable_malloced;
setentry small_copy[PySet_MINSIZE];
assert(minused >= 0);
/* Find the smallest table size > minused. */
+ /* XXX speed-up with intrinsics */
for (newsize = PySet_MINSIZE;
newsize <= minused && newsize > 0;
newsize <<= 1)
@@ -307,19 +263,27 @@ set_table_resize(PySetObject *so, Py_ssize_t minused)
/* Make the set empty, using the new table. */
assert(newtable != oldtable);
- so->table = newtable;
- so->mask = newsize - 1;
memset(newtable, 0, sizeof(setentry) * newsize);
- i = so->used;
- so->used = 0;
so->fill = 0;
+ so->used = 0;
+ so->mask = newsize - 1;
+ so->table = newtable;
/* Copy the data over; this is refcount-neutral for active entries;
dummy entries aren't copied over, of course */
- for (entry = oldtable; i > 0; entry++) {
- if (entry->key != NULL && entry->key != dummy) {
- --i;
- set_insert_clean(so, entry->key, entry->hash);
+ if (oldfill == oldused) {
+ for (entry = oldtable; oldused > 0; entry++) {
+ if (entry->key != NULL) {
+ oldused--;
+ set_insert_clean(so, entry->key, entry->hash);
+ }
+ }
+ } else {
+ for (entry = oldtable; oldused > 0; entry++) {
+ if (entry->key != NULL && entry->key != dummy) {
+ oldused--;
+ set_insert_clean(so, entry->key, entry->hash);
+ }
}
}
@@ -340,7 +304,7 @@ set_add_entry(PySetObject *so, setentry *entry)
assert(so->fill <= so->mask); /* at least one empty slot */
n_used = so->used;
Py_INCREF(key);
- if (set_insert_key(so, key, hash) == -1) {
+ if (set_insert_key(so, key, hash)) {
Py_DECREF(key);
return -1;
}
@@ -352,8 +316,8 @@ set_add_entry(PySetObject *so, setentry *entry)
static int
set_add_key(PySetObject *so, PyObject *key)
{
+ setentry entry;
Py_hash_t hash;
- Py_ssize_t n_used;
if (!PyUnicode_CheckExact(key) ||
(hash = ((PyASCIIObject *) key)->hash) == -1) {
@@ -361,16 +325,9 @@ set_add_key(PySetObject *so, PyObject *key)
if (hash == -1)
return -1;
}
- assert(so->fill <= so->mask); /* at least one empty slot */
- n_used = so->used;
- Py_INCREF(key);
- if (set_insert_key(so, key, hash) == -1) {
- Py_DECREF(key);
- return -1;
- }
- if (!(so->used > n_used && so->fill*3 >= (so->mask+1)*2))
- return 0;
- return set_table_resize(so, so->used>50000 ? so->used*2 : so->used*4);
+ entry.key = key;
+ entry.hash = hash;
+ return set_add_entry(so, &entry);
}
#define DISCARD_NOTFOUND 0
@@ -378,16 +335,18 @@ set_add_key(PySetObject *so, PyObject *key)
static int
set_discard_entry(PySetObject *so, setentry *oldentry)
-{ setentry *entry;
+{
+ setentry *entry;
PyObject *old_key;
- entry = (so->lookup)(so, oldentry->key, oldentry->hash);
+ entry = set_lookkey(so, oldentry->key, oldentry->hash);
if (entry == NULL)
return -1;
if (entry->key == NULL || entry->key == dummy)
return DISCARD_NOTFOUND;
old_key = entry->key;
entry->key = dummy;
+ entry->hash = -1;
so->used--;
Py_DECREF(old_key);
return DISCARD_FOUND;
@@ -396,9 +355,8 @@ set_discard_entry(PySetObject *so, setentry *oldentry)
static int
set_discard_key(PySetObject *so, PyObject *key)
{
+ setentry entry;
Py_hash_t hash;
- setentry *entry;
- PyObject *old_key;
assert (PyAnySet_Check(so));
@@ -408,16 +366,9 @@ set_discard_key(PySetObject *so, PyObject *key)
if (hash == -1)
return -1;
}
- entry = (so->lookup)(so, key, hash);
- if (entry == NULL)
- return -1;
- if (entry->key == NULL || entry->key == dummy)
- return DISCARD_NOTFOUND;
- old_key = entry->key;
- entry->key = dummy;
- so->used--;
- Py_DECREF(old_key);
- return DISCARD_FOUND;
+ entry.key = key;
+ entry.hash = hash;
+ return set_discard_entry(so, &entry);
}
static void
@@ -434,20 +385,15 @@ set_empty_to_minsize(PySetObject *so)
static int
set_clear_internal(PySetObject *so)
{
- setentry *entry, *table;
- int table_is_malloced;
- Py_ssize_t fill;
+ setentry *entry;
+ setentry *table = so->table;
+ Py_ssize_t fill = so->fill;
+ Py_ssize_t used = so->used;
+ int table_is_malloced = table != so->smalltable;
setentry small_copy[PySet_MINSIZE];
-#ifdef Py_DEBUG
- Py_ssize_t i = 0;
- Py_ssize_t n = so->mask + 1;
-#endif
-
assert (PyAnySet_Check(so));
- table = so->table;
assert(table != NULL);
- table_is_malloced = table != so->smalltable;
/* This is delicate. During the process of clearing the set,
* decrefs can cause the set to mutate. To avoid fatal confusion
@@ -455,7 +401,6 @@ set_clear_internal(PySetObject *so)
* clearing the slots, and never refer to anything via so->ref while
* clearing.
*/
- fill = so->fill;
if (table_is_malloced)
set_empty_to_minsize(so);
@@ -474,20 +419,11 @@ set_clear_internal(PySetObject *so)
* assert that the refcount on table is 1 now, i.e. that this function
* has unique access to it, so decref side-effects can't alter it.
*/
- for (entry = table; fill > 0; ++entry) {
-#ifdef Py_DEBUG
- assert(i < n);
- ++i;
-#endif
- if (entry->key) {
- --fill;
- if (entry->key != dummy)
- Py_DECREF(entry->key);
+ for (entry = table; used > 0; entry++) {
+ if (entry->key && entry->key != dummy) {
+ used--;
+ Py_DECREF(entry->key);
}
-#ifdef Py_DEBUG
- else
- assert(entry->key == NULL);
-#endif
}
if (table_is_malloced)
@@ -534,16 +470,16 @@ static void
set_dealloc(PySetObject *so)
{
setentry *entry;
- Py_ssize_t fill = so->fill;
+ Py_ssize_t used = so->used;
+
PyObject_GC_UnTrack(so);
Py_TRASHCAN_SAFE_BEGIN(so)
if (so->weakreflist != NULL)
PyObject_ClearWeakRefs((PyObject *) so);
- for (entry = so->table; fill > 0; entry++) {
- if (entry->key) {
- --fill;
- if (entry->key != dummy)
+ for (entry = so->table; used > 0; entry++) {
+ if (entry->key && entry->key != dummy) {
+ used--;
Py_DECREF(entry->key);
}
}
@@ -609,16 +545,16 @@ set_merge(PySetObject *so, PyObject *otherset)
{
PySetObject *other;
PyObject *key;
- Py_hash_t hash;
Py_ssize_t i;
- setentry *entry;
+ setentry *so_entry;
+ setentry *other_entry;
assert (PyAnySet_Check(so));
assert (PyAnySet_Check(otherset));
other = (PySetObject*)otherset;
if (other == so || other->used == 0)
- /* a.update(a) or a.update({}); nothing to do */
+ /* a.update(a) or a.update(set()); nothing to do */
return 0;
/* Do one big resize at the start, rather than
* incrementally resizing as we insert new keys. Expect
@@ -628,14 +564,45 @@ set_merge(PySetObject *so, PyObject *otherset)
if (set_table_resize(so, (so->used + other->used)*2) != 0)
return -1;
}
+ so_entry = so->table;
+ other_entry = other->table;
+
+ /* If our table is empty, and both tables have the same size, and
+ there are no dummies to eliminate, then just copy the pointers. */
+ if (so->fill == 0 && so->mask == other->mask && other->fill == other->used) {
+ for (i = 0; i <= other->mask; i++, so_entry++, other_entry++) {
+ key = other_entry->key;
+ if (key != NULL) {
+ assert(so_entry->key == NULL);
+ Py_INCREF(key);
+ so_entry->key = key;
+ so_entry->hash = other_entry->hash;
+ }
+ }
+ so->fill = other->fill;
+ so->used = other->used;
+ return 0;
+ }
+
+ /* If our table is empty, we can use set_insert_clean() */
+ if (so->fill == 0) {
+ for (i = 0; i <= other->mask; i++, other_entry++) {
+ key = other_entry->key;
+ if (key != NULL && key != dummy) {
+ Py_INCREF(key);
+ set_insert_clean(so, key, other_entry->hash);
+ }
+ }
+ return 0;
+ }
+
+ /* We can't assure there are no duplicates, so do normal insertions */
for (i = 0; i <= other->mask; i++) {
- entry = &other->table[i];
- key = entry->key;
- hash = entry->hash;
- if (key != NULL &&
- key != dummy) {
+ other_entry = &other->table[i];
+ key = other_entry->key;
+ if (key != NULL && key != dummy) {
Py_INCREF(key);
- if (set_insert_key(so, key, hash) == -1) {
+ if (set_insert_key(so, key, other_entry->hash)) {
Py_DECREF(key);
return -1;
}
@@ -645,10 +612,23 @@ set_merge(PySetObject *so, PyObject *otherset)
}
static int
+set_contains_entry(PySetObject *so, setentry *entry)
+{
+ PyObject *key;
+ setentry *lu_entry;
+
+ lu_entry = set_lookkey(so, entry->key, entry->hash);
+ if (lu_entry == NULL)
+ return -1;
+ key = lu_entry->key;
+ return key != NULL && key != dummy;
+}
+
+static int
set_contains_key(PySetObject *so, PyObject *key)
{
+ setentry entry;
Py_hash_t hash;
- setentry *entry;
if (!PyUnicode_CheckExact(key) ||
(hash = ((PyASCIIObject *) key)->hash) == -1) {
@@ -656,30 +636,16 @@ set_contains_key(PySetObject *so, PyObject *key)
if (hash == -1)
return -1;
}
- entry = (so->lookup)(so, key, hash);
- if (entry == NULL)
- return -1;
- key = entry->key;
- return key != NULL && key != dummy;
-}
-
-static int
-set_contains_entry(PySetObject *so, setentry *entry)
-{
- PyObject *key;
- setentry *lu_entry;
-
- lu_entry = (so->lookup)(so, entry->key, entry->hash);
- if (lu_entry == NULL)
- return -1;
- key = lu_entry->key;
- return key != NULL && key != dummy;
+ entry.key = key;
+ entry.hash = hash;
+ return set_contains_entry(so, &entry);
}
static PyObject *
set_pop(PySetObject *so)
{
- Py_ssize_t i = 0;
+ /* Make sure the search finger is in bounds */
+ Py_ssize_t i = so->finger & so->mask;
setentry *entry;
PyObject *key;
@@ -689,32 +655,16 @@ set_pop(PySetObject *so)
return NULL;
}
- /* Set entry to "the first" unused or dummy set entry. We abuse
- * the hash field of slot 0 to hold a search finger:
- * If slot 0 has a value, use slot 0.
- * Else slot 0 is being used to hold a search finger,
- * and we use its hash value as the first index to look.
- */
- entry = &so->table[0];
- if (entry->key == NULL || entry->key == dummy) {
- i = entry->hash;
- /* The hash field may be a real hash value, or it may be a
- * legit search finger, or it may be a once-legit search
- * finger that's out of bounds now because it wrapped around
- * or the table shrunk -- simply make sure it's in bounds now.
- */
- if (i > so->mask || i < 1)
- i = 1; /* skip slot 0 */
- while ((entry = &so->table[i])->key == NULL || entry->key==dummy) {
- i++;
- if (i > so->mask)
- i = 1;
- }
+ while ((entry = &so->table[i])->key == NULL || entry->key==dummy) {
+ i++;
+ if (i > so->mask)
+ i = 0;
}
key = entry->key;
entry->key = dummy;
+ entry->hash = -1;
so->used--;
- so->table[0].hash = i + 1; /* next place to start */
+ so->finger = i + 1; /* next place to start */
return key;
}
@@ -757,7 +707,7 @@ frozenset_hash(PyObject *self)
hash *= (Py_uhash_t)PySet_GET_SIZE(self) + 1;
while (set_next(so, &pos, &entry)) {
/* Work to increase the bit dispersion for closely spaced hash
- values. The is important because some use cases have many
+ values. This is important because some use cases have many
combinations of a small number of elements with nearby
hashes so that many distinct combinations collapse to only
a handful of distinct hash values. */
@@ -767,7 +717,7 @@ frozenset_hash(PyObject *self)
/* Make the final result spread-out in a different pattern
than the algorithm for tuples or other python objects. */
hash = hash * 69069U + 907133923UL;
- if (hash == -1)
+ if (hash == (Py_uhash_t)-1)
hash = 590923713UL;
so->hash = hash;
return hash;
@@ -889,8 +839,8 @@ static PyObject *setiter_iternext(setiterobject *si)
return key;
fail:
- Py_DECREF(so);
si->si_set = NULL;
+ Py_DECREF(so);
return NULL;
}
@@ -971,7 +921,7 @@ set_update_internal(PySetObject *so, PyObject *other)
an_entry.hash = hash;
an_entry.key = key;
- if (set_add_entry(so, &an_entry) == -1)
+ if (set_add_entry(so, &an_entry))
return -1;
}
return 0;
@@ -982,7 +932,7 @@ set_update_internal(PySetObject *so, PyObject *other)
return -1;
while ((key = PyIter_Next(it)) != NULL) {
- if (set_add_key(so, key) == -1) {
+ if (set_add_key(so, key)) {
Py_DECREF(it);
Py_DECREF(key);
return -1;
@@ -1002,7 +952,7 @@ set_update(PySetObject *so, PyObject *args)
for (i=0 ; i<PyTuple_GET_SIZE(args) ; i++) {
PyObject *other = PyTuple_GET_ITEM(args, i);
- if (set_update_internal(so, other) == -1)
+ if (set_update_internal(so, other))
return NULL;
}
Py_RETURN_NONE;
@@ -1011,6 +961,12 @@ set_update(PySetObject *so, PyObject *args)
PyDoc_STRVAR(update_doc,
"Update a set with the union of itself and others.");
+/* XXX Todo:
+ If aligned memory allocations become available, make the
+ set object 64 byte aligned so that most of the fields
+ can be retrieved or updated in a single cache line.
+*/
+
static PyObject *
make_new_set(PyTypeObject *type, PyObject *iterable)
{
@@ -1025,12 +981,12 @@ make_new_set(PyTypeObject *type, PyObject *iterable)
so->used = 0;
so->mask = PySet_MINSIZE - 1;
so->table = so->smalltable;
- so->lookup = set_lookkey_unicode;
so->hash = -1;
+ so->finger = 0;
so->weakreflist = NULL;
if (iterable != NULL) {
- if (set_update_internal(so, iterable) == -1) {
+ if (set_update_internal(so, iterable)) {
Py_DECREF(so);
return NULL;
}
@@ -1114,10 +1070,8 @@ set_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
t=set(a); a.clear(); a.update(b); b.clear(); b.update(t); del t
The function always succeeds and it leaves both objects in a stable state.
- Useful for creating temporary frozensets from sets for membership testing
- in __contains__(), discard(), and remove(). Also useful for operations
- that update in-place (by allowing an intermediate result to be swapped
- into one of the original inputs).
+ Useful for operations that update in-place (by allowing an intermediate
+ result to be swapped into one of the original inputs).
*/
static void
@@ -1125,7 +1079,6 @@ set_swap_bodies(PySetObject *a, PySetObject *b)
{
Py_ssize_t t;
setentry *u;
- setentry *(*f)(PySetObject *so, PyObject *key, Py_ssize_t hash);
setentry tab[PySet_MINSIZE];
Py_hash_t h;
@@ -1141,8 +1094,6 @@ set_swap_bodies(PySetObject *a, PySetObject *b)
a->table = a->smalltable;
b->table = u;
- f = a->lookup; a->lookup = b->lookup; b->lookup = f;
-
if (a->table == a->smalltable || b->table == b->smalltable) {
memcpy(tab, a->smalltable, sizeof(tab));
memcpy(a->smalltable, b->smalltable, sizeof(tab));
@@ -1200,7 +1151,7 @@ set_union(PySetObject *so, PyObject *args)
other = PyTuple_GET_ITEM(args, i);
if ((PyObject *)so == other)
continue;
- if (set_update_internal(result, other) == -1) {
+ if (set_update_internal(result, other)) {
Py_DECREF(result);
return NULL;
}
@@ -1226,7 +1177,7 @@ set_or(PySetObject *so, PyObject *other)
return NULL;
if ((PyObject *)so == other)
return (PyObject *)result;
- if (set_update_internal(result, other) == -1) {
+ if (set_update_internal(result, other)) {
Py_DECREF(result);
return NULL;
}
@@ -1239,7 +1190,7 @@ set_ior(PySetObject *so, PyObject *other)
if (!PyAnySet_Check(other))
Py_RETURN_NOTIMPLEMENTED;
- if (set_update_internal(so, other) == -1)
+ if (set_update_internal(so, other))
return NULL;
Py_INCREF(so);
return (PyObject *)so;
@@ -1275,7 +1226,7 @@ set_intersection(PySetObject *so, PyObject *other)
return NULL;
}
if (rv) {
- if (set_add_entry(result, entry) == -1) {
+ if (set_add_entry(result, entry)) {
Py_DECREF(result);
return NULL;
}
@@ -1311,7 +1262,7 @@ set_intersection(PySetObject *so, PyObject *other)
return NULL;
}
if (rv) {
- if (set_add_entry(result, &entry) == -1) {
+ if (set_add_entry(result, &entry)) {
Py_DECREF(it);
Py_DECREF(result);
Py_DECREF(key);
@@ -1519,7 +1470,7 @@ set_difference_update(PySetObject *so, PyObject *args)
for (i=0 ; i<PyTuple_GET_SIZE(args) ; i++) {
PyObject *other = PyTuple_GET_ITEM(args, i);
- if (set_difference_update_internal(so, other) == -1)
+ if (set_difference_update_internal(so, other))
return NULL;
}
Py_RETURN_NONE;
@@ -1575,7 +1526,7 @@ set_difference(PySetObject *so, PyObject *other)
return NULL;
}
if (!rv) {
- if (set_add_entry((PySetObject *)result, &entrycopy) == -1) {
+ if (set_add_entry((PySetObject *)result, &entrycopy)) {
Py_DECREF(result);
return NULL;
}
@@ -1592,7 +1543,7 @@ set_difference(PySetObject *so, PyObject *other)
return NULL;
}
if (!rv) {
- if (set_add_entry((PySetObject *)result, entry) == -1) {
+ if (set_add_entry((PySetObject *)result, entry)) {
Py_DECREF(result);
return NULL;
}
@@ -1617,7 +1568,7 @@ set_difference_multi(PySetObject *so, PyObject *args)
for (i=1 ; i<PyTuple_GET_SIZE(args) ; i++) {
other = PyTuple_GET_ITEM(args, i);
- if (set_difference_update_internal((PySetObject *)result, other) == -1) {
+ if (set_difference_update_internal((PySetObject *)result, other)) {
Py_DECREF(result);
return NULL;
}
@@ -1642,7 +1593,7 @@ set_isub(PySetObject *so, PyObject *other)
{
if (!PyAnySet_Check(other))
Py_RETURN_NOTIMPLEMENTED;
- if (set_difference_update_internal(so, other) == -1)
+ if (set_difference_update_internal(so, other))
return NULL;
Py_INCREF(so);
return (PyObject *)so;
@@ -1676,7 +1627,7 @@ set_symmetric_difference_update(PySetObject *so, PyObject *other)
return NULL;
}
if (rv == DISCARD_NOTFOUND) {
- if (set_add_entry(so, &an_entry) == -1) {
+ if (set_add_entry(so, &an_entry)) {
Py_DECREF(key);
return NULL;
}
@@ -1702,7 +1653,7 @@ set_symmetric_difference_update(PySetObject *so, PyObject *other)
return NULL;
}
if (rv == DISCARD_NOTFOUND) {
- if (set_add_entry(so, entry) == -1) {
+ if (set_add_entry(so, entry)) {
Py_DECREF(otherset);
return NULL;
}
@@ -1853,7 +1804,7 @@ set_richcompare(PySetObject *v, PyObject *w, int op)
static PyObject *
set_add(PySetObject *so, PyObject *key)
{
- if (set_add_key(so, key) == -1)
+ if (set_add_key(so, key))
return NULL;
Py_RETURN_NONE;
}
@@ -1986,7 +1937,7 @@ set_sizeof(PySetObject *so)
{
Py_ssize_t res;
- res = sizeof(PySetObject);
+ res = _PyObject_SIZE(Py_TYPE(so));
if (so->table != so->smalltable)
res = res + (so->mask + 1) * sizeof(setentry);
return PyLong_FromSsize_t(res);
@@ -2397,7 +2348,7 @@ test_c_api(PySetObject *so)
if (str == NULL)
return NULL;
set_clear_internal(so);
- if (set_update_internal(so, str) == -1) {
+ if (set_update_internal(so, str)) {
Py_DECREF(str);
return NULL;
}
diff --git a/Objects/sliceobject.c b/Objects/sliceobject.c
index 104952333a..2f32355cd2 100644
--- a/Objects/sliceobject.c
+++ b/Objects/sliceobject.c
@@ -102,7 +102,7 @@ void PySlice_Fini(void)
PySliceObject *obj = slice_cache;
if (obj != NULL) {
slice_cache = NULL;
- PyObject_Del(obj);
+ PyObject_GC_Del(obj);
}
}
@@ -119,7 +119,7 @@ PySlice_New(PyObject *start, PyObject *stop, PyObject *step)
slice_cache = NULL;
_Py_NewReference((PyObject *)obj);
} else {
- obj = PyObject_New(PySliceObject, &PySlice_Type);
+ obj = PyObject_GC_New(PySliceObject, &PySlice_Type);
if (obj == NULL)
return NULL;
}
@@ -135,6 +135,7 @@ PySlice_New(PyObject *start, PyObject *stop, PyObject *step)
obj->start = start;
obj->stop = stop;
+ _PyObject_GC_TRACK(obj);
return (PyObject *) obj;
}
@@ -288,13 +289,14 @@ Create a slice object. This is used for extended slicing (e.g. a[0:10:2]).");
static void
slice_dealloc(PySliceObject *r)
{
+ _PyObject_GC_UNTRACK(r);
Py_DECREF(r->step);
Py_DECREF(r->start);
Py_DECREF(r->stop);
if (slice_cache == NULL)
slice_cache = r;
else
- PyObject_Del(r);
+ PyObject_GC_Del(r);
}
static PyObject *
@@ -586,6 +588,15 @@ slice_richcompare(PyObject *v, PyObject *w, int op)
return res;
}
+static int
+slice_traverse(PySliceObject *v, visitproc visit, void *arg)
+{
+ Py_VISIT(v->start);
+ Py_VISIT(v->stop);
+ Py_VISIT(v->step);
+ return 0;
+}
+
PyTypeObject PySlice_Type = {
PyVarObject_HEAD_INIT(&PyType_Type, 0)
"slice", /* Name of this type */
@@ -606,9 +617,9 @@ PyTypeObject PySlice_Type = {
PyObject_GenericGetAttr, /* tp_getattro */
0, /* tp_setattro */
0, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT, /* tp_flags */
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */
slice_doc, /* tp_doc */
- 0, /* tp_traverse */
+ (traverseproc)slice_traverse, /* tp_traverse */
0, /* tp_clear */
slice_richcompare, /* tp_richcompare */
0, /* tp_weaklistoffset */
diff --git a/Objects/stringlib/codecs.h b/Objects/stringlib/codecs.h
index ee1bf2b428..0fc6b582d2 100644
--- a/Objects/stringlib/codecs.h
+++ b/Objects/stringlib/codecs.h
@@ -718,6 +718,93 @@ STRINGLIB(utf16_encode)(const STRINGLIB_CHAR *in,
return len - (end - in + 1);
#endif
}
+
+#if STRINGLIB_SIZEOF_CHAR == 1
+# define SWAB4(CH, tmp) ((CH) << 24) /* high bytes are zero */
+#elif STRINGLIB_SIZEOF_CHAR == 2
+# define SWAB4(CH, tmp) (tmp = (CH), \
+ ((tmp & 0x00FFu) << 24) + ((tmp & 0xFF00u) << 8))
+ /* high bytes are zero */
+#else
+# define SWAB4(CH, tmp) (tmp = (CH), \
+ tmp = ((tmp & 0x00FF00FFu) << 8) + ((tmp >> 8) & 0x00FF00FFu), \
+ ((tmp & 0x0000FFFFu) << 16) + ((tmp >> 16) & 0x0000FFFFu))
+#endif
+Py_LOCAL_INLINE(Py_ssize_t)
+STRINGLIB(utf32_encode)(const STRINGLIB_CHAR *in,
+ Py_ssize_t len,
+ PY_UINT32_T **outptr,
+ int native_ordering)
+{
+ PY_UINT32_T *out = *outptr;
+ const STRINGLIB_CHAR *end = in + len;
+ if (native_ordering) {
+ const STRINGLIB_CHAR *unrolled_end = in + _Py_SIZE_ROUND_DOWN(len, 4);
+ while (in < unrolled_end) {
+#if STRINGLIB_SIZEOF_CHAR > 1
+ /* check if any character is a surrogate character */
+ if (((in[0] ^ 0xd800) &
+ (in[1] ^ 0xd800) &
+ (in[2] ^ 0xd800) &
+ (in[3] ^ 0xd800) & 0xf800) == 0)
+ break;
+#endif
+ out[0] = in[0];
+ out[1] = in[1];
+ out[2] = in[2];
+ out[3] = in[3];
+ in += 4; out += 4;
+ }
+ while (in < end) {
+ Py_UCS4 ch;
+ ch = *in++;
+#if STRINGLIB_SIZEOF_CHAR > 1
+ if (Py_UNICODE_IS_SURROGATE(ch)) {
+ /* reject surrogate characters (U+D800-U+DFFF) */
+ goto fail;
+ }
+#endif
+ *out++ = ch;
+ }
+ } else {
+ const STRINGLIB_CHAR *unrolled_end = in + _Py_SIZE_ROUND_DOWN(len, 4);
+ while (in < unrolled_end) {
+#if STRINGLIB_SIZEOF_CHAR > 1
+ Py_UCS4 ch1, ch2, ch3, ch4;
+ /* check if any character is a surrogate character */
+ if (((in[0] ^ 0xd800) &
+ (in[1] ^ 0xd800) &
+ (in[2] ^ 0xd800) &
+ (in[3] ^ 0xd800) & 0xf800) == 0)
+ break;
+#endif
+ out[0] = SWAB4(in[0], ch1);
+ out[1] = SWAB4(in[1], ch2);
+ out[2] = SWAB4(in[2], ch3);
+ out[3] = SWAB4(in[3], ch4);
+ in += 4; out += 4;
+ }
+ while (in < end) {
+ Py_UCS4 ch = *in++;
+#if STRINGLIB_SIZEOF_CHAR > 1
+ if (Py_UNICODE_IS_SURROGATE(ch)) {
+ /* reject surrogate characters (U+D800-U+DFFF) */
+ goto fail;
+ }
+#endif
+ *out++ = SWAB4(ch, ch);
+ }
+ }
+ *outptr = out;
+ return len;
+#if STRINGLIB_SIZEOF_CHAR > 1
+ fail:
+ *outptr = out;
+ return len - (end - in + 1);
+#endif
+}
+#undef SWAB4
+
#endif
#endif /* STRINGLIB_IS_UNICODE */
diff --git a/Objects/stringlib/fastsearch.h b/Objects/stringlib/fastsearch.h
index cd7cac40fa..cda68e77c8 100644
--- a/Objects/stringlib/fastsearch.h
+++ b/Objects/stringlib/fastsearch.h
@@ -36,7 +36,7 @@
Py_LOCAL_INLINE(Py_ssize_t)
STRINGLIB(fastsearch_memchr_1char)(const STRINGLIB_CHAR* s, Py_ssize_t n,
STRINGLIB_CHAR ch, unsigned char needle,
- Py_ssize_t maxcount, int mode)
+ int mode)
{
if (mode == FAST_SEARCH) {
const STRINGLIB_CHAR *ptr = s;
@@ -115,7 +115,7 @@ FASTSEARCH(const STRINGLIB_CHAR* s, Py_ssize_t n,
if (needle != 0)
#endif
return STRINGLIB(fastsearch_memchr_1char)
- (s, n, p[0], needle, maxcount, mode);
+ (s, n, p[0], needle, mode);
}
if (mode == FAST_COUNT) {
for (i = 0; i < n; i++)
diff --git a/Objects/stringlib/find.h b/Objects/stringlib/find.h
index 518e012b75..14815f6e62 100644
--- a/Objects/stringlib/find.h
+++ b/Objects/stringlib/find.h
@@ -11,8 +11,7 @@ STRINGLIB(find)(const STRINGLIB_CHAR* str, Py_ssize_t str_len,
{
Py_ssize_t pos;
- if (str_len < 0)
- return -1;
+ assert(str_len >= 0);
if (sub_len == 0)
return offset;
@@ -31,8 +30,7 @@ STRINGLIB(rfind)(const STRINGLIB_CHAR* str, Py_ssize_t str_len,
{
Py_ssize_t pos;
- if (str_len < 0)
- return -1;
+ assert(str_len >= 0);
if (sub_len == 0)
return str_len + offset;
@@ -44,27 +42,11 @@ STRINGLIB(rfind)(const STRINGLIB_CHAR* str, Py_ssize_t str_len,
return pos;
}
-/* helper macro to fixup start/end slice values */
-#define ADJUST_INDICES(start, end, len) \
- if (end > len) \
- end = len; \
- else if (end < 0) { \
- end += len; \
- if (end < 0) \
- end = 0; \
- } \
- if (start < 0) { \
- start += len; \
- if (start < 0) \
- start = 0; \
- }
-
Py_LOCAL_INLINE(Py_ssize_t)
STRINGLIB(find_slice)(const STRINGLIB_CHAR* str, Py_ssize_t str_len,
const STRINGLIB_CHAR* sub, Py_ssize_t sub_len,
Py_ssize_t start, Py_ssize_t end)
{
- ADJUST_INDICES(start, end, str_len);
return STRINGLIB(find)(str + start, end - start, sub, sub_len, start);
}
@@ -73,7 +55,6 @@ STRINGLIB(rfind_slice)(const STRINGLIB_CHAR* str, Py_ssize_t str_len,
const STRINGLIB_CHAR* sub, Py_ssize_t sub_len,
Py_ssize_t start, Py_ssize_t end)
{
- ADJUST_INDICES(start, end, str_len);
return STRINGLIB(rfind)(str + start, end - start, sub, sub_len, start);
}
diff --git a/Objects/stringlib/transmogrify.h b/Objects/stringlib/transmogrify.h
index cae6ea113a..b559b5356b 100644
--- a/Objects/stringlib/transmogrify.h
+++ b/Objects/stringlib/transmogrify.h
@@ -59,7 +59,7 @@ stringlib_expandtabs(PyObject *self, PyObject *args, PyObject *kwds)
j = 0;
q = STRINGLIB_STR(u);
-
+
for (p = STRINGLIB_STR(self); p < e; p++) {
if (*p == '\t') {
if (tabsize > 0) {
diff --git a/Objects/stringlib/unicode_format.h b/Objects/stringlib/unicode_format.h
index aec221acff..be09b5f6fa 100644
--- a/Objects/stringlib/unicode_format.h
+++ b/Objects/stringlib/unicode_format.h
@@ -1226,7 +1226,7 @@ static PyTypeObject PyFieldNameIter_Type = {
0};
/* unicode_formatter_field_name_split is used to implement
- string.Formatter.vformat. it takes an PEP 3101 "field name", and
+ string.Formatter.vformat. it takes a PEP 3101 "field name", and
returns a tuple of (first, rest): "first", the part before the
first '.' or '['; and "rest", an iterator for the rest of the field
name. it's a wrapper around stringlib/string_format.h's
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index 8c00210de1..7920fec2bd 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -97,7 +97,7 @@ PyTuple_New(Py_ssize_t size)
#endif
{
/* Check for overflow */
- if (size > (PY_SSIZE_T_MAX - sizeof(PyTupleObject) -
+ if ((size_t)size > ((size_t)PY_SSIZE_T_MAX - sizeof(PyTupleObject) -
sizeof(PyObject *)) / sizeof(PyObject *)) {
return PyErr_NoMemory();
}
@@ -746,7 +746,7 @@ tuplesubscript(PyTupleObject* self, PyObject* item)
}
else {
PyErr_Format(PyExc_TypeError,
- "tuple indices must be integers, not %.200s",
+ "tuple indices must be integers or slices, not %.200s",
Py_TYPE(item)->tp_name);
return NULL;
}
@@ -964,8 +964,8 @@ tupleiter_next(tupleiterobject *it)
return item;
}
- Py_DECREF(seq);
it->it_seq = NULL;
+ Py_DECREF(seq);
return NULL;
}
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index ca5355a7da..317334f739 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -14,10 +14,11 @@
MCACHE_MAX_ATTR_SIZE, since it might be a problem if very large
strings are used as attribute names. */
#define MCACHE_MAX_ATTR_SIZE 100
-#define MCACHE_SIZE_EXP 9
+#define MCACHE_SIZE_EXP 12
#define MCACHE_HASH(version, name_hash) \
- (((unsigned int)(version) * (unsigned int)(name_hash)) \
- >> (8*sizeof(unsigned int) - MCACHE_SIZE_EXP))
+ (((unsigned int)(version) ^ (unsigned int)(name_hash)) \
+ & ((1 << MCACHE_SIZE_EXP) - 1))
+
#define MCACHE_HASH_METHOD(type, name) \
MCACHE_HASH((type)->tp_version_tag, \
((PyASCIIObject *)(name))->hash)
@@ -35,6 +36,14 @@ struct method_cache_entry {
static struct method_cache_entry method_cache[1 << MCACHE_SIZE_EXP];
static unsigned int next_version_tag = 0;
+#define MCACHE_STATS 0
+
+#if MCACHE_STATS
+static size_t method_cache_hits = 0;
+static size_t method_cache_misses = 0;
+static size_t method_cache_collisions = 0;
+#endif
+
/* alphabetical order */
_Py_IDENTIFIER(__abstractmethods__);
_Py_IDENTIFIER(__class__);
@@ -54,6 +63,9 @@ _Py_IDENTIFIER(builtins);
static PyObject *
slot_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
+static void
+clear_slotdefs(void);
+
/*
* finds the beginning of the docstring's introspection signature.
* if present, returns a pointer pointing to the first '('.
@@ -125,7 +137,7 @@ _PyType_GetDocFromInternalDoc(const char *name, const char *internal_doc)
{
const char *doc = _PyType_DocWithoutSignature(name, internal_doc);
- if (!doc) {
+ if (!doc || *doc == '\0') {
Py_INCREF(Py_None);
return Py_None;
}
@@ -162,6 +174,18 @@ PyType_ClearCache(void)
Py_ssize_t i;
unsigned int cur_version_tag = next_version_tag - 1;
+#if MCACHE_STATS
+ size_t total = method_cache_hits + method_cache_collisions + method_cache_misses;
+ fprintf(stderr, "-- Method cache hits = %zd (%d%%)\n",
+ method_cache_hits, (int) (100.0 * method_cache_hits / total));
+ fprintf(stderr, "-- Method cache true misses = %zd (%d%%)\n",
+ method_cache_misses, (int) (100.0 * method_cache_misses / total));
+ fprintf(stderr, "-- Method cache collisions = %zd (%d%%)\n",
+ method_cache_collisions, (int) (100.0 * method_cache_collisions / total));
+ fprintf(stderr, "-- Method cache size = %zd KB\n",
+ sizeof(method_cache) / 1024);
+#endif
+
for (i = 0; i < (1 << MCACHE_SIZE_EXP); i++) {
method_cache[i].version = 0;
Py_CLEAR(method_cache[i].name);
@@ -177,6 +201,7 @@ void
_PyType_Fini(void)
{
PyType_ClearCache();
+ clear_slotdefs();
}
void
@@ -290,9 +315,8 @@ assign_version_tag(PyTypeObject *type)
are borrowed reference */
for (i = 0; i < (1 << MCACHE_SIZE_EXP); i++) {
method_cache[i].value = NULL;
- Py_XDECREF(method_cache[i].name);
- method_cache[i].name = Py_None;
Py_INCREF(Py_None);
+ Py_XSETREF(method_cache[i].name, Py_None);
}
/* mark all version tags as invalid */
PyType_Modified(&PyBaseObject_Type);
@@ -377,9 +401,8 @@ type_qualname(PyTypeObject *type, void *context)
static int
type_set_name(PyTypeObject *type, PyObject *value, void *context)
{
- PyHeapTypeObject* et;
- char *tp_name;
- PyObject *tmp;
+ const char *tp_name;
+ Py_ssize_t name_size;
if (!check_set_special_type_attr(type, value, "__name__"))
return -1;
@@ -390,33 +413,18 @@ type_set_name(PyTypeObject *type, PyObject *value, void *context)
return -1;
}
- /* Check absence of null characters */
- tmp = PyUnicode_FromStringAndSize("\0", 1);
- if (tmp == NULL)
+ tp_name = PyUnicode_AsUTF8AndSize(value, &name_size);
+ if (tp_name == NULL)
return -1;
- if (PyUnicode_Contains(value, tmp) != 0) {
- Py_DECREF(tmp);
- PyErr_Format(PyExc_ValueError,
- "__name__ must not contain null bytes");
+ if (strlen(tp_name) != (size_t)name_size) {
+ PyErr_SetString(PyExc_ValueError,
+ "type name must not contain null characters");
return -1;
}
- Py_DECREF(tmp);
-
- tp_name = _PyUnicode_AsString(value);
- if (tp_name == NULL)
- return -1;
-
- et = (PyHeapTypeObject*)type;
-
- Py_INCREF(value);
-
- /* Wait until et is a sane state before Py_DECREF'ing the old et->ht_name
- value. (Bug #16447.) */
- tmp = et->ht_name;
- et->ht_name = value;
type->tp_name = tp_name;
- Py_DECREF(tmp);
+ Py_INCREF(value);
+ Py_SETREF(((PyHeapTypeObject*)type)->ht_name, value);
return 0;
}
@@ -437,8 +445,7 @@ type_set_qualname(PyTypeObject *type, PyObject *value, void *context)
et = (PyHeapTypeObject*)type;
Py_INCREF(value);
- Py_DECREF(et->ht_qualname);
- et->ht_qualname = value;
+ Py_SETREF(et->ht_qualname, value);
return 0;
}
@@ -1200,8 +1207,11 @@ subtype_dealloc(PyObject *self)
assert(basedealloc);
basedealloc(self);
- /* Can't reference self beyond this point */
- Py_DECREF(type);
+ /* Can't reference self beyond this point. It's possible tp_del switched
+ our type from a HEAPTYPE to a non-HEAPTYPE, so be careful about
+ reference counting. */
+ if (type->tp_flags & Py_TPFLAGS_HEAPTYPE)
+ Py_DECREF(type);
endlabel:
++_PyTrash_delete_nesting;
@@ -2259,8 +2269,8 @@ type_new(PyTypeObject *metatype, PyObject *args, PyObject *kwds)
PyTypeObject *type = NULL, *base, *tmptype, *winner;
PyHeapTypeObject *et;
PyMemberDef *mp;
- Py_ssize_t i, nbases, nslots, slotoffset, add_dict, add_weak;
- int j, may_add_dict, may_add_weak;
+ Py_ssize_t i, nbases, nslots, slotoffset, name_size;
+ int j, may_add_dict, may_add_weak, add_dict, add_weak;
_Py_IDENTIFIER(__qualname__);
_Py_IDENTIFIER(__slots__);
@@ -2478,13 +2488,19 @@ type_new(PyTypeObject *metatype, PyObject *args, PyObject *kwds)
type->tp_flags |= Py_TPFLAGS_HAVE_GC;
/* Initialize essential fields */
+ type->tp_as_async = &et->as_async;
type->tp_as_number = &et->as_number;
type->tp_as_sequence = &et->as_sequence;
type->tp_as_mapping = &et->as_mapping;
type->tp_as_buffer = &et->as_buffer;
- type->tp_name = _PyUnicode_AsString(name);
+ type->tp_name = PyUnicode_AsUTF8AndSize(name, &name_size);
if (!type->tp_name)
goto error;
+ if (strlen(type->tp_name) != (size_t)name_size) {
+ PyErr_SetString(PyExc_ValueError,
+ "type name must not contain null characters");
+ goto error;
+ }
/* Set tp_base and tp_bases */
type->tp_bases = bases;
@@ -2559,8 +2575,10 @@ type_new(PyTypeObject *metatype, PyObject *args, PyObject *kwds)
tmp = PyStaticMethod_New(tmp);
if (tmp == NULL)
goto error;
- if (_PyDict_SetItemId(dict, &PyId___new__, tmp) < 0)
+ if (_PyDict_SetItemId(dict, &PyId___new__, tmp) < 0) {
+ Py_DECREF(tmp);
goto error;
+ }
Py_DECREF(tmp);
}
@@ -2617,9 +2635,10 @@ type_new(PyTypeObject *metatype, PyObject *args, PyObject *kwds)
}
type->tp_dealloc = subtype_dealloc;
- /* Enable GC unless there are really no instance variables possible */
- if (!(type->tp_basicsize == sizeof(PyObject) &&
- type->tp_itemsize == 0))
+ /* Enable GC unless this class is not adding new instance variables and
+ the base class did not use GC. */
+ if ((base->tp_flags & Py_TPFLAGS_HAVE_GC) ||
+ type->tp_basicsize > base->tp_basicsize)
type->tp_flags |= Py_TPFLAGS_HAVE_GC;
/* Always override allocation strategy to use regular heap */
@@ -2664,6 +2683,7 @@ PyType_FromSpecWithBases(PyType_Spec *spec, PyObject *bases)
{
PyHeapTypeObject *res = (PyHeapTypeObject*)PyType_GenericAlloc(&PyType_Type, 0);
PyTypeObject *type, *base;
+ PyObject *modname;
char *s;
char *res_start = (char*)res;
PyType_Slot *slot;
@@ -2722,6 +2742,7 @@ PyType_FromSpecWithBases(PyType_Spec *spec, PyObject *bases)
}
/* Initialize essential fields */
+ type->tp_as_async = &res->as_async;
type->tp_as_number = &res->as_number;
type->tp_as_sequence = &res->as_sequence;
type->tp_as_mapping = &res->as_mapping;
@@ -2736,7 +2757,8 @@ PyType_FromSpecWithBases(PyType_Spec *spec, PyObject *bases)
type->tp_itemsize = spec->itemsize;
for (slot = spec->slots; slot->slot; slot++) {
- if (slot->slot >= Py_ARRAY_LENGTH(slotoffsets)) {
+ if (slot->slot < 0
+ || (size_t)slot->slot >= Py_ARRAY_LENGTH(slotoffsets)) {
PyErr_SetString(PyExc_RuntimeError, "invalid slot offset");
goto fail;
}
@@ -2775,10 +2797,20 @@ PyType_FromSpecWithBases(PyType_Spec *spec, PyObject *bases)
/* Set type.__module__ */
s = strrchr(spec->name, '.');
- if (s != NULL)
- _PyDict_SetItemId(type->tp_dict, &PyId___module__,
- PyUnicode_FromStringAndSize(
- spec->name, (Py_ssize_t)(s - spec->name)));
+ if (s != NULL) {
+ modname = PyUnicode_FromStringAndSize(
+ spec->name, (Py_ssize_t)(s - spec->name));
+ if (modname == NULL) {
+ goto fail;
+ }
+ _PyDict_SetItemId(type->tp_dict, &PyId___module__, modname);
+ Py_DECREF(modname);
+ } else {
+ if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
+ "builtin type %.200s has no __module__ attribute",
+ spec->name))
+ goto fail;
+ }
return (PyObject*)res;
@@ -2796,11 +2828,11 @@ PyType_FromSpec(PyType_Spec *spec)
void *
PyType_GetSlot(PyTypeObject *type, int slot)
{
- if (!PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE)) {
+ if (!PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE) || slot < 0) {
PyErr_BadInternalCall();
return NULL;
}
- if (slot >= Py_ARRAY_LENGTH(slotoffsets)) {
+ if ((size_t)slot >= Py_ARRAY_LENGTH(slotoffsets)) {
/* Extension module requesting slot from a future version */
return NULL;
}
@@ -2821,8 +2853,12 @@ _PyType_Lookup(PyTypeObject *type, PyObject *name)
/* fast path */
h = MCACHE_HASH_METHOD(type, name);
if (method_cache[h].version == type->tp_version_tag &&
- method_cache[h].name == name)
+ method_cache[h].name == name) {
+#if MCACHE_STATS
+ method_cache_hits++;
+#endif
return method_cache[h].value;
+ }
}
/* Look in tp_dict of types in MRO */
@@ -2856,8 +2892,14 @@ _PyType_Lookup(PyTypeObject *type, PyObject *name)
method_cache[h].version = type->tp_version_tag;
method_cache[h].value = res; /* borrowed */
Py_INCREF(name);
- Py_DECREF(method_cache[h].name);
- method_cache[h].name = name;
+ assert(((PyASCIIObject *)(name))->hash != -1);
+#if MCACHE_STATS
+ if (method_cache[h].name != Py_None && method_cache[h].name != name)
+ method_cache_collisions++;
+ else
+ method_cache_misses++;
+#endif
+ Py_SETREF(method_cache[h].name, name);
}
return res;
}
@@ -3506,17 +3548,18 @@ object_get_class(PyObject *self, void *closure)
}
static int
-equiv_structs(PyTypeObject *a, PyTypeObject *b)
+compatible_with_tp_base(PyTypeObject *child)
{
- return a == b ||
- (a != NULL &&
- b != NULL &&
- a->tp_basicsize == b->tp_basicsize &&
- a->tp_itemsize == b->tp_itemsize &&
- a->tp_dictoffset == b->tp_dictoffset &&
- a->tp_weaklistoffset == b->tp_weaklistoffset &&
- ((a->tp_flags & Py_TPFLAGS_HAVE_GC) ==
- (b->tp_flags & Py_TPFLAGS_HAVE_GC)));
+ PyTypeObject *parent = child->tp_base;
+ return (parent != NULL &&
+ child->tp_basicsize == parent->tp_basicsize &&
+ child->tp_itemsize == parent->tp_itemsize &&
+ child->tp_dictoffset == parent->tp_dictoffset &&
+ child->tp_weaklistoffset == parent->tp_weaklistoffset &&
+ ((child->tp_flags & Py_TPFLAGS_HAVE_GC) ==
+ (parent->tp_flags & Py_TPFLAGS_HAVE_GC)) &&
+ (child->tp_dealloc == subtype_dealloc ||
+ child->tp_dealloc == parent->tp_dealloc));
}
static int
@@ -3534,6 +3577,10 @@ same_slots_added(PyTypeObject *a, PyTypeObject *b)
size += sizeof(PyObject *);
/* Check slots compliance */
+ if (!(a->tp_flags & Py_TPFLAGS_HEAPTYPE) ||
+ !(b->tp_flags & Py_TPFLAGS_HEAPTYPE)) {
+ return 0;
+ }
slots_a = ((PyHeapTypeObject *)a)->ht_slots;
slots_b = ((PyHeapTypeObject *)b)->ht_slots;
if (slots_a && slots_b) {
@@ -3549,9 +3596,7 @@ compatible_for_assignment(PyTypeObject* oldto, PyTypeObject* newto, char* attr)
{
PyTypeObject *newbase, *oldbase;
- if (newto->tp_dealloc != oldto->tp_dealloc ||
- newto->tp_free != oldto->tp_free)
- {
+ if (newto->tp_free != oldto->tp_free) {
PyErr_Format(PyExc_TypeError,
"%s assignment: "
"'%s' deallocator differs from '%s'",
@@ -3560,11 +3605,21 @@ compatible_for_assignment(PyTypeObject* oldto, PyTypeObject* newto, char* attr)
oldto->tp_name);
return 0;
}
+ /*
+ It's tricky to tell if two arbitrary types are sufficiently compatible as
+ to be interchangeable; e.g., even if they have the same tp_basicsize, they
+ might have totally different struct fields. It's much easier to tell if a
+ type and its supertype are compatible; e.g., if they have the same
+ tp_basicsize, then that means they have identical fields. So to check
+ whether two arbitrary types are compatible, we first find the highest
+ supertype that each is compatible with, and then if those supertypes are
+ compatible then the original types must also be compatible.
+ */
newbase = newto;
oldbase = oldto;
- while (equiv_structs(newbase, newbase->tp_base))
+ while (compatible_with_tp_base(newbase))
newbase = newbase->tp_base;
- while (equiv_structs(oldbase, oldbase->tp_base))
+ while (compatible_with_tp_base(oldbase))
oldbase = oldbase->tp_base;
if (newbase != oldbase &&
(newbase->tp_base != oldbase->tp_base ||
@@ -3599,17 +3654,71 @@ object_set_class(PyObject *self, PyObject *value, void *closure)
return -1;
}
newto = (PyTypeObject *)value;
- if (!(newto->tp_flags & Py_TPFLAGS_HEAPTYPE) ||
- !(oldto->tp_flags & Py_TPFLAGS_HEAPTYPE))
- {
+ /* In versions of CPython prior to 3.5, the code in
+ compatible_for_assignment was not set up to correctly check for memory
+ layout / slot / etc. compatibility for non-HEAPTYPE classes, so we just
+ disallowed __class__ assignment in any case that wasn't HEAPTYPE ->
+ HEAPTYPE.
+
+ During the 3.5 development cycle, we fixed the code in
+ compatible_for_assignment to correctly check compatibility between
+ arbitrary types, and started allowing __class__ assignment in all cases
+ where the old and new types did in fact have compatible slots and
+ memory layout (regardless of whether they were implemented as HEAPTYPEs
+ or not).
+
+ Just before 3.5 was released, though, we discovered that this led to
+ problems with immutable types like int, where the interpreter assumes
+ they are immutable and interns some values. Formerly this wasn't a
+ problem, because they really were immutable -- in particular, all the
+ types where the interpreter applied this interning trick happened to
+ also be statically allocated, so the old HEAPTYPE rules were
+ "accidentally" stopping them from allowing __class__ assignment. But
+ with the changes to __class__ assignment, we started allowing code like
+
+ class MyInt(int):
+ ...
+ # Modifies the type of *all* instances of 1 in the whole program,
+ # including future instances (!), because the 1 object is interned.
+ (1).__class__ = MyInt
+
+ (see https://bugs.python.org/issue24912).
+
+ In theory the proper fix would be to identify which classes rely on
+ this invariant and somehow disallow __class__ assignment only for them,
+ perhaps via some mechanism like a new Py_TPFLAGS_IMMUTABLE flag (a
+ "blacklisting" approach). But in practice, since this problem wasn't
+ noticed late in the 3.5 RC cycle, we're taking the conservative
+ approach and reinstating the same HEAPTYPE->HEAPTYPE check that we used
+ to have, plus a "whitelist". For now, the whitelist consists only of
+ ModuleType subtypes, since those are the cases that motivated the patch
+ in the first place -- see https://bugs.python.org/issue22986 -- and
+ since module objects are mutable we can be sure that they are
+ definitely not being interned. So now we allow HEAPTYPE->HEAPTYPE *or*
+ ModuleType subtype -> ModuleType subtype.
+
+ So far as we know, all the code beyond the following 'if' statement
+ will correctly handle non-HEAPTYPE classes, and the HEAPTYPE check is
+ needed only to protect that subset of non-HEAPTYPE classes for which
+ the interpreter has baked in the assumption that all instances are
+ truly immutable.
+ */
+ if (!(PyType_IsSubtype(newto, &PyModule_Type) &&
+ PyType_IsSubtype(oldto, &PyModule_Type)) &&
+ (!(newto->tp_flags & Py_TPFLAGS_HEAPTYPE) ||
+ !(oldto->tp_flags & Py_TPFLAGS_HEAPTYPE))) {
PyErr_Format(PyExc_TypeError,
- "__class__ assignment: only for heap types");
+ "__class__ assignment only supported for heap types "
+ "or ModuleType subclasses");
return -1;
}
+
if (compatible_for_assignment(oldto, newto, "__class__")) {
- Py_INCREF(newto);
+ if (newto->tp_flags & Py_TPFLAGS_HEAPTYPE)
+ Py_INCREF(newto);
Py_TYPE(self) = newto;
- Py_DECREF(oldto);
+ if (oldto->tp_flags & Py_TPFLAGS_HEAPTYPE)
+ Py_DECREF(oldto);
return 0;
}
else {
@@ -3713,7 +3822,7 @@ _PyType_GetSlotNames(PyTypeObject *cls)
}
Py_LOCAL(PyObject *)
-_PyObject_GetState(PyObject *obj)
+_PyObject_GetState(PyObject *obj, int required)
{
PyObject *state;
PyObject *getstate;
@@ -3728,6 +3837,13 @@ _PyObject_GetState(PyObject *obj)
}
PyErr_Clear();
+ if (required && obj->ob_type->tp_itemsize) {
+ PyErr_Format(PyExc_TypeError,
+ "can't pickle %.200s objects",
+ Py_TYPE(obj)->tp_name);
+ return NULL;
+ }
+
{
PyObject **dict;
dict = _PyObject_GetDictPtr(obj);
@@ -3787,7 +3903,7 @@ _PyObject_GetState(PyObject *obj)
}
}
- /* The list is stored on the class so it may mutates while we
+ /* The list is stored on the class so it may mutate while we
iterate over it */
if (slotnames_size != Py_SIZE(slotnames)) {
PyErr_Format(PyExc_RuntimeError,
@@ -3921,7 +4037,7 @@ _PyObject_GetNewArguments(PyObject *obj, PyObject **args, PyObject **kwargs)
}
/* The object does not have __getnewargs_ex__ and __getnewargs__. This may
- means __new__ does not takes any arguments on this object, or that the
+ mean __new__ does not takes any arguments on this object, or that the
object does not implement the reduce protocol for pickling or
copying. */
*args = NULL;
@@ -3975,55 +4091,90 @@ _PyObject_GetItemsIter(PyObject *obj, PyObject **listitems,
}
static PyObject *
-reduce_4(PyObject *obj)
+reduce_newobj(PyObject *obj, int proto)
{
PyObject *args = NULL, *kwargs = NULL;
PyObject *copyreg;
PyObject *newobj, *newargs, *state, *listitems, *dictitems;
PyObject *result;
- _Py_IDENTIFIER(__newobj_ex__);
+ int hasargs;
if (Py_TYPE(obj)->tp_new == NULL) {
PyErr_Format(PyExc_TypeError,
- "can't pickle %s objects",
+ "can't pickle %.200s objects",
Py_TYPE(obj)->tp_name);
return NULL;
}
- if (_PyObject_GetNewArguments(obj, &args, &kwargs) < 0) {
+ if (_PyObject_GetNewArguments(obj, &args, &kwargs) < 0)
+ return NULL;
+
+ copyreg = import_copyreg();
+ if (copyreg == NULL) {
+ Py_XDECREF(args);
+ Py_XDECREF(kwargs);
return NULL;
}
- if (args == NULL) {
- args = PyTuple_New(0);
- if (args == NULL)
+ hasargs = (args != NULL);
+ if (kwargs == NULL || PyDict_Size(kwargs) == 0) {
+ _Py_IDENTIFIER(__newobj__);
+ PyObject *cls;
+ Py_ssize_t i, n;
+
+ Py_XDECREF(kwargs);
+ newobj = _PyObject_GetAttrId(copyreg, &PyId___newobj__);
+ Py_DECREF(copyreg);
+ if (newobj == NULL) {
+ Py_XDECREF(args);
return NULL;
- }
- if (kwargs == NULL) {
- kwargs = PyDict_New();
- if (kwargs == NULL)
+ }
+ n = args ? PyTuple_GET_SIZE(args) : 0;
+ newargs = PyTuple_New(n+1);
+ if (newargs == NULL) {
+ Py_XDECREF(args);
+ Py_DECREF(newobj);
return NULL;
+ }
+ cls = (PyObject *) Py_TYPE(obj);
+ Py_INCREF(cls);
+ PyTuple_SET_ITEM(newargs, 0, cls);
+ for (i = 0; i < n; i++) {
+ PyObject *v = PyTuple_GET_ITEM(args, i);
+ Py_INCREF(v);
+ PyTuple_SET_ITEM(newargs, i+1, v);
+ }
+ Py_XDECREF(args);
}
+ else if (proto >= 4) {
+ _Py_IDENTIFIER(__newobj_ex__);
- copyreg = import_copyreg();
- if (copyreg == NULL) {
+ newobj = _PyObject_GetAttrId(copyreg, &PyId___newobj_ex__);
+ Py_DECREF(copyreg);
+ if (newobj == NULL) {
+ Py_DECREF(args);
+ Py_DECREF(kwargs);
+ return NULL;
+ }
+ newargs = PyTuple_Pack(3, Py_TYPE(obj), args, kwargs);
Py_DECREF(args);
Py_DECREF(kwargs);
- return NULL;
+ if (newargs == NULL) {
+ Py_DECREF(newobj);
+ return NULL;
+ }
}
- newobj = _PyObject_GetAttrId(copyreg, &PyId___newobj_ex__);
- Py_DECREF(copyreg);
- if (newobj == NULL) {
+ else {
+ PyErr_SetString(PyExc_ValueError,
+ "must use protocol 4 or greater to copy this "
+ "object; since __getnewargs_ex__ returned "
+ "keyword arguments.");
Py_DECREF(args);
Py_DECREF(kwargs);
+ Py_DECREF(copyreg);
return NULL;
}
- newargs = PyTuple_Pack(3, Py_TYPE(obj), args, kwargs);
- Py_DECREF(args);
- Py_DECREF(kwargs);
- if (newargs == NULL) {
- Py_DECREF(newobj);
- return NULL;
- }
- state = _PyObject_GetState(obj);
+
+ state = _PyObject_GetState(obj,
+ !hasargs && !PyList_Check(obj) && !PyDict_Check(obj));
if (state == NULL) {
Py_DECREF(newobj);
Py_DECREF(newargs);
@@ -4045,91 +4196,12 @@ reduce_4(PyObject *obj)
return result;
}
-static PyObject *
-reduce_2(PyObject *obj)
-{
- PyObject *cls;
- PyObject *args = NULL, *args2 = NULL, *kwargs = NULL;
- PyObject *state = NULL, *listitems = NULL, *dictitems = NULL;
- PyObject *copyreg = NULL, *newobj = NULL, *res = NULL;
- Py_ssize_t i, n;
- _Py_IDENTIFIER(__newobj__);
-
- if (Py_TYPE(obj)->tp_new == NULL) {
- PyErr_Format(PyExc_TypeError,
- "can't pickle %s objects",
- Py_TYPE(obj)->tp_name);
- return NULL;
- }
- if (_PyObject_GetNewArguments(obj, &args, &kwargs) < 0) {
- return NULL;
- }
- if (args == NULL) {
- assert(kwargs == NULL);
- args = PyTuple_New(0);
- if (args == NULL) {
- return NULL;
- }
- }
- else if (kwargs != NULL) {
- if (PyDict_Size(kwargs) > 0) {
- PyErr_SetString(PyExc_ValueError,
- "must use protocol 4 or greater to copy this "
- "object; since __getnewargs_ex__ returned "
- "keyword arguments.");
- Py_DECREF(args);
- Py_DECREF(kwargs);
- return NULL;
- }
- Py_CLEAR(kwargs);
- }
-
- state = _PyObject_GetState(obj);
- if (state == NULL)
- goto end;
-
- if (_PyObject_GetItemsIter(obj, &listitems, &dictitems) < 0)
- goto end;
-
- copyreg = import_copyreg();
- if (copyreg == NULL)
- goto end;
- newobj = _PyObject_GetAttrId(copyreg, &PyId___newobj__);
- if (newobj == NULL)
- goto end;
-
- n = PyTuple_GET_SIZE(args);
- args2 = PyTuple_New(n+1);
- if (args2 == NULL)
- goto end;
- cls = (PyObject *) Py_TYPE(obj);
- Py_INCREF(cls);
- PyTuple_SET_ITEM(args2, 0, cls);
- for (i = 0; i < n; i++) {
- PyObject *v = PyTuple_GET_ITEM(args, i);
- Py_INCREF(v);
- PyTuple_SET_ITEM(args2, i+1, v);
- }
-
- res = PyTuple_Pack(5, newobj, args2, state, listitems, dictitems);
-
- end:
- Py_XDECREF(args);
- Py_XDECREF(args2);
- Py_XDECREF(state);
- Py_XDECREF(listitems);
- Py_XDECREF(dictitems);
- Py_XDECREF(copyreg);
- Py_XDECREF(newobj);
- return res;
-}
-
/*
* There were two problems when object.__reduce__ and object.__reduce_ex__
* were implemented in the same function:
* - trying to pickle an object with a custom __reduce__ method that
* fell back to object.__reduce__ in certain circumstances led to
- * infinite recursion at Python level and eventual RuntimeError.
+ * infinite recursion at Python level and eventual RecursionError.
* - Pickling objects that lied about their type by overwriting the
* __class__ descriptor could lead to infinite recursion at C level
* and eventual segfault.
@@ -4144,10 +4216,8 @@ _common_reduce(PyObject *self, int proto)
{
PyObject *copyreg, *res;
- if (proto >= 4)
- return reduce_4(self);
- else if (proto >= 2)
- return reduce_2(self);
+ if (proto >= 2)
+ return reduce_newobj(self, proto);
copyreg = import_copyreg();
if (!copyreg)
@@ -4562,6 +4632,7 @@ inherit_slots(PyTypeObject *type, PyTypeObject *base)
#define COPYSLOT(SLOT) \
if (!type->SLOT && SLOTDEFINED(SLOT)) type->SLOT = base->SLOT
+#define COPYASYNC(SLOT) COPYSLOT(tp_as_async->SLOT)
#define COPYNUM(SLOT) COPYSLOT(tp_as_number->SLOT)
#define COPYSEQ(SLOT) COPYSLOT(tp_as_sequence->SLOT)
#define COPYMAP(SLOT) COPYSLOT(tp_as_mapping->SLOT)
@@ -4607,6 +4678,17 @@ inherit_slots(PyTypeObject *type, PyTypeObject *base)
COPYNUM(nb_inplace_true_divide);
COPYNUM(nb_inplace_floor_divide);
COPYNUM(nb_index);
+ COPYNUM(nb_matrix_multiply);
+ COPYNUM(nb_inplace_matrix_multiply);
+ }
+
+ if (type->tp_as_async != NULL && base->tp_as_async != NULL) {
+ basebase = base->tp_base;
+ if (basebase->tp_as_async == NULL)
+ basebase = NULL;
+ COPYASYNC(am_await);
+ COPYASYNC(am_aiter);
+ COPYASYNC(am_anext);
}
if (type->tp_as_sequence != NULL && base->tp_as_sequence != NULL) {
@@ -4818,14 +4900,11 @@ PyType_Ready(PyTypeObject *type)
PyObject *b = PyTuple_GET_ITEM(bases, i);
if (PyType_Check(b) &&
(((PyTypeObject *)b)->tp_flags & Py_TPFLAGS_HEAPTYPE)) {
- char buf[300];
- PyOS_snprintf(buf, sizeof(buf),
- "type '%.100s' is not dynamically allocated but "
- "its base type '%.100s' is dynamically allocated",
- type->tp_name, ((PyTypeObject *)b)->tp_name);
- if (PyErr_Warn(PyExc_DeprecationWarning, buf) < 0)
- goto error;
- break;
+ PyErr_Format(PyExc_TypeError,
+ "type '%.100s' is not dynamically allocated but "
+ "its base type '%.100s' is dynamically allocated",
+ type->tp_name, ((PyTypeObject *)b)->tp_name);
+ goto error;
}
}
@@ -4881,6 +4960,8 @@ PyType_Ready(PyTypeObject *type)
/* Some more special stuff */
base = type->tp_base;
if (base != NULL) {
+ if (type->tp_as_async == NULL)
+ type->tp_as_async = base->tp_as_async;
if (type->tp_as_number == NULL)
type->tp_as_number = base->tp_as_number;
if (type->tp_as_sequence == NULL)
@@ -4901,16 +4982,6 @@ PyType_Ready(PyTypeObject *type)
goto error;
}
- /* Warn for a type that implements tp_compare (now known as
- tp_reserved) but not tp_richcompare. */
- if (type->tp_reserved && !type->tp_richcompare) {
- PyErr_Format(PyExc_TypeError,
- "Type %.100s defines tp_reserved (formerly tp_compare) "
- "but not tp_richcompare. Comparisons may not behave as intended.",
- type->tp_name);
- goto error;
- }
-
/* All done -- set the ready flag */
assert(type->tp_dict != NULL);
type->tp_flags =
@@ -5777,6 +5848,7 @@ slot_mp_ass_subscript(PyObject *self, PyObject *key, PyObject *value)
SLOT1BIN(slot_nb_add, nb_add, "__add__", "__radd__")
SLOT1BIN(slot_nb_subtract, nb_subtract, "__sub__", "__rsub__")
SLOT1BIN(slot_nb_multiply, nb_multiply, "__mul__", "__rmul__")
+SLOT1BIN(slot_nb_matrix_multiply, nb_matrix_multiply, "__matmul__", "__rmatmul__")
SLOT1BIN(slot_nb_remainder, nb_remainder, "__mod__", "__rmod__")
SLOT1BIN(slot_nb_divmod, nb_divmod, "__divmod__", "__rdivmod__")
@@ -5870,6 +5942,7 @@ SLOT0(slot_nb_float, "__float__")
SLOT1(slot_nb_inplace_add, "__iadd__", PyObject *, "O")
SLOT1(slot_nb_inplace_subtract, "__isub__", PyObject *, "O")
SLOT1(slot_nb_inplace_multiply, "__imul__", PyObject *, "O")
+SLOT1(slot_nb_inplace_matrix_multiply, "__imatmul__", PyObject *, "O")
SLOT1(slot_nb_inplace_remainder, "__imod__", PyObject *, "O")
/* Can't use SLOT1 here, because nb_inplace_power is ternary */
static PyObject *
@@ -6260,6 +6333,59 @@ slot_tp_finalize(PyObject *self)
PyErr_Restore(error_type, error_value, error_traceback);
}
+static PyObject *
+slot_am_await(PyObject *self)
+{
+ PyObject *func, *res;
+ _Py_IDENTIFIER(__await__);
+
+ func = lookup_method(self, &PyId___await__);
+ if (func != NULL) {
+ res = PyEval_CallObject(func, NULL);
+ Py_DECREF(func);
+ return res;
+ }
+ PyErr_Format(PyExc_AttributeError,
+ "object %.50s does not have __await__ method",
+ Py_TYPE(self)->tp_name);
+ return NULL;
+}
+
+static PyObject *
+slot_am_aiter(PyObject *self)
+{
+ PyObject *func, *res;
+ _Py_IDENTIFIER(__aiter__);
+
+ func = lookup_method(self, &PyId___aiter__);
+ if (func != NULL) {
+ res = PyEval_CallObject(func, NULL);
+ Py_DECREF(func);
+ return res;
+ }
+ PyErr_Format(PyExc_AttributeError,
+ "object %.50s does not have __aiter__ method",
+ Py_TYPE(self)->tp_name);
+ return NULL;
+}
+
+static PyObject *
+slot_am_anext(PyObject *self)
+{
+ PyObject *func, *res;
+ _Py_IDENTIFIER(__anext__);
+
+ func = lookup_method(self, &PyId___anext__);
+ if (func != NULL) {
+ res = PyEval_CallObject(func, NULL);
+ Py_DECREF(func);
+ return res;
+ }
+ PyErr_Format(PyExc_AttributeError,
+ "object %.50s does not have __anext__ method",
+ Py_TYPE(self)->tp_name);
+ return NULL;
+}
/*
Table mapping __foo__ names to tp_foo offsets and slot_tp_foo wrapper functions.
@@ -6276,6 +6402,7 @@ typedef struct wrapperbase slotdef;
#undef TPSLOT
#undef FLSLOT
+#undef AMSLOT
#undef ETSLOT
#undef SQSLOT
#undef MPSLOT
@@ -6294,6 +6421,8 @@ typedef struct wrapperbase slotdef;
#define ETSLOT(NAME, SLOT, FUNCTION, WRAPPER, DOC) \
{NAME, offsetof(PyHeapTypeObject, SLOT), (void *)(FUNCTION), WRAPPER, \
PyDoc_STR(DOC)}
+#define AMSLOT(NAME, SLOT, FUNCTION, WRAPPER, DOC) \
+ ETSLOT(NAME, as_async.SLOT, FUNCTION, WRAPPER, DOC)
#define SQSLOT(NAME, SLOT, FUNCTION, WRAPPER, DOC) \
ETSLOT(NAME, as_sequence.SLOT, FUNCTION, WRAPPER, DOC)
#define MPSLOT(NAME, SLOT, FUNCTION, WRAPPER, DOC) \
@@ -6373,6 +6502,13 @@ static slotdef slotdefs[] = {
"Create and return new object. See help(type) for accurate signature."),
TPSLOT("__del__", tp_finalize, slot_tp_finalize, (wrapperfunc)wrap_del, ""),
+ AMSLOT("__await__", am_await, slot_am_await, wrap_unaryfunc,
+ "__await__($self, /)\n--\n\nReturn an iterator to be used in await expression."),
+ AMSLOT("__aiter__", am_aiter, slot_am_aiter, wrap_unaryfunc,
+ "__aiter__($self, /)\n--\n\nReturn an awaitable, that resolves in asynchronous iterator."),
+ AMSLOT("__anext__", am_anext, slot_am_anext, wrap_unaryfunc,
+ "__anext__($self, /)\n--\n\nReturn a value or raise StopAsyncIteration."),
+
BINSLOT("__add__", nb_add, slot_nb_add,
"+"),
RBINSLOT("__radd__", nb_add, slot_nb_add,
@@ -6450,6 +6586,12 @@ static slotdef slotdefs[] = {
"__index__($self, /)\n--\n\n"
"Return self converted to an integer, if self is suitable "
"for use as an index into a list."),
+ BINSLOT("__matmul__", nb_matrix_multiply, slot_nb_matrix_multiply,
+ "@"),
+ RBINSLOT("__rmatmul__", nb_matrix_multiply, slot_nb_matrix_multiply,
+ "@"),
+ IBSLOT("__imatmul__", nb_inplace_matrix_multiply, slot_nb_inplace_matrix_multiply,
+ wrap_binaryfunc, "@="),
MPSLOT("__len__", mp_length, slot_mp_length, wrap_lenfunc,
"__len__($self, /)\n--\n\nReturn len(self)."),
MPSLOT("__getitem__", mp_subscript, slot_mp_subscript,
@@ -6519,6 +6661,10 @@ slotptr(PyTypeObject *type, int ioffset)
ptr = (char *)type->tp_as_number;
offset -= offsetof(PyHeapTypeObject, as_number);
}
+ else if ((size_t)offset >= offsetof(PyHeapTypeObject, as_async)) {
+ ptr = (char *)type->tp_as_async;
+ offset -= offsetof(PyHeapTypeObject, as_async);
+ }
else {
ptr = (char *)type;
}
@@ -6670,15 +6816,15 @@ update_slots_callback(PyTypeObject *type, void *data)
return 0;
}
+static int slotdefs_initialized = 0;
/* Initialize the slotdefs table by adding interned string objects for the
- names and sorting the entries. */
+ names. */
static void
init_slotdefs(void)
{
slotdef *p;
- static int initialized = 0;
- if (initialized)
+ if (slotdefs_initialized)
return;
for (p = slotdefs; p->name; p++) {
/* Slots must be ordered by their offset in the PyHeapTypeObject. */
@@ -6687,7 +6833,17 @@ init_slotdefs(void)
if (!p->name_strobj)
Py_FatalError("Out of memory interning slotdef names");
}
- initialized = 1;
+ slotdefs_initialized = 1;
+}
+
+/* Undo init_slotdefs, releasing the interned strings. */
+static void clear_slotdefs(void)
+{
+ slotdef *p;
+ for (p = slotdefs; p->name; p++) {
+ Py_CLEAR(p->name_strobj);
+ }
+ slotdefs_initialized = 0;
}
/* Update the slots after assignment to a class (type) attribute. */
@@ -7182,9 +7338,9 @@ super_init(PyObject *self, PyObject *args, PyObject *kwds)
Py_INCREF(obj);
}
Py_INCREF(type);
- su->type = type;
- su->obj = obj;
- su->obj_type = obj_type;
+ Py_XSETREF(su->type, type);
+ Py_XSETREF(su->obj, obj);
+ Py_XSETREF(su->obj_type, obj_type);
return 0;
}
diff --git a/Objects/typeslots.inc b/Objects/typeslots.inc
index caa1e035d6..dc750cc0c4 100644
--- a/Objects/typeslots.inc
+++ b/Objects/typeslots.inc
@@ -73,3 +73,9 @@ offsetof(PyHeapTypeObject, ht_type.tp_traverse),
offsetof(PyHeapTypeObject, ht_type.tp_members),
offsetof(PyHeapTypeObject, ht_type.tp_getset),
offsetof(PyHeapTypeObject, ht_type.tp_free),
+offsetof(PyHeapTypeObject, as_number.nb_matrix_multiply),
+offsetof(PyHeapTypeObject, as_number.nb_inplace_matrix_multiply),
+offsetof(PyHeapTypeObject, as_async.am_await),
+offsetof(PyHeapTypeObject, as_async.am_aiter),
+offsetof(PyHeapTypeObject, as_async.am_anext),
+offsetof(PyHeapTypeObject, ht_type.tp_finalize),
diff --git a/Objects/typeslots.py b/Objects/typeslots.py
index b24c7f4040..ba37c40397 100755
--- a/Objects/typeslots.py
+++ b/Objects/typeslots.py
@@ -12,6 +12,8 @@ for line in sys.stdin:
member = m.group(1)
if member.startswith("tp_"):
member = "ht_type."+member
+ elif member.startswith("am_"):
+ member = "as_async."+member
elif member.startswith("nb_"):
member = "as_number."+member
elif member.startswith("mp_"):
diff --git a/Objects/unicodectype.c b/Objects/unicodectype.c
index ea540d605d..d8c95c8b44 100644
--- a/Objects/unicodectype.c
+++ b/Objects/unicodectype.c
@@ -27,7 +27,7 @@
#define EXTENDED_CASE_MASK 0x4000
typedef struct {
- /*
+ /*
These are either deltas to the character or offsets in
_PyUnicode_ExtendedCase.
*/
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 193d898f1b..f11a082526 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -290,6 +290,8 @@ static unsigned char ascii_linebreak[] = {
0, 0, 0, 0, 0, 0, 0, 0
};
+#include "clinic/unicodeobject.c.h"
+
/* The max unicode value is always 0x10FFFF while using the PEP-393 API.
This function is kept for backward compatibility with the old API. */
Py_UNICODE
@@ -519,10 +521,6 @@ unicode_result_unchanged(PyObject *unicode)
return _PyUnicode_Copy(unicode);
}
-#ifdef HAVE_MBCS
-static OSVERSIONINFOEX winver;
-#endif
-
/* --- Bloom Filters ----------------------------------------------------- */
/* stuff to implement simple "bloom filters" for Unicode characters.
@@ -645,7 +643,7 @@ make_bloom_mask(int kind, void* ptr, Py_ssize_t len)
static PyObject *
fixup(PyObject *self, Py_UCS4 (*fixfct)(PyObject *s));
-Py_LOCAL_INLINE(Py_ssize_t) findchar(void *s, int kind,
+Py_LOCAL_INLINE(Py_ssize_t) findchar(const void *s, int kind,
Py_ssize_t size, Py_UCS4 ch,
int direction)
{
@@ -677,7 +675,7 @@ Py_LOCAL_INLINE(Py_ssize_t) findchar(void *s, int kind,
}
#ifdef Py_DEBUG
-/* Fill the data of an Unicode string with invalid characters to detect bugs
+/* Fill the data of a Unicode string with invalid characters to detect bugs
earlier.
_PyUnicode_CheckConsistency(str, 1) detects invalid characters, at least for
@@ -732,7 +730,7 @@ resize_compact(PyObject *unicode, Py_ssize_t length)
_Py_DEC_REFTOTAL;
_Py_ForgetReference(unicode);
- new_unicode = (PyObject *)PyObject_REALLOC((char *)unicode, new_size);
+ new_unicode = (PyObject *)PyObject_REALLOC(unicode, new_size);
if (new_unicode == NULL) {
_Py_NewReference(unicode);
PyErr_NoMemory();
@@ -750,6 +748,8 @@ resize_compact(PyObject *unicode, Py_ssize_t length)
else if (_PyUnicode_HAS_WSTR_MEMORY(unicode)) {
PyObject_DEL(_PyUnicode_WSTR(unicode));
_PyUnicode_WSTR(unicode) = NULL;
+ if (!PyUnicode_IS_ASCII(unicode))
+ _PyUnicode_WSTR_LENGTH(unicode) = 0;
}
#ifdef Py_DEBUG
unicode_fill_invalid(unicode, old_length);
@@ -821,7 +821,7 @@ resize_inplace(PyObject *unicode, Py_ssize_t length)
assert(_PyUnicode_WSTR(unicode) != NULL);
/* check for integer overflow */
- if (length > PY_SSIZE_T_MAX / sizeof(wchar_t) - 1) {
+ if (length > PY_SSIZE_T_MAX / (Py_ssize_t)sizeof(wchar_t) - 1) {
PyErr_NoMemory();
return -1;
}
@@ -893,7 +893,7 @@ _PyUnicode_New(Py_ssize_t length)
}
/* Ensure we won't overflow the size. */
- if (length > ((PY_SSIZE_T_MAX / sizeof(Py_UNICODE)) - 1)) {
+ if (length > ((PY_SSIZE_T_MAX / (Py_ssize_t)sizeof(Py_UNICODE)) - 1)) {
return (PyUnicodeObject *)PyErr_NoMemory();
}
if (length < 0) {
@@ -1667,8 +1667,7 @@ unicode_resize(PyObject **p_unicode, Py_ssize_t length)
_Py_INCREF_UNICODE_EMPTY();
if (!unicode_empty)
return -1;
- Py_DECREF(*p_unicode);
- *p_unicode = unicode_empty;
+ Py_SETREF(*p_unicode, unicode_empty);
return 0;
}
@@ -1676,8 +1675,7 @@ unicode_resize(PyObject **p_unicode, Py_ssize_t length)
PyObject *copy = resize_copy(unicode, length);
if (copy == NULL)
return -1;
- Py_DECREF(*p_unicode);
- *p_unicode = copy;
+ Py_SETREF(*p_unicode, copy);
return 0;
}
@@ -2318,35 +2316,6 @@ PyUnicode_FromWideChar(const wchar_t *w, Py_ssize_t size)
#endif /* HAVE_WCHAR_H */
-static void
-makefmt(char *fmt, int longflag, int longlongflag, int size_tflag,
- char c)
-{
- *fmt++ = '%';
- if (longflag)
- *fmt++ = 'l';
- else if (longlongflag) {
- /* longlongflag should only ever be nonzero on machines with
- HAVE_LONG_LONG defined */
-#ifdef HAVE_LONG_LONG
- char *f = PY_FORMAT_LONG_LONG;
- while (*f)
- *fmt++ = *f++;
-#else
- /* we shouldn't ever get here */
- assert(0);
- *fmt++ = 'l';
-#endif
- }
- else if (size_tflag) {
- char *f = PY_FORMAT_SIZE_T;
- while (*f)
- *fmt++ = *f++;
- }
- *fmt++ = c;
- *fmt = '\0';
-}
-
/* maximum number of characters required for output of %lld or %p.
We need at most ceil(log10(256)*SIZEOF_LONG_LONG) digits,
plus 1 for the sign. 53/22 is an upper bound for log10(256). */
@@ -2522,48 +2491,42 @@ unicode_fromformat_arg(_PyUnicodeWriter *writer,
case 'x':
{
/* used by sprintf */
- char fmt[10]; /* should be enough for "%0lld\0" */
char buffer[MAX_LONG_LONG_CHARS];
Py_ssize_t arglen;
if (*f == 'u') {
- makefmt(fmt, longflag, longlongflag, size_tflag, *f);
-
if (longflag)
- len = sprintf(buffer, fmt,
+ len = sprintf(buffer, "%lu",
va_arg(*vargs, unsigned long));
#ifdef HAVE_LONG_LONG
else if (longlongflag)
- len = sprintf(buffer, fmt,
+ len = sprintf(buffer, "%" PY_FORMAT_LONG_LONG "u",
va_arg(*vargs, unsigned PY_LONG_LONG));
#endif
else if (size_tflag)
- len = sprintf(buffer, fmt,
+ len = sprintf(buffer, "%" PY_FORMAT_SIZE_T "u",
va_arg(*vargs, size_t));
else
- len = sprintf(buffer, fmt,
+ len = sprintf(buffer, "%u",
va_arg(*vargs, unsigned int));
}
else if (*f == 'x') {
- makefmt(fmt, 0, 0, 0, 'x');
- len = sprintf(buffer, fmt, va_arg(*vargs, int));
+ len = sprintf(buffer, "%x", va_arg(*vargs, int));
}
else {
- makefmt(fmt, longflag, longlongflag, size_tflag, *f);
-
if (longflag)
- len = sprintf(buffer, fmt,
+ len = sprintf(buffer, "%li",
va_arg(*vargs, long));
#ifdef HAVE_LONG_LONG
else if (longlongflag)
- len = sprintf(buffer, fmt,
+ len = sprintf(buffer, "%" PY_FORMAT_LONG_LONG "i",
va_arg(*vargs, PY_LONG_LONG));
#endif
else if (size_tflag)
- len = sprintf(buffer, fmt,
+ len = sprintf(buffer, "%" PY_FORMAT_SIZE_T "i",
va_arg(*vargs, Py_ssize_t));
else
- len = sprintf(buffer, fmt,
+ len = sprintf(buffer, "%i",
va_arg(*vargs, int));
}
assert(len >= 0);
@@ -3246,7 +3209,7 @@ PyUnicode_EncodeLocale(PyObject *unicode, const char *errors)
wlen2 = wcslen(wstr);
if (wlen2 != wlen) {
PyMem_Free(wstr);
- PyErr_SetString(PyExc_TypeError, "embedded null character");
+ PyErr_SetString(PyExc_ValueError, "embedded null character");
return NULL;
}
@@ -3254,7 +3217,7 @@ PyUnicode_EncodeLocale(PyObject *unicode, const char *errors)
/* "surrogateescape" error handler */
char *str;
- str = _Py_wchar2char(wstr, &error_pos);
+ str = Py_EncodeLocale(wstr, &error_pos);
if (str == NULL) {
if (error_pos == (size_t)-1) {
PyErr_NoMemory();
@@ -3307,7 +3270,7 @@ encode_error:
if (errmsg != NULL) {
size_t errlen;
- wstr = _Py_char2wchar(errmsg, &errlen);
+ wstr = Py_DecodeLocale(errmsg, &errlen);
if (wstr != NULL) {
reason = PyUnicode_FromWideChar(wstr, errlen);
PyMem_RawFree(wstr);
@@ -3482,7 +3445,7 @@ mbstowcs_errorpos(const char *str, size_t len)
memset(&mbs, 0, sizeof mbs);
while (len)
{
- converted = mbrtowc(&ch, (char*)str, len, &mbs);
+ converted = mbrtowc(&ch, str, len, &mbs);
if (converted == 0)
/* Reached end of string */
break;
@@ -3513,19 +3476,20 @@ PyUnicode_DecodeLocaleAndSize(const char *str, Py_ssize_t len,
int surrogateescape;
size_t error_pos;
char *errmsg;
- PyObject *reason, *exc;
+ PyObject *reason = NULL; /* initialize to prevent gcc warning */
+ PyObject *exc;
if (locale_error_handler(errors, &surrogateescape) < 0)
return NULL;
- if (str[len] != '\0' || len != strlen(str)) {
- PyErr_SetString(PyExc_TypeError, "embedded null character");
+ if (str[len] != '\0' || (size_t)len != strlen(str)) {
+ PyErr_SetString(PyExc_ValueError, "embedded null byte");
return NULL;
}
if (surrogateescape) {
/* "surrogateescape" error handler */
- wstr = _Py_char2wchar(str, &wlen);
+ wstr = Py_DecodeLocale(str, &wlen);
if (wstr == NULL) {
if (wlen == (size_t)-1)
PyErr_NoMemory();
@@ -3578,7 +3542,7 @@ decode_error:
error_pos = mbstowcs_errorpos(str, len);
if (errmsg != NULL) {
size_t errlen;
- wstr = _Py_char2wchar(errmsg, &errlen);
+ wstr = Py_DecodeLocale(errmsg, &errlen);
if (wstr != NULL) {
reason = PyUnicode_FromWideChar(wstr, errlen);
PyMem_RawFree(wstr);
@@ -3648,21 +3612,6 @@ PyUnicode_DecodeFSDefaultAndSize(const char *s, Py_ssize_t size)
int
-_PyUnicode_HasNULChars(PyObject* str)
-{
- Py_ssize_t pos;
-
- if (PyUnicode_READY(str) == -1)
- return -1;
- pos = findchar(PyUnicode_DATA(str), PyUnicode_KIND(str),
- PyUnicode_GET_LENGTH(str), '\0', 1);
- if (pos == -1)
- return 0;
- else
- return 1;
-}
-
-int
PyUnicode_FSConverter(PyObject* arg, void* addr)
{
PyObject *output = NULL;
@@ -3670,6 +3619,7 @@ PyUnicode_FSConverter(PyObject* arg, void* addr)
void *data;
if (arg == NULL) {
Py_DECREF(*(PyObject**)addr);
+ *(PyObject**)addr = NULL;
return 1;
}
if (PyBytes_Check(arg)) {
@@ -3692,8 +3642,8 @@ PyUnicode_FSConverter(PyObject* arg, void* addr)
}
size = PyBytes_GET_SIZE(output);
data = PyBytes_AS_STRING(output);
- if (size != strlen(data)) {
- PyErr_SetString(PyExc_TypeError, "embedded NUL character");
+ if ((size_t)size != strlen(data)) {
+ PyErr_SetString(PyExc_ValueError, "embedded null byte");
Py_DECREF(output);
return 0;
}
@@ -3737,7 +3687,7 @@ PyUnicode_FSDecoder(PyObject* arg, void* addr)
}
if (findchar(PyUnicode_DATA(output), PyUnicode_KIND(output),
PyUnicode_GET_LENGTH(output), 0, 1) >= 0) {
- PyErr_SetString(PyExc_TypeError, "embedded NUL character");
+ PyErr_SetString(PyExc_ValueError, "embedded null character");
Py_DECREF(output);
return 0;
}
@@ -4844,7 +4794,7 @@ _Py_DecodeUTF8_surrogateescape(const char *s, Py_ssize_t size)
/* Note: size will always be longer than the resulting Unicode
character count */
- if (PY_SSIZE_T_MAX / sizeof(wchar_t) < (size + 1))
+ if (PY_SSIZE_T_MAX / (Py_ssize_t)sizeof(wchar_t) < (size + 1))
return NULL;
unicode = PyMem_RawMalloc((size + 1) * sizeof(wchar_t));
if (!unicode)
@@ -5109,32 +5059,22 @@ _PyUnicode_EncodeUTF32(PyObject *str,
const char *errors,
int byteorder)
{
- int kind;
- void *data;
+ enum PyUnicode_Kind kind;
+ const void *data;
Py_ssize_t len;
PyObject *v;
- unsigned char *p;
- Py_ssize_t nsize, i;
- /* Offsets from p for storing byte pairs in the right order. */
+ PY_UINT32_T *out;
#if PY_LITTLE_ENDIAN
- int iorder[] = {0, 1, 2, 3};
+ int native_ordering = byteorder <= 0;
#else
- int iorder[] = {3, 2, 1, 0};
+ int native_ordering = byteorder >= 0;
#endif
const char *encoding;
+ Py_ssize_t nsize, pos;
PyObject *errorHandler = NULL;
PyObject *exc = NULL;
PyObject *rep = NULL;
-#define STORECHAR(CH) \
- do { \
- p[iorder[3]] = ((CH) >> 24) & 0xff; \
- p[iorder[2]] = ((CH) >> 16) & 0xff; \
- p[iorder[1]] = ((CH) >> 8) & 0xff; \
- p[iorder[0]] = (CH) & 0xff; \
- p += 4; \
- } while(0)
-
if (!PyUnicode_Check(str)) {
PyErr_BadArgument();
return NULL;
@@ -5145,59 +5085,53 @@ _PyUnicode_EncodeUTF32(PyObject *str,
data = PyUnicode_DATA(str);
len = PyUnicode_GET_LENGTH(str);
- nsize = len + (byteorder == 0);
- if (nsize > PY_SSIZE_T_MAX / 4)
+ if (len > PY_SSIZE_T_MAX / 4 - (byteorder == 0))
return PyErr_NoMemory();
+ nsize = len + (byteorder == 0);
v = PyBytes_FromStringAndSize(NULL, nsize * 4);
if (v == NULL)
return NULL;
- p = (unsigned char *)PyBytes_AS_STRING(v);
+ /* output buffer is 4-bytes aligned */
+ assert(_Py_IS_ALIGNED(PyBytes_AS_STRING(v), 4));
+ out = (PY_UINT32_T *)PyBytes_AS_STRING(v);
if (byteorder == 0)
- STORECHAR(0xFEFF);
+ *out++ = 0xFEFF;
if (len == 0)
- return v;
+ goto done;
- if (byteorder == -1) {
- /* force LE */
- iorder[0] = 0;
- iorder[1] = 1;
- iorder[2] = 2;
- iorder[3] = 3;
+ if (byteorder == -1)
encoding = "utf-32-le";
- }
- else if (byteorder == 1) {
- /* force BE */
- iorder[0] = 3;
- iorder[1] = 2;
- iorder[2] = 1;
- iorder[3] = 0;
+ else if (byteorder == 1)
encoding = "utf-32-be";
- }
else
encoding = "utf-32";
if (kind == PyUnicode_1BYTE_KIND) {
- for (i = 0; i < len; i++)
- STORECHAR(PyUnicode_READ(kind, data, i));
- return v;
+ ucs1lib_utf32_encode((const Py_UCS1 *)data, len, &out, native_ordering);
+ goto done;
}
- for (i = 0; i < len;) {
+ pos = 0;
+ while (pos < len) {
Py_ssize_t repsize, moreunits;
- Py_UCS4 ch = PyUnicode_READ(kind, data, i);
- i++;
- assert(ch <= MAX_UNICODE);
- if (!Py_UNICODE_IS_SURROGATE(ch)) {
- STORECHAR(ch);
- continue;
+
+ if (kind == PyUnicode_2BYTE_KIND) {
+ pos += ucs2lib_utf32_encode((const Py_UCS2 *)data + pos, len - pos,
+ &out, native_ordering);
}
+ else {
+ assert(kind == PyUnicode_4BYTE_KIND);
+ pos += ucs4lib_utf32_encode((const Py_UCS4 *)data + pos, len - pos,
+ &out, native_ordering);
+ }
+ if (pos == len)
+ break;
rep = unicode_encode_call_errorhandler(
errors, &errorHandler,
encoding, "surrogates not allowed",
- str, &exc, i-1, i, &i);
-
+ str, &exc, pos, pos + 1, &pos);
if (!rep)
goto error;
@@ -5205,7 +5139,7 @@ _PyUnicode_EncodeUTF32(PyObject *str,
repsize = PyBytes_GET_SIZE(rep);
if (repsize & 3) {
raise_encode_exception(&exc, encoding,
- str, i - 1, i,
+ str, pos - 1, pos,
"surrogates not allowed");
goto error;
}
@@ -5218,7 +5152,7 @@ _PyUnicode_EncodeUTF32(PyObject *str,
moreunits = repsize = PyUnicode_GET_LENGTH(rep);
if (!PyUnicode_IS_ASCII(rep)) {
raise_encode_exception(&exc, encoding,
- str, i - 1, i,
+ str, pos - 1, pos,
"surrogates not allowed");
goto error;
}
@@ -5226,7 +5160,7 @@ _PyUnicode_EncodeUTF32(PyObject *str,
/* four bytes are reserved for each surrogate */
if (moreunits > 1) {
- Py_ssize_t outpos = p - (unsigned char*) PyBytes_AS_STRING(v);
+ Py_ssize_t outpos = out - (PY_UINT32_T*) PyBytes_AS_STRING(v);
Py_ssize_t morebytes = 4 * (moreunits - 1);
if (PyBytes_GET_SIZE(v) > PY_SSIZE_T_MAX - morebytes) {
/* integer overflow */
@@ -5235,20 +5169,16 @@ _PyUnicode_EncodeUTF32(PyObject *str,
}
if (_PyBytes_Resize(&v, PyBytes_GET_SIZE(v) + morebytes) < 0)
goto error;
- p = (unsigned char*) PyBytes_AS_STRING(v) + outpos;
+ out = (PY_UINT32_T*) PyBytes_AS_STRING(v) + outpos;
}
if (PyBytes_Check(rep)) {
- Py_MEMCPY(p, PyBytes_AS_STRING(rep), repsize);
- p += repsize;
+ Py_MEMCPY(out, PyBytes_AS_STRING(rep), repsize);
+ out += moreunits;
} else /* rep is unicode */ {
- const Py_UCS1 *repdata;
assert(PyUnicode_KIND(rep) == PyUnicode_1BYTE_KIND);
- repdata = PyUnicode_1BYTE_DATA(rep);
- while (repsize--) {
- Py_UCS4 ch = *repdata++;
- STORECHAR(ch);
- }
+ ucs1lib_utf32_encode(PyUnicode_1BYTE_DATA(rep), repsize,
+ &out, native_ordering);
}
Py_CLEAR(rep);
@@ -5257,11 +5187,12 @@ _PyUnicode_EncodeUTF32(PyObject *str,
/* Cut back to size actually needed. This is necessary for, for example,
encoding of a string containing isolated surrogates and the 'ignore'
handler is used. */
- nsize = p - (unsigned char*) PyBytes_AS_STRING(v);
+ nsize = (unsigned char*) out - (unsigned char*) PyBytes_AS_STRING(v);
if (nsize != PyBytes_GET_SIZE(v))
_PyBytes_Resize(&v, nsize);
Py_XDECREF(errorHandler);
Py_XDECREF(exc);
+ done:
return v;
error:
Py_XDECREF(rep);
@@ -5269,7 +5200,6 @@ _PyUnicode_EncodeUTF32(PyObject *str,
Py_XDECREF(exc);
Py_XDECREF(v);
return NULL;
-#undef STORECHAR
}
PyObject *
@@ -6856,28 +6786,6 @@ code_page_name(UINT code_page, PyObject **obj)
return PyBytes_AS_STRING(*obj);
}
-static int
-is_dbcs_lead_byte(UINT code_page, const char *s, int offset)
-{
- const char *curr = s + offset;
- const char *prev;
-
- if (!IsDBCSLeadByteEx(code_page, *curr))
- return 0;
-
- prev = CharPrevExA(code_page, s, curr, 0);
- if (prev == curr)
- return 1;
- /* FIXME: This code is limited to "true" double-byte encodings,
- as it assumes an incomplete character consists of a single
- byte. */
- if (curr - prev == 2)
- return 1;
- if (!IsDBCSLeadByteEx(code_page, *prev))
- return 1;
- return 0;
-}
-
static DWORD
decode_code_page_flags(UINT code_page)
{
@@ -6952,7 +6860,7 @@ static int
decode_code_page_errors(UINT code_page,
PyObject **v,
const char *in, const int size,
- const char *errors)
+ const char *errors, int final)
{
const char *startin = in;
const char *endin = in + size;
@@ -6979,7 +6887,7 @@ decode_code_page_errors(UINT code_page,
if (encoding == NULL)
return -1;
- if (errors == NULL || strcmp(errors, "strict") == 0) {
+ if ((errors == NULL || strcmp(errors, "strict") == 0) && final) {
/* The last error was ERROR_NO_UNICODE_TRANSLATION, then we raise a
UnicodeDecodeError. */
make_decode_exception(&exc, encoding, in, size, 0, 0, reason);
@@ -7042,6 +6950,10 @@ decode_code_page_errors(UINT code_page,
if (outsize <= 0) {
Py_ssize_t startinpos, endinpos, outpos;
+ /* last character in partial decode? */
+ if (in + insize >= endin && !final)
+ break;
+
startinpos = in - startin;
endinpos = startinpos + 1;
outpos = out - PyUnicode_AS_UNICODE(*v);
@@ -7070,7 +6982,8 @@ decode_code_page_errors(UINT code_page,
assert(outsize <= PyUnicode_WSTR_LENGTH(*v));
if (unicode_resize(v, outsize) < 0)
goto error;
- ret = size;
+ /* (in - startin) <= size and size is an int */
+ ret = Py_SAFE_DOWNCAST(in - startin, Py_ssize_t, int);
error:
Py_XDECREF(encoding_obj);
@@ -7111,24 +7024,19 @@ decode_code_page_stateful(int code_page,
done = 1;
}
- /* Skip trailing lead-byte unless 'final' is set */
- if (!final && is_dbcs_lead_byte(code_page, s, chunk_size - 1))
- --chunk_size;
-
if (chunk_size == 0 && done) {
if (v != NULL)
break;
_Py_RETURN_UNICODE_EMPTY();
}
-
converted = decode_code_page_strict(code_page, &v,
s, chunk_size);
if (converted == -2)
converted = decode_code_page_errors(code_page, &v,
s, chunk_size,
- errors);
- assert(converted != 0);
+ errors, final);
+ assert(converted != 0 || done);
if (converted < 0) {
Py_XDECREF(v);
@@ -7176,13 +7084,7 @@ static DWORD
encode_code_page_flags(UINT code_page, const char *errors)
{
if (code_page == CP_UTF8) {
- if (winver.dwMajorVersion >= 6)
- /* CP_UTF8 supports WC_ERR_INVALID_CHARS on Windows Vista
- and later */
- return WC_ERR_INVALID_CHARS;
- else
- /* CP_UTF8 only supports flags=0 on Windows older than Vista */
- return 0;
+ return WC_ERR_INVALID_CHARS;
}
else if (code_page == CP_UTF7) {
/* CP_UTF7 only supports flags=0 */
@@ -7492,6 +7394,11 @@ encode_code_page(int code_page,
Py_ssize_t offset;
int chunk_len, ret, done;
+ if (!PyUnicode_Check(unicode)) {
+ PyErr_BadArgument();
+ return NULL;
+ }
+
if (PyUnicode_READY(unicode) == -1)
return NULL;
len = PyUnicode_GET_LENGTH(unicode);
@@ -7565,10 +7472,6 @@ PyUnicode_EncodeCodePage(int code_page,
PyObject *
PyUnicode_AsMBCSString(PyObject *unicode)
{
- if (!PyUnicode_Check(unicode)) {
- PyErr_BadArgument();
- return NULL;
- }
return PyUnicode_EncodeCodePage(CP_ACP, unicode, NULL);
}
@@ -8535,10 +8438,10 @@ charmaptranslate_lookup(Py_UCS4 c, PyObject *mapping, PyObject **result)
}
else if (PyLong_Check(x)) {
long value = PyLong_AS_LONG(x);
- long max = PyUnicode_GetMax();
- if (value < 0 || value > max) {
- PyErr_Format(PyExc_TypeError,
- "character mapping must be in range(0x%x)", max+1);
+ if (value < 0 || value > MAX_UNICODE) {
+ PyErr_Format(PyExc_ValueError,
+ "character mapping must be in range(0x%x)",
+ MAX_UNICODE+1);
Py_DECREF(x);
return -1;
}
@@ -8557,76 +8460,166 @@ charmaptranslate_lookup(Py_UCS4 c, PyObject *mapping, PyObject **result)
return -1;
}
}
-/* ensure that *outobj is at least requiredsize characters long,
- if not reallocate and adjust various state variables.
- Return 0 on success, -1 on error */
+
+/* lookup the character, write the result into the writer.
+ Return 1 if the result was written into the writer, return 0 if the mapping
+ was undefined, raise an exception return -1 on error. */
static int
-charmaptranslate_makespace(Py_UCS4 **outobj, Py_ssize_t *psize,
- Py_ssize_t requiredsize)
-{
- Py_ssize_t oldsize = *psize;
- Py_UCS4 *new_outobj;
- if (requiredsize > oldsize) {
- /* exponentially overallocate to minimize reallocations */
- if (requiredsize < 2 * oldsize)
- requiredsize = 2 * oldsize;
- new_outobj = PyMem_Realloc(*outobj, requiredsize * sizeof(Py_UCS4));
- if (new_outobj == 0)
+charmaptranslate_output(Py_UCS4 ch, PyObject *mapping,
+ _PyUnicodeWriter *writer)
+{
+ PyObject *item;
+
+ if (charmaptranslate_lookup(ch, mapping, &item))
+ return -1;
+
+ if (item == NULL) {
+ /* not found => default to 1:1 mapping */
+ if (_PyUnicodeWriter_WriteCharInline(writer, ch) < 0) {
return -1;
- *outobj = new_outobj;
- *psize = requiredsize;
+ }
+ return 1;
}
- return 0;
+
+ if (item == Py_None) {
+ Py_DECREF(item);
+ return 0;
+ }
+
+ if (PyLong_Check(item)) {
+ long ch = (Py_UCS4)PyLong_AS_LONG(item);
+ /* PyLong_AS_LONG() cannot fail, charmaptranslate_lookup() already
+ used it */
+ if (_PyUnicodeWriter_WriteCharInline(writer, ch) < 0) {
+ Py_DECREF(item);
+ return -1;
+ }
+ Py_DECREF(item);
+ return 1;
+ }
+
+ if (!PyUnicode_Check(item)) {
+ Py_DECREF(item);
+ return -1;
+ }
+
+ if (_PyUnicodeWriter_WriteStr(writer, item) < 0) {
+ Py_DECREF(item);
+ return -1;
+ }
+
+ Py_DECREF(item);
+ return 1;
}
-/* lookup the character, put the result in the output string and adjust
- various state variables. Return a new reference to the object that
- was put in the output buffer in *result, or Py_None, if the mapping was
- undefined (in which case no character was written).
- The called must decref result.
- Return 0 on success, -1 on error. */
+
static int
-charmaptranslate_output(PyObject *input, Py_ssize_t ipos,
- PyObject *mapping, Py_UCS4 **output,
- Py_ssize_t *osize, Py_ssize_t *opos,
- PyObject **res)
+unicode_fast_translate_lookup(PyObject *mapping, Py_UCS1 ch,
+ Py_UCS1 *translate)
{
- Py_UCS4 curinp = PyUnicode_READ_CHAR(input, ipos);
- if (charmaptranslate_lookup(curinp, mapping, res))
+ PyObject *item = NULL;
+ int ret = 0;
+
+ if (charmaptranslate_lookup(ch, mapping, &item)) {
return -1;
- if (*res==NULL) {
+ }
+
+ if (item == Py_None) {
+ /* deletion */
+ translate[ch] = 0xfe;
+ }
+ else if (item == NULL) {
/* not found => default to 1:1 mapping */
- (*output)[(*opos)++] = curinp;
+ translate[ch] = ch;
+ return 1;
}
- else if (*res==Py_None)
- ;
- else if (PyLong_Check(*res)) {
- /* no overflow check, because we know that the space is enough */
- (*output)[(*opos)++] = (Py_UCS4)PyLong_AS_LONG(*res);
+ else if (PyLong_Check(item)) {
+ long replace = PyLong_AS_LONG(item);
+ /* PyLong_AS_LONG() cannot fail, charmaptranslate_lookup() already
+ used it */
+ if (127 < replace) {
+ /* invalid character or character outside ASCII:
+ skip the fast translate */
+ goto exit;
+ }
+ translate[ch] = (Py_UCS1)replace;
}
- else if (PyUnicode_Check(*res)) {
- Py_ssize_t repsize;
- if (PyUnicode_READY(*res) == -1)
+ else if (PyUnicode_Check(item)) {
+ Py_UCS4 replace;
+
+ if (PyUnicode_READY(item) == -1) {
+ Py_DECREF(item);
return -1;
- repsize = PyUnicode_GET_LENGTH(*res);
- if (repsize==1) {
- /* no overflow check, because we know that the space is enough */
- (*output)[(*opos)++] = PyUnicode_READ_CHAR(*res, 0);
}
- else if (repsize!=0) {
- /* more than one character */
- Py_ssize_t requiredsize = *opos +
- (PyUnicode_GET_LENGTH(input) - ipos) +
- repsize - 1;
- Py_ssize_t i;
- if (charmaptranslate_makespace(output, osize, requiredsize))
+ if (PyUnicode_GET_LENGTH(item) != 1)
+ goto exit;
+
+ replace = PyUnicode_READ_CHAR(item, 0);
+ if (replace > 127)
+ goto exit;
+ translate[ch] = (Py_UCS1)replace;
+ }
+ else {
+ /* not None, NULL, long or unicode */
+ goto exit;
+ }
+ ret = 1;
+
+ exit:
+ Py_DECREF(item);
+ return ret;
+}
+
+/* Fast path for ascii => ascii translation. Return 1 if the whole string
+ was translated into writer, return 0 if the input string was partially
+ translated into writer, raise an exception and return -1 on error. */
+static int
+unicode_fast_translate(PyObject *input, PyObject *mapping,
+ _PyUnicodeWriter *writer, int ignore,
+ Py_ssize_t *input_pos)
+{
+ Py_UCS1 ascii_table[128], ch, ch2;
+ Py_ssize_t len;
+ Py_UCS1 *in, *end, *out;
+ int res = 0;
+
+ len = PyUnicode_GET_LENGTH(input);
+
+ memset(ascii_table, 0xff, 128);
+
+ in = PyUnicode_1BYTE_DATA(input);
+ end = in + len;
+
+ assert(PyUnicode_IS_ASCII(writer->buffer));
+ assert(PyUnicode_GET_LENGTH(writer->buffer) == len);
+ out = PyUnicode_1BYTE_DATA(writer->buffer);
+
+ for (; in < end; in++) {
+ ch = *in;
+ ch2 = ascii_table[ch];
+ if (ch2 == 0xff) {
+ int translate = unicode_fast_translate_lookup(mapping, ch,
+ ascii_table);
+ if (translate < 0)
return -1;
- for(i = 0; i < repsize; i++)
- (*output)[(*opos)++] = PyUnicode_READ_CHAR(*res, i);
+ if (translate == 0)
+ goto exit;
+ ch2 = ascii_table[ch];
+ }
+ if (ch2 == 0xfe) {
+ if (ignore)
+ continue;
+ goto exit;
}
+ assert(ch2 < 128);
+ *out = ch2;
+ out++;
}
- else
- return -1;
- return 0;
+ res = 1;
+
+exit:
+ writer->pos = out - PyUnicode_1BYTE_DATA(writer->buffer);
+ *input_pos = in - PyUnicode_1BYTE_DATA(input);
+ return res;
}
PyObject *
@@ -8635,22 +8628,17 @@ _PyUnicode_TranslateCharmap(PyObject *input,
const char *errors)
{
/* input object */
- char *idata;
+ char *data;
Py_ssize_t size, i;
int kind;
/* output buffer */
- Py_UCS4 *output = NULL;
- Py_ssize_t osize;
- PyObject *res;
- /* current output position */
- Py_ssize_t opos;
+ _PyUnicodeWriter writer;
+ /* error handler */
char *reason = "character maps to <undefined>";
PyObject *errorHandler = NULL;
PyObject *exc = NULL;
- /* the following variable is used for caching string comparisons
- * -1=not initialized, 0=unknown, 1=strict, 2=replace,
- * 3=ignore, 4=xmlcharrefreplace */
- int known_errorHandler = -1;
+ int ignore;
+ int res;
if (mapping == NULL) {
PyErr_BadArgument();
@@ -8659,10 +8647,9 @@ _PyUnicode_TranslateCharmap(PyObject *input,
if (PyUnicode_READY(input) == -1)
return NULL;
- idata = (char*)PyUnicode_DATA(input);
+ data = (char*)PyUnicode_DATA(input);
kind = PyUnicode_KIND(input);
size = PyUnicode_GET_LENGTH(input);
- i = 0;
if (size == 0) {
Py_INCREF(input);
@@ -8671,121 +8658,87 @@ _PyUnicode_TranslateCharmap(PyObject *input,
/* allocate enough for a simple 1:1 translation without
replacements, if we need more, we'll resize */
- osize = size;
- output = PyMem_NEW(Py_UCS4, osize);
- opos = 0;
- if (output == NULL) {
- PyErr_NoMemory();
+ _PyUnicodeWriter_Init(&writer);
+ if (_PyUnicodeWriter_Prepare(&writer, size, 127) == -1)
goto onError;
+
+ ignore = (errors != NULL && strcmp(errors, "ignore") == 0);
+
+ if (PyUnicode_READY(input) == -1)
+ return NULL;
+ if (PyUnicode_IS_ASCII(input)) {
+ res = unicode_fast_translate(input, mapping, &writer, ignore, &i);
+ if (res < 0) {
+ _PyUnicodeWriter_Dealloc(&writer);
+ return NULL;
+ }
+ if (res == 1)
+ return _PyUnicodeWriter_Finish(&writer);
+ }
+ else {
+ i = 0;
}
while (i<size) {
/* try to encode it */
- PyObject *x = NULL;
- if (charmaptranslate_output(input, i, mapping,
- &output, &osize, &opos, &x)) {
- Py_XDECREF(x);
+ int translate;
+ PyObject *repunicode = NULL; /* initialize to prevent gcc warning */
+ Py_ssize_t newpos;
+ /* startpos for collecting untranslatable chars */
+ Py_ssize_t collstart;
+ Py_ssize_t collend;
+ Py_UCS4 ch;
+
+ ch = PyUnicode_READ(kind, data, i);
+ translate = charmaptranslate_output(ch, mapping, &writer);
+ if (translate < 0)
goto onError;
- }
- Py_XDECREF(x);
- if (x!=Py_None) /* it worked => adjust input pointer */
+
+ if (translate != 0) {
+ /* it worked => adjust input pointer */
++i;
- else { /* untranslatable character */
- PyObject *repunicode = NULL; /* initialize to prevent gcc warning */
- Py_ssize_t repsize;
- Py_ssize_t newpos;
- Py_ssize_t uni2;
- /* startpos for collecting untranslatable chars */
- Py_ssize_t collstart = i;
- Py_ssize_t collend = i+1;
- Py_ssize_t coll;
-
- /* find all untranslatable characters */
- while (collend < size) {
- if (charmaptranslate_lookup(PyUnicode_READ(kind,idata, collend), mapping, &x))
- goto onError;
- Py_XDECREF(x);
- if (x!=Py_None)
- break;
- ++collend;
- }
- /* cache callback name lookup
- * (if not done yet, i.e. it's the first error) */
- if (known_errorHandler==-1) {
- if ((errors==NULL) || (!strcmp(errors, "strict")))
- known_errorHandler = 1;
- else if (!strcmp(errors, "replace"))
- known_errorHandler = 2;
- else if (!strcmp(errors, "ignore"))
- known_errorHandler = 3;
- else if (!strcmp(errors, "xmlcharrefreplace"))
- known_errorHandler = 4;
- else
- known_errorHandler = 0;
- }
- switch (known_errorHandler) {
- case 1: /* strict */
- make_translate_exception(&exc,
- input, collstart, collend, reason);
- if (exc != NULL)
- PyCodec_StrictErrors(exc);
+ continue;
+ }
+
+ /* untranslatable character */
+ collstart = i;
+ collend = i+1;
+
+ /* find all untranslatable characters */
+ while (collend < size) {
+ PyObject *x;
+ ch = PyUnicode_READ(kind, data, collend);
+ if (charmaptranslate_lookup(ch, mapping, &x))
goto onError;
- case 2: /* replace */
- /* No need to check for space, this is a 1:1 replacement */
- for (coll = collstart; coll<collend; coll++)
- output[opos++] = '?';
- /* fall through */
- case 3: /* ignore */
- i = collend;
- break;
- case 4: /* xmlcharrefreplace */
- /* generate replacement (temporarily (mis)uses i) */
- for (i = collstart; i < collend; ++i) {
- char buffer[2+29+1+1];
- char *cp;
- sprintf(buffer, "&#%d;", PyUnicode_READ(kind, idata, i));
- if (charmaptranslate_makespace(&output, &osize,
- opos+strlen(buffer)+(size-collend)))
- goto onError;
- for (cp = buffer; *cp; ++cp)
- output[opos++] = *cp;
- }
- i = collend;
+ Py_XDECREF(x);
+ if (x != Py_None)
break;
- default:
- repunicode = unicode_translate_call_errorhandler(errors, &errorHandler,
- reason, input, &exc,
- collstart, collend, &newpos);
- if (repunicode == NULL)
- goto onError;
- if (PyUnicode_READY(repunicode) == -1) {
- Py_DECREF(repunicode);
- goto onError;
- }
- /* generate replacement */
- repsize = PyUnicode_GET_LENGTH(repunicode);
- if (charmaptranslate_makespace(&output, &osize,
- opos+repsize+(size-collend))) {
- Py_DECREF(repunicode);
- goto onError;
- }
- for (uni2 = 0; repsize-->0; ++uni2)
- output[opos++] = PyUnicode_READ_CHAR(repunicode, uni2);
- i = newpos;
+ ++collend;
+ }
+
+ if (ignore) {
+ i = collend;
+ }
+ else {
+ repunicode = unicode_translate_call_errorhandler(errors, &errorHandler,
+ reason, input, &exc,
+ collstart, collend, &newpos);
+ if (repunicode == NULL)
+ goto onError;
+ if (_PyUnicodeWriter_WriteStr(&writer, repunicode) < 0) {
Py_DECREF(repunicode);
+ goto onError;
}
+ Py_DECREF(repunicode);
+ i = newpos;
}
}
- res = PyUnicode_FromKindAndData(PyUnicode_4BYTE_KIND, output, opos);
- if (!res)
- goto onError;
- PyMem_Free(output);
Py_XDECREF(exc);
Py_XDECREF(errorHandler);
- return res;
+ return _PyUnicodeWriter_Finish(&writer);
onError:
- PyMem_Free(output);
+ _PyUnicodeWriter_Dealloc(&writer);
Py_XDECREF(exc);
Py_XDECREF(errorHandler);
return NULL;
@@ -8887,7 +8840,7 @@ PyUnicode_TransformDecimalToASCII(Py_UNICODE *s,
maxchar = 127;
for (i = 0; i < length; i++) {
- Py_UNICODE ch = s[i];
+ Py_UCS4 ch = s[i];
if (ch > 127) {
int decimal = Py_UNICODE_TODECIMAL(ch);
if (decimal >= 0)
@@ -8904,7 +8857,7 @@ PyUnicode_TransformDecimalToASCII(Py_UNICODE *s,
data = PyUnicode_DATA(decimal);
/* Iterate over code points */
for (i = 0; i < length; i++) {
- Py_UNICODE ch = s[i];
+ Py_UCS4 ch = s[i];
if (ch > 127) {
int decimal = Py_UNICODE_TODECIMAL(ch);
if (decimal >= 0)
@@ -8985,35 +8938,61 @@ PyUnicode_EncodeDecimal(Py_UNICODE *s,
/* --- Helpers ------------------------------------------------------------ */
+/* helper macro to fixup start/end slice values */
+#define ADJUST_INDICES(start, end, len) \
+ if (end > len) \
+ end = len; \
+ else if (end < 0) { \
+ end += len; \
+ if (end < 0) \
+ end = 0; \
+ } \
+ if (start < 0) { \
+ start += len; \
+ if (start < 0) \
+ start = 0; \
+ }
+
static Py_ssize_t
any_find_slice(int direction, PyObject* s1, PyObject* s2,
Py_ssize_t start,
Py_ssize_t end)
{
- int kind1, kind2, kind;
+ int kind1, kind2;
void *buf1, *buf2;
Py_ssize_t len1, len2, result;
kind1 = PyUnicode_KIND(s1);
kind2 = PyUnicode_KIND(s2);
- kind = kind1 > kind2 ? kind1 : kind2;
+ if (kind1 < kind2)
+ return -1;
+
+ len1 = PyUnicode_GET_LENGTH(s1);
+ len2 = PyUnicode_GET_LENGTH(s2);
+ ADJUST_INDICES(start, end, len1);
+ if (end - start < len2)
+ return -1;
+
buf1 = PyUnicode_DATA(s1);
buf2 = PyUnicode_DATA(s2);
- if (kind1 != kind)
- buf1 = _PyUnicode_AsKind(s1, kind);
- if (!buf1)
- return -2;
- if (kind2 != kind)
- buf2 = _PyUnicode_AsKind(s2, kind);
- if (!buf2) {
- if (kind1 != kind) PyMem_Free(buf1);
- return -2;
+ if (len2 == 1) {
+ Py_UCS4 ch = PyUnicode_READ(kind2, buf2, 0);
+ result = findchar((const char *)buf1 + kind1*start,
+ kind1, end - start, ch, direction);
+ if (result == -1)
+ return -1;
+ else
+ return start + result;
+ }
+
+ if (kind2 != kind1) {
+ buf2 = _PyUnicode_AsKind(s2, kind1);
+ if (!buf2)
+ return -2;
}
- len1 = PyUnicode_GET_LENGTH(s1);
- len2 = PyUnicode_GET_LENGTH(s2);
if (direction > 0) {
- switch (kind) {
+ switch (kind1) {
case PyUnicode_1BYTE_KIND:
if (PyUnicode_IS_ASCII(s1) && PyUnicode_IS_ASCII(s2))
result = asciilib_find_slice(buf1, len1, buf2, len2, start, end);
@@ -9031,7 +9010,7 @@ any_find_slice(int direction, PyObject* s1, PyObject* s2,
}
}
else {
- switch (kind) {
+ switch (kind1) {
case PyUnicode_1BYTE_KIND:
if (PyUnicode_IS_ASCII(s1) && PyUnicode_IS_ASCII(s2))
result = asciilib_rfind_slice(buf1, len1, buf2, len2, start, end);
@@ -9049,9 +9028,7 @@ any_find_slice(int direction, PyObject* s1, PyObject* s2,
}
}
- if (kind1 != kind)
- PyMem_Free(buf1);
- if (kind2 != kind)
+ if (kind2 != kind1)
PyMem_Free(buf2);
return result;
@@ -9141,21 +9118,6 @@ _PyUnicode_InsertThousandsGrouping(
}
-/* helper macro to fixup start/end slice values */
-#define ADJUST_INDICES(start, end, len) \
- if (end > len) \
- end = len; \
- else if (end < 0) { \
- end += len; \
- if (end < 0) \
- end = 0; \
- } \
- if (start < 0) { \
- start += len; \
- if (start < 0) \
- start = 0; \
- }
-
Py_ssize_t
PyUnicode_Count(PyObject *str,
PyObject *substr,
@@ -9165,7 +9127,7 @@ PyUnicode_Count(PyObject *str,
Py_ssize_t result;
PyObject* str_obj;
PyObject* sub_obj;
- int kind1, kind2, kind;
+ int kind1, kind2;
void *buf1 = NULL, *buf2 = NULL;
Py_ssize_t len1, len2;
@@ -9185,24 +9147,30 @@ PyUnicode_Count(PyObject *str,
kind1 = PyUnicode_KIND(str_obj);
kind2 = PyUnicode_KIND(sub_obj);
- kind = kind1;
- buf1 = PyUnicode_DATA(str_obj);
- buf2 = PyUnicode_DATA(sub_obj);
- if (kind2 != kind) {
- if (kind2 > kind) {
- Py_DECREF(sub_obj);
- Py_DECREF(str_obj);
- return 0;
- }
- buf2 = _PyUnicode_AsKind(sub_obj, kind);
+ if (kind1 < kind2) {
+ Py_DECREF(sub_obj);
+ Py_DECREF(str_obj);
+ return 0;
}
- if (!buf2)
- goto onError;
+
len1 = PyUnicode_GET_LENGTH(str_obj);
len2 = PyUnicode_GET_LENGTH(sub_obj);
-
ADJUST_INDICES(start, end, len1);
- switch (kind) {
+ if (end - start < len2) {
+ Py_DECREF(sub_obj);
+ Py_DECREF(str_obj);
+ return 0;
+ }
+
+ buf1 = PyUnicode_DATA(str_obj);
+ buf2 = PyUnicode_DATA(sub_obj);
+ if (kind2 != kind1) {
+ buf2 = _PyUnicode_AsKind(sub_obj, kind1);
+ if (!buf2)
+ goto onError;
+ }
+
+ switch (kind1) {
case PyUnicode_1BYTE_KIND:
if (PyUnicode_IS_ASCII(str_obj) && PyUnicode_IS_ASCII(sub_obj))
result = asciilib_count(
@@ -9234,14 +9202,14 @@ PyUnicode_Count(PyObject *str,
Py_DECREF(sub_obj);
Py_DECREF(str_obj);
- if (kind2 != kind)
+ if (kind2 != kind1)
PyMem_Free(buf2);
return result;
onError:
Py_DECREF(sub_obj);
Py_DECREF(str_obj);
- if (kind2 != kind && buf2)
+ if (kind2 != kind1 && buf2)
PyMem_Free(buf2);
return -1;
}
@@ -9294,6 +9262,8 @@ PyUnicode_FindChar(PyObject *str, Py_UCS4 ch,
}
if (end > PyUnicode_GET_LENGTH(str))
end = PyUnicode_GET_LENGTH(str);
+ if (start >= end)
+ return -1;
kind = PyUnicode_KIND(str);
result = findchar(PyUnicode_1BYTE_DATA(str) + kind*start,
kind, end-start, ch, direction);
@@ -9322,14 +9292,14 @@ tailmatch(PyObject *self,
PyUnicode_READY(substring) == -1)
return -1;
- if (PyUnicode_GET_LENGTH(substring) == 0)
- return 1;
-
ADJUST_INDICES(start, end, PyUnicode_GET_LENGTH(self));
end -= PyUnicode_GET_LENGTH(substring);
if (end < start)
return 0;
+ if (PyUnicode_GET_LENGTH(substring) == 0)
+ return 1;
+
kind_self = PyUnicode_KIND(self);
data_self = PyUnicode_DATA(self);
kind_sub = PyUnicode_KIND(substring);
@@ -9353,7 +9323,7 @@ tailmatch(PyObject *self,
PyUnicode_GET_LENGTH(substring) *
PyUnicode_KIND(substring));
}
- /* otherwise we have to compare each character by first accesing it */
+ /* otherwise we have to compare each character by first accessing it */
else {
/* We do not need to compare 0 and len(substring)-1 because
the if statement above ensured already that they are equal
@@ -9481,7 +9451,7 @@ handle_capital_sigma(int kind, void *data, Py_ssize_t length, Py_ssize_t i)
{
Py_ssize_t j;
int final_sigma;
- Py_UCS4 c = 0;
+ Py_UCS4 c = 0; /* initialize to prevent gcc warning */
/* U+03A3 is in the Final_Sigma context when, it is found like this:
\p{cased}\p{case-ignorable}*U+03A3!(\p{case-ignorable}*\p{cased})
@@ -10040,7 +10010,7 @@ split(PyObject *self,
PyObject *substring,
Py_ssize_t maxcount)
{
- int kind1, kind2, kind;
+ int kind1, kind2;
void *buf1, *buf2;
Py_ssize_t len1, len2;
PyObject* out;
@@ -10084,23 +10054,25 @@ split(PyObject *self,
kind1 = PyUnicode_KIND(self);
kind2 = PyUnicode_KIND(substring);
- kind = kind1 > kind2 ? kind1 : kind2;
+ len1 = PyUnicode_GET_LENGTH(self);
+ len2 = PyUnicode_GET_LENGTH(substring);
+ if (kind1 < kind2 || len1 < len2) {
+ out = PyList_New(1);
+ if (out == NULL)
+ return NULL;
+ Py_INCREF(self);
+ PyList_SET_ITEM(out, 0, self);
+ return out;
+ }
buf1 = PyUnicode_DATA(self);
buf2 = PyUnicode_DATA(substring);
- if (kind1 != kind)
- buf1 = _PyUnicode_AsKind(self, kind);
- if (!buf1)
- return NULL;
- if (kind2 != kind)
- buf2 = _PyUnicode_AsKind(substring, kind);
- if (!buf2) {
- if (kind1 != kind) PyMem_Free(buf1);
- return NULL;
+ if (kind2 != kind1) {
+ buf2 = _PyUnicode_AsKind(substring, kind1);
+ if (!buf2)
+ return NULL;
}
- len1 = PyUnicode_GET_LENGTH(self);
- len2 = PyUnicode_GET_LENGTH(substring);
- switch (kind) {
+ switch (kind1) {
case PyUnicode_1BYTE_KIND:
if (PyUnicode_IS_ASCII(self) && PyUnicode_IS_ASCII(substring))
out = asciilib_split(
@@ -10120,9 +10092,7 @@ split(PyObject *self,
default:
out = NULL;
}
- if (kind1 != kind)
- PyMem_Free(buf1);
- if (kind2 != kind)
+ if (kind2 != kind1)
PyMem_Free(buf2);
return out;
}
@@ -10132,7 +10102,7 @@ rsplit(PyObject *self,
PyObject *substring,
Py_ssize_t maxcount)
{
- int kind1, kind2, kind;
+ int kind1, kind2;
void *buf1, *buf2;
Py_ssize_t len1, len2;
PyObject* out;
@@ -10176,23 +10146,25 @@ rsplit(PyObject *self,
kind1 = PyUnicode_KIND(self);
kind2 = PyUnicode_KIND(substring);
- kind = kind1 > kind2 ? kind1 : kind2;
+ len1 = PyUnicode_GET_LENGTH(self);
+ len2 = PyUnicode_GET_LENGTH(substring);
+ if (kind1 < kind2 || len1 < len2) {
+ out = PyList_New(1);
+ if (out == NULL)
+ return NULL;
+ Py_INCREF(self);
+ PyList_SET_ITEM(out, 0, self);
+ return out;
+ }
buf1 = PyUnicode_DATA(self);
buf2 = PyUnicode_DATA(substring);
- if (kind1 != kind)
- buf1 = _PyUnicode_AsKind(self, kind);
- if (!buf1)
- return NULL;
- if (kind2 != kind)
- buf2 = _PyUnicode_AsKind(substring, kind);
- if (!buf2) {
- if (kind1 != kind) PyMem_Free(buf1);
- return NULL;
+ if (kind2 != kind1) {
+ buf2 = _PyUnicode_AsKind(substring, kind1);
+ if (!buf2)
+ return NULL;
}
- len1 = PyUnicode_GET_LENGTH(self);
- len2 = PyUnicode_GET_LENGTH(substring);
- switch (kind) {
+ switch (kind1) {
case PyUnicode_1BYTE_KIND:
if (PyUnicode_IS_ASCII(self) && PyUnicode_IS_ASCII(substring))
out = asciilib_rsplit(
@@ -10212,9 +10184,7 @@ rsplit(PyObject *self,
default:
out = NULL;
}
- if (kind1 != kind)
- PyMem_Free(buf1);
- if (kind2 != kind)
+ if (kind2 != kind1)
PyMem_Free(buf2);
return out;
}
@@ -10433,7 +10403,7 @@ replace(PyObject *self, PyObject *str1,
}
/* new_size = PyUnicode_GET_LENGTH(self) + n * (PyUnicode_GET_LENGTH(str2) -
PyUnicode_GET_LENGTH(str1))); */
- if (len2 > len1 && len2 - len1 > (PY_SSIZE_T_MAX - slen) / n) {
+ if (len1 < len2 && len2 - len1 > (PY_SSIZE_T_MAX - slen) / n) {
PyErr_SetString(PyExc_OverflowError,
"replace string is too long");
goto error;
@@ -10842,7 +10812,7 @@ PyUnicode_CompareWithASCIIString(PyObject* uni, const char* str)
}
if (len1 > len2)
return 1; /* uni is longer */
- if (len2 > len1)
+ if (len1 < len2)
return -1; /* str is longer */
return 0;
}
@@ -10850,7 +10820,7 @@ PyUnicode_CompareWithASCIIString(PyObject* uni, const char* str)
void *data = PyUnicode_DATA(uni);
/* Compare Unicode string and source character set string */
for (i = 0; (chr = PyUnicode_READ(kind, data, i)) && str[i]; i++)
- if (chr != str[i])
+ if (chr != (unsigned char)str[i])
return (chr < (unsigned char)(str[i])) ? -1 : 1;
/* This check keeps Python strings that end in '\0' from comparing equal
to C strings identical up to that point. */
@@ -10954,23 +10924,35 @@ PyUnicode_Contains(PyObject *container, PyObject *element)
kind1 = PyUnicode_KIND(str);
kind2 = PyUnicode_KIND(sub);
+ if (kind1 < kind2) {
+ Py_DECREF(sub);
+ Py_DECREF(str);
+ return 0;
+ }
+ len1 = PyUnicode_GET_LENGTH(str);
+ len2 = PyUnicode_GET_LENGTH(sub);
+ if (len1 < len2) {
+ Py_DECREF(sub);
+ Py_DECREF(str);
+ return 0;
+ }
buf1 = PyUnicode_DATA(str);
buf2 = PyUnicode_DATA(sub);
+ if (len2 == 1) {
+ Py_UCS4 ch = PyUnicode_READ(kind2, buf2, 0);
+ result = findchar((const char *)buf1, kind1, len1, ch, 1) != -1;
+ Py_DECREF(sub);
+ Py_DECREF(str);
+ return result;
+ }
if (kind2 != kind1) {
- if (kind2 > kind1) {
+ buf2 = _PyUnicode_AsKind(sub, kind1);
+ if (!buf2) {
Py_DECREF(sub);
Py_DECREF(str);
- return 0;
+ return -1;
}
- buf2 = _PyUnicode_AsKind(sub, kind1);
- }
- if (!buf2) {
- Py_DECREF(sub);
- Py_DECREF(str);
- return -1;
}
- len1 = PyUnicode_GET_LENGTH(str);
- len2 = PyUnicode_GET_LENGTH(sub);
switch (kind1) {
case PyUnicode_1BYTE_KIND:
@@ -11151,11 +11133,11 @@ interpreted as in slice notation.");
static PyObject *
unicode_count(PyObject *self, PyObject *args)
{
- PyObject *substring = NULL;
+ PyObject *substring = NULL; /* initialize to fix a compiler warning */
Py_ssize_t start = 0;
Py_ssize_t end = PY_SSIZE_T_MAX;
PyObject *result;
- int kind1, kind2, kind;
+ int kind1, kind2;
void *buf1, *buf2;
Py_ssize_t len1, len2, iresult;
@@ -11165,24 +11147,27 @@ unicode_count(PyObject *self, PyObject *args)
kind1 = PyUnicode_KIND(self);
kind2 = PyUnicode_KIND(substring);
- if (kind2 > kind1) {
+ if (kind1 < kind2) {
Py_DECREF(substring);
return PyLong_FromLong(0);
}
- kind = kind1;
- buf1 = PyUnicode_DATA(self);
- buf2 = PyUnicode_DATA(substring);
- if (kind2 != kind)
- buf2 = _PyUnicode_AsKind(substring, kind);
- if (!buf2) {
- Py_DECREF(substring);
- return NULL;
- }
len1 = PyUnicode_GET_LENGTH(self);
len2 = PyUnicode_GET_LENGTH(substring);
-
ADJUST_INDICES(start, end, len1);
- switch (kind) {
+ if (end - start < len2) {
+ Py_DECREF(substring);
+ return PyLong_FromLong(0);
+ }
+ buf1 = PyUnicode_DATA(self);
+ buf2 = PyUnicode_DATA(substring);
+ if (kind2 != kind1) {
+ buf2 = _PyUnicode_AsKind(substring, kind1);
+ if (!buf2) {
+ Py_DECREF(substring);
+ return NULL;
+ }
+ }
+ switch (kind1) {
case PyUnicode_1BYTE_KIND:
iresult = ucs1lib_count(
((Py_UCS1*)buf1) + start, end - start,
@@ -11207,7 +11192,7 @@ unicode_count(PyObject *self, PyObject *args)
result = PyLong_FromSsize_t(iresult);
- if (kind2 != kind)
+ if (kind2 != kind1)
PyMem_Free(buf2);
Py_DECREF(substring);
@@ -11339,6 +11324,7 @@ Return -1 on failure.");
static PyObject *
unicode_find(PyObject *self, PyObject *args)
{
+ /* initialize variables to prevent gcc warning */
PyObject *substring = NULL;
Py_ssize_t start = 0;
Py_ssize_t end = 0;
@@ -11426,6 +11412,7 @@ Like S.find() but raise ValueError when the substring is not found.");
static PyObject *
unicode_index(PyObject *self, PyObject *args)
{
+ /* initialize variables to prevent gcc warning */
Py_ssize_t result;
PyObject *substring = NULL;
Py_ssize_t start = 0;
@@ -12504,6 +12491,7 @@ Return -1 on failure.");
static PyObject *
unicode_rfind(PyObject *self, PyObject *args)
{
+ /* initialize variables to prevent gcc warning */
PyObject *substring = NULL;
Py_ssize_t start = 0;
Py_ssize_t end = 0;
@@ -12540,6 +12528,7 @@ Like S.rfind() but raise ValueError when the substring is not found.");
static PyObject *
unicode_rindex(PyObject *self, PyObject *args)
{
+ /* initialize variables to prevent gcc warning */
PyObject *substring = NULL;
Py_ssize_t start = 0;
Py_ssize_t end = 0;
@@ -12654,8 +12643,8 @@ PyUnicode_Partition(PyObject *str_in, PyObject *sep_in)
PyObject* str_obj;
PyObject* sep_obj;
PyObject* out;
- int kind1, kind2, kind;
- void *buf1 = NULL, *buf2 = NULL;
+ int kind1, kind2;
+ void *buf1, *buf2;
Py_ssize_t len1, len2;
str_obj = PyUnicode_FromObject(str_in);
@@ -12674,21 +12663,29 @@ PyUnicode_Partition(PyObject *str_in, PyObject *sep_in)
kind1 = PyUnicode_KIND(str_obj);
kind2 = PyUnicode_KIND(sep_obj);
- kind = Py_MAX(kind1, kind2);
- buf1 = PyUnicode_DATA(str_obj);
- if (kind1 != kind)
- buf1 = _PyUnicode_AsKind(str_obj, kind);
- if (!buf1)
- goto onError;
- buf2 = PyUnicode_DATA(sep_obj);
- if (kind2 != kind)
- buf2 = _PyUnicode_AsKind(sep_obj, kind);
- if (!buf2)
- goto onError;
len1 = PyUnicode_GET_LENGTH(str_obj);
len2 = PyUnicode_GET_LENGTH(sep_obj);
+ if (kind1 < kind2 || len1 < len2) {
+ _Py_INCREF_UNICODE_EMPTY();
+ if (!unicode_empty)
+ out = NULL;
+ else {
+ out = PyTuple_Pack(3, str_obj, unicode_empty, unicode_empty);
+ Py_DECREF(unicode_empty);
+ }
+ Py_DECREF(sep_obj);
+ Py_DECREF(str_obj);
+ return out;
+ }
+ buf1 = PyUnicode_DATA(str_obj);
+ buf2 = PyUnicode_DATA(sep_obj);
+ if (kind2 != kind1) {
+ buf2 = _PyUnicode_AsKind(sep_obj, kind1);
+ if (!buf2)
+ goto onError;
+ }
- switch (kind) {
+ switch (kind1) {
case PyUnicode_1BYTE_KIND:
if (PyUnicode_IS_ASCII(str_obj) && PyUnicode_IS_ASCII(sep_obj))
out = asciilib_partition(str_obj, buf1, len1, sep_obj, buf2, len2);
@@ -12708,18 +12705,14 @@ PyUnicode_Partition(PyObject *str_in, PyObject *sep_in)
Py_DECREF(sep_obj);
Py_DECREF(str_obj);
- if (kind1 != kind)
- PyMem_Free(buf1);
- if (kind2 != kind)
+ if (kind2 != kind1)
PyMem_Free(buf2);
return out;
onError:
Py_DECREF(sep_obj);
Py_DECREF(str_obj);
- if (kind1 != kind && buf1)
- PyMem_Free(buf1);
- if (kind2 != kind && buf2)
+ if (kind2 != kind1 && buf2)
PyMem_Free(buf2);
return NULL;
}
@@ -12731,8 +12724,8 @@ PyUnicode_RPartition(PyObject *str_in, PyObject *sep_in)
PyObject* str_obj;
PyObject* sep_obj;
PyObject* out;
- int kind1, kind2, kind;
- void *buf1 = NULL, *buf2 = NULL;
+ int kind1, kind2;
+ void *buf1, *buf2;
Py_ssize_t len1, len2;
str_obj = PyUnicode_FromObject(str_in);
@@ -12746,21 +12739,29 @@ PyUnicode_RPartition(PyObject *str_in, PyObject *sep_in)
kind1 = PyUnicode_KIND(str_obj);
kind2 = PyUnicode_KIND(sep_obj);
- kind = Py_MAX(kind1, kind2);
- buf1 = PyUnicode_DATA(str_obj);
- if (kind1 != kind)
- buf1 = _PyUnicode_AsKind(str_obj, kind);
- if (!buf1)
- goto onError;
- buf2 = PyUnicode_DATA(sep_obj);
- if (kind2 != kind)
- buf2 = _PyUnicode_AsKind(sep_obj, kind);
- if (!buf2)
- goto onError;
len1 = PyUnicode_GET_LENGTH(str_obj);
len2 = PyUnicode_GET_LENGTH(sep_obj);
+ if (kind1 < kind2 || len1 < len2) {
+ _Py_INCREF_UNICODE_EMPTY();
+ if (!unicode_empty)
+ out = NULL;
+ else {
+ out = PyTuple_Pack(3, unicode_empty, unicode_empty, str_obj);
+ Py_DECREF(unicode_empty);
+ }
+ Py_DECREF(sep_obj);
+ Py_DECREF(str_obj);
+ return out;
+ }
+ buf1 = PyUnicode_DATA(str_obj);
+ buf2 = PyUnicode_DATA(sep_obj);
+ if (kind2 != kind1) {
+ buf2 = _PyUnicode_AsKind(sep_obj, kind1);
+ if (!buf2)
+ goto onError;
+ }
- switch (kind) {
+ switch (kind1) {
case PyUnicode_1BYTE_KIND:
if (PyUnicode_IS_ASCII(str_obj) && PyUnicode_IS_ASCII(sep_obj))
out = asciilib_rpartition(str_obj, buf1, len1, sep_obj, buf2, len2);
@@ -12780,18 +12781,14 @@ PyUnicode_RPartition(PyObject *str_in, PyObject *sep_in)
Py_DECREF(sep_obj);
Py_DECREF(str_obj);
- if (kind1 != kind)
- PyMem_Free(buf1);
- if (kind2 != kind)
+ if (kind2 != kind1)
PyMem_Free(buf2);
return out;
onError:
Py_DECREF(sep_obj);
Py_DECREF(str_obj);
- if (kind1 != kind && buf1)
- PyMem_Free(buf1);
- if (kind2 != kind && buf2)
+ if (kind2 != kind1 && buf2)
PyMem_Free(buf2);
return NULL;
}
@@ -12937,47 +12934,9 @@ character at the same position in y. If there is a third argument, it
must be a string, whose characters will be mapped to None in the result.
[clinic start generated code]*/
-PyDoc_STRVAR(unicode_maketrans__doc__,
-"maketrans(x, y=None, z=None, /)\n"
-"--\n"
-"\n"
-"Return a translation table usable for str.translate().\n"
-"\n"
-"If there is only one argument, it must be a dictionary mapping Unicode\n"
-"ordinals (integers) or characters to Unicode ordinals, strings or None.\n"
-"Character keys will be then converted to ordinals.\n"
-"If there are two arguments, they must be strings of equal length, and\n"
-"in the resulting dictionary, each character in x will be mapped to the\n"
-"character at the same position in y. If there is a third argument, it\n"
-"must be a string, whose characters will be mapped to None in the result.");
-
-#define UNICODE_MAKETRANS_METHODDEF \
- {"maketrans", (PyCFunction)unicode_maketrans, METH_VARARGS|METH_STATIC, unicode_maketrans__doc__},
-
-static PyObject *
-unicode_maketrans_impl(PyObject *x, PyObject *y, PyObject *z);
-
-static PyObject *
-unicode_maketrans(void *null, PyObject *args)
-{
- PyObject *return_value = NULL;
- PyObject *x;
- PyObject *y = NULL;
- PyObject *z = NULL;
-
- if (!PyArg_ParseTuple(args,
- "O|UU:maketrans",
- &x, &y, &z))
- goto exit;
- return_value = unicode_maketrans_impl(x, y, z);
-
-exit:
- return return_value;
-}
-
static PyObject *
unicode_maketrans_impl(PyObject *x, PyObject *y, PyObject *z)
-/*[clinic end generated code: output=566edf630f77436a input=7bfbf529a293c6c5]*/
+/*[clinic end generated code: output=a925c89452bd5881 input=7bfbf529a293c6c5]*/
{
PyObject *new = NULL, *key, *value;
Py_ssize_t i = 0;
@@ -13367,8 +13326,7 @@ _PyUnicodeWriter_PrepareInternal(_PyUnicodeWriter *writer,
return -1;
_PyUnicode_FastCopyCharacters(newbuffer, 0,
writer->buffer, 0, writer->pos);
- Py_DECREF(writer->buffer);
- writer->buffer = newbuffer;
+ Py_SETREF(writer->buffer, newbuffer);
}
_PyUnicodeWriter_Update(writer);
return 0;
@@ -13406,6 +13364,7 @@ _PyUnicodeWriter_WriteStr(_PyUnicodeWriter *writer, PyObject *str)
maxchar = PyUnicode_MAX_CHAR_VALUE(str);
if (maxchar > writer->maxchar || len > writer->size - writer->pos) {
if (writer->buffer == NULL && !writer->overallocate) {
+ assert(_PyUnicode_CheckConsistency(str, 1));
writer->readonly = 1;
Py_INCREF(str);
writer->buffer = str;
@@ -13914,8 +13873,8 @@ formatfloat(PyObject *v, struct unicode_format_arg_t *arg,
* CAUTION: o, x and X conversions on regular ints can never
* produce a '-' sign, but can for Python's unbounded ints.
*/
-static PyObject*
-formatlong(PyObject *val, struct unicode_format_arg_t *arg)
+PyObject *
+_PyUnicode_FormatLong(PyObject *val, int alt, int prec, int type)
{
PyObject *result = NULL;
char *buf;
@@ -13925,8 +13884,6 @@ formatlong(PyObject *val, struct unicode_format_arg_t *arg)
Py_ssize_t llen;
int numdigits; /* len == numnondigits + numdigits */
int numnondigits = 0;
- int prec = arg->prec;
- int type = arg->ch;
/* Avoid exceeding SSIZE_T_MAX */
if (prec > INT_MAX-3) {
@@ -13975,7 +13932,7 @@ formatlong(PyObject *val, struct unicode_format_arg_t *arg)
if (llen > INT_MAX) {
Py_DECREF(result);
PyErr_SetString(PyExc_ValueError,
- "string too large in _PyBytes_FormatLong");
+ "string too large in _PyUnicode_FormatLong");
return NULL;
}
len = (int)llen;
@@ -13985,7 +13942,7 @@ formatlong(PyObject *val, struct unicode_format_arg_t *arg)
assert(numdigits > 0);
/* Get rid of base marker unless F_ALT */
- if (((arg->flags & F_ALT) == 0 &&
+ if (((alt) == 0 &&
(type == 'o' || type == 'x' || type == 'X'))) {
assert(buf[sign] == '0');
assert(buf[sign+1] == 'x' || buf[sign+1] == 'X' ||
@@ -14060,24 +14017,14 @@ mainformatlong(PyObject *v,
if (!PyNumber_Check(v))
goto wrongtype;
- /* make sure number is a type of integer */
- /* if not, issue deprecation warning for now */
+ /* make sure number is a type of integer for o, x, and X */
if (!PyLong_Check(v)) {
if (type == 'o' || type == 'x' || type == 'X') {
iobj = PyNumber_Index(v);
if (iobj == NULL) {
- PyErr_Clear();
- if (PyErr_WarnEx(PyExc_DeprecationWarning,
- "automatic int conversions have been deprecated",
- 1)) {
- return -1;
- }
- iobj = PyNumber_Long(v);
- if (iobj == NULL ) {
- if (PyErr_ExceptionMatches(PyExc_TypeError))
- goto wrongtype;
- return -1;
- }
+ if (PyErr_ExceptionMatches(PyExc_TypeError))
+ goto wrongtype;
+ return -1;
}
}
else {
@@ -14130,7 +14077,7 @@ mainformatlong(PyObject *v,
return 1;
}
- res = formatlong(iobj, arg);
+ res = _PyUnicode_FormatLong(iobj, arg->flags & F_ALT, arg->prec, type);
Py_DECREF(iobj);
if (res == NULL)
return -1;
@@ -14138,10 +14085,23 @@ mainformatlong(PyObject *v,
return 0;
wrongtype:
- PyErr_Format(PyExc_TypeError,
- "%%%c format: a number is required, "
- "not %.200s",
- type, Py_TYPE(v)->tp_name);
+ switch(type)
+ {
+ case 'o':
+ case 'x':
+ case 'X':
+ PyErr_Format(PyExc_TypeError,
+ "%%%c format: an integer is required, "
+ "not %.200s",
+ type, Py_TYPE(v)->tp_name);
+ break;
+ default:
+ PyErr_Format(PyExc_TypeError,
+ "%%%c format: a number is required, "
+ "not %.200s",
+ type, Py_TYPE(v)->tp_name);
+ break;
+ }
return -1;
}
@@ -14159,22 +14119,10 @@ formatchar(PyObject *v)
PyObject *iobj;
long x;
/* make sure number is a type of integer */
- /* if not, issue deprecation warning for now */
if (!PyLong_Check(v)) {
iobj = PyNumber_Index(v);
if (iobj == NULL) {
- PyErr_Clear();
- if (PyErr_WarnEx(PyExc_DeprecationWarning,
- "automatic int conversions have been deprecated",
- 1)) {
- return -1;
- }
- iobj = PyNumber_Long(v);
- if (iobj == NULL ) {
- if (PyErr_ExceptionMatches(PyExc_TypeError))
- goto onError;
- return -1;
- }
+ goto onError;
}
v = iobj;
Py_DECREF(iobj);
@@ -14249,8 +14197,8 @@ unicode_format_arg_parse(struct unicode_formatter_t *ctx,
if (key == NULL)
return -1;
if (ctx->args_owned) {
- Py_DECREF(ctx->args);
ctx->args_owned = 0;
+ Py_DECREF(ctx->args);
}
ctx->args = PyObject_GetItem(ctx->dict, key);
Py_DECREF(key);
@@ -15006,13 +14954,6 @@ int _PyUnicode_Init(void)
if (PyType_Ready(&PyFormatterIter_Type) < 0)
Py_FatalError("Can't initialize formatter iter type");
-#ifdef HAVE_MBCS
- winver.dwOSVersionInfoSize = sizeof(winver);
- if (!GetVersionEx((OSVERSIONINFO*)&winver)) {
- PyErr_SetFromWindowsErr(0);
- return -1;
- }
-#endif
return 0;
}
@@ -15071,8 +15012,7 @@ PyUnicode_InternInPlace(PyObject **p)
if (t) {
Py_INCREF(t);
- Py_DECREF(*p);
- *p = t;
+ Py_SETREF(*p, t);
return;
}
@@ -15209,8 +15149,8 @@ unicodeiter_next(unicodeiterobject *it)
return item;
}
- Py_DECREF(seq);
it->it_seq = NULL;
+ Py_DECREF(seq);
return NULL;
}
@@ -15428,7 +15368,7 @@ PyUnicode_AsUnicodeCopy(PyObject *unicode)
if (u == NULL)
return NULL;
/* Ensure we won't overflow the size. */
- if (len > ((PY_SSIZE_T_MAX / sizeof(Py_UNICODE)) - 1)) {
+ if (len > ((PY_SSIZE_T_MAX / (Py_ssize_t)sizeof(Py_UNICODE)) - 1)) {
PyErr_NoMemory();
return NULL;
}
diff --git a/Objects/unicodetype_db.h b/Objects/unicodetype_db.h
index 1fdc092a3d..7c780b6c04 100644
--- a/Objects/unicodetype_db.h
+++ b/Objects/unicodetype_db.h
@@ -82,25 +82,32 @@ const _PyUnicode_TypeRecord _PyUnicode_TypeRecords[] = {
{-205, 0, -205, 0, 0, 9993},
{-202, 0, -202, 0, 0, 9993},
{-203, 0, -203, 0, 0, 9993},
+ {42319, 0, 42319, 0, 0, 9993},
+ {42315, 0, 42315, 0, 0, 9993},
{-207, 0, -207, 0, 0, 9993},
{42280, 0, 42280, 0, 0, 9993},
{42308, 0, 42308, 0, 0, 9993},
{-209, 0, -209, 0, 0, 9993},
{-211, 0, -211, 0, 0, 9993},
{10743, 0, 10743, 0, 0, 9993},
+ {42305, 0, 42305, 0, 0, 9993},
{10749, 0, 10749, 0, 0, 9993},
{-213, 0, -213, 0, 0, 9993},
{-214, 0, -214, 0, 0, 9993},
{10727, 0, 10727, 0, 0, 9993},
{-218, 0, -218, 0, 0, 9993},
+ {42282, 0, 42282, 0, 0, 9993},
{-69, 0, -69, 0, 0, 9993},
{-217, 0, -217, 0, 0, 9993},
{-71, 0, -71, 0, 0, 9993},
{-219, 0, -219, 0, 0, 9993},
+ {42261, 0, 42261, 0, 0, 9993},
+ {42258, 0, 42258, 0, 0, 9993},
{0, 0, 0, 0, 0, 14089},
{0, 0, 0, 0, 0, 5889},
{16777244, 17825818, 16777244, 0, 0, 30216},
{0, 0, 0, 0, 0, 13321},
+ {0, 116, 0, 0, 0, 10113},
{0, 38, 0, 0, 0, 10113},
{0, 37, 0, 0, 0, 10113},
{0, 64, 0, 0, 0, 10113},
@@ -122,6 +129,7 @@ const _PyUnicode_TypeRecord _PyUnicode_TypeRecords[] = {
{16777276, 17825850, 16777276, 0, 0, 26377},
{16777279, 17825853, 16777279, 0, 0, 26377},
{7, 0, 7, 0, 0, 9993},
+ {-116, 0, -116, 0, 0, 9993},
{0, -60, 0, 0, 0, 10113},
{16777282, 17825856, 16777282, 0, 0, 26377},
{0, -7, 0, 0, 0, 10113},
@@ -143,110 +151,202 @@ const _PyUnicode_TypeRecord _PyUnicode_TypeRecords[] = {
{0, 0, 0, 0, 7, 3588},
{0, 0, 0, 0, 8, 3588},
{0, 0, 0, 0, 9, 3588},
+ {16777292, 17825866, 16777292, 0, 0, 26497},
+ {16777295, 17825869, 16777295, 0, 0, 26497},
+ {16777298, 17825872, 16777298, 0, 0, 26497},
+ {16777301, 17825875, 16777301, 0, 0, 26497},
+ {16777304, 17825878, 16777304, 0, 0, 26497},
+ {16777307, 17825881, 16777307, 0, 0, 26497},
+ {16777310, 17825884, 16777310, 0, 0, 26497},
+ {16777313, 17825887, 16777313, 0, 0, 26497},
+ {16777316, 17825890, 16777316, 0, 0, 26497},
+ {16777319, 17825893, 16777319, 0, 0, 26497},
+ {16777322, 17825896, 16777322, 0, 0, 26497},
+ {16777325, 17825899, 16777325, 0, 0, 26497},
+ {16777328, 17825902, 16777328, 0, 0, 26497},
+ {16777331, 17825905, 16777331, 0, 0, 26497},
+ {16777334, 17825908, 16777334, 0, 0, 26497},
+ {16777337, 17825911, 16777337, 0, 0, 26497},
+ {16777340, 17825914, 16777340, 0, 0, 26497},
+ {16777343, 17825917, 16777343, 0, 0, 26497},
+ {16777346, 17825920, 16777346, 0, 0, 26497},
+ {16777349, 17825923, 16777349, 0, 0, 26497},
+ {16777352, 17825926, 16777352, 0, 0, 26497},
+ {16777355, 17825929, 16777355, 0, 0, 26497},
+ {16777358, 17825932, 16777358, 0, 0, 26497},
+ {16777361, 17825935, 16777361, 0, 0, 26497},
+ {16777364, 17825938, 16777364, 0, 0, 26497},
+ {16777367, 17825941, 16777367, 0, 0, 26497},
+ {16777370, 17825944, 16777370, 0, 0, 26497},
+ {16777373, 17825947, 16777373, 0, 0, 26497},
+ {16777376, 17825950, 16777376, 0, 0, 26497},
+ {16777379, 17825953, 16777379, 0, 0, 26497},
+ {16777382, 17825956, 16777382, 0, 0, 26497},
+ {16777385, 17825959, 16777385, 0, 0, 26497},
+ {16777388, 17825962, 16777388, 0, 0, 26497},
+ {16777391, 17825965, 16777391, 0, 0, 26497},
+ {16777394, 17825968, 16777394, 0, 0, 26497},
+ {16777397, 17825971, 16777397, 0, 0, 26497},
+ {16777400, 17825974, 16777400, 0, 0, 26497},
+ {16777403, 17825977, 16777403, 0, 0, 26497},
+ {16777406, 17825980, 16777406, 0, 0, 26497},
+ {16777409, 17825983, 16777409, 0, 0, 26497},
+ {16777412, 17825986, 16777412, 0, 0, 26497},
+ {16777415, 17825989, 16777415, 0, 0, 26497},
+ {16777418, 17825992, 16777418, 0, 0, 26497},
+ {16777421, 17825995, 16777421, 0, 0, 26497},
+ {16777424, 17825998, 16777424, 0, 0, 26497},
+ {16777427, 17826001, 16777427, 0, 0, 26497},
+ {16777430, 17826004, 16777430, 0, 0, 26497},
+ {16777433, 17826007, 16777433, 0, 0, 26497},
+ {16777436, 17826010, 16777436, 0, 0, 26497},
+ {16777439, 17826013, 16777439, 0, 0, 26497},
+ {16777442, 17826016, 16777442, 0, 0, 26497},
+ {16777445, 17826019, 16777445, 0, 0, 26497},
+ {16777448, 17826022, 16777448, 0, 0, 26497},
+ {16777451, 17826025, 16777451, 0, 0, 26497},
+ {16777454, 17826028, 16777454, 0, 0, 26497},
+ {16777457, 17826031, 16777457, 0, 0, 26497},
+ {16777460, 17826034, 16777460, 0, 0, 26497},
+ {16777463, 17826037, 16777463, 0, 0, 26497},
+ {16777466, 17826040, 16777466, 0, 0, 26497},
+ {16777469, 17826043, 16777469, 0, 0, 26497},
+ {16777472, 17826046, 16777472, 0, 0, 26497},
+ {16777475, 17826049, 16777475, 0, 0, 26497},
+ {16777478, 17826052, 16777478, 0, 0, 26497},
+ {16777481, 17826055, 16777481, 0, 0, 26497},
+ {16777484, 17826058, 16777484, 0, 0, 26497},
+ {16777487, 17826061, 16777487, 0, 0, 26497},
+ {16777490, 17826064, 16777490, 0, 0, 26497},
+ {16777493, 17826067, 16777493, 0, 0, 26497},
+ {16777496, 17826070, 16777496, 0, 0, 26497},
+ {16777499, 17826073, 16777499, 0, 0, 26497},
+ {16777502, 17826076, 16777502, 0, 0, 26497},
+ {16777505, 17826079, 16777505, 0, 0, 26497},
+ {16777508, 17826082, 16777508, 0, 0, 26497},
+ {16777511, 17826085, 16777511, 0, 0, 26497},
+ {16777514, 17826088, 16777514, 0, 0, 26497},
+ {16777517, 17826091, 16777517, 0, 0, 26497},
+ {16777520, 17826094, 16777520, 0, 0, 26497},
+ {16777523, 17826097, 16777523, 0, 0, 26497},
+ {16777526, 17826100, 16777526, 0, 0, 26497},
+ {16777529, 17826103, 16777529, 0, 0, 26497},
+ {16777532, 17826106, 16777532, 0, 0, 26497},
+ {16777535, 17826109, 16777535, 0, 0, 26497},
+ {16777538, 17826112, 16777538, 0, 0, 26497},
+ {16777541, 17826115, 16777541, 0, 0, 26497},
+ {16777544, 17826118, 16777544, 0, 0, 26497},
+ {16777547, 17826121, 16777547, 0, 0, 26497},
+ {16777550, 17826124, 16777550, 0, 0, 26377},
+ {16777553, 17826127, 16777553, 0, 0, 26377},
+ {16777556, 17826130, 16777556, 0, 0, 26377},
+ {16777559, 17826133, 16777559, 0, 0, 26377},
+ {16777562, 17826136, 16777562, 0, 0, 26377},
+ {16777565, 17826139, 16777565, 0, 0, 26377},
{0, 0, 0, 0, 0, 3840},
{35332, 0, 35332, 0, 0, 9993},
{3814, 0, 3814, 0, 0, 9993},
- {33554509, 18874442, 33554509, 0, 0, 26377},
- {33554514, 18874447, 33554514, 0, 0, 26377},
- {33554519, 18874452, 33554519, 0, 0, 26377},
- {33554524, 18874457, 33554524, 0, 0, 26377},
- {33554529, 18874462, 33554529, 0, 0, 26377},
- {16777317, 17825891, 16777317, 0, 0, 26377},
- {16777321, 18874470, 16777321, 0, 0, 26497},
+ {33554785, 18874718, 33554785, 0, 0, 26377},
+ {33554790, 18874723, 33554790, 0, 0, 26377},
+ {33554795, 18874728, 33554795, 0, 0, 26377},
+ {33554800, 18874733, 33554800, 0, 0, 26377},
+ {33554805, 18874738, 33554805, 0, 0, 26377},
+ {16777593, 17826167, 16777593, 0, 0, 26377},
+ {16777597, 18874746, 16777597, 0, 0, 26497},
{8, 0, 8, 0, 0, 9993},
{0, -8, 0, 0, 0, 10113},
- {33554541, 18874474, 33554541, 0, 0, 26377},
- {50331763, 19923055, 50331763, 0, 0, 26377},
- {50331770, 19923062, 50331770, 0, 0, 26377},
- {50331777, 19923069, 50331777, 0, 0, 26377},
+ {33554817, 18874750, 33554817, 0, 0, 26377},
+ {50332039, 19923331, 50332039, 0, 0, 26377},
+ {50332046, 19923338, 50332046, 0, 0, 26377},
+ {50332053, 19923345, 50332053, 0, 0, 26377},
{74, 0, 74, 0, 0, 9993},
{86, 0, 86, 0, 0, 9993},
{100, 0, 100, 0, 0, 9993},
{128, 0, 128, 0, 0, 9993},
{112, 0, 112, 0, 0, 9993},
{126, 0, 126, 0, 0, 9993},
- {33554567, 18874500, 16777353, 0, 0, 26377},
- {33554573, 18874506, 16777359, 0, 0, 26377},
- {33554579, 18874512, 16777365, 0, 0, 26377},
- {33554585, 18874518, 16777371, 0, 0, 26377},
- {33554591, 18874524, 16777377, 0, 0, 26377},
- {33554597, 18874530, 16777383, 0, 0, 26377},
- {33554603, 18874536, 16777389, 0, 0, 26377},
- {33554609, 18874542, 16777395, 0, 0, 26377},
- {33554615, 18874548, 16777401, 0, 0, 26433},
- {33554621, 18874554, 16777407, 0, 0, 26433},
- {33554627, 18874560, 16777413, 0, 0, 26433},
- {33554633, 18874566, 16777419, 0, 0, 26433},
- {33554639, 18874572, 16777425, 0, 0, 26433},
- {33554645, 18874578, 16777431, 0, 0, 26433},
- {33554651, 18874584, 16777437, 0, 0, 26433},
- {33554657, 18874590, 16777443, 0, 0, 26433},
- {33554663, 18874596, 16777449, 0, 0, 26377},
- {33554669, 18874602, 16777455, 0, 0, 26377},
- {33554675, 18874608, 16777461, 0, 0, 26377},
- {33554681, 18874614, 16777467, 0, 0, 26377},
- {33554687, 18874620, 16777473, 0, 0, 26377},
- {33554693, 18874626, 16777479, 0, 0, 26377},
- {33554699, 18874632, 16777485, 0, 0, 26377},
- {33554705, 18874638, 16777491, 0, 0, 26377},
- {33554711, 18874644, 16777497, 0, 0, 26433},
- {33554717, 18874650, 16777503, 0, 0, 26433},
- {33554723, 18874656, 16777509, 0, 0, 26433},
- {33554729, 18874662, 16777515, 0, 0, 26433},
- {33554735, 18874668, 16777521, 0, 0, 26433},
- {33554741, 18874674, 16777527, 0, 0, 26433},
- {33554747, 18874680, 16777533, 0, 0, 26433},
- {33554753, 18874686, 16777539, 0, 0, 26433},
- {33554759, 18874692, 16777545, 0, 0, 26377},
- {33554765, 18874698, 16777551, 0, 0, 26377},
- {33554771, 18874704, 16777557, 0, 0, 26377},
- {33554777, 18874710, 16777563, 0, 0, 26377},
- {33554783, 18874716, 16777569, 0, 0, 26377},
- {33554789, 18874722, 16777575, 0, 0, 26377},
- {33554795, 18874728, 16777581, 0, 0, 26377},
- {33554801, 18874734, 16777587, 0, 0, 26377},
- {33554807, 18874740, 16777593, 0, 0, 26433},
- {33554813, 18874746, 16777599, 0, 0, 26433},
- {33554819, 18874752, 16777605, 0, 0, 26433},
- {33554825, 18874758, 16777611, 0, 0, 26433},
- {33554831, 18874764, 16777617, 0, 0, 26433},
- {33554837, 18874770, 16777623, 0, 0, 26433},
- {33554843, 18874776, 16777629, 0, 0, 26433},
- {33554849, 18874782, 16777635, 0, 0, 26433},
- {33554855, 18874788, 33554857, 0, 0, 26377},
- {33554862, 18874795, 16777648, 0, 0, 26377},
- {33554868, 18874801, 33554870, 0, 0, 26377},
- {33554875, 18874808, 33554875, 0, 0, 26377},
- {50332097, 19923389, 50332100, 0, 0, 26377},
+ {33554843, 18874776, 16777629, 0, 0, 26377},
+ {33554849, 18874782, 16777635, 0, 0, 26377},
+ {33554855, 18874788, 16777641, 0, 0, 26377},
+ {33554861, 18874794, 16777647, 0, 0, 26377},
+ {33554867, 18874800, 16777653, 0, 0, 26377},
+ {33554873, 18874806, 16777659, 0, 0, 26377},
+ {33554879, 18874812, 16777665, 0, 0, 26377},
+ {33554885, 18874818, 16777671, 0, 0, 26377},
+ {33554891, 18874824, 16777677, 0, 0, 26433},
+ {33554897, 18874830, 16777683, 0, 0, 26433},
+ {33554903, 18874836, 16777689, 0, 0, 26433},
+ {33554909, 18874842, 16777695, 0, 0, 26433},
+ {33554915, 18874848, 16777701, 0, 0, 26433},
+ {33554921, 18874854, 16777707, 0, 0, 26433},
+ {33554927, 18874860, 16777713, 0, 0, 26433},
+ {33554933, 18874866, 16777719, 0, 0, 26433},
+ {33554939, 18874872, 16777725, 0, 0, 26377},
+ {33554945, 18874878, 16777731, 0, 0, 26377},
+ {33554951, 18874884, 16777737, 0, 0, 26377},
+ {33554957, 18874890, 16777743, 0, 0, 26377},
+ {33554963, 18874896, 16777749, 0, 0, 26377},
+ {33554969, 18874902, 16777755, 0, 0, 26377},
+ {33554975, 18874908, 16777761, 0, 0, 26377},
+ {33554981, 18874914, 16777767, 0, 0, 26377},
+ {33554987, 18874920, 16777773, 0, 0, 26433},
+ {33554993, 18874926, 16777779, 0, 0, 26433},
+ {33554999, 18874932, 16777785, 0, 0, 26433},
+ {33555005, 18874938, 16777791, 0, 0, 26433},
+ {33555011, 18874944, 16777797, 0, 0, 26433},
+ {33555017, 18874950, 16777803, 0, 0, 26433},
+ {33555023, 18874956, 16777809, 0, 0, 26433},
+ {33555029, 18874962, 16777815, 0, 0, 26433},
+ {33555035, 18874968, 16777821, 0, 0, 26377},
+ {33555041, 18874974, 16777827, 0, 0, 26377},
+ {33555047, 18874980, 16777833, 0, 0, 26377},
+ {33555053, 18874986, 16777839, 0, 0, 26377},
+ {33555059, 18874992, 16777845, 0, 0, 26377},
+ {33555065, 18874998, 16777851, 0, 0, 26377},
+ {33555071, 18875004, 16777857, 0, 0, 26377},
+ {33555077, 18875010, 16777863, 0, 0, 26377},
+ {33555083, 18875016, 16777869, 0, 0, 26433},
+ {33555089, 18875022, 16777875, 0, 0, 26433},
+ {33555095, 18875028, 16777881, 0, 0, 26433},
+ {33555101, 18875034, 16777887, 0, 0, 26433},
+ {33555107, 18875040, 16777893, 0, 0, 26433},
+ {33555113, 18875046, 16777899, 0, 0, 26433},
+ {33555119, 18875052, 16777905, 0, 0, 26433},
+ {33555125, 18875058, 16777911, 0, 0, 26433},
+ {33555131, 18875064, 33555133, 0, 0, 26377},
+ {33555138, 18875071, 16777924, 0, 0, 26377},
+ {33555144, 18875077, 33555146, 0, 0, 26377},
+ {33555151, 18875084, 33555151, 0, 0, 26377},
+ {50332373, 19923665, 50332376, 0, 0, 26377},
{0, -74, 0, 0, 0, 10113},
- {33554890, 18874823, 16777676, 0, 0, 26433},
- {16777679, 17826253, 16777679, 0, 0, 26377},
- {33554899, 18874832, 33554901, 0, 0, 26377},
- {33554906, 18874839, 16777692, 0, 0, 26377},
- {33554912, 18874845, 33554914, 0, 0, 26377},
- {33554919, 18874852, 33554919, 0, 0, 26377},
- {50332141, 19923433, 50332144, 0, 0, 26377},
+ {33555166, 18875099, 16777952, 0, 0, 26433},
+ {16777955, 17826529, 16777955, 0, 0, 26377},
+ {33555175, 18875108, 33555177, 0, 0, 26377},
+ {33555182, 18875115, 16777968, 0, 0, 26377},
+ {33555188, 18875121, 33555190, 0, 0, 26377},
+ {33555195, 18875128, 33555195, 0, 0, 26377},
+ {50332417, 19923709, 50332420, 0, 0, 26377},
{0, -86, 0, 0, 0, 10113},
- {33554934, 18874867, 16777720, 0, 0, 26433},
- {50332157, 19923449, 50332157, 0, 0, 26377},
- {50332164, 19923456, 50332164, 0, 0, 26377},
- {33554954, 18874887, 33554954, 0, 0, 26377},
- {50332176, 19923468, 50332176, 0, 0, 26377},
+ {33555210, 18875143, 16777996, 0, 0, 26433},
+ {50332433, 19923725, 50332433, 0, 0, 26377},
+ {50332440, 19923732, 50332440, 0, 0, 26377},
+ {33555230, 18875163, 33555230, 0, 0, 26377},
+ {50332452, 19923744, 50332452, 0, 0, 26377},
{0, -100, 0, 0, 0, 10113},
- {50332183, 19923475, 50332183, 0, 0, 26377},
- {50332190, 19923482, 50332190, 0, 0, 26377},
- {33554980, 18874913, 33554980, 0, 0, 26377},
- {33554985, 18874918, 33554985, 0, 0, 26377},
- {50332207, 19923499, 50332207, 0, 0, 26377},
+ {50332459, 19923751, 50332459, 0, 0, 26377},
+ {50332466, 19923758, 50332466, 0, 0, 26377},
+ {33555256, 18875189, 33555256, 0, 0, 26377},
+ {33555261, 18875194, 33555261, 0, 0, 26377},
+ {50332483, 19923775, 50332483, 0, 0, 26377},
{0, -112, 0, 0, 0, 10113},
- {33554997, 18874930, 33554999, 0, 0, 26377},
- {33555004, 18874937, 16777790, 0, 0, 26377},
- {33555010, 18874943, 33555012, 0, 0, 26377},
- {33555017, 18874950, 33555017, 0, 0, 26377},
- {50332239, 19923531, 50332242, 0, 0, 26377},
+ {33555273, 18875206, 33555275, 0, 0, 26377},
+ {33555280, 18875213, 16778066, 0, 0, 26377},
+ {33555286, 18875219, 33555288, 0, 0, 26377},
+ {33555293, 18875226, 33555293, 0, 0, 26377},
+ {50332515, 19923807, 50332518, 0, 0, 26377},
{0, -128, 0, 0, 0, 10113},
{0, -126, 0, 0, 0, 10113},
- {33555032, 18874965, 16777818, 0, 0, 26433},
+ {33555308, 18875241, 16778094, 0, 0, 26433},
{0, 0, 0, 0, 0, 3076},
{0, 0, 0, 0, 4, 3076},
{0, 0, 0, 0, 5, 3076},
@@ -280,22 +380,111 @@ const _PyUnicode_TypeRecord _PyUnicode_TypeRecords[] = {
{0, -35332, 0, 0, 0, 10113},
{0, -42280, 0, 0, 0, 10113},
{0, -42308, 0, 0, 0, 10113},
- {33555038, 18874971, 33555040, 0, 0, 26377},
- {33555045, 18874978, 33555047, 0, 0, 26377},
- {33555052, 18874985, 33555054, 0, 0, 26377},
- {50332276, 19923568, 50332279, 0, 0, 26377},
- {50332286, 19923578, 50332289, 0, 0, 26377},
- {33555079, 18875012, 33555081, 0, 0, 26377},
- {33555086, 18875019, 33555088, 0, 0, 26377},
- {33555093, 18875026, 33555095, 0, 0, 26377},
- {33555100, 18875033, 33555102, 0, 0, 26377},
- {33555107, 18875040, 33555109, 0, 0, 26377},
- {33555114, 18875047, 33555116, 0, 0, 26377},
- {33555121, 18875054, 33555123, 0, 0, 26377},
+ {0, -42319, 0, 0, 0, 10113},
+ {0, -42315, 0, 0, 0, 10113},
+ {0, -42305, 0, 0, 0, 10113},
+ {0, -42258, 0, 0, 0, 10113},
+ {0, -42282, 0, 0, 0, 10113},
+ {0, -42261, 0, 0, 0, 10113},
+ {0, 928, 0, 0, 0, 10113},
+ {-928, 0, -928, 0, 0, 9993},
+ {16778097, 17826671, 16778097, 0, 0, 26377},
+ {16778100, 17826674, 16778100, 0, 0, 26377},
+ {16778103, 17826677, 16778103, 0, 0, 26377},
+ {16778106, 17826680, 16778106, 0, 0, 26377},
+ {16778109, 17826683, 16778109, 0, 0, 26377},
+ {16778112, 17826686, 16778112, 0, 0, 26377},
+ {16778115, 17826689, 16778115, 0, 0, 26377},
+ {16778118, 17826692, 16778118, 0, 0, 26377},
+ {16778121, 17826695, 16778121, 0, 0, 26377},
+ {16778124, 17826698, 16778124, 0, 0, 26377},
+ {16778127, 17826701, 16778127, 0, 0, 26377},
+ {16778130, 17826704, 16778130, 0, 0, 26377},
+ {16778133, 17826707, 16778133, 0, 0, 26377},
+ {16778136, 17826710, 16778136, 0, 0, 26377},
+ {16778139, 17826713, 16778139, 0, 0, 26377},
+ {16778142, 17826716, 16778142, 0, 0, 26377},
+ {16778145, 17826719, 16778145, 0, 0, 26377},
+ {16778148, 17826722, 16778148, 0, 0, 26377},
+ {16778151, 17826725, 16778151, 0, 0, 26377},
+ {16778154, 17826728, 16778154, 0, 0, 26377},
+ {16778157, 17826731, 16778157, 0, 0, 26377},
+ {16778160, 17826734, 16778160, 0, 0, 26377},
+ {16778163, 17826737, 16778163, 0, 0, 26377},
+ {16778166, 17826740, 16778166, 0, 0, 26377},
+ {16778169, 17826743, 16778169, 0, 0, 26377},
+ {16778172, 17826746, 16778172, 0, 0, 26377},
+ {16778175, 17826749, 16778175, 0, 0, 26377},
+ {16778178, 17826752, 16778178, 0, 0, 26377},
+ {16778181, 17826755, 16778181, 0, 0, 26377},
+ {16778184, 17826758, 16778184, 0, 0, 26377},
+ {16778187, 17826761, 16778187, 0, 0, 26377},
+ {16778190, 17826764, 16778190, 0, 0, 26377},
+ {16778193, 17826767, 16778193, 0, 0, 26377},
+ {16778196, 17826770, 16778196, 0, 0, 26377},
+ {16778199, 17826773, 16778199, 0, 0, 26377},
+ {16778202, 17826776, 16778202, 0, 0, 26377},
+ {16778205, 17826779, 16778205, 0, 0, 26377},
+ {16778208, 17826782, 16778208, 0, 0, 26377},
+ {16778211, 17826785, 16778211, 0, 0, 26377},
+ {16778214, 17826788, 16778214, 0, 0, 26377},
+ {16778217, 17826791, 16778217, 0, 0, 26377},
+ {16778220, 17826794, 16778220, 0, 0, 26377},
+ {16778223, 17826797, 16778223, 0, 0, 26377},
+ {16778226, 17826800, 16778226, 0, 0, 26377},
+ {16778229, 17826803, 16778229, 0, 0, 26377},
+ {16778232, 17826806, 16778232, 0, 0, 26377},
+ {16778235, 17826809, 16778235, 0, 0, 26377},
+ {16778238, 17826812, 16778238, 0, 0, 26377},
+ {16778241, 17826815, 16778241, 0, 0, 26377},
+ {16778244, 17826818, 16778244, 0, 0, 26377},
+ {16778247, 17826821, 16778247, 0, 0, 26377},
+ {16778250, 17826824, 16778250, 0, 0, 26377},
+ {16778253, 17826827, 16778253, 0, 0, 26377},
+ {16778256, 17826830, 16778256, 0, 0, 26377},
+ {16778259, 17826833, 16778259, 0, 0, 26377},
+ {16778262, 17826836, 16778262, 0, 0, 26377},
+ {16778265, 17826839, 16778265, 0, 0, 26377},
+ {16778268, 17826842, 16778268, 0, 0, 26377},
+ {16778271, 17826845, 16778271, 0, 0, 26377},
+ {16778274, 17826848, 16778274, 0, 0, 26377},
+ {16778277, 17826851, 16778277, 0, 0, 26377},
+ {16778280, 17826854, 16778280, 0, 0, 26377},
+ {16778283, 17826857, 16778283, 0, 0, 26377},
+ {16778286, 17826860, 16778286, 0, 0, 26377},
+ {16778289, 17826863, 16778289, 0, 0, 26377},
+ {16778292, 17826866, 16778292, 0, 0, 26377},
+ {16778295, 17826869, 16778295, 0, 0, 26377},
+ {16778298, 17826872, 16778298, 0, 0, 26377},
+ {16778301, 17826875, 16778301, 0, 0, 26377},
+ {16778304, 17826878, 16778304, 0, 0, 26377},
+ {16778307, 17826881, 16778307, 0, 0, 26377},
+ {16778310, 17826884, 16778310, 0, 0, 26377},
+ {16778313, 17826887, 16778313, 0, 0, 26377},
+ {16778316, 17826890, 16778316, 0, 0, 26377},
+ {16778319, 17826893, 16778319, 0, 0, 26377},
+ {16778322, 17826896, 16778322, 0, 0, 26377},
+ {16778325, 17826899, 16778325, 0, 0, 26377},
+ {16778328, 17826902, 16778328, 0, 0, 26377},
+ {16778331, 17826905, 16778331, 0, 0, 26377},
+ {16778334, 17826908, 16778334, 0, 0, 26377},
+ {33555554, 18875487, 33555556, 0, 0, 26377},
+ {33555561, 18875494, 33555563, 0, 0, 26377},
+ {33555568, 18875501, 33555570, 0, 0, 26377},
+ {50332792, 19924084, 50332795, 0, 0, 26377},
+ {50332802, 19924094, 50332805, 0, 0, 26377},
+ {33555595, 18875528, 33555597, 0, 0, 26377},
+ {33555602, 18875535, 33555604, 0, 0, 26377},
+ {33555609, 18875542, 33555611, 0, 0, 26377},
+ {33555616, 18875549, 33555618, 0, 0, 26377},
+ {33555623, 18875556, 33555625, 0, 0, 26377},
+ {33555630, 18875563, 33555632, 0, 0, 26377},
+ {33555637, 18875570, 33555639, 0, 0, 26377},
{0, 0, 0, 0, 0, 1025},
{0, 0, 0, 0, 0, 5633},
{0, 40, 0, 0, 0, 10113},
{-40, 0, -40, 0, 0, 9993},
+ {0, 0, 0, 0, 0, 9344},
};
/* extended case mappings */
@@ -375,6 +564,282 @@ const Py_UCS4 _PyUnicode_ExtendedCase[] = {
1362,
1333,
1410,
+ 43888,
+ 5024,
+ 5024,
+ 43889,
+ 5025,
+ 5025,
+ 43890,
+ 5026,
+ 5026,
+ 43891,
+ 5027,
+ 5027,
+ 43892,
+ 5028,
+ 5028,
+ 43893,
+ 5029,
+ 5029,
+ 43894,
+ 5030,
+ 5030,
+ 43895,
+ 5031,
+ 5031,
+ 43896,
+ 5032,
+ 5032,
+ 43897,
+ 5033,
+ 5033,
+ 43898,
+ 5034,
+ 5034,
+ 43899,
+ 5035,
+ 5035,
+ 43900,
+ 5036,
+ 5036,
+ 43901,
+ 5037,
+ 5037,
+ 43902,
+ 5038,
+ 5038,
+ 43903,
+ 5039,
+ 5039,
+ 43904,
+ 5040,
+ 5040,
+ 43905,
+ 5041,
+ 5041,
+ 43906,
+ 5042,
+ 5042,
+ 43907,
+ 5043,
+ 5043,
+ 43908,
+ 5044,
+ 5044,
+ 43909,
+ 5045,
+ 5045,
+ 43910,
+ 5046,
+ 5046,
+ 43911,
+ 5047,
+ 5047,
+ 43912,
+ 5048,
+ 5048,
+ 43913,
+ 5049,
+ 5049,
+ 43914,
+ 5050,
+ 5050,
+ 43915,
+ 5051,
+ 5051,
+ 43916,
+ 5052,
+ 5052,
+ 43917,
+ 5053,
+ 5053,
+ 43918,
+ 5054,
+ 5054,
+ 43919,
+ 5055,
+ 5055,
+ 43920,
+ 5056,
+ 5056,
+ 43921,
+ 5057,
+ 5057,
+ 43922,
+ 5058,
+ 5058,
+ 43923,
+ 5059,
+ 5059,
+ 43924,
+ 5060,
+ 5060,
+ 43925,
+ 5061,
+ 5061,
+ 43926,
+ 5062,
+ 5062,
+ 43927,
+ 5063,
+ 5063,
+ 43928,
+ 5064,
+ 5064,
+ 43929,
+ 5065,
+ 5065,
+ 43930,
+ 5066,
+ 5066,
+ 43931,
+ 5067,
+ 5067,
+ 43932,
+ 5068,
+ 5068,
+ 43933,
+ 5069,
+ 5069,
+ 43934,
+ 5070,
+ 5070,
+ 43935,
+ 5071,
+ 5071,
+ 43936,
+ 5072,
+ 5072,
+ 43937,
+ 5073,
+ 5073,
+ 43938,
+ 5074,
+ 5074,
+ 43939,
+ 5075,
+ 5075,
+ 43940,
+ 5076,
+ 5076,
+ 43941,
+ 5077,
+ 5077,
+ 43942,
+ 5078,
+ 5078,
+ 43943,
+ 5079,
+ 5079,
+ 43944,
+ 5080,
+ 5080,
+ 43945,
+ 5081,
+ 5081,
+ 43946,
+ 5082,
+ 5082,
+ 43947,
+ 5083,
+ 5083,
+ 43948,
+ 5084,
+ 5084,
+ 43949,
+ 5085,
+ 5085,
+ 43950,
+ 5086,
+ 5086,
+ 43951,
+ 5087,
+ 5087,
+ 43952,
+ 5088,
+ 5088,
+ 43953,
+ 5089,
+ 5089,
+ 43954,
+ 5090,
+ 5090,
+ 43955,
+ 5091,
+ 5091,
+ 43956,
+ 5092,
+ 5092,
+ 43957,
+ 5093,
+ 5093,
+ 43958,
+ 5094,
+ 5094,
+ 43959,
+ 5095,
+ 5095,
+ 43960,
+ 5096,
+ 5096,
+ 43961,
+ 5097,
+ 5097,
+ 43962,
+ 5098,
+ 5098,
+ 43963,
+ 5099,
+ 5099,
+ 43964,
+ 5100,
+ 5100,
+ 43965,
+ 5101,
+ 5101,
+ 43966,
+ 5102,
+ 5102,
+ 43967,
+ 5103,
+ 5103,
+ 5112,
+ 5104,
+ 5104,
+ 5113,
+ 5105,
+ 5105,
+ 5114,
+ 5106,
+ 5106,
+ 5115,
+ 5107,
+ 5107,
+ 5116,
+ 5108,
+ 5108,
+ 5117,
+ 5109,
+ 5109,
+ 5112,
+ 5104,
+ 5104,
+ 5113,
+ 5105,
+ 5105,
+ 5114,
+ 5106,
+ 5106,
+ 5115,
+ 5107,
+ 5107,
+ 5116,
+ 5108,
+ 5108,
+ 5117,
+ 5109,
+ 5109,
7830,
104,
817,
@@ -904,6 +1369,246 @@ const Py_UCS4 _PyUnicode_ExtendedCase[] = {
937,
921,
8188,
+ 43888,
+ 5024,
+ 5024,
+ 43889,
+ 5025,
+ 5025,
+ 43890,
+ 5026,
+ 5026,
+ 43891,
+ 5027,
+ 5027,
+ 43892,
+ 5028,
+ 5028,
+ 43893,
+ 5029,
+ 5029,
+ 43894,
+ 5030,
+ 5030,
+ 43895,
+ 5031,
+ 5031,
+ 43896,
+ 5032,
+ 5032,
+ 43897,
+ 5033,
+ 5033,
+ 43898,
+ 5034,
+ 5034,
+ 43899,
+ 5035,
+ 5035,
+ 43900,
+ 5036,
+ 5036,
+ 43901,
+ 5037,
+ 5037,
+ 43902,
+ 5038,
+ 5038,
+ 43903,
+ 5039,
+ 5039,
+ 43904,
+ 5040,
+ 5040,
+ 43905,
+ 5041,
+ 5041,
+ 43906,
+ 5042,
+ 5042,
+ 43907,
+ 5043,
+ 5043,
+ 43908,
+ 5044,
+ 5044,
+ 43909,
+ 5045,
+ 5045,
+ 43910,
+ 5046,
+ 5046,
+ 43911,
+ 5047,
+ 5047,
+ 43912,
+ 5048,
+ 5048,
+ 43913,
+ 5049,
+ 5049,
+ 43914,
+ 5050,
+ 5050,
+ 43915,
+ 5051,
+ 5051,
+ 43916,
+ 5052,
+ 5052,
+ 43917,
+ 5053,
+ 5053,
+ 43918,
+ 5054,
+ 5054,
+ 43919,
+ 5055,
+ 5055,
+ 43920,
+ 5056,
+ 5056,
+ 43921,
+ 5057,
+ 5057,
+ 43922,
+ 5058,
+ 5058,
+ 43923,
+ 5059,
+ 5059,
+ 43924,
+ 5060,
+ 5060,
+ 43925,
+ 5061,
+ 5061,
+ 43926,
+ 5062,
+ 5062,
+ 43927,
+ 5063,
+ 5063,
+ 43928,
+ 5064,
+ 5064,
+ 43929,
+ 5065,
+ 5065,
+ 43930,
+ 5066,
+ 5066,
+ 43931,
+ 5067,
+ 5067,
+ 43932,
+ 5068,
+ 5068,
+ 43933,
+ 5069,
+ 5069,
+ 43934,
+ 5070,
+ 5070,
+ 43935,
+ 5071,
+ 5071,
+ 43936,
+ 5072,
+ 5072,
+ 43937,
+ 5073,
+ 5073,
+ 43938,
+ 5074,
+ 5074,
+ 43939,
+ 5075,
+ 5075,
+ 43940,
+ 5076,
+ 5076,
+ 43941,
+ 5077,
+ 5077,
+ 43942,
+ 5078,
+ 5078,
+ 43943,
+ 5079,
+ 5079,
+ 43944,
+ 5080,
+ 5080,
+ 43945,
+ 5081,
+ 5081,
+ 43946,
+ 5082,
+ 5082,
+ 43947,
+ 5083,
+ 5083,
+ 43948,
+ 5084,
+ 5084,
+ 43949,
+ 5085,
+ 5085,
+ 43950,
+ 5086,
+ 5086,
+ 43951,
+ 5087,
+ 5087,
+ 43952,
+ 5088,
+ 5088,
+ 43953,
+ 5089,
+ 5089,
+ 43954,
+ 5090,
+ 5090,
+ 43955,
+ 5091,
+ 5091,
+ 43956,
+ 5092,
+ 5092,
+ 43957,
+ 5093,
+ 5093,
+ 43958,
+ 5094,
+ 5094,
+ 43959,
+ 5095,
+ 5095,
+ 43960,
+ 5096,
+ 5096,
+ 43961,
+ 5097,
+ 5097,
+ 43962,
+ 5098,
+ 5098,
+ 43963,
+ 5099,
+ 5099,
+ 43964,
+ 5100,
+ 5100,
+ 43965,
+ 5101,
+ 5101,
+ 43966,
+ 5102,
+ 5102,
+ 43967,
+ 5103,
+ 5103,
64256,
102,
102,
@@ -1029,405 +1734,511 @@ static unsigned char index1[] = {
127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 128, 129, 130,
131, 132, 133, 134, 34, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
- 71, 145, 146, 147, 148, 149, 71, 71, 71, 71, 71, 71, 150, 71, 151, 152,
- 153, 71, 154, 71, 155, 71, 71, 71, 156, 71, 71, 71, 157, 158, 159, 160,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 161, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 34, 34, 34, 34, 34, 34, 162, 71,
- 163, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 34, 34, 34, 34, 34, 34, 34, 34, 164, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 34, 34, 34, 34, 165, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 166, 167, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 168, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 64, 169, 170, 171, 172, 71, 173, 71, 174, 175, 176, 177, 178,
- 179, 180, 181, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 182, 183, 71, 71, 184,
- 185, 186, 187, 188, 71, 189, 190, 191, 192, 193, 194, 195, 196, 65, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 197, 198,
- 199, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 87, 200,
- 34, 201, 202, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 145, 146, 147, 148, 149, 150, 151, 145, 34, 34, 152, 145, 153, 154, 155,
+ 156, 157, 158, 159, 160, 161, 162, 145, 145, 163, 145, 145, 145, 164,
+ 165, 166, 167, 168, 169, 170, 145, 145, 171, 145, 172, 173, 174, 175,
+ 145, 145, 176, 145, 145, 145, 177, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 34, 34, 34, 34, 34, 34, 34, 178, 179, 34, 180, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 34, 34, 34, 34, 34, 34, 34, 34, 181, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 34, 34, 34, 34, 182, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 34, 34, 34, 34, 183, 184, 185, 186, 145, 145, 145, 145, 145,
+ 145, 187, 188, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 189, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 190, 191, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 64, 192,
+ 193, 194, 195, 145, 196, 145, 197, 198, 199, 200, 201, 202, 203, 204, 64,
+ 64, 64, 64, 205, 206, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 34, 207, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 208,
+ 209, 145, 145, 210, 211, 212, 213, 214, 145, 64, 215, 64, 64, 216, 217,
+ 64, 218, 219, 220, 221, 222, 223, 224, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 225, 226, 227, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 87, 228, 34, 229, 230, 34, 34, 34, 34, 34,
34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
- 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 203, 34, 34,
- 34, 34, 34, 34, 34, 34, 34, 34, 34, 204, 34, 34, 34, 34, 34, 34, 34, 34,
34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
- 34, 34, 34, 34, 34, 34, 34, 34, 205, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 231, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 232, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 233, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
- 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 206, 34, 34, 34,
34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 234, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
- 34, 34, 34, 34, 34, 34, 34, 207, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 235,
34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
- 34, 34, 34, 34, 208, 34, 209, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 34, 203, 34, 34, 209, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 210, 71, 211, 212, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 127, 127, 127, 127,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 236, 34, 237, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
+ 34, 34, 34, 34, 34, 34, 34, 238, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 34, 231, 34, 34, 239, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 240, 145, 241, 242, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145,
+ 145, 145, 145, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
@@ -1463,8 +2274,8 @@ static unsigned char index1[] = {
127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
+ 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 243, 127, 127, 127,
127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
- 127, 127, 127, 213, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
@@ -1500,7 +2311,7 @@ static unsigned char index1[] = {
127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
- 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 213,
+ 127, 127, 127, 127, 243,
};
static unsigned short index2[] = {
@@ -1535,204 +2346,204 @@ static unsigned short index2[] = {
31, 30, 31, 30, 31, 30, 31, 30, 31, 64, 20, 30, 31, 30, 31, 30, 31, 30,
31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 20, 20, 20, 20, 20, 20, 65,
30, 31, 66, 67, 68, 68, 30, 31, 69, 70, 71, 30, 31, 30, 31, 30, 31, 30,
- 31, 30, 31, 72, 73, 74, 75, 76, 20, 77, 77, 20, 78, 20, 79, 20, 20, 20,
- 20, 77, 20, 20, 80, 20, 81, 82, 20, 83, 84, 20, 85, 20, 20, 20, 84, 20,
- 86, 87, 20, 20, 88, 20, 20, 20, 20, 20, 20, 20, 89, 20, 20, 90, 20, 20,
- 90, 20, 20, 20, 20, 90, 91, 92, 92, 93, 20, 20, 20, 20, 20, 94, 20, 55,
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 95, 95, 95, 95, 95, 95, 95, 95, 95,
- 96, 96, 96, 96, 96, 96, 96, 95, 95, 6, 6, 6, 6, 96, 96, 96, 96, 96, 96,
- 96, 96, 96, 96, 96, 96, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 95, 95,
- 95, 95, 95, 6, 6, 6, 6, 6, 6, 6, 96, 6, 96, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 31, 30, 31, 72, 73, 74, 75, 76, 20, 77, 77, 20, 78, 20, 79, 80, 20, 20,
+ 20, 77, 81, 20, 82, 20, 83, 84, 20, 85, 86, 20, 87, 88, 20, 20, 86, 20,
+ 89, 90, 20, 20, 91, 20, 20, 20, 20, 20, 20, 20, 92, 20, 20, 93, 20, 20,
+ 93, 20, 20, 20, 94, 93, 95, 96, 96, 97, 20, 20, 20, 20, 20, 98, 20, 55,
+ 20, 20, 20, 20, 20, 20, 20, 20, 99, 100, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 101, 101, 101, 101, 101, 101, 101,
+ 101, 101, 102, 102, 102, 102, 102, 102, 102, 101, 101, 6, 6, 6, 6, 102,
+ 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 101, 101, 101, 101, 101, 6, 6, 6, 6, 6, 6, 6,
+ 102, 6, 102, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 103, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
- 25, 25, 97, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
- 25, 25, 25, 25, 25, 25, 25, 25, 25, 30, 31, 30, 31, 96, 6, 30, 31, 0, 0,
- 98, 50, 50, 50, 5, 0, 0, 0, 0, 0, 6, 6, 99, 25, 100, 100, 100, 0, 101, 0,
- 102, 102, 103, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 0, 17, 17, 17, 17, 17, 17, 17, 17, 17, 104, 105, 105, 105,
- 106, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 107, 19, 19, 19, 19, 19, 19, 19, 19, 19, 108, 109, 109, 110, 111, 112,
- 113, 113, 113, 114, 115, 116, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30,
- 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 117, 118, 119, 20,
- 120, 121, 5, 30, 31, 122, 30, 31, 20, 64, 64, 64, 123, 123, 123, 123,
- 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 17, 17, 17,
+ 25, 25, 30, 31, 30, 31, 102, 6, 30, 31, 0, 0, 104, 50, 50, 50, 5, 105, 0,
+ 0, 0, 0, 6, 6, 106, 25, 107, 107, 107, 0, 108, 0, 109, 109, 110, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 0, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 111, 112, 112, 112, 113, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 114, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 115, 116, 116, 117, 118, 119, 120, 120, 120, 121, 122,
+ 123, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30,
+ 31, 30, 31, 30, 31, 30, 31, 124, 125, 126, 127, 128, 129, 5, 30, 31, 130,
+ 30, 31, 20, 64, 64, 64, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
+ 131, 131, 131, 131, 131, 131, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 124, 124, 124, 124, 124, 124, 124, 124, 124,
- 124, 124, 124, 124, 124, 124, 124, 30, 31, 30, 31, 30, 31, 30, 31, 30,
- 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30,
- 31, 30, 31, 30, 31, 30, 31, 5, 25, 25, 25, 25, 25, 6, 6, 30, 31, 30, 31,
+ 17, 17, 17, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 132,
+ 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132,
+ 132, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30,
+ 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 5,
+ 25, 25, 25, 25, 25, 6, 6, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 125, 30, 31, 30,
- 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 126, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 133, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30,
+ 31, 30, 31, 134, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127,
- 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
- 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
- 127, 127, 127, 127, 127, 127, 127, 127, 127, 0, 0, 96, 5, 5, 5, 5, 5, 5,
- 0, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 129, 0, 5, 5, 0, 0, 0,
- 0, 5, 0, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 0, 135, 135, 135, 135, 135, 135,
+ 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
+ 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
+ 135, 135, 135, 135, 0, 0, 102, 5, 5, 5, 5, 5, 5, 0, 136, 136, 136, 136,
+ 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
+ 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
+ 136, 136, 136, 136, 136, 136, 137, 0, 5, 5, 0, 0, 5, 5, 5, 0, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
- 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 5, 25, 5, 25, 25, 5, 25, 25,
- 5, 25, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0,
- 0, 0, 0, 55, 55, 55, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 21, 21,
- 21, 21, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 25, 25, 25, 25, 25, 25, 25, 25,
- 25, 25, 25, 5, 21, 0, 5, 5, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 96, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 25, 25, 25,
- 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 7, 8,
- 9, 10, 11, 12, 13, 14, 15, 16, 5, 5, 5, 5, 55, 55, 25, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 5, 25, 5, 25, 25, 5, 25, 25, 5, 25, 0, 0, 0, 0,
+ 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 55, 55,
+ 55, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 21, 21, 21, 21, 21, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 5,
+ 21, 0, 5, 5, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 102,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 7, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 5, 5, 5, 5, 55, 55, 25, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 5, 55, 25, 25, 25, 25, 25, 25, 25, 21, 5, 25, 25, 25,
- 25, 25, 25, 96, 96, 25, 25, 5, 25, 25, 25, 25, 55, 55, 7, 8, 9, 10, 11,
- 12, 13, 14, 15, 16, 55, 55, 55, 5, 5, 55, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 0, 21, 55, 25, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
- 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 0, 0, 55, 55, 55, 55, 55, 55, 55,
+ 55, 5, 55, 25, 25, 25, 25, 25, 25, 25, 21, 5, 25, 25, 25, 25, 25, 25,
+ 102, 102, 25, 25, 5, 25, 25, 25, 25, 55, 55, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 55, 55, 55, 5, 5, 55, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 0, 21, 55, 25, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 25, 25, 25, 25, 25, 25, 25,
- 25, 25, 25, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 9, 10,
- 11, 12, 13, 14, 15, 16, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 25, 25, 25, 25, 25, 25, 25, 25, 25, 96, 96, 5, 5, 5, 5, 96,
- 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 25, 25, 25, 25, 96, 25, 25, 25, 25, 25,
- 25, 25, 25, 25, 96, 25, 25, 25, 96, 25, 25, 25, 25, 25, 0, 0, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 25,
- 25, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 102, 102, 5, 5, 5, 5, 102, 0, 0, 0,
+ 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 25, 25, 25, 25, 102, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 102, 25, 25, 25, 102, 25, 25, 25, 25, 25, 0, 0, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 25, 25, 0, 0,
+ 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
- 25, 25, 25, 25, 25, 25, 0, 25, 25, 25, 18, 55, 55, 55, 55, 55, 55, 55,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 18, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 18, 25, 55, 18, 18, 18,
25, 25, 25, 25, 25, 25, 25, 25, 18, 18, 18, 18, 25, 18, 18, 55, 25, 25,
25, 25, 25, 25, 25, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 25, 5, 5,
- 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 5, 96, 55, 55, 55, 55, 55, 55, 0,
- 55, 55, 55, 55, 55, 55, 55, 0, 25, 18, 18, 0, 55, 55, 55, 55, 55, 55, 55,
- 55, 0, 0, 55, 55, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 55, 55, 55, 0,
- 55, 0, 0, 0, 55, 55, 55, 55, 0, 0, 25, 55, 18, 18, 18, 25, 25, 25, 25, 0,
- 0, 18, 18, 0, 0, 18, 18, 25, 55, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0,
- 55, 55, 0, 55, 55, 55, 25, 25, 0, 0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 55, 55, 5, 5, 27, 27, 27, 27, 27, 27, 5, 5, 0, 0, 0, 0, 0, 25, 25, 18, 0,
- 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 55, 55, 0, 0, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55,
- 55, 55, 55, 55, 55, 55, 0, 55, 55, 0, 55, 55, 0, 55, 55, 0, 0, 25, 0, 18,
- 18, 18, 25, 25, 0, 0, 0, 0, 25, 25, 0, 0, 25, 25, 25, 0, 0, 0, 25, 0, 0,
- 0, 0, 0, 0, 0, 55, 55, 55, 55, 0, 55, 0, 0, 0, 0, 0, 0, 0, 7, 8, 9, 10,
- 11, 12, 13, 14, 15, 16, 25, 25, 55, 55, 55, 25, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 25, 25, 18, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55,
- 55, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 0, 55,
- 55, 55, 55, 55, 0, 0, 25, 55, 18, 18, 18, 25, 25, 25, 25, 25, 0, 25, 25,
- 18, 0, 18, 18, 25, 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 55, 55, 25, 25, 0, 0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 5, 5, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 18, 18, 0, 55, 55, 55, 55, 55,
- 55, 55, 55, 0, 0, 55, 55, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 55,
- 55, 55, 0, 55, 55, 0, 55, 55, 55, 55, 55, 0, 0, 25, 55, 18, 25, 18, 25,
- 25, 25, 25, 0, 0, 18, 18, 0, 0, 18, 18, 25, 0, 0, 0, 0, 0, 0, 0, 0, 25,
- 18, 0, 0, 0, 0, 55, 55, 0, 55, 55, 55, 25, 25, 0, 0, 7, 8, 9, 10, 11, 12,
- 13, 14, 15, 16, 5, 55, 27, 27, 27, 27, 27, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 25, 55, 0, 55, 55, 55, 55, 55, 55, 0, 0, 0, 55, 55, 55, 0, 55, 55, 55,
- 55, 0, 0, 0, 55, 55, 0, 55, 0, 55, 55, 0, 0, 0, 55, 55, 0, 0, 0, 55, 55,
- 55, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0,
- 18, 18, 25, 18, 18, 0, 0, 0, 18, 18, 18, 0, 18, 18, 18, 25, 0, 0, 55, 0,
- 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 9, 10,
- 11, 12, 13, 14, 15, 16, 27, 27, 27, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0,
- 0, 0, 18, 18, 18, 0, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 0,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55,
- 55, 55, 55, 0, 0, 0, 55, 25, 25, 25, 18, 18, 18, 18, 0, 25, 25, 25, 0,
- 25, 25, 25, 25, 0, 0, 0, 0, 0, 0, 0, 25, 25, 0, 55, 55, 0, 0, 0, 0, 0, 0,
- 55, 55, 25, 25, 0, 0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 0, 0, 0, 0,
- 0, 0, 0, 27, 27, 27, 27, 27, 27, 27, 5, 0, 0, 18, 18, 0, 55, 55, 55, 55,
- 55, 55, 55, 55, 0, 55, 55, 55, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 55, 0, 0, 25, 55, 18, 25, 18,
- 18, 18, 18, 18, 0, 25, 18, 18, 0, 18, 18, 25, 25, 0, 0, 0, 0, 0, 0, 0,
- 18, 18, 0, 0, 0, 0, 0, 0, 0, 55, 0, 55, 55, 25, 25, 0, 0, 7, 8, 9, 10,
- 11, 12, 13, 14, 15, 16, 0, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 18, 18, 0, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 0, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 0, 0, 55, 18, 18, 18, 25, 25, 25, 25, 0, 18, 18, 18, 0,
- 18, 18, 18, 25, 55, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0,
- 55, 55, 25, 25, 0, 0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 27, 27, 27,
- 27, 27, 27, 0, 0, 0, 5, 55, 55, 55, 55, 55, 55, 0, 0, 18, 18, 0, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, 0,
- 0, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 25, 0, 0, 0, 0, 18, 18, 18, 25,
- 25, 25, 0, 25, 0, 18, 18, 18, 18, 18, 18, 18, 18, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 18, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 55, 130, 25, 25,
- 25, 25, 25, 25, 25, 0, 0, 0, 0, 5, 55, 55, 55, 55, 55, 55, 96, 25, 25,
- 25, 25, 25, 25, 25, 25, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 5, 5, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 0, 55, 0, 0, 55, 55, 0, 55,
- 0, 0, 55, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 0, 55, 55, 55, 55, 55, 55,
- 55, 0, 55, 55, 55, 0, 55, 0, 55, 0, 0, 55, 55, 0, 55, 55, 55, 55, 25, 55,
- 130, 25, 25, 25, 25, 25, 25, 0, 25, 25, 55, 0, 0, 55, 55, 55, 55, 55, 0,
- 96, 0, 25, 25, 25, 25, 25, 25, 0, 0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 0, 0, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 25, 25, 5, 5, 5, 5, 5, 5, 7,
- 8, 9, 10, 11, 12, 13, 14, 15, 16, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
- 5, 25, 5, 25, 5, 25, 5, 5, 5, 5, 18, 18, 55, 55, 55, 55, 55, 55, 55, 55,
- 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 0, 0, 0, 0, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
- 18, 25, 25, 25, 25, 25, 5, 25, 25, 55, 55, 55, 55, 55, 25, 25, 25, 25,
- 25, 25, 25, 25, 25, 25, 25, 0, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 5, 102, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 25, 18, 18, 0, 55, 55, 55, 55, 55, 55,
+ 55, 55, 0, 0, 55, 55, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 55, 55,
+ 55, 0, 55, 0, 0, 0, 55, 55, 55, 55, 0, 0, 25, 55, 18, 18, 18, 25, 25, 25,
+ 25, 0, 0, 18, 18, 0, 0, 18, 18, 25, 55, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0,
+ 0, 0, 55, 55, 0, 55, 55, 55, 25, 25, 0, 0, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 55, 55, 5, 5, 27, 27, 27, 27, 27, 27, 5, 5, 0, 0, 0, 0, 0, 25,
+ 25, 18, 0, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 55, 55, 0, 0, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 0, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 0, 55, 55, 0, 55, 55, 0, 0,
+ 25, 0, 18, 18, 18, 25, 25, 0, 0, 0, 0, 25, 25, 0, 0, 25, 25, 25, 0, 0, 0,
+ 25, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 0, 55, 0, 0, 0, 0, 0, 0, 0, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15, 16, 25, 25, 55, 55, 55, 25, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 25, 25, 18, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0,
+ 55, 55, 55, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55,
+ 0, 55, 55, 55, 55, 55, 0, 0, 25, 55, 18, 18, 18, 25, 25, 25, 25, 25, 0,
+ 25, 25, 18, 0, 18, 18, 25, 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 55, 55, 25, 25, 0, 0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 5, 5,
+ 0, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, 25, 18, 18, 0, 55, 55, 55,
+ 55, 55, 55, 55, 55, 0, 0, 55, 55, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55,
+ 55, 55, 55, 55, 0, 55, 55, 0, 55, 55, 55, 55, 55, 0, 0, 25, 55, 18, 25,
+ 18, 25, 25, 25, 25, 0, 0, 18, 18, 0, 0, 18, 18, 25, 0, 0, 0, 0, 0, 0, 0,
+ 0, 25, 18, 0, 0, 0, 0, 55, 55, 0, 55, 55, 55, 25, 25, 0, 0, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 5, 55, 27, 27, 27, 27, 27, 27, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 25, 55, 0, 55, 55, 55, 55, 55, 55, 0, 0, 0, 55, 55, 55, 0,
+ 55, 55, 55, 55, 0, 0, 0, 55, 55, 0, 55, 0, 55, 55, 0, 0, 0, 55, 55, 0, 0,
+ 0, 55, 55, 55, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 0, 0, 0, 0, 18, 18, 25, 18, 18, 0, 0, 0, 18, 18, 18, 0, 18, 18, 18, 25,
+ 0, 0, 55, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 27, 27, 27, 5, 5, 5, 5, 5, 5, 5, 5,
+ 0, 0, 0, 0, 0, 25, 18, 18, 18, 0, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55,
+ 55, 55, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 55, 25, 25, 25, 18, 18, 18, 18, 0,
+ 25, 25, 25, 0, 25, 25, 25, 25, 0, 0, 0, 0, 0, 0, 0, 25, 25, 0, 55, 55,
+ 55, 0, 0, 0, 0, 0, 55, 55, 25, 25, 0, 0, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 0, 0, 0, 0, 0, 0, 0, 0, 27, 27, 27, 27, 27, 27, 27, 5, 0, 25, 18, 18,
+ 0, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 0, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 55, 0, 0,
+ 25, 55, 18, 25, 18, 18, 18, 18, 18, 0, 25, 18, 18, 0, 18, 18, 25, 25, 0,
+ 0, 0, 0, 0, 0, 0, 18, 18, 0, 0, 0, 0, 0, 0, 0, 55, 0, 55, 55, 25, 25, 0,
+ 0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 55, 55, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 25, 18, 18, 0, 55, 55, 55, 55, 55, 55, 55, 55, 0,
+ 55, 55, 55, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 55, 18, 18, 18, 25, 25, 25, 25,
+ 0, 18, 18, 18, 0, 18, 18, 18, 25, 55, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0,
+ 0, 0, 0, 0, 0, 55, 55, 55, 25, 25, 0, 0, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 27, 27, 27, 27, 27, 27, 0, 0, 0, 5, 55, 55, 55, 55, 55, 55, 0, 0, 18,
+ 18, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 0, 55, 0, 0, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 25, 0, 0, 0, 0,
+ 18, 18, 18, 25, 25, 25, 0, 25, 0, 18, 18, 18, 18, 18, 18, 18, 18, 0, 0,
+ 0, 0, 0, 0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 0, 18, 18, 5, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 25, 55, 138, 25, 25, 25, 25, 25, 25, 25, 0, 0, 0, 0, 5, 55, 55, 55,
+ 55, 55, 55, 102, 25, 25, 25, 25, 25, 25, 25, 25, 5, 7, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 0,
+ 55, 0, 0, 55, 55, 0, 55, 0, 0, 55, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 0,
+ 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 0, 55, 0, 55, 0, 0, 55, 55, 0,
+ 55, 55, 55, 55, 25, 55, 138, 25, 25, 25, 25, 25, 25, 0, 25, 25, 55, 0, 0,
+ 55, 55, 55, 55, 55, 0, 102, 0, 25, 25, 25, 25, 25, 25, 0, 0, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 0, 0, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 25,
+ 25, 5, 5, 5, 5, 5, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 27, 27, 27,
+ 27, 27, 27, 27, 27, 27, 27, 5, 25, 5, 25, 5, 25, 5, 5, 5, 5, 18, 18, 55,
+ 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 18, 25, 25, 25, 25, 25, 5, 25, 25, 55, 55,
+ 55, 55, 55, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 0, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
- 25, 25, 25, 25, 25, 25, 25, 25, 0, 5, 5, 5, 5, 5, 5, 5, 5, 25, 5, 5, 5,
- 5, 5, 5, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 18, 18, 25, 25, 25, 25, 18,
- 25, 25, 25, 25, 25, 25, 18, 25, 25, 18, 18, 25, 25, 55, 7, 8, 9, 10, 11,
- 12, 13, 14, 15, 16, 5, 5, 5, 5, 5, 5, 55, 55, 55, 55, 55, 55, 18, 18, 25,
- 25, 55, 55, 55, 55, 25, 25, 25, 55, 18, 18, 18, 55, 55, 18, 18, 18, 18,
- 18, 18, 18, 55, 55, 55, 25, 25, 25, 25, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 25, 18, 18, 25, 25, 18, 18, 18, 18, 18, 18, 25, 55,
- 18, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 18, 18, 25, 5, 5, 131, 131,
- 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
- 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
- 131, 131, 131, 131, 131, 131, 131, 131, 0, 131, 0, 0, 0, 0, 0, 131, 0, 0,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 0, 5, 5, 5,
+ 5, 5, 5, 5, 5, 25, 5, 5, 5, 5, 5, 5, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 5, 96, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 18, 18, 25, 25, 25, 25, 18, 25, 25, 25, 25, 25, 25, 18, 25, 25, 18, 18,
+ 25, 25, 55, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 5, 5, 5, 5, 5, 5, 55,
+ 55, 55, 55, 55, 55, 18, 18, 25, 25, 55, 55, 55, 55, 25, 25, 25, 55, 18,
+ 18, 18, 55, 55, 18, 18, 18, 18, 18, 18, 18, 55, 55, 55, 25, 25, 25, 25,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 18, 18, 25, 25,
+ 18, 18, 18, 18, 18, 18, 25, 55, 18, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 18, 18, 18, 25, 5, 5, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
+ 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
+ 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 0,
+ 139, 0, 0, 0, 0, 0, 139, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 5, 102, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
@@ -1742,31 +2553,34 @@ static unsigned short index2[] = {
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55,
- 55, 55, 0, 0, 55, 55, 55, 55, 55, 55, 55, 0, 55, 0, 55, 55, 55, 55, 0, 0,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 0, 0, 55, 55, 55, 55, 55, 55, 55,
+ 0, 55, 0, 55, 55, 55, 55, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 0, 0, 55, 55, 55, 55,
- 55, 55, 55, 0, 55, 0, 55, 55, 55, 55, 0, 0, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 0, 0,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 0,
+ 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55,
+ 55, 55, 55, 0, 0, 55, 55, 55, 55, 55, 55, 55, 0, 55, 0, 55, 55, 55, 55,
+ 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 25, 25, 25, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 132, 133, 134, 135, 136, 137, 138, 139, 140, 27,
- 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 0, 0, 0, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0,
- 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 0, 55, 55, 55, 55, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 0, 0, 25, 25, 25, 5, 5, 5, 5, 5, 5, 5, 5, 5, 140, 141, 142,
+ 143, 144, 145, 146, 147, 148, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
+ 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 149, 150, 151, 152, 153,
+ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
+ 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195,
+ 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
+ 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 0, 0, 235, 236,
+ 237, 238, 239, 240, 0, 0, 5, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
@@ -1786,28 +2600,28 @@ static unsigned short index2[] = {
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 5, 5, 5, 141, 141, 141, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 0, 55, 55, 55, 55, 25, 25, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 25,
- 25, 25, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 25, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55,
- 55, 55, 0, 25, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 25, 18, 25, 25, 25,
- 25, 25, 25, 25, 18, 18, 18, 18, 18, 18, 18, 18, 25, 18, 18, 25, 25, 25,
- 25, 25, 25, 25, 25, 25, 25, 25, 5, 5, 5, 96, 5, 5, 5, 5, 55, 25, 0, 0, 7,
- 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 0, 0, 0, 0, 0, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 25, 25, 25, 21, 0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 0, 0, 0, 0, 0,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 96,
+ 55, 55, 55, 55, 55, 55, 55, 5, 5, 5, 241, 241, 241, 55, 55, 55, 55, 55,
+ 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 0, 55, 55, 55, 55, 25, 25, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 25, 25, 25, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 25, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0,
+ 55, 55, 55, 0, 25, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 25, 18, 25, 25,
+ 25, 25, 25, 25, 25, 18, 18, 18, 18, 18, 18, 18, 18, 25, 18, 18, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 5, 5, 5, 102, 5, 5, 5, 5, 55, 25, 0,
+ 0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 0, 0, 0, 0, 0, 27, 27, 27, 27,
+ 27, 27, 27, 27, 27, 27, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 25, 25, 25, 21, 0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 0, 0, 0, 0,
+ 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 102, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0,
- 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0,
+ 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 55, 0, 0, 0, 0, 0, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
@@ -1815,71 +2629,73 @@ static unsigned short index2[] = {
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 25, 25, 25,
- 18, 18, 18, 18, 25, 25, 18, 18, 18, 0, 0, 0, 0, 18, 18, 25, 18, 18, 18,
- 18, 18, 18, 25, 25, 25, 0, 0, 0, 0, 5, 0, 0, 0, 5, 5, 7, 8, 9, 10, 11,
- 12, 13, 14, 15, 16, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0,
- 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 25, 25,
+ 25, 18, 18, 18, 18, 25, 25, 18, 18, 18, 0, 0, 0, 0, 18, 18, 25, 18, 18,
+ 18, 18, 18, 18, 25, 25, 25, 0, 0, 0, 0, 5, 0, 0, 0, 5, 5, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 0, 0, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 0, 0, 0, 0, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
- 18, 18, 18, 18, 18, 55, 55, 55, 55, 55, 55, 55, 18, 18, 0, 0, 0, 0, 0, 0,
- 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 132, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0,
+ 0, 0, 0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 140, 0, 0, 0, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 25, 25, 18, 18, 25, 0, 0, 5, 5, 55, 55, 55,
+ 5, 5, 5, 5, 5, 5, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 25, 18, 18, 25, 0, 0, 5, 5, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 18, 25, 18, 25,
- 25, 25, 25, 25, 25, 25, 0, 25, 18, 25, 18, 18, 25, 25, 25, 25, 25, 25,
- 25, 25, 18, 18, 18, 18, 18, 18, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
- 0, 0, 25, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 0, 0, 0, 0, 0, 7, 8, 9,
- 10, 11, 12, 13, 14, 15, 16, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 96, 5,
- 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 18, 25,
+ 18, 25, 25, 25, 25, 25, 25, 25, 0, 25, 18, 25, 18, 18, 25, 25, 25, 25,
+ 25, 25, 25, 25, 18, 18, 18, 18, 18, 18, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 0, 0, 25, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 0, 0, 0, 0, 0,
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5,
+ 5, 102, 5, 5, 5, 5, 5, 5, 0, 0, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25, 25, 18, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25,
+ 25, 25, 25, 18, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 18, 25, 25, 25, 25, 25, 18, 25,
- 18, 18, 18, 18, 18, 25, 18, 18, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0,
- 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 25, 25, 25, 25, 25, 25, 25, 25, 25, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 0, 0, 0, 25, 25, 18, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 18, 25,
+ 25, 25, 25, 25, 18, 25, 18, 18, 18, 18, 18, 25, 18, 18, 55, 55, 55, 55,
+ 55, 55, 55, 0, 0, 0, 0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 25, 25, 18, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 18, 25, 25, 25, 25, 18, 18, 25, 25, 18, 25, 18, 18, 55, 55, 7, 8, 9,
- 10, 11, 12, 13, 14, 15, 16, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 18, 25, 25, 25, 25, 18, 18, 25, 25, 18, 25,
+ 25, 25, 55, 55, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 18, 25,
- 25, 18, 18, 18, 25, 18, 25, 25, 25, 18, 18, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5,
- 5, 5, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 18, 18, 18, 18, 18, 18, 18, 18, 25, 25, 25, 25, 25, 25, 25, 25, 18,
- 18, 25, 25, 0, 0, 0, 5, 5, 5, 5, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 0, 0, 0, 55, 55, 55, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 55, 55, 55, 55,
+ 55, 55, 55, 25, 18, 25, 25, 18, 18, 18, 25, 18, 25, 25, 25, 18, 18, 0, 0,
+ 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 96, 96, 96, 96, 96, 96, 5, 5, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 55, 55, 55, 55, 55, 55, 55, 18, 18, 18, 18, 18, 18, 18, 18, 25, 25, 25,
+ 25, 25, 25, 25, 25, 18, 18, 25, 25, 0, 0, 0, 5, 5, 5, 5, 5, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 0, 0, 0, 55, 55, 55, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 102, 102, 102,
+ 102, 102, 102, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0,
- 0, 0, 0, 0, 25, 25, 25, 5, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
- 25, 25, 18, 25, 25, 25, 25, 25, 25, 25, 55, 55, 55, 55, 25, 55, 55, 55,
- 55, 18, 18, 25, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 95, 142, 20, 20, 20, 143, 20, 20, 20, 20, 20,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
+ 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25, 5, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 18, 25, 25, 25, 25, 25, 25, 25,
+ 55, 55, 55, 55, 25, 55, 55, 55, 55, 18, 18, 25, 55, 55, 0, 25, 25, 0, 0,
+ 0, 0, 0, 0, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
- 95, 95, 95, 95, 95, 95, 95, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 101, 101, 101, 101, 101, 101,
+ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
+ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
+ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
+ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
+ 101, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 101, 242, 20,
+ 20, 20, 243, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 101, 101, 101,
+ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
+ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
+ 101, 101, 101, 101, 101, 101, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
- 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25, 25, 30, 31, 30, 31, 30, 31, 30,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 0, 0, 0, 0, 0, 0, 25, 25, 25, 25, 30, 31, 30,
31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30,
31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30,
31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30,
@@ -1887,51 +2703,51 @@ static unsigned short index2[] = {
31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30,
31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30,
31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30,
- 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 144,
- 145, 146, 147, 148, 149, 20, 20, 150, 20, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 151, 151,
- 151, 151, 151, 151, 151, 151, 152, 152, 152, 152, 152, 152, 152, 152,
- 151, 151, 151, 151, 151, 151, 0, 0, 152, 152, 152, 152, 152, 152, 0, 0,
- 151, 151, 151, 151, 151, 151, 151, 151, 152, 152, 152, 152, 152, 152,
- 152, 152, 151, 151, 151, 151, 151, 151, 151, 151, 152, 152, 152, 152,
- 152, 152, 152, 152, 151, 151, 151, 151, 151, 151, 0, 0, 152, 152, 152,
- 152, 152, 152, 0, 0, 153, 151, 154, 151, 155, 151, 156, 151, 0, 152, 0,
- 152, 0, 152, 0, 152, 151, 151, 151, 151, 151, 151, 151, 151, 152, 152,
- 152, 152, 152, 152, 152, 152, 157, 157, 158, 158, 158, 158, 159, 159,
- 160, 160, 161, 161, 162, 162, 0, 0, 163, 164, 165, 166, 167, 168, 169,
- 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
- 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197,
- 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 151,
- 151, 211, 212, 213, 0, 214, 215, 152, 152, 216, 216, 217, 6, 218, 6, 6,
- 6, 219, 220, 221, 0, 222, 223, 224, 224, 224, 224, 225, 6, 6, 6, 151,
- 151, 226, 227, 0, 0, 228, 229, 152, 152, 230, 230, 0, 6, 6, 6, 151, 151,
- 231, 232, 233, 119, 234, 235, 152, 152, 236, 236, 122, 6, 6, 6, 0, 0,
- 237, 238, 239, 0, 240, 241, 242, 242, 243, 243, 244, 6, 6, 0, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 21, 21, 21, 21, 21, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 6, 3, 3, 21, 21, 21, 21, 21, 2, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 18, 18, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 18, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 2, 21,
- 21, 21, 21, 21, 0, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 245, 95, 0, 0,
- 246, 247, 248, 249, 250, 251, 5, 5, 5, 5, 5, 95, 245, 26, 22, 23, 246,
- 247, 248, 249, 250, 251, 5, 5, 5, 5, 5, 0, 95, 95, 95, 95, 95, 95, 95,
- 95, 95, 95, 95, 95, 95, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
- 25, 25, 25, 6, 6, 6, 6, 25, 6, 6, 6, 25, 25, 25, 25, 25, 25, 25, 25, 25,
- 25, 25, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 113, 5, 5,
- 5, 5, 113, 5, 5, 20, 113, 113, 113, 20, 20, 113, 113, 113, 20, 5, 113, 5,
- 5, 252, 113, 113, 113, 113, 113, 5, 5, 5, 5, 5, 5, 113, 5, 253, 5, 113,
- 5, 254, 255, 113, 113, 252, 20, 113, 113, 256, 113, 20, 55, 55, 55, 55,
- 20, 5, 5, 20, 20, 113, 113, 5, 5, 5, 5, 5, 113, 20, 20, 20, 20, 5, 5, 5,
- 5, 257, 5, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, 258,
- 258, 258, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, 259,
- 259, 259, 259, 259, 141, 141, 141, 30, 31, 141, 141, 141, 141, 27, 0, 0,
- 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30,
+ 31, 30, 31, 244, 245, 246, 247, 248, 249, 20, 20, 250, 20, 30, 31, 30,
+ 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30,
+ 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30,
+ 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30,
+ 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30,
+ 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30,
+ 31, 30, 31, 251, 251, 251, 251, 251, 251, 251, 251, 252, 252, 252, 252,
+ 252, 252, 252, 252, 251, 251, 251, 251, 251, 251, 0, 0, 252, 252, 252,
+ 252, 252, 252, 0, 0, 251, 251, 251, 251, 251, 251, 251, 251, 252, 252,
+ 252, 252, 252, 252, 252, 252, 251, 251, 251, 251, 251, 251, 251, 251,
+ 252, 252, 252, 252, 252, 252, 252, 252, 251, 251, 251, 251, 251, 251, 0,
+ 0, 252, 252, 252, 252, 252, 252, 0, 0, 253, 251, 254, 251, 255, 251, 256,
+ 251, 0, 252, 0, 252, 0, 252, 0, 252, 251, 251, 251, 251, 251, 251, 251,
+ 251, 252, 252, 252, 252, 252, 252, 252, 252, 257, 257, 258, 258, 258,
+ 258, 259, 259, 260, 260, 261, 261, 262, 262, 0, 0, 263, 264, 265, 266,
+ 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
+ 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308,
+ 309, 310, 251, 251, 311, 312, 313, 0, 314, 315, 252, 252, 316, 316, 317,
+ 6, 318, 6, 6, 6, 319, 320, 321, 0, 322, 323, 324, 324, 324, 324, 325, 6,
+ 6, 6, 251, 251, 326, 327, 0, 0, 328, 329, 252, 252, 330, 330, 0, 6, 6, 6,
+ 251, 251, 331, 332, 333, 126, 334, 335, 252, 252, 336, 336, 130, 6, 6, 6,
+ 0, 0, 337, 338, 339, 0, 340, 341, 342, 342, 343, 343, 344, 6, 6, 0, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 21, 21, 21, 21, 21, 5, 5, 5, 5, 5, 5, 5, 5, 6,
+ 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 6, 3, 3, 21, 21, 21, 21, 21, 2,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 18, 18, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 18, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 2,
+ 21, 21, 21, 21, 21, 0, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 345, 101,
+ 0, 0, 346, 347, 348, 349, 350, 351, 5, 5, 5, 5, 5, 101, 345, 26, 22, 23,
+ 346, 347, 348, 349, 350, 351, 5, 5, 5, 5, 5, 0, 101, 101, 101, 101, 101,
+ 101, 101, 101, 101, 101, 101, 101, 101, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 6, 6, 6, 6, 25, 6, 6, 6, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 5, 5, 120, 5, 5, 5, 5, 120, 5, 5, 20, 120, 120, 120, 20, 20, 120, 120,
+ 120, 20, 5, 120, 5, 5, 352, 120, 120, 120, 120, 120, 5, 5, 5, 5, 5, 5,
+ 120, 5, 353, 5, 120, 5, 354, 355, 120, 120, 352, 20, 120, 120, 356, 120,
+ 20, 55, 55, 55, 55, 20, 5, 5, 20, 20, 120, 120, 5, 5, 5, 5, 5, 120, 20,
+ 20, 20, 20, 5, 5, 5, 5, 357, 5, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
+ 27, 27, 27, 27, 27, 27, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
+ 358, 358, 358, 358, 358, 358, 359, 359, 359, 359, 359, 359, 359, 359,
+ 359, 359, 359, 359, 359, 359, 359, 359, 241, 241, 241, 30, 31, 241, 241,
+ 241, 241, 27, 5, 5, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
@@ -1946,134 +2762,134 @@ static unsigned short index2[] = {
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 22, 23, 246, 247, 248, 249, 250,
- 251, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 26, 22, 23, 246, 247,
- 248, 249, 250, 251, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 26, 22,
- 23, 246, 247, 248, 249, 250, 251, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 260, 260, 260, 260, 260, 260, 260, 260, 260, 260, 260, 260, 260,
- 260, 260, 260, 260, 260, 260, 260, 260, 260, 260, 260, 260, 260, 261,
- 261, 261, 261, 261, 261, 261, 261, 261, 261, 261, 261, 261, 261, 261,
- 261, 261, 261, 261, 261, 261, 261, 261, 261, 261, 261, 245, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 26, 22, 23, 246, 247, 248, 249, 250, 251, 27,
- 245, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 22, 23, 346,
+ 347, 348, 349, 350, 351, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 26,
+ 22, 23, 346, 347, 348, 349, 350, 351, 27, 27, 27, 27, 27, 27, 27, 27, 27,
+ 27, 27, 26, 22, 23, 346, 347, 348, 349, 350, 351, 27, 27, 27, 27, 27, 27,
+ 27, 27, 27, 27, 27, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
+ 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360,
+ 360, 360, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361,
+ 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361,
+ 345, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 26, 22, 23, 346, 347, 348,
+ 349, 350, 351, 27, 345, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 26,
- 22, 23, 246, 247, 248, 249, 250, 251, 27, 26, 22, 23, 246, 247, 248, 249,
- 250, 251, 27, 26, 22, 23, 246, 247, 248, 249, 250, 251, 27, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 26, 22, 23, 346, 347, 348, 349, 350, 351, 27, 26, 22,
+ 23, 346, 347, 348, 349, 350, 351, 27, 26, 22, 23, 346, 347, 348, 349,
+ 350, 351, 27, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 0, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
+ 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
+ 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
+ 135, 135, 135, 135, 135, 135, 135, 135, 135, 0, 136, 136, 136, 136, 136,
+ 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
+ 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
+ 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 0,
+ 30, 31, 362, 363, 364, 365, 366, 30, 31, 30, 31, 30, 31, 367, 368, 369,
+ 370, 20, 30, 31, 20, 30, 31, 20, 20, 20, 20, 20, 101, 101, 371, 371, 30,
+ 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30,
+ 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30,
+ 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30,
+ 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30,
+ 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30,
+ 31, 30, 31, 30, 31, 30, 31, 30, 31, 20, 5, 5, 5, 5, 5, 5, 30, 31, 30, 31,
+ 25, 25, 25, 30, 31, 0, 0, 0, 0, 0, 5, 5, 5, 5, 27, 5, 5, 372, 372, 372,
+ 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, 372,
+ 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, 372,
+ 372, 372, 372, 372, 372, 372, 372, 0, 372, 0, 0, 0, 0, 0, 372, 0, 0, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 0, 0, 0, 0, 0, 0, 0, 102, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 25, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55,
+ 55, 55, 55, 0, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 55, 55, 55,
+ 0, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55,
+ 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 55,
+ 55, 55, 0, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 373, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
- 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
- 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
- 127, 127, 127, 127, 127, 0, 128, 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 0, 30, 31, 262, 263,
- 264, 265, 266, 30, 31, 30, 31, 30, 31, 267, 268, 269, 270, 20, 30, 31,
- 20, 30, 31, 20, 20, 20, 20, 20, 95, 95, 271, 271, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 20, 5, 5, 5, 5, 5, 5, 30, 31, 30, 31, 25, 25, 25, 30, 31,
- 0, 0, 0, 0, 0, 5, 5, 5, 5, 27, 5, 5, 272, 272, 272, 272, 272, 272, 272,
- 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272,
- 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272, 272,
- 272, 272, 272, 0, 272, 0, 0, 0, 0, 0, 272, 0, 0, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0,
- 0, 96, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55,
- 55, 55, 55, 55, 0, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 55, 55,
- 55, 0, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 55, 55, 55, 0, 55,
- 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 55, 55, 55, 0, 25, 25, 25, 25,
- 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
- 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 273, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 2, 5, 5, 5, 5, 96, 55, 141, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 141,
- 141, 141, 141, 141, 141, 141, 141, 141, 25, 25, 25, 25, 18, 18, 5, 96,
- 96, 96, 96, 96, 5, 5, 141, 141, 141, 96, 55, 5, 5, 5, 0, 55, 55, 55, 55,
+ 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 2, 5,
+ 5, 5, 5, 102, 55, 241, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 241, 241, 241, 241, 241, 241, 241, 241, 241, 25,
+ 25, 25, 25, 18, 18, 5, 102, 102, 102, 102, 102, 5, 5, 241, 241, 241, 102,
+ 55, 5, 5, 5, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 25, 25, 6, 6, 96, 96, 55,
- 5, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 0, 0, 25, 25, 6, 6, 102, 102, 55, 5, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 5, 96, 96, 96, 55, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 5, 102, 102, 102, 55, 0, 0, 0, 0, 0,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 0, 5, 5, 27, 27, 27, 27, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 5, 5, 27, 27, 27, 27, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0,
+ 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 27, 27, 27, 27, 27, 27, 27, 27, 5,
- 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 0, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 27, 27, 27, 27, 27, 27, 27, 27, 5, 27, 27, 27, 27, 27, 27, 27, 27,
+ 27, 27, 27, 27, 27, 27, 27, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 27, 27, 27, 27, 27,
+ 27, 27, 27, 27, 27, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 27, 27,
+ 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 55, 55, 55,
- 55, 55, 274, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 5, 5, 5, 5, 5, 5, 5, 5, 0, 55, 55, 55, 55, 55, 374, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 274, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 374, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
@@ -2082,7 +2898,7 @@ static unsigned short index2[] = {
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 274, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 374,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
@@ -2091,56 +2907,56 @@ static unsigned short index2[] = {
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 274, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 374, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 274, 55, 55, 274, 55, 55, 55, 274, 55, 274, 55,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 374,
+ 55, 55, 374, 55, 55, 55, 374, 55, 374, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 274, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 374, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 374, 55, 55, 55,
+ 55, 55, 55, 55, 374, 55, 374, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 274, 55, 55, 55, 55, 55, 55, 55, 274, 55, 274, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 374, 374, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 374, 55, 55, 55, 55, 55, 55, 55, 55, 374, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 274, 274, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 274, 55, 55,
- 55, 55, 55, 55, 55, 55, 274, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 374,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 274, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 274, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 374, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 374, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 274, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 274, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 374, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 274, 55, 274, 55, 274, 55,
+ 55, 55, 55, 374, 55, 374, 55, 374, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 274, 55, 274, 274, 274, 55, 55,
- 55, 55, 55, 55, 274, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 374, 55, 374, 374, 374, 55, 55, 55, 55, 55, 55, 374, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 274, 274, 274, 274,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 374, 374, 374, 374, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
@@ -2148,7 +2964,7 @@ static unsigned short index2[] = {
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 274, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 374, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
@@ -2156,25 +2972,24 @@ static unsigned short index2[] = {
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 274, 55, 55, 55, 55, 55,
- 55, 55, 274, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 374, 55, 55, 55, 55, 55, 55, 55, 374, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 274, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 374, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 274, 274, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 274, 274, 274, 55, 274, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 374, 374, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 374, 374, 374, 55, 374, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
@@ -2185,220 +3000,226 @@ static unsigned short index2[] = {
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 274, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 374, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 274, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 374, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 274, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 274, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 374, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 374, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 274, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 374, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 274, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 374, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 274, 55, 55, 55, 55, 274, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 374, 55, 55, 55, 55,
+ 374, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 274, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 374,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 274, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 274, 55, 55, 55, 55, 55,
- 274, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 374, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 274, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 374, 55, 55, 55, 55, 55, 374, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 374, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 274, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 374, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 96, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 102, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0,
+ 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 96, 96, 96, 96, 96, 96, 5, 5, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 96, 5, 5, 5, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 55, 55, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 55, 25, 6, 6, 6, 5, 25, 25, 25, 25, 25, 25, 25,
- 25, 25, 25, 5, 96, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30,
- 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 0, 0, 0, 0, 0, 0, 0, 25, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 102,
+ 102, 102, 102, 102, 102, 5, 5, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 102, 5, 5, 5, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 55, 55, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 31, 30, 31, 30, 31, 30,
+ 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30,
+ 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30,
+ 31, 30, 31, 55, 25, 6, 6, 6, 5, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 5, 102, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 101, 101, 25, 25, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 141, 141,
- 141, 141, 141, 141, 141, 141, 141, 141, 25, 25, 5, 5, 5, 5, 5, 5, 0, 0,
- 0, 0, 0, 0, 0, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 96, 96, 96, 96, 96, 96, 96, 96, 96, 6, 6, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 20, 20, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 95, 20, 20, 20, 20, 20, 20, 20, 20, 30, 31, 30, 31, 275, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 96, 6, 6, 30, 31, 276, 20, 0, 30, 31, 30,
- 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 277, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 241, 241, 241,
+ 241, 241, 241, 241, 241, 241, 241, 25, 25, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0,
+ 0, 0, 0, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 102, 102, 102, 102, 102, 102, 102, 102, 102, 6, 6, 30, 31, 30,
+ 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 20, 20, 30, 31, 30, 31, 30,
+ 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30,
+ 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30,
+ 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30,
+ 31, 30, 31, 101, 20, 20, 20, 20, 20, 20, 20, 20, 30, 31, 30, 31, 375, 30,
+ 31, 30, 31, 30, 31, 30, 31, 30, 31, 102, 6, 6, 30, 31, 376, 20, 55, 30,
+ 31, 30, 31, 20, 20, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30,
+ 31, 30, 31, 30, 31, 30, 31, 377, 378, 379, 380, 0, 0, 381, 382, 383, 384,
+ 30, 31, 30, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 95, 20, 55, 55, 55, 55, 55, 55, 55, 25,
- 55, 55, 55, 25, 55, 55, 55, 55, 25, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 18, 18, 25, 25,
- 18, 5, 5, 5, 5, 0, 0, 0, 0, 27, 27, 27, 27, 27, 27, 5, 5, 5, 5, 0, 0, 0,
- 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 18, 18, 55, 55, 55, 55, 55, 55, 55,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 101, 101,
+ 20, 55, 55, 55, 55, 55, 55, 55, 25, 55, 55, 55, 25, 55, 55, 55, 55, 25,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 18, 18, 25, 25, 18, 5, 5, 5, 5, 0, 0, 0, 0, 27, 27,
+ 27, 27, 27, 27, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
- 18, 18, 18, 18, 18, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 7, 8, 9, 10, 11,
- 12, 13, 14, 15, 16, 0, 0, 0, 0, 0, 0, 25, 25, 25, 25, 25, 25, 25, 25, 25,
- 25, 25, 25, 25, 25, 25, 25, 25, 25, 55, 55, 55, 55, 55, 55, 5, 5, 5, 55,
- 0, 0, 0, 0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 25, 25, 25, 25, 25, 25, 25, 25, 5, 5, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0,
+ 18, 18, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 18, 18, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 5, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 25,
- 25, 25, 18, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 18, 18, 25,
- 25, 25, 25, 18, 18, 25, 18, 18, 18, 18, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 0, 96, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 0, 0, 0, 5, 5, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 25, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 5, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 0, 0, 0, 0,
+ 0, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 55, 55, 55, 55, 55, 55, 5, 5, 5, 55, 5, 55, 0, 0, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 25, 25,
+ 25, 25, 25, 25, 25, 5, 5, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 18, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 25, 25, 25, 25, 25, 18, 18, 25,
- 25, 18, 18, 25, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 25, 55, 55,
- 55, 55, 55, 55, 55, 55, 25, 18, 0, 0, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 0, 0, 5, 5, 5, 5, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 96, 55, 55, 55, 55, 55, 55, 5, 5, 5, 55, 18, 0, 0, 0, 0, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 25, 25, 25, 18, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 55, 25, 25, 25, 55, 55,
- 25, 25, 55, 55, 55, 55, 55, 25, 25, 55, 25, 55, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 96, 5, 5, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 18, 25, 25, 18, 18, 5, 5, 55, 96, 96,
- 18, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 0, 0, 55,
- 55, 55, 55, 55, 55, 0, 0, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 25, 18, 18, 25, 25, 25, 25, 18, 18, 25, 18,
+ 18, 18, 18, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 102, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 0, 0, 0, 0, 5, 5, 55, 55, 55, 55, 55, 25, 102,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 18, 18, 25,
- 18, 18, 25, 18, 18, 5, 18, 25, 0, 0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 25, 25, 25, 25, 25, 18,
+ 18, 25, 25, 18, 18, 25, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 25,
+ 55, 55, 55, 55, 55, 55, 55, 55, 25, 18, 0, 0, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 0, 0, 5, 5, 5, 5, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 102, 55, 55, 55, 55, 55, 55, 5, 5, 5, 55, 18, 25, 18,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 55, 25, 25,
+ 25, 55, 55, 25, 25, 55, 55, 55, 55, 55, 25, 25, 55, 25, 55, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 102,
+ 5, 5, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 18, 25, 25, 18, 18, 5,
+ 5, 55, 102, 102, 18, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55,
+ 55, 55, 0, 0, 55, 55, 55, 55, 55, 55, 0, 0, 55, 55, 55, 55, 55, 55, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 55,
+ 55, 55, 0, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 385, 20, 20, 20, 20, 20, 20, 20, 6, 101, 101, 101, 101, 20, 20,
+ 20, 20, 20, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ 461, 462, 463, 464, 465, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 18, 18, 25, 18, 18, 25, 18, 18, 5, 18, 25, 0, 0, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0,
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 274, 55, 55, 55, 55, 55, 55, 55, 274, 55, 55, 55,
- 55, 274, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 374, 55, 55,
+ 55, 55, 55, 55, 55, 374, 55, 55, 55, 55, 374, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 274, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 374, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 274, 55, 274, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 374, 55, 374, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 274, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 374,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 278, 279, 280, 281, 282, 283, 284, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 285, 286, 287, 288, 289, 0, 0, 0, 0, 0, 55, 25, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 5, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 0, 55, 55, 55, 55, 55, 0, 55, 0, 55, 55, 0, 55, 55, 0,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 466, 467, 468, 469,
+ 470, 471, 472, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 473, 474, 475, 476,
+ 477, 0, 0, 0, 0, 0, 55, 25, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 5,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 55,
+ 55, 0, 55, 0, 55, 55, 0, 55, 55, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
@@ -2406,198 +3227,309 @@ static unsigned short index2[] = {
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 290, 290, 290, 290, 290, 290, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 478, 478, 478, 478, 478, 478,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0,
+ 55, 55, 55, 55, 55, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 290, 290, 5, 5, 0, 0, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
- 25, 25, 25, 25, 5, 5, 5, 6, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 25, 25,
- 25, 25, 25, 25, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 18, 18, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 18, 18,
- 18, 5, 5, 6, 0, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 0, 5, 5, 5, 5, 0, 0, 0, 0, 290, 55, 290, 55, 290, 0, 290, 55, 290, 55,
- 290, 55, 290, 55, 290, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 478, 478, 5, 5, 0, 0, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 5, 5, 5, 6, 5, 5, 5,
+ 5, 5, 5, 0, 0, 0, 0, 0, 0, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 5, 5, 5, 18, 18, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 18, 18, 18, 5, 5, 6, 0, 5, 6, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 5, 5, 5, 0, 0, 0, 0,
+ 478, 55, 478, 55, 478, 0, 478, 55, 478, 55, 478, 55, 478, 55, 478, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 0, 0, 21, 0, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, 5,
- 5, 6, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 6, 5, 5, 5, 5, 5, 5, 17,
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 5, 5, 5, 6, 18, 6, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 96, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0,
+ 21, 0, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, 5, 5, 6, 5, 7, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 6, 5, 5, 5, 5, 5, 5, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 5, 5,
+ 5, 6, 18, 6, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 102, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 291, 291, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 55, 55, 55, 55, 55, 55, 0,
- 0, 55, 55, 55, 55, 55, 55, 0, 0, 55, 55, 55, 55, 55, 55, 0, 0, 55, 55,
- 55, 0, 0, 0, 5, 5, 5, 6, 5, 5, 5, 0, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 21, 21, 21, 5, 5, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 0,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 479, 479, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 0, 0, 0, 55, 55, 55, 55, 55, 55, 0, 0, 55, 55, 55, 55, 55, 55, 0, 0, 55,
+ 55, 55, 55, 55, 55, 0, 0, 55, 55, 55, 0, 0, 0, 5, 5, 5, 6, 5, 5, 5, 0, 5,
+ 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 21, 21, 5, 5, 0, 0,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 0, 55, 55, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0,
- 0, 0, 5, 5, 5, 0, 0, 0, 0, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 5, 5, 5, 0, 0, 0, 0, 27, 27, 27,
27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 0, 0, 0,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 141, 141, 141, 141, 141, 141, 141, 141, 141,
- 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
- 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
- 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
- 141, 141, 27, 27, 27, 27, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 27, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0,
+ 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
+ 27, 27, 27, 27, 27, 27, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 241, 241,
+ 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
+ 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
+ 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
+ 241, 241, 241, 241, 241, 241, 241, 241, 241, 27, 27, 27, 27, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 27, 27, 5, 0, 0, 0, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 25, 0, 0, 55,
+ 5, 5, 5, 5, 5, 5, 5, 5, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 27, 27,
+ 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
+ 27, 27, 27, 27, 27, 27, 27, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 0, 27, 27, 27, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 141, 55, 55, 55,
- 55, 55, 55, 55, 55, 141, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 27, 27, 27, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 241, 55, 55, 55, 55, 55, 55, 55, 55, 241, 0, 0, 0, 0, 0, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 0, 5, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 25,
+ 25, 25, 25, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 5, 141,
- 141, 141, 141, 141, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
- 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
- 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 292, 293, 293,
- 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293,
- 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293,
- 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 55, 55, 55, 55, 55, 55,
+ 55, 0, 5, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 5, 241, 241, 241,
+ 241, 241, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 480, 480,
+ 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
+ 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480,
+ 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
+ 481, 481, 481, 481, 481, 481, 481, 481, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 0, 0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 0, 0, 55, 0, 55, 55, 55, 55, 55, 55,
+ 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 0, 55, 55, 0, 0, 0, 55, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 5, 27, 27, 27,
- 27, 27, 27, 27, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 27, 27, 27, 27,
- 27, 27, 0, 0, 0, 5, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 5, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 55,
- 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55,
+ 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 55, 55, 55, 55, 55, 55, 0, 0, 55, 0, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 0, 55, 55, 0, 0, 0, 55, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 5, 27, 27, 27, 27,
+ 27, 27, 27, 27, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 5, 5, 27, 27, 27, 27, 27, 27, 27, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0,
+ 27, 27, 27, 27, 27, 27, 27, 27, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 25, 25, 25, 0, 25,
- 25, 0, 0, 0, 0, 0, 25, 25, 25, 25, 55, 55, 55, 55, 0, 55, 55, 55, 0, 55,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 0, 0, 0, 0, 0, 27, 27,
+ 27, 27, 27, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 27, 27, 27, 27, 27, 27, 0, 0, 0, 5, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 25, 25, 25, 0, 0, 0, 0, 25,
- 26, 22, 23, 246, 27, 27, 27, 27, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 27, 27, 5, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 27, 27, 55, 55, 27, 27, 27, 27, 27,
+ 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 0, 0, 27, 27, 27, 27, 27, 27,
+ 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
+ 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
+ 27, 27, 27, 27, 55, 25, 25, 25, 0, 25, 25, 0, 0, 0, 0, 0, 25, 25, 25, 25,
+ 55, 55, 55, 55, 0, 55, 55, 55, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0,
+ 0, 0, 25, 25, 25, 0, 0, 0, 0, 25, 26, 22, 23, 346, 27, 27, 27, 27, 0, 0,
+ 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 27, 27,
- 27, 27, 27, 27, 27, 27, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 27, 27, 27, 27, 27, 27, 27,
- 27, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 27, 27, 5, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 27, 27, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55,
+ 55, 55, 55, 5, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 25, 0, 0, 0,
+ 0, 27, 27, 27, 27, 27, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 27, 27, 27, 27, 27, 27,
+ 27, 27, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 0, 0, 0, 0, 0, 27, 27, 27, 27, 27, 27, 27, 27, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0,
+ 0, 0, 0, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 27, 27, 27,
+ 27, 27, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 108, 108,
+ 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
+ 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
+ 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
+ 108, 108, 108, 108, 108, 108, 108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
+ 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
+ 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
+ 115, 115, 115, 115, 115, 115, 115, 115, 115, 0, 0, 0, 0, 0, 0, 0, 27, 27,
+ 27, 27, 27, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 22, 23, 246, 247, 248, 249, 250, 251, 27,
+ 0, 0, 0, 0, 0, 26, 22, 23, 346, 347, 348, 349, 350, 351, 27, 27, 27, 27,
27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 0, 18, 25, 18, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 0, 18, 25, 18, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
- 25, 25, 25, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 26, 22, 23, 246, 247, 248,
- 249, 250, 251, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 7, 8, 9, 10,
- 11, 12, 13, 14, 15, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 25, 25, 18, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 26, 22, 23, 346, 347, 348, 349, 350,
+ 351, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25, 18,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 18, 18, 18, 25, 25, 25,
- 25, 18, 18, 25, 25, 5, 5, 21, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 7, 8, 9, 10,
- 11, 12, 13, 14, 15, 16, 0, 0, 0, 0, 0, 0, 25, 25, 25, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 25, 25, 25, 25,
- 18, 25, 25, 25, 25, 25, 25, 25, 25, 0, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 18, 18, 18, 25, 25, 25, 25, 18, 18,
+ 25, 25, 5, 5, 21, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 0, 0, 0, 0, 0, 0, 25, 25, 25, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 25, 25, 25, 25, 18, 25, 25,
+ 25, 25, 25, 25, 25, 25, 0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 5, 5, 5,
+ 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 5, 5, 55, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 25, 25, 18, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 18, 18,
+ 18, 25, 25, 25, 25, 25, 25, 25, 25, 25, 18, 18, 55, 55, 55, 55, 5, 5, 5,
+ 5, 5, 25, 25, 25, 5, 0, 0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 55, 5,
+ 55, 5, 5, 5, 0, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
+ 27, 27, 27, 27, 27, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 18, 18, 18, 25, 25, 25, 18, 18, 25, 18, 25, 25, 5, 5, 5,
+ 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55,
+ 55, 55, 55, 55, 55, 0, 55, 0, 55, 55, 55, 55, 0, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 5, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 25, 18, 18, 18, 25, 25, 25, 25, 25, 25, 25, 25, 0, 0, 0, 0, 0, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 0, 0, 0, 0, 0, 0, 25, 25, 18, 18, 0, 55, 55,
+ 55, 55, 55, 55, 55, 55, 0, 0, 55, 55, 0, 0, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55,
+ 55, 55, 55, 55, 55, 0, 55, 55, 0, 55, 55, 55, 55, 55, 0, 0, 25, 55, 18,
+ 18, 25, 18, 18, 18, 18, 0, 0, 18, 18, 0, 0, 18, 18, 18, 0, 0, 55, 0, 0,
+ 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 18, 18, 0, 0, 25, 25,
+ 25, 25, 25, 25, 25, 0, 0, 0, 25, 25, 25, 25, 25, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 18, 18, 18, 25,
+ 25, 25, 25, 25, 25, 18, 25, 18, 18, 18, 18, 25, 25, 18, 25, 25, 55, 55,
+ 5, 55, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 18, 55, 55,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 18, 18, 18, 25, 25, 25, 25, 0, 0, 18, 18, 18, 18, 25, 25, 18, 25,
+ 25, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 55, 55, 55, 55, 25, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 18, 18, 18, 25, 25, 25, 25, 25,
- 25, 25, 25, 25, 18, 18, 55, 55, 55, 55, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0,
- 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 55, 55, 55, 55, 55, 55, 55, 18, 18, 18, 25, 25, 25, 25, 25, 25, 25, 25,
+ 18, 18, 25, 18, 25, 25, 5, 5, 5, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 25, 18, 25, 18, 18, 25, 25, 25, 25, 25,
25, 18, 25, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 25, 25, 25, 18,
+ 18, 25, 25, 25, 25, 18, 25, 25, 25, 25, 25, 0, 0, 0, 0, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 27, 27, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 27, 27, 27, 27, 27, 27, 27,
+ 27, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 241, 241, 241, 241, 241, 241, 241, 241,
+ 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
+ 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
+ 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
+ 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
+ 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
+ 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
+ 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241,
+ 241, 241, 241, 241, 241, 0, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
- 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
- 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
- 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
- 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
- 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
- 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141,
- 141, 141, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 0, 0, 0, 0,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0,
@@ -2607,224 +3539,292 @@ static unsigned short index2[] = {
0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 0, 0, 25, 25, 25, 25, 25, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 18, 18, 18, 18, 18,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 25, 25, 25, 25, 25, 25,
+ 25, 5, 5, 5, 5, 5, 5, 5, 5, 5, 102, 102, 102, 102, 5, 5, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 27, 27, 27, 27,
+ 27, 27, 27, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 18, 18, 18, 18, 18, 18,
18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
- 18, 18, 18, 18, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25,
- 25, 25, 25, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 0, 0, 0,
+ 18, 18, 18, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25,
+ 25, 25, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0,
+ 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 5, 25, 25, 5, 21,
+ 21, 21, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 18, 18, 25, 25, 25,
- 5, 5, 5, 18, 18, 18, 18, 18, 18, 21, 21, 21, 21, 21, 21, 21, 21, 25, 25,
- 25, 25, 25, 25, 25, 25, 5, 5, 25, 25, 25, 25, 25, 25, 25, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0,
+ 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 25, 25, 25, 25, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 18, 18, 25, 25, 25, 5, 5, 5, 18,
+ 18, 18, 18, 18, 18, 21, 21, 21, 21, 21, 21, 21, 21, 25, 25, 25, 25, 25,
+ 25, 25, 25, 5, 5, 25, 25, 25, 25, 25, 25, 25, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 25, 25,
+ 25, 25, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 25, 25, 25, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 5, 5, 5, 5, 5, 5, 25, 25, 25, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 113, 113, 113, 113, 113,
- 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
- 113, 113, 113, 113, 113, 113, 113, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 113,
- 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
- 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 20, 20, 20, 20,
- 20, 20, 20, 0, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
- 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
- 113, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 113, 0, 113, 113, 0, 0, 113, 0, 0,
- 113, 113, 0, 0, 113, 113, 113, 113, 0, 113, 113, 113, 113, 113, 113, 113,
- 113, 20, 20, 20, 20, 0, 20, 0, 20, 20, 20, 20, 20, 20, 20, 0, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 20, 113, 113, 113, 113, 113, 113, 113, 113,
- 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
- 113, 113, 113, 113, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 113, 113, 0, 113,
- 113, 113, 113, 0, 0, 113, 113, 113, 113, 113, 113, 113, 113, 0, 113, 113,
- 113, 113, 113, 113, 113, 0, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 113, 113, 0,
- 113, 113, 113, 113, 0, 113, 113, 113, 113, 113, 0, 113, 0, 0, 0, 113,
- 113, 113, 113, 113, 113, 113, 0, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 113, 113,
- 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
- 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 20, 20, 20, 20, 20, 20,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 27,
+ 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 120, 120, 120, 120, 120, 120, 120,
+ 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
+ 120, 120, 120, 120, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 120, 120, 120, 120,
+ 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
+ 120, 120, 120, 120, 120, 120, 120, 120, 20, 20, 20, 20, 20, 20, 20, 0,
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
- 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 20, 20,
+ 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
+ 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 20, 20, 20,
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
- 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
- 113, 113, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 113, 113, 113, 113, 113, 113,
- 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
- 113, 113, 113, 113, 113, 113, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 113, 113,
- 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
- 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 120, 0, 120, 120, 0, 0, 120, 0, 0, 120, 120, 0, 0,
+ 120, 120, 120, 120, 0, 120, 120, 120, 120, 120, 120, 120, 120, 20, 20,
+ 20, 20, 0, 20, 0, 20, 20, 20, 20, 20, 20, 20, 0, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
+ 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
+ 120, 120, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 120, 120, 0, 120, 120, 120, 120,
+ 0, 0, 120, 120, 120, 120, 120, 120, 120, 120, 0, 120, 120, 120, 120, 120,
+ 120, 120, 0, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 120, 120, 0, 120, 120, 120,
+ 120, 0, 120, 120, 120, 120, 120, 0, 120, 0, 0, 0, 120, 120, 120, 120,
+ 120, 120, 120, 0, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 120, 120, 120, 120, 120,
+ 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
+ 120, 120, 120, 120, 120, 120, 120, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 120,
+ 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
+ 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 20, 20, 20, 20,
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
- 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 20, 20,
+ 20, 20, 20, 20, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
+ 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
+ 120, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 120, 120, 120, 120, 120, 120, 120,
+ 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
+ 120, 120, 120, 120, 120, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 120, 120, 120,
+ 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
+ 120, 120, 120, 120, 120, 120, 120, 120, 120, 20, 20, 20, 20, 20, 20, 20,
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 20, 0, 0, 113, 113, 113, 113, 113, 113, 113,
- 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
- 113, 113, 113, 113, 5, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 5, 20, 20, 20, 20,
- 20, 20, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
- 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 5, 20, 20,
+ 20, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
+ 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 20, 20, 20,
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 5, 20, 20, 20, 20, 20, 20, 113, 113, 113, 113, 113,
- 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
- 113, 113, 113, 113, 113, 113, 5, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 5, 20, 20,
- 20, 20, 20, 20, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
- 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 5,
+ 20, 20, 20, 20, 20, 20, 20, 0, 0, 120, 120, 120, 120, 120, 120, 120, 120,
+ 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
+ 120, 120, 120, 5, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 5, 20, 20, 20, 20, 20, 20,
+ 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
+ 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 5, 20, 20, 20, 20,
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 20, 20, 20, 20, 20, 20, 20, 5, 20, 20, 20, 20, 20, 20, 113, 113, 113,
- 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
- 113, 113, 113, 113, 113, 113, 113, 113, 5, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 5, 20, 20, 20, 20, 20, 20, 120, 120, 120, 120, 120, 120, 120,
+ 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
+ 120, 120, 120, 120, 5, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 5, 20, 20, 20, 20,
+ 20, 20, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
+ 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 5, 20, 20,
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
- 5, 20, 20, 20, 20, 20, 20, 113, 20, 0, 0, 7, 8, 9, 10, 11, 12, 13, 14,
- 15, 16, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 7, 8, 9, 10, 11, 12, 13, 14,
- 15, 16, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 7, 8, 9, 10, 11, 12, 13, 14,
- 15, 16, 55, 55, 55, 55, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55,
- 55, 0, 55, 0, 0, 55, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55,
- 55, 55, 55, 0, 55, 0, 55, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, 55, 0, 55, 0,
- 55, 0, 55, 55, 55, 0, 55, 55, 0, 55, 0, 0, 55, 0, 55, 0, 55, 0, 55, 0,
- 55, 0, 55, 55, 0, 55, 0, 0, 55, 55, 55, 55, 0, 55, 55, 55, 55, 55, 55,
- 55, 0, 55, 55, 55, 55, 0, 55, 55, 55, 55, 0, 55, 0, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 55, 55, 55, 0, 55, 55, 55, 55, 55, 0,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0,
+ 20, 20, 20, 20, 20, 5, 20, 20, 20, 20, 20, 20, 120, 120, 120, 120, 120,
+ 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
+ 120, 120, 120, 120, 120, 120, 5, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 5, 20, 20,
+ 20, 20, 20, 20, 120, 20, 0, 0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 7, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 7, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 5, 5, 5, 5, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 5, 5,
+ 5, 5, 5, 5, 5, 5, 25, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 25, 5, 5,
+ 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25, 25,
+ 25, 25, 0, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 0, 0, 27, 27, 27, 27, 27, 27, 27, 27, 27, 25, 25, 25, 25, 25, 25,
+ 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 0,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 0, 55, 0, 0, 55, 0, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 0, 55, 0, 55, 0,
+ 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, 55, 0, 55, 0, 55, 0, 55, 55, 55, 0, 55,
+ 55, 0, 55, 0, 0, 55, 0, 55, 0, 55, 0, 55, 0, 55, 0, 55, 55, 0, 55, 0, 0,
+ 55, 55, 55, 55, 0, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 0, 55,
+ 55, 55, 55, 0, 55, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0,
+ 0, 55, 55, 55, 0, 55, 55, 55, 55, 55, 0, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 245, 245, 26, 22, 23, 246, 247, 248, 249,
- 250, 251, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 345, 345, 26, 22, 23, 346, 347, 348, 349, 350, 351, 27, 27, 0, 0, 0, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 5, 5, 5, 5, 5, 5, 0, 482, 482, 482, 482, 482, 482, 482, 482, 482, 482,
+ 482, 482, 482, 482, 482, 482, 482, 482, 482, 482, 482, 482, 482, 482,
+ 482, 482, 5, 5, 5, 5, 5, 5, 482, 482, 482, 482, 482, 482, 482, 482, 482,
+ 482, 482, 482, 482, 482, 482, 482, 482, 482, 482, 482, 482, 482, 482,
+ 482, 482, 482, 5, 5, 0, 0, 0, 0, 482, 482, 482, 482, 482, 482, 482, 482,
+ 482, 482, 482, 482, 482, 482, 482, 482, 482, 482, 482, 482, 482, 482,
+ 482, 482, 482, 482, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 0, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 5,
- 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0,
- 5, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 5, 5, 5, 0, 0, 0,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 5, 5, 5, 5, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 0, 0, 0, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 55, 274, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 374, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 274, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 374, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 274, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 374, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 274, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 374, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 274, 55, 55,
- 55, 55, 55, 55, 55, 55, 274, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 274, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 374, 55, 55, 55, 55, 55, 55, 55, 55, 374, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 374, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
@@ -2834,33 +3834,33 @@ static unsigned short index2[] = {
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 274, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 274, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 274, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 374, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 374, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 374, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 274, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 374, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 274, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 374,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 274, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 374, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
@@ -2870,34 +3870,48 @@ static unsigned short index2[] = {
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 274, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 374, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
- 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21,
- 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 0, 0, 0, 0, 0, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
- 21, 21, 21, 21, 21, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
@@ -2910,13 +3924,13 @@ static unsigned short index2[] = {
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
- 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0,
};
/* Returns the numeric value as double for Unicode characters
@@ -2941,6 +3955,7 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x0C78:
case 0x0CE6:
case 0x0D66:
+ case 0x0DE6:
case 0x0E50:
case 0x0ED0:
case 0x0F20:
@@ -2969,6 +3984,7 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0xA8D0:
case 0xA900:
case 0xA9D0:
+ case 0xA9F0:
case 0xAA50:
case 0xABF0:
case 0xF9B2:
@@ -2979,7 +3995,14 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x110F0:
case 0x11136:
case 0x111D0:
+ case 0x112F0:
+ case 0x114D0:
+ case 0x11650:
case 0x116C0:
+ case 0x11730:
+ case 0x118E0:
+ case 0x16A60:
+ case 0x16B50:
case 0x1D7CE:
case 0x1D7D8:
case 0x1D7E2:
@@ -2987,6 +4010,8 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x1D7F6:
case 0x1F100:
case 0x1F101:
+ case 0x1F10B:
+ case 0x1F10C:
return (double) 0.0;
case 0x0031:
case 0x00B9:
@@ -3004,6 +4029,7 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x0C7C:
case 0x0CE7:
case 0x0D67:
+ case 0x0DE7:
case 0x0E51:
case 0x0ED1:
case 0x0F21:
@@ -3047,6 +4073,7 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0xA8D1:
case 0xA901:
case 0xA9D1:
+ case 0xA9F1:
case 0xAA51:
case 0xABF1:
case 0xFF11:
@@ -3055,39 +4082,59 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x10158:
case 0x10159:
case 0x1015A:
+ case 0x102E1:
case 0x10320:
case 0x103D1:
case 0x104A1:
case 0x10858:
+ case 0x10879:
+ case 0x108A7:
+ case 0x108FB:
case 0x10916:
+ case 0x109C0:
case 0x10A40:
case 0x10A7D:
+ case 0x10A9D:
+ case 0x10AEB:
case 0x10B58:
case 0x10B78:
+ case 0x10BA9:
+ case 0x10CFA:
case 0x10E60:
case 0x11052:
case 0x11067:
case 0x110F1:
case 0x11137:
case 0x111D1:
+ case 0x111E1:
+ case 0x112F1:
+ case 0x114D1:
+ case 0x11651:
case 0x116C1:
+ case 0x11731:
+ case 0x118E1:
case 0x12415:
case 0x1241E:
case 0x1242C:
case 0x12434:
case 0x1244F:
case 0x12458:
+ case 0x16A61:
+ case 0x16B51:
case 0x1D360:
case 0x1D7CF:
case 0x1D7D9:
case 0x1D7E3:
case 0x1D7ED:
case 0x1D7F7:
+ case 0x1E8C7:
case 0x1F102:
case 0x2092A:
return (double) 1.0;
case 0x2152:
return (double) 1.0/10.0;
+ case 0x109F6:
+ return (double) 1.0/12.0;
case 0x09F4:
case 0x0B75:
case 0xA833:
@@ -3101,12 +4148,15 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x10141:
case 0x10175:
case 0x10176:
+ case 0x109BD:
case 0x10E7B:
+ case 0x12464:
return (double) 1.0/2.0;
case 0x2153:
case 0x10E7D:
case 0x1245A:
case 0x1245D:
+ case 0x12465:
return (double) 1.0/3.0;
case 0x00BC:
case 0x09F7:
@@ -3114,9 +4164,11 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x0D73:
case 0xA830:
case 0x10140:
+ case 0x1018B:
case 0x10E7C:
case 0x12460:
case 0x12462:
+ case 0x12463:
return (double) 1.0/4.0;
case 0x2155:
return (double) 1.0/5.0;
@@ -3163,17 +4215,32 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x10162:
case 0x10163:
case 0x10164:
+ case 0x102EA:
case 0x10322:
case 0x103D3:
case 0x1085B:
+ case 0x1087E:
+ case 0x108AD:
+ case 0x108FD:
case 0x10917:
+ case 0x109C9:
case 0x10A44:
+ case 0x10A9E:
+ case 0x10AED:
case 0x10B5C:
case 0x10B7C:
+ case 0x10BAD:
+ case 0x10CFC:
case 0x10E69:
case 0x1105B:
+ case 0x111EA:
+ case 0x1173A:
+ case 0x118EA:
+ case 0x16B5B:
case 0x1D369:
return (double) 10.0;
+ case 0x109FF:
+ return (double) 10.0/12.0;
case 0x0BF1:
case 0x0D71:
case 0x137B:
@@ -3186,14 +4253,23 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x1014B:
case 0x10152:
case 0x1016A:
+ case 0x102F3:
case 0x103D5:
case 0x1085D:
+ case 0x108AF:
+ case 0x108FF:
case 0x10919:
+ case 0x109D2:
case 0x10A46:
+ case 0x10AEF:
case 0x10B5E:
case 0x10B7E:
+ case 0x10BAF:
+ case 0x10CFE:
case 0x10E72:
case 0x11064:
+ case 0x111F3:
+ case 0x16B5C:
return (double) 100.0;
case 0x0BF2:
case 0x0D72:
@@ -3208,10 +4284,13 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x10154:
case 0x10171:
case 0x1085E:
+ case 0x109DB:
case 0x10A47:
case 0x10B5F:
case 0x10B7F:
+ case 0x10CFF:
case 0x11065:
+ case 0x111F4:
return (double) 1000.0;
case 0x137C:
case 0x2182:
@@ -3220,13 +4299,22 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x1012B:
case 0x10155:
case 0x1085F:
+ case 0x109E4:
+ case 0x16B5D:
return (double) 10000.0;
case 0x2188:
+ case 0x109ED:
return (double) 100000.0;
+ case 0x16B5E:
+ return (double) 1000000.0;
case 0x4EBF:
case 0x5104:
+ case 0x16B5F:
return (double) 100000000.0;
+ case 0x16B60:
+ return (double) 10000000000.0;
case 0x5146:
+ case 0x16B61:
return (double) 1000000000000.0;
case 0x216A:
case 0x217A:
@@ -3235,6 +4323,8 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x2492:
case 0x24EB:
return (double) 11.0;
+ case 0x109BC:
+ return (double) 11.0/12.0;
case 0x0F2F:
return (double) 11.0/2.0;
case 0x216B:
@@ -3305,6 +4395,7 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x0C7D:
case 0x0CE8:
case 0x0D68:
+ case 0x0DE8:
case 0x0E52:
case 0x0ED2:
case 0x0F22:
@@ -3349,6 +4440,7 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0xA8D2:
case 0xA902:
case 0xA9D2:
+ case 0xA9F2:
case 0xAA52:
case 0xABF2:
case 0xF978:
@@ -3358,20 +4450,31 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x1015C:
case 0x1015D:
case 0x1015E:
+ case 0x102E2:
case 0x103D2:
case 0x104A2:
case 0x10859:
+ case 0x1087A:
+ case 0x108A8:
case 0x1091A:
+ case 0x109C1:
case 0x10A41:
case 0x10B59:
case 0x10B79:
+ case 0x10BAA:
case 0x10E61:
case 0x11053:
case 0x11068:
case 0x110F2:
case 0x11138:
case 0x111D2:
+ case 0x111E2:
+ case 0x112F2:
+ case 0x114D2:
+ case 0x11652:
case 0x116C2:
+ case 0x11732:
+ case 0x118E2:
case 0x12400:
case 0x12416:
case 0x1241F:
@@ -3382,20 +4485,26 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x12450:
case 0x12456:
case 0x12459:
+ case 0x16A62:
+ case 0x16B52:
case 0x1D361:
case 0x1D7D0:
case 0x1D7DA:
case 0x1D7E4:
case 0x1D7EE:
case 0x1D7F8:
+ case 0x1E8C8:
case 0x1F103:
case 0x22390:
return (double) 2.0;
+ case 0x109F7:
+ return (double) 2.0/12.0;
case 0x2154:
case 0x10177:
case 0x10E7E:
case 0x1245B:
case 0x1245E:
+ case 0x12466:
return (double) 2.0/3.0;
case 0x2156:
return (double) 2.0/5.0;
@@ -3409,23 +4518,40 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x5344:
case 0x5EFF:
case 0x10111:
+ case 0x102EB:
case 0x103D4:
case 0x1085C:
+ case 0x1087F:
+ case 0x108AE:
+ case 0x108FE:
case 0x10918:
+ case 0x109CA:
case 0x10A45:
+ case 0x10A9F:
+ case 0x10AEE:
case 0x10B5D:
case 0x10B7D:
+ case 0x10BAE:
case 0x10E6A:
case 0x1105C:
+ case 0x111EB:
+ case 0x1173B:
+ case 0x118EB:
case 0x1D36A:
return (double) 20.0;
case 0x1011A:
+ case 0x102F4:
+ case 0x109D3:
case 0x10E73:
return (double) 200.0;
case 0x10123:
+ case 0x109DC:
return (double) 2000.0;
case 0x1012C:
+ case 0x109E5:
return (double) 20000.0;
+ case 0x109EE:
+ return (double) 200000.0;
case 0x3251:
return (double) 21.0;
case 0x12432:
@@ -3462,6 +4588,7 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x0C7E:
case 0x0CE9:
case 0x0D69:
+ case 0x0DE9:
case 0x0E53:
case 0x0ED3:
case 0x0F23:
@@ -3505,24 +4632,36 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0xA8D3:
case 0xA903:
case 0xA9D3:
+ case 0xA9F3:
case 0xAA53:
case 0xABF3:
case 0xF96B:
case 0xFF13:
case 0x10109:
+ case 0x102E3:
case 0x104A3:
case 0x1085A:
+ case 0x1087B:
+ case 0x108A9:
case 0x1091B:
+ case 0x109C2:
case 0x10A42:
case 0x10B5A:
case 0x10B7A:
+ case 0x10BAB:
case 0x10E62:
case 0x11054:
case 0x11069:
case 0x110F3:
case 0x11139:
case 0x111D3:
+ case 0x111E3:
+ case 0x112F3:
+ case 0x114D3:
+ case 0x11653:
case 0x116C3:
+ case 0x11733:
+ case 0x118E3:
case 0x12401:
case 0x12408:
case 0x12417:
@@ -3538,18 +4677,23 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x1244B:
case 0x12451:
case 0x12457:
+ case 0x16A63:
+ case 0x16B53:
case 0x1D362:
case 0x1D7D1:
case 0x1D7DB:
case 0x1D7E5:
case 0x1D7EF:
case 0x1D7F9:
+ case 0x1E8C9:
case 0x1F104:
case 0x20AFD:
case 0x20B19:
case 0x22998:
case 0x23B1B:
return (double) 3.0;
+ case 0x109F8:
+ return (double) 3.0/12.0;
case 0x09F6:
case 0x0B77:
case 0xA835:
@@ -3574,19 +4718,29 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x5345:
case 0x10112:
case 0x10165:
+ case 0x102EC:
+ case 0x109CB:
case 0x10E6B:
case 0x1105D:
+ case 0x111EC:
+ case 0x118EC:
case 0x1D36B:
case 0x20983:
return (double) 30.0;
case 0x1011B:
case 0x1016B:
+ case 0x102F5:
+ case 0x109D4:
case 0x10E74:
return (double) 300.0;
case 0x10124:
+ case 0x109DD:
return (double) 3000.0;
case 0x1012D:
+ case 0x109E6:
return (double) 30000.0;
+ case 0x109EF:
+ return (double) 300000.0;
case 0x325B:
return (double) 31.0;
case 0x325C:
@@ -3618,6 +4772,7 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x0C6A:
case 0x0CEA:
case 0x0D6A:
+ case 0x0DEA:
case 0x0E54:
case 0x0ED4:
case 0x0F24:
@@ -3658,21 +4813,34 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0xA8D4:
case 0xA904:
case 0xA9D4:
+ case 0xA9F4:
case 0xAA54:
case 0xABF4:
case 0xFF14:
case 0x1010A:
+ case 0x102E4:
case 0x104A4:
+ case 0x1087C:
+ case 0x108AA:
+ case 0x108AB:
+ case 0x109C3:
case 0x10A43:
case 0x10B5B:
case 0x10B7B:
+ case 0x10BAC:
case 0x10E63:
case 0x11055:
case 0x1106A:
case 0x110F4:
case 0x1113A:
case 0x111D4:
+ case 0x111E4:
+ case 0x112F4:
+ case 0x114D4:
+ case 0x11654:
case 0x116C4:
+ case 0x11734:
+ case 0x118E4:
case 0x12402:
case 0x12409:
case 0x1240F:
@@ -3688,17 +4856,23 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x1244C:
case 0x12452:
case 0x12453:
+ case 0x12469:
+ case 0x16A64:
+ case 0x16B54:
case 0x1D363:
case 0x1D7D2:
case 0x1D7DC:
case 0x1D7E6:
case 0x1D7F0:
case 0x1D7FA:
+ case 0x1E8CA:
case 0x1F105:
case 0x20064:
case 0x200E2:
case 0x2626D:
return (double) 4.0;
+ case 0x109F9:
+ return (double) 4.0/12.0;
case 0x2158:
return (double) 4.0/5.0;
case 0x1375:
@@ -3706,19 +4880,30 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x32B5:
case 0x534C:
case 0x10113:
+ case 0x102ED:
+ case 0x109CC:
case 0x10E6C:
case 0x1105E:
+ case 0x111ED:
+ case 0x118ED:
+ case 0x12467:
case 0x1D36C:
case 0x2098C:
case 0x2099C:
return (double) 40.0;
case 0x1011C:
+ case 0x102F6:
+ case 0x109D5:
case 0x10E75:
return (double) 400.0;
case 0x10125:
+ case 0x109DE:
return (double) 4000.0;
case 0x1012E:
+ case 0x109E7:
return (double) 40000.0;
+ case 0x109F0:
+ return (double) 400000.0;
case 0x32B6:
return (double) 41.0;
case 0x32B7:
@@ -3752,6 +4937,7 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x0C6B:
case 0x0CEB:
case 0x0D6B:
+ case 0x0DEB:
case 0x0E55:
case 0x0ED5:
case 0x0F25:
@@ -3792,6 +4978,7 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0xA8D5:
case 0xA905:
case 0xA9D5:
+ case 0xA9F5:
case 0xAA55:
case 0xABF5:
case 0xFF15:
@@ -3801,15 +4988,28 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x1014F:
case 0x1015F:
case 0x10173:
+ case 0x102E5:
case 0x10321:
case 0x104A5:
+ case 0x1087D:
+ case 0x108AC:
+ case 0x108FC:
+ case 0x109C4:
+ case 0x10AEC:
+ case 0x10CFB:
case 0x10E64:
case 0x11056:
case 0x1106B:
case 0x110F5:
case 0x1113B:
case 0x111D5:
+ case 0x111E5:
+ case 0x112F5:
+ case 0x114D5:
+ case 0x11655:
case 0x116C5:
+ case 0x11735:
+ case 0x118E5:
case 0x12403:
case 0x1240A:
case 0x12410:
@@ -3821,15 +5021,21 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x1244D:
case 0x12454:
case 0x12455:
+ case 0x1246A:
+ case 0x16A65:
+ case 0x16B55:
case 0x1D364:
case 0x1D7D3:
case 0x1D7DD:
case 0x1D7E7:
case 0x1D7F1:
case 0x1D7FB:
+ case 0x1E8CB:
case 0x1F106:
case 0x20121:
return (double) 5.0;
+ case 0x109FA:
+ return (double) 5.0/12.0;
case 0x0F2C:
return (double) 5.0/2.0;
case 0x215A:
@@ -3852,10 +5058,16 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x10168:
case 0x10169:
case 0x10174:
+ case 0x102EE:
case 0x10323:
+ case 0x109CD:
case 0x10A7E:
+ case 0x10CFD:
case 0x10E6D:
case 0x1105F:
+ case 0x111EE:
+ case 0x118EE:
+ case 0x12468:
case 0x1D36D:
return (double) 50.0;
case 0x216E:
@@ -3869,6 +5081,8 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x1016E:
case 0x1016F:
case 0x10170:
+ case 0x102F7:
+ case 0x109D6:
case 0x10E76:
return (double) 500.0;
case 0x2181:
@@ -3876,12 +5090,16 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x10146:
case 0x1014E:
case 0x10172:
+ case 0x109DF:
return (double) 5000.0;
case 0x2187:
case 0x1012F:
case 0x10147:
case 0x10156:
+ case 0x109E8:
return (double) 50000.0;
+ case 0x109F1:
+ return (double) 500000.0;
case 0x0036:
case 0x0666:
case 0x06F6:
@@ -3895,6 +5113,7 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x0C6C:
case 0x0CEC:
case 0x0D6C:
+ case 0x0DEC:
case 0x0E56:
case 0x0ED6:
case 0x0F26:
@@ -3935,20 +5154,29 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0xA8D6:
case 0xA906:
case 0xA9D6:
+ case 0xA9F6:
case 0xAA56:
case 0xABF6:
case 0xF9D1:
case 0xF9D3:
case 0xFF16:
case 0x1010C:
+ case 0x102E6:
case 0x104A6:
+ case 0x109C5:
case 0x10E65:
case 0x11057:
case 0x1106C:
case 0x110F6:
case 0x1113C:
case 0x111D6:
+ case 0x111E6:
+ case 0x112F6:
+ case 0x114D6:
+ case 0x11656:
case 0x116C6:
+ case 0x11736:
+ case 0x118E6:
case 0x12404:
case 0x1240B:
case 0x12411:
@@ -3956,29 +5184,45 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x12428:
case 0x12440:
case 0x1244E:
+ case 0x1246B:
+ case 0x16A66:
+ case 0x16B56:
case 0x1D365:
case 0x1D7D4:
case 0x1D7DE:
case 0x1D7E8:
case 0x1D7F2:
case 0x1D7FC:
+ case 0x1E8CC:
case 0x1F107:
case 0x20AEA:
return (double) 6.0;
+ case 0x109FB:
+ return (double) 6.0/12.0;
case 0x1377:
case 0x324D:
case 0x10115:
+ case 0x102EF:
+ case 0x109CE:
case 0x10E6E:
case 0x11060:
+ case 0x111EF:
+ case 0x118EF:
case 0x1D36E:
return (double) 60.0;
case 0x1011E:
+ case 0x102F8:
+ case 0x109D7:
case 0x10E77:
return (double) 600.0;
case 0x10127:
+ case 0x109E0:
return (double) 6000.0;
case 0x10130:
+ case 0x109E9:
return (double) 60000.0;
+ case 0x109F2:
+ return (double) 600000.0;
case 0x0037:
case 0x0667:
case 0x06F7:
@@ -3992,6 +5236,7 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x0C6D:
case 0x0CED:
case 0x0D6D:
+ case 0x0DED:
case 0x0E57:
case 0x0ED7:
case 0x0F27:
@@ -4032,18 +5277,27 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0xA8D7:
case 0xA907:
case 0xA9D7:
+ case 0xA9F7:
case 0xAA57:
case 0xABF7:
case 0xFF17:
case 0x1010D:
+ case 0x102E7:
case 0x104A7:
+ case 0x109C6:
case 0x10E66:
case 0x11058:
case 0x1106D:
case 0x110F7:
case 0x1113D:
case 0x111D7:
+ case 0x111E7:
+ case 0x112F7:
+ case 0x114D7:
+ case 0x11657:
case 0x116C7:
+ case 0x11737:
+ case 0x118E7:
case 0x12405:
case 0x1240C:
case 0x12412:
@@ -4052,15 +5306,21 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x12441:
case 0x12442:
case 0x12443:
+ case 0x1246C:
+ case 0x16A67:
+ case 0x16B57:
case 0x1D366:
case 0x1D7D5:
case 0x1D7DF:
case 0x1D7E9:
case 0x1D7F3:
case 0x1D7FD:
+ case 0x1E8CD:
case 0x1F108:
case 0x20001:
return (double) 7.0;
+ case 0x109FC:
+ return (double) 7.0/12.0;
case 0x0F2D:
return (double) 7.0/2.0;
case 0x215E:
@@ -4068,17 +5328,27 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x1378:
case 0x324E:
case 0x10116:
+ case 0x102F0:
+ case 0x109CF:
case 0x10E6F:
case 0x11061:
+ case 0x111F0:
+ case 0x118F0:
case 0x1D36F:
return (double) 70.0;
case 0x1011F:
+ case 0x102F9:
+ case 0x109D8:
case 0x10E78:
return (double) 700.0;
case 0x10128:
+ case 0x109E1:
return (double) 7000.0;
case 0x10131:
+ case 0x109EA:
return (double) 70000.0;
+ case 0x109F3:
+ return (double) 700000.0;
case 0x0038:
case 0x0668:
case 0x06F8:
@@ -4092,6 +5362,7 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x0C6E:
case 0x0CEE:
case 0x0D6E:
+ case 0x0DEE:
case 0x0E58:
case 0x0ED8:
case 0x0F28:
@@ -4130,18 +5401,27 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0xA8D8:
case 0xA908:
case 0xA9D8:
+ case 0xA9F8:
case 0xAA58:
case 0xABF8:
case 0xFF18:
case 0x1010E:
+ case 0x102E8:
case 0x104A8:
+ case 0x109C7:
case 0x10E67:
case 0x11059:
case 0x1106E:
case 0x110F8:
case 0x1113E:
case 0x111D8:
+ case 0x111E8:
+ case 0x112F8:
+ case 0x114D8:
+ case 0x11658:
case 0x116C8:
+ case 0x11738:
+ case 0x118E8:
case 0x12406:
case 0x1240D:
case 0x12413:
@@ -4149,28 +5429,43 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x1242A:
case 0x12444:
case 0x12445:
+ case 0x1246D:
+ case 0x16A68:
+ case 0x16B58:
case 0x1D367:
case 0x1D7D6:
case 0x1D7E0:
case 0x1D7EA:
case 0x1D7F4:
case 0x1D7FE:
+ case 0x1E8CE:
case 0x1F109:
return (double) 8.0;
+ case 0x109FD:
+ return (double) 8.0/12.0;
case 0x1379:
case 0x324F:
case 0x10117:
+ case 0x102F1:
case 0x10E70:
case 0x11062:
+ case 0x111F1:
+ case 0x118F1:
case 0x1D370:
return (double) 80.0;
case 0x10120:
+ case 0x102FA:
+ case 0x109D9:
case 0x10E79:
return (double) 800.0;
case 0x10129:
+ case 0x109E2:
return (double) 8000.0;
case 0x10132:
+ case 0x109EB:
return (double) 80000.0;
+ case 0x109F4:
+ return (double) 800000.0;
case 0x0039:
case 0x0669:
case 0x06F9:
@@ -4184,6 +5479,7 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x0C6F:
case 0x0CEF:
case 0x0D6F:
+ case 0x0DEF:
case 0x0E59:
case 0x0ED9:
case 0x0F29:
@@ -4223,18 +5519,27 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0xA8D9:
case 0xA909:
case 0xA9D9:
+ case 0xA9F9:
case 0xAA59:
case 0xABF9:
case 0xFF19:
case 0x1010F:
+ case 0x102E9:
case 0x104A9:
+ case 0x109C8:
case 0x10E68:
case 0x1105A:
case 0x1106F:
case 0x110F9:
case 0x1113F:
case 0x111D9:
+ case 0x111E9:
+ case 0x112F9:
+ case 0x114D9:
+ case 0x11659:
case 0x116C9:
+ case 0x11739:
+ case 0x118E9:
case 0x12407:
case 0x1240E:
case 0x12414:
@@ -4244,32 +5549,47 @@ double _PyUnicode_ToNumeric(Py_UCS4 ch)
case 0x12447:
case 0x12448:
case 0x12449:
+ case 0x1246E:
+ case 0x16A69:
+ case 0x16B59:
case 0x1D368:
case 0x1D7D7:
case 0x1D7E1:
case 0x1D7EB:
case 0x1D7F5:
case 0x1D7FF:
+ case 0x1E8CF:
case 0x1F10A:
case 0x2F890:
return (double) 9.0;
+ case 0x109FE:
+ return (double) 9.0/12.0;
case 0x0F2E:
return (double) 9.0/2.0;
case 0x137A:
case 0x10118:
+ case 0x102F2:
case 0x10341:
case 0x10E71:
case 0x11063:
+ case 0x111F2:
+ case 0x118F2:
case 0x1D371:
return (double) 90.0;
case 0x10121:
+ case 0x102FB:
case 0x1034A:
+ case 0x109DA:
case 0x10E7A:
return (double) 900.0;
case 0x1012A:
+ case 0x109E3:
return (double) 9000.0;
case 0x10133:
+ case 0x109EC:
return (double) 90000.0;
+ case 0x109F5:
+ return (double) 900000.0;
}
return -1.0;
}
diff --git a/Objects/weakrefobject.c b/Objects/weakrefobject.c
index d4d52e60ae..7e6f36458b 100644
--- a/Objects/weakrefobject.c
+++ b/Objects/weakrefobject.c
@@ -268,7 +268,6 @@ static int
parse_weakref_init_args(char *funcname, PyObject *args, PyObject *kwargs,
PyObject **obp, PyObject **callbackp)
{
- /* XXX Should check that kwargs == NULL or is empty. */
return PyArg_UnpackTuple(args, funcname, 1, 2, obp, callbackp);
}
@@ -331,6 +330,9 @@ weakref___init__(PyObject *self, PyObject *args, PyObject *kwargs)
{
PyObject *tmp;
+ if (!_PyArg_NoKeywords("ref()", kwargs))
+ return -1;
+
if (parse_weakref_init_args("__init__", args, kwargs, &tmp, &tmp))
return 0;
else
diff --git a/PC/VS9.0/_bz2.vcproj b/PC/VS9.0/_bz2.vcproj
deleted file mode 100644
index 7ceb8c7f08..0000000000
--- a/PC/VS9.0/_bz2.vcproj
+++ /dev/null
@@ -1,581 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="_bz2"
- ProjectGUID="{73FCD2BD-F133-46B7-8EC1-144CD82A59D5}"
- RootNamespace="bz2"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(bz2Dir)"
- PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1D170000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(bz2Dir)"
- PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1D170000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(bz2Dir)"
- PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1D170000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(bz2Dir)"
- PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1D170000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(bz2Dir)"
- PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1D170000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(bz2Dir)"
- PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1D170000"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(bz2Dir)"
- PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1D170000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(bz2Dir)"
- PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1D170000"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- >
- <File
- RelativePath="..\..\Modules\_bz2module.c"
- >
- </File>
- </Filter>
- <Filter
- Name="bzip2 1.0.6 Header Files"
- >
- <File
- RelativePath="$(bz2Dir)\bzlib.h"
- >
- </File>
- <File
- RelativePath="$(bz2Dir)\bzlib_private.h"
- >
- </File>
- </Filter>
- <Filter
- Name="bzip2 1.0.6 Source Files"
- >
- <File
- RelativePath="$(bz2Dir)\blocksort.c"
- >
- </File>
- <File
- RelativePath="$(bz2Dir)\bzlib.c"
- >
- </File>
- <File
- RelativePath="$(bz2Dir)\compress.c"
- >
- </File>
- <File
- RelativePath="$(bz2Dir)\crctable.c"
- >
- </File>
- <File
- RelativePath="$(bz2Dir)\decompress.c"
- >
- </File>
- <File
- RelativePath="$(bz2Dir)\huffman.c"
- >
- </File>
- <File
- RelativePath="$(bz2Dir)\randtable.c"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/VS9.0/_ctypes.vcproj b/PC/VS9.0/_ctypes.vcproj
deleted file mode 100644
index 8e5cba14fc..0000000000
--- a/PC/VS9.0/_ctypes.vcproj
+++ /dev/null
@@ -1,705 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="_ctypes"
- ProjectGUID="{0E9791DB-593A-465F-98BC-681011311618}"
- RootNamespace="_ctypes"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\Modules\_ctypes\libffi_msvc"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1D1A0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\Modules\_ctypes\libffi_msvc"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1D1A0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\Modules\_ctypes\libffi_msvc"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalOptions="/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE"
- SubSystem="0"
- BaseAddress="0x1D1A0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\Modules\_ctypes\libffi_msvc"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalOptions="/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE"
- SubSystem="0"
- BaseAddress="0x1D1A0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\Modules\_ctypes\libffi_msvc"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalOptions="/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE"
- SubSystem="0"
- BaseAddress="0x1D1A0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\Modules\_ctypes\libffi_msvc"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalOptions="/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE"
- SubSystem="0"
- BaseAddress="0x1D1A0000"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\Modules\_ctypes\libffi_msvc"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalOptions="/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE"
- SubSystem="0"
- BaseAddress="0x1D1A0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\Modules\_ctypes\libffi_msvc"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalOptions="/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE"
- SubSystem="0"
- BaseAddress="0x1D1A0000"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Header Files"
- >
- <File
- RelativePath="..\..\Modules\_ctypes\ctypes.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_ctypes\ctypes_dlfcn.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_ctypes\libffi_msvc\ffi.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_ctypes\libffi_msvc\ffi_common.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_ctypes\libffi_msvc\fficonfig.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_ctypes\libffi_msvc\ffitarget.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Source Files"
- >
- <File
- RelativePath="..\..\Modules\_ctypes\_ctypes.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_ctypes\callbacks.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_ctypes\callproc.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_ctypes\cfield.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_ctypes\libffi_msvc\ffi.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_ctypes\malloc_closure.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_ctypes\libffi_msvc\prep_cif.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_ctypes\stgdict.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_ctypes\libffi_msvc\win32.c"
- >
- <FileConfiguration
- Name="Debug|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="PGInstrument|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="PGUpdate|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\Modules\_ctypes\libffi_msvc\win64.asm"
- >
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCustomBuildTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- CommandLine="ml64 /nologo /c /Zi /Fo &quot;$(IntDir)\win64.obj&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
- Outputs="$(IntDir)\win64.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCustomBuildTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- CommandLine="ml64 /nologo /c /Fo &quot;$(IntDir)\win64.obj&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
- Outputs="$(IntDir)\win64.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="PGInstrument|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCustomBuildTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="PGInstrument|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- CommandLine="ml64 /nologo /c /Fo &quot;$(IntDir)\win64.obj&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
- Outputs="$(IntDir)\win64.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="PGUpdate|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCustomBuildTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="PGUpdate|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- CommandLine="ml64 /nologo /c /Fo &quot;$(IntDir)\win64.obj&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
- Outputs="$(IntDir)\win64.obj"
- />
- </FileConfiguration>
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/VS9.0/_ctypes_test.vcproj b/PC/VS9.0/_ctypes_test.vcproj
deleted file mode 100644
index 7033546211..0000000000
--- a/PC/VS9.0/_ctypes_test.vcproj
+++ /dev/null
@@ -1,521 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="_ctypes_test"
- ProjectGUID="{9EC7190A-249F-4180-A900-548FDCF3055F}"
- RootNamespace="_ctypes_test"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Header Files"
- >
- <File
- RelativePath="..\..\Modules\_ctypes\_ctypes_test.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Source Files"
- >
- <File
- RelativePath="..\..\Modules\_ctypes\_ctypes_test.c"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/VS9.0/_decimal.vcproj b/PC/VS9.0/_decimal.vcproj
deleted file mode 100644
index b9fabb0cb9..0000000000
--- a/PC/VS9.0/_decimal.vcproj
+++ /dev/null
@@ -1,743 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="_decimal"
- ProjectGUID="{0E9791DB-593A-465F-98BC-681011311617}"
- RootNamespace="_decimal"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/D_CRT_SECURE_NO_WARNINGS /DCONFIG_32 /DPPRO /DMASM"
- AdditionalIncludeDirectories="..\..\Modules\_decimal;..\..\Modules\_decimal\libmpdec"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1D1A0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/D_CRT_SECURE_NO_WARNINGS /DCONFIG_64 /DMASM"
- AdditionalIncludeDirectories="..\..\Modules\_decimal;..\..\Modules\_decimal\libmpdec"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1D1A0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/D_CRT_SECURE_NO_WARNINGS /DCONFIG_32 /DPPRO /DMASM"
- AdditionalIncludeDirectories="..\..\Modules\_decimal;..\..\Modules\_decimal\libmpdec"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- SubSystem="0"
- BaseAddress="0x1D1A0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/D_CRT_SECURE_NO_WARNINGS /DCONFIG_64 /DMASM"
- AdditionalIncludeDirectories="..\..\Modules\_decimal;..\..\Modules\_decimal\libmpdec"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- SubSystem="0"
- BaseAddress="0x1D1A0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/D_CRT_SECURE_NO_WARNINGS /DCONFIG_32 /DPPRO /DMASM"
- AdditionalIncludeDirectories="..\..\Modules\_decimal;..\..\Modules\_decimal\libmpdec"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- SubSystem="0"
- BaseAddress="0x1D1A0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/D_CRT_SECURE_NO_WARNINGS /DCONFIG_64 /DMASM"
- AdditionalIncludeDirectories="..\..\Modules\_decimal;..\..\Modules\_decimal\libmpdec"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- SubSystem="0"
- BaseAddress="0x1D1A0000"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/D_CRT_SECURE_NO_WARNINGS /DCONFIG_32 /DPPRO /DMASM"
- AdditionalIncludeDirectories="..\..\Modules\_decimal;..\..\Modules\_decimal\libmpdec"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- SubSystem="0"
- BaseAddress="0x1D1A0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/D_CRT_SECURE_NO_WARNINGS /DCONFIG_64 /DMASM"
- AdditionalIncludeDirectories="..\..\Modules\_decimal;..\..\Modules\_decimal\libmpdec"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- SubSystem="0"
- BaseAddress="0x1D1A0000"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Header Files"
- >
- <File
- RelativePath="..\..\Modules\_decimal\libmpdec\basearith.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_decimal\libmpdec\bits.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_decimal\libmpdec\constants.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_decimal\libmpdec\convolute.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_decimal\libmpdec\crt.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_decimal\libmpdec\difradix2.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_decimal\docstrings.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_decimal\libmpdec\fnt.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_decimal\libmpdec\fourstep.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_decimal\libmpdec\mpdecimal.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_decimal\libmpdec\numbertheory.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_decimal\libmpdec\sixstep.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_decimal\libmpdec\transpose.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_decimal\libmpdec\typearith.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_decimal\libmpdec\umodarith.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_decimal\libmpdec\vccompat.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_decimal\libmpdec\vcstdint.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Source Files"
- >
- <File
- RelativePath="..\..\Modules\_decimal\_decimal.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_decimal\libmpdec\basearith.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_decimal\libmpdec\constants.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_decimal\libmpdec\context.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_decimal\libmpdec\convolute.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_decimal\libmpdec\crt.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_decimal\libmpdec\difradix2.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_decimal\libmpdec\fnt.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_decimal\libmpdec\fourstep.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_decimal\libmpdec\io.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_decimal\libmpdec\memory.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_decimal\libmpdec\mpdecimal.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_decimal\libmpdec\numbertheory.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_decimal\libmpdec\sixstep.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_decimal\libmpdec\transpose.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_decimal\libmpdec\vcdiv64.asm"
- >
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCustomBuildTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- CommandLine="ml64 /nologo /c /Zi /Fo &quot;$(IntDir)\vcdiv64.obj&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
- Outputs="$(IntDir)\vcdiv64.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCustomBuildTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- CommandLine="ml64 /nologo /c /Zi /Fo &quot;$(IntDir)\vcdiv64.obj&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
- Outputs="$(IntDir)\vcdiv64.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="PGInstrument|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCustomBuildTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="PGInstrument|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- CommandLine="ml64 /nologo /c /Fo &quot;$(IntDir)\vcdiv64.obj&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
- Outputs="$(IntDir)\vcdiv64.obj"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="PGUpdate|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCustomBuildTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="PGUpdate|x64"
- >
- <Tool
- Name="VCCustomBuildTool"
- CommandLine="ml64 /nologo /c /Fo &quot;$(IntDir)\vcdiv64.obj&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
- Outputs="$(IntDir)\vcdiv64.obj"
- />
- </FileConfiguration>
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/VS9.0/_elementtree.vcproj b/PC/VS9.0/_elementtree.vcproj
deleted file mode 100644
index f9d7375c0c..0000000000
--- a/PC/VS9.0/_elementtree.vcproj
+++ /dev/null
@@ -1,613 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="_elementtree"
- ProjectGUID="{17E1E049-C309-4D79-843F-AE483C264AEA}"
- RootNamespace="_elementtree"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\Modules\expat"
- PreprocessorDefinitions="XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1D100000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\Modules\expat"
- PreprocessorDefinitions="XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1D100000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\Modules\expat"
- PreprocessorDefinitions="XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1D100000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\Modules\expat"
- PreprocessorDefinitions="XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1D100000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\Modules\expat"
- PreprocessorDefinitions="XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1D100000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\Modules\expat"
- PreprocessorDefinitions="XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1D100000"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\Modules\expat"
- PreprocessorDefinitions="XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1D100000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\Modules\expat"
- PreprocessorDefinitions="XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1D100000"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Header Files"
- >
- <File
- RelativePath="..\..\Modules\expat\ascii.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\expat\asciitab.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\expat\expat.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\expat\expat_config.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\expat\expat_external.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\expat\iasciitab.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\expat\internal.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\expat\latin1tab.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\expat\macconfig.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\expat\nametab.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\expat\pyexpatns.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\expat\utf8tab.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\expat\winconfig.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\expat\xmlrole.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\expat\xmltok.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Source Files"
- >
- <File
- RelativePath="..\..\Modules\_elementtree.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\expat\xmlparse.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\expat\xmlrole.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\expat\xmltok.c"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/VS9.0/_hashlib.vcproj b/PC/VS9.0/_hashlib.vcproj
deleted file mode 100644
index 77417ec0f5..0000000000
--- a/PC/VS9.0/_hashlib.vcproj
+++ /dev/null
@@ -1,537 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="_hashlib"
- ProjectGUID="{447F05A8-F581-4CAC-A466-5AC7936E207E}"
- RootNamespace="_hashlib"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(opensslDir)\inc32"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- CommandLine=""
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(opensslDir)\inc64"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- CommandLine=""
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(opensslDir)\inc32"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- CommandLine=""
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(opensslDir)\inc64"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- CommandLine=""
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(opensslDir)\inc32"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- CommandLine=""
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(opensslDir)\inc64"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- CommandLine=""
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(opensslDir)\inc32"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- CommandLine=""
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(opensslDir)\inc64"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- CommandLine=""
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- >
- <File
- RelativePath="..\..\Modules\_hashopenssl.c"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/VS9.0/_lzma.vcproj b/PC/VS9.0/_lzma.vcproj
deleted file mode 100644
index 7c6003f10e..0000000000
--- a/PC/VS9.0/_lzma.vcproj
+++ /dev/null
@@ -1,537 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="_lzma"
- ProjectGUID="{F9D71780-F393-11E0-BE50-0800200C9A66}"
- RootNamespace="lzma"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(lzmaDir)\include"
- PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LZMA_API_STATIC"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="$(lzmaDir)\bin_i486\liblzma.a"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(lzmaDir)\include"
- PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LZMA_API_STATIC"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="$(lzmaDir)\bin_x86-64\liblzma.a"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(lzmaDir)\include"
- PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LZMA_API_STATIC"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="$(lzmaDir)\bin_i486\liblzma.a"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(lzmaDir)\include"
- PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LZMA_API_STATIC"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="$(lzmaDir)\bin_x86-64\liblzma.a"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(lzmaDir)\include"
- PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LZMA_API_STATIC"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="$(lzmaDir)\bin_i486\liblzma.a"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(lzmaDir)\include"
- PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LZMA_API_STATIC"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="$(lzmaDir)\bin_x86-64\liblzma.a"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(lzmaDir)\include"
- PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LZMA_API_STATIC"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="$(lzmaDir)\bin_i486\liblzma.a"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(lzmaDir)\include"
- PreprocessorDefinitions="WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LZMA_API_STATIC"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="$(lzmaDir)\bin_x86-64\liblzma.a"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- >
- <File
- RelativePath="..\..\Modules\_lzmamodule.c"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/VS9.0/_msi.vcproj b/PC/VS9.0/_msi.vcproj
deleted file mode 100644
index cb230e10d0..0000000000
--- a/PC/VS9.0/_msi.vcproj
+++ /dev/null
@@ -1,529 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="_msi"
- ProjectGUID="{31FFC478-7B4A-43E8-9954-8D03E2187E9C}"
- RootNamespace="_msi"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="fci.lib msi.lib rpcrt4.lib"
- BaseAddress="0x1D160000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="fci.lib msi.lib rpcrt4.lib"
- BaseAddress="0x1D160000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="fci.lib msi.lib rpcrt4.lib"
- BaseAddress="0x1D160000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="fci.lib msi.lib rpcrt4.lib"
- BaseAddress="0x1D160000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="fci.lib msi.lib rpcrt4.lib"
- BaseAddress="0x1D160000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="fci.lib msi.lib rpcrt4.lib"
- BaseAddress="0x1D160000"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="fci.lib msi.lib rpcrt4.lib"
- BaseAddress="0x1D160000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="fci.lib msi.lib rpcrt4.lib"
- BaseAddress="0x1D160000"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- >
- <File
- RelativePath="..\..\PC\_msi.c"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/VS9.0/_multiprocessing.vcproj b/PC/VS9.0/_multiprocessing.vcproj
deleted file mode 100644
index fb3d1e70bc..0000000000
--- a/PC/VS9.0/_multiprocessing.vcproj
+++ /dev/null
@@ -1,541 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="_multiprocessing"
- ProjectGUID="{9E48B300-37D1-11DD-8C41-005056C00008}"
- RootNamespace="_multiprocessing"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- BaseAddress="0x1e1D0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- BaseAddress="0x1e1D0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- BaseAddress="0x1e1D0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- BaseAddress="0x1e1D0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- BaseAddress="0x1e1D0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- BaseAddress="0x1e1D0000"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- BaseAddress="0x1e1D0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- BaseAddress="0x1e1D0000"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Header Files"
- >
- <File
- RelativePath="..\..\Modules\_multiprocessing\multiprocessing.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Source Files"
- >
- <File
- RelativePath="..\..\Modules\_multiprocessing\multiprocessing.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_multiprocessing\semaphore.c"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/VS9.0/_socket.vcproj b/PC/VS9.0/_socket.vcproj
deleted file mode 100644
index ff1f6d4e3f..0000000000
--- a/PC/VS9.0/_socket.vcproj
+++ /dev/null
@@ -1,537 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="_socket"
- ProjectGUID="{86937F53-C189-40EF-8CE8-8759D8E7D480}"
- RootNamespace="_socket"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- BaseAddress="0x1e1D0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- BaseAddress="0x1e1D0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- BaseAddress="0x1e1D0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- BaseAddress="0x1e1D0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- BaseAddress="0x1e1D0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- BaseAddress="0x1e1D0000"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- BaseAddress="0x1e1D0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- BaseAddress="0x1e1D0000"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Header Files"
- >
- <File
- RelativePath="..\..\Modules\socketmodule.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Source Files"
- >
- <File
- RelativePath="..\..\Modules\socketmodule.c"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/VS9.0/_sqlite3.vcproj b/PC/VS9.0/_sqlite3.vcproj
deleted file mode 100644
index 82c57ae25f..0000000000
--- a/PC/VS9.0/_sqlite3.vcproj
+++ /dev/null
@@ -1,609 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="_sqlite3"
- ProjectGUID="{13CECB97-4119-4316-9D42-8534019A5A44}"
- RootNamespace="_sqlite3"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(sqlite3Dir)"
- PreprocessorDefinitions="MODULE_NAME=\&quot;sqlite3\&quot;"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e180000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(sqlite3Dir)"
- PreprocessorDefinitions="MODULE_NAME=\&quot;sqlite3\&quot;"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e180000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(sqlite3Dir)"
- PreprocessorDefinitions="MODULE_NAME=\&quot;sqlite3\&quot;"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e180000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(sqlite3Dir)"
- PreprocessorDefinitions="MODULE_NAME=\&quot;sqlite3\&quot;"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e180000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(sqlite3Dir)"
- PreprocessorDefinitions="MODULE_NAME=\&quot;sqlite3\&quot;"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e180000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(sqlite3Dir)"
- PreprocessorDefinitions="MODULE_NAME=\&quot;sqlite3\&quot;"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e180000"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(sqlite3Dir)"
- PreprocessorDefinitions="MODULE_NAME=\&quot;sqlite3\&quot;"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e180000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(sqlite3Dir)"
- PreprocessorDefinitions="MODULE_NAME=\&quot;sqlite3\&quot;"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e180000"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Header Files"
- >
- <File
- RelativePath="..\..\Modules\_sqlite\cache.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_sqlite\connection.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_sqlite\cursor.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_sqlite\microprotocols.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_sqlite\module.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_sqlite\prepare_protocol.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_sqlite\row.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_sqlite\statement.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_sqlite\util.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Source Files"
- >
- <File
- RelativePath="..\..\Modules\_sqlite\cache.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_sqlite\connection.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_sqlite\cursor.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_sqlite\microprotocols.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_sqlite\module.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_sqlite\prepare_protocol.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_sqlite\row.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_sqlite\statement.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_sqlite\util.c"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/VS9.0/_ssl.vcproj b/PC/VS9.0/_ssl.vcproj
deleted file mode 100644
index b47dc2740c..0000000000
--- a/PC/VS9.0/_ssl.vcproj
+++ /dev/null
@@ -1,537 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="_ssl"
- ProjectGUID="{C6E20F84-3247-4AD6-B051-B073268F73BA}"
- RootNamespace="_ssl"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(opensslDir)\inc32"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- CommandLine=""
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib crypt32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(opensslDir)\inc64"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- CommandLine=""
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib crypt32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(opensslDir)\inc32"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- CommandLine=""
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib crypt32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(opensslDir)\inc64"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- CommandLine=""
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib crypt32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(opensslDir)\inc32"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- CommandLine=""
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib crypt32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(opensslDir)\inc64"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- CommandLine=""
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib crypt32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(opensslDir)\inc32"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- CommandLine=""
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib crypt32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(opensslDir)\inc64"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- CommandLine=""
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib crypt32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- >
- <File
- RelativePath="..\..\Modules\_ssl.c"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/VS9.0/_testbuffer.vcproj b/PC/VS9.0/_testbuffer.vcproj
deleted file mode 100644
index 03377e1772..0000000000
--- a/PC/VS9.0/_testbuffer.vcproj
+++ /dev/null
@@ -1,521 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="_testbuffer"
- ProjectGUID="{A2697BD3-28C1-4AEC-9106-8B748639FD16}"
- RootNamespace="_testbuffer"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e1F0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e1F0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e1F0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e1F0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e1F0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e1F0000"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e1F0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e1F0000"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- >
- <File
- RelativePath="..\..\Modules\_testbuffer.c"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/VS9.0/_testcapi.vcproj b/PC/VS9.0/_testcapi.vcproj
deleted file mode 100644
index 453300a642..0000000000
--- a/PC/VS9.0/_testcapi.vcproj
+++ /dev/null
@@ -1,521 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="_testcapi"
- ProjectGUID="{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}"
- RootNamespace="_testcapi"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e1F0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e1F0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e1F0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e1F0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e1F0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e1F0000"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e1F0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e1F0000"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- >
- <File
- RelativePath="..\..\Modules\_testcapimodule.c"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/VS9.0/_testimportmultiple.vcproj b/PC/VS9.0/_testimportmultiple.vcproj
deleted file mode 100644
index 14d910dfdf..0000000000
--- a/PC/VS9.0/_testimportmultiple.vcproj
+++ /dev/null
@@ -1,521 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="_testimportmultiple"
- ProjectGUID="{36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}"
- RootNamespace="_testimportmultiple"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e1F0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e1F0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e1F0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e1F0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e1F0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e1F0000"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e1F0000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1e1F0000"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- >
- <File
- RelativePath="..\..\Modules\_testimportmultiple.c"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/VS9.0/_tkinter.vcproj b/PC/VS9.0/_tkinter.vcproj
deleted file mode 100644
index 5163317575..0000000000
--- a/PC/VS9.0/_tkinter.vcproj
+++ /dev/null
@@ -1,541 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="_tkinter"
- ProjectGUID="{4946ECAC-2E69-4BF8-A90A-F5136F5094DF}"
- RootNamespace="_tkinter"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(tcltkDir)\include"
- PreprocessorDefinitions="WITH_APPINIT"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="$(tcltkLibDebug)"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(tcltk64Dir)\include"
- PreprocessorDefinitions="WITH_APPINIT"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="$(tcltk64LibDebug)"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(tcltkDir)\include"
- PreprocessorDefinitions="WITH_APPINIT"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="$(tcltkLib)"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(tcltk64Dir)\include"
- PreprocessorDefinitions="WITH_APPINIT"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="$(tcltk64Lib)"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(tcltkDir)\include"
- PreprocessorDefinitions="WITH_APPINIT"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="$(tcltkLib)"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(tcltk64Dir)\include"
- PreprocessorDefinitions="WITH_APPINIT"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="$(tcltk64Lib)"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(tcltkDir)\include"
- PreprocessorDefinitions="WITH_APPINIT"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="$(tcltkLib)"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(tcltk64Dir)\include"
- PreprocessorDefinitions="WITH_APPINIT"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="$(tcltk64Lib)"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- >
- <File
- RelativePath="..\..\Modules\_tkinter.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\tkappinit.c"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/VS9.0/bdist_wininst.vcproj b/PC/VS9.0/bdist_wininst.vcproj
deleted file mode 100644
index b8cc7ad6a8..0000000000
--- a/PC/VS9.0/bdist_wininst.vcproj
+++ /dev/null
@@ -1,270 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="bdist_wininst"
- ProjectGUID="{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}"
- RootNamespace="wininst"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="..\..\lib\distutils\command"
- ConfigurationType="1"
- InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- PreprocessorDefinitions="NDEBUG"
- MkTypLibCompatible="true"
- SuppressStartupBanner="true"
- TargetEnvironment="1"
- TypeLibraryName=".\..\..\lib\distutils\command\wininst.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="1"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\PC\bdist_wininst;..\..\Include;..\..\Modules\zlib"
- PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
- StringPooling="true"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- WarningLevel="3"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="0"
- AdditionalIncludeDirectories="..\..\PC;..\..\PC\bdist_wininst;..\..\Include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="comctl32.lib imagehlp.lib"
- OutputFile="..\..\lib\distutils\command\wininst-9.0.exe"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- IgnoreDefaultLibraryNames="LIBC"
- ProgramDatabaseFile="..\..\lib\distutils\command\wininst-9.0.pdb"
- SubSystem="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- PreprocessorDefinitions="NDEBUG"
- MkTypLibCompatible="true"
- SuppressStartupBanner="true"
- TargetEnvironment="3"
- TypeLibraryName=".\..\..\lib\distutils\command\wininst.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="1"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\PC\bdist_wininst;..\..\Include;..\..\Modules\zlib"
- PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
- StringPooling="true"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- WarningLevel="3"
- SuppressStartupBanner="true"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="0"
- AdditionalIncludeDirectories="..\..\PC;..\..\PC\bdist_wininst;..\..\Include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="comctl32.lib imagehlp.lib"
- OutputFile="..\..\lib\distutils\command\wininst-9.0-amd64.exe"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- IgnoreDefaultLibraryNames="LIBC"
- ProgramDatabaseFile="..\..\lib\distutils\command\wininst-9.0-amd64.pdb"
- SubSystem="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
- >
- <File
- RelativePath="..\..\PC\bdist_wininst\extract.c"
- >
- </File>
- <File
- RelativePath="..\..\PC\bdist_wininst\install.c"
- >
- </File>
- <Filter
- Name="zlib"
- >
- <File
- RelativePath="..\..\Modules\zlib\adler32.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlib\crc32.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlib\inffast.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlib\inflate.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlib\inftrees.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlib\zutil.c"
- >
- </File>
- </Filter>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl"
- >
- <File
- RelativePath="..\..\PC\bdist_wininst\archive.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
- >
- <File
- RelativePath="..\..\PC\bdist_wininst\install.rc"
- >
- </File>
- <File
- RelativePath="..\..\PC\bdist_wininst\PythonPowered.bmp"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/VS9.0/debug.vsprops b/PC/VS9.0/debug.vsprops
deleted file mode 100644
index bc643cb6be..0000000000
--- a/PC/VS9.0/debug.vsprops
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="debug"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- />
- <UserMacro
- Name="KillPythonExe"
- Value="$(OutDir)\kill_python_d.exe"
- />
-</VisualStudioPropertySheet>
diff --git a/PC/VS9.0/kill_python.c b/PC/VS9.0/kill_python.c
deleted file mode 100644
index 666e1b0297..0000000000
--- a/PC/VS9.0/kill_python.c
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Helper program for killing lingering python[_d].exe processes before
- * building, thus attempting to avoid build failures due to files being
- * locked.
- */
-
-#include <windows.h>
-#include <wchar.h>
-#include <tlhelp32.h>
-#include <stdio.h>
-
-#pragma comment(lib, "psapi")
-
-#ifdef _DEBUG
-#define PYTHON_EXE (L"python_d.exe")
-#define PYTHON_EXE_LEN (12)
-#define KILL_PYTHON_EXE (L"kill_python_d.exe")
-#define KILL_PYTHON_EXE_LEN (17)
-#else
-#define PYTHON_EXE (L"python.exe")
-#define PYTHON_EXE_LEN (10)
-#define KILL_PYTHON_EXE (L"kill_python.exe")
-#define KILL_PYTHON_EXE_LEN (15)
-#endif
-
-int
-main(int argc, char **argv)
-{
- HANDLE hp, hsp, hsm; /* process, snapshot processes, snapshot modules */
- DWORD dac, our_pid;
- size_t len;
- wchar_t path[MAX_PATH+1];
-
- MODULEENTRY32W me;
- PROCESSENTRY32W pe;
-
- me.dwSize = sizeof(MODULEENTRY32W);
- pe.dwSize = sizeof(PROCESSENTRY32W);
-
- memset(path, 0, MAX_PATH+1);
-
- our_pid = GetCurrentProcessId();
-
- hsm = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, our_pid);
- if (hsm == INVALID_HANDLE_VALUE) {
- printf("CreateToolhelp32Snapshot[1] failed: %d\n", GetLastError());
- return 1;
- }
-
- if (!Module32FirstW(hsm, &me)) {
- printf("Module32FirstW[1] failed: %d\n", GetLastError());
- CloseHandle(hsm);
- return 1;
- }
-
- /*
- * Enumerate over the modules for the current process in order to find
- * kill_process[_d].exe, then take a note of the directory it lives in.
- */
- do {
- if (_wcsnicmp(me.szModule, KILL_PYTHON_EXE, KILL_PYTHON_EXE_LEN))
- continue;
-
- len = wcsnlen_s(me.szExePath, MAX_PATH) - KILL_PYTHON_EXE_LEN;
- wcsncpy_s(path, MAX_PATH+1, me.szExePath, len);
-
- break;
-
- } while (Module32NextW(hsm, &me));
-
- CloseHandle(hsm);
-
- if (path == NULL) {
- printf("failed to discern directory of running process\n");
- return 1;
- }
-
- /*
- * Take a snapshot of system processes. Enumerate over the snapshot,
- * looking for python processes. When we find one, verify it lives
- * in the same directory we live in. If it does, kill it. If we're
- * unable to kill it, treat this as a fatal error and return 1.
- *
- * The rationale behind this is that we're called at the start of the
- * build process on the basis that we'll take care of killing any
- * running instances, such that the build won't encounter permission
- * denied errors during linking. If we can't kill one of the processes,
- * we can't provide this assurance, and the build shouldn't start.
- */
-
- hsp = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
- if (hsp == INVALID_HANDLE_VALUE) {
- printf("CreateToolhelp32Snapshot[2] failed: %d\n", GetLastError());
- return 1;
- }
-
- if (!Process32FirstW(hsp, &pe)) {
- printf("Process32FirstW failed: %d\n", GetLastError());
- CloseHandle(hsp);
- return 1;
- }
-
- dac = PROCESS_QUERY_INFORMATION | PROCESS_VM_READ | PROCESS_TERMINATE;
- do {
-
- /*
- * XXX TODO: if we really wanted to be fancy, we could check the
- * modules for all processes (not just the python[_d].exe ones)
- * and see if any of our DLLs are loaded (i.e. python34[_d].dll),
- * as that would also inhibit our ability to rebuild the solution.
- * Not worth losing sleep over though; for now, a simple check
- * for just the python executable should be sufficient.
- */
-
- if (_wcsnicmp(pe.szExeFile, PYTHON_EXE, PYTHON_EXE_LEN))
- /* This isn't a python process. */
- continue;
-
- /* It's a python process, so figure out which directory it's in... */
- hsm = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, pe.th32ProcessID);
- if (hsm == INVALID_HANDLE_VALUE)
- /*
- * If our module snapshot fails (which will happen if we don't own
- * the process), just ignore it and continue. (It seems different
- * versions of Windows return different values for GetLastError()
- * in this situation; it's easier to just ignore it and move on vs.
- * stopping the build for what could be a false positive.)
- */
- continue;
-
- if (!Module32FirstW(hsm, &me)) {
- printf("Module32FirstW[2] failed: %d\n", GetLastError());
- CloseHandle(hsp);
- CloseHandle(hsm);
- return 1;
- }
-
- do {
- if (_wcsnicmp(me.szModule, PYTHON_EXE, PYTHON_EXE_LEN))
- /* Wrong module, we're looking for python[_d].exe... */
- continue;
-
- if (_wcsnicmp(path, me.szExePath, len))
- /* Process doesn't live in our directory. */
- break;
-
- /* Python process residing in the right directory, kill it! */
- hp = OpenProcess(dac, FALSE, pe.th32ProcessID);
- if (!hp) {
- printf("OpenProcess failed: %d\n", GetLastError());
- CloseHandle(hsp);
- CloseHandle(hsm);
- return 1;
- }
-
- if (!TerminateProcess(hp, 1)) {
- printf("TerminateProcess failed: %d\n", GetLastError());
- CloseHandle(hsp);
- CloseHandle(hsm);
- CloseHandle(hp);
- return 1;
- }
-
- CloseHandle(hp);
- break;
-
- } while (Module32NextW(hsm, &me));
-
- CloseHandle(hsm);
-
- } while (Process32NextW(hsp, &pe));
-
- CloseHandle(hsp);
-
- return 0;
-}
-
-/* vi: set ts=8 sw=4 sts=4 expandtab */
diff --git a/PC/VS9.0/kill_python.vcproj b/PC/VS9.0/kill_python.vcproj
deleted file mode 100644
index a34107aab7..0000000000
--- a/PC/VS9.0/kill_python.vcproj
+++ /dev/null
@@ -1,279 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="kill_python"
- ProjectGUID="{6DE10744-E396-40A5-B4E2-1B69AA7C8D31}"
- RootNamespace="kill_python"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\pyproject.vsprops;.\debug.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\$(ProjectName)_d.exe"
- SubSystem="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- ConfigurationType="1"
- InheritedPropertySheets=".\pyproject.vsprops;.\debug.vsprops;.\x64.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\$(ProjectName)_d.exe"
- SubSystem="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- SubSystem="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="1"
- InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops;.\x64.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- SubSystem="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- >
- <File
- RelativePath=".\kill_python.c"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/VS9.0/make_buildinfo.c b/PC/VS9.0/make_buildinfo.c
deleted file mode 100644
index fb4a64a971..0000000000
--- a/PC/VS9.0/make_buildinfo.c
+++ /dev/null
@@ -1,195 +0,0 @@
-#include <windows.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <stdio.h>
-#include <io.h>
-
-#define CMD_SIZE 500
-
-/* This file creates the getbuildinfo.o object, by first
- invoking subwcrev.exe (if found), and then invoking cl.exe.
- As a side effect, it might generate PCBuild\getbuildinfo2.c
- also. If this isn't a subversion checkout, or subwcrev isn't
- found, it compiles ..\\..\\Modules\\getbuildinfo.c instead.
-
- Currently, subwcrev.exe is found from the registry entries
- of TortoiseSVN.
-
- No attempt is made to place getbuildinfo.o into the proper
- binary directory. This isn't necessary, as this tool is
- invoked as a pre-link step for pythoncore, so that overwrites
- any previous getbuildinfo.o.
-
- However, if a second argument is provided, this will be used
- as a temporary directory where any getbuildinfo2.c and
- getbuildinfo.o files are put. This is useful if multiple
- configurations are being built in parallel, to avoid them
- trampling each other's files.
-
-*/
-
-int make_buildinfo2(const char *tmppath)
-{
- struct _stat st;
- HKEY hTortoise;
- char command[CMD_SIZE+1];
- DWORD type, size;
- if (_stat(".svn", &st) < 0)
- return 0;
- /* Allow suppression of subwcrev.exe invocation if a no_subwcrev file is present. */
- if (_stat("no_subwcrev", &st) == 0)
- return 0;
- if (RegOpenKey(HKEY_LOCAL_MACHINE, "Software\\TortoiseSVN", &hTortoise) != ERROR_SUCCESS &&
- RegOpenKey(HKEY_CURRENT_USER, "Software\\TortoiseSVN", &hTortoise) != ERROR_SUCCESS)
- /* Tortoise not installed */
- return 0;
- command[0] = '"'; /* quote the path to the executable */
- size = sizeof(command) - 1;
- if (RegQueryValueEx(hTortoise, "Directory", 0, &type, command+1, &size) != ERROR_SUCCESS ||
- type != REG_SZ)
- /* Registry corrupted */
- return 0;
- strcat_s(command, CMD_SIZE, "bin\\subwcrev.exe");
- if (_stat(command+1, &st) < 0)
- /* subwcrev.exe not part of the release */
- return 0;
- strcat_s(command, CMD_SIZE, "\" ..\\.. ..\\..\\Modules\\getbuildinfo.c \"");
- strcat_s(command, CMD_SIZE, tmppath); /* quoted tmppath */
- strcat_s(command, CMD_SIZE, "getbuildinfo2.c\"");
-
- puts(command); fflush(stdout);
- if (system(command) < 0)
- return 0;
- return 1;
-}
-
-const char DELIMS[] = { " \n" };
-
-int get_mercurial_info(char * hgbranch, char * hgtag, char * hgrev, int size)
-{
- int result = 0;
- char filename[CMD_SIZE];
- char cmdline[CMD_SIZE];
-
- strcpy_s(filename, CMD_SIZE, "tmpXXXXXX");
- if (_mktemp_s(filename, CMD_SIZE) == 0) {
- int rc;
-
- strcpy_s(cmdline, CMD_SIZE, "hg id -bit > ");
- strcat_s(cmdline, CMD_SIZE, filename);
- rc = system(cmdline);
- if (rc == 0) {
- FILE * fp;
-
- if (fopen_s(&fp, filename, "r") == 0) {
- char * cp = fgets(cmdline, CMD_SIZE, fp);
-
- if (cp) {
- char * context = NULL;
- char * tp = strtok_s(cp, DELIMS, &context);
- if (tp) {
- strcpy_s(hgrev, size, tp);
- tp = strtok_s(NULL, DELIMS, &context);
- if (tp) {
- strcpy_s(hgbranch, size, tp);
- tp = strtok_s(NULL, DELIMS, &context);
- if (tp) {
- strcpy_s(hgtag, size, tp);
- result = 1;
- }
- }
- }
- }
- fclose(fp);
- }
- }
- _unlink(filename);
- }
- return result;
-}
-
-int main(int argc, char*argv[])
-{
- char command[CMD_SIZE] = "cl.exe -c -D_WIN32 -DUSE_DL_EXPORT -D_WINDOWS -DWIN32 -D_WINDLL ";
- char tmppath[CMD_SIZE] = "";
- int do_unlink, result;
- char *tmpdir = NULL;
- if (argc <= 2 || argc > 3) {
- fprintf(stderr, "make_buildinfo $(ConfigurationName) [tmpdir]\n");
- return EXIT_FAILURE;
- }
- if (strcmp(argv[1], "Release") == 0) {
- strcat_s(command, CMD_SIZE, "-MD ");
- }
- else if (strcmp(argv[1], "Debug") == 0) {
- strcat_s(command, CMD_SIZE, "-D_DEBUG -MDd ");
- }
- else if (strcmp(argv[1], "ReleaseItanium") == 0) {
- strcat_s(command, CMD_SIZE, "-MD /USECL:MS_ITANIUM ");
- }
- else if (strcmp(argv[1], "ReleaseAMD64") == 0) {
- strcat_s(command, CMD_SIZE, "-MD ");
- strcat_s(command, CMD_SIZE, "-MD /USECL:MS_OPTERON ");
- }
- else {
- fprintf(stderr, "unsupported configuration %s\n", argv[1]);
- return EXIT_FAILURE;
- }
- if (argc > 2) {
- tmpdir = argv[2];
- strcat_s(tmppath, _countof(tmppath), tmpdir);
- /* Hack fix for bad command line: If the command is issued like this:
- * $(SolutionDir)make_buildinfo.exe" Debug "$(IntDir)"
- * we will get a trailing quote because IntDir ends with a backslash that then
- * escapes the final ". To simplify the life for developers, catch that problem
- * here by cutting it off.
- * The proper command line, btw is:
- * $(SolutionDir)make_buildinfo.exe" Debug "$(IntDir)\"
- * Hooray for command line parsing on windows.
- */
- if (strlen(tmppath) > 0 && tmppath[strlen(tmppath)-1] == '"')
- tmppath[strlen(tmppath)-1] = '\0';
- strcat_s(tmppath, _countof(tmppath), "\\");
- }
-
- if ((do_unlink = make_buildinfo2(tmppath))) {
- strcat_s(command, CMD_SIZE, "\"");
- strcat_s(command, CMD_SIZE, tmppath);
- strcat_s(command, CMD_SIZE, "getbuildinfo2.c\" -DSUBWCREV ");
- }
- else {
- char hgtag[CMD_SIZE];
- char hgbranch[CMD_SIZE];
- char hgrev[CMD_SIZE];
-
- if (get_mercurial_info(hgbranch, hgtag, hgrev, CMD_SIZE)) {
- strcat_s(command, CMD_SIZE, "-DHGBRANCH=\\\"");
- strcat_s(command, CMD_SIZE, hgbranch);
- strcat_s(command, CMD_SIZE, "\\\"");
-
- strcat_s(command, CMD_SIZE, " -DHGTAG=\\\"");
- strcat_s(command, CMD_SIZE, hgtag);
- strcat_s(command, CMD_SIZE, "\\\"");
-
- strcat_s(command, CMD_SIZE, " -DHGVERSION=\\\"");
- strcat_s(command, CMD_SIZE, hgrev);
- strcat_s(command, CMD_SIZE, "\\\" ");
- }
- strcat_s(command, CMD_SIZE, "..\\..\\Modules\\getbuildinfo.c");
- }
- strcat_s(command, CMD_SIZE, " -Fo\"");
- strcat_s(command, CMD_SIZE, tmppath);
- strcat_s(command, CMD_SIZE, "getbuildinfo.o\" -I..\\..\\Include -I..\\..\\PC");
- puts(command); fflush(stdout);
- result = system(command);
- if (do_unlink) {
- command[0] = '\0';
- strcat_s(command, CMD_SIZE, "\"");
- strcat_s(command, CMD_SIZE, tmppath);
- strcat_s(command, CMD_SIZE, "getbuildinfo2.c\"");
- _unlink(command);
- }
- if (result < 0)
- return EXIT_FAILURE;
- return 0;
-}
diff --git a/PC/VS9.0/make_buildinfo.vcproj b/PC/VS9.0/make_buildinfo.vcproj
deleted file mode 100644
index 924065db42..0000000000
--- a/PC/VS9.0/make_buildinfo.vcproj
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="windows-1250"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="make_buildinfo"
- ProjectGUID="{C73F0EC1-358B-4177-940F-0846AC8B04CD}"
- RootNamespace="make_buildinfo"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- InlineFunctionExpansion="1"
- PreprocessorDefinitions="_CONSOLE"
- RuntimeLibrary="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)/make_buildinfo.exe"
- ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
- SubSystem="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\make_buildinfo.c"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/VS9.0/make_versioninfo.vcproj b/PC/VS9.0/make_versioninfo.vcproj
deleted file mode 100644
index 0a1fd28bc4..0000000000
--- a/PC/VS9.0/make_versioninfo.vcproj
+++ /dev/null
@@ -1,324 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="make_versioninfo"
- ProjectGUID="{F0E0541E-F17D-430B-97C4-93ADF0DD284E}"
- RootNamespace="make_versioninfo"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- Description="Build PC/pythonnt_rc(_d).h"
- CommandLine="cd $(SolutionDir)&#x0D;&#x0A;make_versioninfo.exe &gt; ..\..\PC\pythonnt_rc.h&#x0D;&#x0A;"
- Outputs="$(SolutionDir)..\..\PC\pythonnt_rc.h"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="_CONSOLE"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(SolutionDir)make_versioninfo.exe"
- ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
- SubSystem="1"
- BaseAddress="0x1d000000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine="cd $(SolutionDir)&#x0D;&#x0A;make_versioninfo.exe &gt; ..\..\PC\python_nt.h&#x0D;&#x0A;"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="1"
- InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- Description="Build PC/pythonnt_rc(_d).h"
- CommandLine="cd $(SolutionDir)&#x0D;&#x0A;make_versioninfo.exe &gt; ..\..\PC\pythonnt_rc.h&#x0D;&#x0A;"
- Outputs="$(SolutionDir)..\..\PC\pythonnt_rc.h"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- EnableIntrinsicFunctions="true"
- PreprocessorDefinitions="_CONSOLE"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(SolutionDir)make_versioninfo.exe"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine="cd $(SolutionDir)&#x0D;&#x0A;make_versioninfo.exe &gt; ..\..\PC\python_nt.h&#x0D;&#x0A;"
- />
- </Configuration>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\pyproject.vsprops;.\debug.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- Description="Build PC/pythonnt_rc(_d).h"
- CommandLine="cd $(SolutionDir)&#x0D;&#x0A;make_versioninfo_d.exe &gt; ..\..\PC\pythonnt_rc_d.h&#x0D;&#x0A;"
- Outputs="$(SolutionDir)..\..\PC\pythonnt_rc_d.h"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- InlineFunctionExpansion="1"
- EnableIntrinsicFunctions="false"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="_CONSOLE"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(SolutionDir)make_versioninfo_d.exe"
- ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
- SubSystem="1"
- BaseAddress="0x1d000000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine="cd $(SolutionDir)&#x0D;&#x0A;make_versioninfo_d.exe &gt; ..\..\PC\python_nt_d.h&#x0D;&#x0A;"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- ConfigurationType="1"
- InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\debug.vsprops"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- Description="Build PC/pythonnt_rc(_d).h"
- CommandLine="cd $(SolutionDir)&#x0D;&#x0A;make_versioninfo_d.exe &gt; ..\..\PC\pythonnt_rc_d.h&#x0D;&#x0A;"
- Outputs="$(SolutionDir)..\..\PC\pythonnt_rc_d.h"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- InlineFunctionExpansion="1"
- EnableIntrinsicFunctions="false"
- PreprocessorDefinitions="_CONSOLE"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(SolutionDir)make_versioninfo_d.exe"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine="cd $(SolutionDir)&#x0D;&#x0A;make_versioninfo_d.exe &gt; ..\..\PC\python_nt_d.h&#x0D;&#x0A;"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- >
- <File
- RelativePath="..\..\PC\make_versioninfo.c"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/VS9.0/pcbuild.sln b/PC/VS9.0/pcbuild.sln
deleted file mode 100644
index ba7f69cfad..0000000000
--- a/PC/VS9.0/pcbuild.sln
+++ /dev/null
@@ -1,690 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python", "python.vcproj", "{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}"
- ProjectSection(ProjectDependencies) = postProject
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
- {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058} = {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_versioninfo", "make_versioninfo.vcproj", "{F0E0541E-F17D-430B-97C4-93ADF0DD284E}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}"
- ProjectSection(ProjectDependencies) = postProject
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E} = {F0E0541E-F17D-430B-97C4-93ADF0DD284E}
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}
- {C73F0EC1-358B-4177-940F-0846AC8B04CD} = {C73F0EC1-358B-4177-940F-0846AC8B04CD}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonw", "pythonw.vcproj", "{F4229CC3-873C-49AE-9729-DD308ED4CD4A}"
- ProjectSection(ProjectDependencies) = postProject
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_buildinfo", "make_buildinfo.vcproj", "{C73F0EC1-358B-4177-940F-0846AC8B04CD}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{553EC33E-9816-4996-A660-5D6186A0B0B3}"
- ProjectSection(SolutionItems) = preProject
- ..\..\Modules\getbuildinfo.c = ..\..\Modules\getbuildinfo.c
- readme.txt = readme.txt
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsound", "winsound.vcproj", "{28B5D777-DDF2-4B6B-B34F-31D938813856}"
- ProjectSection(ProjectDependencies) = postProject
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_decimal", "_decimal.vcproj", "{0E9791DB-593A-465F-98BC-681011311617}"
- ProjectSection(ProjectDependencies) = postProject
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes", "_ctypes.vcproj", "{0E9791DB-593A-465F-98BC-681011311618}"
- ProjectSection(ProjectDependencies) = postProject
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes_test", "_ctypes_test.vcproj", "{9EC7190A-249F-4180-A900-548FDCF3055F}"
- ProjectSection(ProjectDependencies) = postProject
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_elementtree", "_elementtree.vcproj", "{17E1E049-C309-4D79-843F-AE483C264AEA}"
- ProjectSection(ProjectDependencies) = postProject
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_msi", "_msi.vcproj", "{31FFC478-7B4A-43E8-9954-8D03E2187E9C}"
- ProjectSection(ProjectDependencies) = postProject
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_socket", "_socket.vcproj", "{86937F53-C189-40EF-8CE8-8759D8E7D480}"
- ProjectSection(ProjectDependencies) = postProject
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_sqlite3", "_sqlite3.vcproj", "{13CECB97-4119-4316-9D42-8534019A5A44}"
- ProjectSection(ProjectDependencies) = postProject
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
- {A1A295E5-463C-437F-81CA-1F32367685DA} = {A1A295E5-463C-437F-81CA-1F32367685DA}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ssl", "_ssl.vcproj", "{C6E20F84-3247-4AD6-B051-B073268F73BA}"
- ProjectSection(ProjectDependencies) = postProject
- {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}
- {86937F53-C189-40EF-8CE8-8759D8E7D480} = {86937F53-C189-40EF-8CE8-8759D8E7D480}
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0} = {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcproj", "{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}"
- ProjectSection(ProjectDependencies) = postProject
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testimportmultiple", "_testimportmultiple.vcproj", "{36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}"
- ProjectSection(ProjectDependencies) = postProject
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_tkinter", "_tkinter.vcproj", "{4946ECAC-2E69-4BF8-A90A-F5136F5094DF}"
- ProjectSection(ProjectDependencies) = postProject
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_bz2", "_bz2.vcproj", "{73FCD2BD-F133-46B7-8EC1-144CD82A59D5}"
- ProjectSection(ProjectDependencies) = postProject
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_lzma", "_lzma.vcproj", "{F9D71780-F393-11E0-BE50-0800200C9A66}"
- ProjectSection(ProjectDependencies) = postProject
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "select", "select.vcproj", "{18CAE28C-B454-46C1-87A0-493D91D97F03}"
- ProjectSection(ProjectDependencies) = postProject
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unicodedata", "unicodedata.vcproj", "{ECC7CEAC-A5E5-458E-BB9E-2413CC847881}"
- ProjectSection(ProjectDependencies) = postProject
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyexpat", "pyexpat.vcproj", "{D06B6426-4762-44CC-8BAD-D79052507F2F}"
- ProjectSection(ProjectDependencies) = postProject
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bdist_wininst", "bdist_wininst.vcproj", "{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_hashlib", "_hashlib.vcproj", "{447F05A8-F581-4CAC-A466-5AC7936E207E}"
- ProjectSection(ProjectDependencies) = postProject
- {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0} = {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite3", "sqlite3.vcproj", "{A1A295E5-463C-437F-81CA-1F32367685DA}"
- ProjectSection(ProjectDependencies) = postProject
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31} = {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_multiprocessing", "_multiprocessing.vcproj", "{9E48B300-37D1-11DD-8C41-005056C00008}"
- ProjectSection(ProjectDependencies) = postProject
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssl", "ssl.vcproj", "{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}"
- ProjectSection(ProjectDependencies) = postProject
- {B11D750F-CD1F-4A96-85CE-E69A5C5259F9} = {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kill_python", "kill_python.vcproj", "{6DE10744-E396-40A5-B4E2-1B69AA7C8D31}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python3dll", "python3dll.vcproj", "{885D4898-D08D-4091-9C40-C700CFE3FC5A}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xxlimited", "xxlimited.vcproj", "{F749B822-B489-4CA5-A3AD-CE078F5F338A}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testbuffer", "_testbuffer.vcproj", "{A2697BD3-28C1-4AEC-9106-8B748639FD16}"
- ProjectSection(ProjectDependencies) = postProject
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Debug|x64 = Debug|x64
- PGInstrument|Win32 = PGInstrument|Win32
- PGInstrument|x64 = PGInstrument|x64
- PGUpdate|Win32 = PGUpdate|Win32
- PGUpdate|x64 = PGUpdate|x64
- Release|Win32 = Release|Win32
- Release|x64 = Release|x64
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|Win32.ActiveCfg = Debug|Win32
- {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|Win32.Build.0 = Debug|Win32
- {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|x64.ActiveCfg = Debug|x64
- {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Debug|x64.Build.0 = Debug|x64
- {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.PGUpdate|x64.Build.0 = PGUpdate|x64
- {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|Win32.ActiveCfg = Release|Win32
- {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|Win32.Build.0 = Release|Win32
- {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|x64.ActiveCfg = Release|x64
- {B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|x64.Build.0 = Release|x64
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.ActiveCfg = Debug|Win32
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.Build.0 = Debug|Win32
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|x64.ActiveCfg = Debug|Win32
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|x64.Build.0 = Debug|Win32
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|Win32.ActiveCfg = Release|Win32
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|Win32.Build.0 = Release|Win32
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|x64.ActiveCfg = Release|Win32
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|x64.Build.0 = Release|Win32
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|Win32.ActiveCfg = Release|Win32
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|Win32.Build.0 = Release|Win32
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|x64.ActiveCfg = Release|Win32
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|x64.Build.0 = Release|Win32
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|Win32.ActiveCfg = Release|Win32
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|Win32.Build.0 = Release|Win32
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|x64.ActiveCfg = Release|Win32
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|x64.Build.0 = Release|Win32
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|Win32.ActiveCfg = Debug|Win32
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|Win32.Build.0 = Debug|Win32
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|x64.ActiveCfg = Debug|x64
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|x64.Build.0 = Debug|x64
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.PGUpdate|x64.Build.0 = PGUpdate|x64
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|Win32.ActiveCfg = Release|Win32
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|Win32.Build.0 = Release|Win32
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|x64.ActiveCfg = Release|x64
- {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Release|x64.Build.0 = Release|x64
- {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|Win32.ActiveCfg = Debug|Win32
- {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|Win32.Build.0 = Debug|Win32
- {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|x64.ActiveCfg = Debug|x64
- {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|x64.Build.0 = Debug|x64
- {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|x64.Build.0 = PGUpdate|x64
- {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|Win32.ActiveCfg = Release|Win32
- {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|Win32.Build.0 = Release|Win32
- {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|x64.ActiveCfg = Release|x64
- {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|x64.Build.0 = Release|x64
- {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|Win32.ActiveCfg = Debug|Win32
- {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|Win32.Build.0 = Debug|Win32
- {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|x64.ActiveCfg = Debug|x64
- {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Debug|x64.Build.0 = Debug|x64
- {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.PGUpdate|x64.Build.0 = PGUpdate|x64
- {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|Win32.ActiveCfg = Release|Win32
- {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|Win32.Build.0 = Release|Win32
- {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|x64.ActiveCfg = Release|x64
- {E9E0A1F6-0009-4E8C-B8F8-1B8F5D49A058}.Release|x64.Build.0 = Release|x64
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|Win32.ActiveCfg = Release|Win32
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|Win32.Build.0 = Release|Win32
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|x64.ActiveCfg = Release|Win32
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|x64.Build.0 = Release|Win32
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|Win32.ActiveCfg = Release|Win32
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|Win32.Build.0 = Release|Win32
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|x64.ActiveCfg = Release|Win32
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|x64.Build.0 = Release|Win32
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|Win32.ActiveCfg = Release|Win32
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|Win32.Build.0 = Release|Win32
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|x64.ActiveCfg = Release|Win32
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|x64.Build.0 = Release|Win32
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|Win32.ActiveCfg = Release|Win32
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|Win32.Build.0 = Release|Win32
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|x64.ActiveCfg = Release|Win32
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|x64.Build.0 = Release|Win32
- {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|Win32.ActiveCfg = Debug|Win32
- {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|Win32.Build.0 = Debug|Win32
- {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|x64.ActiveCfg = Debug|x64
- {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|x64.Build.0 = Debug|x64
- {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {28B5D777-DDF2-4B6B-B34F-31D938813856}.PGUpdate|x64.Build.0 = PGUpdate|x64
- {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|Win32.ActiveCfg = Release|Win32
- {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|Win32.Build.0 = Release|Win32
- {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|x64.ActiveCfg = Release|x64
- {28B5D777-DDF2-4B6B-B34F-31D938813856}.Release|x64.Build.0 = Release|x64
- {0E9791DB-593A-465F-98BC-681011311617}.Debug|Win32.ActiveCfg = Debug|Win32
- {0E9791DB-593A-465F-98BC-681011311617}.Debug|Win32.Build.0 = Debug|Win32
- {0E9791DB-593A-465F-98BC-681011311617}.Debug|x64.ActiveCfg = Debug|x64
- {0E9791DB-593A-465F-98BC-681011311617}.Debug|x64.Build.0 = Debug|x64
- {0E9791DB-593A-465F-98BC-681011311617}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {0E9791DB-593A-465F-98BC-681011311617}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {0E9791DB-593A-465F-98BC-681011311617}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {0E9791DB-593A-465F-98BC-681011311617}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {0E9791DB-593A-465F-98BC-681011311617}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {0E9791DB-593A-465F-98BC-681011311617}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {0E9791DB-593A-465F-98BC-681011311617}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {0E9791DB-593A-465F-98BC-681011311617}.PGUpdate|x64.Build.0 = PGUpdate|x64
- {0E9791DB-593A-465F-98BC-681011311617}.Release|Win32.ActiveCfg = Release|Win32
- {0E9791DB-593A-465F-98BC-681011311617}.Release|Win32.Build.0 = Release|Win32
- {0E9791DB-593A-465F-98BC-681011311617}.Release|x64.ActiveCfg = Release|x64
- {0E9791DB-593A-465F-98BC-681011311617}.Release|x64.Build.0 = Release|x64
- {0E9791DB-593A-465F-98BC-681011311618}.Debug|Win32.ActiveCfg = Debug|Win32
- {0E9791DB-593A-465F-98BC-681011311618}.Debug|Win32.Build.0 = Debug|Win32
- {0E9791DB-593A-465F-98BC-681011311618}.Debug|x64.ActiveCfg = Debug|x64
- {0E9791DB-593A-465F-98BC-681011311618}.Debug|x64.Build.0 = Debug|x64
- {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {0E9791DB-593A-465F-98BC-681011311618}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {0E9791DB-593A-465F-98BC-681011311618}.PGUpdate|x64.Build.0 = PGUpdate|x64
- {0E9791DB-593A-465F-98BC-681011311618}.Release|Win32.ActiveCfg = Release|Win32
- {0E9791DB-593A-465F-98BC-681011311618}.Release|Win32.Build.0 = Release|Win32
- {0E9791DB-593A-465F-98BC-681011311618}.Release|x64.ActiveCfg = Release|x64
- {0E9791DB-593A-465F-98BC-681011311618}.Release|x64.Build.0 = Release|x64
- {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|Win32.ActiveCfg = Debug|Win32
- {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|Win32.Build.0 = Debug|Win32
- {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|x64.ActiveCfg = Debug|x64
- {9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|x64.Build.0 = Debug|x64
- {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|x64.Build.0 = PGUpdate|x64
- {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|Win32.ActiveCfg = Release|Win32
- {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|Win32.Build.0 = Release|Win32
- {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|x64.ActiveCfg = Release|x64
- {9EC7190A-249F-4180-A900-548FDCF3055F}.Release|x64.Build.0 = Release|x64
- {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|Win32.ActiveCfg = Debug|Win32
- {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|Win32.Build.0 = Debug|Win32
- {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|x64.ActiveCfg = Debug|x64
- {17E1E049-C309-4D79-843F-AE483C264AEA}.Debug|x64.Build.0 = Debug|x64
- {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {17E1E049-C309-4D79-843F-AE483C264AEA}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {17E1E049-C309-4D79-843F-AE483C264AEA}.PGUpdate|x64.Build.0 = PGUpdate|x64
- {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|Win32.ActiveCfg = Release|Win32
- {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|Win32.Build.0 = Release|Win32
- {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|x64.ActiveCfg = Release|x64
- {17E1E049-C309-4D79-843F-AE483C264AEA}.Release|x64.Build.0 = Release|x64
- {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|Win32.ActiveCfg = Debug|Win32
- {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|Win32.Build.0 = Debug|Win32
- {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|x64.ActiveCfg = Debug|x64
- {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Debug|x64.Build.0 = Debug|x64
- {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.PGUpdate|x64.Build.0 = PGUpdate|x64
- {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|Win32.ActiveCfg = Release|Win32
- {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|Win32.Build.0 = Release|Win32
- {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|x64.ActiveCfg = Release|x64
- {31FFC478-7B4A-43E8-9954-8D03E2187E9C}.Release|x64.Build.0 = Release|x64
- {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|Win32.ActiveCfg = Debug|Win32
- {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|Win32.Build.0 = Debug|Win32
- {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|x64.ActiveCfg = Debug|x64
- {86937F53-C189-40EF-8CE8-8759D8E7D480}.Debug|x64.Build.0 = Debug|x64
- {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {86937F53-C189-40EF-8CE8-8759D8E7D480}.PGUpdate|x64.Build.0 = PGUpdate|x64
- {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|Win32.ActiveCfg = Release|Win32
- {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|Win32.Build.0 = Release|Win32
- {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|x64.ActiveCfg = Release|x64
- {86937F53-C189-40EF-8CE8-8759D8E7D480}.Release|x64.Build.0 = Release|x64
- {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|Win32.ActiveCfg = Debug|Win32
- {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|Win32.Build.0 = Debug|Win32
- {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|x64.ActiveCfg = Debug|x64
- {13CECB97-4119-4316-9D42-8534019A5A44}.Debug|x64.Build.0 = Debug|x64
- {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {13CECB97-4119-4316-9D42-8534019A5A44}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {13CECB97-4119-4316-9D42-8534019A5A44}.PGUpdate|x64.Build.0 = PGUpdate|x64
- {13CECB97-4119-4316-9D42-8534019A5A44}.Release|Win32.ActiveCfg = Release|Win32
- {13CECB97-4119-4316-9D42-8534019A5A44}.Release|Win32.Build.0 = Release|Win32
- {13CECB97-4119-4316-9D42-8534019A5A44}.Release|x64.ActiveCfg = Release|x64
- {13CECB97-4119-4316-9D42-8534019A5A44}.Release|x64.Build.0 = Release|x64
- {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|Win32.ActiveCfg = Debug|Win32
- {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|Win32.Build.0 = Debug|Win32
- {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|x64.ActiveCfg = Debug|x64
- {C6E20F84-3247-4AD6-B051-B073268F73BA}.Debug|x64.Build.0 = Debug|x64
- {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {C6E20F84-3247-4AD6-B051-B073268F73BA}.PGUpdate|x64.Build.0 = PGUpdate|x64
- {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|Win32.ActiveCfg = Release|Win32
- {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|Win32.Build.0 = Release|Win32
- {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|x64.ActiveCfg = Release|x64
- {C6E20F84-3247-4AD6-B051-B073268F73BA}.Release|x64.Build.0 = Release|x64
- {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|Win32.ActiveCfg = Debug|Win32
- {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|Win32.Build.0 = Debug|Win32
- {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|x64.ActiveCfg = Debug|x64
- {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Debug|x64.Build.0 = Debug|x64
- {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.PGUpdate|x64.Build.0 = PGUpdate|x64
- {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|Win32.ActiveCfg = Release|Win32
- {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|Win32.Build.0 = Release|Win32
- {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|x64.ActiveCfg = Release|x64
- {6901D91C-6E48-4BB7-9FEC-700C8131DF1D}.Release|x64.Build.0 = Release|x64
- {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.Debug|Win32.ActiveCfg = Debug|Win32
- {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.Debug|Win32.Build.0 = Debug|Win32
- {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.Debug|x64.ActiveCfg = Debug|x64
- {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.Debug|x64.Build.0 = Debug|x64
- {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGUpdate|x64.Build.0 = PGUpdate|x64
- {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.Release|Win32.ActiveCfg = Release|Win32
- {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.Release|Win32.Build.0 = Release|Win32
- {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.Release|x64.ActiveCfg = Release|x64
- {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.Release|x64.Build.0 = Release|x64
- {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|Win32.ActiveCfg = Debug|Win32
- {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|Win32.Build.0 = Debug|Win32
- {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|x64.ActiveCfg = Debug|x64
- {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Debug|x64.Build.0 = Debug|x64
- {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.PGUpdate|x64.Build.0 = PGUpdate|x64
- {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|Win32.ActiveCfg = Release|Win32
- {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|Win32.Build.0 = Release|Win32
- {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|x64.ActiveCfg = Release|x64
- {4946ECAC-2E69-4BF8-A90A-F5136F5094DF}.Release|x64.Build.0 = Release|x64
- {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|Win32.ActiveCfg = Debug|Win32
- {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|Win32.Build.0 = Debug|Win32
- {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|x64.ActiveCfg = Debug|x64
- {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Debug|x64.Build.0 = Debug|x64
- {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.PGUpdate|x64.Build.0 = PGUpdate|x64
- {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|Win32.ActiveCfg = Release|Win32
- {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|Win32.Build.0 = Release|Win32
- {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|x64.ActiveCfg = Release|x64
- {73FCD2BD-F133-46B7-8EC1-144CD82A59D5}.Release|x64.Build.0 = Release|x64
- {F9D71780-F393-11E0-BE50-0800200C9A66}.Debug|Win32.ActiveCfg = Debug|Win32
- {F9D71780-F393-11E0-BE50-0800200C9A66}.Debug|Win32.Build.0 = Debug|Win32
- {F9D71780-F393-11E0-BE50-0800200C9A66}.Debug|x64.ActiveCfg = Debug|x64
- {F9D71780-F393-11E0-BE50-0800200C9A66}.Debug|x64.Build.0 = Debug|x64
- {F9D71780-F393-11E0-BE50-0800200C9A66}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {F9D71780-F393-11E0-BE50-0800200C9A66}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {F9D71780-F393-11E0-BE50-0800200C9A66}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {F9D71780-F393-11E0-BE50-0800200C9A66}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {F9D71780-F393-11E0-BE50-0800200C9A66}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {F9D71780-F393-11E0-BE50-0800200C9A66}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {F9D71780-F393-11E0-BE50-0800200C9A66}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {F9D71780-F393-11E0-BE50-0800200C9A66}.PGUpdate|x64.Build.0 = PGUpdate|x64
- {F9D71780-F393-11E0-BE50-0800200C9A66}.Release|Win32.ActiveCfg = Release|Win32
- {F9D71780-F393-11E0-BE50-0800200C9A66}.Release|Win32.Build.0 = Release|Win32
- {F9D71780-F393-11E0-BE50-0800200C9A66}.Release|x64.ActiveCfg = Release|x64
- {F9D71780-F393-11E0-BE50-0800200C9A66}.Release|x64.Build.0 = Release|x64
- {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|Win32.ActiveCfg = Debug|Win32
- {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|Win32.Build.0 = Debug|Win32
- {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|x64.ActiveCfg = Debug|x64
- {18CAE28C-B454-46C1-87A0-493D91D97F03}.Debug|x64.Build.0 = Debug|x64
- {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {18CAE28C-B454-46C1-87A0-493D91D97F03}.PGUpdate|x64.Build.0 = PGUpdate|x64
- {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|Win32.ActiveCfg = Release|Win32
- {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|Win32.Build.0 = Release|Win32
- {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|x64.ActiveCfg = Release|x64
- {18CAE28C-B454-46C1-87A0-493D91D97F03}.Release|x64.Build.0 = Release|x64
- {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|Win32.ActiveCfg = Debug|Win32
- {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|Win32.Build.0 = Debug|Win32
- {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|x64.ActiveCfg = Debug|x64
- {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Debug|x64.Build.0 = Debug|x64
- {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.PGUpdate|x64.Build.0 = PGUpdate|x64
- {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|Win32.ActiveCfg = Release|Win32
- {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|Win32.Build.0 = Release|Win32
- {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|x64.ActiveCfg = Release|x64
- {ECC7CEAC-A5E5-458E-BB9E-2413CC847881}.Release|x64.Build.0 = Release|x64
- {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|Win32.ActiveCfg = Debug|Win32
- {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|Win32.Build.0 = Debug|Win32
- {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|x64.ActiveCfg = Debug|x64
- {D06B6426-4762-44CC-8BAD-D79052507F2F}.Debug|x64.Build.0 = Debug|x64
- {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {D06B6426-4762-44CC-8BAD-D79052507F2F}.PGUpdate|x64.Build.0 = PGUpdate|x64
- {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|Win32.ActiveCfg = Release|Win32
- {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|Win32.Build.0 = Release|Win32
- {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|x64.ActiveCfg = Release|x64
- {D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|x64.Build.0 = Release|x64
- {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|Win32.ActiveCfg = Release|Win32
- {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|x64.ActiveCfg = Release|x64
- {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGInstrument|Win32.ActiveCfg = Release|Win32
- {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGInstrument|x64.ActiveCfg = Release|x64
- {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGUpdate|Win32.ActiveCfg = Release|Win32
- {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGUpdate|x64.ActiveCfg = Release|x64
- {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release|Win32.ActiveCfg = Release|Win32
- {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release|x64.ActiveCfg = Release|x64
- {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|Win32.ActiveCfg = Debug|Win32
- {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|Win32.Build.0 = Debug|Win32
- {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|x64.ActiveCfg = Debug|x64
- {447F05A8-F581-4CAC-A466-5AC7936E207E}.Debug|x64.Build.0 = Debug|x64
- {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {447F05A8-F581-4CAC-A466-5AC7936E207E}.PGUpdate|x64.Build.0 = PGUpdate|x64
- {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|Win32.ActiveCfg = Release|Win32
- {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|Win32.Build.0 = Release|Win32
- {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|x64.ActiveCfg = Release|x64
- {447F05A8-F581-4CAC-A466-5AC7936E207E}.Release|x64.Build.0 = Release|x64
- {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|Win32.ActiveCfg = Debug|Win32
- {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|Win32.Build.0 = Debug|Win32
- {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|x64.ActiveCfg = Debug|x64
- {A1A295E5-463C-437F-81CA-1F32367685DA}.Debug|x64.Build.0 = Debug|x64
- {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {A1A295E5-463C-437F-81CA-1F32367685DA}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {A1A295E5-463C-437F-81CA-1F32367685DA}.PGUpdate|x64.Build.0 = PGUpdate|x64
- {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|Win32.ActiveCfg = Release|Win32
- {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|Win32.Build.0 = Release|Win32
- {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|x64.ActiveCfg = Release|x64
- {A1A295E5-463C-437F-81CA-1F32367685DA}.Release|x64.Build.0 = Release|x64
- {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|Win32.ActiveCfg = Debug|Win32
- {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|Win32.Build.0 = Debug|Win32
- {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|x64.ActiveCfg = Debug|x64
- {9E48B300-37D1-11DD-8C41-005056C00008}.Debug|x64.Build.0 = Debug|x64
- {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {9E48B300-37D1-11DD-8C41-005056C00008}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {9E48B300-37D1-11DD-8C41-005056C00008}.PGUpdate|x64.Build.0 = PGUpdate|x64
- {9E48B300-37D1-11DD-8C41-005056C00008}.Release|Win32.ActiveCfg = Release|Win32
- {9E48B300-37D1-11DD-8C41-005056C00008}.Release|Win32.Build.0 = Release|Win32
- {9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.ActiveCfg = Release|x64
- {9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.Build.0 = Release|x64
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|Win32.ActiveCfg = Debug|Win32
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|Win32.Build.0 = Debug|Win32
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|x64.ActiveCfg = Debug|x64
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|x64.Build.0 = Debug|x64
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|x64.Build.0 = PGUpdate|x64
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|Win32.ActiveCfg = Release|Win32
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|Win32.Build.0 = Release|Win32
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|x64.ActiveCfg = Release|x64
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|x64.Build.0 = Release|x64
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|Win32.ActiveCfg = Debug|Win32
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|Win32.Build.0 = Debug|Win32
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|x64.ActiveCfg = Debug|x64
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|x64.Build.0 = Debug|x64
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|Win32.ActiveCfg = Release|Win32
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|Win32.Build.0 = Release|Win32
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|x64.ActiveCfg = Release|x64
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|x64.Build.0 = Release|x64
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|Win32.ActiveCfg = Release|Win32
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|Win32.Build.0 = Release|Win32
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|x64.ActiveCfg = Release|x64
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|x64.Build.0 = Release|x64
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|Win32.ActiveCfg = Release|Win32
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|Win32.Build.0 = Release|Win32
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|x64.ActiveCfg = Release|x64
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|x64.Build.0 = Release|x64
- {885D4898-D08D-4091-9C40-C700CFE3FC5A}.Debug|Win32.ActiveCfg = PGInstrument|Win32
- {885D4898-D08D-4091-9C40-C700CFE3FC5A}.Debug|x64.ActiveCfg = PGUpdate|x64
- {885D4898-D08D-4091-9C40-C700CFE3FC5A}.Debug|x64.Build.0 = PGUpdate|x64
- {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGUpdate|x64.Build.0 = PGUpdate|x64
- {885D4898-D08D-4091-9C40-C700CFE3FC5A}.Release|Win32.ActiveCfg = Release|Win32
- {885D4898-D08D-4091-9C40-C700CFE3FC5A}.Release|Win32.Build.0 = Release|Win32
- {885D4898-D08D-4091-9C40-C700CFE3FC5A}.Release|x64.ActiveCfg = Release|x64
- {885D4898-D08D-4091-9C40-C700CFE3FC5A}.Release|x64.Build.0 = Release|x64
- {F749B822-B489-4CA5-A3AD-CE078F5F338A}.Debug|Win32.ActiveCfg = Debug|Win32
- {F749B822-B489-4CA5-A3AD-CE078F5F338A}.Debug|Win32.Build.0 = Debug|Win32
- {F749B822-B489-4CA5-A3AD-CE078F5F338A}.Debug|x64.ActiveCfg = Debug|x64
- {F749B822-B489-4CA5-A3AD-CE078F5F338A}.Debug|x64.Build.0 = Debug|x64
- {F749B822-B489-4CA5-A3AD-CE078F5F338A}.PGInstrument|Win32.ActiveCfg = Release|Win32
- {F749B822-B489-4CA5-A3AD-CE078F5F338A}.PGInstrument|Win32.Build.0 = Release|Win32
- {F749B822-B489-4CA5-A3AD-CE078F5F338A}.PGInstrument|x64.ActiveCfg = Release|x64
- {F749B822-B489-4CA5-A3AD-CE078F5F338A}.PGInstrument|x64.Build.0 = Release|x64
- {F749B822-B489-4CA5-A3AD-CE078F5F338A}.PGUpdate|Win32.ActiveCfg = Release|Win32
- {F749B822-B489-4CA5-A3AD-CE078F5F338A}.PGUpdate|Win32.Build.0 = Release|Win32
- {F749B822-B489-4CA5-A3AD-CE078F5F338A}.PGUpdate|x64.ActiveCfg = Release|x64
- {F749B822-B489-4CA5-A3AD-CE078F5F338A}.PGUpdate|x64.Build.0 = Release|x64
- {F749B822-B489-4CA5-A3AD-CE078F5F338A}.Release|Win32.ActiveCfg = Release|Win32
- {F749B822-B489-4CA5-A3AD-CE078F5F338A}.Release|Win32.Build.0 = Release|Win32
- {F749B822-B489-4CA5-A3AD-CE078F5F338A}.Release|x64.ActiveCfg = Release|x64
- {F749B822-B489-4CA5-A3AD-CE078F5F338A}.Release|x64.Build.0 = Release|x64
- {A2697BD3-28C1-4AEC-9106-8B748639FD16}.Debug|Win32.ActiveCfg = Debug|Win32
- {A2697BD3-28C1-4AEC-9106-8B748639FD16}.Debug|Win32.Build.0 = Debug|Win32
- {A2697BD3-28C1-4AEC-9106-8B748639FD16}.Debug|x64.ActiveCfg = Debug|x64
- {A2697BD3-28C1-4AEC-9106-8B748639FD16}.Debug|x64.Build.0 = Debug|x64
- {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGUpdate|x64.Build.0 = PGUpdate|x64
- {A2697BD3-28C1-4AEC-9106-8B748639FD16}.Release|Win32.ActiveCfg = Release|Win32
- {A2697BD3-28C1-4AEC-9106-8B748639FD16}.Release|Win32.Build.0 = Release|Win32
- {A2697BD3-28C1-4AEC-9106-8B748639FD16}.Release|x64.ActiveCfg = Release|x64
- {A2697BD3-28C1-4AEC-9106-8B748639FD16}.Release|x64.Build.0 = Release|x64
- {04F37400-883C-42D7-AE28-6CF9953BF975}.Debug|Win32.ActiveCfg = Debug|Win32
- {04F37400-883C-42D7-AE28-6CF9953BF975}.Debug|Win32.Build.0 = Debug|Win32
- {04F37400-883C-42D7-AE28-6CF9953BF975}.Debug|x64.ActiveCfg = Debug|x64
- {04F37400-883C-42D7-AE28-6CF9953BF975}.Debug|x64.Build.0 = Debug|x64
- {04F37400-883C-42D7-AE28-6CF9953BF975}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {04F37400-883C-42D7-AE28-6CF9953BF975}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {04F37400-883C-42D7-AE28-6CF9953BF975}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {04F37400-883C-42D7-AE28-6CF9953BF975}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {04F37400-883C-42D7-AE28-6CF9953BF975}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {04F37400-883C-42D7-AE28-6CF9953BF975}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {04F37400-883C-42D7-AE28-6CF9953BF975}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {04F37400-883C-42D7-AE28-6CF9953BF975}.PGUpdate|x64.Build.0 = PGUpdate|x64
- {04F37400-883C-42D7-AE28-6CF9953BF975}.Release|Win32.ActiveCfg = Release|Win32
- {04F37400-883C-42D7-AE28-6CF9953BF975}.Release|Win32.Build.0 = Release|Win32
- {04F37400-883C-42D7-AE28-6CF9953BF975}.Release|x64.ActiveCfg = Release|x64
- {04F37400-883C-42D7-AE28-6CF9953BF975}.Release|x64.Build.0 = Release|x64
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/PC/VS9.0/pginstrument.vsprops b/PC/VS9.0/pginstrument.vsprops
deleted file mode 100644
index 99c117b152..0000000000
--- a/PC/VS9.0/pginstrument.vsprops
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="pginstrument"
- OutputDirectory="$(OutDirPGI)"
- IntermediateDirectory="$(SolutionDir)$(PlatformName)-temp-pgi\$(ProjectName)\"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- EnableIntrinsicFunctions="false"
- FavorSizeOrSpeed="2"
- OmitFramePointers="true"
- EnableFiberSafeOptimizations="false"
- WholeProgramOptimization="true"
- StringPooling="true"
- ExceptionHandling="0"
- BufferSecurityCheck="false"
- />
- <Tool
- Name="VCLinkerTool"
- OptimizeReferences="2"
- EnableCOMDATFolding="1"
- LinkTimeCodeGeneration="2"
- ProfileGuidedDatabase="$(SolutionDir)$(PlatformName)-pgi\$(TargetName).pgd"
- ImportLibrary="$(OutDirPGI)\$(TargetName).lib"
- />
- <UserMacro
- Name="OutDirPGI"
- Value="$(SolutionDir)$(PlatformName)-pgi\"
- />
-</VisualStudioPropertySheet>
diff --git a/PC/VS9.0/pgupdate.vsprops b/PC/VS9.0/pgupdate.vsprops
deleted file mode 100644
index 26cfc2d0dd..0000000000
--- a/PC/VS9.0/pgupdate.vsprops
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="pgupdate"
- OutputDirectory="$(SolutionDir)$(PlatformName)-pgo\"
- InheritedPropertySheets="$(SolutionDir)\pginstrument.vsprops"
- >
- <Tool
- Name="VCLinkerTool"
- AdditionalManifestDependencies=""
- LinkTimeCodeGeneration="4"
- />
-</VisualStudioPropertySheet>
diff --git a/PC/VS9.0/pyd.vsprops b/PC/VS9.0/pyd.vsprops
deleted file mode 100644
index 34c21e15c5..0000000000
--- a/PC/VS9.0/pyd.vsprops
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="pyd"
- InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="Py_BUILD_CORE_MODULE"
- RuntimeLibrary="2"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\$(ProjectName).pyd"
- ProgramDatabaseFile="$(OutDir)\$(ProjectName).pdb"
- ImportLibrary="$(OutDir)\$(TargetName).lib"
- GenerateManifest="false"
- />
- <Tool
- Name="VCManifestTool"
- EmbedManifest="false"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine=""
- />
-</VisualStudioPropertySheet>
diff --git a/PC/VS9.0/pyd_d.vsprops b/PC/VS9.0/pyd_d.vsprops
deleted file mode 100644
index 313a30b782..0000000000
--- a/PC/VS9.0/pyd_d.vsprops
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="pyd_d"
- InheritedPropertySheets=".\pyproject.vsprops;.\debug.vsprops"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- InlineFunctionExpansion="0"
- EnableIntrinsicFunctions="false"
- PreprocessorDefinitions="Py_BUILD_CORE_MODULE"
- RuntimeLibrary="3"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\$(ProjectName)_d.pyd"
- LinkIncremental="1"
- ProgramDatabaseFile="$(OutDir)\$(ProjectName)_d.pdb"
- ImportLibrary="$(OutDir)\$(TargetName).lib"
- GenerateManifest="false"
- />
- <Tool
- Name="VCManifestTool"
- EmbedManifest="false"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine=""
- />
- <UserMacro
- Name="PythonExe"
- Value="$(SolutionDir)python_d.exe"
- />
-</VisualStudioPropertySheet>
diff --git a/PC/VS9.0/pyexpat.vcproj b/PC/VS9.0/pyexpat.vcproj
deleted file mode 100644
index a8d2cd7527..0000000000
--- a/PC/VS9.0/pyexpat.vcproj
+++ /dev/null
@@ -1,553 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="pyexpat"
- ProjectGUID="{D06B6426-4762-44CC-8BAD-D79052507F2F}"
- RootNamespace="pyexpat"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=".\..\..\Modules\expat"
- PreprocessorDefinitions="PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=".\..\..\Modules\expat"
- PreprocessorDefinitions="PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=".\..\..\Modules\expat"
- PreprocessorDefinitions="PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=".\..\..\Modules\expat"
- PreprocessorDefinitions="PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=".\..\..\Modules\expat"
- PreprocessorDefinitions="PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=".\..\..\Modules\expat"
- PreprocessorDefinitions="PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=".\..\..\Modules\expat"
- PreprocessorDefinitions="PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=".\..\..\Modules\expat"
- PreprocessorDefinitions="PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Header Files"
- >
- <File
- RelativePath="..\..\Modules\expat\xmlrole.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\expat\xmltok.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Source Files"
- >
- <File
- RelativePath="..\..\Modules\pyexpat.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\expat\xmlparse.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\expat\xmlrole.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\expat\xmltok.c"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/VS9.0/pyproject.vsprops b/PC/VS9.0/pyproject.vsprops
deleted file mode 100644
index a90987569b..0000000000
--- a/PC/VS9.0/pyproject.vsprops
+++ /dev/null
@@ -1,91 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="pyproject"
- OutputDirectory="$(SolutionDir)"
- IntermediateDirectory="$(SolutionDir)$(PlatformName)-temp-$(ConfigurationName)\$(ProjectName)\"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- InlineFunctionExpansion="1"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="..\..\Include; ..\..\PC"
- PreprocessorDefinitions="_WIN32"
- StringPooling="true"
- ExceptionHandling="0"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- WarningLevel="3"
- DebugInformationFormat="3"
- CompileAs="0"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="1"
- AdditionalLibraryDirectories="$(OutDir)"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
- SubSystem="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCResourceCompilerTool"
- AdditionalIncludeDirectories="..\..\PC;..\..\Include"
- />
- <UserMacro
- Name="PyDllName"
- Value="python34"
- />
- <UserMacro
- Name="PythonExe"
- Value="$(SolutionDir)\python.exe"
- />
- <UserMacro
- Name="externalsDir"
- Value="..\..\.."
- />
- <UserMacro
- Name="sqlite3Dir"
- Value="$(externalsDir)\sqlite-3.8.3.1"
- />
- <UserMacro
- Name="bz2Dir"
- Value="$(externalsDir)\bzip2-1.0.6"
- />
- <UserMacro
- Name="lzmaDir"
- Value="$(externalsDir)\xz-5.0.5"
- />
- <UserMacro
- Name="opensslDir"
- Value="$(externalsDir)\openssl-1.0.1g"
- />
- <UserMacro
- Name="tcltkDir"
- Value="$(externalsDir)\tcltk"
- />
- <UserMacro
- Name="tcltk64Dir"
- Value="$(externalsDir)\tcltk64"
- />
- <UserMacro
- Name="tcltkLib"
- Value="$(tcltkDir)\lib\tcl85.lib $(tcltkDir)\lib\tk85.lib"
- />
- <UserMacro
- Name="tcltkLibDebug"
- Value="$(tcltkDir)\lib\tcl85g.lib $(tcltkDir)\lib\tk85g.lib"
- />
- <UserMacro
- Name="tcltk64Lib"
- Value="$(tcltk64Dir)\lib\tcl85.lib $(tcltk64Dir)\lib\tk85.lib"
- />
- <UserMacro
- Name="tcltk64LibDebug"
- Value="$(tcltk64Dir)\lib\tcl85g.lib $(tcltk64Dir)\lib\tk85g.lib"
- />
-</VisualStudioPropertySheet>
diff --git a/PC/VS9.0/python.vcproj b/PC/VS9.0/python.vcproj
deleted file mode 100644
index b07de2183f..0000000000
--- a/PC/VS9.0/python.vcproj
+++ /dev/null
@@ -1,637 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="python"
- ProjectGUID="{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="_CONSOLE"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\python.exe"
- SubSystem="1"
- StackReserveSize="2000000"
- BaseAddress="0x1d000000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="1"
- InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="_CONSOLE"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\python.exe"
- SubSystem="1"
- StackReserveSize="2000000"
- BaseAddress="0x1d000000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\pyproject.vsprops;.\debug.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- EnableIntrinsicFunctions="false"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="_CONSOLE"
- RuntimeLibrary="3"
- BrowseInformation="1"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- AdditionalIncludeDirectories="..\..\Include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\python_d.exe"
- SubSystem="1"
- StackReserveSize="2000000"
- BaseAddress="0x1d000000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- ConfigurationType="1"
- InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\debug.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- EnableIntrinsicFunctions="false"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="_CONSOLE"
- RuntimeLibrary="3"
- BrowseInformation="1"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- AdditionalIncludeDirectories="..\..\Include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\python_d.exe"
- SubSystem="1"
- StackReserveSize="2100000"
- BaseAddress="0x1d000000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops;.\pginstrument.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="_CONSOLE"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\python.exe"
- SubSystem="1"
- StackReserveSize="2000000"
- BaseAddress="0x1d000000"
- ImportLibrary=""
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|x64"
- ConfigurationType="1"
- InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops;.\pginstrument.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="_CONSOLE"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\python.exe"
- SubSystem="1"
- StackReserveSize="2000000"
- BaseAddress="0x1d000000"
- ImportLibrary=""
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops;.\pgupdate.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="_CONSOLE"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\python.exe"
- SubSystem="1"
- StackReserveSize="2000000"
- BaseAddress="0x1d000000"
- ImportLibrary=""
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|x64"
- ConfigurationType="1"
- InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops;.\pgupdate.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="_CONSOLE"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\python.exe"
- SubSystem="1"
- StackReserveSize="2000000"
- BaseAddress="0x1d000000"
- ImportLibrary=""
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Resource Files"
- >
- <File
- RelativePath="..\..\PC\pycon.ico"
- >
- </File>
- <File
- RelativePath="..\..\PC\python_exe.rc"
- >
- </File>
- </Filter>
- <Filter
- Name="Source Files"
- >
- <File
- RelativePath="..\..\Modules\python.c"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/VS9.0/python3dll.vcproj b/PC/VS9.0/python3dll.vcproj
deleted file mode 100644
index ed7333bc56..0000000000
--- a/PC/VS9.0/python3dll.vcproj
+++ /dev/null
@@ -1,246 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="python3dll"
- ProjectGUID="{885D4898-D08D-4091-9C40-C700CFE3FC5A}"
- RootNamespace="python3dll"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="0"
- InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCNMakeTool"
- BuildCommandLine="cd $(InputDir)\..\..\PC&#x0D;&#x0A;nmake /f python3.mak MACHINE=x86 OutDir=$(OutDir)"
- ReBuildCommandLine="cd $(InputDir)\..\..\PC&#x0D;&#x0A;nmake /f python3.mak MACHINE=x86 OutDir=$(OutDir) rebuild"
- CleanCommandLine="cd $(InputDir)\..\..\PC&#x0D;&#x0A;nmake /f python3.mak MACHINE=x86 OutDir=$(OutDir) clean"
- Output="$(OutDir)\python3.dll"
- PreprocessorDefinitions=""
- IncludeSearchPath=""
- ForcedIncludes=""
- AssemblySearchPath=""
- ForcedUsingAssemblies=""
- CompileAsManaged=""
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="0"
- InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops"
- >
- <Tool
- Name="VCNMakeTool"
- BuildCommandLine="cd $(InputDir)\..\..\PC&#x0D;&#x0A;nmake /f python3.mak MACHINE=x64 OutDir=$(OutDir)"
- ReBuildCommandLine="cd $(InputDir)\..\..\PC&#x0D;&#x0A;nmake /f python3.mak MACHINE=x64 OutDir=$(OutDir) rebuild"
- CleanCommandLine="cd $(InputDir)\..\..\PC&#x0D;&#x0A;nmake /f python3.mak MACHINE=x64 OutDir=$(OutDir) clean"
- Output="$(OutDir)\python3.dll"
- PreprocessorDefinitions=""
- IncludeSearchPath=""
- ForcedIncludes=""
- AssemblySearchPath=""
- ForcedUsingAssemblies=""
- CompileAsManaged=""
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|Win32"
- ConfigurationType="0"
- InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops;.\pginstrument.vsprops"
- >
- <Tool
- Name="VCNMakeTool"
- BuildCommandLine="cd $(InputDir)\..\..\PC&#x0D;&#x0A;nmake /f python3.mak MACHINE=x86 OutDir=$(OutDir)"
- ReBuildCommandLine="cd $(InputDir)\..\..\PC&#x0D;&#x0A;nmake /f python3.mak MACHINE=x86 OutDir=$(OutDir) rebuild"
- CleanCommandLine="cd $(InputDir)\..\..\PC&#x0D;&#x0A;nmake /f python3.mak MACHINE=x86 OutDir=$(OutDir) clean"
- Output="$(OutDir)\python3.dll"
- PreprocessorDefinitions=""
- IncludeSearchPath=""
- ForcedIncludes=""
- AssemblySearchPath=""
- ForcedUsingAssemblies=""
- CompileAsManaged=""
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|x64"
- ConfigurationType="0"
- InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops;.\pginstrument.vsprops"
- >
- <Tool
- Name="VCNMakeTool"
- BuildCommandLine="cd $(InputDir)\..\..\PC&#x0D;&#x0A;nmake /f python3.mak MACHINE=x64 OutDir=$(OutDir)"
- ReBuildCommandLine="cd $(InputDir)\..\..\PC&#x0D;&#x0A;nmake /f python3.mak MACHINE=x64 OutDir=$(OutDir) rebuild"
- CleanCommandLine="cd $(InputDir)\..\..\PC&#x0D;&#x0A;nmake /f python3.mak MACHINE=x64 OutDir=$(OutDir) clean"
- Output="$(OutDir)\python3.dll"
- PreprocessorDefinitions=""
- IncludeSearchPath=""
- ForcedIncludes=""
- AssemblySearchPath=""
- ForcedUsingAssemblies=""
- CompileAsManaged=""
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|Win32"
- ConfigurationType="0"
- InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops;.\pgupdate.vsprops"
- >
- <Tool
- Name="VCNMakeTool"
- BuildCommandLine="cd $(InputDir)\..\..\PC&#x0D;&#x0A;nmake /f python3.mak MACHINE=x86 OutDir=$(OutDir)"
- ReBuildCommandLine="cd $(InputDir)\..\..\PC&#x0D;&#x0A;nmake /f python3.mak MACHINE=x86 OutDir=$(OutDir) rebuild"
- CleanCommandLine="cd $(InputDir)\..\..\PC&#x0D;&#x0A;nmake /f python3.mak MACHINE=x86 OutDir=$(OutDir) clean"
- Output="$(OutDir)\python3.dll"
- PreprocessorDefinitions=""
- IncludeSearchPath=""
- ForcedIncludes=""
- AssemblySearchPath=""
- ForcedUsingAssemblies=""
- CompileAsManaged=""
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|x64"
- ConfigurationType="0"
- InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops;.\pgupdate.vsprops"
- >
- <Tool
- Name="VCNMakeTool"
- BuildCommandLine="cd $(InputDir)\..\..\PC&#x0D;&#x0A;nmake /f python3.mak MACHINE=x64 OutDir=$(OutDir)"
- ReBuildCommandLine="cd $(InputDir)\..\..\PC&#x0D;&#x0A;nmake /f python3.mak MACHINE=x64 OutDir=$(OutDir) rebuild"
- CleanCommandLine="cd $(InputDir)\..\..\PC&#x0D;&#x0A;nmake /f python3.mak MACHINE=x64 OutDir=$(OutDir) clean"
- Output="$(OutDir)\python3.dll"
- PreprocessorDefinitions=""
- IncludeSearchPath=""
- ForcedIncludes=""
- AssemblySearchPath=""
- ForcedUsingAssemblies=""
- CompileAsManaged=""
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\PC\python3.def"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- </FileConfiguration>
- <FileConfiguration
- Name="PGInstrument|Win32"
- >
- </FileConfiguration>
- <FileConfiguration
- Name="PGInstrument|x64"
- >
- </FileConfiguration>
- <FileConfiguration
- Name="PGUpdate|Win32"
- >
- </FileConfiguration>
- <FileConfiguration
- Name="PGUpdate|x64"
- >
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\PC\python3dll.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- </FileConfiguration>
- <FileConfiguration
- Name="PGInstrument|Win32"
- >
- </FileConfiguration>
- <FileConfiguration
- Name="PGInstrument|x64"
- >
- </FileConfiguration>
- <FileConfiguration
- Name="PGUpdate|Win32"
- >
- </FileConfiguration>
- <FileConfiguration
- Name="PGUpdate|x64"
- >
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- <File
- RelativePath="..\..\PC\python_nt.rc"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- </FileConfiguration>
- <FileConfiguration
- Name="PGInstrument|Win32"
- >
- </FileConfiguration>
- <FileConfiguration
- Name="PGInstrument|x64"
- >
- </FileConfiguration>
- <FileConfiguration
- Name="PGUpdate|Win32"
- >
- </FileConfiguration>
- <FileConfiguration
- Name="PGUpdate|x64"
- >
- </FileConfiguration>
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/VS9.0/pythoncore.vcproj b/PC/VS9.0/pythoncore.vcproj
deleted file mode 100644
index cf60470ce2..0000000000
--- a/PC/VS9.0/pythoncore.vcproj
+++ /dev/null
@@ -1,1877 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="pythoncore"
- ProjectGUID="{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}"
- RootNamespace="pythoncore"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/Zm200 "
- AdditionalIncludeDirectories="..\..\Python;..\..\Modules\zlib"
- PreprocessorDefinitions="_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32"
- RuntimeLibrary="2"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- AdditionalIncludeDirectories="..\..\Include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- Description="Generate build information..."
- CommandLine="&quot;$(SolutionDir)make_buildinfo.exe&quot; Release &quot;$(IntDir)\&quot;"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="&quot;$(IntDir)getbuildinfo.o&quot;"
- OutputFile="$(OutDir)\$(PyDllName).dll"
- IgnoreDefaultLibraryNames="libc"
- ProgramDatabaseFile="$(OutDir)$(PyDllName).pdb"
- BaseAddress="0x1e000000"
- ImportLibrary="$(OutDir)$(PyDllName).lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/Zm200 "
- AdditionalIncludeDirectories="..\..\Python;..\..\Modules\zlib"
- PreprocessorDefinitions="_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32"
- RuntimeLibrary="2"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- AdditionalIncludeDirectories="..\..\Include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- Description="Generate build information..."
- CommandLine="&quot;$(SolutionDir)make_buildinfo.exe&quot; Release &quot;$(IntDir)\&quot;"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="&quot;$(IntDir)getbuildinfo.o&quot;"
- OutputFile="$(OutDir)\$(PyDllName).dll"
- IgnoreDefaultLibraryNames="libc"
- ProgramDatabaseFile="$(OutDir)$(PyDllName).pdb"
- BaseAddress="0x1e000000"
- ImportLibrary="$(OutDir)$(PyDllName).lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyproject.vsprops;.\debug.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/Zm200 "
- Optimization="0"
- InlineFunctionExpansion="0"
- EnableIntrinsicFunctions="false"
- AdditionalIncludeDirectories="..\..\Python;..\..\Modules\zlib"
- PreprocessorDefinitions="_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32"
- RuntimeLibrary="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- AdditionalIncludeDirectories="..\..\Include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- Description="Generate build information..."
- CommandLine="&quot;$(SolutionDir)make_buildinfo.exe&quot; Debug &quot;$(IntDir)\&quot;"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="&quot;$(IntDir)getbuildinfo.o&quot;"
- OutputFile="$(OutDir)\$(PyDllName)_d.dll"
- IgnoreDefaultLibraryNames="libc"
- ProgramDatabaseFile="$(OutDir)$(PyDllName)_d.pdb"
- BaseAddress="0x1e000000"
- ImportLibrary="$(OutDir)$(PyDllName)_d.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\debug.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/Zm200 "
- Optimization="0"
- InlineFunctionExpansion="0"
- EnableIntrinsicFunctions="false"
- AdditionalIncludeDirectories="..\..\Python;..\..\Modules\zlib"
- PreprocessorDefinitions="_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32"
- RuntimeLibrary="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- AdditionalIncludeDirectories="..\..\Include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- Description="Generate build information..."
- CommandLine="&quot;$(SolutionDir)make_buildinfo.exe&quot; Debug &quot;$(IntDir)\&quot;"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="&quot;$(IntDir)getbuildinfo.o&quot;"
- OutputFile="$(OutDir)\$(PyDllName)_d.dll"
- IgnoreDefaultLibraryNames="libc"
- ProgramDatabaseFile="$(OutDir)$(PyDllName)_d.pdb"
- BaseAddress="0x1e000000"
- ImportLibrary="$(OutDir)$(PyDllName)_d.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops;.\pginstrument.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/Zm200 "
- AdditionalIncludeDirectories="..\..\Python;..\..\Modules\zlib"
- PreprocessorDefinitions="_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32"
- RuntimeLibrary="2"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- AdditionalIncludeDirectories="..\..\Include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- Description="Generate build information..."
- CommandLine="&quot;$(SolutionDir)make_buildinfo.exe&quot; Release &quot;$(IntDir)\&quot;"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="&quot;$(IntDir)getbuildinfo.o&quot;"
- OutputFile="$(OutDir)\$(PyDllName).dll"
- IgnoreDefaultLibraryNames="libc"
- ProgramDatabaseFile="$(OutDir)$(PyDllName).pdb"
- BaseAddress="0x1e000000"
- ImportLibrary="$(OutDirPGI)$(PyDllName).lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops;.\pginstrument.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/Zm200 "
- AdditionalIncludeDirectories="..\..\Python;..\..\Modules\zlib"
- PreprocessorDefinitions="_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32"
- RuntimeLibrary="2"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- AdditionalIncludeDirectories="..\..\Include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- Description="Generate build information..."
- CommandLine="&quot;$(SolutionDir)make_buildinfo.exe&quot; Release &quot;$(IntDir)\&quot;"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="&quot;$(IntDir)getbuildinfo.o&quot;"
- OutputFile="$(OutDir)\$(PyDllName).dll"
- IgnoreDefaultLibraryNames="libc"
- ProgramDatabaseFile="$(OutDir)$(PyDllName).pdb"
- BaseAddress="0x1e000000"
- ImportLibrary="$(OutDirPGI)$(PyDllName).lib"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops;.\pgupdate.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/Zm200 "
- AdditionalIncludeDirectories="..\..\Python;..\..\Modules\zlib"
- PreprocessorDefinitions="_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32"
- RuntimeLibrary="2"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- AdditionalIncludeDirectories="..\..\Include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- Description="Generate build information..."
- CommandLine="&quot;$(SolutionDir)make_buildinfo.exe&quot; Release &quot;$(IntDir)\&quot;"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="&quot;$(IntDir)getbuildinfo.o&quot;"
- OutputFile="$(OutDir)\$(PyDllName).dll"
- IgnoreDefaultLibraryNames="libc"
- ProgramDatabaseFile="$(OutDir)$(PyDllName).pdb"
- BaseAddress="0x1e000000"
- ImportLibrary="$(OutDirPGI)$(PyDllName).lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops;.\pgupdate.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/Zm200 "
- AdditionalIncludeDirectories="..\..\Python;..\..\Modules\zlib"
- PreprocessorDefinitions="_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32"
- RuntimeLibrary="2"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- AdditionalIncludeDirectories="..\..\Include"
- />
- <Tool
- Name="VCPreLinkEventTool"
- Description="Generate build information..."
- CommandLine="&quot;$(SolutionDir)make_buildinfo.exe&quot; Release &quot;$(IntDir)\&quot;"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="&quot;$(IntDir)getbuildinfo.o&quot;"
- OutputFile="$(OutDir)\$(PyDllName).dll"
- IgnoreDefaultLibraryNames="libc"
- ProgramDatabaseFile="$(OutDir)$(PyDllName).pdb"
- BaseAddress="0x1e000000"
- ImportLibrary="$(OutDirPGI)$(PyDllName).lib"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Include"
- >
- <File
- RelativePath="..\..\Include\abstract.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\accu.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\asdl.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\ast.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\bitset.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\boolobject.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\bytes_methods.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\bytearrayobject.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\bytesobject.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\cellobject.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\ceval.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\classobject.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\code.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\codecs.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\compile.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\complexobject.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\datetime.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\descrobject.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\dictobject.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\dynamic_annotations.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\enumobject.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\errcode.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\eval.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\fileobject.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\fileutils.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\floatobject.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\frameobject.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\funcobject.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\genobject.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\graminit.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\grammar.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\import.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\intrcheck.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\iterobject.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\listobject.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\longintrepr.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\longobject.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\marshal.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\memoryobject.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\metagrammar.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\methodobject.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\modsupport.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\moduleobject.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\namespaceobject.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\node.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\object.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\objimpl.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\opcode.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\osdefs.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\parsetok.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\patchlevel.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\pgen.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\pgenheaders.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\py_curses.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\pyarena.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\pycapsule.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\pyctype.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\pydebug.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\pyerrors.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\pyexpat.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\pyfpe.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\pygetopt.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\pymactoolbox.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\pymath.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\pytime.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\pymacro.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\pymem.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\pyport.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\pystate.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\pystrcmp.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\pystrtod.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\dtoa.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\Python-ast.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\Python.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\pythonrun.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\pythread.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\rangeobject.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\setobject.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\sliceobject.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\structmember.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\structseq.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\symtable.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\sysmodule.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\timefuncs.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\token.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\traceback.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\tupleobject.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\ucnhash.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\unicodeobject.h"
- >
- </File>
- <File
- RelativePath="..\..\Include\weakrefobject.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Modules"
- >
- <File
- RelativePath="..\..\Modules\_bisectmodule.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_codecsmodule.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_collectionsmodule.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_csv.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_functoolsmodule.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_heapqmodule.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_json.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_localemodule.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_lsprof.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_math.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_math.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_pickle.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_randommodule.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_sre.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_struct.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_weakref.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_winapi.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\arraymodule.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\atexitmodule.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\audioop.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\binascii.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\cmathmodule.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_datetimemodule.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\errnomodule.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\faulthandler.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\gcmodule.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\itertoolsmodule.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\main.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\mathmodule.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\md5module.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\mmapmodule.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_operator.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\parsermodule.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\posixmodule.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\rotatingtree.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\rotatingtree.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\sha1module.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\sha256module.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\sha512module.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\signalmodule.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\sre.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\sre_constants.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\sre_lib.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_stat.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\symtablemodule.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_threadmodule.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\timemodule.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\xxsubtype.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zipimport.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlibmodule.c"
- >
- </File>
- <Filter
- Name="_io"
- >
- <File
- RelativePath="..\..\Modules\_io\fileio.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_io\bytesio.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_io\stringio.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_io\bufferedio.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_io\iobase.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_io\textio.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_io\_iomodule.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\_io\_iomodule.h"
- >
- </File>
- </Filter>
- <Filter
- Name="zlib"
- >
- <File
- RelativePath="..\..\Modules\zlib\adler32.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlib\compress.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlib\crc32.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlib\crc32.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlib\deflate.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlib\deflate.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlib\infback.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlib\inffast.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlib\inffast.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlib\inffixed.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlib\inflate.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlib\inflate.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlib\inftrees.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlib\inftrees.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlib\trees.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlib\trees.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlib\uncompr.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlib\zconf.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlib\zconf.in.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlib\zlib.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlib\zutil.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlib\zutil.h"
- >
- </File>
- </Filter>
- <Filter
- Name="cjkcodecs"
- >
- <File
- RelativePath="..\..\Modules\cjkcodecs\_codecs_cn.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\cjkcodecs\_codecs_hk.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\cjkcodecs\_codecs_iso2022.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\cjkcodecs\_codecs_jp.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\cjkcodecs\_codecs_kr.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\cjkcodecs\_codecs_tw.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\cjkcodecs\alg_jisx0201.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\cjkcodecs\cjkcodecs.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\cjkcodecs\emu_jisx0213_2000.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\cjkcodecs\mappings_cn.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\cjkcodecs\mappings_hk.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\cjkcodecs\mappings_jisx0213_pair.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\cjkcodecs\mappings_jp.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\cjkcodecs\mappings_kr.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\cjkcodecs\mappings_tw.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\cjkcodecs\multibytecodec.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\cjkcodecs\multibytecodec.h"
- >
- </File>
- </Filter>
- </Filter>
- <Filter
- Name="Objects"
- >
- <File
- RelativePath="..\..\Objects\abstract.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\accu.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\boolobject.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\bytes_methods.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\bytearrayobject.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\bytesobject.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\capsule.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\cellobject.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\classobject.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\codeobject.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\complexobject.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\stringlib\count.h"
- >
- </File>
- <File
- RelativePath="..\..\Objects\descrobject.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\dictobject.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\enumobject.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\exceptions.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\stringlib\fastsearch.h"
- >
- </File>
- <File
- RelativePath="..\..\Objects\fileobject.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\stringlib\find.h"
- >
- </File>
- <File
- RelativePath="..\..\Objects\floatobject.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\frameobject.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\funcobject.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\genobject.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\iterobject.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\listobject.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\longobject.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\memoryobject.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\methodobject.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\moduleobject.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\namespaceobject.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\object.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\obmalloc.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\stringlib\partition.h"
- >
- </File>
- <File
- RelativePath="..\..\Objects\rangeobject.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\stringlib\replace.h"
- >
- </File>
- <File
- RelativePath="..\..\Objects\setobject.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\sliceobject.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\stringlib\split.h"
- >
- </File>
- <File
- RelativePath="..\..\Objects\structseq.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\tupleobject.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\typeobject.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\unicodectype.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\unicodeobject.c"
- >
- </File>
- <File
- RelativePath="..\..\Objects\unicodetype_db.h"
- >
- </File>
- <File
- RelativePath="..\..\Objects\weakrefobject.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Parser"
- >
- <File
- RelativePath="..\..\Parser\acceler.c"
- >
- </File>
- <File
- RelativePath="..\..\Parser\bitset.c"
- >
- </File>
- <File
- RelativePath="..\..\Parser\firstsets.c"
- >
- </File>
- <File
- RelativePath="..\..\Parser\grammar.c"
- >
- </File>
- <File
- RelativePath="..\..\Parser\grammar1.c"
- >
- </File>
- <File
- RelativePath="..\..\Parser\listnode.c"
- >
- </File>
- <File
- RelativePath="..\..\Parser\metagrammar.c"
- >
- </File>
- <File
- RelativePath="..\..\Parser\myreadline.c"
- >
- </File>
- <File
- RelativePath="..\..\Parser\node.c"
- >
- </File>
- <File
- RelativePath="..\..\Parser\parser.c"
- >
- </File>
- <File
- RelativePath="..\..\Parser\parser.h"
- >
- </File>
- <File
- RelativePath="..\..\Parser\parsetok.c"
- >
- </File>
- <File
- RelativePath="..\..\Parser\tokenizer.c"
- >
- </File>
- <File
- RelativePath="..\..\Parser\tokenizer.h"
- >
- </File>
- </Filter>
- <Filter
- Name="PC"
- >
- <File
- RelativePath="..\..\PC\winreg.c"
- >
- </File>
- <File
- RelativePath="..\..\PC\config.c"
- >
- </File>
- <File
- RelativePath="..\..\PC\dl_nt.c"
- >
- </File>
- <File
- RelativePath="..\..\PC\errmap.h"
- >
- </File>
- <File
- RelativePath="..\..\PC\getpathp.c"
- >
- </File>
- <File
- RelativePath="..\..\PC\msvcrtmodule.c"
- >
- </File>
- <File
- RelativePath="..\..\PC\pyconfig.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Python"
- >
- <File
- RelativePath="..\..\Python\_warnings.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\asdl.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\ast.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\bltinmodule.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\ceval.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\codecs.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\compile.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\dynamic_annotations.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\dynload_win.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\errors.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\fileutils.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\formatter_unicode.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\frozen.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\future.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\getargs.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\getcompiler.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\getcopyright.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\getopt.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\getplatform.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\getversion.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\graminit.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\import.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\importdl.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\importdl.h"
- >
- </File>
- <File
- RelativePath="..\..\Python\marshal.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\modsupport.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\mysnprintf.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\mystrtoul.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\peephole.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\pyarena.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\pyctype.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\pyfpe.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\pymath.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\pytime.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\pystate.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\pystrcmp.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\pystrtod.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\dtoa.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\Python-ast.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\pythonrun.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\random.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\structmember.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\symtable.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\sysmodule.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\thread.c"
- >
- </File>
- <File
- RelativePath="..\..\Python\thread_nt.h"
- >
- </File>
- <File
- RelativePath="..\..\Python\traceback.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- >
- <File
- RelativePath="..\..\PC\python_nt.rc"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/VS9.0/pythonw.vcproj b/PC/VS9.0/pythonw.vcproj
deleted file mode 100644
index 7f5c04b9b5..0000000000
--- a/PC/VS9.0/pythonw.vcproj
+++ /dev/null
@@ -1,618 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="pythonw"
- ProjectGUID="{F4229CC3-873C-49AE-9729-DD308ED4CD4A}"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\pyproject.vsprops;.\debug.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- EnableIntrinsicFunctions="false"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="_WINDOWS"
- RuntimeLibrary="3"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\pythonw_d.exe"
- StackReserveSize="2000000"
- BaseAddress="0x1d000000"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- ConfigurationType="1"
- InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\debug.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- EnableIntrinsicFunctions="false"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="_WINDOWS"
- RuntimeLibrary="3"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\pythonw_d.exe"
- StackReserveSize="2000000"
- BaseAddress="0x1d000000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="_WINDOWS"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\pythonw.exe"
- StackReserveSize="2000000"
- BaseAddress="0x1d000000"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="1"
- InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="_WINDOWS"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\pythonw.exe"
- StackReserveSize="2000000"
- BaseAddress="0x1d000000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops;.\pginstrument.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="_WINDOWS"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\pythonw.exe"
- StackReserveSize="2000000"
- BaseAddress="0x1d000000"
- ImportLibrary=""
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|x64"
- ConfigurationType="1"
- InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops;.\pginstrument.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="_WINDOWS"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\pythonw.exe"
- StackReserveSize="2000000"
- BaseAddress="0x1d000000"
- ImportLibrary=""
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\pyproject.vsprops;.\release.vsprops;.\pgupdate.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="_WINDOWS"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\pythonw.exe"
- StackReserveSize="2000000"
- BaseAddress="0x1d000000"
- ImportLibrary=""
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|x64"
- ConfigurationType="1"
- InheritedPropertySheets=".\pyproject.vsprops;.\x64.vsprops;.\release.vsprops;.\pgupdate.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions="_WINDOWS"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1033"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\pythonw.exe"
- StackReserveSize="2000000"
- BaseAddress="0x1d000000"
- ImportLibrary=""
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Resource Files"
- >
- <File
- RelativePath="..\..\PC\python_exe.rc"
- >
- </File>
- </Filter>
- <Filter
- Name="Source Files"
- >
- <File
- RelativePath="..\..\PC\WinMain.c"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/VS9.0/release.vsprops b/PC/VS9.0/release.vsprops
deleted file mode 100644
index 08def90651..0000000000
--- a/PC/VS9.0/release.vsprops
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="release"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- />
- <UserMacro
- Name="KillPythonExe"
- Value="$(OutDir)\kill_python.exe"
- />
-</VisualStudioPropertySheet>
diff --git a/PC/VS9.0/select.vcproj b/PC/VS9.0/select.vcproj
deleted file mode 100644
index 637fd972ce..0000000000
--- a/PC/VS9.0/select.vcproj
+++ /dev/null
@@ -1,537 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="select"
- ProjectGUID="{18CAE28C-B454-46C1-87A0-493D91D97F03}"
- RootNamespace="select"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- IgnoreDefaultLibraryNames="libc"
- BaseAddress="0x1D110000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- IgnoreDefaultLibraryNames="libc"
- BaseAddress="0x1D110000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- IgnoreDefaultLibraryNames="libc"
- BaseAddress="0x1D110000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- IgnoreDefaultLibraryNames="libc"
- BaseAddress="0x1D110000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- IgnoreDefaultLibraryNames="libc"
- BaseAddress="0x1D110000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- IgnoreDefaultLibraryNames="libc"
- BaseAddress="0x1D110000"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- IgnoreDefaultLibraryNames="libc"
- BaseAddress="0x1D110000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- IgnoreDefaultLibraryNames="libc"
- BaseAddress="0x1D110000"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- >
- <File
- RelativePath="..\..\Modules\selectmodule.c"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/VS9.0/sqlite3.vcproj b/PC/VS9.0/sqlite3.vcproj
deleted file mode 100644
index ef8c328c69..0000000000
--- a/PC/VS9.0/sqlite3.vcproj
+++ /dev/null
@@ -1,537 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="sqlite3"
- ProjectGUID="{A1A295E5-463C-437F-81CA-1F32367685DA}"
- RootNamespace="sqlite3"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\sqlite3.vsprops;.\debug.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\$(ProjectName)_d.dll"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\sqlite3.vsprops;.\debug.vsprops;.\x64.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\$(ProjectName)_d.dll"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\sqlite3.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\$(ProjectName).dll"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\sqlite3.vsprops;.\x64.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\$(ProjectName).dll"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\sqlite3.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(sqlite3Dir)&quot;"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\$(ProjectName).dll"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\sqlite3.vsprops;.\x64.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\sqlite3.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- OutputFile="$(OutDir)\$(ProjectName).dll"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\sqlite3.vsprops;.\x64.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Header Files"
- >
- <File
- RelativePath="$(sqlite3Dir)\sqlite3.h"
- >
- </File>
- <File
- RelativePath="$(sqlite3Dir)\sqlite3ext.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Source Files"
- >
- <File
- RelativePath="$(sqlite3Dir)\sqlite3.c"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/VS9.0/sqlite3.vsprops b/PC/VS9.0/sqlite3.vsprops
deleted file mode 100644
index b502df5ace..0000000000
--- a/PC/VS9.0/sqlite3.vsprops
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="sqlite3"
- InheritedPropertySheets=".\pyproject.vsprops"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(sqlite3Dir)"
- PreprocessorDefinitions="SQLITE_API=__declspec(dllexport)"
- WarningLevel="1"
- />
-</VisualStudioPropertySheet>
diff --git a/PC/VS9.0/ssl.vcproj b/PC/VS9.0/ssl.vcproj
deleted file mode 100644
index d30e877024..0000000000
--- a/PC/VS9.0/ssl.vcproj
+++ /dev/null
@@ -1,189 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="ssl"
- ProjectGUID="{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}"
- RootNamespace="ssl"
- Keyword="MakeFileProj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="0"
- InheritedPropertySheets=".\pyd_d.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCNMakeTool"
- BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
- ReBuildCommandLine=""
- CleanCommandLine=""
- Output=""
- PreprocessorDefinitions=""
- IncludeSearchPath=""
- ForcedIncludes=""
- AssemblySearchPath=""
- ForcedUsingAssemblies=""
- CompileAsManaged=""
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- ConfigurationType="0"
- InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCNMakeTool"
- BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
- ReBuildCommandLine=""
- CleanCommandLine=""
- Output=""
- PreprocessorDefinitions=""
- IncludeSearchPath=""
- ForcedIncludes=""
- AssemblySearchPath=""
- ForcedUsingAssemblies=""
- CompileAsManaged=""
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="0"
- InheritedPropertySheets=".\pyd.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCNMakeTool"
- BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
- ReBuildCommandLine=""
- CleanCommandLine=""
- Output=""
- PreprocessorDefinitions=""
- IncludeSearchPath=""
- ForcedIncludes=""
- AssemblySearchPath=""
- ForcedUsingAssemblies=""
- CompileAsManaged=""
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="0"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCNMakeTool"
- BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
- ReBuildCommandLine=""
- CleanCommandLine=""
- Output=""
- PreprocessorDefinitions=""
- IncludeSearchPath=""
- ForcedIncludes=""
- AssemblySearchPath=""
- ForcedUsingAssemblies=""
- CompileAsManaged=""
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|Win32"
- ConfigurationType="0"
- InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCNMakeTool"
- BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
- ReBuildCommandLine=""
- CleanCommandLine=""
- Output=""
- PreprocessorDefinitions=""
- IncludeSearchPath=""
- ForcedIncludes=""
- AssemblySearchPath=""
- ForcedUsingAssemblies=""
- CompileAsManaged=""
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|x64"
- ConfigurationType="0"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCNMakeTool"
- BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
- ReBuildCommandLine=""
- CleanCommandLine=""
- Output=""
- PreprocessorDefinitions=""
- IncludeSearchPath=""
- ForcedIncludes=""
- AssemblySearchPath=""
- ForcedUsingAssemblies=""
- CompileAsManaged=""
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|Win32"
- ConfigurationType="0"
- InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCNMakeTool"
- BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
- ReBuildCommandLine=""
- CleanCommandLine=""
- Output=""
- PreprocessorDefinitions=""
- IncludeSearchPath=""
- ForcedIncludes=""
- AssemblySearchPath=""
- ForcedUsingAssemblies=""
- CompileAsManaged=""
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|x64"
- ConfigurationType="0"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCNMakeTool"
- BuildCommandLine="cd &quot;$(SolutionDir)&quot;&#x0D;&#x0A;&quot;$(PythonExe)&quot; build_ssl.py Release $(PlatformName) -a&#x0D;&#x0A;"
- ReBuildCommandLine=""
- CleanCommandLine=""
- Output=""
- PreprocessorDefinitions=""
- IncludeSearchPath=""
- ForcedIncludes=""
- AssemblySearchPath=""
- ForcedUsingAssemblies=""
- CompileAsManaged=""
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/VS9.0/unicodedata.vcproj b/PC/VS9.0/unicodedata.vcproj
deleted file mode 100644
index b66ff72228..0000000000
--- a/PC/VS9.0/unicodedata.vcproj
+++ /dev/null
@@ -1,533 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="unicodedata"
- ProjectGUID="{ECC7CEAC-A5E5-458E-BB9E-2413CC847881}"
- RootNamespace="unicodedata"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1D120000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1D120000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1D120000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1D120000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1D120000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1D120000"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1D120000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- BaseAddress="0x1D120000"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Header Files"
- >
- <File
- RelativePath="..\..\Modules\unicodedata_db.h"
- >
- </File>
- <File
- RelativePath="..\..\Modules\unicodename_db.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Source Files"
- >
- <File
- RelativePath="..\..\Modules\unicodedata.c"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/VS9.0/winsound.vcproj b/PC/VS9.0/winsound.vcproj
deleted file mode 100644
index 47dbf29322..0000000000
--- a/PC/VS9.0/winsound.vcproj
+++ /dev/null
@@ -1,523 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="winsound"
- ProjectGUID="{28B5D777-DDF2-4B6B-B34F-31D938813856}"
- RootNamespace="winsound"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="winmm.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd_d.vsprops;.\x64.vsprops"
- CharacterSet="0"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="winmm.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="winmm.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="winmm.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="winmm.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="winmm.lib"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="winmm.lib"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="winmm.lib"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\PC\winsound.c"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/VS9.0/x64.vsprops b/PC/VS9.0/x64.vsprops
deleted file mode 100644
index d06f470ceb..0000000000
--- a/PC/VS9.0/x64.vsprops
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="amd64"
- OutputDirectory="$(SolutionDir)\amd64\"
- IntermediateDirectory="$(SolutionDir)$(PlatformName)-temp-$(ConfigurationName)\$(ProjectName)\"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/GS-"
- PreprocessorDefinitions="_WIN64;_M_X64"
- />
- <Tool
- Name="VCLinkerTool"
- TargetMachine="17"
- />
- <UserMacro
- Name="PythonExe"
- Value="$(HOST_PYTHON)"
- />
-</VisualStudioPropertySheet>
diff --git a/PC/VS9.0/xxlimited.vcproj b/PC/VS9.0/xxlimited.vcproj
deleted file mode 100644
index a3aaad6583..0000000000
--- a/PC/VS9.0/xxlimited.vcproj
+++ /dev/null
@@ -1,417 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="xxlimited"
- ProjectGUID="{F749B822-B489-4CA5-A3AD-CE078F5F338A}"
- RootNamespace="xxlimited"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="NDEBUG;_WIN32;_WINDLL;Py_LIMITED_API;$(NOINHERIT)"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- IgnoreDefaultLibraryNames="libc"
- BaseAddress="0x1D110000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- IgnoreDefaultLibraryNames="libc"
- BaseAddress="0x1D110000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="Py_LIMITED_API"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- IgnoreDefaultLibraryNames="libc"
- BaseAddress="0x1D110000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGInstrument|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pginstrument.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- IgnoreDefaultLibraryNames="libc"
- BaseAddress="0x1D110000"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="Py_LIMITED_API"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- IgnoreDefaultLibraryNames="libc"
- BaseAddress="0x1D110000"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="PGUpdate|x64"
- ConfigurationType="2"
- InheritedPropertySheets=".\pyd.vsprops;.\x64.vsprops;.\pgupdate.vsprops"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- IgnoreDefaultLibraryNames="libc"
- BaseAddress="0x1D110000"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- >
- <File
- RelativePath="..\..\Modules\xxlimited.c"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/bdist_wininst/archive.h b/PC/bdist_wininst/archive.h
index 31a7805fd1..50ff15cddd 100644
--- a/PC/bdist_wininst/archive.h
+++ b/PC/bdist_wininst/archive.h
@@ -1,10 +1,9 @@
/*
- IMPORTANT NOTE: IF THIS FILE IS CHANGED, WININST-6.EXE MUST BE RECOMPILED
- WITH THE MSVC6 WININST.DSW WORKSPACE FILE MANUALLY, AND WININST-7.1.EXE MUST
- BE RECOMPILED WITH THE MSVC 2003.NET WININST-7.1.VCPROJ FILE MANUALLY.
+ IMPORTANT NOTE: IF THIS FILE IS CHANGED, PCBUILD\BDIST_WININST.VCXPROJ MUST
+ BE REBUILT AS WELL.
- IF CHANGES TO THIS FILE ARE CHECKED INTO PYTHON CVS, THE RECOMPILED BINARIES
- MUST BE CHECKED IN AS WELL!
+ IF CHANGES TO THIS FILE ARE CHECKED IN, THE RECOMPILED BINARIES MUST BE
+ CHECKED IN AS WELL!
*/
#pragma pack(1)
diff --git a/PC/bdist_wininst/bdist_wininst.vcxproj b/PC/bdist_wininst/bdist_wininst.vcxproj
new file mode 100644
index 0000000000..4dc5009b58
--- /dev/null
+++ b/PC/bdist_wininst/bdist_wininst.vcxproj
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGInstrument|Win32">
+ <Configuration>PGInstrument</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGInstrument|x64">
+ <Configuration>PGInstrument</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGUpdate|Win32">
+ <Configuration>PGUpdate</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGUpdate|x64">
+ <Configuration>PGUpdate</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}</ProjectGuid>
+ <RootNamespace>wininst</RootNamespace>
+ <SupportPGO>false</SupportPGO>
+ </PropertyGroup>
+ <Import Project="..\..\PCBuild\python.props" />
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>NotSet</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="..\..\PCBuild\pyproject.props" />
+ </ImportGroup>
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir>$(PySourcePath)lib\distutils\command\</OutDir>
+ <LinkIncremental>false</LinkIncremental>
+ <TargetName>wininst-$(VisualStudioVersion)</TargetName>
+ <TargetName Condition="$(Platform) == 'x64'">$(TargetName)-amd64</TargetName>
+ <TargetExt>.exe</TargetExt>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <Midl>
+ <TypeLibraryName>$(OutDir)wininst.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MinSpace</Optimization>
+ <AdditionalIncludeDirectories>$(PySourcePath)Modules\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary Condition="'$(Configuration)'=='Debug'">MultiThreadedDebug</RuntimeLibrary>
+ <RuntimeLibrary Condition="'$(Configuration)'=='Release'">MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>$(PySourcePath)PC\bdist_wininst;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;imagehlp.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="extract.c" />
+ <ClCompile Include="install.c" />
+ <ClCompile Include="..\..\Modules\zlib\adler32.c" />
+ <ClCompile Include="..\..\Modules\zlib\crc32.c" />
+ <ClCompile Include="..\..\Modules\zlib\inffast.c" />
+ <ClCompile Include="..\..\Modules\zlib\inflate.c" />
+ <ClCompile Include="..\..\Modules\zlib\inftrees.c" />
+ <ClCompile Include="..\..\Modules\zlib\zutil.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="archive.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="install.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="PythonPowered.bmp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/PCbuild/bdist_wininst.vcxproj.filters b/PC/bdist_wininst/bdist_wininst.vcxproj.filters
index b4b6a4d514..b4b6a4d514 100644
--- a/PCbuild/bdist_wininst.vcxproj.filters
+++ b/PC/bdist_wininst/bdist_wininst.vcxproj.filters
diff --git a/PC/bdist_wininst/build.bat b/PC/bdist_wininst/build.bat
new file mode 100644
index 0000000000..25f565ce0a
--- /dev/null
+++ b/PC/bdist_wininst/build.bat
@@ -0,0 +1,22 @@
+@echo off
+setlocal
+
+set D=%~dp0
+set PCBUILD=%~dp0..\..\PCBuild\
+
+
+echo Building Lib\distutils\command\wininst-xx.0.exe
+
+call "%PCBUILD%env.bat" x86
+if errorlevel 1 goto :eof
+
+msbuild "%D%bdist_wininst.vcxproj" "/p:SolutionDir=%PCBUILD%\" /p:Configuration=Release /p:Platform=Win32
+if errorlevel 1 goto :eof
+
+
+echo Building Lib\distutils\command\wininst-xx.0-amd64.exe
+
+call "%PCBUILD%env.bat" x86_amd64
+if errorlevel 1 goto :eof
+
+msbuild "%D%bdist_wininst.vcxproj" "/p:SolutionDir=%PCBUILD%\" /p:Configuration=Release /p:Platform=x64
diff --git a/PC/bdist_wininst/extract.c b/PC/bdist_wininst/extract.c
index aec8eda2be..0249d9ff54 100644
--- a/PC/bdist_wininst/extract.c
+++ b/PC/bdist_wininst/extract.c
@@ -1,10 +1,9 @@
/*
- IMPORTANT NOTE: IF THIS FILE IS CHANGED, WININST-6.EXE MUST BE RECOMPILED
- WITH THE MSVC6 WININST.DSW WORKSPACE FILE MANUALLY, AND WININST-7.1.EXE MUST
- BE RECOMPILED WITH THE MSVC 2003.NET WININST-7.1.VCPROJ FILE MANUALLY.
+ IMPORTANT NOTE: IF THIS FILE IS CHANGED, PCBUILD\BDIST_WININST.VCXPROJ MUST
+ BE REBUILT AS WELL.
- IF CHANGES TO THIS FILE ARE CHECKED INTO PYTHON CVS, THE RECOMPILED BINARIES
- MUST BE CHECKED IN AS WELL!
+ IF CHANGES TO THIS FILE ARE CHECKED IN, THE RECOMPILED BINARIES MUST BE
+ CHECKED IN AS WELL!
*/
#include <windows.h>
diff --git a/PC/bdist_wininst/install.c b/PC/bdist_wininst/install.c
index f4cf348e48..cb037ff2c6 100644
--- a/PC/bdist_wininst/install.c
+++ b/PC/bdist_wininst/install.c
@@ -1,10 +1,9 @@
/*
- IMPORTANT NOTE: IF THIS FILE IS CHANGED, WININST-6.EXE MUST BE RECOMPILED
- WITH THE MSVC6 WININST.DSW WORKSPACE FILE MANUALLY, AND WININST-7.1.EXE MUST
- BE RECOMPILED WITH THE MSVC 2003.NET WININST-7.1.VCPROJ FILE MANUALLY.
+ IMPORTANT NOTE: IF THIS FILE IS CHANGED, PCBUILD\BDIST_WININST.VCXPROJ MUST
+ BE REBUILT AS WELL.
- IF CHANGES TO THIS FILE ARE CHECKED INTO PYTHON CVS, THE RECOMPILED BINARIES
- MUST BE CHECKED IN AS WELL!
+ IF CHANGES TO THIS FILE ARE CHECKED IN, THE RECOMPILED BINARIES MUST BE
+ CHECKED IN AS WELL!
*/
/*
@@ -154,6 +153,13 @@ char *failure_reason = NULL;
HANDLE hBitmap;
char *bitmap_bytes;
+static const char *REGISTRY_SUFFIX_6432 =
+#ifdef MS_WIN64
+ "";
+#else
+ "-32";
+#endif
+
#define WM_NUMFILES WM_USER+1
/* wParam: 0, lParam: total number of files */
@@ -658,8 +664,8 @@ static HINSTANCE LoadPythonDll(char *fname)
if (h)
return h;
wsprintf(subkey_name,
- "SOFTWARE\\Python\\PythonCore\\%d.%d\\InstallPath",
- py_major, py_minor);
+ "SOFTWARE\\Python\\PythonCore\\%d.%d%s\\InstallPath",
+ py_major, py_minor, REGISTRY_SUFFIX_6432);
if (ERROR_SUCCESS != RegQueryValue(HKEY_CURRENT_USER, subkey_name,
fullpath, &size) &&
ERROR_SUCCESS != RegQueryValue(HKEY_LOCAL_MACHINE, subkey_name,
@@ -667,7 +673,9 @@ static HINSTANCE LoadPythonDll(char *fname)
return NULL;
strcat(fullpath, "\\");
strcat(fullpath, fname);
- return LoadLibrary(fullpath);
+ // We use LOAD_WITH_ALTERED_SEARCH_PATH to ensure any dependent DLLs
+ // next to the Python DLL (eg, the CRT DLL) are also loaded.
+ return LoadLibraryEx(fullpath, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
}
static int prepare_script_environment(HINSTANCE hPython)
@@ -1216,7 +1224,7 @@ static void CenterWindow(HWND hwnd)
#include <prsht.h>
-BOOL CALLBACK
+INT_PTR CALLBACK
IntroDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
LPNMHDR lpnm;
@@ -1565,7 +1573,7 @@ SCHEME *GetScheme(int major, int minor)
return old_scheme;
}
-BOOL CALLBACK
+INT_PTR CALLBACK
SelectPythonDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
LPNMHDR lpnm;
@@ -1867,7 +1875,7 @@ static void CloseLogfile(void)
fclose(logfile);
}
-BOOL CALLBACK
+INT_PTR CALLBACK
InstallFilesDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
LPNMHDR lpnm;
@@ -2022,7 +2030,7 @@ InstallFilesDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
}
-BOOL CALLBACK
+INT_PTR CALLBACK
FinishedDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
LPNMHDR lpnm;
@@ -2198,23 +2206,6 @@ BOOL NeedAutoUAC()
return TRUE;
}
-// Returns TRUE if the platform supports UAC.
-BOOL PlatformSupportsUAC()
-{
- // Note that win2k does seem to support ShellExecute with 'runas',
- // but does *not* support IsUserAnAdmin - so we just pretend things
- // only work on XP and later.
- BOOL bIsWindowsXPorLater;
- OSVERSIONINFO winverinfo;
- winverinfo.dwOSVersionInfoSize = sizeof(winverinfo);
- if (!GetVersionEx(&winverinfo))
- return FALSE; // something bad has gone wrong
- bIsWindowsXPorLater =
- ( (winverinfo.dwMajorVersion > 5) ||
- ( (winverinfo.dwMajorVersion == 5) && (winverinfo.dwMinorVersion >= 1) ));
- return bIsWindowsXPorLater;
-}
-
// Spawn ourself as an elevated application. On failure, a message is
// displayed to the user - but this app will always terminate, even
// on error.
@@ -2268,9 +2259,11 @@ int DoInstall(void)
GetPrivateProfileString("Setup", "user_access_control", "",
user_access_control, sizeof(user_access_control), ini_file);
+ strcat(target_version, REGISTRY_SUFFIX_6432);
+
// See if we need to do the Vista UAC magic.
if (strcmp(user_access_control, "force")==0) {
- if (PlatformSupportsUAC() && !MyIsUserAnAdmin()) {
+ if (!MyIsUserAnAdmin()) {
SpawnUAC();
return 0;
}
@@ -2278,7 +2271,7 @@ int DoInstall(void)
} else if (strcmp(user_access_control, "auto")==0) {
// Check if it looks like we need UAC control, based
// on how Python itself was installed.
- if (PlatformSupportsUAC() && !MyIsUserAnAdmin() && NeedAutoUAC()) {
+ if (!MyIsUserAnAdmin() && NeedAutoUAC()) {
SpawnUAC();
return 0;
}
diff --git a/PC/bdist_wininst/install.rc b/PC/bdist_wininst/install.rc
index d018b484b0..dfa2ffcd74 100644
--- a/PC/bdist_wininst/install.rc
+++ b/PC/bdist_wininst/install.rc
@@ -1,97 +1,20 @@
/*
- IMPORTANT NOTE: IF THIS FILE IS CHANGED, WININST-6.EXE MUST BE RECOMPILED
- WITH THE MSVC6 WININST.DSW WORKSPACE FILE MANUALLY, AND WININST-7.1.EXE MUST
- BE RECOMPILED WITH THE MSVC 2003.NET WININST-7.1.VCPROJ FILE MANUALLY.
+ IMPORTANT NOTE: IF THIS FILE IS CHANGED, PCBUILD\BDIST_WININST.VCXPROJ MUST
+ BE REBUILT AS WELL.
- IF CHANGES TO THIS FILE ARE CHECKED INTO PYTHON CVS, THE RECOMPILED BINARIES
- MUST BE CHECKED IN AS WELL!
+ IF CHANGES TO THIS FILE ARE CHECKED IN, THE RECOMPILED BINARIES MUST BE
+ CHECKED IN AS WELL!
*/
-//Microsoft Developer Studio generated resource script.
-//
+#include <winres.h>
#include "resource.h"
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "afxres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// Neutral resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
-#ifdef _WIN32
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Bitmap
-//
IDB_BITMAP BITMAP DISCARDABLE "PythonPowered.bmp"
-#endif // Neutral resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-/////////////////////////////////////////////////////////////////////////////
-// German (Germany) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
-#ifdef _WIN32
-LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
-#pragma code_page(1252)
-#endif //_WIN32
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE DISCARDABLE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE DISCARDABLE
-BEGIN
- "#include ""afxres.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE DISCARDABLE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-#endif // German (Germany) resources
-/////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
IDD_INTRO DIALOGEX 0, 0, 379, 178
STYLE WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Setup"
@@ -152,78 +75,3 @@ BEGIN
EDITTEXT IDC_INFO,125,40,247,131,ES_MULTILINE | ES_READONLY |
WS_VSCROLL | WS_HSCROLL | NOT WS_TABSTOP
END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO DISCARDABLE
-BEGIN
- IDD_INTRO, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 372
- VERTGUIDE, 125
- VERTGUIDE, 372
- TOPMARGIN, 7
- BOTTOMMARGIN, 171
- HORZGUIDE, 8
- HORZGUIDE, 31
- END
-
- IDD_SELECTPYTHON, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 372
- VERTGUIDE, 125
- VERTGUIDE, 372
- TOPMARGIN, 7
- BOTTOMMARGIN, 171
- HORZGUIDE, 8
- HORZGUIDE, 41
- END
-
- IDD_INSTALLFILES, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 372
- VERTGUIDE, 125
- VERTGUIDE, 371
- TOPMARGIN, 7
- BOTTOMMARGIN, 171
- HORZGUIDE, 8
- HORZGUIDE, 41
- END
-
- IDD_FINISHED, DIALOG
- BEGIN
- LEFTMARGIN, 6
- RIGHTMARGIN, 372
- VERTGUIDE, 125
- VERTGUIDE, 372
- TOPMARGIN, 7
- BOTTOMMARGIN, 171
- HORZGUIDE, 8
- HORZGUIDE, 41
- END
-END
-#endif // APSTUDIO_INVOKED
-
-#endif // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
diff --git a/PC/bdist_wininst/resource.h b/PC/bdist_wininst/resource.h
index 35ba3c2534..86aeabb13a 100644
--- a/PC/bdist_wininst/resource.h
+++ b/PC/bdist_wininst/resource.h
@@ -1,16 +1,11 @@
/*
- IMPORTANT NOTE: IF THIS FILE IS CHANGED, WININST-6.EXE MUST BE RECOMPILED
- WITH THE MSVC6 WININST.DSW WORKSPACE FILE MANUALLY, AND WININST-7.1.EXE MUST
- BE RECOMPILED WITH THE MSVC 2003.NET WININST-7.1.VCPROJ FILE MANUALLY.
+ IMPORTANT NOTE: IF THIS FILE IS CHANGED, PCBUILD\BDIST_WININST.VCXPROJ MUST
+ BE REBUILT AS WELL.
- IF CHANGES TO THIS FILE ARE CHECKED INTO PYTHON CVS, THE RECOMPILED BINARIES
- MUST BE CHECKED IN AS WELL!
+ IF CHANGES TO THIS FILE ARE CHECKED IN, THE RECOMPILED BINARIES MUST BE
+ CHECKED IN AS WELL!
*/
-//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
-// Used by install.rc
-//
#define IDD_DIALOG1 101
#define IDB_BITMAP1 103
#define IDD_INTRO 107
@@ -34,14 +29,3 @@
#define IDC_BUILD_INFO 1024
#define IDC_BITMAP 1025
#define IDC_OTHERPYTHON 1026
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 112
-#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1028
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
diff --git a/PC/bdist_wininst/wininst-7.1.sln b/PC/bdist_wininst/wininst-7.1.sln
deleted file mode 100644
index e205d25c50..0000000000
--- a/PC/bdist_wininst/wininst-7.1.sln
+++ /dev/null
@@ -1,21 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wininst", "wininst-7.1.vcproj", "{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Release = Release
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug.ActiveCfg = Debug|Win32
- {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug.Build.0 = Debug|Win32
- {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release.ActiveCfg = Release|Win32
- {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
- EndGlobalSection
-EndGlobal
diff --git a/PC/bdist_wininst/wininst-7.1.vcproj b/PC/bdist_wininst/wininst-7.1.vcproj
deleted file mode 100644
index 30daae9ff6..0000000000
--- a/PC/bdist_wininst/wininst-7.1.vcproj
+++ /dev/null
@@ -1,214 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="7.10"
- Name="wininst"
- ProjectGUID="{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}"
- RootNamespace="wininst"
- SccProjectName=""
- SccLocalPath="">
- <Platforms>
- <Platform
- Name="Win32"/>
- </Platforms>
- <Configurations>
- <Configuration
- Name="Release|Win32"
- OutputDirectory=".\..\..\lib\distutils\command"
- IntermediateDirectory=".\temp-release"
- ConfigurationType="1"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="FALSE"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="1"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\Include,..\..\..\zlib-1.2.3"
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
- StringPooling="TRUE"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="TRUE"
- UsePrecompiledHeader="2"
- PrecompiledHeaderFile=".\temp-release/wininst.pch"
- AssemblerListingLocation=".\temp-release/"
- ObjectFile=".\temp-release/"
- ProgramDataBaseFileName=".\temp-release/"
- WarningLevel="3"
- SuppressStartupBanner="TRUE"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="..\..\..\zlib-1.2.3\zlib.lib imagehlp.lib comctl32.lib"
- OutputFile="..\..\lib\distutils\command/wininst-7.1.exe"
- LinkIncremental="1"
- SuppressStartupBanner="TRUE"
- IgnoreDefaultLibraryNames="LIBC"
- ProgramDatabaseFile=".\..\..\lib\distutils\command/wininst-6.pdb"
- SubSystem="2"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"
- PreprocessorDefinitions="NDEBUG"
- MkTypLibCompatible="TRUE"
- SuppressStartupBanner="TRUE"
- TargetEnvironment="1"
- TypeLibraryName=".\..\..\lib\distutils\command/wininst.tlb"
- HeaderFileName=""/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1031"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory=".\."
- IntermediateDirectory=".\temp-debug"
- ConfigurationType="1"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="FALSE"
- CharacterSet="2">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\Include,..\..\..\zlib-1.2.1"
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
- RuntimeLibrary="2"
- UsePrecompiledHeader="2"
- PrecompiledHeaderFile=".\temp-debug/wininst.pch"
- AssemblerListingLocation=".\temp-debug/"
- ObjectFile=".\temp-debug/"
- ProgramDataBaseFileName=".\temp-debug/"
- BrowseInformation="1"
- WarningLevel="3"
- SuppressStartupBanner="TRUE"
- DebugInformationFormat="1"
- CompileAs="0"/>
- <Tool
- Name="VCCustomBuildTool"/>
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="..\..\..\zlib-1.2.1\zlib.lib imagehlp.lib comctl32.lib"
- OutputFile="..\..\lib\distutils\command/wininst-7.1_d.exe"
- LinkIncremental="2"
- SuppressStartupBanner="TRUE"
- IgnoreDefaultLibraryNames="LIBC"
- GenerateDebugInformation="TRUE"
- SubSystem="2"
- TargetMachine="1"/>
- <Tool
- Name="VCMIDLTool"
- PreprocessorDefinitions="_DEBUG"
- MkTypLibCompatible="TRUE"
- SuppressStartupBanner="TRUE"
- TargetEnvironment="1"
- TypeLibraryName=".\./wininst.tlb"
- HeaderFileName=""/>
- <Tool
- Name="VCPostBuildEventTool"/>
- <Tool
- Name="VCPreBuildEventTool"/>
- <Tool
- Name="VCPreLinkEventTool"/>
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1031"/>
- <Tool
- Name="VCWebServiceProxyGeneratorTool"/>
- <Tool
- Name="VCXMLDataGeneratorTool"/>
- <Tool
- Name="VCWebDeploymentTool"/>
- <Tool
- Name="VCManagedWrapperGeneratorTool"/>
- <Tool
- Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
- <File
- RelativePath="extract.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="1"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BrowseInformation="1"/>
- </FileConfiguration>
- </File>
- <File
- RelativePath="install.c">
- <FileConfiguration
- Name="Release|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="1"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""/>
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32">
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BrowseInformation="1"/>
- </FileConfiguration>
- </File>
- <File
- RelativePath="install.rc">
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl">
- <File
- RelativePath="archive.h">
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
- <File
- RelativePath="PythonPowered.bmp">
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/bdist_wininst/wininst-8.sln b/PC/bdist_wininst/wininst-8.sln
deleted file mode 100644
index 25f16cfba2..0000000000
--- a/PC/bdist_wininst/wininst-8.sln
+++ /dev/null
@@ -1,19 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wininst", "wininst-8.vcproj", "{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|Win32.ActiveCfg = Debug|Win32
- {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|Win32.Build.0 = Debug|Win32
- {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release|Win32.ActiveCfg = Release|Win32
- {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/PC/bdist_wininst/wininst-8.vcproj b/PC/bdist_wininst/wininst-8.vcproj
deleted file mode 100644
index 0147d1b3fb..0000000000
--- a/PC/bdist_wininst/wininst-8.vcproj
+++ /dev/null
@@ -1,320 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="wininst"
- ProjectGUID="{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}"
- RootNamespace="wininst"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Release|Win32"
- OutputDirectory=".\..\..\lib\distutils\command"
- IntermediateDirectory=".\temp-release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- PreprocessorDefinitions="NDEBUG"
- MkTypLibCompatible="true"
- SuppressStartupBanner="true"
- TargetEnvironment="1"
- TypeLibraryName=".\..\..\lib\distutils\command/wininst.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="1"
- InlineFunctionExpansion="1"
- AdditionalIncludeDirectories="..\..\Include,..\..\Modules\zlib"
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
- StringPooling="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile=".\temp-release/wininst.pch"
- AssemblerListingLocation=".\temp-release/"
- ObjectFile=".\temp-release/"
- ProgramDataBaseFileName=".\temp-release/"
- WarningLevel="3"
- SuppressStartupBanner="true"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="NDEBUG"
- Culture="1031"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="imagehlp.lib comctl32.lib"
- OutputFile="..\..\lib\distutils\command/wininst-8.exe"
- LinkIncremental="1"
- SuppressStartupBanner="true"
- IgnoreDefaultLibraryNames="LIBC"
- ProgramDatabaseFile=".\..\..\lib\distutils\command/wininst-6.pdb"
- SubSystem="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory=".\."
- IntermediateDirectory=".\temp-debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- UseOfMFC="0"
- ATLMinimizesCRunTimeLibraryUsage="false"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- PreprocessorDefinitions="_DEBUG"
- MkTypLibCompatible="true"
- SuppressStartupBanner="true"
- TargetEnvironment="1"
- TypeLibraryName=".\./wininst.tlb"
- HeaderFileName=""
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\Include,..\..\Modules\zlib"
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- PrecompiledHeaderFile=".\temp-debug/wininst.pch"
- AssemblerListingLocation=".\temp-debug/"
- ObjectFile=".\temp-debug/"
- ProgramDataBaseFileName=".\temp-debug/"
- BrowseInformation="1"
- WarningLevel="3"
- SuppressStartupBanner="true"
- DebugInformationFormat="1"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- PreprocessorDefinitions="_DEBUG"
- Culture="1031"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="imagehlp.lib comctl32.lib"
- OutputFile="..\..\lib\distutils\command/wininst-8_d.exe"
- LinkIncremental="2"
- SuppressStartupBanner="true"
- IgnoreDefaultLibraryNames="LIBC"
- GenerateDebugInformation="true"
- SubSystem="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
- >
- <File
- RelativePath="extract.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="1"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BrowseInformation="1"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="install.c"
- >
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="1"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories=""
- PreprocessorDefinitions=""
- BrowseInformation="1"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="install.rc"
- >
- </File>
- <Filter
- Name="zlib"
- >
- <File
- RelativePath="..\..\Modules\zlib\adler32.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlib\crc32.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlib\inffast.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlib\inflate.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlib\inftrees.c"
- >
- </File>
- <File
- RelativePath="..\..\Modules\zlib\zutil.c"
- >
- </File>
- </Filter>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl"
- >
- <File
- RelativePath="archive.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
- >
- <File
- RelativePath="PythonPowered.bmp"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/PC/bdist_wininst/wininst.dsp b/PC/bdist_wininst/wininst.dsp
deleted file mode 100644
index 698556980d..0000000000
--- a/PC/bdist_wininst/wininst.dsp
+++ /dev/null
@@ -1,123 +0,0 @@
-# Microsoft Developer Studio Project File - Name="wininst" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Application" 0x0101
-
-CFG=wininst - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "wininst.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "wininst.mak" CFG="wininst - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "wininst - Win32 Release" (based on "Win32 (x86) Application")
-!MESSAGE "wininst - Win32 Debug" (based on "Win32 (x86) Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "wininst - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "..\..\lib\distutils\command"
-# PROP Intermediate_Dir "temp-release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /O1 /I "..\..\Include" /I "..\..\..\zlib-1.2.3" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x407 /d "NDEBUG"
-# ADD RSC /l 0x407 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
-# ADD LINK32 ..\..\..\zlib-1.2.3\zlib.lib imagehlp.lib comdlg32.lib ole32.lib comctl32.lib kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"LIBC" /out:"..\..\lib\distutils\command/wininst-6.0.exe"
-
-!ELSEIF "$(CFG)" == "wininst - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "."
-# PROP Intermediate_Dir "temp-debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MD /W3 /Z7 /Od /I "..\..\Include" /I "..\..\..\zlib-1.2.1" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FR /YX /FD /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x407 /d "_DEBUG"
-# ADD RSC /l 0x407 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 ..\..\..\zlib-1.2.3\zlib.lib imagehlp.lib comdlg32.lib ole32.lib comctl32.lib kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib /nologo /subsystem:windows /pdb:none /debug /machine:I386 /nodefaultlib:"LIBC" /out:"..\..\lib\distutils\command/wininst-6.0_d.exe"
-
-!ENDIF
-
-# Begin Target
-
-# Name "wininst - Win32 Release"
-# Name "wininst - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\extract.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\install.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\install.rc
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\archive.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# Begin Source File
-
-SOURCE=.\PythonPowered.bmp
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/PC/bdist_wininst/wininst.dsw b/PC/bdist_wininst/wininst.dsw
deleted file mode 100644
index fbc66aa973..0000000000
--- a/PC/bdist_wininst/wininst.dsw
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "wininst"=.\wininst.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/PC/clinic/msvcrtmodule.c.h b/PC/clinic/msvcrtmodule.c.h
new file mode 100644
index 0000000000..c8e6ed8533
--- /dev/null
+++ b/PC/clinic/msvcrtmodule.c.h
@@ -0,0 +1,554 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(msvcrt_heapmin__doc__,
+"heapmin($module, /)\n"
+"--\n"
+"\n"
+"Minimize the malloc() heap.\n"
+"\n"
+"Force the malloc() heap to clean itself up and return unused blocks\n"
+"to the operating system. On failure, this raises OSError.");
+
+#define MSVCRT_HEAPMIN_METHODDEF \
+ {"heapmin", (PyCFunction)msvcrt_heapmin, METH_NOARGS, msvcrt_heapmin__doc__},
+
+static PyObject *
+msvcrt_heapmin_impl(PyModuleDef *module);
+
+static PyObject *
+msvcrt_heapmin(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return msvcrt_heapmin_impl(module);
+}
+
+PyDoc_STRVAR(msvcrt_locking__doc__,
+"locking($module, fd, mode, nbytes, /)\n"
+"--\n"
+"\n"
+"Lock part of a file based on file descriptor fd from the C runtime.\n"
+"\n"
+"Raises IOError on failure. The locked region of the file extends from\n"
+"the current file position for nbytes bytes, and may continue beyond\n"
+"the end of the file. mode must be one of the LK_* constants listed\n"
+"below. Multiple regions in a file may be locked at the same time, but\n"
+"may not overlap. Adjacent regions are not merged; they must be unlocked\n"
+"individually.");
+
+#define MSVCRT_LOCKING_METHODDEF \
+ {"locking", (PyCFunction)msvcrt_locking, METH_VARARGS, msvcrt_locking__doc__},
+
+static PyObject *
+msvcrt_locking_impl(PyModuleDef *module, int fd, int mode, long nbytes);
+
+static PyObject *
+msvcrt_locking(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int fd;
+ int mode;
+ long nbytes;
+
+ if (!PyArg_ParseTuple(args, "iil:locking",
+ &fd, &mode, &nbytes))
+ goto exit;
+ return_value = msvcrt_locking_impl(module, fd, mode, nbytes);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(msvcrt_setmode__doc__,
+"setmode($module, fd, mode, /)\n"
+"--\n"
+"\n"
+"Set the line-end translation mode for the file descriptor fd.\n"
+"\n"
+"To set it to text mode, flags should be os.O_TEXT; for binary, it\n"
+"should be os.O_BINARY.\n"
+"\n"
+"Return value is the previous mode.");
+
+#define MSVCRT_SETMODE_METHODDEF \
+ {"setmode", (PyCFunction)msvcrt_setmode, METH_VARARGS, msvcrt_setmode__doc__},
+
+static long
+msvcrt_setmode_impl(PyModuleDef *module, int fd, int flags);
+
+static PyObject *
+msvcrt_setmode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int fd;
+ int flags;
+ long _return_value;
+
+ if (!PyArg_ParseTuple(args, "ii:setmode",
+ &fd, &flags))
+ goto exit;
+ _return_value = msvcrt_setmode_impl(module, fd, flags);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromLong(_return_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(msvcrt_open_osfhandle__doc__,
+"open_osfhandle($module, handle, flags, /)\n"
+"--\n"
+"\n"
+"Create a C runtime file descriptor from the file handle handle.\n"
+"\n"
+"The flags parameter should be a bitwise OR of os.O_APPEND, os.O_RDONLY,\n"
+"and os.O_TEXT. The returned file descriptor may be used as a parameter\n"
+"to os.fdopen() to create a file object.");
+
+#define MSVCRT_OPEN_OSFHANDLE_METHODDEF \
+ {"open_osfhandle", (PyCFunction)msvcrt_open_osfhandle, METH_VARARGS, msvcrt_open_osfhandle__doc__},
+
+static long
+msvcrt_open_osfhandle_impl(PyModuleDef *module, Py_intptr_t handle,
+ int flags);
+
+static PyObject *
+msvcrt_open_osfhandle(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_intptr_t handle;
+ int flags;
+ long _return_value;
+
+ if (!PyArg_ParseTuple(args, ""_Py_PARSE_INTPTR"i:open_osfhandle",
+ &handle, &flags))
+ goto exit;
+ _return_value = msvcrt_open_osfhandle_impl(module, handle, flags);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromLong(_return_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(msvcrt_get_osfhandle__doc__,
+"get_osfhandle($module, fd, /)\n"
+"--\n"
+"\n"
+"Return the file handle for the file descriptor fd.\n"
+"\n"
+"Raises IOError if fd is not recognized.");
+
+#define MSVCRT_GET_OSFHANDLE_METHODDEF \
+ {"get_osfhandle", (PyCFunction)msvcrt_get_osfhandle, METH_O, msvcrt_get_osfhandle__doc__},
+
+static Py_intptr_t
+msvcrt_get_osfhandle_impl(PyModuleDef *module, int fd);
+
+static PyObject *
+msvcrt_get_osfhandle(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int fd;
+ Py_intptr_t _return_value;
+
+ if (!PyArg_Parse(arg, "i:get_osfhandle", &fd))
+ goto exit;
+ _return_value = msvcrt_get_osfhandle_impl(module, fd);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromVoidPtr((void *)_return_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(msvcrt_kbhit__doc__,
+"kbhit($module, /)\n"
+"--\n"
+"\n"
+"Return true if a keypress is waiting to be read.");
+
+#define MSVCRT_KBHIT_METHODDEF \
+ {"kbhit", (PyCFunction)msvcrt_kbhit, METH_NOARGS, msvcrt_kbhit__doc__},
+
+static long
+msvcrt_kbhit_impl(PyModuleDef *module);
+
+static PyObject *
+msvcrt_kbhit(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ PyObject *return_value = NULL;
+ long _return_value;
+
+ _return_value = msvcrt_kbhit_impl(module);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromLong(_return_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(msvcrt_getch__doc__,
+"getch($module, /)\n"
+"--\n"
+"\n"
+"Read a keypress and return the resulting character as a byte string.\n"
+"\n"
+"Nothing is echoed to the console. This call will block if a keypress is\n"
+"not already available, but will not wait for Enter to be pressed. If the\n"
+"pressed key was a special function key, this will return \'\\000\' or\n"
+"\'\\xe0\'; the next call will return the keycode. The Control-C keypress\n"
+"cannot be read with this function.");
+
+#define MSVCRT_GETCH_METHODDEF \
+ {"getch", (PyCFunction)msvcrt_getch, METH_NOARGS, msvcrt_getch__doc__},
+
+static int
+msvcrt_getch_impl(PyModuleDef *module);
+
+static PyObject *
+msvcrt_getch(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ PyObject *return_value = NULL;
+ char s[1];
+
+ s[0] = msvcrt_getch_impl(module);
+ return_value = PyBytes_FromStringAndSize(s, 1);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(msvcrt_getwch__doc__,
+"getwch($module, /)\n"
+"--\n"
+"\n"
+"Wide char variant of getch(), returning a Unicode value.");
+
+#define MSVCRT_GETWCH_METHODDEF \
+ {"getwch", (PyCFunction)msvcrt_getwch, METH_NOARGS, msvcrt_getwch__doc__},
+
+static wchar_t
+msvcrt_getwch_impl(PyModuleDef *module);
+
+static PyObject *
+msvcrt_getwch(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ PyObject *return_value = NULL;
+ wchar_t _return_value;
+
+ _return_value = msvcrt_getwch_impl(module);
+ return_value = PyUnicode_FromOrdinal(_return_value);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(msvcrt_getche__doc__,
+"getche($module, /)\n"
+"--\n"
+"\n"
+"Similar to getch(), but the keypress will be echoed if possible.");
+
+#define MSVCRT_GETCHE_METHODDEF \
+ {"getche", (PyCFunction)msvcrt_getche, METH_NOARGS, msvcrt_getche__doc__},
+
+static int
+msvcrt_getche_impl(PyModuleDef *module);
+
+static PyObject *
+msvcrt_getche(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ PyObject *return_value = NULL;
+ char s[1];
+
+ s[0] = msvcrt_getche_impl(module);
+ return_value = PyBytes_FromStringAndSize(s, 1);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(msvcrt_getwche__doc__,
+"getwche($module, /)\n"
+"--\n"
+"\n"
+"Wide char variant of getche(), returning a Unicode value.");
+
+#define MSVCRT_GETWCHE_METHODDEF \
+ {"getwche", (PyCFunction)msvcrt_getwche, METH_NOARGS, msvcrt_getwche__doc__},
+
+static wchar_t
+msvcrt_getwche_impl(PyModuleDef *module);
+
+static PyObject *
+msvcrt_getwche(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ PyObject *return_value = NULL;
+ wchar_t _return_value;
+
+ _return_value = msvcrt_getwche_impl(module);
+ return_value = PyUnicode_FromOrdinal(_return_value);
+
+ return return_value;
+}
+
+PyDoc_STRVAR(msvcrt_putch__doc__,
+"putch($module, char, /)\n"
+"--\n"
+"\n"
+"Print the byte string char to the console without buffering.");
+
+#define MSVCRT_PUTCH_METHODDEF \
+ {"putch", (PyCFunction)msvcrt_putch, METH_O, msvcrt_putch__doc__},
+
+static PyObject *
+msvcrt_putch_impl(PyModuleDef *module, char char_value);
+
+static PyObject *
+msvcrt_putch(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ char char_value;
+
+ if (!PyArg_Parse(arg, "c:putch", &char_value))
+ goto exit;
+ return_value = msvcrt_putch_impl(module, char_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(msvcrt_putwch__doc__,
+"putwch($module, unicode_char, /)\n"
+"--\n"
+"\n"
+"Wide char variant of putch(), accepting a Unicode value.");
+
+#define MSVCRT_PUTWCH_METHODDEF \
+ {"putwch", (PyCFunction)msvcrt_putwch, METH_O, msvcrt_putwch__doc__},
+
+static PyObject *
+msvcrt_putwch_impl(PyModuleDef *module, int unicode_char);
+
+static PyObject *
+msvcrt_putwch(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int unicode_char;
+
+ if (!PyArg_Parse(arg, "C:putwch", &unicode_char))
+ goto exit;
+ return_value = msvcrt_putwch_impl(module, unicode_char);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(msvcrt_ungetch__doc__,
+"ungetch($module, char, /)\n"
+"--\n"
+"\n"
+"Opposite of getch.\n"
+"\n"
+"Cause the byte string char to be \"pushed back\" into the\n"
+"console buffer; it will be the next character read by\n"
+"getch() or getche().");
+
+#define MSVCRT_UNGETCH_METHODDEF \
+ {"ungetch", (PyCFunction)msvcrt_ungetch, METH_O, msvcrt_ungetch__doc__},
+
+static PyObject *
+msvcrt_ungetch_impl(PyModuleDef *module, char char_value);
+
+static PyObject *
+msvcrt_ungetch(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ char char_value;
+
+ if (!PyArg_Parse(arg, "c:ungetch", &char_value))
+ goto exit;
+ return_value = msvcrt_ungetch_impl(module, char_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(msvcrt_ungetwch__doc__,
+"ungetwch($module, unicode_char, /)\n"
+"--\n"
+"\n"
+"Wide char variant of ungetch(), accepting a Unicode value.");
+
+#define MSVCRT_UNGETWCH_METHODDEF \
+ {"ungetwch", (PyCFunction)msvcrt_ungetwch, METH_O, msvcrt_ungetwch__doc__},
+
+static PyObject *
+msvcrt_ungetwch_impl(PyModuleDef *module, int unicode_char);
+
+static PyObject *
+msvcrt_ungetwch(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int unicode_char;
+
+ if (!PyArg_Parse(arg, "C:ungetwch", &unicode_char))
+ goto exit;
+ return_value = msvcrt_ungetwch_impl(module, unicode_char);
+
+exit:
+ return return_value;
+}
+
+#if defined(_DEBUG)
+
+PyDoc_STRVAR(msvcrt_CrtSetReportFile__doc__,
+"CrtSetReportFile($module, type, file, /)\n"
+"--\n"
+"\n"
+"Wrapper around _CrtSetReportFile.\n"
+"\n"
+"Only available on Debug builds.");
+
+#define MSVCRT_CRTSETREPORTFILE_METHODDEF \
+ {"CrtSetReportFile", (PyCFunction)msvcrt_CrtSetReportFile, METH_VARARGS, msvcrt_CrtSetReportFile__doc__},
+
+static long
+msvcrt_CrtSetReportFile_impl(PyModuleDef *module, int type, int file);
+
+static PyObject *
+msvcrt_CrtSetReportFile(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int type;
+ int file;
+ long _return_value;
+
+ if (!PyArg_ParseTuple(args, "ii:CrtSetReportFile",
+ &type, &file))
+ goto exit;
+ _return_value = msvcrt_CrtSetReportFile_impl(module, type, file);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromLong(_return_value);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(_DEBUG) */
+
+#if defined(_DEBUG)
+
+PyDoc_STRVAR(msvcrt_CrtSetReportMode__doc__,
+"CrtSetReportMode($module, type, mode, /)\n"
+"--\n"
+"\n"
+"Wrapper around _CrtSetReportMode.\n"
+"\n"
+"Only available on Debug builds.");
+
+#define MSVCRT_CRTSETREPORTMODE_METHODDEF \
+ {"CrtSetReportMode", (PyCFunction)msvcrt_CrtSetReportMode, METH_VARARGS, msvcrt_CrtSetReportMode__doc__},
+
+static long
+msvcrt_CrtSetReportMode_impl(PyModuleDef *module, int type, int mode);
+
+static PyObject *
+msvcrt_CrtSetReportMode(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int type;
+ int mode;
+ long _return_value;
+
+ if (!PyArg_ParseTuple(args, "ii:CrtSetReportMode",
+ &type, &mode))
+ goto exit;
+ _return_value = msvcrt_CrtSetReportMode_impl(module, type, mode);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromLong(_return_value);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(_DEBUG) */
+
+#if defined(_DEBUG)
+
+PyDoc_STRVAR(msvcrt_set_error_mode__doc__,
+"set_error_mode($module, mode, /)\n"
+"--\n"
+"\n"
+"Wrapper around _set_error_mode.\n"
+"\n"
+"Only available on Debug builds.");
+
+#define MSVCRT_SET_ERROR_MODE_METHODDEF \
+ {"set_error_mode", (PyCFunction)msvcrt_set_error_mode, METH_O, msvcrt_set_error_mode__doc__},
+
+static long
+msvcrt_set_error_mode_impl(PyModuleDef *module, int mode);
+
+static PyObject *
+msvcrt_set_error_mode(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int mode;
+ long _return_value;
+
+ if (!PyArg_Parse(arg, "i:set_error_mode", &mode))
+ goto exit;
+ _return_value = msvcrt_set_error_mode_impl(module, mode);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromLong(_return_value);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(_DEBUG) */
+
+PyDoc_STRVAR(msvcrt_SetErrorMode__doc__,
+"SetErrorMode($module, mode, /)\n"
+"--\n"
+"\n"
+"Wrapper around SetErrorMode.");
+
+#define MSVCRT_SETERRORMODE_METHODDEF \
+ {"SetErrorMode", (PyCFunction)msvcrt_SetErrorMode, METH_O, msvcrt_SetErrorMode__doc__},
+
+static PyObject *
+msvcrt_SetErrorMode_impl(PyModuleDef *module, unsigned int mode);
+
+static PyObject *
+msvcrt_SetErrorMode(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ unsigned int mode;
+
+ if (!PyArg_Parse(arg, "I:SetErrorMode", &mode))
+ goto exit;
+ return_value = msvcrt_SetErrorMode_impl(module, mode);
+
+exit:
+ return return_value;
+}
+
+#ifndef MSVCRT_CRTSETREPORTFILE_METHODDEF
+ #define MSVCRT_CRTSETREPORTFILE_METHODDEF
+#endif /* !defined(MSVCRT_CRTSETREPORTFILE_METHODDEF) */
+
+#ifndef MSVCRT_CRTSETREPORTMODE_METHODDEF
+ #define MSVCRT_CRTSETREPORTMODE_METHODDEF
+#endif /* !defined(MSVCRT_CRTSETREPORTMODE_METHODDEF) */
+
+#ifndef MSVCRT_SET_ERROR_MODE_METHODDEF
+ #define MSVCRT_SET_ERROR_MODE_METHODDEF
+#endif /* !defined(MSVCRT_SET_ERROR_MODE_METHODDEF) */
+/*[clinic end generated code: output=16613d3119a1fd44 input=a9049054013a1b77]*/
diff --git a/PC/clinic/winreg.c.h b/PC/clinic/winreg.c.h
new file mode 100644
index 0000000000..338e33d39a
--- /dev/null
+++ b/PC/clinic/winreg.c.h
@@ -0,0 +1,1059 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(winreg_HKEYType_Close__doc__,
+"Close($self, /)\n"
+"--\n"
+"\n"
+"Closes the underlying Windows handle.\n"
+"\n"
+"If the handle is already closed, no error is raised.");
+
+#define WINREG_HKEYTYPE_CLOSE_METHODDEF \
+ {"Close", (PyCFunction)winreg_HKEYType_Close, METH_NOARGS, winreg_HKEYType_Close__doc__},
+
+static PyObject *
+winreg_HKEYType_Close_impl(PyHKEYObject *self);
+
+static PyObject *
+winreg_HKEYType_Close(PyHKEYObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return winreg_HKEYType_Close_impl(self);
+}
+
+PyDoc_STRVAR(winreg_HKEYType_Detach__doc__,
+"Detach($self, /)\n"
+"--\n"
+"\n"
+"Detaches the Windows handle from the handle object.\n"
+"\n"
+"The result is the value of the handle before it is detached. If the\n"
+"handle is already detached, this will return zero.\n"
+"\n"
+"After calling this function, the handle is effectively invalidated,\n"
+"but the handle is not closed. You would call this function when you\n"
+"need the underlying win32 handle to exist beyond the lifetime of the\n"
+"handle object.");
+
+#define WINREG_HKEYTYPE_DETACH_METHODDEF \
+ {"Detach", (PyCFunction)winreg_HKEYType_Detach, METH_NOARGS, winreg_HKEYType_Detach__doc__},
+
+static PyObject *
+winreg_HKEYType_Detach_impl(PyHKEYObject *self);
+
+static PyObject *
+winreg_HKEYType_Detach(PyHKEYObject *self, PyObject *Py_UNUSED(ignored))
+{
+ return winreg_HKEYType_Detach_impl(self);
+}
+
+PyDoc_STRVAR(winreg_HKEYType___enter____doc__,
+"__enter__($self, /)\n"
+"--\n"
+"\n");
+
+#define WINREG_HKEYTYPE___ENTER___METHODDEF \
+ {"__enter__", (PyCFunction)winreg_HKEYType___enter__, METH_NOARGS, winreg_HKEYType___enter____doc__},
+
+static PyHKEYObject *
+winreg_HKEYType___enter___impl(PyHKEYObject *self);
+
+static PyObject *
+winreg_HKEYType___enter__(PyHKEYObject *self, PyObject *Py_UNUSED(ignored))
+{
+ PyObject *return_value = NULL;
+ PyHKEYObject *_return_value;
+
+ _return_value = winreg_HKEYType___enter___impl(self);
+ return_value = (PyObject *)_return_value;
+
+ return return_value;
+}
+
+PyDoc_STRVAR(winreg_HKEYType___exit____doc__,
+"__exit__($self, /, exc_type, exc_value, traceback)\n"
+"--\n"
+"\n");
+
+#define WINREG_HKEYTYPE___EXIT___METHODDEF \
+ {"__exit__", (PyCFunction)winreg_HKEYType___exit__, METH_VARARGS|METH_KEYWORDS, winreg_HKEYType___exit____doc__},
+
+static PyObject *
+winreg_HKEYType___exit___impl(PyHKEYObject *self, PyObject *exc_type,
+ PyObject *exc_value, PyObject *traceback);
+
+static PyObject *
+winreg_HKEYType___exit__(PyHKEYObject *self, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"exc_type", "exc_value", "traceback", NULL};
+ PyObject *exc_type;
+ PyObject *exc_value;
+ PyObject *traceback;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:__exit__", _keywords,
+ &exc_type, &exc_value, &traceback))
+ goto exit;
+ return_value = winreg_HKEYType___exit___impl(self, exc_type, exc_value, traceback);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(winreg_CloseKey__doc__,
+"CloseKey($module, hkey, /)\n"
+"--\n"
+"\n"
+"Closes a previously opened registry key.\n"
+"\n"
+" hkey\n"
+" A previously opened key.\n"
+"\n"
+"Note that if the key is not closed using this method, it will be\n"
+"closed when the hkey object is destroyed by Python.");
+
+#define WINREG_CLOSEKEY_METHODDEF \
+ {"CloseKey", (PyCFunction)winreg_CloseKey, METH_O, winreg_CloseKey__doc__},
+
+PyDoc_STRVAR(winreg_ConnectRegistry__doc__,
+"ConnectRegistry($module, computer_name, key, /)\n"
+"--\n"
+"\n"
+"Establishes a connection to the registry on another computer.\n"
+"\n"
+" computer_name\n"
+" The name of the remote computer, of the form r\"\\\\computername\". If\n"
+" None, the local computer is used.\n"
+" key\n"
+" The predefined key to connect to.\n"
+"\n"
+"The return value is the handle of the opened key.\n"
+"If the function fails, an OSError exception is raised.");
+
+#define WINREG_CONNECTREGISTRY_METHODDEF \
+ {"ConnectRegistry", (PyCFunction)winreg_ConnectRegistry, METH_VARARGS, winreg_ConnectRegistry__doc__},
+
+static HKEY
+winreg_ConnectRegistry_impl(PyModuleDef *module, Py_UNICODE *computer_name,
+ HKEY key);
+
+static PyObject *
+winreg_ConnectRegistry(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_UNICODE *computer_name;
+ HKEY key;
+ HKEY _return_value;
+
+ if (!PyArg_ParseTuple(args, "ZO&:ConnectRegistry",
+ &computer_name, clinic_HKEY_converter, &key))
+ goto exit;
+ _return_value = winreg_ConnectRegistry_impl(module, computer_name, key);
+ if (_return_value == NULL)
+ goto exit;
+ return_value = PyHKEY_FromHKEY(_return_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(winreg_CreateKey__doc__,
+"CreateKey($module, key, sub_key, /)\n"
+"--\n"
+"\n"
+"Creates or opens the specified key.\n"
+"\n"
+" key\n"
+" An already open key, or one of the predefined HKEY_* constants.\n"
+" sub_key\n"
+" The name of the key this method opens or creates.\n"
+"\n"
+"If key is one of the predefined keys, sub_key may be None. In that case,\n"
+"the handle returned is the same key handle passed in to the function.\n"
+"\n"
+"If the key already exists, this function opens the existing key.\n"
+"\n"
+"The return value is the handle of the opened key.\n"
+"If the function fails, an OSError exception is raised.");
+
+#define WINREG_CREATEKEY_METHODDEF \
+ {"CreateKey", (PyCFunction)winreg_CreateKey, METH_VARARGS, winreg_CreateKey__doc__},
+
+static HKEY
+winreg_CreateKey_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key);
+
+static PyObject *
+winreg_CreateKey(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ HKEY key;
+ Py_UNICODE *sub_key;
+ HKEY _return_value;
+
+ if (!PyArg_ParseTuple(args, "O&Z:CreateKey",
+ clinic_HKEY_converter, &key, &sub_key))
+ goto exit;
+ _return_value = winreg_CreateKey_impl(module, key, sub_key);
+ if (_return_value == NULL)
+ goto exit;
+ return_value = PyHKEY_FromHKEY(_return_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(winreg_CreateKeyEx__doc__,
+"CreateKeyEx($module, /, key, sub_key, reserved=0,\n"
+" access=winreg.KEY_WRITE)\n"
+"--\n"
+"\n"
+"Creates or opens the specified key.\n"
+"\n"
+" key\n"
+" An already open key, or one of the predefined HKEY_* constants.\n"
+" sub_key\n"
+" The name of the key this method opens or creates.\n"
+" reserved\n"
+" A reserved integer, and must be zero. Default is zero.\n"
+" access\n"
+" An integer that specifies an access mask that describes the\n"
+" desired security access for the key. Default is KEY_WRITE.\n"
+"\n"
+"If key is one of the predefined keys, sub_key may be None. In that case,\n"
+"the handle returned is the same key handle passed in to the function.\n"
+"\n"
+"If the key already exists, this function opens the existing key\n"
+"\n"
+"The return value is the handle of the opened key.\n"
+"If the function fails, an OSError exception is raised.");
+
+#define WINREG_CREATEKEYEX_METHODDEF \
+ {"CreateKeyEx", (PyCFunction)winreg_CreateKeyEx, METH_VARARGS|METH_KEYWORDS, winreg_CreateKeyEx__doc__},
+
+static HKEY
+winreg_CreateKeyEx_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key,
+ int reserved, REGSAM access);
+
+static PyObject *
+winreg_CreateKeyEx(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"key", "sub_key", "reserved", "access", NULL};
+ HKEY key;
+ Py_UNICODE *sub_key;
+ int reserved = 0;
+ REGSAM access = KEY_WRITE;
+ HKEY _return_value;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&Z|ii:CreateKeyEx", _keywords,
+ clinic_HKEY_converter, &key, &sub_key, &reserved, &access))
+ goto exit;
+ _return_value = winreg_CreateKeyEx_impl(module, key, sub_key, reserved, access);
+ if (_return_value == NULL)
+ goto exit;
+ return_value = PyHKEY_FromHKEY(_return_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(winreg_DeleteKey__doc__,
+"DeleteKey($module, key, sub_key, /)\n"
+"--\n"
+"\n"
+"Deletes the specified key.\n"
+"\n"
+" key\n"
+" An already open key, or any one of the predefined HKEY_* constants.\n"
+" sub_key\n"
+" A string that must be the name of a subkey of the key identified by\n"
+" the key parameter. This value must not be None, and the key may not\n"
+" have subkeys.\n"
+"\n"
+"This method can not delete keys with subkeys.\n"
+"\n"
+"If the function succeeds, the entire key, including all of its values,\n"
+"is removed. If the function fails, an OSError exception is raised.");
+
+#define WINREG_DELETEKEY_METHODDEF \
+ {"DeleteKey", (PyCFunction)winreg_DeleteKey, METH_VARARGS, winreg_DeleteKey__doc__},
+
+static PyObject *
+winreg_DeleteKey_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key);
+
+static PyObject *
+winreg_DeleteKey(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ HKEY key;
+ Py_UNICODE *sub_key;
+
+ if (!PyArg_ParseTuple(args, "O&u:DeleteKey",
+ clinic_HKEY_converter, &key, &sub_key))
+ goto exit;
+ return_value = winreg_DeleteKey_impl(module, key, sub_key);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(winreg_DeleteKeyEx__doc__,
+"DeleteKeyEx($module, /, key, sub_key, access=winreg.KEY_WOW64_64KEY,\n"
+" reserved=0)\n"
+"--\n"
+"\n"
+"Deletes the specified key (64-bit OS only).\n"
+"\n"
+" key\n"
+" An already open key, or any one of the predefined HKEY_* constants.\n"
+" sub_key\n"
+" A string that must be the name of a subkey of the key identified by\n"
+" the key parameter. This value must not be None, and the key may not\n"
+" have subkeys.\n"
+" access\n"
+" An integer that specifies an access mask that describes the\n"
+" desired security access for the key. Default is KEY_WOW64_64KEY.\n"
+" reserved\n"
+" A reserved integer, and must be zero. Default is zero.\n"
+"\n"
+"This method can not delete keys with subkeys.\n"
+"\n"
+"If the function succeeds, the entire key, including all of its values,\n"
+"is removed. If the function fails, an OSError exception is raised.\n"
+"On unsupported Windows versions, NotImplementedError is raised.");
+
+#define WINREG_DELETEKEYEX_METHODDEF \
+ {"DeleteKeyEx", (PyCFunction)winreg_DeleteKeyEx, METH_VARARGS|METH_KEYWORDS, winreg_DeleteKeyEx__doc__},
+
+static PyObject *
+winreg_DeleteKeyEx_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key,
+ REGSAM access, int reserved);
+
+static PyObject *
+winreg_DeleteKeyEx(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"key", "sub_key", "access", "reserved", NULL};
+ HKEY key;
+ Py_UNICODE *sub_key;
+ REGSAM access = KEY_WOW64_64KEY;
+ int reserved = 0;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&u|ii:DeleteKeyEx", _keywords,
+ clinic_HKEY_converter, &key, &sub_key, &access, &reserved))
+ goto exit;
+ return_value = winreg_DeleteKeyEx_impl(module, key, sub_key, access, reserved);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(winreg_DeleteValue__doc__,
+"DeleteValue($module, key, value, /)\n"
+"--\n"
+"\n"
+"Removes a named value from a registry key.\n"
+"\n"
+" key\n"
+" An already open key, or any one of the predefined HKEY_* constants.\n"
+" value\n"
+" A string that identifies the value to remove.");
+
+#define WINREG_DELETEVALUE_METHODDEF \
+ {"DeleteValue", (PyCFunction)winreg_DeleteValue, METH_VARARGS, winreg_DeleteValue__doc__},
+
+static PyObject *
+winreg_DeleteValue_impl(PyModuleDef *module, HKEY key, Py_UNICODE *value);
+
+static PyObject *
+winreg_DeleteValue(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ HKEY key;
+ Py_UNICODE *value;
+
+ if (!PyArg_ParseTuple(args, "O&Z:DeleteValue",
+ clinic_HKEY_converter, &key, &value))
+ goto exit;
+ return_value = winreg_DeleteValue_impl(module, key, value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(winreg_EnumKey__doc__,
+"EnumKey($module, key, index, /)\n"
+"--\n"
+"\n"
+"Enumerates subkeys of an open registry key.\n"
+"\n"
+" key\n"
+" An already open key, or any one of the predefined HKEY_* constants.\n"
+" index\n"
+" An integer that identifies the index of the key to retrieve.\n"
+"\n"
+"The function retrieves the name of one subkey each time it is called.\n"
+"It is typically called repeatedly until an OSError exception is\n"
+"raised, indicating no more values are available.");
+
+#define WINREG_ENUMKEY_METHODDEF \
+ {"EnumKey", (PyCFunction)winreg_EnumKey, METH_VARARGS, winreg_EnumKey__doc__},
+
+static PyObject *
+winreg_EnumKey_impl(PyModuleDef *module, HKEY key, int index);
+
+static PyObject *
+winreg_EnumKey(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ HKEY key;
+ int index;
+
+ if (!PyArg_ParseTuple(args, "O&i:EnumKey",
+ clinic_HKEY_converter, &key, &index))
+ goto exit;
+ return_value = winreg_EnumKey_impl(module, key, index);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(winreg_EnumValue__doc__,
+"EnumValue($module, key, index, /)\n"
+"--\n"
+"\n"
+"Enumerates values of an open registry key.\n"
+"\n"
+" key\n"
+" An already open key, or any one of the predefined HKEY_* constants.\n"
+" index\n"
+" An integer that identifies the index of the value to retrieve.\n"
+"\n"
+"The function retrieves the name of one subkey each time it is called.\n"
+"It is typically called repeatedly, until an OSError exception\n"
+"is raised, indicating no more values.\n"
+"\n"
+"The result is a tuple of 3 items:\n"
+" value_name\n"
+" A string that identifies the value.\n"
+" value_data\n"
+" An object that holds the value data, and whose type depends\n"
+" on the underlying registry type.\n"
+" data_type\n"
+" An integer that identifies the type of the value data.");
+
+#define WINREG_ENUMVALUE_METHODDEF \
+ {"EnumValue", (PyCFunction)winreg_EnumValue, METH_VARARGS, winreg_EnumValue__doc__},
+
+static PyObject *
+winreg_EnumValue_impl(PyModuleDef *module, HKEY key, int index);
+
+static PyObject *
+winreg_EnumValue(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ HKEY key;
+ int index;
+
+ if (!PyArg_ParseTuple(args, "O&i:EnumValue",
+ clinic_HKEY_converter, &key, &index))
+ goto exit;
+ return_value = winreg_EnumValue_impl(module, key, index);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(winreg_ExpandEnvironmentStrings__doc__,
+"ExpandEnvironmentStrings($module, string, /)\n"
+"--\n"
+"\n"
+"Expand environment vars.");
+
+#define WINREG_EXPANDENVIRONMENTSTRINGS_METHODDEF \
+ {"ExpandEnvironmentStrings", (PyCFunction)winreg_ExpandEnvironmentStrings, METH_O, winreg_ExpandEnvironmentStrings__doc__},
+
+static PyObject *
+winreg_ExpandEnvironmentStrings_impl(PyModuleDef *module, Py_UNICODE *string);
+
+static PyObject *
+winreg_ExpandEnvironmentStrings(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ Py_UNICODE *string;
+
+ if (!PyArg_Parse(arg, "u:ExpandEnvironmentStrings", &string))
+ goto exit;
+ return_value = winreg_ExpandEnvironmentStrings_impl(module, string);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(winreg_FlushKey__doc__,
+"FlushKey($module, key, /)\n"
+"--\n"
+"\n"
+"Writes all the attributes of a key to the registry.\n"
+"\n"
+" key\n"
+" An already open key, or any one of the predefined HKEY_* constants.\n"
+"\n"
+"It is not necessary to call FlushKey to change a key. Registry changes\n"
+"are flushed to disk by the registry using its lazy flusher. Registry\n"
+"changes are also flushed to disk at system shutdown. Unlike\n"
+"CloseKey(), the FlushKey() method returns only when all the data has\n"
+"been written to the registry.\n"
+"\n"
+"An application should only call FlushKey() if it requires absolute\n"
+"certainty that registry changes are on disk. If you don\'t know whether\n"
+"a FlushKey() call is required, it probably isn\'t.");
+
+#define WINREG_FLUSHKEY_METHODDEF \
+ {"FlushKey", (PyCFunction)winreg_FlushKey, METH_O, winreg_FlushKey__doc__},
+
+static PyObject *
+winreg_FlushKey_impl(PyModuleDef *module, HKEY key);
+
+static PyObject *
+winreg_FlushKey(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ HKEY key;
+
+ if (!PyArg_Parse(arg, "O&:FlushKey", clinic_HKEY_converter, &key))
+ goto exit;
+ return_value = winreg_FlushKey_impl(module, key);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(winreg_LoadKey__doc__,
+"LoadKey($module, key, sub_key, file_name, /)\n"
+"--\n"
+"\n"
+"Insert data into the registry from a file.\n"
+"\n"
+" key\n"
+" An already open key, or any one of the predefined HKEY_* constants.\n"
+" sub_key\n"
+" A string that identifies the sub-key to load.\n"
+" file_name\n"
+" The name of the file to load registry data from. This file must\n"
+" have been created with the SaveKey() function. Under the file\n"
+" allocation table (FAT) file system, the filename may not have an\n"
+" extension.\n"
+"\n"
+"Creates a subkey under the specified key and stores registration\n"
+"information from a specified file into that subkey.\n"
+"\n"
+"A call to LoadKey() fails if the calling process does not have the\n"
+"SE_RESTORE_PRIVILEGE privilege.\n"
+"\n"
+"If key is a handle returned by ConnectRegistry(), then the path\n"
+"specified in fileName is relative to the remote computer.\n"
+"\n"
+"The MSDN docs imply key must be in the HKEY_USER or HKEY_LOCAL_MACHINE\n"
+"tree.");
+
+#define WINREG_LOADKEY_METHODDEF \
+ {"LoadKey", (PyCFunction)winreg_LoadKey, METH_VARARGS, winreg_LoadKey__doc__},
+
+static PyObject *
+winreg_LoadKey_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key,
+ Py_UNICODE *file_name);
+
+static PyObject *
+winreg_LoadKey(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ HKEY key;
+ Py_UNICODE *sub_key;
+ Py_UNICODE *file_name;
+
+ if (!PyArg_ParseTuple(args, "O&uu:LoadKey",
+ clinic_HKEY_converter, &key, &sub_key, &file_name))
+ goto exit;
+ return_value = winreg_LoadKey_impl(module, key, sub_key, file_name);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(winreg_OpenKey__doc__,
+"OpenKey($module, /, key, sub_key, reserved=0, access=winreg.KEY_READ)\n"
+"--\n"
+"\n"
+"Opens the specified key.\n"
+"\n"
+" key\n"
+" An already open key, or any one of the predefined HKEY_* constants.\n"
+" sub_key\n"
+" A string that identifies the sub_key to open.\n"
+" reserved\n"
+" A reserved integer that must be zero. Default is zero.\n"
+" access\n"
+" An integer that specifies an access mask that describes the desired\n"
+" security access for the key. Default is KEY_READ.\n"
+"\n"
+"The result is a new handle to the specified key.\n"
+"If the function fails, an OSError exception is raised.");
+
+#define WINREG_OPENKEY_METHODDEF \
+ {"OpenKey", (PyCFunction)winreg_OpenKey, METH_VARARGS|METH_KEYWORDS, winreg_OpenKey__doc__},
+
+static HKEY
+winreg_OpenKey_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key,
+ int reserved, REGSAM access);
+
+static PyObject *
+winreg_OpenKey(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"key", "sub_key", "reserved", "access", NULL};
+ HKEY key;
+ Py_UNICODE *sub_key;
+ int reserved = 0;
+ REGSAM access = KEY_READ;
+ HKEY _return_value;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&Z|ii:OpenKey", _keywords,
+ clinic_HKEY_converter, &key, &sub_key, &reserved, &access))
+ goto exit;
+ _return_value = winreg_OpenKey_impl(module, key, sub_key, reserved, access);
+ if (_return_value == NULL)
+ goto exit;
+ return_value = PyHKEY_FromHKEY(_return_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(winreg_OpenKeyEx__doc__,
+"OpenKeyEx($module, /, key, sub_key, reserved=0, access=winreg.KEY_READ)\n"
+"--\n"
+"\n"
+"Opens the specified key.\n"
+"\n"
+" key\n"
+" An already open key, or any one of the predefined HKEY_* constants.\n"
+" sub_key\n"
+" A string that identifies the sub_key to open.\n"
+" reserved\n"
+" A reserved integer that must be zero. Default is zero.\n"
+" access\n"
+" An integer that specifies an access mask that describes the desired\n"
+" security access for the key. Default is KEY_READ.\n"
+"\n"
+"The result is a new handle to the specified key.\n"
+"If the function fails, an OSError exception is raised.");
+
+#define WINREG_OPENKEYEX_METHODDEF \
+ {"OpenKeyEx", (PyCFunction)winreg_OpenKeyEx, METH_VARARGS|METH_KEYWORDS, winreg_OpenKeyEx__doc__},
+
+static HKEY
+winreg_OpenKeyEx_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key,
+ int reserved, REGSAM access);
+
+static PyObject *
+winreg_OpenKeyEx(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"key", "sub_key", "reserved", "access", NULL};
+ HKEY key;
+ Py_UNICODE *sub_key;
+ int reserved = 0;
+ REGSAM access = KEY_READ;
+ HKEY _return_value;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&Z|ii:OpenKeyEx", _keywords,
+ clinic_HKEY_converter, &key, &sub_key, &reserved, &access))
+ goto exit;
+ _return_value = winreg_OpenKeyEx_impl(module, key, sub_key, reserved, access);
+ if (_return_value == NULL)
+ goto exit;
+ return_value = PyHKEY_FromHKEY(_return_value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(winreg_QueryInfoKey__doc__,
+"QueryInfoKey($module, key, /)\n"
+"--\n"
+"\n"
+"Returns information about a key.\n"
+"\n"
+" key\n"
+" An already open key, or any one of the predefined HKEY_* constants.\n"
+"\n"
+"The result is a tuple of 3 items:\n"
+"An integer that identifies the number of sub keys this key has.\n"
+"An integer that identifies the number of values this key has.\n"
+"An integer that identifies when the key was last modified (if available)\n"
+"as 100\'s of nanoseconds since Jan 1, 1600.");
+
+#define WINREG_QUERYINFOKEY_METHODDEF \
+ {"QueryInfoKey", (PyCFunction)winreg_QueryInfoKey, METH_O, winreg_QueryInfoKey__doc__},
+
+static PyObject *
+winreg_QueryInfoKey_impl(PyModuleDef *module, HKEY key);
+
+static PyObject *
+winreg_QueryInfoKey(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ HKEY key;
+
+ if (!PyArg_Parse(arg, "O&:QueryInfoKey", clinic_HKEY_converter, &key))
+ goto exit;
+ return_value = winreg_QueryInfoKey_impl(module, key);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(winreg_QueryValue__doc__,
+"QueryValue($module, key, sub_key, /)\n"
+"--\n"
+"\n"
+"Retrieves the unnamed value for a key.\n"
+"\n"
+" key\n"
+" An already open key, or any one of the predefined HKEY_* constants.\n"
+" sub_key\n"
+" A string that holds the name of the subkey with which the value\n"
+" is associated. If this parameter is None or empty, the function\n"
+" retrieves the value set by the SetValue() method for the key\n"
+" identified by key.\n"
+"\n"
+"Values in the registry have name, type, and data components. This method\n"
+"retrieves the data for a key\'s first value that has a NULL name.\n"
+"But since the underlying API call doesn\'t return the type, you\'ll\n"
+"probably be happier using QueryValueEx; this function is just here for\n"
+"completeness.");
+
+#define WINREG_QUERYVALUE_METHODDEF \
+ {"QueryValue", (PyCFunction)winreg_QueryValue, METH_VARARGS, winreg_QueryValue__doc__},
+
+static PyObject *
+winreg_QueryValue_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key);
+
+static PyObject *
+winreg_QueryValue(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ HKEY key;
+ Py_UNICODE *sub_key;
+
+ if (!PyArg_ParseTuple(args, "O&Z:QueryValue",
+ clinic_HKEY_converter, &key, &sub_key))
+ goto exit;
+ return_value = winreg_QueryValue_impl(module, key, sub_key);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(winreg_QueryValueEx__doc__,
+"QueryValueEx($module, key, name, /)\n"
+"--\n"
+"\n"
+"Retrieves the type and value of a specified sub-key.\n"
+"\n"
+" key\n"
+" An already open key, or any one of the predefined HKEY_* constants.\n"
+" name\n"
+" A string indicating the value to query.\n"
+"\n"
+"Behaves mostly like QueryValue(), but also returns the type of the\n"
+"specified value name associated with the given open registry key.\n"
+"\n"
+"The return value is a tuple of the value and the type_id.");
+
+#define WINREG_QUERYVALUEEX_METHODDEF \
+ {"QueryValueEx", (PyCFunction)winreg_QueryValueEx, METH_VARARGS, winreg_QueryValueEx__doc__},
+
+static PyObject *
+winreg_QueryValueEx_impl(PyModuleDef *module, HKEY key, Py_UNICODE *name);
+
+static PyObject *
+winreg_QueryValueEx(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ HKEY key;
+ Py_UNICODE *name;
+
+ if (!PyArg_ParseTuple(args, "O&Z:QueryValueEx",
+ clinic_HKEY_converter, &key, &name))
+ goto exit;
+ return_value = winreg_QueryValueEx_impl(module, key, name);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(winreg_SaveKey__doc__,
+"SaveKey($module, key, file_name, /)\n"
+"--\n"
+"\n"
+"Saves the specified key, and all its subkeys to the specified file.\n"
+"\n"
+" key\n"
+" An already open key, or any one of the predefined HKEY_* constants.\n"
+" file_name\n"
+" The name of the file to save registry data to. This file cannot\n"
+" already exist. If this filename includes an extension, it cannot be\n"
+" used on file allocation table (FAT) file systems by the LoadKey(),\n"
+" ReplaceKey() or RestoreKey() methods.\n"
+"\n"
+"If key represents a key on a remote computer, the path described by\n"
+"file_name is relative to the remote computer.\n"
+"\n"
+"The caller of this method must possess the SeBackupPrivilege\n"
+"security privilege. This function passes NULL for security_attributes\n"
+"to the API.");
+
+#define WINREG_SAVEKEY_METHODDEF \
+ {"SaveKey", (PyCFunction)winreg_SaveKey, METH_VARARGS, winreg_SaveKey__doc__},
+
+static PyObject *
+winreg_SaveKey_impl(PyModuleDef *module, HKEY key, Py_UNICODE *file_name);
+
+static PyObject *
+winreg_SaveKey(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ HKEY key;
+ Py_UNICODE *file_name;
+
+ if (!PyArg_ParseTuple(args, "O&u:SaveKey",
+ clinic_HKEY_converter, &key, &file_name))
+ goto exit;
+ return_value = winreg_SaveKey_impl(module, key, file_name);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(winreg_SetValue__doc__,
+"SetValue($module, key, sub_key, type, value, /)\n"
+"--\n"
+"\n"
+"Associates a value with a specified key.\n"
+"\n"
+" key\n"
+" An already open key, or any one of the predefined HKEY_* constants.\n"
+" sub_key\n"
+" A string that names the subkey with which the value is associated.\n"
+" type\n"
+" An integer that specifies the type of the data. Currently this must\n"
+" be REG_SZ, meaning only strings are supported.\n"
+" value\n"
+" A string that specifies the new value.\n"
+"\n"
+"If the key specified by the sub_key parameter does not exist, the\n"
+"SetValue function creates it.\n"
+"\n"
+"Value lengths are limited by available memory. Long values (more than\n"
+"2048 bytes) should be stored as files with the filenames stored in\n"
+"the configuration registry to help the registry perform efficiently.\n"
+"\n"
+"The key identified by the key parameter must have been opened with\n"
+"KEY_SET_VALUE access.");
+
+#define WINREG_SETVALUE_METHODDEF \
+ {"SetValue", (PyCFunction)winreg_SetValue, METH_VARARGS, winreg_SetValue__doc__},
+
+static PyObject *
+winreg_SetValue_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key,
+ DWORD type, Py_UNICODE *value,
+ Py_ssize_clean_t value_length);
+
+static PyObject *
+winreg_SetValue(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ HKEY key;
+ Py_UNICODE *sub_key;
+ DWORD type;
+ Py_UNICODE *value;
+ Py_ssize_clean_t value_length;
+
+ if (!PyArg_ParseTuple(args, "O&Zku#:SetValue",
+ clinic_HKEY_converter, &key, &sub_key, &type, &value, &value_length))
+ goto exit;
+ return_value = winreg_SetValue_impl(module, key, sub_key, type, value, value_length);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(winreg_SetValueEx__doc__,
+"SetValueEx($module, key, value_name, reserved, type, value, /)\n"
+"--\n"
+"\n"
+"Stores data in the value field of an open registry key.\n"
+"\n"
+" key\n"
+" An already open key, or any one of the predefined HKEY_* constants.\n"
+" value_name\n"
+" A string containing the name of the value to set, or None.\n"
+" reserved\n"
+" Can be anything - zero is always passed to the API.\n"
+" type\n"
+" An integer that specifies the type of the data, one of:\n"
+" REG_BINARY -- Binary data in any form.\n"
+" REG_DWORD -- A 32-bit number.\n"
+" REG_DWORD_LITTLE_ENDIAN -- A 32-bit number in little-endian format.\n"
+" REG_DWORD_BIG_ENDIAN -- A 32-bit number in big-endian format.\n"
+" REG_EXPAND_SZ -- A null-terminated string that contains unexpanded\n"
+" references to environment variables (for example,\n"
+" %PATH%).\n"
+" REG_LINK -- A Unicode symbolic link.\n"
+" REG_MULTI_SZ -- A sequence of null-terminated strings, terminated\n"
+" by two null characters. Note that Python handles\n"
+" this termination automatically.\n"
+" REG_NONE -- No defined value type.\n"
+" REG_RESOURCE_LIST -- A device-driver resource list.\n"
+" REG_SZ -- A null-terminated string.\n"
+" value\n"
+" A string that specifies the new value.\n"
+"\n"
+"This method can also set additional value and type information for the\n"
+"specified key. The key identified by the key parameter must have been\n"
+"opened with KEY_SET_VALUE access.\n"
+"\n"
+"To open the key, use the CreateKeyEx() or OpenKeyEx() methods.\n"
+"\n"
+"Value lengths are limited by available memory. Long values (more than\n"
+"2048 bytes) should be stored as files with the filenames stored in\n"
+"the configuration registry to help the registry perform efficiently.");
+
+#define WINREG_SETVALUEEX_METHODDEF \
+ {"SetValueEx", (PyCFunction)winreg_SetValueEx, METH_VARARGS, winreg_SetValueEx__doc__},
+
+static PyObject *
+winreg_SetValueEx_impl(PyModuleDef *module, HKEY key, Py_UNICODE *value_name,
+ PyObject *reserved, DWORD type, PyObject *value);
+
+static PyObject *
+winreg_SetValueEx(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ HKEY key;
+ Py_UNICODE *value_name;
+ PyObject *reserved;
+ DWORD type;
+ PyObject *value;
+
+ if (!PyArg_ParseTuple(args, "O&ZOkO:SetValueEx",
+ clinic_HKEY_converter, &key, &value_name, &reserved, &type, &value))
+ goto exit;
+ return_value = winreg_SetValueEx_impl(module, key, value_name, reserved, type, value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(winreg_DisableReflectionKey__doc__,
+"DisableReflectionKey($module, key, /)\n"
+"--\n"
+"\n"
+"Disables registry reflection for 32bit processes running on a 64bit OS.\n"
+"\n"
+" key\n"
+" An already open key, or any one of the predefined HKEY_* constants.\n"
+"\n"
+"Will generally raise NotImplemented if executed on a 32bit OS.\n"
+"\n"
+"If the key is not on the reflection list, the function succeeds but has\n"
+"no effect. Disabling reflection for a key does not affect reflection\n"
+"of any subkeys.");
+
+#define WINREG_DISABLEREFLECTIONKEY_METHODDEF \
+ {"DisableReflectionKey", (PyCFunction)winreg_DisableReflectionKey, METH_O, winreg_DisableReflectionKey__doc__},
+
+static PyObject *
+winreg_DisableReflectionKey_impl(PyModuleDef *module, HKEY key);
+
+static PyObject *
+winreg_DisableReflectionKey(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ HKEY key;
+
+ if (!PyArg_Parse(arg, "O&:DisableReflectionKey", clinic_HKEY_converter, &key))
+ goto exit;
+ return_value = winreg_DisableReflectionKey_impl(module, key);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(winreg_EnableReflectionKey__doc__,
+"EnableReflectionKey($module, key, /)\n"
+"--\n"
+"\n"
+"Restores registry reflection for the specified disabled key.\n"
+"\n"
+" key\n"
+" An already open key, or any one of the predefined HKEY_* constants.\n"
+"\n"
+"Will generally raise NotImplemented if executed on a 32bit OS.\n"
+"Restoring reflection for a key does not affect reflection of any\n"
+"subkeys.");
+
+#define WINREG_ENABLEREFLECTIONKEY_METHODDEF \
+ {"EnableReflectionKey", (PyCFunction)winreg_EnableReflectionKey, METH_O, winreg_EnableReflectionKey__doc__},
+
+static PyObject *
+winreg_EnableReflectionKey_impl(PyModuleDef *module, HKEY key);
+
+static PyObject *
+winreg_EnableReflectionKey(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ HKEY key;
+
+ if (!PyArg_Parse(arg, "O&:EnableReflectionKey", clinic_HKEY_converter, &key))
+ goto exit;
+ return_value = winreg_EnableReflectionKey_impl(module, key);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(winreg_QueryReflectionKey__doc__,
+"QueryReflectionKey($module, key, /)\n"
+"--\n"
+"\n"
+"Returns the reflection state for the specified key as a bool.\n"
+"\n"
+" key\n"
+" An already open key, or any one of the predefined HKEY_* constants.\n"
+"\n"
+"Will generally raise NotImplemented if executed on a 32bit OS.");
+
+#define WINREG_QUERYREFLECTIONKEY_METHODDEF \
+ {"QueryReflectionKey", (PyCFunction)winreg_QueryReflectionKey, METH_O, winreg_QueryReflectionKey__doc__},
+
+static PyObject *
+winreg_QueryReflectionKey_impl(PyModuleDef *module, HKEY key);
+
+static PyObject *
+winreg_QueryReflectionKey(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ HKEY key;
+
+ if (!PyArg_Parse(arg, "O&:QueryReflectionKey", clinic_HKEY_converter, &key))
+ goto exit;
+ return_value = winreg_QueryReflectionKey_impl(module, key);
+
+exit:
+ return return_value;
+}
+/*[clinic end generated code: output=5e346dccc296f9f1 input=a9049054013a1b77]*/
diff --git a/PC/clinic/winsound.c.h b/PC/clinic/winsound.c.h
new file mode 100644
index 0000000000..dca5a429f3
--- /dev/null
+++ b/PC/clinic/winsound.c.h
@@ -0,0 +1,100 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(winsound_PlaySound__doc__,
+"PlaySound($module, sound, flags, /)\n"
+"--\n"
+"\n"
+"A wrapper around the Windows PlaySound API.\n"
+"\n"
+" sound\n"
+" The sound to play; a filename, data, or None.\n"
+" flags\n"
+" Flag values, ored together. See module documentation.");
+
+#define WINSOUND_PLAYSOUND_METHODDEF \
+ {"PlaySound", (PyCFunction)winsound_PlaySound, METH_VARARGS, winsound_PlaySound__doc__},
+
+static PyObject *
+winsound_PlaySound_impl(PyModuleDef *module, Py_UNICODE *sound, int flags);
+
+static PyObject *
+winsound_PlaySound(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ Py_UNICODE *sound;
+ int flags;
+
+ if (!PyArg_ParseTuple(args, "Zi:PlaySound",
+ &sound, &flags))
+ goto exit;
+ return_value = winsound_PlaySound_impl(module, sound, flags);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(winsound_Beep__doc__,
+"Beep($module, frequency, duration, /)\n"
+"--\n"
+"\n"
+"A wrapper around the Windows Beep API.\n"
+"\n"
+" frequency\n"
+" Frequency of the sound in hertz.\n"
+" Must be in the range 37 through 32,767.\n"
+" duration\n"
+" How long the sound should play, in milliseconds.");
+
+#define WINSOUND_BEEP_METHODDEF \
+ {"Beep", (PyCFunction)winsound_Beep, METH_VARARGS, winsound_Beep__doc__},
+
+static PyObject *
+winsound_Beep_impl(PyModuleDef *module, int frequency, int duration);
+
+static PyObject *
+winsound_Beep(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int frequency;
+ int duration;
+
+ if (!PyArg_ParseTuple(args, "ii:Beep",
+ &frequency, &duration))
+ goto exit;
+ return_value = winsound_Beep_impl(module, frequency, duration);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(winsound_MessageBeep__doc__,
+"MessageBeep($module, x=MB_OK, /)\n"
+"--\n"
+"\n"
+"Call Windows MessageBeep(x).\n"
+"\n"
+"x defaults to MB_OK.");
+
+#define WINSOUND_MESSAGEBEEP_METHODDEF \
+ {"MessageBeep", (PyCFunction)winsound_MessageBeep, METH_VARARGS, winsound_MessageBeep__doc__},
+
+static PyObject *
+winsound_MessageBeep_impl(PyModuleDef *module, int x);
+
+static PyObject *
+winsound_MessageBeep(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ int x = MB_OK;
+
+ if (!PyArg_ParseTuple(args, "|i:MessageBeep",
+ &x))
+ goto exit;
+ return_value = winsound_MessageBeep_impl(module, x);
+
+exit:
+ return return_value;
+}
+/*[clinic end generated code: output=c5b018ac9dc1f500 input=a9049054013a1b77]*/
diff --git a/PC/config.c b/PC/config.c
index 72c9381130..66bf4580a0 100644
--- a/PC/config.c
+++ b/PC/config.c
@@ -1,7 +1,7 @@
/* Module configuration */
/* This file contains the table of built-in modules.
- See init_builtin() in import.c. */
+ See create_builtin() in import.c. */
#include "Python.h"
@@ -19,7 +19,7 @@ extern PyObject* PyInit_math(void);
extern PyObject* PyInit__md5(void);
extern PyObject* PyInit_nt(void);
extern PyObject* PyInit__operator(void);
-extern PyObject* PyInit_signal(void);
+extern PyObject* PyInit__signal(void);
extern PyObject* PyInit__sha1(void);
extern PyObject* PyInit__sha256(void);
extern PyObject* PyInit__sha512(void);
@@ -91,7 +91,7 @@ struct _inittab _PyImport_Inittab[] = {
{"math", PyInit_math},
{"nt", PyInit_nt}, /* Use the NT os functions, not posix */
{"_operator", PyInit__operator},
- {"signal", PyInit_signal},
+ {"_signal", PyInit__signal},
{"_md5", PyInit__md5},
{"_sha1", PyInit__sha1},
{"_sha256", PyInit__sha256},
diff --git a/PC/dl_nt.c b/PC/dl_nt.c
index ae10fb5623..c87c51eb55 100644
--- a/PC/dl_nt.c
+++ b/PC/dl_nt.c
@@ -12,7 +12,12 @@ forgotten) from the programmer.
#include "windows.h"
#ifdef Py_ENABLE_SHARED
+#ifdef MS_DLL_ID
+// The string is available at build, so fill the buffer immediately
+char dllVersionBuffer[16] = MS_DLL_ID;
+#else
char dllVersionBuffer[16] = ""; // a private buffer
+#endif
// Python Globals
HMODULE PyWin_DLLhModule = NULL;
@@ -88,8 +93,11 @@ BOOL WINAPI DllMain (HANDLE hInst,
{
case DLL_PROCESS_ATTACH:
PyWin_DLLhModule = hInst;
+#ifndef MS_DLL_ID
+ // If we have MS_DLL_ID, we don't need to load the string.
// 1000 is a magic number I picked out of the air. Could do with a #define, I spose...
LoadString(hInst, 1000, dllVersionBuffer, sizeof(dllVersionBuffer));
+#endif
#if HAVE_SXS
// and capture our activation context for use when loading extensions.
diff --git a/PC/getpathp.c b/PC/getpathp.c
index deb40e76f3..c7ddf1ea6b 100644
--- a/PC/getpathp.c
+++ b/PC/getpathp.c
@@ -113,7 +113,10 @@ is_sep(wchar_t ch) /* determine if "ch" is a separator character */
static void
reduce(wchar_t *dir)
{
- size_t i = wcslen(dir);
+ size_t i = wcsnlen_s(dir, MAXPATHLEN+1);
+ if (i >= MAXPATHLEN+1)
+ Py_FatalError("buffer overflow in getpathp.c's reduce()");
+
while (i > 0 && !is_sep(dir[i]))
--i;
dir[i] = '\0';
@@ -130,16 +133,23 @@ exists(wchar_t *filename)
may extend 'filename' by one character.
*/
static int
-ismodule(wchar_t *filename) /* Is module -- check for .pyc/.pyo too */
+ismodule(wchar_t *filename, int update_filename) /* Is module -- check for .pyc/.pyo too */
{
+ int n;
+
if (exists(filename))
return 1;
/* Check for the compiled version of prefix. */
- if (wcslen(filename) < MAXPATHLEN) {
- wcscat(filename, Py_OptimizeFlag ? L"o" : L"c");
- if (exists(filename))
- return 1;
+ n = wcsnlen_s(filename, MAXPATHLEN+1);
+ if (n < MAXPATHLEN) {
+ int exist = 0;
+ filename[n] = Py_OptimizeFlag ? L'o' : L'c';
+ filename[n + 1] = L'\0';
+ exist = exists(filename);
+ if (!update_filename)
+ filename[n] = L'\0';
+ return exist;
}
return 0;
}
@@ -154,23 +164,23 @@ ismodule(wchar_t *filename) /* Is module -- check for .pyc/.pyo too */
stuff as fits will be appended.
*/
static void
-join(wchar_t *buffer, wchar_t *stuff)
+join(wchar_t *buffer, const wchar_t *stuff)
{
- size_t n, k;
- if (is_sep(stuff[0]))
- n = 0;
- else {
- n = wcslen(buffer);
- if (n > 0 && !is_sep(buffer[n-1]) && n < MAXPATHLEN)
- buffer[n++] = SEP;
+ size_t n;
+ if (is_sep(stuff[0]) ||
+ (wcsnlen_s(stuff, 4) >= 3 && stuff[1] == ':' && is_sep(stuff[2]))) {
+ if (wcscpy_s(buffer, MAXPATHLEN+1, stuff) != 0)
+ Py_FatalError("buffer overflow in getpathp.c's join()");
+ return;
}
- if (n > MAXPATHLEN)
- Py_FatalError("buffer overflow in getpathp.c's joinpath()");
- k = wcslen(stuff);
- if (n + k > MAXPATHLEN)
- k = MAXPATHLEN - n;
- wcsncpy(buffer+n, stuff, k);
- buffer[n+k] = '\0';
+
+ n = wcsnlen_s(buffer, MAXPATHLEN+1);
+ if (n > 0 && !is_sep(buffer[n - 1]) && n < MAXPATHLEN) {
+ buffer[n] = SEP;
+ buffer[n + 1] = '\0';
+ }
+ if (wcscat_s(buffer, MAXPATHLEN+1, stuff) != 0)
+ Py_FatalError("buffer overflow in getpathp.c's join()");
}
/* gotlandmark only called by search_for_prefix, which ensures
@@ -181,11 +191,10 @@ static int
gotlandmark(wchar_t *landmark)
{
int ok;
- Py_ssize_t n;
+ Py_ssize_t n = wcsnlen_s(prefix, MAXPATHLEN);
- n = wcslen(prefix);
join(prefix, landmark);
- ok = ismodule(prefix);
+ ok = ismodule(prefix, FALSE);
prefix[n] = '\0';
return ok;
}
@@ -196,7 +205,7 @@ static int
search_for_prefix(wchar_t *argv0_path, wchar_t *landmark)
{
/* Search from argv0_path, until landmark is found */
- wcscpy(prefix, argv0_path);
+ wcscpy_s(prefix, MAXPATHLEN + 1, argv0_path);
do {
if (gotlandmark(landmark))
return 1;
@@ -236,7 +245,7 @@ getpythonregpath(HKEY keyBase, int skipcore)
WCHAR *dataBuf = NULL;
static const WCHAR keyPrefix[] = L"Software\\Python\\PythonCore\\";
static const WCHAR keySuffix[] = L"\\PythonPath";
- size_t versionLen;
+ size_t versionLen, keyBufLen;
DWORD index;
WCHAR *keyBuf = NULL;
WCHAR *keyBufPtr;
@@ -245,12 +254,13 @@ getpythonregpath(HKEY keyBase, int skipcore)
/* Tried to use sysget("winver") but here is too early :-( */
versionLen = strlen(PyWin_DLLVersionString);
/* Space for all the chars, plus one \0 */
- keyBuf = keyBufPtr = PyMem_RawMalloc(sizeof(keyPrefix) +
- sizeof(WCHAR)*(versionLen-1) +
- sizeof(keySuffix));
+ keyBufLen = sizeof(keyPrefix) +
+ sizeof(WCHAR)*(versionLen-1) +
+ sizeof(keySuffix);
+ keyBuf = keyBufPtr = PyMem_RawMalloc(keyBufLen);
if (keyBuf==NULL) goto done;
- memcpy(keyBufPtr, keyPrefix, sizeof(keyPrefix)-sizeof(WCHAR));
+ memcpy_s(keyBufPtr, keyBufLen, keyPrefix, sizeof(keyPrefix)-sizeof(WCHAR));
keyBufPtr += Py_ARRAY_LENGTH(keyPrefix) - 1;
mbstowcs(keyBufPtr, PyWin_DLLVersionString, versionLen);
keyBufPtr += versionLen;
@@ -311,7 +321,6 @@ getpythonregpath(HKEY keyBase, int skipcore)
dataBuf = PyMem_RawMalloc((dataSize+1) * sizeof(WCHAR));
if (dataBuf) {
WCHAR *szCur = dataBuf;
- DWORD reqdSize = dataSize;
/* Copy our collected strings */
for (index=0;index<numKeys;index++) {
if (index > 0) {
@@ -339,6 +348,10 @@ getpythonregpath(HKEY keyBase, int skipcore)
*/
rc = RegQueryValueExW(newKey, NULL, 0, NULL,
(LPBYTE)szCur, &dataSize);
+ if (rc != ERROR_SUCCESS) {
+ PyMem_RawFree(dataBuf);
+ goto done;
+ }
}
/* And set the result - caller must free */
retval = dataBuf;
@@ -451,11 +464,12 @@ find_env_config_value(FILE * env_file, const wchar_t * key, wchar_t * value)
tmpbuffer, MAXPATHLEN * 2);
Py_DECREF(decoded);
if (k >= 0) {
- wchar_t * tok = wcstok(tmpbuffer, L" \t\r\n");
+ wchar_t * context = NULL;
+ wchar_t * tok = wcstok_s(tmpbuffer, L" \t\r\n", &context);
if ((tok != NULL) && !wcscmp(tok, key)) {
- tok = wcstok(NULL, L" \t");
+ tok = wcstok_s(NULL, L" \t", &context);
if ((tok != NULL) && !wcscmp(tok, L"=")) {
- tok = wcstok(NULL, L"\r\n");
+ tok = wcstok_s(NULL, L"\r\n", &context);
if (tok != NULL) {
wcsncpy(value, tok, MAXPATHLEN);
result = 1;
@@ -483,7 +497,7 @@ calculate_path(void)
wchar_t *machinepath = NULL;
wchar_t *userpath = NULL;
wchar_t zip_path[MAXPATHLEN+1];
- size_t len;
+ int applocal = 0;
if (!Py_IgnoreEnvironmentFlag) {
envpath = _wgetenv(L"PYTHONPATH");
@@ -501,7 +515,7 @@ calculate_path(void)
get_progpath();
/* progpath guaranteed \0 terminated in MAXPATH+1 bytes. */
- wcscpy(argv0_path, progpath);
+ wcscpy_s(argv0_path, MAXPATHLEN+1, progpath);
reduce(argv0_path);
/* Search for an environment configuration file, first in the
@@ -510,27 +524,39 @@ calculate_path(void)
*/
{
+ wchar_t envbuffer[MAXPATHLEN+1];
wchar_t tmpbuffer[MAXPATHLEN+1];
- wchar_t *env_cfg = L"pyvenv.cfg";
+ const wchar_t *env_cfg = L"pyvenv.cfg";
FILE * env_file = NULL;
- wcscpy(tmpbuffer, argv0_path);
- join(tmpbuffer, env_cfg);
- env_file = _Py_wfopen(tmpbuffer, L"r");
+ wcscpy_s(envbuffer, MAXPATHLEN+1, argv0_path);
+ join(envbuffer, env_cfg);
+ env_file = _Py_wfopen(envbuffer, L"r");
if (env_file == NULL) {
errno = 0;
- reduce(tmpbuffer);
- reduce(tmpbuffer);
- join(tmpbuffer, env_cfg);
- env_file = _Py_wfopen(tmpbuffer, L"r");
+ reduce(envbuffer);
+ reduce(envbuffer);
+ join(envbuffer, env_cfg);
+ env_file = _Py_wfopen(envbuffer, L"r");
if (env_file == NULL) {
errno = 0;
}
}
if (env_file != NULL) {
+ /* Look for an 'applocal' variable and, if true, ignore all registry
+ * keys and environment variables, but retain the default paths
+ * (DLLs, Lib) and the zip file. Setting pythonhome here suppresses
+ * the search for LANDMARK below and overrides %PYTHONHOME%.
+ */
+ if (find_env_config_value(env_file, L"applocal", tmpbuffer) &&
+ (applocal = (wcsicmp(tmpbuffer, L"true") == 0))) {
+ envpath = NULL;
+ pythonhome = argv0_path;
+ }
+
/* Look for a 'home' variable and set argv0_path to it, if found */
if (find_env_config_value(env_file, L"home", tmpbuffer)) {
- wcscpy(argv0_path, tmpbuffer);
+ wcscpy_s(argv0_path, MAXPATHLEN+1, tmpbuffer);
}
fclose(env_file);
env_file = NULL;
@@ -544,33 +570,30 @@ calculate_path(void)
pythonhome = NULL;
}
else
- wcsncpy(prefix, pythonhome, MAXPATHLEN);
+ wcscpy_s(prefix, MAXPATHLEN+1, pythonhome);
if (envpath && *envpath == '\0')
envpath = NULL;
#ifdef MS_WINDOWS
- /* Calculate zip archive path */
- if (dllpath[0]) /* use name of python DLL */
- wcsncpy(zip_path, dllpath, MAXPATHLEN);
- else /* use name of executable program */
- wcsncpy(zip_path, progpath, MAXPATHLEN);
- zip_path[MAXPATHLEN] = '\0';
- len = wcslen(zip_path);
- if (len > 4) {
- zip_path[len-3] = 'z'; /* change ending to "zip" */
- zip_path[len-2] = 'i';
- zip_path[len-1] = 'p';
- }
+ /* Calculate zip archive path from DLL or exe path */
+ if (wcscpy_s(zip_path, MAXPATHLEN+1, dllpath[0] ? dllpath : progpath))
+ /* exceeded buffer length - ignore zip_path */
+ zip_path[0] = '\0';
else {
- zip_path[0] = 0;
+ wchar_t *dot = wcsrchr(zip_path, '.');
+ if (!dot || wcscpy_s(dot, MAXPATHLEN+1 - (dot - zip_path), L".zip"))
+ /* exceeded buffer length - ignore zip_path */
+ zip_path[0] = L'\0';
}
skiphome = pythonhome==NULL ? 0 : 1;
#ifdef Py_ENABLE_SHARED
- machinepath = getpythonregpath(HKEY_LOCAL_MACHINE, skiphome);
- userpath = getpythonregpath(HKEY_CURRENT_USER, skiphome);
+ if (!applocal) {
+ machinepath = getpythonregpath(HKEY_LOCAL_MACHINE, skiphome);
+ userpath = getpythonregpath(HKEY_CURRENT_USER, skiphome);
+ }
#endif
/* We only use the default relative PYTHONPATH if we havent
anything better to use! */
@@ -589,6 +612,7 @@ calculate_path(void)
Extra rules:
- If PYTHONHOME is set (in any way) item (3) is ignored.
- If registry values are used, (4) and (5) are ignored.
+ - If applocal is set, (1), (3), and registry values are ignored
*/
/* Calculate size of return buffer */
@@ -606,9 +630,9 @@ calculate_path(void)
bufsz += wcslen(PYTHONPATH) + 1;
bufsz += wcslen(argv0_path) + 1;
#ifdef MS_WINDOWS
- if (userpath)
+ if (!applocal && userpath)
bufsz += wcslen(userpath) + 1;
- if (machinepath)
+ if (!applocal && machinepath)
bufsz += wcslen(machinepath) + 1;
bufsz += wcslen(zip_path) + 1;
#endif
@@ -635,38 +659,45 @@ calculate_path(void)
}
if (envpath) {
- wcscpy(buf, envpath);
+ if (wcscpy_s(buf, bufsz - (buf - module_search_path), envpath))
+ Py_FatalError("buffer overflow in getpathp.c's calculate_path()");
buf = wcschr(buf, L'\0');
*buf++ = DELIM;
}
#ifdef MS_WINDOWS
if (zip_path[0]) {
- wcscpy(buf, zip_path);
+ if (wcscpy_s(buf, bufsz - (buf - module_search_path), zip_path))
+ Py_FatalError("buffer overflow in getpathp.c's calculate_path()");
buf = wcschr(buf, L'\0');
*buf++ = DELIM;
}
if (userpath) {
- wcscpy(buf, userpath);
+ if (wcscpy_s(buf, bufsz - (buf - module_search_path), userpath))
+ Py_FatalError("buffer overflow in getpathp.c's calculate_path()");
buf = wcschr(buf, L'\0');
*buf++ = DELIM;
PyMem_RawFree(userpath);
}
if (machinepath) {
- wcscpy(buf, machinepath);
+ if (wcscpy_s(buf, bufsz - (buf - module_search_path), machinepath))
+ Py_FatalError("buffer overflow in getpathp.c's calculate_path()");
buf = wcschr(buf, L'\0');
*buf++ = DELIM;
PyMem_RawFree(machinepath);
}
if (pythonhome == NULL) {
if (!skipdefault) {
- wcscpy(buf, PYTHONPATH);
+ if (wcscpy_s(buf, bufsz - (buf - module_search_path), PYTHONPATH))
+ Py_FatalError("buffer overflow in getpathp.c's calculate_path()");
buf = wcschr(buf, L'\0');
+ *buf++ = DELIM;
}
}
#else
if (pythonhome == NULL) {
wcscpy(buf, PYTHONPATH);
buf = wcschr(buf, L'\0');
+ *buf++ = DELIM;
}
#endif /* MS_WINDOWS */
else {
@@ -680,25 +711,26 @@ calculate_path(void)
else
n = q-p;
if (p[0] == '.' && is_sep(p[1])) {
- wcscpy(buf, pythonhome);
+ if (wcscpy_s(buf, bufsz - (buf - module_search_path), pythonhome))
+ Py_FatalError("buffer overflow in getpathp.c's calculate_path()");
buf = wcschr(buf, L'\0');
p++;
n--;
}
wcsncpy(buf, p, n);
buf += n;
+ *buf++ = DELIM;
if (q == NULL)
break;
- *buf++ = DELIM;
p = q+1;
}
}
if (argv0_path) {
- *buf++ = DELIM;
wcscpy(buf, argv0_path);
buf = wcschr(buf, L'\0');
+ *buf++ = DELIM;
}
- *buf = L'\0';
+ *(buf - 1) = L'\0';
/* Now to pull one last hack/trick. If sys.prefix is
empty, then try and find it somewhere on the paths
we calculated. We scan backwards, as our general policy
diff --git a/PC/icons/baselogo.svg b/PC/icons/baselogo.svg
deleted file mode 100644
index fff6b170d7..0000000000
--- a/PC/icons/baselogo.svg
+++ /dev/null
@@ -1,609 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<svg version="1.0" width="744.09448" height="1052.3622" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
- <defs>
- <linearGradient id="pyYellowGradient">
- <stop offset="0" style="stop-color:#ffc130;stop-opacity:1"/>
- <stop offset="1" style="stop-color:#ffea5b;stop-opacity:1"/>
- </linearGradient>
- <linearGradient id="pyBlueGradient">
- <stop style="stop-color:#426684;stop-opacity:1" offset="0"/>
- <stop style="stop-color:#357cb5;stop-opacity:1" offset="1"/>
- </linearGradient>
- <linearGradient id="pyYellow" xlink:href="#pyYellowGradient" x1="1108.9739" y1="3365.6448" x2="949.80927" y2="3144.1941" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.317715,0,0,0.317715,-172.579,-583.027)"/>
- <linearGradient id="pyBlue" xlink:href="#pyBlueGradient" x1="607.27795" y1="1841.619" x2="472.67371" y2="1660.6002" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.317715,0,0,0.317715,-71.39343,-151.2348)"/>
- </defs>
-
- <g
- id="layer1">
- <path
- d="M 88.126188,110.89374 C 88.126188,99.932569 97.021954,91.036422 107.98312,91.023301 L 147.69781,91.023301 C 158.65898,91.036435 167.55475,99.932569 167.55475,110.88023 L 167.55475,148.11929 C 167.55475,159.08046 158.65898,167.97661 147.69781,167.97661 L 107.98312,167.97661 C 94.281853,167.97661 83.161955,179.0965 83.161955,192.79777 L 83.161955,210.17955 L 68.268873,210.16643 C 57.307706,210.17955 48.411559,201.27028 48.411559,190.30911 L 48.411559,150.59472 C 48.411559,139.64668 57.307706,130.73741 68.268873,130.73741 L 127.84044,130.75054 L 127.84044,125.78631 L 88.126061,125.78631 L 88.126061,110.89361 L 88.126188,110.89374 z M 105.49443,100.96489 C 109.61173,100.96489 112.94774,104.3009 112.94774,108.40504 C 112.94774,112.52196 109.61173,115.85797 105.49443,115.85797 C 101.39066,115.85797 98.041501,112.52196 98.041501,108.40504 C 98.041501,104.3009 101.39063,100.96489 105.49443,100.96489 z "
- style="fill:#426684;fill-rule:evenodd"
- id="path6" />
- <g
- transform="matrix(0.317715,0,0,0.317715,-71.39343,-151.2348)"
- style="fill-rule:evenodd"
- id="_19410248">
- <g
- id="g9">
- <path
- d="M 1102.42,902.293 C 1160.3365,901.33394 1186.6279,955.8347 1187.0861,1017.668 C 1187.0861,1072.1676 1159.8369,1123.293 1101.4196,1125.21 C 1077.5861,1125.21 1057.1283,1117.9179 1037.17,1105.7513 L 1037.17,1231.8353 L 1002.1279,1219.168 L 1002.6287,939.293 C 1002.1279,939.293 1029.8779,902.7934 1101.9204,901.793 L 1102.42,902.29379 L 1102.42,902.293 z M 1093.6279,1099.917 C 1140.3783,1097.0009 1146.2118,1051.2509 1146.2118,1015.2095 C 1146.2118,980.1674 1140.3783,927.5835 1096.087,925.6678 C 1065.9205,923.70953 1041.5449,937.8343 1036.7118,942.7087 L 1036.7118,1081.4177 C 1048.3787,1088.7098 1071.7527,1101.376 1093.6279,1099.9173 L 1093.6279,1099.917 z "
- style="fill:#6a6a6a"
- id="_19410568" />
-
- <path
- d="M 1261,1051.25 L 1261,901.791 L 1224.9587,913.9587 L 1224.9587,1061.9577 C 1224.9587,1101.3746 1261.4996,1124.249 1293.6244,1124.249 C 1335.4579,1124.249 1359.3327,1112.5833 1370.0405,1107.7077 C 1370.4988,1113.0416 1370.0405,1111.5829 1370.0405,1116.9581 C 1370.0405,1132.5416 1369.5409,1159.2912 1362.2488,1172.9164 C 1347.6244,1200.6664 1308.7071,1204.5416 1281.4579,1208.4581 L 1287.2902,1230.8329 C 1323.2902,1229.875 1373.9158,1216.2498 1391.9162,1182.1668 C 1402.1658,1162.7081 1403.6245,1125.2081 1403.6245,1100.4168 L 1403.6245,907.16579 L 1368.0828,907.16579 L 1368.0828,1080.9168 C 1356.4159,1088.7085 1335.0001,1099.4164 1315.9997,1099.916 C 1284.3745,1100.4168 1261.0005,1083.3747 1261.0005,1050.7491 L 1261.0005,1051.2499 L 1261,1051.25 z "
- style="fill:#6a6a6a"
- id="_19412384" />
-
- <path
- d="M 1463.29,930.043 L 1463.29,1069.751 C 1463.29,1106.2506 1491.5396,1127.6675 1538.7483,1123.2927 L 1538.7483,1104.7931 C 1513.9144,1103.7927 1498.8318,1097.0014 1498.8318,1068.7506 L 1498.8318,930.0436 L 1538.7483,930.0436 L 1538.7483,907.168 L 1498.8318,907.168 L 1498.8318,835.1267 L 1463.2901,847.7928 L 1463.2901,907.168 L 1438.957,907.168 L 1438.957,930.0436 L 1463.2901,930.0436 L 1463.29,930.043 z "
- style="fill:#6a6a6a"
- id="_19413104" />
-
- <path
- d="M 1754.5,1120.33 L 1754.5,971.914 C 1754.5,934.9136 1729.1665,905.7061 1691.2083,905.7061 C 1662.5004,905.7061 1638.1674,914.95531 1616.7504,930.4974 L 1616.7504,781.0804 L 1581.2087,792.2879 L 1581.2087,1120.3299 L 1616.7504,1120.3299 L 1616.7504,955.8309 C 1634.7504,943.1636 1655.2083,930.0392 1677.5831,930.0392 C 1706.2922,930.0392 1718.4587,958.2475 1718.4587,983.0801 L 1718.4587,1120.3301 L 1754.5,1120.3301 L 1754.5,1120.33 z "
- style="fill:#6a6a6a"
- id="_19415136" />
-
- <path
- d="M 1786.29,1009.88 C 1786.29,1068.7544 1817.4569,1124.254 1883.1652,1124.755 C 1949.3731,1124.2542 1981.4991,1068.7542 1981.4991,1009.88 C 1980.9983,952.4217 1944.9983,902.297 1883.6648,901.796 C 1822.8321,902.29679 1786.29,952.4216 1786.29,1009.88 L 1786.29,1009.88 z M 1824.7491,1009.88 C 1824.7491,971.4221 1834.4979,929.0879 1883.1652,926.1304 C 1928.9152,928.58827 1942.5404,971.4221 1942.5404,1009.88 C 1942.5404,1050.7544 1933.7896,1101.38 1884.1231,1102.8387 C 1838.3731,1102.3379 1825.2487,1050.7544 1825.2487,1009.88 L 1824.7491,1009.88 L 1824.7491,1009.88 z "
- style="fill:#6a6a6a"
- id="_19416104" />
-
- <path
- d="M 2184.04,1120.33 L 2184.04,957.288 C 2184.04,928.5801 2161.1644,910.0805 2135.3727,904.2471 C 2110.0392,898.41364 2086.207,903.24671 2068.7066,908.1223 C 2046.2893,913.95576 2030.2475,924.2054 2012.2062,937.3298 L 2012.2062,1120.3298 L 2047.7479,1120.3298 L 2047.7479,941.7058 C 2058.9566,933.91407 2076.9566,925.6641 2095.957,925.1633 C 2127.0814,924.66369 2148.4983,942.705 2148.4983,975.2881 L 2148.4983,1120.3301 L 2184.04,1120.3301 L 2184.04,1120.33 z "
- style="fill:#6a6a6a"
- id="_19416592" />
-
- </g>
-
- </g>
- <path
- d="M 167.55462,230.0232 C 167.55462,240.98437 158.65885,249.88051 147.69769,249.89364 L 107.98299,249.89364 C 97.021827,249.88051 88.126061,240.98437 88.126061,230.0367 L 88.126061,192.79765 C 88.126061,181.83648 97.021827,172.94071 107.98299,172.94071 L 147.69769,172.94071 C 161.39896,172.94071 172.51923,161.82043 172.51923,148.11916 L 172.51923,130.73739 L 187.41193,130.75052 C 198.3731,130.73739 207.26925,139.64667 207.26925,150.60784 L 207.26925,190.3222 C 207.26925,201.27025 198.3731,210.17952 187.41193,210.17952 L 127.84037,210.16639 L 127.84037,215.13063 L 167.55475,215.13063 L 167.55475,230.02333 L 167.55462,230.0232 z M 150.17323,239.95205 C 146.06946,239.95205 142.73345,236.61604 142.73345,232.51227 C 142.73345,228.39497 146.06946,225.05897 150.17323,225.05897 C 154.29015,225.05897 157.62615,228.39497 157.62615,232.51227 C 157.62615,236.61604 154.29015,239.95205 150.17323,239.95205 z "
- style="fill:#d3aa3f;fill-rule:evenodd"
- id="path17" />
- <g
- transform="matrix(0.317715,0,0,0.317715,-71.39343,-151.2348)"
- style="fill-rule:evenodd"
- id="g1699">
- <polygon
- points="335.222,626.069 334.291,620.493 334.291,615.508 338.458,615.508 338.458,620.493 337.486,626.069 335.222,626.069 "
- style="fill:#000000;fill-rule:nonzero"
- id="_19419944" />
- <path
- d="M 341.798,634.527 C 341.798,630.52779 342.90942,627.56204 345.13816,625.6392 C 346.99249,624.04117 349.25666,623.23566 351.9295,623.23566 C 354.90233,623.23566 357.33186,624.20889 359.21454,626.16007 C 361.10312,628.10416 362.04092,630.79117 362.04092,634.22227 C 362.04092,637.00613 361.62399,639.19471 360.79013,640.78447 C 359.95745,642.38132 358.7421,643.61793 357.15233,644.49904 C 355.5543,645.38132 353.81808,645.81951 351.9295,645.81951 C 348.90942,645.81951 346.46454,644.85337 344.59604,642.90927 C 342.72872,640.97226 341.79801,638.18014 341.79801,634.52699 L 341.798,634.527 z M 345.56217,634.527 C 345.56217,637.29787 346.16571,639.36834 347.37398,640.74314 C 348.58225,642.12503 350.10351,642.81243 351.92949,642.81243 C 353.74957,642.81243 355.26256,642.11794 356.47083,640.73605 C 357.67319,639.35416 358.27674,637.24235 358.27674,634.41007 C 358.27674,631.73605 357.6732,629.7081 356.45784,628.3333 C 355.24249,626.9585 353.7354,626.2711 351.92949,626.2711 C 350.10351,626.2711 348.58225,626.9585 347.37398,628.32622 C 346.16571,629.69394 345.56217,631.76323 345.56217,634.52701 L 345.56217,634.527 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path21" />
- <path
- d="M 366.298,645.333 L 366.298,623.7295 L 369.58973,623.7295 L 369.58973,626.99997 C 370.42949,625.4728 371.20784,624.45824 371.92241,623.9728 C 372.63107,623.48619 373.41532,623.23579 374.27044,623.23579 C 375.50587,623.23579 376.75666,623.63264 378.03343,624.41689 L 376.76965,627.81965 C 375.88146,627.28461 374.985,627.02123 374.08973,627.02123 C 373.28422,627.02123 372.56847,627.26453 371.92949,627.74288 C 371.29051,628.2295 370.83933,628.89564 370.56886,629.74957 C 370.15902,631.04878 369.95823,632.47201 369.95823,634.02044 L 369.95823,645.33304 L 366.29799,645.33304 L 366.298,645.333 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path23" />
- <path
- d="M 380.228,619.722 L 380.228,615.50783 L 383.89414,615.50783 L 383.89414,619.722 L 380.228,619.722 z M 380.228,645.333 L 380.228,623.7295 L 383.89414,623.7295 L 383.89414,645.333 L 380.228,645.333 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path25" />
- <path
- d="M 388.796,647.125 L 392.3582,647.65295 C 392.50466,648.75019 392.92041,649.54862 393.59481,650.05531 C 394.50426,650.72854 395.74678,651.0687 397.31646,651.0687 C 399.01843,651.0687 400.32355,650.72855 401.24717,650.05531 C 402.17079,649.375 402.78851,648.42303 403.11449,647.20767 C 403.30937,646.45767 403.39323,644.89625 403.37906,642.50688 C 401.78221,644.38838 399.78851,645.33326 397.40032,645.33326 C 394.42749,645.33326 392.12906,644.26436 390.50386,642.1183 C 388.87984,639.97932 388.06016,637.40334 388.06016,634.41043 C 388.06016,632.34704 388.43457,630.44429 389.17748,628.70216 C 389.92748,626.95885 391.01173,625.61122 392.42787,624.66043 C 393.84401,623.71555 395.51055,623.23602 397.42039,623.23602 C 399.96921,623.23602 402.07393,624.27067 403.7263,626.33405 L 403.7263,623.72972 L 407.1078,623.72972 L 407.1078,642.40292 C 407.1078,645.76434 406.76055,648.15253 406.08024,649.55568 C 405.39283,650.95765 404.30977,652.06907 402.82394,652.88166 C 401.33693,653.69426 399.51095,654.1041 397.33772,654.1041 C 394.76055,654.1041 392.67827,653.52064 391.09441,652.36079 C 389.50465,651.20095 388.74047,649.45764 388.79598,647.12496 L 388.796,647.125 z M 391.82317,634.1459 C 391.82317,636.97936 392.38656,639.04866 393.51805,640.34787 C 394.64364,641.65299 396.0527,642.29905 397.74758,642.29905 C 399.42711,642.29905 400.83734,641.65299 401.97593,640.36086 C 403.11451,639.06283 403.68499,637.03488 403.68499,634.26401 C 403.68499,631.61834 403.10153,629.62582 401.92751,628.28527 C 400.75349,626.94472 399.33735,626.27149 397.68499,626.27149 C 396.05979,626.27149 394.6779,626.93054 393.53223,628.25692 C 392.39365,629.57621 391.82317,631.54157 391.82317,634.1459 L 391.82317,634.1459 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path27" />
- <path
- d="M 412.657,619.722 L 412.657,615.50783 L 416.32314,615.50783 L 416.32314,619.722 L 412.657,619.722 z M 412.657,645.333 L 412.657,623.7295 L 416.32314,623.7295 L 416.32314,645.333 L 412.657,645.333 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path29" />
- <path
- d="M 421.899,645.333 L 421.899,623.7295 L 425.19073,623.7295 L 425.19073,626.79919 C 426.78167,624.42399 429.07301,623.2358 432.06593,623.2358 C 433.37105,623.2358 434.56514,623.47202 435.65648,623.93737 C 436.75372,624.40982 437.56514,625.02045 438.10727,625.78462 C 438.65648,626.5417 439.03089,627.44407 439.25294,628.4858 C 439.38522,629.16729 439.45491,630.3543 439.45491,632.04919 L 439.45491,645.33309 L 435.78759,645.33309 L 435.78759,632.18739 C 435.78759,630.70156 435.6494,629.58306 435.36475,628.84015 C 435.08011,628.10432 434.57223,627.51377 433.85058,627.07676 C 433.12184,626.63266 432.27381,626.40943 431.29467,626.40943 C 429.73207,626.40943 428.3927,626.91022 427.25294,627.89644 C 426.12144,628.88857 425.55924,630.76416 425.55924,633.53502 L 425.55924,645.33302 L 421.899,645.33302 L 421.899,645.333 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path31" />
- <path
- d="M 459.17,642.666 C 457.80819,643.81876 456.50307,644.63135 455.25346,645.11088 C 453.99559,645.58332 452.64913,645.81954 451.21173,645.81954 C 448.83653,645.81954 447.01764,645.24316 445.73968,644.08332 C 444.46881,642.92348 443.82984,641.43765 443.82984,639.63883 C 443.82984,638.57584 444.06606,637.61088 444.55149,636.73568 C 445.03102,635.86048 445.66291,635.16009 446.44125,634.63214 C 447.22551,634.10419 448.1007,633.70143 449.07983,633.43096 C 449.7944,633.24317 450.87865,633.05537 452.32904,632.88175 C 455.2877,632.52742 457.46802,632.11049 458.86408,631.61797 C 458.87826,631.11836 458.88534,630.79828 458.88534,630.666 C 458.88534,629.17309 458.5381,628.11836 457.84361,627.51364 C 456.9129,626.68096 455.51684,626.27112 453.67668,626.27112 C 451.95463,626.27112 450.68377,626.56994 449.85699,627.17348 C 449.03731,627.77821 448.43376,628.8471 448.03809,630.38135 L 444.46171,629.88883 C 444.7877,628.36166 445.32274,627.11796 446.06565,626.18017 C 446.80857,625.23647 447.89163,624.50655 449.30187,623.99986 C 450.71093,623.49317 452.34321,623.23569 454.20463,623.23569 C 456.05187,623.23569 457.54479,623.45892 458.69754,623.88884 C 459.8503,624.32703 460.69715,624.86797 461.24636,625.52821 C 461.78731,626.18726 462.1629,627.01404 462.38494,628.02034 C 462.50305,628.64632 462.56565,629.77073 462.56565,631.39593 L 462.56565,636.27743 C 462.56565,639.68727 462.64124,641.84042 462.80187,642.7357 C 462.95423,643.63806 463.26723,644.50617 463.72549,645.33294 L 459.89872,645.33294 C 459.52432,644.57585 459.27392,643.68766 459.16998,642.66601 L 459.17,642.666 z M 458.86409,634.48569 C 457.53063,635.0349 455.53811,635.49317 452.88535,635.87467 C 451.37826,636.08963 450.30818,636.33294 449.69047,636.60341 C 449.06567,636.87506 448.57905,637.27073 448.24598,637.79869 C 447.90583,638.31956 447.7322,638.89593 447.7322,639.53491 C 447.7322,640.51404 448.1078,641.32664 448.84362,641.97861 C 449.57945,642.62467 450.66252,642.95066 452.08693,642.95066 C 453.49599,642.95066 454.75268,642.64593 455.84992,642.02704 C 456.94716,641.40932 457.75976,640.56247 458.27354,639.49239 C 458.66921,638.66679 458.8641,637.44435 458.8641,635.83333 L 458.8641,634.48569 L 458.86409,634.48569 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path33" />
- <polygon
- points="468.163,645.333 468.163,615.508 471.822,615.508 471.822,645.333 468.163,645.333 "
- style="fill:#000000;fill-rule:nonzero"
- id="polygon35" />
- <polygon
- points="477.516,626.069 476.585,620.493 476.585,615.508 480.752,615.508 480.752,620.493 479.78,626.069 477.516,626.069 "
- style="fill:#000000;fill-rule:nonzero"
- id="polygon37" />
- <polygon
- points="496.954,645.333 496.954,615.508 500.613,615.508 500.613,645.333 496.954,645.333 "
- style="fill:#000000;fill-rule:nonzero"
- id="polygon39" />
- <path
- d="M 504.925,634.527 C 504.925,630.52779 506.03642,627.56204 508.26516,625.6392 C 510.11949,624.04117 512.38366,623.23566 515.0565,623.23566 C 518.02933,623.23566 520.45886,624.20889 522.34154,626.16007 C 524.23012,628.10416 525.16792,630.79117 525.16792,634.22227 C 525.16792,637.00613 524.75099,639.19471 523.91713,640.78447 C 523.08445,642.38132 521.8691,643.61793 520.27933,644.49904 C 518.6813,645.38132 516.94508,645.81951 515.0565,645.81951 C 512.03642,645.81951 509.59154,644.85337 507.72304,642.90927 C 505.85572,640.97226 504.92501,638.18014 504.92501,634.52699 L 504.925,634.527 z M 508.68917,634.527 C 508.68917,637.29787 509.29271,639.36834 510.50098,640.74314 C 511.70925,642.12503 513.23051,642.81243 515.05649,642.81243 C 516.87657,642.81243 518.38956,642.11794 519.59783,640.73605 C 520.80019,639.35416 521.40374,637.24235 521.40374,634.41007 C 521.40374,631.73605 520.8002,629.7081 519.58484,628.3333 C 518.36949,626.9585 516.8624,626.2711 515.05649,626.2711 C 513.23051,626.2711 511.70925,626.9585 510.50098,628.32622 C 509.29271,629.69394 508.68917,631.76323 508.68917,634.52701 L 508.68917,634.527 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path41" />
- <path
- d="M 528.793,647.125 L 532.3552,647.65295 C 532.50166,648.75019 532.9174,649.54862 533.59181,650.05531 C 534.50126,650.72854 535.74378,651.0687 537.31346,651.0687 C 539.01543,651.0687 540.32055,650.72855 541.24417,650.05531 C 542.16779,649.375 542.78551,648.42303 543.11149,647.20767 C 543.30637,646.45767 543.39023,644.89625 543.37606,642.50688 C 541.77921,644.38838 539.78551,645.33326 537.39732,645.33326 C 534.42449,645.33326 532.12606,644.26436 530.50086,642.1183 C 528.87684,639.97932 528.05716,637.40334 528.05716,634.41043 C 528.05716,632.34704 528.43157,630.44429 529.17448,628.70216 C 529.92448,626.95885 531.00873,625.61122 532.42487,624.66043 C 533.84101,623.71555 535.50755,623.23602 537.41739,623.23602 C 539.96621,623.23602 542.07093,624.27067 543.7233,626.33405 L 543.7233,623.72972 L 547.1048,623.72972 L 547.1048,642.40292 C 547.1048,645.76434 546.75755,648.15253 546.07724,649.55568 C 545.38983,650.95765 544.30677,652.06907 542.82094,652.88166 C 541.33393,653.69426 539.50795,654.1041 537.33472,654.1041 C 534.75755,654.1041 532.67527,653.52064 531.09141,652.36079 C 529.50165,651.20095 528.73747,649.45764 528.79298,647.12496 L 528.793,647.125 z M 531.82017,634.1459 C 531.82017,636.97936 532.38356,639.04866 533.51505,640.34787 C 534.64064,641.65299 536.0497,642.29905 537.74458,642.29905 C 539.42411,642.29905 540.83434,641.65299 541.97293,640.36086 C 543.11151,639.06283 543.68199,637.03488 543.68199,634.26401 C 543.68199,631.61834 543.09852,629.62582 541.92451,628.28527 C 540.75049,626.94472 539.33435,626.27149 537.68199,626.27149 C 536.05679,626.27149 534.6749,626.93054 533.52923,628.25692 C 532.39065,629.57621 531.82017,631.54157 531.82017,634.1459 L 531.82017,634.1459 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path43" />
- <path
- d="M 551.271,634.527 C 551.271,630.52779 552.38242,627.56204 554.61116,625.6392 C 556.46549,624.04117 558.72966,623.23566 561.4025,623.23566 C 564.37533,623.23566 566.80486,624.20889 568.68754,626.16007 C 570.57612,628.10416 571.51392,630.79117 571.51392,634.22227 C 571.51392,637.00613 571.09699,639.19471 570.26313,640.78447 C 569.43045,642.38132 568.2151,643.61793 566.62533,644.49904 C 565.0273,645.38132 563.29108,645.81951 561.4025,645.81951 C 558.38242,645.81951 555.93754,644.85337 554.06904,642.90927 C 552.20172,640.97226 551.27101,638.18014 551.27101,634.52699 L 551.271,634.527 z M 555.03517,634.527 C 555.03517,637.29787 555.63871,639.36834 556.84698,640.74314 C 558.05525,642.12503 559.57651,642.81243 561.40249,642.81243 C 563.22257,642.81243 564.73556,642.11794 565.94383,640.73605 C 567.14619,639.35416 567.74974,637.24235 567.74974,634.41007 C 567.74974,631.73605 567.1462,629.7081 565.93084,628.3333 C 564.71549,626.9585 563.2084,626.2711 561.40249,626.2711 C 559.57651,626.2711 558.05525,626.9585 556.84698,628.32622 C 555.63871,629.69394 555.03517,631.76323 555.03517,634.52701 L 555.03517,634.527 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path45" />
- <path
- d="M 588.256,645.333 L 588.256,626.5759 L 585.02687,626.5759 L 585.02687,623.72944 L 588.256,623.72944 L 588.256,621.43101 C 588.256,619.97944 588.38828,618.89636 588.64458,618.19479 C 588.99891,617.24282 589.61781,616.47274 590.506,615.88219 C 591.39537,615.29164 592.63789,614.99991 594.24183,614.99991 C 595.27057,614.99991 596.40915,615.11802 597.65876,615.36841 L 597.11073,618.56329 C 596.35364,618.42392 595.63081,618.35424 594.95049,618.35424 C 593.83907,618.35424 593.05482,618.59046 592.59655,619.06998 C 592.1312,619.54242 591.90206,620.43061 591.90206,621.73573 L 591.90206,623.72943 L 596.11033,623.72943 L 596.11033,626.57589 L 591.90206,626.57589 L 591.90206,645.33299 L 588.256,645.33299 L 588.256,645.333 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path47" />
- <path
- d="M 598.923,645.333 L 598.923,623.7295 L 602.21473,623.7295 L 602.21473,626.99997 C 603.05449,625.4728 603.83284,624.45824 604.54741,623.9728 C 605.25607,623.48619 606.04032,623.23579 606.89544,623.23579 C 608.13087,623.23579 609.38166,623.63264 610.65843,624.41689 L 609.39465,627.81965 C 608.50646,627.28461 607.61,627.02123 606.71473,627.02123 C 605.90922,627.02123 605.19347,627.26453 604.55449,627.74288 C 603.91551,628.2295 603.46433,628.89564 603.19386,629.74957 C 602.78402,631.04878 602.58323,632.47201 602.58323,634.02044 L 602.58323,645.33304 L 598.92299,645.33304 L 598.923,645.333 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path49" />
- <path
- d="M 611.471,634.527 C 611.471,630.52779 612.58242,627.56204 614.81116,625.6392 C 616.66549,624.04117 618.92966,623.23566 621.6025,623.23566 C 624.57533,623.23566 627.00486,624.20889 628.88754,626.16007 C 630.77612,628.10416 631.71392,630.79117 631.71392,634.22227 C 631.71392,637.00613 631.29699,639.19471 630.46313,640.78447 C 629.63045,642.38132 628.4151,643.61793 626.82533,644.49904 C 625.2273,645.38132 623.49108,645.81951 621.6025,645.81951 C 618.58242,645.81951 616.13754,644.85337 614.26904,642.90927 C 612.40172,640.97226 611.47101,638.18014 611.47101,634.52699 L 611.471,634.527 z M 615.23517,634.527 C 615.23517,637.29787 615.83871,639.36834 617.04698,640.74314 C 618.25525,642.12503 619.77651,642.81243 621.60249,642.81243 C 623.42257,642.81243 624.93556,642.11794 626.14383,640.73605 C 627.34619,639.35416 627.94974,637.24235 627.94974,634.41007 C 627.94974,631.73605 627.3462,629.7081 626.13084,628.3333 C 624.91549,626.9585 623.4084,626.2711 621.60249,626.2711 C 619.77651,626.2711 618.25525,626.9585 617.04698,628.32622 C 615.83871,629.69394 615.23517,631.76323 615.23517,634.52701 L 615.23517,634.527 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path51" />
- <path
- d="M 636.012,645.333 L 636.012,623.7295 L 639.28365,623.7295 L 639.28365,626.75667 C 639.96396,625.70195 640.86633,624.84683 641.99192,624.20903 C 643.11633,623.56297 644.40137,623.2358 645.83877,623.2358 C 647.43562,623.2358 648.74783,623.57005 649.76948,624.23619 C 650.79704,624.90351 651.51869,625.82595 651.93562,627.02123 C 653.65058,624.50076 655.87342,623.2358 658.60885,623.2358 C 660.75491,623.2358 662.40019,623.83344 663.55294,625.02045 C 664.7057,626.20864 665.28207,628.03462 665.28207,630.49958 L 665.28207,645.33308 L 661.64427,645.33308 L 661.64427,631.72208 C 661.64427,630.25751 661.52616,629.20161 661.28994,628.55554 C 661.04663,627.91657 660.61553,627.3957 659.99781,627.00003 C 659.37301,626.61145 658.63718,626.40948 657.79624,626.40948 C 656.27616,626.40948 655.01829,626.91735 654.01199,627.93074 C 653.0116,628.93822 652.5049,630.55515 652.5049,632.77798 L 652.5049,645.33308 L 648.84584,645.33308 L 648.84584,631.29918 C 648.84584,629.6669 648.54702,628.44446 647.94938,627.63186 C 647.35293,626.81926 646.37969,626.40942 645.01907,626.40942 C 643.99151,626.40942 643.03954,626.68107 642.16553,627.22911 C 641.29034,627.77123 640.65136,628.56257 640.26277,629.60431 C 639.86592,630.65313 639.67222,632.16022 639.67222,634.12439 L 639.67222,645.33309 L 636.01198,645.33309 L 636.012,645.333 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path53" />
- <path
- d="M 685.671,645.333 L 682.27533,645.333 L 682.27533,615.5078 L 685.93439,615.5078 L 685.93439,626.146 C 687.48282,624.20899 689.45526,623.23576 691.85053,623.23576 C 693.18399,623.23576 694.44187,623.50741 695.62888,624.04127 C 696.81589,624.57631 697.78794,625.3334 698.55919,626.29836 C 699.32336,627.27041 699.92691,628.43734 700.35801,629.81214 C 700.79502,631.18104 701.01116,632.6456 701.01116,634.20112 C 701.01116,637.90978 700.09344,640.77041 698.26037,642.79128 C 696.43439,644.81215 694.23281,645.81963 691.671,645.81963 C 689.12218,645.81963 687.12257,644.75664 685.671,642.62475 L 685.671,645.33302 L 685.671,645.333 z M 685.62848,634.3676 C 685.62848,636.95776 685.98281,638.82626 686.68439,639.97902 C 687.83715,641.8676 689.39974,642.81248 691.3651,642.81248 C 692.96904,642.81248 694.35093,642.11799 695.51786,640.72193 C 696.68479,639.33295 697.26707,637.26366 697.26707,634.50697 C 697.26707,631.68768 696.70487,629.60421 695.58754,628.26366 C 694.46904,626.92311 693.11549,626.24988 691.53163,626.24988 C 689.92769,626.24988 688.5458,626.94437 687.37887,628.33334 C 686.21194,629.72232 685.62848,631.7361 685.62848,634.36759 L 685.62848,634.3676 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path55" />
- <path
- d="M 720.254,638.375 L 724.03825,638.84035 C 723.44061,641.05492 722.33746,642.76988 720.72644,643.99232 C 719.10833,645.20767 717.04494,645.81949 714.53864,645.81949 C 711.37919,645.81949 708.87171,644.84627 707.02447,642.90217 C 705.17014,640.95808 704.24652,638.22855 704.24652,634.71477 C 704.24652,631.07579 705.18431,628.2565 707.05282,626.24981 C 708.92723,624.24312 711.35085,623.23564 714.33668,623.23564 C 717.22566,623.23564 719.58668,624.22186 721.41385,626.18721 C 723.24692,628.15256 724.16346,630.92343 724.16346,634.48564 C 724.16346,634.70769 724.15637,635.03486 724.1422,635.46478 L 708.032,635.46478 C 708.16428,637.83998 708.83751,639.65887 710.04578,640.91675 C 711.25405,642.18053 712.75405,642.81242 714.55995,642.81242 C 715.89932,642.81242 717.04499,642.45809 717.99696,641.74943 C 718.94775,641.04785 719.69775,639.92345 720.25405,638.37502 L 720.254,638.375 z M 708.2327,632.45177 L 720.2953,632.45177 C 720.13585,630.63878 719.6705,629.27106 718.91341,628.36752 C 717.74648,626.95846 716.23349,626.2498 714.37916,626.2498 C 712.69845,626.2498 711.28113,626.81201 710.13546,627.9376 C 708.98979,629.06201 708.3579,630.5691 708.2327,632.45177 L 708.2327,632.45177 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path57" />
- <path
- d="M 736.636,642.056 L 737.16277,645.29222 C 736.13521,645.50718 735.21159,645.6182 734.39899,645.6182 C 733.06671,645.6182 732.03797,645.41033 731.30214,644.98631 C 730.5734,644.56939 730.05962,644.01427 729.7608,643.32686 C 729.46198,642.64655 729.30962,641.20206 729.30962,639.00757 L 729.30962,626.57647 L 726.62143,626.57647 L 726.62143,623.73001 L 729.30962,623.73001 L 729.30962,618.37607 L 732.9545,616.18158 L 732.9545,623.73001 L 736.636,623.73001 L 736.636,626.57647 L 732.9545,626.57647 L 732.9545,639.20837 C 732.9545,640.25719 733.0171,640.92451 733.1423,641.22215 C 733.27458,641.52097 733.48245,641.75719 733.77419,641.9379 C 734.06592,642.11152 734.48285,642.20129 735.02498,642.20129 C 735.43364,642.20129 735.96868,642.15286 736.636,642.05601 L 736.636,642.056 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path59" />
- <path
- d="M 754.316,642.666 C 752.95419,643.81876 751.64907,644.63135 750.39946,645.11088 C 749.14159,645.58332 747.79513,645.81954 746.35773,645.81954 C 743.98253,645.81954 742.16364,645.24316 740.88568,644.08332 C 739.61481,642.92348 738.97584,641.43765 738.97584,639.63883 C 738.97584,638.57584 739.21206,637.61088 739.69749,636.73568 C 740.17702,635.86048 740.80891,635.16009 741.58725,634.63214 C 742.37151,634.10419 743.2467,633.70143 744.22583,633.43096 C 744.9404,633.24317 746.02465,633.05537 747.47504,632.88175 C 750.4337,632.52742 752.61402,632.11049 754.01008,631.61797 C 754.02426,631.11836 754.03134,630.79828 754.03134,630.666 C 754.03134,629.17309 753.6841,628.11836 752.98961,627.51364 C 752.0589,626.68096 750.66284,626.27112 748.82268,626.27112 C 747.10063,626.27112 745.82977,626.56994 745.00299,627.17348 C 744.18331,627.77821 743.57976,628.8471 743.18409,630.38135 L 739.60771,629.88883 C 739.9337,628.36166 740.46874,627.11796 741.21165,626.18017 C 741.95457,625.23647 743.03763,624.50655 744.44787,623.99986 C 745.85693,623.49317 747.48921,623.23569 749.35063,623.23569 C 751.19787,623.23569 752.69079,623.45892 753.84354,623.88884 C 754.9963,624.32703 755.84315,624.86797 756.39236,625.52821 C 756.93331,626.18726 757.3089,627.01404 757.53094,628.02034 C 757.64905,628.64632 757.71165,629.77073 757.71165,631.39593 L 757.71165,636.27743 C 757.71165,639.68727 757.78724,641.84042 757.94787,642.7357 C 758.10023,643.63806 758.41323,644.50617 758.87149,645.33294 L 755.04472,645.33294 C 754.67032,644.57585 754.41992,643.68766 754.31598,642.66601 L 754.316,642.666 z M 754.01009,634.48569 C 752.67663,635.0349 750.68411,635.49317 748.03135,635.87467 C 746.52426,636.08963 745.45418,636.33294 744.83647,636.60341 C 744.21167,636.87506 743.72505,637.27073 743.39198,637.79869 C 743.05183,638.31956 742.8782,638.89593 742.8782,639.53491 C 742.8782,640.51404 743.25379,641.32664 743.98962,641.97861 C 744.72545,642.62467 745.80852,642.95066 747.23293,642.95066 C 748.64199,642.95066 749.89868,642.64593 750.99592,642.02704 C 752.09316,641.40932 752.90576,640.56247 753.41954,639.49239 C 753.81521,638.66679 754.01009,637.44435 754.01009,635.83333 L 754.01009,634.48569 L 754.01009,634.48569 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path61" />
- <polygon
- points="764.426,645.333 764.426,641.159 768.6,641.159 768.6,645.333 764.426,645.333 "
- style="fill:#000000;fill-rule:nonzero"
- id="polygon63" />
- <path
- d="M 774.967,653.61 L 774.967,623.7293 L 778.30007,623.7293 L 778.30007,626.53442 C 779.0855,625.43718 779.97369,624.61159 780.967,624.06237 C 781.95322,623.51434 783.1544,623.2356 784.56464,623.2356 C 786.41188,623.2356 788.03708,623.71513 789.44614,624.66001 C 790.86228,625.61079 791.92527,626.95135 792.64102,628.68048 C 793.36267,630.40961 793.72409,632.30528 793.72409,634.36749 C 793.72409,636.57615 793.32842,638.56867 792.53,640.34032 C 791.73748,642.11079 790.58472,643.46434 789.07173,644.40922 C 787.55756,645.34701 785.96661,645.81946 784.30008,645.81946 C 783.07882,645.81946 781.98748,645.56198 781.01543,645.0482 C 780.04338,644.53442 779.25204,643.88127 778.62724,643.09702 L 778.62724,653.61002 L 774.967,653.61002 L 774.967,653.61 z M 778.27999,634.6521 C 778.27999,637.43005 778.84219,639.48517 779.96779,640.81864 C 781.0922,642.14502 782.45992,642.81234 784.05795,642.81234 C 785.68197,642.81234 787.07803,642.12494 788.23787,640.74305 C 789.39771,639.36825 789.98118,637.23636 789.98118,634.34738 C 789.98118,631.58951 789.41189,629.53439 788.27921,628.15958 C 787.14771,626.79186 785.79299,626.10446 784.22449,626.10446 C 782.66189,626.10446 781.28,626.8332 780.07882,628.29186 C 778.87646,629.74934 778.28,631.87532 778.28,634.6521 L 778.27999,634.6521 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path65" />
- <path
- d="M 797.974,653.653 L 797.56416,650.21481 C 798.36967,650.43095 799.06416,650.54198 799.6618,650.54198 C 800.47439,650.54198 801.12637,650.40261 801.61298,650.13213 C 802.1055,649.86048 802.50235,649.48607 802.81416,648.99237 C 803.05038,648.63214 803.41888,647.72268 803.93266,646.27111 C 804.00234,646.06206 804.11337,645.77033 804.25864,645.37465 L 796.06415,623.72975 L 800.00903,623.72975 L 804.50903,636.23645 C 805.08541,637.82621 805.61336,639.49275 806.07163,641.24315 C 806.49447,639.56244 806.99525,637.92425 807.57872,636.31912 L 812.19565,623.72973 L 815.85589,623.72973 L 807.64014,645.70173 C 806.75904,648.07574 806.07164,649.70803 805.58502,650.60448 C 804.93187,651.81275 804.18896,652.69385 803.34919,653.25724 C 802.50234,653.81945 801.50195,654.10409 800.33502,654.10409 C 799.62636,654.10409 798.84211,653.95055 797.974,653.65291 L 797.974,653.653 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path67" />
- <path
- d="M 826.967,642.056 L 827.49377,645.29222 C 826.46621,645.50718 825.54259,645.6182 824.72999,645.6182 C 823.39771,645.6182 822.36897,645.41033 821.63314,644.98631 C 820.9044,644.56939 820.39062,644.01427 820.0918,643.32686 C 819.79298,642.64655 819.64062,641.20206 819.64062,639.00757 L 819.64062,626.57647 L 816.95243,626.57647 L 816.95243,623.73001 L 819.64062,623.73001 L 819.64062,618.37607 L 823.2855,616.18158 L 823.2855,623.73001 L 826.967,623.73001 L 826.967,626.57647 L 823.2855,626.57647 L 823.2855,639.20837 C 823.2855,640.25719 823.3481,640.92451 823.4733,641.22215 C 823.60558,641.52097 823.81345,641.75719 824.10519,641.9379 C 824.39692,642.11152 824.81385,642.20129 825.35598,642.20129 C 825.76464,642.20129 826.29968,642.15286 826.967,642.05601 L 826.967,642.056 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path69" />
- <path
- d="M 830.549,645.333 L 830.549,615.5078 L 834.20924,615.5078 L 834.20924,626.2086 C 835.91711,624.22907 838.07735,623.23577 840.6805,623.23577 C 842.27853,623.23577 843.66751,623.55585 844.84743,624.18774 C 846.02853,624.81254 846.87538,625.68774 847.38208,626.79916 C 847.88877,627.9094 848.14625,629.52751 848.14625,631.63932 L 848.14625,645.33302 L 844.48011,645.33302 L 844.48011,631.63932 C 844.48011,629.81215 844.08326,628.47869 843.29192,627.64601 C 842.50058,626.81215 841.37499,626.38932 839.9246,626.38932 C 838.84035,626.38932 837.81988,626.67396 836.862,627.23617 C 835.90295,627.79837 835.22263,628.56255 834.81987,629.52751 C 834.41003,630.48656 834.20924,631.81885 834.20924,633.51373 L 834.20924,645.33303 L 830.549,645.33303 L 830.549,645.333 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path71" />
- <path
- d="M 852.354,634.527 C 852.354,630.52779 853.46542,627.56204 855.69416,625.6392 C 857.54849,624.04117 859.81266,623.23566 862.4855,623.23566 C 865.45833,623.23566 867.88786,624.20889 869.77054,626.16007 C 871.65912,628.10416 872.59692,630.79117 872.59692,634.22227 C 872.59692,637.00613 872.17999,639.19471 871.34613,640.78447 C 870.51345,642.38132 869.2981,643.61793 867.70833,644.49904 C 866.1103,645.38132 864.37408,645.81951 862.4855,645.81951 C 859.46542,645.81951 857.02054,644.85337 855.15204,642.90927 C 853.28472,640.97226 852.35401,638.18014 852.35401,634.52699 L 852.354,634.527 z M 856.11817,634.527 C 856.11817,637.29787 856.72171,639.36834 857.92998,640.74314 C 859.13825,642.12503 860.65951,642.81243 862.48549,642.81243 C 864.30557,642.81243 865.81856,642.11794 867.02683,640.73605 C 868.22919,639.35416 868.83274,637.24235 868.83274,634.41007 C 868.83274,631.73605 868.2292,629.7081 867.01384,628.3333 C 865.79849,626.9585 864.2914,626.2711 862.48549,626.2711 C 860.65951,626.2711 859.13825,626.9585 857.92998,628.32622 C 856.72171,629.69394 856.11817,631.76323 856.11817,634.52701 L 856.11817,634.527 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path73" />
- <path
- d="M 876.895,645.333 L 876.895,623.7295 L 880.18673,623.7295 L 880.18673,626.79919 C 881.77767,624.42399 884.06901,623.2358 887.06193,623.2358 C 888.36705,623.2358 889.56114,623.47202 890.65248,623.93737 C 891.74972,624.40982 892.56114,625.02045 893.10327,625.78462 C 893.65248,626.5417 894.02689,627.44407 894.24894,628.4858 C 894.38122,629.16729 894.45091,630.3543 894.45091,632.04919 L 894.45091,645.33309 L 890.78359,645.33309 L 890.78359,632.18739 C 890.78359,630.70156 890.6454,629.58306 890.36075,628.84015 C 890.07611,628.10432 889.56823,627.51377 888.84658,627.07676 C 888.11784,626.63266 887.26981,626.40943 886.29067,626.40943 C 884.72807,626.40943 883.3887,626.91022 882.24894,627.89644 C 881.11744,628.88857 880.55524,630.76416 880.55524,633.53502 L 880.55524,645.33302 L 876.895,645.33302 L 876.895,645.333 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path75" />
- </g>
- <g
- transform="matrix(0.317715,0,0,0.317715,-71.39343,-151.2348)"
- style="fill-rule:evenodd"
- id="_19428312">
- <path
- d="M 341.207,1443.54 L 332.98535,1421.9365 L 336.85346,1421.9365 L 341.49165,1434.8731 C 341.99244,1436.2692 342.4507,1437.7207 342.87354,1439.2278 C 343.2007,1438.0892 343.65189,1436.7203 344.23535,1435.1164 L 349.04007,1421.9365 L 352.80424,1421.9365 L 344.62393,1443.54 L 341.207,1443.54 L 341.207,1443.54 z "
- style="fill:#000000;fill-rule:nonzero"
- id="_19439224" />
-
- <path
- d="M 370.825,1436.58 L 374.60925,1437.0454 C 374.01161,1439.2599 372.90846,1440.9749 371.29744,1442.1973 C 369.67933,1443.4127 367.61594,1444.0245 365.10964,1444.0245 C 361.95019,1444.0245 359.44271,1443.0513 357.59547,1441.1072 C 355.74114,1439.1631 354.81752,1436.4336 354.81752,1432.9198 C 354.81752,1429.2808 355.75532,1426.4615 357.62382,1424.4548 C 359.49823,1422.4481 361.92185,1421.4406 364.90768,1421.4406 C 367.79666,1421.4406 370.15768,1422.4269 371.98485,1424.3922 C 373.81792,1426.3576 374.73446,1429.1284 374.73446,1432.6906 C 374.73446,1432.9127 374.72737,1433.2399 374.7132,1433.6698 L 358.603,1433.6698 C 358.73528,1436.045 359.40851,1437.8639 360.61678,1439.1217 C 361.82505,1440.3855 363.32505,1441.0174 365.13095,1441.0174 C 366.47032,1441.0174 367.61599,1440.6631 368.56796,1439.9544 C 369.51875,1439.2529 370.26875,1438.1284 370.82505,1436.58 L 370.825,1436.58 z M 358.8037,1430.6568 L 370.8663,1430.6568 C 370.70685,1428.8438 370.2415,1427.4761 369.48441,1426.5725 C 368.31748,1425.1635 366.80449,1424.4548 364.95016,1424.4548 C 363.26945,1424.4548 361.85213,1425.017 360.70646,1426.1426 C 359.56079,1427.267 358.9289,1428.7741 358.8037,1430.6568 L 358.8037,1430.6568 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path79" />
-
- <path
- d="M 379.172,1443.54 L 379.172,1421.9365 L 382.46373,1421.9365 L 382.46373,1425.207 C 383.30349,1423.6798 384.08184,1422.6652 384.79641,1422.1798 C 385.50507,1421.6932 386.28932,1421.4428 387.14444,1421.4428 C 388.37987,1421.4428 389.63066,1421.8396 390.90743,1422.6239 L 389.64365,1426.0267 C 388.75546,1425.4916 387.859,1425.2282 386.96373,1425.2282 C 386.15822,1425.2282 385.44247,1425.4715 384.80349,1425.9499 C 384.16451,1426.4365 383.71333,1427.1026 383.44286,1427.9566 C 383.03302,1429.2558 382.83223,1430.679 382.83223,1432.2274 L 382.83223,1443.54 L 379.17199,1443.54 L 379.172,1443.54 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path81" />
-
- <path
- d="M 391.623,1437.09 L 395.24072,1436.5207 C 395.44151,1437.9723 396.01198,1439.0825 396.94151,1439.8609 C 397.86513,1440.6309 399.16434,1441.0207 400.83797,1441.0207 C 402.51868,1441.0207 403.76828,1440.6735 404.58088,1439.9931 C 405.39348,1439.3057 405.80332,1438.4991 405.80332,1437.5825 C 405.80332,1436.7498 405.4419,1436.1038 404.71907,1435.6242 C 404.21946,1435.2983 402.96986,1434.8884 400.97616,1434.3888 C 398.29624,1433.7085 396.42773,1433.125 395.39309,1432.6242 C 394.35844,1432.1317 393.56711,1431.4443 393.03207,1430.5691 C 392.49821,1429.6939 392.22656,1428.729 392.22656,1427.6731 C 392.22656,1426.7081 392.4486,1425.8199 392.89388,1425.0002 C 393.33089,1424.1735 393.93561,1423.4931 394.69152,1422.951 C 395.26199,1422.5353 396.03916,1422.1739 397.01829,1421.8821 C 398.00451,1421.5904 399.06042,1421.4439 400.18483,1421.4439 C 401.87971,1421.4439 403.36554,1421.6943 404.65058,1422.1809 C 405.93444,1422.6664 406.87932,1423.3266 407.48995,1424.1593 C 408.10176,1425.0002 408.51869,1426.1105 408.74782,1427.5065 L 405.17144,1428.0002 C 405.00491,1426.8888 404.53247,1426.0207 403.75412,1425.3959 C 402.97696,1424.7711 401.87262,1424.4581 400.4494,1424.4581 C 398.76869,1424.4581 397.56751,1424.7357 396.85176,1425.292 C 396.13011,1425.8471 395.76869,1426.5002 395.76869,1427.2432 C 395.76869,1427.7215 395.92105,1428.1455 396.21987,1428.5282 C 396.51869,1428.9239 396.98405,1429.2428 397.62302,1429.5073 C 397.99034,1429.6384 399.06751,1429.9514 400.85806,1430.4369 C 403.44822,1431.1313 405.25412,1431.6947 406.2746,1432.1388 C 407.30334,1432.5758 408.10885,1433.2219 408.69232,1434.0617 C 409.27461,1434.9026 409.56634,1435.9443 409.56634,1437.1939 C 409.56634,1438.4164 409.2061,1439.562 408.49744,1440.6451 C 407.78169,1441.7223 406.75413,1442.555 405.41358,1443.1455 C 404.07421,1443.7361 402.55295,1444.0278 400.85807,1444.0278 C 398.04587,1444.0278 395.90689,1443.4443 394.43524,1442.2774 C 392.96241,1441.1105 392.02579,1439.3813 391.62304,1437.09 L 391.623,1437.09 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path83" />
-
- <path
- d="M 413.934,1417.93 L 413.934,1413.7158 L 417.60014,1413.7158 L 417.60014,1417.93 L 413.934,1417.93 z M 413.934,1443.541 L 413.934,1421.9375 L 417.60014,1421.9375 L 417.60014,1443.541 L 413.934,1443.541 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path85" />
-
- <path
- d="M 421.808,1432.74 C 421.808,1428.7408 422.91942,1425.775 425.14816,1423.8522 C 427.00249,1422.2542 429.26666,1421.4487 431.9395,1421.4487 C 434.91233,1421.4487 437.34186,1422.4219 439.22454,1424.3731 C 441.11312,1426.3172 442.05092,1429.0042 442.05092,1432.4353 C 442.05092,1435.2191 441.63399,1437.4077 440.80013,1438.9975 C 439.96745,1440.5943 438.7521,1441.8309 437.16233,1442.712 C 435.5643,1443.5943 433.82808,1444.0325 431.9395,1444.0325 C 428.91942,1444.0325 426.47454,1443.0664 424.60604,1441.1223 C 422.73872,1439.1853 421.80801,1436.3931 421.80801,1432.74 L 421.808,1432.74 z M 425.57217,1432.74 C 425.57217,1435.5109 426.17571,1437.5813 427.38398,1438.9561 C 428.59225,1440.338 430.11351,1441.0254 431.93949,1441.0254 C 433.75957,1441.0254 435.27256,1440.3309 436.48083,1438.949 C 437.68319,1437.5672 438.28674,1435.4554 438.28674,1432.6231 C 438.28674,1429.949 437.6832,1427.9211 436.46784,1426.5463 C 435.25249,1425.1715 433.7454,1424.4841 431.93949,1424.4841 C 430.11351,1424.4841 428.59225,1425.1715 427.38398,1426.5392 C 426.17571,1427.9069 425.57217,1429.9762 425.57217,1432.74 L 425.57217,1432.74 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path87" />
-
- <path
- d="M 446.349,1443.54 L 446.349,1421.9365 L 449.64073,1421.9365 L 449.64073,1425.0062 C 451.23167,1422.631 453.52301,1421.4428 456.51593,1421.4428 C 457.82105,1421.4428 459.01514,1421.679 460.10648,1422.1444 C 461.20372,1422.6168 462.01514,1423.2274 462.55727,1423.9916 C 463.10648,1424.7487 463.48089,1425.6511 463.70294,1426.6928 C 463.83522,1427.3743 463.90491,1428.5613 463.90491,1430.2562 L 463.90491,1443.5401 L 460.23759,1443.5401 L 460.23759,1430.3944 C 460.23759,1428.9086 460.0994,1427.7901 459.81475,1427.0471 C 459.53011,1426.3113 459.02223,1425.7208 458.30058,1425.2838 C 457.57184,1424.8397 456.72381,1424.6164 455.74467,1424.6164 C 454.18207,1424.6164 452.8427,1425.1172 451.70294,1426.1034 C 450.57144,1427.0956 450.00924,1428.9712 450.00924,1431.742 L 450.00924,1443.54 L 446.349,1443.54 L 446.349,1443.54 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path89" />
-
- <path
- d="M 481.113,1417.93 L 481.113,1413.7158 L 484.77914,1413.7158 L 484.77914,1417.93 L 481.113,1417.93 z M 481.113,1443.541 L 481.113,1421.9375 L 484.77914,1421.9375 L 484.77914,1443.541 L 481.113,1443.541 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path91" />
-
- <path
- d="M 490.355,1443.54 L 490.355,1421.9365 L 493.64673,1421.9365 L 493.64673,1425.0062 C 495.23767,1422.631 497.52901,1421.4428 500.52193,1421.4428 C 501.82705,1421.4428 503.02114,1421.679 504.11248,1422.1444 C 505.20972,1422.6168 506.02114,1423.2274 506.56327,1423.9916 C 507.11248,1424.7487 507.48689,1425.6511 507.70894,1426.6928 C 507.84122,1427.3743 507.91091,1428.5613 507.91091,1430.2562 L 507.91091,1443.5401 L 504.24359,1443.5401 L 504.24359,1430.3944 C 504.24359,1428.9086 504.1054,1427.7901 503.82075,1427.0471 C 503.53611,1426.3113 503.02823,1425.7208 502.30658,1425.2838 C 501.57784,1424.8397 500.72981,1424.6164 499.75067,1424.6164 C 498.18807,1424.6164 496.8487,1425.1172 495.70894,1426.1034 C 494.57744,1427.0956 494.01524,1428.9712 494.01524,1431.742 L 494.01524,1443.54 L 490.355,1443.54 L 490.355,1443.54 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path93" />
-
- <path
- d="M 539.264,1443.54 L 539.264,1440.3664 C 537.5762,1442.8113 535.29195,1444.0266 532.40298,1444.0266 C 531.13211,1444.0266 529.93684,1443.7833 528.83369,1443.2967 C 527.72936,1442.8113 526.90967,1442.1924 526.37463,1441.4565 C 525.83368,1440.7136 525.45809,1439.8113 525.24313,1438.7412 C 525.09667,1438.0195 525.02108,1436.8809 525.02108,1435.3184 L 525.02108,1421.9365 L 528.68014,1421.9365 L 528.68014,1433.9152 C 528.68014,1435.8321 528.75691,1437.1159 528.90219,1437.7833 C 529.13841,1438.7482 529.62502,1439.4982 530.36794,1440.0533 C 531.11794,1440.6026 532.04156,1440.873 533.13881,1440.873 C 534.23605,1440.873 535.26361,1440.5955 536.22857,1440.0333 C 537.19353,1439.4711 537.87503,1438.6998 538.2707,1437.7348 C 538.67346,1436.7628 538.87424,1435.3526 538.87424,1433.5124 L 538.87424,1421.9364 L 542.53448,1421.9364 L 542.53448,1443.5399 L 539.26401,1443.5399 L 539.264,1443.54 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path95" />
-
- <path
- d="M 546.813,1437.09 L 550.43072,1436.5207 C 550.63151,1437.9723 551.20198,1439.0825 552.13151,1439.8609 C 553.05513,1440.6309 554.35434,1441.0207 556.02797,1441.0207 C 557.70868,1441.0207 558.95828,1440.6735 559.77088,1439.9931 C 560.58348,1439.3057 560.99332,1438.4991 560.99332,1437.5825 C 560.99332,1436.7498 560.6319,1436.1038 559.90907,1435.6242 C 559.40946,1435.2983 558.15986,1434.8884 556.16616,1434.3888 C 553.48624,1433.7085 551.61773,1433.125 550.58309,1432.6242 C 549.54844,1432.1317 548.75711,1431.4443 548.22207,1430.5691 C 547.68821,1429.6939 547.41656,1428.729 547.41656,1427.6731 C 547.41656,1426.7081 547.6386,1425.8199 548.08388,1425.0002 C 548.52089,1424.1735 549.12561,1423.4931 549.88152,1422.951 C 550.45199,1422.5353 551.22916,1422.1739 552.20829,1421.8821 C 553.19451,1421.5904 554.25042,1421.4439 555.37483,1421.4439 C 557.06971,1421.4439 558.55554,1421.6943 559.84058,1422.1809 C 561.12444,1422.6664 562.06932,1423.3266 562.67995,1424.1593 C 563.29176,1425.0002 563.70869,1426.1105 563.93782,1427.5065 L 560.36144,1428.0002 C 560.19491,1426.8888 559.72247,1426.0207 558.94412,1425.3959 C 558.16696,1424.7711 557.06262,1424.4581 555.6394,1424.4581 C 553.95869,1424.4581 552.75751,1424.7357 552.04176,1425.292 C 551.32011,1425.8471 550.95869,1426.5002 550.95869,1427.2432 C 550.95869,1427.7215 551.11105,1428.1455 551.40987,1428.5282 C 551.70869,1428.9239 552.17405,1429.2428 552.81302,1429.5073 C 553.18035,1429.6384 554.25751,1429.9514 556.04806,1430.4369 C 558.63822,1431.1313 560.44412,1431.6947 561.4646,1432.1388 C 562.49334,1432.5758 563.29885,1433.2219 563.88232,1434.0617 C 564.46461,1434.9026 564.75634,1435.9443 564.75634,1437.1939 C 564.75634,1438.4164 564.3961,1439.562 563.68744,1440.6451 C 562.97169,1441.7223 561.94413,1442.555 560.60358,1443.1455 C 559.26421,1443.7361 557.74295,1444.0278 556.04807,1444.0278 C 553.23587,1444.0278 551.09689,1443.4443 549.62524,1442.2774 C 548.15241,1441.1105 547.21579,1439.3813 546.81304,1437.09 L 546.813,1437.09 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path97" />
-
- <path
- d="M 583.894,1436.58 L 587.67825,1437.0454 C 587.08061,1439.2599 585.97746,1440.9749 584.36644,1442.1973 C 582.74833,1443.4127 580.68494,1444.0245 578.17864,1444.0245 C 575.01919,1444.0245 572.51171,1443.0513 570.66447,1441.1072 C 568.81014,1439.1631 567.88652,1436.4336 567.88652,1432.9198 C 567.88652,1429.2808 568.82431,1426.4615 570.69282,1424.4548 C 572.56723,1422.4481 574.99085,1421.4406 577.97668,1421.4406 C 580.86566,1421.4406 583.22668,1422.4269 585.05385,1424.3922 C 586.88692,1426.3576 587.80346,1429.1284 587.80346,1432.6906 C 587.80346,1432.9127 587.79637,1433.2399 587.7822,1433.6698 L 571.672,1433.6698 C 571.80428,1436.045 572.47751,1437.8639 573.68578,1439.1217 C 574.89405,1440.3855 576.39405,1441.0174 578.19995,1441.0174 C 579.53932,1441.0174 580.68499,1440.6631 581.63696,1439.9544 C 582.58775,1439.2529 583.33775,1438.1284 583.89405,1436.58 L 583.894,1436.58 z M 571.8727,1430.6568 L 583.9353,1430.6568 C 583.77585,1428.8438 583.3105,1427.4761 582.55341,1426.5725 C 581.38648,1425.1635 579.87349,1424.4548 578.01916,1424.4548 C 576.33845,1424.4548 574.92113,1425.017 573.77546,1426.1426 C 572.62979,1427.267 571.9979,1428.7741 571.8727,1430.6568 L 571.8727,1430.6568 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path99" />
-
- <path
- d="M 602.491,1432.74 C 602.491,1428.7408 603.60242,1425.775 605.83116,1423.8522 C 607.68549,1422.2542 609.94966,1421.4487 612.6225,1421.4487 C 615.59533,1421.4487 618.02486,1422.4219 619.90754,1424.3731 C 621.79612,1426.3172 622.73392,1429.0042 622.73392,1432.4353 C 622.73392,1435.2191 622.31699,1437.4077 621.48313,1438.9975 C 620.65045,1440.5943 619.4351,1441.8309 617.84533,1442.712 C 616.2473,1443.5943 614.51108,1444.0325 612.6225,1444.0325 C 609.60242,1444.0325 607.15754,1443.0664 605.28904,1441.1223 C 603.42172,1439.1853 602.49101,1436.3931 602.49101,1432.74 L 602.491,1432.74 z M 606.25517,1432.74 C 606.25517,1435.5109 606.85871,1437.5813 608.06698,1438.9561 C 609.27525,1440.338 610.79651,1441.0254 612.62249,1441.0254 C 614.44257,1441.0254 615.95556,1440.3309 617.16383,1438.949 C 618.36619,1437.5672 618.96974,1435.4554 618.96974,1432.6231 C 618.96974,1429.949 618.3662,1427.9211 617.15084,1426.5463 C 615.93549,1425.1715 614.4284,1424.4841 612.62249,1424.4841 C 610.79651,1424.4841 609.27525,1425.1715 608.06698,1426.5392 C 606.85871,1427.9069 606.25517,1429.9762 606.25517,1432.74 L 606.25517,1432.74 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path101" />
-
- <path
- d="M 627.032,1443.54 L 627.032,1421.9365 L 630.32373,1421.9365 L 630.32373,1425.0062 C 631.91467,1422.631 634.20601,1421.4428 637.19893,1421.4428 C 638.50405,1421.4428 639.69814,1421.679 640.78948,1422.1444 C 641.88672,1422.6168 642.69814,1423.2274 643.24027,1423.9916 C 643.78948,1424.7487 644.16389,1425.6511 644.38594,1426.6928 C 644.51822,1427.3743 644.58791,1428.5613 644.58791,1430.2562 L 644.58791,1443.5401 L 640.92059,1443.5401 L 640.92059,1430.3944 C 640.92059,1428.9086 640.7824,1427.7901 640.49775,1427.0471 C 640.21311,1426.3113 639.70523,1425.7208 638.98358,1425.2838 C 638.25484,1424.8397 637.40681,1424.6164 636.42767,1424.6164 C 634.86507,1424.6164 633.5257,1425.1172 632.38594,1426.1034 C 631.25444,1427.0956 630.69224,1428.9712 630.69224,1431.742 L 630.69224,1443.54 L 627.032,1443.54 L 627.032,1443.54 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path103" />
-
- <path
- d="M 988.517,1440.88 C 987.15519,1442.0328 985.85007,1442.8454 984.60046,1443.3249 C 983.34259,1443.7973 981.99613,1444.0335 980.55873,1444.0335 C 978.18353,1444.0335 976.36464,1443.4572 975.08668,1442.2973 C 973.81581,1441.1375 973.17684,1439.6517 973.17684,1437.8528 C 973.17684,1436.7898 973.41306,1435.8249 973.89849,1434.9497 C 974.37802,1434.0745 975.00991,1433.3741 975.78825,1432.8461 C 976.57251,1432.3182 977.4477,1431.9154 978.42683,1431.645 C 979.1414,1431.4572 980.22565,1431.2694 981.67604,1431.0957 C 984.6347,1430.7414 986.81502,1430.3245 988.21108,1429.832 C 988.22526,1429.3324 988.23234,1429.0123 988.23234,1428.88 C 988.23234,1427.3871 987.8851,1426.3324 987.19061,1425.7276 C 986.2599,1424.895 984.86384,1424.4851 983.02368,1424.4851 C 981.30163,1424.4851 980.03077,1424.7839 979.20399,1425.3875 C 978.38431,1425.9922 977.78076,1427.0611 977.38509,1428.5954 L 973.80871,1428.1028 C 974.1347,1426.5757 974.66974,1425.332 975.41265,1424.3942 C 976.15557,1423.4505 977.23863,1422.7206 978.64887,1422.2139 C 980.05793,1421.7072 981.69021,1421.4497 983.55163,1421.4497 C 985.39887,1421.4497 986.89179,1421.6729 988.04454,1422.1028 C 989.1973,1422.541 990.04415,1423.082 990.59336,1423.7422 C 991.13431,1424.4013 991.5099,1425.228 991.73194,1426.2343 C 991.85005,1426.8603 991.91265,1427.9847 991.91265,1429.6099 L 991.91265,1434.4914 C 991.91265,1437.9013 991.98824,1440.0544 992.14887,1440.9497 C 992.30123,1441.8521 992.61423,1442.7202 993.07249,1443.5469 L 989.24572,1443.5469 C 988.87132,1442.7899 988.62092,1441.9017 988.51698,1440.88 L 988.517,1440.88 z M 988.21109,1432.6997 C 986.87763,1433.2489 984.88511,1433.7072 982.23235,1434.0887 C 980.72526,1434.3036 979.65518,1434.5469 979.03747,1434.8174 C 978.41267,1435.0891 977.92605,1435.4847 977.59298,1436.0127 C 977.25283,1436.5336 977.0792,1437.1099 977.0792,1437.7489 C 977.0792,1438.728 977.45479,1439.5406 978.19062,1440.1926 C 978.92645,1440.8387 980.00952,1441.1647 981.43393,1441.1647 C 982.84299,1441.1647 984.09968,1440.8599 985.19692,1440.241 C 986.29416,1439.6233 987.10676,1438.7765 987.62054,1437.7064 C 988.01621,1436.8808 988.21109,1435.6584 988.21109,1434.0473 L 988.21109,1432.6997 L 988.21109,1432.6997 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path105" />
-
- <path
- d="M 1011.61,1443.54 L 1011.61,1440.8105 C 1010.2423,1442.9565 1008.2285,1444.0266 1005.5687,1444.0266 C 1003.8466,1444.0266 1002.2628,1443.5542 1000.8183,1442.6022 C 999.37378,1441.6585 998.25646,1440.3321 997.45803,1438.6231 C 996.66551,1436.9223 996.26984,1434.9711 996.26984,1432.7553 C 996.26984,1430.6022 996.63126,1428.6439 997.34701,1426.8876 C 998.06866,1425.1302 999.14465,1423.7837 1000.5821,1422.853 C 1002.0206,1421.9152 1003.6317,1421.4427 1005.4092,1421.4427 C 1006.7073,1421.4427 1007.8671,1421.7215 1008.8805,1422.2695 C 1009.9021,1422.8187 1010.7277,1423.5333 1011.3667,1424.4156 L 1011.3667,1413.7148 L 1015.0057,1413.7148 L 1015.0057,1443.54 L 1011.61,1443.54 L 1011.61,1443.54 z M 1000.034,1432.7554 C 1000.034,1435.5263 1000.6175,1437.5956 1001.7844,1438.9633 C 1002.9501,1440.3322 1004.3261,1441.0196 1005.9159,1441.0196 C 1007.5127,1441.0196 1008.8746,1440.3593 1009.9919,1439.0542 C 1011.1104,1437.7479 1011.6726,1435.7483 1011.6726,1433.0613 C 1011.6726,1430.1027 1011.1033,1427.9365 1009.9647,1426.5546 C 1008.8249,1425.1656 1007.423,1424.4782 1005.7494,1424.4782 C 1004.1242,1424.4782 1002.7635,1425.1444 1001.6734,1426.4708 C 1000.582,1427.7971 1000.034,1429.8948 1000.034,1432.7554 L 1000.034,1432.7554 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path107" />
-
- <path
- d="M 1020.78,1417.93 L 1020.78,1413.7158 L 1024.4461,1413.7158 L 1024.4461,1417.93 L 1020.78,1417.93 z M 1020.78,1443.541 L 1020.78,1421.9375 L 1024.4461,1421.9375 L 1024.4461,1443.541 L 1020.78,1443.541 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path109" />
-
- <path
- d="M 1044.81,1436.58 L 1048.5942,1437.0454 C 1047.9966,1439.2599 1046.8935,1440.9749 1045.2824,1442.1973 C 1043.6643,1443.4127 1041.6009,1444.0245 1039.0946,1444.0245 C 1035.9352,1444.0245 1033.4277,1443.0513 1031.5805,1441.1072 C 1029.7261,1439.1631 1028.8025,1436.4336 1028.8025,1432.9198 C 1028.8025,1429.2808 1029.7403,1426.4615 1031.6088,1424.4548 C 1033.4832,1422.4481 1035.9069,1421.4406 1038.8927,1421.4406 C 1041.7817,1421.4406 1044.1427,1422.4269 1045.9699,1424.3922 C 1047.8029,1426.3576 1048.7195,1429.1284 1048.7195,1432.6906 C 1048.7195,1432.9127 1048.7124,1433.2399 1048.6982,1433.6698 L 1032.588,1433.6698 C 1032.7203,1436.045 1033.3935,1437.8639 1034.6018,1439.1217 C 1035.8101,1440.3855 1037.3101,1441.0174 1039.116,1441.0174 C 1040.4553,1441.0174 1041.601,1440.6631 1042.553,1439.9544 C 1043.5037,1439.2529 1044.2538,1438.1284 1044.8101,1436.58 L 1044.81,1436.58 z M 1032.7887,1430.6568 L 1044.8513,1430.6568 C 1044.6919,1428.8438 1044.2265,1427.4761 1043.4694,1426.5725 C 1042.3025,1425.1635 1040.7895,1424.4548 1038.9352,1424.4548 C 1037.2544,1424.4548 1035.8371,1425.017 1034.6915,1426.1426 C 1033.5458,1427.267 1032.9139,1428.7741 1032.7887,1430.6568 L 1032.7887,1430.6568 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path111" />
-
- <path
- d="M 1053.19,1443.54 L 1053.19,1421.9365 L 1056.4817,1421.9365 L 1056.4817,1425.0062 C 1058.0727,1422.631 1060.364,1421.4428 1063.3569,1421.4428 C 1064.662,1421.4428 1065.8561,1421.679 1066.9475,1422.1444 C 1068.0447,1422.6168 1068.8561,1423.2274 1069.3983,1423.9916 C 1069.9475,1424.7487 1070.3219,1425.6511 1070.5439,1426.6928 C 1070.6762,1427.3743 1070.7459,1428.5613 1070.7459,1430.2562 L 1070.7459,1443.5401 L 1067.0786,1443.5401 L 1067.0786,1430.3944 C 1067.0786,1428.9086 1066.9404,1427.7901 1066.6558,1427.0471 C 1066.3711,1426.3113 1065.8632,1425.7208 1065.1416,1425.2838 C 1064.4128,1424.8397 1063.5648,1424.6164 1062.5857,1424.6164 C 1061.0231,1424.6164 1059.6837,1425.1172 1058.5439,1426.1034 C 1057.4124,1427.0956 1056.8502,1428.9712 1056.8502,1431.742 L 1056.8502,1443.54 L 1053.19,1443.54 L 1053.19,1443.54 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path113" />
-
- <path
- d="M 1084.36,1440.26 L 1084.8868,1443.4962 C 1083.8592,1443.7112 1082.9356,1443.8222 1082.123,1443.8222 C 1080.7907,1443.8222 1079.762,1443.6143 1079.0261,1443.1903 C 1078.2974,1442.7734 1077.7836,1442.2183 1077.4848,1441.5309 C 1077.186,1440.8505 1077.0336,1439.4061 1077.0336,1437.2116 L 1077.0336,1424.7805 L 1074.3454,1424.7805 L 1074.3454,1421.934 L 1077.0336,1421.934 L 1077.0336,1416.5801 L 1080.6785,1414.3856 L 1080.6785,1421.934 L 1084.36,1421.934 L 1084.36,1424.7805 L 1080.6785,1424.7805 L 1080.6785,1437.4124 C 1080.6785,1438.4612 1080.7411,1439.1285 1080.8663,1439.4262 C 1080.9986,1439.725 1081.2065,1439.9612 1081.4982,1440.1419 C 1081.7899,1440.3155 1082.2068,1440.4053 1082.749,1440.4053 C 1083.1576,1440.4053 1083.6927,1440.3569 1084.36,1440.26 L 1084.36,1440.26 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path115" />
-
- <polygon
- points="1098.09,1434.59 1098.09,1430.91 1109.35,1430.91 1109.35,1434.59 1098.09,1434.59 "
- style="fill:#000000;fill-rule:nonzero"
- id="polygon117" />
-
- <path
- d="M 1138.98,1443.54 L 1138.98,1440.8105 C 1137.6123,1442.9565 1135.5985,1444.0266 1132.9387,1444.0266 C 1131.2166,1444.0266 1129.6328,1443.5542 1128.1883,1442.6022 C 1126.7438,1441.6585 1125.6265,1440.3321 1124.828,1438.6231 C 1124.0355,1436.9223 1123.6398,1434.9711 1123.6398,1432.7553 C 1123.6398,1430.6022 1124.0013,1428.6439 1124.717,1426.8876 C 1125.4387,1425.1302 1126.5147,1423.7837 1127.9521,1422.853 C 1129.3906,1421.9152 1131.0017,1421.4427 1132.7792,1421.4427 C 1134.0773,1421.4427 1135.2371,1421.7215 1136.2505,1422.2695 C 1137.2721,1422.8187 1138.0977,1423.5333 1138.7367,1424.4156 L 1138.7367,1413.7148 L 1142.3757,1413.7148 L 1142.3757,1443.54 L 1138.98,1443.54 L 1138.98,1443.54 z M 1127.404,1432.7554 C 1127.404,1435.5263 1127.9875,1437.5956 1129.1544,1438.9633 C 1130.3201,1440.3322 1131.6961,1441.0196 1133.2859,1441.0196 C 1134.8827,1441.0196 1136.2445,1440.3593 1137.3619,1439.0542 C 1138.4804,1437.7479 1139.0426,1435.7483 1139.0426,1433.0613 C 1139.0426,1430.1027 1138.4733,1427.9365 1137.3347,1426.5546 C 1136.195,1425.1656 1134.793,1424.4782 1133.1194,1424.4782 C 1131.4942,1424.4782 1130.1335,1425.1444 1129.0434,1426.4708 C 1127.952,1427.7971 1127.404,1429.8948 1127.404,1432.7554 L 1127.404,1432.7554 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path119" />
-
- <path
- d="M 1148.16,1417.93 L 1148.16,1413.7158 L 1151.8261,1413.7158 L 1151.8261,1417.93 L 1148.16,1417.93 z M 1148.16,1443.541 L 1148.16,1421.9375 L 1151.8261,1421.9375 L 1151.8261,1443.541 L 1148.16,1443.541 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path121" />
-
- <path
- d="M 1158.27,1443.54 L 1158.27,1424.7829 L 1155.0409,1424.7829 L 1155.0409,1421.9364 L 1158.27,1421.9364 L 1158.27,1419.638 C 1158.27,1418.1864 1158.4023,1417.1034 1158.6586,1416.4018 C 1159.0129,1415.4498 1159.6318,1414.6797 1160.52,1414.0892 C 1161.4094,1413.4986 1162.6519,1413.2069 1164.2558,1413.2069 C 1165.2846,1413.2069 1166.4232,1413.325 1167.6728,1413.5754 L 1167.1247,1416.7703 C 1166.3676,1416.6309 1165.6448,1416.5612 1164.9645,1416.5612 C 1163.8531,1416.5612 1163.0688,1416.7975 1162.6106,1417.277 C 1162.1452,1417.7494 1161.9161,1418.6376 1161.9161,1419.9427 L 1161.9161,1421.9364 L 1166.1243,1421.9364 L 1166.1243,1424.7829 L 1161.9161,1424.7829 L 1161.9161,1443.54 L 1158.27,1443.54 L 1158.27,1443.54 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path123" />
-
- <path
- d="M 1169.09,1443.54 L 1169.09,1424.7829 L 1165.8609,1424.7829 L 1165.8609,1421.9364 L 1169.09,1421.9364 L 1169.09,1419.638 C 1169.09,1418.1864 1169.2223,1417.1034 1169.4786,1416.4018 C 1169.8329,1415.4498 1170.4518,1414.6797 1171.34,1414.0892 C 1172.2294,1413.4986 1173.4719,1413.2069 1175.0758,1413.2069 C 1176.1046,1413.2069 1177.2432,1413.325 1178.4928,1413.5754 L 1177.9447,1416.7703 C 1177.1876,1416.6309 1176.4648,1416.5612 1175.7845,1416.5612 C 1174.6731,1416.5612 1173.8888,1416.7975 1173.4306,1417.277 C 1172.9652,1417.7494 1172.7361,1418.6376 1172.7361,1419.9427 L 1172.7361,1421.9364 L 1176.9443,1421.9364 L 1176.9443,1424.7829 L 1172.7361,1424.7829 L 1172.7361,1443.54 L 1169.09,1443.54 L 1169.09,1443.54 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path125" />
-
- <path
- d="M 1194.59,1436.58 L 1198.3742,1437.0454 C 1197.7766,1439.2599 1196.6735,1440.9749 1195.0624,1442.1973 C 1193.4443,1443.4127 1191.3809,1444.0245 1188.8746,1444.0245 C 1185.7152,1444.0245 1183.2077,1443.0513 1181.3605,1441.1072 C 1179.5061,1439.1631 1178.5825,1436.4336 1178.5825,1432.9198 C 1178.5825,1429.2808 1179.5203,1426.4615 1181.3888,1424.4548 C 1183.2632,1422.4481 1185.6869,1421.4406 1188.6727,1421.4406 C 1191.5617,1421.4406 1193.9227,1422.4269 1195.7499,1424.3922 C 1197.5829,1426.3576 1198.4995,1429.1284 1198.4995,1432.6906 C 1198.4995,1432.9127 1198.4924,1433.2399 1198.4782,1433.6698 L 1182.368,1433.6698 C 1182.5003,1436.045 1183.1735,1437.8639 1184.3818,1439.1217 C 1185.5901,1440.3855 1187.0901,1441.0174 1188.896,1441.0174 C 1190.2353,1441.0174 1191.381,1440.6631 1192.333,1439.9544 C 1193.2837,1439.2529 1194.0338,1438.1284 1194.5901,1436.58 L 1194.59,1436.58 z M 1182.5687,1430.6568 L 1194.6313,1430.6568 C 1194.4719,1428.8438 1194.0065,1427.4761 1193.2494,1426.5725 C 1192.0825,1425.1635 1190.5695,1424.4548 1188.7152,1424.4548 C 1187.0344,1424.4548 1185.6171,1425.017 1184.4715,1426.1426 C 1183.3258,1427.267 1182.6939,1428.7741 1182.5687,1430.6568 L 1182.5687,1430.6568 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path127" />
-
- <path
- d="M 1202.93,1443.54 L 1202.93,1421.9365 L 1206.2217,1421.9365 L 1206.2217,1425.207 C 1207.0615,1423.6798 1207.8398,1422.6652 1208.5544,1422.1798 C 1209.2631,1421.6932 1210.0473,1421.4428 1210.9024,1421.4428 C 1212.1379,1421.4428 1213.3887,1421.8396 1214.6654,1422.6239 L 1213.4017,1426.0267 C 1212.5135,1425.4916 1211.617,1425.2282 1210.7217,1425.2282 C 1209.9162,1425.2282 1209.2005,1425.4715 1208.5615,1425.9499 C 1207.9225,1426.4365 1207.4713,1427.1026 1207.2009,1427.9566 C 1206.791,1429.2558 1206.5902,1430.679 1206.5902,1432.2274 L 1206.5902,1443.54 L 1202.93,1443.54 L 1202.93,1443.54 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path129" />
-
- <path
- d="M 1231.63,1436.58 L 1235.4143,1437.0454 C 1234.8166,1439.2599 1233.7135,1440.9749 1232.1024,1442.1973 C 1230.4843,1443.4127 1228.4209,1444.0245 1225.9146,1444.0245 C 1222.7552,1444.0245 1220.2477,1443.0513 1218.4005,1441.1072 C 1216.5461,1439.1631 1215.6225,1436.4336 1215.6225,1432.9198 C 1215.6225,1429.2808 1216.5603,1426.4615 1218.4288,1424.4548 C 1220.3032,1422.4481 1222.7269,1421.4406 1225.7127,1421.4406 C 1228.6017,1421.4406 1230.9627,1422.4269 1232.7899,1424.3922 C 1234.6229,1426.3576 1235.5395,1429.1284 1235.5395,1432.6906 C 1235.5395,1432.9127 1235.5324,1433.2399 1235.5182,1433.6698 L 1219.408,1433.6698 C 1219.5403,1436.045 1220.2135,1437.8639 1221.4218,1439.1217 C 1222.6301,1440.3855 1224.1301,1441.0174 1225.936,1441.0174 C 1227.2753,1441.0174 1228.421,1440.6631 1229.373,1439.9544 C 1230.3237,1439.2529 1231.0738,1438.1284 1231.6301,1436.58 L 1231.63,1436.58 z M 1219.6087,1430.6568 L 1231.6713,1430.6568 C 1231.5119,1428.8438 1231.0465,1427.4761 1230.2894,1426.5725 C 1229.1225,1425.1635 1227.6095,1424.4548 1225.7552,1424.4548 C 1224.0744,1424.4548 1222.6571,1425.017 1221.5115,1426.1426 C 1220.3658,1427.267 1219.7339,1428.7741 1219.6087,1430.6568 L 1219.6087,1430.6568 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path131" />
-
- <path
- d="M 1240.02,1443.54 L 1240.02,1421.9365 L 1243.3117,1421.9365 L 1243.3117,1425.0062 C 1244.9027,1422.631 1247.194,1421.4428 1250.1869,1421.4428 C 1251.492,1421.4428 1252.6861,1421.679 1253.7775,1422.1444 C 1254.8747,1422.6168 1255.6861,1423.2274 1256.2283,1423.9916 C 1256.7775,1424.7487 1257.1519,1425.6511 1257.3739,1426.6928 C 1257.5062,1427.3743 1257.5759,1428.5613 1257.5759,1430.2562 L 1257.5759,1443.5401 L 1253.9086,1443.5401 L 1253.9086,1430.3944 C 1253.9086,1428.9086 1253.7704,1427.7901 1253.4858,1427.0471 C 1253.2011,1426.3113 1252.6932,1425.7208 1251.9716,1425.2838 C 1251.2428,1424.8397 1250.3948,1424.6164 1249.4157,1424.6164 C 1247.8531,1424.6164 1246.5137,1425.1172 1245.3739,1426.1034 C 1244.2424,1427.0956 1243.6802,1428.9712 1243.6802,1431.742 L 1243.6802,1443.54 L 1240.02,1443.54 L 1240.02,1443.54 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path133" />
-
- <path
- d="M 1271.19,1440.26 L 1271.7168,1443.4962 C 1270.6892,1443.7112 1269.7656,1443.8222 1268.953,1443.8222 C 1267.6207,1443.8222 1266.592,1443.6143 1265.8561,1443.1903 C 1265.1274,1442.7734 1264.6136,1442.2183 1264.3148,1441.5309 C 1264.016,1440.8505 1263.8636,1439.4061 1263.8636,1437.2116 L 1263.8636,1424.7805 L 1261.1754,1424.7805 L 1261.1754,1421.934 L 1263.8636,1421.934 L 1263.8636,1416.5801 L 1267.5085,1414.3856 L 1267.5085,1421.934 L 1271.19,1421.934 L 1271.19,1424.7805 L 1267.5085,1424.7805 L 1267.5085,1437.4124 C 1267.5085,1438.4612 1267.5711,1439.1285 1267.6963,1439.4262 C 1267.8286,1439.725 1268.0365,1439.9612 1268.3282,1440.1419 C 1268.6199,1440.3155 1269.0368,1440.4053 1269.579,1440.4053 C 1269.9876,1440.4053 1270.5227,1440.3569 1271.19,1440.26 L 1271.19,1440.26 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path135" />
-
- <path
- d="M 1300.45,1435.63 L 1304.0465,1436.1024 C 1303.6579,1438.5816 1302.6504,1440.5257 1301.0264,1441.9288 C 1299.4083,1443.332 1297.4146,1444.0335 1295.0536,1444.0335 C 1292.1032,1444.0335 1289.7209,1443.0674 1287.9291,1441.1375 C 1286.1303,1439.2064 1285.228,1436.4355 1285.228,1432.8249 C 1285.228,1430.4922 1285.6165,1428.4501 1286.3878,1426.6997 C 1287.165,1424.9505 1288.339,1423.6371 1289.9217,1422.7631 C 1291.4984,1421.8879 1293.2205,1421.4497 1295.0748,1421.4497 C 1297.4217,1421.4497 1299.3457,1422.0473 1300.8315,1423.2343 C 1302.3244,1424.4225 1303.2835,1426.1032 1303.7063,1428.2906 L 1300.1441,1428.8387 C 1299.8039,1427.3871 1299.2063,1426.2969 1298.3453,1425.5611 C 1297.4843,1424.8324 1296.4425,1424.4639 1295.2201,1424.4639 C 1293.3728,1424.4639 1291.8728,1425.1241 1290.7201,1426.4505 C 1289.5673,1427.7698 1288.991,1429.8603 1288.991,1432.7209 C 1288.991,1435.6229 1289.5472,1437.7347 1290.6646,1439.054 C 1291.776,1440.3662 1293.2276,1441.0265 1295.0193,1441.0265 C 1296.4567,1441.0265 1297.6508,1440.5812 1298.6158,1439.7001 C 1299.5819,1438.8178 1300.1925,1437.4642 1300.45,1435.63 L 1300.45,1435.63 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path137" />
-
- <path
- d="M 1321.34,1443.54 L 1321.34,1440.3664 C 1319.6522,1442.8113 1317.3679,1444.0266 1314.479,1444.0266 C 1313.2081,1444.0266 1312.0128,1443.7833 1310.9097,1443.2967 C 1309.8054,1442.8113 1308.9857,1442.1924 1308.4506,1441.4565 C 1307.9097,1440.7136 1307.5341,1439.8113 1307.3191,1438.7412 C 1307.1727,1438.0195 1307.0971,1436.8809 1307.0971,1435.3184 L 1307.0971,1421.9365 L 1310.7561,1421.9365 L 1310.7561,1433.9152 C 1310.7561,1435.8321 1310.8329,1437.1159 1310.9782,1437.7833 C 1311.2144,1438.7482 1311.701,1439.4982 1312.4439,1440.0533 C 1313.1939,1440.6026 1314.1176,1440.873 1315.2148,1440.873 C 1316.3121,1440.873 1317.3396,1440.5955 1318.3046,1440.0333 C 1319.2695,1439.4711 1319.951,1438.6998 1320.3467,1437.7348 C 1320.7495,1436.7628 1320.9502,1435.3526 1320.9502,1433.5124 L 1320.9502,1421.9364 L 1324.6105,1421.9364 L 1324.6105,1443.5399 L 1321.34,1443.5399 L 1321.34,1443.54 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path139" />
-
- <path
- d="M 1330.31,1443.54 L 1330.31,1421.9365 L 1333.6017,1421.9365 L 1333.6017,1425.207 C 1334.4415,1423.6798 1335.2198,1422.6652 1335.9344,1422.1798 C 1336.6431,1421.6932 1337.4273,1421.4428 1338.2824,1421.4428 C 1339.5179,1421.4428 1340.7687,1421.8396 1342.0454,1422.6239 L 1340.7816,1426.0267 C 1339.8935,1425.4916 1338.997,1425.2282 1338.1017,1425.2282 C 1337.2962,1425.2282 1336.5805,1425.4715 1335.9415,1425.9499 C 1335.3025,1426.4365 1334.8513,1427.1026 1334.5809,1427.9566 C 1334.171,1429.2558 1333.9702,1430.679 1333.9702,1432.2274 L 1333.9702,1443.54 L 1330.31,1443.54 L 1330.31,1443.54 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path141" />
-
- <path
- d="M 1350.23,1443.54 L 1342.0084,1421.9365 L 1345.8765,1421.9365 L 1350.5146,1434.8731 C 1351.0154,1436.2692 1351.4737,1437.7207 1351.8965,1439.2278 C 1352.2237,1438.0892 1352.6749,1436.7203 1353.2584,1435.1164 L 1358.0631,1421.9365 L 1361.8272,1421.9365 L 1353.6469,1443.54 L 1350.23,1443.54 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path143" />
-
- <path
- d="M 1379.85,1436.58 L 1383.6342,1437.0454 C 1383.0366,1439.2599 1381.9335,1440.9749 1380.3224,1442.1973 C 1378.7043,1443.4127 1376.6409,1444.0245 1374.1346,1444.0245 C 1370.9752,1444.0245 1368.4677,1443.0513 1366.6205,1441.1072 C 1364.7661,1439.1631 1363.8425,1436.4336 1363.8425,1432.9198 C 1363.8425,1429.2808 1364.7803,1426.4615 1366.6488,1424.4548 C 1368.5232,1422.4481 1370.9469,1421.4406 1373.9327,1421.4406 C 1376.8217,1421.4406 1379.1827,1422.4269 1381.0099,1424.3922 C 1382.8429,1426.3576 1383.7595,1429.1284 1383.7595,1432.6906 C 1383.7595,1432.9127 1383.7524,1433.2399 1383.7382,1433.6698 L 1367.628,1433.6698 C 1367.7603,1436.045 1368.4335,1437.8639 1369.6418,1439.1217 C 1370.8501,1440.3855 1372.3501,1441.0174 1374.156,1441.0174 C 1375.4953,1441.0174 1376.641,1440.6631 1377.593,1439.9544 C 1378.5437,1439.2529 1379.2938,1438.1284 1379.8501,1436.58 L 1379.85,1436.58 z M 1367.8287,1430.6568 L 1379.8913,1430.6568 C 1379.7319,1428.8438 1379.2665,1427.4761 1378.5094,1426.5725 C 1377.3425,1425.1635 1375.8295,1424.4548 1373.9752,1424.4548 C 1372.2944,1424.4548 1370.8771,1425.017 1369.7315,1426.1426 C 1368.5858,1427.267 1367.9539,1428.7741 1367.8287,1430.6568 L 1367.8287,1430.6568 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path145" />
-
- <path
- d="M 1386.77,1437.09 L 1390.3877,1436.5207 C 1390.5885,1437.9723 1391.159,1439.0825 1392.0885,1439.8609 C 1393.0121,1440.6309 1394.3113,1441.0207 1395.985,1441.0207 C 1397.6657,1441.0207 1398.9153,1440.6735 1399.7279,1439.9931 C 1400.5405,1439.3057 1400.9503,1438.4991 1400.9503,1437.5825 C 1400.9503,1436.7498 1400.5889,1436.1038 1399.8661,1435.6242 C 1399.3665,1435.2983 1398.1169,1434.8884 1396.1232,1434.3888 C 1393.4432,1433.7085 1391.5747,1433.125 1390.5401,1432.6242 C 1389.5054,1432.1317 1388.7141,1431.4443 1388.1791,1430.5691 C 1387.6452,1429.6939 1387.3736,1428.729 1387.3736,1427.6731 C 1387.3736,1426.7081 1387.5956,1425.8199 1388.0409,1425.0002 C 1388.4779,1424.1735 1389.0826,1423.4931 1389.8385,1422.951 C 1390.409,1422.5353 1391.1862,1422.1739 1392.1653,1421.8821 C 1393.1515,1421.5904 1394.2074,1421.4439 1395.3318,1421.4439 C 1397.0267,1421.4439 1398.5125,1421.6943 1399.7976,1422.1809 C 1401.0814,1422.6664 1402.0263,1423.3266 1402.637,1424.1593 C 1403.2488,1425.0002 1403.6657,1426.1105 1403.8948,1427.5065 L 1400.3184,1428.0002 C 1400.1519,1426.8888 1399.6795,1426.0207 1398.9011,1425.3959 C 1398.124,1424.7711 1397.0196,1424.4581 1395.5964,1424.4581 C 1393.9157,1424.4581 1392.7145,1424.7357 1391.9988,1425.292 C 1391.2771,1425.8471 1390.9157,1426.5002 1390.9157,1427.2432 C 1390.9157,1427.7215 1391.0681,1428.1455 1391.3669,1428.5282 C 1391.6657,1428.9239 1392.131,1429.2428 1392.77,1429.5073 C 1393.1373,1429.6384 1394.2145,1429.9514 1396.0051,1430.4369 C 1398.5952,1431.1313 1400.4011,1431.6947 1401.4216,1432.1388 C 1402.4503,1432.5758 1403.2559,1433.2219 1403.8393,1434.0617 C 1404.4216,1434.9026 1404.7133,1435.9443 1404.7133,1437.1939 C 1404.7133,1438.4164 1404.3531,1439.562 1403.6444,1440.6451 C 1402.9287,1441.7223 1401.9011,1442.555 1400.5606,1443.1455 C 1399.2212,1443.7361 1397.6999,1444.0278 1396.0051,1444.0278 C 1393.1929,1444.0278 1391.0539,1443.4443 1389.5822,1442.2774 C 1388.1094,1441.1105 1387.1728,1439.3813 1386.77,1437.09 L 1386.77,1437.09 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path147" />
-
- <path
- d="M 1410.02,1443.54 L 1410.02,1439.366 L 1414.1928,1439.366 L 1414.1928,1443.54 C 1414.1928,1445.0742 1413.9224,1446.3109 1413.3802,1447.2558 C 1412.8322,1448.1924 1411.9712,1448.9223 1410.7972,1449.4432 L 1409.7767,1447.8735 C 1410.548,1447.5333 1411.1172,1447.0325 1411.4846,1446.3806 C 1411.8531,1445.7203 1412.0539,1444.7766 1412.0964,1443.54 L 1410.02,1443.54 L 1410.02,1443.54 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path149" />
-
- <path
- d="M 1430.75,1437.09 L 1434.3677,1436.5207 C 1434.5685,1437.9723 1435.139,1439.0825 1436.0685,1439.8609 C 1436.9921,1440.6309 1438.2913,1441.0207 1439.965,1441.0207 C 1441.6457,1441.0207 1442.8953,1440.6735 1443.7079,1439.9931 C 1444.5205,1439.3057 1444.9303,1438.4991 1444.9303,1437.5825 C 1444.9303,1436.7498 1444.5689,1436.1038 1443.8461,1435.6242 C 1443.3465,1435.2983 1442.0969,1434.8884 1440.1032,1434.3888 C 1437.4232,1433.7085 1435.5547,1433.125 1434.5201,1432.6242 C 1433.4854,1432.1317 1432.6941,1431.4443 1432.1591,1430.5691 C 1431.6252,1429.6939 1431.3536,1428.729 1431.3536,1427.6731 C 1431.3536,1426.7081 1431.5756,1425.8199 1432.0209,1425.0002 C 1432.4579,1424.1735 1433.0626,1423.4931 1433.8185,1422.951 C 1434.389,1422.5353 1435.1662,1422.1739 1436.1453,1421.8821 C 1437.1315,1421.5904 1438.1874,1421.4439 1439.3118,1421.4439 C 1441.0067,1421.4439 1442.4925,1421.6943 1443.7776,1422.1809 C 1445.0614,1422.6664 1446.0063,1423.3266 1446.617,1424.1593 C 1447.2288,1425.0002 1447.6457,1426.1105 1447.8748,1427.5065 L 1444.2984,1428.0002 C 1444.1319,1426.8888 1443.6595,1426.0207 1442.8811,1425.3959 C 1442.104,1424.7711 1440.9996,1424.4581 1439.5764,1424.4581 C 1437.8957,1424.4581 1436.6945,1424.7357 1435.9788,1425.292 C 1435.2571,1425.8471 1434.8957,1426.5002 1434.8957,1427.2432 C 1434.8957,1427.7215 1435.0481,1428.1455 1435.3469,1428.5282 C 1435.6457,1428.9239 1436.111,1429.2428 1436.75,1429.5073 C 1437.1173,1429.6384 1438.1945,1429.9514 1439.9851,1430.4369 C 1442.5752,1431.1313 1444.3811,1431.6947 1445.4016,1432.1388 C 1446.4303,1432.5758 1447.2359,1433.2219 1447.8193,1434.0617 C 1448.4016,1434.9026 1448.6933,1435.9443 1448.6933,1437.1939 C 1448.6933,1438.4164 1448.3331,1439.562 1447.6244,1440.6451 C 1446.9087,1441.7223 1445.8811,1442.555 1444.5406,1443.1455 C 1443.2012,1443.7361 1441.6799,1444.0278 1439.9851,1444.0278 C 1437.1729,1444.0278 1435.0339,1443.4443 1433.5622,1442.2774 C 1432.0894,1441.1105 1431.1528,1439.3813 1430.75,1437.09 L 1430.75,1437.09 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path151" />
-
- <path
- d="M 1453.05,1451.82 L 1453.05,1421.9393 L 1456.3831,1421.9393 L 1456.3831,1424.7444 C 1457.1685,1423.6472 1458.0567,1422.8216 1459.05,1422.2724 C 1460.0362,1421.7243 1461.2374,1421.4456 1462.6476,1421.4456 C 1464.4949,1421.4456 1466.1201,1421.9251 1467.5291,1422.87 C 1468.9453,1423.8208 1470.0083,1425.1613 1470.724,1426.8905 C 1471.4457,1428.6196 1471.8071,1430.5153 1471.8071,1432.5775 C 1471.8071,1434.7861 1471.4114,1436.7787 1470.613,1438.5503 C 1469.8205,1440.3208 1468.6677,1441.6743 1467.1547,1442.6192 C 1465.6406,1443.557 1464.0496,1444.0295 1462.3831,1444.0295 C 1461.1618,1444.0295 1460.0705,1443.772 1459.0984,1443.2582 C 1458.1264,1442.7444 1457.335,1442.0913 1456.7102,1441.307 L 1456.7102,1451.82 L 1453.05,1451.82 L 1453.05,1451.82 z M 1456.363,1432.8621 C 1456.363,1435.64 1456.9252,1437.6952 1458.0508,1439.0286 C 1459.1752,1440.355 1460.5429,1441.0223 1462.1409,1441.0223 C 1463.765,1441.0223 1465.161,1440.3349 1466.3209,1438.953 C 1467.4807,1437.5782 1468.0642,1435.4464 1468.0642,1432.5574 C 1468.0642,1429.7995 1467.4949,1427.7444 1466.3622,1426.3696 C 1465.2307,1425.0019 1463.876,1424.3145 1462.3075,1424.3145 C 1460.7449,1424.3145 1459.363,1425.0432 1458.1618,1426.5019 C 1456.9595,1427.9593 1456.363,1430.0853 1456.363,1432.8621 L 1456.363,1432.8621 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path153" />
-
- <path
- d="M 1490.32,1440.88 C 1488.9582,1442.0328 1487.6531,1442.8454 1486.4035,1443.3249 C 1485.1456,1443.7973 1483.7991,1444.0335 1482.3617,1444.0335 C 1479.9865,1444.0335 1478.1676,1443.4572 1476.8897,1442.2973 C 1475.6188,1441.1375 1474.9798,1439.6517 1474.9798,1437.8528 C 1474.9798,1436.7898 1475.2161,1435.8249 1475.7015,1434.9497 C 1476.181,1434.0745 1476.8129,1433.3741 1477.5913,1432.8461 C 1478.3755,1432.3182 1479.2507,1431.9154 1480.2298,1431.645 C 1480.9444,1431.4572 1482.0287,1431.2694 1483.479,1431.0957 C 1486.4377,1430.7414 1488.618,1430.3245 1490.0141,1429.832 C 1490.0283,1429.3324 1490.0353,1429.0123 1490.0353,1428.88 C 1490.0353,1427.3871 1489.6881,1426.3324 1488.9936,1425.7276 C 1488.0629,1424.895 1486.6668,1424.4851 1484.8267,1424.4851 C 1483.1046,1424.4851 1481.8338,1424.7839 1481.007,1425.3875 C 1480.1873,1425.9922 1479.5838,1427.0611 1479.1881,1428.5954 L 1475.6117,1428.1028 C 1475.9377,1426.5757 1476.4727,1425.332 1477.2157,1424.3942 C 1477.9586,1423.4505 1479.0416,1422.7206 1480.4519,1422.2139 C 1481.8609,1421.7072 1483.4932,1421.4497 1485.3546,1421.4497 C 1487.2019,1421.4497 1488.6948,1421.6729 1489.8475,1422.1028 C 1491.0003,1422.541 1491.8472,1423.082 1492.3964,1423.7422 C 1492.9373,1424.4013 1493.3129,1425.228 1493.5349,1426.2343 C 1493.6531,1426.8603 1493.7157,1427.9847 1493.7157,1429.6099 L 1493.7157,1434.4914 C 1493.7157,1437.9013 1493.7912,1440.0544 1493.9519,1440.9497 C 1494.1042,1441.8521 1494.4172,1442.7202 1494.8755,1443.5469 L 1491.0487,1443.5469 C 1490.6743,1442.7899 1490.4239,1441.9017 1490.32,1440.88 L 1490.32,1440.88 z M 1490.0141,1432.6997 C 1488.6806,1433.2489 1486.6881,1433.7072 1484.0354,1434.0887 C 1482.5283,1434.3036 1481.4582,1434.5469 1480.8405,1434.8174 C 1480.2157,1435.0891 1479.7291,1435.4847 1479.396,1436.0127 C 1479.0558,1436.5336 1478.8822,1437.1099 1478.8822,1437.7489 C 1478.8822,1438.728 1479.2578,1439.5406 1479.9936,1440.1926 C 1480.7295,1440.8387 1481.8125,1441.1647 1483.2369,1441.1647 C 1484.646,1441.1647 1485.9027,1440.8599 1486.9999,1440.241 C 1488.0972,1439.6233 1488.9098,1438.7765 1489.4235,1437.7064 C 1489.8192,1436.8808 1490.0141,1435.6584 1490.0141,1434.0473 L 1490.0141,1432.6997 L 1490.0141,1432.6997 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path155" />
-
- <path
- d="M 1513.49,1435.63 L 1517.0865,1436.1024 C 1516.6979,1438.5816 1515.6904,1440.5257 1514.0664,1441.9288 C 1512.4483,1443.332 1510.4546,1444.0335 1508.0936,1444.0335 C 1505.1432,1444.0335 1502.7609,1443.0674 1500.9691,1441.1375 C 1499.1703,1439.2064 1498.268,1436.4355 1498.268,1432.8249 C 1498.268,1430.4922 1498.6565,1428.4501 1499.4278,1426.6997 C 1500.205,1424.9505 1501.379,1423.6371 1502.9617,1422.7631 C 1504.5384,1421.8879 1506.2605,1421.4497 1508.1148,1421.4497 C 1510.4617,1421.4497 1512.3857,1422.0473 1513.8715,1423.2343 C 1515.3644,1424.4225 1516.3235,1426.1032 1516.7463,1428.2906 L 1513.1841,1428.8387 C 1512.8439,1427.3871 1512.2463,1426.2969 1511.3853,1425.5611 C 1510.5243,1424.8324 1509.4825,1424.4639 1508.2601,1424.4639 C 1506.4128,1424.4639 1504.9128,1425.1241 1503.7601,1426.4505 C 1502.6073,1427.7698 1502.031,1429.8603 1502.031,1432.7209 C 1502.031,1435.6229 1502.5872,1437.7347 1503.7046,1439.054 C 1504.816,1440.3662 1506.2676,1441.0265 1508.0593,1441.0265 C 1509.4967,1441.0265 1510.6908,1440.5812 1511.6558,1439.7001 C 1512.6219,1438.8178 1513.2325,1437.4642 1513.49,1435.63 L 1513.49,1435.63 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path157" />
-
- <path
- d="M 1520.24,1417.93 L 1520.24,1413.7158 L 1523.9061,1413.7158 L 1523.9061,1417.93 L 1520.24,1417.93 z M 1520.24,1443.541 L 1520.24,1421.9375 L 1523.9061,1421.9375 L 1523.9061,1443.541 L 1520.24,1443.541 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path159" />
-
- <path
- d="M 1529.49,1443.54 L 1529.49,1421.9365 L 1532.7817,1421.9365 L 1532.7817,1425.0062 C 1534.3727,1422.631 1536.664,1421.4428 1539.6569,1421.4428 C 1540.962,1421.4428 1542.1561,1421.679 1543.2475,1422.1444 C 1544.3447,1422.6168 1545.1561,1423.2274 1545.6983,1423.9916 C 1546.2475,1424.7487 1546.6219,1425.6511 1546.8439,1426.6928 C 1546.9762,1427.3743 1547.0459,1428.5613 1547.0459,1430.2562 L 1547.0459,1443.5401 L 1543.3786,1443.5401 L 1543.3786,1430.3944 C 1543.3786,1428.9086 1543.2404,1427.7901 1542.9558,1427.0471 C 1542.6711,1426.3113 1542.1632,1425.7208 1541.4416,1425.2838 C 1540.7128,1424.8397 1539.8648,1424.6164 1538.8857,1424.6164 C 1537.3231,1424.6164 1535.9837,1425.1172 1534.8439,1426.1034 C 1533.7124,1427.0956 1533.1502,1428.9712 1533.1502,1431.742 L 1533.1502,1443.54 L 1529.49,1443.54 L 1529.49,1443.54 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path161" />
-
- <path
- d="M 1551.99,1445.33 L 1555.5522,1445.858 C 1555.6987,1446.9552 1556.1144,1447.7536 1556.7888,1448.2603 C 1557.6983,1448.9335 1558.9408,1449.2737 1560.5105,1449.2737 C 1562.2124,1449.2737 1563.5176,1448.9335 1564.4412,1448.2603 C 1565.3648,1447.58 1565.9825,1446.628 1566.3085,1445.4127 C 1566.5034,1444.6627 1566.5872,1443.1013 1566.5731,1440.7119 C 1564.9762,1442.5934 1562.9825,1443.5383 1560.5943,1443.5383 C 1557.6215,1443.5383 1555.3231,1442.4694 1553.6979,1440.3233 C 1552.0738,1438.1843 1551.2542,1435.6083 1551.2542,1432.6154 C 1551.2542,1430.552 1551.6286,1428.6493 1552.3715,1426.9072 C 1553.1215,1425.1639 1554.2057,1423.8162 1555.6219,1422.8654 C 1557.038,1421.9206 1558.7045,1421.441 1560.6144,1421.441 C 1563.1632,1421.441 1565.2679,1422.4757 1566.9203,1424.5391 L 1566.9203,1421.9347 L 1570.3018,1421.9347 L 1570.3018,1440.6079 C 1570.3018,1443.9693 1569.9546,1446.3575 1569.2742,1447.7607 C 1568.5868,1449.1627 1567.5038,1450.2741 1566.0179,1451.0867 C 1564.5309,1451.8993 1562.7049,1452.3091 1560.5317,1452.3091 C 1557.9545,1452.3091 1555.8723,1451.7256 1554.2884,1450.5658 C 1552.6986,1449.406 1551.9345,1447.6626 1551.99,1445.33 L 1551.99,1445.33 z M 1555.0172,1432.3509 C 1555.0172,1435.1844 1555.5806,1437.2537 1556.7121,1438.5529 C 1557.8376,1439.858 1559.2467,1440.5041 1560.9416,1440.5041 C 1562.6211,1440.5041 1564.0313,1439.858 1565.1699,1438.5659 C 1566.3085,1437.2678 1566.879,1435.2399 1566.879,1432.469 C 1566.879,1429.8233 1566.2955,1427.8308 1565.1215,1426.4903 C 1563.9475,1425.1497 1562.5314,1424.4765 1560.879,1424.4765 C 1559.2538,1424.4765 1557.8719,1425.1355 1556.7262,1426.4619 C 1555.5877,1427.7812 1555.0172,1429.7466 1555.0172,1432.3509 L 1555.0172,1432.3509 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path163" />
-
- <path
- d="M 1576.78,1443.54 L 1576.78,1439.366 L 1580.9528,1439.366 L 1580.9528,1443.54 C 1580.9528,1445.0742 1580.6824,1446.3109 1580.1402,1447.2558 C 1579.5922,1448.1924 1578.7312,1448.9223 1577.5572,1449.4432 L 1576.5367,1447.8735 C 1577.308,1447.5333 1577.8772,1447.0325 1578.2446,1446.3806 C 1578.6131,1445.7203 1578.8139,1444.7766 1578.8564,1443.54 L 1576.78,1443.54 L 1576.78,1443.54 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path165" />
-
- <path
- d="M 669.775,1440.26 L 670.30177,1443.4962 C 669.27421,1443.7112 668.35059,1443.8222 667.53799,1443.8222 C 666.20571,1443.8222 665.17697,1443.6143 664.44114,1443.1903 C 663.7124,1442.7734 663.19862,1442.2183 662.8998,1441.5309 C 662.60098,1440.8505 662.44862,1439.4061 662.44862,1437.2116 L 662.44862,1424.7805 L 659.76043,1424.7805 L 659.76043,1421.934 L 662.44862,1421.934 L 662.44862,1416.5801 L 666.0935,1414.3856 L 666.0935,1421.934 L 669.775,1421.934 L 669.775,1424.7805 L 666.0935,1424.7805 L 666.0935,1437.4124 C 666.0935,1438.4612 666.1561,1439.1285 666.2813,1439.4262 C 666.41358,1439.725 666.62145,1439.9612 666.91319,1440.1419 C 667.20492,1440.3155 667.62185,1440.4053 668.16398,1440.4053 C 668.57264,1440.4053 669.10768,1440.3569 669.775,1440.26 L 669.775,1440.26 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path167" />
-
- <path
- d="M 673.357,1443.54 L 673.357,1413.7148 L 677.01724,1413.7148 L 677.01724,1424.4156 C 678.72511,1422.4361 680.88535,1421.4428 683.4885,1421.4428 C 685.08653,1421.4428 686.47551,1421.7628 687.65543,1422.3947 C 688.83653,1423.0195 689.68338,1423.8947 690.19008,1425.0062 C 690.69677,1426.1164 690.95425,1427.7345 690.95425,1429.8463 L 690.95425,1443.54 L 687.28811,1443.54 L 687.28811,1429.8463 C 687.28811,1428.0191 686.89126,1426.6857 686.09992,1425.853 C 685.30858,1425.0192 684.18299,1424.5963 682.7326,1424.5963 C 681.64835,1424.5963 680.62788,1424.881 679.67,1425.4432 C 678.71095,1426.0054 678.03063,1426.7695 677.62787,1427.7345 C 677.21803,1428.6936 677.01724,1430.0258 677.01724,1431.7207 L 677.01724,1443.54 L 673.357,1443.54 L 673.357,1443.54 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path169" />
-
- <path
- d="M 711.315,1436.58 L 715.09925,1437.0454 C 714.50161,1439.2599 713.39846,1440.9749 711.78744,1442.1973 C 710.16933,1443.4127 708.10594,1444.0245 705.59964,1444.0245 C 702.44019,1444.0245 699.93271,1443.0513 698.08547,1441.1072 C 696.23114,1439.1631 695.30752,1436.4336 695.30752,1432.9198 C 695.30752,1429.2808 696.24532,1426.4615 698.11382,1424.4548 C 699.98823,1422.4481 702.41185,1421.4406 705.39768,1421.4406 C 708.28666,1421.4406 710.64768,1422.4269 712.47485,1424.3922 C 714.30792,1426.3576 715.22446,1429.1284 715.22446,1432.6906 C 715.22446,1432.9127 715.21737,1433.2399 715.2032,1433.6698 L 699.093,1433.6698 C 699.22528,1436.045 699.89851,1437.8639 701.10678,1439.1217 C 702.31505,1440.3855 703.81505,1441.0174 705.62095,1441.0174 C 706.96032,1441.0174 708.10599,1440.6631 709.05796,1439.9544 C 710.00875,1439.2529 710.75875,1438.1284 711.31505,1436.58 L 711.315,1436.58 z M 699.2937,1430.6568 L 711.3563,1430.6568 C 711.19685,1428.8438 710.7315,1427.4761 709.97441,1426.5725 C 708.80748,1425.1635 707.29449,1424.4548 705.44016,1424.4548 C 703.75945,1424.4548 702.34213,1425.017 701.19646,1426.1426 C 700.05079,1427.267 699.4189,1428.7741 699.2937,1430.6568 L 699.2937,1430.6568 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path171" />
-
- <path
- d="M 735.266,1443.54 L 728.65537,1421.9365 L 732.43962,1421.9365 L 735.87781,1434.4078 L 737.15458,1439.0472 C 737.21009,1438.811 737.58568,1437.3251 738.27308,1434.5885 L 741.71009,1421.9365 L 745.47426,1421.9365 L 748.71048,1434.4633 L 749.79355,1438.596 L 751.03016,1434.422 L 754.73055,1421.9366 L 758.29394,1421.9366 L 751.53685,1443.5401 L 747.73842,1443.5401 L 744.30023,1430.6023 L 743.46047,1426.9149 L 739.09275,1443.5401 L 735.26598,1443.5401 L 735.266,1443.54 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path173" />
-
- <path
- d="M 776.154,1436.58 L 779.93825,1437.0454 C 779.34061,1439.2599 778.23746,1440.9749 776.62644,1442.1973 C 775.00833,1443.4127 772.94494,1444.0245 770.43864,1444.0245 C 767.27919,1444.0245 764.77171,1443.0513 762.92447,1441.1072 C 761.07014,1439.1631 760.14652,1436.4336 760.14652,1432.9198 C 760.14652,1429.2808 761.08431,1426.4615 762.95282,1424.4548 C 764.82723,1422.4481 767.25085,1421.4406 770.23668,1421.4406 C 773.12566,1421.4406 775.48668,1422.4269 777.31385,1424.3922 C 779.14692,1426.3576 780.06346,1429.1284 780.06346,1432.6906 C 780.06346,1432.9127 780.05637,1433.2399 780.0422,1433.6698 L 763.932,1433.6698 C 764.06428,1436.045 764.73751,1437.8639 765.94578,1439.1217 C 767.15405,1440.3855 768.65405,1441.0174 770.45995,1441.0174 C 771.79932,1441.0174 772.94499,1440.6631 773.89696,1439.9544 C 774.84775,1439.2529 775.59775,1438.1284 776.15405,1436.58 L 776.154,1436.58 z M 764.1327,1430.6568 L 776.1953,1430.6568 C 776.03585,1428.8438 775.5705,1427.4761 774.81341,1426.5725 C 773.64648,1425.1635 772.13349,1424.4548 770.27916,1424.4548 C 768.59845,1424.4548 767.18113,1425.017 766.03546,1426.1426 C 764.88979,1427.267 764.2579,1428.7741 764.1327,1430.6568 L 764.1327,1430.6568 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path175" />
-
- <path
- d="M 787.918,1443.54 L 784.52233,1443.54 L 784.52233,1413.7148 L 788.18139,1413.7148 L 788.18139,1424.353 C 789.72982,1422.416 791.70226,1421.4428 794.09753,1421.4428 C 795.43099,1421.4428 796.68887,1421.7144 797.87588,1422.2483 C 799.06289,1422.7833 800.03494,1423.5404 800.80619,1424.5054 C 801.57036,1425.4774 802.17391,1426.6443 802.60501,1428.0191 C 803.04202,1429.388 803.25816,1430.8526 803.25816,1432.4081 C 803.25816,1436.1168 802.34044,1438.9774 800.50737,1440.9983 C 798.68139,1443.0192 796.47981,1444.0266 793.918,1444.0266 C 791.36918,1444.0266 789.36957,1442.9636 787.918,1440.8318 L 787.918,1443.54 L 787.918,1443.54 z M 787.87548,1432.5746 C 787.87548,1435.1648 788.22981,1437.0333 788.93139,1438.186 C 790.08415,1440.0746 791.64674,1441.0195 793.6121,1441.0195 C 795.21604,1441.0195 796.59793,1440.325 797.76486,1438.9289 C 798.93179,1437.54 799.51407,1435.4707 799.51407,1432.714 C 799.51407,1429.8947 798.95187,1427.8112 797.83454,1426.4707 C 796.71604,1425.1301 795.36249,1424.4569 793.77863,1424.4569 C 792.17469,1424.4569 790.7928,1425.1514 789.62587,1426.5403 C 788.45894,1427.9293 787.87548,1429.9431 787.87548,1432.5746 L 787.87548,1432.5746 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path177" />
-
- <path
- d="M 817.827,1437.09 L 821.44472,1436.5207 C 821.64551,1437.9723 822.21598,1439.0825 823.14551,1439.8609 C 824.06913,1440.6309 825.36834,1441.0207 827.04197,1441.0207 C 828.72268,1441.0207 829.97228,1440.6735 830.78488,1439.9931 C 831.59748,1439.3057 832.00732,1438.4991 832.00732,1437.5825 C 832.00732,1436.7498 831.6459,1436.1038 830.92307,1435.6242 C 830.42346,1435.2983 829.17386,1434.8884 827.18016,1434.3888 C 824.50024,1433.7085 822.63173,1433.125 821.59709,1432.6242 C 820.56244,1432.1317 819.77111,1431.4443 819.23607,1430.5691 C 818.70221,1429.6939 818.43056,1428.729 818.43056,1427.6731 C 818.43056,1426.7081 818.6526,1425.8199 819.09788,1425.0002 C 819.53489,1424.1735 820.13961,1423.4931 820.89552,1422.951 C 821.46599,1422.5353 822.24316,1422.1739 823.22229,1421.8821 C 824.20851,1421.5904 825.26442,1421.4439 826.38883,1421.4439 C 828.08371,1421.4439 829.56954,1421.6943 830.85458,1422.1809 C 832.13844,1422.6664 833.08332,1423.3266 833.69395,1424.1593 C 834.30576,1425.0002 834.72269,1426.1105 834.95182,1427.5065 L 831.37544,1428.0002 C 831.20891,1426.8888 830.73647,1426.0207 829.95812,1425.3959 C 829.18096,1424.7711 828.07662,1424.4581 826.6534,1424.4581 C 824.97269,1424.4581 823.77151,1424.7357 823.05576,1425.292 C 822.33411,1425.8471 821.97269,1426.5002 821.97269,1427.2432 C 821.97269,1427.7215 822.12505,1428.1455 822.42387,1428.5282 C 822.72269,1428.9239 823.18805,1429.2428 823.82702,1429.5073 C 824.19435,1429.6384 825.27151,1429.9514 827.06206,1430.4369 C 829.65222,1431.1313 831.45812,1431.6947 832.4786,1432.1388 C 833.50734,1432.5758 834.31285,1433.2219 834.89632,1434.0617 C 835.47861,1434.9026 835.77034,1435.9443 835.77034,1437.1939 C 835.77034,1438.4164 835.4101,1439.562 834.70144,1440.6451 C 833.98569,1441.7223 832.95813,1442.555 831.61758,1443.1455 C 830.27821,1443.7361 828.75695,1444.0278 827.06207,1444.0278 C 824.24987,1444.0278 822.11089,1443.4443 820.63924,1442.2774 C 819.16641,1441.1105 818.22979,1439.3813 817.82704,1437.09 L 817.827,1437.09 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path179" />
-
- <path
- d="M 840.138,1417.93 L 840.138,1413.7158 L 843.80414,1413.7158 L 843.80414,1417.93 L 840.138,1417.93 z M 840.138,1443.541 L 840.138,1421.9375 L 843.80414,1421.9375 L 843.80414,1443.541 L 840.138,1443.541 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path181" />
-
- <path
- d="M 857.374,1440.26 L 857.90077,1443.4962 C 856.87321,1443.7112 855.94959,1443.8222 855.13699,1443.8222 C 853.80471,1443.8222 852.77597,1443.6143 852.04014,1443.1903 C 851.3114,1442.7734 850.79762,1442.2183 850.4988,1441.5309 C 850.19998,1440.8505 850.04762,1439.4061 850.04762,1437.2116 L 850.04762,1424.7805 L 847.35943,1424.7805 L 847.35943,1421.934 L 850.04762,1421.934 L 850.04762,1416.5801 L 853.6925,1414.3856 L 853.6925,1421.934 L 857.374,1421.934 L 857.374,1424.7805 L 853.6925,1424.7805 L 853.6925,1437.4124 C 853.6925,1438.4612 853.7551,1439.1285 853.8803,1439.4262 C 854.01258,1439.725 854.22045,1439.9612 854.51219,1440.1419 C 854.80392,1440.3155 855.22085,1440.4053 855.76298,1440.4053 C 856.17164,1440.4053 856.70668,1440.3569 857.374,1440.26 L 857.374,1440.26 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path183" />
-
- <path
- d="M 875.741,1436.58 L 879.52525,1437.0454 C 878.92761,1439.2599 877.82446,1440.9749 876.21344,1442.1973 C 874.59533,1443.4127 872.53194,1444.0245 870.02564,1444.0245 C 866.86619,1444.0245 864.35871,1443.0513 862.51147,1441.1072 C 860.65714,1439.1631 859.73352,1436.4336 859.73352,1432.9198 C 859.73352,1429.2808 860.67131,1426.4615 862.53982,1424.4548 C 864.41423,1422.4481 866.83785,1421.4406 869.82368,1421.4406 C 872.71266,1421.4406 875.07368,1422.4269 876.90085,1424.3922 C 878.73392,1426.3576 879.65046,1429.1284 879.65046,1432.6906 C 879.65046,1432.9127 879.64337,1433.2399 879.6292,1433.6698 L 863.519,1433.6698 C 863.65128,1436.045 864.32451,1437.8639 865.53278,1439.1217 C 866.74105,1440.3855 868.24105,1441.0174 870.04695,1441.0174 C 871.38632,1441.0174 872.53199,1440.6631 873.48396,1439.9544 C 874.43475,1439.2529 875.18475,1438.1284 875.74105,1436.58 L 875.741,1436.58 z M 863.7197,1430.6568 L 875.7823,1430.6568 C 875.62285,1428.8438 875.1575,1427.4761 874.40041,1426.5725 C 873.23348,1425.1635 871.72049,1424.4548 869.86616,1424.4548 C 868.18545,1424.4548 866.76813,1425.017 865.62246,1426.1426 C 864.47679,1427.267 863.8449,1428.7741 863.7197,1430.6568 L 863.7197,1430.6568 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path185" />
-
- <path
- d="M 899.692,1443.54 L 893.08137,1421.9365 L 896.86562,1421.9365 L 900.30381,1434.4078 L 901.58058,1439.0472 C 901.63609,1438.811 902.01168,1437.3251 902.69908,1434.5885 L 906.13609,1421.9365 L 909.90026,1421.9365 L 913.13648,1434.4633 L 914.21955,1438.596 L 915.45616,1434.422 L 919.15655,1421.9366 L 922.71994,1421.9366 L 915.96285,1443.5401 L 912.16442,1443.5401 L 908.72623,1430.6023 L 907.88647,1426.9149 L 903.51875,1443.5401 L 899.69198,1443.5401 L 899.692,1443.54 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path187" />
-
- <polygon
- points="923.046,1444.05 931.691,1413.21 934.622,1413.21 925.997,1444.05 923.046,1444.05 "
- style="fill:#000000;fill-rule:nonzero"
- id="polygon189" />
-
- <path
- d="M 936.698,1445.33 L 940.2602,1445.858 C 940.40666,1446.9552 940.8224,1447.7536 941.49681,1448.2603 C 942.40626,1448.9335 943.64878,1449.2737 945.21846,1449.2737 C 946.92043,1449.2737 948.22555,1448.9335 949.14917,1448.2603 C 950.07279,1447.58 950.69051,1446.628 951.01649,1445.4127 C 951.21137,1444.6627 951.29523,1443.1013 951.28106,1440.7119 C 949.68421,1442.5934 947.69051,1443.5383 945.30232,1443.5383 C 942.32949,1443.5383 940.03106,1442.4694 938.40586,1440.3233 C 936.78184,1438.1843 935.96216,1435.6083 935.96216,1432.6154 C 935.96216,1430.552 936.33657,1428.6493 937.07948,1426.9072 C 937.82948,1425.1639 938.91373,1423.8162 940.32987,1422.8654 C 941.74601,1421.9206 943.41255,1421.441 945.32239,1421.441 C 947.87121,1421.441 949.97593,1422.4757 951.6283,1424.5391 L 951.6283,1421.9347 L 955.0098,1421.9347 L 955.0098,1440.6079 C 955.0098,1443.9693 954.66255,1446.3575 953.98224,1447.7607 C 953.29483,1449.1627 952.21177,1450.2741 950.72594,1451.0867 C 949.23893,1451.8993 947.41295,1452.3091 945.23972,1452.3091 C 942.66255,1452.3091 940.58027,1451.7256 938.99641,1450.5658 C 937.40665,1449.406 936.64247,1447.6626 936.69798,1445.33 L 936.698,1445.33 z M 939.72517,1432.3509 C 939.72517,1435.1844 940.28856,1437.2537 941.42005,1438.5529 C 942.54564,1439.858 943.9547,1440.5041 945.64958,1440.5041 C 947.32911,1440.5041 948.73934,1439.858 949.87793,1438.5659 C 951.01651,1437.2678 951.58699,1435.2399 951.58699,1432.469 C 951.58699,1429.8233 951.00352,1427.8308 949.82951,1426.4903 C 948.65549,1425.1497 947.23935,1424.4765 945.58699,1424.4765 C 943.96179,1424.4765 942.5799,1425.1355 941.43423,1426.4619 C 940.29565,1427.7812 939.72517,1429.7466 939.72517,1432.3509 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path191" />
-
- <path
- d="M 960.503,1443.54 L 960.503,1421.9365 L 963.79473,1421.9365 L 963.79473,1425.207 C 964.63449,1423.6798 965.41284,1422.6652 966.12741,1422.1798 C 966.83607,1421.6932 967.62032,1421.4428 968.47544,1421.4428 C 969.71087,1421.4428 970.96166,1421.8396 972.23843,1422.6239 L 970.97465,1426.0267 C 970.08646,1425.4916 969.19,1425.2282 968.29473,1425.2282 C 967.48922,1425.2282 966.77347,1425.4715 966.13449,1425.9499 C 965.49551,1426.4365 965.04433,1427.1026 964.77386,1427.9566 C 964.36402,1429.2558 964.16323,1430.679 964.16323,1432.2274 L 964.16323,1443.54 L 960.50299,1443.54 L 960.503,1443.54 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path193" />
-
- </g>
- <g
- transform="matrix(0.317715,0,0,0.317715,415.2513,-451.5858)"
- style="fill-rule:evenodd"
- id="_19509096">
- <path
- d="M 75.3272,2384.22 L 75.853972,2387.4562 C 74.826412,2387.6712 73.902792,2387.7822 73.090192,2387.7822 C 71.757912,2387.7822 70.729172,2387.5743 69.993342,2387.1503 C 69.264602,2386.7334 68.750822,2386.1783 68.452002,2385.4909 C 68.153183,2384.8105 68.000821,2383.3661 68.000821,2381.1716 L 68.000821,2368.7405 L 65.312631,2368.7405 L 65.312631,2365.894 L 68.000821,2365.894 L 68.000821,2360.5401 L 71.645701,2358.3456 L 71.645701,2365.894 L 75.327201,2365.894 L 75.327201,2368.7405 L 71.645701,2368.7405 L 71.645701,2381.3724 C 71.645701,2382.4212 71.708299,2383.0885 71.833496,2383.3862 C 71.965779,2383.685 72.173653,2383.9212 72.465386,2384.1019 C 72.757118,2384.2755 73.174047,2384.3653 73.716176,2384.3653 C 74.124837,2384.3653 74.659877,2384.3169 75.327196,2384.22 L 75.3272,2384.22 z "
- style="fill:#000000;fill-rule:nonzero"
- id="_19509000" />
-
- <path
- d="M 93.6945,2380.54 L 97.47875,2381.0054 C 96.881112,2383.2199 95.77796,2384.9349 94.16694,2386.1573 C 92.54883,2387.3727 90.48544,2387.9845 87.97914,2387.9845 C 84.81969,2387.9845 82.31221,2387.0113 80.46497,2385.0672 C 78.61064,2383.1231 77.68702,2380.3936 77.68702,2376.8798 C 77.68702,2373.2408 78.624815,2370.4215 80.49332,2368.4148 C 82.36773,2366.4081 84.79135,2365.4006 87.77718,2365.4006 C 90.66616,2365.4006 93.02718,2366.3869 94.85435,2368.3522 C 96.68742,2370.3176 97.60396,2373.0884 97.60396,2376.6506 C 97.60396,2376.8727 97.596873,2377.1999 97.5827,2377.6298 L 81.4725,2377.6298 C 81.604783,2380.005 82.278012,2381.8239 83.48628,2383.0817 C 84.69455,2384.3455 86.19455,2384.9774 88.00045,2384.9774 C 89.33982,2384.9774 90.48549,2384.6231 91.43746,2383.9144 C 92.388247,2383.2129 93.13825,2382.0884 93.69455,2380.54 L 93.6945,2380.54 z M 81.6732,2374.6168 L 93.7358,2374.6168 C 93.576351,2372.8038 93.110997,2371.4361 92.35391,2370.5325 C 91.18698,2369.1235 89.67399,2368.4148 87.81966,2368.4148 C 86.13895,2368.4148 84.72163,2368.977 83.57596,2370.1026 C 82.43029,2371.227 81.7984,2372.7341 81.6732,2374.6168 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path197" />
-
- <path
- d="M 99.639,2387.5 L 107.53467,2376.2713 L 100.22837,2365.8965 L 104.80514,2365.8965 L 108.12404,2370.9587 C 108.74294,2371.9237 109.24963,2372.7292 109.62404,2373.3823 C 110.22168,2372.487 110.77089,2371.6945 111.27758,2371 L 114.91656,2365.8965 L 119.29136,2365.8965 L 111.82561,2376.0693 L 119.86065,2387.5 L 115.36774,2387.5 L 110.93034,2380.7854 L 109.74924,2378.9724 L 104.07641,2387.5 L 99.63901,2387.5 L 99.639,2387.5 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path199" />
-
- <path
- d="M 130.909,2384.22 L 131.43577,2387.4562 C 130.40821,2387.6712 129.48459,2387.7822 128.67199,2387.7822 C 127.33971,2387.7822 126.31097,2387.5743 125.57514,2387.1503 C 124.8464,2386.7334 124.33262,2386.1783 124.0338,2385.4909 C 123.73498,2384.8105 123.58262,2383.3661 123.58262,2381.1716 L 123.58262,2368.7405 L 120.89443,2368.7405 L 120.89443,2365.894 L 123.58262,2365.894 L 123.58262,2360.5401 L 127.2275,2358.3456 L 127.2275,2365.894 L 130.909,2365.894 L 130.909,2368.7405 L 127.2275,2368.7405 L 127.2275,2381.3724 C 127.2275,2382.4212 127.2901,2383.0885 127.4153,2383.3862 C 127.54758,2383.685 127.75545,2383.9212 128.04719,2384.1019 C 128.33892,2384.2755 128.75585,2384.3653 129.29798,2384.3653 C 129.70664,2384.3653 130.24168,2384.3169 130.909,2384.22 L 130.909,2384.22 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path201" />
-
- <path
- d="M 146.067,2395.78 L 146.067,2365.8993 L 149.40007,2365.8993 L 149.40007,2368.7044 C 150.1855,2367.6072 151.07369,2366.7816 152.067,2366.2324 C 153.05322,2365.6843 154.2544,2365.4056 155.66464,2365.4056 C 157.51188,2365.4056 159.13708,2365.8851 160.54614,2366.83 C 161.96228,2367.7808 163.02527,2369.1213 163.74102,2370.8505 C 164.46267,2372.5796 164.82409,2374.4753 164.82409,2376.5375 C 164.82409,2378.7461 164.42842,2380.7387 163.63,2382.5103 C 162.83748,2384.2808 161.68472,2385.6343 160.17173,2386.5792 C 158.65756,2387.517 157.06661,2387.9895 155.40008,2387.9895 C 154.17882,2387.9895 153.08748,2387.732 152.11543,2387.2182 C 151.14338,2386.7044 150.35204,2386.0513 149.72724,2385.267 L 149.72724,2395.78 L 146.067,2395.78 L 146.067,2395.78 z M 149.37999,2376.8221 C 149.37999,2379.6001 149.9422,2381.6552 151.06779,2382.9886 C 152.1922,2384.315 153.55992,2384.9823 155.15795,2384.9823 C 156.78197,2384.9823 158.17803,2384.2949 159.33787,2382.9131 C 160.49771,2381.5383 161.08118,2379.4064 161.08118,2376.5174 C 161.08118,2373.7595 160.51189,2371.7044 159.37921,2370.3296 C 158.24771,2368.9619 156.89299,2368.2745 155.32449,2368.2745 C 153.76189,2368.2745 152.38,2369.0032 151.17882,2370.4619 C 149.97646,2371.9193 149.38,2374.0453 149.38,2376.8221 L 149.37999,2376.8221 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path203" />
-
- <path
- d="M 169.199,2387.5 L 169.199,2365.8965 L 172.49073,2365.8965 L 172.49073,2369.167 C 173.33049,2367.6398 174.10884,2366.6252 174.82341,2366.1398 C 175.53207,2365.6532 176.31632,2365.4028 177.17144,2365.4028 C 178.40687,2365.4028 179.65766,2365.7996 180.93443,2366.5839 L 179.67065,2369.9867 C 178.78246,2369.4516 177.886,2369.1882 176.99073,2369.1882 C 176.18522,2369.1882 175.46947,2369.4315 174.83049,2369.9099 C 174.19151,2370.3965 173.74033,2371.0626 173.46986,2371.9166 C 173.06002,2373.2158 172.85923,2374.639 172.85923,2376.1874 L 172.85923,2387.5 L 169.19899,2387.5 L 169.199,2387.5 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path205" />
-
- <path
- d="M 181.747,2376.69 C 181.747,2372.6908 182.85842,2369.725 185.08716,2367.8022 C 186.94149,2366.2042 189.20566,2365.3987 191.8785,2365.3987 C 194.85133,2365.3987 197.28086,2366.3719 199.16354,2368.3231 C 201.05212,2370.2672 201.98992,2372.9542 201.98992,2376.3853 C 201.98992,2379.1691 201.57299,2381.3577 200.73913,2382.9475 C 199.90645,2384.5443 198.6911,2385.7809 197.10133,2386.662 C 195.5033,2387.5443 193.76708,2387.9825 191.8785,2387.9825 C 188.85842,2387.9825 186.41354,2387.0164 184.54504,2385.0723 C 182.67772,2383.1353 181.74701,2380.3431 181.74701,2376.69 L 181.747,2376.69 z M 185.51117,2376.69 C 185.51117,2379.4609 186.11471,2381.5313 187.32298,2382.9061 C 188.53125,2384.288 190.05251,2384.9754 191.87849,2384.9754 C 193.69857,2384.9754 195.21156,2384.2809 196.41983,2382.8991 C 197.62219,2381.5172 198.22574,2379.4054 198.22574,2376.5731 C 198.22574,2373.8991 197.6222,2371.8711 196.40684,2370.4963 C 195.19149,2369.1215 193.6844,2368.4341 191.87849,2368.4341 C 190.05251,2368.4341 188.53125,2369.1215 187.32298,2370.4892 C 186.11471,2371.8569 185.51117,2373.9262 185.51117,2376.69 L 185.51117,2376.69 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path207" />
-
- <path
- d="M 206.288,2395.78 L 206.288,2365.8993 L 209.62107,2365.8993 L 209.62107,2368.7044 C 210.4065,2367.6072 211.29469,2366.7816 212.288,2366.2324 C 213.27422,2365.6843 214.4754,2365.4056 215.88564,2365.4056 C 217.73288,2365.4056 219.35808,2365.8851 220.76714,2366.83 C 222.18328,2367.7808 223.24627,2369.1213 223.96202,2370.8505 C 224.68367,2372.5796 225.04509,2374.4753 225.04509,2376.5375 C 225.04509,2378.7461 224.64942,2380.7387 223.851,2382.5103 C 223.05848,2384.2808 221.90572,2385.6343 220.39273,2386.5792 C 218.87856,2387.517 217.28761,2387.9895 215.62108,2387.9895 C 214.39982,2387.9895 213.30848,2387.732 212.33643,2387.2182 C 211.36438,2386.7044 210.57304,2386.0513 209.94824,2385.267 L 209.94824,2395.78 L 206.288,2395.78 L 206.288,2395.78 z M 209.60099,2376.8221 C 209.60099,2379.6001 210.1632,2381.6552 211.28879,2382.9886 C 212.4132,2384.315 213.78092,2384.9823 215.37895,2384.9823 C 217.00297,2384.9823 218.39903,2384.2949 219.55887,2382.9131 C 220.71871,2381.5383 221.30218,2379.4064 221.30218,2376.5174 C 221.30218,2373.7595 220.73289,2371.7044 219.60021,2370.3296 C 218.46871,2368.9619 217.11399,2368.2745 215.54549,2368.2745 C 213.98289,2368.2745 212.601,2369.0032 211.39982,2370.4619 C 210.19746,2371.9193 209.601,2374.0453 209.601,2376.8221 L 209.60099,2376.8221 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path209" />
-
- <path
- d="M 228.093,2376.69 C 228.093,2372.6908 229.20442,2369.725 231.43316,2367.8022 C 233.28749,2366.2042 235.55166,2365.3987 238.2245,2365.3987 C 241.19733,2365.3987 243.62686,2366.3719 245.50954,2368.3231 C 247.39812,2370.2672 248.33592,2372.9542 248.33592,2376.3853 C 248.33592,2379.1691 247.91899,2381.3577 247.08513,2382.9475 C 246.25245,2384.5443 245.0371,2385.7809 243.44733,2386.662 C 241.8493,2387.5443 240.11308,2387.9825 238.2245,2387.9825 C 235.20442,2387.9825 232.75954,2387.0164 230.89104,2385.0723 C 229.02372,2383.1353 228.09301,2380.3431 228.09301,2376.69 L 228.093,2376.69 z M 231.85717,2376.69 C 231.85717,2379.4609 232.46071,2381.5313 233.66898,2382.9061 C 234.87725,2384.288 236.39851,2384.9754 238.22449,2384.9754 C 240.04457,2384.9754 241.55756,2384.2809 242.76583,2382.8991 C 243.96819,2381.5172 244.57174,2379.4054 244.57174,2376.5731 C 244.57174,2373.8991 243.9682,2371.8711 242.75284,2370.4963 C 241.53749,2369.1215 240.0304,2368.4341 238.22449,2368.4341 C 236.39851,2368.4341 234.87725,2369.1215 233.66898,2370.4892 C 232.46071,2371.8569 231.85717,2373.9262 231.85717,2376.69 L 231.85717,2376.69 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path211" />
-
- <path
- d="M 252.593,2387.5 L 252.593,2365.8965 L 255.88473,2365.8965 L 255.88473,2369.167 C 256.72449,2367.6398 257.50284,2366.6252 258.21741,2366.1398 C 258.92607,2365.6532 259.71032,2365.4028 260.56544,2365.4028 C 261.80087,2365.4028 263.05166,2365.7996 264.32843,2366.5839 L 263.06465,2369.9867 C 262.17646,2369.4516 261.28,2369.1882 260.38473,2369.1882 C 259.57922,2369.1882 258.86347,2369.4315 258.22449,2369.9099 C 257.58551,2370.3965 257.13433,2371.0626 256.86386,2371.9166 C 256.45402,2373.2158 256.25323,2374.639 256.25323,2376.1874 L 256.25323,2387.5 L 252.59299,2387.5 L 252.593,2387.5 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path213" />
-
- <path
- d="M 274.502,2384.22 L 275.02877,2387.4562 C 274.00121,2387.6712 273.07759,2387.7822 272.26499,2387.7822 C 270.93271,2387.7822 269.90397,2387.5743 269.16814,2387.1503 C 268.4394,2386.7334 267.92562,2386.1783 267.6268,2385.4909 C 267.32798,2384.8105 267.17562,2383.3661 267.17562,2381.1716 L 267.17562,2368.7405 L 264.48743,2368.7405 L 264.48743,2365.894 L 267.17562,2365.894 L 267.17562,2360.5401 L 270.8205,2358.3456 L 270.8205,2365.894 L 274.502,2365.894 L 274.502,2368.7405 L 270.8205,2368.7405 L 270.8205,2381.3724 C 270.8205,2382.4212 270.8831,2383.0885 271.0083,2383.3862 C 271.14058,2383.685 271.34845,2383.9212 271.64019,2384.1019 C 271.93192,2384.2755 272.34885,2384.3653 272.89098,2384.3653 C 273.29964,2384.3653 273.83468,2384.3169 274.502,2384.22 L 274.502,2384.22 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path215" />
-
- <path
- d="M 278.099,2361.89 L 278.099,2357.6758 L 281.76514,2357.6758 L 281.76514,2361.89 L 278.099,2361.89 z M 278.099,2387.501 L 278.099,2365.8975 L 281.76514,2365.8975 L 281.76514,2387.501 L 278.099,2387.501 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path217" />
-
- <path
- d="M 285.973,2376.69 C 285.973,2372.6908 287.08442,2369.725 289.31316,2367.8022 C 291.16749,2366.2042 293.43166,2365.3987 296.1045,2365.3987 C 299.07733,2365.3987 301.50686,2366.3719 303.38954,2368.3231 C 305.27812,2370.2672 306.21592,2372.9542 306.21592,2376.3853 C 306.21592,2379.1691 305.79899,2381.3577 304.96513,2382.9475 C 304.13245,2384.5443 302.9171,2385.7809 301.32733,2386.662 C 299.7293,2387.5443 297.99308,2387.9825 296.1045,2387.9825 C 293.08442,2387.9825 290.63954,2387.0164 288.77104,2385.0723 C 286.90372,2383.1353 285.97301,2380.3431 285.97301,2376.69 L 285.973,2376.69 z M 289.73717,2376.69 C 289.73717,2379.4609 290.34071,2381.5313 291.54898,2382.9061 C 292.75725,2384.288 294.27851,2384.9754 296.10449,2384.9754 C 297.92457,2384.9754 299.43756,2384.2809 300.64583,2382.8991 C 301.84819,2381.5172 302.45174,2379.4054 302.45174,2376.5731 C 302.45174,2373.8991 301.8482,2371.8711 300.63284,2370.4963 C 299.41749,2369.1215 297.9104,2368.4341 296.10449,2368.4341 C 294.27851,2368.4341 292.75725,2369.1215 291.54898,2370.4892 C 290.34071,2371.8569 289.73717,2373.9262 289.73717,2376.69 L 289.73717,2376.69 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path219" />
-
- <path
- d="M 310.514,2387.5 L 310.514,2365.8965 L 313.80573,2365.8965 L 313.80573,2368.9662 C 315.39667,2366.591 317.68801,2365.4028 320.68093,2365.4028 C 321.98605,2365.4028 323.18014,2365.639 324.27148,2366.1044 C 325.36872,2366.5768 326.18014,2367.1874 326.72227,2367.9516 C 327.27148,2368.7087 327.64589,2369.6111 327.86794,2370.6528 C 328.00022,2371.3343 328.06991,2372.5213 328.06991,2374.2162 L 328.06991,2387.5001 L 324.40259,2387.5001 L 324.40259,2374.3544 C 324.40259,2372.8686 324.2644,2371.7501 323.97975,2371.0071 C 323.69511,2370.2713 323.18723,2369.6808 322.46558,2369.2438 C 321.73684,2368.7997 320.88881,2368.5764 319.90967,2368.5764 C 318.34707,2368.5764 317.0077,2369.0772 315.86794,2370.0634 C 314.73644,2371.0556 314.17424,2372.9312 314.17424,2375.702 L 314.17424,2387.5 L 310.514,2387.5 L 310.514,2387.5 z "
- style="fill:#000000;fill-rule:nonzero"
- id="path221" />
-
- </g>
- <path
- d="M 88.126188,369.03622 C 88.126188,356.61906 103.01889,346.69059 127.84056,346.69059 C 152.66211,346.69059 167.55494,356.61906 167.55494,369.02307 L 167.55494,406.26181 C 167.55494,417.22297 158.65917,426.11874 147.698,426.11874 L 107.98331,426.11874 C 94.282043,426.11874 83.162145,437.23902 83.162145,450.94029 L 83.162145,468.32206 L 68.269064,468.30894 C 55.851904,468.30894 45.923056,453.41586 45.923056,428.59425 C 45.923056,403.7727 55.851904,388.87987 68.269064,388.87987 L 127.84063,388.893 L 127.84063,383.92876 L 88.126252,383.92876 L 88.126252,369.03606 L 88.126188,369.03622 z M 105.49443,359.10775 C 109.61173,359.10775 112.94774,362.44376 112.94774,366.54753 C 112.94774,370.66483 109.61173,374.00045 105.49443,374.00045 C 101.39066,374.00045 98.041501,370.66483 98.041501,366.54753 C 98.041501,362.44376 101.39063,359.10775 105.49443,359.10775 z "
- style="fill:url(#pyBlue);fill-opacity:1;fill-rule:evenodd"
- id="path223" />
- <g
- transform="matrix(0.317715,0,0,0.317715,-71.39343,-151.2348)"
- style="fill-rule:evenodd"
- id="_19487936">
- <g
- id="g226">
- <path
- d="M 1200.75,1694 C 1269.1252,1692.8331 1300.1244,1757.1665 1300.7079,1830.124 C 1300.7079,1894.4575 1268.5418,1954.749 1199.6259,1957.041 C 1171.459,1957.041 1147.3338,1948.4166 1123.792,1934.0827 L 1123.792,2082.8327 L 1082.418,2067.874 L 1083.0003,1737.625 C 1082.418,1737.625 1115.1676,1694.5833 1200.1683,1693.4163 L 1200.7506,1693.9998 L 1200.75,1694 z M 1190.4177,1927.166 C 1245.5421,1923.7491 1252.4586,1869.7503 1252.4586,1827.2495 C 1252.4586,1785.8743 1245.5421,1723.8745 1193.2925,1721.5835 C 1157.6669,1719.2496 1128.959,1735.9162 1123.2094,1741.667 L 1123.2094,1905.375 C 1137,1913.9581 1164.5834,1928.9167 1190.4177,1927.1663 L 1190.4177,1927.166 z "
- style="fill:#6a6a6a"
- id="_19487984" />
-
- <path
- d="M 1387.87,1869.75 L 1387.87,1693.416 L 1345.3704,1707.7912 L 1345.3704,1882.3742 C 1345.3704,1928.9155 1388.4535,1955.9155 1426.3704,1955.9155 C 1475.7452,1955.9155 1503.9121,1942.1238 1516.5369,1936.3742 C 1517.1204,1942.6659 1516.5369,1940.9569 1516.5369,1947.2899 C 1516.5369,1965.6655 1515.9534,1997.2493 1507.3704,2013.3324 C 1490.1204,2046.082 1444.1613,2050.6659 1411.9952,2055.2485 L 1418.9117,2081.665 C 1461.4113,2080.5406 1521.1197,2064.4575 1542.3697,2024.2481 C 1554.4536,2001.2485 1556.1614,1957.0398 1556.1614,1927.7485 L 1556.1614,1699.7485 L 1514.2453,1699.7485 L 1514.2453,1904.7905 C 1500.4536,1913.957 1475.2028,1926.6244 1452.7866,1927.1653 C 1415.4531,1927.7488 1387.8697,1907.6653 1387.8697,1869.1661 L 1387.8697,1869.7496 L 1387.87,1869.75 z "
- style="fill:#6a6a6a"
- id="_19488200" />
-
- <path
- d="M 1626.62,1726.75 L 1626.62,1891.583 C 1626.62,1934.6661 1659.9117,1959.9169 1715.6196,1954.7495 L 1715.6196,1932.9168 C 1686.3283,1931.7912 1668.5361,1923.7491 1668.5361,1890.416 L 1668.5361,1726.749 L 1715.6196,1726.749 L 1715.6196,1699.749 L 1668.5361,1699.749 L 1668.5361,1614.7498 L 1626.62,1629.6671 L 1626.62,1699.749 L 1597.8696,1699.749 L 1597.8696,1726.749 L 1626.62,1726.749 L 1626.62,1726.75 z "
- style="fill:#6a6a6a"
- id="_19488488" />
-
- <path
- d="M 1970.21,1951.29 L 1970.21,1776.123 C 1970.21,1732.4565 1940.3352,1697.999 1895.5431,1697.999 C 1861.6266,1697.999 1832.9187,1708.9147 1807.6691,1727.2903 L 1807.6691,1550.9993 L 1765.7104,1564.2087 L 1765.7104,1951.2897 L 1807.6691,1951.2897 L 1807.6691,1757.1647 C 1828.9183,1742.2474 1853.0435,1726.7478 1879.46,1726.7478 C 1913.3352,1726.7478 1927.7104,1760.0395 1927.7104,1789.3309 L 1927.7104,1951.2899 L 1970.21,1951.2899 L 1970.21,1951.29 z "
- style="fill:#6a6a6a"
- id="_126749024" />
-
- <path
- d="M 2007.75,1820.92 C 2007.75,1890.4196 2044.5,1955.92 2122.041,1956.462 C 2200.1662,1955.9199 2238.042,1890.4195 2238.042,1820.92 C 2237.4999,1753.1696 2195.0003,1694.003 2122.625,1693.42 C 2050.8341,1694.0035 2007.751,1753.1696 2007.751,1820.92 L 2007.75,1820.92 z M 2053.1244,1820.92 C 2053.1244,1775.5444 2064.5823,1725.5861 2122.0405,1722.1279 C 2176.0405,1725.0039 2192.1248,1775.5444 2192.1248,1820.92 C 2192.1248,1869.1704 2181.75,1928.92 2123.1661,1930.628 C 2069.2074,1930.0445 2053.7078,1869.1705 2053.7078,1820.92 L 2053.1243,1820.92 L 2053.1244,1820.92 z "
- style="fill:#6a6a6a"
- id="_126677456" />
-
- <path
- d="M 2477.04,1951.29 L 2477.04,1758.873 C 2477.04,1724.999 2450.0813,1703.1651 2419.6231,1696.2899 C 2389.7483,1689.4147 2361.6239,1695.1655 2340.957,1700.8738 C 2314.4991,1707.7903 2295.5814,1719.8317 2274.3322,1735.3313 L 2274.3322,1951.2903 L 2316.2483,1951.2903 L 2316.2483,1740.4993 C 2329.4566,1731.3327 2350.707,1721.5828 2373.0818,1720.9993 C 2409.8731,1720.4158 2435.1239,1741.6662 2435.1239,1780.1654 L 2435.1239,1951.2904 L 2477.04,1951.2904 L 2477.04,1951.29 z "
- style="fill:#6a6a6a"
- id="_126678176" />
-
- </g>
-
- </g>
- <path
- d="M 167.55462,488.16664 C 167.55462,500.58418 152.66192,510.51265 127.84025,510.51265 C 103.0187,510.51265 88.12587,500.58418 88.12587,488.17979 L 88.12587,450.94105 C 88.12587,439.97988 97.021636,431.08374 107.9828,431.08374 L 147.6975,431.08374 C 161.39877,431.08374 172.51904,419.96384 172.51904,406.26257 L 172.51904,388.8808 L 187.41174,388.89392 C 199.81575,388.89392 209.7446,403.787 209.7446,428.60829 C 209.7446,453.42984 199.81575,468.32298 187.41174,468.32298 L 127.84018,468.30986 L 127.84018,473.2741 L 167.55456,473.2741 L 167.55456,488.1668 L 167.55462,488.16664 z M 150.17323,498.0951 C 146.06946,498.0951 142.73345,494.75948 142.73345,490.65533 C 142.73345,486.53841 146.06946,483.2024 150.17323,483.2024 C 154.29015,483.2024 157.62615,486.53841 157.62615,490.65533 C 157.62615,494.75948 154.29015,498.0951 150.17323,498.0951 z "
- style="fill:url(#pyYellow);fill-opacity:1;fill-rule:evenodd"
- id="path234" />
- </g>
-</svg>
diff --git a/PC/icons/source.xar b/PC/icons/source.xar
deleted file mode 100644
index 84cbbc4d88..0000000000
--- a/PC/icons/source.xar
+++ /dev/null
Binary files differ
diff --git a/PC/invalid_parameter_handler.c b/PC/invalid_parameter_handler.c
new file mode 100644
index 0000000000..d634710cbe
--- /dev/null
+++ b/PC/invalid_parameter_handler.c
@@ -0,0 +1,22 @@
+#ifdef _MSC_VER
+
+#include <stdlib.h>
+
+#if _MSC_VER >= 1900
+/* pyconfig.h uses this function in the _Py_BEGIN/END_SUPPRESS_IPH
+ * macros. It does not need to be defined when building using MSVC
+ * earlier than 14.0 (_MSC_VER == 1900).
+ */
+
+static void __cdecl _silent_invalid_parameter_handler(
+ wchar_t const* expression,
+ wchar_t const* function,
+ wchar_t const* file,
+ unsigned int line,
+ uintptr_t pReserved) { }
+
+_invalid_parameter_handler _Py_silent_invalid_parameter_handler = _silent_invalid_parameter_handler;
+
+#endif
+
+#endif
diff --git a/PC/launcher.c b/PC/launcher.c
index bbb28da6fd..db5226e466 100644
--- a/PC/launcher.c
+++ b/PC/launcher.c
@@ -87,16 +87,16 @@ error(int rc, wchar_t * format, ... )
if (rc == 0) { /* a Windows error */
winerror(GetLastError(), win_message, MSGSIZE);
if (len >= 0) {
- _snwprintf_s(&message[len], MSGSIZE - len, _TRUNCATE, L": %s",
+ _snwprintf_s(&message[len], MSGSIZE - len, _TRUNCATE, L": %ls",
win_message);
}
}
#if !defined(_WINDOWS)
- fwprintf(stderr, L"%s\n", message);
+ fwprintf(stderr, L"%ls\n", message);
#else
MessageBox(NULL, message, TEXT("Python Launcher is sorry to say ..."),
- MB_OK);
+ MB_OK);
#endif
ExitProcess(rc);
}
@@ -157,15 +157,23 @@ static INSTALLED_PYTHON installed_pythons[MAX_INSTALLED_PYTHONS];
static size_t num_installed_pythons = 0;
-/* to hold SOFTWARE\Python\PythonCore\X.Y\InstallPath */
+/*
+ * To hold SOFTWARE\Python\PythonCore\X.Y...\InstallPath
+ * The version name can be longer than MAX_VERSION_SIZE, but will be
+ * truncated to just X.Y for comparisons.
+ */
#define IP_BASE_SIZE 40
-#define IP_SIZE (IP_BASE_SIZE + MAX_VERSION_SIZE)
+#define IP_VERSION_SIZE 8
+#define IP_SIZE (IP_BASE_SIZE + IP_VERSION_SIZE)
#define CORE_PATH L"SOFTWARE\\Python\\PythonCore"
static wchar_t * location_checks[] = {
L"\\",
- L"\\PCBuild\\",
+ L"\\PCBuild\\win32\\",
L"\\PCBuild\\amd64\\",
+ // To support early 32bit versions of Python that stuck the build binaries
+ // directly in PCBuild...
+ L"\\PCBuild\\",
NULL
};
@@ -196,35 +204,38 @@ locate_pythons_for_key(HKEY root, REGSAM flags)
BOOL ok;
DWORD type, data_size, attrs;
INSTALLED_PYTHON * ip, * pip;
+ wchar_t ip_version[IP_VERSION_SIZE];
wchar_t ip_path[IP_SIZE];
wchar_t * check;
wchar_t ** checkp;
wchar_t *key_name = (root == HKEY_LOCAL_MACHINE) ? L"HKLM" : L"HKCU";
if (status != ERROR_SUCCESS)
- debug(L"locate_pythons_for_key: unable to open PythonCore key in %s\n",
+ debug(L"locate_pythons_for_key: unable to open PythonCore key in %ls\n",
key_name);
else {
ip = &installed_pythons[num_installed_pythons];
for (i = 0; num_installed_pythons < MAX_INSTALLED_PYTHONS; i++) {
- status = RegEnumKeyW(core_root, i, ip->version, MAX_VERSION_SIZE);
+ status = RegEnumKeyW(core_root, i, ip_version, IP_VERSION_SIZE);
if (status != ERROR_SUCCESS) {
if (status != ERROR_NO_MORE_ITEMS) {
/* unexpected error */
winerror(status, message, MSGSIZE);
- debug(L"Can't enumerate registry key for version %s: %s\n",
- ip->version, message);
+ debug(L"Can't enumerate registry key for version %ls: %ls\n",
+ ip_version, message);
}
break;
}
else {
+ wcsncpy_s(ip->version, MAX_VERSION_SIZE, ip_version,
+ MAX_VERSION_SIZE-1);
_snwprintf_s(ip_path, IP_SIZE, _TRUNCATE,
- L"%s\\%s\\InstallPath", CORE_PATH, ip->version);
+ L"%ls\\%ls\\InstallPath", CORE_PATH, ip_version);
status = RegOpenKeyExW(root, ip_path, 0, flags, &ip_key);
if (status != ERROR_SUCCESS) {
winerror(status, message, MSGSIZE);
// Note: 'message' already has a trailing \n
- debug(L"%s\\%s: %s", key_name, ip_path, message);
+ debug(L"%ls\\%ls: %ls", key_name, ip_path, message);
continue;
}
data_size = sizeof(ip->executable) - 1;
@@ -233,7 +244,7 @@ locate_pythons_for_key(HKEY root, REGSAM flags)
RegCloseKey(ip_key);
if (status != ERROR_SUCCESS) {
winerror(status, message, MSGSIZE);
- debug(L"%s\\%s: %s\n", key_name, ip_path, message);
+ debug(L"%ls\\%ls: %ls\n", key_name, ip_path, message);
continue;
}
if (type == REG_SZ) {
@@ -246,27 +257,27 @@ locate_pythons_for_key(HKEY root, REGSAM flags)
_snwprintf_s(&ip->executable[data_size],
MAX_PATH - data_size,
MAX_PATH - data_size,
- L"%s%s", check, PYTHON_EXECUTABLE);
+ L"%ls%ls", check, PYTHON_EXECUTABLE);
attrs = GetFileAttributesW(ip->executable);
if (attrs == INVALID_FILE_ATTRIBUTES) {
winerror(GetLastError(), message, MSGSIZE);
- debug(L"locate_pythons_for_key: %s: %s",
+ debug(L"locate_pythons_for_key: %ls: %ls",
ip->executable, message);
}
else if (attrs & FILE_ATTRIBUTE_DIRECTORY) {
- debug(L"locate_pythons_for_key: '%s' is a \
+ debug(L"locate_pythons_for_key: '%ls' is a \
directory\n",
ip->executable, attrs);
}
else if (find_existing_python(ip->executable)) {
- debug(L"locate_pythons_for_key: %s: already \
+ debug(L"locate_pythons_for_key: %ls: already \
found\n", ip->executable);
}
else {
/* check the executable type. */
ok = GetBinaryTypeW(ip->executable, &attrs);
if (!ok) {
- debug(L"Failure getting binary type: %s\n",
+ debug(L"Failure getting binary type: %ls\n",
ip->executable);
}
else {
@@ -277,7 +288,7 @@ found\n", ip->executable);
else
ip->bits = 0;
if (ip->bits == 0) {
- debug(L"locate_pythons_for_key: %s: \
+ debug(L"locate_pythons_for_key: %ls: \
invalid binary type: %X\n",
ip->executable, attrs);
}
@@ -291,7 +302,7 @@ invalid binary type: %X\n",
ip->executable[n + 1] = L'\"';
ip->executable[n + 2] = L'\0';
}
- debug(L"locate_pythons_for_key: %s \
+ debug(L"locate_pythons_for_key: %ls \
is a %dbit executable\n",
ip->executable, ip->bits);
++num_installed_pythons;
@@ -341,7 +352,7 @@ locate_all_pythons()
locate_pythons_for_key(HKEY_CURRENT_USER, KEY_READ | KEY_WOW64_64KEY);
locate_pythons_for_key(HKEY_LOCAL_MACHINE, KEY_READ | KEY_WOW64_64KEY);
}
-#endif
+#endif
// now hit the "native" key for this process bittedness.
debug(L"locating Pythons in native registry\n");
locate_pythons_for_key(HKEY_CURRENT_USER, KEY_READ);
@@ -376,6 +387,31 @@ find_python_by_version(wchar_t const * wanted_ver)
}
+static wchar_t *
+find_python_by_venv()
+{
+ static wchar_t venv_python[MAX_PATH];
+ wchar_t *virtual_env = get_env(L"VIRTUAL_ENV");
+ DWORD attrs;
+
+ /* Check for VIRTUAL_ENV environment variable */
+ if (virtual_env == NULL || virtual_env[0] == L'\0') {
+ return NULL;
+ }
+
+ /* Check for a python executable in the venv */
+ debug(L"Checking for Python executable in virtual env '%ls'\n", virtual_env);
+ _snwprintf_s(venv_python, MAX_PATH, _TRUNCATE,
+ L"%ls\\Scripts\\%ls", virtual_env, PYTHON_EXECUTABLE);
+ attrs = GetFileAttributesW(venv_python);
+ if (attrs == INVALID_FILE_ATTRIBUTES) {
+ debug(L"Python executable %ls missing from virtual env\n", venv_python);
+ return NULL;
+ }
+
+ return venv_python;
+}
+
static wchar_t appdata_ini_path[MAX_PATH];
static wchar_t launcher_ini_path[MAX_PATH];
@@ -397,7 +433,7 @@ get_configured_value(wchar_t * key)
DWORD size;
/* First, search the environment. */
- _snwprintf_s(configured_value, MSGSIZE, _TRUNCATE, L"py_%s", key);
+ _snwprintf_s(configured_value, MSGSIZE, _TRUNCATE, L"py_%ls", key);
result = get_env(configured_value);
if (result == NULL && appdata_ini_path[0]) {
/* Not in environment: check local configuration. */
@@ -420,10 +456,10 @@ get_configured_value(wchar_t * key)
}
}
if (result) {
- debug(L"found configured value '%s=%s' in %s\n",
+ debug(L"found configured value '%ls=%ls' in %ls\n",
key, result, found_in ? found_in : L"(unknown)");
} else {
- debug(L"found no configured value for '%s'\n", key);
+ debug(L"found no configured value for '%ls'\n", key);
}
return result;
}
@@ -449,9 +485,9 @@ locate_python(wchar_t * wanted_ver)
}
if (*wanted_ver) {
result = find_python_by_version(wanted_ver);
- debug(L"search for Python version '%s' found ", wanted_ver);
+ debug(L"search for Python version '%ls' found ", wanted_ver);
if (result) {
- debug(L"'%s'\n", result->executable);
+ debug(L"'%ls'\n", result->executable);
} else {
debug(L"no interpreter\n");
}
@@ -467,7 +503,7 @@ locate_python(wchar_t * wanted_ver)
result = find_python_by_version(L"3");
debug(L"search for default Python found ");
if (result) {
- debug(L"version %s at '%s'\n",
+ debug(L"version %ls at '%ls'\n",
result->version, result->executable);
} else {
debug(L"no interpreter\n");
@@ -505,19 +541,19 @@ locate_wrapped_script()
plen = GetModuleFileNameW(NULL, wrapped_script_path, MAX_PATH);
p = wcsrchr(wrapped_script_path, L'.');
if (p == NULL) {
- debug(L"GetModuleFileNameW returned value has no extension: %s\n",
+ debug(L"GetModuleFileNameW returned value has no extension: %ls\n",
wrapped_script_path);
- error(RC_NO_SCRIPT, L"Wrapper name '%s' is not valid.", wrapped_script_path);
+ error(RC_NO_SCRIPT, L"Wrapper name '%ls' is not valid.", wrapped_script_path);
}
wcsncpy_s(p, MAX_PATH - (p - wrapped_script_path) + 1, SCRIPT_SUFFIX, _TRUNCATE);
attrs = GetFileAttributesW(wrapped_script_path);
if (attrs == INVALID_FILE_ATTRIBUTES) {
- debug(L"File '%s' non-existent\n", wrapped_script_path);
- error(RC_NO_SCRIPT, L"Script file '%s' is not present.", wrapped_script_path);
+ debug(L"File '%ls' non-existent\n", wrapped_script_path);
+ error(RC_NO_SCRIPT, L"Script file '%ls' is not present.", wrapped_script_path);
}
- debug(L"Using wrapped script file '%s'\n", wrapped_script_path);
+ debug(L"Using wrapped script file '%ls'\n", wrapped_script_path);
}
#endif
@@ -571,7 +607,7 @@ run_child(wchar_t * cmdline)
// window, or fetching a message). As this launcher doesn't do this
// directly, that cursor remains even after the child process does these
// things. We avoid that by doing a simple post+get message.
- // See http://bugs.python.org/issue17290 and
+ // See http://bugs.python.org/issue17290 and
// https://bitbucket.org/vinay.sajip/pylauncher/issue/20/busy-cursor-for-a-long-time-when-running
MSG msg;
@@ -579,7 +615,7 @@ run_child(wchar_t * cmdline)
GetMessage(&msg, 0, 0, 0);
#endif
- debug(L"run_child: about to run '%s'\n", cmdline);
+ debug(L"run_child: about to run '%ls'\n", cmdline);
job = CreateJobObject(NULL, NULL);
ok = QueryInformationJobObject(job, JobObjectExtendedLimitInformation,
&info, sizeof(info), &rc);
@@ -611,7 +647,7 @@ run_child(wchar_t * cmdline)
ok = CreateProcessW(NULL, cmdline, NULL, NULL, TRUE,
0, NULL, NULL, &si, &pi);
if (!ok)
- error(RC_CREATE_PROCESS, L"Unable to create process using '%s'", cmdline);
+ error(RC_CREATE_PROCESS, L"Unable to create process using '%ls'", cmdline);
AssignProcessToJobObject(job, pi.hProcess);
CloseHandle(pi.hThread);
WaitForSingleObjectEx(pi.hProcess, INFINITE, FALSE);
@@ -648,11 +684,11 @@ invoke_child(wchar_t * executable, wchar_t * suffix, wchar_t * cmdline)
child_command_size);
if (no_suffix)
_snwprintf_s(child_command, child_command_size,
- child_command_size - 1, L"%s %s",
+ child_command_size - 1, L"%ls %ls",
executable, cmdline);
else
_snwprintf_s(child_command, child_command_size,
- child_command_size - 1, L"%s %s %s",
+ child_command_size - 1, L"%ls %ls %ls",
executable, suffix, cmdline);
run_child(child_command);
free(child_command);
@@ -791,7 +827,7 @@ static void
add_command(wchar_t * name, wchar_t * cmdline)
{
if (num_commands >= MAX_COMMANDS) {
- debug(L"can't add %s = '%s': no room\n", name, cmdline);
+ debug(L"can't add %ls = '%ls': no room\n", name, cmdline);
}
else {
COMMAND * cp = &commands[num_commands++];
@@ -813,14 +849,14 @@ read_config_file(wchar_t * config_path)
read = GetPrivateProfileStringW(L"commands", NULL, NULL, keynames, MSGSIZE,
config_path);
if (read == MSGSIZE - 1) {
- debug(L"read_commands: %s: not enough space for names\n", config_path);
+ debug(L"read_commands: %ls: not enough space for names\n", config_path);
}
key = keynames;
while (*key) {
read = GetPrivateProfileStringW(L"commands", key, NULL, value, MSGSIZE,
config_path);
if (read == MSGSIZE - 1) {
- debug(L"read_commands: %s: not enough space for %s\n",
+ debug(L"read_commands: %ls: not enough space for %ls\n",
config_path, key);
}
cmdp = skip_whitespace(value);
@@ -932,10 +968,12 @@ typedef struct {
*/
static BOM BOMs[] = {
{ 3, { 0xEF, 0xBB, 0xBF }, CP_UTF8 }, /* UTF-8 - keep first */
- { 2, { 0xFF, 0xFE }, CP_UTF16LE }, /* UTF-16LE */
- { 2, { 0xFE, 0xFF }, CP_UTF16BE }, /* UTF-16BE */
+ /* Test UTF-32LE before UTF-16LE since UTF-16LE BOM is a prefix
+ * of UTF-32LE BOM. */
{ 4, { 0xFF, 0xFE, 0x00, 0x00 }, CP_UTF32LE }, /* UTF-32LE */
{ 4, { 0x00, 0x00, 0xFE, 0xFF }, CP_UTF32BE }, /* UTF-32BE */
+ { 2, { 0xFF, 0xFE }, CP_UTF16LE }, /* UTF-16LE */
+ { 2, { 0xFE, 0xFF }, CP_UTF16BE }, /* UTF-16BE */
{ 0 } /* sentinel */
};
@@ -1030,18 +1068,21 @@ typedef struct {
} PYC_MAGIC;
static PYC_MAGIC magic_values[] = {
- { 0xc687, 0xc687, L"2.0" },
- { 0xeb2a, 0xeb2a, L"2.1" },
- { 0xed2d, 0xed2d, L"2.2" },
- { 0xf23b, 0xf245, L"2.3" },
- { 0xf259, 0xf26d, L"2.4" },
- { 0xf277, 0xf2b3, L"2.5" },
- { 0xf2c7, 0xf2d1, L"2.6" },
- { 0xf2db, 0xf303, L"2.7" },
- { 0x0bb8, 0x0c3b, L"3.0" },
- { 0x0c45, 0x0c4f, L"3.1" },
- { 0x0c58, 0x0c6c, L"3.2" },
- { 0x0c76, 0x0c76, L"3.3" },
+ { 50823, 50823, L"2.0" },
+ { 60202, 60202, L"2.1" },
+ { 60717, 60717, L"2.2" },
+ { 62011, 62021, L"2.3" },
+ { 62041, 62061, L"2.4" },
+ { 62071, 62131, L"2.5" },
+ { 62151, 62161, L"2.6" },
+ { 62171, 62211, L"2.7" },
+ { 3000, 3131, L"3.0" },
+ { 3141, 3151, L"3.1" },
+ { 3160, 3180, L"3.2" },
+ { 3190, 3230, L"3.3" },
+ { 3250, 3310, L"3.4" },
+ { 3320, 3350, L"3.5" },
+ { 3360, 3361, L"3.6" },
{ 0 }
};
@@ -1097,7 +1138,7 @@ maybe_handle_shebang(wchar_t ** argv, wchar_t * cmdline)
if ((read >= 4) && (buffer[3] == '\n') && (buffer[2] == '\r')) {
ip = find_by_magic((buffer[1] << 8 | buffer[0]) & 0xFFFF);
if (ip != NULL) {
- debug(L"script file is compiled against Python %s\n",
+ debug(L"script file is compiled against Python %ls\n",
ip->version);
invoke_child(ip->executable, NULL, cmdline);
}
@@ -1200,7 +1241,7 @@ of bytes: %d\n", header_len);
is_virt = parse_shebang(shebang_line, nchars, &command,
&suffix, &search);
if (command != NULL) {
- debug(L"parse_shebang: found command: %s\n", command);
+ debug(L"parse_shebang: found command: %ls\n", command);
if (!is_virt) {
invoke_child(command, suffix, cmdline);
}
@@ -1212,7 +1253,7 @@ of bytes: %d\n", header_len);
}
if (wcsncmp(command, L"python", 6))
error(RC_BAD_VIRTUAL_PATH, L"Unknown virtual \
-path '%s'", command);
+path '%ls'", command);
command += 6; /* skip past "python" */
if (search && ((*command == L'\0') || isspace(*command))) {
/* Command is eligible for path search, and there
@@ -1220,9 +1261,9 @@ path '%s'", command);
*/
debug(L"searching PATH for python executable\n");
cmd = find_on_path(PYTHON_EXECUTABLE);
- debug(L"Python on path: %s\n", cmd ? cmd->value : L"<not found>");
+ debug(L"Python on path: %ls\n", cmd ? cmd->value : L"<not found>");
if (cmd) {
- debug(L"located python on PATH: %s\n", cmd->value);
+ debug(L"located python on PATH: %ls\n", cmd->value);
invoke_child(cmd->value, suffix, cmdline);
/* Exit here, as we have found the command */
return;
@@ -1233,14 +1274,14 @@ path '%s'", command);
}
if (*command && !validate_version(command))
error(RC_BAD_VIRTUAL_PATH, L"Invalid version \
-specification: '%s'.\nIn the first line of the script, 'python' needs to be \
+specification: '%ls'.\nIn the first line of the script, 'python' needs to be \
followed by a valid version specifier.\nPlease check the documentation.",
command);
/* TODO could call validate_version(command) */
ip = locate_python(command);
if (ip == NULL) {
error(RC_NO_PYTHON, L"Requested Python version \
-(%s) is not installed", command);
+(%ls) is not installed", command);
}
else {
invoke_child(ip->executable, suffix, cmdline);
@@ -1301,6 +1342,7 @@ process(int argc, wchar_t ** argv)
{
wchar_t * wp;
wchar_t * command;
+ wchar_t * executable;
wchar_t * p;
int rc = 0;
size_t plen;
@@ -1347,17 +1389,17 @@ process(int argc, wchar_t ** argv)
wcsncpy_s(p, MAX_PATH - plen, L"\\py.ini", _TRUNCATE);
attrs = GetFileAttributesW(appdata_ini_path);
if (attrs == INVALID_FILE_ATTRIBUTES) {
- debug(L"File '%s' non-existent\n", appdata_ini_path);
+ debug(L"File '%ls' non-existent\n", appdata_ini_path);
appdata_ini_path[0] = L'\0';
} else {
- debug(L"Using local configuration file '%s'\n", appdata_ini_path);
+ debug(L"Using local configuration file '%ls'\n", appdata_ini_path);
}
}
plen = GetModuleFileNameW(NULL, launcher_ini_path, MAX_PATH);
size = GetFileVersionInfoSizeW(launcher_ini_path, &size);
if (size == 0) {
winerror(GetLastError(), message, MSGSIZE);
- debug(L"GetFileVersionInfoSize failed: %s\n", message);
+ debug(L"GetFileVersionInfoSize failed: %ls\n", message);
}
else {
version_data = malloc(size);
@@ -1381,7 +1423,7 @@ process(int argc, wchar_t ** argv)
}
p = wcsrchr(launcher_ini_path, L'\\');
if (p == NULL) {
- debug(L"GetModuleFileNameW returned value has no backslash: %s\n",
+ debug(L"GetModuleFileNameW returned value has no backslash: %ls\n",
launcher_ini_path);
launcher_ini_path[0] = L'\0';
}
@@ -1390,15 +1432,15 @@ process(int argc, wchar_t ** argv)
_TRUNCATE);
attrs = GetFileAttributesW(launcher_ini_path);
if (attrs == INVALID_FILE_ATTRIBUTES) {
- debug(L"File '%s' non-existent\n", launcher_ini_path);
+ debug(L"File '%ls' non-existent\n", launcher_ini_path);
launcher_ini_path[0] = L'\0';
} else {
- debug(L"Using global configuration file '%s'\n", launcher_ini_path);
+ debug(L"Using global configuration file '%ls'\n", launcher_ini_path);
}
}
command = skip_me(GetCommandLineW());
- debug(L"Called with command line: %s\n", command);
+ debug(L"Called with command line: %ls\n", command);
#if defined(SCRIPT_WRAPPER)
/* The launcher is being used in "script wrapper" mode.
@@ -1422,7 +1464,7 @@ process(int argc, wchar_t ** argv)
wcscpy_s(newcommand, newlen, wrapped_script_path);
wcscat_s(newcommand, newlen, L" ");
wcscat_s(newcommand, newlen, command);
- debug(L"Running wrapped script with command line '%s'\n", newcommand);
+ debug(L"Running wrapped script with command line '%ls'\n", newcommand);
read_commands();
av[0] = wrapped_script_path;
av[1] = NULL;
@@ -1443,8 +1485,9 @@ process(int argc, wchar_t ** argv)
if (valid) {
ip = locate_python(&p[1]);
if (ip == NULL)
- error(RC_NO_PYTHON, L"Requested Python version (%s) not \
+ error(RC_NO_PYTHON, L"Requested Python version (%ls) not \
installed", &p[1]);
+ executable = ip->executable;
command += wcslen(p);
command = skip_whitespace(command);
}
@@ -1462,9 +1505,16 @@ installed", &p[1]);
#endif
if (!valid) {
- ip = locate_python(L"");
- if (ip == NULL)
- error(RC_NO_PYTHON, L"Can't find a default Python.");
+ /* Look for an active virtualenv */
+ executable = find_python_by_venv();
+
+ /* If we didn't find one, look for the default Python */
+ if (executable == NULL) {
+ ip = locate_python(L"");
+ if (ip == NULL)
+ error(RC_NO_PYTHON, L"Can't find a default Python.");
+ executable = ip->executable;
+ }
if ((argc == 2) && (!_wcsicmp(p, L"-h") || !_wcsicmp(p, L"--help"))) {
#if defined(_M_X64)
BOOL canDo64bit = TRUE;
@@ -1476,9 +1526,9 @@ installed", &p[1]);
get_version_info(version_text, MAX_PATH);
fwprintf(stdout, L"\
-Python Launcher for Windows Version %s\n\n", version_text);
+Python Launcher for Windows Version %ls\n\n", version_text);
fwprintf(stdout, L"\
-usage: %s [ launcher-arguments ] [ python-arguments ] script [ script-arguments ]\n\n", argv[0]);
+usage: %ls [ launcher-arguments ] [ python-arguments ] script [ script-arguments ]\n\n", argv[0]);
fputws(L"\
Launcher arguments:\n\n\
-2 : Launch the latest Python 2.x version\n\
@@ -1492,7 +1542,7 @@ Launcher arguments:\n\n\
fflush(stdout);
}
}
- invoke_child(ip->executable, NULL, command);
+ invoke_child(executable, NULL, command);
return rc;
}
diff --git a/PC/msvcrtmodule.c b/PC/msvcrtmodule.c
index 18dec6dbe8..52d4100759 100644
--- a/PC/msvcrtmodule.c
+++ b/PC/msvcrtmodule.c
@@ -32,421 +32,451 @@
#endif
#endif
-// Force the malloc heap to clean itself up, and free unused blocks
-// back to the OS. (According to the docs, only works on NT.)
+/*[python input]
+class Py_intptr_t_converter(CConverter):
+ type = 'Py_intptr_t'
+ format_unit = '"_Py_PARSE_INTPTR"'
+
+class handle_return_converter(long_return_converter):
+ type = 'Py_intptr_t'
+ cast = '(void *)'
+ conversion_fn = 'PyLong_FromVoidPtr'
+
+class byte_char_return_converter(CReturnConverter):
+ type = 'int'
+
+ def render(self, function, data):
+ data.declarations.append('char s[1];')
+ data.return_value = 's[0]'
+ data.return_conversion.append(
+ 'return_value = PyBytes_FromStringAndSize(s, 1);\n')
+
+class wchar_t_return_converter(CReturnConverter):
+ type = 'wchar_t'
+
+ def render(self, function, data):
+ self.declare(data)
+ data.return_conversion.append(
+ 'return_value = PyUnicode_FromOrdinal(_return_value);\n')
+[python start generated code]*/
+/*[python end generated code: output=da39a3ee5e6b4b0d input=6a54fc4e73d0b367]*/
+
+/*[clinic input]
+module msvcrt
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=f31a87a783d036cd]*/
+
+#include "clinic/msvcrtmodule.c.h"
+
+/*[clinic input]
+msvcrt.heapmin
+
+Minimize the malloc() heap.
+
+Force the malloc() heap to clean itself up and return unused blocks
+to the operating system. On failure, this raises OSError.
+[clinic start generated code]*/
+
static PyObject *
-msvcrt_heapmin(PyObject *self, PyObject *args)
+msvcrt_heapmin_impl(PyModuleDef *module)
+/*[clinic end generated code: output=464f866feb57c436 input=82e1771d21bde2d8]*/
{
- if (!PyArg_ParseTuple(args, ":heapmin"))
- return NULL;
-
if (_heapmin() != 0)
return PyErr_SetFromErrno(PyExc_IOError);
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
+/*[clinic input]
+msvcrt.locking
+
+ fd: int
+ mode: int
+ nbytes: long
+ /
-PyDoc_STRVAR(heapmin_doc,
-"heapmin() -> None\n\
-\n\
-Force the malloc() heap to clean itself up and return unused blocks\n\
-to the operating system. On failure, this raises IOError.");
+Lock part of a file based on file descriptor fd from the C runtime.
+
+Raises IOError on failure. The locked region of the file extends from
+the current file position for nbytes bytes, and may continue beyond
+the end of the file. mode must be one of the LK_* constants listed
+below. Multiple regions in a file may be locked at the same time, but
+may not overlap. Adjacent regions are not merged; they must be unlocked
+individually.
+[clinic start generated code]*/
-// Perform locking operations on a C runtime file descriptor.
static PyObject *
-msvcrt_locking(PyObject *self, PyObject *args)
+msvcrt_locking_impl(PyModuleDef *module, int fd, int mode, long nbytes)
+/*[clinic end generated code: output=dff41e5e76d544de input=d9f13f0f6a713ba7]*/
{
- int fd;
- int mode;
- long nbytes;
int err;
- if (!PyArg_ParseTuple(args, "iil:locking", &fd, &mode, &nbytes))
- return NULL;
-
Py_BEGIN_ALLOW_THREADS
err = _locking(fd, mode, nbytes);
Py_END_ALLOW_THREADS
if (err != 0)
return PyErr_SetFromErrno(PyExc_IOError);
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
-PyDoc_STRVAR(locking_doc,
-"locking(fd, mode, nbytes) -> None\n\
-\n\
-Lock part of a file based on file descriptor fd from the C runtime.\n\
-Raises IOError on failure. The locked region of the file extends from\n\
-the current file position for nbytes bytes, and may continue beyond\n\
-the end of the file. mode must be one of the LK_* constants listed\n\
-below. Multiple regions in a file may be locked at the same time, but\n\
-may not overlap. Adjacent regions are not merged; they must be unlocked\n\
-individually.");
-
-// Set the file translation mode for a C runtime file descriptor.
-static PyObject *
-msvcrt_setmode(PyObject *self, PyObject *args)
-{
- int fd;
- int flags;
- if (!PyArg_ParseTuple(args,"ii:setmode", &fd, &flags))
- return NULL;
+/*[clinic input]
+msvcrt.setmode -> long
+
+ fd: int
+ mode as flags: int
+ /
+
+Set the line-end translation mode for the file descriptor fd.
+
+To set it to text mode, flags should be os.O_TEXT; for binary, it
+should be os.O_BINARY.
+
+Return value is the previous mode.
+[clinic start generated code]*/
+static long
+msvcrt_setmode_impl(PyModuleDef *module, int fd, int flags)
+/*[clinic end generated code: output=8c84e5b37c586d0d input=76e7c01f6b137f75]*/
+{
flags = _setmode(fd, flags);
if (flags == -1)
- return PyErr_SetFromErrno(PyExc_IOError);
+ PyErr_SetFromErrno(PyExc_IOError);
- return PyLong_FromLong(flags);
+ return flags;
}
-PyDoc_STRVAR(setmode_doc,
-"setmode(fd, mode) -> Previous mode\n\
-\n\
-Set the line-end translation mode for the file descriptor fd. To set\n\
-it to text mode, flags should be os.O_TEXT; for binary, it should be\n\
-os.O_BINARY.");
+/*[clinic input]
+msvcrt.open_osfhandle -> long
-// Convert an OS file handle to a C runtime file descriptor.
-static PyObject *
-msvcrt_open_osfhandle(PyObject *self, PyObject *args)
+ handle: Py_intptr_t
+ flags: int
+ /
+
+Create a C runtime file descriptor from the file handle handle.
+
+The flags parameter should be a bitwise OR of os.O_APPEND, os.O_RDONLY,
+and os.O_TEXT. The returned file descriptor may be used as a parameter
+to os.fdopen() to create a file object.
+[clinic start generated code]*/
+
+static long
+msvcrt_open_osfhandle_impl(PyModuleDef *module, Py_intptr_t handle,
+ int flags)
+/*[clinic end generated code: output=86bce32582c49c06 input=4d8516ed32db8f65]*/
{
- Py_intptr_t handle;
- int flags;
int fd;
- if (!PyArg_ParseTuple(args, _Py_PARSE_INTPTR "i:open_osfhandle",
- &handle, &flags))
- return NULL;
-
fd = _open_osfhandle(handle, flags);
if (fd == -1)
- return PyErr_SetFromErrno(PyExc_IOError);
+ PyErr_SetFromErrno(PyExc_IOError);
- return PyLong_FromLong(fd);
+ return fd;
}
-PyDoc_STRVAR(open_osfhandle_doc,
-"open_osfhandle(handle, flags) -> file descriptor\n\
-\n\
-Create a C runtime file descriptor from the file handle handle. The\n\
-flags parameter should be a bitwise OR of os.O_APPEND, os.O_RDONLY,\n\
-and os.O_TEXT. The returned file descriptor may be used as a parameter\n\
-to os.fdopen() to create a file object.");
+/*[clinic input]
+msvcrt.get_osfhandle -> handle
-// Convert a C runtime file descriptor to an OS file handle.
-static PyObject *
-msvcrt_get_osfhandle(PyObject *self, PyObject *args)
-{
- int fd;
- Py_intptr_t handle;
+ fd: int
+ /
- if (!PyArg_ParseTuple(args,"i:get_osfhandle", &fd))
- return NULL;
+Return the file handle for the file descriptor fd.
- if (!_PyVerify_fd(fd))
- return PyErr_SetFromErrno(PyExc_IOError);
+Raises IOError if fd is not recognized.
+[clinic start generated code]*/
- handle = _get_osfhandle(fd);
- if (handle == -1)
- return PyErr_SetFromErrno(PyExc_IOError);
+static Py_intptr_t
+msvcrt_get_osfhandle_impl(PyModuleDef *module, int fd)
+/*[clinic end generated code: output=376bff52586b55a6 input=c7d18d02c8017ec1]*/
+{
+ Py_intptr_t handle = -1;
- /* technically 'handle' is not a pointer, but a integer as
- large as a pointer, Python's *VoidPtr interface is the
- most appropriate here */
- return PyLong_FromVoidPtr((void*)handle);
-}
+ if (!_PyVerify_fd(fd)) {
+ PyErr_SetFromErrno(PyExc_IOError);
+ }
+ else {
+ _Py_BEGIN_SUPPRESS_IPH
+ handle = _get_osfhandle(fd);
+ _Py_END_SUPPRESS_IPH
+ if (handle == -1)
+ PyErr_SetFromErrno(PyExc_IOError);
+ }
-PyDoc_STRVAR(get_osfhandle_doc,
-"get_osfhandle(fd) -> file handle\n\
-\n\
-Return the file handle for the file descriptor fd. Raises IOError\n\
-if fd is not recognized.");
+ return handle;
+}
/* Console I/O */
+/*[clinic input]
+msvcrt.kbhit -> long
-static PyObject *
-msvcrt_kbhit(PyObject *self, PyObject *args)
+Return true if a keypress is waiting to be read.
+[clinic start generated code]*/
+
+static long
+msvcrt_kbhit_impl(PyModuleDef *module)
+/*[clinic end generated code: output=2b7293fcbe5cb24e input=e70d678a5c2f6acc]*/
{
- int ok;
+ return _kbhit();
+}
- if (!PyArg_ParseTuple(args, ":kbhit"))
- return NULL;
+/*[clinic input]
+msvcrt.getch -> byte_char
- ok = _kbhit();
- return PyLong_FromLong(ok);
-}
+Read a keypress and return the resulting character as a byte string.
-PyDoc_STRVAR(kbhit_doc,
-"kbhit() -> bool\n\
-\n\
-Return true if a keypress is waiting to be read.");
+Nothing is echoed to the console. This call will block if a keypress is
+not already available, but will not wait for Enter to be pressed. If the
+pressed key was a special function key, this will return '\000' or
+'\xe0'; the next call will return the keycode. The Control-C keypress
+cannot be read with this function.
+[clinic start generated code]*/
-static PyObject *
-msvcrt_getch(PyObject *self, PyObject *args)
+static int
+msvcrt_getch_impl(PyModuleDef *module)
+/*[clinic end generated code: output=199e3d89f49c166a input=37a40cf0ed0d1153]*/
{
int ch;
- char s[1];
-
- if (!PyArg_ParseTuple(args, ":getch"))
- return NULL;
Py_BEGIN_ALLOW_THREADS
ch = _getch();
Py_END_ALLOW_THREADS
- s[0] = ch;
- return PyBytes_FromStringAndSize(s, 1);
+ return ch;
}
-PyDoc_STRVAR(getch_doc,
-"getch() -> key character\n\
-\n\
-Read a keypress and return the resulting character as a byte string.\n\
-Nothing is echoed to the console. This call will block if a keypress is\n\
-not already available, but will not wait for Enter to be pressed. If the\n\
-pressed key was a special function key, this will return '\\000' or\n\
-'\\xe0'; the next call will return the keycode. The Control-C keypress\n\
-cannot be read with this function.");
-
-#ifdef _WCONIO_DEFINED
-static PyObject *
-msvcrt_getwch(PyObject *self, PyObject *args)
+/*[clinic input]
+msvcrt.getwch -> wchar_t
+
+Wide char variant of getch(), returning a Unicode value.
+[clinic start generated code]*/
+
+static wchar_t
+msvcrt_getwch_impl(PyModuleDef *module)
+/*[clinic end generated code: output=9d3762861328b1fe input=27b3dec8ad823d7c]*/
{
wchar_t ch;
- if (!PyArg_ParseTuple(args, ":getwch"))
- return NULL;
-
Py_BEGIN_ALLOW_THREADS
ch = _getwch();
Py_END_ALLOW_THREADS
- return PyUnicode_FromOrdinal(ch);
+ return ch;
}
-PyDoc_STRVAR(getwch_doc,
-"getwch() -> Unicode key character\n\
-\n\
-Wide char variant of getch(), returning a Unicode value.");
-#endif
+/*[clinic input]
+msvcrt.getche -> byte_char
-static PyObject *
-msvcrt_getche(PyObject *self, PyObject *args)
+Similar to getch(), but the keypress will be echoed if possible.
+[clinic start generated code]*/
+
+static int
+msvcrt_getche_impl(PyModuleDef *module)
+/*[clinic end generated code: output=8aa369be6550068e input=43311ade9ed4a9c0]*/
{
int ch;
- char s[1];
-
- if (!PyArg_ParseTuple(args, ":getche"))
- return NULL;
Py_BEGIN_ALLOW_THREADS
ch = _getche();
Py_END_ALLOW_THREADS
- s[0] = ch;
- return PyBytes_FromStringAndSize(s, 1);
+ return ch;
}
-PyDoc_STRVAR(getche_doc,
-"getche() -> key character\n\
-\n\
-Similar to getch(), but the keypress will be echoed if it represents\n\
-a printable character.");
+/*[clinic input]
+msvcrt.getwche -> wchar_t
-#ifdef _WCONIO_DEFINED
-static PyObject *
-msvcrt_getwche(PyObject *self, PyObject *args)
+Wide char variant of getche(), returning a Unicode value.
+[clinic start generated code]*/
+
+static wchar_t
+msvcrt_getwche_impl(PyModuleDef *module)
+/*[clinic end generated code: output=3693cf78e3ea0cf6 input=49337d59d1a591f8]*/
{
wchar_t ch;
- if (!PyArg_ParseTuple(args, ":getwche"))
- return NULL;
-
Py_BEGIN_ALLOW_THREADS
ch = _getwche();
Py_END_ALLOW_THREADS
- return PyUnicode_FromOrdinal(ch);
+ return ch;
}
-PyDoc_STRVAR(getwche_doc,
-"getwche() -> Unicode key character\n\
-\n\
-Wide char variant of getche(), returning a Unicode value.");
-#endif
+/*[clinic input]
+msvcrt.putch
+
+ char: char
+ /
+
+Print the byte string char to the console without buffering.
+[clinic start generated code]*/
static PyObject *
-msvcrt_putch(PyObject *self, PyObject *args)
+msvcrt_putch_impl(PyModuleDef *module, char char_value)
+/*[clinic end generated code: output=c05548b11554f36f input=ec078dd10cb054d6]*/
{
- char ch;
+ _putch(char_value);
+ Py_RETURN_NONE;
+}
- if (!PyArg_ParseTuple(args, "c:putch", &ch))
- return NULL;
+/*[clinic input]
+msvcrt.putwch
- _putch(ch);
- Py_INCREF(Py_None);
- return Py_None;
-}
+ unicode_char: int(accept={str})
+ /
-PyDoc_STRVAR(putch_doc,
-"putch(char) -> None\n\
-\n\
-Print the byte string char to the console without buffering.");
+Wide char variant of putch(), accepting a Unicode value.
+[clinic start generated code]*/
-#ifdef _WCONIO_DEFINED
static PyObject *
-msvcrt_putwch(PyObject *self, PyObject *args)
+msvcrt_putwch_impl(PyModuleDef *module, int unicode_char)
+/*[clinic end generated code: output=c216a73694ca73dd input=996ccd0bbcbac4c3]*/
{
- int ch;
-
- if (!PyArg_ParseTuple(args, "C:putwch", &ch))
- return NULL;
-
- _putwch(ch);
+ _putwch(unicode_char);
Py_RETURN_NONE;
}
-PyDoc_STRVAR(putwch_doc,
-"putwch(unicode_char) -> None\n\
-\n\
-Wide char variant of putch(), accepting a Unicode value.");
-#endif
+/*[clinic input]
+msvcrt.ungetch
-static PyObject *
-msvcrt_ungetch(PyObject *self, PyObject *args)
-{
- char ch;
+ char: char
+ /
- if (!PyArg_ParseTuple(args, "c:ungetch", &ch))
- return NULL;
+Opposite of getch.
+
+Cause the byte string char to be "pushed back" into the
+console buffer; it will be the next character read by
+getch() or getche().
+[clinic start generated code]*/
- if (_ungetch(ch) == EOF)
+static PyObject *
+msvcrt_ungetch_impl(PyModuleDef *module, char char_value)
+/*[clinic end generated code: output=19a4cd3249709ec9 input=22f07ee9001bbf0f]*/
+{
+ if (_ungetch(char_value) == EOF)
return PyErr_SetFromErrno(PyExc_IOError);
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
-PyDoc_STRVAR(ungetch_doc,
-"ungetch(char) -> None\n\
-\n\
-Cause the byte string char to be \"pushed back\" into the\n\
-console buffer; it will be the next character read by\n\
-getch() or getche().");
+/*[clinic input]
+msvcrt.ungetwch
-#ifdef _WCONIO_DEFINED
-static PyObject *
-msvcrt_ungetwch(PyObject *self, PyObject *args)
-{
- int ch;
+ unicode_char: int(accept={str})
+ /
- if (!PyArg_ParseTuple(args, "C:ungetwch", &ch))
- return NULL;
+Wide char variant of ungetch(), accepting a Unicode value.
+[clinic start generated code]*/
- if (_ungetwch(ch) == WEOF)
+static PyObject *
+msvcrt_ungetwch_impl(PyModuleDef *module, int unicode_char)
+/*[clinic end generated code: output=1ee7674710322bd1 input=83ec0492be04d564]*/
+{
+ if (_ungetwch(unicode_char) == WEOF)
return PyErr_SetFromErrno(PyExc_IOError);
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
-PyDoc_STRVAR(ungetwch_doc,
-"ungetwch(unicode_char) -> None\n\
-\n\
-Wide char variant of ungetch(), accepting a Unicode value.");
-#endif
+#ifdef _DEBUG
+/*[clinic input]
+msvcrt.CrtSetReportFile -> long
-static void
-insertint(PyObject *d, char *name, int value)
+ type: int
+ file: int
+ /
+
+Wrapper around _CrtSetReportFile.
+
+Only available on Debug builds.
+[clinic start generated code]*/
+
+static long
+msvcrt_CrtSetReportFile_impl(PyModuleDef *module, int type, int file)
+/*[clinic end generated code: output=8c3644fb2edfa808 input=bb8f721a604fcc45]*/
{
- PyObject *v = PyLong_FromLong((long) value);
- if (v == NULL) {
- /* Don't bother reporting this error */
- PyErr_Clear();
- }
- else {
- PyDict_SetItemString(d, name, v);
- Py_DECREF(v);
- }
+ return (long)_CrtSetReportFile(type, (_HFILE)file);
}
-#ifdef _DEBUG
+/*[clinic input]
+msvcrt.CrtSetReportMode -> long
-static PyObject*
-msvcrt_setreportfile(PyObject *self, PyObject *args)
-{
- int type, file;
- _HFILE res;
+ type: int
+ mode: int
+ /
- if (!PyArg_ParseTuple(args, "ii", &type, &file))
- return NULL;
- res = _CrtSetReportFile(type, (_HFILE)file);
- return PyLong_FromLong((long)res);
- Py_INCREF(Py_None);
- return Py_None;
-}
+Wrapper around _CrtSetReportMode.
+
+Only available on Debug builds.
+[clinic start generated code]*/
-static PyObject*
-msvcrt_setreportmode(PyObject *self, PyObject *args)
+static long
+msvcrt_CrtSetReportMode_impl(PyModuleDef *module, int type, int mode)
+/*[clinic end generated code: output=b407fbf8716a52b9 input=9319d29b4319426b]*/
{
- int type, mode;
int res;
- if (!PyArg_ParseTuple(args, "ii", &type, &mode))
- return NULL;
res = _CrtSetReportMode(type, mode);
if (res == -1)
- return PyErr_SetFromErrno(PyExc_IOError);
- return PyLong_FromLong(res);
+ PyErr_SetFromErrno(PyExc_IOError);
+ return res;
}
-static PyObject*
-msvcrt_seterrormode(PyObject *self, PyObject *args)
-{
- int mode, res;
+/*[clinic input]
+msvcrt.set_error_mode -> long
- if (!PyArg_ParseTuple(args, "i", &mode))
- return NULL;
- res = _set_error_mode(mode);
- return PyLong_FromLong(res);
+ mode: int
+ /
+
+Wrapper around _set_error_mode.
+
+Only available on Debug builds.
+[clinic start generated code]*/
+
+static long
+msvcrt_set_error_mode_impl(PyModuleDef *module, int mode)
+/*[clinic end generated code: output=62148adffa90867d input=046fca59c0f20872]*/
+{
+ return _set_error_mode(mode);
}
+#endif /* _DEBUG */
-#endif
+/*[clinic input]
+msvcrt.SetErrorMode
+
+ mode: unsigned_int(bitwise=True)
+ /
-static PyObject*
-seterrormode(PyObject *self, PyObject *args)
+Wrapper around SetErrorMode.
+[clinic start generated code]*/
+
+static PyObject *
+msvcrt_SetErrorMode_impl(PyModuleDef *module, unsigned int mode)
+/*[clinic end generated code: output=544c60b085be79c6 input=d8b167258d32d907]*/
{
- unsigned int mode, res;
+ unsigned int res;
- if (!PyArg_ParseTuple(args, "I", &mode))
- return NULL;
res = SetErrorMode(mode);
return PyLong_FromUnsignedLong(res);
}
+/*[clinic input]
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=da39a3ee5e6b4b0d]*/
/* List of functions exported by this module */
static struct PyMethodDef msvcrt_functions[] = {
- {"heapmin", msvcrt_heapmin, METH_VARARGS, heapmin_doc},
- {"locking", msvcrt_locking, METH_VARARGS, locking_doc},
- {"setmode", msvcrt_setmode, METH_VARARGS, setmode_doc},
- {"open_osfhandle", msvcrt_open_osfhandle, METH_VARARGS, open_osfhandle_doc},
- {"get_osfhandle", msvcrt_get_osfhandle, METH_VARARGS, get_osfhandle_doc},
- {"kbhit", msvcrt_kbhit, METH_VARARGS, kbhit_doc},
- {"getch", msvcrt_getch, METH_VARARGS, getch_doc},
- {"getche", msvcrt_getche, METH_VARARGS, getche_doc},
- {"putch", msvcrt_putch, METH_VARARGS, putch_doc},
- {"ungetch", msvcrt_ungetch, METH_VARARGS, ungetch_doc},
- {"SetErrorMode", seterrormode, METH_VARARGS},
-#ifdef _DEBUG
- {"CrtSetReportFile", msvcrt_setreportfile, METH_VARARGS},
- {"CrtSetReportMode", msvcrt_setreportmode, METH_VARARGS},
- {"set_error_mode", msvcrt_seterrormode, METH_VARARGS},
-#endif
-#ifdef _WCONIO_DEFINED
- {"getwch", msvcrt_getwch, METH_VARARGS, getwch_doc},
- {"getwche", msvcrt_getwche, METH_VARARGS, getwche_doc},
- {"putwch", msvcrt_putwch, METH_VARARGS, putwch_doc},
- {"ungetwch", msvcrt_ungetwch, METH_VARARGS, ungetwch_doc},
-#endif
+ MSVCRT_HEAPMIN_METHODDEF
+ MSVCRT_LOCKING_METHODDEF
+ MSVCRT_SETMODE_METHODDEF
+ MSVCRT_OPEN_OSFHANDLE_METHODDEF
+ MSVCRT_GET_OSFHANDLE_METHODDEF
+ MSVCRT_KBHIT_METHODDEF
+ MSVCRT_GETCH_METHODDEF
+ MSVCRT_GETCHE_METHODDEF
+ MSVCRT_PUTCH_METHODDEF
+ MSVCRT_UNGETCH_METHODDEF
+ MSVCRT_SETERRORMODE_METHODDEF
+ MSVCRT_CRTSETREPORTFILE_METHODDEF
+ MSVCRT_CRTSETREPORTMODE_METHODDEF
+ MSVCRT_SET_ERROR_MODE_METHODDEF
+ MSVCRT_GETWCH_METHODDEF
+ MSVCRT_GETWCHE_METHODDEF
+ MSVCRT_PUTWCH_METHODDEF
+ MSVCRT_UNGETWCH_METHODDEF
{NULL, NULL}
};
@@ -463,6 +493,20 @@ static struct PyModuleDef msvcrtmodule = {
NULL
};
+static void
+insertint(PyObject *d, char *name, int value)
+{
+ PyObject *v = PyLong_FromLong((long) value);
+ if (v == NULL) {
+ /* Don't bother reporting this error */
+ PyErr_Clear();
+ }
+ else {
+ PyDict_SetItemString(d, name, v);
+ Py_DECREF(v);
+ }
+}
+
PyMODINIT_FUNC
PyInit_msvcrt(void)
{
diff --git a/PC/pyconfig.h b/PC/pyconfig.h
index e1c19884ae..ac4f8f25e0 100644
--- a/PC/pyconfig.h
+++ b/PC/pyconfig.h
@@ -145,18 +145,24 @@ WIN32 is still required for the locale module.
#if defined(_M_IA64)
#define COMPILER _Py_PASTE_VERSION("64 bit (Itanium)")
#define MS_WINI64
+#define PYD_PLATFORM_TAG "win_ia64"
#elif defined(_M_X64) || defined(_M_AMD64)
+#if defined(__INTEL_COMPILER)
+#define COMPILER ("[ICC v." _Py_STRINGIZE(__INTEL_COMPILER) " 64 bit (amd64) with MSC v." _Py_STRINGIZE(_MSC_VER) " CRT]")
+#else
#define COMPILER _Py_PASTE_VERSION("64 bit (AMD64)")
+#endif /* __INTEL_COMPILER */
#define MS_WINX64
+#define PYD_PLATFORM_TAG "win_amd64"
#else
#define COMPILER _Py_PASTE_VERSION("64 bit (Unknown)")
#endif
#endif /* MS_WIN64 */
/* set the version macros for the windows headers */
-/* Python 3.4+ requires Windows XP or greater */
-#define Py_WINVER 0x0501 /* _WIN32_WINNT_WINXP */
-#define Py_NTDDI NTDDI_WINXP
+/* Python 3.5+ requires Windows Vista or greater */
+#define Py_WINVER 0x0600 /* _WIN32_WINNT_VISTA */
+#define Py_NTDDI NTDDI_VISTA
/* We only set these values when building Python - we don't want to force
these values on extensions, as that will affect the prototypes and
@@ -192,9 +198,15 @@ typedef _W64 int ssize_t;
#if defined(MS_WIN32) && !defined(MS_WIN64)
#if defined(_M_IX86)
+#if defined(__INTEL_COMPILER)
+#define COMPILER ("[ICC v." _Py_STRINGIZE(__INTEL_COMPILER) " 32 bit (Intel) with MSC v." _Py_STRINGIZE(_MSC_VER) " CRT]")
+#else
#define COMPILER _Py_PASTE_VERSION("32 bit (Intel)")
+#endif /* __INTEL_COMPILER */
+#define PYD_PLATFORM_TAG "win32"
#elif defined(_M_ARM)
#define COMPILER _Py_PASTE_VERSION("32 bit (ARM)")
+#define PYD_PLATFORM_TAG "win_arm"
#else
#define COMPILER _Py_PASTE_VERSION("32 bit (Unknown)")
#endif
@@ -213,6 +225,13 @@ typedef int pid_t;
#define hypot _hypot
#endif
+/* VS 2015 defines these names with a leading underscore */
+#if _MSC_VER >= 1900
+#define timezone _timezone
+#define daylight _daylight
+#define tzname _tzname
+#endif
+
/* Side by Side assemblies supported in VS 2005 and VS 2008 but not 2010*/
#if _MSC_VER >= 1400 && _MSC_VER < 1600
#define HAVE_SXS 1
@@ -227,35 +246,6 @@ typedef int pid_t;
#endif /* _MSC_VER */
/* ------------------------------------------------------------------------*/
-/* The Borland compiler defines __BORLANDC__ */
-/* XXX These defines are likely incomplete, but should be easy to fix. */
-#ifdef __BORLANDC__
-#define COMPILER "[Borland]"
-
-#ifdef _WIN32
-/* tested with BCC 5.5 (__BORLANDC__ >= 0x0550)
- */
-
-typedef int pid_t;
-/* BCC55 seems to understand __declspec(dllimport), it is used in its
- own header files (winnt.h, ...) - so we can do nothing and get the default*/
-
-#undef HAVE_SYS_UTIME_H
-#define HAVE_UTIME_H
-#define HAVE_DIRENT_H
-
-/* rename a few functions for the Borland compiler */
-#include <io.h>
-#define _chsize chsize
-#define _setmode setmode
-
-#else /* !_WIN32 */
-#error "Only Win32 and later are supported"
-#endif /* !_WIN32 */
-
-#endif /* BORLANDC */
-
-/* ------------------------------------------------------------------------*/
/* egcs/gnu-win32 defines __GNUC__ and _WIN32 */
#if defined(__GNUC__) && defined(_WIN32)
/* XXX These defines are likely incomplete, but should be easy to fix.
@@ -322,11 +312,11 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
their Makefile (other compilers are generally
taken care of by distutils.) */
# if defined(_DEBUG)
-# pragma comment(lib,"python34_d.lib")
+# pragma comment(lib,"python35_d.lib")
# elif defined(Py_LIMITED_API)
# pragma comment(lib,"python3.lib")
# else
-# pragma comment(lib,"python34.lib")
+# pragma comment(lib,"python35.lib")
# endif /* _DEBUG */
# endif /* _MSC_VER */
# endif /* Py_BUILD_CORE */
@@ -357,7 +347,7 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
# define SIZEOF_FPOS_T 8
# define SIZEOF_HKEY 4
# define SIZEOF_SIZE_T 4
- /* MS VS2005 changes time_t to an 64-bit type on all platforms */
+ /* MS VS2005 changes time_t to a 64-bit type on all platforms */
# if defined(_MSC_VER) && _MSC_VER >= 1400
# define SIZEOF_TIME_T 8
# else
diff --git a/PC/pylauncher.rc b/PC/pylauncher.rc
index df5824a663..a8db0a842f 100644
--- a/PC/pylauncher.rc
+++ b/PC/pylauncher.rc
@@ -1,51 +1,50 @@
#include <windows.h>
-#define MS_WINDOWS
-#include "..\Include\modsupport.h"
-#include "..\Include\patchlevel.h"
-#ifdef _DEBUG
-# include "pythonnt_rc_d.h"
-#else
-# include "pythonnt_rc.h"
-#endif
+#include "python_ver_rc.h"
+
+// Include the manifest file that indicates we support all
+// current versions of Windows.
+#include <winuser.h>
+1 RT_MANIFEST "python.manifest"
-#define PYTHON_VERSION PY_VERSION "\0"
-#define PYVERSION64 PY_MAJOR_VERSION, PY_MINOR_VERSION, FIELD3, PYTHON_API_VERSION
+1 ICON DISCARDABLE "launcher.ico"
+2 ICON DISCARDABLE "py.ico"
+3 ICON DISCARDABLE "pyc.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
VS_VERSION_INFO VERSIONINFO
FILEVERSION PYVERSION64
PRODUCTVERSION PYVERSION64
- FILEFLAGSMASK 0x17L
+ FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
- FILEFLAGS 0x1L
+ FILEFLAGS VS_FF_DEBUG
#else
FILEFLAGS 0x0L
#endif
- FILEOS 0x4L
- FILETYPE 0x1L
+ FILEOS VOS__WINDOWS32
+ FILETYPE VFT_APP
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
- BLOCK "080904b0"
+ BLOCK "000004b0"
BEGIN
- VALUE "Comments", "Python Launcher for Windows"
- VALUE "CompanyName", "Python Software Foundation"
- VALUE "FileDescription", "Python Launcher for Windows (Console)"
+ VALUE "CompanyName", PYTHON_COMPANY "\0"
+ VALUE "FileDescription", "Python\0"
VALUE "FileVersion", PYTHON_VERSION
- VALUE "InternalName", "py"
- VALUE "LegalCopyright", "Copyright (C) 2011-2012 Python Software Foundation"
- VALUE "OriginalFilename", "py"
- VALUE "ProductName", "Python Launcher for Windows"
+ VALUE "InternalName", "Python Launcher\0"
+ VALUE "LegalCopyright", PYTHON_COPYRIGHT "\0"
+ VALUE "OriginalFilename", "py" PYTHON_DEBUG_EXT ".exe\0"
+ VALUE "ProductName", "Python\0"
VALUE "ProductVersion", PYTHON_VERSION
END
END
BLOCK "VarFileInfo"
BEGIN
- VALUE "Translation", 0x809, 1200
+ VALUE "Translation", 0x0, 1200
END
-END
-
-IDI_ICON1 ICON "launcher.ico"
-
-
+END \ No newline at end of file
diff --git a/PC/python.manifest b/PC/python.manifest
new file mode 100644
index 0000000000..9b7b2f8e51
--- /dev/null
+++ b/PC/python.manifest
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+ <trustInfo>
+ <security>
+ <requestedPrivileges>
+ <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
+ </requestedPrivileges>
+ </security>
+ </trustInfo>
+ <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
+ <application>
+ <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
+ <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
+ <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
+ <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
+ <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
+ </application>
+ </compatibility>
+</assembly> \ No newline at end of file
diff --git a/PC/python3.def b/PC/python3.def
index 37e454bd5d..88c0742d3c 100644
--- a/PC/python3.def
+++ b/PC/python3.def
@@ -1,701 +1,713 @@
-; When changing this file, run python34gen.py
+; This file specifies the import forwarding for python3.dll
+; It is used when building python3dll.vcxproj
LIBRARY "python3"
EXPORTS
- PyArg_Parse=python34.PyArg_Parse
- PyArg_ParseTuple=python34.PyArg_ParseTuple
- PyArg_ParseTupleAndKeywords=python34.PyArg_ParseTupleAndKeywords
- PyArg_UnpackTuple=python34.PyArg_UnpackTuple
- PyArg_VaParse=python34.PyArg_VaParse
- PyArg_VaParseTupleAndKeywords=python34.PyArg_VaParseTupleAndKeywords
- PyArg_ValidateKeywordArguments=python34.PyArg_ValidateKeywordArguments
- PyBaseObject_Type=python34.PyBaseObject_Type DATA
- PyBool_FromLong=python34.PyBool_FromLong
- PyBool_Type=python34.PyBool_Type DATA
- PyByteArrayIter_Type=python34.PyByteArrayIter_Type DATA
- PyByteArray_AsString=python34.PyByteArray_AsString
- PyByteArray_Concat=python34.PyByteArray_Concat
- PyByteArray_FromObject=python34.PyByteArray_FromObject
- PyByteArray_FromStringAndSize=python34.PyByteArray_FromStringAndSize
- PyByteArray_Resize=python34.PyByteArray_Resize
- PyByteArray_Size=python34.PyByteArray_Size
- PyByteArray_Type=python34.PyByteArray_Type DATA
- PyBytesIter_Type=python34.PyBytesIter_Type DATA
- PyBytes_AsString=python34.PyBytes_AsString
- PyBytes_AsStringAndSize=python34.PyBytes_AsStringAndSize
- PyBytes_Concat=python34.PyBytes_Concat
- PyBytes_ConcatAndDel=python34.PyBytes_ConcatAndDel
- PyBytes_DecodeEscape=python34.PyBytes_DecodeEscape
- PyBytes_FromFormat=python34.PyBytes_FromFormat
- PyBytes_FromFormatV=python34.PyBytes_FromFormatV
- PyBytes_FromObject=python34.PyBytes_FromObject
- PyBytes_FromString=python34.PyBytes_FromString
- PyBytes_FromStringAndSize=python34.PyBytes_FromStringAndSize
- PyBytes_Repr=python34.PyBytes_Repr
- PyBytes_Size=python34.PyBytes_Size
- PyBytes_Type=python34.PyBytes_Type DATA
- PyCFunction_Call=python34.PyCFunction_Call
- PyCFunction_ClearFreeList=python34.PyCFunction_ClearFreeList
- PyCFunction_GetFlags=python34.PyCFunction_GetFlags
- PyCFunction_GetFunction=python34.PyCFunction_GetFunction
- PyCFunction_GetSelf=python34.PyCFunction_GetSelf
- PyCFunction_New=python34.PyCFunction_New
- PyCFunction_NewEx=python34.PyCFunction_NewEx
- PyCFunction_Type=python34.PyCFunction_Type DATA
- PyCallIter_New=python34.PyCallIter_New
- PyCallIter_Type=python34.PyCallIter_Type DATA
- PyCallable_Check=python34.PyCallable_Check
- PyCapsule_GetContext=python34.PyCapsule_GetContext
- PyCapsule_GetDestructor=python34.PyCapsule_GetDestructor
- PyCapsule_GetName=python34.PyCapsule_GetName
- PyCapsule_GetPointer=python34.PyCapsule_GetPointer
- PyCapsule_Import=python34.PyCapsule_Import
- PyCapsule_IsValid=python34.PyCapsule_IsValid
- PyCapsule_New=python34.PyCapsule_New
- PyCapsule_SetContext=python34.PyCapsule_SetContext
- PyCapsule_SetDestructor=python34.PyCapsule_SetDestructor
- PyCapsule_SetName=python34.PyCapsule_SetName
- PyCapsule_SetPointer=python34.PyCapsule_SetPointer
- PyCapsule_Type=python34.PyCapsule_Type DATA
- PyClassMethodDescr_Type=python34.PyClassMethodDescr_Type DATA
- PyCodec_BackslashReplaceErrors=python34.PyCodec_BackslashReplaceErrors
- PyCodec_Decode=python34.PyCodec_Decode
- PyCodec_Decoder=python34.PyCodec_Decoder
- PyCodec_Encode=python34.PyCodec_Encode
- PyCodec_Encoder=python34.PyCodec_Encoder
- PyCodec_IgnoreErrors=python34.PyCodec_IgnoreErrors
- PyCodec_IncrementalDecoder=python34.PyCodec_IncrementalDecoder
- PyCodec_IncrementalEncoder=python34.PyCodec_IncrementalEncoder
- PyCodec_KnownEncoding=python34.PyCodec_KnownEncoding
- PyCodec_LookupError=python34.PyCodec_LookupError
- PyCodec_Register=python34.PyCodec_Register
- PyCodec_RegisterError=python34.PyCodec_RegisterError
- PyCodec_ReplaceErrors=python34.PyCodec_ReplaceErrors
- PyCodec_StreamReader=python34.PyCodec_StreamReader
- PyCodec_StreamWriter=python34.PyCodec_StreamWriter
- PyCodec_StrictErrors=python34.PyCodec_StrictErrors
- PyCodec_XMLCharRefReplaceErrors=python34.PyCodec_XMLCharRefReplaceErrors
- PyComplex_FromDoubles=python34.PyComplex_FromDoubles
- PyComplex_ImagAsDouble=python34.PyComplex_ImagAsDouble
- PyComplex_RealAsDouble=python34.PyComplex_RealAsDouble
- PyComplex_Type=python34.PyComplex_Type DATA
- PyDescr_NewClassMethod=python34.PyDescr_NewClassMethod
- PyDescr_NewGetSet=python34.PyDescr_NewGetSet
- PyDescr_NewMember=python34.PyDescr_NewMember
- PyDescr_NewMethod=python34.PyDescr_NewMethod
- PyDictItems_Type=python34.PyDictItems_Type DATA
- PyDictIterItem_Type=python34.PyDictIterItem_Type DATA
- PyDictIterKey_Type=python34.PyDictIterKey_Type DATA
- PyDictIterValue_Type=python34.PyDictIterValue_Type DATA
- PyDictKeys_Type=python34.PyDictKeys_Type DATA
- PyDictProxy_New=python34.PyDictProxy_New
- PyDictProxy_Type=python34.PyDictProxy_Type DATA
- PyDictValues_Type=python34.PyDictValues_Type DATA
- PyDict_Clear=python34.PyDict_Clear
- PyDict_Contains=python34.PyDict_Contains
- PyDict_Copy=python34.PyDict_Copy
- PyDict_DelItem=python34.PyDict_DelItem
- PyDict_DelItemString=python34.PyDict_DelItemString
- PyDict_GetItem=python34.PyDict_GetItem
- PyDict_GetItemString=python34.PyDict_GetItemString
- PyDict_GetItemWithError=python34.PyDict_GetItemWithError
- PyDict_Items=python34.PyDict_Items
- PyDict_Keys=python34.PyDict_Keys
- PyDict_Merge=python34.PyDict_Merge
- PyDict_MergeFromSeq2=python34.PyDict_MergeFromSeq2
- PyDict_New=python34.PyDict_New
- PyDict_Next=python34.PyDict_Next
- PyDict_SetItem=python34.PyDict_SetItem
- PyDict_SetItemString=python34.PyDict_SetItemString
- PyDict_Size=python34.PyDict_Size
- PyDict_Type=python34.PyDict_Type DATA
- PyDict_Update=python34.PyDict_Update
- PyDict_Values=python34.PyDict_Values
- PyEllipsis_Type=python34.PyEllipsis_Type DATA
- PyEnum_Type=python34.PyEnum_Type DATA
- PyErr_BadArgument=python34.PyErr_BadArgument
- PyErr_BadInternalCall=python34.PyErr_BadInternalCall
- PyErr_CheckSignals=python34.PyErr_CheckSignals
- PyErr_Clear=python34.PyErr_Clear
- PyErr_Display=python34.PyErr_Display
- PyErr_ExceptionMatches=python34.PyErr_ExceptionMatches
- PyErr_Fetch=python34.PyErr_Fetch
- PyErr_Format=python34.PyErr_Format
- PyErr_GivenExceptionMatches=python34.PyErr_GivenExceptionMatches
- PyErr_NewException=python34.PyErr_NewException
- PyErr_NewExceptionWithDoc=python34.PyErr_NewExceptionWithDoc
- PyErr_NoMemory=python34.PyErr_NoMemory
- PyErr_NormalizeException=python34.PyErr_NormalizeException
- PyErr_Occurred=python34.PyErr_Occurred
- PyErr_Print=python34.PyErr_Print
- PyErr_PrintEx=python34.PyErr_PrintEx
- PyErr_ProgramText=python34.PyErr_ProgramText
- PyErr_Restore=python34.PyErr_Restore
- PyErr_SetFromErrno=python34.PyErr_SetFromErrno
- PyErr_SetFromErrnoWithFilename=python34.PyErr_SetFromErrnoWithFilename
- PyErr_SetFromErrnoWithFilenameObject=python34.PyErr_SetFromErrnoWithFilenameObject
- PyErr_SetInterrupt=python34.PyErr_SetInterrupt
- PyErr_SetNone=python34.PyErr_SetNone
- PyErr_SetObject=python34.PyErr_SetObject
- PyErr_SetString=python34.PyErr_SetString
- PyErr_SyntaxLocation=python34.PyErr_SyntaxLocation
- PyErr_WarnEx=python34.PyErr_WarnEx
- PyErr_WarnExplicit=python34.PyErr_WarnExplicit
- PyErr_WarnFormat=python34.PyErr_WarnFormat
- PyErr_WriteUnraisable=python34.PyErr_WriteUnraisable
- PyEval_AcquireLock=python34.PyEval_AcquireLock
- PyEval_AcquireThread=python34.PyEval_AcquireThread
- PyEval_CallFunction=python34.PyEval_CallFunction
- PyEval_CallMethod=python34.PyEval_CallMethod
- PyEval_CallObjectWithKeywords=python34.PyEval_CallObjectWithKeywords
- PyEval_EvalCode=python34.PyEval_EvalCode
- PyEval_EvalCodeEx=python34.PyEval_EvalCodeEx
- PyEval_EvalFrame=python34.PyEval_EvalFrame
- PyEval_EvalFrameEx=python34.PyEval_EvalFrameEx
- PyEval_GetBuiltins=python34.PyEval_GetBuiltins
- PyEval_GetCallStats=python34.PyEval_GetCallStats
- PyEval_GetFrame=python34.PyEval_GetFrame
- PyEval_GetFuncDesc=python34.PyEval_GetFuncDesc
- PyEval_GetFuncName=python34.PyEval_GetFuncName
- PyEval_GetGlobals=python34.PyEval_GetGlobals
- PyEval_GetLocals=python34.PyEval_GetLocals
- PyEval_InitThreads=python34.PyEval_InitThreads
- PyEval_ReInitThreads=python34.PyEval_ReInitThreads
- PyEval_ReleaseLock=python34.PyEval_ReleaseLock
- PyEval_ReleaseThread=python34.PyEval_ReleaseThread
- PyEval_RestoreThread=python34.PyEval_RestoreThread
- PyEval_SaveThread=python34.PyEval_SaveThread
- PyEval_ThreadsInitialized=python34.PyEval_ThreadsInitialized
- PyExc_ArithmeticError=python34.PyExc_ArithmeticError DATA
- PyExc_AssertionError=python34.PyExc_AssertionError DATA
- PyExc_AttributeError=python34.PyExc_AttributeError DATA
- PyExc_BaseException=python34.PyExc_BaseException DATA
- PyExc_BufferError=python34.PyExc_BufferError DATA
- PyExc_BytesWarning=python34.PyExc_BytesWarning DATA
- PyExc_DeprecationWarning=python34.PyExc_DeprecationWarning DATA
- PyExc_EOFError=python34.PyExc_EOFError DATA
- PyExc_EnvironmentError=python34.PyExc_EnvironmentError DATA
- PyExc_Exception=python34.PyExc_Exception DATA
- PyExc_FloatingPointError=python34.PyExc_FloatingPointError DATA
- PyExc_FutureWarning=python34.PyExc_FutureWarning DATA
- PyExc_GeneratorExit=python34.PyExc_GeneratorExit DATA
- PyExc_IOError=python34.PyExc_IOError DATA
- PyExc_ImportError=python34.PyExc_ImportError DATA
- PyExc_ImportWarning=python34.PyExc_ImportWarning DATA
- PyExc_IndentationError=python34.PyExc_IndentationError DATA
- PyExc_IndexError=python34.PyExc_IndexError DATA
- PyExc_KeyError=python34.PyExc_KeyError DATA
- PyExc_KeyboardInterrupt=python34.PyExc_KeyboardInterrupt DATA
- PyExc_LookupError=python34.PyExc_LookupError DATA
- PyExc_MemoryError=python34.PyExc_MemoryError DATA
- PyExc_MemoryErrorInst=python34.PyExc_MemoryErrorInst DATA
- PyExc_NameError=python34.PyExc_NameError DATA
- PyExc_NotImplementedError=python34.PyExc_NotImplementedError DATA
- PyExc_OSError=python34.PyExc_OSError DATA
- PyExc_OverflowError=python34.PyExc_OverflowError DATA
- PyExc_PendingDeprecationWarning=python34.PyExc_PendingDeprecationWarning DATA
- PyExc_RecursionErrorInst=python34.PyExc_RecursionErrorInst DATA
- PyExc_ReferenceError=python34.PyExc_ReferenceError DATA
- PyExc_RuntimeError=python34.PyExc_RuntimeError DATA
- PyExc_RuntimeWarning=python34.PyExc_RuntimeWarning DATA
- PyExc_StopIteration=python34.PyExc_StopIteration DATA
- PyExc_SyntaxError=python34.PyExc_SyntaxError DATA
- PyExc_SyntaxWarning=python34.PyExc_SyntaxWarning DATA
- PyExc_SystemError=python34.PyExc_SystemError DATA
- PyExc_SystemExit=python34.PyExc_SystemExit DATA
- PyExc_TabError=python34.PyExc_TabError DATA
- PyExc_TypeError=python34.PyExc_TypeError DATA
- PyExc_UnboundLocalError=python34.PyExc_UnboundLocalError DATA
- PyExc_UnicodeDecodeError=python34.PyExc_UnicodeDecodeError DATA
- PyExc_UnicodeEncodeError=python34.PyExc_UnicodeEncodeError DATA
- PyExc_UnicodeError=python34.PyExc_UnicodeError DATA
- PyExc_UnicodeTranslateError=python34.PyExc_UnicodeTranslateError DATA
- PyExc_UnicodeWarning=python34.PyExc_UnicodeWarning DATA
- PyExc_UserWarning=python34.PyExc_UserWarning DATA
- PyExc_ValueError=python34.PyExc_ValueError DATA
- PyExc_Warning=python34.PyExc_Warning DATA
- PyExc_ZeroDivisionError=python34.PyExc_ZeroDivisionError DATA
- PyException_GetCause=python34.PyException_GetCause
- PyException_GetContext=python34.PyException_GetContext
- PyException_GetTraceback=python34.PyException_GetTraceback
- PyException_SetCause=python34.PyException_SetCause
- PyException_SetContext=python34.PyException_SetContext
- PyException_SetTraceback=python34.PyException_SetTraceback
- PyFile_FromFd=python34.PyFile_FromFd
- PyFile_GetLine=python34.PyFile_GetLine
- PyFile_WriteObject=python34.PyFile_WriteObject
- PyFile_WriteString=python34.PyFile_WriteString
- PyFilter_Type=python34.PyFilter_Type DATA
- PyFloat_AsDouble=python34.PyFloat_AsDouble
- PyFloat_FromDouble=python34.PyFloat_FromDouble
- PyFloat_FromString=python34.PyFloat_FromString
- PyFloat_GetInfo=python34.PyFloat_GetInfo
- PyFloat_GetMax=python34.PyFloat_GetMax
- PyFloat_GetMin=python34.PyFloat_GetMin
- PyFloat_Type=python34.PyFloat_Type DATA
- PyFrozenSet_New=python34.PyFrozenSet_New
- PyFrozenSet_Type=python34.PyFrozenSet_Type DATA
- PyGC_Collect=python34.PyGC_Collect
- PyGILState_Ensure=python34.PyGILState_Ensure
- PyGILState_GetThisThreadState=python34.PyGILState_GetThisThreadState
- PyGILState_Release=python34.PyGILState_Release
- PyGetSetDescr_Type=python34.PyGetSetDescr_Type DATA
- PyImport_AddModule=python34.PyImport_AddModule
- PyImport_AppendInittab=python34.PyImport_AppendInittab
- PyImport_Cleanup=python34.PyImport_Cleanup
- PyImport_ExecCodeModule=python34.PyImport_ExecCodeModule
- PyImport_ExecCodeModuleEx=python34.PyImport_ExecCodeModuleEx
- PyImport_ExecCodeModuleWithPathnames=python34.PyImport_ExecCodeModuleWithPathnames
- PyImport_GetImporter=python34.PyImport_GetImporter
- PyImport_GetMagicNumber=python34.PyImport_GetMagicNumber
- PyImport_GetMagicTag=python34.PyImport_GetMagicTag
- PyImport_GetModuleDict=python34.PyImport_GetModuleDict
- PyImport_Import=python34.PyImport_Import
- PyImport_ImportFrozenModule=python34.PyImport_ImportFrozenModule
- PyImport_ImportModule=python34.PyImport_ImportModule
- PyImport_ImportModuleLevel=python34.PyImport_ImportModuleLevel
- PyImport_ImportModuleNoBlock=python34.PyImport_ImportModuleNoBlock
- PyImport_ReloadModule=python34.PyImport_ReloadModule
- PyInterpreterState_Clear=python34.PyInterpreterState_Clear
- PyInterpreterState_Delete=python34.PyInterpreterState_Delete
- PyInterpreterState_New=python34.PyInterpreterState_New
- PyIter_Next=python34.PyIter_Next
- PyListIter_Type=python34.PyListIter_Type DATA
- PyListRevIter_Type=python34.PyListRevIter_Type DATA
- PyList_Append=python34.PyList_Append
- PyList_AsTuple=python34.PyList_AsTuple
- PyList_GetItem=python34.PyList_GetItem
- PyList_GetSlice=python34.PyList_GetSlice
- PyList_Insert=python34.PyList_Insert
- PyList_New=python34.PyList_New
- PyList_Reverse=python34.PyList_Reverse
- PyList_SetItem=python34.PyList_SetItem
- PyList_SetSlice=python34.PyList_SetSlice
- PyList_Size=python34.PyList_Size
- PyList_Sort=python34.PyList_Sort
- PyList_Type=python34.PyList_Type DATA
- PyLongRangeIter_Type=python34.PyLongRangeIter_Type DATA
- PyLong_AsDouble=python34.PyLong_AsDouble
- PyLong_AsLong=python34.PyLong_AsLong
- PyLong_AsLongAndOverflow=python34.PyLong_AsLongAndOverflow
- PyLong_AsLongLong=python34.PyLong_AsLongLong
- PyLong_AsLongLongAndOverflow=python34.PyLong_AsLongLongAndOverflow
- PyLong_AsSize_t=python34.PyLong_AsSize_t
- PyLong_AsSsize_t=python34.PyLong_AsSsize_t
- PyLong_AsUnsignedLong=python34.PyLong_AsUnsignedLong
- PyLong_AsUnsignedLongLong=python34.PyLong_AsUnsignedLongLong
- PyLong_AsUnsignedLongLongMask=python34.PyLong_AsUnsignedLongLongMask
- PyLong_AsUnsignedLongMask=python34.PyLong_AsUnsignedLongMask
- PyLong_AsVoidPtr=python34.PyLong_AsVoidPtr
- PyLong_FromDouble=python34.PyLong_FromDouble
- PyLong_FromLong=python34.PyLong_FromLong
- PyLong_FromLongLong=python34.PyLong_FromLongLong
- PyLong_FromSize_t=python34.PyLong_FromSize_t
- PyLong_FromSsize_t=python34.PyLong_FromSsize_t
- PyLong_FromString=python34.PyLong_FromString
- PyLong_FromUnsignedLong=python34.PyLong_FromUnsignedLong
- PyLong_FromUnsignedLongLong=python34.PyLong_FromUnsignedLongLong
- PyLong_FromVoidPtr=python34.PyLong_FromVoidPtr
- PyLong_GetInfo=python34.PyLong_GetInfo
- PyLong_Type=python34.PyLong_Type DATA
- PyMap_Type=python34.PyMap_Type DATA
- PyMapping_Check=python34.PyMapping_Check
- PyMapping_GetItemString=python34.PyMapping_GetItemString
- PyMapping_HasKey=python34.PyMapping_HasKey
- PyMapping_HasKeyString=python34.PyMapping_HasKeyString
- PyMapping_Items=python34.PyMapping_Items
- PyMapping_Keys=python34.PyMapping_Keys
- PyMapping_Length=python34.PyMapping_Length
- PyMapping_SetItemString=python34.PyMapping_SetItemString
- PyMapping_Size=python34.PyMapping_Size
- PyMapping_Values=python34.PyMapping_Values
- PyMem_Free=python34.PyMem_Free
- PyMem_Malloc=python34.PyMem_Malloc
- PyMem_Realloc=python34.PyMem_Realloc
- PyMemberDescr_Type=python34.PyMemberDescr_Type DATA
- PyMemoryView_FromObject=python34.PyMemoryView_FromObject
- PyMemoryView_GetContiguous=python34.PyMemoryView_GetContiguous
- PyMemoryView_Type=python34.PyMemoryView_Type DATA
- PyMethodDescr_Type=python34.PyMethodDescr_Type DATA
- PyModule_AddIntConstant=python34.PyModule_AddIntConstant
- PyModule_AddObject=python34.PyModule_AddObject
- PyModule_AddStringConstant=python34.PyModule_AddStringConstant
- PyModule_Create2=python34.PyModule_Create2
- PyModule_GetDef=python34.PyModule_GetDef
- PyModule_GetDict=python34.PyModule_GetDict
- PyModule_GetFilename=python34.PyModule_GetFilename
- PyModule_GetFilenameObject=python34.PyModule_GetFilenameObject
- PyModule_GetName=python34.PyModule_GetName
- PyModule_GetState=python34.PyModule_GetState
- PyModule_New=python34.PyModule_New
- PyModule_Type=python34.PyModule_Type DATA
- PyNullImporter_Type=python34.PyNullImporter_Type DATA
- PyNumber_Absolute=python34.PyNumber_Absolute
- PyNumber_Add=python34.PyNumber_Add
- PyNumber_And=python34.PyNumber_And
- PyNumber_AsSsize_t=python34.PyNumber_AsSsize_t
- PyNumber_Check=python34.PyNumber_Check
- PyNumber_Divmod=python34.PyNumber_Divmod
- PyNumber_Float=python34.PyNumber_Float
- PyNumber_FloorDivide=python34.PyNumber_FloorDivide
- PyNumber_InPlaceAdd=python34.PyNumber_InPlaceAdd
- PyNumber_InPlaceAnd=python34.PyNumber_InPlaceAnd
- PyNumber_InPlaceFloorDivide=python34.PyNumber_InPlaceFloorDivide
- PyNumber_InPlaceLshift=python34.PyNumber_InPlaceLshift
- PyNumber_InPlaceMultiply=python34.PyNumber_InPlaceMultiply
- PyNumber_InPlaceOr=python34.PyNumber_InPlaceOr
- PyNumber_InPlacePower=python34.PyNumber_InPlacePower
- PyNumber_InPlaceRemainder=python34.PyNumber_InPlaceRemainder
- PyNumber_InPlaceRshift=python34.PyNumber_InPlaceRshift
- PyNumber_InPlaceSubtract=python34.PyNumber_InPlaceSubtract
- PyNumber_InPlaceTrueDivide=python34.PyNumber_InPlaceTrueDivide
- PyNumber_InPlaceXor=python34.PyNumber_InPlaceXor
- PyNumber_Index=python34.PyNumber_Index
- PyNumber_Invert=python34.PyNumber_Invert
- PyNumber_Long=python34.PyNumber_Long
- PyNumber_Lshift=python34.PyNumber_Lshift
- PyNumber_Multiply=python34.PyNumber_Multiply
- PyNumber_Negative=python34.PyNumber_Negative
- PyNumber_Or=python34.PyNumber_Or
- PyNumber_Positive=python34.PyNumber_Positive
- PyNumber_Power=python34.PyNumber_Power
- PyNumber_Remainder=python34.PyNumber_Remainder
- PyNumber_Rshift=python34.PyNumber_Rshift
- PyNumber_Subtract=python34.PyNumber_Subtract
- PyNumber_ToBase=python34.PyNumber_ToBase
- PyNumber_TrueDivide=python34.PyNumber_TrueDivide
- PyNumber_Xor=python34.PyNumber_Xor
- PyOS_AfterFork=python34.PyOS_AfterFork
- PyOS_InitInterrupts=python34.PyOS_InitInterrupts
- PyOS_InputHook=python34.PyOS_InputHook DATA
- PyOS_InterruptOccurred=python34.PyOS_InterruptOccurred
- PyOS_ReadlineFunctionPointer=python34.PyOS_ReadlineFunctionPointer DATA
- PyOS_double_to_string=python34.PyOS_double_to_string
- PyOS_getsig=python34.PyOS_getsig
- PyOS_mystricmp=python34.PyOS_mystricmp
- PyOS_mystrnicmp=python34.PyOS_mystrnicmp
- PyOS_setsig=python34.PyOS_setsig
- PyOS_snprintf=python34.PyOS_snprintf
- PyOS_string_to_double=python34.PyOS_string_to_double
- PyOS_strtol=python34.PyOS_strtol
- PyOS_strtoul=python34.PyOS_strtoul
- PyOS_vsnprintf=python34.PyOS_vsnprintf
- PyObject_ASCII=python34.PyObject_ASCII
- PyObject_AsCharBuffer=python34.PyObject_AsCharBuffer
- PyObject_AsFileDescriptor=python34.PyObject_AsFileDescriptor
- PyObject_AsReadBuffer=python34.PyObject_AsReadBuffer
- PyObject_AsWriteBuffer=python34.PyObject_AsWriteBuffer
- PyObject_Bytes=python34.PyObject_Bytes
- PyObject_Call=python34.PyObject_Call
- PyObject_CallFunction=python34.PyObject_CallFunction
- PyObject_CallFunctionObjArgs=python34.PyObject_CallFunctionObjArgs
- PyObject_CallMethod=python34.PyObject_CallMethod
- PyObject_CallMethodObjArgs=python34.PyObject_CallMethodObjArgs
- PyObject_CallObject=python34.PyObject_CallObject
- PyObject_CheckReadBuffer=python34.PyObject_CheckReadBuffer
- PyObject_ClearWeakRefs=python34.PyObject_ClearWeakRefs
- PyObject_DelItem=python34.PyObject_DelItem
- PyObject_DelItemString=python34.PyObject_DelItemString
- PyObject_Dir=python34.PyObject_Dir
- PyObject_Format=python34.PyObject_Format
- PyObject_Free=python34.PyObject_Free
- PyObject_GC_Del=python34.PyObject_GC_Del
- PyObject_GC_Track=python34.PyObject_GC_Track
- PyObject_GC_UnTrack=python34.PyObject_GC_UnTrack
- PyObject_GenericGetAttr=python34.PyObject_GenericGetAttr
- PyObject_GenericSetAttr=python34.PyObject_GenericSetAttr
- PyObject_GetAttr=python34.PyObject_GetAttr
- PyObject_GetAttrString=python34.PyObject_GetAttrString
- PyObject_GetItem=python34.PyObject_GetItem
- PyObject_GetIter=python34.PyObject_GetIter
- PyObject_HasAttr=python34.PyObject_HasAttr
- PyObject_HasAttrString=python34.PyObject_HasAttrString
- PyObject_Hash=python34.PyObject_Hash
- PyObject_HashNotImplemented=python34.PyObject_HashNotImplemented
- PyObject_Init=python34.PyObject_Init
- PyObject_InitVar=python34.PyObject_InitVar
- PyObject_IsInstance=python34.PyObject_IsInstance
- PyObject_IsSubclass=python34.PyObject_IsSubclass
- PyObject_IsTrue=python34.PyObject_IsTrue
- PyObject_Length=python34.PyObject_Length
- PyObject_Malloc=python34.PyObject_Malloc
- PyObject_Not=python34.PyObject_Not
- PyObject_Realloc=python34.PyObject_Realloc
- PyObject_Repr=python34.PyObject_Repr
- PyObject_RichCompare=python34.PyObject_RichCompare
- PyObject_RichCompareBool=python34.PyObject_RichCompareBool
- PyObject_SelfIter=python34.PyObject_SelfIter
- PyObject_SetAttr=python34.PyObject_SetAttr
- PyObject_SetAttrString=python34.PyObject_SetAttrString
- PyObject_SetItem=python34.PyObject_SetItem
- PyObject_Size=python34.PyObject_Size
- PyObject_Str=python34.PyObject_Str
- PyObject_Type=python34.PyObject_Type DATA
- PyParser_SimpleParseFileFlags=python34.PyParser_SimpleParseFileFlags
- PyParser_SimpleParseStringFlags=python34.PyParser_SimpleParseStringFlags
- PyProperty_Type=python34.PyProperty_Type DATA
- PyRangeIter_Type=python34.PyRangeIter_Type DATA
- PyRange_Type=python34.PyRange_Type DATA
- PyReversed_Type=python34.PyReversed_Type DATA
- PySeqIter_New=python34.PySeqIter_New
- PySeqIter_Type=python34.PySeqIter_Type DATA
- PySequence_Check=python34.PySequence_Check
- PySequence_Concat=python34.PySequence_Concat
- PySequence_Contains=python34.PySequence_Contains
- PySequence_Count=python34.PySequence_Count
- PySequence_DelItem=python34.PySequence_DelItem
- PySequence_DelSlice=python34.PySequence_DelSlice
- PySequence_Fast=python34.PySequence_Fast
- PySequence_GetItem=python34.PySequence_GetItem
- PySequence_GetSlice=python34.PySequence_GetSlice
- PySequence_In=python34.PySequence_In
- PySequence_InPlaceConcat=python34.PySequence_InPlaceConcat
- PySequence_InPlaceRepeat=python34.PySequence_InPlaceRepeat
- PySequence_Index=python34.PySequence_Index
- PySequence_Length=python34.PySequence_Length
- PySequence_List=python34.PySequence_List
- PySequence_Repeat=python34.PySequence_Repeat
- PySequence_SetItem=python34.PySequence_SetItem
- PySequence_SetSlice=python34.PySequence_SetSlice
- PySequence_Size=python34.PySequence_Size
- PySequence_Tuple=python34.PySequence_Tuple
- PySetIter_Type=python34.PySetIter_Type DATA
- PySet_Add=python34.PySet_Add
- PySet_Clear=python34.PySet_Clear
- PySet_Contains=python34.PySet_Contains
- PySet_Discard=python34.PySet_Discard
- PySet_New=python34.PySet_New
- PySet_Pop=python34.PySet_Pop
- PySet_Size=python34.PySet_Size
- PySet_Type=python34.PySet_Type DATA
- PySlice_GetIndices=python34.PySlice_GetIndices
- PySlice_GetIndicesEx=python34.PySlice_GetIndicesEx
- PySlice_New=python34.PySlice_New
- PySlice_Type=python34.PySlice_Type DATA
- PySortWrapper_Type=python34.PySortWrapper_Type DATA
- PyState_FindModule=python34.PyState_FindModule
- PyState_AddModule=python34.PyState_AddModule
- PyState_RemoveModule=python34.PyState_RemoveModule
- PyStructSequence_GetItem=python34.PyStructSequence_GetItem
- PyStructSequence_New=python34.PyStructSequence_New
- PyStructSequence_NewType=python34.PyStructSequence_NewType
- PyStructSequence_SetItem=python34.PyStructSequence_SetItem
- PySuper_Type=python34.PySuper_Type DATA
- PySys_AddWarnOption=python34.PySys_AddWarnOption
- PySys_AddWarnOptionUnicode=python34.PySys_AddWarnOptionUnicode
- PySys_FormatStderr=python34.PySys_FormatStderr
- PySys_FormatStdout=python34.PySys_FormatStdout
- PySys_GetObject=python34.PySys_GetObject
- PySys_HasWarnOptions=python34.PySys_HasWarnOptions
- PySys_ResetWarnOptions=python34.PySys_ResetWarnOptions
- PySys_SetArgv=python34.PySys_SetArgv
- PySys_SetArgvEx=python34.PySys_SetArgvEx
- PySys_SetObject=python34.PySys_SetObject
- PySys_SetPath=python34.PySys_SetPath
- PySys_WriteStderr=python34.PySys_WriteStderr
- PySys_WriteStdout=python34.PySys_WriteStdout
- PyThreadState_Clear=python34.PyThreadState_Clear
- PyThreadState_Delete=python34.PyThreadState_Delete
- PyThreadState_DeleteCurrent=python34.PyThreadState_DeleteCurrent
- PyThreadState_Get=python34.PyThreadState_Get
- PyThreadState_GetDict=python34.PyThreadState_GetDict
- PyThreadState_New=python34.PyThreadState_New
- PyThreadState_SetAsyncExc=python34.PyThreadState_SetAsyncExc
- PyThreadState_Swap=python34.PyThreadState_Swap
- PyTraceBack_Here=python34.PyTraceBack_Here
- PyTraceBack_Print=python34.PyTraceBack_Print
- PyTraceBack_Type=python34.PyTraceBack_Type DATA
- PyTupleIter_Type=python34.PyTupleIter_Type DATA
- PyTuple_ClearFreeList=python34.PyTuple_ClearFreeList
- PyTuple_GetItem=python34.PyTuple_GetItem
- PyTuple_GetSlice=python34.PyTuple_GetSlice
- PyTuple_New=python34.PyTuple_New
- PyTuple_Pack=python34.PyTuple_Pack
- PyTuple_SetItem=python34.PyTuple_SetItem
- PyTuple_Size=python34.PyTuple_Size
- PyTuple_Type=python34.PyTuple_Type DATA
- PyType_ClearCache=python34.PyType_ClearCache
- PyType_FromSpec=python34.PyType_FromSpec
- PyType_FromSpecWithBases=python34.PyType_FromSpecWithBases
- PyType_GenericAlloc=python34.PyType_GenericAlloc
- PyType_GenericNew=python34.PyType_GenericNew
- PyType_GetFlags=python34.PyType_GetFlags
- PyType_GetSlot=python34.PyType_GetSlot
- PyType_IsSubtype=python34.PyType_IsSubtype
- PyType_Modified=python34.PyType_Modified
- PyType_Ready=python34.PyType_Ready
- PyType_Type=python34.PyType_Type DATA
- PyUnicodeDecodeError_Create=python34.PyUnicodeDecodeError_Create
- PyUnicodeDecodeError_GetEncoding=python34.PyUnicodeDecodeError_GetEncoding
- PyUnicodeDecodeError_GetEnd=python34.PyUnicodeDecodeError_GetEnd
- PyUnicodeDecodeError_GetObject=python34.PyUnicodeDecodeError_GetObject
- PyUnicodeDecodeError_GetReason=python34.PyUnicodeDecodeError_GetReason
- PyUnicodeDecodeError_GetStart=python34.PyUnicodeDecodeError_GetStart
- PyUnicodeDecodeError_SetEnd=python34.PyUnicodeDecodeError_SetEnd
- PyUnicodeDecodeError_SetReason=python34.PyUnicodeDecodeError_SetReason
- PyUnicodeDecodeError_SetStart=python34.PyUnicodeDecodeError_SetStart
- PyUnicodeEncodeError_GetEncoding=python34.PyUnicodeEncodeError_GetEncoding
- PyUnicodeEncodeError_GetEnd=python34.PyUnicodeEncodeError_GetEnd
- PyUnicodeEncodeError_GetObject=python34.PyUnicodeEncodeError_GetObject
- PyUnicodeEncodeError_GetReason=python34.PyUnicodeEncodeError_GetReason
- PyUnicodeEncodeError_GetStart=python34.PyUnicodeEncodeError_GetStart
- PyUnicodeEncodeError_SetEnd=python34.PyUnicodeEncodeError_SetEnd
- PyUnicodeEncodeError_SetReason=python34.PyUnicodeEncodeError_SetReason
- PyUnicodeEncodeError_SetStart=python34.PyUnicodeEncodeError_SetStart
- PyUnicodeIter_Type=python34.PyUnicodeIter_Type DATA
- PyUnicodeTranslateError_GetEnd=python34.PyUnicodeTranslateError_GetEnd
- PyUnicodeTranslateError_GetObject=python34.PyUnicodeTranslateError_GetObject
- PyUnicodeTranslateError_GetReason=python34.PyUnicodeTranslateError_GetReason
- PyUnicodeTranslateError_GetStart=python34.PyUnicodeTranslateError_GetStart
- PyUnicodeTranslateError_SetEnd=python34.PyUnicodeTranslateError_SetEnd
- PyUnicodeTranslateError_SetReason=python34.PyUnicodeTranslateError_SetReason
- PyUnicodeTranslateError_SetStart=python34.PyUnicodeTranslateError_SetStart
- PyUnicode_Append=python34.PyUnicode_Append
- PyUnicode_AppendAndDel=python34.PyUnicode_AppendAndDel
- PyUnicode_AsASCIIString=python34.PyUnicode_AsASCIIString
- PyUnicode_AsCharmapString=python34.PyUnicode_AsCharmapString
- PyUnicode_AsDecodedObject=python34.PyUnicode_AsDecodedObject
- PyUnicode_AsDecodedUnicode=python34.PyUnicode_AsDecodedUnicode
- PyUnicode_AsEncodedObject=python34.PyUnicode_AsEncodedObject
- PyUnicode_AsEncodedString=python34.PyUnicode_AsEncodedString
- PyUnicode_AsEncodedUnicode=python34.PyUnicode_AsEncodedUnicode
- PyUnicode_AsLatin1String=python34.PyUnicode_AsLatin1String
- PyUnicode_AsRawUnicodeEscapeString=python34.PyUnicode_AsRawUnicodeEscapeString
- PyUnicode_AsUTF16String=python34.PyUnicode_AsUTF16String
- PyUnicode_AsUTF32String=python34.PyUnicode_AsUTF32String
- PyUnicode_AsUTF8String=python34.PyUnicode_AsUTF8String
- PyUnicode_AsUnicodeEscapeString=python34.PyUnicode_AsUnicodeEscapeString
- PyUnicode_AsWideChar=python34.PyUnicode_AsWideChar
- PyUnicode_ClearFreelist=python34.PyUnicode_ClearFreelist
- PyUnicode_Compare=python34.PyUnicode_Compare
- PyUnicode_Concat=python34.PyUnicode_Concat
- PyUnicode_Contains=python34.PyUnicode_Contains
- PyUnicode_Count=python34.PyUnicode_Count
- PyUnicode_Decode=python34.PyUnicode_Decode
- PyUnicode_DecodeASCII=python34.PyUnicode_DecodeASCII
- PyUnicode_DecodeCharmap=python34.PyUnicode_DecodeCharmap
- PyUnicode_DecodeFSDefault=python34.PyUnicode_DecodeFSDefault
- PyUnicode_DecodeFSDefaultAndSize=python34.PyUnicode_DecodeFSDefaultAndSize
- PyUnicode_DecodeLatin1=python34.PyUnicode_DecodeLatin1
- PyUnicode_DecodeRawUnicodeEscape=python34.PyUnicode_DecodeRawUnicodeEscape
- PyUnicode_DecodeUTF16=python34.PyUnicode_DecodeUTF16
- PyUnicode_DecodeUTF16Stateful=python34.PyUnicode_DecodeUTF16Stateful
- PyUnicode_DecodeUTF32=python34.PyUnicode_DecodeUTF32
- PyUnicode_DecodeUTF32Stateful=python34.PyUnicode_DecodeUTF32Stateful
- PyUnicode_DecodeUTF8=python34.PyUnicode_DecodeUTF8
- PyUnicode_DecodeUTF8Stateful=python34.PyUnicode_DecodeUTF8Stateful
- PyUnicode_DecodeUnicodeEscape=python34.PyUnicode_DecodeUnicodeEscape
- PyUnicode_FSConverter=python34.PyUnicode_FSConverter
- PyUnicode_FSDecoder=python34.PyUnicode_FSDecoder
- PyUnicode_Find=python34.PyUnicode_Find
- PyUnicode_Format=python34.PyUnicode_Format
- PyUnicode_FromEncodedObject=python34.PyUnicode_FromEncodedObject
- PyUnicode_FromFormat=python34.PyUnicode_FromFormat
- PyUnicode_FromFormatV=python34.PyUnicode_FromFormatV
- PyUnicode_FromObject=python34.PyUnicode_FromObject
- PyUnicode_FromOrdinal=python34.PyUnicode_FromOrdinal
- PyUnicode_FromString=python34.PyUnicode_FromString
- PyUnicode_FromStringAndSize=python34.PyUnicode_FromStringAndSize
- PyUnicode_FromWideChar=python34.PyUnicode_FromWideChar
- PyUnicode_GetDefaultEncoding=python34.PyUnicode_GetDefaultEncoding
- PyUnicode_GetSize=python34.PyUnicode_GetSize
- PyUnicode_IsIdentifier=python34.PyUnicode_IsIdentifier
- PyUnicode_Join=python34.PyUnicode_Join
- PyUnicode_Partition=python34.PyUnicode_Partition
- PyUnicode_RPartition=python34.PyUnicode_RPartition
- PyUnicode_RSplit=python34.PyUnicode_RSplit
- PyUnicode_Replace=python34.PyUnicode_Replace
- PyUnicode_Resize=python34.PyUnicode_Resize
- PyUnicode_RichCompare=python34.PyUnicode_RichCompare
- PyUnicode_SetDefaultEncoding=python34.PyUnicode_SetDefaultEncoding
- PyUnicode_Split=python34.PyUnicode_Split
- PyUnicode_Splitlines=python34.PyUnicode_Splitlines
- PyUnicode_Tailmatch=python34.PyUnicode_Tailmatch
- PyUnicode_Translate=python34.PyUnicode_Translate
- PyUnicode_BuildEncodingMap=python34.PyUnicode_BuildEncodingMap
- PyUnicode_CompareWithASCIIString=python34.PyUnicode_CompareWithASCIIString
- PyUnicode_DecodeUTF7=python34.PyUnicode_DecodeUTF7
- PyUnicode_DecodeUTF7Stateful=python34.PyUnicode_DecodeUTF7Stateful
- PyUnicode_EncodeFSDefault=python34.PyUnicode_EncodeFSDefault
- PyUnicode_InternFromString=python34.PyUnicode_InternFromString
- PyUnicode_InternImmortal=python34.PyUnicode_InternImmortal
- PyUnicode_InternInPlace=python34.PyUnicode_InternInPlace
- PyUnicode_Type=python34.PyUnicode_Type DATA
- PyWeakref_GetObject=python34.PyWeakref_GetObject DATA
- PyWeakref_NewProxy=python34.PyWeakref_NewProxy
- PyWeakref_NewRef=python34.PyWeakref_NewRef
- PyWrapperDescr_Type=python34.PyWrapperDescr_Type DATA
- PyWrapper_New=python34.PyWrapper_New
- PyZip_Type=python34.PyZip_Type DATA
- Py_AddPendingCall=python34.Py_AddPendingCall
- Py_AtExit=python34.Py_AtExit
- Py_BuildValue=python34.Py_BuildValue
- Py_CompileString=python34.Py_CompileString
- Py_DecRef=python34.Py_DecRef
- Py_EndInterpreter=python34.Py_EndInterpreter
- Py_Exit=python34.Py_Exit
- Py_FatalError=python34.Py_FatalError
- Py_FileSystemDefaultEncoding=python34.Py_FileSystemDefaultEncoding DATA
- Py_Finalize=python34.Py_Finalize
- Py_GetBuildInfo=python34.Py_GetBuildInfo
- Py_GetCompiler=python34.Py_GetCompiler
- Py_GetCopyright=python34.Py_GetCopyright
- Py_GetExecPrefix=python34.Py_GetExecPrefix
- Py_GetPath=python34.Py_GetPath
- Py_GetPlatform=python34.Py_GetPlatform
- Py_GetPrefix=python34.Py_GetPrefix
- Py_GetProgramFullPath=python34.Py_GetProgramFullPath
- Py_GetProgramName=python34.Py_GetProgramName
- Py_GetPythonHome=python34.Py_GetPythonHome
- Py_GetRecursionLimit=python34.Py_GetRecursionLimit
- Py_GetVersion=python34.Py_GetVersion
- Py_HasFileSystemDefaultEncoding=python34.Py_HasFileSystemDefaultEncoding DATA
- Py_IncRef=python34.Py_IncRef
- Py_Initialize=python34.Py_Initialize
- Py_InitializeEx=python34.Py_InitializeEx
- Py_IsInitialized=python34.Py_IsInitialized
- Py_Main=python34.Py_Main
- Py_MakePendingCalls=python34.Py_MakePendingCalls
- Py_NewInterpreter=python34.Py_NewInterpreter
- Py_ReprEnter=python34.Py_ReprEnter
- Py_ReprLeave=python34.Py_ReprLeave
- Py_SetProgramName=python34.Py_SetProgramName
- Py_SetPythonHome=python34.Py_SetPythonHome
- Py_SetRecursionLimit=python34.Py_SetRecursionLimit
- Py_SymtableString=python34.Py_SymtableString
- Py_VaBuildValue=python34.Py_VaBuildValue
- _PyErr_BadInternalCall=python34._PyErr_BadInternalCall
- _PyObject_CallFunction_SizeT=python34._PyObject_CallFunction_SizeT
- _PyObject_CallMethod_SizeT=python34._PyObject_CallMethod_SizeT
- _PyObject_GC_Malloc=python34._PyObject_GC_Malloc
- _PyObject_GC_New=python34._PyObject_GC_New
- _PyObject_GC_NewVar=python34._PyObject_GC_NewVar
- _PyObject_GC_Resize=python34._PyObject_GC_Resize
- _PyObject_New=python34._PyObject_New
- _PyObject_NewVar=python34._PyObject_NewVar
- _PyState_AddModule=python34._PyState_AddModule
- _PyThreadState_Init=python34._PyThreadState_Init
- _PyThreadState_Prealloc=python34._PyThreadState_Prealloc
- _PyTrash_delete_later=python34._PyTrash_delete_later DATA
- _PyTrash_delete_nesting=python34._PyTrash_delete_nesting DATA
- _PyTrash_deposit_object=python34._PyTrash_deposit_object
- _PyTrash_destroy_chain=python34._PyTrash_destroy_chain
- _PyWeakref_CallableProxyType=python34._PyWeakref_CallableProxyType DATA
- _PyWeakref_ProxyType=python34._PyWeakref_ProxyType DATA
- _PyWeakref_RefType=python34._PyWeakref_RefType DATA
- _Py_BuildValue_SizeT=python34._Py_BuildValue_SizeT
- _Py_CheckRecursionLimit=python34._Py_CheckRecursionLimit DATA
- _Py_CheckRecursiveCall=python34._Py_CheckRecursiveCall
- _Py_Dealloc=python34._Py_Dealloc
- _Py_EllipsisObject=python34._Py_EllipsisObject DATA
- _Py_FalseStruct=python34._Py_FalseStruct DATA
- _Py_NoneStruct=python34._Py_NoneStruct DATA
- _Py_NotImplementedStruct=python34._Py_NotImplementedStruct DATA
- _Py_SwappedOp=python34._Py_SwappedOp DATA
- _Py_TrueStruct=python34._Py_TrueStruct DATA
- _Py_VaBuildValue_SizeT=python34._Py_VaBuildValue_SizeT
- _PyArg_Parse_SizeT=python34._PyArg_Parse_SizeT
- _PyArg_ParseTuple_SizeT=python34._PyArg_ParseTuple_SizeT
- _PyArg_ParseTupleAndKeywords_SizeT=python34._PyArg_ParseTupleAndKeywords_SizeT
- _PyArg_VaParse_SizeT=python34._PyArg_VaParse_SizeT
- _PyArg_VaParseTupleAndKeywords_SizeT=python34._PyArg_VaParseTupleAndKeywords_SizeT
- _Py_BuildValue_SizeT=python34._Py_BuildValue_SizeT
+ PyArg_Parse=python35.PyArg_Parse
+ PyArg_ParseTuple=python35.PyArg_ParseTuple
+ PyArg_ParseTupleAndKeywords=python35.PyArg_ParseTupleAndKeywords
+ PyArg_UnpackTuple=python35.PyArg_UnpackTuple
+ PyArg_VaParse=python35.PyArg_VaParse
+ PyArg_VaParseTupleAndKeywords=python35.PyArg_VaParseTupleAndKeywords
+ PyArg_ValidateKeywordArguments=python35.PyArg_ValidateKeywordArguments
+ PyBaseObject_Type=python35.PyBaseObject_Type DATA
+ PyBool_FromLong=python35.PyBool_FromLong
+ PyBool_Type=python35.PyBool_Type DATA
+ PyByteArrayIter_Type=python35.PyByteArrayIter_Type DATA
+ PyByteArray_AsString=python35.PyByteArray_AsString
+ PyByteArray_Concat=python35.PyByteArray_Concat
+ PyByteArray_FromObject=python35.PyByteArray_FromObject
+ PyByteArray_FromStringAndSize=python35.PyByteArray_FromStringAndSize
+ PyByteArray_Resize=python35.PyByteArray_Resize
+ PyByteArray_Size=python35.PyByteArray_Size
+ PyByteArray_Type=python35.PyByteArray_Type DATA
+ PyBytesIter_Type=python35.PyBytesIter_Type DATA
+ PyBytes_AsString=python35.PyBytes_AsString
+ PyBytes_AsStringAndSize=python35.PyBytes_AsStringAndSize
+ PyBytes_Concat=python35.PyBytes_Concat
+ PyBytes_ConcatAndDel=python35.PyBytes_ConcatAndDel
+ PyBytes_DecodeEscape=python35.PyBytes_DecodeEscape
+ PyBytes_FromFormat=python35.PyBytes_FromFormat
+ PyBytes_FromFormatV=python35.PyBytes_FromFormatV
+ PyBytes_FromObject=python35.PyBytes_FromObject
+ PyBytes_FromString=python35.PyBytes_FromString
+ PyBytes_FromStringAndSize=python35.PyBytes_FromStringAndSize
+ PyBytes_Repr=python35.PyBytes_Repr
+ PyBytes_Size=python35.PyBytes_Size
+ PyBytes_Type=python35.PyBytes_Type DATA
+ PyCFunction_Call=python35.PyCFunction_Call
+ PyCFunction_ClearFreeList=python35.PyCFunction_ClearFreeList
+ PyCFunction_GetFlags=python35.PyCFunction_GetFlags
+ PyCFunction_GetFunction=python35.PyCFunction_GetFunction
+ PyCFunction_GetSelf=python35.PyCFunction_GetSelf
+ PyCFunction_New=python35.PyCFunction_New
+ PyCFunction_NewEx=python35.PyCFunction_NewEx
+ PyCFunction_Type=python35.PyCFunction_Type DATA
+ PyCallIter_New=python35.PyCallIter_New
+ PyCallIter_Type=python35.PyCallIter_Type DATA
+ PyCallable_Check=python35.PyCallable_Check
+ PyCapsule_GetContext=python35.PyCapsule_GetContext
+ PyCapsule_GetDestructor=python35.PyCapsule_GetDestructor
+ PyCapsule_GetName=python35.PyCapsule_GetName
+ PyCapsule_GetPointer=python35.PyCapsule_GetPointer
+ PyCapsule_Import=python35.PyCapsule_Import
+ PyCapsule_IsValid=python35.PyCapsule_IsValid
+ PyCapsule_New=python35.PyCapsule_New
+ PyCapsule_SetContext=python35.PyCapsule_SetContext
+ PyCapsule_SetDestructor=python35.PyCapsule_SetDestructor
+ PyCapsule_SetName=python35.PyCapsule_SetName
+ PyCapsule_SetPointer=python35.PyCapsule_SetPointer
+ PyCapsule_Type=python35.PyCapsule_Type DATA
+ PyClassMethodDescr_Type=python35.PyClassMethodDescr_Type DATA
+ PyCodec_BackslashReplaceErrors=python35.PyCodec_BackslashReplaceErrors
+ PyCodec_Decode=python35.PyCodec_Decode
+ PyCodec_Decoder=python35.PyCodec_Decoder
+ PyCodec_Encode=python35.PyCodec_Encode
+ PyCodec_Encoder=python35.PyCodec_Encoder
+ PyCodec_IgnoreErrors=python35.PyCodec_IgnoreErrors
+ PyCodec_IncrementalDecoder=python35.PyCodec_IncrementalDecoder
+ PyCodec_IncrementalEncoder=python35.PyCodec_IncrementalEncoder
+ PyCodec_KnownEncoding=python35.PyCodec_KnownEncoding
+ PyCodec_LookupError=python35.PyCodec_LookupError
+ PyCodec_Register=python35.PyCodec_Register
+ PyCodec_RegisterError=python35.PyCodec_RegisterError
+ PyCodec_ReplaceErrors=python35.PyCodec_ReplaceErrors
+ PyCodec_StreamReader=python35.PyCodec_StreamReader
+ PyCodec_StreamWriter=python35.PyCodec_StreamWriter
+ PyCodec_StrictErrors=python35.PyCodec_StrictErrors
+ PyCodec_XMLCharRefReplaceErrors=python35.PyCodec_XMLCharRefReplaceErrors
+ PyComplex_FromDoubles=python35.PyComplex_FromDoubles
+ PyComplex_ImagAsDouble=python35.PyComplex_ImagAsDouble
+ PyComplex_RealAsDouble=python35.PyComplex_RealAsDouble
+ PyComplex_Type=python35.PyComplex_Type DATA
+ PyDescr_NewClassMethod=python35.PyDescr_NewClassMethod
+ PyDescr_NewGetSet=python35.PyDescr_NewGetSet
+ PyDescr_NewMember=python35.PyDescr_NewMember
+ PyDescr_NewMethod=python35.PyDescr_NewMethod
+ PyDictItems_Type=python35.PyDictItems_Type DATA
+ PyDictIterItem_Type=python35.PyDictIterItem_Type DATA
+ PyDictIterKey_Type=python35.PyDictIterKey_Type DATA
+ PyDictIterValue_Type=python35.PyDictIterValue_Type DATA
+ PyDictKeys_Type=python35.PyDictKeys_Type DATA
+ PyDictProxy_New=python35.PyDictProxy_New
+ PyDictProxy_Type=python35.PyDictProxy_Type DATA
+ PyDictValues_Type=python35.PyDictValues_Type DATA
+ PyDict_Clear=python35.PyDict_Clear
+ PyDict_Contains=python35.PyDict_Contains
+ PyDict_Copy=python35.PyDict_Copy
+ PyDict_DelItem=python35.PyDict_DelItem
+ PyDict_DelItemString=python35.PyDict_DelItemString
+ PyDict_GetItem=python35.PyDict_GetItem
+ PyDict_GetItemString=python35.PyDict_GetItemString
+ PyDict_GetItemWithError=python35.PyDict_GetItemWithError
+ PyDict_Items=python35.PyDict_Items
+ PyDict_Keys=python35.PyDict_Keys
+ PyDict_Merge=python35.PyDict_Merge
+ PyDict_MergeFromSeq2=python35.PyDict_MergeFromSeq2
+ PyDict_New=python35.PyDict_New
+ PyDict_Next=python35.PyDict_Next
+ PyDict_SetItem=python35.PyDict_SetItem
+ PyDict_SetItemString=python35.PyDict_SetItemString
+ PyDict_Size=python35.PyDict_Size
+ PyDict_Type=python35.PyDict_Type DATA
+ PyDict_Update=python35.PyDict_Update
+ PyDict_Values=python35.PyDict_Values
+ PyEllipsis_Type=python35.PyEllipsis_Type DATA
+ PyEnum_Type=python35.PyEnum_Type DATA
+ PyErr_BadArgument=python35.PyErr_BadArgument
+ PyErr_BadInternalCall=python35.PyErr_BadInternalCall
+ PyErr_CheckSignals=python35.PyErr_CheckSignals
+ PyErr_Clear=python35.PyErr_Clear
+ PyErr_Display=python35.PyErr_Display
+ PyErr_ExceptionMatches=python35.PyErr_ExceptionMatches
+ PyErr_Fetch=python35.PyErr_Fetch
+ PyErr_Format=python35.PyErr_Format
+ PyErr_FormatV=python35.PyErr_FormatV
+ PyErr_GivenExceptionMatches=python35.PyErr_GivenExceptionMatches
+ PyErr_NewException=python35.PyErr_NewException
+ PyErr_NewExceptionWithDoc=python35.PyErr_NewExceptionWithDoc
+ PyErr_NoMemory=python35.PyErr_NoMemory
+ PyErr_NormalizeException=python35.PyErr_NormalizeException
+ PyErr_Occurred=python35.PyErr_Occurred
+ PyErr_Print=python35.PyErr_Print
+ PyErr_PrintEx=python35.PyErr_PrintEx
+ PyErr_ProgramText=python35.PyErr_ProgramText
+ PyErr_Restore=python35.PyErr_Restore
+ PyErr_SetFromErrno=python35.PyErr_SetFromErrno
+ PyErr_SetFromErrnoWithFilename=python35.PyErr_SetFromErrnoWithFilename
+ PyErr_SetFromErrnoWithFilenameObject=python35.PyErr_SetFromErrnoWithFilenameObject
+ PyErr_SetInterrupt=python35.PyErr_SetInterrupt
+ PyErr_SetNone=python35.PyErr_SetNone
+ PyErr_SetObject=python35.PyErr_SetObject
+ PyErr_SetString=python35.PyErr_SetString
+ PyErr_SyntaxLocation=python35.PyErr_SyntaxLocation
+ PyErr_WarnEx=python35.PyErr_WarnEx
+ PyErr_WarnExplicit=python35.PyErr_WarnExplicit
+ PyErr_WarnFormat=python35.PyErr_WarnFormat
+ PyErr_WriteUnraisable=python35.PyErr_WriteUnraisable
+ PyEval_AcquireLock=python35.PyEval_AcquireLock
+ PyEval_AcquireThread=python35.PyEval_AcquireThread
+ PyEval_CallFunction=python35.PyEval_CallFunction
+ PyEval_CallMethod=python35.PyEval_CallMethod
+ PyEval_CallObjectWithKeywords=python35.PyEval_CallObjectWithKeywords
+ PyEval_EvalCode=python35.PyEval_EvalCode
+ PyEval_EvalCodeEx=python35.PyEval_EvalCodeEx
+ PyEval_EvalFrame=python35.PyEval_EvalFrame
+ PyEval_EvalFrameEx=python35.PyEval_EvalFrameEx
+ PyEval_GetBuiltins=python35.PyEval_GetBuiltins
+ PyEval_GetCallStats=python35.PyEval_GetCallStats
+ PyEval_GetFrame=python35.PyEval_GetFrame
+ PyEval_GetFuncDesc=python35.PyEval_GetFuncDesc
+ PyEval_GetFuncName=python35.PyEval_GetFuncName
+ PyEval_GetGlobals=python35.PyEval_GetGlobals
+ PyEval_GetLocals=python35.PyEval_GetLocals
+ PyEval_InitThreads=python35.PyEval_InitThreads
+ PyEval_ReInitThreads=python35.PyEval_ReInitThreads
+ PyEval_ReleaseLock=python35.PyEval_ReleaseLock
+ PyEval_ReleaseThread=python35.PyEval_ReleaseThread
+ PyEval_RestoreThread=python35.PyEval_RestoreThread
+ PyEval_SaveThread=python35.PyEval_SaveThread
+ PyEval_ThreadsInitialized=python35.PyEval_ThreadsInitialized
+ PyExc_ArithmeticError=python35.PyExc_ArithmeticError DATA
+ PyExc_AssertionError=python35.PyExc_AssertionError DATA
+ PyExc_AttributeError=python35.PyExc_AttributeError DATA
+ PyExc_BaseException=python35.PyExc_BaseException DATA
+ PyExc_BufferError=python35.PyExc_BufferError DATA
+ PyExc_BytesWarning=python35.PyExc_BytesWarning DATA
+ PyExc_DeprecationWarning=python35.PyExc_DeprecationWarning DATA
+ PyExc_EOFError=python35.PyExc_EOFError DATA
+ PyExc_EnvironmentError=python35.PyExc_EnvironmentError DATA
+ PyExc_Exception=python35.PyExc_Exception DATA
+ PyExc_FloatingPointError=python35.PyExc_FloatingPointError DATA
+ PyExc_FutureWarning=python35.PyExc_FutureWarning DATA
+ PyExc_GeneratorExit=python35.PyExc_GeneratorExit DATA
+ PyExc_IOError=python35.PyExc_IOError DATA
+ PyExc_ImportError=python35.PyExc_ImportError DATA
+ PyExc_ImportWarning=python35.PyExc_ImportWarning DATA
+ PyExc_IndentationError=python35.PyExc_IndentationError DATA
+ PyExc_IndexError=python35.PyExc_IndexError DATA
+ PyExc_KeyError=python35.PyExc_KeyError DATA
+ PyExc_KeyboardInterrupt=python35.PyExc_KeyboardInterrupt DATA
+ PyExc_LookupError=python35.PyExc_LookupError DATA
+ PyExc_MemoryError=python35.PyExc_MemoryError DATA
+ PyExc_MemoryErrorInst=python35.PyExc_MemoryErrorInst DATA
+ PyExc_NameError=python35.PyExc_NameError DATA
+ PyExc_NotImplementedError=python35.PyExc_NotImplementedError DATA
+ PyExc_OSError=python35.PyExc_OSError DATA
+ PyExc_OverflowError=python35.PyExc_OverflowError DATA
+ PyExc_PendingDeprecationWarning=python35.PyExc_PendingDeprecationWarning DATA
+ PyExc_RecursionErrorInst=python35.PyExc_RecursionErrorInst DATA
+ PyExc_ReferenceError=python35.PyExc_ReferenceError DATA
+ PyExc_RuntimeError=python35.PyExc_RuntimeError DATA
+ PyExc_RuntimeWarning=python35.PyExc_RuntimeWarning DATA
+ PyExc_StopIteration=python35.PyExc_StopIteration DATA
+ PyExc_SyntaxError=python35.PyExc_SyntaxError DATA
+ PyExc_SyntaxWarning=python35.PyExc_SyntaxWarning DATA
+ PyExc_SystemError=python35.PyExc_SystemError DATA
+ PyExc_SystemExit=python35.PyExc_SystemExit DATA
+ PyExc_TabError=python35.PyExc_TabError DATA
+ PyExc_TypeError=python35.PyExc_TypeError DATA
+ PyExc_UnboundLocalError=python35.PyExc_UnboundLocalError DATA
+ PyExc_UnicodeDecodeError=python35.PyExc_UnicodeDecodeError DATA
+ PyExc_UnicodeEncodeError=python35.PyExc_UnicodeEncodeError DATA
+ PyExc_UnicodeError=python35.PyExc_UnicodeError DATA
+ PyExc_UnicodeTranslateError=python35.PyExc_UnicodeTranslateError DATA
+ PyExc_UnicodeWarning=python35.PyExc_UnicodeWarning DATA
+ PyExc_UserWarning=python35.PyExc_UserWarning DATA
+ PyExc_ValueError=python35.PyExc_ValueError DATA
+ PyExc_Warning=python35.PyExc_Warning DATA
+ PyExc_ZeroDivisionError=python35.PyExc_ZeroDivisionError DATA
+ PyException_GetCause=python35.PyException_GetCause
+ PyException_GetContext=python35.PyException_GetContext
+ PyException_GetTraceback=python35.PyException_GetTraceback
+ PyException_SetCause=python35.PyException_SetCause
+ PyException_SetContext=python35.PyException_SetContext
+ PyException_SetTraceback=python35.PyException_SetTraceback
+ PyFile_FromFd=python35.PyFile_FromFd
+ PyFile_GetLine=python35.PyFile_GetLine
+ PyFile_WriteObject=python35.PyFile_WriteObject
+ PyFile_WriteString=python35.PyFile_WriteString
+ PyFilter_Type=python35.PyFilter_Type DATA
+ PyFloat_AsDouble=python35.PyFloat_AsDouble
+ PyFloat_FromDouble=python35.PyFloat_FromDouble
+ PyFloat_FromString=python35.PyFloat_FromString
+ PyFloat_GetInfo=python35.PyFloat_GetInfo
+ PyFloat_GetMax=python35.PyFloat_GetMax
+ PyFloat_GetMin=python35.PyFloat_GetMin
+ PyFloat_Type=python35.PyFloat_Type DATA
+ PyFrozenSet_New=python35.PyFrozenSet_New
+ PyFrozenSet_Type=python35.PyFrozenSet_Type DATA
+ PyGC_Collect=python35.PyGC_Collect
+ PyGILState_Ensure=python35.PyGILState_Ensure
+ PyGILState_GetThisThreadState=python35.PyGILState_GetThisThreadState
+ PyGILState_Release=python35.PyGILState_Release
+ PyGetSetDescr_Type=python35.PyGetSetDescr_Type DATA
+ PyImport_AddModule=python35.PyImport_AddModule
+ PyImport_AppendInittab=python35.PyImport_AppendInittab
+ PyImport_Cleanup=python35.PyImport_Cleanup
+ PyImport_ExecCodeModule=python35.PyImport_ExecCodeModule
+ PyImport_ExecCodeModuleEx=python35.PyImport_ExecCodeModuleEx
+ PyImport_ExecCodeModuleWithPathnames=python35.PyImport_ExecCodeModuleWithPathnames
+ PyImport_GetImporter=python35.PyImport_GetImporter
+ PyImport_GetMagicNumber=python35.PyImport_GetMagicNumber
+ PyImport_GetMagicTag=python35.PyImport_GetMagicTag
+ PyImport_GetModuleDict=python35.PyImport_GetModuleDict
+ PyImport_Import=python35.PyImport_Import
+ PyImport_ImportFrozenModule=python35.PyImport_ImportFrozenModule
+ PyImport_ImportModule=python35.PyImport_ImportModule
+ PyImport_ImportModuleLevel=python35.PyImport_ImportModuleLevel
+ PyImport_ImportModuleNoBlock=python35.PyImport_ImportModuleNoBlock
+ PyImport_ReloadModule=python35.PyImport_ReloadModule
+ PyInterpreterState_Clear=python35.PyInterpreterState_Clear
+ PyInterpreterState_Delete=python35.PyInterpreterState_Delete
+ PyInterpreterState_New=python35.PyInterpreterState_New
+ PyIter_Next=python35.PyIter_Next
+ PyListIter_Type=python35.PyListIter_Type DATA
+ PyListRevIter_Type=python35.PyListRevIter_Type DATA
+ PyList_Append=python35.PyList_Append
+ PyList_AsTuple=python35.PyList_AsTuple
+ PyList_GetItem=python35.PyList_GetItem
+ PyList_GetSlice=python35.PyList_GetSlice
+ PyList_Insert=python35.PyList_Insert
+ PyList_New=python35.PyList_New
+ PyList_Reverse=python35.PyList_Reverse
+ PyList_SetItem=python35.PyList_SetItem
+ PyList_SetSlice=python35.PyList_SetSlice
+ PyList_Size=python35.PyList_Size
+ PyList_Sort=python35.PyList_Sort
+ PyList_Type=python35.PyList_Type DATA
+ PyLongRangeIter_Type=python35.PyLongRangeIter_Type DATA
+ PyLong_AsDouble=python35.PyLong_AsDouble
+ PyLong_AsLong=python35.PyLong_AsLong
+ PyLong_AsLongAndOverflow=python35.PyLong_AsLongAndOverflow
+ PyLong_AsLongLong=python35.PyLong_AsLongLong
+ PyLong_AsLongLongAndOverflow=python35.PyLong_AsLongLongAndOverflow
+ PyLong_AsSize_t=python35.PyLong_AsSize_t
+ PyLong_AsSsize_t=python35.PyLong_AsSsize_t
+ PyLong_AsUnsignedLong=python35.PyLong_AsUnsignedLong
+ PyLong_AsUnsignedLongLong=python35.PyLong_AsUnsignedLongLong
+ PyLong_AsUnsignedLongLongMask=python35.PyLong_AsUnsignedLongLongMask
+ PyLong_AsUnsignedLongMask=python35.PyLong_AsUnsignedLongMask
+ PyLong_AsVoidPtr=python35.PyLong_AsVoidPtr
+ PyLong_FromDouble=python35.PyLong_FromDouble
+ PyLong_FromLong=python35.PyLong_FromLong
+ PyLong_FromLongLong=python35.PyLong_FromLongLong
+ PyLong_FromSize_t=python35.PyLong_FromSize_t
+ PyLong_FromSsize_t=python35.PyLong_FromSsize_t
+ PyLong_FromString=python35.PyLong_FromString
+ PyLong_FromUnsignedLong=python35.PyLong_FromUnsignedLong
+ PyLong_FromUnsignedLongLong=python35.PyLong_FromUnsignedLongLong
+ PyLong_FromVoidPtr=python35.PyLong_FromVoidPtr
+ PyLong_GetInfo=python35.PyLong_GetInfo
+ PyLong_Type=python35.PyLong_Type DATA
+ PyMap_Type=python35.PyMap_Type DATA
+ PyMapping_Check=python35.PyMapping_Check
+ PyMapping_GetItemString=python35.PyMapping_GetItemString
+ PyMapping_HasKey=python35.PyMapping_HasKey
+ PyMapping_HasKeyString=python35.PyMapping_HasKeyString
+ PyMapping_Items=python35.PyMapping_Items
+ PyMapping_Keys=python35.PyMapping_Keys
+ PyMapping_Length=python35.PyMapping_Length
+ PyMapping_SetItemString=python35.PyMapping_SetItemString
+ PyMapping_Size=python35.PyMapping_Size
+ PyMapping_Values=python35.PyMapping_Values
+ PyMem_Free=python35.PyMem_Free
+ PyMem_Malloc=python35.PyMem_Malloc
+ PyMem_Realloc=python35.PyMem_Realloc
+ PyMemberDescr_Type=python35.PyMemberDescr_Type DATA
+ PyMemoryView_FromObject=python35.PyMemoryView_FromObject
+ PyMemoryView_GetContiguous=python35.PyMemoryView_GetContiguous
+ PyMemoryView_Type=python35.PyMemoryView_Type DATA
+ PyMethodDescr_Type=python35.PyMethodDescr_Type DATA
+ PyModule_AddIntConstant=python35.PyModule_AddIntConstant
+ PyModule_AddObject=python35.PyModule_AddObject
+ PyModule_AddStringConstant=python35.PyModule_AddStringConstant
+ PyModule_Create2=python35.PyModule_Create2
+ PyModule_GetDef=python35.PyModule_GetDef
+ PyModule_GetDict=python35.PyModule_GetDict
+ PyModule_GetFilename=python35.PyModule_GetFilename
+ PyModule_GetFilenameObject=python35.PyModule_GetFilenameObject
+ PyModule_GetName=python35.PyModule_GetName
+ PyModule_GetState=python35.PyModule_GetState
+ PyModule_New=python35.PyModule_New
+ PyModule_Type=python35.PyModule_Type DATA
+ PyModuleDef_Init=python35.PyModuleDef_Init
+ PyModuleDef_Type=python35.PyModuleDef_Type DATA
+ PyNullImporter_Type=python35.PyNullImporter_Type DATA
+ PyNumber_Absolute=python35.PyNumber_Absolute
+ PyNumber_Add=python35.PyNumber_Add
+ PyNumber_And=python35.PyNumber_And
+ PyNumber_AsSsize_t=python35.PyNumber_AsSsize_t
+ PyNumber_Check=python35.PyNumber_Check
+ PyNumber_Divmod=python35.PyNumber_Divmod
+ PyNumber_Float=python35.PyNumber_Float
+ PyNumber_FloorDivide=python35.PyNumber_FloorDivide
+ PyNumber_InPlaceAdd=python35.PyNumber_InPlaceAdd
+ PyNumber_InPlaceAnd=python35.PyNumber_InPlaceAnd
+ PyNumber_InPlaceFloorDivide=python35.PyNumber_InPlaceFloorDivide
+ PyNumber_InPlaceLshift=python35.PyNumber_InPlaceLshift
+ PyNumber_InPlaceMultiply=python35.PyNumber_InPlaceMultiply
+ PyNumber_InPlaceOr=python35.PyNumber_InPlaceOr
+ PyNumber_InPlacePower=python35.PyNumber_InPlacePower
+ PyNumber_InPlaceRemainder=python35.PyNumber_InPlaceRemainder
+ PyNumber_InPlaceRshift=python35.PyNumber_InPlaceRshift
+ PyNumber_InPlaceSubtract=python35.PyNumber_InPlaceSubtract
+ PyNumber_InPlaceTrueDivide=python35.PyNumber_InPlaceTrueDivide
+ PyNumber_InPlaceXor=python35.PyNumber_InPlaceXor
+ PyNumber_Index=python35.PyNumber_Index
+ PyNumber_Invert=python35.PyNumber_Invert
+ PyNumber_Long=python35.PyNumber_Long
+ PyNumber_Lshift=python35.PyNumber_Lshift
+ PyNumber_Multiply=python35.PyNumber_Multiply
+ PyNumber_Negative=python35.PyNumber_Negative
+ PyNumber_Or=python35.PyNumber_Or
+ PyNumber_Positive=python35.PyNumber_Positive
+ PyNumber_Power=python35.PyNumber_Power
+ PyNumber_Remainder=python35.PyNumber_Remainder
+ PyNumber_Rshift=python35.PyNumber_Rshift
+ PyNumber_Subtract=python35.PyNumber_Subtract
+ PyNumber_ToBase=python35.PyNumber_ToBase
+ PyNumber_TrueDivide=python35.PyNumber_TrueDivide
+ PyNumber_Xor=python35.PyNumber_Xor
+ PyOS_AfterFork=python35.PyOS_AfterFork
+ PyOS_InitInterrupts=python35.PyOS_InitInterrupts
+ PyOS_InputHook=python35.PyOS_InputHook DATA
+ PyOS_InterruptOccurred=python35.PyOS_InterruptOccurred
+ PyOS_ReadlineFunctionPointer=python35.PyOS_ReadlineFunctionPointer DATA
+ PyOS_double_to_string=python35.PyOS_double_to_string
+ PyOS_getsig=python35.PyOS_getsig
+ PyOS_mystricmp=python35.PyOS_mystricmp
+ PyOS_mystrnicmp=python35.PyOS_mystrnicmp
+ PyOS_setsig=python35.PyOS_setsig
+ PyOS_snprintf=python35.PyOS_snprintf
+ PyOS_string_to_double=python35.PyOS_string_to_double
+ PyOS_strtol=python35.PyOS_strtol
+ PyOS_strtoul=python35.PyOS_strtoul
+ PyOS_vsnprintf=python35.PyOS_vsnprintf
+ PyObject_ASCII=python35.PyObject_ASCII
+ PyObject_AsCharBuffer=python35.PyObject_AsCharBuffer
+ PyObject_AsFileDescriptor=python35.PyObject_AsFileDescriptor
+ PyObject_AsReadBuffer=python35.PyObject_AsReadBuffer
+ PyObject_AsWriteBuffer=python35.PyObject_AsWriteBuffer
+ PyObject_Bytes=python35.PyObject_Bytes
+ PyObject_Call=python35.PyObject_Call
+ PyObject_CallFunction=python35.PyObject_CallFunction
+ PyObject_CallFunctionObjArgs=python35.PyObject_CallFunctionObjArgs
+ PyObject_CallMethod=python35.PyObject_CallMethod
+ PyObject_CallMethodObjArgs=python35.PyObject_CallMethodObjArgs
+ PyObject_CallObject=python35.PyObject_CallObject
+ PyObject_CheckReadBuffer=python35.PyObject_CheckReadBuffer
+ PyObject_ClearWeakRefs=python35.PyObject_ClearWeakRefs
+ PyObject_DelItem=python35.PyObject_DelItem
+ PyObject_DelItemString=python35.PyObject_DelItemString
+ PyObject_Dir=python35.PyObject_Dir
+ PyObject_Format=python35.PyObject_Format
+ PyObject_Free=python35.PyObject_Free
+ PyObject_GC_Del=python35.PyObject_GC_Del
+ PyObject_GC_Track=python35.PyObject_GC_Track
+ PyObject_GC_UnTrack=python35.PyObject_GC_UnTrack
+ PyObject_GenericGetAttr=python35.PyObject_GenericGetAttr
+ PyObject_GenericSetAttr=python35.PyObject_GenericSetAttr
+ PyObject_GetAttr=python35.PyObject_GetAttr
+ PyObject_GetAttrString=python35.PyObject_GetAttrString
+ PyObject_GetItem=python35.PyObject_GetItem
+ PyObject_GetIter=python35.PyObject_GetIter
+ PyObject_HasAttr=python35.PyObject_HasAttr
+ PyObject_HasAttrString=python35.PyObject_HasAttrString
+ PyObject_Hash=python35.PyObject_Hash
+ PyObject_HashNotImplemented=python35.PyObject_HashNotImplemented
+ PyObject_Init=python35.PyObject_Init
+ PyObject_InitVar=python35.PyObject_InitVar
+ PyObject_IsInstance=python35.PyObject_IsInstance
+ PyObject_IsSubclass=python35.PyObject_IsSubclass
+ PyObject_IsTrue=python35.PyObject_IsTrue
+ PyObject_Length=python35.PyObject_Length
+ PyObject_Malloc=python35.PyObject_Malloc
+ PyObject_Not=python35.PyObject_Not
+ PyObject_Realloc=python35.PyObject_Realloc
+ PyObject_Repr=python35.PyObject_Repr
+ PyObject_RichCompare=python35.PyObject_RichCompare
+ PyObject_RichCompareBool=python35.PyObject_RichCompareBool
+ PyObject_SelfIter=python35.PyObject_SelfIter
+ PyObject_SetAttr=python35.PyObject_SetAttr
+ PyObject_SetAttrString=python35.PyObject_SetAttrString
+ PyObject_SetItem=python35.PyObject_SetItem
+ PyObject_Size=python35.PyObject_Size
+ PyObject_Str=python35.PyObject_Str
+ PyObject_Type=python35.PyObject_Type DATA
+ PyODict_DelItem=python35.PyODict_DelItem
+ PyODict_New=python35.PyODict_New
+ PyODict_SetItem=python35.PyODict_SetItem
+ PyODict_Type=python35.PyODict_Type DATA
+ PyODictItems_Type=python35.PyODictItems_Type DATA
+ PyODictIter_Type=python35.PyODictIter_Type DATA
+ PyODictKeys_Type=python35.PyODictKeys_Type DATA
+ PyODictValues_Type=python35.PyODictValues_Type DATA
+ PyParser_SimpleParseFileFlags=python35.PyParser_SimpleParseFileFlags
+ PyParser_SimpleParseStringFlags=python35.PyParser_SimpleParseStringFlags
+ PyProperty_Type=python35.PyProperty_Type DATA
+ PyRangeIter_Type=python35.PyRangeIter_Type DATA
+ PyRange_Type=python35.PyRange_Type DATA
+ PyReversed_Type=python35.PyReversed_Type DATA
+ PySeqIter_New=python35.PySeqIter_New
+ PySeqIter_Type=python35.PySeqIter_Type DATA
+ PySequence_Check=python35.PySequence_Check
+ PySequence_Concat=python35.PySequence_Concat
+ PySequence_Contains=python35.PySequence_Contains
+ PySequence_Count=python35.PySequence_Count
+ PySequence_DelItem=python35.PySequence_DelItem
+ PySequence_DelSlice=python35.PySequence_DelSlice
+ PySequence_Fast=python35.PySequence_Fast
+ PySequence_GetItem=python35.PySequence_GetItem
+ PySequence_GetSlice=python35.PySequence_GetSlice
+ PySequence_In=python35.PySequence_In
+ PySequence_InPlaceConcat=python35.PySequence_InPlaceConcat
+ PySequence_InPlaceRepeat=python35.PySequence_InPlaceRepeat
+ PySequence_Index=python35.PySequence_Index
+ PySequence_Length=python35.PySequence_Length
+ PySequence_List=python35.PySequence_List
+ PySequence_Repeat=python35.PySequence_Repeat
+ PySequence_SetItem=python35.PySequence_SetItem
+ PySequence_SetSlice=python35.PySequence_SetSlice
+ PySequence_Size=python35.PySequence_Size
+ PySequence_Tuple=python35.PySequence_Tuple
+ PySetIter_Type=python35.PySetIter_Type DATA
+ PySet_Add=python35.PySet_Add
+ PySet_Clear=python35.PySet_Clear
+ PySet_Contains=python35.PySet_Contains
+ PySet_Discard=python35.PySet_Discard
+ PySet_New=python35.PySet_New
+ PySet_Pop=python35.PySet_Pop
+ PySet_Size=python35.PySet_Size
+ PySet_Type=python35.PySet_Type DATA
+ PySlice_GetIndices=python35.PySlice_GetIndices
+ PySlice_GetIndicesEx=python35.PySlice_GetIndicesEx
+ PySlice_New=python35.PySlice_New
+ PySlice_Type=python35.PySlice_Type DATA
+ PySortWrapper_Type=python35.PySortWrapper_Type DATA
+ PyState_FindModule=python35.PyState_FindModule
+ PyState_AddModule=python35.PyState_AddModule
+ PyState_RemoveModule=python35.PyState_RemoveModule
+ PyStructSequence_GetItem=python35.PyStructSequence_GetItem
+ PyStructSequence_New=python35.PyStructSequence_New
+ PyStructSequence_NewType=python35.PyStructSequence_NewType
+ PyStructSequence_SetItem=python35.PyStructSequence_SetItem
+ PySuper_Type=python35.PySuper_Type DATA
+ PySys_AddWarnOption=python35.PySys_AddWarnOption
+ PySys_AddWarnOptionUnicode=python35.PySys_AddWarnOptionUnicode
+ PySys_FormatStderr=python35.PySys_FormatStderr
+ PySys_FormatStdout=python35.PySys_FormatStdout
+ PySys_GetObject=python35.PySys_GetObject
+ PySys_HasWarnOptions=python35.PySys_HasWarnOptions
+ PySys_ResetWarnOptions=python35.PySys_ResetWarnOptions
+ PySys_SetArgv=python35.PySys_SetArgv
+ PySys_SetArgvEx=python35.PySys_SetArgvEx
+ PySys_SetObject=python35.PySys_SetObject
+ PySys_SetPath=python35.PySys_SetPath
+ PySys_WriteStderr=python35.PySys_WriteStderr
+ PySys_WriteStdout=python35.PySys_WriteStdout
+ PyThreadState_Clear=python35.PyThreadState_Clear
+ PyThreadState_Delete=python35.PyThreadState_Delete
+ PyThreadState_DeleteCurrent=python35.PyThreadState_DeleteCurrent
+ PyThreadState_Get=python35.PyThreadState_Get
+ PyThreadState_GetDict=python35.PyThreadState_GetDict
+ PyThreadState_New=python35.PyThreadState_New
+ PyThreadState_SetAsyncExc=python35.PyThreadState_SetAsyncExc
+ PyThreadState_Swap=python35.PyThreadState_Swap
+ PyTraceBack_Here=python35.PyTraceBack_Here
+ PyTraceBack_Print=python35.PyTraceBack_Print
+ PyTraceBack_Type=python35.PyTraceBack_Type DATA
+ PyTupleIter_Type=python35.PyTupleIter_Type DATA
+ PyTuple_ClearFreeList=python35.PyTuple_ClearFreeList
+ PyTuple_GetItem=python35.PyTuple_GetItem
+ PyTuple_GetSlice=python35.PyTuple_GetSlice
+ PyTuple_New=python35.PyTuple_New
+ PyTuple_Pack=python35.PyTuple_Pack
+ PyTuple_SetItem=python35.PyTuple_SetItem
+ PyTuple_Size=python35.PyTuple_Size
+ PyTuple_Type=python35.PyTuple_Type DATA
+ PyType_ClearCache=python35.PyType_ClearCache
+ PyType_FromSpec=python35.PyType_FromSpec
+ PyType_FromSpecWithBases=python35.PyType_FromSpecWithBases
+ PyType_GenericAlloc=python35.PyType_GenericAlloc
+ PyType_GenericNew=python35.PyType_GenericNew
+ PyType_GetFlags=python35.PyType_GetFlags
+ PyType_GetSlot=python35.PyType_GetSlot
+ PyType_IsSubtype=python35.PyType_IsSubtype
+ PyType_Modified=python35.PyType_Modified
+ PyType_Ready=python35.PyType_Ready
+ PyType_Type=python35.PyType_Type DATA
+ PyUnicodeDecodeError_Create=python35.PyUnicodeDecodeError_Create
+ PyUnicodeDecodeError_GetEncoding=python35.PyUnicodeDecodeError_GetEncoding
+ PyUnicodeDecodeError_GetEnd=python35.PyUnicodeDecodeError_GetEnd
+ PyUnicodeDecodeError_GetObject=python35.PyUnicodeDecodeError_GetObject
+ PyUnicodeDecodeError_GetReason=python35.PyUnicodeDecodeError_GetReason
+ PyUnicodeDecodeError_GetStart=python35.PyUnicodeDecodeError_GetStart
+ PyUnicodeDecodeError_SetEnd=python35.PyUnicodeDecodeError_SetEnd
+ PyUnicodeDecodeError_SetReason=python35.PyUnicodeDecodeError_SetReason
+ PyUnicodeDecodeError_SetStart=python35.PyUnicodeDecodeError_SetStart
+ PyUnicodeEncodeError_GetEncoding=python35.PyUnicodeEncodeError_GetEncoding
+ PyUnicodeEncodeError_GetEnd=python35.PyUnicodeEncodeError_GetEnd
+ PyUnicodeEncodeError_GetObject=python35.PyUnicodeEncodeError_GetObject
+ PyUnicodeEncodeError_GetReason=python35.PyUnicodeEncodeError_GetReason
+ PyUnicodeEncodeError_GetStart=python35.PyUnicodeEncodeError_GetStart
+ PyUnicodeEncodeError_SetEnd=python35.PyUnicodeEncodeError_SetEnd
+ PyUnicodeEncodeError_SetReason=python35.PyUnicodeEncodeError_SetReason
+ PyUnicodeEncodeError_SetStart=python35.PyUnicodeEncodeError_SetStart
+ PyUnicodeIter_Type=python35.PyUnicodeIter_Type DATA
+ PyUnicodeTranslateError_GetEnd=python35.PyUnicodeTranslateError_GetEnd
+ PyUnicodeTranslateError_GetObject=python35.PyUnicodeTranslateError_GetObject
+ PyUnicodeTranslateError_GetReason=python35.PyUnicodeTranslateError_GetReason
+ PyUnicodeTranslateError_GetStart=python35.PyUnicodeTranslateError_GetStart
+ PyUnicodeTranslateError_SetEnd=python35.PyUnicodeTranslateError_SetEnd
+ PyUnicodeTranslateError_SetReason=python35.PyUnicodeTranslateError_SetReason
+ PyUnicodeTranslateError_SetStart=python35.PyUnicodeTranslateError_SetStart
+ PyUnicode_Append=python35.PyUnicode_Append
+ PyUnicode_AppendAndDel=python35.PyUnicode_AppendAndDel
+ PyUnicode_AsASCIIString=python35.PyUnicode_AsASCIIString
+ PyUnicode_AsCharmapString=python35.PyUnicode_AsCharmapString
+ PyUnicode_AsDecodedObject=python35.PyUnicode_AsDecodedObject
+ PyUnicode_AsDecodedUnicode=python35.PyUnicode_AsDecodedUnicode
+ PyUnicode_AsEncodedObject=python35.PyUnicode_AsEncodedObject
+ PyUnicode_AsEncodedString=python35.PyUnicode_AsEncodedString
+ PyUnicode_AsEncodedUnicode=python35.PyUnicode_AsEncodedUnicode
+ PyUnicode_AsLatin1String=python35.PyUnicode_AsLatin1String
+ PyUnicode_AsRawUnicodeEscapeString=python35.PyUnicode_AsRawUnicodeEscapeString
+ PyUnicode_AsUTF16String=python35.PyUnicode_AsUTF16String
+ PyUnicode_AsUTF32String=python35.PyUnicode_AsUTF32String
+ PyUnicode_AsUTF8String=python35.PyUnicode_AsUTF8String
+ PyUnicode_AsUnicodeEscapeString=python35.PyUnicode_AsUnicodeEscapeString
+ PyUnicode_AsWideChar=python35.PyUnicode_AsWideChar
+ PyUnicode_ClearFreelist=python35.PyUnicode_ClearFreelist
+ PyUnicode_Compare=python35.PyUnicode_Compare
+ PyUnicode_Concat=python35.PyUnicode_Concat
+ PyUnicode_Contains=python35.PyUnicode_Contains
+ PyUnicode_Count=python35.PyUnicode_Count
+ PyUnicode_Decode=python35.PyUnicode_Decode
+ PyUnicode_DecodeASCII=python35.PyUnicode_DecodeASCII
+ PyUnicode_DecodeCharmap=python35.PyUnicode_DecodeCharmap
+ PyUnicode_DecodeFSDefault=python35.PyUnicode_DecodeFSDefault
+ PyUnicode_DecodeFSDefaultAndSize=python35.PyUnicode_DecodeFSDefaultAndSize
+ PyUnicode_DecodeLatin1=python35.PyUnicode_DecodeLatin1
+ PyUnicode_DecodeRawUnicodeEscape=python35.PyUnicode_DecodeRawUnicodeEscape
+ PyUnicode_DecodeUTF16=python35.PyUnicode_DecodeUTF16
+ PyUnicode_DecodeUTF16Stateful=python35.PyUnicode_DecodeUTF16Stateful
+ PyUnicode_DecodeUTF32=python35.PyUnicode_DecodeUTF32
+ PyUnicode_DecodeUTF32Stateful=python35.PyUnicode_DecodeUTF32Stateful
+ PyUnicode_DecodeUTF8=python35.PyUnicode_DecodeUTF8
+ PyUnicode_DecodeUTF8Stateful=python35.PyUnicode_DecodeUTF8Stateful
+ PyUnicode_DecodeUnicodeEscape=python35.PyUnicode_DecodeUnicodeEscape
+ PyUnicode_FSConverter=python35.PyUnicode_FSConverter
+ PyUnicode_FSDecoder=python35.PyUnicode_FSDecoder
+ PyUnicode_Find=python35.PyUnicode_Find
+ PyUnicode_Format=python35.PyUnicode_Format
+ PyUnicode_FromEncodedObject=python35.PyUnicode_FromEncodedObject
+ PyUnicode_FromFormat=python35.PyUnicode_FromFormat
+ PyUnicode_FromFormatV=python35.PyUnicode_FromFormatV
+ PyUnicode_FromObject=python35.PyUnicode_FromObject
+ PyUnicode_FromOrdinal=python35.PyUnicode_FromOrdinal
+ PyUnicode_FromString=python35.PyUnicode_FromString
+ PyUnicode_FromStringAndSize=python35.PyUnicode_FromStringAndSize
+ PyUnicode_FromWideChar=python35.PyUnicode_FromWideChar
+ PyUnicode_GetDefaultEncoding=python35.PyUnicode_GetDefaultEncoding
+ PyUnicode_GetSize=python35.PyUnicode_GetSize
+ PyUnicode_IsIdentifier=python35.PyUnicode_IsIdentifier
+ PyUnicode_Join=python35.PyUnicode_Join
+ PyUnicode_Partition=python35.PyUnicode_Partition
+ PyUnicode_RPartition=python35.PyUnicode_RPartition
+ PyUnicode_RSplit=python35.PyUnicode_RSplit
+ PyUnicode_Replace=python35.PyUnicode_Replace
+ PyUnicode_Resize=python35.PyUnicode_Resize
+ PyUnicode_RichCompare=python35.PyUnicode_RichCompare
+ PyUnicode_SetDefaultEncoding=python35.PyUnicode_SetDefaultEncoding
+ PyUnicode_Split=python35.PyUnicode_Split
+ PyUnicode_Splitlines=python35.PyUnicode_Splitlines
+ PyUnicode_Tailmatch=python35.PyUnicode_Tailmatch
+ PyUnicode_Translate=python35.PyUnicode_Translate
+ PyUnicode_BuildEncodingMap=python35.PyUnicode_BuildEncodingMap
+ PyUnicode_CompareWithASCIIString=python35.PyUnicode_CompareWithASCIIString
+ PyUnicode_DecodeUTF7=python35.PyUnicode_DecodeUTF7
+ PyUnicode_DecodeUTF7Stateful=python35.PyUnicode_DecodeUTF7Stateful
+ PyUnicode_EncodeFSDefault=python35.PyUnicode_EncodeFSDefault
+ PyUnicode_InternFromString=python35.PyUnicode_InternFromString
+ PyUnicode_InternImmortal=python35.PyUnicode_InternImmortal
+ PyUnicode_InternInPlace=python35.PyUnicode_InternInPlace
+ PyUnicode_Type=python35.PyUnicode_Type DATA
+ PyWeakref_GetObject=python35.PyWeakref_GetObject DATA
+ PyWeakref_NewProxy=python35.PyWeakref_NewProxy
+ PyWeakref_NewRef=python35.PyWeakref_NewRef
+ PyWrapperDescr_Type=python35.PyWrapperDescr_Type DATA
+ PyWrapper_New=python35.PyWrapper_New
+ PyZip_Type=python35.PyZip_Type DATA
+ Py_AddPendingCall=python35.Py_AddPendingCall
+ Py_AtExit=python35.Py_AtExit
+ Py_BuildValue=python35.Py_BuildValue
+ Py_CompileString=python35.Py_CompileString
+ Py_DecRef=python35.Py_DecRef
+ Py_EndInterpreter=python35.Py_EndInterpreter
+ Py_Exit=python35.Py_Exit
+ Py_FatalError=python35.Py_FatalError
+ Py_FileSystemDefaultEncoding=python35.Py_FileSystemDefaultEncoding DATA
+ Py_Finalize=python35.Py_Finalize
+ Py_GetBuildInfo=python35.Py_GetBuildInfo
+ Py_GetCompiler=python35.Py_GetCompiler
+ Py_GetCopyright=python35.Py_GetCopyright
+ Py_GetExecPrefix=python35.Py_GetExecPrefix
+ Py_GetPath=python35.Py_GetPath
+ Py_GetPlatform=python35.Py_GetPlatform
+ Py_GetPrefix=python35.Py_GetPrefix
+ Py_GetProgramFullPath=python35.Py_GetProgramFullPath
+ Py_GetProgramName=python35.Py_GetProgramName
+ Py_GetPythonHome=python35.Py_GetPythonHome
+ Py_GetRecursionLimit=python35.Py_GetRecursionLimit
+ Py_GetVersion=python35.Py_GetVersion
+ Py_HasFileSystemDefaultEncoding=python35.Py_HasFileSystemDefaultEncoding DATA
+ Py_IncRef=python35.Py_IncRef
+ Py_Initialize=python35.Py_Initialize
+ Py_InitializeEx=python35.Py_InitializeEx
+ Py_IsInitialized=python35.Py_IsInitialized
+ Py_Main=python35.Py_Main
+ Py_MakePendingCalls=python35.Py_MakePendingCalls
+ Py_NewInterpreter=python35.Py_NewInterpreter
+ Py_ReprEnter=python35.Py_ReprEnter
+ Py_ReprLeave=python35.Py_ReprLeave
+ Py_SetProgramName=python35.Py_SetProgramName
+ Py_SetPythonHome=python35.Py_SetPythonHome
+ Py_SetRecursionLimit=python35.Py_SetRecursionLimit
+ Py_SymtableString=python35.Py_SymtableString
+ Py_VaBuildValue=python35.Py_VaBuildValue
+ _PyErr_BadInternalCall=python35._PyErr_BadInternalCall
+ _PyObject_CallFunction_SizeT=python35._PyObject_CallFunction_SizeT
+ _PyObject_CallMethod_SizeT=python35._PyObject_CallMethod_SizeT
+ _PyObject_GC_Malloc=python35._PyObject_GC_Malloc
+ _PyObject_GC_New=python35._PyObject_GC_New
+ _PyObject_GC_NewVar=python35._PyObject_GC_NewVar
+ _PyObject_GC_Resize=python35._PyObject_GC_Resize
+ _PyObject_New=python35._PyObject_New
+ _PyObject_NewVar=python35._PyObject_NewVar
+ _PyState_AddModule=python35._PyState_AddModule
+ _PyThreadState_Init=python35._PyThreadState_Init
+ _PyThreadState_Prealloc=python35._PyThreadState_Prealloc
+ _PyTrash_delete_later=python35._PyTrash_delete_later DATA
+ _PyTrash_delete_nesting=python35._PyTrash_delete_nesting DATA
+ _PyTrash_deposit_object=python35._PyTrash_deposit_object
+ _PyTrash_destroy_chain=python35._PyTrash_destroy_chain
+ _PyWeakref_CallableProxyType=python35._PyWeakref_CallableProxyType DATA
+ _PyWeakref_ProxyType=python35._PyWeakref_ProxyType DATA
+ _PyWeakref_RefType=python35._PyWeakref_RefType DATA
+ _Py_BuildValue_SizeT=python35._Py_BuildValue_SizeT
+ _Py_CheckRecursionLimit=python35._Py_CheckRecursionLimit DATA
+ _Py_CheckRecursiveCall=python35._Py_CheckRecursiveCall
+ _Py_Dealloc=python35._Py_Dealloc
+ _Py_EllipsisObject=python35._Py_EllipsisObject DATA
+ _Py_FalseStruct=python35._Py_FalseStruct DATA
+ _Py_NoneStruct=python35._Py_NoneStruct DATA
+ _Py_NotImplementedStruct=python35._Py_NotImplementedStruct DATA
+ _Py_SwappedOp=python35._Py_SwappedOp DATA
+ _Py_TrueStruct=python35._Py_TrueStruct DATA
+ _Py_VaBuildValue_SizeT=python35._Py_VaBuildValue_SizeT
+ _PyArg_Parse_SizeT=python35._PyArg_Parse_SizeT
+ _PyArg_ParseTuple_SizeT=python35._PyArg_ParseTuple_SizeT
+ _PyArg_ParseTupleAndKeywords_SizeT=python35._PyArg_ParseTupleAndKeywords_SizeT
+ _PyArg_VaParse_SizeT=python35._PyArg_VaParse_SizeT
+ _PyArg_VaParseTupleAndKeywords_SizeT=python35._PyArg_VaParseTupleAndKeywords_SizeT
+ _Py_BuildValue_SizeT=python35._Py_BuildValue_SizeT
diff --git a/PC/python3.mak b/PC/python3.mak
deleted file mode 100644
index fb8e7aac09..0000000000
--- a/PC/python3.mak
+++ /dev/null
@@ -1,14 +0,0 @@
-$(OutDir)python3.dll: python3.def $(OutDir)python34stub.lib
- cl /LD /Fe$(OutDir)python3.dll python3dll.c python3.def $(OutDir)python34stub.lib
-
-$(OutDir)python34stub.lib: python34stub.def
- lib /def:python34stub.def /out:$(OutDir)python34stub.lib /MACHINE:$(MACHINE)
-
-clean:
- IF EXIST $(OutDir)python3.dll del $(OutDir)python3.dll
- IF EXIST $(OutDir)python3.lib del $(OutDir)python3.lib
- IF EXIST $(OutDir)python34stub.lib del $(OutDir)python34stub.lib
- IF EXIST $(OutDir)python3.exp del $(OutDir)python3.exp
- IF EXIST $(OutDir)python34stub.exp del $(OutDir)python34stub.exp
-
-rebuild: clean $(OutDir)python3.dll
diff --git a/PC/python34gen.py b/PC/python34gen.py
deleted file mode 100644
index 180ce11fd2..0000000000
--- a/PC/python34gen.py
+++ /dev/null
@@ -1,26 +0,0 @@
-# Generate python34stub.def out of python3.def
-# The regular import library cannot be used,
-# since it doesn't provide the right symbols for
-# data forwarding
-out = open("python34stub.def", "w")
-out.write('LIBRARY "python34"\n')
-out.write('EXPORTS\n')
-
-inp = open("python3.def")
-line = inp.readline()
-while line.strip().startswith(';'):
- line = inp.readline()
-line = inp.readline() # LIBRARY
-assert line.strip()=='EXPORTS'
-
-for line in inp:
- # SYM1=python34.SYM2[ DATA]
- head, tail = line.split('.')
- if 'DATA' in tail:
- symbol, tail = tail.split(' ')
- else:
- symbol = tail.strip()
- out.write(symbol+'\n')
-
-inp.close()
-out.close()
diff --git a/PC/python34stub.def b/PC/python34stub.def
deleted file mode 100644
index 3074cf3f42..0000000000
--- a/PC/python34stub.def
+++ /dev/null
@@ -1,700 +0,0 @@
-LIBRARY "python34"
-EXPORTS
-PyArg_Parse
-PyArg_ParseTuple
-PyArg_ParseTupleAndKeywords
-PyArg_UnpackTuple
-PyArg_VaParse
-PyArg_VaParseTupleAndKeywords
-PyArg_ValidateKeywordArguments
-PyBaseObject_Type
-PyBool_FromLong
-PyBool_Type
-PyByteArrayIter_Type
-PyByteArray_AsString
-PyByteArray_Concat
-PyByteArray_FromObject
-PyByteArray_FromStringAndSize
-PyByteArray_Resize
-PyByteArray_Size
-PyByteArray_Type
-PyBytesIter_Type
-PyBytes_AsString
-PyBytes_AsStringAndSize
-PyBytes_Concat
-PyBytes_ConcatAndDel
-PyBytes_DecodeEscape
-PyBytes_FromFormat
-PyBytes_FromFormatV
-PyBytes_FromObject
-PyBytes_FromString
-PyBytes_FromStringAndSize
-PyBytes_Repr
-PyBytes_Size
-PyBytes_Type
-PyCFunction_Call
-PyCFunction_ClearFreeList
-PyCFunction_GetFlags
-PyCFunction_GetFunction
-PyCFunction_GetSelf
-PyCFunction_New
-PyCFunction_NewEx
-PyCFunction_Type
-PyCallIter_New
-PyCallIter_Type
-PyCallable_Check
-PyCapsule_GetContext
-PyCapsule_GetDestructor
-PyCapsule_GetName
-PyCapsule_GetPointer
-PyCapsule_Import
-PyCapsule_IsValid
-PyCapsule_New
-PyCapsule_SetContext
-PyCapsule_SetDestructor
-PyCapsule_SetName
-PyCapsule_SetPointer
-PyCapsule_Type
-PyClassMethodDescr_Type
-PyCodec_BackslashReplaceErrors
-PyCodec_Decode
-PyCodec_Decoder
-PyCodec_Encode
-PyCodec_Encoder
-PyCodec_IgnoreErrors
-PyCodec_IncrementalDecoder
-PyCodec_IncrementalEncoder
-PyCodec_KnownEncoding
-PyCodec_LookupError
-PyCodec_Register
-PyCodec_RegisterError
-PyCodec_ReplaceErrors
-PyCodec_StreamReader
-PyCodec_StreamWriter
-PyCodec_StrictErrors
-PyCodec_XMLCharRefReplaceErrors
-PyComplex_FromDoubles
-PyComplex_ImagAsDouble
-PyComplex_RealAsDouble
-PyComplex_Type
-PyDescr_NewClassMethod
-PyDescr_NewGetSet
-PyDescr_NewMember
-PyDescr_NewMethod
-PyDictItems_Type
-PyDictIterItem_Type
-PyDictIterKey_Type
-PyDictIterValue_Type
-PyDictKeys_Type
-PyDictProxy_New
-PyDictProxy_Type
-PyDictValues_Type
-PyDict_Clear
-PyDict_Contains
-PyDict_Copy
-PyDict_DelItem
-PyDict_DelItemString
-PyDict_GetItem
-PyDict_GetItemString
-PyDict_GetItemWithError
-PyDict_Items
-PyDict_Keys
-PyDict_Merge
-PyDict_MergeFromSeq2
-PyDict_New
-PyDict_Next
-PyDict_SetItem
-PyDict_SetItemString
-PyDict_Size
-PyDict_Type
-PyDict_Update
-PyDict_Values
-PyEllipsis_Type
-PyEnum_Type
-PyErr_BadArgument
-PyErr_BadInternalCall
-PyErr_CheckSignals
-PyErr_Clear
-PyErr_Display
-PyErr_ExceptionMatches
-PyErr_Fetch
-PyErr_Format
-PyErr_GivenExceptionMatches
-PyErr_NewException
-PyErr_NewExceptionWithDoc
-PyErr_NoMemory
-PyErr_NormalizeException
-PyErr_Occurred
-PyErr_Print
-PyErr_PrintEx
-PyErr_ProgramText
-PyErr_Restore
-PyErr_SetFromErrno
-PyErr_SetFromErrnoWithFilename
-PyErr_SetFromErrnoWithFilenameObject
-PyErr_SetInterrupt
-PyErr_SetNone
-PyErr_SetObject
-PyErr_SetString
-PyErr_SyntaxLocation
-PyErr_WarnEx
-PyErr_WarnExplicit
-PyErr_WarnFormat
-PyErr_WriteUnraisable
-PyEval_AcquireLock
-PyEval_AcquireThread
-PyEval_CallFunction
-PyEval_CallMethod
-PyEval_CallObjectWithKeywords
-PyEval_EvalCode
-PyEval_EvalCodeEx
-PyEval_EvalFrame
-PyEval_EvalFrameEx
-PyEval_GetBuiltins
-PyEval_GetCallStats
-PyEval_GetFrame
-PyEval_GetFuncDesc
-PyEval_GetFuncName
-PyEval_GetGlobals
-PyEval_GetLocals
-PyEval_InitThreads
-PyEval_ReInitThreads
-PyEval_ReleaseLock
-PyEval_ReleaseThread
-PyEval_RestoreThread
-PyEval_SaveThread
-PyEval_ThreadsInitialized
-PyExc_ArithmeticError
-PyExc_AssertionError
-PyExc_AttributeError
-PyExc_BaseException
-PyExc_BufferError
-PyExc_BytesWarning
-PyExc_DeprecationWarning
-PyExc_EOFError
-PyExc_EnvironmentError
-PyExc_Exception
-PyExc_FloatingPointError
-PyExc_FutureWarning
-PyExc_GeneratorExit
-PyExc_IOError
-PyExc_ImportError
-PyExc_ImportWarning
-PyExc_IndentationError
-PyExc_IndexError
-PyExc_KeyError
-PyExc_KeyboardInterrupt
-PyExc_LookupError
-PyExc_MemoryError
-PyExc_MemoryErrorInst
-PyExc_NameError
-PyExc_NotImplementedError
-PyExc_OSError
-PyExc_OverflowError
-PyExc_PendingDeprecationWarning
-PyExc_RecursionErrorInst
-PyExc_ReferenceError
-PyExc_RuntimeError
-PyExc_RuntimeWarning
-PyExc_StopIteration
-PyExc_SyntaxError
-PyExc_SyntaxWarning
-PyExc_SystemError
-PyExc_SystemExit
-PyExc_TabError
-PyExc_TypeError
-PyExc_UnboundLocalError
-PyExc_UnicodeDecodeError
-PyExc_UnicodeEncodeError
-PyExc_UnicodeError
-PyExc_UnicodeTranslateError
-PyExc_UnicodeWarning
-PyExc_UserWarning
-PyExc_ValueError
-PyExc_Warning
-PyExc_ZeroDivisionError
-PyException_GetCause
-PyException_GetContext
-PyException_GetTraceback
-PyException_SetCause
-PyException_SetContext
-PyException_SetTraceback
-PyFile_FromFd
-PyFile_GetLine
-PyFile_WriteObject
-PyFile_WriteString
-PyFilter_Type
-PyFloat_AsDouble
-PyFloat_FromDouble
-PyFloat_FromString
-PyFloat_GetInfo
-PyFloat_GetMax
-PyFloat_GetMin
-PyFloat_Type
-PyFrozenSet_New
-PyFrozenSet_Type
-PyGC_Collect
-PyGILState_Ensure
-PyGILState_GetThisThreadState
-PyGILState_Release
-PyGetSetDescr_Type
-PyImport_AddModule
-PyImport_AppendInittab
-PyImport_Cleanup
-PyImport_ExecCodeModule
-PyImport_ExecCodeModuleEx
-PyImport_ExecCodeModuleWithPathnames
-PyImport_GetImporter
-PyImport_GetMagicNumber
-PyImport_GetMagicTag
-PyImport_GetModuleDict
-PyImport_Import
-PyImport_ImportFrozenModule
-PyImport_ImportModule
-PyImport_ImportModuleLevel
-PyImport_ImportModuleNoBlock
-PyImport_ReloadModule
-PyInterpreterState_Clear
-PyInterpreterState_Delete
-PyInterpreterState_New
-PyIter_Next
-PyListIter_Type
-PyListRevIter_Type
-PyList_Append
-PyList_AsTuple
-PyList_GetItem
-PyList_GetSlice
-PyList_Insert
-PyList_New
-PyList_Reverse
-PyList_SetItem
-PyList_SetSlice
-PyList_Size
-PyList_Sort
-PyList_Type
-PyLongRangeIter_Type
-PyLong_AsDouble
-PyLong_AsLong
-PyLong_AsLongAndOverflow
-PyLong_AsLongLong
-PyLong_AsLongLongAndOverflow
-PyLong_AsSize_t
-PyLong_AsSsize_t
-PyLong_AsUnsignedLong
-PyLong_AsUnsignedLongLong
-PyLong_AsUnsignedLongLongMask
-PyLong_AsUnsignedLongMask
-PyLong_AsVoidPtr
-PyLong_FromDouble
-PyLong_FromLong
-PyLong_FromLongLong
-PyLong_FromSize_t
-PyLong_FromSsize_t
-PyLong_FromString
-PyLong_FromUnsignedLong
-PyLong_FromUnsignedLongLong
-PyLong_FromVoidPtr
-PyLong_GetInfo
-PyLong_Type
-PyMap_Type
-PyMapping_Check
-PyMapping_GetItemString
-PyMapping_HasKey
-PyMapping_HasKeyString
-PyMapping_Items
-PyMapping_Keys
-PyMapping_Length
-PyMapping_SetItemString
-PyMapping_Size
-PyMapping_Values
-PyMem_Free
-PyMem_Malloc
-PyMem_Realloc
-PyMemberDescr_Type
-PyMemoryView_FromObject
-PyMemoryView_GetContiguous
-PyMemoryView_Type
-PyMethodDescr_Type
-PyModule_AddIntConstant
-PyModule_AddObject
-PyModule_AddStringConstant
-PyModule_Create2
-PyModule_GetDef
-PyModule_GetDict
-PyModule_GetFilename
-PyModule_GetFilenameObject
-PyModule_GetName
-PyModule_GetState
-PyModule_New
-PyModule_Type
-PyNullImporter_Type
-PyNumber_Absolute
-PyNumber_Add
-PyNumber_And
-PyNumber_AsSsize_t
-PyNumber_Check
-PyNumber_Divmod
-PyNumber_Float
-PyNumber_FloorDivide
-PyNumber_InPlaceAdd
-PyNumber_InPlaceAnd
-PyNumber_InPlaceFloorDivide
-PyNumber_InPlaceLshift
-PyNumber_InPlaceMultiply
-PyNumber_InPlaceOr
-PyNumber_InPlacePower
-PyNumber_InPlaceRemainder
-PyNumber_InPlaceRshift
-PyNumber_InPlaceSubtract
-PyNumber_InPlaceTrueDivide
-PyNumber_InPlaceXor
-PyNumber_Index
-PyNumber_Invert
-PyNumber_Long
-PyNumber_Lshift
-PyNumber_Multiply
-PyNumber_Negative
-PyNumber_Or
-PyNumber_Positive
-PyNumber_Power
-PyNumber_Remainder
-PyNumber_Rshift
-PyNumber_Subtract
-PyNumber_ToBase
-PyNumber_TrueDivide
-PyNumber_Xor
-PyOS_AfterFork
-PyOS_InitInterrupts
-PyOS_InputHook
-PyOS_InterruptOccurred
-PyOS_ReadlineFunctionPointer
-PyOS_double_to_string
-PyOS_getsig
-PyOS_mystricmp
-PyOS_mystrnicmp
-PyOS_setsig
-PyOS_snprintf
-PyOS_string_to_double
-PyOS_strtol
-PyOS_strtoul
-PyOS_vsnprintf
-PyObject_ASCII
-PyObject_AsCharBuffer
-PyObject_AsFileDescriptor
-PyObject_AsReadBuffer
-PyObject_AsWriteBuffer
-PyObject_Bytes
-PyObject_Call
-PyObject_CallFunction
-PyObject_CallFunctionObjArgs
-PyObject_CallMethod
-PyObject_CallMethodObjArgs
-PyObject_CallObject
-PyObject_CheckReadBuffer
-PyObject_ClearWeakRefs
-PyObject_DelItem
-PyObject_DelItemString
-PyObject_Dir
-PyObject_Format
-PyObject_Free
-PyObject_GC_Del
-PyObject_GC_Track
-PyObject_GC_UnTrack
-PyObject_GenericGetAttr
-PyObject_GenericSetAttr
-PyObject_GetAttr
-PyObject_GetAttrString
-PyObject_GetItem
-PyObject_GetIter
-PyObject_HasAttr
-PyObject_HasAttrString
-PyObject_Hash
-PyObject_HashNotImplemented
-PyObject_Init
-PyObject_InitVar
-PyObject_IsInstance
-PyObject_IsSubclass
-PyObject_IsTrue
-PyObject_Length
-PyObject_Malloc
-PyObject_Not
-PyObject_Realloc
-PyObject_Repr
-PyObject_RichCompare
-PyObject_RichCompareBool
-PyObject_SelfIter
-PyObject_SetAttr
-PyObject_SetAttrString
-PyObject_SetItem
-PyObject_Size
-PyObject_Str
-PyObject_Type
-PyParser_SimpleParseFileFlags
-PyParser_SimpleParseStringFlags
-PyProperty_Type
-PyRangeIter_Type
-PyRange_Type
-PyReversed_Type
-PySeqIter_New
-PySeqIter_Type
-PySequence_Check
-PySequence_Concat
-PySequence_Contains
-PySequence_Count
-PySequence_DelItem
-PySequence_DelSlice
-PySequence_Fast
-PySequence_GetItem
-PySequence_GetSlice
-PySequence_In
-PySequence_InPlaceConcat
-PySequence_InPlaceRepeat
-PySequence_Index
-PySequence_Length
-PySequence_List
-PySequence_Repeat
-PySequence_SetItem
-PySequence_SetSlice
-PySequence_Size
-PySequence_Tuple
-PySetIter_Type
-PySet_Add
-PySet_Clear
-PySet_Contains
-PySet_Discard
-PySet_New
-PySet_Pop
-PySet_Size
-PySet_Type
-PySlice_GetIndices
-PySlice_GetIndicesEx
-PySlice_New
-PySlice_Type
-PySortWrapper_Type
-PyState_FindModule
-PyState_AddModule
-PyState_RemoveModule
-PyStructSequence_GetItem
-PyStructSequence_New
-PyStructSequence_NewType
-PyStructSequence_SetItem
-PySuper_Type
-PySys_AddWarnOption
-PySys_AddWarnOptionUnicode
-PySys_FormatStderr
-PySys_FormatStdout
-PySys_GetObject
-PySys_HasWarnOptions
-PySys_ResetWarnOptions
-PySys_SetArgv
-PySys_SetArgvEx
-PySys_SetObject
-PySys_SetPath
-PySys_WriteStderr
-PySys_WriteStdout
-PyThreadState_Clear
-PyThreadState_Delete
-PyThreadState_DeleteCurrent
-PyThreadState_Get
-PyThreadState_GetDict
-PyThreadState_New
-PyThreadState_SetAsyncExc
-PyThreadState_Swap
-PyTraceBack_Here
-PyTraceBack_Print
-PyTraceBack_Type
-PyTupleIter_Type
-PyTuple_ClearFreeList
-PyTuple_GetItem
-PyTuple_GetSlice
-PyTuple_New
-PyTuple_Pack
-PyTuple_SetItem
-PyTuple_Size
-PyTuple_Type
-PyType_ClearCache
-PyType_FromSpec
-PyType_FromSpecWithBases
-PyType_GenericAlloc
-PyType_GenericNew
-PyType_GetFlags
-PyType_GetSlot
-PyType_IsSubtype
-PyType_Modified
-PyType_Ready
-PyType_Type
-PyUnicodeDecodeError_Create
-PyUnicodeDecodeError_GetEncoding
-PyUnicodeDecodeError_GetEnd
-PyUnicodeDecodeError_GetObject
-PyUnicodeDecodeError_GetReason
-PyUnicodeDecodeError_GetStart
-PyUnicodeDecodeError_SetEnd
-PyUnicodeDecodeError_SetReason
-PyUnicodeDecodeError_SetStart
-PyUnicodeEncodeError_GetEncoding
-PyUnicodeEncodeError_GetEnd
-PyUnicodeEncodeError_GetObject
-PyUnicodeEncodeError_GetReason
-PyUnicodeEncodeError_GetStart
-PyUnicodeEncodeError_SetEnd
-PyUnicodeEncodeError_SetReason
-PyUnicodeEncodeError_SetStart
-PyUnicodeIter_Type
-PyUnicodeTranslateError_GetEnd
-PyUnicodeTranslateError_GetObject
-PyUnicodeTranslateError_GetReason
-PyUnicodeTranslateError_GetStart
-PyUnicodeTranslateError_SetEnd
-PyUnicodeTranslateError_SetReason
-PyUnicodeTranslateError_SetStart
-PyUnicode_Append
-PyUnicode_AppendAndDel
-PyUnicode_AsASCIIString
-PyUnicode_AsCharmapString
-PyUnicode_AsDecodedObject
-PyUnicode_AsDecodedUnicode
-PyUnicode_AsEncodedObject
-PyUnicode_AsEncodedString
-PyUnicode_AsEncodedUnicode
-PyUnicode_AsLatin1String
-PyUnicode_AsRawUnicodeEscapeString
-PyUnicode_AsUTF16String
-PyUnicode_AsUTF32String
-PyUnicode_AsUTF8String
-PyUnicode_AsUnicodeEscapeString
-PyUnicode_AsWideChar
-PyUnicode_ClearFreelist
-PyUnicode_Compare
-PyUnicode_Concat
-PyUnicode_Contains
-PyUnicode_Count
-PyUnicode_Decode
-PyUnicode_DecodeASCII
-PyUnicode_DecodeCharmap
-PyUnicode_DecodeFSDefault
-PyUnicode_DecodeFSDefaultAndSize
-PyUnicode_DecodeLatin1
-PyUnicode_DecodeRawUnicodeEscape
-PyUnicode_DecodeUTF16
-PyUnicode_DecodeUTF16Stateful
-PyUnicode_DecodeUTF32
-PyUnicode_DecodeUTF32Stateful
-PyUnicode_DecodeUTF8
-PyUnicode_DecodeUTF8Stateful
-PyUnicode_DecodeUnicodeEscape
-PyUnicode_FSConverter
-PyUnicode_FSDecoder
-PyUnicode_Find
-PyUnicode_Format
-PyUnicode_FromEncodedObject
-PyUnicode_FromFormat
-PyUnicode_FromFormatV
-PyUnicode_FromObject
-PyUnicode_FromOrdinal
-PyUnicode_FromString
-PyUnicode_FromStringAndSize
-PyUnicode_FromWideChar
-PyUnicode_GetDefaultEncoding
-PyUnicode_GetSize
-PyUnicode_IsIdentifier
-PyUnicode_Join
-PyUnicode_Partition
-PyUnicode_RPartition
-PyUnicode_RSplit
-PyUnicode_Replace
-PyUnicode_Resize
-PyUnicode_RichCompare
-PyUnicode_SetDefaultEncoding
-PyUnicode_Split
-PyUnicode_Splitlines
-PyUnicode_Tailmatch
-PyUnicode_Translate
-PyUnicode_BuildEncodingMap
-PyUnicode_CompareWithASCIIString
-PyUnicode_DecodeUTF7
-PyUnicode_DecodeUTF7Stateful
-PyUnicode_EncodeFSDefault
-PyUnicode_InternFromString
-PyUnicode_InternImmortal
-PyUnicode_InternInPlace
-PyUnicode_Type
-PyWeakref_GetObject
-PyWeakref_NewProxy
-PyWeakref_NewRef
-PyWrapperDescr_Type
-PyWrapper_New
-PyZip_Type
-Py_AddPendingCall
-Py_AtExit
-Py_BuildValue
-Py_CompileString
-Py_DecRef
-Py_EndInterpreter
-Py_Exit
-Py_FatalError
-Py_FileSystemDefaultEncoding
-Py_Finalize
-Py_GetBuildInfo
-Py_GetCompiler
-Py_GetCopyright
-Py_GetExecPrefix
-Py_GetPath
-Py_GetPlatform
-Py_GetPrefix
-Py_GetProgramFullPath
-Py_GetProgramName
-Py_GetPythonHome
-Py_GetRecursionLimit
-Py_GetVersion
-Py_HasFileSystemDefaultEncoding
-Py_IncRef
-Py_Initialize
-Py_InitializeEx
-Py_IsInitialized
-Py_Main
-Py_MakePendingCalls
-Py_NewInterpreter
-Py_ReprEnter
-Py_ReprLeave
-Py_SetProgramName
-Py_SetPythonHome
-Py_SetRecursionLimit
-Py_SymtableString
-Py_VaBuildValue
-_PyErr_BadInternalCall
-_PyObject_CallFunction_SizeT
-_PyObject_CallMethod_SizeT
-_PyObject_GC_Malloc
-_PyObject_GC_New
-_PyObject_GC_NewVar
-_PyObject_GC_Resize
-_PyObject_New
-_PyObject_NewVar
-_PyState_AddModule
-_PyThreadState_Init
-_PyThreadState_Prealloc
-_PyTrash_delete_later
-_PyTrash_delete_nesting
-_PyTrash_deposit_object
-_PyTrash_destroy_chain
-_PyWeakref_CallableProxyType
-_PyWeakref_ProxyType
-_PyWeakref_RefType
-_Py_BuildValue_SizeT
-_Py_CheckRecursionLimit
-_Py_CheckRecursiveCall
-_Py_Dealloc
-_Py_EllipsisObject
-_Py_FalseStruct
-_Py_NoneStruct
-_Py_NotImplementedStruct
-_Py_SwappedOp
-_Py_TrueStruct
-_Py_VaBuildValue_SizeT
-_PyArg_Parse_SizeT
-_PyArg_ParseTuple_SizeT
-_PyArg_ParseTupleAndKeywords_SizeT
-_PyArg_VaParse_SizeT
-_PyArg_VaParseTupleAndKeywords_SizeT
-_Py_BuildValue_SizeT
diff --git a/PC/python_exe.rc b/PC/python_exe.rc
index 14e2574377..91785a1e06 100644
--- a/PC/python_exe.rc
+++ b/PC/python_exe.rc
@@ -1 +1,49 @@
-1 ICON DISCARDABLE "pycon.ico"
+// Resource script for Python console EXEs.
+
+#include "python_ver_rc.h"
+
+// Include the manifest file that indicates we support all
+// current versions of Windows.
+#include <winuser.h>
+1 RT_MANIFEST "python.manifest"
+
+1 ICON DISCARDABLE "pycon.ico"
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION PYVERSION64
+ PRODUCTVERSION PYVERSION64
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS VS_FF_DEBUG
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS VOS__WINDOWS32
+ FILETYPE VFT_APP
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "000004b0"
+ BEGIN
+ VALUE "CompanyName", PYTHON_COMPANY "\0"
+ VALUE "FileDescription", "Python\0"
+ VALUE "FileVersion", PYTHON_VERSION
+ VALUE "InternalName", "Python Console\0"
+ VALUE "LegalCopyright", PYTHON_COPYRIGHT "\0"
+ VALUE "OriginalFilename", "python" PYTHON_DEBUG_EXT ".exe\0"
+ VALUE "ProductName", "Python\0"
+ VALUE "ProductVersion", PYTHON_VERSION
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0, 1200
+ END
+END
diff --git a/PC/python_nt.rc b/PC/python_nt.rc
index 0fbdbe02a9..fac6105d8a 100644
--- a/PC/python_nt.rc
+++ b/PC/python_nt.rc
@@ -1,33 +1,11 @@
// Resource script for Python core DLL.
-// Currently only holds version information.
-//
-#include "winver.h"
-
-#define MS_WINDOWS
-#include "modsupport.h"
-#include "patchlevel.h"
-#ifdef _DEBUG
-# include "pythonnt_rc_d.h"
-#else
-# include "pythonnt_rc.h"
-#endif
-/* e.g., 3.3.0a1
- * PY_VERSION comes from patchevel.h
- */
-#define PYTHON_VERSION PY_VERSION "\0"
+#include "python_ver_rc.h"
-/* 64-bit version number as comma-separated list of 4 16-bit ints */
-#if PY_MICRO_VERSION > 64
-# error "PY_MICRO_VERSION > 64"
-#endif
-#if PY_RELEASE_LEVEL > 99
-# error "PY_RELEASE_LEVEL > 99"
-#endif
-#if PY_RELEASE_SERIAL > 9
-# error "PY_RELEASE_SERIAL > 9"
-#endif
-#define PYVERSION64 PY_MAJOR_VERSION, PY_MINOR_VERSION, FIELD3, PYTHON_API_VERSION
+// Include the manifest file that indicates we support all
+// current versions of Windows.
+#include <winuser.h>
+2 RT_MANIFEST "python.manifest"
// String Tables
STRINGTABLE DISCARDABLE
@@ -45,23 +23,23 @@ VS_VERSION_INFO VERSIONINFO
PRODUCTVERSION PYVERSION64
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
- FILEFLAGS 0x1L
+ FILEFLAGS VS_FF_DEBUG
#else
FILEFLAGS 0x0L
#endif
- FILEOS 0x40004L
- FILETYPE 0x1L
+ FILEOS VOS__WINDOWS32
+ FILETYPE VFT_DLL
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "000004b0"
BEGIN
- VALUE "CompanyName", "Python Software Foundation\0"
+ VALUE "CompanyName", PYTHON_COMPANY "\0"
VALUE "FileDescription", "Python Core\0"
VALUE "FileVersion", PYTHON_VERSION
VALUE "InternalName", "Python DLL\0"
- VALUE "LegalCopyright", "Copyright © 2001-2016 Python Software Foundation. Copyright © 2000 BeOpen.com. Copyright © 1995-2001 CNRI. Copyright © 1991-1995 SMC.\0"
+ VALUE "LegalCopyright", PYTHON_COPYRIGHT "\0"
VALUE "OriginalFilename", PYTHON_DLL_NAME "\0"
VALUE "ProductName", "Python\0"
VALUE "ProductVersion", PYTHON_VERSION
diff --git a/PC/python_ver_rc.h b/PC/python_ver_rc.h
new file mode 100644
index 0000000000..f95e755bb8
--- /dev/null
+++ b/PC/python_ver_rc.h
@@ -0,0 +1,34 @@
+// Resource script for Python core DLL.
+// Currently only holds version information.
+//
+#include "winver.h"
+
+#define PYTHON_COMPANY "Python Software Foundation"
+#define PYTHON_COPYRIGHT "Copyright \xA9 2001-2016 Python Software Foundation. Copyright \xA9 2000 BeOpen.com. Copyright \xA9 1995-2001 CNRI. Copyright \xA9 1991-1995 SMC."
+
+#define MS_WINDOWS
+#include "modsupport.h"
+#include "patchlevel.h"
+#include <pythonnt_rc.h>
+#ifdef _DEBUG
+# define PYTHON_DEBUG_EXT "_d"
+#else
+# define PYTHON_DEBUG_EXT
+#endif
+
+/* e.g., 3.3.0a1
+ * PY_VERSION comes from patchlevel.h
+ */
+#define PYTHON_VERSION PY_VERSION "\0"
+
+/* 64-bit version number as comma-separated list of 4 16-bit ints */
+#if PY_MICRO_VERSION > 64
+# error "PY_MICRO_VERSION > 64"
+#endif
+#if PY_RELEASE_LEVEL > 99
+# error "PY_RELEASE_LEVEL > 99"
+#endif
+#if PY_RELEASE_SERIAL > 9
+# error "PY_RELEASE_SERIAL > 9"
+#endif
+#define PYVERSION64 PY_MAJOR_VERSION, PY_MINOR_VERSION, FIELD3, PYTHON_API_VERSION
diff --git a/PC/readme.txt b/PC/readme.txt
index 99006bfe61..0a96d269b0 100644
--- a/PC/readme.txt
+++ b/PC/readme.txt
@@ -72,11 +72,6 @@ dllbase_nt.txt A (manually maintained) list of base addresses for
various DLLs, to avoid run-time relocation.
-Legacy support for older versions of Visual Studio
-==================================================
-The subdirectories VC6, VS7.1 and VS8.0 contain legacy support older
-versions of Microsoft Visual Studio. See PCbuild/readme.txt.
-
Note for Windows 3.x and DOS users
==================================
diff --git a/PC/sqlite3.rc b/PC/sqlite3.rc
new file mode 100644
index 0000000000..84bd87d9d5
--- /dev/null
+++ b/PC/sqlite3.rc
@@ -0,0 +1,49 @@
+// Resource script for Sqlite DLL.
+
+#include <winver.h>
+
+// Include the manifest file that indicates we support all
+// current versions of Windows.
+#include <winuser.h>
+2 RT_MANIFEST "python.manifest"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+#define _S(x) #x
+#define S(x) _S(x)
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION SQLITE_MAJOR_VERSION, SQLITE_MINOR_VERSION, SQLITE_MICRO_VERSION, SQLITE_PATCH_VERSION
+ PRODUCTVERSION SQLITE_MAJOR_VERSION, SQLITE_MINOR_VERSION, SQLITE_MICRO_VERSION, SQLITE_PATCH_VERSION
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS VS_FF_DEBUG
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS VOS__WINDOWS32
+ FILETYPE VFT_DLL
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "000004b0"
+ BEGIN
+ VALUE "CompanyName", "SQLite3\0"
+ VALUE "FileDescription", "SQLite3\0"
+ VALUE "FileVersion", S(SQLITE_VERSION) "\0"
+ VALUE "InternalName", "SQLite3 DLL\0"
+ VALUE "LegalCopyright", "Unspecified\0"
+ VALUE "OriginalFilename", "sqlite3.dll\0"
+ VALUE "ProductName", "SQLite3\0"
+ VALUE "ProductVersion", S(SQLITE_VERSION) "\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0, 1200
+ END
+END
diff --git a/PC/testpy.py b/PC/testpy.py
index 36f92009a4..4ef3d4f793 100644
--- a/PC/testpy.py
+++ b/PC/testpy.py
@@ -18,8 +18,6 @@ except:
a PC, you should add the dos_8x3 directory to your PYTHONPATH.""")
sys.exit(1)
-import os
-
for dir in sys.path:
file = os.path.join(dir, "os.py")
if os.path.isfile(file):
diff --git a/PC/validate_ucrtbase.py b/PC/validate_ucrtbase.py
new file mode 100644
index 0000000000..6145d5914f
--- /dev/null
+++ b/PC/validate_ucrtbase.py
@@ -0,0 +1,88 @@
+'''
+This script gets the version number from ucrtbased.dll and checks
+whether it is a version with a known issue.
+'''
+
+import sys
+
+from ctypes import (c_buffer, POINTER, byref, create_unicode_buffer,
+ Structure, WinDLL)
+from ctypes.wintypes import DWORD, HANDLE
+
+class VS_FIXEDFILEINFO(Structure):
+ _fields_ = [
+ ("dwSignature", DWORD),
+ ("dwStrucVersion", DWORD),
+ ("dwFileVersionMS", DWORD),
+ ("dwFileVersionLS", DWORD),
+ ("dwProductVersionMS", DWORD),
+ ("dwProductVersionLS", DWORD),
+ ("dwFileFlagsMask", DWORD),
+ ("dwFileFlags", DWORD),
+ ("dwFileOS", DWORD),
+ ("dwFileType", DWORD),
+ ("dwFileSubtype", DWORD),
+ ("dwFileDateMS", DWORD),
+ ("dwFileDateLS", DWORD),
+ ]
+
+kernel32 = WinDLL('kernel32')
+version = WinDLL('version')
+
+if len(sys.argv) < 2:
+ print('Usage: validate_ucrtbase.py <ucrtbase|ucrtbased>')
+ sys.exit(2)
+
+try:
+ ucrtbased = WinDLL(sys.argv[1])
+except OSError:
+ print('Cannot find ucrtbased.dll')
+ # This likely means that VS is not installed, but that is an
+ # obvious enough problem if you're trying to produce a debug
+ # build that we don't need to fail here.
+ sys.exit(0)
+
+# We will immediately double the length up to MAX_PATH, but the
+# path may be longer, so we retry until the returned string is
+# shorter than our buffer.
+name_len = actual_len = 130
+while actual_len == name_len:
+ name_len *= 2
+ name = create_unicode_buffer(name_len)
+ actual_len = kernel32.GetModuleFileNameW(HANDLE(ucrtbased._handle),
+ name, len(name))
+ if not actual_len:
+ print('Failed to get full module name.')
+ sys.exit(2)
+
+size = version.GetFileVersionInfoSizeW(name, None)
+if not size:
+ print('Failed to get size of version info.')
+ sys.exit(2)
+
+ver_block = c_buffer(size)
+if (not version.GetFileVersionInfoW(name, None, size, ver_block) or
+ not ver_block):
+ print('Failed to get version info.')
+ sys.exit(2)
+
+pvi = POINTER(VS_FIXEDFILEINFO)()
+if not version.VerQueryValueW(ver_block, "", byref(pvi), byref(DWORD())):
+ print('Failed to get version value from info.')
+ sys.exit(2)
+
+ver = (
+ pvi.contents.dwProductVersionMS >> 16,
+ pvi.contents.dwProductVersionMS & 0xFFFF,
+ pvi.contents.dwProductVersionLS >> 16,
+ pvi.contents.dwProductVersionLS & 0xFFFF,
+)
+
+print('{} is version {}.{}.{}.{}'.format(name.value, *ver))
+
+if ver < (10, 0, 10586):
+ print('WARN: ucrtbased contains known issues. '
+ 'Please update Visual Studio or the Windows SDK.')
+ print('See:')
+ print(' http://bugs.python.org/issue26624')
+ sys.exit(1)
diff --git a/PC/winreg.c b/PC/winreg.c
index 19d5a70391..d1c3f39525 100644
--- a/PC/winreg.c
+++ b/PC/winreg.c
@@ -17,6 +17,7 @@
#include "windows.h"
static BOOL PyHKEY_AsHKEY(PyObject *ob, HKEY *pRes, BOOL bNoneOK);
+static BOOL clinic_HKEY_converter(PyObject *ob, void *p);
static PyObject *PyHKEY_FromHKEY(HKEY h);
static BOOL PyHKEY_Close(PyObject *obHandle);
@@ -46,10 +47,12 @@ PyDoc_STRVAR(module_doc,
"DeleteValue() - Removes a named value from the specified registry key.\n"
"EnumKey() - Enumerates subkeys of the specified open registry key.\n"
"EnumValue() - Enumerates values of the specified open registry key.\n"
-"ExpandEnvironmentStrings() - Expand the env strings in a REG_EXPAND_SZ string.\n"
+"ExpandEnvironmentStrings() - Expand the env strings in a REG_EXPAND_SZ\n"
+" string.\n"
"FlushKey() - Writes all the attributes of the specified key to the registry.\n"
-"LoadKey() - Creates a subkey under HKEY_USER or HKEY_LOCAL_MACHINE and stores\n"
-" registration information from a specified file into that subkey.\n"
+"LoadKey() - Creates a subkey under HKEY_USER or HKEY_LOCAL_MACHINE and\n"
+" stores registration information from a specified file into that\n"
+" subkey.\n"
"OpenKey() - Opens the specified key.\n"
"OpenKeyEx() - Alias of OpenKey().\n"
"QueryValue() - Retrieves the value associated with the unnamed value for a\n"
@@ -71,299 +74,6 @@ PyDoc_STRVAR(module_doc,
"to see what constants are used, and where.");
-PyDoc_STRVAR(CloseKey_doc,
-"CloseKey(hkey)\n"
-"Closes a previously opened registry key.\n"
-"\n"
-"The hkey argument specifies a previously opened key.\n"
-"\n"
-"Note that if the key is not closed using this method, it will be\n"
-"closed when the hkey object is destroyed by Python.");
-
-PyDoc_STRVAR(ConnectRegistry_doc,
-"ConnectRegistry(computer_name, key) -> key\n"
-"Establishes a connection to a predefined registry handle on another computer.\n"
-"\n"
-"computer_name is the name of the remote computer, of the form \\\\computername.\n"
-" If None, the local computer is used.\n"
-"key is the predefined handle to connect to.\n"
-"\n"
-"The return value is the handle of the opened key.\n"
-"If the function fails, an OSError exception is raised.");
-
-PyDoc_STRVAR(CreateKey_doc,
-"CreateKey(key, sub_key) -> key\n"
-"Creates or opens the specified key.\n"
-"\n"
-"key is an already open key, or one of the predefined HKEY_* constants.\n"
-"sub_key is a string that names the key this method opens or creates.\n"
-"\n"
-"If key is one of the predefined keys, sub_key may be None. In that case,\n"
-"the handle returned is the same key handle passed in to the function.\n"
-"\n"
-"If the key already exists, this function opens the existing key.\n"
-"\n"
-"The return value is the handle of the opened key.\n"
-"If the function fails, an OSError exception is raised.");
-
-PyDoc_STRVAR(CreateKeyEx_doc,
-"CreateKeyEx(key, sub_key, reserved=0, access=KEY_WRITE) -> key\n"
-"Creates or opens the specified key.\n"
-"\n"
-"key is an already open key, or one of the predefined HKEY_* constants\n"
-"sub_key is a string that names the key this method opens or creates.\n"
-"reserved is a reserved integer, and must be zero. Default is zero.\n"
-"access is an integer that specifies an access mask that describes the \n"
-" desired security access for the key. Default is KEY_WRITE.\n"
-"\n"
-"If key is one of the predefined keys, sub_key may be None. In that case,\n"
-"the handle returned is the same key handle passed in to the function.\n"
-"\n"
-"If the key already exists, this function opens the existing key\n"
-"\n"
-"The return value is the handle of the opened key.\n"
-"If the function fails, an OSError exception is raised.");
-
-PyDoc_STRVAR(DeleteKey_doc,
-"DeleteKey(key, sub_key)\n"
-"Deletes the specified key.\n"
-"\n"
-"key is an already open key, or any one of the predefined HKEY_* constants.\n"
-"sub_key is a string that must be a subkey of the key identified by the key\n"
-" parameter. This value must not be None, and the key may not have\n"
-" subkeys.\n"
-"\n"
-"This method can not delete keys with subkeys.\n"
-"\n"
-"If the function succeeds, the entire key, including all of its values,\n"
-"is removed. If the function fails, an OSError exception is raised.");
-
-PyDoc_STRVAR(DeleteKeyEx_doc,
-"DeleteKeyEx(key, sub_key, access=KEY_WOW64_64KEY, reserved=0)\n"
-"Deletes the specified key (64-bit OS only).\n"
-"\n"
-"key is an already open key, or any one of the predefined HKEY_* constants.\n"
-"sub_key is a string that must be a subkey of the key identified by the key\n"
-" parameter. This value must not be None, and the key may not have\n"
-" subkeys.\n"
-"reserved is a reserved integer, and must be zero. Default is zero.\n"
-"access is an integer that specifies an access mask that describes the \n"
-" desired security access for the key. Default is KEY_WOW64_64KEY.\n"
-"\n"
-"This method can not delete keys with subkeys.\n"
-"\n"
-"If the function succeeds, the entire key, including all of its values,\n"
-"is removed. If the function fails, an OSError exception is raised.\n"
-"On unsupported Windows versions, NotImplementedError is raised.");
-
-PyDoc_STRVAR(DeleteValue_doc,
-"DeleteValue(key, value)\n"
-"Removes a named value from a registry key.\n"
-"\n"
-"key is an already open key, or any one of the predefined HKEY_* constants.\n"
-"value is a string that identifies the value to remove.");
-
-PyDoc_STRVAR(EnumKey_doc,
-"EnumKey(key, index) -> string\n"
-"Enumerates subkeys of an open registry key.\n"
-"\n"
-"key is an already open key, or any one of the predefined HKEY_* constants.\n"
-"index is an integer that identifies the index of the key to retrieve.\n"
-"\n"
-"The function retrieves the name of one subkey each time it is called.\n"
-"It is typically called repeatedly until an OSError exception is\n"
-"raised, indicating no more values are available.");
-
-PyDoc_STRVAR(EnumValue_doc,
-"EnumValue(key, index) -> tuple\n"
-"Enumerates values of an open registry key.\n"
-"key is an already open key, or any one of the predefined HKEY_* constants.\n"
-"index is an integer that identifies the index of the value to retrieve.\n"
-"\n"
-"The function retrieves the name of one subkey each time it is called.\n"
-"It is typically called repeatedly, until an OSError exception\n"
-"is raised, indicating no more values.\n"
-"\n"
-"The result is a tuple of 3 items:\n"
-"value_name is a string that identifies the value.\n"
-"value_data is an object that holds the value data, and whose type depends\n"
-" on the underlying registry type.\n"
-"data_type is an integer that identifies the type of the value data.");
-
-PyDoc_STRVAR(ExpandEnvironmentStrings_doc,
-"ExpandEnvironmentStrings(string) -> string\n"
-"Expand environment vars.\n");
-
-PyDoc_STRVAR(FlushKey_doc,
-"FlushKey(key)\n"
-"Writes all the attributes of a key to the registry.\n"
-"\n"
-"key is an already open key, or any one of the predefined HKEY_* constants.\n"
-"\n"
-"It is not necessary to call FlushKey to change a key. Registry changes are\n"
-"flushed to disk by the registry using its lazy flusher. Registry changes are\n"
-"also flushed to disk at system shutdown. Unlike CloseKey(), the FlushKey()\n"
-"method returns only when all the data has been written to the registry.\n"
-"\n"
-"An application should only call FlushKey() if it requires absolute certainty\n"
-"that registry changes are on disk. If you don't know whether a FlushKey()\n"
-"call is required, it probably isn't.");
-
-PyDoc_STRVAR(LoadKey_doc,
-"LoadKey(key, sub_key, file_name)\n"
-"Creates a subkey under the specified key and stores registration information\n"
-"from a specified file into that subkey.\n"
-"\n"
-"key is an already open key, or any one of the predefined HKEY_* constants.\n"
-"sub_key is a string that identifies the sub_key to load.\n"
-"file_name is the name of the file to load registry data from. This file must\n"
-" have been created with the SaveKey() function. Under the file\n"
-" allocation table (FAT) file system, the filename may not have an\n"
-" extension.\n"
-"\n"
-"A call to LoadKey() fails if the calling process does not have the\n"
-"SE_RESTORE_PRIVILEGE privilege.\n"
-"\n"
-"If key is a handle returned by ConnectRegistry(), then the path specified\n"
-"in fileName is relative to the remote computer.\n"
-"\n"
-"The docs imply key must be in the HKEY_USER or HKEY_LOCAL_MACHINE tree");
-
-PyDoc_STRVAR(OpenKey_doc,
-"OpenKey(key, sub_key, reserved=0, access=KEY_READ) -> key\n"
-"Opens the specified key.\n"
-"\n"
-"key is an already open key, or any one of the predefined HKEY_* constants.\n"
-"sub_key is a string that identifies the sub_key to open.\n"
-"reserved is a reserved integer, and must be zero. Default is zero.\n"
-"access is an integer that specifies an access mask that describes the desired\n"
-" security access for the key. Default is KEY_READ\n"
-"\n"
-"The result is a new handle to the specified key\n"
-"If the function fails, an OSError exception is raised.");
-
-PyDoc_STRVAR(OpenKeyEx_doc, "See OpenKey()");
-
-PyDoc_STRVAR(QueryInfoKey_doc,
-"QueryInfoKey(key) -> tuple\n"
-"Returns information about a key.\n"
-"\n"
-"key is an already open key, or any one of the predefined HKEY_* constants.\n"
-"\n"
-"The result is a tuple of 3 items:"
-"An integer that identifies the number of sub keys this key has.\n"
-"An integer that identifies the number of values this key has.\n"
-"An integer that identifies when the key was last modified (if available)\n"
-" as 100's of nanoseconds since Jan 1, 1600.");
-
-PyDoc_STRVAR(QueryValue_doc,
-"QueryValue(key, sub_key) -> string\n"
-"Retrieves the unnamed value for a key.\n"
-"\n"
-"key is an already open key, or any one of the predefined HKEY_* constants.\n"
-"sub_key is a string that holds the name of the subkey with which the value\n"
-" is associated. If this parameter is None or empty, the function\n"
-" retrieves the value set by the SetValue() method for the key\n"
-" identified by key."
-"\n"
-"Values in the registry have name, type, and data components. This method\n"
-"retrieves the data for a key's first value that has a NULL name.\n"
-"But the underlying API call doesn't return the type, Lame Lame Lame, DONT USE THIS!!!");
-
-PyDoc_STRVAR(QueryValueEx_doc,
-"QueryValueEx(key, value_name) -> (value, type_id)\n"
-"Retrieves the type and data for a specified value name associated with an\n"
-"open registry key.\n"
-"\n"
-"key is an already open key, or any one of the predefined HKEY_* constants.\n"
-"value_name is a string indicating the value to query");
-
-PyDoc_STRVAR(SaveKey_doc,
-"SaveKey(key, file_name)\n"
-"Saves the specified key, and all its subkeys to the specified file.\n"
-"\n"
-"key is an already open key, or any one of the predefined HKEY_* constants.\n"
-"file_name is the name of the file to save registry data to. This file cannot\n"
-" already exist. If this filename includes an extension, it cannot be\n"
-" used on file allocation table (FAT) file systems by the LoadKey(),\n"
-" ReplaceKey() or RestoreKey() methods.\n"
-"\n"
-"If key represents a key on a remote computer, the path described by file_name\n"
-"is relative to the remote computer.\n"
-"\n"
-"The caller of this method must possess the SeBackupPrivilege security\n"
-"privilege. This function passes NULL for security_attributes to the API.");
-
-PyDoc_STRVAR(SetValue_doc,
-"SetValue(key, sub_key, type, value)\n"
-"Associates a value with a specified key.\n"
-"\n"
-"key is an already open key, or any one of the predefined HKEY_* constants.\n"
-"sub_key is a string that names the subkey with which the value is associated.\n"
-"type is an integer that specifies the type of the data. Currently this must\n"
-" be REG_SZ, meaning only strings are supported.\n"
-"value is a string that specifies the new value.\n"
-"\n"
-"If the key specified by the sub_key parameter does not exist, the SetValue\n"
-"function creates it.\n"
-"\n"
-"Value lengths are limited by available memory. Long values (more than\n"
-"2048 bytes) should be stored as files with the filenames stored in \n"
-"the configuration registry. This helps the registry perform efficiently.\n"
-"\n"
-"The key identified by the key parameter must have been opened with\n"
-"KEY_SET_VALUE access.");
-
-PyDoc_STRVAR(SetValueEx_doc,
-"SetValueEx(key, value_name, reserved, type, value)\n"
-"Stores data in the value field of an open registry key.\n"
-"\n"
-"key is an already open key, or any one of the predefined HKEY_* constants.\n"
-"value_name is a string containing the name of the value to set, or None.\n"
-"reserved can be anything - zero is always passed to the API.\n"
-"type is an integer that specifies the type of the data. This should be one of:\n"
-" REG_BINARY -- Binary data in any form.\n"
-" REG_DWORD -- A 32-bit number.\n"
-" REG_DWORD_LITTLE_ENDIAN -- A 32-bit number in little-endian format.\n"
-" REG_DWORD_BIG_ENDIAN -- A 32-bit number in big-endian format.\n"
-" REG_EXPAND_SZ -- A null-terminated string that contains unexpanded references\n"
-" to environment variables (for example, %PATH%).\n"
-" REG_LINK -- A Unicode symbolic link.\n"
-" REG_MULTI_SZ -- An sequence of null-terminated strings, terminated by\n"
-" two null characters. Note that Python handles this\n"
-" termination automatically.\n"
-" REG_NONE -- No defined value type.\n"
-" REG_RESOURCE_LIST -- A device-driver resource list.\n"
-" REG_SZ -- A null-terminated string.\n"
-"value is a string that specifies the new value.\n"
-"\n"
-"This method can also set additional value and type information for the\n"
-"specified key. The key identified by the key parameter must have been\n"
-"opened with KEY_SET_VALUE access.\n"
-"\n"
-"To open the key, use the CreateKeyEx() or OpenKeyEx() methods.\n"
-"\n"
-"Value lengths are limited by available memory. Long values (more than\n"
-"2048 bytes) should be stored as files with the filenames stored in \n"
-"the configuration registry. This helps the registry perform efficiently.");
-
-PyDoc_STRVAR(DisableReflectionKey_doc,
-"Disables registry reflection for 32-bit processes running on a 64-bit\n"
-"Operating System. Will generally raise NotImplemented if executed on\n"
-"a 32-bit Operating System.\n"
-"\n"
-"If the key is not on the reflection list, the function succeeds but has no effect.\n"
-"Disabling reflection for a key does not affect reflection of any subkeys.");
-
-PyDoc_STRVAR(EnableReflectionKey_doc,
-"Restores registry reflection for the specified disabled key.\n"
-"Will generally raise NotImplemented if executed on a 32-bit Operating System.\n"
-"Restoring reflection for a key does not affect reflection of any subkeys.");
-
-PyDoc_STRVAR(QueryReflectionKey_doc,
-"QueryReflectionKey(hkey) -> bool\n"
-"Determines the reflection state for the specified key.\n"
-"Will generally raise NotImplemented if executed on a 32-bit Operating System.\n");
/* PyHKEY docstrings */
PyDoc_STRVAR(PyHKEY_doc,
@@ -389,24 +99,6 @@ PyDoc_STRVAR(PyHKEY_doc,
"rich comparison - Handle objects are compared using the handle value.");
-PyDoc_STRVAR(PyHKEY_Close_doc,
-"key.Close()\n"
-"Closes the underlying Windows handle.\n"
-"\n"
-"If the handle is already closed, no error is raised.");
-
-PyDoc_STRVAR(PyHKEY_Detach_doc,
-"key.Detach() -> int\n"
-"Detaches the Windows handle from the handle object.\n"
-"\n"
-"The result is the value of the handle before it is detached. If the\n"
-"handle is already detached, this will return zero.\n"
-"\n"
-"After calling this function, the handle is effectively invalidated,\n"
-"but the handle is not closed. You would call this function when you\n"
-"need the underlying win32 handle to exist beyond the lifetime of the\n"
-"handle object.");
-
/************************************************************************
@@ -516,16 +208,135 @@ static PyNumberMethods PyHKEY_NumberMethods =
PyHKEY_unaryFailureFunc, /* nb_float */
};
-static PyObject *PyHKEY_CloseMethod(PyObject *self, PyObject *args);
-static PyObject *PyHKEY_DetachMethod(PyObject *self, PyObject *args);
-static PyObject *PyHKEY_Enter(PyObject *self);
-static PyObject *PyHKEY_Exit(PyObject *self, PyObject *args);
+/*[clinic input]
+module winreg
+class winreg.HKEYType "PyHKEYObject *" "&PyHKEY_Type"
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=4c964eba3bf914d6]*/
+
+/*[python input]
+class REGSAM_converter(CConverter):
+ type = 'REGSAM'
+ format_unit = 'i'
+
+class DWORD_converter(CConverter):
+ type = 'DWORD'
+ format_unit = 'k'
+
+class HKEY_converter(CConverter):
+ type = 'HKEY'
+ converter = 'clinic_HKEY_converter'
+
+class HKEY_return_converter(CReturnConverter):
+ type = 'HKEY'
+
+ def render(self, function, data):
+ self.declare(data)
+ self.err_occurred_if_null_pointer("_return_value", data)
+ data.return_conversion.append(
+ 'return_value = PyHKEY_FromHKEY(_return_value);\n')
+
+# HACK: this only works for PyHKEYObjects, nothing else.
+# Should this be generalized and enshrined in clinic.py,
+# destroy this converter with prejudice.
+class self_return_converter(CReturnConverter):
+ type = 'PyHKEYObject *'
+
+ def render(self, function, data):
+ self.declare(data)
+ data.return_conversion.append(
+ 'return_value = (PyObject *)_return_value;\n')
+[python start generated code]*/
+/*[python end generated code: output=da39a3ee5e6b4b0d input=22f7aedc6d68e80e]*/
+
+#include "clinic/winreg.c.h"
+
+/************************************************************************
+
+ The PyHKEY object methods
+
+************************************************************************/
+/*[clinic input]
+winreg.HKEYType.Close
+
+Closes the underlying Windows handle.
+
+If the handle is already closed, no error is raised.
+[clinic start generated code]*/
+
+static PyObject *
+winreg_HKEYType_Close_impl(PyHKEYObject *self)
+/*[clinic end generated code: output=fced3a624fb0c344 input=6786ac75f6b89de6]*/
+{
+ if (!PyHKEY_Close((PyObject *)self))
+ return NULL;
+ Py_RETURN_NONE;
+}
+
+/*[clinic input]
+winreg.HKEYType.Detach
+
+Detaches the Windows handle from the handle object.
+
+The result is the value of the handle before it is detached. If the
+handle is already detached, this will return zero.
+
+After calling this function, the handle is effectively invalidated,
+but the handle is not closed. You would call this function when you
+need the underlying win32 handle to exist beyond the lifetime of the
+handle object.
+[clinic start generated code]*/
+
+static PyObject *
+winreg_HKEYType_Detach_impl(PyHKEYObject *self)
+/*[clinic end generated code: output=dda5a9e1a01ae78f input=dd2cc09e6c6ba833]*/
+{
+ void* ret;
+ ret = (void*)self->hkey;
+ self->hkey = 0;
+ return PyLong_FromVoidPtr(ret);
+}
+
+/*[clinic input]
+winreg.HKEYType.__enter__ -> self
+[clinic start generated code]*/
+
+static PyHKEYObject *
+winreg_HKEYType___enter___impl(PyHKEYObject *self)
+/*[clinic end generated code: output=52c34986dab28990 input=c40fab1f0690a8e2]*/
+{
+ Py_XINCREF(self);
+ return self;
+}
+
+
+/*[clinic input]
+winreg.HKEYType.__exit__
+
+ exc_type: object
+ exc_value: object
+ traceback: object
+[clinic start generated code]*/
+
+static PyObject *
+winreg_HKEYType___exit___impl(PyHKEYObject *self, PyObject *exc_type,
+ PyObject *exc_value, PyObject *traceback)
+/*[clinic end generated code: output=923ebe7389e6a263 input=fb32489ee92403c7]*/
+{
+ if (!PyHKEY_Close((PyObject *)self))
+ return NULL;
+ Py_RETURN_NONE;
+}
+
+/*[clinic input]
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=da39a3ee5e6b4b0d]*/
static struct PyMethodDef PyHKEY_methods[] = {
- {"Close", PyHKEY_CloseMethod, METH_VARARGS, PyHKEY_Close_doc},
- {"Detach", PyHKEY_DetachMethod, METH_VARARGS, PyHKEY_Detach_doc},
- {"__enter__", (PyCFunction)PyHKEY_Enter, METH_NOARGS, NULL},
- {"__exit__", PyHKEY_Exit, METH_VARARGS, NULL},
+ WINREG_HKEYTYPE_CLOSE_METHODDEF
+ WINREG_HKEYTYPE_DETACH_METHODDEF
+ WINREG_HKEYTYPE___ENTER___METHODDEF
+ WINREG_HKEYTYPE___EXIT___METHODDEF
{NULL}
};
@@ -570,50 +381,6 @@ PyTypeObject PyHKEY_Type =
};
/************************************************************************
-
- The PyHKEY object methods
-
-************************************************************************/
-static PyObject *
-PyHKEY_CloseMethod(PyObject *self, PyObject *args)
-{
- if (!PyArg_ParseTuple(args, ":Close"))
- return NULL;
- if (!PyHKEY_Close(self))
- return NULL;
- Py_INCREF(Py_None);
- return Py_None;
-}
-
-static PyObject *
-PyHKEY_DetachMethod(PyObject *self, PyObject *args)
-{
- void* ret;
- PyHKEYObject *pThis = (PyHKEYObject *)self;
- if (!PyArg_ParseTuple(args, ":Detach"))
- return NULL;
- ret = (void*)pThis->hkey;
- pThis->hkey = 0;
- return PyLong_FromVoidPtr(ret);
-}
-
-static PyObject *
-PyHKEY_Enter(PyObject *self)
-{
- Py_XINCREF(self);
- return self;
-}
-
-static PyObject *
-PyHKEY_Exit(PyObject *self, PyObject *args)
-{
- if (!PyHKEY_Close(self))
- return NULL;
- Py_RETURN_NONE;
-}
-
-
-/************************************************************************
The public PyHKEY API (well, not public yet :-)
************************************************************************/
PyObject *
@@ -675,6 +442,14 @@ PyHKEY_AsHKEY(PyObject *ob, HKEY *pHANDLE, BOOL bNoneOK)
return TRUE;
}
+BOOL
+clinic_HKEY_converter(PyObject *ob, void *p)
+{
+ if (!PyHKEY_AsHKEY(ob, (HKEY *)p, FALSE))
+ return FALSE;
+ return TRUE;
+}
+
PyObject *
PyHKEY_FromHKEY(HKEY h)
{
@@ -985,120 +760,199 @@ Reg2Py(BYTE *retDataBuf, DWORD retDataSize, DWORD typ)
/* The Python methods */
+/*[clinic input]
+winreg.CloseKey
+
+ hkey: object
+ A previously opened key.
+ /
+
+Closes a previously opened registry key.
+
+Note that if the key is not closed using this method, it will be
+closed when the hkey object is destroyed by Python.
+[clinic start generated code]*/
+
static PyObject *
-PyCloseKey(PyObject *self, PyObject *args)
+winreg_CloseKey(PyModuleDef *module, PyObject *hkey)
+/*[clinic end generated code: output=d96f73439403a064 input=5b1aac65ba5127ad]*/
{
- PyObject *obKey;
- if (!PyArg_ParseTuple(args, "O:CloseKey", &obKey))
- return NULL;
- if (!PyHKEY_Close(obKey))
+ if (!PyHKEY_Close(hkey))
return NULL;
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
-static PyObject *
-PyConnectRegistry(PyObject *self, PyObject *args)
+/*[clinic input]
+winreg.ConnectRegistry -> HKEY
+
+ computer_name: Py_UNICODE(accept={str, NoneType})
+ The name of the remote computer, of the form r"\\computername". If
+ None, the local computer is used.
+ key: HKEY
+ The predefined key to connect to.
+ /
+
+Establishes a connection to the registry on another computer.
+
+The return value is the handle of the opened key.
+If the function fails, an OSError exception is raised.
+[clinic start generated code]*/
+
+static HKEY
+winreg_ConnectRegistry_impl(PyModuleDef *module, Py_UNICODE *computer_name,
+ HKEY key)
+/*[clinic end generated code: output=5c52f6f7ba6e7b46 input=5f98a891a347e68e]*/
{
- HKEY hKey;
- PyObject *obKey;
- wchar_t *szCompName = NULL;
HKEY retKey;
long rc;
- if (!PyArg_ParseTuple(args, "ZO:ConnectRegistry", &szCompName, &obKey))
- return NULL;
- if (!PyHKEY_AsHKEY(obKey, &hKey, FALSE))
- return NULL;
Py_BEGIN_ALLOW_THREADS
- rc = RegConnectRegistryW(szCompName, hKey, &retKey);
+ rc = RegConnectRegistryW(computer_name, key, &retKey);
Py_END_ALLOW_THREADS
- if (rc != ERROR_SUCCESS)
- return PyErr_SetFromWindowsErrWithFunction(rc,
- "ConnectRegistry");
- return PyHKEY_FromHKEY(retKey);
+ if (rc != ERROR_SUCCESS) {
+ PyErr_SetFromWindowsErrWithFunction(rc, "ConnectRegistry");
+ return NULL;
+ }
+ return retKey;
}
-static PyObject *
-PyCreateKey(PyObject *self, PyObject *args)
+/*[clinic input]
+winreg.CreateKey -> HKEY
+
+ key: HKEY
+ An already open key, or one of the predefined HKEY_* constants.
+ sub_key: Py_UNICODE(accept={str, NoneType})
+ The name of the key this method opens or creates.
+ /
+
+Creates or opens the specified key.
+
+If key is one of the predefined keys, sub_key may be None. In that case,
+the handle returned is the same key handle passed in to the function.
+
+If the key already exists, this function opens the existing key.
+
+The return value is the handle of the opened key.
+If the function fails, an OSError exception is raised.
+[clinic start generated code]*/
+
+static HKEY
+winreg_CreateKey_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key)
+/*[clinic end generated code: output=cd6843f30a73fc0e input=3cdd1622488acea2]*/
{
- HKEY hKey;
- PyObject *obKey;
- wchar_t *subKey;
HKEY retKey;
long rc;
- if (!PyArg_ParseTuple(args, "OZ:CreateKey", &obKey, &subKey))
- return NULL;
- if (!PyHKEY_AsHKEY(obKey, &hKey, FALSE))
+
+ rc = RegCreateKeyW(key, sub_key, &retKey);
+ if (rc != ERROR_SUCCESS) {
+ PyErr_SetFromWindowsErrWithFunction(rc, "CreateKey");
return NULL;
- rc = RegCreateKeyW(hKey, subKey, &retKey);
- if (rc != ERROR_SUCCESS)
- return PyErr_SetFromWindowsErrWithFunction(rc, "CreateKey");
- return PyHKEY_FromHKEY(retKey);
+ }
+ return retKey;
}
-static PyObject *
-PyCreateKeyEx(PyObject *self, PyObject *args, PyObject *kwargs)
+/*[clinic input]
+winreg.CreateKeyEx -> HKEY
+
+ key: HKEY
+ An already open key, or one of the predefined HKEY_* constants.
+ sub_key: Py_UNICODE(accept={str, NoneType})
+ The name of the key this method opens or creates.
+ reserved: int = 0
+ A reserved integer, and must be zero. Default is zero.
+ access: REGSAM(c_default='KEY_WRITE') = winreg.KEY_WRITE
+ An integer that specifies an access mask that describes the
+ desired security access for the key. Default is KEY_WRITE.
+
+Creates or opens the specified key.
+
+If key is one of the predefined keys, sub_key may be None. In that case,
+the handle returned is the same key handle passed in to the function.
+
+If the key already exists, this function opens the existing key
+
+The return value is the handle of the opened key.
+If the function fails, an OSError exception is raised.
+[clinic start generated code]*/
+
+static HKEY
+winreg_CreateKeyEx_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key,
+ int reserved, REGSAM access)
+/*[clinic end generated code: output=db835d5be84e72b2 input=42c2b03f98406b66]*/
{
- HKEY hKey;
- PyObject *key;
- wchar_t *sub_key;
HKEY retKey;
- int reserved = 0;
- REGSAM access = KEY_WRITE;
long rc;
- char *kwlist[] = {"key", "sub_key", "reserved", "access", NULL};
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OZ|ii:CreateKeyEx", kwlist,
- &key, &sub_key, &reserved, &access))
- return NULL;
- if (!PyHKEY_AsHKEY(key, &hKey, FALSE))
- return NULL;
-
- rc = RegCreateKeyExW(hKey, sub_key, reserved, NULL, (DWORD)NULL,
+ rc = RegCreateKeyExW(key, sub_key, reserved, NULL, (DWORD)NULL,
access, NULL, &retKey, NULL);
- if (rc != ERROR_SUCCESS)
- return PyErr_SetFromWindowsErrWithFunction(rc, "CreateKeyEx");
- return PyHKEY_FromHKEY(retKey);
+ if (rc != ERROR_SUCCESS) {
+ PyErr_SetFromWindowsErrWithFunction(rc, "CreateKeyEx");
+ return NULL;
+ }
+ return retKey;
}
+/*[clinic input]
+winreg.DeleteKey
+ key: HKEY
+ An already open key, or any one of the predefined HKEY_* constants.
+ sub_key: Py_UNICODE
+ A string that must be the name of a subkey of the key identified by
+ the key parameter. This value must not be None, and the key may not
+ have subkeys.
+ /
+
+Deletes the specified key.
+
+This method can not delete keys with subkeys.
+
+If the function succeeds, the entire key, including all of its values,
+is removed. If the function fails, an OSError exception is raised.
+[clinic start generated code]*/
+
static PyObject *
-PyDeleteKey(PyObject *self, PyObject *args)
+winreg_DeleteKey_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key)
+/*[clinic end generated code: output=875c8917dacbc99d input=b31d225b935e4211]*/
{
- HKEY hKey;
- PyObject *obKey;
- wchar_t *subKey;
long rc;
- if (!PyArg_ParseTuple(args, "Ou:DeleteKey", &obKey, &subKey))
- return NULL;
- if (!PyHKEY_AsHKEY(obKey, &hKey, FALSE))
- return NULL;
- rc = RegDeleteKeyW(hKey, subKey );
+ rc = RegDeleteKeyW(key, sub_key );
if (rc != ERROR_SUCCESS)
return PyErr_SetFromWindowsErrWithFunction(rc, "RegDeleteKey");
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
+/*[clinic input]
+winreg.DeleteKeyEx
+
+ key: HKEY
+ An already open key, or any one of the predefined HKEY_* constants.
+ sub_key: Py_UNICODE
+ A string that must be the name of a subkey of the key identified by
+ the key parameter. This value must not be None, and the key may not
+ have subkeys.
+ access: REGSAM(c_default='KEY_WOW64_64KEY') = winreg.KEY_WOW64_64KEY
+ An integer that specifies an access mask that describes the
+ desired security access for the key. Default is KEY_WOW64_64KEY.
+ reserved: int = 0
+ A reserved integer, and must be zero. Default is zero.
+
+Deletes the specified key (64-bit OS only).
+
+This method can not delete keys with subkeys.
+
+If the function succeeds, the entire key, including all of its values,
+is removed. If the function fails, an OSError exception is raised.
+On unsupported Windows versions, NotImplementedError is raised.
+[clinic start generated code]*/
+
static PyObject *
-PyDeleteKeyEx(PyObject *self, PyObject *args, PyObject *kwargs)
+winreg_DeleteKeyEx_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key,
+ REGSAM access, int reserved)
+/*[clinic end generated code: output=0362a0ac6502379f input=711d9d89e7ecbed7]*/
{
- HKEY hKey;
- PyObject *key;
HMODULE hMod;
typedef LONG (WINAPI *RDKEFunc)(HKEY, const wchar_t*, REGSAM, int);
RDKEFunc pfn = NULL;
- wchar_t *sub_key;
long rc;
- int reserved = 0;
- REGSAM access = KEY_WOW64_64KEY;
-
- char *kwlist[] = {"key", "sub_key", "access", "reserved", NULL};
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "Ou|ii:DeleteKeyEx", kwlist,
- &key, &sub_key, &access, &reserved))
- return NULL;
- if (!PyHKEY_AsHKEY(key, &hKey, FALSE))
- return NULL;
/* Only available on 64bit platforms, so we must load it
dynamically. */
@@ -1112,42 +966,60 @@ PyDeleteKeyEx(PyObject *self, PyObject *args, PyObject *kwargs)
return NULL;
}
Py_BEGIN_ALLOW_THREADS
- rc = (*pfn)(hKey, sub_key, access, reserved);
+ rc = (*pfn)(key, sub_key, access, reserved);
Py_END_ALLOW_THREADS
if (rc != ERROR_SUCCESS)
return PyErr_SetFromWindowsErrWithFunction(rc, "RegDeleteKeyEx");
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
+/*[clinic input]
+winreg.DeleteValue
+
+ key: HKEY
+ An already open key, or any one of the predefined HKEY_* constants.
+ value: Py_UNICODE(accept={str, NoneType})
+ A string that identifies the value to remove.
+ /
+
+Removes a named value from a registry key.
+[clinic start generated code]*/
+
static PyObject *
-PyDeleteValue(PyObject *self, PyObject *args)
+winreg_DeleteValue_impl(PyModuleDef *module, HKEY key, Py_UNICODE *value)
+/*[clinic end generated code: output=308550b8cdcfd8e1 input=a78d3407a4197b21]*/
{
- HKEY hKey;
- PyObject *obKey;
- wchar_t *subKey;
long rc;
- if (!PyArg_ParseTuple(args, "OZ:DeleteValue", &obKey, &subKey))
- return NULL;
- if (!PyHKEY_AsHKEY(obKey, &hKey, FALSE))
- return NULL;
Py_BEGIN_ALLOW_THREADS
- rc = RegDeleteValueW(hKey, subKey);
+ rc = RegDeleteValueW(key, value);
Py_END_ALLOW_THREADS
if (rc !=ERROR_SUCCESS)
return PyErr_SetFromWindowsErrWithFunction(rc,
"RegDeleteValue");
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
+/*[clinic input]
+winreg.EnumKey
+
+ key: HKEY
+ An already open key, or any one of the predefined HKEY_* constants.
+ index: int
+ An integer that identifies the index of the key to retrieve.
+ /
+
+Enumerates subkeys of an open registry key.
+
+The function retrieves the name of one subkey each time it is called.
+It is typically called repeatedly until an OSError exception is
+raised, indicating no more values are available.
+[clinic start generated code]*/
+
static PyObject *
-PyEnumKey(PyObject *self, PyObject *args)
+winreg_EnumKey_impl(PyModuleDef *module, HKEY key, int index)
+/*[clinic end generated code: output=58074ffabbc67896 input=fad9a7c00ab0e04b]*/
{
- HKEY hKey;
- PyObject *obKey;
- int index;
long rc;
PyObject *retStr;
@@ -1160,13 +1032,8 @@ PyEnumKey(PyObject *self, PyObject *args)
wchar_t tmpbuf[257];
DWORD len = sizeof(tmpbuf)/sizeof(wchar_t); /* includes NULL terminator */
- if (!PyArg_ParseTuple(args, "Oi:EnumKey", &obKey, &index))
- return NULL;
- if (!PyHKEY_AsHKEY(obKey, &hKey, FALSE))
- return NULL;
-
Py_BEGIN_ALLOW_THREADS
- rc = RegEnumKeyExW(hKey, index, tmpbuf, &len, NULL, NULL, NULL, NULL);
+ rc = RegEnumKeyExW(key, index, tmpbuf, &len, NULL, NULL, NULL, NULL);
Py_END_ALLOW_THREADS
if (rc != ERROR_SUCCESS)
return PyErr_SetFromWindowsErrWithFunction(rc, "RegEnumKeyEx");
@@ -1175,12 +1042,35 @@ PyEnumKey(PyObject *self, PyObject *args)
return retStr; /* can be NULL */
}
+/*[clinic input]
+winreg.EnumValue
+
+ key: HKEY
+ An already open key, or any one of the predefined HKEY_* constants.
+ index: int
+ An integer that identifies the index of the value to retrieve.
+ /
+
+Enumerates values of an open registry key.
+
+The function retrieves the name of one subkey each time it is called.
+It is typically called repeatedly, until an OSError exception
+is raised, indicating no more values.
+
+The result is a tuple of 3 items:
+ value_name
+ A string that identifies the value.
+ value_data
+ An object that holds the value data, and whose type depends
+ on the underlying registry type.
+ data_type
+ An integer that identifies the type of the value data.
+[clinic start generated code]*/
+
static PyObject *
-PyEnumValue(PyObject *self, PyObject *args)
+winreg_EnumValue_impl(PyModuleDef *module, HKEY key, int index)
+/*[clinic end generated code: output=4570367ebaf0e979 input=4414f47a6fb238b5]*/
{
- HKEY hKey;
- PyObject *obKey;
- int index;
long rc;
wchar_t *retValueBuf;
BYTE *tmpBuf;
@@ -1191,12 +1081,7 @@ PyEnumValue(PyObject *self, PyObject *args)
PyObject *obData;
PyObject *retVal;
- if (!PyArg_ParseTuple(args, "Oi:EnumValue", &obKey, &index))
- return NULL;
- if (!PyHKEY_AsHKEY(obKey, &hKey, FALSE))
- return NULL;
-
- if ((rc = RegQueryInfoKeyW(hKey, NULL, NULL, NULL, NULL, NULL, NULL,
+ if ((rc = RegQueryInfoKeyW(key, NULL, NULL, NULL, NULL, NULL, NULL,
NULL,
&retValueSize, &retDataSize, NULL, NULL))
!= ERROR_SUCCESS)
@@ -1217,7 +1102,7 @@ PyEnumValue(PyObject *self, PyObject *args)
while (1) {
Py_BEGIN_ALLOW_THREADS
- rc = RegEnumValueW(hKey,
+ rc = RegEnumValueW(key,
index,
retValueBuf,
&retValueSize,
@@ -1260,19 +1145,25 @@ PyEnumValue(PyObject *self, PyObject *args)
return retVal;
}
+/*[clinic input]
+winreg.ExpandEnvironmentStrings
+
+ string: Py_UNICODE
+ /
+
+Expand environment vars.
+[clinic start generated code]*/
+
static PyObject *
-PyExpandEnvironmentStrings(PyObject *self, PyObject *args)
+winreg_ExpandEnvironmentStrings_impl(PyModuleDef *module, Py_UNICODE *string)
+/*[clinic end generated code: output=4cb6914065a8663c input=b2a9714d2b751aa6]*/
{
wchar_t *retValue = NULL;
- wchar_t *src;
DWORD retValueSize;
DWORD rc;
PyObject *o;
- if (!PyArg_ParseTuple(args, "u:ExpandEnvironmentStrings", &src))
- return NULL;
-
- retValueSize = ExpandEnvironmentStringsW(src, retValue, 0);
+ retValueSize = ExpandEnvironmentStringsW(string, retValue, 0);
if (retValueSize == 0) {
return PyErr_SetFromWindowsErrWithFunction(retValueSize,
"ExpandEnvironmentStrings");
@@ -1282,7 +1173,7 @@ PyExpandEnvironmentStrings(PyObject *self, PyObject *args)
return PyErr_NoMemory();
}
- rc = ExpandEnvironmentStringsW(src, retValue, retValueSize);
+ rc = ExpandEnvironmentStringsW(string, retValue, retValueSize);
if (rc == 0) {
PyMem_Free(retValue);
return PyErr_SetFromWindowsErrWithFunction(retValueSize,
@@ -1293,90 +1184,166 @@ PyExpandEnvironmentStrings(PyObject *self, PyObject *args)
return o;
}
+/*[clinic input]
+winreg.FlushKey
+
+ key: HKEY
+ An already open key, or any one of the predefined HKEY_* constants.
+ /
+
+Writes all the attributes of a key to the registry.
+
+It is not necessary to call FlushKey to change a key. Registry changes
+are flushed to disk by the registry using its lazy flusher. Registry
+changes are also flushed to disk at system shutdown. Unlike
+CloseKey(), the FlushKey() method returns only when all the data has
+been written to the registry.
+
+An application should only call FlushKey() if it requires absolute
+certainty that registry changes are on disk. If you don't know whether
+a FlushKey() call is required, it probably isn't.
+[clinic start generated code]*/
+
static PyObject *
-PyFlushKey(PyObject *self, PyObject *args)
+winreg_FlushKey_impl(PyModuleDef *module, HKEY key)
+/*[clinic end generated code: output=b9a7a6e405466420 input=f57457c12297d82f]*/
{
- HKEY hKey;
- PyObject *obKey;
long rc;
- if (!PyArg_ParseTuple(args, "O:FlushKey", &obKey))
- return NULL;
- if (!PyHKEY_AsHKEY(obKey, &hKey, FALSE))
- return NULL;
Py_BEGIN_ALLOW_THREADS
- rc = RegFlushKey(hKey);
+ rc = RegFlushKey(key);
Py_END_ALLOW_THREADS
if (rc != ERROR_SUCCESS)
return PyErr_SetFromWindowsErrWithFunction(rc, "RegFlushKey");
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
+
+
+/*[clinic input]
+winreg.LoadKey
+
+ key: HKEY
+ An already open key, or any one of the predefined HKEY_* constants.
+ sub_key: Py_UNICODE
+ A string that identifies the sub-key to load.
+ file_name: Py_UNICODE
+ The name of the file to load registry data from. This file must
+ have been created with the SaveKey() function. Under the file
+ allocation table (FAT) file system, the filename may not have an
+ extension.
+ /
+
+Insert data into the registry from a file.
+
+Creates a subkey under the specified key and stores registration
+information from a specified file into that subkey.
+
+A call to LoadKey() fails if the calling process does not have the
+SE_RESTORE_PRIVILEGE privilege.
+
+If key is a handle returned by ConnectRegistry(), then the path
+specified in fileName is relative to the remote computer.
+
+The MSDN docs imply key must be in the HKEY_USER or HKEY_LOCAL_MACHINE
+tree.
+[clinic start generated code]*/
+
static PyObject *
-PyLoadKey(PyObject *self, PyObject *args)
+winreg_LoadKey_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key,
+ Py_UNICODE *file_name)
+/*[clinic end generated code: output=b8b700e39c695b90 input=e3b5b45ade311582]*/
{
- HKEY hKey;
- PyObject *obKey;
- wchar_t *subKey;
- wchar_t *fileName;
-
long rc;
- if (!PyArg_ParseTuple(args, "Ouu:LoadKey", &obKey, &subKey, &fileName))
- return NULL;
- if (!PyHKEY_AsHKEY(obKey, &hKey, FALSE))
- return NULL;
+
Py_BEGIN_ALLOW_THREADS
- rc = RegLoadKeyW(hKey, subKey, fileName );
+ rc = RegLoadKeyW(key, sub_key, file_name );
Py_END_ALLOW_THREADS
if (rc != ERROR_SUCCESS)
return PyErr_SetFromWindowsErrWithFunction(rc, "RegLoadKey");
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
-static PyObject *
-PyOpenKey(PyObject *self, PyObject *args, PyObject *kwargs)
+/*[clinic input]
+winreg.OpenKey -> HKEY
+
+ key: HKEY
+ An already open key, or any one of the predefined HKEY_* constants.
+ sub_key: Py_UNICODE(accept={str, NoneType})
+ A string that identifies the sub_key to open.
+ reserved: int = 0
+ A reserved integer that must be zero. Default is zero.
+ access: REGSAM(c_default='KEY_READ') = winreg.KEY_READ
+ An integer that specifies an access mask that describes the desired
+ security access for the key. Default is KEY_READ.
+
+Opens the specified key.
+
+The result is a new handle to the specified key.
+If the function fails, an OSError exception is raised.
+[clinic start generated code]*/
+
+static HKEY
+winreg_OpenKey_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key,
+ int reserved, REGSAM access)
+/*[clinic end generated code: output=79818ea356490a55 input=098505ac36a9ae28]*/
{
- HKEY hKey;
- PyObject *key;
- wchar_t *sub_key;
- int reserved = 0;
HKEY retKey;
long rc;
- REGSAM access = KEY_READ;
-
- char *kwlist[] = {"key", "sub_key", "reserved", "access", NULL};
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OZ|ii:OpenKey", kwlist,
- &key, &sub_key, &reserved, &access))
- return NULL;
- if (!PyHKEY_AsHKEY(key, &hKey, FALSE))
- return NULL;
Py_BEGIN_ALLOW_THREADS
- rc = RegOpenKeyExW(hKey, sub_key, reserved, access, &retKey);
+ rc = RegOpenKeyExW(key, sub_key, reserved, access, &retKey);
Py_END_ALLOW_THREADS
- if (rc != ERROR_SUCCESS)
- return PyErr_SetFromWindowsErrWithFunction(rc, "RegOpenKeyEx");
- return PyHKEY_FromHKEY(retKey);
+ if (rc != ERROR_SUCCESS) {
+ PyErr_SetFromWindowsErrWithFunction(rc, "RegOpenKeyEx");
+ return NULL;
+ }
+ return retKey;
+}
+
+/*[clinic input]
+winreg.OpenKeyEx = winreg.OpenKey
+
+Opens the specified key.
+
+The result is a new handle to the specified key.
+If the function fails, an OSError exception is raised.
+[clinic start generated code]*/
+
+static HKEY
+winreg_OpenKeyEx_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key,
+ int reserved, REGSAM access)
+/*[clinic end generated code: output=2dd9f29e84ea2dbc input=c6c4972af8622959]*/
+{
+ return winreg_OpenKey_impl(module, key, sub_key, reserved, access);
}
+/*[clinic input]
+winreg.QueryInfoKey
+
+ key: HKEY
+ An already open key, or any one of the predefined HKEY_* constants.
+ /
+
+Returns information about a key.
+
+The result is a tuple of 3 items:
+An integer that identifies the number of sub keys this key has.
+An integer that identifies the number of values this key has.
+An integer that identifies when the key was last modified (if available)
+as 100's of nanoseconds since Jan 1, 1600.
+[clinic start generated code]*/
static PyObject *
-PyQueryInfoKey(PyObject *self, PyObject *args)
+winreg_QueryInfoKey_impl(PyModuleDef *module, HKEY key)
+/*[clinic end generated code: output=ae885222fe966a34 input=c3593802390cde1f]*/
{
- HKEY hKey;
- PyObject *obKey;
long rc;
DWORD nSubKeys, nValues;
FILETIME ft;
LARGE_INTEGER li;
PyObject *l;
PyObject *ret;
- if (!PyArg_ParseTuple(args, "O:QueryInfoKey", &obKey))
- return NULL;
- if (!PyHKEY_AsHKEY(obKey, &hKey, FALSE))
- return NULL;
- if ((rc = RegQueryInfoKey(hKey, NULL, NULL, 0, &nSubKeys, NULL, NULL,
+
+ if ((rc = RegQueryInfoKey(key, NULL, NULL, 0, &nSubKeys, NULL, NULL,
&nValues, NULL, NULL, NULL, &ft))
!= ERROR_SUCCESS)
return PyErr_SetFromWindowsErrWithFunction(rc, "RegQueryInfoKey");
@@ -1390,12 +1357,31 @@ PyQueryInfoKey(PyObject *self, PyObject *args)
return ret;
}
+/*[clinic input]
+winreg.QueryValue
+
+ key: HKEY
+ An already open key, or any one of the predefined HKEY_* constants.
+ sub_key: Py_UNICODE(accept={str, NoneType})
+ A string that holds the name of the subkey with which the value
+ is associated. If this parameter is None or empty, the function
+ retrieves the value set by the SetValue() method for the key
+ identified by key.
+ /
+
+Retrieves the unnamed value for a key.
+
+Values in the registry have name, type, and data components. This method
+retrieves the data for a key's first value that has a NULL name.
+But since the underlying API call doesn't return the type, you'll
+probably be happier using QueryValueEx; this function is just here for
+completeness.
+[clinic start generated code]*/
+
static PyObject *
-PyQueryValue(PyObject *self, PyObject *args)
+winreg_QueryValue_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key)
+/*[clinic end generated code: output=f91cb6f623c3b65a input=41cafbbf423b21d6]*/
{
- HKEY hKey;
- PyObject *obKey;
- wchar_t *subKey;
long rc;
PyObject *retStr;
wchar_t *retBuf;
@@ -1403,13 +1389,7 @@ PyQueryValue(PyObject *self, PyObject *args)
DWORD retSize = 0;
wchar_t *tmp;
- if (!PyArg_ParseTuple(args, "OZ:QueryValue", &obKey, &subKey))
- return NULL;
-
- if (!PyHKEY_AsHKEY(obKey, &hKey, FALSE))
- return NULL;
-
- rc = RegQueryValueW(hKey, subKey, NULL, &retSize);
+ rc = RegQueryValueW(key, sub_key, NULL, &retSize);
if (rc == ERROR_MORE_DATA)
retSize = 256;
else if (rc != ERROR_SUCCESS)
@@ -1423,7 +1403,7 @@ PyQueryValue(PyObject *self, PyObject *args)
while (1) {
retSize = bufSize;
- rc = RegQueryValueW(hKey, subKey, retBuf, &retSize);
+ rc = RegQueryValueW(key, sub_key, retBuf, &retSize);
if (rc != ERROR_MORE_DATA)
break;
@@ -1447,13 +1427,28 @@ PyQueryValue(PyObject *self, PyObject *args)
return retStr;
}
+
+/*[clinic input]
+winreg.QueryValueEx
+
+ key: HKEY
+ An already open key, or any one of the predefined HKEY_* constants.
+ name: Py_UNICODE(accept={str, NoneType})
+ A string indicating the value to query.
+ /
+
+Retrieves the type and value of a specified sub-key.
+
+Behaves mostly like QueryValue(), but also returns the type of the
+specified value name associated with the given open registry key.
+
+The return value is a tuple of the value and the type_id.
+[clinic start generated code]*/
+
static PyObject *
-PyQueryValueEx(PyObject *self, PyObject *args)
+winreg_QueryValueEx_impl(PyModuleDef *module, HKEY key, Py_UNICODE *name)
+/*[clinic end generated code: output=a4b07f7807194f23 input=cf366cada4836891]*/
{
- HKEY hKey;
- PyObject *obKey;
- wchar_t *valueName;
-
long rc;
BYTE *retBuf, *tmp;
DWORD bufSize = 0, retSize;
@@ -1461,13 +1456,7 @@ PyQueryValueEx(PyObject *self, PyObject *args)
PyObject *obData;
PyObject *result;
- if (!PyArg_ParseTuple(args, "OZ:QueryValueEx", &obKey, &valueName))
- return NULL;
-
- if (!PyHKEY_AsHKEY(obKey, &hKey, FALSE))
- return NULL;
-
- rc = RegQueryValueExW(hKey, valueName, NULL, NULL, NULL, &bufSize);
+ rc = RegQueryValueExW(key, name, NULL, NULL, NULL, &bufSize);
if (rc == ERROR_MORE_DATA)
bufSize = 256;
else if (rc != ERROR_SUCCESS)
@@ -1479,7 +1468,7 @@ PyQueryValueEx(PyObject *self, PyObject *args)
while (1) {
retSize = bufSize;
- rc = RegQueryValueExW(hKey, valueName, NULL, &typ,
+ rc = RegQueryValueExW(key, name, NULL, &typ,
(BYTE *)retBuf, &retSize);
if (rc != ERROR_MORE_DATA)
break;
@@ -1507,91 +1496,149 @@ PyQueryValueEx(PyObject *self, PyObject *args)
return result;
}
+/*[clinic input]
+winreg.SaveKey
+
+ key: HKEY
+ An already open key, or any one of the predefined HKEY_* constants.
+ file_name: Py_UNICODE
+ The name of the file to save registry data to. This file cannot
+ already exist. If this filename includes an extension, it cannot be
+ used on file allocation table (FAT) file systems by the LoadKey(),
+ ReplaceKey() or RestoreKey() methods.
+ /
+
+Saves the specified key, and all its subkeys to the specified file.
+
+If key represents a key on a remote computer, the path described by
+file_name is relative to the remote computer.
+
+The caller of this method must possess the SeBackupPrivilege
+security privilege. This function passes NULL for security_attributes
+to the API.
+[clinic start generated code]*/
static PyObject *
-PySaveKey(PyObject *self, PyObject *args)
+winreg_SaveKey_impl(PyModuleDef *module, HKEY key, Py_UNICODE *file_name)
+/*[clinic end generated code: output=33109b96bfabef8f input=da735241f91ac7a2]*/
{
- HKEY hKey;
- PyObject *obKey;
- wchar_t *fileName;
LPSECURITY_ATTRIBUTES pSA = NULL;
long rc;
- if (!PyArg_ParseTuple(args, "Ou:SaveKey", &obKey, &fileName))
- return NULL;
- if (!PyHKEY_AsHKEY(obKey, &hKey, FALSE))
- return NULL;
/* One day we may get security into the core?
if (!PyWinObject_AsSECURITY_ATTRIBUTES(obSA, &pSA, TRUE))
return NULL;
*/
Py_BEGIN_ALLOW_THREADS
- rc = RegSaveKeyW(hKey, fileName, pSA );
+ rc = RegSaveKeyW(key, file_name, pSA );
Py_END_ALLOW_THREADS
if (rc != ERROR_SUCCESS)
return PyErr_SetFromWindowsErrWithFunction(rc, "RegSaveKey");
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
+/*[clinic input]
+winreg.SetValue
+
+ key: HKEY
+ An already open key, or any one of the predefined HKEY_* constants.
+ sub_key: Py_UNICODE(accept={str, NoneType})
+ A string that names the subkey with which the value is associated.
+ type: DWORD
+ An integer that specifies the type of the data. Currently this must
+ be REG_SZ, meaning only strings are supported.
+ value: Py_UNICODE(zeroes=True)
+ A string that specifies the new value.
+ /
+
+Associates a value with a specified key.
+
+If the key specified by the sub_key parameter does not exist, the
+SetValue function creates it.
+
+Value lengths are limited by available memory. Long values (more than
+2048 bytes) should be stored as files with the filenames stored in
+the configuration registry to help the registry perform efficiently.
+
+The key identified by the key parameter must have been opened with
+KEY_SET_VALUE access.
+[clinic start generated code]*/
+
static PyObject *
-PySetValue(PyObject *self, PyObject *args)
+winreg_SetValue_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key,
+ DWORD type, Py_UNICODE *value,
+ Py_ssize_clean_t value_length)
+/*[clinic end generated code: output=3c9c7c2769e8f953 input=2cd2adab79339c53]*/
{
- HKEY hKey;
- PyObject *obKey;
- wchar_t *subKey;
- wchar_t *str;
- DWORD typ;
- DWORD len;
long rc;
- if (!PyArg_ParseTuple(args, "OZiu#:SetValue",
- &obKey,
- &subKey,
- &typ,
- &str,
- &len))
- return NULL;
- if (!PyHKEY_AsHKEY(obKey, &hKey, FALSE))
- return NULL;
- if (typ != REG_SZ) {
+
+ if (type != REG_SZ) {
PyErr_SetString(PyExc_TypeError,
"Type must be winreg.REG_SZ");
return NULL;
}
Py_BEGIN_ALLOW_THREADS
- rc = RegSetValueW(hKey, subKey, REG_SZ, str, len+1);
+ rc = RegSetValueW(key, sub_key, REG_SZ, value, value_length+1);
Py_END_ALLOW_THREADS
if (rc != ERROR_SUCCESS)
return PyErr_SetFromWindowsErrWithFunction(rc, "RegSetValue");
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
+/*[clinic input]
+winreg.SetValueEx
+
+ key: HKEY
+ An already open key, or any one of the predefined HKEY_* constants.
+ value_name: Py_UNICODE(accept={str, NoneType})
+ A string containing the name of the value to set, or None.
+ reserved: object
+ Can be anything - zero is always passed to the API.
+ type: DWORD
+ An integer that specifies the type of the data, one of:
+ REG_BINARY -- Binary data in any form.
+ REG_DWORD -- A 32-bit number.
+ REG_DWORD_LITTLE_ENDIAN -- A 32-bit number in little-endian format.
+ REG_DWORD_BIG_ENDIAN -- A 32-bit number in big-endian format.
+ REG_EXPAND_SZ -- A null-terminated string that contains unexpanded
+ references to environment variables (for example,
+ %PATH%).
+ REG_LINK -- A Unicode symbolic link.
+ REG_MULTI_SZ -- A sequence of null-terminated strings, terminated
+ by two null characters. Note that Python handles
+ this termination automatically.
+ REG_NONE -- No defined value type.
+ REG_RESOURCE_LIST -- A device-driver resource list.
+ REG_SZ -- A null-terminated string.
+ value: object
+ A string that specifies the new value.
+ /
+
+Stores data in the value field of an open registry key.
+
+This method can also set additional value and type information for the
+specified key. The key identified by the key parameter must have been
+opened with KEY_SET_VALUE access.
+
+To open the key, use the CreateKeyEx() or OpenKeyEx() methods.
+
+Value lengths are limited by available memory. Long values (more than
+2048 bytes) should be stored as files with the filenames stored in
+the configuration registry to help the registry perform efficiently.
+[clinic start generated code]*/
+
static PyObject *
-PySetValueEx(PyObject *self, PyObject *args)
+winreg_SetValueEx_impl(PyModuleDef *module, HKEY key, Py_UNICODE *value_name,
+ PyObject *reserved, DWORD type, PyObject *value)
+/*[clinic end generated code: output=ea092a935c361582 input=f1b16cbcc3ed4101]*/
{
- HKEY hKey;
- PyObject *obKey;
- wchar_t *valueName;
- PyObject *obRes;
- PyObject *value;
BYTE *data;
DWORD len;
- DWORD typ;
LONG rc;
- if (!PyArg_ParseTuple(args, "OZOiO:SetValueEx",
- &obKey,
- &valueName,
- &obRes,
- &typ,
- &value))
- return NULL;
- if (!PyHKEY_AsHKEY(obKey, &hKey, FALSE))
- return NULL;
- if (!Py2Reg(value, typ, &data, &len))
+ if (!Py2Reg(value, type, &data, &len))
{
if (!PyErr_Occurred())
PyErr_SetString(PyExc_ValueError,
@@ -1599,31 +1646,40 @@ PySetValueEx(PyObject *self, PyObject *args)
return NULL;
}
Py_BEGIN_ALLOW_THREADS
- rc = RegSetValueExW(hKey, valueName, 0, typ, data, len);
+ rc = RegSetValueExW(key, value_name, 0, type, data, len);
Py_END_ALLOW_THREADS
PyMem_DEL(data);
if (rc != ERROR_SUCCESS)
return PyErr_SetFromWindowsErrWithFunction(rc,
"RegSetValueEx");
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
+/*[clinic input]
+winreg.DisableReflectionKey
+
+ key: HKEY
+ An already open key, or any one of the predefined HKEY_* constants.
+ /
+
+Disables registry reflection for 32bit processes running on a 64bit OS.
+
+Will generally raise NotImplemented if executed on a 32bit OS.
+
+If the key is not on the reflection list, the function succeeds but has
+no effect. Disabling reflection for a key does not affect reflection
+of any subkeys.
+[clinic start generated code]*/
+
static PyObject *
-PyDisableReflectionKey(PyObject *self, PyObject *args)
+winreg_DisableReflectionKey_impl(PyModuleDef *module, HKEY key)
+/*[clinic end generated code: output=50fe6e2604324cdd input=a6c9e5ca5410193c]*/
{
- HKEY hKey;
- PyObject *obKey;
HMODULE hMod;
typedef LONG (WINAPI *RDRKFunc)(HKEY);
RDRKFunc pfn = NULL;
LONG rc;
- if (!PyArg_ParseTuple(args, "O:DisableReflectionKey", &obKey))
- return NULL;
- if (!PyHKEY_AsHKEY(obKey, &hKey, FALSE))
- return NULL;
-
/* Only available on 64bit platforms, so we must load it
dynamically.*/
hMod = GetModuleHandleW(L"advapi32.dll");
@@ -1636,30 +1692,37 @@ PyDisableReflectionKey(PyObject *self, PyObject *args)
return NULL;
}
Py_BEGIN_ALLOW_THREADS
- rc = (*pfn)(hKey);
+ rc = (*pfn)(key);
Py_END_ALLOW_THREADS
if (rc != ERROR_SUCCESS)
return PyErr_SetFromWindowsErrWithFunction(rc,
"RegDisableReflectionKey");
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
+/*[clinic input]
+winreg.EnableReflectionKey
+
+ key: HKEY
+ An already open key, or any one of the predefined HKEY_* constants.
+ /
+
+Restores registry reflection for the specified disabled key.
+
+Will generally raise NotImplemented if executed on a 32bit OS.
+Restoring reflection for a key does not affect reflection of any
+subkeys.
+[clinic start generated code]*/
+
static PyObject *
-PyEnableReflectionKey(PyObject *self, PyObject *args)
+winreg_EnableReflectionKey_impl(PyModuleDef *module, HKEY key)
+/*[clinic end generated code: output=e3f23edb414f24a4 input=7748abbacd1e166a]*/
{
- HKEY hKey;
- PyObject *obKey;
HMODULE hMod;
typedef LONG (WINAPI *RERKFunc)(HKEY);
RERKFunc pfn = NULL;
LONG rc;
- if (!PyArg_ParseTuple(args, "O:EnableReflectionKey", &obKey))
- return NULL;
- if (!PyHKEY_AsHKEY(obKey, &hKey, FALSE))
- return NULL;
-
/* Only available on 64bit platforms, so we must load it
dynamically.*/
hMod = GetModuleHandleW(L"advapi32.dll");
@@ -1672,31 +1735,36 @@ PyEnableReflectionKey(PyObject *self, PyObject *args)
return NULL;
}
Py_BEGIN_ALLOW_THREADS
- rc = (*pfn)(hKey);
+ rc = (*pfn)(key);
Py_END_ALLOW_THREADS
if (rc != ERROR_SUCCESS)
return PyErr_SetFromWindowsErrWithFunction(rc,
"RegEnableReflectionKey");
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
+/*[clinic input]
+winreg.QueryReflectionKey
+
+ key: HKEY
+ An already open key, or any one of the predefined HKEY_* constants.
+ /
+
+Returns the reflection state for the specified key as a bool.
+
+Will generally raise NotImplemented if executed on a 32bit OS.
+[clinic start generated code]*/
+
static PyObject *
-PyQueryReflectionKey(PyObject *self, PyObject *args)
+winreg_QueryReflectionKey_impl(PyModuleDef *module, HKEY key)
+/*[clinic end generated code: output=2a49c564ca162e50 input=9f325eacb5a65d88]*/
{
- HKEY hKey;
- PyObject *obKey;
HMODULE hMod;
typedef LONG (WINAPI *RQRKFunc)(HKEY, BOOL *);
RQRKFunc pfn = NULL;
BOOL result;
LONG rc;
- if (!PyArg_ParseTuple(args, "O:QueryReflectionKey", &obKey))
- return NULL;
- if (!PyHKEY_AsHKEY(obKey, &hKey, FALSE))
- return NULL;
-
/* Only available on 64bit platforms, so we must load it
dynamically.*/
hMod = GetModuleHandleW(L"advapi32.dll");
@@ -1709,7 +1777,7 @@ PyQueryReflectionKey(PyObject *self, PyObject *args)
return NULL;
}
Py_BEGIN_ALLOW_THREADS
- rc = (*pfn)(hKey, &result);
+ rc = (*pfn)(key, &result);
Py_END_ALLOW_THREADS
if (rc != ERROR_SUCCESS)
return PyErr_SetFromWindowsErrWithFunction(rc,
@@ -1718,34 +1786,29 @@ PyQueryReflectionKey(PyObject *self, PyObject *args)
}
static struct PyMethodDef winreg_methods[] = {
- {"CloseKey", PyCloseKey, METH_VARARGS, CloseKey_doc},
- {"ConnectRegistry", PyConnectRegistry, METH_VARARGS, ConnectRegistry_doc},
- {"CreateKey", PyCreateKey, METH_VARARGS, CreateKey_doc},
- {"CreateKeyEx", (PyCFunction)PyCreateKeyEx,
- METH_VARARGS | METH_KEYWORDS, CreateKeyEx_doc},
- {"DeleteKey", PyDeleteKey, METH_VARARGS, DeleteKey_doc},
- {"DeleteKeyEx", (PyCFunction)PyDeleteKeyEx,
- METH_VARARGS | METH_KEYWORDS, DeleteKeyEx_doc},
- {"DeleteValue", PyDeleteValue, METH_VARARGS, DeleteValue_doc},
- {"DisableReflectionKey", PyDisableReflectionKey, METH_VARARGS, DisableReflectionKey_doc},
- {"EnableReflectionKey", PyEnableReflectionKey, METH_VARARGS, EnableReflectionKey_doc},
- {"EnumKey", PyEnumKey, METH_VARARGS, EnumKey_doc},
- {"EnumValue", PyEnumValue, METH_VARARGS, EnumValue_doc},
- {"ExpandEnvironmentStrings", PyExpandEnvironmentStrings, METH_VARARGS,
- ExpandEnvironmentStrings_doc },
- {"FlushKey", PyFlushKey, METH_VARARGS, FlushKey_doc},
- {"LoadKey", PyLoadKey, METH_VARARGS, LoadKey_doc},
- {"OpenKey", (PyCFunction)PyOpenKey, METH_VARARGS | METH_KEYWORDS,
- OpenKey_doc},
- {"OpenKeyEx", (PyCFunction)PyOpenKey, METH_VARARGS | METH_KEYWORDS,
- OpenKeyEx_doc},
- {"QueryValue", PyQueryValue, METH_VARARGS, QueryValue_doc},
- {"QueryValueEx", PyQueryValueEx, METH_VARARGS, QueryValueEx_doc},
- {"QueryInfoKey", PyQueryInfoKey, METH_VARARGS, QueryInfoKey_doc},
- {"QueryReflectionKey",PyQueryReflectionKey,METH_VARARGS, QueryReflectionKey_doc},
- {"SaveKey", PySaveKey, METH_VARARGS, SaveKey_doc},
- {"SetValue", PySetValue, METH_VARARGS, SetValue_doc},
- {"SetValueEx", PySetValueEx, METH_VARARGS, SetValueEx_doc},
+ WINREG_CLOSEKEY_METHODDEF
+ WINREG_CONNECTREGISTRY_METHODDEF
+ WINREG_CREATEKEY_METHODDEF
+ WINREG_CREATEKEYEX_METHODDEF
+ WINREG_DELETEKEY_METHODDEF
+ WINREG_DELETEKEYEX_METHODDEF
+ WINREG_DELETEVALUE_METHODDEF
+ WINREG_DISABLEREFLECTIONKEY_METHODDEF
+ WINREG_ENABLEREFLECTIONKEY_METHODDEF
+ WINREG_ENUMKEY_METHODDEF
+ WINREG_ENUMVALUE_METHODDEF
+ WINREG_EXPANDENVIRONMENTSTRINGS_METHODDEF
+ WINREG_FLUSHKEY_METHODDEF
+ WINREG_LOADKEY_METHODDEF
+ WINREG_OPENKEY_METHODDEF
+ WINREG_OPENKEYEX_METHODDEF
+ WINREG_QUERYVALUE_METHODDEF
+ WINREG_QUERYVALUEEX_METHODDEF
+ WINREG_QUERYINFOKEY_METHODDEF
+ WINREG_QUERYREFLECTIONKEY_METHODDEF
+ WINREG_SAVEKEY_METHODDEF
+ WINREG_SETVALUE_METHODDEF
+ WINREG_SETVALUEEX_METHODDEF
NULL,
};
diff --git a/PC/winsound.c b/PC/winsound.c
index b564eaba78..8e77d1387e 100644
--- a/PC/winsound.c
+++ b/PC/winsound.c
@@ -39,22 +39,6 @@
#include <windows.h>
#include <mmsystem.h>
-PyDoc_STRVAR(sound_playsound_doc,
-"PlaySound(sound, flags) - a wrapper around the Windows PlaySound API\n"
-"\n"
-"The sound argument can be a filename, data, or None.\n"
-"For flag values, ored together, see module documentation.");
-
-PyDoc_STRVAR(sound_beep_doc,
-"Beep(frequency, duration) - a wrapper around the Windows Beep API\n"
-"\n"
-"The frequency argument specifies frequency, in hertz, of the sound.\n"
-"This parameter must be in the range 37 through 32,767.\n"
-"The duration argument specifies the number of milliseconds.\n");
-
-PyDoc_STRVAR(sound_msgbeep_doc,
-"MessageBeep(x) - call Windows MessageBeep(x). x defaults to MB_OK.");
-
PyDoc_STRVAR(sound_module_doc,
"PlaySound(sound, flags) - play a sound\n"
"SND_FILENAME - sound is a wav file name\n"
@@ -67,79 +51,112 @@ PyDoc_STRVAR(sound_module_doc,
"SND_NOSTOP - Do not interrupt any sounds currently playing\n" // Raising RuntimeError if needed
"SND_NOWAIT - Return immediately if the sound driver is busy\n" // Without any errors
"\n"
-"Beep(frequency, duration) - Make a beep through the PC speaker.");
+"Beep(frequency, duration) - Make a beep through the PC speaker.\n"
+"MessageBeep(x) - Call Windows MessageBeep.");
+
+/*[clinic input]
+module winsound
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=a18401142d97b8d5]*/
+
+#include "clinic/winsound.c.h"
+
+/*[clinic input]
+winsound.PlaySound
+
+ sound: Py_UNICODE(accept={str, NoneType})
+ The sound to play; a filename, data, or None.
+ flags: int
+ Flag values, ored together. See module documentation.
+ /
+
+A wrapper around the Windows PlaySound API.
+[clinic start generated code]*/
static PyObject *
-sound_playsound(PyObject *s, PyObject *args)
+winsound_PlaySound_impl(PyModuleDef *module, Py_UNICODE *sound, int flags)
+/*[clinic end generated code: output=614273784bf59e5c input=3411b1b7c1f36d93]*/
{
- wchar_t *wsound;
- int flags;
int ok;
- if (PyArg_ParseTuple(args, "Zi:PlaySound", &wsound, &flags)) {
- if (flags & SND_ASYNC && flags & SND_MEMORY) {
- /* Sidestep reference counting headache; unfortunately this also
- prevent SND_LOOP from memory. */
- PyErr_SetString(PyExc_RuntimeError, "Cannot play asynchronously from memory");
- return NULL;
- }
- Py_BEGIN_ALLOW_THREADS
- ok = PlaySoundW(wsound, NULL, flags);
- Py_END_ALLOW_THREADS
- if (!ok) {
- PyErr_SetString(PyExc_RuntimeError, "Failed to play sound");
- return NULL;
- }
- Py_INCREF(Py_None);
- return Py_None;
+ if (flags & SND_ASYNC && flags & SND_MEMORY) {
+ /* Sidestep reference counting headache; unfortunately this also
+ prevent SND_LOOP from memory. */
+ PyErr_SetString(PyExc_RuntimeError,
+ "Cannot play asynchronously from memory");
+ return NULL;
}
- return NULL;
+
+ Py_BEGIN_ALLOW_THREADS
+ ok = PlaySoundW(sound, NULL, flags);
+ Py_END_ALLOW_THREADS
+ if (!ok) {
+ PyErr_SetString(PyExc_RuntimeError, "Failed to play sound");
+ return NULL;
+ }
+ Py_RETURN_NONE;
}
+/*[clinic input]
+winsound.Beep
+
+ frequency: int
+ Frequency of the sound in hertz.
+ Must be in the range 37 through 32,767.
+ duration: int
+ How long the sound should play, in milliseconds.
+ /
+
+A wrapper around the Windows Beep API.
+[clinic start generated code]*/
+
static PyObject *
-sound_beep(PyObject *self, PyObject *args)
+winsound_Beep_impl(PyModuleDef *module, int frequency, int duration)
+/*[clinic end generated code: output=c75f282035a872bd input=628a99d2ddf73798]*/
{
- int freq;
- int dur;
BOOL ok;
- if (!PyArg_ParseTuple(args, "ii:Beep", &freq, &dur))
- return NULL;
-
- if (freq < 37 || freq > 32767) {
+ if (frequency < 37 || frequency > 32767) {
PyErr_SetString(PyExc_ValueError,
"frequency must be in 37 thru 32767");
return NULL;
}
Py_BEGIN_ALLOW_THREADS
- ok = Beep(freq, dur);
+ ok = Beep(frequency, duration);
Py_END_ALLOW_THREADS
if (!ok) {
PyErr_SetString(PyExc_RuntimeError,"Failed to beep");
return NULL;
}
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
+/*[clinic input]
+winsound.MessageBeep
+
+ x: int(c_default="MB_OK") = MB_OK
+ /
+
+Call Windows MessageBeep(x).
+
+x defaults to MB_OK.
+[clinic start generated code]*/
+
static PyObject *
-sound_msgbeep(PyObject *self, PyObject *args)
+winsound_MessageBeep_impl(PyModuleDef *module, int x)
+/*[clinic end generated code: output=92aa6a822bdc66ad input=a776c8a85c9853f6]*/
{
- int x = MB_OK;
- if (!PyArg_ParseTuple(args, "|i:MessageBeep", &x))
- return NULL;
MessageBeep(x);
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
static struct PyMethodDef sound_methods[] =
{
- {"PlaySound", sound_playsound, METH_VARARGS, sound_playsound_doc},
- {"Beep", sound_beep, METH_VARARGS, sound_beep_doc},
- {"MessageBeep", sound_msgbeep, METH_VARARGS, sound_msgbeep_doc},
+ WINSOUND_PLAYSOUND_METHODDEF
+ WINSOUND_BEEP_METHODDEF
+ WINSOUND_MESSAGEBEEP_METHODDEF
{NULL, NULL}
};
diff --git a/PCbuild/_bz2.vcxproj b/PCbuild/_bz2.vcxproj
index 9387e54b3a..9efb0d9a79 100644
--- a/PCbuild/_bz2.vcxproj
+++ b/PCbuild/_bz2.vcxproj
@@ -39,129 +39,28 @@
<RootNamespace>bz2</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
+ <Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
+ <PropertyGroup Label="Configuration" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <PropertyGroup>
+ <TargetExt>.pyd</TargetExt>
+ </PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- <Import Project="x64.props" />
+ <Import Project="pyproject.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>$(bz2Dir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <BaseAddress>0x1D170000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
+ <ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(bz2Dir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -170,71 +69,6 @@
<BaseAddress>0x1D170000</BaseAddress>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>$(bz2Dir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <BaseAddress>0x1D170000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>$(bz2Dir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <BaseAddress>0x1D170000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>$(bz2Dir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <BaseAddress>0x1D170000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>$(bz2Dir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <BaseAddress>0x1D170000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>$(bz2Dir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <BaseAddress>0x1D170000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>$(bz2Dir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <BaseAddress>0x1D170000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\Modules\_bz2module.c" />
<ClCompile Include="$(bz2Dir)\blocksort.c" />
@@ -250,6 +84,9 @@
<ClInclude Include="$(bz2Dir)\bzlib_private.h" />
</ItemGroup>
<ItemGroup>
+ <ResourceCompile Include="..\PC\python_nt.rc" />
+ </ItemGroup>
+ <ItemGroup>
<ProjectReference Include="pythoncore.vcxproj">
<Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
diff --git a/PCbuild/_ctypes.vcxproj b/PCbuild/_ctypes.vcxproj
index 202cb1f42b..70bea457d2 100644
--- a/PCbuild/_ctypes.vcxproj
+++ b/PCbuild/_ctypes.vcxproj
@@ -39,204 +39,33 @@
<RootNamespace>_ctypes</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
+ <Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <PropertyGroup>
+ <TargetExt>.pyd</TargetExt>
+ </PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- <Import Project="x64.props" />
+ <Import Project="pyproject.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..\Modules\_ctypes\libffi_msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<BaseAddress>0x1D1A0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>..\Modules\_ctypes\libffi_msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <BaseAddress>0x1D1A0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\Modules\_ctypes\libffi_msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalOptions>/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE %(AdditionalOptions)</AdditionalOptions>
- <SubSystem>NotSet</SubSystem>
- <BaseAddress>0x1D1A0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>..\Modules\_ctypes\libffi_msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalOptions>/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE %(AdditionalOptions)</AdditionalOptions>
- <SubSystem>NotSet</SubSystem>
- <BaseAddress>0x1D1A0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\Modules\_ctypes\libffi_msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalOptions>/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE %(AdditionalOptions)</AdditionalOptions>
- <SubSystem>NotSet</SubSystem>
- <BaseAddress>0x1D1A0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>..\Modules\_ctypes\libffi_msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
<AdditionalOptions>/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE %(AdditionalOptions)</AdditionalOptions>
- <SubSystem>NotSet</SubSystem>
- <BaseAddress>0x1D1A0000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\Modules\_ctypes\libffi_msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalOptions>/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE %(AdditionalOptions)</AdditionalOptions>
- <SubSystem>NotSet</SubSystem>
- <BaseAddress>0x1D1A0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>..\Modules\_ctypes\libffi_msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <AdditionalOptions>/EXPORT:DllGetClassObject,PRIVATE /EXPORT:DllCanUnloadNow,PRIVATE %(AdditionalOptions)</AdditionalOptions>
- <SubSystem>NotSet</SubSystem>
- <BaseAddress>0x1D1A0000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
@@ -257,33 +86,20 @@
<ClCompile Include="..\Modules\_ctypes\libffi_msvc\prep_cif.c" />
<ClCompile Include="..\Modules\_ctypes\stgdict.c" />
<ClCompile Include="..\Modules\_ctypes\libffi_msvc\win32.c">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Platform)'=='x64'">true</ExcludedFromBuild>
</ClCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\Modules\_ctypes\libffi_msvc\win64.asm">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">ml64 /nologo /c /Zi /Fo "$(IntDir)win64.obj" "%(FullPath)"
-</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)win64.obj;%(Outputs)</Outputs>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">true</ExcludedFromBuild>
- <Command Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">ml64 /nologo /c /Fo "$(IntDir)win64.obj" "%(FullPath)"
-</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">$(IntDir)win64.obj;%(Outputs)</Outputs>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">true</ExcludedFromBuild>
- <Command Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">ml64 /nologo /c /Fo "$(IntDir)win64.obj" "%(FullPath)"
-</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">$(IntDir)win64.obj;%(Outputs)</Outputs>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ml64 /nologo /c /Fo "$(IntDir)win64.obj" "%(FullPath)"
-</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)win64.obj;%(Outputs)</Outputs>
+ <ExcludedFromBuild Condition="'$(Platform)'=='Win32'">true</ExcludedFromBuild>
+ <Command>ml64 /nologo /c /Zi /Fo "$(IntDir)win64.obj" "%(FullPath)"</Command>
+ <Outputs>$(IntDir)win64.obj;%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>
+ <ResourceCompile Include="..\PC\python_nt.rc" />
+ </ItemGroup>
+ <ItemGroup>
<ProjectReference Include="pythoncore.vcxproj">
<Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
</ProjectReference>
diff --git a/PCbuild/_ctypes_test.vcxproj b/PCbuild/_ctypes_test.vcxproj
index 35e299b886..b62407fadf 100644
--- a/PCbuild/_ctypes_test.vcxproj
+++ b/PCbuild/_ctypes_test.vcxproj
@@ -38,143 +38,28 @@
<ProjectGuid>{9EC7190A-249F-4180-A900-548FDCF3055F}</ProjectGuid>
<RootNamespace>_ctypes_test</RootNamespace>
<Keyword>Win32Proj</Keyword>
+ <SupportPGO>false</SupportPGO>
</PropertyGroup>
+ <Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <PropertyGroup>
+ <TargetExt>.pyd</TargetExt>
+ </PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- <Import Project="x64.props" />
+ <Import Project="pyproject.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\Modules\_ctypes\_ctypes_test.h" />
</ItemGroup>
@@ -182,6 +67,9 @@
<ClCompile Include="..\Modules\_ctypes\_ctypes_test.c" />
</ItemGroup>
<ItemGroup>
+ <ResourceCompile Include="..\PC\python_nt.rc" />
+ </ItemGroup>
+ <ItemGroup>
<ProjectReference Include="pythoncore.vcxproj">
<Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
</ProjectReference>
diff --git a/PCbuild/_decimal.vcxproj b/PCbuild/_decimal.vcxproj
index 98ba81db23..9c9c19abbe 100644
--- a/PCbuild/_decimal.vcxproj
+++ b/PCbuild/_decimal.vcxproj
@@ -39,208 +39,37 @@
<RootNamespace>_decimal</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
+ <Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <PropertyGroup>
+ <TargetExt>.pyd</TargetExt>
+ </PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- <Import Project="x64.props" />
+ <Import Project="pyproject.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <AdditionalOptions>/D_CRT_SECURE_NO_WARNINGS /DCONFIG_32 /DPPRO /DMASM %(AdditionalOptions)</AdditionalOptions>
- <AdditionalIncludeDirectories>..\Modules\_decimal;..\Modules\_decimal\libmpdec;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <BaseAddress>0x1D1A0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
+ <ItemDefinitionGroup>
<ClCompile>
- <AdditionalOptions>/D_CRT_SECURE_NO_WARNINGS /DCONFIG_64 /DMASM %(AdditionalOptions)</AdditionalOptions>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;MASM;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Platform)' == 'Win32'">CONFIG_32;PPRO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Platform)' == 'x64'">CONFIG_64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\Modules\_decimal;..\Modules\_decimal\libmpdec;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<BaseAddress>0x1D1A0000</BaseAddress>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalOptions>/D_CRT_SECURE_NO_WARNINGS /DCONFIG_32 /DPPRO /DMASM %(AdditionalOptions)</AdditionalOptions>
- <AdditionalIncludeDirectories>..\Modules\_decimal;..\Modules\_decimal\libmpdec;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <SubSystem>NotSet</SubSystem>
- <BaseAddress>0x1D1A0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalOptions>/D_CRT_SECURE_NO_WARNINGS /DCONFIG_64 /DMASM %(AdditionalOptions)</AdditionalOptions>
- <AdditionalIncludeDirectories>..\Modules\_decimal;..\Modules\_decimal\libmpdec;..\Include;..\PC;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <SubSystem>NotSet</SubSystem>
- <BaseAddress>0x1D1A0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
- <ClCompile>
- <AdditionalOptions>/D_CRT_SECURE_NO_WARNINGS /DCONFIG_32 /DPPRO /DMASM %(AdditionalOptions)</AdditionalOptions>
- <AdditionalIncludeDirectories>..\Modules\_decimal;..\Modules\_decimal\libmpdec;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <SubSystem>NotSet</SubSystem>
- <BaseAddress>0x1D1A0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalOptions>/D_CRT_SECURE_NO_WARNINGS /DCONFIG_64 /DMASM %(AdditionalOptions)</AdditionalOptions>
- <AdditionalIncludeDirectories>..\Modules\_decimal;..\Modules\_decimal\libmpdec;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <SubSystem>NotSet</SubSystem>
- <BaseAddress>0x1D1A0000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
- <ClCompile>
- <AdditionalOptions>/D_CRT_SECURE_NO_WARNINGS /DCONFIG_32 /DPPRO /DMASM %(AdditionalOptions)</AdditionalOptions>
- <AdditionalIncludeDirectories>..\Modules\_decimal;..\Modules\_decimal\libmpdec;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <SubSystem>NotSet</SubSystem>
- <BaseAddress>0x1D1A0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalOptions>/D_CRT_SECURE_NO_WARNINGS /DCONFIG_64 /DMASM %(AdditionalOptions)</AdditionalOptions>
- <AdditionalIncludeDirectories>..\Modules\_decimal;..\Modules\_decimal\libmpdec;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <SubSystem>NotSet</SubSystem>
- <BaseAddress>0x1D1A0000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\Modules\_decimal\libmpdec\basearith.h" />
<ClInclude Include="..\Modules\_decimal\libmpdec\bits.h" />
@@ -279,25 +108,15 @@
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\Modules\_decimal\libmpdec\vcdiv64.asm">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">ml64 /nologo /c /Zi /Fo "$(IntDir)vcdiv64.obj" "%(FullPath)"
-</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IntDir)vcdiv64.obj;%(Outputs)</Outputs>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">true</ExcludedFromBuild>
- <Command Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">ml64 /nologo /c /Fo "$(IntDir)vcdiv64.obj" "%(FullPath)"
-</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">$(IntDir)vcdiv64.obj;%(Outputs)</Outputs>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">true</ExcludedFromBuild>
- <Command Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">ml64 /nologo /c /Fo "$(IntDir)vcdiv64.obj" "%(FullPath)"
-</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">$(IntDir)vcdiv64.obj;%(Outputs)</Outputs>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ml64 /nologo /c /Zi /Fo "$(IntDir)vcdiv64.obj" "%(FullPath)"
-</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IntDir)vcdiv64.obj;%(Outputs)</Outputs>
+ <ExcludedFromBuild Condition="'$(Platform)'=='Win32'">true</ExcludedFromBuild>
+ <Command>ml64 /nologo /c /Zi /Fo "$(IntDir)vcdiv64.obj" "%(FullPath)"</Command>
+ <Outputs>$(IntDir)vcdiv64.obj;%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>
+ <ResourceCompile Include="..\PC\python_nt.rc" />
+ </ItemGroup>
+ <ItemGroup>
<ProjectReference Include="pythoncore.vcxproj">
<Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
</ProjectReference>
diff --git a/PCbuild/_elementtree.vcxproj b/PCbuild/_elementtree.vcxproj
index 7802ab30ae..725b5a967b 100644
--- a/PCbuild/_elementtree.vcxproj
+++ b/PCbuild/_elementtree.vcxproj
@@ -39,129 +39,27 @@
<RootNamespace>_elementtree</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
+ <Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <PropertyGroup>
+ <TargetExt>.pyd</TargetExt>
+ </PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- <Import Project="x64.props" />
+ <Import Project="pyproject.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\Modules\expat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <BaseAddress>0x1D100000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
+ <ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..\Modules\expat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -170,71 +68,6 @@
<BaseAddress>0x1D100000</BaseAddress>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\Modules\expat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <BaseAddress>0x1D100000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>..\Modules\expat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <BaseAddress>0x1D100000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\Modules\expat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <BaseAddress>0x1D100000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>..\Modules\expat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <BaseAddress>0x1D100000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\Modules\expat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <BaseAddress>0x1D100000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>..\Modules\expat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;USE_PYEXPAT_CAPI;XML_STATIC;HAVE_MEMMOVE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <BaseAddress>0x1D100000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\Modules\expat\ascii.h" />
<ClInclude Include="..\Modules\expat\asciitab.h" />
@@ -259,6 +92,9 @@
<ClCompile Include="..\Modules\expat\xmltok.c" />
</ItemGroup>
<ItemGroup>
+ <ResourceCompile Include="..\PC\python_nt.rc" />
+ </ItemGroup>
+ <ItemGroup>
<ProjectReference Include="pythoncore.vcxproj">
<Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
diff --git a/PCbuild/_freeze_importlib.vcxproj b/PCbuild/_freeze_importlib.vcxproj
index 55197af8b2..f7714c003a 100644
--- a/PCbuild/_freeze_importlib.vcxproj
+++ b/PCbuild/_freeze_importlib.vcxproj
@@ -9,6 +9,22 @@
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
+ <ProjectConfiguration Include="PGInstrument|Win32">
+ <Configuration>PGInstrument</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGInstrument|x64">
+ <Configuration>PGInstrument</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGUpdate|Win32">
+ <Configuration>PGUpdate</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGUpdate|x64">
+ <Configuration>PGUpdate</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
@@ -22,152 +38,32 @@
<ProjectGuid>{19C0C13F-47CA-4432-AFF3-799A296A4DDC}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>_freeze_importlib</RootNamespace>
+ <SupportPGO>false</SupportPGO>
</PropertyGroup>
+ <Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="debug.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="debug.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="pyproject.props" />
- <Import Project="x64.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <LinkIncremental>true</LinkIncremental>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <LinkIncremental>true</LinkIncremental>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <LinkIncremental>false</LinkIncremental>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <LinkIncremental>false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- </Link>
- <PostBuildEvent>
- <Command>$(TargetPath) ..\Lib\importlib\_bootstrap.py ..\Python\importlib.h</Command>
- </PostBuildEvent>
- <PostBuildEvent>
- <Message>creating importlib.h</Message>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- </Link>
- <PostBuildEvent>
- <Command>$(TargetPath) ..\Lib\importlib\_bootstrap.py ..\Python\importlib.h</Command>
- </PostBuildEvent>
- <PostBuildEvent>
- <Message>creating importlib.h</Message>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- </Link>
- <PostBuildEvent>
- <Command>$(TargetPath) ..\Lib\importlib\_bootstrap.py ..\Python\importlib.h</Command>
- </PostBuildEvent>
- <PostBuildEvent>
- <Message>creating importlib.h</Message>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ItemDefinitionGroup>
<ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
</Link>
- <PostBuildEvent>
- <Command>$(TargetPath) ..\Lib\importlib\_bootstrap.py ..\Python\importlib.h</Command>
- </PostBuildEvent>
- <PostBuildEvent>
- <Message>creating importlib.h</Message>
- </PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
- <ClCompile Include="..\Modules\_freeze_importlib.c" />
+ <ClCompile Include="..\Programs\_freeze_importlib.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="pythoncore.vcxproj">
@@ -185,4 +81,26 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project> \ No newline at end of file
+ <Target Name="RebuildImportLib" AfterTargets="AfterBuild" Condition="$(Configuration) == 'Debug' or $(Configuration) == 'Release'">
+ <Exec Command='"$(TargetPath)" "$(PySourcePath)Lib\importlib\_bootstrap.py" "$(IntDir)importlib.g.h"' />
+
+ <PropertyGroup>
+ <_OldContent Condition="Exists('$(PySourcePath)Python\importlib.h')">$([System.IO.File]::ReadAllText('$(PySourcePath)Python\importlib.h').Replace(`&#x0D;&#x0A;`, `&#x0A;`))</_OldContent>
+ <_NewContent Condition="Exists('$(IntDir)importlib.g.h')">$([System.IO.File]::ReadAllText('$(IntDir)importlib.g.h').Replace(`&#x0D;&#x0A;`, `&#x0A;`))</_NewContent>
+ </PropertyGroup>
+
+ <Copy SourceFiles="$(IntDir)importlib.g.h"
+ DestinationFiles="$(PySourcePath)Python\importlib.h"
+ Condition="Exists('$(IntDir)importlib.g.h') and '$(_OldContent)' != '$(_NewContent)'" />
+
+ <Warning Text="importlib.h has been updated. You will need to rebuild pythoncore to see the changes."
+ Condition="Exists('$(IntDir)importlib.g.h') and '$(_OldContent)' != '$(_NewContent)' and $(Configuration) == 'Debug'" />
+ <Error Text="importlib.h has been updated. You will need to rebuild pythoncore to see the changes."
+ Condition="Exists('$(IntDir)importlib.g.h') and '$(_OldContent)' != '$(_NewContent)' and $(Configuration) == 'Release'" />
+ </Target>
+ <Target Name="_CleanImportLib" BeforeTargets="CoreClean">
+ <ItemGroup>
+ <Clean Include="$(IntDir)importlib.g.h" />
+ </ItemGroup>
+ </Target>
+</Project>
diff --git a/PCbuild/_freeze_importlib.vcxproj.filters b/PCbuild/_freeze_importlib.vcxproj.filters
index 50ec1933f3..ccad053a9f 100644
--- a/PCbuild/_freeze_importlib.vcxproj.filters
+++ b/PCbuild/_freeze_importlib.vcxproj.filters
@@ -15,7 +15,7 @@
</Filter>
</ItemGroup>
<ItemGroup>
- <ClCompile Include="..\Modules\_freeze_importlib.c">
+ <ClCompile Include="..\Programs\_freeze_importlib.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
@@ -24,4 +24,4 @@
<Filter>Source Files</Filter>
</None>
</ItemGroup>
-</Project> \ No newline at end of file
+</Project>
diff --git a/PCbuild/_hashlib.vcxproj b/PCbuild/_hashlib.vcxproj
index 52433ed696..b1300cb8c9 100644
--- a/PCbuild/_hashlib.vcxproj
+++ b/PCbuild/_hashlib.vcxproj
@@ -39,239 +39,50 @@
<RootNamespace>_hashlib</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
+ <Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <PropertyGroup>
+ <TargetExt>.pyd</TargetExt>
+ </PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- <Import Project="x64.props" />
+ <Import Project="pyproject.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>$(opensslDir)\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <PreLinkEvent>
- <Command>
- </Command>
- </PreLinkEvent>
- <Link>
- <AdditionalDependencies>ws2_32.lib;$(opensslDir)\out32\libeay32.lib;$(opensslDir)\out32\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>$(opensslDir)\inc64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <PreLinkEvent>
- <Command>
- </Command>
- </PreLinkEvent>
- <Link>
- <AdditionalDependencies>ws2_32.lib;$(opensslDir)\out64\libeay32.lib;$(opensslDir)\out64\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>$(opensslDir)\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <PreLinkEvent>
- <Command>
- </Command>
- </PreLinkEvent>
- <Link>
- <AdditionalDependencies>ws2_32.lib;$(opensslDir)\out32\libeay32.lib;$(opensslDir)\out32\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>$(opensslDir)\inc64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <PreLinkEvent>
- <Command>
- </Command>
- </PreLinkEvent>
- <Link>
- <AdditionalDependencies>ws2_32.lib;$(opensslDir)\out64\libeay32.lib;$(opensslDir)\out64\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
+ <ItemDefinitionGroup>
<ClCompile>
- <AdditionalIncludeDirectories>$(opensslDir)\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>$(opensslIncludeDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
- <PreLinkEvent>
- <Command>
- </Command>
- </PreLinkEvent>
<Link>
- <AdditionalDependencies>ws2_32.lib;$(opensslDir)\out32\libeay32.lib;$(opensslDir)\out32\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>$(opensslDir)\inc64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <PreLinkEvent>
- <Command>
- </Command>
- </PreLinkEvent>
- <Link>
- <AdditionalDependencies>ws2_32.lib;$(opensslDir)\out64\libeay32.lib;$(opensslDir)\out64\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>$(opensslDir)\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <PreLinkEvent>
- <Command>
- </Command>
- </PreLinkEvent>
- <Link>
- <AdditionalDependencies>ws2_32.lib;$(opensslDir)\out32\libeay32.lib;$(opensslDir)\out32\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>$(opensslDir)\inc64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <PreLinkEvent>
- <Command>
- </Command>
- </PreLinkEvent>
- <Link>
- <AdditionalDependencies>ws2_32.lib;$(opensslDir)\out64\libeay32.lib;$(opensslDir)\out64\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <TargetMachine>MachineX64</TargetMachine>
+ <AdditionalDependencies>ws2_32.lib;$(OutDir)libeay$(PyDebugExt).lib;$(OutDir)ssleay$(PyDebugExt).lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\Modules\_hashopenssl.c" />
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="python.vcxproj">
- <Project>{b11d750f-cd1f-4a96-85ce-e69a5c5259f9}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
+ <ResourceCompile Include="..\PC\python_nt.rc" />
+ </ItemGroup>
+ <ItemGroup>
<ProjectReference Include="pythoncore.vcxproj">
<Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
- <ProjectReference Include="ssl.vcxproj">
+ <ProjectReference Include="ssleay.vcxproj">
+ <Project>{10615b24-73bf-4efa-93aa-236916321317}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="libeay.vcxproj">
<Project>{e5b04cc0-eb4c-42ab-b4dc-18ef95f864b0}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
@@ -279,4 +90,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project> \ No newline at end of file
+</Project>
diff --git a/PCbuild/_lzma.vcxproj b/PCbuild/_lzma.vcxproj
index ac25c804ad..1f0696da82 100644
--- a/PCbuild/_lzma.vcxproj
+++ b/PCbuild/_lzma.vcxproj
@@ -39,206 +39,44 @@
<RootNamespace>lzma</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
+ <Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <PropertyGroup>
+ <TargetExt>.pyd</TargetExt>
+ </PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- <Import Project="x64.props" />
+ <Import Project="pyproject.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ItemDefinitionGroup>
<ClCompile>
- <AdditionalIncludeDirectories>$(lzmaDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>$(lzmaDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LZMA_API_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
- <AdditionalDependencies>$(lzmaDir)\bin_i486\liblzma.a;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>$(lzmaDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LZMA_API_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(lzmaDir)\bin_x86-64\liblzma.a;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>$(lzmaDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LZMA_API_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(lzmaDir)\bin_i486\liblzma.a;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>$(lzmaDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LZMA_API_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(lzmaDir)\bin_x86-64\liblzma.a;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>$(lzmaDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LZMA_API_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(lzmaDir)\bin_i486\liblzma.a;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>$(lzmaDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LZMA_API_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(lzmaDir)\bin_x86-64\liblzma.a;%(AdditionalDependencies)</AdditionalDependencies>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>$(lzmaDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LZMA_API_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(lzmaDir)\bin_i486\liblzma.a;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>$(lzmaDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_FILE_OFFSET_BITS=64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;LZMA_API_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(lzmaDir)\bin_x86-64\liblzma.a;%(AdditionalDependencies)</AdditionalDependencies>
- <TargetMachine>MachineX64</TargetMachine>
+ <AdditionalDependencies Condition="'$(Platform)' == 'Win32'">$(lzmaDir)\bin_i486\liblzma.a;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies Condition="'$(Platform)' == 'x64'">$(lzmaDir)\bin_x86-64\liblzma.a;%(AdditionalDependencies)</AdditionalDependencies>
+ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\Modules\_lzmamodule.c" />
</ItemGroup>
<ItemGroup>
+ <ResourceCompile Include="..\PC\python_nt.rc" />
+ </ItemGroup>
+ <ItemGroup>
<ProjectReference Include="pythoncore.vcxproj">
<Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
diff --git a/PCbuild/_msi.vcxproj b/PCbuild/_msi.vcxproj
index 1323d169df..3895d450f3 100644
--- a/PCbuild/_msi.vcxproj
+++ b/PCbuild/_msi.vcxproj
@@ -39,182 +39,39 @@
<RootNamespace>_msi</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
+ <Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <PropertyGroup>
+ <TargetExt>.pyd</TargetExt>
+ </PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- <Import Project="x64.props" />
+ <Import Project="pyproject.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ItemDefinitionGroup>
<Link>
- <AdditionalDependencies>fci.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>cabinet.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
<BaseAddress>0x1D160000</BaseAddress>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <AdditionalDependencies>fci.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <BaseAddress>0x1D160000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Link>
- <AdditionalDependencies>fci.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <BaseAddress>0x1D160000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <AdditionalDependencies>fci.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <BaseAddress>0x1D160000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
- <Link>
- <AdditionalDependencies>fci.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <BaseAddress>0x1D160000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <AdditionalDependencies>fci.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <BaseAddress>0x1D160000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
- <Link>
- <AdditionalDependencies>fci.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <BaseAddress>0x1D160000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <AdditionalDependencies>fci.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <BaseAddress>0x1D160000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\PC\_msi.c" />
</ItemGroup>
<ItemGroup>
+ <ResourceCompile Include="..\PC\python_nt.rc" />
+ </ItemGroup>
+ <ItemGroup>
<ProjectReference Include="pythoncore.vcxproj">
<Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
diff --git a/PCbuild/_multiprocessing.vcxproj b/PCbuild/_multiprocessing.vcxproj
index b4bb568538..bb2bb4114c 100644
--- a/PCbuild/_multiprocessing.vcxproj
+++ b/PCbuild/_multiprocessing.vcxproj
@@ -39,178 +39,32 @@
<RootNamespace>_multiprocessing</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
+ <Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <PropertyGroup>
+ <TargetExt>.pyd</TargetExt>
+ </PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- <Import Project="x64.props" />
+ <Import Project="pyproject.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ItemDefinitionGroup>
<Link>
<AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<BaseAddress>0x1e1D0000</BaseAddress>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <BaseAddress>0x1e1D0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <BaseAddress>0x1e1D0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <BaseAddress>0x1e1D0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <BaseAddress>0x1e1D0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <BaseAddress>0x1e1D0000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <BaseAddress>0x1e1D0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <BaseAddress>0x1e1D0000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\Modules\_multiprocessing\multiprocessing.h" />
</ItemGroup>
@@ -219,6 +73,9 @@
<ClCompile Include="..\Modules\_multiprocessing\semaphore.c" />
</ItemGroup>
<ItemGroup>
+ <ResourceCompile Include="..\PC\python_nt.rc" />
+ </ItemGroup>
+ <ItemGroup>
<ProjectReference Include="pythoncore.vcxproj">
<Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
diff --git a/PCbuild/_overlapped.vcxproj b/PCbuild/_overlapped.vcxproj
index d0ee72fb5a..8cf8a8677b 100644
--- a/PCbuild/_overlapped.vcxproj
+++ b/PCbuild/_overlapped.vcxproj
@@ -39,190 +39,39 @@
<RootNamespace>_overlapped</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
+ <Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <PropertyGroup>
+ <TargetExt>.pyd</TargetExt>
+ </PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- <Import Project="x64.props" />
+ <Import Project="pyproject.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ItemDefinitionGroup>
<Link>
<AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreSpecificDefaultLibraries>libc;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<BaseAddress>0x1D110000</BaseAddress>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreSpecificDefaultLibraries>libc;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <BaseAddress>0x1D110000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreSpecificDefaultLibraries>libc;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <BaseAddress>0x1D110000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreSpecificDefaultLibraries>libc;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <BaseAddress>0x1D110000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreSpecificDefaultLibraries>libc;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <BaseAddress>0x1D110000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreSpecificDefaultLibraries>libc;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <BaseAddress>0x1D110000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreSpecificDefaultLibraries>libc;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <BaseAddress>0x1D110000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreSpecificDefaultLibraries>libc;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <BaseAddress>0x1D110000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\Modules\overlapped.c" />
</ItemGroup>
<ItemGroup>
+ <ResourceCompile Include="..\PC\python_nt.rc" />
+ </ItemGroup>
+ <ItemGroup>
<ProjectReference Include="pythoncore.vcxproj">
<Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
diff --git a/PCbuild/_socket.vcxproj b/PCbuild/_socket.vcxproj
index 63836e9261..d5c4d1b5b6 100644
--- a/PCbuild/_socket.vcxproj
+++ b/PCbuild/_socket.vcxproj
@@ -39,178 +39,32 @@
<RootNamespace>_socket</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
+ <Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <PropertyGroup>
+ <TargetExt>.pyd</TargetExt>
+ </PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- <Import Project="x64.props" />
+ <Import Project="pyproject.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ItemDefinitionGroup>
<Link>
<AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<BaseAddress>0x1e1D0000</BaseAddress>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <BaseAddress>0x1e1D0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <BaseAddress>0x1e1D0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <BaseAddress>0x1e1D0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <BaseAddress>0x1e1D0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <BaseAddress>0x1e1D0000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <BaseAddress>0x1e1D0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <BaseAddress>0x1e1D0000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\Modules\socketmodule.h" />
</ItemGroup>
@@ -218,6 +72,9 @@
<ClCompile Include="..\Modules\socketmodule.c" />
</ItemGroup>
<ItemGroup>
+ <ResourceCompile Include="..\PC\python_nt.rc" />
+ </ItemGroup>
+ <ItemGroup>
<ProjectReference Include="pythoncore.vcxproj">
<Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
diff --git a/PCbuild/_sqlite3.vcxproj b/PCbuild/_sqlite3.vcxproj
index ed35d5bc0c..5456bb5b23 100644
--- a/PCbuild/_sqlite3.vcxproj
+++ b/PCbuild/_sqlite3.vcxproj
@@ -39,129 +39,27 @@
<RootNamespace>_sqlite3</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
+ <Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <PropertyGroup>
+ <TargetExt>.pyd</TargetExt>
+ </PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- <Import Project="x64.props" />
+ <Import Project="pyproject.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>$(sqlite3Dir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>MODULE_NAME="sqlite3";%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <BaseAddress>0x1e180000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
+ <ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(sqlite3Dir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>MODULE_NAME="sqlite3";%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -170,71 +68,6 @@
<BaseAddress>0x1e180000</BaseAddress>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>$(sqlite3Dir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>MODULE_NAME="sqlite3";%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <BaseAddress>0x1e180000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>$(sqlite3Dir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>MODULE_NAME="sqlite3";%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <BaseAddress>0x1e180000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>$(sqlite3Dir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>MODULE_NAME="sqlite3";%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <BaseAddress>0x1e180000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>$(sqlite3Dir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>MODULE_NAME="sqlite3";%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <BaseAddress>0x1e180000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>$(sqlite3Dir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>MODULE_NAME="sqlite3";%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <BaseAddress>0x1e180000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>$(sqlite3Dir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>MODULE_NAME="sqlite3";%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <BaseAddress>0x1e180000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\Modules\_sqlite\cache.h" />
<ClInclude Include="..\Modules\_sqlite\connection.h" />
@@ -258,6 +91,9 @@
<ClCompile Include="..\Modules\_sqlite\util.c" />
</ItemGroup>
<ItemGroup>
+ <ResourceCompile Include="..\PC\python_nt.rc" />
+ </ItemGroup>
+ <ItemGroup>
<ProjectReference Include="pythoncore.vcxproj">
<Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
diff --git a/PCbuild/_ssl.vcxproj b/PCbuild/_ssl.vcxproj
index 7378794b3d..d75ebd656a 100644
--- a/PCbuild/_ssl.vcxproj
+++ b/PCbuild/_ssl.vcxproj
@@ -39,242 +39,53 @@
<RootNamespace>_ssl</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
+ <Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <PropertyGroup>
+ <TargetExt>.pyd</TargetExt>
+ </PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- <Import Project="x64.props" />
+ <Import Project="pyproject.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>$(opensslDir)\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <PreLinkEvent>
- <Command>
- </Command>
- </PreLinkEvent>
- <Link>
- <AdditionalDependencies>ws2_32.lib;crypt32.lib;$(opensslDir)\out32\libeay32.lib;$(opensslDir)\out32\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>$(opensslDir)\inc64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <PreLinkEvent>
- <Command>
- </Command>
- </PreLinkEvent>
- <Link>
- <AdditionalDependencies>ws2_32.lib;crypt32.lib;$(opensslDir)\out64\libeay32.lib;$(opensslDir)\out64\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>$(opensslDir)\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <PreLinkEvent>
- <Command>
- </Command>
- </PreLinkEvent>
- <Link>
- <AdditionalDependencies>ws2_32.lib;crypt32.lib;$(opensslDir)\out32\libeay32.lib;$(opensslDir)\out32\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>$(opensslDir)\inc64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <PreLinkEvent>
- <Command>
- </Command>
- </PreLinkEvent>
- <Link>
- <AdditionalDependencies>ws2_32.lib;crypt32.lib;$(opensslDir)\out64\libeay32.lib;$(opensslDir)\out64\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
+ <ItemDefinitionGroup>
<ClCompile>
- <AdditionalIncludeDirectories>$(opensslDir)\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>$(opensslIncludeDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
- <PreLinkEvent>
- <Command>
- </Command>
- </PreLinkEvent>
<Link>
- <AdditionalDependencies>ws2_32.lib;crypt32.lib;$(opensslDir)\out32\libeay32.lib;$(opensslDir)\out32\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>$(opensslDir)\inc64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <PreLinkEvent>
- <Command>
- </Command>
- </PreLinkEvent>
- <Link>
- <AdditionalDependencies>ws2_32.lib;crypt32.lib;$(opensslDir)\out64\libeay32.lib;$(opensslDir)\out64\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>$(opensslDir)\inc32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <PreLinkEvent>
- <Command>
- </Command>
- </PreLinkEvent>
- <Link>
- <AdditionalDependencies>ws2_32.lib;crypt32.lib;$(opensslDir)\out32\libeay32.lib;$(opensslDir)\out32\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>$(opensslDir)\inc64;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <PreLinkEvent>
- <Command>
- </Command>
- </PreLinkEvent>
- <Link>
- <AdditionalDependencies>ws2_32.lib;crypt32.lib;$(opensslDir)\out64\libeay32.lib;$(opensslDir)\out64\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <TargetMachine>MachineX64</TargetMachine>
+ <AdditionalDependencies>ws2_32.lib;crypt32.lib;$(OutDir)libeay$(PyDebugExt).lib;$(OutDir)ssleay$(PyDebugExt).lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\Modules\_ssl.c" />
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="python.vcxproj">
- <Project>{b11d750f-cd1f-4a96-85ce-e69a5c5259f9}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
+ <ResourceCompile Include="..\PC\python_nt.rc" />
+ </ItemGroup>
+ <ItemGroup>
<ProjectReference Include="pythoncore.vcxproj">
<Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
- <ProjectReference Include="ssl.vcxproj">
+ <ProjectReference Include="libeay.vcxproj">
<Project>{e5b04cc0-eb4c-42ab-b4dc-18ef95f864b0}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
+ <ProjectReference Include="ssleay.vcxproj">
+ <Project>{10615b24-73bf-4efa-93aa-236916321317}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
<ProjectReference Include="_socket.vcxproj">
<Project>{86937f53-c189-40ef-8ce8-8759d8e7d480}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
@@ -283,4 +94,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project> \ No newline at end of file
+</Project>
diff --git a/PCbuild/_testbuffer.vcxproj b/PCbuild/_testbuffer.vcxproj
index e1265f6841..1f45b29810 100644
--- a/PCbuild/_testbuffer.vcxproj
+++ b/PCbuild/_testbuffer.vcxproj
@@ -38,175 +38,40 @@
<ProjectGuid>{A2697BD3-28C1-4AEC-9106-8B748639FD16}</ProjectGuid>
<RootNamespace>_testbuffer</RootNamespace>
<Keyword>Win32Proj</Keyword>
+ <SupportPGO>false</SupportPGO>
</PropertyGroup>
+ <Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <PropertyGroup>
+ <TargetExt>.pyd</TargetExt>
+ </PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- <Import Project="x64.props" />
+ <Import Project="pyproject.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ItemDefinitionGroup>
<Link>
<BaseAddress>0x1e1F0000</BaseAddress>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <BaseAddress>0x1e1F0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Link>
- <BaseAddress>0x1e1F0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <BaseAddress>0x1e1F0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
- <Link>
- <BaseAddress>0x1e1F0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <BaseAddress>0x1e1F0000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
- <Link>
- <BaseAddress>0x1e1F0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <BaseAddress>0x1e1F0000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\Modules\_testbuffer.c" />
</ItemGroup>
<ItemGroup>
+ <ResourceCompile Include="..\PC\python_nt.rc" />
+ </ItemGroup>
+ <ItemGroup>
<ProjectReference Include="pythoncore.vcxproj">
<Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
</ProjectReference>
diff --git a/PCbuild/_testcapi.vcxproj b/PCbuild/_testcapi.vcxproj
index e99a7e4f3f..365b07c5c5 100644
--- a/PCbuild/_testcapi.vcxproj
+++ b/PCbuild/_testcapi.vcxproj
@@ -38,175 +38,40 @@
<ProjectGuid>{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}</ProjectGuid>
<RootNamespace>_testcapi</RootNamespace>
<Keyword>Win32Proj</Keyword>
+ <SupportPGO>false</SupportPGO>
</PropertyGroup>
+ <Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <PropertyGroup>
+ <TargetExt>.pyd</TargetExt>
+ </PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- <Import Project="x64.props" />
+ <Import Project="pyproject.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ItemDefinitionGroup>
<Link>
<BaseAddress>0x1e1F0000</BaseAddress>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <BaseAddress>0x1e1F0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Link>
- <BaseAddress>0x1e1F0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <BaseAddress>0x1e1F0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
- <Link>
- <BaseAddress>0x1e1F0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <BaseAddress>0x1e1F0000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
- <Link>
- <BaseAddress>0x1e1F0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <BaseAddress>0x1e1F0000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\Modules\_testcapimodule.c" />
</ItemGroup>
<ItemGroup>
+ <ResourceCompile Include="..\PC\python_nt.rc" />
+ </ItemGroup>
+ <ItemGroup>
<ProjectReference Include="pythoncore.vcxproj">
<Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
diff --git a/PCbuild/_testembed.vcxproj b/PCbuild/_testembed.vcxproj
index 83c7ad21e7..14a926e945 100644
--- a/PCbuild/_testembed.vcxproj
+++ b/PCbuild/_testembed.vcxproj
@@ -9,6 +9,22 @@
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
+ <ProjectConfiguration Include="PGInstrument|Win32">
+ <Configuration>PGInstrument</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGInstrument|x64">
+ <Configuration>PGInstrument</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGUpdate|Win32">
+ <Configuration>PGUpdate</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGUpdate|x64">
+ <Configuration>PGUpdate</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
@@ -22,137 +38,40 @@
<ProjectGuid>{6DAC66D9-E703-4624-BE03-49112AB5AA62}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>_testembed</RootNamespace>
+ <SupportPGO>false</SupportPGO>
</PropertyGroup>
+ <Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="debug.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="debug.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="pyproject.props" />
- <Import Project="x64.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <LinkIncremental>false</LinkIncremental>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <LinkIncremental>false</LinkIncremental>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <LinkIncremental>false</LinkIncremental>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <LinkIncremental>false</LinkIncremental>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ItemDefinitionGroup>
<ClCompile>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
- <ClCompile Include="..\Modules\_testembed.c" />
+ <ClCompile Include="..\Programs\_testembed.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="..\PC\python_nt.rc" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="pythoncore.vcxproj">
<Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
- <Private>true</Private>
- <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
- <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
- <LinkLibraryDependencies>true</LinkLibraryDependencies>
- <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
diff --git a/PCbuild/_testembed.vcxproj.filters b/PCbuild/_testembed.vcxproj.filters
index dea54d4ad4..f7f9abeb1d 100644
--- a/PCbuild/_testembed.vcxproj.filters
+++ b/PCbuild/_testembed.vcxproj.filters
@@ -15,7 +15,7 @@
</Filter>
</ItemGroup>
<ItemGroup>
- <ClCompile Include="..\Modules\_testembed.c">
+ <ClCompile Include="..\Programs\_testembed.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
diff --git a/PCbuild/_testimportmultiple.vcxproj b/PCbuild/_testimportmultiple.vcxproj
index 84984ff2f7..37c1a64ac8 100644
--- a/PCbuild/_testimportmultiple.vcxproj
+++ b/PCbuild/_testimportmultiple.vcxproj
@@ -38,175 +38,40 @@
<ProjectGuid>{36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}</ProjectGuid>
<RootNamespace>_testimportmultiple</RootNamespace>
<Keyword>Win32Proj</Keyword>
+ <SupportPGO>false</SupportPGO>
</PropertyGroup>
+ <Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <PropertyGroup>
+ <TargetExt>.pyd</TargetExt>
+ </PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- <Import Project="x64.props" />
+ <Import Project="pyproject.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ItemDefinitionGroup>
<Link>
<BaseAddress>0x1e1F0000</BaseAddress>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <BaseAddress>0x1e1F0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Link>
- <BaseAddress>0x1e1F0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <BaseAddress>0x1e1F0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
- <Link>
- <BaseAddress>0x1e1F0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <BaseAddress>0x1e1F0000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
- <Link>
- <BaseAddress>0x1e1F0000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <BaseAddress>0x1e1F0000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\Modules\_testimportmultiple.c" />
</ItemGroup>
<ItemGroup>
+ <ResourceCompile Include="..\PC\python_nt.rc" />
+ </ItemGroup>
+ <ItemGroup>
<ProjectReference Include="pythoncore.vcxproj">
<Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
diff --git a/PCbuild/_testmultiphase.vcxproj b/PCbuild/_testmultiphase.vcxproj
new file mode 100644
index 0000000000..106927c67b
--- /dev/null
+++ b/PCbuild/_testmultiphase.vcxproj
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGInstrument|Win32">
+ <Configuration>PGInstrument</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGInstrument|x64">
+ <Configuration>PGInstrument</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGUpdate|Win32">
+ <Configuration>PGUpdate</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGUpdate|x64">
+ <Configuration>PGUpdate</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{16BFE6F0-22EF-40B5-B831-7E937119EF10}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>_testmultiphase</RootNamespace>
+ <SupportPGO>false</SupportPGO>
+ </PropertyGroup>
+ <Import Project="python.props" />
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>NotSet</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <PropertyGroup>
+ <TargetExt>.pyd</TargetExt>
+ </PropertyGroup>
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="pyproject.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\Modules\_testmultiphase.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="..\PC\python_nt.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="pythoncore.vcxproj">
+ <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/PCbuild/_testmultiphase.vcxproj.filters b/PCbuild/_testmultiphase.vcxproj.filters
new file mode 100644
index 0000000000..0c25101e1b
--- /dev/null
+++ b/PCbuild/_testmultiphase.vcxproj.filters
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\Modules\_testmultiphase.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/PCbuild/_tkinter.vcxproj b/PCbuild/_tkinter.vcxproj
index 67f72fe38b..67931067d3 100644
--- a/PCbuild/_tkinter.vcxproj
+++ b/PCbuild/_tkinter.vcxproj
@@ -39,211 +39,54 @@
<RootNamespace>_tkinter</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
+ <Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <PropertyGroup>
+ <TargetExt>.pyd</TargetExt>
+ </PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- <Import Project="x64.props" />
+ <Import Project="tcltk.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>$(tcltkDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WITH_APPINIT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(tcltkLibDebug);%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
+ <ItemDefinitionGroup>
<ClCompile>
- <AdditionalIncludeDirectories>$(tcltk64Dir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WITH_APPINIT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(tcltk64LibDebug);%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>$(tcltkDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WITH_APPINIT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(tcltkLib);%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>$(tcltk64Dir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WITH_APPINIT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(tcltk64Lib);%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>$(tcltkDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WITH_APPINIT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(tcltkLib);%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>$(tcltk64Dir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WITH_APPINIT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(tcltk64Lib);%(AdditionalDependencies)</AdditionalDependencies>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>$(tcltkDir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>$(tcltkDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WITH_APPINIT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(BuildForRelease)' != 'true'">Py_TCLTK_DIR="$(tcltkDir.TrimEnd('\').Replace('\', '\\'))";%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>$(tcltkLib);%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>$(tcltk64Dir)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WITH_APPINIT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(tcltk64Lib);%(AdditionalDependencies)</AdditionalDependencies>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\Modules\_tkinter.c" />
<ClCompile Include="..\Modules\tkappinit.c" />
</ItemGroup>
<ItemGroup>
+ <ResourceCompile Include="..\PC\python_nt.rc" />
+ </ItemGroup>
+ <ItemGroup>
<ProjectReference Include="pythoncore.vcxproj">
<Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
+ <ProjectReference Include="tcl.vcxproj">
+ <Project>{b5fd6f1d-129e-4bff-9340-03606fac7283}</Project>
+ </ProjectReference>
+ <ProjectReference Include="tk.vcxproj">
+ <Project>{7e85eccf-a72c-4da4-9e52-884508e80ba1}</Project>
+ </ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
diff --git a/PCbuild/bdist_wininst.vcxproj b/PCbuild/bdist_wininst.vcxproj
deleted file mode 100644
index 49276a2e41..0000000000
--- a/PCbuild/bdist_wininst.vcxproj
+++ /dev/null
@@ -1,158 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}</ProjectGuid>
- <RootNamespace>wininst</RootNamespace>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="release.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="release.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\lib\distutils\command\</OutDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\lib\distutils\command\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(PlatformName)-temp-$(Configuration)\$(ProjectName)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.exe</TargetExt>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.exe</TargetExt>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Midl>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TargetEnvironment>Win32</TargetEnvironment>
- <TypeLibraryName>.\..\lib\distutils\command\wininst.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>MinSpace</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <AdditionalIncludeDirectories>..\PC\bdist_wininst;..\Include;..\Modules\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <WarningLevel>Level3</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0000</Culture>
- <AdditionalIncludeDirectories>..\PC;..\PC\bdist_wininst;..\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>comctl32.lib;imagehlp.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>..\lib\distutils\command\wininst-10.0.exe</OutputFile>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <IgnoreSpecificDefaultLibraries>LIBC;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <ProgramDatabaseFile>..\lib\distutils\command\wininst-10.0.pdb</ProgramDatabaseFile>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TargetEnvironment>X64</TargetEnvironment>
- <TypeLibraryName>.\..\lib\distutils\command\wininst.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>MinSpace</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <AdditionalIncludeDirectories>..\PC\bdist_wininst;..\Include;..\Modules\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <WarningLevel>Level3</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0000</Culture>
- <AdditionalIncludeDirectories>..\PC;..\PC\bdist_wininst;..\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>comctl32.lib;imagehlp.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>..\lib\distutils\command\wininst-10.0-amd64.exe</OutputFile>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <IgnoreSpecificDefaultLibraries>LIBC;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <ProgramDatabaseFile>..\lib\distutils\command\wininst-9.0-amd64.pdb</ProgramDatabaseFile>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\PC\bdist_wininst\extract.c" />
- <ClCompile Include="..\PC\bdist_wininst\install.c" />
- <ClCompile Include="..\Modules\zlib\adler32.c" />
- <ClCompile Include="..\Modules\zlib\crc32.c" />
- <ClCompile Include="..\Modules\zlib\inffast.c" />
- <ClCompile Include="..\Modules\zlib\inflate.c" />
- <ClCompile Include="..\Modules\zlib\inftrees.c" />
- <ClCompile Include="..\Modules\zlib\zutil.c" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\PC\bdist_wininst\archive.h" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\PC\bdist_wininst\install.rc" />
- </ItemGroup>
- <ItemGroup>
- <None Include="..\PC\bdist_wininst\PythonPowered.bmp" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/PCbuild/build.bat b/PCbuild/build.bat
index 0c482f5eb3..88b1f060ab 100644
--- a/PCbuild/build.bat
+++ b/PCbuild/build.bat
@@ -1,113 +1,152 @@
@echo off
-rem A batch program to build or rebuild a particular configuration,
-rem just for convenience.
-
-rem Arguments:
-rem -c Set the configuration (default: Release)
-rem -p Set the platform (x64 or Win32, default: Win32)
-rem -r Target Rebuild instead of Build
-rem -t Set the target manually (Build, Rebuild, or Clean)
-rem -d Set the configuration to Debug
-rem -e Pull in external libraries using get_externals.bat
-rem -m Enable parallel build
-rem -M Disable parallel build (disabled by default)
-rem -v Increased output messages
-rem -k Attempt to kill any running Pythons before building
+goto Run
+:Usage
+echo.%~nx0 [flags and arguments] [quoted MSBuild options]
+echo.
+echo.Build CPython from the command line. Requires the appropriate
+echo.version(s) of Microsoft Visual Studio to be installed (see readme.txt).
+echo.Also requires Subversion (svn.exe) to be on PATH if the '-e' flag is
+echo.given.
+echo.
+echo.After the flags recognized by this script, up to 9 arguments to be passed
+echo.directly to MSBuild may be passed. If the argument contains an '=', the
+echo.entire argument must be quoted (e.g. `%~nx0 "/p:PlatformToolset=v100"`)
+echo.
+echo.Available flags:
+echo. -h Display this help message
+echo. -V Display version information for the current build
+echo. -r Target Rebuild instead of Build
+echo. -d Set the configuration to Debug
+echo. -e Build external libraries fetched by get_externals.bat
+echo. Extension modules that depend on external libraries will not attempt
+echo. to build if this flag is not present
+echo. -m Enable parallel build (enabled by default)
+echo. -M Disable parallel build
+echo. -v Increased output messages
+echo. -k Attempt to kill any running Pythons before building (usually done
+echo. automatically by the pythoncore project)
+echo. --pgo Build with Profile-Guided Optimization. This flag
+echo. overrides -c and -d
+echo. --test-marker Enable the test marker within the build.
+echo.
+echo.Available flags to avoid building certain modules.
+echo.These flags have no effect if '-e' is not given:
+echo. --no-ssl Do not attempt to build _ssl
+echo. --no-tkinter Do not attempt to build Tkinter
+echo.
+echo.Available arguments:
+echo. -c Release ^| Debug ^| PGInstrument ^| PGUpdate
+echo. Set the configuration (default: Release)
+echo. -p x64 ^| Win32
+echo. Set the platform (default: Win32)
+echo. -t Build ^| Rebuild ^| Clean ^| CleanAll
+echo. Set the target manually
+echo. --pgo-job The job to use for PGO training; implies --pgo
+echo. (default: "-m test --pgo")
+exit /b 127
+:Run
setlocal
set platf=Win32
set vs_platf=x86
set conf=Release
set target=Build
set dir=%~dp0
-set parallel=
+set parallel=/m
set verbose=/nologo /v:m
set kill=
-set build_tkinter=
+set do_pgo=
+set pgo_job=-m test --pgo
+set on_64_bit=true
-:CheckOpts
-if '%1'=='-c' (set conf=%2) & shift & shift & goto CheckOpts
-if '%1'=='-p' (set platf=%2) & shift & shift & goto CheckOpts
-if '%1'=='-r' (set target=Rebuild) & shift & goto CheckOpts
-if '%1'=='-t' (set target=%2) & shift & shift & goto CheckOpts
-if '%1'=='-d' (set conf=Debug) & shift & goto CheckOpts
-if '%1'=='-e' call "%dir%get_externals.bat" & (set build_tkinter=true) & shift & goto CheckOpts
-if '%1'=='-m' (set parallel=/m) & shift & goto CheckOpts
-if '%1'=='-M' (set parallel=) & shift & goto CheckOpts
-if '%1'=='-v' (set verbose=/v:n) & shift & goto CheckOpts
-if '%1'=='-k' (set kill=true) & shift & goto CheckOpts
+rem This may not be 100% accurate, but close enough.
+if "%ProgramFiles(x86)%"=="" (set on_64_bit=false)
-if '%conf%'=='Debug' (set dbg_ext=_d) else (set dbg_ext=)
-if '%platf%'=='x64' (
- set vs_platf=x86_amd64
- set builddir=%dir%amd64\
-) else (
- set builddir=%dir%
-)
+:CheckOpts
+if "%~1"=="-h" goto Usage
+if "%~1"=="-c" (set conf=%2) & shift & shift & goto CheckOpts
+if "%~1"=="-p" (set platf=%2) & shift & shift & goto CheckOpts
+if "%~1"=="-r" (set target=Rebuild) & shift & goto CheckOpts
+if "%~1"=="-t" (set target=%2) & shift & shift & goto CheckOpts
+if "%~1"=="-d" (set conf=Debug) & shift & goto CheckOpts
+if "%~1"=="-m" (set parallel=/m) & shift & goto CheckOpts
+if "%~1"=="-M" (set parallel=) & shift & goto CheckOpts
+if "%~1"=="-v" (set verbose=/v:n) & shift & goto CheckOpts
+if "%~1"=="-k" (set kill=true) & shift & goto CheckOpts
+if "%~1"=="--pgo" (set do_pgo=true) & shift & goto CheckOpts
+if "%~1"=="--pgo-job" (set do_pgo=true) & (set pgo_job=%~2) & shift & shift & goto CheckOpts
+if "%~1"=="--test-marker" (set UseTestMarker=true) & shift & goto CheckOpts
+if "%~1"=="-V" shift & goto Version
+rem These use the actual property names used by MSBuild. We could just let
+rem them in through the environment, but we specify them on the command line
+rem anyway for visibility so set defaults after this
+if "%~1"=="-e" (set IncludeExternals=true) & shift & goto CheckOpts
+if "%~1"=="--no-ssl" (set IncludeSSL=false) & shift & goto CheckOpts
+if "%~1"=="--no-tkinter" (set IncludeTkinter=false) & shift & goto CheckOpts
-rem Setup the environment
-call "%dir%env.bat" %vs_platf%
+if "%IncludeExternals%"=="" set IncludeExternals=false
+if "%IncludeSSL%"=="" set IncludeSSL=true
+if "%IncludeTkinter%"=="" set IncludeTkinter=true
-if '%kill%'=='true' (
- msbuild "%dir%kill_python.vcxproj" %verbose% /p:Configuration=%conf% /p:Platform=%platf% && "%builddir%kill_python%dbg_ext%.exe"
-)
+if "%IncludeExternals%"=="true" call "%dir%get_externals.bat"
-set externals_dir=%dir%..\externals
-if '%build_tkinter%'=='true' (
- if '%platf%'=='x64' (
- set tcltkdir=%externals_dir%\tcltk64
- set machine=AMD64
+if "%platf%"=="x64" (
+ if "%on_64_bit%"=="true" (
+ rem This ought to always be correct these days...
+ set vs_platf=amd64
) else (
- set tcltkdir=%externals_dir%\tcltk
- set machine=IX86
+ if "%do_pgo%"=="true" (
+ echo.ERROR: Cannot cross-compile with PGO
+ echo. 32bit operating system detected, if this is incorrect,
+ echo. make sure the ProgramFiles(x86^) environment variable is set
+ exit /b 1
+ )
+ set vs_platf=x86_amd64
)
- if '%conf%'=='Debug' (
- set tcl_dbg_ext=g
- set debug_flag=1
- set options=symbols
- ) else (
- set tcl_dbg_ext=
- set debug_flag=0
- set options=
- )
- set tcldir=%externals_dir%\tcl-8.6.1.0
- set tkdir=%externals_dir%\tk-8.6.1.0
- set tixdir=%externals_dir%\tix-8.4.3.4
)
-if '%build_tkinter%'=='true' (
- if not exist "%tcltkdir%\bin\tcl86t%tcl_dbg_ext%.dll" (
- @rem all and install need to be separate invocations, otherwise nmakehlp is not found on install
- pushd "%tcldir%\win"
- nmake -f makefile.vc MACHINE=%machine% OPTS=%options% INSTALLDIR="%tcltkdir%" clean all
- nmake -f makefile.vc MACHINE=%machine% OPTS=%options% INSTALLDIR="%tcltkdir%" install-binaries install-libraries
- popd
- )
- if not exist "%builddir%tcl86t%tcl_dbg_ext%.dll" (
- xcopy "%tcltkdir%\bin\tcl86t%tcl_dbg_ext%.dll" "%builddir%"
- )
- if not exist "%tcltkdir%\bin\tk86t%tcl_dbg_ext%.dll" (
- pushd "%tkdir%\win"
- nmake -f makefile.vc MACHINE=%machine% OPTS=%options% INSTALLDIR="%tcltkdir%" TCLDIR="%tcldir%" clean
- nmake -f makefile.vc MACHINE=%machine% OPTS=%options% INSTALLDIR="%tcltkdir%" TCLDIR="%tcldir%" all
- nmake -f makefile.vc MACHINE=%machine% OPTS=%options% INSTALLDIR="%tcltkdir%" TCLDIR="%tcldir%" install-binaries install-libraries
- popd
- )
- if not exist "%builddir%tk86t%tcl_dbg_ext%.dll" (
- xcopy "%tcltkdir%\bin\tk86t%tcl_dbg_ext%.dll" "%builddir%"
- )
+rem Setup the environment
+call "%dir%env.bat" %vs_platf% >nul
- if not exist "%tcltkdir%\lib\tix8.4.3\tix84%tcl_dbg_ext%.dll" (
- pushd "%tixdir%\win"
- nmake -f python.mak DEBUG=%debug_flag% MACHINE=%machine% TCL_DIR="%tcldir%" TK_DIR="%tkdir%" INSTALL_DIR="%tcltkdir%" clean
- nmake -f python.mak DEBUG=%debug_flag% MACHINE=%machine% TCL_DIR="%tcldir%" TK_DIR="%tkdir%" INSTALL_DIR="%tcltkdir%" all
- nmake -f python.mak DEBUG=%debug_flag% MACHINE=%machine% TCL_DIR="%tcldir%" TK_DIR="%tkdir%" INSTALL_DIR="%tcltkdir%" install
- popd
- )
+if "%kill%"=="true" call :Kill
+
+if "%do_pgo%"=="true" (
+ set conf=PGInstrument
+ call :Build
+ del /s "%dir%\*.pgc"
+ del /s "%dir%\..\Lib\*.pyc"
+ echo on
+ call "%dir%\..\python.bat" %pgo_job%
+ @echo off
+ call :Kill
+ set conf=PGUpdate
)
+goto Build
+
+:Kill
+echo on
+msbuild "%dir%\pythoncore.vcxproj" /t:KillPython %verbose%^
+ /p:Configuration=%conf% /p:Platform=%platf%^
+ /p:KillPython=true
+@echo off
+goto :eof
+
+:Build
rem Call on MSBuild to do the work, echo the command.
rem Passing %1-9 is not the preferred option, but argument parsing in
rem batch is, shall we say, "lackluster"
echo on
-msbuild "%dir%pcbuild.sln" /t:%target% %parallel% %verbose% /p:Configuration=%conf% /p:Platform=%platf% %1 %2 %3 %4 %5 %6 %7 %8 %9
+msbuild "%dir%pcbuild.proj" /t:%target% %parallel% %verbose%^
+ /p:Configuration=%conf% /p:Platform=%platf%^
+ /p:IncludeExternals=%IncludeExternals%^
+ /p:IncludeSSL=%IncludeSSL% /p:IncludeTkinter=%IncludeTkinter%^
+ /p:UseTestMarker=%UseTestMarker%^
+ %1 %2 %3 %4 %5 %6 %7 %8 %9
+
+@echo off
+goto :eof
+
+:Version
+rem Display the current build version information
+msbuild "%dir%python.props" /t:ShowVersionInfo /v:m /nologo %1 %2 %3 %4 %5 %6 %7 %8 %9
diff --git a/PCbuild/build_pgo.bat b/PCbuild/build_pgo.bat
index d7e4e8bdb7..872c3822ec 100644
--- a/PCbuild/build_pgo.bat
+++ b/PCbuild/build_pgo.bat
@@ -1,41 +1,6 @@
@echo off
-rem A batch program to build PGO (Profile guided optimization) by first
-rem building instrumented binaries, then running the testsuite, and
-rem finally building the optimized code.
-rem Note, after the first instrumented run, one can just keep on
-rem building the PGUpdate configuration while developing.
-
-setlocal
-set platf=Win32
-
-rem use the performance testsuite. This is quick and simple
-set job1=..\tools\pybench\pybench.py -n 1 -C 1 --with-gc
-set path1=..\tools\pybench
-
-rem or the whole testsuite for more thorough testing
-set job2=..\lib\test\regrtest.py
-set path2=..\lib
-
-set job=%job1%
-set clrpath=%path1%
-
-:CheckOpts
-if "%1"=="-p" (set platf=%2) & shift & shift & goto CheckOpts
-if "%1"=="-2" (set job=%job2%) & (set clrpath=%path2%) & shift & goto CheckOpts
-
-set PGI=%platf%-pgi
-set PGO=%platf%-pgo
-
-@echo on
-rem build the instrumented version
-call build -p %platf% -c PGInstrument
-
-rem remove .pyc files, .pgc files and execute the job
-%PGI%\python.exe rmpyc.py %clrpath%
-del %PGI%\*.pgc
-%PGI%\python.exe %job%
-
-rem finally build the optimized version
-if exist %PGO% del /s /q %PGO%
-call build -p %platf% -c PGUpdate
+echo.DeprecationWarning:
+echo. This script is deprecated, use `build.bat --pgo` instead.
+echo.
+call "%~dp0build.bat" --pgo %*
diff --git a/PCbuild/build_ssl.bat b/PCbuild/build_ssl.bat
deleted file mode 100644
index 2975b8d7e2..0000000000
--- a/PCbuild/build_ssl.bat
+++ /dev/null
@@ -1,12 +0,0 @@
-@echo off
-if not defined HOST_PYTHON (
- if %1 EQU Debug (
- set HOST_PYTHON=python_d.exe
- if not exist python34_d.dll exit 1
- ) ELSE (
- set HOST_PYTHON=python.exe
- if not exist python34.dll exit 1
- )
-)
-%HOST_PYTHON% build_ssl.py %1 %2 %3
-
diff --git a/PCbuild/build_ssl.py b/PCbuild/build_ssl.py
deleted file mode 100644
index 7aee715d7e..0000000000
--- a/PCbuild/build_ssl.py
+++ /dev/null
@@ -1,269 +0,0 @@
-# Script for building the _ssl and _hashlib modules for Windows.
-# Uses Perl to setup the OpenSSL environment correctly
-# and build OpenSSL, then invokes a simple nmake session
-# for the actual _ssl.pyd and _hashlib.pyd DLLs.
-
-# THEORETICALLY, you can:
-# * Unpack the latest SSL release one level above your main Python source
-# directory. It is likely you will already find the zlib library and
-# any other external packages there.
-# * Install ActivePerl and ensure it is somewhere on your path.
-# * Run this script from the PCBuild directory.
-#
-# it should configure and build SSL, then build the _ssl and _hashlib
-# Python extensions without intervention.
-
-# Modified by Christian Heimes
-# Now this script supports pre-generated makefiles and assembly files.
-# Developers don't need an installation of Perl anymore to build Python. A svn
-# checkout from our svn repository is enough.
-#
-# In Order to create the files in the case of an update you still need Perl.
-# Run build_ssl in this order:
-# python.exe build_ssl.py Release x64
-# python.exe build_ssl.py Release Win32
-
-import os, sys, re, shutil
-import subprocess
-
-# Find all "foo.exe" files on the PATH.
-def find_all_on_path(filename, extras = None):
- entries = os.environ["PATH"].split(os.pathsep)
- ret = []
- for p in entries:
- fname = os.path.abspath(os.path.join(p, filename))
- if os.path.isfile(fname) and fname not in ret:
- ret.append(fname)
- if extras:
- for p in extras:
- fname = os.path.abspath(os.path.join(p, filename))
- if os.path.isfile(fname) and fname not in ret:
- ret.append(fname)
- return ret
-
-# Find a suitable Perl installation for OpenSSL.
-# cygwin perl does *not* work. ActivePerl does.
-# Being a Perl dummy, the simplest way I can check is if the "Win32" package
-# is available.
-def find_working_perl(perls):
- for perl in perls:
- try:
- subprocess.check_output([perl, "-e", "use Win32;"])
- except subprocess.CalledProcessError:
- continue
- else:
- return perl
-
- if perls:
- print("The following perl interpreters were found:")
- for p in perls:
- print(" ", p)
- print(" None of these versions appear suitable for building OpenSSL")
- else:
- print("NO perl interpreters were found on this machine at all!")
- print(" Please install ActivePerl and ensure it appears on your path")
-
-# Fetch SSL directory from VC properties
-def get_ssl_dir():
- propfile = (os.path.join(os.path.dirname(__file__), 'pyproject.props'))
- with open(propfile, encoding='utf-8-sig') as f:
- m = re.search('openssl-([^<]+)<', f.read())
- return "..\externals\openssl-"+m.group(1)
-
-
-def create_makefile64(makefile, m32):
- """Create and fix makefile for 64bit
-
- Replace 32 with 64bit directories
- """
- if not os.path.isfile(m32):
- return
- with open(m32) as fin:
- with open(makefile, 'w') as fout:
- for line in fin:
- line = line.replace("=tmp32", "=tmp64")
- line = line.replace("=out32", "=out64")
- line = line.replace("=inc32", "=inc64")
- # force 64 bit machine
- line = line.replace("MKLIB=lib", "MKLIB=lib /MACHINE:X64")
- line = line.replace("LFLAGS=", "LFLAGS=/MACHINE:X64 ")
- # don't link against the lib on 64bit systems
- line = line.replace("bufferoverflowu.lib", "")
- fout.write(line)
- os.unlink(m32)
-
-def fix_makefile(makefile):
- """Fix some stuff in all makefiles
- """
- if not os.path.isfile(makefile):
- return
- with open(makefile) as fin:
- lines = fin.readlines()
- with open(makefile, 'w') as fout:
- for line in lines:
- if line.startswith("PERL="):
- continue
- if line.startswith("CP="):
- line = "CP=copy\n"
- if line.startswith("MKDIR="):
- line = "MKDIR=mkdir\n"
- if line.startswith("CFLAG="):
- line = line.strip()
- for algo in ("RC5", "MDC2", "IDEA"):
- noalgo = " -DOPENSSL_NO_%s" % algo
- if noalgo not in line:
- line = line + noalgo
- line = line + '\n'
- fout.write(line)
-
-def run_configure(configure, do_script):
- print("perl Configure "+configure+" no-idea no-mdc2")
- os.system("perl Configure "+configure+" no-idea no-mdc2")
- print(do_script)
- os.system(do_script)
-
-def cmp(f1, f2):
- bufsize = 1024 * 8
- with open(f1, 'rb') as fp1, open(f2, 'rb') as fp2:
- while True:
- b1 = fp1.read(bufsize)
- b2 = fp2.read(bufsize)
- if b1 != b2:
- return False
- if not b1:
- return True
-
-def copy(src, dst):
- if os.path.isfile(dst) and cmp(src, dst):
- return
- shutil.copy(src, dst)
-
-def main():
- build_all = "-a" in sys.argv
- if sys.argv[1] == "Release":
- debug = False
- elif sys.argv[1] == "Debug":
- debug = True
- else:
- raise ValueError(str(sys.argv))
-
- if sys.argv[2] == "Win32":
- arch = "x86"
- configure = "VC-WIN32"
- do_script = "ms\\do_nasm"
- makefile="ms\\nt.mak"
- m32 = makefile
- dirsuffix = "32"
- elif sys.argv[2] == "x64":
- arch="amd64"
- configure = "VC-WIN64A"
- do_script = "ms\\do_win64a"
- makefile = "ms\\nt64.mak"
- m32 = makefile.replace('64', '')
- dirsuffix = "64"
- #os.environ["VSEXTCOMP_USECL"] = "MS_OPTERON"
- else:
- raise ValueError(str(sys.argv))
-
- make_flags = ""
- if build_all:
- make_flags = "-a"
- # perl should be on the path, but we also look in "\perl" and "c:\\perl"
- # as "well known" locations
- perls = find_all_on_path("perl.exe", [r"\perl\bin",
- r"C:\perl\bin",
- r"\perl64\bin",
- r"C:\perl64\bin",
- ])
- perl = find_working_perl(perls)
- if perl:
- print("Found a working perl at '%s'" % (perl,))
- else:
- print("No Perl installation was found. Existing Makefiles are used.")
- sys.stdout.flush()
- # Look for SSL 2 levels up from pcbuild - ie, same place zlib etc all live.
- ssl_dir = get_ssl_dir()
- if ssl_dir is None:
- sys.exit(1)
-
- # add our copy of NASM to PATH. It will be on the same level as openssl
- for dir in os.listdir(os.path.join(ssl_dir, os.pardir)):
- if dir.startswith('nasm'):
- nasm_dir = os.path.join(ssl_dir, os.pardir, dir)
- nasm_dir = os.path.abspath(nasm_dir)
- old_path = os.environ['PATH']
- os.environ['PATH'] = os.pathsep.join([nasm_dir, old_path])
- break
- else:
- print('NASM was not found, make sure it is on PATH')
-
-
- old_cd = os.getcwd()
- try:
- os.chdir(ssl_dir)
- # rebuild makefile when we do the role over from 32 to 64 build
- if arch == "amd64" and os.path.isfile(m32) and not os.path.isfile(makefile):
- os.unlink(m32)
-
- # If the ssl makefiles do not exist, we invoke Perl to generate them.
- # Due to a bug in this script, the makefile sometimes ended up empty
- # Force a regeneration if it is.
- if not os.path.isfile(makefile) or os.path.getsize(makefile)==0:
- if perl is None:
- print("Perl is required to build the makefiles!")
- sys.exit(1)
-
- print("Creating the makefiles...")
- sys.stdout.flush()
- # Put our working Perl at the front of our path
- os.environ["PATH"] = os.path.dirname(perl) + \
- os.pathsep + \
- os.environ["PATH"]
- run_configure(configure, do_script)
- if debug:
- print("OpenSSL debug builds aren't supported.")
- #if arch=="x86" and debug:
- # # the do_masm script in openssl doesn't generate a debug
- # # build makefile so we generate it here:
- # os.system("perl util\mk1mf.pl debug "+configure+" >"+makefile)
-
- if arch == "amd64":
- create_makefile64(makefile, m32)
- fix_makefile(makefile)
- copy(r"crypto\buildinf.h", r"crypto\buildinf_%s.h" % arch)
- copy(r"crypto\opensslconf.h", r"crypto\opensslconf_%s.h" % arch)
-
- # If the assembler files don't exist in tmpXX, copy them there
- if perl is None and os.path.exists("asm"+dirsuffix):
- if not os.path.exists("tmp"+dirsuffix):
- os.mkdir("tmp"+dirsuffix)
- for f in os.listdir("asm"+dirsuffix):
- if not f.endswith(".asm"): continue
- if os.path.isfile(r"tmp%s\%s" % (dirsuffix, f)): continue
- shutil.copy(r"asm%s\%s" % (dirsuffix, f), "tmp"+dirsuffix)
-
- # Now run make.
- if arch == "amd64":
- rc = os.system("nasm -f win64 -DNEAR -Ox -g ms\\uptable.asm")
- if rc:
- print("nasm assembler has failed.")
- sys.exit(rc)
-
- copy(r"crypto\buildinf_%s.h" % arch, r"crypto\buildinf.h")
- copy(r"crypto\opensslconf_%s.h" % arch, r"crypto\opensslconf.h")
-
- #makeCommand = "nmake /nologo PERL=\"%s\" -f \"%s\"" %(perl, makefile)
- makeCommand = "nmake /nologo -f \"%s\"" % makefile
- print("Executing ssl makefiles:", makeCommand)
- sys.stdout.flush()
- rc = os.system(makeCommand)
- if rc:
- print("Executing "+makefile+" failed")
- print(rc)
- sys.exit(rc)
- finally:
- os.chdir(old_cd)
- sys.exit(rc)
-
-if __name__=='__main__':
- main()
diff --git a/PCbuild/build_tkinter.py b/PCbuild/build_tkinter.py
deleted file mode 100644
index c807e7b19c..0000000000
--- a/PCbuild/build_tkinter.py
+++ /dev/null
@@ -1,78 +0,0 @@
-"""Script to compile the dependencies of _tkinter
-
-Copyright (c) 2007 by Christian Heimes <christian@cheimes.de>
-
-Licensed to PSF under a Contributor Agreement.
-"""
-
-import os
-import sys
-
-here = os.path.abspath(os.path.dirname(__file__))
-par = os.path.pardir
-
-TCL = "tcl8.6.1"
-TK = "tk8.6.1"
-TIX = "tix-8.4.3.3"
-
-ROOT = os.path.abspath(os.path.join(here, par, par))
-NMAKE = ('nmake /nologo /f %s %s %s')
-
-def nmake(makefile, command="", **kw):
- defines = ' '.join(k+'='+str(v) for k, v in kw.items())
- cmd = NMAKE % (makefile, defines, command)
- print("\n\n"+cmd+"\n")
- if os.system(cmd) != 0:
- raise RuntimeError(cmd)
-
-def build(platform, clean):
- if platform == "Win32":
- dest = os.path.join(ROOT, "tcltk")
- machine = "IX86"
- elif platform == "AMD64":
- dest = os.path.join(ROOT, "tcltk64")
- machine = "AMD64"
- else:
- raise ValueError(platform)
-
- # TCL
- tcldir = os.path.join(ROOT, TCL)
- if 1:
- os.chdir(os.path.join(tcldir, "win"))
- if clean:
- nmake("makefile.vc", "clean")
- nmake("makefile.vc", MACHINE=machine)
- nmake("makefile.vc", "install", INSTALLDIR=dest, MACHINE=machine)
-
- # TK
- if 1:
- os.chdir(os.path.join(ROOT, TK, "win"))
- if clean:
- nmake("makefile.vc", "clean", DEBUG=0, TCLDIR=tcldir)
- nmake("makefile.vc", DEBUG=0, MACHINE=machine, TCLDIR=tcldir)
- nmake("makefile.vc", "install", DEBUG=0, INSTALLDIR=dest, MACHINE=machine, TCLDIR=tcldir)
-
- # TIX
- if 1:
- # python9.mak is available at http://svn.python.org
- os.chdir(os.path.join(ROOT, TIX, "win"))
- if clean:
- nmake("python.mak", "clean")
- nmake("python.mak", MACHINE=machine, INSTALL_DIR=dest)
- nmake("python.mak", "install", MACHINE=machine, INSTALL_DIR=dest)
-
-def main():
- if len(sys.argv) < 2 or sys.argv[1] not in ("Win32", "AMD64"):
- print("%s Win32|AMD64" % sys.argv[0])
- sys.exit(1)
-
- if "-c" in sys.argv:
- clean = True
- else:
- clean = False
-
- build(sys.argv[1], clean)
-
-
-if __name__ == '__main__':
- main()
diff --git a/PCbuild/clean.bat b/PCbuild/clean.bat
new file mode 100644
index 0000000000..78517d225f
--- /dev/null
+++ b/PCbuild/clean.bat
@@ -0,0 +1,5 @@
+@echo off
+rem A batch program to clean a particular configuration,
+rem just for convenience.
+
+call %~dp0build.bat -t Clean %*
diff --git a/PCbuild/debug.props b/PCbuild/debug.props
deleted file mode 100644
index 9b7a65af4d..0000000000
--- a/PCbuild/debug.props
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup Label="UserMacros">
- <PyDebugExt>_d</PyDebugExt>
- <KillPythonExe>$(OutDir)kill_python_d.exe</KillPythonExe>
- </PropertyGroup>
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <TargetName>$(ProjectName)_d</TargetName>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <ClCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG</PreprocessorDefinitions>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemGroup>
- <BuildMacro Include="PyDebugExt">
- <Value>$(PyDebugExt)</Value>
- </BuildMacro>
- <BuildMacro Include="KillPythonExe">
- <Value>$(KillPythonExe)</Value>
- </BuildMacro>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/PCbuild/env.bat b/PCbuild/env.bat
index 0170bcedf4..2b2c0051ce 100644
--- a/PCbuild/env.bat
+++ b/PCbuild/env.bat
@@ -1,4 +1,16 @@
@echo off
-echo Build environments: x86, ia64, amd64, x86_amd64, x86_ia64
+rem This script adds the latest available tools to the path for the current
+rem command window. However, most builds of Python will ignore the version
+rem of the tools on PATH and use PlatformToolset instead. Ideally, both sets of
+rem tools should be the same version to avoid potential conflicts.
+rem
+rem To build Python with an earlier toolset, pass "/p:PlatformToolset=v100" (or
+rem 'v110', 'v120' or 'v140') to the build script.
+
+echo Build environments: x86, amd64, x86_amd64
echo.
-call "%VS100COMNTOOLS%..\..\VC\vcvarsall.bat" %*
+set VSTOOLS=%VS140COMNTOOLS%
+if "%VSTOOLS%"=="" set VSTOOLS=%VS120COMNTOOLS%
+if "%VSTOOLS%"=="" set VSTOOLS=%VS110COMNTOOLS%
+if "%VSTOOLS%"=="" set VSTOOLS=%VS100COMNTOOLS%
+call "%VSTOOLS%..\..\VC\vcvarsall.bat" %*
diff --git a/PCbuild/get_externals.bat b/PCbuild/get_externals.bat
index 0b8f0b85f9..63ba282d8b 100644
--- a/PCbuild/get_externals.bat
+++ b/PCbuild/get_externals.bat
@@ -51,16 +51,17 @@ if ERRORLEVEL 9009 (
echo.Fetching external libraries...
-for %%e in (
- bzip2-1.0.6
- nasm-2.11.06
- openssl-1.0.2d
- tcl-8.6.1.0
- tk-8.6.1.0
- tix-8.4.3.4
- sqlite-3.8.11.0
- xz-5.0.5
- ) do (
+set libraries=
+set libraries=%libraries% bzip2-1.0.6
+if NOT "%IncludeSSL%"=="false" set libraries=%libraries% nasm-2.11.06
+if NOT "%IncludeSSL%"=="false" set libraries=%libraries% openssl-1.0.2g
+set libraries=%libraries% sqlite-3.8.11.0
+if NOT "%IncludeTkinter%"=="false" set libraries=%libraries% tcl-core-8.6.4.2
+if NOT "%IncludeTkinter%"=="false" set libraries=%libraries% tk-8.6.4.2
+if NOT "%IncludeTkinter%"=="false" set libraries=%libraries% tix-8.4.3.6
+set libraries=%libraries% xz-5.0.5
+
+for %%e in (%libraries%) do (
if exist %%e (
echo.%%e already exists, skipping.
) else (
diff --git a/PCbuild/idle.bat b/PCbuild/idle.bat
index 5ab15f5164..bacaaa8414 100644
--- a/PCbuild/idle.bat
+++ b/PCbuild/idle.bat
@@ -4,10 +4,10 @@ rem Usage: idle [-d]
rem -d Run Debug build (python_d.exe). Else release build.
setlocal
-set exe=python
-PATH %PATH%;..\..\tcltk\bin
+set exe=win32\python
+PATH %PATH%;..\externals\tcltk\bin
-if "%1"=="-d" (set exe=python_d) & shift
+if "%1"=="-d" (set exe=%exe%_d) & shift
set cmd=%exe% ../Lib/idlelib/idle.py %1 %2 %3 %4 %5 %6 %7 %8 %9
diff --git a/PCbuild/installer.bmp b/PCbuild/installer.bmp
deleted file mode 100644
index 1875e194ba..0000000000
--- a/PCbuild/installer.bmp
+++ /dev/null
Binary files differ
diff --git a/PCbuild/kill_python.c b/PCbuild/kill_python.c
deleted file mode 100644
index 666e1b0297..0000000000
--- a/PCbuild/kill_python.c
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Helper program for killing lingering python[_d].exe processes before
- * building, thus attempting to avoid build failures due to files being
- * locked.
- */
-
-#include <windows.h>
-#include <wchar.h>
-#include <tlhelp32.h>
-#include <stdio.h>
-
-#pragma comment(lib, "psapi")
-
-#ifdef _DEBUG
-#define PYTHON_EXE (L"python_d.exe")
-#define PYTHON_EXE_LEN (12)
-#define KILL_PYTHON_EXE (L"kill_python_d.exe")
-#define KILL_PYTHON_EXE_LEN (17)
-#else
-#define PYTHON_EXE (L"python.exe")
-#define PYTHON_EXE_LEN (10)
-#define KILL_PYTHON_EXE (L"kill_python.exe")
-#define KILL_PYTHON_EXE_LEN (15)
-#endif
-
-int
-main(int argc, char **argv)
-{
- HANDLE hp, hsp, hsm; /* process, snapshot processes, snapshot modules */
- DWORD dac, our_pid;
- size_t len;
- wchar_t path[MAX_PATH+1];
-
- MODULEENTRY32W me;
- PROCESSENTRY32W pe;
-
- me.dwSize = sizeof(MODULEENTRY32W);
- pe.dwSize = sizeof(PROCESSENTRY32W);
-
- memset(path, 0, MAX_PATH+1);
-
- our_pid = GetCurrentProcessId();
-
- hsm = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, our_pid);
- if (hsm == INVALID_HANDLE_VALUE) {
- printf("CreateToolhelp32Snapshot[1] failed: %d\n", GetLastError());
- return 1;
- }
-
- if (!Module32FirstW(hsm, &me)) {
- printf("Module32FirstW[1] failed: %d\n", GetLastError());
- CloseHandle(hsm);
- return 1;
- }
-
- /*
- * Enumerate over the modules for the current process in order to find
- * kill_process[_d].exe, then take a note of the directory it lives in.
- */
- do {
- if (_wcsnicmp(me.szModule, KILL_PYTHON_EXE, KILL_PYTHON_EXE_LEN))
- continue;
-
- len = wcsnlen_s(me.szExePath, MAX_PATH) - KILL_PYTHON_EXE_LEN;
- wcsncpy_s(path, MAX_PATH+1, me.szExePath, len);
-
- break;
-
- } while (Module32NextW(hsm, &me));
-
- CloseHandle(hsm);
-
- if (path == NULL) {
- printf("failed to discern directory of running process\n");
- return 1;
- }
-
- /*
- * Take a snapshot of system processes. Enumerate over the snapshot,
- * looking for python processes. When we find one, verify it lives
- * in the same directory we live in. If it does, kill it. If we're
- * unable to kill it, treat this as a fatal error and return 1.
- *
- * The rationale behind this is that we're called at the start of the
- * build process on the basis that we'll take care of killing any
- * running instances, such that the build won't encounter permission
- * denied errors during linking. If we can't kill one of the processes,
- * we can't provide this assurance, and the build shouldn't start.
- */
-
- hsp = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
- if (hsp == INVALID_HANDLE_VALUE) {
- printf("CreateToolhelp32Snapshot[2] failed: %d\n", GetLastError());
- return 1;
- }
-
- if (!Process32FirstW(hsp, &pe)) {
- printf("Process32FirstW failed: %d\n", GetLastError());
- CloseHandle(hsp);
- return 1;
- }
-
- dac = PROCESS_QUERY_INFORMATION | PROCESS_VM_READ | PROCESS_TERMINATE;
- do {
-
- /*
- * XXX TODO: if we really wanted to be fancy, we could check the
- * modules for all processes (not just the python[_d].exe ones)
- * and see if any of our DLLs are loaded (i.e. python34[_d].dll),
- * as that would also inhibit our ability to rebuild the solution.
- * Not worth losing sleep over though; for now, a simple check
- * for just the python executable should be sufficient.
- */
-
- if (_wcsnicmp(pe.szExeFile, PYTHON_EXE, PYTHON_EXE_LEN))
- /* This isn't a python process. */
- continue;
-
- /* It's a python process, so figure out which directory it's in... */
- hsm = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, pe.th32ProcessID);
- if (hsm == INVALID_HANDLE_VALUE)
- /*
- * If our module snapshot fails (which will happen if we don't own
- * the process), just ignore it and continue. (It seems different
- * versions of Windows return different values for GetLastError()
- * in this situation; it's easier to just ignore it and move on vs.
- * stopping the build for what could be a false positive.)
- */
- continue;
-
- if (!Module32FirstW(hsm, &me)) {
- printf("Module32FirstW[2] failed: %d\n", GetLastError());
- CloseHandle(hsp);
- CloseHandle(hsm);
- return 1;
- }
-
- do {
- if (_wcsnicmp(me.szModule, PYTHON_EXE, PYTHON_EXE_LEN))
- /* Wrong module, we're looking for python[_d].exe... */
- continue;
-
- if (_wcsnicmp(path, me.szExePath, len))
- /* Process doesn't live in our directory. */
- break;
-
- /* Python process residing in the right directory, kill it! */
- hp = OpenProcess(dac, FALSE, pe.th32ProcessID);
- if (!hp) {
- printf("OpenProcess failed: %d\n", GetLastError());
- CloseHandle(hsp);
- CloseHandle(hsm);
- return 1;
- }
-
- if (!TerminateProcess(hp, 1)) {
- printf("TerminateProcess failed: %d\n", GetLastError());
- CloseHandle(hsp);
- CloseHandle(hsm);
- CloseHandle(hp);
- return 1;
- }
-
- CloseHandle(hp);
- break;
-
- } while (Module32NextW(hsm, &me));
-
- CloseHandle(hsm);
-
- } while (Process32NextW(hsp, &pe));
-
- CloseHandle(hsp);
-
- return 0;
-}
-
-/* vi: set ts=8 sw=4 sts=4 expandtab */
diff --git a/PCbuild/kill_python.vcxproj b/PCbuild/kill_python.vcxproj
deleted file mode 100644
index 9f67c4081f..0000000000
--- a/PCbuild/kill_python.vcxproj
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{6DE10744-E396-40A5-B4E2-1B69AA7C8D31}</ProjectGuid>
- <RootNamespace>kill_python</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="release.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="debug.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="release.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="debug.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Link>
- <OutputFile>$(OutDir)$(ProjectName)_d.exe</OutputFile>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <OutputFile>$(OutDir)$(ProjectName)_d.exe</OutputFile>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Link>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="kill_python.c" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/PCbuild/kill_python.vcxproj.filters b/PCbuild/kill_python.vcxproj.filters
deleted file mode 100644
index 433d751596..0000000000
--- a/PCbuild/kill_python.vcxproj.filters
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{48606591-c8b6-41a5-95c5-9a0890c5504f}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="kill_python.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/PCbuild/libeay.vcxproj b/PCbuild/libeay.vcxproj
new file mode 100644
index 0000000000..9662cd4b71
--- /dev/null
+++ b/PCbuild/libeay.vcxproj
@@ -0,0 +1,907 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGInstrument|Win32">
+ <Configuration>PGInstrument</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGInstrument|x64">
+ <Configuration>PGInstrument</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGUpdate|Win32">
+ <Configuration>PGUpdate</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGUpdate|x64">
+ <Configuration>PGUpdate</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}</ProjectGuid>
+ <RootNamespace>libeay</RootNamespace>
+ </PropertyGroup>
+
+ <Import Project="python.props" />
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ </PropertyGroup>
+
+ <Import Project="openssl.props" />
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+
+ <Target Name="CreateBuildinfH" Inputs="$(MSBuildProjectFullPath)" Outputs="$(IntDir)\buildinf.h" AfterTargets="PrepareForBuild">
+ <PropertyGroup>
+ <_DATEValue>#define DATE "$([System.DateTime]::Now.ToString(`ddd MMM dd HH':'mm':'ss yyyy`))"</_DATEValue>
+ <_CFLAGSValue>#define CFLAGS "cl /MD /Ox -W3 -Gs0 -Gy -nologo @(PreprocessorDefinitions->'-D%(Identity)',' ')"</_CFLAGSValue>
+ <_PLATFORMValue Condition="$(Platform)=='Win32'">#define PLATFORM "VC-WIN32"</_PLATFORMValue>
+ <_PLATFORMValue Condition="$(Platform)=='x64'">#define PLATFORM "VC-WIN64A"</_PLATFORMValue>
+ </PropertyGroup>
+ <WriteLinesToFile File="$(IntDir)\buildinf.h"
+ Lines="$(_DATEValue);$(_CFLAGSValue);$(_PLATFORMValue)"
+ Overwrite="true" />
+ <Message Text="Updating buildinf.h:
+ $(_DATEValue)
+ $(_CFLAGSValue)
+ $(_PLATFORMValue)" Importance="normal" />
+ </Target>
+
+ <Target Name="SuppressOriginalBuildinfH" Condition="Exists('$(opensslDir)crypto\buildinf.h')" BeforeTargets="PrepareForBuild">
+ <Move SourceFiles="$(opensslDir)crypto\buildinf.h" DestinationFiles="$(opensslDir)crypto\buildinf.h.orig" />
+ </Target>
+
+ <ItemGroup>
+ <ClCompile Include="$(opensslDir)crypto\cversion.c">
+ <AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemGroup>
+
+ <ItemGroup>
+ <!--
+ <ClCompile Include="$(opensslDir)apps\errstr.c" />
+ <ClCompile Include="$(opensslDir)crypto\aes\aes_cfb.c" />
+ <ClCompile Include="$(opensslDir)crypto\aes\aes_ctr.c" />
+ <ClCompile Include="$(opensslDir)crypto\aes\aes_ecb.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\aes\aes_ige.c" />
+ <ClCompile Include="$(opensslDir)crypto\aes\aes_misc.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\aes\aes_ofb.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\aes\aes_wrap.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_bitstr.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_bool.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_bytes.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_d2i_fp.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_digest.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_dup.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_enum.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_gentm.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_i2d_fp.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_int.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_mbstr.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_object.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_octet.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_print.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_set.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_sign.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_strex.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_strnid.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_time.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_type.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_utctm.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_utf8.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\a_verify.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\ameth_lib.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\asn_mime.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\asn_moid.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\asn_pack.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\asn1_err.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\asn1_gen.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\asn1_lib.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\asn1_par.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\bio_asn1.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\bio_ndef.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\d2i_pr.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\asn1\d2i_pu.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\asn1\evp_asn1.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\asn1\f_enum.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\asn1\f_int.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\f_string.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\i2d_pr.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\asn1\i2d_pu.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\asn1\n_pkey.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\nsseq.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\p5_pbe.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\p5_pbev2.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\p8_pkey.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\asn1\t_bitst.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\t_crl.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\asn1\t_pkey.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\asn1\t_req.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\t_spki.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\asn1\t_x509.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\t_x509a.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\tasn_dec.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\tasn_enc.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\tasn_fre.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\tasn_new.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\tasn_prn.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\tasn_typ.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\tasn_utl.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_algor.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_attrib.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_bignum.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_crl.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_exten.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_info.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_long.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_name.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_nx509.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_pkey.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_pubkey.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_req.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_sig.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_spki.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_val.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_x509.c" />
+ <ClCompile Include="$(opensslDir)crypto\asn1\x_x509a.c" />
+ <ClCompile Include="$(opensslDir)crypto\bf\bf_cfb64.c" />
+ <ClCompile Include="$(opensslDir)crypto\bf\bf_ecb.c" />
+ <ClCompile Include="$(opensslDir)crypto\bf\bf_ofb64.c" />
+ <ClCompile Include="$(opensslDir)crypto\bf\bf_skey.c" />
+ <ClCompile Include="$(opensslDir)crypto\bio\b_dump.c" />
+ <ClCompile Include="$(opensslDir)crypto\bio\b_print.c" />
+ <ClCompile Include="$(opensslDir)crypto\bio\b_sock.c" />
+ <ClCompile Include="$(opensslDir)crypto\bio\bf_buff.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\bio\bf_nbio.c" />
+ <ClCompile Include="$(opensslDir)crypto\bio\bf_null.c" />
+ <ClCompile Include="$(opensslDir)crypto\bio\bio_cb.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\bio\bio_err.c" />
+ <ClCompile Include="$(opensslDir)crypto\bio\bio_lib.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\bio\bss_acpt.c" />
+ <ClCompile Include="$(opensslDir)crypto\bio\bss_bio.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\bio\bss_conn.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\bio\bss_dgram.c" />
+ <ClCompile Include="$(opensslDir)crypto\bio\bss_fd.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\bio\bss_file.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\bio\bss_log.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\bio\bss_mem.c" />
+ <ClCompile Include="$(opensslDir)crypto\bio\bss_null.c" />
+ <ClCompile Include="$(opensslDir)crypto\bio\bss_sock.c" />
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_add.c" />
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_blind.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_const.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_ctx.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_depr.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_div.c" />
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_err.c" />
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_exp.c" />
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_exp2.c" />
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_gcd.c" />
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_gf2m.c" />
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_kron.c" />
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_lib.c" />
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_mod.c" />
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_mont.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_mpi.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_mul.c" />
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_nist.c" />
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_prime.c" />
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_print.c" />
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_rand.c" />
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_recp.c" />
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_shift.c" />
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_sqr.c" />
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_sqrt.c" />
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_word.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_x931p.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\buffer\buf_err.c" />
+ <ClCompile Include="$(opensslDir)crypto\buffer\buf_str.c" />
+ <ClCompile Include="$(opensslDir)crypto\buffer\buffer.c" />
+ <ClCompile Include="$(opensslDir)crypto\camellia\cmll_cfb.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\camellia\cmll_ctr.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\camellia\cmll_ecb.c" />
+ <ClCompile Include="$(opensslDir)crypto\camellia\cmll_ofb.c" />
+ <ClCompile Include="$(opensslDir)crypto\camellia\cmll_utl.c" />
+ <ClCompile Include="$(opensslDir)crypto\cast\c_cfb64.c" />
+ <ClCompile Include="$(opensslDir)crypto\cast\c_ecb.c" />
+ <ClCompile Include="$(opensslDir)crypto\cast\c_ofb64.c" />
+ <ClCompile Include="$(opensslDir)crypto\cast\c_skey.c" />
+ <ClCompile Include="$(opensslDir)crypto\cmac\cm_ameth.c" />
+ <ClCompile Include="$(opensslDir)crypto\cmac\cm_pmeth.c" />
+ <ClCompile Include="$(opensslDir)crypto\cmac\cmac.c" />
+ <ClCompile Include="$(opensslDir)crypto\cms\cms_asn1.c" />
+ <ClCompile Include="$(opensslDir)crypto\cms\cms_att.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\cms\cms_cd.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\cms\cms_dd.c" />
+ <ClCompile Include="$(opensslDir)crypto\cms\cms_enc.c" />
+ <ClCompile Include="$(opensslDir)crypto\cms\cms_env.c" />
+ <ClCompile Include="$(opensslDir)crypto\cms\cms_err.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\cms\cms_ess.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\cms\cms_io.c" />
+ <ClCompile Include="$(opensslDir)crypto\cms\cms_kari.c" />
+ <ClCompile Include="$(opensslDir)crypto\cms\cms_lib.c" />
+ <ClCompile Include="$(opensslDir)crypto\cms\cms_pwri.c" />
+ <ClCompile Include="$(opensslDir)crypto\cms\cms_sd.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\cms\cms_smime.c" />
+ <ClCompile Include="$(opensslDir)crypto\comp\c_rle.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\comp\c_zlib.c" />
+ <ClCompile Include="$(opensslDir)crypto\comp\comp_err.c" />
+ <ClCompile Include="$(opensslDir)crypto\comp\comp_lib.c" />
+ <ClCompile Include="$(opensslDir)crypto\conf\conf_api.c" />
+ <ClCompile Include="$(opensslDir)crypto\conf\conf_def.c" />
+ <ClCompile Include="$(opensslDir)crypto\conf\conf_err.c" />
+ <ClCompile Include="$(opensslDir)crypto\conf\conf_lib.c" />
+ <ClCompile Include="$(opensslDir)crypto\conf\conf_mall.c" />
+ <ClCompile Include="$(opensslDir)crypto\conf\conf_mod.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\conf\conf_sap.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\cpt_err.c" />
+ <ClCompile Include="$(opensslDir)crypto\cryptlib.c" />
+ <ClCompile Include="$(opensslDir)crypto\des\cbc_cksm.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\des\cbc_enc.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\des\cfb_enc.c" />
+ <ClCompile Include="$(opensslDir)crypto\des\cfb64ede.c" />
+ <ClCompile Include="$(opensslDir)crypto\des\cfb64enc.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\des\des_old.c" />
+ <ClCompile Include="$(opensslDir)crypto\des\des_old2.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\des\ecb_enc.c" />
+ <ClCompile Include="$(opensslDir)crypto\des\ecb3_enc.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\des\ede_cbcm_enc.c" />
+ <ClCompile Include="$(opensslDir)crypto\des\enc_read.c" />
+ <ClCompile Include="$(opensslDir)crypto\des\enc_writ.c" />
+ <ClCompile Include="$(opensslDir)crypto\des\fcrypt.c" />
+ <ClCompile Include="$(opensslDir)crypto\des\ofb_enc.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\des\ofb64ede.c" />
+ <ClCompile Include="$(opensslDir)crypto\des\ofb64enc.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\des\pcbc_enc.c" />
+ <ClCompile Include="$(opensslDir)crypto\des\qud_cksm.c" />
+ <ClCompile Include="$(opensslDir)crypto\des\rand_key.c" />
+ <ClCompile Include="$(opensslDir)crypto\des\read2pwd.c" />
+ <ClCompile Include="$(opensslDir)crypto\des\rpc_enc.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\des\set_key.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\des\str2key.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\des\xcbc_enc.c" />
+ <ClCompile Include="$(opensslDir)crypto\dh\dh_ameth.c" />
+ <ClCompile Include="$(opensslDir)crypto\dh\dh_asn1.c" />
+ <ClCompile Include="$(opensslDir)crypto\dh\dh_check.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\dh\dh_depr.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\dh\dh_err.c" />
+ <ClCompile Include="$(opensslDir)crypto\dh\dh_gen.c" />
+ <ClCompile Include="$(opensslDir)crypto\dh\dh_kdf.c" />
+ <ClCompile Include="$(opensslDir)crypto\dh\dh_key.c" />
+ <ClCompile Include="$(opensslDir)crypto\dh\dh_lib.c" />
+ <ClCompile Include="$(opensslDir)crypto\dh\dh_pmeth.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\dh\dh_prn.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\dh\dh_rfc5114.c" />
+ <ClCompile Include="$(opensslDir)crypto\dsa\dsa_ameth.c" />
+ <ClCompile Include="$(opensslDir)crypto\dsa\dsa_asn1.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\dsa\dsa_depr.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\dsa\dsa_err.c" />
+ <ClCompile Include="$(opensslDir)crypto\dsa\dsa_gen.c" />
+ <ClCompile Include="$(opensslDir)crypto\dsa\dsa_key.c" />
+ <ClCompile Include="$(opensslDir)crypto\dsa\dsa_lib.c" />
+ <ClCompile Include="$(opensslDir)crypto\dsa\dsa_ossl.c" />
+ <ClCompile Include="$(opensslDir)crypto\dsa\dsa_pmeth.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\dsa\dsa_prn.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\dsa\dsa_sign.c" />
+ <ClCompile Include="$(opensslDir)crypto\dsa\dsa_vrf.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\dso\dso_beos.c" />
+ <ClCompile Include="$(opensslDir)crypto\dso\dso_dl.c" />
+ <ClCompile Include="$(opensslDir)crypto\dso\dso_dlfcn.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\dso\dso_err.c" />
+ <ClCompile Include="$(opensslDir)crypto\dso\dso_lib.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\dso\dso_null.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\dso\dso_openssl.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\dso\dso_vms.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\dso\dso_win32.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\ebcdic.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\ec\ec_ameth.c" />
+ <ClCompile Include="$(opensslDir)crypto\ec\ec_asn1.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\ec\ec_check.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\ec\ec_curve.c" />
+ <ClCompile Include="$(opensslDir)crypto\ec\ec_cvt.c" />
+ <ClCompile Include="$(opensslDir)crypto\ec\ec_err.c" />
+ <ClCompile Include="$(opensslDir)crypto\ec\ec_key.c" />
+ <ClCompile Include="$(opensslDir)crypto\ec\ec_lib.c" />
+ <ClCompile Include="$(opensslDir)crypto\ec\ec_mult.c" />
+ <ClCompile Include="$(opensslDir)crypto\ec\ec_oct.c" />
+ <ClCompile Include="$(opensslDir)crypto\ec\ec_pmeth.c" />
+ <ClCompile Include="$(opensslDir)crypto\ec\ec_print.c" />
+ <ClCompile Include="$(opensslDir)crypto\ec\ec2_mult.c" />
+ <ClCompile Include="$(opensslDir)crypto\ec\ec2_oct.c" />
+ <ClCompile Include="$(opensslDir)crypto\ec\ec2_smpl.c" />
+ <ClCompile Include="$(opensslDir)crypto\ec\eck_prn.c" />
+ <ClCompile Include="$(opensslDir)crypto\ec\ecp_mont.c" />
+ <ClCompile Include="$(opensslDir)crypto\ec\ecp_nist.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\ec\ecp_nistp224.c" />
+ <ClCompile Include="$(opensslDir)crypto\ec\ecp_nistp256.c" />
+ <ClCompile Include="$(opensslDir)crypto\ec\ecp_nistp521.c" />
+ <ClCompile Include="$(opensslDir)crypto\ec\ecp_nistputil.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\ec\ecp_oct.c" />
+ <ClCompile Include="$(opensslDir)crypto\ec\ecp_smpl.c" />
+ <ClCompile Include="$(opensslDir)crypto\ecdh\ech_err.c" />
+ <ClCompile Include="$(opensslDir)crypto\ecdh\ech_kdf.c" />
+ <ClCompile Include="$(opensslDir)crypto\ecdh\ech_key.c" />
+ <ClCompile Include="$(opensslDir)crypto\ecdh\ech_lib.c" />
+ <ClCompile Include="$(opensslDir)crypto\ecdh\ech_ossl.c" />
+ <ClCompile Include="$(opensslDir)crypto\ecdsa\ecs_asn1.c" />
+ <ClCompile Include="$(opensslDir)crypto\ecdsa\ecs_err.c" />
+ <ClCompile Include="$(opensslDir)crypto\ecdsa\ecs_lib.c" />
+ <ClCompile Include="$(opensslDir)crypto\ecdsa\ecs_ossl.c" />
+ <ClCompile Include="$(opensslDir)crypto\ecdsa\ecs_sign.c" />
+ <ClCompile Include="$(opensslDir)crypto\ecdsa\ecs_vrf.c" />
+ <ClCompile Include="$(opensslDir)crypto\engine\eng_all.c" />
+ <ClCompile Include="$(opensslDir)crypto\engine\eng_cnf.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\engine\eng_cryptodev.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\engine\eng_ctrl.c" />
+ <ClCompile Include="$(opensslDir)crypto\engine\eng_dyn.c" />
+ <ClCompile Include="$(opensslDir)crypto\engine\eng_err.c" />
+ <ClCompile Include="$(opensslDir)crypto\engine\eng_fat.c" />
+ <ClCompile Include="$(opensslDir)crypto\engine\eng_init.c" />
+ <ClCompile Include="$(opensslDir)crypto\engine\eng_lib.c" />
+ <ClCompile Include="$(opensslDir)crypto\engine\eng_list.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\engine\eng_openssl.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\engine\eng_pkey.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\engine\eng_rdrand.c" />
+ <ClCompile Include="$(opensslDir)crypto\engine\eng_rsax.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\engine\eng_table.c" />
+ <ClCompile Include="$(opensslDir)crypto\engine\tb_asnmth.c" />
+ <ClCompile Include="$(opensslDir)crypto\engine\tb_cipher.c" />
+ <ClCompile Include="$(opensslDir)crypto\engine\tb_dh.c" />
+ <ClCompile Include="$(opensslDir)crypto\engine\tb_digest.c" />
+ <ClCompile Include="$(opensslDir)crypto\engine\tb_dsa.c" />
+ <ClCompile Include="$(opensslDir)crypto\engine\tb_ecdh.c" />
+ <ClCompile Include="$(opensslDir)crypto\engine\tb_ecdsa.c" />
+ <ClCompile Include="$(opensslDir)crypto\engine\tb_pkmeth.c" />
+ <ClCompile Include="$(opensslDir)crypto\engine\tb_rand.c" />
+ <ClCompile Include="$(opensslDir)crypto\engine\tb_rsa.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\engine\tb_store.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\err\err.c" />
+ <ClCompile Include="$(opensslDir)crypto\err\err_all.c" />
+ <ClCompile Include="$(opensslDir)crypto\err\err_prn.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\bio_b64.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\bio_enc.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\bio_md.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\evp\bio_ok.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\evp\c_all.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\c_allc.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\c_alld.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\digest.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\e_aes.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\e_aes_cbc_hmac_sha1.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\e_aes_cbc_hmac_sha256.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\e_bf.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\e_camellia.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\e_cast.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\e_des.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\e_des3.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\evp\e_idea.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\evp\e_null.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\evp\e_old.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\evp\e_rc2.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\e_rc4.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\e_rc4_hmac_md5.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\evp\e_rc5.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\evp\e_seed.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\e_xcbc_d.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\encode.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\evp\evp_acnf.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\evp\evp_cnf.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\evp_enc.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\evp_err.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\evp\evp_fips.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\evp\evp_key.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\evp_lib.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\evp_pbe.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\evp_pkey.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\m_dss.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\m_dss1.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\m_ecdsa.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\m_md4.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\m_md5.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\evp\m_null.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\evp\m_ripemd.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\m_sha.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\m_sha1.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\m_sigver.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\m_wp.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\names.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\evp\p_dec.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\evp\p_lib.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\evp\p_open.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\p_seal.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\evp\p_sign.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\p_verify.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\p5_crpt.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\p5_crpt2.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\pmeth_fn.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\pmeth_gn.c" />
+ <ClCompile Include="$(opensslDir)crypto\evp\pmeth_lib.c" />
+ <ClCompile Include="$(opensslDir)crypto\ex_data.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\fips_ers.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\hmac\hm_ameth.c" />
+ <ClCompile Include="$(opensslDir)crypto\hmac\hm_pmeth.c" />
+ <ClCompile Include="$(opensslDir)crypto\hmac\hmac.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\krb5\krb5_asn.c" />
+ <ClCompile Include="$(opensslDir)crypto\lhash\lh_stats.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\lhash\lhash.c" />
+ <ClCompile Include="$(opensslDir)crypto\md4\md4_dgst.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\md4\md4_one.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\md5\md5_dgst.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\md5\md5_one.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\mem.c" />
+ <ClCompile Include="$(opensslDir)crypto\mem_dbg.c" />
+ <ClCompile Include="$(opensslDir)crypto\modes\cbc128.c" />
+ <ClCompile Include="$(opensslDir)crypto\modes\ccm128.c" />
+ <ClCompile Include="$(opensslDir)crypto\modes\cfb128.c" />
+ <ClCompile Include="$(opensslDir)crypto\modes\ctr128.c" />
+ <ClCompile Include="$(opensslDir)crypto\modes\cts128.c" />
+ <ClCompile Include="$(opensslDir)crypto\modes\gcm128.c" />
+ <ClCompile Include="$(opensslDir)crypto\modes\ofb128.c" />
+ <ClCompile Include="$(opensslDir)crypto\modes\wrap128.c" />
+ <ClCompile Include="$(opensslDir)crypto\modes\xts128.c" />
+ <ClCompile Include="$(opensslDir)crypto\o_dir.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\o_fips.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\o_init.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\o_str.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\o_time.c" />
+ <ClCompile Include="$(opensslDir)crypto\objects\o_names.c" />
+ <ClCompile Include="$(opensslDir)crypto\objects\obj_dat.c" />
+ <ClCompile Include="$(opensslDir)crypto\objects\obj_err.c" />
+ <ClCompile Include="$(opensslDir)crypto\objects\obj_lib.c" />
+ <ClCompile Include="$(opensslDir)crypto\objects\obj_xref.c" />
+ <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_asn.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_cl.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_err.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_ext.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_ht.c" />
+ <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_lib.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_prn.c" />
+ <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_srv.c" />
+ <ClCompile Include="$(opensslDir)crypto\ocsp\ocsp_vfy.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\pem\pem_all.c" />
+ <ClCompile Include="$(opensslDir)crypto\pem\pem_err.c" />
+ <ClCompile Include="$(opensslDir)crypto\pem\pem_info.c" />
+ <ClCompile Include="$(opensslDir)crypto\pem\pem_lib.c" />
+ <ClCompile Include="$(opensslDir)crypto\pem\pem_oth.c" />
+ <ClCompile Include="$(opensslDir)crypto\pem\pem_pk8.c" />
+ <ClCompile Include="$(opensslDir)crypto\pem\pem_pkey.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\pem\pem_seal.c" />
+ <ClCompile Include="$(opensslDir)crypto\pem\pem_sign.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\pem\pem_x509.c" />
+ <ClCompile Include="$(opensslDir)crypto\pem\pem_xaux.c" />
+ <ClCompile Include="$(opensslDir)crypto\pem\pvkfmt.c" />
+ <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_add.c" />
+ <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_asn.c" />
+ <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_attr.c" />
+ <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_crpt.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_crt.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_decr.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_init.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_key.c" />
+ <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_kiss.c" />
+ <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_mutl.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_npas.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_p8d.c" />
+ <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_p8e.c" />
+ <ClCompile Include="$(opensslDir)crypto\pkcs12\p12_utl.c" />
+ <ClCompile Include="$(opensslDir)crypto\pkcs12\pk12err.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\pkcs7\bio_pk7.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\pkcs7\pk7_asn1.c" />
+ <ClCompile Include="$(opensslDir)crypto\pkcs7\pk7_attr.c" />
+ <ClCompile Include="$(opensslDir)crypto\pkcs7\pk7_doit.c" />
+ <ClCompile Include="$(opensslDir)crypto\pkcs7\pk7_lib.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\pkcs7\pk7_mime.c" />
+ <ClCompile Include="$(opensslDir)crypto\pkcs7\pk7_smime.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\pkcs7\pkcs7err.c" />
+ <ClCompile Include="$(opensslDir)crypto\pqueue\pqueue.c" />
+ <ClCompile Include="$(opensslDir)crypto\rand\md_rand.c" />
+ <ClCompile Include="$(opensslDir)crypto\rand\rand_egd.c" />
+ <ClCompile Include="$(opensslDir)crypto\rand\rand_err.c" />
+ <ClCompile Include="$(opensslDir)crypto\rand\rand_lib.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\rand\rand_nw.c" />
+ <ClCompile Include="$(opensslDir)crypto\rand\rand_os2.c" />
+ <ClCompile Include="$(opensslDir)crypto\rand\rand_unix.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\rand\rand_win.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\rand\randfile.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\rc2\rc2_cbc.c" />
+ <ClCompile Include="$(opensslDir)crypto\rc2\rc2_ecb.c" />
+ <ClCompile Include="$(opensslDir)crypto\rc2\rc2_skey.c" />
+ <ClCompile Include="$(opensslDir)crypto\rc2\rc2cfb64.c" />
+ <ClCompile Include="$(opensslDir)crypto\rc2\rc2ofb64.c" />
+ <ClCompile Include="$(opensslDir)crypto\rc4\rc4_utl.c" />
+ <ClCompile Include="$(opensslDir)crypto\ripemd\rmd_dgst.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\ripemd\rmd_one.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_ameth.c" />
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_asn1.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_chk.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_crpt.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_depr.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_eay.c" />
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_err.c" />
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_gen.c" />
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_lib.c" />
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_none.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_null.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_oaep.c" />
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_pk1.c" />
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_pmeth.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_prn.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_pss.c" />
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_saos.c" />
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_sign.c" />
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_ssl.c" />
+ <ClCompile Include="$(opensslDir)crypto\rsa\rsa_x931.c" />
+ <ClCompile Include="$(opensslDir)crypto\seed\seed.c" />
+ <ClCompile Include="$(opensslDir)crypto\seed\seed_cbc.c" />
+ <ClCompile Include="$(opensslDir)crypto\seed\seed_cfb.c" />
+ <ClCompile Include="$(opensslDir)crypto\seed\seed_ecb.c" />
+ <ClCompile Include="$(opensslDir)crypto\seed\seed_ofb.c" />
+ <ClCompile Include="$(opensslDir)crypto\sha\sha_dgst.c" />
+ <ClCompile Include="$(opensslDir)crypto\sha\sha_one.c" />
+ <ClCompile Include="$(opensslDir)crypto\sha\sha1_one.c" />
+ <ClCompile Include="$(opensslDir)crypto\sha\sha1dgst.c" />
+ <ClCompile Include="$(opensslDir)crypto\sha\sha256.c" />
+ <ClCompile Include="$(opensslDir)crypto\sha\sha512.c" />
+ <ClCompile Include="$(opensslDir)crypto\srp\srp_lib.c" />
+ <ClCompile Include="$(opensslDir)crypto\srp\srp_vfy.c" />
+ <ClCompile Include="$(opensslDir)crypto\stack\stack.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\ts\ts_asn1.c" />
+ <ClCompile Include="$(opensslDir)crypto\ts\ts_conf.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\ts\ts_err.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\ts\ts_lib.c" />
+ <ClCompile Include="$(opensslDir)crypto\ts\ts_req_print.c" />
+ <ClCompile Include="$(opensslDir)crypto\ts\ts_req_utils.c" />
+ <ClCompile Include="$(opensslDir)crypto\ts\ts_rsp_print.c" />
+ <ClCompile Include="$(opensslDir)crypto\ts\ts_rsp_sign.c" />
+ <ClCompile Include="$(opensslDir)crypto\ts\ts_rsp_utils.c" />
+ <ClCompile Include="$(opensslDir)crypto\ts\ts_rsp_verify.c" />
+ <ClCompile Include="$(opensslDir)crypto\ts\ts_verify_ctx.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\txt_db\txt_db.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\ui\ui_compat.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\ui\ui_err.c" />
+ <ClCompile Include="$(opensslDir)crypto\ui\ui_lib.c" />
+ <ClCompile Include="$(opensslDir)crypto\ui\ui_openssl.c" />
+ <ClCompile Include="$(opensslDir)crypto\ui\ui_util.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\uid.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\whrlpool\wp_dgst.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509\by_dir.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509\by_file.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509\x_all.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_att.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_cmp.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_d2.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_def.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_err.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_ext.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_lu.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_obj.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_r2x.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_req.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_set.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_trs.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_txt.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_v3.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_vfy.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509\x509_vpm.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509\x509cset.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509\x509name.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509\x509rset.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\x509\x509spki.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\x509\x509type.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\pcy_cache.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\pcy_data.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\pcy_lib.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\pcy_map.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\pcy_node.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\pcy_tree.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_addr.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_akey.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_akeya.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_alt.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_asid.c" />
+ -->
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_bcons.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_bitst.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_conf.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_cpols.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_crld.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_enum.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_extku.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_genn.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_ia5.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_info.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_int.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_lib.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_ncons.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_ocsp.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_pci.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_pcia.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_pcons.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_pku.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_pmaps.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_prn.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_purp.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_scts.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_skey.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_sxnet.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3_utl.c" />
+ <ClCompile Include="$(opensslDir)crypto\x509v3\v3err.c" />
+ <ClCompile Include="$(opensslDir)engines\ccgost\e_gost_err.c" />
+ <ClCompile Include="$(opensslDir)engines\ccgost\gost_ameth.c" />
+ <ClCompile Include="$(opensslDir)engines\ccgost\gost_asn1.c" />
+ <ClCompile Include="$(opensslDir)engines\ccgost\gost_crypt.c" />
+ <ClCompile Include="$(opensslDir)engines\ccgost\gost_ctl.c" />
+ <ClCompile Include="$(opensslDir)engines\ccgost\gost_eng.c" />
+ <ClCompile Include="$(opensslDir)engines\ccgost\gost_keywrap.c" />
+ <ClCompile Include="$(opensslDir)engines\ccgost\gost_md.c" />
+ <ClCompile Include="$(opensslDir)engines\ccgost\gost_params.c" />
+ <ClCompile Include="$(opensslDir)engines\ccgost\gost_pmeth.c" />
+ <ClCompile Include="$(opensslDir)engines\ccgost\gost_sign.c" />
+ <ClCompile Include="$(opensslDir)engines\ccgost\gost2001.c" />
+ <ClCompile Include="$(opensslDir)engines\ccgost\gost2001_keyx.c" />
+ <ClCompile Include="$(opensslDir)engines\ccgost\gost89.c" />
+ <ClCompile Include="$(opensslDir)engines\ccgost\gost94_keyx.c" />
+ <ClCompile Include="$(opensslDir)engines\ccgost\gosthash.c" />
+ <ClCompile Include="$(opensslDir)engines\e_4758cca.c" />
+ <ClCompile Include="$(opensslDir)engines\e_aep.c" />
+ <ClCompile Include="$(opensslDir)engines\e_atalla.c" />
+ <ClCompile Include="$(opensslDir)engines\e_capi.c" />
+ <ClCompile Include="$(opensslDir)engines\e_chil.c" />
+ <ClCompile Include="$(opensslDir)engines\e_cswift.c" />
+ <ClCompile Include="$(opensslDir)engines\e_gmp.c" />
+ <ClCompile Include="$(opensslDir)engines\e_nuron.c" />
+ <ClCompile Include="$(opensslDir)engines\e_padlock.c" />
+ <ClCompile Include="$(opensslDir)engines\e_sureware.c" />
+ <ClCompile Include="$(opensslDir)engines\e_ubsec.c" />
+ <ClCompile Include="$(opensslDir)ssl\d1_clnt.c" />
+ <ClCompile Include="$(opensslDir)ssl\d1_meth.c" />
+ <ClCompile Include="$(opensslDir)ssl\d1_lib.c" />
+ <ClCompile Include="$(opensslDir)ssl\d1_srvr.c" />
+ <ClCompile Include="$(opensslDir)ssl\s2_srvr.c" />
+ <ClCompile Include="$(opensslDir)ssl\t1_clnt.c" />
+ <ClCompile Include="$(opensslDir)ssl\t1_ext.c" />
+ <ClCompile Include="$(opensslDir)ssl\t1_srvr.c" />
+ </ItemGroup>
+ <ItemGroup Condition="$(Platform) == 'Win32'">
+ <ClCompile Include="$(opensslDir)crypto\whrlpool\wp_block.c" />
+ </ItemGroup>
+ <ItemGroup Condition="$(Platform) == 'x64'">
+ <ClCompile Include="$(opensslDir)crypto\bf\bf_enc.c" />
+ <ClCompile Include="$(opensslDir)crypto\bn\bn_asm.c" />
+ <ClCompile Include="$(opensslDir)crypto\camellia\cmll_misc.c" />
+ <ClCompile Include="$(opensslDir)crypto\cast\c_enc.c" />
+ <ClCompile Include="$(opensslDir)crypto\des\des_enc.c" />
+ <ClCompile Include="$(opensslDir)crypto\des\fcrypt_b.c" />
+ </ItemGroup>
+
+ <ItemGroup Condition="$(Platform) == 'Win32'">
+ <NasmCompile Include="$(opensslDir)tmp32\aes-586.asm" />
+ <NasmCompile Include="$(opensslDir)tmp32\aesni-x86.asm" />
+ <NasmCompile Include="$(opensslDir)tmp32\bf-586.asm" />
+ <NasmCompile Include="$(opensslDir)tmp32\bn-586.asm" />
+ <NasmCompile Include="$(opensslDir)tmp32\cast-586.asm" />
+ <NasmCompile Include="$(opensslDir)tmp32\cmll-x86.asm" />
+ <NasmCompile Include="$(opensslDir)tmp32\co-586.asm" />
+ <NasmCompile Include="$(opensslDir)tmp32\crypt586.asm" />
+ <NasmCompile Include="$(opensslDir)tmp32\des-586.asm" />
+ <NasmCompile Include="$(opensslDir)tmp32\ghash-x86.asm" />
+ <NasmCompile Include="$(opensslDir)tmp32\md5-586.asm" />
+ <NasmCompile Include="$(opensslDir)tmp32\rc4-586.asm" />
+ <NasmCompile Include="$(opensslDir)tmp32\rmd-586.asm" />
+ <NasmCompile Include="$(opensslDir)tmp32\sha1-586.asm" />
+ <NasmCompile Include="$(opensslDir)tmp32\sha256-586.asm" />
+ <NasmCompile Include="$(opensslDir)tmp32\sha512-586.asm" />
+ <NasmCompile Include="$(opensslDir)tmp32\vpaes-x86.asm" />
+ <NasmCompile Include="$(opensslDir)tmp32\wp-mmx.asm" />
+ <NasmCompile Include="$(opensslDir)tmp32\x86cpuid.asm" />
+ <NasmCompile Include="$(opensslDir)tmp32\x86-gf2m.asm" />
+ <NasmCompile Include="$(opensslDir)tmp32\x86-mont.asm" />
+ </ItemGroup>
+ <ItemGroup Condition="$(Platform) == 'x64'">
+ <NasmCompile Include="$(opensslDir)tmp64\aesni-sha1-x86_64.asm" />
+ <NasmCompile Include="$(opensslDir)tmp64\aesni-sha1-x86_64.asm" />
+ <NasmCompile Include="$(opensslDir)tmp64\aesni-gcm-x86_64.asm" />
+ <NasmCompile Include="$(opensslDir)tmp64\aesni-mb-x86_64.asm" />
+ <NasmCompile Include="$(opensslDir)tmp64\aesni-sha256-x86_64.asm" />
+ <NasmCompile Include="$(opensslDir)tmp64\aesni-x86_64.asm" />
+ <NasmCompile Include="$(opensslDir)tmp64\aes-x86_64.asm" />
+ <NasmCompile Include="$(opensslDir)tmp64\bsaes-x86_64.asm" />
+ <NasmCompile Include="$(opensslDir)tmp64\cmll-x86_64.asm" />
+ <NasmCompile Include="$(opensslDir)tmp64\ghash-x86_64.asm" />
+ <NasmCompile Include="$(opensslDir)tmp64\md5-x86_64.asm" />
+ <NasmCompile Include="$(opensslDir)tmp64\rc4-md5-x86_64.asm" />
+ <NasmCompile Include="$(opensslDir)tmp64\rc4-x86_64.asm" />
+ <NasmCompile Include="$(opensslDir)tmp64\sha1-x86_64.asm" />
+ <NasmCompile Include="$(opensslDir)tmp64\sha1-mb-x86_64.asm" />
+ <NasmCompile Include="$(opensslDir)tmp64\sha256-mb-x86_64.asm" />
+ <NasmCompile Include="$(opensslDir)tmp64\sha256-x86_64.asm" />
+ <NasmCompile Include="$(opensslDir)tmp64\sha512-x86_64.asm" />
+ <NasmCompile Include="$(opensslDir)tmp64\vpaes-x86_64.asm" />
+ <NasmCompile Include="$(opensslDir)tmp64\wp-x86_64.asm" />
+ <NasmCompile Include="$(opensslDir)tmp64\x86_64cpuid.asm" />
+ <NasmCompile Include="$(opensslDir)tmp64\x86_64-gf2m.asm" />
+ <NasmCompile Include="$(opensslDir)tmp64\x86_64-mont.asm" />
+ <NasmCompile Include="$(opensslDir)tmp64\x86_64-mont5.asm" />
+ </ItemGroup>
+
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <Target Name="Clean" />
+ <Target Name="CleanAll">
+ <Delete Files="$(TargetPath)" />
+ <RemoveDir Directories="$(IntDir)" />
+ </Target>
+</Project> \ No newline at end of file
diff --git a/PCbuild/make_buildinfo.c b/PCbuild/make_buildinfo.c
deleted file mode 100644
index f9aadee65f..0000000000
--- a/PCbuild/make_buildinfo.c
+++ /dev/null
@@ -1,194 +0,0 @@
-#include <windows.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <stdio.h>
-#include <io.h>
-
-#define CMD_SIZE 500
-
-/* This file creates the getbuildinfo.o object, by first
- invoking subwcrev.exe (if found), and then invoking cl.exe.
- As a side effect, it might generate PCBuild\getbuildinfo2.c
- also. If this isn't a subversion checkout, or subwcrev isn't
- found, it compiles ..\\Modules\\getbuildinfo.c instead.
-
- Currently, subwcrev.exe is found from the registry entries
- of TortoiseSVN.
-
- No attempt is made to place getbuildinfo.o into the proper
- binary directory. This isn't necessary, as this tool is
- invoked as a pre-link step for pythoncore, so that overwrites
- any previous getbuildinfo.o.
-
- However, if a second argument is provided, this will be used
- as a temporary directory where any getbuildinfo2.c and
- getbuildinfo.o files are put. This is useful if multiple
- configurations are being built in parallel, to avoid them
- trampling each other's files.
-
-*/
-
-int make_buildinfo2(const char *tmppath)
-{
- struct _stat st;
- HKEY hTortoise;
- char command[CMD_SIZE+1];
- DWORD type, size;
- if (_stat(".svn", &st) < 0)
- return 0;
- /* Allow suppression of subwcrev.exe invocation if a no_subwcrev file is present. */
- if (_stat("no_subwcrev", &st) == 0)
- return 0;
- if (RegOpenKey(HKEY_LOCAL_MACHINE, "Software\\TortoiseSVN", &hTortoise) != ERROR_SUCCESS &&
- RegOpenKey(HKEY_CURRENT_USER, "Software\\TortoiseSVN", &hTortoise) != ERROR_SUCCESS)
- /* Tortoise not installed */
- return 0;
- command[0] = '"'; /* quote the path to the executable */
- size = sizeof(command) - 1;
- if (RegQueryValueEx(hTortoise, "Directory", 0, &type, command+1, &size) != ERROR_SUCCESS ||
- type != REG_SZ)
- /* Registry corrupted */
- return 0;
- strcat_s(command, CMD_SIZE, "bin\\subwcrev.exe");
- if (_stat(command+1, &st) < 0)
- /* subwcrev.exe not part of the release */
- return 0;
- strcat_s(command, CMD_SIZE, "\" .. ..\\Modules\\getbuildinfo.c \"");
- strcat_s(command, CMD_SIZE, tmppath); /* quoted tmppath */
- strcat_s(command, CMD_SIZE, "getbuildinfo2.c\"");
- puts(command); fflush(stdout);
- if (system(command) < 0)
- return 0;
- return 1;
-}
-
-const char DELIMS[] = { " \n" };
-
-int get_mercurial_info(char * hgbranch, char * hgtag, char * hgrev, int size)
-{
- int result = 0;
- char filename[CMD_SIZE];
- char cmdline[CMD_SIZE];
-
- strcpy_s(filename, CMD_SIZE, "tmpXXXXXX");
- if (_mktemp_s(filename, CMD_SIZE) == 0) {
- int rc;
-
- strcpy_s(cmdline, CMD_SIZE, "hg id -bit > ");
- strcat_s(cmdline, CMD_SIZE, filename);
- rc = system(cmdline);
- if (rc == 0) {
- FILE * fp;
-
- if (fopen_s(&fp, filename, "r") == 0) {
- char * cp = fgets(cmdline, CMD_SIZE, fp);
-
- if (cp) {
- char * context = NULL;
- char * tp = strtok_s(cp, DELIMS, &context);
- if (tp) {
- strcpy_s(hgrev, size, tp);
- tp = strtok_s(NULL, DELIMS, &context);
- if (tp) {
- strcpy_s(hgbranch, size, tp);
- tp = strtok_s(NULL, DELIMS, &context);
- if (tp) {
- strcpy_s(hgtag, size, tp);
- result = 1;
- }
- }
- }
- }
- fclose(fp);
- }
- }
- _unlink(filename);
- }
- return result;
-}
-
-int main(int argc, char*argv[])
-{
- char command[CMD_SIZE] = "cl.exe -c -D_WIN32 -DUSE_DL_EXPORT -D_WINDOWS -DWIN32 -D_WINDLL ";
- char tmppath[CMD_SIZE] = "";
- int do_unlink, result;
- char *tmpdir = NULL;
- if (argc <= 2 || argc > 3) {
- fprintf(stderr, "make_buildinfo $(ConfigurationName) [tmpdir]\n");
- return EXIT_FAILURE;
- }
- if (strcmp(argv[1], "Release") == 0) {
- strcat_s(command, CMD_SIZE, "-MD ");
- }
- else if (strcmp(argv[1], "Debug") == 0) {
- strcat_s(command, CMD_SIZE, "-D_DEBUG -MDd ");
- }
- else if (strcmp(argv[1], "ReleaseItanium") == 0) {
- strcat_s(command, CMD_SIZE, "-MD /USECL:MS_ITANIUM ");
- }
- else if (strcmp(argv[1], "ReleaseAMD64") == 0) {
- strcat_s(command, CMD_SIZE, "-MD ");
- strcat_s(command, CMD_SIZE, "-MD /USECL:MS_OPTERON ");
- }
- else {
- fprintf(stderr, "unsupported configuration %s\n", argv[1]);
- return EXIT_FAILURE;
- }
- if (argc > 2) {
- tmpdir = argv[2];
- strcat_s(tmppath, _countof(tmppath), tmpdir);
- /* Hack fix for bad command line: If the command is issued like this:
- * $(SolutionDir)make_buildinfo.exe" Debug "$(IntDir)"
- * we will get a trailing quote because IntDir ends with a backslash that then
- * escapes the final ". To simplify the life for developers, catch that problem
- * here by cutting it off.
- * The proper command line, btw is:
- * $(SolutionDir)make_buildinfo.exe" Debug "$(IntDir)\"
- * Hooray for command line parsing on windows.
- */
- if (strlen(tmppath) > 0 && tmppath[strlen(tmppath)-1] == '"')
- tmppath[strlen(tmppath)-1] = '\0';
- strcat_s(tmppath, _countof(tmppath), "\\");
- }
-
- if ((do_unlink = make_buildinfo2(tmppath))) {
- strcat_s(command, CMD_SIZE, "\"");
- strcat_s(command, CMD_SIZE, tmppath);
- strcat_s(command, CMD_SIZE, "getbuildinfo2.c\" -DSUBWCREV ");
- }
- else {
- char hgtag[CMD_SIZE];
- char hgbranch[CMD_SIZE];
- char hgrev[CMD_SIZE];
-
- if (get_mercurial_info(hgbranch, hgtag, hgrev, CMD_SIZE)) {
- strcat_s(command, CMD_SIZE, "-DHGBRANCH=\\\"");
- strcat_s(command, CMD_SIZE, hgbranch);
- strcat_s(command, CMD_SIZE, "\\\"");
-
- strcat_s(command, CMD_SIZE, " -DHGTAG=\\\"");
- strcat_s(command, CMD_SIZE, hgtag);
- strcat_s(command, CMD_SIZE, "\\\"");
-
- strcat_s(command, CMD_SIZE, " -DHGVERSION=\\\"");
- strcat_s(command, CMD_SIZE, hgrev);
- strcat_s(command, CMD_SIZE, "\\\" ");
- }
- strcat_s(command, CMD_SIZE, "..\\Modules\\getbuildinfo.c");
- }
- strcat_s(command, CMD_SIZE, " -Fo\"");
- strcat_s(command, CMD_SIZE, tmppath);
- strcat_s(command, CMD_SIZE, "getbuildinfo.o\" -I..\\Include -I..\\PC");
- puts(command); fflush(stdout);
- result = system(command);
- if (do_unlink) {
- command[0] = '\0';
- strcat_s(command, CMD_SIZE, "\"");
- strcat_s(command, CMD_SIZE, tmppath);
- strcat_s(command, CMD_SIZE, "getbuildinfo2.c\"");
- _unlink(command);
- }
- if (result < 0)
- return EXIT_FAILURE;
- return 0;
-}
diff --git a/PCbuild/make_buildinfo.vcxproj b/PCbuild/make_buildinfo.vcxproj
deleted file mode 100644
index eee7f91eac..0000000000
--- a/PCbuild/make_buildinfo.vcxproj
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{C73F0EC1-358B-4177-940F-0846AC8B04CD}</ProjectGuid>
- <RootNamespace>make_buildinfo</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="release.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- </ClCompile>
- <Link>
- <OutputFile>$(OutDir)make_buildinfo.exe</OutputFile>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="make_buildinfo.c" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/PCbuild/make_buildinfo.vcxproj.filters b/PCbuild/make_buildinfo.vcxproj.filters
deleted file mode 100644
index 2227f8ce7b..0000000000
--- a/PCbuild/make_buildinfo.vcxproj.filters
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="make_buildinfo.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/PCbuild/make_versioninfo.vcxproj b/PCbuild/make_versioninfo.vcxproj
deleted file mode 100644
index 9cf507bbb6..0000000000
--- a/PCbuild/make_versioninfo.vcxproj
+++ /dev/null
@@ -1,200 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{F0E0541E-F17D-430B-97C4-93ADF0DD284E}</ProjectGuid>
- <RootNamespace>make_versioninfo</RootNamespace>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="debug.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="release.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="x64.props" />
- <Import Project="debug.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="x64.props" />
- <Import Project="release.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <CustomBuildStep>
- <Message>Build PC/pythonnt_rc(_d).h</Message>
- <Command>cd $(SolutionDir)
-make_versioninfo.exe &gt; ..\PC\pythonnt_rc.h
-</Command>
- <Outputs>$(SolutionDir)..\PC\pythonnt_rc.h;%(Outputs)</Outputs>
- <Inputs>$(SolutionDir)make_versioninfo.exe</Inputs>
- </CustomBuildStep>
- <ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <CompileAs>Default</CompileAs>
- </ClCompile>
- <Link>
- <OutputFile>$(SolutionDir)make_versioninfo.exe</OutputFile>
- <SubSystem>Console</SubSystem>
- <BaseAddress>0x1d000000</BaseAddress>
- </Link>
- <PostBuildEvent />
- <PostBuildEvent>
- <Command>
- </Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <CustomBuildStep>
- <Message>Build PC/pythonnt_rc(_d).h</Message>
- <Command>cd $(SolutionDir)
-make_versioninfo.exe &gt; ..\PC\pythonnt_rc.h
-</Command>
- <Outputs>$(SolutionDir)..\PC\pythonnt_rc.h;%(Outputs)</Outputs>
- </CustomBuildStep>
- <ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <OutputFile>$(SolutionDir)make_versioninfo.exe</OutputFile>
- </Link>
- <PostBuildEvent>
- <Command>cd $(SolutionDir)
-make_versioninfo.exe &gt; ..\PC\python_nt.h
-</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <CustomBuildStep>
- <Message>Build PC/pythonnt_rc(_d).h</Message>
- <Command>cd $(SolutionDir)
-make_versioninfo_d.exe &gt; ..\PC\pythonnt_rc_d.h
-</Command>
- <Outputs>$(SolutionDir)..\PC\pythonnt_rc_d.h;%(Outputs)</Outputs>
- <Inputs>$(SolutionDir)make_versioninfo_d.exe</Inputs>
- </CustomBuildStep>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <IntrinsicFunctions>false</IntrinsicFunctions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <CompileAs>Default</CompileAs>
- </ClCompile>
- <Link>
- <OutputFile>$(SolutionDir)make_versioninfo_d.exe</OutputFile>
- <SubSystem>Console</SubSystem>
- <BaseAddress>0x1d000000</BaseAddress>
- </Link>
- <PostBuildEvent>
- <Command>
- </Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <CustomBuildStep>
- <Message>Build PC/pythonnt_rc(_d).h</Message>
- <Command>cd $(SolutionDir)
-make_versioninfo_d.exe &gt; ..\PC\pythonnt_rc_d.h
-</Command>
- <Outputs>$(SolutionDir)..\PC\pythonnt_rc_d.h;%(Outputs)</Outputs>
- </CustomBuildStep>
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <IntrinsicFunctions>false</IntrinsicFunctions>
- <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <OutputFile>$(SolutionDir)make_versioninfo_d.exe</OutputFile>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- <PostBuildEvent>
- <Command>cd $(SolutionDir)
-make_versioninfo_d.exe &gt; ..\PC\python_nt_d.h
-</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\PC\make_versioninfo.c" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/PCbuild/make_versioninfo.vcxproj.filters b/PCbuild/make_versioninfo.vcxproj.filters
deleted file mode 100644
index 96c0434e87..0000000000
--- a/PCbuild/make_versioninfo.vcxproj.filters
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{e4180954-c3a5-4749-b9a4-31b804ee4fa8}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\PC\make_versioninfo.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/PCbuild/openssl.props b/PCbuild/openssl.props
new file mode 100644
index 0000000000..e35c0d9f52
--- /dev/null
+++ b/PCbuild/openssl.props
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Py_IntDir Condition="'$(Py_IntDir)' == ''">$(opensslDir)tmp\</Py_IntDir>
+ </PropertyGroup>
+
+ <Import Project="pyproject.props" />
+
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <PreprocessorDefinitions Include="DSO_WIN32" />
+ <PreprocessorDefinitions Include="WIN32_LEAN_AND_MEAN" />
+ <PreprocessorDefinitions Include="L_ENDIAN" />
+ <PreprocessorDefinitions Include="_CRT_SECURE_NO_WARNINGS" />
+ <PreprocessorDefinitions Include="_CRT_SECURE_NO_DEPRECATE" />
+ <PreprocessorDefinitions Include="OPENSSL_THREADS" />
+ <!-- <PreprocessorDefinitions Include="OPENSSL_SYSNAME_WIN32" /> -->
+ <PreprocessorDefinitions Include="OPENSSL_IA32_SSE2" />
+ <PreprocessorDefinitions Include="SHA1_ASM" />
+ <PreprocessorDefinitions Include="SHA256_ASM" />
+ <PreprocessorDefinitions Include="SHA512_ASM" />
+ <PreprocessorDefinitions Include="MD5_ASM" />
+ <PreprocessorDefinitions Include="AES_ASM" />
+ <PreprocessorDefinitions Include="VPAES_ASM" />
+ <PreprocessorDefinitions Include="WHIRLPOOL_ASM" />
+ <PreprocessorDefinitions Include="GHASH_ASM" />
+ <PreprocessorDefinitions Include="OPENSSL_NO_IDEA" />
+ <PreprocessorDefinitions Include="OPENSSL_NO_RC5" />
+ <PreprocessorDefinitions Include="OPENSSL_NO_MD2" />
+ <PreprocessorDefinitions Include="OPENSSL_NO_MDC2" />
+ <PreprocessorDefinitions Include="OPENSSL_NO_KRB5" />
+ <PreprocessorDefinitions Include="OPENSSL_NO_JPAKE" />
+ <PreprocessorDefinitions Include="OPENSSL_NO_RDRAND" />
+ <PreprocessorDefinitions Include="OPENSSL_NO_RSAX" />
+ <PreprocessorDefinitions Include="OPENSSL_NO_DYNAMIC_ENGINE" />
+ </ItemGroup>
+ <ItemGroup Condition="'$(Platform)'=='Win32'">
+ <PreprocessorDefinitions Include="OPENSSL_BN_ASM_GF2m" />
+ <PreprocessorDefinitions Include="OPENSSL_BN_ASM_PART_WORDS" />
+ <PreprocessorDefinitions Include="OPENSSL_BN_ASM_MONT" />
+ <PreprocessorDefinitions Include="RMD160_ASM" />
+ </ItemGroup>
+
+ <PropertyGroup>
+ <_PreprocessorDefinitionList>@(PreprocessorDefinitions)</_PreprocessorDefinitionList>
+ </PropertyGroup>
+
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <!-- Suppress 64-bit truncation warnings - they aren't ours to worry about -->
+ <DisableSpecificWarnings>4244;4267</DisableSpecificWarnings>
+ <AdditionalIncludeDirectories>$(opensslDir);$(opensslIncludeDir);$(opensslDir)crypto;$(opensslDir)crypto\asn1;$(opensslDir)crypto\evp;$(opensslDir)crypto\modes</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>$(_PreprocessorDefinitionList);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemDefinitionGroup>
+
+ <Target Name="FindNasm">
+ <PropertyGroup>
+ <nasm Condition="$(Platform) == 'Win32'">nasm.exe -f win32</nasm>
+ <nasm Condition="$(Platform) == 'x64'">nasm.exe -f win64 -DNEAR -Ox -g</nasm>
+ </PropertyGroup>
+ </Target>
+
+ <Target Name="BuildNasmFiles" BeforeTargets="PreBuildEvent" DependsOnTargets="PrepareForBuild;FindNasm" Inputs="@(NasmCompile)" Outputs="@(NasmCompile->'$(IntDir)%(Filename).obj')">
+ <Exec Command='setlocal
+set PATH=$(nasmDir);%PATH%
+$(nasm) -o "$(IntDir)%(NasmCompile.Filename).obj" "%(NasmCompile.FullPath)"' />
+ <ItemGroup>
+ <Link Include="$(IntDir)%(NasmCompile.Filename).obj" />
+ <Lib Include="$(IntDir)%(NasmCompile.Filename).obj" />
+ </ItemGroup>
+ </Target>
+</Project>
diff --git a/PCbuild/pcbuild.proj b/PCbuild/pcbuild.proj
new file mode 100644
index 0000000000..36621c910c
--- /dev/null
+++ b/PCbuild/pcbuild.proj
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{CC9B93A2-439D-4058-9D29-6DCF43774405}</ProjectGuid>
+ <Platform Condition="'$(Platform)' == ''">Win32</Platform>
+ <Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
+ <IncludeExtensions Condition="'$(IncludeExtensions)' == ''">true</IncludeExtensions>
+ <IncludeExternals Condition="'$(IncludeExternals)' == ''">true</IncludeExternals>
+ <IncludeTests Condition="'$(IncludeTest)' == ''">true</IncludeTests>
+ <IncludeSSL Condition="'$(IncludeSSL)' == ''">true</IncludeSSL>
+ <IncludeTkinter Condition="'$(IncludeTkinter)' == ''">true</IncludeTkinter>
+ </PropertyGroup>
+
+ <ItemDefinitionGroup>
+ <Projects>
+ <Platform>$(Platform)</Platform>
+ <Configuration>$(Configuration)</Configuration>
+ <Properties></Properties>
+ <BuildTarget>Build</BuildTarget>
+ <CleanTarget>Clean</CleanTarget>
+ <CleanAllTarget>CleanAll</CleanAllTarget>
+ <BuildInParallel>true</BuildInParallel>
+ </Projects>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <!-- pythonXY.dll -->
+ <!--
+ Parallel build is explicitly disabled for this project because it
+ causes many conflicts between pythoncore and projects that depend
+ on pythoncore. Once the core DLL has been built, subsequent
+ projects will be built in parallel.
+ -->
+ <Projects Include="pythoncore.vcxproj">
+ <BuildInParallel>false</BuildInParallel>
+ </Projects>
+ <!-- python[w].exe -->
+ <Projects Include="python.vcxproj;pythonw.vcxproj" />
+ <!-- python3.dll -->
+ <Projects Include="python3dll.vcxproj" />
+ <!-- py[w].exe -->
+ <Projects Include="pylauncher.vcxproj;pywlauncher.vcxproj" />
+ <!-- _freeze_importlib -->
+ <Projects Include="_freeze_importlib.vcxproj" />
+ <!-- Extension modules -->
+ <ExtensionModules Include="_ctypes;_decimal;_elementtree;_msi;_multiprocessing;_overlapped;pyexpat;select;unicodedata;winsound" />
+ <!-- Extension modules that require external sources -->
+ <ExternalModules Include="_bz2;_lzma;_sqlite3" />
+ <!-- _ssl will build _socket as well, which may cause conflicts in parallel builds -->
+ <ExtensionModules Include="_socket" Condition="!$(IncludeSSL) or !$(IncludeExternals)" />
+ <ExternalModules Include="_ssl;_hashlib" Condition="$(IncludeSSL)" />
+ <ExternalModules Include="_tkinter;tix" Condition="$(IncludeTkinter)" />
+ <ExtensionModules Include="@(ExternalModules->'%(Identity)')" Condition="$(IncludeExternals)" />
+ <Projects Include="@(ExtensionModules->'%(Identity).vcxproj')" Condition="$(IncludeExtensions)" />
+ <!-- Test modules -->
+ <TestModules Include="_ctypes_test;_testbuffer;_testcapi;_testembed;_testimportmultiple;_testmultiphase" />
+ <TestModules Include="xxlimited" Condition="'$(Configuration)' == 'Release'" />
+ <Projects Include="@(TestModules->'%(Identity).vcxproj')" Condition="$(IncludeTests)">
+ <!-- Disable parallel build for test modules -->
+ <BuildInParallel>false</BuildInParallel>
+ </Projects>
+ </ItemGroup>
+
+ <Target Name="Build">
+ <MSBuild Projects="@(Projects)"
+ Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"
+ BuildInParallel="%(BuildInParallel)"
+ Targets="%(BuildTarget)" />
+ </Target>
+
+ <Target Name="Clean">
+ <MSBuild Projects="@(Projects)"
+ Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"
+ BuildInParallel="%(BuildInParallel)"
+ StopOnFirstFailure="false"
+ Condition="%(CleanTarget) != ''"
+ Targets="%(CleanTarget)" />
+ </Target>
+
+ <Target Name="CleanAll">
+ <MSBuild Projects="@(Projects)"
+ Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"
+ BuildInParallel="%(BuildInParallel)"
+ StopOnFirstFailure="false"
+ Condition="%(CleanAllTarget) != ''"
+ Targets="%(CleanAllTarget)" />
+ </Target>
+
+ <Target Name="Rebuild" DependsOnTargets="Clean;Build" />
+ <Target Name="RebuildAll" DependsOnTargets="CleanAll;Build" />
+</Project> \ No newline at end of file
diff --git a/PCbuild/pcbuild.sln b/PCbuild/pcbuild.sln
index a346e10800..766a870684 100644
--- a/PCbuild/pcbuild.sln
+++ b/PCbuild/pcbuild.sln
@@ -1,5 +1,7 @@
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+VisualStudioVersion = 14.0.22823.1
+MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{553EC33E-9816-4996-A660-5D6186A0B0B3}"
ProjectSection(SolutionItems) = preProject
..\Modules\getbuildinfo.c = ..\Modules\getbuildinfo.c
@@ -8,14 +10,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python", "python.vcxproj", "{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_versioninfo", "make_versioninfo.vcxproj", "{F0E0541E-F17D-430B-97C4-93ADF0DD284E}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcxproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonw", "pythonw.vcxproj", "{F4229CC3-873C-49AE-9729-DD308ED4CD4A}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_buildinfo", "make_buildinfo.vcxproj", "{C73F0EC1-358B-4177-940F-0846AC8B04CD}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsound", "winsound.vcxproj", "{28B5D777-DDF2-4B6B-B34F-31D938813856}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_decimal", "_decimal.vcxproj", "{0E9791DB-593A-465F-98BC-681011311617}"
@@ -50,7 +48,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unicodedata", "unicodedata.
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyexpat", "pyexpat.vcxproj", "{D06B6426-4762-44CC-8BAD-D79052507F2F}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bdist_wininst", "bdist_wininst.vcxproj", "{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bdist_wininst", "..\PC\bdist_wininst\bdist_wininst.vcxproj", "{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_hashlib", "_hashlib.vcxproj", "{447F05A8-F581-4CAC-A466-5AC7936E207E}"
EndProject
@@ -58,10 +56,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite3", "sqlite3.vcxproj"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_multiprocessing", "_multiprocessing.vcxproj", "{9E48B300-37D1-11DD-8C41-005056C00008}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssl", "ssl.vcxproj", "{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kill_python", "kill_python.vcxproj", "{6DE10744-E396-40A5-B4E2-1B69AA7C8D31}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python3dll", "python3dll.vcxproj", "{885D4898-D08D-4091-9C40-C700CFE3FC5A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xxlimited", "xxlimited.vcxproj", "{F749B822-B489-4CA5-A3AD-CE078F5F338A}"
@@ -78,6 +72,18 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_overlapped", "_overlapped.
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testembed", "_testembed.vcxproj", "{6DAC66D9-E703-4624-BE03-49112AB5AA62}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testmultiphase", "_testmultiphase.vcxproj", "{16BFE6F0-22EF-40B5-B831-7E937119EF10}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tcl", "tcl.vcxproj", "{B5FD6F1D-129E-4BFF-9340-03606FAC7283}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tix", "tix.vcxproj", "{C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tk", "tk.vcxproj", "{7E85ECCF-A72C-4DA4-9E52-884508E80BA1}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libeay", "libeay.vcxproj", "{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssleay", "ssleay.vcxproj", "{10615B24-73BF-4EFA-93AA-236916321317}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -106,22 +112,6 @@ Global
{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|Win32.Build.0 = Release|Win32
{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|x64.ActiveCfg = Release|x64
{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}.Release|x64.Build.0 = Release|x64
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.ActiveCfg = Debug|Win32
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|Win32.Build.0 = Debug|Win32
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|x64.ActiveCfg = Debug|Win32
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Debug|x64.Build.0 = Debug|Win32
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|Win32.ActiveCfg = Release|Win32
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|Win32.Build.0 = Release|Win32
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|x64.ActiveCfg = Release|Win32
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGInstrument|x64.Build.0 = Release|Win32
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|Win32.ActiveCfg = Release|Win32
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|Win32.Build.0 = Release|Win32
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|x64.ActiveCfg = Release|Win32
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.PGUpdate|x64.Build.0 = Release|Win32
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|Win32.ActiveCfg = Release|Win32
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|Win32.Build.0 = Release|Win32
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|x64.ActiveCfg = Release|Win32
- {F0E0541E-F17D-430B-97C4-93ADF0DD284E}.Release|x64.Build.0 = Release|Win32
{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|Win32.ActiveCfg = Debug|Win32
{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|Win32.Build.0 = Debug|Win32
{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}.Debug|x64.ActiveCfg = Debug|x64
@@ -142,34 +132,18 @@ Global
{F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|Win32.Build.0 = Debug|Win32
{F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|x64.ActiveCfg = Debug|x64
{F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Debug|x64.Build.0 = Debug|x64
- {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|x64.Build.0 = PGUpdate|x64
+ {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|Win32.ActiveCfg = Release|Win32
+ {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|Win32.Build.0 = Release|Win32
+ {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|x64.ActiveCfg = Release|x64
+ {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGInstrument|x64.Build.0 = Release|x64
+ {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|Win32.ActiveCfg = Release|Win32
+ {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|Win32.Build.0 = Release|Win32
+ {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|x64.ActiveCfg = Release|x64
+ {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.PGUpdate|x64.Build.0 = Release|x64
{F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|Win32.ActiveCfg = Release|Win32
{F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|Win32.Build.0 = Release|Win32
{F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|x64.ActiveCfg = Release|x64
{F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|x64.Build.0 = Release|x64
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|Win32.ActiveCfg = Release|Win32
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|Win32.Build.0 = Release|Win32
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|x64.ActiveCfg = Release|Win32
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|x64.Build.0 = Release|Win32
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|Win32.ActiveCfg = Release|Win32
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|Win32.Build.0 = Release|Win32
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|x64.ActiveCfg = Release|Win32
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|x64.Build.0 = Release|Win32
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|Win32.ActiveCfg = Release|Win32
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|Win32.Build.0 = Release|Win32
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|x64.ActiveCfg = Release|Win32
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|x64.Build.0 = Release|Win32
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|Win32.ActiveCfg = Release|Win32
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|Win32.Build.0 = Release|Win32
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|x64.ActiveCfg = Release|Win32
- {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|x64.Build.0 = Release|Win32
{28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|Win32.ActiveCfg = Debug|Win32
{28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|Win32.Build.0 = Debug|Win32
{28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|x64.ActiveCfg = Debug|x64
@@ -222,14 +196,14 @@ Global
{9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|Win32.Build.0 = Debug|Win32
{9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|x64.ActiveCfg = Debug|x64
{9EC7190A-249F-4180-A900-548FDCF3055F}.Debug|x64.Build.0 = Debug|x64
- {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|x64.Build.0 = PGUpdate|x64
+ {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|Win32.ActiveCfg = Release|Win32
+ {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|Win32.Build.0 = Release|Win32
+ {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|x64.ActiveCfg = Release|x64
+ {9EC7190A-249F-4180-A900-548FDCF3055F}.PGInstrument|x64.Build.0 = Release|x64
+ {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|Win32.ActiveCfg = Release|Win32
+ {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|Win32.Build.0 = Release|Win32
+ {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|x64.ActiveCfg = Release|x64
+ {9EC7190A-249F-4180-A900-548FDCF3055F}.PGUpdate|x64.Build.0 = Release|x64
{9EC7190A-249F-4180-A900-548FDCF3055F}.Release|Win32.ActiveCfg = Release|Win32
{9EC7190A-249F-4180-A900-548FDCF3055F}.Release|Win32.Build.0 = Release|Win32
{9EC7190A-249F-4180-A900-548FDCF3055F}.Release|x64.ActiveCfg = Release|x64
@@ -334,14 +308,14 @@ Global
{36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.Debug|Win32.Build.0 = Debug|Win32
{36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.Debug|x64.ActiveCfg = Debug|x64
{36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.Debug|x64.Build.0 = Debug|x64
- {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGUpdate|x64.Build.0 = PGUpdate|x64
+ {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGInstrument|Win32.ActiveCfg = Release|Win32
+ {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGInstrument|Win32.Build.0 = Release|Win32
+ {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGInstrument|x64.ActiveCfg = Release|x64
+ {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGInstrument|x64.Build.0 = Release|x64
+ {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGUpdate|Win32.ActiveCfg = Release|Win32
+ {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGUpdate|Win32.Build.0 = Release|Win32
+ {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGUpdate|x64.ActiveCfg = Release|x64
+ {36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.PGUpdate|x64.Build.0 = Release|x64
{36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.Release|Win32.ActiveCfg = Release|Win32
{36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.Release|Win32.Build.0 = Release|Win32
{36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}.Release|x64.ActiveCfg = Release|x64
@@ -442,7 +416,7 @@ Global
{D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|Win32.Build.0 = Release|Win32
{D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|x64.ActiveCfg = Release|x64
{D06B6426-4762-44CC-8BAD-D79052507F2F}.Release|x64.Build.0 = Release|x64
- {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|Win32.ActiveCfg = Release|Win32
+ {EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|Win32.ActiveCfg = Debug|Win32
{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.Debug|x64.ActiveCfg = Release|x64
{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGInstrument|Win32.ActiveCfg = Release|Win32
{EB1C19C1-1F18-421E-9735-CAEE69DC6A3C}.PGInstrument|x64.ActiveCfg = Release|x64
@@ -498,49 +472,18 @@ Global
{9E48B300-37D1-11DD-8C41-005056C00008}.Release|Win32.Build.0 = Release|Win32
{9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.ActiveCfg = Release|x64
{9E48B300-37D1-11DD-8C41-005056C00008}.Release|x64.Build.0 = Release|x64
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|Win32.ActiveCfg = Debug|Win32
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|Win32.Build.0 = Debug|Win32
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|x64.ActiveCfg = Debug|x64
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|x64.Build.0 = Debug|x64
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|x64.Build.0 = PGUpdate|x64
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|Win32.ActiveCfg = Release|Win32
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|Win32.Build.0 = Release|Win32
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|x64.ActiveCfg = Release|x64
- {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|x64.Build.0 = Release|x64
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|Win32.ActiveCfg = Debug|Win32
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|Win32.Build.0 = Debug|Win32
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|x64.ActiveCfg = Debug|x64
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Debug|x64.Build.0 = Debug|x64
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|Win32.ActiveCfg = Release|Win32
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|Win32.Build.0 = Release|Win32
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|x64.ActiveCfg = Release|x64
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGInstrument|x64.Build.0 = Release|x64
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|Win32.ActiveCfg = Release|Win32
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|Win32.Build.0 = Release|Win32
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|x64.ActiveCfg = Release|x64
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.PGUpdate|x64.Build.0 = Release|x64
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|Win32.ActiveCfg = Release|Win32
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|Win32.Build.0 = Release|Win32
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|x64.ActiveCfg = Release|x64
- {6DE10744-E396-40A5-B4E2-1B69AA7C8D31}.Release|x64.Build.0 = Release|x64
- {885D4898-D08D-4091-9C40-C700CFE3FC5A}.Debug|Win32.ActiveCfg = PGInstrument|Win32
- {885D4898-D08D-4091-9C40-C700CFE3FC5A}.Debug|x64.ActiveCfg = PGUpdate|x64
- {885D4898-D08D-4091-9C40-C700CFE3FC5A}.Debug|x64.Build.0 = PGUpdate|x64
- {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGUpdate|x64.Build.0 = PGUpdate|x64
+ {885D4898-D08D-4091-9C40-C700CFE3FC5A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {885D4898-D08D-4091-9C40-C700CFE3FC5A}.Debug|Win32.Build.0 = Debug|Win32
+ {885D4898-D08D-4091-9C40-C700CFE3FC5A}.Debug|x64.ActiveCfg = Debug|x64
+ {885D4898-D08D-4091-9C40-C700CFE3FC5A}.Debug|x64.Build.0 = Debug|x64
+ {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGInstrument|Win32.ActiveCfg = Debug|Win32
+ {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGInstrument|Win32.Build.0 = Debug|Win32
+ {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGInstrument|x64.ActiveCfg = Debug|x64
+ {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGInstrument|x64.Build.0 = Debug|x64
+ {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGUpdate|Win32.ActiveCfg = Debug|Win32
+ {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGUpdate|Win32.Build.0 = Debug|Win32
+ {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGUpdate|x64.ActiveCfg = Debug|x64
+ {885D4898-D08D-4091-9C40-C700CFE3FC5A}.PGUpdate|x64.Build.0 = Debug|x64
{885D4898-D08D-4091-9C40-C700CFE3FC5A}.Release|Win32.ActiveCfg = Release|Win32
{885D4898-D08D-4091-9C40-C700CFE3FC5A}.Release|Win32.Build.0 = Release|Win32
{885D4898-D08D-4091-9C40-C700CFE3FC5A}.Release|x64.ActiveCfg = Release|x64
@@ -563,14 +506,14 @@ Global
{A2697BD3-28C1-4AEC-9106-8B748639FD16}.Debug|Win32.Build.0 = Debug|Win32
{A2697BD3-28C1-4AEC-9106-8B748639FD16}.Debug|x64.ActiveCfg = Debug|x64
{A2697BD3-28C1-4AEC-9106-8B748639FD16}.Debug|x64.Build.0 = Debug|x64
- {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGInstrument|x64.ActiveCfg = PGInstrument|x64
- {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGInstrument|x64.Build.0 = PGInstrument|x64
- {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGUpdate|x64.ActiveCfg = PGUpdate|x64
- {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGUpdate|x64.Build.0 = PGUpdate|x64
+ {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGInstrument|Win32.ActiveCfg = Release|Win32
+ {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGInstrument|Win32.Build.0 = Release|Win32
+ {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGInstrument|x64.ActiveCfg = Release|x64
+ {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGInstrument|x64.Build.0 = Release|x64
+ {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGUpdate|Win32.ActiveCfg = Release|Win32
+ {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGUpdate|Win32.Build.0 = Release|Win32
+ {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGUpdate|x64.ActiveCfg = Release|x64
+ {A2697BD3-28C1-4AEC-9106-8B748639FD16}.PGUpdate|x64.Build.0 = Release|x64
{A2697BD3-28C1-4AEC-9106-8B748639FD16}.Release|Win32.ActiveCfg = Release|Win32
{A2697BD3-28C1-4AEC-9106-8B748639FD16}.Release|Win32.Build.0 = Release|Win32
{A2697BD3-28C1-4AEC-9106-8B748639FD16}.Release|x64.ActiveCfg = Release|x64
@@ -579,34 +522,34 @@ Global
{7B2727B5-5A3F-40EE-A866-43A13CD31446}.Debug|Win32.Build.0 = Debug|Win32
{7B2727B5-5A3F-40EE-A866-43A13CD31446}.Debug|x64.ActiveCfg = Debug|x64
{7B2727B5-5A3F-40EE-A866-43A13CD31446}.Debug|x64.Build.0 = Debug|x64
- {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGInstrument|x64.ActiveCfg = PGInstrument|Win32
- {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGInstrument|x64.Build.0 = PGInstrument|Win32
- {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGUpdate|x64.ActiveCfg = PGUpdate|Win32
- {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGUpdate|x64.Build.0 = PGUpdate|Win32
+ {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGInstrument|Win32.ActiveCfg = Release|Win32
+ {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGInstrument|Win32.Build.0 = Release|Win32
+ {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGInstrument|x64.ActiveCfg = Release|x64
+ {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGInstrument|x64.Build.0 = Release|x64
+ {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGUpdate|Win32.ActiveCfg = Release|Win32
+ {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGUpdate|Win32.Build.0 = Release|Win32
+ {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGUpdate|x64.ActiveCfg = Release|x64
+ {7B2727B5-5A3F-40EE-A866-43A13CD31446}.PGUpdate|x64.Build.0 = Release|x64
{7B2727B5-5A3F-40EE-A866-43A13CD31446}.Release|Win32.ActiveCfg = Release|Win32
{7B2727B5-5A3F-40EE-A866-43A13CD31446}.Release|Win32.Build.0 = Release|Win32
- {7B2727B5-5A3F-40EE-A866-43A13CD31446}.Release|x64.ActiveCfg = Release|Win32
- {7B2727B5-5A3F-40EE-A866-43A13CD31446}.Release|x64.Build.0 = Release|Win32
+ {7B2727B5-5A3F-40EE-A866-43A13CD31446}.Release|x64.ActiveCfg = Release|x64
+ {7B2727B5-5A3F-40EE-A866-43A13CD31446}.Release|x64.Build.0 = Release|x64
{1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.Debug|Win32.ActiveCfg = Debug|Win32
{1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.Debug|Win32.Build.0 = Debug|Win32
{1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.Debug|x64.ActiveCfg = Debug|x64
{1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.Debug|x64.Build.0 = Debug|x64
- {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGInstrument|Win32.ActiveCfg = PGInstrument|Win32
- {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGInstrument|Win32.Build.0 = PGInstrument|Win32
- {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGInstrument|x64.ActiveCfg = PGInstrument|Win32
- {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGInstrument|x64.Build.0 = PGInstrument|Win32
- {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGUpdate|Win32.ActiveCfg = PGUpdate|Win32
- {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGUpdate|Win32.Build.0 = PGUpdate|Win32
- {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGUpdate|x64.ActiveCfg = PGUpdate|Win32
- {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGUpdate|x64.Build.0 = PGUpdate|Win32
+ {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGInstrument|Win32.ActiveCfg = Release|Win32
+ {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGInstrument|Win32.Build.0 = Release|Win32
+ {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGInstrument|x64.ActiveCfg = Release|x64
+ {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGInstrument|x64.Build.0 = Release|x64
+ {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGUpdate|Win32.ActiveCfg = Release|Win32
+ {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGUpdate|Win32.Build.0 = Release|Win32
+ {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGUpdate|x64.ActiveCfg = Release|x64
+ {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.PGUpdate|x64.Build.0 = Release|x64
{1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.Release|Win32.ActiveCfg = Release|Win32
{1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.Release|Win32.Build.0 = Release|Win32
- {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.Release|x64.ActiveCfg = Release|Win32
- {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.Release|x64.Build.0 = Release|Win32
+ {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.Release|x64.ActiveCfg = Release|x64
+ {1D4B18D3-7C12-4ECB-9179-8531FF876CE6}.Release|x64.Build.0 = Release|x64
{19C0C13F-47CA-4432-AFF3-799A296A4DDC}.Debug|Win32.ActiveCfg = Debug|Win32
{19C0C13F-47CA-4432-AFF3-799A296A4DDC}.Debug|x64.ActiveCfg = Debug|x64
{19C0C13F-47CA-4432-AFF3-799A296A4DDC}.PGInstrument|Win32.ActiveCfg = Release|Win32
@@ -614,7 +557,9 @@ Global
{19C0C13F-47CA-4432-AFF3-799A296A4DDC}.PGUpdate|Win32.ActiveCfg = Release|Win32
{19C0C13F-47CA-4432-AFF3-799A296A4DDC}.PGUpdate|x64.ActiveCfg = Release|Win32
{19C0C13F-47CA-4432-AFF3-799A296A4DDC}.Release|Win32.ActiveCfg = Release|Win32
+ {19C0C13F-47CA-4432-AFF3-799A296A4DDC}.Release|Win32.Build.0 = Release|Win32
{19C0C13F-47CA-4432-AFF3-799A296A4DDC}.Release|x64.ActiveCfg = Release|x64
+ {19C0C13F-47CA-4432-AFF3-799A296A4DDC}.Release|x64.Build.0 = Release|x64
{EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.Debug|Win32.ActiveCfg = Debug|Win32
{EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.Debug|Win32.Build.0 = Debug|Win32
{EB6E69DD-04BF-4543-9B92-49FAABCEAC2E}.Debug|x64.ActiveCfg = Debug|x64
@@ -645,6 +590,100 @@ Global
{6DAC66D9-E703-4624-BE03-49112AB5AA62}.Release|Win32.Build.0 = Release|Win32
{6DAC66D9-E703-4624-BE03-49112AB5AA62}.Release|x64.ActiveCfg = Release|x64
{6DAC66D9-E703-4624-BE03-49112AB5AA62}.Release|x64.Build.0 = Release|x64
+ {16BFE6F0-22EF-40B5-B831-7E937119EF10}.Debug|Win32.ActiveCfg = Debug|Win32
+ {16BFE6F0-22EF-40B5-B831-7E937119EF10}.Debug|Win32.Build.0 = Debug|Win32
+ {16BFE6F0-22EF-40B5-B831-7E937119EF10}.Debug|x64.ActiveCfg = Debug|x64
+ {16BFE6F0-22EF-40B5-B831-7E937119EF10}.Debug|x64.Build.0 = Debug|x64
+ {16BFE6F0-22EF-40B5-B831-7E937119EF10}.PGInstrument|Win32.ActiveCfg = Release|Win32
+ {16BFE6F0-22EF-40B5-B831-7E937119EF10}.PGInstrument|x64.ActiveCfg = Release|x64
+ {16BFE6F0-22EF-40B5-B831-7E937119EF10}.PGUpdate|Win32.ActiveCfg = Release|Win32
+ {16BFE6F0-22EF-40B5-B831-7E937119EF10}.PGUpdate|Win32.Build.0 = Release|Win32
+ {16BFE6F0-22EF-40B5-B831-7E937119EF10}.PGUpdate|x64.ActiveCfg = Release|x64
+ {16BFE6F0-22EF-40B5-B831-7E937119EF10}.PGUpdate|x64.Build.0 = Release|x64
+ {16BFE6F0-22EF-40B5-B831-7E937119EF10}.Release|Win32.ActiveCfg = Release|Win32
+ {16BFE6F0-22EF-40B5-B831-7E937119EF10}.Release|Win32.Build.0 = Release|Win32
+ {16BFE6F0-22EF-40B5-B831-7E937119EF10}.Release|x64.ActiveCfg = Release|x64
+ {16BFE6F0-22EF-40B5-B831-7E937119EF10}.Release|x64.Build.0 = Release|x64
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Debug|Win32.ActiveCfg = Debug|Win32
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Debug|Win32.Build.0 = Debug|Win32
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Debug|x64.ActiveCfg = Debug|x64
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Debug|x64.Build.0 = Debug|x64
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGInstrument|Win32.ActiveCfg = Release|Win32
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGInstrument|Win32.Build.0 = Release|Win32
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGInstrument|x64.ActiveCfg = Release|x64
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGInstrument|x64.Build.0 = Release|x64
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGUpdate|Win32.ActiveCfg = Release|Win32
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGUpdate|Win32.Build.0 = Release|Win32
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGUpdate|x64.ActiveCfg = Release|x64
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.PGUpdate|x64.Build.0 = Release|x64
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Release|Win32.ActiveCfg = Release|Win32
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Release|Win32.Build.0 = Release|Win32
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Release|x64.ActiveCfg = Release|x64
+ {B5FD6F1D-129E-4BFF-9340-03606FAC7283}.Release|x64.Build.0 = Release|x64
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Debug|Win32.Build.0 = Debug|Win32
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Debug|x64.ActiveCfg = Debug|x64
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Debug|x64.Build.0 = Debug|x64
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGInstrument|Win32.ActiveCfg = Release|Win32
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGInstrument|Win32.Build.0 = Release|Win32
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGInstrument|x64.ActiveCfg = Release|x64
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGInstrument|x64.Build.0 = Release|x64
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGUpdate|Win32.ActiveCfg = Release|Win32
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGUpdate|Win32.Build.0 = Release|Win32
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGUpdate|x64.ActiveCfg = Release|x64
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.PGUpdate|x64.Build.0 = Release|x64
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Release|Win32.ActiveCfg = Release|Win32
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Release|Win32.Build.0 = Release|Win32
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Release|x64.ActiveCfg = Release|x64
+ {C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}.Release|x64.Build.0 = Release|x64
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Debug|Win32.ActiveCfg = Debug|Win32
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Debug|Win32.Build.0 = Debug|Win32
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Debug|x64.ActiveCfg = Debug|x64
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Debug|x64.Build.0 = Debug|x64
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGInstrument|Win32.ActiveCfg = Release|Win32
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGInstrument|Win32.Build.0 = Release|Win32
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGInstrument|x64.ActiveCfg = Release|x64
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGInstrument|x64.Build.0 = Release|x64
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGUpdate|Win32.ActiveCfg = Release|Win32
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGUpdate|Win32.Build.0 = Release|Win32
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGUpdate|x64.ActiveCfg = Release|x64
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.PGUpdate|x64.Build.0 = Release|x64
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Release|Win32.ActiveCfg = Release|Win32
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Release|Win32.Build.0 = Release|Win32
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Release|x64.ActiveCfg = Release|x64
+ {7E85ECCF-A72C-4DA4-9E52-884508E80BA1}.Release|x64.Build.0 = Release|x64
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|Win32.Build.0 = Debug|Win32
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|x64.ActiveCfg = Debug|x64
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Debug|x64.Build.0 = Debug|x64
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|Win32.ActiveCfg = Release|Win32
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|Win32.Build.0 = Release|Win32
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|x64.ActiveCfg = Release|x64
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGInstrument|x64.Build.0 = Release|x64
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|Win32.ActiveCfg = Release|Win32
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|Win32.Build.0 = Release|Win32
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|x64.ActiveCfg = Release|x64
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.PGUpdate|x64.Build.0 = Release|x64
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|Win32.ActiveCfg = Release|Win32
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|Win32.Build.0 = Release|Win32
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|x64.ActiveCfg = Release|x64
+ {E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}.Release|x64.Build.0 = Release|x64
+ {10615B24-73BF-4EFA-93AA-236916321317}.Debug|Win32.ActiveCfg = Debug|Win32
+ {10615B24-73BF-4EFA-93AA-236916321317}.Debug|Win32.Build.0 = Debug|Win32
+ {10615B24-73BF-4EFA-93AA-236916321317}.Debug|x64.ActiveCfg = Debug|x64
+ {10615B24-73BF-4EFA-93AA-236916321317}.Debug|x64.Build.0 = Debug|x64
+ {10615B24-73BF-4EFA-93AA-236916321317}.PGInstrument|Win32.ActiveCfg = Release|Win32
+ {10615B24-73BF-4EFA-93AA-236916321317}.PGInstrument|Win32.Build.0 = Release|Win32
+ {10615B24-73BF-4EFA-93AA-236916321317}.PGInstrument|x64.ActiveCfg = Release|x64
+ {10615B24-73BF-4EFA-93AA-236916321317}.PGInstrument|x64.Build.0 = Release|x64
+ {10615B24-73BF-4EFA-93AA-236916321317}.PGUpdate|Win32.ActiveCfg = Release|Win32
+ {10615B24-73BF-4EFA-93AA-236916321317}.PGUpdate|Win32.Build.0 = Release|Win32
+ {10615B24-73BF-4EFA-93AA-236916321317}.PGUpdate|x64.ActiveCfg = Release|x64
+ {10615B24-73BF-4EFA-93AA-236916321317}.PGUpdate|x64.Build.0 = Release|x64
+ {10615B24-73BF-4EFA-93AA-236916321317}.Release|Win32.ActiveCfg = Release|Win32
+ {10615B24-73BF-4EFA-93AA-236916321317}.Release|Win32.Build.0 = Release|Win32
+ {10615B24-73BF-4EFA-93AA-236916321317}.Release|x64.ActiveCfg = Release|x64
+ {10615B24-73BF-4EFA-93AA-236916321317}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/PCbuild/pginstrument.props b/PCbuild/pginstrument.props
deleted file mode 100644
index 5584995d20..0000000000
--- a/PCbuild/pginstrument.props
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup Label="UserMacros">
- <OutDirPGI>$(SolutionDir)$(Platform)-pgi\</OutDirPGI>
- </PropertyGroup>
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir>$(OutDirPGI)\</OutDir>
- <IntDir>$(SolutionDir)$(PlatformName)-temp-pgi\$(ProjectName)\</IntDir>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <IntrinsicFunctions>false</IntrinsicFunctions>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <OmitFramePointers>true</OmitFramePointers>
- <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <StringPooling>true</StringPooling>
- <ExceptionHandling>
- </ExceptionHandling>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- </ClCompile>
- <Link>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>false</EnableCOMDATFolding>
- <LinkTimeCodeGeneration>PGInstrument</LinkTimeCodeGeneration>
- <ProfileGuidedDatabase>$(SolutionDir)$(Platform)-pgi\$(TargetName).pgd</ProfileGuidedDatabase>
- <ImportLibrary>$(OutDirPGI)\$(TargetName).lib</ImportLibrary>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <BuildMacro Include="OutDirPGI">
- <Value>$(OutDirPGI)</Value>
- </BuildMacro>
- </ItemGroup>
-</Project>
diff --git a/PCbuild/pgupdate.props b/PCbuild/pgupdate.props
deleted file mode 100644
index d775a02c73..0000000000
--- a/PCbuild/pgupdate.props
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ImportGroup Label="PropertySheets">
- <Import Project="$(SolutionDir)\pginstrument.props" />
- </ImportGroup>
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir>$(SolutionDir)$(PlatformName)-pgo\</OutDir>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <Link>
- <AdditionalManifestDependencies>%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
- <LinkTimeCodeGeneration>PGUpdate</LinkTimeCodeGeneration>
- <ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary>
- </Link>
- </ItemDefinitionGroup>
-</Project> \ No newline at end of file
diff --git a/PCbuild/prepare_ssl.bat b/PCbuild/prepare_ssl.bat
new file mode 100644
index 0000000000..1be73e6c36
--- /dev/null
+++ b/PCbuild/prepare_ssl.bat
@@ -0,0 +1,12 @@
+@echo off
+if not defined HOST_PYTHON (
+ if "%1" EQU "Debug" (
+ shift
+ set HOST_PYTHON=python_d.exe
+ if not exist python35_d.dll exit 1
+ ) ELSE (
+ set HOST_PYTHON=python.exe
+ if not exist python35.dll exit 1
+ )
+)
+%HOST_PYTHON% "%~dp0prepare_ssl.py" %1
diff --git a/PCbuild/prepare_ssl.py b/PCbuild/prepare_ssl.py
new file mode 100644
index 0000000000..f6170f5808
--- /dev/null
+++ b/PCbuild/prepare_ssl.py
@@ -0,0 +1,196 @@
+#! /usr/bin/env python3
+# Script for preparing OpenSSL for building on Windows.
+# Uses Perl to create nmake makefiles and otherwise prepare the way
+# for building on 32 or 64 bit platforms.
+
+# Script originally authored by Mark Hammond.
+# Major revisions by:
+# Martin v. Löwis
+# Christian Heimes
+# Zachary Ware
+
+# THEORETICALLY, you can:
+# * Unpack the latest OpenSSL release where $(opensslDir) in
+# PCbuild\pyproject.props expects it to be.
+# * Install ActivePerl and ensure it is somewhere on your path.
+# * Run this script with the OpenSSL source dir as the only argument.
+#
+# it should configure OpenSSL such that it is ready to be built by
+# ssl.vcxproj on 32 or 64 bit platforms.
+
+import os
+import re
+import sys
+import subprocess
+from shutil import copy
+
+# Find all "foo.exe" files on the PATH.
+def find_all_on_path(filename, extras=None):
+ entries = os.environ["PATH"].split(os.pathsep)
+ ret = []
+ for p in entries:
+ fname = os.path.abspath(os.path.join(p, filename))
+ if os.path.isfile(fname) and fname not in ret:
+ ret.append(fname)
+ if extras:
+ for p in extras:
+ fname = os.path.abspath(os.path.join(p, filename))
+ if os.path.isfile(fname) and fname not in ret:
+ ret.append(fname)
+ return ret
+
+
+# Find a suitable Perl installation for OpenSSL.
+# cygwin perl does *not* work. ActivePerl does.
+# Being a Perl dummy, the simplest way I can check is if the "Win32" package
+# is available.
+def find_working_perl(perls):
+ for perl in perls:
+ try:
+ subprocess.check_output([perl, "-e", "use Win32;"])
+ except subprocess.CalledProcessError:
+ continue
+ else:
+ return perl
+
+ if perls:
+ print("The following perl interpreters were found:")
+ for p in perls:
+ print(" ", p)
+ print(" None of these versions appear suitable for building OpenSSL")
+ else:
+ print("NO perl interpreters were found on this machine at all!")
+ print(" Please install ActivePerl and ensure it appears on your path")
+
+
+def create_asms(makefile, tmp_d):
+ #create a custom makefile out of the provided one
+ asm_makefile = os.path.splitext(makefile)[0] + '.asm.mak'
+ with open(makefile) as fin, open(asm_makefile, 'w') as fout:
+ for line in fin:
+ # Keep everything up to the install target (it's convenient)
+ if line.startswith('install: all'):
+ break
+ fout.write(line)
+ asms = []
+ for line in fin:
+ if '.asm' in line and line.strip().endswith('.pl'):
+ asms.append(line.split(':')[0])
+ while line.strip():
+ fout.write(line)
+ line = next(fin)
+ fout.write('\n')
+
+ fout.write('asms: $(TMP_D) ')
+ fout.write(' '.join(asms))
+ fout.write('\n')
+ os.system('nmake /f {} PERL=perl TMP_D={} asms'.format(asm_makefile, tmp_d))
+
+
+def copy_includes(makefile, suffix):
+ dir = 'include'+suffix+'\\openssl'
+ os.makedirs(dir, exist_ok=True)
+ copy_if_different = r'$(PERL) $(SRC_D)\util\copy-if-different.pl'
+ with open(makefile) as fin:
+ for line in fin:
+ if copy_if_different in line:
+ perl, script, src, dest = line.split()
+ if not '$(INCO_D)' in dest:
+ continue
+ # We're in the root of the source tree
+ src = src.replace('$(SRC_D)', '.').strip('"')
+ dest = dest.strip('"').replace('$(INCO_D)', dir)
+ print('copying', src, 'to', dest)
+ copy(src, dest)
+
+
+def run_configure(configure, do_script):
+ print("perl Configure "+configure+" no-idea no-mdc2")
+ os.system("perl Configure "+configure+" no-idea no-mdc2")
+ print(do_script)
+ os.system(do_script)
+
+
+def prep(arch):
+ makefile_template = "ms\\nt{}.mak"
+ generated_makefile = makefile_template.format('')
+ if arch == "x86":
+ configure = "VC-WIN32"
+ do_script = "ms\\do_nasm"
+ suffix = "32"
+ elif arch == "amd64":
+ configure = "VC-WIN64A"
+ do_script = "ms\\do_win64a"
+ suffix = "64"
+ #os.environ["VSEXTCOMP_USECL"] = "MS_OPTERON"
+ else:
+ raise ValueError('Unrecognized platform: %s' % arch)
+
+ print("Creating the makefiles...")
+ sys.stdout.flush()
+ # run configure, copy includes, create asms
+ run_configure(configure, do_script)
+ makefile = makefile_template.format(suffix)
+ try:
+ os.unlink(makefile)
+ except FileNotFoundError:
+ pass
+ os.rename(generated_makefile, makefile)
+ copy_includes(makefile, suffix)
+
+ print('creating asms...')
+ create_asms(makefile, 'tmp'+suffix)
+
+
+def main():
+ if len(sys.argv) == 1:
+ print("Not enough arguments: directory containing OpenSSL",
+ "sources must be supplied")
+ sys.exit(1)
+
+ if len(sys.argv) > 2:
+ print("Too many arguments supplied, all we need is the directory",
+ "containing OpenSSL sources")
+ sys.exit(1)
+
+ ssl_dir = sys.argv[1]
+
+ if not os.path.isdir(ssl_dir):
+ print(ssl_dir, "is not an existing directory!")
+ sys.exit(1)
+
+ # perl should be on the path, but we also look in "\perl" and "c:\\perl"
+ # as "well known" locations
+ perls = find_all_on_path("perl.exe", [r"\perl\bin",
+ r"C:\perl\bin",
+ r"\perl64\bin",
+ r"C:\perl64\bin",
+ ])
+ perl = find_working_perl(perls)
+ if perl:
+ print("Found a working perl at '%s'" % (perl,))
+ else:
+ sys.exit(1)
+ if not find_all_on_path('nmake.exe'):
+ print('Could not find nmake.exe, try running env.bat')
+ sys.exit(1)
+ if not find_all_on_path('nasm.exe'):
+ print('Could not find nasm.exe, please add to PATH')
+ sys.exit(1)
+ sys.stdout.flush()
+
+ # Put our working Perl at the front of our path
+ os.environ["PATH"] = os.path.dirname(perl) + \
+ os.pathsep + \
+ os.environ["PATH"]
+
+ old_cwd = os.getcwd()
+ try:
+ os.chdir(ssl_dir)
+ for arch in ['amd64', 'x86']:
+ prep(arch)
+ finally:
+ os.chdir(old_cwd)
+
+if __name__=='__main__':
+ main()
diff --git a/PCbuild/pyd.props b/PCbuild/pyd.props
deleted file mode 100644
index 469966ede6..0000000000
--- a/PCbuild/pyd.props
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ImportGroup Label="PropertySheets">
- <Import Project="release.props" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <GenerateManifest>false</GenerateManifest>
- <EmbedManifest>false</EmbedManifest>
- <TargetExt>.pyd</TargetExt>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <ClCompile>
- <PreprocessorDefinitions>Py_BUILD_CORE_MODULE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- </ClCompile>
- <Link>
- </Link>
- <PostBuildEvent>
- <Command>
- </Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
-</Project> \ No newline at end of file
diff --git a/PCbuild/pyd_d.props b/PCbuild/pyd_d.props
deleted file mode 100644
index b023288fba..0000000000
--- a/PCbuild/pyd_d.props
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ImportGroup Label="PropertySheets">
- <Import Project="debug.props" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <LinkIncremental>false</LinkIncremental>
- <GenerateManifest>false</GenerateManifest>
- <EmbedManifest>false</EmbedManifest>
- <TargetExt>.pyd</TargetExt>
- <TargetName>$(ProjectName)_d</TargetName>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <InlineFunctionExpansion>Default</InlineFunctionExpansion>
- <IntrinsicFunctions>false</IntrinsicFunctions>
- <PreprocessorDefinitions>Py_BUILD_CORE_MODULE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- </ClCompile>
- <Link />
- <PostBuildEvent>
- <Command>
- </Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemGroup />
-</Project> \ No newline at end of file
diff --git a/PCbuild/pyexpat.vcxproj b/PCbuild/pyexpat.vcxproj
index 974fd3d6cb..99c7286b2b 100644
--- a/PCbuild/pyexpat.vcxproj
+++ b/PCbuild/pyexpat.vcxproj
@@ -35,186 +35,33 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<ProjectGuid>{D06B6426-4762-44CC-8BAD-D79052507F2F}</ProjectGuid>
<RootNamespace>pyexpat</RootNamespace>
- <Keyword>Win32Proj</Keyword>
</PropertyGroup>
+ <Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <PropertyGroup>
+ <TargetExt>.pyd</TargetExt>
+ </PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- <Import Project="x64.props" />
+ <Import Project="pyproject.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>.\..\Modules\expat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
+ <ItemDefinitionGroup>
<ClCompile>
- <AdditionalIncludeDirectories>.\..\Modules\expat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>$(PySourcePath)Modules\expat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>.\..\Modules\expat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>.\..\Modules\expat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>.\..\Modules\expat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>.\..\Modules\expat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>.\..\Modules\expat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>.\..\Modules\expat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>PYEXPAT_EXPORTS;HAVE_EXPAT_H;XML_NS;XML_DTD;BYTEORDER=1234;XML_CONTEXT_BYTES=1024;XML_STATIC;HAVE_MEMMOVE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\Modules\expat\xmlrole.h" />
<ClInclude Include="..\Modules\expat\xmltok.h" />
@@ -226,6 +73,9 @@
<ClCompile Include="..\Modules\expat\xmltok.c" />
</ItemGroup>
<ItemGroup>
+ <ResourceCompile Include="..\PC\python_nt.rc" />
+ </ItemGroup>
+ <ItemGroup>
<ProjectReference Include="pythoncore.vcxproj">
<Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
diff --git a/PCbuild/pylauncher.vcxproj b/PCbuild/pylauncher.vcxproj
index 9fa93dd141..2d4b5f6445 100644
--- a/PCbuild/pylauncher.vcxproj
+++ b/PCbuild/pylauncher.vcxproj
@@ -37,256 +37,32 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{7B2727B5-5A3F-40EE-A866-43A13CD31446}</ProjectGuid>
<RootNamespace>pylauncher</RootNamespace>
+ <TargetName>py</TargetName>
+ <SupportPGO>false</SupportPGO>
</PropertyGroup>
+ <Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="debug.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="debug.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="release.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="release.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="release.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="release.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="release.props" />
- <Import Project="x64.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets">
+ <PropertyGroup>
+ <MakeVersionInfoBeforeTarget>ClCompile</MakeVersionInfoBeforeTarget>
+ </PropertyGroup>
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="pyproject.props" />
- <Import Project="release.props" />
- <Import Project="x64.props" />
- <Import Project="pginstrument.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <TargetName>py_d</TargetName>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <TargetName>py_d</TargetName>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <TargetName>py</TargetName>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
- <TargetName>py</TargetName>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
- <TargetName>py</TargetName>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <TargetName>py</TargetName>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
- <TargetName>py</TargetName>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
- <TargetName>py</TargetName>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalDependencies>version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
- <SubSystem>Console</SubSystem>
- <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ItemDefinitionGroup>
<ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalDependencies>version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
- <SubSystem>Console</SubSystem>
- <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>_CONSOLE;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>false</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
- <AdditionalDependencies>version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>_CONSOLE;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>false</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
- <AdditionalDependencies>version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>_CONSOLE;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>false</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
- <AdditionalDependencies>version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>_CONSOLE;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>false</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
- <AdditionalDependencies>version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>_CONSOLE;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>false</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
- <AdditionalDependencies>version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Console</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>_CONSOLE;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>false</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<AdditionalDependencies>version.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Console</SubSystem>
</Link>
@@ -300,11 +76,6 @@
<ItemGroup>
<ResourceCompile Include="..\PC\pylauncher.rc" />
</ItemGroup>
- <ItemGroup>
- <ProjectReference Include="make_versioninfo.vcxproj">
- <Project>{f0e0541e-f17d-430b-97c4-93adf0dd284e}</Project>
- </ProjectReference>
- </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
diff --git a/PCbuild/pyproject.props b/PCbuild/pyproject.props
index 03413686e5..c56292ab5e 100644
--- a/PCbuild/pyproject.props
+++ b/PCbuild/pyproject.props
@@ -1,48 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup Condition="'$(Platform)'=='Win32'">
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" TreatAsLocalProperty="Py_IntDir">
+ <PropertyGroup Label="Globals">
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir>$(SolutionDir)</OutDir>
- <IntDir>$(SolutionDir)$(PlatformName)-temp-$(Configuration)\$(ProjectName)\</IntDir>
- <LinkIncremental>false</LinkIncremental>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Platform)'=='x64'">
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <_PropertySheetDisplayName>amd64</_PropertySheetDisplayName>
- <OutDir>$(SolutionDir)amd64\</OutDir>
- <IntDir>$(SolutionDir)$(PlatformName)-temp-$(Configuration)\$(ProjectName)\</IntDir>
+ <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
+ <OutDir>$(BuildPath)</OutDir>
+ <OutDir Condition="'$(Py_OutDir)' != ''">$(Py_OutDir)</OutDir>
+ <OutDir Condition="!HasTrailingSlash($(OutDir))">$(OutDir)\</OutDir>
+ <Py_IntDir Condition="'$(Py_IntDir)' == ''">$(SolutionDir)obj\</Py_IntDir>
+ <IntDir Condition="!HasTrailingSlash($(IntDir))">$(IntDir)\</IntDir>
+ <IntDir>$(Py_IntDir)\$(ArchName)_$(Configuration)\$(ProjectName)\</IntDir>
+ <IntDir Condition="$(Configuration) == 'PGInstrument' or $(Configuration) == 'PGUpdate'">$(Py_IntDir)\$(ArchName)_PGO\$(ProjectName)\</IntDir>
+ <TargetName Condition="'$(TargetName)' == ''">$(ProjectName)</TargetName>
+ <TargetName>$(TargetName)$(PyDebugExt)</TargetName>
+ <GenerateManifest>false</GenerateManifest>
+ <EmbedManifest>false</EmbedManifest>
+ <SupportPGO Condition="'$(SupportPGO)' == ''">true</SupportPGO>
+ <SupportSigning Condition="'$(SupportSigning)' == ''">true</SupportSigning>
+ <SupportSigning Condition="'$(Configuration)' == 'Debug'">false</SupportSigning>
+ <SupportSigning Condition="'$(ConfigurationType)' == 'StaticLibrary'">false</SupportSigning>
</PropertyGroup>
- <PropertyGroup Label="UserMacros">
- <PyDllName>python34$(PyDebugExt)</PyDllName>
- <PythonExe>$(OutDir)python$(PyDebugExt).exe</PythonExe>
- <KillPythonExe>$(OutDir)kill_python$(PyDebugExt).exe</KillPythonExe>
- <externalsDir>..\externals</externalsDir>
- <sqlite3Dir>$(externalsDir)\sqlite-3.8.11.0</sqlite3Dir>
- <bz2Dir>$(externalsDir)\bzip2-1.0.6</bz2Dir>
- <lzmaDir>$(externalsDir)\xz-5.0.5</lzmaDir>
- <opensslDir>$(externalsDir)\openssl-1.0.2d</opensslDir>
- <tcltkDir>$(externalsDir)\tcltk</tcltkDir>
- <tcltk64Dir>$(externalsDir)\tcltk64</tcltk64Dir>
- <tcltkLib>$(tcltkDir)\lib\tcl86t.lib;$(tcltkDir)\lib\tk86t.lib</tcltkLib>
- <tcltkLibDebug>$(tcltkDir)\lib\tcl86tg.lib;$(tcltkDir)\lib\tk86tg.lib</tcltkLibDebug>
- <tcltk64Lib>$(tcltk64Dir)\lib\tcl86t.lib;$(tcltk64Dir)\lib\tk86t.lib</tcltk64Lib>
- <tcltk64LibDebug>$(tcltk64Dir)\lib\tcl86tg.lib;$(tcltk64Dir)\lib\tk86tg.lib</tcltk64LibDebug>
+
+ <PropertyGroup>
+ <_DebugPreprocessorDefinition>NDEBUG;</_DebugPreprocessorDefinition>
+ <_DebugPreprocessorDefinition Condition="$(Configuration) == 'Debug'">_DEBUG;</_DebugPreprocessorDefinition>
+ <_PlatformPreprocessorDefinition>_WIN32;</_PlatformPreprocessorDefinition>
+ <_PlatformPreprocessorDefinition Condition="$(Platform) == 'x64'">_WIN64;_M_X64;</_PlatformPreprocessorDefinition>
+ <_PydPreprocessorDefinition Condition="$(TargetExt) == '.pyd'">Py_BUILD_CORE_MODULE;</_PydPreprocessorDefinition>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
+ <AdditionalIncludeDirectories>$(PySourcePath)Include;$(PySourcePath)PC;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;$(_PlatformPreprocessorDefinition)$(_DebugPreprocessorDefinition)$(_PydPreprocessorDefinition)%(PreprocessorDefinitions)</PreprocessorDefinitions>
+
<Optimization>MaxSpeed</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\Include; ..\PC;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
- <ExceptionHandling>
- </ExceptionHandling>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <ExceptionHandling></ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <EnableEnhancedInstructionSet Condition="'$(Platform)'=='Win32'">NoExtensions</EnableEnhancedInstructionSet>
+ </ClCompile>
+ <ClCompile Condition="$(Configuration) == 'Debug'">
+ <Optimization>Disabled</Optimization>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ </ClCompile>
+ <ClCompile Condition="$(ICCBuild) == 'true'">
+ <FloatingPointModel>Strict</FloatingPointModel>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
@@ -51,54 +60,105 @@
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>true</RandomizedBaseAddress>
<DataExecutionPrevention>true</DataExecutionPrevention>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <IgnoreSpecificDefaultLibraries>LIBC;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<TargetMachine>MachineX86</TargetMachine>
+ <TargetMachine Condition="'$(Platform)' == 'x64'">MachineX64</TargetMachine>
+ <ProfileGuidedDatabase Condition="$(SupportPGO)">$(OutDir)$(TargetName).pgd</ProfileGuidedDatabase>
+ <LinkTimeCodeGeneration Condition="$(Configuration) == 'Release'">UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <LinkTimeCodeGeneration Condition="$(SupportPGO) and $(Configuration) == 'PGInstrument'">PGInstrument</LinkTimeCodeGeneration>
+ <LinkTimeCodeGeneration Condition="$(SupportPGO) and $(Configuration) == 'PGUpdate'">PGUpdate</LinkTimeCodeGeneration>
</Link>
+ <Lib>
+ <LinkTimeCodeGeneration Condition="$(Configuration) == 'Release'">true</LinkTimeCodeGeneration>
+ <LinkTimeCodeGeneration Condition="$(SupportPGO) and $(Configuration) == 'PGInstrument'">true</LinkTimeCodeGeneration>
+ <LinkTimeCodeGeneration Condition="$(SupportPGO) and $(Configuration) == 'PGUpdate'">true</LinkTimeCodeGeneration>
+ </Lib>
<ResourceCompile>
- <AdditionalIncludeDirectories>..\PC;..\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>$(PySourcePath)PC;$(PySourcePath)Include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>$(_DebugPreprocessorDefinition)%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
</ResourceCompile>
+ <Midl>
+ <PreprocessorDefinitions>$(_DebugPreprocessorDefinition)%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TargetEnvironment Condition="'$(Platform)' == 'x64'">X64</TargetEnvironment>
+ <TypeLibraryName>$(OutDir)wininst.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
</ItemDefinitionGroup>
- <ItemGroup>
- <BuildMacro Include="PyDllName">
- <Value>$(PyDllName)</Value>
- </BuildMacro>
- <BuildMacro Include="PythonExe">
- <Value>$(PythonExe)</Value>
- </BuildMacro>
- <BuildMacro Include="KillPythonExe">
- <Value>$(KillPythonExe)</Value>
- </BuildMacro>
- <BuildMacro Include="externalsDir">
- <Value>$(externalsDir)</Value>
- </BuildMacro>
- <BuildMacro Include="sqlite3Dir">
- <Value>$(sqlite3Dir)</Value>
- </BuildMacro>
- <BuildMacro Include="bz2Dir">
- <Value>$(bz2Dir)</Value>
- </BuildMacro>
- <BuildMacro Include="lzmaDir">
- <Value>$(lzmaDir)</Value>
- </BuildMacro>
- <BuildMacro Include="opensslDir">
- <Value>$(opensslDir)</Value>
- </BuildMacro>
- <BuildMacro Include="tcltkDir">
- <Value>$(tcltkDir)</Value>
- </BuildMacro>
- <BuildMacro Include="tcltk64Dir">
- <Value>$(tcltk64Dir)</Value>
- </BuildMacro>
- <BuildMacro Include="tcltkLib">
- <Value>$(tcltkLib)</Value>
- </BuildMacro>
- <BuildMacro Include="tcltkLibDebug">
- <Value>$(tcltkLibDebug)</Value>
- </BuildMacro>
- <BuildMacro Include="tcltk64Lib">
- <Value>$(tcltk64Lib)</Value>
- </BuildMacro>
- <BuildMacro Include="tcltk64LibDebug">
- <Value>$(tcltk64LibDebug)</Value>
- </BuildMacro>
- </ItemGroup>
-</Project>
+
+ <Target Name="GeneratePythonNtRcH"
+ BeforeTargets="ClCompile"
+ Inputs="$(PySourcePath)Include\patchlevel.h"
+ Outputs="$(IntDir)pythonnt_rc.h">
+ <WriteLinesToFile File="$(IntDir)pythonnt_rc.h" Overwrite="true" Encoding="ascii"
+ Lines='/* This file created by pyproject.props /t:GeneratePythonNtRcH */
+#define FIELD3 $(Field3Value)
+#define MS_DLL_ID "$(SysWinVer)"
+#define PYTHON_DLL_NAME "$(TargetName)$(TargetExt)"
+' />
+ <ItemGroup>
+ <FileWrites Include="$(IntDir)pythonnt_rc.h" />
+ </ItemGroup>
+ </Target>
+
+ <UsingTask TaskName="KillPython" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
+ <ParameterGroup>
+ <FileName Required="true" />
+ </ParameterGroup>
+ <Task>
+ <Code Type="Fragment" Language="cs">
+<![CDATA[
+string fullPath = System.IO.Path.GetFullPath(FileName);
+Log.LogMessage("Looking for " + fullPath, MessageImportance.Normal);
+foreach (System.Diagnostics.Process p in System.Diagnostics.Process.GetProcesses()) {
+ try {
+ Log.LogMessage("Found running process: " + p.MainModule.FileName, MessageImportance.Low);
+ if (fullPath.Equals(System.IO.Path.GetFullPath(p.MainModule.FileName), StringComparison.OrdinalIgnoreCase)) {
+ Log.LogMessage("Terminating " + p.MainModule.FileName, MessageImportance.High);
+ p.Kill();
+ }
+ } catch {
+ }
+}
+]]>
+ </Code>
+ </Task>
+ </UsingTask>
+
+ <Target Name="KillPython" BeforeTargets="PrepareForBuild" Condition="'$(KillPython)' == 'true'">
+ <Message Text="Killing any running python$(PyDebugExt)$(PyTestExt).exe instances..." Importance="high" />
+ <KillPython FileName="$(OutDir)python$(PyDebugExt)$(PyTestExt).exe" />
+ </Target>
+
+ <!--
+ A default target to handle msbuild pcbuild.proj /t:CleanAll.
+
+ Some externals projects don't respond to /t:Clean, so we invoke
+ CleanAll on them when we really want to clean up.
+ -->
+ <Target Name="CleanAll" DependsOnTargets="Clean">
+ <MSBuild Projects="@(ProjectReference->'%(FullPath)')"
+ Properties="Configuration=$(Configuration);Platform=$(Platform)"
+ BuildInParallel="true"
+ StopOnFirstFailure="false"
+ Condition="Exists(%(FullPath))"
+ Targets="CleanAll" />
+ </Target>
+
+ <PropertyGroup Condition="'$(SigningCertificate)' != '' and $(SupportSigning)">
+ <SignToolPath Condition="'$(SignToolPath)' == '' or !Exists($(SignToolPath))">$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Kits\Installed Roots@KitsRoot81)\bin\x86\signtool.exe</SignToolPath>
+ <SignToolPath Condition="!Exists($(SignToolPath))">$(registry:HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Kits\Installed Roots@KitsRoot)\bin\x86\signtool.exe</SignToolPath>
+ <SignToolPath Condition="!Exists($(SignToolPath))">$(registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A@InstallationFolder)\Bin\signtool.exe</SignToolPath>
+ <_SignCommand Condition="Exists($(SignToolPath))">"$(SignToolPath)" sign /q /n "$(SigningCertificate)" /fd sha256 /t http://timestamp.verisign.com/scripts/timestamp.dll /d "Python $(PythonVersion)"</_SignCommand>
+ </PropertyGroup>
+
+ <Target Name="_SignBuild" AfterTargets="AfterBuild" Condition="'$(SigningCertificate)' != '' and $(SupportSigning)">
+ <Error Text="Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition="'$(_SignCommand)' == ''" />
+ <Exec Command='$(_SignCommand) "$(TargetPath)" || $(_SignCommand) "$(TargetPath)" || $(_SignCommand) "$(TargetPath)"' ContinueOnError="false" />
+ </Target>
+</Project> \ No newline at end of file
diff --git a/PCbuild/python.props b/PCbuild/python.props
new file mode 100644
index 0000000000..07acfaba7b
--- /dev/null
+++ b/PCbuild/python.props
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Platform Condition="'$(Platform)' == ''">Win32</Platform>
+ <Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
+ <!--
+ Use the latest available version of Visual Studio to build. To override
+ this and build with an earlier version, pass "/p:PlatformToolset=v100"
+ (for example) when building.
+
+ We set BasePlatformToolset for ICC's benefit, it's otherwise ignored.
+ -->
+ <BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VCTargetsPath14)' != ''">v140</BasePlatformToolset>
+ <BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VCTargetsPath12)' != ''">v120</BasePlatformToolset>
+ <BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VCTargetsPath11)' != ''">v110</BasePlatformToolset>
+ <BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VCTargetsPath10)' != ''">v100</BasePlatformToolset>
+
+ <PlatformToolset Condition="'$(PlatformToolset)' == ''">$(BasePlatformToolset)</PlatformToolset>
+ <ICCBuild>false</ICCBuild>
+ <ICCBuild Condition="$(PlatformToolset.StartsWith(`Intel C++ Compiler`))">true</ICCBuild>
+
+ <!--
+ Convincing MSVC/MSBuild to prefer our platform names is too difficult,
+ so we define our own constant ArchName and use wherever we need it.
+ -->
+ <ArchName Condition="'$(ArchName)' == '' and $(Platform) == 'x64'">amd64</ArchName>
+ <ArchName Condition="'$(ArchName)' == ''">win32</ArchName>
+ <ArchName Condition="$(Configuration) == 'PGInstrument' or $(Configuration) == 'PGUpdate'">$(ArchName)-pgo</ArchName>
+
+ <!-- Root directory of the repository -->
+ <PySourcePath Condition="'$(PySourcePath)' == ''">$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)\..\))</PySourcePath>
+ <PySourcePath Condition="!HasTrailingSlash($(PySourcePath))">$(PySourcePath)\</PySourcePath>
+
+ <!-- Directory where build outputs are put -->
+ <BuildPath Condition="'$(PyBuildPath)' == ''">$(PySourcePath)PCBuild\$(ArchName)\</BuildPath>
+ <BuildPath Condition="'$(PyBuildPath)' != ''">$(PyBuildPath)</BuildPath>
+ <BuildPath Condition="!HasTrailingSlash($(BuildPath))">$(BuildPath)\</BuildPath>
+
+ <!-- Directories of external projects. tcltk is handled in tcltk.props -->
+ <ExternalsDir>$([System.IO.Path]::GetFullPath(`$(PySourcePath)externals\`))</ExternalsDir>
+ <sqlite3Dir>$(ExternalsDir)sqlite-3.8.11.0\</sqlite3Dir>
+ <bz2Dir>$(ExternalsDir)bzip2-1.0.6\</bz2Dir>
+ <lzmaDir>$(ExternalsDir)xz-5.0.5\</lzmaDir>
+ <opensslDir>$(ExternalsDir)openssl-1.0.2g\</opensslDir>
+ <opensslIncludeDir>$(opensslDir)include32</opensslIncludeDir>
+ <opensslIncludeDir Condition="'$(ArchName)' == 'amd64'">$(opensslDir)include64</opensslIncludeDir>
+ <nasmDir>$(ExternalsDir)\nasm-2.11.06\</nasmDir>
+
+ <!-- Suffix for all binaries when building for debug -->
+ <PyDebugExt Condition="'$(PyDebugExt)' == '' and $(Configuration) == 'Debug'">_d</PyDebugExt>
+
+ <!-- Suffix for versions/keys when building with test markers -->
+ <PyTestExt Condition="$(UseTestMarker) == 'true'">-test</PyTestExt>
+
+ <!-- Suffix for versions/keys when building for particular platforms -->
+ <PyArchExt Condition="'$(ArchName)' == 'win32'">-32</PyArchExt>
+
+ <!-- Full path of the resulting python.exe binary -->
+ <PythonExe Condition="'$(PythonExe)' == ''">$(BuildPath)python$(PyDebugExt).exe</PythonExe>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(OverrideVersion)' == ''">
+ <!--
+ Read version information from Include\patchlevel.h. The following properties are set:
+
+ MajorVersionNumber - the '3' in '3.5.2a1'
+ MinorVersionNumber - the '5' in '3.5.2a1'
+ MicroVersionNumber - the '2' in '3.5.2a1'
+ ReleaseSerial - the '1' in '3.5.2a1'
+ ReleaseLevelName - the 'a1' in '3.5.2a1'
+ PythonVersionNumber - '3.5.2' for '3.5.2a1'
+ PythonVersion - '3.5.2a1'
+ PythonVersionHex - 0x030502a1 for '3.5.2a1'
+ ReleaseLevelNumber - 10 for alpha, 11 for beta, 12 for RC (gamma), and 15 for final
+ Field3Value - 2101 for '3.5.2a1' (== 1000*2 + 10*10 ('a') + 1)
+ -->
+ <_PatchLevelContent>$([System.IO.File]::ReadAllText(`$(PySourcePath)Include\patchlevel.h`))</_PatchLevelContent>
+ <MajorVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent), `define\s+PY_MAJOR_VERSION\s+(\d+)`).Groups[1].Value)</MajorVersionNumber>
+ <MinorVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent), `define\s+PY_MINOR_VERSION\s+(\d+)`).Groups[1].Value)</MinorVersionNumber>
+ <MicroVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent), `define\s+PY_MICRO_VERSION\s+(\d+)`).Groups[1].Value)</MicroVersionNumber>
+ <_ReleaseLevel>$([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent), `define\s+PY_RELEASE_LEVEL\s+PY_RELEASE_LEVEL_(\w+)`).Groups[1].Value)</_ReleaseLevel>
+ <ReleaseSerial>$([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent), `define\s+PY_RELEASE_SERIAL\s+(\d+)`).Groups[1].Value)</ReleaseSerial>
+ <ReleaseLevelNumber>15</ReleaseLevelNumber>
+ <ReleaseLevelNumber Condition="$(_ReleaseLevel) == 'ALPHA'">10</ReleaseLevelNumber>
+ <ReleaseLevelNumber Condition="$(_ReleaseLevel) == 'BETA'">11</ReleaseLevelNumber>
+ <ReleaseLevelNumber Condition="$(_ReleaseLevel) == 'GAMMA'">12</ReleaseLevelNumber>
+ <ReleaseLevelName Condition="$(_ReleaseLevel) == 'ALPHA'">a$(ReleaseSerial)</ReleaseLevelName>
+ <ReleaseLevelName Condition="$(_ReleaseLevel) == 'BETA'">b$(ReleaseSerial)</ReleaseLevelName>
+ <ReleaseLevelName Condition="$(_ReleaseLevel) == 'GAMMA'">rc$(ReleaseSerial)</ReleaseLevelName>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(OverrideVersion)' != ''">
+ <!--
+ Override the version number when building by specifying OverrideVersion.
+ For example:
+
+ PCBuild\build.bat "/p:OverrideVersion=3.5.2a1"
+
+ Use the -V option to check your version is valid:
+
+ PCBuild\build.bat -V "/p:OverrideVersion=3.5.2a1"
+ PythonVersionNumber: 3.5.2
+ PythonVersion: 3.5.2a1
+ PythonVersionHex: 0x030502A1
+ Field3Value: 2101
+
+ Note that this only affects the version numbers embedded in resources and
+ installers, but not sys.version.
+ -->
+ <MajorVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion), `(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[1].Value)</MajorVersionNumber>
+ <MinorVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion), `(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[2].Value)</MinorVersionNumber>
+ <MicroVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion), `(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[3].Value)</MicroVersionNumber>
+ <ReleaseLevelName>$([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion), `(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[4].Value)</ReleaseLevelName>
+ <_ReleaseLevel>$([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion), `(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[5].Value)</_ReleaseLevel>
+ <ReleaseSerial>$([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion), `(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[6].Value)</ReleaseSerial>
+ <ReleaseSerial Condition="'$(ReleaseSerial)' == ''">0</ReleaseSerial>
+ <ReleaseLevelNumber>15</ReleaseLevelNumber>
+ <ReleaseLevelNumber Condition="$(_ReleaseLevel) == 'a'">10</ReleaseLevelNumber>
+ <ReleaseLevelNumber Condition="$(_ReleaseLevel) == 'b'">11</ReleaseLevelNumber>
+ <ReleaseLevelNumber Condition="$(_ReleaseLevel) == 'rc'">12</ReleaseLevelNumber>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <PythonVersionNumber>$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)</PythonVersionNumber>
+ <PythonVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)$(ReleaseLevelName)</PythonVersion>
+ <PythonVersionHex>$([msbuild]::BitwiseOr(
+ $([msbuild]::Multiply($(MajorVersionNumber), 16777216)),
+ $([msbuild]::BitwiseOr(
+ $([msbuild]::Multiply($(MinorVersionNumber), 65536)),
+ $([msbuild]::BitwiseOr(
+ $([msbuild]::Multiply($(MicroVersionNumber), 256)),
+ $([msbuild]::BitwiseOr(
+ $([msbuild]::Multiply($(ReleaseLevelNumber), 16)),
+ $(ReleaseSerial)
+ ))
+ ))
+ ))
+ ))</PythonVersionHex>
+ <Field3Value>$([msbuild]::Add(
+ $(ReleaseSerial),
+ $([msbuild]::Add(
+ $([msbuild]::Multiply($(ReleaseLevelNumber), 10)),
+ $([msbuild]::Multiply($(MicroVersionNumber), 1000))
+ ))
+ ))</Field3Value>
+ <Field3Value Condition="$(UseTestMarker) == 'true'">$([msbuild]::Add($(Field3Value), 9000))</Field3Value>
+
+ <!-- The name of the resulting pythonXY.dll (without the extension) -->
+ <PyDllName>python$(MajorVersionNumber)$(MinorVersionNumber)$(PyDebugExt)</PyDllName>
+
+ <!-- The version and platform tag to include in .pyd filenames -->
+ <PydTag Condition="$(ArchName) == 'win32'">.cp$(MajorVersionNumber)$(MinorVersionNumber)-win32</PydTag>
+ <PydTag Condition="$(ArchName) == 'amd64'">.cp$(MajorVersionNumber)$(MinorVersionNumber)-win_amd64</PydTag>
+
+ <!-- The version number for sys.winver -->
+ <SysWinVer>$(MajorVersionNumber).$(MinorVersionNumber)$(PyArchExt)$(PyTestExt)</SysWinVer>
+ </PropertyGroup>
+
+ <!-- Displays the calculated version info -->
+ <Target Name="ShowVersionInfo">
+ <Message Importance="high" Text="PythonVersionNumber: $(PythonVersionNumber)" />
+ <Message Importance="high" Text="PythonVersion: $(PythonVersion)" />
+ <Message Importance="high" Text="PythonVersionHex: 0x$([System.UInt32]::Parse($(PythonVersionHex)).ToString(`X08`))" />
+ <Message Importance="high" Text="Field3Value: $(Field3Value)" />
+ <Message Importance="high" Text="SysWinVer: $(SysWinVer)" />
+ <Message Importance="high" Text="PyDllName: $(PyDllName)" />
+ </Target>
+</Project>
diff --git a/PCbuild/python.vcxproj b/PCbuild/python.vcxproj
index bd12624596..60116df271 100644
--- a/PCbuild/python.vcxproj
+++ b/PCbuild/python.vcxproj
@@ -37,43 +37,9 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{B11D750F-CD1F-4A96-85CE-E69A5C5259F9}</ProjectGuid>
</PropertyGroup>
+ <Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
@@ -81,266 +47,22 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="pyproject.props" />
- <Import Project="release.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="release.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="debug.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="release.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="x64.props" />
- <Import Project="release.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="x64.props" />
- <Import Project="release.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="x64.props" />
- <Import Project="debug.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="x64.props" />
- <Import Project="release.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <CompileAs>Default</CompileAs>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Link>
- <OutputFile>$(OutDir)python.exe</OutputFile>
- <SubSystem>Console</SubSystem>
- <StackReserveSize>2000000</StackReserveSize>
- <BaseAddress>0x1d000000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <CompileAs>Default</CompileAs>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Link>
- <OutputFile>$(OutDir)python.exe</OutputFile>
- <SubSystem>Console</SubSystem>
- <StackReserveSize>2000000</StackReserveSize>
- <BaseAddress>0x1d000000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <IntrinsicFunctions>false</IntrinsicFunctions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <BrowseInformation>true</BrowseInformation>
- <CompileAs>Default</CompileAs>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- <AdditionalIncludeDirectories>..\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Link>
- <OutputFile>$(OutDir)python_d.exe</OutputFile>
- <SubSystem>Console</SubSystem>
- <StackReserveSize>2000000</StackReserveSize>
- <BaseAddress>0x1d000000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <IntrinsicFunctions>false</IntrinsicFunctions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <BrowseInformation>true</BrowseInformation>
- <CompileAs>Default</CompileAs>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- <AdditionalIncludeDirectories>..\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Link>
- <OutputFile>$(OutDir)python_d.exe</OutputFile>
- <SubSystem>Console</SubSystem>
- <StackReserveSize>4194304</StackReserveSize>
- <BaseAddress>0x1d000000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <CompileAs>Default</CompileAs>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Link>
- <OutputFile>$(OutDir)python.exe</OutputFile>
- <SubSystem>Console</SubSystem>
- <StackReserveSize>2000000</StackReserveSize>
- <BaseAddress>0x1d000000</BaseAddress>
- <ImportLibrary>
- </ImportLibrary>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <CompileAs>Default</CompileAs>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Link>
- <OutputFile>$(OutDir)python.exe</OutputFile>
- <SubSystem>Console</SubSystem>
- <StackReserveSize>2000000</StackReserveSize>
- <BaseAddress>0x1d000000</BaseAddress>
- <ImportLibrary>
- </ImportLibrary>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <CompileAs>Default</CompileAs>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Link>
- <OutputFile>$(OutDir)python.exe</OutputFile>
- <SubSystem>Console</SubSystem>
- <StackReserveSize>2000000</StackReserveSize>
- <BaseAddress>0x1d000000</BaseAddress>
- <ImportLibrary>
- </ImportLibrary>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
+ <ItemDefinitionGroup>
<ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <CompileAs>Default</CompileAs>
</ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
<Link>
- <OutputFile>$(OutDir)python.exe</OutputFile>
<SubSystem>Console</SubSystem>
<StackReserveSize>2000000</StackReserveSize>
<BaseAddress>0x1d000000</BaseAddress>
- <ImportLibrary>
- </ImportLibrary>
- <TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
@@ -350,7 +72,7 @@
<ResourceCompile Include="..\PC\python_exe.rc" />
</ItemGroup>
<ItemGroup>
- <ClCompile Include="..\Modules\python.c" />
+ <ClCompile Include="..\Programs\python.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="pythoncore.vcxproj">
@@ -361,4 +83,26 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+ <Target Name="ValidateUcrtbase" AfterTargets="AfterBuild">
+ <PropertyGroup>
+ <UcrtName>ucrtbase</UcrtName>
+ <UcrtName Condition="'$(Configuration)' == 'Debug'">ucrtbased</UcrtName>
+ </PropertyGroup>
+ <Exec Command='"$(OutDir)python$(PyDebugExt).exe" "$(PySourcePath)PC\validate_ucrtbase.py" $(UcrtName)' ContinueOnError="true" />
+ </Target>
+ <Target Name="GeneratePythonBat" AfterTargets="AfterBuild">
+ <PropertyGroup>
+ <_Content>@rem This script invokes the most recently built Python with all arguments
+@rem passed through to the interpreter. This file is generated by the
+@rem build process and any changes *will* be thrown away by the next
+@rem rebuild.
+@rem This is only meant as a convenience for developing CPython
+@rem and using it outside of that context is ill-advised.
+@echo Running $(Configuration)^|$(Platform) interpreter...
+@"$(OutDir)python$(PyDebugExt).exe" %*
+</_Content>
+ <_ExistingContent Condition="Exists('$(PySourcePath)python.bat')">$([System.IO.File]::ReadAllText('$(PySourcePath)python.bat'))</_ExistingContent>
+ </PropertyGroup>
+ <WriteLinesToFile File="$(PySourcePath)python.bat" Lines="$(_Content)" Overwrite="true" Condition="'$(_Content)' != '$(_ExistingContent)'" />
+ </Target>
+</Project> \ No newline at end of file
diff --git a/PCbuild/python.vcxproj.filters b/PCbuild/python.vcxproj.filters
index e4906a40d7..0662a4e7f5 100644
--- a/PCbuild/python.vcxproj.filters
+++ b/PCbuild/python.vcxproj.filters
@@ -19,8 +19,8 @@
</ResourceCompile>
</ItemGroup>
<ItemGroup>
- <ClCompile Include="..\Modules\python.c">
+ <ClCompile Include="..\Programs\python.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
-</Project> \ No newline at end of file
+</Project>
diff --git a/PCbuild/python3dll.vcxproj b/PCbuild/python3dll.vcxproj
index bc8ff31ca2..cbb618f283 100644
--- a/PCbuild/python3dll.vcxproj
+++ b/PCbuild/python3dll.vcxproj
@@ -1,6 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
<ProjectConfiguration Include="PGInstrument|Win32">
<Configuration>PGInstrument</Configuration>
<Platform>Win32</Platform>
@@ -30,144 +38,42 @@
<ProjectGuid>{885D4898-D08D-4091-9C40-C700CFE3FC5A}</ProjectGuid>
<RootNamespace>python3dll</RootNamespace>
<Keyword>Win32Proj</Keyword>
+ <TargetName>python3</TargetName>
+ <SupportPGO>false</SupportPGO>
</PropertyGroup>
+ <Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration">
- <ConfigurationType>Makefile</ConfigurationType>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration">
- <ConfigurationType>Makefile</ConfigurationType>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Makefile</ConfigurationType>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration">
- <ConfigurationType>Makefile</ConfigurationType>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration">
- <ConfigurationType>Makefile</ConfigurationType>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Makefile</ConfigurationType>
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="release.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="release.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="release.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="x64.props" />
- <Import Project="release.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="x64.props" />
- <Import Project="release.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="pyproject.props" />
- <Import Project="x64.props" />
- <Import Project="release.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd $(ProjectDir)\..\PC
-nmake /f python3.mak MACHINE=x86 OutDir=$(OutDir)</NMakeBuildCommandLine>
- <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd $(ProjectDir)\..\PC
-nmake /f python3.mak MACHINE=x86 OutDir=$(OutDir) rebuild</NMakeReBuildCommandLine>
- <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd $(ProjectDir)\..\PC
-"$(VSInstallDir)\VC\bin\nmake.exe" /f python3.mak MACHINE=x86 OutDir=$(OutDir) clean</NMakeCleanCommandLine>
- <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(OutDir)python3.dll</NMakeOutput>
- <NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
- <NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
- <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
- <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
- <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
- <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|x64'">cd $(ProjectDir)\..\PC
-nmake /f python3.mak MACHINE=x64 OutDir=$(OutDir)</NMakeBuildCommandLine>
- <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|x64'">cd $(ProjectDir)\..\PC
-nmake /f python3.mak MACHINE=x64 OutDir=$(OutDir) rebuild</NMakeReBuildCommandLine>
- <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|x64'">cd $(ProjectDir)\..\PC
-"$(VSInstallDir)\VC\bin\nmake.exe" /f python3.mak MACHINE=x64 OutDir=$(OutDir) clean</NMakeCleanCommandLine>
- <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)python3.dll</NMakeOutput>
- <NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
- <NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
- <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
- <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
- <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
- <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">cd $(ProjectDir)\..\PC
-nmake /f python3.mak MACHINE=x86 OutDir=$(OutDir)</NMakeBuildCommandLine>
- <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">cd $(ProjectDir)\..\PC
-nmake /f python3.mak MACHINE=x86 OutDir=$(OutDir) rebuild</NMakeReBuildCommandLine>
- <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">cd $(ProjectDir)\..\PC
-"$(VSInstallDir)\VC\bin\nmake.exe" /f python3.mak MACHINE=x86 OutDir=$(OutDir) clean</NMakeCleanCommandLine>
- <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">$(OutDir)python3.dll</NMakeOutput>
- <NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
- <NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
- <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
- <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
- <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
- <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">cd $(ProjectDir)\..\PC
-nmake /f python3.mak MACHINE=x64 OutDir=$(OutDir)</NMakeBuildCommandLine>
- <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">cd $(ProjectDir)\..\PC
-nmake /f python3.mak MACHINE=x64 OutDir=$(OutDir) rebuild</NMakeReBuildCommandLine>
- <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">cd $(ProjectDir)\..\PC
-"$(VSInstallDir)\VC\bin\nmake.exe" /f python3.mak MACHINE=x64 OutDir=$(OutDir) clean</NMakeCleanCommandLine>
- <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">$(OutDir)python3.dll</NMakeOutput>
- <NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
- <NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
- <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
- <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
- <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
- <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">cd $(ProjectDir)\..\PC
-nmake /f python3.mak MACHINE=x86 OutDir=$(OutDir)</NMakeBuildCommandLine>
- <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">cd $(ProjectDir)\..\PC
-nmake /f python3.mak MACHINE=x86 OutDir=$(OutDir) rebuild</NMakeReBuildCommandLine>
- <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">cd $(ProjectDir)\..\PC
-"$(VSInstallDir)\VC\bin\nmake.exe" /f python3.mak MACHINE=x86 OutDir=$(OutDir) clean</NMakeCleanCommandLine>
- <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">$(OutDir)python3.dll</NMakeOutput>
- <NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
- <NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
- <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
- <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
- <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
- <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">cd $(ProjectDir)\..\PC
-nmake /f python3.mak MACHINE=x64 OutDir=$(OutDir)</NMakeBuildCommandLine>
- <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">cd $(ProjectDir)\..\PC
-nmake /f python3.mak MACHINE=x64 OutDir=$(OutDir) rebuild</NMakeReBuildCommandLine>
- <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">cd $(ProjectDir)\..\PC
-"$(VSInstallDir)\VC\bin\nmake.exe" /f python3.mak MACHINE=x64 OutDir=$(OutDir) clean</NMakeCleanCommandLine>
- <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">$(OutDir)python3.dll</NMakeOutput>
- <NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
- <NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
- <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
- <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
- <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
+ <_Machine>X86</_Machine>
+ <_Machine Condition="$(Platform) == 'x64'">X64</_Machine>
</PropertyGroup>
<ItemDefinitionGroup>
+ <ClCompile>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>$(OutDir)$(TargetName)stub.lib</AdditionalDependencies>
+ <ModuleDefinitionFile Condition="$(Configuration) != 'Debug'">$(PySourcePath)PC\python3.def</ModuleDefinitionFile>
+ <ModuleDefinitionFile Condition="$(Configuration) == 'Debug'">$(IntDir)python3_d.def</ModuleDefinitionFile>
+ <EntryPointSymbol>DllMain</EntryPointSymbol>
+ </Link>
+ <PreLinkEvent>
+ <Command>lib /nologo /def:"$(IntDir)python3stub.def" /out:"$(OutDir)$(TargetName)stub.lib" /MACHINE:$(_Machine)</Command>
+ <Message>Rebuilding $(TargetName)stub.lib</Message>
+ <Outputs>$(OutDir)$(TargetName)stub.lib</Outputs>
+ </PreLinkEvent>
</ItemDefinitionGroup>
<ItemGroup>
<None Include="..\PC\python3.def" />
@@ -181,4 +87,55 @@ nmake /f python3.mak MACHINE=x64 OutDir=$(OutDir) rebuild</NMakeReBuildCommandLi
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
+
+ <Target Name="BuildPython3_dDef" BeforeTargets="BuildStubDef" Inputs="..\PC\python3.def" Outputs="$(IntDir)python3_d.def" Condition="$(Configuration) == 'Debug'">
+ <ItemGroup>
+ <_DefLines Remove="@(_DefLines)" />
+ <_Lines Remove="@(_Lines)" />
+ </ItemGroup>
+ <ReadLinesFromFile File="..\PC\python3.def">
+ <Output TaskParameter="Lines" ItemName="_DefLines" />
+ </ReadLinesFromFile>
+ <PropertyGroup>
+ <_Pattern1>(=python$(MajorVersionNumber)$(MinorVersionNumber))\.</_Pattern1>
+ <_Sub1>$1_d.</_Sub1>
+ <_Pattern2>"python3"</_Pattern2>
+ <_Sub2>"python3_d"</_Sub2>
+ </PropertyGroup>
+ <ItemGroup>
+ <_Lines Include="@(_DefLines)">
+ <New>$([System.Text.RegularExpressions.Regex]::Replace($([System.Text.RegularExpressions.Regex]::Replace(`%(Identity)`, `$(_Pattern1)`, `$(_Sub1)`)), `$(_Pattern2)`, `$(_Sub2)`))</New>
+ </_Lines>
+ </ItemGroup>
+ <MakeDir Directories="$(IntDir)" />
+ <WriteLinesToFile File="$(IntDir)python3_d.def" Lines="@(_Lines->'%(New)')" Overwrite="true" />
+ </Target>
+
+ <Target Name="BuildStubDef" BeforeTargets="PreLinkEvent" Inputs="..\PC\python3.def" Outputs="$(IntDir)python3stub.def">
+ <ItemGroup>
+ <_DefLines Remove="@(_DefLines)" />
+ <_Lines Remove="@(_Lines)" />
+ </ItemGroup>
+ <ReadLinesFromFile File="..\PC\python3.def">
+ <Output TaskParameter="Lines" ItemName="_DefLines" />
+ </ReadLinesFromFile>
+ <PropertyGroup>
+ <_Pattern>^[\w.]+=.+?\.([^ ]+).*$</_Pattern>
+ <_Sub>$1</_Sub>
+ </PropertyGroup>
+ <ItemGroup>
+ <_Lines Include="EXPORTS" />
+ <_Symbols Include="@(_DefLines)" Condition="$([System.Text.RegularExpressions.Regex]::IsMatch(`%(Identity)`, `$(_Pattern)`))">
+ <Symbol>$([System.Text.RegularExpressions.Regex]::Replace(`%(Identity)`, `$(_Pattern)`, `$(_Sub)`))</Symbol>
+ </_Symbols>
+ <_Lines Include="@(_Symbols->'%(Symbol)')" />
+ </ItemGroup>
+ <MakeDir Directories="$(IntDir)" />
+ <WriteLinesToFile File="$(IntDir)python3stub.def" Lines="@(_Lines)" Overwrite="true" />
+ </Target>
+ <Target Name="_CleanStubDef" BeforeTargets="CoreClean">
+ <ItemGroup>
+ <Clean Include="$(IntDir)python3stub.def" />
+ </ItemGroup>
+ </Target>
</Project> \ No newline at end of file
diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj
index 6021cd74cb..3a1b5ba8be 100644
--- a/PCbuild/pythoncore.vcxproj
+++ b/PCbuild/pythoncore.vcxproj
@@ -38,405 +38,40 @@
<ProjectGuid>{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}</ProjectGuid>
<RootNamespace>pythoncore</RootNamespace>
</PropertyGroup>
+ <Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="release.props" />
- <Import Project="pyproject.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="release.props" />
- <Import Project="pyproject.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="debug.props" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="release.props" />
- <Import Project="pyproject.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="release.props" />
- <Import Project="pyproject.props" />
- <Import Project="x64.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="release.props" />
- <Import Project="pyproject.props" />
- <Import Project="x64.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="debug.props" />
- <Import Project="pyproject.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <PropertyGroup>
+ <KillPython>true</KillPython>
+ </PropertyGroup>
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="release.props" />
<Import Project="pyproject.props" />
- <Import Project="x64.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(PyDllName)</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">$(PyDllName)</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">$(PyDllName)</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(PyDllName)</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(PyDllName)</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">$(PyDllName)</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">$(PyDllName)</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(PyDllName)</TargetName>
+ <TargetName>$(PyDllName)</TargetName>
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalOptions>/Zm200 %(AdditionalOptions)</AdditionalOptions>
- <AdditionalIncludeDirectories>..\Python;..\Modules\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- <AdditionalIncludeDirectories>..\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <PreLinkEvent>
- <Message>Generate build information...</Message>
- <Command>"$(SolutionDir)make_buildinfo.exe" Release "$(IntDir)\"</Command>
- </PreLinkEvent>
- <Link>
- <AdditionalDependencies>$(IntDir)getbuildinfo.o;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(OutDir)$(PyDllName).dll</OutputFile>
- <IgnoreSpecificDefaultLibraries>libc;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <BaseAddress>0x1e000000</BaseAddress>
- </Link>
- <PreBuildEvent>
- <Command>$(KillPythonExe)
-IF %ERRORLEVEL% NEQ 0 (
- echo kill_python: war^ning: could not kill running Pythons, exit code %ERRORLEVEL%
- exit /b 0
-)</Command>
- </PreBuildEvent>
- <PreBuildEvent>
- <Message>Killing any running $(PythonExe) instances...</Message>
- </PreBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalOptions>/Zm200 %(AdditionalOptions)</AdditionalOptions>
- <AdditionalIncludeDirectories>..\Python;..\Modules\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- <AdditionalIncludeDirectories>..\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <PreLinkEvent>
- <Message>Generate build information...</Message>
- <Command>"$(SolutionDir)make_buildinfo.exe" Release "$(IntDir)\"</Command>
- </PreLinkEvent>
- <Link>
- <AdditionalDependencies>$(IntDir)getbuildinfo.o;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreSpecificDefaultLibraries>libc;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <BaseAddress>0x1e000000</BaseAddress>
- </Link>
- <PreBuildEvent>
- <Command>$(KillPythonExe)
-IF %ERRORLEVEL% NEQ 0 (
- echo kill_python: war^ning: could not kill running Pythons, exit code %ERRORLEVEL%
- exit /b 0
-)</Command>
- </PreBuildEvent>
- <PreBuildEvent>
- <Message>Killing any running $(PythonExe) instances...</Message>
- </PreBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <AdditionalOptions>/Zm200 %(AdditionalOptions)</AdditionalOptions>
- <Optimization>Disabled</Optimization>
- <InlineFunctionExpansion>Default</InlineFunctionExpansion>
- <IntrinsicFunctions>false</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\Python;..\Modules\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- <AdditionalIncludeDirectories>..\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <PreLinkEvent>
- <Message>Generate build information...</Message>
- <Command>"$(SolutionDir)make_buildinfo.exe" Debug "$(IntDir)"</Command>
- </PreLinkEvent>
- <Link>
- <AdditionalDependencies>$(IntDir)getbuildinfo.o;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreSpecificDefaultLibraries>libc;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <BaseAddress>0x1e000000</BaseAddress>
- </Link>
- <PreBuildEvent>
- <Command>$(KillPythonExe)
-IF %ERRORLEVEL% NEQ 0 (
- echo kill_python: war^ning: could not kill running Pythons, exit code %ERRORLEVEL%
- exit /b 0
-)</Command>
- </PreBuildEvent>
- <PreBuildEvent>
- <Message>Killing any running $(PythonExe) instances...</Message>
- </PreBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalOptions>/Zm200 %(AdditionalOptions)</AdditionalOptions>
- <Optimization>Disabled</Optimization>
- <InlineFunctionExpansion>Default</InlineFunctionExpansion>
- <IntrinsicFunctions>false</IntrinsicFunctions>
- <AdditionalIncludeDirectories>..\Python;..\Modules\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- <AdditionalIncludeDirectories>..\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <PreLinkEvent>
- <Message>Generate build information...</Message>
- <Command>"$(SolutionDir)make_buildinfo.exe" Debug "$(IntDir)"</Command>
- </PreLinkEvent>
- <Link>
- <AdditionalDependencies>$(IntDir)getbuildinfo.o;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreSpecificDefaultLibraries>libc;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <BaseAddress>0x1e000000</BaseAddress>
- </Link>
- <PreBuildEvent>
- <Command>$(KillPythonExe)
-IF %ERRORLEVEL% NEQ 0 (
- echo kill_python: war^ning: could not kill running Pythons, exit code %ERRORLEVEL%
- exit /b 0
-)</Command>
- </PreBuildEvent>
- <PreBuildEvent>
- <Message>Killing any running $(PythonExe) instances...</Message>
- </PreBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
- <ClCompile>
- <AdditionalOptions>/Zm200 %(AdditionalOptions)</AdditionalOptions>
- <AdditionalIncludeDirectories>..\Python;..\Modules\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- <AdditionalIncludeDirectories>..\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <PreLinkEvent>
- <Message>Generate build information...</Message>
- <Command>"$(SolutionDir)make_buildinfo.exe" Release "$(IntDir)\"</Command>
- </PreLinkEvent>
- <Link>
- <AdditionalDependencies>$(IntDir)getbuildinfo.o;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(OutDir)$(PyDllName).dll</OutputFile>
- <IgnoreSpecificDefaultLibraries>libc;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <BaseAddress>0x1e000000</BaseAddress>
- </Link>
- <PreBuildEvent>
- <Command>$(KillPythonExe)
-IF %ERRORLEVEL% NEQ 0 (
- echo kill_python: war^ning: could not kill running Pythons, exit code %ERRORLEVEL%
- exit /b 0
-)</Command>
- </PreBuildEvent>
- <PreBuildEvent>
- <Message>Killing any running $(PythonExe) instances...</Message>
- </PreBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalOptions>/Zm200 %(AdditionalOptions)</AdditionalOptions>
- <AdditionalIncludeDirectories>..\Python;..\Modules\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- <AdditionalIncludeDirectories>..\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <PreLinkEvent>
- <Message>Generate build information...</Message>
- <Command>"$(SolutionDir)make_buildinfo.exe" Release "$(IntDir)\"</Command>
- </PreLinkEvent>
- <Link>
- <AdditionalDependencies>$(IntDir)getbuildinfo.o;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreSpecificDefaultLibraries>libc;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <BaseAddress>0x1e000000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- <PreBuildEvent>
- <Command>$(KillPythonExe)
-IF %ERRORLEVEL% NEQ 0 (
- echo kill_python: war^ning: could not kill running Pythons, exit code %ERRORLEVEL%
- exit /b 0
-)</Command>
- </PreBuildEvent>
- <PreBuildEvent>
- <Message>Killing any running $(PythonExe) instances...</Message>
- </PreBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
- <ClCompile>
- <AdditionalOptions>/Zm200 %(AdditionalOptions)</AdditionalOptions>
- <AdditionalIncludeDirectories>..\Python;..\Modules\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- <AdditionalIncludeDirectories>..\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <PreLinkEvent>
- <Message>Generate build information...</Message>
- <Command>"$(SolutionDir)make_buildinfo.exe" Release "$(IntDir)\"</Command>
- </PreLinkEvent>
- <Link>
- <AdditionalDependencies>$(IntDir)getbuildinfo.o;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(OutDir)$(PyDllName).dll</OutputFile>
- <IgnoreSpecificDefaultLibraries>libc;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <BaseAddress>0x1e000000</BaseAddress>
- </Link>
- <PreBuildEvent>
- <Command>$(KillPythonExe)
-IF %ERRORLEVEL% NEQ 0 (
- echo kill_python: war^ning: could not kill running Pythons, exit code %ERRORLEVEL%
- exit /b 0
-)</Command>
- </PreBuildEvent>
- <PreBuildEvent>
- <Message>Killing any running $(PythonExe) instances...</Message>
- </PreBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
+ <PropertyGroup>
+ <CustomBuildBeforeTargets>Link</CustomBuildBeforeTargets>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
<ClCompile>
<AdditionalOptions>/Zm200 %(AdditionalOptions)</AdditionalOptions>
- <AdditionalIncludeDirectories>..\Python;..\Modules\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <AdditionalIncludeDirectories>$(PySourcePath)Python;$(PySourcePath)Modules\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- <AdditionalIncludeDirectories>..\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <PreLinkEvent>
- <Message>Generate build information...</Message>
- <Command>"$(SolutionDir)make_buildinfo.exe" Release "$(IntDir)\"</Command>
- </PreLinkEvent>
<Link>
- <AdditionalDependencies>$(IntDir)getbuildinfo.o;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreSpecificDefaultLibraries>libc;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+ <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<BaseAddress>0x1e000000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
</Link>
- <PreBuildEvent>
- <Command>$(KillPythonExe)
-IF %ERRORLEVEL% NEQ 0 (
- echo kill_python: war^ning: could not kill running Pythons, exit code %ERRORLEVEL%
- exit /b 0
-)</Command>
- </PreBuildEvent>
- <PreBuildEvent>
- <Message>Killing any running $(PythonExe) instances...</Message>
- </PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\Include\abstract.h" />
@@ -486,6 +121,7 @@ IF %ERRORLEVEL% NEQ 0 (
<ClInclude Include="..\Include\node.h" />
<ClInclude Include="..\Include\object.h" />
<ClInclude Include="..\Include\objimpl.h" />
+ <ClInclude Include="..\Include\odictobject.h" />
<ClInclude Include="..\Include\opcode.h" />
<ClInclude Include="..\Include\osdefs.h" />
<ClInclude Include="..\Include\parsetok.h" />
@@ -502,6 +138,7 @@ IF %ERRORLEVEL% NEQ 0 (
<ClInclude Include="..\Include\pyexpat.h" />
<ClInclude Include="..\Include\pyfpe.h" />
<ClInclude Include="..\Include\pygetopt.h" />
+ <ClInclude Include="..\Include\pylifecycle.h" />
<ClInclude Include="..\Include\pymath.h" />
<ClInclude Include="..\Include\pytime.h" />
<ClInclude Include="..\Include\pymacro.h" />
@@ -510,6 +147,7 @@ IF %ERRORLEVEL% NEQ 0 (
<ClInclude Include="..\Include\pystate.h" />
<ClInclude Include="..\Include\pystrcmp.h" />
<ClInclude Include="..\Include\pystrtod.h" />
+ <ClInclude Include="..\Include\pystrhex.h" />
<ClInclude Include="..\Include\dtoa.h" />
<ClInclude Include="..\Include\Python-ast.h" />
<ClInclude Include="..\Include\Python.h" />
@@ -675,6 +313,7 @@ IF %ERRORLEVEL% NEQ 0 (
<ClCompile Include="..\Objects\namespaceobject.c" />
<ClCompile Include="..\Objects\object.c" />
<ClCompile Include="..\Objects\obmalloc.c" />
+ <ClCompile Include="..\Objects\odictobject.c" />
<ClCompile Include="..\Objects\rangeobject.c" />
<ClCompile Include="..\Objects\setobject.c" />
<ClCompile Include="..\Objects\sliceobject.c" />
@@ -696,9 +335,9 @@ IF %ERRORLEVEL% NEQ 0 (
<ClCompile Include="..\Parser\parser.c" />
<ClCompile Include="..\Parser\parsetok.c" />
<ClCompile Include="..\Parser\tokenizer.c" />
+ <ClCompile Include="..\PC\invalid_parameter_handler.c" />
<ClCompile Include="..\PC\winreg.c" />
<ClCompile Include="..\PC\config.c" />
- <ClCompile Include="..\PC\dl_nt.c" />
<ClCompile Include="..\PC\getpathp.c" />
<ClCompile Include="..\PC\msvcrtmodule.c" />
<ClCompile Include="..\Python\pyhash.c" />
@@ -734,10 +373,12 @@ IF %ERRORLEVEL% NEQ 0 (
<ClCompile Include="..\Python\pyarena.c" />
<ClCompile Include="..\Python\pyctype.c" />
<ClCompile Include="..\Python\pyfpe.c" />
+ <ClCompile Include="..\Python\pylifecycle.c" />
<ClCompile Include="..\Python\pymath.c" />
<ClCompile Include="..\Python\pytime.c" />
<ClCompile Include="..\Python\pystate.c" />
<ClCompile Include="..\Python\pystrcmp.c" />
+ <ClCompile Include="..\Python\pystrhex.c" />
<ClCompile Include="..\Python\pystrtod.c" />
<ClCompile Include="..\Python\dtoa.c" />
<ClCompile Include="..\Python\Python-ast.c" />
@@ -749,23 +390,30 @@ IF %ERRORLEVEL% NEQ 0 (
<ClCompile Include="..\Python\traceback.c" />
</ItemGroup>
<ItemGroup>
- <ResourceCompile Include="..\PC\python_nt.rc" />
+ <ClCompile Include="..\PC\dl_nt.c" />
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="kill_python.vcxproj">
- <Project>{6de10744-e396-40a5-b4e2-1b69aa7c8d31}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- <ProjectReference Include="make_buildinfo.vcxproj">
- <Project>{c73f0ec1-358b-4177-940f-0846ac8b04cd}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- <ProjectReference Include="make_versioninfo.vcxproj">
- <Project>{f0e0541e-f17d-430b-97c4-93adf0dd284e}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
+ <ResourceCompile Include="..\PC\python_nt.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+ <Target Name="_GetBuildInfo" BeforeTargets="PrepareForBuild">
+ <Exec Command="hg id -b &gt; &quot;$(IntDir)hgbranch.txt&quot;" ContinueOnError="true" />
+ <Exec Command="hg id -i &gt; &quot;$(IntDir)hgversion.txt&quot;" ContinueOnError="true" />
+ <Exec Command="hg id -t &gt; &quot;$(IntDir)hgtag.txt&quot;" ContinueOnError="true" />
+ <PropertyGroup>
+ <HgBranch Condition="Exists('$(IntDir)hgbranch.txt')">$([System.IO.File]::ReadAllText('$(IntDir)hgbranch.txt').Trim())</HgBranch>
+ <HgVersion Condition="Exists('$(IntDir)hgversion.txt')">$([System.IO.File]::ReadAllText('$(IntDir)hgversion.txt').Trim())</HgVersion>
+ <HgTag Condition="Exists('$(IntDir)hgtag.txt')">$([System.IO.File]::ReadAllText('$(IntDir)hgtag.txt').Trim())</HgTag>
+ </PropertyGroup>
+ <ItemGroup>
+ <ClCompile Include="..\Modules\getbuildinfo.c">
+ <PreprocessorDefinitions>HGVERSION="$(HgVersion)";HGTAG="$(HgTag)";HGBRANCH="$(HgBranch)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ </Target>
+ <Target Name="_WarnAboutToolset" BeforeTargets="PrepareForBuild" Condition="$(PlatformToolset) != 'v140'">
+ <Warning Text="Toolset $(PlatformToolset) is not used for official builds. Your build may have errors or incompatibilities." />
+ </Target>
+</Project> \ No newline at end of file
diff --git a/PCbuild/pythoncore.vcxproj.filters b/PCbuild/pythoncore.vcxproj.filters
index 8c652475a6..837b73690a 100644
--- a/PCbuild/pythoncore.vcxproj.filters
+++ b/PCbuild/pythoncore.vcxproj.filters
@@ -216,6 +216,9 @@
<ClInclude Include="..\Include\pygetopt.h">
<Filter>Include</Filter>
</ClInclude>
+ <ClInclude Include="..\Include\pylifecycle.h">
+ <Filter>Include</Filter>
+ </ClInclude>
<ClInclude Include="..\Include\pymath.h">
<Filter>Include</Filter>
</ClInclude>
@@ -240,6 +243,9 @@
<ClInclude Include="..\Include\pystrtod.h">
<Filter>Include</Filter>
</ClInclude>
+ <ClInclude Include="..\Include\pystrhex.h">
+ <Filter>Include</Filter>
+ </ClInclude>
<ClInclude Include="..\Include\dtoa.h">
<Filter>Include</Filter>
</ClInclude>
@@ -429,6 +435,9 @@
<ClInclude Include="..\Modules\hashtable.h">
<Filter>Modules</Filter>
</ClInclude>
+ <ClInclude Include="..\Include\odictobject.h">
+ <Filter>Include</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\Modules\_bisectmodule.c">
@@ -890,6 +899,9 @@
<ClCompile Include="..\Python\pyfpe.c">
<Filter>Python</Filter>
</ClCompile>
+ <ClCompile Include="..\Python\pylifecycle.c">
+ <Filter>Python</Filter>
+ </ClCompile>
<ClCompile Include="..\Python\pymath.c">
<Filter>Python</Filter>
</ClCompile>
@@ -902,6 +914,9 @@
<ClCompile Include="..\Python\pystrcmp.c">
<Filter>Python</Filter>
</ClCompile>
+ <ClCompile Include="..\Python\pystrhex.c">
+ <Filter>Python</Filter>
+ </ClCompile>
<ClCompile Include="..\Python\pystrtod.c">
<Filter>Python</Filter>
</ClCompile>
@@ -953,6 +968,12 @@
<ClCompile Include="..\Modules\hashtable.c">
<Filter>Modules</Filter>
</ClCompile>
+ <ClCompile Include="..\PC\invalid_parameter_handler.c">
+ <Filter>PC</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Objects\odictobject.c">
+ <Filter>Objects</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\PC\python_nt.rc">
diff --git a/PCbuild/pythonw.vcxproj b/PCbuild/pythonw.vcxproj
index 1214569eb9..caed1e8dcf 100644
--- a/PCbuild/pythonw.vcxproj
+++ b/PCbuild/pythonw.vcxproj
@@ -36,296 +36,29 @@
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{F4229CC3-873C-49AE-9729-DD308ED4CD4A}</ProjectGuid>
+ <SupportPGO>false</SupportPGO>
</PropertyGroup>
+ <Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="release.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="release.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="release.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="debug.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="x64.props" />
- <Import Project="release.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="x64.props" />
- <Import Project="release.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="pyproject.props" />
- <Import Project="x64.props" />
- <Import Project="release.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="x64.props" />
- <Import Project="debug.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <IntrinsicFunctions>false</IntrinsicFunctions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <CompileAs>Default</CompileAs>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Link>
- <OutputFile>$(OutDir)pythonw_d.exe</OutputFile>
- <StackReserveSize>2000000</StackReserveSize>
- <BaseAddress>0x1d000000</BaseAddress>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <IntrinsicFunctions>false</IntrinsicFunctions>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <CompileAs>Default</CompileAs>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Link>
- <OutputFile>$(OutDir)pythonw_d.exe</OutputFile>
- <StackReserveSize>2000000</StackReserveSize>
- <BaseAddress>0x1d000000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <CompileAs>Default</CompileAs>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Link>
- <OutputFile>$(OutDir)pythonw.exe</OutputFile>
- <StackReserveSize>2000000</StackReserveSize>
- <BaseAddress>0x1d000000</BaseAddress>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <CompileAs>Default</CompileAs>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Link>
- <OutputFile>$(OutDir)pythonw.exe</OutputFile>
- <StackReserveSize>2000000</StackReserveSize>
- <BaseAddress>0x1d000000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <CompileAs>Default</CompileAs>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Link>
- <OutputFile>$(OutDir)pythonw.exe</OutputFile>
- <StackReserveSize>2000000</StackReserveSize>
- <BaseAddress>0x1d000000</BaseAddress>
- <ImportLibrary>
- </ImportLibrary>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <CompileAs>Default</CompileAs>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Link>
- <OutputFile>$(OutDir)pythonw.exe</OutputFile>
- <StackReserveSize>2000000</StackReserveSize>
- <BaseAddress>0x1d000000</BaseAddress>
- <ImportLibrary>
- </ImportLibrary>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <CompileAs>Default</CompileAs>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Link>
- <OutputFile>$(OutDir)pythonw.exe</OutputFile>
- <StackReserveSize>2000000</StackReserveSize>
- <BaseAddress>0x1d000000</BaseAddress>
- <ImportLibrary>
- </ImportLibrary>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <CompileAs>Default</CompileAs>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
+ <ItemDefinitionGroup>
<Link>
- <OutputFile>$(OutDir)pythonw.exe</OutputFile>
<StackReserveSize>2000000</StackReserveSize>
<BaseAddress>0x1d000000</BaseAddress>
- <ImportLibrary>
- </ImportLibrary>
- <TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
diff --git a/PCbuild/pywlauncher.vcxproj b/PCbuild/pywlauncher.vcxproj
index 96ea421536..eabf883a4a 100644
--- a/PCbuild/pywlauncher.vcxproj
+++ b/PCbuild/pywlauncher.vcxproj
@@ -37,200 +37,36 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{1D4B18D3-7C12-4ECB-9179-8531FF876CE6}</ProjectGuid>
<RootNamespace>pywlauncher</RootNamespace>
+ <TargetName>pyw</TargetName>
+ <SupportPGO>false</SupportPGO>
</PropertyGroup>
+ <Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="debug.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="debug.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="release.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="release.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="release.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="release.props" />
- <Import Project="x64.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyproject.props" />
- <Import Project="release.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
+ <PropertyGroup>
+ <MakeVersionInfoBeforeTarget>ClCompile</MakeVersionInfoBeforeTarget>
+ </PropertyGroup>
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="pyproject.props" />
- <Import Project="release.props" />
- <Import Project="x64.props" />
- <Import Project="pgupdate.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <TargetName>pyw_d</TargetName>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <TargetName>pyw_d</TargetName>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <TargetName>pyw</TargetName>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <TargetName>pyw</TargetName>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
- <TargetName>pyw</TargetName>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
- <TargetName>pyw</TargetName>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalDependencies>version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
- <SubSystem>Windows</SubSystem>
- <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ItemDefinitionGroup>
<ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <AdditionalDependencies>version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
- <SubSystem>Windows</SubSystem>
- <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>_WINDOWS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>false</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
- <AdditionalDependencies>version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SubSystem>Windows</SubSystem>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <PreprocessorDefinitions>_WINDOWS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>false</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<AdditionalDependencies>version.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
- <Link>
- <AdditionalDependencies>version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- <ClCompile>
- <PreprocessorDefinitions>_WINDOWS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
- <Link>
- <AdditionalDependencies>version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- <ClCompile>
- <PreprocessorDefinitions>_WINDOWS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
- <Link>
- <AdditionalDependencies>version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- <ClCompile>
- <PreprocessorDefinitions>_WINDOWS;NDEBUG;_WIN64;_M_X64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
- <Link>
- <AdditionalDependencies>version.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- <ClCompile>
- <PreprocessorDefinitions>_WINDOWS;NDEBUG;_WIN64;_M_X64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\PC\launcher.c" />
</ItemGroup>
@@ -240,11 +76,6 @@
<ItemGroup>
<ResourceCompile Include="..\PC\pylauncher.rc" />
</ItemGroup>
- <ItemGroup>
- <ProjectReference Include="make_versioninfo.vcxproj">
- <Project>{f0e0541e-f17d-430b-97c4-93adf0dd284e}</Project>
- </ProjectReference>
- </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
diff --git a/PCbuild/readme.txt b/PCbuild/readme.txt
index e0c6685c9e..e68cc5c859 100644
--- a/PCbuild/readme.txt
+++ b/PCbuild/readme.txt
@@ -1,49 +1,54 @@
+Quick Start Guide
+-----------------
+
+1. Install Microsoft Visual Studio 2015, any edition.
+2. Install Subversion, and make sure 'svn.exe' is on your PATH.
+3. Run "build.bat -e" to build Python in 32-bit Release configuration.
+4. (Optional, but recommended) Run the test suite with "rt.bat -q".
+
+
Building Python using Microsoft Visual C++
------------------------------------------
This directory is used to build CPython for Microsoft Windows NT version
-5.1 or higher (Windows XP, Windows Server 2003, or later) on 32 and 64
+6.0 or higher (Windows Vista, Windows Server 2008, or later) on 32 and 64
bit platforms. Using this directory requires an installation of
-Microsoft Visual C++ 2010 (MSVC 10.0) of any edition. The specific
+Microsoft Visual C++ 2015 (MSVC 14.0) of any edition. The specific
requirements are as follows:
-Visual C++ 2010 Express Edition
- Required for building 32-bit Debug and Release configuration builds.
+Visual Studio Express 2015 for Desktop
+Visual Studio Professional 2015
+ Either edition is sufficient for building all configurations except
+ for Profile Guided Optimization.
The Python build solution pcbuild.sln makes use of Solution Folders,
which this edition does not support. Any time pcbuild.sln is opened
- or reloaded by Visual C++, a warning about Solution Folders will be
- displayed which can be safely dismissed with no impact on your
+ or reloaded by Visual Studio, a warning about Solution Folders will
+ be displayed, which can be safely dismissed with no impact on your
ability to build Python.
-Visual Studio 2010 Professional Edition
Required for building 64-bit Debug and Release configuration builds
-Visual Studio 2010 Premium Edition
+Visual Studio Premium 2015
Required for building Release configuration builds that make use of
Profile Guided Optimization (PGO), on either platform.
-Installing Service Pack 1 for Visual Studio 2010 is highly recommended
-to avoid LNK1123 errors.
-
All you need to do to build is open the solution "pcbuild.sln" in Visual
Studio, select the desired combination of configuration and platform,
-then build with "Build Solution" or the F7 keyboard shortcut. You can
-also build from the command line using the "build.bat" script in this
-directory. The solution is configured to build the projects in the
-correct order.
+then build with "Build Solution". You can also build from the command
+line using the "build.bat" script in this directory; see below for
+details. The solution is configured to build the projects in the correct
+order.
The solution currently supports two platforms. The Win32 platform is
-used to build standard x86-compatible 32-bit binaries, output into this
-directory. The x64 platform is used for building 64-bit AMD64 (aka
-x86_64 or EM64T) binaries, output into the amd64 sub-directory which
-will be created if it doesn't already exist. The Itanium (IA-64)
-platform is no longer supported. See the "Building for AMD64" section
-below for more information about 64-bit builds.
+used to build standard x86-compatible 32-bit binaries, output into the
+win32 sub-directory. The x64 platform is used for building 64-bit AMD64
+(aka x86_64 or EM64T) binaries, output into the amd64 sub-directory.
+The Itanium (IA-64) platform is no longer supported.
Four configuration options are supported by the solution:
Debug
Used to build Python with extra debugging capabilities, equivalent
to using ./configure --with-pydebug on UNIX. All binaries built
using this configuration have "_d" added to their name:
- python34_d.dll, python_d.exe, parser_d.pyd, and so on. Both the
+ python35_d.dll, python_d.exe, parser_d.pyd, and so on. Both the
build and rt (run test) batch files in this directory accept a -d
option for debug builds. If you are building Python to help with
development of CPython, you will most likely use this configuration.
@@ -52,28 +57,31 @@ PGInstrument, PGUpdate
requires Premium Edition of Visual Studio. See the "Profile
Guided Optimization" section below for more information. Build
output from each of these configurations lands in its own
- sub-directory of this directory. The official Python releases are
- built using these configurations.
+ sub-directory of this directory. The official Python releases may
+ be built using these configurations.
Release
Used to build Python as it is meant to be used in production
settings, though without PGO.
-Legacy support
---------------
+Building Python using the build.bat script
+----------------------------------------------
-You can find build directories for older versions of Visual Studio and
-Visual C++ in the PC directory. The legacy build directories are no
-longer actively maintained and may not work out of the box.
+In this directory you can find build.bat, a script designed to make
+building Python on Windows simpler. This script will use the env.bat
+script to detect one of Visual Studio 2015, 2013, 2012, or 2010, any of
+which may be used to build Python, though only Visual Studio 2015 is
+officially supported.
-Currently, the only legacy build directory is PC\VS9.0, for Visual
-Studio 2008 (9.0).
+By default, build.bat will build Python in Release configuration for
+the 32-bit Win32 platform. It accepts several arguments to change
+this behavior, try `build.bat -h` to learn more.
C Runtime
---------
-Visual Studio 2010 uses version 10 of the C runtime (MSVCRT10). The
+Visual Studio 2015 uses version 14 of the C runtime (MSVCRT14). The
executables no longer use the "Side by Side" assemblies used in previous
versions of the compiler. This simplifies distribution of applications.
@@ -98,12 +106,6 @@ pythoncore
.dll and .lib
python
.exe
-kill_python
- kill_python.exe, a small program designed to kill any instances of
- python(_d).exe that are running and live in the build output
- directory; this is meant to avoid build issues due to locked files
-make_buildinfo, make_versioninfo
- helpers to provide necessary information to the build process
These sub-projects provide extra executables that are useful for running
CPython in different ways:
@@ -121,14 +123,10 @@ _testembed
purposes, used by test_capi.py
These are miscellaneous sub-projects that don't really fit the other
-categories. By default, these projects do not build in Debug
-configuration:
+categories:
_freeze_importlib
_freeze_importlib.exe, used to regenerate Python\importlib.h after
changes have been made to Lib\importlib\_bootstrap.py
-bdist_wininst
- ..\Lib\distutils\command\wininst-10.0[-amd64].exe, the base
- executable used by the distutils bdist_wininst command
python3dll
python3.dll, the PEP 384 Stable ABI dll
xxlimited
@@ -171,7 +169,7 @@ _lzma
Homepage:
http://tukaani.org/xz/
_ssl
- Python wrapper for version 1.0.2d of the OpenSSL secure sockets
+ Python wrapper for version 1.0.2g of the OpenSSL secure sockets
library, which is built by ssl.vcxproj
Homepage:
http://www.openssl.org/
@@ -184,56 +182,49 @@ _ssl
you should first try to update NASM and do a full rebuild of
OpenSSL. If you use the PCbuild\get_externals.bat method
for getting sources, it also downloads a version of NASM which the
- ssl build script will add to PATH.
+ libeay/ssleay sub-projects use.
+
+ The libeay/ssleay sub-projects expect your OpenSSL sources to have
+ already been configured and be ready to build. If you get your sources
+ from svn.python.org as suggested in the "Getting External Sources"
+ section below, the OpenSSL source will already be ready to go. If
+ you want to build a different version, you will need to run
- If you like to use the official sources instead of the files from
- python.org's subversion repository, Perl is required to build the
- necessary makefiles and assembly files. ActivePerl is available
- from
+ PCbuild\prepare_ssl.py path\to\openssl-source-dir
+
+ That script will prepare your OpenSSL sources in the same way that
+ those available on svn.python.org have been prepared. Note that
+ Perl must be installed and available on your PATH to configure
+ OpenSSL. ActivePerl is recommended and is available from
http://www.activestate.com/activeperl/
- The svn.python.org version contains pre-built makefiles and assembly
- files.
-
- The build process makes sure that no patented algorithms are
- included. For now RC5, MDC2 and IDEA are excluded from the build.
- You may have to manually remove $(OBJ_D)\i_*.obj from ms\nt.mak if
- using official sources; the svn.python.org-hosted version is already
- fixed.
-
- The ssl.vcxproj sub-project simply invokes PCbuild/build_ssl.py,
- which locates and builds OpenSSL.
-
- build_ssl.py attempts to catch the most common errors (such as not
- being able to find OpenSSL sources, or not being able to find a Perl
- that works with OpenSSL) and give a reasonable error message. If
- you have a problem that doesn't seem to be handled correctly (e.g.,
- you know you have ActivePerl but we can't find it), please take a
- peek at build_ssl.py and suggest patches. Note that build_ssl.py
- should be able to be run directly from the command-line.
-
- The ssl sub-project does not have the ability to clean the OpenSSL
- build; if you need to rebuild, you'll have to clean it by hand.
+
+ The libeay and ssleay sub-projects will build the modules of OpenSSL
+ required by _ssl and _hashlib and may need to be manually updated when
+ upgrading to a newer version of OpenSSL or when adding new
+ functionality to _ssl or _hashlib. They will not clean up their output
+ with the normal Clean target; CleanAll should be used instead.
_sqlite3
Wraps SQLite 3.8.11.0, which is itself built by sqlite3.vcxproj
Homepage:
http://www.sqlite.org/
_tkinter
- Wraps version 8.6.1 of the Tk windowing system.
+ Wraps version 8.6.4 of the Tk windowing system.
Homepage:
http://www.tcl.tk/
- Unlike the other external libraries listed above, Tk must be built
- separately before the _tkinter module can be built. This means that
- a pre-built Tcl/Tk installation is expected in ..\externals\tcltk
- (tcltk64 for 64-bit) relative to this directory; the easiest way to
- do so is to build Python using `build.bat -e`, which will build
- Tcl, Tk, and Tix and install them as expected. Note that to
- import and use tkinter, the Tcl and Tk DLLs must be somewhere that
- python.exe can find them, which means that either
- ..\externals\tcltk[64]\bin must be added to PATH, or the DLLs must
- be copied from that folder to be alongside python.exe. `build.bat`
- takes care of it for you by copying the DLLs into the build
- directory.
+ Tkinter's dependencies are built by the tcl.vcxproj and tk.vcxproj
+ projects. The tix.vcxproj project also builds the Tix extended
+ widget set for use with Tkinter.
+
+ Those three projects install their respective components in a
+ directory alongside the source directories called "tcltk" on
+ Win32 and "tcltk64" on x64. They also copy the Tcl and Tk DLLs
+ into the current output directory, which should ensure that Tkinter
+ is able to load Tcl/Tk without having to change your PATH.
+
+ The tcl, tk, and tix sub-projects do not clean their builds with
+ the normal Clean target; if you need to rebuild, you should use the
+ CleanAll target or manually delete their builds.
Getting External Sources
@@ -242,24 +233,21 @@ Getting External Sources
The last category of sub-projects listed above wrap external projects
Python doesn't control, and as such a little more work is required in
order to download the relevant source files for each project before they
-can be built. The easiest way to do this is to use the `build.bat`
-script in this directory to build Python, and pass the '-e' switch to
-tell it to use get_externals.bat to fetch external sources and build
-Tcl/Tk and Tix. To use get_externals.bat, you'll need to have
-Subversion installed and svn.exe on your PATH. The script will fetch
-external library sources from http://svn.python.org/external and place
-them in ..\externals (relative to this directory).
-
-
-Building for AMD64
-------------------
-
-The build process for AMD64 / x64 is very similar to standard builds,
-you just have to set x64 as platform. In addition, the HOST_PYTHON
-environment variable must point to a Python interpreter (at least 2.4),
-to support cross-compilation from Win32. Note that Visual Studio
-requires Professional Edition or better in order to build 64-bit
-binaries.
+can be built. However, a simple script is provided to make this as
+painless as possible, called "get_externals.bat" and located in this
+directory. This script extracts all the external sub-projects from
+ http://svn.python.org/projects/external
+via Subversion (so you'll need svn.exe on your PATH) and places them
+in ..\externals (relative to this directory).
+
+It is also possible to download sources from each project's homepage,
+though you may have to change folder names or pass the names to MSBuild
+as the values of certain properties in order for the build solution to
+find them. This is an advanced topic and not necessarily fully
+supported.
+
+The get_externals.bat script is called automatically by build.bat when
+you pass the '-e' option to it.
Profile Guided Optimization
@@ -276,7 +264,7 @@ It creates the PGI files, runs the unit test suite or PyBench with the
PGI python, and finally creates the optimized files.
See
- http://msdn.microsoft.com/en-us/library/e7k32f4k(VS.100).aspx
+ http://msdn.microsoft.com/en-us/library/e7k32f4k(VS.140).aspx
for more on this topic.
@@ -294,27 +282,19 @@ also have to change the "Runtime Library" from "Multi-threaded DLL
Visual Studio properties
------------------------
-The PCbuild solution makes heavy use of Visual Studio property files
-(*.props). The properties can be viewed and altered in the Property
-Manager (View -> Other Windows -> Property Manager).
-
-The property files used are (+-- = "also imports"):
- * debug (debug macro: _DEBUG)
- * pginstrument (PGO)
- * pgupdate (PGO)
- +-- pginstrument
- * pyd (python extension, release build)
- +-- release
- +-- pyproject
- * pyd_d (python extension, debug build)
- +-- debug
- +-- pyproject
- * pyproject (base settings for all projects, user macros like PyDllName)
- * release (release macro: NDEBUG)
- * sqlite3 (used only by sqlite3.vcxproj)
- * x64 (AMD64 / x64 platform specific settings)
-
-The pyproject property file defines _WIN32 and x64 defines _WIN64 and
-_M_X64 although the macros are set by the compiler, too. The GUI doesn't
-always know about the macros and confuse the user with false
-information.
+The PCbuild solution makes use of Visual Studio property files (*.props)
+to simplify each project. The properties can be viewed in the Property
+Manager (View -> Other Windows -> Property Manager) but should be
+carefully modified by hand.
+
+The property files used are:
+ * python (versions, directories and build names)
+ * pyproject (base settings for all projects)
+ * openssl (used by libeay and ssleay projects)
+ * tcltk (used by _tkinter, tcl, tk and tix projects)
+
+The pyproject property file defines all of the build settings for each
+project, with some projects overriding certain specific values. The GUI
+doesn't always reflect the correct settings and may confuse the user
+with false information, especially for settings that automatically adapt
+for diffirent configurations.
diff --git a/PCbuild/release.props b/PCbuild/release.props
deleted file mode 100644
index acfe3e45ba..0000000000
--- a/PCbuild/release.props
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup Label="UserMacros">
- <PyDebugExt />
- </PropertyGroup>
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <ClCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemGroup>
- <BuildMacro Include="PyDebugExt">
- <Value>$(PyDebugExt)</Value>
- </BuildMacro>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/PCbuild/rt.bat b/PCbuild/rt.bat
index 13c9d62939..2d93b80a49 100644
--- a/PCbuild/rt.bat
+++ b/PCbuild/rt.bat
@@ -28,25 +28,25 @@ rem rt -u "network,largefile"
setlocal
set pcbuild=%~dp0
-set prefix=%pcbuild%
+set prefix=%pcbuild%win32\
set suffix=
set qmode=
set dashO=
-set tcltk=tcltk
+set regrtestargs=
:CheckOpts
if "%1"=="-O" (set dashO=-O) & shift & goto CheckOpts
if "%1"=="-q" (set qmode=yes) & shift & goto CheckOpts
if "%1"=="-d" (set suffix=_d) & shift & goto CheckOpts
-if "%1"=="-x64" (set prefix=%prefix%amd64) & (set tcltk=tcltk64) & shift & goto CheckOpts
+if "%1"=="-x64" (set prefix=%pcbuild%amd64\) & shift & goto CheckOpts
+if NOT "%1"=="" (set regrtestargs=%regrtestargs% %1) & shift & goto CheckOpts
-PATH %PATH%;%pcbuild%..\externals\%tcltk%\bin
-set exe="%prefix%\python%suffix%"
-set cmd=%exe% %dashO% -Wd -E -bb "%pcbuild%..\lib\test\regrtest.py" %1 %2 %3 %4 %5 %6 %7 %8 %9
+set exe=%prefix%python%suffix%.exe
+set cmd="%exe%" %dashO% -Wd -E -bb "%pcbuild%..\lib\test\regrtest.py" %regrtestargs%
if defined qmode goto Qmode
echo Deleting .pyc/.pyo files ...
-%exe% "%pcbuild%\rmpyc.py"
+"%exe%" "%pcbuild%rmpyc.py"
echo on
%cmd%
diff --git a/PCbuild/select.vcxproj b/PCbuild/select.vcxproj
index 7c36d646b7..d6112ab6fe 100644
--- a/PCbuild/select.vcxproj
+++ b/PCbuild/select.vcxproj
@@ -37,192 +37,40 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{18CAE28C-B454-46C1-87A0-493D91D97F03}</ProjectGuid>
<RootNamespace>select</RootNamespace>
- <Keyword>Win32Proj</Keyword>
</PropertyGroup>
+ <Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <PropertyGroup>
+ <TargetExt>.pyd</TargetExt>
+ </PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- <Import Project="x64.props" />
+ <Import Project="pyproject.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ItemDefinitionGroup>
<Link>
<AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreSpecificDefaultLibraries>libc;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<BaseAddress>0x1D110000</BaseAddress>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreSpecificDefaultLibraries>libc;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <BaseAddress>0x1D110000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreSpecificDefaultLibraries>libc;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <BaseAddress>0x1D110000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreSpecificDefaultLibraries>libc;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <BaseAddress>0x1D110000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreSpecificDefaultLibraries>libc;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <BaseAddress>0x1D110000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreSpecificDefaultLibraries>libc;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <BaseAddress>0x1D110000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreSpecificDefaultLibraries>libc;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <BaseAddress>0x1D110000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreSpecificDefaultLibraries>libc;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <BaseAddress>0x1D110000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\Modules\selectmodule.c" />
</ItemGroup>
<ItemGroup>
+ <ResourceCompile Include="..\PC\python_nt.rc" />
+ </ItemGroup>
+ <ItemGroup>
<ProjectReference Include="pythoncore.vcxproj">
<Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
diff --git a/PCbuild/sqlite3.props b/PCbuild/sqlite3.props
deleted file mode 100644
index d3ee02cf75..0000000000
--- a/PCbuild/sqlite3.props
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ImportGroup Label="PropertySheets">
- <Import Project="pyproject.props" />
- </ImportGroup>
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <ClCompile>
- <AdditionalIncludeDirectories>$(sqlite3Dir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>SQLITE_API=__declspec(dllexport);%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <WarningLevel>Level1</WarningLevel>
- </ClCompile>
- </ItemDefinitionGroup>
-</Project> \ No newline at end of file
diff --git a/PCbuild/sqlite3.vcxproj b/PCbuild/sqlite3.vcxproj
index daf010dae0..c841c5a8ea 100644
--- a/PCbuild/sqlite3.vcxproj
+++ b/PCbuild/sqlite3.vcxproj
@@ -37,189 +37,41 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{A1A295E5-463C-437F-81CA-1F32367685DA}</ProjectGuid>
<RootNamespace>sqlite3</RootNamespace>
- <Keyword>Win32Proj</Keyword>
+ <TargetExt>.pyd</TargetExt>
+ <SupportPGO>false</SupportPGO>
</PropertyGroup>
+ <Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="sqlite3.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="sqlite3.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="sqlite3.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="sqlite3.props" />
- <Import Project="debug.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="sqlite3.props" />
- <Import Project="x64.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="sqlite3.props" />
- <Import Project="x64.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="sqlite3.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="sqlite3.props" />
- <Import Project="debug.props" />
- <Import Project="x64.props" />
+ <Import Project="pyproject.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <_SqliteVersion>$([System.Text.RegularExpressions.Regex]::Match(`$(sqlite3Dir)`, `((\d+)\.(\d+)\.(\d+)\.(\d+))\\?$`).Groups)</_SqliteVersion>
+ <SqliteVersion>$(_SqliteVersion.Split(`;`)[1])</SqliteVersion>
+ <SqliteMajorVersion>$(_SqliteVersion.Split(`;`)[2])</SqliteMajorVersion>
+ <SqliteMinorVersion>$(_SqliteVersion.Split(`;`)[3])</SqliteMinorVersion>
+ <SqliteMicroVersion>$(_SqliteVersion.Split(`;`)[4])</SqliteMicroVersion>
+ <SqlitePatchVersion>$(_SqliteVersion.Split(`;`)[5])</SqlitePatchVersion>
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <OutputFile>$(OutDir)$(ProjectName)_d.dll</OutputFile>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <OutputFile>$(OutDir)$(ProjectName)_d.dll</OutputFile>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
+ <ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(sqlite3Dir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>SQLITE_API=__declspec(dllexport);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <WarningLevel>Level1</WarningLevel>
</ClCompile>
- <Link>
- <OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
- <ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <ClCompile>
- <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>SQLITE_VERSION=$(SqliteVersion);SQLITE_MAJOR_VERSION=$(SqliteMajorVersion);SQLITE_MINOR_VERSION=$(SqliteMinorVersion);SQLITE_MICRO_VERSION=$(SqliteMicroVersion);SQLITE_PATCH_VERSION=$(SqlitePatchVersion);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="$(sqlite3Dir)\sqlite3.h" />
@@ -229,10 +81,7 @@
<ClCompile Include="$(sqlite3Dir)\sqlite3.c" />
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="kill_python.vcxproj">
- <Project>{6de10744-e396-40a5-b4e2-1b69aa7c8d31}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
+ <ResourceCompile Include="..\PC\sqlite3.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
diff --git a/PCbuild/ssl.vcxproj b/PCbuild/ssl.vcxproj
deleted file mode 100644
index d5eac9ae04..0000000000
--- a/PCbuild/ssl.vcxproj
+++ /dev/null
@@ -1,221 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|Win32">
- <Configuration>PGInstrument</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGInstrument|x64">
- <Configuration>PGInstrument</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|Win32">
- <Configuration>PGUpdate</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="PGUpdate|x64">
- <Configuration>PGUpdate</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}</ProjectGuid>
- <RootNamespace>ssl</RootNamespace>
- <Keyword>MakeFileProj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration">
- <ConfigurationType>Makefile</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration">
- <ConfigurationType>Makefile</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Makefile</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Makefile</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration">
- <ConfigurationType>Makefile</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration">
- <ConfigurationType>Makefile</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Makefile</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Makefile</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cd "$(SolutionDir)"
-"$(PythonExe)" build_ssl.py Release $(Platform) -a
-</NMakeBuildCommandLine>
- <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">echo OpenSSL must be cleaned manually if you want to rebuild it.</NMakeCleanCommandLine>
- <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
- <NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
- <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
- <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
- <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
- <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">cd "$(SolutionDir)"
-"$(PythonExe)" build_ssl.py Release $(Platform) -a
-</NMakeBuildCommandLine>
- <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo OpenSSL must be cleaned manually if you want to rebuild it.</NMakeCleanCommandLine>
- <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
- <NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
- <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
- <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
- <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
- <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd "$(SolutionDir)"
-"$(PythonExe)" build_ssl.py Release $(Platform) -a
-</NMakeBuildCommandLine>
- <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">echo OpenSSL must be cleaned manually if you want to rebuild it.</NMakeCleanCommandLine>
- <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
- <NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
- <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
- <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
- <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
- <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|x64'">cd "$(SolutionDir)"
-"$(PythonExe)" build_ssl.py Release $(Platform) -a
-</NMakeBuildCommandLine>
- <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo OpenSSL must be cleaned manually if you want to rebuild it.</NMakeCleanCommandLine>
- <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
- <NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
- <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
- <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
- <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
- <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">cd "$(SolutionDir)"
-"$(PythonExe)" build_ssl.py Release $(Platform) -a
-</NMakeBuildCommandLine>
- <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">echo OpenSSL must be cleaned manually if you want to rebuild it.</NMakeCleanCommandLine>
- <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
- <NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
- <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
- <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
- <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
- <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">cd "$(SolutionDir)"
-"$(PythonExe)" build_ssl.py Release $(Platform) -a
-</NMakeBuildCommandLine>
- <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">echo OpenSSL must be cleaned manually if you want to rebuild it.</NMakeCleanCommandLine>
- <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
- <NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
- <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
- <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
- <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
- <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">cd "$(SolutionDir)"
-"$(PythonExe)" build_ssl.py Release $(Platform) -a
-</NMakeBuildCommandLine>
- <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">echo OpenSSL must be cleaned manually if you want to rebuild it.</NMakeCleanCommandLine>
- <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
- <NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
- <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
- <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
- <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
- <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">cd "$(SolutionDir)"
-"$(PythonExe)" build_ssl.py Release $(Platform) -a
-</NMakeBuildCommandLine>
- <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">echo OpenSSL must be cleaned manually if you want to rebuild it.</NMakeCleanCommandLine>
- <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
- <NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
- <NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
- <NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
- <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
- </PropertyGroup>
- <ItemDefinitionGroup>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ProjectReference Include="python.vcxproj">
- <Project>{b11d750f-cd1f-4a96-85ce-e69a5c5259f9}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/PCbuild/ssleay.vcxproj b/PCbuild/ssleay.vcxproj
new file mode 100644
index 0000000000..439e3ac674
--- /dev/null
+++ b/PCbuild/ssleay.vcxproj
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGInstrument|Win32">
+ <Configuration>PGInstrument</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGInstrument|x64">
+ <Configuration>PGInstrument</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGUpdate|Win32">
+ <Configuration>PGUpdate</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGUpdate|x64">
+ <Configuration>PGUpdate</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{10615B24-73BF-4EFA-93AA-236916321317}</ProjectGuid>
+ <RootNamespace>ssleay</RootNamespace>
+ </PropertyGroup>
+
+ <Import Project="python.props" />
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ </PropertyGroup>
+
+ <Import Project="openssl.props" />
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+
+ <ItemGroup>
+ <!--
+ <ClCompile Include="$(opensslDir)ssl\bio_ssl.c" />
+ -->
+ <ClCompile Include="$(opensslDir)ssl\d1_both.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)ssl\d1_clnt.c" />
+ <ClCompile Include="$(opensslDir)ssl\d1_enc.c" />
+ -->
+ <ClCompile Include="$(opensslDir)ssl\d1_lib.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)ssl\d1_meth.c" />
+ -->
+ <ClCompile Include="$(opensslDir)ssl\d1_pkt.c" />
+ <ClCompile Include="$(opensslDir)ssl\d1_srtp.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)ssl\d1_srvr.c" />
+ <ClCompile Include="$(opensslDir)ssl\kssl.c" />
+ -->
+ <ClCompile Include="$(opensslDir)ssl\s2_clnt.c" />
+ <ClCompile Include="$(opensslDir)ssl\s2_enc.c" />
+ <ClCompile Include="$(opensslDir)ssl\s2_lib.c" />
+ <ClCompile Include="$(opensslDir)ssl\s2_meth.c" />
+ <ClCompile Include="$(opensslDir)ssl\s2_pkt.c" />
+ <ClCompile Include="$(opensslDir)ssl\s2_srvr.c" />
+ <ClCompile Include="$(opensslDir)ssl\s23_clnt.c" />
+ <ClCompile Include="$(opensslDir)ssl\s23_lib.c" />
+ <ClCompile Include="$(opensslDir)ssl\s23_meth.c" />
+ <ClCompile Include="$(opensslDir)ssl\s23_pkt.c" />
+ <ClCompile Include="$(opensslDir)ssl\s23_srvr.c" />
+ <ClCompile Include="$(opensslDir)ssl\s3_both.c" />
+ <ClCompile Include="$(opensslDir)ssl\s3_cbc.c" />
+ <ClCompile Include="$(opensslDir)ssl\s3_clnt.c" />
+ <ClCompile Include="$(opensslDir)ssl\s3_enc.c" />
+ <ClCompile Include="$(opensslDir)ssl\s3_lib.c" />
+ <ClCompile Include="$(opensslDir)ssl\s3_meth.c" />
+ <ClCompile Include="$(opensslDir)ssl\s3_pkt.c" />
+ <ClCompile Include="$(opensslDir)ssl\s3_srvr.c" />
+ <ClCompile Include="$(opensslDir)ssl\ssl_algs.c" />
+ <ClCompile Include="$(opensslDir)ssl\ssl_asn1.c" />
+ <ClCompile Include="$(opensslDir)ssl\ssl_cert.c" />
+ <ClCompile Include="$(opensslDir)ssl\ssl_ciph.c" />
+ <ClCompile Include="$(opensslDir)ssl\ssl_err.c" />
+ <ClCompile Include="$(opensslDir)ssl\ssl_err2.c" />
+ <ClCompile Include="$(opensslDir)ssl\ssl_lib.c" />
+ <ClCompile Include="$(opensslDir)ssl\ssl_rsa.c" />
+ <ClCompile Include="$(opensslDir)ssl\ssl_sess.c" />
+ <!--
+ <ClCompile Include="$(opensslDir)ssl\ssl_stat.c" />
+ <ClCompile Include="$(opensslDir)ssl\ssl_txt.c" />
+ <ClCompile Include="$(opensslDir)ssl\ssl_utst.c" />
+ -->
+ <ClCompile Include="$(opensslDir)ssl\t1_clnt.c" />
+ <ClCompile Include="$(opensslDir)ssl\t1_enc.c" />
+ <ClCompile Include="$(opensslDir)ssl\t1_lib.c" />
+ <ClCompile Include="$(opensslDir)ssl\t1_meth.c" />
+ <ClCompile Include="$(opensslDir)ssl\t1_reneg.c" />
+ <ClCompile Include="$(opensslDir)ssl\t1_srvr.c" />
+ <ClCompile Include="$(opensslDir)ssl\tls_srp.c" />
+ </ItemGroup>
+
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <Target Name="Clean" />
+ <Target Name="CleanAll">
+ <Delete Files="$(TargetPath)" />
+ <RemoveDir Directories="$(IntDir)" />
+ </Target>
+</Project> \ No newline at end of file
diff --git a/PCbuild/tcl.vcxproj b/PCbuild/tcl.vcxproj
new file mode 100644
index 0000000000..464c83ce80
--- /dev/null
+++ b/PCbuild/tcl.vcxproj
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGInstrument|Win32">
+ <Configuration>PGInstrument</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGInstrument|x64">
+ <Configuration>PGInstrument</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGUpdate|Win32">
+ <Configuration>PGUpdate</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGUpdate|x64">
+ <Configuration>PGUpdate</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{B5FD6F1D-129E-4BFF-9340-03606FAC7283}</ProjectGuid>
+ </PropertyGroup>
+
+ <Import Project="python.props" />
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <Import Project="tcltk.props" />
+
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>Makefile</ConfigurationType>
+ <OutDir>$(tcltkDir)</OutDir>
+ <TargetPath>$(OutDir)bin\$(tclDLLName)</TargetPath>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ExpectedOutputs Include="
+ $(OutDir)\bin\$(tclDLLName);
+ $(OutDir)\bin\$(tclShExeName);
+ $(OutDir)\include\tcl.h;
+ $(OutDir)\lib\tcl$(TclMajorVersion);
+ $(OutDir)\lib\tcl$(TclMajorVersion).$(TclMinorVersion);
+ $(OutDir)\lib\$(tclLibName)" />
+ </ItemGroup>
+
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+
+ <PropertyGroup>
+ <TclOpts>msvcrt</TclOpts>
+ <TclOpts Condition="$(Configuration) == 'Debug'">symbols,msvcrt</TclOpts>
+ <TclDirs>INSTALLDIR="$(OutDir.TrimEnd(`\`))" INSTALL_DIR="$(OutDir.TrimEnd(`\`))"</TclDirs>
+ <DebugFlags Condition="'$(Configuration)' == 'Debug'">DEBUGFLAGS="-wd4456 -wd4457 -wd4458 -wd4459 -wd4996"</DebugFlags>
+ <NMakeBuildCommandLine>setlocal
+@(ExpectedOutputs->'if not exist "%(FullPath)" goto build','
+')
+goto :eof
+:build
+set VCINSTALLDIR=$(VCInstallDir)
+cd /D "$(tclDir)win"
+nmake -f makefile.vc MACHINE=$(TclMachine) OPTS=$(TclOpts) $(TclDirs) $(DebugFlags) core shell dlls
+nmake -f makefile.vc MACHINE=$(TclMachine) OPTS=$(TclOpts) $(TclDirs) $(DebugFlags) install-binaries install-libraries
+</NMakeBuildCommandLine>
+ </PropertyGroup>
+
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+
+ <Target Name="CopyDll" Inputs="$(OutDir)\bin\$(tclDLLName)" Outputs="$(BuildPath)$(tclDLLName)" AfterTargets="Build">
+ <Copy SourceFiles="$(OutDir)\bin\$(tclDLLName)" DestinationFiles="$(BuildPath)$(tclDLLName)" />
+ </Target>
+
+ <Target Name="Clean" />
+ <Target Name="CleanAll">
+ <Delete Files="$(TargetPath);$(BuildPath)$(tclDLLName)" />
+ <RemoveDir Directories="$(IntDir)" />
+ </Target>
+</Project> \ No newline at end of file
diff --git a/PCbuild/tcltk.props b/PCbuild/tcltk.props
new file mode 100644
index 0000000000..11dbffbdbf
--- /dev/null
+++ b/PCbuild/tcltk.props
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="pyproject.props" />
+ <PropertyGroup>
+ <TclMajorVersion>8</TclMajorVersion>
+ <TclMinorVersion>6</TclMinorVersion>
+ <TclPatchLevel>4</TclPatchLevel>
+ <TclRevision>2</TclRevision>
+ <TkMajorVersion>$(TclMajorVersion)</TkMajorVersion>
+ <TkMinorVersion>$(TclMinorVersion)</TkMinorVersion>
+ <TkPatchLevel>$(TclPatchLevel)</TkPatchLevel>
+ <TkRevision>$(TclRevision)</TkRevision>
+ <TixMajorVersion>8</TixMajorVersion>
+ <TixMinorVersion>4</TixMinorVersion>
+ <TixPatchLevel>3</TixPatchLevel>
+ <TixRevision>6</TixRevision>
+ <tclDir>$(ExternalsDir)tcl-core-$(TclMajorVersion).$(TclMinorVersion).$(TclPatchLevel).$(TclRevision)\</tclDir>
+ <tkDir>$(ExternalsDir)tk-$(TkMajorVersion).$(TkMinorVersion).$(TkPatchLevel).$(TkRevision)\</tkDir>
+ <tixDir>$(ExternalsDir)tix-$(TixMajorVersion).$(TixMinorVersion).$(TixPatchLevel).$(TixRevision)\</tixDir>
+ <tcltkDir>$(ExternalsDir)tcltk\</tcltkDir>
+ <tcltkDir Condition="'$(Platform)' == 'x64'">$(ExternalsDir)tcltk64\</tcltkDir>
+ <TclDebugExt Condition="'$(Configuration)' == 'Debug'">g</TclDebugExt>
+ <tclDLLName>tcl$(TclMajorVersion)$(TclMinorVersion)t$(TclDebugExt).dll</tclDLLName>
+ <tclLibName>tcl$(TclMajorVersion)$(TclMinorVersion)t$(TclDebugExt).lib</tclLibName>
+ <tclShExeName>tclsh$(TclMajorVersion)$(TclMinorVersion)t$(TclDebugExt).exe</tclShExeName>
+ <tkDLLName>tk$(TkMajorVersion)$(TkMinorVersion)t$(TclDebugExt).dll</tkDLLName>
+ <tkLibName>tk$(TkMajorVersion)$(TkMinorVersion)t$(TclDebugExt).lib</tkLibName>
+ <tixDLLName>tix$(TixMajorVersion)$(TixMinorVersion)$(TclDebugExt).dll</tixDLLName>
+ <tixDLLPath>$(tcltkDir)lib\tix$(TixMajorVersion).$(TixMinorVersion).$(TixPatchLevel)\$(tixDLLName)</tixDLLPath>
+ <tcltkLib>$(tcltkDir)lib\tcl$(TclMajorVersion)$(TclMinorVersion)t$(TclDebugExt).lib;$(tcltkDir)lib\tk$(TkMajorVersion)$(TkMinorVersion)t$(TclDebugExt).lib</tcltkLib>
+ <TclMachine>IX86</TclMachine>
+ <TclMachine Condition="'$(Platform)' == 'x64'">AMD64</TclMachine>
+ <TclVersions>TCL_MAJOR_VERSION=$(TclMajorVersion) TCL_MINOR_VERSION=$(TclMinorVersion) TCL_PATCH_LEVEL=$(TclPatchLevel)</TclVersions>
+ <TclShortVersions>TCL_MAJOR=$(TclMajorVersion) TCL_MINOR=$(TclMinorVersion) TCL_PATCH=$(TclPatchLevel)</TclShortVersions>
+ <TkVersions>TK_MAJOR_VERSION=$(TkMajorVersion) TK_MINOR_VERSION=$(TkMinorVersion) TK_PATCH_LEVEL=$(TkPatchLevel)</TkVersions>
+
+ <BuildDirTop>Release</BuildDirTop>
+ <BuildDirTop Condition="$(Configuration) == 'Debug'">Debug</BuildDirTop>
+ <BuildDirTop Condition="$(TclMachine) != 'IX86'">$(BuildDirTop)_$(TclMachine)</BuildDirTop>
+ <BuildDirTop Condition="$(PlatformToolset) == 'v140'">$(BuildDirTop)_VC13</BuildDirTop>
+ <BuildDirTop Condition="$(PlatformToolset) == 'v120'">$(BuildDirTop)_VC12</BuildDirTop>
+ <BuildDirTop Condition="$(PlatformToolset) == 'v110'">$(BuildDirTop)_VC11</BuildDirTop>
+ <BuildDirTop Condition="$(PlatformToolset) == 'v100'">$(BuildDirTop)_VC10</BuildDirTop>
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/PCbuild/tix.vcxproj b/PCbuild/tix.vcxproj
new file mode 100644
index 0000000000..f857f9e67f
--- /dev/null
+++ b/PCbuild/tix.vcxproj
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGInstrument|Win32">
+ <Configuration>PGInstrument</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGInstrument|x64">
+ <Configuration>PGInstrument</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGUpdate|Win32">
+ <Configuration>PGUpdate</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGUpdate|x64">
+ <Configuration>PGUpdate</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}</ProjectGuid>
+ <RootNamespace>tix</RootNamespace>
+ </PropertyGroup>
+
+ <Import Project="python.props" />
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <Import Project="tcltk.props" />
+
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>Makefile</ConfigurationType>
+ <OutDir>$(tcltkDir)</OutDir>
+ <TargetPath>$(tixDLLPath)</TargetPath>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ExpectedOutputs Include="$(TargetPath)" />
+ </ItemGroup>
+
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+
+ <PropertyGroup>
+ <TixDirs>BUILDDIRTOP="$(BuildDirTop)" TCL_DIR="$(tclDir.TrimEnd(`\`))" TK_DIR="$(tkDir.TrimEnd(`\`))" INSTALL_DIR="$(OutDir.TrimEnd(`\`))"</TixDirs>
+ <DebugFlags Condition="'$(Configuration)' == 'Debug'">DEBUG=1 NODEBUG=0 TCL_DBGX=g TK_DBGX=g</DebugFlags>
+ <DebugFlags Condition="'$(Configuration)' != 'Debug'">DEBUG=0 NODEBUG=1</DebugFlags>
+ <NMakeBuildCommandLine>setlocal
+@(ExpectedOutputs->'if not exist "%(FullPath)" goto build','
+')
+goto :eof
+:build
+set VCINSTALLDIR=$(VCInstallDir)
+cd /D "$(tixDir)win"
+nmake /nologo -f makefile.vc MACHINE=$(TclMachine) $(DebugFlags) $(TclShortVersions) $(TixDirs) all install
+</NMakeBuildCommandLine>
+ <NMakeCleanCommandLine>rmdir /q/s "$(OutDir.TrimEnd(`\`))"</NMakeCleanCommandLine>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="tcl.vcxproj">
+ <Project>{b5fd6f1d-129e-4bff-9340-03606fac7283}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="tk.vcxproj">
+ <Project>{7e85eccf-a72c-4da4-9e52-884508e80ba1}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+
+ <Target Name="Clean" />
+ <Target Name="CleanAll">
+ <RemoveDir Directories="$(OutDir)" />
+ <RemoveDir Directories="$(IntDir)" />
+ </Target>
+</Project> \ No newline at end of file
diff --git a/PCbuild/tk.vcxproj b/PCbuild/tk.vcxproj
new file mode 100644
index 0000000000..20749f719f
--- /dev/null
+++ b/PCbuild/tk.vcxproj
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGInstrument|Win32">
+ <Configuration>PGInstrument</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGInstrument|x64">
+ <Configuration>PGInstrument</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGUpdate|Win32">
+ <Configuration>PGUpdate</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="PGUpdate|x64">
+ <Configuration>PGUpdate</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{7E85ECCF-A72C-4DA4-9E52-884508E80BA1}</ProjectGuid>
+ <RootNamespace>tk</RootNamespace>
+ </PropertyGroup>
+
+ <Import Project="python.props" />
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <Import Project="tcltk.props" />
+
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>Makefile</ConfigurationType>
+ <OutDir>$(tcltkDir)</OutDir>
+ <TargetPath>$(OutDir)bin\$(tkDLLName)</TargetPath>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ExpectedOutputs Include="
+ $(OutDir)bin\$(tkDLLName);
+ $(OutDir)include\tk.h;
+ $(OutDir)lib\$(tkLibName);
+ $(OutDir)lib\tk$(TkMajorVersion).$(TkMinorVersion)" />
+ </ItemGroup>
+
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+
+ <PropertyGroup>
+ <TkOpts>msvcrt</TkOpts>
+ <TkOpts Condition="$(Configuration) == 'Debug'">symbols,msvcrt</TkOpts>
+ <TkDirs>TCLDIR="$(tclDir.TrimEnd(`\`))" INSTALLDIR="$(OutDir.TrimEnd(`\`))"</TkDirs>
+ <DebugFlags Condition="'$(Configuration)' == 'Debug'">DEBUGFLAGS="-wd4456 -wd4457 -wd4458 -wd4459 -wd4996"</DebugFlags>
+ <NMakeBuildCommandLine>setlocal
+@(ExpectedOutputs->'if not exist "%(FullPath)" goto build','
+')
+goto :eof
+:build
+set VCINSTALLDIR=$(VCInstallDir)
+cd /D "$(tkDir)win"
+nmake /nologo -f makefile.vc RC=rc MACHINE=$(TclMachine) OPTS=$(TkOpts) $(TkDirs) $(DebugFlags) all
+nmake /nologo -f makefile.vc RC=rc MACHINE=$(TclMachine) OPTS=$(TkOpts) $(TkDirs) $(DebugFlags) install-binaries install-libraries
+</NMakeBuildCommandLine>
+ </PropertyGroup>
+ <ItemGroup>
+ <ProjectReference Include="tcl.vcxproj">
+ <Project>{b5fd6f1d-129e-4bff-9340-03606fac7283}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+
+ <Target Name="CopyDll" Inputs="$(OutDir)\bin\$(tkDLLName)" Outputs="$(BuildPath)$(tkDLLName)" AfterTargets="Build">
+ <Copy SourceFiles="$(OutDir)\bin\$(tkDLLName)" DestinationFiles="$(BuildPath)$(tkDLLName)" />
+ </Target>
+
+ <Target Name="Clean" />
+ <Target Name="CleanAll">
+ <Delete Files="$(TargetPath);$(BuildPath)$(tkDLLName)" />
+ <RemoveDir Directories="$(IntDir)" />
+ </Target>
+</Project> \ No newline at end of file
diff --git a/PCbuild/unicodedata.vcxproj b/PCbuild/unicodedata.vcxproj
index c9d5278684..317c1a8a56 100644
--- a/PCbuild/unicodedata.vcxproj
+++ b/PCbuild/unicodedata.vcxproj
@@ -39,170 +39,31 @@
<RootNamespace>unicodedata</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
+ <Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <PropertyGroup>
+ <TargetExt>.pyd</TargetExt>
+ </PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- <Import Project="x64.props" />
+ <Import Project="pyproject.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ItemDefinitionGroup>
<Link>
<BaseAddress>0x1D120000</BaseAddress>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <BaseAddress>0x1D120000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Link>
- <BaseAddress>0x1D120000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <BaseAddress>0x1D120000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
- <Link>
- <BaseAddress>0x1D120000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <BaseAddress>0x1D120000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
- <Link>
- <BaseAddress>0x1D120000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <BaseAddress>0x1D120000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\Modules\unicodedata_db.h" />
<ClInclude Include="..\Modules\unicodename_db.h" />
@@ -211,6 +72,9 @@
<ClCompile Include="..\Modules\unicodedata.c" />
</ItemGroup>
<ItemGroup>
+ <ResourceCompile Include="..\PC\python_nt.rc" />
+ </ItemGroup>
+ <ItemGroup>
<ProjectReference Include="pythoncore.vcxproj">
<Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
diff --git a/PCbuild/vs9to10.py b/PCbuild/vs9to10.py
deleted file mode 100644
index eb7dab50b8..0000000000
--- a/PCbuild/vs9to10.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#Run this file after automatic conversion of the VisualStudio 2008 solution by VisualStudio 2010.
-#This can be done whenever the 2008 solution changes.
-#It will make the necessary cleanup and updates to the vcxproj files
-#the .props files need to be maintained by hand if the .vsprops files change
-
-from __future__ import with_statement
-import sys
-import os
-import os.path
-
-def vs9to10(src, dest):
- for name in os.listdir(src):
- path, ext = os.path.splitext(name)
- if ext.lower() not in ('.vcxproj',):
- continue
-
- filename = os.path.normpath(os.path.join(src, name))
- destname = os.path.normpath(os.path.join(dest, name))
- print("%s -> %s" % (filename, destname))
-
- lines = []
- lastline = b""
- importgroup = False
- with open(filename, 'rb') as fin:
- for line in fin:
- #remove redundant linker output info
- if b"<OutputLine>" in line:
- continue
- if b"<ProgramDatabaseFile>" in line:
- continue
- if b"<ImportLibrary>" in line and b"</ImportLibrary>" in line:
- continue
-
- #add new property sheet to the pythoncore
- if importgroup and "pythoncore" in name.lower():
- if b"</ImportGroup>" in line:
- if b"debug.props" in lastline:
- lines.append(b' <Import Project="pythoncore_d.props" />\r\n')
- elif b"pythoncore" not in lastline:
- lines.append(b' <Import Project="pythoncore.props" />\r\n')
- if b"<ImportGroup Condition" in line:
- importgroup = True
- elif b"</ImportGroup>" in line:
- importgroup = False
- lines.append(line)
- lastline = line
- with open(destname, 'wb') as fout:
- for line in lines:
- fout.write(line)
-
-if __name__ == "__main__":
- src = "." if len(sys.argv) < 2 else sys.argv[1]
- name = os.path.basename(os.path.abspath(src))
- dest = os.path.abspath(os.path.join(src, "..", name + "Upd"))
- os.makedirs(dest)
- vs9to10(src, dest)
diff --git a/PCbuild/vs9to8.py b/PCbuild/vs9to8.py
deleted file mode 100644
index 3b88a16c27..0000000000
--- a/PCbuild/vs9to8.py
+++ /dev/null
@@ -1,34 +0,0 @@
-from __future__ import with_statement
-import os
-
-def vs9to8(src, dest):
- for name in os.listdir(src):
- path, ext = os.path.splitext(name)
- if ext.lower() not in ('.sln', '.vcproj', '.vsprops'):
- continue
-
- filename = os.path.normpath(os.path.join(src, name))
- destname = os.path.normpath(os.path.join(dest, name))
- print("%s -> %s" % (filename, destname))
-
- with open(filename, 'rU') as fin:
- lines = fin.read()
- lines = lines.replace('Version="9,00"', 'Version="8.00"')
- lines = lines.replace('Version="9.00"', 'Version="8.00"')
- lines = lines.replace('Format Version 10.00', 'Format Version 9.00')
- lines = lines.replace('Visual Studio 2008', 'Visual Studio 2005')
-
- lines = lines.replace('wininst-9.0', 'wininst-8.0')
- lines = lines.replace('..\\', '..\\..\\')
- lines = lines.replace('..\\..\\..\\..\\', '..\\..\\..\\')
-
- # Bah. VS8.0 does not expand macros in file names.
- # Replace them here.
- lines = lines.replace('$(sqlite3Dir)', '..\\..\\..\\sqlite-3.6.21')
-
- with open(destname, 'wb') as fout:
- lines = lines.replace("\n", "\r\n").encode()
- fout.write(lines)
-
-if __name__ == "__main__":
- vs9to8(src=".", dest="../PC/VS8.0")
diff --git a/PCbuild/winsound.vcxproj b/PCbuild/winsound.vcxproj
index cf518e9936..12913efdef 100644
--- a/PCbuild/winsound.vcxproj
+++ b/PCbuild/winsound.vcxproj
@@ -39,174 +39,38 @@
<RootNamespace>winsound</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
+ <Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <PropertyGroup>
+ <TargetExt>.pyd</TargetExt>
+ </PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd_d.props" />
- <Import Project="x64.props" />
+ <Import Project="pyproject.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ItemDefinitionGroup>
<Link>
<AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Link>
- <AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
- <Link>
- <AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
- <Link>
- <AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <AdditionalDependencies>winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\PC\winsound.c" />
</ItemGroup>
<ItemGroup>
+ <ResourceCompile Include="..\PC\python_nt.rc" />
+ </ItemGroup>
+ <ItemGroup>
<ProjectReference Include="pythoncore.vcxproj">
<Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
diff --git a/PCbuild/x64.props b/PCbuild/x64.props
deleted file mode 100644
index 985c0ef7f7..0000000000
--- a/PCbuild/x64.props
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup Label="UserMacros" Condition="'$(HOST_PYTHON)'!=''">
- <PythonExe>$(HOST_PYTHON)</PythonExe>
- </PropertyGroup>
- <ItemDefinitionGroup>
- <ClCompile>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <PreprocessorDefinitions>_WIN64;_M_X64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <BuildMacro Include="PythonExe">
- <Value>$(PythonExe)</Value>
- </BuildMacro>
- </ItemGroup>
-</Project>
diff --git a/PCbuild/xxlimited.vcxproj b/PCbuild/xxlimited.vcxproj
index abf41f9682..0144fa9a3d 100644
--- a/PCbuild/xxlimited.vcxproj
+++ b/PCbuild/xxlimited.vcxproj
@@ -1,6 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
<ProjectConfiguration Include="PGInstrument|Win32">
<Configuration>PGInstrument</Configuration>
<Platform>Win32</Platform>
@@ -31,158 +39,44 @@
<RootNamespace>xxlimited</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
+ <Import Project="python.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="Configuration">
+ <PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>NotSet</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
+ <SupportPGO>false</SupportPGO>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <PropertyGroup>
+ <TargetExt>.pyd</TargetExt>
+ </PropertyGroup>
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pgupdate.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
- <Import Project="pginstrument.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="pyd.props" />
- <Import Project="x64.props" />
+ <Import Project="pyproject.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ItemDefinitionGroup>
<ClCompile>
- <PreprocessorDefinitions>NDEBUG;_WIN32;_WINDLL;Py_LIMITED_API=0x03040000</PreprocessorDefinitions>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);Py_LIMITED_API=0x03050000</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreSpecificDefaultLibraries>libc;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<BaseAddress>0x1D110000</BaseAddress>
</Link>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <AdditionalDependencies>wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreSpecificDefaultLibraries>libc;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <BaseAddress>0x1D110000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>Py_LIMITED_API=0x03040000;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreSpecificDefaultLibraries>libc;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <BaseAddress>0x1D110000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <AdditionalDependencies>wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreSpecificDefaultLibraries>libc;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <BaseAddress>0x1D110000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
- <ClCompile>
- <PreprocessorDefinitions>Py_LIMITED_API=0x03040000;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreSpecificDefaultLibraries>libc;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <BaseAddress>0x1D110000</BaseAddress>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
- <Midl>
- <TargetEnvironment>X64</TargetEnvironment>
- </Midl>
- <Link>
- <AdditionalDependencies>wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <IgnoreSpecificDefaultLibraries>libc;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
- <BaseAddress>0x1D110000</BaseAddress>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\Modules\xxlimited.c" />
</ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="python3dll.vcxproj">
+ <Project>{885d4898-d08d-4091-9c40-c700cfe3fc5a}</Project>
+ </ProjectReference>
+ </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
diff --git a/Parser/Python.asdl b/Parser/Python.asdl
index debd89edb8..cd0832da8d 100644
--- a/Parser/Python.asdl
+++ b/Parser/Python.asdl
@@ -9,13 +9,14 @@ module Python
-- not really an actual node but useful in Jython's typesystem.
| Suite(stmt* body)
- stmt = FunctionDef(identifier name, arguments args,
- stmt* body, expr* decorator_list, expr? returns)
- | ClassDef(identifier name,
+ stmt = FunctionDef(identifier name, arguments args,
+ stmt* body, expr* decorator_list, expr? returns)
+ | AsyncFunctionDef(identifier name, arguments args,
+ stmt* body, expr* decorator_list, expr? returns)
+
+ | ClassDef(identifier name,
expr* bases,
keyword* keywords,
- expr? starargs,
- expr? kwargs,
stmt* body,
expr* decorator_list)
| Return(expr? value)
@@ -26,9 +27,11 @@ module Python
-- use 'orelse' because else is a keyword in target languages
| For(expr target, expr iter, stmt* body, stmt* orelse)
+ | AsyncFor(expr target, expr iter, stmt* body, stmt* orelse)
| While(expr test, stmt* body, stmt* orelse)
| If(expr test, stmt* body, stmt* orelse)
| With(withitem* items, stmt* body)
+ | AsyncWith(withitem* items, stmt* body)
| Raise(expr? exc, expr? cause)
| Try(stmt* body, excepthandler* handlers, stmt* orelse, stmt* finalbody)
@@ -59,13 +62,13 @@ module Python
| DictComp(expr key, expr value, comprehension* generators)
| GeneratorExp(expr elt, comprehension* generators)
-- the grammar constrains where yield expressions can occur
+ | Await(expr value)
| Yield(expr? value)
| YieldFrom(expr value)
-- need sequences for compare to distinguish between
-- x < 4 < 3 and (x < 4) < 3
| Compare(expr left, cmpop* ops, expr* comparators)
- | Call(expr func, expr* args, keyword* keywords,
- expr? starargs, expr? kwargs)
+ | Call(expr func, expr* args, keyword* keywords)
| Num(object n) -- a number as a PyObject.
| Str(string s) -- need to specify raw, unicode, etc?
| Bytes(bytes s)
@@ -77,7 +80,7 @@ module Python
| Subscript(expr value, slice slice, expr_context ctx)
| Starred(expr value, expr_context ctx)
| Name(identifier id, expr_context ctx)
- | List(expr* elts, expr_context ctx)
+ | List(expr* elts, expr_context ctx)
| Tuple(expr* elts, expr_context ctx)
-- col_offset is the byte offset in the utf8 string the parser uses
@@ -85,13 +88,13 @@ module Python
expr_context = Load | Store | Del | AugLoad | AugStore | Param
- slice = Slice(expr? lower, expr? upper, expr? step)
- | ExtSlice(slice* dims)
- | Index(expr value)
+ slice = Slice(expr? lower, expr? upper, expr? step)
+ | ExtSlice(slice* dims)
+ | Index(expr value)
- boolop = And | Or
+ boolop = And | Or
- operator = Add | Sub | Mult | Div | Mod | Pow | LShift
+ operator = Add | Sub | Mult | MatMult | Div | Mod | Pow | LShift
| RShift | BitOr | BitXor | BitAnd | FloorDiv
unaryop = Invert | Not | UAdd | USub
@@ -109,8 +112,8 @@ module Python
arg = (identifier arg, expr? annotation)
attributes (int lineno, int col_offset)
- -- keyword arguments supplied to call
- keyword = (identifier arg, expr value)
+ -- keyword arguments supplied to call (NULL identifier for **kwargs)
+ keyword = (identifier? arg, expr value)
-- import name with optional 'as' alias.
alias = (identifier name, identifier? asname)
diff --git a/Parser/asdl.py b/Parser/asdl.py
index fc1b16c668..121cdab952 100644
--- a/Parser/asdl.py
+++ b/Parser/asdl.py
@@ -1,255 +1,52 @@
-"""An implementation of the Zephyr Abstract Syntax Definition Language.
-
-See http://asdl.sourceforge.net/ and
-http://www.cs.princeton.edu/research/techreps/TR-554-97
-
-Only supports top level module decl, not view. I'm guessing that view
-is intended to support the browser and I'm not interested in the
-browser.
-
-Changes for Python: Add support for module versions
-"""
-
-import os
-import sys
-import traceback
-
-import spark
-
-def output(*strings):
- for s in strings:
- sys.stdout.write(str(s) + "\n")
-
-
-class Token(object):
- # spark seems to dispatch in the parser based on a token's
- # type attribute
- def __init__(self, type, lineno):
- self.type = type
- self.lineno = lineno
-
- def __str__(self):
- return self.type
-
+#-------------------------------------------------------------------------------
+# Parser for ASDL [1] definition files. Reads in an ASDL description and parses
+# it into an AST that describes it.
+#
+# The EBNF we're parsing here: Figure 1 of the paper [1]. Extended to support
+# modules and attributes after a product. Words starting with Capital letters
+# are terminals. Literal tokens are in "double quotes". Others are
+# non-terminals. Id is either TokenId or ConstructorId.
+#
+# module ::= "module" Id "{" [definitions] "}"
+# definitions ::= { TypeId "=" type }
+# type ::= product | sum
+# product ::= fields ["attributes" fields]
+# fields ::= "(" { field, "," } field ")"
+# field ::= TypeId ["?" | "*"] [Id]
+# sum ::= constructor { "|" constructor } ["attributes" fields]
+# constructor ::= ConstructorId [fields]
+#
+# [1] "The Zephyr Abstract Syntax Description Language" by Wang, et. al. See
+# http://asdl.sourceforge.net/
+#-------------------------------------------------------------------------------
+from collections import namedtuple
+import re
+
+__all__ = [
+ 'builtin_types', 'parse', 'AST', 'Module', 'Type', 'Constructor',
+ 'Field', 'Sum', 'Product', 'VisitorBase', 'Check', 'check']
+
+# The following classes define nodes into which the ASDL description is parsed.
+# Note: this is a "meta-AST". ASDL files (such as Python.asdl) describe the AST
+# structure used by a programming language. But ASDL files themselves need to be
+# parsed. This module parses ASDL files and uses a simple AST to represent them.
+# See the EBNF at the top of the file to understand the logical connection
+# between the various node types.
+
+builtin_types = {'identifier', 'string', 'bytes', 'int', 'object', 'singleton'}
+
+class AST:
def __repr__(self):
- return str(self)
-
-class Id(Token):
- def __init__(self, value, lineno):
- self.type = 'Id'
- self.value = value
- self.lineno = lineno
-
- def __str__(self):
- return self.value
-
-class String(Token):
- def __init__(self, value, lineno):
- self.type = 'String'
- self.value = value
- self.lineno = lineno
-
-class ASDLSyntaxError(Exception):
-
- def __init__(self, lineno, token=None, msg=None):
- self.lineno = lineno
- self.token = token
- self.msg = msg
-
- def __str__(self):
- if self.msg is None:
- return "Error at '%s', line %d" % (self.token, self.lineno)
- else:
- return "%s, line %d" % (self.msg, self.lineno)
-
-class ASDLScanner(spark.GenericScanner, object):
-
- def tokenize(self, input):
- self.rv = []
- self.lineno = 1
- super(ASDLScanner, self).tokenize(input)
- return self.rv
-
- def t_id(self, s):
- r"[\w\.]+"
- # XXX doesn't distinguish upper vs. lower, which is
- # significant for ASDL.
- self.rv.append(Id(s, self.lineno))
-
- def t_string(self, s):
- r'"[^"]*"'
- self.rv.append(String(s, self.lineno))
-
- def t_xxx(self, s): # not sure what this production means
- r"<="
- self.rv.append(Token(s, self.lineno))
-
- def t_punctuation(self, s):
- r"[\{\}\*\=\|\(\)\,\?\:]"
- self.rv.append(Token(s, self.lineno))
-
- def t_comment(self, s):
- r"\-\-[^\n]*"
- pass
-
- def t_newline(self, s):
- r"\n"
- self.lineno += 1
-
- def t_whitespace(self, s):
- r"[ \t]+"
- pass
-
- def t_default(self, s):
- r" . +"
- raise ValueError("unmatched input: %r" % s)
-
-class ASDLParser(spark.GenericParser, object):
- def __init__(self):
- super(ASDLParser, self).__init__("module")
-
- def typestring(self, tok):
- return tok.type
-
- def error(self, tok):
- raise ASDLSyntaxError(tok.lineno, tok)
-
- def p_module_0(self, info):
- " module ::= Id Id { } "
- module, name, _0, _1 = info
- if module.value != "module":
- raise ASDLSyntaxError(module.lineno,
- msg="expected 'module', found %s" % module)
- return Module(name, None)
-
- def p_module(self, info):
- " module ::= Id Id { definitions } "
- module, name, _0, definitions, _1 = info
- if module.value != "module":
- raise ASDLSyntaxError(module.lineno,
- msg="expected 'module', found %s" % module)
- return Module(name, definitions)
-
- def p_definition_0(self, definition):
- " definitions ::= definition "
- return definition[0]
-
- def p_definition_1(self, definitions):
- " definitions ::= definition definitions "
- return definitions[0] + definitions[1]
-
- def p_definition(self, info):
- " definition ::= Id = type "
- id, _, type = info
- return [Type(id, type)]
-
- def p_type_0(self, product):
- " type ::= product "
- return product[0]
-
- def p_type_1(self, sum):
- " type ::= sum "
- return Sum(sum[0])
-
- def p_type_2(self, info):
- " type ::= sum Id ( fields ) "
- sum, id, _0, attributes, _1 = info
- if id.value != "attributes":
- raise ASDLSyntaxError(id.lineno,
- msg="expected attributes, found %s" % id)
- return Sum(sum, attributes)
-
- def p_product_0(self, info):
- " product ::= ( fields ) "
- _0, fields, _1 = info
- return Product(fields)
-
- def p_product_1(self, info):
- " product ::= ( fields ) Id ( fields ) "
- _0, fields, _1, id, _2, attributes, _3 = info
- if id.value != "attributes":
- raise ASDLSyntaxError(id.lineno,
- msg="expected attributes, found %s" % id)
- return Product(fields, attributes)
-
- def p_sum_0(self, constructor):
- " sum ::= constructor "
- return [constructor[0]]
-
- def p_sum_1(self, info):
- " sum ::= constructor | sum "
- constructor, _, sum = info
- return [constructor] + sum
-
- def p_sum_2(self, info):
- " sum ::= constructor | sum "
- constructor, _, sum = info
- return [constructor] + sum
-
- def p_constructor_0(self, id):
- " constructor ::= Id "
- return Constructor(id[0])
-
- def p_constructor_1(self, info):
- " constructor ::= Id ( fields ) "
- id, _0, fields, _1 = info
- return Constructor(id, fields)
-
- def p_fields_0(self, field):
- " fields ::= field "
- return [field[0]]
-
- def p_fields_1(self, info):
- " fields ::= fields , field "
- fields, _, field = info
- return fields + [field]
-
- def p_field_0(self, type_):
- " field ::= Id "
- return Field(type_[0])
-
- def p_field_1(self, info):
- " field ::= Id Id "
- type, name = info
- return Field(type, name)
-
- def p_field_2(self, info):
- " field ::= Id * Id "
- type, _, name = info
- return Field(type, name, seq=True)
-
- def p_field_3(self, info):
- " field ::= Id ? Id "
- type, _, name = info
- return Field(type, name, opt=True)
-
- def p_field_4(self, type_):
- " field ::= Id * "
- return Field(type_[0], seq=True)
-
- def p_field_5(self, type_):
- " field ::= Id ? "
- return Field(type[0], opt=True)
-
-builtin_types = ("identifier", "string", "bytes", "int", "object", "singleton")
-
-# below is a collection of classes to capture the AST of an AST :-)
-# not sure if any of the methods are useful yet, but I'm adding them
-# piecemeal as they seem helpful
-
-class AST(object):
- pass # a marker class
+ raise NotImplementedError
class Module(AST):
def __init__(self, name, dfns):
self.name = name
self.dfns = dfns
- self.types = {} # maps type name to value (from dfns)
- for type in dfns:
- self.types[type.name.value] = type.value
+ self.types = {type.name: type.value for type in dfns}
def __repr__(self):
- return "Module(%s, %s)" % (self.name, self.dfns)
+ return 'Module({0.name}, {0.dfns})'.format(self)
class Type(AST):
def __init__(self, name, value):
@@ -257,7 +54,7 @@ class Type(AST):
self.value = value
def __repr__(self):
- return "Type(%s, %s)" % (self.name, self.value)
+ return 'Type({0.name}, {0.value})'.format(self)
class Constructor(AST):
def __init__(self, name, fields=None):
@@ -265,7 +62,7 @@ class Constructor(AST):
self.fields = fields or []
def __repr__(self):
- return "Constructor(%s, %s)" % (self.name, self.fields)
+ return 'Constructor({0.name}, {0.fields})'.format(self)
class Field(AST):
def __init__(self, type, name=None, seq=False, opt=False):
@@ -282,9 +79,9 @@ class Field(AST):
else:
extra = ""
if self.name is None:
- return "Field(%s%s)" % (self.type, extra)
+ return 'Field({0.type}{1})'.format(self, extra)
else:
- return "Field(%s, %s%s)" % (self.type, self.name, extra)
+ return 'Field({0.type}, {0.name}{1})'.format(self, extra)
class Sum(AST):
def __init__(self, types, attributes=None):
@@ -292,10 +89,10 @@ class Sum(AST):
self.attributes = attributes or []
def __repr__(self):
- if self.attributes is None:
- return "Sum(%s)" % self.types
+ if self.attributes:
+ return 'Sum({0.types}, {0.attributes})'.format(self)
else:
- return "Sum(%s, %s)" % (self.types, self.attributes)
+ return 'Sum({0.types})'.format(self)
class Product(AST):
def __init__(self, fields, attributes=None):
@@ -303,49 +100,43 @@ class Product(AST):
self.attributes = attributes or []
def __repr__(self):
- if self.attributes is None:
- return "Product(%s)" % self.fields
+ if self.attributes:
+ return 'Product({0.fields}, {0.attributes})'.format(self)
else:
- return "Product(%s, %s)" % (self.fields, self.attributes)
+ return 'Product({0.fields})'.format(self)
-class VisitorBase(object):
+# A generic visitor for the meta-AST that describes ASDL. This can be used by
+# emitters. Note that this visitor does not provide a generic visit method, so a
+# subclass needs to define visit methods from visitModule to as deep as the
+# interesting node.
+# We also define a Check visitor that makes sure the parsed ASDL is well-formed.
- def __init__(self, skip=False):
+class VisitorBase(object):
+ """Generic tree visitor for ASTs."""
+ def __init__(self):
self.cache = {}
- self.skip = skip
- def visit(self, object, *args):
- meth = self._dispatch(object)
- if meth is None:
- return
- try:
- meth(object, *args)
- except Exception:
- output("Error visiting" + repr(object))
- output(str(sys.exc_info()[1]))
- traceback.print_exc()
- # XXX hack
- if hasattr(self, 'file'):
- self.file.flush()
- os._exit(1)
-
- def _dispatch(self, object):
- assert isinstance(object, AST), repr(object)
- klass = object.__class__
+ def visit(self, obj, *args):
+ klass = obj.__class__
meth = self.cache.get(klass)
if meth is None:
methname = "visit" + klass.__name__
- if self.skip:
- meth = getattr(self, methname, None)
- else:
- meth = getattr(self, methname)
+ meth = getattr(self, methname, None)
self.cache[klass] = meth
- return meth
+ if meth:
+ try:
+ meth(obj, *args)
+ except Exception as e:
+ print("Error visiting %r: %s" % (obj, e))
+ raise
class Check(VisitorBase):
+ """A visitor that checks a parsed ASDL tree for correctness.
+ Errors are printed and accumulated.
+ """
def __init__(self):
- super(Check, self).__init__(skip=True)
+ super(Check, self).__init__()
self.cons = {}
self.errors = 0
self.types = {}
@@ -367,8 +158,8 @@ class Check(VisitorBase):
if conflict is None:
self.cons[key] = name
else:
- output("Redefinition of constructor %s" % key)
- output("Defined in %s and %s" % (conflict, name))
+ print('Redefinition of constructor {}'.format(key))
+ print('Defined in {} and {}'.format(conflict, name))
self.errors += 1
for f in cons.fields:
self.visit(f, key)
@@ -383,6 +174,11 @@ class Check(VisitorBase):
self.visit(f, name)
def check(mod):
+ """Check the parsed ASDL tree for correctness.
+
+ Return True if success. For failure, the errors are printed out and False
+ is returned.
+ """
v = Check()
v.visit(mod)
@@ -390,47 +186,190 @@ def check(mod):
if t not in mod.types and not t in builtin_types:
v.errors += 1
uses = ", ".join(v.types[t])
- output("Undefined type %s, used in %s" % (t, uses))
-
+ print('Undefined type {}, used in {}'.format(t, uses))
return not v.errors
-def parse(file):
- scanner = ASDLScanner()
- parser = ASDLParser()
-
- f = open(file)
- try:
- buf = f.read()
- finally:
- f.close()
- tokens = scanner.tokenize(buf)
- try:
- return parser.parse(tokens)
- except ASDLSyntaxError:
- err = sys.exc_info()[1]
- output(str(err))
- lines = buf.split("\n")
- output(lines[err.lineno - 1]) # lines starts at 0, files at 1
-
-if __name__ == "__main__":
- import glob
- import sys
-
- if len(sys.argv) > 1:
- files = sys.argv[1:]
- else:
- testdir = "tests"
- files = glob.glob(testdir + "/*.asdl")
-
- for file in files:
- output(file)
- mod = parse(file)
- if not mod:
- break
- output("module", mod.name)
- output(len(mod.dfns), "definitions")
- if not check(mod):
- output("Check failed")
+# The ASDL parser itself comes next. The only interesting external interface
+# here is the top-level parse function.
+
+def parse(filename):
+ """Parse ASDL from the given file and return a Module node describing it."""
+ with open(filename) as f:
+ parser = ASDLParser()
+ return parser.parse(f.read())
+
+# Types for describing tokens in an ASDL specification.
+class TokenKind:
+ """TokenKind is provides a scope for enumerated token kinds."""
+ (ConstructorId, TypeId, Equals, Comma, Question, Pipe, Asterisk,
+ LParen, RParen, LBrace, RBrace) = range(11)
+
+ operator_table = {
+ '=': Equals, ',': Comma, '?': Question, '|': Pipe, '(': LParen,
+ ')': RParen, '*': Asterisk, '{': LBrace, '}': RBrace}
+
+Token = namedtuple('Token', 'kind value lineno')
+
+class ASDLSyntaxError(Exception):
+ def __init__(self, msg, lineno=None):
+ self.msg = msg
+ self.lineno = lineno or '<unknown>'
+
+ def __str__(self):
+ return 'Syntax error on line {0.lineno}: {0.msg}'.format(self)
+
+def tokenize_asdl(buf):
+ """Tokenize the given buffer. Yield Token objects."""
+ for lineno, line in enumerate(buf.splitlines(), 1):
+ for m in re.finditer(r'\s*(\w+|--.*|.)', line.strip()):
+ c = m.group(1)
+ if c[0].isalpha():
+ # Some kind of identifier
+ if c[0].isupper():
+ yield Token(TokenKind.ConstructorId, c, lineno)
+ else:
+ yield Token(TokenKind.TypeId, c, lineno)
+ elif c[:2] == '--':
+ # Comment
+ break
+ else:
+ # Operators
+ try:
+ op_kind = TokenKind.operator_table[c]
+ except KeyError:
+ raise ASDLSyntaxError('Invalid operator %s' % c, lineno)
+ yield Token(op_kind, c, lineno)
+
+class ASDLParser:
+ """Parser for ASDL files.
+
+ Create, then call the parse method on a buffer containing ASDL.
+ This is a simple recursive descent parser that uses tokenize_asdl for the
+ lexing.
+ """
+ def __init__(self):
+ self._tokenizer = None
+ self.cur_token = None
+
+ def parse(self, buf):
+ """Parse the ASDL in the buffer and return an AST with a Module root.
+ """
+ self._tokenizer = tokenize_asdl(buf)
+ self._advance()
+ return self._parse_module()
+
+ def _parse_module(self):
+ if self._at_keyword('module'):
+ self._advance()
else:
- for dfn in mod.dfns:
- output(dfn.name, dfn.value)
+ raise ASDLSyntaxError(
+ 'Expected "module" (found {})'.format(self.cur_token.value),
+ self.cur_token.lineno)
+ name = self._match(self._id_kinds)
+ self._match(TokenKind.LBrace)
+ defs = self._parse_definitions()
+ self._match(TokenKind.RBrace)
+ return Module(name, defs)
+
+ def _parse_definitions(self):
+ defs = []
+ while self.cur_token.kind == TokenKind.TypeId:
+ typename = self._advance()
+ self._match(TokenKind.Equals)
+ type = self._parse_type()
+ defs.append(Type(typename, type))
+ return defs
+
+ def _parse_type(self):
+ if self.cur_token.kind == TokenKind.LParen:
+ # If we see a (, it's a product
+ return self._parse_product()
+ else:
+ # Otherwise it's a sum. Look for ConstructorId
+ sumlist = [Constructor(self._match(TokenKind.ConstructorId),
+ self._parse_optional_fields())]
+ while self.cur_token.kind == TokenKind.Pipe:
+ # More constructors
+ self._advance()
+ sumlist.append(Constructor(
+ self._match(TokenKind.ConstructorId),
+ self._parse_optional_fields()))
+ return Sum(sumlist, self._parse_optional_attributes())
+
+ def _parse_product(self):
+ return Product(self._parse_fields(), self._parse_optional_attributes())
+
+ def _parse_fields(self):
+ fields = []
+ self._match(TokenKind.LParen)
+ while self.cur_token.kind == TokenKind.TypeId:
+ typename = self._advance()
+ is_seq, is_opt = self._parse_optional_field_quantifier()
+ id = (self._advance() if self.cur_token.kind in self._id_kinds
+ else None)
+ fields.append(Field(typename, id, seq=is_seq, opt=is_opt))
+ if self.cur_token.kind == TokenKind.RParen:
+ break
+ elif self.cur_token.kind == TokenKind.Comma:
+ self._advance()
+ self._match(TokenKind.RParen)
+ return fields
+
+ def _parse_optional_fields(self):
+ if self.cur_token.kind == TokenKind.LParen:
+ return self._parse_fields()
+ else:
+ return None
+
+ def _parse_optional_attributes(self):
+ if self._at_keyword('attributes'):
+ self._advance()
+ return self._parse_fields()
+ else:
+ return None
+
+ def _parse_optional_field_quantifier(self):
+ is_seq, is_opt = False, False
+ if self.cur_token.kind == TokenKind.Asterisk:
+ is_seq = True
+ self._advance()
+ elif self.cur_token.kind == TokenKind.Question:
+ is_opt = True
+ self._advance()
+ return is_seq, is_opt
+
+ def _advance(self):
+ """ Return the value of the current token and read the next one into
+ self.cur_token.
+ """
+ cur_val = None if self.cur_token is None else self.cur_token.value
+ try:
+ self.cur_token = next(self._tokenizer)
+ except StopIteration:
+ self.cur_token = None
+ return cur_val
+
+ _id_kinds = (TokenKind.ConstructorId, TokenKind.TypeId)
+
+ def _match(self, kind):
+ """The 'match' primitive of RD parsers.
+
+ * Verifies that the current token is of the given kind (kind can
+ be a tuple, in which the kind must match one of its members).
+ * Returns the value of the current token
+ * Reads in the next token
+ """
+ if (isinstance(kind, tuple) and self.cur_token.kind in kind or
+ self.cur_token.kind == kind
+ ):
+ value = self.cur_token.value
+ self._advance()
+ return value
+ else:
+ raise ASDLSyntaxError(
+ 'Unmatched {} (found {})'.format(kind, self.cur_token.kind),
+ self.cur_token.lineno)
+
+ def _at_keyword(self, keyword):
+ return (self.cur_token.kind == TokenKind.TypeId and
+ self.cur_token.value == keyword)
diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py
index d6086e68bf..f38c25358b 100755
--- a/Parser/asdl_c.py
+++ b/Parser/asdl_c.py
@@ -1,9 +1,6 @@
#! /usr/bin/env python
"""Generate C code from an ASDL description."""
-# TO DO
-# handle fields that have a type but no name
-
import os, sys
import asdl
@@ -14,12 +11,8 @@ MAX_COL = 80
def get_c_type(name):
"""Return a string for the C name of the type.
- This function special cases the default types provided by asdl:
- identifier, string, int.
+ This function special cases the default types provided by asdl.
"""
- # XXX ack! need to figure out where Id is useful and where string
- if isinstance(name, asdl.Id):
- name = name.value
if name in asdl.builtin_types:
return name
else:
@@ -144,7 +137,7 @@ class TypeDefVisitor(EmitVisitor):
class StructVisitor(EmitVisitor):
- """Visitor to generate typdefs for AST."""
+ """Visitor to generate typedefs for AST."""
def visitModule(self, mod):
for dfn in mod.dfns:
@@ -188,9 +181,6 @@ class StructVisitor(EmitVisitor):
self.visit(f, depth + 1)
self.emit("} %s;" % cons.name, depth)
self.emit("", depth)
- else:
- # XXX not sure what I want here, nothing is probably fine
- pass
def visitField(self, field, depth):
# XXX need to lookup field.type, because it might be something
@@ -198,7 +188,7 @@ class StructVisitor(EmitVisitor):
ctype = get_c_type(field.type)
name = field.name
if field.seq:
- if field.type.value in ('cmpop',):
+ if field.type == 'cmpop':
self.emit("asdl_int_seq *%(name)s;" % locals(), depth)
else:
self.emit("asdl_seq *%(name)s;" % locals(), depth)
@@ -253,7 +243,7 @@ class PrototypeVisitor(EmitVisitor):
name = f.name
# XXX should extend get_c_type() to handle this
if f.seq:
- if f.type.value in ('cmpop',):
+ if f.type == 'cmpop':
ctype = "asdl_int_seq *"
else:
ctype = "asdl_seq *"
@@ -285,7 +275,9 @@ class PrototypeVisitor(EmitVisitor):
def visitProduct(self, prod, name):
self.emit_function(name, get_c_type(name),
- self.get_args(prod.fields), [], union=False)
+ self.get_args(prod.fields),
+ self.get_args(prod.attributes),
+ union=False)
class FunctionVisitor(PrototypeVisitor):
@@ -339,7 +331,8 @@ class FunctionVisitor(PrototypeVisitor):
self.emit(s, depth, reflow)
for argtype, argname, opt in args:
emit("p->%s = %s;" % (argname, argname), 1)
- assert not attrs
+ for argtype, argname, opt in attrs:
+ emit("p->%s = %s;" % (argname, argname), 1)
class PickleVisitor(EmitVisitor):
@@ -437,7 +430,7 @@ class Obj2ModVisitor(PickleVisitor):
self.emit("", 0)
for f in t.fields:
self.visitField(f, t.name, sum=sum, depth=2)
- args = [f.name.value for f in t.fields] + [a.name.value for a in sum.attributes]
+ args = [f.name for f in t.fields] + [a.name for a in sum.attributes]
self.emit("*out = %s(%s);" % (t.name, self.buildArgs(args)), 2)
self.emit("if (*out == NULL) goto failed;", 2)
self.emit("return 0;", 2)
@@ -462,10 +455,15 @@ class Obj2ModVisitor(PickleVisitor):
self.emit("PyObject* tmp = NULL;", 1)
for f in prod.fields:
self.visitFieldDeclaration(f, name, prod=prod, depth=1)
+ for a in prod.attributes:
+ self.visitFieldDeclaration(a, name, prod=prod, depth=1)
self.emit("", 0)
for f in prod.fields:
self.visitField(f, name, prod=prod, depth=1)
- args = [f.name.value for f in prod.fields]
+ for a in prod.attributes:
+ self.visitField(a, name, prod=prod, depth=1)
+ args = [f.name for f in prod.fields]
+ args.extend([a.name for a in prod.attributes])
self.emit("*out = %s(%s);" % (name, self.buildArgs(args)), 1)
self.emit("return 0;", 1)
self.emit("failed:", 0)
@@ -487,8 +485,8 @@ class Obj2ModVisitor(PickleVisitor):
def isSimpleSum(self, field):
# XXX can the members of this list be determined automatically?
- return field.type.value in ('expr_context', 'boolop', 'operator',
- 'unaryop', 'cmpop')
+ return field.type in ('expr_context', 'boolop', 'operator',
+ 'unaryop', 'cmpop')
def isNumeric(self, field):
return get_c_type(field.type) in ("int", "bool")
@@ -960,7 +958,7 @@ static int exists_not_none(PyObject *obj, _Py_Identifier *id)
def visitProduct(self, prod, name):
if prod.fields:
- fields = name.value+"_fields"
+ fields = name+"_fields"
else:
fields = "NULL"
self.emit('%s_type = make_type("%s", &AST_type, %s, %d);' %
@@ -987,7 +985,7 @@ static int exists_not_none(PyObject *obj, _Py_Identifier *id)
def visitConstructor(self, cons, name, simple):
if cons.fields:
- fields = cons.name.value+"_fields"
+ fields = cons.name+"_fields"
else:
fields = "NULL"
self.emit('%s_type = make_type("%s", %s_type, %s, %d);' %
@@ -1170,7 +1168,7 @@ class ObjVisitor(PickleVisitor):
def set(self, field, value, depth):
if field.seq:
# XXX should really check for is_simple, but that requires a symbol table
- if field.type.value == "cmpop":
+ if field.type == "cmpop":
# While the sequence elements are stored as void*,
# ast2obj_cmpop expects an enum
self.emit("{", depth)
@@ -1249,12 +1247,15 @@ class ChainOfVisitors:
common_msg = "/* File automatically generated by %s. */\n\n"
-def main(srcfile):
+def main(srcfile, dump_module=False):
argv0 = sys.argv[0]
components = argv0.split(os.sep)
argv0 = os.sep.join(components[-2:])
auto_gen_msg = common_msg % argv0
mod = asdl.parse(srcfile)
+ if dump_module:
+ print('Parsed Module:')
+ print(mod)
if not asdl.check(mod):
sys.exit(1)
if INC_DIR:
@@ -1296,21 +1297,23 @@ def main(srcfile):
f.close()
if __name__ == "__main__":
- import sys
import getopt
INC_DIR = ''
SRC_DIR = ''
- opts, args = getopt.getopt(sys.argv[1:], "h:c:")
- if len(opts) != 1:
- sys.stdout.write("Must specify exactly one output file\n")
- sys.exit(1)
+ dump_module = False
+ opts, args = getopt.getopt(sys.argv[1:], "dh:c:")
for o, v in opts:
if o == '-h':
INC_DIR = v
if o == '-c':
SRC_DIR = v
- if len(args) != 1:
- sys.stdout.write("Must specify single input file\n")
+ if o == '-d':
+ dump_module = True
+ if INC_DIR and SRC_DIR:
+ print('Must specify exactly one output file')
+ sys.exit(1)
+ elif len(args) != 1:
+ print('Must specify single input file')
sys.exit(1)
- main(args[0])
+ main(args[0], dump_module)
diff --git a/Parser/node.c b/Parser/node.c
index 564bd91fe5..00103240af 100644
--- a/Parser/node.c
+++ b/Parser/node.c
@@ -70,8 +70,8 @@ fancy_roundup(int n)
* Note that this would be straightforward if a node stored its current
* capacity. The code is tricky to avoid that.
*/
-#define XXXROUNDUP(n) ((n) <= 1 ? (n) : \
- (n) <= 128 ? _Py_SIZE_ROUND_UP((n), 4) : \
+#define XXXROUNDUP(n) ((n) <= 1 ? (n) : \
+ (n) <= 128 ? (int)_Py_SIZE_ROUND_UP((n), 4) : \
fancy_roundup(n))
diff --git a/Parser/pgen.c b/Parser/pgen.c
index b2f84709fc..f3031aea0b 100644
--- a/Parser/pgen.c
+++ b/Parser/pgen.c
@@ -136,11 +136,12 @@ addnfa(nfagrammar *gr, char *name)
static char REQNFMT[] = "metacompile: less than %d children\n";
-#define REQN(i, count) \
+#define REQN(i, count) do { \
if (i < count) { \
fprintf(stderr, REQNFMT, count); \
Py_FatalError("REQN"); \
- } else
+ } \
+} while (0)
#else
#define REQN(i, count) /* empty */
diff --git a/Parser/pgenmain.c b/Parser/pgenmain.c
index 017a4f9274..0f055d6308 100644
--- a/Parser/pgenmain.c
+++ b/Parser/pgenmain.c
@@ -96,10 +96,11 @@ getgrammar(char *filename)
fprintf(stderr, "Parsing error %d, line %d.\n",
err.error, err.lineno);
if (err.text != NULL) {
- size_t i;
+ size_t len;
+ int i;
fprintf(stderr, "%s", err.text);
- i = strlen(err.text);
- if (i == 0 || err.text[i-1] != '\n')
+ len = strlen(err.text);
+ if (len == 0 || err.text[len-1] != '\n')
fprintf(stderr, "\n");
for (i = 0; i < err.offset; i++) {
if (err.text[i] == '\t')
diff --git a/Parser/printgrammar.c b/Parser/printgrammar.c
index dd7e6ae2ef..7311e55170 100644
--- a/Parser/printgrammar.c
+++ b/Parser/printgrammar.c
@@ -84,7 +84,7 @@ static void
printdfas(grammar *g, FILE *fp)
{
dfa *d;
- int i, j;
+ int i, j, n;
printstates(g, fp);
fprintf(fp, "static dfa dfas[%d] = {\n", g->g_ndfas);
@@ -93,7 +93,8 @@ printdfas(grammar *g, FILE *fp)
fprintf(fp, " {%d, \"%s\", %d, %d, states_%d,\n",
d->d_type, d->d_name, d->d_initial, d->d_nstates, i);
fprintf(fp, " \"");
- for (j = 0; j < NBYTES(g->g_ll.ll_nlabels); j++)
+ n = NBYTES(g->g_ll.ll_nlabels);
+ for (j = 0; j < n; j++)
fprintf(fp, "\\%03o", d->d_first[j] & 0xff);
fprintf(fp, "\"},\n");
}
diff --git a/Parser/spark.py b/Parser/spark.py
deleted file mode 100644
index 88c1a89a27..0000000000
--- a/Parser/spark.py
+++ /dev/null
@@ -1,849 +0,0 @@
-# Copyright (c) 1998-2002 John Aycock
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-__version__ = 'SPARK-0.7 (pre-alpha-5)'
-
-import re
-
-# Compatibility with older pythons.
-def output(string='', end='\n'):
- sys.stdout.write(string + end)
-
-try:
- sorted
-except NameError:
- def sorted(seq):
- seq2 = seq[:]
- seq2.sort()
- return seq2
-
-def _namelist(instance):
- namelist, namedict, classlist = [], {}, [instance.__class__]
- for c in classlist:
- for b in c.__bases__:
- classlist.append(b)
- for name in c.__dict__.keys():
- if name not in namedict:
- namelist.append(name)
- namedict[name] = 1
- return namelist
-
-class GenericScanner:
- def __init__(self, flags=0):
- pattern = self.reflect()
- self.re = re.compile(pattern, re.VERBOSE|flags)
-
- self.index2func = {}
- for name, number in self.re.groupindex.items():
- self.index2func[number-1] = getattr(self, 't_' + name)
-
- def makeRE(self, name):
- doc = getattr(self, name).__doc__
- rv = '(?P<%s>%s)' % (name[2:], doc)
- return rv
-
- def reflect(self):
- rv = []
- for name in _namelist(self):
- if name[:2] == 't_' and name != 't_default':
- rv.append(self.makeRE(name))
-
- rv.append(self.makeRE('t_default'))
- return '|'.join(rv)
-
- def error(self, s, pos):
- output("Lexical error at position %s" % pos)
- raise SystemExit
-
- def tokenize(self, s):
- pos = 0
- n = len(s)
- while pos < n:
- m = self.re.match(s, pos)
- if m is None:
- self.error(s, pos)
-
- groups = m.groups()
- for i in range(len(groups)):
- if groups[i] and i in self.index2func:
- self.index2func[i](groups[i])
- pos = m.end()
-
- def t_default(self, s):
- r'( . | \n )+'
- output("Specification error: unmatched input")
- raise SystemExit
-
-#
-# Extracted from GenericParser and made global so that [un]picking works.
-#
-class _State:
- def __init__(self, stateno, items):
- self.T, self.complete, self.items = [], [], items
- self.stateno = stateno
-
-class GenericParser:
- #
- # An Earley parser, as per J. Earley, "An Efficient Context-Free
- # Parsing Algorithm", CACM 13(2), pp. 94-102. Also J. C. Earley,
- # "An Efficient Context-Free Parsing Algorithm", Ph.D. thesis,
- # Carnegie-Mellon University, August 1968. New formulation of
- # the parser according to J. Aycock, "Practical Earley Parsing
- # and the SPARK Toolkit", Ph.D. thesis, University of Victoria,
- # 2001, and J. Aycock and R. N. Horspool, "Practical Earley
- # Parsing", unpublished paper, 2001.
- #
-
- def __init__(self, start):
- self.rules = {}
- self.rule2func = {}
- self.rule2name = {}
- self.collectRules()
- self.augment(start)
- self.ruleschanged = 1
-
- _NULLABLE = '\e_'
- _START = 'START'
- _BOF = '|-'
-
- #
- # When pickling, take the time to generate the full state machine;
- # some information is then extraneous, too. Unfortunately we
- # can't save the rule2func map.
- #
- def __getstate__(self):
- if self.ruleschanged:
- #
- # XXX - duplicated from parse()
- #
- self.computeNull()
- self.newrules = {}
- self.new2old = {}
- self.makeNewRules()
- self.ruleschanged = 0
- self.edges, self.cores = {}, {}
- self.states = { 0: self.makeState0() }
- self.makeState(0, self._BOF)
- #
- # XXX - should find a better way to do this..
- #
- changes = 1
- while changes:
- changes = 0
- for k, v in self.edges.items():
- if v is None:
- state, sym = k
- if state in self.states:
- self.goto(state, sym)
- changes = 1
- rv = self.__dict__.copy()
- for s in self.states.values():
- del s.items
- del rv['rule2func']
- del rv['nullable']
- del rv['cores']
- return rv
-
- def __setstate__(self, D):
- self.rules = {}
- self.rule2func = {}
- self.rule2name = {}
- self.collectRules()
- start = D['rules'][self._START][0][1][1] # Blech.
- self.augment(start)
- D['rule2func'] = self.rule2func
- D['makeSet'] = self.makeSet_fast
- self.__dict__ = D
-
- #
- # A hook for GenericASTBuilder and GenericASTMatcher. Mess
- # thee not with this; nor shall thee toucheth the _preprocess
- # argument to addRule.
- #
- def preprocess(self, rule, func): return rule, func
-
- def addRule(self, doc, func, _preprocess=1):
- fn = func
- rules = doc.split()
-
- index = []
- for i in range(len(rules)):
- if rules[i] == '::=':
- index.append(i-1)
- index.append(len(rules))
-
- for i in range(len(index)-1):
- lhs = rules[index[i]]
- rhs = rules[index[i]+2:index[i+1]]
- rule = (lhs, tuple(rhs))
-
- if _preprocess:
- rule, fn = self.preprocess(rule, func)
-
- if lhs in self.rules:
- self.rules[lhs].append(rule)
- else:
- self.rules[lhs] = [ rule ]
- self.rule2func[rule] = fn
- self.rule2name[rule] = func.__name__[2:]
- self.ruleschanged = 1
-
- def collectRules(self):
- for name in _namelist(self):
- if name[:2] == 'p_':
- func = getattr(self, name)
- doc = func.__doc__
- self.addRule(doc, func)
-
- def augment(self, start):
- rule = '%s ::= %s %s' % (self._START, self._BOF, start)
- self.addRule(rule, lambda args: args[1], 0)
-
- def computeNull(self):
- self.nullable = {}
- tbd = []
-
- for rulelist in self.rules.values():
- lhs = rulelist[0][0]
- self.nullable[lhs] = 0
- for rule in rulelist:
- rhs = rule[1]
- if len(rhs) == 0:
- self.nullable[lhs] = 1
- continue
- #
- # We only need to consider rules which
- # consist entirely of nonterminal symbols.
- # This should be a savings on typical
- # grammars.
- #
- for sym in rhs:
- if sym not in self.rules:
- break
- else:
- tbd.append(rule)
- changes = 1
- while changes:
- changes = 0
- for lhs, rhs in tbd:
- if self.nullable[lhs]:
- continue
- for sym in rhs:
- if not self.nullable[sym]:
- break
- else:
- self.nullable[lhs] = 1
- changes = 1
-
- def makeState0(self):
- s0 = _State(0, [])
- for rule in self.newrules[self._START]:
- s0.items.append((rule, 0))
- return s0
-
- def finalState(self, tokens):
- #
- # Yuck.
- #
- if len(self.newrules[self._START]) == 2 and len(tokens) == 0:
- return 1
- start = self.rules[self._START][0][1][1]
- return self.goto(1, start)
-
- def makeNewRules(self):
- worklist = []
- for rulelist in self.rules.values():
- for rule in rulelist:
- worklist.append((rule, 0, 1, rule))
-
- for rule, i, candidate, oldrule in worklist:
- lhs, rhs = rule
- n = len(rhs)
- while i < n:
- sym = rhs[i]
- if sym not in self.rules or \
- not self.nullable[sym]:
- candidate = 0
- i = i + 1
- continue
-
- newrhs = list(rhs)
- newrhs[i] = self._NULLABLE+sym
- newrule = (lhs, tuple(newrhs))
- worklist.append((newrule, i+1,
- candidate, oldrule))
- candidate = 0
- i = i + 1
- else:
- if candidate:
- lhs = self._NULLABLE+lhs
- rule = (lhs, rhs)
- if lhs in self.newrules:
- self.newrules[lhs].append(rule)
- else:
- self.newrules[lhs] = [ rule ]
- self.new2old[rule] = oldrule
-
- def typestring(self, token):
- return None
-
- def error(self, token):
- output("Syntax error at or near `%s' token" % token)
- raise SystemExit
-
- def parse(self, tokens):
- sets = [ [(1,0), (2,0)] ]
- self.links = {}
-
- if self.ruleschanged:
- self.computeNull()
- self.newrules = {}
- self.new2old = {}
- self.makeNewRules()
- self.ruleschanged = 0
- self.edges, self.cores = {}, {}
- self.states = { 0: self.makeState0() }
- self.makeState(0, self._BOF)
-
- for i in range(len(tokens)):
- sets.append([])
-
- if sets[i] == []:
- break
- self.makeSet(tokens[i], sets, i)
- else:
- sets.append([])
- self.makeSet(None, sets, len(tokens))
-
- #_dump(tokens, sets, self.states)
-
- finalitem = (self.finalState(tokens), 0)
- if finalitem not in sets[-2]:
- if len(tokens) > 0:
- self.error(tokens[i-1])
- else:
- self.error(None)
-
- return self.buildTree(self._START, finalitem,
- tokens, len(sets)-2)
-
- def isnullable(self, sym):
- #
- # For symbols in G_e only. If we weren't supporting 1.5,
- # could just use sym.startswith().
- #
- return self._NULLABLE == sym[0:len(self._NULLABLE)]
-
- def skip(self, hs, pos=0):
- n = len(hs[1])
- while pos < n:
- if not self.isnullable(hs[1][pos]):
- break
- pos = pos + 1
- return pos
-
- def makeState(self, state, sym):
- assert sym is not None
- #
- # Compute \epsilon-kernel state's core and see if
- # it exists already.
- #
- kitems = []
- for rule, pos in self.states[state].items:
- lhs, rhs = rule
- if rhs[pos:pos+1] == (sym,):
- kitems.append((rule, self.skip(rule, pos+1)))
- core = kitems
-
- core.sort()
- tcore = tuple(core)
- if tcore in self.cores:
- return self.cores[tcore]
- #
- # Nope, doesn't exist. Compute it and the associated
- # \epsilon-nonkernel state together; we'll need it right away.
- #
- k = self.cores[tcore] = len(self.states)
- K, NK = _State(k, kitems), _State(k+1, [])
- self.states[k] = K
- predicted = {}
-
- edges = self.edges
- rules = self.newrules
- for X in K, NK:
- worklist = X.items
- for item in worklist:
- rule, pos = item
- lhs, rhs = rule
- if pos == len(rhs):
- X.complete.append(rule)
- continue
-
- nextSym = rhs[pos]
- key = (X.stateno, nextSym)
- if nextSym not in rules:
- if key not in edges:
- edges[key] = None
- X.T.append(nextSym)
- else:
- edges[key] = None
- if nextSym not in predicted:
- predicted[nextSym] = 1
- for prule in rules[nextSym]:
- ppos = self.skip(prule)
- new = (prule, ppos)
- NK.items.append(new)
- #
- # Problem: we know K needs generating, but we
- # don't yet know about NK. Can't commit anything
- # regarding NK to self.edges until we're sure. Should
- # we delay committing on both K and NK to avoid this
- # hacky code? This creates other problems..
- #
- if X is K:
- edges = {}
-
- if NK.items == []:
- return k
-
- #
- # Check for \epsilon-nonkernel's core. Unfortunately we
- # need to know the entire set of predicted nonterminals
- # to do this without accidentally duplicating states.
- #
- core = sorted(predicted.keys())
- tcore = tuple(core)
- if tcore in self.cores:
- self.edges[(k, None)] = self.cores[tcore]
- return k
-
- nk = self.cores[tcore] = self.edges[(k, None)] = NK.stateno
- self.edges.update(edges)
- self.states[nk] = NK
- return k
-
- def goto(self, state, sym):
- key = (state, sym)
- if key not in self.edges:
- #
- # No transitions from state on sym.
- #
- return None
-
- rv = self.edges[key]
- if rv is None:
- #
- # Target state isn't generated yet. Remedy this.
- #
- rv = self.makeState(state, sym)
- self.edges[key] = rv
- return rv
-
- def gotoT(self, state, t):
- return [self.goto(state, t)]
-
- def gotoST(self, state, st):
- rv = []
- for t in self.states[state].T:
- if st == t:
- rv.append(self.goto(state, t))
- return rv
-
- def add(self, set, item, i=None, predecessor=None, causal=None):
- if predecessor is None:
- if item not in set:
- set.append(item)
- else:
- key = (item, i)
- if item not in set:
- self.links[key] = []
- set.append(item)
- self.links[key].append((predecessor, causal))
-
- def makeSet(self, token, sets, i):
- cur, next = sets[i], sets[i+1]
-
- ttype = token is not None and self.typestring(token) or None
- if ttype is not None:
- fn, arg = self.gotoT, ttype
- else:
- fn, arg = self.gotoST, token
-
- for item in cur:
- ptr = (item, i)
- state, parent = item
- add = fn(state, arg)
- for k in add:
- if k is not None:
- self.add(next, (k, parent), i+1, ptr)
- nk = self.goto(k, None)
- if nk is not None:
- self.add(next, (nk, i+1))
-
- if parent == i:
- continue
-
- for rule in self.states[state].complete:
- lhs, rhs = rule
- for pitem in sets[parent]:
- pstate, pparent = pitem
- k = self.goto(pstate, lhs)
- if k is not None:
- why = (item, i, rule)
- pptr = (pitem, parent)
- self.add(cur, (k, pparent),
- i, pptr, why)
- nk = self.goto(k, None)
- if nk is not None:
- self.add(cur, (nk, i))
-
- def makeSet_fast(self, token, sets, i):
- #
- # Call *only* when the entire state machine has been built!
- # It relies on self.edges being filled in completely, and
- # then duplicates and inlines code to boost speed at the
- # cost of extreme ugliness.
- #
- cur, next = sets[i], sets[i+1]
- ttype = token is not None and self.typestring(token) or None
-
- for item in cur:
- ptr = (item, i)
- state, parent = item
- if ttype is not None:
- k = self.edges.get((state, ttype), None)
- if k is not None:
- #self.add(next, (k, parent), i+1, ptr)
- #INLINED --v
- new = (k, parent)
- key = (new, i+1)
- if new not in next:
- self.links[key] = []
- next.append(new)
- self.links[key].append((ptr, None))
- #INLINED --^
- #nk = self.goto(k, None)
- nk = self.edges.get((k, None), None)
- if nk is not None:
- #self.add(next, (nk, i+1))
- #INLINED --v
- new = (nk, i+1)
- if new not in next:
- next.append(new)
- #INLINED --^
- else:
- add = self.gotoST(state, token)
- for k in add:
- if k is not None:
- self.add(next, (k, parent), i+1, ptr)
- #nk = self.goto(k, None)
- nk = self.edges.get((k, None), None)
- if nk is not None:
- self.add(next, (nk, i+1))
-
- if parent == i:
- continue
-
- for rule in self.states[state].complete:
- lhs, rhs = rule
- for pitem in sets[parent]:
- pstate, pparent = pitem
- #k = self.goto(pstate, lhs)
- k = self.edges.get((pstate, lhs), None)
- if k is not None:
- why = (item, i, rule)
- pptr = (pitem, parent)
- #self.add(cur, (k, pparent),
- # i, pptr, why)
- #INLINED --v
- new = (k, pparent)
- key = (new, i)
- if new not in cur:
- self.links[key] = []
- cur.append(new)
- self.links[key].append((pptr, why))
- #INLINED --^
- #nk = self.goto(k, None)
- nk = self.edges.get((k, None), None)
- if nk is not None:
- #self.add(cur, (nk, i))
- #INLINED --v
- new = (nk, i)
- if new not in cur:
- cur.append(new)
- #INLINED --^
-
- def predecessor(self, key, causal):
- for p, c in self.links[key]:
- if c == causal:
- return p
- assert 0
-
- def causal(self, key):
- links = self.links[key]
- if len(links) == 1:
- return links[0][1]
- choices = []
- rule2cause = {}
- for p, c in links:
- rule = c[2]
- choices.append(rule)
- rule2cause[rule] = c
- return rule2cause[self.ambiguity(choices)]
-
- def deriveEpsilon(self, nt):
- if len(self.newrules[nt]) > 1:
- rule = self.ambiguity(self.newrules[nt])
- else:
- rule = self.newrules[nt][0]
- #output(rule)
-
- rhs = rule[1]
- attr = [None] * len(rhs)
-
- for i in range(len(rhs)-1, -1, -1):
- attr[i] = self.deriveEpsilon(rhs[i])
- return self.rule2func[self.new2old[rule]](attr)
-
- def buildTree(self, nt, item, tokens, k):
- state, parent = item
-
- choices = []
- for rule in self.states[state].complete:
- if rule[0] == nt:
- choices.append(rule)
- rule = choices[0]
- if len(choices) > 1:
- rule = self.ambiguity(choices)
- #output(rule)
-
- rhs = rule[1]
- attr = [None] * len(rhs)
-
- for i in range(len(rhs)-1, -1, -1):
- sym = rhs[i]
- if sym not in self.newrules:
- if sym != self._BOF:
- attr[i] = tokens[k-1]
- key = (item, k)
- item, k = self.predecessor(key, None)
- #elif self.isnullable(sym):
- elif self._NULLABLE == sym[0:len(self._NULLABLE)]:
- attr[i] = self.deriveEpsilon(sym)
- else:
- key = (item, k)
- why = self.causal(key)
- attr[i] = self.buildTree(sym, why[0],
- tokens, why[1])
- item, k = self.predecessor(key, why)
- return self.rule2func[self.new2old[rule]](attr)
-
- def ambiguity(self, rules):
- #
- # XXX - problem here and in collectRules() if the same rule
- # appears in >1 method. Also undefined results if rules
- # causing the ambiguity appear in the same method.
- #
- sortlist = []
- name2index = {}
- for i in range(len(rules)):
- lhs, rhs = rule = rules[i]
- name = self.rule2name[self.new2old[rule]]
- sortlist.append((len(rhs), name))
- name2index[name] = i
- sortlist.sort()
- list = [b for a, b in sortlist]
- return rules[name2index[self.resolve(list)]]
-
- def resolve(self, list):
- #
- # Resolve ambiguity in favor of the shortest RHS.
- # Since we walk the tree from the top down, this
- # should effectively resolve in favor of a "shift".
- #
- return list[0]
-
-#
-# GenericASTBuilder automagically constructs a concrete/abstract syntax tree
-# for a given input. The extra argument is a class (not an instance!)
-# which supports the "__setslice__" and "__len__" methods.
-#
-# XXX - silently overrides any user code in methods.
-#
-
-class GenericASTBuilder(GenericParser):
- def __init__(self, AST, start):
- GenericParser.__init__(self, start)
- self.AST = AST
-
- def preprocess(self, rule, func):
- rebind = lambda lhs, self=self: \
- lambda args, lhs=lhs, self=self: \
- self.buildASTNode(args, lhs)
- lhs, rhs = rule
- return rule, rebind(lhs)
-
- def buildASTNode(self, args, lhs):
- children = []
- for arg in args:
- if isinstance(arg, self.AST):
- children.append(arg)
- else:
- children.append(self.terminal(arg))
- return self.nonterminal(lhs, children)
-
- def terminal(self, token): return token
-
- def nonterminal(self, type, args):
- rv = self.AST(type)
- rv[:len(args)] = args
- return rv
-
-#
-# GenericASTTraversal is a Visitor pattern according to Design Patterns. For
-# each node it attempts to invoke the method n_<node type>, falling
-# back onto the default() method if the n_* can't be found. The preorder
-# traversal also looks for an exit hook named n_<node type>_exit (no default
-# routine is called if it's not found). To prematurely halt traversal
-# of a subtree, call the prune() method -- this only makes sense for a
-# preorder traversal. Node type is determined via the typestring() method.
-#
-
-class GenericASTTraversalPruningException:
- pass
-
-class GenericASTTraversal:
- def __init__(self, ast):
- self.ast = ast
-
- def typestring(self, node):
- return node.type
-
- def prune(self):
- raise GenericASTTraversalPruningException
-
- def preorder(self, node=None):
- if node is None:
- node = self.ast
-
- try:
- name = 'n_' + self.typestring(node)
- if hasattr(self, name):
- func = getattr(self, name)
- func(node)
- else:
- self.default(node)
- except GenericASTTraversalPruningException:
- return
-
- for kid in node:
- self.preorder(kid)
-
- name = name + '_exit'
- if hasattr(self, name):
- func = getattr(self, name)
- func(node)
-
- def postorder(self, node=None):
- if node is None:
- node = self.ast
-
- for kid in node:
- self.postorder(kid)
-
- name = 'n_' + self.typestring(node)
- if hasattr(self, name):
- func = getattr(self, name)
- func(node)
- else:
- self.default(node)
-
-
- def default(self, node):
- pass
-
-#
-# GenericASTMatcher. AST nodes must have "__getitem__" and "__cmp__"
-# implemented.
-#
-# XXX - makes assumptions about how GenericParser walks the parse tree.
-#
-
-class GenericASTMatcher(GenericParser):
- def __init__(self, start, ast):
- GenericParser.__init__(self, start)
- self.ast = ast
-
- def preprocess(self, rule, func):
- rebind = lambda func, self=self: \
- lambda args, func=func, self=self: \
- self.foundMatch(args, func)
- lhs, rhs = rule
- rhslist = list(rhs)
- rhslist.reverse()
-
- return (lhs, tuple(rhslist)), rebind(func)
-
- def foundMatch(self, args, func):
- func(args[-1])
- return args[-1]
-
- def match_r(self, node):
- self.input.insert(0, node)
- children = 0
-
- for child in node:
- if children == 0:
- self.input.insert(0, '(')
- children = children + 1
- self.match_r(child)
-
- if children > 0:
- self.input.insert(0, ')')
-
- def match(self, ast=None):
- if ast is None:
- ast = self.ast
- self.input = []
-
- self.match_r(ast)
- self.parse(self.input)
-
- def resolve(self, list):
- #
- # Resolve ambiguity in favor of the longest RHS.
- #
- return list[-1]
-
-def _dump(tokens, sets, states):
- for i in range(len(sets)):
- output('set %d' % i)
- for item in sets[i]:
- output('\t', item)
- for (lhs, rhs), pos in states[item[0]].items:
- output('\t\t', lhs, '::=', end='')
- output(' '.join(rhs[:pos]), end='')
- output('.', end='')
- output(' '.join(rhs[pos:]))
- if i < len(tokens):
- output()
- output('token %s' % str(tokens[i]))
- output()
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c
index 1540d26d8b..184ffe7a7d 100644
--- a/Parser/tokenizer.c
+++ b/Parser/tokenizer.c
@@ -98,10 +98,13 @@ const char *_PyParser_TokenNames[] = {
"DOUBLESLASH",
"DOUBLESLASHEQUAL",
"AT",
+ "ATEQUAL",
"RARROW",
"ELLIPSIS",
/* This table must match the #defines in token.h! */
"OP",
+ "AWAIT",
+ "ASYNC",
"<ERRORTOKEN>",
"<N_TOKENS>"
};
@@ -123,6 +126,7 @@ tok_new(void)
tok->tabsize = TABSIZE;
tok->indent = 0;
tok->indstack[0] = 0;
+
tok->atbol = 1;
tok->pendin = 0;
tok->prompt = tok->nextprompt = NULL;
@@ -143,6 +147,11 @@ tok_new(void)
tok->decoding_readline = NULL;
tok->decoding_buffer = NULL;
#endif
+
+ tok->async_def = 0;
+ tok->async_def_indent = 0;
+ tok->async_def_nl = 0;
+
return tok;
}
@@ -266,6 +275,7 @@ get_coding_spec(const char *s, char **spec, Py_ssize_t size, struct tok_state *t
return 0;
}
*spec = r;
+ break;
}
}
}
@@ -515,9 +525,8 @@ fp_setreadl(struct tok_state *tok, const char* enc)
if (stream == NULL)
goto cleanup;
- Py_XDECREF(tok->decoding_readline);
readline = _PyObject_GetAttrId(stream, &PyId_readline);
- tok->decoding_readline = readline;
+ Py_XSETREF(tok->decoding_readline, readline);
if (pos > 0) {
if (PyObject_CallObject(readline, NULL) == NULL) {
readline = NULL;
@@ -1129,7 +1138,7 @@ PyToken_OneChar(int c)
case '}': return RBRACE;
case '^': return CIRCUMFLEX;
case '~': return TILDE;
- case '@': return AT;
+ case '@': return AT;
default: return OP;
}
}
@@ -1205,6 +1214,11 @@ PyToken_TwoChars(int c1, int c2)
case '=': return CIRCUMFLEXEQUAL;
}
break;
+ case '@':
+ switch (c2) {
+ case '=': return ATEQUAL;
+ }
+ break;
}
return OP;
}
@@ -1422,6 +1436,21 @@ tok_get(struct tok_state *tok, char **p_start, char **p_end)
}
}
+ if (tok->async_def
+ && !blankline
+ && tok->level == 0
+ /* There was a NEWLINE after ASYNC DEF,
+ so we're past the signature. */
+ && tok->async_def_nl
+ /* Current indentation level is less than where
+ the async function was defined */
+ && tok->async_def_indent >= tok->indent)
+ {
+ tok->async_def = 0;
+ tok->async_def_indent = 0;
+ tok->async_def_nl = 0;
+ }
+
again:
tok->start = NULL;
/* Skip spaces */
@@ -1473,6 +1502,42 @@ tok_get(struct tok_state *tok, char **p_start, char **p_end)
return ERRORTOKEN;
*p_start = tok->start;
*p_end = tok->cur;
+
+ /* async/await parsing block. */
+ if (tok->cur - tok->start == 5) {
+ /* Current token length is 5. */
+ if (tok->async_def) {
+ /* We're inside an 'async def' function. */
+ if (memcmp(tok->start, "async", 5) == 0)
+ return ASYNC;
+ if (memcmp(tok->start, "await", 5) == 0)
+ return AWAIT;
+ }
+ else if (memcmp(tok->start, "async", 5) == 0) {
+ /* The current token is 'async'.
+ Look ahead one token.*/
+
+ struct tok_state ahead_tok;
+ char *ahead_tok_start = NULL, *ahead_tok_end = NULL;
+ int ahead_tok_kind;
+
+ memcpy(&ahead_tok, tok, sizeof(ahead_tok));
+ ahead_tok_kind = tok_get(&ahead_tok, &ahead_tok_start,
+ &ahead_tok_end);
+
+ if (ahead_tok_kind == NAME
+ && ahead_tok.cur - ahead_tok.start == 3
+ && memcmp(ahead_tok.start, "def", 3) == 0)
+ {
+ /* The next token is going to be 'def', so instead of
+ returning 'async' NAME token, we return ASYNC. */
+ tok->async_def_indent = tok->indent;
+ tok->async_def = 1;
+ return ASYNC;
+ }
+ }
+ }
+
return NAME;
}
@@ -1484,6 +1549,11 @@ tok_get(struct tok_state *tok, char **p_start, char **p_end)
*p_start = tok->start;
*p_end = tok->cur - 1; /* Leave '\n' out of the string */
tok->cont_line = 0;
+ if (tok->async_def) {
+ /* We're somewhere inside an 'async def' function, and
+ we've encountered a NEWLINE after its signature. */
+ tok->async_def_nl = 1;
+ }
return NEWLINE;
}
diff --git a/Parser/tokenizer.h b/Parser/tokenizer.h
index 1ce6eeba8c..af053e250a 100644
--- a/Parser/tokenizer.h
+++ b/Parser/tokenizer.h
@@ -65,6 +65,13 @@ struct tok_state {
const char* enc; /* Encoding for the current str. */
const char* str;
const char* input; /* Tokenizer's newline translated copy of the string. */
+
+ /* async/await related fields; can be removed in 3.7 when async and await
+ become normal keywords. */
+ int async_def; /* =1 if tokens are inside an 'async def' body. */
+ int async_def_indent; /* Indentation level of the outermost 'async def'. */
+ int async_def_nl; /* =1 if the outermost 'async def' had at least one
+ NEWLINE token after it. */
};
extern struct tok_state *PyTokenizer_FromString(const char *, int);
diff --git a/Programs/README b/Programs/README
new file mode 100644
index 0000000000..c24578bc08
--- /dev/null
+++ b/Programs/README
@@ -0,0 +1 @@
+Source files for binary executables (as opposed to shared modules)
diff --git a/Modules/_freeze_importlib.c b/Programs/_freeze_importlib.c
index 57b1ac0662..aecb1232af 100644
--- a/Modules/_freeze_importlib.c
+++ b/Programs/_freeze_importlib.c
@@ -12,12 +12,11 @@
#include <unistd.h>
#endif
-
/* To avoid a circular dependency on frozen.o, we create our own structure
of frozen modules instead, left deliberately blank so as to avoid
unintentional import of a stale version of _frozen_importlib. */
-const static struct _frozen _PyImport_FrozenModules[] = {
+static const struct _frozen _PyImport_FrozenModules[] = {
{0, 0, 0} /* sentinel */
};
@@ -28,18 +27,19 @@ const static struct _frozen _PyImport_FrozenModules[] = {
const struct _frozen *PyImport_FrozenModules;
#endif
-const char header[] = "/* Auto-generated by Modules/_freeze_importlib.c */";
+const char header[] = "/* Auto-generated by Programs/_freeze_importlib.c */";
int
main(int argc, char *argv[])
{
- char *inpath, *outpath;
+ char *inpath, *outpath, *code_name;
FILE *infile = NULL, *outfile = NULL;
- struct stat st;
+ struct _Py_stat_struct status;
size_t text_size, data_size, n;
char *text = NULL;
unsigned char *data;
PyObject *code = NULL, *marshalled = NULL;
+ int is_bootstrap = 1;
PyImport_FrozenModules = _PyImport_FrozenModules;
@@ -54,11 +54,11 @@ main(int argc, char *argv[])
fprintf(stderr, "cannot open '%s' for reading\n", inpath);
goto error;
}
- if (fstat(fileno(infile), &st)) {
+ if (_Py_fstat_noraise(fileno(infile), &status)) {
fprintf(stderr, "cannot fstat '%s'\n", inpath);
goto error;
}
- text_size = st.st_size;
+ text_size = status.st_size;
text = (char *) malloc(text_size + 1);
if (text == NULL) {
fprintf(stderr, "could not allocate %ld bytes\n", (long) text_size);
@@ -82,8 +82,14 @@ main(int argc, char *argv[])
/* Don't install importlib, since it could execute outdated bytecode. */
_Py_InitializeEx_Private(1, 0);
- code = Py_CompileStringExFlags(text, "<frozen importlib._bootstrap>",
- Py_file_input, NULL, 0);
+ if (strstr(inpath, "_external") != NULL) {
+ is_bootstrap = 0;
+ }
+
+ code_name = is_bootstrap ?
+ "<frozen importlib._bootstrap>" :
+ "<frozen importlib._bootstrap_external>";
+ code = Py_CompileStringExFlags(text, code_name, Py_file_input, NULL, 0);
if (code == NULL)
goto error;
free(text);
@@ -106,7 +112,11 @@ main(int argc, char *argv[])
goto error;
}
fprintf(outfile, "%s\n", header);
- fprintf(outfile, "const unsigned char _Py_M__importlib[] = {\n");
+ if (is_bootstrap)
+ fprintf(outfile, "const unsigned char _Py_M__importlib[] = {\n");
+ else
+ fprintf(outfile,
+ "const unsigned char _Py_M__importlib_external[] = {\n");
for (n = 0; n < data_size; n += 16) {
size_t i, end = Py_MIN(n + 16, data_size);
fprintf(outfile, " ");
diff --git a/Modules/_testembed.c b/Programs/_testembed.c
index a21d2518be..ab6a8c7507 100644
--- a/Modules/_testembed.c
+++ b/Programs/_testembed.c
@@ -17,7 +17,7 @@ static void _testembed_Py_Initialize(void)
/*****************************************************
- * Test repeated initalisation and subinterpreters
+ * Test repeated initialisation and subinterpreters
*****************************************************/
static void print_subinterp(void)
@@ -109,11 +109,11 @@ static void test_forced_io_encoding(void)
printf("--- Use defaults ---\n");
check_stdio_details(NULL, NULL);
printf("--- Set errors only ---\n");
- check_stdio_details(NULL, "surrogateescape");
+ check_stdio_details(NULL, "ignore");
printf("--- Set encoding only ---\n");
check_stdio_details("latin-1", NULL);
printf("--- Set encoding and errors ---\n");
- check_stdio_details("latin-1", "surrogateescape");
+ check_stdio_details("latin-1", "replace");
/* Check calling after initialization fails */
Py_Initialize();
diff --git a/Modules/python.c b/Programs/python.c
index 9811c01d49..37b10b837e 100644
--- a/Modules/python.c
+++ b/Programs/python.c
@@ -4,7 +4,7 @@
#include <locale.h>
#ifdef __FreeBSD__
-#include <floatingpoint.h>
+#include <fenv.h>
#endif
#ifdef MS_WINDOWS
@@ -23,9 +23,6 @@ main(int argc, char **argv)
wchar_t **argv_copy2;
int i, res;
char *oldloc;
-#ifdef __FreeBSD__
- fp_except_t m;
-#endif
argv_copy = (wchar_t **)PyMem_RawMalloc(sizeof(wchar_t*) * (argc+1));
argv_copy2 = (wchar_t **)PyMem_RawMalloc(sizeof(wchar_t*) * (argc+1));
@@ -40,8 +37,7 @@ main(int argc, char **argv)
* exceptions by default. Here we disable them.
*/
#ifdef __FreeBSD__
- m = fpgetmask();
- fpsetmask(m & ~FP_X_OFL);
+ fedisableexcept(FE_OVERFLOW);
#endif
oldloc = _PyMem_RawStrdup(setlocale(LC_ALL, NULL));
@@ -52,7 +48,7 @@ main(int argc, char **argv)
setlocale(LC_ALL, "");
for (i = 0; i < argc; i++) {
- argv_copy[i] = _Py_char2wchar(argv[i], NULL);
+ argv_copy[i] = Py_DecodeLocale(argv[i], NULL);
if (!argv_copy[i]) {
PyMem_RawFree(oldloc);
fprintf(stderr, "Fatal Python error: "
diff --git a/Python/Python-ast.c b/Python/Python-ast.c
index 44fdafc50a..edfcbad134 100644
--- a/Python/Python-ast.c
+++ b/Python/Python-ast.c
@@ -45,17 +45,21 @@ static char *FunctionDef_fields[]={
"decorator_list",
"returns",
};
+static PyTypeObject *AsyncFunctionDef_type;
+static char *AsyncFunctionDef_fields[]={
+ "name",
+ "args",
+ "body",
+ "decorator_list",
+ "returns",
+};
static PyTypeObject *ClassDef_type;
_Py_IDENTIFIER(bases);
_Py_IDENTIFIER(keywords);
-_Py_IDENTIFIER(starargs);
-_Py_IDENTIFIER(kwargs);
static char *ClassDef_fields[]={
"name",
"bases",
"keywords",
- "starargs",
- "kwargs",
"body",
"decorator_list",
};
@@ -91,6 +95,13 @@ static char *For_fields[]={
"body",
"orelse",
};
+static PyTypeObject *AsyncFor_type;
+static char *AsyncFor_fields[]={
+ "target",
+ "iter",
+ "body",
+ "orelse",
+};
static PyTypeObject *While_type;
_Py_IDENTIFIER(test);
static char *While_fields[]={
@@ -110,6 +121,11 @@ static char *With_fields[]={
"items",
"body",
};
+static PyTypeObject *AsyncWith_type;
+static char *AsyncWith_fields[]={
+ "items",
+ "body",
+};
static PyTypeObject *Raise_type;
_Py_IDENTIFIER(exc);
_Py_IDENTIFIER(cause);
@@ -232,6 +248,10 @@ static char *GeneratorExp_fields[]={
"elt",
"generators",
};
+static PyTypeObject *Await_type;
+static char *Await_fields[]={
+ "value",
+};
static PyTypeObject *Yield_type;
static char *Yield_fields[]={
"value",
@@ -254,8 +274,6 @@ static char *Call_fields[]={
"func",
"args",
"keywords",
- "starargs",
- "kwargs",
};
static PyTypeObject *Num_type;
_Py_IDENTIFIER(n);
@@ -349,13 +367,14 @@ static PyTypeObject *And_type;
static PyTypeObject *Or_type;
static PyTypeObject *operator_type;
static PyObject *Add_singleton, *Sub_singleton, *Mult_singleton,
-*Div_singleton, *Mod_singleton, *Pow_singleton, *LShift_singleton,
-*RShift_singleton, *BitOr_singleton, *BitXor_singleton, *BitAnd_singleton,
-*FloorDiv_singleton;
+*MatMult_singleton, *Div_singleton, *Mod_singleton, *Pow_singleton,
+*LShift_singleton, *RShift_singleton, *BitOr_singleton, *BitXor_singleton,
+*BitAnd_singleton, *FloorDiv_singleton;
static PyObject* ast2obj_operator(operator_ty);
static PyTypeObject *Add_type;
static PyTypeObject *Sub_type;
static PyTypeObject *Mult_type;
+static PyTypeObject *MatMult_type;
static PyTypeObject *Div_type;
static PyTypeObject *Mod_type;
static PyTypeObject *Pow_type;
@@ -811,7 +830,10 @@ static int init_types(void)
FunctionDef_type = make_type("FunctionDef", stmt_type, FunctionDef_fields,
5);
if (!FunctionDef_type) return 0;
- ClassDef_type = make_type("ClassDef", stmt_type, ClassDef_fields, 7);
+ AsyncFunctionDef_type = make_type("AsyncFunctionDef", stmt_type,
+ AsyncFunctionDef_fields, 5);
+ if (!AsyncFunctionDef_type) return 0;
+ ClassDef_type = make_type("ClassDef", stmt_type, ClassDef_fields, 5);
if (!ClassDef_type) return 0;
Return_type = make_type("Return", stmt_type, Return_fields, 1);
if (!Return_type) return 0;
@@ -823,12 +845,16 @@ static int init_types(void)
if (!AugAssign_type) return 0;
For_type = make_type("For", stmt_type, For_fields, 4);
if (!For_type) return 0;
+ AsyncFor_type = make_type("AsyncFor", stmt_type, AsyncFor_fields, 4);
+ if (!AsyncFor_type) return 0;
While_type = make_type("While", stmt_type, While_fields, 3);
if (!While_type) return 0;
If_type = make_type("If", stmt_type, If_fields, 3);
if (!If_type) return 0;
With_type = make_type("With", stmt_type, With_fields, 2);
if (!With_type) return 0;
+ AsyncWith_type = make_type("AsyncWith", stmt_type, AsyncWith_fields, 2);
+ if (!AsyncWith_type) return 0;
Raise_type = make_type("Raise", stmt_type, Raise_fields, 2);
if (!Raise_type) return 0;
Try_type = make_type("Try", stmt_type, Try_fields, 4);
@@ -877,13 +903,15 @@ static int init_types(void)
GeneratorExp_type = make_type("GeneratorExp", expr_type,
GeneratorExp_fields, 2);
if (!GeneratorExp_type) return 0;
+ Await_type = make_type("Await", expr_type, Await_fields, 1);
+ if (!Await_type) return 0;
Yield_type = make_type("Yield", expr_type, Yield_fields, 1);
if (!Yield_type) return 0;
YieldFrom_type = make_type("YieldFrom", expr_type, YieldFrom_fields, 1);
if (!YieldFrom_type) return 0;
Compare_type = make_type("Compare", expr_type, Compare_fields, 3);
if (!Compare_type) return 0;
- Call_type = make_type("Call", expr_type, Call_fields, 5);
+ Call_type = make_type("Call", expr_type, Call_fields, 3);
if (!Call_type) return 0;
Num_type = make_type("Num", expr_type, Num_fields, 1);
if (!Num_type) return 0;
@@ -970,6 +998,10 @@ static int init_types(void)
if (!Mult_type) return 0;
Mult_singleton = PyType_GenericNew(Mult_type, NULL, NULL);
if (!Mult_singleton) return 0;
+ MatMult_type = make_type("MatMult", operator_type, NULL, 0);
+ if (!MatMult_type) return 0;
+ MatMult_singleton = PyType_GenericNew(MatMult_type, NULL, NULL);
+ if (!MatMult_singleton) return 0;
Div_type = make_type("Div", operator_type, NULL, 0);
if (!Div_type) return 0;
Div_singleton = PyType_GenericNew(Div_type, NULL, NULL);
@@ -1202,9 +1234,39 @@ FunctionDef(identifier name, arguments_ty args, asdl_seq * body, asdl_seq *
}
stmt_ty
-ClassDef(identifier name, asdl_seq * bases, asdl_seq * keywords, expr_ty
- starargs, expr_ty kwargs, asdl_seq * body, asdl_seq * decorator_list,
- int lineno, int col_offset, PyArena *arena)
+AsyncFunctionDef(identifier name, arguments_ty args, asdl_seq * body, asdl_seq
+ * decorator_list, expr_ty returns, int lineno, int col_offset,
+ PyArena *arena)
+{
+ stmt_ty p;
+ if (!name) {
+ PyErr_SetString(PyExc_ValueError,
+ "field name is required for AsyncFunctionDef");
+ return NULL;
+ }
+ if (!args) {
+ PyErr_SetString(PyExc_ValueError,
+ "field args is required for AsyncFunctionDef");
+ return NULL;
+ }
+ p = (stmt_ty)PyArena_Malloc(arena, sizeof(*p));
+ if (!p)
+ return NULL;
+ p->kind = AsyncFunctionDef_kind;
+ p->v.AsyncFunctionDef.name = name;
+ p->v.AsyncFunctionDef.args = args;
+ p->v.AsyncFunctionDef.body = body;
+ p->v.AsyncFunctionDef.decorator_list = decorator_list;
+ p->v.AsyncFunctionDef.returns = returns;
+ p->lineno = lineno;
+ p->col_offset = col_offset;
+ return p;
+}
+
+stmt_ty
+ClassDef(identifier name, asdl_seq * bases, asdl_seq * keywords, asdl_seq *
+ body, asdl_seq * decorator_list, int lineno, int col_offset, PyArena
+ *arena)
{
stmt_ty p;
if (!name) {
@@ -1219,8 +1281,6 @@ ClassDef(identifier name, asdl_seq * bases, asdl_seq * keywords, expr_ty
p->v.ClassDef.name = name;
p->v.ClassDef.bases = bases;
p->v.ClassDef.keywords = keywords;
- p->v.ClassDef.starargs = starargs;
- p->v.ClassDef.kwargs = kwargs;
p->v.ClassDef.body = body;
p->v.ClassDef.decorator_list = decorator_list;
p->lineno = lineno;
@@ -1338,6 +1398,34 @@ For(expr_ty target, expr_ty iter, asdl_seq * body, asdl_seq * orelse, int
}
stmt_ty
+AsyncFor(expr_ty target, expr_ty iter, asdl_seq * body, asdl_seq * orelse, int
+ lineno, int col_offset, PyArena *arena)
+{
+ stmt_ty p;
+ if (!target) {
+ PyErr_SetString(PyExc_ValueError,
+ "field target is required for AsyncFor");
+ return NULL;
+ }
+ if (!iter) {
+ PyErr_SetString(PyExc_ValueError,
+ "field iter is required for AsyncFor");
+ return NULL;
+ }
+ p = (stmt_ty)PyArena_Malloc(arena, sizeof(*p));
+ if (!p)
+ return NULL;
+ p->kind = AsyncFor_kind;
+ p->v.AsyncFor.target = target;
+ p->v.AsyncFor.iter = iter;
+ p->v.AsyncFor.body = body;
+ p->v.AsyncFor.orelse = orelse;
+ p->lineno = lineno;
+ p->col_offset = col_offset;
+ return p;
+}
+
+stmt_ty
While(expr_ty test, asdl_seq * body, asdl_seq * orelse, int lineno, int
col_offset, PyArena *arena)
{
@@ -1398,6 +1486,22 @@ With(asdl_seq * items, asdl_seq * body, int lineno, int col_offset, PyArena
}
stmt_ty
+AsyncWith(asdl_seq * items, asdl_seq * body, int lineno, int col_offset,
+ PyArena *arena)
+{
+ stmt_ty p;
+ p = (stmt_ty)PyArena_Malloc(arena, sizeof(*p));
+ if (!p)
+ return NULL;
+ p->kind = AsyncWith_kind;
+ p->v.AsyncWith.items = items;
+ p->v.AsyncWith.body = body;
+ p->lineno = lineno;
+ p->col_offset = col_offset;
+ return p;
+}
+
+stmt_ty
Raise(expr_ty exc, expr_ty cause, int lineno, int col_offset, PyArena *arena)
{
stmt_ty p;
@@ -1825,6 +1929,25 @@ GeneratorExp(expr_ty elt, asdl_seq * generators, int lineno, int col_offset,
}
expr_ty
+Await(expr_ty value, int lineno, int col_offset, PyArena *arena)
+{
+ expr_ty p;
+ if (!value) {
+ PyErr_SetString(PyExc_ValueError,
+ "field value is required for Await");
+ return NULL;
+ }
+ p = (expr_ty)PyArena_Malloc(arena, sizeof(*p));
+ if (!p)
+ return NULL;
+ p->kind = Await_kind;
+ p->v.Await.value = value;
+ p->lineno = lineno;
+ p->col_offset = col_offset;
+ return p;
+}
+
+expr_ty
Yield(expr_ty value, int lineno, int col_offset, PyArena *arena)
{
expr_ty p;
@@ -1880,8 +2003,8 @@ Compare(expr_ty left, asdl_int_seq * ops, asdl_seq * comparators, int lineno,
}
expr_ty
-Call(expr_ty func, asdl_seq * args, asdl_seq * keywords, expr_ty starargs,
- expr_ty kwargs, int lineno, int col_offset, PyArena *arena)
+Call(expr_ty func, asdl_seq * args, asdl_seq * keywords, int lineno, int
+ col_offset, PyArena *arena)
{
expr_ty p;
if (!func) {
@@ -1896,8 +2019,6 @@ Call(expr_ty func, asdl_seq * args, asdl_seq * keywords, expr_ty starargs,
p->v.Call.func = func;
p->v.Call.args = args;
p->v.Call.keywords = keywords;
- p->v.Call.starargs = starargs;
- p->v.Call.kwargs = kwargs;
p->lineno = lineno;
p->col_offset = col_offset;
return p;
@@ -2251,7 +2372,8 @@ arguments(asdl_seq * args, arg_ty vararg, asdl_seq * kwonlyargs, asdl_seq *
}
arg_ty
-arg(identifier arg, expr_ty annotation, PyArena *arena)
+arg(identifier arg, expr_ty annotation, int lineno, int col_offset, PyArena
+ *arena)
{
arg_ty p;
if (!arg) {
@@ -2264,6 +2386,8 @@ arg(identifier arg, expr_ty annotation, PyArena *arena)
return NULL;
p->arg = arg;
p->annotation = annotation;
+ p->lineno = lineno;
+ p->col_offset = col_offset;
return p;
}
@@ -2271,11 +2395,6 @@ keyword_ty
keyword(identifier arg, expr_ty value, PyArena *arena)
{
keyword_ty p;
- if (!arg) {
- PyErr_SetString(PyExc_ValueError,
- "field arg is required for keyword");
- return NULL;
- }
if (!value) {
PyErr_SetString(PyExc_ValueError,
"field value is required for keyword");
@@ -2419,6 +2538,36 @@ ast2obj_stmt(void* _o)
goto failed;
Py_DECREF(value);
break;
+ case AsyncFunctionDef_kind:
+ result = PyType_GenericNew(AsyncFunctionDef_type, NULL, NULL);
+ if (!result) goto failed;
+ value = ast2obj_identifier(o->v.AsyncFunctionDef.name);
+ if (!value) goto failed;
+ if (_PyObject_SetAttrId(result, &PyId_name, value) == -1)
+ goto failed;
+ Py_DECREF(value);
+ value = ast2obj_arguments(o->v.AsyncFunctionDef.args);
+ if (!value) goto failed;
+ if (_PyObject_SetAttrId(result, &PyId_args, value) == -1)
+ goto failed;
+ Py_DECREF(value);
+ value = ast2obj_list(o->v.AsyncFunctionDef.body, ast2obj_stmt);
+ if (!value) goto failed;
+ if (_PyObject_SetAttrId(result, &PyId_body, value) == -1)
+ goto failed;
+ Py_DECREF(value);
+ value = ast2obj_list(o->v.AsyncFunctionDef.decorator_list,
+ ast2obj_expr);
+ if (!value) goto failed;
+ if (_PyObject_SetAttrId(result, &PyId_decorator_list, value) == -1)
+ goto failed;
+ Py_DECREF(value);
+ value = ast2obj_expr(o->v.AsyncFunctionDef.returns);
+ if (!value) goto failed;
+ if (_PyObject_SetAttrId(result, &PyId_returns, value) == -1)
+ goto failed;
+ Py_DECREF(value);
+ break;
case ClassDef_kind:
result = PyType_GenericNew(ClassDef_type, NULL, NULL);
if (!result) goto failed;
@@ -2437,16 +2586,6 @@ ast2obj_stmt(void* _o)
if (_PyObject_SetAttrId(result, &PyId_keywords, value) == -1)
goto failed;
Py_DECREF(value);
- value = ast2obj_expr(o->v.ClassDef.starargs);
- if (!value) goto failed;
- if (_PyObject_SetAttrId(result, &PyId_starargs, value) == -1)
- goto failed;
- Py_DECREF(value);
- value = ast2obj_expr(o->v.ClassDef.kwargs);
- if (!value) goto failed;
- if (_PyObject_SetAttrId(result, &PyId_kwargs, value) == -1)
- goto failed;
- Py_DECREF(value);
value = ast2obj_list(o->v.ClassDef.body, ast2obj_stmt);
if (!value) goto failed;
if (_PyObject_SetAttrId(result, &PyId_body, value) == -1)
@@ -2533,6 +2672,30 @@ ast2obj_stmt(void* _o)
goto failed;
Py_DECREF(value);
break;
+ case AsyncFor_kind:
+ result = PyType_GenericNew(AsyncFor_type, NULL, NULL);
+ if (!result) goto failed;
+ value = ast2obj_expr(o->v.AsyncFor.target);
+ if (!value) goto failed;
+ if (_PyObject_SetAttrId(result, &PyId_target, value) == -1)
+ goto failed;
+ Py_DECREF(value);
+ value = ast2obj_expr(o->v.AsyncFor.iter);
+ if (!value) goto failed;
+ if (_PyObject_SetAttrId(result, &PyId_iter, value) == -1)
+ goto failed;
+ Py_DECREF(value);
+ value = ast2obj_list(o->v.AsyncFor.body, ast2obj_stmt);
+ if (!value) goto failed;
+ if (_PyObject_SetAttrId(result, &PyId_body, value) == -1)
+ goto failed;
+ Py_DECREF(value);
+ value = ast2obj_list(o->v.AsyncFor.orelse, ast2obj_stmt);
+ if (!value) goto failed;
+ if (_PyObject_SetAttrId(result, &PyId_orelse, value) == -1)
+ goto failed;
+ Py_DECREF(value);
+ break;
case While_kind:
result = PyType_GenericNew(While_type, NULL, NULL);
if (!result) goto failed;
@@ -2585,6 +2748,20 @@ ast2obj_stmt(void* _o)
goto failed;
Py_DECREF(value);
break;
+ case AsyncWith_kind:
+ result = PyType_GenericNew(AsyncWith_type, NULL, NULL);
+ if (!result) goto failed;
+ value = ast2obj_list(o->v.AsyncWith.items, ast2obj_withitem);
+ if (!value) goto failed;
+ if (_PyObject_SetAttrId(result, &PyId_items, value) == -1)
+ goto failed;
+ Py_DECREF(value);
+ value = ast2obj_list(o->v.AsyncWith.body, ast2obj_stmt);
+ if (!value) goto failed;
+ if (_PyObject_SetAttrId(result, &PyId_body, value) == -1)
+ goto failed;
+ Py_DECREF(value);
+ break;
case Raise_kind:
result = PyType_GenericNew(Raise_type, NULL, NULL);
if (!result) goto failed;
@@ -2898,6 +3075,15 @@ ast2obj_expr(void* _o)
goto failed;
Py_DECREF(value);
break;
+ case Await_kind:
+ result = PyType_GenericNew(Await_type, NULL, NULL);
+ if (!result) goto failed;
+ value = ast2obj_expr(o->v.Await.value);
+ if (!value) goto failed;
+ if (_PyObject_SetAttrId(result, &PyId_value, value) == -1)
+ goto failed;
+ Py_DECREF(value);
+ break;
case Yield_kind:
result = PyType_GenericNew(Yield_type, NULL, NULL);
if (!result) goto failed;
@@ -2959,16 +3145,6 @@ ast2obj_expr(void* _o)
if (_PyObject_SetAttrId(result, &PyId_keywords, value) == -1)
goto failed;
Py_DECREF(value);
- value = ast2obj_expr(o->v.Call.starargs);
- if (!value) goto failed;
- if (_PyObject_SetAttrId(result, &PyId_starargs, value) == -1)
- goto failed;
- Py_DECREF(value);
- value = ast2obj_expr(o->v.Call.kwargs);
- if (!value) goto failed;
- if (_PyObject_SetAttrId(result, &PyId_kwargs, value) == -1)
- goto failed;
- Py_DECREF(value);
break;
case Num_kind:
result = PyType_GenericNew(Num_type, NULL, NULL);
@@ -3232,6 +3408,9 @@ PyObject* ast2obj_operator(operator_ty o)
case Mult:
Py_INCREF(Mult_singleton);
return Mult_singleton;
+ case MatMult:
+ Py_INCREF(MatMult_singleton);
+ return MatMult_singleton;
case Div:
Py_INCREF(Div_singleton);
return Div_singleton;
@@ -3859,6 +4038,102 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (*out == NULL) goto failed;
return 0;
}
+ isinstance = PyObject_IsInstance(obj, (PyObject*)AsyncFunctionDef_type);
+ if (isinstance == -1) {
+ return 1;
+ }
+ if (isinstance) {
+ identifier name;
+ arguments_ty args;
+ asdl_seq* body;
+ asdl_seq* decorator_list;
+ expr_ty returns;
+
+ if (_PyObject_HasAttrId(obj, &PyId_name)) {
+ int res;
+ tmp = _PyObject_GetAttrId(obj, &PyId_name);
+ if (tmp == NULL) goto failed;
+ res = obj2ast_identifier(tmp, &name, arena);
+ if (res != 0) goto failed;
+ Py_CLEAR(tmp);
+ } else {
+ PyErr_SetString(PyExc_TypeError, "required field \"name\" missing from AsyncFunctionDef");
+ return 1;
+ }
+ if (_PyObject_HasAttrId(obj, &PyId_args)) {
+ int res;
+ tmp = _PyObject_GetAttrId(obj, &PyId_args);
+ if (tmp == NULL) goto failed;
+ res = obj2ast_arguments(tmp, &args, arena);
+ if (res != 0) goto failed;
+ Py_CLEAR(tmp);
+ } else {
+ PyErr_SetString(PyExc_TypeError, "required field \"args\" missing from AsyncFunctionDef");
+ return 1;
+ }
+ if (_PyObject_HasAttrId(obj, &PyId_body)) {
+ int res;
+ Py_ssize_t len;
+ Py_ssize_t i;
+ tmp = _PyObject_GetAttrId(obj, &PyId_body);
+ if (tmp == NULL) goto failed;
+ if (!PyList_Check(tmp)) {
+ PyErr_Format(PyExc_TypeError, "AsyncFunctionDef field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name);
+ goto failed;
+ }
+ len = PyList_GET_SIZE(tmp);
+ body = _Py_asdl_seq_new(len, arena);
+ if (body == NULL) goto failed;
+ for (i = 0; i < len; i++) {
+ stmt_ty value;
+ res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena);
+ if (res != 0) goto failed;
+ asdl_seq_SET(body, i, value);
+ }
+ Py_CLEAR(tmp);
+ } else {
+ PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from AsyncFunctionDef");
+ return 1;
+ }
+ if (_PyObject_HasAttrId(obj, &PyId_decorator_list)) {
+ int res;
+ Py_ssize_t len;
+ Py_ssize_t i;
+ tmp = _PyObject_GetAttrId(obj, &PyId_decorator_list);
+ if (tmp == NULL) goto failed;
+ if (!PyList_Check(tmp)) {
+ PyErr_Format(PyExc_TypeError, "AsyncFunctionDef field \"decorator_list\" must be a list, not a %.200s", tmp->ob_type->tp_name);
+ goto failed;
+ }
+ len = PyList_GET_SIZE(tmp);
+ decorator_list = _Py_asdl_seq_new(len, arena);
+ if (decorator_list == NULL) goto failed;
+ for (i = 0; i < len; i++) {
+ expr_ty value;
+ res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena);
+ if (res != 0) goto failed;
+ asdl_seq_SET(decorator_list, i, value);
+ }
+ Py_CLEAR(tmp);
+ } else {
+ PyErr_SetString(PyExc_TypeError, "required field \"decorator_list\" missing from AsyncFunctionDef");
+ return 1;
+ }
+ if (exists_not_none(obj, &PyId_returns)) {
+ int res;
+ tmp = _PyObject_GetAttrId(obj, &PyId_returns);
+ if (tmp == NULL) goto failed;
+ res = obj2ast_expr(tmp, &returns, arena);
+ if (res != 0) goto failed;
+ Py_CLEAR(tmp);
+ } else {
+ returns = NULL;
+ }
+ *out = AsyncFunctionDef(name, args, body, decorator_list, returns,
+ lineno, col_offset, arena);
+ if (*out == NULL) goto failed;
+ return 0;
+ }
isinstance = PyObject_IsInstance(obj, (PyObject*)ClassDef_type);
if (isinstance == -1) {
return 1;
@@ -3867,8 +4142,6 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
identifier name;
asdl_seq* bases;
asdl_seq* keywords;
- expr_ty starargs;
- expr_ty kwargs;
asdl_seq* body;
asdl_seq* decorator_list;
@@ -3931,26 +4204,6 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
PyErr_SetString(PyExc_TypeError, "required field \"keywords\" missing from ClassDef");
return 1;
}
- if (exists_not_none(obj, &PyId_starargs)) {
- int res;
- tmp = _PyObject_GetAttrId(obj, &PyId_starargs);
- if (tmp == NULL) goto failed;
- res = obj2ast_expr(tmp, &starargs, arena);
- if (res != 0) goto failed;
- Py_CLEAR(tmp);
- } else {
- starargs = NULL;
- }
- if (exists_not_none(obj, &PyId_kwargs)) {
- int res;
- tmp = _PyObject_GetAttrId(obj, &PyId_kwargs);
- if (tmp == NULL) goto failed;
- res = obj2ast_expr(tmp, &kwargs, arena);
- if (res != 0) goto failed;
- Py_CLEAR(tmp);
- } else {
- kwargs = NULL;
- }
if (_PyObject_HasAttrId(obj, &PyId_body)) {
int res;
Py_ssize_t len;
@@ -3999,8 +4252,8 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
PyErr_SetString(PyExc_TypeError, "required field \"decorator_list\" missing from ClassDef");
return 1;
}
- *out = ClassDef(name, bases, keywords, starargs, kwargs, body,
- decorator_list, lineno, col_offset, arena);
+ *out = ClassDef(name, bases, keywords, body, decorator_list, lineno,
+ col_offset, arena);
if (*out == NULL) goto failed;
return 0;
}
@@ -4237,6 +4490,90 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (*out == NULL) goto failed;
return 0;
}
+ isinstance = PyObject_IsInstance(obj, (PyObject*)AsyncFor_type);
+ if (isinstance == -1) {
+ return 1;
+ }
+ if (isinstance) {
+ expr_ty target;
+ expr_ty iter;
+ asdl_seq* body;
+ asdl_seq* orelse;
+
+ if (_PyObject_HasAttrId(obj, &PyId_target)) {
+ int res;
+ tmp = _PyObject_GetAttrId(obj, &PyId_target);
+ if (tmp == NULL) goto failed;
+ res = obj2ast_expr(tmp, &target, arena);
+ if (res != 0) goto failed;
+ Py_CLEAR(tmp);
+ } else {
+ PyErr_SetString(PyExc_TypeError, "required field \"target\" missing from AsyncFor");
+ return 1;
+ }
+ if (_PyObject_HasAttrId(obj, &PyId_iter)) {
+ int res;
+ tmp = _PyObject_GetAttrId(obj, &PyId_iter);
+ if (tmp == NULL) goto failed;
+ res = obj2ast_expr(tmp, &iter, arena);
+ if (res != 0) goto failed;
+ Py_CLEAR(tmp);
+ } else {
+ PyErr_SetString(PyExc_TypeError, "required field \"iter\" missing from AsyncFor");
+ return 1;
+ }
+ if (_PyObject_HasAttrId(obj, &PyId_body)) {
+ int res;
+ Py_ssize_t len;
+ Py_ssize_t i;
+ tmp = _PyObject_GetAttrId(obj, &PyId_body);
+ if (tmp == NULL) goto failed;
+ if (!PyList_Check(tmp)) {
+ PyErr_Format(PyExc_TypeError, "AsyncFor field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name);
+ goto failed;
+ }
+ len = PyList_GET_SIZE(tmp);
+ body = _Py_asdl_seq_new(len, arena);
+ if (body == NULL) goto failed;
+ for (i = 0; i < len; i++) {
+ stmt_ty value;
+ res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena);
+ if (res != 0) goto failed;
+ asdl_seq_SET(body, i, value);
+ }
+ Py_CLEAR(tmp);
+ } else {
+ PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from AsyncFor");
+ return 1;
+ }
+ if (_PyObject_HasAttrId(obj, &PyId_orelse)) {
+ int res;
+ Py_ssize_t len;
+ Py_ssize_t i;
+ tmp = _PyObject_GetAttrId(obj, &PyId_orelse);
+ if (tmp == NULL) goto failed;
+ if (!PyList_Check(tmp)) {
+ PyErr_Format(PyExc_TypeError, "AsyncFor field \"orelse\" must be a list, not a %.200s", tmp->ob_type->tp_name);
+ goto failed;
+ }
+ len = PyList_GET_SIZE(tmp);
+ orelse = _Py_asdl_seq_new(len, arena);
+ if (orelse == NULL) goto failed;
+ for (i = 0; i < len; i++) {
+ stmt_ty value;
+ res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena);
+ if (res != 0) goto failed;
+ asdl_seq_SET(orelse, i, value);
+ }
+ Py_CLEAR(tmp);
+ } else {
+ PyErr_SetString(PyExc_TypeError, "required field \"orelse\" missing from AsyncFor");
+ return 1;
+ }
+ *out = AsyncFor(target, iter, body, orelse, lineno, col_offset, arena);
+ if (*out == NULL) goto failed;
+ return 0;
+ }
isinstance = PyObject_IsInstance(obj, (PyObject*)While_type);
if (isinstance == -1) {
return 1;
@@ -4441,6 +4778,66 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (*out == NULL) goto failed;
return 0;
}
+ isinstance = PyObject_IsInstance(obj, (PyObject*)AsyncWith_type);
+ if (isinstance == -1) {
+ return 1;
+ }
+ if (isinstance) {
+ asdl_seq* items;
+ asdl_seq* body;
+
+ if (_PyObject_HasAttrId(obj, &PyId_items)) {
+ int res;
+ Py_ssize_t len;
+ Py_ssize_t i;
+ tmp = _PyObject_GetAttrId(obj, &PyId_items);
+ if (tmp == NULL) goto failed;
+ if (!PyList_Check(tmp)) {
+ PyErr_Format(PyExc_TypeError, "AsyncWith field \"items\" must be a list, not a %.200s", tmp->ob_type->tp_name);
+ goto failed;
+ }
+ len = PyList_GET_SIZE(tmp);
+ items = _Py_asdl_seq_new(len, arena);
+ if (items == NULL) goto failed;
+ for (i = 0; i < len; i++) {
+ withitem_ty value;
+ res = obj2ast_withitem(PyList_GET_ITEM(tmp, i), &value, arena);
+ if (res != 0) goto failed;
+ asdl_seq_SET(items, i, value);
+ }
+ Py_CLEAR(tmp);
+ } else {
+ PyErr_SetString(PyExc_TypeError, "required field \"items\" missing from AsyncWith");
+ return 1;
+ }
+ if (_PyObject_HasAttrId(obj, &PyId_body)) {
+ int res;
+ Py_ssize_t len;
+ Py_ssize_t i;
+ tmp = _PyObject_GetAttrId(obj, &PyId_body);
+ if (tmp == NULL) goto failed;
+ if (!PyList_Check(tmp)) {
+ PyErr_Format(PyExc_TypeError, "AsyncWith field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name);
+ goto failed;
+ }
+ len = PyList_GET_SIZE(tmp);
+ body = _Py_asdl_seq_new(len, arena);
+ if (body == NULL) goto failed;
+ for (i = 0; i < len; i++) {
+ stmt_ty value;
+ res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena);
+ if (res != 0) goto failed;
+ asdl_seq_SET(body, i, value);
+ }
+ Py_CLEAR(tmp);
+ } else {
+ PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from AsyncWith");
+ return 1;
+ }
+ *out = AsyncWith(items, body, lineno, col_offset, arena);
+ if (*out == NULL) goto failed;
+ return 0;
+ }
isinstance = PyObject_IsInstance(obj, (PyObject*)Raise_type);
if (isinstance == -1) {
return 1;
@@ -5375,6 +5772,28 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (*out == NULL) goto failed;
return 0;
}
+ isinstance = PyObject_IsInstance(obj, (PyObject*)Await_type);
+ if (isinstance == -1) {
+ return 1;
+ }
+ if (isinstance) {
+ expr_ty value;
+
+ if (_PyObject_HasAttrId(obj, &PyId_value)) {
+ int res;
+ tmp = _PyObject_GetAttrId(obj, &PyId_value);
+ if (tmp == NULL) goto failed;
+ res = obj2ast_expr(tmp, &value, arena);
+ if (res != 0) goto failed;
+ Py_CLEAR(tmp);
+ } else {
+ PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from Await");
+ return 1;
+ }
+ *out = Await(value, lineno, col_offset, arena);
+ if (*out == NULL) goto failed;
+ return 0;
+ }
isinstance = PyObject_IsInstance(obj, (PyObject*)Yield_type);
if (isinstance == -1) {
return 1;
@@ -5498,8 +5917,6 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
expr_ty func;
asdl_seq* args;
asdl_seq* keywords;
- expr_ty starargs;
- expr_ty kwargs;
if (_PyObject_HasAttrId(obj, &PyId_func)) {
int res;
@@ -5560,28 +5977,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
PyErr_SetString(PyExc_TypeError, "required field \"keywords\" missing from Call");
return 1;
}
- if (exists_not_none(obj, &PyId_starargs)) {
- int res;
- tmp = _PyObject_GetAttrId(obj, &PyId_starargs);
- if (tmp == NULL) goto failed;
- res = obj2ast_expr(tmp, &starargs, arena);
- if (res != 0) goto failed;
- Py_CLEAR(tmp);
- } else {
- starargs = NULL;
- }
- if (exists_not_none(obj, &PyId_kwargs)) {
- int res;
- tmp = _PyObject_GetAttrId(obj, &PyId_kwargs);
- if (tmp == NULL) goto failed;
- res = obj2ast_expr(tmp, &kwargs, arena);
- if (res != 0) goto failed;
- Py_CLEAR(tmp);
- } else {
- kwargs = NULL;
- }
- *out = Call(func, args, keywords, starargs, kwargs, lineno, col_offset,
- arena);
+ *out = Call(func, args, keywords, lineno, col_offset, arena);
if (*out == NULL) goto failed;
return 0;
}
@@ -6175,6 +6571,14 @@ obj2ast_operator(PyObject* obj, operator_ty* out, PyArena* arena)
*out = Mult;
return 0;
}
+ isinstance = PyObject_IsInstance(obj, (PyObject *)MatMult_type);
+ if (isinstance == -1) {
+ return 1;
+ }
+ if (isinstance) {
+ *out = MatMult;
+ return 0;
+ }
isinstance = PyObject_IsInstance(obj, (PyObject *)Div_type);
if (isinstance == -1) {
return 1;
@@ -6685,6 +7089,8 @@ obj2ast_arg(PyObject* obj, arg_ty* out, PyArena* arena)
PyObject* tmp = NULL;
identifier arg;
expr_ty annotation;
+ int lineno;
+ int col_offset;
if (_PyObject_HasAttrId(obj, &PyId_arg)) {
int res;
@@ -6707,7 +7113,29 @@ obj2ast_arg(PyObject* obj, arg_ty* out, PyArena* arena)
} else {
annotation = NULL;
}
- *out = arg(arg, annotation, arena);
+ if (_PyObject_HasAttrId(obj, &PyId_lineno)) {
+ int res;
+ tmp = _PyObject_GetAttrId(obj, &PyId_lineno);
+ if (tmp == NULL) goto failed;
+ res = obj2ast_int(tmp, &lineno, arena);
+ if (res != 0) goto failed;
+ Py_CLEAR(tmp);
+ } else {
+ PyErr_SetString(PyExc_TypeError, "required field \"lineno\" missing from arg");
+ return 1;
+ }
+ if (_PyObject_HasAttrId(obj, &PyId_col_offset)) {
+ int res;
+ tmp = _PyObject_GetAttrId(obj, &PyId_col_offset);
+ if (tmp == NULL) goto failed;
+ res = obj2ast_int(tmp, &col_offset, arena);
+ if (res != 0) goto failed;
+ Py_CLEAR(tmp);
+ } else {
+ PyErr_SetString(PyExc_TypeError, "required field \"col_offset\" missing from arg");
+ return 1;
+ }
+ *out = arg(arg, annotation, lineno, col_offset, arena);
return 0;
failed:
Py_XDECREF(tmp);
@@ -6721,7 +7149,7 @@ obj2ast_keyword(PyObject* obj, keyword_ty* out, PyArena* arena)
identifier arg;
expr_ty value;
- if (_PyObject_HasAttrId(obj, &PyId_arg)) {
+ if (exists_not_none(obj, &PyId_arg)) {
int res;
tmp = _PyObject_GetAttrId(obj, &PyId_arg);
if (tmp == NULL) goto failed;
@@ -6729,8 +7157,7 @@ obj2ast_keyword(PyObject* obj, keyword_ty* out, PyArena* arena)
if (res != 0) goto failed;
Py_CLEAR(tmp);
} else {
- PyErr_SetString(PyExc_TypeError, "required field \"arg\" missing from keyword");
- return 1;
+ arg = NULL;
}
if (_PyObject_HasAttrId(obj, &PyId_value)) {
int res;
@@ -6847,6 +7274,8 @@ PyInit__ast(void)
if (PyDict_SetItemString(d, "stmt", (PyObject*)stmt_type) < 0) return NULL;
if (PyDict_SetItemString(d, "FunctionDef", (PyObject*)FunctionDef_type) <
0) return NULL;
+ if (PyDict_SetItemString(d, "AsyncFunctionDef",
+ (PyObject*)AsyncFunctionDef_type) < 0) return NULL;
if (PyDict_SetItemString(d, "ClassDef", (PyObject*)ClassDef_type) < 0)
return NULL;
if (PyDict_SetItemString(d, "Return", (PyObject*)Return_type) < 0) return
@@ -6858,10 +7287,14 @@ PyInit__ast(void)
if (PyDict_SetItemString(d, "AugAssign", (PyObject*)AugAssign_type) < 0)
return NULL;
if (PyDict_SetItemString(d, "For", (PyObject*)For_type) < 0) return NULL;
+ if (PyDict_SetItemString(d, "AsyncFor", (PyObject*)AsyncFor_type) < 0)
+ return NULL;
if (PyDict_SetItemString(d, "While", (PyObject*)While_type) < 0) return
NULL;
if (PyDict_SetItemString(d, "If", (PyObject*)If_type) < 0) return NULL;
if (PyDict_SetItemString(d, "With", (PyObject*)With_type) < 0) return NULL;
+ if (PyDict_SetItemString(d, "AsyncWith", (PyObject*)AsyncWith_type) < 0)
+ return NULL;
if (PyDict_SetItemString(d, "Raise", (PyObject*)Raise_type) < 0) return
NULL;
if (PyDict_SetItemString(d, "Try", (PyObject*)Try_type) < 0) return NULL;
@@ -6902,6 +7335,8 @@ PyInit__ast(void)
return NULL;
if (PyDict_SetItemString(d, "GeneratorExp", (PyObject*)GeneratorExp_type) <
0) return NULL;
+ if (PyDict_SetItemString(d, "Await", (PyObject*)Await_type) < 0) return
+ NULL;
if (PyDict_SetItemString(d, "Yield", (PyObject*)Yield_type) < 0) return
NULL;
if (PyDict_SetItemString(d, "YieldFrom", (PyObject*)YieldFrom_type) < 0)
@@ -6956,6 +7391,8 @@ PyInit__ast(void)
if (PyDict_SetItemString(d, "Add", (PyObject*)Add_type) < 0) return NULL;
if (PyDict_SetItemString(d, "Sub", (PyObject*)Sub_type) < 0) return NULL;
if (PyDict_SetItemString(d, "Mult", (PyObject*)Mult_type) < 0) return NULL;
+ if (PyDict_SetItemString(d, "MatMult", (PyObject*)MatMult_type) < 0) return
+ NULL;
if (PyDict_SetItemString(d, "Div", (PyObject*)Div_type) < 0) return NULL;
if (PyDict_SetItemString(d, "Mod", (PyObject*)Mod_type) < 0) return NULL;
if (PyDict_SetItemString(d, "Pow", (PyObject*)Pow_type) < 0) return NULL;
diff --git a/Python/README b/Python/README
new file mode 100644
index 0000000000..153b628bd5
--- /dev/null
+++ b/Python/README
@@ -0,0 +1 @@
+Miscellaneous source files for the main Python shared library
diff --git a/Python/_warnings.c b/Python/_warnings.c
index 6dff0a2c11..978bad135c 100644
--- a/Python/_warnings.c
+++ b/Python/_warnings.c
@@ -513,6 +513,64 @@ warn_explicit(PyObject *category, PyObject *message,
return result; /* Py_None or NULL. */
}
+static int
+is_internal_frame(PyFrameObject *frame)
+{
+ static PyObject *importlib_string = NULL;
+ static PyObject *bootstrap_string = NULL;
+ PyObject *filename;
+ int contains;
+
+ if (importlib_string == NULL) {
+ importlib_string = PyUnicode_FromString("importlib");
+ if (importlib_string == NULL) {
+ return 0;
+ }
+
+ bootstrap_string = PyUnicode_FromString("_bootstrap");
+ if (bootstrap_string == NULL) {
+ Py_DECREF(importlib_string);
+ return 0;
+ }
+ Py_INCREF(importlib_string);
+ Py_INCREF(bootstrap_string);
+ }
+
+ if (frame == NULL || frame->f_code == NULL ||
+ frame->f_code->co_filename == NULL) {
+ return 0;
+ }
+ filename = frame->f_code->co_filename;
+ if (!PyUnicode_Check(filename)) {
+ return 0;
+ }
+ contains = PyUnicode_Contains(filename, importlib_string);
+ if (contains < 0) {
+ return 0;
+ }
+ else if (contains > 0) {
+ contains = PyUnicode_Contains(filename, bootstrap_string);
+ if (contains < 0) {
+ return 0;
+ }
+ else if (contains > 0) {
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+static PyFrameObject *
+next_external_frame(PyFrameObject *frame)
+{
+ do {
+ frame = frame->f_back;
+ } while (frame != NULL && is_internal_frame(frame));
+
+ return frame;
+}
+
/* filename, module, and registry are new refs, globals is borrowed */
/* Returns 0 on error (no new refs), 1 on success */
static int
@@ -523,8 +581,18 @@ setup_context(Py_ssize_t stack_level, PyObject **filename, int *lineno,
/* Setup globals and lineno. */
PyFrameObject *f = PyThreadState_GET()->frame;
- while (--stack_level > 0 && f != NULL)
- f = f->f_back;
+ // Stack level comparisons to Python code is off by one as there is no
+ // warnings-related stack level to avoid.
+ if (stack_level <= 0 || is_internal_frame(f)) {
+ while (--stack_level > 0 && f != NULL) {
+ f = f->f_back;
+ }
+ }
+ else {
+ while (--stack_level > 0 && f != NULL) {
+ f = next_external_frame(f);
+ }
+ }
if (f == NULL) {
globals = PyThreadState_Get()->interp->sysdict;
@@ -580,13 +648,12 @@ setup_context(Py_ssize_t stack_level, PyObject **filename, int *lineno,
data = PyUnicode_DATA(*filename);
#define ascii_lower(c) ((c <= 127) ? Py_TOLOWER(c) : 0)
- /* if filename.lower().endswith((".pyc", ".pyo")): */
+ /* if filename.lower().endswith(".pyc"): */
if (len >= 4 &&
PyUnicode_READ(kind, data, len-4) == '.' &&
ascii_lower(PyUnicode_READ(kind, data, len-3)) == 'p' &&
ascii_lower(PyUnicode_READ(kind, data, len-2)) == 'y' &&
- (ascii_lower(PyUnicode_READ(kind, data, len-1)) == 'c' ||
- ascii_lower(PyUnicode_READ(kind, data, len-1)) == 'o'))
+ ascii_lower(PyUnicode_READ(kind, data, len-1)) == 'c')
{
*filename = PyUnicode_Substring(*filename, 0,
PyUnicode_GET_LENGTH(*filename)-1);
@@ -613,8 +680,7 @@ setup_context(Py_ssize_t stack_level, PyObject **filename, int *lineno,
goto handle_error;
}
else if (!is_true) {
- Py_DECREF(*filename);
- *filename = PyUnicode_FromString("__main__");
+ Py_SETREF(*filename, PyUnicode_FromString("__main__"));
if (*filename == NULL)
goto handle_error;
}
@@ -654,16 +720,17 @@ get_category(PyObject *message, PyObject *category)
if (rc == 1)
category = (PyObject*)message->ob_type;
- else if (category == NULL)
+ else if (category == NULL || category == Py_None)
category = PyExc_UserWarning;
/* Validate category. */
rc = PyObject_IsSubclass(category, PyExc_Warning);
- if (rc == -1)
- return NULL;
- if (rc == 0) {
- PyErr_SetString(PyExc_ValueError,
- "category is not a subclass of Warning");
+ /* category is not a subclass of PyExc_Warning or
+ PyObject_IsSubclass raised an error */
+ if (rc == -1 || rc == 0) {
+ PyErr_Format(PyExc_TypeError,
+ "category must be a Warning subclass, not '%s'",
+ Py_TYPE(category)->tp_name);
return NULL;
}
diff --git a/Python/asdl.c b/Python/asdl.c
index 74fa9410e4..df387b2119 100644
--- a/Python/asdl.c
+++ b/Python/asdl.c
@@ -5,21 +5,21 @@ asdl_seq *
_Py_asdl_seq_new(Py_ssize_t size, PyArena *arena)
{
asdl_seq *seq = NULL;
- size_t n = (size ? (sizeof(void *) * (size - 1)) : 0);
+ size_t n;
/* check size is sane */
- if (size < 0 || size == INT_MIN ||
- (size && ((size - 1) > (PY_SIZE_MAX / sizeof(void *))))) {
+ if (size < 0 ||
+ (size && (((size_t)size - 1) > (PY_SIZE_MAX / sizeof(void *))))) {
PyErr_NoMemory();
return NULL;
}
+ n = (size ? (sizeof(void *) * (size - 1)) : 0);
/* check if size can be added safely */
if (n > PY_SIZE_MAX - sizeof(asdl_seq)) {
PyErr_NoMemory();
return NULL;
}
-
n += sizeof(asdl_seq);
seq = (asdl_seq *)PyArena_Malloc(arena, n);
@@ -36,21 +36,21 @@ asdl_int_seq *
_Py_asdl_int_seq_new(Py_ssize_t size, PyArena *arena)
{
asdl_int_seq *seq = NULL;
- size_t n = (size ? (sizeof(void *) * (size - 1)) : 0);
+ size_t n;
/* check size is sane */
- if (size < 0 || size == INT_MIN ||
- (size && ((size - 1) > (PY_SIZE_MAX / sizeof(void *))))) {
+ if (size < 0 ||
+ (size && (((size_t)size - 1) > (PY_SIZE_MAX / sizeof(void *))))) {
PyErr_NoMemory();
return NULL;
}
+ n = (size ? (sizeof(void *) * (size - 1)) : 0);
/* check if size can be added safely */
if (n > PY_SIZE_MAX - sizeof(asdl_seq)) {
PyErr_NoMemory();
return NULL;
}
-
n += sizeof(asdl_seq);
seq = (asdl_int_seq *)PyArena_Malloc(arena, n);
diff --git a/Python/ast.c b/Python/ast.c
index d50cb80f24..7743c31c1f 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -115,7 +115,7 @@ validate_arguments(arguments_ty args)
}
if (!validate_args(args->kwonlyargs))
return 0;
- if (args->kwarg && args->kwarg->annotation
+ if (args->kwarg && args->kwarg->annotation
&& !validate_expr(args->kwarg->annotation, Load)) {
return 0;
}
@@ -164,6 +164,8 @@ validate_expr(expr_ty exp, expr_context_ty ctx)
return 0;
}
check_ctx = 0;
+ /* set actual_ctx to prevent gcc warning */
+ actual_ctx = 0;
}
if (check_ctx && actual_ctx != ctx) {
PyErr_Format(PyExc_ValueError, "expression must have %s context but has %s instead",
@@ -197,8 +199,10 @@ validate_expr(expr_ty exp, expr_context_ty ctx)
"Dict doesn't have the same number of keys as values");
return 0;
}
- return validate_exprs(exp->v.Dict.keys, Load, 0) &&
- validate_exprs(exp->v.Dict.values, Load, 0);
+ /* null_ok=1 for keys expressions to allow dict unpacking to work in
+ dict literals, i.e. ``{**{a:b}}`` */
+ return validate_exprs(exp->v.Dict.keys, Load, /*null_ok=*/ 1) &&
+ validate_exprs(exp->v.Dict.values, Load, /*null_ok=*/ 0);
case Set_kind:
return validate_exprs(exp->v.Set.elts, Load, 0);
#define COMP(NAME) \
@@ -217,6 +221,8 @@ validate_expr(expr_ty exp, expr_context_ty ctx)
return !exp->v.Yield.value || validate_expr(exp->v.Yield.value, Load);
case YieldFrom_kind:
return validate_expr(exp->v.YieldFrom.value, Load);
+ case Await_kind:
+ return validate_expr(exp->v.Await.value, Load);
case Compare_kind:
if (!asdl_seq_LEN(exp->v.Compare.comparators)) {
PyErr_SetString(PyExc_ValueError, "Compare with no comparators");
@@ -233,9 +239,7 @@ validate_expr(expr_ty exp, expr_context_ty ctx)
case Call_kind:
return validate_expr(exp->v.Call.func, Load) &&
validate_exprs(exp->v.Call.args, Load, 0) &&
- validate_keywords(exp->v.Call.keywords) &&
- (!exp->v.Call.starargs || validate_expr(exp->v.Call.starargs, Load)) &&
- (!exp->v.Call.kwargs || validate_expr(exp->v.Call.kwargs, Load));
+ validate_keywords(exp->v.Call.keywords);
case Num_kind: {
PyObject *n = exp->v.Num.n;
if (!PyLong_CheckExact(n) && !PyFloat_CheckExact(n) &&
@@ -320,9 +324,7 @@ validate_stmt(stmt_ty stmt)
return validate_body(stmt->v.ClassDef.body, "ClassDef") &&
validate_exprs(stmt->v.ClassDef.bases, Load, 0) &&
validate_keywords(stmt->v.ClassDef.keywords) &&
- validate_exprs(stmt->v.ClassDef.decorator_list, Load, 0) &&
- (!stmt->v.ClassDef.starargs || validate_expr(stmt->v.ClassDef.starargs, Load)) &&
- (!stmt->v.ClassDef.kwargs || validate_expr(stmt->v.ClassDef.kwargs, Load));
+ validate_exprs(stmt->v.ClassDef.decorator_list, Load, 0);
case Return_kind:
return !stmt->v.Return.value || validate_expr(stmt->v.Return.value, Load);
case Delete_kind:
@@ -338,6 +340,11 @@ validate_stmt(stmt_ty stmt)
validate_expr(stmt->v.For.iter, Load) &&
validate_body(stmt->v.For.body, "For") &&
validate_stmts(stmt->v.For.orelse);
+ case AsyncFor_kind:
+ return validate_expr(stmt->v.AsyncFor.target, Store) &&
+ validate_expr(stmt->v.AsyncFor.iter, Load) &&
+ validate_body(stmt->v.AsyncFor.body, "AsyncFor") &&
+ validate_stmts(stmt->v.AsyncFor.orelse);
case While_kind:
return validate_expr(stmt->v.While.test, Load) &&
validate_body(stmt->v.While.body, "While") &&
@@ -356,6 +363,16 @@ validate_stmt(stmt_ty stmt)
return 0;
}
return validate_body(stmt->v.With.body, "With");
+ case AsyncWith_kind:
+ if (!validate_nonempty_seq(stmt->v.AsyncWith.items, "items", "AsyncWith"))
+ return 0;
+ for (i = 0; i < asdl_seq_LEN(stmt->v.AsyncWith.items); i++) {
+ withitem_ty item = asdl_seq_GET(stmt->v.AsyncWith.items, i);
+ if (!validate_expr(item->context_expr, Load) ||
+ (item->optional_vars && !validate_expr(item->optional_vars, Store)))
+ return 0;
+ }
+ return validate_body(stmt->v.AsyncWith.body, "AsyncWith");
case Raise_kind:
if (stmt->v.Raise.exc) {
return validate_expr(stmt->v.Raise.exc, Load) &&
@@ -407,6 +424,12 @@ validate_stmt(stmt_ty stmt)
return validate_nonempty_seq(stmt->v.Nonlocal.names, "names", "Nonlocal");
case Expr_kind:
return validate_expr(stmt->v.Expr.value, Load);
+ case AsyncFunctionDef_kind:
+ return validate_body(stmt->v.AsyncFunctionDef.body, "AsyncFunctionDef") &&
+ validate_arguments(stmt->v.AsyncFunctionDef.args) &&
+ validate_exprs(stmt->v.AsyncFunctionDef.decorator_list, Load, 0) &&
+ (!stmt->v.AsyncFunctionDef.returns ||
+ validate_expr(stmt->v.AsyncFunctionDef.returns, Load));
case Pass_kind:
case Break_kind:
case Continue_kind:
@@ -451,7 +474,7 @@ validate_exprs(asdl_seq *exprs, expr_context_ty ctx, int null_ok)
"None disallowed in expression list");
return 0;
}
-
+
}
return 1;
}
@@ -505,6 +528,9 @@ static asdl_seq *ast_for_exprlist(struct compiling *, const node *,
static expr_ty ast_for_testlist(struct compiling *, const node *);
static stmt_ty ast_for_classdef(struct compiling *, const node *, asdl_seq *);
+static stmt_ty ast_for_with_stmt(struct compiling *, const node *, int);
+static stmt_ty ast_for_for_stmt(struct compiling *, const node *, int);
+
/* Note different signature for ast_for_call */
static expr_ty ast_for_call(struct compiling *, const node *, expr_ty);
@@ -825,6 +851,8 @@ get_operator(const node *n)
return Sub;
case STAR:
return Mult;
+ case AT:
+ return MatMult;
case SLASH:
return Div;
case DOUBLESLASH:
@@ -844,7 +872,8 @@ static const char* FORBIDDEN[] = {
};
static int
-forbidden_name(struct compiling *c, identifier name, const node *n, int full_checks)
+forbidden_name(struct compiling *c, identifier name, const node *n,
+ int full_checks)
{
assert(PyUnicode_Check(name));
if (PyUnicode_CompareWithASCIIString(name, "__debug__") == 0) {
@@ -940,6 +969,9 @@ set_context(struct compiling *c, expr_ty e, expr_context_ty ctx, const node *n)
case YieldFrom_kind:
expr_name = "yield expression";
break;
+ case Await_kind:
+ expr_name = "await expression";
+ break;
case ListComp_kind:
expr_name = "list comprehension";
break;
@@ -1030,6 +1062,8 @@ ast_for_augassign(struct compiling *c, const node *n)
return Pow;
else
return Mult;
+ case '@':
+ return MatMult;
default:
PyErr_Format(PyExc_SystemError, "invalid augassign: %s", STR(n));
return (operator_ty)0;
@@ -1139,11 +1173,9 @@ ast_for_arg(struct compiling *c, const node *n)
return NULL;
}
- ret = arg(name, annotation, c->c_arena);
+ ret = arg(name, annotation, LINENO(n), n->n_col_offset, c->c_arena);
if (!ret)
return NULL;
- ret->lineno = LINENO(n);
- ret->col_offset = n->n_col_offset;
return ret;
}
@@ -1199,11 +1231,10 @@ handle_keywordonly_args(struct compiling *c, const node *n, int start,
goto error;
if (forbidden_name(c, argname, ch, 0))
goto error;
- arg = arg(argname, annotation, c->c_arena);
+ arg = arg(argname, annotation, LINENO(ch), ch->n_col_offset,
+ c->c_arena);
if (!arg)
goto error;
- arg->lineno = LINENO(ch);
- arg->col_offset = ch->n_col_offset;
asdl_seq_SET(kwonlyargs, j++, arg);
i += 2; /* the name and the comma */
break;
@@ -1439,7 +1470,7 @@ ast_for_decorator(struct compiling *c, const node *n)
name_expr = NULL;
}
else if (NCH(n) == 5) { /* Call with no arguments */
- d = Call(name_expr, NULL, NULL, NULL, NULL, LINENO(n),
+ d = Call(name_expr, NULL, NULL, LINENO(n),
n->n_col_offset, c->c_arena);
if (!d)
return NULL;
@@ -1477,7 +1508,8 @@ ast_for_decorators(struct compiling *c, const node *n)
}
static stmt_ty
-ast_for_funcdef(struct compiling *c, const node *n, asdl_seq *decorator_seq)
+ast_for_funcdef_impl(struct compiling *c, const node *n,
+ asdl_seq *decorator_seq, int is_async)
{
/* funcdef: 'def' NAME parameters ['->' test] ':' suite */
identifier name;
@@ -1506,14 +1538,68 @@ ast_for_funcdef(struct compiling *c, const node *n, asdl_seq *decorator_seq)
if (!body)
return NULL;
- return FunctionDef(name, args, body, decorator_seq, returns, LINENO(n),
- n->n_col_offset, c->c_arena);
+ if (is_async)
+ return AsyncFunctionDef(name, args, body, decorator_seq, returns,
+ LINENO(n),
+ n->n_col_offset, c->c_arena);
+ else
+ return FunctionDef(name, args, body, decorator_seq, returns,
+ LINENO(n),
+ n->n_col_offset, c->c_arena);
+}
+
+static stmt_ty
+ast_for_async_funcdef(struct compiling *c, const node *n, asdl_seq *decorator_seq)
+{
+ /* async_funcdef: ASYNC funcdef */
+ REQ(n, async_funcdef);
+ REQ(CHILD(n, 0), ASYNC);
+ REQ(CHILD(n, 1), funcdef);
+
+ return ast_for_funcdef_impl(c, CHILD(n, 1), decorator_seq,
+ 1 /* is_async */);
+}
+
+static stmt_ty
+ast_for_funcdef(struct compiling *c, const node *n, asdl_seq *decorator_seq)
+{
+ /* funcdef: 'def' NAME parameters ['->' test] ':' suite */
+ return ast_for_funcdef_impl(c, n, decorator_seq,
+ 0 /* is_async */);
+}
+
+
+static stmt_ty
+ast_for_async_stmt(struct compiling *c, const node *n)
+{
+ /* async_stmt: ASYNC (funcdef | with_stmt | for_stmt) */
+ REQ(n, async_stmt);
+ REQ(CHILD(n, 0), ASYNC);
+
+ switch (TYPE(CHILD(n, 1))) {
+ case funcdef:
+ return ast_for_funcdef_impl(c, CHILD(n, 1), NULL,
+ 1 /* is_async */);
+ case with_stmt:
+ return ast_for_with_stmt(c, CHILD(n, 1),
+ 1 /* is_async */);
+
+ case for_stmt:
+ return ast_for_for_stmt(c, CHILD(n, 1),
+ 1 /* is_async */);
+
+ default:
+ PyErr_Format(PyExc_SystemError,
+ "invalid async stament: %s",
+ STR(CHILD(n, 1)));
+ return NULL;
+ }
}
static stmt_ty
ast_for_decorated(struct compiling *c, const node *n)
{
- /* decorated: decorators (classdef | funcdef) */
+ /* decorated: decorators (classdef | funcdef | async_funcdef) */
stmt_ty thing = NULL;
asdl_seq *decorator_seq = NULL;
@@ -1524,12 +1610,15 @@ ast_for_decorated(struct compiling *c, const node *n)
return NULL;
assert(TYPE(CHILD(n, 1)) == funcdef ||
+ TYPE(CHILD(n, 1)) == async_funcdef ||
TYPE(CHILD(n, 1)) == classdef);
if (TYPE(CHILD(n, 1)) == funcdef) {
thing = ast_for_funcdef(c, CHILD(n, 1), decorator_seq);
} else if (TYPE(CHILD(n, 1)) == classdef) {
thing = ast_for_classdef(c, CHILD(n, 1), decorator_seq);
+ } else if (TYPE(CHILD(n, 1)) == async_funcdef) {
+ thing = ast_for_async_funcdef(c, CHILD(n, 1), decorator_seq);
}
/* we count the decorators in when talking about the class' or
* function's line number */
@@ -1729,16 +1818,22 @@ ast_for_comprehension(struct compiling *c, const node *n)
static expr_ty
ast_for_itercomp(struct compiling *c, const node *n, int type)
{
- /* testlist_comp: test ( comp_for | (',' test)* [','] )
- argument: [test '='] test [comp_for] # Really [keyword '='] test */
+ /* testlist_comp: (test|star_expr)
+ * ( comp_for | (',' (test|star_expr))* [','] ) */
expr_ty elt;
asdl_seq *comps;
+ node *ch;
assert(NCH(n) > 1);
- elt = ast_for_expr(c, CHILD(n, 0));
+ ch = CHILD(n, 0);
+ elt = ast_for_expr(c, ch);
if (!elt)
return NULL;
+ if (elt->kind == Starred_kind) {
+ ast_error(c, ch, "iterable unpacking cannot be used in comprehension");
+ return NULL;
+ }
comps = ast_for_comprehension(c, CHILD(n, 1));
if (!comps)
@@ -1755,23 +1850,59 @@ ast_for_itercomp(struct compiling *c, const node *n, int type)
return NULL;
}
+/* Fills in the key, value pair corresponding to the dict element. In case
+ * of an unpacking, key is NULL. *i is advanced by the number of ast
+ * elements. Iff successful, nonzero is returned.
+ */
+static int
+ast_for_dictelement(struct compiling *c, const node *n, int *i,
+ expr_ty *key, expr_ty *value)
+{
+ expr_ty expression;
+ if (TYPE(CHILD(n, *i)) == DOUBLESTAR) {
+ assert(NCH(n) - *i >= 2);
+
+ expression = ast_for_expr(c, CHILD(n, *i + 1));
+ if (!expression)
+ return 0;
+ *key = NULL;
+ *value = expression;
+
+ *i += 2;
+ }
+ else {
+ assert(NCH(n) - *i >= 3);
+
+ expression = ast_for_expr(c, CHILD(n, *i));
+ if (!expression)
+ return 0;
+ *key = expression;
+
+ REQ(CHILD(n, *i + 1), COLON);
+
+ expression = ast_for_expr(c, CHILD(n, *i + 2));
+ if (!expression)
+ return 0;
+ *value = expression;
+
+ *i += 3;
+ }
+ return 1;
+}
+
static expr_ty
ast_for_dictcomp(struct compiling *c, const node *n)
{
expr_ty key, value;
asdl_seq *comps;
+ int i = 0;
- assert(NCH(n) > 3);
- REQ(CHILD(n, 1), COLON);
-
- key = ast_for_expr(c, CHILD(n, 0));
- if (!key)
- return NULL;
- value = ast_for_expr(c, CHILD(n, 2));
- if (!value)
+ if (!ast_for_dictelement(c, n, &i, &key, &value))
return NULL;
+ assert(key);
+ assert(NCH(n) - i >= 1);
- comps = ast_for_comprehension(c, CHILD(n, 3));
+ comps = ast_for_comprehension(c, CHILD(n, i));
if (!comps)
return NULL;
@@ -1779,6 +1910,39 @@ ast_for_dictcomp(struct compiling *c, const node *n)
}
static expr_ty
+ast_for_dictdisplay(struct compiling *c, const node *n)
+{
+ int i;
+ int j;
+ int size;
+ asdl_seq *keys, *values;
+
+ size = (NCH(n) + 1) / 3; /* +1 in case no trailing comma */
+ keys = _Py_asdl_seq_new(size, c->c_arena);
+ if (!keys)
+ return NULL;
+
+ values = _Py_asdl_seq_new(size, c->c_arena);
+ if (!values)
+ return NULL;
+
+ j = 0;
+ for (i = 0; i < NCH(n); i++) {
+ expr_ty key, value;
+
+ if (!ast_for_dictelement(c, n, &i, &key, &value))
+ return NULL;
+ asdl_seq_SET(keys, j, key);
+ asdl_seq_SET(values, j, value);
+
+ j++;
+ }
+ keys->size = j;
+ values->size = j;
+ return Dict(keys, values, LINENO(n), n->n_col_offset, c->c_arena);
+}
+
+static expr_ty
ast_for_genexp(struct compiling *c, const node *n)
{
assert(TYPE(n) == (testlist_comp) || TYPE(n) == (argument));
@@ -1799,6 +1963,27 @@ ast_for_setcomp(struct compiling *c, const node *n)
return ast_for_itercomp(c, n, COMP_SETCOMP);
}
+static expr_ty
+ast_for_setdisplay(struct compiling *c, const node *n)
+{
+ int i;
+ int size;
+ asdl_seq *elts;
+
+ assert(TYPE(n) == (dictorsetmaker));
+ size = (NCH(n) + 1) / 2; /* +1 in case no trailing comma */
+ elts = _Py_asdl_seq_new(size, c->c_arena);
+ if (!elts)
+ return NULL;
+ for (i = 0; i < NCH(n); i += 2) {
+ expr_ty expression;
+ expression = ast_for_expr(c, CHILD(n, i));
+ if (!expression)
+ return NULL;
+ asdl_seq_SET(elts, i / 2, expression);
+ }
+ return Set(elts, LINENO(n), n->n_col_offset, c->c_arena);
+}
static expr_ty
ast_for_atom(struct compiling *c, const node *n)
@@ -1909,62 +2094,48 @@ ast_for_atom(struct compiling *c, const node *n)
else
return ast_for_listcomp(c, ch);
case LBRACE: {
- /* dictorsetmaker: test ':' test (',' test ':' test)* [','] |
- * test (gen_for | (',' test)* [',']) */
- int i, size;
- asdl_seq *keys, *values;
-
+ /* dictorsetmaker: ( ((test ':' test | '**' test)
+ * (comp_for | (',' (test ':' test | '**' test))* [','])) |
+ * ((test | '*' test)
+ * (comp_for | (',' (test | '*' test))* [','])) ) */
+ expr_ty res;
ch = CHILD(n, 1);
if (TYPE(ch) == RBRACE) {
- /* it's an empty dict */
+ /* It's an empty dict. */
return Dict(NULL, NULL, LINENO(n), n->n_col_offset, c->c_arena);
- } else if (NCH(ch) == 1 || TYPE(CHILD(ch, 1)) == COMMA) {
- /* it's a simple set */
- asdl_seq *elts;
- size = (NCH(ch) + 1) / 2; /* +1 in case no trailing comma */
- elts = _Py_asdl_seq_new(size, c->c_arena);
- if (!elts)
- return NULL;
- for (i = 0; i < NCH(ch); i += 2) {
- expr_ty expression;
- expression = ast_for_expr(c, CHILD(ch, i));
- if (!expression)
- return NULL;
- asdl_seq_SET(elts, i / 2, expression);
+ }
+ else {
+ int is_dict = (TYPE(CHILD(ch, 0)) == DOUBLESTAR);
+ if (NCH(ch) == 1 ||
+ (NCH(ch) > 1 &&
+ TYPE(CHILD(ch, 1)) == COMMA)) {
+ /* It's a set display. */
+ res = ast_for_setdisplay(c, ch);
}
- return Set(elts, LINENO(n), n->n_col_offset, c->c_arena);
- } else if (TYPE(CHILD(ch, 1)) == comp_for) {
- /* it's a set comprehension */
- return ast_for_setcomp(c, ch);
- } else if (NCH(ch) > 3 && TYPE(CHILD(ch, 3)) == comp_for) {
- return ast_for_dictcomp(c, ch);
- } else {
- /* it's a dict */
- size = (NCH(ch) + 1) / 4; /* +1 in case no trailing comma */
- keys = _Py_asdl_seq_new(size, c->c_arena);
- if (!keys)
- return NULL;
-
- values = _Py_asdl_seq_new(size, c->c_arena);
- if (!values)
- return NULL;
-
- for (i = 0; i < NCH(ch); i += 4) {
- expr_ty expression;
-
- expression = ast_for_expr(c, CHILD(ch, i));
- if (!expression)
- return NULL;
-
- asdl_seq_SET(keys, i / 4, expression);
-
- expression = ast_for_expr(c, CHILD(ch, i + 2));
- if (!expression)
+ else if (NCH(ch) > 1 &&
+ TYPE(CHILD(ch, 1)) == comp_for) {
+ /* It's a set comprehension. */
+ res = ast_for_setcomp(c, ch);
+ }
+ else if (NCH(ch) > 3 - is_dict &&
+ TYPE(CHILD(ch, 3 - is_dict)) == comp_for) {
+ /* It's a dictionary comprehension. */
+ if (is_dict) {
+ ast_error(c, n, "dict unpacking cannot be used in "
+ "dict comprehension");
return NULL;
-
- asdl_seq_SET(values, i / 4, expression);
+ }
+ res = ast_for_dictcomp(c, ch);
+ }
+ else {
+ /* It's a dictionary display. */
+ res = ast_for_dictdisplay(c, ch);
}
- return Dict(keys, values, LINENO(n), n->n_col_offset, c->c_arena);
+ if (res) {
+ res->lineno = LINENO(n);
+ res->col_offset = n->n_col_offset;
+ }
+ return res;
}
}
default:
@@ -2100,7 +2271,7 @@ ast_for_trailer(struct compiling *c, const node *n, expr_ty left_expr)
REQ(n, trailer);
if (TYPE(CHILD(n, 0)) == LPAR) {
if (NCH(n) == 2)
- return Call(left_expr, NULL, NULL, NULL, NULL, LINENO(n),
+ return Call(left_expr, NULL, NULL, LINENO(n),
n->n_col_offset, c->c_arena);
else
return ast_for_call(c, CHILD(n, 1), left_expr);
@@ -2192,19 +2363,29 @@ ast_for_factor(struct compiling *c, const node *n)
}
static expr_ty
-ast_for_power(struct compiling *c, const node *n)
+ast_for_atom_expr(struct compiling *c, const node *n)
{
- /* power: atom trailer* ('**' factor)*
- */
- int i;
+ int i, nch, start = 0;
expr_ty e, tmp;
- REQ(n, power);
- e = ast_for_atom(c, CHILD(n, 0));
+
+ REQ(n, atom_expr);
+ nch = NCH(n);
+
+ if (TYPE(CHILD(n, 0)) == AWAIT) {
+ start = 1;
+ assert(nch > 1);
+ }
+
+ e = ast_for_atom(c, CHILD(n, start));
if (!e)
return NULL;
- if (NCH(n) == 1)
+ if (nch == 1)
return e;
- for (i = 1; i < NCH(n); i++) {
+ if (start && nch == 2) {
+ return Await(e, LINENO(n), n->n_col_offset, c->c_arena);
+ }
+
+ for (i = start + 1; i < nch; i++) {
node *ch = CHILD(n, i);
if (TYPE(ch) != trailer)
break;
@@ -2215,6 +2396,28 @@ ast_for_power(struct compiling *c, const node *n)
tmp->col_offset = e->col_offset;
e = tmp;
}
+
+ if (start) {
+ /* there was an AWAIT */
+ return Await(e, LINENO(n), n->n_col_offset, c->c_arena);
+ }
+ else {
+ return e;
+ }
+}
+
+static expr_ty
+ast_for_power(struct compiling *c, const node *n)
+{
+ /* power: atom trailer* ('**' factor)*
+ */
+ expr_ty e;
+ REQ(n, power);
+ e = ast_for_atom_expr(c, CHILD(n, 0));
+ if (!e)
+ return NULL;
+ if (NCH(n) == 1)
+ return e;
if (TYPE(CHILD(n, NCH(n) - 1)) == factor) {
expr_ty f = ast_for_expr(c, CHILD(n, NCH(n) - 1));
if (!f)
@@ -2257,9 +2460,11 @@ ast_for_expr(struct compiling *c, const node *n)
and_expr: shift_expr ('&' shift_expr)*
shift_expr: arith_expr (('<<'|'>>') arith_expr)*
arith_expr: term (('+'|'-') term)*
- term: factor (('*'|'/'|'%'|'//') factor)*
+ term: factor (('*'|'@'|'/'|'%'|'//') factor)*
factor: ('+'|'-'|'~') factor | power
- power: atom trailer* ('**' factor)*
+ power: atom_expr ['**' factor]
+ atom_expr: [AWAIT] atom trailer*
+ yield_expr: 'yield' [yield_arg]
*/
asdl_seq *seq;
@@ -2409,15 +2614,14 @@ static expr_ty
ast_for_call(struct compiling *c, const node *n, expr_ty func)
{
/*
- arglist: (argument ',')* (argument [',']| '*' test [',' '**' test]
- | '**' test)
- argument: [test '='] (test) [comp_for] # Really [keyword '='] test
+ arglist: argument (',' argument)* [',']
+ argument: ( test [comp_for] | '*' test | test '=' test | '**' test )
*/
int i, nargs, nkeywords, ngens;
+ int ndoublestars;
asdl_seq *args;
asdl_seq *keywords;
- expr_ty vararg = NULL, kwarg = NULL;
REQ(n, arglist);
@@ -2431,7 +2635,10 @@ ast_for_call(struct compiling *c, const node *n, expr_ty func)
nargs++;
else if (TYPE(CHILD(ch, 1)) == comp_for)
ngens++;
+ else if (TYPE(CHILD(ch, 0)) == STAR)
+ nargs++;
else
+ /* TYPE(CHILD(ch, 0)) == DOUBLESTAR or keyword argument */
nkeywords++;
}
}
@@ -2452,41 +2659,81 @@ ast_for_call(struct compiling *c, const node *n, expr_ty func)
keywords = _Py_asdl_seq_new(nkeywords, c->c_arena);
if (!keywords)
return NULL;
- nargs = 0;
- nkeywords = 0;
+
+ nargs = 0; /* positional arguments + iterable argument unpackings */
+ nkeywords = 0; /* keyword arguments + keyword argument unpackings */
+ ndoublestars = 0; /* just keyword argument unpackings */
for (i = 0; i < NCH(n); i++) {
node *ch = CHILD(n, i);
if (TYPE(ch) == argument) {
expr_ty e;
+ node *chch = CHILD(ch, 0);
if (NCH(ch) == 1) {
+ /* a positional argument */
if (nkeywords) {
- ast_error(c, CHILD(ch, 0),
- "non-keyword arg after keyword arg");
+ if (ndoublestars) {
+ ast_error(c, chch,
+ "positional argument follows "
+ "keyword argument unpacking");
+ }
+ else {
+ ast_error(c, chch,
+ "positional argument follows "
+ "keyword argument");
+ }
return NULL;
}
- if (vararg) {
- ast_error(c, CHILD(ch, 0),
- "only named arguments may follow *expression");
+ e = ast_for_expr(c, chch);
+ if (!e)
+ return NULL;
+ asdl_seq_SET(args, nargs++, e);
+ }
+ else if (TYPE(chch) == STAR) {
+ /* an iterable argument unpacking */
+ expr_ty starred;
+ if (ndoublestars) {
+ ast_error(c, chch,
+ "iterable argument unpacking follows "
+ "keyword argument unpacking");
return NULL;
}
- e = ast_for_expr(c, CHILD(ch, 0));
+ e = ast_for_expr(c, CHILD(ch, 1));
if (!e)
return NULL;
- asdl_seq_SET(args, nargs++, e);
+ starred = Starred(e, Load, LINENO(chch),
+ chch->n_col_offset,
+ c->c_arena);
+ if (!starred)
+ return NULL;
+ asdl_seq_SET(args, nargs++, starred);
+
+ }
+ else if (TYPE(chch) == DOUBLESTAR) {
+ /* a keyword argument unpacking */
+ keyword_ty kw;
+ i++;
+ e = ast_for_expr(c, CHILD(ch, 1));
+ if (!e)
+ return NULL;
+ kw = keyword(NULL, e, c->c_arena);
+ asdl_seq_SET(keywords, nkeywords++, kw);
+ ndoublestars++;
}
else if (TYPE(CHILD(ch, 1)) == comp_for) {
+ /* the lone generator expression */
e = ast_for_genexp(c, ch);
if (!e)
return NULL;
asdl_seq_SET(args, nargs++, e);
}
else {
+ /* a keyword argument */
keyword_ty kw;
identifier key, tmp;
int k;
- /* CHILD(ch, 0) is test, but must be an identifier? */
- e = ast_for_expr(c, CHILD(ch, 0));
+ /* chch is test, but must be an identifier? */
+ e = ast_for_expr(c, chch);
if (!e)
return NULL;
/* f(lambda x: x[0] = 3) ends up getting parsed with
@@ -2495,19 +2742,24 @@ ast_for_call(struct compiling *c, const node *n, expr_ty func)
* then is very confusing.
*/
if (e->kind == Lambda_kind) {
- ast_error(c, CHILD(ch, 0), "lambda cannot contain assignment");
+ ast_error(c, chch,
+ "lambda cannot contain assignment");
return NULL;
- } else if (e->kind != Name_kind) {
- ast_error(c, CHILD(ch, 0), "keyword can't be an expression");
+ }
+ else if (e->kind != Name_kind) {
+ ast_error(c, chch,
+ "keyword can't be an expression");
return NULL;
- } else if (forbidden_name(c, e->v.Name.id, ch, 1)) {
+ }
+ else if (forbidden_name(c, e->v.Name.id, ch, 1)) {
return NULL;
}
key = e->v.Name.id;
for (k = 0; k < nkeywords; k++) {
tmp = ((keyword_ty)asdl_seq_GET(keywords, k))->arg;
- if (!PyUnicode_Compare(tmp, key)) {
- ast_error(c, CHILD(ch, 0), "keyword argument repeated");
+ if (tmp && !PyUnicode_Compare(tmp, key)) {
+ ast_error(c, chch,
+ "keyword argument repeated");
return NULL;
}
}
@@ -2520,21 +2772,9 @@ ast_for_call(struct compiling *c, const node *n, expr_ty func)
asdl_seq_SET(keywords, nkeywords++, kw);
}
}
- else if (TYPE(ch) == STAR) {
- vararg = ast_for_expr(c, CHILD(n, i+1));
- if (!vararg)
- return NULL;
- i++;
- }
- else if (TYPE(ch) == DOUBLESTAR) {
- kwarg = ast_for_expr(c, CHILD(n, i+1));
- if (!kwarg)
- return NULL;
- i++;
- }
}
- return Call(func, args, keywords, vararg, kwarg, func->lineno, func->col_offset, c->c_arena);
+ return Call(func, args, keywords, func->lineno, func->col_offset, c->c_arena);
}
static expr_ty
@@ -2568,7 +2808,7 @@ ast_for_expr_stmt(struct compiling *c, const node *n)
/* expr_stmt: testlist_star_expr (augassign (yield_expr|testlist)
| ('=' (yield_expr|testlist))*)
testlist_star_expr: (test|star_expr) (',' test|star_expr)* [',']
- augassign: '+=' | '-=' | '*=' | '/=' | '%=' | '&=' | '|=' | '^='
+ augassign: '+=' | '-=' | '*=' | '@=' | '/=' | '%=' | '&=' | '|=' | '^='
| '<<=' | '>>=' | '**=' | '//='
test: ... here starts the operator precendence dance
*/
@@ -3288,7 +3528,7 @@ ast_for_while_stmt(struct compiling *c, const node *n)
}
static stmt_ty
-ast_for_for_stmt(struct compiling *c, const node *n)
+ast_for_for_stmt(struct compiling *c, const node *n, int is_async)
{
asdl_seq *_target, *seq = NULL, *suite_seq;
expr_ty expression;
@@ -3322,8 +3562,14 @@ ast_for_for_stmt(struct compiling *c, const node *n)
if (!suite_seq)
return NULL;
- return For(target, expression, suite_seq, seq, LINENO(n), n->n_col_offset,
- c->c_arena);
+ if (is_async)
+ return AsyncFor(target, expression, suite_seq, seq,
+ LINENO(n), n->n_col_offset,
+ c->c_arena);
+ else
+ return For(target, expression, suite_seq, seq,
+ LINENO(n), n->n_col_offset,
+ c->c_arena);
}
static excepthandler_ty
@@ -3470,7 +3716,7 @@ ast_for_with_item(struct compiling *c, const node *n)
/* with_stmt: 'with' with_item (',' with_item)* ':' suite */
static stmt_ty
-ast_for_with_stmt(struct compiling *c, const node *n)
+ast_for_with_stmt(struct compiling *c, const node *n, int is_async)
{
int i, n_items;
asdl_seq *items, *body;
@@ -3492,7 +3738,10 @@ ast_for_with_stmt(struct compiling *c, const node *n)
if (!body)
return NULL;
- return With(items, body, LINENO(n), n->n_col_offset, c->c_arena);
+ if (is_async)
+ return AsyncWith(items, body, LINENO(n), n->n_col_offset, c->c_arena);
+ else
+ return With(items, body, LINENO(n), n->n_col_offset, c->c_arena);
}
static stmt_ty
@@ -3514,8 +3763,8 @@ ast_for_classdef(struct compiling *c, const node *n, asdl_seq *decorator_seq)
return NULL;
if (forbidden_name(c, classname, CHILD(n, 3), 0))
return NULL;
- return ClassDef(classname, NULL, NULL, NULL, NULL, s, decorator_seq,
- LINENO(n), n->n_col_offset, c->c_arena);
+ return ClassDef(classname, NULL, NULL, s, decorator_seq, LINENO(n),
+ n->n_col_offset, c->c_arena);
}
if (TYPE(CHILD(n, 3)) == RPAR) { /* class NAME '(' ')' ':' suite */
@@ -3527,8 +3776,8 @@ ast_for_classdef(struct compiling *c, const node *n, asdl_seq *decorator_seq)
return NULL;
if (forbidden_name(c, classname, CHILD(n, 3), 0))
return NULL;
- return ClassDef(classname, NULL, NULL, NULL, NULL, s, decorator_seq,
- LINENO(n), n->n_col_offset, c->c_arena);
+ return ClassDef(classname, NULL, NULL, s, decorator_seq, LINENO(n),
+ n->n_col_offset, c->c_arena);
}
/* class NAME '(' arglist ')' ':' suite */
@@ -3553,8 +3802,7 @@ ast_for_classdef(struct compiling *c, const node *n, asdl_seq *decorator_seq)
if (forbidden_name(c, classname, CHILD(n, 1), 0))
return NULL;
- return ClassDef(classname, call->v.Call.args, call->v.Call.keywords,
- call->v.Call.starargs, call->v.Call.kwargs, s,
+ return ClassDef(classname, call->v.Call.args, call->v.Call.keywords, s,
decorator_seq, LINENO(n), n->n_col_offset, c->c_arena);
}
@@ -3600,7 +3848,7 @@ ast_for_stmt(struct compiling *c, const node *n)
}
else {
/* compound_stmt: if_stmt | while_stmt | for_stmt | try_stmt
- | funcdef | classdef | decorated
+ | funcdef | classdef | decorated | async_stmt
*/
node *ch = CHILD(n, 0);
REQ(n, compound_stmt);
@@ -3610,17 +3858,19 @@ ast_for_stmt(struct compiling *c, const node *n)
case while_stmt:
return ast_for_while_stmt(c, ch);
case for_stmt:
- return ast_for_for_stmt(c, ch);
+ return ast_for_for_stmt(c, ch, 0);
case try_stmt:
return ast_for_try_stmt(c, ch);
case with_stmt:
- return ast_for_with_stmt(c, ch);
+ return ast_for_with_stmt(c, ch, 0);
case funcdef:
return ast_for_funcdef(c, ch, NULL);
case classdef:
return ast_for_classdef(c, ch, NULL);
case decorated:
return ast_for_decorated(c, ch);
+ case async_stmt:
+ return ast_for_async_stmt(c, ch);
default:
PyErr_Format(PyExc_SystemError,
"unhandled small_stmt: TYPE=%d NCH=%d\n",
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 53009e3fbd..f3d0c9a870 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -46,13 +46,16 @@ _Py_IDENTIFIER(stdin);
_Py_IDENTIFIER(stdout);
_Py_IDENTIFIER(stderr);
+#include "clinic/bltinmodule.c.h"
+
+/* AC: cannot convert yet, waiting for *args support */
static PyObject *
builtin___build_class__(PyObject *self, PyObject *args, PyObject *kwds)
{
PyObject *func, *name, *bases, *mkw, *meta, *winner, *prep, *ns, *cell;
PyObject *cls = NULL;
Py_ssize_t nargs;
- int isclass;
+ int isclass = 0; /* initialize to prevent gcc warning */
assert(args != NULL);
if (!PyTuple_Check(args)) {
@@ -229,25 +232,42 @@ absolute or relative imports. 0 is absolute while a positive number\n\
is the number of parent directories to search relative to the current module.");
+/*[clinic input]
+abs as builtin_abs
+
+ x: object
+ /
+
+Return the absolute value of the argument.
+[clinic start generated code]*/
+
static PyObject *
-builtin_abs(PyObject *self, PyObject *v)
+builtin_abs(PyModuleDef *module, PyObject *x)
+/*[clinic end generated code: output=6833047c493ecea2 input=bed4ca14e29c20d1]*/
{
- return PyNumber_Absolute(v);
+ return PyNumber_Absolute(x);
}
-PyDoc_STRVAR(abs_doc,
-"abs(number) -> number\n\
-\n\
-Return the absolute value of the argument.");
+/*[clinic input]
+all as builtin_all
+
+ iterable: object
+ /
+
+Return True if bool(x) is True for all values x in the iterable.
+
+If the iterable is empty, return True.
+[clinic start generated code]*/
static PyObject *
-builtin_all(PyObject *self, PyObject *v)
+builtin_all(PyModuleDef *module, PyObject *iterable)
+/*[clinic end generated code: output=089e6d1b7bde27b1 input=1a7c5d1bc3438a21]*/
{
PyObject *it, *item;
PyObject *(*iternext)(PyObject *);
int cmp;
- it = PyObject_GetIter(v);
+ it = PyObject_GetIter(iterable);
if (it == NULL)
return NULL;
iternext = *Py_TYPE(it)->tp_iternext;
@@ -277,20 +297,26 @@ builtin_all(PyObject *self, PyObject *v)
Py_RETURN_TRUE;
}
-PyDoc_STRVAR(all_doc,
-"all(iterable) -> bool\n\
-\n\
-Return True if bool(x) is True for all values x in the iterable.\n\
-If the iterable is empty, return True.");
+/*[clinic input]
+any as builtin_any
+
+ iterable: object
+ /
+
+Return True if bool(x) is True for any x in the iterable.
+
+If the iterable is empty, return False.
+[clinic start generated code]*/
static PyObject *
-builtin_any(PyObject *self, PyObject *v)
+builtin_any(PyModuleDef *module, PyObject *iterable)
+/*[clinic end generated code: output=1be994b2c2307492 input=41d7451c23384f24]*/
{
PyObject *it, *item;
PyObject *(*iternext)(PyObject *);
int cmp;
- it = PyObject_GetIter(v);
+ it = PyObject_GetIter(iterable);
if (it == NULL)
return NULL;
iternext = *Py_TYPE(it)->tp_iternext;
@@ -320,56 +346,67 @@ builtin_any(PyObject *self, PyObject *v)
Py_RETURN_FALSE;
}
-PyDoc_STRVAR(any_doc,
-"any(iterable) -> bool\n\
-\n\
-Return True if bool(x) is True for any x in the iterable.\n\
-If the iterable is empty, return False.");
+/*[clinic input]
+ascii as builtin_ascii
+
+ obj: object
+ /
+
+Return an ASCII-only representation of an object.
+
+As repr(), return a string containing a printable representation of an
+object, but escape the non-ASCII characters in the string returned by
+repr() using \\x, \\u or \\U escapes. This generates a string similar
+to that returned by repr() in Python 2.
+[clinic start generated code]*/
static PyObject *
-builtin_ascii(PyObject *self, PyObject *v)
+builtin_ascii(PyModuleDef *module, PyObject *obj)
+/*[clinic end generated code: output=d4e862c48af2a933 input=4c62732e1b3a3cc9]*/
{
- return PyObject_ASCII(v);
+ return PyObject_ASCII(obj);
}
-PyDoc_STRVAR(ascii_doc,
-"ascii(object) -> string\n\
-\n\
-As repr(), return a string containing a printable representation of an\n\
-object, but escape the non-ASCII characters in the string returned by\n\
-repr() using \\x, \\u or \\U escapes. This generates a string similar\n\
-to that returned by repr() in Python 2.");
+/*[clinic input]
+bin as builtin_bin
+
+ number: object
+ /
+
+Return the binary representation of an integer.
+
+ >>> bin(2796202)
+ '0b1010101010101010101010'
+[clinic start generated code]*/
static PyObject *
-builtin_bin(PyObject *self, PyObject *v)
+builtin_bin(PyModuleDef *module, PyObject *number)
+/*[clinic end generated code: output=25ee26c6cf3bbb54 input=53f8a0264bacaf90]*/
{
- return PyNumber_ToBase(v, 2);
+ return PyNumber_ToBase(number, 2);
}
-PyDoc_STRVAR(bin_doc,
-"bin(number) -> string\n\
-\n\
-Return the binary representation of an integer.\n\
-\n\
- >>> bin(2796202)\n\
- '0b1010101010101010101010'\n\
-");
+/*[clinic input]
+callable as builtin_callable
+
+ obj: object
+ /
+
+Return whether the object is callable (i.e., some kind of function).
+
+Note that classes are callable, as are instances of classes with a
+__call__() method.
+[clinic start generated code]*/
static PyObject *
-builtin_callable(PyObject *self, PyObject *v)
+builtin_callable(PyModuleDef *module, PyObject *obj)
+/*[clinic end generated code: output=f4df2ce92364b656 input=1423bab99cc41f58]*/
{
- return PyBool_FromLong((long)PyCallable_Check(v));
+ return PyBool_FromLong((long)PyCallable_Check(obj));
}
-PyDoc_STRVAR(callable_doc,
-"callable(object) -> bool\n\
-\n\
-Return whether the object is callable (i.e., some kind of function).\n\
-Note that classes are callable, as are instances of classes with a\n\
-__call__() method.");
-
typedef struct {
PyObject_HEAD
@@ -524,39 +561,41 @@ PyTypeObject PyFilter_Type = {
};
-static PyObject *
-builtin_format(PyObject *self, PyObject *args)
-{
- PyObject *value;
- PyObject *format_spec = NULL;
+/*[clinic input]
+format as builtin_format
- if (!PyArg_ParseTuple(args, "O|U:format", &value, &format_spec))
- return NULL;
+ value: object
+ format_spec: unicode(c_default="NULL") = ''
+ /
- return PyObject_Format(value, format_spec);
-}
+Return value.__format__(format_spec)
-PyDoc_STRVAR(format_doc,
-"format(value[, format_spec]) -> string\n\
-\n\
-Returns value.__format__(format_spec)\n\
-format_spec defaults to \"\"");
+format_spec defaults to the empty string
+[clinic start generated code]*/
static PyObject *
-builtin_chr(PyObject *self, PyObject *args)
+builtin_format_impl(PyModuleDef *module, PyObject *value,
+ PyObject *format_spec)
+/*[clinic end generated code: output=4341fd78a5f01764 input=6325e751a1b29b86]*/
{
- int x;
+ return PyObject_Format(value, format_spec);
+}
- if (!PyArg_ParseTuple(args, "i:chr", &x))
- return NULL;
+/*[clinic input]
+chr as builtin_chr
- return PyUnicode_FromOrdinal(x);
-}
+ i: int
+ /
-PyDoc_STRVAR(chr_doc,
-"chr(i) -> Unicode character\n\
-\n\
-Return a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff.");
+Return a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff.
+[clinic start generated code]*/
+
+static PyObject *
+builtin_chr_impl(PyModuleDef *module, int i)
+/*[clinic end generated code: output=67fe4d87e690f373 input=3f604ef45a70750d]*/
+{
+ return PyUnicode_FromOrdinal(i);
+}
static const char *
@@ -599,8 +638,8 @@ source_as_string(PyObject *cmd, const char *funcname, const char *what, PyCompil
return NULL;
}
- if (strlen(str) != size) {
- PyErr_SetString(PyExc_TypeError,
+ if (strlen(str) != (size_t)size) {
+ PyErr_SetString(PyExc_ValueError,
"source code string cannot contain null bytes");
Py_CLEAR(*cmd_copy);
return NULL;
@@ -608,35 +647,47 @@ source_as_string(PyObject *cmd, const char *funcname, const char *what, PyCompil
return str;
}
+/*[clinic input]
+compile as builtin_compile
+
+ source: object
+ filename: object(converter="PyUnicode_FSDecoder")
+ mode: str
+ flags: int = 0
+ dont_inherit: int(c_default="0") = False
+ optimize: int = -1
+
+Compile source into a code object that can be executed by exec() or eval().
+
+The source code may represent a Python module, statement or expression.
+The filename will be used for run-time error messages.
+The mode must be 'exec' to compile a module, 'single' to compile a
+single (interactive) statement, or 'eval' to compile an expression.
+The flags argument, if present, controls which future statements influence
+the compilation of the code.
+The dont_inherit argument, if true, stops the compilation inheriting
+the effects of any future statements in effect in the code calling
+compile; if absent or false these statements do influence the compilation,
+in addition to any features explicitly specified.
+[clinic start generated code]*/
+
static PyObject *
-builtin_compile(PyObject *self, PyObject *args, PyObject *kwds)
+builtin_compile_impl(PyModuleDef *module, PyObject *source,
+ PyObject *filename, const char *mode, int flags,
+ int dont_inherit, int optimize)
+/*[clinic end generated code: output=31881762c1bb90c4 input=9d53e8cfb3c86414]*/
{
- PyObject *cmd_copy;
+ PyObject *source_copy;
const char *str;
- PyObject *filename;
- char *startstr;
- int mode = -1;
- int dont_inherit = 0;
- int supplied_flags = 0;
- int optimize = -1;
+ int compile_mode = -1;
int is_ast;
PyCompilerFlags cf;
- PyObject *cmd;
- static char *kwlist[] = {"source", "filename", "mode", "flags",
- "dont_inherit", "optimize", NULL};
int start[] = {Py_file_input, Py_eval_input, Py_single_input};
PyObject *result;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "OO&s|iii:compile", kwlist,
- &cmd,
- PyUnicode_FSDecoder, &filename,
- &startstr, &supplied_flags,
- &dont_inherit, &optimize))
- return NULL;
-
- cf.cf_flags = supplied_flags | PyCF_SOURCE_IS_UTF8;
+ cf.cf_flags = flags | PyCF_SOURCE_IS_UTF8;
- if (supplied_flags &
+ if (flags &
~(PyCF_MASK | PyCF_MASK_OBSOLETE | PyCF_DONT_IMPLY_DEDENT | PyCF_ONLY_AST))
{
PyErr_SetString(PyExc_ValueError,
@@ -655,25 +706,25 @@ builtin_compile(PyObject *self, PyObject *args, PyObject *kwds)
PyEval_MergeCompilerFlags(&cf);
}
- if (strcmp(startstr, "exec") == 0)
- mode = 0;
- else if (strcmp(startstr, "eval") == 0)
- mode = 1;
- else if (strcmp(startstr, "single") == 0)
- mode = 2;
+ if (strcmp(mode, "exec") == 0)
+ compile_mode = 0;
+ else if (strcmp(mode, "eval") == 0)
+ compile_mode = 1;
+ else if (strcmp(mode, "single") == 0)
+ compile_mode = 2;
else {
PyErr_SetString(PyExc_ValueError,
- "compile() arg 3 must be 'exec', 'eval' or 'single'");
+ "compile() mode must be 'exec', 'eval' or 'single'");
goto error;
}
- is_ast = PyAST_Check(cmd);
+ is_ast = PyAST_Check(source);
if (is_ast == -1)
goto error;
if (is_ast) {
- if (supplied_flags & PyCF_ONLY_AST) {
- Py_INCREF(cmd);
- result = cmd;
+ if (flags & PyCF_ONLY_AST) {
+ Py_INCREF(source);
+ result = source;
}
else {
PyArena *arena;
@@ -682,7 +733,7 @@ builtin_compile(PyObject *self, PyObject *args, PyObject *kwds)
arena = PyArena_New();
if (arena == NULL)
goto error;
- mod = PyAST_obj2mod(cmd, arena, mode);
+ mod = PyAST_obj2mod(source, arena, compile_mode);
if (mod == NULL) {
PyArena_Free(arena);
goto error;
@@ -698,12 +749,12 @@ builtin_compile(PyObject *self, PyObject *args, PyObject *kwds)
goto finally;
}
- str = source_as_string(cmd, "compile", "string, bytes or AST", &cf, &cmd_copy);
+ str = source_as_string(source, "compile", "string, bytes or AST", &cf, &source_copy);
if (str == NULL)
goto error;
- result = Py_CompileStringObject(str, filename, start[mode], &cf, optimize);
- Py_XDECREF(cmd_copy);
+ result = Py_CompileStringObject(str, filename, start[compile_mode], &cf, optimize);
+ Py_XDECREF(source_copy);
goto finally;
error:
@@ -713,21 +764,7 @@ finally:
return result;
}
-PyDoc_STRVAR(compile_doc,
-"compile(source, filename, mode[, flags[, dont_inherit]]) -> code object\n\
-\n\
-Compile the source (a Python module, statement or expression)\n\
-into a code object that can be executed by exec() or eval().\n\
-The filename will be used for run-time error messages.\n\
-The mode must be 'exec' to compile a module, 'single' to compile a\n\
-single (interactive) statement, or 'eval' to compile an expression.\n\
-The flags argument, if present, controls which future statements influence\n\
-the compilation of the code.\n\
-The dont_inherit argument, if non-zero, stops the compilation inheriting\n\
-the effects of any future statements in effect in the code calling\n\
-compile; if absent or zero these statements do influence the compilation,\n\
-in addition to any features explicitly specified.");
-
+/* AC: cannot convert yet, as needs PEP 457 group support in inspect */
static PyObject *
builtin_dir(PyObject *self, PyObject *args)
{
@@ -752,32 +789,50 @@ PyDoc_STRVAR(dir_doc,
" for any other object: its attributes, its class's attributes, and\n"
" recursively the attributes of its class's base classes.");
+/*[clinic input]
+divmod as builtin_divmod
+
+ x: object
+ y: object
+ /
+
+Return the tuple (x//y, x%y). Invariant: div*y + mod == x.
+[clinic start generated code]*/
+
static PyObject *
-builtin_divmod(PyObject *self, PyObject *args)
+builtin_divmod_impl(PyModuleDef *module, PyObject *x, PyObject *y)
+/*[clinic end generated code: output=9ad0076120ebf9ac input=175ad9c84ff41a85]*/
{
- PyObject *v, *w;
-
- if (!PyArg_UnpackTuple(args, "divmod", 2, 2, &v, &w))
- return NULL;
- return PyNumber_Divmod(v, w);
+ return PyNumber_Divmod(x, y);
}
-PyDoc_STRVAR(divmod_doc,
-"divmod(x, y) -> (div, mod)\n\
-\n\
-Return the tuple ((x-x%y)/y, x%y). Invariant: div*y + mod == x.");
+/*[clinic input]
+eval as builtin_eval
+
+ source: object
+ globals: object = None
+ locals: object = None
+ /
+
+Evaluate the given source in the context of globals and locals.
+
+The source may be a string representing a Python expression
+or a code object as returned by compile().
+The globals must be a dictionary and locals can be any mapping,
+defaulting to the current globals and locals.
+If only globals is given, locals defaults to it.
+[clinic start generated code]*/
static PyObject *
-builtin_eval(PyObject *self, PyObject *args)
+builtin_eval_impl(PyModuleDef *module, PyObject *source, PyObject *globals,
+ PyObject *locals)
+/*[clinic end generated code: output=7284501fb7b4d666 input=11ee718a8640e527]*/
{
- PyObject *cmd, *result, *cmd_copy;
- PyObject *globals = Py_None, *locals = Py_None;
+ PyObject *result, *source_copy;
const char *str;
PyCompilerFlags cf;
- if (!PyArg_UnpackTuple(args, "eval", 1, 3, &cmd, &globals, &locals))
- return NULL;
if (locals != Py_None && !PyMapping_Check(locals)) {
PyErr_SetString(PyExc_TypeError, "locals must be a mapping");
return NULL;
@@ -812,17 +867,17 @@ builtin_eval(PyObject *self, PyObject *args)
return NULL;
}
- if (PyCode_Check(cmd)) {
- if (PyCode_GetNumFree((PyCodeObject *)cmd) > 0) {
+ if (PyCode_Check(source)) {
+ if (PyCode_GetNumFree((PyCodeObject *)source) > 0) {
PyErr_SetString(PyExc_TypeError,
"code object passed to eval() may not contain free variables");
return NULL;
}
- return PyEval_EvalCode(cmd, globals, locals);
+ return PyEval_EvalCode(source, globals, locals);
}
cf.cf_flags = PyCF_SOURCE_IS_UTF8;
- str = source_as_string(cmd, "eval", "string, bytes or code", &cf, &cmd_copy);
+ str = source_as_string(source, "eval", "string, bytes or code", &cf, &source_copy);
if (str == NULL)
return NULL;
@@ -831,28 +886,33 @@ builtin_eval(PyObject *self, PyObject *args)
(void)PyEval_MergeCompilerFlags(&cf);
result = PyRun_StringFlags(str, Py_eval_input, globals, locals, &cf);
- Py_XDECREF(cmd_copy);
+ Py_XDECREF(source_copy);
return result;
}
-PyDoc_STRVAR(eval_doc,
-"eval(source[, globals[, locals]]) -> value\n\
-\n\
-Evaluate the source in the context of globals and locals.\n\
-The source may be a string representing a Python expression\n\
-or a code object as returned by compile().\n\
-The globals must be a dictionary and locals can be any mapping,\n\
-defaulting to the current globals and locals.\n\
-If only globals is given, locals defaults to it.\n");
+/*[clinic input]
+exec as builtin_exec
+
+ source: object
+ globals: object = None
+ locals: object = None
+ /
+
+Execute the given source in the context of globals and locals.
+
+The source may be a string representing one or more Python statements
+or a code object as returned by compile().
+The globals must be a dictionary and locals can be any mapping,
+defaulting to the current globals and locals.
+If only globals is given, locals defaults to it.
+[clinic start generated code]*/
static PyObject *
-builtin_exec(PyObject *self, PyObject *args)
+builtin_exec_impl(PyModuleDef *module, PyObject *source, PyObject *globals,
+ PyObject *locals)
+/*[clinic end generated code: output=83d574ef9d5d0b46 input=01ca3e1c01692829]*/
{
PyObject *v;
- PyObject *prog, *globals = Py_None, *locals = Py_None;
-
- if (!PyArg_UnpackTuple(args, "exec", 1, 3, &prog, &globals, &locals))
- return NULL;
if (globals == Py_None) {
globals = PyEval_GetGlobals();
@@ -871,13 +931,13 @@ builtin_exec(PyObject *self, PyObject *args)
locals = globals;
if (!PyDict_Check(globals)) {
- PyErr_Format(PyExc_TypeError, "exec() arg 2 must be a dict, not %.100s",
+ PyErr_Format(PyExc_TypeError, "exec() globals must be a dict, not %.100s",
globals->ob_type->tp_name);
return NULL;
}
if (!PyMapping_Check(locals)) {
PyErr_Format(PyExc_TypeError,
- "arg 3 must be a mapping or None, not %.100s",
+ "locals must be a mapping or None, not %.100s",
locals->ob_type->tp_name);
return NULL;
}
@@ -887,23 +947,23 @@ builtin_exec(PyObject *self, PyObject *args)
return NULL;
}
- if (PyCode_Check(prog)) {
- if (PyCode_GetNumFree((PyCodeObject *)prog) > 0) {
+ if (PyCode_Check(source)) {
+ if (PyCode_GetNumFree((PyCodeObject *)source) > 0) {
PyErr_SetString(PyExc_TypeError,
"code object passed to exec() may not "
"contain free variables");
return NULL;
}
- v = PyEval_EvalCode(prog, globals, locals);
+ v = PyEval_EvalCode(source, globals, locals);
}
else {
- PyObject *prog_copy;
+ PyObject *source_copy;
const char *str;
PyCompilerFlags cf;
cf.cf_flags = PyCF_SOURCE_IS_UTF8;
- str = source_as_string(prog, "exec",
- "string, bytes or code", &cf,
- &prog_copy);
+ str = source_as_string(source, "exec",
+ "string, bytes or code", &cf,
+ &source_copy);
if (str == NULL)
return NULL;
if (PyEval_MergeCompilerFlags(&cf))
@@ -911,7 +971,7 @@ builtin_exec(PyObject *self, PyObject *args)
locals, &cf);
else
v = PyRun_String(str, Py_file_input, globals, locals);
- Py_XDECREF(prog_copy);
+ Py_XDECREF(source_copy);
}
if (v == NULL)
return NULL;
@@ -919,15 +979,8 @@ builtin_exec(PyObject *self, PyObject *args)
Py_RETURN_NONE;
}
-PyDoc_STRVAR(exec_doc,
-"exec(object[, globals[, locals]])\n\
-\n\
-Read and execute code from an object, which can be a string or a code\n\
-object.\n\
-The globals and locals are dictionaries, defaulting to the current\n\
-globals and locals. If only globals is given, locals defaults to it.");
-
+/* AC: cannot convert yet, as needs PEP 457 group support in inspect */
static PyObject *
builtin_getattr(PyObject *self, PyObject *args)
{
@@ -961,8 +1014,18 @@ When a default argument is given, it is returned when the attribute doesn't\n\
exist; without it, an exception is raised in that case.");
+/*[clinic input]
+globals as builtin_globals
+
+Return the dictionary containing the current scope's global variables.
+
+NOTE: Updates to this dictionary *will* affect name lookups in the current
+global scope and vice-versa.
+[clinic start generated code]*/
+
static PyObject *
-builtin_globals(PyObject *self)
+builtin_globals_impl(PyModuleDef *module)
+/*[clinic end generated code: output=4958645e96dd8138 input=9327576f92bb48ba]*/
{
PyObject *d;
@@ -971,26 +1034,31 @@ builtin_globals(PyObject *self)
return d;
}
-PyDoc_STRVAR(globals_doc,
-"globals() -> dictionary\n\
-\n\
-Return the dictionary containing the current scope's global variables.");
+/*[clinic input]
+hasattr as builtin_hasattr
+
+ obj: object
+ name: object
+ /
+
+Return whether the object has an attribute with the given name.
+
+This is done by calling getattr(obj, name) and catching AttributeError.
+[clinic start generated code]*/
static PyObject *
-builtin_hasattr(PyObject *self, PyObject *args)
+builtin_hasattr_impl(PyModuleDef *module, PyObject *obj, PyObject *name)
+/*[clinic end generated code: output=81154fdd63634696 input=0faec9787d979542]*/
{
PyObject *v;
- PyObject *name;
- if (!PyArg_UnpackTuple(args, "hasattr", 2, 2, &v, &name))
- return NULL;
if (!PyUnicode_Check(name)) {
PyErr_SetString(PyExc_TypeError,
"hasattr(): attribute name must be string");
return NULL;
}
- v = PyObject_GetAttr(v, name);
+ v = PyObject_GetAttr(obj, name);
if (v == NULL) {
if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
PyErr_Clear();
@@ -1002,25 +1070,31 @@ builtin_hasattr(PyObject *self, PyObject *args)
Py_RETURN_TRUE;
}
-PyDoc_STRVAR(hasattr_doc,
-"hasattr(object, name) -> bool\n\
-\n\
-Return whether the object has an attribute with the given name.\n\
-(This is done by calling getattr(object, name) and catching AttributeError.)");
+/* AC: gdb's integration with CPython relies on builtin_id having
+ * the *exact* parameter names of "self" and "v", so we ensure we
+ * preserve those name rather than using the AC defaults.
+ */
+/*[clinic input]
+id as builtin_id
+
+ self: self(type="PyModuleDef *")
+ obj as v: object
+ /
+
+Return the identity of an object.
+
+This is guaranteed to be unique among simultaneously existing objects.
+(CPython uses the object's memory address.)
+[clinic start generated code]*/
static PyObject *
-builtin_id(PyObject *self, PyObject *v)
+builtin_id(PyModuleDef *self, PyObject *v)
+/*[clinic end generated code: output=0aa640785f697f65 input=5a534136419631f4]*/
{
return PyLong_FromVoidPtr(v);
}
-PyDoc_STRVAR(id_doc,
-"id(object) -> integer\n\
-\n\
-Return the identity of an object. This is guaranteed to be unique among\n\
-simultaneously existing objects. (Hint: it's the object's memory address.)");
-
/* map object ************************************************************/
@@ -1193,6 +1267,8 @@ PyTypeObject PyMap_Type = {
PyObject_GC_Del, /* tp_free */
};
+
+/* AC: cannot convert yet, as needs PEP 457 group support in inspect */
static PyObject *
builtin_next(PyObject *self, PyObject *args)
{
@@ -1234,83 +1310,100 @@ Return the next item from the iterator. If default is given and the iterator\n\
is exhausted, it is returned instead of raising StopIteration.");
+/*[clinic input]
+setattr as builtin_setattr
+
+ obj: object
+ name: object
+ value: object
+ /
+
+Sets the named attribute on the given object to the specified value.
+
+setattr(x, 'y', v) is equivalent to ``x.y = v''
+[clinic start generated code]*/
+
static PyObject *
-builtin_setattr(PyObject *self, PyObject *args)
+builtin_setattr_impl(PyModuleDef *module, PyObject *obj, PyObject *name,
+ PyObject *value)
+/*[clinic end generated code: output=d881c655c0f7e34f input=bd2b7ca6875a1899]*/
{
- PyObject *v;
- PyObject *name;
- PyObject *value;
-
- if (!PyArg_UnpackTuple(args, "setattr", 3, 3, &v, &name, &value))
- return NULL;
- if (PyObject_SetAttr(v, name, value) != 0)
+ if (PyObject_SetAttr(obj, name, value) != 0)
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
-PyDoc_STRVAR(setattr_doc,
-"setattr(object, name, value)\n\
-\n\
-Set a named attribute on an object; setattr(x, 'y', v) is equivalent to\n\
-``x.y = v''.");
+/*[clinic input]
+delattr as builtin_delattr
+
+ obj: object
+ name: object
+ /
+
+Deletes the named attribute from the given object.
+
+delattr(x, 'y') is equivalent to ``del x.y''
+[clinic start generated code]*/
static PyObject *
-builtin_delattr(PyObject *self, PyObject *args)
+builtin_delattr_impl(PyModuleDef *module, PyObject *obj, PyObject *name)
+/*[clinic end generated code: output=ef653e698a0b4187 input=db16685d6b4b9410]*/
{
- PyObject *v;
- PyObject *name;
-
- if (!PyArg_UnpackTuple(args, "delattr", 2, 2, &v, &name))
- return NULL;
- if (PyObject_SetAttr(v, name, (PyObject *)NULL) != 0)
+ if (PyObject_SetAttr(obj, name, (PyObject *)NULL) != 0)
return NULL;
Py_INCREF(Py_None);
return Py_None;
}
-PyDoc_STRVAR(delattr_doc,
-"delattr(object, name)\n\
-\n\
-Delete a named attribute on an object; delattr(x, 'y') is equivalent to\n\
-``del x.y''.");
+/*[clinic input]
+hash as builtin_hash
+
+ obj: object
+ /
+
+Return the hash value for the given object.
+
+Two objects that compare equal must also have the same hash value, but the
+reverse is not necessarily true.
+[clinic start generated code]*/
static PyObject *
-builtin_hash(PyObject *self, PyObject *v)
+builtin_hash(PyModuleDef *module, PyObject *obj)
+/*[clinic end generated code: output=1f32ff154c1f751a input=58c48be822bf9c54]*/
{
Py_hash_t x;
- x = PyObject_Hash(v);
+ x = PyObject_Hash(obj);
if (x == -1)
return NULL;
return PyLong_FromSsize_t(x);
}
-PyDoc_STRVAR(hash_doc,
-"hash(object) -> integer\n\
-\n\
-Return a hash value for the object. Two objects with the same value have\n\
-the same hash value. The reverse is not necessarily true, but likely.");
+/*[clinic input]
+hex as builtin_hex
+
+ number: object
+ /
+
+Return the hexadecimal representation of an integer.
+
+ >>> hex(12648430)
+ '0xc0ffee'
+[clinic start generated code]*/
static PyObject *
-builtin_hex(PyObject *self, PyObject *v)
+builtin_hex(PyModuleDef *module, PyObject *number)
+/*[clinic end generated code: output=618489ce3cbc5858 input=e645aff5fc7d540e]*/
{
- return PyNumber_ToBase(v, 16);
+ return PyNumber_ToBase(number, 16);
}
-PyDoc_STRVAR(hex_doc,
-"hex(number) -> string\n\
-\n\
-Return the hexadecimal representation of an integer.\n\
-\n\
- >>> hex(3735928559)\n\
- '0xdeadbeef'\n\
-");
-
+/* AC: cannot convert yet, as needs PEP 457 group support in inspect */
static PyObject *
builtin_iter(PyObject *self, PyObject *args)
{
@@ -1337,25 +1430,41 @@ supply its own iterator, or be a sequence.\n\
In the second form, the callable is called until it returns the sentinel.");
+/*[clinic input]
+len as builtin_len
+
+ obj: object
+ /
+
+Return the number of items in a container.
+[clinic start generated code]*/
+
static PyObject *
-builtin_len(PyObject *self, PyObject *v)
+builtin_len(PyModuleDef *module, PyObject *obj)
+/*[clinic end generated code: output=8e5837b6f81d915b input=bc55598da9e9c9b5]*/
{
Py_ssize_t res;
- res = PyObject_Size(v);
+ res = PyObject_Size(obj);
if (res < 0 && PyErr_Occurred())
return NULL;
return PyLong_FromSsize_t(res);
}
-PyDoc_STRVAR(len_doc,
-"len(object)\n\
-\n\
-Return the number of items of a sequence or collection.");
+/*[clinic input]
+locals as builtin_locals
+
+Return a dictionary containing the current scope's local variables.
+
+NOTE: Whether or not updates to this dictionary will affect name lookups in
+the local scope and vice-versa is *implementation dependent* and not
+covered by any backwards compatibility guarantees.
+[clinic start generated code]*/
static PyObject *
-builtin_locals(PyObject *self)
+builtin_locals_impl(PyModuleDef *module)
+/*[clinic end generated code: output=8b5a41f12e19d13a input=7874018d478d5c4b]*/
{
PyObject *d;
@@ -1364,11 +1473,6 @@ builtin_locals(PyObject *self)
return d;
}
-PyDoc_STRVAR(locals_doc,
-"locals() -> dictionary\n\
-\n\
-Update and return a dictionary containing the current scope's local variables.");
-
static PyObject *
min_max(PyObject *args, PyObject *kwds, int op)
@@ -1471,6 +1575,7 @@ Fail_it:
return NULL;
}
+/* AC: cannot convert yet, waiting for *args support */
static PyObject *
builtin_min(PyObject *self, PyObject *args, PyObject *kwds)
{
@@ -1487,6 +1592,7 @@ the provided iterable is empty.\n\
With two or more arguments, return the smallest argument.");
+/* AC: cannot convert yet, waiting for *args support */
static PyObject *
builtin_max(PyObject *self, PyObject *args, PyObject *kwds)
{
@@ -1503,56 +1609,70 @@ the provided iterable is empty.\n\
With two or more arguments, return the largest argument.");
+/*[clinic input]
+oct as builtin_oct
+
+ number: object
+ /
+
+Return the octal representation of an integer.
+
+ >>> oct(342391)
+ '0o1234567'
+[clinic start generated code]*/
+
static PyObject *
-builtin_oct(PyObject *self, PyObject *v)
+builtin_oct(PyModuleDef *module, PyObject *number)
+/*[clinic end generated code: output=18f701bc6d8f804a input=ad6b274af4016c72]*/
{
- return PyNumber_ToBase(v, 8);
+ return PyNumber_ToBase(number, 8);
}
-PyDoc_STRVAR(oct_doc,
-"oct(number) -> string\n\
-\n\
-Return the octal representation of an integer.\n\
-\n\
- >>> oct(342391)\n\
- '0o1234567'\n\
-");
+/*[clinic input]
+ord as builtin_ord
+
+ c: object
+ /
+
+Return the Unicode code point for a one-character string.
+[clinic start generated code]*/
static PyObject *
-builtin_ord(PyObject *self, PyObject* obj)
+builtin_ord(PyModuleDef *module, PyObject *c)
+/*[clinic end generated code: output=04fd27272d9462f6 input=3064e5d6203ad012]*/
{
long ord;
Py_ssize_t size;
- if (PyBytes_Check(obj)) {
- size = PyBytes_GET_SIZE(obj);
+ if (PyBytes_Check(c)) {
+ size = PyBytes_GET_SIZE(c);
if (size == 1) {
- ord = (long)((unsigned char)*PyBytes_AS_STRING(obj));
+ ord = (long)((unsigned char)*PyBytes_AS_STRING(c));
return PyLong_FromLong(ord);
}
}
- else if (PyUnicode_Check(obj)) {
- if (PyUnicode_READY(obj) == -1)
+ else if (PyUnicode_Check(c)) {
+ if (PyUnicode_READY(c) == -1)
return NULL;
- size = PyUnicode_GET_LENGTH(obj);
+ size = PyUnicode_GET_LENGTH(c);
if (size == 1) {
- ord = (long)PyUnicode_READ_CHAR(obj, 0);
+ ord = (long)PyUnicode_READ_CHAR(c, 0);
return PyLong_FromLong(ord);
}
}
- else if (PyByteArray_Check(obj)) {
+ else if (PyByteArray_Check(c)) {
/* XXX Hopefully this is temporary */
- size = PyByteArray_GET_SIZE(obj);
+ size = PyByteArray_GET_SIZE(c);
if (size == 1) {
- ord = (long)((unsigned char)*PyByteArray_AS_STRING(obj));
+ ord = (long)((unsigned char)*PyByteArray_AS_STRING(c));
return PyLong_FromLong(ord);
}
}
else {
PyErr_Format(PyExc_TypeError,
"ord() expected string of length 1, but " \
- "%.200s found", obj->ob_type->tp_name);
+ "%.200s found", c->ob_type->tp_name);
return NULL;
}
@@ -1563,31 +1683,30 @@ builtin_ord(PyObject *self, PyObject* obj)
return NULL;
}
-PyDoc_VAR(ord_doc) = PyDoc_STR(
-"ord(c) -> integer\n\
-\n\
-Return the integer ordinal of a one-character string."
-);
+/*[clinic input]
+pow as builtin_pow
-static PyObject *
-builtin_pow(PyObject *self, PyObject *args)
-{
- PyObject *v, *w, *z = Py_None;
+ x: object
+ y: object
+ z: object = None
+ /
- if (!PyArg_UnpackTuple(args, "pow", 2, 3, &v, &w, &z))
- return NULL;
- return PyNumber_Power(v, w, z);
-}
+Equivalent to x**y (with two arguments) or x**y % z (with three arguments)
-PyDoc_STRVAR(pow_doc,
-"pow(x, y[, z]) -> number\n\
-\n\
-With two arguments, equivalent to x**y. With three arguments,\n\
-equivalent to (x**y) % z, but may be more efficient (e.g. for ints).");
+Some types, such as ints, are able to use a more efficient algorithm when
+invoked using the three argument form.
+[clinic start generated code]*/
+static PyObject *
+builtin_pow_impl(PyModuleDef *module, PyObject *x, PyObject *y, PyObject *z)
+/*[clinic end generated code: output=1fba268adba9b45f input=653d57d38d41fc07]*/
+{
+ return PyNumber_Power(x, y, z);
+}
+/* AC: cannot convert yet, waiting for *args support */
static PyObject *
builtin_print(PyObject *self, PyObject *args, PyObject *kwds)
{
@@ -1683,10 +1802,25 @@ end: string appended after the last value, default a newline.\n\
flush: whether to forcibly flush the stream.");
+/*[clinic input]
+input as builtin_input
+
+ prompt: object(c_default="NULL") = None
+ /
+
+Read a string from standard input. The trailing newline is stripped.
+
+The prompt string, if given, is printed to standard output without a
+trailing newline before reading input.
+
+If the user hits EOF (*nix: Ctrl-D, Windows: Ctrl-Z+Return), raise EOFError.
+On *nix systems, readline is used if available.
+[clinic start generated code]*/
+
static PyObject *
-builtin_input(PyObject *self, PyObject *args)
+builtin_input_impl(PyModuleDef *module, PyObject *prompt)
+/*[clinic end generated code: output=b77731f59e1515c4 input=5e8bb70c2908fe3c]*/
{
- PyObject *promptarg = NULL;
PyObject *fin = _PySys_GetObjectId(&PyId_stdin);
PyObject *fout = _PySys_GetObjectId(&PyId_stdout);
PyObject *ferr = _PySys_GetObjectId(&PyId_stderr);
@@ -1694,10 +1828,6 @@ builtin_input(PyObject *self, PyObject *args)
long fd;
int tty;
- /* Parse arguments */
- if (!PyArg_UnpackTuple(args, "input", 0, 1, &promptarg))
- return NULL;
-
/* Check that stdin/out/err are intact */
if (fin == NULL || fin == Py_None) {
PyErr_SetString(PyExc_RuntimeError,
@@ -1755,7 +1885,7 @@ builtin_input(PyObject *self, PyObject *args)
/* If we're interactive, use (GNU) readline */
if (tty) {
PyObject *po = NULL;
- char *prompt;
+ char *promptstr;
char *s = NULL;
PyObject *stdin_encoding = NULL, *stdin_errors = NULL;
PyObject *stdout_encoding = NULL, *stdout_errors = NULL;
@@ -1778,7 +1908,7 @@ builtin_input(PyObject *self, PyObject *args)
PyErr_Clear();
else
Py_DECREF(tmp);
- if (promptarg != NULL) {
+ if (prompt != NULL) {
/* We have a prompt, encode it as stdout would */
char *stdout_encoding_str, *stdout_errors_str;
PyObject *stringpo;
@@ -1790,7 +1920,7 @@ builtin_input(PyObject *self, PyObject *args)
stdout_errors_str = _PyUnicode_AsString(stdout_errors);
if (!stdout_encoding_str || !stdout_errors_str)
goto _readline_errors;
- stringpo = PyObject_Str(promptarg);
+ stringpo = PyObject_Str(prompt);
if (stringpo == NULL)
goto _readline_errors;
po = PyUnicode_AsEncodedString(stringpo,
@@ -1800,15 +1930,15 @@ builtin_input(PyObject *self, PyObject *args)
Py_CLEAR(stringpo);
if (po == NULL)
goto _readline_errors;
- prompt = PyBytes_AsString(po);
- if (prompt == NULL)
+ promptstr = PyBytes_AsString(po);
+ if (promptstr == NULL)
goto _readline_errors;
}
else {
po = NULL;
- prompt = "";
+ promptstr = "";
}
- s = PyOS_Readline(stdin, stdout, prompt);
+ s = PyOS_Readline(stdin, stdout, promptstr);
if (s == NULL) {
PyErr_CheckSignals();
if (!PyErr_Occurred())
@@ -1850,8 +1980,8 @@ builtin_input(PyObject *self, PyObject *args)
}
/* Fallback if we're not interactive */
- if (promptarg != NULL) {
- if (PyFile_WriteObject(promptarg, fout, Py_PRINT_RAW) != 0)
+ if (prompt != NULL) {
+ if (PyFile_WriteObject(prompt, fout, Py_PRINT_RAW) != 0)
return NULL;
}
tmp = _PyObject_CallMethodId(fout, &PyId_flush, "");
@@ -1862,28 +1992,29 @@ builtin_input(PyObject *self, PyObject *args)
return PyFile_GetLine(fin, -1);
}
-PyDoc_STRVAR(input_doc,
-"input([prompt]) -> string\n\
-\n\
-Read a string from standard input. The trailing newline is stripped.\n\
-If the user hits EOF (Unix: Ctl-D, Windows: Ctl-Z+Return), raise EOFError.\n\
-On Unix, GNU readline is used if enabled. The prompt string, if given,\n\
-is printed without a trailing newline before reading.");
+/*[clinic input]
+repr as builtin_repr
+
+ obj: object
+ /
+
+Return the canonical string representation of the object.
+
+For many object types, including most builtins, eval(repr(obj)) == obj.
+[clinic start generated code]*/
static PyObject *
-builtin_repr(PyObject *self, PyObject *v)
+builtin_repr(PyModuleDef *module, PyObject *obj)
+/*[clinic end generated code: output=dc41784fa4341834 input=1c9e6d66d3e3be04]*/
{
- return PyObject_Repr(v);
+ return PyObject_Repr(obj);
}
-PyDoc_STRVAR(repr_doc,
-"repr(object) -> string\n\
-\n\
-Return the canonical string representation of the object.\n\
-For most object types, eval(repr(object)) == object.");
-
+/* AC: cannot convert yet, as needs PEP 457 group support in inspect
+ * or a semantic change to accept None for "ndigits"
+ */
static PyObject *
builtin_round(PyObject *self, PyObject *args, PyObject *kwds)
{
@@ -1925,6 +2056,35 @@ This returns an int when called with one argument, otherwise the\n\
same type as the number. ndigits may be negative.");
+/*AC: we need to keep the kwds dict intact to easily call into the
+ * list.sort method, which isn't currently supported in AC. So we just use
+ * the initially generated signature with a custom implementation.
+ */
+/* [disabled clinic input]
+sorted as builtin_sorted
+
+ iterable as seq: object
+ key as keyfunc: object = None
+ reverse: object = False
+
+Return a new list containing all items from the iterable in ascending order.
+
+A custom key function can be supplied to customise the sort order, and the
+reverse flag can be set to request the result in descending order.
+[end disabled clinic input]*/
+
+PyDoc_STRVAR(builtin_sorted__doc__,
+"sorted($module, iterable, key=None, reverse=False)\n"
+"--\n"
+"\n"
+"Return a new list containing all items from the iterable in ascending order.\n"
+"\n"
+"A custom key function can be supplied to customise the sort order, and the\n"
+"reverse flag can be set to request the result in descending order.");
+
+#define BUILTIN_SORTED_METHODDEF \
+ {"sorted", (PyCFunction)builtin_sorted, METH_VARARGS|METH_KEYWORDS, builtin_sorted__doc__},
+
static PyObject *
builtin_sorted(PyObject *self, PyObject *args, PyObject *kwds)
{
@@ -1966,9 +2126,8 @@ builtin_sorted(PyObject *self, PyObject *args, PyObject *kwds)
return newlist;
}
-PyDoc_STRVAR(sorted_doc,
-"sorted(iterable, key=None, reverse=False) --> new sorted list");
+/* AC: cannot convert yet, as needs PEP 457 group support in inspect */
static PyObject *
builtin_vars(PyObject *self, PyObject *args)
{
@@ -2000,17 +2159,29 @@ PyDoc_STRVAR(vars_doc,
Without arguments, equivalent to locals().\n\
With an argument, equivalent to object.__dict__.");
-static PyObject*
-builtin_sum(PyObject *self, PyObject *args)
+
+/*[clinic input]
+sum as builtin_sum
+
+ iterable: object
+ start: object(c_default="NULL") = 0
+ /
+
+Return the sum of a 'start' value (default: 0) plus an iterable of numbers
+
+When the iterable is empty, return the start value.
+This function is intended specifically for use with numeric values and may
+reject non-numeric types.
+[clinic start generated code]*/
+
+static PyObject *
+builtin_sum_impl(PyModuleDef *module, PyObject *iterable, PyObject *start)
+/*[clinic end generated code: output=33655b248b21d581 input=3b5b7a9d7611c73a]*/
{
- PyObject *seq;
- PyObject *result = NULL;
+ PyObject *result = start;
PyObject *temp, *item, *iter;
- if (!PyArg_UnpackTuple(args, "sum", 1, 2, &seq, &result))
- return NULL;
-
- iter = PyObject_GetIter(seq);
+ iter = PyObject_GetIter(iterable);
if (iter == NULL)
return NULL;
@@ -2040,7 +2211,6 @@ builtin_sum(PyObject *self, PyObject *args)
Py_DECREF(iter);
return NULL;
}
-
Py_INCREF(result);
}
@@ -2166,62 +2336,62 @@ builtin_sum(PyObject *self, PyObject *args)
return result;
}
-PyDoc_STRVAR(sum_doc,
-"sum(iterable[, start]) -> value\n\
-\n\
-Return the sum of an iterable of numbers (NOT strings) plus the value\n\
-of parameter 'start' (which defaults to 0). When the iterable is\n\
-empty, return start.");
+/*[clinic input]
+isinstance as builtin_isinstance
+
+ obj: object
+ class_or_tuple: object
+ /
+
+Return whether an object is an instance of a class or of a subclass thereof.
+
+A tuple, as in ``isinstance(x, (A, B, ...))``, may be given as the target to
+check against. This is equivalent to ``isinstance(x, A) or isinstance(x, B)
+or ...`` etc.
+[clinic start generated code]*/
static PyObject *
-builtin_isinstance(PyObject *self, PyObject *args)
+builtin_isinstance_impl(PyModuleDef *module, PyObject *obj,
+ PyObject *class_or_tuple)
+/*[clinic end generated code: output=f960b7c12dbbeda0 input=ffa743db1daf7549]*/
{
- PyObject *inst;
- PyObject *cls;
int retval;
- if (!PyArg_UnpackTuple(args, "isinstance", 2, 2, &inst, &cls))
- return NULL;
-
- retval = PyObject_IsInstance(inst, cls);
+ retval = PyObject_IsInstance(obj, class_or_tuple);
if (retval < 0)
return NULL;
return PyBool_FromLong(retval);
}
-PyDoc_STRVAR(isinstance_doc,
-"isinstance(object, class-or-type-or-tuple) -> bool\n\
-\n\
-Return whether an object is an instance of a class or of a subclass thereof.\n\
-With a type as second argument, return whether that is the object's type.\n\
-The form using a tuple, isinstance(x, (A, B, ...)), is a shortcut for\n\
-isinstance(x, A) or isinstance(x, B) or ... (etc.).");
+/*[clinic input]
+issubclass as builtin_issubclass
+
+ cls: object
+ class_or_tuple: object
+ /
+
+Return whether 'cls' is a derived from another class or is the same class.
+
+A tuple, as in ``issubclass(x, (A, B, ...))``, may be given as the target to
+check against. This is equivalent to ``issubclass(x, A) or issubclass(x, B)
+or ...`` etc.
+[clinic start generated code]*/
static PyObject *
-builtin_issubclass(PyObject *self, PyObject *args)
+builtin_issubclass_impl(PyModuleDef *module, PyObject *cls,
+ PyObject *class_or_tuple)
+/*[clinic end generated code: output=8b012a151940bbf2 input=af5f35e9ceaddaf6]*/
{
- PyObject *derived;
- PyObject *cls;
int retval;
- if (!PyArg_UnpackTuple(args, "issubclass", 2, 2, &derived, &cls))
- return NULL;
-
- retval = PyObject_IsSubclass(derived, cls);
+ retval = PyObject_IsSubclass(cls, class_or_tuple);
if (retval < 0)
return NULL;
return PyBool_FromLong(retval);
}
-PyDoc_STRVAR(issubclass_doc,
-"issubclass(C, B) -> bool\n\
-\n\
-Return whether class C is a subclass (i.e., a derived class) of class B.\n\
-When using a tuple as the second argument issubclass(X, (A, B, ...)),\n\
-is a shortcut for issubclass(X, A) or issubclass(X, B) or ... (etc.).");
-
typedef struct {
PyObject_HEAD
@@ -2416,44 +2586,44 @@ static PyMethodDef builtin_methods[] = {
{"__build_class__", (PyCFunction)builtin___build_class__,
METH_VARARGS | METH_KEYWORDS, build_class_doc},
{"__import__", (PyCFunction)builtin___import__, METH_VARARGS | METH_KEYWORDS, import_doc},
- {"abs", builtin_abs, METH_O, abs_doc},
- {"all", builtin_all, METH_O, all_doc},
- {"any", builtin_any, METH_O, any_doc},
- {"ascii", builtin_ascii, METH_O, ascii_doc},
- {"bin", builtin_bin, METH_O, bin_doc},
- {"callable", builtin_callable, METH_O, callable_doc},
- {"chr", builtin_chr, METH_VARARGS, chr_doc},
- {"compile", (PyCFunction)builtin_compile, METH_VARARGS | METH_KEYWORDS, compile_doc},
- {"delattr", builtin_delattr, METH_VARARGS, delattr_doc},
+ BUILTIN_ABS_METHODDEF
+ BUILTIN_ALL_METHODDEF
+ BUILTIN_ANY_METHODDEF
+ BUILTIN_ASCII_METHODDEF
+ BUILTIN_BIN_METHODDEF
+ BUILTIN_CALLABLE_METHODDEF
+ BUILTIN_CHR_METHODDEF
+ BUILTIN_COMPILE_METHODDEF
+ BUILTIN_DELATTR_METHODDEF
{"dir", builtin_dir, METH_VARARGS, dir_doc},
- {"divmod", builtin_divmod, METH_VARARGS, divmod_doc},
- {"eval", builtin_eval, METH_VARARGS, eval_doc},
- {"exec", builtin_exec, METH_VARARGS, exec_doc},
- {"format", builtin_format, METH_VARARGS, format_doc},
+ BUILTIN_DIVMOD_METHODDEF
+ BUILTIN_EVAL_METHODDEF
+ BUILTIN_EXEC_METHODDEF
+ BUILTIN_FORMAT_METHODDEF
{"getattr", builtin_getattr, METH_VARARGS, getattr_doc},
- {"globals", (PyCFunction)builtin_globals, METH_NOARGS, globals_doc},
- {"hasattr", builtin_hasattr, METH_VARARGS, hasattr_doc},
- {"hash", builtin_hash, METH_O, hash_doc},
- {"hex", builtin_hex, METH_O, hex_doc},
- {"id", builtin_id, METH_O, id_doc},
- {"input", builtin_input, METH_VARARGS, input_doc},
- {"isinstance", builtin_isinstance, METH_VARARGS, isinstance_doc},
- {"issubclass", builtin_issubclass, METH_VARARGS, issubclass_doc},
+ BUILTIN_GLOBALS_METHODDEF
+ BUILTIN_HASATTR_METHODDEF
+ BUILTIN_HASH_METHODDEF
+ BUILTIN_HEX_METHODDEF
+ BUILTIN_ID_METHODDEF
+ BUILTIN_INPUT_METHODDEF
+ BUILTIN_ISINSTANCE_METHODDEF
+ BUILTIN_ISSUBCLASS_METHODDEF
{"iter", builtin_iter, METH_VARARGS, iter_doc},
- {"len", builtin_len, METH_O, len_doc},
- {"locals", (PyCFunction)builtin_locals, METH_NOARGS, locals_doc},
+ BUILTIN_LEN_METHODDEF
+ BUILTIN_LOCALS_METHODDEF
{"max", (PyCFunction)builtin_max, METH_VARARGS | METH_KEYWORDS, max_doc},
{"min", (PyCFunction)builtin_min, METH_VARARGS | METH_KEYWORDS, min_doc},
{"next", (PyCFunction)builtin_next, METH_VARARGS, next_doc},
- {"oct", builtin_oct, METH_O, oct_doc},
- {"ord", builtin_ord, METH_O, ord_doc},
- {"pow", builtin_pow, METH_VARARGS, pow_doc},
+ BUILTIN_OCT_METHODDEF
+ BUILTIN_ORD_METHODDEF
+ BUILTIN_POW_METHODDEF
{"print", (PyCFunction)builtin_print, METH_VARARGS | METH_KEYWORDS, print_doc},
- {"repr", builtin_repr, METH_O, repr_doc},
+ BUILTIN_REPR_METHODDEF
{"round", (PyCFunction)builtin_round, METH_VARARGS | METH_KEYWORDS, round_doc},
- {"setattr", builtin_setattr, METH_VARARGS, setattr_doc},
- {"sorted", (PyCFunction)builtin_sorted, METH_VARARGS | METH_KEYWORDS, sorted_doc},
- {"sum", builtin_sum, METH_VARARGS, sum_doc},
+ BUILTIN_SETATTR_METHODDEF
+ BUILTIN_SORTED_METHODDEF
+ BUILTIN_SUM_METHODDEF
{"vars", builtin_vars, METH_VARARGS, vars_doc},
{NULL, NULL},
};
diff --git a/Python/ceval.c b/Python/ceval.c
index 7a0cb7f04a..3d69038444 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -12,8 +12,10 @@
#include "Python.h"
#include "code.h"
+#include "dictobject.h"
#include "frameobject.h"
#include "opcode.h"
+#include "setobject.h"
#include "structmember.h"
#include <ctype.h>
@@ -735,7 +737,7 @@ _Py_CheckRecursiveCall(const char *where)
if (tstate->recursion_depth > recursion_limit) {
--tstate->recursion_depth;
tstate->overflowed = 1;
- PyErr_Format(PyExc_RuntimeError,
+ PyErr_Format(PyExc_RecursionError,
"maximum recursion depth exceeded%s",
where);
return -1;
@@ -1189,7 +1191,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
f->f_stacktop = NULL; /* remains NULL unless yield suspends frame */
f->f_executing = 1;
- if (co->co_flags & CO_GENERATOR) {
+ if (co->co_flags & (CO_GENERATOR | CO_COROUTINE)) {
if (!throwflag && f->f_exc_type != NULL && f->f_exc_type != Py_None) {
/* We were in an except handler when we left,
restore the exception state which was put aside
@@ -1504,6 +1506,18 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
DISPATCH();
}
+ TARGET(BINARY_MATRIX_MULTIPLY) {
+ PyObject *right = POP();
+ PyObject *left = TOP();
+ PyObject *res = PyNumber_MatrixMultiply(left, right);
+ Py_DECREF(left);
+ Py_DECREF(right);
+ SET_TOP(res);
+ if (res == NULL)
+ goto error;
+ DISPATCH();
+ }
+
TARGET(BINARY_TRUE_DIVIDE) {
PyObject *divisor = POP();
PyObject *dividend = TOP();
@@ -1694,6 +1708,18 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
DISPATCH();
}
+ TARGET(INPLACE_MATRIX_MULTIPLY) {
+ PyObject *right = POP();
+ PyObject *left = TOP();
+ PyObject *res = PyNumber_InPlaceMatrixMultiply(left, right);
+ Py_DECREF(left);
+ Py_DECREF(right);
+ SET_TOP(res);
+ if (res == NULL)
+ goto error;
+ DISPATCH();
+ }
+
TARGET(INPLACE_TRUE_DIVIDE) {
PyObject *divisor = POP();
PyObject *dividend = TOP();
@@ -1900,11 +1926,166 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
goto fast_block_end;
}
+ TARGET(GET_AITER) {
+ unaryfunc getter = NULL;
+ PyObject *iter = NULL;
+ PyObject *awaitable = NULL;
+ PyObject *obj = TOP();
+ PyTypeObject *type = Py_TYPE(obj);
+
+ if (type->tp_as_async != NULL) {
+ getter = type->tp_as_async->am_aiter;
+ }
+
+ if (getter != NULL) {
+ iter = (*getter)(obj);
+ Py_DECREF(obj);
+ if (iter == NULL) {
+ SET_TOP(NULL);
+ goto error;
+ }
+ }
+ else {
+ SET_TOP(NULL);
+ PyErr_Format(
+ PyExc_TypeError,
+ "'async for' requires an object with "
+ "__aiter__ method, got %.100s",
+ type->tp_name);
+ Py_DECREF(obj);
+ goto error;
+ }
+
+ if (Py_TYPE(iter)->tp_as_async != NULL &&
+ Py_TYPE(iter)->tp_as_async->am_anext != NULL) {
+
+ /* Starting with CPython 3.5.2 __aiter__ should return
+ asynchronous iterators directly (not awaitables that
+ resolve to asynchronous iterators.)
+
+ Therefore, we check if the object that was returned
+ from __aiter__ has an __anext__ method. If it does,
+ we wrap it in an awaitable that resolves to `iter`.
+
+ See http://bugs.python.org/issue27243 for more
+ details.
+ */
+
+ PyObject *wrapper = _PyAIterWrapper_New(iter);
+ Py_DECREF(iter);
+ SET_TOP(wrapper);
+ DISPATCH();
+ }
+
+ awaitable = _PyCoro_GetAwaitableIter(iter);
+ if (awaitable == NULL) {
+ SET_TOP(NULL);
+ PyErr_Format(
+ PyExc_TypeError,
+ "'async for' received an invalid object "
+ "from __aiter__: %.100s",
+ Py_TYPE(iter)->tp_name);
+
+ Py_DECREF(iter);
+ goto error;
+ } else {
+ Py_DECREF(iter);
+
+ if (PyErr_WarnFormat(
+ PyExc_PendingDeprecationWarning, 1,
+ "'%.100s' implements legacy __aiter__ protocol; "
+ "__aiter__ should return an asynchronous "
+ "iterator, not awaitable",
+ type->tp_name))
+ {
+ /* Warning was converted to an error. */
+ Py_DECREF(awaitable);
+ SET_TOP(NULL);
+ goto error;
+ }
+ }
+
+ SET_TOP(awaitable);
+ DISPATCH();
+ }
+
+ TARGET(GET_ANEXT) {
+ unaryfunc getter = NULL;
+ PyObject *next_iter = NULL;
+ PyObject *awaitable = NULL;
+ PyObject *aiter = TOP();
+ PyTypeObject *type = Py_TYPE(aiter);
+
+ if (type->tp_as_async != NULL)
+ getter = type->tp_as_async->am_anext;
+
+ if (getter != NULL) {
+ next_iter = (*getter)(aiter);
+ if (next_iter == NULL) {
+ goto error;
+ }
+ }
+ else {
+ PyErr_Format(
+ PyExc_TypeError,
+ "'async for' requires an iterator with "
+ "__anext__ method, got %.100s",
+ type->tp_name);
+ goto error;
+ }
+
+ awaitable = _PyCoro_GetAwaitableIter(next_iter);
+ if (awaitable == NULL) {
+ PyErr_Format(
+ PyExc_TypeError,
+ "'async for' received an invalid object "
+ "from __anext__: %.100s",
+ Py_TYPE(next_iter)->tp_name);
+
+ Py_DECREF(next_iter);
+ goto error;
+ } else
+ Py_DECREF(next_iter);
+
+ PUSH(awaitable);
+ DISPATCH();
+ }
+
+ TARGET(GET_AWAITABLE) {
+ PyObject *iterable = TOP();
+ PyObject *iter = _PyCoro_GetAwaitableIter(iterable);
+
+ Py_DECREF(iterable);
+
+ if (iter != NULL && PyCoro_CheckExact(iter)) {
+ PyObject *yf = _PyGen_yf((PyGenObject*)iter);
+ if (yf != NULL) {
+ /* `iter` is a coroutine object that is being
+ awaited, `yf` is a pointer to the current awaitable
+ being awaited on. */
+ Py_DECREF(yf);
+ Py_CLEAR(iter);
+ PyErr_SetString(
+ PyExc_RuntimeError,
+ "coroutine is being awaited already");
+ /* The code below jumps to `error` if `iter` is NULL. */
+ }
+ }
+
+ SET_TOP(iter); /* Even if it's NULL */
+
+ if (iter == NULL) {
+ goto error;
+ }
+
+ DISPATCH();
+ }
+
TARGET(YIELD_FROM) {
PyObject *v = POP();
PyObject *reciever = TOP();
int err;
- if (PyGen_CheckExact(reciever)) {
+ if (PyGen_CheckExact(reciever) || PyCoro_CheckExact(reciever)) {
retval = _PyGen_Send((PyGenObject *)reciever, v);
} else {
_Py_IDENTIFIER(send);
@@ -2233,6 +2414,10 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
/* Slow-path if globals or builtins is not a dict */
v = PyObject_GetItem(f->f_globals, name);
if (v == NULL) {
+ if (!PyErr_ExceptionMatches(PyExc_KeyError))
+ goto error;
+ PyErr_Clear();
+
v = PyObject_GetItem(f->f_builtins, name);
if (v == NULL) {
if (PyErr_ExceptionMatches(PyExc_KeyError))
@@ -2355,6 +2540,43 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
DISPATCH();
}
+ TARGET_WITH_IMPL(BUILD_TUPLE_UNPACK, _build_list_unpack)
+ TARGET(BUILD_LIST_UNPACK)
+ _build_list_unpack: {
+ int convert_to_tuple = opcode == BUILD_TUPLE_UNPACK;
+ int i;
+ PyObject *sum = PyList_New(0);
+ PyObject *return_value;
+ if (sum == NULL)
+ goto error;
+
+ for (i = oparg; i > 0; i--) {
+ PyObject *none_val;
+
+ none_val = _PyList_Extend((PyListObject *)sum, PEEK(i));
+ if (none_val == NULL) {
+ Py_DECREF(sum);
+ goto error;
+ }
+ Py_DECREF(none_val);
+ }
+
+ if (convert_to_tuple) {
+ return_value = PyList_AsTuple(sum);
+ Py_DECREF(sum);
+ if (return_value == NULL)
+ goto error;
+ }
+ else {
+ return_value = sum;
+ }
+
+ while (oparg--)
+ Py_DECREF(POP());
+ PUSH(return_value);
+ DISPATCH();
+ }
+
TARGET(BUILD_SET) {
PyObject *set = PySet_New(NULL);
int err = 0;
@@ -2374,26 +2596,127 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
DISPATCH();
}
+ TARGET(BUILD_SET_UNPACK) {
+ int i;
+ PyObject *sum = PySet_New(NULL);
+ if (sum == NULL)
+ goto error;
+
+ for (i = oparg; i > 0; i--) {
+ if (_PySet_Update(sum, PEEK(i)) < 0) {
+ Py_DECREF(sum);
+ goto error;
+ }
+ }
+
+ while (oparg--)
+ Py_DECREF(POP());
+ PUSH(sum);
+ DISPATCH();
+ }
+
TARGET(BUILD_MAP) {
+ int i;
PyObject *map = _PyDict_NewPresized((Py_ssize_t)oparg);
if (map == NULL)
goto error;
+ for (i = oparg; i > 0; i--) {
+ int err;
+ PyObject *key = PEEK(2*i);
+ PyObject *value = PEEK(2*i - 1);
+ err = PyDict_SetItem(map, key, value);
+ if (err != 0) {
+ Py_DECREF(map);
+ goto error;
+ }
+ }
+
+ while (oparg--) {
+ Py_DECREF(POP());
+ Py_DECREF(POP());
+ }
PUSH(map);
DISPATCH();
}
- TARGET(STORE_MAP) {
- PyObject *key = TOP();
- PyObject *value = SECOND();
- PyObject *map = THIRD();
- int err;
- STACKADJ(-2);
- assert(PyDict_CheckExact(map));
- err = PyDict_SetItem(map, key, value);
- Py_DECREF(value);
- Py_DECREF(key);
- if (err != 0)
+ TARGET_WITH_IMPL(BUILD_MAP_UNPACK_WITH_CALL, _build_map_unpack)
+ TARGET(BUILD_MAP_UNPACK)
+ _build_map_unpack: {
+ int with_call = opcode == BUILD_MAP_UNPACK_WITH_CALL;
+ int num_maps;
+ int function_location;
+ int i;
+ PyObject *sum = PyDict_New();
+ if (sum == NULL)
goto error;
+ if (with_call) {
+ num_maps = oparg & 0xff;
+ function_location = (oparg>>8) & 0xff;
+ }
+ else {
+ num_maps = oparg;
+ }
+
+ for (i = num_maps; i > 0; i--) {
+ PyObject *arg = PEEK(i);
+ if (with_call) {
+ PyObject *intersection = _PyDictView_Intersect(sum, arg);
+
+ if (intersection == NULL) {
+ if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
+ PyObject *func = (
+ PEEK(function_location + num_maps));
+ PyErr_Format(PyExc_TypeError,
+ "%.200s%.200s argument after ** "
+ "must be a mapping, not %.200s",
+ PyEval_GetFuncName(func),
+ PyEval_GetFuncDesc(func),
+ arg->ob_type->tp_name);
+ }
+ Py_DECREF(sum);
+ goto error;
+ }
+
+ if (PySet_GET_SIZE(intersection)) {
+ Py_ssize_t idx = 0;
+ PyObject *key;
+ PyObject *func = PEEK(function_location + num_maps);
+ Py_hash_t hash;
+ _PySet_NextEntry(intersection, &idx, &key, &hash);
+ if (!PyUnicode_Check(key)) {
+ PyErr_Format(PyExc_TypeError,
+ "%.200s%.200s keywords must be strings",
+ PyEval_GetFuncName(func),
+ PyEval_GetFuncDesc(func));
+ } else {
+ PyErr_Format(PyExc_TypeError,
+ "%.200s%.200s got multiple "
+ "values for keyword argument '%U'",
+ PyEval_GetFuncName(func),
+ PyEval_GetFuncDesc(func),
+ key);
+ }
+ Py_DECREF(intersection);
+ Py_DECREF(sum);
+ goto error;
+ }
+ Py_DECREF(intersection);
+ }
+
+ if (PyDict_Update(sum, arg) < 0) {
+ if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
+ PyErr_Format(PyExc_TypeError,
+ "'%.200s' object is not a mapping",
+ arg->ob_type->tp_name);
+ }
+ Py_DECREF(sum);
+ goto error;
+ }
+ }
+
+ while (num_maps--)
+ Py_DECREF(POP());
+ PUSH(sum);
DISPATCH();
}
@@ -2655,6 +2978,34 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
DISPATCH();
}
+ TARGET(GET_YIELD_FROM_ITER) {
+ /* before: [obj]; after [getiter(obj)] */
+ PyObject *iterable = TOP();
+ PyObject *iter;
+ if (PyCoro_CheckExact(iterable)) {
+ /* `iterable` is a coroutine */
+ if (!(co->co_flags & (CO_COROUTINE | CO_ITERABLE_COROUTINE))) {
+ /* and it is used in a 'yield from' expression of a
+ regular generator. */
+ Py_DECREF(iterable);
+ SET_TOP(NULL);
+ PyErr_SetString(PyExc_TypeError,
+ "cannot 'yield from' a coroutine object "
+ "in a non-coroutine generator");
+ goto error;
+ }
+ }
+ else if (!PyGen_CheckExact(iterable)) {
+ /* `iterable` is not a generator. */
+ iter = PyObject_GetIter(iterable);
+ Py_DECREF(iterable);
+ SET_TOP(iter);
+ if (iter == NULL)
+ goto error;
+ }
+ DISPATCH();
+ }
+
PREDICTED_WITH_ARG(FOR_ITER);
TARGET(FOR_ITER) {
/* before: [iter]; after: [iter, iter()] *or* [] */
@@ -2707,6 +3058,39 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
DISPATCH();
}
+ TARGET(BEFORE_ASYNC_WITH) {
+ _Py_IDENTIFIER(__aexit__);
+ _Py_IDENTIFIER(__aenter__);
+
+ PyObject *mgr = TOP();
+ PyObject *exit = special_lookup(mgr, &PyId___aexit__),
+ *enter;
+ PyObject *res;
+ if (exit == NULL)
+ goto error;
+ SET_TOP(exit);
+ enter = special_lookup(mgr, &PyId___aenter__);
+ Py_DECREF(mgr);
+ if (enter == NULL)
+ goto error;
+ res = PyObject_CallFunctionObjArgs(enter, NULL);
+ Py_DECREF(enter);
+ if (res == NULL)
+ goto error;
+ PUSH(res);
+ DISPATCH();
+ }
+
+ TARGET(SETUP_ASYNC_WITH) {
+ PyObject *res = POP();
+ /* Setup the finally block before pushing the result
+ of __aenter__ on the stack. */
+ PyFrame_BlockSetup(f, SETUP_FINALLY, INSTR_OFFSET() + oparg,
+ STACK_LEVEL());
+ PUSH(res);
+ DISPATCH();
+ }
+
TARGET(SETUP_WITH) {
_Py_IDENTIFIER(__exit__);
_Py_IDENTIFIER(__enter__);
@@ -2733,7 +3117,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
DISPATCH();
}
- TARGET(WITH_CLEANUP) {
+ TARGET(WITH_CLEANUP_START) {
/* At the top of the stack are 1-6 values indicating
how/why we entered the finally clause:
- TOP = None
@@ -2761,7 +3145,6 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
PyObject *exit_func;
PyObject *exc = TOP(), *val = Py_None, *tb = Py_None, *res;
- int err;
if (exc == Py_None) {
(void)POP();
exit_func = TOP();
@@ -2811,11 +3194,26 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
if (res == NULL)
goto error;
+ Py_INCREF(exc); /* Duplicating the exception on the stack */
+ PUSH(exc);
+ PUSH(res);
+ PREDICT(WITH_CLEANUP_FINISH);
+ DISPATCH();
+ }
+
+ PREDICTED(WITH_CLEANUP_FINISH);
+ TARGET(WITH_CLEANUP_FINISH) {
+ PyObject *res = POP();
+ PyObject *exc = POP();
+ int err;
+
if (exc != Py_None)
err = PyObject_IsTrue(res);
else
err = 0;
+
Py_DECREF(res);
+ Py_DECREF(exc);
if (err < 0)
goto error;
@@ -2867,8 +3265,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
Py_INCREF(self);
func = PyMethod_GET_FUNCTION(func);
Py_INCREF(func);
- Py_DECREF(*pfunc);
- *pfunc = self;
+ Py_SETREF(*pfunc, self);
na++;
/* n++; */
} else
@@ -2923,6 +3320,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
PyObject *anns = PyDict_New();
if (anns == NULL) {
Py_DECREF(func);
+ Py_DECREF(names);
goto error;
}
name_ix = PyTuple_Size(names);
@@ -2938,9 +3336,11 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
if (err != 0) {
Py_DECREF(anns);
Py_DECREF(func);
+ Py_DECREF(names);
goto error;
}
}
+ Py_DECREF(names);
if (PyFunction_SetAnnotations(func, anns) != 0) {
/* Can't happen unless
@@ -2950,7 +3350,6 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
goto error;
}
Py_DECREF(anns);
- Py_DECREF(names);
}
/* XXX Maybe this should be a separate opcode? */
@@ -3026,6 +3425,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
goto dispatch_opcode;
}
+
#if USE_COMPUTED_GOTOS
_unknown_opcode:
#endif
@@ -3168,11 +3568,10 @@ fast_block_end:
if (why != WHY_RETURN)
retval = NULL;
- assert((retval != NULL && !PyErr_Occurred())
- || (retval == NULL && PyErr_Occurred()));
+ assert((retval != NULL) ^ (PyErr_Occurred() != NULL));
fast_yield:
- if (co->co_flags & CO_GENERATOR) {
+ if (co->co_flags & (CO_GENERATOR | CO_COROUTINE)) {
/* The purpose of this block is to put aside the generator's exception
state and restore that of the calling frame. If the current
@@ -3230,7 +3629,7 @@ exit_eval_frame:
f->f_executing = 0;
tstate->frame = f->f_back;
- return retval;
+ return _Py_CheckFunctionResult(NULL, retval, "PyEval_EvalFrameEx");
}
static void
@@ -3387,10 +3786,11 @@ too_many_positional(PyCodeObject *co, int given, int defcount, PyObject **fastlo
PyEval_EvalFrame() and PyEval_EvalCodeEx() you will need to adjust
the test in the if statements in Misc/gdbinit (pystack and pystackv). */
-PyObject *
-PyEval_EvalCodeEx(PyObject *_co, PyObject *globals, PyObject *locals,
+static PyObject *
+_PyEval_EvalCodeWithName(PyObject *_co, PyObject *globals, PyObject *locals,
PyObject **args, int argcount, PyObject **kws, int kwcount,
- PyObject **defs, int defcount, PyObject *kwdefs, PyObject *closure)
+ PyObject **defs, int defcount, PyObject *kwdefs, PyObject *closure,
+ PyObject *name, PyObject *qualname)
{
PyCodeObject* co = (PyCodeObject*)_co;
PyFrameObject *f;
@@ -3573,7 +3973,21 @@ PyEval_EvalCodeEx(PyObject *_co, PyObject *globals, PyObject *locals,
freevars[PyTuple_GET_SIZE(co->co_cellvars) + i] = o;
}
- if (co->co_flags & CO_GENERATOR) {
+ if (co->co_flags & (CO_GENERATOR | CO_COROUTINE)) {
+ PyObject *gen;
+ PyObject *coro_wrapper = tstate->coroutine_wrapper;
+ int is_coro = co->co_flags & CO_COROUTINE;
+
+ if (is_coro && tstate->in_coroutine_wrapper) {
+ assert(coro_wrapper != NULL);
+ PyErr_Format(PyExc_RuntimeError,
+ "coroutine wrapper %.200R attempted "
+ "to recursively wrap %.200R",
+ coro_wrapper,
+ co);
+ goto fail;
+ }
+
/* Don't need to keep the reference to f_back, it will be set
* when the generator is resumed. */
Py_CLEAR(f->f_back);
@@ -3582,7 +3996,23 @@ PyEval_EvalCodeEx(PyObject *_co, PyObject *globals, PyObject *locals,
/* Create a new generator that owns the ready to run frame
* and return that as the value. */
- return PyGen_New(f);
+ if (is_coro) {
+ gen = PyCoro_New(f, name, qualname);
+ } else {
+ gen = PyGen_NewWithQualName(f, name, qualname);
+ }
+ if (gen == NULL)
+ return NULL;
+
+ if (is_coro && coro_wrapper != NULL) {
+ PyObject *wrapped;
+ tstate->in_coroutine_wrapper = 1;
+ wrapped = PyObject_CallFunction(coro_wrapper, "N", gen);
+ tstate->in_coroutine_wrapper = 0;
+ return wrapped;
+ }
+
+ return gen;
}
retval = PyEval_EvalFrameEx(f,0);
@@ -3601,6 +4031,16 @@ fail: /* Jump here from prelude on failure */
return retval;
}
+PyObject *
+PyEval_EvalCodeEx(PyObject *_co, PyObject *globals, PyObject *locals,
+ PyObject **args, int argcount, PyObject **kws, int kwcount,
+ PyObject **defs, int defcount, PyObject *kwdefs, PyObject *closure)
+{
+ return _PyEval_EvalCodeWithName(_co, globals, locals,
+ args, argcount, kws, kwcount,
+ defs, defcount, kwdefs, closure,
+ NULL, NULL);
+}
static PyObject *
special_lookup(PyObject *o, _Py_Identifier *id)
@@ -3791,9 +4231,17 @@ unpack_iterable(PyObject *v, int argcnt, int argcntafter, PyObject **sp)
if (w == NULL) {
/* Iterator done, via error or exhaustion. */
if (!PyErr_Occurred()) {
- PyErr_Format(PyExc_ValueError,
- "need more than %d value%s to unpack",
- i, i == 1 ? "" : "s");
+ if (argcntafter == -1) {
+ PyErr_Format(PyExc_ValueError,
+ "not enough values to unpack (expected %d, got %d)",
+ argcnt, i);
+ }
+ else {
+ PyErr_Format(PyExc_ValueError,
+ "not enough values to unpack "
+ "(expected at least %d, got %d)",
+ argcnt + argcntafter, i);
+ }
}
goto Error;
}
@@ -3810,8 +4258,9 @@ unpack_iterable(PyObject *v, int argcnt, int argcntafter, PyObject **sp)
return 1;
}
Py_DECREF(w);
- PyErr_Format(PyExc_ValueError, "too many values to unpack "
- "(expected %d)", argcnt);
+ PyErr_Format(PyExc_ValueError,
+ "too many values to unpack (expected %d)",
+ argcnt);
goto Error;
}
@@ -3823,8 +4272,9 @@ unpack_iterable(PyObject *v, int argcnt, int argcntafter, PyObject **sp)
ll = PyList_GET_SIZE(l);
if (ll < argcntafter) {
- PyErr_Format(PyExc_ValueError, "need more than %zd values to unpack",
- argcnt + ll);
+ PyErr_Format(PyExc_ValueError,
+ "not enough values to unpack (expected at least %d, got %zd)",
+ argcnt + argcntafter, argcnt + ll);
goto Error;
}
@@ -4008,6 +4458,22 @@ PyEval_SetTrace(Py_tracefunc func, PyObject *arg)
|| (tstate->c_profilefunc != NULL));
}
+void
+_PyEval_SetCoroutineWrapper(PyObject *wrapper)
+{
+ PyThreadState *tstate = PyThreadState_GET();
+
+ Py_XINCREF(wrapper);
+ Py_XSETREF(tstate->coroutine_wrapper, wrapper);
+}
+
+PyObject *
+_PyEval_GetCoroutineWrapper(void)
+{
+ PyThreadState *tstate = PyThreadState_GET();
+ return tstate->coroutine_wrapper;
+}
+
PyObject *
PyEval_GetBuiltins(void)
{
@@ -4086,8 +4552,8 @@ PyEval_CallObjectWithKeywords(PyObject *func, PyObject *arg, PyObject *kw)
#ifdef Py_DEBUG
/* PyEval_CallObjectWithKeywords() must not be called with an exception
- set, because it may clear it (directly or indirectly)
- and so the caller loses its exception */
+ set. It raises a new exception if parameters are invalid or if
+ PyTuple_New() fails, and so the original exception is lost. */
assert(!PyErr_Occurred());
#endif
@@ -4114,8 +4580,6 @@ PyEval_CallObjectWithKeywords(PyObject *func, PyObject *arg, PyObject *kw)
result = PyObject_Call(func, arg, kw);
Py_DECREF(arg);
- assert((result != NULL && !PyErr_Occurred())
- || (result == NULL && PyErr_Occurred()));
return result;
}
@@ -4218,11 +4682,15 @@ call_function(PyObject ***pp_stack, int oparg
PyObject *self = PyCFunction_GET_SELF(func);
if (flags & METH_NOARGS && na == 0) {
C_TRACE(x, (*meth)(self,NULL));
+
+ x = _Py_CheckFunctionResult(func, x, NULL);
}
else if (flags & METH_O && na == 1) {
PyObject *arg = EXT_POP(*pp_stack);
C_TRACE(x, (*meth)(self,arg));
Py_DECREF(arg);
+
+ x = _Py_CheckFunctionResult(func, x, NULL);
}
else {
err_args(func, flags, na);
@@ -4242,7 +4710,8 @@ call_function(PyObject ***pp_stack, int oparg
x = NULL;
}
}
- } else {
+ }
+ else {
if (PyMethod_Check(func) && PyMethod_GET_SELF(func) != NULL) {
/* optimize access to bound methods */
PyObject *self = PyMethod_GET_SELF(func);
@@ -4251,8 +4720,7 @@ call_function(PyObject ***pp_stack, int oparg
Py_INCREF(self);
func = PyMethod_GET_FUNCTION(func);
Py_INCREF(func);
- Py_DECREF(*pfunc);
- *pfunc = self;
+ Py_SETREF(*pfunc, self);
na++;
n++;
} else
@@ -4264,9 +4732,9 @@ call_function(PyObject ***pp_stack, int oparg
x = do_call(func, pp_stack, na, nk);
READ_TIMESTAMP(*pintr1);
Py_DECREF(func);
+
+ assert((x != NULL) ^ (PyErr_Occurred() != NULL));
}
- assert((x != NULL && !PyErr_Occurred())
- || (x == NULL && PyErr_Occurred()));
/* Clear the stack of the function object. Also removes
the arguments in case they weren't consumed already
@@ -4278,8 +4746,7 @@ call_function(PyObject ***pp_stack, int oparg
PCALL(PCALL_POP);
}
- assert((x != NULL && !PyErr_Occurred())
- || (x == NULL && PyErr_Occurred()));
+ assert((x != NULL) ^ (PyErr_Occurred() != NULL));
return x;
}
@@ -4299,6 +4766,8 @@ fast_function(PyObject *func, PyObject ***pp_stack, int n, int na, int nk)
PyObject *globals = PyFunction_GET_GLOBALS(func);
PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
PyObject *kwdefs = PyFunction_GET_KW_DEFAULTS(func);
+ PyObject *name = ((PyFunctionObject *)func) -> func_name;
+ PyObject *qualname = ((PyFunctionObject *)func) -> func_qualname;
PyObject **d = NULL;
int nd = 0;
@@ -4341,10 +4810,11 @@ fast_function(PyObject *func, PyObject ***pp_stack, int n, int na, int nk)
d = &PyTuple_GET_ITEM(argdefs, 0);
nd = Py_SIZE(argdefs);
}
- return PyEval_EvalCodeEx((PyObject*)co, globals,
- (PyObject *)NULL, (*pp_stack)-n, na,
- (*pp_stack)-2*nk, nk, d, nd, kwdefs,
- PyFunction_GET_CLOSURE(func));
+ return _PyEval_EvalCodeWithName((PyObject*)co, globals,
+ (PyObject *)NULL, (*pp_stack)-n, na,
+ (*pp_stack)-2*nk, nk, d, nd, kwdefs,
+ PyFunction_GET_CLOSURE(func),
+ name, qualname);
}
static PyObject *
@@ -4508,20 +4978,28 @@ ext_do_call(PyObject *func, PyObject ***pp_stack, int flags, int na, int nk)
kwdict = d;
}
}
+ if (nk > 0) {
+ kwdict = update_keyword_args(kwdict, nk, pp_stack, func);
+ if (kwdict == NULL)
+ goto ext_call_fail;
+ }
+
if (flags & CALL_FLAG_VAR) {
stararg = EXT_POP(*pp_stack);
if (!PyTuple_Check(stararg)) {
PyObject *t = NULL;
+ if (Py_TYPE(stararg)->tp_iter == NULL &&
+ !PySequence_Check(stararg)) {
+ PyErr_Format(PyExc_TypeError,
+ "%.200s%.200s argument after * "
+ "must be an iterable, not %.200s",
+ PyEval_GetFuncName(func),
+ PyEval_GetFuncDesc(func),
+ stararg->ob_type->tp_name);
+ goto ext_call_fail;
+ }
t = PySequence_Tuple(stararg);
if (t == NULL) {
- if (PyErr_ExceptionMatches(PyExc_TypeError)) {
- PyErr_Format(PyExc_TypeError,
- "%.200s%.200s argument after * "
- "must be a sequence, not %.200s",
- PyEval_GetFuncName(func),
- PyEval_GetFuncDesc(func),
- stararg->ob_type->tp_name);
- }
goto ext_call_fail;
}
Py_DECREF(stararg);
@@ -4529,11 +5007,6 @@ ext_do_call(PyObject *func, PyObject ***pp_stack, int flags, int na, int nk)
}
nstar = PyTuple_GET_SIZE(stararg);
}
- if (nk > 0) {
- kwdict = update_keyword_args(kwdict, nk, pp_stack, func);
- if (kwdict == NULL)
- goto ext_call_fail;
- }
callargs = update_star_args(na, nstar, stararg, pp_stack);
if (callargs == NULL)
goto ext_call_fail;
@@ -4563,12 +5036,10 @@ ext_call_fail:
Py_XDECREF(callargs);
Py_XDECREF(kwdict);
Py_XDECREF(stararg);
- assert((result != NULL && !PyErr_Occurred())
- || (result == NULL && PyErr_Occurred()));
return result;
}
-/* Extract a slice index from a PyInt or PyLong or an object with the
+/* Extract a slice index from a PyLong or an object with the
nb_index slot defined, and store in *pi.
Silently reduce values larger than PY_SSIZE_T_MAX to PY_SSIZE_T_MAX,
and silently boost values less than -PY_SSIZE_T_MAX-1 to -PY_SSIZE_T_MAX-1.
@@ -4658,12 +5129,35 @@ static PyObject *
import_from(PyObject *v, PyObject *name)
{
PyObject *x;
+ _Py_IDENTIFIER(__name__);
+ PyObject *fullmodname, *pkgname;
x = PyObject_GetAttr(v, name);
- if (x == NULL && PyErr_ExceptionMatches(PyExc_AttributeError)) {
- PyErr_Format(PyExc_ImportError, "cannot import name %R", name);
+ if (x != NULL || !PyErr_ExceptionMatches(PyExc_AttributeError))
+ return x;
+ /* Issue #17636: in case this failed because of a circular relative
+ import, try to fallback on reading the module directly from
+ sys.modules. */
+ PyErr_Clear();
+ pkgname = _PyObject_GetAttrId(v, &PyId___name__);
+ if (pkgname == NULL) {
+ goto error;
+ }
+ fullmodname = PyUnicode_FromFormat("%U.%U", pkgname, name);
+ Py_DECREF(pkgname);
+ if (fullmodname == NULL) {
+ return NULL;
+ }
+ x = PyDict_GetItem(PyImport_GetModuleDict(), fullmodname);
+ Py_DECREF(fullmodname);
+ if (x == NULL) {
+ goto error;
}
+ Py_INCREF(x);
return x;
+ error:
+ PyErr_Format(PyExc_ImportError, "cannot import name %R", name);
+ return NULL;
}
static int
diff --git a/Python/ceval_gil.h b/Python/ceval_gil.h
index 2702d5cbdd..8d38ee9dfc 100644
--- a/Python/ceval_gil.h
+++ b/Python/ceval_gil.h
@@ -31,7 +31,7 @@ static unsigned long gil_interval = DEFAULT_INTERVAL;
variable (gil_drop_request) is used for that purpose, which is checked
at every turn of the eval loop. That variable is set after a wait of
`interval` microseconds on `gil_cond` has timed out.
-
+
[Actually, another volatile boolean variable (eval_breaker) is used
which ORs several conditions into one. Volatile booleans are
sufficient as inter-thread signalling means since Python is run
@@ -41,7 +41,7 @@ static unsigned long gil_interval = DEFAULT_INTERVAL;
time (`interval` microseconds) before setting gil_drop_request. This
encourages a defined switching period, but doesn't enforce it since
opcodes can take an arbitrary time to execute.
-
+
The `interval` value is available for the user to read and modify
using the Python API `sys.{get,set}switchinterval()`.
@@ -51,7 +51,7 @@ static unsigned long gil_interval = DEFAULT_INTERVAL;
the value of gil_last_holder is changed to something else than its
own thread state pointer, indicating that another thread was able to
take the GIL.
-
+
This is meant to prohibit the latency-adverse behaviour on multi-core
machines where one thread would speculatively release the GIL, but still
run and end up being the first to re-acquire it, making the "timeslices"
@@ -111,7 +111,7 @@ static _Py_atomic_int gil_locked = {-1};
static unsigned long gil_switch_number = 0;
/* Last PyThreadState holding / having held the GIL. This helps us know
whether anyone else was scheduled after we dropped the GIL. */
-static _Py_atomic_address gil_last_holder = {NULL};
+static _Py_atomic_address gil_last_holder = {0};
/* This condition variable allows one or several threads to wait until
the GIL is released. In addition, the mutex also protects the above
@@ -142,7 +142,7 @@ static void create_gil(void)
#ifdef FORCE_SWITCHING
COND_INIT(switch_cond);
#endif
- _Py_atomic_store_relaxed(&gil_last_holder, NULL);
+ _Py_atomic_store_relaxed(&gil_last_holder, 0);
_Py_ANNOTATE_RWLOCK_CREATE(&gil_locked);
_Py_atomic_store_explicit(&gil_locked, 0, _Py_memory_order_release);
}
@@ -178,7 +178,7 @@ static void drop_gil(PyThreadState *tstate)
/* Sub-interpreter support: threads might have been switched
under our feet using PyThreadState_Swap(). Fix the GIL last
holder variable so that our heuristics work. */
- _Py_atomic_store_relaxed(&gil_last_holder, tstate);
+ _Py_atomic_store_relaxed(&gil_last_holder, (Py_uintptr_t)tstate);
}
MUTEX_LOCK(gil_mutex);
@@ -186,12 +186,12 @@ static void drop_gil(PyThreadState *tstate)
_Py_atomic_store_relaxed(&gil_locked, 0);
COND_SIGNAL(gil_cond);
MUTEX_UNLOCK(gil_mutex);
-
+
#ifdef FORCE_SWITCHING
if (_Py_atomic_load_relaxed(&gil_drop_request) && tstate != NULL) {
MUTEX_LOCK(switch_mutex);
/* Not switched yet => wait */
- if (_Py_atomic_load_relaxed(&gil_last_holder) == tstate) {
+ if ((PyThreadState*)_Py_atomic_load_relaxed(&gil_last_holder) == tstate) {
RESET_GIL_DROP_REQUEST();
/* NOTE: if COND_WAIT does not atomically start waiting when
releasing the mutex, another thread can run through, take
@@ -215,7 +215,7 @@ static void take_gil(PyThreadState *tstate)
if (!_Py_atomic_load_relaxed(&gil_locked))
goto _ready;
-
+
while (_Py_atomic_load_relaxed(&gil_locked)) {
int timed_out = 0;
unsigned long saved_switchnum;
@@ -239,8 +239,8 @@ _ready:
_Py_atomic_store_relaxed(&gil_locked, 1);
_Py_ANNOTATE_RWLOCK_ACQUIRED(&gil_locked, /*is_write=*/1);
- if (tstate != _Py_atomic_load_relaxed(&gil_last_holder)) {
- _Py_atomic_store_relaxed(&gil_last_holder, tstate);
+ if (tstate != (PyThreadState*)_Py_atomic_load_relaxed(&gil_last_holder)) {
+ _Py_atomic_store_relaxed(&gil_last_holder, (Py_uintptr_t)tstate);
++gil_switch_number;
}
@@ -254,7 +254,7 @@ _ready:
if (tstate->async_exc != NULL) {
_PyEval_SignalAsyncExc();
}
-
+
MUTEX_UNLOCK(gil_mutex);
errno = err;
}
diff --git a/Python/clinic/bltinmodule.c.h b/Python/clinic/bltinmodule.c.h
new file mode 100644
index 0000000000..90995e5ac7
--- /dev/null
+++ b/Python/clinic/bltinmodule.c.h
@@ -0,0 +1,663 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(builtin_abs__doc__,
+"abs($module, x, /)\n"
+"--\n"
+"\n"
+"Return the absolute value of the argument.");
+
+#define BUILTIN_ABS_METHODDEF \
+ {"abs", (PyCFunction)builtin_abs, METH_O, builtin_abs__doc__},
+
+PyDoc_STRVAR(builtin_all__doc__,
+"all($module, iterable, /)\n"
+"--\n"
+"\n"
+"Return True if bool(x) is True for all values x in the iterable.\n"
+"\n"
+"If the iterable is empty, return True.");
+
+#define BUILTIN_ALL_METHODDEF \
+ {"all", (PyCFunction)builtin_all, METH_O, builtin_all__doc__},
+
+PyDoc_STRVAR(builtin_any__doc__,
+"any($module, iterable, /)\n"
+"--\n"
+"\n"
+"Return True if bool(x) is True for any x in the iterable.\n"
+"\n"
+"If the iterable is empty, return False.");
+
+#define BUILTIN_ANY_METHODDEF \
+ {"any", (PyCFunction)builtin_any, METH_O, builtin_any__doc__},
+
+PyDoc_STRVAR(builtin_ascii__doc__,
+"ascii($module, obj, /)\n"
+"--\n"
+"\n"
+"Return an ASCII-only representation of an object.\n"
+"\n"
+"As repr(), return a string containing a printable representation of an\n"
+"object, but escape the non-ASCII characters in the string returned by\n"
+"repr() using \\\\x, \\\\u or \\\\U escapes. This generates a string similar\n"
+"to that returned by repr() in Python 2.");
+
+#define BUILTIN_ASCII_METHODDEF \
+ {"ascii", (PyCFunction)builtin_ascii, METH_O, builtin_ascii__doc__},
+
+PyDoc_STRVAR(builtin_bin__doc__,
+"bin($module, number, /)\n"
+"--\n"
+"\n"
+"Return the binary representation of an integer.\n"
+"\n"
+" >>> bin(2796202)\n"
+" \'0b1010101010101010101010\'");
+
+#define BUILTIN_BIN_METHODDEF \
+ {"bin", (PyCFunction)builtin_bin, METH_O, builtin_bin__doc__},
+
+PyDoc_STRVAR(builtin_callable__doc__,
+"callable($module, obj, /)\n"
+"--\n"
+"\n"
+"Return whether the object is callable (i.e., some kind of function).\n"
+"\n"
+"Note that classes are callable, as are instances of classes with a\n"
+"__call__() method.");
+
+#define BUILTIN_CALLABLE_METHODDEF \
+ {"callable", (PyCFunction)builtin_callable, METH_O, builtin_callable__doc__},
+
+PyDoc_STRVAR(builtin_format__doc__,
+"format($module, value, format_spec=\'\', /)\n"
+"--\n"
+"\n"
+"Return value.__format__(format_spec)\n"
+"\n"
+"format_spec defaults to the empty string");
+
+#define BUILTIN_FORMAT_METHODDEF \
+ {"format", (PyCFunction)builtin_format, METH_VARARGS, builtin_format__doc__},
+
+static PyObject *
+builtin_format_impl(PyModuleDef *module, PyObject *value,
+ PyObject *format_spec);
+
+static PyObject *
+builtin_format(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *value;
+ PyObject *format_spec = NULL;
+
+ if (!PyArg_ParseTuple(args, "O|U:format",
+ &value, &format_spec))
+ goto exit;
+ return_value = builtin_format_impl(module, value, format_spec);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(builtin_chr__doc__,
+"chr($module, i, /)\n"
+"--\n"
+"\n"
+"Return a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff.");
+
+#define BUILTIN_CHR_METHODDEF \
+ {"chr", (PyCFunction)builtin_chr, METH_O, builtin_chr__doc__},
+
+static PyObject *
+builtin_chr_impl(PyModuleDef *module, int i);
+
+static PyObject *
+builtin_chr(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ int i;
+
+ if (!PyArg_Parse(arg, "i:chr", &i))
+ goto exit;
+ return_value = builtin_chr_impl(module, i);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(builtin_compile__doc__,
+"compile($module, /, source, filename, mode, flags=0,\n"
+" dont_inherit=False, optimize=-1)\n"
+"--\n"
+"\n"
+"Compile source into a code object that can be executed by exec() or eval().\n"
+"\n"
+"The source code may represent a Python module, statement or expression.\n"
+"The filename will be used for run-time error messages.\n"
+"The mode must be \'exec\' to compile a module, \'single\' to compile a\n"
+"single (interactive) statement, or \'eval\' to compile an expression.\n"
+"The flags argument, if present, controls which future statements influence\n"
+"the compilation of the code.\n"
+"The dont_inherit argument, if true, stops the compilation inheriting\n"
+"the effects of any future statements in effect in the code calling\n"
+"compile; if absent or false these statements do influence the compilation,\n"
+"in addition to any features explicitly specified.");
+
+#define BUILTIN_COMPILE_METHODDEF \
+ {"compile", (PyCFunction)builtin_compile, METH_VARARGS|METH_KEYWORDS, builtin_compile__doc__},
+
+static PyObject *
+builtin_compile_impl(PyModuleDef *module, PyObject *source,
+ PyObject *filename, const char *mode, int flags,
+ int dont_inherit, int optimize);
+
+static PyObject *
+builtin_compile(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+{
+ PyObject *return_value = NULL;
+ static char *_keywords[] = {"source", "filename", "mode", "flags", "dont_inherit", "optimize", NULL};
+ PyObject *source;
+ PyObject *filename;
+ const char *mode;
+ int flags = 0;
+ int dont_inherit = 0;
+ int optimize = -1;
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO&s|iii:compile", _keywords,
+ &source, PyUnicode_FSDecoder, &filename, &mode, &flags, &dont_inherit, &optimize))
+ goto exit;
+ return_value = builtin_compile_impl(module, source, filename, mode, flags, dont_inherit, optimize);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(builtin_divmod__doc__,
+"divmod($module, x, y, /)\n"
+"--\n"
+"\n"
+"Return the tuple (x//y, x%y). Invariant: div*y + mod == x.");
+
+#define BUILTIN_DIVMOD_METHODDEF \
+ {"divmod", (PyCFunction)builtin_divmod, METH_VARARGS, builtin_divmod__doc__},
+
+static PyObject *
+builtin_divmod_impl(PyModuleDef *module, PyObject *x, PyObject *y);
+
+static PyObject *
+builtin_divmod(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *x;
+ PyObject *y;
+
+ if (!PyArg_UnpackTuple(args, "divmod",
+ 2, 2,
+ &x, &y))
+ goto exit;
+ return_value = builtin_divmod_impl(module, x, y);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(builtin_eval__doc__,
+"eval($module, source, globals=None, locals=None, /)\n"
+"--\n"
+"\n"
+"Evaluate the given source in the context of globals and locals.\n"
+"\n"
+"The source may be a string representing a Python expression\n"
+"or a code object as returned by compile().\n"
+"The globals must be a dictionary and locals can be any mapping,\n"
+"defaulting to the current globals and locals.\n"
+"If only globals is given, locals defaults to it.");
+
+#define BUILTIN_EVAL_METHODDEF \
+ {"eval", (PyCFunction)builtin_eval, METH_VARARGS, builtin_eval__doc__},
+
+static PyObject *
+builtin_eval_impl(PyModuleDef *module, PyObject *source, PyObject *globals,
+ PyObject *locals);
+
+static PyObject *
+builtin_eval(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *source;
+ PyObject *globals = Py_None;
+ PyObject *locals = Py_None;
+
+ if (!PyArg_UnpackTuple(args, "eval",
+ 1, 3,
+ &source, &globals, &locals))
+ goto exit;
+ return_value = builtin_eval_impl(module, source, globals, locals);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(builtin_exec__doc__,
+"exec($module, source, globals=None, locals=None, /)\n"
+"--\n"
+"\n"
+"Execute the given source in the context of globals and locals.\n"
+"\n"
+"The source may be a string representing one or more Python statements\n"
+"or a code object as returned by compile().\n"
+"The globals must be a dictionary and locals can be any mapping,\n"
+"defaulting to the current globals and locals.\n"
+"If only globals is given, locals defaults to it.");
+
+#define BUILTIN_EXEC_METHODDEF \
+ {"exec", (PyCFunction)builtin_exec, METH_VARARGS, builtin_exec__doc__},
+
+static PyObject *
+builtin_exec_impl(PyModuleDef *module, PyObject *source, PyObject *globals,
+ PyObject *locals);
+
+static PyObject *
+builtin_exec(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *source;
+ PyObject *globals = Py_None;
+ PyObject *locals = Py_None;
+
+ if (!PyArg_UnpackTuple(args, "exec",
+ 1, 3,
+ &source, &globals, &locals))
+ goto exit;
+ return_value = builtin_exec_impl(module, source, globals, locals);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(builtin_globals__doc__,
+"globals($module, /)\n"
+"--\n"
+"\n"
+"Return the dictionary containing the current scope\'s global variables.\n"
+"\n"
+"NOTE: Updates to this dictionary *will* affect name lookups in the current\n"
+"global scope and vice-versa.");
+
+#define BUILTIN_GLOBALS_METHODDEF \
+ {"globals", (PyCFunction)builtin_globals, METH_NOARGS, builtin_globals__doc__},
+
+static PyObject *
+builtin_globals_impl(PyModuleDef *module);
+
+static PyObject *
+builtin_globals(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return builtin_globals_impl(module);
+}
+
+PyDoc_STRVAR(builtin_hasattr__doc__,
+"hasattr($module, obj, name, /)\n"
+"--\n"
+"\n"
+"Return whether the object has an attribute with the given name.\n"
+"\n"
+"This is done by calling getattr(obj, name) and catching AttributeError.");
+
+#define BUILTIN_HASATTR_METHODDEF \
+ {"hasattr", (PyCFunction)builtin_hasattr, METH_VARARGS, builtin_hasattr__doc__},
+
+static PyObject *
+builtin_hasattr_impl(PyModuleDef *module, PyObject *obj, PyObject *name);
+
+static PyObject *
+builtin_hasattr(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *obj;
+ PyObject *name;
+
+ if (!PyArg_UnpackTuple(args, "hasattr",
+ 2, 2,
+ &obj, &name))
+ goto exit;
+ return_value = builtin_hasattr_impl(module, obj, name);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(builtin_id__doc__,
+"id($module, obj, /)\n"
+"--\n"
+"\n"
+"Return the identity of an object.\n"
+"\n"
+"This is guaranteed to be unique among simultaneously existing objects.\n"
+"(CPython uses the object\'s memory address.)");
+
+#define BUILTIN_ID_METHODDEF \
+ {"id", (PyCFunction)builtin_id, METH_O, builtin_id__doc__},
+
+PyDoc_STRVAR(builtin_setattr__doc__,
+"setattr($module, obj, name, value, /)\n"
+"--\n"
+"\n"
+"Sets the named attribute on the given object to the specified value.\n"
+"\n"
+"setattr(x, \'y\', v) is equivalent to ``x.y = v\'\'");
+
+#define BUILTIN_SETATTR_METHODDEF \
+ {"setattr", (PyCFunction)builtin_setattr, METH_VARARGS, builtin_setattr__doc__},
+
+static PyObject *
+builtin_setattr_impl(PyModuleDef *module, PyObject *obj, PyObject *name,
+ PyObject *value);
+
+static PyObject *
+builtin_setattr(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *obj;
+ PyObject *name;
+ PyObject *value;
+
+ if (!PyArg_UnpackTuple(args, "setattr",
+ 3, 3,
+ &obj, &name, &value))
+ goto exit;
+ return_value = builtin_setattr_impl(module, obj, name, value);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(builtin_delattr__doc__,
+"delattr($module, obj, name, /)\n"
+"--\n"
+"\n"
+"Deletes the named attribute from the given object.\n"
+"\n"
+"delattr(x, \'y\') is equivalent to ``del x.y\'\'");
+
+#define BUILTIN_DELATTR_METHODDEF \
+ {"delattr", (PyCFunction)builtin_delattr, METH_VARARGS, builtin_delattr__doc__},
+
+static PyObject *
+builtin_delattr_impl(PyModuleDef *module, PyObject *obj, PyObject *name);
+
+static PyObject *
+builtin_delattr(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *obj;
+ PyObject *name;
+
+ if (!PyArg_UnpackTuple(args, "delattr",
+ 2, 2,
+ &obj, &name))
+ goto exit;
+ return_value = builtin_delattr_impl(module, obj, name);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(builtin_hash__doc__,
+"hash($module, obj, /)\n"
+"--\n"
+"\n"
+"Return the hash value for the given object.\n"
+"\n"
+"Two objects that compare equal must also have the same hash value, but the\n"
+"reverse is not necessarily true.");
+
+#define BUILTIN_HASH_METHODDEF \
+ {"hash", (PyCFunction)builtin_hash, METH_O, builtin_hash__doc__},
+
+PyDoc_STRVAR(builtin_hex__doc__,
+"hex($module, number, /)\n"
+"--\n"
+"\n"
+"Return the hexadecimal representation of an integer.\n"
+"\n"
+" >>> hex(12648430)\n"
+" \'0xc0ffee\'");
+
+#define BUILTIN_HEX_METHODDEF \
+ {"hex", (PyCFunction)builtin_hex, METH_O, builtin_hex__doc__},
+
+PyDoc_STRVAR(builtin_len__doc__,
+"len($module, obj, /)\n"
+"--\n"
+"\n"
+"Return the number of items in a container.");
+
+#define BUILTIN_LEN_METHODDEF \
+ {"len", (PyCFunction)builtin_len, METH_O, builtin_len__doc__},
+
+PyDoc_STRVAR(builtin_locals__doc__,
+"locals($module, /)\n"
+"--\n"
+"\n"
+"Return a dictionary containing the current scope\'s local variables.\n"
+"\n"
+"NOTE: Whether or not updates to this dictionary will affect name lookups in\n"
+"the local scope and vice-versa is *implementation dependent* and not\n"
+"covered by any backwards compatibility guarantees.");
+
+#define BUILTIN_LOCALS_METHODDEF \
+ {"locals", (PyCFunction)builtin_locals, METH_NOARGS, builtin_locals__doc__},
+
+static PyObject *
+builtin_locals_impl(PyModuleDef *module);
+
+static PyObject *
+builtin_locals(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return builtin_locals_impl(module);
+}
+
+PyDoc_STRVAR(builtin_oct__doc__,
+"oct($module, number, /)\n"
+"--\n"
+"\n"
+"Return the octal representation of an integer.\n"
+"\n"
+" >>> oct(342391)\n"
+" \'0o1234567\'");
+
+#define BUILTIN_OCT_METHODDEF \
+ {"oct", (PyCFunction)builtin_oct, METH_O, builtin_oct__doc__},
+
+PyDoc_STRVAR(builtin_ord__doc__,
+"ord($module, c, /)\n"
+"--\n"
+"\n"
+"Return the Unicode code point for a one-character string.");
+
+#define BUILTIN_ORD_METHODDEF \
+ {"ord", (PyCFunction)builtin_ord, METH_O, builtin_ord__doc__},
+
+PyDoc_STRVAR(builtin_pow__doc__,
+"pow($module, x, y, z=None, /)\n"
+"--\n"
+"\n"
+"Equivalent to x**y (with two arguments) or x**y % z (with three arguments)\n"
+"\n"
+"Some types, such as ints, are able to use a more efficient algorithm when\n"
+"invoked using the three argument form.");
+
+#define BUILTIN_POW_METHODDEF \
+ {"pow", (PyCFunction)builtin_pow, METH_VARARGS, builtin_pow__doc__},
+
+static PyObject *
+builtin_pow_impl(PyModuleDef *module, PyObject *x, PyObject *y, PyObject *z);
+
+static PyObject *
+builtin_pow(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *x;
+ PyObject *y;
+ PyObject *z = Py_None;
+
+ if (!PyArg_UnpackTuple(args, "pow",
+ 2, 3,
+ &x, &y, &z))
+ goto exit;
+ return_value = builtin_pow_impl(module, x, y, z);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(builtin_input__doc__,
+"input($module, prompt=None, /)\n"
+"--\n"
+"\n"
+"Read a string from standard input. The trailing newline is stripped.\n"
+"\n"
+"The prompt string, if given, is printed to standard output without a\n"
+"trailing newline before reading input.\n"
+"\n"
+"If the user hits EOF (*nix: Ctrl-D, Windows: Ctrl-Z+Return), raise EOFError.\n"
+"On *nix systems, readline is used if available.");
+
+#define BUILTIN_INPUT_METHODDEF \
+ {"input", (PyCFunction)builtin_input, METH_VARARGS, builtin_input__doc__},
+
+static PyObject *
+builtin_input_impl(PyModuleDef *module, PyObject *prompt);
+
+static PyObject *
+builtin_input(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *prompt = NULL;
+
+ if (!PyArg_UnpackTuple(args, "input",
+ 0, 1,
+ &prompt))
+ goto exit;
+ return_value = builtin_input_impl(module, prompt);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(builtin_repr__doc__,
+"repr($module, obj, /)\n"
+"--\n"
+"\n"
+"Return the canonical string representation of the object.\n"
+"\n"
+"For many object types, including most builtins, eval(repr(obj)) == obj.");
+
+#define BUILTIN_REPR_METHODDEF \
+ {"repr", (PyCFunction)builtin_repr, METH_O, builtin_repr__doc__},
+
+PyDoc_STRVAR(builtin_sum__doc__,
+"sum($module, iterable, start=0, /)\n"
+"--\n"
+"\n"
+"Return the sum of a \'start\' value (default: 0) plus an iterable of numbers\n"
+"\n"
+"When the iterable is empty, return the start value.\n"
+"This function is intended specifically for use with numeric values and may\n"
+"reject non-numeric types.");
+
+#define BUILTIN_SUM_METHODDEF \
+ {"sum", (PyCFunction)builtin_sum, METH_VARARGS, builtin_sum__doc__},
+
+static PyObject *
+builtin_sum_impl(PyModuleDef *module, PyObject *iterable, PyObject *start);
+
+static PyObject *
+builtin_sum(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *iterable;
+ PyObject *start = NULL;
+
+ if (!PyArg_UnpackTuple(args, "sum",
+ 1, 2,
+ &iterable, &start))
+ goto exit;
+ return_value = builtin_sum_impl(module, iterable, start);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(builtin_isinstance__doc__,
+"isinstance($module, obj, class_or_tuple, /)\n"
+"--\n"
+"\n"
+"Return whether an object is an instance of a class or of a subclass thereof.\n"
+"\n"
+"A tuple, as in ``isinstance(x, (A, B, ...))``, may be given as the target to\n"
+"check against. This is equivalent to ``isinstance(x, A) or isinstance(x, B)\n"
+"or ...`` etc.");
+
+#define BUILTIN_ISINSTANCE_METHODDEF \
+ {"isinstance", (PyCFunction)builtin_isinstance, METH_VARARGS, builtin_isinstance__doc__},
+
+static PyObject *
+builtin_isinstance_impl(PyModuleDef *module, PyObject *obj,
+ PyObject *class_or_tuple);
+
+static PyObject *
+builtin_isinstance(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *obj;
+ PyObject *class_or_tuple;
+
+ if (!PyArg_UnpackTuple(args, "isinstance",
+ 2, 2,
+ &obj, &class_or_tuple))
+ goto exit;
+ return_value = builtin_isinstance_impl(module, obj, class_or_tuple);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(builtin_issubclass__doc__,
+"issubclass($module, cls, class_or_tuple, /)\n"
+"--\n"
+"\n"
+"Return whether \'cls\' is a derived from another class or is the same class.\n"
+"\n"
+"A tuple, as in ``issubclass(x, (A, B, ...))``, may be given as the target to\n"
+"check against. This is equivalent to ``issubclass(x, A) or issubclass(x, B)\n"
+"or ...`` etc.");
+
+#define BUILTIN_ISSUBCLASS_METHODDEF \
+ {"issubclass", (PyCFunction)builtin_issubclass, METH_VARARGS, builtin_issubclass__doc__},
+
+static PyObject *
+builtin_issubclass_impl(PyModuleDef *module, PyObject *cls,
+ PyObject *class_or_tuple);
+
+static PyObject *
+builtin_issubclass(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *cls;
+ PyObject *class_or_tuple;
+
+ if (!PyArg_UnpackTuple(args, "issubclass",
+ 2, 2,
+ &cls, &class_or_tuple))
+ goto exit;
+ return_value = builtin_issubclass_impl(module, cls, class_or_tuple);
+
+exit:
+ return return_value;
+}
+/*[clinic end generated code: output=4bef16b6aa432879 input=a9049054013a1b77]*/
diff --git a/Python/clinic/import.c.h b/Python/clinic/import.c.h
new file mode 100644
index 0000000000..247766519e
--- /dev/null
+++ b/Python/clinic/import.c.h
@@ -0,0 +1,355 @@
+/*[clinic input]
+preserve
+[clinic start generated code]*/
+
+PyDoc_STRVAR(_imp_lock_held__doc__,
+"lock_held($module, /)\n"
+"--\n"
+"\n"
+"Return True if the import lock is currently held, else False.\n"
+"\n"
+"On platforms without threads, return False.");
+
+#define _IMP_LOCK_HELD_METHODDEF \
+ {"lock_held", (PyCFunction)_imp_lock_held, METH_NOARGS, _imp_lock_held__doc__},
+
+static PyObject *
+_imp_lock_held_impl(PyModuleDef *module);
+
+static PyObject *
+_imp_lock_held(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return _imp_lock_held_impl(module);
+}
+
+PyDoc_STRVAR(_imp_acquire_lock__doc__,
+"acquire_lock($module, /)\n"
+"--\n"
+"\n"
+"Acquires the interpreter\'s import lock for the current thread.\n"
+"\n"
+"This lock should be used by import hooks to ensure thread-safety when importing\n"
+"modules. On platforms without threads, this function does nothing.");
+
+#define _IMP_ACQUIRE_LOCK_METHODDEF \
+ {"acquire_lock", (PyCFunction)_imp_acquire_lock, METH_NOARGS, _imp_acquire_lock__doc__},
+
+static PyObject *
+_imp_acquire_lock_impl(PyModuleDef *module);
+
+static PyObject *
+_imp_acquire_lock(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return _imp_acquire_lock_impl(module);
+}
+
+PyDoc_STRVAR(_imp_release_lock__doc__,
+"release_lock($module, /)\n"
+"--\n"
+"\n"
+"Release the interpreter\'s import lock.\n"
+"\n"
+"On platforms without threads, this function does nothing.");
+
+#define _IMP_RELEASE_LOCK_METHODDEF \
+ {"release_lock", (PyCFunction)_imp_release_lock, METH_NOARGS, _imp_release_lock__doc__},
+
+static PyObject *
+_imp_release_lock_impl(PyModuleDef *module);
+
+static PyObject *
+_imp_release_lock(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return _imp_release_lock_impl(module);
+}
+
+PyDoc_STRVAR(_imp__fix_co_filename__doc__,
+"_fix_co_filename($module, code, path, /)\n"
+"--\n"
+"\n"
+"Changes code.co_filename to specify the passed-in file path.\n"
+"\n"
+" code\n"
+" Code object to change.\n"
+" path\n"
+" File path to use.");
+
+#define _IMP__FIX_CO_FILENAME_METHODDEF \
+ {"_fix_co_filename", (PyCFunction)_imp__fix_co_filename, METH_VARARGS, _imp__fix_co_filename__doc__},
+
+static PyObject *
+_imp__fix_co_filename_impl(PyModuleDef *module, PyCodeObject *code,
+ PyObject *path);
+
+static PyObject *
+_imp__fix_co_filename(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyCodeObject *code;
+ PyObject *path;
+
+ if (!PyArg_ParseTuple(args, "O!U:_fix_co_filename",
+ &PyCode_Type, &code, &path))
+ goto exit;
+ return_value = _imp__fix_co_filename_impl(module, code, path);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_imp_create_builtin__doc__,
+"create_builtin($module, spec, /)\n"
+"--\n"
+"\n"
+"Create an extension module.");
+
+#define _IMP_CREATE_BUILTIN_METHODDEF \
+ {"create_builtin", (PyCFunction)_imp_create_builtin, METH_O, _imp_create_builtin__doc__},
+
+PyDoc_STRVAR(_imp_extension_suffixes__doc__,
+"extension_suffixes($module, /)\n"
+"--\n"
+"\n"
+"Returns the list of file suffixes used to identify extension modules.");
+
+#define _IMP_EXTENSION_SUFFIXES_METHODDEF \
+ {"extension_suffixes", (PyCFunction)_imp_extension_suffixes, METH_NOARGS, _imp_extension_suffixes__doc__},
+
+static PyObject *
+_imp_extension_suffixes_impl(PyModuleDef *module);
+
+static PyObject *
+_imp_extension_suffixes(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+{
+ return _imp_extension_suffixes_impl(module);
+}
+
+PyDoc_STRVAR(_imp_init_frozen__doc__,
+"init_frozen($module, name, /)\n"
+"--\n"
+"\n"
+"Initializes a frozen module.");
+
+#define _IMP_INIT_FROZEN_METHODDEF \
+ {"init_frozen", (PyCFunction)_imp_init_frozen, METH_O, _imp_init_frozen__doc__},
+
+static PyObject *
+_imp_init_frozen_impl(PyModuleDef *module, PyObject *name);
+
+static PyObject *
+_imp_init_frozen(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ PyObject *name;
+
+ if (!PyArg_Parse(arg, "U:init_frozen", &name))
+ goto exit;
+ return_value = _imp_init_frozen_impl(module, name);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_imp_get_frozen_object__doc__,
+"get_frozen_object($module, name, /)\n"
+"--\n"
+"\n"
+"Create a code object for a frozen module.");
+
+#define _IMP_GET_FROZEN_OBJECT_METHODDEF \
+ {"get_frozen_object", (PyCFunction)_imp_get_frozen_object, METH_O, _imp_get_frozen_object__doc__},
+
+static PyObject *
+_imp_get_frozen_object_impl(PyModuleDef *module, PyObject *name);
+
+static PyObject *
+_imp_get_frozen_object(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ PyObject *name;
+
+ if (!PyArg_Parse(arg, "U:get_frozen_object", &name))
+ goto exit;
+ return_value = _imp_get_frozen_object_impl(module, name);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_imp_is_frozen_package__doc__,
+"is_frozen_package($module, name, /)\n"
+"--\n"
+"\n"
+"Returns True if the module name is of a frozen package.");
+
+#define _IMP_IS_FROZEN_PACKAGE_METHODDEF \
+ {"is_frozen_package", (PyCFunction)_imp_is_frozen_package, METH_O, _imp_is_frozen_package__doc__},
+
+static PyObject *
+_imp_is_frozen_package_impl(PyModuleDef *module, PyObject *name);
+
+static PyObject *
+_imp_is_frozen_package(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ PyObject *name;
+
+ if (!PyArg_Parse(arg, "U:is_frozen_package", &name))
+ goto exit;
+ return_value = _imp_is_frozen_package_impl(module, name);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_imp_is_builtin__doc__,
+"is_builtin($module, name, /)\n"
+"--\n"
+"\n"
+"Returns True if the module name corresponds to a built-in module.");
+
+#define _IMP_IS_BUILTIN_METHODDEF \
+ {"is_builtin", (PyCFunction)_imp_is_builtin, METH_O, _imp_is_builtin__doc__},
+
+static PyObject *
+_imp_is_builtin_impl(PyModuleDef *module, PyObject *name);
+
+static PyObject *
+_imp_is_builtin(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ PyObject *name;
+
+ if (!PyArg_Parse(arg, "U:is_builtin", &name))
+ goto exit;
+ return_value = _imp_is_builtin_impl(module, name);
+
+exit:
+ return return_value;
+}
+
+PyDoc_STRVAR(_imp_is_frozen__doc__,
+"is_frozen($module, name, /)\n"
+"--\n"
+"\n"
+"Returns True if the module name corresponds to a frozen module.");
+
+#define _IMP_IS_FROZEN_METHODDEF \
+ {"is_frozen", (PyCFunction)_imp_is_frozen, METH_O, _imp_is_frozen__doc__},
+
+static PyObject *
+_imp_is_frozen_impl(PyModuleDef *module, PyObject *name);
+
+static PyObject *
+_imp_is_frozen(PyModuleDef *module, PyObject *arg)
+{
+ PyObject *return_value = NULL;
+ PyObject *name;
+
+ if (!PyArg_Parse(arg, "U:is_frozen", &name))
+ goto exit;
+ return_value = _imp_is_frozen_impl(module, name);
+
+exit:
+ return return_value;
+}
+
+#if defined(HAVE_DYNAMIC_LOADING)
+
+PyDoc_STRVAR(_imp_create_dynamic__doc__,
+"create_dynamic($module, spec, file=None, /)\n"
+"--\n"
+"\n"
+"Create an extension module.");
+
+#define _IMP_CREATE_DYNAMIC_METHODDEF \
+ {"create_dynamic", (PyCFunction)_imp_create_dynamic, METH_VARARGS, _imp_create_dynamic__doc__},
+
+static PyObject *
+_imp_create_dynamic_impl(PyModuleDef *module, PyObject *spec, PyObject *file);
+
+static PyObject *
+_imp_create_dynamic(PyModuleDef *module, PyObject *args)
+{
+ PyObject *return_value = NULL;
+ PyObject *spec;
+ PyObject *file = NULL;
+
+ if (!PyArg_UnpackTuple(args, "create_dynamic",
+ 1, 2,
+ &spec, &file))
+ goto exit;
+ return_value = _imp_create_dynamic_impl(module, spec, file);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_DYNAMIC_LOADING) */
+
+#if defined(HAVE_DYNAMIC_LOADING)
+
+PyDoc_STRVAR(_imp_exec_dynamic__doc__,
+"exec_dynamic($module, mod, /)\n"
+"--\n"
+"\n"
+"Initialize an extension module.");
+
+#define _IMP_EXEC_DYNAMIC_METHODDEF \
+ {"exec_dynamic", (PyCFunction)_imp_exec_dynamic, METH_O, _imp_exec_dynamic__doc__},
+
+static int
+_imp_exec_dynamic_impl(PyModuleDef *module, PyObject *mod);
+
+static PyObject *
+_imp_exec_dynamic(PyModuleDef *module, PyObject *mod)
+{
+ PyObject *return_value = NULL;
+ int _return_value;
+
+ _return_value = _imp_exec_dynamic_impl(module, mod);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromLong((long)_return_value);
+
+exit:
+ return return_value;
+}
+
+#endif /* defined(HAVE_DYNAMIC_LOADING) */
+
+PyDoc_STRVAR(_imp_exec_builtin__doc__,
+"exec_builtin($module, mod, /)\n"
+"--\n"
+"\n"
+"Initialize a built-in module.");
+
+#define _IMP_EXEC_BUILTIN_METHODDEF \
+ {"exec_builtin", (PyCFunction)_imp_exec_builtin, METH_O, _imp_exec_builtin__doc__},
+
+static int
+_imp_exec_builtin_impl(PyModuleDef *module, PyObject *mod);
+
+static PyObject *
+_imp_exec_builtin(PyModuleDef *module, PyObject *mod)
+{
+ PyObject *return_value = NULL;
+ int _return_value;
+
+ _return_value = _imp_exec_builtin_impl(module, mod);
+ if ((_return_value == -1) && PyErr_Occurred())
+ goto exit;
+ return_value = PyLong_FromLong((long)_return_value);
+
+exit:
+ return return_value;
+}
+
+#ifndef _IMP_CREATE_DYNAMIC_METHODDEF
+ #define _IMP_CREATE_DYNAMIC_METHODDEF
+#endif /* !defined(_IMP_CREATE_DYNAMIC_METHODDEF) */
+
+#ifndef _IMP_EXEC_DYNAMIC_METHODDEF
+ #define _IMP_EXEC_DYNAMIC_METHODDEF
+#endif /* !defined(_IMP_EXEC_DYNAMIC_METHODDEF) */
+/*[clinic end generated code: output=32324a5e46cdfc4b input=a9049054013a1b77]*/
diff --git a/Python/codecs.c b/Python/codecs.c
index 27f2aebf82..fe57d0dc42 100644
--- a/Python/codecs.c
+++ b/Python/codecs.c
@@ -9,6 +9,7 @@ Copyright (c) Corporation for National Research Initiatives.
------------------------------------------------------------------------ */
#include "Python.h"
+#include "ucnhash.h"
#include <ctype.h>
const char *Py_hexdigits = "0123456789abcdef";
@@ -402,7 +403,7 @@ wrap_codec_error(const char *operation,
operation, encoding);
}
-/* Encode an object (e.g. an Unicode object) using the given encoding
+/* Encode an object (e.g. a Unicode object) using the given encoding
and return the resulting encoded object (usually a Python string).
errors is passed to the encoder factory as argument if non-NULL. */
@@ -449,7 +450,7 @@ _PyCodec_EncodeInternal(PyObject *object,
}
/* Decode an object (usually a Python string) using the given encoding
- and return an equivalent object (e.g. an Unicode object).
+ and return an equivalent object (e.g. a Unicode object).
errors is passed to the decoder factory as argument if non-NULL. */
@@ -856,6 +857,118 @@ PyObject *PyCodec_XMLCharRefReplaceErrors(PyObject *exc)
PyObject *PyCodec_BackslashReplaceErrors(PyObject *exc)
{
+ PyObject *object;
+ Py_ssize_t i;
+ Py_ssize_t start;
+ Py_ssize_t end;
+ PyObject *res;
+ unsigned char *outp;
+ int ressize;
+ Py_UCS4 c;
+
+ if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeDecodeError)) {
+ unsigned char *p;
+ if (PyUnicodeDecodeError_GetStart(exc, &start))
+ return NULL;
+ if (PyUnicodeDecodeError_GetEnd(exc, &end))
+ return NULL;
+ if (!(object = PyUnicodeDecodeError_GetObject(exc)))
+ return NULL;
+ if (!(p = (unsigned char*)PyBytes_AsString(object))) {
+ Py_DECREF(object);
+ return NULL;
+ }
+ res = PyUnicode_New(4 * (end - start), 127);
+ if (res == NULL) {
+ Py_DECREF(object);
+ return NULL;
+ }
+ outp = PyUnicode_1BYTE_DATA(res);
+ for (i = start; i < end; i++, outp += 4) {
+ unsigned char c = p[i];
+ outp[0] = '\\';
+ outp[1] = 'x';
+ outp[2] = Py_hexdigits[(c>>4)&0xf];
+ outp[3] = Py_hexdigits[c&0xf];
+ }
+
+ assert(_PyUnicode_CheckConsistency(res, 1));
+ Py_DECREF(object);
+ return Py_BuildValue("(Nn)", res, end);
+ }
+ if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeEncodeError)) {
+ if (PyUnicodeEncodeError_GetStart(exc, &start))
+ return NULL;
+ if (PyUnicodeEncodeError_GetEnd(exc, &end))
+ return NULL;
+ if (!(object = PyUnicodeEncodeError_GetObject(exc)))
+ return NULL;
+ }
+ else if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeTranslateError)) {
+ if (PyUnicodeTranslateError_GetStart(exc, &start))
+ return NULL;
+ if (PyUnicodeTranslateError_GetEnd(exc, &end))
+ return NULL;
+ if (!(object = PyUnicodeTranslateError_GetObject(exc)))
+ return NULL;
+ }
+ else {
+ wrong_exception_type(exc);
+ return NULL;
+ }
+
+ if (end - start > PY_SSIZE_T_MAX / (1+1+8))
+ end = start + PY_SSIZE_T_MAX / (1+1+8);
+ for (i = start, ressize = 0; i < end; ++i) {
+ /* object is guaranteed to be "ready" */
+ c = PyUnicode_READ_CHAR(object, i);
+ if (c >= 0x10000) {
+ ressize += 1+1+8;
+ }
+ else if (c >= 0x100) {
+ ressize += 1+1+4;
+ }
+ else
+ ressize += 1+1+2;
+ }
+ res = PyUnicode_New(ressize, 127);
+ if (res == NULL) {
+ Py_DECREF(object);
+ return NULL;
+ }
+ outp = PyUnicode_1BYTE_DATA(res);
+ for (i = start; i < end; ++i) {
+ c = PyUnicode_READ_CHAR(object, i);
+ *outp++ = '\\';
+ if (c >= 0x00010000) {
+ *outp++ = 'U';
+ *outp++ = Py_hexdigits[(c>>28)&0xf];
+ *outp++ = Py_hexdigits[(c>>24)&0xf];
+ *outp++ = Py_hexdigits[(c>>20)&0xf];
+ *outp++ = Py_hexdigits[(c>>16)&0xf];
+ *outp++ = Py_hexdigits[(c>>12)&0xf];
+ *outp++ = Py_hexdigits[(c>>8)&0xf];
+ }
+ else if (c >= 0x100) {
+ *outp++ = 'u';
+ *outp++ = Py_hexdigits[(c>>12)&0xf];
+ *outp++ = Py_hexdigits[(c>>8)&0xf];
+ }
+ else
+ *outp++ = 'x';
+ *outp++ = Py_hexdigits[(c>>4)&0xf];
+ *outp++ = Py_hexdigits[c&0xf];
+ }
+
+ assert(_PyUnicode_CheckConsistency(res, 1));
+ Py_DECREF(object);
+ return Py_BuildValue("(Nn)", res, end);
+}
+
+static _PyUnicode_Name_CAPI *ucnhash_CAPI = NULL;
+
+PyObject *PyCodec_NameReplaceErrors(PyObject *exc)
+{
if (PyObject_TypeCheck(exc, (PyTypeObject *)PyExc_UnicodeEncodeError)) {
PyObject *restuple;
PyObject *object;
@@ -865,36 +978,56 @@ PyObject *PyCodec_BackslashReplaceErrors(PyObject *exc)
PyObject *res;
unsigned char *outp;
Py_ssize_t ressize;
+ int replsize;
Py_UCS4 c;
+ char buffer[256]; /* NAME_MAXLEN */
if (PyUnicodeEncodeError_GetStart(exc, &start))
return NULL;
if (PyUnicodeEncodeError_GetEnd(exc, &end))
return NULL;
if (!(object = PyUnicodeEncodeError_GetObject(exc)))
return NULL;
- if (end - start > PY_SSIZE_T_MAX / (1+1+8))
- end = start + PY_SSIZE_T_MAX / (1+1+8);
+ if (!ucnhash_CAPI) {
+ /* load the unicode data module */
+ ucnhash_CAPI = (_PyUnicode_Name_CAPI *)PyCapsule_Import(
+ PyUnicodeData_CAPSULE_NAME, 1);
+ if (!ucnhash_CAPI)
+ return NULL;
+ }
for (i = start, ressize = 0; i < end; ++i) {
/* object is guaranteed to be "ready" */
c = PyUnicode_READ_CHAR(object, i);
- if (c >= 0x10000) {
- ressize += 1+1+8;
+ if (ucnhash_CAPI->getname(NULL, c, buffer, sizeof(buffer), 1)) {
+ replsize = 1+1+1+(int)strlen(buffer)+1;
+ }
+ else if (c >= 0x10000) {
+ replsize = 1+1+8;
}
else if (c >= 0x100) {
- ressize += 1+1+4;
+ replsize = 1+1+4;
}
else
- ressize += 1+1+2;
+ replsize = 1+1+2;
+ if (ressize > PY_SSIZE_T_MAX - replsize)
+ break;
+ ressize += replsize;
}
+ end = i;
res = PyUnicode_New(ressize, 127);
- if (res == NULL) {
- Py_DECREF(object);
+ if (res==NULL)
return NULL;
- }
for (i = start, outp = PyUnicode_1BYTE_DATA(res);
i < end; ++i) {
c = PyUnicode_READ_CHAR(object, i);
*outp++ = '\\';
+ if (ucnhash_CAPI->getname(NULL, c, buffer, sizeof(buffer), 1)) {
+ *outp++ = 'N';
+ *outp++ = '{';
+ strcpy((char *)outp, buffer);
+ outp += strlen(buffer);
+ *outp++ = '}';
+ continue;
+ }
if (c >= 0x00010000) {
*outp++ = 'U';
*outp++ = Py_hexdigits[(c>>28)&0xf];
@@ -915,6 +1048,7 @@ PyObject *PyCodec_BackslashReplaceErrors(PyObject *exc)
*outp++ = Py_hexdigits[c&0xf];
}
+ assert(outp == PyUnicode_1BYTE_DATA(res) + ressize);
assert(_PyUnicode_CheckConsistency(res, 1));
restuple = Py_BuildValue("(Nn)", res, end);
Py_DECREF(object);
@@ -926,6 +1060,7 @@ PyObject *PyCodec_BackslashReplaceErrors(PyObject *exc)
}
}
+#define ENC_UNKNOWN -1
#define ENC_UTF8 0
#define ENC_UTF16BE 1
#define ENC_UTF16LE 2
@@ -941,7 +1076,11 @@ get_standard_encoding(const char *encoding, int *bytelength)
encoding += 3;
if (*encoding == '-' || *encoding == '_' )
encoding++;
- if (encoding[0] == '1' && encoding[1] == '6') {
+ if (encoding[0] == '8' && encoding[1] == '\0') {
+ *bytelength = 3;
+ return ENC_UTF8;
+ }
+ else if (encoding[0] == '1' && encoding[1] == '6') {
encoding += 2;
*bytelength = 2;
if (*encoding == '\0') {
@@ -980,9 +1119,11 @@ get_standard_encoding(const char *encoding, int *bytelength)
}
}
}
- /* utf-8 */
- *bytelength = 3;
- return ENC_UTF8;
+ else if (strcmp(encoding, "CP_UTF8") == 0) {
+ *bytelength = 3;
+ return ENC_UTF8;
+ }
+ return ENC_UNKNOWN;
}
/* This handler is declared static until someone demonstrates
@@ -1020,6 +1161,12 @@ PyCodec_SurrogatePassErrors(PyObject *exc)
}
code = get_standard_encoding(encoding, &bytelength);
Py_DECREF(encode);
+ if (code == ENC_UNKNOWN) {
+ /* Not supported, fail with original exception */
+ PyErr_SetObject(PyExceptionInstance_Class(exc), exc);
+ Py_DECREF(object);
+ return NULL;
+ }
if (end - start > PY_SSIZE_T_MAX / bytelength)
end = start + PY_SSIZE_T_MAX / bytelength;
@@ -1096,6 +1243,12 @@ PyCodec_SurrogatePassErrors(PyObject *exc)
}
code = get_standard_encoding(encoding, &bytelength);
Py_DECREF(encode);
+ if (code == ENC_UNKNOWN) {
+ /* Not supported, fail with original exception */
+ PyErr_SetObject(PyExceptionInstance_Class(exc), exc);
+ Py_DECREF(object);
+ return NULL;
+ }
/* Try decoding a single surrogate character. If
there are more, let the codec call us again. */
@@ -1252,6 +1405,11 @@ static PyObject *backslashreplace_errors(PyObject *self, PyObject *exc)
return PyCodec_BackslashReplaceErrors(exc);
}
+static PyObject *namereplace_errors(PyObject *self, PyObject *exc)
+{
+ return PyCodec_NameReplaceErrors(exc);
+}
+
static PyObject *surrogatepass_errors(PyObject *self, PyObject *exc)
{
return PyCodec_SurrogatePassErrors(exc);
@@ -1317,8 +1475,19 @@ static int _PyCodecRegistry_Init(void)
backslashreplace_errors,
METH_O,
PyDoc_STR("Implements the 'backslashreplace' error handling, "
+ "which replaces malformed data with a backslashed "
+ "escape sequence.")
+ }
+ },
+ {
+ "namereplace",
+ {
+ "namereplace_errors",
+ namereplace_errors,
+ METH_O,
+ PyDoc_STR("Implements the 'namereplace' error handling, "
"which replaces an unencodable character with a "
- "backslashed escape sequence.")
+ "\\N{...} escape sequence.")
}
},
{
diff --git a/Python/compile.c b/Python/compile.c
index ff6248782b..1e720eab0d 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -30,8 +30,6 @@
#include "symtable.h"
#include "opcode.h"
-int Py_OptimizeFlag = 0;
-
#define DEFAULT_BLOCK_SIZE 16
#define DEFAULT_BLOCKS 8
#define DEFAULT_CODE_SIZE 128
@@ -94,6 +92,7 @@ enum {
COMPILER_SCOPE_MODULE,
COMPILER_SCOPE_CLASS,
COMPILER_SCOPE_FUNCTION,
+ COMPILER_SCOPE_ASYNC_FUNCTION,
COMPILER_SCOPE_LAMBDA,
COMPILER_SCOPE_COMPREHENSION,
};
@@ -195,11 +194,11 @@ static int inplace_binop(struct compiler *, operator_ty);
static int expr_constant(struct compiler *, expr_ty);
static int compiler_with(struct compiler *, stmt_ty, int);
+static int compiler_async_with(struct compiler *, stmt_ty, int);
+static int compiler_async_for(struct compiler *, stmt_ty);
static int compiler_call_helper(struct compiler *c, Py_ssize_t n,
asdl_seq *args,
- asdl_seq *keywords,
- expr_ty starargs,
- expr_ty kwargs);
+ asdl_seq *keywords);
static int compiler_try_except(struct compiler *, stmt_ty);
static int compiler_set_qualname(struct compiler *);
@@ -394,7 +393,7 @@ list2dict(PyObject *list)
return NULL;
}
k = PyList_GET_ITEM(list, i);
- k = PyTuple_Pack(2, k, k->ob_type);
+ k = _PyCode_ConstantKey(k);
if (k == NULL || PyDict_SetItem(dict, k, v) < 0) {
Py_XDECREF(k);
Py_DECREF(v);
@@ -457,7 +456,7 @@ dictbytype(PyObject *src, int scope_type, int flag, Py_ssize_t offset)
return NULL;
}
i++;
- tuple = PyTuple_Pack(2, k, k->ob_type);
+ tuple = _PyCode_ConstantKey(k);
if (!tuple || PyDict_SetItem(dest, tuple, item) < 0) {
Py_DECREF(sorted_keys);
Py_DECREF(item);
@@ -560,7 +559,7 @@ compiler_enter_scope(struct compiler *c, identifier name,
compiler_unit_free(u);
return 0;
}
- tuple = PyTuple_Pack(2, name, Py_TYPE(name));
+ tuple = _PyCode_ConstantKey(name);
if (!tuple) {
compiler_unit_free(u);
return 0;
@@ -677,7 +676,9 @@ compiler_set_qualname(struct compiler *c)
parent = (struct compiler_unit *)PyCapsule_GetPointer(capsule, CAPSULE_NAME);
assert(parent);
- if (u->u_scope_type == COMPILER_SCOPE_FUNCTION || u->u_scope_type == COMPILER_SCOPE_CLASS) {
+ if (u->u_scope_type == COMPILER_SCOPE_FUNCTION
+ || u->u_scope_type == COMPILER_SCOPE_ASYNC_FUNCTION
+ || u->u_scope_type == COMPILER_SCOPE_CLASS) {
assert(u->u_name);
mangled = _Py_Mangle(parent->u_private, u->u_name);
if (!mangled)
@@ -691,6 +692,7 @@ compiler_set_qualname(struct compiler *c)
if (!force_global) {
if (parent->u_scope_type == COMPILER_SCOPE_FUNCTION
+ || parent->u_scope_type == COMPILER_SCOPE_ASYNC_FUNCTION
|| parent->u_scope_type == COMPILER_SCOPE_LAMBDA) {
dot_locals_str = _PyUnicode_FromId(&dot_locals);
if (dot_locals_str == NULL)
@@ -881,6 +883,7 @@ PyCompile_OpcodeStackEffect(int opcode, int oparg)
case BINARY_POWER:
case BINARY_MULTIPLY:
+ case BINARY_MATRIX_MULTIPLY:
case BINARY_MODULO:
case BINARY_ADD:
case BINARY_SUBTRACT:
@@ -895,12 +898,11 @@ PyCompile_OpcodeStackEffect(int opcode, int oparg)
case INPLACE_ADD:
case INPLACE_SUBTRACT:
case INPLACE_MULTIPLY:
+ case INPLACE_MATRIX_MULTIPLY:
case INPLACE_MODULO:
return -1;
case STORE_SUBSCR:
return -3;
- case STORE_MAP:
- return -2;
case DELETE_SUBSCR:
return -2;
@@ -929,7 +931,9 @@ PyCompile_OpcodeStackEffect(int opcode, int oparg)
return 0;
case SETUP_WITH:
return 7;
- case WITH_CLEANUP:
+ case WITH_CLEANUP_START:
+ return 1;
+ case WITH_CLEANUP_FINISH:
return -1; /* XXX Sometimes more */
case RETURN_VALUE:
return -1;
@@ -973,8 +977,15 @@ PyCompile_OpcodeStackEffect(int opcode, int oparg)
case BUILD_LIST:
case BUILD_SET:
return 1-oparg;
+ case BUILD_LIST_UNPACK:
+ case BUILD_TUPLE_UNPACK:
+ case BUILD_SET_UNPACK:
+ case BUILD_MAP_UNPACK:
+ return 1 - oparg;
+ case BUILD_MAP_UNPACK_WITH_CALL:
+ return 1 - (oparg & 0xFF);
case BUILD_MAP:
- return 1;
+ return 1 - 2*oparg;
case LOAD_ATTR:
return 0;
case COMPARE_OP:
@@ -1043,6 +1054,18 @@ PyCompile_OpcodeStackEffect(int opcode, int oparg)
return -1;
case DELETE_DEREF:
return 0;
+ case GET_AWAITABLE:
+ return 0;
+ case SETUP_ASYNC_WITH:
+ return 6;
+ case BEFORE_ASYNC_WITH:
+ return 1;
+ case GET_AITER:
+ return 0;
+ case GET_ANEXT:
+ return 1;
+ case GET_YIELD_FROM_ITER:
+ return 0;
default:
return PY_INVALID_STACK_EFFECT;
}
@@ -1077,54 +1100,17 @@ compiler_add_o(struct compiler *c, PyObject *dict, PyObject *o)
{
PyObject *t, *v;
Py_ssize_t arg;
- double d;
-
- /* necessary to make sure types aren't coerced (e.g., float and complex) */
- /* _and_ to distinguish 0.0 from -0.0 e.g. on IEEE platforms */
- if (PyFloat_Check(o)) {
- d = PyFloat_AS_DOUBLE(o);
- /* all we need is to make the tuple different in either the 0.0
- * or -0.0 case from all others, just to avoid the "coercion".
- */
- if (d == 0.0 && copysign(1.0, d) < 0.0)
- t = PyTuple_Pack(3, o, o->ob_type, Py_None);
- else
- t = PyTuple_Pack(2, o, o->ob_type);
- }
- else if (PyComplex_Check(o)) {
- Py_complex z;
- int real_negzero, imag_negzero;
- /* For the complex case we must make complex(x, 0.)
- different from complex(x, -0.) and complex(0., y)
- different from complex(-0., y), for any x and y.
- All four complex zeros must be distinguished.*/
- z = PyComplex_AsCComplex(o);
- real_negzero = z.real == 0.0 && copysign(1.0, z.real) < 0.0;
- imag_negzero = z.imag == 0.0 && copysign(1.0, z.imag) < 0.0;
- if (real_negzero && imag_negzero) {
- t = PyTuple_Pack(5, o, o->ob_type,
- Py_None, Py_None, Py_None);
- }
- else if (imag_negzero) {
- t = PyTuple_Pack(4, o, o->ob_type, Py_None, Py_None);
- }
- else if (real_negzero) {
- t = PyTuple_Pack(3, o, o->ob_type, Py_None);
- }
- else {
- t = PyTuple_Pack(2, o, o->ob_type);
- }
- }
- else {
- t = PyTuple_Pack(2, o, o->ob_type);
- }
+
+ t = _PyCode_ConstantKey(o);
if (t == NULL)
return -1;
v = PyDict_GetItem(dict, t);
if (!v) {
- if (PyErr_Occurred())
+ if (PyErr_Occurred()) {
+ Py_DECREF(t);
return -1;
+ }
arg = PyDict_Size(dict);
v = PyLong_FromSsize_t(arg);
if (!v) {
@@ -1429,7 +1415,7 @@ static int
compiler_lookup_arg(PyObject *dict, PyObject *name)
{
PyObject *k, *v;
- k = PyTuple_Pack(2, name, name->ob_type);
+ k = _PyCode_ConstantKey(name);
if (k == NULL)
return -1;
v = PyDict_GetItem(dict, k);
@@ -1536,32 +1522,31 @@ compiler_visit_argannotation(struct compiler *c, identifier id,
VISIT(c, expr, annotation);
mangled = _Py_Mangle(c->u->u_private, id);
if (!mangled)
- return -1;
+ return 0;
if (PyList_Append(names, mangled) < 0) {
Py_DECREF(mangled);
- return -1;
+ return 0;
}
Py_DECREF(mangled);
}
- return 0;
+ return 1;
}
static int
compiler_visit_argannotations(struct compiler *c, asdl_seq* args,
PyObject *names)
{
- int i, error;
+ int i;
for (i = 0; i < asdl_seq_LEN(args); i++) {
arg_ty arg = (arg_ty)asdl_seq_GET(args, i);
- error = compiler_visit_argannotation(
+ if (!compiler_visit_argannotation(
c,
arg->arg,
arg->annotation,
- names);
- if (error)
- return error;
+ names))
+ return 0;
}
- return 0;
+ return 1;
}
static int
@@ -1581,16 +1566,16 @@ compiler_visit_annotations(struct compiler *c, arguments_ty args,
if (!names)
return -1;
- if (compiler_visit_argannotations(c, args->args, names))
+ if (!compiler_visit_argannotations(c, args->args, names))
goto error;
if (args->vararg && args->vararg->annotation &&
- compiler_visit_argannotation(c, args->vararg->arg,
+ !compiler_visit_argannotation(c, args->vararg->arg,
args->vararg->annotation, names))
goto error;
- if (compiler_visit_argannotations(c, args->kwonlyargs, names))
+ if (!compiler_visit_argannotations(c, args->kwonlyargs, names))
goto error;
if (args->kwarg && args->kwarg->annotation &&
- compiler_visit_argannotation(c, args->kwarg->arg,
+ !compiler_visit_argannotation(c, args->kwarg->arg,
args->kwarg->annotation, names))
goto error;
@@ -1599,7 +1584,7 @@ compiler_visit_annotations(struct compiler *c, arguments_ty args,
if (!return_str)
goto error;
}
- if (compiler_visit_argannotation(c, return_str, returns, names)) {
+ if (!compiler_visit_argannotation(c, return_str, returns, names)) {
goto error;
}
@@ -1637,19 +1622,43 @@ error:
}
static int
-compiler_function(struct compiler *c, stmt_ty s)
+compiler_function(struct compiler *c, stmt_ty s, int is_async)
{
PyCodeObject *co;
PyObject *qualname, *first_const = Py_None;
- arguments_ty args = s->v.FunctionDef.args;
- expr_ty returns = s->v.FunctionDef.returns;
- asdl_seq* decos = s->v.FunctionDef.decorator_list;
+ arguments_ty args;
+ expr_ty returns;
+ identifier name;
+ asdl_seq* decos;
+ asdl_seq *body;
stmt_ty st;
Py_ssize_t i, n, arglength;
int docstring, kw_default_count = 0;
int num_annotations;
+ int scope_type;
- assert(s->kind == FunctionDef_kind);
+
+ if (is_async) {
+ assert(s->kind == AsyncFunctionDef_kind);
+
+ args = s->v.AsyncFunctionDef.args;
+ returns = s->v.AsyncFunctionDef.returns;
+ decos = s->v.AsyncFunctionDef.decorator_list;
+ name = s->v.AsyncFunctionDef.name;
+ body = s->v.AsyncFunctionDef.body;
+
+ scope_type = COMPILER_SCOPE_ASYNC_FUNCTION;
+ } else {
+ assert(s->kind == FunctionDef_kind);
+
+ args = s->v.FunctionDef.args;
+ returns = s->v.FunctionDef.returns;
+ decos = s->v.FunctionDef.decorator_list;
+ name = s->v.FunctionDef.name;
+ body = s->v.FunctionDef.body;
+
+ scope_type = COMPILER_SCOPE_FUNCTION;
+ }
if (!compiler_decorators(c, decos))
return 0;
@@ -1667,12 +1676,12 @@ compiler_function(struct compiler *c, stmt_ty s)
return 0;
assert((num_annotations & 0xFFFF) == num_annotations);
- if (!compiler_enter_scope(c, s->v.FunctionDef.name,
- COMPILER_SCOPE_FUNCTION, (void *)s,
+ if (!compiler_enter_scope(c, name,
+ scope_type, (void *)s,
s->lineno))
return 0;
- st = (stmt_ty)asdl_seq_GET(s->v.FunctionDef.body, 0);
+ st = (stmt_ty)asdl_seq_GET(body, 0);
docstring = compiler_isdocstring(st);
if (docstring && c->c_optimize < 2)
first_const = st->v.Expr.value->v.Str.s;
@@ -1683,10 +1692,10 @@ compiler_function(struct compiler *c, stmt_ty s)
c->u->u_argcount = asdl_seq_LEN(args->args);
c->u->u_kwonlyargcount = asdl_seq_LEN(args->kwonlyargs);
- n = asdl_seq_LEN(s->v.FunctionDef.body);
+ n = asdl_seq_LEN(body);
/* if there was a docstring, we need to skip the first statement */
for (i = docstring; i < n; i++) {
- st = (stmt_ty)asdl_seq_GET(s->v.FunctionDef.body, i);
+ st = (stmt_ty)asdl_seq_GET(body, i);
VISIT_IN_SCOPE(c, stmt, st);
}
co = assemble(c, 1);
@@ -1702,6 +1711,8 @@ compiler_function(struct compiler *c, stmt_ty s)
arglength = asdl_seq_LEN(args->defaults);
arglength |= kw_default_count << 8;
arglength |= num_annotations << 16;
+ if (is_async)
+ co->co_flags |= CO_COROUTINE;
compiler_make_closure(c, co, arglength, qualname);
Py_DECREF(qualname);
Py_DECREF(co);
@@ -1711,7 +1722,7 @@ compiler_function(struct compiler *c, stmt_ty s)
ADDOP_I(c, CALL_FUNCTION, 1);
}
- return compiler_nameop(c, s->v.FunctionDef.name, Store);
+ return compiler_nameop(c, name, Store);
}
static int
@@ -1745,8 +1756,7 @@ compiler_class(struct compiler *c, stmt_ty s)
{
/* use the class name for name mangling */
Py_INCREF(s->v.ClassDef.name);
- Py_XDECREF(c->u->u_private);
- c->u->u_private = s->v.ClassDef.name;
+ Py_XSETREF(c->u->u_private, s->v.ClassDef.name);
/* load (global) __name__ ... */
str = PyUnicode_InternFromString("__name__");
if (!str || !compiler_nameop(c, str, Load)) {
@@ -1821,9 +1831,7 @@ compiler_class(struct compiler *c, stmt_ty s)
/* 5. generate the rest of the code for the call */
if (!compiler_call_helper(c, 2,
s->v.ClassDef.bases,
- s->v.ClassDef.keywords,
- s->v.ClassDef.starargs,
- s->v.ClassDef.kwargs))
+ s->v.ClassDef.keywords))
return 0;
/* 6. apply decorators */
@@ -1938,7 +1946,7 @@ compiler_if(struct compiler *c, stmt_ty s)
} else if (constant == 1) {
VISIT_SEQ(c, stmt, s->v.If.body);
} else {
- if (s->v.If.orelse) {
+ if (asdl_seq_LEN(s->v.If.orelse)) {
next = compiler_new_block(c);
if (next == NULL)
return 0;
@@ -1948,8 +1956,8 @@ compiler_if(struct compiler *c, stmt_ty s)
VISIT(c, expr, s->v.If.test);
ADDOP_JABS(c, POP_JUMP_IF_FALSE, next);
VISIT_SEQ(c, stmt, s->v.If.body);
- ADDOP_JREL(c, JUMP_FORWARD, end);
- if (s->v.If.orelse) {
+ if (asdl_seq_LEN(s->v.If.orelse)) {
+ ADDOP_JREL(c, JUMP_FORWARD, end);
compiler_use_next_block(c, next);
VISIT_SEQ(c, stmt, s->v.If.orelse);
}
@@ -1986,6 +1994,92 @@ compiler_for(struct compiler *c, stmt_ty s)
return 1;
}
+
+static int
+compiler_async_for(struct compiler *c, stmt_ty s)
+{
+ static PyObject *stopiter_error = NULL;
+ basicblock *try, *except, *end, *after_try, *try_cleanup,
+ *after_loop, *after_loop_else;
+
+ if (stopiter_error == NULL) {
+ stopiter_error = PyUnicode_InternFromString("StopAsyncIteration");
+ if (stopiter_error == NULL)
+ return 0;
+ }
+
+ try = compiler_new_block(c);
+ except = compiler_new_block(c);
+ end = compiler_new_block(c);
+ after_try = compiler_new_block(c);
+ try_cleanup = compiler_new_block(c);
+ after_loop = compiler_new_block(c);
+ after_loop_else = compiler_new_block(c);
+
+ if (try == NULL || except == NULL || end == NULL
+ || after_try == NULL || try_cleanup == NULL)
+ return 0;
+
+ ADDOP_JREL(c, SETUP_LOOP, after_loop);
+ if (!compiler_push_fblock(c, LOOP, try))
+ return 0;
+
+ VISIT(c, expr, s->v.AsyncFor.iter);
+ ADDOP(c, GET_AITER);
+ ADDOP_O(c, LOAD_CONST, Py_None, consts);
+ ADDOP(c, YIELD_FROM);
+
+ compiler_use_next_block(c, try);
+
+
+ ADDOP_JREL(c, SETUP_EXCEPT, except);
+ if (!compiler_push_fblock(c, EXCEPT, try))
+ return 0;
+
+ ADDOP(c, GET_ANEXT);
+ ADDOP_O(c, LOAD_CONST, Py_None, consts);
+ ADDOP(c, YIELD_FROM);
+ VISIT(c, expr, s->v.AsyncFor.target);
+ ADDOP(c, POP_BLOCK);
+ compiler_pop_fblock(c, EXCEPT, try);
+ ADDOP_JREL(c, JUMP_FORWARD, after_try);
+
+
+ compiler_use_next_block(c, except);
+ ADDOP(c, DUP_TOP);
+ ADDOP_O(c, LOAD_GLOBAL, stopiter_error, names);
+ ADDOP_I(c, COMPARE_OP, PyCmp_EXC_MATCH);
+ ADDOP_JABS(c, POP_JUMP_IF_FALSE, try_cleanup);
+
+ ADDOP(c, POP_TOP);
+ ADDOP(c, POP_TOP);
+ ADDOP(c, POP_TOP);
+ ADDOP(c, POP_EXCEPT); /* for SETUP_EXCEPT */
+ ADDOP(c, POP_BLOCK); /* for SETUP_LOOP */
+ ADDOP_JABS(c, JUMP_ABSOLUTE, after_loop_else);
+
+
+ compiler_use_next_block(c, try_cleanup);
+ ADDOP(c, END_FINALLY);
+
+ compiler_use_next_block(c, after_try);
+ VISIT_SEQ(c, stmt, s->v.AsyncFor.body);
+ ADDOP_JABS(c, JUMP_ABSOLUTE, try);
+
+ ADDOP(c, POP_BLOCK); /* for SETUP_LOOP */
+ compiler_pop_fblock(c, LOOP, try);
+
+ compiler_use_next_block(c, after_loop);
+ ADDOP_JABS(c, JUMP_ABSOLUTE, end);
+
+ compiler_use_next_block(c, after_loop_else);
+ VISIT_SEQ(c, stmt, s->v.For.orelse);
+
+ compiler_use_next_block(c, end);
+
+ return 1;
+}
+
static int
compiler_while(struct compiler *c, stmt_ty s)
{
@@ -2512,7 +2606,7 @@ compiler_visit_stmt(struct compiler *c, stmt_ty s)
switch (s->kind) {
case FunctionDef_kind:
- return compiler_function(c, s);
+ return compiler_function(c, s, 0);
case ClassDef_kind:
return compiler_class(c, s);
case Return_kind:
@@ -2591,7 +2685,14 @@ compiler_visit_stmt(struct compiler *c, stmt_ty s)
return compiler_continue(c);
case With_kind:
return compiler_with(c, s, 0);
+ case AsyncFunctionDef_kind:
+ return compiler_function(c, s, 1);
+ case AsyncWith_kind:
+ return compiler_async_with(c, s, 0);
+ case AsyncFor_kind:
+ return compiler_async_for(c, s);
}
+
return 1;
}
@@ -2624,6 +2725,8 @@ binop(struct compiler *c, operator_ty op)
return BINARY_SUBTRACT;
case Mult:
return BINARY_MULTIPLY;
+ case MatMult:
+ return BINARY_MATRIX_MULTIPLY;
case Div:
return BINARY_TRUE_DIVIDE;
case Mod:
@@ -2688,6 +2791,8 @@ inplace_binop(struct compiler *c, operator_ty op)
return INPLACE_SUBTRACT;
case Mult:
return INPLACE_MULTIPLY;
+ case MatMult:
+ return INPLACE_MATRIX_MULTIPLY;
case Div:
return INPLACE_TRUE_DIVIDE;
case Mod:
@@ -2749,8 +2854,7 @@ compiler_nameop(struct compiler *c, identifier name, expr_context_ty ctx)
optype = OP_FAST;
break;
case GLOBAL_IMPLICIT:
- if (c->u->u_ste->ste_type == FunctionBlock &&
- !c->u->u_ste->ste_unoptimized)
+ if (c->u->u_ste->ste_type == FunctionBlock)
optype = OP_GLOBAL;
break;
case GLOBAL_EXPLICIT:
@@ -2868,67 +2972,145 @@ compiler_boolop(struct compiler *c, expr_ty e)
}
static int
-compiler_list(struct compiler *c, expr_ty e)
+starunpack_helper(struct compiler *c, asdl_seq *elts,
+ int single_op, int inner_op, int outer_op)
{
- Py_ssize_t n = asdl_seq_LEN(e->v.List.elts);
- if (e->v.List.ctx == Store) {
- int i, seen_star = 0;
- for (i = 0; i < n; i++) {
- expr_ty elt = asdl_seq_GET(e->v.List.elts, i);
- if (elt->kind == Starred_kind && !seen_star) {
- if ((i >= (1 << 8)) ||
- (n-i-1 >= (INT_MAX >> 8)))
- return compiler_error(c,
- "too many expressions in "
- "star-unpacking assignment");
- ADDOP_I(c, UNPACK_EX, (i + ((n-i-1) << 8)));
- seen_star = 1;
- asdl_seq_SET(e->v.List.elts, i, elt->v.Starred.value);
- } else if (elt->kind == Starred_kind) {
- return compiler_error(c,
- "two starred expressions in assignment");
+ Py_ssize_t n = asdl_seq_LEN(elts);
+ Py_ssize_t i, nsubitems = 0, nseen = 0;
+ for (i = 0; i < n; i++) {
+ expr_ty elt = asdl_seq_GET(elts, i);
+ if (elt->kind == Starred_kind) {
+ if (nseen) {
+ ADDOP_I(c, inner_op, nseen);
+ nseen = 0;
+ nsubitems++;
}
+ VISIT(c, expr, elt->v.Starred.value);
+ nsubitems++;
}
- if (!seen_star) {
- ADDOP_I(c, UNPACK_SEQUENCE, n);
+ else {
+ VISIT(c, expr, elt);
+ nseen++;
}
}
- VISIT_SEQ(c, expr, e->v.List.elts);
- if (e->v.List.ctx == Load) {
- ADDOP_I(c, BUILD_LIST, n);
+ if (nsubitems) {
+ if (nseen) {
+ ADDOP_I(c, inner_op, nseen);
+ nsubitems++;
+ }
+ ADDOP_I(c, outer_op, nsubitems);
}
+ else
+ ADDOP_I(c, single_op, nseen);
+ return 1;
+}
+
+static int
+assignment_helper(struct compiler *c, asdl_seq *elts)
+{
+ Py_ssize_t n = asdl_seq_LEN(elts);
+ Py_ssize_t i;
+ int seen_star = 0;
+ for (i = 0; i < n; i++) {
+ expr_ty elt = asdl_seq_GET(elts, i);
+ if (elt->kind == Starred_kind && !seen_star) {
+ if ((i >= (1 << 8)) ||
+ (n-i-1 >= (INT_MAX >> 8)))
+ return compiler_error(c,
+ "too many expressions in "
+ "star-unpacking assignment");
+ ADDOP_I(c, UNPACK_EX, (i + ((n-i-1) << 8)));
+ seen_star = 1;
+ asdl_seq_SET(elts, i, elt->v.Starred.value);
+ }
+ else if (elt->kind == Starred_kind) {
+ return compiler_error(c,
+ "two starred expressions in assignment");
+ }
+ }
+ if (!seen_star) {
+ ADDOP_I(c, UNPACK_SEQUENCE, n);
+ }
+ VISIT_SEQ(c, expr, elts);
+ return 1;
+}
+
+static int
+compiler_list(struct compiler *c, expr_ty e)
+{
+ asdl_seq *elts = e->v.List.elts;
+ if (e->v.List.ctx == Store) {
+ return assignment_helper(c, elts);
+ }
+ else if (e->v.List.ctx == Load) {
+ return starunpack_helper(c, elts,
+ BUILD_LIST, BUILD_TUPLE, BUILD_LIST_UNPACK);
+ }
+ else
+ VISIT_SEQ(c, expr, elts);
return 1;
}
static int
compiler_tuple(struct compiler *c, expr_ty e)
{
- Py_ssize_t n = asdl_seq_LEN(e->v.Tuple.elts);
+ asdl_seq *elts = e->v.Tuple.elts;
if (e->v.Tuple.ctx == Store) {
- int i, seen_star = 0;
- for (i = 0; i < n; i++) {
- expr_ty elt = asdl_seq_GET(e->v.Tuple.elts, i);
- if (elt->kind == Starred_kind && !seen_star) {
- if ((i >= (1 << 8)) ||
- (n-i-1 >= (INT_MAX >> 8)))
- return compiler_error(c,
- "too many expressions in "
- "star-unpacking assignment");
- ADDOP_I(c, UNPACK_EX, (i + ((n-i-1) << 8)));
- seen_star = 1;
- asdl_seq_SET(e->v.Tuple.elts, i, elt->v.Starred.value);
- } else if (elt->kind == Starred_kind) {
- return compiler_error(c,
- "two starred expressions in assignment");
- }
+ return assignment_helper(c, elts);
+ }
+ else if (e->v.Tuple.ctx == Load) {
+ return starunpack_helper(c, elts,
+ BUILD_TUPLE, BUILD_TUPLE, BUILD_TUPLE_UNPACK);
+ }
+ else
+ VISIT_SEQ(c, expr, elts);
+ return 1;
+}
+
+static int
+compiler_set(struct compiler *c, expr_ty e)
+{
+ return starunpack_helper(c, e->v.Set.elts, BUILD_SET,
+ BUILD_SET, BUILD_SET_UNPACK);
+}
+
+static int
+compiler_dict(struct compiler *c, expr_ty e)
+{
+ Py_ssize_t i, n, containers, elements;
+ int is_unpacking = 0;
+ n = asdl_seq_LEN(e->v.Dict.values);
+ containers = 0;
+ elements = 0;
+ for (i = 0; i < n; i++) {
+ is_unpacking = (expr_ty)asdl_seq_GET(e->v.Dict.keys, i) == NULL;
+ if (elements == 0xFFFF || (elements && is_unpacking)) {
+ ADDOP_I(c, BUILD_MAP, elements);
+ containers++;
+ elements = 0;
+ }
+ if (is_unpacking) {
+ VISIT(c, expr, (expr_ty)asdl_seq_GET(e->v.Dict.values, i));
+ containers++;
}
- if (!seen_star) {
- ADDOP_I(c, UNPACK_SEQUENCE, n);
+ else {
+ VISIT(c, expr, (expr_ty)asdl_seq_GET(e->v.Dict.keys, i));
+ VISIT(c, expr, (expr_ty)asdl_seq_GET(e->v.Dict.values, i));
+ elements++;
}
}
- VISIT_SEQ(c, expr, e->v.Tuple.elts);
- if (e->v.Tuple.ctx == Load) {
- ADDOP_I(c, BUILD_TUPLE, n);
+ if (elements || containers == 0) {
+ ADDOP_I(c, BUILD_MAP, elements);
+ containers++;
+ }
+ /* If there is more than one dict, they need to be merged into a new
+ * dict. If there is one dict and it's an unpacking, then it needs
+ * to be copied into a new dict." */
+ while (containers > 1 || is_unpacking) {
+ int oparg = containers < 255 ? containers : 255;
+ ADDOP_I(c, BUILD_MAP_UNPACK, oparg);
+ containers -= (oparg - 1);
+ is_unpacking = 0;
}
return 1;
}
@@ -2984,9 +3166,7 @@ compiler_call(struct compiler *c, expr_ty e)
VISIT(c, expr, e->v.Call.func);
return compiler_call_helper(c, 0,
e->v.Call.args,
- e->v.Call.keywords,
- e->v.Call.starargs,
- e->v.Call.kwargs);
+ e->v.Call.keywords);
}
/* shared code between compiler_call and compiler_class */
@@ -2994,26 +3174,102 @@ static int
compiler_call_helper(struct compiler *c,
Py_ssize_t n, /* Args already pushed */
asdl_seq *args,
- asdl_seq *keywords,
- expr_ty starargs,
- expr_ty kwargs)
+ asdl_seq *keywords)
{
int code = 0;
-
- n += asdl_seq_LEN(args);
- VISIT_SEQ(c, expr, args);
- if (keywords) {
- VISIT_SEQ(c, keyword, keywords);
- n |= asdl_seq_LEN(keywords) << 8;
+ Py_ssize_t nelts, i, nseen, nkw;
+
+ /* the number of tuples and dictionaries on the stack */
+ Py_ssize_t nsubargs = 0, nsubkwargs = 0;
+
+ nkw = 0;
+ nseen = 0; /* the number of positional arguments on the stack */
+ nelts = asdl_seq_LEN(args);
+ for (i = 0; i < nelts; i++) {
+ expr_ty elt = asdl_seq_GET(args, i);
+ if (elt->kind == Starred_kind) {
+ /* A star-arg. If we've seen positional arguments,
+ pack the positional arguments into a
+ tuple. */
+ if (nseen) {
+ ADDOP_I(c, BUILD_TUPLE, nseen);
+ nseen = 0;
+ nsubargs++;
+ }
+ VISIT(c, expr, elt->v.Starred.value);
+ nsubargs++;
+ }
+ else if (nsubargs) {
+ /* We've seen star-args already, so we
+ count towards items-to-pack-into-tuple. */
+ VISIT(c, expr, elt);
+ nseen++;
+ }
+ else {
+ /* Positional arguments before star-arguments
+ are left on the stack. */
+ VISIT(c, expr, elt);
+ n++;
+ }
+ }
+ if (nseen) {
+ /* Pack up any trailing positional arguments. */
+ ADDOP_I(c, BUILD_TUPLE, nseen);
+ nsubargs++;
}
- if (starargs) {
- VISIT(c, expr, starargs);
+ if (nsubargs) {
code |= 1;
+ if (nsubargs > 1) {
+ /* If we ended up with more than one stararg, we need
+ to concatenate them into a single sequence. */
+ ADDOP_I(c, BUILD_LIST_UNPACK, nsubargs);
+ }
+ }
+
+ /* Same dance again for keyword arguments */
+ nseen = 0; /* the number of keyword arguments on the stack following */
+ nelts = asdl_seq_LEN(keywords);
+ for (i = 0; i < nelts; i++) {
+ keyword_ty kw = asdl_seq_GET(keywords, i);
+ if (kw->arg == NULL) {
+ /* A keyword argument unpacking. */
+ if (nseen) {
+ ADDOP_I(c, BUILD_MAP, nseen);
+ nseen = 0;
+ nsubkwargs++;
+ }
+ VISIT(c, expr, kw->value);
+ nsubkwargs++;
+ }
+ else if (nsubkwargs) {
+ /* A keyword argument and we already have a dict. */
+ ADDOP_O(c, LOAD_CONST, kw->arg, consts);
+ VISIT(c, expr, kw->value);
+ nseen++;
+ }
+ else {
+ /* keyword argument */
+ VISIT(c, keyword, kw)
+ nkw++;
+ }
+ }
+ if (nseen) {
+ /* Pack up any trailing keyword arguments. */
+ ADDOP_I(c, BUILD_MAP, nseen);
+ nsubkwargs++;
}
- if (kwargs) {
- VISIT(c, expr, kwargs);
+ if (nsubkwargs) {
code |= 2;
+ if (nsubkwargs > 1) {
+ /* Pack it all up */
+ int function_pos = n + (code & 1) + nkw + 1;
+ ADDOP_I(c, BUILD_MAP_UNPACK_WITH_CALL, nsubkwargs | (function_pos << 8));
+ }
}
+ assert(n < 1<<8);
+ assert(nkw < 1<<24);
+ n |= nkw << 8;
+
switch (code) {
case 0:
ADDOP_I(c, CALL_FUNCTION, n);
@@ -3138,8 +3394,9 @@ compiler_comprehension_generator(struct compiler *c,
}
static int
-compiler_comprehension(struct compiler *c, expr_ty e, int type, identifier name,
- asdl_seq *generators, expr_ty elt, expr_ty val)
+compiler_comprehension(struct compiler *c, expr_ty e, int type,
+ identifier name, asdl_seq *generators, expr_ty elt,
+ expr_ty val)
{
PyCodeObject *co = NULL;
expr_ty outermost_iter;
@@ -3312,6 +3569,102 @@ expr_constant(struct compiler *c, expr_ty e)
}
}
+
+/*
+ Implements the async with statement.
+
+ The semantics outlined in that PEP are as follows:
+
+ async with EXPR as VAR:
+ BLOCK
+
+ It is implemented roughly as:
+
+ context = EXPR
+ exit = context.__aexit__ # not calling it
+ value = await context.__aenter__()
+ try:
+ VAR = value # if VAR present in the syntax
+ BLOCK
+ finally:
+ if an exception was raised:
+ exc = copy of (exception, instance, traceback)
+ else:
+ exc = (None, None, None)
+ if not (await exit(*exc)):
+ raise
+ */
+static int
+compiler_async_with(struct compiler *c, stmt_ty s, int pos)
+{
+ basicblock *block, *finally;
+ withitem_ty item = asdl_seq_GET(s->v.AsyncWith.items, pos);
+
+ assert(s->kind == AsyncWith_kind);
+
+ block = compiler_new_block(c);
+ finally = compiler_new_block(c);
+ if (!block || !finally)
+ return 0;
+
+ /* Evaluate EXPR */
+ VISIT(c, expr, item->context_expr);
+
+ ADDOP(c, BEFORE_ASYNC_WITH);
+ ADDOP(c, GET_AWAITABLE);
+ ADDOP_O(c, LOAD_CONST, Py_None, consts);
+ ADDOP(c, YIELD_FROM);
+
+ ADDOP_JREL(c, SETUP_ASYNC_WITH, finally);
+
+ /* SETUP_ASYNC_WITH pushes a finally block. */
+ compiler_use_next_block(c, block);
+ if (!compiler_push_fblock(c, FINALLY_TRY, block)) {
+ return 0;
+ }
+
+ if (item->optional_vars) {
+ VISIT(c, expr, item->optional_vars);
+ }
+ else {
+ /* Discard result from context.__aenter__() */
+ ADDOP(c, POP_TOP);
+ }
+
+ pos++;
+ if (pos == asdl_seq_LEN(s->v.AsyncWith.items))
+ /* BLOCK code */
+ VISIT_SEQ(c, stmt, s->v.AsyncWith.body)
+ else if (!compiler_async_with(c, s, pos))
+ return 0;
+
+ /* End of try block; start the finally block */
+ ADDOP(c, POP_BLOCK);
+ compiler_pop_fblock(c, FINALLY_TRY, block);
+
+ ADDOP_O(c, LOAD_CONST, Py_None, consts);
+ compiler_use_next_block(c, finally);
+ if (!compiler_push_fblock(c, FINALLY_END, finally))
+ return 0;
+
+ /* Finally block starts; context.__exit__ is on the stack under
+ the exception or return information. Just issue our magic
+ opcode. */
+ ADDOP(c, WITH_CLEANUP_START);
+
+ ADDOP(c, GET_AWAITABLE);
+ ADDOP_O(c, LOAD_CONST, Py_None, consts);
+ ADDOP(c, YIELD_FROM);
+
+ ADDOP(c, WITH_CLEANUP_FINISH);
+
+ /* Finally block ends. */
+ ADDOP(c, END_FINALLY);
+ compiler_pop_fblock(c, FINALLY_END, finally);
+ return 1;
+}
+
+
/*
Implements the with statement from PEP 343.
@@ -3385,7 +3738,8 @@ compiler_with(struct compiler *c, stmt_ty s, int pos)
/* Finally block starts; context.__exit__ is on the stack under
the exception or return information. Just issue our magic
opcode. */
- ADDOP(c, WITH_CLEANUP);
+ ADDOP(c, WITH_CLEANUP_START);
+ ADDOP(c, WITH_CLEANUP_FINISH);
/* Finally block ends. */
ADDOP(c, END_FINALLY);
@@ -3396,8 +3750,6 @@ compiler_with(struct compiler *c, stmt_ty s, int pos)
static int
compiler_visit_expr(struct compiler *c, expr_ty e)
{
- Py_ssize_t i, n;
-
/* If expr e has a different line number than the last expr/stmt,
set a new line number for the next instruction.
*/
@@ -3424,23 +3776,9 @@ compiler_visit_expr(struct compiler *c, expr_ty e)
case IfExp_kind:
return compiler_ifexp(c, e);
case Dict_kind:
- n = asdl_seq_LEN(e->v.Dict.values);
- /* BUILD_MAP parameter is only used to preallocate the dictionary,
- it doesn't need to be exact */
- ADDOP_I(c, BUILD_MAP, (n>0xFFFF ? 0xFFFF : n));
- for (i = 0; i < n; i++) {
- VISIT(c, expr,
- (expr_ty)asdl_seq_GET(e->v.Dict.values, i));
- VISIT(c, expr,
- (expr_ty)asdl_seq_GET(e->v.Dict.keys, i));
- ADDOP(c, STORE_MAP);
- }
- break;
+ return compiler_dict(c, e);
case Set_kind:
- n = asdl_seq_LEN(e->v.Set.elts);
- VISIT_SEQ(c, expr, e->v.Set.elts);
- ADDOP_I(c, BUILD_SET, n);
- break;
+ return compiler_set(c, e);
case GeneratorExp_kind:
return compiler_genexp(c, e);
case ListComp_kind:
@@ -3452,6 +3790,8 @@ compiler_visit_expr(struct compiler *c, expr_ty e)
case Yield_kind:
if (c->u->u_ste->ste_type != FunctionBlock)
return compiler_error(c, "'yield' outside function");
+ if (c->u->u_scope_type == COMPILER_SCOPE_ASYNC_FUNCTION)
+ return compiler_error(c, "'yield' inside async function");
if (e->v.Yield.value) {
VISIT(c, expr, e->v.Yield.value);
}
@@ -3463,8 +3803,28 @@ compiler_visit_expr(struct compiler *c, expr_ty e)
case YieldFrom_kind:
if (c->u->u_ste->ste_type != FunctionBlock)
return compiler_error(c, "'yield' outside function");
+
+ if (c->u->u_scope_type == COMPILER_SCOPE_ASYNC_FUNCTION)
+ return compiler_error(c, "'yield from' inside async function");
+
VISIT(c, expr, e->v.YieldFrom.value);
- ADDOP(c, GET_ITER);
+ ADDOP(c, GET_YIELD_FROM_ITER);
+ ADDOP_O(c, LOAD_CONST, Py_None, consts);
+ ADDOP(c, YIELD_FROM);
+ break;
+ case Await_kind:
+ if (c->u->u_ste->ste_type != FunctionBlock)
+ return compiler_error(c, "'await' outside function");
+
+ if (c->u->u_scope_type == COMPILER_SCOPE_COMPREHENSION)
+ return compiler_error(
+ c, "'await' expressions in comprehensions are not supported");
+
+ if (c->u->u_scope_type != COMPILER_SCOPE_ASYNC_FUNCTION)
+ return compiler_error(c, "'await' outside async function");
+
+ VISIT(c, expr, e->v.Await.value);
+ ADDOP(c, GET_AWAITABLE);
ADDOP_O(c, LOAD_CONST, Py_None, consts);
ADDOP(c, YIELD_FROM);
break;
@@ -3551,7 +3911,7 @@ compiler_visit_expr(struct compiler *c, expr_ty e)
"starred assignment target must be in a list or tuple");
default:
return compiler_error(c,
- "can use starred expression only as assignment target");
+ "can't use starred expression here");
}
break;
case Name_kind:
@@ -4163,9 +4523,10 @@ dict_keys_inorder(PyObject *dict, Py_ssize_t offset)
return NULL;
while (PyDict_Next(dict, &pos, &k, &v)) {
i = PyLong_AS_LONG(v);
- /* The keys of the dictionary are tuples. (see compiler_add_o)
- The object we want is always first, though. */
- k = PyTuple_GET_ITEM(k, 0);
+ /* The keys of the dictionary are tuples. (see compiler_add_o
+ * and _PyCode_ConstantKey). The object we want is always second,
+ * though. */
+ k = PyTuple_GET_ITEM(k, 1);
Py_INCREF(k);
assert((i - offset) < size);
assert((i - offset) >= 0);
@@ -4181,9 +4542,7 @@ compute_code_flags(struct compiler *c)
int flags = 0;
Py_ssize_t n;
if (ste->ste_type == FunctionBlock) {
- flags |= CO_NEWLOCALS;
- if (!ste->ste_unoptimized)
- flags |= CO_OPTIMIZED;
+ flags |= CO_NEWLOCALS | CO_OPTIMIZED;
if (ste->ste_nested)
flags |= CO_NESTED;
if (ste->ste_generator)
diff --git a/Python/condvar.h b/Python/condvar.h
index ef818c4d4b..bb5b1b661f 100644
--- a/Python/condvar.h
+++ b/Python/condvar.h
@@ -1,4 +1,4 @@
-/*
+/*
* Portable condition variable support for windows and pthreads.
* Everything is inline, this header can be included where needed.
*
@@ -105,7 +105,7 @@ PyCOND_TIMEDWAIT(PyCOND_T *cond, PyMUTEX_T *mut, PY_LONG_LONG us)
return 1;
else if (r)
return -1;
- else
+ else
return 0;
}
@@ -255,7 +255,7 @@ _PyCOND_WAIT_MS(PyCOND_T *cv, PyMUTEX_T *cs, DWORD ms)
* a new thread comes along, it will pass right throuhgh, having
* adjusted it to (waiting == 0 && sem.count == 0).
*/
-
+
if (wait == WAIT_FAILED)
return -1;
/* return 0 on success, 1 on timeout */
diff --git a/Python/dtoa.c b/Python/dtoa.c
index 8996a7210c..3da546ed07 100644
--- a/Python/dtoa.c
+++ b/Python/dtoa.c
@@ -373,7 +373,7 @@ Balloc(int k)
x = 1 << k;
len = (sizeof(Bigint) + (x-1)*sizeof(ULong) + sizeof(double) - 1)
/sizeof(double);
- if (k <= Kmax && pmem_next - private_mem + len <= PRIVATE_mem) {
+ if (k <= Kmax && pmem_next - private_mem + len <= (Py_ssize_t)PRIVATE_mem) {
rv = (Bigint*)pmem_next;
pmem_next += len;
}
@@ -1087,7 +1087,7 @@ sd2b(U *d, int scale, int *e)
b = Balloc(1);
if (b == NULL)
return NULL;
-
+
/* First construct b and e assuming that scale == 0. */
b->wds = 2;
b->x[0] = word1(d);
diff --git a/Python/dynload_aix.c b/Python/dynload_aix.c
index 5ac30ed5f1..b3ff8e288c 100644
--- a/Python/dynload_aix.c
+++ b/Python/dynload_aix.c
@@ -154,8 +154,9 @@ aix_loaderror(const char *pathname)
}
-dl_funcptr _PyImport_GetDynLoadFunc(const char *shortname,
- const char *pathname, FILE *fp)
+dl_funcptr _PyImport_FindSharedFuncptr(const char *prefix,
+ const char *shortname,
+ const char *pathname, FILE *fp)
{
dl_funcptr p;
diff --git a/Python/dynload_dl.c b/Python/dynload_dl.c
index 5836cb3b29..2bec645fbd 100644
--- a/Python/dynload_dl.c
+++ b/Python/dynload_dl.c
@@ -12,11 +12,12 @@ extern char *Py_GetProgramName(void);
const char *_PyImport_DynLoadFiletab[] = {".o", NULL};
-dl_funcptr _PyImport_GetDynLoadFunc(const char *shortname,
- const char *pathname, FILE *fp)
+dl_funcptr _PyImport_FindSharedFuncptr(const char *prefix,
+ const char *shortname,
+ const char *pathname, FILE *fp)
{
char funcname[258];
- PyOS_snprintf(funcname, sizeof(funcname), "PyInit_%.200s", shortname);
+ PyOS_snprintf(funcname, sizeof(funcname), "%.20s_%.200s", prefix, shortname);
return dl_loadmod(Py_GetProgramName(), pathname, funcname);
}
diff --git a/Python/dynload_hpux.c b/Python/dynload_hpux.c
index c9554148cc..4967afc39c 100644
--- a/Python/dynload_hpux.c
+++ b/Python/dynload_hpux.c
@@ -8,15 +8,16 @@
#include "importdl.h"
#if defined(__hp9000s300)
-#define FUNCNAME_PATTERN "_PyInit_%.200s"
+#define FUNCNAME_PATTERN "_%.20s_%.200s"
#else
-#define FUNCNAME_PATTERN "PyInit_%.200s"
+#define FUNCNAME_PATTERN "%.20s_%.200s"
#endif
const char *_PyImport_DynLoadFiletab[] = {SHLIB_EXT, NULL};
-dl_funcptr _PyImport_GetDynLoadFunc(const char *shortname,
- const char *pathname, FILE *fp)
+dl_funcptr _PyImport_FindSharedFuncptr(const char *prefix,
+ const char *shortname,
+ const char *pathname, FILE *fp)
{
dl_funcptr p;
shl_t lib;
@@ -50,7 +51,8 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *shortname,
Py_DECREF(pathname_ob);
return NULL;
}
- PyOS_snprintf(funcname, sizeof(funcname), FUNCNAME_PATTERN, shortname);
+ PyOS_snprintf(funcname, sizeof(funcname), FUNCNAME_PATTERN,
+ prefix, shortname);
if (Py_VerboseFlag)
printf("shl_findsym %s\n", funcname);
if (shl_findsym(&lib, funcname, TYPE_UNDEFINED, (void *) &p) == -1) {
diff --git a/Python/dynload_next.c b/Python/dynload_next.c
index 85c95b41bb..83a8b2bb31 100644
--- a/Python/dynload_next.c
+++ b/Python/dynload_next.c
@@ -27,8 +27,9 @@ const char *_PyImport_DynLoadFiletab[] = {".so", NULL};
#define LINKOPTIONS NSLINKMODULE_OPTION_BINDNOW| \
NSLINKMODULE_OPTION_RETURN_ON_ERROR|NSLINKMODULE_OPTION_PRIVATE
#endif
-dl_funcptr _PyImport_GetDynLoadFunc(const char *shortname,
- const char *pathname, FILE *fp)
+dl_funcptr _PyImport_FindSharedFuncptr(const char *prefix,
+ const char *shortname,
+ const char *pathname, FILE *fp)
{
dl_funcptr p = NULL;
char funcname[258];
@@ -39,7 +40,7 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *shortname,
const char *errString;
char errBuf[512];
- PyOS_snprintf(funcname, sizeof(funcname), "_PyInit_%.200s", shortname);
+ PyOS_snprintf(funcname, sizeof(funcname), "_%.20s_%.200s", prefix, shortname);
#ifdef USE_DYLD_GLOBAL_NAMESPACE
if (NSIsSymbolNameDefined(funcname)) {
diff --git a/Python/dynload_shlib.c b/Python/dynload_shlib.c
index 5cd1efdf76..7f8f134d60 100644
--- a/Python/dynload_shlib.c
+++ b/Python/dynload_shlib.c
@@ -51,8 +51,10 @@ static struct {
static int nhandles = 0;
-dl_funcptr _PyImport_GetDynLoadFunc(const char *shortname,
- const char *pathname, FILE *fp)
+dl_funcptr
+_PyImport_FindSharedFuncptr(const char *prefix,
+ const char *shortname,
+ const char *pathname, FILE *fp)
{
dl_funcptr p;
void *handle;
@@ -67,26 +69,24 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *shortname,
}
PyOS_snprintf(funcname, sizeof(funcname),
- LEAD_UNDERSCORE "PyInit_%.200s", shortname);
+ LEAD_UNDERSCORE "%.20s_%.200s", prefix, shortname);
if (fp != NULL) {
int i;
- struct stat statb;
- if (fstat(fileno(fp), &statb) == -1) {
- PyErr_SetFromErrno(PyExc_IOError);
+ struct _Py_stat_struct status;
+ if (_Py_fstat(fileno(fp), &status) == -1)
return NULL;
- }
for (i = 0; i < nhandles; i++) {
- if (statb.st_dev == handles[i].dev &&
- statb.st_ino == handles[i].ino) {
+ if (status.st_dev == handles[i].dev &&
+ status.st_ino == handles[i].ino) {
p = (dl_funcptr) dlsym(handles[i].handle,
funcname);
return p;
}
}
if (nhandles < 128) {
- handles[nhandles].dev = statb.st_dev;
- handles[nhandles].ino = statb.st_ino;
+ handles[nhandles].dev = status.st_dev;
+ handles[nhandles].ino = status.st_ino;
}
}
diff --git a/Python/dynload_win.c b/Python/dynload_win.c
index ffcf0ee1d7..f2c796e94d 100644
--- a/Python/dynload_win.c
+++ b/Python/dynload_win.c
@@ -9,6 +9,7 @@
#include <ctype.h>
#include "importdl.h"
+#include "patchlevel.h"
#include <windows.h>
// "activation context" magic - see dl_nt.c...
@@ -17,16 +18,28 @@ extern ULONG_PTR _Py_ActivateActCtx();
void _Py_DeactivateActCtx(ULONG_PTR cookie);
#endif
-const char *_PyImport_DynLoadFiletab[] = {
#ifdef _DEBUG
- "_d.pyd",
+#define PYD_DEBUG_SUFFIX "_d"
+#else
+#define PYD_DEBUG_SUFFIX ""
+#endif
+
+#define STRINGIZE2(x) #x
+#define STRINGIZE(x) STRINGIZE2(x)
+#ifdef PYD_PLATFORM_TAG
+#define PYD_TAGGED_SUFFIX PYD_DEBUG_SUFFIX ".cp" STRINGIZE(PY_MAJOR_VERSION) STRINGIZE(PY_MINOR_VERSION) "-" PYD_PLATFORM_TAG ".pyd"
#else
- ".pyd",
+#define PYD_TAGGED_SUFFIX PYD_DEBUG_SUFFIX ".cp" STRINGIZE(PY_MAJOR_VERSION) STRINGIZE(PY_MINOR_VERSION) ".pyd"
#endif
+
+#define PYD_UNTAGGED_SUFFIX PYD_DEBUG_SUFFIX ".pyd"
+
+const char *_PyImport_DynLoadFiletab[] = {
+ PYD_TAGGED_SUFFIX,
+ PYD_UNTAGGED_SUFFIX,
NULL
};
-
/* Case insensitive string compare, to avoid any dependencies on particular
C RTL implementations */
@@ -173,8 +186,9 @@ static char *GetPythonImport (HINSTANCE hModule)
return NULL;
}
-dl_funcptr _PyImport_GetDynLoadWindows(const char *shortname,
- PyObject *pathname, FILE *fp)
+dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix,
+ const char *shortname,
+ PyObject *pathname, FILE *fp)
{
dl_funcptr p;
char funcname[258], *import_python;
@@ -188,7 +202,7 @@ dl_funcptr _PyImport_GetDynLoadWindows(const char *shortname,
if (wpathname == NULL)
return NULL;
- PyOS_snprintf(funcname, sizeof(funcname), "PyInit_%.200s", shortname);
+ PyOS_snprintf(funcname, sizeof(funcname), "%.20s_%.200s", prefix, shortname);
{
HINSTANCE hDLL = NULL;
diff --git a/Python/errors.c b/Python/errors.c
index b0ad9aa58b..e151cab17c 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -74,11 +74,11 @@ PyErr_SetObject(PyObject *exception, PyObject *value)
if (value == NULL || !PyExceptionInstance_Check(value)) {
/* We must normalize the value right now */
PyObject *args, *fixed_value;
-#ifdef Py_DEBUG
- /* in debug mode, PyEval_EvalFrameEx() fails with an assertion
- error if an exception is set when it is called */
+
+ /* Issue #23571: PyEval_CallObject() must not be called with an
+ exception set */
PyErr_Clear();
-#endif
+
if (value == NULL || value == Py_None)
args = PyTuple_New(0);
else if (PyTuple_Check(value)) {
@@ -152,13 +152,7 @@ PyErr_SetString(PyObject *exception, const char *string)
PyObject *
PyErr_Occurred(void)
{
- /* If there is no thread state, PyThreadState_GET calls
- Py_FatalError, which calls PyErr_Occurred. To avoid the
- resulting infinite loop, we inline PyThreadState_GET here and
- treat no thread as no error. */
- PyThreadState *tstate =
- ((PyThreadState*)_Py_atomic_load_relaxed(&_PyThreadState_Current));
-
+ PyThreadState *tstate = _PyThreadState_UncheckedGet();
return tstate == NULL ? NULL : tstate->curexc_type;
}
@@ -315,14 +309,11 @@ finally:
tstate = PyThreadState_GET();
if (++tstate->recursion_depth > Py_GetRecursionLimit()) {
--tstate->recursion_depth;
- /* throw away the old exception... */
- Py_DECREF(*exc);
- Py_DECREF(*val);
- /* ... and use the recursion error instead */
- *exc = PyExc_RuntimeError;
- *val = PyExc_RecursionErrorInst;
- Py_INCREF(*exc);
- Py_INCREF(*val);
+ /* throw away the old exception and use the recursion error instead */
+ Py_INCREF(PyExc_RecursionError);
+ Py_SETREF(*exc, PyExc_RecursionError);
+ Py_INCREF(PyExc_RecursionErrorInst);
+ Py_SETREF(*val, PyExc_RecursionErrorInst);
/* just keeping the old traceback */
return;
}
@@ -736,9 +727,9 @@ PyErr_SetImportError(PyObject *msg, PyObject *name, PyObject *path)
PyTuple_SET_ITEM(args, 0, msg);
if (PyDict_SetItemString(kwargs, "name", name) < 0)
- return NULL;
+ goto done;
if (PyDict_SetItemString(kwargs, "path", path) < 0)
- return NULL;
+ goto done;
error = PyObject_Call(PyExc_ImportError, args, kwargs);
if (error != NULL) {
@@ -746,9 +737,9 @@ PyErr_SetImportError(PyObject *msg, PyObject *name, PyObject *path)
Py_DECREF(error);
}
+done:
Py_DECREF(args);
Py_DECREF(kwargs);
-
return NULL;
}
@@ -773,34 +764,38 @@ PyErr_BadInternalCall(void)
#define PyErr_BadInternalCall() _PyErr_BadInternalCall(__FILE__, __LINE__)
+PyObject *
+PyErr_FormatV(PyObject *exception, const char *format, va_list vargs)
+{
+ PyObject* string;
+
+ /* Issue #23571: PyUnicode_FromFormatV() must not be called with an
+ exception set, it calls arbitrary Python code like PyObject_Repr() */
+ PyErr_Clear();
+
+ string = PyUnicode_FromFormatV(format, vargs);
+
+ PyErr_SetObject(exception, string);
+ Py_XDECREF(string);
+ return NULL;
+}
+
PyObject *
PyErr_Format(PyObject *exception, const char *format, ...)
{
va_list vargs;
- PyObject* string;
-
#ifdef HAVE_STDARG_PROTOTYPES
va_start(vargs, format);
#else
va_start(vargs);
#endif
-
-#ifdef Py_DEBUG
- /* in debug mode, PyEval_EvalFrameEx() fails with an assertion error
- if an exception is set when it is called */
- PyErr_Clear();
-#endif
-
- string = PyUnicode_FromFormatV(format, vargs);
- PyErr_SetObject(exception, string);
- Py_XDECREF(string);
+ PyErr_FormatV(exception, format, vargs);
va_end(vargs);
return NULL;
}
-
PyObject *
PyErr_NewException(const char *name, PyObject *base, PyObject *dict)
{
@@ -905,8 +900,12 @@ PyErr_WriteUnraisable(PyObject *obj)
if (obj) {
if (PyFile_WriteString("Exception ignored in: ", f) < 0)
goto done;
- if (PyFile_WriteObject(obj, f, 0) < 0)
- goto done;
+ if (PyFile_WriteObject(obj, f, 0) < 0) {
+ PyErr_Clear();
+ if (PyFile_WriteString("<object repr() failed>", f) < 0) {
+ goto done;
+ }
+ }
if (PyFile_WriteString("\n", f) < 0)
goto done;
}
@@ -951,8 +950,12 @@ PyErr_WriteUnraisable(PyObject *obj)
if (v && v != Py_None) {
if (PyFile_WriteString(": ", f) < 0)
goto done;
- if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0)
- goto done;
+ if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0) {
+ PyErr_Clear();
+ if (PyFile_WriteString("<exception str() failed>", f) < 0) {
+ goto done;
+ }
+ }
}
if (PyFile_WriteString("\n", f) < 0)
goto done;
@@ -1121,6 +1124,10 @@ PyErr_ProgramTextObject(PyObject *filename, int lineno)
if (filename == NULL || lineno <= 0)
return NULL;
fp = _Py_fopen_obj(filename, "r" PY_STDIOTEXTMODE);
+ if (fp == NULL) {
+ PyErr_Clear();
+ return NULL;
+ }
return err_programtext(fp, lineno);
}
diff --git a/Python/fileutils.c b/Python/fileutils.c
index 31689c047b..23eed71321 100644
--- a/Python/fileutils.c
+++ b/Python/fileutils.c
@@ -3,7 +3,9 @@
#include <locale.h>
#ifdef MS_WINDOWS
+# include <malloc.h>
# include <windows.h>
+extern int winerror_to_errno(int);
#endif
#ifdef HAVE_LANGINFO_H
@@ -29,7 +31,8 @@ extern wchar_t* _Py_DecodeUTF8_surrogateescape(const char *s, Py_ssize_t size);
0: open() ignores O_CLOEXEC flag, ex: Linux kernel older than 2.6.23
1: open() supports O_CLOEXEC flag, close-on-exec is set
- The flag is used by _Py_open(), io.FileIO and os.open() */
+ The flag is used by _Py_open(), _Py_open_noraise(), io.FileIO
+ and os.open(). */
int _Py_open_cloexec_works = -1;
#endif
@@ -39,9 +42,13 @@ _Py_device_encoding(int fd)
#if defined(MS_WINDOWS)
UINT cp;
#endif
- if (!_PyVerify_fd(fd) || !isatty(fd)) {
+ int valid;
+ _Py_BEGIN_SUPPRESS_IPH
+ valid = _PyVerify_fd(fd) && isatty(fd);
+ _Py_END_SUPPRESS_IPH
+ if (!valid)
Py_RETURN_NONE;
- }
+
#if defined(MS_WINDOWS)
if (fd == 0)
cp = GetConsoleCP();
@@ -82,11 +89,11 @@ extern int _Py_normalize_encoding(const char *, char *, size_t);
Values of force_ascii:
- 1: the workaround is used: _Py_wchar2char() uses
- encode_ascii_surrogateescape() and _Py_char2wchar() uses
+ 1: the workaround is used: Py_EncodeLocale() uses
+ encode_ascii_surrogateescape() and Py_DecodeLocale() uses
decode_ascii_surrogateescape()
- 0: the workaround is not used: _Py_wchar2char() uses wcstombs() and
- _Py_char2wchar() uses mbstowcs()
+ 0: the workaround is not used: Py_EncodeLocale() uses wcstombs() and
+ Py_DecodeLocale() uses mbstowcs()
-1: unknown, need to call check_force_ascii() to get the value
*/
static int force_ascii = -1;
@@ -169,7 +176,7 @@ check_force_ascii(void)
#endif
error:
- /* if an error occured, force the ASCII encoding */
+ /* if an error occurred, force the ASCII encoding */
return 1;
}
@@ -244,24 +251,26 @@ decode_ascii_surrogateescape(const char *arg, size_t *size)
/* Decode a byte string from the locale encoding with the
- surrogateescape error handler (undecodable bytes are decoded as characters
- in range U+DC80..U+DCFF). If a byte sequence can be decoded as a surrogate
+ surrogateescape error handler: undecodable bytes are decoded as characters
+ in range U+DC80..U+DCFF. If a byte sequence can be decoded as a surrogate
character, escape the bytes using the surrogateescape error handler instead
of decoding them.
- Use _Py_wchar2char() to encode the character string back to a byte string.
+ Return a pointer to a newly allocated wide character string, use
+ PyMem_RawFree() to free the memory. If size is not NULL, write the number of
+ wide characters excluding the null character into *size
- Return a pointer to a newly allocated wide character string (use
- PyMem_RawFree() to free the memory) and write the number of written wide
- characters excluding the null character into *size if size is not NULL, or
- NULL on error (decoding or memory allocation error). If size is not NULL,
- *size is set to (size_t)-1 on memory error and (size_t)-2 on decoding
- error.
+ Return NULL on decoding error or memory allocation error. If *size* is not
+ NULL, *size is set to (size_t)-1 on memory error or set to (size_t)-2 on
+ decoding error.
+
+ Decoding errors should never happen, unless there is a bug in the C
+ library.
- Conversion errors should never happen, unless there is a bug in the C
- library. */
+ Use the Py_EncodeLocale() function to encode the character string back to a
+ byte string. */
wchar_t*
-_Py_char2wchar(const char* arg, size_t *size)
+Py_DecodeLocale(const char* arg, size_t *size)
{
#ifdef __APPLE__
wchar_t *wstr;
@@ -399,19 +408,20 @@ oom:
#endif /* __APPLE__ */
}
-/* Encode a (wide) character string to the locale encoding with the
- surrogateescape error handler (characters in range U+DC80..U+DCFF are
- converted to bytes 0x80..0xFF).
+/* Encode a wide character string to the locale encoding with the
+ surrogateescape error handler: surrogate characters in the range
+ U+DC80..U+DCFF are converted to bytes 0x80..0xFF.
- This function is the reverse of _Py_char2wchar().
+ Return a pointer to a newly allocated byte string, use PyMem_Free() to free
+ the memory. Return NULL on encoding or memory allocation error.
- Return a pointer to a newly allocated byte string (use PyMem_Free() to free
- the memory), or NULL on encoding or memory allocation error.
+ If error_pos is not NULL, *error_pos is set to the index of the invalid
+ character on encoding error, or set to (size_t)-1 otherwise.
- If error_pos is not NULL: *error_pos is the index of the invalid character
- on encoding error, or (size_t)-1 otherwise. */
+ Use the Py_DecodeLocale() function to decode the bytes string back to a wide
+ character string. */
char*
-_Py_wchar2char(const wchar_t *text, size_t *error_pos)
+Py_EncodeLocale(const wchar_t *text, size_t *error_pos)
{
#ifdef __APPLE__
Py_ssize_t len;
@@ -514,34 +524,179 @@ _Py_wchar2char(const wchar_t *text, size_t *error_pos)
#endif /* __APPLE__ */
}
-/* In principle, this should use HAVE__WSTAT, and _wstat
- should be detected by autoconf. However, no current
- POSIX system provides that function, so testing for
- it is pointless.
- Not sure whether the MS_WINDOWS guards are necessary:
- perhaps for cygwin/mingw builds?
-*/
-#if defined(HAVE_STAT) && !defined(MS_WINDOWS)
-/* Get file status. Encode the path to the locale encoding. */
+#ifdef MS_WINDOWS
+static __int64 secs_between_epochs = 11644473600; /* Seconds between 1.1.1601 and 1.1.1970 */
+
+static void
+FILE_TIME_to_time_t_nsec(FILETIME *in_ptr, time_t *time_out, int* nsec_out)
+{
+ /* XXX endianness. Shouldn't matter, as all Windows implementations are little-endian */
+ /* Cannot simply cast and dereference in_ptr,
+ since it might not be aligned properly */
+ __int64 in;
+ memcpy(&in, in_ptr, sizeof(in));
+ *nsec_out = (int)(in % 10000000) * 100; /* FILETIME is in units of 100 nsec. */
+ *time_out = Py_SAFE_DOWNCAST((in / 10000000) - secs_between_epochs, __int64, time_t);
+}
+
+void
+_Py_time_t_to_FILE_TIME(time_t time_in, int nsec_in, FILETIME *out_ptr)
+{
+ /* XXX endianness */
+ __int64 out;
+ out = time_in + secs_between_epochs;
+ out = out * 10000000 + nsec_in / 100;
+ memcpy(out_ptr, &out, sizeof(out));
+}
+/* Below, we *know* that ugo+r is 0444 */
+#if _S_IREAD != 0400
+#error Unsupported C library
+#endif
+static int
+attributes_to_mode(DWORD attr)
+{
+ int m = 0;
+ if (attr & FILE_ATTRIBUTE_DIRECTORY)
+ m |= _S_IFDIR | 0111; /* IFEXEC for user,group,other */
+ else
+ m |= _S_IFREG;
+ if (attr & FILE_ATTRIBUTE_READONLY)
+ m |= 0444;
+ else
+ m |= 0666;
+ return m;
+}
+
+void
+_Py_attribute_data_to_stat(BY_HANDLE_FILE_INFORMATION *info, ULONG reparse_tag,
+ struct _Py_stat_struct *result)
+{
+ memset(result, 0, sizeof(*result));
+ result->st_mode = attributes_to_mode(info->dwFileAttributes);
+ result->st_size = (((__int64)info->nFileSizeHigh)<<32) + info->nFileSizeLow;
+ result->st_dev = info->dwVolumeSerialNumber;
+ result->st_rdev = result->st_dev;
+ FILE_TIME_to_time_t_nsec(&info->ftCreationTime, &result->st_ctime, &result->st_ctime_nsec);
+ FILE_TIME_to_time_t_nsec(&info->ftLastWriteTime, &result->st_mtime, &result->st_mtime_nsec);
+ FILE_TIME_to_time_t_nsec(&info->ftLastAccessTime, &result->st_atime, &result->st_atime_nsec);
+ result->st_nlink = info->nNumberOfLinks;
+ result->st_ino = (((__int64)info->nFileIndexHigh)<<32) + info->nFileIndexLow;
+ if (reparse_tag == IO_REPARSE_TAG_SYMLINK) {
+ /* first clear the S_IFMT bits */
+ result->st_mode ^= (result->st_mode & S_IFMT);
+ /* now set the bits that make this a symlink */
+ result->st_mode |= S_IFLNK;
+ }
+ result->st_file_attributes = info->dwFileAttributes;
+}
+#endif
+
+/* Return information about a file.
+
+ On POSIX, use fstat().
+
+ On Windows, use GetFileType() and GetFileInformationByHandle() which support
+ files larger than 2 GB. fstat() may fail with EOVERFLOW on files larger
+ than 2 GB because the file size type is a signed 32-bit integer: see issue
+ #23152.
+
+ On Windows, set the last Windows error and return nonzero on error. On
+ POSIX, set errno and return nonzero on error. Fill status and return 0 on
+ success. */
int
-_Py_wstat(const wchar_t* path, struct stat *buf)
+_Py_fstat_noraise(int fd, struct _Py_stat_struct *status)
{
- int err;
- char *fname;
- fname = _Py_wchar2char(path, NULL);
- if (fname == NULL) {
- errno = EINVAL;
+#ifdef MS_WINDOWS
+ BY_HANDLE_FILE_INFORMATION info;
+ HANDLE h;
+ int type;
+
+ if (!_PyVerify_fd(fd))
+ h = INVALID_HANDLE_VALUE;
+ else {
+ _Py_BEGIN_SUPPRESS_IPH
+ h = (HANDLE)_get_osfhandle(fd);
+ _Py_END_SUPPRESS_IPH
+ }
+
+ if (h == INVALID_HANDLE_VALUE) {
+ /* errno is already set by _get_osfhandle, but we also set
+ the Win32 error for callers who expect that */
+ SetLastError(ERROR_INVALID_HANDLE);
return -1;
}
- err = stat(fname, buf);
- PyMem_Free(fname);
- return err;
-}
+ memset(status, 0, sizeof(*status));
+
+ type = GetFileType(h);
+ if (type == FILE_TYPE_UNKNOWN) {
+ DWORD error = GetLastError();
+ if (error != 0) {
+ errno = winerror_to_errno(error);
+ return -1;
+ }
+ /* else: valid but unknown file */
+ }
+
+ if (type != FILE_TYPE_DISK) {
+ if (type == FILE_TYPE_CHAR)
+ status->st_mode = _S_IFCHR;
+ else if (type == FILE_TYPE_PIPE)
+ status->st_mode = _S_IFIFO;
+ return 0;
+ }
+
+ if (!GetFileInformationByHandle(h, &info)) {
+ /* The Win32 error is already set, but we also set errno for
+ callers who expect it */
+ errno = winerror_to_errno(GetLastError());
+ return -1;
+ }
+
+ _Py_attribute_data_to_stat(&info, 0, status);
+ /* specific to fstat() */
+ status->st_ino = (((__int64)info.nFileIndexHigh)<<32) + info.nFileIndexLow;
+ return 0;
+#else
+ return fstat(fd, status);
#endif
+}
+
+/* Return information about a file.
+
+ On POSIX, use fstat().
+
+ On Windows, use GetFileType() and GetFileInformationByHandle() which support
+ files larger than 2 GB. fstat() may fail with EOVERFLOW on files larger
+ than 2 GB because the file size type is a signed 32-bit integer: see issue
+ #23152.
-#ifdef HAVE_STAT
+ Raise an exception and return -1 on error. On Windows, set the last Windows
+ error on error. On POSIX, set errno on error. Fill status and return 0 on
+ success.
+
+ Release the GIL to call GetFileType() and GetFileInformationByHandle(), or
+ to call fstat(). The caller must hold the GIL. */
+int
+_Py_fstat(int fd, struct _Py_stat_struct *status)
+{
+ int res;
+
+ Py_BEGIN_ALLOW_THREADS
+ res = _Py_fstat_noraise(fd, status);
+ Py_END_ALLOW_THREADS
+
+ if (res != 0) {
+#ifdef MS_WINDOWS
+ PyErr_SetFromWindowsErr(0);
+#else
+ PyErr_SetFromErrno(PyExc_OSError);
+#endif
+ return -1;
+ }
+ return 0;
+}
/* Call _wstat() on Windows, or encode the path to the filesystem encoding and
call stat() otherwise. Only fill st_mode attribute on Windows.
@@ -575,7 +730,6 @@ _Py_stat(PyObject *path, struct stat *statbuf)
#endif
}
-#endif
static int
get_inheritable(int fd, int raise)
@@ -590,7 +744,9 @@ get_inheritable(int fd, int raise)
return -1;
}
+ _Py_BEGIN_SUPPRESS_IPH
handle = (HANDLE)_get_osfhandle(fd);
+ _Py_END_SUPPRESS_IPH
if (handle == INVALID_HANDLE_VALUE) {
if (raise)
PyErr_SetFromErrno(PyExc_OSError);
@@ -665,7 +821,9 @@ set_inheritable(int fd, int inheritable, int raise, int *atomic_flag_works)
return -1;
}
+ _Py_BEGIN_SUPPRESS_IPH
handle = (HANDLE)_get_osfhandle(fd);
+ _Py_END_SUPPRESS_IPH
if (handle == INVALID_HANDLE_VALUE) {
if (raise)
PyErr_SetFromErrno(PyExc_OSError);
@@ -698,7 +856,7 @@ set_inheritable(int fd, int inheritable, int raise, int *atomic_flag_works)
return 0;
}
- if (errno != ENOTTY) {
+ if (errno != ENOTTY && errno != EACCES) {
if (raise)
PyErr_SetFromErrno(PyExc_OSError);
return -1;
@@ -707,7 +865,12 @@ set_inheritable(int fd, int inheritable, int raise, int *atomic_flag_works)
/* Issue #22258: Here, ENOTTY means "Inappropriate ioctl for
device". The ioctl is declared but not supported by the kernel.
Remember that ioctl() doesn't work. It is the case on
- Illumos-based OS for example. */
+ Illumos-based OS for example.
+
+ Issue #27057: When SELinux policy disallows ioctl it will fail
+ with EACCES. While FIOCLEX is safe operation it may be
+ unavailable because ioctl was denied altogether.
+ This can be the case on Android. */
ioctl_works = 0;
}
/* fallback to fcntl() if ioctl() does not work */
@@ -767,40 +930,92 @@ _Py_set_inheritable(int fd, int inheritable, int *atomic_flag_works)
return set_inheritable(fd, inheritable, 1, atomic_flag_works);
}
-/* Open a file with the specified flags (wrapper to open() function).
- The file descriptor is created non-inheritable. */
-int
-_Py_open(const char *pathname, int flags)
+static int
+_Py_open_impl(const char *pathname, int flags, int gil_held)
{
int fd;
-#ifdef MS_WINDOWS
- fd = open(pathname, flags | O_NOINHERIT);
- if (fd < 0)
- return fd;
-#else
-
+ int async_err = 0;
+#ifndef MS_WINDOWS
int *atomic_flag_works;
-#ifdef O_CLOEXEC
+#endif
+
+#ifdef MS_WINDOWS
+ flags |= O_NOINHERIT;
+#elif defined(O_CLOEXEC)
atomic_flag_works = &_Py_open_cloexec_works;
flags |= O_CLOEXEC;
#else
atomic_flag_works = NULL;
#endif
- fd = open(pathname, flags);
- if (fd < 0)
- return fd;
- if (set_inheritable(fd, 0, 0, atomic_flag_works) < 0) {
+ if (gil_held) {
+ do {
+ Py_BEGIN_ALLOW_THREADS
+ fd = open(pathname, flags);
+ Py_END_ALLOW_THREADS
+ } while (fd < 0
+ && errno == EINTR && !(async_err = PyErr_CheckSignals()));
+ if (async_err)
+ return -1;
+ if (fd < 0) {
+ PyErr_SetFromErrnoWithFilename(PyExc_OSError, pathname);
+ return -1;
+ }
+ }
+ else {
+ fd = open(pathname, flags);
+ if (fd < 0)
+ return -1;
+ }
+
+#ifndef MS_WINDOWS
+ if (set_inheritable(fd, 0, gil_held, atomic_flag_works) < 0) {
close(fd);
return -1;
}
-#endif /* !MS_WINDOWS */
+#endif
+
return fd;
}
+/* Open a file with the specified flags (wrapper to open() function).
+ Return a file descriptor on success. Raise an exception and return -1 on
+ error.
+
+ The file descriptor is created non-inheritable.
+
+ When interrupted by a signal (open() fails with EINTR), retry the syscall,
+ except if the Python signal handler raises an exception.
+
+ Release the GIL to call open(). The caller must hold the GIL. */
+int
+_Py_open(const char *pathname, int flags)
+{
+#ifdef WITH_THREAD
+ /* _Py_open() must be called with the GIL held. */
+ assert(PyGILState_Check());
+#endif
+ return _Py_open_impl(pathname, flags, 1);
+}
+
+/* Open a file with the specified flags (wrapper to open() function).
+ Return a file descriptor on success. Set errno and return -1 on error.
+
+ The file descriptor is created non-inheritable.
+
+ If interrupted by a signal, fail with EINTR. */
+int
+_Py_open_noraise(const char *pathname, int flags)
+{
+ return _Py_open_impl(pathname, flags, 0);
+}
+
/* Open a file. Use _wfopen() on Windows, encode the path to the locale
- encoding and use fopen() otherwise. The file descriptor is created
- non-inheritable. */
+ encoding and use fopen() otherwise.
+
+ The file descriptor is created non-inheritable.
+
+ If interrupted by a signal, fail with EINTR. */
FILE *
_Py_wfopen(const wchar_t *path, const wchar_t *mode)
{
@@ -814,7 +1029,7 @@ _Py_wfopen(const wchar_t *path, const wchar_t *mode)
errno = EINVAL;
return NULL;
}
- cpath = _Py_wchar2char(path, NULL);
+ cpath = Py_EncodeLocale(path, NULL);
if (cpath == NULL)
return NULL;
f = fopen(cpath, cmode);
@@ -831,7 +1046,11 @@ _Py_wfopen(const wchar_t *path, const wchar_t *mode)
return f;
}
-/* Wrapper to fopen(). The file descriptor is created non-inheritable. */
+/* Wrapper to fopen().
+
+ The file descriptor is created non-inheritable.
+
+ If interrupted by a signal, fail with EINTR. */
FILE*
_Py_fopen(const char *pathname, const char *mode)
{
@@ -846,20 +1065,32 @@ _Py_fopen(const char *pathname, const char *mode)
}
/* Open a file. Call _wfopen() on Windows, or encode the path to the filesystem
- encoding and call fopen() otherwise. The file descriptor is created
- non-inheritable.
+ encoding and call fopen() otherwise.
+
+ Return the new file object on success. Raise an exception and return NULL
+ on error.
+
+ The file descriptor is created non-inheritable.
+
+ When interrupted by a signal (open() fails with EINTR), retry the syscall,
+ except if the Python signal handler raises an exception.
- Return the new file object on success, or NULL if the file cannot be open or
- (if PyErr_Occurred()) on unicode error. */
+ Release the GIL to call _wfopen() or fopen(). The caller must hold
+ the GIL. */
FILE*
_Py_fopen_obj(PyObject *path, const char *mode)
{
FILE *f;
+ int async_err = 0;
#ifdef MS_WINDOWS
wchar_t *wpath;
wchar_t wmode[10];
int usize;
+#ifdef WITH_THREAD
+ assert(PyGILState_Check());
+#endif
+
if (!PyUnicode_Check(path)) {
PyErr_Format(PyExc_TypeError,
"str file path expected under Windows, got %R",
@@ -871,26 +1102,249 @@ _Py_fopen_obj(PyObject *path, const char *mode)
return NULL;
usize = MultiByteToWideChar(CP_ACP, 0, mode, -1, wmode, sizeof(wmode));
- if (usize == 0)
+ if (usize == 0) {
+ PyErr_SetFromWindowsErr(0);
return NULL;
+ }
- f = _wfopen(wpath, wmode);
+ do {
+ Py_BEGIN_ALLOW_THREADS
+ f = _wfopen(wpath, wmode);
+ Py_END_ALLOW_THREADS
+ } while (f == NULL
+ && errno == EINTR && !(async_err = PyErr_CheckSignals()));
#else
PyObject *bytes;
+ char *path_bytes;
+
+#ifdef WITH_THREAD
+ assert(PyGILState_Check());
+#endif
+
if (!PyUnicode_FSConverter(path, &bytes))
return NULL;
- f = fopen(PyBytes_AS_STRING(bytes), mode);
+ path_bytes = PyBytes_AS_STRING(bytes);
+
+ do {
+ Py_BEGIN_ALLOW_THREADS
+ f = fopen(path_bytes, mode);
+ Py_END_ALLOW_THREADS
+ } while (f == NULL
+ && errno == EINTR && !(async_err = PyErr_CheckSignals()));
+
Py_DECREF(bytes);
#endif
- if (f == NULL)
+ if (async_err)
return NULL;
- if (make_non_inheritable(fileno(f)) < 0) {
+
+ if (f == NULL) {
+ PyErr_SetFromErrnoWithFilenameObject(PyExc_OSError, path);
+ return NULL;
+ }
+
+ if (set_inheritable(fileno(f), 0, 1, NULL) < 0) {
fclose(f);
return NULL;
}
return f;
}
+/* Read count bytes from fd into buf.
+
+ On success, return the number of read bytes, it can be lower than count.
+ If the current file offset is at or past the end of file, no bytes are read,
+ and read() returns zero.
+
+ On error, raise an exception, set errno and return -1.
+
+ When interrupted by a signal (read() fails with EINTR), retry the syscall.
+ If the Python signal handler raises an exception, the function returns -1
+ (the syscall is not retried).
+
+ Release the GIL to call read(). The caller must hold the GIL. */
+Py_ssize_t
+_Py_read(int fd, void *buf, size_t count)
+{
+ Py_ssize_t n;
+ int err;
+ int async_err = 0;
+
+ /* _Py_read() must not be called with an exception set, otherwise the
+ * caller may think that read() was interrupted by a signal and the signal
+ * handler raised an exception. */
+ assert(!PyErr_Occurred());
+
+ if (!_PyVerify_fd(fd)) {
+ /* save/restore errno because PyErr_SetFromErrno() can modify it */
+ err = errno;
+ PyErr_SetFromErrno(PyExc_OSError);
+ errno = err;
+ return -1;
+ }
+
+#ifdef MS_WINDOWS
+ if (count > INT_MAX) {
+ /* On Windows, the count parameter of read() is an int */
+ count = INT_MAX;
+ }
+#else
+ if (count > PY_SSIZE_T_MAX) {
+ /* if count is greater than PY_SSIZE_T_MAX,
+ * read() result is undefined */
+ count = PY_SSIZE_T_MAX;
+ }
+#endif
+
+ _Py_BEGIN_SUPPRESS_IPH
+ do {
+ Py_BEGIN_ALLOW_THREADS
+ errno = 0;
+#ifdef MS_WINDOWS
+ n = read(fd, buf, (int)count);
+#else
+ n = read(fd, buf, count);
+#endif
+ /* save/restore errno because PyErr_CheckSignals()
+ * and PyErr_SetFromErrno() can modify it */
+ err = errno;
+ Py_END_ALLOW_THREADS
+ } while (n < 0 && err == EINTR &&
+ !(async_err = PyErr_CheckSignals()));
+ _Py_END_SUPPRESS_IPH
+
+ if (async_err) {
+ /* read() was interrupted by a signal (failed with EINTR)
+ * and the Python signal handler raised an exception */
+ errno = err;
+ assert(errno == EINTR && PyErr_Occurred());
+ return -1;
+ }
+ if (n < 0) {
+ PyErr_SetFromErrno(PyExc_OSError);
+ errno = err;
+ return -1;
+ }
+
+ return n;
+}
+
+static Py_ssize_t
+_Py_write_impl(int fd, const void *buf, size_t count, int gil_held)
+{
+ Py_ssize_t n;
+ int err;
+ int async_err = 0;
+
+ if (!_PyVerify_fd(fd)) {
+ if (gil_held) {
+ /* save/restore errno because PyErr_SetFromErrno() can modify it */
+ err = errno;
+ PyErr_SetFromErrno(PyExc_OSError);
+ errno = err;
+ }
+ return -1;
+ }
+
+ _Py_BEGIN_SUPPRESS_IPH
+#ifdef MS_WINDOWS
+ if (count > 32767 && isatty(fd)) {
+ /* Issue #11395: the Windows console returns an error (12: not
+ enough space error) on writing into stdout if stdout mode is
+ binary and the length is greater than 66,000 bytes (or less,
+ depending on heap usage). */
+ count = 32767;
+ }
+ else if (count > INT_MAX)
+ count = INT_MAX;
+#else
+ if (count > PY_SSIZE_T_MAX) {
+ /* write() should truncate count to PY_SSIZE_T_MAX, but it's safer
+ * to do it ourself to have a portable behaviour. */
+ count = PY_SSIZE_T_MAX;
+ }
+#endif
+
+ if (gil_held) {
+ do {
+ Py_BEGIN_ALLOW_THREADS
+ errno = 0;
+#ifdef MS_WINDOWS
+ n = write(fd, buf, (int)count);
+#else
+ n = write(fd, buf, count);
+#endif
+ /* save/restore errno because PyErr_CheckSignals()
+ * and PyErr_SetFromErrno() can modify it */
+ err = errno;
+ Py_END_ALLOW_THREADS
+ } while (n < 0 && err == EINTR &&
+ !(async_err = PyErr_CheckSignals()));
+ }
+ else {
+ do {
+ errno = 0;
+#ifdef MS_WINDOWS
+ n = write(fd, buf, (int)count);
+#else
+ n = write(fd, buf, count);
+#endif
+ err = errno;
+ } while (n < 0 && err == EINTR);
+ }
+ _Py_END_SUPPRESS_IPH
+
+ if (async_err) {
+ /* write() was interrupted by a signal (failed with EINTR)
+ and the Python signal handler raised an exception (if gil_held is
+ nonzero). */
+ errno = err;
+ assert(errno == EINTR && (!gil_held || PyErr_Occurred()));
+ return -1;
+ }
+ if (n < 0) {
+ if (gil_held)
+ PyErr_SetFromErrno(PyExc_OSError);
+ errno = err;
+ return -1;
+ }
+
+ return n;
+}
+
+/* Write count bytes of buf into fd.
+
+ On success, return the number of written bytes, it can be lower than count
+ including 0. On error, raise an exception, set errno and return -1.
+
+ When interrupted by a signal (write() fails with EINTR), retry the syscall.
+ If the Python signal handler raises an exception, the function returns -1
+ (the syscall is not retried).
+
+ Release the GIL to call write(). The caller must hold the GIL. */
+Py_ssize_t
+_Py_write(int fd, const void *buf, size_t count)
+{
+ /* _Py_write() must not be called with an exception set, otherwise the
+ * caller may think that write() was interrupted by a signal and the signal
+ * handler raised an exception. */
+ assert(!PyErr_Occurred());
+
+ return _Py_write_impl(fd, buf, count, 1);
+}
+
+/* Write count bytes of buf into fd.
+ *
+ * On success, return the number of written bytes, it can be lower than count
+ * including 0. On error, set errno and return -1.
+ *
+ * When interrupted by a signal (write() fails with EINTR), retry the syscall
+ * without calling the Python signal handler. */
+Py_ssize_t
+_Py_write_noraise(int fd, const void *buf, size_t count)
+{
+ return _Py_write_impl(fd, buf, count, 0);
+}
+
#ifdef HAVE_READLINK
/* Read value of symbolic link. Encode the path to the locale encoding, decode
@@ -905,7 +1359,7 @@ _Py_wreadlink(const wchar_t *path, wchar_t *buf, size_t bufsiz)
int res;
size_t r1;
- cpath = _Py_wchar2char(path, NULL);
+ cpath = Py_EncodeLocale(path, NULL);
if (cpath == NULL) {
errno = EINVAL;
return -1;
@@ -919,7 +1373,7 @@ _Py_wreadlink(const wchar_t *path, wchar_t *buf, size_t bufsiz)
return -1;
}
cbuf[res] = '\0'; /* buf will be null terminated */
- wbuf = _Py_char2wchar(cbuf, &r1);
+ wbuf = Py_DecodeLocale(cbuf, &r1);
if (wbuf == NULL) {
errno = EINVAL;
return -1;
@@ -950,7 +1404,7 @@ _Py_wrealpath(const wchar_t *path,
wchar_t *wresolved_path;
char *res;
size_t r;
- cpath = _Py_wchar2char(path, NULL);
+ cpath = Py_EncodeLocale(path, NULL);
if (cpath == NULL) {
errno = EINVAL;
return NULL;
@@ -960,7 +1414,7 @@ _Py_wrealpath(const wchar_t *path,
if (res == NULL)
return NULL;
- wresolved_path = _Py_char2wchar(cresolved_path, &r);
+ wresolved_path = Py_DecodeLocale(cresolved_path, &r);
if (wresolved_path == NULL) {
errno = EINVAL;
return NULL;
@@ -993,7 +1447,7 @@ _Py_wgetcwd(wchar_t *buf, size_t size)
if (getcwd(fname, Py_ARRAY_LENGTH(fname)) == NULL)
return NULL;
- wname = _Py_char2wchar(fname, &len);
+ wname = Py_DecodeLocale(fname, &len);
if (wname == NULL)
return NULL;
if (size <= len) {
@@ -1025,7 +1479,9 @@ _Py_dup(int fd)
}
#ifdef MS_WINDOWS
+ _Py_BEGIN_SUPPRESS_IPH
handle = (HANDLE)_get_osfhandle(fd);
+ _Py_END_SUPPRESS_IPH
if (handle == INVALID_HANDLE_VALUE) {
PyErr_SetFromErrno(PyExc_OSError);
return -1;
@@ -1035,7 +1491,9 @@ _Py_dup(int fd)
ftype = GetFileType(handle);
Py_BEGIN_ALLOW_THREADS
+ _Py_BEGIN_SUPPRESS_IPH
fd = dup(fd);
+ _Py_END_SUPPRESS_IPH
Py_END_ALLOW_THREADS
if (fd < 0) {
PyErr_SetFromErrno(PyExc_OSError);
@@ -1045,13 +1503,17 @@ _Py_dup(int fd)
/* Character files like console cannot be make non-inheritable */
if (ftype != FILE_TYPE_CHAR) {
if (_Py_set_inheritable(fd, 0, NULL) < 0) {
+ _Py_BEGIN_SUPPRESS_IPH
close(fd);
+ _Py_END_SUPPRESS_IPH
return -1;
}
}
#elif defined(HAVE_FCNTL_H) && defined(F_DUPFD_CLOEXEC)
Py_BEGIN_ALLOW_THREADS
+ _Py_BEGIN_SUPPRESS_IPH
fd = fcntl(fd, F_DUPFD_CLOEXEC, 0);
+ _Py_END_SUPPRESS_IPH
Py_END_ALLOW_THREADS
if (fd < 0) {
PyErr_SetFromErrno(PyExc_OSError);
@@ -1060,7 +1522,9 @@ _Py_dup(int fd)
#else
Py_BEGIN_ALLOW_THREADS
+ _Py_BEGIN_SUPPRESS_IPH
fd = dup(fd);
+ _Py_END_SUPPRESS_IPH
Py_END_ALLOW_THREADS
if (fd < 0) {
PyErr_SetFromErrno(PyExc_OSError);
@@ -1068,10 +1532,152 @@ _Py_dup(int fd)
}
if (_Py_set_inheritable(fd, 0, NULL) < 0) {
+ _Py_BEGIN_SUPPRESS_IPH
close(fd);
+ _Py_END_SUPPRESS_IPH
return -1;
}
#endif
return fd;
}
+#ifndef MS_WINDOWS
+/* Get the blocking mode of the file descriptor.
+ Return 0 if the O_NONBLOCK flag is set, 1 if the flag is cleared,
+ raise an exception and return -1 on error. */
+int
+_Py_get_blocking(int fd)
+{
+ int flags;
+ _Py_BEGIN_SUPPRESS_IPH
+ flags = fcntl(fd, F_GETFL, 0);
+ _Py_END_SUPPRESS_IPH
+ if (flags < 0) {
+ PyErr_SetFromErrno(PyExc_OSError);
+ return -1;
+ }
+
+ return !(flags & O_NONBLOCK);
+}
+
+/* Set the blocking mode of the specified file descriptor.
+
+ Set the O_NONBLOCK flag if blocking is False, clear the O_NONBLOCK flag
+ otherwise.
+
+ Return 0 on success, raise an exception and return -1 on error. */
+int
+_Py_set_blocking(int fd, int blocking)
+{
+#if defined(HAVE_SYS_IOCTL_H) && defined(FIONBIO)
+ int arg = !blocking;
+ if (ioctl(fd, FIONBIO, &arg) < 0)
+ goto error;
+#else
+ int flags, res;
+
+ _Py_BEGIN_SUPPRESS_IPH
+ flags = fcntl(fd, F_GETFL, 0);
+ if (flags >= 0) {
+ if (blocking)
+ flags = flags & (~O_NONBLOCK);
+ else
+ flags = flags | O_NONBLOCK;
+
+ res = fcntl(fd, F_SETFL, flags);
+ } else {
+ res = -1;
+ }
+ _Py_END_SUPPRESS_IPH
+
+ if (res < 0)
+ goto error;
+#endif
+ return 0;
+
+error:
+ PyErr_SetFromErrno(PyExc_OSError);
+ return -1;
+}
+#endif
+
+#if defined _MSC_VER && _MSC_VER >= 1400 && _MSC_VER < 1900
+/* Legacy implementation of _PyVerify_fd while transitioning to
+ * MSVC 14.0. This should eventually be removed. (issue23524)
+ */
+
+/* Microsoft CRT in VS2005 and higher will verify that a filehandle is
+ * valid and raise an assertion if it isn't.
+ * Normally, an invalid fd is likely to be a C program error and therefore
+ * an assertion can be useful, but it does contradict the POSIX standard
+ * which for write(2) states:
+ * "Otherwise, -1 shall be returned and errno set to indicate the error."
+ * "[EBADF] The fildes argument is not a valid file descriptor open for
+ * writing."
+ * Furthermore, python allows the user to enter any old integer
+ * as a fd and should merely raise a python exception on error.
+ * The Microsoft CRT doesn't provide an official way to check for the
+ * validity of a file descriptor, but we can emulate its internal behaviour
+ * by using the exported __pinfo data member and knowledge of the
+ * internal structures involved.
+ * The structures below must be updated for each version of visual studio
+ * according to the file internal.h in the CRT source, until MS comes
+ * up with a less hacky way to do this.
+ * (all of this is to avoid globally modifying the CRT behaviour using
+ * _set_invalid_parameter_handler() and _CrtSetReportMode())
+ */
+/* The actual size of the structure is determined at runtime.
+ * Only the first items must be present.
+ */
+typedef struct {
+ intptr_t osfhnd;
+ char osfile;
+} my_ioinfo;
+
+extern __declspec(dllimport) char * __pioinfo[];
+#define IOINFO_L2E 5
+#define IOINFO_ARRAYS 64
+#define IOINFO_ARRAY_ELTS (1 << IOINFO_L2E)
+#define _NHANDLE_ (IOINFO_ARRAYS * IOINFO_ARRAY_ELTS)
+#define FOPEN 0x01
+#define _NO_CONSOLE_FILENO (intptr_t)-2
+
+/* This function emulates what the windows CRT does to validate file handles */
+int
+_PyVerify_fd(int fd)
+{
+ const int i1 = fd >> IOINFO_L2E;
+ const int i2 = fd & ((1 << IOINFO_L2E) - 1);
+
+ static size_t sizeof_ioinfo = 0;
+
+ /* Determine the actual size of the ioinfo structure,
+ * as used by the CRT loaded in memory
+ */
+ if (sizeof_ioinfo == 0 && __pioinfo[0] != NULL) {
+ sizeof_ioinfo = _msize(__pioinfo[0]) / IOINFO_ARRAY_ELTS;
+ }
+ if (sizeof_ioinfo == 0) {
+ /* This should not happen... */
+ goto fail;
+ }
+
+ /* See that it isn't a special CLEAR fileno */
+ if (fd != _NO_CONSOLE_FILENO) {
+ /* Microsoft CRT would check that 0<=fd<_nhandle but we can't do that. Instead
+ * we check pointer validity and other info
+ */
+ if (0 <= i1 && i1 < IOINFO_ARRAYS && __pioinfo[i1] != NULL) {
+ /* finally, check that the file is open */
+ my_ioinfo* info = (my_ioinfo*)(__pioinfo[i1] + i2 * sizeof_ioinfo);
+ if (info->osfile & FOPEN) {
+ return 1;
+ }
+ }
+ }
+ fail:
+ errno = EBADF;
+ return 0;
+}
+
+#endif /* defined _MSC_VER && _MSC_VER >= 1400 && _MSC_VER < 1900 */
diff --git a/Python/formatter_unicode.c b/Python/formatter_unicode.c
index e3a8149841..8e9c502754 100644
--- a/Python/formatter_unicode.c
+++ b/Python/formatter_unicode.c
@@ -846,6 +846,13 @@ format_long_internal(PyObject *value, const InternalFormatSpec *format,
" format specifier 'c'");
goto done;
}
+ /* error to request alternate format */
+ if (format->alternate) {
+ PyErr_SetString(PyExc_ValueError,
+ "Alternate form (#) not allowed with integer"
+ " format specifier 'c'");
+ goto done;
+ }
/* taken from unicodeobject.c formatchar() */
/* Integer input truncated to a character */
@@ -1035,7 +1042,7 @@ format_float_internal(PyObject *value,
else if (type == 'r')
type = 'g';
- /* Cast "type", because if we're in unicode we need to pass a
+ /* Cast "type", because if we're in unicode we need to pass an
8-bit char. This is safe, because we've restricted what "type"
can be. */
buf = PyOS_double_to_string(val, (char)type, precision, flags,
@@ -1214,7 +1221,7 @@ format_complex_internal(PyObject *value,
else if (type == 'r')
type = 'g';
- /* Cast "type", because if we're in unicode we need to pass a
+ /* Cast "type", because if we're in unicode we need to pass an
8-bit char. This is safe, because we've restricted what "type"
can be. */
re_buf = PyOS_double_to_string(re, (char)type, precision, flags,
diff --git a/Python/frozen.c b/Python/frozen.c
index 9bc662b994..676f395488 100644
--- a/Python/frozen.c
+++ b/Python/frozen.c
@@ -3,6 +3,7 @@
#include "Python.h"
#include "importlib.h"
+#include "importlib_external.h"
/* In order to test the support for frozen modules, by default we
define a single frozen module, __hello__. Loading it will print
@@ -31,6 +32,8 @@ static unsigned char M___hello__[] = {
static const struct _frozen _PyImport_FrozenModules[] = {
/* importlib */
{"_frozen_importlib", _Py_M__importlib, (int)sizeof(_Py_M__importlib)},
+ {"_frozen_importlib_external", _Py_M__importlib_external,
+ (int)sizeof(_Py_M__importlib_external)},
/* Test module */
{"__hello__", M___hello__, SIZE},
/* Test package (negative size indicates package-ness) */
diff --git a/Python/frozenmain.c b/Python/frozenmain.c
index b05c94a7e1..de8bd35453 100644
--- a/Python/frozenmain.c
+++ b/Python/frozenmain.c
@@ -54,7 +54,7 @@ Py_FrozenMain(int argc, char **argv)
setlocale(LC_ALL, "");
for (i = 0; i < argc; i++) {
- argv_copy[i] = _Py_char2wchar(argv[i], NULL);
+ argv_copy[i] = Py_DecodeLocale(argv[i], NULL);
argv_copy2[i] = argv_copy[i];
if (!argv_copy[i]) {
fprintf(stderr, "Unable to decode the command line argument #%i\n",
diff --git a/Python/future.c b/Python/future.c
index 81eab54dd6..163f87f673 100644
--- a/Python/future.c
+++ b/Python/future.c
@@ -40,6 +40,8 @@ future_check_features(PyFutureFeatures *ff, stmt_ty s, PyObject *filename)
continue;
} else if (strcmp(feature, FUTURE_BARRY_AS_BDFL) == 0) {
ff->ff_features |= CO_FUTURE_BARRY_AS_BDFL;
+ } else if (strcmp(feature, FUTURE_GENERATOR_STOP) == 0) {
+ ff->ff_features |= CO_FUTURE_GENERATOR_STOP;
} else if (strcmp(feature, "braces") == 0) {
PyErr_SetString(PyExc_SyntaxError,
"not a chance");
diff --git a/Python/getargs.c b/Python/getargs.c
index 6902d13489..8aab067865 100644
--- a/Python/getargs.c
+++ b/Python/getargs.c
@@ -342,7 +342,7 @@ vgetargs1(PyObject *args, const char *format, va_list *p_va, int flags)
flags, levels, msgbuf,
sizeof(msgbuf), &freelist);
if (msg) {
- seterror(i+1, msg, levels, fname, msg);
+ seterror(i+1, msg, levels, fname, message);
return cleanreturn(0, &freelist);
}
}
@@ -535,9 +535,15 @@ converterr(const char *expected, PyObject *arg, char *msgbuf, size_t bufsize)
{
assert(expected != NULL);
assert(arg != NULL);
- PyOS_snprintf(msgbuf, bufsize,
- "must be %.50s, not %.50s", expected,
- arg == Py_None ? "None" : arg->ob_type->tp_name);
+ if (expected[0] == '(') {
+ PyOS_snprintf(msgbuf, bufsize,
+ "%.100s", expected);
+ }
+ else {
+ PyOS_snprintf(msgbuf, bufsize,
+ "must be %.50s, not %.50s", expected,
+ arg == Py_None ? "None" : arg->ob_type->tp_name);
+ }
return msgbuf;
}
@@ -741,7 +747,7 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
if (PyLong_Check(arg))
ival = PyLong_AsUnsignedLongMask(arg);
else
- return converterr("integer<k>", arg, msgbuf, bufsize);
+ return converterr("int", arg, msgbuf, bufsize);
*p = ival;
break;
}
@@ -766,7 +772,7 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
if (PyLong_Check(arg))
ival = PyLong_AsUnsignedLongLongMask(arg);
else
- return converterr("integer<K>", arg, msgbuf, bufsize);
+ return converterr("int", arg, msgbuf, bufsize);
*p = ival;
break;
}
@@ -872,10 +878,10 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
STORE_SIZE(count);
format++;
} else {
- if (strlen(*p) != count)
- return converterr(
- "bytes without null bytes",
- arg, msgbuf, bufsize);
+ if (strlen(*p) != (size_t)count) {
+ PyErr_SetString(PyExc_ValueError, "embedded null byte");
+ RETURN_ERR_OCCURRED;
+ }
}
break;
}
@@ -948,16 +954,15 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
if (sarg == NULL)
return converterr(CONV_UNICODE,
arg, msgbuf, bufsize);
+ if (strlen(sarg) != (size_t)len) {
+ PyErr_SetString(PyExc_ValueError, "embedded null character");
+ RETURN_ERR_OCCURRED;
+ }
*p = sarg;
}
else
return converterr(c == 'z' ? "str or None" : "str",
arg, msgbuf, bufsize);
- if (*p != NULL && sarg != NULL && (Py_ssize_t) strlen(*p) != len)
- return converterr(
- c == 'z' ? "str without null characters or None"
- : "str without null characters",
- arg, msgbuf, bufsize);
}
break;
}
@@ -995,10 +1000,10 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
*p = PyUnicode_AsUnicodeAndSize(arg, &len);
if (*p == NULL)
RETURN_ERR_OCCURRED;
- if (Py_UNICODE_strlen(*p) != len)
- return converterr(
- "str without null characters or None",
- arg, msgbuf, bufsize);
+ if (Py_UNICODE_strlen(*p) != (size_t)len) {
+ PyErr_SetString(PyExc_ValueError, "embedded null character");
+ RETURN_ERR_OCCURRED;
+ }
} else
return converterr(c == 'Z' ? "str or None" : "str",
arg, msgbuf, bufsize);
@@ -1124,9 +1129,11 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
} else {
if (size + 1 > BUFFER_LEN) {
Py_DECREF(s);
- return converterr(
- "(buffer overflow)",
- arg, msgbuf, bufsize);
+ PyErr_Format(PyExc_TypeError,
+ "encoded string too long "
+ "(%zd, maximum length %zd)",
+ (Py_ssize_t)size, (Py_ssize_t)(BUFFER_LEN-1));
+ RETURN_ERR_OCCURRED;
}
}
memcpy(*buffer, ptr, size+1);
@@ -1148,7 +1155,7 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
if ((Py_ssize_t)strlen(ptr) != size) {
Py_DECREF(s);
return converterr(
- "encoded string without NULL bytes",
+ "encoded string without null bytes",
arg, msgbuf, bufsize);
}
*buffer = PyMem_NEW(char, size + 1);
@@ -1238,7 +1245,7 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
if (*format != '*')
return converterr(
- "invalid use of 'w' format character",
+ "(invalid use of 'w' format character)",
arg, msgbuf, bufsize);
format++;
@@ -1246,7 +1253,8 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
supports it directly. */
if (PyObject_GetBuffer(arg, (Py_buffer*)p, PyBUF_WRITABLE) < 0) {
PyErr_Clear();
- return converterr("read-write buffer", arg, msgbuf, bufsize);
+ return converterr("read-write bytes-like object",
+ arg, msgbuf, bufsize);
}
if (!PyBuffer_IsContiguous((Py_buffer*)p, 'C')) {
PyBuffer_Release((Py_buffer*)p);
@@ -1261,7 +1269,7 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
}
default:
- return converterr("impossible<bad format char>", arg, msgbuf, bufsize);
+ return converterr("(impossible<bad format char>)", arg, msgbuf, bufsize);
}
@@ -1284,7 +1292,7 @@ convertbuffer(PyObject *arg, void **p, char **errmsg)
*errmsg = NULL;
*p = NULL;
if (pb != NULL && pb->bf_releasebuffer != NULL) {
- *errmsg = "read-only pinned buffer";
+ *errmsg = "read-only bytes-like object";
return -1;
}
@@ -1300,7 +1308,7 @@ static int
getbuffer(PyObject *arg, Py_buffer *view, char **errmsg)
{
if (PyObject_GetBuffer(arg, view, PyBUF_SIMPLE) != 0) {
- *errmsg = "bytes or buffer";
+ *errmsg = "bytes-like object";
return -1;
}
if (!PyBuffer_IsContiguous(view, 'C')) {
diff --git a/Python/graminit.c b/Python/graminit.c
index e04999bbff..8212b2a584 100644
--- a/Python/graminit.c
+++ b/Python/graminit.c
@@ -92,393 +92,406 @@ static state states_4[2] = {
static arc arcs_5_0[1] = {
{16, 1},
};
-static arc arcs_5_1[2] = {
+static arc arcs_5_1[3] = {
{18, 2},
{19, 2},
+ {20, 2},
};
static arc arcs_5_2[1] = {
{0, 2},
};
static state states_5[3] = {
{1, arcs_5_0},
- {2, arcs_5_1},
+ {3, arcs_5_1},
{1, arcs_5_2},
};
static arc arcs_6_0[1] = {
- {20, 1},
+ {21, 1},
};
static arc arcs_6_1[1] = {
- {21, 2},
+ {19, 2},
};
static arc arcs_6_2[1] = {
- {22, 3},
+ {0, 2},
};
-static arc arcs_6_3[2] = {
- {23, 4},
- {25, 5},
+static state states_6[3] = {
+ {1, arcs_6_0},
+ {1, arcs_6_1},
+ {1, arcs_6_2},
};
-static arc arcs_6_4[1] = {
- {24, 6},
+static arc arcs_7_0[1] = {
+ {22, 1},
};
-static arc arcs_6_5[1] = {
- {26, 7},
+static arc arcs_7_1[1] = {
+ {23, 2},
};
-static arc arcs_6_6[1] = {
- {25, 5},
+static arc arcs_7_2[1] = {
+ {24, 3},
};
-static arc arcs_6_7[1] = {
+static arc arcs_7_3[2] = {
+ {25, 4},
+ {27, 5},
+};
+static arc arcs_7_4[1] = {
+ {26, 6},
+};
+static arc arcs_7_5[1] = {
+ {28, 7},
+};
+static arc arcs_7_6[1] = {
+ {27, 5},
+};
+static arc arcs_7_7[1] = {
{0, 7},
};
-static state states_6[8] = {
- {1, arcs_6_0},
- {1, arcs_6_1},
- {1, arcs_6_2},
- {2, arcs_6_3},
- {1, arcs_6_4},
- {1, arcs_6_5},
- {1, arcs_6_6},
- {1, arcs_6_7},
+static state states_7[8] = {
+ {1, arcs_7_0},
+ {1, arcs_7_1},
+ {1, arcs_7_2},
+ {2, arcs_7_3},
+ {1, arcs_7_4},
+ {1, arcs_7_5},
+ {1, arcs_7_6},
+ {1, arcs_7_7},
};
-static arc arcs_7_0[1] = {
+static arc arcs_8_0[1] = {
{13, 1},
};
-static arc arcs_7_1[2] = {
- {27, 2},
+static arc arcs_8_1[2] = {
+ {29, 2},
{15, 3},
};
-static arc arcs_7_2[1] = {
+static arc arcs_8_2[1] = {
{15, 3},
};
-static arc arcs_7_3[1] = {
+static arc arcs_8_3[1] = {
{0, 3},
};
-static state states_7[4] = {
- {1, arcs_7_0},
- {2, arcs_7_1},
- {1, arcs_7_2},
- {1, arcs_7_3},
+static state states_8[4] = {
+ {1, arcs_8_0},
+ {2, arcs_8_1},
+ {1, arcs_8_2},
+ {1, arcs_8_3},
};
-static arc arcs_8_0[3] = {
- {28, 1},
- {31, 2},
- {32, 3},
+static arc arcs_9_0[3] = {
+ {30, 1},
+ {33, 2},
+ {34, 3},
};
-static arc arcs_8_1[3] = {
- {29, 4},
- {30, 5},
+static arc arcs_9_1[3] = {
+ {31, 4},
+ {32, 5},
{0, 1},
};
-static arc arcs_8_2[3] = {
- {28, 6},
- {30, 7},
+static arc arcs_9_2[3] = {
+ {30, 6},
+ {32, 7},
{0, 2},
};
-static arc arcs_8_3[1] = {
- {28, 8},
+static arc arcs_9_3[1] = {
+ {30, 8},
};
-static arc arcs_8_4[1] = {
- {24, 9},
+static arc arcs_9_4[1] = {
+ {26, 9},
};
-static arc arcs_8_5[4] = {
- {28, 10},
- {31, 11},
- {32, 3},
+static arc arcs_9_5[4] = {
+ {30, 10},
+ {33, 11},
+ {34, 3},
{0, 5},
};
-static arc arcs_8_6[2] = {
- {30, 7},
+static arc arcs_9_6[2] = {
+ {32, 7},
{0, 6},
};
-static arc arcs_8_7[2] = {
- {28, 12},
- {32, 3},
+static arc arcs_9_7[2] = {
+ {30, 12},
+ {34, 3},
};
-static arc arcs_8_8[1] = {
+static arc arcs_9_8[1] = {
{0, 8},
};
-static arc arcs_8_9[2] = {
- {30, 5},
+static arc arcs_9_9[2] = {
+ {32, 5},
{0, 9},
};
-static arc arcs_8_10[3] = {
- {30, 5},
- {29, 4},
+static arc arcs_9_10[3] = {
+ {32, 5},
+ {31, 4},
{0, 10},
};
-static arc arcs_8_11[3] = {
- {28, 13},
- {30, 14},
+static arc arcs_9_11[3] = {
+ {30, 13},
+ {32, 14},
{0, 11},
};
-static arc arcs_8_12[3] = {
- {30, 7},
- {29, 15},
+static arc arcs_9_12[3] = {
+ {32, 7},
+ {31, 15},
{0, 12},
};
-static arc arcs_8_13[2] = {
- {30, 14},
+static arc arcs_9_13[2] = {
+ {32, 14},
{0, 13},
};
-static arc arcs_8_14[2] = {
- {28, 16},
- {32, 3},
+static arc arcs_9_14[2] = {
+ {30, 16},
+ {34, 3},
};
-static arc arcs_8_15[1] = {
- {24, 6},
+static arc arcs_9_15[1] = {
+ {26, 6},
};
-static arc arcs_8_16[3] = {
- {30, 14},
- {29, 17},
+static arc arcs_9_16[3] = {
+ {32, 14},
+ {31, 17},
{0, 16},
};
-static arc arcs_8_17[1] = {
- {24, 13},
-};
-static state states_8[18] = {
- {3, arcs_8_0},
- {3, arcs_8_1},
- {3, arcs_8_2},
- {1, arcs_8_3},
- {1, arcs_8_4},
- {4, arcs_8_5},
- {2, arcs_8_6},
- {2, arcs_8_7},
- {1, arcs_8_8},
- {2, arcs_8_9},
- {3, arcs_8_10},
- {3, arcs_8_11},
- {3, arcs_8_12},
- {2, arcs_8_13},
- {2, arcs_8_14},
- {1, arcs_8_15},
- {3, arcs_8_16},
- {1, arcs_8_17},
-};
-static arc arcs_9_0[1] = {
- {21, 1},
+static arc arcs_9_17[1] = {
+ {26, 13},
};
-static arc arcs_9_1[2] = {
- {25, 2},
+static state states_9[18] = {
+ {3, arcs_9_0},
+ {3, arcs_9_1},
+ {3, arcs_9_2},
+ {1, arcs_9_3},
+ {1, arcs_9_4},
+ {4, arcs_9_5},
+ {2, arcs_9_6},
+ {2, arcs_9_7},
+ {1, arcs_9_8},
+ {2, arcs_9_9},
+ {3, arcs_9_10},
+ {3, arcs_9_11},
+ {3, arcs_9_12},
+ {2, arcs_9_13},
+ {2, arcs_9_14},
+ {1, arcs_9_15},
+ {3, arcs_9_16},
+ {1, arcs_9_17},
+};
+static arc arcs_10_0[1] = {
+ {23, 1},
+};
+static arc arcs_10_1[2] = {
+ {27, 2},
{0, 1},
};
-static arc arcs_9_2[1] = {
- {24, 3},
+static arc arcs_10_2[1] = {
+ {26, 3},
};
-static arc arcs_9_3[1] = {
+static arc arcs_10_3[1] = {
{0, 3},
};
-static state states_9[4] = {
- {1, arcs_9_0},
- {2, arcs_9_1},
- {1, arcs_9_2},
- {1, arcs_9_3},
+static state states_10[4] = {
+ {1, arcs_10_0},
+ {2, arcs_10_1},
+ {1, arcs_10_2},
+ {1, arcs_10_3},
};
-static arc arcs_10_0[3] = {
- {34, 1},
- {31, 2},
- {32, 3},
+static arc arcs_11_0[3] = {
+ {36, 1},
+ {33, 2},
+ {34, 3},
};
-static arc arcs_10_1[3] = {
- {29, 4},
- {30, 5},
+static arc arcs_11_1[3] = {
+ {31, 4},
+ {32, 5},
{0, 1},
};
-static arc arcs_10_2[3] = {
- {34, 6},
- {30, 7},
+static arc arcs_11_2[3] = {
+ {36, 6},
+ {32, 7},
{0, 2},
};
-static arc arcs_10_3[1] = {
- {34, 8},
+static arc arcs_11_3[1] = {
+ {36, 8},
};
-static arc arcs_10_4[1] = {
- {24, 9},
+static arc arcs_11_4[1] = {
+ {26, 9},
};
-static arc arcs_10_5[4] = {
- {34, 10},
- {31, 11},
- {32, 3},
+static arc arcs_11_5[4] = {
+ {36, 10},
+ {33, 11},
+ {34, 3},
{0, 5},
};
-static arc arcs_10_6[2] = {
- {30, 7},
+static arc arcs_11_6[2] = {
+ {32, 7},
{0, 6},
};
-static arc arcs_10_7[2] = {
- {34, 12},
- {32, 3},
+static arc arcs_11_7[2] = {
+ {36, 12},
+ {34, 3},
};
-static arc arcs_10_8[1] = {
+static arc arcs_11_8[1] = {
{0, 8},
};
-static arc arcs_10_9[2] = {
- {30, 5},
+static arc arcs_11_9[2] = {
+ {32, 5},
{0, 9},
};
-static arc arcs_10_10[3] = {
- {30, 5},
- {29, 4},
+static arc arcs_11_10[3] = {
+ {32, 5},
+ {31, 4},
{0, 10},
};
-static arc arcs_10_11[3] = {
- {34, 13},
- {30, 14},
+static arc arcs_11_11[3] = {
+ {36, 13},
+ {32, 14},
{0, 11},
};
-static arc arcs_10_12[3] = {
- {30, 7},
- {29, 15},
+static arc arcs_11_12[3] = {
+ {32, 7},
+ {31, 15},
{0, 12},
};
-static arc arcs_10_13[2] = {
- {30, 14},
+static arc arcs_11_13[2] = {
+ {32, 14},
{0, 13},
};
-static arc arcs_10_14[2] = {
- {34, 16},
- {32, 3},
+static arc arcs_11_14[2] = {
+ {36, 16},
+ {34, 3},
};
-static arc arcs_10_15[1] = {
- {24, 6},
+static arc arcs_11_15[1] = {
+ {26, 6},
};
-static arc arcs_10_16[3] = {
- {30, 14},
- {29, 17},
+static arc arcs_11_16[3] = {
+ {32, 14},
+ {31, 17},
{0, 16},
};
-static arc arcs_10_17[1] = {
- {24, 13},
+static arc arcs_11_17[1] = {
+ {26, 13},
+};
+static state states_11[18] = {
+ {3, arcs_11_0},
+ {3, arcs_11_1},
+ {3, arcs_11_2},
+ {1, arcs_11_3},
+ {1, arcs_11_4},
+ {4, arcs_11_5},
+ {2, arcs_11_6},
+ {2, arcs_11_7},
+ {1, arcs_11_8},
+ {2, arcs_11_9},
+ {3, arcs_11_10},
+ {3, arcs_11_11},
+ {3, arcs_11_12},
+ {2, arcs_11_13},
+ {2, arcs_11_14},
+ {1, arcs_11_15},
+ {3, arcs_11_16},
+ {1, arcs_11_17},
+};
+static arc arcs_12_0[1] = {
+ {23, 1},
};
-static state states_10[18] = {
- {3, arcs_10_0},
- {3, arcs_10_1},
- {3, arcs_10_2},
- {1, arcs_10_3},
- {1, arcs_10_4},
- {4, arcs_10_5},
- {2, arcs_10_6},
- {2, arcs_10_7},
- {1, arcs_10_8},
- {2, arcs_10_9},
- {3, arcs_10_10},
- {3, arcs_10_11},
- {3, arcs_10_12},
- {2, arcs_10_13},
- {2, arcs_10_14},
- {1, arcs_10_15},
- {3, arcs_10_16},
- {1, arcs_10_17},
-};
-static arc arcs_11_0[1] = {
- {21, 1},
-};
-static arc arcs_11_1[1] = {
+static arc arcs_12_1[1] = {
{0, 1},
};
-static state states_11[2] = {
- {1, arcs_11_0},
- {1, arcs_11_1},
+static state states_12[2] = {
+ {1, arcs_12_0},
+ {1, arcs_12_1},
};
-static arc arcs_12_0[2] = {
+static arc arcs_13_0[2] = {
{3, 1},
{4, 1},
};
-static arc arcs_12_1[1] = {
+static arc arcs_13_1[1] = {
{0, 1},
};
-static state states_12[2] = {
- {2, arcs_12_0},
- {1, arcs_12_1},
+static state states_13[2] = {
+ {2, arcs_13_0},
+ {1, arcs_13_1},
};
-static arc arcs_13_0[1] = {
- {35, 1},
+static arc arcs_14_0[1] = {
+ {37, 1},
};
-static arc arcs_13_1[2] = {
- {36, 2},
+static arc arcs_14_1[2] = {
+ {38, 2},
{2, 3},
};
-static arc arcs_13_2[2] = {
- {35, 1},
+static arc arcs_14_2[2] = {
+ {37, 1},
{2, 3},
};
-static arc arcs_13_3[1] = {
+static arc arcs_14_3[1] = {
{0, 3},
};
-static state states_13[4] = {
- {1, arcs_13_0},
- {2, arcs_13_1},
- {2, arcs_13_2},
- {1, arcs_13_3},
+static state states_14[4] = {
+ {1, arcs_14_0},
+ {2, arcs_14_1},
+ {2, arcs_14_2},
+ {1, arcs_14_3},
};
-static arc arcs_14_0[8] = {
- {37, 1},
- {38, 1},
+static arc arcs_15_0[8] = {
{39, 1},
{40, 1},
{41, 1},
{42, 1},
{43, 1},
{44, 1},
+ {45, 1},
+ {46, 1},
};
-static arc arcs_14_1[1] = {
+static arc arcs_15_1[1] = {
{0, 1},
};
-static state states_14[2] = {
- {8, arcs_14_0},
- {1, arcs_14_1},
+static state states_15[2] = {
+ {8, arcs_15_0},
+ {1, arcs_15_1},
};
-static arc arcs_15_0[1] = {
- {45, 1},
+static arc arcs_16_0[1] = {
+ {47, 1},
};
-static arc arcs_15_1[3] = {
- {46, 2},
- {29, 3},
+static arc arcs_16_1[3] = {
+ {48, 2},
+ {31, 3},
{0, 1},
};
-static arc arcs_15_2[2] = {
- {47, 4},
+static arc arcs_16_2[2] = {
+ {49, 4},
{9, 4},
};
-static arc arcs_15_3[2] = {
+static arc arcs_16_3[2] = {
+ {49, 5},
{47, 5},
- {45, 5},
};
-static arc arcs_15_4[1] = {
+static arc arcs_16_4[1] = {
{0, 4},
};
-static arc arcs_15_5[2] = {
- {29, 3},
+static arc arcs_16_5[2] = {
+ {31, 3},
{0, 5},
};
-static state states_15[6] = {
- {1, arcs_15_0},
- {3, arcs_15_1},
- {2, arcs_15_2},
- {2, arcs_15_3},
- {1, arcs_15_4},
- {2, arcs_15_5},
+static state states_16[6] = {
+ {1, arcs_16_0},
+ {3, arcs_16_1},
+ {2, arcs_16_2},
+ {2, arcs_16_3},
+ {1, arcs_16_4},
+ {2, arcs_16_5},
};
-static arc arcs_16_0[2] = {
- {24, 1},
- {48, 1},
+static arc arcs_17_0[2] = {
+ {26, 1},
+ {50, 1},
};
-static arc arcs_16_1[2] = {
- {30, 2},
+static arc arcs_17_1[2] = {
+ {32, 2},
{0, 1},
};
-static arc arcs_16_2[3] = {
- {24, 1},
- {48, 1},
+static arc arcs_17_2[3] = {
+ {26, 1},
+ {50, 1},
{0, 2},
};
-static state states_16[3] = {
- {2, arcs_16_0},
- {2, arcs_16_1},
- {3, arcs_16_2},
+static state states_17[3] = {
+ {2, arcs_17_0},
+ {2, arcs_17_1},
+ {3, arcs_17_2},
};
-static arc arcs_17_0[12] = {
- {49, 1},
- {50, 1},
+static arc arcs_18_0[13] = {
{51, 1},
{52, 1},
{53, 1},
@@ -489,64 +502,57 @@ static arc arcs_17_0[12] = {
{58, 1},
{59, 1},
{60, 1},
-};
-static arc arcs_17_1[1] = {
- {0, 1},
-};
-static state states_17[2] = {
- {12, arcs_17_0},
- {1, arcs_17_1},
-};
-static arc arcs_18_0[1] = {
{61, 1},
+ {62, 1},
+ {63, 1},
};
static arc arcs_18_1[1] = {
- {62, 2},
-};
-static arc arcs_18_2[1] = {
- {0, 2},
+ {0, 1},
};
-static state states_18[3] = {
- {1, arcs_18_0},
+static state states_18[2] = {
+ {13, arcs_18_0},
{1, arcs_18_1},
- {1, arcs_18_2},
};
static arc arcs_19_0[1] = {
- {63, 1},
+ {64, 1},
};
static arc arcs_19_1[1] = {
- {0, 1},
+ {65, 2},
};
-static state states_19[2] = {
+static arc arcs_19_2[1] = {
+ {0, 2},
+};
+static state states_19[3] = {
{1, arcs_19_0},
{1, arcs_19_1},
+ {1, arcs_19_2},
};
-static arc arcs_20_0[5] = {
- {64, 1},
- {65, 1},
+static arc arcs_20_0[1] = {
{66, 1},
- {67, 1},
- {68, 1},
};
static arc arcs_20_1[1] = {
{0, 1},
};
static state states_20[2] = {
- {5, arcs_20_0},
+ {1, arcs_20_0},
{1, arcs_20_1},
};
-static arc arcs_21_0[1] = {
+static arc arcs_21_0[5] = {
+ {67, 1},
+ {68, 1},
{69, 1},
+ {70, 1},
+ {71, 1},
};
static arc arcs_21_1[1] = {
{0, 1},
};
static state states_21[2] = {
- {1, arcs_21_0},
+ {5, arcs_21_0},
{1, arcs_21_1},
};
static arc arcs_22_0[1] = {
- {70, 1},
+ {72, 1},
};
static arc arcs_22_1[1] = {
{0, 1},
@@ -556,148 +562,139 @@ static state states_22[2] = {
{1, arcs_22_1},
};
static arc arcs_23_0[1] = {
- {71, 1},
+ {73, 1},
};
-static arc arcs_23_1[2] = {
- {9, 2},
+static arc arcs_23_1[1] = {
{0, 1},
};
-static arc arcs_23_2[1] = {
- {0, 2},
-};
-static state states_23[3] = {
+static state states_23[2] = {
{1, arcs_23_0},
- {2, arcs_23_1},
- {1, arcs_23_2},
+ {1, arcs_23_1},
};
static arc arcs_24_0[1] = {
- {47, 1},
+ {74, 1},
};
-static arc arcs_24_1[1] = {
+static arc arcs_24_1[2] = {
+ {9, 2},
{0, 1},
};
-static state states_24[2] = {
+static arc arcs_24_2[1] = {
+ {0, 2},
+};
+static state states_24[3] = {
{1, arcs_24_0},
- {1, arcs_24_1},
+ {2, arcs_24_1},
+ {1, arcs_24_2},
};
static arc arcs_25_0[1] = {
- {72, 1},
+ {49, 1},
+};
+static arc arcs_25_1[1] = {
+ {0, 1},
+};
+static state states_25[2] = {
+ {1, arcs_25_0},
+ {1, arcs_25_1},
};
-static arc arcs_25_1[2] = {
- {24, 2},
+static arc arcs_26_0[1] = {
+ {75, 1},
+};
+static arc arcs_26_1[2] = {
+ {26, 2},
{0, 1},
};
-static arc arcs_25_2[2] = {
- {73, 3},
+static arc arcs_26_2[2] = {
+ {76, 3},
{0, 2},
};
-static arc arcs_25_3[1] = {
- {24, 4},
+static arc arcs_26_3[1] = {
+ {26, 4},
};
-static arc arcs_25_4[1] = {
+static arc arcs_26_4[1] = {
{0, 4},
};
-static state states_25[5] = {
- {1, arcs_25_0},
- {2, arcs_25_1},
- {2, arcs_25_2},
- {1, arcs_25_3},
- {1, arcs_25_4},
+static state states_26[5] = {
+ {1, arcs_26_0},
+ {2, arcs_26_1},
+ {2, arcs_26_2},
+ {1, arcs_26_3},
+ {1, arcs_26_4},
};
-static arc arcs_26_0[2] = {
- {74, 1},
- {75, 1},
+static arc arcs_27_0[2] = {
+ {77, 1},
+ {78, 1},
};
-static arc arcs_26_1[1] = {
+static arc arcs_27_1[1] = {
{0, 1},
};
-static state states_26[2] = {
- {2, arcs_26_0},
- {1, arcs_26_1},
+static state states_27[2] = {
+ {2, arcs_27_0},
+ {1, arcs_27_1},
};
-static arc arcs_27_0[1] = {
- {76, 1},
+static arc arcs_28_0[1] = {
+ {79, 1},
};
-static arc arcs_27_1[1] = {
- {77, 2},
+static arc arcs_28_1[1] = {
+ {80, 2},
};
-static arc arcs_27_2[1] = {
+static arc arcs_28_2[1] = {
{0, 2},
};
-static state states_27[3] = {
- {1, arcs_27_0},
- {1, arcs_27_1},
- {1, arcs_27_2},
+static state states_28[3] = {
+ {1, arcs_28_0},
+ {1, arcs_28_1},
+ {1, arcs_28_2},
};
-static arc arcs_28_0[1] = {
- {73, 1},
+static arc arcs_29_0[1] = {
+ {76, 1},
};
-static arc arcs_28_1[3] = {
- {78, 2},
- {79, 2},
+static arc arcs_29_1[3] = {
+ {81, 2},
+ {82, 2},
{12, 3},
};
-static arc arcs_28_2[4] = {
- {78, 2},
- {79, 2},
+static arc arcs_29_2[4] = {
+ {81, 2},
+ {82, 2},
{12, 3},
- {76, 4},
+ {79, 4},
};
-static arc arcs_28_3[1] = {
- {76, 4},
+static arc arcs_29_3[1] = {
+ {79, 4},
};
-static arc arcs_28_4[3] = {
- {31, 5},
+static arc arcs_29_4[3] = {
+ {33, 5},
{13, 6},
- {80, 5},
+ {83, 5},
};
-static arc arcs_28_5[1] = {
+static arc arcs_29_5[1] = {
{0, 5},
};
-static arc arcs_28_6[1] = {
- {80, 7},
+static arc arcs_29_6[1] = {
+ {83, 7},
};
-static arc arcs_28_7[1] = {
+static arc arcs_29_7[1] = {
{15, 5},
};
-static state states_28[8] = {
- {1, arcs_28_0},
- {3, arcs_28_1},
- {4, arcs_28_2},
- {1, arcs_28_3},
- {3, arcs_28_4},
- {1, arcs_28_5},
- {1, arcs_28_6},
- {1, arcs_28_7},
-};
-static arc arcs_29_0[1] = {
- {21, 1},
-};
-static arc arcs_29_1[2] = {
- {82, 2},
- {0, 1},
-};
-static arc arcs_29_2[1] = {
- {21, 3},
-};
-static arc arcs_29_3[1] = {
- {0, 3},
-};
-static state states_29[4] = {
+static state states_29[8] = {
{1, arcs_29_0},
- {2, arcs_29_1},
- {1, arcs_29_2},
+ {3, arcs_29_1},
+ {4, arcs_29_2},
{1, arcs_29_3},
+ {3, arcs_29_4},
+ {1, arcs_29_5},
+ {1, arcs_29_6},
+ {1, arcs_29_7},
};
static arc arcs_30_0[1] = {
- {12, 1},
+ {23, 1},
};
static arc arcs_30_1[2] = {
- {82, 2},
+ {85, 2},
{0, 1},
};
static arc arcs_30_2[1] = {
- {21, 3},
+ {23, 3},
};
static arc arcs_30_3[1] = {
{0, 3},
@@ -709,37 +706,45 @@ static state states_30[4] = {
{1, arcs_30_3},
};
static arc arcs_31_0[1] = {
- {81, 1},
+ {12, 1},
};
static arc arcs_31_1[2] = {
- {30, 2},
+ {85, 2},
{0, 1},
};
-static arc arcs_31_2[2] = {
- {81, 1},
- {0, 2},
+static arc arcs_31_2[1] = {
+ {23, 3},
};
-static state states_31[3] = {
+static arc arcs_31_3[1] = {
+ {0, 3},
+};
+static state states_31[4] = {
{1, arcs_31_0},
{2, arcs_31_1},
- {2, arcs_31_2},
+ {1, arcs_31_2},
+ {1, arcs_31_3},
};
static arc arcs_32_0[1] = {
- {83, 1},
+ {84, 1},
};
static arc arcs_32_1[2] = {
- {30, 0},
+ {32, 2},
{0, 1},
};
-static state states_32[2] = {
+static arc arcs_32_2[2] = {
+ {84, 1},
+ {0, 2},
+};
+static state states_32[3] = {
{1, arcs_32_0},
{2, arcs_32_1},
+ {2, arcs_32_2},
};
static arc arcs_33_0[1] = {
- {21, 1},
+ {86, 1},
};
static arc arcs_33_1[2] = {
- {78, 0},
+ {32, 0},
{0, 1},
};
static state states_33[2] = {
@@ -747,28 +752,24 @@ static state states_33[2] = {
{2, arcs_33_1},
};
static arc arcs_34_0[1] = {
- {84, 1},
-};
-static arc arcs_34_1[1] = {
- {21, 2},
+ {23, 1},
};
-static arc arcs_34_2[2] = {
- {30, 1},
- {0, 2},
+static arc arcs_34_1[2] = {
+ {81, 0},
+ {0, 1},
};
-static state states_34[3] = {
+static state states_34[2] = {
{1, arcs_34_0},
- {1, arcs_34_1},
- {2, arcs_34_2},
+ {2, arcs_34_1},
};
static arc arcs_35_0[1] = {
- {85, 1},
+ {87, 1},
};
static arc arcs_35_1[1] = {
- {21, 2},
+ {23, 2},
};
static arc arcs_35_2[2] = {
- {30, 1},
+ {32, 1},
{0, 2},
};
static state states_35[3] = {
@@ -777,504 +778,514 @@ static state states_35[3] = {
{2, arcs_35_2},
};
static arc arcs_36_0[1] = {
- {86, 1},
+ {88, 1},
};
static arc arcs_36_1[1] = {
- {24, 2},
+ {23, 2},
};
static arc arcs_36_2[2] = {
- {30, 3},
+ {32, 1},
{0, 2},
};
-static arc arcs_36_3[1] = {
- {24, 4},
-};
-static arc arcs_36_4[1] = {
- {0, 4},
-};
-static state states_36[5] = {
+static state states_36[3] = {
{1, arcs_36_0},
{1, arcs_36_1},
{2, arcs_36_2},
- {1, arcs_36_3},
- {1, arcs_36_4},
};
-static arc arcs_37_0[8] = {
- {87, 1},
- {88, 1},
+static arc arcs_37_0[1] = {
{89, 1},
- {90, 1},
- {91, 1},
- {19, 1},
- {18, 1},
- {17, 1},
};
static arc arcs_37_1[1] = {
- {0, 1},
-};
-static state states_37[2] = {
- {8, arcs_37_0},
- {1, arcs_37_1},
-};
-static arc arcs_38_0[1] = {
- {92, 1},
+ {26, 2},
};
-static arc arcs_38_1[1] = {
- {24, 2},
-};
-static arc arcs_38_2[1] = {
- {25, 3},
+static arc arcs_37_2[2] = {
+ {32, 3},
+ {0, 2},
};
-static arc arcs_38_3[1] = {
+static arc arcs_37_3[1] = {
{26, 4},
};
-static arc arcs_38_4[3] = {
- {93, 1},
- {94, 5},
+static arc arcs_37_4[1] = {
{0, 4},
};
-static arc arcs_38_5[1] = {
- {25, 6},
+static state states_37[5] = {
+ {1, arcs_37_0},
+ {1, arcs_37_1},
+ {2, arcs_37_2},
+ {1, arcs_37_3},
+ {1, arcs_37_4},
};
-static arc arcs_38_6[1] = {
- {26, 7},
+static arc arcs_38_0[9] = {
+ {90, 1},
+ {91, 1},
+ {92, 1},
+ {93, 1},
+ {94, 1},
+ {19, 1},
+ {18, 1},
+ {17, 1},
+ {95, 1},
};
-static arc arcs_38_7[1] = {
- {0, 7},
+static arc arcs_38_1[1] = {
+ {0, 1},
};
-static state states_38[8] = {
- {1, arcs_38_0},
+static state states_38[2] = {
+ {9, arcs_38_0},
{1, arcs_38_1},
- {1, arcs_38_2},
- {1, arcs_38_3},
- {3, arcs_38_4},
- {1, arcs_38_5},
- {1, arcs_38_6},
- {1, arcs_38_7},
};
static arc arcs_39_0[1] = {
- {95, 1},
+ {21, 1},
};
-static arc arcs_39_1[1] = {
- {24, 2},
+static arc arcs_39_1[3] = {
+ {19, 2},
+ {94, 2},
+ {92, 2},
};
static arc arcs_39_2[1] = {
- {25, 3},
-};
-static arc arcs_39_3[1] = {
- {26, 4},
-};
-static arc arcs_39_4[2] = {
- {94, 5},
- {0, 4},
-};
-static arc arcs_39_5[1] = {
- {25, 6},
-};
-static arc arcs_39_6[1] = {
- {26, 7},
-};
-static arc arcs_39_7[1] = {
- {0, 7},
+ {0, 2},
};
-static state states_39[8] = {
+static state states_39[3] = {
{1, arcs_39_0},
- {1, arcs_39_1},
+ {3, arcs_39_1},
{1, arcs_39_2},
- {1, arcs_39_3},
- {2, arcs_39_4},
- {1, arcs_39_5},
- {1, arcs_39_6},
- {1, arcs_39_7},
};
static arc arcs_40_0[1] = {
{96, 1},
};
static arc arcs_40_1[1] = {
- {62, 2},
+ {26, 2},
};
static arc arcs_40_2[1] = {
- {97, 3},
+ {27, 3},
};
static arc arcs_40_3[1] = {
- {9, 4},
+ {28, 4},
};
-static arc arcs_40_4[1] = {
- {25, 5},
+static arc arcs_40_4[3] = {
+ {97, 1},
+ {98, 5},
+ {0, 4},
};
static arc arcs_40_5[1] = {
- {26, 6},
+ {27, 6},
};
-static arc arcs_40_6[2] = {
- {94, 7},
- {0, 6},
+static arc arcs_40_6[1] = {
+ {28, 7},
};
static arc arcs_40_7[1] = {
- {25, 8},
-};
-static arc arcs_40_8[1] = {
- {26, 9},
-};
-static arc arcs_40_9[1] = {
- {0, 9},
+ {0, 7},
};
-static state states_40[10] = {
+static state states_40[8] = {
{1, arcs_40_0},
{1, arcs_40_1},
{1, arcs_40_2},
{1, arcs_40_3},
- {1, arcs_40_4},
+ {3, arcs_40_4},
{1, arcs_40_5},
- {2, arcs_40_6},
+ {1, arcs_40_6},
{1, arcs_40_7},
- {1, arcs_40_8},
- {1, arcs_40_9},
};
static arc arcs_41_0[1] = {
- {98, 1},
+ {99, 1},
};
static arc arcs_41_1[1] = {
- {25, 2},
+ {26, 2},
};
static arc arcs_41_2[1] = {
- {26, 3},
+ {27, 3},
};
-static arc arcs_41_3[2] = {
- {99, 4},
- {100, 5},
+static arc arcs_41_3[1] = {
+ {28, 4},
};
-static arc arcs_41_4[1] = {
- {25, 6},
+static arc arcs_41_4[2] = {
+ {98, 5},
+ {0, 4},
};
static arc arcs_41_5[1] = {
- {25, 7},
+ {27, 6},
};
static arc arcs_41_6[1] = {
- {26, 8},
+ {28, 7},
};
static arc arcs_41_7[1] = {
- {26, 9},
-};
-static arc arcs_41_8[4] = {
- {99, 4},
- {94, 10},
- {100, 5},
- {0, 8},
-};
-static arc arcs_41_9[1] = {
- {0, 9},
-};
-static arc arcs_41_10[1] = {
- {25, 11},
-};
-static arc arcs_41_11[1] = {
- {26, 12},
-};
-static arc arcs_41_12[2] = {
- {100, 5},
- {0, 12},
+ {0, 7},
};
-static state states_41[13] = {
+static state states_41[8] = {
{1, arcs_41_0},
{1, arcs_41_1},
{1, arcs_41_2},
- {2, arcs_41_3},
- {1, arcs_41_4},
+ {1, arcs_41_3},
+ {2, arcs_41_4},
{1, arcs_41_5},
{1, arcs_41_6},
{1, arcs_41_7},
- {4, arcs_41_8},
- {1, arcs_41_9},
- {1, arcs_41_10},
- {1, arcs_41_11},
- {2, arcs_41_12},
};
static arc arcs_42_0[1] = {
- {101, 1},
+ {100, 1},
};
static arc arcs_42_1[1] = {
- {102, 2},
+ {65, 2},
};
-static arc arcs_42_2[2] = {
- {30, 1},
- {25, 3},
+static arc arcs_42_2[1] = {
+ {101, 3},
};
static arc arcs_42_3[1] = {
- {26, 4},
+ {9, 4},
};
static arc arcs_42_4[1] = {
- {0, 4},
+ {27, 5},
+};
+static arc arcs_42_5[1] = {
+ {28, 6},
+};
+static arc arcs_42_6[2] = {
+ {98, 7},
+ {0, 6},
+};
+static arc arcs_42_7[1] = {
+ {27, 8},
+};
+static arc arcs_42_8[1] = {
+ {28, 9},
+};
+static arc arcs_42_9[1] = {
+ {0, 9},
};
-static state states_42[5] = {
+static state states_42[10] = {
{1, arcs_42_0},
{1, arcs_42_1},
- {2, arcs_42_2},
+ {1, arcs_42_2},
{1, arcs_42_3},
{1, arcs_42_4},
+ {1, arcs_42_5},
+ {2, arcs_42_6},
+ {1, arcs_42_7},
+ {1, arcs_42_8},
+ {1, arcs_42_9},
};
static arc arcs_43_0[1] = {
- {24, 1},
+ {102, 1},
};
-static arc arcs_43_1[2] = {
- {82, 2},
- {0, 1},
+static arc arcs_43_1[1] = {
+ {27, 2},
};
static arc arcs_43_2[1] = {
- {103, 3},
+ {28, 3},
};
-static arc arcs_43_3[1] = {
- {0, 3},
+static arc arcs_43_3[2] = {
+ {103, 4},
+ {104, 5},
+};
+static arc arcs_43_4[1] = {
+ {27, 6},
+};
+static arc arcs_43_5[1] = {
+ {27, 7},
+};
+static arc arcs_43_6[1] = {
+ {28, 8},
+};
+static arc arcs_43_7[1] = {
+ {28, 9},
+};
+static arc arcs_43_8[4] = {
+ {103, 4},
+ {98, 10},
+ {104, 5},
+ {0, 8},
+};
+static arc arcs_43_9[1] = {
+ {0, 9},
+};
+static arc arcs_43_10[1] = {
+ {27, 11},
+};
+static arc arcs_43_11[1] = {
+ {28, 12},
};
-static state states_43[4] = {
+static arc arcs_43_12[2] = {
+ {104, 5},
+ {0, 12},
+};
+static state states_43[13] = {
{1, arcs_43_0},
- {2, arcs_43_1},
+ {1, arcs_43_1},
{1, arcs_43_2},
- {1, arcs_43_3},
+ {2, arcs_43_3},
+ {1, arcs_43_4},
+ {1, arcs_43_5},
+ {1, arcs_43_6},
+ {1, arcs_43_7},
+ {4, arcs_43_8},
+ {1, arcs_43_9},
+ {1, arcs_43_10},
+ {1, arcs_43_11},
+ {2, arcs_43_12},
};
static arc arcs_44_0[1] = {
- {104, 1},
+ {105, 1},
};
-static arc arcs_44_1[2] = {
- {24, 2},
- {0, 1},
+static arc arcs_44_1[1] = {
+ {106, 2},
};
static arc arcs_44_2[2] = {
- {82, 3},
- {0, 2},
+ {32, 1},
+ {27, 3},
};
static arc arcs_44_3[1] = {
- {21, 4},
+ {28, 4},
};
static arc arcs_44_4[1] = {
{0, 4},
};
static state states_44[5] = {
{1, arcs_44_0},
- {2, arcs_44_1},
+ {1, arcs_44_1},
{2, arcs_44_2},
{1, arcs_44_3},
{1, arcs_44_4},
};
-static arc arcs_45_0[2] = {
- {3, 1},
- {2, 2},
+static arc arcs_45_0[1] = {
+ {26, 1},
};
-static arc arcs_45_1[1] = {
+static arc arcs_45_1[2] = {
+ {85, 2},
{0, 1},
};
static arc arcs_45_2[1] = {
- {105, 3},
+ {107, 3},
};
static arc arcs_45_3[1] = {
- {6, 4},
-};
-static arc arcs_45_4[2] = {
- {6, 4},
- {106, 1},
+ {0, 3},
};
-static state states_45[5] = {
- {2, arcs_45_0},
- {1, arcs_45_1},
+static state states_45[4] = {
+ {1, arcs_45_0},
+ {2, arcs_45_1},
{1, arcs_45_2},
{1, arcs_45_3},
- {2, arcs_45_4},
};
-static arc arcs_46_0[2] = {
- {107, 1},
- {108, 2},
+static arc arcs_46_0[1] = {
+ {108, 1},
};
static arc arcs_46_1[2] = {
- {92, 3},
+ {26, 2},
{0, 1},
};
-static arc arcs_46_2[1] = {
+static arc arcs_46_2[2] = {
+ {85, 3},
{0, 2},
};
static arc arcs_46_3[1] = {
- {107, 4},
+ {23, 4},
};
static arc arcs_46_4[1] = {
- {94, 5},
-};
-static arc arcs_46_5[1] = {
- {24, 2},
+ {0, 4},
};
-static state states_46[6] = {
- {2, arcs_46_0},
+static state states_46[5] = {
+ {1, arcs_46_0},
{2, arcs_46_1},
- {1, arcs_46_2},
+ {2, arcs_46_2},
{1, arcs_46_3},
{1, arcs_46_4},
- {1, arcs_46_5},
};
static arc arcs_47_0[2] = {
- {107, 1},
- {110, 1},
+ {3, 1},
+ {2, 2},
};
static arc arcs_47_1[1] = {
{0, 1},
};
-static state states_47[2] = {
+static arc arcs_47_2[1] = {
+ {109, 3},
+};
+static arc arcs_47_3[1] = {
+ {6, 4},
+};
+static arc arcs_47_4[2] = {
+ {6, 4},
+ {110, 1},
+};
+static state states_47[5] = {
{2, arcs_47_0},
{1, arcs_47_1},
+ {1, arcs_47_2},
+ {1, arcs_47_3},
+ {2, arcs_47_4},
};
-static arc arcs_48_0[1] = {
+static arc arcs_48_0[2] = {
{111, 1},
+ {112, 2},
};
static arc arcs_48_1[2] = {
- {33, 2},
- {25, 3},
+ {96, 3},
+ {0, 1},
};
static arc arcs_48_2[1] = {
- {25, 3},
+ {0, 2},
};
static arc arcs_48_3[1] = {
- {24, 4},
+ {111, 4},
};
static arc arcs_48_4[1] = {
- {0, 4},
+ {98, 5},
+};
+static arc arcs_48_5[1] = {
+ {26, 2},
};
-static state states_48[5] = {
- {1, arcs_48_0},
+static state states_48[6] = {
+ {2, arcs_48_0},
{2, arcs_48_1},
{1, arcs_48_2},
{1, arcs_48_3},
{1, arcs_48_4},
+ {1, arcs_48_5},
};
-static arc arcs_49_0[1] = {
+static arc arcs_49_0[2] = {
{111, 1},
+ {114, 1},
};
-static arc arcs_49_1[2] = {
- {33, 2},
- {25, 3},
+static arc arcs_49_1[1] = {
+ {0, 1},
};
-static arc arcs_49_2[1] = {
- {25, 3},
+static state states_49[2] = {
+ {2, arcs_49_0},
+ {1, arcs_49_1},
};
-static arc arcs_49_3[1] = {
- {109, 4},
+static arc arcs_50_0[1] = {
+ {115, 1},
};
-static arc arcs_49_4[1] = {
- {0, 4},
+static arc arcs_50_1[2] = {
+ {35, 2},
+ {27, 3},
};
-static state states_49[5] = {
- {1, arcs_49_0},
- {2, arcs_49_1},
- {1, arcs_49_2},
- {1, arcs_49_3},
- {1, arcs_49_4},
+static arc arcs_50_2[1] = {
+ {27, 3},
};
-static arc arcs_50_0[1] = {
- {112, 1},
+static arc arcs_50_3[1] = {
+ {26, 4},
};
-static arc arcs_50_1[2] = {
- {113, 0},
- {0, 1},
+static arc arcs_50_4[1] = {
+ {0, 4},
};
-static state states_50[2] = {
+static state states_50[5] = {
{1, arcs_50_0},
{2, arcs_50_1},
+ {1, arcs_50_2},
+ {1, arcs_50_3},
+ {1, arcs_50_4},
};
static arc arcs_51_0[1] = {
- {114, 1},
+ {115, 1},
};
static arc arcs_51_1[2] = {
- {115, 0},
- {0, 1},
+ {35, 2},
+ {27, 3},
+};
+static arc arcs_51_2[1] = {
+ {27, 3},
+};
+static arc arcs_51_3[1] = {
+ {113, 4},
+};
+static arc arcs_51_4[1] = {
+ {0, 4},
};
-static state states_51[2] = {
+static state states_51[5] = {
{1, arcs_51_0},
{2, arcs_51_1},
+ {1, arcs_51_2},
+ {1, arcs_51_3},
+ {1, arcs_51_4},
};
-static arc arcs_52_0[2] = {
+static arc arcs_52_0[1] = {
{116, 1},
- {117, 2},
};
-static arc arcs_52_1[1] = {
- {114, 2},
-};
-static arc arcs_52_2[1] = {
- {0, 2},
+static arc arcs_52_1[2] = {
+ {117, 0},
+ {0, 1},
};
-static state states_52[3] = {
- {2, arcs_52_0},
- {1, arcs_52_1},
- {1, arcs_52_2},
+static state states_52[2] = {
+ {1, arcs_52_0},
+ {2, arcs_52_1},
};
static arc arcs_53_0[1] = {
- {103, 1},
+ {118, 1},
};
static arc arcs_53_1[2] = {
- {118, 0},
+ {119, 0},
{0, 1},
};
static state states_53[2] = {
{1, arcs_53_0},
{2, arcs_53_1},
};
-static arc arcs_54_0[10] = {
- {119, 1},
+static arc arcs_54_0[2] = {
{120, 1},
- {121, 1},
- {122, 1},
- {123, 1},
- {124, 1},
- {125, 1},
- {97, 1},
- {116, 2},
- {126, 3},
+ {121, 2},
};
static arc arcs_54_1[1] = {
- {0, 1},
+ {118, 2},
};
static arc arcs_54_2[1] = {
- {97, 1},
-};
-static arc arcs_54_3[2] = {
- {116, 1},
- {0, 3},
+ {0, 2},
};
-static state states_54[4] = {
- {10, arcs_54_0},
+static state states_54[3] = {
+ {2, arcs_54_0},
{1, arcs_54_1},
{1, arcs_54_2},
- {2, arcs_54_3},
};
static arc arcs_55_0[1] = {
- {31, 1},
-};
-static arc arcs_55_1[1] = {
- {103, 2},
+ {107, 1},
};
-static arc arcs_55_2[1] = {
- {0, 2},
+static arc arcs_55_1[2] = {
+ {122, 0},
+ {0, 1},
};
-static state states_55[3] = {
+static state states_55[2] = {
{1, arcs_55_0},
- {1, arcs_55_1},
- {1, arcs_55_2},
+ {2, arcs_55_1},
};
-static arc arcs_56_0[1] = {
+static arc arcs_56_0[10] = {
+ {123, 1},
+ {124, 1},
+ {125, 1},
+ {126, 1},
{127, 1},
+ {128, 1},
+ {129, 1},
+ {101, 1},
+ {120, 2},
+ {130, 3},
};
-static arc arcs_56_1[2] = {
- {128, 0},
+static arc arcs_56_1[1] = {
{0, 1},
};
-static state states_56[2] = {
- {1, arcs_56_0},
- {2, arcs_56_1},
+static arc arcs_56_2[1] = {
+ {101, 1},
+};
+static arc arcs_56_3[2] = {
+ {120, 1},
+ {0, 3},
+};
+static state states_56[4] = {
+ {10, arcs_56_0},
+ {1, arcs_56_1},
+ {1, arcs_56_2},
+ {2, arcs_56_3},
};
static arc arcs_57_0[1] = {
- {129, 1},
+ {33, 1},
};
-static arc arcs_57_1[2] = {
- {130, 0},
- {0, 1},
+static arc arcs_57_1[1] = {
+ {107, 2},
+};
+static arc arcs_57_2[1] = {
+ {0, 2},
};
-static state states_57[2] = {
+static state states_57[3] = {
{1, arcs_57_0},
- {2, arcs_57_1},
+ {1, arcs_57_1},
+ {1, arcs_57_2},
};
static arc arcs_58_0[1] = {
{131, 1},
@@ -1290,752 +1301,793 @@ static state states_58[2] = {
static arc arcs_59_0[1] = {
{133, 1},
};
-static arc arcs_59_1[3] = {
+static arc arcs_59_1[2] = {
{134, 0},
- {135, 0},
{0, 1},
};
static state states_59[2] = {
{1, arcs_59_0},
- {3, arcs_59_1},
+ {2, arcs_59_1},
};
static arc arcs_60_0[1] = {
- {136, 1},
+ {135, 1},
};
-static arc arcs_60_1[3] = {
- {137, 0},
- {138, 0},
+static arc arcs_60_1[2] = {
+ {136, 0},
{0, 1},
};
static state states_60[2] = {
{1, arcs_60_0},
- {3, arcs_60_1},
+ {2, arcs_60_1},
};
static arc arcs_61_0[1] = {
- {139, 1},
+ {137, 1},
};
-static arc arcs_61_1[5] = {
- {31, 0},
- {140, 0},
- {141, 0},
- {142, 0},
+static arc arcs_61_1[3] = {
+ {138, 0},
+ {139, 0},
{0, 1},
};
static state states_61[2] = {
{1, arcs_61_0},
- {5, arcs_61_1},
+ {3, arcs_61_1},
};
-static arc arcs_62_0[4] = {
- {137, 1},
- {138, 1},
+static arc arcs_62_0[1] = {
+ {140, 1},
+};
+static arc arcs_62_1[3] = {
+ {141, 0},
+ {142, 0},
+ {0, 1},
+};
+static state states_62[2] = {
+ {1, arcs_62_0},
+ {3, arcs_62_1},
+};
+static arc arcs_63_0[1] = {
{143, 1},
- {144, 2},
};
-static arc arcs_62_1[1] = {
- {139, 2},
+static arc arcs_63_1[6] = {
+ {33, 0},
+ {11, 0},
+ {144, 0},
+ {145, 0},
+ {146, 0},
+ {0, 1},
+};
+static state states_63[2] = {
+ {1, arcs_63_0},
+ {6, arcs_63_1},
+};
+static arc arcs_64_0[4] = {
+ {141, 1},
+ {142, 1},
+ {147, 1},
+ {148, 2},
+};
+static arc arcs_64_1[1] = {
+ {143, 2},
};
-static arc arcs_62_2[1] = {
+static arc arcs_64_2[1] = {
{0, 2},
};
-static state states_62[3] = {
- {4, arcs_62_0},
- {1, arcs_62_1},
- {1, arcs_62_2},
+static state states_64[3] = {
+ {4, arcs_64_0},
+ {1, arcs_64_1},
+ {1, arcs_64_2},
};
-static arc arcs_63_0[1] = {
- {145, 1},
+static arc arcs_65_0[1] = {
+ {149, 1},
};
-static arc arcs_63_1[3] = {
- {146, 1},
- {32, 2},
+static arc arcs_65_1[2] = {
+ {34, 2},
{0, 1},
};
-static arc arcs_63_2[1] = {
- {139, 3},
+static arc arcs_65_2[1] = {
+ {143, 3},
};
-static arc arcs_63_3[1] = {
+static arc arcs_65_3[1] = {
{0, 3},
};
-static state states_63[4] = {
- {1, arcs_63_0},
- {3, arcs_63_1},
- {1, arcs_63_2},
- {1, arcs_63_3},
+static state states_65[4] = {
+ {1, arcs_65_0},
+ {2, arcs_65_1},
+ {1, arcs_65_2},
+ {1, arcs_65_3},
+};
+static arc arcs_66_0[2] = {
+ {150, 1},
+ {151, 2},
+};
+static arc arcs_66_1[1] = {
+ {151, 2},
+};
+static arc arcs_66_2[2] = {
+ {152, 2},
+ {0, 2},
+};
+static state states_66[3] = {
+ {2, arcs_66_0},
+ {1, arcs_66_1},
+ {2, arcs_66_2},
};
-static arc arcs_64_0[10] = {
+static arc arcs_67_0[10] = {
{13, 1},
- {148, 2},
- {150, 3},
- {21, 4},
- {153, 4},
- {154, 5},
- {79, 4},
- {155, 4},
- {156, 4},
- {157, 4},
+ {154, 2},
+ {156, 3},
+ {23, 4},
+ {159, 4},
+ {160, 5},
+ {82, 4},
+ {161, 4},
+ {162, 4},
+ {163, 4},
};
-static arc arcs_64_1[3] = {
- {47, 6},
- {147, 6},
+static arc arcs_67_1[3] = {
+ {49, 6},
+ {153, 6},
{15, 4},
};
-static arc arcs_64_2[2] = {
- {147, 7},
- {149, 4},
+static arc arcs_67_2[2] = {
+ {153, 7},
+ {155, 4},
};
-static arc arcs_64_3[2] = {
- {151, 8},
- {152, 4},
+static arc arcs_67_3[2] = {
+ {157, 8},
+ {158, 4},
};
-static arc arcs_64_4[1] = {
+static arc arcs_67_4[1] = {
{0, 4},
};
-static arc arcs_64_5[2] = {
- {154, 5},
+static arc arcs_67_5[2] = {
+ {160, 5},
{0, 5},
};
-static arc arcs_64_6[1] = {
+static arc arcs_67_6[1] = {
{15, 4},
};
-static arc arcs_64_7[1] = {
- {149, 4},
-};
-static arc arcs_64_8[1] = {
- {152, 4},
-};
-static state states_64[9] = {
- {10, arcs_64_0},
- {3, arcs_64_1},
- {2, arcs_64_2},
- {2, arcs_64_3},
- {1, arcs_64_4},
- {2, arcs_64_5},
- {1, arcs_64_6},
- {1, arcs_64_7},
- {1, arcs_64_8},
-};
-static arc arcs_65_0[2] = {
- {24, 1},
- {48, 1},
-};
-static arc arcs_65_1[3] = {
- {158, 2},
- {30, 3},
+static arc arcs_67_7[1] = {
+ {155, 4},
+};
+static arc arcs_67_8[1] = {
+ {158, 4},
+};
+static state states_67[9] = {
+ {10, arcs_67_0},
+ {3, arcs_67_1},
+ {2, arcs_67_2},
+ {2, arcs_67_3},
+ {1, arcs_67_4},
+ {2, arcs_67_5},
+ {1, arcs_67_6},
+ {1, arcs_67_7},
+ {1, arcs_67_8},
+};
+static arc arcs_68_0[2] = {
+ {26, 1},
+ {50, 1},
+};
+static arc arcs_68_1[3] = {
+ {164, 2},
+ {32, 3},
{0, 1},
};
-static arc arcs_65_2[1] = {
+static arc arcs_68_2[1] = {
{0, 2},
};
-static arc arcs_65_3[3] = {
- {24, 4},
- {48, 4},
+static arc arcs_68_3[3] = {
+ {26, 4},
+ {50, 4},
{0, 3},
};
-static arc arcs_65_4[2] = {
- {30, 3},
+static arc arcs_68_4[2] = {
+ {32, 3},
{0, 4},
};
-static state states_65[5] = {
- {2, arcs_65_0},
- {3, arcs_65_1},
- {1, arcs_65_2},
- {3, arcs_65_3},
- {2, arcs_65_4},
+static state states_68[5] = {
+ {2, arcs_68_0},
+ {3, arcs_68_1},
+ {1, arcs_68_2},
+ {3, arcs_68_3},
+ {2, arcs_68_4},
};
-static arc arcs_66_0[3] = {
+static arc arcs_69_0[3] = {
{13, 1},
- {148, 2},
- {78, 3},
+ {154, 2},
+ {81, 3},
};
-static arc arcs_66_1[2] = {
+static arc arcs_69_1[2] = {
{14, 4},
{15, 5},
};
-static arc arcs_66_2[1] = {
- {159, 6},
+static arc arcs_69_2[1] = {
+ {165, 6},
};
-static arc arcs_66_3[1] = {
- {21, 5},
+static arc arcs_69_3[1] = {
+ {23, 5},
};
-static arc arcs_66_4[1] = {
+static arc arcs_69_4[1] = {
{15, 5},
};
-static arc arcs_66_5[1] = {
+static arc arcs_69_5[1] = {
{0, 5},
};
-static arc arcs_66_6[1] = {
- {149, 5},
+static arc arcs_69_6[1] = {
+ {155, 5},
};
-static state states_66[7] = {
- {3, arcs_66_0},
- {2, arcs_66_1},
- {1, arcs_66_2},
- {1, arcs_66_3},
- {1, arcs_66_4},
- {1, arcs_66_5},
- {1, arcs_66_6},
+static state states_69[7] = {
+ {3, arcs_69_0},
+ {2, arcs_69_1},
+ {1, arcs_69_2},
+ {1, arcs_69_3},
+ {1, arcs_69_4},
+ {1, arcs_69_5},
+ {1, arcs_69_6},
};
-static arc arcs_67_0[1] = {
- {160, 1},
+static arc arcs_70_0[1] = {
+ {166, 1},
};
-static arc arcs_67_1[2] = {
- {30, 2},
+static arc arcs_70_1[2] = {
+ {32, 2},
{0, 1},
};
-static arc arcs_67_2[2] = {
- {160, 1},
+static arc arcs_70_2[2] = {
+ {166, 1},
{0, 2},
};
-static state states_67[3] = {
- {1, arcs_67_0},
- {2, arcs_67_1},
- {2, arcs_67_2},
+static state states_70[3] = {
+ {1, arcs_70_0},
+ {2, arcs_70_1},
+ {2, arcs_70_2},
};
-static arc arcs_68_0[2] = {
- {24, 1},
- {25, 2},
+static arc arcs_71_0[2] = {
+ {26, 1},
+ {27, 2},
};
-static arc arcs_68_1[2] = {
- {25, 2},
+static arc arcs_71_1[2] = {
+ {27, 2},
{0, 1},
};
-static arc arcs_68_2[3] = {
- {24, 3},
- {161, 4},
+static arc arcs_71_2[3] = {
+ {26, 3},
+ {167, 4},
{0, 2},
};
-static arc arcs_68_3[2] = {
- {161, 4},
+static arc arcs_71_3[2] = {
+ {167, 4},
{0, 3},
};
-static arc arcs_68_4[1] = {
+static arc arcs_71_4[1] = {
{0, 4},
};
-static state states_68[5] = {
- {2, arcs_68_0},
- {2, arcs_68_1},
- {3, arcs_68_2},
- {2, arcs_68_3},
- {1, arcs_68_4},
+static state states_71[5] = {
+ {2, arcs_71_0},
+ {2, arcs_71_1},
+ {3, arcs_71_2},
+ {2, arcs_71_3},
+ {1, arcs_71_4},
};
-static arc arcs_69_0[1] = {
- {25, 1},
+static arc arcs_72_0[1] = {
+ {27, 1},
};
-static arc arcs_69_1[2] = {
- {24, 2},
+static arc arcs_72_1[2] = {
+ {26, 2},
{0, 1},
};
-static arc arcs_69_2[1] = {
+static arc arcs_72_2[1] = {
{0, 2},
};
-static state states_69[3] = {
- {1, arcs_69_0},
- {2, arcs_69_1},
- {1, arcs_69_2},
+static state states_72[3] = {
+ {1, arcs_72_0},
+ {2, arcs_72_1},
+ {1, arcs_72_2},
};
-static arc arcs_70_0[2] = {
- {103, 1},
- {48, 1},
+static arc arcs_73_0[2] = {
+ {107, 1},
+ {50, 1},
};
-static arc arcs_70_1[2] = {
- {30, 2},
+static arc arcs_73_1[2] = {
+ {32, 2},
{0, 1},
};
-static arc arcs_70_2[3] = {
- {103, 1},
- {48, 1},
+static arc arcs_73_2[3] = {
+ {107, 1},
+ {50, 1},
{0, 2},
};
-static state states_70[3] = {
- {2, arcs_70_0},
- {2, arcs_70_1},
- {3, arcs_70_2},
+static state states_73[3] = {
+ {2, arcs_73_0},
+ {2, arcs_73_1},
+ {3, arcs_73_2},
};
-static arc arcs_71_0[1] = {
- {24, 1},
+static arc arcs_74_0[1] = {
+ {26, 1},
};
-static arc arcs_71_1[2] = {
- {30, 2},
+static arc arcs_74_1[2] = {
+ {32, 2},
{0, 1},
};
-static arc arcs_71_2[2] = {
- {24, 1},
+static arc arcs_74_2[2] = {
+ {26, 1},
{0, 2},
};
-static state states_71[3] = {
- {1, arcs_71_0},
- {2, arcs_71_1},
- {2, arcs_71_2},
+static state states_74[3] = {
+ {1, arcs_74_0},
+ {2, arcs_74_1},
+ {2, arcs_74_2},
};
-static arc arcs_72_0[1] = {
- {24, 1},
+static arc arcs_75_0[3] = {
+ {26, 1},
+ {34, 2},
+ {50, 3},
};
-static arc arcs_72_1[4] = {
- {25, 2},
- {158, 3},
- {30, 4},
+static arc arcs_75_1[4] = {
+ {27, 4},
+ {164, 5},
+ {32, 6},
{0, 1},
};
-static arc arcs_72_2[1] = {
- {24, 5},
+static arc arcs_75_2[1] = {
+ {107, 7},
};
-static arc arcs_72_3[1] = {
+static arc arcs_75_3[3] = {
+ {164, 5},
+ {32, 6},
{0, 3},
};
-static arc arcs_72_4[2] = {
- {24, 6},
- {0, 4},
+static arc arcs_75_4[1] = {
+ {26, 7},
};
-static arc arcs_72_5[3] = {
- {158, 3},
- {30, 7},
+static arc arcs_75_5[1] = {
{0, 5},
};
-static arc arcs_72_6[2] = {
- {30, 4},
+static arc arcs_75_6[3] = {
+ {26, 8},
+ {50, 8},
{0, 6},
};
-static arc arcs_72_7[2] = {
- {24, 8},
+static arc arcs_75_7[3] = {
+ {164, 5},
+ {32, 9},
{0, 7},
};
-static arc arcs_72_8[1] = {
- {25, 9},
+static arc arcs_75_8[2] = {
+ {32, 6},
+ {0, 8},
};
-static arc arcs_72_9[1] = {
- {24, 10},
+static arc arcs_75_9[3] = {
+ {26, 10},
+ {34, 11},
+ {0, 9},
};
-static arc arcs_72_10[2] = {
- {30, 7},
- {0, 10},
+static arc arcs_75_10[1] = {
+ {27, 12},
};
-static state states_72[11] = {
- {1, arcs_72_0},
- {4, arcs_72_1},
- {1, arcs_72_2},
- {1, arcs_72_3},
- {2, arcs_72_4},
- {3, arcs_72_5},
- {2, arcs_72_6},
- {2, arcs_72_7},
- {1, arcs_72_8},
- {1, arcs_72_9},
- {2, arcs_72_10},
-};
-static arc arcs_73_0[1] = {
- {162, 1},
-};
-static arc arcs_73_1[1] = {
- {21, 2},
-};
-static arc arcs_73_2[2] = {
+static arc arcs_75_11[1] = {
+ {107, 13},
+};
+static arc arcs_75_12[1] = {
+ {26, 13},
+};
+static arc arcs_75_13[2] = {
+ {32, 9},
+ {0, 13},
+};
+static state states_75[14] = {
+ {3, arcs_75_0},
+ {4, arcs_75_1},
+ {1, arcs_75_2},
+ {3, arcs_75_3},
+ {1, arcs_75_4},
+ {1, arcs_75_5},
+ {3, arcs_75_6},
+ {3, arcs_75_7},
+ {2, arcs_75_8},
+ {3, arcs_75_9},
+ {1, arcs_75_10},
+ {1, arcs_75_11},
+ {1, arcs_75_12},
+ {2, arcs_75_13},
+};
+static arc arcs_76_0[1] = {
+ {168, 1},
+};
+static arc arcs_76_1[1] = {
+ {23, 2},
+};
+static arc arcs_76_2[2] = {
{13, 3},
- {25, 4},
+ {27, 4},
};
-static arc arcs_73_3[2] = {
+static arc arcs_76_3[2] = {
{14, 5},
{15, 6},
};
-static arc arcs_73_4[1] = {
- {26, 7},
+static arc arcs_76_4[1] = {
+ {28, 7},
};
-static arc arcs_73_5[1] = {
+static arc arcs_76_5[1] = {
{15, 6},
};
-static arc arcs_73_6[1] = {
- {25, 4},
+static arc arcs_76_6[1] = {
+ {27, 4},
};
-static arc arcs_73_7[1] = {
+static arc arcs_76_7[1] = {
{0, 7},
};
-static state states_73[8] = {
- {1, arcs_73_0},
- {1, arcs_73_1},
- {2, arcs_73_2},
- {2, arcs_73_3},
- {1, arcs_73_4},
- {1, arcs_73_5},
- {1, arcs_73_6},
- {1, arcs_73_7},
-};
-static arc arcs_74_0[3] = {
- {163, 1},
- {31, 2},
- {32, 3},
-};
-static arc arcs_74_1[2] = {
- {30, 4},
- {0, 1},
-};
-static arc arcs_74_2[1] = {
- {24, 5},
+static state states_76[8] = {
+ {1, arcs_76_0},
+ {1, arcs_76_1},
+ {2, arcs_76_2},
+ {2, arcs_76_3},
+ {1, arcs_76_4},
+ {1, arcs_76_5},
+ {1, arcs_76_6},
+ {1, arcs_76_7},
};
-static arc arcs_74_3[1] = {
- {24, 6},
+static arc arcs_77_0[1] = {
+ {169, 1},
};
-static arc arcs_74_4[4] = {
- {163, 1},
- {31, 2},
- {32, 3},
- {0, 4},
+static arc arcs_77_1[2] = {
+ {32, 2},
+ {0, 1},
};
-static arc arcs_74_5[2] = {
- {30, 7},
- {0, 5},
+static arc arcs_77_2[2] = {
+ {169, 1},
+ {0, 2},
};
-static arc arcs_74_6[1] = {
- {0, 6},
+static state states_77[3] = {
+ {1, arcs_77_0},
+ {2, arcs_77_1},
+ {2, arcs_77_2},
};
-static arc arcs_74_7[2] = {
- {163, 5},
- {32, 3},
+static arc arcs_78_0[3] = {
+ {26, 1},
+ {34, 2},
+ {33, 2},
};
-static state states_74[8] = {
- {3, arcs_74_0},
- {2, arcs_74_1},
- {1, arcs_74_2},
- {1, arcs_74_3},
- {4, arcs_74_4},
- {2, arcs_74_5},
- {1, arcs_74_6},
- {2, arcs_74_7},
-};
-static arc arcs_75_0[1] = {
- {24, 1},
-};
-static arc arcs_75_1[3] = {
- {158, 2},
- {29, 3},
+static arc arcs_78_1[3] = {
+ {164, 3},
+ {31, 2},
{0, 1},
};
-static arc arcs_75_2[1] = {
- {0, 2},
+static arc arcs_78_2[1] = {
+ {26, 3},
};
-static arc arcs_75_3[1] = {
- {24, 2},
+static arc arcs_78_3[1] = {
+ {0, 3},
};
-static state states_75[4] = {
- {1, arcs_75_0},
- {3, arcs_75_1},
- {1, arcs_75_2},
- {1, arcs_75_3},
+static state states_78[4] = {
+ {3, arcs_78_0},
+ {3, arcs_78_1},
+ {1, arcs_78_2},
+ {1, arcs_78_3},
};
-static arc arcs_76_0[2] = {
- {158, 1},
- {165, 1},
+static arc arcs_79_0[2] = {
+ {164, 1},
+ {171, 1},
};
-static arc arcs_76_1[1] = {
+static arc arcs_79_1[1] = {
{0, 1},
};
-static state states_76[2] = {
- {2, arcs_76_0},
- {1, arcs_76_1},
+static state states_79[2] = {
+ {2, arcs_79_0},
+ {1, arcs_79_1},
};
-static arc arcs_77_0[1] = {
- {96, 1},
+static arc arcs_80_0[1] = {
+ {100, 1},
};
-static arc arcs_77_1[1] = {
- {62, 2},
+static arc arcs_80_1[1] = {
+ {65, 2},
};
-static arc arcs_77_2[1] = {
- {97, 3},
+static arc arcs_80_2[1] = {
+ {101, 3},
};
-static arc arcs_77_3[1] = {
- {107, 4},
+static arc arcs_80_3[1] = {
+ {111, 4},
};
-static arc arcs_77_4[2] = {
- {164, 5},
+static arc arcs_80_4[2] = {
+ {170, 5},
{0, 4},
};
-static arc arcs_77_5[1] = {
+static arc arcs_80_5[1] = {
{0, 5},
};
-static state states_77[6] = {
- {1, arcs_77_0},
- {1, arcs_77_1},
- {1, arcs_77_2},
- {1, arcs_77_3},
- {2, arcs_77_4},
- {1, arcs_77_5},
+static state states_80[6] = {
+ {1, arcs_80_0},
+ {1, arcs_80_1},
+ {1, arcs_80_2},
+ {1, arcs_80_3},
+ {2, arcs_80_4},
+ {1, arcs_80_5},
};
-static arc arcs_78_0[1] = {
- {92, 1},
+static arc arcs_81_0[1] = {
+ {96, 1},
};
-static arc arcs_78_1[1] = {
- {109, 2},
+static arc arcs_81_1[1] = {
+ {113, 2},
};
-static arc arcs_78_2[2] = {
- {164, 3},
+static arc arcs_81_2[2] = {
+ {170, 3},
{0, 2},
};
-static arc arcs_78_3[1] = {
+static arc arcs_81_3[1] = {
{0, 3},
};
-static state states_78[4] = {
- {1, arcs_78_0},
- {1, arcs_78_1},
- {2, arcs_78_2},
- {1, arcs_78_3},
+static state states_81[4] = {
+ {1, arcs_81_0},
+ {1, arcs_81_1},
+ {2, arcs_81_2},
+ {1, arcs_81_3},
};
-static arc arcs_79_0[1] = {
- {21, 1},
+static arc arcs_82_0[1] = {
+ {23, 1},
};
-static arc arcs_79_1[1] = {
+static arc arcs_82_1[1] = {
{0, 1},
};
-static state states_79[2] = {
- {1, arcs_79_0},
- {1, arcs_79_1},
+static state states_82[2] = {
+ {1, arcs_82_0},
+ {1, arcs_82_1},
};
-static arc arcs_80_0[1] = {
- {167, 1},
+static arc arcs_83_0[1] = {
+ {173, 1},
};
-static arc arcs_80_1[2] = {
- {168, 2},
+static arc arcs_83_1[2] = {
+ {174, 2},
{0, 1},
};
-static arc arcs_80_2[1] = {
+static arc arcs_83_2[1] = {
{0, 2},
};
-static state states_80[3] = {
- {1, arcs_80_0},
- {2, arcs_80_1},
- {1, arcs_80_2},
+static state states_83[3] = {
+ {1, arcs_83_0},
+ {2, arcs_83_1},
+ {1, arcs_83_2},
};
-static arc arcs_81_0[2] = {
- {73, 1},
+static arc arcs_84_0[2] = {
+ {76, 1},
{9, 2},
};
-static arc arcs_81_1[1] = {
- {24, 2},
+static arc arcs_84_1[1] = {
+ {26, 2},
};
-static arc arcs_81_2[1] = {
+static arc arcs_84_2[1] = {
{0, 2},
};
-static state states_81[3] = {
- {2, arcs_81_0},
- {1, arcs_81_1},
- {1, arcs_81_2},
+static state states_84[3] = {
+ {2, arcs_84_0},
+ {1, arcs_84_1},
+ {1, arcs_84_2},
};
-static dfa dfas[82] = {
+static dfa dfas[85] = {
{256, "single_input", 0, 3, states_0,
- "\004\050\060\200\000\000\000\240\340\223\160\220\045\200\020\000\000\206\120\076\204\000"},
+ "\004\050\340\000\002\000\000\000\005\237\204\003\131\002\010\001\000\140\110\224\017\041"},
{257, "file_input", 0, 2, states_1,
- "\204\050\060\200\000\000\000\240\340\223\160\220\045\200\020\000\000\206\120\076\204\000"},
+ "\204\050\340\000\002\000\000\000\005\237\204\003\131\002\010\001\000\140\110\224\017\041"},
{258, "eval_input", 0, 3, states_2,
- "\000\040\040\000\000\000\000\000\000\200\000\000\000\200\020\000\000\206\120\076\000\000"},
+ "\000\040\200\000\000\000\000\000\000\000\004\000\000\000\010\001\000\140\110\224\017\000"},
{259, "decorator", 0, 7, states_3,
"\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
{260, "decorators", 0, 2, states_4,
"\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
{261, "decorated", 0, 3, states_5,
"\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {262, "funcdef", 0, 8, states_6,
- "\000\000\020\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {263, "parameters", 0, 4, states_7,
- "\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {264, "typedargslist", 0, 18, states_8,
- "\000\000\040\200\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {265, "tfpdef", 0, 4, states_9,
+ {262, "async_funcdef", 0, 3, states_6,
"\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {266, "varargslist", 0, 18, states_10,
- "\000\000\040\200\001\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {267, "vfpdef", 0, 2, states_11,
- "\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {268, "stmt", 0, 2, states_12,
- "\000\050\060\200\000\000\000\240\340\223\160\220\045\200\020\000\000\206\120\076\204\000"},
- {269, "simple_stmt", 0, 4, states_13,
- "\000\040\040\200\000\000\000\240\340\223\160\000\000\200\020\000\000\206\120\076\200\000"},
- {270, "small_stmt", 0, 2, states_14,
- "\000\040\040\200\000\000\000\240\340\223\160\000\000\200\020\000\000\206\120\076\200\000"},
- {271, "expr_stmt", 0, 6, states_15,
- "\000\040\040\200\000\000\000\000\000\200\000\000\000\200\020\000\000\206\120\076\000\000"},
- {272, "testlist_star_expr", 0, 3, states_16,
- "\000\040\040\200\000\000\000\000\000\200\000\000\000\200\020\000\000\206\120\076\000\000"},
- {273, "augassign", 0, 2, states_17,
- "\000\000\000\000\000\000\376\037\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {274, "del_stmt", 0, 3, states_18,
- "\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {275, "pass_stmt", 0, 2, states_19,
- "\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {276, "flow_stmt", 0, 2, states_20,
- "\000\000\000\000\000\000\000\000\340\001\000\000\000\000\000\000\000\000\000\000\200\000"},
- {277, "break_stmt", 0, 2, states_21,
- "\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {278, "continue_stmt", 0, 2, states_22,
- "\000\000\000\000\000\000\000\000\100\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {279, "return_stmt", 0, 3, states_23,
- "\000\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {280, "yield_stmt", 0, 2, states_24,
- "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\200\000"},
- {281, "raise_stmt", 0, 5, states_25,
+ {263, "funcdef", 0, 8, states_7,
+ "\000\000\100\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {264, "parameters", 0, 4, states_8,
+ "\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {265, "typedargslist", 0, 18, states_9,
+ "\000\000\200\000\006\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {266, "tfpdef", 0, 4, states_10,
+ "\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {267, "varargslist", 0, 18, states_11,
+ "\000\000\200\000\006\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {268, "vfpdef", 0, 2, states_12,
+ "\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {269, "stmt", 0, 2, states_13,
+ "\000\050\340\000\002\000\000\000\005\237\204\003\131\002\010\001\000\140\110\224\017\041"},
+ {270, "simple_stmt", 0, 4, states_14,
+ "\000\040\200\000\002\000\000\000\005\237\204\003\000\000\010\001\000\140\110\224\017\040"},
+ {271, "small_stmt", 0, 2, states_15,
+ "\000\040\200\000\002\000\000\000\005\237\204\003\000\000\010\001\000\140\110\224\017\040"},
+ {272, "expr_stmt", 0, 6, states_16,
+ "\000\040\200\000\002\000\000\000\000\000\004\000\000\000\010\001\000\140\110\224\017\000"},
+ {273, "testlist_star_expr", 0, 3, states_17,
+ "\000\040\200\000\002\000\000\000\000\000\004\000\000\000\010\001\000\140\110\224\017\000"},
+ {274, "augassign", 0, 2, states_18,
+ "\000\000\000\000\000\000\370\377\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {275, "del_stmt", 0, 3, states_19,
+ "\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {276, "pass_stmt", 0, 2, states_20,
+ "\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {277, "flow_stmt", 0, 2, states_21,
+ "\000\000\000\000\000\000\000\000\000\017\000\000\000\000\000\000\000\000\000\000\000\040"},
+ {278, "break_stmt", 0, 2, states_22,
"\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000\000"},
- {282, "import_stmt", 0, 2, states_26,
- "\000\000\000\000\000\000\000\000\000\022\000\000\000\000\000\000\000\000\000\000\000\000"},
- {283, "import_name", 0, 3, states_27,
- "\000\000\000\000\000\000\000\000\000\020\000\000\000\000\000\000\000\000\000\000\000\000"},
- {284, "import_from", 0, 8, states_28,
+ {279, "continue_stmt", 0, 2, states_23,
"\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000"},
- {285, "import_as_name", 0, 4, states_29,
- "\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {286, "dotted_as_name", 0, 4, states_30,
- "\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {287, "import_as_names", 0, 3, states_31,
- "\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {288, "dotted_as_names", 0, 2, states_32,
- "\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {289, "dotted_name", 0, 2, states_33,
+ {280, "return_stmt", 0, 3, states_24,
+ "\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {281, "yield_stmt", 0, 2, states_25,
+ "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\040"},
+ {282, "raise_stmt", 0, 5, states_26,
+ "\000\000\000\000\000\000\000\000\000\010\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {283, "import_stmt", 0, 2, states_27,
+ "\000\000\000\000\000\000\000\000\000\220\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {284, "import_name", 0, 3, states_28,
+ "\000\000\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {285, "import_from", 0, 8, states_29,
+ "\000\000\000\000\000\000\000\000\000\020\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {286, "import_as_name", 0, 4, states_30,
+ "\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {287, "dotted_as_name", 0, 4, states_31,
+ "\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {288, "import_as_names", 0, 3, states_32,
+ "\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {289, "dotted_as_names", 0, 2, states_33,
+ "\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {290, "dotted_name", 0, 2, states_34,
+ "\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {291, "global_stmt", 0, 3, states_35,
+ "\000\000\000\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000\000"},
+ {292, "nonlocal_stmt", 0, 3, states_36,
+ "\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000"},
+ {293, "assert_stmt", 0, 5, states_37,
+ "\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000"},
+ {294, "compound_stmt", 0, 2, states_38,
+ "\000\010\140\000\000\000\000\000\000\000\000\000\131\002\000\000\000\000\000\000\000\001"},
+ {295, "async_stmt", 0, 3, states_39,
"\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {290, "global_stmt", 0, 3, states_34,
- "\000\000\000\000\000\000\000\000\000\000\020\000\000\000\000\000\000\000\000\000\000\000"},
- {291, "nonlocal_stmt", 0, 3, states_35,
- "\000\000\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000\000\000"},
- {292, "assert_stmt", 0, 5, states_36,
- "\000\000\000\000\000\000\000\000\000\000\100\000\000\000\000\000\000\000\000\000\000\000"},
- {293, "compound_stmt", 0, 2, states_37,
- "\000\010\020\000\000\000\000\000\000\000\000\220\045\000\000\000\000\000\000\000\004\000"},
- {294, "if_stmt", 0, 8, states_38,
- "\000\000\000\000\000\000\000\000\000\000\000\020\000\000\000\000\000\000\000\000\000\000"},
- {295, "while_stmt", 0, 8, states_39,
- "\000\000\000\000\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000\000\000"},
- {296, "for_stmt", 0, 10, states_40,
+ {296, "if_stmt", 0, 8, states_40,
"\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000"},
- {297, "try_stmt", 0, 13, states_41,
- "\000\000\000\000\000\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\000"},
- {298, "with_stmt", 0, 5, states_42,
- "\000\000\000\000\000\000\000\000\000\000\000\000\040\000\000\000\000\000\000\000\000\000"},
- {299, "with_item", 0, 4, states_43,
- "\000\040\040\000\000\000\000\000\000\200\000\000\000\200\020\000\000\206\120\076\000\000"},
- {300, "except_clause", 0, 5, states_44,
- "\000\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000"},
- {301, "suite", 0, 5, states_45,
- "\004\040\040\200\000\000\000\240\340\223\160\000\000\200\020\000\000\206\120\076\200\000"},
- {302, "test", 0, 6, states_46,
- "\000\040\040\000\000\000\000\000\000\200\000\000\000\200\020\000\000\206\120\076\000\000"},
- {303, "test_nocond", 0, 2, states_47,
- "\000\040\040\000\000\000\000\000\000\200\000\000\000\200\020\000\000\206\120\076\000\000"},
- {304, "lambdef", 0, 5, states_48,
- "\000\000\000\000\000\000\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000"},
- {305, "lambdef_nocond", 0, 5, states_49,
- "\000\000\000\000\000\000\000\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000"},
- {306, "or_test", 0, 2, states_50,
- "\000\040\040\000\000\000\000\000\000\200\000\000\000\000\020\000\000\206\120\076\000\000"},
- {307, "and_test", 0, 2, states_51,
- "\000\040\040\000\000\000\000\000\000\200\000\000\000\000\020\000\000\206\120\076\000\000"},
- {308, "not_test", 0, 3, states_52,
- "\000\040\040\000\000\000\000\000\000\200\000\000\000\000\020\000\000\206\120\076\000\000"},
- {309, "comparison", 0, 2, states_53,
- "\000\040\040\000\000\000\000\000\000\200\000\000\000\000\000\000\000\206\120\076\000\000"},
- {310, "comp_op", 0, 4, states_54,
- "\000\000\000\000\000\000\000\000\000\000\000\000\002\000\220\177\000\000\000\000\000\000"},
- {311, "star_expr", 0, 3, states_55,
- "\000\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {312, "expr", 0, 2, states_56,
- "\000\040\040\000\000\000\000\000\000\200\000\000\000\000\000\000\000\206\120\076\000\000"},
- {313, "xor_expr", 0, 2, states_57,
- "\000\040\040\000\000\000\000\000\000\200\000\000\000\000\000\000\000\206\120\076\000\000"},
- {314, "and_expr", 0, 2, states_58,
- "\000\040\040\000\000\000\000\000\000\200\000\000\000\000\000\000\000\206\120\076\000\000"},
- {315, "shift_expr", 0, 2, states_59,
- "\000\040\040\000\000\000\000\000\000\200\000\000\000\000\000\000\000\206\120\076\000\000"},
- {316, "arith_expr", 0, 2, states_60,
- "\000\040\040\000\000\000\000\000\000\200\000\000\000\000\000\000\000\206\120\076\000\000"},
- {317, "term", 0, 2, states_61,
- "\000\040\040\000\000\000\000\000\000\200\000\000\000\000\000\000\000\206\120\076\000\000"},
- {318, "factor", 0, 3, states_62,
- "\000\040\040\000\000\000\000\000\000\200\000\000\000\000\000\000\000\206\120\076\000\000"},
- {319, "power", 0, 4, states_63,
- "\000\040\040\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000\120\076\000\000"},
- {320, "atom", 0, 9, states_64,
- "\000\040\040\000\000\000\000\000\000\200\000\000\000\000\000\000\000\000\120\076\000\000"},
- {321, "testlist_comp", 0, 5, states_65,
- "\000\040\040\200\000\000\000\000\000\200\000\000\000\200\020\000\000\206\120\076\000\000"},
- {322, "trailer", 0, 7, states_66,
- "\000\040\000\000\000\000\000\000\000\100\000\000\000\000\000\000\000\000\020\000\000\000"},
- {323, "subscriptlist", 0, 3, states_67,
- "\000\040\040\002\000\000\000\000\000\200\000\000\000\200\020\000\000\206\120\076\000\000"},
- {324, "subscript", 0, 5, states_68,
- "\000\040\040\002\000\000\000\000\000\200\000\000\000\200\020\000\000\206\120\076\000\000"},
- {325, "sliceop", 0, 3, states_69,
- "\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {326, "exprlist", 0, 3, states_70,
- "\000\040\040\200\000\000\000\000\000\200\000\000\000\000\000\000\000\206\120\076\000\000"},
- {327, "testlist", 0, 3, states_71,
- "\000\040\040\000\000\000\000\000\000\200\000\000\000\200\020\000\000\206\120\076\000\000"},
- {328, "dictorsetmaker", 0, 11, states_72,
- "\000\040\040\000\000\000\000\000\000\200\000\000\000\200\020\000\000\206\120\076\000\000"},
- {329, "classdef", 0, 8, states_73,
- "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\004\000"},
- {330, "arglist", 0, 8, states_74,
- "\000\040\040\200\001\000\000\000\000\200\000\000\000\200\020\000\000\206\120\076\000\000"},
- {331, "argument", 0, 4, states_75,
- "\000\040\040\000\000\000\000\000\000\200\000\000\000\200\020\000\000\206\120\076\000\000"},
- {332, "comp_iter", 0, 2, states_76,
- "\000\000\000\000\000\000\000\000\000\000\000\020\001\000\000\000\000\000\000\000\000\000"},
- {333, "comp_for", 0, 6, states_77,
+ {297, "while_stmt", 0, 8, states_41,
+ "\000\000\000\000\000\000\000\000\000\000\000\000\010\000\000\000\000\000\000\000\000\000"},
+ {298, "for_stmt", 0, 10, states_42,
+ "\000\000\000\000\000\000\000\000\000\000\000\000\020\000\000\000\000\000\000\000\000\000"},
+ {299, "try_stmt", 0, 13, states_43,
+ "\000\000\000\000\000\000\000\000\000\000\000\000\100\000\000\000\000\000\000\000\000\000"},
+ {300, "with_stmt", 0, 5, states_44,
+ "\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000"},
+ {301, "with_item", 0, 4, states_45,
+ "\000\040\200\000\000\000\000\000\000\000\004\000\000\000\010\001\000\140\110\224\017\000"},
+ {302, "except_clause", 0, 5, states_46,
+ "\000\000\000\000\000\000\000\000\000\000\000\000\000\020\000\000\000\000\000\000\000\000"},
+ {303, "suite", 0, 5, states_47,
+ "\004\040\200\000\002\000\000\000\005\237\204\003\000\000\010\001\000\140\110\224\017\040"},
+ {304, "test", 0, 6, states_48,
+ "\000\040\200\000\000\000\000\000\000\000\004\000\000\000\010\001\000\140\110\224\017\000"},
+ {305, "test_nocond", 0, 2, states_49,
+ "\000\040\200\000\000\000\000\000\000\000\004\000\000\000\010\001\000\140\110\224\017\000"},
+ {306, "lambdef", 0, 5, states_50,
+ "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\010\000\000\000\000\000\000\000"},
+ {307, "lambdef_nocond", 0, 5, states_51,
+ "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\010\000\000\000\000\000\000\000"},
+ {308, "or_test", 0, 2, states_52,
+ "\000\040\200\000\000\000\000\000\000\000\004\000\000\000\000\001\000\140\110\224\017\000"},
+ {309, "and_test", 0, 2, states_53,
+ "\000\040\200\000\000\000\000\000\000\000\004\000\000\000\000\001\000\140\110\224\017\000"},
+ {310, "not_test", 0, 3, states_54,
+ "\000\040\200\000\000\000\000\000\000\000\004\000\000\000\000\001\000\140\110\224\017\000"},
+ {311, "comparison", 0, 2, states_55,
+ "\000\040\200\000\000\000\000\000\000\000\004\000\000\000\000\000\000\140\110\224\017\000"},
+ {312, "comp_op", 0, 4, states_56,
+ "\000\000\000\000\000\000\000\000\000\000\000\000\040\000\000\371\007\000\000\000\000\000"},
+ {313, "star_expr", 0, 3, states_57,
+ "\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {314, "expr", 0, 2, states_58,
+ "\000\040\200\000\000\000\000\000\000\000\004\000\000\000\000\000\000\140\110\224\017\000"},
+ {315, "xor_expr", 0, 2, states_59,
+ "\000\040\200\000\000\000\000\000\000\000\004\000\000\000\000\000\000\140\110\224\017\000"},
+ {316, "and_expr", 0, 2, states_60,
+ "\000\040\200\000\000\000\000\000\000\000\004\000\000\000\000\000\000\140\110\224\017\000"},
+ {317, "shift_expr", 0, 2, states_61,
+ "\000\040\200\000\000\000\000\000\000\000\004\000\000\000\000\000\000\140\110\224\017\000"},
+ {318, "arith_expr", 0, 2, states_62,
+ "\000\040\200\000\000\000\000\000\000\000\004\000\000\000\000\000\000\140\110\224\017\000"},
+ {319, "term", 0, 2, states_63,
+ "\000\040\200\000\000\000\000\000\000\000\004\000\000\000\000\000\000\140\110\224\017\000"},
+ {320, "factor", 0, 3, states_64,
+ "\000\040\200\000\000\000\000\000\000\000\004\000\000\000\000\000\000\140\110\224\017\000"},
+ {321, "power", 0, 4, states_65,
+ "\000\040\200\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\100\224\017\000"},
+ {322, "atom_expr", 0, 3, states_66,
+ "\000\040\200\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\100\224\017\000"},
+ {323, "atom", 0, 9, states_67,
+ "\000\040\200\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000\000\224\017\000"},
+ {324, "testlist_comp", 0, 5, states_68,
+ "\000\040\200\000\002\000\000\000\000\000\004\000\000\000\010\001\000\140\110\224\017\000"},
+ {325, "trailer", 0, 7, states_69,
+ "\000\040\000\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\004\000\000"},
+ {326, "subscriptlist", 0, 3, states_70,
+ "\000\040\200\010\000\000\000\000\000\000\004\000\000\000\010\001\000\140\110\224\017\000"},
+ {327, "subscript", 0, 5, states_71,
+ "\000\040\200\010\000\000\000\000\000\000\004\000\000\000\010\001\000\140\110\224\017\000"},
+ {328, "sliceop", 0, 3, states_72,
+ "\000\000\000\010\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {329, "exprlist", 0, 3, states_73,
+ "\000\040\200\000\002\000\000\000\000\000\004\000\000\000\000\000\000\140\110\224\017\000"},
+ {330, "testlist", 0, 3, states_74,
+ "\000\040\200\000\000\000\000\000\000\000\004\000\000\000\010\001\000\140\110\224\017\000"},
+ {331, "dictorsetmaker", 0, 14, states_75,
+ "\000\040\200\000\006\000\000\000\000\000\004\000\000\000\010\001\000\140\110\224\017\000"},
+ {332, "classdef", 0, 8, states_76,
+ "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\001"},
+ {333, "arglist", 0, 3, states_77,
+ "\000\040\200\000\006\000\000\000\000\000\004\000\000\000\010\001\000\140\110\224\017\000"},
+ {334, "argument", 0, 4, states_78,
+ "\000\040\200\000\006\000\000\000\000\000\004\000\000\000\010\001\000\140\110\224\017\000"},
+ {335, "comp_iter", 0, 2, states_79,
+ "\000\000\000\000\000\000\000\000\000\000\000\000\021\000\000\000\000\000\000\000\000\000"},
+ {336, "comp_for", 0, 6, states_80,
+ "\000\000\000\000\000\000\000\000\000\000\000\000\020\000\000\000\000\000\000\000\000\000"},
+ {337, "comp_if", 0, 4, states_81,
"\000\000\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\000"},
- {334, "comp_if", 0, 4, states_78,
- "\000\000\000\000\000\000\000\000\000\000\000\020\000\000\000\000\000\000\000\000\000\000"},
- {335, "encoding_decl", 0, 2, states_79,
- "\000\000\040\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
- {336, "yield_expr", 0, 3, states_80,
- "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\200\000"},
- {337, "yield_arg", 0, 3, states_81,
- "\000\040\040\000\000\000\000\000\000\202\000\000\000\200\020\000\000\206\120\076\000\000"},
-};
-static label labels[169] = {
+ {338, "encoding_decl", 0, 2, states_82,
+ "\000\000\200\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"},
+ {339, "yield_expr", 0, 3, states_83,
+ "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\040"},
+ {340, "yield_arg", 0, 3, states_84,
+ "\000\040\200\000\000\000\000\000\000\020\004\000\000\000\010\001\000\140\110\224\017\000"},
+};
+static label labels[175] = {
{0, "EMPTY"},
{256, 0},
{4, 0},
- {269, 0},
- {293, 0},
+ {270, 0},
+ {294, 0},
{257, 0},
- {268, 0},
+ {269, 0},
{0, 0},
{258, 0},
- {327, 0},
+ {330, 0},
{259, 0},
{49, 0},
- {289, 0},
+ {290, 0},
{7, 0},
- {330, 0},
+ {333, 0},
{8, 0},
{260, 0},
{261, 0},
- {329, 0},
+ {332, 0},
+ {263, 0},
{262, 0},
+ {55, 0},
{1, "def"},
{1, 0},
- {263, 0},
- {50, 0},
- {302, 0},
- {11, 0},
- {301, 0},
{264, 0},
+ {51, 0},
+ {304, 0},
+ {11, 0},
+ {303, 0},
{265, 0},
+ {266, 0},
{22, 0},
{12, 0},
{16, 0},
{35, 0},
- {266, 0},
{267, 0},
- {270, 0},
- {13, 0},
+ {268, 0},
{271, 0},
- {274, 0},
+ {13, 0},
+ {272, 0},
{275, 0},
{276, 0},
- {282, 0},
- {290, 0},
+ {277, 0},
+ {283, 0},
{291, 0},
{292, 0},
- {272, 0},
+ {293, 0},
{273, 0},
- {336, 0},
- {311, 0},
+ {274, 0},
+ {339, 0},
+ {313, 0},
{36, 0},
{37, 0},
{38, 0},
+ {50, 0},
{39, 0},
{40, 0},
{41, 0},
@@ -2046,36 +2098,37 @@ static label labels[169] = {
{46, 0},
{48, 0},
{1, "del"},
- {326, 0},
+ {329, 0},
{1, "pass"},
- {277, 0},
{278, 0},
{279, 0},
- {281, 0},
{280, 0},
+ {282, 0},
+ {281, 0},
{1, "break"},
{1, "continue"},
{1, "return"},
{1, "raise"},
{1, "from"},
- {283, 0},
{284, 0},
+ {285, 0},
{1, "import"},
- {288, 0},
+ {289, 0},
{23, 0},
- {51, 0},
- {287, 0},
- {285, 0},
- {1, "as"},
+ {52, 0},
+ {288, 0},
{286, 0},
+ {1, "as"},
+ {287, 0},
{1, "global"},
{1, "nonlocal"},
{1, "assert"},
- {294, 0},
- {295, 0},
{296, 0},
{297, 0},
{298, 0},
+ {299, 0},
+ {300, 0},
+ {295, 0},
{1, "if"},
{1, "elif"},
{1, "else"},
@@ -2083,26 +2136,26 @@ static label labels[169] = {
{1, "for"},
{1, "in"},
{1, "try"},
- {300, 0},
+ {302, 0},
{1, "finally"},
{1, "with"},
- {299, 0},
- {312, 0},
+ {301, 0},
+ {314, 0},
{1, "except"},
{5, 0},
{6, 0},
+ {308, 0},
{306, 0},
- {304, 0},
- {303, 0},
{305, 0},
- {1, "lambda"},
{307, 0},
+ {1, "lambda"},
+ {309, 0},
{1, "or"},
- {308, 0},
+ {310, 0},
{1, "and"},
{1, "not"},
- {309, 0},
- {310, 0},
+ {311, 0},
+ {312, 0},
{20, 0},
{21, 0},
{27, 0},
@@ -2111,52 +2164,54 @@ static label labels[169] = {
{28, 0},
{28, 0},
{1, "is"},
- {313, 0},
+ {315, 0},
{18, 0},
- {314, 0},
+ {316, 0},
{32, 0},
- {315, 0},
+ {317, 0},
{19, 0},
- {316, 0},
+ {318, 0},
{33, 0},
{34, 0},
- {317, 0},
+ {319, 0},
{14, 0},
{15, 0},
- {318, 0},
+ {320, 0},
{17, 0},
{24, 0},
{47, 0},
{31, 0},
- {319, 0},
- {320, 0},
- {322, 0},
{321, 0},
+ {322, 0},
+ {54, 0},
+ {323, 0},
+ {325, 0},
+ {324, 0},
{9, 0},
{10, 0},
{25, 0},
- {328, 0},
+ {331, 0},
{26, 0},
{2, 0},
{3, 0},
{1, "None"},
{1, "True"},
{1, "False"},
- {333, 0},
- {323, 0},
- {324, 0},
- {325, 0},
+ {336, 0},
+ {326, 0},
+ {327, 0},
+ {328, 0},
{1, "class"},
- {331, 0},
- {332, 0},
{334, 0},
{335, 0},
- {1, "yield"},
{337, 0},
+ {338, 0},
+ {1, "yield"},
+ {340, 0},
};
grammar _PyParser_Grammar = {
- 82,
+ 85,
dfas,
- {169, labels},
+ {175, labels},
256
};
diff --git a/Python/import.c b/Python/import.c
index 4f0765a13a..0b843dafd3 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -36,6 +36,8 @@ module _imp
[clinic start generated code]*/
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=9c332475d8686284]*/
+#include "clinic/import.c.h"
+
/*[python input]
class fs_unicode_converter(CConverter):
type = 'PyObject *'
@@ -239,29 +241,9 @@ Return True if the import lock is currently held, else False.
On platforms without threads, return False.
[clinic start generated code]*/
-PyDoc_STRVAR(_imp_lock_held__doc__,
-"lock_held($module, /)\n"
-"--\n"
-"\n"
-"Return True if the import lock is currently held, else False.\n"
-"\n"
-"On platforms without threads, return False.");
-
-#define _IMP_LOCK_HELD_METHODDEF \
- {"lock_held", (PyCFunction)_imp_lock_held, METH_NOARGS, _imp_lock_held__doc__},
-
-static PyObject *
-_imp_lock_held_impl(PyModuleDef *module);
-
-static PyObject *
-_imp_lock_held(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
-{
- return _imp_lock_held_impl(module);
-}
-
static PyObject *
_imp_lock_held_impl(PyModuleDef *module)
-/*[clinic end generated code: output=dae65674966baa65 input=9b088f9b217d9bdf]*/
+/*[clinic end generated code: output=d7a8cc3a5169081a input=9b088f9b217d9bdf]*/
{
#ifdef WITH_THREAD
return PyBool_FromLong(import_lock_thread != -1);
@@ -279,30 +261,9 @@ This lock should be used by import hooks to ensure thread-safety when importing
modules. On platforms without threads, this function does nothing.
[clinic start generated code]*/
-PyDoc_STRVAR(_imp_acquire_lock__doc__,
-"acquire_lock($module, /)\n"
-"--\n"
-"\n"
-"Acquires the interpreter\'s import lock for the current thread.\n"
-"\n"
-"This lock should be used by import hooks to ensure thread-safety when importing\n"
-"modules. On platforms without threads, this function does nothing.");
-
-#define _IMP_ACQUIRE_LOCK_METHODDEF \
- {"acquire_lock", (PyCFunction)_imp_acquire_lock, METH_NOARGS, _imp_acquire_lock__doc__},
-
-static PyObject *
-_imp_acquire_lock_impl(PyModuleDef *module);
-
-static PyObject *
-_imp_acquire_lock(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
-{
- return _imp_acquire_lock_impl(module);
-}
-
static PyObject *
_imp_acquire_lock_impl(PyModuleDef *module)
-/*[clinic end generated code: output=478f1fa089fdb9a4 input=4a2d4381866d5fdc]*/
+/*[clinic end generated code: output=cc143b1d16422cae input=4a2d4381866d5fdc]*/
{
#ifdef WITH_THREAD
_PyImport_AcquireLock();
@@ -319,29 +280,9 @@ Release the interpreter's import lock.
On platforms without threads, this function does nothing.
[clinic start generated code]*/
-PyDoc_STRVAR(_imp_release_lock__doc__,
-"release_lock($module, /)\n"
-"--\n"
-"\n"
-"Release the interpreter\'s import lock.\n"
-"\n"
-"On platforms without threads, this function does nothing.");
-
-#define _IMP_RELEASE_LOCK_METHODDEF \
- {"release_lock", (PyCFunction)_imp_release_lock, METH_NOARGS, _imp_release_lock__doc__},
-
-static PyObject *
-_imp_release_lock_impl(PyModuleDef *module);
-
-static PyObject *
-_imp_release_lock(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
-{
- return _imp_release_lock_impl(module);
-}
-
static PyObject *
_imp_release_lock_impl(PyModuleDef *module)
-/*[clinic end generated code: output=36c77a6832fdafd4 input=934fb11516dd778b]*/
+/*[clinic end generated code: output=74d28e38ebe2b224 input=934fb11516dd778b]*/
{
#ifdef WITH_THREAD
if (_PyImport_ReleaseLock() < 0) {
@@ -550,8 +491,13 @@ PyImport_GetMagicNumber(void)
{
long res;
PyInterpreterState *interp = PyThreadState_Get()->interp;
- PyObject *pyc_magic = PyObject_GetAttrString(interp->importlib,
- "_RAW_MAGIC_NUMBER");
+ PyObject *external, *pyc_magic;
+
+ external = PyObject_GetAttrString(interp->importlib, "_bootstrap_external");
+ if (external == NULL)
+ return -1;
+ pyc_magic = PyObject_GetAttrString(external, "_RAW_MAGIC_NUMBER");
+ Py_DECREF(external);
if (pyc_magic == NULL)
return -1;
res = PyLong_AsLong(pyc_magic);
@@ -725,9 +671,13 @@ PyImport_AddModuleObject(PyObject *name)
PyObject *modules = PyImport_GetModuleDict();
PyObject *m;
- if ((m = PyDict_GetItem(modules, name)) != NULL &&
- PyModule_Check(m))
+ if ((m = PyDict_GetItemWithError(modules, name)) != NULL &&
+ PyModule_Check(m)) {
return m;
+ }
+ if (PyErr_Occurred()) {
+ return NULL;
+ }
m = PyModule_NewObject(name);
if (m == NULL)
return NULL;
@@ -796,7 +746,7 @@ PyImport_ExecCodeModuleWithPathnames(const char *name, PyObject *co,
const char *cpathname)
{
PyObject *m = NULL;
- PyObject *nameobj, *pathobj = NULL, *cpathobj = NULL;
+ PyObject *nameobj, *pathobj = NULL, *cpathobj = NULL, *external= NULL;
nameobj = PyUnicode_FromString(name);
if (nameobj == NULL)
@@ -824,9 +774,14 @@ PyImport_ExecCodeModuleWithPathnames(const char *name, PyObject *co,
"no interpreter!");
}
- pathobj = _PyObject_CallMethodIdObjArgs(interp->importlib,
- &PyId__get_sourcefile, cpathobj,
- NULL);
+ external= PyObject_GetAttrString(interp->importlib,
+ "_bootstrap_external");
+ if (external != NULL) {
+ pathobj = _PyObject_CallMethodIdObjArgs(external,
+ &PyId__get_sourcefile, cpathobj,
+ NULL);
+ Py_DECREF(external);
+ }
if (pathobj == NULL)
PyErr_Clear();
}
@@ -892,7 +847,7 @@ PyObject*
PyImport_ExecCodeModuleObject(PyObject *name, PyObject *co, PyObject *pathname,
PyObject *cpathname)
{
- PyObject *d, *res;
+ PyObject *d, *external, *res;
PyInterpreterState *interp = PyThreadState_GET()->interp;
_Py_IDENTIFIER(_fix_up_module);
@@ -904,9 +859,13 @@ PyImport_ExecCodeModuleObject(PyObject *name, PyObject *co, PyObject *pathname,
if (pathname == NULL) {
pathname = ((PyCodeObject *)co)->co_filename;
}
- res = _PyObject_CallMethodIdObjArgs(interp->importlib,
+ external = PyObject_GetAttrString(interp->importlib, "_bootstrap_external");
+ if (external == NULL)
+ return NULL;
+ res = _PyObject_CallMethodIdObjArgs(external,
&PyId__fix_up_module,
d, name, pathname, cpathname, NULL);
+ Py_DECREF(external);
if (res != NULL) {
Py_DECREF(res);
res = exec_code_in_module(name, d, co);
@@ -966,43 +925,10 @@ _imp._fix_co_filename
Changes code.co_filename to specify the passed-in file path.
[clinic start generated code]*/
-PyDoc_STRVAR(_imp__fix_co_filename__doc__,
-"_fix_co_filename($module, code, path, /)\n"
-"--\n"
-"\n"
-"Changes code.co_filename to specify the passed-in file path.\n"
-"\n"
-" code\n"
-" Code object to change.\n"
-" path\n"
-" File path to use.");
-
-#define _IMP__FIX_CO_FILENAME_METHODDEF \
- {"_fix_co_filename", (PyCFunction)_imp__fix_co_filename, METH_VARARGS, _imp__fix_co_filename__doc__},
-
-static PyObject *
-_imp__fix_co_filename_impl(PyModuleDef *module, PyCodeObject *code, PyObject *path);
-
static PyObject *
-_imp__fix_co_filename(PyModuleDef *module, PyObject *args)
-{
- PyObject *return_value = NULL;
- PyCodeObject *code;
- PyObject *path;
-
- if (!PyArg_ParseTuple(args,
- "O!U:_fix_co_filename",
- &PyCode_Type, &code, &path))
- goto exit;
- return_value = _imp__fix_co_filename_impl(module, code, path);
-
-exit:
- return return_value;
-}
-
-static PyObject *
-_imp__fix_co_filename_impl(PyModuleDef *module, PyCodeObject *code, PyObject *path)
-/*[clinic end generated code: output=6b4b1edeb0d55c5d input=895ba50e78b82f05]*/
+_imp__fix_co_filename_impl(PyModuleDef *module, PyCodeObject *code,
+ PyObject *path)
+/*[clinic end generated code: output=f4db56aac0a1327f input=895ba50e78b82f05]*/
{
update_compiled_module(code, path);
@@ -1104,50 +1030,74 @@ PyImport_GetImporter(PyObject *path) {
return importer;
}
+/*[clinic input]
+_imp.create_builtin
-static int init_builtin(PyObject *); /* Forward */
+ spec: object
+ /
-/* Initialize a built-in module.
- Return 1 for success, 0 if the module is not found, and -1 with
- an exception set if the initialization failed. */
+Create an extension module.
+[clinic start generated code]*/
-static int
-init_builtin(PyObject *name)
+static PyObject *
+_imp_create_builtin(PyModuleDef *module, PyObject *spec)
+/*[clinic end generated code: output=5038f467617226bd input=37f966f890384e47]*/
{
struct _inittab *p;
+ PyObject *name;
+ char *namestr;
PyObject *mod;
+ name = PyObject_GetAttrString(spec, "name");
+ if (name == NULL) {
+ return NULL;
+ }
+
mod = _PyImport_FindExtensionObject(name, name);
- if (PyErr_Occurred())
- return -1;
- if (mod != NULL)
- return 1;
+ if (mod || PyErr_Occurred()) {
+ Py_DECREF(name);
+ Py_INCREF(mod);
+ return mod;
+ }
+
+ namestr = PyUnicode_AsUTF8(name);
+ if (namestr == NULL) {
+ Py_DECREF(name);
+ return NULL;
+ }
for (p = PyImport_Inittab; p->name != NULL; p++) {
- PyObject *mod;
PyModuleDef *def;
if (PyUnicode_CompareWithASCIIString(name, p->name) == 0) {
if (p->initfunc == NULL) {
- PyErr_Format(PyExc_ImportError,
- "Cannot re-init internal module %R",
- name);
- return -1;
+ /* Cannot re-init internal module ("sys" or "builtins") */
+ mod = PyImport_AddModule(namestr);
+ Py_DECREF(name);
+ return mod;
}
mod = (*p->initfunc)();
- if (mod == 0)
- return -1;
- /* Remember pointer to module init function. */
- def = PyModule_GetDef(mod);
- def->m_base.m_init = p->initfunc;
- if (_PyImport_FixupExtensionObject(mod, name, name) < 0)
- return -1;
- /* FixupExtension has put the module into sys.modules,
- so we can release our own reference. */
- Py_DECREF(mod);
- return 1;
+ if (mod == NULL) {
+ Py_DECREF(name);
+ return NULL;
+ }
+ if (PyObject_TypeCheck(mod, &PyModuleDef_Type)) {
+ Py_DECREF(name);
+ return PyModule_FromDefAndSpec((PyModuleDef*)mod, spec);
+ } else {
+ /* Remember pointer to module init function. */
+ def = PyModule_GetDef(mod);
+ def->m_base.m_init = p->initfunc;
+ if (_PyImport_FixupExtensionObject(mod, name, name) < 0) {
+ Py_DECREF(name);
+ return NULL;
+ }
+ Py_DECREF(name);
+ return mod;
+ }
}
}
- return 0;
+ Py_DECREF(name);
+ Py_RETURN_NONE;
}
@@ -1337,6 +1287,7 @@ static void
remove_importlib_frames(void)
{
const char *importlib_filename = "<frozen importlib._bootstrap>";
+ const char *external_filename = "<frozen importlib._bootstrap_external>";
const char *remove_frames = "_call_with_frames_removed";
int always_trim = 0;
int in_importlib = 0;
@@ -1366,7 +1317,10 @@ remove_importlib_frames(void)
assert(PyTraceBack_Check(tb));
now_in_importlib = (PyUnicode_CompareWithASCIIString(
code->co_filename,
- importlib_filename) == 0);
+ importlib_filename) == 0) ||
+ (PyUnicode_CompareWithASCIIString(
+ code->co_filename,
+ external_filename) == 0);
if (now_in_importlib && !in_importlib) {
/* This is the link to this chunk of importlib tracebacks */
outer_link = prev_link;
@@ -1868,27 +1822,9 @@ _imp.extension_suffixes
Returns the list of file suffixes used to identify extension modules.
[clinic start generated code]*/
-PyDoc_STRVAR(_imp_extension_suffixes__doc__,
-"extension_suffixes($module, /)\n"
-"--\n"
-"\n"
-"Returns the list of file suffixes used to identify extension modules.");
-
-#define _IMP_EXTENSION_SUFFIXES_METHODDEF \
- {"extension_suffixes", (PyCFunction)_imp_extension_suffixes, METH_NOARGS, _imp_extension_suffixes__doc__},
-
-static PyObject *
-_imp_extension_suffixes_impl(PyModuleDef *module);
-
-static PyObject *
-_imp_extension_suffixes(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
-{
- return _imp_extension_suffixes_impl(module);
-}
-
static PyObject *
_imp_extension_suffixes_impl(PyModuleDef *module)
-/*[clinic end generated code: output=bb30a2438167798c input=ecdeeecfcb6f839e]*/
+/*[clinic end generated code: output=d44c1566ef362229 input=ecdeeecfcb6f839e]*/
{
PyObject *list;
const char *suffix;
@@ -1917,62 +1853,6 @@ _imp_extension_suffixes_impl(PyModuleDef *module)
}
/*[clinic input]
-_imp.init_builtin
-
- name: unicode
- /
-
-Initializes a built-in module.
-[clinic start generated code]*/
-
-PyDoc_STRVAR(_imp_init_builtin__doc__,
-"init_builtin($module, name, /)\n"
-"--\n"
-"\n"
-"Initializes a built-in module.");
-
-#define _IMP_INIT_BUILTIN_METHODDEF \
- {"init_builtin", (PyCFunction)_imp_init_builtin, METH_VARARGS, _imp_init_builtin__doc__},
-
-static PyObject *
-_imp_init_builtin_impl(PyModuleDef *module, PyObject *name);
-
-static PyObject *
-_imp_init_builtin(PyModuleDef *module, PyObject *args)
-{
- PyObject *return_value = NULL;
- PyObject *name;
-
- if (!PyArg_ParseTuple(args,
- "U:init_builtin",
- &name))
- goto exit;
- return_value = _imp_init_builtin_impl(module, name);
-
-exit:
- return return_value;
-}
-
-static PyObject *
-_imp_init_builtin_impl(PyModuleDef *module, PyObject *name)
-/*[clinic end generated code: output=a0244948a43f8e26 input=f934d2231ec52a2e]*/
-{
- int ret;
- PyObject *m;
-
- ret = init_builtin(name);
- if (ret < 0)
- return NULL;
- if (ret == 0) {
- Py_INCREF(Py_None);
- return Py_None;
- }
- m = PyImport_AddModuleObject(name);
- Py_XINCREF(m);
- return m;
-}
-
-/*[clinic input]
_imp.init_frozen
name: unicode
@@ -1981,37 +1861,9 @@ _imp.init_frozen
Initializes a frozen module.
[clinic start generated code]*/
-PyDoc_STRVAR(_imp_init_frozen__doc__,
-"init_frozen($module, name, /)\n"
-"--\n"
-"\n"
-"Initializes a frozen module.");
-
-#define _IMP_INIT_FROZEN_METHODDEF \
- {"init_frozen", (PyCFunction)_imp_init_frozen, METH_VARARGS, _imp_init_frozen__doc__},
-
-static PyObject *
-_imp_init_frozen_impl(PyModuleDef *module, PyObject *name);
-
-static PyObject *
-_imp_init_frozen(PyModuleDef *module, PyObject *args)
-{
- PyObject *return_value = NULL;
- PyObject *name;
-
- if (!PyArg_ParseTuple(args,
- "U:init_frozen",
- &name))
- goto exit;
- return_value = _imp_init_frozen_impl(module, name);
-
-exit:
- return return_value;
-}
-
static PyObject *
_imp_init_frozen_impl(PyModuleDef *module, PyObject *name)
-/*[clinic end generated code: output=e4bc2bff296f8f22 input=13019adfc04f3fb3]*/
+/*[clinic end generated code: output=a9de493bdd711878 input=13019adfc04f3fb3]*/
{
int ret;
PyObject *m;
@@ -2037,37 +1889,9 @@ _imp.get_frozen_object
Create a code object for a frozen module.
[clinic start generated code]*/
-PyDoc_STRVAR(_imp_get_frozen_object__doc__,
-"get_frozen_object($module, name, /)\n"
-"--\n"
-"\n"
-"Create a code object for a frozen module.");
-
-#define _IMP_GET_FROZEN_OBJECT_METHODDEF \
- {"get_frozen_object", (PyCFunction)_imp_get_frozen_object, METH_VARARGS, _imp_get_frozen_object__doc__},
-
-static PyObject *
-_imp_get_frozen_object_impl(PyModuleDef *module, PyObject *name);
-
-static PyObject *
-_imp_get_frozen_object(PyModuleDef *module, PyObject *args)
-{
- PyObject *return_value = NULL;
- PyObject *name;
-
- if (!PyArg_ParseTuple(args,
- "U:get_frozen_object",
- &name))
- goto exit;
- return_value = _imp_get_frozen_object_impl(module, name);
-
-exit:
- return return_value;
-}
-
static PyObject *
_imp_get_frozen_object_impl(PyModuleDef *module, PyObject *name)
-/*[clinic end generated code: output=4089ec702a9d70c5 input=ed689bc05358fdbd]*/
+/*[clinic end generated code: output=3114c970a47f2e3c input=ed689bc05358fdbd]*/
{
return get_frozen_object(name);
}
@@ -2081,37 +1905,9 @@ _imp.is_frozen_package
Returns True if the module name is of a frozen package.
[clinic start generated code]*/
-PyDoc_STRVAR(_imp_is_frozen_package__doc__,
-"is_frozen_package($module, name, /)\n"
-"--\n"
-"\n"
-"Returns True if the module name is of a frozen package.");
-
-#define _IMP_IS_FROZEN_PACKAGE_METHODDEF \
- {"is_frozen_package", (PyCFunction)_imp_is_frozen_package, METH_VARARGS, _imp_is_frozen_package__doc__},
-
-static PyObject *
-_imp_is_frozen_package_impl(PyModuleDef *module, PyObject *name);
-
-static PyObject *
-_imp_is_frozen_package(PyModuleDef *module, PyObject *args)
-{
- PyObject *return_value = NULL;
- PyObject *name;
-
- if (!PyArg_ParseTuple(args,
- "U:is_frozen_package",
- &name))
- goto exit;
- return_value = _imp_is_frozen_package_impl(module, name);
-
-exit:
- return return_value;
-}
-
static PyObject *
_imp_is_frozen_package_impl(PyModuleDef *module, PyObject *name)
-/*[clinic end generated code: output=86aab14dcd4b959b input=81b6cdecd080fbb8]*/
+/*[clinic end generated code: output=3e4cab802b56d649 input=81b6cdecd080fbb8]*/
{
return is_frozen_package(name);
}
@@ -2125,37 +1921,9 @@ _imp.is_builtin
Returns True if the module name corresponds to a built-in module.
[clinic start generated code]*/
-PyDoc_STRVAR(_imp_is_builtin__doc__,
-"is_builtin($module, name, /)\n"
-"--\n"
-"\n"
-"Returns True if the module name corresponds to a built-in module.");
-
-#define _IMP_IS_BUILTIN_METHODDEF \
- {"is_builtin", (PyCFunction)_imp_is_builtin, METH_VARARGS, _imp_is_builtin__doc__},
-
-static PyObject *
-_imp_is_builtin_impl(PyModuleDef *module, PyObject *name);
-
-static PyObject *
-_imp_is_builtin(PyModuleDef *module, PyObject *args)
-{
- PyObject *return_value = NULL;
- PyObject *name;
-
- if (!PyArg_ParseTuple(args,
- "U:is_builtin",
- &name))
- goto exit;
- return_value = _imp_is_builtin_impl(module, name);
-
-exit:
- return return_value;
-}
-
static PyObject *
_imp_is_builtin_impl(PyModuleDef *module, PyObject *name)
-/*[clinic end generated code: output=d5847f8cac50946e input=86befdac021dd1c7]*/
+/*[clinic end generated code: output=2deec9cac6fb9a7e input=86befdac021dd1c7]*/
{
return PyLong_FromLong(is_builtin(name));
}
@@ -2169,37 +1937,9 @@ _imp.is_frozen
Returns True if the module name corresponds to a frozen module.
[clinic start generated code]*/
-PyDoc_STRVAR(_imp_is_frozen__doc__,
-"is_frozen($module, name, /)\n"
-"--\n"
-"\n"
-"Returns True if the module name corresponds to a frozen module.");
-
-#define _IMP_IS_FROZEN_METHODDEF \
- {"is_frozen", (PyCFunction)_imp_is_frozen, METH_VARARGS, _imp_is_frozen__doc__},
-
-static PyObject *
-_imp_is_frozen_impl(PyModuleDef *module, PyObject *name);
-
-static PyObject *
-_imp_is_frozen(PyModuleDef *module, PyObject *args)
-{
- PyObject *return_value = NULL;
- PyObject *name;
-
- if (!PyArg_ParseTuple(args,
- "U:is_frozen",
- &name))
- goto exit;
- return_value = _imp_is_frozen_impl(module, name);
-
-exit:
- return return_value;
-}
-
static PyObject *
_imp_is_frozen_impl(PyModuleDef *module, PyObject *name)
-/*[clinic end generated code: output=6691af884ba4987d input=7301dbca1897d66b]*/
+/*[clinic end generated code: output=7de8e260c8e36aed input=7301dbca1897d66b]*/
{
const struct _frozen *p;
@@ -2207,84 +1947,131 @@ _imp_is_frozen_impl(PyModuleDef *module, PyObject *name)
return PyBool_FromLong((long) (p == NULL ? 0 : p->size));
}
+/* Common implementation for _imp.exec_dynamic and _imp.exec_builtin */
+static int
+exec_builtin_or_dynamic(PyObject *mod) {
+ PyModuleDef *def;
+ void *state;
+
+ if (!PyModule_Check(mod)) {
+ return 0;
+ }
+
+ def = PyModule_GetDef(mod);
+ if (def == NULL) {
+ if (PyErr_Occurred()) {
+ return -1;
+ }
+ return 0;
+ }
+ state = PyModule_GetState(mod);
+ if (PyErr_Occurred()) {
+ return -1;
+ }
+ if (state) {
+ /* Already initialized; skip reload */
+ return 0;
+ }
+ return PyModule_ExecDef(mod, def);
+}
+
#ifdef HAVE_DYNAMIC_LOADING
/*[clinic input]
-_imp.load_dynamic
+_imp.create_dynamic
- name: unicode
- path: fs_unicode
+ spec: object
file: object = NULL
/
-Loads an extension module.
+Create an extension module.
[clinic start generated code]*/
-PyDoc_STRVAR(_imp_load_dynamic__doc__,
-"load_dynamic($module, name, path, file=None, /)\n"
-"--\n"
-"\n"
-"Loads an extension module.");
-
-#define _IMP_LOAD_DYNAMIC_METHODDEF \
- {"load_dynamic", (PyCFunction)_imp_load_dynamic, METH_VARARGS, _imp_load_dynamic__doc__},
-
-static PyObject *
-_imp_load_dynamic_impl(PyModuleDef *module, PyObject *name, PyObject *path, PyObject *file);
-
static PyObject *
-_imp_load_dynamic(PyModuleDef *module, PyObject *args)
+_imp_create_dynamic_impl(PyModuleDef *module, PyObject *spec, PyObject *file)
+/*[clinic end generated code: output=935cde5b3872d56d input=c31b954f4cf4e09d]*/
{
- PyObject *return_value = NULL;
- PyObject *name;
- PyObject *path;
- PyObject *file = NULL;
+ PyObject *mod, *name, *path;
+ FILE *fp;
- if (!PyArg_ParseTuple(args,
- "UO&|O:load_dynamic",
- &name, PyUnicode_FSDecoder, &path, &file))
- goto exit;
- return_value = _imp_load_dynamic_impl(module, name, path, file);
+ name = PyObject_GetAttrString(spec, "name");
+ if (name == NULL) {
+ return NULL;
+ }
-exit:
- return return_value;
-}
+ path = PyObject_GetAttrString(spec, "origin");
+ if (path == NULL) {
+ Py_DECREF(name);
+ return NULL;
+ }
-static PyObject *
-_imp_load_dynamic_impl(PyModuleDef *module, PyObject *name, PyObject *path, PyObject *file)
-/*[clinic end generated code: output=81d11a1fbd1ea0a8 input=af64f06e4bad3526]*/
-{
- PyObject *mod;
- FILE *fp;
+ mod = _PyImport_FindExtensionObject(name, path);
+ if (mod != NULL) {
+ Py_DECREF(name);
+ Py_DECREF(path);
+ Py_INCREF(mod);
+ return mod;
+ }
if (file != NULL) {
fp = _Py_fopen_obj(path, "r");
if (fp == NULL) {
+ Py_DECREF(name);
Py_DECREF(path);
- if (!PyErr_Occurred())
- PyErr_SetFromErrno(PyExc_IOError);
return NULL;
}
}
else
fp = NULL;
- mod = _PyImport_LoadDynamicModule(name, path, fp);
+
+ mod = _PyImport_LoadDynamicModuleWithSpec(spec, fp);
+
+ Py_DECREF(name);
Py_DECREF(path);
if (fp)
fclose(fp);
return mod;
}
+/*[clinic input]
+_imp.exec_dynamic -> int
+
+ mod: object
+ /
+
+Initialize an extension module.
+[clinic start generated code]*/
+
+static int
+_imp_exec_dynamic_impl(PyModuleDef *module, PyObject *mod)
+/*[clinic end generated code: output=4b84f1301b22d4bd input=9fdbfcb250280d3a]*/
+{
+ return exec_builtin_or_dynamic(mod);
+}
+
+
#endif /* HAVE_DYNAMIC_LOADING */
/*[clinic input]
-dump buffer
+_imp.exec_builtin -> int
+
+ mod: object
+ /
+
+Initialize a built-in module.
[clinic start generated code]*/
-#ifndef _IMP_LOAD_DYNAMIC_METHODDEF
- #define _IMP_LOAD_DYNAMIC_METHODDEF
-#endif /* !defined(_IMP_LOAD_DYNAMIC_METHODDEF) */
-/*[clinic end generated code: output=d07c1d4a343a9579 input=524ce2e021e4eba6]*/
+static int
+_imp_exec_builtin_impl(PyModuleDef *module, PyObject *mod)
+/*[clinic end generated code: output=215e99876a27e284 input=7beed5a2f12a60ca]*/
+{
+ return exec_builtin_or_dynamic(mod);
+}
+
+/*[clinic input]
+dump buffer
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=524ce2e021e4eba6]*/
PyDoc_STRVAR(doc_imp,
@@ -2297,11 +2084,13 @@ static PyMethodDef imp_methods[] = {
_IMP_RELEASE_LOCK_METHODDEF
_IMP_GET_FROZEN_OBJECT_METHODDEF
_IMP_IS_FROZEN_PACKAGE_METHODDEF
- _IMP_INIT_BUILTIN_METHODDEF
+ _IMP_CREATE_BUILTIN_METHODDEF
_IMP_INIT_FROZEN_METHODDEF
_IMP_IS_BUILTIN_METHODDEF
_IMP_IS_FROZEN_METHODDEF
- _IMP_LOAD_DYNAMIC_METHODDEF
+ _IMP_CREATE_DYNAMIC_METHODDEF
+ _IMP_EXEC_DYNAMIC_METHODDEF
+ _IMP_EXEC_BUILTIN_METHODDEF
_IMP__FIX_CO_FILENAME_METHODDEF
{NULL, NULL} /* sentinel */
};
@@ -2384,7 +2173,7 @@ PyImport_AppendInittab(const char *name, PyObject* (*initfunc)(void))
memset(newtab, '\0', sizeof newtab);
- newtab[0].name = (char *)name;
+ newtab[0].name = name;
newtab[0].initfunc = initfunc;
return PyImport_ExtendInittab(newtab);
@@ -2393,4 +2182,3 @@ PyImport_AppendInittab(const char *name, PyObject* (*initfunc)(void))
#ifdef __cplusplus
}
#endif
-
diff --git a/Python/importdl.c b/Python/importdl.c
index b60f1c75fb..1aa585d5e8 100644
--- a/Python/importdl.c
+++ b/Python/importdl.c
@@ -13,87 +13,185 @@
#include "importdl.h"
#ifdef MS_WINDOWS
-extern dl_funcptr _PyImport_GetDynLoadWindows(const char *shortname,
- PyObject *pathname, FILE *fp);
+extern dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix,
+ const char *shortname,
+ PyObject *pathname,
+ FILE *fp);
#else
-extern dl_funcptr _PyImport_GetDynLoadFunc(const char *shortname,
- const char *pathname, FILE *fp);
+extern dl_funcptr _PyImport_FindSharedFuncptr(const char *prefix,
+ const char *shortname,
+ const char *pathname, FILE *fp);
#endif
+static const char *ascii_only_prefix = "PyInit";
+static const char *nonascii_prefix = "PyInitU";
+
+/* Get the variable part of a module's export symbol name.
+ * Returns a bytes instance. For non-ASCII-named modules, the name is
+ * encoded as per PEP 489.
+ * The hook_prefix pointer is set to either ascii_only_prefix or
+ * nonascii_prefix, as appropriate.
+ */
+static PyObject *
+get_encoded_name(PyObject *name, const char **hook_prefix) {
+ PyObject *tmp;
+ PyObject *encoded = NULL;
+ PyObject *modname = NULL;
+ Py_ssize_t name_len, lastdot;
+ _Py_IDENTIFIER(replace);
+
+ /* Get the short name (substring after last dot) */
+ name_len = PyUnicode_GetLength(name);
+ lastdot = PyUnicode_FindChar(name, '.', 0, name_len, -1);
+ if (lastdot < -1) {
+ return NULL;
+ } else if (lastdot >= 0) {
+ tmp = PyUnicode_Substring(name, lastdot + 1, name_len);
+ if (tmp == NULL)
+ return NULL;
+ name = tmp;
+ /* "name" now holds a new reference to the substring */
+ } else {
+ Py_INCREF(name);
+ }
+
+ /* Encode to ASCII or Punycode, as needed */
+ encoded = PyUnicode_AsEncodedString(name, "ascii", NULL);
+ if (encoded != NULL) {
+ *hook_prefix = ascii_only_prefix;
+ } else {
+ if (PyErr_ExceptionMatches(PyExc_UnicodeEncodeError)) {
+ PyErr_Clear();
+ encoded = PyUnicode_AsEncodedString(name, "punycode", NULL);
+ if (encoded == NULL) {
+ goto error;
+ }
+ *hook_prefix = nonascii_prefix;
+ } else {
+ goto error;
+ }
+ }
+
+ /* Replace '-' by '_' */
+ modname = _PyObject_CallMethodId(encoded, &PyId_replace, "cc", '-', '_');
+ if (modname == NULL)
+ goto error;
+
+ Py_DECREF(name);
+ Py_DECREF(encoded);
+ return modname;
+error:
+ Py_DECREF(name);
+ Py_XDECREF(encoded);
+ return NULL;
+}
+
PyObject *
-_PyImport_LoadDynamicModule(PyObject *name, PyObject *path, FILE *fp)
+_PyImport_LoadDynamicModuleWithSpec(PyObject *spec, FILE *fp)
{
- PyObject *m = NULL;
#ifndef MS_WINDOWS
- PyObject *pathbytes;
+ PyObject *pathbytes = NULL;
#endif
- PyObject *nameascii;
- char *namestr, *lastdot, *shortname, *packagecontext, *oldcontext;
- dl_funcptr p0;
- PyObject* (*p)(void);
- struct PyModuleDef *def;
-
- m = _PyImport_FindExtensionObject(name, path);
- if (m != NULL) {
- Py_INCREF(m);
- return m;
- }
-
- /* name must be encodable to ASCII because dynamic module must have a
- function called "PyInit_NAME", they are written in C, and the C language
- doesn't accept non-ASCII identifiers. */
- nameascii = PyUnicode_AsEncodedString(name, "ascii", NULL);
- if (nameascii == NULL)
+ PyObject *name_unicode = NULL, *name = NULL, *path = NULL, *m = NULL;
+ const char *name_buf, *hook_prefix;
+ char *oldcontext;
+ dl_funcptr exportfunc;
+ PyModuleDef *def;
+ PyObject *(*p0)(void);
+
+ name_unicode = PyObject_GetAttrString(spec, "name");
+ if (name_unicode == NULL) {
return NULL;
+ }
- namestr = PyBytes_AS_STRING(nameascii);
- if (namestr == NULL)
+ name = get_encoded_name(name_unicode, &hook_prefix);
+ if (name == NULL) {
goto error;
-
- lastdot = strrchr(namestr, '.');
- if (lastdot == NULL) {
- packagecontext = NULL;
- shortname = namestr;
- }
- else {
- packagecontext = namestr;
- shortname = lastdot+1;
}
+ name_buf = PyBytes_AS_STRING(name);
+
+ path = PyObject_GetAttrString(spec, "origin");
+ if (path == NULL)
+ goto error;
#ifdef MS_WINDOWS
- p0 = _PyImport_GetDynLoadWindows(shortname, path, fp);
+ exportfunc = _PyImport_FindSharedFuncptrWindows(hook_prefix, name_buf,
+ path, fp);
#else
pathbytes = PyUnicode_EncodeFSDefault(path);
if (pathbytes == NULL)
goto error;
- p0 = _PyImport_GetDynLoadFunc(shortname,
- PyBytes_AS_STRING(pathbytes), fp);
+ exportfunc = _PyImport_FindSharedFuncptr(hook_prefix, name_buf,
+ PyBytes_AS_STRING(pathbytes),
+ fp);
Py_DECREF(pathbytes);
#endif
- p = (PyObject*(*)(void))p0;
- if (PyErr_Occurred())
- goto error;
- if (p == NULL) {
- PyObject *msg = PyUnicode_FromFormat("dynamic module does not define "
- "init function (PyInit_%s)",
- shortname);
- if (msg == NULL)
- goto error;
- PyErr_SetImportError(msg, name, path);
- Py_DECREF(msg);
+
+ if (exportfunc == NULL) {
+ if (!PyErr_Occurred()) {
+ PyObject *msg;
+ msg = PyUnicode_FromFormat(
+ "dynamic module does not define "
+ "module export function (%s_%s)",
+ hook_prefix, name_buf);
+ if (msg == NULL)
+ goto error;
+ PyErr_SetImportError(msg, name_unicode, path);
+ Py_DECREF(msg);
+ }
goto error;
}
+
+ p0 = (PyObject *(*)(void))exportfunc;
+
+ /* Package context is needed for single-phase init */
oldcontext = _Py_PackageContext;
- _Py_PackageContext = packagecontext;
- m = (*p)();
+ _Py_PackageContext = PyUnicode_AsUTF8(name_unicode);
+ m = p0();
_Py_PackageContext = oldcontext;
- if (m == NULL)
- goto error;
- if (PyErr_Occurred()) {
+ if (m == NULL) {
+ if (!PyErr_Occurred()) {
+ PyErr_Format(
+ PyExc_SystemError,
+ "initialization of %s failed without raising an exception",
+ name_buf);
+ }
+ goto error;
+ } else if (PyErr_Occurred()) {
+ PyErr_Clear();
+ PyErr_Format(
+ PyExc_SystemError,
+ "initialization of %s raised unreported exception",
+ name_buf);
+ m = NULL;
+ goto error;
+ }
+ if (Py_TYPE(m) == NULL) {
+ /* This can happen when a PyModuleDef is returned without calling
+ * PyModuleDef_Init on it
+ */
PyErr_Format(PyExc_SystemError,
- "initialization of %s raised unreported exception",
- shortname);
+ "init function of %s returned uninitialized object",
+ name_buf);
+ m = NULL; /* prevent segfault in DECREF */
+ goto error;
+ }
+ if (PyObject_TypeCheck(m, &PyModuleDef_Type)) {
+ Py_DECREF(name_unicode);
+ Py_DECREF(name);
+ Py_DECREF(path);
+ return PyModule_FromDefAndSpec((PyModuleDef*)m, spec);
+ }
+
+ /* Fall back to single-phase init mechanism */
+
+ if (hook_prefix == nonascii_prefix) {
+ /* don't allow legacy init for non-ASCII module names */
+ PyErr_Format(
+ PyExc_SystemError,
+ "initialization of * did not return PyModuleDef",
+ name_buf);
goto error;
}
@@ -102,10 +200,10 @@ _PyImport_LoadDynamicModule(PyObject *name, PyObject *path, FILE *fp)
if (def == NULL) {
PyErr_Format(PyExc_SystemError,
"initialization of %s did not return an extension "
- "module", shortname);
+ "module", name_buf);
goto error;
}
- def->m_base.m_init = p;
+ def->m_base.m_init = p0;
/* Remember the filename as the __file__ attribute */
if (PyModule_AddObject(m, "__file__", path) < 0)
@@ -113,13 +211,19 @@ _PyImport_LoadDynamicModule(PyObject *name, PyObject *path, FILE *fp)
else
Py_INCREF(path);
- if (_PyImport_FixupExtensionObject(m, name, path) < 0)
+ if (_PyImport_FixupExtensionObject(m, name_unicode, path) < 0)
goto error;
- Py_DECREF(nameascii);
+
+ Py_DECREF(name_unicode);
+ Py_DECREF(name);
+ Py_DECREF(path);
+
return m;
error:
- Py_DECREF(nameascii);
+ Py_DECREF(name_unicode);
+ Py_XDECREF(name);
+ Py_XDECREF(path);
Py_XDECREF(m);
return NULL;
}
diff --git a/Python/importdl.h b/Python/importdl.h
index 6a51a91d2c..9847652b1f 100644
--- a/Python/importdl.h
+++ b/Python/importdl.h
@@ -8,8 +8,7 @@ extern "C" {
extern const char *_PyImport_DynLoadFiletab[];
-extern PyObject *_PyImport_LoadDynamicModule(PyObject *name, PyObject *pathname,
- FILE *);
+extern PyObject *_PyImport_LoadDynamicModuleWithSpec(PyObject *spec, FILE *);
/* Max length of module suffix searched for -- accommodates "module.slb" */
#define MAXSUFFIXSIZE 12
diff --git a/Python/importlib.h b/Python/importlib.h
index 75bfca405f..7f6b753baf 100644
--- a/Python/importlib.h
+++ b/Python/importlib.h
@@ -1,2263 +1,1452 @@
-/* Auto-generated by Modules/_freeze_importlib.c */
+/* Auto-generated by Programs/_freeze_importlib.c */
const unsigned char _Py_M__importlib[] = {
- 99,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,
- 0,64,0,0,0,115,228,4,0,0,100,0,0,90,0,0,
- 100,163,0,90,1,0,100,4,0,100,5,0,132,0,0,90,
- 2,0,100,6,0,100,7,0,132,0,0,90,3,0,100,8,
- 0,100,9,0,132,0,0,90,4,0,100,10,0,100,11,0,
- 132,0,0,90,5,0,100,12,0,100,13,0,132,0,0,90,
- 6,0,100,14,0,100,15,0,132,0,0,90,7,0,100,16,
- 0,100,17,0,132,0,0,90,8,0,100,18,0,100,19,0,
- 132,0,0,90,9,0,100,20,0,100,21,0,132,0,0,90,
- 10,0,100,22,0,100,23,0,100,24,0,132,1,0,90,11,
- 0,100,25,0,100,26,0,132,0,0,90,12,0,100,27,0,
- 100,28,0,132,0,0,90,13,0,101,14,0,101,12,0,106,
- 15,0,131,1,0,90,16,0,71,100,29,0,100,30,0,132,
- 0,0,100,30,0,131,2,0,90,17,0,105,0,0,90,18,
- 0,105,0,0,90,19,0,71,100,31,0,100,32,0,132,0,
- 0,100,32,0,101,20,0,131,3,0,90,21,0,71,100,33,
- 0,100,34,0,132,0,0,100,34,0,131,2,0,90,22,0,
- 71,100,35,0,100,36,0,132,0,0,100,36,0,131,2,0,
- 90,23,0,71,100,37,0,100,38,0,132,0,0,100,38,0,
- 131,2,0,90,24,0,100,39,0,100,40,0,132,0,0,90,
- 25,0,100,41,0,100,42,0,132,0,0,90,26,0,100,43,
- 0,100,44,0,132,0,0,90,27,0,100,45,0,106,28,0,
- 100,46,0,100,47,0,131,2,0,100,48,0,23,90,29,0,
- 101,30,0,106,31,0,101,29,0,100,47,0,131,2,0,90,
- 32,0,100,49,0,90,33,0,100,50,0,103,1,0,90,34,
- 0,100,51,0,103,1,0,90,35,0,100,52,0,103,1,0,
- 90,36,0,100,53,0,100,54,0,100,55,0,132,1,0,90,
- 37,0,100,56,0,100,57,0,132,0,0,90,38,0,100,58,
- 0,100,59,0,132,0,0,90,39,0,100,60,0,100,61,0,
- 132,0,0,90,40,0,100,62,0,100,63,0,100,64,0,100,
- 65,0,132,0,1,90,41,0,100,66,0,100,67,0,132,0,
- 0,90,42,0,100,68,0,100,69,0,132,0,0,90,43,0,
- 100,70,0,100,71,0,132,0,0,90,44,0,100,72,0,100,
- 73,0,132,0,0,90,45,0,100,74,0,100,75,0,132,0,
- 0,90,46,0,100,53,0,100,53,0,100,53,0,100,76,0,
- 100,77,0,132,3,0,90,47,0,100,53,0,100,53,0,100,
- 53,0,100,78,0,100,79,0,132,3,0,90,48,0,100,80,
- 0,100,80,0,100,81,0,100,82,0,132,2,0,90,49,0,
- 100,83,0,100,84,0,132,0,0,90,50,0,100,85,0,100,
- 86,0,132,0,0,90,51,0,71,100,87,0,100,88,0,132,
- 0,0,100,88,0,131,2,0,90,52,0,71,100,89,0,100,
- 90,0,132,0,0,100,90,0,131,2,0,90,53,0,100,91,
- 0,100,53,0,100,92,0,100,53,0,100,93,0,100,94,0,
- 132,0,2,90,54,0,101,55,0,131,0,0,90,56,0,100,
- 53,0,100,95,0,100,53,0,100,96,0,101,56,0,100,97,
- 0,100,98,0,132,1,2,90,57,0,100,53,0,100,53,0,
- 100,99,0,100,100,0,132,2,0,90,58,0,71,100,101,0,
- 100,102,0,132,0,0,100,102,0,131,2,0,90,59,0,100,
- 53,0,100,103,0,100,104,0,132,1,0,90,60,0,71,100,
- 105,0,100,106,0,132,0,0,100,106,0,131,2,0,90,61,
- 0,71,100,107,0,100,108,0,132,0,0,100,108,0,131,2,
- 0,90,62,0,71,100,109,0,100,110,0,132,0,0,100,110,
- 0,131,2,0,90,63,0,71,100,111,0,100,112,0,132,0,
- 0,100,112,0,131,2,0,90,64,0,71,100,113,0,100,114,
- 0,132,0,0,100,114,0,101,64,0,131,3,0,90,65,0,
- 71,100,115,0,100,116,0,132,0,0,100,116,0,131,2,0,
- 90,66,0,71,100,117,0,100,118,0,132,0,0,100,118,0,
- 101,66,0,101,65,0,131,4,0,90,67,0,71,100,119,0,
- 100,120,0,132,0,0,100,120,0,101,66,0,101,64,0,131,
- 4,0,90,68,0,103,0,0,90,69,0,71,100,121,0,100,
- 122,0,132,0,0,100,122,0,131,2,0,90,70,0,71,100,
- 123,0,100,124,0,132,0,0,100,124,0,131,2,0,90,71,
- 0,71,100,125,0,100,126,0,132,0,0,100,126,0,131,2,
- 0,90,72,0,71,100,127,0,100,128,0,132,0,0,100,128,
- 0,131,2,0,90,73,0,71,100,129,0,100,130,0,132,0,
- 0,100,130,0,131,2,0,90,74,0,71,100,131,0,100,132,
- 0,132,0,0,100,132,0,131,2,0,90,75,0,100,133,0,
- 100,134,0,132,0,0,90,76,0,100,135,0,100,136,0,132,
- 0,0,90,77,0,100,53,0,100,137,0,100,138,0,132,1,
- 0,90,78,0,100,139,0,100,140,0,132,0,0,90,79,0,
- 100,141,0,90,80,0,101,80,0,100,142,0,23,90,81,0,
- 100,143,0,100,144,0,132,0,0,90,82,0,100,145,0,100,
- 146,0,132,0,0,90,83,0,100,53,0,100,80,0,100,147,
- 0,100,148,0,132,2,0,90,84,0,100,149,0,100,150,0,
- 132,0,0,90,85,0,100,151,0,100,152,0,132,0,0,90,
- 86,0,100,153,0,100,154,0,132,0,0,90,87,0,100,53,
- 0,100,53,0,102,0,0,100,80,0,100,155,0,100,156,0,
- 132,4,0,90,88,0,100,157,0,100,158,0,132,0,0,90,
- 89,0,100,159,0,100,160,0,132,0,0,90,90,0,100,161,
- 0,100,162,0,132,0,0,90,91,0,100,53,0,83,41,164,
- 97,83,1,0,0,67,111,114,101,32,105,109,112,108,101,109,
- 101,110,116,97,116,105,111,110,32,111,102,32,105,109,112,111,
- 114,116,46,10,10,84,104,105,115,32,109,111,100,117,108,101,
- 32,105,115,32,78,79,84,32,109,101,97,110,116,32,116,111,
- 32,98,101,32,100,105,114,101,99,116,108,121,32,105,109,112,
- 111,114,116,101,100,33,32,73,116,32,104,97,115,32,98,101,
- 101,110,32,100,101,115,105,103,110,101,100,32,115,117,99,104,
- 10,116,104,97,116,32,105,116,32,99,97,110,32,98,101,32,
- 98,111,111,116,115,116,114,97,112,112,101,100,32,105,110,116,
- 111,32,80,121,116,104,111,110,32,97,115,32,116,104,101,32,
- 105,109,112,108,101,109,101,110,116,97,116,105,111,110,32,111,
- 102,32,105,109,112,111,114,116,46,32,65,115,10,115,117,99,
- 104,32,105,116,32,114,101,113,117,105,114,101,115,32,116,104,
- 101,32,105,110,106,101,99,116,105,111,110,32,111,102,32,115,
- 112,101,99,105,102,105,99,32,109,111,100,117,108,101,115,32,
- 97,110,100,32,97,116,116,114,105,98,117,116,101,115,32,105,
- 110,32,111,114,100,101,114,32,116,111,10,119,111,114,107,46,
- 32,79,110,101,32,115,104,111,117,108,100,32,117,115,101,32,
- 105,109,112,111,114,116,108,105,98,32,97,115,32,116,104,101,
- 32,112,117,98,108,105,99,45,102,97,99,105,110,103,32,118,
- 101,114,115,105,111,110,32,111,102,32,116,104,105,115,32,109,
- 111,100,117,108,101,46,10,10,218,3,119,105,110,218,6,99,
- 121,103,119,105,110,218,6,100,97,114,119,105,110,99,0,0,
- 0,0,0,0,0,0,1,0,0,0,2,0,0,0,67,0,
- 0,0,115,49,0,0,0,116,0,0,106,1,0,106,2,0,
- 116,3,0,131,1,0,114,33,0,100,1,0,100,2,0,132,
- 0,0,125,0,0,110,12,0,100,3,0,100,2,0,132,0,
- 0,125,0,0,124,0,0,83,41,4,78,99,0,0,0,0,
- 0,0,0,0,0,0,0,0,2,0,0,0,83,0,0,0,
- 115,13,0,0,0,100,1,0,116,0,0,106,1,0,107,6,
- 0,83,41,2,122,53,84,114,117,101,32,105,102,32,102,105,
- 108,101,110,97,109,101,115,32,109,117,115,116,32,98,101,32,
- 99,104,101,99,107,101,100,32,99,97,115,101,45,105,110,115,
- 101,110,115,105,116,105,118,101,108,121,46,115,12,0,0,0,
- 80,89,84,72,79,78,67,65,83,69,79,75,41,2,218,3,
- 95,111,115,90,7,101,110,118,105,114,111,110,169,0,114,4,
- 0,0,0,114,4,0,0,0,250,29,60,102,114,111,122,101,
- 110,32,105,109,112,111,114,116,108,105,98,46,95,98,111,111,
- 116,115,116,114,97,112,62,218,11,95,114,101,108,97,120,95,
- 99,97,115,101,30,0,0,0,115,2,0,0,0,0,2,122,
- 37,95,109,97,107,101,95,114,101,108,97,120,95,99,97,115,
- 101,46,60,108,111,99,97,108,115,62,46,95,114,101,108,97,
- 120,95,99,97,115,101,99,0,0,0,0,0,0,0,0,0,
- 0,0,0,1,0,0,0,83,0,0,0,115,4,0,0,0,
- 100,1,0,83,41,2,122,53,84,114,117,101,32,105,102,32,
- 102,105,108,101,110,97,109,101,115,32,109,117,115,116,32,98,
- 101,32,99,104,101,99,107,101,100,32,99,97,115,101,45,105,
- 110,115,101,110,115,105,116,105,118,101,108,121,46,70,114,4,
- 0,0,0,114,4,0,0,0,114,4,0,0,0,114,4,0,
- 0,0,114,5,0,0,0,114,6,0,0,0,34,0,0,0,
- 115,2,0,0,0,0,2,41,4,218,3,115,121,115,218,8,
- 112,108,97,116,102,111,114,109,218,10,115,116,97,114,116,115,
- 119,105,116,104,218,27,95,67,65,83,69,95,73,78,83,69,
- 78,83,73,84,73,86,69,95,80,76,65,84,70,79,82,77,
- 83,41,1,114,6,0,0,0,114,4,0,0,0,114,4,0,
- 0,0,114,5,0,0,0,218,16,95,109,97,107,101,95,114,
- 101,108,97,120,95,99,97,115,101,28,0,0,0,115,8,0,
- 0,0,0,1,18,1,15,4,12,3,114,11,0,0,0,99,
- 1,0,0,0,0,0,0,0,1,0,0,0,3,0,0,0,
- 67,0,0,0,115,26,0,0,0,116,0,0,124,0,0,131,
- 1,0,100,1,0,64,106,1,0,100,2,0,100,3,0,131,
- 2,0,83,41,4,122,42,67,111,110,118,101,114,116,32,97,
- 32,51,50,45,98,105,116,32,105,110,116,101,103,101,114,32,
- 116,111,32,108,105,116,116,108,101,45,101,110,100,105,97,110,
- 46,108,3,0,0,0,255,127,255,127,3,0,233,4,0,0,
- 0,218,6,108,105,116,116,108,101,41,2,218,3,105,110,116,
- 218,8,116,111,95,98,121,116,101,115,41,1,218,1,120,114,
- 4,0,0,0,114,4,0,0,0,114,5,0,0,0,218,7,
- 95,119,95,108,111,110,103,40,0,0,0,115,2,0,0,0,
- 0,2,114,17,0,0,0,99,1,0,0,0,0,0,0,0,
- 1,0,0,0,3,0,0,0,67,0,0,0,115,16,0,0,
- 0,116,0,0,106,1,0,124,0,0,100,1,0,131,2,0,
- 83,41,2,122,47,67,111,110,118,101,114,116,32,52,32,98,
- 121,116,101,115,32,105,110,32,108,105,116,116,108,101,45,101,
- 110,100,105,97,110,32,116,111,32,97,110,32,105,110,116,101,
- 103,101,114,46,114,13,0,0,0,41,2,114,14,0,0,0,
- 218,10,102,114,111,109,95,98,121,116,101,115,41,1,90,9,
- 105,110,116,95,98,121,116,101,115,114,4,0,0,0,114,4,
- 0,0,0,114,5,0,0,0,218,7,95,114,95,108,111,110,
- 103,45,0,0,0,115,2,0,0,0,0,2,114,19,0,0,
- 0,99,0,0,0,0,0,0,0,0,1,0,0,0,3,0,
- 0,0,71,0,0,0,115,26,0,0,0,116,0,0,106,1,
- 0,100,1,0,100,2,0,132,0,0,124,0,0,68,131,1,
- 0,131,1,0,83,41,3,122,31,82,101,112,108,97,99,101,
- 109,101,110,116,32,102,111,114,32,111,115,46,112,97,116,104,
- 46,106,111,105,110,40,41,46,99,1,0,0,0,0,0,0,
- 0,2,0,0,0,4,0,0,0,83,0,0,0,115,37,0,
- 0,0,103,0,0,124,0,0,93,27,0,125,1,0,124,1,
- 0,114,6,0,124,1,0,106,0,0,116,1,0,131,1,0,
- 145,2,0,113,6,0,83,114,4,0,0,0,41,2,218,6,
- 114,115,116,114,105,112,218,15,112,97,116,104,95,115,101,112,
- 97,114,97,116,111,114,115,41,2,218,2,46,48,218,4,112,
- 97,114,116,114,4,0,0,0,114,4,0,0,0,114,5,0,
- 0,0,250,10,60,108,105,115,116,99,111,109,112,62,52,0,
- 0,0,115,2,0,0,0,9,1,122,30,95,112,97,116,104,
- 95,106,111,105,110,46,60,108,111,99,97,108,115,62,46,60,
- 108,105,115,116,99,111,109,112,62,41,2,218,8,112,97,116,
- 104,95,115,101,112,218,4,106,111,105,110,41,1,218,10,112,
- 97,116,104,95,112,97,114,116,115,114,4,0,0,0,114,4,
- 0,0,0,114,5,0,0,0,218,10,95,112,97,116,104,95,
- 106,111,105,110,50,0,0,0,115,4,0,0,0,0,2,15,
- 1,114,28,0,0,0,99,1,0,0,0,0,0,0,0,5,
- 0,0,0,5,0,0,0,67,0,0,0,115,134,0,0,0,
- 116,0,0,116,1,0,131,1,0,100,1,0,107,2,0,114,
- 52,0,124,0,0,106,2,0,116,3,0,131,1,0,92,3,
- 0,125,1,0,125,2,0,125,3,0,124,1,0,124,3,0,
- 102,2,0,83,120,69,0,116,4,0,124,0,0,131,1,0,
- 68,93,55,0,125,4,0,124,4,0,116,1,0,107,6,0,
- 114,65,0,124,0,0,106,5,0,124,4,0,100,2,0,100,
- 1,0,131,1,1,92,2,0,125,1,0,125,3,0,124,1,
- 0,124,3,0,102,2,0,83,113,65,0,87,100,3,0,124,
- 0,0,102,2,0,83,41,4,122,32,82,101,112,108,97,99,
- 101,109,101,110,116,32,102,111,114,32,111,115,46,112,97,116,
- 104,46,115,112,108,105,116,40,41,46,233,1,0,0,0,90,
- 8,109,97,120,115,112,108,105,116,218,0,41,6,218,3,108,
- 101,110,114,21,0,0,0,218,10,114,112,97,114,116,105,116,
- 105,111,110,114,25,0,0,0,218,8,114,101,118,101,114,115,
- 101,100,218,6,114,115,112,108,105,116,41,5,218,4,112,97,
- 116,104,90,5,102,114,111,110,116,218,1,95,218,4,116,97,
- 105,108,114,16,0,0,0,114,4,0,0,0,114,4,0,0,
- 0,114,5,0,0,0,218,11,95,112,97,116,104,95,115,112,
- 108,105,116,56,0,0,0,115,16,0,0,0,0,2,18,1,
- 24,1,10,1,19,1,12,1,27,1,14,1,114,38,0,0,
- 0,99,1,0,0,0,0,0,0,0,1,0,0,0,2,0,
- 0,0,67,0,0,0,115,13,0,0,0,116,0,0,106,1,
- 0,124,0,0,131,1,0,83,41,1,122,126,83,116,97,116,
- 32,116,104,101,32,112,97,116,104,46,10,10,32,32,32,32,
- 77,97,100,101,32,97,32,115,101,112,97,114,97,116,101,32,
- 102,117,110,99,116,105,111,110,32,116,111,32,109,97,107,101,
- 32,105,116,32,101,97,115,105,101,114,32,116,111,32,111,118,
- 101,114,114,105,100,101,32,105,110,32,101,120,112,101,114,105,
- 109,101,110,116,115,10,32,32,32,32,40,101,46,103,46,32,
- 99,97,99,104,101,32,115,116,97,116,32,114,101,115,117,108,
- 116,115,41,46,10,10,32,32,32,32,41,2,114,3,0,0,
- 0,90,4,115,116,97,116,41,1,114,35,0,0,0,114,4,
- 0,0,0,114,4,0,0,0,114,5,0,0,0,218,10,95,
- 112,97,116,104,95,115,116,97,116,68,0,0,0,115,2,0,
- 0,0,0,7,114,39,0,0,0,99,2,0,0,0,0,0,
- 0,0,3,0,0,0,11,0,0,0,67,0,0,0,115,58,
- 0,0,0,121,16,0,116,0,0,124,0,0,131,1,0,125,
- 2,0,87,110,22,0,4,116,1,0,107,10,0,114,40,0,
- 1,1,1,100,1,0,83,89,110,1,0,88,124,2,0,106,
- 2,0,100,2,0,64,124,1,0,107,2,0,83,41,3,122,
- 49,84,101,115,116,32,119,104,101,116,104,101,114,32,116,104,
- 101,32,112,97,116,104,32,105,115,32,116,104,101,32,115,112,
- 101,99,105,102,105,101,100,32,109,111,100,101,32,116,121,112,
- 101,46,70,105,0,240,0,0,41,3,114,39,0,0,0,218,
- 7,79,83,69,114,114,111,114,218,7,115,116,95,109,111,100,
- 101,41,3,114,35,0,0,0,218,4,109,111,100,101,90,9,
- 115,116,97,116,95,105,110,102,111,114,4,0,0,0,114,4,
- 0,0,0,114,5,0,0,0,218,18,95,112,97,116,104,95,
- 105,115,95,109,111,100,101,95,116,121,112,101,78,0,0,0,
- 115,10,0,0,0,0,2,3,1,16,1,13,1,9,1,114,
- 43,0,0,0,99,1,0,0,0,0,0,0,0,1,0,0,
- 0,3,0,0,0,67,0,0,0,115,13,0,0,0,116,0,
- 0,124,0,0,100,1,0,131,2,0,83,41,2,122,31,82,
- 101,112,108,97,99,101,109,101,110,116,32,102,111,114,32,111,
- 115,46,112,97,116,104,46,105,115,102,105,108,101,46,105,0,
- 128,0,0,41,1,114,43,0,0,0,41,1,114,35,0,0,
- 0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,
- 218,12,95,112,97,116,104,95,105,115,102,105,108,101,87,0,
- 0,0,115,2,0,0,0,0,2,114,44,0,0,0,99,1,
- 0,0,0,0,0,0,0,1,0,0,0,3,0,0,0,67,
- 0,0,0,115,34,0,0,0,124,0,0,115,21,0,116,0,
- 0,106,1,0,131,0,0,125,0,0,110,0,0,116,2,0,
- 124,0,0,100,1,0,131,2,0,83,41,2,122,30,82,101,
- 112,108,97,99,101,109,101,110,116,32,102,111,114,32,111,115,
- 46,112,97,116,104,46,105,115,100,105,114,46,105,0,64,0,
- 0,41,3,114,3,0,0,0,218,6,103,101,116,99,119,100,
- 114,43,0,0,0,41,1,114,35,0,0,0,114,4,0,0,
- 0,114,4,0,0,0,114,5,0,0,0,218,11,95,112,97,
- 116,104,95,105,115,100,105,114,92,0,0,0,115,6,0,0,
- 0,0,2,6,1,15,1,114,46,0,0,0,105,182,1,0,
- 0,99,3,0,0,0,0,0,0,0,6,0,0,0,17,0,
- 0,0,67,0,0,0,115,192,0,0,0,100,1,0,106,0,
- 0,124,0,0,116,1,0,124,0,0,131,1,0,131,2,0,
- 125,3,0,116,2,0,106,3,0,124,3,0,116,2,0,106,
- 4,0,116,2,0,106,5,0,66,116,2,0,106,6,0,66,
- 124,2,0,100,2,0,64,131,3,0,125,4,0,121,60,0,
- 116,7,0,106,8,0,124,4,0,100,3,0,131,2,0,143,
- 20,0,125,5,0,124,5,0,106,9,0,124,1,0,131,1,
- 0,1,87,100,4,0,81,88,116,2,0,106,10,0,124,3,
- 0,124,0,0,131,2,0,1,87,110,59,0,4,116,11,0,
- 107,10,0,114,187,0,1,1,1,121,17,0,116,2,0,106,
- 12,0,124,3,0,131,1,0,1,87,110,18,0,4,116,11,
- 0,107,10,0,114,179,0,1,1,1,89,110,1,0,88,130,
- 0,0,89,110,1,0,88,100,4,0,83,41,5,122,162,66,
- 101,115,116,45,101,102,102,111,114,116,32,102,117,110,99,116,
- 105,111,110,32,116,111,32,119,114,105,116,101,32,100,97,116,
- 97,32,116,111,32,97,32,112,97,116,104,32,97,116,111,109,
- 105,99,97,108,108,121,46,10,32,32,32,32,66,101,32,112,
- 114,101,112,97,114,101,100,32,116,111,32,104,97,110,100,108,
- 101,32,97,32,70,105,108,101,69,120,105,115,116,115,69,114,
- 114,111,114,32,105,102,32,99,111,110,99,117,114,114,101,110,
- 116,32,119,114,105,116,105,110,103,32,111,102,32,116,104,101,
- 10,32,32,32,32,116,101,109,112,111,114,97,114,121,32,102,
- 105,108,101,32,105,115,32,97,116,116,101,109,112,116,101,100,
- 46,122,5,123,125,46,123,125,105,182,1,0,0,90,2,119,
- 98,78,41,13,218,6,102,111,114,109,97,116,218,2,105,100,
- 114,3,0,0,0,90,4,111,112,101,110,90,6,79,95,69,
- 88,67,76,90,7,79,95,67,82,69,65,84,90,8,79,95,
- 87,82,79,78,76,89,218,3,95,105,111,218,6,70,105,108,
- 101,73,79,218,5,119,114,105,116,101,218,7,114,101,112,108,
- 97,99,101,114,40,0,0,0,90,6,117,110,108,105,110,107,
- 41,6,114,35,0,0,0,218,4,100,97,116,97,114,42,0,
- 0,0,90,8,112,97,116,104,95,116,109,112,90,2,102,100,
- 218,4,102,105,108,101,114,4,0,0,0,114,4,0,0,0,
- 114,5,0,0,0,218,13,95,119,114,105,116,101,95,97,116,
- 111,109,105,99,99,0,0,0,115,26,0,0,0,0,5,24,
- 1,9,1,33,1,3,3,21,1,19,1,20,1,13,1,3,
- 1,17,1,13,1,5,1,114,55,0,0,0,99,2,0,0,
- 0,0,0,0,0,3,0,0,0,7,0,0,0,67,0,0,
- 0,115,95,0,0,0,120,69,0,100,1,0,100,2,0,100,
- 3,0,100,4,0,103,4,0,68,93,49,0,125,2,0,116,
- 0,0,124,1,0,124,2,0,131,2,0,114,19,0,116,1,
- 0,124,0,0,124,2,0,116,2,0,124,1,0,124,2,0,
- 131,2,0,131,3,0,1,113,19,0,113,19,0,87,124,0,
- 0,106,3,0,106,4,0,124,1,0,106,3,0,131,1,0,
- 1,100,5,0,83,41,6,122,47,83,105,109,112,108,101,32,
- 115,117,98,115,116,105,116,117,116,101,32,102,111,114,32,102,
- 117,110,99,116,111,111,108,115,46,117,112,100,97,116,101,95,
- 119,114,97,112,112,101,114,46,218,10,95,95,109,111,100,117,
- 108,101,95,95,218,8,95,95,110,97,109,101,95,95,218,12,
- 95,95,113,117,97,108,110,97,109,101,95,95,218,7,95,95,
- 100,111,99,95,95,78,41,5,218,7,104,97,115,97,116,116,
- 114,218,7,115,101,116,97,116,116,114,218,7,103,101,116,97,
- 116,116,114,218,8,95,95,100,105,99,116,95,95,218,6,117,
- 112,100,97,116,101,41,3,90,3,110,101,119,90,3,111,108,
- 100,114,52,0,0,0,114,4,0,0,0,114,4,0,0,0,
- 114,5,0,0,0,218,5,95,119,114,97,112,121,0,0,0,
- 115,8,0,0,0,0,2,25,1,15,1,32,1,114,65,0,
- 0,0,99,1,0,0,0,0,0,0,0,1,0,0,0,2,
- 0,0,0,67,0,0,0,115,16,0,0,0,116,0,0,116,
- 1,0,131,1,0,124,0,0,131,1,0,83,41,1,78,41,
- 2,218,4,116,121,112,101,114,7,0,0,0,41,1,218,4,
- 110,97,109,101,114,4,0,0,0,114,4,0,0,0,114,5,
- 0,0,0,218,11,95,110,101,119,95,109,111,100,117,108,101,
- 129,0,0,0,115,2,0,0,0,0,1,114,68,0,0,0,
- 99,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,
- 0,64,0,0,0,115,58,0,0,0,101,0,0,90,1,0,
- 100,0,0,90,2,0,100,1,0,90,3,0,100,2,0,100,
- 3,0,132,0,0,90,4,0,100,4,0,100,5,0,132,0,
- 0,90,5,0,100,6,0,100,7,0,132,0,0,90,6,0,
- 100,8,0,83,41,9,218,13,95,77,97,110,97,103,101,82,
- 101,108,111,97,100,122,63,77,97,110,97,103,101,115,32,116,
- 104,101,32,112,111,115,115,105,98,108,101,32,99,108,101,97,
- 110,45,117,112,32,111,102,32,115,121,115,46,109,111,100,117,
- 108,101,115,32,102,111,114,32,108,111,97,100,95,109,111,100,
- 117,108,101,40,41,46,99,2,0,0,0,0,0,0,0,2,
- 0,0,0,2,0,0,0,67,0,0,0,115,13,0,0,0,
- 124,1,0,124,0,0,95,0,0,100,0,0,83,41,1,78,
- 41,1,218,5,95,110,97,109,101,41,2,218,4,115,101,108,
- 102,114,67,0,0,0,114,4,0,0,0,114,4,0,0,0,
- 114,5,0,0,0,218,8,95,95,105,110,105,116,95,95,141,
- 0,0,0,115,2,0,0,0,0,1,122,22,95,77,97,110,
- 97,103,101,82,101,108,111,97,100,46,95,95,105,110,105,116,
- 95,95,99,1,0,0,0,0,0,0,0,1,0,0,0,2,
- 0,0,0,67,0,0,0,115,25,0,0,0,124,0,0,106,
- 0,0,116,1,0,106,2,0,107,6,0,124,0,0,95,3,
- 0,100,0,0,83,41,1,78,41,4,114,70,0,0,0,114,
- 7,0,0,0,218,7,109,111,100,117,108,101,115,218,10,95,
- 105,115,95,114,101,108,111,97,100,41,1,114,71,0,0,0,
- 114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,218,
- 9,95,95,101,110,116,101,114,95,95,144,0,0,0,115,2,
- 0,0,0,0,1,122,23,95,77,97,110,97,103,101,82,101,
- 108,111,97,100,46,95,95,101,110,116,101,114,95,95,99,1,
- 0,0,0,0,0,0,0,2,0,0,0,11,0,0,0,71,
- 0,0,0,115,80,0,0,0,116,0,0,100,1,0,100,2,
- 0,132,0,0,124,1,0,68,131,1,0,131,1,0,114,76,
- 0,124,0,0,106,1,0,12,114,76,0,121,17,0,116,2,
- 0,106,3,0,124,0,0,106,4,0,61,87,113,76,0,4,
- 116,5,0,107,10,0,114,72,0,1,1,1,89,113,76,0,
- 88,110,0,0,100,0,0,83,41,3,78,99,1,0,0,0,
- 0,0,0,0,2,0,0,0,3,0,0,0,115,0,0,0,
- 115,27,0,0,0,124,0,0,93,17,0,125,1,0,124,1,
- 0,100,0,0,107,9,0,86,1,113,3,0,100,0,0,83,
- 41,1,78,114,4,0,0,0,41,2,114,22,0,0,0,218,
- 3,97,114,103,114,4,0,0,0,114,4,0,0,0,114,5,
- 0,0,0,250,9,60,103,101,110,101,120,112,114,62,148,0,
- 0,0,115,2,0,0,0,6,0,122,41,95,77,97,110,97,
- 103,101,82,101,108,111,97,100,46,95,95,101,120,105,116,95,
- 95,46,60,108,111,99,97,108,115,62,46,60,103,101,110,101,
- 120,112,114,62,41,6,218,3,97,110,121,114,74,0,0,0,
- 114,7,0,0,0,114,73,0,0,0,114,70,0,0,0,218,
- 8,75,101,121,69,114,114,111,114,41,2,114,71,0,0,0,
- 218,4,97,114,103,115,114,4,0,0,0,114,4,0,0,0,
- 114,5,0,0,0,218,8,95,95,101,120,105,116,95,95,147,
- 0,0,0,115,10,0,0,0,0,1,35,1,3,1,17,1,
- 13,1,122,22,95,77,97,110,97,103,101,82,101,108,111,97,
- 100,46,95,95,101,120,105,116,95,95,78,41,7,114,57,0,
- 0,0,114,56,0,0,0,114,58,0,0,0,114,59,0,0,
- 0,114,72,0,0,0,114,75,0,0,0,114,81,0,0,0,
- 114,4,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
- 5,0,0,0,114,69,0,0,0,137,0,0,0,115,8,0,
- 0,0,12,2,6,2,12,3,12,3,114,69,0,0,0,99,
- 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
- 64,0,0,0,115,16,0,0,0,101,0,0,90,1,0,100,
- 0,0,90,2,0,100,1,0,83,41,2,218,14,95,68,101,
- 97,100,108,111,99,107,69,114,114,111,114,78,41,3,114,57,
- 0,0,0,114,56,0,0,0,114,58,0,0,0,114,4,0,
- 0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,
- 0,114,82,0,0,0,162,0,0,0,115,2,0,0,0,12,
- 1,114,82,0,0,0,99,0,0,0,0,0,0,0,0,0,
- 0,0,0,2,0,0,0,64,0,0,0,115,82,0,0,0,
- 101,0,0,90,1,0,100,0,0,90,2,0,100,1,0,90,
- 3,0,100,2,0,100,3,0,132,0,0,90,4,0,100,4,
- 0,100,5,0,132,0,0,90,5,0,100,6,0,100,7,0,
- 132,0,0,90,6,0,100,8,0,100,9,0,132,0,0,90,
- 7,0,100,10,0,100,11,0,132,0,0,90,8,0,100,12,
- 0,83,41,13,218,11,95,77,111,100,117,108,101,76,111,99,
- 107,122,169,65,32,114,101,99,117,114,115,105,118,101,32,108,
- 111,99,107,32,105,109,112,108,101,109,101,110,116,97,116,105,
- 111,110,32,119,104,105,99,104,32,105,115,32,97,98,108,101,
- 32,116,111,32,100,101,116,101,99,116,32,100,101,97,100,108,
- 111,99,107,115,10,32,32,32,32,40,101,46,103,46,32,116,
- 104,114,101,97,100,32,49,32,116,114,121,105,110,103,32,116,
- 111,32,116,97,107,101,32,108,111,99,107,115,32,65,32,116,
- 104,101,110,32,66,44,32,97,110,100,32,116,104,114,101,97,
- 100,32,50,32,116,114,121,105,110,103,32,116,111,10,32,32,
- 32,32,116,97,107,101,32,108,111,99,107,115,32,66,32,116,
- 104,101,110,32,65,41,46,10,32,32,32,32,99,2,0,0,
- 0,0,0,0,0,2,0,0,0,2,0,0,0,67,0,0,
- 0,115,70,0,0,0,116,0,0,106,1,0,131,0,0,124,
- 0,0,95,2,0,116,0,0,106,1,0,131,0,0,124,0,
- 0,95,3,0,124,1,0,124,0,0,95,4,0,100,0,0,
- 124,0,0,95,5,0,100,1,0,124,0,0,95,6,0,100,
- 1,0,124,0,0,95,7,0,100,0,0,83,41,2,78,233,
- 0,0,0,0,41,8,218,7,95,116,104,114,101,97,100,90,
- 13,97,108,108,111,99,97,116,101,95,108,111,99,107,218,4,
- 108,111,99,107,218,6,119,97,107,101,117,112,114,67,0,0,
- 0,218,5,111,119,110,101,114,218,5,99,111,117,110,116,218,
- 7,119,97,105,116,101,114,115,41,2,114,71,0,0,0,114,
- 67,0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,
- 0,0,0,114,72,0,0,0,172,0,0,0,115,12,0,0,
- 0,0,1,15,1,15,1,9,1,9,1,9,1,122,20,95,
- 77,111,100,117,108,101,76,111,99,107,46,95,95,105,110,105,
- 116,95,95,99,1,0,0,0,0,0,0,0,4,0,0,0,
- 2,0,0,0,67,0,0,0,115,88,0,0,0,116,0,0,
- 106,1,0,131,0,0,125,1,0,124,0,0,106,2,0,125,
- 2,0,120,60,0,116,3,0,106,4,0,124,2,0,131,1,
- 0,125,3,0,124,3,0,100,0,0,107,8,0,114,55,0,
- 100,1,0,83,124,3,0,106,2,0,125,2,0,124,2,0,
- 124,1,0,107,2,0,114,24,0,100,2,0,83,113,24,0,
- 87,100,0,0,83,41,3,78,70,84,41,5,114,85,0,0,
- 0,218,9,103,101,116,95,105,100,101,110,116,114,88,0,0,
- 0,218,12,95,98,108,111,99,107,105,110,103,95,111,110,218,
- 3,103,101,116,41,4,114,71,0,0,0,218,2,109,101,218,
- 3,116,105,100,114,86,0,0,0,114,4,0,0,0,114,4,
- 0,0,0,114,5,0,0,0,218,12,104,97,115,95,100,101,
- 97,100,108,111,99,107,180,0,0,0,115,18,0,0,0,0,
- 2,12,1,9,1,3,1,15,1,12,1,4,1,9,1,12,
- 1,122,24,95,77,111,100,117,108,101,76,111,99,107,46,104,
- 97,115,95,100,101,97,100,108,111,99,107,99,1,0,0,0,
- 0,0,0,0,2,0,0,0,16,0,0,0,67,0,0,0,
- 115,215,0,0,0,116,0,0,106,1,0,131,0,0,125,1,
- 0,124,0,0,116,2,0,124,1,0,60,122,178,0,120,171,
- 0,124,0,0,106,3,0,143,130,0,1,124,0,0,106,4,
- 0,100,1,0,107,2,0,115,68,0,124,0,0,106,5,0,
- 124,1,0,107,2,0,114,96,0,124,1,0,124,0,0,95,
- 5,0,124,0,0,4,106,4,0,100,2,0,55,2,95,4,
- 0,100,3,0,83,124,0,0,106,6,0,131,0,0,114,127,
- 0,116,7,0,100,4,0,124,0,0,22,131,1,0,130,1,
- 0,110,0,0,124,0,0,106,8,0,106,9,0,100,5,0,
- 131,1,0,114,163,0,124,0,0,4,106,10,0,100,2,0,
- 55,2,95,10,0,110,0,0,87,100,6,0,81,88,124,0,
- 0,106,8,0,106,9,0,131,0,0,1,124,0,0,106,8,
- 0,106,11,0,131,0,0,1,113,28,0,87,87,100,6,0,
- 116,2,0,124,1,0,61,88,100,6,0,83,41,7,122,185,
- 10,32,32,32,32,32,32,32,32,65,99,113,117,105,114,101,
- 32,116,104,101,32,109,111,100,117,108,101,32,108,111,99,107,
- 46,32,32,73,102,32,97,32,112,111,116,101,110,116,105,97,
- 108,32,100,101,97,100,108,111,99,107,32,105,115,32,100,101,
- 116,101,99,116,101,100,44,10,32,32,32,32,32,32,32,32,
- 97,32,95,68,101,97,100,108,111,99,107,69,114,114,111,114,
- 32,105,115,32,114,97,105,115,101,100,46,10,32,32,32,32,
- 32,32,32,32,79,116,104,101,114,119,105,115,101,44,32,116,
- 104,101,32,108,111,99,107,32,105,115,32,97,108,119,97,121,
- 115,32,97,99,113,117,105,114,101,100,32,97,110,100,32,84,
- 114,117,101,32,105,115,32,114,101,116,117,114,110,101,100,46,
- 10,32,32,32,32,32,32,32,32,114,84,0,0,0,114,29,
- 0,0,0,84,122,23,100,101,97,100,108,111,99,107,32,100,
- 101,116,101,99,116,101,100,32,98,121,32,37,114,70,78,41,
- 12,114,85,0,0,0,114,91,0,0,0,114,92,0,0,0,
- 114,86,0,0,0,114,89,0,0,0,114,88,0,0,0,114,
- 96,0,0,0,114,82,0,0,0,114,87,0,0,0,218,7,
- 97,99,113,117,105,114,101,114,90,0,0,0,218,7,114,101,
- 108,101,97,115,101,41,2,114,71,0,0,0,114,95,0,0,
- 0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,
- 114,97,0,0,0,192,0,0,0,115,32,0,0,0,0,6,
- 12,1,10,1,3,1,3,1,10,1,30,1,9,1,15,1,
- 4,1,12,1,19,1,18,1,24,2,13,1,21,2,122,19,
- 95,77,111,100,117,108,101,76,111,99,107,46,97,99,113,117,
- 105,114,101,99,1,0,0,0,0,0,0,0,2,0,0,0,
- 10,0,0,0,67,0,0,0,115,165,0,0,0,116,0,0,
- 106,1,0,131,0,0,125,1,0,124,0,0,106,2,0,143,
- 138,0,1,124,0,0,106,3,0,124,1,0,107,3,0,114,
- 52,0,116,4,0,100,1,0,131,1,0,130,1,0,110,0,
- 0,124,0,0,106,5,0,100,2,0,107,4,0,115,73,0,
- 116,6,0,130,1,0,124,0,0,4,106,5,0,100,3,0,
- 56,2,95,5,0,124,0,0,106,5,0,100,2,0,107,2,
- 0,114,155,0,100,0,0,124,0,0,95,3,0,124,0,0,
- 106,7,0,114,155,0,124,0,0,4,106,7,0,100,3,0,
- 56,2,95,7,0,124,0,0,106,8,0,106,9,0,131,0,
- 0,1,113,155,0,110,0,0,87,100,0,0,81,88,100,0,
- 0,83,41,4,78,122,31,99,97,110,110,111,116,32,114,101,
- 108,101,97,115,101,32,117,110,45,97,99,113,117,105,114,101,
- 100,32,108,111,99,107,114,84,0,0,0,114,29,0,0,0,
- 41,10,114,85,0,0,0,114,91,0,0,0,114,86,0,0,
- 0,114,88,0,0,0,218,12,82,117,110,116,105,109,101,69,
- 114,114,111,114,114,89,0,0,0,218,14,65,115,115,101,114,
- 116,105,111,110,69,114,114,111,114,114,90,0,0,0,114,87,
- 0,0,0,114,98,0,0,0,41,2,114,71,0,0,0,114,
- 95,0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,
- 0,0,0,114,98,0,0,0,217,0,0,0,115,22,0,0,
- 0,0,1,12,1,10,1,15,1,15,1,21,1,15,1,15,
- 1,9,1,9,1,15,1,122,19,95,77,111,100,117,108,101,
- 76,111,99,107,46,114,101,108,101,97,115,101,99,1,0,0,
- 0,0,0,0,0,1,0,0,0,4,0,0,0,67,0,0,
- 0,115,25,0,0,0,100,1,0,106,0,0,124,0,0,106,
- 1,0,116,2,0,124,0,0,131,1,0,131,2,0,83,41,
- 2,78,122,23,95,77,111,100,117,108,101,76,111,99,107,40,
- 123,33,114,125,41,32,97,116,32,123,125,41,3,114,47,0,
- 0,0,114,67,0,0,0,114,48,0,0,0,41,1,114,71,
- 0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,
- 0,0,218,8,95,95,114,101,112,114,95,95,230,0,0,0,
- 115,2,0,0,0,0,1,122,20,95,77,111,100,117,108,101,
- 76,111,99,107,46,95,95,114,101,112,114,95,95,78,41,9,
- 114,57,0,0,0,114,56,0,0,0,114,58,0,0,0,114,
- 59,0,0,0,114,72,0,0,0,114,96,0,0,0,114,97,
- 0,0,0,114,98,0,0,0,114,101,0,0,0,114,4,0,
- 0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,
- 0,114,83,0,0,0,166,0,0,0,115,12,0,0,0,12,
- 4,6,2,12,8,12,12,12,25,12,13,114,83,0,0,0,
- 99,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,
- 0,64,0,0,0,115,70,0,0,0,101,0,0,90,1,0,
- 100,0,0,90,2,0,100,1,0,90,3,0,100,2,0,100,
- 3,0,132,0,0,90,4,0,100,4,0,100,5,0,132,0,
- 0,90,5,0,100,6,0,100,7,0,132,0,0,90,6,0,
- 100,8,0,100,9,0,132,0,0,90,7,0,100,10,0,83,
- 41,11,218,16,95,68,117,109,109,121,77,111,100,117,108,101,
- 76,111,99,107,122,86,65,32,115,105,109,112,108,101,32,95,
- 77,111,100,117,108,101,76,111,99,107,32,101,113,117,105,118,
- 97,108,101,110,116,32,102,111,114,32,80,121,116,104,111,110,
- 32,98,117,105,108,100,115,32,119,105,116,104,111,117,116,10,
- 32,32,32,32,109,117,108,116,105,45,116,104,114,101,97,100,
- 105,110,103,32,115,117,112,112,111,114,116,46,99,2,0,0,
- 0,0,0,0,0,2,0,0,0,2,0,0,0,67,0,0,
- 0,115,22,0,0,0,124,1,0,124,0,0,95,0,0,100,
- 1,0,124,0,0,95,1,0,100,0,0,83,41,2,78,114,
- 84,0,0,0,41,2,114,67,0,0,0,114,89,0,0,0,
- 41,2,114,71,0,0,0,114,67,0,0,0,114,4,0,0,
- 0,114,4,0,0,0,114,5,0,0,0,114,72,0,0,0,
- 238,0,0,0,115,4,0,0,0,0,1,9,1,122,25,95,
- 68,117,109,109,121,77,111,100,117,108,101,76,111,99,107,46,
- 95,95,105,110,105,116,95,95,99,1,0,0,0,0,0,0,
- 0,1,0,0,0,3,0,0,0,67,0,0,0,115,19,0,
- 0,0,124,0,0,4,106,0,0,100,1,0,55,2,95,0,
- 0,100,2,0,83,41,3,78,114,29,0,0,0,84,41,1,
- 114,89,0,0,0,41,1,114,71,0,0,0,114,4,0,0,
- 0,114,4,0,0,0,114,5,0,0,0,114,97,0,0,0,
- 242,0,0,0,115,4,0,0,0,0,1,15,1,122,24,95,
- 68,117,109,109,121,77,111,100,117,108,101,76,111,99,107,46,
- 97,99,113,117,105,114,101,99,1,0,0,0,0,0,0,0,
- 1,0,0,0,3,0,0,0,67,0,0,0,115,49,0,0,
- 0,124,0,0,106,0,0,100,1,0,107,2,0,114,30,0,
- 116,1,0,100,2,0,131,1,0,130,1,0,110,0,0,124,
- 0,0,4,106,0,0,100,3,0,56,2,95,0,0,100,0,
- 0,83,41,4,78,114,84,0,0,0,122,31,99,97,110,110,
- 111,116,32,114,101,108,101,97,115,101,32,117,110,45,97,99,
- 113,117,105,114,101,100,32,108,111,99,107,114,29,0,0,0,
- 41,2,114,89,0,0,0,114,99,0,0,0,41,1,114,71,
- 0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,
- 0,0,114,98,0,0,0,246,0,0,0,115,6,0,0,0,
- 0,1,15,1,15,1,122,24,95,68,117,109,109,121,77,111,
- 100,117,108,101,76,111,99,107,46,114,101,108,101,97,115,101,
- 99,1,0,0,0,0,0,0,0,1,0,0,0,4,0,0,
- 0,67,0,0,0,115,25,0,0,0,100,1,0,106,0,0,
- 124,0,0,106,1,0,116,2,0,124,0,0,131,1,0,131,
- 2,0,83,41,2,78,122,28,95,68,117,109,109,121,77,111,
+ 99,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,
+ 0,64,0,0,0,115,169,2,0,0,100,0,0,90,0,0,
+ 100,1,0,97,1,0,100,2,0,100,3,0,132,0,0,90,
+ 2,0,100,4,0,100,5,0,132,0,0,90,3,0,71,100,
+ 6,0,100,7,0,132,0,0,100,7,0,131,2,0,90,4,
+ 0,105,0,0,90,5,0,105,0,0,90,6,0,71,100,8,
+ 0,100,9,0,132,0,0,100,9,0,101,7,0,131,3,0,
+ 90,8,0,71,100,10,0,100,11,0,132,0,0,100,11,0,
+ 131,2,0,90,9,0,71,100,12,0,100,13,0,132,0,0,
+ 100,13,0,131,2,0,90,10,0,71,100,14,0,100,15,0,
+ 132,0,0,100,15,0,131,2,0,90,11,0,100,16,0,100,
+ 17,0,132,0,0,90,12,0,100,18,0,100,19,0,132,0,
+ 0,90,13,0,100,20,0,100,21,0,132,0,0,90,14,0,
+ 100,22,0,100,23,0,100,24,0,100,25,0,132,0,1,90,
+ 15,0,100,26,0,100,27,0,132,0,0,90,16,0,100,28,
+ 0,100,29,0,132,0,0,90,17,0,100,30,0,100,31,0,
+ 132,0,0,90,18,0,100,32,0,100,33,0,132,0,0,90,
+ 19,0,71,100,34,0,100,35,0,132,0,0,100,35,0,131,
+ 2,0,90,20,0,71,100,36,0,100,37,0,132,0,0,100,
+ 37,0,131,2,0,90,21,0,100,38,0,100,1,0,100,39,
+ 0,100,1,0,100,40,0,100,41,0,132,0,2,90,22,0,
+ 101,23,0,131,0,0,90,24,0,100,1,0,100,1,0,100,
+ 42,0,100,43,0,132,2,0,90,25,0,100,44,0,100,45,
+ 0,100,46,0,100,47,0,132,0,1,90,26,0,100,48,0,
+ 100,49,0,132,0,0,90,27,0,100,50,0,100,51,0,132,
+ 0,0,90,28,0,100,52,0,100,53,0,132,0,0,90,29,
+ 0,100,54,0,100,55,0,132,0,0,90,30,0,100,56,0,
+ 100,57,0,132,0,0,90,31,0,100,58,0,100,59,0,132,
+ 0,0,90,32,0,71,100,60,0,100,61,0,132,0,0,100,
+ 61,0,131,2,0,90,33,0,71,100,62,0,100,63,0,132,
+ 0,0,100,63,0,131,2,0,90,34,0,71,100,64,0,100,
+ 65,0,132,0,0,100,65,0,131,2,0,90,35,0,100,66,
+ 0,100,67,0,132,0,0,90,36,0,100,68,0,100,69,0,
+ 132,0,0,90,37,0,100,1,0,100,70,0,100,71,0,132,
+ 1,0,90,38,0,100,72,0,100,73,0,132,0,0,90,39,
+ 0,100,74,0,90,40,0,101,40,0,100,75,0,23,90,41,
+ 0,100,76,0,100,77,0,132,0,0,90,42,0,100,78,0,
+ 100,79,0,132,0,0,90,43,0,100,1,0,100,80,0,100,
+ 81,0,100,82,0,132,2,0,90,44,0,100,83,0,100,84,
+ 0,132,0,0,90,45,0,100,85,0,100,86,0,132,0,0,
+ 90,46,0,100,1,0,100,1,0,102,0,0,100,80,0,100,
+ 87,0,100,88,0,132,4,0,90,47,0,100,89,0,100,90,
+ 0,132,0,0,90,48,0,100,91,0,100,92,0,132,0,0,
+ 90,49,0,100,93,0,100,94,0,132,0,0,90,50,0,100,
+ 1,0,83,41,95,97,83,1,0,0,67,111,114,101,32,105,
+ 109,112,108,101,109,101,110,116,97,116,105,111,110,32,111,102,
+ 32,105,109,112,111,114,116,46,10,10,84,104,105,115,32,109,
+ 111,100,117,108,101,32,105,115,32,78,79,84,32,109,101,97,
+ 110,116,32,116,111,32,98,101,32,100,105,114,101,99,116,108,
+ 121,32,105,109,112,111,114,116,101,100,33,32,73,116,32,104,
+ 97,115,32,98,101,101,110,32,100,101,115,105,103,110,101,100,
+ 32,115,117,99,104,10,116,104,97,116,32,105,116,32,99,97,
+ 110,32,98,101,32,98,111,111,116,115,116,114,97,112,112,101,
+ 100,32,105,110,116,111,32,80,121,116,104,111,110,32,97,115,
+ 32,116,104,101,32,105,109,112,108,101,109,101,110,116,97,116,
+ 105,111,110,32,111,102,32,105,109,112,111,114,116,46,32,65,
+ 115,10,115,117,99,104,32,105,116,32,114,101,113,117,105,114,
+ 101,115,32,116,104,101,32,105,110,106,101,99,116,105,111,110,
+ 32,111,102,32,115,112,101,99,105,102,105,99,32,109,111,100,
+ 117,108,101,115,32,97,110,100,32,97,116,116,114,105,98,117,
+ 116,101,115,32,105,110,32,111,114,100,101,114,32,116,111,10,
+ 119,111,114,107,46,32,79,110,101,32,115,104,111,117,108,100,
+ 32,117,115,101,32,105,109,112,111,114,116,108,105,98,32,97,
+ 115,32,116,104,101,32,112,117,98,108,105,99,45,102,97,99,
+ 105,110,103,32,118,101,114,115,105,111,110,32,111,102,32,116,
+ 104,105,115,32,109,111,100,117,108,101,46,10,10,78,99,2,
+ 0,0,0,0,0,0,0,3,0,0,0,7,0,0,0,67,
+ 0,0,0,115,92,0,0,0,120,66,0,100,1,0,100,2,
+ 0,100,3,0,100,4,0,103,4,0,68,93,46,0,125,2,
+ 0,116,0,0,124,1,0,124,2,0,131,2,0,114,19,0,
+ 116,1,0,124,0,0,124,2,0,116,2,0,124,1,0,124,
+ 2,0,131,2,0,131,3,0,1,113,19,0,87,124,0,0,
+ 106,3,0,106,4,0,124,1,0,106,3,0,131,1,0,1,
+ 100,5,0,83,41,6,122,47,83,105,109,112,108,101,32,115,
+ 117,98,115,116,105,116,117,116,101,32,102,111,114,32,102,117,
+ 110,99,116,111,111,108,115,46,117,112,100,97,116,101,95,119,
+ 114,97,112,112,101,114,46,218,10,95,95,109,111,100,117,108,
+ 101,95,95,218,8,95,95,110,97,109,101,95,95,218,12,95,
+ 95,113,117,97,108,110,97,109,101,95,95,218,7,95,95,100,
+ 111,99,95,95,78,41,5,218,7,104,97,115,97,116,116,114,
+ 218,7,115,101,116,97,116,116,114,218,7,103,101,116,97,116,
+ 116,114,218,8,95,95,100,105,99,116,95,95,218,6,117,112,
+ 100,97,116,101,41,3,90,3,110,101,119,90,3,111,108,100,
+ 218,7,114,101,112,108,97,99,101,169,0,114,10,0,0,0,
+ 250,29,60,102,114,111,122,101,110,32,105,109,112,111,114,116,
+ 108,105,98,46,95,98,111,111,116,115,116,114,97,112,62,218,
+ 5,95,119,114,97,112,27,0,0,0,115,8,0,0,0,0,
+ 2,25,1,15,1,29,1,114,12,0,0,0,99,1,0,0,
+ 0,0,0,0,0,1,0,0,0,2,0,0,0,67,0,0,
+ 0,115,16,0,0,0,116,0,0,116,1,0,131,1,0,124,
+ 0,0,131,1,0,83,41,1,78,41,2,218,4,116,121,112,
+ 101,218,3,115,121,115,41,1,218,4,110,97,109,101,114,10,
+ 0,0,0,114,10,0,0,0,114,11,0,0,0,218,11,95,
+ 110,101,119,95,109,111,100,117,108,101,35,0,0,0,115,2,
+ 0,0,0,0,1,114,16,0,0,0,99,0,0,0,0,0,
+ 0,0,0,0,0,0,0,2,0,0,0,64,0,0,0,115,
+ 58,0,0,0,101,0,0,90,1,0,100,0,0,90,2,0,
+ 100,1,0,90,3,0,100,2,0,100,3,0,132,0,0,90,
+ 4,0,100,4,0,100,5,0,132,0,0,90,5,0,100,6,
+ 0,100,7,0,132,0,0,90,6,0,100,8,0,83,41,9,
+ 218,13,95,77,97,110,97,103,101,82,101,108,111,97,100,122,
+ 63,77,97,110,97,103,101,115,32,116,104,101,32,112,111,115,
+ 115,105,98,108,101,32,99,108,101,97,110,45,117,112,32,111,
+ 102,32,115,121,115,46,109,111,100,117,108,101,115,32,102,111,
+ 114,32,108,111,97,100,95,109,111,100,117,108,101,40,41,46,
+ 99,2,0,0,0,0,0,0,0,2,0,0,0,2,0,0,
+ 0,67,0,0,0,115,13,0,0,0,124,1,0,124,0,0,
+ 95,0,0,100,0,0,83,41,1,78,41,1,218,5,95,110,
+ 97,109,101,41,2,218,4,115,101,108,102,114,15,0,0,0,
+ 114,10,0,0,0,114,10,0,0,0,114,11,0,0,0,218,
+ 8,95,95,105,110,105,116,95,95,43,0,0,0,115,2,0,
+ 0,0,0,1,122,22,95,77,97,110,97,103,101,82,101,108,
+ 111,97,100,46,95,95,105,110,105,116,95,95,99,1,0,0,
+ 0,0,0,0,0,1,0,0,0,2,0,0,0,67,0,0,
+ 0,115,25,0,0,0,124,0,0,106,0,0,116,1,0,106,
+ 2,0,107,6,0,124,0,0,95,3,0,100,0,0,83,41,
+ 1,78,41,4,114,18,0,0,0,114,14,0,0,0,218,7,
+ 109,111,100,117,108,101,115,218,10,95,105,115,95,114,101,108,
+ 111,97,100,41,1,114,19,0,0,0,114,10,0,0,0,114,
+ 10,0,0,0,114,11,0,0,0,218,9,95,95,101,110,116,
+ 101,114,95,95,46,0,0,0,115,2,0,0,0,0,1,122,
+ 23,95,77,97,110,97,103,101,82,101,108,111,97,100,46,95,
+ 95,101,110,116,101,114,95,95,99,1,0,0,0,0,0,0,
+ 0,2,0,0,0,11,0,0,0,71,0,0,0,115,77,0,
+ 0,0,116,0,0,100,1,0,100,2,0,132,0,0,124,1,
+ 0,68,131,1,0,131,1,0,114,73,0,124,0,0,106,1,
+ 0,12,114,73,0,121,17,0,116,2,0,106,3,0,124,0,
+ 0,106,4,0,61,87,110,18,0,4,116,5,0,107,10,0,
+ 114,72,0,1,1,1,89,110,1,0,88,100,0,0,83,41,
+ 3,78,99,1,0,0,0,0,0,0,0,2,0,0,0,3,
+ 0,0,0,115,0,0,0,115,27,0,0,0,124,0,0,93,
+ 17,0,125,1,0,124,1,0,100,0,0,107,9,0,86,1,
+ 113,3,0,100,0,0,83,41,1,78,114,10,0,0,0,41,
+ 2,218,2,46,48,218,3,97,114,103,114,10,0,0,0,114,
+ 10,0,0,0,114,11,0,0,0,250,9,60,103,101,110,101,
+ 120,112,114,62,50,0,0,0,115,2,0,0,0,6,0,122,
+ 41,95,77,97,110,97,103,101,82,101,108,111,97,100,46,95,
+ 95,101,120,105,116,95,95,46,60,108,111,99,97,108,115,62,
+ 46,60,103,101,110,101,120,112,114,62,41,6,218,3,97,110,
+ 121,114,22,0,0,0,114,14,0,0,0,114,21,0,0,0,
+ 114,18,0,0,0,218,8,75,101,121,69,114,114,111,114,41,
+ 2,114,19,0,0,0,218,4,97,114,103,115,114,10,0,0,
+ 0,114,10,0,0,0,114,11,0,0,0,218,8,95,95,101,
+ 120,105,116,95,95,49,0,0,0,115,10,0,0,0,0,1,
+ 35,1,3,1,17,1,13,1,122,22,95,77,97,110,97,103,
+ 101,82,101,108,111,97,100,46,95,95,101,120,105,116,95,95,
+ 78,41,7,114,1,0,0,0,114,0,0,0,0,114,2,0,
+ 0,0,114,3,0,0,0,114,20,0,0,0,114,23,0,0,
+ 0,114,30,0,0,0,114,10,0,0,0,114,10,0,0,0,
+ 114,10,0,0,0,114,11,0,0,0,114,17,0,0,0,39,
+ 0,0,0,115,8,0,0,0,12,2,6,2,12,3,12,3,
+ 114,17,0,0,0,99,0,0,0,0,0,0,0,0,0,0,
+ 0,0,1,0,0,0,64,0,0,0,115,16,0,0,0,101,
+ 0,0,90,1,0,100,0,0,90,2,0,100,1,0,83,41,
+ 2,218,14,95,68,101,97,100,108,111,99,107,69,114,114,111,
+ 114,78,41,3,114,1,0,0,0,114,0,0,0,0,114,2,
+ 0,0,0,114,10,0,0,0,114,10,0,0,0,114,10,0,
+ 0,0,114,11,0,0,0,114,31,0,0,0,64,0,0,0,
+ 115,2,0,0,0,12,1,114,31,0,0,0,99,0,0,0,
+ 0,0,0,0,0,0,0,0,0,2,0,0,0,64,0,0,
+ 0,115,82,0,0,0,101,0,0,90,1,0,100,0,0,90,
+ 2,0,100,1,0,90,3,0,100,2,0,100,3,0,132,0,
+ 0,90,4,0,100,4,0,100,5,0,132,0,0,90,5,0,
+ 100,6,0,100,7,0,132,0,0,90,6,0,100,8,0,100,
+ 9,0,132,0,0,90,7,0,100,10,0,100,11,0,132,0,
+ 0,90,8,0,100,12,0,83,41,13,218,11,95,77,111,100,
+ 117,108,101,76,111,99,107,122,169,65,32,114,101,99,117,114,
+ 115,105,118,101,32,108,111,99,107,32,105,109,112,108,101,109,
+ 101,110,116,97,116,105,111,110,32,119,104,105,99,104,32,105,
+ 115,32,97,98,108,101,32,116,111,32,100,101,116,101,99,116,
+ 32,100,101,97,100,108,111,99,107,115,10,32,32,32,32,40,
+ 101,46,103,46,32,116,104,114,101,97,100,32,49,32,116,114,
+ 121,105,110,103,32,116,111,32,116,97,107,101,32,108,111,99,
+ 107,115,32,65,32,116,104,101,110,32,66,44,32,97,110,100,
+ 32,116,104,114,101,97,100,32,50,32,116,114,121,105,110,103,
+ 32,116,111,10,32,32,32,32,116,97,107,101,32,108,111,99,
+ 107,115,32,66,32,116,104,101,110,32,65,41,46,10,32,32,
+ 32,32,99,2,0,0,0,0,0,0,0,2,0,0,0,2,
+ 0,0,0,67,0,0,0,115,70,0,0,0,116,0,0,106,
+ 1,0,131,0,0,124,0,0,95,2,0,116,0,0,106,1,
+ 0,131,0,0,124,0,0,95,3,0,124,1,0,124,0,0,
+ 95,4,0,100,0,0,124,0,0,95,5,0,100,1,0,124,
+ 0,0,95,6,0,100,1,0,124,0,0,95,7,0,100,0,
+ 0,83,41,2,78,233,0,0,0,0,41,8,218,7,95,116,
+ 104,114,101,97,100,90,13,97,108,108,111,99,97,116,101,95,
+ 108,111,99,107,218,4,108,111,99,107,218,6,119,97,107,101,
+ 117,112,114,15,0,0,0,218,5,111,119,110,101,114,218,5,
+ 99,111,117,110,116,218,7,119,97,105,116,101,114,115,41,2,
+ 114,19,0,0,0,114,15,0,0,0,114,10,0,0,0,114,
+ 10,0,0,0,114,11,0,0,0,114,20,0,0,0,74,0,
+ 0,0,115,12,0,0,0,0,1,15,1,15,1,9,1,9,
+ 1,9,1,122,20,95,77,111,100,117,108,101,76,111,99,107,
+ 46,95,95,105,110,105,116,95,95,99,1,0,0,0,0,0,
+ 0,0,4,0,0,0,2,0,0,0,67,0,0,0,115,88,
+ 0,0,0,116,0,0,106,1,0,131,0,0,125,1,0,124,
+ 0,0,106,2,0,125,2,0,120,60,0,116,3,0,106,4,
+ 0,124,2,0,131,1,0,125,3,0,124,3,0,100,0,0,
+ 107,8,0,114,55,0,100,1,0,83,124,3,0,106,2,0,
+ 125,2,0,124,2,0,124,1,0,107,2,0,114,24,0,100,
+ 2,0,83,113,24,0,87,100,0,0,83,41,3,78,70,84,
+ 41,5,114,34,0,0,0,218,9,103,101,116,95,105,100,101,
+ 110,116,114,37,0,0,0,218,12,95,98,108,111,99,107,105,
+ 110,103,95,111,110,218,3,103,101,116,41,4,114,19,0,0,
+ 0,90,2,109,101,218,3,116,105,100,114,35,0,0,0,114,
+ 10,0,0,0,114,10,0,0,0,114,11,0,0,0,218,12,
+ 104,97,115,95,100,101,97,100,108,111,99,107,82,0,0,0,
+ 115,18,0,0,0,0,2,12,1,9,1,3,1,15,1,12,
+ 1,4,1,9,1,12,1,122,24,95,77,111,100,117,108,101,
+ 76,111,99,107,46,104,97,115,95,100,101,97,100,108,111,99,
+ 107,99,1,0,0,0,0,0,0,0,2,0,0,0,16,0,
+ 0,0,67,0,0,0,115,210,0,0,0,116,0,0,106,1,
+ 0,131,0,0,125,1,0,124,0,0,116,2,0,124,1,0,
+ 60,122,173,0,120,166,0,124,0,0,106,3,0,143,124,0,
+ 1,124,0,0,106,4,0,100,1,0,107,2,0,115,68,0,
+ 124,0,0,106,5,0,124,1,0,107,2,0,114,96,0,124,
+ 1,0,124,0,0,95,5,0,124,0,0,4,106,4,0,100,
+ 2,0,55,2,95,4,0,100,3,0,83,124,0,0,106,6,
+ 0,131,0,0,114,124,0,116,7,0,100,4,0,124,0,0,
+ 22,131,1,0,130,1,0,124,0,0,106,8,0,106,9,0,
+ 100,5,0,131,1,0,114,157,0,124,0,0,4,106,10,0,
+ 100,2,0,55,2,95,10,0,87,100,6,0,81,82,88,124,
+ 0,0,106,8,0,106,9,0,131,0,0,1,124,0,0,106,
+ 8,0,106,11,0,131,0,0,1,113,28,0,87,87,100,6,
+ 0,116,2,0,124,1,0,61,88,100,6,0,83,41,7,122,
+ 185,10,32,32,32,32,32,32,32,32,65,99,113,117,105,114,
+ 101,32,116,104,101,32,109,111,100,117,108,101,32,108,111,99,
+ 107,46,32,32,73,102,32,97,32,112,111,116,101,110,116,105,
+ 97,108,32,100,101,97,100,108,111,99,107,32,105,115,32,100,
+ 101,116,101,99,116,101,100,44,10,32,32,32,32,32,32,32,
+ 32,97,32,95,68,101,97,100,108,111,99,107,69,114,114,111,
+ 114,32,105,115,32,114,97,105,115,101,100,46,10,32,32,32,
+ 32,32,32,32,32,79,116,104,101,114,119,105,115,101,44,32,
+ 116,104,101,32,108,111,99,107,32,105,115,32,97,108,119,97,
+ 121,115,32,97,99,113,117,105,114,101,100,32,97,110,100,32,
+ 84,114,117,101,32,105,115,32,114,101,116,117,114,110,101,100,
+ 46,10,32,32,32,32,32,32,32,32,114,33,0,0,0,233,
+ 1,0,0,0,84,122,23,100,101,97,100,108,111,99,107,32,
+ 100,101,116,101,99,116,101,100,32,98,121,32,37,114,70,78,
+ 41,12,114,34,0,0,0,114,40,0,0,0,114,41,0,0,
+ 0,114,35,0,0,0,114,38,0,0,0,114,37,0,0,0,
+ 114,44,0,0,0,114,31,0,0,0,114,36,0,0,0,218,
+ 7,97,99,113,117,105,114,101,114,39,0,0,0,218,7,114,
+ 101,108,101,97,115,101,41,2,114,19,0,0,0,114,43,0,
+ 0,0,114,10,0,0,0,114,10,0,0,0,114,11,0,0,
+ 0,114,46,0,0,0,94,0,0,0,115,32,0,0,0,0,
+ 6,12,1,10,1,3,1,3,1,10,1,30,1,9,1,15,
+ 1,4,1,12,1,16,1,18,1,22,2,13,1,21,2,122,
+ 19,95,77,111,100,117,108,101,76,111,99,107,46,97,99,113,
+ 117,105,114,101,99,1,0,0,0,0,0,0,0,2,0,0,
+ 0,10,0,0,0,67,0,0,0,115,157,0,0,0,116,0,
+ 0,106,1,0,131,0,0,125,1,0,124,0,0,106,2,0,
+ 143,129,0,1,124,0,0,106,3,0,124,1,0,107,3,0,
+ 114,49,0,116,4,0,100,1,0,131,1,0,130,1,0,124,
+ 0,0,106,5,0,100,2,0,107,4,0,115,70,0,116,6,
+ 0,130,1,0,124,0,0,4,106,5,0,100,3,0,56,2,
+ 95,5,0,124,0,0,106,5,0,100,2,0,107,2,0,114,
+ 146,0,100,0,0,124,0,0,95,3,0,124,0,0,106,7,
+ 0,114,146,0,124,0,0,4,106,7,0,100,3,0,56,2,
+ 95,7,0,124,0,0,106,8,0,106,9,0,131,0,0,1,
+ 87,100,0,0,81,82,88,100,0,0,83,41,4,78,122,31,
+ 99,97,110,110,111,116,32,114,101,108,101,97,115,101,32,117,
+ 110,45,97,99,113,117,105,114,101,100,32,108,111,99,107,114,
+ 33,0,0,0,114,45,0,0,0,41,10,114,34,0,0,0,
+ 114,40,0,0,0,114,35,0,0,0,114,37,0,0,0,218,
+ 12,82,117,110,116,105,109,101,69,114,114,111,114,114,38,0,
+ 0,0,218,14,65,115,115,101,114,116,105,111,110,69,114,114,
+ 111,114,114,39,0,0,0,114,36,0,0,0,114,47,0,0,
+ 0,41,2,114,19,0,0,0,114,43,0,0,0,114,10,0,
+ 0,0,114,10,0,0,0,114,11,0,0,0,114,47,0,0,
+ 0,119,0,0,0,115,22,0,0,0,0,1,12,1,10,1,
+ 15,1,12,1,21,1,15,1,15,1,9,1,9,1,15,1,
+ 122,19,95,77,111,100,117,108,101,76,111,99,107,46,114,101,
+ 108,101,97,115,101,99,1,0,0,0,0,0,0,0,1,0,
+ 0,0,4,0,0,0,67,0,0,0,115,25,0,0,0,100,
+ 1,0,106,0,0,124,0,0,106,1,0,116,2,0,124,0,
+ 0,131,1,0,131,2,0,83,41,2,78,122,23,95,77,111,
100,117,108,101,76,111,99,107,40,123,33,114,125,41,32,97,
- 116,32,123,125,41,3,114,47,0,0,0,114,67,0,0,0,
- 114,48,0,0,0,41,1,114,71,0,0,0,114,4,0,0,
- 0,114,4,0,0,0,114,5,0,0,0,114,101,0,0,0,
- 251,0,0,0,115,2,0,0,0,0,1,122,25,95,68,117,
- 109,109,121,77,111,100,117,108,101,76,111,99,107,46,95,95,
- 114,101,112,114,95,95,78,41,8,114,57,0,0,0,114,56,
- 0,0,0,114,58,0,0,0,114,59,0,0,0,114,72,0,
- 0,0,114,97,0,0,0,114,98,0,0,0,114,101,0,0,
- 0,114,4,0,0,0,114,4,0,0,0,114,4,0,0,0,
- 114,5,0,0,0,114,102,0,0,0,234,0,0,0,115,10,
- 0,0,0,12,2,6,2,12,4,12,4,12,5,114,102,0,
- 0,0,99,0,0,0,0,0,0,0,0,0,0,0,0,2,
- 0,0,0,64,0,0,0,115,52,0,0,0,101,0,0,90,
- 1,0,100,0,0,90,2,0,100,1,0,100,2,0,132,0,
- 0,90,3,0,100,3,0,100,4,0,132,0,0,90,4,0,
- 100,5,0,100,6,0,132,0,0,90,5,0,100,7,0,83,
- 41,8,218,18,95,77,111,100,117,108,101,76,111,99,107,77,
- 97,110,97,103,101,114,99,2,0,0,0,0,0,0,0,2,
- 0,0,0,2,0,0,0,67,0,0,0,115,22,0,0,0,
- 124,1,0,124,0,0,95,0,0,100,0,0,124,0,0,95,
- 1,0,100,0,0,83,41,1,78,41,2,114,70,0,0,0,
- 218,5,95,108,111,99,107,41,2,114,71,0,0,0,114,67,
- 0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,
- 0,0,114,72,0,0,0,1,1,0,0,115,4,0,0,0,
- 0,1,9,1,122,27,95,77,111,100,117,108,101,76,111,99,
- 107,77,97,110,97,103,101,114,46,95,95,105,110,105,116,95,
- 95,99,1,0,0,0,0,0,0,0,1,0,0,0,10,0,
- 0,0,67,0,0,0,115,53,0,0,0,122,22,0,116,0,
- 0,124,0,0,106,1,0,131,1,0,124,0,0,95,2,0,
- 87,100,0,0,116,3,0,106,4,0,131,0,0,1,88,124,
- 0,0,106,2,0,106,5,0,131,0,0,1,100,0,0,83,
- 41,1,78,41,6,218,16,95,103,101,116,95,109,111,100,117,
- 108,101,95,108,111,99,107,114,70,0,0,0,114,104,0,0,
- 0,218,4,95,105,109,112,218,12,114,101,108,101,97,115,101,
- 95,108,111,99,107,114,97,0,0,0,41,1,114,71,0,0,
- 0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,
- 114,75,0,0,0,5,1,0,0,115,8,0,0,0,0,1,
- 3,1,22,2,11,1,122,28,95,77,111,100,117,108,101,76,
- 111,99,107,77,97,110,97,103,101,114,46,95,95,101,110,116,
- 101,114,95,95,99,1,0,0,0,0,0,0,0,3,0,0,
- 0,1,0,0,0,79,0,0,0,115,17,0,0,0,124,0,
- 0,106,0,0,106,1,0,131,0,0,1,100,0,0,83,41,
- 1,78,41,2,114,104,0,0,0,114,98,0,0,0,41,3,
- 114,71,0,0,0,114,80,0,0,0,218,6,107,119,97,114,
- 103,115,114,4,0,0,0,114,4,0,0,0,114,5,0,0,
- 0,114,81,0,0,0,12,1,0,0,115,2,0,0,0,0,
- 1,122,27,95,77,111,100,117,108,101,76,111,99,107,77,97,
- 110,97,103,101,114,46,95,95,101,120,105,116,95,95,78,41,
- 6,114,57,0,0,0,114,56,0,0,0,114,58,0,0,0,
- 114,72,0,0,0,114,75,0,0,0,114,81,0,0,0,114,
- 4,0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,
- 0,0,0,114,103,0,0,0,255,0,0,0,115,6,0,0,
- 0,12,2,12,4,12,7,114,103,0,0,0,99,1,0,0,
- 0,0,0,0,0,3,0,0,0,11,0,0,0,3,0,0,
- 0,115,142,0,0,0,100,1,0,125,1,0,121,17,0,116,
- 0,0,136,0,0,25,131,0,0,125,1,0,87,110,18,0,
- 4,116,1,0,107,10,0,114,43,0,1,1,1,89,110,1,
- 0,88,124,1,0,100,1,0,107,8,0,114,138,0,116,2,
- 0,100,1,0,107,8,0,114,83,0,116,3,0,136,0,0,
- 131,1,0,125,1,0,110,12,0,116,4,0,136,0,0,131,
- 1,0,125,1,0,135,0,0,102,1,0,100,2,0,100,3,
- 0,134,0,0,125,2,0,116,5,0,106,6,0,124,1,0,
- 124,2,0,131,2,0,116,0,0,136,0,0,60,110,0,0,
- 124,1,0,83,41,4,122,109,71,101,116,32,111,114,32,99,
- 114,101,97,116,101,32,116,104,101,32,109,111,100,117,108,101,
- 32,108,111,99,107,32,102,111,114,32,97,32,103,105,118,101,
- 110,32,109,111,100,117,108,101,32,110,97,109,101,46,10,10,
- 32,32,32,32,83,104,111,117,108,100,32,111,110,108,121,32,
- 98,101,32,99,97,108,108,101,100,32,119,105,116,104,32,116,
- 104,101,32,105,109,112,111,114,116,32,108,111,99,107,32,116,
- 97,107,101,110,46,78,99,1,0,0,0,0,0,0,0,1,
- 0,0,0,2,0,0,0,19,0,0,0,115,11,0,0,0,
- 116,0,0,136,0,0,61,100,0,0,83,41,1,78,41,1,
- 218,13,95,109,111,100,117,108,101,95,108,111,99,107,115,41,
- 1,114,36,0,0,0,41,1,114,67,0,0,0,114,4,0,
- 0,0,114,5,0,0,0,218,2,99,98,32,1,0,0,115,
- 2,0,0,0,0,1,122,28,95,103,101,116,95,109,111,100,
- 117,108,101,95,108,111,99,107,46,60,108,111,99,97,108,115,
- 62,46,99,98,41,7,114,109,0,0,0,114,79,0,0,0,
- 114,85,0,0,0,114,102,0,0,0,114,83,0,0,0,218,
- 8,95,119,101,97,107,114,101,102,90,3,114,101,102,41,3,
- 114,67,0,0,0,114,86,0,0,0,114,110,0,0,0,114,
- 4,0,0,0,41,1,114,67,0,0,0,114,5,0,0,0,
- 114,105,0,0,0,18,1,0,0,115,24,0,0,0,0,4,
- 6,1,3,1,17,1,13,1,5,1,12,1,12,1,15,2,
- 12,1,18,2,25,1,114,105,0,0,0,99,1,0,0,0,
- 0,0,0,0,2,0,0,0,11,0,0,0,67,0,0,0,
- 115,71,0,0,0,116,0,0,124,0,0,131,1,0,125,1,
- 0,116,1,0,106,2,0,131,0,0,1,121,14,0,124,1,
- 0,106,3,0,131,0,0,1,87,110,18,0,4,116,4,0,
- 107,10,0,114,56,0,1,1,1,89,110,11,0,88,124,1,
- 0,106,5,0,131,0,0,1,100,1,0,83,41,2,97,21,
- 1,0,0,82,101,108,101,97,115,101,32,116,104,101,32,103,
- 108,111,98,97,108,32,105,109,112,111,114,116,32,108,111,99,
- 107,44,32,97,110,100,32,97,99,113,117,105,114,101,115,32,
- 116,104,101,110,32,114,101,108,101,97,115,101,32,116,104,101,
- 10,32,32,32,32,109,111,100,117,108,101,32,108,111,99,107,
- 32,102,111,114,32,97,32,103,105,118,101,110,32,109,111,100,
- 117,108,101,32,110,97,109,101,46,10,32,32,32,32,84,104,
- 105,115,32,105,115,32,117,115,101,100,32,116,111,32,101,110,
- 115,117,114,101,32,97,32,109,111,100,117,108,101,32,105,115,
- 32,99,111,109,112,108,101,116,101,108,121,32,105,110,105,116,
- 105,97,108,105,122,101,100,44,32,105,110,32,116,104,101,10,
- 32,32,32,32,101,118,101,110,116,32,105,116,32,105,115,32,
- 98,101,105,110,103,32,105,109,112,111,114,116,101,100,32,98,
- 121,32,97,110,111,116,104,101,114,32,116,104,114,101,97,100,
- 46,10,10,32,32,32,32,83,104,111,117,108,100,32,111,110,
- 108,121,32,98,101,32,99,97,108,108,101,100,32,119,105,116,
- 104,32,116,104,101,32,105,109,112,111,114,116,32,108,111,99,
- 107,32,116,97,107,101,110,46,78,41,6,114,105,0,0,0,
- 114,106,0,0,0,114,107,0,0,0,114,97,0,0,0,114,
- 82,0,0,0,114,98,0,0,0,41,2,114,67,0,0,0,
- 114,86,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
- 5,0,0,0,218,19,95,108,111,99,107,95,117,110,108,111,
- 99,107,95,109,111,100,117,108,101,37,1,0,0,115,14,0,
- 0,0,0,7,12,1,10,1,3,1,14,1,13,3,5,2,
- 114,112,0,0,0,99,1,0,0,0,0,0,0,0,3,0,
- 0,0,3,0,0,0,79,0,0,0,115,13,0,0,0,124,
- 0,0,124,1,0,124,2,0,142,0,0,83,41,1,97,46,
- 1,0,0,114,101,109,111,118,101,95,105,109,112,111,114,116,
- 108,105,98,95,102,114,97,109,101,115,32,105,110,32,105,109,
- 112,111,114,116,46,99,32,119,105,108,108,32,97,108,119,97,
- 121,115,32,114,101,109,111,118,101,32,115,101,113,117,101,110,
- 99,101,115,10,32,32,32,32,111,102,32,105,109,112,111,114,
- 116,108,105,98,32,102,114,97,109,101,115,32,116,104,97,116,
- 32,101,110,100,32,119,105,116,104,32,97,32,99,97,108,108,
- 32,116,111,32,116,104,105,115,32,102,117,110,99,116,105,111,
- 110,10,10,32,32,32,32,85,115,101,32,105,116,32,105,110,
- 115,116,101,97,100,32,111,102,32,97,32,110,111,114,109,97,
- 108,32,99,97,108,108,32,105,110,32,112,108,97,99,101,115,
- 32,119,104,101,114,101,32,105,110,99,108,117,100,105,110,103,
- 32,116,104,101,32,105,109,112,111,114,116,108,105,98,10,32,
- 32,32,32,102,114,97,109,101,115,32,105,110,116,114,111,100,
- 117,99,101,115,32,117,110,119,97,110,116,101,100,32,110,111,
- 105,115,101,32,105,110,116,111,32,116,104,101,32,116,114,97,
- 99,101,98,97,99,107,32,40,101,46,103,46,32,119,104,101,
- 110,32,101,120,101,99,117,116,105,110,103,10,32,32,32,32,
- 109,111,100,117,108,101,32,99,111,100,101,41,10,32,32,32,
- 32,114,4,0,0,0,41,3,218,1,102,114,80,0,0,0,
- 90,4,107,119,100,115,114,4,0,0,0,114,4,0,0,0,
- 114,5,0,0,0,218,25,95,99,97,108,108,95,119,105,116,
- 104,95,102,114,97,109,101,115,95,114,101,109,111,118,101,100,
- 57,1,0,0,115,2,0,0,0,0,8,114,114,0,0,0,
- 105,238,12,0,0,233,2,0,0,0,114,13,0,0,0,115,
- 2,0,0,0,13,10,90,11,95,95,112,121,99,97,99,104,
- 101,95,95,122,3,46,112,121,122,4,46,112,121,99,122,4,
- 46,112,121,111,78,99,2,0,0,0,0,0,0,0,11,0,
- 0,0,6,0,0,0,67,0,0,0,115,192,0,0,0,124,
- 1,0,100,1,0,107,8,0,114,25,0,116,0,0,106,1,
- 0,106,2,0,12,110,3,0,124,1,0,125,2,0,124,2,
- 0,114,46,0,116,3,0,125,3,0,110,6,0,116,4,0,
- 125,3,0,116,5,0,124,0,0,131,1,0,92,2,0,125,
- 4,0,125,5,0,124,5,0,106,6,0,100,2,0,131,1,
- 0,92,3,0,125,6,0,125,7,0,125,8,0,116,0,0,
- 106,7,0,106,8,0,125,9,0,124,9,0,100,1,0,107,
- 8,0,114,133,0,116,9,0,100,3,0,131,1,0,130,1,
- 0,110,0,0,100,4,0,106,10,0,124,6,0,114,151,0,
- 124,6,0,110,3,0,124,8,0,124,7,0,124,9,0,124,
- 3,0,100,5,0,25,103,4,0,131,1,0,125,10,0,116,
- 11,0,124,4,0,116,12,0,124,10,0,131,3,0,83,41,
- 6,97,244,1,0,0,71,105,118,101,110,32,116,104,101,32,
- 112,97,116,104,32,116,111,32,97,32,46,112,121,32,102,105,
- 108,101,44,32,114,101,116,117,114,110,32,116,104,101,32,112,
- 97,116,104,32,116,111,32,105,116,115,32,46,112,121,99,47,
- 46,112,121,111,32,102,105,108,101,46,10,10,32,32,32,32,
- 84,104,101,32,46,112,121,32,102,105,108,101,32,100,111,101,
- 115,32,110,111,116,32,110,101,101,100,32,116,111,32,101,120,
- 105,115,116,59,32,116,104,105,115,32,115,105,109,112,108,121,
- 32,114,101,116,117,114,110,115,32,116,104,101,32,112,97,116,
- 104,32,116,111,32,116,104,101,10,32,32,32,32,46,112,121,
- 99,47,46,112,121,111,32,102,105,108,101,32,99,97,108,99,
- 117,108,97,116,101,100,32,97,115,32,105,102,32,116,104,101,
- 32,46,112,121,32,102,105,108,101,32,119,101,114,101,32,105,
- 109,112,111,114,116,101,100,46,32,32,84,104,101,32,101,120,
- 116,101,110,115,105,111,110,10,32,32,32,32,119,105,108,108,
- 32,98,101,32,46,112,121,99,32,117,110,108,101,115,115,32,
- 115,121,115,46,102,108,97,103,115,46,111,112,116,105,109,105,
- 122,101,32,105,115,32,110,111,110,45,122,101,114,111,44,32,
- 116,104,101,110,32,105,116,32,119,105,108,108,32,98,101,32,
- 46,112,121,111,46,10,10,32,32,32,32,73,102,32,100,101,
- 98,117,103,95,111,118,101,114,114,105,100,101,32,105,115,32,
- 110,111,116,32,78,111,110,101,44,32,116,104,101,110,32,105,
- 116,32,109,117,115,116,32,98,101,32,97,32,98,111,111,108,
- 101,97,110,32,97,110,100,32,105,115,32,117,115,101,100,32,
- 105,110,10,32,32,32,32,112,108,97,99,101,32,111,102,32,
- 115,121,115,46,102,108,97,103,115,46,111,112,116,105,109,105,
- 122,101,46,10,10,32,32,32,32,73,102,32,115,121,115,46,
- 105,109,112,108,101,109,101,110,116,97,116,105,111,110,46,99,
- 97,99,104,101,95,116,97,103,32,105,115,32,78,111,110,101,
- 32,116,104,101,110,32,78,111,116,73,109,112,108,101,109,101,
- 110,116,101,100,69,114,114,111,114,32,105,115,32,114,97,105,
- 115,101,100,46,10,10,32,32,32,32,78,218,1,46,122,36,
- 115,121,115,46,105,109,112,108,101,109,101,110,116,97,116,105,
- 111,110,46,99,97,99,104,101,95,116,97,103,32,105,115,32,
- 78,111,110,101,114,30,0,0,0,114,84,0,0,0,41,13,
- 114,7,0,0,0,218,5,102,108,97,103,115,218,8,111,112,
- 116,105,109,105,122,101,218,23,68,69,66,85,71,95,66,89,
- 84,69,67,79,68,69,95,83,85,70,70,73,88,69,83,218,
- 27,79,80,84,73,77,73,90,69,68,95,66,89,84,69,67,
- 79,68,69,95,83,85,70,70,73,88,69,83,114,38,0,0,
- 0,114,32,0,0,0,218,14,105,109,112,108,101,109,101,110,
- 116,97,116,105,111,110,218,9,99,97,99,104,101,95,116,97,
- 103,218,19,78,111,116,73,109,112,108,101,109,101,110,116,101,
- 100,69,114,114,111,114,114,26,0,0,0,114,28,0,0,0,
- 218,8,95,80,89,67,65,67,72,69,41,11,114,35,0,0,
- 0,90,14,100,101,98,117,103,95,111,118,101,114,114,105,100,
- 101,218,5,100,101,98,117,103,218,8,115,117,102,102,105,120,
- 101,115,218,4,104,101,97,100,114,37,0,0,0,218,4,98,
- 97,115,101,218,3,115,101,112,218,4,114,101,115,116,90,3,
- 116,97,103,218,8,102,105,108,101,110,97,109,101,114,4,0,
- 0,0,114,4,0,0,0,114,5,0,0,0,218,17,99,97,
- 99,104,101,95,102,114,111,109,95,115,111,117,114,99,101,181,
- 1,0,0,115,22,0,0,0,0,13,31,1,6,1,9,2,
- 6,1,18,1,24,1,12,1,12,1,15,1,43,1,114,132,
- 0,0,0,99,1,0,0,0,0,0,0,0,5,0,0,0,
- 5,0,0,0,67,0,0,0,115,193,0,0,0,116,0,0,
- 106,1,0,106,2,0,100,1,0,107,8,0,114,33,0,116,
- 3,0,100,2,0,131,1,0,130,1,0,110,0,0,116,4,
- 0,124,0,0,131,1,0,92,2,0,125,1,0,125,2,0,
- 116,4,0,124,1,0,131,1,0,92,2,0,125,1,0,125,
- 3,0,124,3,0,116,5,0,107,3,0,114,108,0,116,6,
- 0,100,3,0,106,7,0,116,5,0,124,0,0,131,2,0,
- 131,1,0,130,1,0,110,0,0,124,2,0,106,8,0,100,
- 4,0,131,1,0,100,5,0,107,3,0,114,153,0,116,6,
- 0,100,6,0,106,7,0,124,2,0,131,1,0,131,1,0,
- 130,1,0,110,0,0,124,2,0,106,9,0,100,4,0,131,
- 1,0,100,7,0,25,125,4,0,116,10,0,124,1,0,124,
- 4,0,116,11,0,100,7,0,25,23,131,2,0,83,41,8,
- 97,121,1,0,0,71,105,118,101,110,32,116,104,101,32,112,
- 97,116,104,32,116,111,32,97,32,46,112,121,99,46,47,46,
- 112,121,111,32,102,105,108,101,44,32,114,101,116,117,114,110,
- 32,116,104,101,32,112,97,116,104,32,116,111,32,105,116,115,
- 32,46,112,121,32,102,105,108,101,46,10,10,32,32,32,32,
- 84,104,101,32,46,112,121,99,47,46,112,121,111,32,102,105,
- 108,101,32,100,111,101,115,32,110,111,116,32,110,101,101,100,
- 32,116,111,32,101,120,105,115,116,59,32,116,104,105,115,32,
- 115,105,109,112,108,121,32,114,101,116,117,114,110,115,32,116,
- 104,101,32,112,97,116,104,32,116,111,10,32,32,32,32,116,
- 104,101,32,46,112,121,32,102,105,108,101,32,99,97,108,99,
- 117,108,97,116,101,100,32,116,111,32,99,111,114,114,101,115,
- 112,111,110,100,32,116,111,32,116,104,101,32,46,112,121,99,
- 47,46,112,121,111,32,102,105,108,101,46,32,32,73,102,32,
- 112,97,116,104,32,100,111,101,115,10,32,32,32,32,110,111,
- 116,32,99,111,110,102,111,114,109,32,116,111,32,80,69,80,
- 32,51,49,52,55,32,102,111,114,109,97,116,44,32,86,97,
- 108,117,101,69,114,114,111,114,32,119,105,108,108,32,98,101,
- 32,114,97,105,115,101,100,46,32,73,102,10,32,32,32,32,
- 115,121,115,46,105,109,112,108,101,109,101,110,116,97,116,105,
- 111,110,46,99,97,99,104,101,95,116,97,103,32,105,115,32,
- 78,111,110,101,32,116,104,101,110,32,78,111,116,73,109,112,
- 108,101,109,101,110,116,101,100,69,114,114,111,114,32,105,115,
- 32,114,97,105,115,101,100,46,10,10,32,32,32,32,78,122,
- 36,115,121,115,46,105,109,112,108,101,109,101,110,116,97,116,
- 105,111,110,46,99,97,99,104,101,95,116,97,103,32,105,115,
- 32,78,111,110,101,122,37,123,125,32,110,111,116,32,98,111,
- 116,116,111,109,45,108,101,118,101,108,32,100,105,114,101,99,
- 116,111,114,121,32,105,110,32,123,33,114,125,114,116,0,0,
- 0,114,115,0,0,0,122,28,101,120,112,101,99,116,101,100,
- 32,111,110,108,121,32,50,32,100,111,116,115,32,105,110,32,
- 123,33,114,125,114,84,0,0,0,41,12,114,7,0,0,0,
- 114,121,0,0,0,114,122,0,0,0,114,123,0,0,0,114,
- 38,0,0,0,114,124,0,0,0,218,10,86,97,108,117,101,
- 69,114,114,111,114,114,47,0,0,0,114,89,0,0,0,218,
- 9,112,97,114,116,105,116,105,111,110,114,28,0,0,0,218,
- 15,83,79,85,82,67,69,95,83,85,70,70,73,88,69,83,
- 41,5,114,35,0,0,0,114,127,0,0,0,90,16,112,121,
- 99,97,99,104,101,95,102,105,108,101,110,97,109,101,90,7,
- 112,121,99,97,99,104,101,90,13,98,97,115,101,95,102,105,
- 108,101,110,97,109,101,114,4,0,0,0,114,4,0,0,0,
- 114,5,0,0,0,218,17,115,111,117,114,99,101,95,102,114,
- 111,109,95,99,97,99,104,101,208,1,0,0,115,24,0,0,
- 0,0,9,18,1,15,1,18,1,18,1,12,1,9,1,18,
- 1,21,1,9,1,15,1,19,1,114,136,0,0,0,99,1,
- 0,0,0,0,0,0,0,5,0,0,0,12,0,0,0,67,
- 0,0,0,115,164,0,0,0,116,0,0,124,0,0,131,1,
- 0,100,1,0,107,2,0,114,22,0,100,2,0,83,124,0,
- 0,106,1,0,100,3,0,131,1,0,92,3,0,125,1,0,
- 125,2,0,125,3,0,124,1,0,12,115,81,0,124,3,0,
- 106,2,0,131,0,0,100,7,0,100,8,0,133,2,0,25,
- 100,6,0,107,3,0,114,85,0,124,0,0,83,121,16,0,
- 116,3,0,124,0,0,131,1,0,125,4,0,87,110,40,0,
- 4,116,4,0,116,5,0,102,2,0,107,10,0,114,143,0,
- 1,1,1,124,0,0,100,2,0,100,9,0,133,2,0,25,
- 125,4,0,89,110,1,0,88,116,6,0,124,4,0,131,1,
- 0,114,160,0,124,4,0,83,124,0,0,83,41,10,122,188,
- 67,111,110,118,101,114,116,32,97,32,98,121,116,101,99,111,
- 100,101,32,102,105,108,101,32,112,97,116,104,32,116,111,32,
- 97,32,115,111,117,114,99,101,32,112,97,116,104,32,40,105,
- 102,32,112,111,115,115,105,98,108,101,41,46,10,10,32,32,
- 32,32,84,104,105,115,32,102,117,110,99,116,105,111,110,32,
- 101,120,105,115,116,115,32,112,117,114,101,108,121,32,102,111,
- 114,32,98,97,99,107,119,97,114,100,115,45,99,111,109,112,
- 97,116,105,98,105,108,105,116,121,32,102,111,114,10,32,32,
- 32,32,80,121,73,109,112,111,114,116,95,69,120,101,99,67,
- 111,100,101,77,111,100,117,108,101,87,105,116,104,70,105,108,
- 101,110,97,109,101,115,40,41,32,105,110,32,116,104,101,32,
- 67,32,65,80,73,46,10,10,32,32,32,32,114,84,0,0,
- 0,78,114,116,0,0,0,233,3,0,0,0,114,29,0,0,
- 0,90,2,112,121,233,253,255,255,255,233,255,255,255,255,114,
- 139,0,0,0,41,7,114,31,0,0,0,114,32,0,0,0,
- 218,5,108,111,119,101,114,114,136,0,0,0,114,123,0,0,
- 0,114,133,0,0,0,114,44,0,0,0,41,5,218,13,98,
- 121,116,101,99,111,100,101,95,112,97,116,104,114,130,0,0,
- 0,114,36,0,0,0,90,9,101,120,116,101,110,115,105,111,
- 110,218,11,115,111,117,114,99,101,95,112,97,116,104,114,4,
- 0,0,0,114,4,0,0,0,114,5,0,0,0,218,15,95,
- 103,101,116,95,115,111,117,114,99,101,102,105,108,101,231,1,
- 0,0,115,20,0,0,0,0,7,18,1,4,1,24,1,35,
- 1,4,1,3,1,16,1,19,1,21,1,114,143,0,0,0,
- 99,1,0,0,0,0,0,0,0,2,0,0,0,11,0,0,
- 0,67,0,0,0,115,60,0,0,0,121,19,0,116,0,0,
- 124,0,0,131,1,0,106,1,0,125,1,0,87,110,24,0,
- 4,116,2,0,107,10,0,114,45,0,1,1,1,100,1,0,
- 125,1,0,89,110,1,0,88,124,1,0,100,2,0,79,125,
- 1,0,124,1,0,83,41,3,122,51,67,97,108,99,117,108,
- 97,116,101,32,116,104,101,32,109,111,100,101,32,112,101,114,
- 109,105,115,115,105,111,110,115,32,102,111,114,32,97,32,98,
- 121,116,101,99,111,100,101,32,102,105,108,101,46,105,182,1,
- 0,0,233,128,0,0,0,41,3,114,39,0,0,0,114,41,
- 0,0,0,114,40,0,0,0,41,2,114,35,0,0,0,114,
- 42,0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,
- 0,0,0,218,10,95,99,97,108,99,95,109,111,100,101,250,
- 1,0,0,115,12,0,0,0,0,2,3,1,19,1,13,1,
- 11,3,10,1,114,145,0,0,0,218,9,118,101,114,98,111,
- 115,105,116,121,114,29,0,0,0,99,1,0,0,0,1,0,
- 0,0,3,0,0,0,4,0,0,0,71,0,0,0,115,81,
- 0,0,0,116,0,0,106,1,0,106,2,0,124,1,0,107,
- 5,0,114,77,0,124,0,0,106,3,0,100,6,0,131,1,
- 0,115,46,0,100,3,0,124,0,0,23,125,0,0,110,0,
- 0,116,4,0,124,0,0,106,5,0,124,2,0,140,0,0,
- 100,4,0,116,0,0,106,6,0,131,1,1,1,110,0,0,
- 100,5,0,83,41,7,122,61,80,114,105,110,116,32,116,104,
- 101,32,109,101,115,115,97,103,101,32,116,111,32,115,116,100,
- 101,114,114,32,105,102,32,45,118,47,80,89,84,72,79,78,
- 86,69,82,66,79,83,69,32,105,115,32,116,117,114,110,101,
- 100,32,111,110,46,250,1,35,250,7,105,109,112,111,114,116,
- 32,122,2,35,32,114,54,0,0,0,78,41,2,114,147,0,
- 0,0,114,148,0,0,0,41,7,114,7,0,0,0,114,117,
- 0,0,0,218,7,118,101,114,98,111,115,101,114,9,0,0,
- 0,218,5,112,114,105,110,116,114,47,0,0,0,218,6,115,
- 116,100,101,114,114,41,3,218,7,109,101,115,115,97,103,101,
- 114,146,0,0,0,114,80,0,0,0,114,4,0,0,0,114,
- 4,0,0,0,114,5,0,0,0,218,16,95,118,101,114,98,
- 111,115,101,95,109,101,115,115,97,103,101,6,2,0,0,115,
- 8,0,0,0,0,2,18,1,15,1,13,1,114,153,0,0,
- 0,99,1,0,0,0,0,0,0,0,2,0,0,0,4,0,
- 0,0,3,0,0,0,115,38,0,0,0,100,1,0,135,0,
- 0,102,1,0,100,2,0,100,3,0,134,1,0,125,1,0,
- 116,0,0,124,1,0,136,0,0,131,2,0,1,124,1,0,
- 83,41,4,122,252,68,101,99,111,114,97,116,111,114,32,116,
- 111,32,118,101,114,105,102,121,32,116,104,97,116,32,116,104,
- 101,32,109,111,100,117,108,101,32,98,101,105,110,103,32,114,
- 101,113,117,101,115,116,101,100,32,109,97,116,99,104,101,115,
- 32,116,104,101,32,111,110,101,32,116,104,101,10,32,32,32,
- 32,108,111,97,100,101,114,32,99,97,110,32,104,97,110,100,
- 108,101,46,10,10,32,32,32,32,84,104,101,32,102,105,114,
- 115,116,32,97,114,103,117,109,101,110,116,32,40,115,101,108,
- 102,41,32,109,117,115,116,32,100,101,102,105,110,101,32,95,
- 110,97,109,101,32,119,104,105,99,104,32,116,104,101,32,115,
- 101,99,111,110,100,32,97,114,103,117,109,101,110,116,32,105,
- 115,10,32,32,32,32,99,111,109,112,97,114,101,100,32,97,
- 103,97,105,110,115,116,46,32,73,102,32,116,104,101,32,99,
- 111,109,112,97,114,105,115,111,110,32,102,97,105,108,115,32,
- 116,104,101,110,32,73,109,112,111,114,116,69,114,114,111,114,
- 32,105,115,32,114,97,105,115,101,100,46,10,10,32,32,32,
- 32,78,99,2,0,0,0,0,0,0,0,4,0,0,0,5,
- 0,0,0,31,0,0,0,115,83,0,0,0,124,1,0,100,
- 0,0,107,8,0,114,24,0,124,0,0,106,0,0,125,1,
- 0,110,40,0,124,0,0,106,0,0,124,1,0,107,3,0,
- 114,64,0,116,1,0,100,1,0,124,1,0,22,100,2,0,
- 124,1,0,131,1,1,130,1,0,110,0,0,136,0,0,124,
- 0,0,124,1,0,124,2,0,124,3,0,142,2,0,83,41,
- 3,78,122,23,108,111,97,100,101,114,32,99,97,110,110,111,
- 116,32,104,97,110,100,108,101,32,37,115,114,67,0,0,0,
- 41,2,114,67,0,0,0,218,11,73,109,112,111,114,116,69,
- 114,114,111,114,41,4,114,71,0,0,0,114,67,0,0,0,
- 114,80,0,0,0,114,108,0,0,0,41,1,218,6,109,101,
- 116,104,111,100,114,4,0,0,0,114,5,0,0,0,218,19,
- 95,99,104,101,99,107,95,110,97,109,101,95,119,114,97,112,
- 112,101,114,22,2,0,0,115,10,0,0,0,0,1,12,1,
- 12,1,15,1,25,1,122,40,95,99,104,101,99,107,95,110,
- 97,109,101,46,60,108,111,99,97,108,115,62,46,95,99,104,
- 101,99,107,95,110,97,109,101,95,119,114,97,112,112,101,114,
- 41,1,114,65,0,0,0,41,2,114,155,0,0,0,114,156,
- 0,0,0,114,4,0,0,0,41,1,114,155,0,0,0,114,
- 5,0,0,0,218,11,95,99,104,101,99,107,95,110,97,109,
- 101,14,2,0,0,115,6,0,0,0,0,8,21,6,13,1,
- 114,157,0,0,0,99,1,0,0,0,0,0,0,0,2,0,
- 0,0,3,0,0,0,3,0,0,0,115,35,0,0,0,135,
- 0,0,102,1,0,100,1,0,100,2,0,134,0,0,125,1,
- 0,116,0,0,124,1,0,136,0,0,131,2,0,1,124,1,
- 0,83,41,3,122,49,68,101,99,111,114,97,116,111,114,32,
- 116,111,32,118,101,114,105,102,121,32,116,104,101,32,110,97,
- 109,101,100,32,109,111,100,117,108,101,32,105,115,32,98,117,
- 105,108,116,45,105,110,46,99,2,0,0,0,0,0,0,0,
- 2,0,0,0,4,0,0,0,19,0,0,0,115,58,0,0,
- 0,124,1,0,116,0,0,106,1,0,107,7,0,114,45,0,
+ 116,32,123,125,41,3,218,6,102,111,114,109,97,116,114,15,
+ 0,0,0,218,2,105,100,41,1,114,19,0,0,0,114,10,
+ 0,0,0,114,10,0,0,0,114,11,0,0,0,218,8,95,
+ 95,114,101,112,114,95,95,132,0,0,0,115,2,0,0,0,
+ 0,1,122,20,95,77,111,100,117,108,101,76,111,99,107,46,
+ 95,95,114,101,112,114,95,95,78,41,9,114,1,0,0,0,
+ 114,0,0,0,0,114,2,0,0,0,114,3,0,0,0,114,
+ 20,0,0,0,114,44,0,0,0,114,46,0,0,0,114,47,
+ 0,0,0,114,52,0,0,0,114,10,0,0,0,114,10,0,
+ 0,0,114,10,0,0,0,114,11,0,0,0,114,32,0,0,
+ 0,68,0,0,0,115,12,0,0,0,12,4,6,2,12,8,
+ 12,12,12,25,12,13,114,32,0,0,0,99,0,0,0,0,
+ 0,0,0,0,0,0,0,0,2,0,0,0,64,0,0,0,
+ 115,70,0,0,0,101,0,0,90,1,0,100,0,0,90,2,
+ 0,100,1,0,90,3,0,100,2,0,100,3,0,132,0,0,
+ 90,4,0,100,4,0,100,5,0,132,0,0,90,5,0,100,
+ 6,0,100,7,0,132,0,0,90,6,0,100,8,0,100,9,
+ 0,132,0,0,90,7,0,100,10,0,83,41,11,218,16,95,
+ 68,117,109,109,121,77,111,100,117,108,101,76,111,99,107,122,
+ 86,65,32,115,105,109,112,108,101,32,95,77,111,100,117,108,
+ 101,76,111,99,107,32,101,113,117,105,118,97,108,101,110,116,
+ 32,102,111,114,32,80,121,116,104,111,110,32,98,117,105,108,
+ 100,115,32,119,105,116,104,111,117,116,10,32,32,32,32,109,
+ 117,108,116,105,45,116,104,114,101,97,100,105,110,103,32,115,
+ 117,112,112,111,114,116,46,99,2,0,0,0,0,0,0,0,
+ 2,0,0,0,2,0,0,0,67,0,0,0,115,22,0,0,
+ 0,124,1,0,124,0,0,95,0,0,100,1,0,124,0,0,
+ 95,1,0,100,0,0,83,41,2,78,114,33,0,0,0,41,
+ 2,114,15,0,0,0,114,38,0,0,0,41,2,114,19,0,
+ 0,0,114,15,0,0,0,114,10,0,0,0,114,10,0,0,
+ 0,114,11,0,0,0,114,20,0,0,0,140,0,0,0,115,
+ 4,0,0,0,0,1,9,1,122,25,95,68,117,109,109,121,
+ 77,111,100,117,108,101,76,111,99,107,46,95,95,105,110,105,
+ 116,95,95,99,1,0,0,0,0,0,0,0,1,0,0,0,
+ 3,0,0,0,67,0,0,0,115,19,0,0,0,124,0,0,
+ 4,106,0,0,100,1,0,55,2,95,0,0,100,2,0,83,
+ 41,3,78,114,45,0,0,0,84,41,1,114,38,0,0,0,
+ 41,1,114,19,0,0,0,114,10,0,0,0,114,10,0,0,
+ 0,114,11,0,0,0,114,46,0,0,0,144,0,0,0,115,
+ 4,0,0,0,0,1,15,1,122,24,95,68,117,109,109,121,
+ 77,111,100,117,108,101,76,111,99,107,46,97,99,113,117,105,
+ 114,101,99,1,0,0,0,0,0,0,0,1,0,0,0,3,
+ 0,0,0,67,0,0,0,115,46,0,0,0,124,0,0,106,
+ 0,0,100,1,0,107,2,0,114,27,0,116,1,0,100,2,
+ 0,131,1,0,130,1,0,124,0,0,4,106,0,0,100,3,
+ 0,56,2,95,0,0,100,0,0,83,41,4,78,114,33,0,
+ 0,0,122,31,99,97,110,110,111,116,32,114,101,108,101,97,
+ 115,101,32,117,110,45,97,99,113,117,105,114,101,100,32,108,
+ 111,99,107,114,45,0,0,0,41,2,114,38,0,0,0,114,
+ 48,0,0,0,41,1,114,19,0,0,0,114,10,0,0,0,
+ 114,10,0,0,0,114,11,0,0,0,114,47,0,0,0,148,
+ 0,0,0,115,6,0,0,0,0,1,15,1,12,1,122,24,
+ 95,68,117,109,109,121,77,111,100,117,108,101,76,111,99,107,
+ 46,114,101,108,101,97,115,101,99,1,0,0,0,0,0,0,
+ 0,1,0,0,0,4,0,0,0,67,0,0,0,115,25,0,
+ 0,0,100,1,0,106,0,0,124,0,0,106,1,0,116,2,
+ 0,124,0,0,131,1,0,131,2,0,83,41,2,78,122,28,
+ 95,68,117,109,109,121,77,111,100,117,108,101,76,111,99,107,
+ 40,123,33,114,125,41,32,97,116,32,123,125,41,3,114,50,
+ 0,0,0,114,15,0,0,0,114,51,0,0,0,41,1,114,
+ 19,0,0,0,114,10,0,0,0,114,10,0,0,0,114,11,
+ 0,0,0,114,52,0,0,0,153,0,0,0,115,2,0,0,
+ 0,0,1,122,25,95,68,117,109,109,121,77,111,100,117,108,
+ 101,76,111,99,107,46,95,95,114,101,112,114,95,95,78,41,
+ 8,114,1,0,0,0,114,0,0,0,0,114,2,0,0,0,
+ 114,3,0,0,0,114,20,0,0,0,114,46,0,0,0,114,
+ 47,0,0,0,114,52,0,0,0,114,10,0,0,0,114,10,
+ 0,0,0,114,10,0,0,0,114,11,0,0,0,114,53,0,
+ 0,0,136,0,0,0,115,10,0,0,0,12,2,6,2,12,
+ 4,12,4,12,5,114,53,0,0,0,99,0,0,0,0,0,
+ 0,0,0,0,0,0,0,2,0,0,0,64,0,0,0,115,
+ 52,0,0,0,101,0,0,90,1,0,100,0,0,90,2,0,
+ 100,1,0,100,2,0,132,0,0,90,3,0,100,3,0,100,
+ 4,0,132,0,0,90,4,0,100,5,0,100,6,0,132,0,
+ 0,90,5,0,100,7,0,83,41,8,218,18,95,77,111,100,
+ 117,108,101,76,111,99,107,77,97,110,97,103,101,114,99,2,
+ 0,0,0,0,0,0,0,2,0,0,0,2,0,0,0,67,
+ 0,0,0,115,22,0,0,0,124,1,0,124,0,0,95,0,
+ 0,100,0,0,124,0,0,95,1,0,100,0,0,83,41,1,
+ 78,41,2,114,18,0,0,0,218,5,95,108,111,99,107,41,
+ 2,114,19,0,0,0,114,15,0,0,0,114,10,0,0,0,
+ 114,10,0,0,0,114,11,0,0,0,114,20,0,0,0,159,
+ 0,0,0,115,4,0,0,0,0,1,9,1,122,27,95,77,
+ 111,100,117,108,101,76,111,99,107,77,97,110,97,103,101,114,
+ 46,95,95,105,110,105,116,95,95,99,1,0,0,0,0,0,
+ 0,0,1,0,0,0,10,0,0,0,67,0,0,0,115,53,
+ 0,0,0,122,22,0,116,0,0,124,0,0,106,1,0,131,
+ 1,0,124,0,0,95,2,0,87,100,0,0,116,3,0,106,
+ 4,0,131,0,0,1,88,124,0,0,106,2,0,106,5,0,
+ 131,0,0,1,100,0,0,83,41,1,78,41,6,218,16,95,
+ 103,101,116,95,109,111,100,117,108,101,95,108,111,99,107,114,
+ 18,0,0,0,114,55,0,0,0,218,4,95,105,109,112,218,
+ 12,114,101,108,101,97,115,101,95,108,111,99,107,114,46,0,
+ 0,0,41,1,114,19,0,0,0,114,10,0,0,0,114,10,
+ 0,0,0,114,11,0,0,0,114,23,0,0,0,163,0,0,
+ 0,115,8,0,0,0,0,1,3,1,22,2,11,1,122,28,
+ 95,77,111,100,117,108,101,76,111,99,107,77,97,110,97,103,
+ 101,114,46,95,95,101,110,116,101,114,95,95,99,1,0,0,
+ 0,0,0,0,0,3,0,0,0,1,0,0,0,79,0,0,
+ 0,115,17,0,0,0,124,0,0,106,0,0,106,1,0,131,
+ 0,0,1,100,0,0,83,41,1,78,41,2,114,55,0,0,
+ 0,114,47,0,0,0,41,3,114,19,0,0,0,114,29,0,
+ 0,0,90,6,107,119,97,114,103,115,114,10,0,0,0,114,
+ 10,0,0,0,114,11,0,0,0,114,30,0,0,0,170,0,
+ 0,0,115,2,0,0,0,0,1,122,27,95,77,111,100,117,
+ 108,101,76,111,99,107,77,97,110,97,103,101,114,46,95,95,
+ 101,120,105,116,95,95,78,41,6,114,1,0,0,0,114,0,
+ 0,0,0,114,2,0,0,0,114,20,0,0,0,114,23,0,
+ 0,0,114,30,0,0,0,114,10,0,0,0,114,10,0,0,
+ 0,114,10,0,0,0,114,11,0,0,0,114,54,0,0,0,
+ 157,0,0,0,115,6,0,0,0,12,2,12,4,12,7,114,
+ 54,0,0,0,99,1,0,0,0,0,0,0,0,3,0,0,
+ 0,11,0,0,0,3,0,0,0,115,139,0,0,0,100,1,
+ 0,125,1,0,121,17,0,116,0,0,136,0,0,25,131,0,
+ 0,125,1,0,87,110,18,0,4,116,1,0,107,10,0,114,
+ 43,0,1,1,1,89,110,1,0,88,124,1,0,100,1,0,
+ 107,8,0,114,135,0,116,2,0,100,1,0,107,8,0,114,
+ 83,0,116,3,0,136,0,0,131,1,0,125,1,0,110,12,
+ 0,116,4,0,136,0,0,131,1,0,125,1,0,135,0,0,
+ 102,1,0,100,2,0,100,3,0,134,0,0,125,2,0,116,
+ 5,0,106,6,0,124,1,0,124,2,0,131,2,0,116,0,
+ 0,136,0,0,60,124,1,0,83,41,4,122,109,71,101,116,
+ 32,111,114,32,99,114,101,97,116,101,32,116,104,101,32,109,
+ 111,100,117,108,101,32,108,111,99,107,32,102,111,114,32,97,
+ 32,103,105,118,101,110,32,109,111,100,117,108,101,32,110,97,
+ 109,101,46,10,10,32,32,32,32,83,104,111,117,108,100,32,
+ 111,110,108,121,32,98,101,32,99,97,108,108,101,100,32,119,
+ 105,116,104,32,116,104,101,32,105,109,112,111,114,116,32,108,
+ 111,99,107,32,116,97,107,101,110,46,78,99,1,0,0,0,
+ 0,0,0,0,1,0,0,0,2,0,0,0,19,0,0,0,
+ 115,11,0,0,0,116,0,0,136,0,0,61,100,0,0,83,
+ 41,1,78,41,1,218,13,95,109,111,100,117,108,101,95,108,
+ 111,99,107,115,41,1,218,1,95,41,1,114,15,0,0,0,
+ 114,10,0,0,0,114,11,0,0,0,218,2,99,98,190,0,
+ 0,0,115,2,0,0,0,0,1,122,28,95,103,101,116,95,
+ 109,111,100,117,108,101,95,108,111,99,107,46,60,108,111,99,
+ 97,108,115,62,46,99,98,41,7,114,59,0,0,0,114,28,
+ 0,0,0,114,34,0,0,0,114,53,0,0,0,114,32,0,
+ 0,0,218,8,95,119,101,97,107,114,101,102,90,3,114,101,
+ 102,41,3,114,15,0,0,0,114,35,0,0,0,114,61,0,
+ 0,0,114,10,0,0,0,41,1,114,15,0,0,0,114,11,
+ 0,0,0,114,56,0,0,0,176,0,0,0,115,24,0,0,
+ 0,0,4,6,1,3,1,17,1,13,1,5,1,12,1,12,
+ 1,15,2,12,1,18,2,22,1,114,56,0,0,0,99,1,
+ 0,0,0,0,0,0,0,2,0,0,0,11,0,0,0,67,
+ 0,0,0,115,71,0,0,0,116,0,0,124,0,0,131,1,
+ 0,125,1,0,116,1,0,106,2,0,131,0,0,1,121,14,
+ 0,124,1,0,106,3,0,131,0,0,1,87,110,18,0,4,
+ 116,4,0,107,10,0,114,56,0,1,1,1,89,110,11,0,
+ 88,124,1,0,106,5,0,131,0,0,1,100,1,0,83,41,
+ 2,97,21,1,0,0,82,101,108,101,97,115,101,32,116,104,
+ 101,32,103,108,111,98,97,108,32,105,109,112,111,114,116,32,
+ 108,111,99,107,44,32,97,110,100,32,97,99,113,117,105,114,
+ 101,115,32,116,104,101,110,32,114,101,108,101,97,115,101,32,
+ 116,104,101,10,32,32,32,32,109,111,100,117,108,101,32,108,
+ 111,99,107,32,102,111,114,32,97,32,103,105,118,101,110,32,
+ 109,111,100,117,108,101,32,110,97,109,101,46,10,32,32,32,
+ 32,84,104,105,115,32,105,115,32,117,115,101,100,32,116,111,
+ 32,101,110,115,117,114,101,32,97,32,109,111,100,117,108,101,
+ 32,105,115,32,99,111,109,112,108,101,116,101,108,121,32,105,
+ 110,105,116,105,97,108,105,122,101,100,44,32,105,110,32,116,
+ 104,101,10,32,32,32,32,101,118,101,110,116,32,105,116,32,
+ 105,115,32,98,101,105,110,103,32,105,109,112,111,114,116,101,
+ 100,32,98,121,32,97,110,111,116,104,101,114,32,116,104,114,
+ 101,97,100,46,10,10,32,32,32,32,83,104,111,117,108,100,
+ 32,111,110,108,121,32,98,101,32,99,97,108,108,101,100,32,
+ 119,105,116,104,32,116,104,101,32,105,109,112,111,114,116,32,
+ 108,111,99,107,32,116,97,107,101,110,46,78,41,6,114,56,
+ 0,0,0,114,57,0,0,0,114,58,0,0,0,114,46,0,
+ 0,0,114,31,0,0,0,114,47,0,0,0,41,2,114,15,
+ 0,0,0,114,35,0,0,0,114,10,0,0,0,114,10,0,
+ 0,0,114,11,0,0,0,218,19,95,108,111,99,107,95,117,
+ 110,108,111,99,107,95,109,111,100,117,108,101,195,0,0,0,
+ 115,14,0,0,0,0,7,12,1,10,1,3,1,14,1,13,
+ 3,5,2,114,63,0,0,0,99,1,0,0,0,0,0,0,
+ 0,3,0,0,0,3,0,0,0,79,0,0,0,115,13,0,
+ 0,0,124,0,0,124,1,0,124,2,0,142,0,0,83,41,
+ 1,97,46,1,0,0,114,101,109,111,118,101,95,105,109,112,
+ 111,114,116,108,105,98,95,102,114,97,109,101,115,32,105,110,
+ 32,105,109,112,111,114,116,46,99,32,119,105,108,108,32,97,
+ 108,119,97,121,115,32,114,101,109,111,118,101,32,115,101,113,
+ 117,101,110,99,101,115,10,32,32,32,32,111,102,32,105,109,
+ 112,111,114,116,108,105,98,32,102,114,97,109,101,115,32,116,
+ 104,97,116,32,101,110,100,32,119,105,116,104,32,97,32,99,
+ 97,108,108,32,116,111,32,116,104,105,115,32,102,117,110,99,
+ 116,105,111,110,10,10,32,32,32,32,85,115,101,32,105,116,
+ 32,105,110,115,116,101,97,100,32,111,102,32,97,32,110,111,
+ 114,109,97,108,32,99,97,108,108,32,105,110,32,112,108,97,
+ 99,101,115,32,119,104,101,114,101,32,105,110,99,108,117,100,
+ 105,110,103,32,116,104,101,32,105,109,112,111,114,116,108,105,
+ 98,10,32,32,32,32,102,114,97,109,101,115,32,105,110,116,
+ 114,111,100,117,99,101,115,32,117,110,119,97,110,116,101,100,
+ 32,110,111,105,115,101,32,105,110,116,111,32,116,104,101,32,
+ 116,114,97,99,101,98,97,99,107,32,40,101,46,103,46,32,
+ 119,104,101,110,32,101,120,101,99,117,116,105,110,103,10,32,
+ 32,32,32,109,111,100,117,108,101,32,99,111,100,101,41,10,
+ 32,32,32,32,114,10,0,0,0,41,3,218,1,102,114,29,
+ 0,0,0,90,4,107,119,100,115,114,10,0,0,0,114,10,
+ 0,0,0,114,11,0,0,0,218,25,95,99,97,108,108,95,
+ 119,105,116,104,95,102,114,97,109,101,115,95,114,101,109,111,
+ 118,101,100,214,0,0,0,115,2,0,0,0,0,8,114,65,
+ 0,0,0,218,9,118,101,114,98,111,115,105,116,121,114,45,
+ 0,0,0,99,1,0,0,0,1,0,0,0,3,0,0,0,
+ 4,0,0,0,71,0,0,0,115,75,0,0,0,116,0,0,
+ 106,1,0,106,2,0,124,1,0,107,5,0,114,71,0,124,
+ 0,0,106,3,0,100,6,0,131,1,0,115,43,0,100,3,
+ 0,124,0,0,23,125,0,0,116,4,0,124,0,0,106,5,
+ 0,124,2,0,140,0,0,100,4,0,116,0,0,106,6,0,
+ 131,1,1,1,100,5,0,83,41,7,122,61,80,114,105,110,
+ 116,32,116,104,101,32,109,101,115,115,97,103,101,32,116,111,
+ 32,115,116,100,101,114,114,32,105,102,32,45,118,47,80,89,
+ 84,72,79,78,86,69,82,66,79,83,69,32,105,115,32,116,
+ 117,114,110,101,100,32,111,110,46,250,1,35,250,7,105,109,
+ 112,111,114,116,32,122,2,35,32,90,4,102,105,108,101,78,
+ 41,2,114,67,0,0,0,114,68,0,0,0,41,7,114,14,
+ 0,0,0,218,5,102,108,97,103,115,218,7,118,101,114,98,
+ 111,115,101,218,10,115,116,97,114,116,115,119,105,116,104,218,
+ 5,112,114,105,110,116,114,50,0,0,0,218,6,115,116,100,
+ 101,114,114,41,3,218,7,109,101,115,115,97,103,101,114,66,
+ 0,0,0,114,29,0,0,0,114,10,0,0,0,114,10,0,
+ 0,0,114,11,0,0,0,218,16,95,118,101,114,98,111,115,
+ 101,95,109,101,115,115,97,103,101,225,0,0,0,115,8,0,
+ 0,0,0,2,18,1,15,1,10,1,114,75,0,0,0,99,
+ 1,0,0,0,0,0,0,0,2,0,0,0,3,0,0,0,
+ 3,0,0,0,115,35,0,0,0,135,0,0,102,1,0,100,
+ 1,0,100,2,0,134,0,0,125,1,0,116,0,0,124,1,
+ 0,136,0,0,131,2,0,1,124,1,0,83,41,3,122,49,
+ 68,101,99,111,114,97,116,111,114,32,116,111,32,118,101,114,
+ 105,102,121,32,116,104,101,32,110,97,109,101,100,32,109,111,
+ 100,117,108,101,32,105,115,32,98,117,105,108,116,45,105,110,
+ 46,99,2,0,0,0,0,0,0,0,2,0,0,0,4,0,
+ 0,0,19,0,0,0,115,55,0,0,0,124,1,0,116,0,
+ 0,106,1,0,107,7,0,114,42,0,116,2,0,100,1,0,
+ 106,3,0,124,1,0,131,1,0,100,2,0,124,1,0,131,
+ 1,1,130,1,0,136,0,0,124,0,0,124,1,0,131,2,
+ 0,83,41,3,78,122,29,123,33,114,125,32,105,115,32,110,
+ 111,116,32,97,32,98,117,105,108,116,45,105,110,32,109,111,
+ 100,117,108,101,114,15,0,0,0,41,4,114,14,0,0,0,
+ 218,20,98,117,105,108,116,105,110,95,109,111,100,117,108,101,
+ 95,110,97,109,101,115,218,11,73,109,112,111,114,116,69,114,
+ 114,111,114,114,50,0,0,0,41,2,114,19,0,0,0,218,
+ 8,102,117,108,108,110,97,109,101,41,1,218,3,102,120,110,
+ 114,10,0,0,0,114,11,0,0,0,218,25,95,114,101,113,
+ 117,105,114,101,115,95,98,117,105,108,116,105,110,95,119,114,
+ 97,112,112,101,114,235,0,0,0,115,8,0,0,0,0,1,
+ 15,1,18,1,9,1,122,52,95,114,101,113,117,105,114,101,
+ 115,95,98,117,105,108,116,105,110,46,60,108,111,99,97,108,
+ 115,62,46,95,114,101,113,117,105,114,101,115,95,98,117,105,
+ 108,116,105,110,95,119,114,97,112,112,101,114,41,1,114,12,
+ 0,0,0,41,2,114,79,0,0,0,114,80,0,0,0,114,
+ 10,0,0,0,41,1,114,79,0,0,0,114,11,0,0,0,
+ 218,17,95,114,101,113,117,105,114,101,115,95,98,117,105,108,
+ 116,105,110,233,0,0,0,115,6,0,0,0,0,2,18,5,
+ 13,1,114,81,0,0,0,99,1,0,0,0,0,0,0,0,
+ 2,0,0,0,3,0,0,0,3,0,0,0,115,35,0,0,
+ 0,135,0,0,102,1,0,100,1,0,100,2,0,134,0,0,
+ 125,1,0,116,0,0,124,1,0,136,0,0,131,2,0,1,
+ 124,1,0,83,41,3,122,47,68,101,99,111,114,97,116,111,
+ 114,32,116,111,32,118,101,114,105,102,121,32,116,104,101,32,
+ 110,97,109,101,100,32,109,111,100,117,108,101,32,105,115,32,
+ 102,114,111,122,101,110,46,99,2,0,0,0,0,0,0,0,
+ 2,0,0,0,4,0,0,0,19,0,0,0,115,55,0,0,
+ 0,116,0,0,106,1,0,124,1,0,131,1,0,115,42,0,
116,2,0,100,1,0,106,3,0,124,1,0,131,1,0,100,
- 2,0,124,1,0,131,1,1,130,1,0,110,0,0,136,0,
- 0,124,0,0,124,1,0,131,2,0,83,41,3,78,122,29,
- 123,33,114,125,32,105,115,32,110,111,116,32,97,32,98,117,
- 105,108,116,45,105,110,32,109,111,100,117,108,101,114,67,0,
- 0,0,41,4,114,7,0,0,0,218,20,98,117,105,108,116,
- 105,110,95,109,111,100,117,108,101,95,110,97,109,101,115,114,
- 154,0,0,0,114,47,0,0,0,41,2,114,71,0,0,0,
- 218,8,102,117,108,108,110,97,109,101,41,1,218,3,102,120,
- 110,114,4,0,0,0,114,5,0,0,0,218,25,95,114,101,
- 113,117,105,114,101,115,95,98,117,105,108,116,105,110,95,119,
- 114,97,112,112,101,114,34,2,0,0,115,8,0,0,0,0,
- 1,15,1,18,1,12,1,122,52,95,114,101,113,117,105,114,
- 101,115,95,98,117,105,108,116,105,110,46,60,108,111,99,97,
- 108,115,62,46,95,114,101,113,117,105,114,101,115,95,98,117,
- 105,108,116,105,110,95,119,114,97,112,112,101,114,41,1,114,
- 65,0,0,0,41,2,114,160,0,0,0,114,161,0,0,0,
- 114,4,0,0,0,41,1,114,160,0,0,0,114,5,0,0,
- 0,218,17,95,114,101,113,117,105,114,101,115,95,98,117,105,
- 108,116,105,110,32,2,0,0,115,6,0,0,0,0,2,18,
- 5,13,1,114,162,0,0,0,99,1,0,0,0,0,0,0,
- 0,2,0,0,0,3,0,0,0,3,0,0,0,115,35,0,
- 0,0,135,0,0,102,1,0,100,1,0,100,2,0,134,0,
- 0,125,1,0,116,0,0,124,1,0,136,0,0,131,2,0,
- 1,124,1,0,83,41,3,122,47,68,101,99,111,114,97,116,
- 111,114,32,116,111,32,118,101,114,105,102,121,32,116,104,101,
- 32,110,97,109,101,100,32,109,111,100,117,108,101,32,105,115,
- 32,102,114,111,122,101,110,46,99,2,0,0,0,0,0,0,
- 0,2,0,0,0,4,0,0,0,19,0,0,0,115,58,0,
- 0,0,116,0,0,106,1,0,124,1,0,131,1,0,115,45,
- 0,116,2,0,100,1,0,106,3,0,124,1,0,131,1,0,
- 100,2,0,124,1,0,131,1,1,130,1,0,110,0,0,136,
- 0,0,124,0,0,124,1,0,131,2,0,83,41,3,78,122,
- 27,123,33,114,125,32,105,115,32,110,111,116,32,97,32,102,
- 114,111,122,101,110,32,109,111,100,117,108,101,114,67,0,0,
- 0,41,4,114,106,0,0,0,218,9,105,115,95,102,114,111,
- 122,101,110,114,154,0,0,0,114,47,0,0,0,41,2,114,
- 71,0,0,0,114,159,0,0,0,41,1,114,160,0,0,0,
- 114,4,0,0,0,114,5,0,0,0,218,24,95,114,101,113,
- 117,105,114,101,115,95,102,114,111,122,101,110,95,119,114,97,
- 112,112,101,114,45,2,0,0,115,8,0,0,0,0,1,15,
- 1,18,1,12,1,122,50,95,114,101,113,117,105,114,101,115,
- 95,102,114,111,122,101,110,46,60,108,111,99,97,108,115,62,
- 46,95,114,101,113,117,105,114,101,115,95,102,114,111,122,101,
- 110,95,119,114,97,112,112,101,114,41,1,114,65,0,0,0,
- 41,2,114,160,0,0,0,114,164,0,0,0,114,4,0,0,
- 0,41,1,114,160,0,0,0,114,5,0,0,0,218,16,95,
- 114,101,113,117,105,114,101,115,95,102,114,111,122,101,110,43,
- 2,0,0,115,6,0,0,0,0,2,18,5,13,1,114,165,
- 0,0,0,99,2,0,0,0,0,0,0,0,5,0,0,0,
- 4,0,0,0,67,0,0,0,115,87,0,0,0,124,0,0,
- 106,0,0,124,1,0,131,1,0,92,2,0,125,2,0,125,
- 3,0,124,2,0,100,1,0,107,8,0,114,83,0,116,1,
- 0,124,3,0,131,1,0,114,83,0,100,2,0,125,4,0,
- 116,2,0,106,3,0,124,4,0,106,4,0,124,3,0,100,
- 3,0,25,131,1,0,116,5,0,131,2,0,1,110,0,0,
- 124,2,0,83,41,4,122,155,84,114,121,32,116,111,32,102,
- 105,110,100,32,97,32,108,111,97,100,101,114,32,102,111,114,
- 32,116,104,101,32,115,112,101,99,105,102,105,101,100,32,109,
- 111,100,117,108,101,32,98,121,32,100,101,108,101,103,97,116,
- 105,110,103,32,116,111,10,32,32,32,32,115,101,108,102,46,
- 102,105,110,100,95,108,111,97,100,101,114,40,41,46,10,10,
- 32,32,32,32,84,104,105,115,32,109,101,116,104,111,100,32,
- 105,115,32,100,101,112,114,101,99,97,116,101,100,32,105,110,
- 32,102,97,118,111,114,32,111,102,32,102,105,110,100,101,114,
- 46,102,105,110,100,95,115,112,101,99,40,41,46,10,10,32,
- 32,32,32,78,122,44,78,111,116,32,105,109,112,111,114,116,
- 105,110,103,32,100,105,114,101,99,116,111,114,121,32,123,125,
- 58,32,109,105,115,115,105,110,103,32,95,95,105,110,105,116,
- 95,95,114,84,0,0,0,41,6,218,11,102,105,110,100,95,
- 108,111,97,100,101,114,114,31,0,0,0,218,9,95,119,97,
- 114,110,105,110,103,115,218,4,119,97,114,110,114,47,0,0,
- 0,218,13,73,109,112,111,114,116,87,97,114,110,105,110,103,
- 41,5,114,71,0,0,0,114,159,0,0,0,218,6,108,111,
- 97,100,101,114,218,8,112,111,114,116,105,111,110,115,218,3,
- 109,115,103,114,4,0,0,0,114,4,0,0,0,114,5,0,
- 0,0,218,17,95,102,105,110,100,95,109,111,100,117,108,101,
- 95,115,104,105,109,54,2,0,0,115,10,0,0,0,0,10,
- 21,1,24,1,6,1,32,1,114,173,0,0,0,99,2,0,
- 0,0,0,0,0,0,5,0,0,0,3,0,0,0,67,0,
- 0,0,115,93,0,0,0,116,0,0,124,1,0,124,0,0,
- 131,2,0,125,2,0,116,1,0,124,2,0,131,1,0,125,
- 3,0,124,1,0,116,2,0,106,3,0,107,6,0,114,79,
- 0,116,2,0,106,3,0,124,1,0,25,125,4,0,124,3,
- 0,106,4,0,124,4,0,131,1,0,1,116,2,0,106,3,
- 0,124,1,0,25,83,124,3,0,106,5,0,131,0,0,83,
- 100,1,0,83,41,2,122,128,76,111,97,100,32,116,104,101,
- 32,115,112,101,99,105,102,105,101,100,32,109,111,100,117,108,
- 101,32,105,110,116,111,32,115,121,115,46,109,111,100,117,108,
- 101,115,32,97,110,100,32,114,101,116,117,114,110,32,105,116,
- 46,10,10,32,32,32,32,84,104,105,115,32,109,101,116,104,
- 111,100,32,105,115,32,100,101,112,114,101,99,97,116,101,100,
- 46,32,32,85,115,101,32,108,111,97,100,101,114,46,101,120,
- 101,99,95,109,111,100,117,108,101,32,105,110,115,116,101,97,
- 100,46,10,10,32,32,32,32,78,41,6,218,16,115,112,101,
- 99,95,102,114,111,109,95,108,111,97,100,101,114,218,12,95,
- 83,112,101,99,77,101,116,104,111,100,115,114,7,0,0,0,
- 114,73,0,0,0,218,4,101,120,101,99,218,4,108,111,97,
- 100,41,5,114,71,0,0,0,114,159,0,0,0,218,4,115,
- 112,101,99,218,7,109,101,116,104,111,100,115,218,6,109,111,
- 100,117,108,101,114,4,0,0,0,114,4,0,0,0,114,5,
- 0,0,0,218,17,95,108,111,97,100,95,109,111,100,117,108,
- 101,95,115,104,105,109,71,2,0,0,115,14,0,0,0,0,
- 6,15,1,12,1,15,1,13,1,13,1,11,2,114,181,0,
- 0,0,99,4,0,0,0,0,0,0,0,11,0,0,0,19,
- 0,0,0,67,0,0,0,115,255,1,0,0,105,0,0,125,
- 4,0,124,2,0,100,1,0,107,9,0,114,31,0,124,2,
- 0,124,4,0,100,2,0,60,110,6,0,100,3,0,125,2,
- 0,124,3,0,100,1,0,107,9,0,114,62,0,124,3,0,
- 124,4,0,100,4,0,60,110,0,0,124,0,0,100,1,0,
- 100,5,0,133,2,0,25,125,5,0,124,0,0,100,5,0,
- 100,6,0,133,2,0,25,125,6,0,124,0,0,100,6,0,
- 100,7,0,133,2,0,25,125,7,0,124,5,0,116,0,0,
- 107,3,0,114,171,0,100,8,0,106,1,0,124,2,0,124,
- 5,0,131,2,0,125,8,0,116,2,0,100,9,0,124,8,
- 0,131,2,0,1,116,3,0,124,8,0,124,4,0,141,1,
- 0,130,1,0,110,122,0,116,4,0,124,6,0,131,1,0,
- 100,5,0,107,3,0,114,232,0,100,10,0,106,1,0,124,
- 2,0,131,1,0,125,8,0,116,2,0,100,9,0,124,8,
- 0,131,2,0,1,116,5,0,124,8,0,131,1,0,130,1,
- 0,110,61,0,116,4,0,124,7,0,131,1,0,100,5,0,
- 107,3,0,114,37,1,100,11,0,106,1,0,124,2,0,131,
- 1,0,125,8,0,116,2,0,100,9,0,124,8,0,131,2,
- 0,1,116,5,0,124,8,0,131,1,0,130,1,0,110,0,
- 0,124,1,0,100,1,0,107,9,0,114,241,1,121,20,0,
- 116,6,0,124,1,0,100,12,0,25,131,1,0,125,9,0,
- 87,110,18,0,4,116,7,0,107,10,0,114,89,1,1,1,
- 1,89,110,65,0,88,116,8,0,124,6,0,131,1,0,124,
- 9,0,107,3,0,114,154,1,100,13,0,106,1,0,124,2,
- 0,131,1,0,125,8,0,116,2,0,100,9,0,124,8,0,
- 131,2,0,1,116,3,0,124,8,0,124,4,0,141,1,0,
- 130,1,0,110,0,0,121,18,0,124,1,0,100,14,0,25,
- 100,15,0,64,125,10,0,87,110,18,0,4,116,7,0,107,
- 10,0,114,192,1,1,1,1,89,113,241,1,88,116,8,0,
- 124,7,0,131,1,0,124,10,0,107,3,0,114,241,1,116,
- 3,0,100,13,0,106,1,0,124,2,0,131,1,0,124,4,
- 0,141,1,0,130,1,0,113,241,1,110,0,0,124,0,0,
- 100,7,0,100,1,0,133,2,0,25,83,41,16,97,122,1,
- 0,0,86,97,108,105,100,97,116,101,32,116,104,101,32,104,
- 101,97,100,101,114,32,111,102,32,116,104,101,32,112,97,115,
- 115,101,100,45,105,110,32,98,121,116,101,99,111,100,101,32,
- 97,103,97,105,110,115,116,32,115,111,117,114,99,101,95,115,
- 116,97,116,115,32,40,105,102,10,32,32,32,32,103,105,118,
- 101,110,41,32,97,110,100,32,114,101,116,117,114,110,105,110,
- 103,32,116,104,101,32,98,121,116,101,99,111,100,101,32,116,
- 104,97,116,32,99,97,110,32,98,101,32,99,111,109,112,105,
- 108,101,100,32,98,121,32,99,111,109,112,105,108,101,40,41,
- 46,10,10,32,32,32,32,65,108,108,32,111,116,104,101,114,
- 32,97,114,103,117,109,101,110,116,115,32,97,114,101,32,117,
- 115,101,100,32,116,111,32,101,110,104,97,110,99,101,32,101,
- 114,114,111,114,32,114,101,112,111,114,116,105,110,103,46,10,
- 10,32,32,32,32,73,109,112,111,114,116,69,114,114,111,114,
- 32,105,115,32,114,97,105,115,101,100,32,119,104,101,110,32,
- 116,104,101,32,109,97,103,105,99,32,110,117,109,98,101,114,
- 32,105,115,32,105,110,99,111,114,114,101,99,116,32,111,114,
- 32,116,104,101,32,98,121,116,101,99,111,100,101,32,105,115,
- 10,32,32,32,32,102,111,117,110,100,32,116,111,32,98,101,
- 32,115,116,97,108,101,46,32,69,79,70,69,114,114,111,114,
- 32,105,115,32,114,97,105,115,101,100,32,119,104,101,110,32,
- 116,104,101,32,100,97,116,97,32,105,115,32,102,111,117,110,
- 100,32,116,111,32,98,101,10,32,32,32,32,116,114,117,110,
- 99,97,116,101,100,46,10,10,32,32,32,32,78,114,67,0,
- 0,0,122,10,60,98,121,116,101,99,111,100,101,62,114,35,
- 0,0,0,114,12,0,0,0,233,8,0,0,0,233,12,0,
- 0,0,122,30,98,97,100,32,109,97,103,105,99,32,110,117,
- 109,98,101,114,32,105,110,32,123,33,114,125,58,32,123,33,
- 114,125,122,2,123,125,122,43,114,101,97,99,104,101,100,32,
- 69,79,70,32,119,104,105,108,101,32,114,101,97,100,105,110,
- 103,32,116,105,109,101,115,116,97,109,112,32,105,110,32,123,
- 33,114,125,122,48,114,101,97,99,104,101,100,32,69,79,70,
- 32,119,104,105,108,101,32,114,101,97,100,105,110,103,32,115,
- 105,122,101,32,111,102,32,115,111,117,114,99,101,32,105,110,
- 32,123,33,114,125,218,5,109,116,105,109,101,122,26,98,121,
- 116,101,99,111,100,101,32,105,115,32,115,116,97,108,101,32,
- 102,111,114,32,123,33,114,125,218,4,115,105,122,101,108,3,
- 0,0,0,255,127,255,127,3,0,41,9,218,12,77,65,71,
- 73,67,95,78,85,77,66,69,82,114,47,0,0,0,114,153,
- 0,0,0,114,154,0,0,0,114,31,0,0,0,218,8,69,
- 79,70,69,114,114,111,114,114,14,0,0,0,114,79,0,0,
- 0,114,19,0,0,0,41,11,114,53,0,0,0,218,12,115,
- 111,117,114,99,101,95,115,116,97,116,115,114,67,0,0,0,
- 114,35,0,0,0,90,11,101,120,99,95,100,101,116,97,105,
- 108,115,90,5,109,97,103,105,99,90,13,114,97,119,95,116,
- 105,109,101,115,116,97,109,112,90,8,114,97,119,95,115,105,
- 122,101,114,152,0,0,0,218,12,115,111,117,114,99,101,95,
- 109,116,105,109,101,218,11,115,111,117,114,99,101,95,115,105,
- 122,101,114,4,0,0,0,114,4,0,0,0,114,5,0,0,
- 0,218,25,95,118,97,108,105,100,97,116,101,95,98,121,116,
- 101,99,111,100,101,95,104,101,97,100,101,114,87,2,0,0,
- 115,76,0,0,0,0,11,6,1,12,1,13,3,6,1,12,
- 1,13,1,16,1,16,1,16,1,12,1,18,1,13,1,18,
- 1,18,1,15,1,13,1,15,1,18,1,15,1,13,1,15,
- 1,12,1,3,1,20,1,13,1,5,2,18,1,15,1,13,
- 1,18,1,3,1,18,1,13,1,5,2,18,1,15,1,15,
- 1,114,191,0,0,0,99,4,0,0,0,0,0,0,0,5,
- 0,0,0,6,0,0,0,67,0,0,0,115,115,0,0,0,
- 116,0,0,106,1,0,124,0,0,131,1,0,125,4,0,116,
- 2,0,124,4,0,116,3,0,131,2,0,114,78,0,116,4,
- 0,100,1,0,124,2,0,131,2,0,1,124,3,0,100,2,
- 0,107,9,0,114,74,0,116,5,0,106,6,0,124,4,0,
- 124,3,0,131,2,0,1,110,0,0,124,4,0,83,116,7,
- 0,100,3,0,106,8,0,124,2,0,131,1,0,100,4,0,
- 124,1,0,100,5,0,124,2,0,131,1,2,130,1,0,100,
- 2,0,83,41,6,122,60,67,111,109,112,105,108,101,32,98,
- 121,116,101,99,111,100,101,32,97,115,32,114,101,116,117,114,
- 110,101,100,32,98,121,32,95,118,97,108,105,100,97,116,101,
- 95,98,121,116,101,99,111,100,101,95,104,101,97,100,101,114,
- 40,41,46,122,21,99,111,100,101,32,111,98,106,101,99,116,
- 32,102,114,111,109,32,123,33,114,125,78,122,23,78,111,110,
- 45,99,111,100,101,32,111,98,106,101,99,116,32,105,110,32,
- 123,33,114,125,114,67,0,0,0,114,35,0,0,0,41,9,
- 218,7,109,97,114,115,104,97,108,90,5,108,111,97,100,115,
- 218,10,105,115,105,110,115,116,97,110,99,101,218,10,95,99,
- 111,100,101,95,116,121,112,101,114,153,0,0,0,114,106,0,
- 0,0,90,16,95,102,105,120,95,99,111,95,102,105,108,101,
- 110,97,109,101,114,154,0,0,0,114,47,0,0,0,41,5,
- 114,53,0,0,0,114,67,0,0,0,114,141,0,0,0,114,
- 142,0,0,0,218,4,99,111,100,101,114,4,0,0,0,114,
- 4,0,0,0,114,5,0,0,0,218,17,95,99,111,109,112,
- 105,108,101,95,98,121,116,101,99,111,100,101,142,2,0,0,
- 115,16,0,0,0,0,2,15,1,15,1,13,1,12,1,19,
- 1,4,2,18,1,114,196,0,0,0,114,84,0,0,0,99,
- 3,0,0,0,0,0,0,0,4,0,0,0,3,0,0,0,
- 67,0,0,0,115,76,0,0,0,116,0,0,116,1,0,131,
- 1,0,125,3,0,124,3,0,106,2,0,116,3,0,124,1,
- 0,131,1,0,131,1,0,1,124,3,0,106,2,0,116,3,
- 0,124,2,0,131,1,0,131,1,0,1,124,3,0,106,2,
- 0,116,4,0,106,5,0,124,0,0,131,1,0,131,1,0,
- 1,124,3,0,83,41,1,122,80,67,111,109,112,105,108,101,
- 32,97,32,99,111,100,101,32,111,98,106,101,99,116,32,105,
- 110,116,111,32,98,121,116,101,99,111,100,101,32,102,111,114,
- 32,119,114,105,116,105,110,103,32,111,117,116,32,116,111,32,
- 97,32,98,121,116,101,45,99,111,109,112,105,108,101,100,10,
- 32,32,32,32,102,105,108,101,46,41,6,218,9,98,121,116,
- 101,97,114,114,97,121,114,186,0,0,0,218,6,101,120,116,
- 101,110,100,114,17,0,0,0,114,192,0,0,0,90,5,100,
- 117,109,112,115,41,4,114,195,0,0,0,114,184,0,0,0,
- 114,190,0,0,0,114,53,0,0,0,114,4,0,0,0,114,
- 4,0,0,0,114,5,0,0,0,218,17,95,99,111,100,101,
- 95,116,111,95,98,121,116,101,99,111,100,101,154,2,0,0,
- 115,10,0,0,0,0,3,12,1,19,1,19,1,22,1,114,
- 199,0,0,0,99,1,0,0,0,0,0,0,0,5,0,0,
- 0,4,0,0,0,67,0,0,0,115,89,0,0,0,100,1,
- 0,100,2,0,108,0,0,125,1,0,116,1,0,106,2,0,
- 124,0,0,131,1,0,106,3,0,125,2,0,124,1,0,106,
- 4,0,124,2,0,131,1,0,125,3,0,116,1,0,106,5,
- 0,100,2,0,100,3,0,131,2,0,125,4,0,124,4,0,
- 106,6,0,124,0,0,106,6,0,124,3,0,100,1,0,25,
- 131,1,0,131,1,0,83,41,4,122,121,68,101,99,111,100,
- 101,32,98,121,116,101,115,32,114,101,112,114,101,115,101,110,
- 116,105,110,103,32,115,111,117,114,99,101,32,99,111,100,101,
- 32,97,110,100,32,114,101,116,117,114,110,32,116,104,101,32,
- 115,116,114,105,110,103,46,10,10,32,32,32,32,85,110,105,
- 118,101,114,115,97,108,32,110,101,119,108,105,110,101,32,115,
- 117,112,112,111,114,116,32,105,115,32,117,115,101,100,32,105,
- 110,32,116,104,101,32,100,101,99,111,100,105,110,103,46,10,
- 32,32,32,32,114,84,0,0,0,78,84,41,7,218,8,116,
- 111,107,101,110,105,122,101,114,49,0,0,0,90,7,66,121,
- 116,101,115,73,79,90,8,114,101,97,100,108,105,110,101,90,
- 15,100,101,116,101,99,116,95,101,110,99,111,100,105,110,103,
- 90,25,73,110,99,114,101,109,101,110,116,97,108,78,101,119,
- 108,105,110,101,68,101,99,111,100,101,114,218,6,100,101,99,
- 111,100,101,41,5,218,12,115,111,117,114,99,101,95,98,121,
- 116,101,115,114,200,0,0,0,90,21,115,111,117,114,99,101,
- 95,98,121,116,101,115,95,114,101,97,100,108,105,110,101,218,
- 8,101,110,99,111,100,105,110,103,90,15,110,101,119,108,105,
- 110,101,95,100,101,99,111,100,101,114,114,4,0,0,0,114,
- 4,0,0,0,114,5,0,0,0,218,13,100,101,99,111,100,
- 101,95,115,111,117,114,99,101,164,2,0,0,115,10,0,0,
- 0,0,5,12,1,18,1,15,1,18,1,114,204,0,0,0,
- 99,1,0,0,0,0,0,0,0,5,0,0,0,35,0,0,
- 0,67,0,0,0,115,15,1,0,0,116,0,0,124,0,0,
- 100,1,0,100,0,0,131,3,0,125,1,0,116,1,0,124,
- 1,0,100,2,0,131,2,0,114,74,0,121,17,0,124,1,
- 0,106,2,0,124,0,0,131,1,0,83,87,113,74,0,4,
- 116,3,0,107,10,0,114,70,0,1,1,1,89,113,74,0,
- 88,110,0,0,121,13,0,124,0,0,106,4,0,125,2,0,
- 87,110,18,0,4,116,5,0,107,10,0,114,107,0,1,1,
- 1,89,110,29,0,88,124,2,0,100,0,0,107,9,0,114,
- 136,0,116,6,0,124,2,0,131,1,0,106,2,0,131,0,
- 0,83,121,13,0,124,0,0,106,7,0,125,3,0,87,110,
- 24,0,4,116,5,0,107,10,0,114,175,0,1,1,1,100,
- 3,0,125,3,0,89,110,1,0,88,121,13,0,124,0,0,
- 106,8,0,125,4,0,87,110,59,0,4,116,5,0,107,10,
- 0,114,250,0,1,1,1,124,1,0,100,0,0,107,8,0,
- 114,230,0,100,4,0,106,9,0,124,3,0,131,1,0,83,
- 100,5,0,106,9,0,124,3,0,124,1,0,131,2,0,83,
- 89,110,17,0,88,100,6,0,106,9,0,124,3,0,124,4,
- 0,131,2,0,83,100,0,0,83,41,7,78,218,10,95,95,
- 108,111,97,100,101,114,95,95,218,11,109,111,100,117,108,101,
- 95,114,101,112,114,250,1,63,122,13,60,109,111,100,117,108,
- 101,32,123,33,114,125,62,122,20,60,109,111,100,117,108,101,
- 32,123,33,114,125,32,40,123,33,114,125,41,62,122,23,60,
- 109,111,100,117,108,101,32,123,33,114,125,32,102,114,111,109,
- 32,123,33,114,125,62,41,10,114,62,0,0,0,114,60,0,
- 0,0,114,206,0,0,0,218,9,69,120,99,101,112,116,105,
- 111,110,218,8,95,95,115,112,101,99,95,95,218,14,65,116,
- 116,114,105,98,117,116,101,69,114,114,111,114,114,175,0,0,
- 0,114,57,0,0,0,218,8,95,95,102,105,108,101,95,95,
- 114,47,0,0,0,41,5,114,180,0,0,0,114,170,0,0,
- 0,114,178,0,0,0,114,67,0,0,0,114,131,0,0,0,
- 114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,218,
- 12,95,109,111,100,117,108,101,95,114,101,112,114,178,2,0,
- 0,115,46,0,0,0,0,2,18,1,15,4,3,1,17,1,
- 13,1,8,1,3,1,13,1,13,1,5,2,12,1,16,4,
- 3,1,13,1,13,1,11,1,3,1,13,1,13,1,12,1,
- 13,2,21,2,114,212,0,0,0,99,0,0,0,0,0,0,
- 0,0,0,0,0,0,2,0,0,0,64,0,0,0,115,52,
- 0,0,0,101,0,0,90,1,0,100,0,0,90,2,0,100,
- 1,0,100,2,0,132,0,0,90,3,0,100,3,0,100,4,
- 0,132,0,0,90,4,0,100,5,0,100,6,0,132,0,0,
- 90,5,0,100,7,0,83,41,8,218,17,95,105,110,115,116,
- 97,108,108,101,100,95,115,97,102,101,108,121,99,2,0,0,
- 0,0,0,0,0,2,0,0,0,2,0,0,0,67,0,0,
- 0,115,25,0,0,0,124,1,0,124,0,0,95,0,0,124,
- 1,0,106,1,0,124,0,0,95,2,0,100,0,0,83,41,
- 1,78,41,3,218,7,95,109,111,100,117,108,101,114,209,0,
- 0,0,218,5,95,115,112,101,99,41,2,114,71,0,0,0,
- 114,180,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
- 5,0,0,0,114,72,0,0,0,216,2,0,0,115,4,0,
- 0,0,0,1,9,1,122,26,95,105,110,115,116,97,108,108,
- 101,100,95,115,97,102,101,108,121,46,95,95,105,110,105,116,
- 95,95,99,1,0,0,0,0,0,0,0,1,0,0,0,3,
- 0,0,0,67,0,0,0,115,38,0,0,0,100,1,0,124,
- 0,0,106,0,0,95,1,0,124,0,0,106,2,0,116,3,
- 0,106,4,0,124,0,0,106,0,0,106,5,0,60,100,0,
- 0,83,41,2,78,84,41,6,114,215,0,0,0,218,13,95,
- 105,110,105,116,105,97,108,105,122,105,110,103,114,214,0,0,
- 0,114,7,0,0,0,114,73,0,0,0,114,67,0,0,0,
- 41,1,114,71,0,0,0,114,4,0,0,0,114,4,0,0,
- 0,114,5,0,0,0,114,75,0,0,0,220,2,0,0,115,
- 4,0,0,0,0,4,12,1,122,27,95,105,110,115,116,97,
- 108,108,101,100,95,115,97,102,101,108,121,46,95,95,101,110,
- 116,101,114,95,95,99,1,0,0,0,0,0,0,0,3,0,
- 0,0,17,0,0,0,71,0,0,0,115,121,0,0,0,122,
- 101,0,124,0,0,106,0,0,125,2,0,116,1,0,100,1,
- 0,100,2,0,132,0,0,124,1,0,68,131,1,0,131,1,
- 0,114,78,0,121,17,0,116,2,0,106,3,0,124,2,0,
- 106,4,0,61,87,113,100,0,4,116,5,0,107,10,0,114,
- 74,0,1,1,1,89,113,100,0,88,110,22,0,116,6,0,
- 100,3,0,124,2,0,106,4,0,124,2,0,106,7,0,131,
- 3,0,1,87,100,0,0,100,4,0,124,0,0,106,0,0,
- 95,8,0,88,100,0,0,83,41,5,78,99,1,0,0,0,
- 0,0,0,0,2,0,0,0,3,0,0,0,115,0,0,0,
- 115,27,0,0,0,124,0,0,93,17,0,125,1,0,124,1,
- 0,100,0,0,107,9,0,86,1,113,3,0,100,0,0,83,
- 41,1,78,114,4,0,0,0,41,2,114,22,0,0,0,114,
- 76,0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,
- 0,0,0,114,77,0,0,0,230,2,0,0,115,2,0,0,
- 0,6,0,122,45,95,105,110,115,116,97,108,108,101,100,95,
- 115,97,102,101,108,121,46,95,95,101,120,105,116,95,95,46,
- 60,108,111,99,97,108,115,62,46,60,103,101,110,101,120,112,
- 114,62,122,18,105,109,112,111,114,116,32,123,33,114,125,32,
- 35,32,123,33,114,125,70,41,9,114,215,0,0,0,114,78,
- 0,0,0,114,7,0,0,0,114,73,0,0,0,114,67,0,
- 0,0,114,79,0,0,0,114,153,0,0,0,114,170,0,0,
- 0,114,216,0,0,0,41,3,114,71,0,0,0,114,80,0,
- 0,0,114,178,0,0,0,114,4,0,0,0,114,4,0,0,
- 0,114,5,0,0,0,114,81,0,0,0,227,2,0,0,115,
- 18,0,0,0,0,1,3,1,9,1,25,1,3,1,17,1,
- 13,1,8,2,26,2,122,26,95,105,110,115,116,97,108,108,
+ 2,0,124,1,0,131,1,1,130,1,0,136,0,0,124,0,
+ 0,124,1,0,131,2,0,83,41,3,78,122,27,123,33,114,
+ 125,32,105,115,32,110,111,116,32,97,32,102,114,111,122,101,
+ 110,32,109,111,100,117,108,101,114,15,0,0,0,41,4,114,
+ 57,0,0,0,218,9,105,115,95,102,114,111,122,101,110,114,
+ 77,0,0,0,114,50,0,0,0,41,2,114,19,0,0,0,
+ 114,78,0,0,0,41,1,114,79,0,0,0,114,10,0,0,
+ 0,114,11,0,0,0,218,24,95,114,101,113,117,105,114,101,
+ 115,95,102,114,111,122,101,110,95,119,114,97,112,112,101,114,
+ 246,0,0,0,115,8,0,0,0,0,1,15,1,18,1,9,
+ 1,122,50,95,114,101,113,117,105,114,101,115,95,102,114,111,
+ 122,101,110,46,60,108,111,99,97,108,115,62,46,95,114,101,
+ 113,117,105,114,101,115,95,102,114,111,122,101,110,95,119,114,
+ 97,112,112,101,114,41,1,114,12,0,0,0,41,2,114,79,
+ 0,0,0,114,83,0,0,0,114,10,0,0,0,41,1,114,
+ 79,0,0,0,114,11,0,0,0,218,16,95,114,101,113,117,
+ 105,114,101,115,95,102,114,111,122,101,110,244,0,0,0,115,
+ 6,0,0,0,0,2,18,5,13,1,114,84,0,0,0,99,
+ 2,0,0,0,0,0,0,0,4,0,0,0,3,0,0,0,
+ 67,0,0,0,115,81,0,0,0,116,0,0,124,1,0,124,
+ 0,0,131,2,0,125,2,0,124,1,0,116,1,0,106,2,
+ 0,107,6,0,114,67,0,116,1,0,106,2,0,124,1,0,
+ 25,125,3,0,116,3,0,124,2,0,124,3,0,131,2,0,
+ 1,116,1,0,106,2,0,124,1,0,25,83,116,4,0,124,
+ 2,0,131,1,0,83,100,1,0,83,41,2,122,128,76,111,
+ 97,100,32,116,104,101,32,115,112,101,99,105,102,105,101,100,
+ 32,109,111,100,117,108,101,32,105,110,116,111,32,115,121,115,
+ 46,109,111,100,117,108,101,115,32,97,110,100,32,114,101,116,
+ 117,114,110,32,105,116,46,10,10,32,32,32,32,84,104,105,
+ 115,32,109,101,116,104,111,100,32,105,115,32,100,101,112,114,
+ 101,99,97,116,101,100,46,32,32,85,115,101,32,108,111,97,
+ 100,101,114,46,101,120,101,99,95,109,111,100,117,108,101,32,
+ 105,110,115,116,101,97,100,46,10,10,32,32,32,32,78,41,
+ 5,218,16,115,112,101,99,95,102,114,111,109,95,108,111,97,
+ 100,101,114,114,14,0,0,0,114,21,0,0,0,218,5,95,
+ 101,120,101,99,218,5,95,108,111,97,100,41,4,114,19,0,
+ 0,0,114,78,0,0,0,218,4,115,112,101,99,218,6,109,
+ 111,100,117,108,101,114,10,0,0,0,114,10,0,0,0,114,
+ 11,0,0,0,218,17,95,108,111,97,100,95,109,111,100,117,
+ 108,101,95,115,104,105,109,0,1,0,0,115,12,0,0,0,
+ 0,6,15,1,15,1,13,1,13,1,11,2,114,90,0,0,
+ 0,99,1,0,0,0,0,0,0,0,5,0,0,0,35,0,
+ 0,0,67,0,0,0,115,6,1,0,0,116,0,0,124,0,
+ 0,100,1,0,100,0,0,131,3,0,125,1,0,116,1,0,
+ 124,1,0,100,2,0,131,2,0,114,71,0,121,17,0,124,
+ 1,0,106,2,0,124,0,0,131,1,0,83,87,110,18,0,
+ 4,116,3,0,107,10,0,114,70,0,1,1,1,89,110,1,
+ 0,88,121,13,0,124,0,0,106,4,0,125,2,0,87,110,
+ 18,0,4,116,5,0,107,10,0,114,104,0,1,1,1,89,
+ 110,23,0,88,124,2,0,100,0,0,107,9,0,114,127,0,
+ 116,6,0,124,2,0,131,1,0,83,121,13,0,124,0,0,
+ 106,7,0,125,3,0,87,110,24,0,4,116,5,0,107,10,
+ 0,114,166,0,1,1,1,100,3,0,125,3,0,89,110,1,
+ 0,88,121,13,0,124,0,0,106,8,0,125,4,0,87,110,
+ 59,0,4,116,5,0,107,10,0,114,241,0,1,1,1,124,
+ 1,0,100,0,0,107,8,0,114,221,0,100,4,0,106,9,
+ 0,124,3,0,131,1,0,83,100,5,0,106,9,0,124,3,
+ 0,124,1,0,131,2,0,83,89,110,17,0,88,100,6,0,
+ 106,9,0,124,3,0,124,4,0,131,2,0,83,100,0,0,
+ 83,41,7,78,218,10,95,95,108,111,97,100,101,114,95,95,
+ 218,11,109,111,100,117,108,101,95,114,101,112,114,250,1,63,
+ 122,13,60,109,111,100,117,108,101,32,123,33,114,125,62,122,
+ 20,60,109,111,100,117,108,101,32,123,33,114,125,32,40,123,
+ 33,114,125,41,62,122,23,60,109,111,100,117,108,101,32,123,
+ 33,114,125,32,102,114,111,109,32,123,33,114,125,62,41,10,
+ 114,6,0,0,0,114,4,0,0,0,114,92,0,0,0,218,
+ 9,69,120,99,101,112,116,105,111,110,218,8,95,95,115,112,
+ 101,99,95,95,218,14,65,116,116,114,105,98,117,116,101,69,
+ 114,114,111,114,218,22,95,109,111,100,117,108,101,95,114,101,
+ 112,114,95,102,114,111,109,95,115,112,101,99,114,1,0,0,
+ 0,218,8,95,95,102,105,108,101,95,95,114,50,0,0,0,
+ 41,5,114,89,0,0,0,218,6,108,111,97,100,101,114,114,
+ 88,0,0,0,114,15,0,0,0,218,8,102,105,108,101,110,
+ 97,109,101,114,10,0,0,0,114,10,0,0,0,114,11,0,
+ 0,0,218,12,95,109,111,100,117,108,101,95,114,101,112,114,
+ 16,1,0,0,115,46,0,0,0,0,2,18,1,15,4,3,
+ 1,17,1,13,1,5,1,3,1,13,1,13,1,5,2,12,
+ 1,10,4,3,1,13,1,13,1,11,1,3,1,13,1,13,
+ 1,12,1,13,2,21,2,114,101,0,0,0,99,0,0,0,
+ 0,0,0,0,0,0,0,0,0,2,0,0,0,64,0,0,
+ 0,115,52,0,0,0,101,0,0,90,1,0,100,0,0,90,
+ 2,0,100,1,0,100,2,0,132,0,0,90,3,0,100,3,
+ 0,100,4,0,132,0,0,90,4,0,100,5,0,100,6,0,
+ 132,0,0,90,5,0,100,7,0,83,41,8,218,17,95,105,
+ 110,115,116,97,108,108,101,100,95,115,97,102,101,108,121,99,
+ 2,0,0,0,0,0,0,0,2,0,0,0,2,0,0,0,
+ 67,0,0,0,115,25,0,0,0,124,1,0,124,0,0,95,
+ 0,0,124,1,0,106,1,0,124,0,0,95,2,0,100,0,
+ 0,83,41,1,78,41,3,218,7,95,109,111,100,117,108,101,
+ 114,95,0,0,0,218,5,95,115,112,101,99,41,2,114,19,
+ 0,0,0,114,89,0,0,0,114,10,0,0,0,114,10,0,
+ 0,0,114,11,0,0,0,114,20,0,0,0,54,1,0,0,
+ 115,4,0,0,0,0,1,9,1,122,26,95,105,110,115,116,
+ 97,108,108,101,100,95,115,97,102,101,108,121,46,95,95,105,
+ 110,105,116,95,95,99,1,0,0,0,0,0,0,0,1,0,
+ 0,0,3,0,0,0,67,0,0,0,115,38,0,0,0,100,
+ 1,0,124,0,0,106,0,0,95,1,0,124,0,0,106,2,
+ 0,116,3,0,106,4,0,124,0,0,106,0,0,106,5,0,
+ 60,100,0,0,83,41,2,78,84,41,6,114,104,0,0,0,
+ 218,13,95,105,110,105,116,105,97,108,105,122,105,110,103,114,
+ 103,0,0,0,114,14,0,0,0,114,21,0,0,0,114,15,
+ 0,0,0,41,1,114,19,0,0,0,114,10,0,0,0,114,
+ 10,0,0,0,114,11,0,0,0,114,23,0,0,0,58,1,
+ 0,0,115,4,0,0,0,0,4,12,1,122,27,95,105,110,
+ 115,116,97,108,108,101,100,95,115,97,102,101,108,121,46,95,
+ 95,101,110,116,101,114,95,95,99,1,0,0,0,0,0,0,
+ 0,3,0,0,0,17,0,0,0,71,0,0,0,115,121,0,
+ 0,0,122,101,0,124,0,0,106,0,0,125,2,0,116,1,
+ 0,100,1,0,100,2,0,132,0,0,124,1,0,68,131,1,
+ 0,131,1,0,114,78,0,121,17,0,116,2,0,106,3,0,
+ 124,2,0,106,4,0,61,87,113,100,0,4,116,5,0,107,
+ 10,0,114,74,0,1,1,1,89,113,100,0,88,110,22,0,
+ 116,6,0,100,3,0,124,2,0,106,4,0,124,2,0,106,
+ 7,0,131,3,0,1,87,100,0,0,100,4,0,124,0,0,
+ 106,0,0,95,8,0,88,100,0,0,83,41,5,78,99,1,
+ 0,0,0,0,0,0,0,2,0,0,0,3,0,0,0,115,
+ 0,0,0,115,27,0,0,0,124,0,0,93,17,0,125,1,
+ 0,124,1,0,100,0,0,107,9,0,86,1,113,3,0,100,
+ 0,0,83,41,1,78,114,10,0,0,0,41,2,114,24,0,
+ 0,0,114,25,0,0,0,114,10,0,0,0,114,10,0,0,
+ 0,114,11,0,0,0,114,26,0,0,0,68,1,0,0,115,
+ 2,0,0,0,6,0,122,45,95,105,110,115,116,97,108,108,
101,100,95,115,97,102,101,108,121,46,95,95,101,120,105,116,
- 95,95,78,41,6,114,57,0,0,0,114,56,0,0,0,114,
- 58,0,0,0,114,72,0,0,0,114,75,0,0,0,114,81,
- 0,0,0,114,4,0,0,0,114,4,0,0,0,114,4,0,
- 0,0,114,5,0,0,0,114,213,0,0,0,214,2,0,0,
- 115,6,0,0,0,12,2,12,4,12,7,114,213,0,0,0,
- 99,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,
- 0,64,0,0,0,115,172,0,0,0,101,0,0,90,1,0,
- 100,0,0,90,2,0,100,1,0,90,3,0,100,2,0,100,
- 3,0,100,4,0,100,3,0,100,5,0,100,3,0,100,6,
- 0,100,7,0,132,0,3,90,4,0,100,8,0,100,9,0,
- 132,0,0,90,5,0,100,10,0,100,11,0,132,0,0,90,
- 6,0,101,7,0,100,12,0,100,13,0,132,0,0,131,1,
- 0,90,8,0,101,8,0,106,9,0,100,14,0,100,13,0,
- 132,0,0,131,1,0,90,8,0,101,7,0,100,15,0,100,
- 16,0,132,0,0,131,1,0,90,10,0,101,7,0,100,17,
- 0,100,18,0,132,0,0,131,1,0,90,11,0,101,11,0,
- 106,9,0,100,19,0,100,18,0,132,0,0,131,1,0,90,
- 11,0,100,3,0,83,41,20,218,10,77,111,100,117,108,101,
- 83,112,101,99,97,208,5,0,0,84,104,101,32,115,112,101,
- 99,105,102,105,99,97,116,105,111,110,32,102,111,114,32,97,
- 32,109,111,100,117,108,101,44,32,117,115,101,100,32,102,111,
- 114,32,108,111,97,100,105,110,103,46,10,10,32,32,32,32,
- 65,32,109,111,100,117,108,101,39,115,32,115,112,101,99,32,
- 105,115,32,116,104,101,32,115,111,117,114,99,101,32,102,111,
- 114,32,105,110,102,111,114,109,97,116,105,111,110,32,97,98,
- 111,117,116,32,116,104,101,32,109,111,100,117,108,101,46,32,
- 32,70,111,114,10,32,32,32,32,100,97,116,97,32,97,115,
- 115,111,99,105,97,116,101,100,32,119,105,116,104,32,116,104,
- 101,32,109,111,100,117,108,101,44,32,105,110,99,108,117,100,
- 105,110,103,32,115,111,117,114,99,101,44,32,117,115,101,32,
- 116,104,101,32,115,112,101,99,39,115,10,32,32,32,32,108,
- 111,97,100,101,114,46,10,10,32,32,32,32,96,110,97,109,
- 101,96,32,105,115,32,116,104,101,32,97,98,115,111,108,117,
- 116,101,32,110,97,109,101,32,111,102,32,116,104,101,32,109,
- 111,100,117,108,101,46,32,32,96,108,111,97,100,101,114,96,
- 32,105,115,32,116,104,101,32,108,111,97,100,101,114,10,32,
- 32,32,32,116,111,32,117,115,101,32,119,104,101,110,32,108,
- 111,97,100,105,110,103,32,116,104,101,32,109,111,100,117,108,
- 101,46,32,32,96,112,97,114,101,110,116,96,32,105,115,32,
- 116,104,101,32,110,97,109,101,32,111,102,32,116,104,101,10,
- 32,32,32,32,112,97,99,107,97,103,101,32,116,104,101,32,
- 109,111,100,117,108,101,32,105,115,32,105,110,46,32,32,84,
- 104,101,32,112,97,114,101,110,116,32,105,115,32,100,101,114,
- 105,118,101,100,32,102,114,111,109,32,116,104,101,32,110,97,
- 109,101,46,10,10,32,32,32,32,96,105,115,95,112,97,99,
- 107,97,103,101,96,32,100,101,116,101,114,109,105,110,101,115,
- 32,105,102,32,116,104,101,32,109,111,100,117,108,101,32,105,
- 115,32,99,111,110,115,105,100,101,114,101,100,32,97,32,112,
- 97,99,107,97,103,101,32,111,114,10,32,32,32,32,110,111,
- 116,46,32,32,79,110,32,109,111,100,117,108,101,115,32,116,
- 104,105,115,32,105,115,32,114,101,102,108,101,99,116,101,100,
- 32,98,121,32,116,104,101,32,96,95,95,112,97,116,104,95,
- 95,96,32,97,116,116,114,105,98,117,116,101,46,10,10,32,
- 32,32,32,96,111,114,105,103,105,110,96,32,105,115,32,116,
- 104,101,32,115,112,101,99,105,102,105,99,32,108,111,99,97,
- 116,105,111,110,32,117,115,101,100,32,98,121,32,116,104,101,
- 32,108,111,97,100,101,114,32,102,114,111,109,32,119,104,105,
- 99,104,32,116,111,10,32,32,32,32,108,111,97,100,32,116,
- 104,101,32,109,111,100,117,108,101,44,32,105,102,32,116,104,
- 97,116,32,105,110,102,111,114,109,97,116,105,111,110,32,105,
- 115,32,97,118,97,105,108,97,98,108,101,46,32,32,87,104,
- 101,110,32,102,105,108,101,110,97,109,101,32,105,115,10,32,
- 32,32,32,115,101,116,44,32,111,114,105,103,105,110,32,119,
- 105,108,108,32,109,97,116,99,104,46,10,10,32,32,32,32,
- 96,104,97,115,95,108,111,99,97,116,105,111,110,96,32,105,
- 110,100,105,99,97,116,101,115,32,116,104,97,116,32,97,32,
- 115,112,101,99,39,115,32,34,111,114,105,103,105,110,34,32,
- 114,101,102,108,101,99,116,115,32,97,32,108,111,99,97,116,
- 105,111,110,46,10,32,32,32,32,87,104,101,110,32,116,104,
- 105,115,32,105,115,32,84,114,117,101,44,32,96,95,95,102,
- 105,108,101,95,95,96,32,97,116,116,114,105,98,117,116,101,
- 32,111,102,32,116,104,101,32,109,111,100,117,108,101,32,105,
- 115,32,115,101,116,46,10,10,32,32,32,32,96,99,97,99,
- 104,101,100,96,32,105,115,32,116,104,101,32,108,111,99,97,
- 116,105,111,110,32,111,102,32,116,104,101,32,99,97,99,104,
- 101,100,32,98,121,116,101,99,111,100,101,32,102,105,108,101,
- 44,32,105,102,32,97,110,121,46,32,32,73,116,10,32,32,
- 32,32,99,111,114,114,101,115,112,111,110,100,115,32,116,111,
- 32,116,104,101,32,96,95,95,99,97,99,104,101,100,95,95,
- 96,32,97,116,116,114,105,98,117,116,101,46,10,10,32,32,
- 32,32,96,115,117,98,109,111,100,117,108,101,95,115,101,97,
- 114,99,104,95,108,111,99,97,116,105,111,110,115,96,32,105,
- 115,32,116,104,101,32,115,101,113,117,101,110,99,101,32,111,
- 102,32,112,97,116,104,32,101,110,116,114,105,101,115,32,116,
- 111,10,32,32,32,32,115,101,97,114,99,104,32,119,104,101,
- 110,32,105,109,112,111,114,116,105,110,103,32,115,117,98,109,
- 111,100,117,108,101,115,46,32,32,73,102,32,115,101,116,44,
- 32,105,115,95,112,97,99,107,97,103,101,32,115,104,111,117,
- 108,100,32,98,101,10,32,32,32,32,84,114,117,101,45,45,
- 97,110,100,32,70,97,108,115,101,32,111,116,104,101,114,119,
- 105,115,101,46,10,10,32,32,32,32,80,97,99,107,97,103,
- 101,115,32,97,114,101,32,115,105,109,112,108,121,32,109,111,
- 100,117,108,101,115,32,116,104,97,116,32,40,109,97,121,41,
- 32,104,97,118,101,32,115,117,98,109,111,100,117,108,101,115,
- 46,32,32,73,102,32,97,32,115,112,101,99,10,32,32,32,
- 32,104,97,115,32,97,32,110,111,110,45,78,111,110,101,32,
- 118,97,108,117,101,32,105,110,32,96,115,117,98,109,111,100,
- 117,108,101,95,115,101,97,114,99,104,95,108,111,99,97,116,
- 105,111,110,115,96,44,32,116,104,101,32,105,109,112,111,114,
- 116,10,32,32,32,32,115,121,115,116,101,109,32,119,105,108,
- 108,32,99,111,110,115,105,100,101,114,32,109,111,100,117,108,
- 101,115,32,108,111,97,100,101,100,32,102,114,111,109,32,116,
- 104,101,32,115,112,101,99,32,97,115,32,112,97,99,107,97,
- 103,101,115,46,10,10,32,32,32,32,79,110,108,121,32,102,
- 105,110,100,101,114,115,32,40,115,101,101,32,105,109,112,111,
- 114,116,108,105,98,46,97,98,99,46,77,101,116,97,80,97,
- 116,104,70,105,110,100,101,114,32,97,110,100,10,32,32,32,
- 32,105,109,112,111,114,116,108,105,98,46,97,98,99,46,80,
- 97,116,104,69,110,116,114,121,70,105,110,100,101,114,41,32,
- 115,104,111,117,108,100,32,109,111,100,105,102,121,32,77,111,
- 100,117,108,101,83,112,101,99,32,105,110,115,116,97,110,99,
- 101,115,46,10,10,32,32,32,32,218,6,111,114,105,103,105,
- 110,78,218,12,108,111,97,100,101,114,95,115,116,97,116,101,
- 218,10,105,115,95,112,97,99,107,97,103,101,99,3,0,0,
- 0,3,0,0,0,6,0,0,0,2,0,0,0,67,0,0,
- 0,115,79,0,0,0,124,1,0,124,0,0,95,0,0,124,
- 2,0,124,0,0,95,1,0,124,3,0,124,0,0,95,2,
- 0,124,4,0,124,0,0,95,3,0,124,5,0,114,48,0,
- 103,0,0,110,3,0,100,0,0,124,0,0,95,4,0,100,
- 1,0,124,0,0,95,5,0,100,0,0,124,0,0,95,6,
- 0,100,0,0,83,41,2,78,70,41,7,114,67,0,0,0,
- 114,170,0,0,0,114,218,0,0,0,114,219,0,0,0,218,
- 26,115,117,98,109,111,100,117,108,101,95,115,101,97,114,99,
- 104,95,108,111,99,97,116,105,111,110,115,218,13,95,115,101,
- 116,95,102,105,108,101,97,116,116,114,218,7,95,99,97,99,
- 104,101,100,41,6,114,71,0,0,0,114,67,0,0,0,114,
- 170,0,0,0,114,218,0,0,0,114,219,0,0,0,114,220,
- 0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,
- 0,0,114,72,0,0,0,22,3,0,0,115,14,0,0,0,
- 0,2,9,1,9,1,9,1,9,1,21,3,9,1,122,19,
- 77,111,100,117,108,101,83,112,101,99,46,95,95,105,110,105,
- 116,95,95,99,1,0,0,0,0,0,0,0,2,0,0,0,
- 4,0,0,0,67,0,0,0,115,153,0,0,0,100,1,0,
- 106,0,0,124,0,0,106,1,0,131,1,0,100,2,0,106,
- 0,0,124,0,0,106,2,0,131,1,0,103,2,0,125,1,
- 0,124,0,0,106,3,0,100,0,0,107,9,0,114,79,0,
- 124,1,0,106,4,0,100,3,0,106,0,0,124,0,0,106,
- 3,0,131,1,0,131,1,0,1,110,0,0,124,0,0,106,
- 5,0,100,0,0,107,9,0,114,122,0,124,1,0,106,4,
+ 95,95,46,60,108,111,99,97,108,115,62,46,60,103,101,110,
+ 101,120,112,114,62,122,18,105,109,112,111,114,116,32,123,33,
+ 114,125,32,35,32,123,33,114,125,70,41,9,114,104,0,0,
+ 0,114,27,0,0,0,114,14,0,0,0,114,21,0,0,0,
+ 114,15,0,0,0,114,28,0,0,0,114,75,0,0,0,114,
+ 99,0,0,0,114,105,0,0,0,41,3,114,19,0,0,0,
+ 114,29,0,0,0,114,88,0,0,0,114,10,0,0,0,114,
+ 10,0,0,0,114,11,0,0,0,114,30,0,0,0,65,1,
+ 0,0,115,18,0,0,0,0,1,3,1,9,1,25,1,3,
+ 1,17,1,13,1,8,2,26,2,122,26,95,105,110,115,116,
+ 97,108,108,101,100,95,115,97,102,101,108,121,46,95,95,101,
+ 120,105,116,95,95,78,41,6,114,1,0,0,0,114,0,0,
+ 0,0,114,2,0,0,0,114,20,0,0,0,114,23,0,0,
+ 0,114,30,0,0,0,114,10,0,0,0,114,10,0,0,0,
+ 114,10,0,0,0,114,11,0,0,0,114,102,0,0,0,52,
+ 1,0,0,115,6,0,0,0,12,2,12,4,12,7,114,102,
+ 0,0,0,99,0,0,0,0,0,0,0,0,0,0,0,0,
+ 8,0,0,0,64,0,0,0,115,172,0,0,0,101,0,0,
+ 90,1,0,100,0,0,90,2,0,100,1,0,90,3,0,100,
+ 2,0,100,3,0,100,4,0,100,3,0,100,5,0,100,3,
+ 0,100,6,0,100,7,0,132,0,3,90,4,0,100,8,0,
+ 100,9,0,132,0,0,90,5,0,100,10,0,100,11,0,132,
+ 0,0,90,6,0,101,7,0,100,12,0,100,13,0,132,0,
+ 0,131,1,0,90,8,0,101,8,0,106,9,0,100,14,0,
+ 100,13,0,132,0,0,131,1,0,90,8,0,101,7,0,100,
+ 15,0,100,16,0,132,0,0,131,1,0,90,10,0,101,7,
+ 0,100,17,0,100,18,0,132,0,0,131,1,0,90,11,0,
+ 101,11,0,106,9,0,100,19,0,100,18,0,132,0,0,131,
+ 1,0,90,11,0,100,3,0,83,41,20,218,10,77,111,100,
+ 117,108,101,83,112,101,99,97,208,5,0,0,84,104,101,32,
+ 115,112,101,99,105,102,105,99,97,116,105,111,110,32,102,111,
+ 114,32,97,32,109,111,100,117,108,101,44,32,117,115,101,100,
+ 32,102,111,114,32,108,111,97,100,105,110,103,46,10,10,32,
+ 32,32,32,65,32,109,111,100,117,108,101,39,115,32,115,112,
+ 101,99,32,105,115,32,116,104,101,32,115,111,117,114,99,101,
+ 32,102,111,114,32,105,110,102,111,114,109,97,116,105,111,110,
+ 32,97,98,111,117,116,32,116,104,101,32,109,111,100,117,108,
+ 101,46,32,32,70,111,114,10,32,32,32,32,100,97,116,97,
+ 32,97,115,115,111,99,105,97,116,101,100,32,119,105,116,104,
+ 32,116,104,101,32,109,111,100,117,108,101,44,32,105,110,99,
+ 108,117,100,105,110,103,32,115,111,117,114,99,101,44,32,117,
+ 115,101,32,116,104,101,32,115,112,101,99,39,115,10,32,32,
+ 32,32,108,111,97,100,101,114,46,10,10,32,32,32,32,96,
+ 110,97,109,101,96,32,105,115,32,116,104,101,32,97,98,115,
+ 111,108,117,116,101,32,110,97,109,101,32,111,102,32,116,104,
+ 101,32,109,111,100,117,108,101,46,32,32,96,108,111,97,100,
+ 101,114,96,32,105,115,32,116,104,101,32,108,111,97,100,101,
+ 114,10,32,32,32,32,116,111,32,117,115,101,32,119,104,101,
+ 110,32,108,111,97,100,105,110,103,32,116,104,101,32,109,111,
+ 100,117,108,101,46,32,32,96,112,97,114,101,110,116,96,32,
+ 105,115,32,116,104,101,32,110,97,109,101,32,111,102,32,116,
+ 104,101,10,32,32,32,32,112,97,99,107,97,103,101,32,116,
+ 104,101,32,109,111,100,117,108,101,32,105,115,32,105,110,46,
+ 32,32,84,104,101,32,112,97,114,101,110,116,32,105,115,32,
+ 100,101,114,105,118,101,100,32,102,114,111,109,32,116,104,101,
+ 32,110,97,109,101,46,10,10,32,32,32,32,96,105,115,95,
+ 112,97,99,107,97,103,101,96,32,100,101,116,101,114,109,105,
+ 110,101,115,32,105,102,32,116,104,101,32,109,111,100,117,108,
+ 101,32,105,115,32,99,111,110,115,105,100,101,114,101,100,32,
+ 97,32,112,97,99,107,97,103,101,32,111,114,10,32,32,32,
+ 32,110,111,116,46,32,32,79,110,32,109,111,100,117,108,101,
+ 115,32,116,104,105,115,32,105,115,32,114,101,102,108,101,99,
+ 116,101,100,32,98,121,32,116,104,101,32,96,95,95,112,97,
+ 116,104,95,95,96,32,97,116,116,114,105,98,117,116,101,46,
+ 10,10,32,32,32,32,96,111,114,105,103,105,110,96,32,105,
+ 115,32,116,104,101,32,115,112,101,99,105,102,105,99,32,108,
+ 111,99,97,116,105,111,110,32,117,115,101,100,32,98,121,32,
+ 116,104,101,32,108,111,97,100,101,114,32,102,114,111,109,32,
+ 119,104,105,99,104,32,116,111,10,32,32,32,32,108,111,97,
+ 100,32,116,104,101,32,109,111,100,117,108,101,44,32,105,102,
+ 32,116,104,97,116,32,105,110,102,111,114,109,97,116,105,111,
+ 110,32,105,115,32,97,118,97,105,108,97,98,108,101,46,32,
+ 32,87,104,101,110,32,102,105,108,101,110,97,109,101,32,105,
+ 115,10,32,32,32,32,115,101,116,44,32,111,114,105,103,105,
+ 110,32,119,105,108,108,32,109,97,116,99,104,46,10,10,32,
+ 32,32,32,96,104,97,115,95,108,111,99,97,116,105,111,110,
+ 96,32,105,110,100,105,99,97,116,101,115,32,116,104,97,116,
+ 32,97,32,115,112,101,99,39,115,32,34,111,114,105,103,105,
+ 110,34,32,114,101,102,108,101,99,116,115,32,97,32,108,111,
+ 99,97,116,105,111,110,46,10,32,32,32,32,87,104,101,110,
+ 32,116,104,105,115,32,105,115,32,84,114,117,101,44,32,96,
+ 95,95,102,105,108,101,95,95,96,32,97,116,116,114,105,98,
+ 117,116,101,32,111,102,32,116,104,101,32,109,111,100,117,108,
+ 101,32,105,115,32,115,101,116,46,10,10,32,32,32,32,96,
+ 99,97,99,104,101,100,96,32,105,115,32,116,104,101,32,108,
+ 111,99,97,116,105,111,110,32,111,102,32,116,104,101,32,99,
+ 97,99,104,101,100,32,98,121,116,101,99,111,100,101,32,102,
+ 105,108,101,44,32,105,102,32,97,110,121,46,32,32,73,116,
+ 10,32,32,32,32,99,111,114,114,101,115,112,111,110,100,115,
+ 32,116,111,32,116,104,101,32,96,95,95,99,97,99,104,101,
+ 100,95,95,96,32,97,116,116,114,105,98,117,116,101,46,10,
+ 10,32,32,32,32,96,115,117,98,109,111,100,117,108,101,95,
+ 115,101,97,114,99,104,95,108,111,99,97,116,105,111,110,115,
+ 96,32,105,115,32,116,104,101,32,115,101,113,117,101,110,99,
+ 101,32,111,102,32,112,97,116,104,32,101,110,116,114,105,101,
+ 115,32,116,111,10,32,32,32,32,115,101,97,114,99,104,32,
+ 119,104,101,110,32,105,109,112,111,114,116,105,110,103,32,115,
+ 117,98,109,111,100,117,108,101,115,46,32,32,73,102,32,115,
+ 101,116,44,32,105,115,95,112,97,99,107,97,103,101,32,115,
+ 104,111,117,108,100,32,98,101,10,32,32,32,32,84,114,117,
+ 101,45,45,97,110,100,32,70,97,108,115,101,32,111,116,104,
+ 101,114,119,105,115,101,46,10,10,32,32,32,32,80,97,99,
+ 107,97,103,101,115,32,97,114,101,32,115,105,109,112,108,121,
+ 32,109,111,100,117,108,101,115,32,116,104,97,116,32,40,109,
+ 97,121,41,32,104,97,118,101,32,115,117,98,109,111,100,117,
+ 108,101,115,46,32,32,73,102,32,97,32,115,112,101,99,10,
+ 32,32,32,32,104,97,115,32,97,32,110,111,110,45,78,111,
+ 110,101,32,118,97,108,117,101,32,105,110,32,96,115,117,98,
+ 109,111,100,117,108,101,95,115,101,97,114,99,104,95,108,111,
+ 99,97,116,105,111,110,115,96,44,32,116,104,101,32,105,109,
+ 112,111,114,116,10,32,32,32,32,115,121,115,116,101,109,32,
+ 119,105,108,108,32,99,111,110,115,105,100,101,114,32,109,111,
+ 100,117,108,101,115,32,108,111,97,100,101,100,32,102,114,111,
+ 109,32,116,104,101,32,115,112,101,99,32,97,115,32,112,97,
+ 99,107,97,103,101,115,46,10,10,32,32,32,32,79,110,108,
+ 121,32,102,105,110,100,101,114,115,32,40,115,101,101,32,105,
+ 109,112,111,114,116,108,105,98,46,97,98,99,46,77,101,116,
+ 97,80,97,116,104,70,105,110,100,101,114,32,97,110,100,10,
+ 32,32,32,32,105,109,112,111,114,116,108,105,98,46,97,98,
+ 99,46,80,97,116,104,69,110,116,114,121,70,105,110,100,101,
+ 114,41,32,115,104,111,117,108,100,32,109,111,100,105,102,121,
+ 32,77,111,100,117,108,101,83,112,101,99,32,105,110,115,116,
+ 97,110,99,101,115,46,10,10,32,32,32,32,218,6,111,114,
+ 105,103,105,110,78,218,12,108,111,97,100,101,114,95,115,116,
+ 97,116,101,218,10,105,115,95,112,97,99,107,97,103,101,99,
+ 3,0,0,0,3,0,0,0,6,0,0,0,2,0,0,0,
+ 67,0,0,0,115,79,0,0,0,124,1,0,124,0,0,95,
+ 0,0,124,2,0,124,0,0,95,1,0,124,3,0,124,0,
+ 0,95,2,0,124,4,0,124,0,0,95,3,0,124,5,0,
+ 114,48,0,103,0,0,110,3,0,100,0,0,124,0,0,95,
+ 4,0,100,1,0,124,0,0,95,5,0,100,0,0,124,0,
+ 0,95,6,0,100,0,0,83,41,2,78,70,41,7,114,15,
+ 0,0,0,114,99,0,0,0,114,107,0,0,0,114,108,0,
+ 0,0,218,26,115,117,98,109,111,100,117,108,101,95,115,101,
+ 97,114,99,104,95,108,111,99,97,116,105,111,110,115,218,13,
+ 95,115,101,116,95,102,105,108,101,97,116,116,114,218,7,95,
+ 99,97,99,104,101,100,41,6,114,19,0,0,0,114,15,0,
+ 0,0,114,99,0,0,0,114,107,0,0,0,114,108,0,0,
+ 0,114,109,0,0,0,114,10,0,0,0,114,10,0,0,0,
+ 114,11,0,0,0,114,20,0,0,0,116,1,0,0,115,14,
+ 0,0,0,0,2,9,1,9,1,9,1,9,1,21,3,9,
+ 1,122,19,77,111,100,117,108,101,83,112,101,99,46,95,95,
+ 105,110,105,116,95,95,99,1,0,0,0,0,0,0,0,2,
+ 0,0,0,4,0,0,0,67,0,0,0,115,147,0,0,0,
+ 100,1,0,106,0,0,124,0,0,106,1,0,131,1,0,100,
+ 2,0,106,0,0,124,0,0,106,2,0,131,1,0,103,2,
+ 0,125,1,0,124,0,0,106,3,0,100,0,0,107,9,0,
+ 114,76,0,124,1,0,106,4,0,100,3,0,106,0,0,124,
+ 0,0,106,3,0,131,1,0,131,1,0,1,124,0,0,106,
+ 5,0,100,0,0,107,9,0,114,116,0,124,1,0,106,4,
0,100,4,0,106,0,0,124,0,0,106,5,0,131,1,0,
- 131,1,0,1,110,0,0,100,5,0,106,0,0,124,0,0,
- 106,6,0,106,7,0,100,6,0,106,8,0,124,1,0,131,
- 1,0,131,2,0,83,41,7,78,122,9,110,97,109,101,61,
- 123,33,114,125,122,11,108,111,97,100,101,114,61,123,33,114,
- 125,122,11,111,114,105,103,105,110,61,123,33,114,125,122,29,
- 115,117,98,109,111,100,117,108,101,95,115,101,97,114,99,104,
- 95,108,111,99,97,116,105,111,110,115,61,123,125,122,6,123,
- 125,40,123,125,41,122,2,44,32,41,9,114,47,0,0,0,
- 114,67,0,0,0,114,170,0,0,0,114,218,0,0,0,218,
- 6,97,112,112,101,110,100,114,221,0,0,0,218,9,95,95,
- 99,108,97,115,115,95,95,114,57,0,0,0,114,26,0,0,
- 0,41,2,114,71,0,0,0,114,80,0,0,0,114,4,0,
- 0,0,114,4,0,0,0,114,5,0,0,0,114,101,0,0,
- 0,34,3,0,0,115,16,0,0,0,0,1,15,1,21,1,
- 15,1,28,1,15,1,12,1,16,1,122,19,77,111,100,117,
- 108,101,83,112,101,99,46,95,95,114,101,112,114,95,95,99,
- 2,0,0,0,0,0,0,0,3,0,0,0,11,0,0,0,
- 67,0,0,0,115,145,0,0,0,124,0,0,106,0,0,125,
- 2,0,121,107,0,124,0,0,106,1,0,124,1,0,106,1,
- 0,107,2,0,111,114,0,124,0,0,106,2,0,124,1,0,
- 106,2,0,107,2,0,111,114,0,124,0,0,106,3,0,124,
- 1,0,106,3,0,107,2,0,111,114,0,124,2,0,124,1,
- 0,106,0,0,107,2,0,111,114,0,124,0,0,106,4,0,
- 124,1,0,106,4,0,107,2,0,111,114,0,124,0,0,106,
- 5,0,124,1,0,106,5,0,107,2,0,83,87,110,22,0,
- 4,116,6,0,107,10,0,114,140,0,1,1,1,100,1,0,
- 83,89,110,1,0,88,100,0,0,83,41,2,78,70,41,7,
- 114,221,0,0,0,114,67,0,0,0,114,170,0,0,0,114,
- 218,0,0,0,218,6,99,97,99,104,101,100,218,12,104,97,
- 115,95,108,111,99,97,116,105,111,110,114,210,0,0,0,41,
- 3,114,71,0,0,0,218,5,111,116,104,101,114,218,4,115,
- 109,115,108,114,4,0,0,0,114,4,0,0,0,114,5,0,
- 0,0,218,6,95,95,101,113,95,95,44,3,0,0,115,20,
- 0,0,0,0,1,9,1,3,1,18,1,18,1,18,1,15,
- 1,18,1,20,1,13,1,122,17,77,111,100,117,108,101,83,
- 112,101,99,46,95,95,101,113,95,95,99,1,0,0,0,0,
- 0,0,0,2,0,0,0,11,0,0,0,67,0,0,0,115,
- 158,0,0,0,124,0,0,106,0,0,100,0,0,107,8,0,
- 114,151,0,124,0,0,106,1,0,100,0,0,107,9,0,114,
- 151,0,124,0,0,106,2,0,114,151,0,124,0,0,106,1,
- 0,125,1,0,124,1,0,106,3,0,116,4,0,116,5,0,
- 131,1,0,131,1,0,114,112,0,121,19,0,116,6,0,124,
- 1,0,131,1,0,124,0,0,95,0,0,87,113,145,0,4,
- 116,7,0,107,10,0,114,108,0,1,1,1,89,113,145,0,
- 88,113,148,0,124,1,0,106,3,0,116,4,0,116,8,0,
- 131,1,0,131,1,0,114,148,0,124,1,0,124,0,0,95,
- 0,0,113,148,0,113,151,0,110,0,0,124,0,0,106,0,
- 0,83,41,1,78,41,9,114,223,0,0,0,114,218,0,0,
- 0,114,222,0,0,0,218,8,101,110,100,115,119,105,116,104,
- 218,5,116,117,112,108,101,114,135,0,0,0,114,132,0,0,
- 0,114,123,0,0,0,218,17,66,89,84,69,67,79,68,69,
- 95,83,85,70,70,73,88,69,83,41,2,114,71,0,0,0,
- 114,131,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
- 5,0,0,0,114,226,0,0,0,56,3,0,0,115,22,0,
- 0,0,0,2,15,1,24,1,9,1,21,1,3,1,19,1,
- 13,1,8,1,21,1,18,1,122,17,77,111,100,117,108,101,
- 83,112,101,99,46,99,97,99,104,101,100,99,2,0,0,0,
- 0,0,0,0,2,0,0,0,2,0,0,0,67,0,0,0,
- 115,13,0,0,0,124,1,0,124,0,0,95,0,0,100,0,
- 0,83,41,1,78,41,1,114,223,0,0,0,41,2,114,71,
- 0,0,0,114,226,0,0,0,114,4,0,0,0,114,4,0,
- 0,0,114,5,0,0,0,114,226,0,0,0,70,3,0,0,
- 115,2,0,0,0,0,2,99,1,0,0,0,0,0,0,0,
- 1,0,0,0,2,0,0,0,67,0,0,0,115,46,0,0,
- 0,124,0,0,106,0,0,100,1,0,107,8,0,114,35,0,
- 124,0,0,106,1,0,106,2,0,100,2,0,131,1,0,100,
- 3,0,25,83,124,0,0,106,1,0,83,100,1,0,83,41,
- 4,122,32,84,104,101,32,110,97,109,101,32,111,102,32,116,
- 104,101,32,109,111,100,117,108,101,39,115,32,112,97,114,101,
- 110,116,46,78,114,116,0,0,0,114,84,0,0,0,41,3,
- 114,221,0,0,0,114,67,0,0,0,114,32,0,0,0,41,
- 1,114,71,0,0,0,114,4,0,0,0,114,4,0,0,0,
- 114,5,0,0,0,218,6,112,97,114,101,110,116,74,3,0,
- 0,115,6,0,0,0,0,3,15,1,20,2,122,17,77,111,
- 100,117,108,101,83,112,101,99,46,112,97,114,101,110,116,99,
- 1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,
- 67,0,0,0,115,7,0,0,0,124,0,0,106,0,0,83,
- 41,1,78,41,1,114,222,0,0,0,41,1,114,71,0,0,
- 0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,
- 114,227,0,0,0,82,3,0,0,115,2,0,0,0,0,2,
- 122,23,77,111,100,117,108,101,83,112,101,99,46,104,97,115,
- 95,108,111,99,97,116,105,111,110,99,2,0,0,0,0,0,
- 0,0,2,0,0,0,2,0,0,0,67,0,0,0,115,19,
- 0,0,0,116,0,0,124,1,0,131,1,0,124,0,0,95,
- 1,0,100,0,0,83,41,1,78,41,2,218,4,98,111,111,
- 108,114,222,0,0,0,41,2,114,71,0,0,0,218,5,118,
- 97,108,117,101,114,4,0,0,0,114,4,0,0,0,114,5,
- 0,0,0,114,227,0,0,0,86,3,0,0,115,2,0,0,
- 0,0,2,41,12,114,57,0,0,0,114,56,0,0,0,114,
- 58,0,0,0,114,59,0,0,0,114,72,0,0,0,114,101,
- 0,0,0,114,230,0,0,0,218,8,112,114,111,112,101,114,
- 116,121,114,226,0,0,0,218,6,115,101,116,116,101,114,114,
- 234,0,0,0,114,227,0,0,0,114,4,0,0,0,114,4,
- 0,0,0,114,4,0,0,0,114,5,0,0,0,114,217,0,
- 0,0,241,2,0,0,115,20,0,0,0,12,35,6,2,15,
- 1,15,11,12,10,12,12,18,14,21,4,18,8,18,4,114,
- 217,0,0,0,114,218,0,0,0,114,220,0,0,0,99,2,
- 0,0,0,2,0,0,0,5,0,0,0,15,0,0,0,67,
- 0,0,0,115,193,0,0,0,116,0,0,124,1,0,100,1,
- 0,131,2,0,114,83,0,124,3,0,100,2,0,107,8,0,
- 114,43,0,116,1,0,124,0,0,100,3,0,124,1,0,131,
- 1,1,83,124,3,0,114,55,0,103,0,0,110,3,0,100,
- 2,0,125,4,0,116,1,0,124,0,0,100,3,0,124,1,
- 0,100,4,0,124,4,0,131,1,2,83,124,3,0,100,2,
- 0,107,8,0,114,168,0,116,0,0,124,1,0,100,5,0,
- 131,2,0,114,159,0,121,19,0,124,1,0,106,2,0,124,
- 0,0,131,1,0,125,3,0,87,113,165,0,4,116,3,0,
- 107,10,0,114,155,0,1,1,1,100,2,0,125,3,0,89,
- 113,165,0,88,113,168,0,100,6,0,125,3,0,110,0,0,
- 116,4,0,124,0,0,124,1,0,100,7,0,124,2,0,100,
- 5,0,124,3,0,131,2,2,83,41,8,122,53,82,101,116,
- 117,114,110,32,97,32,109,111,100,117,108,101,32,115,112,101,
- 99,32,98,97,115,101,100,32,111,110,32,118,97,114,105,111,
- 117,115,32,108,111,97,100,101,114,32,109,101,116,104,111,100,
- 115,46,218,12,103,101,116,95,102,105,108,101,110,97,109,101,
- 78,114,170,0,0,0,114,221,0,0,0,114,220,0,0,0,
- 70,114,218,0,0,0,41,5,114,60,0,0,0,218,23,115,
- 112,101,99,95,102,114,111,109,95,102,105,108,101,95,108,111,
- 99,97,116,105,111,110,114,220,0,0,0,114,154,0,0,0,
- 114,217,0,0,0,41,5,114,67,0,0,0,114,170,0,0,
- 0,114,218,0,0,0,114,220,0,0,0,90,6,115,101,97,
- 114,99,104,114,4,0,0,0,114,4,0,0,0,114,5,0,
- 0,0,114,174,0,0,0,91,3,0,0,115,28,0,0,0,
- 0,2,15,1,12,1,16,1,18,1,15,1,7,2,12,1,
- 15,1,3,1,19,1,13,1,14,3,9,2,114,174,0,0,
- 0,114,170,0,0,0,114,221,0,0,0,99,2,0,0,0,
- 2,0,0,0,9,0,0,0,19,0,0,0,67,0,0,0,
- 115,110,1,0,0,124,1,0,100,1,0,107,8,0,114,79,
- 0,100,2,0,125,1,0,116,0,0,124,2,0,100,3,0,
- 131,2,0,114,79,0,121,19,0,124,2,0,106,1,0,124,
- 0,0,131,1,0,125,1,0,87,113,76,0,4,116,2,0,
- 107,10,0,114,72,0,1,1,1,89,113,76,0,88,113,79,
- 0,110,0,0,116,3,0,124,0,0,124,2,0,100,4,0,
- 124,1,0,131,2,1,125,4,0,100,5,0,124,4,0,95,
- 4,0,124,2,0,100,1,0,107,8,0,114,203,0,120,79,
- 0,116,5,0,131,0,0,68,93,61,0,92,2,0,125,5,
- 0,125,6,0,124,1,0,106,6,0,116,7,0,124,6,0,
- 131,1,0,131,1,0,114,131,0,124,5,0,124,0,0,124,
- 1,0,131,2,0,125,2,0,124,2,0,124,4,0,95,8,
- 0,80,113,131,0,113,131,0,87,100,1,0,83,110,0,0,
- 124,3,0,116,9,0,107,8,0,114,38,1,116,0,0,124,
- 2,0,100,6,0,131,2,0,114,47,1,121,19,0,124,2,
- 0,106,10,0,124,0,0,131,1,0,125,7,0,87,110,18,
- 0,4,116,2,0,107,10,0,114,13,1,1,1,1,89,113,
- 35,1,88,124,7,0,114,35,1,103,0,0,124,4,0,95,
- 11,0,113,35,1,113,47,1,110,9,0,124,3,0,124,4,
- 0,95,11,0,124,4,0,106,11,0,103,0,0,107,2,0,
- 114,106,1,124,1,0,114,106,1,116,12,0,124,1,0,131,
- 1,0,100,7,0,25,125,8,0,124,4,0,106,11,0,106,
- 13,0,124,8,0,131,1,0,1,113,106,1,110,0,0,124,
- 4,0,83,41,8,97,61,1,0,0,82,101,116,117,114,110,
- 32,97,32,109,111,100,117,108,101,32,115,112,101,99,32,98,
- 97,115,101,100,32,111,110,32,97,32,102,105,108,101,32,108,
- 111,99,97,116,105,111,110,46,10,10,32,32,32,32,84,111,
- 32,105,110,100,105,99,97,116,101,32,116,104,97,116,32,116,
- 104,101,32,109,111,100,117,108,101,32,105,115,32,97,32,112,
- 97,99,107,97,103,101,44,32,115,101,116,10,32,32,32,32,
- 115,117,98,109,111,100,117,108,101,95,115,101,97,114,99,104,
- 95,108,111,99,97,116,105,111,110,115,32,116,111,32,97,32,
- 108,105,115,116,32,111,102,32,100,105,114,101,99,116,111,114,
- 121,32,112,97,116,104,115,46,32,32,65,110,10,32,32,32,
- 32,101,109,112,116,121,32,108,105,115,116,32,105,115,32,115,
- 117,102,102,105,99,105,101,110,116,44,32,116,104,111,117,103,
- 104,32,105,116,115,32,110,111,116,32,111,116,104,101,114,119,
- 105,115,101,32,117,115,101,102,117,108,32,116,111,32,116,104,
- 101,10,32,32,32,32,105,109,112,111,114,116,32,115,121,115,
- 116,101,109,46,10,10,32,32,32,32,84,104,101,32,108,111,
- 97,100,101,114,32,109,117,115,116,32,116,97,107,101,32,97,
- 32,115,112,101,99,32,97,115,32,105,116,115,32,111,110,108,
- 121,32,95,95,105,110,105,116,95,95,40,41,32,97,114,103,
- 46,10,10,32,32,32,32,78,122,9,60,117,110,107,110,111,
- 119,110,62,114,239,0,0,0,114,218,0,0,0,84,114,220,
- 0,0,0,114,84,0,0,0,41,14,114,60,0,0,0,114,
- 239,0,0,0,114,154,0,0,0,114,217,0,0,0,114,222,
- 0,0,0,218,27,95,103,101,116,95,115,117,112,112,111,114,
- 116,101,100,95,102,105,108,101,95,108,111,97,100,101,114,115,
- 114,231,0,0,0,114,232,0,0,0,114,170,0,0,0,218,
- 9,95,80,79,80,85,76,65,84,69,114,220,0,0,0,114,
- 221,0,0,0,114,38,0,0,0,114,224,0,0,0,41,9,
- 114,67,0,0,0,218,8,108,111,99,97,116,105,111,110,114,
- 170,0,0,0,114,221,0,0,0,114,178,0,0,0,218,12,
- 108,111,97,100,101,114,95,99,108,97,115,115,114,126,0,0,
- 0,114,220,0,0,0,90,7,100,105,114,110,97,109,101,114,
- 4,0,0,0,114,4,0,0,0,114,5,0,0,0,114,240,
- 0,0,0,116,3,0,0,115,60,0,0,0,0,12,12,4,
- 6,1,15,2,3,1,19,1,13,1,11,8,21,1,9,3,
- 12,1,22,1,21,1,15,1,9,1,8,2,7,3,12,2,
- 15,1,3,1,19,1,13,1,5,2,6,1,18,2,9,1,
- 15,1,6,1,16,1,22,2,114,240,0,0,0,99,3,0,
+ 131,1,0,1,100,5,0,106,0,0,124,0,0,106,6,0,
+ 106,7,0,100,6,0,106,8,0,124,1,0,131,1,0,131,
+ 2,0,83,41,7,78,122,9,110,97,109,101,61,123,33,114,
+ 125,122,11,108,111,97,100,101,114,61,123,33,114,125,122,11,
+ 111,114,105,103,105,110,61,123,33,114,125,122,29,115,117,98,
+ 109,111,100,117,108,101,95,115,101,97,114,99,104,95,108,111,
+ 99,97,116,105,111,110,115,61,123,125,122,6,123,125,40,123,
+ 125,41,122,2,44,32,41,9,114,50,0,0,0,114,15,0,
+ 0,0,114,99,0,0,0,114,107,0,0,0,218,6,97,112,
+ 112,101,110,100,114,110,0,0,0,218,9,95,95,99,108,97,
+ 115,115,95,95,114,1,0,0,0,218,4,106,111,105,110,41,
+ 2,114,19,0,0,0,114,29,0,0,0,114,10,0,0,0,
+ 114,10,0,0,0,114,11,0,0,0,114,52,0,0,0,128,
+ 1,0,0,115,16,0,0,0,0,1,15,1,21,1,15,1,
+ 25,1,15,1,12,1,13,1,122,19,77,111,100,117,108,101,
+ 83,112,101,99,46,95,95,114,101,112,114,95,95,99,2,0,
+ 0,0,0,0,0,0,3,0,0,0,11,0,0,0,67,0,
+ 0,0,115,145,0,0,0,124,0,0,106,0,0,125,2,0,
+ 121,107,0,124,0,0,106,1,0,124,1,0,106,1,0,107,
+ 2,0,111,114,0,124,0,0,106,2,0,124,1,0,106,2,
+ 0,107,2,0,111,114,0,124,0,0,106,3,0,124,1,0,
+ 106,3,0,107,2,0,111,114,0,124,2,0,124,1,0,106,
+ 0,0,107,2,0,111,114,0,124,0,0,106,4,0,124,1,
+ 0,106,4,0,107,2,0,111,114,0,124,0,0,106,5,0,
+ 124,1,0,106,5,0,107,2,0,83,87,110,22,0,4,116,
+ 6,0,107,10,0,114,140,0,1,1,1,100,1,0,83,89,
+ 110,1,0,88,100,0,0,83,41,2,78,70,41,7,114,110,
+ 0,0,0,114,15,0,0,0,114,99,0,0,0,114,107,0,
+ 0,0,218,6,99,97,99,104,101,100,218,12,104,97,115,95,
+ 108,111,99,97,116,105,111,110,114,96,0,0,0,41,3,114,
+ 19,0,0,0,90,5,111,116,104,101,114,90,4,115,109,115,
+ 108,114,10,0,0,0,114,10,0,0,0,114,11,0,0,0,
+ 218,6,95,95,101,113,95,95,138,1,0,0,115,20,0,0,
+ 0,0,1,9,1,3,1,18,1,18,1,18,1,15,1,18,
+ 1,20,1,13,1,122,17,77,111,100,117,108,101,83,112,101,
+ 99,46,95,95,101,113,95,95,99,1,0,0,0,0,0,0,
+ 0,1,0,0,0,2,0,0,0,67,0,0,0,115,85,0,
+ 0,0,124,0,0,106,0,0,100,0,0,107,8,0,114,78,
+ 0,124,0,0,106,1,0,100,0,0,107,9,0,114,78,0,
+ 124,0,0,106,2,0,114,78,0,116,3,0,100,0,0,107,
+ 8,0,114,57,0,116,4,0,130,1,0,116,3,0,106,5,
+ 0,124,0,0,106,1,0,131,1,0,124,0,0,95,0,0,
+ 124,0,0,106,0,0,83,41,1,78,41,6,114,112,0,0,
+ 0,114,107,0,0,0,114,111,0,0,0,218,19,95,98,111,
+ 111,116,115,116,114,97,112,95,101,120,116,101,114,110,97,108,
+ 218,19,78,111,116,73,109,112,108,101,109,101,110,116,101,100,
+ 69,114,114,111,114,90,11,95,103,101,116,95,99,97,99,104,
+ 101,100,41,1,114,19,0,0,0,114,10,0,0,0,114,10,
+ 0,0,0,114,11,0,0,0,114,116,0,0,0,150,1,0,
+ 0,115,12,0,0,0,0,2,15,1,24,1,12,1,6,1,
+ 21,1,122,17,77,111,100,117,108,101,83,112,101,99,46,99,
+ 97,99,104,101,100,99,2,0,0,0,0,0,0,0,2,0,
+ 0,0,2,0,0,0,67,0,0,0,115,13,0,0,0,124,
+ 1,0,124,0,0,95,0,0,100,0,0,83,41,1,78,41,
+ 1,114,112,0,0,0,41,2,114,19,0,0,0,114,116,0,
+ 0,0,114,10,0,0,0,114,10,0,0,0,114,11,0,0,
+ 0,114,116,0,0,0,159,1,0,0,115,2,0,0,0,0,
+ 2,99,1,0,0,0,0,0,0,0,1,0,0,0,2,0,
+ 0,0,67,0,0,0,115,46,0,0,0,124,0,0,106,0,
+ 0,100,1,0,107,8,0,114,35,0,124,0,0,106,1,0,
+ 106,2,0,100,2,0,131,1,0,100,3,0,25,83,124,0,
+ 0,106,1,0,83,100,1,0,83,41,4,122,32,84,104,101,
+ 32,110,97,109,101,32,111,102,32,116,104,101,32,109,111,100,
+ 117,108,101,39,115,32,112,97,114,101,110,116,46,78,218,1,
+ 46,114,33,0,0,0,41,3,114,110,0,0,0,114,15,0,
+ 0,0,218,10,114,112,97,114,116,105,116,105,111,110,41,1,
+ 114,19,0,0,0,114,10,0,0,0,114,10,0,0,0,114,
+ 11,0,0,0,218,6,112,97,114,101,110,116,163,1,0,0,
+ 115,6,0,0,0,0,3,15,1,20,2,122,17,77,111,100,
+ 117,108,101,83,112,101,99,46,112,97,114,101,110,116,99,1,
+ 0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,67,
+ 0,0,0,115,7,0,0,0,124,0,0,106,0,0,83,41,
+ 1,78,41,1,114,111,0,0,0,41,1,114,19,0,0,0,
+ 114,10,0,0,0,114,10,0,0,0,114,11,0,0,0,114,
+ 117,0,0,0,171,1,0,0,115,2,0,0,0,0,2,122,
+ 23,77,111,100,117,108,101,83,112,101,99,46,104,97,115,95,
+ 108,111,99,97,116,105,111,110,99,2,0,0,0,0,0,0,
+ 0,2,0,0,0,2,0,0,0,67,0,0,0,115,19,0,
+ 0,0,116,0,0,124,1,0,131,1,0,124,0,0,95,1,
+ 0,100,0,0,83,41,1,78,41,2,218,4,98,111,111,108,
+ 114,111,0,0,0,41,2,114,19,0,0,0,218,5,118,97,
+ 108,117,101,114,10,0,0,0,114,10,0,0,0,114,11,0,
+ 0,0,114,117,0,0,0,175,1,0,0,115,2,0,0,0,
+ 0,2,41,12,114,1,0,0,0,114,0,0,0,0,114,2,
+ 0,0,0,114,3,0,0,0,114,20,0,0,0,114,52,0,
+ 0,0,114,118,0,0,0,218,8,112,114,111,112,101,114,116,
+ 121,114,116,0,0,0,218,6,115,101,116,116,101,114,114,123,
+ 0,0,0,114,117,0,0,0,114,10,0,0,0,114,10,0,
+ 0,0,114,10,0,0,0,114,11,0,0,0,114,106,0,0,
+ 0,79,1,0,0,115,20,0,0,0,12,35,6,2,15,1,
+ 15,11,12,10,12,12,18,9,21,4,18,8,18,4,114,106,
+ 0,0,0,114,107,0,0,0,114,109,0,0,0,99,2,0,
+ 0,0,2,0,0,0,6,0,0,0,15,0,0,0,67,0,
+ 0,0,115,217,0,0,0,116,0,0,124,1,0,100,1,0,
+ 131,2,0,114,110,0,116,1,0,100,2,0,107,8,0,114,
+ 33,0,116,2,0,130,1,0,116,1,0,106,3,0,125,4,
+ 0,124,3,0,100,2,0,107,8,0,114,70,0,124,4,0,
+ 124,0,0,100,3,0,124,1,0,131,1,1,83,124,3,0,
+ 114,82,0,103,0,0,110,3,0,100,2,0,125,5,0,124,
+ 4,0,124,0,0,100,3,0,124,1,0,100,4,0,124,5,
+ 0,131,1,2,83,124,3,0,100,2,0,107,8,0,114,192,
+ 0,116,0,0,124,1,0,100,5,0,131,2,0,114,186,0,
+ 121,19,0,124,1,0,106,4,0,124,0,0,131,1,0,125,
+ 3,0,87,113,192,0,4,116,5,0,107,10,0,114,182,0,
+ 1,1,1,100,2,0,125,3,0,89,113,192,0,88,110,6,
+ 0,100,6,0,125,3,0,116,6,0,124,0,0,124,1,0,
+ 100,7,0,124,2,0,100,5,0,124,3,0,131,2,2,83,
+ 41,8,122,53,82,101,116,117,114,110,32,97,32,109,111,100,
+ 117,108,101,32,115,112,101,99,32,98,97,115,101,100,32,111,
+ 110,32,118,97,114,105,111,117,115,32,108,111,97,100,101,114,
+ 32,109,101,116,104,111,100,115,46,90,12,103,101,116,95,102,
+ 105,108,101,110,97,109,101,78,114,99,0,0,0,114,110,0,
+ 0,0,114,109,0,0,0,70,114,107,0,0,0,41,7,114,
+ 4,0,0,0,114,119,0,0,0,114,120,0,0,0,218,23,
+ 115,112,101,99,95,102,114,111,109,95,102,105,108,101,95,108,
+ 111,99,97,116,105,111,110,114,109,0,0,0,114,77,0,0,
+ 0,114,106,0,0,0,41,6,114,15,0,0,0,114,99,0,
+ 0,0,114,107,0,0,0,114,109,0,0,0,114,128,0,0,
+ 0,90,6,115,101,97,114,99,104,114,10,0,0,0,114,10,
+ 0,0,0,114,11,0,0,0,114,85,0,0,0,180,1,0,
+ 0,115,34,0,0,0,0,2,15,1,12,1,6,1,9,2,
+ 12,1,16,1,18,1,15,1,7,2,12,1,15,1,3,1,
+ 19,1,13,1,14,3,6,2,114,85,0,0,0,99,3,0,
0,0,0,0,0,0,8,0,0,0,53,0,0,0,67,0,
- 0,0,115,124,1,0,0,121,13,0,124,0,0,106,0,0,
+ 0,0,115,118,1,0,0,121,13,0,124,0,0,106,0,0,
125,3,0,87,110,18,0,4,116,1,0,107,10,0,114,33,
0,1,1,1,89,110,17,0,88,124,3,0,100,0,0,107,
9,0,114,50,0,124,3,0,83,124,0,0,106,2,0,125,
- 4,0,124,1,0,100,0,0,107,8,0,114,108,0,121,13,
- 0,124,0,0,106,3,0,125,1,0,87,113,108,0,4,116,
- 1,0,107,10,0,114,104,0,1,1,1,89,113,108,0,88,
- 110,0,0,121,13,0,124,0,0,106,4,0,125,5,0,87,
- 110,24,0,4,116,1,0,107,10,0,114,147,0,1,1,1,
- 100,0,0,125,5,0,89,110,1,0,88,124,2,0,100,0,
- 0,107,8,0,114,224,0,124,5,0,100,0,0,107,8,0,
- 114,215,0,121,13,0,124,1,0,106,5,0,125,2,0,87,
- 113,221,0,4,116,1,0,107,10,0,114,211,0,1,1,1,
- 100,0,0,125,2,0,89,113,221,0,88,113,224,0,124,5,
- 0,125,2,0,110,0,0,121,13,0,124,0,0,106,6,0,
- 125,6,0,87,110,24,0,4,116,1,0,107,10,0,114,7,
- 1,1,1,1,100,0,0,125,6,0,89,110,1,0,88,121,
- 19,0,116,7,0,124,0,0,106,8,0,131,1,0,125,7,
- 0,87,110,24,0,4,116,1,0,107,10,0,114,53,1,1,
- 1,1,100,0,0,125,7,0,89,110,1,0,88,116,9,0,
- 124,4,0,124,1,0,100,1,0,124,2,0,131,2,1,125,
- 3,0,124,5,0,100,0,0,107,8,0,114,93,1,100,2,
- 0,110,3,0,100,3,0,124,3,0,95,10,0,124,6,0,
- 124,3,0,95,11,0,124,7,0,124,3,0,95,12,0,124,
- 3,0,83,41,4,78,114,218,0,0,0,70,84,41,13,114,
- 209,0,0,0,114,210,0,0,0,114,57,0,0,0,114,205,
- 0,0,0,114,211,0,0,0,90,7,95,79,82,73,71,73,
- 78,218,10,95,95,99,97,99,104,101,100,95,95,218,4,108,
- 105,115,116,218,8,95,95,112,97,116,104,95,95,114,217,0,
- 0,0,114,222,0,0,0,114,226,0,0,0,114,221,0,0,
- 0,41,8,114,180,0,0,0,114,170,0,0,0,114,218,0,
- 0,0,114,178,0,0,0,114,67,0,0,0,114,243,0,0,
- 0,114,226,0,0,0,114,221,0,0,0,114,4,0,0,0,
- 114,4,0,0,0,114,5,0,0,0,218,17,95,115,112,101,
- 99,95,102,114,111,109,95,109,111,100,117,108,101,180,3,0,
- 0,115,72,0,0,0,0,2,3,1,13,1,13,1,5,2,
- 12,1,4,2,9,1,12,1,3,1,13,1,13,2,8,1,
- 3,1,13,1,13,1,11,1,12,1,12,1,3,1,13,1,
- 13,1,14,2,9,1,3,1,13,1,13,1,11,1,3,1,
- 19,1,13,1,11,2,21,1,27,1,9,1,9,1,114,248,
- 0,0,0,99,0,0,0,0,0,0,0,0,0,0,0,0,
- 6,0,0,0,64,0,0,0,115,142,0,0,0,101,0,0,
- 90,1,0,100,0,0,90,2,0,100,1,0,90,3,0,100,
- 2,0,100,3,0,132,0,0,90,4,0,100,4,0,100,5,
- 0,132,0,0,90,5,0,100,6,0,100,7,0,100,8,0,
- 100,9,0,100,10,0,100,11,0,132,0,2,90,6,0,100,
- 12,0,100,13,0,132,0,0,90,7,0,100,14,0,100,15,
- 0,132,0,0,90,8,0,100,16,0,100,17,0,132,0,0,
- 90,9,0,100,18,0,100,19,0,132,0,0,90,10,0,100,
- 20,0,100,21,0,132,0,0,90,11,0,100,22,0,100,23,
- 0,132,0,0,90,12,0,100,24,0,83,41,25,114,175,0,
- 0,0,122,77,67,111,110,118,101,110,105,101,110,99,101,32,
- 119,114,97,112,112,101,114,32,97,114,111,117,110,100,32,115,
- 112,101,99,32,111,98,106,101,99,116,115,32,116,111,32,112,
- 114,111,118,105,100,101,32,115,112,101,99,45,115,112,101,99,
- 105,102,105,99,10,32,32,32,32,109,101,116,104,111,100,115,
- 46,99,2,0,0,0,0,0,0,0,2,0,0,0,2,0,
- 0,0,67,0,0,0,115,13,0,0,0,124,1,0,124,0,
- 0,95,0,0,100,0,0,83,41,1,78,41,1,114,178,0,
- 0,0,41,2,114,71,0,0,0,114,178,0,0,0,114,4,
- 0,0,0,114,4,0,0,0,114,5,0,0,0,114,72,0,
- 0,0,232,3,0,0,115,2,0,0,0,0,1,122,21,95,
- 83,112,101,99,77,101,116,104,111,100,115,46,95,95,105,110,
- 105,116,95,95,99,1,0,0,0,0,0,0,0,3,0,0,
- 0,3,0,0,0,67,0,0,0,115,158,0,0,0,124,0,
- 0,106,0,0,125,1,0,124,1,0,106,1,0,100,1,0,
- 107,8,0,114,30,0,100,2,0,110,6,0,124,1,0,106,
- 1,0,125,2,0,124,1,0,106,2,0,100,1,0,107,8,
- 0,114,104,0,124,1,0,106,3,0,100,1,0,107,8,0,
- 114,82,0,100,3,0,106,4,0,124,2,0,131,1,0,83,
- 100,4,0,106,4,0,124,2,0,124,1,0,106,3,0,131,
- 2,0,83,110,50,0,124,1,0,106,5,0,114,132,0,100,
- 5,0,106,4,0,124,2,0,124,1,0,106,2,0,131,2,
- 0,83,100,6,0,106,4,0,124,1,0,106,1,0,124,1,
- 0,106,2,0,131,2,0,83,100,1,0,83,41,7,122,38,
- 82,101,116,117,114,110,32,116,104,101,32,114,101,112,114,32,
- 116,111,32,117,115,101,32,102,111,114,32,116,104,101,32,109,
- 111,100,117,108,101,46,78,114,207,0,0,0,122,13,60,109,
- 111,100,117,108,101,32,123,33,114,125,62,122,20,60,109,111,
- 100,117,108,101,32,123,33,114,125,32,40,123,33,114,125,41,
- 62,122,23,60,109,111,100,117,108,101,32,123,33,114,125,32,
- 102,114,111,109,32,123,33,114,125,62,122,18,60,109,111,100,
- 117,108,101,32,123,33,114,125,32,40,123,125,41,62,41,6,
- 114,178,0,0,0,114,67,0,0,0,114,218,0,0,0,114,
- 170,0,0,0,114,47,0,0,0,114,227,0,0,0,41,3,
- 114,71,0,0,0,114,178,0,0,0,114,67,0,0,0,114,
- 4,0,0,0,114,4,0,0,0,114,5,0,0,0,114,206,
- 0,0,0,235,3,0,0,115,18,0,0,0,0,3,9,1,
- 30,1,15,1,15,1,13,2,22,2,9,1,19,2,122,24,
- 95,83,112,101,99,77,101,116,104,111,100,115,46,109,111,100,
- 117,108,101,95,114,101,112,114,218,9,95,111,118,101,114,114,
- 105,100,101,70,218,11,95,102,111,114,99,101,95,110,97,109,
- 101,84,99,2,0,0,0,2,0,0,0,6,0,0,0,59,
- 0,0,0,67,0,0,0,115,75,2,0,0,124,0,0,106,
- 0,0,125,4,0,124,2,0,115,45,0,124,3,0,115,45,
- 0,116,1,0,124,1,0,100,1,0,100,2,0,131,3,0,
- 100,2,0,107,8,0,114,85,0,121,16,0,124,4,0,106,
- 2,0,124,1,0,95,3,0,87,113,85,0,4,116,4,0,
- 107,10,0,114,81,0,1,1,1,89,113,85,0,88,110,0,
- 0,124,2,0,115,115,0,116,1,0,124,1,0,100,3,0,
- 100,2,0,131,3,0,100,2,0,107,8,0,114,221,0,124,
- 4,0,106,5,0,125,5,0,124,5,0,100,2,0,107,8,
- 0,114,184,0,124,4,0,106,6,0,100,2,0,107,9,0,
- 114,184,0,116,7,0,106,8,0,116,7,0,131,1,0,125,
- 5,0,124,4,0,106,6,0,124,5,0,95,9,0,113,184,
- 0,110,0,0,121,13,0,124,5,0,124,1,0,95,10,0,
- 87,113,221,0,4,116,4,0,107,10,0,114,217,0,1,1,
- 1,89,113,221,0,88,110,0,0,124,2,0,115,251,0,116,
- 1,0,124,1,0,100,4,0,100,2,0,131,3,0,100,2,
- 0,107,8,0,114,35,1,121,16,0,124,4,0,106,11,0,
- 124,1,0,95,12,0,87,113,35,1,4,116,4,0,107,10,
- 0,114,31,1,1,1,1,89,113,35,1,88,110,0,0,121,
- 13,0,124,4,0,124,1,0,95,13,0,87,110,18,0,4,
- 116,4,0,107,10,0,114,68,1,1,1,1,89,110,1,0,
- 88,124,2,0,115,99,1,116,1,0,124,1,0,100,5,0,
- 100,2,0,131,3,0,100,2,0,107,8,0,114,157,1,124,
- 4,0,106,6,0,100,2,0,107,9,0,114,157,1,121,16,
- 0,124,4,0,106,6,0,124,1,0,95,14,0,87,113,154,
- 1,4,116,4,0,107,10,0,114,150,1,1,1,1,89,113,
- 154,1,88,113,157,1,110,0,0,124,4,0,106,15,0,114,
- 71,2,124,2,0,115,196,1,116,1,0,124,1,0,100,6,
- 0,100,2,0,131,3,0,100,2,0,107,8,0,114,236,1,
- 121,16,0,124,4,0,106,16,0,124,1,0,95,17,0,87,
- 113,236,1,4,116,4,0,107,10,0,114,232,1,1,1,1,
- 89,113,236,1,88,110,0,0,124,2,0,115,10,2,116,1,
- 0,124,1,0,100,7,0,100,2,0,131,3,0,100,2,0,
- 107,8,0,114,71,2,124,4,0,106,18,0,100,2,0,107,
- 9,0,114,68,2,121,16,0,124,4,0,106,18,0,124,1,
- 0,95,19,0,87,113,65,2,4,116,4,0,107,10,0,114,
- 61,2,1,1,1,89,113,65,2,88,113,68,2,113,71,2,
- 110,0,0,100,2,0,83,41,8,97,29,2,0,0,83,101,
- 116,32,116,104,101,32,109,111,100,117,108,101,39,115,32,97,
- 116,116,114,105,98,117,116,101,115,46,10,10,32,32,32,32,
- 32,32,32,32,65,108,108,32,109,105,115,115,105,110,103,32,
- 105,109,112,111,114,116,45,114,101,108,97,116,101,100,32,109,
- 111,100,117,108,101,32,97,116,116,114,105,98,117,116,101,115,
- 32,119,105,108,108,32,98,101,32,115,101,116,46,32,32,72,
- 101,114,101,10,32,32,32,32,32,32,32,32,105,115,32,104,
- 111,119,32,116,104,101,32,115,112,101,99,32,97,116,116,114,
- 105,98,117,116,101,115,32,109,97,112,32,111,110,116,111,32,
- 116,104,101,32,109,111,100,117,108,101,58,10,10,32,32,32,
- 32,32,32,32,32,115,112,101,99,46,110,97,109,101,32,45,
- 62,32,109,111,100,117,108,101,46,95,95,110,97,109,101,95,
- 95,10,32,32,32,32,32,32,32,32,115,112,101,99,46,108,
- 111,97,100,101,114,32,45,62,32,109,111,100,117,108,101,46,
- 95,95,108,111,97,100,101,114,95,95,10,32,32,32,32,32,
- 32,32,32,115,112,101,99,46,112,97,114,101,110,116,32,45,
- 62,32,109,111,100,117,108,101,46,95,95,112,97,99,107,97,
- 103,101,95,95,10,32,32,32,32,32,32,32,32,115,112,101,
- 99,32,45,62,32,109,111,100,117,108,101,46,95,95,115,112,
- 101,99,95,95,10,10,32,32,32,32,32,32,32,32,79,112,
- 116,105,111,110,97,108,58,10,32,32,32,32,32,32,32,32,
- 115,112,101,99,46,111,114,105,103,105,110,32,45,62,32,109,
- 111,100,117,108,101,46,95,95,102,105,108,101,95,95,32,40,
- 105,102,32,115,112,101,99,46,115,101,116,95,102,105,108,101,
- 97,116,116,114,32,105,115,32,116,114,117,101,41,10,32,32,
- 32,32,32,32,32,32,115,112,101,99,46,99,97,99,104,101,
- 100,32,45,62,32,109,111,100,117,108,101,46,95,95,99,97,
- 99,104,101,100,95,95,32,40,105,102,32,95,95,102,105,108,
- 101,95,95,32,97,108,115,111,32,115,101,116,41,10,32,32,
- 32,32,32,32,32,32,115,112,101,99,46,115,117,98,109,111,
- 100,117,108,101,95,115,101,97,114,99,104,95,108,111,99,97,
- 116,105,111,110,115,32,45,62,32,109,111,100,117,108,101,46,
- 95,95,112,97,116,104,95,95,32,40,105,102,32,115,101,116,
- 41,10,10,32,32,32,32,32,32,32,32,114,57,0,0,0,
- 78,114,205,0,0,0,218,11,95,95,112,97,99,107,97,103,
- 101,95,95,114,247,0,0,0,114,211,0,0,0,114,245,0,
- 0,0,41,20,114,178,0,0,0,114,62,0,0,0,114,67,
- 0,0,0,114,57,0,0,0,114,210,0,0,0,114,170,0,
- 0,0,114,221,0,0,0,218,16,95,78,97,109,101,115,112,
- 97,99,101,76,111,97,100,101,114,218,7,95,95,110,101,119,
- 95,95,218,5,95,112,97,116,104,114,205,0,0,0,114,234,
- 0,0,0,114,251,0,0,0,114,209,0,0,0,114,247,0,
- 0,0,114,227,0,0,0,114,218,0,0,0,114,211,0,0,
- 0,114,226,0,0,0,114,245,0,0,0,41,6,114,71,0,
- 0,0,114,180,0,0,0,114,249,0,0,0,114,250,0,0,
- 0,114,178,0,0,0,114,170,0,0,0,114,4,0,0,0,
- 114,4,0,0,0,114,5,0,0,0,218,17,105,110,105,116,
- 95,109,111,100,117,108,101,95,97,116,116,114,115,251,3,0,
- 0,115,88,0,0,0,0,17,9,6,12,1,24,1,3,1,
- 16,1,13,1,8,3,30,1,9,1,12,2,15,1,15,1,
- 18,1,3,1,13,1,13,1,8,3,30,1,3,1,16,1,
- 13,1,8,3,3,1,13,1,13,1,5,3,30,1,15,1,
- 3,1,16,1,13,1,11,2,9,2,30,1,3,1,16,1,
- 13,1,8,3,30,1,15,1,3,1,16,1,13,1,122,30,
- 95,83,112,101,99,77,101,116,104,111,100,115,46,105,110,105,
- 116,95,109,111,100,117,108,101,95,97,116,116,114,115,99,1,
- 0,0,0,0,0,0,0,3,0,0,0,3,0,0,0,67,
- 0,0,0,115,101,0,0,0,124,0,0,106,0,0,125,1,
- 0,116,1,0,124,1,0,106,2,0,100,1,0,131,2,0,
- 114,48,0,124,1,0,106,2,0,106,3,0,124,1,0,131,
- 1,0,125,2,0,110,6,0,100,2,0,125,2,0,124,2,
- 0,100,2,0,107,8,0,114,84,0,116,4,0,124,1,0,
- 106,5,0,131,1,0,125,2,0,110,0,0,124,0,0,106,
- 6,0,124,2,0,131,1,0,1,124,2,0,83,41,3,122,
- 153,82,101,116,117,114,110,32,97,32,110,101,119,32,109,111,
- 100,117,108,101,32,116,111,32,98,101,32,108,111,97,100,101,
- 100,46,10,10,32,32,32,32,32,32,32,32,84,104,101,32,
- 105,109,112,111,114,116,45,114,101,108,97,116,101,100,32,109,
- 111,100,117,108,101,32,97,116,116,114,105,98,117,116,101,115,
- 32,97,114,101,32,97,108,115,111,32,115,101,116,32,119,105,
- 116,104,32,116,104,101,10,32,32,32,32,32,32,32,32,97,
- 112,112,114,111,112,114,105,97,116,101,32,118,97,108,117,101,
- 115,32,102,114,111,109,32,116,104,101,32,115,112,101,99,46,
- 10,10,32,32,32,32,32,32,32,32,218,13,99,114,101,97,
- 116,101,95,109,111,100,117,108,101,78,41,7,114,178,0,0,
- 0,114,60,0,0,0,114,170,0,0,0,114,0,1,0,0,
- 114,68,0,0,0,114,67,0,0,0,114,255,0,0,0,41,
- 3,114,71,0,0,0,114,178,0,0,0,114,180,0,0,0,
- 114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,218,
- 6,99,114,101,97,116,101,75,4,0,0,115,16,0,0,0,
- 0,7,9,2,18,3,21,2,6,1,12,4,18,1,13,1,
- 122,19,95,83,112,101,99,77,101,116,104,111,100,115,46,99,
- 114,101,97,116,101,99,2,0,0,0,0,0,0,0,2,0,
- 0,0,2,0,0,0,67,0,0,0,115,23,0,0,0,124,
- 0,0,106,0,0,106,1,0,106,2,0,124,1,0,131,1,
- 0,1,100,1,0,83,41,2,122,189,68,111,32,101,118,101,
- 114,121,116,104,105,110,103,32,110,101,99,101,115,115,97,114,
- 121,32,116,111,32,101,120,101,99,117,116,101,32,116,104,101,
- 32,109,111,100,117,108,101,46,10,10,32,32,32,32,32,32,
- 32,32,84,104,101,32,110,97,109,101,115,112,97,99,101,32,
- 111,102,32,96,109,111,100,117,108,101,96,32,105,115,32,117,
- 115,101,100,32,97,115,32,116,104,101,32,116,97,114,103,101,
- 116,32,111,102,32,101,120,101,99,117,116,105,111,110,46,10,
- 32,32,32,32,32,32,32,32,84,104,105,115,32,109,101,116,
- 104,111,100,32,117,115,101,115,32,116,104,101,32,108,111,97,
- 100,101,114,39,115,32,96,101,120,101,99,95,109,111,100,117,
- 108,101,40,41,96,32,109,101,116,104,111,100,46,10,10,32,
- 32,32,32,32,32,32,32,78,41,3,114,178,0,0,0,114,
- 170,0,0,0,218,11,101,120,101,99,95,109,111,100,117,108,
- 101,41,2,114,71,0,0,0,114,180,0,0,0,114,4,0,
- 0,0,114,4,0,0,0,114,5,0,0,0,218,5,95,101,
- 120,101,99,98,4,0,0,115,2,0,0,0,0,7,122,18,
- 95,83,112,101,99,77,101,116,104,111,100,115,46,95,101,120,
- 101,99,99,2,0,0,0,0,0,0,0,4,0,0,0,11,
- 0,0,0,67,0,0,0,115,17,1,0,0,124,0,0,106,
- 0,0,106,1,0,125,2,0,116,2,0,106,3,0,131,0,
- 0,1,116,4,0,124,2,0,131,1,0,143,226,0,1,116,
- 5,0,106,6,0,106,7,0,124,2,0,131,1,0,124,1,
- 0,107,9,0,114,95,0,100,1,0,106,8,0,124,2,0,
- 131,1,0,125,3,0,116,9,0,124,3,0,100,2,0,124,
- 2,0,131,1,1,130,1,0,110,0,0,124,0,0,106,0,
- 0,106,10,0,100,3,0,107,8,0,114,181,0,124,0,0,
- 106,0,0,106,11,0,100,3,0,107,8,0,114,158,0,116,
- 9,0,100,4,0,100,2,0,124,0,0,106,0,0,106,1,
- 0,131,1,1,130,1,0,110,0,0,124,0,0,106,12,0,
- 124,1,0,100,5,0,100,6,0,131,1,1,1,124,1,0,
- 83,124,0,0,106,12,0,124,1,0,100,5,0,100,6,0,
- 131,1,1,1,116,13,0,124,0,0,106,0,0,106,10,0,
- 100,7,0,131,2,0,115,243,0,124,0,0,106,0,0,106,
- 10,0,106,14,0,124,2,0,131,1,0,1,110,13,0,124,
- 0,0,106,15,0,124,1,0,131,1,0,1,87,100,3,0,
- 81,88,116,5,0,106,6,0,124,2,0,25,83,41,8,122,
- 51,69,120,101,99,117,116,101,32,116,104,101,32,115,112,101,
- 99,32,105,110,32,97,110,32,101,120,105,115,116,105,110,103,
- 32,109,111,100,117,108,101,39,115,32,110,97,109,101,115,112,
- 97,99,101,46,122,30,109,111,100,117,108,101,32,123,33,114,
- 125,32,110,111,116,32,105,110,32,115,121,115,46,109,111,100,
- 117,108,101,115,114,67,0,0,0,78,122,14,109,105,115,115,
- 105,110,103,32,108,111,97,100,101,114,114,249,0,0,0,84,
- 114,2,1,0,0,41,16,114,178,0,0,0,114,67,0,0,
- 0,114,106,0,0,0,218,12,97,99,113,117,105,114,101,95,
- 108,111,99,107,114,103,0,0,0,114,7,0,0,0,114,73,
- 0,0,0,114,93,0,0,0,114,47,0,0,0,114,154,0,
- 0,0,114,170,0,0,0,114,221,0,0,0,114,255,0,0,
- 0,114,60,0,0,0,218,11,108,111,97,100,95,109,111,100,
- 117,108,101,114,3,1,0,0,41,4,114,71,0,0,0,114,
- 180,0,0,0,114,67,0,0,0,114,172,0,0,0,114,4,
- 0,0,0,114,4,0,0,0,114,5,0,0,0,114,176,0,
- 0,0,108,4,0,0,115,32,0,0,0,0,2,12,1,10,
- 1,13,1,24,1,15,1,21,1,18,1,18,1,27,2,19,
- 1,4,1,19,1,21,4,22,2,19,1,122,17,95,83,112,
- 101,99,77,101,116,104,111,100,115,46,101,120,101,99,99,1,
- 0,0,0,0,0,0,0,3,0,0,0,27,0,0,0,67,
- 0,0,0,115,24,1,0,0,124,0,0,106,0,0,125,1,
- 0,124,1,0,106,1,0,106,2,0,124,1,0,106,3,0,
- 131,1,0,1,116,4,0,106,5,0,124,1,0,106,3,0,
- 25,125,2,0,116,6,0,124,2,0,100,1,0,100,0,0,
- 131,3,0,100,0,0,107,8,0,114,108,0,121,16,0,124,
- 1,0,106,1,0,124,2,0,95,7,0,87,113,108,0,4,
- 116,8,0,107,10,0,114,104,0,1,1,1,89,113,108,0,
- 88,110,0,0,116,6,0,124,2,0,100,2,0,100,0,0,
- 131,3,0,100,0,0,107,8,0,114,215,0,121,59,0,124,
- 2,0,106,9,0,124,2,0,95,10,0,116,11,0,124,2,
- 0,100,3,0,131,2,0,115,190,0,124,1,0,106,3,0,
- 106,12,0,100,4,0,131,1,0,100,5,0,25,124,2,0,
- 95,10,0,110,0,0,87,113,215,0,4,116,8,0,107,10,
- 0,114,211,0,1,1,1,89,113,215,0,88,110,0,0,116,
- 6,0,124,2,0,100,6,0,100,0,0,131,3,0,100,0,
- 0,107,8,0,114,20,1,121,13,0,124,1,0,124,2,0,
- 95,13,0,87,113,20,1,4,116,8,0,107,10,0,114,16,
- 1,1,1,1,89,113,20,1,88,110,0,0,124,2,0,83,
- 41,7,78,114,205,0,0,0,114,251,0,0,0,114,247,0,
- 0,0,114,116,0,0,0,114,84,0,0,0,114,209,0,0,
- 0,41,14,114,178,0,0,0,114,170,0,0,0,114,5,1,
- 0,0,114,67,0,0,0,114,7,0,0,0,114,73,0,0,
- 0,114,62,0,0,0,114,205,0,0,0,114,210,0,0,0,
- 114,57,0,0,0,114,251,0,0,0,114,60,0,0,0,114,
- 32,0,0,0,114,209,0,0,0,41,3,114,71,0,0,0,
- 114,178,0,0,0,114,180,0,0,0,114,4,0,0,0,114,
- 4,0,0,0,114,5,0,0,0,218,25,95,108,111,97,100,
- 95,98,97,99,107,119,97,114,100,95,99,111,109,112,97,116,
- 105,98,108,101,132,4,0,0,115,42,0,0,0,0,4,9,
- 1,19,2,16,1,24,1,3,1,16,1,13,1,8,1,24,
- 1,3,4,12,1,15,1,32,1,13,1,8,1,24,1,3,
- 1,13,1,13,1,8,1,122,38,95,83,112,101,99,77,101,
- 116,104,111,100,115,46,95,108,111,97,100,95,98,97,99,107,
- 119,97,114,100,95,99,111,109,112,97,116,105,98,108,101,99,
- 1,0,0,0,0,0,0,0,2,0,0,0,11,0,0,0,
- 67,0,0,0,115,179,0,0,0,124,0,0,106,0,0,106,
- 1,0,100,0,0,107,9,0,114,52,0,116,2,0,124,0,
- 0,106,0,0,106,1,0,100,1,0,131,2,0,115,52,0,
- 124,0,0,106,3,0,131,0,0,83,110,0,0,124,0,0,
- 106,4,0,131,0,0,125,1,0,116,5,0,124,1,0,131,
- 1,0,143,84,0,1,124,0,0,106,0,0,106,1,0,100,
- 0,0,107,8,0,114,143,0,124,0,0,106,0,0,106,6,
- 0,100,0,0,107,8,0,114,156,0,116,7,0,100,2,0,
- 100,3,0,124,0,0,106,0,0,106,8,0,131,1,1,130,
- 1,0,113,156,0,110,13,0,124,0,0,106,9,0,124,1,
- 0,131,1,0,1,87,100,0,0,81,88,116,10,0,106,11,
- 0,124,0,0,106,0,0,106,8,0,25,83,41,4,78,114,
- 2,1,0,0,122,14,109,105,115,115,105,110,103,32,108,111,
- 97,100,101,114,114,67,0,0,0,41,12,114,178,0,0,0,
- 114,170,0,0,0,114,60,0,0,0,114,6,1,0,0,114,
- 1,1,0,0,114,213,0,0,0,114,221,0,0,0,114,154,
- 0,0,0,114,67,0,0,0,114,3,1,0,0,114,7,0,
- 0,0,114,73,0,0,0,41,2,114,71,0,0,0,114,180,
- 0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,
- 0,0,218,14,95,108,111,97,100,95,117,110,108,111,99,107,
- 101,100,162,4,0,0,115,20,0,0,0,0,2,18,2,21,
- 1,13,2,12,1,13,1,18,1,18,1,30,3,19,5,122,
- 27,95,83,112,101,99,77,101,116,104,111,100,115,46,95,108,
- 111,97,100,95,117,110,108,111,99,107,101,100,99,1,0,0,
- 0,0,0,0,0,1,0,0,0,8,0,0,0,67,0,0,
- 0,115,49,0,0,0,116,0,0,106,1,0,131,0,0,1,
- 116,2,0,124,0,0,106,3,0,106,4,0,131,1,0,143,
- 15,0,1,124,0,0,106,5,0,131,0,0,83,87,100,1,
- 0,81,88,100,1,0,83,41,2,122,207,82,101,116,117,114,
- 110,32,97,32,110,101,119,32,109,111,100,117,108,101,32,111,
- 98,106,101,99,116,44,32,108,111,97,100,101,100,32,98,121,
- 32,116,104,101,32,115,112,101,99,39,115,32,108,111,97,100,
- 101,114,46,10,10,32,32,32,32,32,32,32,32,84,104,101,
- 32,109,111,100,117,108,101,32,105,115,32,110,111,116,32,97,
- 100,100,101,100,32,116,111,32,105,116,115,32,112,97,114,101,
- 110,116,46,10,10,32,32,32,32,32,32,32,32,73,102,32,
- 97,32,109,111,100,117,108,101,32,105,115,32,97,108,114,101,
- 97,100,121,32,105,110,32,115,121,115,46,109,111,100,117,108,
- 101,115,44,32,116,104,97,116,32,101,120,105,115,116,105,110,
- 103,32,109,111,100,117,108,101,32,103,101,116,115,10,32,32,
- 32,32,32,32,32,32,99,108,111,98,98,101,114,101,100,46,
- 10,10,32,32,32,32,32,32,32,32,78,41,6,114,106,0,
- 0,0,114,4,1,0,0,114,103,0,0,0,114,178,0,0,
- 0,114,67,0,0,0,114,7,1,0,0,41,1,114,71,0,
- 0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,
- 0,114,177,0,0,0,185,4,0,0,115,6,0,0,0,0,
- 9,10,1,19,1,122,17,95,83,112,101,99,77,101,116,104,
- 111,100,115,46,108,111,97,100,78,41,13,114,57,0,0,0,
- 114,56,0,0,0,114,58,0,0,0,114,59,0,0,0,114,
- 72,0,0,0,114,206,0,0,0,114,255,0,0,0,114,1,
- 1,0,0,114,3,1,0,0,114,176,0,0,0,114,6,1,
- 0,0,114,7,1,0,0,114,177,0,0,0,114,4,0,0,
- 0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,
- 114,175,0,0,0,225,3,0,0,115,20,0,0,0,12,3,
- 6,4,12,3,12,16,24,80,12,23,12,10,12,24,12,30,
- 12,23,114,175,0,0,0,99,4,0,0,0,0,0,0,0,
- 6,0,0,0,11,0,0,0,67,0,0,0,115,201,0,0,
- 0,124,0,0,106,0,0,100,1,0,131,1,0,125,4,0,
- 124,0,0,106,0,0,100,2,0,131,1,0,125,5,0,124,
- 4,0,115,102,0,124,5,0,114,54,0,124,5,0,106,1,
- 0,125,4,0,113,102,0,124,2,0,124,3,0,107,2,0,
- 114,84,0,116,2,0,124,1,0,124,2,0,131,2,0,125,
- 4,0,113,102,0,116,3,0,124,1,0,124,2,0,131,2,
- 0,125,4,0,110,0,0,124,5,0,115,132,0,116,4,0,
- 124,1,0,124,2,0,100,3,0,124,4,0,131,2,1,125,
- 5,0,110,0,0,121,44,0,124,5,0,124,0,0,100,2,
- 0,60,124,4,0,124,0,0,100,1,0,60,124,2,0,124,
- 0,0,100,4,0,60,124,3,0,124,0,0,100,5,0,60,
- 87,110,18,0,4,116,5,0,107,10,0,114,196,0,1,1,
- 1,89,110,1,0,88,100,0,0,83,41,6,78,114,205,0,
- 0,0,114,209,0,0,0,114,170,0,0,0,114,211,0,0,
- 0,114,245,0,0,0,41,6,114,93,0,0,0,114,170,0,
- 0,0,218,20,83,111,117,114,99,101,108,101,115,115,70,105,
- 108,101,76,111,97,100,101,114,218,16,83,111,117,114,99,101,
- 70,105,108,101,76,111,97,100,101,114,114,240,0,0,0,114,
- 208,0,0,0,41,6,90,2,110,115,114,67,0,0,0,90,
- 8,112,97,116,104,110,97,109,101,90,9,99,112,97,116,104,
- 110,97,109,101,114,170,0,0,0,114,178,0,0,0,114,4,
- 0,0,0,114,4,0,0,0,114,5,0,0,0,218,14,95,
- 102,105,120,95,117,112,95,109,111,100,117,108,101,199,4,0,
- 0,115,34,0,0,0,0,2,15,1,15,1,6,1,6,1,
- 12,1,12,1,18,2,18,1,6,1,24,1,3,1,10,1,
- 10,1,10,1,14,1,13,2,114,10,1,0,0,99,0,0,
- 0,0,0,0,0,0,0,0,0,0,5,0,0,0,64,0,
- 0,0,115,181,0,0,0,101,0,0,90,1,0,100,0,0,
- 90,2,0,100,1,0,90,3,0,101,4,0,100,2,0,100,
- 3,0,132,0,0,131,1,0,90,5,0,101,6,0,100,4,
- 0,100,4,0,100,5,0,100,6,0,132,2,0,131,1,0,
- 90,7,0,101,6,0,100,4,0,100,7,0,100,8,0,132,
- 1,0,131,1,0,90,8,0,101,6,0,101,9,0,100,9,
- 0,100,10,0,132,0,0,131,1,0,131,1,0,90,10,0,
- 101,6,0,101,9,0,100,11,0,100,12,0,132,0,0,131,
- 1,0,131,1,0,90,11,0,101,6,0,101,9,0,100,13,
- 0,100,14,0,132,0,0,131,1,0,131,1,0,90,12,0,
- 101,6,0,101,9,0,100,15,0,100,16,0,132,0,0,131,
- 1,0,131,1,0,90,13,0,100,4,0,83,41,17,218,15,
- 66,117,105,108,116,105,110,73,109,112,111,114,116,101,114,122,
- 144,77,101,116,97,32,112,97,116,104,32,105,109,112,111,114,
- 116,32,102,111,114,32,98,117,105,108,116,45,105,110,32,109,
- 111,100,117,108,101,115,46,10,10,32,32,32,32,65,108,108,
- 32,109,101,116,104,111,100,115,32,97,114,101,32,101,105,116,
- 104,101,114,32,99,108,97,115,115,32,111,114,32,115,116,97,
- 116,105,99,32,109,101,116,104,111,100,115,32,116,111,32,97,
- 118,111,105,100,32,116,104,101,32,110,101,101,100,32,116,111,
- 10,32,32,32,32,105,110,115,116,97,110,116,105,97,116,101,
- 32,116,104,101,32,99,108,97,115,115,46,10,10,32,32,32,
- 32,99,1,0,0,0,0,0,0,0,1,0,0,0,2,0,
- 0,0,67,0,0,0,115,16,0,0,0,100,1,0,106,0,
- 0,124,0,0,106,1,0,131,1,0,83,41,2,122,115,82,
- 101,116,117,114,110,32,114,101,112,114,32,102,111,114,32,116,
- 104,101,32,109,111,100,117,108,101,46,10,10,32,32,32,32,
- 32,32,32,32,84,104,101,32,109,101,116,104,111,100,32,105,
- 115,32,100,101,112,114,101,99,97,116,101,100,46,32,32,84,
- 104,101,32,105,109,112,111,114,116,32,109,97,99,104,105,110,
- 101,114,121,32,100,111,101,115,32,116,104,101,32,106,111,98,
- 32,105,116,115,101,108,102,46,10,10,32,32,32,32,32,32,
- 32,32,122,24,60,109,111,100,117,108,101,32,123,33,114,125,
- 32,40,98,117,105,108,116,45,105,110,41,62,41,2,114,47,
- 0,0,0,114,57,0,0,0,41,1,114,180,0,0,0,114,
- 4,0,0,0,114,4,0,0,0,114,5,0,0,0,114,206,
- 0,0,0,233,4,0,0,115,2,0,0,0,0,7,122,27,
- 66,117,105,108,116,105,110,73,109,112,111,114,116,101,114,46,
- 109,111,100,117,108,101,95,114,101,112,114,78,99,4,0,0,
- 0,0,0,0,0,4,0,0,0,5,0,0,0,67,0,0,
- 0,115,58,0,0,0,124,2,0,100,0,0,107,9,0,114,
- 16,0,100,0,0,83,116,0,0,106,1,0,124,1,0,131,
- 1,0,114,50,0,116,2,0,124,1,0,124,0,0,100,1,
- 0,100,2,0,131,2,1,83,100,0,0,83,100,0,0,83,
- 41,3,78,114,218,0,0,0,122,8,98,117,105,108,116,45,
- 105,110,41,3,114,106,0,0,0,90,10,105,115,95,98,117,
- 105,108,116,105,110,114,174,0,0,0,41,4,218,3,99,108,
- 115,114,159,0,0,0,114,35,0,0,0,218,6,116,97,114,
- 103,101,116,114,4,0,0,0,114,4,0,0,0,114,5,0,
- 0,0,218,9,102,105,110,100,95,115,112,101,99,242,4,0,
- 0,115,10,0,0,0,0,2,12,1,4,1,15,1,19,2,
- 122,25,66,117,105,108,116,105,110,73,109,112,111,114,116,101,
- 114,46,102,105,110,100,95,115,112,101,99,99,3,0,0,0,
- 0,0,0,0,4,0,0,0,3,0,0,0,67,0,0,0,
- 115,41,0,0,0,124,0,0,106,0,0,124,1,0,124,2,
- 0,131,2,0,125,3,0,124,3,0,100,1,0,107,9,0,
- 114,37,0,124,3,0,106,1,0,83,100,1,0,83,41,2,
- 122,175,70,105,110,100,32,116,104,101,32,98,117,105,108,116,
- 45,105,110,32,109,111,100,117,108,101,46,10,10,32,32,32,
- 32,32,32,32,32,73,102,32,39,112,97,116,104,39,32,105,
- 115,32,101,118,101,114,32,115,112,101,99,105,102,105,101,100,
- 32,116,104,101,110,32,116,104,101,32,115,101,97,114,99,104,
- 32,105,115,32,99,111,110,115,105,100,101,114,101,100,32,97,
- 32,102,97,105,108,117,114,101,46,10,10,32,32,32,32,32,
- 32,32,32,84,104,105,115,32,109,101,116,104,111,100,32,105,
- 115,32,100,101,112,114,101,99,97,116,101,100,46,32,32,85,
- 115,101,32,102,105,110,100,95,115,112,101,99,40,41,32,105,
- 110,115,116,101,97,100,46,10,10,32,32,32,32,32,32,32,
- 32,78,41,2,114,14,1,0,0,114,170,0,0,0,41,4,
- 114,12,1,0,0,114,159,0,0,0,114,35,0,0,0,114,
- 178,0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,
- 0,0,0,218,11,102,105,110,100,95,109,111,100,117,108,101,
- 251,4,0,0,115,4,0,0,0,0,9,18,1,122,27,66,
- 117,105,108,116,105,110,73,109,112,111,114,116,101,114,46,102,
- 105,110,100,95,109,111,100,117,108,101,99,2,0,0,0,0,
- 0,0,0,3,0,0,0,10,0,0,0,67,0,0,0,115,
- 59,0,0,0,116,0,0,124,1,0,131,1,0,143,23,0,
- 1,116,1,0,116,2,0,106,3,0,124,1,0,131,2,0,
- 125,2,0,87,100,1,0,81,88,124,0,0,124,2,0,95,
- 4,0,100,2,0,124,2,0,95,5,0,124,2,0,83,41,
- 3,122,23,76,111,97,100,32,97,32,98,117,105,108,116,45,
- 105,110,32,109,111,100,117,108,101,46,78,114,30,0,0,0,
- 41,6,114,69,0,0,0,114,114,0,0,0,114,106,0,0,
- 0,90,12,105,110,105,116,95,98,117,105,108,116,105,110,114,
- 205,0,0,0,114,251,0,0,0,41,3,114,12,1,0,0,
- 114,159,0,0,0,114,180,0,0,0,114,4,0,0,0,114,
- 4,0,0,0,114,5,0,0,0,114,5,1,0,0,7,5,
- 0,0,115,10,0,0,0,0,6,13,1,24,1,9,1,9,
- 1,122,27,66,117,105,108,116,105,110,73,109,112,111,114,116,
- 101,114,46,108,111,97,100,95,109,111,100,117,108,101,99,2,
+ 4,0,124,1,0,100,0,0,107,8,0,114,105,0,121,13,
+ 0,124,0,0,106,3,0,125,1,0,87,110,18,0,4,116,
+ 1,0,107,10,0,114,104,0,1,1,1,89,110,1,0,88,
+ 121,13,0,124,0,0,106,4,0,125,5,0,87,110,24,0,
+ 4,116,1,0,107,10,0,114,144,0,1,1,1,100,0,0,
+ 125,5,0,89,110,1,0,88,124,2,0,100,0,0,107,8,
+ 0,114,218,0,124,5,0,100,0,0,107,8,0,114,212,0,
+ 121,13,0,124,1,0,106,5,0,125,2,0,87,113,218,0,
+ 4,116,1,0,107,10,0,114,208,0,1,1,1,100,0,0,
+ 125,2,0,89,113,218,0,88,110,6,0,124,5,0,125,2,
+ 0,121,13,0,124,0,0,106,6,0,125,6,0,87,110,24,
+ 0,4,116,1,0,107,10,0,114,1,1,1,1,1,100,0,
+ 0,125,6,0,89,110,1,0,88,121,19,0,116,7,0,124,
+ 0,0,106,8,0,131,1,0,125,7,0,87,110,24,0,4,
+ 116,1,0,107,10,0,114,47,1,1,1,1,100,0,0,125,
+ 7,0,89,110,1,0,88,116,9,0,124,4,0,124,1,0,
+ 100,1,0,124,2,0,131,2,1,125,3,0,124,5,0,100,
+ 0,0,107,8,0,114,87,1,100,2,0,110,3,0,100,3,
+ 0,124,3,0,95,10,0,124,6,0,124,3,0,95,11,0,
+ 124,7,0,124,3,0,95,12,0,124,3,0,83,41,4,78,
+ 114,107,0,0,0,70,84,41,13,114,95,0,0,0,114,96,
+ 0,0,0,114,1,0,0,0,114,91,0,0,0,114,98,0,
+ 0,0,90,7,95,79,82,73,71,73,78,218,10,95,95,99,
+ 97,99,104,101,100,95,95,218,4,108,105,115,116,218,8,95,
+ 95,112,97,116,104,95,95,114,106,0,0,0,114,111,0,0,
+ 0,114,116,0,0,0,114,110,0,0,0,41,8,114,89,0,
+ 0,0,114,99,0,0,0,114,107,0,0,0,114,88,0,0,
+ 0,114,15,0,0,0,90,8,108,111,99,97,116,105,111,110,
+ 114,116,0,0,0,114,110,0,0,0,114,10,0,0,0,114,
+ 10,0,0,0,114,11,0,0,0,218,17,95,115,112,101,99,
+ 95,102,114,111,109,95,109,111,100,117,108,101,209,1,0,0,
+ 115,72,0,0,0,0,2,3,1,13,1,13,1,5,2,12,
+ 1,4,2,9,1,12,1,3,1,13,1,13,2,5,1,3,
+ 1,13,1,13,1,11,1,12,1,12,1,3,1,13,1,13,
+ 1,14,2,6,1,3,1,13,1,13,1,11,1,3,1,19,
+ 1,13,1,11,2,21,1,27,1,9,1,9,1,114,132,0,
+ 0,0,218,8,111,118,101,114,114,105,100,101,70,99,2,0,
+ 0,0,1,0,0,0,5,0,0,0,59,0,0,0,67,0,
+ 0,0,115,54,2,0,0,124,2,0,115,30,0,116,0,0,
+ 124,1,0,100,1,0,100,0,0,131,3,0,100,0,0,107,
+ 8,0,114,67,0,121,16,0,124,0,0,106,1,0,124,1,
+ 0,95,2,0,87,110,18,0,4,116,3,0,107,10,0,114,
+ 66,0,1,1,1,89,110,1,0,88,124,2,0,115,97,0,
+ 116,0,0,124,1,0,100,2,0,100,0,0,131,3,0,100,
+ 0,0,107,8,0,114,221,0,124,0,0,106,4,0,125,3,
+ 0,124,3,0,100,0,0,107,8,0,114,187,0,124,0,0,
+ 106,5,0,100,0,0,107,9,0,114,187,0,116,6,0,100,
+ 0,0,107,8,0,114,151,0,116,7,0,130,1,0,116,6,
+ 0,106,8,0,125,4,0,124,4,0,106,9,0,124,4,0,
+ 131,1,0,125,3,0,124,0,0,106,5,0,124,3,0,95,
+ 10,0,121,13,0,124,3,0,124,1,0,95,11,0,87,110,
+ 18,0,4,116,3,0,107,10,0,114,220,0,1,1,1,89,
+ 110,1,0,88,124,2,0,115,251,0,116,0,0,124,1,0,
+ 100,3,0,100,0,0,131,3,0,100,0,0,107,8,0,114,
+ 32,1,121,16,0,124,0,0,106,12,0,124,1,0,95,13,
+ 0,87,110,18,0,4,116,3,0,107,10,0,114,31,1,1,
+ 1,1,89,110,1,0,88,121,13,0,124,0,0,124,1,0,
+ 95,14,0,87,110,18,0,4,116,3,0,107,10,0,114,65,
+ 1,1,1,1,89,110,1,0,88,124,2,0,115,96,1,116,
+ 0,0,124,1,0,100,4,0,100,0,0,131,3,0,100,0,
+ 0,107,8,0,114,148,1,124,0,0,106,5,0,100,0,0,
+ 107,9,0,114,148,1,121,16,0,124,0,0,106,5,0,124,
+ 1,0,95,15,0,87,110,18,0,4,116,3,0,107,10,0,
+ 114,147,1,1,1,1,89,110,1,0,88,124,0,0,106,16,
+ 0,114,50,2,124,2,0,115,187,1,116,0,0,124,1,0,
+ 100,5,0,100,0,0,131,3,0,100,0,0,107,8,0,114,
+ 224,1,121,16,0,124,0,0,106,17,0,124,1,0,95,18,
+ 0,87,110,18,0,4,116,3,0,107,10,0,114,223,1,1,
+ 1,1,89,110,1,0,88,124,2,0,115,254,1,116,0,0,
+ 124,1,0,100,6,0,100,0,0,131,3,0,100,0,0,107,
+ 8,0,114,50,2,124,0,0,106,19,0,100,0,0,107,9,
+ 0,114,50,2,121,16,0,124,0,0,106,19,0,124,1,0,
+ 95,20,0,87,110,18,0,4,116,3,0,107,10,0,114,49,
+ 2,1,1,1,89,110,1,0,88,124,1,0,83,41,7,78,
+ 114,1,0,0,0,114,91,0,0,0,218,11,95,95,112,97,
+ 99,107,97,103,101,95,95,114,131,0,0,0,114,98,0,0,
+ 0,114,129,0,0,0,41,21,114,6,0,0,0,114,15,0,
+ 0,0,114,1,0,0,0,114,96,0,0,0,114,99,0,0,
+ 0,114,110,0,0,0,114,119,0,0,0,114,120,0,0,0,
+ 218,16,95,78,97,109,101,115,112,97,99,101,76,111,97,100,
+ 101,114,218,7,95,95,110,101,119,95,95,90,5,95,112,97,
+ 116,104,114,91,0,0,0,114,123,0,0,0,114,134,0,0,
+ 0,114,95,0,0,0,114,131,0,0,0,114,117,0,0,0,
+ 114,107,0,0,0,114,98,0,0,0,114,116,0,0,0,114,
+ 129,0,0,0,41,5,114,88,0,0,0,114,89,0,0,0,
+ 114,133,0,0,0,114,99,0,0,0,114,135,0,0,0,114,
+ 10,0,0,0,114,10,0,0,0,114,11,0,0,0,218,18,
+ 95,105,110,105,116,95,109,111,100,117,108,101,95,97,116,116,
+ 114,115,254,1,0,0,115,92,0,0,0,0,4,30,1,3,
+ 1,16,1,13,1,5,2,30,1,9,1,12,2,15,1,12,
+ 1,6,1,9,2,15,1,12,1,3,1,13,1,13,1,5,
+ 2,30,1,3,1,16,1,13,1,5,2,3,1,13,1,13,
+ 1,5,2,30,1,15,1,3,1,16,1,13,1,5,2,9,
+ 1,30,1,3,1,16,1,13,1,5,2,30,1,15,1,3,
+ 1,16,1,13,1,5,1,114,137,0,0,0,99,1,0,0,
+ 0,0,0,0,0,2,0,0,0,5,0,0,0,67,0,0,
+ 0,115,129,0,0,0,100,1,0,125,1,0,116,0,0,124,
+ 0,0,106,1,0,100,2,0,131,2,0,114,45,0,124,0,
+ 0,106,1,0,106,2,0,124,0,0,131,1,0,125,1,0,
+ 110,40,0,116,0,0,124,0,0,106,1,0,100,3,0,131,
+ 2,0,114,85,0,116,3,0,106,4,0,100,4,0,116,5,
+ 0,100,5,0,100,6,0,131,2,1,1,124,1,0,100,1,
+ 0,107,8,0,114,112,0,116,6,0,124,0,0,106,7,0,
+ 131,1,0,125,1,0,116,8,0,124,0,0,124,1,0,131,
+ 2,0,1,124,1,0,83,41,7,122,43,67,114,101,97,116,
+ 101,32,97,32,109,111,100,117,108,101,32,98,97,115,101,100,
+ 32,111,110,32,116,104,101,32,112,114,111,118,105,100,101,100,
+ 32,115,112,101,99,46,78,218,13,99,114,101,97,116,101,95,
+ 109,111,100,117,108,101,218,11,101,120,101,99,95,109,111,100,
+ 117,108,101,122,87,115,116,97,114,116,105,110,103,32,105,110,
+ 32,80,121,116,104,111,110,32,51,46,54,44,32,108,111,97,
+ 100,101,114,115,32,100,101,102,105,110,105,110,103,32,101,120,
+ 101,99,95,109,111,100,117,108,101,40,41,32,109,117,115,116,
+ 32,97,108,115,111,32,100,101,102,105,110,101,32,99,114,101,
+ 97,116,101,95,109,111,100,117,108,101,40,41,90,10,115,116,
+ 97,99,107,108,101,118,101,108,233,2,0,0,0,41,9,114,
+ 4,0,0,0,114,99,0,0,0,114,138,0,0,0,218,9,
+ 95,119,97,114,110,105,110,103,115,218,4,119,97,114,110,218,
+ 18,68,101,112,114,101,99,97,116,105,111,110,87,97,114,110,
+ 105,110,103,114,16,0,0,0,114,15,0,0,0,114,137,0,
+ 0,0,41,2,114,88,0,0,0,114,89,0,0,0,114,10,
+ 0,0,0,114,10,0,0,0,114,11,0,0,0,218,16,109,
+ 111,100,117,108,101,95,102,114,111,109,95,115,112,101,99,58,
+ 2,0,0,115,20,0,0,0,0,3,6,1,18,3,21,1,
+ 18,1,9,2,13,1,12,1,15,1,13,1,114,144,0,0,
+ 0,99,1,0,0,0,0,0,0,0,2,0,0,0,3,0,
+ 0,0,67,0,0,0,115,149,0,0,0,124,0,0,106,0,
+ 0,100,1,0,107,8,0,114,21,0,100,2,0,110,6,0,
+ 124,0,0,106,0,0,125,1,0,124,0,0,106,1,0,100,
+ 1,0,107,8,0,114,95,0,124,0,0,106,2,0,100,1,
+ 0,107,8,0,114,73,0,100,3,0,106,3,0,124,1,0,
+ 131,1,0,83,100,4,0,106,3,0,124,1,0,124,0,0,
+ 106,2,0,131,2,0,83,110,50,0,124,0,0,106,4,0,
+ 114,123,0,100,5,0,106,3,0,124,1,0,124,0,0,106,
+ 1,0,131,2,0,83,100,6,0,106,3,0,124,0,0,106,
+ 0,0,124,0,0,106,1,0,131,2,0,83,100,1,0,83,
+ 41,7,122,38,82,101,116,117,114,110,32,116,104,101,32,114,
+ 101,112,114,32,116,111,32,117,115,101,32,102,111,114,32,116,
+ 104,101,32,109,111,100,117,108,101,46,78,114,93,0,0,0,
+ 122,13,60,109,111,100,117,108,101,32,123,33,114,125,62,122,
+ 20,60,109,111,100,117,108,101,32,123,33,114,125,32,40,123,
+ 33,114,125,41,62,122,23,60,109,111,100,117,108,101,32,123,
+ 33,114,125,32,102,114,111,109,32,123,33,114,125,62,122,18,
+ 60,109,111,100,117,108,101,32,123,33,114,125,32,40,123,125,
+ 41,62,41,5,114,15,0,0,0,114,107,0,0,0,114,99,
+ 0,0,0,114,50,0,0,0,114,117,0,0,0,41,2,114,
+ 88,0,0,0,114,15,0,0,0,114,10,0,0,0,114,10,
+ 0,0,0,114,11,0,0,0,114,97,0,0,0,76,2,0,
+ 0,115,16,0,0,0,0,3,30,1,15,1,15,1,13,2,
+ 22,2,9,1,19,2,114,97,0,0,0,99,2,0,0,0,
+ 0,0,0,0,4,0,0,0,12,0,0,0,67,0,0,0,
+ 115,253,0,0,0,124,0,0,106,0,0,125,2,0,116,1,
+ 0,106,2,0,131,0,0,1,116,3,0,124,2,0,131,1,
+ 0,143,208,0,1,116,4,0,106,5,0,106,6,0,124,2,
+ 0,131,1,0,124,1,0,107,9,0,114,89,0,100,1,0,
+ 106,7,0,124,2,0,131,1,0,125,3,0,116,8,0,124,
+ 3,0,100,2,0,124,2,0,131,1,1,130,1,0,124,0,
+ 0,106,9,0,100,3,0,107,8,0,114,163,0,124,0,0,
+ 106,10,0,100,3,0,107,8,0,114,140,0,116,8,0,100,
+ 4,0,100,2,0,124,0,0,106,0,0,131,1,1,130,1,
+ 0,116,11,0,124,0,0,124,1,0,100,5,0,100,6,0,
+ 131,2,1,1,124,1,0,83,116,11,0,124,0,0,124,1,
+ 0,100,5,0,100,6,0,131,2,1,1,116,12,0,124,0,
+ 0,106,9,0,100,7,0,131,2,0,115,219,0,124,0,0,
+ 106,9,0,106,13,0,124,2,0,131,1,0,1,110,16,0,
+ 124,0,0,106,9,0,106,14,0,124,1,0,131,1,0,1,
+ 87,100,3,0,81,82,88,116,4,0,106,5,0,124,2,0,
+ 25,83,41,8,122,51,69,120,101,99,117,116,101,32,116,104,
+ 101,32,115,112,101,99,32,105,110,32,97,110,32,101,120,105,
+ 115,116,105,110,103,32,109,111,100,117,108,101,39,115,32,110,
+ 97,109,101,115,112,97,99,101,46,122,30,109,111,100,117,108,
+ 101,32,123,33,114,125,32,110,111,116,32,105,110,32,115,121,
+ 115,46,109,111,100,117,108,101,115,114,15,0,0,0,78,122,
+ 14,109,105,115,115,105,110,103,32,108,111,97,100,101,114,114,
+ 133,0,0,0,84,114,139,0,0,0,41,15,114,15,0,0,
+ 0,114,57,0,0,0,218,12,97,99,113,117,105,114,101,95,
+ 108,111,99,107,114,54,0,0,0,114,14,0,0,0,114,21,
+ 0,0,0,114,42,0,0,0,114,50,0,0,0,114,77,0,
+ 0,0,114,99,0,0,0,114,110,0,0,0,114,137,0,0,
+ 0,114,4,0,0,0,218,11,108,111,97,100,95,109,111,100,
+ 117,108,101,114,139,0,0,0,41,4,114,88,0,0,0,114,
+ 89,0,0,0,114,15,0,0,0,218,3,109,115,103,114,10,
+ 0,0,0,114,10,0,0,0,114,11,0,0,0,114,86,0,
+ 0,0,93,2,0,0,115,32,0,0,0,0,2,9,1,10,
+ 1,13,1,24,1,15,1,18,1,15,1,15,1,21,2,19,
+ 1,4,1,19,1,18,4,19,2,23,1,114,86,0,0,0,
+ 99,1,0,0,0,0,0,0,0,2,0,0,0,27,0,0,
+ 0,67,0,0,0,115,3,1,0,0,124,0,0,106,0,0,
+ 106,1,0,124,0,0,106,2,0,131,1,0,1,116,3,0,
+ 106,4,0,124,0,0,106,2,0,25,125,1,0,116,5,0,
+ 124,1,0,100,1,0,100,0,0,131,3,0,100,0,0,107,
+ 8,0,114,96,0,121,16,0,124,0,0,106,0,0,124,1,
+ 0,95,6,0,87,110,18,0,4,116,7,0,107,10,0,114,
+ 95,0,1,1,1,89,110,1,0,88,116,5,0,124,1,0,
+ 100,2,0,100,0,0,131,3,0,100,0,0,107,8,0,114,
+ 197,0,121,56,0,124,1,0,106,8,0,124,1,0,95,9,
+ 0,116,10,0,124,1,0,100,3,0,131,2,0,115,175,0,
+ 124,0,0,106,2,0,106,11,0,100,4,0,131,1,0,100,
+ 5,0,25,124,1,0,95,9,0,87,110,18,0,4,116,7,
+ 0,107,10,0,114,196,0,1,1,1,89,110,1,0,88,116,
+ 5,0,124,1,0,100,6,0,100,0,0,131,3,0,100,0,
+ 0,107,8,0,114,255,0,121,13,0,124,0,0,124,1,0,
+ 95,12,0,87,110,18,0,4,116,7,0,107,10,0,114,254,
+ 0,1,1,1,89,110,1,0,88,124,1,0,83,41,7,78,
+ 114,91,0,0,0,114,134,0,0,0,114,131,0,0,0,114,
+ 121,0,0,0,114,33,0,0,0,114,95,0,0,0,41,13,
+ 114,99,0,0,0,114,146,0,0,0,114,15,0,0,0,114,
+ 14,0,0,0,114,21,0,0,0,114,6,0,0,0,114,91,
+ 0,0,0,114,96,0,0,0,114,1,0,0,0,114,134,0,
+ 0,0,114,4,0,0,0,114,122,0,0,0,114,95,0,0,
+ 0,41,2,114,88,0,0,0,114,89,0,0,0,114,10,0,
+ 0,0,114,10,0,0,0,114,11,0,0,0,218,25,95,108,
+ 111,97,100,95,98,97,99,107,119,97,114,100,95,99,111,109,
+ 112,97,116,105,98,108,101,118,2,0,0,115,40,0,0,0,
+ 0,4,19,2,16,1,24,1,3,1,16,1,13,1,5,1,
+ 24,1,3,4,12,1,15,1,29,1,13,1,5,1,24,1,
+ 3,1,13,1,13,1,5,1,114,148,0,0,0,99,1,0,
+ 0,0,0,0,0,0,2,0,0,0,11,0,0,0,67,0,
+ 0,0,115,159,0,0,0,124,0,0,106,0,0,100,0,0,
+ 107,9,0,114,43,0,116,1,0,124,0,0,106,0,0,100,
+ 1,0,131,2,0,115,43,0,116,2,0,124,0,0,131,1,
+ 0,83,116,3,0,124,0,0,131,1,0,125,1,0,116,4,
+ 0,124,1,0,131,1,0,143,75,0,1,124,0,0,106,0,
+ 0,100,0,0,107,8,0,114,122,0,124,0,0,106,5,0,
+ 100,0,0,107,8,0,114,138,0,116,6,0,100,2,0,100,
+ 3,0,124,0,0,106,7,0,131,1,1,130,1,0,110,16,
+ 0,124,0,0,106,0,0,106,8,0,124,1,0,131,1,0,
+ 1,87,100,0,0,81,82,88,116,9,0,106,10,0,124,0,
+ 0,106,7,0,25,83,41,4,78,114,139,0,0,0,122,14,
+ 109,105,115,115,105,110,103,32,108,111,97,100,101,114,114,15,
+ 0,0,0,41,11,114,99,0,0,0,114,4,0,0,0,114,
+ 148,0,0,0,114,144,0,0,0,114,102,0,0,0,114,110,
+ 0,0,0,114,77,0,0,0,114,15,0,0,0,114,139,0,
+ 0,0,114,14,0,0,0,114,21,0,0,0,41,2,114,88,
+ 0,0,0,114,89,0,0,0,114,10,0,0,0,114,10,0,
+ 0,0,114,11,0,0,0,218,14,95,108,111,97,100,95,117,
+ 110,108,111,99,107,101,100,147,2,0,0,115,20,0,0,0,
+ 0,2,15,2,18,1,10,2,12,1,13,1,15,1,15,1,
+ 24,3,23,5,114,149,0,0,0,99,1,0,0,0,0,0,
+ 0,0,1,0,0,0,9,0,0,0,67,0,0,0,115,47,
+ 0,0,0,116,0,0,106,1,0,131,0,0,1,116,2,0,
+ 124,0,0,106,3,0,131,1,0,143,15,0,1,116,4,0,
+ 124,0,0,131,1,0,83,87,100,1,0,81,82,88,100,1,
+ 0,83,41,2,122,191,82,101,116,117,114,110,32,97,32,110,
+ 101,119,32,109,111,100,117,108,101,32,111,98,106,101,99,116,
+ 44,32,108,111,97,100,101,100,32,98,121,32,116,104,101,32,
+ 115,112,101,99,39,115,32,108,111,97,100,101,114,46,10,10,
+ 32,32,32,32,84,104,101,32,109,111,100,117,108,101,32,105,
+ 115,32,110,111,116,32,97,100,100,101,100,32,116,111,32,105,
+ 116,115,32,112,97,114,101,110,116,46,10,10,32,32,32,32,
+ 73,102,32,97,32,109,111,100,117,108,101,32,105,115,32,97,
+ 108,114,101,97,100,121,32,105,110,32,115,121,115,46,109,111,
+ 100,117,108,101,115,44,32,116,104,97,116,32,101,120,105,115,
+ 116,105,110,103,32,109,111,100,117,108,101,32,103,101,116,115,
+ 10,32,32,32,32,99,108,111,98,98,101,114,101,100,46,10,
+ 10,32,32,32,32,78,41,5,114,57,0,0,0,114,145,0,
+ 0,0,114,54,0,0,0,114,15,0,0,0,114,149,0,0,
+ 0,41,1,114,88,0,0,0,114,10,0,0,0,114,10,0,
+ 0,0,114,11,0,0,0,114,87,0,0,0,170,2,0,0,
+ 115,6,0,0,0,0,9,10,1,16,1,114,87,0,0,0,
+ 99,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,
+ 0,64,0,0,0,115,205,0,0,0,101,0,0,90,1,0,
+ 100,0,0,90,2,0,100,1,0,90,3,0,101,4,0,100,
+ 2,0,100,3,0,132,0,0,131,1,0,90,5,0,101,6,
+ 0,100,4,0,100,4,0,100,5,0,100,6,0,132,2,0,
+ 131,1,0,90,7,0,101,6,0,100,4,0,100,7,0,100,
+ 8,0,132,1,0,131,1,0,90,8,0,101,6,0,100,9,
+ 0,100,10,0,132,0,0,131,1,0,90,9,0,101,6,0,
+ 100,11,0,100,12,0,132,0,0,131,1,0,90,10,0,101,
+ 6,0,101,11,0,100,13,0,100,14,0,132,0,0,131,1,
+ 0,131,1,0,90,12,0,101,6,0,101,11,0,100,15,0,
+ 100,16,0,132,0,0,131,1,0,131,1,0,90,13,0,101,
+ 6,0,101,11,0,100,17,0,100,18,0,132,0,0,131,1,
+ 0,131,1,0,90,14,0,101,6,0,101,15,0,131,1,0,
+ 90,16,0,100,4,0,83,41,19,218,15,66,117,105,108,116,
+ 105,110,73,109,112,111,114,116,101,114,122,144,77,101,116,97,
+ 32,112,97,116,104,32,105,109,112,111,114,116,32,102,111,114,
+ 32,98,117,105,108,116,45,105,110,32,109,111,100,117,108,101,
+ 115,46,10,10,32,32,32,32,65,108,108,32,109,101,116,104,
+ 111,100,115,32,97,114,101,32,101,105,116,104,101,114,32,99,
+ 108,97,115,115,32,111,114,32,115,116,97,116,105,99,32,109,
+ 101,116,104,111,100,115,32,116,111,32,97,118,111,105,100,32,
+ 116,104,101,32,110,101,101,100,32,116,111,10,32,32,32,32,
+ 105,110,115,116,97,110,116,105,97,116,101,32,116,104,101,32,
+ 99,108,97,115,115,46,10,10,32,32,32,32,99,1,0,0,
+ 0,0,0,0,0,1,0,0,0,2,0,0,0,67,0,0,
+ 0,115,16,0,0,0,100,1,0,106,0,0,124,0,0,106,
+ 1,0,131,1,0,83,41,2,122,115,82,101,116,117,114,110,
+ 32,114,101,112,114,32,102,111,114,32,116,104,101,32,109,111,
+ 100,117,108,101,46,10,10,32,32,32,32,32,32,32,32,84,
+ 104,101,32,109,101,116,104,111,100,32,105,115,32,100,101,112,
+ 114,101,99,97,116,101,100,46,32,32,84,104,101,32,105,109,
+ 112,111,114,116,32,109,97,99,104,105,110,101,114,121,32,100,
+ 111,101,115,32,116,104,101,32,106,111,98,32,105,116,115,101,
+ 108,102,46,10,10,32,32,32,32,32,32,32,32,122,24,60,
+ 109,111,100,117,108,101,32,123,33,114,125,32,40,98,117,105,
+ 108,116,45,105,110,41,62,41,2,114,50,0,0,0,114,1,
+ 0,0,0,41,1,114,89,0,0,0,114,10,0,0,0,114,
+ 10,0,0,0,114,11,0,0,0,114,92,0,0,0,195,2,
+ 0,0,115,2,0,0,0,0,7,122,27,66,117,105,108,116,
+ 105,110,73,109,112,111,114,116,101,114,46,109,111,100,117,108,
+ 101,95,114,101,112,114,78,99,4,0,0,0,0,0,0,0,
+ 4,0,0,0,5,0,0,0,67,0,0,0,115,58,0,0,
+ 0,124,2,0,100,0,0,107,9,0,114,16,0,100,0,0,
+ 83,116,0,0,106,1,0,124,1,0,131,1,0,114,50,0,
+ 116,2,0,124,1,0,124,0,0,100,1,0,100,2,0,131,
+ 2,1,83,100,0,0,83,100,0,0,83,41,3,78,114,107,
+ 0,0,0,122,8,98,117,105,108,116,45,105,110,41,3,114,
+ 57,0,0,0,90,10,105,115,95,98,117,105,108,116,105,110,
+ 114,85,0,0,0,41,4,218,3,99,108,115,114,78,0,0,
+ 0,218,4,112,97,116,104,218,6,116,97,114,103,101,116,114,
+ 10,0,0,0,114,10,0,0,0,114,11,0,0,0,218,9,
+ 102,105,110,100,95,115,112,101,99,204,2,0,0,115,10,0,
+ 0,0,0,2,12,1,4,1,15,1,19,2,122,25,66,117,
+ 105,108,116,105,110,73,109,112,111,114,116,101,114,46,102,105,
+ 110,100,95,115,112,101,99,99,3,0,0,0,0,0,0,0,
+ 4,0,0,0,3,0,0,0,67,0,0,0,115,41,0,0,
+ 0,124,0,0,106,0,0,124,1,0,124,2,0,131,2,0,
+ 125,3,0,124,3,0,100,1,0,107,9,0,114,37,0,124,
+ 3,0,106,1,0,83,100,1,0,83,41,2,122,175,70,105,
+ 110,100,32,116,104,101,32,98,117,105,108,116,45,105,110,32,
+ 109,111,100,117,108,101,46,10,10,32,32,32,32,32,32,32,
+ 32,73,102,32,39,112,97,116,104,39,32,105,115,32,101,118,
+ 101,114,32,115,112,101,99,105,102,105,101,100,32,116,104,101,
+ 110,32,116,104,101,32,115,101,97,114,99,104,32,105,115,32,
+ 99,111,110,115,105,100,101,114,101,100,32,97,32,102,97,105,
+ 108,117,114,101,46,10,10,32,32,32,32,32,32,32,32,84,
+ 104,105,115,32,109,101,116,104,111,100,32,105,115,32,100,101,
+ 112,114,101,99,97,116,101,100,46,32,32,85,115,101,32,102,
+ 105,110,100,95,115,112,101,99,40,41,32,105,110,115,116,101,
+ 97,100,46,10,10,32,32,32,32,32,32,32,32,78,41,2,
+ 114,154,0,0,0,114,99,0,0,0,41,4,114,151,0,0,
+ 0,114,78,0,0,0,114,152,0,0,0,114,88,0,0,0,
+ 114,10,0,0,0,114,10,0,0,0,114,11,0,0,0,218,
+ 11,102,105,110,100,95,109,111,100,117,108,101,213,2,0,0,
+ 115,4,0,0,0,0,9,18,1,122,27,66,117,105,108,116,
+ 105,110,73,109,112,111,114,116,101,114,46,102,105,110,100,95,
+ 109,111,100,117,108,101,99,2,0,0,0,0,0,0,0,2,
+ 0,0,0,4,0,0,0,67,0,0,0,115,67,0,0,0,
+ 124,1,0,106,0,0,116,1,0,106,2,0,107,7,0,114,
+ 51,0,116,3,0,100,1,0,106,4,0,124,1,0,106,0,
+ 0,131,1,0,100,2,0,124,1,0,106,0,0,131,1,1,
+ 130,1,0,116,5,0,116,6,0,106,7,0,124,1,0,131,
+ 2,0,83,41,3,122,24,67,114,101,97,116,101,32,97,32,
+ 98,117,105,108,116,45,105,110,32,109,111,100,117,108,101,122,
+ 29,123,33,114,125,32,105,115,32,110,111,116,32,97,32,98,
+ 117,105,108,116,45,105,110,32,109,111,100,117,108,101,114,15,
+ 0,0,0,41,8,114,15,0,0,0,114,14,0,0,0,114,
+ 76,0,0,0,114,77,0,0,0,114,50,0,0,0,114,65,
+ 0,0,0,114,57,0,0,0,90,14,99,114,101,97,116,101,
+ 95,98,117,105,108,116,105,110,41,2,114,19,0,0,0,114,
+ 88,0,0,0,114,10,0,0,0,114,10,0,0,0,114,11,
+ 0,0,0,114,138,0,0,0,225,2,0,0,115,8,0,0,
+ 0,0,3,18,1,21,1,12,1,122,29,66,117,105,108,116,
+ 105,110,73,109,112,111,114,116,101,114,46,99,114,101,97,116,
+ 101,95,109,111,100,117,108,101,99,2,0,0,0,0,0,0,
+ 0,2,0,0,0,3,0,0,0,67,0,0,0,115,20,0,
+ 0,0,116,0,0,116,1,0,106,2,0,124,1,0,131,2,
+ 0,1,100,1,0,83,41,2,122,22,69,120,101,99,32,97,
+ 32,98,117,105,108,116,45,105,110,32,109,111,100,117,108,101,
+ 78,41,3,114,65,0,0,0,114,57,0,0,0,90,12,101,
+ 120,101,99,95,98,117,105,108,116,105,110,41,2,114,19,0,
+ 0,0,114,89,0,0,0,114,10,0,0,0,114,10,0,0,
+ 0,114,11,0,0,0,114,139,0,0,0,233,2,0,0,115,
+ 2,0,0,0,0,3,122,27,66,117,105,108,116,105,110,73,
+ 109,112,111,114,116,101,114,46,101,120,101,99,95,109,111,100,
+ 117,108,101,99,2,0,0,0,0,0,0,0,2,0,0,0,
+ 1,0,0,0,67,0,0,0,115,4,0,0,0,100,1,0,
+ 83,41,2,122,57,82,101,116,117,114,110,32,78,111,110,101,
+ 32,97,115,32,98,117,105,108,116,45,105,110,32,109,111,100,
+ 117,108,101,115,32,100,111,32,110,111,116,32,104,97,118,101,
+ 32,99,111,100,101,32,111,98,106,101,99,116,115,46,78,114,
+ 10,0,0,0,41,2,114,151,0,0,0,114,78,0,0,0,
+ 114,10,0,0,0,114,10,0,0,0,114,11,0,0,0,218,
+ 8,103,101,116,95,99,111,100,101,238,2,0,0,115,2,0,
+ 0,0,0,4,122,24,66,117,105,108,116,105,110,73,109,112,
+ 111,114,116,101,114,46,103,101,116,95,99,111,100,101,99,2,
0,0,0,0,0,0,0,2,0,0,0,1,0,0,0,67,
- 0,0,0,115,4,0,0,0,100,1,0,83,41,2,122,57,
+ 0,0,0,115,4,0,0,0,100,1,0,83,41,2,122,56,
82,101,116,117,114,110,32,78,111,110,101,32,97,115,32,98,
117,105,108,116,45,105,110,32,109,111,100,117,108,101,115,32,
- 100,111,32,110,111,116,32,104,97,118,101,32,99,111,100,101,
- 32,111,98,106,101,99,116,115,46,78,114,4,0,0,0,41,
- 2,114,12,1,0,0,114,159,0,0,0,114,4,0,0,0,
- 114,4,0,0,0,114,5,0,0,0,218,8,103,101,116,95,
- 99,111,100,101,19,5,0,0,115,2,0,0,0,0,4,122,
- 24,66,117,105,108,116,105,110,73,109,112,111,114,116,101,114,
- 46,103,101,116,95,99,111,100,101,99,2,0,0,0,0,0,
- 0,0,2,0,0,0,1,0,0,0,67,0,0,0,115,4,
- 0,0,0,100,1,0,83,41,2,122,56,82,101,116,117,114,
- 110,32,78,111,110,101,32,97,115,32,98,117,105,108,116,45,
- 105,110,32,109,111,100,117,108,101,115,32,100,111,32,110,111,
- 116,32,104,97,118,101,32,115,111,117,114,99,101,32,99,111,
- 100,101,46,78,114,4,0,0,0,41,2,114,12,1,0,0,
- 114,159,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
- 5,0,0,0,218,10,103,101,116,95,115,111,117,114,99,101,
- 25,5,0,0,115,2,0,0,0,0,4,122,26,66,117,105,
- 108,116,105,110,73,109,112,111,114,116,101,114,46,103,101,116,
- 95,115,111,117,114,99,101,99,2,0,0,0,0,0,0,0,
- 2,0,0,0,1,0,0,0,67,0,0,0,115,4,0,0,
- 0,100,1,0,83,41,2,122,52,82,101,116,117,114,110,32,
- 70,97,108,115,101,32,97,115,32,98,117,105,108,116,45,105,
- 110,32,109,111,100,117,108,101,115,32,97,114,101,32,110,101,
- 118,101,114,32,112,97,99,107,97,103,101,115,46,70,114,4,
- 0,0,0,41,2,114,12,1,0,0,114,159,0,0,0,114,
- 4,0,0,0,114,4,0,0,0,114,5,0,0,0,114,220,
- 0,0,0,31,5,0,0,115,2,0,0,0,0,4,122,26,
- 66,117,105,108,116,105,110,73,109,112,111,114,116,101,114,46,
- 105,115,95,112,97,99,107,97,103,101,41,14,114,57,0,0,
- 0,114,56,0,0,0,114,58,0,0,0,114,59,0,0,0,
- 218,12,115,116,97,116,105,99,109,101,116,104,111,100,114,206,
- 0,0,0,218,11,99,108,97,115,115,109,101,116,104,111,100,
- 114,14,1,0,0,114,15,1,0,0,114,162,0,0,0,114,
- 5,1,0,0,114,16,1,0,0,114,17,1,0,0,114,220,
- 0,0,0,114,4,0,0,0,114,4,0,0,0,114,4,0,
- 0,0,114,5,0,0,0,114,11,1,0,0,224,4,0,0,
- 115,28,0,0,0,12,7,6,2,18,9,3,1,21,8,3,
- 1,18,11,3,1,21,11,3,1,21,5,3,1,21,5,3,
- 1,114,11,1,0,0,99,0,0,0,0,0,0,0,0,0,
- 0,0,0,5,0,0,0,64,0,0,0,115,193,0,0,0,
- 101,0,0,90,1,0,100,0,0,90,2,0,100,1,0,90,
- 3,0,101,4,0,100,2,0,100,3,0,132,0,0,131,1,
- 0,90,5,0,101,6,0,100,4,0,100,4,0,100,5,0,
- 100,6,0,132,2,0,131,1,0,90,7,0,101,6,0,100,
- 4,0,100,7,0,100,8,0,132,1,0,131,1,0,90,8,
- 0,101,4,0,100,9,0,100,10,0,132,0,0,131,1,0,
- 90,9,0,101,6,0,100,11,0,100,12,0,132,0,0,131,
- 1,0,90,10,0,101,6,0,101,11,0,100,13,0,100,14,
- 0,132,0,0,131,1,0,131,1,0,90,12,0,101,6,0,
- 101,11,0,100,15,0,100,16,0,132,0,0,131,1,0,131,
- 1,0,90,13,0,101,6,0,101,11,0,100,17,0,100,18,
- 0,132,0,0,131,1,0,131,1,0,90,14,0,100,4,0,
- 83,41,19,218,14,70,114,111,122,101,110,73,109,112,111,114,
- 116,101,114,122,142,77,101,116,97,32,112,97,116,104,32,105,
- 109,112,111,114,116,32,102,111,114,32,102,114,111,122,101,110,
- 32,109,111,100,117,108,101,115,46,10,10,32,32,32,32,65,
- 108,108,32,109,101,116,104,111,100,115,32,97,114,101,32,101,
- 105,116,104,101,114,32,99,108,97,115,115,32,111,114,32,115,
- 116,97,116,105,99,32,109,101,116,104,111,100,115,32,116,111,
- 32,97,118,111,105,100,32,116,104,101,32,110,101,101,100,32,
- 116,111,10,32,32,32,32,105,110,115,116,97,110,116,105,97,
- 116,101,32,116,104,101,32,99,108,97,115,115,46,10,10,32,
- 32,32,32,99,1,0,0,0,0,0,0,0,1,0,0,0,
- 2,0,0,0,67,0,0,0,115,16,0,0,0,100,1,0,
- 106,0,0,124,0,0,106,1,0,131,1,0,83,41,2,122,
- 115,82,101,116,117,114,110,32,114,101,112,114,32,102,111,114,
- 32,116,104,101,32,109,111,100,117,108,101,46,10,10,32,32,
- 32,32,32,32,32,32,84,104,101,32,109,101,116,104,111,100,
- 32,105,115,32,100,101,112,114,101,99,97,116,101,100,46,32,
- 32,84,104,101,32,105,109,112,111,114,116,32,109,97,99,104,
- 105,110,101,114,121,32,100,111,101,115,32,116,104,101,32,106,
- 111,98,32,105,116,115,101,108,102,46,10,10,32,32,32,32,
- 32,32,32,32,122,22,60,109,111,100,117,108,101,32,123,33,
- 114,125,32,40,102,114,111,122,101,110,41,62,41,2,114,47,
- 0,0,0,114,57,0,0,0,41,1,218,1,109,114,4,0,
- 0,0,114,4,0,0,0,114,5,0,0,0,114,206,0,0,
- 0,47,5,0,0,115,2,0,0,0,0,7,122,26,70,114,
- 111,122,101,110,73,109,112,111,114,116,101,114,46,109,111,100,
- 117,108,101,95,114,101,112,114,78,99,4,0,0,0,0,0,
- 0,0,4,0,0,0,5,0,0,0,67,0,0,0,115,42,
+ 100,111,32,110,111,116,32,104,97,118,101,32,115,111,117,114,
+ 99,101,32,99,111,100,101,46,78,114,10,0,0,0,41,2,
+ 114,151,0,0,0,114,78,0,0,0,114,10,0,0,0,114,
+ 10,0,0,0,114,11,0,0,0,218,10,103,101,116,95,115,
+ 111,117,114,99,101,244,2,0,0,115,2,0,0,0,0,4,
+ 122,26,66,117,105,108,116,105,110,73,109,112,111,114,116,101,
+ 114,46,103,101,116,95,115,111,117,114,99,101,99,2,0,0,
+ 0,0,0,0,0,2,0,0,0,1,0,0,0,67,0,0,
+ 0,115,4,0,0,0,100,1,0,83,41,2,122,52,82,101,
+ 116,117,114,110,32,70,97,108,115,101,32,97,115,32,98,117,
+ 105,108,116,45,105,110,32,109,111,100,117,108,101,115,32,97,
+ 114,101,32,110,101,118,101,114,32,112,97,99,107,97,103,101,
+ 115,46,70,114,10,0,0,0,41,2,114,151,0,0,0,114,
+ 78,0,0,0,114,10,0,0,0,114,10,0,0,0,114,11,
+ 0,0,0,114,109,0,0,0,250,2,0,0,115,2,0,0,
+ 0,0,4,122,26,66,117,105,108,116,105,110,73,109,112,111,
+ 114,116,101,114,46,105,115,95,112,97,99,107,97,103,101,41,
+ 17,114,1,0,0,0,114,0,0,0,0,114,2,0,0,0,
+ 114,3,0,0,0,218,12,115,116,97,116,105,99,109,101,116,
+ 104,111,100,114,92,0,0,0,218,11,99,108,97,115,115,109,
+ 101,116,104,111,100,114,154,0,0,0,114,155,0,0,0,114,
+ 138,0,0,0,114,139,0,0,0,114,81,0,0,0,114,156,
+ 0,0,0,114,157,0,0,0,114,109,0,0,0,114,90,0,
+ 0,0,114,146,0,0,0,114,10,0,0,0,114,10,0,0,
+ 0,114,10,0,0,0,114,11,0,0,0,114,150,0,0,0,
+ 186,2,0,0,115,30,0,0,0,12,7,6,2,18,9,3,
+ 1,21,8,3,1,18,11,18,8,18,5,3,1,21,5,3,
+ 1,21,5,3,1,21,5,114,150,0,0,0,99,0,0,0,
+ 0,0,0,0,0,0,0,0,0,5,0,0,0,64,0,0,
+ 0,115,211,0,0,0,101,0,0,90,1,0,100,0,0,90,
+ 2,0,100,1,0,90,3,0,101,4,0,100,2,0,100,3,
+ 0,132,0,0,131,1,0,90,5,0,101,6,0,100,4,0,
+ 100,4,0,100,5,0,100,6,0,132,2,0,131,1,0,90,
+ 7,0,101,6,0,100,4,0,100,7,0,100,8,0,132,1,
+ 0,131,1,0,90,8,0,101,6,0,100,9,0,100,10,0,
+ 132,0,0,131,1,0,90,9,0,101,4,0,100,11,0,100,
+ 12,0,132,0,0,131,1,0,90,10,0,101,6,0,100,13,
+ 0,100,14,0,132,0,0,131,1,0,90,11,0,101,6,0,
+ 101,12,0,100,15,0,100,16,0,132,0,0,131,1,0,131,
+ 1,0,90,13,0,101,6,0,101,12,0,100,17,0,100,18,
+ 0,132,0,0,131,1,0,131,1,0,90,14,0,101,6,0,
+ 101,12,0,100,19,0,100,20,0,132,0,0,131,1,0,131,
+ 1,0,90,15,0,100,4,0,83,41,21,218,14,70,114,111,
+ 122,101,110,73,109,112,111,114,116,101,114,122,142,77,101,116,
+ 97,32,112,97,116,104,32,105,109,112,111,114,116,32,102,111,
+ 114,32,102,114,111,122,101,110,32,109,111,100,117,108,101,115,
+ 46,10,10,32,32,32,32,65,108,108,32,109,101,116,104,111,
+ 100,115,32,97,114,101,32,101,105,116,104,101,114,32,99,108,
+ 97,115,115,32,111,114,32,115,116,97,116,105,99,32,109,101,
+ 116,104,111,100,115,32,116,111,32,97,118,111,105,100,32,116,
+ 104,101,32,110,101,101,100,32,116,111,10,32,32,32,32,105,
+ 110,115,116,97,110,116,105,97,116,101,32,116,104,101,32,99,
+ 108,97,115,115,46,10,10,32,32,32,32,99,1,0,0,0,
+ 0,0,0,0,1,0,0,0,2,0,0,0,67,0,0,0,
+ 115,16,0,0,0,100,1,0,106,0,0,124,0,0,106,1,
+ 0,131,1,0,83,41,2,122,115,82,101,116,117,114,110,32,
+ 114,101,112,114,32,102,111,114,32,116,104,101,32,109,111,100,
+ 117,108,101,46,10,10,32,32,32,32,32,32,32,32,84,104,
+ 101,32,109,101,116,104,111,100,32,105,115,32,100,101,112,114,
+ 101,99,97,116,101,100,46,32,32,84,104,101,32,105,109,112,
+ 111,114,116,32,109,97,99,104,105,110,101,114,121,32,100,111,
+ 101,115,32,116,104,101,32,106,111,98,32,105,116,115,101,108,
+ 102,46,10,10,32,32,32,32,32,32,32,32,122,22,60,109,
+ 111,100,117,108,101,32,123,33,114,125,32,40,102,114,111,122,
+ 101,110,41,62,41,2,114,50,0,0,0,114,1,0,0,0,
+ 41,1,218,1,109,114,10,0,0,0,114,10,0,0,0,114,
+ 11,0,0,0,114,92,0,0,0,12,3,0,0,115,2,0,
+ 0,0,0,7,122,26,70,114,111,122,101,110,73,109,112,111,
+ 114,116,101,114,46,109,111,100,117,108,101,95,114,101,112,114,
+ 78,99,4,0,0,0,0,0,0,0,4,0,0,0,5,0,
+ 0,0,67,0,0,0,115,42,0,0,0,116,0,0,106,1,
+ 0,124,1,0,131,1,0,114,34,0,116,2,0,124,1,0,
+ 124,0,0,100,1,0,100,2,0,131,2,1,83,100,0,0,
+ 83,100,0,0,83,41,3,78,114,107,0,0,0,90,6,102,
+ 114,111,122,101,110,41,3,114,57,0,0,0,114,82,0,0,
+ 0,114,85,0,0,0,41,4,114,151,0,0,0,114,78,0,
+ 0,0,114,152,0,0,0,114,153,0,0,0,114,10,0,0,
+ 0,114,10,0,0,0,114,11,0,0,0,114,154,0,0,0,
+ 21,3,0,0,115,6,0,0,0,0,2,15,1,19,2,122,
+ 24,70,114,111,122,101,110,73,109,112,111,114,116,101,114,46,
+ 102,105,110,100,95,115,112,101,99,99,3,0,0,0,0,0,
+ 0,0,3,0,0,0,2,0,0,0,67,0,0,0,115,23,
0,0,0,116,0,0,106,1,0,124,1,0,131,1,0,114,
- 34,0,116,2,0,124,1,0,124,0,0,100,1,0,100,2,
- 0,131,2,1,83,100,0,0,83,100,0,0,83,41,3,78,
- 114,218,0,0,0,90,6,102,114,111,122,101,110,41,3,114,
- 106,0,0,0,114,163,0,0,0,114,174,0,0,0,41,4,
- 114,12,1,0,0,114,159,0,0,0,114,35,0,0,0,114,
- 13,1,0,0,114,4,0,0,0,114,4,0,0,0,114,5,
- 0,0,0,114,14,1,0,0,56,5,0,0,115,6,0,0,
- 0,0,2,15,1,19,2,122,24,70,114,111,122,101,110,73,
- 109,112,111,114,116,101,114,46,102,105,110,100,95,115,112,101,
- 99,99,3,0,0,0,0,0,0,0,3,0,0,0,2,0,
- 0,0,67,0,0,0,115,23,0,0,0,116,0,0,106,1,
- 0,124,1,0,131,1,0,114,19,0,124,0,0,83,100,1,
- 0,83,41,2,122,93,70,105,110,100,32,97,32,102,114,111,
- 122,101,110,32,109,111,100,117,108,101,46,10,10,32,32,32,
- 32,32,32,32,32,84,104,105,115,32,109,101,116,104,111,100,
- 32,105,115,32,100,101,112,114,101,99,97,116,101,100,46,32,
- 32,85,115,101,32,102,105,110,100,95,115,112,101,99,40,41,
- 32,105,110,115,116,101,97,100,46,10,10,32,32,32,32,32,
- 32,32,32,78,41,2,114,106,0,0,0,114,163,0,0,0,
- 41,3,114,12,1,0,0,114,159,0,0,0,114,35,0,0,
- 0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,
- 114,15,1,0,0,63,5,0,0,115,2,0,0,0,0,7,
- 122,26,70,114,111,122,101,110,73,109,112,111,114,116,101,114,
- 46,102,105,110,100,95,109,111,100,117,108,101,99,1,0,0,
- 0,0,0,0,0,3,0,0,0,4,0,0,0,67,0,0,
- 0,115,95,0,0,0,124,0,0,106,0,0,106,1,0,125,
- 1,0,116,2,0,106,3,0,124,1,0,131,1,0,115,57,
- 0,116,4,0,100,1,0,106,5,0,124,1,0,131,1,0,
- 100,2,0,124,1,0,131,1,1,130,1,0,110,0,0,116,
- 6,0,116,2,0,106,7,0,124,1,0,131,2,0,125,2,
- 0,116,8,0,124,2,0,124,0,0,106,9,0,131,2,0,
- 1,100,0,0,83,41,3,78,122,27,123,33,114,125,32,105,
- 115,32,110,111,116,32,97,32,102,114,111,122,101,110,32,109,
- 111,100,117,108,101,114,67,0,0,0,41,10,114,209,0,0,
- 0,114,67,0,0,0,114,106,0,0,0,114,163,0,0,0,
- 114,154,0,0,0,114,47,0,0,0,114,114,0,0,0,218,
- 17,103,101,116,95,102,114,111,122,101,110,95,111,98,106,101,
- 99,116,114,176,0,0,0,114,63,0,0,0,41,3,114,180,
- 0,0,0,114,67,0,0,0,114,195,0,0,0,114,4,0,
- 0,0,114,4,0,0,0,114,5,0,0,0,114,2,1,0,
- 0,72,5,0,0,115,12,0,0,0,0,2,12,1,15,1,
- 18,1,12,1,18,1,122,26,70,114,111,122,101,110,73,109,
+ 19,0,124,0,0,83,100,1,0,83,41,2,122,93,70,105,
+ 110,100,32,97,32,102,114,111,122,101,110,32,109,111,100,117,
+ 108,101,46,10,10,32,32,32,32,32,32,32,32,84,104,105,
+ 115,32,109,101,116,104,111,100,32,105,115,32,100,101,112,114,
+ 101,99,97,116,101,100,46,32,32,85,115,101,32,102,105,110,
+ 100,95,115,112,101,99,40,41,32,105,110,115,116,101,97,100,
+ 46,10,10,32,32,32,32,32,32,32,32,78,41,2,114,57,
+ 0,0,0,114,82,0,0,0,41,3,114,151,0,0,0,114,
+ 78,0,0,0,114,152,0,0,0,114,10,0,0,0,114,10,
+ 0,0,0,114,11,0,0,0,114,155,0,0,0,28,3,0,
+ 0,115,2,0,0,0,0,7,122,26,70,114,111,122,101,110,
+ 73,109,112,111,114,116,101,114,46,102,105,110,100,95,109,111,
+ 100,117,108,101,99,2,0,0,0,0,0,0,0,2,0,0,
+ 0,1,0,0,0,67,0,0,0,115,4,0,0,0,100,1,
+ 0,83,41,2,122,42,85,115,101,32,100,101,102,97,117,108,
+ 116,32,115,101,109,97,110,116,105,99,115,32,102,111,114,32,
+ 109,111,100,117,108,101,32,99,114,101,97,116,105,111,110,46,
+ 78,114,10,0,0,0,41,2,114,151,0,0,0,114,88,0,
+ 0,0,114,10,0,0,0,114,10,0,0,0,114,11,0,0,
+ 0,114,138,0,0,0,37,3,0,0,115,0,0,0,0,122,
+ 28,70,114,111,122,101,110,73,109,112,111,114,116,101,114,46,
+ 99,114,101,97,116,101,95,109,111,100,117,108,101,99,1,0,
+ 0,0,0,0,0,0,3,0,0,0,4,0,0,0,67,0,
+ 0,0,115,92,0,0,0,124,0,0,106,0,0,106,1,0,
+ 125,1,0,116,2,0,106,3,0,124,1,0,131,1,0,115,
+ 54,0,116,4,0,100,1,0,106,5,0,124,1,0,131,1,
+ 0,100,2,0,124,1,0,131,1,1,130,1,0,116,6,0,
+ 116,2,0,106,7,0,124,1,0,131,2,0,125,2,0,116,
+ 8,0,124,2,0,124,0,0,106,9,0,131,2,0,1,100,
+ 0,0,83,41,3,78,122,27,123,33,114,125,32,105,115,32,
+ 110,111,116,32,97,32,102,114,111,122,101,110,32,109,111,100,
+ 117,108,101,114,15,0,0,0,41,10,114,95,0,0,0,114,
+ 15,0,0,0,114,57,0,0,0,114,82,0,0,0,114,77,
+ 0,0,0,114,50,0,0,0,114,65,0,0,0,218,17,103,
+ 101,116,95,102,114,111,122,101,110,95,111,98,106,101,99,116,
+ 218,4,101,120,101,99,114,7,0,0,0,41,3,114,89,0,
+ 0,0,114,15,0,0,0,218,4,99,111,100,101,114,10,0,
+ 0,0,114,10,0,0,0,114,11,0,0,0,114,139,0,0,
+ 0,41,3,0,0,115,12,0,0,0,0,2,12,1,15,1,
+ 18,1,9,1,18,1,122,26,70,114,111,122,101,110,73,109,
112,111,114,116,101,114,46,101,120,101,99,95,109,111,100,117,
108,101,99,2,0,0,0,0,0,0,0,2,0,0,0,3,
0,0,0,67,0,0,0,115,13,0,0,0,116,0,0,124,
@@ -2267,10 +1456,10 @@ const unsigned char _Py_M__importlib[] = {
32,109,101,116,104,111,100,32,105,115,32,100,101,112,114,101,
99,97,116,101,100,46,32,32,85,115,101,32,101,120,101,99,
95,109,111,100,117,108,101,40,41,32,105,110,115,116,101,97,
- 100,46,10,10,32,32,32,32,32,32,32,32,41,1,114,181,
- 0,0,0,41,2,114,12,1,0,0,114,159,0,0,0,114,
- 4,0,0,0,114,4,0,0,0,114,5,0,0,0,114,5,
- 1,0,0,81,5,0,0,115,2,0,0,0,0,7,122,26,
+ 100,46,10,10,32,32,32,32,32,32,32,32,41,1,114,90,
+ 0,0,0,41,2,114,151,0,0,0,114,78,0,0,0,114,
+ 10,0,0,0,114,10,0,0,0,114,11,0,0,0,114,146,
+ 0,0,0,50,3,0,0,115,2,0,0,0,0,7,122,26,
70,114,111,122,101,110,73,109,112,111,114,116,101,114,46,108,
111,97,100,95,109,111,100,117,108,101,99,2,0,0,0,0,
0,0,0,2,0,0,0,2,0,0,0,67,0,0,0,115,
@@ -2278,9 +1467,9 @@ const unsigned char _Py_M__importlib[] = {
83,41,1,122,45,82,101,116,117,114,110,32,116,104,101,32,
99,111,100,101,32,111,98,106,101,99,116,32,102,111,114,32,
116,104,101,32,102,114,111,122,101,110,32,109,111,100,117,108,
- 101,46,41,2,114,106,0,0,0,114,22,1,0,0,41,2,
- 114,12,1,0,0,114,159,0,0,0,114,4,0,0,0,114,
- 4,0,0,0,114,5,0,0,0,114,16,1,0,0,90,5,
+ 101,46,41,2,114,57,0,0,0,114,162,0,0,0,41,2,
+ 114,151,0,0,0,114,78,0,0,0,114,10,0,0,0,114,
+ 10,0,0,0,114,11,0,0,0,114,156,0,0,0,59,3,
0,0,115,2,0,0,0,0,4,122,23,70,114,111,122,101,
110,73,109,112,111,114,116,101,114,46,103,101,116,95,99,111,
100,101,99,2,0,0,0,0,0,0,0,2,0,0,0,1,
@@ -2288,10 +1477,10 @@ const unsigned char _Py_M__importlib[] = {
41,2,122,54,82,101,116,117,114,110,32,78,111,110,101,32,
97,115,32,102,114,111,122,101,110,32,109,111,100,117,108,101,
115,32,100,111,32,110,111,116,32,104,97,118,101,32,115,111,
- 117,114,99,101,32,99,111,100,101,46,78,114,4,0,0,0,
- 41,2,114,12,1,0,0,114,159,0,0,0,114,4,0,0,
- 0,114,4,0,0,0,114,5,0,0,0,114,17,1,0,0,
- 96,5,0,0,115,2,0,0,0,0,4,122,25,70,114,111,
+ 117,114,99,101,32,99,111,100,101,46,78,114,10,0,0,0,
+ 41,2,114,151,0,0,0,114,78,0,0,0,114,10,0,0,
+ 0,114,10,0,0,0,114,11,0,0,0,114,157,0,0,0,
+ 65,3,0,0,115,2,0,0,0,0,4,122,25,70,114,111,
122,101,110,73,109,112,111,114,116,101,114,46,103,101,116,95,
115,111,117,114,99,101,99,2,0,0,0,0,0,0,0,2,
0,0,0,2,0,0,0,67,0,0,0,115,13,0,0,0,
@@ -2299,2079 +1488,502 @@ const unsigned char _Py_M__importlib[] = {
46,82,101,116,117,114,110,32,84,114,117,101,32,105,102,32,
116,104,101,32,102,114,111,122,101,110,32,109,111,100,117,108,
101,32,105,115,32,97,32,112,97,99,107,97,103,101,46,41,
- 2,114,106,0,0,0,90,17,105,115,95,102,114,111,122,101,
- 110,95,112,97,99,107,97,103,101,41,2,114,12,1,0,0,
- 114,159,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
- 5,0,0,0,114,220,0,0,0,102,5,0,0,115,2,0,
+ 2,114,57,0,0,0,90,17,105,115,95,102,114,111,122,101,
+ 110,95,112,97,99,107,97,103,101,41,2,114,151,0,0,0,
+ 114,78,0,0,0,114,10,0,0,0,114,10,0,0,0,114,
+ 11,0,0,0,114,109,0,0,0,71,3,0,0,115,2,0,
0,0,0,4,122,25,70,114,111,122,101,110,73,109,112,111,
114,116,101,114,46,105,115,95,112,97,99,107,97,103,101,41,
- 15,114,57,0,0,0,114,56,0,0,0,114,58,0,0,0,
- 114,59,0,0,0,114,18,1,0,0,114,206,0,0,0,114,
- 19,1,0,0,114,14,1,0,0,114,15,1,0,0,114,2,
- 1,0,0,114,5,1,0,0,114,165,0,0,0,114,16,1,
- 0,0,114,17,1,0,0,114,220,0,0,0,114,4,0,0,
- 0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,
- 114,20,1,0,0,38,5,0,0,115,28,0,0,0,12,7,
- 6,2,18,9,3,1,21,6,3,1,18,8,18,9,18,9,
- 3,1,21,5,3,1,21,5,3,1,114,20,1,0,0,99,
- 0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,
- 64,0,0,0,115,121,0,0,0,101,0,0,90,1,0,100,
- 0,0,90,2,0,100,1,0,90,3,0,100,2,0,90,4,
- 0,100,3,0,90,5,0,100,4,0,90,6,0,101,7,0,
- 100,5,0,100,6,0,132,0,0,131,1,0,90,8,0,101,
- 7,0,100,7,0,100,8,0,132,0,0,131,1,0,90,9,
- 0,101,7,0,100,9,0,100,9,0,100,10,0,100,11,0,
- 132,2,0,131,1,0,90,10,0,101,7,0,100,9,0,100,
- 12,0,100,13,0,132,1,0,131,1,0,90,11,0,100,9,
- 0,83,41,14,218,21,87,105,110,100,111,119,115,82,101,103,
- 105,115,116,114,121,70,105,110,100,101,114,122,62,77,101,116,
- 97,32,112,97,116,104,32,102,105,110,100,101,114,32,102,111,
- 114,32,109,111,100,117,108,101,115,32,100,101,99,108,97,114,
- 101,100,32,105,110,32,116,104,101,32,87,105,110,100,111,119,
- 115,32,114,101,103,105,115,116,114,121,46,122,59,83,111,102,
- 116,119,97,114,101,92,80,121,116,104,111,110,92,80,121,116,
- 104,111,110,67,111,114,101,92,123,115,121,115,95,118,101,114,
- 115,105,111,110,125,92,77,111,100,117,108,101,115,92,123,102,
- 117,108,108,110,97,109,101,125,122,65,83,111,102,116,119,97,
- 114,101,92,80,121,116,104,111,110,92,80,121,116,104,111,110,
- 67,111,114,101,92,123,115,121,115,95,118,101,114,115,105,111,
- 110,125,92,77,111,100,117,108,101,115,92,123,102,117,108,108,
- 110,97,109,101,125,92,68,101,98,117,103,70,99,2,0,0,
- 0,0,0,0,0,2,0,0,0,11,0,0,0,67,0,0,
- 0,115,67,0,0,0,121,23,0,116,0,0,106,1,0,116,
- 0,0,106,2,0,124,1,0,131,2,0,83,87,110,37,0,
- 4,116,3,0,107,10,0,114,62,0,1,1,1,116,0,0,
- 106,1,0,116,0,0,106,4,0,124,1,0,131,2,0,83,
- 89,110,1,0,88,100,0,0,83,41,1,78,41,5,218,7,
- 95,119,105,110,114,101,103,90,7,79,112,101,110,75,101,121,
- 90,17,72,75,69,89,95,67,85,82,82,69,78,84,95,85,
- 83,69,82,114,40,0,0,0,90,18,72,75,69,89,95,76,
- 79,67,65,76,95,77,65,67,72,73,78,69,41,2,114,12,
- 1,0,0,218,3,107,101,121,114,4,0,0,0,114,4,0,
- 0,0,114,5,0,0,0,218,14,95,111,112,101,110,95,114,
- 101,103,105,115,116,114,121,121,5,0,0,115,8,0,0,0,
- 0,2,3,1,23,1,13,1,122,36,87,105,110,100,111,119,
- 115,82,101,103,105,115,116,114,121,70,105,110,100,101,114,46,
- 95,111,112,101,110,95,114,101,103,105,115,116,114,121,99,2,
- 0,0,0,0,0,0,0,6,0,0,0,16,0,0,0,67,
- 0,0,0,115,142,0,0,0,124,0,0,106,0,0,114,21,
- 0,124,0,0,106,1,0,125,2,0,110,9,0,124,0,0,
- 106,2,0,125,2,0,124,2,0,106,3,0,100,1,0,124,
- 1,0,100,2,0,116,4,0,106,5,0,100,0,0,100,3,
- 0,133,2,0,25,131,0,2,125,3,0,121,46,0,124,0,
- 0,106,6,0,124,3,0,131,1,0,143,25,0,125,4,0,
- 116,7,0,106,8,0,124,4,0,100,4,0,131,2,0,125,
- 5,0,87,100,0,0,81,88,87,110,22,0,4,116,9,0,
- 107,10,0,114,137,0,1,1,1,100,0,0,83,89,110,1,
- 0,88,124,5,0,83,41,5,78,114,159,0,0,0,90,11,
- 115,121,115,95,118,101,114,115,105,111,110,114,137,0,0,0,
- 114,30,0,0,0,41,10,218,11,68,69,66,85,71,95,66,
- 85,73,76,68,218,18,82,69,71,73,83,84,82,89,95,75,
- 69,89,95,68,69,66,85,71,218,12,82,69,71,73,83,84,
- 82,89,95,75,69,89,114,47,0,0,0,114,7,0,0,0,
- 218,7,118,101,114,115,105,111,110,114,26,1,0,0,114,24,
- 1,0,0,90,10,81,117,101,114,121,86,97,108,117,101,114,
- 40,0,0,0,41,6,114,12,1,0,0,114,159,0,0,0,
- 90,12,114,101,103,105,115,116,114,121,95,107,101,121,114,25,
- 1,0,0,90,4,104,107,101,121,218,8,102,105,108,101,112,
- 97,116,104,114,4,0,0,0,114,4,0,0,0,114,5,0,
- 0,0,218,16,95,115,101,97,114,99,104,95,114,101,103,105,
- 115,116,114,121,128,5,0,0,115,22,0,0,0,0,2,9,
- 1,12,2,9,1,15,1,22,1,3,1,18,1,28,1,13,
- 1,9,1,122,38,87,105,110,100,111,119,115,82,101,103,105,
- 115,116,114,121,70,105,110,100,101,114,46,95,115,101,97,114,
- 99,104,95,114,101,103,105,115,116,114,121,78,99,4,0,0,
- 0,0,0,0,0,8,0,0,0,14,0,0,0,67,0,0,
- 0,115,155,0,0,0,124,0,0,106,0,0,124,1,0,131,
- 1,0,125,4,0,124,4,0,100,0,0,107,8,0,114,31,
- 0,100,0,0,83,121,14,0,116,1,0,124,4,0,131,1,
- 0,1,87,110,22,0,4,116,2,0,107,10,0,114,69,0,
- 1,1,1,100,0,0,83,89,110,1,0,88,120,78,0,116,
- 3,0,131,0,0,68,93,67,0,92,2,0,125,5,0,125,
- 6,0,124,4,0,106,4,0,116,5,0,124,6,0,131,1,
- 0,131,1,0,114,80,0,116,6,0,124,1,0,124,5,0,
- 124,1,0,124,4,0,131,2,0,100,1,0,124,4,0,131,
- 2,1,125,7,0,124,7,0,83,113,80,0,87,100,0,0,
- 83,41,2,78,114,218,0,0,0,41,7,114,32,1,0,0,
- 114,39,0,0,0,114,40,0,0,0,114,241,0,0,0,114,
- 231,0,0,0,114,232,0,0,0,114,174,0,0,0,41,8,
- 114,12,1,0,0,114,159,0,0,0,114,35,0,0,0,114,
- 13,1,0,0,114,31,1,0,0,114,170,0,0,0,114,126,
- 0,0,0,114,178,0,0,0,114,4,0,0,0,114,4,0,
- 0,0,114,5,0,0,0,114,14,1,0,0,143,5,0,0,
- 115,24,0,0,0,0,2,15,1,12,1,4,1,3,1,14,
- 1,13,1,9,1,22,1,21,1,21,1,9,1,122,31,87,
- 105,110,100,111,119,115,82,101,103,105,115,116,114,121,70,105,
- 110,100,101,114,46,102,105,110,100,95,115,112,101,99,99,3,
- 0,0,0,0,0,0,0,4,0,0,0,3,0,0,0,67,
- 0,0,0,115,45,0,0,0,124,0,0,106,0,0,124,1,
- 0,124,2,0,131,2,0,125,3,0,124,3,0,100,1,0,
- 107,9,0,114,37,0,124,3,0,106,1,0,83,100,1,0,
- 83,100,1,0,83,41,2,122,108,70,105,110,100,32,109,111,
- 100,117,108,101,32,110,97,109,101,100,32,105,110,32,116,104,
- 101,32,114,101,103,105,115,116,114,121,46,10,10,32,32,32,
- 32,32,32,32,32,84,104,105,115,32,109,101,116,104,111,100,
- 32,105,115,32,100,101,112,114,101,99,97,116,101,100,46,32,
- 32,85,115,101,32,101,120,101,99,95,109,111,100,117,108,101,
- 40,41,32,105,110,115,116,101,97,100,46,10,10,32,32,32,
- 32,32,32,32,32,78,41,2,114,14,1,0,0,114,170,0,
- 0,0,41,4,114,12,1,0,0,114,159,0,0,0,114,35,
- 0,0,0,114,178,0,0,0,114,4,0,0,0,114,4,0,
- 0,0,114,5,0,0,0,114,15,1,0,0,158,5,0,0,
- 115,8,0,0,0,0,7,18,1,12,1,7,2,122,33,87,
- 105,110,100,111,119,115,82,101,103,105,115,116,114,121,70,105,
- 110,100,101,114,46,102,105,110,100,95,109,111,100,117,108,101,
- 41,12,114,57,0,0,0,114,56,0,0,0,114,58,0,0,
- 0,114,59,0,0,0,114,29,1,0,0,114,28,1,0,0,
- 114,27,1,0,0,114,19,1,0,0,114,26,1,0,0,114,
- 32,1,0,0,114,14,1,0,0,114,15,1,0,0,114,4,
- 0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,
- 0,0,114,23,1,0,0,109,5,0,0,115,20,0,0,0,
- 12,2,6,3,6,3,6,2,6,2,18,7,18,15,3,1,
- 21,14,3,1,114,23,1,0,0,99,0,0,0,0,0,0,
- 0,0,0,0,0,0,2,0,0,0,64,0,0,0,115,52,
- 0,0,0,101,0,0,90,1,0,100,0,0,90,2,0,100,
- 1,0,90,3,0,100,2,0,100,3,0,132,0,0,90,4,
- 0,100,4,0,100,5,0,132,0,0,90,5,0,101,6,0,
- 90,7,0,100,6,0,83,41,7,218,13,95,76,111,97,100,
- 101,114,66,97,115,105,99,115,122,83,66,97,115,101,32,99,
- 108,97,115,115,32,111,102,32,99,111,109,109,111,110,32,99,
- 111,100,101,32,110,101,101,100,101,100,32,98,121,32,98,111,
- 116,104,32,83,111,117,114,99,101,76,111,97,100,101,114,32,
- 97,110,100,10,32,32,32,32,83,111,117,114,99,101,108,101,
- 115,115,70,105,108,101,76,111,97,100,101,114,46,99,2,0,
- 0,0,0,0,0,0,5,0,0,0,3,0,0,0,67,0,
- 0,0,115,88,0,0,0,116,0,0,124,0,0,106,1,0,
- 124,1,0,131,1,0,131,1,0,100,1,0,25,125,2,0,
- 124,2,0,106,2,0,100,2,0,100,1,0,131,2,0,100,
- 3,0,25,125,3,0,124,1,0,106,3,0,100,2,0,131,
- 1,0,100,4,0,25,125,4,0,124,3,0,100,5,0,107,
- 2,0,111,87,0,124,4,0,100,5,0,107,3,0,83,41,
- 6,122,141,67,111,110,99,114,101,116,101,32,105,109,112,108,
- 101,109,101,110,116,97,116,105,111,110,32,111,102,32,73,110,
- 115,112,101,99,116,76,111,97,100,101,114,46,105,115,95,112,
- 97,99,107,97,103,101,32,98,121,32,99,104,101,99,107,105,
- 110,103,32,105,102,10,32,32,32,32,32,32,32,32,116,104,
- 101,32,112,97,116,104,32,114,101,116,117,114,110,101,100,32,
- 98,121,32,103,101,116,95,102,105,108,101,110,97,109,101,32,
- 104,97,115,32,97,32,102,105,108,101,110,97,109,101,32,111,
- 102,32,39,95,95,105,110,105,116,95,95,46,112,121,39,46,
- 114,29,0,0,0,114,116,0,0,0,114,84,0,0,0,114,
- 115,0,0,0,114,72,0,0,0,41,4,114,38,0,0,0,
- 114,239,0,0,0,114,34,0,0,0,114,32,0,0,0,41,
- 5,114,71,0,0,0,114,159,0,0,0,114,131,0,0,0,
- 90,13,102,105,108,101,110,97,109,101,95,98,97,115,101,90,
- 9,116,97,105,108,95,110,97,109,101,114,4,0,0,0,114,
- 4,0,0,0,114,5,0,0,0,114,220,0,0,0,177,5,
- 0,0,115,8,0,0,0,0,3,25,1,22,1,19,1,122,
- 24,95,76,111,97,100,101,114,66,97,115,105,99,115,46,105,
- 115,95,112,97,99,107,97,103,101,99,2,0,0,0,0,0,
- 0,0,3,0,0,0,4,0,0,0,67,0,0,0,115,80,
- 0,0,0,124,0,0,106,0,0,124,1,0,106,1,0,131,
- 1,0,125,2,0,124,2,0,100,1,0,107,8,0,114,57,
- 0,116,2,0,100,2,0,106,3,0,124,1,0,106,1,0,
- 131,1,0,131,1,0,130,1,0,110,0,0,116,4,0,116,
- 5,0,124,2,0,124,1,0,106,6,0,131,3,0,1,100,
- 1,0,83,41,3,122,19,69,120,101,99,117,116,101,32,116,
- 104,101,32,109,111,100,117,108,101,46,78,122,52,99,97,110,
- 110,111,116,32,108,111,97,100,32,109,111,100,117,108,101,32,
- 123,33,114,125,32,119,104,101,110,32,103,101,116,95,99,111,
- 100,101,40,41,32,114,101,116,117,114,110,115,32,78,111,110,
- 101,41,7,114,16,1,0,0,114,57,0,0,0,114,154,0,
- 0,0,114,47,0,0,0,114,114,0,0,0,114,176,0,0,
- 0,114,63,0,0,0,41,3,114,71,0,0,0,114,180,0,
- 0,0,114,195,0,0,0,114,4,0,0,0,114,4,0,0,
- 0,114,5,0,0,0,114,2,1,0,0,185,5,0,0,115,
- 10,0,0,0,0,2,18,1,12,1,9,1,18,1,122,25,
- 95,76,111,97,100,101,114,66,97,115,105,99,115,46,101,120,
- 101,99,95,109,111,100,117,108,101,78,41,8,114,57,0,0,
- 0,114,56,0,0,0,114,58,0,0,0,114,59,0,0,0,
- 114,220,0,0,0,114,2,1,0,0,114,181,0,0,0,114,
- 5,1,0,0,114,4,0,0,0,114,4,0,0,0,114,4,
- 0,0,0,114,5,0,0,0,114,33,1,0,0,172,5,0,
- 0,115,8,0,0,0,12,3,6,2,12,8,12,8,114,33,
- 1,0,0,99,0,0,0,0,0,0,0,0,0,0,0,0,
- 4,0,0,0,64,0,0,0,115,106,0,0,0,101,0,0,
- 90,1,0,100,0,0,90,2,0,100,1,0,100,2,0,132,
- 0,0,90,3,0,100,3,0,100,4,0,132,0,0,90,4,
- 0,100,5,0,100,6,0,132,0,0,90,5,0,100,7,0,
- 100,8,0,132,0,0,90,6,0,100,9,0,100,10,0,132,
- 0,0,90,7,0,100,11,0,100,18,0,100,13,0,100,14,
- 0,132,0,1,90,8,0,100,15,0,100,16,0,132,0,0,
- 90,9,0,100,17,0,83,41,19,218,12,83,111,117,114,99,
- 101,76,111,97,100,101,114,99,2,0,0,0,0,0,0,0,
- 2,0,0,0,1,0,0,0,67,0,0,0,115,10,0,0,
- 0,116,0,0,130,1,0,100,1,0,83,41,2,122,178,79,
- 112,116,105,111,110,97,108,32,109,101,116,104,111,100,32,116,
- 104,97,116,32,114,101,116,117,114,110,115,32,116,104,101,32,
- 109,111,100,105,102,105,99,97,116,105,111,110,32,116,105,109,
- 101,32,40,97,110,32,105,110,116,41,32,102,111,114,32,116,
- 104,101,10,32,32,32,32,32,32,32,32,115,112,101,99,105,
- 102,105,101,100,32,112,97,116,104,44,32,119,104,101,114,101,
- 32,112,97,116,104,32,105,115,32,97,32,115,116,114,46,10,
- 10,32,32,32,32,32,32,32,32,82,97,105,115,101,115,32,
- 73,79,69,114,114,111,114,32,119,104,101,110,32,116,104,101,
- 32,112,97,116,104,32,99,97,110,110,111,116,32,98,101,32,
- 104,97,110,100,108,101,100,46,10,32,32,32,32,32,32,32,
- 32,78,41,1,218,7,73,79,69,114,114,111,114,41,2,114,
- 71,0,0,0,114,35,0,0,0,114,4,0,0,0,114,4,
- 0,0,0,114,5,0,0,0,218,10,112,97,116,104,95,109,
- 116,105,109,101,198,5,0,0,115,2,0,0,0,0,6,122,
- 23,83,111,117,114,99,101,76,111,97,100,101,114,46,112,97,
- 116,104,95,109,116,105,109,101,99,2,0,0,0,0,0,0,
- 0,2,0,0,0,3,0,0,0,67,0,0,0,115,20,0,
- 0,0,105,1,0,124,0,0,106,0,0,124,1,0,131,1,
- 0,100,1,0,54,83,41,2,97,170,1,0,0,79,112,116,
- 105,111,110,97,108,32,109,101,116,104,111,100,32,114,101,116,
- 117,114,110,105,110,103,32,97,32,109,101,116,97,100,97,116,
- 97,32,100,105,99,116,32,102,111,114,32,116,104,101,32,115,
- 112,101,99,105,102,105,101,100,32,112,97,116,104,10,32,32,
- 32,32,32,32,32,32,116,111,32,98,121,32,116,104,101,32,
- 112,97,116,104,32,40,115,116,114,41,46,10,32,32,32,32,
- 32,32,32,32,80,111,115,115,105,98,108,101,32,107,101,121,
- 115,58,10,32,32,32,32,32,32,32,32,45,32,39,109,116,
- 105,109,101,39,32,40,109,97,110,100,97,116,111,114,121,41,
- 32,105,115,32,116,104,101,32,110,117,109,101,114,105,99,32,
- 116,105,109,101,115,116,97,109,112,32,111,102,32,108,97,115,
- 116,32,115,111,117,114,99,101,10,32,32,32,32,32,32,32,
- 32,32,32,99,111,100,101,32,109,111,100,105,102,105,99,97,
- 116,105,111,110,59,10,32,32,32,32,32,32,32,32,45,32,
- 39,115,105,122,101,39,32,40,111,112,116,105,111,110,97,108,
- 41,32,105,115,32,116,104,101,32,115,105,122,101,32,105,110,
- 32,98,121,116,101,115,32,111,102,32,116,104,101,32,115,111,
- 117,114,99,101,32,99,111,100,101,46,10,10,32,32,32,32,
- 32,32,32,32,73,109,112,108,101,109,101,110,116,105,110,103,
- 32,116,104,105,115,32,109,101,116,104,111,100,32,97,108,108,
- 111,119,115,32,116,104,101,32,108,111,97,100,101,114,32,116,
- 111,32,114,101,97,100,32,98,121,116,101,99,111,100,101,32,
- 102,105,108,101,115,46,10,32,32,32,32,32,32,32,32,82,
- 97,105,115,101,115,32,73,79,69,114,114,111,114,32,119,104,
- 101,110,32,116,104,101,32,112,97,116,104,32,99,97,110,110,
- 111,116,32,98,101,32,104,97,110,100,108,101,100,46,10,32,
- 32,32,32,32,32,32,32,114,184,0,0,0,41,1,114,36,
- 1,0,0,41,2,114,71,0,0,0,114,35,0,0,0,114,
- 4,0,0,0,114,4,0,0,0,114,5,0,0,0,218,10,
- 112,97,116,104,95,115,116,97,116,115,206,5,0,0,115,2,
- 0,0,0,0,11,122,23,83,111,117,114,99,101,76,111,97,
- 100,101,114,46,112,97,116,104,95,115,116,97,116,115,99,4,
- 0,0,0,0,0,0,0,4,0,0,0,3,0,0,0,67,
- 0,0,0,115,16,0,0,0,124,0,0,106,0,0,124,2,
- 0,124,3,0,131,2,0,83,41,1,122,228,79,112,116,105,
- 111,110,97,108,32,109,101,116,104,111,100,32,119,104,105,99,
- 104,32,119,114,105,116,101,115,32,100,97,116,97,32,40,98,
- 121,116,101,115,41,32,116,111,32,97,32,102,105,108,101,32,
- 112,97,116,104,32,40,97,32,115,116,114,41,46,10,10,32,
- 32,32,32,32,32,32,32,73,109,112,108,101,109,101,110,116,
- 105,110,103,32,116,104,105,115,32,109,101,116,104,111,100,32,
- 97,108,108,111,119,115,32,102,111,114,32,116,104,101,32,119,
- 114,105,116,105,110,103,32,111,102,32,98,121,116,101,99,111,
- 100,101,32,102,105,108,101,115,46,10,10,32,32,32,32,32,
- 32,32,32,84,104,101,32,115,111,117,114,99,101,32,112,97,
- 116,104,32,105,115,32,110,101,101,100,101,100,32,105,110,32,
- 111,114,100,101,114,32,116,111,32,99,111,114,114,101,99,116,
- 108,121,32,116,114,97,110,115,102,101,114,32,112,101,114,109,
- 105,115,115,105,111,110,115,10,32,32,32,32,32,32,32,32,
- 41,1,218,8,115,101,116,95,100,97,116,97,41,4,114,71,
- 0,0,0,114,142,0,0,0,90,10,99,97,99,104,101,95,
- 112,97,116,104,114,53,0,0,0,114,4,0,0,0,114,4,
- 0,0,0,114,5,0,0,0,218,15,95,99,97,99,104,101,
- 95,98,121,116,101,99,111,100,101,219,5,0,0,115,2,0,
- 0,0,0,8,122,28,83,111,117,114,99,101,76,111,97,100,
- 101,114,46,95,99,97,99,104,101,95,98,121,116,101,99,111,
- 100,101,99,3,0,0,0,0,0,0,0,3,0,0,0,1,
- 0,0,0,67,0,0,0,115,4,0,0,0,100,1,0,83,
- 41,2,122,150,79,112,116,105,111,110,97,108,32,109,101,116,
- 104,111,100,32,119,104,105,99,104,32,119,114,105,116,101,115,
- 32,100,97,116,97,32,40,98,121,116,101,115,41,32,116,111,
- 32,97,32,102,105,108,101,32,112,97,116,104,32,40,97,32,
- 115,116,114,41,46,10,10,32,32,32,32,32,32,32,32,73,
- 109,112,108,101,109,101,110,116,105,110,103,32,116,104,105,115,
- 32,109,101,116,104,111,100,32,97,108,108,111,119,115,32,102,
- 111,114,32,116,104,101,32,119,114,105,116,105,110,103,32,111,
- 102,32,98,121,116,101,99,111,100,101,32,102,105,108,101,115,
- 46,10,32,32,32,32,32,32,32,32,78,114,4,0,0,0,
- 41,3,114,71,0,0,0,114,35,0,0,0,114,53,0,0,
- 0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,
- 114,38,1,0,0,229,5,0,0,115,0,0,0,0,122,21,
- 83,111,117,114,99,101,76,111,97,100,101,114,46,115,101,116,
- 95,100,97,116,97,99,2,0,0,0,0,0,0,0,5,0,
- 0,0,16,0,0,0,67,0,0,0,115,105,0,0,0,124,
- 0,0,106,0,0,124,1,0,131,1,0,125,2,0,121,19,
- 0,124,0,0,106,1,0,124,2,0,131,1,0,125,3,0,
- 87,110,58,0,4,116,2,0,107,10,0,114,94,0,1,125,
- 4,0,1,122,26,0,116,3,0,100,1,0,100,2,0,124,
- 1,0,131,1,1,124,4,0,130,2,0,87,89,100,3,0,
- 100,3,0,125,4,0,126,4,0,88,110,1,0,88,116,4,
- 0,124,3,0,131,1,0,83,41,4,122,52,67,111,110,99,
- 114,101,116,101,32,105,109,112,108,101,109,101,110,116,97,116,
- 105,111,110,32,111,102,32,73,110,115,112,101,99,116,76,111,
- 97,100,101,114,46,103,101,116,95,115,111,117,114,99,101,46,
- 122,39,115,111,117,114,99,101,32,110,111,116,32,97,118,97,
- 105,108,97,98,108,101,32,116,104,114,111,117,103,104,32,103,
- 101,116,95,100,97,116,97,40,41,114,67,0,0,0,78,41,
- 5,114,239,0,0,0,218,8,103,101,116,95,100,97,116,97,
- 114,40,0,0,0,114,154,0,0,0,114,204,0,0,0,41,
- 5,114,71,0,0,0,114,159,0,0,0,114,35,0,0,0,
- 114,202,0,0,0,218,3,101,120,99,114,4,0,0,0,114,
- 4,0,0,0,114,5,0,0,0,114,17,1,0,0,236,5,
- 0,0,115,14,0,0,0,0,2,15,1,3,1,19,1,18,
- 1,9,1,31,1,122,23,83,111,117,114,99,101,76,111,97,
- 100,101,114,46,103,101,116,95,115,111,117,114,99,101,218,9,
- 95,111,112,116,105,109,105,122,101,114,29,0,0,0,99,3,
- 0,0,0,1,0,0,0,4,0,0,0,9,0,0,0,67,
- 0,0,0,115,31,0,0,0,116,0,0,116,1,0,124,1,
- 0,124,2,0,100,1,0,100,2,0,100,3,0,100,4,0,
- 124,3,0,131,4,2,83,41,5,122,130,82,101,116,117,114,
- 110,32,116,104,101,32,99,111,100,101,32,111,98,106,101,99,
- 116,32,99,111,109,112,105,108,101,100,32,102,114,111,109,32,
- 115,111,117,114,99,101,46,10,10,32,32,32,32,32,32,32,
- 32,84,104,101,32,39,100,97,116,97,39,32,97,114,103,117,
- 109,101,110,116,32,99,97,110,32,98,101,32,97,110,121,32,
- 111,98,106,101,99,116,32,116,121,112,101,32,116,104,97,116,
- 32,99,111,109,112,105,108,101,40,41,32,115,117,112,112,111,
- 114,116,115,46,10,32,32,32,32,32,32,32,32,114,176,0,
- 0,0,218,12,100,111,110,116,95,105,110,104,101,114,105,116,
- 84,114,118,0,0,0,41,2,114,114,0,0,0,218,7,99,
- 111,109,112,105,108,101,41,4,114,71,0,0,0,114,53,0,
- 0,0,114,35,0,0,0,114,42,1,0,0,114,4,0,0,
- 0,114,4,0,0,0,114,5,0,0,0,218,14,115,111,117,
- 114,99,101,95,116,111,95,99,111,100,101,246,5,0,0,115,
- 4,0,0,0,0,5,18,1,122,27,83,111,117,114,99,101,
- 76,111,97,100,101,114,46,115,111,117,114,99,101,95,116,111,
- 95,99,111,100,101,99,2,0,0,0,0,0,0,0,10,0,
- 0,0,43,0,0,0,67,0,0,0,115,177,1,0,0,124,
- 0,0,106,0,0,124,1,0,131,1,0,125,2,0,100,1,
- 0,125,3,0,121,16,0,116,1,0,124,2,0,131,1,0,
- 125,4,0,87,110,24,0,4,116,2,0,107,10,0,114,63,
- 0,1,1,1,100,1,0,125,4,0,89,110,202,0,88,121,
- 19,0,124,0,0,106,3,0,124,2,0,131,1,0,125,5,
- 0,87,110,18,0,4,116,4,0,107,10,0,114,103,0,1,
- 1,1,89,110,162,0,88,116,5,0,124,5,0,100,2,0,
- 25,131,1,0,125,3,0,121,19,0,124,0,0,106,6,0,
- 124,4,0,131,1,0,125,6,0,87,110,18,0,4,116,7,
- 0,107,10,0,114,159,0,1,1,1,89,110,106,0,88,121,
- 34,0,116,8,0,124,6,0,100,3,0,124,5,0,100,4,
- 0,124,1,0,100,5,0,124,4,0,131,1,3,125,7,0,
- 87,110,24,0,4,116,9,0,116,10,0,102,2,0,107,10,
- 0,114,220,0,1,1,1,89,110,45,0,88,116,11,0,100,
- 6,0,124,4,0,124,2,0,131,3,0,1,116,12,0,124,
- 7,0,100,4,0,124,1,0,100,7,0,124,4,0,100,8,
- 0,124,2,0,131,1,3,83,124,0,0,106,6,0,124,2,
- 0,131,1,0,125,8,0,124,0,0,106,13,0,124,8,0,
- 124,2,0,131,2,0,125,9,0,116,11,0,100,9,0,124,
- 2,0,131,2,0,1,116,14,0,106,15,0,12,114,173,1,
- 124,4,0,100,1,0,107,9,0,114,173,1,124,3,0,100,
- 1,0,107,9,0,114,173,1,116,16,0,124,9,0,124,3,
- 0,116,17,0,124,8,0,131,1,0,131,3,0,125,6,0,
- 121,36,0,124,0,0,106,18,0,124,2,0,124,4,0,124,
- 6,0,131,3,0,1,116,11,0,100,10,0,124,4,0,131,
- 2,0,1,87,113,173,1,4,116,2,0,107,10,0,114,169,
- 1,1,1,1,89,113,173,1,88,110,0,0,124,9,0,83,
- 41,11,122,190,67,111,110,99,114,101,116,101,32,105,109,112,
- 108,101,109,101,110,116,97,116,105,111,110,32,111,102,32,73,
- 110,115,112,101,99,116,76,111,97,100,101,114,46,103,101,116,
- 95,99,111,100,101,46,10,10,32,32,32,32,32,32,32,32,
- 82,101,97,100,105,110,103,32,111,102,32,98,121,116,101,99,
- 111,100,101,32,114,101,113,117,105,114,101,115,32,112,97,116,
- 104,95,115,116,97,116,115,32,116,111,32,98,101,32,105,109,
- 112,108,101,109,101,110,116,101,100,46,32,84,111,32,119,114,
- 105,116,101,10,32,32,32,32,32,32,32,32,98,121,116,101,
- 99,111,100,101,44,32,115,101,116,95,100,97,116,97,32,109,
- 117,115,116,32,97,108,115,111,32,98,101,32,105,109,112,108,
- 101,109,101,110,116,101,100,46,10,10,32,32,32,32,32,32,
- 32,32,78,114,184,0,0,0,114,188,0,0,0,114,67,0,
- 0,0,114,35,0,0,0,122,13,123,125,32,109,97,116,99,
- 104,101,115,32,123,125,114,141,0,0,0,114,142,0,0,0,
- 122,19,99,111,100,101,32,111,98,106,101,99,116,32,102,114,
- 111,109,32,123,125,122,10,119,114,111,116,101,32,123,33,114,
- 125,41,19,114,239,0,0,0,114,132,0,0,0,114,123,0,
- 0,0,114,37,1,0,0,114,35,1,0,0,114,14,0,0,
- 0,114,40,1,0,0,114,40,0,0,0,114,191,0,0,0,
- 114,154,0,0,0,114,187,0,0,0,114,153,0,0,0,114,
- 196,0,0,0,114,45,1,0,0,114,7,0,0,0,218,19,
- 100,111,110,116,95,119,114,105,116,101,95,98,121,116,101,99,
- 111,100,101,114,199,0,0,0,114,31,0,0,0,114,39,1,
- 0,0,41,10,114,71,0,0,0,114,159,0,0,0,114,142,
- 0,0,0,114,189,0,0,0,114,141,0,0,0,218,2,115,
- 116,114,53,0,0,0,218,10,98,121,116,101,115,95,100,97,
- 116,97,114,202,0,0,0,90,11,99,111,100,101,95,111,98,
- 106,101,99,116,114,4,0,0,0,114,4,0,0,0,114,5,
- 0,0,0,114,16,1,0,0,254,5,0,0,115,78,0,0,
- 0,0,7,15,1,6,1,3,1,16,1,13,1,11,2,3,
- 1,19,1,13,1,5,2,16,1,3,1,19,1,13,1,5,
- 2,3,1,9,1,12,1,13,1,19,1,5,2,9,1,7,
- 1,15,1,6,1,7,1,15,1,18,1,13,1,22,1,12,
- 1,9,1,15,1,3,1,19,1,17,1,13,1,8,1,122,
- 21,83,111,117,114,99,101,76,111,97,100,101,114,46,103,101,
- 116,95,99,111,100,101,78,114,139,0,0,0,41,10,114,57,
- 0,0,0,114,56,0,0,0,114,58,0,0,0,114,36,1,
- 0,0,114,37,1,0,0,114,39,1,0,0,114,38,1,0,
- 0,114,17,1,0,0,114,45,1,0,0,114,16,1,0,0,
- 114,4,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
- 5,0,0,0,114,34,1,0,0,196,5,0,0,115,14,0,
- 0,0,12,2,12,8,12,13,12,10,12,7,12,10,18,8,
- 114,34,1,0,0,99,0,0,0,0,0,0,0,0,0,0,
- 0,0,4,0,0,0,0,0,0,0,115,112,0,0,0,101,
- 0,0,90,1,0,100,0,0,90,2,0,100,1,0,90,3,
- 0,100,2,0,100,3,0,132,0,0,90,4,0,100,4,0,
- 100,5,0,132,0,0,90,5,0,100,6,0,100,7,0,132,
- 0,0,90,6,0,101,7,0,135,0,0,102,1,0,100,8,
- 0,100,9,0,134,0,0,131,1,0,90,8,0,101,7,0,
- 100,10,0,100,11,0,132,0,0,131,1,0,90,9,0,100,
- 12,0,100,13,0,132,0,0,90,10,0,135,0,0,83,41,
- 14,218,10,70,105,108,101,76,111,97,100,101,114,122,103,66,
- 97,115,101,32,102,105,108,101,32,108,111,97,100,101,114,32,
- 99,108,97,115,115,32,119,104,105,99,104,32,105,109,112,108,
- 101,109,101,110,116,115,32,116,104,101,32,108,111,97,100,101,
- 114,32,112,114,111,116,111,99,111,108,32,109,101,116,104,111,
- 100,115,32,116,104,97,116,10,32,32,32,32,114,101,113,117,
- 105,114,101,32,102,105,108,101,32,115,121,115,116,101,109,32,
- 117,115,97,103,101,46,99,3,0,0,0,0,0,0,0,3,
- 0,0,0,2,0,0,0,67,0,0,0,115,22,0,0,0,
- 124,1,0,124,0,0,95,0,0,124,2,0,124,0,0,95,
- 1,0,100,1,0,83,41,2,122,75,67,97,99,104,101,32,
- 116,104,101,32,109,111,100,117,108,101,32,110,97,109,101,32,
- 97,110,100,32,116,104,101,32,112,97,116,104,32,116,111,32,
- 116,104,101,32,102,105,108,101,32,102,111,117,110,100,32,98,
- 121,32,116,104,101,10,32,32,32,32,32,32,32,32,102,105,
- 110,100,101,114,46,78,41,2,114,67,0,0,0,114,35,0,
- 0,0,41,3,114,71,0,0,0,114,159,0,0,0,114,35,
- 0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,
- 0,0,114,72,0,0,0,55,6,0,0,115,4,0,0,0,
- 0,3,9,1,122,19,70,105,108,101,76,111,97,100,101,114,
- 46,95,95,105,110,105,116,95,95,99,2,0,0,0,0,0,
- 0,0,2,0,0,0,2,0,0,0,67,0,0,0,115,34,
- 0,0,0,124,0,0,106,0,0,124,1,0,106,0,0,107,
- 2,0,111,33,0,124,0,0,106,1,0,124,1,0,106,1,
- 0,107,2,0,83,41,1,78,41,2,114,225,0,0,0,114,
- 63,0,0,0,41,2,114,71,0,0,0,114,228,0,0,0,
- 114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,114,
- 230,0,0,0,61,6,0,0,115,4,0,0,0,0,1,18,
- 1,122,17,70,105,108,101,76,111,97,100,101,114,46,95,95,
- 101,113,95,95,99,1,0,0,0,0,0,0,0,1,0,0,
- 0,3,0,0,0,67,0,0,0,115,26,0,0,0,116,0,
- 0,124,0,0,106,1,0,131,1,0,116,0,0,124,0,0,
- 106,2,0,131,1,0,65,83,41,1,78,41,3,218,4,104,
- 97,115,104,114,67,0,0,0,114,35,0,0,0,41,1,114,
- 71,0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,
- 0,0,0,218,8,95,95,104,97,115,104,95,95,65,6,0,
- 0,115,2,0,0,0,0,1,122,19,70,105,108,101,76,111,
- 97,100,101,114,46,95,95,104,97,115,104,95,95,99,2,0,
- 0,0,0,0,0,0,2,0,0,0,3,0,0,0,3,0,
- 0,0,115,22,0,0,0,116,0,0,116,1,0,124,0,0,
- 131,2,0,106,2,0,124,1,0,131,1,0,83,41,1,122,
- 100,76,111,97,100,32,97,32,109,111,100,117,108,101,32,102,
- 114,111,109,32,97,32,102,105,108,101,46,10,10,32,32,32,
- 32,32,32,32,32,84,104,105,115,32,109,101,116,104,111,100,
- 32,105,115,32,100,101,112,114,101,99,97,116,101,100,46,32,
- 32,85,115,101,32,101,120,101,99,95,109,111,100,117,108,101,
- 40,41,32,105,110,115,116,101,97,100,46,10,10,32,32,32,
- 32,32,32,32,32,41,3,218,5,115,117,112,101,114,114,49,
- 1,0,0,114,5,1,0,0,41,2,114,71,0,0,0,114,
- 159,0,0,0,41,1,114,225,0,0,0,114,4,0,0,0,
- 114,5,0,0,0,114,5,1,0,0,68,6,0,0,115,2,
- 0,0,0,0,10,122,22,70,105,108,101,76,111,97,100,101,
- 114,46,108,111,97,100,95,109,111,100,117,108,101,99,2,0,
- 0,0,0,0,0,0,2,0,0,0,1,0,0,0,67,0,
- 0,0,115,7,0,0,0,124,0,0,106,0,0,83,41,1,
- 122,58,82,101,116,117,114,110,32,116,104,101,32,112,97,116,
- 104,32,116,111,32,116,104,101,32,115,111,117,114,99,101,32,
- 102,105,108,101,32,97,115,32,102,111,117,110,100,32,98,121,
- 32,116,104,101,32,102,105,110,100,101,114,46,41,1,114,35,
- 0,0,0,41,2,114,71,0,0,0,114,159,0,0,0,114,
- 4,0,0,0,114,4,0,0,0,114,5,0,0,0,114,239,
- 0,0,0,80,6,0,0,115,2,0,0,0,0,3,122,23,
- 70,105,108,101,76,111,97,100,101,114,46,103,101,116,95,102,
- 105,108,101,110,97,109,101,99,2,0,0,0,0,0,0,0,
- 3,0,0,0,8,0,0,0,67,0,0,0,115,41,0,0,
- 0,116,0,0,106,1,0,124,1,0,100,1,0,131,2,0,
- 143,17,0,125,2,0,124,2,0,106,2,0,131,0,0,83,
- 87,100,2,0,81,88,100,2,0,83,41,3,122,39,82,101,
- 116,117,114,110,32,116,104,101,32,100,97,116,97,32,102,114,
- 111,109,32,112,97,116,104,32,97,115,32,114,97,119,32,98,
- 121,116,101,115,46,218,1,114,78,41,3,114,49,0,0,0,
- 114,50,0,0,0,90,4,114,101,97,100,41,3,114,71,0,
- 0,0,114,35,0,0,0,114,54,0,0,0,114,4,0,0,
- 0,114,4,0,0,0,114,5,0,0,0,114,40,1,0,0,
- 85,6,0,0,115,4,0,0,0,0,2,21,1,122,19,70,
- 105,108,101,76,111,97,100,101,114,46,103,101,116,95,100,97,
- 116,97,41,11,114,57,0,0,0,114,56,0,0,0,114,58,
- 0,0,0,114,59,0,0,0,114,72,0,0,0,114,230,0,
- 0,0,114,51,1,0,0,114,157,0,0,0,114,5,1,0,
- 0,114,239,0,0,0,114,40,1,0,0,114,4,0,0,0,
- 114,4,0,0,0,41,1,114,225,0,0,0,114,5,0,0,
- 0,114,49,1,0,0,50,6,0,0,115,14,0,0,0,12,
- 3,6,2,12,6,12,4,12,3,24,12,18,5,114,49,1,
- 0,0,99,0,0,0,0,0,0,0,0,0,0,0,0,4,
- 0,0,0,64,0,0,0,115,64,0,0,0,101,0,0,90,
- 1,0,100,0,0,90,2,0,100,1,0,90,3,0,100,2,
- 0,100,3,0,132,0,0,90,4,0,100,4,0,100,5,0,
- 132,0,0,90,5,0,100,6,0,100,7,0,100,8,0,100,
- 9,0,132,0,1,90,6,0,100,10,0,83,41,11,114,9,
- 1,0,0,122,62,67,111,110,99,114,101,116,101,32,105,109,
- 112,108,101,109,101,110,116,97,116,105,111,110,32,111,102,32,
- 83,111,117,114,99,101,76,111,97,100,101,114,32,117,115,105,
- 110,103,32,116,104,101,32,102,105,108,101,32,115,121,115,116,
- 101,109,46,99,2,0,0,0,0,0,0,0,3,0,0,0,
- 3,0,0,0,67,0,0,0,115,36,0,0,0,116,0,0,
- 124,1,0,131,1,0,125,2,0,105,2,0,124,2,0,106,
- 1,0,100,1,0,54,124,2,0,106,2,0,100,2,0,54,
- 83,41,3,122,33,82,101,116,117,114,110,32,116,104,101,32,
- 109,101,116,97,100,97,116,97,32,102,111,114,32,116,104,101,
- 32,112,97,116,104,46,114,184,0,0,0,114,185,0,0,0,
- 41,3,114,39,0,0,0,218,8,115,116,95,109,116,105,109,
- 101,90,7,115,116,95,115,105,122,101,41,3,114,71,0,0,
- 0,114,35,0,0,0,114,47,1,0,0,114,4,0,0,0,
- 114,4,0,0,0,114,5,0,0,0,114,37,1,0,0,95,
- 6,0,0,115,4,0,0,0,0,2,12,1,122,27,83,111,
- 117,114,99,101,70,105,108,101,76,111,97,100,101,114,46,112,
- 97,116,104,95,115,116,97,116,115,99,4,0,0,0,0,0,
- 0,0,5,0,0,0,5,0,0,0,67,0,0,0,115,34,
- 0,0,0,116,0,0,124,1,0,131,1,0,125,4,0,124,
- 0,0,106,1,0,124,2,0,124,3,0,100,1,0,124,4,
- 0,131,2,1,83,41,2,78,218,5,95,109,111,100,101,41,
- 2,114,145,0,0,0,114,38,1,0,0,41,5,114,71,0,
- 0,0,114,142,0,0,0,114,141,0,0,0,114,53,0,0,
- 0,114,42,0,0,0,114,4,0,0,0,114,4,0,0,0,
- 114,5,0,0,0,114,39,1,0,0,100,6,0,0,115,4,
- 0,0,0,0,2,12,1,122,32,83,111,117,114,99,101,70,
- 105,108,101,76,111,97,100,101,114,46,95,99,97,99,104,101,
- 95,98,121,116,101,99,111,100,101,114,55,1,0,0,105,182,
- 1,0,0,99,3,0,0,0,1,0,0,0,9,0,0,0,
- 17,0,0,0,67,0,0,0,115,53,1,0,0,116,0,0,
- 124,1,0,131,1,0,92,2,0,125,4,0,125,5,0,103,
- 0,0,125,6,0,120,54,0,124,4,0,114,80,0,116,1,
- 0,124,4,0,131,1,0,12,114,80,0,116,0,0,124,4,
- 0,131,1,0,92,2,0,125,4,0,125,7,0,124,6,0,
- 106,2,0,124,7,0,131,1,0,1,113,27,0,87,120,132,
- 0,116,3,0,124,6,0,131,1,0,68,93,118,0,125,7,
- 0,116,4,0,124,4,0,124,7,0,131,2,0,125,4,0,
- 121,17,0,116,5,0,106,6,0,124,4,0,131,1,0,1,
- 87,113,94,0,4,116,7,0,107,10,0,114,155,0,1,1,
- 1,119,94,0,89,113,94,0,4,116,8,0,107,10,0,114,
- 211,0,1,125,8,0,1,122,25,0,116,9,0,100,1,0,
- 124,4,0,124,8,0,131,3,0,1,100,2,0,83,87,89,
- 100,2,0,100,2,0,125,8,0,126,8,0,88,113,94,0,
- 88,113,94,0,87,121,33,0,116,10,0,124,1,0,124,2,
- 0,124,3,0,131,3,0,1,116,9,0,100,3,0,124,1,
- 0,131,2,0,1,87,110,53,0,4,116,8,0,107,10,0,
- 114,48,1,1,125,8,0,1,122,21,0,116,9,0,100,1,
- 0,124,1,0,124,8,0,131,3,0,1,87,89,100,2,0,
- 100,2,0,125,8,0,126,8,0,88,110,1,0,88,100,2,
- 0,83,41,4,122,27,87,114,105,116,101,32,98,121,116,101,
- 115,32,100,97,116,97,32,116,111,32,97,32,102,105,108,101,
- 46,122,27,99,111,117,108,100,32,110,111,116,32,99,114,101,
- 97,116,101,32,123,33,114,125,58,32,123,33,114,125,78,122,
- 12,99,114,101,97,116,101,100,32,123,33,114,125,41,11,114,
- 38,0,0,0,114,46,0,0,0,114,224,0,0,0,114,33,
- 0,0,0,114,28,0,0,0,114,3,0,0,0,90,5,109,
- 107,100,105,114,218,15,70,105,108,101,69,120,105,115,116,115,
- 69,114,114,111,114,114,40,0,0,0,114,153,0,0,0,114,
- 55,0,0,0,41,9,114,71,0,0,0,114,35,0,0,0,
- 114,53,0,0,0,114,55,1,0,0,114,234,0,0,0,114,
- 131,0,0,0,114,27,0,0,0,114,23,0,0,0,114,41,
- 1,0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,
- 0,0,114,38,1,0,0,105,6,0,0,115,38,0,0,0,
- 0,2,18,1,6,2,22,1,18,1,17,2,19,1,15,1,
- 3,1,17,1,13,2,7,1,18,3,16,1,27,1,3,1,
- 16,1,17,1,18,2,122,25,83,111,117,114,99,101,70,105,
- 108,101,76,111,97,100,101,114,46,115,101,116,95,100,97,116,
- 97,78,41,7,114,57,0,0,0,114,56,0,0,0,114,58,
- 0,0,0,114,59,0,0,0,114,37,1,0,0,114,39,1,
- 0,0,114,38,1,0,0,114,4,0,0,0,114,4,0,0,
- 0,114,4,0,0,0,114,5,0,0,0,114,9,1,0,0,
- 91,6,0,0,115,8,0,0,0,12,2,6,2,12,5,12,
- 5,114,9,1,0,0,99,0,0,0,0,0,0,0,0,0,
+ 16,114,1,0,0,0,114,0,0,0,0,114,2,0,0,0,
+ 114,3,0,0,0,114,158,0,0,0,114,92,0,0,0,114,
+ 159,0,0,0,114,154,0,0,0,114,155,0,0,0,114,138,
+ 0,0,0,114,139,0,0,0,114,146,0,0,0,114,84,0,
+ 0,0,114,156,0,0,0,114,157,0,0,0,114,109,0,0,
+ 0,114,10,0,0,0,114,10,0,0,0,114,10,0,0,0,
+ 114,11,0,0,0,114,160,0,0,0,3,3,0,0,115,30,
+ 0,0,0,12,7,6,2,18,9,3,1,21,6,3,1,18,
+ 8,18,4,18,9,18,9,3,1,21,5,3,1,21,5,3,
+ 1,114,160,0,0,0,99,0,0,0,0,0,0,0,0,0,
0,0,0,2,0,0,0,64,0,0,0,115,46,0,0,0,
101,0,0,90,1,0,100,0,0,90,2,0,100,1,0,90,
3,0,100,2,0,100,3,0,132,0,0,90,4,0,100,4,
0,100,5,0,132,0,0,90,5,0,100,6,0,83,41,7,
- 114,8,1,0,0,122,45,76,111,97,100,101,114,32,119,104,
- 105,99,104,32,104,97,110,100,108,101,115,32,115,111,117,114,
- 99,101,108,101,115,115,32,102,105,108,101,32,105,109,112,111,
- 114,116,115,46,99,2,0,0,0,0,0,0,0,5,0,0,
- 0,6,0,0,0,67,0,0,0,115,76,0,0,0,124,0,
- 0,106,0,0,124,1,0,131,1,0,125,2,0,124,0,0,
- 106,1,0,124,2,0,131,1,0,125,3,0,116,2,0,124,
- 3,0,100,1,0,124,1,0,100,2,0,124,2,0,131,1,
- 2,125,4,0,116,3,0,124,4,0,100,1,0,124,1,0,
- 100,3,0,124,2,0,131,1,2,83,41,4,78,114,67,0,
- 0,0,114,35,0,0,0,114,141,0,0,0,41,4,114,239,
- 0,0,0,114,40,1,0,0,114,191,0,0,0,114,196,0,
- 0,0,41,5,114,71,0,0,0,114,159,0,0,0,114,35,
- 0,0,0,114,53,0,0,0,114,48,1,0,0,114,4,0,
- 0,0,114,4,0,0,0,114,5,0,0,0,114,16,1,0,
- 0,138,6,0,0,115,8,0,0,0,0,1,15,1,15,1,
- 24,1,122,29,83,111,117,114,99,101,108,101,115,115,70,105,
- 108,101,76,111,97,100,101,114,46,103,101,116,95,99,111,100,
- 101,99,2,0,0,0,0,0,0,0,2,0,0,0,1,0,
- 0,0,67,0,0,0,115,4,0,0,0,100,1,0,83,41,
- 2,122,39,82,101,116,117,114,110,32,78,111,110,101,32,97,
- 115,32,116,104,101,114,101,32,105,115,32,110,111,32,115,111,
- 117,114,99,101,32,99,111,100,101,46,78,114,4,0,0,0,
- 41,2,114,71,0,0,0,114,159,0,0,0,114,4,0,0,
- 0,114,4,0,0,0,114,5,0,0,0,114,17,1,0,0,
- 144,6,0,0,115,2,0,0,0,0,2,122,31,83,111,117,
- 114,99,101,108,101,115,115,70,105,108,101,76,111,97,100,101,
- 114,46,103,101,116,95,115,111,117,114,99,101,78,41,6,114,
- 57,0,0,0,114,56,0,0,0,114,58,0,0,0,114,59,
- 0,0,0,114,16,1,0,0,114,17,1,0,0,114,4,0,
- 0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,
- 0,114,8,1,0,0,134,6,0,0,115,6,0,0,0,12,
- 2,6,2,12,6,114,8,1,0,0,99,0,0,0,0,0,
- 0,0,0,0,0,0,0,3,0,0,0,64,0,0,0,115,
- 130,0,0,0,101,0,0,90,1,0,100,0,0,90,2,0,
- 100,1,0,90,3,0,100,2,0,100,3,0,132,0,0,90,
- 4,0,100,4,0,100,5,0,132,0,0,90,5,0,100,6,
- 0,100,7,0,132,0,0,90,6,0,101,7,0,100,8,0,
- 100,9,0,132,0,0,131,1,0,90,8,0,100,10,0,100,
- 11,0,132,0,0,90,9,0,100,12,0,100,13,0,132,0,
- 0,90,10,0,100,14,0,100,15,0,132,0,0,90,11,0,
- 101,7,0,100,16,0,100,17,0,132,0,0,131,1,0,90,
- 12,0,100,18,0,83,41,19,218,19,69,120,116,101,110,115,
- 105,111,110,70,105,108,101,76,111,97,100,101,114,122,93,76,
- 111,97,100,101,114,32,102,111,114,32,101,120,116,101,110,115,
- 105,111,110,32,109,111,100,117,108,101,115,46,10,10,32,32,
- 32,32,84,104,101,32,99,111,110,115,116,114,117,99,116,111,
- 114,32,105,115,32,100,101,115,105,103,110,101,100,32,116,111,
- 32,119,111,114,107,32,119,105,116,104,32,70,105,108,101,70,
- 105,110,100,101,114,46,10,10,32,32,32,32,99,3,0,0,
- 0,0,0,0,0,3,0,0,0,2,0,0,0,67,0,0,
- 0,115,22,0,0,0,124,1,0,124,0,0,95,0,0,124,
- 2,0,124,0,0,95,1,0,100,0,0,83,41,1,78,41,
- 2,114,67,0,0,0,114,35,0,0,0,41,3,114,71,0,
- 0,0,114,67,0,0,0,114,35,0,0,0,114,4,0,0,
- 0,114,4,0,0,0,114,5,0,0,0,114,72,0,0,0,
- 161,6,0,0,115,4,0,0,0,0,1,9,1,122,28,69,
- 120,116,101,110,115,105,111,110,70,105,108,101,76,111,97,100,
- 101,114,46,95,95,105,110,105,116,95,95,99,2,0,0,0,
- 0,0,0,0,2,0,0,0,2,0,0,0,67,0,0,0,
- 115,34,0,0,0,124,0,0,106,0,0,124,1,0,106,0,
- 0,107,2,0,111,33,0,124,0,0,106,1,0,124,1,0,
- 106,1,0,107,2,0,83,41,1,78,41,2,114,225,0,0,
- 0,114,63,0,0,0,41,2,114,71,0,0,0,114,228,0,
- 0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,
- 0,114,230,0,0,0,165,6,0,0,115,4,0,0,0,0,
- 1,18,1,122,26,69,120,116,101,110,115,105,111,110,70,105,
- 108,101,76,111,97,100,101,114,46,95,95,101,113,95,95,99,
- 1,0,0,0,0,0,0,0,1,0,0,0,3,0,0,0,
- 67,0,0,0,115,26,0,0,0,116,0,0,124,0,0,106,
- 1,0,131,1,0,116,0,0,124,0,0,106,2,0,131,1,
- 0,65,83,41,1,78,41,3,114,50,1,0,0,114,67,0,
- 0,0,114,35,0,0,0,41,1,114,71,0,0,0,114,4,
- 0,0,0,114,4,0,0,0,114,5,0,0,0,114,51,1,
- 0,0,169,6,0,0,115,2,0,0,0,0,1,122,28,69,
- 120,116,101,110,115,105,111,110,70,105,108,101,76,111,97,100,
- 101,114,46,95,95,104,97,115,104,95,95,99,2,0,0,0,
- 0,0,0,0,4,0,0,0,11,0,0,0,67,0,0,0,
- 115,183,0,0,0,116,0,0,124,1,0,131,1,0,143,29,
- 0,1,116,1,0,116,2,0,106,3,0,124,1,0,124,0,
- 0,106,4,0,131,3,0,125,2,0,87,100,1,0,81,88,
- 116,5,0,100,2,0,124,0,0,106,4,0,131,2,0,1,
- 124,0,0,106,6,0,124,1,0,131,1,0,125,3,0,124,
- 3,0,114,124,0,116,7,0,124,2,0,100,3,0,131,2,
- 0,12,114,124,0,116,8,0,124,0,0,106,4,0,131,1,
- 0,100,4,0,25,103,1,0,124,2,0,95,9,0,110,0,
- 0,124,0,0,124,2,0,95,10,0,124,2,0,106,11,0,
- 124,2,0,95,12,0,124,3,0,115,179,0,124,2,0,106,
- 12,0,106,13,0,100,5,0,131,1,0,100,4,0,25,124,
- 2,0,95,12,0,110,0,0,124,2,0,83,41,6,122,25,
- 76,111,97,100,32,97,110,32,101,120,116,101,110,115,105,111,
- 110,32,109,111,100,117,108,101,46,78,122,33,101,120,116,101,
- 110,115,105,111,110,32,109,111,100,117,108,101,32,108,111,97,
- 100,101,100,32,102,114,111,109,32,123,33,114,125,114,247,0,
- 0,0,114,84,0,0,0,114,116,0,0,0,41,14,114,69,
- 0,0,0,114,114,0,0,0,114,106,0,0,0,90,12,108,
- 111,97,100,95,100,121,110,97,109,105,99,114,35,0,0,0,
- 114,153,0,0,0,114,220,0,0,0,114,60,0,0,0,114,
- 38,0,0,0,114,247,0,0,0,114,205,0,0,0,114,57,
- 0,0,0,114,251,0,0,0,114,32,0,0,0,41,4,114,
- 71,0,0,0,114,159,0,0,0,114,180,0,0,0,114,220,
- 0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,
- 0,0,114,5,1,0,0,172,6,0,0,115,24,0,0,0,
- 0,5,13,1,9,1,21,1,16,1,15,1,22,1,28,1,
- 9,1,12,1,6,1,28,1,122,31,69,120,116,101,110,115,
- 105,111,110,70,105,108,101,76,111,97,100,101,114,46,108,111,
- 97,100,95,109,111,100,117,108,101,99,2,0,0,0,0,0,
- 0,0,2,0,0,0,4,0,0,0,3,0,0,0,115,48,
- 0,0,0,116,0,0,124,0,0,106,1,0,131,1,0,100,
- 1,0,25,137,0,0,116,2,0,135,0,0,102,1,0,100,
- 2,0,100,3,0,134,0,0,116,3,0,68,131,1,0,131,
- 1,0,83,41,4,122,49,82,101,116,117,114,110,32,84,114,
- 117,101,32,105,102,32,116,104,101,32,101,120,116,101,110,115,
- 105,111,110,32,109,111,100,117,108,101,32,105,115,32,97,32,
- 112,97,99,107,97,103,101,46,114,29,0,0,0,99,1,0,
- 0,0,0,0,0,0,2,0,0,0,4,0,0,0,51,0,
- 0,0,115,31,0,0,0,124,0,0,93,21,0,125,1,0,
- 136,0,0,100,0,0,124,1,0,23,107,2,0,86,1,113,
- 3,0,100,1,0,83,41,2,114,72,0,0,0,78,114,4,
- 0,0,0,41,2,114,22,0,0,0,218,6,115,117,102,102,
- 105,120,41,1,218,9,102,105,108,101,95,110,97,109,101,114,
- 4,0,0,0,114,5,0,0,0,114,77,0,0,0,193,6,
- 0,0,115,2,0,0,0,6,1,122,49,69,120,116,101,110,
- 115,105,111,110,70,105,108,101,76,111,97,100,101,114,46,105,
- 115,95,112,97,99,107,97,103,101,46,60,108,111,99,97,108,
- 115,62,46,60,103,101,110,101,120,112,114,62,41,4,114,38,
- 0,0,0,114,35,0,0,0,114,78,0,0,0,218,18,69,
- 88,84,69,78,83,73,79,78,95,83,85,70,70,73,88,69,
- 83,41,2,114,71,0,0,0,114,159,0,0,0,114,4,0,
- 0,0,41,1,114,59,1,0,0,114,5,0,0,0,114,220,
- 0,0,0,190,6,0,0,115,6,0,0,0,0,2,19,1,
- 18,1,122,30,69,120,116,101,110,115,105,111,110,70,105,108,
- 101,76,111,97,100,101,114,46,105,115,95,112,97,99,107,97,
- 103,101,99,2,0,0,0,0,0,0,0,2,0,0,0,1,
- 0,0,0,67,0,0,0,115,4,0,0,0,100,1,0,83,
- 41,2,122,63,82,101,116,117,114,110,32,78,111,110,101,32,
- 97,115,32,97,110,32,101,120,116,101,110,115,105,111,110,32,
- 109,111,100,117,108,101,32,99,97,110,110,111,116,32,99,114,
- 101,97,116,101,32,97,32,99,111,100,101,32,111,98,106,101,
- 99,116,46,78,114,4,0,0,0,41,2,114,71,0,0,0,
- 114,159,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
- 5,0,0,0,114,16,1,0,0,196,6,0,0,115,2,0,
- 0,0,0,2,122,28,69,120,116,101,110,115,105,111,110,70,
- 105,108,101,76,111,97,100,101,114,46,103,101,116,95,99,111,
- 100,101,99,2,0,0,0,0,0,0,0,2,0,0,0,1,
- 0,0,0,67,0,0,0,115,4,0,0,0,100,1,0,83,
- 41,2,122,53,82,101,116,117,114,110,32,78,111,110,101,32,
- 97,115,32,101,120,116,101,110,115,105,111,110,32,109,111,100,
- 117,108,101,115,32,104,97,118,101,32,110,111,32,115,111,117,
- 114,99,101,32,99,111,100,101,46,78,114,4,0,0,0,41,
- 2,114,71,0,0,0,114,159,0,0,0,114,4,0,0,0,
- 114,4,0,0,0,114,5,0,0,0,114,17,1,0,0,200,
- 6,0,0,115,2,0,0,0,0,2,122,30,69,120,116,101,
- 110,115,105,111,110,70,105,108,101,76,111,97,100,101,114,46,
- 103,101,116,95,115,111,117,114,99,101,99,2,0,0,0,0,
- 0,0,0,2,0,0,0,1,0,0,0,67,0,0,0,115,
- 7,0,0,0,124,0,0,106,0,0,83,41,1,122,58,82,
- 101,116,117,114,110,32,116,104,101,32,112,97,116,104,32,116,
- 111,32,116,104,101,32,115,111,117,114,99,101,32,102,105,108,
- 101,32,97,115,32,102,111,117,110,100,32,98,121,32,116,104,
- 101,32,102,105,110,100,101,114,46,41,1,114,35,0,0,0,
- 41,2,114,71,0,0,0,114,159,0,0,0,114,4,0,0,
- 0,114,4,0,0,0,114,5,0,0,0,114,239,0,0,0,
- 204,6,0,0,115,2,0,0,0,0,3,122,32,69,120,116,
- 101,110,115,105,111,110,70,105,108,101,76,111,97,100,101,114,
- 46,103,101,116,95,102,105,108,101,110,97,109,101,78,41,13,
- 114,57,0,0,0,114,56,0,0,0,114,58,0,0,0,114,
- 59,0,0,0,114,72,0,0,0,114,230,0,0,0,114,51,
- 1,0,0,114,157,0,0,0,114,5,1,0,0,114,220,0,
- 0,0,114,16,1,0,0,114,17,1,0,0,114,239,0,0,
- 0,114,4,0,0,0,114,4,0,0,0,114,4,0,0,0,
- 114,5,0,0,0,114,57,1,0,0,153,6,0,0,115,18,
- 0,0,0,12,6,6,2,12,4,12,4,12,3,18,18,12,
- 6,12,4,12,4,114,57,1,0,0,99,0,0,0,0,0,
- 0,0,0,0,0,0,0,2,0,0,0,64,0,0,0,115,
- 130,0,0,0,101,0,0,90,1,0,100,0,0,90,2,0,
- 100,1,0,90,3,0,100,2,0,100,3,0,132,0,0,90,
- 4,0,100,4,0,100,5,0,132,0,0,90,5,0,100,6,
- 0,100,7,0,132,0,0,90,6,0,100,8,0,100,9,0,
- 132,0,0,90,7,0,100,10,0,100,11,0,132,0,0,90,
- 8,0,100,12,0,100,13,0,132,0,0,90,9,0,100,14,
- 0,100,15,0,132,0,0,90,10,0,100,16,0,100,17,0,
- 132,0,0,90,11,0,100,18,0,100,19,0,132,0,0,90,
- 12,0,100,20,0,83,41,21,218,14,95,78,97,109,101,115,
- 112,97,99,101,80,97,116,104,97,38,1,0,0,82,101,112,
- 114,101,115,101,110,116,115,32,97,32,110,97,109,101,115,112,
- 97,99,101,32,112,97,99,107,97,103,101,39,115,32,112,97,
- 116,104,46,32,32,73,116,32,117,115,101,115,32,116,104,101,
- 32,109,111,100,117,108,101,32,110,97,109,101,10,32,32,32,
- 32,116,111,32,102,105,110,100,32,105,116,115,32,112,97,114,
- 101,110,116,32,109,111,100,117,108,101,44,32,97,110,100,32,
- 102,114,111,109,32,116,104,101,114,101,32,105,116,32,108,111,
- 111,107,115,32,117,112,32,116,104,101,32,112,97,114,101,110,
- 116,39,115,10,32,32,32,32,95,95,112,97,116,104,95,95,
- 46,32,32,87,104,101,110,32,116,104,105,115,32,99,104,97,
- 110,103,101,115,44,32,116,104,101,32,109,111,100,117,108,101,
- 39,115,32,111,119,110,32,112,97,116,104,32,105,115,32,114,
- 101,99,111,109,112,117,116,101,100,44,10,32,32,32,32,117,
- 115,105,110,103,32,112,97,116,104,95,102,105,110,100,101,114,
- 46,32,32,70,111,114,32,116,111,112,45,108,101,118,101,108,
- 32,109,111,100,117,108,101,115,44,32,116,104,101,32,112,97,
- 114,101,110,116,32,109,111,100,117,108,101,39,115,32,112,97,
- 116,104,10,32,32,32,32,105,115,32,115,121,115,46,112,97,
- 116,104,46,99,4,0,0,0,0,0,0,0,4,0,0,0,
- 2,0,0,0,67,0,0,0,115,52,0,0,0,124,1,0,
- 124,0,0,95,0,0,124,2,0,124,0,0,95,1,0,116,
- 2,0,124,0,0,106,3,0,131,0,0,131,1,0,124,0,
- 0,95,4,0,124,3,0,124,0,0,95,5,0,100,0,0,
- 83,41,1,78,41,6,114,70,0,0,0,114,254,0,0,0,
- 114,232,0,0,0,218,16,95,103,101,116,95,112,97,114,101,
- 110,116,95,112,97,116,104,218,17,95,108,97,115,116,95,112,
- 97,114,101,110,116,95,112,97,116,104,218,12,95,112,97,116,
- 104,95,102,105,110,100,101,114,41,4,114,71,0,0,0,114,
- 67,0,0,0,114,35,0,0,0,218,11,112,97,116,104,95,
- 102,105,110,100,101,114,114,4,0,0,0,114,4,0,0,0,
- 114,5,0,0,0,114,72,0,0,0,217,6,0,0,115,8,
- 0,0,0,0,1,9,1,9,1,21,1,122,23,95,78,97,
- 109,101,115,112,97,99,101,80,97,116,104,46,95,95,105,110,
- 105,116,95,95,99,1,0,0,0,0,0,0,0,4,0,0,
- 0,3,0,0,0,67,0,0,0,115,53,0,0,0,124,0,
- 0,106,0,0,106,1,0,100,1,0,131,1,0,92,3,0,
- 125,1,0,125,2,0,125,3,0,124,2,0,100,2,0,107,
- 2,0,114,43,0,100,6,0,83,124,1,0,100,5,0,102,
- 2,0,83,41,7,122,62,82,101,116,117,114,110,115,32,97,
- 32,116,117,112,108,101,32,111,102,32,40,112,97,114,101,110,
- 116,45,109,111,100,117,108,101,45,110,97,109,101,44,32,112,
- 97,114,101,110,116,45,112,97,116,104,45,97,116,116,114,45,
- 110,97,109,101,41,114,116,0,0,0,114,30,0,0,0,114,
- 7,0,0,0,114,35,0,0,0,114,247,0,0,0,41,2,
- 122,3,115,121,115,122,4,112,97,116,104,41,2,114,70,0,
- 0,0,114,32,0,0,0,41,4,114,71,0,0,0,114,234,
- 0,0,0,218,3,100,111,116,114,94,0,0,0,114,4,0,
- 0,0,114,4,0,0,0,114,5,0,0,0,218,23,95,102,
- 105,110,100,95,112,97,114,101,110,116,95,112,97,116,104,95,
- 110,97,109,101,115,223,6,0,0,115,8,0,0,0,0,2,
- 27,1,12,2,4,3,122,38,95,78,97,109,101,115,112,97,
- 99,101,80,97,116,104,46,95,102,105,110,100,95,112,97,114,
- 101,110,116,95,112,97,116,104,95,110,97,109,101,115,99,1,
- 0,0,0,0,0,0,0,3,0,0,0,3,0,0,0,67,
- 0,0,0,115,38,0,0,0,124,0,0,106,0,0,131,0,
- 0,92,2,0,125,1,0,125,2,0,116,1,0,116,2,0,
- 106,3,0,124,1,0,25,124,2,0,131,2,0,83,41,1,
- 78,41,4,114,67,1,0,0,114,62,0,0,0,114,7,0,
- 0,0,114,73,0,0,0,41,3,114,71,0,0,0,90,18,
- 112,97,114,101,110,116,95,109,111,100,117,108,101,95,110,97,
- 109,101,90,14,112,97,116,104,95,97,116,116,114,95,110,97,
- 109,101,114,4,0,0,0,114,4,0,0,0,114,5,0,0,
- 0,114,62,1,0,0,233,6,0,0,115,4,0,0,0,0,
- 1,18,1,122,31,95,78,97,109,101,115,112,97,99,101,80,
- 97,116,104,46,95,103,101,116,95,112,97,114,101,110,116,95,
- 112,97,116,104,99,1,0,0,0,0,0,0,0,3,0,0,
- 0,3,0,0,0,67,0,0,0,115,127,0,0,0,116,0,
- 0,124,0,0,106,1,0,131,0,0,131,1,0,125,1,0,
- 124,1,0,124,0,0,106,2,0,107,3,0,114,120,0,124,
- 0,0,106,3,0,124,0,0,106,4,0,124,1,0,131,2,
- 0,125,2,0,124,2,0,100,0,0,107,9,0,114,108,0,
- 124,2,0,106,5,0,100,0,0,107,8,0,114,108,0,124,
- 2,0,106,6,0,114,108,0,124,2,0,106,6,0,124,0,
- 0,95,7,0,113,108,0,110,0,0,124,1,0,124,0,0,
- 95,2,0,110,0,0,124,0,0,106,7,0,83,41,1,78,
- 41,8,114,232,0,0,0,114,62,1,0,0,114,63,1,0,
- 0,114,64,1,0,0,114,70,0,0,0,114,170,0,0,0,
- 114,221,0,0,0,114,254,0,0,0,41,3,114,71,0,0,
- 0,90,11,112,97,114,101,110,116,95,112,97,116,104,114,178,
- 0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,
- 0,0,218,12,95,114,101,99,97,108,99,117,108,97,116,101,
- 237,6,0,0,115,16,0,0,0,0,2,18,1,15,1,21,
- 3,27,1,9,1,18,1,12,1,122,27,95,78,97,109,101,
- 115,112,97,99,101,80,97,116,104,46,95,114,101,99,97,108,
- 99,117,108,97,116,101,99,1,0,0,0,0,0,0,0,1,
- 0,0,0,2,0,0,0,67,0,0,0,115,16,0,0,0,
- 116,0,0,124,0,0,106,1,0,131,0,0,131,1,0,83,
- 41,1,78,41,2,218,4,105,116,101,114,114,68,1,0,0,
- 41,1,114,71,0,0,0,114,4,0,0,0,114,4,0,0,
- 0,114,5,0,0,0,218,8,95,95,105,116,101,114,95,95,
- 250,6,0,0,115,2,0,0,0,0,1,122,23,95,78,97,
- 109,101,115,112,97,99,101,80,97,116,104,46,95,95,105,116,
- 101,114,95,95,99,1,0,0,0,0,0,0,0,1,0,0,
- 0,2,0,0,0,67,0,0,0,115,16,0,0,0,116,0,
- 0,124,0,0,106,1,0,131,0,0,131,1,0,83,41,1,
- 78,41,2,114,31,0,0,0,114,68,1,0,0,41,1,114,
- 71,0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,
- 0,0,0,218,7,95,95,108,101,110,95,95,253,6,0,0,
- 115,2,0,0,0,0,1,122,22,95,78,97,109,101,115,112,
- 97,99,101,80,97,116,104,46,95,95,108,101,110,95,95,99,
- 1,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,
- 67,0,0,0,115,16,0,0,0,100,1,0,106,0,0,124,
- 0,0,106,1,0,131,1,0,83,41,2,78,122,20,95,78,
- 97,109,101,115,112,97,99,101,80,97,116,104,40,123,33,114,
- 125,41,41,2,114,47,0,0,0,114,254,0,0,0,41,1,
- 114,71,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
- 5,0,0,0,114,101,0,0,0,0,7,0,0,115,2,0,
- 0,0,0,1,122,23,95,78,97,109,101,115,112,97,99,101,
- 80,97,116,104,46,95,95,114,101,112,114,95,95,99,2,0,
- 0,0,0,0,0,0,2,0,0,0,2,0,0,0,67,0,
- 0,0,115,16,0,0,0,124,1,0,124,0,0,106,0,0,
- 131,0,0,107,6,0,83,41,1,78,41,1,114,68,1,0,
- 0,41,2,114,71,0,0,0,218,4,105,116,101,109,114,4,
- 0,0,0,114,4,0,0,0,114,5,0,0,0,218,12,95,
- 95,99,111,110,116,97,105,110,115,95,95,3,7,0,0,115,
- 2,0,0,0,0,1,122,27,95,78,97,109,101,115,112,97,
- 99,101,80,97,116,104,46,95,95,99,111,110,116,97,105,110,
- 115,95,95,99,2,0,0,0,0,0,0,0,2,0,0,0,
- 2,0,0,0,67,0,0,0,115,20,0,0,0,124,0,0,
- 106,0,0,106,1,0,124,1,0,131,1,0,1,100,0,0,
- 83,41,1,78,41,2,114,254,0,0,0,114,224,0,0,0,
- 41,2,114,71,0,0,0,114,72,1,0,0,114,4,0,0,
- 0,114,4,0,0,0,114,5,0,0,0,114,224,0,0,0,
- 6,7,0,0,115,2,0,0,0,0,1,122,21,95,78,97,
- 109,101,115,112,97,99,101,80,97,116,104,46,97,112,112,101,
- 110,100,78,41,13,114,57,0,0,0,114,56,0,0,0,114,
- 58,0,0,0,114,59,0,0,0,114,72,0,0,0,114,67,
- 1,0,0,114,62,1,0,0,114,68,1,0,0,114,70,1,
- 0,0,114,71,1,0,0,114,101,0,0,0,114,73,1,0,
- 0,114,224,0,0,0,114,4,0,0,0,114,4,0,0,0,
- 114,4,0,0,0,114,5,0,0,0,114,61,1,0,0,210,
- 6,0,0,115,20,0,0,0,12,5,6,2,12,6,12,10,
- 12,4,12,13,12,3,12,3,12,3,12,3,114,61,1,0,
- 0,99,0,0,0,0,0,0,0,0,0,0,0,0,3,0,
- 0,0,64,0,0,0,115,106,0,0,0,101,0,0,90,1,
- 0,100,0,0,90,2,0,100,1,0,100,2,0,132,0,0,
- 90,3,0,101,4,0,100,3,0,100,4,0,132,0,0,131,
- 1,0,90,5,0,100,5,0,100,6,0,132,0,0,90,6,
- 0,100,7,0,100,8,0,132,0,0,90,7,0,100,9,0,
- 100,10,0,132,0,0,90,8,0,100,11,0,100,12,0,132,
- 0,0,90,9,0,100,13,0,100,14,0,132,0,0,90,10,
- 0,100,15,0,83,41,16,114,252,0,0,0,99,4,0,0,
+ 218,18,95,73,109,112,111,114,116,76,111,99,107,67,111,110,
+ 116,101,120,116,122,36,67,111,110,116,101,120,116,32,109,97,
+ 110,97,103,101,114,32,102,111,114,32,116,104,101,32,105,109,
+ 112,111,114,116,32,108,111,99,107,46,99,1,0,0,0,0,
+ 0,0,0,1,0,0,0,1,0,0,0,67,0,0,0,115,
+ 14,0,0,0,116,0,0,106,1,0,131,0,0,1,100,1,
+ 0,83,41,2,122,24,65,99,113,117,105,114,101,32,116,104,
+ 101,32,105,109,112,111,114,116,32,108,111,99,107,46,78,41,
+ 2,114,57,0,0,0,114,145,0,0,0,41,1,114,19,0,
+ 0,0,114,10,0,0,0,114,10,0,0,0,114,11,0,0,
+ 0,114,23,0,0,0,84,3,0,0,115,2,0,0,0,0,
+ 2,122,28,95,73,109,112,111,114,116,76,111,99,107,67,111,
+ 110,116,101,120,116,46,95,95,101,110,116,101,114,95,95,99,
+ 4,0,0,0,0,0,0,0,4,0,0,0,1,0,0,0,
+ 67,0,0,0,115,14,0,0,0,116,0,0,106,1,0,131,
+ 0,0,1,100,1,0,83,41,2,122,60,82,101,108,101,97,
+ 115,101,32,116,104,101,32,105,109,112,111,114,116,32,108,111,
+ 99,107,32,114,101,103,97,114,100,108,101,115,115,32,111,102,
+ 32,97,110,121,32,114,97,105,115,101,100,32,101,120,99,101,
+ 112,116,105,111,110,115,46,78,41,2,114,57,0,0,0,114,
+ 58,0,0,0,41,4,114,19,0,0,0,90,8,101,120,99,
+ 95,116,121,112,101,90,9,101,120,99,95,118,97,108,117,101,
+ 90,13,101,120,99,95,116,114,97,99,101,98,97,99,107,114,
+ 10,0,0,0,114,10,0,0,0,114,11,0,0,0,114,30,
+ 0,0,0,88,3,0,0,115,2,0,0,0,0,2,122,27,
+ 95,73,109,112,111,114,116,76,111,99,107,67,111,110,116,101,
+ 120,116,46,95,95,101,120,105,116,95,95,78,41,6,114,1,
+ 0,0,0,114,0,0,0,0,114,2,0,0,0,114,3,0,
+ 0,0,114,23,0,0,0,114,30,0,0,0,114,10,0,0,
+ 0,114,10,0,0,0,114,10,0,0,0,114,11,0,0,0,
+ 114,165,0,0,0,80,3,0,0,115,6,0,0,0,12,2,
+ 6,2,12,4,114,165,0,0,0,99,3,0,0,0,0,0,
+ 0,0,5,0,0,0,4,0,0,0,67,0,0,0,115,88,
+ 0,0,0,124,1,0,106,0,0,100,1,0,124,2,0,100,
+ 2,0,24,131,2,0,125,3,0,116,1,0,124,3,0,131,
+ 1,0,124,2,0,107,0,0,114,52,0,116,2,0,100,3,
+ 0,131,1,0,130,1,0,124,3,0,100,4,0,25,125,4,
+ 0,124,0,0,114,84,0,100,5,0,106,3,0,124,4,0,
+ 124,0,0,131,2,0,83,124,4,0,83,41,6,122,50,82,
+ 101,115,111,108,118,101,32,97,32,114,101,108,97,116,105,118,
+ 101,32,109,111,100,117,108,101,32,110,97,109,101,32,116,111,
+ 32,97,110,32,97,98,115,111,108,117,116,101,32,111,110,101,
+ 46,114,121,0,0,0,114,45,0,0,0,122,50,97,116,116,
+ 101,109,112,116,101,100,32,114,101,108,97,116,105,118,101,32,
+ 105,109,112,111,114,116,32,98,101,121,111,110,100,32,116,111,
+ 112,45,108,101,118,101,108,32,112,97,99,107,97,103,101,114,
+ 33,0,0,0,122,5,123,125,46,123,125,41,4,218,6,114,
+ 115,112,108,105,116,218,3,108,101,110,218,10,86,97,108,117,
+ 101,69,114,114,111,114,114,50,0,0,0,41,5,114,15,0,
+ 0,0,218,7,112,97,99,107,97,103,101,218,5,108,101,118,
+ 101,108,90,4,98,105,116,115,90,4,98,97,115,101,114,10,
+ 0,0,0,114,10,0,0,0,114,11,0,0,0,218,13,95,
+ 114,101,115,111,108,118,101,95,110,97,109,101,93,3,0,0,
+ 115,10,0,0,0,0,2,22,1,18,1,12,1,10,1,114,
+ 171,0,0,0,99,3,0,0,0,0,0,0,0,4,0,0,
+ 0,3,0,0,0,67,0,0,0,115,47,0,0,0,124,0,
+ 0,106,0,0,124,1,0,124,2,0,131,2,0,125,3,0,
+ 124,3,0,100,0,0,107,8,0,114,34,0,100,0,0,83,
+ 116,1,0,124,1,0,124,3,0,131,2,0,83,41,1,78,
+ 41,2,114,155,0,0,0,114,85,0,0,0,41,4,218,6,
+ 102,105,110,100,101,114,114,15,0,0,0,114,152,0,0,0,
+ 114,99,0,0,0,114,10,0,0,0,114,10,0,0,0,114,
+ 11,0,0,0,218,17,95,102,105,110,100,95,115,112,101,99,
+ 95,108,101,103,97,99,121,102,3,0,0,115,8,0,0,0,
+ 0,3,18,1,12,1,4,1,114,173,0,0,0,99,3,0,
+ 0,0,0,0,0,0,9,0,0,0,27,0,0,0,67,0,
+ 0,0,115,42,1,0,0,116,0,0,106,1,0,100,1,0,
+ 107,9,0,114,41,0,116,0,0,106,1,0,12,114,41,0,
+ 116,2,0,106,3,0,100,2,0,116,4,0,131,2,0,1,
+ 124,0,0,116,0,0,106,5,0,107,6,0,125,3,0,120,
+ 235,0,116,0,0,106,1,0,68,93,220,0,125,4,0,116,
+ 6,0,131,0,0,143,90,0,1,121,13,0,124,4,0,106,
+ 7,0,125,5,0,87,110,51,0,4,116,8,0,107,10,0,
+ 114,148,0,1,1,1,116,9,0,124,4,0,124,0,0,124,
+ 1,0,131,3,0,125,6,0,124,6,0,100,1,0,107,8,
+ 0,114,144,0,119,66,0,89,110,19,0,88,124,5,0,124,
+ 0,0,124,1,0,124,2,0,131,3,0,125,6,0,87,100,
+ 1,0,81,82,88,124,6,0,100,1,0,107,9,0,114,66,
+ 0,124,3,0,12,114,26,1,124,0,0,116,0,0,106,5,
+ 0,107,6,0,114,26,1,116,0,0,106,5,0,124,0,0,
+ 25,125,7,0,121,13,0,124,7,0,106,10,0,125,8,0,
+ 87,110,22,0,4,116,8,0,107,10,0,114,2,1,1,1,
+ 1,124,6,0,83,89,113,30,1,88,124,8,0,100,1,0,
+ 107,8,0,114,19,1,124,6,0,83,124,8,0,83,113,66,
+ 0,124,6,0,83,113,66,0,87,100,1,0,83,100,1,0,
+ 83,41,3,122,23,70,105,110,100,32,97,32,109,111,100,117,
+ 108,101,39,115,32,108,111,97,100,101,114,46,78,122,22,115,
+ 121,115,46,109,101,116,97,95,112,97,116,104,32,105,115,32,
+ 101,109,112,116,121,41,11,114,14,0,0,0,218,9,109,101,
+ 116,97,95,112,97,116,104,114,141,0,0,0,114,142,0,0,
+ 0,218,13,73,109,112,111,114,116,87,97,114,110,105,110,103,
+ 114,21,0,0,0,114,165,0,0,0,114,154,0,0,0,114,
+ 96,0,0,0,114,173,0,0,0,114,95,0,0,0,41,9,
+ 114,15,0,0,0,114,152,0,0,0,114,153,0,0,0,90,
+ 9,105,115,95,114,101,108,111,97,100,114,172,0,0,0,114,
+ 154,0,0,0,114,88,0,0,0,114,89,0,0,0,114,95,
+ 0,0,0,114,10,0,0,0,114,10,0,0,0,114,11,0,
+ 0,0,218,10,95,102,105,110,100,95,115,112,101,99,111,3,
+ 0,0,115,48,0,0,0,0,2,25,1,16,4,15,1,16,
+ 1,10,1,3,1,13,1,13,1,18,1,12,1,8,2,25,
+ 1,12,2,22,1,13,1,3,1,13,1,13,4,9,2,12,
+ 1,4,2,7,2,8,2,114,176,0,0,0,99,3,0,0,
0,0,0,0,0,4,0,0,0,4,0,0,0,67,0,0,
- 0,115,25,0,0,0,116,0,0,124,1,0,124,2,0,124,
- 3,0,131,3,0,124,0,0,95,1,0,100,0,0,83,41,
- 1,78,41,2,114,61,1,0,0,114,254,0,0,0,41,4,
- 114,71,0,0,0,114,67,0,0,0,114,35,0,0,0,114,
- 65,1,0,0,114,4,0,0,0,114,4,0,0,0,114,5,
- 0,0,0,114,72,0,0,0,12,7,0,0,115,2,0,0,
- 0,0,1,122,25,95,78,97,109,101,115,112,97,99,101,76,
- 111,97,100,101,114,46,95,95,105,110,105,116,95,95,99,2,
- 0,0,0,0,0,0,0,2,0,0,0,2,0,0,0,67,
- 0,0,0,115,16,0,0,0,100,1,0,106,0,0,124,1,
- 0,106,1,0,131,1,0,83,41,2,122,115,82,101,116,117,
- 114,110,32,114,101,112,114,32,102,111,114,32,116,104,101,32,
- 109,111,100,117,108,101,46,10,10,32,32,32,32,32,32,32,
- 32,84,104,101,32,109,101,116,104,111,100,32,105,115,32,100,
- 101,112,114,101,99,97,116,101,100,46,32,32,84,104,101,32,
- 105,109,112,111,114,116,32,109,97,99,104,105,110,101,114,121,
- 32,100,111,101,115,32,116,104,101,32,106,111,98,32,105,116,
- 115,101,108,102,46,10,10,32,32,32,32,32,32,32,32,122,
- 25,60,109,111,100,117,108,101,32,123,33,114,125,32,40,110,
- 97,109,101,115,112,97,99,101,41,62,41,2,114,47,0,0,
- 0,114,57,0,0,0,41,2,114,12,1,0,0,114,180,0,
- 0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,
- 0,114,206,0,0,0,15,7,0,0,115,2,0,0,0,0,
- 7,122,28,95,78,97,109,101,115,112,97,99,101,76,111,97,
- 100,101,114,46,109,111,100,117,108,101,95,114,101,112,114,99,
- 2,0,0,0,0,0,0,0,2,0,0,0,1,0,0,0,
- 67,0,0,0,115,4,0,0,0,100,1,0,83,41,2,78,
- 84,114,4,0,0,0,41,2,114,71,0,0,0,114,159,0,
- 0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,
- 0,114,220,0,0,0,24,7,0,0,115,2,0,0,0,0,
- 1,122,27,95,78,97,109,101,115,112,97,99,101,76,111,97,
- 100,101,114,46,105,115,95,112,97,99,107,97,103,101,99,2,
- 0,0,0,0,0,0,0,2,0,0,0,1,0,0,0,67,
- 0,0,0,115,4,0,0,0,100,1,0,83,41,2,78,114,
- 30,0,0,0,114,4,0,0,0,41,2,114,71,0,0,0,
- 114,159,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
- 5,0,0,0,114,17,1,0,0,27,7,0,0,115,2,0,
- 0,0,0,1,122,27,95,78,97,109,101,115,112,97,99,101,
- 76,111,97,100,101,114,46,103,101,116,95,115,111,117,114,99,
- 101,99,2,0,0,0,0,0,0,0,2,0,0,0,6,0,
- 0,0,67,0,0,0,115,22,0,0,0,116,0,0,100,1,
- 0,100,2,0,100,3,0,100,4,0,100,5,0,131,3,1,
- 83,41,6,78,114,30,0,0,0,122,8,60,115,116,114,105,
- 110,103,62,114,176,0,0,0,114,43,1,0,0,84,41,1,
- 114,44,1,0,0,41,2,114,71,0,0,0,114,159,0,0,
- 0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,
- 114,16,1,0,0,30,7,0,0,115,2,0,0,0,0,1,
- 122,25,95,78,97,109,101,115,112,97,99,101,76,111,97,100,
- 101,114,46,103,101,116,95,99,111,100,101,99,2,0,0,0,
- 0,0,0,0,2,0,0,0,1,0,0,0,67,0,0,0,
- 115,4,0,0,0,100,0,0,83,41,1,78,114,4,0,0,
- 0,41,2,114,71,0,0,0,114,180,0,0,0,114,4,0,
- 0,0,114,4,0,0,0,114,5,0,0,0,114,2,1,0,
- 0,33,7,0,0,115,2,0,0,0,0,1,122,28,95,78,
- 97,109,101,115,112,97,99,101,76,111,97,100,101,114,46,101,
- 120,101,99,95,109,111,100,117,108,101,99,2,0,0,0,0,
- 0,0,0,2,0,0,0,3,0,0,0,67,0,0,0,115,
- 29,0,0,0,116,0,0,100,1,0,124,0,0,106,1,0,
- 131,2,0,1,116,2,0,124,0,0,124,1,0,131,2,0,
- 83,41,2,122,98,76,111,97,100,32,97,32,110,97,109,101,
- 115,112,97,99,101,32,109,111,100,117,108,101,46,10,10,32,
- 32,32,32,32,32,32,32,84,104,105,115,32,109,101,116,104,
- 111,100,32,105,115,32,100,101,112,114,101,99,97,116,101,100,
- 46,32,32,85,115,101,32,101,120,101,99,95,109,111,100,117,
- 108,101,40,41,32,105,110,115,116,101,97,100,46,10,10,32,
- 32,32,32,32,32,32,32,122,38,110,97,109,101,115,112,97,
- 99,101,32,109,111,100,117,108,101,32,108,111,97,100,101,100,
- 32,119,105,116,104,32,112,97,116,104,32,123,33,114,125,41,
- 3,114,153,0,0,0,114,254,0,0,0,114,181,0,0,0,
- 41,2,114,71,0,0,0,114,159,0,0,0,114,4,0,0,
- 0,114,4,0,0,0,114,5,0,0,0,114,5,1,0,0,
- 36,7,0,0,115,4,0,0,0,0,7,16,1,122,28,95,
- 78,97,109,101,115,112,97,99,101,76,111,97,100,101,114,46,
- 108,111,97,100,95,109,111,100,117,108,101,78,41,11,114,57,
- 0,0,0,114,56,0,0,0,114,58,0,0,0,114,72,0,
- 0,0,114,19,1,0,0,114,206,0,0,0,114,220,0,0,
- 0,114,17,1,0,0,114,16,1,0,0,114,2,1,0,0,
- 114,5,1,0,0,114,4,0,0,0,114,4,0,0,0,114,
- 4,0,0,0,114,5,0,0,0,114,252,0,0,0,11,7,
- 0,0,115,14,0,0,0,12,1,12,3,18,9,12,3,12,
- 3,12,3,12,3,114,252,0,0,0,99,0,0,0,0,0,
- 0,0,0,0,0,0,0,5,0,0,0,64,0,0,0,115,
- 160,0,0,0,101,0,0,90,1,0,100,0,0,90,2,0,
- 100,1,0,90,3,0,101,4,0,100,2,0,100,3,0,132,
- 0,0,131,1,0,90,5,0,101,4,0,100,4,0,100,5,
- 0,132,0,0,131,1,0,90,6,0,101,4,0,100,6,0,
- 100,7,0,132,0,0,131,1,0,90,7,0,101,4,0,100,
- 8,0,100,9,0,132,0,0,131,1,0,90,8,0,101,4,
- 0,100,10,0,100,11,0,100,12,0,132,1,0,131,1,0,
- 90,9,0,101,4,0,100,10,0,100,10,0,100,13,0,100,
- 14,0,132,2,0,131,1,0,90,10,0,101,4,0,100,10,
- 0,100,15,0,100,16,0,132,1,0,131,1,0,90,11,0,
- 100,10,0,83,41,17,218,10,80,97,116,104,70,105,110,100,
- 101,114,122,62,77,101,116,97,32,112,97,116,104,32,102,105,
- 110,100,101,114,32,102,111,114,32,115,121,115,46,112,97,116,
- 104,32,97,110,100,32,112,97,99,107,97,103,101,32,95,95,
- 112,97,116,104,95,95,32,97,116,116,114,105,98,117,116,101,
- 115,46,99,1,0,0,0,0,0,0,0,2,0,0,0,4,
- 0,0,0,67,0,0,0,115,58,0,0,0,120,51,0,116,
- 0,0,106,1,0,106,2,0,131,0,0,68,93,34,0,125,
- 1,0,116,3,0,124,1,0,100,1,0,131,2,0,114,16,
- 0,124,1,0,106,4,0,131,0,0,1,113,16,0,113,16,
- 0,87,100,2,0,83,41,3,122,125,67,97,108,108,32,116,
- 104,101,32,105,110,118,97,108,105,100,97,116,101,95,99,97,
- 99,104,101,115,40,41,32,109,101,116,104,111,100,32,111,110,
- 32,97,108,108,32,112,97,116,104,32,101,110,116,114,121,32,
- 102,105,110,100,101,114,115,10,32,32,32,32,32,32,32,32,
- 115,116,111,114,101,100,32,105,110,32,115,121,115,46,112,97,
- 116,104,95,105,109,112,111,114,116,101,114,95,99,97,99,104,
- 101,115,32,40,119,104,101,114,101,32,105,109,112,108,101,109,
- 101,110,116,101,100,41,46,218,17,105,110,118,97,108,105,100,
- 97,116,101,95,99,97,99,104,101,115,78,41,5,114,7,0,
- 0,0,218,19,112,97,116,104,95,105,109,112,111,114,116,101,
- 114,95,99,97,99,104,101,218,6,118,97,108,117,101,115,114,
- 60,0,0,0,114,75,1,0,0,41,2,114,12,1,0,0,
- 218,6,102,105,110,100,101,114,114,4,0,0,0,114,4,0,
- 0,0,114,5,0,0,0,114,75,1,0,0,53,7,0,0,
- 115,6,0,0,0,0,4,22,1,15,1,122,28,80,97,116,
- 104,70,105,110,100,101,114,46,105,110,118,97,108,105,100,97,
- 116,101,95,99,97,99,104,101,115,99,2,0,0,0,0,0,
- 0,0,3,0,0,0,12,0,0,0,67,0,0,0,115,94,
- 0,0,0,116,0,0,106,1,0,115,28,0,116,2,0,106,
- 3,0,100,1,0,116,4,0,131,2,0,1,110,0,0,120,
- 59,0,116,0,0,106,1,0,68,93,44,0,125,2,0,121,
- 14,0,124,2,0,124,1,0,131,1,0,83,87,113,38,0,
- 4,116,5,0,107,10,0,114,81,0,1,1,1,119,38,0,
- 89,113,38,0,88,113,38,0,87,100,2,0,83,100,2,0,
- 83,41,3,122,113,83,101,97,114,99,104,32,115,101,113,117,
- 101,110,99,101,32,111,102,32,104,111,111,107,115,32,102,111,
- 114,32,97,32,102,105,110,100,101,114,32,102,111,114,32,39,
- 112,97,116,104,39,46,10,10,32,32,32,32,32,32,32,32,
- 73,102,32,39,104,111,111,107,115,39,32,105,115,32,102,97,
- 108,115,101,32,116,104,101,110,32,117,115,101,32,115,121,115,
- 46,112,97,116,104,95,104,111,111,107,115,46,10,10,32,32,
- 32,32,32,32,32,32,122,23,115,121,115,46,112,97,116,104,
- 95,104,111,111,107,115,32,105,115,32,101,109,112,116,121,78,
- 41,6,114,7,0,0,0,218,10,112,97,116,104,95,104,111,
- 111,107,115,114,167,0,0,0,114,168,0,0,0,114,169,0,
- 0,0,114,154,0,0,0,41,3,114,12,1,0,0,114,35,
- 0,0,0,90,4,104,111,111,107,114,4,0,0,0,114,4,
- 0,0,0,114,5,0,0,0,218,11,95,112,97,116,104,95,
- 104,111,111,107,115,61,7,0,0,115,16,0,0,0,0,7,
- 9,1,19,1,16,1,3,1,14,1,13,1,12,2,122,22,
- 80,97,116,104,70,105,110,100,101,114,46,95,112,97,116,104,
- 95,104,111,111,107,115,99,2,0,0,0,0,0,0,0,3,
- 0,0,0,11,0,0,0,67,0,0,0,115,97,0,0,0,
- 124,1,0,100,1,0,107,2,0,114,27,0,116,0,0,106,
- 1,0,131,0,0,125,1,0,110,0,0,121,17,0,116,2,
- 0,106,3,0,124,1,0,25,125,2,0,87,110,46,0,4,
- 116,4,0,107,10,0,114,92,0,1,1,1,124,0,0,106,
- 5,0,124,1,0,131,1,0,125,2,0,124,2,0,116,2,
- 0,106,3,0,124,1,0,60,89,110,1,0,88,124,2,0,
- 83,41,2,122,210,71,101,116,32,116,104,101,32,102,105,110,
- 100,101,114,32,102,111,114,32,116,104,101,32,112,97,116,104,
- 32,101,110,116,114,121,32,102,114,111,109,32,115,121,115,46,
- 112,97,116,104,95,105,109,112,111,114,116,101,114,95,99,97,
- 99,104,101,46,10,10,32,32,32,32,32,32,32,32,73,102,
- 32,116,104,101,32,112,97,116,104,32,101,110,116,114,121,32,
- 105,115,32,110,111,116,32,105,110,32,116,104,101,32,99,97,
- 99,104,101,44,32,102,105,110,100,32,116,104,101,32,97,112,
- 112,114,111,112,114,105,97,116,101,32,102,105,110,100,101,114,
- 10,32,32,32,32,32,32,32,32,97,110,100,32,99,97,99,
- 104,101,32,105,116,46,32,73,102,32,110,111,32,102,105,110,
- 100,101,114,32,105,115,32,97,118,97,105,108,97,98,108,101,
- 44,32,115,116,111,114,101,32,78,111,110,101,46,10,10,32,
- 32,32,32,32,32,32,32,114,30,0,0,0,41,6,114,3,
- 0,0,0,114,45,0,0,0,114,7,0,0,0,114,76,1,
- 0,0,114,79,0,0,0,114,80,1,0,0,41,3,114,12,
- 1,0,0,114,35,0,0,0,114,78,1,0,0,114,4,0,
- 0,0,114,4,0,0,0,114,5,0,0,0,218,20,95,112,
- 97,116,104,95,105,109,112,111,114,116,101,114,95,99,97,99,
- 104,101,78,7,0,0,115,16,0,0,0,0,8,12,1,15,
- 1,3,1,17,1,13,1,15,1,18,1,122,31,80,97,116,
- 104,70,105,110,100,101,114,46,95,112,97,116,104,95,105,109,
- 112,111,114,116,101,114,95,99,97,99,104,101,99,3,0,0,
- 0,0,0,0,0,6,0,0,0,3,0,0,0,67,0,0,
- 0,115,113,0,0,0,116,0,0,124,2,0,100,1,0,131,
- 2,0,114,39,0,124,2,0,106,1,0,124,1,0,131,1,
- 0,92,2,0,125,3,0,125,4,0,110,21,0,124,2,0,
- 106,2,0,124,1,0,131,1,0,125,3,0,103,0,0,125,
- 4,0,124,3,0,100,0,0,107,9,0,114,85,0,116,3,
- 0,124,1,0,124,3,0,131,2,0,83,116,4,0,124,1,
- 0,100,0,0,131,2,0,125,5,0,124,4,0,124,5,0,
- 95,5,0,124,5,0,83,41,2,78,114,166,0,0,0,41,
- 6,114,60,0,0,0,114,166,0,0,0,114,15,1,0,0,
- 114,174,0,0,0,114,217,0,0,0,114,221,0,0,0,41,
- 6,114,12,1,0,0,114,159,0,0,0,114,78,1,0,0,
- 114,170,0,0,0,114,171,0,0,0,114,178,0,0,0,114,
- 4,0,0,0,114,4,0,0,0,114,5,0,0,0,218,16,
- 95,108,101,103,97,99,121,95,103,101,116,95,115,112,101,99,
- 95,7,0,0,115,18,0,0,0,0,4,15,1,24,2,15,
- 1,6,1,12,1,13,1,15,1,9,1,122,27,80,97,116,
- 104,70,105,110,100,101,114,46,95,108,101,103,97,99,121,95,
- 103,101,116,95,115,112,101,99,78,99,4,0,0,0,0,0,
- 0,0,9,0,0,0,5,0,0,0,67,0,0,0,115,252,
- 0,0,0,103,0,0,125,4,0,120,239,0,124,2,0,68,
- 93,203,0,125,5,0,116,0,0,124,5,0,116,1,0,116,
- 2,0,102,2,0,131,2,0,115,46,0,113,13,0,110,0,
- 0,124,0,0,106,3,0,124,5,0,131,1,0,125,6,0,
- 124,6,0,100,1,0,107,9,0,114,13,0,116,4,0,124,
- 6,0,100,2,0,131,2,0,114,109,0,124,6,0,106,5,
- 0,124,1,0,124,3,0,131,2,0,125,7,0,110,18,0,
- 124,0,0,106,6,0,124,1,0,124,6,0,131,2,0,125,
- 7,0,124,7,0,100,1,0,107,8,0,114,145,0,113,13,
- 0,110,0,0,124,7,0,106,7,0,100,1,0,107,9,0,
- 114,164,0,124,7,0,83,124,7,0,106,8,0,125,8,0,
- 124,8,0,100,1,0,107,8,0,114,200,0,116,9,0,100,
- 3,0,131,1,0,130,1,0,110,0,0,124,4,0,106,10,
- 0,124,8,0,131,1,0,1,113,13,0,113,13,0,87,116,
- 11,0,124,1,0,100,1,0,131,2,0,125,7,0,124,4,
- 0,124,7,0,95,8,0,124,7,0,83,100,1,0,83,41,
- 4,122,63,70,105,110,100,32,116,104,101,32,108,111,97,100,
- 101,114,32,111,114,32,110,97,109,101,115,112,97,99,101,95,
- 112,97,116,104,32,102,111,114,32,116,104,105,115,32,109,111,
- 100,117,108,101,47,112,97,99,107,97,103,101,32,110,97,109,
- 101,46,78,114,14,1,0,0,122,19,115,112,101,99,32,109,
- 105,115,115,105,110,103,32,108,111,97,100,101,114,41,12,114,
- 193,0,0,0,218,3,115,116,114,218,5,98,121,116,101,115,
- 114,81,1,0,0,114,60,0,0,0,114,14,1,0,0,114,
- 82,1,0,0,114,170,0,0,0,114,221,0,0,0,114,154,
- 0,0,0,114,198,0,0,0,114,217,0,0,0,41,9,114,
- 12,1,0,0,114,159,0,0,0,114,35,0,0,0,114,13,
- 1,0,0,218,14,110,97,109,101,115,112,97,99,101,95,112,
- 97,116,104,90,5,101,110,116,114,121,114,78,1,0,0,114,
- 178,0,0,0,114,171,0,0,0,114,4,0,0,0,114,4,
- 0,0,0,114,5,0,0,0,218,9,95,103,101,116,95,115,
- 112,101,99,110,7,0,0,115,40,0,0,0,0,5,6,1,
- 13,1,21,1,6,1,15,1,12,1,15,1,21,2,18,1,
- 12,1,6,1,15,1,4,1,9,1,12,1,15,5,20,2,
- 15,1,9,1,122,20,80,97,116,104,70,105,110,100,101,114,
- 46,95,103,101,116,95,115,112,101,99,99,4,0,0,0,0,
- 0,0,0,6,0,0,0,4,0,0,0,67,0,0,0,115,
- 143,0,0,0,124,2,0,100,1,0,107,8,0,114,24,0,
- 116,0,0,106,1,0,125,2,0,110,0,0,124,0,0,106,
- 2,0,124,1,0,124,2,0,124,3,0,131,3,0,125,4,
- 0,124,4,0,100,1,0,107,8,0,114,61,0,100,1,0,
- 83,124,4,0,106,3,0,100,1,0,107,8,0,114,135,0,
- 124,4,0,106,4,0,125,5,0,124,5,0,114,128,0,100,
- 2,0,124,4,0,95,5,0,116,6,0,124,1,0,124,5,
- 0,124,0,0,106,2,0,131,3,0,124,4,0,95,4,0,
- 124,4,0,83,100,1,0,83,110,4,0,124,4,0,83,100,
- 1,0,83,41,3,122,98,102,105,110,100,32,116,104,101,32,
- 109,111,100,117,108,101,32,111,110,32,115,121,115,46,112,97,
- 116,104,32,111,114,32,39,112,97,116,104,39,32,98,97,115,
- 101,100,32,111,110,32,115,121,115,46,112,97,116,104,95,104,
- 111,111,107,115,32,97,110,100,10,32,32,32,32,32,32,32,
- 32,115,121,115,46,112,97,116,104,95,105,109,112,111,114,116,
- 101,114,95,99,97,99,104,101,46,78,90,9,110,97,109,101,
- 115,112,97,99,101,41,7,114,7,0,0,0,114,35,0,0,
- 0,114,86,1,0,0,114,170,0,0,0,114,221,0,0,0,
- 114,218,0,0,0,114,61,1,0,0,41,6,114,12,1,0,
- 0,114,159,0,0,0,114,35,0,0,0,114,13,1,0,0,
- 114,178,0,0,0,114,85,1,0,0,114,4,0,0,0,114,
- 4,0,0,0,114,5,0,0,0,114,14,1,0,0,142,7,
- 0,0,115,26,0,0,0,0,4,12,1,12,1,21,1,12,
- 1,4,1,15,1,9,1,6,3,9,1,24,1,4,2,7,
- 2,122,20,80,97,116,104,70,105,110,100,101,114,46,102,105,
- 110,100,95,115,112,101,99,99,3,0,0,0,0,0,0,0,
- 4,0,0,0,3,0,0,0,67,0,0,0,115,41,0,0,
- 0,124,0,0,106,0,0,124,1,0,124,2,0,131,2,0,
- 125,3,0,124,3,0,100,1,0,107,8,0,114,34,0,100,
- 1,0,83,124,3,0,106,1,0,83,41,2,122,170,102,105,
- 110,100,32,116,104,101,32,109,111,100,117,108,101,32,111,110,
- 32,115,121,115,46,112,97,116,104,32,111,114,32,39,112,97,
- 116,104,39,32,98,97,115,101,100,32,111,110,32,115,121,115,
- 46,112,97,116,104,95,104,111,111,107,115,32,97,110,100,10,
- 32,32,32,32,32,32,32,32,115,121,115,46,112,97,116,104,
- 95,105,109,112,111,114,116,101,114,95,99,97,99,104,101,46,
- 10,10,32,32,32,32,32,32,32,32,84,104,105,115,32,109,
- 101,116,104,111,100,32,105,115,32,100,101,112,114,101,99,97,
- 116,101,100,46,32,32,85,115,101,32,102,105,110,100,95,115,
- 112,101,99,40,41,32,105,110,115,116,101,97,100,46,10,10,
- 32,32,32,32,32,32,32,32,78,41,2,114,14,1,0,0,
- 114,170,0,0,0,41,4,114,12,1,0,0,114,159,0,0,
- 0,114,35,0,0,0,114,178,0,0,0,114,4,0,0,0,
- 114,4,0,0,0,114,5,0,0,0,114,15,1,0,0,164,
- 7,0,0,115,8,0,0,0,0,8,18,1,12,1,4,1,
- 122,22,80,97,116,104,70,105,110,100,101,114,46,102,105,110,
- 100,95,109,111,100,117,108,101,41,12,114,57,0,0,0,114,
- 56,0,0,0,114,58,0,0,0,114,59,0,0,0,114,19,
- 1,0,0,114,75,1,0,0,114,80,1,0,0,114,81,1,
- 0,0,114,82,1,0,0,114,86,1,0,0,114,14,1,0,
- 0,114,15,1,0,0,114,4,0,0,0,114,4,0,0,0,
- 114,4,0,0,0,114,5,0,0,0,114,74,1,0,0,49,
- 7,0,0,115,22,0,0,0,12,2,6,2,18,8,18,17,
- 18,17,18,15,3,1,18,31,3,1,21,21,3,1,114,74,
- 1,0,0,99,0,0,0,0,0,0,0,0,0,0,0,0,
- 3,0,0,0,64,0,0,0,115,133,0,0,0,101,0,0,
- 90,1,0,100,0,0,90,2,0,100,1,0,90,3,0,100,
- 2,0,100,3,0,132,0,0,90,4,0,100,4,0,100,5,
- 0,132,0,0,90,5,0,101,6,0,90,7,0,100,6,0,
- 100,7,0,132,0,0,90,8,0,100,8,0,100,9,0,132,
- 0,0,90,9,0,100,10,0,100,11,0,100,12,0,132,1,
- 0,90,10,0,100,13,0,100,14,0,132,0,0,90,11,0,
- 101,12,0,100,15,0,100,16,0,132,0,0,131,1,0,90,
- 13,0,100,17,0,100,18,0,132,0,0,90,14,0,100,10,
- 0,83,41,19,218,10,70,105,108,101,70,105,110,100,101,114,
- 122,172,70,105,108,101,45,98,97,115,101,100,32,102,105,110,
- 100,101,114,46,10,10,32,32,32,32,73,110,116,101,114,97,
- 99,116,105,111,110,115,32,119,105,116,104,32,116,104,101,32,
- 102,105,108,101,32,115,121,115,116,101,109,32,97,114,101,32,
- 99,97,99,104,101,100,32,102,111,114,32,112,101,114,102,111,
- 114,109,97,110,99,101,44,32,98,101,105,110,103,10,32,32,
- 32,32,114,101,102,114,101,115,104,101,100,32,119,104,101,110,
- 32,116,104,101,32,100,105,114,101,99,116,111,114,121,32,116,
- 104,101,32,102,105,110,100,101,114,32,105,115,32,104,97,110,
- 100,108,105,110,103,32,104,97,115,32,98,101,101,110,32,109,
- 111,100,105,102,105,101,100,46,10,10,32,32,32,32,99,2,
- 0,0,0,0,0,0,0,5,0,0,0,5,0,0,0,7,
- 0,0,0,115,122,0,0,0,103,0,0,125,3,0,120,52,
- 0,124,2,0,68,93,44,0,92,2,0,137,0,0,125,4,
- 0,124,3,0,106,0,0,135,0,0,102,1,0,100,1,0,
- 100,2,0,134,0,0,124,4,0,68,131,1,0,131,1,0,
- 1,113,13,0,87,124,3,0,124,0,0,95,1,0,124,1,
- 0,112,79,0,100,3,0,124,0,0,95,2,0,100,6,0,
- 124,0,0,95,3,0,116,4,0,131,0,0,124,0,0,95,
- 5,0,116,4,0,131,0,0,124,0,0,95,6,0,100,5,
- 0,83,41,7,122,154,73,110,105,116,105,97,108,105,122,101,
- 32,119,105,116,104,32,116,104,101,32,112,97,116,104,32,116,
- 111,32,115,101,97,114,99,104,32,111,110,32,97,110,100,32,
- 97,32,118,97,114,105,97,98,108,101,32,110,117,109,98,101,
- 114,32,111,102,10,32,32,32,32,32,32,32,32,50,45,116,
- 117,112,108,101,115,32,99,111,110,116,97,105,110,105,110,103,
- 32,116,104,101,32,108,111,97,100,101,114,32,97,110,100,32,
- 116,104,101,32,102,105,108,101,32,115,117,102,102,105,120,101,
- 115,32,116,104,101,32,108,111,97,100,101,114,10,32,32,32,
- 32,32,32,32,32,114,101,99,111,103,110,105,122,101,115,46,
- 99,1,0,0,0,0,0,0,0,2,0,0,0,3,0,0,
- 0,51,0,0,0,115,27,0,0,0,124,0,0,93,17,0,
- 125,1,0,124,1,0,136,0,0,102,2,0,86,1,113,3,
- 0,100,0,0,83,41,1,78,114,4,0,0,0,41,2,114,
- 22,0,0,0,114,58,1,0,0,41,1,114,170,0,0,0,
- 114,4,0,0,0,114,5,0,0,0,114,77,0,0,0,193,
- 7,0,0,115,2,0,0,0,6,0,122,38,70,105,108,101,
- 70,105,110,100,101,114,46,95,95,105,110,105,116,95,95,46,
- 60,108,111,99,97,108,115,62,46,60,103,101,110,101,120,112,
- 114,62,114,116,0,0,0,114,29,0,0,0,78,114,139,0,
- 0,0,41,7,114,198,0,0,0,218,8,95,108,111,97,100,
- 101,114,115,114,35,0,0,0,218,11,95,112,97,116,104,95,
- 109,116,105,109,101,218,3,115,101,116,218,11,95,112,97,116,
- 104,95,99,97,99,104,101,218,19,95,114,101,108,97,120,101,
- 100,95,112,97,116,104,95,99,97,99,104,101,41,5,114,71,
- 0,0,0,114,35,0,0,0,218,14,108,111,97,100,101,114,
- 95,100,101,116,97,105,108,115,90,7,108,111,97,100,101,114,
- 115,114,126,0,0,0,114,4,0,0,0,41,1,114,170,0,
- 0,0,114,5,0,0,0,114,72,0,0,0,187,7,0,0,
- 115,16,0,0,0,0,4,6,1,19,1,36,1,9,2,15,
- 1,9,1,12,1,122,19,70,105,108,101,70,105,110,100,101,
- 114,46,95,95,105,110,105,116,95,95,99,1,0,0,0,0,
- 0,0,0,1,0,0,0,2,0,0,0,67,0,0,0,115,
- 13,0,0,0,100,3,0,124,0,0,95,0,0,100,2,0,
- 83,41,4,122,31,73,110,118,97,108,105,100,97,116,101,32,
- 116,104,101,32,100,105,114,101,99,116,111,114,121,32,109,116,
- 105,109,101,46,114,29,0,0,0,78,114,139,0,0,0,41,
- 1,114,89,1,0,0,41,1,114,71,0,0,0,114,4,0,
- 0,0,114,4,0,0,0,114,5,0,0,0,114,75,1,0,
- 0,201,7,0,0,115,2,0,0,0,0,2,122,28,70,105,
- 108,101,70,105,110,100,101,114,46,105,110,118,97,108,105,100,
- 97,116,101,95,99,97,99,104,101,115,99,2,0,0,0,0,
- 0,0,0,3,0,0,0,2,0,0,0,67,0,0,0,115,
- 59,0,0,0,124,0,0,106,0,0,124,1,0,131,1,0,
- 125,2,0,124,2,0,100,1,0,107,8,0,114,37,0,100,
- 1,0,103,0,0,102,2,0,83,124,2,0,106,1,0,124,
- 2,0,106,2,0,112,55,0,103,0,0,102,2,0,83,41,
- 2,122,197,84,114,121,32,116,111,32,102,105,110,100,32,97,
- 32,108,111,97,100,101,114,32,102,111,114,32,116,104,101,32,
- 115,112,101,99,105,102,105,101,100,32,109,111,100,117,108,101,
- 44,32,111,114,32,116,104,101,32,110,97,109,101,115,112,97,
- 99,101,10,32,32,32,32,32,32,32,32,112,97,99,107,97,
- 103,101,32,112,111,114,116,105,111,110,115,46,32,82,101,116,
- 117,114,110,115,32,40,108,111,97,100,101,114,44,32,108,105,
- 115,116,45,111,102,45,112,111,114,116,105,111,110,115,41,46,
- 10,10,32,32,32,32,32,32,32,32,84,104,105,115,32,109,
- 101,116,104,111,100,32,105,115,32,100,101,112,114,101,99,97,
- 116,101,100,46,32,32,85,115,101,32,102,105,110,100,95,115,
- 112,101,99,40,41,32,105,110,115,116,101,97,100,46,10,10,
- 32,32,32,32,32,32,32,32,78,41,3,114,14,1,0,0,
- 114,170,0,0,0,114,221,0,0,0,41,3,114,71,0,0,
- 0,114,159,0,0,0,114,178,0,0,0,114,4,0,0,0,
- 114,4,0,0,0,114,5,0,0,0,114,166,0,0,0,207,
- 7,0,0,115,8,0,0,0,0,7,15,1,12,1,10,1,
- 122,22,70,105,108,101,70,105,110,100,101,114,46,102,105,110,
- 100,95,108,111,97,100,101,114,99,6,0,0,0,0,0,0,
- 0,7,0,0,0,7,0,0,0,67,0,0,0,115,40,0,
- 0,0,124,1,0,124,2,0,124,3,0,131,2,0,125,6,
- 0,116,0,0,124,2,0,124,3,0,100,1,0,124,6,0,
- 100,2,0,124,4,0,131,2,2,83,41,3,78,114,170,0,
- 0,0,114,221,0,0,0,41,1,114,240,0,0,0,41,7,
- 114,71,0,0,0,114,244,0,0,0,114,159,0,0,0,114,
- 35,0,0,0,114,229,0,0,0,114,13,1,0,0,114,170,
- 0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,
- 0,0,114,86,1,0,0,219,7,0,0,115,6,0,0,0,
- 0,1,15,1,18,1,122,20,70,105,108,101,70,105,110,100,
- 101,114,46,95,103,101,116,95,115,112,101,99,78,99,3,0,
- 0,0,0,0,0,0,14,0,0,0,15,0,0,0,67,0,
- 0,0,115,240,1,0,0,100,1,0,125,3,0,124,1,0,
- 106,0,0,100,2,0,131,1,0,100,3,0,25,125,4,0,
- 121,34,0,116,1,0,124,0,0,106,2,0,112,49,0,116,
- 3,0,106,4,0,131,0,0,131,1,0,106,5,0,125,5,
- 0,87,110,24,0,4,116,6,0,107,10,0,114,85,0,1,
- 1,1,100,10,0,125,5,0,89,110,1,0,88,124,5,0,
- 124,0,0,106,7,0,107,3,0,114,123,0,124,0,0,106,
- 8,0,131,0,0,1,124,5,0,124,0,0,95,7,0,110,
- 0,0,116,9,0,131,0,0,114,156,0,124,0,0,106,10,
- 0,125,6,0,124,4,0,106,11,0,131,0,0,125,7,0,
- 110,15,0,124,0,0,106,12,0,125,6,0,124,4,0,125,
- 7,0,124,7,0,124,6,0,107,6,0,114,51,1,116,13,
- 0,124,0,0,106,2,0,124,4,0,131,2,0,125,8,0,
- 120,103,0,124,0,0,106,14,0,68,93,77,0,92,2,0,
- 125,9,0,125,10,0,100,5,0,124,9,0,23,125,11,0,
- 116,13,0,124,8,0,124,11,0,131,2,0,125,12,0,116,
- 15,0,124,12,0,131,1,0,114,211,0,124,0,0,106,16,
- 0,124,10,0,124,1,0,124,12,0,124,8,0,103,1,0,
- 124,2,0,131,5,0,83,113,211,0,87,116,17,0,124,8,
- 0,131,1,0,125,3,0,110,0,0,120,126,0,124,0,0,
- 106,14,0,68,93,115,0,92,2,0,125,9,0,125,10,0,
- 116,13,0,124,0,0,106,2,0,124,4,0,124,9,0,23,
- 131,2,0,125,12,0,116,18,0,100,6,0,106,19,0,124,
- 12,0,131,1,0,100,7,0,100,3,0,131,1,1,1,124,
- 7,0,124,9,0,23,124,6,0,107,6,0,114,61,1,116,
- 15,0,124,12,0,131,1,0,114,176,1,124,0,0,106,16,
- 0,124,10,0,124,1,0,124,12,0,100,8,0,124,2,0,
- 131,5,0,83,113,61,1,113,61,1,87,124,3,0,114,236,
- 1,116,18,0,100,9,0,106,19,0,124,8,0,131,1,0,
- 131,1,0,1,116,20,0,124,1,0,100,8,0,131,2,0,
- 125,13,0,124,8,0,103,1,0,124,13,0,95,21,0,124,
- 13,0,83,100,8,0,83,41,11,122,125,84,114,121,32,116,
- 111,32,102,105,110,100,32,97,32,108,111,97,100,101,114,32,
- 102,111,114,32,116,104,101,32,115,112,101,99,105,102,105,101,
- 100,32,109,111,100,117,108,101,44,32,111,114,32,116,104,101,
- 32,110,97,109,101,115,112,97,99,101,10,32,32,32,32,32,
- 32,32,32,112,97,99,107,97,103,101,32,112,111,114,116,105,
- 111,110,115,46,32,82,101,116,117,114,110,115,32,40,108,111,
- 97,100,101,114,44,32,108,105,115,116,45,111,102,45,112,111,
- 114,116,105,111,110,115,41,46,70,114,116,0,0,0,114,115,
- 0,0,0,114,29,0,0,0,114,72,0,0,0,122,9,116,
- 114,121,105,110,103,32,123,125,114,146,0,0,0,78,122,25,
- 112,111,115,115,105,98,108,101,32,110,97,109,101,115,112,97,
- 99,101,32,102,111,114,32,123,125,114,139,0,0,0,41,22,
- 114,32,0,0,0,114,39,0,0,0,114,35,0,0,0,114,
- 3,0,0,0,114,45,0,0,0,114,54,1,0,0,114,40,
- 0,0,0,114,89,1,0,0,218,11,95,102,105,108,108,95,
- 99,97,99,104,101,114,6,0,0,0,114,92,1,0,0,114,
- 140,0,0,0,114,91,1,0,0,114,28,0,0,0,114,88,
- 1,0,0,114,44,0,0,0,114,86,1,0,0,114,46,0,
- 0,0,114,153,0,0,0,114,47,0,0,0,114,217,0,0,
- 0,114,221,0,0,0,41,14,114,71,0,0,0,114,159,0,
- 0,0,114,13,1,0,0,90,12,105,115,95,110,97,109,101,
- 115,112,97,99,101,90,11,116,97,105,108,95,109,111,100,117,
- 108,101,114,184,0,0,0,90,5,99,97,99,104,101,90,12,
- 99,97,99,104,101,95,109,111,100,117,108,101,90,9,98,97,
- 115,101,95,112,97,116,104,114,58,1,0,0,114,244,0,0,
- 0,90,13,105,110,105,116,95,102,105,108,101,110,97,109,101,
- 90,9,102,117,108,108,95,112,97,116,104,114,178,0,0,0,
- 114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,114,
- 14,1,0,0,224,7,0,0,115,68,0,0,0,0,3,6,
- 1,19,1,3,1,34,1,13,1,11,1,15,1,10,1,12,
- 2,9,1,9,1,15,2,9,1,6,2,12,1,18,1,22,
- 1,10,1,15,1,12,1,32,4,15,2,22,1,22,1,25,
- 1,16,1,12,1,32,1,6,1,19,1,15,1,12,1,4,
- 1,122,20,70,105,108,101,70,105,110,100,101,114,46,102,105,
- 110,100,95,115,112,101,99,99,1,0,0,0,0,0,0,0,
- 9,0,0,0,13,0,0,0,67,0,0,0,115,14,1,0,
- 0,124,0,0,106,0,0,125,1,0,121,31,0,116,1,0,
- 106,2,0,124,1,0,112,33,0,116,1,0,106,3,0,131,
- 0,0,131,1,0,125,2,0,87,110,33,0,4,116,4,0,
- 116,5,0,116,6,0,102,3,0,107,10,0,114,75,0,1,
- 1,1,103,0,0,125,2,0,89,110,1,0,88,116,7,0,
- 106,8,0,106,9,0,100,1,0,131,1,0,115,112,0,116,
- 10,0,124,2,0,131,1,0,124,0,0,95,11,0,110,111,
- 0,116,10,0,131,0,0,125,3,0,120,90,0,124,2,0,
- 68,93,82,0,125,4,0,124,4,0,106,12,0,100,2,0,
- 131,1,0,92,3,0,125,5,0,125,6,0,125,7,0,124,
- 6,0,114,191,0,100,3,0,106,13,0,124,5,0,124,7,
- 0,106,14,0,131,0,0,131,2,0,125,8,0,110,6,0,
- 124,5,0,125,8,0,124,3,0,106,15,0,124,8,0,131,
- 1,0,1,113,128,0,87,124,3,0,124,0,0,95,11,0,
- 116,7,0,106,8,0,106,9,0,116,16,0,131,1,0,114,
- 10,1,100,4,0,100,5,0,132,0,0,124,2,0,68,131,
- 1,0,124,0,0,95,17,0,110,0,0,100,6,0,83,41,
- 7,122,68,70,105,108,108,32,116,104,101,32,99,97,99,104,
- 101,32,111,102,32,112,111,116,101,110,116,105,97,108,32,109,
- 111,100,117,108,101,115,32,97,110,100,32,112,97,99,107,97,
- 103,101,115,32,102,111,114,32,116,104,105,115,32,100,105,114,
- 101,99,116,111,114,121,46,114,0,0,0,0,114,116,0,0,
- 0,122,5,123,125,46,123,125,99,1,0,0,0,0,0,0,
- 0,2,0,0,0,3,0,0,0,83,0,0,0,115,28,0,
- 0,0,104,0,0,124,0,0,93,18,0,125,1,0,124,1,
- 0,106,0,0,131,0,0,146,2,0,113,6,0,83,114,4,
- 0,0,0,41,1,114,140,0,0,0,41,2,114,22,0,0,
- 0,90,2,102,110,114,4,0,0,0,114,4,0,0,0,114,
- 5,0,0,0,250,9,60,115,101,116,99,111,109,112,62,42,
- 8,0,0,115,2,0,0,0,9,0,122,41,70,105,108,101,
- 70,105,110,100,101,114,46,95,102,105,108,108,95,99,97,99,
- 104,101,46,60,108,111,99,97,108,115,62,46,60,115,101,116,
- 99,111,109,112,62,78,41,18,114,35,0,0,0,114,3,0,
- 0,0,90,7,108,105,115,116,100,105,114,114,45,0,0,0,
- 218,17,70,105,108,101,78,111,116,70,111,117,110,100,69,114,
- 114,111,114,218,15,80,101,114,109,105,115,115,105,111,110,69,
- 114,114,111,114,218,18,78,111,116,65,68,105,114,101,99,116,
- 111,114,121,69,114,114,111,114,114,7,0,0,0,114,8,0,
- 0,0,114,9,0,0,0,114,90,1,0,0,114,91,1,0,
- 0,114,134,0,0,0,114,47,0,0,0,114,140,0,0,0,
- 218,3,97,100,100,114,10,0,0,0,114,92,1,0,0,41,
- 9,114,71,0,0,0,114,35,0,0,0,90,8,99,111,110,
- 116,101,110,116,115,90,21,108,111,119,101,114,95,115,117,102,
- 102,105,120,95,99,111,110,116,101,110,116,115,114,72,1,0,
- 0,114,67,0,0,0,114,66,1,0,0,114,58,1,0,0,
- 90,8,110,101,119,95,110,97,109,101,114,4,0,0,0,114,
- 4,0,0,0,114,5,0,0,0,114,94,1,0,0,13,8,
- 0,0,115,34,0,0,0,0,2,9,1,3,1,31,1,22,
- 3,11,3,18,1,18,7,9,1,13,1,24,1,6,1,27,
- 2,6,1,17,1,9,1,18,1,122,22,70,105,108,101,70,
- 105,110,100,101,114,46,95,102,105,108,108,95,99,97,99,104,
- 101,99,1,0,0,0,0,0,0,0,3,0,0,0,3,0,
- 0,0,7,0,0,0,115,25,0,0,0,135,0,0,135,1,
- 0,102,2,0,100,1,0,100,2,0,134,0,0,125,2,0,
- 124,2,0,83,41,3,97,20,1,0,0,65,32,99,108,97,
- 115,115,32,109,101,116,104,111,100,32,119,104,105,99,104,32,
- 114,101,116,117,114,110,115,32,97,32,99,108,111,115,117,114,
- 101,32,116,111,32,117,115,101,32,111,110,32,115,121,115,46,
- 112,97,116,104,95,104,111,111,107,10,32,32,32,32,32,32,
- 32,32,119,104,105,99,104,32,119,105,108,108,32,114,101,116,
- 117,114,110,32,97,110,32,105,110,115,116,97,110,99,101,32,
- 117,115,105,110,103,32,116,104,101,32,115,112,101,99,105,102,
- 105,101,100,32,108,111,97,100,101,114,115,32,97,110,100,32,
- 116,104,101,32,112,97,116,104,10,32,32,32,32,32,32,32,
- 32,99,97,108,108,101,100,32,111,110,32,116,104,101,32,99,
- 108,111,115,117,114,101,46,10,10,32,32,32,32,32,32,32,
- 32,73,102,32,116,104,101,32,112,97,116,104,32,99,97,108,
- 108,101,100,32,111,110,32,116,104,101,32,99,108,111,115,117,
- 114,101,32,105,115,32,110,111,116,32,97,32,100,105,114,101,
- 99,116,111,114,121,44,32,73,109,112,111,114,116,69,114,114,
- 111,114,32,105,115,10,32,32,32,32,32,32,32,32,114,97,
- 105,115,101,100,46,10,10,32,32,32,32,32,32,32,32,99,
- 1,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,
- 19,0,0,0,115,46,0,0,0,116,0,0,124,0,0,131,
- 1,0,115,33,0,116,1,0,100,1,0,100,2,0,124,0,
- 0,131,1,1,130,1,0,110,0,0,136,0,0,124,0,0,
- 136,1,0,140,1,0,83,41,3,122,45,80,97,116,104,32,
- 104,111,111,107,32,102,111,114,32,105,109,112,111,114,116,108,
- 105,98,46,109,97,99,104,105,110,101,114,121,46,70,105,108,
- 101,70,105,110,100,101,114,46,122,30,111,110,108,121,32,100,
- 105,114,101,99,116,111,114,105,101,115,32,97,114,101,32,115,
- 117,112,112,111,114,116,101,100,114,35,0,0,0,41,2,114,
- 46,0,0,0,114,154,0,0,0,41,1,114,35,0,0,0,
- 41,2,114,12,1,0,0,114,93,1,0,0,114,4,0,0,
- 0,114,5,0,0,0,218,24,112,97,116,104,95,104,111,111,
- 107,95,102,111,114,95,70,105,108,101,70,105,110,100,101,114,
- 54,8,0,0,115,6,0,0,0,0,2,12,1,21,1,122,
- 54,70,105,108,101,70,105,110,100,101,114,46,112,97,116,104,
- 95,104,111,111,107,46,60,108,111,99,97,108,115,62,46,112,
- 97,116,104,95,104,111,111,107,95,102,111,114,95,70,105,108,
- 101,70,105,110,100,101,114,114,4,0,0,0,41,3,114,12,
- 1,0,0,114,93,1,0,0,114,100,1,0,0,114,4,0,
- 0,0,41,2,114,12,1,0,0,114,93,1,0,0,114,5,
- 0,0,0,218,9,112,97,116,104,95,104,111,111,107,44,8,
- 0,0,115,4,0,0,0,0,10,21,6,122,20,70,105,108,
- 101,70,105,110,100,101,114,46,112,97,116,104,95,104,111,111,
- 107,99,1,0,0,0,0,0,0,0,1,0,0,0,2,0,
- 0,0,67,0,0,0,115,16,0,0,0,100,1,0,106,0,
- 0,124,0,0,106,1,0,131,1,0,83,41,2,78,122,16,
- 70,105,108,101,70,105,110,100,101,114,40,123,33,114,125,41,
- 41,2,114,47,0,0,0,114,35,0,0,0,41,1,114,71,
- 0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,
- 0,0,114,101,0,0,0,62,8,0,0,115,2,0,0,0,
- 0,1,122,19,70,105,108,101,70,105,110,100,101,114,46,95,
- 95,114,101,112,114,95,95,41,15,114,57,0,0,0,114,56,
- 0,0,0,114,58,0,0,0,114,59,0,0,0,114,72,0,
- 0,0,114,75,1,0,0,114,173,0,0,0,114,15,1,0,
- 0,114,166,0,0,0,114,86,1,0,0,114,14,1,0,0,
- 114,94,1,0,0,114,19,1,0,0,114,101,1,0,0,114,
- 101,0,0,0,114,4,0,0,0,114,4,0,0,0,114,4,
- 0,0,0,114,5,0,0,0,114,87,1,0,0,178,7,0,
- 0,115,20,0,0,0,12,7,6,2,12,14,12,4,6,2,
- 12,12,12,5,15,45,12,31,18,18,114,87,1,0,0,99,
- 0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,
- 64,0,0,0,115,46,0,0,0,101,0,0,90,1,0,100,
- 0,0,90,2,0,100,1,0,90,3,0,100,2,0,100,3,
- 0,132,0,0,90,4,0,100,4,0,100,5,0,132,0,0,
- 90,5,0,100,6,0,83,41,7,218,18,95,73,109,112,111,
- 114,116,76,111,99,107,67,111,110,116,101,120,116,122,36,67,
- 111,110,116,101,120,116,32,109,97,110,97,103,101,114,32,102,
- 111,114,32,116,104,101,32,105,109,112,111,114,116,32,108,111,
- 99,107,46,99,1,0,0,0,0,0,0,0,1,0,0,0,
- 1,0,0,0,67,0,0,0,115,14,0,0,0,116,0,0,
- 106,1,0,131,0,0,1,100,1,0,83,41,2,122,24,65,
- 99,113,117,105,114,101,32,116,104,101,32,105,109,112,111,114,
- 116,32,108,111,99,107,46,78,41,2,114,106,0,0,0,114,
- 4,1,0,0,41,1,114,71,0,0,0,114,4,0,0,0,
- 114,4,0,0,0,114,5,0,0,0,114,75,0,0,0,72,
- 8,0,0,115,2,0,0,0,0,2,122,28,95,73,109,112,
- 111,114,116,76,111,99,107,67,111,110,116,101,120,116,46,95,
- 95,101,110,116,101,114,95,95,99,4,0,0,0,0,0,0,
- 0,4,0,0,0,1,0,0,0,67,0,0,0,115,14,0,
- 0,0,116,0,0,106,1,0,131,0,0,1,100,1,0,83,
- 41,2,122,60,82,101,108,101,97,115,101,32,116,104,101,32,
- 105,109,112,111,114,116,32,108,111,99,107,32,114,101,103,97,
- 114,100,108,101,115,115,32,111,102,32,97,110,121,32,114,97,
- 105,115,101,100,32,101,120,99,101,112,116,105,111,110,115,46,
- 78,41,2,114,106,0,0,0,114,107,0,0,0,41,4,114,
- 71,0,0,0,90,8,101,120,99,95,116,121,112,101,90,9,
- 101,120,99,95,118,97,108,117,101,90,13,101,120,99,95,116,
- 114,97,99,101,98,97,99,107,114,4,0,0,0,114,4,0,
- 0,0,114,5,0,0,0,114,81,0,0,0,76,8,0,0,
- 115,2,0,0,0,0,2,122,27,95,73,109,112,111,114,116,
- 76,111,99,107,67,111,110,116,101,120,116,46,95,95,101,120,
- 105,116,95,95,78,41,6,114,57,0,0,0,114,56,0,0,
- 0,114,58,0,0,0,114,59,0,0,0,114,75,0,0,0,
- 114,81,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
- 4,0,0,0,114,5,0,0,0,114,102,1,0,0,68,8,
- 0,0,115,6,0,0,0,12,2,6,2,12,4,114,102,1,
- 0,0,99,3,0,0,0,0,0,0,0,5,0,0,0,4,
- 0,0,0,67,0,0,0,115,91,0,0,0,124,1,0,106,
- 0,0,100,1,0,124,2,0,100,2,0,24,131,2,0,125,
- 3,0,116,1,0,124,3,0,131,1,0,124,2,0,107,0,
- 0,114,55,0,116,2,0,100,3,0,131,1,0,130,1,0,
- 110,0,0,124,3,0,100,4,0,25,125,4,0,124,0,0,
- 114,87,0,100,5,0,106,3,0,124,4,0,124,0,0,131,
- 2,0,83,124,4,0,83,41,6,122,50,82,101,115,111,108,
- 118,101,32,97,32,114,101,108,97,116,105,118,101,32,109,111,
- 100,117,108,101,32,110,97,109,101,32,116,111,32,97,110,32,
- 97,98,115,111,108,117,116,101,32,111,110,101,46,114,116,0,
- 0,0,114,29,0,0,0,122,50,97,116,116,101,109,112,116,
- 101,100,32,114,101,108,97,116,105,118,101,32,105,109,112,111,
- 114,116,32,98,101,121,111,110,100,32,116,111,112,45,108,101,
- 118,101,108,32,112,97,99,107,97,103,101,114,84,0,0,0,
- 122,5,123,125,46,123,125,41,4,114,34,0,0,0,114,31,
- 0,0,0,114,133,0,0,0,114,47,0,0,0,41,5,114,
- 67,0,0,0,218,7,112,97,99,107,97,103,101,218,5,108,
- 101,118,101,108,90,4,98,105,116,115,114,128,0,0,0,114,
- 4,0,0,0,114,4,0,0,0,114,5,0,0,0,218,13,
- 95,114,101,115,111,108,118,101,95,110,97,109,101,81,8,0,
- 0,115,10,0,0,0,0,2,22,1,18,1,15,1,10,1,
- 114,105,1,0,0,99,3,0,0,0,0,0,0,0,4,0,
- 0,0,3,0,0,0,67,0,0,0,115,47,0,0,0,124,
- 0,0,106,0,0,124,1,0,124,2,0,131,2,0,125,3,
- 0,124,3,0,100,0,0,107,8,0,114,34,0,100,0,0,
- 83,116,1,0,124,1,0,124,3,0,131,2,0,83,41,1,
- 78,41,2,114,15,1,0,0,114,174,0,0,0,41,4,114,
- 78,1,0,0,114,67,0,0,0,114,35,0,0,0,114,170,
- 0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,
- 0,0,218,17,95,102,105,110,100,95,115,112,101,99,95,108,
- 101,103,97,99,121,90,8,0,0,115,8,0,0,0,0,3,
- 18,1,12,1,4,1,114,106,1,0,0,99,3,0,0,0,
- 0,0,0,0,9,0,0,0,26,0,0,0,67,0,0,0,
- 115,34,1,0,0,116,0,0,106,1,0,115,28,0,116,2,
- 0,106,3,0,100,1,0,116,4,0,131,2,0,1,110,0,
- 0,124,0,0,116,0,0,106,5,0,107,6,0,125,3,0,
- 120,240,0,116,0,0,106,1,0,68,93,225,0,125,4,0,
- 116,6,0,131,0,0,143,93,0,1,121,13,0,124,4,0,
- 106,7,0,125,5,0,87,110,54,0,4,116,8,0,107,10,
- 0,114,138,0,1,1,1,116,9,0,124,4,0,124,0,0,
- 124,1,0,131,3,0,125,6,0,124,6,0,100,2,0,107,
- 8,0,114,134,0,119,53,0,110,0,0,89,110,19,0,88,
- 124,5,0,124,0,0,124,1,0,124,2,0,131,3,0,125,
- 6,0,87,100,2,0,81,88,124,6,0,100,2,0,107,9,
- 0,114,53,0,124,3,0,12,114,15,1,124,0,0,116,0,
- 0,106,5,0,107,6,0,114,15,1,116,0,0,106,5,0,
- 124,0,0,25,125,7,0,121,13,0,124,7,0,106,10,0,
- 125,8,0,87,110,22,0,4,116,8,0,107,10,0,114,247,
- 0,1,1,1,124,6,0,83,89,113,19,1,88,124,8,0,
- 100,2,0,107,8,0,114,8,1,124,6,0,83,124,8,0,
- 83,113,22,1,124,6,0,83,113,53,0,113,53,0,87,100,
- 2,0,83,100,2,0,83,41,3,122,23,70,105,110,100,32,
- 97,32,109,111,100,117,108,101,39,115,32,108,111,97,100,101,
- 114,46,122,22,115,121,115,46,109,101,116,97,95,112,97,116,
- 104,32,105,115,32,101,109,112,116,121,78,41,11,114,7,0,
- 0,0,218,9,109,101,116,97,95,112,97,116,104,114,167,0,
- 0,0,114,168,0,0,0,114,169,0,0,0,114,73,0,0,
- 0,114,102,1,0,0,114,14,1,0,0,114,210,0,0,0,
- 114,106,1,0,0,114,209,0,0,0,41,9,114,67,0,0,
- 0,114,35,0,0,0,114,13,1,0,0,90,9,105,115,95,
- 114,101,108,111,97,100,114,78,1,0,0,114,14,1,0,0,
- 114,178,0,0,0,114,180,0,0,0,114,209,0,0,0,114,
- 4,0,0,0,114,4,0,0,0,114,5,0,0,0,218,10,
- 95,102,105,110,100,95,115,112,101,99,99,8,0,0,115,48,
- 0,0,0,0,2,9,1,19,4,15,1,16,1,10,1,3,
- 1,13,1,13,1,18,1,12,1,11,2,24,1,12,2,22,
- 1,13,1,3,1,13,1,13,4,9,2,12,1,4,2,7,
- 2,11,2,114,108,1,0,0,99,3,0,0,0,0,0,0,
- 0,4,0,0,0,4,0,0,0,67,0,0,0,115,194,0,
- 0,0,116,0,0,124,0,0,116,1,0,131,2,0,115,45,
- 0,116,2,0,100,1,0,106,3,0,116,4,0,124,0,0,
- 131,1,0,131,1,0,131,1,0,130,1,0,110,0,0,124,
- 2,0,100,2,0,107,0,0,114,72,0,116,5,0,100,3,
- 0,131,1,0,130,1,0,110,0,0,124,1,0,114,156,0,
- 116,0,0,124,1,0,116,1,0,131,2,0,115,108,0,116,
- 2,0,100,4,0,131,1,0,130,1,0,113,156,0,124,1,
- 0,116,6,0,106,7,0,107,7,0,114,156,0,100,5,0,
- 125,3,0,116,8,0,124,3,0,106,3,0,124,1,0,131,
- 1,0,131,1,0,130,1,0,113,156,0,110,0,0,124,0,
- 0,12,114,190,0,124,2,0,100,2,0,107,2,0,114,190,
- 0,116,5,0,100,6,0,131,1,0,130,1,0,110,0,0,
- 100,7,0,83,41,8,122,28,86,101,114,105,102,121,32,97,
- 114,103,117,109,101,110,116,115,32,97,114,101,32,34,115,97,
- 110,101,34,46,122,31,109,111,100,117,108,101,32,110,97,109,
- 101,32,109,117,115,116,32,98,101,32,115,116,114,44,32,110,
- 111,116,32,123,125,114,84,0,0,0,122,18,108,101,118,101,
- 108,32,109,117,115,116,32,98,101,32,62,61,32,48,122,31,
- 95,95,112,97,99,107,97,103,101,95,95,32,110,111,116,32,
- 115,101,116,32,116,111,32,97,32,115,116,114,105,110,103,122,
- 61,80,97,114,101,110,116,32,109,111,100,117,108,101,32,123,
- 33,114,125,32,110,111,116,32,108,111,97,100,101,100,44,32,
- 99,97,110,110,111,116,32,112,101,114,102,111,114,109,32,114,
- 101,108,97,116,105,118,101,32,105,109,112,111,114,116,122,17,
- 69,109,112,116,121,32,109,111,100,117,108,101,32,110,97,109,
- 101,78,41,9,114,193,0,0,0,114,83,1,0,0,218,9,
- 84,121,112,101,69,114,114,111,114,114,47,0,0,0,114,66,
- 0,0,0,114,133,0,0,0,114,7,0,0,0,114,73,0,
- 0,0,218,11,83,121,115,116,101,109,69,114,114,111,114,41,
- 4,114,67,0,0,0,114,103,1,0,0,114,104,1,0,0,
- 114,172,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
- 5,0,0,0,218,13,95,115,97,110,105,116,121,95,99,104,
- 101,99,107,139,8,0,0,115,24,0,0,0,0,2,15,1,
- 30,1,12,1,15,1,6,1,15,1,15,1,15,1,6,2,
- 27,1,19,1,114,111,1,0,0,122,16,78,111,32,109,111,
- 100,117,108,101,32,110,97,109,101,100,32,122,4,123,33,114,
- 125,99,2,0,0,0,0,0,0,0,8,0,0,0,12,0,
- 0,0,67,0,0,0,115,52,1,0,0,100,0,0,125,2,
- 0,124,0,0,106,0,0,100,1,0,131,1,0,100,2,0,
- 25,125,3,0,124,3,0,114,178,0,124,3,0,116,1,0,
- 106,2,0,107,7,0,114,62,0,116,3,0,124,1,0,124,
- 3,0,131,2,0,1,110,0,0,124,0,0,116,1,0,106,
- 2,0,107,6,0,114,88,0,116,1,0,106,2,0,124,0,
- 0,25,83,116,1,0,106,2,0,124,3,0,25,125,4,0,
- 121,13,0,124,4,0,106,4,0,125,2,0,87,113,178,0,
- 4,116,5,0,107,10,0,114,174,0,1,1,1,116,6,0,
- 100,3,0,23,106,7,0,124,0,0,124,3,0,131,2,0,
- 125,5,0,116,8,0,124,5,0,100,4,0,124,0,0,131,
- 1,1,130,1,0,89,113,178,0,88,110,0,0,116,9,0,
- 124,0,0,124,2,0,131,2,0,125,6,0,124,6,0,100,
- 0,0,107,8,0,114,235,0,116,8,0,116,6,0,106,7,
- 0,124,0,0,131,1,0,100,4,0,124,0,0,131,1,1,
- 130,1,0,110,18,0,116,10,0,124,6,0,131,1,0,106,
- 11,0,131,0,0,125,7,0,124,3,0,114,48,1,116,1,
- 0,106,2,0,124,3,0,25,125,4,0,116,12,0,124,4,
- 0,124,0,0,106,0,0,100,1,0,131,1,0,100,5,0,
- 25,124,7,0,131,3,0,1,110,0,0,124,7,0,83,41,
- 6,78,114,116,0,0,0,114,84,0,0,0,122,23,59,32,
- 123,33,114,125,32,105,115,32,110,111,116,32,97,32,112,97,
- 99,107,97,103,101,114,67,0,0,0,114,115,0,0,0,41,
- 13,114,32,0,0,0,114,7,0,0,0,114,73,0,0,0,
- 114,114,0,0,0,114,247,0,0,0,114,210,0,0,0,218,
- 8,95,69,82,82,95,77,83,71,114,47,0,0,0,114,154,
- 0,0,0,114,108,1,0,0,114,175,0,0,0,114,7,1,
- 0,0,114,61,0,0,0,41,8,114,67,0,0,0,218,7,
- 105,109,112,111,114,116,95,114,35,0,0,0,114,234,0,0,
- 0,90,13,112,97,114,101,110,116,95,109,111,100,117,108,101,
- 114,172,0,0,0,114,178,0,0,0,114,180,0,0,0,114,
- 4,0,0,0,114,4,0,0,0,114,5,0,0,0,218,23,
- 95,102,105,110,100,95,97,110,100,95,108,111,97,100,95,117,
- 110,108,111,99,107,101,100,159,8,0,0,115,42,0,0,0,
- 0,1,6,1,19,1,6,1,15,1,16,2,15,1,11,1,
- 13,1,3,1,13,1,13,1,22,1,26,1,15,1,12,1,
- 30,2,18,1,6,2,13,1,32,1,114,114,1,0,0,99,
- 2,0,0,0,0,0,0,0,2,0,0,0,10,0,0,0,
- 67,0,0,0,115,36,0,0,0,116,0,0,124,0,0,131,
- 1,0,143,18,0,1,116,1,0,124,0,0,124,1,0,131,
- 2,0,83,87,100,1,0,81,88,100,1,0,83,41,2,122,
- 54,70,105,110,100,32,97,110,100,32,108,111,97,100,32,116,
- 104,101,32,109,111,100,117,108,101,44,32,97,110,100,32,114,
- 101,108,101,97,115,101,32,116,104,101,32,105,109,112,111,114,
- 116,32,108,111,99,107,46,78,41,2,114,103,0,0,0,114,
- 114,1,0,0,41,2,114,67,0,0,0,114,113,1,0,0,
- 114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,218,
- 14,95,102,105,110,100,95,97,110,100,95,108,111,97,100,186,
- 8,0,0,115,4,0,0,0,0,2,13,1,114,115,1,0,
- 0,99,3,0,0,0,0,0,0,0,5,0,0,0,4,0,
- 0,0,67,0,0,0,115,172,0,0,0,116,0,0,124,0,
- 0,124,1,0,124,2,0,131,3,0,1,124,2,0,100,1,
- 0,107,4,0,114,49,0,116,1,0,124,0,0,124,1,0,
- 124,2,0,131,3,0,125,0,0,110,0,0,116,2,0,106,
- 3,0,131,0,0,1,124,0,0,116,4,0,106,5,0,107,
- 7,0,114,87,0,116,6,0,124,0,0,116,7,0,131,2,
- 0,83,116,4,0,106,5,0,124,0,0,25,125,3,0,124,
- 3,0,100,2,0,107,8,0,114,158,0,116,2,0,106,8,
- 0,131,0,0,1,100,3,0,106,9,0,124,0,0,131,1,
- 0,125,4,0,116,10,0,124,4,0,100,4,0,124,0,0,
- 131,1,1,130,1,0,110,0,0,116,11,0,124,0,0,131,
- 1,0,1,124,3,0,83,41,5,97,50,1,0,0,73,109,
- 112,111,114,116,32,97,110,100,32,114,101,116,117,114,110,32,
- 116,104,101,32,109,111,100,117,108,101,32,98,97,115,101,100,
- 32,111,110,32,105,116,115,32,110,97,109,101,44,32,116,104,
- 101,32,112,97,99,107,97,103,101,32,116,104,101,32,99,97,
- 108,108,32,105,115,10,32,32,32,32,98,101,105,110,103,32,
- 109,97,100,101,32,102,114,111,109,44,32,97,110,100,32,116,
- 104,101,32,108,101,118,101,108,32,97,100,106,117,115,116,109,
- 101,110,116,46,10,10,32,32,32,32,84,104,105,115,32,102,
- 117,110,99,116,105,111,110,32,114,101,112,114,101,115,101,110,
- 116,115,32,116,104,101,32,103,114,101,97,116,101,115,116,32,
- 99,111,109,109,111,110,32,100,101,110,111,109,105,110,97,116,
- 111,114,32,111,102,32,102,117,110,99,116,105,111,110,97,108,
- 105,116,121,10,32,32,32,32,98,101,116,119,101,101,110,32,
- 105,109,112,111,114,116,95,109,111,100,117,108,101,32,97,110,
- 100,32,95,95,105,109,112,111,114,116,95,95,46,32,84,104,
- 105,115,32,105,110,99,108,117,100,101,115,32,115,101,116,116,
- 105,110,103,32,95,95,112,97,99,107,97,103,101,95,95,32,
- 105,102,10,32,32,32,32,116,104,101,32,108,111,97,100,101,
- 114,32,100,105,100,32,110,111,116,46,10,10,32,32,32,32,
- 114,84,0,0,0,78,122,40,105,109,112,111,114,116,32,111,
- 102,32,123,125,32,104,97,108,116,101,100,59,32,78,111,110,
- 101,32,105,110,32,115,121,115,46,109,111,100,117,108,101,115,
- 114,67,0,0,0,41,12,114,111,1,0,0,114,105,1,0,
- 0,114,106,0,0,0,114,4,1,0,0,114,7,0,0,0,
- 114,73,0,0,0,114,115,1,0,0,218,11,95,103,99,100,
- 95,105,109,112,111,114,116,114,107,0,0,0,114,47,0,0,
- 0,114,154,0,0,0,114,112,0,0,0,41,5,114,67,0,
- 0,0,114,103,1,0,0,114,104,1,0,0,114,180,0,0,
- 0,114,152,0,0,0,114,4,0,0,0,114,4,0,0,0,
- 114,5,0,0,0,114,116,1,0,0,192,8,0,0,115,28,
- 0,0,0,0,9,16,1,12,1,21,1,10,1,15,1,13,
- 1,13,1,12,1,10,1,6,1,9,1,21,1,10,1,114,
- 116,1,0,0,99,3,0,0,0,0,0,0,0,6,0,0,
- 0,17,0,0,0,67,0,0,0,115,1,1,0,0,116,0,
- 0,124,0,0,100,1,0,131,2,0,114,253,0,100,2,0,
- 124,1,0,107,6,0,114,89,0,116,1,0,124,1,0,131,
- 1,0,125,1,0,124,1,0,106,2,0,100,2,0,131,1,
- 0,1,116,0,0,124,0,0,100,3,0,131,2,0,114,89,
- 0,124,1,0,106,3,0,124,0,0,106,4,0,131,1,0,
- 1,113,89,0,110,0,0,120,161,0,124,1,0,68,93,150,
- 0,125,3,0,116,0,0,124,0,0,124,3,0,131,2,0,
- 115,96,0,100,4,0,106,5,0,124,0,0,106,6,0,124,
- 3,0,131,2,0,125,4,0,121,17,0,116,7,0,124,2,
- 0,124,4,0,131,2,0,1,87,113,246,0,4,116,8,0,
- 107,10,0,114,242,0,1,125,5,0,1,122,53,0,116,9,
- 0,124,5,0,131,1,0,106,10,0,116,11,0,131,1,0,
- 114,221,0,124,5,0,106,12,0,124,4,0,107,2,0,114,
- 221,0,119,96,0,113,221,0,110,0,0,130,0,0,87,89,
- 100,5,0,100,5,0,125,5,0,126,5,0,88,113,246,0,
- 88,113,96,0,113,96,0,87,110,0,0,124,0,0,83,41,
- 6,122,238,70,105,103,117,114,101,32,111,117,116,32,119,104,
- 97,116,32,95,95,105,109,112,111,114,116,95,95,32,115,104,
- 111,117,108,100,32,114,101,116,117,114,110,46,10,10,32,32,
- 32,32,84,104,101,32,105,109,112,111,114,116,95,32,112,97,
- 114,97,109,101,116,101,114,32,105,115,32,97,32,99,97,108,
- 108,97,98,108,101,32,119,104,105,99,104,32,116,97,107,101,
- 115,32,116,104,101,32,110,97,109,101,32,111,102,32,109,111,
- 100,117,108,101,32,116,111,10,32,32,32,32,105,109,112,111,
- 114,116,46,32,73,116,32,105,115,32,114,101,113,117,105,114,
- 101,100,32,116,111,32,100,101,99,111,117,112,108,101,32,116,
- 104,101,32,102,117,110,99,116,105,111,110,32,102,114,111,109,
- 32,97,115,115,117,109,105,110,103,32,105,109,112,111,114,116,
- 108,105,98,39,115,10,32,32,32,32,105,109,112,111,114,116,
- 32,105,109,112,108,101,109,101,110,116,97,116,105,111,110,32,
- 105,115,32,100,101,115,105,114,101,100,46,10,10,32,32,32,
- 32,114,247,0,0,0,250,1,42,218,7,95,95,97,108,108,
- 95,95,122,5,123,125,46,123,125,78,41,13,114,60,0,0,
- 0,114,246,0,0,0,218,6,114,101,109,111,118,101,114,198,
- 0,0,0,114,118,1,0,0,114,47,0,0,0,114,57,0,
- 0,0,114,114,0,0,0,114,154,0,0,0,114,83,1,0,
- 0,114,9,0,0,0,218,15,95,69,82,82,95,77,83,71,
- 95,80,82,69,70,73,88,114,67,0,0,0,41,6,114,180,
- 0,0,0,218,8,102,114,111,109,108,105,115,116,114,113,1,
- 0,0,114,16,0,0,0,90,9,102,114,111,109,95,110,97,
- 109,101,114,41,1,0,0,114,4,0,0,0,114,4,0,0,
- 0,114,5,0,0,0,218,16,95,104,97,110,100,108,101,95,
- 102,114,111,109,108,105,115,116,216,8,0,0,115,34,0,0,
- 0,0,10,15,1,12,1,12,1,13,1,15,1,22,1,13,
- 1,15,1,21,1,3,1,17,1,18,4,21,1,15,1,9,
- 1,32,1,114,122,1,0,0,99,1,0,0,0,0,0,0,
- 0,2,0,0,0,2,0,0,0,67,0,0,0,115,78,0,
+ 0,115,185,0,0,0,116,0,0,124,0,0,116,1,0,131,
+ 2,0,115,42,0,116,2,0,100,1,0,106,3,0,116,4,
+ 0,124,0,0,131,1,0,131,1,0,131,1,0,130,1,0,
+ 124,2,0,100,2,0,107,0,0,114,66,0,116,5,0,100,
+ 3,0,131,1,0,130,1,0,124,2,0,100,2,0,107,4,
+ 0,114,150,0,116,0,0,124,1,0,116,1,0,131,2,0,
+ 115,108,0,116,2,0,100,4,0,131,1,0,130,1,0,110,
+ 42,0,124,1,0,116,6,0,106,7,0,107,7,0,114,150,
+ 0,100,5,0,125,3,0,116,8,0,124,3,0,106,3,0,
+ 124,1,0,131,1,0,131,1,0,130,1,0,124,0,0,12,
+ 114,181,0,124,2,0,100,2,0,107,2,0,114,181,0,116,
+ 5,0,100,6,0,131,1,0,130,1,0,100,7,0,83,41,
+ 8,122,28,86,101,114,105,102,121,32,97,114,103,117,109,101,
+ 110,116,115,32,97,114,101,32,34,115,97,110,101,34,46,122,
+ 31,109,111,100,117,108,101,32,110,97,109,101,32,109,117,115,
+ 116,32,98,101,32,115,116,114,44,32,110,111,116,32,123,125,
+ 114,33,0,0,0,122,18,108,101,118,101,108,32,109,117,115,
+ 116,32,98,101,32,62,61,32,48,122,31,95,95,112,97,99,
+ 107,97,103,101,95,95,32,110,111,116,32,115,101,116,32,116,
+ 111,32,97,32,115,116,114,105,110,103,122,61,80,97,114,101,
+ 110,116,32,109,111,100,117,108,101,32,123,33,114,125,32,110,
+ 111,116,32,108,111,97,100,101,100,44,32,99,97,110,110,111,
+ 116,32,112,101,114,102,111,114,109,32,114,101,108,97,116,105,
+ 118,101,32,105,109,112,111,114,116,122,17,69,109,112,116,121,
+ 32,109,111,100,117,108,101,32,110,97,109,101,78,41,9,218,
+ 10,105,115,105,110,115,116,97,110,99,101,218,3,115,116,114,
+ 218,9,84,121,112,101,69,114,114,111,114,114,50,0,0,0,
+ 114,13,0,0,0,114,168,0,0,0,114,14,0,0,0,114,
+ 21,0,0,0,218,11,83,121,115,116,101,109,69,114,114,111,
+ 114,41,4,114,15,0,0,0,114,169,0,0,0,114,170,0,
+ 0,0,114,147,0,0,0,114,10,0,0,0,114,10,0,0,
+ 0,114,11,0,0,0,218,13,95,115,97,110,105,116,121,95,
+ 99,104,101,99,107,151,3,0,0,115,24,0,0,0,0,2,
+ 15,1,27,1,12,1,12,1,12,1,15,1,15,1,15,1,
+ 6,2,21,1,19,1,114,181,0,0,0,122,16,78,111,32,
+ 109,111,100,117,108,101,32,110,97,109,101,100,32,122,4,123,
+ 33,114,125,99,2,0,0,0,0,0,0,0,8,0,0,0,
+ 12,0,0,0,67,0,0,0,115,40,1,0,0,100,0,0,
+ 125,2,0,124,0,0,106,0,0,100,1,0,131,1,0,100,
+ 2,0,25,125,3,0,124,3,0,114,175,0,124,3,0,116,
+ 1,0,106,2,0,107,7,0,114,59,0,116,3,0,124,1,
+ 0,124,3,0,131,2,0,1,124,0,0,116,1,0,106,2,
+ 0,107,6,0,114,85,0,116,1,0,106,2,0,124,0,0,
+ 25,83,116,1,0,106,2,0,124,3,0,25,125,4,0,121,
+ 13,0,124,4,0,106,4,0,125,2,0,87,110,61,0,4,
+ 116,5,0,107,10,0,114,174,0,1,1,1,116,6,0,100,
+ 3,0,23,106,7,0,124,0,0,124,3,0,131,2,0,125,
+ 5,0,116,8,0,124,5,0,100,4,0,124,0,0,131,1,
+ 1,100,0,0,130,2,0,89,110,1,0,88,116,9,0,124,
+ 0,0,124,2,0,131,2,0,125,6,0,124,6,0,100,0,
+ 0,107,8,0,114,232,0,116,8,0,116,6,0,106,7,0,
+ 124,0,0,131,1,0,100,4,0,124,0,0,131,1,1,130,
+ 1,0,110,12,0,116,10,0,124,6,0,131,1,0,125,7,
+ 0,124,3,0,114,36,1,116,1,0,106,2,0,124,3,0,
+ 25,125,4,0,116,11,0,124,4,0,124,0,0,106,0,0,
+ 100,1,0,131,1,0,100,5,0,25,124,7,0,131,3,0,
+ 1,124,7,0,83,41,6,78,114,121,0,0,0,114,33,0,
+ 0,0,122,23,59,32,123,33,114,125,32,105,115,32,110,111,
+ 116,32,97,32,112,97,99,107,97,103,101,114,15,0,0,0,
+ 114,140,0,0,0,41,12,114,122,0,0,0,114,14,0,0,
+ 0,114,21,0,0,0,114,65,0,0,0,114,131,0,0,0,
+ 114,96,0,0,0,218,8,95,69,82,82,95,77,83,71,114,
+ 50,0,0,0,114,77,0,0,0,114,176,0,0,0,114,149,
+ 0,0,0,114,5,0,0,0,41,8,114,15,0,0,0,218,
+ 7,105,109,112,111,114,116,95,114,152,0,0,0,114,123,0,
+ 0,0,90,13,112,97,114,101,110,116,95,109,111,100,117,108,
+ 101,114,147,0,0,0,114,88,0,0,0,114,89,0,0,0,
+ 114,10,0,0,0,114,10,0,0,0,114,11,0,0,0,218,
+ 23,95,102,105,110,100,95,97,110,100,95,108,111,97,100,95,
+ 117,110,108,111,99,107,101,100,171,3,0,0,115,42,0,0,
+ 0,0,1,6,1,19,1,6,1,15,1,13,2,15,1,11,
+ 1,13,1,3,1,13,1,13,1,22,1,26,1,15,1,12,
+ 1,30,2,12,1,6,2,13,1,29,1,114,184,0,0,0,
+ 99,2,0,0,0,0,0,0,0,2,0,0,0,10,0,0,
+ 0,67,0,0,0,115,37,0,0,0,116,0,0,124,0,0,
+ 131,1,0,143,18,0,1,116,1,0,124,0,0,124,1,0,
+ 131,2,0,83,87,100,1,0,81,82,88,100,1,0,83,41,
+ 2,122,54,70,105,110,100,32,97,110,100,32,108,111,97,100,
+ 32,116,104,101,32,109,111,100,117,108,101,44,32,97,110,100,
+ 32,114,101,108,101,97,115,101,32,116,104,101,32,105,109,112,
+ 111,114,116,32,108,111,99,107,46,78,41,2,114,54,0,0,
+ 0,114,184,0,0,0,41,2,114,15,0,0,0,114,183,0,
+ 0,0,114,10,0,0,0,114,10,0,0,0,114,11,0,0,
+ 0,218,14,95,102,105,110,100,95,97,110,100,95,108,111,97,
+ 100,198,3,0,0,115,4,0,0,0,0,2,13,1,114,185,
+ 0,0,0,114,33,0,0,0,99,3,0,0,0,0,0,0,
+ 0,5,0,0,0,4,0,0,0,67,0,0,0,115,166,0,
+ 0,0,116,0,0,124,0,0,124,1,0,124,2,0,131,3,
+ 0,1,124,2,0,100,1,0,107,4,0,114,46,0,116,1,
+ 0,124,0,0,124,1,0,124,2,0,131,3,0,125,0,0,
+ 116,2,0,106,3,0,131,0,0,1,124,0,0,116,4,0,
+ 106,5,0,107,7,0,114,84,0,116,6,0,124,0,0,116,
+ 7,0,131,2,0,83,116,4,0,106,5,0,124,0,0,25,
+ 125,3,0,124,3,0,100,2,0,107,8,0,114,152,0,116,
+ 2,0,106,8,0,131,0,0,1,100,3,0,106,9,0,124,
+ 0,0,131,1,0,125,4,0,116,10,0,124,4,0,100,4,
+ 0,124,0,0,131,1,1,130,1,0,116,11,0,124,0,0,
+ 131,1,0,1,124,3,0,83,41,5,97,50,1,0,0,73,
+ 109,112,111,114,116,32,97,110,100,32,114,101,116,117,114,110,
+ 32,116,104,101,32,109,111,100,117,108,101,32,98,97,115,101,
+ 100,32,111,110,32,105,116,115,32,110,97,109,101,44,32,116,
+ 104,101,32,112,97,99,107,97,103,101,32,116,104,101,32,99,
+ 97,108,108,32,105,115,10,32,32,32,32,98,101,105,110,103,
+ 32,109,97,100,101,32,102,114,111,109,44,32,97,110,100,32,
+ 116,104,101,32,108,101,118,101,108,32,97,100,106,117,115,116,
+ 109,101,110,116,46,10,10,32,32,32,32,84,104,105,115,32,
+ 102,117,110,99,116,105,111,110,32,114,101,112,114,101,115,101,
+ 110,116,115,32,116,104,101,32,103,114,101,97,116,101,115,116,
+ 32,99,111,109,109,111,110,32,100,101,110,111,109,105,110,97,
+ 116,111,114,32,111,102,32,102,117,110,99,116,105,111,110,97,
+ 108,105,116,121,10,32,32,32,32,98,101,116,119,101,101,110,
+ 32,105,109,112,111,114,116,95,109,111,100,117,108,101,32,97,
+ 110,100,32,95,95,105,109,112,111,114,116,95,95,46,32,84,
+ 104,105,115,32,105,110,99,108,117,100,101,115,32,115,101,116,
+ 116,105,110,103,32,95,95,112,97,99,107,97,103,101,95,95,
+ 32,105,102,10,32,32,32,32,116,104,101,32,108,111,97,100,
+ 101,114,32,100,105,100,32,110,111,116,46,10,10,32,32,32,
+ 32,114,33,0,0,0,78,122,40,105,109,112,111,114,116,32,
+ 111,102,32,123,125,32,104,97,108,116,101,100,59,32,78,111,
+ 110,101,32,105,110,32,115,121,115,46,109,111,100,117,108,101,
+ 115,114,15,0,0,0,41,12,114,181,0,0,0,114,171,0,
+ 0,0,114,57,0,0,0,114,145,0,0,0,114,14,0,0,
+ 0,114,21,0,0,0,114,185,0,0,0,218,11,95,103,99,
+ 100,95,105,109,112,111,114,116,114,58,0,0,0,114,50,0,
+ 0,0,114,77,0,0,0,114,63,0,0,0,41,5,114,15,
+ 0,0,0,114,169,0,0,0,114,170,0,0,0,114,89,0,
+ 0,0,114,74,0,0,0,114,10,0,0,0,114,10,0,0,
+ 0,114,11,0,0,0,114,186,0,0,0,204,3,0,0,115,
+ 28,0,0,0,0,9,16,1,12,1,18,1,10,1,15,1,
+ 13,1,13,1,12,1,10,1,6,1,9,1,18,1,10,1,
+ 114,186,0,0,0,99,3,0,0,0,0,0,0,0,6,0,
+ 0,0,17,0,0,0,67,0,0,0,115,239,0,0,0,116,
+ 0,0,124,0,0,100,1,0,131,2,0,114,235,0,100,2,
+ 0,124,1,0,107,6,0,114,83,0,116,1,0,124,1,0,
+ 131,1,0,125,1,0,124,1,0,106,2,0,100,2,0,131,
+ 1,0,1,116,0,0,124,0,0,100,3,0,131,2,0,114,
+ 83,0,124,1,0,106,3,0,124,0,0,106,4,0,131,1,
+ 0,1,120,149,0,124,1,0,68,93,141,0,125,3,0,116,
+ 0,0,124,0,0,124,3,0,131,2,0,115,90,0,100,4,
+ 0,106,5,0,124,0,0,106,6,0,124,3,0,131,2,0,
+ 125,4,0,121,17,0,116,7,0,124,2,0,124,4,0,131,
+ 2,0,1,87,113,90,0,4,116,8,0,107,10,0,114,230,
+ 0,1,125,5,0,1,122,47,0,116,9,0,124,5,0,131,
+ 1,0,106,10,0,116,11,0,131,1,0,114,209,0,124,5,
+ 0,106,12,0,124,4,0,107,2,0,114,209,0,119,90,0,
+ 130,0,0,87,89,100,5,0,100,5,0,125,5,0,126,5,
+ 0,88,113,90,0,88,113,90,0,87,124,0,0,83,41,6,
+ 122,238,70,105,103,117,114,101,32,111,117,116,32,119,104,97,
+ 116,32,95,95,105,109,112,111,114,116,95,95,32,115,104,111,
+ 117,108,100,32,114,101,116,117,114,110,46,10,10,32,32,32,
+ 32,84,104,101,32,105,109,112,111,114,116,95,32,112,97,114,
+ 97,109,101,116,101,114,32,105,115,32,97,32,99,97,108,108,
+ 97,98,108,101,32,119,104,105,99,104,32,116,97,107,101,115,
+ 32,116,104,101,32,110,97,109,101,32,111,102,32,109,111,100,
+ 117,108,101,32,116,111,10,32,32,32,32,105,109,112,111,114,
+ 116,46,32,73,116,32,105,115,32,114,101,113,117,105,114,101,
+ 100,32,116,111,32,100,101,99,111,117,112,108,101,32,116,104,
+ 101,32,102,117,110,99,116,105,111,110,32,102,114,111,109,32,
+ 97,115,115,117,109,105,110,103,32,105,109,112,111,114,116,108,
+ 105,98,39,115,10,32,32,32,32,105,109,112,111,114,116,32,
+ 105,109,112,108,101,109,101,110,116,97,116,105,111,110,32,105,
+ 115,32,100,101,115,105,114,101,100,46,10,10,32,32,32,32,
+ 114,131,0,0,0,250,1,42,218,7,95,95,97,108,108,95,
+ 95,122,5,123,125,46,123,125,78,41,13,114,4,0,0,0,
+ 114,130,0,0,0,218,6,114,101,109,111,118,101,218,6,101,
+ 120,116,101,110,100,114,188,0,0,0,114,50,0,0,0,114,
+ 1,0,0,0,114,65,0,0,0,114,77,0,0,0,114,178,
+ 0,0,0,114,71,0,0,0,218,15,95,69,82,82,95,77,
+ 83,71,95,80,82,69,70,73,88,114,15,0,0,0,41,6,
+ 114,89,0,0,0,218,8,102,114,111,109,108,105,115,116,114,
+ 183,0,0,0,218,1,120,90,9,102,114,111,109,95,110,97,
+ 109,101,90,3,101,120,99,114,10,0,0,0,114,10,0,0,
+ 0,114,11,0,0,0,218,16,95,104,97,110,100,108,101,95,
+ 102,114,111,109,108,105,115,116,228,3,0,0,115,34,0,0,
+ 0,0,10,15,1,12,1,12,1,13,1,15,1,16,1,13,
+ 1,15,1,21,1,3,1,17,1,18,4,21,1,15,1,3,
+ 1,26,1,114,194,0,0,0,99,1,0,0,0,0,0,0,
+ 0,2,0,0,0,2,0,0,0,67,0,0,0,115,72,0,
0,0,124,0,0,106,0,0,100,1,0,131,1,0,125,1,
- 0,124,1,0,100,2,0,107,8,0,114,74,0,124,0,0,
+ 0,124,1,0,100,2,0,107,8,0,114,68,0,124,0,0,
100,3,0,25,125,1,0,100,4,0,124,0,0,107,7,0,
- 114,74,0,124,1,0,106,1,0,100,5,0,131,1,0,100,
- 6,0,25,125,1,0,113,74,0,110,0,0,124,1,0,83,
- 41,7,122,167,67,97,108,99,117,108,97,116,101,32,119,104,
- 97,116,32,95,95,112,97,99,107,97,103,101,95,95,32,115,
- 104,111,117,108,100,32,98,101,46,10,10,32,32,32,32,95,
- 95,112,97,99,107,97,103,101,95,95,32,105,115,32,110,111,
- 116,32,103,117,97,114,97,110,116,101,101,100,32,116,111,32,
- 98,101,32,100,101,102,105,110,101,100,32,111,114,32,99,111,
- 117,108,100,32,98,101,32,115,101,116,32,116,111,32,78,111,
- 110,101,10,32,32,32,32,116,111,32,114,101,112,114,101,115,
- 101,110,116,32,116,104,97,116,32,105,116,115,32,112,114,111,
- 112,101,114,32,118,97,108,117,101,32,105,115,32,117,110,107,
- 110,111,119,110,46,10,10,32,32,32,32,114,251,0,0,0,
- 78,114,57,0,0,0,114,247,0,0,0,114,116,0,0,0,
- 114,84,0,0,0,41,2,114,93,0,0,0,114,32,0,0,
- 0,41,2,218,7,103,108,111,98,97,108,115,114,103,1,0,
- 0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,
- 218,17,95,99,97,108,99,95,95,95,112,97,99,107,97,103,
- 101,95,95,248,8,0,0,115,12,0,0,0,0,7,15,1,
- 12,1,10,1,12,1,25,1,114,124,1,0,0,99,0,0,
- 0,0,0,0,0,0,3,0,0,0,3,0,0,0,67,0,
- 0,0,115,55,0,0,0,116,0,0,116,1,0,106,2,0,
- 131,0,0,102,2,0,125,0,0,116,3,0,116,4,0,102,
- 2,0,125,1,0,116,5,0,116,6,0,102,2,0,125,2,
- 0,124,0,0,124,1,0,124,2,0,103,3,0,83,41,1,
- 122,95,82,101,116,117,114,110,115,32,97,32,108,105,115,116,
- 32,111,102,32,102,105,108,101,45,98,97,115,101,100,32,109,
- 111,100,117,108,101,32,108,111,97,100,101,114,115,46,10,10,
- 32,32,32,32,69,97,99,104,32,105,116,101,109,32,105,115,
- 32,97,32,116,117,112,108,101,32,40,108,111,97,100,101,114,
- 44,32,115,117,102,102,105,120,101,115,41,46,10,32,32,32,
- 32,41,7,114,57,1,0,0,114,106,0,0,0,218,18,101,
- 120,116,101,110,115,105,111,110,95,115,117,102,102,105,120,101,
- 115,114,9,1,0,0,114,135,0,0,0,114,8,1,0,0,
- 114,233,0,0,0,41,3,90,10,101,120,116,101,110,115,105,
- 111,110,115,90,6,115,111,117,114,99,101,90,8,98,121,116,
- 101,99,111,100,101,114,4,0,0,0,114,4,0,0,0,114,
- 5,0,0,0,114,241,0,0,0,7,9,0,0,115,8,0,
- 0,0,0,5,18,1,12,1,12,1,114,241,0,0,0,99,
- 5,0,0,0,0,0,0,0,9,0,0,0,5,0,0,0,
- 67,0,0,0,115,227,0,0,0,124,4,0,100,1,0,107,
- 2,0,114,27,0,116,0,0,124,0,0,131,1,0,125,5,
- 0,110,54,0,124,1,0,100,2,0,107,9,0,114,45,0,
- 124,1,0,110,3,0,105,0,0,125,6,0,116,1,0,124,
- 6,0,131,1,0,125,7,0,116,0,0,124,0,0,124,7,
- 0,124,4,0,131,3,0,125,5,0,124,3,0,115,207,0,
- 124,4,0,100,1,0,107,2,0,114,122,0,116,0,0,124,
- 0,0,106,2,0,100,3,0,131,1,0,100,1,0,25,131,
- 1,0,83,124,0,0,115,132,0,124,5,0,83,116,3,0,
- 124,0,0,131,1,0,116,3,0,124,0,0,106,2,0,100,
- 3,0,131,1,0,100,1,0,25,131,1,0,24,125,8,0,
- 116,4,0,106,5,0,124,5,0,106,6,0,100,2,0,116,
- 3,0,124,5,0,106,6,0,131,1,0,124,8,0,24,133,
- 2,0,25,25,83,110,16,0,116,7,0,124,5,0,124,3,
- 0,116,0,0,131,3,0,83,100,2,0,83,41,4,97,214,
- 1,0,0,73,109,112,111,114,116,32,97,32,109,111,100,117,
- 108,101,46,10,10,32,32,32,32,84,104,101,32,39,103,108,
- 111,98,97,108,115,39,32,97,114,103,117,109,101,110,116,32,
- 105,115,32,117,115,101,100,32,116,111,32,105,110,102,101,114,
- 32,119,104,101,114,101,32,116,104,101,32,105,109,112,111,114,
- 116,32,105,115,32,111,99,99,117,114,105,110,103,32,102,114,
- 111,109,10,32,32,32,32,116,111,32,104,97,110,100,108,101,
- 32,114,101,108,97,116,105,118,101,32,105,109,112,111,114,116,
- 115,46,32,84,104,101,32,39,108,111,99,97,108,115,39,32,
- 97,114,103,117,109,101,110,116,32,105,115,32,105,103,110,111,
- 114,101,100,46,32,84,104,101,10,32,32,32,32,39,102,114,
- 111,109,108,105,115,116,39,32,97,114,103,117,109,101,110,116,
- 32,115,112,101,99,105,102,105,101,115,32,119,104,97,116,32,
- 115,104,111,117,108,100,32,101,120,105,115,116,32,97,115,32,
- 97,116,116,114,105,98,117,116,101,115,32,111,110,32,116,104,
- 101,32,109,111,100,117,108,101,10,32,32,32,32,98,101,105,
- 110,103,32,105,109,112,111,114,116,101,100,32,40,101,46,103,
- 46,32,96,96,102,114,111,109,32,109,111,100,117,108,101,32,
- 105,109,112,111,114,116,32,60,102,114,111,109,108,105,115,116,
- 62,96,96,41,46,32,32,84,104,101,32,39,108,101,118,101,
- 108,39,10,32,32,32,32,97,114,103,117,109,101,110,116,32,
- 114,101,112,114,101,115,101,110,116,115,32,116,104,101,32,112,
- 97,99,107,97,103,101,32,108,111,99,97,116,105,111,110,32,
- 116,111,32,105,109,112,111,114,116,32,102,114,111,109,32,105,
- 110,32,97,32,114,101,108,97,116,105,118,101,10,32,32,32,
- 32,105,109,112,111,114,116,32,40,101,46,103,46,32,96,96,
- 102,114,111,109,32,46,46,112,107,103,32,105,109,112,111,114,
- 116,32,109,111,100,96,96,32,119,111,117,108,100,32,104,97,
- 118,101,32,97,32,39,108,101,118,101,108,39,32,111,102,32,
- 50,41,46,10,10,32,32,32,32,114,84,0,0,0,78,114,
- 116,0,0,0,41,8,114,116,1,0,0,114,124,1,0,0,
- 114,134,0,0,0,114,31,0,0,0,114,7,0,0,0,114,
- 73,0,0,0,114,57,0,0,0,114,122,1,0,0,41,9,
- 114,67,0,0,0,114,123,1,0,0,218,6,108,111,99,97,
- 108,115,114,121,1,0,0,114,104,1,0,0,114,180,0,0,
- 0,90,8,103,108,111,98,97,108,115,95,114,103,1,0,0,
- 90,7,99,117,116,95,111,102,102,114,4,0,0,0,114,4,
- 0,0,0,114,5,0,0,0,218,10,95,95,105,109,112,111,
- 114,116,95,95,18,9,0,0,115,26,0,0,0,0,11,12,
- 1,15,2,24,1,12,1,18,1,6,3,12,1,23,1,6,
- 1,4,4,35,3,40,2,114,127,1,0,0,99,1,0,0,
- 0,0,0,0,0,3,0,0,0,3,0,0,0,67,0,0,
- 0,115,68,0,0,0,116,0,0,106,1,0,124,0,0,131,
- 1,0,125,1,0,124,1,0,100,0,0,107,8,0,114,46,
- 0,116,2,0,100,1,0,124,0,0,23,131,1,0,130,1,
- 0,110,0,0,116,3,0,124,1,0,131,1,0,125,2,0,
- 124,2,0,106,4,0,131,0,0,83,41,2,78,122,25,110,
+ 114,68,0,124,1,0,106,1,0,100,5,0,131,1,0,100,
+ 6,0,25,125,1,0,124,1,0,83,41,7,122,167,67,97,
+ 108,99,117,108,97,116,101,32,119,104,97,116,32,95,95,112,
+ 97,99,107,97,103,101,95,95,32,115,104,111,117,108,100,32,
+ 98,101,46,10,10,32,32,32,32,95,95,112,97,99,107,97,
+ 103,101,95,95,32,105,115,32,110,111,116,32,103,117,97,114,
+ 97,110,116,101,101,100,32,116,111,32,98,101,32,100,101,102,
+ 105,110,101,100,32,111,114,32,99,111,117,108,100,32,98,101,
+ 32,115,101,116,32,116,111,32,78,111,110,101,10,32,32,32,
+ 32,116,111,32,114,101,112,114,101,115,101,110,116,32,116,104,
+ 97,116,32,105,116,115,32,112,114,111,112,101,114,32,118,97,
+ 108,117,101,32,105,115,32,117,110,107,110,111,119,110,46,10,
+ 10,32,32,32,32,114,134,0,0,0,78,114,1,0,0,0,
+ 114,131,0,0,0,114,121,0,0,0,114,33,0,0,0,41,
+ 2,114,42,0,0,0,114,122,0,0,0,41,2,218,7,103,
+ 108,111,98,97,108,115,114,169,0,0,0,114,10,0,0,0,
+ 114,10,0,0,0,114,11,0,0,0,218,17,95,99,97,108,
+ 99,95,95,95,112,97,99,107,97,103,101,95,95,4,4,0,
+ 0,115,12,0,0,0,0,7,15,1,12,1,10,1,12,1,
+ 19,1,114,196,0,0,0,99,5,0,0,0,0,0,0,0,
+ 9,0,0,0,5,0,0,0,67,0,0,0,115,227,0,0,
+ 0,124,4,0,100,1,0,107,2,0,114,27,0,116,0,0,
+ 124,0,0,131,1,0,125,5,0,110,54,0,124,1,0,100,
+ 2,0,107,9,0,114,45,0,124,1,0,110,3,0,105,0,
+ 0,125,6,0,116,1,0,124,6,0,131,1,0,125,7,0,
+ 116,0,0,124,0,0,124,7,0,124,4,0,131,3,0,125,
+ 5,0,124,3,0,115,207,0,124,4,0,100,1,0,107,2,
+ 0,114,122,0,116,0,0,124,0,0,106,2,0,100,3,0,
+ 131,1,0,100,1,0,25,131,1,0,83,124,0,0,115,132,
+ 0,124,5,0,83,116,3,0,124,0,0,131,1,0,116,3,
+ 0,124,0,0,106,2,0,100,3,0,131,1,0,100,1,0,
+ 25,131,1,0,24,125,8,0,116,4,0,106,5,0,124,5,
+ 0,106,6,0,100,2,0,116,3,0,124,5,0,106,6,0,
+ 131,1,0,124,8,0,24,133,2,0,25,25,83,110,16,0,
+ 116,7,0,124,5,0,124,3,0,116,0,0,131,3,0,83,
+ 100,2,0,83,41,4,97,215,1,0,0,73,109,112,111,114,
+ 116,32,97,32,109,111,100,117,108,101,46,10,10,32,32,32,
+ 32,84,104,101,32,39,103,108,111,98,97,108,115,39,32,97,
+ 114,103,117,109,101,110,116,32,105,115,32,117,115,101,100,32,
+ 116,111,32,105,110,102,101,114,32,119,104,101,114,101,32,116,
+ 104,101,32,105,109,112,111,114,116,32,105,115,32,111,99,99,
+ 117,114,114,105,110,103,32,102,114,111,109,10,32,32,32,32,
+ 116,111,32,104,97,110,100,108,101,32,114,101,108,97,116,105,
+ 118,101,32,105,109,112,111,114,116,115,46,32,84,104,101,32,
+ 39,108,111,99,97,108,115,39,32,97,114,103,117,109,101,110,
+ 116,32,105,115,32,105,103,110,111,114,101,100,46,32,84,104,
+ 101,10,32,32,32,32,39,102,114,111,109,108,105,115,116,39,
+ 32,97,114,103,117,109,101,110,116,32,115,112,101,99,105,102,
+ 105,101,115,32,119,104,97,116,32,115,104,111,117,108,100,32,
+ 101,120,105,115,116,32,97,115,32,97,116,116,114,105,98,117,
+ 116,101,115,32,111,110,32,116,104,101,32,109,111,100,117,108,
+ 101,10,32,32,32,32,98,101,105,110,103,32,105,109,112,111,
+ 114,116,101,100,32,40,101,46,103,46,32,96,96,102,114,111,
+ 109,32,109,111,100,117,108,101,32,105,109,112,111,114,116,32,
+ 60,102,114,111,109,108,105,115,116,62,96,96,41,46,32,32,
+ 84,104,101,32,39,108,101,118,101,108,39,10,32,32,32,32,
+ 97,114,103,117,109,101,110,116,32,114,101,112,114,101,115,101,
+ 110,116,115,32,116,104,101,32,112,97,99,107,97,103,101,32,
+ 108,111,99,97,116,105,111,110,32,116,111,32,105,109,112,111,
+ 114,116,32,102,114,111,109,32,105,110,32,97,32,114,101,108,
+ 97,116,105,118,101,10,32,32,32,32,105,109,112,111,114,116,
+ 32,40,101,46,103,46,32,96,96,102,114,111,109,32,46,46,
+ 112,107,103,32,105,109,112,111,114,116,32,109,111,100,96,96,
+ 32,119,111,117,108,100,32,104,97,118,101,32,97,32,39,108,
+ 101,118,101,108,39,32,111,102,32,50,41,46,10,10,32,32,
+ 32,32,114,33,0,0,0,78,114,121,0,0,0,41,8,114,
+ 186,0,0,0,114,196,0,0,0,218,9,112,97,114,116,105,
+ 116,105,111,110,114,167,0,0,0,114,14,0,0,0,114,21,
+ 0,0,0,114,1,0,0,0,114,194,0,0,0,41,9,114,
+ 15,0,0,0,114,195,0,0,0,218,6,108,111,99,97,108,
+ 115,114,192,0,0,0,114,170,0,0,0,114,89,0,0,0,
+ 90,8,103,108,111,98,97,108,115,95,114,169,0,0,0,90,
+ 7,99,117,116,95,111,102,102,114,10,0,0,0,114,10,0,
+ 0,0,114,11,0,0,0,218,10,95,95,105,109,112,111,114,
+ 116,95,95,19,4,0,0,115,26,0,0,0,0,11,12,1,
+ 15,2,24,1,12,1,18,1,6,3,12,1,23,1,6,1,
+ 4,4,35,3,40,2,114,199,0,0,0,99,1,0,0,0,
+ 0,0,0,0,2,0,0,0,3,0,0,0,67,0,0,0,
+ 115,53,0,0,0,116,0,0,106,1,0,124,0,0,131,1,
+ 0,125,1,0,124,1,0,100,0,0,107,8,0,114,43,0,
+ 116,2,0,100,1,0,124,0,0,23,131,1,0,130,1,0,
+ 116,3,0,124,1,0,131,1,0,83,41,2,78,122,25,110,
111,32,98,117,105,108,116,45,105,110,32,109,111,100,117,108,
- 101,32,110,97,109,101,100,32,41,5,114,11,1,0,0,114,
- 14,1,0,0,114,154,0,0,0,114,175,0,0,0,114,7,
- 1,0,0,41,3,114,67,0,0,0,114,178,0,0,0,114,
- 179,0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,
- 0,0,0,218,18,95,98,117,105,108,116,105,110,95,102,114,
- 111,109,95,110,97,109,101,53,9,0,0,115,10,0,0,0,
- 0,1,15,1,12,1,19,1,12,1,114,128,1,0,0,99,
- 2,0,0,0,0,0,0,0,19,0,0,0,12,0,0,0,
- 67,0,0,0,115,232,2,0,0,124,1,0,97,0,0,124,
- 0,0,97,1,0,116,1,0,106,2,0,106,3,0,114,33,
- 0,116,4,0,97,5,0,110,6,0,116,6,0,97,5,0,
- 116,7,0,116,1,0,131,1,0,125,2,0,120,138,0,116,
- 1,0,106,8,0,106,9,0,131,0,0,68,93,121,0,92,
- 2,0,125,3,0,125,4,0,116,10,0,124,4,0,124,2,
- 0,131,2,0,114,67,0,124,3,0,116,1,0,106,11,0,
- 107,6,0,114,118,0,116,12,0,125,5,0,110,27,0,116,
- 0,0,106,13,0,124,3,0,131,1,0,114,67,0,116,14,
- 0,125,5,0,110,3,0,113,67,0,116,15,0,124,4,0,
- 124,5,0,131,2,0,125,6,0,116,16,0,124,6,0,131,
- 1,0,125,7,0,124,7,0,106,17,0,124,4,0,131,1,
- 0,1,113,67,0,113,67,0,87,116,1,0,106,8,0,116,
- 18,0,25,125,8,0,120,73,0,100,26,0,68,93,65,0,
- 125,9,0,124,9,0,116,1,0,106,8,0,107,7,0,114,
- 248,0,116,19,0,124,9,0,131,1,0,125,10,0,110,13,
- 0,116,1,0,106,8,0,124,9,0,25,125,10,0,116,20,
- 0,124,8,0,124,9,0,124,10,0,131,3,0,1,113,212,
- 0,87,100,5,0,100,6,0,103,1,0,102,2,0,100,7,
- 0,100,8,0,100,6,0,103,2,0,102,2,0,102,2,0,
- 125,11,0,120,146,0,124,11,0,68,93,126,0,92,2,0,
- 125,12,0,125,13,0,116,21,0,100,9,0,100,10,0,132,
- 0,0,124,13,0,68,131,1,0,131,1,0,115,108,1,116,
- 22,0,130,1,0,124,13,0,100,11,0,25,125,14,0,124,
- 12,0,116,1,0,106,8,0,107,6,0,114,150,1,116,1,
- 0,106,8,0,124,12,0,25,125,15,0,80,113,65,1,121,
- 17,0,116,19,0,124,12,0,131,1,0,125,15,0,80,87,
- 113,65,1,4,116,23,0,107,10,0,114,190,1,1,1,1,
- 119,65,1,89,113,65,1,88,113,65,1,87,116,23,0,100,
- 12,0,131,1,0,130,1,0,116,20,0,124,8,0,100,13,
- 0,124,15,0,131,3,0,1,116,20,0,124,8,0,100,14,
- 0,124,14,0,131,3,0,1,116,20,0,124,8,0,100,15,
- 0,100,16,0,106,24,0,124,13,0,131,1,0,131,3,0,
- 1,121,16,0,116,19,0,100,17,0,131,1,0,125,16,0,
- 87,110,24,0,4,116,23,0,107,10,0,114,50,2,1,1,
- 1,100,18,0,125,16,0,89,110,1,0,88,116,20,0,124,
- 8,0,100,17,0,124,16,0,131,3,0,1,116,19,0,100,
- 19,0,131,1,0,125,17,0,116,20,0,124,8,0,100,19,
- 0,124,17,0,131,3,0,1,124,12,0,100,7,0,107,2,
- 0,114,138,2,116,19,0,100,20,0,131,1,0,125,18,0,
- 116,20,0,124,8,0,100,21,0,124,18,0,131,3,0,1,
- 110,0,0,116,20,0,124,8,0,100,22,0,116,25,0,131,
- 0,0,131,3,0,1,116,26,0,106,27,0,116,0,0,106,
- 28,0,131,0,0,131,1,0,1,124,12,0,100,7,0,107,
- 2,0,114,228,2,116,29,0,106,30,0,100,23,0,131,1,
- 0,1,100,24,0,116,26,0,107,6,0,114,228,2,100,25,
- 0,116,31,0,95,32,0,113,228,2,110,0,0,100,18,0,
- 83,41,27,122,250,83,101,116,117,112,32,105,109,112,111,114,
- 116,108,105,98,32,98,121,32,105,109,112,111,114,116,105,110,
- 103,32,110,101,101,100,101,100,32,98,117,105,108,116,45,105,
- 110,32,109,111,100,117,108,101,115,32,97,110,100,32,105,110,
- 106,101,99,116,105,110,103,32,116,104,101,109,10,32,32,32,
- 32,105,110,116,111,32,116,104,101,32,103,108,111,98,97,108,
- 32,110,97,109,101,115,112,97,99,101,46,10,10,32,32,32,
- 32,65,115,32,115,121,115,32,105,115,32,110,101,101,100,101,
- 100,32,102,111,114,32,115,121,115,46,109,111,100,117,108,101,
- 115,32,97,99,99,101,115,115,32,97,110,100,32,95,105,109,
- 112,32,105,115,32,110,101,101,100,101,100,32,116,111,32,108,
- 111,97,100,32,98,117,105,108,116,45,105,110,10,32,32,32,
- 32,109,111,100,117,108,101,115,44,32,116,104,111,115,101,32,
- 116,119,111,32,109,111,100,117,108,101,115,32,109,117,115,116,
- 32,98,101,32,101,120,112,108,105,99,105,116,108,121,32,112,
- 97,115,115,101,100,32,105,110,46,10,10,32,32,32,32,114,
- 49,0,0,0,114,167,0,0,0,218,8,98,117,105,108,116,
- 105,110,115,114,192,0,0,0,90,5,112,111,115,105,120,250,
- 1,47,218,2,110,116,250,1,92,99,1,0,0,0,0,0,
- 0,0,2,0,0,0,3,0,0,0,115,0,0,0,115,33,
- 0,0,0,124,0,0,93,23,0,125,1,0,116,0,0,124,
- 1,0,131,1,0,100,0,0,107,2,0,86,1,113,3,0,
- 100,1,0,83,41,2,114,29,0,0,0,78,41,1,114,31,
- 0,0,0,41,2,114,22,0,0,0,114,129,0,0,0,114,
- 4,0,0,0,114,4,0,0,0,114,5,0,0,0,114,77,
- 0,0,0,105,9,0,0,115,2,0,0,0,6,0,122,25,
- 95,115,101,116,117,112,46,60,108,111,99,97,108,115,62,46,
- 60,103,101,110,101,120,112,114,62,114,84,0,0,0,122,30,
- 105,109,112,111,114,116,108,105,98,32,114,101,113,117,105,114,
- 101,115,32,112,111,115,105,120,32,111,114,32,110,116,114,3,
- 0,0,0,114,25,0,0,0,114,21,0,0,0,114,30,0,
- 0,0,114,85,0,0,0,78,114,111,0,0,0,90,6,119,
- 105,110,114,101,103,114,24,1,0,0,114,6,0,0,0,122,
- 4,46,112,121,119,122,6,95,100,46,112,121,100,84,41,4,
- 122,3,95,105,111,122,9,95,119,97,114,110,105,110,103,115,
- 122,8,98,117,105,108,116,105,110,115,122,7,109,97,114,115,
- 104,97,108,41,33,114,106,0,0,0,114,7,0,0,0,114,
- 117,0,0,0,114,118,0,0,0,114,120,0,0,0,114,233,
- 0,0,0,114,119,0,0,0,114,66,0,0,0,114,73,0,
- 0,0,218,5,105,116,101,109,115,114,193,0,0,0,114,158,
- 0,0,0,114,11,1,0,0,114,163,0,0,0,114,20,1,
- 0,0,114,248,0,0,0,114,175,0,0,0,114,255,0,0,
- 0,114,57,0,0,0,114,128,1,0,0,114,61,0,0,0,
- 218,3,97,108,108,114,100,0,0,0,114,154,0,0,0,114,
- 26,0,0,0,114,11,0,0,0,114,60,1,0,0,114,198,
- 0,0,0,114,125,1,0,0,114,135,0,0,0,114,224,0,
- 0,0,114,23,1,0,0,114,27,1,0,0,41,19,218,10,
- 115,121,115,95,109,111,100,117,108,101,218,11,95,105,109,112,
- 95,109,111,100,117,108,101,90,11,109,111,100,117,108,101,95,
- 116,121,112,101,114,67,0,0,0,114,180,0,0,0,114,170,
- 0,0,0,114,178,0,0,0,114,179,0,0,0,90,11,115,
- 101,108,102,95,109,111,100,117,108,101,90,12,98,117,105,108,
- 116,105,110,95,110,97,109,101,90,14,98,117,105,108,116,105,
- 110,95,109,111,100,117,108,101,90,10,111,115,95,100,101,116,
- 97,105,108,115,90,10,98,117,105,108,116,105,110,95,111,115,
- 114,21,0,0,0,114,25,0,0,0,90,9,111,115,95,109,
- 111,100,117,108,101,90,13,116,104,114,101,97,100,95,109,111,
- 100,117,108,101,90,14,119,101,97,107,114,101,102,95,109,111,
- 100,117,108,101,90,13,119,105,110,114,101,103,95,109,111,100,
- 117,108,101,114,4,0,0,0,114,4,0,0,0,114,5,0,
- 0,0,218,6,95,115,101,116,117,112,61,9,0,0,115,108,
- 0,0,0,0,9,6,1,6,2,12,1,9,2,6,3,12,
- 1,28,1,15,1,15,1,9,1,15,1,9,2,3,1,15,
- 1,12,1,20,3,13,1,13,1,15,1,15,2,13,1,20,
- 3,33,1,19,2,31,1,10,1,15,1,13,1,4,2,3,
- 1,12,1,5,1,13,1,12,2,12,1,16,1,16,1,25,
- 3,3,1,16,1,13,2,11,1,16,3,12,1,16,3,12,
- 1,12,1,19,3,19,1,19,1,12,1,13,1,12,1,114,
- 137,1,0,0,99,2,0,0,0,0,0,0,0,3,0,0,
- 0,3,0,0,0,67,0,0,0,115,136,0,0,0,116,0,
- 0,124,0,0,124,1,0,131,2,0,1,116,1,0,131,0,
- 0,125,2,0,116,2,0,106,3,0,106,4,0,116,5,0,
- 106,6,0,124,2,0,140,0,0,103,1,0,131,1,0,1,
- 116,2,0,106,7,0,106,8,0,116,9,0,131,1,0,1,
- 116,2,0,106,7,0,106,8,0,116,10,0,131,1,0,1,
- 116,11,0,106,12,0,100,1,0,107,2,0,114,116,0,116,
- 2,0,106,7,0,106,8,0,116,13,0,131,1,0,1,110,
- 0,0,116,2,0,106,7,0,106,8,0,116,14,0,131,1,
- 0,1,100,2,0,83,41,3,122,50,73,110,115,116,97,108,
- 108,32,105,109,112,111,114,116,108,105,98,32,97,115,32,116,
- 104,101,32,105,109,112,108,101,109,101,110,116,97,116,105,111,
- 110,32,111,102,32,105,109,112,111,114,116,46,114,131,1,0,
- 0,78,41,15,114,137,1,0,0,114,241,0,0,0,114,7,
- 0,0,0,114,79,1,0,0,114,198,0,0,0,114,87,1,
- 0,0,114,101,1,0,0,114,107,1,0,0,114,224,0,0,
- 0,114,11,1,0,0,114,20,1,0,0,114,3,0,0,0,
- 114,57,0,0,0,114,23,1,0,0,114,74,1,0,0,41,
- 3,114,135,1,0,0,114,136,1,0,0,90,17,115,117,112,
- 112,111,114,116,101,100,95,108,111,97,100,101,114,115,114,4,
- 0,0,0,114,4,0,0,0,114,5,0,0,0,218,8,95,
- 105,110,115,116,97,108,108,148,9,0,0,115,16,0,0,0,
- 0,2,13,1,9,1,28,1,16,1,16,1,15,1,19,1,
- 114,138,1,0,0,41,3,122,3,119,105,110,114,1,0,0,
- 0,114,2,0,0,0,41,92,114,59,0,0,0,114,10,0,
- 0,0,114,11,0,0,0,114,17,0,0,0,114,19,0,0,
- 0,114,28,0,0,0,114,38,0,0,0,114,39,0,0,0,
- 114,43,0,0,0,114,44,0,0,0,114,46,0,0,0,114,
- 55,0,0,0,114,65,0,0,0,114,68,0,0,0,114,66,
- 0,0,0,218,8,95,95,99,111,100,101,95,95,114,194,0,
- 0,0,114,69,0,0,0,114,109,0,0,0,114,92,0,0,
- 0,114,99,0,0,0,114,82,0,0,0,114,83,0,0,0,
- 114,102,0,0,0,114,103,0,0,0,114,105,0,0,0,114,
- 112,0,0,0,114,114,0,0,0,114,15,0,0,0,114,186,
- 0,0,0,114,14,0,0,0,114,18,0,0,0,90,17,95,
- 82,65,87,95,77,65,71,73,67,95,78,85,77,66,69,82,
- 114,124,0,0,0,114,135,0,0,0,114,119,0,0,0,114,
- 120,0,0,0,114,132,0,0,0,114,136,0,0,0,114,143,
- 0,0,0,114,145,0,0,0,114,153,0,0,0,114,157,0,
- 0,0,114,162,0,0,0,114,165,0,0,0,114,173,0,0,
- 0,114,181,0,0,0,114,191,0,0,0,114,196,0,0,0,
- 114,199,0,0,0,114,204,0,0,0,114,212,0,0,0,114,
- 213,0,0,0,114,217,0,0,0,114,174,0,0,0,218,6,
- 111,98,106,101,99,116,114,242,0,0,0,114,240,0,0,0,
- 114,248,0,0,0,114,175,0,0,0,114,10,1,0,0,114,
- 11,1,0,0,114,20,1,0,0,114,23,1,0,0,114,33,
- 1,0,0,114,34,1,0,0,114,49,1,0,0,114,9,1,
- 0,0,114,8,1,0,0,114,60,1,0,0,114,57,1,0,
- 0,114,61,1,0,0,114,252,0,0,0,114,74,1,0,0,
- 114,87,1,0,0,114,102,1,0,0,114,105,1,0,0,114,
- 106,1,0,0,114,108,1,0,0,114,111,1,0,0,114,120,
- 1,0,0,114,112,1,0,0,114,114,1,0,0,114,115,1,
- 0,0,114,116,1,0,0,114,122,1,0,0,114,124,1,0,
- 0,114,241,0,0,0,114,127,1,0,0,114,128,1,0,0,
- 114,137,1,0,0,114,138,1,0,0,114,4,0,0,0,114,
- 4,0,0,0,114,4,0,0,0,114,5,0,0,0,218,8,
- 60,109,111,100,117,108,101,62,8,0,0,0,115,170,0,0,
- 0,6,17,6,3,12,12,12,5,12,5,12,6,12,12,12,
- 10,12,9,12,5,12,7,15,22,12,8,12,4,15,4,19,
- 20,6,2,6,3,22,4,19,68,19,21,19,19,12,19,12,
- 20,12,114,22,1,18,2,6,2,9,2,9,1,9,2,15,
- 27,12,23,12,19,12,12,18,8,12,18,12,11,12,11,12,
- 17,12,16,21,55,21,12,18,10,12,14,12,36,19,27,19,
- 106,24,22,9,3,12,1,15,63,18,45,19,230,15,25,19,
- 70,19,71,19,63,19,24,22,110,19,41,25,43,25,16,6,
- 3,19,57,19,57,19,38,19,129,19,146,19,13,12,9,12,
- 9,15,40,12,17,6,1,10,2,12,27,12,6,18,24,12,
- 32,12,15,12,11,24,35,12,8,12,87,
+ 101,32,110,97,109,101,100,32,41,4,114,150,0,0,0,114,
+ 154,0,0,0,114,77,0,0,0,114,149,0,0,0,41,2,
+ 114,15,0,0,0,114,88,0,0,0,114,10,0,0,0,114,
+ 10,0,0,0,114,11,0,0,0,218,18,95,98,117,105,108,
+ 116,105,110,95,102,114,111,109,95,110,97,109,101,54,4,0,
+ 0,115,8,0,0,0,0,1,15,1,12,1,16,1,114,200,
+ 0,0,0,99,2,0,0,0,0,0,0,0,12,0,0,0,
+ 12,0,0,0,67,0,0,0,115,74,1,0,0,124,1,0,
+ 97,0,0,124,0,0,97,1,0,116,2,0,116,1,0,131,
+ 1,0,125,2,0,120,123,0,116,1,0,106,3,0,106,4,
+ 0,131,0,0,68,93,106,0,92,2,0,125,3,0,125,4,
+ 0,116,5,0,124,4,0,124,2,0,131,2,0,114,40,0,
+ 124,3,0,116,1,0,106,6,0,107,6,0,114,91,0,116,
+ 7,0,125,5,0,110,27,0,116,0,0,106,8,0,124,3,
+ 0,131,1,0,114,40,0,116,9,0,125,5,0,110,3,0,
+ 113,40,0,116,10,0,124,4,0,124,5,0,131,2,0,125,
+ 6,0,116,11,0,124,6,0,124,4,0,131,2,0,1,113,
+ 40,0,87,116,1,0,106,3,0,116,12,0,25,125,7,0,
+ 120,73,0,100,5,0,68,93,65,0,125,8,0,124,8,0,
+ 116,1,0,106,3,0,107,7,0,114,206,0,116,13,0,124,
+ 8,0,131,1,0,125,9,0,110,13,0,116,1,0,106,3,
+ 0,124,8,0,25,125,9,0,116,14,0,124,7,0,124,8,
+ 0,124,9,0,131,3,0,1,113,170,0,87,121,16,0,116,
+ 13,0,100,2,0,131,1,0,125,10,0,87,110,24,0,4,
+ 116,15,0,107,10,0,114,25,1,1,1,1,100,3,0,125,
+ 10,0,89,110,1,0,88,116,14,0,124,7,0,100,2,0,
+ 124,10,0,131,3,0,1,116,13,0,100,4,0,131,1,0,
+ 125,11,0,116,14,0,124,7,0,100,4,0,124,11,0,131,
+ 3,0,1,100,3,0,83,41,6,122,250,83,101,116,117,112,
+ 32,105,109,112,111,114,116,108,105,98,32,98,121,32,105,109,
+ 112,111,114,116,105,110,103,32,110,101,101,100,101,100,32,98,
+ 117,105,108,116,45,105,110,32,109,111,100,117,108,101,115,32,
+ 97,110,100,32,105,110,106,101,99,116,105,110,103,32,116,104,
+ 101,109,10,32,32,32,32,105,110,116,111,32,116,104,101,32,
+ 103,108,111,98,97,108,32,110,97,109,101,115,112,97,99,101,
+ 46,10,10,32,32,32,32,65,115,32,115,121,115,32,105,115,
+ 32,110,101,101,100,101,100,32,102,111,114,32,115,121,115,46,
+ 109,111,100,117,108,101,115,32,97,99,99,101,115,115,32,97,
+ 110,100,32,95,105,109,112,32,105,115,32,110,101,101,100,101,
+ 100,32,116,111,32,108,111,97,100,32,98,117,105,108,116,45,
+ 105,110,10,32,32,32,32,109,111,100,117,108,101,115,44,32,
+ 116,104,111,115,101,32,116,119,111,32,109,111,100,117,108,101,
+ 115,32,109,117,115,116,32,98,101,32,101,120,112,108,105,99,
+ 105,116,108,121,32,112,97,115,115,101,100,32,105,110,46,10,
+ 10,32,32,32,32,114,141,0,0,0,114,34,0,0,0,78,
+ 114,62,0,0,0,41,1,122,9,95,119,97,114,110,105,110,
+ 103,115,41,16,114,57,0,0,0,114,14,0,0,0,114,13,
+ 0,0,0,114,21,0,0,0,218,5,105,116,101,109,115,114,
+ 177,0,0,0,114,76,0,0,0,114,150,0,0,0,114,82,
+ 0,0,0,114,160,0,0,0,114,132,0,0,0,114,137,0,
+ 0,0,114,1,0,0,0,114,200,0,0,0,114,5,0,0,
+ 0,114,77,0,0,0,41,12,218,10,115,121,115,95,109,111,
+ 100,117,108,101,218,11,95,105,109,112,95,109,111,100,117,108,
+ 101,90,11,109,111,100,117,108,101,95,116,121,112,101,114,15,
+ 0,0,0,114,89,0,0,0,114,99,0,0,0,114,88,0,
+ 0,0,90,11,115,101,108,102,95,109,111,100,117,108,101,90,
+ 12,98,117,105,108,116,105,110,95,110,97,109,101,90,14,98,
+ 117,105,108,116,105,110,95,109,111,100,117,108,101,90,13,116,
+ 104,114,101,97,100,95,109,111,100,117,108,101,90,14,119,101,
+ 97,107,114,101,102,95,109,111,100,117,108,101,114,10,0,0,
+ 0,114,10,0,0,0,114,11,0,0,0,218,6,95,115,101,
+ 116,117,112,61,4,0,0,115,50,0,0,0,0,9,6,1,
+ 6,3,12,1,28,1,15,1,15,1,9,1,15,1,9,2,
+ 3,1,15,1,17,3,13,1,13,1,15,1,15,2,13,1,
+ 20,3,3,1,16,1,13,2,11,1,16,3,12,1,114,204,
+ 0,0,0,99,2,0,0,0,0,0,0,0,3,0,0,0,
+ 3,0,0,0,67,0,0,0,115,87,0,0,0,116,0,0,
+ 124,0,0,124,1,0,131,2,0,1,116,1,0,106,2,0,
+ 106,3,0,116,4,0,131,1,0,1,116,1,0,106,2,0,
+ 106,3,0,116,5,0,131,1,0,1,100,1,0,100,2,0,
+ 108,6,0,125,2,0,124,2,0,97,7,0,124,2,0,106,
+ 8,0,116,1,0,106,9,0,116,10,0,25,131,1,0,1,
+ 100,2,0,83,41,3,122,50,73,110,115,116,97,108,108,32,
+ 105,109,112,111,114,116,108,105,98,32,97,115,32,116,104,101,
+ 32,105,109,112,108,101,109,101,110,116,97,116,105,111,110,32,
+ 111,102,32,105,109,112,111,114,116,46,114,33,0,0,0,78,
+ 41,11,114,204,0,0,0,114,14,0,0,0,114,174,0,0,
+ 0,114,113,0,0,0,114,150,0,0,0,114,160,0,0,0,
+ 218,26,95,102,114,111,122,101,110,95,105,109,112,111,114,116,
+ 108,105,98,95,101,120,116,101,114,110,97,108,114,119,0,0,
+ 0,218,8,95,105,110,115,116,97,108,108,114,21,0,0,0,
+ 114,1,0,0,0,41,3,114,202,0,0,0,114,203,0,0,
+ 0,114,205,0,0,0,114,10,0,0,0,114,10,0,0,0,
+ 114,11,0,0,0,114,206,0,0,0,108,4,0,0,115,12,
+ 0,0,0,0,2,13,2,16,1,16,3,12,1,6,1,114,
+ 206,0,0,0,41,51,114,3,0,0,0,114,119,0,0,0,
+ 114,12,0,0,0,114,16,0,0,0,114,17,0,0,0,114,
+ 59,0,0,0,114,41,0,0,0,114,48,0,0,0,114,31,
+ 0,0,0,114,32,0,0,0,114,53,0,0,0,114,54,0,
+ 0,0,114,56,0,0,0,114,63,0,0,0,114,65,0,0,
+ 0,114,75,0,0,0,114,81,0,0,0,114,84,0,0,0,
+ 114,90,0,0,0,114,101,0,0,0,114,102,0,0,0,114,
+ 106,0,0,0,114,85,0,0,0,218,6,111,98,106,101,99,
+ 116,90,9,95,80,79,80,85,76,65,84,69,114,132,0,0,
+ 0,114,137,0,0,0,114,144,0,0,0,114,97,0,0,0,
+ 114,86,0,0,0,114,148,0,0,0,114,149,0,0,0,114,
+ 87,0,0,0,114,150,0,0,0,114,160,0,0,0,114,165,
+ 0,0,0,114,171,0,0,0,114,173,0,0,0,114,176,0,
+ 0,0,114,181,0,0,0,114,191,0,0,0,114,182,0,0,
+ 0,114,184,0,0,0,114,185,0,0,0,114,186,0,0,0,
+ 114,194,0,0,0,114,196,0,0,0,114,199,0,0,0,114,
+ 200,0,0,0,114,204,0,0,0,114,206,0,0,0,114,10,
+ 0,0,0,114,10,0,0,0,114,10,0,0,0,114,11,0,
+ 0,0,218,8,60,109,111,100,117,108,101,62,8,0,0,0,
+ 115,96,0,0,0,6,17,6,2,12,8,12,4,19,20,6,
+ 2,6,3,22,4,19,68,19,21,19,19,12,19,12,19,12,
+ 11,18,8,12,11,12,12,12,16,12,36,19,27,19,101,24,
+ 26,9,3,18,45,18,60,12,18,12,17,12,25,12,29,12,
+ 23,12,16,19,73,19,77,19,13,12,9,12,9,15,40,12,
+ 17,6,1,10,2,12,27,12,6,18,24,12,32,12,15,24,
+ 35,12,7,12,47,
};
diff --git a/Python/importlib_external.h b/Python/importlib_external.h
new file mode 100644
index 0000000000..47f5c625fc
--- /dev/null
+++ b/Python/importlib_external.h
@@ -0,0 +1,2596 @@
+/* Auto-generated by Programs/_freeze_importlib.c */
+const unsigned char _Py_M__importlib_external[] = {
+ 99,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,
+ 0,64,0,0,0,115,228,2,0,0,100,0,0,90,0,0,
+ 100,96,0,90,1,0,100,4,0,100,5,0,132,0,0,90,
+ 2,0,100,6,0,100,7,0,132,0,0,90,3,0,100,8,
+ 0,100,9,0,132,0,0,90,4,0,100,10,0,100,11,0,
+ 132,0,0,90,5,0,100,12,0,100,13,0,132,0,0,90,
+ 6,0,100,14,0,100,15,0,132,0,0,90,7,0,100,16,
+ 0,100,17,0,132,0,0,90,8,0,100,18,0,100,19,0,
+ 132,0,0,90,9,0,100,20,0,100,21,0,132,0,0,90,
+ 10,0,100,22,0,100,23,0,100,24,0,132,1,0,90,11,
+ 0,101,12,0,101,11,0,106,13,0,131,1,0,90,14,0,
+ 100,25,0,106,15,0,100,26,0,100,27,0,131,2,0,100,
+ 28,0,23,90,16,0,101,17,0,106,18,0,101,16,0,100,
+ 27,0,131,2,0,90,19,0,100,29,0,90,20,0,100,30,
+ 0,90,21,0,100,31,0,103,1,0,90,22,0,100,32,0,
+ 103,1,0,90,23,0,101,23,0,4,90,24,0,90,25,0,
+ 100,33,0,100,34,0,100,33,0,100,35,0,100,36,0,132,
+ 1,1,90,26,0,100,37,0,100,38,0,132,0,0,90,27,
+ 0,100,39,0,100,40,0,132,0,0,90,28,0,100,41,0,
+ 100,42,0,132,0,0,90,29,0,100,43,0,100,44,0,132,
+ 0,0,90,30,0,100,45,0,100,46,0,100,47,0,100,48,
+ 0,132,0,1,90,31,0,100,49,0,100,50,0,132,0,0,
+ 90,32,0,100,51,0,100,52,0,132,0,0,90,33,0,100,
+ 33,0,100,33,0,100,33,0,100,53,0,100,54,0,132,3,
+ 0,90,34,0,100,33,0,100,33,0,100,33,0,100,55,0,
+ 100,56,0,132,3,0,90,35,0,100,57,0,100,57,0,100,
+ 58,0,100,59,0,132,2,0,90,36,0,100,60,0,100,61,
+ 0,132,0,0,90,37,0,101,38,0,131,0,0,90,39,0,
+ 100,33,0,100,62,0,100,33,0,100,63,0,101,39,0,100,
+ 64,0,100,65,0,132,1,2,90,40,0,71,100,66,0,100,
+ 67,0,132,0,0,100,67,0,131,2,0,90,41,0,71,100,
+ 68,0,100,69,0,132,0,0,100,69,0,131,2,0,90,42,
+ 0,71,100,70,0,100,71,0,132,0,0,100,71,0,101,42,
+ 0,131,3,0,90,43,0,71,100,72,0,100,73,0,132,0,
+ 0,100,73,0,131,2,0,90,44,0,71,100,74,0,100,75,
+ 0,132,0,0,100,75,0,101,44,0,101,43,0,131,4,0,
+ 90,45,0,71,100,76,0,100,77,0,132,0,0,100,77,0,
+ 101,44,0,101,42,0,131,4,0,90,46,0,103,0,0,90,
+ 47,0,71,100,78,0,100,79,0,132,0,0,100,79,0,101,
+ 44,0,101,42,0,131,4,0,90,48,0,71,100,80,0,100,
+ 81,0,132,0,0,100,81,0,131,2,0,90,49,0,71,100,
+ 82,0,100,83,0,132,0,0,100,83,0,131,2,0,90,50,
+ 0,71,100,84,0,100,85,0,132,0,0,100,85,0,131,2,
+ 0,90,51,0,71,100,86,0,100,87,0,132,0,0,100,87,
+ 0,131,2,0,90,52,0,100,33,0,100,88,0,100,89,0,
+ 132,1,0,90,53,0,100,90,0,100,91,0,132,0,0,90,
+ 54,0,100,92,0,100,93,0,132,0,0,90,55,0,100,94,
+ 0,100,95,0,132,0,0,90,56,0,100,33,0,83,41,97,
+ 97,94,1,0,0,67,111,114,101,32,105,109,112,108,101,109,
+ 101,110,116,97,116,105,111,110,32,111,102,32,112,97,116,104,
+ 45,98,97,115,101,100,32,105,109,112,111,114,116,46,10,10,
+ 84,104,105,115,32,109,111,100,117,108,101,32,105,115,32,78,
+ 79,84,32,109,101,97,110,116,32,116,111,32,98,101,32,100,
+ 105,114,101,99,116,108,121,32,105,109,112,111,114,116,101,100,
+ 33,32,73,116,32,104,97,115,32,98,101,101,110,32,100,101,
+ 115,105,103,110,101,100,32,115,117,99,104,10,116,104,97,116,
+ 32,105,116,32,99,97,110,32,98,101,32,98,111,111,116,115,
+ 116,114,97,112,112,101,100,32,105,110,116,111,32,80,121,116,
+ 104,111,110,32,97,115,32,116,104,101,32,105,109,112,108,101,
+ 109,101,110,116,97,116,105,111,110,32,111,102,32,105,109,112,
+ 111,114,116,46,32,65,115,10,115,117,99,104,32,105,116,32,
+ 114,101,113,117,105,114,101,115,32,116,104,101,32,105,110,106,
+ 101,99,116,105,111,110,32,111,102,32,115,112,101,99,105,102,
+ 105,99,32,109,111,100,117,108,101,115,32,97,110,100,32,97,
+ 116,116,114,105,98,117,116,101,115,32,105,110,32,111,114,100,
+ 101,114,32,116,111,10,119,111,114,107,46,32,79,110,101,32,
+ 115,104,111,117,108,100,32,117,115,101,32,105,109,112,111,114,
+ 116,108,105,98,32,97,115,32,116,104,101,32,112,117,98,108,
+ 105,99,45,102,97,99,105,110,103,32,118,101,114,115,105,111,
+ 110,32,111,102,32,116,104,105,115,32,109,111,100,117,108,101,
+ 46,10,10,218,3,119,105,110,218,6,99,121,103,119,105,110,
+ 218,6,100,97,114,119,105,110,99,0,0,0,0,0,0,0,
+ 0,1,0,0,0,2,0,0,0,67,0,0,0,115,49,0,
+ 0,0,116,0,0,106,1,0,106,2,0,116,3,0,131,1,
+ 0,114,33,0,100,1,0,100,2,0,132,0,0,125,0,0,
+ 110,12,0,100,3,0,100,2,0,132,0,0,125,0,0,124,
+ 0,0,83,41,4,78,99,0,0,0,0,0,0,0,0,0,
+ 0,0,0,2,0,0,0,83,0,0,0,115,13,0,0,0,
+ 100,1,0,116,0,0,106,1,0,107,6,0,83,41,2,122,
+ 53,84,114,117,101,32,105,102,32,102,105,108,101,110,97,109,
+ 101,115,32,109,117,115,116,32,98,101,32,99,104,101,99,107,
+ 101,100,32,99,97,115,101,45,105,110,115,101,110,115,105,116,
+ 105,118,101,108,121,46,115,12,0,0,0,80,89,84,72,79,
+ 78,67,65,83,69,79,75,41,2,218,3,95,111,115,90,7,
+ 101,110,118,105,114,111,110,169,0,114,4,0,0,0,114,4,
+ 0,0,0,250,38,60,102,114,111,122,101,110,32,105,109,112,
+ 111,114,116,108,105,98,46,95,98,111,111,116,115,116,114,97,
+ 112,95,101,120,116,101,114,110,97,108,62,218,11,95,114,101,
+ 108,97,120,95,99,97,115,101,30,0,0,0,115,2,0,0,
+ 0,0,2,122,37,95,109,97,107,101,95,114,101,108,97,120,
+ 95,99,97,115,101,46,60,108,111,99,97,108,115,62,46,95,
+ 114,101,108,97,120,95,99,97,115,101,99,0,0,0,0,0,
+ 0,0,0,0,0,0,0,1,0,0,0,83,0,0,0,115,
+ 4,0,0,0,100,1,0,83,41,2,122,53,84,114,117,101,
+ 32,105,102,32,102,105,108,101,110,97,109,101,115,32,109,117,
+ 115,116,32,98,101,32,99,104,101,99,107,101,100,32,99,97,
+ 115,101,45,105,110,115,101,110,115,105,116,105,118,101,108,121,
+ 46,70,114,4,0,0,0,114,4,0,0,0,114,4,0,0,
+ 0,114,4,0,0,0,114,5,0,0,0,114,6,0,0,0,
+ 34,0,0,0,115,2,0,0,0,0,2,41,4,218,3,115,
+ 121,115,218,8,112,108,97,116,102,111,114,109,218,10,115,116,
+ 97,114,116,115,119,105,116,104,218,27,95,67,65,83,69,95,
+ 73,78,83,69,78,83,73,84,73,86,69,95,80,76,65,84,
+ 70,79,82,77,83,41,1,114,6,0,0,0,114,4,0,0,
+ 0,114,4,0,0,0,114,5,0,0,0,218,16,95,109,97,
+ 107,101,95,114,101,108,97,120,95,99,97,115,101,28,0,0,
+ 0,115,8,0,0,0,0,1,18,1,15,4,12,3,114,11,
+ 0,0,0,99,1,0,0,0,0,0,0,0,1,0,0,0,
+ 3,0,0,0,67,0,0,0,115,26,0,0,0,116,0,0,
+ 124,0,0,131,1,0,100,1,0,64,106,1,0,100,2,0,
+ 100,3,0,131,2,0,83,41,4,122,42,67,111,110,118,101,
+ 114,116,32,97,32,51,50,45,98,105,116,32,105,110,116,101,
+ 103,101,114,32,116,111,32,108,105,116,116,108,101,45,101,110,
+ 100,105,97,110,46,108,3,0,0,0,255,127,255,127,3,0,
+ 233,4,0,0,0,218,6,108,105,116,116,108,101,41,2,218,
+ 3,105,110,116,218,8,116,111,95,98,121,116,101,115,41,1,
+ 218,1,120,114,4,0,0,0,114,4,0,0,0,114,5,0,
+ 0,0,218,7,95,119,95,108,111,110,103,40,0,0,0,115,
+ 2,0,0,0,0,2,114,17,0,0,0,99,1,0,0,0,
+ 0,0,0,0,1,0,0,0,3,0,0,0,67,0,0,0,
+ 115,16,0,0,0,116,0,0,106,1,0,124,0,0,100,1,
+ 0,131,2,0,83,41,2,122,47,67,111,110,118,101,114,116,
+ 32,52,32,98,121,116,101,115,32,105,110,32,108,105,116,116,
+ 108,101,45,101,110,100,105,97,110,32,116,111,32,97,110,32,
+ 105,110,116,101,103,101,114,46,114,13,0,0,0,41,2,114,
+ 14,0,0,0,218,10,102,114,111,109,95,98,121,116,101,115,
+ 41,1,90,9,105,110,116,95,98,121,116,101,115,114,4,0,
+ 0,0,114,4,0,0,0,114,5,0,0,0,218,7,95,114,
+ 95,108,111,110,103,45,0,0,0,115,2,0,0,0,0,2,
+ 114,19,0,0,0,99,0,0,0,0,0,0,0,0,1,0,
+ 0,0,3,0,0,0,71,0,0,0,115,26,0,0,0,116,
+ 0,0,106,1,0,100,1,0,100,2,0,132,0,0,124,0,
+ 0,68,131,1,0,131,1,0,83,41,3,122,31,82,101,112,
+ 108,97,99,101,109,101,110,116,32,102,111,114,32,111,115,46,
+ 112,97,116,104,46,106,111,105,110,40,41,46,99,1,0,0,
+ 0,0,0,0,0,2,0,0,0,4,0,0,0,83,0,0,
+ 0,115,37,0,0,0,103,0,0,124,0,0,93,27,0,125,
+ 1,0,124,1,0,114,6,0,124,1,0,106,0,0,116,1,
+ 0,131,1,0,145,2,0,113,6,0,83,114,4,0,0,0,
+ 41,2,218,6,114,115,116,114,105,112,218,15,112,97,116,104,
+ 95,115,101,112,97,114,97,116,111,114,115,41,2,218,2,46,
+ 48,218,4,112,97,114,116,114,4,0,0,0,114,4,0,0,
+ 0,114,5,0,0,0,250,10,60,108,105,115,116,99,111,109,
+ 112,62,52,0,0,0,115,2,0,0,0,9,1,122,30,95,
+ 112,97,116,104,95,106,111,105,110,46,60,108,111,99,97,108,
+ 115,62,46,60,108,105,115,116,99,111,109,112,62,41,2,218,
+ 8,112,97,116,104,95,115,101,112,218,4,106,111,105,110,41,
+ 1,218,10,112,97,116,104,95,112,97,114,116,115,114,4,0,
+ 0,0,114,4,0,0,0,114,5,0,0,0,218,10,95,112,
+ 97,116,104,95,106,111,105,110,50,0,0,0,115,4,0,0,
+ 0,0,2,15,1,114,28,0,0,0,99,1,0,0,0,0,
+ 0,0,0,5,0,0,0,5,0,0,0,67,0,0,0,115,
+ 134,0,0,0,116,0,0,116,1,0,131,1,0,100,1,0,
+ 107,2,0,114,52,0,124,0,0,106,2,0,116,3,0,131,
+ 1,0,92,3,0,125,1,0,125,2,0,125,3,0,124,1,
+ 0,124,3,0,102,2,0,83,120,69,0,116,4,0,124,0,
+ 0,131,1,0,68,93,55,0,125,4,0,124,4,0,116,1,
+ 0,107,6,0,114,65,0,124,0,0,106,5,0,124,4,0,
+ 100,2,0,100,1,0,131,1,1,92,2,0,125,1,0,125,
+ 3,0,124,1,0,124,3,0,102,2,0,83,113,65,0,87,
+ 100,3,0,124,0,0,102,2,0,83,41,4,122,32,82,101,
+ 112,108,97,99,101,109,101,110,116,32,102,111,114,32,111,115,
+ 46,112,97,116,104,46,115,112,108,105,116,40,41,46,233,1,
+ 0,0,0,90,8,109,97,120,115,112,108,105,116,218,0,41,
+ 6,218,3,108,101,110,114,21,0,0,0,218,10,114,112,97,
+ 114,116,105,116,105,111,110,114,25,0,0,0,218,8,114,101,
+ 118,101,114,115,101,100,218,6,114,115,112,108,105,116,41,5,
+ 218,4,112,97,116,104,90,5,102,114,111,110,116,218,1,95,
+ 218,4,116,97,105,108,114,16,0,0,0,114,4,0,0,0,
+ 114,4,0,0,0,114,5,0,0,0,218,11,95,112,97,116,
+ 104,95,115,112,108,105,116,56,0,0,0,115,16,0,0,0,
+ 0,2,18,1,24,1,10,1,19,1,12,1,27,1,14,1,
+ 114,38,0,0,0,99,1,0,0,0,0,0,0,0,1,0,
+ 0,0,2,0,0,0,67,0,0,0,115,13,0,0,0,116,
+ 0,0,106,1,0,124,0,0,131,1,0,83,41,1,122,126,
+ 83,116,97,116,32,116,104,101,32,112,97,116,104,46,10,10,
+ 32,32,32,32,77,97,100,101,32,97,32,115,101,112,97,114,
+ 97,116,101,32,102,117,110,99,116,105,111,110,32,116,111,32,
+ 109,97,107,101,32,105,116,32,101,97,115,105,101,114,32,116,
+ 111,32,111,118,101,114,114,105,100,101,32,105,110,32,101,120,
+ 112,101,114,105,109,101,110,116,115,10,32,32,32,32,40,101,
+ 46,103,46,32,99,97,99,104,101,32,115,116,97,116,32,114,
+ 101,115,117,108,116,115,41,46,10,10,32,32,32,32,41,2,
+ 114,3,0,0,0,90,4,115,116,97,116,41,1,114,35,0,
+ 0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,
+ 0,218,10,95,112,97,116,104,95,115,116,97,116,68,0,0,
+ 0,115,2,0,0,0,0,7,114,39,0,0,0,99,2,0,
+ 0,0,0,0,0,0,3,0,0,0,11,0,0,0,67,0,
+ 0,0,115,58,0,0,0,121,16,0,116,0,0,124,0,0,
+ 131,1,0,125,2,0,87,110,22,0,4,116,1,0,107,10,
+ 0,114,40,0,1,1,1,100,1,0,83,89,110,1,0,88,
+ 124,2,0,106,2,0,100,2,0,64,124,1,0,107,2,0,
+ 83,41,3,122,49,84,101,115,116,32,119,104,101,116,104,101,
+ 114,32,116,104,101,32,112,97,116,104,32,105,115,32,116,104,
+ 101,32,115,112,101,99,105,102,105,101,100,32,109,111,100,101,
+ 32,116,121,112,101,46,70,105,0,240,0,0,41,3,114,39,
+ 0,0,0,218,7,79,83,69,114,114,111,114,218,7,115,116,
+ 95,109,111,100,101,41,3,114,35,0,0,0,218,4,109,111,
+ 100,101,90,9,115,116,97,116,95,105,110,102,111,114,4,0,
+ 0,0,114,4,0,0,0,114,5,0,0,0,218,18,95,112,
+ 97,116,104,95,105,115,95,109,111,100,101,95,116,121,112,101,
+ 78,0,0,0,115,10,0,0,0,0,2,3,1,16,1,13,
+ 1,9,1,114,43,0,0,0,99,1,0,0,0,0,0,0,
+ 0,1,0,0,0,3,0,0,0,67,0,0,0,115,13,0,
+ 0,0,116,0,0,124,0,0,100,1,0,131,2,0,83,41,
+ 2,122,31,82,101,112,108,97,99,101,109,101,110,116,32,102,
+ 111,114,32,111,115,46,112,97,116,104,46,105,115,102,105,108,
+ 101,46,105,0,128,0,0,41,1,114,43,0,0,0,41,1,
+ 114,35,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
+ 5,0,0,0,218,12,95,112,97,116,104,95,105,115,102,105,
+ 108,101,87,0,0,0,115,2,0,0,0,0,2,114,44,0,
+ 0,0,99,1,0,0,0,0,0,0,0,1,0,0,0,3,
+ 0,0,0,67,0,0,0,115,31,0,0,0,124,0,0,115,
+ 18,0,116,0,0,106,1,0,131,0,0,125,0,0,116,2,
+ 0,124,0,0,100,1,0,131,2,0,83,41,2,122,30,82,
+ 101,112,108,97,99,101,109,101,110,116,32,102,111,114,32,111,
+ 115,46,112,97,116,104,46,105,115,100,105,114,46,105,0,64,
+ 0,0,41,3,114,3,0,0,0,218,6,103,101,116,99,119,
+ 100,114,43,0,0,0,41,1,114,35,0,0,0,114,4,0,
+ 0,0,114,4,0,0,0,114,5,0,0,0,218,11,95,112,
+ 97,116,104,95,105,115,100,105,114,92,0,0,0,115,6,0,
+ 0,0,0,2,6,1,12,1,114,46,0,0,0,105,182,1,
+ 0,0,99,3,0,0,0,0,0,0,0,6,0,0,0,17,
+ 0,0,0,67,0,0,0,115,193,0,0,0,100,1,0,106,
+ 0,0,124,0,0,116,1,0,124,0,0,131,1,0,131,2,
+ 0,125,3,0,116,2,0,106,3,0,124,3,0,116,2,0,
+ 106,4,0,116,2,0,106,5,0,66,116,2,0,106,6,0,
+ 66,124,2,0,100,2,0,64,131,3,0,125,4,0,121,61,
+ 0,116,7,0,106,8,0,124,4,0,100,3,0,131,2,0,
+ 143,20,0,125,5,0,124,5,0,106,9,0,124,1,0,131,
+ 1,0,1,87,100,4,0,81,82,88,116,2,0,106,10,0,
+ 124,3,0,124,0,0,131,2,0,1,87,110,59,0,4,116,
+ 11,0,107,10,0,114,188,0,1,1,1,121,17,0,116,2,
+ 0,106,12,0,124,3,0,131,1,0,1,87,110,18,0,4,
+ 116,11,0,107,10,0,114,180,0,1,1,1,89,110,1,0,
+ 88,130,0,0,89,110,1,0,88,100,4,0,83,41,5,122,
+ 162,66,101,115,116,45,101,102,102,111,114,116,32,102,117,110,
+ 99,116,105,111,110,32,116,111,32,119,114,105,116,101,32,100,
+ 97,116,97,32,116,111,32,97,32,112,97,116,104,32,97,116,
+ 111,109,105,99,97,108,108,121,46,10,32,32,32,32,66,101,
+ 32,112,114,101,112,97,114,101,100,32,116,111,32,104,97,110,
+ 100,108,101,32,97,32,70,105,108,101,69,120,105,115,116,115,
+ 69,114,114,111,114,32,105,102,32,99,111,110,99,117,114,114,
+ 101,110,116,32,119,114,105,116,105,110,103,32,111,102,32,116,
+ 104,101,10,32,32,32,32,116,101,109,112,111,114,97,114,121,
+ 32,102,105,108,101,32,105,115,32,97,116,116,101,109,112,116,
+ 101,100,46,122,5,123,125,46,123,125,105,182,1,0,0,90,
+ 2,119,98,78,41,13,218,6,102,111,114,109,97,116,218,2,
+ 105,100,114,3,0,0,0,90,4,111,112,101,110,90,6,79,
+ 95,69,88,67,76,90,7,79,95,67,82,69,65,84,90,8,
+ 79,95,87,82,79,78,76,89,218,3,95,105,111,218,6,70,
+ 105,108,101,73,79,218,5,119,114,105,116,101,218,7,114,101,
+ 112,108,97,99,101,114,40,0,0,0,90,6,117,110,108,105,
+ 110,107,41,6,114,35,0,0,0,218,4,100,97,116,97,114,
+ 42,0,0,0,90,8,112,97,116,104,95,116,109,112,90,2,
+ 102,100,218,4,102,105,108,101,114,4,0,0,0,114,4,0,
+ 0,0,114,5,0,0,0,218,13,95,119,114,105,116,101,95,
+ 97,116,111,109,105,99,99,0,0,0,115,26,0,0,0,0,
+ 5,24,1,9,1,33,1,3,3,21,1,20,1,20,1,13,
+ 1,3,1,17,1,13,1,5,1,114,55,0,0,0,105,22,
+ 13,0,0,233,2,0,0,0,114,13,0,0,0,115,2,0,
+ 0,0,13,10,90,11,95,95,112,121,99,97,99,104,101,95,
+ 95,122,4,111,112,116,45,122,3,46,112,121,122,4,46,112,
+ 121,99,78,218,12,111,112,116,105,109,105,122,97,116,105,111,
+ 110,99,2,0,0,0,1,0,0,0,11,0,0,0,6,0,
+ 0,0,67,0,0,0,115,87,1,0,0,124,1,0,100,1,
+ 0,107,9,0,114,76,0,116,0,0,106,1,0,100,2,0,
+ 116,2,0,131,2,0,1,124,2,0,100,1,0,107,9,0,
+ 114,58,0,100,3,0,125,3,0,116,3,0,124,3,0,131,
+ 1,0,130,1,0,124,1,0,114,70,0,100,4,0,110,3,
+ 0,100,5,0,125,2,0,116,4,0,124,0,0,131,1,0,
+ 92,2,0,125,4,0,125,5,0,124,5,0,106,5,0,100,
+ 6,0,131,1,0,92,3,0,125,6,0,125,7,0,125,8,
+ 0,116,6,0,106,7,0,106,8,0,125,9,0,124,9,0,
+ 100,1,0,107,8,0,114,154,0,116,9,0,100,7,0,131,
+ 1,0,130,1,0,100,4,0,106,10,0,124,6,0,114,172,
+ 0,124,6,0,110,3,0,124,8,0,124,7,0,124,9,0,
+ 103,3,0,131,1,0,125,10,0,124,2,0,100,1,0,107,
+ 8,0,114,241,0,116,6,0,106,11,0,106,12,0,100,8,
+ 0,107,2,0,114,229,0,100,4,0,125,2,0,110,12,0,
+ 116,6,0,106,11,0,106,12,0,125,2,0,116,13,0,124,
+ 2,0,131,1,0,125,2,0,124,2,0,100,4,0,107,3,
+ 0,114,63,1,124,2,0,106,14,0,131,0,0,115,42,1,
+ 116,15,0,100,9,0,106,16,0,124,2,0,131,1,0,131,
+ 1,0,130,1,0,100,10,0,106,16,0,124,10,0,116,17,
+ 0,124,2,0,131,3,0,125,10,0,116,18,0,124,4,0,
+ 116,19,0,124,10,0,116,20,0,100,8,0,25,23,131,3,
+ 0,83,41,11,97,254,2,0,0,71,105,118,101,110,32,116,
+ 104,101,32,112,97,116,104,32,116,111,32,97,32,46,112,121,
+ 32,102,105,108,101,44,32,114,101,116,117,114,110,32,116,104,
+ 101,32,112,97,116,104,32,116,111,32,105,116,115,32,46,112,
+ 121,99,32,102,105,108,101,46,10,10,32,32,32,32,84,104,
+ 101,32,46,112,121,32,102,105,108,101,32,100,111,101,115,32,
+ 110,111,116,32,110,101,101,100,32,116,111,32,101,120,105,115,
+ 116,59,32,116,104,105,115,32,115,105,109,112,108,121,32,114,
+ 101,116,117,114,110,115,32,116,104,101,32,112,97,116,104,32,
+ 116,111,32,116,104,101,10,32,32,32,32,46,112,121,99,32,
+ 102,105,108,101,32,99,97,108,99,117,108,97,116,101,100,32,
+ 97,115,32,105,102,32,116,104,101,32,46,112,121,32,102,105,
+ 108,101,32,119,101,114,101,32,105,109,112,111,114,116,101,100,
+ 46,10,10,32,32,32,32,84,104,101,32,39,111,112,116,105,
+ 109,105,122,97,116,105,111,110,39,32,112,97,114,97,109,101,
+ 116,101,114,32,99,111,110,116,114,111,108,115,32,116,104,101,
+ 32,112,114,101,115,117,109,101,100,32,111,112,116,105,109,105,
+ 122,97,116,105,111,110,32,108,101,118,101,108,32,111,102,10,
+ 32,32,32,32,116,104,101,32,98,121,116,101,99,111,100,101,
+ 32,102,105,108,101,46,32,73,102,32,39,111,112,116,105,109,
+ 105,122,97,116,105,111,110,39,32,105,115,32,110,111,116,32,
+ 78,111,110,101,44,32,116,104,101,32,115,116,114,105,110,103,
+ 32,114,101,112,114,101,115,101,110,116,97,116,105,111,110,10,
+ 32,32,32,32,111,102,32,116,104,101,32,97,114,103,117,109,
+ 101,110,116,32,105,115,32,116,97,107,101,110,32,97,110,100,
+ 32,118,101,114,105,102,105,101,100,32,116,111,32,98,101,32,
+ 97,108,112,104,97,110,117,109,101,114,105,99,32,40,101,108,
+ 115,101,32,86,97,108,117,101,69,114,114,111,114,10,32,32,
+ 32,32,105,115,32,114,97,105,115,101,100,41,46,10,10,32,
+ 32,32,32,84,104,101,32,100,101,98,117,103,95,111,118,101,
+ 114,114,105,100,101,32,112,97,114,97,109,101,116,101,114,32,
+ 105,115,32,100,101,112,114,101,99,97,116,101,100,46,32,73,
+ 102,32,100,101,98,117,103,95,111,118,101,114,114,105,100,101,
+ 32,105,115,32,110,111,116,32,78,111,110,101,44,10,32,32,
+ 32,32,97,32,84,114,117,101,32,118,97,108,117,101,32,105,
+ 115,32,116,104,101,32,115,97,109,101,32,97,115,32,115,101,
+ 116,116,105,110,103,32,39,111,112,116,105,109,105,122,97,116,
+ 105,111,110,39,32,116,111,32,116,104,101,32,101,109,112,116,
+ 121,32,115,116,114,105,110,103,10,32,32,32,32,119,104,105,
+ 108,101,32,97,32,70,97,108,115,101,32,118,97,108,117,101,
+ 32,105,115,32,101,113,117,105,118,97,108,101,110,116,32,116,
+ 111,32,115,101,116,116,105,110,103,32,39,111,112,116,105,109,
+ 105,122,97,116,105,111,110,39,32,116,111,32,39,49,39,46,
+ 10,10,32,32,32,32,73,102,32,115,121,115,46,105,109,112,
+ 108,101,109,101,110,116,97,116,105,111,110,46,99,97,99,104,
+ 101,95,116,97,103,32,105,115,32,78,111,110,101,32,116,104,
+ 101,110,32,78,111,116,73,109,112,108,101,109,101,110,116,101,
+ 100,69,114,114,111,114,32,105,115,32,114,97,105,115,101,100,
+ 46,10,10,32,32,32,32,78,122,70,116,104,101,32,100,101,
+ 98,117,103,95,111,118,101,114,114,105,100,101,32,112,97,114,
+ 97,109,101,116,101,114,32,105,115,32,100,101,112,114,101,99,
+ 97,116,101,100,59,32,117,115,101,32,39,111,112,116,105,109,
+ 105,122,97,116,105,111,110,39,32,105,110,115,116,101,97,100,
+ 122,50,100,101,98,117,103,95,111,118,101,114,114,105,100,101,
+ 32,111,114,32,111,112,116,105,109,105,122,97,116,105,111,110,
+ 32,109,117,115,116,32,98,101,32,115,101,116,32,116,111,32,
+ 78,111,110,101,114,30,0,0,0,114,29,0,0,0,218,1,
+ 46,122,36,115,121,115,46,105,109,112,108,101,109,101,110,116,
+ 97,116,105,111,110,46,99,97,99,104,101,95,116,97,103,32,
+ 105,115,32,78,111,110,101,233,0,0,0,0,122,24,123,33,
+ 114,125,32,105,115,32,110,111,116,32,97,108,112,104,97,110,
+ 117,109,101,114,105,99,122,7,123,125,46,123,125,123,125,41,
+ 21,218,9,95,119,97,114,110,105,110,103,115,218,4,119,97,
+ 114,110,218,18,68,101,112,114,101,99,97,116,105,111,110,87,
+ 97,114,110,105,110,103,218,9,84,121,112,101,69,114,114,111,
+ 114,114,38,0,0,0,114,32,0,0,0,114,7,0,0,0,
+ 218,14,105,109,112,108,101,109,101,110,116,97,116,105,111,110,
+ 218,9,99,97,99,104,101,95,116,97,103,218,19,78,111,116,
+ 73,109,112,108,101,109,101,110,116,101,100,69,114,114,111,114,
+ 114,26,0,0,0,218,5,102,108,97,103,115,218,8,111,112,
+ 116,105,109,105,122,101,218,3,115,116,114,218,7,105,115,97,
+ 108,110,117,109,218,10,86,97,108,117,101,69,114,114,111,114,
+ 114,47,0,0,0,218,4,95,79,80,84,114,28,0,0,0,
+ 218,8,95,80,89,67,65,67,72,69,218,17,66,89,84,69,
+ 67,79,68,69,95,83,85,70,70,73,88,69,83,41,11,114,
+ 35,0,0,0,90,14,100,101,98,117,103,95,111,118,101,114,
+ 114,105,100,101,114,57,0,0,0,218,7,109,101,115,115,97,
+ 103,101,218,4,104,101,97,100,114,37,0,0,0,90,4,98,
+ 97,115,101,218,3,115,101,112,218,4,114,101,115,116,90,3,
+ 116,97,103,90,15,97,108,109,111,115,116,95,102,105,108,101,
+ 110,97,109,101,114,4,0,0,0,114,4,0,0,0,114,5,
+ 0,0,0,218,17,99,97,99,104,101,95,102,114,111,109,95,
+ 115,111,117,114,99,101,246,0,0,0,115,46,0,0,0,0,
+ 18,12,1,9,1,7,1,12,1,6,1,12,1,18,1,18,
+ 1,24,1,12,1,12,1,12,1,36,1,12,1,18,1,9,
+ 2,12,1,12,1,12,1,12,1,21,1,21,1,114,79,0,
+ 0,0,99,1,0,0,0,0,0,0,0,8,0,0,0,5,
+ 0,0,0,67,0,0,0,115,62,1,0,0,116,0,0,106,
+ 1,0,106,2,0,100,1,0,107,8,0,114,30,0,116,3,
+ 0,100,2,0,131,1,0,130,1,0,116,4,0,124,0,0,
+ 131,1,0,92,2,0,125,1,0,125,2,0,116,4,0,124,
+ 1,0,131,1,0,92,2,0,125,1,0,125,3,0,124,3,
+ 0,116,5,0,107,3,0,114,102,0,116,6,0,100,3,0,
+ 106,7,0,116,5,0,124,0,0,131,2,0,131,1,0,130,
+ 1,0,124,2,0,106,8,0,100,4,0,131,1,0,125,4,
+ 0,124,4,0,100,11,0,107,7,0,114,153,0,116,6,0,
+ 100,7,0,106,7,0,124,2,0,131,1,0,131,1,0,130,
+ 1,0,110,125,0,124,4,0,100,6,0,107,2,0,114,22,
+ 1,124,2,0,106,9,0,100,4,0,100,5,0,131,2,0,
+ 100,12,0,25,125,5,0,124,5,0,106,10,0,116,11,0,
+ 131,1,0,115,223,0,116,6,0,100,8,0,106,7,0,116,
+ 11,0,131,1,0,131,1,0,130,1,0,124,5,0,116,12,
+ 0,116,11,0,131,1,0,100,1,0,133,2,0,25,125,6,
+ 0,124,6,0,106,13,0,131,0,0,115,22,1,116,6,0,
+ 100,9,0,106,7,0,124,5,0,131,1,0,131,1,0,130,
+ 1,0,124,2,0,106,14,0,100,4,0,131,1,0,100,10,
+ 0,25,125,7,0,116,15,0,124,1,0,124,7,0,116,16,
+ 0,100,10,0,25,23,131,2,0,83,41,13,97,110,1,0,
+ 0,71,105,118,101,110,32,116,104,101,32,112,97,116,104,32,
+ 116,111,32,97,32,46,112,121,99,46,32,102,105,108,101,44,
+ 32,114,101,116,117,114,110,32,116,104,101,32,112,97,116,104,
+ 32,116,111,32,105,116,115,32,46,112,121,32,102,105,108,101,
+ 46,10,10,32,32,32,32,84,104,101,32,46,112,121,99,32,
+ 102,105,108,101,32,100,111,101,115,32,110,111,116,32,110,101,
+ 101,100,32,116,111,32,101,120,105,115,116,59,32,116,104,105,
+ 115,32,115,105,109,112,108,121,32,114,101,116,117,114,110,115,
+ 32,116,104,101,32,112,97,116,104,32,116,111,10,32,32,32,
+ 32,116,104,101,32,46,112,121,32,102,105,108,101,32,99,97,
+ 108,99,117,108,97,116,101,100,32,116,111,32,99,111,114,114,
+ 101,115,112,111,110,100,32,116,111,32,116,104,101,32,46,112,
+ 121,99,32,102,105,108,101,46,32,32,73,102,32,112,97,116,
+ 104,32,100,111,101,115,10,32,32,32,32,110,111,116,32,99,
+ 111,110,102,111,114,109,32,116,111,32,80,69,80,32,51,49,
+ 52,55,47,52,56,56,32,102,111,114,109,97,116,44,32,86,
+ 97,108,117,101,69,114,114,111,114,32,119,105,108,108,32,98,
+ 101,32,114,97,105,115,101,100,46,32,73,102,10,32,32,32,
+ 32,115,121,115,46,105,109,112,108,101,109,101,110,116,97,116,
+ 105,111,110,46,99,97,99,104,101,95,116,97,103,32,105,115,
+ 32,78,111,110,101,32,116,104,101,110,32,78,111,116,73,109,
+ 112,108,101,109,101,110,116,101,100,69,114,114,111,114,32,105,
+ 115,32,114,97,105,115,101,100,46,10,10,32,32,32,32,78,
+ 122,36,115,121,115,46,105,109,112,108,101,109,101,110,116,97,
+ 116,105,111,110,46,99,97,99,104,101,95,116,97,103,32,105,
+ 115,32,78,111,110,101,122,37,123,125,32,110,111,116,32,98,
+ 111,116,116,111,109,45,108,101,118,101,108,32,100,105,114,101,
+ 99,116,111,114,121,32,105,110,32,123,33,114,125,114,58,0,
+ 0,0,114,56,0,0,0,233,3,0,0,0,122,33,101,120,
+ 112,101,99,116,101,100,32,111,110,108,121,32,50,32,111,114,
+ 32,51,32,100,111,116,115,32,105,110,32,123,33,114,125,122,
+ 57,111,112,116,105,109,105,122,97,116,105,111,110,32,112,111,
+ 114,116,105,111,110,32,111,102,32,102,105,108,101,110,97,109,
+ 101,32,100,111,101,115,32,110,111,116,32,115,116,97,114,116,
+ 32,119,105,116,104,32,123,33,114,125,122,52,111,112,116,105,
+ 109,105,122,97,116,105,111,110,32,108,101,118,101,108,32,123,
+ 33,114,125,32,105,115,32,110,111,116,32,97,110,32,97,108,
+ 112,104,97,110,117,109,101,114,105,99,32,118,97,108,117,101,
+ 114,59,0,0,0,62,2,0,0,0,114,56,0,0,0,114,
+ 80,0,0,0,233,254,255,255,255,41,17,114,7,0,0,0,
+ 114,64,0,0,0,114,65,0,0,0,114,66,0,0,0,114,
+ 38,0,0,0,114,73,0,0,0,114,71,0,0,0,114,47,
+ 0,0,0,218,5,99,111,117,110,116,114,34,0,0,0,114,
+ 9,0,0,0,114,72,0,0,0,114,31,0,0,0,114,70,
+ 0,0,0,218,9,112,97,114,116,105,116,105,111,110,114,28,
+ 0,0,0,218,15,83,79,85,82,67,69,95,83,85,70,70,
+ 73,88,69,83,41,8,114,35,0,0,0,114,76,0,0,0,
+ 90,16,112,121,99,97,99,104,101,95,102,105,108,101,110,97,
+ 109,101,90,7,112,121,99,97,99,104,101,90,9,100,111,116,
+ 95,99,111,117,110,116,114,57,0,0,0,90,9,111,112,116,
+ 95,108,101,118,101,108,90,13,98,97,115,101,95,102,105,108,
+ 101,110,97,109,101,114,4,0,0,0,114,4,0,0,0,114,
+ 5,0,0,0,218,17,115,111,117,114,99,101,95,102,114,111,
+ 109,95,99,97,99,104,101,34,1,0,0,115,44,0,0,0,
+ 0,9,18,1,12,1,18,1,18,1,12,1,9,1,15,1,
+ 15,1,12,1,9,1,15,1,12,1,22,1,15,1,9,1,
+ 12,1,22,1,12,1,9,1,12,1,19,1,114,85,0,0,
+ 0,99,1,0,0,0,0,0,0,0,5,0,0,0,12,0,
+ 0,0,67,0,0,0,115,164,0,0,0,116,0,0,124,0,
+ 0,131,1,0,100,1,0,107,2,0,114,22,0,100,2,0,
+ 83,124,0,0,106,1,0,100,3,0,131,1,0,92,3,0,
+ 125,1,0,125,2,0,125,3,0,124,1,0,12,115,81,0,
+ 124,3,0,106,2,0,131,0,0,100,7,0,100,8,0,133,
+ 2,0,25,100,6,0,107,3,0,114,85,0,124,0,0,83,
+ 121,16,0,116,3,0,124,0,0,131,1,0,125,4,0,87,
+ 110,40,0,4,116,4,0,116,5,0,102,2,0,107,10,0,
+ 114,143,0,1,1,1,124,0,0,100,2,0,100,9,0,133,
+ 2,0,25,125,4,0,89,110,1,0,88,116,6,0,124,4,
+ 0,131,1,0,114,160,0,124,4,0,83,124,0,0,83,41,
+ 10,122,188,67,111,110,118,101,114,116,32,97,32,98,121,116,
+ 101,99,111,100,101,32,102,105,108,101,32,112,97,116,104,32,
+ 116,111,32,97,32,115,111,117,114,99,101,32,112,97,116,104,
+ 32,40,105,102,32,112,111,115,115,105,98,108,101,41,46,10,
+ 10,32,32,32,32,84,104,105,115,32,102,117,110,99,116,105,
+ 111,110,32,101,120,105,115,116,115,32,112,117,114,101,108,121,
+ 32,102,111,114,32,98,97,99,107,119,97,114,100,115,45,99,
+ 111,109,112,97,116,105,98,105,108,105,116,121,32,102,111,114,
+ 10,32,32,32,32,80,121,73,109,112,111,114,116,95,69,120,
+ 101,99,67,111,100,101,77,111,100,117,108,101,87,105,116,104,
+ 70,105,108,101,110,97,109,101,115,40,41,32,105,110,32,116,
+ 104,101,32,67,32,65,80,73,46,10,10,32,32,32,32,114,
+ 59,0,0,0,78,114,58,0,0,0,114,80,0,0,0,114,
+ 29,0,0,0,90,2,112,121,233,253,255,255,255,233,255,255,
+ 255,255,114,87,0,0,0,41,7,114,31,0,0,0,114,32,
+ 0,0,0,218,5,108,111,119,101,114,114,85,0,0,0,114,
+ 66,0,0,0,114,71,0,0,0,114,44,0,0,0,41,5,
+ 218,13,98,121,116,101,99,111,100,101,95,112,97,116,104,114,
+ 78,0,0,0,114,36,0,0,0,90,9,101,120,116,101,110,
+ 115,105,111,110,218,11,115,111,117,114,99,101,95,112,97,116,
+ 104,114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,
+ 218,15,95,103,101,116,95,115,111,117,114,99,101,102,105,108,
+ 101,67,1,0,0,115,20,0,0,0,0,7,18,1,4,1,
+ 24,1,35,1,4,1,3,1,16,1,19,1,21,1,114,91,
+ 0,0,0,99,1,0,0,0,0,0,0,0,1,0,0,0,
+ 11,0,0,0,67,0,0,0,115,92,0,0,0,124,0,0,
+ 106,0,0,116,1,0,116,2,0,131,1,0,131,1,0,114,
+ 59,0,121,14,0,116,3,0,124,0,0,131,1,0,83,87,
+ 113,88,0,4,116,4,0,107,10,0,114,55,0,1,1,1,
+ 89,113,88,0,88,110,29,0,124,0,0,106,0,0,116,1,
+ 0,116,5,0,131,1,0,131,1,0,114,84,0,124,0,0,
+ 83,100,0,0,83,100,0,0,83,41,1,78,41,6,218,8,
+ 101,110,100,115,119,105,116,104,218,5,116,117,112,108,101,114,
+ 84,0,0,0,114,79,0,0,0,114,66,0,0,0,114,74,
+ 0,0,0,41,1,218,8,102,105,108,101,110,97,109,101,114,
+ 4,0,0,0,114,4,0,0,0,114,5,0,0,0,218,11,
+ 95,103,101,116,95,99,97,99,104,101,100,86,1,0,0,115,
+ 16,0,0,0,0,1,21,1,3,1,14,1,13,1,8,1,
+ 21,1,4,2,114,95,0,0,0,99,1,0,0,0,0,0,
+ 0,0,2,0,0,0,11,0,0,0,67,0,0,0,115,60,
+ 0,0,0,121,19,0,116,0,0,124,0,0,131,1,0,106,
+ 1,0,125,1,0,87,110,24,0,4,116,2,0,107,10,0,
+ 114,45,0,1,1,1,100,1,0,125,1,0,89,110,1,0,
+ 88,124,1,0,100,2,0,79,125,1,0,124,1,0,83,41,
+ 3,122,51,67,97,108,99,117,108,97,116,101,32,116,104,101,
+ 32,109,111,100,101,32,112,101,114,109,105,115,115,105,111,110,
+ 115,32,102,111,114,32,97,32,98,121,116,101,99,111,100,101,
+ 32,102,105,108,101,46,105,182,1,0,0,233,128,0,0,0,
+ 41,3,114,39,0,0,0,114,41,0,0,0,114,40,0,0,
+ 0,41,2,114,35,0,0,0,114,42,0,0,0,114,4,0,
+ 0,0,114,4,0,0,0,114,5,0,0,0,218,10,95,99,
+ 97,108,99,95,109,111,100,101,98,1,0,0,115,12,0,0,
+ 0,0,2,3,1,19,1,13,1,11,3,10,1,114,97,0,
+ 0,0,218,9,118,101,114,98,111,115,105,116,121,114,29,0,
+ 0,0,99,1,0,0,0,1,0,0,0,3,0,0,0,4,
+ 0,0,0,71,0,0,0,115,75,0,0,0,116,0,0,106,
+ 1,0,106,2,0,124,1,0,107,5,0,114,71,0,124,0,
+ 0,106,3,0,100,6,0,131,1,0,115,43,0,100,3,0,
+ 124,0,0,23,125,0,0,116,4,0,124,0,0,106,5,0,
+ 124,2,0,140,0,0,100,4,0,116,0,0,106,6,0,131,
+ 1,1,1,100,5,0,83,41,7,122,61,80,114,105,110,116,
+ 32,116,104,101,32,109,101,115,115,97,103,101,32,116,111,32,
+ 115,116,100,101,114,114,32,105,102,32,45,118,47,80,89,84,
+ 72,79,78,86,69,82,66,79,83,69,32,105,115,32,116,117,
+ 114,110,101,100,32,111,110,46,250,1,35,250,7,105,109,112,
+ 111,114,116,32,122,2,35,32,114,54,0,0,0,78,41,2,
+ 114,99,0,0,0,114,100,0,0,0,41,7,114,7,0,0,
+ 0,114,67,0,0,0,218,7,118,101,114,98,111,115,101,114,
+ 9,0,0,0,218,5,112,114,105,110,116,114,47,0,0,0,
+ 218,6,115,116,100,101,114,114,41,3,114,75,0,0,0,114,
+ 98,0,0,0,218,4,97,114,103,115,114,4,0,0,0,114,
+ 4,0,0,0,114,5,0,0,0,218,16,95,118,101,114,98,
+ 111,115,101,95,109,101,115,115,97,103,101,110,1,0,0,115,
+ 8,0,0,0,0,2,18,1,15,1,10,1,114,105,0,0,
+ 0,99,1,0,0,0,0,0,0,0,3,0,0,0,11,0,
+ 0,0,3,0,0,0,115,84,0,0,0,100,1,0,135,0,
+ 0,102,1,0,100,2,0,100,3,0,134,1,0,125,1,0,
+ 121,13,0,116,0,0,106,1,0,125,2,0,87,110,30,0,
+ 4,116,2,0,107,10,0,114,66,0,1,1,1,100,4,0,
+ 100,5,0,132,0,0,125,2,0,89,110,1,0,88,124,2,
+ 0,124,1,0,136,0,0,131,2,0,1,124,1,0,83,41,
+ 6,122,252,68,101,99,111,114,97,116,111,114,32,116,111,32,
+ 118,101,114,105,102,121,32,116,104,97,116,32,116,104,101,32,
+ 109,111,100,117,108,101,32,98,101,105,110,103,32,114,101,113,
+ 117,101,115,116,101,100,32,109,97,116,99,104,101,115,32,116,
+ 104,101,32,111,110,101,32,116,104,101,10,32,32,32,32,108,
+ 111,97,100,101,114,32,99,97,110,32,104,97,110,100,108,101,
+ 46,10,10,32,32,32,32,84,104,101,32,102,105,114,115,116,
+ 32,97,114,103,117,109,101,110,116,32,40,115,101,108,102,41,
+ 32,109,117,115,116,32,100,101,102,105,110,101,32,95,110,97,
+ 109,101,32,119,104,105,99,104,32,116,104,101,32,115,101,99,
+ 111,110,100,32,97,114,103,117,109,101,110,116,32,105,115,10,
+ 32,32,32,32,99,111,109,112,97,114,101,100,32,97,103,97,
+ 105,110,115,116,46,32,73,102,32,116,104,101,32,99,111,109,
+ 112,97,114,105,115,111,110,32,102,97,105,108,115,32,116,104,
+ 101,110,32,73,109,112,111,114,116,69,114,114,111,114,32,105,
+ 115,32,114,97,105,115,101,100,46,10,10,32,32,32,32,78,
+ 99,2,0,0,0,0,0,0,0,4,0,0,0,5,0,0,
+ 0,31,0,0,0,115,89,0,0,0,124,1,0,100,0,0,
+ 107,8,0,114,24,0,124,0,0,106,0,0,125,1,0,110,
+ 46,0,124,0,0,106,0,0,124,1,0,107,3,0,114,70,
+ 0,116,1,0,100,1,0,124,0,0,106,0,0,124,1,0,
+ 102,2,0,22,100,2,0,124,1,0,131,1,1,130,1,0,
+ 136,0,0,124,0,0,124,1,0,124,2,0,124,3,0,142,
+ 2,0,83,41,3,78,122,30,108,111,97,100,101,114,32,102,
+ 111,114,32,37,115,32,99,97,110,110,111,116,32,104,97,110,
+ 100,108,101,32,37,115,218,4,110,97,109,101,41,2,114,106,
+ 0,0,0,218,11,73,109,112,111,114,116,69,114,114,111,114,
+ 41,4,218,4,115,101,108,102,114,106,0,0,0,114,104,0,
+ 0,0,90,6,107,119,97,114,103,115,41,1,218,6,109,101,
+ 116,104,111,100,114,4,0,0,0,114,5,0,0,0,218,19,
+ 95,99,104,101,99,107,95,110,97,109,101,95,119,114,97,112,
+ 112,101,114,126,1,0,0,115,12,0,0,0,0,1,12,1,
+ 12,1,15,1,6,1,25,1,122,40,95,99,104,101,99,107,
+ 95,110,97,109,101,46,60,108,111,99,97,108,115,62,46,95,
+ 99,104,101,99,107,95,110,97,109,101,95,119,114,97,112,112,
+ 101,114,99,2,0,0,0,0,0,0,0,3,0,0,0,7,
+ 0,0,0,83,0,0,0,115,92,0,0,0,120,66,0,100,
+ 1,0,100,2,0,100,3,0,100,4,0,103,4,0,68,93,
+ 46,0,125,2,0,116,0,0,124,1,0,124,2,0,131,2,
+ 0,114,19,0,116,1,0,124,0,0,124,2,0,116,2,0,
+ 124,1,0,124,2,0,131,2,0,131,3,0,1,113,19,0,
+ 87,124,0,0,106,3,0,106,4,0,124,1,0,106,3,0,
+ 131,1,0,1,100,0,0,83,41,5,78,218,10,95,95,109,
+ 111,100,117,108,101,95,95,218,8,95,95,110,97,109,101,95,
+ 95,218,12,95,95,113,117,97,108,110,97,109,101,95,95,218,
+ 7,95,95,100,111,99,95,95,41,5,218,7,104,97,115,97,
+ 116,116,114,218,7,115,101,116,97,116,116,114,218,7,103,101,
+ 116,97,116,116,114,218,8,95,95,100,105,99,116,95,95,218,
+ 6,117,112,100,97,116,101,41,3,90,3,110,101,119,90,3,
+ 111,108,100,114,52,0,0,0,114,4,0,0,0,114,4,0,
+ 0,0,114,5,0,0,0,218,5,95,119,114,97,112,137,1,
+ 0,0,115,8,0,0,0,0,1,25,1,15,1,29,1,122,
+ 26,95,99,104,101,99,107,95,110,97,109,101,46,60,108,111,
+ 99,97,108,115,62,46,95,119,114,97,112,41,3,218,10,95,
+ 98,111,111,116,115,116,114,97,112,114,120,0,0,0,218,9,
+ 78,97,109,101,69,114,114,111,114,41,3,114,109,0,0,0,
+ 114,110,0,0,0,114,120,0,0,0,114,4,0,0,0,41,
+ 1,114,109,0,0,0,114,5,0,0,0,218,11,95,99,104,
+ 101,99,107,95,110,97,109,101,118,1,0,0,115,14,0,0,
+ 0,0,8,21,7,3,1,13,1,13,2,17,5,13,1,114,
+ 123,0,0,0,99,2,0,0,0,0,0,0,0,5,0,0,
+ 0,4,0,0,0,67,0,0,0,115,84,0,0,0,124,0,
+ 0,106,0,0,124,1,0,131,1,0,92,2,0,125,2,0,
+ 125,3,0,124,2,0,100,1,0,107,8,0,114,80,0,116,
+ 1,0,124,3,0,131,1,0,114,80,0,100,2,0,125,4,
+ 0,116,2,0,106,3,0,124,4,0,106,4,0,124,3,0,
+ 100,3,0,25,131,1,0,116,5,0,131,2,0,1,124,2,
+ 0,83,41,4,122,155,84,114,121,32,116,111,32,102,105,110,
+ 100,32,97,32,108,111,97,100,101,114,32,102,111,114,32,116,
+ 104,101,32,115,112,101,99,105,102,105,101,100,32,109,111,100,
+ 117,108,101,32,98,121,32,100,101,108,101,103,97,116,105,110,
+ 103,32,116,111,10,32,32,32,32,115,101,108,102,46,102,105,
+ 110,100,95,108,111,97,100,101,114,40,41,46,10,10,32,32,
+ 32,32,84,104,105,115,32,109,101,116,104,111,100,32,105,115,
+ 32,100,101,112,114,101,99,97,116,101,100,32,105,110,32,102,
+ 97,118,111,114,32,111,102,32,102,105,110,100,101,114,46,102,
+ 105,110,100,95,115,112,101,99,40,41,46,10,10,32,32,32,
+ 32,78,122,44,78,111,116,32,105,109,112,111,114,116,105,110,
+ 103,32,100,105,114,101,99,116,111,114,121,32,123,125,58,32,
+ 109,105,115,115,105,110,103,32,95,95,105,110,105,116,95,95,
+ 114,59,0,0,0,41,6,218,11,102,105,110,100,95,108,111,
+ 97,100,101,114,114,31,0,0,0,114,60,0,0,0,114,61,
+ 0,0,0,114,47,0,0,0,218,13,73,109,112,111,114,116,
+ 87,97,114,110,105,110,103,41,5,114,108,0,0,0,218,8,
+ 102,117,108,108,110,97,109,101,218,6,108,111,97,100,101,114,
+ 218,8,112,111,114,116,105,111,110,115,218,3,109,115,103,114,
+ 4,0,0,0,114,4,0,0,0,114,5,0,0,0,218,17,
+ 95,102,105,110,100,95,109,111,100,117,108,101,95,115,104,105,
+ 109,146,1,0,0,115,10,0,0,0,0,10,21,1,24,1,
+ 6,1,29,1,114,130,0,0,0,99,4,0,0,0,0,0,
+ 0,0,11,0,0,0,19,0,0,0,67,0,0,0,115,240,
+ 1,0,0,105,0,0,125,4,0,124,2,0,100,1,0,107,
+ 9,0,114,31,0,124,2,0,124,4,0,100,2,0,60,110,
+ 6,0,100,3,0,125,2,0,124,3,0,100,1,0,107,9,
+ 0,114,59,0,124,3,0,124,4,0,100,4,0,60,124,0,
+ 0,100,1,0,100,5,0,133,2,0,25,125,5,0,124,0,
+ 0,100,5,0,100,6,0,133,2,0,25,125,6,0,124,0,
+ 0,100,6,0,100,7,0,133,2,0,25,125,7,0,124,5,
+ 0,116,0,0,107,3,0,114,168,0,100,8,0,106,1,0,
+ 124,2,0,124,5,0,131,2,0,125,8,0,116,2,0,100,
+ 9,0,124,8,0,131,2,0,1,116,3,0,124,8,0,124,
+ 4,0,141,1,0,130,1,0,110,119,0,116,4,0,124,6,
+ 0,131,1,0,100,5,0,107,3,0,114,229,0,100,10,0,
+ 106,1,0,124,2,0,131,1,0,125,8,0,116,2,0,100,
+ 9,0,124,8,0,131,2,0,1,116,5,0,124,8,0,131,
+ 1,0,130,1,0,110,58,0,116,4,0,124,7,0,131,1,
+ 0,100,5,0,107,3,0,114,31,1,100,11,0,106,1,0,
+ 124,2,0,131,1,0,125,8,0,116,2,0,100,9,0,124,
+ 8,0,131,2,0,1,116,5,0,124,8,0,131,1,0,130,
+ 1,0,124,1,0,100,1,0,107,9,0,114,226,1,121,20,
+ 0,116,6,0,124,1,0,100,12,0,25,131,1,0,125,9,
+ 0,87,110,18,0,4,116,7,0,107,10,0,114,83,1,1,
+ 1,1,89,110,62,0,88,116,8,0,124,6,0,131,1,0,
+ 124,9,0,107,3,0,114,145,1,100,13,0,106,1,0,124,
+ 2,0,131,1,0,125,8,0,116,2,0,100,9,0,124,8,
+ 0,131,2,0,1,116,3,0,124,8,0,124,4,0,141,1,
+ 0,130,1,0,121,18,0,124,1,0,100,14,0,25,100,15,
+ 0,64,125,10,0,87,110,18,0,4,116,7,0,107,10,0,
+ 114,183,1,1,1,1,89,110,43,0,88,116,8,0,124,7,
+ 0,131,1,0,124,10,0,107,3,0,114,226,1,116,3,0,
+ 100,13,0,106,1,0,124,2,0,131,1,0,124,4,0,141,
+ 1,0,130,1,0,124,0,0,100,7,0,100,1,0,133,2,
+ 0,25,83,41,16,97,122,1,0,0,86,97,108,105,100,97,
+ 116,101,32,116,104,101,32,104,101,97,100,101,114,32,111,102,
+ 32,116,104,101,32,112,97,115,115,101,100,45,105,110,32,98,
+ 121,116,101,99,111,100,101,32,97,103,97,105,110,115,116,32,
+ 115,111,117,114,99,101,95,115,116,97,116,115,32,40,105,102,
+ 10,32,32,32,32,103,105,118,101,110,41,32,97,110,100,32,
+ 114,101,116,117,114,110,105,110,103,32,116,104,101,32,98,121,
+ 116,101,99,111,100,101,32,116,104,97,116,32,99,97,110,32,
+ 98,101,32,99,111,109,112,105,108,101,100,32,98,121,32,99,
+ 111,109,112,105,108,101,40,41,46,10,10,32,32,32,32,65,
+ 108,108,32,111,116,104,101,114,32,97,114,103,117,109,101,110,
+ 116,115,32,97,114,101,32,117,115,101,100,32,116,111,32,101,
+ 110,104,97,110,99,101,32,101,114,114,111,114,32,114,101,112,
+ 111,114,116,105,110,103,46,10,10,32,32,32,32,73,109,112,
+ 111,114,116,69,114,114,111,114,32,105,115,32,114,97,105,115,
+ 101,100,32,119,104,101,110,32,116,104,101,32,109,97,103,105,
+ 99,32,110,117,109,98,101,114,32,105,115,32,105,110,99,111,
+ 114,114,101,99,116,32,111,114,32,116,104,101,32,98,121,116,
+ 101,99,111,100,101,32,105,115,10,32,32,32,32,102,111,117,
+ 110,100,32,116,111,32,98,101,32,115,116,97,108,101,46,32,
+ 69,79,70,69,114,114,111,114,32,105,115,32,114,97,105,115,
+ 101,100,32,119,104,101,110,32,116,104,101,32,100,97,116,97,
+ 32,105,115,32,102,111,117,110,100,32,116,111,32,98,101,10,
+ 32,32,32,32,116,114,117,110,99,97,116,101,100,46,10,10,
+ 32,32,32,32,78,114,106,0,0,0,122,10,60,98,121,116,
+ 101,99,111,100,101,62,114,35,0,0,0,114,12,0,0,0,
+ 233,8,0,0,0,233,12,0,0,0,122,30,98,97,100,32,
+ 109,97,103,105,99,32,110,117,109,98,101,114,32,105,110,32,
+ 123,33,114,125,58,32,123,33,114,125,122,2,123,125,122,43,
+ 114,101,97,99,104,101,100,32,69,79,70,32,119,104,105,108,
+ 101,32,114,101,97,100,105,110,103,32,116,105,109,101,115,116,
+ 97,109,112,32,105,110,32,123,33,114,125,122,48,114,101,97,
+ 99,104,101,100,32,69,79,70,32,119,104,105,108,101,32,114,
+ 101,97,100,105,110,103,32,115,105,122,101,32,111,102,32,115,
+ 111,117,114,99,101,32,105,110,32,123,33,114,125,218,5,109,
+ 116,105,109,101,122,26,98,121,116,101,99,111,100,101,32,105,
+ 115,32,115,116,97,108,101,32,102,111,114,32,123,33,114,125,
+ 218,4,115,105,122,101,108,3,0,0,0,255,127,255,127,3,
+ 0,41,9,218,12,77,65,71,73,67,95,78,85,77,66,69,
+ 82,114,47,0,0,0,114,105,0,0,0,114,107,0,0,0,
+ 114,31,0,0,0,218,8,69,79,70,69,114,114,111,114,114,
+ 14,0,0,0,218,8,75,101,121,69,114,114,111,114,114,19,
+ 0,0,0,41,11,114,53,0,0,0,218,12,115,111,117,114,
+ 99,101,95,115,116,97,116,115,114,106,0,0,0,114,35,0,
+ 0,0,90,11,101,120,99,95,100,101,116,97,105,108,115,90,
+ 5,109,97,103,105,99,90,13,114,97,119,95,116,105,109,101,
+ 115,116,97,109,112,90,8,114,97,119,95,115,105,122,101,114,
+ 75,0,0,0,218,12,115,111,117,114,99,101,95,109,116,105,
+ 109,101,218,11,115,111,117,114,99,101,95,115,105,122,101,114,
+ 4,0,0,0,114,4,0,0,0,114,5,0,0,0,218,25,
+ 95,118,97,108,105,100,97,116,101,95,98,121,116,101,99,111,
+ 100,101,95,104,101,97,100,101,114,163,1,0,0,115,76,0,
+ 0,0,0,11,6,1,12,1,13,3,6,1,12,1,10,1,
+ 16,1,16,1,16,1,12,1,18,1,13,1,18,1,18,1,
+ 15,1,13,1,15,1,18,1,15,1,13,1,12,1,12,1,
+ 3,1,20,1,13,1,5,2,18,1,15,1,13,1,15,1,
+ 3,1,18,1,13,1,5,2,18,1,15,1,9,1,114,141,
+ 0,0,0,99,4,0,0,0,0,0,0,0,5,0,0,0,
+ 6,0,0,0,67,0,0,0,115,112,0,0,0,116,0,0,
+ 106,1,0,124,0,0,131,1,0,125,4,0,116,2,0,124,
+ 4,0,116,3,0,131,2,0,114,75,0,116,4,0,100,1,
+ 0,124,2,0,131,2,0,1,124,3,0,100,2,0,107,9,
+ 0,114,71,0,116,5,0,106,6,0,124,4,0,124,3,0,
+ 131,2,0,1,124,4,0,83,116,7,0,100,3,0,106,8,
+ 0,124,2,0,131,1,0,100,4,0,124,1,0,100,5,0,
+ 124,2,0,131,1,2,130,1,0,100,2,0,83,41,6,122,
+ 60,67,111,109,112,105,108,101,32,98,121,116,101,99,111,100,
+ 101,32,97,115,32,114,101,116,117,114,110,101,100,32,98,121,
+ 32,95,118,97,108,105,100,97,116,101,95,98,121,116,101,99,
+ 111,100,101,95,104,101,97,100,101,114,40,41,46,122,21,99,
+ 111,100,101,32,111,98,106,101,99,116,32,102,114,111,109,32,
+ 123,33,114,125,78,122,23,78,111,110,45,99,111,100,101,32,
+ 111,98,106,101,99,116,32,105,110,32,123,33,114,125,114,106,
+ 0,0,0,114,35,0,0,0,41,9,218,7,109,97,114,115,
+ 104,97,108,90,5,108,111,97,100,115,218,10,105,115,105,110,
+ 115,116,97,110,99,101,218,10,95,99,111,100,101,95,116,121,
+ 112,101,114,105,0,0,0,218,4,95,105,109,112,90,16,95,
+ 102,105,120,95,99,111,95,102,105,108,101,110,97,109,101,114,
+ 107,0,0,0,114,47,0,0,0,41,5,114,53,0,0,0,
+ 114,106,0,0,0,114,89,0,0,0,114,90,0,0,0,218,
+ 4,99,111,100,101,114,4,0,0,0,114,4,0,0,0,114,
+ 5,0,0,0,218,17,95,99,111,109,112,105,108,101,95,98,
+ 121,116,101,99,111,100,101,218,1,0,0,115,16,0,0,0,
+ 0,2,15,1,15,1,13,1,12,1,16,1,4,2,18,1,
+ 114,147,0,0,0,114,59,0,0,0,99,3,0,0,0,0,
+ 0,0,0,4,0,0,0,3,0,0,0,67,0,0,0,115,
+ 76,0,0,0,116,0,0,116,1,0,131,1,0,125,3,0,
+ 124,3,0,106,2,0,116,3,0,124,1,0,131,1,0,131,
+ 1,0,1,124,3,0,106,2,0,116,3,0,124,2,0,131,
+ 1,0,131,1,0,1,124,3,0,106,2,0,116,4,0,106,
+ 5,0,124,0,0,131,1,0,131,1,0,1,124,3,0,83,
+ 41,1,122,80,67,111,109,112,105,108,101,32,97,32,99,111,
+ 100,101,32,111,98,106,101,99,116,32,105,110,116,111,32,98,
+ 121,116,101,99,111,100,101,32,102,111,114,32,119,114,105,116,
+ 105,110,103,32,111,117,116,32,116,111,32,97,32,98,121,116,
+ 101,45,99,111,109,112,105,108,101,100,10,32,32,32,32,102,
+ 105,108,101,46,41,6,218,9,98,121,116,101,97,114,114,97,
+ 121,114,135,0,0,0,218,6,101,120,116,101,110,100,114,17,
+ 0,0,0,114,142,0,0,0,90,5,100,117,109,112,115,41,
+ 4,114,146,0,0,0,114,133,0,0,0,114,140,0,0,0,
+ 114,53,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
+ 5,0,0,0,218,17,95,99,111,100,101,95,116,111,95,98,
+ 121,116,101,99,111,100,101,230,1,0,0,115,10,0,0,0,
+ 0,3,12,1,19,1,19,1,22,1,114,150,0,0,0,99,
+ 1,0,0,0,0,0,0,0,5,0,0,0,4,0,0,0,
+ 67,0,0,0,115,89,0,0,0,100,1,0,100,2,0,108,
+ 0,0,125,1,0,116,1,0,106,2,0,124,0,0,131,1,
+ 0,106,3,0,125,2,0,124,1,0,106,4,0,124,2,0,
+ 131,1,0,125,3,0,116,1,0,106,5,0,100,2,0,100,
+ 3,0,131,2,0,125,4,0,124,4,0,106,6,0,124,0,
+ 0,106,6,0,124,3,0,100,1,0,25,131,1,0,131,1,
+ 0,83,41,4,122,121,68,101,99,111,100,101,32,98,121,116,
+ 101,115,32,114,101,112,114,101,115,101,110,116,105,110,103,32,
+ 115,111,117,114,99,101,32,99,111,100,101,32,97,110,100,32,
+ 114,101,116,117,114,110,32,116,104,101,32,115,116,114,105,110,
+ 103,46,10,10,32,32,32,32,85,110,105,118,101,114,115,97,
+ 108,32,110,101,119,108,105,110,101,32,115,117,112,112,111,114,
+ 116,32,105,115,32,117,115,101,100,32,105,110,32,116,104,101,
+ 32,100,101,99,111,100,105,110,103,46,10,32,32,32,32,114,
+ 59,0,0,0,78,84,41,7,218,8,116,111,107,101,110,105,
+ 122,101,114,49,0,0,0,90,7,66,121,116,101,115,73,79,
+ 90,8,114,101,97,100,108,105,110,101,90,15,100,101,116,101,
+ 99,116,95,101,110,99,111,100,105,110,103,90,25,73,110,99,
+ 114,101,109,101,110,116,97,108,78,101,119,108,105,110,101,68,
+ 101,99,111,100,101,114,218,6,100,101,99,111,100,101,41,5,
+ 218,12,115,111,117,114,99,101,95,98,121,116,101,115,114,151,
+ 0,0,0,90,21,115,111,117,114,99,101,95,98,121,116,101,
+ 115,95,114,101,97,100,108,105,110,101,218,8,101,110,99,111,
+ 100,105,110,103,90,15,110,101,119,108,105,110,101,95,100,101,
+ 99,111,100,101,114,114,4,0,0,0,114,4,0,0,0,114,
+ 5,0,0,0,218,13,100,101,99,111,100,101,95,115,111,117,
+ 114,99,101,240,1,0,0,115,10,0,0,0,0,5,12,1,
+ 18,1,15,1,18,1,114,155,0,0,0,114,127,0,0,0,
+ 218,26,115,117,98,109,111,100,117,108,101,95,115,101,97,114,
+ 99,104,95,108,111,99,97,116,105,111,110,115,99,2,0,0,
+ 0,2,0,0,0,9,0,0,0,19,0,0,0,67,0,0,
+ 0,115,89,1,0,0,124,1,0,100,1,0,107,8,0,114,
+ 73,0,100,2,0,125,1,0,116,0,0,124,2,0,100,3,
+ 0,131,2,0,114,73,0,121,19,0,124,2,0,106,1,0,
+ 124,0,0,131,1,0,125,1,0,87,110,18,0,4,116,2,
+ 0,107,10,0,114,72,0,1,1,1,89,110,1,0,88,116,
+ 3,0,106,4,0,124,0,0,124,2,0,100,4,0,124,1,
+ 0,131,2,1,125,4,0,100,5,0,124,4,0,95,5,0,
+ 124,2,0,100,1,0,107,8,0,114,194,0,120,73,0,116,
+ 6,0,131,0,0,68,93,58,0,92,2,0,125,5,0,125,
+ 6,0,124,1,0,106,7,0,116,8,0,124,6,0,131,1,
+ 0,131,1,0,114,128,0,124,5,0,124,0,0,124,1,0,
+ 131,2,0,125,2,0,124,2,0,124,4,0,95,9,0,80,
+ 113,128,0,87,100,1,0,83,124,3,0,116,10,0,107,8,
+ 0,114,23,1,116,0,0,124,2,0,100,6,0,131,2,0,
+ 114,32,1,121,19,0,124,2,0,106,11,0,124,0,0,131,
+ 1,0,125,7,0,87,110,18,0,4,116,2,0,107,10,0,
+ 114,4,1,1,1,1,89,113,32,1,88,124,7,0,114,32,
+ 1,103,0,0,124,4,0,95,12,0,110,9,0,124,3,0,
+ 124,4,0,95,12,0,124,4,0,106,12,0,103,0,0,107,
+ 2,0,114,85,1,124,1,0,114,85,1,116,13,0,124,1,
+ 0,131,1,0,100,7,0,25,125,8,0,124,4,0,106,12,
+ 0,106,14,0,124,8,0,131,1,0,1,124,4,0,83,41,
+ 8,97,61,1,0,0,82,101,116,117,114,110,32,97,32,109,
+ 111,100,117,108,101,32,115,112,101,99,32,98,97,115,101,100,
+ 32,111,110,32,97,32,102,105,108,101,32,108,111,99,97,116,
+ 105,111,110,46,10,10,32,32,32,32,84,111,32,105,110,100,
+ 105,99,97,116,101,32,116,104,97,116,32,116,104,101,32,109,
+ 111,100,117,108,101,32,105,115,32,97,32,112,97,99,107,97,
+ 103,101,44,32,115,101,116,10,32,32,32,32,115,117,98,109,
+ 111,100,117,108,101,95,115,101,97,114,99,104,95,108,111,99,
+ 97,116,105,111,110,115,32,116,111,32,97,32,108,105,115,116,
+ 32,111,102,32,100,105,114,101,99,116,111,114,121,32,112,97,
+ 116,104,115,46,32,32,65,110,10,32,32,32,32,101,109,112,
+ 116,121,32,108,105,115,116,32,105,115,32,115,117,102,102,105,
+ 99,105,101,110,116,44,32,116,104,111,117,103,104,32,105,116,
+ 115,32,110,111,116,32,111,116,104,101,114,119,105,115,101,32,
+ 117,115,101,102,117,108,32,116,111,32,116,104,101,10,32,32,
+ 32,32,105,109,112,111,114,116,32,115,121,115,116,101,109,46,
+ 10,10,32,32,32,32,84,104,101,32,108,111,97,100,101,114,
+ 32,109,117,115,116,32,116,97,107,101,32,97,32,115,112,101,
+ 99,32,97,115,32,105,116,115,32,111,110,108,121,32,95,95,
+ 105,110,105,116,95,95,40,41,32,97,114,103,46,10,10,32,
+ 32,32,32,78,122,9,60,117,110,107,110,111,119,110,62,218,
+ 12,103,101,116,95,102,105,108,101,110,97,109,101,218,6,111,
+ 114,105,103,105,110,84,218,10,105,115,95,112,97,99,107,97,
+ 103,101,114,59,0,0,0,41,15,114,115,0,0,0,114,157,
+ 0,0,0,114,107,0,0,0,114,121,0,0,0,218,10,77,
+ 111,100,117,108,101,83,112,101,99,90,13,95,115,101,116,95,
+ 102,105,108,101,97,116,116,114,218,27,95,103,101,116,95,115,
+ 117,112,112,111,114,116,101,100,95,102,105,108,101,95,108,111,
+ 97,100,101,114,115,114,92,0,0,0,114,93,0,0,0,114,
+ 127,0,0,0,218,9,95,80,79,80,85,76,65,84,69,114,
+ 159,0,0,0,114,156,0,0,0,114,38,0,0,0,218,6,
+ 97,112,112,101,110,100,41,9,114,106,0,0,0,90,8,108,
+ 111,99,97,116,105,111,110,114,127,0,0,0,114,156,0,0,
+ 0,218,4,115,112,101,99,218,12,108,111,97,100,101,114,95,
+ 99,108,97,115,115,218,8,115,117,102,102,105,120,101,115,114,
+ 159,0,0,0,90,7,100,105,114,110,97,109,101,114,4,0,
+ 0,0,114,4,0,0,0,114,5,0,0,0,218,23,115,112,
+ 101,99,95,102,114,111,109,95,102,105,108,101,95,108,111,99,
+ 97,116,105,111,110,1,2,0,0,115,60,0,0,0,0,12,
+ 12,4,6,1,15,2,3,1,19,1,13,1,5,8,24,1,
+ 9,3,12,1,22,1,21,1,15,1,9,1,5,2,4,3,
+ 12,2,15,1,3,1,19,1,13,1,5,2,6,1,12,2,
+ 9,1,15,1,6,1,16,1,16,2,114,167,0,0,0,99,
+ 0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,
+ 64,0,0,0,115,121,0,0,0,101,0,0,90,1,0,100,
+ 0,0,90,2,0,100,1,0,90,3,0,100,2,0,90,4,
+ 0,100,3,0,90,5,0,100,4,0,90,6,0,101,7,0,
+ 100,5,0,100,6,0,132,0,0,131,1,0,90,8,0,101,
+ 7,0,100,7,0,100,8,0,132,0,0,131,1,0,90,9,
+ 0,101,7,0,100,9,0,100,9,0,100,10,0,100,11,0,
+ 132,2,0,131,1,0,90,10,0,101,7,0,100,9,0,100,
+ 12,0,100,13,0,132,1,0,131,1,0,90,11,0,100,9,
+ 0,83,41,14,218,21,87,105,110,100,111,119,115,82,101,103,
+ 105,115,116,114,121,70,105,110,100,101,114,122,62,77,101,116,
+ 97,32,112,97,116,104,32,102,105,110,100,101,114,32,102,111,
+ 114,32,109,111,100,117,108,101,115,32,100,101,99,108,97,114,
+ 101,100,32,105,110,32,116,104,101,32,87,105,110,100,111,119,
+ 115,32,114,101,103,105,115,116,114,121,46,122,59,83,111,102,
+ 116,119,97,114,101,92,80,121,116,104,111,110,92,80,121,116,
+ 104,111,110,67,111,114,101,92,123,115,121,115,95,118,101,114,
+ 115,105,111,110,125,92,77,111,100,117,108,101,115,92,123,102,
+ 117,108,108,110,97,109,101,125,122,65,83,111,102,116,119,97,
+ 114,101,92,80,121,116,104,111,110,92,80,121,116,104,111,110,
+ 67,111,114,101,92,123,115,121,115,95,118,101,114,115,105,111,
+ 110,125,92,77,111,100,117,108,101,115,92,123,102,117,108,108,
+ 110,97,109,101,125,92,68,101,98,117,103,70,99,2,0,0,
+ 0,0,0,0,0,2,0,0,0,11,0,0,0,67,0,0,
+ 0,115,67,0,0,0,121,23,0,116,0,0,106,1,0,116,
+ 0,0,106,2,0,124,1,0,131,2,0,83,87,110,37,0,
+ 4,116,3,0,107,10,0,114,62,0,1,1,1,116,0,0,
+ 106,1,0,116,0,0,106,4,0,124,1,0,131,2,0,83,
+ 89,110,1,0,88,100,0,0,83,41,1,78,41,5,218,7,
+ 95,119,105,110,114,101,103,90,7,79,112,101,110,75,101,121,
+ 90,17,72,75,69,89,95,67,85,82,82,69,78,84,95,85,
+ 83,69,82,114,40,0,0,0,90,18,72,75,69,89,95,76,
+ 79,67,65,76,95,77,65,67,72,73,78,69,41,2,218,3,
+ 99,108,115,218,3,107,101,121,114,4,0,0,0,114,4,0,
+ 0,0,114,5,0,0,0,218,14,95,111,112,101,110,95,114,
+ 101,103,105,115,116,114,121,79,2,0,0,115,8,0,0,0,
+ 0,2,3,1,23,1,13,1,122,36,87,105,110,100,111,119,
+ 115,82,101,103,105,115,116,114,121,70,105,110,100,101,114,46,
+ 95,111,112,101,110,95,114,101,103,105,115,116,114,121,99,2,
+ 0,0,0,0,0,0,0,6,0,0,0,16,0,0,0,67,
+ 0,0,0,115,143,0,0,0,124,0,0,106,0,0,114,21,
+ 0,124,0,0,106,1,0,125,2,0,110,9,0,124,0,0,
+ 106,2,0,125,2,0,124,2,0,106,3,0,100,1,0,124,
+ 1,0,100,2,0,116,4,0,106,5,0,100,0,0,100,3,
+ 0,133,2,0,25,131,0,2,125,3,0,121,47,0,124,0,
+ 0,106,6,0,124,3,0,131,1,0,143,25,0,125,4,0,
+ 116,7,0,106,8,0,124,4,0,100,4,0,131,2,0,125,
+ 5,0,87,100,0,0,81,82,88,87,110,22,0,4,116,9,
+ 0,107,10,0,114,138,0,1,1,1,100,0,0,83,89,110,
+ 1,0,88,124,5,0,83,41,5,78,114,126,0,0,0,90,
+ 11,115,121,115,95,118,101,114,115,105,111,110,114,80,0,0,
+ 0,114,30,0,0,0,41,10,218,11,68,69,66,85,71,95,
+ 66,85,73,76,68,218,18,82,69,71,73,83,84,82,89,95,
+ 75,69,89,95,68,69,66,85,71,218,12,82,69,71,73,83,
+ 84,82,89,95,75,69,89,114,47,0,0,0,114,7,0,0,
+ 0,218,7,118,101,114,115,105,111,110,114,172,0,0,0,114,
+ 169,0,0,0,90,10,81,117,101,114,121,86,97,108,117,101,
+ 114,40,0,0,0,41,6,114,170,0,0,0,114,126,0,0,
+ 0,90,12,114,101,103,105,115,116,114,121,95,107,101,121,114,
+ 171,0,0,0,90,4,104,107,101,121,218,8,102,105,108,101,
+ 112,97,116,104,114,4,0,0,0,114,4,0,0,0,114,5,
+ 0,0,0,218,16,95,115,101,97,114,99,104,95,114,101,103,
+ 105,115,116,114,121,86,2,0,0,115,22,0,0,0,0,2,
+ 9,1,12,2,9,1,15,1,22,1,3,1,18,1,29,1,
+ 13,1,9,1,122,38,87,105,110,100,111,119,115,82,101,103,
+ 105,115,116,114,121,70,105,110,100,101,114,46,95,115,101,97,
+ 114,99,104,95,114,101,103,105,115,116,114,121,78,99,4,0,
+ 0,0,0,0,0,0,8,0,0,0,14,0,0,0,67,0,
+ 0,0,115,158,0,0,0,124,0,0,106,0,0,124,1,0,
+ 131,1,0,125,4,0,124,4,0,100,0,0,107,8,0,114,
+ 31,0,100,0,0,83,121,14,0,116,1,0,124,4,0,131,
+ 1,0,1,87,110,22,0,4,116,2,0,107,10,0,114,69,
+ 0,1,1,1,100,0,0,83,89,110,1,0,88,120,81,0,
+ 116,3,0,131,0,0,68,93,70,0,92,2,0,125,5,0,
+ 125,6,0,124,4,0,106,4,0,116,5,0,124,6,0,131,
+ 1,0,131,1,0,114,80,0,116,6,0,106,7,0,124,1,
+ 0,124,5,0,124,1,0,124,4,0,131,2,0,100,1,0,
+ 124,4,0,131,2,1,125,7,0,124,7,0,83,113,80,0,
+ 87,100,0,0,83,41,2,78,114,158,0,0,0,41,8,114,
+ 178,0,0,0,114,39,0,0,0,114,40,0,0,0,114,161,
+ 0,0,0,114,92,0,0,0,114,93,0,0,0,114,121,0,
+ 0,0,218,16,115,112,101,99,95,102,114,111,109,95,108,111,
+ 97,100,101,114,41,8,114,170,0,0,0,114,126,0,0,0,
+ 114,35,0,0,0,218,6,116,97,114,103,101,116,114,177,0,
+ 0,0,114,127,0,0,0,114,166,0,0,0,114,164,0,0,
+ 0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,
+ 218,9,102,105,110,100,95,115,112,101,99,101,2,0,0,115,
+ 26,0,0,0,0,2,15,1,12,1,4,1,3,1,14,1,
+ 13,1,9,1,22,1,21,1,9,1,15,1,9,1,122,31,
+ 87,105,110,100,111,119,115,82,101,103,105,115,116,114,121,70,
+ 105,110,100,101,114,46,102,105,110,100,95,115,112,101,99,99,
+ 3,0,0,0,0,0,0,0,4,0,0,0,3,0,0,0,
+ 67,0,0,0,115,45,0,0,0,124,0,0,106,0,0,124,
+ 1,0,124,2,0,131,2,0,125,3,0,124,3,0,100,1,
+ 0,107,9,0,114,37,0,124,3,0,106,1,0,83,100,1,
+ 0,83,100,1,0,83,41,2,122,108,70,105,110,100,32,109,
+ 111,100,117,108,101,32,110,97,109,101,100,32,105,110,32,116,
+ 104,101,32,114,101,103,105,115,116,114,121,46,10,10,32,32,
+ 32,32,32,32,32,32,84,104,105,115,32,109,101,116,104,111,
+ 100,32,105,115,32,100,101,112,114,101,99,97,116,101,100,46,
+ 32,32,85,115,101,32,101,120,101,99,95,109,111,100,117,108,
+ 101,40,41,32,105,110,115,116,101,97,100,46,10,10,32,32,
+ 32,32,32,32,32,32,78,41,2,114,181,0,0,0,114,127,
+ 0,0,0,41,4,114,170,0,0,0,114,126,0,0,0,114,
+ 35,0,0,0,114,164,0,0,0,114,4,0,0,0,114,4,
+ 0,0,0,114,5,0,0,0,218,11,102,105,110,100,95,109,
+ 111,100,117,108,101,117,2,0,0,115,8,0,0,0,0,7,
+ 18,1,12,1,7,2,122,33,87,105,110,100,111,119,115,82,
+ 101,103,105,115,116,114,121,70,105,110,100,101,114,46,102,105,
+ 110,100,95,109,111,100,117,108,101,41,12,114,112,0,0,0,
+ 114,111,0,0,0,114,113,0,0,0,114,114,0,0,0,114,
+ 175,0,0,0,114,174,0,0,0,114,173,0,0,0,218,11,
+ 99,108,97,115,115,109,101,116,104,111,100,114,172,0,0,0,
+ 114,178,0,0,0,114,181,0,0,0,114,182,0,0,0,114,
+ 4,0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,
+ 0,0,0,114,168,0,0,0,67,2,0,0,115,20,0,0,
+ 0,12,2,6,3,6,3,6,2,6,2,18,7,18,15,3,
+ 1,21,15,3,1,114,168,0,0,0,99,0,0,0,0,0,
+ 0,0,0,0,0,0,0,2,0,0,0,64,0,0,0,115,
+ 70,0,0,0,101,0,0,90,1,0,100,0,0,90,2,0,
+ 100,1,0,90,3,0,100,2,0,100,3,0,132,0,0,90,
+ 4,0,100,4,0,100,5,0,132,0,0,90,5,0,100,6,
+ 0,100,7,0,132,0,0,90,6,0,100,8,0,100,9,0,
+ 132,0,0,90,7,0,100,10,0,83,41,11,218,13,95,76,
+ 111,97,100,101,114,66,97,115,105,99,115,122,83,66,97,115,
+ 101,32,99,108,97,115,115,32,111,102,32,99,111,109,109,111,
+ 110,32,99,111,100,101,32,110,101,101,100,101,100,32,98,121,
+ 32,98,111,116,104,32,83,111,117,114,99,101,76,111,97,100,
+ 101,114,32,97,110,100,10,32,32,32,32,83,111,117,114,99,
+ 101,108,101,115,115,70,105,108,101,76,111,97,100,101,114,46,
+ 99,2,0,0,0,0,0,0,0,5,0,0,0,3,0,0,
+ 0,67,0,0,0,115,88,0,0,0,116,0,0,124,0,0,
+ 106,1,0,124,1,0,131,1,0,131,1,0,100,1,0,25,
+ 125,2,0,124,2,0,106,2,0,100,2,0,100,1,0,131,
+ 2,0,100,3,0,25,125,3,0,124,1,0,106,3,0,100,
+ 2,0,131,1,0,100,4,0,25,125,4,0,124,3,0,100,
+ 5,0,107,2,0,111,87,0,124,4,0,100,5,0,107,3,
+ 0,83,41,6,122,141,67,111,110,99,114,101,116,101,32,105,
+ 109,112,108,101,109,101,110,116,97,116,105,111,110,32,111,102,
+ 32,73,110,115,112,101,99,116,76,111,97,100,101,114,46,105,
+ 115,95,112,97,99,107,97,103,101,32,98,121,32,99,104,101,
+ 99,107,105,110,103,32,105,102,10,32,32,32,32,32,32,32,
+ 32,116,104,101,32,112,97,116,104,32,114,101,116,117,114,110,
+ 101,100,32,98,121,32,103,101,116,95,102,105,108,101,110,97,
+ 109,101,32,104,97,115,32,97,32,102,105,108,101,110,97,109,
+ 101,32,111,102,32,39,95,95,105,110,105,116,95,95,46,112,
+ 121,39,46,114,29,0,0,0,114,58,0,0,0,114,59,0,
+ 0,0,114,56,0,0,0,218,8,95,95,105,110,105,116,95,
+ 95,41,4,114,38,0,0,0,114,157,0,0,0,114,34,0,
+ 0,0,114,32,0,0,0,41,5,114,108,0,0,0,114,126,
+ 0,0,0,114,94,0,0,0,90,13,102,105,108,101,110,97,
+ 109,101,95,98,97,115,101,90,9,116,97,105,108,95,110,97,
+ 109,101,114,4,0,0,0,114,4,0,0,0,114,5,0,0,
+ 0,114,159,0,0,0,136,2,0,0,115,8,0,0,0,0,
+ 3,25,1,22,1,19,1,122,24,95,76,111,97,100,101,114,
+ 66,97,115,105,99,115,46,105,115,95,112,97,99,107,97,103,
+ 101,99,2,0,0,0,0,0,0,0,2,0,0,0,1,0,
+ 0,0,67,0,0,0,115,4,0,0,0,100,1,0,83,41,
+ 2,122,42,85,115,101,32,100,101,102,97,117,108,116,32,115,
+ 101,109,97,110,116,105,99,115,32,102,111,114,32,109,111,100,
+ 117,108,101,32,99,114,101,97,116,105,111,110,46,78,114,4,
+ 0,0,0,41,2,114,108,0,0,0,114,164,0,0,0,114,
+ 4,0,0,0,114,4,0,0,0,114,5,0,0,0,218,13,
+ 99,114,101,97,116,101,95,109,111,100,117,108,101,144,2,0,
+ 0,115,0,0,0,0,122,27,95,76,111,97,100,101,114,66,
+ 97,115,105,99,115,46,99,114,101,97,116,101,95,109,111,100,
+ 117,108,101,99,2,0,0,0,0,0,0,0,3,0,0,0,
+ 4,0,0,0,67,0,0,0,115,80,0,0,0,124,0,0,
+ 106,0,0,124,1,0,106,1,0,131,1,0,125,2,0,124,
+ 2,0,100,1,0,107,8,0,114,54,0,116,2,0,100,2,
+ 0,106,3,0,124,1,0,106,1,0,131,1,0,131,1,0,
+ 130,1,0,116,4,0,106,5,0,116,6,0,124,2,0,124,
+ 1,0,106,7,0,131,3,0,1,100,1,0,83,41,3,122,
+ 19,69,120,101,99,117,116,101,32,116,104,101,32,109,111,100,
+ 117,108,101,46,78,122,52,99,97,110,110,111,116,32,108,111,
+ 97,100,32,109,111,100,117,108,101,32,123,33,114,125,32,119,
+ 104,101,110,32,103,101,116,95,99,111,100,101,40,41,32,114,
+ 101,116,117,114,110,115,32,78,111,110,101,41,8,218,8,103,
+ 101,116,95,99,111,100,101,114,112,0,0,0,114,107,0,0,
+ 0,114,47,0,0,0,114,121,0,0,0,218,25,95,99,97,
+ 108,108,95,119,105,116,104,95,102,114,97,109,101,115,95,114,
+ 101,109,111,118,101,100,218,4,101,120,101,99,114,118,0,0,
+ 0,41,3,114,108,0,0,0,218,6,109,111,100,117,108,101,
+ 114,146,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
+ 5,0,0,0,218,11,101,120,101,99,95,109,111,100,117,108,
+ 101,147,2,0,0,115,10,0,0,0,0,2,18,1,12,1,
+ 9,1,15,1,122,25,95,76,111,97,100,101,114,66,97,115,
+ 105,99,115,46,101,120,101,99,95,109,111,100,117,108,101,99,
+ 2,0,0,0,0,0,0,0,2,0,0,0,3,0,0,0,
+ 67,0,0,0,115,16,0,0,0,116,0,0,106,1,0,124,
+ 0,0,124,1,0,131,2,0,83,41,1,78,41,2,114,121,
+ 0,0,0,218,17,95,108,111,97,100,95,109,111,100,117,108,
+ 101,95,115,104,105,109,41,2,114,108,0,0,0,114,126,0,
+ 0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,
+ 0,218,11,108,111,97,100,95,109,111,100,117,108,101,155,2,
+ 0,0,115,2,0,0,0,0,1,122,25,95,76,111,97,100,
+ 101,114,66,97,115,105,99,115,46,108,111,97,100,95,109,111,
+ 100,117,108,101,78,41,8,114,112,0,0,0,114,111,0,0,
+ 0,114,113,0,0,0,114,114,0,0,0,114,159,0,0,0,
+ 114,186,0,0,0,114,191,0,0,0,114,193,0,0,0,114,
+ 4,0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,
+ 0,0,0,114,184,0,0,0,131,2,0,0,115,10,0,0,
+ 0,12,3,6,2,12,8,12,3,12,8,114,184,0,0,0,
+ 99,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,
+ 0,64,0,0,0,115,106,0,0,0,101,0,0,90,1,0,
+ 100,0,0,90,2,0,100,1,0,100,2,0,132,0,0,90,
+ 3,0,100,3,0,100,4,0,132,0,0,90,4,0,100,5,
+ 0,100,6,0,132,0,0,90,5,0,100,7,0,100,8,0,
+ 132,0,0,90,6,0,100,9,0,100,10,0,132,0,0,90,
+ 7,0,100,11,0,100,18,0,100,13,0,100,14,0,132,0,
+ 1,90,8,0,100,15,0,100,16,0,132,0,0,90,9,0,
+ 100,17,0,83,41,19,218,12,83,111,117,114,99,101,76,111,
+ 97,100,101,114,99,2,0,0,0,0,0,0,0,2,0,0,
+ 0,1,0,0,0,67,0,0,0,115,10,0,0,0,116,0,
+ 0,130,1,0,100,1,0,83,41,2,122,178,79,112,116,105,
+ 111,110,97,108,32,109,101,116,104,111,100,32,116,104,97,116,
+ 32,114,101,116,117,114,110,115,32,116,104,101,32,109,111,100,
+ 105,102,105,99,97,116,105,111,110,32,116,105,109,101,32,40,
+ 97,110,32,105,110,116,41,32,102,111,114,32,116,104,101,10,
+ 32,32,32,32,32,32,32,32,115,112,101,99,105,102,105,101,
+ 100,32,112,97,116,104,44,32,119,104,101,114,101,32,112,97,
+ 116,104,32,105,115,32,97,32,115,116,114,46,10,10,32,32,
+ 32,32,32,32,32,32,82,97,105,115,101,115,32,73,79,69,
+ 114,114,111,114,32,119,104,101,110,32,116,104,101,32,112,97,
+ 116,104,32,99,97,110,110,111,116,32,98,101,32,104,97,110,
+ 100,108,101,100,46,10,32,32,32,32,32,32,32,32,78,41,
+ 1,218,7,73,79,69,114,114,111,114,41,2,114,108,0,0,
+ 0,114,35,0,0,0,114,4,0,0,0,114,4,0,0,0,
+ 114,5,0,0,0,218,10,112,97,116,104,95,109,116,105,109,
+ 101,161,2,0,0,115,2,0,0,0,0,6,122,23,83,111,
+ 117,114,99,101,76,111,97,100,101,114,46,112,97,116,104,95,
+ 109,116,105,109,101,99,2,0,0,0,0,0,0,0,2,0,
+ 0,0,3,0,0,0,67,0,0,0,115,19,0,0,0,100,
+ 1,0,124,0,0,106,0,0,124,1,0,131,1,0,105,1,
+ 0,83,41,2,97,170,1,0,0,79,112,116,105,111,110,97,
+ 108,32,109,101,116,104,111,100,32,114,101,116,117,114,110,105,
+ 110,103,32,97,32,109,101,116,97,100,97,116,97,32,100,105,
+ 99,116,32,102,111,114,32,116,104,101,32,115,112,101,99,105,
+ 102,105,101,100,32,112,97,116,104,10,32,32,32,32,32,32,
+ 32,32,116,111,32,98,121,32,116,104,101,32,112,97,116,104,
+ 32,40,115,116,114,41,46,10,32,32,32,32,32,32,32,32,
+ 80,111,115,115,105,98,108,101,32,107,101,121,115,58,10,32,
+ 32,32,32,32,32,32,32,45,32,39,109,116,105,109,101,39,
+ 32,40,109,97,110,100,97,116,111,114,121,41,32,105,115,32,
+ 116,104,101,32,110,117,109,101,114,105,99,32,116,105,109,101,
+ 115,116,97,109,112,32,111,102,32,108,97,115,116,32,115,111,
+ 117,114,99,101,10,32,32,32,32,32,32,32,32,32,32,99,
+ 111,100,101,32,109,111,100,105,102,105,99,97,116,105,111,110,
+ 59,10,32,32,32,32,32,32,32,32,45,32,39,115,105,122,
+ 101,39,32,40,111,112,116,105,111,110,97,108,41,32,105,115,
+ 32,116,104,101,32,115,105,122,101,32,105,110,32,98,121,116,
+ 101,115,32,111,102,32,116,104,101,32,115,111,117,114,99,101,
+ 32,99,111,100,101,46,10,10,32,32,32,32,32,32,32,32,
+ 73,109,112,108,101,109,101,110,116,105,110,103,32,116,104,105,
+ 115,32,109,101,116,104,111,100,32,97,108,108,111,119,115,32,
+ 116,104,101,32,108,111,97,100,101,114,32,116,111,32,114,101,
+ 97,100,32,98,121,116,101,99,111,100,101,32,102,105,108,101,
+ 115,46,10,32,32,32,32,32,32,32,32,82,97,105,115,101,
+ 115,32,73,79,69,114,114,111,114,32,119,104,101,110,32,116,
+ 104,101,32,112,97,116,104,32,99,97,110,110,111,116,32,98,
+ 101,32,104,97,110,100,108,101,100,46,10,32,32,32,32,32,
+ 32,32,32,114,133,0,0,0,41,1,114,196,0,0,0,41,
+ 2,114,108,0,0,0,114,35,0,0,0,114,4,0,0,0,
+ 114,4,0,0,0,114,5,0,0,0,218,10,112,97,116,104,
+ 95,115,116,97,116,115,169,2,0,0,115,2,0,0,0,0,
+ 11,122,23,83,111,117,114,99,101,76,111,97,100,101,114,46,
+ 112,97,116,104,95,115,116,97,116,115,99,4,0,0,0,0,
+ 0,0,0,4,0,0,0,3,0,0,0,67,0,0,0,115,
+ 16,0,0,0,124,0,0,106,0,0,124,2,0,124,3,0,
+ 131,2,0,83,41,1,122,228,79,112,116,105,111,110,97,108,
+ 32,109,101,116,104,111,100,32,119,104,105,99,104,32,119,114,
+ 105,116,101,115,32,100,97,116,97,32,40,98,121,116,101,115,
+ 41,32,116,111,32,97,32,102,105,108,101,32,112,97,116,104,
+ 32,40,97,32,115,116,114,41,46,10,10,32,32,32,32,32,
+ 32,32,32,73,109,112,108,101,109,101,110,116,105,110,103,32,
+ 116,104,105,115,32,109,101,116,104,111,100,32,97,108,108,111,
+ 119,115,32,102,111,114,32,116,104,101,32,119,114,105,116,105,
+ 110,103,32,111,102,32,98,121,116,101,99,111,100,101,32,102,
+ 105,108,101,115,46,10,10,32,32,32,32,32,32,32,32,84,
+ 104,101,32,115,111,117,114,99,101,32,112,97,116,104,32,105,
+ 115,32,110,101,101,100,101,100,32,105,110,32,111,114,100,101,
+ 114,32,116,111,32,99,111,114,114,101,99,116,108,121,32,116,
+ 114,97,110,115,102,101,114,32,112,101,114,109,105,115,115,105,
+ 111,110,115,10,32,32,32,32,32,32,32,32,41,1,218,8,
+ 115,101,116,95,100,97,116,97,41,4,114,108,0,0,0,114,
+ 90,0,0,0,90,10,99,97,99,104,101,95,112,97,116,104,
+ 114,53,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
+ 5,0,0,0,218,15,95,99,97,99,104,101,95,98,121,116,
+ 101,99,111,100,101,182,2,0,0,115,2,0,0,0,0,8,
+ 122,28,83,111,117,114,99,101,76,111,97,100,101,114,46,95,
+ 99,97,99,104,101,95,98,121,116,101,99,111,100,101,99,3,
+ 0,0,0,0,0,0,0,3,0,0,0,1,0,0,0,67,
+ 0,0,0,115,4,0,0,0,100,1,0,83,41,2,122,150,
+ 79,112,116,105,111,110,97,108,32,109,101,116,104,111,100,32,
+ 119,104,105,99,104,32,119,114,105,116,101,115,32,100,97,116,
+ 97,32,40,98,121,116,101,115,41,32,116,111,32,97,32,102,
+ 105,108,101,32,112,97,116,104,32,40,97,32,115,116,114,41,
+ 46,10,10,32,32,32,32,32,32,32,32,73,109,112,108,101,
+ 109,101,110,116,105,110,103,32,116,104,105,115,32,109,101,116,
+ 104,111,100,32,97,108,108,111,119,115,32,102,111,114,32,116,
+ 104,101,32,119,114,105,116,105,110,103,32,111,102,32,98,121,
+ 116,101,99,111,100,101,32,102,105,108,101,115,46,10,32,32,
+ 32,32,32,32,32,32,78,114,4,0,0,0,41,3,114,108,
+ 0,0,0,114,35,0,0,0,114,53,0,0,0,114,4,0,
+ 0,0,114,4,0,0,0,114,5,0,0,0,114,198,0,0,
+ 0,192,2,0,0,115,0,0,0,0,122,21,83,111,117,114,
+ 99,101,76,111,97,100,101,114,46,115,101,116,95,100,97,116,
+ 97,99,2,0,0,0,0,0,0,0,5,0,0,0,16,0,
+ 0,0,67,0,0,0,115,105,0,0,0,124,0,0,106,0,
+ 0,124,1,0,131,1,0,125,2,0,121,19,0,124,0,0,
+ 106,1,0,124,2,0,131,1,0,125,3,0,87,110,58,0,
+ 4,116,2,0,107,10,0,114,94,0,1,125,4,0,1,122,
+ 26,0,116,3,0,100,1,0,100,2,0,124,1,0,131,1,
+ 1,124,4,0,130,2,0,87,89,100,3,0,100,3,0,125,
+ 4,0,126,4,0,88,110,1,0,88,116,4,0,124,3,0,
+ 131,1,0,83,41,4,122,52,67,111,110,99,114,101,116,101,
+ 32,105,109,112,108,101,109,101,110,116,97,116,105,111,110,32,
+ 111,102,32,73,110,115,112,101,99,116,76,111,97,100,101,114,
+ 46,103,101,116,95,115,111,117,114,99,101,46,122,39,115,111,
+ 117,114,99,101,32,110,111,116,32,97,118,97,105,108,97,98,
+ 108,101,32,116,104,114,111,117,103,104,32,103,101,116,95,100,
+ 97,116,97,40,41,114,106,0,0,0,78,41,5,114,157,0,
+ 0,0,218,8,103,101,116,95,100,97,116,97,114,40,0,0,
+ 0,114,107,0,0,0,114,155,0,0,0,41,5,114,108,0,
+ 0,0,114,126,0,0,0,114,35,0,0,0,114,153,0,0,
+ 0,218,3,101,120,99,114,4,0,0,0,114,4,0,0,0,
+ 114,5,0,0,0,218,10,103,101,116,95,115,111,117,114,99,
+ 101,199,2,0,0,115,14,0,0,0,0,2,15,1,3,1,
+ 19,1,18,1,9,1,31,1,122,23,83,111,117,114,99,101,
+ 76,111,97,100,101,114,46,103,101,116,95,115,111,117,114,99,
+ 101,218,9,95,111,112,116,105,109,105,122,101,114,29,0,0,
+ 0,99,3,0,0,0,1,0,0,0,4,0,0,0,9,0,
+ 0,0,67,0,0,0,115,34,0,0,0,116,0,0,106,1,
+ 0,116,2,0,124,1,0,124,2,0,100,1,0,100,2,0,
+ 100,3,0,100,4,0,124,3,0,131,4,2,83,41,5,122,
+ 130,82,101,116,117,114,110,32,116,104,101,32,99,111,100,101,
+ 32,111,98,106,101,99,116,32,99,111,109,112,105,108,101,100,
+ 32,102,114,111,109,32,115,111,117,114,99,101,46,10,10,32,
+ 32,32,32,32,32,32,32,84,104,101,32,39,100,97,116,97,
+ 39,32,97,114,103,117,109,101,110,116,32,99,97,110,32,98,
+ 101,32,97,110,121,32,111,98,106,101,99,116,32,116,121,112,
+ 101,32,116,104,97,116,32,99,111,109,112,105,108,101,40,41,
+ 32,115,117,112,112,111,114,116,115,46,10,32,32,32,32,32,
+ 32,32,32,114,189,0,0,0,218,12,100,111,110,116,95,105,
+ 110,104,101,114,105,116,84,114,68,0,0,0,41,3,114,121,
+ 0,0,0,114,188,0,0,0,218,7,99,111,109,112,105,108,
+ 101,41,4,114,108,0,0,0,114,53,0,0,0,114,35,0,
+ 0,0,114,203,0,0,0,114,4,0,0,0,114,4,0,0,
+ 0,114,5,0,0,0,218,14,115,111,117,114,99,101,95,116,
+ 111,95,99,111,100,101,209,2,0,0,115,4,0,0,0,0,
+ 5,21,1,122,27,83,111,117,114,99,101,76,111,97,100,101,
+ 114,46,115,111,117,114,99,101,95,116,111,95,99,111,100,101,
+ 99,2,0,0,0,0,0,0,0,10,0,0,0,43,0,0,
+ 0,67,0,0,0,115,174,1,0,0,124,0,0,106,0,0,
+ 124,1,0,131,1,0,125,2,0,100,1,0,125,3,0,121,
+ 16,0,116,1,0,124,2,0,131,1,0,125,4,0,87,110,
+ 24,0,4,116,2,0,107,10,0,114,63,0,1,1,1,100,
+ 1,0,125,4,0,89,110,202,0,88,121,19,0,124,0,0,
+ 106,3,0,124,2,0,131,1,0,125,5,0,87,110,18,0,
+ 4,116,4,0,107,10,0,114,103,0,1,1,1,89,110,162,
+ 0,88,116,5,0,124,5,0,100,2,0,25,131,1,0,125,
+ 3,0,121,19,0,124,0,0,106,6,0,124,4,0,131,1,
+ 0,125,6,0,87,110,18,0,4,116,7,0,107,10,0,114,
+ 159,0,1,1,1,89,110,106,0,88,121,34,0,116,8,0,
+ 124,6,0,100,3,0,124,5,0,100,4,0,124,1,0,100,
+ 5,0,124,4,0,131,1,3,125,7,0,87,110,24,0,4,
+ 116,9,0,116,10,0,102,2,0,107,10,0,114,220,0,1,
+ 1,1,89,110,45,0,88,116,11,0,100,6,0,124,4,0,
+ 124,2,0,131,3,0,1,116,12,0,124,7,0,100,4,0,
+ 124,1,0,100,7,0,124,4,0,100,8,0,124,2,0,131,
+ 1,3,83,124,0,0,106,6,0,124,2,0,131,1,0,125,
+ 8,0,124,0,0,106,13,0,124,8,0,124,2,0,131,2,
+ 0,125,9,0,116,11,0,100,9,0,124,2,0,131,2,0,
+ 1,116,14,0,106,15,0,12,114,170,1,124,4,0,100,1,
+ 0,107,9,0,114,170,1,124,3,0,100,1,0,107,9,0,
+ 114,170,1,116,16,0,124,9,0,124,3,0,116,17,0,124,
+ 8,0,131,1,0,131,3,0,125,6,0,121,36,0,124,0,
+ 0,106,18,0,124,2,0,124,4,0,124,6,0,131,3,0,
+ 1,116,11,0,100,10,0,124,4,0,131,2,0,1,87,110,
+ 18,0,4,116,2,0,107,10,0,114,169,1,1,1,1,89,
+ 110,1,0,88,124,9,0,83,41,11,122,190,67,111,110,99,
+ 114,101,116,101,32,105,109,112,108,101,109,101,110,116,97,116,
+ 105,111,110,32,111,102,32,73,110,115,112,101,99,116,76,111,
+ 97,100,101,114,46,103,101,116,95,99,111,100,101,46,10,10,
+ 32,32,32,32,32,32,32,32,82,101,97,100,105,110,103,32,
+ 111,102,32,98,121,116,101,99,111,100,101,32,114,101,113,117,
+ 105,114,101,115,32,112,97,116,104,95,115,116,97,116,115,32,
+ 116,111,32,98,101,32,105,109,112,108,101,109,101,110,116,101,
+ 100,46,32,84,111,32,119,114,105,116,101,10,32,32,32,32,
+ 32,32,32,32,98,121,116,101,99,111,100,101,44,32,115,101,
+ 116,95,100,97,116,97,32,109,117,115,116,32,97,108,115,111,
+ 32,98,101,32,105,109,112,108,101,109,101,110,116,101,100,46,
+ 10,10,32,32,32,32,32,32,32,32,78,114,133,0,0,0,
+ 114,138,0,0,0,114,106,0,0,0,114,35,0,0,0,122,
+ 13,123,125,32,109,97,116,99,104,101,115,32,123,125,114,89,
+ 0,0,0,114,90,0,0,0,122,19,99,111,100,101,32,111,
+ 98,106,101,99,116,32,102,114,111,109,32,123,125,122,10,119,
+ 114,111,116,101,32,123,33,114,125,41,19,114,157,0,0,0,
+ 114,79,0,0,0,114,66,0,0,0,114,197,0,0,0,114,
+ 195,0,0,0,114,14,0,0,0,114,200,0,0,0,114,40,
+ 0,0,0,114,141,0,0,0,114,107,0,0,0,114,136,0,
+ 0,0,114,105,0,0,0,114,147,0,0,0,114,206,0,0,
+ 0,114,7,0,0,0,218,19,100,111,110,116,95,119,114,105,
+ 116,101,95,98,121,116,101,99,111,100,101,114,150,0,0,0,
+ 114,31,0,0,0,114,199,0,0,0,41,10,114,108,0,0,
+ 0,114,126,0,0,0,114,90,0,0,0,114,139,0,0,0,
+ 114,89,0,0,0,218,2,115,116,114,53,0,0,0,218,10,
+ 98,121,116,101,115,95,100,97,116,97,114,153,0,0,0,90,
+ 11,99,111,100,101,95,111,98,106,101,99,116,114,4,0,0,
+ 0,114,4,0,0,0,114,5,0,0,0,114,187,0,0,0,
+ 217,2,0,0,115,78,0,0,0,0,7,15,1,6,1,3,
+ 1,16,1,13,1,11,2,3,1,19,1,13,1,5,2,16,
+ 1,3,1,19,1,13,1,5,2,3,1,9,1,12,1,13,
+ 1,19,1,5,2,9,1,7,1,15,1,6,1,7,1,15,
+ 1,18,1,13,1,22,1,12,1,9,1,15,1,3,1,19,
+ 1,17,1,13,1,5,1,122,21,83,111,117,114,99,101,76,
+ 111,97,100,101,114,46,103,101,116,95,99,111,100,101,78,114,
+ 87,0,0,0,41,10,114,112,0,0,0,114,111,0,0,0,
+ 114,113,0,0,0,114,196,0,0,0,114,197,0,0,0,114,
+ 199,0,0,0,114,198,0,0,0,114,202,0,0,0,114,206,
+ 0,0,0,114,187,0,0,0,114,4,0,0,0,114,4,0,
+ 0,0,114,4,0,0,0,114,5,0,0,0,114,194,0,0,
+ 0,159,2,0,0,115,14,0,0,0,12,2,12,8,12,13,
+ 12,10,12,7,12,10,18,8,114,194,0,0,0,99,0,0,
+ 0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,
+ 0,0,115,112,0,0,0,101,0,0,90,1,0,100,0,0,
+ 90,2,0,100,1,0,90,3,0,100,2,0,100,3,0,132,
+ 0,0,90,4,0,100,4,0,100,5,0,132,0,0,90,5,
+ 0,100,6,0,100,7,0,132,0,0,90,6,0,101,7,0,
+ 135,0,0,102,1,0,100,8,0,100,9,0,134,0,0,131,
+ 1,0,90,8,0,101,7,0,100,10,0,100,11,0,132,0,
+ 0,131,1,0,90,9,0,100,12,0,100,13,0,132,0,0,
+ 90,10,0,135,0,0,83,41,14,218,10,70,105,108,101,76,
+ 111,97,100,101,114,122,103,66,97,115,101,32,102,105,108,101,
+ 32,108,111,97,100,101,114,32,99,108,97,115,115,32,119,104,
+ 105,99,104,32,105,109,112,108,101,109,101,110,116,115,32,116,
+ 104,101,32,108,111,97,100,101,114,32,112,114,111,116,111,99,
+ 111,108,32,109,101,116,104,111,100,115,32,116,104,97,116,10,
+ 32,32,32,32,114,101,113,117,105,114,101,32,102,105,108,101,
+ 32,115,121,115,116,101,109,32,117,115,97,103,101,46,99,3,
+ 0,0,0,0,0,0,0,3,0,0,0,2,0,0,0,67,
+ 0,0,0,115,22,0,0,0,124,1,0,124,0,0,95,0,
+ 0,124,2,0,124,0,0,95,1,0,100,1,0,83,41,2,
+ 122,75,67,97,99,104,101,32,116,104,101,32,109,111,100,117,
+ 108,101,32,110,97,109,101,32,97,110,100,32,116,104,101,32,
+ 112,97,116,104,32,116,111,32,116,104,101,32,102,105,108,101,
+ 32,102,111,117,110,100,32,98,121,32,116,104,101,10,32,32,
+ 32,32,32,32,32,32,102,105,110,100,101,114,46,78,41,2,
+ 114,106,0,0,0,114,35,0,0,0,41,3,114,108,0,0,
+ 0,114,126,0,0,0,114,35,0,0,0,114,4,0,0,0,
+ 114,4,0,0,0,114,5,0,0,0,114,185,0,0,0,18,
+ 3,0,0,115,4,0,0,0,0,3,9,1,122,19,70,105,
+ 108,101,76,111,97,100,101,114,46,95,95,105,110,105,116,95,
+ 95,99,2,0,0,0,0,0,0,0,2,0,0,0,2,0,
+ 0,0,67,0,0,0,115,34,0,0,0,124,0,0,106,0,
+ 0,124,1,0,106,0,0,107,2,0,111,33,0,124,0,0,
+ 106,1,0,124,1,0,106,1,0,107,2,0,83,41,1,78,
+ 41,2,218,9,95,95,99,108,97,115,115,95,95,114,118,0,
+ 0,0,41,2,114,108,0,0,0,218,5,111,116,104,101,114,
+ 114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,218,
+ 6,95,95,101,113,95,95,24,3,0,0,115,4,0,0,0,
+ 0,1,18,1,122,17,70,105,108,101,76,111,97,100,101,114,
+ 46,95,95,101,113,95,95,99,1,0,0,0,0,0,0,0,
+ 1,0,0,0,3,0,0,0,67,0,0,0,115,26,0,0,
+ 0,116,0,0,124,0,0,106,1,0,131,1,0,116,0,0,
+ 124,0,0,106,2,0,131,1,0,65,83,41,1,78,41,3,
+ 218,4,104,97,115,104,114,106,0,0,0,114,35,0,0,0,
+ 41,1,114,108,0,0,0,114,4,0,0,0,114,4,0,0,
+ 0,114,5,0,0,0,218,8,95,95,104,97,115,104,95,95,
+ 28,3,0,0,115,2,0,0,0,0,1,122,19,70,105,108,
+ 101,76,111,97,100,101,114,46,95,95,104,97,115,104,95,95,
+ 99,2,0,0,0,0,0,0,0,2,0,0,0,3,0,0,
+ 0,3,0,0,0,115,22,0,0,0,116,0,0,116,1,0,
+ 124,0,0,131,2,0,106,2,0,124,1,0,131,1,0,83,
+ 41,1,122,100,76,111,97,100,32,97,32,109,111,100,117,108,
+ 101,32,102,114,111,109,32,97,32,102,105,108,101,46,10,10,
+ 32,32,32,32,32,32,32,32,84,104,105,115,32,109,101,116,
+ 104,111,100,32,105,115,32,100,101,112,114,101,99,97,116,101,
+ 100,46,32,32,85,115,101,32,101,120,101,99,95,109,111,100,
+ 117,108,101,40,41,32,105,110,115,116,101,97,100,46,10,10,
+ 32,32,32,32,32,32,32,32,41,3,218,5,115,117,112,101,
+ 114,114,210,0,0,0,114,193,0,0,0,41,2,114,108,0,
+ 0,0,114,126,0,0,0,41,1,114,211,0,0,0,114,4,
+ 0,0,0,114,5,0,0,0,114,193,0,0,0,31,3,0,
+ 0,115,2,0,0,0,0,10,122,22,70,105,108,101,76,111,
+ 97,100,101,114,46,108,111,97,100,95,109,111,100,117,108,101,
+ 99,2,0,0,0,0,0,0,0,2,0,0,0,1,0,0,
+ 0,67,0,0,0,115,7,0,0,0,124,0,0,106,0,0,
+ 83,41,1,122,58,82,101,116,117,114,110,32,116,104,101,32,
+ 112,97,116,104,32,116,111,32,116,104,101,32,115,111,117,114,
+ 99,101,32,102,105,108,101,32,97,115,32,102,111,117,110,100,
+ 32,98,121,32,116,104,101,32,102,105,110,100,101,114,46,41,
+ 1,114,35,0,0,0,41,2,114,108,0,0,0,114,126,0,
+ 0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,
+ 0,114,157,0,0,0,43,3,0,0,115,2,0,0,0,0,
+ 3,122,23,70,105,108,101,76,111,97,100,101,114,46,103,101,
+ 116,95,102,105,108,101,110,97,109,101,99,2,0,0,0,0,
+ 0,0,0,3,0,0,0,9,0,0,0,67,0,0,0,115,
+ 42,0,0,0,116,0,0,106,1,0,124,1,0,100,1,0,
+ 131,2,0,143,17,0,125,2,0,124,2,0,106,2,0,131,
+ 0,0,83,87,100,2,0,81,82,88,100,2,0,83,41,3,
+ 122,39,82,101,116,117,114,110,32,116,104,101,32,100,97,116,
+ 97,32,102,114,111,109,32,112,97,116,104,32,97,115,32,114,
+ 97,119,32,98,121,116,101,115,46,218,1,114,78,41,3,114,
+ 49,0,0,0,114,50,0,0,0,90,4,114,101,97,100,41,
+ 3,114,108,0,0,0,114,35,0,0,0,114,54,0,0,0,
+ 114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,114,
+ 200,0,0,0,48,3,0,0,115,4,0,0,0,0,2,21,
+ 1,122,19,70,105,108,101,76,111,97,100,101,114,46,103,101,
+ 116,95,100,97,116,97,41,11,114,112,0,0,0,114,111,0,
+ 0,0,114,113,0,0,0,114,114,0,0,0,114,185,0,0,
+ 0,114,213,0,0,0,114,215,0,0,0,114,123,0,0,0,
+ 114,193,0,0,0,114,157,0,0,0,114,200,0,0,0,114,
+ 4,0,0,0,114,4,0,0,0,41,1,114,211,0,0,0,
+ 114,5,0,0,0,114,210,0,0,0,13,3,0,0,115,14,
+ 0,0,0,12,3,6,2,12,6,12,4,12,3,24,12,18,
+ 5,114,210,0,0,0,99,0,0,0,0,0,0,0,0,0,
+ 0,0,0,4,0,0,0,64,0,0,0,115,64,0,0,0,
+ 101,0,0,90,1,0,100,0,0,90,2,0,100,1,0,90,
+ 3,0,100,2,0,100,3,0,132,0,0,90,4,0,100,4,
+ 0,100,5,0,132,0,0,90,5,0,100,6,0,100,7,0,
+ 100,8,0,100,9,0,132,0,1,90,6,0,100,10,0,83,
+ 41,11,218,16,83,111,117,114,99,101,70,105,108,101,76,111,
+ 97,100,101,114,122,62,67,111,110,99,114,101,116,101,32,105,
+ 109,112,108,101,109,101,110,116,97,116,105,111,110,32,111,102,
+ 32,83,111,117,114,99,101,76,111,97,100,101,114,32,117,115,
+ 105,110,103,32,116,104,101,32,102,105,108,101,32,115,121,115,
+ 116,101,109,46,99,2,0,0,0,0,0,0,0,3,0,0,
+ 0,4,0,0,0,67,0,0,0,115,34,0,0,0,116,0,
+ 0,124,1,0,131,1,0,125,2,0,100,1,0,124,2,0,
+ 106,1,0,100,2,0,124,2,0,106,2,0,105,2,0,83,
+ 41,3,122,33,82,101,116,117,114,110,32,116,104,101,32,109,
+ 101,116,97,100,97,116,97,32,102,111,114,32,116,104,101,32,
+ 112,97,116,104,46,114,133,0,0,0,114,134,0,0,0,41,
+ 3,114,39,0,0,0,218,8,115,116,95,109,116,105,109,101,
+ 90,7,115,116,95,115,105,122,101,41,3,114,108,0,0,0,
+ 114,35,0,0,0,114,208,0,0,0,114,4,0,0,0,114,
+ 4,0,0,0,114,5,0,0,0,114,197,0,0,0,58,3,
+ 0,0,115,4,0,0,0,0,2,12,1,122,27,83,111,117,
+ 114,99,101,70,105,108,101,76,111,97,100,101,114,46,112,97,
+ 116,104,95,115,116,97,116,115,99,4,0,0,0,0,0,0,
+ 0,5,0,0,0,5,0,0,0,67,0,0,0,115,34,0,
+ 0,0,116,0,0,124,1,0,131,1,0,125,4,0,124,0,
+ 0,106,1,0,124,2,0,124,3,0,100,1,0,124,4,0,
+ 131,2,1,83,41,2,78,218,5,95,109,111,100,101,41,2,
+ 114,97,0,0,0,114,198,0,0,0,41,5,114,108,0,0,
+ 0,114,90,0,0,0,114,89,0,0,0,114,53,0,0,0,
+ 114,42,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
+ 5,0,0,0,114,199,0,0,0,63,3,0,0,115,4,0,
+ 0,0,0,2,12,1,122,32,83,111,117,114,99,101,70,105,
+ 108,101,76,111,97,100,101,114,46,95,99,97,99,104,101,95,
+ 98,121,116,101,99,111,100,101,114,220,0,0,0,105,182,1,
+ 0,0,99,3,0,0,0,1,0,0,0,9,0,0,0,17,
+ 0,0,0,67,0,0,0,115,53,1,0,0,116,0,0,124,
+ 1,0,131,1,0,92,2,0,125,4,0,125,5,0,103,0,
+ 0,125,6,0,120,54,0,124,4,0,114,80,0,116,1,0,
+ 124,4,0,131,1,0,12,114,80,0,116,0,0,124,4,0,
+ 131,1,0,92,2,0,125,4,0,125,7,0,124,6,0,106,
+ 2,0,124,7,0,131,1,0,1,113,27,0,87,120,132,0,
+ 116,3,0,124,6,0,131,1,0,68,93,118,0,125,7,0,
+ 116,4,0,124,4,0,124,7,0,131,2,0,125,4,0,121,
+ 17,0,116,5,0,106,6,0,124,4,0,131,1,0,1,87,
+ 113,94,0,4,116,7,0,107,10,0,114,155,0,1,1,1,
+ 119,94,0,89,113,94,0,4,116,8,0,107,10,0,114,211,
+ 0,1,125,8,0,1,122,25,0,116,9,0,100,1,0,124,
+ 4,0,124,8,0,131,3,0,1,100,2,0,83,87,89,100,
+ 2,0,100,2,0,125,8,0,126,8,0,88,113,94,0,88,
+ 113,94,0,87,121,33,0,116,10,0,124,1,0,124,2,0,
+ 124,3,0,131,3,0,1,116,9,0,100,3,0,124,1,0,
+ 131,2,0,1,87,110,53,0,4,116,8,0,107,10,0,114,
+ 48,1,1,125,8,0,1,122,21,0,116,9,0,100,1,0,
+ 124,1,0,124,8,0,131,3,0,1,87,89,100,2,0,100,
+ 2,0,125,8,0,126,8,0,88,110,1,0,88,100,2,0,
+ 83,41,4,122,27,87,114,105,116,101,32,98,121,116,101,115,
+ 32,100,97,116,97,32,116,111,32,97,32,102,105,108,101,46,
+ 122,27,99,111,117,108,100,32,110,111,116,32,99,114,101,97,
+ 116,101,32,123,33,114,125,58,32,123,33,114,125,78,122,12,
+ 99,114,101,97,116,101,100,32,123,33,114,125,41,11,114,38,
+ 0,0,0,114,46,0,0,0,114,163,0,0,0,114,33,0,
+ 0,0,114,28,0,0,0,114,3,0,0,0,90,5,109,107,
+ 100,105,114,218,15,70,105,108,101,69,120,105,115,116,115,69,
+ 114,114,111,114,114,40,0,0,0,114,105,0,0,0,114,55,
+ 0,0,0,41,9,114,108,0,0,0,114,35,0,0,0,114,
+ 53,0,0,0,114,220,0,0,0,218,6,112,97,114,101,110,
+ 116,114,94,0,0,0,114,27,0,0,0,114,23,0,0,0,
+ 114,201,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
+ 5,0,0,0,114,198,0,0,0,68,3,0,0,115,38,0,
+ 0,0,0,2,18,1,6,2,22,1,18,1,17,2,19,1,
+ 15,1,3,1,17,1,13,2,7,1,18,3,16,1,27,1,
+ 3,1,16,1,17,1,18,2,122,25,83,111,117,114,99,101,
+ 70,105,108,101,76,111,97,100,101,114,46,115,101,116,95,100,
+ 97,116,97,78,41,7,114,112,0,0,0,114,111,0,0,0,
+ 114,113,0,0,0,114,114,0,0,0,114,197,0,0,0,114,
+ 199,0,0,0,114,198,0,0,0,114,4,0,0,0,114,4,
+ 0,0,0,114,4,0,0,0,114,5,0,0,0,114,218,0,
+ 0,0,54,3,0,0,115,8,0,0,0,12,2,6,2,12,
+ 5,12,5,114,218,0,0,0,99,0,0,0,0,0,0,0,
+ 0,0,0,0,0,2,0,0,0,64,0,0,0,115,46,0,
+ 0,0,101,0,0,90,1,0,100,0,0,90,2,0,100,1,
+ 0,90,3,0,100,2,0,100,3,0,132,0,0,90,4,0,
+ 100,4,0,100,5,0,132,0,0,90,5,0,100,6,0,83,
+ 41,7,218,20,83,111,117,114,99,101,108,101,115,115,70,105,
+ 108,101,76,111,97,100,101,114,122,45,76,111,97,100,101,114,
+ 32,119,104,105,99,104,32,104,97,110,100,108,101,115,32,115,
+ 111,117,114,99,101,108,101,115,115,32,102,105,108,101,32,105,
+ 109,112,111,114,116,115,46,99,2,0,0,0,0,0,0,0,
+ 5,0,0,0,6,0,0,0,67,0,0,0,115,76,0,0,
+ 0,124,0,0,106,0,0,124,1,0,131,1,0,125,2,0,
+ 124,0,0,106,1,0,124,2,0,131,1,0,125,3,0,116,
+ 2,0,124,3,0,100,1,0,124,1,0,100,2,0,124,2,
+ 0,131,1,2,125,4,0,116,3,0,124,4,0,100,1,0,
+ 124,1,0,100,3,0,124,2,0,131,1,2,83,41,4,78,
+ 114,106,0,0,0,114,35,0,0,0,114,89,0,0,0,41,
+ 4,114,157,0,0,0,114,200,0,0,0,114,141,0,0,0,
+ 114,147,0,0,0,41,5,114,108,0,0,0,114,126,0,0,
+ 0,114,35,0,0,0,114,53,0,0,0,114,209,0,0,0,
+ 114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,114,
+ 187,0,0,0,101,3,0,0,115,8,0,0,0,0,1,15,
+ 1,15,1,24,1,122,29,83,111,117,114,99,101,108,101,115,
+ 115,70,105,108,101,76,111,97,100,101,114,46,103,101,116,95,
+ 99,111,100,101,99,2,0,0,0,0,0,0,0,2,0,0,
+ 0,1,0,0,0,67,0,0,0,115,4,0,0,0,100,1,
+ 0,83,41,2,122,39,82,101,116,117,114,110,32,78,111,110,
+ 101,32,97,115,32,116,104,101,114,101,32,105,115,32,110,111,
+ 32,115,111,117,114,99,101,32,99,111,100,101,46,78,114,4,
+ 0,0,0,41,2,114,108,0,0,0,114,126,0,0,0,114,
+ 4,0,0,0,114,4,0,0,0,114,5,0,0,0,114,202,
+ 0,0,0,107,3,0,0,115,2,0,0,0,0,2,122,31,
+ 83,111,117,114,99,101,108,101,115,115,70,105,108,101,76,111,
+ 97,100,101,114,46,103,101,116,95,115,111,117,114,99,101,78,
+ 41,6,114,112,0,0,0,114,111,0,0,0,114,113,0,0,
+ 0,114,114,0,0,0,114,187,0,0,0,114,202,0,0,0,
+ 114,4,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
+ 5,0,0,0,114,223,0,0,0,97,3,0,0,115,6,0,
+ 0,0,12,2,6,2,12,6,114,223,0,0,0,99,0,0,
+ 0,0,0,0,0,0,0,0,0,0,3,0,0,0,64,0,
+ 0,0,115,136,0,0,0,101,0,0,90,1,0,100,0,0,
+ 90,2,0,100,1,0,90,3,0,100,2,0,100,3,0,132,
+ 0,0,90,4,0,100,4,0,100,5,0,132,0,0,90,5,
+ 0,100,6,0,100,7,0,132,0,0,90,6,0,100,8,0,
+ 100,9,0,132,0,0,90,7,0,100,10,0,100,11,0,132,
+ 0,0,90,8,0,100,12,0,100,13,0,132,0,0,90,9,
+ 0,100,14,0,100,15,0,132,0,0,90,10,0,100,16,0,
+ 100,17,0,132,0,0,90,11,0,101,12,0,100,18,0,100,
+ 19,0,132,0,0,131,1,0,90,13,0,100,20,0,83,41,
+ 21,218,19,69,120,116,101,110,115,105,111,110,70,105,108,101,
+ 76,111,97,100,101,114,122,93,76,111,97,100,101,114,32,102,
+ 111,114,32,101,120,116,101,110,115,105,111,110,32,109,111,100,
+ 117,108,101,115,46,10,10,32,32,32,32,84,104,101,32,99,
+ 111,110,115,116,114,117,99,116,111,114,32,105,115,32,100,101,
+ 115,105,103,110,101,100,32,116,111,32,119,111,114,107,32,119,
+ 105,116,104,32,70,105,108,101,70,105,110,100,101,114,46,10,
+ 10,32,32,32,32,99,3,0,0,0,0,0,0,0,3,0,
+ 0,0,2,0,0,0,67,0,0,0,115,22,0,0,0,124,
+ 1,0,124,0,0,95,0,0,124,2,0,124,0,0,95,1,
+ 0,100,0,0,83,41,1,78,41,2,114,106,0,0,0,114,
+ 35,0,0,0,41,3,114,108,0,0,0,114,106,0,0,0,
+ 114,35,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
+ 5,0,0,0,114,185,0,0,0,124,3,0,0,115,4,0,
+ 0,0,0,1,9,1,122,28,69,120,116,101,110,115,105,111,
+ 110,70,105,108,101,76,111,97,100,101,114,46,95,95,105,110,
+ 105,116,95,95,99,2,0,0,0,0,0,0,0,2,0,0,
+ 0,2,0,0,0,67,0,0,0,115,34,0,0,0,124,0,
+ 0,106,0,0,124,1,0,106,0,0,107,2,0,111,33,0,
+ 124,0,0,106,1,0,124,1,0,106,1,0,107,2,0,83,
+ 41,1,78,41,2,114,211,0,0,0,114,118,0,0,0,41,
+ 2,114,108,0,0,0,114,212,0,0,0,114,4,0,0,0,
+ 114,4,0,0,0,114,5,0,0,0,114,213,0,0,0,128,
+ 3,0,0,115,4,0,0,0,0,1,18,1,122,26,69,120,
+ 116,101,110,115,105,111,110,70,105,108,101,76,111,97,100,101,
+ 114,46,95,95,101,113,95,95,99,1,0,0,0,0,0,0,
+ 0,1,0,0,0,3,0,0,0,67,0,0,0,115,26,0,
+ 0,0,116,0,0,124,0,0,106,1,0,131,1,0,116,0,
+ 0,124,0,0,106,2,0,131,1,0,65,83,41,1,78,41,
+ 3,114,214,0,0,0,114,106,0,0,0,114,35,0,0,0,
+ 41,1,114,108,0,0,0,114,4,0,0,0,114,4,0,0,
+ 0,114,5,0,0,0,114,215,0,0,0,132,3,0,0,115,
+ 2,0,0,0,0,1,122,28,69,120,116,101,110,115,105,111,
+ 110,70,105,108,101,76,111,97,100,101,114,46,95,95,104,97,
+ 115,104,95,95,99,2,0,0,0,0,0,0,0,3,0,0,
+ 0,4,0,0,0,67,0,0,0,115,47,0,0,0,116,0,
+ 0,106,1,0,116,2,0,106,3,0,124,1,0,131,2,0,
+ 125,2,0,116,4,0,100,1,0,124,1,0,106,5,0,124,
+ 0,0,106,6,0,131,3,0,1,124,2,0,83,41,2,122,
+ 38,67,114,101,97,116,101,32,97,110,32,117,110,105,116,105,
+ 97,108,105,122,101,100,32,101,120,116,101,110,115,105,111,110,
+ 32,109,111,100,117,108,101,122,38,101,120,116,101,110,115,105,
+ 111,110,32,109,111,100,117,108,101,32,123,33,114,125,32,108,
+ 111,97,100,101,100,32,102,114,111,109,32,123,33,114,125,41,
+ 7,114,121,0,0,0,114,188,0,0,0,114,145,0,0,0,
+ 90,14,99,114,101,97,116,101,95,100,121,110,97,109,105,99,
+ 114,105,0,0,0,114,106,0,0,0,114,35,0,0,0,41,
+ 3,114,108,0,0,0,114,164,0,0,0,114,190,0,0,0,
+ 114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,114,
+ 186,0,0,0,135,3,0,0,115,10,0,0,0,0,2,6,
+ 1,15,1,6,1,16,1,122,33,69,120,116,101,110,115,105,
+ 111,110,70,105,108,101,76,111,97,100,101,114,46,99,114,101,
+ 97,116,101,95,109,111,100,117,108,101,99,2,0,0,0,0,
+ 0,0,0,2,0,0,0,4,0,0,0,67,0,0,0,115,
+ 45,0,0,0,116,0,0,106,1,0,116,2,0,106,3,0,
+ 124,1,0,131,2,0,1,116,4,0,100,1,0,124,0,0,
+ 106,5,0,124,0,0,106,6,0,131,3,0,1,100,2,0,
+ 83,41,3,122,30,73,110,105,116,105,97,108,105,122,101,32,
+ 97,110,32,101,120,116,101,110,115,105,111,110,32,109,111,100,
+ 117,108,101,122,40,101,120,116,101,110,115,105,111,110,32,109,
+ 111,100,117,108,101,32,123,33,114,125,32,101,120,101,99,117,
+ 116,101,100,32,102,114,111,109,32,123,33,114,125,78,41,7,
+ 114,121,0,0,0,114,188,0,0,0,114,145,0,0,0,90,
+ 12,101,120,101,99,95,100,121,110,97,109,105,99,114,105,0,
+ 0,0,114,106,0,0,0,114,35,0,0,0,41,2,114,108,
+ 0,0,0,114,190,0,0,0,114,4,0,0,0,114,4,0,
+ 0,0,114,5,0,0,0,114,191,0,0,0,143,3,0,0,
+ 115,6,0,0,0,0,2,19,1,6,1,122,31,69,120,116,
+ 101,110,115,105,111,110,70,105,108,101,76,111,97,100,101,114,
+ 46,101,120,101,99,95,109,111,100,117,108,101,99,2,0,0,
+ 0,0,0,0,0,2,0,0,0,4,0,0,0,3,0,0,
+ 0,115,48,0,0,0,116,0,0,124,0,0,106,1,0,131,
+ 1,0,100,1,0,25,137,0,0,116,2,0,135,0,0,102,
+ 1,0,100,2,0,100,3,0,134,0,0,116,3,0,68,131,
+ 1,0,131,1,0,83,41,4,122,49,82,101,116,117,114,110,
+ 32,84,114,117,101,32,105,102,32,116,104,101,32,101,120,116,
+ 101,110,115,105,111,110,32,109,111,100,117,108,101,32,105,115,
+ 32,97,32,112,97,99,107,97,103,101,46,114,29,0,0,0,
+ 99,1,0,0,0,0,0,0,0,2,0,0,0,4,0,0,
+ 0,51,0,0,0,115,31,0,0,0,124,0,0,93,21,0,
+ 125,1,0,136,0,0,100,0,0,124,1,0,23,107,2,0,
+ 86,1,113,3,0,100,1,0,83,41,2,114,185,0,0,0,
+ 78,114,4,0,0,0,41,2,114,22,0,0,0,218,6,115,
+ 117,102,102,105,120,41,1,218,9,102,105,108,101,95,110,97,
+ 109,101,114,4,0,0,0,114,5,0,0,0,250,9,60,103,
+ 101,110,101,120,112,114,62,152,3,0,0,115,2,0,0,0,
+ 6,1,122,49,69,120,116,101,110,115,105,111,110,70,105,108,
+ 101,76,111,97,100,101,114,46,105,115,95,112,97,99,107,97,
+ 103,101,46,60,108,111,99,97,108,115,62,46,60,103,101,110,
+ 101,120,112,114,62,41,4,114,38,0,0,0,114,35,0,0,
+ 0,218,3,97,110,121,218,18,69,88,84,69,78,83,73,79,
+ 78,95,83,85,70,70,73,88,69,83,41,2,114,108,0,0,
+ 0,114,126,0,0,0,114,4,0,0,0,41,1,114,226,0,
+ 0,0,114,5,0,0,0,114,159,0,0,0,149,3,0,0,
+ 115,6,0,0,0,0,2,19,1,18,1,122,30,69,120,116,
+ 101,110,115,105,111,110,70,105,108,101,76,111,97,100,101,114,
+ 46,105,115,95,112,97,99,107,97,103,101,99,2,0,0,0,
+ 0,0,0,0,2,0,0,0,1,0,0,0,67,0,0,0,
+ 115,4,0,0,0,100,1,0,83,41,2,122,63,82,101,116,
+ 117,114,110,32,78,111,110,101,32,97,115,32,97,110,32,101,
+ 120,116,101,110,115,105,111,110,32,109,111,100,117,108,101,32,
+ 99,97,110,110,111,116,32,99,114,101,97,116,101,32,97,32,
+ 99,111,100,101,32,111,98,106,101,99,116,46,78,114,4,0,
+ 0,0,41,2,114,108,0,0,0,114,126,0,0,0,114,4,
+ 0,0,0,114,4,0,0,0,114,5,0,0,0,114,187,0,
+ 0,0,155,3,0,0,115,2,0,0,0,0,2,122,28,69,
+ 120,116,101,110,115,105,111,110,70,105,108,101,76,111,97,100,
+ 101,114,46,103,101,116,95,99,111,100,101,99,2,0,0,0,
+ 0,0,0,0,2,0,0,0,1,0,0,0,67,0,0,0,
+ 115,4,0,0,0,100,1,0,83,41,2,122,53,82,101,116,
+ 117,114,110,32,78,111,110,101,32,97,115,32,101,120,116,101,
+ 110,115,105,111,110,32,109,111,100,117,108,101,115,32,104,97,
+ 118,101,32,110,111,32,115,111,117,114,99,101,32,99,111,100,
+ 101,46,78,114,4,0,0,0,41,2,114,108,0,0,0,114,
+ 126,0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,
+ 0,0,0,114,202,0,0,0,159,3,0,0,115,2,0,0,
+ 0,0,2,122,30,69,120,116,101,110,115,105,111,110,70,105,
+ 108,101,76,111,97,100,101,114,46,103,101,116,95,115,111,117,
+ 114,99,101,99,2,0,0,0,0,0,0,0,2,0,0,0,
+ 1,0,0,0,67,0,0,0,115,7,0,0,0,124,0,0,
+ 106,0,0,83,41,1,122,58,82,101,116,117,114,110,32,116,
+ 104,101,32,112,97,116,104,32,116,111,32,116,104,101,32,115,
+ 111,117,114,99,101,32,102,105,108,101,32,97,115,32,102,111,
+ 117,110,100,32,98,121,32,116,104,101,32,102,105,110,100,101,
+ 114,46,41,1,114,35,0,0,0,41,2,114,108,0,0,0,
+ 114,126,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
+ 5,0,0,0,114,157,0,0,0,163,3,0,0,115,2,0,
+ 0,0,0,3,122,32,69,120,116,101,110,115,105,111,110,70,
+ 105,108,101,76,111,97,100,101,114,46,103,101,116,95,102,105,
+ 108,101,110,97,109,101,78,41,14,114,112,0,0,0,114,111,
+ 0,0,0,114,113,0,0,0,114,114,0,0,0,114,185,0,
+ 0,0,114,213,0,0,0,114,215,0,0,0,114,186,0,0,
+ 0,114,191,0,0,0,114,159,0,0,0,114,187,0,0,0,
+ 114,202,0,0,0,114,123,0,0,0,114,157,0,0,0,114,
+ 4,0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,
+ 0,0,0,114,224,0,0,0,116,3,0,0,115,20,0,0,
+ 0,12,6,6,2,12,4,12,4,12,3,12,8,12,6,12,
+ 6,12,4,12,4,114,224,0,0,0,99,0,0,0,0,0,
+ 0,0,0,0,0,0,0,2,0,0,0,64,0,0,0,115,
+ 130,0,0,0,101,0,0,90,1,0,100,0,0,90,2,0,
+ 100,1,0,90,3,0,100,2,0,100,3,0,132,0,0,90,
+ 4,0,100,4,0,100,5,0,132,0,0,90,5,0,100,6,
+ 0,100,7,0,132,0,0,90,6,0,100,8,0,100,9,0,
+ 132,0,0,90,7,0,100,10,0,100,11,0,132,0,0,90,
+ 8,0,100,12,0,100,13,0,132,0,0,90,9,0,100,14,
+ 0,100,15,0,132,0,0,90,10,0,100,16,0,100,17,0,
+ 132,0,0,90,11,0,100,18,0,100,19,0,132,0,0,90,
+ 12,0,100,20,0,83,41,21,218,14,95,78,97,109,101,115,
+ 112,97,99,101,80,97,116,104,97,38,1,0,0,82,101,112,
+ 114,101,115,101,110,116,115,32,97,32,110,97,109,101,115,112,
+ 97,99,101,32,112,97,99,107,97,103,101,39,115,32,112,97,
+ 116,104,46,32,32,73,116,32,117,115,101,115,32,116,104,101,
+ 32,109,111,100,117,108,101,32,110,97,109,101,10,32,32,32,
+ 32,116,111,32,102,105,110,100,32,105,116,115,32,112,97,114,
+ 101,110,116,32,109,111,100,117,108,101,44,32,97,110,100,32,
+ 102,114,111,109,32,116,104,101,114,101,32,105,116,32,108,111,
+ 111,107,115,32,117,112,32,116,104,101,32,112,97,114,101,110,
+ 116,39,115,10,32,32,32,32,95,95,112,97,116,104,95,95,
+ 46,32,32,87,104,101,110,32,116,104,105,115,32,99,104,97,
+ 110,103,101,115,44,32,116,104,101,32,109,111,100,117,108,101,
+ 39,115,32,111,119,110,32,112,97,116,104,32,105,115,32,114,
+ 101,99,111,109,112,117,116,101,100,44,10,32,32,32,32,117,
+ 115,105,110,103,32,112,97,116,104,95,102,105,110,100,101,114,
+ 46,32,32,70,111,114,32,116,111,112,45,108,101,118,101,108,
+ 32,109,111,100,117,108,101,115,44,32,116,104,101,32,112,97,
+ 114,101,110,116,32,109,111,100,117,108,101,39,115,32,112,97,
+ 116,104,10,32,32,32,32,105,115,32,115,121,115,46,112,97,
+ 116,104,46,99,4,0,0,0,0,0,0,0,4,0,0,0,
+ 2,0,0,0,67,0,0,0,115,52,0,0,0,124,1,0,
+ 124,0,0,95,0,0,124,2,0,124,0,0,95,1,0,116,
+ 2,0,124,0,0,106,3,0,131,0,0,131,1,0,124,0,
+ 0,95,4,0,124,3,0,124,0,0,95,5,0,100,0,0,
+ 83,41,1,78,41,6,218,5,95,110,97,109,101,218,5,95,
+ 112,97,116,104,114,93,0,0,0,218,16,95,103,101,116,95,
+ 112,97,114,101,110,116,95,112,97,116,104,218,17,95,108,97,
+ 115,116,95,112,97,114,101,110,116,95,112,97,116,104,218,12,
+ 95,112,97,116,104,95,102,105,110,100,101,114,41,4,114,108,
+ 0,0,0,114,106,0,0,0,114,35,0,0,0,218,11,112,
+ 97,116,104,95,102,105,110,100,101,114,114,4,0,0,0,114,
+ 4,0,0,0,114,5,0,0,0,114,185,0,0,0,176,3,
+ 0,0,115,8,0,0,0,0,1,9,1,9,1,21,1,122,
+ 23,95,78,97,109,101,115,112,97,99,101,80,97,116,104,46,
+ 95,95,105,110,105,116,95,95,99,1,0,0,0,0,0,0,
+ 0,4,0,0,0,3,0,0,0,67,0,0,0,115,53,0,
+ 0,0,124,0,0,106,0,0,106,1,0,100,1,0,131,1,
+ 0,92,3,0,125,1,0,125,2,0,125,3,0,124,2,0,
+ 100,2,0,107,2,0,114,43,0,100,6,0,83,124,1,0,
+ 100,5,0,102,2,0,83,41,7,122,62,82,101,116,117,114,
+ 110,115,32,97,32,116,117,112,108,101,32,111,102,32,40,112,
+ 97,114,101,110,116,45,109,111,100,117,108,101,45,110,97,109,
+ 101,44,32,112,97,114,101,110,116,45,112,97,116,104,45,97,
+ 116,116,114,45,110,97,109,101,41,114,58,0,0,0,114,30,
+ 0,0,0,114,7,0,0,0,114,35,0,0,0,90,8,95,
+ 95,112,97,116,104,95,95,41,2,122,3,115,121,115,122,4,
+ 112,97,116,104,41,2,114,231,0,0,0,114,32,0,0,0,
+ 41,4,114,108,0,0,0,114,222,0,0,0,218,3,100,111,
+ 116,90,2,109,101,114,4,0,0,0,114,4,0,0,0,114,
+ 5,0,0,0,218,23,95,102,105,110,100,95,112,97,114,101,
+ 110,116,95,112,97,116,104,95,110,97,109,101,115,182,3,0,
+ 0,115,8,0,0,0,0,2,27,1,12,2,4,3,122,38,
+ 95,78,97,109,101,115,112,97,99,101,80,97,116,104,46,95,
+ 102,105,110,100,95,112,97,114,101,110,116,95,112,97,116,104,
+ 95,110,97,109,101,115,99,1,0,0,0,0,0,0,0,3,
+ 0,0,0,3,0,0,0,67,0,0,0,115,38,0,0,0,
+ 124,0,0,106,0,0,131,0,0,92,2,0,125,1,0,125,
+ 2,0,116,1,0,116,2,0,106,3,0,124,1,0,25,124,
+ 2,0,131,2,0,83,41,1,78,41,4,114,238,0,0,0,
+ 114,117,0,0,0,114,7,0,0,0,218,7,109,111,100,117,
+ 108,101,115,41,3,114,108,0,0,0,90,18,112,97,114,101,
+ 110,116,95,109,111,100,117,108,101,95,110,97,109,101,90,14,
+ 112,97,116,104,95,97,116,116,114,95,110,97,109,101,114,4,
+ 0,0,0,114,4,0,0,0,114,5,0,0,0,114,233,0,
+ 0,0,192,3,0,0,115,4,0,0,0,0,1,18,1,122,
+ 31,95,78,97,109,101,115,112,97,99,101,80,97,116,104,46,
+ 95,103,101,116,95,112,97,114,101,110,116,95,112,97,116,104,
+ 99,1,0,0,0,0,0,0,0,3,0,0,0,3,0,0,
+ 0,67,0,0,0,115,118,0,0,0,116,0,0,124,0,0,
+ 106,1,0,131,0,0,131,1,0,125,1,0,124,1,0,124,
+ 0,0,106,2,0,107,3,0,114,111,0,124,0,0,106,3,
+ 0,124,0,0,106,4,0,124,1,0,131,2,0,125,2,0,
+ 124,2,0,100,0,0,107,9,0,114,102,0,124,2,0,106,
+ 5,0,100,0,0,107,8,0,114,102,0,124,2,0,106,6,
+ 0,114,102,0,124,2,0,106,6,0,124,0,0,95,7,0,
+ 124,1,0,124,0,0,95,2,0,124,0,0,106,7,0,83,
+ 41,1,78,41,8,114,93,0,0,0,114,233,0,0,0,114,
+ 234,0,0,0,114,235,0,0,0,114,231,0,0,0,114,127,
+ 0,0,0,114,156,0,0,0,114,232,0,0,0,41,3,114,
+ 108,0,0,0,90,11,112,97,114,101,110,116,95,112,97,116,
+ 104,114,164,0,0,0,114,4,0,0,0,114,4,0,0,0,
+ 114,5,0,0,0,218,12,95,114,101,99,97,108,99,117,108,
+ 97,116,101,196,3,0,0,115,16,0,0,0,0,2,18,1,
+ 15,1,21,3,27,1,9,1,12,1,9,1,122,27,95,78,
+ 97,109,101,115,112,97,99,101,80,97,116,104,46,95,114,101,
+ 99,97,108,99,117,108,97,116,101,99,1,0,0,0,0,0,
+ 0,0,1,0,0,0,2,0,0,0,67,0,0,0,115,16,
+ 0,0,0,116,0,0,124,0,0,106,1,0,131,0,0,131,
+ 1,0,83,41,1,78,41,2,218,4,105,116,101,114,114,240,
+ 0,0,0,41,1,114,108,0,0,0,114,4,0,0,0,114,
+ 4,0,0,0,114,5,0,0,0,218,8,95,95,105,116,101,
+ 114,95,95,209,3,0,0,115,2,0,0,0,0,1,122,23,
+ 95,78,97,109,101,115,112,97,99,101,80,97,116,104,46,95,
+ 95,105,116,101,114,95,95,99,1,0,0,0,0,0,0,0,
+ 1,0,0,0,2,0,0,0,67,0,0,0,115,16,0,0,
+ 0,116,0,0,124,0,0,106,1,0,131,0,0,131,1,0,
+ 83,41,1,78,41,2,114,31,0,0,0,114,240,0,0,0,
+ 41,1,114,108,0,0,0,114,4,0,0,0,114,4,0,0,
+ 0,114,5,0,0,0,218,7,95,95,108,101,110,95,95,212,
+ 3,0,0,115,2,0,0,0,0,1,122,22,95,78,97,109,
+ 101,115,112,97,99,101,80,97,116,104,46,95,95,108,101,110,
+ 95,95,99,1,0,0,0,0,0,0,0,1,0,0,0,2,
+ 0,0,0,67,0,0,0,115,16,0,0,0,100,1,0,106,
+ 0,0,124,0,0,106,1,0,131,1,0,83,41,2,78,122,
+ 20,95,78,97,109,101,115,112,97,99,101,80,97,116,104,40,
+ 123,33,114,125,41,41,2,114,47,0,0,0,114,232,0,0,
+ 0,41,1,114,108,0,0,0,114,4,0,0,0,114,4,0,
+ 0,0,114,5,0,0,0,218,8,95,95,114,101,112,114,95,
+ 95,215,3,0,0,115,2,0,0,0,0,1,122,23,95,78,
+ 97,109,101,115,112,97,99,101,80,97,116,104,46,95,95,114,
+ 101,112,114,95,95,99,2,0,0,0,0,0,0,0,2,0,
+ 0,0,2,0,0,0,67,0,0,0,115,16,0,0,0,124,
+ 1,0,124,0,0,106,0,0,131,0,0,107,6,0,83,41,
+ 1,78,41,1,114,240,0,0,0,41,2,114,108,0,0,0,
+ 218,4,105,116,101,109,114,4,0,0,0,114,4,0,0,0,
+ 114,5,0,0,0,218,12,95,95,99,111,110,116,97,105,110,
+ 115,95,95,218,3,0,0,115,2,0,0,0,0,1,122,27,
+ 95,78,97,109,101,115,112,97,99,101,80,97,116,104,46,95,
+ 95,99,111,110,116,97,105,110,115,95,95,99,2,0,0,0,
+ 0,0,0,0,2,0,0,0,2,0,0,0,67,0,0,0,
+ 115,20,0,0,0,124,0,0,106,0,0,106,1,0,124,1,
+ 0,131,1,0,1,100,0,0,83,41,1,78,41,2,114,232,
+ 0,0,0,114,163,0,0,0,41,2,114,108,0,0,0,114,
+ 245,0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,
+ 0,0,0,114,163,0,0,0,221,3,0,0,115,2,0,0,
+ 0,0,1,122,21,95,78,97,109,101,115,112,97,99,101,80,
+ 97,116,104,46,97,112,112,101,110,100,78,41,13,114,112,0,
+ 0,0,114,111,0,0,0,114,113,0,0,0,114,114,0,0,
+ 0,114,185,0,0,0,114,238,0,0,0,114,233,0,0,0,
+ 114,240,0,0,0,114,242,0,0,0,114,243,0,0,0,114,
+ 244,0,0,0,114,246,0,0,0,114,163,0,0,0,114,4,
+ 0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,
+ 0,0,114,230,0,0,0,169,3,0,0,115,20,0,0,0,
+ 12,5,6,2,12,6,12,10,12,4,12,13,12,3,12,3,
+ 12,3,12,3,114,230,0,0,0,99,0,0,0,0,0,0,
+ 0,0,0,0,0,0,3,0,0,0,64,0,0,0,115,118,
+ 0,0,0,101,0,0,90,1,0,100,0,0,90,2,0,100,
+ 1,0,100,2,0,132,0,0,90,3,0,101,4,0,100,3,
+ 0,100,4,0,132,0,0,131,1,0,90,5,0,100,5,0,
+ 100,6,0,132,0,0,90,6,0,100,7,0,100,8,0,132,
+ 0,0,90,7,0,100,9,0,100,10,0,132,0,0,90,8,
+ 0,100,11,0,100,12,0,132,0,0,90,9,0,100,13,0,
+ 100,14,0,132,0,0,90,10,0,100,15,0,100,16,0,132,
+ 0,0,90,11,0,100,17,0,83,41,18,218,16,95,78,97,
+ 109,101,115,112,97,99,101,76,111,97,100,101,114,99,4,0,
+ 0,0,0,0,0,0,4,0,0,0,4,0,0,0,67,0,
+ 0,0,115,25,0,0,0,116,0,0,124,1,0,124,2,0,
+ 124,3,0,131,3,0,124,0,0,95,1,0,100,0,0,83,
+ 41,1,78,41,2,114,230,0,0,0,114,232,0,0,0,41,
+ 4,114,108,0,0,0,114,106,0,0,0,114,35,0,0,0,
+ 114,236,0,0,0,114,4,0,0,0,114,4,0,0,0,114,
+ 5,0,0,0,114,185,0,0,0,227,3,0,0,115,2,0,
+ 0,0,0,1,122,25,95,78,97,109,101,115,112,97,99,101,
+ 76,111,97,100,101,114,46,95,95,105,110,105,116,95,95,99,
+ 2,0,0,0,0,0,0,0,2,0,0,0,2,0,0,0,
+ 67,0,0,0,115,16,0,0,0,100,1,0,106,0,0,124,
+ 1,0,106,1,0,131,1,0,83,41,2,122,115,82,101,116,
+ 117,114,110,32,114,101,112,114,32,102,111,114,32,116,104,101,
+ 32,109,111,100,117,108,101,46,10,10,32,32,32,32,32,32,
+ 32,32,84,104,101,32,109,101,116,104,111,100,32,105,115,32,
+ 100,101,112,114,101,99,97,116,101,100,46,32,32,84,104,101,
+ 32,105,109,112,111,114,116,32,109,97,99,104,105,110,101,114,
+ 121,32,100,111,101,115,32,116,104,101,32,106,111,98,32,105,
+ 116,115,101,108,102,46,10,10,32,32,32,32,32,32,32,32,
+ 122,25,60,109,111,100,117,108,101,32,123,33,114,125,32,40,
+ 110,97,109,101,115,112,97,99,101,41,62,41,2,114,47,0,
+ 0,0,114,112,0,0,0,41,2,114,170,0,0,0,114,190,
+ 0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,
+ 0,0,218,11,109,111,100,117,108,101,95,114,101,112,114,230,
+ 3,0,0,115,2,0,0,0,0,7,122,28,95,78,97,109,
+ 101,115,112,97,99,101,76,111,97,100,101,114,46,109,111,100,
+ 117,108,101,95,114,101,112,114,99,2,0,0,0,0,0,0,
+ 0,2,0,0,0,1,0,0,0,67,0,0,0,115,4,0,
+ 0,0,100,1,0,83,41,2,78,84,114,4,0,0,0,41,
+ 2,114,108,0,0,0,114,126,0,0,0,114,4,0,0,0,
+ 114,4,0,0,0,114,5,0,0,0,114,159,0,0,0,239,
+ 3,0,0,115,2,0,0,0,0,1,122,27,95,78,97,109,
+ 101,115,112,97,99,101,76,111,97,100,101,114,46,105,115,95,
+ 112,97,99,107,97,103,101,99,2,0,0,0,0,0,0,0,
+ 2,0,0,0,1,0,0,0,67,0,0,0,115,4,0,0,
+ 0,100,1,0,83,41,2,78,114,30,0,0,0,114,4,0,
+ 0,0,41,2,114,108,0,0,0,114,126,0,0,0,114,4,
+ 0,0,0,114,4,0,0,0,114,5,0,0,0,114,202,0,
+ 0,0,242,3,0,0,115,2,0,0,0,0,1,122,27,95,
+ 78,97,109,101,115,112,97,99,101,76,111,97,100,101,114,46,
+ 103,101,116,95,115,111,117,114,99,101,99,2,0,0,0,0,
+ 0,0,0,2,0,0,0,6,0,0,0,67,0,0,0,115,
+ 22,0,0,0,116,0,0,100,1,0,100,2,0,100,3,0,
+ 100,4,0,100,5,0,131,3,1,83,41,6,78,114,30,0,
+ 0,0,122,8,60,115,116,114,105,110,103,62,114,189,0,0,
+ 0,114,204,0,0,0,84,41,1,114,205,0,0,0,41,2,
+ 114,108,0,0,0,114,126,0,0,0,114,4,0,0,0,114,
+ 4,0,0,0,114,5,0,0,0,114,187,0,0,0,245,3,
+ 0,0,115,2,0,0,0,0,1,122,25,95,78,97,109,101,
+ 115,112,97,99,101,76,111,97,100,101,114,46,103,101,116,95,
+ 99,111,100,101,99,2,0,0,0,0,0,0,0,2,0,0,
+ 0,1,0,0,0,67,0,0,0,115,4,0,0,0,100,1,
+ 0,83,41,2,122,42,85,115,101,32,100,101,102,97,117,108,
+ 116,32,115,101,109,97,110,116,105,99,115,32,102,111,114,32,
+ 109,111,100,117,108,101,32,99,114,101,97,116,105,111,110,46,
+ 78,114,4,0,0,0,41,2,114,108,0,0,0,114,164,0,
+ 0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,
+ 0,114,186,0,0,0,248,3,0,0,115,0,0,0,0,122,
+ 30,95,78,97,109,101,115,112,97,99,101,76,111,97,100,101,
+ 114,46,99,114,101,97,116,101,95,109,111,100,117,108,101,99,
+ 2,0,0,0,0,0,0,0,2,0,0,0,1,0,0,0,
+ 67,0,0,0,115,4,0,0,0,100,0,0,83,41,1,78,
+ 114,4,0,0,0,41,2,114,108,0,0,0,114,190,0,0,
+ 0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,
+ 114,191,0,0,0,251,3,0,0,115,2,0,0,0,0,1,
+ 122,28,95,78,97,109,101,115,112,97,99,101,76,111,97,100,
+ 101,114,46,101,120,101,99,95,109,111,100,117,108,101,99,2,
+ 0,0,0,0,0,0,0,2,0,0,0,3,0,0,0,67,
+ 0,0,0,115,32,0,0,0,116,0,0,100,1,0,124,0,
+ 0,106,1,0,131,2,0,1,116,2,0,106,3,0,124,0,
+ 0,124,1,0,131,2,0,83,41,2,122,98,76,111,97,100,
+ 32,97,32,110,97,109,101,115,112,97,99,101,32,109,111,100,
+ 117,108,101,46,10,10,32,32,32,32,32,32,32,32,84,104,
+ 105,115,32,109,101,116,104,111,100,32,105,115,32,100,101,112,
+ 114,101,99,97,116,101,100,46,32,32,85,115,101,32,101,120,
+ 101,99,95,109,111,100,117,108,101,40,41,32,105,110,115,116,
+ 101,97,100,46,10,10,32,32,32,32,32,32,32,32,122,38,
+ 110,97,109,101,115,112,97,99,101,32,109,111,100,117,108,101,
+ 32,108,111,97,100,101,100,32,119,105,116,104,32,112,97,116,
+ 104,32,123,33,114,125,41,4,114,105,0,0,0,114,232,0,
+ 0,0,114,121,0,0,0,114,192,0,0,0,41,2,114,108,
+ 0,0,0,114,126,0,0,0,114,4,0,0,0,114,4,0,
+ 0,0,114,5,0,0,0,114,193,0,0,0,254,3,0,0,
+ 115,4,0,0,0,0,7,16,1,122,28,95,78,97,109,101,
+ 115,112,97,99,101,76,111,97,100,101,114,46,108,111,97,100,
+ 95,109,111,100,117,108,101,78,41,12,114,112,0,0,0,114,
+ 111,0,0,0,114,113,0,0,0,114,185,0,0,0,114,183,
+ 0,0,0,114,248,0,0,0,114,159,0,0,0,114,202,0,
+ 0,0,114,187,0,0,0,114,186,0,0,0,114,191,0,0,
+ 0,114,193,0,0,0,114,4,0,0,0,114,4,0,0,0,
+ 114,4,0,0,0,114,5,0,0,0,114,247,0,0,0,226,
+ 3,0,0,115,16,0,0,0,12,1,12,3,18,9,12,3,
+ 12,3,12,3,12,3,12,3,114,247,0,0,0,99,0,0,
+ 0,0,0,0,0,0,0,0,0,0,5,0,0,0,64,0,
+ 0,0,115,160,0,0,0,101,0,0,90,1,0,100,0,0,
+ 90,2,0,100,1,0,90,3,0,101,4,0,100,2,0,100,
+ 3,0,132,0,0,131,1,0,90,5,0,101,4,0,100,4,
+ 0,100,5,0,132,0,0,131,1,0,90,6,0,101,4,0,
+ 100,6,0,100,7,0,132,0,0,131,1,0,90,7,0,101,
+ 4,0,100,8,0,100,9,0,132,0,0,131,1,0,90,8,
+ 0,101,4,0,100,10,0,100,11,0,100,12,0,132,1,0,
+ 131,1,0,90,9,0,101,4,0,100,10,0,100,10,0,100,
+ 13,0,100,14,0,132,2,0,131,1,0,90,10,0,101,4,
+ 0,100,10,0,100,15,0,100,16,0,132,1,0,131,1,0,
+ 90,11,0,100,10,0,83,41,17,218,10,80,97,116,104,70,
+ 105,110,100,101,114,122,62,77,101,116,97,32,112,97,116,104,
+ 32,102,105,110,100,101,114,32,102,111,114,32,115,121,115,46,
+ 112,97,116,104,32,97,110,100,32,112,97,99,107,97,103,101,
+ 32,95,95,112,97,116,104,95,95,32,97,116,116,114,105,98,
+ 117,116,101,115,46,99,1,0,0,0,0,0,0,0,2,0,
+ 0,0,4,0,0,0,67,0,0,0,115,55,0,0,0,120,
+ 48,0,116,0,0,106,1,0,106,2,0,131,0,0,68,93,
+ 31,0,125,1,0,116,3,0,124,1,0,100,1,0,131,2,
+ 0,114,16,0,124,1,0,106,4,0,131,0,0,1,113,16,
+ 0,87,100,2,0,83,41,3,122,125,67,97,108,108,32,116,
+ 104,101,32,105,110,118,97,108,105,100,97,116,101,95,99,97,
+ 99,104,101,115,40,41,32,109,101,116,104,111,100,32,111,110,
+ 32,97,108,108,32,112,97,116,104,32,101,110,116,114,121,32,
+ 102,105,110,100,101,114,115,10,32,32,32,32,32,32,32,32,
+ 115,116,111,114,101,100,32,105,110,32,115,121,115,46,112,97,
+ 116,104,95,105,109,112,111,114,116,101,114,95,99,97,99,104,
+ 101,115,32,40,119,104,101,114,101,32,105,109,112,108,101,109,
+ 101,110,116,101,100,41,46,218,17,105,110,118,97,108,105,100,
+ 97,116,101,95,99,97,99,104,101,115,78,41,5,114,7,0,
+ 0,0,218,19,112,97,116,104,95,105,109,112,111,114,116,101,
+ 114,95,99,97,99,104,101,218,6,118,97,108,117,101,115,114,
+ 115,0,0,0,114,250,0,0,0,41,2,114,170,0,0,0,
+ 218,6,102,105,110,100,101,114,114,4,0,0,0,114,4,0,
+ 0,0,114,5,0,0,0,114,250,0,0,0,15,4,0,0,
+ 115,6,0,0,0,0,4,22,1,15,1,122,28,80,97,116,
+ 104,70,105,110,100,101,114,46,105,110,118,97,108,105,100,97,
+ 116,101,95,99,97,99,104,101,115,99,2,0,0,0,0,0,
+ 0,0,3,0,0,0,12,0,0,0,67,0,0,0,115,107,
+ 0,0,0,116,0,0,106,1,0,100,1,0,107,9,0,114,
+ 41,0,116,0,0,106,1,0,12,114,41,0,116,2,0,106,
+ 3,0,100,2,0,116,4,0,131,2,0,1,120,59,0,116,
+ 0,0,106,1,0,68,93,44,0,125,2,0,121,14,0,124,
+ 2,0,124,1,0,131,1,0,83,87,113,51,0,4,116,5,
+ 0,107,10,0,114,94,0,1,1,1,119,51,0,89,113,51,
+ 0,88,113,51,0,87,100,1,0,83,100,1,0,83,41,3,
+ 122,113,83,101,97,114,99,104,32,115,101,113,117,101,110,99,
+ 101,32,111,102,32,104,111,111,107,115,32,102,111,114,32,97,
+ 32,102,105,110,100,101,114,32,102,111,114,32,39,112,97,116,
+ 104,39,46,10,10,32,32,32,32,32,32,32,32,73,102,32,
+ 39,104,111,111,107,115,39,32,105,115,32,102,97,108,115,101,
+ 32,116,104,101,110,32,117,115,101,32,115,121,115,46,112,97,
+ 116,104,95,104,111,111,107,115,46,10,10,32,32,32,32,32,
+ 32,32,32,78,122,23,115,121,115,46,112,97,116,104,95,104,
+ 111,111,107,115,32,105,115,32,101,109,112,116,121,41,6,114,
+ 7,0,0,0,218,10,112,97,116,104,95,104,111,111,107,115,
+ 114,60,0,0,0,114,61,0,0,0,114,125,0,0,0,114,
+ 107,0,0,0,41,3,114,170,0,0,0,114,35,0,0,0,
+ 90,4,104,111,111,107,114,4,0,0,0,114,4,0,0,0,
+ 114,5,0,0,0,218,11,95,112,97,116,104,95,104,111,111,
+ 107,115,23,4,0,0,115,16,0,0,0,0,7,25,1,16,
+ 1,16,1,3,1,14,1,13,1,12,2,122,22,80,97,116,
+ 104,70,105,110,100,101,114,46,95,112,97,116,104,95,104,111,
+ 111,107,115,99,2,0,0,0,0,0,0,0,3,0,0,0,
+ 19,0,0,0,67,0,0,0,115,123,0,0,0,124,1,0,
+ 100,1,0,107,2,0,114,53,0,121,16,0,116,0,0,106,
+ 1,0,131,0,0,125,1,0,87,110,22,0,4,116,2,0,
+ 107,10,0,114,52,0,1,1,1,100,2,0,83,89,110,1,
+ 0,88,121,17,0,116,3,0,106,4,0,124,1,0,25,125,
+ 2,0,87,110,46,0,4,116,5,0,107,10,0,114,118,0,
+ 1,1,1,124,0,0,106,6,0,124,1,0,131,1,0,125,
+ 2,0,124,2,0,116,3,0,106,4,0,124,1,0,60,89,
+ 110,1,0,88,124,2,0,83,41,3,122,210,71,101,116,32,
+ 116,104,101,32,102,105,110,100,101,114,32,102,111,114,32,116,
+ 104,101,32,112,97,116,104,32,101,110,116,114,121,32,102,114,
+ 111,109,32,115,121,115,46,112,97,116,104,95,105,109,112,111,
+ 114,116,101,114,95,99,97,99,104,101,46,10,10,32,32,32,
+ 32,32,32,32,32,73,102,32,116,104,101,32,112,97,116,104,
+ 32,101,110,116,114,121,32,105,115,32,110,111,116,32,105,110,
+ 32,116,104,101,32,99,97,99,104,101,44,32,102,105,110,100,
+ 32,116,104,101,32,97,112,112,114,111,112,114,105,97,116,101,
+ 32,102,105,110,100,101,114,10,32,32,32,32,32,32,32,32,
+ 97,110,100,32,99,97,99,104,101,32,105,116,46,32,73,102,
+ 32,110,111,32,102,105,110,100,101,114,32,105,115,32,97,118,
+ 97,105,108,97,98,108,101,44,32,115,116,111,114,101,32,78,
+ 111,110,101,46,10,10,32,32,32,32,32,32,32,32,114,30,
+ 0,0,0,78,41,7,114,3,0,0,0,114,45,0,0,0,
+ 218,17,70,105,108,101,78,111,116,70,111,117,110,100,69,114,
+ 114,111,114,114,7,0,0,0,114,251,0,0,0,114,137,0,
+ 0,0,114,255,0,0,0,41,3,114,170,0,0,0,114,35,
+ 0,0,0,114,253,0,0,0,114,4,0,0,0,114,4,0,
+ 0,0,114,5,0,0,0,218,20,95,112,97,116,104,95,105,
+ 109,112,111,114,116,101,114,95,99,97,99,104,101,40,4,0,
+ 0,115,22,0,0,0,0,8,12,1,3,1,16,1,13,3,
+ 9,1,3,1,17,1,13,1,15,1,18,1,122,31,80,97,
+ 116,104,70,105,110,100,101,114,46,95,112,97,116,104,95,105,
+ 109,112,111,114,116,101,114,95,99,97,99,104,101,99,3,0,
+ 0,0,0,0,0,0,6,0,0,0,3,0,0,0,67,0,
+ 0,0,115,119,0,0,0,116,0,0,124,2,0,100,1,0,
+ 131,2,0,114,39,0,124,2,0,106,1,0,124,1,0,131,
+ 1,0,92,2,0,125,3,0,125,4,0,110,21,0,124,2,
+ 0,106,2,0,124,1,0,131,1,0,125,3,0,103,0,0,
+ 125,4,0,124,3,0,100,0,0,107,9,0,114,88,0,116,
+ 3,0,106,4,0,124,1,0,124,3,0,131,2,0,83,116,
+ 3,0,106,5,0,124,1,0,100,0,0,131,2,0,125,5,
+ 0,124,4,0,124,5,0,95,6,0,124,5,0,83,41,2,
+ 78,114,124,0,0,0,41,7,114,115,0,0,0,114,124,0,
+ 0,0,114,182,0,0,0,114,121,0,0,0,114,179,0,0,
+ 0,114,160,0,0,0,114,156,0,0,0,41,6,114,170,0,
+ 0,0,114,126,0,0,0,114,253,0,0,0,114,127,0,0,
+ 0,114,128,0,0,0,114,164,0,0,0,114,4,0,0,0,
+ 114,4,0,0,0,114,5,0,0,0,218,16,95,108,101,103,
+ 97,99,121,95,103,101,116,95,115,112,101,99,62,4,0,0,
+ 115,18,0,0,0,0,4,15,1,24,2,15,1,6,1,12,
+ 1,16,1,18,1,9,1,122,27,80,97,116,104,70,105,110,
+ 100,101,114,46,95,108,101,103,97,99,121,95,103,101,116,95,
+ 115,112,101,99,78,99,4,0,0,0,0,0,0,0,9,0,
+ 0,0,5,0,0,0,67,0,0,0,115,243,0,0,0,103,
+ 0,0,125,4,0,120,230,0,124,2,0,68,93,191,0,125,
+ 5,0,116,0,0,124,5,0,116,1,0,116,2,0,102,2,
+ 0,131,2,0,115,43,0,113,13,0,124,0,0,106,3,0,
+ 124,5,0,131,1,0,125,6,0,124,6,0,100,1,0,107,
+ 9,0,114,13,0,116,4,0,124,6,0,100,2,0,131,2,
+ 0,114,106,0,124,6,0,106,5,0,124,1,0,124,3,0,
+ 131,2,0,125,7,0,110,18,0,124,0,0,106,6,0,124,
+ 1,0,124,6,0,131,2,0,125,7,0,124,7,0,100,1,
+ 0,107,8,0,114,139,0,113,13,0,124,7,0,106,7,0,
+ 100,1,0,107,9,0,114,158,0,124,7,0,83,124,7,0,
+ 106,8,0,125,8,0,124,8,0,100,1,0,107,8,0,114,
+ 191,0,116,9,0,100,3,0,131,1,0,130,1,0,124,4,
+ 0,106,10,0,124,8,0,131,1,0,1,113,13,0,87,116,
+ 11,0,106,12,0,124,1,0,100,1,0,131,2,0,125,7,
+ 0,124,4,0,124,7,0,95,8,0,124,7,0,83,100,1,
+ 0,83,41,4,122,63,70,105,110,100,32,116,104,101,32,108,
+ 111,97,100,101,114,32,111,114,32,110,97,109,101,115,112,97,
+ 99,101,95,112,97,116,104,32,102,111,114,32,116,104,105,115,
+ 32,109,111,100,117,108,101,47,112,97,99,107,97,103,101,32,
+ 110,97,109,101,46,78,114,181,0,0,0,122,19,115,112,101,
+ 99,32,109,105,115,115,105,110,103,32,108,111,97,100,101,114,
+ 41,13,114,143,0,0,0,114,69,0,0,0,218,5,98,121,
+ 116,101,115,114,1,1,0,0,114,115,0,0,0,114,181,0,
+ 0,0,114,2,1,0,0,114,127,0,0,0,114,156,0,0,
+ 0,114,107,0,0,0,114,149,0,0,0,114,121,0,0,0,
+ 114,160,0,0,0,41,9,114,170,0,0,0,114,126,0,0,
+ 0,114,35,0,0,0,114,180,0,0,0,218,14,110,97,109,
+ 101,115,112,97,99,101,95,112,97,116,104,90,5,101,110,116,
+ 114,121,114,253,0,0,0,114,164,0,0,0,114,128,0,0,
+ 0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,
+ 218,9,95,103,101,116,95,115,112,101,99,77,4,0,0,115,
+ 40,0,0,0,0,5,6,1,13,1,21,1,3,1,15,1,
+ 12,1,15,1,21,2,18,1,12,1,3,1,15,1,4,1,
+ 9,1,12,1,12,5,17,2,18,1,9,1,122,20,80,97,
+ 116,104,70,105,110,100,101,114,46,95,103,101,116,95,115,112,
+ 101,99,99,4,0,0,0,0,0,0,0,6,0,0,0,4,
+ 0,0,0,67,0,0,0,115,140,0,0,0,124,2,0,100,
+ 1,0,107,8,0,114,21,0,116,0,0,106,1,0,125,2,
+ 0,124,0,0,106,2,0,124,1,0,124,2,0,124,3,0,
+ 131,3,0,125,4,0,124,4,0,100,1,0,107,8,0,114,
+ 58,0,100,1,0,83,124,4,0,106,3,0,100,1,0,107,
+ 8,0,114,132,0,124,4,0,106,4,0,125,5,0,124,5,
+ 0,114,125,0,100,2,0,124,4,0,95,5,0,116,6,0,
+ 124,1,0,124,5,0,124,0,0,106,2,0,131,3,0,124,
+ 4,0,95,4,0,124,4,0,83,100,1,0,83,110,4,0,
+ 124,4,0,83,100,1,0,83,41,3,122,98,102,105,110,100,
+ 32,116,104,101,32,109,111,100,117,108,101,32,111,110,32,115,
+ 121,115,46,112,97,116,104,32,111,114,32,39,112,97,116,104,
+ 39,32,98,97,115,101,100,32,111,110,32,115,121,115,46,112,
+ 97,116,104,95,104,111,111,107,115,32,97,110,100,10,32,32,
+ 32,32,32,32,32,32,115,121,115,46,112,97,116,104,95,105,
+ 109,112,111,114,116,101,114,95,99,97,99,104,101,46,78,90,
+ 9,110,97,109,101,115,112,97,99,101,41,7,114,7,0,0,
+ 0,114,35,0,0,0,114,5,1,0,0,114,127,0,0,0,
+ 114,156,0,0,0,114,158,0,0,0,114,230,0,0,0,41,
+ 6,114,170,0,0,0,114,126,0,0,0,114,35,0,0,0,
+ 114,180,0,0,0,114,164,0,0,0,114,4,1,0,0,114,
+ 4,0,0,0,114,4,0,0,0,114,5,0,0,0,114,181,
+ 0,0,0,109,4,0,0,115,26,0,0,0,0,4,12,1,
+ 9,1,21,1,12,1,4,1,15,1,9,1,6,3,9,1,
+ 24,1,4,2,7,2,122,20,80,97,116,104,70,105,110,100,
+ 101,114,46,102,105,110,100,95,115,112,101,99,99,3,0,0,
+ 0,0,0,0,0,4,0,0,0,3,0,0,0,67,0,0,
+ 0,115,41,0,0,0,124,0,0,106,0,0,124,1,0,124,
+ 2,0,131,2,0,125,3,0,124,3,0,100,1,0,107,8,
+ 0,114,34,0,100,1,0,83,124,3,0,106,1,0,83,41,
+ 2,122,170,102,105,110,100,32,116,104,101,32,109,111,100,117,
+ 108,101,32,111,110,32,115,121,115,46,112,97,116,104,32,111,
+ 114,32,39,112,97,116,104,39,32,98,97,115,101,100,32,111,
+ 110,32,115,121,115,46,112,97,116,104,95,104,111,111,107,115,
+ 32,97,110,100,10,32,32,32,32,32,32,32,32,115,121,115,
+ 46,112,97,116,104,95,105,109,112,111,114,116,101,114,95,99,
+ 97,99,104,101,46,10,10,32,32,32,32,32,32,32,32,84,
+ 104,105,115,32,109,101,116,104,111,100,32,105,115,32,100,101,
+ 112,114,101,99,97,116,101,100,46,32,32,85,115,101,32,102,
+ 105,110,100,95,115,112,101,99,40,41,32,105,110,115,116,101,
+ 97,100,46,10,10,32,32,32,32,32,32,32,32,78,41,2,
+ 114,181,0,0,0,114,127,0,0,0,41,4,114,170,0,0,
+ 0,114,126,0,0,0,114,35,0,0,0,114,164,0,0,0,
+ 114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,114,
+ 182,0,0,0,131,4,0,0,115,8,0,0,0,0,8,18,
+ 1,12,1,4,1,122,22,80,97,116,104,70,105,110,100,101,
+ 114,46,102,105,110,100,95,109,111,100,117,108,101,41,12,114,
+ 112,0,0,0,114,111,0,0,0,114,113,0,0,0,114,114,
+ 0,0,0,114,183,0,0,0,114,250,0,0,0,114,255,0,
+ 0,0,114,1,1,0,0,114,2,1,0,0,114,5,1,0,
+ 0,114,181,0,0,0,114,182,0,0,0,114,4,0,0,0,
+ 114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,114,
+ 249,0,0,0,11,4,0,0,115,22,0,0,0,12,2,6,
+ 2,18,8,18,17,18,22,18,15,3,1,18,31,3,1,21,
+ 21,3,1,114,249,0,0,0,99,0,0,0,0,0,0,0,
+ 0,0,0,0,0,3,0,0,0,64,0,0,0,115,133,0,
+ 0,0,101,0,0,90,1,0,100,0,0,90,2,0,100,1,
+ 0,90,3,0,100,2,0,100,3,0,132,0,0,90,4,0,
+ 100,4,0,100,5,0,132,0,0,90,5,0,101,6,0,90,
+ 7,0,100,6,0,100,7,0,132,0,0,90,8,0,100,8,
+ 0,100,9,0,132,0,0,90,9,0,100,10,0,100,11,0,
+ 100,12,0,132,1,0,90,10,0,100,13,0,100,14,0,132,
+ 0,0,90,11,0,101,12,0,100,15,0,100,16,0,132,0,
+ 0,131,1,0,90,13,0,100,17,0,100,18,0,132,0,0,
+ 90,14,0,100,10,0,83,41,19,218,10,70,105,108,101,70,
+ 105,110,100,101,114,122,172,70,105,108,101,45,98,97,115,101,
+ 100,32,102,105,110,100,101,114,46,10,10,32,32,32,32,73,
+ 110,116,101,114,97,99,116,105,111,110,115,32,119,105,116,104,
+ 32,116,104,101,32,102,105,108,101,32,115,121,115,116,101,109,
+ 32,97,114,101,32,99,97,99,104,101,100,32,102,111,114,32,
+ 112,101,114,102,111,114,109,97,110,99,101,44,32,98,101,105,
+ 110,103,10,32,32,32,32,114,101,102,114,101,115,104,101,100,
+ 32,119,104,101,110,32,116,104,101,32,100,105,114,101,99,116,
+ 111,114,121,32,116,104,101,32,102,105,110,100,101,114,32,105,
+ 115,32,104,97,110,100,108,105,110,103,32,104,97,115,32,98,
+ 101,101,110,32,109,111,100,105,102,105,101,100,46,10,10,32,
+ 32,32,32,99,2,0,0,0,0,0,0,0,5,0,0,0,
+ 5,0,0,0,7,0,0,0,115,122,0,0,0,103,0,0,
+ 125,3,0,120,52,0,124,2,0,68,93,44,0,92,2,0,
+ 137,0,0,125,4,0,124,3,0,106,0,0,135,0,0,102,
+ 1,0,100,1,0,100,2,0,134,0,0,124,4,0,68,131,
+ 1,0,131,1,0,1,113,13,0,87,124,3,0,124,0,0,
+ 95,1,0,124,1,0,112,79,0,100,3,0,124,0,0,95,
+ 2,0,100,6,0,124,0,0,95,3,0,116,4,0,131,0,
+ 0,124,0,0,95,5,0,116,4,0,131,0,0,124,0,0,
+ 95,6,0,100,5,0,83,41,7,122,154,73,110,105,116,105,
+ 97,108,105,122,101,32,119,105,116,104,32,116,104,101,32,112,
+ 97,116,104,32,116,111,32,115,101,97,114,99,104,32,111,110,
+ 32,97,110,100,32,97,32,118,97,114,105,97,98,108,101,32,
+ 110,117,109,98,101,114,32,111,102,10,32,32,32,32,32,32,
+ 32,32,50,45,116,117,112,108,101,115,32,99,111,110,116,97,
+ 105,110,105,110,103,32,116,104,101,32,108,111,97,100,101,114,
+ 32,97,110,100,32,116,104,101,32,102,105,108,101,32,115,117,
+ 102,102,105,120,101,115,32,116,104,101,32,108,111,97,100,101,
+ 114,10,32,32,32,32,32,32,32,32,114,101,99,111,103,110,
+ 105,122,101,115,46,99,1,0,0,0,0,0,0,0,2,0,
+ 0,0,3,0,0,0,51,0,0,0,115,27,0,0,0,124,
+ 0,0,93,17,0,125,1,0,124,1,0,136,0,0,102,2,
+ 0,86,1,113,3,0,100,0,0,83,41,1,78,114,4,0,
+ 0,0,41,2,114,22,0,0,0,114,225,0,0,0,41,1,
+ 114,127,0,0,0,114,4,0,0,0,114,5,0,0,0,114,
+ 227,0,0,0,160,4,0,0,115,2,0,0,0,6,0,122,
+ 38,70,105,108,101,70,105,110,100,101,114,46,95,95,105,110,
+ 105,116,95,95,46,60,108,111,99,97,108,115,62,46,60,103,
+ 101,110,101,120,112,114,62,114,58,0,0,0,114,29,0,0,
+ 0,78,114,87,0,0,0,41,7,114,149,0,0,0,218,8,
+ 95,108,111,97,100,101,114,115,114,35,0,0,0,218,11,95,
+ 112,97,116,104,95,109,116,105,109,101,218,3,115,101,116,218,
+ 11,95,112,97,116,104,95,99,97,99,104,101,218,19,95,114,
+ 101,108,97,120,101,100,95,112,97,116,104,95,99,97,99,104,
+ 101,41,5,114,108,0,0,0,114,35,0,0,0,218,14,108,
+ 111,97,100,101,114,95,100,101,116,97,105,108,115,90,7,108,
+ 111,97,100,101,114,115,114,166,0,0,0,114,4,0,0,0,
+ 41,1,114,127,0,0,0,114,5,0,0,0,114,185,0,0,
+ 0,154,4,0,0,115,16,0,0,0,0,4,6,1,19,1,
+ 36,1,9,2,15,1,9,1,12,1,122,19,70,105,108,101,
+ 70,105,110,100,101,114,46,95,95,105,110,105,116,95,95,99,
+ 1,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,
+ 67,0,0,0,115,13,0,0,0,100,3,0,124,0,0,95,
+ 0,0,100,2,0,83,41,4,122,31,73,110,118,97,108,105,
+ 100,97,116,101,32,116,104,101,32,100,105,114,101,99,116,111,
+ 114,121,32,109,116,105,109,101,46,114,29,0,0,0,78,114,
+ 87,0,0,0,41,1,114,8,1,0,0,41,1,114,108,0,
+ 0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,0,
+ 0,114,250,0,0,0,168,4,0,0,115,2,0,0,0,0,
+ 2,122,28,70,105,108,101,70,105,110,100,101,114,46,105,110,
+ 118,97,108,105,100,97,116,101,95,99,97,99,104,101,115,99,
+ 2,0,0,0,0,0,0,0,3,0,0,0,2,0,0,0,
+ 67,0,0,0,115,59,0,0,0,124,0,0,106,0,0,124,
+ 1,0,131,1,0,125,2,0,124,2,0,100,1,0,107,8,
+ 0,114,37,0,100,1,0,103,0,0,102,2,0,83,124,2,
+ 0,106,1,0,124,2,0,106,2,0,112,55,0,103,0,0,
+ 102,2,0,83,41,2,122,197,84,114,121,32,116,111,32,102,
+ 105,110,100,32,97,32,108,111,97,100,101,114,32,102,111,114,
+ 32,116,104,101,32,115,112,101,99,105,102,105,101,100,32,109,
+ 111,100,117,108,101,44,32,111,114,32,116,104,101,32,110,97,
+ 109,101,115,112,97,99,101,10,32,32,32,32,32,32,32,32,
+ 112,97,99,107,97,103,101,32,112,111,114,116,105,111,110,115,
+ 46,32,82,101,116,117,114,110,115,32,40,108,111,97,100,101,
+ 114,44,32,108,105,115,116,45,111,102,45,112,111,114,116,105,
+ 111,110,115,41,46,10,10,32,32,32,32,32,32,32,32,84,
+ 104,105,115,32,109,101,116,104,111,100,32,105,115,32,100,101,
+ 112,114,101,99,97,116,101,100,46,32,32,85,115,101,32,102,
+ 105,110,100,95,115,112,101,99,40,41,32,105,110,115,116,101,
+ 97,100,46,10,10,32,32,32,32,32,32,32,32,78,41,3,
+ 114,181,0,0,0,114,127,0,0,0,114,156,0,0,0,41,
+ 3,114,108,0,0,0,114,126,0,0,0,114,164,0,0,0,
+ 114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,114,
+ 124,0,0,0,174,4,0,0,115,8,0,0,0,0,7,15,
+ 1,12,1,10,1,122,22,70,105,108,101,70,105,110,100,101,
+ 114,46,102,105,110,100,95,108,111,97,100,101,114,99,6,0,
+ 0,0,0,0,0,0,7,0,0,0,7,0,0,0,67,0,
+ 0,0,115,40,0,0,0,124,1,0,124,2,0,124,3,0,
+ 131,2,0,125,6,0,116,0,0,124,2,0,124,3,0,100,
+ 1,0,124,6,0,100,2,0,124,4,0,131,2,2,83,41,
+ 3,78,114,127,0,0,0,114,156,0,0,0,41,1,114,167,
+ 0,0,0,41,7,114,108,0,0,0,114,165,0,0,0,114,
+ 126,0,0,0,114,35,0,0,0,90,4,115,109,115,108,114,
+ 180,0,0,0,114,127,0,0,0,114,4,0,0,0,114,4,
+ 0,0,0,114,5,0,0,0,114,5,1,0,0,186,4,0,
+ 0,115,6,0,0,0,0,1,15,1,18,1,122,20,70,105,
+ 108,101,70,105,110,100,101,114,46,95,103,101,116,95,115,112,
+ 101,99,78,99,3,0,0,0,0,0,0,0,14,0,0,0,
+ 15,0,0,0,67,0,0,0,115,234,1,0,0,100,1,0,
+ 125,3,0,124,1,0,106,0,0,100,2,0,131,1,0,100,
+ 3,0,25,125,4,0,121,34,0,116,1,0,124,0,0,106,
+ 2,0,112,49,0,116,3,0,106,4,0,131,0,0,131,1,
+ 0,106,5,0,125,5,0,87,110,24,0,4,116,6,0,107,
+ 10,0,114,85,0,1,1,1,100,10,0,125,5,0,89,110,
+ 1,0,88,124,5,0,124,0,0,106,7,0,107,3,0,114,
+ 120,0,124,0,0,106,8,0,131,0,0,1,124,5,0,124,
+ 0,0,95,7,0,116,9,0,131,0,0,114,153,0,124,0,
+ 0,106,10,0,125,6,0,124,4,0,106,11,0,131,0,0,
+ 125,7,0,110,15,0,124,0,0,106,12,0,125,6,0,124,
+ 4,0,125,7,0,124,7,0,124,6,0,107,6,0,114,45,
+ 1,116,13,0,124,0,0,106,2,0,124,4,0,131,2,0,
+ 125,8,0,120,100,0,124,0,0,106,14,0,68,93,77,0,
+ 92,2,0,125,9,0,125,10,0,100,5,0,124,9,0,23,
+ 125,11,0,116,13,0,124,8,0,124,11,0,131,2,0,125,
+ 12,0,116,15,0,124,12,0,131,1,0,114,208,0,124,0,
+ 0,106,16,0,124,10,0,124,1,0,124,12,0,124,8,0,
+ 103,1,0,124,2,0,131,5,0,83,113,208,0,87,116,17,
+ 0,124,8,0,131,1,0,125,3,0,120,123,0,124,0,0,
+ 106,14,0,68,93,112,0,92,2,0,125,9,0,125,10,0,
+ 116,13,0,124,0,0,106,2,0,124,4,0,124,9,0,23,
+ 131,2,0,125,12,0,116,18,0,100,6,0,106,19,0,124,
+ 12,0,131,1,0,100,7,0,100,3,0,131,1,1,1,124,
+ 7,0,124,9,0,23,124,6,0,107,6,0,114,55,1,116,
+ 15,0,124,12,0,131,1,0,114,55,1,124,0,0,106,16,
+ 0,124,10,0,124,1,0,124,12,0,100,8,0,124,2,0,
+ 131,5,0,83,113,55,1,87,124,3,0,114,230,1,116,18,
+ 0,100,9,0,106,19,0,124,8,0,131,1,0,131,1,0,
+ 1,116,20,0,106,21,0,124,1,0,100,8,0,131,2,0,
+ 125,13,0,124,8,0,103,1,0,124,13,0,95,22,0,124,
+ 13,0,83,100,8,0,83,41,11,122,102,84,114,121,32,116,
+ 111,32,102,105,110,100,32,97,32,115,112,101,99,32,102,111,
+ 114,32,116,104,101,32,115,112,101,99,105,102,105,101,100,32,
+ 109,111,100,117,108,101,46,32,32,82,101,116,117,114,110,115,
+ 32,116,104,101,10,32,32,32,32,32,32,32,32,109,97,116,
+ 99,104,105,110,103,32,115,112,101,99,44,32,111,114,32,78,
+ 111,110,101,32,105,102,32,110,111,116,32,102,111,117,110,100,
+ 46,70,114,58,0,0,0,114,56,0,0,0,114,29,0,0,
+ 0,114,185,0,0,0,122,9,116,114,121,105,110,103,32,123,
+ 125,114,98,0,0,0,78,122,25,112,111,115,115,105,98,108,
+ 101,32,110,97,109,101,115,112,97,99,101,32,102,111,114,32,
+ 123,125,114,87,0,0,0,41,23,114,32,0,0,0,114,39,
+ 0,0,0,114,35,0,0,0,114,3,0,0,0,114,45,0,
+ 0,0,114,219,0,0,0,114,40,0,0,0,114,8,1,0,
+ 0,218,11,95,102,105,108,108,95,99,97,99,104,101,114,6,
+ 0,0,0,114,11,1,0,0,114,88,0,0,0,114,10,1,
+ 0,0,114,28,0,0,0,114,7,1,0,0,114,44,0,0,
+ 0,114,5,1,0,0,114,46,0,0,0,114,105,0,0,0,
+ 114,47,0,0,0,114,121,0,0,0,114,160,0,0,0,114,
+ 156,0,0,0,41,14,114,108,0,0,0,114,126,0,0,0,
+ 114,180,0,0,0,90,12,105,115,95,110,97,109,101,115,112,
+ 97,99,101,90,11,116,97,105,108,95,109,111,100,117,108,101,
+ 114,133,0,0,0,90,5,99,97,99,104,101,90,12,99,97,
+ 99,104,101,95,109,111,100,117,108,101,90,9,98,97,115,101,
+ 95,112,97,116,104,114,225,0,0,0,114,165,0,0,0,90,
+ 13,105,110,105,116,95,102,105,108,101,110,97,109,101,90,9,
+ 102,117,108,108,95,112,97,116,104,114,164,0,0,0,114,4,
+ 0,0,0,114,4,0,0,0,114,5,0,0,0,114,181,0,
+ 0,0,191,4,0,0,115,68,0,0,0,0,3,6,1,19,
+ 1,3,1,34,1,13,1,11,1,15,1,10,1,9,2,9,
+ 1,9,1,15,2,9,1,6,2,12,1,18,1,22,1,10,
+ 1,15,1,12,1,32,4,12,2,22,1,22,1,25,1,16,
+ 1,12,1,29,1,6,1,19,1,18,1,12,1,4,1,122,
+ 20,70,105,108,101,70,105,110,100,101,114,46,102,105,110,100,
+ 95,115,112,101,99,99,1,0,0,0,0,0,0,0,9,0,
+ 0,0,13,0,0,0,67,0,0,0,115,11,1,0,0,124,
+ 0,0,106,0,0,125,1,0,121,31,0,116,1,0,106,2,
+ 0,124,1,0,112,33,0,116,1,0,106,3,0,131,0,0,
+ 131,1,0,125,2,0,87,110,33,0,4,116,4,0,116,5,
+ 0,116,6,0,102,3,0,107,10,0,114,75,0,1,1,1,
+ 103,0,0,125,2,0,89,110,1,0,88,116,7,0,106,8,
+ 0,106,9,0,100,1,0,131,1,0,115,112,0,116,10,0,
+ 124,2,0,131,1,0,124,0,0,95,11,0,110,111,0,116,
+ 10,0,131,0,0,125,3,0,120,90,0,124,2,0,68,93,
+ 82,0,125,4,0,124,4,0,106,12,0,100,2,0,131,1,
+ 0,92,3,0,125,5,0,125,6,0,125,7,0,124,6,0,
+ 114,191,0,100,3,0,106,13,0,124,5,0,124,7,0,106,
+ 14,0,131,0,0,131,2,0,125,8,0,110,6,0,124,5,
+ 0,125,8,0,124,3,0,106,15,0,124,8,0,131,1,0,
+ 1,113,128,0,87,124,3,0,124,0,0,95,11,0,116,7,
+ 0,106,8,0,106,9,0,116,16,0,131,1,0,114,7,1,
+ 100,4,0,100,5,0,132,0,0,124,2,0,68,131,1,0,
+ 124,0,0,95,17,0,100,6,0,83,41,7,122,68,70,105,
+ 108,108,32,116,104,101,32,99,97,99,104,101,32,111,102,32,
+ 112,111,116,101,110,116,105,97,108,32,109,111,100,117,108,101,
+ 115,32,97,110,100,32,112,97,99,107,97,103,101,115,32,102,
+ 111,114,32,116,104,105,115,32,100,105,114,101,99,116,111,114,
+ 121,46,114,0,0,0,0,114,58,0,0,0,122,5,123,125,
+ 46,123,125,99,1,0,0,0,0,0,0,0,2,0,0,0,
+ 3,0,0,0,83,0,0,0,115,28,0,0,0,104,0,0,
+ 124,0,0,93,18,0,125,1,0,124,1,0,106,0,0,131,
+ 0,0,146,2,0,113,6,0,83,114,4,0,0,0,41,1,
+ 114,88,0,0,0,41,2,114,22,0,0,0,90,2,102,110,
+ 114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,250,
+ 9,60,115,101,116,99,111,109,112,62,9,5,0,0,115,2,
+ 0,0,0,9,0,122,41,70,105,108,101,70,105,110,100,101,
+ 114,46,95,102,105,108,108,95,99,97,99,104,101,46,60,108,
+ 111,99,97,108,115,62,46,60,115,101,116,99,111,109,112,62,
+ 78,41,18,114,35,0,0,0,114,3,0,0,0,90,7,108,
+ 105,115,116,100,105,114,114,45,0,0,0,114,0,1,0,0,
+ 218,15,80,101,114,109,105,115,115,105,111,110,69,114,114,111,
+ 114,218,18,78,111,116,65,68,105,114,101,99,116,111,114,121,
+ 69,114,114,111,114,114,7,0,0,0,114,8,0,0,0,114,
+ 9,0,0,0,114,9,1,0,0,114,10,1,0,0,114,83,
+ 0,0,0,114,47,0,0,0,114,88,0,0,0,218,3,97,
+ 100,100,114,10,0,0,0,114,11,1,0,0,41,9,114,108,
+ 0,0,0,114,35,0,0,0,90,8,99,111,110,116,101,110,
+ 116,115,90,21,108,111,119,101,114,95,115,117,102,102,105,120,
+ 95,99,111,110,116,101,110,116,115,114,245,0,0,0,114,106,
+ 0,0,0,114,237,0,0,0,114,225,0,0,0,90,8,110,
+ 101,119,95,110,97,109,101,114,4,0,0,0,114,4,0,0,
+ 0,114,5,0,0,0,114,13,1,0,0,236,4,0,0,115,
+ 34,0,0,0,0,2,9,1,3,1,31,1,22,3,11,3,
+ 18,1,18,7,9,1,13,1,24,1,6,1,27,2,6,1,
+ 17,1,9,1,18,1,122,22,70,105,108,101,70,105,110,100,
+ 101,114,46,95,102,105,108,108,95,99,97,99,104,101,99,1,
+ 0,0,0,0,0,0,0,3,0,0,0,3,0,0,0,7,
+ 0,0,0,115,25,0,0,0,135,0,0,135,1,0,102,2,
+ 0,100,1,0,100,2,0,134,0,0,125,2,0,124,2,0,
+ 83,41,3,97,20,1,0,0,65,32,99,108,97,115,115,32,
+ 109,101,116,104,111,100,32,119,104,105,99,104,32,114,101,116,
+ 117,114,110,115,32,97,32,99,108,111,115,117,114,101,32,116,
+ 111,32,117,115,101,32,111,110,32,115,121,115,46,112,97,116,
+ 104,95,104,111,111,107,10,32,32,32,32,32,32,32,32,119,
+ 104,105,99,104,32,119,105,108,108,32,114,101,116,117,114,110,
+ 32,97,110,32,105,110,115,116,97,110,99,101,32,117,115,105,
+ 110,103,32,116,104,101,32,115,112,101,99,105,102,105,101,100,
+ 32,108,111,97,100,101,114,115,32,97,110,100,32,116,104,101,
+ 32,112,97,116,104,10,32,32,32,32,32,32,32,32,99,97,
+ 108,108,101,100,32,111,110,32,116,104,101,32,99,108,111,115,
+ 117,114,101,46,10,10,32,32,32,32,32,32,32,32,73,102,
+ 32,116,104,101,32,112,97,116,104,32,99,97,108,108,101,100,
+ 32,111,110,32,116,104,101,32,99,108,111,115,117,114,101,32,
+ 105,115,32,110,111,116,32,97,32,100,105,114,101,99,116,111,
+ 114,121,44,32,73,109,112,111,114,116,69,114,114,111,114,32,
+ 105,115,10,32,32,32,32,32,32,32,32,114,97,105,115,101,
+ 100,46,10,10,32,32,32,32,32,32,32,32,99,1,0,0,
+ 0,0,0,0,0,1,0,0,0,4,0,0,0,19,0,0,
+ 0,115,43,0,0,0,116,0,0,124,0,0,131,1,0,115,
+ 30,0,116,1,0,100,1,0,100,2,0,124,0,0,131,1,
+ 1,130,1,0,136,0,0,124,0,0,136,1,0,140,1,0,
+ 83,41,3,122,45,80,97,116,104,32,104,111,111,107,32,102,
+ 111,114,32,105,109,112,111,114,116,108,105,98,46,109,97,99,
+ 104,105,110,101,114,121,46,70,105,108,101,70,105,110,100,101,
+ 114,46,122,30,111,110,108,121,32,100,105,114,101,99,116,111,
+ 114,105,101,115,32,97,114,101,32,115,117,112,112,111,114,116,
+ 101,100,114,35,0,0,0,41,2,114,46,0,0,0,114,107,
+ 0,0,0,41,1,114,35,0,0,0,41,2,114,170,0,0,
+ 0,114,12,1,0,0,114,4,0,0,0,114,5,0,0,0,
+ 218,24,112,97,116,104,95,104,111,111,107,95,102,111,114,95,
+ 70,105,108,101,70,105,110,100,101,114,21,5,0,0,115,6,
+ 0,0,0,0,2,12,1,18,1,122,54,70,105,108,101,70,
+ 105,110,100,101,114,46,112,97,116,104,95,104,111,111,107,46,
+ 60,108,111,99,97,108,115,62,46,112,97,116,104,95,104,111,
+ 111,107,95,102,111,114,95,70,105,108,101,70,105,110,100,101,
+ 114,114,4,0,0,0,41,3,114,170,0,0,0,114,12,1,
+ 0,0,114,18,1,0,0,114,4,0,0,0,41,2,114,170,
+ 0,0,0,114,12,1,0,0,114,5,0,0,0,218,9,112,
+ 97,116,104,95,104,111,111,107,11,5,0,0,115,4,0,0,
+ 0,0,10,21,6,122,20,70,105,108,101,70,105,110,100,101,
+ 114,46,112,97,116,104,95,104,111,111,107,99,1,0,0,0,
+ 0,0,0,0,1,0,0,0,2,0,0,0,67,0,0,0,
+ 115,16,0,0,0,100,1,0,106,0,0,124,0,0,106,1,
+ 0,131,1,0,83,41,2,78,122,16,70,105,108,101,70,105,
+ 110,100,101,114,40,123,33,114,125,41,41,2,114,47,0,0,
+ 0,114,35,0,0,0,41,1,114,108,0,0,0,114,4,0,
+ 0,0,114,4,0,0,0,114,5,0,0,0,114,244,0,0,
+ 0,29,5,0,0,115,2,0,0,0,0,1,122,19,70,105,
+ 108,101,70,105,110,100,101,114,46,95,95,114,101,112,114,95,
+ 95,41,15,114,112,0,0,0,114,111,0,0,0,114,113,0,
+ 0,0,114,114,0,0,0,114,185,0,0,0,114,250,0,0,
+ 0,114,130,0,0,0,114,182,0,0,0,114,124,0,0,0,
+ 114,5,1,0,0,114,181,0,0,0,114,13,1,0,0,114,
+ 183,0,0,0,114,19,1,0,0,114,244,0,0,0,114,4,
+ 0,0,0,114,4,0,0,0,114,4,0,0,0,114,5,0,
+ 0,0,114,6,1,0,0,145,4,0,0,115,20,0,0,0,
+ 12,7,6,2,12,14,12,4,6,2,12,12,12,5,15,45,
+ 12,31,18,18,114,6,1,0,0,99,4,0,0,0,0,0,
+ 0,0,6,0,0,0,11,0,0,0,67,0,0,0,115,195,
+ 0,0,0,124,0,0,106,0,0,100,1,0,131,1,0,125,
+ 4,0,124,0,0,106,0,0,100,2,0,131,1,0,125,5,
+ 0,124,4,0,115,99,0,124,5,0,114,54,0,124,5,0,
+ 106,1,0,125,4,0,110,45,0,124,2,0,124,3,0,107,
+ 2,0,114,84,0,116,2,0,124,1,0,124,2,0,131,2,
+ 0,125,4,0,110,15,0,116,3,0,124,1,0,124,2,0,
+ 131,2,0,125,4,0,124,5,0,115,126,0,116,4,0,124,
+ 1,0,124,2,0,100,3,0,124,4,0,131,2,1,125,5,
+ 0,121,44,0,124,5,0,124,0,0,100,2,0,60,124,4,
+ 0,124,0,0,100,1,0,60,124,2,0,124,0,0,100,4,
+ 0,60,124,3,0,124,0,0,100,5,0,60,87,110,18,0,
+ 4,116,5,0,107,10,0,114,190,0,1,1,1,89,110,1,
+ 0,88,100,0,0,83,41,6,78,218,10,95,95,108,111,97,
+ 100,101,114,95,95,218,8,95,95,115,112,101,99,95,95,114,
+ 127,0,0,0,90,8,95,95,102,105,108,101,95,95,90,10,
+ 95,95,99,97,99,104,101,100,95,95,41,6,218,3,103,101,
+ 116,114,127,0,0,0,114,223,0,0,0,114,218,0,0,0,
+ 114,167,0,0,0,218,9,69,120,99,101,112,116,105,111,110,
+ 41,6,90,2,110,115,114,106,0,0,0,90,8,112,97,116,
+ 104,110,97,109,101,90,9,99,112,97,116,104,110,97,109,101,
+ 114,127,0,0,0,114,164,0,0,0,114,4,0,0,0,114,
+ 4,0,0,0,114,5,0,0,0,218,14,95,102,105,120,95,
+ 117,112,95,109,111,100,117,108,101,35,5,0,0,115,34,0,
+ 0,0,0,2,15,1,15,1,6,1,6,1,12,1,12,1,
+ 18,2,15,1,6,1,21,1,3,1,10,1,10,1,10,1,
+ 14,1,13,2,114,24,1,0,0,99,0,0,0,0,0,0,
+ 0,0,3,0,0,0,3,0,0,0,67,0,0,0,115,55,
+ 0,0,0,116,0,0,116,1,0,106,2,0,131,0,0,102,
+ 2,0,125,0,0,116,3,0,116,4,0,102,2,0,125,1,
+ 0,116,5,0,116,6,0,102,2,0,125,2,0,124,0,0,
+ 124,1,0,124,2,0,103,3,0,83,41,1,122,95,82,101,
+ 116,117,114,110,115,32,97,32,108,105,115,116,32,111,102,32,
+ 102,105,108,101,45,98,97,115,101,100,32,109,111,100,117,108,
+ 101,32,108,111,97,100,101,114,115,46,10,10,32,32,32,32,
+ 69,97,99,104,32,105,116,101,109,32,105,115,32,97,32,116,
+ 117,112,108,101,32,40,108,111,97,100,101,114,44,32,115,117,
+ 102,102,105,120,101,115,41,46,10,32,32,32,32,41,7,114,
+ 224,0,0,0,114,145,0,0,0,218,18,101,120,116,101,110,
+ 115,105,111,110,95,115,117,102,102,105,120,101,115,114,218,0,
+ 0,0,114,84,0,0,0,114,223,0,0,0,114,74,0,0,
+ 0,41,3,90,10,101,120,116,101,110,115,105,111,110,115,90,
+ 6,115,111,117,114,99,101,90,8,98,121,116,101,99,111,100,
+ 101,114,4,0,0,0,114,4,0,0,0,114,5,0,0,0,
+ 114,161,0,0,0,58,5,0,0,115,8,0,0,0,0,5,
+ 18,1,12,1,12,1,114,161,0,0,0,99,1,0,0,0,
+ 0,0,0,0,12,0,0,0,12,0,0,0,67,0,0,0,
+ 115,70,2,0,0,124,0,0,97,0,0,116,0,0,106,1,
+ 0,97,1,0,116,0,0,106,2,0,97,2,0,116,1,0,
+ 106,3,0,116,4,0,25,125,1,0,120,76,0,100,26,0,
+ 68,93,68,0,125,2,0,124,2,0,116,1,0,106,3,0,
+ 107,7,0,114,83,0,116,0,0,106,5,0,124,2,0,131,
+ 1,0,125,3,0,110,13,0,116,1,0,106,3,0,124,2,
+ 0,25,125,3,0,116,6,0,124,1,0,124,2,0,124,3,
+ 0,131,3,0,1,113,44,0,87,100,5,0,100,6,0,103,
+ 1,0,102,2,0,100,7,0,100,8,0,100,6,0,103,2,
+ 0,102,2,0,102,2,0,125,4,0,120,149,0,124,4,0,
+ 68,93,129,0,92,2,0,125,5,0,125,6,0,116,7,0,
+ 100,9,0,100,10,0,132,0,0,124,6,0,68,131,1,0,
+ 131,1,0,115,199,0,116,8,0,130,1,0,124,6,0,100,
+ 11,0,25,125,7,0,124,5,0,116,1,0,106,3,0,107,
+ 6,0,114,241,0,116,1,0,106,3,0,124,5,0,25,125,
+ 8,0,80,113,156,0,121,20,0,116,0,0,106,5,0,124,
+ 5,0,131,1,0,125,8,0,80,87,113,156,0,4,116,9,
+ 0,107,10,0,114,28,1,1,1,1,119,156,0,89,113,156,
+ 0,88,113,156,0,87,116,9,0,100,12,0,131,1,0,130,
+ 1,0,116,6,0,124,1,0,100,13,0,124,8,0,131,3,
+ 0,1,116,6,0,124,1,0,100,14,0,124,7,0,131,3,
+ 0,1,116,6,0,124,1,0,100,15,0,100,16,0,106,10,
+ 0,124,6,0,131,1,0,131,3,0,1,121,19,0,116,0,
+ 0,106,5,0,100,17,0,131,1,0,125,9,0,87,110,24,
+ 0,4,116,9,0,107,10,0,114,147,1,1,1,1,100,18,
+ 0,125,9,0,89,110,1,0,88,116,6,0,124,1,0,100,
+ 17,0,124,9,0,131,3,0,1,116,0,0,106,5,0,100,
+ 19,0,131,1,0,125,10,0,116,6,0,124,1,0,100,19,
+ 0,124,10,0,131,3,0,1,124,5,0,100,7,0,107,2,
+ 0,114,238,1,116,0,0,106,5,0,100,20,0,131,1,0,
+ 125,11,0,116,6,0,124,1,0,100,21,0,124,11,0,131,
+ 3,0,1,116,6,0,124,1,0,100,22,0,116,11,0,131,
+ 0,0,131,3,0,1,116,12,0,106,13,0,116,2,0,106,
+ 14,0,131,0,0,131,1,0,1,124,5,0,100,7,0,107,
+ 2,0,114,66,2,116,15,0,106,16,0,100,23,0,131,1,
+ 0,1,100,24,0,116,12,0,107,6,0,114,66,2,100,25,
+ 0,116,17,0,95,18,0,100,18,0,83,41,27,122,205,83,
+ 101,116,117,112,32,116,104,101,32,112,97,116,104,45,98,97,
+ 115,101,100,32,105,109,112,111,114,116,101,114,115,32,102,111,
+ 114,32,105,109,112,111,114,116,108,105,98,32,98,121,32,105,
+ 109,112,111,114,116,105,110,103,32,110,101,101,100,101,100,10,
+ 32,32,32,32,98,117,105,108,116,45,105,110,32,109,111,100,
+ 117,108,101,115,32,97,110,100,32,105,110,106,101,99,116,105,
+ 110,103,32,116,104,101,109,32,105,110,116,111,32,116,104,101,
+ 32,103,108,111,98,97,108,32,110,97,109,101,115,112,97,99,
+ 101,46,10,10,32,32,32,32,79,116,104,101,114,32,99,111,
+ 109,112,111,110,101,110,116,115,32,97,114,101,32,101,120,116,
+ 114,97,99,116,101,100,32,102,114,111,109,32,116,104,101,32,
+ 99,111,114,101,32,98,111,111,116,115,116,114,97,112,32,109,
+ 111,100,117,108,101,46,10,10,32,32,32,32,114,49,0,0,
+ 0,114,60,0,0,0,218,8,98,117,105,108,116,105,110,115,
+ 114,142,0,0,0,90,5,112,111,115,105,120,250,1,47,218,
+ 2,110,116,250,1,92,99,1,0,0,0,0,0,0,0,2,
+ 0,0,0,3,0,0,0,115,0,0,0,115,33,0,0,0,
+ 124,0,0,93,23,0,125,1,0,116,0,0,124,1,0,131,
+ 1,0,100,0,0,107,2,0,86,1,113,3,0,100,1,0,
+ 83,41,2,114,29,0,0,0,78,41,1,114,31,0,0,0,
+ 41,2,114,22,0,0,0,114,77,0,0,0,114,4,0,0,
+ 0,114,4,0,0,0,114,5,0,0,0,114,227,0,0,0,
+ 94,5,0,0,115,2,0,0,0,6,0,122,25,95,115,101,
+ 116,117,112,46,60,108,111,99,97,108,115,62,46,60,103,101,
+ 110,101,120,112,114,62,114,59,0,0,0,122,30,105,109,112,
+ 111,114,116,108,105,98,32,114,101,113,117,105,114,101,115,32,
+ 112,111,115,105,120,32,111,114,32,110,116,114,3,0,0,0,
+ 114,25,0,0,0,114,21,0,0,0,114,30,0,0,0,90,
+ 7,95,116,104,114,101,97,100,78,90,8,95,119,101,97,107,
+ 114,101,102,90,6,119,105,110,114,101,103,114,169,0,0,0,
+ 114,6,0,0,0,122,4,46,112,121,119,122,6,95,100,46,
+ 112,121,100,84,41,4,122,3,95,105,111,122,9,95,119,97,
+ 114,110,105,110,103,115,122,8,98,117,105,108,116,105,110,115,
+ 122,7,109,97,114,115,104,97,108,41,19,114,121,0,0,0,
+ 114,7,0,0,0,114,145,0,0,0,114,239,0,0,0,114,
+ 112,0,0,0,90,18,95,98,117,105,108,116,105,110,95,102,
+ 114,111,109,95,110,97,109,101,114,116,0,0,0,218,3,97,
+ 108,108,218,14,65,115,115,101,114,116,105,111,110,69,114,114,
+ 111,114,114,107,0,0,0,114,26,0,0,0,114,11,0,0,
+ 0,114,229,0,0,0,114,149,0,0,0,114,25,1,0,0,
+ 114,84,0,0,0,114,163,0,0,0,114,168,0,0,0,114,
+ 173,0,0,0,41,12,218,17,95,98,111,111,116,115,116,114,
+ 97,112,95,109,111,100,117,108,101,90,11,115,101,108,102,95,
+ 109,111,100,117,108,101,90,12,98,117,105,108,116,105,110,95,
+ 110,97,109,101,90,14,98,117,105,108,116,105,110,95,109,111,
+ 100,117,108,101,90,10,111,115,95,100,101,116,97,105,108,115,
+ 90,10,98,117,105,108,116,105,110,95,111,115,114,21,0,0,
+ 0,114,25,0,0,0,90,9,111,115,95,109,111,100,117,108,
+ 101,90,13,116,104,114,101,97,100,95,109,111,100,117,108,101,
+ 90,14,119,101,97,107,114,101,102,95,109,111,100,117,108,101,
+ 90,13,119,105,110,114,101,103,95,109,111,100,117,108,101,114,
+ 4,0,0,0,114,4,0,0,0,114,5,0,0,0,218,6,
+ 95,115,101,116,117,112,69,5,0,0,115,82,0,0,0,0,
+ 8,6,1,9,1,9,3,13,1,13,1,15,1,18,2,13,
+ 1,20,3,33,1,19,2,31,1,10,1,15,1,13,1,4,
+ 2,3,1,15,1,5,1,13,1,12,2,12,1,16,1,16,
+ 1,25,3,3,1,19,1,13,2,11,1,16,3,15,1,16,
+ 3,12,1,15,1,16,3,19,1,19,1,12,1,13,1,12,
+ 1,114,33,1,0,0,99,1,0,0,0,0,0,0,0,2,
+ 0,0,0,3,0,0,0,67,0,0,0,115,116,0,0,0,
+ 116,0,0,124,0,0,131,1,0,1,116,1,0,131,0,0,
+ 125,1,0,116,2,0,106,3,0,106,4,0,116,5,0,106,
+ 6,0,124,1,0,140,0,0,103,1,0,131,1,0,1,116,
+ 7,0,106,8,0,100,1,0,107,2,0,114,78,0,116,2,
+ 0,106,9,0,106,10,0,116,11,0,131,1,0,1,116,2,
+ 0,106,9,0,106,10,0,116,12,0,131,1,0,1,116,5,
+ 0,124,0,0,95,5,0,116,13,0,124,0,0,95,13,0,
+ 100,2,0,83,41,3,122,41,73,110,115,116,97,108,108,32,
+ 116,104,101,32,112,97,116,104,45,98,97,115,101,100,32,105,
+ 109,112,111,114,116,32,99,111,109,112,111,110,101,110,116,115,
+ 46,114,28,1,0,0,78,41,14,114,33,1,0,0,114,161,
+ 0,0,0,114,7,0,0,0,114,254,0,0,0,114,149,0,
+ 0,0,114,6,1,0,0,114,19,1,0,0,114,3,0,0,
+ 0,114,112,0,0,0,218,9,109,101,116,97,95,112,97,116,
+ 104,114,163,0,0,0,114,168,0,0,0,114,249,0,0,0,
+ 114,218,0,0,0,41,2,114,32,1,0,0,90,17,115,117,
+ 112,112,111,114,116,101,100,95,108,111,97,100,101,114,115,114,
+ 4,0,0,0,114,4,0,0,0,114,5,0,0,0,218,8,
+ 95,105,110,115,116,97,108,108,137,5,0,0,115,16,0,0,
+ 0,0,2,10,1,9,1,28,1,15,1,16,1,16,4,9,
+ 1,114,35,1,0,0,41,3,122,3,119,105,110,114,1,0,
+ 0,0,114,2,0,0,0,41,57,114,114,0,0,0,114,10,
+ 0,0,0,114,11,0,0,0,114,17,0,0,0,114,19,0,
+ 0,0,114,28,0,0,0,114,38,0,0,0,114,39,0,0,
+ 0,114,43,0,0,0,114,44,0,0,0,114,46,0,0,0,
+ 114,55,0,0,0,218,4,116,121,112,101,218,8,95,95,99,
+ 111,100,101,95,95,114,144,0,0,0,114,15,0,0,0,114,
+ 135,0,0,0,114,14,0,0,0,114,18,0,0,0,90,17,
+ 95,82,65,87,95,77,65,71,73,67,95,78,85,77,66,69,
+ 82,114,73,0,0,0,114,72,0,0,0,114,84,0,0,0,
+ 114,74,0,0,0,90,23,68,69,66,85,71,95,66,89,84,
+ 69,67,79,68,69,95,83,85,70,70,73,88,69,83,90,27,
+ 79,80,84,73,77,73,90,69,68,95,66,89,84,69,67,79,
+ 68,69,95,83,85,70,70,73,88,69,83,114,79,0,0,0,
+ 114,85,0,0,0,114,91,0,0,0,114,95,0,0,0,114,
+ 97,0,0,0,114,105,0,0,0,114,123,0,0,0,114,130,
+ 0,0,0,114,141,0,0,0,114,147,0,0,0,114,150,0,
+ 0,0,114,155,0,0,0,218,6,111,98,106,101,99,116,114,
+ 162,0,0,0,114,167,0,0,0,114,168,0,0,0,114,184,
+ 0,0,0,114,194,0,0,0,114,210,0,0,0,114,218,0,
+ 0,0,114,223,0,0,0,114,229,0,0,0,114,224,0,0,
+ 0,114,230,0,0,0,114,247,0,0,0,114,249,0,0,0,
+ 114,6,1,0,0,114,24,1,0,0,114,161,0,0,0,114,
+ 33,1,0,0,114,35,1,0,0,114,4,0,0,0,114,4,
+ 0,0,0,114,4,0,0,0,114,5,0,0,0,218,8,60,
+ 109,111,100,117,108,101,62,8,0,0,0,115,100,0,0,0,
+ 6,17,6,3,12,12,12,5,12,5,12,6,12,12,12,10,
+ 12,9,12,5,12,7,15,22,15,113,22,1,18,2,6,1,
+ 6,2,9,2,9,2,10,2,21,44,12,33,12,19,12,12,
+ 12,12,18,8,12,28,12,17,21,55,21,12,18,10,12,14,
+ 9,3,12,1,15,65,19,64,19,28,22,110,19,41,25,43,
+ 25,16,6,3,25,53,19,57,19,41,19,134,19,146,15,23,
+ 12,11,12,68,
+};
diff --git a/Python/marshal.c b/Python/marshal.c
index 6f0ee5e83e..5b8de99192 100644
--- a/Python/marshal.c
+++ b/Python/marshal.c
@@ -12,8 +12,7 @@
#include "longintrepr.h"
#include "code.h"
#include "marshal.h"
-
-#define ABS(x) ((x) < 0 ? -(x) : (x))
+#include "../Modules/hashtable.h"
/* High water mark to determine when the marshalled object is dangerously deep
* and risks coring the interpreter. When the object stack gets this deep,
@@ -21,7 +20,7 @@
* On Windows debug builds, reduce this value.
*/
#if defined(MS_WINDOWS) && defined(_DEBUG)
-#define MAX_MARSHAL_STACK_DEPTH 1500
+#define MAX_MARSHAL_STACK_DEPTH 1000
#else
#define MAX_MARSHAL_STACK_DEPTH 2000
#endif
@@ -66,54 +65,83 @@ typedef struct {
FILE *fp;
int error; /* see WFERR_* values */
int depth;
- /* If fp == NULL, the following are valid: */
- PyObject *readable; /* Stream-like object being read from */
PyObject *str;
- PyObject *current_filename;
char *ptr;
char *end;
char *buf;
- Py_ssize_t buf_size;
- PyObject *refs; /* dict on marshal, list on unmarshal */
+ _Py_hashtable_t *hashtable;
int version;
} WFILE;
-#define w_byte(c, p) if (((p)->fp)) putc((c), (p)->fp); \
- else if ((p)->ptr != (p)->end) *(p)->ptr++ = (c); \
- else w_more((c), p)
+#define w_byte(c, p) do { \
+ if ((p)->ptr != (p)->end || w_reserve((p), 1)) \
+ *(p)->ptr++ = (c); \
+ } while(0)
static void
-w_more(char c, WFILE *p)
+w_flush(WFILE *p)
+{
+ assert(p->fp != NULL);
+ fwrite(p->buf, 1, p->ptr - p->buf, p->fp);
+ p->ptr = p->buf;
+}
+
+static int
+w_reserve(WFILE *p, Py_ssize_t needed)
{
- Py_ssize_t size, newsize;
- if (p->str == NULL)
- return; /* An error already occurred */
+ Py_ssize_t pos, size, delta;
+ if (p->ptr == NULL)
+ return 0; /* An error already occurred */
+ if (p->fp != NULL) {
+ w_flush(p);
+ return needed <= p->end - p->ptr;
+ }
+ assert(p->str != NULL);
+ pos = p->ptr - p->buf;
size = PyBytes_Size(p->str);
- newsize = size + size + 1024;
- if (newsize > 32*1024*1024) {
- newsize = size + (size >> 3); /* 12.5% overallocation */
+ if (size > 16*1024*1024)
+ delta = (size >> 3); /* 12.5% overallocation */
+ else
+ delta = size + 1024;
+ delta = Py_MAX(delta, needed);
+ if (delta > PY_SSIZE_T_MAX - size) {
+ p->error = WFERR_NOMEMORY;
+ return 0;
}
- if (_PyBytes_Resize(&p->str, newsize) != 0) {
- p->ptr = p->end = NULL;
+ size += delta;
+ if (_PyBytes_Resize(&p->str, size) != 0) {
+ p->ptr = p->buf = p->end = NULL;
+ return 0;
}
else {
- p->ptr = PyBytes_AS_STRING((PyBytesObject *)p->str) + size;
- p->end =
- PyBytes_AS_STRING((PyBytesObject *)p->str) + newsize;
- *p->ptr++ = c;
+ p->buf = PyBytes_AS_STRING(p->str);
+ p->ptr = p->buf + pos;
+ p->end = p->buf + size;
+ return 1;
}
}
static void
w_string(const char *s, Py_ssize_t n, WFILE *p)
{
+ Py_ssize_t m;
+ if (!n || p->ptr == NULL)
+ return;
+ m = p->end - p->ptr;
if (p->fp != NULL) {
- fwrite(s, 1, n, p->fp);
+ if (n <= m) {
+ Py_MEMCPY(p->ptr, s, n);
+ p->ptr += n;
+ }
+ else {
+ w_flush(p);
+ fwrite(s, 1, n, p->fp);
+ }
}
else {
- while (--n >= 0) {
- w_byte(*s, p);
- s++;
+ if (n <= m || w_reserve(p, n - m)) {
+ Py_MEMCPY(p->ptr, s, n);
+ p->ptr += n;
}
}
}
@@ -192,7 +220,7 @@ w_PyLong(const PyLongObject *ob, char flag, WFILE *p)
}
/* set l to number of base PyLong_MARSHAL_BASE digits */
- n = ABS(Py_SIZE(ob));
+ n = Py_ABS(Py_SIZE(ob));
l = (n-1) * PyLong_MARSHAL_RATIO;
d = ob->ob_digit[n-1];
assert(d != 0); /* a PyLong is always normalized */
@@ -225,46 +253,38 @@ w_PyLong(const PyLongObject *ob, char flag, WFILE *p)
static int
w_ref(PyObject *v, char *flag, WFILE *p)
{
- PyObject *id;
- PyObject *idx;
+ _Py_hashtable_entry_t *entry;
+ int w;
- if (p->version < 3 || p->refs == NULL)
+ if (p->version < 3 || p->hashtable == NULL)
return 0; /* not writing object references */
/* if it has only one reference, it definitely isn't shared */
if (Py_REFCNT(v) == 1)
return 0;
- id = PyLong_FromVoidPtr((void*)v);
- if (id == NULL)
- goto err;
- idx = PyDict_GetItem(p->refs, id);
- if (idx != NULL) {
+ entry = _Py_hashtable_get_entry(p->hashtable, v);
+ if (entry != NULL) {
/* write the reference index to the stream */
- long w = PyLong_AsLong(idx);
- Py_DECREF(id);
- if (w == -1 && PyErr_Occurred()) {
- goto err;
- }
+ _Py_HASHTABLE_ENTRY_READ_DATA(p->hashtable, &w, sizeof(w), entry);
/* we don't store "long" indices in the dict */
assert(0 <= w && w <= 0x7fffffff);
w_byte(TYPE_REF, p);
w_long(w, p);
return 1;
} else {
- int ok;
- Py_ssize_t s = PyDict_Size(p->refs);
+ size_t s = p->hashtable->entries;
/* we don't support long indices */
if (s >= 0x7fffffff) {
PyErr_SetString(PyExc_ValueError, "too many objects");
goto err;
}
- idx = PyLong_FromSsize_t(s);
- ok = idx && PyDict_SetItem(p->refs, id, idx) == 0;
- Py_DECREF(id);
- Py_XDECREF(idx);
- if (!ok)
+ w = (int)s;
+ Py_INCREF(v);
+ if (_Py_HASHTABLE_SET(p->hashtable, v, w) < 0) {
+ Py_DECREF(v);
goto err;
+ }
*flag |= FLAG_REF;
return 0;
}
@@ -547,37 +567,81 @@ w_complex_object(PyObject *v, char flag, WFILE *p)
}
}
+static int
+w_init_refs(WFILE *wf, int version)
+{
+ if (version >= 3) {
+ wf->hashtable = _Py_hashtable_new(sizeof(int), _Py_hashtable_hash_ptr,
+ _Py_hashtable_compare_direct);
+ if (wf->hashtable == NULL) {
+ PyErr_NoMemory();
+ return -1;
+ }
+ }
+ return 0;
+}
+
+static int
+w_decref_entry(_Py_hashtable_entry_t *entry, void *Py_UNUSED(data))
+{
+ Py_XDECREF(entry->key);
+ return 0;
+}
+
+static void
+w_clear_refs(WFILE *wf)
+{
+ if (wf->hashtable != NULL) {
+ _Py_hashtable_foreach(wf->hashtable, w_decref_entry, NULL);
+ _Py_hashtable_destroy(wf->hashtable);
+ }
+}
+
/* version currently has no effect for writing ints. */
void
PyMarshal_WriteLongToFile(long x, FILE *fp, int version)
{
+ char buf[4];
WFILE wf;
+ memset(&wf, 0, sizeof(wf));
wf.fp = fp;
+ wf.ptr = wf.buf = buf;
+ wf.end = wf.ptr + sizeof(buf);
wf.error = WFERR_OK;
- wf.depth = 0;
- wf.refs = NULL;
wf.version = version;
w_long(x, &wf);
+ w_flush(&wf);
}
void
PyMarshal_WriteObjectToFile(PyObject *x, FILE *fp, int version)
{
+ char buf[BUFSIZ];
WFILE wf;
+ memset(&wf, 0, sizeof(wf));
wf.fp = fp;
+ wf.ptr = wf.buf = buf;
+ wf.end = wf.ptr + sizeof(buf);
wf.error = WFERR_OK;
- wf.depth = 0;
- if (version >= 3) {
- if ((wf.refs = PyDict_New()) == NULL)
- return; /* caller mush check PyErr_Occurred() */
- } else
- wf.refs = NULL;
wf.version = version;
+ if (w_init_refs(&wf, version))
+ return; /* caller mush check PyErr_Occurred() */
w_object(x, &wf);
- Py_XDECREF(wf.refs);
+ w_clear_refs(&wf);
+ w_flush(&wf);
}
-typedef WFILE RFILE; /* Same struct with different invariants */
+typedef struct {
+ FILE *fp;
+ int depth;
+ PyObject *readable; /* Stream-like object being read from */
+ PyObject *current_filename;
+ char *ptr;
+ char *end;
+ char *buf;
+ Py_ssize_t buf_size;
+ PyObject *refs; /* a list */
+} RFILE;
static char *
r_string(Py_ssize_t n, RFILE *p)
@@ -727,8 +791,8 @@ r_PyLong(RFILE *p)
return NULL;
}
- size = 1 + (ABS(n) - 1) / PyLong_MARSHAL_RATIO;
- shorts_in_top_digit = 1 + (ABS(n) - 1) % PyLong_MARSHAL_RATIO;
+ size = 1 + (Py_ABS(n) - 1) / PyLong_MARSHAL_RATIO;
+ shorts_in_top_digit = 1 + (Py_ABS(n) - 1) % PyLong_MARSHAL_RATIO;
ob = _PyLong_New(size);
if (ob == NULL)
return NULL;
@@ -1417,18 +1481,20 @@ PyMarshal_ReadLongFromFile(FILE *fp)
return res;
}
-#ifdef HAVE_FSTAT
-/* Return size of file in bytes; < 0 if unknown. */
+/* Return size of file in bytes; < 0 if unknown or INT_MAX if too big */
static off_t
getfilesize(FILE *fp)
{
- struct stat st;
- if (fstat(fileno(fp), &st) != 0)
+ struct _Py_stat_struct st;
+ if (_Py_fstat_noraise(fileno(fp), &st) != 0)
return -1;
+#if SIZEOF_OFF_T == 4
+ else if (st.st_size >= INT_MAX)
+ return (off_t)INT_MAX;
+#endif
else
- return st.st_size;
+ return (off_t)st.st_size;
}
-#endif
/* If we can get the size of the file up-front, and it's reasonably small,
* read it in one gulp and delegate to ...FromString() instead. Much quicker
@@ -1441,7 +1507,6 @@ PyMarshal_ReadLastObjectFromFile(FILE *fp)
{
/* REASONABLE_FILE_LIMIT is by defn something big enough for Tkinter.pyc. */
#define REASONABLE_FILE_LIMIT (1L << 18)
-#ifdef HAVE_FSTAT
off_t filesize;
filesize = getfilesize(fp);
if (filesize > 0 && filesize <= REASONABLE_FILE_LIMIT) {
@@ -1454,7 +1519,6 @@ PyMarshal_ReadLastObjectFromFile(FILE *fp)
}
}
-#endif
/* We don't have fstat, or we do but the file is larger than
* REASONABLE_FILE_LIMIT or malloc failed -- read a byte at a time.
*/
@@ -1511,25 +1575,20 @@ PyMarshal_WriteObjectToString(PyObject *x, int version)
{
WFILE wf;
- wf.fp = NULL;
- wf.readable = NULL;
+ memset(&wf, 0, sizeof(wf));
wf.str = PyBytes_FromStringAndSize((char *)NULL, 50);
if (wf.str == NULL)
return NULL;
- wf.ptr = PyBytes_AS_STRING((PyBytesObject *)wf.str);
+ wf.ptr = wf.buf = PyBytes_AS_STRING((PyBytesObject *)wf.str);
wf.end = wf.ptr + PyBytes_Size(wf.str);
wf.error = WFERR_OK;
- wf.depth = 0;
wf.version = version;
- if (version >= 3) {
- if ((wf.refs = PyDict_New()) == NULL) {
- Py_DECREF(wf.str);
- return NULL;
- }
- } else
- wf.refs = NULL;
+ if (w_init_refs(&wf, version)) {
+ Py_DECREF(wf.str);
+ return NULL;
+ }
w_object(x, &wf);
- Py_XDECREF(wf.refs);
+ w_clear_refs(&wf);
if (wf.str != NULL) {
char *base = PyBytes_AS_STRING((PyBytesObject *)wf.str);
if (wf.ptr - base > PY_SSIZE_T_MAX) {
@@ -1585,7 +1644,7 @@ The file must be an open file object such as sys.stdout or returned by\n\
open() or os.popen(). It must be opened in binary mode ('wb' or 'w+b').\n\
\n\
If the value has (or contains an object that has) an unsupported type, a\n\
-ValueError exception is raised — but garbage data will also be written\n\
+ValueError exception is raised - but garbage data will also be written\n\
to the file. The object will not be properly read back by load()\n\
\n\
The version argument indicates the data format that dump should use.");
@@ -1636,7 +1695,7 @@ PyDoc_STRVAR(load_doc,
"load(file)\n\
\n\
Read one value from the open file and return it. If no valid value is\n\
-read (e.g. because the data has a different Python version’s\n\
+read (e.g. because the data has a different Python version's\n\
incompatible marshal format), raise EOFError, ValueError or TypeError.\n\
The file must be an open file object opened in binary mode ('rb' or\n\
'r+b').\n\
diff --git a/Python/modsupport.c b/Python/modsupport.c
index 6c938ddd79..0d093711f5 100644
--- a/Python/modsupport.c
+++ b/Python/modsupport.c
@@ -63,48 +63,84 @@ static PyObject *do_mkdict(const char**, va_list *, int, int, int);
static PyObject *do_mkvalue(const char**, va_list *, int);
+static void
+do_ignore(const char **p_format, va_list *p_va, int endchar, int n, int flags)
+{
+ PyObject *v;
+ int i;
+ assert(PyErr_Occurred());
+ v = PyTuple_New(n);
+ for (i = 0; i < n; i++) {
+ PyObject *exception, *value, *tb, *w;
+
+ PyErr_Fetch(&exception, &value, &tb);
+ w = do_mkvalue(p_format, p_va, flags);
+ PyErr_Restore(exception, value, tb);
+ if (w != NULL) {
+ if (v != NULL) {
+ PyTuple_SET_ITEM(v, i, w);
+ }
+ else {
+ Py_DECREF(w);
+ }
+ }
+ }
+ Py_XDECREF(v);
+ if (**p_format != endchar) {
+ PyErr_SetString(PyExc_SystemError,
+ "Unmatched paren in format");
+ return;
+ }
+ if (endchar)
+ ++*p_format;
+}
+
static PyObject *
do_mkdict(const char **p_format, va_list *p_va, int endchar, int n, int flags)
{
PyObject *d;
int i;
- int itemfailed = 0;
if (n < 0)
return NULL;
- if ((d = PyDict_New()) == NULL)
+ if (n % 2) {
+ PyErr_SetString(PyExc_SystemError,
+ "Bad dict format");
+ do_ignore(p_format, p_va, endchar, n, flags);
return NULL;
+ }
/* Note that we can't bail immediately on error as this will leak
refcounts on any 'N' arguments. */
+ if ((d = PyDict_New()) == NULL) {
+ do_ignore(p_format, p_va, endchar, n, flags);
+ return NULL;
+ }
for (i = 0; i < n; i+= 2) {
PyObject *k, *v;
- int err;
+
k = do_mkvalue(p_format, p_va, flags);
if (k == NULL) {
- itemfailed = 1;
- Py_INCREF(Py_None);
- k = Py_None;
+ do_ignore(p_format, p_va, endchar, n - i - 1, flags);
+ Py_DECREF(d);
+ return NULL;
}
v = do_mkvalue(p_format, p_va, flags);
- if (v == NULL) {
- itemfailed = 1;
- Py_INCREF(Py_None);
- v = Py_None;
- }
- err = PyDict_SetItem(d, k, v);
- Py_DECREF(k);
- Py_DECREF(v);
- if (err < 0 || itemfailed) {
+ if (v == NULL || PyDict_SetItem(d, k, v) < 0) {
+ do_ignore(p_format, p_va, endchar, n - i - 2, flags);
+ Py_DECREF(k);
+ Py_XDECREF(v);
Py_DECREF(d);
return NULL;
}
+ Py_DECREF(k);
+ Py_DECREF(v);
}
- if (d != NULL && **p_format != endchar) {
+ if (**p_format != endchar) {
Py_DECREF(d);
- d = NULL;
PyErr_SetString(PyExc_SystemError,
"Unmatched paren in format");
+ return NULL;
}
- else if (endchar)
+ if (endchar)
++*p_format;
return d;
}
@@ -114,29 +150,24 @@ do_mklist(const char **p_format, va_list *p_va, int endchar, int n, int flags)
{
PyObject *v;
int i;
- int itemfailed = 0;
if (n < 0)
return NULL;
- v = PyList_New(n);
- if (v == NULL)
- return NULL;
/* Note that we can't bail immediately on error as this will leak
refcounts on any 'N' arguments. */
+ v = PyList_New(n);
+ if (v == NULL) {
+ do_ignore(p_format, p_va, endchar, n, flags);
+ return NULL;
+ }
for (i = 0; i < n; i++) {
PyObject *w = do_mkvalue(p_format, p_va, flags);
if (w == NULL) {
- itemfailed = 1;
- Py_INCREF(Py_None);
- w = Py_None;
+ do_ignore(p_format, p_va, endchar, n - i - 1, flags);
+ Py_DECREF(v);
+ return NULL;
}
PyList_SET_ITEM(v, i, w);
}
-
- if (itemfailed) {
- /* do_mkvalue() should have already set an error */
- Py_DECREF(v);
- return NULL;
- }
if (**p_format != endchar) {
Py_DECREF(v);
PyErr_SetString(PyExc_SystemError,
@@ -153,37 +184,23 @@ do_mktuple(const char **p_format, va_list *p_va, int endchar, int n, int flags)
{
PyObject *v;
int i;
- int itemfailed = 0;
if (n < 0)
return NULL;
- if ((v = PyTuple_New(n)) == NULL)
- return NULL;
/* Note that we can't bail immediately on error as this will leak
refcounts on any 'N' arguments. */
+ if ((v = PyTuple_New(n)) == NULL) {
+ do_ignore(p_format, p_va, endchar, n, flags);
+ return NULL;
+ }
for (i = 0; i < n; i++) {
- PyObject *w;
-
- if (itemfailed) {
- PyObject *exception, *value, *tb;
- PyErr_Fetch(&exception, &value, &tb);
- w = do_mkvalue(p_format, p_va, flags);
- PyErr_Restore(exception, value, tb);
- }
- else {
- w = do_mkvalue(p_format, p_va, flags);
- }
+ PyObject *w = do_mkvalue(p_format, p_va, flags);
if (w == NULL) {
- itemfailed = 1;
- Py_INCREF(Py_None);
- w = Py_None;
+ do_ignore(p_format, p_va, endchar, n - i - 1, flags);
+ Py_DECREF(v);
+ return NULL;
}
PyTuple_SET_ITEM(v, i, w);
}
- if (itemfailed) {
- /* do_mkvalue() should have already set an error */
- Py_DECREF(v);
- return NULL;
- }
if (**p_format != endchar) {
Py_DECREF(v);
PyErr_SetString(PyExc_SystemError,
diff --git a/Python/opcode_targets.h b/Python/opcode_targets.h
index f90a17a7ee..19259e1a71 100644
--- a/Python/opcode_targets.h
+++ b/Python/opcode_targets.h
@@ -15,8 +15,8 @@ static void *opcode_targets[256] = {
&&_unknown_opcode,
&&_unknown_opcode,
&&TARGET_UNARY_INVERT,
- &&_unknown_opcode,
- &&_unknown_opcode,
+ &&TARGET_BINARY_MATRIX_MULTIPLY,
+ &&TARGET_INPLACE_MATRIX_MULTIPLY,
&&_unknown_opcode,
&&TARGET_BINARY_POWER,
&&TARGET_BINARY_MULTIPLY,
@@ -49,11 +49,11 @@ static void *opcode_targets[256] = {
&&_unknown_opcode,
&&_unknown_opcode,
&&_unknown_opcode,
+ &&TARGET_GET_AITER,
+ &&TARGET_GET_ANEXT,
+ &&TARGET_BEFORE_ASYNC_WITH,
&&_unknown_opcode,
&&_unknown_opcode,
- &&_unknown_opcode,
- &&_unknown_opcode,
- &&TARGET_STORE_MAP,
&&TARGET_INPLACE_ADD,
&&TARGET_INPLACE_SUBTRACT,
&&TARGET_INPLACE_MULTIPLY,
@@ -68,11 +68,11 @@ static void *opcode_targets[256] = {
&&TARGET_BINARY_OR,
&&TARGET_INPLACE_POWER,
&&TARGET_GET_ITER,
- &&_unknown_opcode,
+ &&TARGET_GET_YIELD_FROM_ITER,
&&TARGET_PRINT_EXPR,
&&TARGET_LOAD_BUILD_CLASS,
&&TARGET_YIELD_FROM,
- &&_unknown_opcode,
+ &&TARGET_GET_AWAITABLE,
&&_unknown_opcode,
&&TARGET_INPLACE_LSHIFT,
&&TARGET_INPLACE_RSHIFT,
@@ -80,8 +80,8 @@ static void *opcode_targets[256] = {
&&TARGET_INPLACE_XOR,
&&TARGET_INPLACE_OR,
&&TARGET_BREAK_LOOP,
- &&TARGET_WITH_CLEANUP,
- &&_unknown_opcode,
+ &&TARGET_WITH_CLEANUP_START,
+ &&TARGET_WITH_CLEANUP_FINISH,
&&TARGET_RETURN_VALUE,
&&TARGET_IMPORT_STAR,
&&_unknown_opcode,
@@ -148,12 +148,12 @@ static void *opcode_targets[256] = {
&&TARGET_SET_ADD,
&&TARGET_MAP_ADD,
&&TARGET_LOAD_CLASSDEREF,
- &&_unknown_opcode,
- &&_unknown_opcode,
- &&_unknown_opcode,
- &&_unknown_opcode,
- &&_unknown_opcode,
- &&_unknown_opcode,
+ &&TARGET_BUILD_LIST_UNPACK,
+ &&TARGET_BUILD_MAP_UNPACK,
+ &&TARGET_BUILD_MAP_UNPACK_WITH_CALL,
+ &&TARGET_BUILD_TUPLE_UNPACK,
+ &&TARGET_BUILD_SET_UNPACK,
+ &&TARGET_SETUP_ASYNC_WITH,
&&_unknown_opcode,
&&_unknown_opcode,
&&_unknown_opcode,
diff --git a/Python/peephole.c b/Python/peephole.c
index c56c8fcc23..4e657fa176 100644
--- a/Python/peephole.c
+++ b/Python/peephole.c
@@ -18,7 +18,11 @@
|| op==JUMP_IF_FALSE_OR_POP || op==JUMP_IF_TRUE_OR_POP)
#define JUMPS_ON_TRUE(op) (op==POP_JUMP_IF_TRUE || op==JUMP_IF_TRUE_OR_POP)
#define GETJUMPTGT(arr, i) (GETARG(arr,i) + (ABSOLUTE_JUMP(arr[i]) ? 0 : i+3))
-#define SETARG(arr, i, val) arr[i+2] = val>>8; arr[i+1] = val & 255
+#define SETARG(arr, i, val) do { \
+ assert(0 <= val && val <= 0xffff); \
+ arr[i+2] = (unsigned char)(((unsigned int)val)>>8); \
+ arr[i+1] = (unsigned char)(((unsigned int)val) & 255); \
+} while(0)
#define CODESIZE(op) (HAS_ARG(op) ? 3 : 1)
#define ISBASICBLOCK(blocks, start, bytes) \
(blocks[start]==blocks[start+bytes-1])
@@ -315,6 +319,7 @@ markblocks(unsigned char *code, Py_ssize_t len)
case SETUP_EXCEPT:
case SETUP_FINALLY:
case SETUP_WITH:
+ case SETUP_ASYNC_WITH:
j = GETJUMPTGT(code, i);
blocks[j] = 1;
break;
@@ -339,7 +344,7 @@ markblocks(unsigned char *code, Py_ssize_t len)
appear before MAKE_FUNCTION; in this case both opcodes are skipped.
EXTENDED_ARG preceding any other opcode causes the optimizer to bail.
- Optimizations are restricted to simple transformations occuring within a
+ Optimizations are restricted to simple transformations occurring within a
single basic block. All transformations keep the code size the same or
smaller. For those that reduce size, the gaps are initially filled with
NOPs. Later those NOPs are removed and the jump addresses retargeted in
@@ -355,7 +360,8 @@ PyCode_Optimize(PyObject *code, PyObject* consts, PyObject *names,
unsigned char *codestr = NULL;
unsigned char *lineno;
int *addrmap = NULL;
- int new_line, cum_orig_line, last_line, tabsiz;
+ int new_line, cum_orig_line, last_line;
+ Py_ssize_t tabsiz;
PyObject **const_stack = NULL;
Py_ssize_t *load_const_stack = NULL;
Py_ssize_t const_stack_top = -1;
@@ -615,6 +621,7 @@ PyCode_Optimize(PyObject *code, PyObject* consts, PyObject *names,
case SETUP_EXCEPT:
case SETUP_FINALLY:
case SETUP_WITH:
+ case SETUP_ASYNC_WITH:
tgt = GETJUMPTGT(codestr, i);
/* Replace JUMP_* to a RETURN into just a RETURN */
if (UNCONDITIONAL_JUMP(opcode) &&
@@ -660,7 +667,8 @@ PyCode_Optimize(PyObject *code, PyObject* consts, PyObject *names,
/* Fixup linenotab */
for (i=0, nops=0 ; i<codelen ; i += CODESIZE(codestr[i])) {
- addrmap[i] = i - nops;
+ assert(i - nops <= INT_MAX);
+ addrmap[i] = (int)(i - nops);
if (codestr[i] == NOP)
nops++;
}
@@ -698,6 +706,7 @@ PyCode_Optimize(PyObject *code, PyObject* consts, PyObject *names,
case SETUP_EXCEPT:
case SETUP_FINALLY:
case SETUP_WITH:
+ case SETUP_ASYNC_WITH:
j = addrmap[GETARG(codestr, i) + i + 3] - addrmap[i] - 3;
SETARG(codestr, i, j);
break;
diff --git a/Python/pyfpe.c b/Python/pyfpe.c
index 4b7f5bae15..ab0ef83ead 100644
--- a/Python/pyfpe.c
+++ b/Python/pyfpe.c
@@ -1,6 +1,6 @@
#include "pyconfig.h"
#include "pyfpe.h"
-/*
+/*
* The signal handler for SIGFPE is actually declared in an external
* module fpectl, or as preferred by the user. These variable
* definitions are required in order to compile Python without
@@ -13,7 +13,7 @@ jmp_buf PyFPE_jbuf;
int PyFPE_counter = 0;
#endif
-/* Have this outside the above #ifdef, since some picky ANSI compilers issue a
+/* Have this outside the above #ifdef, since some picky ANSI compilers issue a
warning when compiling an empty file. */
double
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
new file mode 100644
index 0000000000..ce52990496
--- /dev/null
+++ b/Python/pylifecycle.c
@@ -0,0 +1,1597 @@
+/* Python interpreter top-level routines, including init/exit */
+
+#include "Python.h"
+
+#include "Python-ast.h"
+#undef Yield /* undefine macro conflicting with winbase.h */
+#include "grammar.h"
+#include "node.h"
+#include "token.h"
+#include "parsetok.h"
+#include "errcode.h"
+#include "code.h"
+#include "symtable.h"
+#include "ast.h"
+#include "marshal.h"
+#include "osdefs.h"
+#include <locale.h>
+
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+
+#ifdef MS_WINDOWS
+#include "malloc.h" /* for alloca */
+#endif
+
+#ifdef HAVE_LANGINFO_H
+#include <langinfo.h>
+#endif
+
+#ifdef MS_WINDOWS
+#undef BYTE
+#include "windows.h"
+#endif
+
+_Py_IDENTIFIER(flush);
+_Py_IDENTIFIER(name);
+_Py_IDENTIFIER(stdin);
+_Py_IDENTIFIER(stdout);
+_Py_IDENTIFIER(stderr);
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern wchar_t *Py_GetPath(void);
+
+extern grammar _PyParser_Grammar; /* From graminit.c */
+
+/* Forward */
+static void initmain(PyInterpreterState *interp);
+static int initfsencoding(PyInterpreterState *interp);
+static void initsite(void);
+static int initstdio(void);
+static void initsigs(void);
+static void call_py_exitfuncs(void);
+static void wait_for_thread_shutdown(void);
+static void call_ll_exitfuncs(void);
+extern int _PyUnicode_Init(void);
+extern int _PyStructSequence_Init(void);
+extern void _PyUnicode_Fini(void);
+extern int _PyLong_Init(void);
+extern void PyLong_Fini(void);
+extern int _PyFaulthandler_Init(void);
+extern void _PyFaulthandler_Fini(void);
+extern void _PyHash_Fini(void);
+extern int _PyTraceMalloc_Init(void);
+extern int _PyTraceMalloc_Fini(void);
+
+#ifdef WITH_THREAD
+extern void _PyGILState_Init(PyInterpreterState *, PyThreadState *);
+extern void _PyGILState_Fini(void);
+#endif /* WITH_THREAD */
+
+/* Global configuration variable declarations are in pydebug.h */
+/* XXX (ncoghlan): move those declarations to pylifecycle.h? */
+int Py_DebugFlag; /* Needed by parser.c */
+int Py_VerboseFlag; /* Needed by import.c */
+int Py_QuietFlag; /* Needed by sysmodule.c */
+int Py_InteractiveFlag; /* Needed by Py_FdIsInteractive() below */
+int Py_InspectFlag; /* Needed to determine whether to exit at SystemExit */
+int Py_OptimizeFlag = 0; /* Needed by compile.c */
+int Py_NoSiteFlag; /* Suppress 'import site' */
+int Py_BytesWarningFlag; /* Warn on str(bytes) and str(buffer) */
+int Py_UseClassExceptionsFlag = 1; /* Needed by bltinmodule.c: deprecated */
+int Py_FrozenFlag; /* Needed by getpath.c */
+int Py_IgnoreEnvironmentFlag; /* e.g. PYTHONPATH, PYTHONHOME */
+int Py_DontWriteBytecodeFlag; /* Suppress writing bytecode files (*.py[co]) */
+int Py_NoUserSiteDirectory = 0; /* for -s and site.py */
+int Py_UnbufferedStdioFlag = 0; /* Unbuffered binary std{in,out,err} */
+int Py_HashRandomizationFlag = 0; /* for -R and PYTHONHASHSEED */
+int Py_IsolatedFlag = 0; /* for -I, isolate from user's env */
+
+PyThreadState *_Py_Finalizing = NULL;
+
+/* Hack to force loading of object files */
+int (*_PyOS_mystrnicmp_hack)(const char *, const char *, Py_ssize_t) = \
+ PyOS_mystrnicmp; /* Python/pystrcmp.o */
+
+/* PyModule_GetWarningsModule is no longer necessary as of 2.6
+since _warnings is builtin. This API should not be used. */
+PyObject *
+PyModule_GetWarningsModule(void)
+{
+ return PyImport_ImportModule("warnings");
+}
+
+static int initialized = 0;
+
+/* API to access the initialized flag -- useful for esoteric use */
+
+int
+Py_IsInitialized(void)
+{
+ return initialized;
+}
+
+/* Helper to allow an embedding application to override the normal
+ * mechanism that attempts to figure out an appropriate IO encoding
+ */
+
+static char *_Py_StandardStreamEncoding = NULL;
+static char *_Py_StandardStreamErrors = NULL;
+
+int
+Py_SetStandardStreamEncoding(const char *encoding, const char *errors)
+{
+ if (Py_IsInitialized()) {
+ /* This is too late to have any effect */
+ return -1;
+ }
+ /* Can't call PyErr_NoMemory() on errors, as Python hasn't been
+ * initialised yet.
+ *
+ * However, the raw memory allocators are initialised appropriately
+ * as C static variables, so _PyMem_RawStrdup is OK even though
+ * Py_Initialize hasn't been called yet.
+ */
+ if (encoding) {
+ _Py_StandardStreamEncoding = _PyMem_RawStrdup(encoding);
+ if (!_Py_StandardStreamEncoding) {
+ return -2;
+ }
+ }
+ if (errors) {
+ _Py_StandardStreamErrors = _PyMem_RawStrdup(errors);
+ if (!_Py_StandardStreamErrors) {
+ if (_Py_StandardStreamEncoding) {
+ PyMem_RawFree(_Py_StandardStreamEncoding);
+ }
+ return -3;
+ }
+ }
+ return 0;
+}
+
+/* Global initializations. Can be undone by Py_Finalize(). Don't
+ call this twice without an intervening Py_Finalize() call. When
+ initializations fail, a fatal error is issued and the function does
+ not return. On return, the first thread and interpreter state have
+ been created.
+
+ Locking: you must hold the interpreter lock while calling this.
+ (If the lock has not yet been initialized, that's equivalent to
+ having the lock, but you cannot use multiple threads.)
+
+*/
+
+static int
+add_flag(int flag, const char *envs)
+{
+ int env = atoi(envs);
+ if (flag < env)
+ flag = env;
+ if (flag < 1)
+ flag = 1;
+ return flag;
+}
+
+static char*
+get_codec_name(const char *encoding)
+{
+ char *name_utf8, *name_str;
+ PyObject *codec, *name = NULL;
+
+ codec = _PyCodec_Lookup(encoding);
+ if (!codec)
+ goto error;
+
+ name = _PyObject_GetAttrId(codec, &PyId_name);
+ Py_CLEAR(codec);
+ if (!name)
+ goto error;
+
+ name_utf8 = _PyUnicode_AsString(name);
+ if (name_utf8 == NULL)
+ goto error;
+ name_str = _PyMem_RawStrdup(name_utf8);
+ Py_DECREF(name);
+ if (name_str == NULL) {
+ PyErr_NoMemory();
+ return NULL;
+ }
+ return name_str;
+
+error:
+ Py_XDECREF(codec);
+ Py_XDECREF(name);
+ return NULL;
+}
+
+static char*
+get_locale_encoding(void)
+{
+#ifdef MS_WINDOWS
+ char codepage[100];
+ PyOS_snprintf(codepage, sizeof(codepage), "cp%d", GetACP());
+ return get_codec_name(codepage);
+#elif defined(HAVE_LANGINFO_H) && defined(CODESET)
+ char* codeset = nl_langinfo(CODESET);
+ if (!codeset || codeset[0] == '\0') {
+ PyErr_SetString(PyExc_ValueError, "CODESET is not set or empty");
+ return NULL;
+ }
+ return get_codec_name(codeset);
+#else
+ PyErr_SetNone(PyExc_NotImplementedError);
+ return NULL;
+#endif
+}
+
+static void
+import_init(PyInterpreterState *interp, PyObject *sysmod)
+{
+ PyObject *importlib;
+ PyObject *impmod;
+ PyObject *sys_modules;
+ PyObject *value;
+
+ /* Import _importlib through its frozen version, _frozen_importlib. */
+ if (PyImport_ImportFrozenModule("_frozen_importlib") <= 0) {
+ Py_FatalError("Py_Initialize: can't import _frozen_importlib");
+ }
+ else if (Py_VerboseFlag) {
+ PySys_FormatStderr("import _frozen_importlib # frozen\n");
+ }
+ importlib = PyImport_AddModule("_frozen_importlib");
+ if (importlib == NULL) {
+ Py_FatalError("Py_Initialize: couldn't get _frozen_importlib from "
+ "sys.modules");
+ }
+ interp->importlib = importlib;
+ Py_INCREF(interp->importlib);
+
+ /* Import the _imp module */
+ impmod = PyInit_imp();
+ if (impmod == NULL) {
+ Py_FatalError("Py_Initialize: can't import _imp");
+ }
+ else if (Py_VerboseFlag) {
+ PySys_FormatStderr("import _imp # builtin\n");
+ }
+ sys_modules = PyImport_GetModuleDict();
+ if (Py_VerboseFlag) {
+ PySys_FormatStderr("import sys # builtin\n");
+ }
+ if (PyDict_SetItemString(sys_modules, "_imp", impmod) < 0) {
+ Py_FatalError("Py_Initialize: can't save _imp to sys.modules");
+ }
+
+ /* Install importlib as the implementation of import */
+ value = PyObject_CallMethod(importlib, "_install", "OO", sysmod, impmod);
+ if (value == NULL) {
+ PyErr_Print();
+ Py_FatalError("Py_Initialize: importlib install failed");
+ }
+ Py_DECREF(value);
+ Py_DECREF(impmod);
+
+ _PyImportZip_Init();
+}
+
+
+void
+_Py_InitializeEx_Private(int install_sigs, int install_importlib)
+{
+ PyInterpreterState *interp;
+ PyThreadState *tstate;
+ PyObject *bimod, *sysmod, *pstderr;
+ char *p;
+ extern void _Py_ReadyTypes(void);
+
+ if (initialized)
+ return;
+ initialized = 1;
+ _Py_Finalizing = NULL;
+
+#if defined(HAVE_LANGINFO_H) && defined(HAVE_SETLOCALE)
+ /* Set up the LC_CTYPE locale, so we can obtain
+ the locale's charset without having to switch
+ locales. */
+ setlocale(LC_CTYPE, "");
+#endif
+
+ if ((p = Py_GETENV("PYTHONDEBUG")) && *p != '\0')
+ Py_DebugFlag = add_flag(Py_DebugFlag, p);
+ if ((p = Py_GETENV("PYTHONVERBOSE")) && *p != '\0')
+ Py_VerboseFlag = add_flag(Py_VerboseFlag, p);
+ if ((p = Py_GETENV("PYTHONOPTIMIZE")) && *p != '\0')
+ Py_OptimizeFlag = add_flag(Py_OptimizeFlag, p);
+ if ((p = Py_GETENV("PYTHONDONTWRITEBYTECODE")) && *p != '\0')
+ Py_DontWriteBytecodeFlag = add_flag(Py_DontWriteBytecodeFlag, p);
+ /* The variable is only tested for existence here; _PyRandom_Init will
+ check its value further. */
+ if ((p = Py_GETENV("PYTHONHASHSEED")) && *p != '\0')
+ Py_HashRandomizationFlag = add_flag(Py_HashRandomizationFlag, p);
+
+ _PyRandom_Init();
+
+ interp = PyInterpreterState_New();
+ if (interp == NULL)
+ Py_FatalError("Py_Initialize: can't make first interpreter");
+
+ tstate = PyThreadState_New(interp);
+ if (tstate == NULL)
+ Py_FatalError("Py_Initialize: can't make first thread");
+ (void) PyThreadState_Swap(tstate);
+
+#ifdef WITH_THREAD
+ /* We can't call _PyEval_FiniThreads() in Py_Finalize because
+ destroying the GIL might fail when it is being referenced from
+ another running thread (see issue #9901).
+ Instead we destroy the previously created GIL here, which ensures
+ that we can call Py_Initialize / Py_Finalize multiple times. */
+ _PyEval_FiniThreads();
+
+ /* Auto-thread-state API */
+ _PyGILState_Init(interp, tstate);
+#endif /* WITH_THREAD */
+
+ _Py_ReadyTypes();
+
+ if (!_PyFrame_Init())
+ Py_FatalError("Py_Initialize: can't init frames");
+
+ if (!_PyLong_Init())
+ Py_FatalError("Py_Initialize: can't init longs");
+
+ if (!PyByteArray_Init())
+ Py_FatalError("Py_Initialize: can't init bytearray");
+
+ if (!_PyFloat_Init())
+ Py_FatalError("Py_Initialize: can't init float");
+
+ interp->modules = PyDict_New();
+ if (interp->modules == NULL)
+ Py_FatalError("Py_Initialize: can't make modules dictionary");
+
+ /* Init Unicode implementation; relies on the codec registry */
+ if (_PyUnicode_Init() < 0)
+ Py_FatalError("Py_Initialize: can't initialize unicode");
+ if (_PyStructSequence_Init() < 0)
+ Py_FatalError("Py_Initialize: can't initialize structseq");
+
+ bimod = _PyBuiltin_Init();
+ if (bimod == NULL)
+ Py_FatalError("Py_Initialize: can't initialize builtins modules");
+ _PyImport_FixupBuiltin(bimod, "builtins");
+ interp->builtins = PyModule_GetDict(bimod);
+ if (interp->builtins == NULL)
+ Py_FatalError("Py_Initialize: can't initialize builtins dict");
+ Py_INCREF(interp->builtins);
+
+ /* initialize builtin exceptions */
+ _PyExc_Init(bimod);
+
+ sysmod = _PySys_Init();
+ if (sysmod == NULL)
+ Py_FatalError("Py_Initialize: can't initialize sys");
+ interp->sysdict = PyModule_GetDict(sysmod);
+ if (interp->sysdict == NULL)
+ Py_FatalError("Py_Initialize: can't initialize sys dict");
+ Py_INCREF(interp->sysdict);
+ _PyImport_FixupBuiltin(sysmod, "sys");
+ PySys_SetPath(Py_GetPath());
+ PyDict_SetItemString(interp->sysdict, "modules",
+ interp->modules);
+
+ /* Set up a preliminary stderr printer until we have enough
+ infrastructure for the io module in place. */
+ pstderr = PyFile_NewStdPrinter(fileno(stderr));
+ if (pstderr == NULL)
+ Py_FatalError("Py_Initialize: can't set preliminary stderr");
+ _PySys_SetObjectId(&PyId_stderr, pstderr);
+ PySys_SetObject("__stderr__", pstderr);
+ Py_DECREF(pstderr);
+
+ _PyImport_Init();
+
+ _PyImportHooks_Init();
+
+ /* Initialize _warnings. */
+ _PyWarnings_Init();
+
+ if (!install_importlib)
+ return;
+
+ if (_PyTime_Init() < 0)
+ Py_FatalError("Py_Initialize: can't initialize time");
+
+ import_init(interp, sysmod);
+
+ /* initialize the faulthandler module */
+ if (_PyFaulthandler_Init())
+ Py_FatalError("Py_Initialize: can't initialize faulthandler");
+
+ if (initfsencoding(interp) < 0)
+ Py_FatalError("Py_Initialize: unable to load the file system codec");
+
+ if (install_sigs)
+ initsigs(); /* Signal handling stuff, including initintr() */
+
+ if (_PyTraceMalloc_Init() < 0)
+ Py_FatalError("Py_Initialize: can't initialize tracemalloc");
+
+ initmain(interp); /* Module __main__ */
+ if (initstdio() < 0)
+ Py_FatalError(
+ "Py_Initialize: can't initialize sys standard streams");
+
+ /* Initialize warnings. */
+ if (PySys_HasWarnOptions()) {
+ PyObject *warnings_module = PyImport_ImportModule("warnings");
+ if (warnings_module == NULL) {
+ fprintf(stderr, "'import warnings' failed; traceback:\n");
+ PyErr_Print();
+ }
+ Py_XDECREF(warnings_module);
+ }
+
+ if (!Py_NoSiteFlag)
+ initsite(); /* Module site */
+}
+
+void
+Py_InitializeEx(int install_sigs)
+{
+ _Py_InitializeEx_Private(install_sigs, 1);
+}
+
+void
+Py_Initialize(void)
+{
+ Py_InitializeEx(1);
+}
+
+
+#ifdef COUNT_ALLOCS
+extern void dump_counts(FILE*);
+#endif
+
+/* Flush stdout and stderr */
+
+static int
+file_is_closed(PyObject *fobj)
+{
+ int r;
+ PyObject *tmp = PyObject_GetAttrString(fobj, "closed");
+ if (tmp == NULL) {
+ PyErr_Clear();
+ return 0;
+ }
+ r = PyObject_IsTrue(tmp);
+ Py_DECREF(tmp);
+ if (r < 0)
+ PyErr_Clear();
+ return r > 0;
+}
+
+static void
+flush_std_files(void)
+{
+ PyObject *fout = _PySys_GetObjectId(&PyId_stdout);
+ PyObject *ferr = _PySys_GetObjectId(&PyId_stderr);
+ PyObject *tmp;
+
+ if (fout != NULL && fout != Py_None && !file_is_closed(fout)) {
+ tmp = _PyObject_CallMethodId(fout, &PyId_flush, "");
+ if (tmp == NULL)
+ PyErr_WriteUnraisable(fout);
+ else
+ Py_DECREF(tmp);
+ }
+
+ if (ferr != NULL && ferr != Py_None && !file_is_closed(ferr)) {
+ tmp = _PyObject_CallMethodId(ferr, &PyId_flush, "");
+ if (tmp == NULL)
+ PyErr_Clear();
+ else
+ Py_DECREF(tmp);
+ }
+}
+
+/* Undo the effect of Py_Initialize().
+
+ Beware: if multiple interpreter and/or thread states exist, these
+ are not wiped out; only the current thread and interpreter state
+ are deleted. But since everything else is deleted, those other
+ interpreter and thread states should no longer be used.
+
+ (XXX We should do better, e.g. wipe out all interpreters and
+ threads.)
+
+ Locking: as above.
+
+*/
+
+void
+Py_Finalize(void)
+{
+ PyInterpreterState *interp;
+ PyThreadState *tstate;
+
+ if (!initialized)
+ return;
+
+ wait_for_thread_shutdown();
+
+ /* The interpreter is still entirely intact at this point, and the
+ * exit funcs may be relying on that. In particular, if some thread
+ * or exit func is still waiting to do an import, the import machinery
+ * expects Py_IsInitialized() to return true. So don't say the
+ * interpreter is uninitialized until after the exit funcs have run.
+ * Note that Threading.py uses an exit func to do a join on all the
+ * threads created thru it, so this also protects pending imports in
+ * the threads created via Threading.
+ */
+ call_py_exitfuncs();
+
+ /* Get current thread state and interpreter pointer */
+ tstate = PyThreadState_GET();
+ interp = tstate->interp;
+
+ /* Remaining threads (e.g. daemon threads) will automatically exit
+ after taking the GIL (in PyEval_RestoreThread()). */
+ _Py_Finalizing = tstate;
+ initialized = 0;
+
+ /* Flush sys.stdout and sys.stderr */
+ flush_std_files();
+
+ /* Disable signal handling */
+ PyOS_FiniInterrupts();
+
+ /* Collect garbage. This may call finalizers; it's nice to call these
+ * before all modules are destroyed.
+ * XXX If a __del__ or weakref callback is triggered here, and tries to
+ * XXX import a module, bad things can happen, because Python no
+ * XXX longer believes it's initialized.
+ * XXX Fatal Python error: Interpreter not initialized (version mismatch?)
+ * XXX is easy to provoke that way. I've also seen, e.g.,
+ * XXX Exception exceptions.ImportError: 'No module named sha'
+ * XXX in <function callback at 0x008F5718> ignored
+ * XXX but I'm unclear on exactly how that one happens. In any case,
+ * XXX I haven't seen a real-life report of either of these.
+ */
+ PyGC_Collect();
+#ifdef COUNT_ALLOCS
+ /* With COUNT_ALLOCS, it helps to run GC multiple times:
+ each collection might release some types from the type
+ list, so they become garbage. */
+ while (PyGC_Collect() > 0)
+ /* nothing */;
+#endif
+ /* Destroy all modules */
+ PyImport_Cleanup();
+
+ /* Flush sys.stdout and sys.stderr (again, in case more was printed) */
+ flush_std_files();
+
+ /* Collect final garbage. This disposes of cycles created by
+ * class definitions, for example.
+ * XXX This is disabled because it caused too many problems. If
+ * XXX a __del__ or weakref callback triggers here, Python code has
+ * XXX a hard time running, because even the sys module has been
+ * XXX cleared out (sys.stdout is gone, sys.excepthook is gone, etc).
+ * XXX One symptom is a sequence of information-free messages
+ * XXX coming from threads (if a __del__ or callback is invoked,
+ * XXX other threads can execute too, and any exception they encounter
+ * XXX triggers a comedy of errors as subsystem after subsystem
+ * XXX fails to find what it *expects* to find in sys to help report
+ * XXX the exception and consequent unexpected failures). I've also
+ * XXX seen segfaults then, after adding print statements to the
+ * XXX Python code getting called.
+ */
+#if 0
+ PyGC_Collect();
+#endif
+
+ /* Disable tracemalloc after all Python objects have been destroyed,
+ so it is possible to use tracemalloc in objects destructor. */
+ _PyTraceMalloc_Fini();
+
+ /* Destroy the database used by _PyImport_{Fixup,Find}Extension */
+ _PyImport_Fini();
+
+ /* Cleanup typeobject.c's internal caches. */
+ _PyType_Fini();
+
+ /* unload faulthandler module */
+ _PyFaulthandler_Fini();
+
+ /* Debugging stuff */
+#ifdef COUNT_ALLOCS
+ dump_counts(stdout);
+#endif
+ /* dump hash stats */
+ _PyHash_Fini();
+
+ _PY_DEBUG_PRINT_TOTAL_REFS();
+
+#ifdef Py_TRACE_REFS
+ /* Display all objects still alive -- this can invoke arbitrary
+ * __repr__ overrides, so requires a mostly-intact interpreter.
+ * Alas, a lot of stuff may still be alive now that will be cleaned
+ * up later.
+ */
+ if (Py_GETENV("PYTHONDUMPREFS"))
+ _Py_PrintReferences(stderr);
+#endif /* Py_TRACE_REFS */
+
+ /* Clear interpreter state and all thread states. */
+ PyInterpreterState_Clear(interp);
+
+ /* Now we decref the exception classes. After this point nothing
+ can raise an exception. That's okay, because each Fini() method
+ below has been checked to make sure no exceptions are ever
+ raised.
+ */
+
+ _PyExc_Fini();
+
+ /* Sundry finalizers */
+ PyMethod_Fini();
+ PyFrame_Fini();
+ PyCFunction_Fini();
+ PyTuple_Fini();
+ PyList_Fini();
+ PySet_Fini();
+ PyBytes_Fini();
+ PyByteArray_Fini();
+ PyLong_Fini();
+ PyFloat_Fini();
+ PyDict_Fini();
+ PySlice_Fini();
+ _PyGC_Fini();
+ _PyRandom_Fini();
+
+ /* Cleanup Unicode implementation */
+ _PyUnicode_Fini();
+
+ /* reset file system default encoding */
+ if (!Py_HasFileSystemDefaultEncoding && Py_FileSystemDefaultEncoding) {
+ PyMem_RawFree((char*)Py_FileSystemDefaultEncoding);
+ Py_FileSystemDefaultEncoding = NULL;
+ }
+
+ /* XXX Still allocated:
+ - various static ad-hoc pointers to interned strings
+ - int and float free list blocks
+ - whatever various modules and libraries allocate
+ */
+
+ PyGrammar_RemoveAccelerators(&_PyParser_Grammar);
+
+ /* Cleanup auto-thread-state */
+#ifdef WITH_THREAD
+ _PyGILState_Fini();
+#endif /* WITH_THREAD */
+
+ /* Delete current thread. After this, many C API calls become crashy. */
+ PyThreadState_Swap(NULL);
+ PyInterpreterState_Delete(interp);
+
+#ifdef Py_TRACE_REFS
+ /* Display addresses (& refcnts) of all objects still alive.
+ * An address can be used to find the repr of the object, printed
+ * above by _Py_PrintReferences.
+ */
+ if (Py_GETENV("PYTHONDUMPREFS"))
+ _Py_PrintReferenceAddresses(stderr);
+#endif /* Py_TRACE_REFS */
+#ifdef PYMALLOC_DEBUG
+ if (Py_GETENV("PYTHONMALLOCSTATS"))
+ _PyObject_DebugMallocStats(stderr);
+#endif
+
+ call_ll_exitfuncs();
+}
+
+/* Create and initialize a new interpreter and thread, and return the
+ new thread. This requires that Py_Initialize() has been called
+ first.
+
+ Unsuccessful initialization yields a NULL pointer. Note that *no*
+ exception information is available even in this case -- the
+ exception information is held in the thread, and there is no
+ thread.
+
+ Locking: as above.
+
+*/
+
+PyThreadState *
+Py_NewInterpreter(void)
+{
+ PyInterpreterState *interp;
+ PyThreadState *tstate, *save_tstate;
+ PyObject *bimod, *sysmod;
+
+ if (!initialized)
+ Py_FatalError("Py_NewInterpreter: call Py_Initialize first");
+
+ interp = PyInterpreterState_New();
+ if (interp == NULL)
+ return NULL;
+
+ tstate = PyThreadState_New(interp);
+ if (tstate == NULL) {
+ PyInterpreterState_Delete(interp);
+ return NULL;
+ }
+
+ save_tstate = PyThreadState_Swap(tstate);
+
+ /* XXX The following is lax in error checking */
+
+ interp->modules = PyDict_New();
+
+ bimod = _PyImport_FindBuiltin("builtins");
+ if (bimod != NULL) {
+ interp->builtins = PyModule_GetDict(bimod);
+ if (interp->builtins == NULL)
+ goto handle_error;
+ Py_INCREF(interp->builtins);
+ }
+
+ /* initialize builtin exceptions */
+ _PyExc_Init(bimod);
+
+ sysmod = _PyImport_FindBuiltin("sys");
+ if (bimod != NULL && sysmod != NULL) {
+ PyObject *pstderr;
+
+ interp->sysdict = PyModule_GetDict(sysmod);
+ if (interp->sysdict == NULL)
+ goto handle_error;
+ Py_INCREF(interp->sysdict);
+ PySys_SetPath(Py_GetPath());
+ PyDict_SetItemString(interp->sysdict, "modules",
+ interp->modules);
+ /* Set up a preliminary stderr printer until we have enough
+ infrastructure for the io module in place. */
+ pstderr = PyFile_NewStdPrinter(fileno(stderr));
+ if (pstderr == NULL)
+ Py_FatalError("Py_Initialize: can't set preliminary stderr");
+ _PySys_SetObjectId(&PyId_stderr, pstderr);
+ PySys_SetObject("__stderr__", pstderr);
+ Py_DECREF(pstderr);
+
+ _PyImportHooks_Init();
+
+ import_init(interp, sysmod);
+
+ if (initfsencoding(interp) < 0)
+ goto handle_error;
+
+ if (initstdio() < 0)
+ Py_FatalError(
+ "Py_Initialize: can't initialize sys standard streams");
+ initmain(interp);
+ if (!Py_NoSiteFlag)
+ initsite();
+ }
+
+ if (!PyErr_Occurred())
+ return tstate;
+
+handle_error:
+ /* Oops, it didn't work. Undo it all. */
+
+ PyErr_PrintEx(0);
+ PyThreadState_Clear(tstate);
+ PyThreadState_Swap(save_tstate);
+ PyThreadState_Delete(tstate);
+ PyInterpreterState_Delete(interp);
+
+ return NULL;
+}
+
+/* Delete an interpreter and its last thread. This requires that the
+ given thread state is current, that the thread has no remaining
+ frames, and that it is its interpreter's only remaining thread.
+ It is a fatal error to violate these constraints.
+
+ (Py_Finalize() doesn't have these constraints -- it zaps
+ everything, regardless.)
+
+ Locking: as above.
+
+*/
+
+void
+Py_EndInterpreter(PyThreadState *tstate)
+{
+ PyInterpreterState *interp = tstate->interp;
+
+ if (tstate != PyThreadState_GET())
+ Py_FatalError("Py_EndInterpreter: thread is not current");
+ if (tstate->frame != NULL)
+ Py_FatalError("Py_EndInterpreter: thread still has a frame");
+
+ wait_for_thread_shutdown();
+
+ if (tstate != interp->tstate_head || tstate->next != NULL)
+ Py_FatalError("Py_EndInterpreter: not the last thread");
+
+ PyImport_Cleanup();
+ PyInterpreterState_Clear(interp);
+ PyThreadState_Swap(NULL);
+ PyInterpreterState_Delete(interp);
+}
+
+#ifdef MS_WINDOWS
+static wchar_t *progname = L"python";
+#else
+static wchar_t *progname = L"python3";
+#endif
+
+void
+Py_SetProgramName(wchar_t *pn)
+{
+ if (pn && *pn)
+ progname = pn;
+}
+
+wchar_t *
+Py_GetProgramName(void)
+{
+ return progname;
+}
+
+static wchar_t *default_home = NULL;
+static wchar_t env_home[MAXPATHLEN+1];
+
+void
+Py_SetPythonHome(wchar_t *home)
+{
+ default_home = home;
+}
+
+wchar_t *
+Py_GetPythonHome(void)
+{
+ wchar_t *home = default_home;
+ if (home == NULL && !Py_IgnoreEnvironmentFlag) {
+ char* chome = Py_GETENV("PYTHONHOME");
+ if (chome) {
+ size_t size = Py_ARRAY_LENGTH(env_home);
+ size_t r = mbstowcs(env_home, chome, size);
+ if (r != (size_t)-1 && r < size)
+ home = env_home;
+ }
+
+ }
+ return home;
+}
+
+/* Create __main__ module */
+
+static void
+initmain(PyInterpreterState *interp)
+{
+ PyObject *m, *d, *loader;
+ m = PyImport_AddModule("__main__");
+ if (m == NULL)
+ Py_FatalError("can't create __main__ module");
+ d = PyModule_GetDict(m);
+ if (PyDict_GetItemString(d, "__builtins__") == NULL) {
+ PyObject *bimod = PyImport_ImportModule("builtins");
+ if (bimod == NULL) {
+ Py_FatalError("Failed to retrieve builtins module");
+ }
+ if (PyDict_SetItemString(d, "__builtins__", bimod) < 0) {
+ Py_FatalError("Failed to initialize __main__.__builtins__");
+ }
+ Py_DECREF(bimod);
+ }
+ /* Main is a little special - imp.is_builtin("__main__") will return
+ * False, but BuiltinImporter is still the most appropriate initial
+ * setting for its __loader__ attribute. A more suitable value will
+ * be set if __main__ gets further initialized later in the startup
+ * process.
+ */
+ loader = PyDict_GetItemString(d, "__loader__");
+ if (loader == NULL || loader == Py_None) {
+ PyObject *loader = PyObject_GetAttrString(interp->importlib,
+ "BuiltinImporter");
+ if (loader == NULL) {
+ Py_FatalError("Failed to retrieve BuiltinImporter");
+ }
+ if (PyDict_SetItemString(d, "__loader__", loader) < 0) {
+ Py_FatalError("Failed to initialize __main__.__loader__");
+ }
+ Py_DECREF(loader);
+ }
+}
+
+static int
+initfsencoding(PyInterpreterState *interp)
+{
+ PyObject *codec;
+
+ if (Py_FileSystemDefaultEncoding == NULL)
+ {
+ Py_FileSystemDefaultEncoding = get_locale_encoding();
+ if (Py_FileSystemDefaultEncoding == NULL)
+ Py_FatalError("Py_Initialize: Unable to get the locale encoding");
+
+ Py_HasFileSystemDefaultEncoding = 0;
+ interp->fscodec_initialized = 1;
+ return 0;
+ }
+
+ /* the encoding is mbcs, utf-8 or ascii */
+ codec = _PyCodec_Lookup(Py_FileSystemDefaultEncoding);
+ if (!codec) {
+ /* Such error can only occurs in critical situations: no more
+ * memory, import a module of the standard library failed,
+ * etc. */
+ return -1;
+ }
+ Py_DECREF(codec);
+ interp->fscodec_initialized = 1;
+ return 0;
+}
+
+/* Import the site module (not into __main__ though) */
+
+static void
+initsite(void)
+{
+ PyObject *m;
+ m = PyImport_ImportModule("site");
+ if (m == NULL) {
+ fprintf(stderr, "Failed to import the site module\n");
+ PyErr_Print();
+ Py_Finalize();
+ exit(1);
+ }
+ else {
+ Py_DECREF(m);
+ }
+}
+
+/* Check if a file descriptor is valid or not.
+ Return 0 if the file descriptor is invalid, return non-zero otherwise. */
+static int
+is_valid_fd(int fd)
+{
+ int fd2;
+ if (fd < 0 || !_PyVerify_fd(fd))
+ return 0;
+ _Py_BEGIN_SUPPRESS_IPH
+ fd2 = dup(fd);
+ if (fd2 >= 0)
+ close(fd2);
+ _Py_END_SUPPRESS_IPH
+ return fd2 >= 0;
+}
+
+/* returns Py_None if the fd is not valid */
+static PyObject*
+create_stdio(PyObject* io,
+ int fd, int write_mode, char* name,
+ char* encoding, char* errors)
+{
+ PyObject *buf = NULL, *stream = NULL, *text = NULL, *raw = NULL, *res;
+ const char* mode;
+ const char* newline;
+ PyObject *line_buffering;
+ int buffering, isatty;
+ _Py_IDENTIFIER(open);
+ _Py_IDENTIFIER(isatty);
+ _Py_IDENTIFIER(TextIOWrapper);
+ _Py_IDENTIFIER(mode);
+
+ if (!is_valid_fd(fd))
+ Py_RETURN_NONE;
+
+ /* stdin is always opened in buffered mode, first because it shouldn't
+ make a difference in common use cases, second because TextIOWrapper
+ depends on the presence of a read1() method which only exists on
+ buffered streams.
+ */
+ if (Py_UnbufferedStdioFlag && write_mode)
+ buffering = 0;
+ else
+ buffering = -1;
+ if (write_mode)
+ mode = "wb";
+ else
+ mode = "rb";
+ buf = _PyObject_CallMethodId(io, &PyId_open, "isiOOOi",
+ fd, mode, buffering,
+ Py_None, Py_None, Py_None, 0);
+ if (buf == NULL)
+ goto error;
+
+ if (buffering) {
+ _Py_IDENTIFIER(raw);
+ raw = _PyObject_GetAttrId(buf, &PyId_raw);
+ if (raw == NULL)
+ goto error;
+ }
+ else {
+ raw = buf;
+ Py_INCREF(raw);
+ }
+
+ text = PyUnicode_FromString(name);
+ if (text == NULL || _PyObject_SetAttrId(raw, &PyId_name, text) < 0)
+ goto error;
+ res = _PyObject_CallMethodId(raw, &PyId_isatty, "");
+ if (res == NULL)
+ goto error;
+ isatty = PyObject_IsTrue(res);
+ Py_DECREF(res);
+ if (isatty == -1)
+ goto error;
+ if (isatty || Py_UnbufferedStdioFlag)
+ line_buffering = Py_True;
+ else
+ line_buffering = Py_False;
+
+ Py_CLEAR(raw);
+ Py_CLEAR(text);
+
+#ifdef MS_WINDOWS
+ /* sys.stdin: enable universal newline mode, translate "\r\n" and "\r"
+ newlines to "\n".
+ sys.stdout and sys.stderr: translate "\n" to "\r\n". */
+ newline = NULL;
+#else
+ /* sys.stdin: split lines at "\n".
+ sys.stdout and sys.stderr: don't translate newlines (use "\n"). */
+ newline = "\n";
+#endif
+
+ stream = _PyObject_CallMethodId(io, &PyId_TextIOWrapper, "OsssO",
+ buf, encoding, errors,
+ newline, line_buffering);
+ Py_CLEAR(buf);
+ if (stream == NULL)
+ goto error;
+
+ if (write_mode)
+ mode = "w";
+ else
+ mode = "r";
+ text = PyUnicode_FromString(mode);
+ if (!text || _PyObject_SetAttrId(stream, &PyId_mode, text) < 0)
+ goto error;
+ Py_CLEAR(text);
+ return stream;
+
+error:
+ Py_XDECREF(buf);
+ Py_XDECREF(stream);
+ Py_XDECREF(text);
+ Py_XDECREF(raw);
+
+ if (PyErr_ExceptionMatches(PyExc_OSError) && !is_valid_fd(fd)) {
+ /* Issue #24891: the file descriptor was closed after the first
+ is_valid_fd() check was called. Ignore the OSError and set the
+ stream to None. */
+ PyErr_Clear();
+ Py_RETURN_NONE;
+ }
+ return NULL;
+}
+
+/* Initialize sys.stdin, stdout, stderr and builtins.open */
+static int
+initstdio(void)
+{
+ PyObject *iomod = NULL, *wrapper;
+ PyObject *bimod = NULL;
+ PyObject *m;
+ PyObject *std = NULL;
+ int status = 0, fd;
+ PyObject * encoding_attr;
+ char *pythonioencoding = NULL, *encoding, *errors;
+
+ /* Hack to avoid a nasty recursion issue when Python is invoked
+ in verbose mode: pre-import the Latin-1 and UTF-8 codecs */
+ if ((m = PyImport_ImportModule("encodings.utf_8")) == NULL) {
+ goto error;
+ }
+ Py_DECREF(m);
+
+ if (!(m = PyImport_ImportModule("encodings.latin_1"))) {
+ goto error;
+ }
+ Py_DECREF(m);
+
+ if (!(bimod = PyImport_ImportModule("builtins"))) {
+ goto error;
+ }
+
+ if (!(iomod = PyImport_ImportModule("io"))) {
+ goto error;
+ }
+ if (!(wrapper = PyObject_GetAttrString(iomod, "OpenWrapper"))) {
+ goto error;
+ }
+
+ /* Set builtins.open */
+ if (PyObject_SetAttrString(bimod, "open", wrapper) == -1) {
+ Py_DECREF(wrapper);
+ goto error;
+ }
+ Py_DECREF(wrapper);
+
+ encoding = _Py_StandardStreamEncoding;
+ errors = _Py_StandardStreamErrors;
+ if (!encoding || !errors) {
+ pythonioencoding = Py_GETENV("PYTHONIOENCODING");
+ if (pythonioencoding) {
+ char *err;
+ pythonioencoding = _PyMem_Strdup(pythonioencoding);
+ if (pythonioencoding == NULL) {
+ PyErr_NoMemory();
+ goto error;
+ }
+ err = strchr(pythonioencoding, ':');
+ if (err) {
+ *err = '\0';
+ err++;
+ if (*err && !errors) {
+ errors = err;
+ }
+ }
+ if (*pythonioencoding && !encoding) {
+ encoding = pythonioencoding;
+ }
+ }
+ if (!errors && !(pythonioencoding && *pythonioencoding)) {
+ /* When the LC_CTYPE locale is the POSIX locale ("C locale"),
+ stdin and stdout use the surrogateescape error handler by
+ default, instead of the strict error handler. */
+ char *loc = setlocale(LC_CTYPE, NULL);
+ if (loc != NULL && strcmp(loc, "C") == 0)
+ errors = "surrogateescape";
+ }
+ }
+
+ /* Set sys.stdin */
+ fd = fileno(stdin);
+ /* Under some conditions stdin, stdout and stderr may not be connected
+ * and fileno() may point to an invalid file descriptor. For example
+ * GUI apps don't have valid standard streams by default.
+ */
+ std = create_stdio(iomod, fd, 0, "<stdin>", encoding, errors);
+ if (std == NULL)
+ goto error;
+ PySys_SetObject("__stdin__", std);
+ _PySys_SetObjectId(&PyId_stdin, std);
+ Py_DECREF(std);
+
+ /* Set sys.stdout */
+ fd = fileno(stdout);
+ std = create_stdio(iomod, fd, 1, "<stdout>", encoding, errors);
+ if (std == NULL)
+ goto error;
+ PySys_SetObject("__stdout__", std);
+ _PySys_SetObjectId(&PyId_stdout, std);
+ Py_DECREF(std);
+
+#if 1 /* Disable this if you have trouble debugging bootstrap stuff */
+ /* Set sys.stderr, replaces the preliminary stderr */
+ fd = fileno(stderr);
+ std = create_stdio(iomod, fd, 1, "<stderr>", encoding, "backslashreplace");
+ if (std == NULL)
+ goto error;
+
+ /* Same as hack above, pre-import stderr's codec to avoid recursion
+ when import.c tries to write to stderr in verbose mode. */
+ encoding_attr = PyObject_GetAttrString(std, "encoding");
+ if (encoding_attr != NULL) {
+ const char * std_encoding;
+ std_encoding = _PyUnicode_AsString(encoding_attr);
+ if (std_encoding != NULL) {
+ PyObject *codec_info = _PyCodec_Lookup(std_encoding);
+ Py_XDECREF(codec_info);
+ }
+ Py_DECREF(encoding_attr);
+ }
+ PyErr_Clear(); /* Not a fatal error if codec isn't available */
+
+ if (PySys_SetObject("__stderr__", std) < 0) {
+ Py_DECREF(std);
+ goto error;
+ }
+ if (_PySys_SetObjectId(&PyId_stderr, std) < 0) {
+ Py_DECREF(std);
+ goto error;
+ }
+ Py_DECREF(std);
+#endif
+
+ if (0) {
+ error:
+ status = -1;
+ }
+
+ /* We won't need them anymore. */
+ if (_Py_StandardStreamEncoding) {
+ PyMem_RawFree(_Py_StandardStreamEncoding);
+ _Py_StandardStreamEncoding = NULL;
+ }
+ if (_Py_StandardStreamErrors) {
+ PyMem_RawFree(_Py_StandardStreamErrors);
+ _Py_StandardStreamErrors = NULL;
+ }
+ PyMem_Free(pythonioencoding);
+ Py_XDECREF(bimod);
+ Py_XDECREF(iomod);
+ return status;
+}
+
+
+static void
+_Py_FatalError_DumpTracebacks(int fd)
+{
+ PyThreadState *tstate;
+
+#ifdef WITH_THREAD
+ /* PyGILState_GetThisThreadState() works even if the GIL was released */
+ tstate = PyGILState_GetThisThreadState();
+#else
+ tstate = PyThreadState_GET();
+#endif
+ if (tstate == NULL) {
+ /* _Py_DumpTracebackThreads() requires the thread state to display
+ * frames */
+ return;
+ }
+
+ fputc('\n', stderr);
+ fflush(stderr);
+
+ /* display the current Python stack */
+ _Py_DumpTracebackThreads(fd, tstate->interp, tstate);
+}
+
+/* Print the current exception (if an exception is set) with its traceback,
+ or display the current Python stack.
+
+ Don't call PyErr_PrintEx() and the except hook, because Py_FatalError() is
+ called on catastrophic cases.
+
+ Return 1 if the traceback was displayed, 0 otherwise. */
+
+static int
+_Py_FatalError_PrintExc(int fd)
+{
+ PyObject *ferr, *res;
+ PyObject *exception, *v, *tb;
+ int has_tb;
+
+ if (PyThreadState_GET() == NULL) {
+ /* The GIL is released: trying to acquire it is likely to deadlock,
+ just give up. */
+ return 0;
+ }
+
+ PyErr_Fetch(&exception, &v, &tb);
+ if (exception == NULL) {
+ /* No current exception */
+ return 0;
+ }
+
+ ferr = _PySys_GetObjectId(&PyId_stderr);
+ if (ferr == NULL || ferr == Py_None) {
+ /* sys.stderr is not set yet or set to None,
+ no need to try to display the exception */
+ return 0;
+ }
+
+ PyErr_NormalizeException(&exception, &v, &tb);
+ if (tb == NULL) {
+ tb = Py_None;
+ Py_INCREF(tb);
+ }
+ PyException_SetTraceback(v, tb);
+ if (exception == NULL) {
+ /* PyErr_NormalizeException() failed */
+ return 0;
+ }
+
+ has_tb = (tb != Py_None);
+ PyErr_Display(exception, v, tb);
+ Py_XDECREF(exception);
+ Py_XDECREF(v);
+ Py_XDECREF(tb);
+
+ /* sys.stderr may be buffered: call sys.stderr.flush() */
+ res = _PyObject_CallMethodId(ferr, &PyId_flush, "");
+ if (res == NULL)
+ PyErr_Clear();
+ else
+ Py_DECREF(res);
+
+ return has_tb;
+}
+
+/* Print fatal error message and abort */
+
+void
+Py_FatalError(const char *msg)
+{
+ const int fd = fileno(stderr);
+ static int reentrant = 0;
+#ifdef MS_WINDOWS
+ size_t len;
+ WCHAR* buffer;
+ size_t i;
+#endif
+
+ if (reentrant) {
+ /* Py_FatalError() caused a second fatal error.
+ Example: flush_std_files() raises a recursion error. */
+ goto exit;
+ }
+ reentrant = 1;
+
+ fprintf(stderr, "Fatal Python error: %s\n", msg);
+ fflush(stderr); /* it helps in Windows debug build */
+
+ /* Print the exception (if an exception is set) with its traceback,
+ * or display the current Python stack. */
+ if (!_Py_FatalError_PrintExc(fd))
+ _Py_FatalError_DumpTracebacks(fd);
+
+ /* The main purpose of faulthandler is to display the traceback. We already
+ * did our best to display it. So faulthandler can now be disabled.
+ * (Don't trigger it on abort().) */
+ _PyFaulthandler_Fini();
+
+ /* Check if the current Python thread hold the GIL */
+ if (PyThreadState_GET() != NULL) {
+ /* Flush sys.stdout and sys.stderr */
+ flush_std_files();
+ }
+
+#ifdef MS_WINDOWS
+ len = strlen(msg);
+
+ /* Convert the message to wchar_t. This uses a simple one-to-one
+ conversion, assuming that the this error message actually uses ASCII
+ only. If this ceases to be true, we will have to convert. */
+ buffer = alloca( (len+1) * (sizeof *buffer));
+ for( i=0; i<=len; ++i)
+ buffer[i] = msg[i];
+ OutputDebugStringW(L"Fatal Python error: ");
+ OutputDebugStringW(buffer);
+ OutputDebugStringW(L"\n");
+#endif /* MS_WINDOWS */
+
+exit:
+#if defined(MS_WINDOWS) && defined(_DEBUG)
+ DebugBreak();
+#endif
+ abort();
+}
+
+/* Clean up and exit */
+
+#ifdef WITH_THREAD
+#include "pythread.h"
+#endif
+
+static void (*pyexitfunc)(void) = NULL;
+/* For the atexit module. */
+void _Py_PyAtExit(void (*func)(void))
+{
+ pyexitfunc = func;
+}
+
+static void
+call_py_exitfuncs(void)
+{
+ if (pyexitfunc == NULL)
+ return;
+
+ (*pyexitfunc)();
+ PyErr_Clear();
+}
+
+/* Wait until threading._shutdown completes, provided
+ the threading module was imported in the first place.
+ The shutdown routine will wait until all non-daemon
+ "threading" threads have completed. */
+static void
+wait_for_thread_shutdown(void)
+{
+#ifdef WITH_THREAD
+ _Py_IDENTIFIER(_shutdown);
+ PyObject *result;
+ PyThreadState *tstate = PyThreadState_GET();
+ PyObject *threading = PyMapping_GetItemString(tstate->interp->modules,
+ "threading");
+ if (threading == NULL) {
+ /* threading not imported */
+ PyErr_Clear();
+ return;
+ }
+ result = _PyObject_CallMethodId(threading, &PyId__shutdown, "");
+ if (result == NULL) {
+ PyErr_WriteUnraisable(threading);
+ }
+ else {
+ Py_DECREF(result);
+ }
+ Py_DECREF(threading);
+#endif
+}
+
+#define NEXITFUNCS 32
+static void (*exitfuncs[NEXITFUNCS])(void);
+static int nexitfuncs = 0;
+
+int Py_AtExit(void (*func)(void))
+{
+ if (nexitfuncs >= NEXITFUNCS)
+ return -1;
+ exitfuncs[nexitfuncs++] = func;
+ return 0;
+}
+
+static void
+call_ll_exitfuncs(void)
+{
+ while (nexitfuncs > 0)
+ (*exitfuncs[--nexitfuncs])();
+
+ fflush(stdout);
+ fflush(stderr);
+}
+
+void
+Py_Exit(int sts)
+{
+ Py_Finalize();
+
+ exit(sts);
+}
+
+static void
+initsigs(void)
+{
+#ifdef SIGPIPE
+ PyOS_setsig(SIGPIPE, SIG_IGN);
+#endif
+#ifdef SIGXFZ
+ PyOS_setsig(SIGXFZ, SIG_IGN);
+#endif
+#ifdef SIGXFSZ
+ PyOS_setsig(SIGXFSZ, SIG_IGN);
+#endif
+ PyOS_InitInterrupts(); /* May imply initsignal() */
+ if (PyErr_Occurred()) {
+ Py_FatalError("Py_Initialize: can't import signal");
+ }
+}
+
+
+/* Restore signals that the interpreter has called SIG_IGN on to SIG_DFL.
+ *
+ * All of the code in this function must only use async-signal-safe functions,
+ * listed at `man 7 signal` or
+ * http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_04.html.
+ */
+void
+_Py_RestoreSignals(void)
+{
+#ifdef SIGPIPE
+ PyOS_setsig(SIGPIPE, SIG_DFL);
+#endif
+#ifdef SIGXFZ
+ PyOS_setsig(SIGXFZ, SIG_DFL);
+#endif
+#ifdef SIGXFSZ
+ PyOS_setsig(SIGXFSZ, SIG_DFL);
+#endif
+}
+
+
+/*
+ * The file descriptor fd is considered ``interactive'' if either
+ * a) isatty(fd) is TRUE, or
+ * b) the -i flag was given, and the filename associated with
+ * the descriptor is NULL or "<stdin>" or "???".
+ */
+int
+Py_FdIsInteractive(FILE *fp, const char *filename)
+{
+ if (isatty((int)fileno(fp)))
+ return 1;
+ if (!Py_InteractiveFlag)
+ return 0;
+ return (filename == NULL) ||
+ (strcmp(filename, "<stdin>") == 0) ||
+ (strcmp(filename, "???") == 0);
+}
+
+
+/* Wrappers around sigaction() or signal(). */
+
+PyOS_sighandler_t
+PyOS_getsig(int sig)
+{
+#ifdef HAVE_SIGACTION
+ struct sigaction context;
+ if (sigaction(sig, NULL, &context) == -1)
+ return SIG_ERR;
+ return context.sa_handler;
+#else
+ PyOS_sighandler_t handler;
+/* Special signal handling for the secure CRT in Visual Studio 2005 */
+#if defined(_MSC_VER) && _MSC_VER >= 1400
+ switch (sig) {
+ /* Only these signals are valid */
+ case SIGINT:
+ case SIGILL:
+ case SIGFPE:
+ case SIGSEGV:
+ case SIGTERM:
+ case SIGBREAK:
+ case SIGABRT:
+ break;
+ /* Don't call signal() with other values or it will assert */
+ default:
+ return SIG_ERR;
+ }
+#endif /* _MSC_VER && _MSC_VER >= 1400 */
+ handler = signal(sig, SIG_IGN);
+ if (handler != SIG_ERR)
+ signal(sig, handler);
+ return handler;
+#endif
+}
+
+/*
+ * All of the code in this function must only use async-signal-safe functions,
+ * listed at `man 7 signal` or
+ * http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_04.html.
+ */
+PyOS_sighandler_t
+PyOS_setsig(int sig, PyOS_sighandler_t handler)
+{
+#ifdef HAVE_SIGACTION
+ /* Some code in Modules/signalmodule.c depends on sigaction() being
+ * used here if HAVE_SIGACTION is defined. Fix that if this code
+ * changes to invalidate that assumption.
+ */
+ struct sigaction context, ocontext;
+ context.sa_handler = handler;
+ sigemptyset(&context.sa_mask);
+ context.sa_flags = 0;
+ if (sigaction(sig, &context, &ocontext) == -1)
+ return SIG_ERR;
+ return ocontext.sa_handler;
+#else
+ PyOS_sighandler_t oldhandler;
+ oldhandler = signal(sig, handler);
+#ifdef HAVE_SIGINTERRUPT
+ siginterrupt(sig, 1);
+#endif
+ return oldhandler;
+#endif
+}
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/Python/pystate.c b/Python/pystate.c
index 2ac2fd5274..6d1c6d0a1f 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -3,6 +3,14 @@
#include "Python.h"
+#define GET_TSTATE() \
+ ((PyThreadState*)_Py_atomic_load_relaxed(&_PyThreadState_Current))
+#define SET_TSTATE(value) \
+ _Py_atomic_store_relaxed(&_PyThreadState_Current, (Py_uintptr_t)(value))
+#define GET_INTERP_STATE() \
+ (GET_TSTATE()->interp)
+
+
/* --------------------------------------------------------------------------
CAUTION
@@ -48,7 +56,7 @@ static PyInterpreterState *interp_head = NULL;
/* Assuming the current thread holds the GIL, this is the
PyThreadState for the current thread. */
-_Py_atomic_address _PyThreadState_Current = {NULL};
+_Py_atomic_address _PyThreadState_Current = {0};
PyThreadFrameGetter _PyThreadState_GetFrame = NULL;
#ifdef WITH_THREAD
@@ -212,6 +220,9 @@ new_threadstate(PyInterpreterState *interp, int init)
tstate->on_delete = NULL;
tstate->on_delete_data = NULL;
+ tstate->coroutine_wrapper = NULL;
+ tstate->in_coroutine_wrapper = 0;
+
if (init)
_PyThreadState_Init(tstate);
@@ -251,8 +262,11 @@ PyObject*
PyState_FindModule(struct PyModuleDef* module)
{
Py_ssize_t index = module->m_base.m_index;
- PyInterpreterState *state = PyThreadState_GET()->interp;
+ PyInterpreterState *state = GET_INTERP_STATE();
PyObject *res;
+ if (module->m_slots) {
+ return NULL;
+ }
if (index == 0)
return NULL;
if (state->modules_by_index == NULL)
@@ -266,7 +280,13 @@ PyState_FindModule(struct PyModuleDef* module)
int
_PyState_AddModule(PyObject* module, struct PyModuleDef* def)
{
- PyInterpreterState *state = PyThreadState_GET()->interp;
+ PyInterpreterState *state;
+ if (def->m_slots) {
+ PyErr_SetString(PyExc_SystemError,
+ "PyState_AddModule called on module with slots");
+ return -1;
+ }
+ state = GET_INTERP_STATE();
if (!def)
return -1;
if (!state->modules_by_index) {
@@ -286,7 +306,7 @@ int
PyState_AddModule(PyObject* module, struct PyModuleDef* def)
{
Py_ssize_t index;
- PyInterpreterState *state = PyThreadState_GET()->interp;
+ PyInterpreterState *state = GET_INTERP_STATE();
if (!def) {
Py_FatalError("PyState_AddModule: Module Definition is NULL");
return -1;
@@ -306,8 +326,14 @@ PyState_AddModule(PyObject* module, struct PyModuleDef* def)
int
PyState_RemoveModule(struct PyModuleDef* def)
{
+ PyInterpreterState *state;
Py_ssize_t index = def->m_base.m_index;
- PyInterpreterState *state = PyThreadState_GET()->interp;
+ if (def->m_slots) {
+ PyErr_SetString(PyExc_SystemError,
+ "PyState_RemoveModule called on module with slots");
+ return -1;
+ }
+ state = GET_INTERP_STATE();
if (index == 0) {
Py_FatalError("PyState_RemoveModule: Module index invalid.");
return -1;
@@ -327,7 +353,7 @@ PyState_RemoveModule(struct PyModuleDef* def)
void
_PyState_ClearModules(void)
{
- PyInterpreterState *state = PyThreadState_GET()->interp;
+ PyInterpreterState *state = GET_INTERP_STATE();
if (state->modules_by_index) {
Py_ssize_t i;
for (i = 0; i < PyList_GET_SIZE(state->modules_by_index); i++) {
@@ -372,6 +398,8 @@ PyThreadState_Clear(PyThreadState *tstate)
tstate->c_tracefunc = NULL;
Py_CLEAR(tstate->c_profileobj);
Py_CLEAR(tstate->c_traceobj);
+
+ Py_CLEAR(tstate->coroutine_wrapper);
}
@@ -403,7 +431,7 @@ tstate_delete_common(PyThreadState *tstate)
void
PyThreadState_Delete(PyThreadState *tstate)
{
- if (tstate == _Py_atomic_load_relaxed(&_PyThreadState_Current))
+ if (tstate == GET_TSTATE())
Py_FatalError("PyThreadState_Delete: tstate is still current");
#ifdef WITH_THREAD
if (autoInterpreterState && PyThread_get_key_value(autoTLSkey) == tstate)
@@ -417,12 +445,11 @@ PyThreadState_Delete(PyThreadState *tstate)
void
PyThreadState_DeleteCurrent()
{
- PyThreadState *tstate = (PyThreadState*)_Py_atomic_load_relaxed(
- &_PyThreadState_Current);
+ PyThreadState *tstate = GET_TSTATE();
if (tstate == NULL)
Py_FatalError(
"PyThreadState_DeleteCurrent: no current tstate");
- _Py_atomic_store_relaxed(&_PyThreadState_Current, NULL);
+ SET_TSTATE(NULL);
if (autoInterpreterState && PyThread_get_key_value(autoTLSkey) == tstate)
PyThread_delete_key_value(autoTLSkey);
tstate_delete_common(tstate);
@@ -469,10 +496,16 @@ _PyThreadState_DeleteExcept(PyThreadState *tstate)
PyThreadState *
+_PyThreadState_UncheckedGet(void)
+{
+ return GET_TSTATE();
+}
+
+
+PyThreadState *
PyThreadState_Get(void)
{
- PyThreadState *tstate = (PyThreadState*)_Py_atomic_load_relaxed(
- &_PyThreadState_Current);
+ PyThreadState *tstate = GET_TSTATE();
if (tstate == NULL)
Py_FatalError("PyThreadState_Get: no current thread");
@@ -483,10 +516,9 @@ PyThreadState_Get(void)
PyThreadState *
PyThreadState_Swap(PyThreadState *newts)
{
- PyThreadState *oldts = (PyThreadState*)_Py_atomic_load_relaxed(
- &_PyThreadState_Current);
+ PyThreadState *oldts = GET_TSTATE();
- _Py_atomic_store_relaxed(&_PyThreadState_Current, newts);
+ SET_TSTATE(newts);
/* It should not be possible for more than one thread state
to be used for a thread. Check this the best we can in debug
builds.
@@ -515,8 +547,7 @@ PyThreadState_Swap(PyThreadState *newts)
PyObject *
PyThreadState_GetDict(void)
{
- PyThreadState *tstate = (PyThreadState*)_Py_atomic_load_relaxed(
- &_PyThreadState_Current);
+ PyThreadState *tstate = GET_TSTATE();
if (tstate == NULL)
return NULL;
@@ -540,8 +571,7 @@ PyThreadState_GetDict(void)
int
PyThreadState_SetAsyncExc(long id, PyObject *exc) {
- PyThreadState *tstate = PyThreadState_GET();
- PyInterpreterState *interp = tstate->interp;
+ PyInterpreterState *interp = GET_INTERP_STATE();
PyThreadState *p;
/* Although the GIL is held, a few C API functions can be called
@@ -662,7 +692,7 @@ PyThreadState_IsCurrent(PyThreadState *tstate)
{
/* Must be the tstate for this thread */
assert(PyGILState_GetThisThreadState()==tstate);
- return tstate == _Py_atomic_load_relaxed(&_PyThreadState_Current);
+ return tstate == GET_TSTATE();
}
/* Internal initialization/finalization functions called by
@@ -754,9 +784,7 @@ PyGILState_GetThisThreadState(void)
int
PyGILState_Check(void)
{
- /* can't use PyThreadState_Get() since it will assert that it has the GIL */
- PyThreadState *tstate = (PyThreadState*)_Py_atomic_load_relaxed(
- &_PyThreadState_Current);
+ PyThreadState *tstate = GET_TSTATE();
return tstate && (tstate == PyGILState_GetThisThreadState());
}
diff --git a/Python/pystrhex.c b/Python/pystrhex.c
new file mode 100644
index 0000000000..1259ed12df
--- /dev/null
+++ b/Python/pystrhex.c
@@ -0,0 +1,61 @@
+/* bytes to hex implementation */
+
+#include "Python.h"
+
+static PyObject *_Py_strhex_impl(const char* argbuf, const Py_ssize_t arglen,
+ int return_bytes)
+{
+ PyObject *retval;
+ Py_UCS1* retbuf;
+ Py_ssize_t i, j;
+
+ assert(arglen >= 0);
+ if (arglen > PY_SSIZE_T_MAX / 2)
+ return PyErr_NoMemory();
+
+ if (return_bytes) {
+ /* If _PyBytes_FromSize() were public we could avoid malloc+copy. */
+ retbuf = (Py_UCS1*) PyMem_Malloc(arglen*2);
+ if (!retbuf)
+ return PyErr_NoMemory();
+ retval = NULL; /* silence a compiler warning, assigned later. */
+ } else {
+ retval = PyUnicode_New(arglen*2, 127);
+ if (!retval)
+ return NULL;
+ retbuf = PyUnicode_1BYTE_DATA(retval);
+ }
+
+ /* make hex version of string, taken from shamodule.c */
+ for (i=j=0; i < arglen; i++) {
+ unsigned char c;
+ c = (argbuf[i] >> 4) & 0xf;
+ retbuf[j++] = Py_hexdigits[c];
+ c = argbuf[i] & 0xf;
+ retbuf[j++] = Py_hexdigits[c];
+ }
+
+ if (return_bytes) {
+ retval = PyBytes_FromStringAndSize((const char *)retbuf, arglen*2);
+ PyMem_Free(retbuf);
+ }
+#ifdef Py_DEBUG
+ else {
+ assert(_PyUnicode_CheckConsistency(retval, 1));
+ }
+#endif
+
+ return retval;
+}
+
+PyAPI_FUNC(PyObject *) _Py_strhex(const char* argbuf, const Py_ssize_t arglen)
+{
+ return _Py_strhex_impl(argbuf, arglen, 0);
+}
+
+/* Same as above but returns a bytes() instead of str() to avoid the
+ * need to decode the str() when bytes are needed. */
+PyAPI_FUNC(PyObject *) _Py_strhex_bytes(const char* argbuf, const Py_ssize_t arglen)
+{
+ return _Py_strhex_impl(argbuf, arglen, 1);
+}
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 0967a47c57..7fbf06e68a 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -15,6 +15,7 @@
#include "ast.h"
#include "marshal.h"
#include "osdefs.h"
+#include <locale.h>
#ifdef HAVE_SIGNAL_H
#include <signal.h>
@@ -25,18 +26,12 @@
#endif
#ifdef HAVE_LANGINFO_H
-#include <locale.h>
#include <langinfo.h>
#endif
#ifdef MS_WINDOWS
#undef BYTE
#include "windows.h"
-#define PATH_MAX MAXPATHLEN
-#endif
-
-#ifdef __gnu_hurd__
-#define PATH_MAX MAXPATHLEN
#endif
_Py_IDENTIFIER(builtins);
@@ -45,7 +40,6 @@ _Py_IDENTIFIER(flush);
_Py_IDENTIFIER(last_traceback);
_Py_IDENTIFIER(last_type);
_Py_IDENTIFIER(last_value);
-_Py_IDENTIFIER(name);
_Py_IDENTIFIER(ps1);
_Py_IDENTIFIER(ps2);
_Py_IDENTIFIER(stdin);
@@ -53,43 +47,13 @@ _Py_IDENTIFIER(stdout);
_Py_IDENTIFIER(stderr);
_Py_static_string(PyId_string, "<string>");
-#ifdef Py_REF_DEBUG
-static
-void _print_total_refs(void) {
- PyObject *xoptions, *value;
- _Py_IDENTIFIER(showrefcount);
-
- xoptions = PySys_GetXOptions();
- if (xoptions == NULL)
- return;
- value = _PyDict_GetItemId(xoptions, &PyId_showrefcount);
- if (value == Py_True)
- fprintf(stderr,
- "[%" PY_FORMAT_SIZE_T "d refs, "
- "%" PY_FORMAT_SIZE_T "d blocks]\n",
- _Py_GetRefTotal(), _Py_GetAllocatedBlocks());
-}
-#endif
-
-#ifndef Py_REF_DEBUG
-#define PRINT_TOTAL_REFS()
-#else /* Py_REF_DEBUG */
-#define PRINT_TOTAL_REFS() _print_total_refs()
-#endif
-
#ifdef __cplusplus
extern "C" {
#endif
-extern wchar_t *Py_GetPath(void);
-
extern grammar _PyParser_Grammar; /* From graminit.c */
/* Forward */
-static void initmain(PyInterpreterState *interp);
-static int initfsencoding(PyInterpreterState *interp);
-static void initsite(void);
-static int initstdio(void);
static void flush_io(void);
static PyObject *run_mod(mod_ty, PyObject *, PyObject *, PyObject *,
PyCompilerFlags *, PyArena *);
@@ -97,1177 +61,6 @@ static PyObject *run_pyc_file(FILE *, const char *, PyObject *, PyObject *,
PyCompilerFlags *);
static void err_input(perrdetail *);
static void err_free(perrdetail *);
-static void initsigs(void);
-static void call_py_exitfuncs(void);
-static void wait_for_thread_shutdown(void);
-static void call_ll_exitfuncs(void);
-extern int _PyUnicode_Init(void);
-extern int _PyStructSequence_Init(void);
-extern void _PyUnicode_Fini(void);
-extern int _PyLong_Init(void);
-extern void PyLong_Fini(void);
-extern int _PyFaulthandler_Init(void);
-extern void _PyFaulthandler_Fini(void);
-extern void _PyHash_Fini(void);
-extern int _PyTraceMalloc_Init(void);
-extern int _PyTraceMalloc_Fini(void);
-
-#ifdef WITH_THREAD
-extern void _PyGILState_Init(PyInterpreterState *, PyThreadState *);
-extern void _PyGILState_Fini(void);
-#endif /* WITH_THREAD */
-
-int Py_DebugFlag; /* Needed by parser.c */
-int Py_VerboseFlag; /* Needed by import.c */
-int Py_QuietFlag; /* Needed by sysmodule.c */
-int Py_InteractiveFlag; /* Needed by Py_FdIsInteractive() below */
-int Py_InspectFlag; /* Needed to determine whether to exit at SystemExit */
-int Py_NoSiteFlag; /* Suppress 'import site' */
-int Py_BytesWarningFlag; /* Warn on str(bytes) and str(buffer) */
-int Py_DontWriteBytecodeFlag; /* Suppress writing bytecode files (*.py[co]) */
-int Py_UseClassExceptionsFlag = 1; /* Needed by bltinmodule.c: deprecated */
-int Py_FrozenFlag; /* Needed by getpath.c */
-int Py_IgnoreEnvironmentFlag; /* e.g. PYTHONPATH, PYTHONHOME */
-int Py_NoUserSiteDirectory = 0; /* for -s and site.py */
-int Py_UnbufferedStdioFlag = 0; /* Unbuffered binary std{in,out,err} */
-int Py_HashRandomizationFlag = 0; /* for -R and PYTHONHASHSEED */
-int Py_IsolatedFlag = 0; /* for -I, isolate from user's env */
-
-PyThreadState *_Py_Finalizing = NULL;
-
-/* Hack to force loading of object files */
-int (*_PyOS_mystrnicmp_hack)(const char *, const char *, Py_ssize_t) = \
- PyOS_mystrnicmp; /* Python/pystrcmp.o */
-
-/* PyModule_GetWarningsModule is no longer necessary as of 2.6
-since _warnings is builtin. This API should not be used. */
-PyObject *
-PyModule_GetWarningsModule(void)
-{
- return PyImport_ImportModule("warnings");
-}
-
-static int initialized = 0;
-
-/* API to access the initialized flag -- useful for esoteric use */
-
-int
-Py_IsInitialized(void)
-{
- return initialized;
-}
-
-/* Helper to allow an embedding application to override the normal
- * mechanism that attempts to figure out an appropriate IO encoding
- */
-
-static char *_Py_StandardStreamEncoding = NULL;
-static char *_Py_StandardStreamErrors = NULL;
-
-int
-Py_SetStandardStreamEncoding(const char *encoding, const char *errors)
-{
- if (Py_IsInitialized()) {
- /* This is too late to have any effect */
- return -1;
- }
- /* Can't call PyErr_NoMemory() on errors, as Python hasn't been
- * initialised yet.
- *
- * However, the raw memory allocators are initialised appropriately
- * as C static variables, so _PyMem_RawStrdup is OK even though
- * Py_Initialize hasn't been called yet.
- */
- if (encoding) {
- _Py_StandardStreamEncoding = _PyMem_RawStrdup(encoding);
- if (!_Py_StandardStreamEncoding) {
- return -2;
- }
- }
- if (errors) {
- _Py_StandardStreamErrors = _PyMem_RawStrdup(errors);
- if (!_Py_StandardStreamErrors) {
- if (_Py_StandardStreamEncoding) {
- PyMem_RawFree(_Py_StandardStreamEncoding);
- }
- return -3;
- }
- }
- return 0;
-}
-
-/* Global initializations. Can be undone by Py_Finalize(). Don't
- call this twice without an intervening Py_Finalize() call. When
- initializations fail, a fatal error is issued and the function does
- not return. On return, the first thread and interpreter state have
- been created.
-
- Locking: you must hold the interpreter lock while calling this.
- (If the lock has not yet been initialized, that's equivalent to
- having the lock, but you cannot use multiple threads.)
-
-*/
-
-static int
-add_flag(int flag, const char *envs)
-{
- int env = atoi(envs);
- if (flag < env)
- flag = env;
- if (flag < 1)
- flag = 1;
- return flag;
-}
-
-static char*
-get_codec_name(const char *encoding)
-{
- char *name_utf8, *name_str;
- PyObject *codec, *name = NULL;
-
- codec = _PyCodec_Lookup(encoding);
- if (!codec)
- goto error;
-
- name = _PyObject_GetAttrId(codec, &PyId_name);
- Py_CLEAR(codec);
- if (!name)
- goto error;
-
- name_utf8 = _PyUnicode_AsString(name);
- if (name_utf8 == NULL)
- goto error;
- name_str = _PyMem_RawStrdup(name_utf8);
- Py_DECREF(name);
- if (name_str == NULL) {
- PyErr_NoMemory();
- return NULL;
- }
- return name_str;
-
-error:
- Py_XDECREF(codec);
- Py_XDECREF(name);
- return NULL;
-}
-
-static char*
-get_locale_encoding(void)
-{
-#ifdef MS_WINDOWS
- char codepage[100];
- PyOS_snprintf(codepage, sizeof(codepage), "cp%d", GetACP());
- return get_codec_name(codepage);
-#elif defined(HAVE_LANGINFO_H) && defined(CODESET)
- char* codeset = nl_langinfo(CODESET);
- if (!codeset || codeset[0] == '\0') {
- PyErr_SetString(PyExc_ValueError, "CODESET is not set or empty");
- return NULL;
- }
- return get_codec_name(codeset);
-#else
- PyErr_SetNone(PyExc_NotImplementedError);
- return NULL;
-#endif
-}
-
-static void
-import_init(PyInterpreterState *interp, PyObject *sysmod)
-{
- PyObject *importlib;
- PyObject *impmod;
- PyObject *sys_modules;
- PyObject *value;
-
- /* Import _importlib through its frozen version, _frozen_importlib. */
- if (PyImport_ImportFrozenModule("_frozen_importlib") <= 0) {
- Py_FatalError("Py_Initialize: can't import _frozen_importlib");
- }
- else if (Py_VerboseFlag) {
- PySys_FormatStderr("import _frozen_importlib # frozen\n");
- }
- importlib = PyImport_AddModule("_frozen_importlib");
- if (importlib == NULL) {
- Py_FatalError("Py_Initialize: couldn't get _frozen_importlib from "
- "sys.modules");
- }
- interp->importlib = importlib;
- Py_INCREF(interp->importlib);
-
- /* Install _importlib as __import__ */
- impmod = PyInit_imp();
- if (impmod == NULL) {
- Py_FatalError("Py_Initialize: can't import imp");
- }
- else if (Py_VerboseFlag) {
- PySys_FormatStderr("import imp # builtin\n");
- }
- sys_modules = PyImport_GetModuleDict();
- if (Py_VerboseFlag) {
- PySys_FormatStderr("import sys # builtin\n");
- }
- if (PyDict_SetItemString(sys_modules, "_imp", impmod) < 0) {
- Py_FatalError("Py_Initialize: can't save _imp to sys.modules");
- }
-
- value = PyObject_CallMethod(importlib, "_install", "OO", sysmod, impmod);
- if (value == NULL) {
- PyErr_Print();
- Py_FatalError("Py_Initialize: importlib install failed");
- }
- Py_DECREF(value);
- Py_DECREF(impmod);
-
- _PyImportZip_Init();
-}
-
-
-void
-_Py_InitializeEx_Private(int install_sigs, int install_importlib)
-{
- PyInterpreterState *interp;
- PyThreadState *tstate;
- PyObject *bimod, *sysmod, *pstderr;
- char *p;
- extern void _Py_ReadyTypes(void);
-
- if (initialized)
- return;
- initialized = 1;
- _Py_Finalizing = NULL;
-
-#if defined(HAVE_LANGINFO_H) && defined(HAVE_SETLOCALE)
- /* Set up the LC_CTYPE locale, so we can obtain
- the locale's charset without having to switch
- locales. */
- setlocale(LC_CTYPE, "");
-#endif
-
- if ((p = Py_GETENV("PYTHONDEBUG")) && *p != '\0')
- Py_DebugFlag = add_flag(Py_DebugFlag, p);
- if ((p = Py_GETENV("PYTHONVERBOSE")) && *p != '\0')
- Py_VerboseFlag = add_flag(Py_VerboseFlag, p);
- if ((p = Py_GETENV("PYTHONOPTIMIZE")) && *p != '\0')
- Py_OptimizeFlag = add_flag(Py_OptimizeFlag, p);
- if ((p = Py_GETENV("PYTHONDONTWRITEBYTECODE")) && *p != '\0')
- Py_DontWriteBytecodeFlag = add_flag(Py_DontWriteBytecodeFlag, p);
- /* The variable is only tested for existence here; _PyRandom_Init will
- check its value further. */
- if ((p = Py_GETENV("PYTHONHASHSEED")) && *p != '\0')
- Py_HashRandomizationFlag = add_flag(Py_HashRandomizationFlag, p);
-
- _PyRandom_Init();
-
- interp = PyInterpreterState_New();
- if (interp == NULL)
- Py_FatalError("Py_Initialize: can't make first interpreter");
-
- tstate = PyThreadState_New(interp);
- if (tstate == NULL)
- Py_FatalError("Py_Initialize: can't make first thread");
- (void) PyThreadState_Swap(tstate);
-
-#ifdef WITH_THREAD
- /* We can't call _PyEval_FiniThreads() in Py_Finalize because
- destroying the GIL might fail when it is being referenced from
- another running thread (see issue #9901).
- Instead we destroy the previously created GIL here, which ensures
- that we can call Py_Initialize / Py_Finalize multiple times. */
- _PyEval_FiniThreads();
-
- /* Auto-thread-state API */
- _PyGILState_Init(interp, tstate);
-#endif /* WITH_THREAD */
-
- _Py_ReadyTypes();
-
- if (!_PyFrame_Init())
- Py_FatalError("Py_Initialize: can't init frames");
-
- if (!_PyLong_Init())
- Py_FatalError("Py_Initialize: can't init longs");
-
- if (!PyByteArray_Init())
- Py_FatalError("Py_Initialize: can't init bytearray");
-
- if (!_PyFloat_Init())
- Py_FatalError("Py_Initialize: can't init float");
-
- interp->modules = PyDict_New();
- if (interp->modules == NULL)
- Py_FatalError("Py_Initialize: can't make modules dictionary");
-
- /* Init Unicode implementation; relies on the codec registry */
- if (_PyUnicode_Init() < 0)
- Py_FatalError("Py_Initialize: can't initialize unicode");
- if (_PyStructSequence_Init() < 0)
- Py_FatalError("Py_Initialize: can't initialize structseq");
-
- bimod = _PyBuiltin_Init();
- if (bimod == NULL)
- Py_FatalError("Py_Initialize: can't initialize builtins modules");
- _PyImport_FixupBuiltin(bimod, "builtins");
- interp->builtins = PyModule_GetDict(bimod);
- if (interp->builtins == NULL)
- Py_FatalError("Py_Initialize: can't initialize builtins dict");
- Py_INCREF(interp->builtins);
-
- /* initialize builtin exceptions */
- _PyExc_Init(bimod);
-
- sysmod = _PySys_Init();
- if (sysmod == NULL)
- Py_FatalError("Py_Initialize: can't initialize sys");
- interp->sysdict = PyModule_GetDict(sysmod);
- if (interp->sysdict == NULL)
- Py_FatalError("Py_Initialize: can't initialize sys dict");
- Py_INCREF(interp->sysdict);
- _PyImport_FixupBuiltin(sysmod, "sys");
- PySys_SetPath(Py_GetPath());
- PyDict_SetItemString(interp->sysdict, "modules",
- interp->modules);
-
- /* Set up a preliminary stderr printer until we have enough
- infrastructure for the io module in place. */
- pstderr = PyFile_NewStdPrinter(fileno(stderr));
- if (pstderr == NULL)
- Py_FatalError("Py_Initialize: can't set preliminary stderr");
- _PySys_SetObjectId(&PyId_stderr, pstderr);
- PySys_SetObject("__stderr__", pstderr);
- Py_DECREF(pstderr);
-
- _PyImport_Init();
-
- _PyImportHooks_Init();
-
- /* Initialize _warnings. */
- _PyWarnings_Init();
-
- if (!install_importlib)
- return;
-
- import_init(interp, sysmod);
-
- /* initialize the faulthandler module */
- if (_PyFaulthandler_Init())
- Py_FatalError("Py_Initialize: can't initialize faulthandler");
-
- _PyTime_Init();
-
- if (initfsencoding(interp) < 0)
- Py_FatalError("Py_Initialize: unable to load the file system codec");
-
- if (install_sigs)
- initsigs(); /* Signal handling stuff, including initintr() */
-
- if (_PyTraceMalloc_Init() < 0)
- Py_FatalError("Py_Initialize: can't initialize tracemalloc");
-
- initmain(interp); /* Module __main__ */
- if (initstdio() < 0)
- Py_FatalError(
- "Py_Initialize: can't initialize sys standard streams");
-
- /* Initialize warnings. */
- if (PySys_HasWarnOptions()) {
- PyObject *warnings_module = PyImport_ImportModule("warnings");
- if (warnings_module == NULL) {
- fprintf(stderr, "'import warnings' failed; traceback:\n");
- PyErr_Print();
- }
- Py_XDECREF(warnings_module);
- }
-
- if (!Py_NoSiteFlag)
- initsite(); /* Module site */
-}
-
-void
-Py_InitializeEx(int install_sigs)
-{
- _Py_InitializeEx_Private(install_sigs, 1);
-}
-
-void
-Py_Initialize(void)
-{
- Py_InitializeEx(1);
-}
-
-
-#ifdef COUNT_ALLOCS
-extern void dump_counts(FILE*);
-#endif
-
-/* Flush stdout and stderr */
-
-static int
-file_is_closed(PyObject *fobj)
-{
- int r;
- PyObject *tmp = PyObject_GetAttrString(fobj, "closed");
- if (tmp == NULL) {
- PyErr_Clear();
- return 0;
- }
- r = PyObject_IsTrue(tmp);
- Py_DECREF(tmp);
- if (r < 0)
- PyErr_Clear();
- return r > 0;
-}
-
-static void
-flush_std_files(void)
-{
- PyObject *fout = _PySys_GetObjectId(&PyId_stdout);
- PyObject *ferr = _PySys_GetObjectId(&PyId_stderr);
- PyObject *tmp;
-
- if (fout != NULL && fout != Py_None && !file_is_closed(fout)) {
- tmp = _PyObject_CallMethodId(fout, &PyId_flush, "");
- if (tmp == NULL)
- PyErr_WriteUnraisable(fout);
- else
- Py_DECREF(tmp);
- }
-
- if (ferr != NULL && ferr != Py_None && !file_is_closed(ferr)) {
- tmp = _PyObject_CallMethodId(ferr, &PyId_flush, "");
- if (tmp == NULL)
- PyErr_Clear();
- else
- Py_DECREF(tmp);
- }
-}
-
-/* Undo the effect of Py_Initialize().
-
- Beware: if multiple interpreter and/or thread states exist, these
- are not wiped out; only the current thread and interpreter state
- are deleted. But since everything else is deleted, those other
- interpreter and thread states should no longer be used.
-
- (XXX We should do better, e.g. wipe out all interpreters and
- threads.)
-
- Locking: as above.
-
-*/
-
-void
-Py_Finalize(void)
-{
- PyInterpreterState *interp;
- PyThreadState *tstate;
-
- if (!initialized)
- return;
-
- wait_for_thread_shutdown();
-
- /* The interpreter is still entirely intact at this point, and the
- * exit funcs may be relying on that. In particular, if some thread
- * or exit func is still waiting to do an import, the import machinery
- * expects Py_IsInitialized() to return true. So don't say the
- * interpreter is uninitialized until after the exit funcs have run.
- * Note that Threading.py uses an exit func to do a join on all the
- * threads created thru it, so this also protects pending imports in
- * the threads created via Threading.
- */
- call_py_exitfuncs();
-
- /* Get current thread state and interpreter pointer */
- tstate = PyThreadState_GET();
- interp = tstate->interp;
-
- /* Remaining threads (e.g. daemon threads) will automatically exit
- after taking the GIL (in PyEval_RestoreThread()). */
- _Py_Finalizing = tstate;
- initialized = 0;
-
- /* Flush sys.stdout and sys.stderr */
- flush_std_files();
-
- /* Disable signal handling */
- PyOS_FiniInterrupts();
-
- /* Collect garbage. This may call finalizers; it's nice to call these
- * before all modules are destroyed.
- * XXX If a __del__ or weakref callback is triggered here, and tries to
- * XXX import a module, bad things can happen, because Python no
- * XXX longer believes it's initialized.
- * XXX Fatal Python error: Interpreter not initialized (version mismatch?)
- * XXX is easy to provoke that way. I've also seen, e.g.,
- * XXX Exception exceptions.ImportError: 'No module named sha'
- * XXX in <function callback at 0x008F5718> ignored
- * XXX but I'm unclear on exactly how that one happens. In any case,
- * XXX I haven't seen a real-life report of either of these.
- */
- PyGC_Collect();
-#ifdef COUNT_ALLOCS
- /* With COUNT_ALLOCS, it helps to run GC multiple times:
- each collection might release some types from the type
- list, so they become garbage. */
- while (PyGC_Collect() > 0)
- /* nothing */;
-#endif
- /* Destroy all modules */
- PyImport_Cleanup();
-
- /* Flush sys.stdout and sys.stderr (again, in case more was printed) */
- flush_std_files();
-
- /* Collect final garbage. This disposes of cycles created by
- * class definitions, for example.
- * XXX This is disabled because it caused too many problems. If
- * XXX a __del__ or weakref callback triggers here, Python code has
- * XXX a hard time running, because even the sys module has been
- * XXX cleared out (sys.stdout is gone, sys.excepthook is gone, etc).
- * XXX One symptom is a sequence of information-free messages
- * XXX coming from threads (if a __del__ or callback is invoked,
- * XXX other threads can execute too, and any exception they encounter
- * XXX triggers a comedy of errors as subsystem after subsystem
- * XXX fails to find what it *expects* to find in sys to help report
- * XXX the exception and consequent unexpected failures). I've also
- * XXX seen segfaults then, after adding print statements to the
- * XXX Python code getting called.
- */
-#if 0
- PyGC_Collect();
-#endif
-
- /* Disable tracemalloc after all Python objects have been destroyed,
- so it is possible to use tracemalloc in objects destructor. */
- _PyTraceMalloc_Fini();
-
- /* Destroy the database used by _PyImport_{Fixup,Find}Extension */
- _PyImport_Fini();
-
- /* Cleanup typeobject.c's internal caches. */
- _PyType_Fini();
-
- /* unload faulthandler module */
- _PyFaulthandler_Fini();
-
- /* Debugging stuff */
-#ifdef COUNT_ALLOCS
- dump_counts(stdout);
-#endif
- /* dump hash stats */
- _PyHash_Fini();
-
- PRINT_TOTAL_REFS();
-
-#ifdef Py_TRACE_REFS
- /* Display all objects still alive -- this can invoke arbitrary
- * __repr__ overrides, so requires a mostly-intact interpreter.
- * Alas, a lot of stuff may still be alive now that will be cleaned
- * up later.
- */
- if (Py_GETENV("PYTHONDUMPREFS"))
- _Py_PrintReferences(stderr);
-#endif /* Py_TRACE_REFS */
-
- /* Clear interpreter state and all thread states. */
- PyInterpreterState_Clear(interp);
-
- /* Now we decref the exception classes. After this point nothing
- can raise an exception. That's okay, because each Fini() method
- below has been checked to make sure no exceptions are ever
- raised.
- */
-
- _PyExc_Fini();
-
- /* Sundry finalizers */
- PyMethod_Fini();
- PyFrame_Fini();
- PyCFunction_Fini();
- PyTuple_Fini();
- PyList_Fini();
- PySet_Fini();
- PyBytes_Fini();
- PyByteArray_Fini();
- PyLong_Fini();
- PyFloat_Fini();
- PyDict_Fini();
- PySlice_Fini();
- _PyGC_Fini();
- _PyRandom_Fini();
-
- /* Cleanup Unicode implementation */
- _PyUnicode_Fini();
-
- /* reset file system default encoding */
- if (!Py_HasFileSystemDefaultEncoding && Py_FileSystemDefaultEncoding) {
- PyMem_RawFree((char*)Py_FileSystemDefaultEncoding);
- Py_FileSystemDefaultEncoding = NULL;
- }
-
- /* XXX Still allocated:
- - various static ad-hoc pointers to interned strings
- - int and float free list blocks
- - whatever various modules and libraries allocate
- */
-
- PyGrammar_RemoveAccelerators(&_PyParser_Grammar);
-
- /* Cleanup auto-thread-state */
-#ifdef WITH_THREAD
- _PyGILState_Fini();
-#endif /* WITH_THREAD */
-
- /* Delete current thread. After this, many C API calls become crashy. */
- PyThreadState_Swap(NULL);
- PyInterpreterState_Delete(interp);
-
-#ifdef Py_TRACE_REFS
- /* Display addresses (& refcnts) of all objects still alive.
- * An address can be used to find the repr of the object, printed
- * above by _Py_PrintReferences.
- */
- if (Py_GETENV("PYTHONDUMPREFS"))
- _Py_PrintReferenceAddresses(stderr);
-#endif /* Py_TRACE_REFS */
-#ifdef PYMALLOC_DEBUG
- if (Py_GETENV("PYTHONMALLOCSTATS"))
- _PyObject_DebugMallocStats(stderr);
-#endif
-
- call_ll_exitfuncs();
-}
-
-/* Create and initialize a new interpreter and thread, and return the
- new thread. This requires that Py_Initialize() has been called
- first.
-
- Unsuccessful initialization yields a NULL pointer. Note that *no*
- exception information is available even in this case -- the
- exception information is held in the thread, and there is no
- thread.
-
- Locking: as above.
-
-*/
-
-PyThreadState *
-Py_NewInterpreter(void)
-{
- PyInterpreterState *interp;
- PyThreadState *tstate, *save_tstate;
- PyObject *bimod, *sysmod;
-
- if (!initialized)
- Py_FatalError("Py_NewInterpreter: call Py_Initialize first");
-
- interp = PyInterpreterState_New();
- if (interp == NULL)
- return NULL;
-
- tstate = PyThreadState_New(interp);
- if (tstate == NULL) {
- PyInterpreterState_Delete(interp);
- return NULL;
- }
-
- save_tstate = PyThreadState_Swap(tstate);
-
- /* XXX The following is lax in error checking */
-
- interp->modules = PyDict_New();
-
- bimod = _PyImport_FindBuiltin("builtins");
- if (bimod != NULL) {
- interp->builtins = PyModule_GetDict(bimod);
- if (interp->builtins == NULL)
- goto handle_error;
- Py_INCREF(interp->builtins);
- }
-
- /* initialize builtin exceptions */
- _PyExc_Init(bimod);
-
- sysmod = _PyImport_FindBuiltin("sys");
- if (bimod != NULL && sysmod != NULL) {
- PyObject *pstderr;
-
- interp->sysdict = PyModule_GetDict(sysmod);
- if (interp->sysdict == NULL)
- goto handle_error;
- Py_INCREF(interp->sysdict);
- PySys_SetPath(Py_GetPath());
- PyDict_SetItemString(interp->sysdict, "modules",
- interp->modules);
- /* Set up a preliminary stderr printer until we have enough
- infrastructure for the io module in place. */
- pstderr = PyFile_NewStdPrinter(fileno(stderr));
- if (pstderr == NULL)
- Py_FatalError("Py_Initialize: can't set preliminary stderr");
- _PySys_SetObjectId(&PyId_stderr, pstderr);
- PySys_SetObject("__stderr__", pstderr);
- Py_DECREF(pstderr);
-
- _PyImportHooks_Init();
-
- import_init(interp, sysmod);
-
- if (initfsencoding(interp) < 0)
- goto handle_error;
-
- if (initstdio() < 0)
- Py_FatalError(
- "Py_Initialize: can't initialize sys standard streams");
- initmain(interp);
- if (!Py_NoSiteFlag)
- initsite();
- }
-
- if (!PyErr_Occurred())
- return tstate;
-
-handle_error:
- /* Oops, it didn't work. Undo it all. */
-
- PyErr_PrintEx(0);
- PyThreadState_Clear(tstate);
- PyThreadState_Swap(save_tstate);
- PyThreadState_Delete(tstate);
- PyInterpreterState_Delete(interp);
-
- return NULL;
-}
-
-/* Delete an interpreter and its last thread. This requires that the
- given thread state is current, that the thread has no remaining
- frames, and that it is its interpreter's only remaining thread.
- It is a fatal error to violate these constraints.
-
- (Py_Finalize() doesn't have these constraints -- it zaps
- everything, regardless.)
-
- Locking: as above.
-
-*/
-
-void
-Py_EndInterpreter(PyThreadState *tstate)
-{
- PyInterpreterState *interp = tstate->interp;
-
- if (tstate != PyThreadState_GET())
- Py_FatalError("Py_EndInterpreter: thread is not current");
- if (tstate->frame != NULL)
- Py_FatalError("Py_EndInterpreter: thread still has a frame");
-
- wait_for_thread_shutdown();
-
- if (tstate != interp->tstate_head || tstate->next != NULL)
- Py_FatalError("Py_EndInterpreter: not the last thread");
-
- PyImport_Cleanup();
- PyInterpreterState_Clear(interp);
- PyThreadState_Swap(NULL);
- PyInterpreterState_Delete(interp);
-}
-
-#ifdef MS_WINDOWS
-static wchar_t *progname = L"python";
-#else
-static wchar_t *progname = L"python3";
-#endif
-
-void
-Py_SetProgramName(wchar_t *pn)
-{
- if (pn && *pn)
- progname = pn;
-}
-
-wchar_t *
-Py_GetProgramName(void)
-{
- return progname;
-}
-
-static wchar_t *default_home = NULL;
-static wchar_t env_home[MAXPATHLEN+1];
-
-void
-Py_SetPythonHome(wchar_t *home)
-{
- default_home = home;
-}
-
-wchar_t *
-Py_GetPythonHome(void)
-{
- wchar_t *home = default_home;
- if (home == NULL && !Py_IgnoreEnvironmentFlag) {
- char* chome = Py_GETENV("PYTHONHOME");
- if (chome) {
- size_t size = Py_ARRAY_LENGTH(env_home);
- size_t r = mbstowcs(env_home, chome, size);
- if (r != (size_t)-1 && r < size)
- home = env_home;
- }
-
- }
- return home;
-}
-
-/* Create __main__ module */
-
-static void
-initmain(PyInterpreterState *interp)
-{
- PyObject *m, *d, *loader;
- m = PyImport_AddModule("__main__");
- if (m == NULL)
- Py_FatalError("can't create __main__ module");
- d = PyModule_GetDict(m);
- if (PyDict_GetItemString(d, "__builtins__") == NULL) {
- PyObject *bimod = PyImport_ImportModule("builtins");
- if (bimod == NULL) {
- Py_FatalError("Failed to retrieve builtins module");
- }
- if (PyDict_SetItemString(d, "__builtins__", bimod) < 0) {
- Py_FatalError("Failed to initialize __main__.__builtins__");
- }
- Py_DECREF(bimod);
- }
- /* Main is a little special - imp.is_builtin("__main__") will return
- * False, but BuiltinImporter is still the most appropriate initial
- * setting for its __loader__ attribute. A more suitable value will
- * be set if __main__ gets further initialized later in the startup
- * process.
- */
- loader = PyDict_GetItemString(d, "__loader__");
- if (loader == NULL || loader == Py_None) {
- PyObject *loader = PyObject_GetAttrString(interp->importlib,
- "BuiltinImporter");
- if (loader == NULL) {
- Py_FatalError("Failed to retrieve BuiltinImporter");
- }
- if (PyDict_SetItemString(d, "__loader__", loader) < 0) {
- Py_FatalError("Failed to initialize __main__.__loader__");
- }
- Py_DECREF(loader);
- }
-}
-
-static int
-initfsencoding(PyInterpreterState *interp)
-{
- PyObject *codec;
-
- if (Py_FileSystemDefaultEncoding == NULL)
- {
- Py_FileSystemDefaultEncoding = get_locale_encoding();
- if (Py_FileSystemDefaultEncoding == NULL)
- Py_FatalError("Py_Initialize: Unable to get the locale encoding");
-
- Py_HasFileSystemDefaultEncoding = 0;
- interp->fscodec_initialized = 1;
- return 0;
- }
-
- /* the encoding is mbcs, utf-8 or ascii */
- codec = _PyCodec_Lookup(Py_FileSystemDefaultEncoding);
- if (!codec) {
- /* Such error can only occurs in critical situations: no more
- * memory, import a module of the standard library failed,
- * etc. */
- return -1;
- }
- Py_DECREF(codec);
- interp->fscodec_initialized = 1;
- return 0;
-}
-
-/* Import the site module (not into __main__ though) */
-
-static void
-initsite(void)
-{
- PyObject *m;
- m = PyImport_ImportModule("site");
- if (m == NULL) {
- fprintf(stderr, "Failed to import the site module\n");
- PyErr_Print();
- Py_Finalize();
- exit(1);
- }
- else {
- Py_DECREF(m);
- }
-}
-
-/* Check if a file descriptor is valid or not.
- Return 0 if the file descriptor is invalid, return non-zero otherwise. */
-static int
-is_valid_fd(int fd)
-{
- int fd2;
- if (fd < 0 || !_PyVerify_fd(fd))
- return 0;
- fd2 = dup(fd);
- if (fd2 >= 0)
- close(fd2);
- return fd2 >= 0;
-}
-
-/* returns Py_None if the fd is not valid */
-static PyObject*
-create_stdio(PyObject* io,
- int fd, int write_mode, char* name,
- char* encoding, char* errors)
-{
- PyObject *buf = NULL, *stream = NULL, *text = NULL, *raw = NULL, *res;
- const char* mode;
- const char* newline;
- PyObject *line_buffering;
- int buffering, isatty;
- _Py_IDENTIFIER(open);
- _Py_IDENTIFIER(isatty);
- _Py_IDENTIFIER(TextIOWrapper);
- _Py_IDENTIFIER(mode);
-
- if (!is_valid_fd(fd))
- Py_RETURN_NONE;
-
- /* stdin is always opened in buffered mode, first because it shouldn't
- make a difference in common use cases, second because TextIOWrapper
- depends on the presence of a read1() method which only exists on
- buffered streams.
- */
- if (Py_UnbufferedStdioFlag && write_mode)
- buffering = 0;
- else
- buffering = -1;
- if (write_mode)
- mode = "wb";
- else
- mode = "rb";
- buf = _PyObject_CallMethodId(io, &PyId_open, "isiOOOi",
- fd, mode, buffering,
- Py_None, Py_None, Py_None, 0);
- if (buf == NULL)
- goto error;
-
- if (buffering) {
- _Py_IDENTIFIER(raw);
- raw = _PyObject_GetAttrId(buf, &PyId_raw);
- if (raw == NULL)
- goto error;
- }
- else {
- raw = buf;
- Py_INCREF(raw);
- }
-
- text = PyUnicode_FromString(name);
- if (text == NULL || _PyObject_SetAttrId(raw, &PyId_name, text) < 0)
- goto error;
- res = _PyObject_CallMethodId(raw, &PyId_isatty, "");
- if (res == NULL)
- goto error;
- isatty = PyObject_IsTrue(res);
- Py_DECREF(res);
- if (isatty == -1)
- goto error;
- if (isatty || Py_UnbufferedStdioFlag)
- line_buffering = Py_True;
- else
- line_buffering = Py_False;
-
- Py_CLEAR(raw);
- Py_CLEAR(text);
-
-#ifdef MS_WINDOWS
- /* sys.stdin: enable universal newline mode, translate "\r\n" and "\r"
- newlines to "\n".
- sys.stdout and sys.stderr: translate "\n" to "\r\n". */
- newline = NULL;
-#else
- /* sys.stdin: split lines at "\n".
- sys.stdout and sys.stderr: don't translate newlines (use "\n"). */
- newline = "\n";
-#endif
-
- stream = _PyObject_CallMethodId(io, &PyId_TextIOWrapper, "OsssO",
- buf, encoding, errors,
- newline, line_buffering);
- Py_CLEAR(buf);
- if (stream == NULL)
- goto error;
-
- if (write_mode)
- mode = "w";
- else
- mode = "r";
- text = PyUnicode_FromString(mode);
- if (!text || _PyObject_SetAttrId(stream, &PyId_mode, text) < 0)
- goto error;
- Py_CLEAR(text);
- return stream;
-
-error:
- Py_XDECREF(buf);
- Py_XDECREF(stream);
- Py_XDECREF(text);
- Py_XDECREF(raw);
-
- if (PyErr_ExceptionMatches(PyExc_OSError) && !is_valid_fd(fd)) {
- /* Issue #24891: the file descriptor was closed after the first
- is_valid_fd() check was called. Ignore the OSError and set the
- stream to None. */
- PyErr_Clear();
- Py_RETURN_NONE;
- }
- return NULL;
-}
-
-/* Initialize sys.stdin, stdout, stderr and builtins.open */
-static int
-initstdio(void)
-{
- PyObject *iomod = NULL, *wrapper;
- PyObject *bimod = NULL;
- PyObject *m;
- PyObject *std = NULL;
- int status = 0, fd;
- PyObject * encoding_attr;
- char *pythonioencoding = NULL, *encoding, *errors;
-
- /* Hack to avoid a nasty recursion issue when Python is invoked
- in verbose mode: pre-import the Latin-1 and UTF-8 codecs */
- if ((m = PyImport_ImportModule("encodings.utf_8")) == NULL) {
- goto error;
- }
- Py_DECREF(m);
-
- if (!(m = PyImport_ImportModule("encodings.latin_1"))) {
- goto error;
- }
- Py_DECREF(m);
-
- if (!(bimod = PyImport_ImportModule("builtins"))) {
- goto error;
- }
-
- if (!(iomod = PyImport_ImportModule("io"))) {
- goto error;
- }
- if (!(wrapper = PyObject_GetAttrString(iomod, "OpenWrapper"))) {
- goto error;
- }
-
- /* Set builtins.open */
- if (PyObject_SetAttrString(bimod, "open", wrapper) == -1) {
- Py_DECREF(wrapper);
- goto error;
- }
- Py_DECREF(wrapper);
-
- encoding = _Py_StandardStreamEncoding;
- errors = _Py_StandardStreamErrors;
- if (!encoding || !errors) {
- pythonioencoding = Py_GETENV("PYTHONIOENCODING");
- if (pythonioencoding) {
- char *err;
- pythonioencoding = _PyMem_Strdup(pythonioencoding);
- if (pythonioencoding == NULL) {
- PyErr_NoMemory();
- goto error;
- }
- err = strchr(pythonioencoding, ':');
- if (err) {
- *err = '\0';
- err++;
- if (*err && !errors) {
- errors = err;
- }
- }
- if (*pythonioencoding && !encoding) {
- encoding = pythonioencoding;
- }
- }
- }
-
- /* Set sys.stdin */
- fd = fileno(stdin);
- /* Under some conditions stdin, stdout and stderr may not be connected
- * and fileno() may point to an invalid file descriptor. For example
- * GUI apps don't have valid standard streams by default.
- */
- std = create_stdio(iomod, fd, 0, "<stdin>", encoding, errors);
- if (std == NULL)
- goto error;
- PySys_SetObject("__stdin__", std);
- _PySys_SetObjectId(&PyId_stdin, std);
- Py_DECREF(std);
-
- /* Set sys.stdout */
- fd = fileno(stdout);
- std = create_stdio(iomod, fd, 1, "<stdout>", encoding, errors);
- if (std == NULL)
- goto error;
- PySys_SetObject("__stdout__", std);
- _PySys_SetObjectId(&PyId_stdout, std);
- Py_DECREF(std);
-
-#if 1 /* Disable this if you have trouble debugging bootstrap stuff */
- /* Set sys.stderr, replaces the preliminary stderr */
- fd = fileno(stderr);
- std = create_stdio(iomod, fd, 1, "<stderr>", encoding, "backslashreplace");
- if (std == NULL)
- goto error;
-
- /* Same as hack above, pre-import stderr's codec to avoid recursion
- when import.c tries to write to stderr in verbose mode. */
- encoding_attr = PyObject_GetAttrString(std, "encoding");
- if (encoding_attr != NULL) {
- const char * std_encoding;
- std_encoding = _PyUnicode_AsString(encoding_attr);
- if (std_encoding != NULL) {
- PyObject *codec_info = _PyCodec_Lookup(std_encoding);
- Py_XDECREF(codec_info);
- }
- Py_DECREF(encoding_attr);
- }
- PyErr_Clear(); /* Not a fatal error if codec isn't available */
-
- if (PySys_SetObject("__stderr__", std) < 0) {
- Py_DECREF(std);
- goto error;
- }
- if (_PySys_SetObjectId(&PyId_stderr, std) < 0) {
- Py_DECREF(std);
- goto error;
- }
- Py_DECREF(std);
-#endif
-
- if (0) {
- error:
- status = -1;
- }
-
- /* We won't need them anymore. */
- if (_Py_StandardStreamEncoding) {
- PyMem_RawFree(_Py_StandardStreamEncoding);
- _Py_StandardStreamEncoding = NULL;
- }
- if (_Py_StandardStreamErrors) {
- PyMem_RawFree(_Py_StandardStreamErrors);
- _Py_StandardStreamErrors = NULL;
- }
- PyMem_Free(pythonioencoding);
- Py_XDECREF(bimod);
- Py_XDECREF(iomod);
- return status;
-}
/* Parse input from a file and execute it */
@@ -1317,7 +110,7 @@ PyRun_InteractiveLoopFlags(FILE *fp, const char *filename_str, PyCompilerFlags *
err = -1;
for (;;) {
ret = PyRun_InteractiveOneObject(fp, filename, flags);
- PRINT_TOTAL_REFS();
+ _PY_DEBUG_PRINT_TOTAL_REFS();
if (ret == E_EOF) {
err = 0;
break;
@@ -1472,7 +265,7 @@ PyRun_InteractiveOneFlags(FILE *fp, const char *filename_str, PyCompilerFlags *f
static int
maybe_pyc_file(FILE *fp, const char* filename, const char* ext, int closeit)
{
- if (strcmp(ext, ".pyc") == 0 || strcmp(ext, ".pyo") == 0)
+ if (strcmp(ext, ".pyc") == 0)
return 1;
/* Only look into the file if we are allowed to close it, since
@@ -1511,7 +304,7 @@ set_main_loader(PyObject *d, const char *filename, const char *loader_name)
{
PyInterpreterState *interp;
PyThreadState *tstate;
- PyObject *filename_obj, *loader_type, *loader;
+ PyObject *filename_obj, *bootstrap, *loader_type = NULL, *loader;
int result = 0;
filename_obj = PyUnicode_DecodeFSDefault(filename);
@@ -1520,7 +313,12 @@ set_main_loader(PyObject *d, const char *filename, const char *loader_name)
/* Get current thread state and interpreter pointer */
tstate = PyThreadState_GET();
interp = tstate->interp;
- loader_type = PyObject_GetAttrString(interp->importlib, loader_name);
+ bootstrap = PyObject_GetAttrString(interp->importlib,
+ "_bootstrap_external");
+ if (bootstrap != NULL) {
+ loader_type = PyObject_GetAttrString(bootstrap, loader_name);
+ Py_DECREF(bootstrap);
+ }
if (loader_type == NULL) {
Py_DECREF(filename_obj);
return -1;
@@ -1578,9 +376,6 @@ PyRun_SimpleFileExFlags(FILE *fp, const char *filename, int closeit,
fprintf(stderr, "python: Can't reopen .pyc file\n");
goto done;
}
- /* Turn on optimization if a .pyo file is given */
- if (strcmp(ext, ".pyo") == 0)
- Py_OptimizeFlag = 1;
if (set_main_loader(d, filename, "SourcelessFileLoader") < 0) {
fprintf(stderr, "python: failed to set __main__.__loader__\n");
@@ -1724,7 +519,7 @@ print_error_text(PyObject *f, int offset, PyObject *text_obj)
return;
if (offset >= 0) {
- if (offset > 0 && offset == strlen(text) && text[offset - 1] == '\n')
+ if (offset > 0 && (size_t)offset == strlen(text) && text[offset - 1] == '\n')
offset--;
for (;;) {
nl = strchr(text, '\n');
@@ -1971,8 +766,11 @@ print_exception(PyObject *f, PyObject *value)
/* only print colon if the str() of the
object is not the empty string
*/
- if (s == NULL)
+ if (s == NULL) {
+ PyErr_Clear();
err = -1;
+ PyFile_WriteString(": <exception str() failed>", f);
+ }
else if (!PyUnicode_Check(s) ||
PyUnicode_GetLength(s) != 0)
err = PyFile_WriteString(": ", f);
@@ -1981,6 +779,9 @@ print_exception(PyObject *f, PyObject *value)
Py_XDECREF(s);
}
/* try to write a newline in any case */
+ if (err < 0) {
+ PyErr_Clear();
+ }
err += PyFile_WriteString("\n", f);
Py_XDECREF(tb);
Py_DECREF(value);
@@ -2188,13 +989,17 @@ run_pyc_file(FILE *fp, const char *filename, PyObject *globals,
magic = PyMarshal_ReadLongFromFile(fp);
if (magic != PyImport_GetMagicNumber()) {
- PyErr_SetString(PyExc_RuntimeError,
- "Bad magic number in .pyc file");
+ if (!PyErr_Occurred())
+ PyErr_SetString(PyExc_RuntimeError,
+ "Bad magic number in .pyc file");
return NULL;
}
/* Skip mtime and size */
(void) PyMarshal_ReadLongFromFile(fp);
(void) PyMarshal_ReadLongFromFile(fp);
+ if (PyErr_Occurred())
+ return NULL;
+
v = PyMarshal_ReadLastObjectFromFile(fp);
if (v == NULL || !PyCode_Check(v)) {
Py_XDECREF(v);
@@ -2582,276 +1387,6 @@ cleanup:
}
}
-/* Print the current exception (if an exception is set) with its traceback,
- * or display the current Python stack.
- *
- * Don't call PyErr_PrintEx() and the except hook, because Py_FatalError() is
- * called on catastrophic cases. */
-
-static void
-_Py_PrintFatalError(int fd)
-{
- PyObject *ferr, *res;
- PyObject *exception, *v, *tb;
- int has_tb;
- PyThreadState *tstate;
-
- PyErr_Fetch(&exception, &v, &tb);
- if (exception == NULL) {
- /* No current exception */
- goto display_stack;
- }
-
- ferr = _PySys_GetObjectId(&PyId_stderr);
- if (ferr == NULL || ferr == Py_None) {
- /* sys.stderr is not set yet or set to None,
- no need to try to display the exception */
- goto display_stack;
- }
-
- PyErr_NormalizeException(&exception, &v, &tb);
- if (tb == NULL) {
- tb = Py_None;
- Py_INCREF(tb);
- }
- PyException_SetTraceback(v, tb);
- if (exception == NULL) {
- /* PyErr_NormalizeException() failed */
- goto display_stack;
- }
-
- has_tb = (tb != NULL && tb != Py_None);
- PyErr_Display(exception, v, tb);
- Py_XDECREF(exception);
- Py_XDECREF(v);
- Py_XDECREF(tb);
-
- /* sys.stderr may be buffered: call sys.stderr.flush() */
- res = _PyObject_CallMethodId(ferr, &PyId_flush, "");
- if (res == NULL)
- PyErr_Clear();
- else
- Py_DECREF(res);
-
- if (has_tb)
- return;
-
-display_stack:
-#ifdef WITH_THREAD
- /* PyGILState_GetThisThreadState() works even if the GIL was released */
- tstate = PyGILState_GetThisThreadState();
-#else
- tstate = PyThreadState_GET();
-#endif
- if (tstate == NULL) {
- /* _Py_DumpTracebackThreads() requires the thread state to display
- * frames */
- return;
- }
-
- fputc('\n', stderr);
- fflush(stderr);
-
- /* display the current Python stack */
- _Py_DumpTracebackThreads(fd, tstate->interp, tstate);
-}
-
-/* Print fatal error message and abort */
-
-void
-Py_FatalError(const char *msg)
-{
- const int fd = fileno(stderr);
- static int reentrant = 0;
-#ifdef MS_WINDOWS
- size_t len;
- WCHAR* buffer;
- size_t i;
-#endif
-
- if (reentrant) {
- /* Py_FatalError() caused a second fatal error.
- Example: flush_std_files() raises a recursion error. */
- goto exit;
- }
- reentrant = 1;
-
- fprintf(stderr, "Fatal Python error: %s\n", msg);
- fflush(stderr); /* it helps in Windows debug build */
-
- /* Print the exception (if an exception is set) with its traceback,
- * or display the current Python stack. */
- _Py_PrintFatalError(fd);
-
- /* Flush sys.stdout and sys.stderr */
- flush_std_files();
-
- /* The main purpose of faulthandler is to display the traceback. We already
- * did our best to display it. So faulthandler can now be disabled.
- * (Don't trigger it on abort().) */
- _PyFaulthandler_Fini();
-
-#ifdef MS_WINDOWS
- len = strlen(msg);
-
- /* Convert the message to wchar_t. This uses a simple one-to-one
- conversion, assuming that the this error message actually uses ASCII
- only. If this ceases to be true, we will have to convert. */
- buffer = alloca( (len+1) * (sizeof *buffer));
- for( i=0; i<=len; ++i)
- buffer[i] = msg[i];
- OutputDebugStringW(L"Fatal Python error: ");
- OutputDebugStringW(buffer);
- OutputDebugStringW(L"\n");
-#endif /* MS_WINDOWS */
-
-exit:
-#if defined(MS_WINDOWS) && defined(_DEBUG)
- DebugBreak();
-#endif
- abort();
-}
-
-/* Clean up and exit */
-
-#ifdef WITH_THREAD
-#include "pythread.h"
-#endif
-
-static void (*pyexitfunc)(void) = NULL;
-/* For the atexit module. */
-void _Py_PyAtExit(void (*func)(void))
-{
- pyexitfunc = func;
-}
-
-static void
-call_py_exitfuncs(void)
-{
- if (pyexitfunc == NULL)
- return;
-
- (*pyexitfunc)();
- PyErr_Clear();
-}
-
-/* Wait until threading._shutdown completes, provided
- the threading module was imported in the first place.
- The shutdown routine will wait until all non-daemon
- "threading" threads have completed. */
-static void
-wait_for_thread_shutdown(void)
-{
-#ifdef WITH_THREAD
- _Py_IDENTIFIER(_shutdown);
- PyObject *result;
- PyThreadState *tstate = PyThreadState_GET();
- PyObject *threading = PyMapping_GetItemString(tstate->interp->modules,
- "threading");
- if (threading == NULL) {
- /* threading not imported */
- PyErr_Clear();
- return;
- }
- result = _PyObject_CallMethodId(threading, &PyId__shutdown, "");
- if (result == NULL) {
- PyErr_WriteUnraisable(threading);
- }
- else {
- Py_DECREF(result);
- }
- Py_DECREF(threading);
-#endif
-}
-
-#define NEXITFUNCS 32
-static void (*exitfuncs[NEXITFUNCS])(void);
-static int nexitfuncs = 0;
-
-int Py_AtExit(void (*func)(void))
-{
- if (nexitfuncs >= NEXITFUNCS)
- return -1;
- exitfuncs[nexitfuncs++] = func;
- return 0;
-}
-
-static void
-call_ll_exitfuncs(void)
-{
- while (nexitfuncs > 0)
- (*exitfuncs[--nexitfuncs])();
-
- fflush(stdout);
- fflush(stderr);
-}
-
-void
-Py_Exit(int sts)
-{
- Py_Finalize();
-
- exit(sts);
-}
-
-static void
-initsigs(void)
-{
-#ifdef SIGPIPE
- PyOS_setsig(SIGPIPE, SIG_IGN);
-#endif
-#ifdef SIGXFZ
- PyOS_setsig(SIGXFZ, SIG_IGN);
-#endif
-#ifdef SIGXFSZ
- PyOS_setsig(SIGXFSZ, SIG_IGN);
-#endif
- PyOS_InitInterrupts(); /* May imply initsignal() */
- if (PyErr_Occurred()) {
- Py_FatalError("Py_Initialize: can't import signal");
- }
-}
-
-
-/* Restore signals that the interpreter has called SIG_IGN on to SIG_DFL.
- *
- * All of the code in this function must only use async-signal-safe functions,
- * listed at `man 7 signal` or
- * http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_04.html.
- */
-void
-_Py_RestoreSignals(void)
-{
-#ifdef SIGPIPE
- PyOS_setsig(SIGPIPE, SIG_DFL);
-#endif
-#ifdef SIGXFZ
- PyOS_setsig(SIGXFZ, SIG_DFL);
-#endif
-#ifdef SIGXFSZ
- PyOS_setsig(SIGXFSZ, SIG_DFL);
-#endif
-}
-
-
-/*
- * The file descriptor fd is considered ``interactive'' if either
- * a) isatty(fd) is TRUE, or
- * b) the -i flag was given, and the filename associated with
- * the descriptor is NULL or "<stdin>" or "???".
- */
-int
-Py_FdIsInteractive(FILE *fp, const char *filename)
-{
- if (isatty((int)fileno(fp)))
- return 1;
- if (!Py_InteractiveFlag)
- return 0;
- return (filename == NULL) ||
- (strcmp(filename, "<stdin>") == 0) ||
- (strcmp(filename, "???") == 0);
-}
-
#if defined(USE_STACKCHECK)
#if defined(WIN32) && defined(_MSC_VER)
@@ -2890,74 +1425,7 @@ PyOS_CheckStack(void)
#endif /* USE_STACKCHECK */
-
-/* Wrappers around sigaction() or signal(). */
-
-PyOS_sighandler_t
-PyOS_getsig(int sig)
-{
-#ifdef HAVE_SIGACTION
- struct sigaction context;
- if (sigaction(sig, NULL, &context) == -1)
- return SIG_ERR;
- return context.sa_handler;
-#else
- PyOS_sighandler_t handler;
-/* Special signal handling for the secure CRT in Visual Studio 2005 */
-#if defined(_MSC_VER) && _MSC_VER >= 1400
- switch (sig) {
- /* Only these signals are valid */
- case SIGINT:
- case SIGILL:
- case SIGFPE:
- case SIGSEGV:
- case SIGTERM:
- case SIGBREAK:
- case SIGABRT:
- break;
- /* Don't call signal() with other values or it will assert */
- default:
- return SIG_ERR;
- }
-#endif /* _MSC_VER && _MSC_VER >= 1400 */
- handler = signal(sig, SIG_IGN);
- if (handler != SIG_ERR)
- signal(sig, handler);
- return handler;
-#endif
-}
-
-/*
- * All of the code in this function must only use async-signal-safe functions,
- * listed at `man 7 signal` or
- * http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_04.html.
- */
-PyOS_sighandler_t
-PyOS_setsig(int sig, PyOS_sighandler_t handler)
-{
-#ifdef HAVE_SIGACTION
- /* Some code in Modules/signalmodule.c depends on sigaction() being
- * used here if HAVE_SIGACTION is defined. Fix that if this code
- * changes to invalidate that assumption.
- */
- struct sigaction context, ocontext;
- context.sa_handler = handler;
- sigemptyset(&context.sa_mask);
- context.sa_flags = 0;
- if (sigaction(sig, &context, &ocontext) == -1)
- return SIG_ERR;
- return ocontext.sa_handler;
-#else
- PyOS_sighandler_t oldhandler;
- oldhandler = signal(sig, handler);
-#ifdef HAVE_SIGINTERRUPT
- siginterrupt(sig, 1);
-#endif
- return oldhandler;
-#endif
-}
-
-/* Deprecated C API functions still provided for binary compatiblity */
+/* Deprecated C API functions still provided for binary compatibility */
#undef PyParser_SimpleParseFile
PyAPI_FUNC(node *)
diff --git a/Python/pytime.c b/Python/pytime.c
index de6a41fe00..7f65824b47 100644
--- a/Python/pytime.c
+++ b/Python/pytime.c
@@ -3,115 +3,25 @@
#include <windows.h>
#endif
-#if defined(__APPLE__) && defined(HAVE_GETTIMEOFDAY) && defined(HAVE_FTIME)
- /*
- * _PyTime_gettimeofday falls back to ftime when getttimeofday fails because the latter
- * might fail on some platforms. This fallback is unwanted on MacOSX because
- * that makes it impossible to use a binary build on OSX 10.4 on earlier
- * releases of the OS. Therefore claim we don't support ftime.
- */
-# undef HAVE_FTIME
+#if defined(__APPLE__)
+#include <mach/mach_time.h> /* mach_absolute_time(), mach_timebase_info() */
#endif
-#if defined(HAVE_FTIME) && !defined(MS_WINDOWS)
-#include <sys/timeb.h>
-extern int ftime(struct timeb *);
-#endif
+/* To millisecond (10^-3) */
+#define SEC_TO_MS 1000
-static void
-pygettimeofday(_PyTime_timeval *tp, _Py_clock_info_t *info)
-{
-#ifdef MS_WINDOWS
- FILETIME system_time;
- ULARGE_INTEGER large;
- ULONGLONG microseconds;
+/* To microseconds (10^-6) */
+#define MS_TO_US 1000
+#define SEC_TO_US (SEC_TO_MS * MS_TO_US)
- GetSystemTimeAsFileTime(&system_time);
- large.u.LowPart = system_time.dwLowDateTime;
- large.u.HighPart = system_time.dwHighDateTime;
- /* 11,644,473,600,000,000: number of microseconds between
- the 1st january 1601 and the 1st january 1970 (369 years + 89 leap
- days). */
- microseconds = large.QuadPart / 10 - 11644473600000000;
- tp->tv_sec = microseconds / 1000000;
- tp->tv_usec = microseconds % 1000000;
- if (info) {
- DWORD timeAdjustment, timeIncrement;
- BOOL isTimeAdjustmentDisabled;
+/* To nanoseconds (10^-9) */
+#define US_TO_NS 1000
+#define MS_TO_NS (MS_TO_US * US_TO_NS)
+#define SEC_TO_NS (SEC_TO_MS * MS_TO_NS)
- info->implementation = "GetSystemTimeAsFileTime()";
- info->monotonic = 0;
- (void) GetSystemTimeAdjustment(&timeAdjustment, &timeIncrement,
- &isTimeAdjustmentDisabled);
- info->resolution = timeIncrement * 1e-7;
- info->adjustable = 1;
- }
-#else
- /* There are three ways to get the time:
- (1) gettimeofday() -- resolution in microseconds
- (2) ftime() -- resolution in milliseconds
- (3) time() -- resolution in seconds
- In all cases the return value in a timeval struct.
- Since on some systems (e.g. SCO ODT 3.0) gettimeofday() may
- fail, so we fall back on ftime() or time().
- Note: clock resolution does not imply clock accuracy! */
-
-#ifdef HAVE_GETTIMEOFDAY
- int err;
-#ifdef GETTIMEOFDAY_NO_TZ
- err = gettimeofday(tp);
-#else
- err = gettimeofday(tp, (struct timezone *)NULL);
-#endif
- if (err == 0) {
- if (info) {
- info->implementation = "gettimeofday()";
- info->resolution = 1e-6;
- info->monotonic = 0;
- info->adjustable = 1;
- }
- return;
- }
-#endif /* HAVE_GETTIMEOFDAY */
-
-#if defined(HAVE_FTIME)
- {
- struct timeb t;
- ftime(&t);
- tp->tv_sec = t.time;
- tp->tv_usec = t.millitm * 1000;
- if (info) {
- info->implementation = "ftime()";
- info->resolution = 1e-3;
- info->monotonic = 0;
- info->adjustable = 1;
- }
- }
-#else /* !HAVE_FTIME */
- tp->tv_sec = time(NULL);
- tp->tv_usec = 0;
- if (info) {
- info->implementation = "time()";
- info->resolution = 1.0;
- info->monotonic = 0;
- info->adjustable = 1;
- }
-#endif /* !HAVE_FTIME */
-
-#endif /* MS_WINDOWS */
-}
-
-void
-_PyTime_gettimeofday(_PyTime_timeval *tp)
-{
- pygettimeofday(tp, NULL);
-}
-
-void
-_PyTime_gettimeofday_info(_PyTime_timeval *tp, _Py_clock_info_t *info)
-{
- pygettimeofday(tp, info);
-}
+/* Conversion from nanoseconds */
+#define NS_TO_MS (1000 * 1000)
+#define NS_TO_US (1000)
static void
error_time_t_overflow(void)
@@ -168,18 +78,16 @@ _PyTime_ObjectToDenominator(PyObject *obj, time_t *sec, long *numerator,
}
floatpart *= denominator;
- if (round == _PyTime_ROUND_UP) {
- if (intpart >= 0) {
- floatpart = ceil(floatpart);
- if (floatpart >= denominator) {
- floatpart = 0.0;
- intpart += 1.0;
- }
- }
- else {
- floatpart = floor(floatpart);
+ if (round == _PyTime_ROUND_CEILING) {
+ floatpart = ceil(floatpart);
+ if (floatpart >= denominator) {
+ floatpart = 0.0;
+ intpart += 1.0;
}
}
+ else {
+ floatpart = floor(floatpart);
+ }
*sec = (time_t)intpart;
err = intpart - (double)*sec;
@@ -207,12 +115,10 @@ _PyTime_ObjectToTime_t(PyObject *obj, time_t *sec, _PyTime_round_t round)
double d, intpart, err;
d = PyFloat_AsDouble(obj);
- if (round == _PyTime_ROUND_UP) {
- if (d >= 0)
- d = ceil(d);
- else
- d = floor(d);
- }
+ if (round == _PyTime_ROUND_CEILING)
+ d = ceil(d);
+ else
+ d = floor(d);
(void)modf(d, &intpart);
*sec = (time_t)intpart;
@@ -245,8 +151,546 @@ _PyTime_ObjectToTimeval(PyObject *obj, time_t *sec, long *usec,
return _PyTime_ObjectToDenominator(obj, sec, usec, 1e6, round);
}
-void
-_PyTime_Init()
+static void
+_PyTime_overflow(void)
+{
+ PyErr_SetString(PyExc_OverflowError,
+ "timestamp too large to convert to C _PyTime_t");
+}
+
+_PyTime_t
+_PyTime_FromSeconds(int seconds)
+{
+ _PyTime_t t;
+ /* ensure that integer overflow cannot happen, int type should have 32
+ bits, whereas _PyTime_t type has at least 64 bits (SEC_TO_MS takes 30
+ bits). */
+ assert((seconds >= 0 && seconds <= _PyTime_MAX / SEC_TO_NS)
+ || (seconds < 0 && seconds >= _PyTime_MIN / SEC_TO_NS));
+ t = (_PyTime_t)seconds * SEC_TO_NS;
+ return t;
+}
+
+_PyTime_t
+_PyTime_FromNanoseconds(PY_LONG_LONG ns)
+{
+ _PyTime_t t;
+ assert(sizeof(PY_LONG_LONG) <= sizeof(_PyTime_t));
+ t = Py_SAFE_DOWNCAST(ns, PY_LONG_LONG, _PyTime_t);
+ return t;
+}
+
+#ifdef HAVE_CLOCK_GETTIME
+static int
+_PyTime_FromTimespec(_PyTime_t *tp, struct timespec *ts, int raise)
+{
+ _PyTime_t t;
+ int res = 0;
+
+ t = (_PyTime_t)ts->tv_sec * SEC_TO_NS;
+ if (t / SEC_TO_NS != ts->tv_sec) {
+ if (raise)
+ _PyTime_overflow();
+ res = -1;
+ }
+
+ t += ts->tv_nsec;
+
+ *tp = t;
+ return res;
+}
+#elif !defined(MS_WINDOWS)
+static int
+_PyTime_FromTimeval(_PyTime_t *tp, struct timeval *tv, int raise)
+{
+ _PyTime_t t;
+ int res = 0;
+
+ t = (_PyTime_t)tv->tv_sec * SEC_TO_NS;
+ if (t / SEC_TO_NS != tv->tv_sec) {
+ if (raise)
+ _PyTime_overflow();
+ res = -1;
+ }
+
+ t += (_PyTime_t)tv->tv_usec * US_TO_NS;
+
+ *tp = t;
+ return res;
+}
+#endif
+
+static int
+_PyTime_FromObject(_PyTime_t *t, PyObject *obj, _PyTime_round_t round,
+ long to_nanoseconds)
+{
+ if (PyFloat_Check(obj)) {
+ /* volatile avoids unsafe optimization on float enabled by gcc -O3 */
+ volatile double d, err;
+
+ /* convert to a number of nanoseconds */
+ d = PyFloat_AsDouble(obj);
+ d *= to_nanoseconds;
+
+ if (round == _PyTime_ROUND_CEILING)
+ d = ceil(d);
+ else
+ d = floor(d);
+
+ *t = (_PyTime_t)d;
+ err = d - (double)*t;
+ if (fabs(err) >= 1.0) {
+ _PyTime_overflow();
+ return -1;
+ }
+ return 0;
+ }
+ else {
+#ifdef HAVE_LONG_LONG
+ PY_LONG_LONG sec;
+ sec = PyLong_AsLongLong(obj);
+ assert(sizeof(PY_LONG_LONG) <= sizeof(_PyTime_t));
+#else
+ long sec;
+ sec = PyLong_AsLong(obj);
+ assert(sizeof(PY_LONG_LONG) <= sizeof(_PyTime_t));
+#endif
+ if (sec == -1 && PyErr_Occurred()) {
+ if (PyErr_ExceptionMatches(PyExc_OverflowError))
+ _PyTime_overflow();
+ return -1;
+ }
+ *t = sec * to_nanoseconds;
+ if (*t / to_nanoseconds != sec) {
+ _PyTime_overflow();
+ return -1;
+ }
+ return 0;
+ }
+}
+
+int
+_PyTime_FromSecondsObject(_PyTime_t *t, PyObject *obj, _PyTime_round_t round)
+{
+ return _PyTime_FromObject(t, obj, round, SEC_TO_NS);
+}
+
+int
+_PyTime_FromMillisecondsObject(_PyTime_t *t, PyObject *obj, _PyTime_round_t round)
+{
+ return _PyTime_FromObject(t, obj, round, MS_TO_NS);
+}
+
+double
+_PyTime_AsSecondsDouble(_PyTime_t t)
+{
+ _PyTime_t sec, ns;
+ /* Divide using integers to avoid rounding issues on the integer part.
+ 1e-9 cannot be stored exactly in IEEE 64-bit. */
+ sec = t / SEC_TO_NS;
+ ns = t % SEC_TO_NS;
+ return (double)sec + (double)ns * 1e-9;
+}
+
+PyObject *
+_PyTime_AsNanosecondsObject(_PyTime_t t)
+{
+#ifdef HAVE_LONG_LONG
+ assert(sizeof(PY_LONG_LONG) >= sizeof(_PyTime_t));
+ return PyLong_FromLongLong((PY_LONG_LONG)t);
+#else
+ assert(sizeof(long) >= sizeof(_PyTime_t));
+ return PyLong_FromLong((long)t);
+#endif
+}
+
+static _PyTime_t
+_PyTime_Divide(const _PyTime_t t, const _PyTime_t k,
+ const _PyTime_round_t round)
+{
+ assert(k > 1);
+ if (round == _PyTime_ROUND_CEILING) {
+ if (t >= 0)
+ return (t + k - 1) / k;
+ else
+ return t / k;
+ }
+ else {
+ if (t >= 0)
+ return t / k;
+ else
+ return (t - (k - 1)) / k;
+ }
+}
+
+_PyTime_t
+_PyTime_AsMilliseconds(_PyTime_t t, _PyTime_round_t round)
+{
+ return _PyTime_Divide(t, NS_TO_MS, round);
+}
+
+_PyTime_t
+_PyTime_AsMicroseconds(_PyTime_t t, _PyTime_round_t round)
+{
+ return _PyTime_Divide(t, NS_TO_US, round);
+}
+
+static int
+_PyTime_AsTimeval_impl(_PyTime_t t, _PyTime_t *p_secs, int *p_us,
+ _PyTime_round_t round)
+{
+ _PyTime_t secs, ns;
+ int usec;
+ int res = 0;
+
+ secs = t / SEC_TO_NS;
+ ns = t % SEC_TO_NS;
+
+ usec = (int)_PyTime_Divide(ns, US_TO_NS, round);
+ if (usec < 0) {
+ usec += SEC_TO_US;
+ if (secs != _PyTime_MIN)
+ secs -= 1;
+ else
+ res = -1;
+ }
+ else if (usec >= SEC_TO_US) {
+ usec -= SEC_TO_US;
+ if (secs != _PyTime_MAX)
+ secs += 1;
+ else
+ res = -1;
+ }
+ assert(0 <= usec && usec < SEC_TO_US);
+
+ *p_secs = secs;
+ *p_us = usec;
+
+ return res;
+}
+
+static int
+_PyTime_AsTimevalStruct_impl(_PyTime_t t, struct timeval *tv,
+ _PyTime_round_t round, int raise)
+{
+ _PyTime_t secs;
+ int us;
+ int res;
+
+ res = _PyTime_AsTimeval_impl(t, &secs, &us, round);
+
+#ifdef MS_WINDOWS
+ tv->tv_sec = (long)secs;
+#else
+ tv->tv_sec = secs;
+#endif
+ tv->tv_usec = us;
+
+ if (res < 0 || (_PyTime_t)tv->tv_sec != secs) {
+ if (raise)
+ error_time_t_overflow();
+ return -1;
+ }
+ return 0;
+}
+
+int
+_PyTime_AsTimeval(_PyTime_t t, struct timeval *tv, _PyTime_round_t round)
{
- /* Do nothing. Needed to force linking. */
+ return _PyTime_AsTimevalStruct_impl(t, tv, round, 1);
+}
+
+int
+_PyTime_AsTimeval_noraise(_PyTime_t t, struct timeval *tv, _PyTime_round_t round)
+{
+ return _PyTime_AsTimevalStruct_impl(t, tv, round, 0);
+}
+
+int
+_PyTime_AsTimevalTime_t(_PyTime_t t, time_t *p_secs, int *us,
+ _PyTime_round_t round)
+{
+ _PyTime_t secs;
+ int res;
+
+ res = _PyTime_AsTimeval_impl(t, &secs, us, round);
+
+ *p_secs = secs;
+
+ if (res < 0 || (_PyTime_t)*p_secs != secs) {
+ error_time_t_overflow();
+ return -1;
+ }
+ return 0;
+}
+
+#if defined(HAVE_CLOCK_GETTIME) || defined(HAVE_KQUEUE)
+int
+_PyTime_AsTimespec(_PyTime_t t, struct timespec *ts)
+{
+ _PyTime_t secs, nsec;
+
+ secs = t / SEC_TO_NS;
+ nsec = t % SEC_TO_NS;
+ if (nsec < 0) {
+ nsec += SEC_TO_NS;
+ secs -= 1;
+ }
+ ts->tv_sec = (time_t)secs;
+ if ((_PyTime_t)ts->tv_sec != secs) {
+ _PyTime_overflow();
+ return -1;
+ }
+ ts->tv_nsec = nsec;
+
+ assert(0 <= ts->tv_nsec && ts->tv_nsec <= 999999999);
+ return 0;
+}
+#endif
+
+static int
+pygettimeofday(_PyTime_t *tp, _Py_clock_info_t *info, int raise)
+{
+#ifdef MS_WINDOWS
+ FILETIME system_time;
+ ULARGE_INTEGER large;
+
+ assert(info == NULL || raise);
+
+ GetSystemTimeAsFileTime(&system_time);
+ large.u.LowPart = system_time.dwLowDateTime;
+ large.u.HighPart = system_time.dwHighDateTime;
+ /* 11,644,473,600,000,000,000: number of nanoseconds between
+ the 1st january 1601 and the 1st january 1970 (369 years + 89 leap
+ days). */
+ *tp = large.QuadPart * 100 - 11644473600000000000;
+ if (info) {
+ DWORD timeAdjustment, timeIncrement;
+ BOOL isTimeAdjustmentDisabled, ok;
+
+ info->implementation = "GetSystemTimeAsFileTime()";
+ info->monotonic = 0;
+ ok = GetSystemTimeAdjustment(&timeAdjustment, &timeIncrement,
+ &isTimeAdjustmentDisabled);
+ if (!ok) {
+ PyErr_SetFromWindowsErr(0);
+ return -1;
+ }
+ info->resolution = timeIncrement * 1e-7;
+ info->adjustable = 1;
+ }
+
+#else /* MS_WINDOWS */
+ int err;
+#ifdef HAVE_CLOCK_GETTIME
+ struct timespec ts;
+#else
+ struct timeval tv;
+#endif
+
+ assert(info == NULL || raise);
+
+#ifdef HAVE_CLOCK_GETTIME
+ err = clock_gettime(CLOCK_REALTIME, &ts);
+ if (err) {
+ if (raise)
+ PyErr_SetFromErrno(PyExc_OSError);
+ return -1;
+ }
+ if (_PyTime_FromTimespec(tp, &ts, raise) < 0)
+ return -1;
+
+ if (info) {
+ struct timespec res;
+ info->implementation = "clock_gettime(CLOCK_REALTIME)";
+ info->monotonic = 0;
+ info->adjustable = 1;
+ if (clock_getres(CLOCK_REALTIME, &res) == 0)
+ info->resolution = res.tv_sec + res.tv_nsec * 1e-9;
+ else
+ info->resolution = 1e-9;
+ }
+#else /* HAVE_CLOCK_GETTIME */
+
+ /* test gettimeofday() */
+#ifdef GETTIMEOFDAY_NO_TZ
+ err = gettimeofday(&tv);
+#else
+ err = gettimeofday(&tv, (struct timezone *)NULL);
+#endif
+ if (err) {
+ if (raise)
+ PyErr_SetFromErrno(PyExc_OSError);
+ return -1;
+ }
+ if (_PyTime_FromTimeval(tp, &tv, raise) < 0)
+ return -1;
+
+ if (info) {
+ info->implementation = "gettimeofday()";
+ info->resolution = 1e-6;
+ info->monotonic = 0;
+ info->adjustable = 1;
+ }
+#endif /* !HAVE_CLOCK_GETTIME */
+#endif /* !MS_WINDOWS */
+ return 0;
+}
+
+_PyTime_t
+_PyTime_GetSystemClock(void)
+{
+ _PyTime_t t;
+ if (pygettimeofday(&t, NULL, 0) < 0) {
+ /* should not happen, _PyTime_Init() checked the clock at startup */
+ assert(0);
+
+ /* use a fixed value instead of a random value from the stack */
+ t = 0;
+ }
+ return t;
+}
+
+int
+_PyTime_GetSystemClockWithInfo(_PyTime_t *t, _Py_clock_info_t *info)
+{
+ return pygettimeofday(t, info, 1);
+}
+
+
+static int
+pymonotonic(_PyTime_t *tp, _Py_clock_info_t *info, int raise)
+{
+#if defined(MS_WINDOWS)
+ ULONGLONG result;
+
+ assert(info == NULL || raise);
+
+ result = GetTickCount64();
+
+ *tp = result * MS_TO_NS;
+ if (*tp / MS_TO_NS != result) {
+ if (raise) {
+ _PyTime_overflow();
+ return -1;
+ }
+ /* Hello, time traveler! */
+ assert(0);
+ }
+
+ if (info) {
+ DWORD timeAdjustment, timeIncrement;
+ BOOL isTimeAdjustmentDisabled, ok;
+ info->implementation = "GetTickCount64()";
+ info->monotonic = 1;
+ ok = GetSystemTimeAdjustment(&timeAdjustment, &timeIncrement,
+ &isTimeAdjustmentDisabled);
+ if (!ok) {
+ PyErr_SetFromWindowsErr(0);
+ return -1;
+ }
+ info->resolution = timeIncrement * 1e-7;
+ info->adjustable = 0;
+ }
+
+#elif defined(__APPLE__)
+ static mach_timebase_info_data_t timebase;
+ uint64_t time;
+
+ if (timebase.denom == 0) {
+ /* According to the Technical Q&A QA1398, mach_timebase_info() cannot
+ fail: https://developer.apple.com/library/mac/#qa/qa1398/ */
+ (void)mach_timebase_info(&timebase);
+ }
+
+ time = mach_absolute_time();
+
+ /* apply timebase factor */
+ time *= timebase.numer;
+ time /= timebase.denom;
+
+ *tp = time;
+
+ if (info) {
+ info->implementation = "mach_absolute_time()";
+ info->resolution = (double)timebase.numer / timebase.denom * 1e-9;
+ info->monotonic = 1;
+ info->adjustable = 0;
+ }
+
+#else
+ struct timespec ts;
+#ifdef CLOCK_HIGHRES
+ const clockid_t clk_id = CLOCK_HIGHRES;
+ const char *implementation = "clock_gettime(CLOCK_HIGHRES)";
+#else
+ const clockid_t clk_id = CLOCK_MONOTONIC;
+ const char *implementation = "clock_gettime(CLOCK_MONOTONIC)";
+#endif
+
+ assert(info == NULL || raise);
+
+ if (clock_gettime(clk_id, &ts) != 0) {
+ if (raise) {
+ PyErr_SetFromErrno(PyExc_OSError);
+ return -1;
+ }
+ return -1;
+ }
+
+ if (info) {
+ struct timespec res;
+ info->monotonic = 1;
+ info->implementation = implementation;
+ info->adjustable = 0;
+ if (clock_getres(clk_id, &res) != 0) {
+ PyErr_SetFromErrno(PyExc_OSError);
+ return -1;
+ }
+ info->resolution = res.tv_sec + res.tv_nsec * 1e-9;
+ }
+ if (_PyTime_FromTimespec(tp, &ts, raise) < 0)
+ return -1;
+#endif
+ return 0;
+}
+
+_PyTime_t
+_PyTime_GetMonotonicClock(void)
+{
+ _PyTime_t t;
+ if (pymonotonic(&t, NULL, 0) < 0) {
+ /* should not happen, _PyTime_Init() checked that monotonic clock at
+ startup */
+ assert(0);
+
+ /* use a fixed value instead of a random value from the stack */
+ t = 0;
+ }
+ return t;
+}
+
+int
+_PyTime_GetMonotonicClockWithInfo(_PyTime_t *tp, _Py_clock_info_t *info)
+{
+ return pymonotonic(tp, info, 1);
+}
+
+int
+_PyTime_Init(void)
+{
+ _PyTime_t t;
+
+ /* ensure that the system clock works */
+ if (_PyTime_GetSystemClockWithInfo(&t, NULL) < 0)
+ return -1;
+
+ /* ensure that the operating system provides a monotonic clock */
+ if (_PyTime_GetMonotonicClockWithInfo(&t, NULL) < 0)
+ return -1;
+
+ /* check that _PyTime_FromSeconds() cannot overflow */
+ assert(INT_MAX <= _PyTime_MAX / SEC_TO_NS);
+ assert(INT_MIN >= _PyTime_MIN / SEC_TO_NS);
+ return 0;
}
diff --git a/Python/random.c b/Python/random.c
index af3d0bd0d5..07dacfe188 100644
--- a/Python/random.c
+++ b/Python/random.c
@@ -1,11 +1,19 @@
#include "Python.h"
#ifdef MS_WINDOWS
-#include <windows.h>
+# include <windows.h>
#else
-#include <fcntl.h>
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
+# include <fcntl.h>
+# ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+# endif
+# ifdef HAVE_LINUX_RANDOM_H
+# include <linux/random.h>
+# endif
+# ifdef HAVE_GETRANDOM
+# include <sys/random.h>
+# elif defined(HAVE_GETRANDOM_SYSCALL)
+# include <sys/syscall.h>
+# endif
#endif
#ifdef Py_DEBUG
@@ -67,7 +75,7 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise)
return 0;
}
-/* Issue #25003: Don' use getentropy() on Solaris (available since
+/* Issue #25003: Don't use getentropy() on Solaris (available since
* Solaris 11.3), it is blocking whereas os.urandom() should not block. */
#elif defined(HAVE_GETENTROPY) && !defined(sun)
#define PY_GETENTROPY 1
@@ -107,12 +115,109 @@ py_getentropy(unsigned char *buffer, Py_ssize_t size, int fatal)
}
#else
+
+#if defined(HAVE_GETRANDOM) || defined(HAVE_GETRANDOM_SYSCALL)
+#define PY_GETRANDOM 1
+
+static int
+py_getrandom(void *buffer, Py_ssize_t size, int raise)
+{
+ /* Is getrandom() supported by the running kernel?
+ * Need Linux kernel 3.17 or newer, or Solaris 11.3 or newer */
+ static int getrandom_works = 1;
+
+ /* getrandom() on Linux will block if called before the kernel has
+ * initialized the urandom entropy pool. This will cause Python
+ * to hang on startup if called very early in the boot process -
+ * see https://bugs.python.org/issue26839. To avoid this, use the
+ * GRND_NONBLOCK flag. */
+ const int flags = GRND_NONBLOCK;
+ int n;
+
+ if (!getrandom_works)
+ return 0;
+
+ while (0 < size) {
+#ifdef sun
+ /* Issue #26735: On Solaris, getrandom() is limited to returning up
+ to 1024 bytes */
+ n = Py_MIN(size, 1024);
+#else
+ n = size;
+#endif
+
+ errno = 0;
+#ifdef HAVE_GETRANDOM
+ if (raise) {
+ Py_BEGIN_ALLOW_THREADS
+ n = getrandom(buffer, n, flags);
+ Py_END_ALLOW_THREADS
+ }
+ else {
+ n = getrandom(buffer, n, flags);
+ }
+#else
+ /* On Linux, use the syscall() function because the GNU libc doesn't
+ * expose the Linux getrandom() syscall yet. See:
+ * https://sourceware.org/bugzilla/show_bug.cgi?id=17252 */
+ if (raise) {
+ Py_BEGIN_ALLOW_THREADS
+ n = syscall(SYS_getrandom, buffer, n, flags);
+ Py_END_ALLOW_THREADS
+ }
+ else {
+ n = syscall(SYS_getrandom, buffer, n, flags);
+ }
+#endif
+
+ if (n < 0) {
+ if (errno == ENOSYS) {
+ getrandom_works = 0;
+ return 0;
+ }
+ if (errno == EAGAIN) {
+ /* If we failed with EAGAIN, the entropy pool was
+ * uninitialized. In this case, we return failure to fall
+ * back to reading from /dev/urandom.
+ *
+ * Note: In this case the data read will not be random so
+ * should not be used for cryptographic purposes. Retaining
+ * the existing semantics for practical purposes. */
+ getrandom_works = 0;
+ return 0;
+ }
+
+ if (errno == EINTR) {
+ if (PyErr_CheckSignals()) {
+ if (!raise)
+ Py_FatalError("getrandom() interrupted by a signal");
+ return -1;
+ }
+ /* retry getrandom() */
+ continue;
+ }
+
+ if (raise)
+ PyErr_SetFromErrno(PyExc_OSError);
+ else
+ Py_FatalError("getrandom() failed");
+ return -1;
+ }
+
+ buffer += n;
+ size -= n;
+ }
+ return 1;
+}
+#endif
+
static struct {
int fd;
dev_t st_dev;
ino_t st_ino;
} urandom_cache = { -1 };
+
/* Read size bytes from /dev/urandom into buffer.
Call Py_FatalError() on error. */
static void
@@ -123,7 +228,14 @@ dev_urandom_noraise(unsigned char *buffer, Py_ssize_t size)
assert (0 < size);
- fd = _Py_open("/dev/urandom", O_RDONLY);
+#ifdef PY_GETRANDOM
+ if (py_getrandom(buffer, size, 0) == 1)
+ return;
+ /* getrandom() is not supported by the running kernel, fall back
+ * on reading /dev/urandom */
+#endif
+
+ fd = _Py_open_noraise("/dev/urandom", O_RDONLY);
if (fd < 0)
Py_FatalError("Failed to open /dev/urandom");
@@ -151,14 +263,27 @@ dev_urandom_python(char *buffer, Py_ssize_t size)
{
int fd;
Py_ssize_t n;
- struct stat st;
+ struct _Py_stat_struct st;
+#ifdef PY_GETRANDOM
+ int res;
+#endif
if (size <= 0)
return 0;
+#ifdef PY_GETRANDOM
+ res = py_getrandom(buffer, size, 1);
+ if (res < 0)
+ return -1;
+ if (res == 1)
+ return 0;
+ /* getrandom() is not supported by the running kernel, fall back
+ * on reading /dev/urandom */
+#endif
+
if (urandom_cache.fd >= 0) {
/* Does the fd point to the same thing as before? (issue #21207) */
- if (fstat(urandom_cache.fd, &st)
+ if (_Py_fstat_noraise(urandom_cache.fd, &st)
|| st.st_dev != urandom_cache.st_dev
|| st.st_ino != urandom_cache.st_ino) {
/* Something changed: forget the cached fd (but don't close it,
@@ -170,17 +295,13 @@ dev_urandom_python(char *buffer, Py_ssize_t size)
if (urandom_cache.fd >= 0)
fd = urandom_cache.fd;
else {
- Py_BEGIN_ALLOW_THREADS
fd = _Py_open("/dev/urandom", O_RDONLY);
- Py_END_ALLOW_THREADS
- if (fd < 0)
- {
+ if (fd < 0) {
if (errno == ENOENT || errno == ENXIO ||
errno == ENODEV || errno == EACCES)
PyErr_SetString(PyExc_NotImplementedError,
"/dev/urandom (or equivalent) not found");
- else
- PyErr_SetFromErrno(PyExc_OSError);
+ /* otherwise, keep the OSError exception raised by _Py_open() */
return -1;
}
if (urandom_cache.fd >= 0) {
@@ -190,8 +311,7 @@ dev_urandom_python(char *buffer, Py_ssize_t size)
fd = urandom_cache.fd;
}
else {
- if (fstat(fd, &st)) {
- PyErr_SetFromErrno(PyExc_OSError);
+ if (_Py_fstat(fd, &st)) {
close(fd);
return -1;
}
@@ -203,29 +323,21 @@ dev_urandom_python(char *buffer, Py_ssize_t size)
}
}
- Py_BEGIN_ALLOW_THREADS
do {
- do {
- n = read(fd, buffer, (size_t)size);
- } while (n < 0 && errno == EINTR);
- if (n <= 0)
- break;
+ n = _Py_read(fd, buffer, (size_t)size);
+ if (n == -1)
+ return -1;
+ if (n == 0) {
+ PyErr_Format(PyExc_RuntimeError,
+ "Failed to read %zi bytes from /dev/urandom",
+ size);
+ return -1;
+ }
+
buffer += n;
- size -= (Py_ssize_t)n;
+ size -= n;
} while (0 < size);
- Py_END_ALLOW_THREADS
- if (n <= 0)
- {
- /* stop on error or if read(size) returned 0 */
- if (n < 0)
- PyErr_SetFromErrno(PyExc_OSError);
- else
- PyErr_Format(PyExc_RuntimeError,
- "Failed to read %zi bytes from /dev/urandom",
- size);
- return -1;
- }
return 0;
}
@@ -238,7 +350,7 @@ dev_urandom_close(void)
}
}
-#endif /* HAVE_GETENTROPY */
+#endif
/* Fill buffer with pseudo-random bytes generated by a linear congruent
generator (LCG):
diff --git a/Python/symtable.c b/Python/symtable.c
index 951267342b..1591a20f50 100644
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -47,7 +47,6 @@ ste_new(struct symtable *st, identifier name, _Py_block_ty block,
ste->ste_directives = NULL;
ste->ste_type = block;
- ste->ste_unoptimized = 0;
ste->ste_nested = 0;
ste->ste_free = 0;
ste->ste_varargs = 0;
@@ -113,7 +112,6 @@ static PyMemberDef ste_memberlist[] = {
{"symbols", T_OBJECT, OFF(ste_symbols), READONLY},
{"varnames", T_OBJECT, OFF(ste_varnames), READONLY},
{"children", T_OBJECT, OFF(ste_children), READONLY},
- {"optimized",T_INT, OFF(ste_unoptimized), READONLY},
{"nested", T_INT, OFF(ste_nested), READONLY},
{"type", T_INT, OFF(ste_type), READONLY},
{"lineno", T_INT, OFF(ste_lineno), READONLY},
@@ -182,7 +180,7 @@ static int symtable_visit_slice(struct symtable *st, slice_ty);
static int symtable_visit_params(struct symtable *st, asdl_seq *args);
static int symtable_visit_argannotations(struct symtable *st, asdl_seq *args);
static int symtable_implicit_arg(struct symtable *st, int pos);
-static int symtable_visit_annotations(struct symtable *st, stmt_ty s);
+static int symtable_visit_annotations(struct symtable *st, stmt_ty s, arguments_ty, expr_ty);
static int symtable_visit_withitem(struct symtable *st, withitem_ty item);
@@ -271,7 +269,6 @@ PySymtable_BuildObject(mod_ty mod, PyObject *filename, PyFutureFeatures *future)
}
st->st_top = st->st_cur;
- st->st_cur->ste_unoptimized = OPT_TOPLEVEL;
switch (mod->kind) {
case Module_kind:
seq = mod->v.Module.body;
@@ -371,15 +368,20 @@ error_at_directive(PySTEntryObject *ste, PyObject *name)
Py_ssize_t i;
PyObject *data;
assert(ste->ste_directives);
- for (i = 0; ; i++) {
+ for (i = 0; i < PyList_GET_SIZE(ste->ste_directives); i++) {
data = PyList_GET_ITEM(ste->ste_directives, i);
assert(PyTuple_CheckExact(data));
- if (PyTuple_GET_ITEM(data, 0) == name)
- break;
+ assert(PyUnicode_CheckExact(PyTuple_GET_ITEM(data, 0)));
+ if (PyUnicode_Compare(PyTuple_GET_ITEM(data, 0), name) == 0) {
+ PyErr_SyntaxLocationObject(ste->ste_table->st_filename,
+ PyLong_AsLong(PyTuple_GET_ITEM(data, 1)),
+ PyLong_AsLong(PyTuple_GET_ITEM(data, 2)));
+
+ return 0;
+ }
}
- PyErr_SyntaxLocationObject(ste->ste_table->st_filename,
- PyLong_AsLong(PyTuple_GET_ITEM(data, 1)),
- PyLong_AsLong(PyTuple_GET_ITEM(data, 2)));
+ PyErr_SetString(PyExc_RuntimeError,
+ "BUG: internal directive bookkeeping broken");
return 0;
}
@@ -852,7 +854,7 @@ analyze_child_block(PySTEntryObject *entry, PyObject *bound, PyObject *free,
/* Copy the bound and global dictionaries.
- These dictionary are used by all blocks enclosed by the
+ These dictionaries are used by all blocks enclosed by the
current block. The analyze_block() call modifies these
dictionaries.
@@ -1086,13 +1088,13 @@ error:
} \
}
-#define VISIT_KWONLYDEFAULTS(ST, KW_DEFAULTS) { \
+#define VISIT_SEQ_WITH_NULL(ST, TYPE, SEQ) { \
int i = 0; \
- asdl_seq *seq = (KW_DEFAULTS); /* avoid variable capture */ \
+ asdl_seq *seq = (SEQ); /* avoid variable capture */ \
for (i = 0; i < asdl_seq_LEN(seq); i++) { \
- expr_ty elt = (expr_ty)asdl_seq_GET(seq, i); \
+ TYPE ## _ty elt = (TYPE ## _ty)asdl_seq_GET(seq, i); \
if (!elt) continue; /* can be NULL */ \
- if (!symtable_visit_expr((ST), elt)) \
+ if (!symtable_visit_ ## TYPE((ST), elt)) \
VISIT_QUIT((ST), 0); \
} \
}
@@ -1118,14 +1120,17 @@ symtable_new_tmpname(struct symtable *st)
static int
symtable_record_directive(struct symtable *st, identifier name, stmt_ty s)
{
- PyObject *data;
+ PyObject *data, *mangled;
int res;
if (!st->st_cur->ste_directives) {
st->st_cur->ste_directives = PyList_New(0);
if (!st->st_cur->ste_directives)
return 0;
}
- data = Py_BuildValue("(Oii)", name, s->lineno, s->col_offset);
+ mangled = _Py_Mangle(st->st_private, name);
+ if (!mangled)
+ return 0;
+ data = Py_BuildValue("(Nii)", mangled, s->lineno, s->col_offset);
if (!data)
return 0;
res = PyList_Append(st->st_cur->ste_directives, data);
@@ -1138,7 +1143,7 @@ static int
symtable_visit_stmt(struct symtable *st, stmt_ty s)
{
if (++st->recursion_depth > st->recursion_limit) {
- PyErr_SetString(PyExc_RuntimeError,
+ PyErr_SetString(PyExc_RecursionError,
"maximum recursion depth exceeded during compilation");
VISIT_QUIT(st, 0);
}
@@ -1149,9 +1154,9 @@ symtable_visit_stmt(struct symtable *st, stmt_ty s)
if (s->v.FunctionDef.args->defaults)
VISIT_SEQ(st, expr, s->v.FunctionDef.args->defaults);
if (s->v.FunctionDef.args->kw_defaults)
- VISIT_KWONLYDEFAULTS(st,
- s->v.FunctionDef.args->kw_defaults);
- if (!symtable_visit_annotations(st, s))
+ VISIT_SEQ_WITH_NULL(st, expr, s->v.FunctionDef.args->kw_defaults);
+ if (!symtable_visit_annotations(st, s, s->v.FunctionDef.args,
+ s->v.FunctionDef.returns))
VISIT_QUIT(st, 0);
if (s->v.FunctionDef.decorator_list)
VISIT_SEQ(st, expr, s->v.FunctionDef.decorator_list);
@@ -1170,10 +1175,6 @@ symtable_visit_stmt(struct symtable *st, stmt_ty s)
VISIT_QUIT(st, 0);
VISIT_SEQ(st, expr, s->v.ClassDef.bases);
VISIT_SEQ(st, keyword, s->v.ClassDef.keywords);
- if (s->v.ClassDef.starargs)
- VISIT(st, expr, s->v.ClassDef.starargs);
- if (s->v.ClassDef.kwargs)
- VISIT(st, expr, s->v.ClassDef.kwargs);
if (s->v.ClassDef.decorator_list)
VISIT_SEQ(st, expr, s->v.ClassDef.decorator_list);
if (!symtable_enter_block(st, s->v.ClassDef.name, ClassBlock,
@@ -1245,21 +1246,9 @@ symtable_visit_stmt(struct symtable *st, stmt_ty s)
break;
case Import_kind:
VISIT_SEQ(st, alias, s->v.Import.names);
- /* XXX Don't have the lineno available inside
- visit_alias */
- if (st->st_cur->ste_unoptimized && !st->st_cur->ste_opt_lineno) {
- st->st_cur->ste_opt_lineno = s->lineno;
- st->st_cur->ste_opt_col_offset = s->col_offset;
- }
break;
case ImportFrom_kind:
VISIT_SEQ(st, alias, s->v.ImportFrom.names);
- /* XXX Don't have the lineno available inside
- visit_alias */
- if (st->st_cur->ste_unoptimized && !st->st_cur->ste_opt_lineno) {
- st->st_cur->ste_opt_lineno = s->lineno;
- st->st_cur->ste_opt_col_offset = s->col_offset;
- }
break;
case Global_kind: {
int i;
@@ -1335,6 +1324,39 @@ symtable_visit_stmt(struct symtable *st, stmt_ty s)
VISIT_SEQ(st, withitem, s->v.With.items);
VISIT_SEQ(st, stmt, s->v.With.body);
break;
+ case AsyncFunctionDef_kind:
+ if (!symtable_add_def(st, s->v.AsyncFunctionDef.name, DEF_LOCAL))
+ VISIT_QUIT(st, 0);
+ if (s->v.AsyncFunctionDef.args->defaults)
+ VISIT_SEQ(st, expr, s->v.AsyncFunctionDef.args->defaults);
+ if (s->v.AsyncFunctionDef.args->kw_defaults)
+ VISIT_SEQ_WITH_NULL(st, expr,
+ s->v.AsyncFunctionDef.args->kw_defaults);
+ if (!symtable_visit_annotations(st, s, s->v.AsyncFunctionDef.args,
+ s->v.AsyncFunctionDef.returns))
+ VISIT_QUIT(st, 0);
+ if (s->v.AsyncFunctionDef.decorator_list)
+ VISIT_SEQ(st, expr, s->v.AsyncFunctionDef.decorator_list);
+ if (!symtable_enter_block(st, s->v.AsyncFunctionDef.name,
+ FunctionBlock, (void *)s, s->lineno,
+ s->col_offset))
+ VISIT_QUIT(st, 0);
+ VISIT(st, arguments, s->v.AsyncFunctionDef.args);
+ VISIT_SEQ(st, stmt, s->v.AsyncFunctionDef.body);
+ if (!symtable_exit_block(st, s))
+ VISIT_QUIT(st, 0);
+ break;
+ case AsyncWith_kind:
+ VISIT_SEQ(st, withitem, s->v.AsyncWith.items);
+ VISIT_SEQ(st, stmt, s->v.AsyncWith.body);
+ break;
+ case AsyncFor_kind:
+ VISIT(st, expr, s->v.AsyncFor.target);
+ VISIT(st, expr, s->v.AsyncFor.iter);
+ VISIT_SEQ(st, stmt, s->v.AsyncFor.body);
+ if (s->v.AsyncFor.orelse)
+ VISIT_SEQ(st, stmt, s->v.AsyncFor.orelse);
+ break;
}
VISIT_QUIT(st, 1);
}
@@ -1343,7 +1365,7 @@ static int
symtable_visit_expr(struct symtable *st, expr_ty e)
{
if (++st->recursion_depth > st->recursion_limit) {
- PyErr_SetString(PyExc_RuntimeError,
+ PyErr_SetString(PyExc_RecursionError,
"maximum recursion depth exceeded during compilation");
VISIT_QUIT(st, 0);
}
@@ -1364,8 +1386,7 @@ symtable_visit_expr(struct symtable *st, expr_ty e)
if (e->v.Lambda.args->defaults)
VISIT_SEQ(st, expr, e->v.Lambda.args->defaults);
if (e->v.Lambda.args->kw_defaults)
- VISIT_KWONLYDEFAULTS(st,
- e->v.Lambda.args->kw_defaults);
+ VISIT_SEQ_WITH_NULL(st, expr, e->v.Lambda.args->kw_defaults);
if (!symtable_enter_block(st, lambda,
FunctionBlock, (void *)e, e->lineno,
e->col_offset))
@@ -1382,7 +1403,7 @@ symtable_visit_expr(struct symtable *st, expr_ty e)
VISIT(st, expr, e->v.IfExp.orelse);
break;
case Dict_kind:
- VISIT_SEQ(st, expr, e->v.Dict.keys);
+ VISIT_SEQ_WITH_NULL(st, expr, e->v.Dict.keys);
VISIT_SEQ(st, expr, e->v.Dict.values);
break;
case Set_kind:
@@ -1413,6 +1434,10 @@ symtable_visit_expr(struct symtable *st, expr_ty e)
VISIT(st, expr, e->v.YieldFrom.value);
st->st_cur->ste_generator = 1;
break;
+ case Await_kind:
+ VISIT(st, expr, e->v.Await.value);
+ st->st_cur->ste_generator = 1;
+ break;
case Compare_kind:
VISIT(st, expr, e->v.Compare.left);
VISIT_SEQ(st, expr, e->v.Compare.comparators);
@@ -1420,11 +1445,7 @@ symtable_visit_expr(struct symtable *st, expr_ty e)
case Call_kind:
VISIT(st, expr, e->v.Call.func);
VISIT_SEQ(st, expr, e->v.Call.args);
- VISIT_SEQ(st, keyword, e->v.Call.keywords);
- if (e->v.Call.starargs)
- VISIT(st, expr, e->v.Call.starargs);
- if (e->v.Call.kwargs)
- VISIT(st, expr, e->v.Call.kwargs);
+ VISIT_SEQ_WITH_NULL(st, keyword, e->v.Call.keywords);
break;
case Num_kind:
case Str_kind:
@@ -1517,10 +1538,9 @@ symtable_visit_argannotations(struct symtable *st, asdl_seq *args)
}
static int
-symtable_visit_annotations(struct symtable *st, stmt_ty s)
+symtable_visit_annotations(struct symtable *st, stmt_ty s,
+ arguments_ty a, expr_ty returns)
{
- arguments_ty a = s->v.FunctionDef.args;
-
if (a->args && !symtable_visit_argannotations(st, a->args))
return 0;
if (a->vararg && a->vararg->annotation)
@@ -1529,8 +1549,8 @@ symtable_visit_annotations(struct symtable *st, stmt_ty s)
VISIT(st, expr, a->kwarg->annotation);
if (a->kwonlyargs && !symtable_visit_argannotations(st, a->kwonlyargs))
return 0;
- if (s->v.FunctionDef.returns)
- VISIT(st, expr, s->v.FunctionDef.returns);
+ if (returns)
+ VISIT(st, expr, returns);
return 1;
}
@@ -1615,7 +1635,6 @@ symtable_visit_alias(struct symtable *st, alias_ty a)
Py_DECREF(store_name);
return 0;
}
- st->st_cur->ste_unoptimized |= OPT_IMPORT_STAR;
Py_DECREF(store_name);
return 1;
}
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 290eec1199..8d7e05a465 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -632,19 +632,84 @@ processor's time-stamp counter."
static PyObject *
sys_setrecursionlimit(PyObject *self, PyObject *args)
{
- int new_limit;
+ int new_limit, mark;
+ PyThreadState *tstate;
+
if (!PyArg_ParseTuple(args, "i:setrecursionlimit", &new_limit))
return NULL;
- if (new_limit <= 0) {
+
+ if (new_limit < 1) {
PyErr_SetString(PyExc_ValueError,
- "recursion limit must be positive");
+ "recursion limit must be greater or equal than 1");
+ return NULL;
+ }
+
+ /* Issue #25274: When the recursion depth hits the recursion limit in
+ _Py_CheckRecursiveCall(), the overflowed flag of the thread state is
+ set to 1 and a RecursionError is raised. The overflowed flag is reset
+ to 0 when the recursion depth goes below the low-water mark: see
+ Py_LeaveRecursiveCall().
+
+ Reject too low new limit if the current recursion depth is higher than
+ the new low-water mark. Otherwise it may not be possible anymore to
+ reset the overflowed flag to 0. */
+ mark = _Py_RecursionLimitLowerWaterMark(new_limit);
+ tstate = PyThreadState_GET();
+ if (tstate->recursion_depth >= mark) {
+ PyErr_Format(PyExc_RecursionError,
+ "cannot set the recursion limit to %i at "
+ "the recursion depth %i: the limit is too low",
+ new_limit, tstate->recursion_depth);
return NULL;
}
+
Py_SetRecursionLimit(new_limit);
Py_INCREF(Py_None);
return Py_None;
}
+static PyObject *
+sys_set_coroutine_wrapper(PyObject *self, PyObject *wrapper)
+{
+ if (wrapper != Py_None) {
+ if (!PyCallable_Check(wrapper)) {
+ PyErr_Format(PyExc_TypeError,
+ "callable expected, got %.50s",
+ Py_TYPE(wrapper)->tp_name);
+ return NULL;
+ }
+ _PyEval_SetCoroutineWrapper(wrapper);
+ }
+ else {
+ _PyEval_SetCoroutineWrapper(NULL);
+ }
+ Py_RETURN_NONE;
+}
+
+PyDoc_STRVAR(set_coroutine_wrapper_doc,
+"set_coroutine_wrapper(wrapper)\n\
+\n\
+Set a wrapper for coroutine objects."
+);
+
+static PyObject *
+sys_get_coroutine_wrapper(PyObject *self, PyObject *args)
+{
+ PyObject *wrapper = _PyEval_GetCoroutineWrapper();
+ if (wrapper == NULL) {
+ wrapper = Py_None;
+ }
+ Py_INCREF(wrapper);
+ return wrapper;
+}
+
+PyDoc_STRVAR(get_coroutine_wrapper_doc,
+"get_coroutine_wrapper()\n\
+\n\
+Return the wrapper for coroutine objects set by sys.set_coroutine_wrapper."
+);
+
+
static PyTypeObject Hash_InfoType;
PyDoc_STRVAR(hash_info_doc,
@@ -772,6 +837,12 @@ static PyStructSequence_Desc windows_version_desc = {
via indexing, the rest are name only */
};
+/* Disable deprecation warnings about GetVersionEx as the result is
+ being passed straight through to the caller, who is responsible for
+ using it correctly. */
+#pragma warning(push)
+#pragma warning(disable:4996)
+
static PyObject *
sys_getwindowsversion(PyObject *self)
{
@@ -803,6 +874,8 @@ sys_getwindowsversion(PyObject *self)
return version;
}
+#pragma warning(pop)
+
#endif /* MS_WINDOWS */
#ifdef HAVE_DLOPEN
@@ -1121,6 +1194,16 @@ PyDoc_STRVAR(sys_clear_type_cache__doc__,
"_clear_type_cache() -> None\n\
Clear the internal type lookup cache.");
+static PyObject *
+sys_is_finalizing(PyObject* self, PyObject* args)
+{
+ return PyBool_FromLong(_Py_Finalizing != NULL);
+}
+
+PyDoc_STRVAR(is_finalizing_doc,
+"is_finalizing()\n\
+Return True if Python is exiting.");
+
static PyMethodDef sys_methods[] = {
/* Might as well keep this in alphabetic order */
@@ -1167,6 +1250,7 @@ static PyMethodDef sys_methods[] = {
getwindowsversion_doc},
#endif /* MS_WINDOWS */
{"intern", sys_intern, METH_VARARGS, intern_doc},
+ {"is_finalizing", sys_is_finalizing, METH_NOARGS, is_finalizing_doc},
#ifdef USE_MALLOPT
{"mdebug", sys_mdebug, METH_VARARGS},
#endif
@@ -1196,6 +1280,10 @@ static PyMethodDef sys_methods[] = {
{"call_tracing", sys_call_tracing, METH_VARARGS, call_tracing_doc},
{"_debugmallocstats", sys_debugmallocstats, METH_NOARGS,
debugmallocstats_doc},
+ {"set_coroutine_wrapper", sys_set_coroutine_wrapper, METH_O,
+ set_coroutine_wrapper_doc},
+ {"get_coroutine_wrapper", sys_get_coroutine_wrapper, METH_NOARGS,
+ get_coroutine_wrapper_doc},
{NULL, NULL} /* sentinel */
};
@@ -1309,7 +1397,7 @@ error:
Py_XDECREF(name);
Py_XDECREF(value);
/* No return value, therefore clear error state if possible */
- if (_Py_atomic_load_relaxed(&_PyThreadState_Current))
+ if (_PyThreadState_UncheckedGet())
PyErr_Clear();
}
@@ -1670,8 +1758,8 @@ _PySys_Init(void)
the shell already prevents that. */
#if !defined(MS_WINDOWS)
{
- struct stat sb;
- if (fstat(fileno(stdin), &sb) == 0 &&
+ struct _Py_stat_struct sb;
+ if (_Py_fstat_noraise(fileno(stdin), &sb) == 0 &&
S_ISDIR(sb.st_mode)) {
/* There's nothing more we can do. */
/* Py_FatalError() will core dump, so just exit. */
@@ -1681,7 +1769,7 @@ _PySys_Init(void)
}
#endif
- /* stdin/stdout/stderr are now set by pythonrun.c */
+ /* stdin/stdout/stderr are set in pylifecycle.c */
SET_SYS_FROM_STRING_BORROW("__displayhook__",
PyDict_GetItemString(sysdict, "displayhook"));
diff --git a/Python/thread.c b/Python/thread.c
index 810691f0b0..63eeb1e123 100644
--- a/Python/thread.c
+++ b/Python/thread.c
@@ -431,7 +431,7 @@ PyThread_GetInfo(void)
&& defined(_CS_GNU_LIBPTHREAD_VERSION))
value = NULL;
len = confstr(_CS_GNU_LIBPTHREAD_VERSION, buffer, sizeof(buffer));
- if (1 < len && len < sizeof(buffer)) {
+ if (1 < len && (size_t)len < sizeof(buffer)) {
value = PyUnicode_DecodeFSDefaultAndSize(buffer, len-1);
if (value == NULL)
PyErr_Clear();
diff --git a/Python/thread_foobar.h b/Python/thread_foobar.h
index d2b78c5cae..ea96f9c9d7 100644
--- a/Python/thread_foobar.h
+++ b/Python/thread_foobar.h
@@ -1,4 +1,3 @@
-
/*
* Initialization.
*/
@@ -61,10 +60,18 @@ PyThread_free_lock(PyThread_type_lock lock)
int
PyThread_acquire_lock(PyThread_type_lock lock, int waitflag)
{
+ return PyThread_acquire_lock_timed(lock, waitflag ? -1 : 0, 0);
+}
+
+PyLockStatus
+PyThread_acquire_lock_timed(PyThread_type_lock lock, PY_TIMEOUT_T microseconds,
+ int intr_flag)
+{
int success;
- dprintf(("PyThread_acquire_lock(%p, %d) called\n", lock, waitflag));
- dprintf(("PyThread_acquire_lock(%p, %d) -> %d\n", lock, waitflag, success));
+ dprintf(("PyThread_acquire_lock_timed(%p, %lld, %d) called\n", lock, microseconds, intr_flag));
+ dprintf(("PyThread_acquire_lock_timed(%p, %lld, %d) -> %d\n",
+ lock, microseconds, intr_flag, success));
return success;
}
@@ -73,3 +80,53 @@ PyThread_release_lock(PyThread_type_lock lock)
{
dprintf(("PyThread_release_lock(%p) called\n", lock));
}
+
+/* The following are only needed if native TLS support exists */
+#define Py_HAVE_NATIVE_TLS
+
+#ifdef Py_HAVE_NATIVE_TLS
+int
+PyThread_create_key(void)
+{
+ int result;
+ return result;
+}
+
+void
+PyThread_delete_key(int key)
+{
+
+}
+
+int
+PyThread_set_key_value(int key, void *value)
+{
+ int ok;
+
+ /* A failure in this case returns -1 */
+ if (!ok)
+ return -1;
+ return 0;
+}
+
+void *
+PyThread_get_key_value(int key)
+{
+ void *result;
+
+ return result;
+}
+
+void
+PyThread_delete_key_value(int key)
+{
+
+}
+
+void
+PyThread_ReInitTLS(void)
+{
+
+}
+
+#endif
diff --git a/Python/thread_nt.h b/Python/thread_nt.h
index 84452cdac4..b29b1b6e3f 100644
--- a/Python/thread_nt.h
+++ b/Python/thread_nt.h
@@ -231,7 +231,7 @@ PyThread_start_new_thread(void (*func)(void *), void *arg)
}
/*
- * Return the thread Id instead of an handle. The Id is said to uniquely identify the
+ * Return the thread Id instead of a handle. The Id is said to uniquely identify the
* thread in the system
*/
long
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h
index d9f7c76f2a..27e0dc84bc 100644
--- a/Python/thread_pthread.h
+++ b/Python/thread_pthread.h
@@ -608,7 +608,15 @@ PyThread_create_key(void)
{
pthread_key_t key;
int fail = pthread_key_create(&key, NULL);
- return fail ? -1 : key;
+ if (fail)
+ return -1;
+ if (key > INT_MAX) {
+ /* Issue #22206: handle integer overflow */
+ pthread_key_delete(key);
+ errno = ENOMEM;
+ return -1;
+ }
+ return (int)key;
}
void
diff --git a/Python/traceback.c b/Python/traceback.c
index 7d1fc2e8ac..941d1cbbbb 100644
--- a/Python/traceback.c
+++ b/Python/traceback.c
@@ -13,7 +13,7 @@
#define OFF(x) offsetof(PyTracebackObject, x)
-#define PUTS(fd, str) write(fd, str, (int)strlen(str))
+#define PUTS(fd, str) _Py_write_noraise(fd, str, (int)strlen(str))
#define MAX_STRING_LENGTH 500
#define MAX_FRAME_DEPTH 100
#define MAX_NTHREADS 100
@@ -231,7 +231,7 @@ _Py_FindSourceFile(PyObject *filename, char* namebuf, size_t namelen, PyObject *
}
strcpy(namebuf, PyBytes_AS_STRING(path));
Py_DECREF(path);
- if (strlen(namebuf) != len)
+ if (strlen(namebuf) != (size_t)len)
continue; /* v contains '\0' */
if (len > 0 && namebuf[len-1] != SEP)
namebuf[len++] = SEP;
@@ -512,7 +512,7 @@ dump_decimal(int fd, int value)
len++;
} while (value);
reverse_string(buffer, len);
- write(fd, buffer, len);
+ _Py_write_noraise(fd, buffer, len);
}
/* Format an integer in range [0; 0xffffffff] to hexadecimal of 'width' digits,
@@ -532,7 +532,7 @@ dump_hexadecimal(int fd, unsigned long value, int width)
len++;
} while (len < width || value);
reverse_string(buffer, len);
- write(fd, buffer, len);
+ _Py_write_noraise(fd, buffer, len);
}
/* Write an unicode object into the file fd using ascii+backslashreplace.
@@ -582,15 +582,16 @@ dump_ascii(int fd, PyObject *text)
ch = PyUnicode_READ(kind, data, i);
else
ch = wstr[i];
- if (ch < 128) {
+ if (' ' <= ch && ch <= 126) {
+ /* printable ASCII character */
char c = (char)ch;
- write(fd, &c, 1);
+ _Py_write_noraise(fd, &c, 1);
}
- else if (ch < 0xff) {
+ else if (ch <= 0xff) {
PUTS(fd, "\\x");
dump_hexadecimal(fd, ch, 2);
}
- else if (ch < 0xffff) {
+ else if (ch <= 0xffff) {
PUTS(fd, "\\u");
dump_hexadecimal(fd, ch, 4);
}
@@ -618,9 +619,9 @@ dump_frame(int fd, PyFrameObject *frame)
if (code != NULL && code->co_filename != NULL
&& PyUnicode_Check(code->co_filename))
{
- write(fd, "\"", 1);
+ PUTS(fd, "\"");
dump_ascii(fd, code->co_filename);
- write(fd, "\"", 1);
+ PUTS(fd, "\"");
} else {
PUTS(fd, "???");
}
@@ -637,7 +638,7 @@ dump_frame(int fd, PyFrameObject *frame)
else
PUTS(fd, "???");
- write(fd, "\n", 1);
+ PUTS(fd, "\n");
}
static void
@@ -667,6 +668,12 @@ dump_traceback(int fd, PyThreadState *tstate, int write_header)
}
}
+/* Dump the traceback of a Python thread into fd. Use write() to write the
+ traceback and retry if write() is interrupted by a signal (failed with
+ EINTR), but don't call the Python signal handler.
+
+ The caller is responsible to call PyErr_CheckSignals() to call Python signal
+ handlers if signals were received. */
void
_Py_DumpTraceback(int fd, PyThreadState *tstate)
{
@@ -685,10 +692,16 @@ write_thread_id(int fd, PyThreadState *tstate, int is_current)
PUTS(fd, "Current thread 0x");
else
PUTS(fd, "Thread 0x");
- dump_hexadecimal(fd, (unsigned long)tstate->thread_id, sizeof(long)*2);
+ dump_hexadecimal(fd, (unsigned long)tstate->thread_id, sizeof(unsigned long)*2);
PUTS(fd, " (most recent call first):\n");
}
+/* Dump the traceback of all Python threads into fd. Use write() to write the
+ traceback and retry if write() is interrupted by a signal (failed with
+ EINTR), but don't call the Python signal handler.
+
+ The caller is responsible to call PyErr_CheckSignals() to call Python signal
+ handlers if signals were received. */
const char*
_Py_DumpTracebackThreads(int fd, PyInterpreterState *interp,
PyThreadState *current_thread)
@@ -704,10 +717,11 @@ _Py_DumpTracebackThreads(int fd, PyInterpreterState *interp,
/* Dump the traceback of each thread */
tstate = PyInterpreterState_ThreadHead(interp);
nthreads = 0;
+ _Py_BEGIN_SUPPRESS_IPH
do
{
if (nthreads != 0)
- write(fd, "\n", 1);
+ PUTS(fd, "\n");
if (nthreads >= MAX_NTHREADS) {
PUTS(fd, "...\n");
break;
@@ -717,6 +731,7 @@ _Py_DumpTracebackThreads(int fd, PyInterpreterState *interp,
tstate = PyThreadState_Next(tstate);
nthreads++;
} while (tstate != NULL);
+ _Py_END_SUPPRESS_IPH
return NULL;
}
diff --git a/README b/README
index 9190c5c5ee..6123f047fd 100644
--- a/README
+++ b/README
@@ -1,13 +1,14 @@
-This is Python version 3.4.4
+This is Python version 3.5.1
============================
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
2012, 2013, 2014, 2015, 2016 Python Software Foundation. All rights reserved.
-Python 3.x is a new version of the language, which is incompatible with the 2.x
-line of releases. The language is mostly the same, but many details, especially
-how built-in objects like dictionaries and strings work, have changed
-considerably, and a lot of deprecated features have finally been removed.
+Python 3.x is a new version of the language, which is incompatible with the
+2.x line of releases. The language is mostly the same, but many details,
+especially how built-in objects like dictionaries and strings work,
+have changed considerably, and a lot of deprecated features have finally
+been removed.
Build Instructions
@@ -15,8 +16,6 @@ Build Instructions
On Unix, Linux, BSD, OSX, and Cygwin:
-New text
-
./configure
make
make test
@@ -29,14 +28,14 @@ find out more. On OSX and Cygwin, the executable is called python.exe;
elsewhere it's just python.
On Mac OS X, if you have configured Python with --enable-framework, you should
-use "make frameworkinstall" to do the installation. Note that this installs the
-Python executable in a place that is not normally on your PATH, you may want to
-set up a symlink in /usr/local/bin.
+use "make frameworkinstall" to do the installation. Note that this installs
+the Python executable in a place that is not normally on your PATH, you may
+want to set up a symlink in /usr/local/bin.
On Windows, see PCbuild/readme.txt.
-If you wish, you can create a subdirectory and invoke configure from there. For
-example:
+If you wish, you can create a subdirectory and invoke configure from there.
+For example:
mkdir debug
cd debug
@@ -44,21 +43,49 @@ example:
make
make test
-(This will fail if you *also* built at the top-level directory. You should do a
-"make clean" at the toplevel first.)
+(This will fail if you *also* built at the top-level directory.
+You should do a "make clean" at the toplevel first.)
+
+If you need an optimized version of Python, you type "make profile-opt" in the
+top level directory. This will rebuild the interpreter executable using Profile
+Guided Optimization (PGO). For more details, see the section bellow.
+
+
+Profile Guided Optimization
+---------------------------
+
+PGO takes advantage of recent versions of the GCC or Clang compilers.
+If ran, the "profile-opt" rule will do several steps.
+
+First, the entire Python directory is cleaned of temporary files that
+may have resulted in a previous compilation.
+
+Then, an instrumented version of the interpreter is built, using suitable
+compiler flags for each flavour. Note that this is just an intermediary
+step and the binary resulted after this step is not good for real life
+workloads, as it has profiling instructions embedded inside.
+
+After this instrumented version of the interpreter is built, the Makefile
+will automatically run a training workload. This is necessary in order to
+profile the interpreter execution. Note also that any output, both stdout
+and stderr, that may appear at this step is supressed.
+
+Finally, the last step is to rebuild the interpreter, using the information
+collected in the previous one. The end result will be a Python binary
+that is optimized and suitable for distribution or production installation.
What's New
----------
-We try to have a comprehensive overview of the changes in the "What's New in
-Python 3.4" document, found at
+We have a comprehensive overview of the changes in the "What's New in
+Python 3.5" document, found at
- http://docs.python.org/3.4/whatsnew/3.4.html
+ http://docs.python.org/3.5/whatsnew/3.5.html
-For a more detailed change log, read Misc/NEWS (though this file, too, is
-incomplete, and also doesn't list anything merged in from the 2.7 release under
-development).
+For a more detailed change log, read Misc/NEWS (though this file, too,
+is incomplete, and also doesn't list anything merged in from the 2.7
+release under development).
If you want to install multiple versions of Python see the section below
entitled "Installing multiple versions".
@@ -67,9 +94,9 @@ entitled "Installing multiple versions".
Documentation
-------------
-Documentation for Python 3.4 is online, updated daily:
+Documentation for Python 3.5 is online, updated daily:
- http://docs.python.org/3.4/
+ http://docs.python.org/3.5/
It can also be downloaded in many formats for faster access. The documentation
is downloadable in HTML, PDF, and reStructuredText formats; the latter version
@@ -94,16 +121,17 @@ backported versions of certain key Python 3.x features.
A source-to-source translation tool, "2to3", can take care of the mundane task
of converting large amounts of source code. It is not a complete solution but
is complemented by the deprecation warnings in 2.6. See
-http://docs.python.org/3.4/library/2to3.html for more information.
+http://docs.python.org/3.5/library/2to3.html for more information.
Testing
-------
-To test the interpreter, type "make test" in the top-level directory. The test
-set produces some output. You can generally ignore the messages about skipped
-tests due to optional features which can't be imported. If a message is printed
-about a failed test or a traceback or core dump is produced, something is wrong.
+To test the interpreter, type "make test" in the top-level directory.
+The test set produces some output. You can generally ignore the messages
+about skipped tests due to optional features which can't be imported.
+If a message is printed about a failed test or a traceback or core dump
+is produced, something is wrong.
By default, tests are prevented from overusing resources like disk space and
memory. To enable these tests, run "make testall".
@@ -123,16 +151,16 @@ Installing multiple versions
On Unix and Mac systems if you intend to install multiple versions of Python
using the same installation prefix (--prefix argument to the configure script)
-you must take care that your primary python executable is not overwritten by the
-installation of a different version. All files and directories installed using
-"make altinstall" contain the major and minor version and can thus live
-side-by-side. "make install" also creates ${prefix}/bin/python3 which refers to
-${prefix}/bin/pythonX.Y. If you intend to install multiple versions using the
-same prefix you must decide which version (if any) is your "primary" version.
-Install that version using "make install". Install all other versions using
-"make altinstall".
-
-For example, if you want to install Python 2.6, 2.7 and 3.4 with 2.7 being the
+you must take care that your primary python executable is not overwritten by
+the installation of a different version. All files and directories installed
+using "make altinstall" contain the major and minor version and can thus live
+side-by-side. "make install" also creates ${prefix}/bin/python3 which refers
+to ${prefix}/bin/pythonX.Y. If you intend to install multiple versions using
+the same prefix you must decide which version (if any) is your "primary"
+version. Install that version using "make install". Install all other
+versions using "make altinstall".
+
+For example, if you want to install Python 2.6, 2.7 and 3.5 with 2.7 being the
primary version, you would execute "make install" in your 2.7 build directory
and "make altinstall" in the others.
@@ -141,7 +169,7 @@ Issue Tracker and Mailing List
------------------------------
We're soliciting bug reports about all aspects of the language. Fixes are also
-welcome, preferable in unified diff format. Please use the issue tracker:
+welcome, preferably in unified diff format. Please use the issue tracker:
http://bugs.python.org/
@@ -168,7 +196,7 @@ http://www.python.org/dev/peps/.
Release Schedule
----------------
-See PEP 429 for release details: http://www.python.org/dev/peps/pep-0429/
+See PEP 478 for release details: http://www.python.org/dev/peps/pep-0478/
Copyright and License Information
@@ -184,11 +212,11 @@ rights reserved.
Copyright (c) 1991-1995 Stichting Mathematisch Centrum. All rights reserved.
-See the file "LICENSE" for information on the history of this software, terms &
-conditions for usage, and a DISCLAIMER OF ALL WARRANTIES.
+See the file "LICENSE" for information on the history of this software,
+terms & conditions for usage, and a DISCLAIMER OF ALL WARRANTIES.
-This Python distribution contains *no* GNU General Public License (GPL) code, so
-it may be used in proprietary projects. There are interfaces to some GNU code
-but these are entirely optional.
+This Python distribution contains *no* GNU General Public License (GPL) code,
+so it may be used in proprietary projects. There are interfaces to some GNU
+code but these are entirely optional.
All trademarks referenced herein are property of their respective holders.
diff --git a/Tools/buildbot/buildmsi.bat b/Tools/buildbot/buildmsi.bat
index 4ca5604464..e3c2dbd73d 100644
--- a/Tools/buildbot/buildmsi.bat
+++ b/Tools/buildbot/buildmsi.bat
@@ -1,21 +1,9 @@
@rem Used by the buildbot "buildmsi" step.
+setlocal
-cmd /c Tools\buildbot\external.bat
-@rem build release versions of things
-call "%VS100COMNTOOLS%vsvars32.bat"
+pushd
-@rem build Python
-msbuild /p:useenv=true PCbuild\pcbuild.sln /p:Configuration=Release /p:Platform=Win32
-
-@rem build the documentation
-bash.exe -c 'cd Doc;make PYTHON=python2.5 update htmlhelp'
-"%ProgramFiles%\HTML Help Workshop\hhc.exe" Doc\build\htmlhelp\python26a3.hhp
-
-@rem build the MSI file
-cd PC
-nmake /f icons.mak
-cd ..\Tools\msi
-del *.msi
-nmake /f msisupport.mak
-%HOST_PYTHON% msi.py
+@rem build both snapshot MSIs
+call "%~dp0..\msi\build.bat" -x86 -x64
+popd \ No newline at end of file
diff --git a/Tools/buildbot/test.bat b/Tools/buildbot/test.bat
index 154dfa57f1..ff7d167e6a 100644
--- a/Tools/buildbot/test.bat
+++ b/Tools/buildbot/test.bat
@@ -1,15 +1,19 @@
-@rem Used by the buildbot "test" step.
-@setlocal
+@echo off
+rem Used by the buildbot "test" step.
+setlocal
-@set here=%~dp0
-@set rt_opts=-q -d
+set here=%~dp0
+set rt_opts=-q -d
+set regrtest_args=
:CheckOpts
-@if '%1'=='-x64' (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
-@if '%1'=='-d' (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
-@if '%1'=='-O' (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
-@if '%1'=='-q' (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
-@if '%1'=='+d' (set rt_opts=%rt_opts:-d=%) & shift & goto CheckOpts
-@if '%1'=='+q' (set rt_opts=%rt_opts:-q=%) & shift & goto CheckOpts
+if "%1"=="-x64" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
+if "%1"=="-d" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
+if "%1"=="-O" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
+if "%1"=="-q" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
+if "%1"=="+d" (set rt_opts=%rt_opts:-d=%) & shift & goto CheckOpts
+if "%1"=="+q" (set rt_opts=%rt_opts:-q=%) & shift & goto CheckOpts
+if NOT "%1"=="" (set regrtest_args=%regrtest_args% %1) & shift & goto CheckOpts
-call "%here%..\..\PCbuild\rt.bat" %rt_opts% -uall -rwW -n --timeout=3600 %1 %2 %3 %4 %5 %6 %7 %8 %9
+echo on
+call "%here%..\..\PCbuild\rt.bat" %rt_opts% -uall -rwW --timeout=3600 %regrtest_args%
diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py
index c6ac3b9acc..1d851da956 100755
--- a/Tools/clinic/clinic.py
+++ b/Tools/clinic/clinic.py
@@ -26,8 +26,12 @@ import sys
import tempfile
import textwrap
import traceback
+import types
import uuid
+from types import *
+NoneType = type(None)
+
# TODO:
#
# soon:
@@ -66,6 +70,10 @@ class Unknown:
unknown = Unknown()
+sig_end_marker = '--'
+
+
+_text_accumulator_nt = collections.namedtuple("_text_accumulator", "text append output")
def _text_accumulator():
text = []
@@ -73,9 +81,11 @@ def _text_accumulator():
s = ''.join(text)
text.clear()
return s
- return text, text.append, output
+ return _text_accumulator_nt(text, text.append, output)
+text_accumulator_nt = collections.namedtuple("text_accumulator", "text append")
+
def text_accumulator():
"""
Creates a simple text accumulator / joiner.
@@ -88,7 +98,7 @@ def text_accumulator():
empties the accumulator.
"""
text, append, output = _text_accumulator()
- return append, output
+ return text_accumulator_nt(append, output)
def warn_or_fail(fail=False, *args, filename=None, line_number=None):
@@ -166,6 +176,13 @@ def rstrip_lines(s):
text.pop()
return output()
+def format_escape(s):
+ # double up curly-braces, this string will be used
+ # as part of a format_map() template later
+ s = s.replace('{', '{{')
+ s = s.replace('}', '}}')
+ return s
+
def linear_format(s, **kwargs):
"""
Perform str.format-like substitution, except:
@@ -189,7 +206,7 @@ def linear_format(s, **kwargs):
add('\n')
continue
- name, curl, trailing = trailing.partition('}')
+ name, curly, trailing = trailing.partition('}')
if not curly or name not in kwargs:
add(line)
add('\n')
@@ -521,6 +538,58 @@ def normalize_snippet(s, *, indent=0):
return s
+def wrap_declarations(text, length=78):
+ """
+ A simple-minded text wrapper for C function declarations.
+
+ It views a declaration line as looking like this:
+ xxxxxxxx(xxxxxxxxx,xxxxxxxxx)
+ If called with length=30, it would wrap that line into
+ xxxxxxxx(xxxxxxxxx,
+ xxxxxxxxx)
+ (If the declaration has zero or one parameters, this
+ function won't wrap it.)
+
+ If this doesn't work properly, it's probably better to
+ start from scratch with a more sophisticated algorithm,
+ rather than try and improve/debug this dumb little function.
+ """
+ lines = []
+ for line in text.split('\n'):
+ prefix, _, after_l_paren = line.partition('(')
+ if not after_l_paren:
+ lines.append(line)
+ continue
+ parameters, _, after_r_paren = after_l_paren.partition(')')
+ if not _:
+ lines.append(line)
+ continue
+ if ',' not in parameters:
+ lines.append(line)
+ continue
+ parameters = [x.strip() + ", " for x in parameters.split(',')]
+ prefix += "("
+ if len(prefix) < length:
+ spaces = " " * len(prefix)
+ else:
+ spaces = " " * 4
+
+ while parameters:
+ line = prefix
+ first = True
+ while parameters:
+ if (not first and
+ (len(line) + len(parameters[0]) > length)):
+ break
+ line += parameters.pop(0)
+ first = False
+ if not parameters:
+ line = line.rstrip(", ") + ")" + after_r_paren
+ lines.append(line.rstrip())
+ prefix = spaces
+ return "\n".join(lines)
+
+
class CLanguage(Language):
body_prefix = "#"
@@ -555,8 +624,13 @@ class CLanguage(Language):
add(quoted_for_c_string(line))
add('\\n"\n')
- text.pop()
- add('"')
+ if text[-2] == sig_end_marker:
+ # If we only have a signature, add the blank line that the
+ # __text_signature__ getter expects to be there.
+ add('"\\n"')
+ else:
+ text.pop()
+ add('"')
return ''.join(text)
def output_templates(self, f):
@@ -589,8 +663,6 @@ class CLanguage(Language):
meth_o = (len(parameters) == 1 and
parameters[0].kind == inspect.Parameter.POSITIONAL_ONLY and
not converters[0].is_optional() and
- isinstance(converters[0], object_converter) and
- converters[0].format_unit == 'O' and
not new_or_init)
# we have to set these things before we're done:
@@ -696,22 +768,38 @@ class CLanguage(Language):
elif meth_o:
flags = "METH_O"
- meth_o_prototype = normalize_snippet("""
- static PyObject *
- {c_basename}({impl_parameters})
- """)
+ if (isinstance(converters[0], object_converter) and
+ converters[0].format_unit == 'O'):
+ meth_o_prototype = normalize_snippet("""
+ static PyObject *
+ {c_basename}({impl_parameters})
+ """)
+
+ if default_return_converter:
+ # maps perfectly to METH_O, doesn't need a return converter.
+ # so we skip making a parse function
+ # and call directly into the impl function.
+ impl_prototype = parser_prototype = parser_definition = ''
+ impl_definition = meth_o_prototype
+ else:
+ # SLIGHT HACK
+ # use impl_parameters for the parser here!
+ parser_prototype = meth_o_prototype
+ parser_definition = parser_body(parser_prototype)
- if default_return_converter:
- # maps perfectly to METH_O, doesn't need a return converter.
- # so we skip making a parse function
- # and call directly into the impl function.
- impl_prototype = parser_prototype = parser_definition = ''
- impl_definition = meth_o_prototype
else:
- # SLIGHT HACK
- # use impl_parameters for the parser here!
- parser_prototype = meth_o_prototype
- parser_definition = parser_body(parser_prototype)
+ argname = 'arg'
+ if parameters[0].name == argname:
+ argname += '_'
+ parser_prototype = normalize_snippet("""
+ static PyObject *
+ {c_basename}({self_type}{self_name}, PyObject *%s)
+ """ % argname)
+
+ parser_definition = parser_body(parser_prototype, normalize_snippet("""
+ if (!PyArg_Parse(%s, "{format_units}:{name}", {parse_arguments}))
+ goto exit;
+ """ % argname, indent=4))
elif has_option_groups:
# positional parameters with option groups
@@ -746,8 +834,7 @@ class CLanguage(Language):
parser_prototype = parser_prototype_varargs
parser_definition = parser_body(parser_prototype, normalize_snippet("""
- if (!PyArg_ParseTuple(args,
- "{format_units}:{name}",
+ if (!PyArg_ParseTuple(args, "{format_units}:{name}",
{parse_arguments}))
goto exit;
""", indent=4))
@@ -759,14 +846,12 @@ class CLanguage(Language):
parser_prototype = parser_prototype_keyword
body = normalize_snippet("""
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "{format_units}:{name}", _keywords,
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "{format_units}:{name}", _keywords,
{parse_arguments}))
goto exit;
""", indent=4)
parser_definition = parser_body(parser_prototype, normalize_snippet("""
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "{format_units}:{name}", _keywords,
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "{format_units}:{name}", _keywords,
{parse_arguments}))
goto exit;
""", indent=4))
@@ -820,7 +905,8 @@ class CLanguage(Language):
cpp_if = "#if " + conditional
cpp_endif = "#endif /* " + conditional + " */"
- if methoddef_define:
+ if methoddef_define and f.name not in clinic.ifndef_symbols:
+ clinic.ifndef_symbols.add(f.name)
methoddef_ifndef = normalize_snippet("""
#ifndef {methoddef_name}
#define {methoddef_name}
@@ -917,7 +1003,7 @@ class CLanguage(Language):
count_min = sys.maxsize
count_max = -1
- add("switch (PyTuple_GET_SIZE(args)) {{\n")
+ add("switch (PyTuple_GET_SIZE(args)) {\n")
for subset in permute_optional_groups(left, required, right):
count = len(subset)
count_min = min(count_min, count)
@@ -933,7 +1019,6 @@ class CLanguage(Language):
d = {}
d['count'] = count
d['name'] = f.name
- d['groups'] = sorted(group_ids)
d['format_units'] = "".join(p.converter.format_unit for p in subset)
parse_arguments = []
@@ -960,8 +1045,8 @@ class CLanguage(Language):
s = ' PyErr_SetString(PyExc_TypeError, "{} requires {} to {} arguments");\n'
add(s.format(f.full_name, count_min, count_max))
add(' goto exit;\n')
- add("}}")
- template_dict['option_group_parsing'] = output()
+ add("}")
+ template_dict['option_group_parsing'] = format_escape(output())
def render_function(self, clinic, f):
if not f:
@@ -1020,7 +1105,7 @@ class CLanguage(Language):
# METH_O, we have exactly one anyway, so we know exactly
# where it is.
if ("METH_O" in templates['methoddef_define'] and
- not default_return_converter):
+ '{impl_parameters}' in templates['parser_prototype']):
data.declarations.pop(0)
template_dict = {}
@@ -1056,7 +1141,7 @@ class CLanguage(Language):
f.return_converter.render(f, data)
template_dict['impl_return_type'] = f.return_converter.type
- template_dict['declarations'] = "\n".join(data.declarations)
+ template_dict['declarations'] = format_escape("\n".join(data.declarations))
template_dict['initializers'] = "\n\n".join(data.initializers)
template_dict['modifications'] = '\n\n'.join(data.modifications)
template_dict['keywords'] = '"' + '", "'.join(data.keywords) + '"'
@@ -1064,8 +1149,8 @@ class CLanguage(Language):
template_dict['parse_arguments'] = ', '.join(data.parse_arguments)
template_dict['impl_parameters'] = ", ".join(data.impl_parameters)
template_dict['impl_arguments'] = ", ".join(data.impl_arguments)
- template_dict['return_conversion'] = "".join(data.return_conversion).rstrip()
- template_dict['cleanup'] = "".join(data.cleanup)
+ template_dict['return_conversion'] = format_escape("".join(data.return_conversion).rstrip())
+ template_dict['cleanup'] = format_escape("".join(data.cleanup))
template_dict['return_value'] = data.return_value
# used by unpack tuple code generator
@@ -1078,7 +1163,8 @@ class CLanguage(Language):
if has_option_groups:
self.render_option_group_parsing(f, template_dict)
- for name, destination in clinic.field_destinations.items():
+ # buffers, not destination
+ for name, destination in clinic.destination_buffers.items():
template = templates[name]
if has_option_groups:
template = linear_format(template,
@@ -1100,6 +1186,11 @@ class CLanguage(Language):
s = template.format_map(template_dict)
+ # mild hack:
+ # reflow long impl declarations
+ if name in {"impl_prototype", "impl_definition"}:
+ s = wrap_declarations(s)
+
if clinic.line_prefix:
s = indent_all_lines(s, clinic.line_prefix)
if clinic.line_suffix:
@@ -1252,10 +1343,11 @@ class BlockParser:
match = self.start_re.match(line.lstrip())
return match.group(1) if match else None
- def _line(self):
+ def _line(self, lookahead=False):
self.line_number += 1
line = self.input.pop()
- self.language.parse_line(line)
+ if not lookahead:
+ self.language.parse_line(line)
return line
def parse_verbatim_block(self):
@@ -1311,7 +1403,7 @@ class BlockParser:
output_add, output_output = text_accumulator()
arguments = None
while self.input:
- line = self._line()
+ line = self._line(lookahead=True)
match = checksum_re.match(line.lstrip())
arguments = match.group(1) if match else None
if arguments:
@@ -1402,12 +1494,48 @@ class BlockPrinter:
self.f.write(text)
+class BufferSeries:
+ """
+ Behaves like a "defaultlist".
+ When you ask for an index that doesn't exist yet,
+ the object grows the list until that item exists.
+ So o[n] will always work.
+
+ Supports negative indices for actual items.
+ e.g. o[-1] is an element immediately preceding o[0].
+ """
+
+ def __init__(self):
+ self._start = 0
+ self._array = []
+ self._constructor = _text_accumulator
+
+ def __getitem__(self, i):
+ i -= self._start
+ if i < 0:
+ self._start += i
+ prefix = [self._constructor() for x in range(-i)]
+ self._array = prefix + self._array
+ i = 0
+ while i >= len(self._array):
+ self._array.append(self._constructor())
+ return self._array[i]
+
+ def clear(self):
+ for ta in self._array:
+ ta._text.clear()
+
+ def dump(self):
+ texts = [ta.output() for ta in self._array]
+ return "".join(texts)
+
+
class Destination:
def __init__(self, name, type, clinic, *args):
self.name = name
self.type = type
self.clinic = clinic
- valid_types = ('buffer', 'file', 'suppress', 'two-pass')
+ valid_types = ('buffer', 'file', 'suppress')
if type not in valid_types:
fail("Invalid destination type " + repr(type) + " for " + name + " , must be " + ', '.join(valid_types))
extra_arguments = 1 if type == "file" else 0
@@ -1426,10 +1554,8 @@ class Destination:
d['basename'] = basename
d['basename_root'], d['basename_extension'] = os.path.splitext(filename)
self.filename = args[0].format_map(d)
- if type == 'two-pass':
- self.id = None
- self.text, self.append, self._dump = _text_accumulator()
+ self.buffers = BufferSeries()
def __repr__(self):
if self.type == 'file':
@@ -1441,15 +1567,10 @@ class Destination:
def clear(self):
if self.type != 'buffer':
fail("Can't clear destination" + self.name + " , it's not of type buffer")
- self.text.clear()
+ self.buffers.clear()
def dump(self):
- if self.type == 'two-pass':
- if self.id is None:
- self.id = str(uuid.uuid4())
- return self.id
- fail("You can only dump a two-pass buffer exactly once!")
- return self._dump()
+ return self.buffers.dump()
# maps strings to Language objects.
@@ -1488,49 +1609,44 @@ class Clinic:
presets_text = """
preset block
everything block
+methoddef_ifndef buffer 1
docstring_prototype suppress
parser_prototype suppress
cpp_if suppress
cpp_endif suppress
-methoddef_ifndef buffer
preset original
everything block
+methoddef_ifndef buffer 1
docstring_prototype suppress
parser_prototype suppress
cpp_if suppress
cpp_endif suppress
-methoddef_ifndef buffer
preset file
everything file
+methoddef_ifndef file 1
docstring_prototype suppress
parser_prototype suppress
impl_definition block
preset buffer
everything buffer
+methoddef_ifndef buffer 1
+impl_definition block
docstring_prototype suppress
impl_prototype suppress
parser_prototype suppress
-impl_definition block
preset partial-buffer
everything buffer
+methoddef_ifndef buffer 1
docstring_prototype block
impl_prototype suppress
methoddef_define block
parser_prototype block
impl_definition block
-preset two-pass
-everything buffer
-docstring_prototype two-pass
-impl_prototype suppress
-methoddef_define two-pass
-parser_prototype two-pass
-impl_definition block
-
"""
def __init__(self, language, printer=None, *, force=False, verify=True, filename=None):
@@ -1554,25 +1670,25 @@ impl_definition block
self.add_destination("block", "buffer")
self.add_destination("suppress", "suppress")
self.add_destination("buffer", "buffer")
- self.add_destination("two-pass", "two-pass")
if filename:
self.add_destination("file", "file", "{dirname}/clinic/{basename}.h")
- d = self.destinations.get
- self.field_destinations = collections.OrderedDict((
- ('cpp_if', d('suppress')),
+ d = self.get_destination_buffer
+ self.destination_buffers = collections.OrderedDict((
+ ('cpp_if', d('file')),
('docstring_prototype', d('suppress')),
- ('docstring_definition', d('block')),
- ('methoddef_define', d('block')),
- ('impl_prototype', d('block')),
+ ('docstring_definition', d('file')),
+ ('methoddef_define', d('file')),
+ ('impl_prototype', d('file')),
('parser_prototype', d('suppress')),
- ('parser_definition', d('block')),
- ('cpp_endif', d('suppress')),
- ('methoddef_ifndef', d('buffer')),
+ ('parser_definition', d('file')),
+ ('cpp_endif', d('file')),
+ ('methoddef_ifndef', d('file', 1)),
('impl_definition', d('block')),
))
- self.field_destinations_stack = []
+ self.destination_buffers_stack = []
+ self.ifndef_symbols = set()
self.presets = {}
preset = None
@@ -1580,36 +1696,42 @@ impl_definition block
line = line.strip()
if not line:
continue
- name, value = line.split()
+ name, value, *options = line.split()
if name == 'preset':
self.presets[value] = preset = collections.OrderedDict()
continue
- destination = self.get_destination(value)
+ if len(options):
+ index = int(options[0])
+ else:
+ index = 0
+ buffer = self.get_destination_buffer(value, index)
if name == 'everything':
- for name in self.field_destinations:
- preset[name] = destination
+ for name in self.destination_buffers:
+ preset[name] = buffer
continue
- assert name in self.field_destinations
- preset[name] = destination
+ assert name in self.destination_buffers
+ preset[name] = buffer
global clinic
clinic = self
- def get_destination(self, name, default=unspecified):
+ def add_destination(self, name, type, *args):
+ if name in self.destinations:
+ fail("Destination already exists: " + repr(name))
+ self.destinations[name] = Destination(name, type, self, *args)
+
+ def get_destination(self, name):
d = self.destinations.get(name)
if not d:
- if default is not unspecified:
- return default
fail("Destination does not exist: " + repr(name))
return d
- def add_destination(self, name, type, *args):
- if name in self.destinations:
- fail("Destination already exists: " + repr(name))
- self.destinations[name] = Destination(name, type, self, *args)
+ def get_destination_buffer(self, name, item=0):
+ d = self.get_destination(name)
+ return d.buffers[item]
def parse(self, input):
printer = self.printer
@@ -1630,17 +1752,11 @@ impl_definition block
second_pass_replacements = {}
+ # these are destinations not buffers
for name, destination in self.destinations.items():
if destination.type == 'suppress':
continue
- output = destination._dump()
-
- if destination.type == 'two-pass':
- if destination.id:
- second_pass_replacements[destination.id] = output
- elif output:
- fail("Two-pass buffer " + repr(name) + " not empty at end of file!")
- continue
+ output = destination.dump()
if output:
@@ -1832,6 +1948,7 @@ __iadd__
__iand__
__ifloordiv__
__ilshift__
+__imatmul__
__imod__
__imul__
__index__
@@ -1848,6 +1965,7 @@ __le__
__len__
__lshift__
__lt__
+__matmul__
__mod__
__mul__
__neg__
@@ -1862,6 +1980,7 @@ __rdivmod__
__repr__
__rfloordiv__
__rlshift__
+__rmatmul__
__rmod__
__rmul__
__ror__
@@ -2326,12 +2445,7 @@ class CConverter(metaclass=CConverterAutoRegister):
declaration.append('\nPy_ssize_clean_t ')
declaration.append(self.length_name())
declaration.append(';')
- s = "".join(declaration)
- # double up curly-braces, this string will be used
- # as part of a format_map() template later
- s = s.replace("{", "{{")
- s = s.replace("}", "}}")
- return s
+ return "".join(declaration)
def initialize(self):
"""
@@ -2379,12 +2493,12 @@ class bool_converter(CConverter):
class char_converter(CConverter):
type = 'char'
- default_type = str
+ default_type = (bytes, bytearray)
format_unit = 'c'
c_ignored_default = "'\0'"
def converter_init(self):
- if isinstance(self.default, str) and (len(self.default) != 1):
+ if isinstance(self.default, self.default_type) and (len(self.default) != 1):
fail("char_converter: illegal default value " + repr(self.default))
@@ -2417,18 +2531,20 @@ class unsigned_short_converter(CConverter):
if not bitwise:
fail("Unsigned shorts must be bitwise (for now).")
-@add_legacy_c_converter('C', types='str')
+@add_legacy_c_converter('C', accept={str})
class int_converter(CConverter):
type = 'int'
default_type = int
format_unit = 'i'
c_ignored_default = "0"
- def converter_init(self, *, types='int'):
- if types == 'str':
+ def converter_init(self, *, accept={int}, type=None):
+ if accept == {str}:
self.format_unit = 'C'
- elif types != 'int':
- fail("int_converter: illegal 'types' argument")
+ elif accept != {int}:
+ fail("int_converter: illegal 'accept' argument " + repr(accept))
+ if type != None:
+ self.type = type
class unsigned_int_converter(CConverter):
type = 'unsigned int'
@@ -2517,137 +2633,153 @@ class object_converter(CConverter):
self.type = type
-@add_legacy_c_converter('s#', length=True)
-@add_legacy_c_converter('y', types="bytes")
-@add_legacy_c_converter('y#', types="bytes", length=True)
-@add_legacy_c_converter('z', nullable=True)
-@add_legacy_c_converter('z#', nullable=True, length=True)
+#
+# We define three conventions for buffer types in the 'accept' argument:
+#
+# buffer : any object supporting the buffer interface
+# rwbuffer: any object supporting the buffer interface, but must be writeable
+# robuffer: any object supporting the buffer interface, but must not be writeable
+#
+
+class buffer: pass
+class rwbuffer: pass
+class robuffer: pass
+
+def str_converter_key(types, encoding, zeroes):
+ return (frozenset(types), bool(encoding), bool(zeroes))
+
+str_converter_argument_map = {}
+
class str_converter(CConverter):
type = 'const char *'
default_type = (str, Null, NoneType)
format_unit = 's'
- def converter_init(self, *, encoding=None, types="str",
- length=False, nullable=False, zeroes=False):
-
- types = set(types.strip().split())
- bytes_type = set(("bytes",))
- str_type = set(("str",))
- all_3_type = set(("bytearray",)) | bytes_type | str_type
- is_bytes = types == bytes_type
- is_str = types == str_type
- is_all_3 = types == all_3_type
+ def converter_init(self, *, accept={str}, encoding=None, zeroes=False):
- self.length = bool(length)
- format_unit = None
+ key = str_converter_key(accept, encoding, zeroes)
+ format_unit = str_converter_argument_map.get(key)
+ if not format_unit:
+ fail("str_converter: illegal combination of arguments", key)
+ self.format_unit = format_unit
+ self.length = bool(zeroes)
if encoding:
+ if self.default not in (Null, None, unspecified):
+ fail("str_converter: Argument Clinic doesn't support default values for encoded strings")
self.encoding = encoding
+ self.type = 'char *'
+ # sorry, clinic can't support preallocated buffers
+ # for es# and et#
+ self.c_default = "NULL"
- if is_str and not (length or zeroes or nullable):
- format_unit = 'es'
- elif is_all_3 and not (length or zeroes or nullable):
- format_unit = 'et'
- elif is_str and length and zeroes and not nullable:
- format_unit = 'es#'
- elif is_all_3 and length and not (nullable or zeroes):
- format_unit = 'et#'
-
- if format_unit.endswith('#'):
- fail("Sorry: code using format unit ", repr(format_unit), "probably doesn't work properly yet.\nGive Larry your test case and he'll it.")
- # TODO set pointer to NULL
- # TODO add cleanup for buffer
- pass
-
- else:
- if zeroes:
- fail("str_converter: illegal combination of arguments (zeroes is only legal with an encoding)")
-
- if is_bytes and not (nullable or length):
- format_unit = 'y'
- elif is_bytes and length and not nullable:
- format_unit = 'y#'
- elif is_str and not (nullable or length):
- format_unit = 's'
- elif is_str and length and not nullable:
- format_unit = 's#'
- elif is_str and nullable and not length:
- format_unit = 'z'
- elif is_str and nullable and length:
- format_unit = 'z#'
+ def cleanup(self):
+ if self.encoding:
+ name = ensure_legal_c_identifier(self.name)
+ return "".join(["if (", name, ")\n PyMem_FREE(", name, ");\n"])
- if not format_unit:
- fail("str_converter: illegal combination of arguments")
- self.format_unit = format_unit
+#
+# This is the fourth or fifth rewrite of registering all the
+# crazy string converter format units. Previous approaches hid
+# bugs--generally mismatches between the semantics of the format
+# unit and the arguments necessary to represent those semantics
+# properly. Hopefully with this approach we'll get it 100% right.
+#
+# The r() function (short for "register") both registers the
+# mapping from arguments to format unit *and* registers the
+# legacy C converter for that format unit.
+#
+def r(format_unit, *, accept, encoding=False, zeroes=False):
+ if not encoding and format_unit != 's':
+ # add the legacy c converters here too.
+ #
+ # note: add_legacy_c_converter can't work for
+ # es, es#, et, or et#
+ # because of their extra encoding argument
+ #
+ # also don't add the converter for 's' because
+ # the metaclass for CConverter adds it for us.
+ kwargs = {}
+ if accept != {str}:
+ kwargs['accept'] = accept
+ if zeroes:
+ kwargs['zeroes'] = True
+ added_f = functools.partial(str_converter, **kwargs)
+ legacy_converters[format_unit] = added_f
+
+ d = str_converter_argument_map
+ key = str_converter_key(accept, encoding, zeroes)
+ if key in d:
+ sys.exit("Duplicate keys specified for str_converter_argument_map!")
+ d[key] = format_unit
+
+r('es', encoding=True, accept={str})
+r('es#', encoding=True, zeroes=True, accept={str})
+r('et', encoding=True, accept={bytes, bytearray, str})
+r('et#', encoding=True, zeroes=True, accept={bytes, bytearray, str})
+r('s', accept={str})
+r('s#', zeroes=True, accept={robuffer, str})
+r('y', accept={robuffer})
+r('y#', zeroes=True, accept={robuffer})
+r('z', accept={str, NoneType})
+r('z#', zeroes=True, accept={robuffer, str, NoneType})
+del r
class PyBytesObject_converter(CConverter):
type = 'PyBytesObject *'
format_unit = 'S'
+ # accept = {bytes}
class PyByteArrayObject_converter(CConverter):
type = 'PyByteArrayObject *'
format_unit = 'Y'
+ # accept = {bytearray}
class unicode_converter(CConverter):
type = 'PyObject *'
default_type = (str, Null, NoneType)
format_unit = 'U'
-@add_legacy_c_converter('u#', length=True)
-@add_legacy_c_converter('Z', nullable=True)
-@add_legacy_c_converter('Z#', nullable=True, length=True)
+@add_legacy_c_converter('u#', zeroes=True)
+@add_legacy_c_converter('Z', accept={str, NoneType})
+@add_legacy_c_converter('Z#', accept={str, NoneType}, zeroes=True)
class Py_UNICODE_converter(CConverter):
type = 'Py_UNICODE *'
default_type = (str, Null, NoneType)
format_unit = 'u'
- def converter_init(self, *, nullable=False, length=False):
- format_unit = 'Z' if nullable else 'u'
- if length:
+ def converter_init(self, *, accept={str}, zeroes=False):
+ format_unit = 'Z' if accept=={str, NoneType} else 'u'
+ if zeroes:
format_unit += '#'
self.length = True
self.format_unit = format_unit
-#
-# We define three string conventions for buffer types in the 'types' argument:
-# 'buffer' : any object supporting the buffer interface
-# 'rwbuffer': any object supporting the buffer interface, but must be writeable
-# 'robuffer': any object supporting the buffer interface, but must not be writeable
-#
-@add_legacy_c_converter('s*', types='str bytes bytearray buffer')
-@add_legacy_c_converter('z*', types='str bytes bytearray buffer', nullable=True)
-@add_legacy_c_converter('w*', types='bytearray rwbuffer')
+@add_legacy_c_converter('s*', accept={str, buffer})
+@add_legacy_c_converter('z*', accept={str, buffer, NoneType})
+@add_legacy_c_converter('w*', accept={rwbuffer})
class Py_buffer_converter(CConverter):
type = 'Py_buffer'
format_unit = 'y*'
impl_by_reference = True
c_ignored_default = "{NULL, NULL}"
- def converter_init(self, *, types='bytes bytearray buffer', nullable=False):
+ def converter_init(self, *, accept={buffer}):
if self.default not in (unspecified, None):
fail("The only legal default value for Py_buffer is None.")
+
self.c_default = self.c_ignored_default
- types = set(types.strip().split())
- bytes_type = set(('bytes',))
- bytearray_type = set(('bytearray',))
- buffer_type = set(('buffer',))
- rwbuffer_type = set(('rwbuffer',))
- robuffer_type = set(('robuffer',))
- str_type = set(('str',))
- bytes_bytearray_buffer_type = bytes_type | bytearray_type | buffer_type
-
- format_unit = None
- if types == (str_type | bytes_bytearray_buffer_type):
- format_unit = 's*' if not nullable else 'z*'
+
+ if accept == {str, buffer, NoneType}:
+ format_unit = 'z*'
+ elif accept == {str, buffer}:
+ format_unit = 's*'
+ elif accept == {buffer}:
+ format_unit = 'y*'
+ elif accept == {rwbuffer}:
+ format_unit = 'w*'
else:
- if nullable:
- fail('Py_buffer_converter: illegal combination of arguments (nullable=True)')
- elif types == (bytes_bytearray_buffer_type):
- format_unit = 'y*'
- elif types == (bytearray_type | rwbuffer_type):
- format_unit = 'w*'
- if not format_unit:
fail("Py_buffer_converter: illegal combination of arguments")
self.format_unit = format_unit
@@ -2863,10 +2995,11 @@ class long_return_converter(CReturnConverter):
type = 'long'
conversion_fn = 'PyLong_FromLong'
cast = ''
+ unsigned_cast = ''
def render(self, function, data):
self.declare(data)
- self.err_occurred_if("_return_value == -1", data)
+ self.err_occurred_if("_return_value == {}-1".format(self.unsigned_cast), data)
data.return_conversion.append(
''.join(('return_value = ', self.conversion_fn, '(', self.cast, '_return_value);\n')))
@@ -2887,10 +3020,12 @@ class init_return_converter(long_return_converter):
class unsigned_long_return_converter(long_return_converter):
type = 'unsigned long'
conversion_fn = 'PyLong_FromUnsignedLong'
+ unsigned_cast = '(unsigned long)'
class unsigned_int_return_converter(unsigned_long_return_converter):
type = 'unsigned int'
cast = '(unsigned long)'
+ unsigned_cast = '(unsigned int)'
class Py_ssize_t_return_converter(long_return_converter):
type = 'Py_ssize_t'
@@ -2899,6 +3034,7 @@ class Py_ssize_t_return_converter(long_return_converter):
class size_t_return_converter(long_return_converter):
type = 'size_t'
conversion_fn = 'PyLong_FromSize_t'
+ unsigned_cast = '(size_t)'
class double_return_converter(CReturnConverter):
@@ -2926,6 +3062,24 @@ class DecodeFSDefault_return_converter(CReturnConverter):
'return_value = PyUnicode_DecodeFSDefault(_return_value);\n')
+def eval_ast_expr(node, globals, *, filename='-'):
+ """
+ Takes an ast.Expr node. Compiles and evaluates it.
+ Returns the result of the expression.
+
+ globals represents the globals dict the expression
+ should see. (There's no equivalent for "locals" here.)
+ """
+
+ if isinstance(node, ast.Expr):
+ node = node.value
+
+ node = ast.Expression(node)
+ co = compile(node, filename, 'eval')
+ fn = types.FunctionType(co, globals)
+ return fn()
+
+
class IndentStack:
def __init__(self):
self.indents = []
@@ -3094,43 +3248,43 @@ class DSLParser:
fail("unknown destination command", repr(command))
- def directive_output(self, field, destination=''):
- fd = self.clinic.field_destinations
+ def directive_output(self, command_or_name, destination=''):
+ fd = self.clinic.destination_buffers
- if field == "preset":
+ if command_or_name == "preset":
preset = self.clinic.presets.get(destination)
if not preset:
fail("Unknown preset " + repr(destination) + "!")
fd.update(preset)
return
- if field == "push":
- self.clinic.field_destinations_stack.append(fd.copy())
+ if command_or_name == "push":
+ self.clinic.destination_buffers_stack.append(fd.copy())
return
- if field == "pop":
- if not self.clinic.field_destinations_stack:
+ if command_or_name == "pop":
+ if not self.clinic.destination_buffers_stack:
fail("Can't 'output pop', stack is empty!")
- previous_fd = self.clinic.field_destinations_stack.pop()
+ previous_fd = self.clinic.destination_buffers_stack.pop()
fd.update(previous_fd)
return
# secret command for debugging!
- if field == "print":
+ if command_or_name == "print":
self.block.output.append(pprint.pformat(fd))
self.block.output.append('\n')
return
d = self.clinic.get_destination(destination)
- if field == "everything":
+ if command_or_name == "everything":
for name in list(fd):
fd[name] = d
return
- if field not in fd:
- fail("Invalid field " + repr(field) + ", must be one of:\n preset push pop print everything " + " ".join(fd))
- fd[field] = d
+ if command_or_name not in fd:
+ fail("Invalid command / destination name " + repr(command_or_name) + ", must be one of:\n preset push pop print everything " + " ".join(fd))
+ fd[command_or_name] = d
def directive_dump(self, name):
self.block.output.append(self.clinic.get_destination(name).dump())
@@ -3513,7 +3667,7 @@ class DSLParser:
except SyntaxError:
try:
# the last = was probably inside a function call, like
- # i: int(nullable=True)
+ # c: int(accept={str})
# so assume there was no actual default value.
default = None
ast_input = "def x({}): pass".format(line)
@@ -3524,6 +3678,14 @@ class DSLParser:
fail("Function " + self.function.name + " has an invalid parameter declaration:\n\t" + line)
function_args = module.body[0].args
+
+ if len(function_args.args) > 1:
+ fail("Function " + self.function.name + " has an invalid parameter declaration (comma?):\n\t" + line)
+ if function_args.defaults or function_args.kw_defaults:
+ fail("Function " + self.function.name + " has an invalid parameter declaration (default value?):\n\t" + line)
+ if function_args.vararg or function_args.kwarg:
+ fail("Function " + self.function.name + " has an invalid parameter declaration (*args? **kwargs?):\n\t" + line)
+
parameter = function_args.args[0]
parameter_name = parameter.arg
@@ -3686,7 +3848,9 @@ class DSLParser:
fail("Annotations must be either a name, a function call, or a string.")
name = annotation.func.id
- kwargs = {node.arg: ast.literal_eval(node.value) for node in annotation.keywords}
+ symbols = globals()
+
+ kwargs = {node.arg: eval_ast_expr(node.value, symbols) for node in annotation.keywords}
return name, False, kwargs
def parse_special_symbol(self, symbol):
@@ -3959,7 +4123,7 @@ class DSLParser:
# add(f.return_converter.py_default)
if not f.docstring_only:
- add("\n--\n")
+ add("\n" + sig_end_marker + "\n")
docstring_first_line = output()
diff --git a/Tools/clinic/clinic_test.py b/Tools/clinic/clinic_test.py
index cd21000c05..ac0640c66c 100644
--- a/Tools/clinic/clinic_test.py
+++ b/Tools/clinic/clinic_test.py
@@ -3,7 +3,6 @@
# Licensed to the PSF under a contributor agreement.
#
-import builtins
import clinic
from clinic import DSLParser
import collections
@@ -747,15 +746,6 @@ Not at column 0!
Nested docstring here, goeth.
""".strip(), function.docstring)
- def test_parser_regression_special_character_in_parameter_column_of_docstring_first_line(self):
- function = self.parse_function("""
-module os
-os.stat
- path: str
-This/used to break Clinic!
-""")
- self.assertEqual("stat($module, /, path)\n--\n\nThis/used to break Clinic!", function.docstring)
-
def test_directive(self):
c = FakeClinic()
parser = DSLParser(c)
diff --git a/Tools/demo/ss1.py b/Tools/demo/ss1.py
index 649790f493..c51f041933 100755
--- a/Tools/demo/ss1.py
+++ b/Tools/demo/ss1.py
@@ -261,7 +261,7 @@ class SheetParser:
def end_int(self, text):
try:
self.value = int(text)
- except:
+ except (TypeError, ValueError):
self.value = None
end_long = end_int
@@ -269,13 +269,13 @@ class SheetParser:
def end_double(self, text):
try:
self.value = float(text)
- except:
+ except (TypeError, ValueError):
self.value = None
def end_complex(self, text):
try:
self.value = complex(text)
- except:
+ except (TypeError, ValueError):
self.value = None
def end_string(self, text):
@@ -763,7 +763,7 @@ class SheetGUI:
for cls in int, float, complex:
try:
value = cls(text)
- except:
+ except (TypeError, ValueError):
continue
else:
cell = NumericCell(value)
diff --git a/Tools/freeze/README b/Tools/freeze/README
index 81be2c8432..5bc5b049d5 100644
--- a/Tools/freeze/README
+++ b/Tools/freeze/README
@@ -100,8 +100,8 @@ to place the Tcl and Tk library files in the distributed setup, and
then declare these directories in your frozen Python program using
the TCL_LIBRARY, TK_LIBRARY and TIX_LIBRARY environment variables.
-For example, assume you will ship your frozen program in the directory
-<root>/bin/windows-x86 and will place your Tcl library files
+For example, assume you will ship your frozen program in the directory
+<root>/bin/windows-x86 and will place your Tcl library files
in <root>/lib/tcl8.2 and your Tk library files in <root>/lib/tk8.2. Then
placing the following lines in your frozen Python script before importing
Tkinter or Tix would set the environment correctly for Tcl/Tk/Tix:
@@ -138,8 +138,8 @@ variable PATH is consulted, and under Unix, it may be the
environment variable LD_LIBRARY_PATH and/or the system
shared library cache (ld.so). An additional preferred directory for
finding the dynamic libraries is built into the .dll or .so files at
-compile time - see the LIB_RUNTIME_DIR variable in the Tcl makefile.
-The OS must find the dynamic libraries or your frozen program won't start.
+compile time - see the LIB_RUNTIME_DIR variable in the Tcl makefile.
+The OS must find the dynamic libraries or your frozen program won't start.
Usually I make sure that the .so or .dll files are in the same directory
as the executable, but this may not be foolproof.
@@ -149,8 +149,8 @@ incorporated in a frozen Python module as string literals and written
to a temporary location when the program runs; this is currently left
as an exercise for the reader. An easier approach is to freeze the
Tcl/Tk/Tix code into the dynamic libraries using the Tcl ET code,
-or the Tix Stand-Alone-Module code. Of course, you can also simply
-require that Tcl/Tk is required on the target installation, but be
+or the Tix Stand-Alone-Module code. Of course, you can also simply
+require that Tcl/Tk is required on the target installation, but be
careful that the version corresponds.
There are some caveats using frozen Tkinter applications:
@@ -164,7 +164,7 @@ program was frozen, not where it is run from.
A warning about shared library modules
--------------------------------------
-When your Python installation uses shared library modules such as
+When your Python installation uses shared library modules such as
_tkinter.pyd, these will not be incorporated in the frozen program.
Again, the frozen program will work when you test it, but it won't
work when you ship it to a site without a Python installation.
@@ -275,9 +275,9 @@ Options:
are read and the -i option replaced with the parsed
params (note - quoting args in this file is NOT supported)
--s subsystem: Specify the subsystem (For Windows only.);
+-s subsystem: Specify the subsystem (For Windows only.);
'console' (default), 'windows', 'service' or 'com_dll'
-
+
-w: Toggle Windows (NT or 95) behavior.
(For debugging only -- on a win32 platform, win32 behavior
is automatic.)
diff --git a/Tools/freeze/bkfile.py b/Tools/freeze/bkfile.py
index 6abacc9e0e..20a70b0639 100644
--- a/Tools/freeze/bkfile.py
+++ b/Tools/freeze/bkfile.py
@@ -1,49 +1,26 @@
from builtins import open as _orig_open
-class _BkFile:
- def __init__(self, file, mode, bufsize):
- import os
- self.__filename = file
- self.__backup = file + '~'
- try:
- os.unlink(self.__backup)
- except OSError:
- pass
- try:
- os.rename(file, self.__backup)
- except OSError:
- self.__backup = None
- self.__file = _orig_open(file, mode, bufsize)
- self.closed = self.__file.closed
- self.fileno = self.__file.fileno
- self.flush = self.__file.flush
- self.isatty = self.__file.isatty
- self.mode = self.__file.mode
- self.name = self.__file.name
- self.read = self.__file.read
- try:
- self.readinto = self.__file.readinto
- except AttributeError:
- pass
- self.readline = self.__file.readline
- self.readlines = self.__file.readlines
- self.seek = self.__file.seek
- self.tell = self.__file.tell
- self.truncate = self.__file.truncate
- self.write = self.__file.write
- self.writelines = self.__file.writelines
-
- def close(self):
- self.__file.close()
- if self.__backup is None:
- return
- import filecmp
- if filecmp.cmp(self.__backup, self.__filename, shallow = 0):
- import os
- os.unlink(self.__filename)
- os.rename(self.__backup, self.__filename)
-
-def open(file, mode = 'r', bufsize = -1):
+def open(file, mode='r', bufsize=-1):
if 'w' not in mode:
return _orig_open(file, mode, bufsize)
- return _BkFile(file, mode, bufsize)
+ import os
+ backup = file + '~'
+ try:
+ os.unlink(backup)
+ except OSError:
+ pass
+ try:
+ os.rename(file, backup)
+ except OSError:
+ return _orig_open(file, mode, bufsize)
+ f = _orig_open(file, mode, bufsize)
+ _orig_close = f.close
+ def close():
+ _orig_close()
+ import filecmp
+ if filecmp.cmp(backup, file, shallow=False):
+ import os
+ os.unlink(file)
+ os.rename(backup, file)
+ f.close = close
+ return f
diff --git a/Tools/freeze/extensions_win32.ini b/Tools/freeze/extensions_win32.ini
index 1e36abad57..d01fd6b9f5 100644
--- a/Tools/freeze/extensions_win32.ini
+++ b/Tools/freeze/extensions_win32.ini
@@ -6,7 +6,7 @@
; This is all setup for all the win32 extension modules
; released by Mark Hammond.
-; You must ensure that the environment variable PYTHONEX is set
+; You must ensure that the environment variable PYTHONEX is set
; to point to the root win32 extensions directory
; PYTHONPREFIX must point to the Python build root directory
@@ -49,7 +49,7 @@ dsp=%PYTHONPREFIX%\PCBuild\select.dsp
[zlib]
dsp=%PYTHONPREFIX%\PCBuild\zlib.dsp
-cl=/I %PYTHONPREFIX%\..\zlib-1.1.4 /D _WINDOWS /D WIN32
+cl=/I %PYTHONPREFIX%\..\zlib-1.1.4 /D _WINDOWS /D WIN32
libs=%PYTHONPREFIX%\..\zlib-1.1.4\zlib.lib /nodefaultlib:libc
[winreg]
@@ -95,7 +95,7 @@ dsp=%PYTHONEX%\win32\win32event.dsp
cl=/I %PYTHONEX%\win32\src
[win32file]
-dsp=%PYTHONEX%\win32\win32file.dsp
+dsp=%PYTHONEX%\win32\win32file.dsp
cl=/I %PYTHONEX%\win32\src
[win32net]
@@ -108,7 +108,7 @@ dsp=%PYTHONEX%\win32\win32pdh.dsp
cl=/I %PYTHONEX%\win32\src
[win32pipe]
-dsp=%PYTHONEX%\win32\win32pipe.dsp
+dsp=%PYTHONEX%\win32\win32pipe.dsp
cl=/I %PYTHONEX%\win32\src
[win32security]
diff --git a/Tools/freeze/freeze.py b/Tools/freeze/freeze.py
index e0c6c2c580..c0758078f8 100755
--- a/Tools/freeze/freeze.py
+++ b/Tools/freeze/freeze.py
@@ -366,8 +366,10 @@ def main():
mf.load_file(mod)
# Alias "importlib._bootstrap" to "_frozen_importlib" so that the
- # import machinery can bootstrap.
+ # import machinery can bootstrap. Do the same for
+ # importlib._bootstrap_external.
mf.modules["_frozen_importlib"] = mf.modules["importlib._bootstrap"]
+ mf.modules["_frozen_importlib_external"] = mf.modules["importlib._bootstrap_external"]
# Add the main script as either __main__, or the actual module name.
if python_entry_is_main:
@@ -439,25 +441,17 @@ def main():
frozendllmain_c, os.path.basename(extensions_c)] + files
maindefn = checkextensions_win32.CExtension( '__main__', xtras )
frozen_extensions.append( maindefn )
- outfp = open(makefile, 'w')
- try:
+ with open(makefile, 'w') as outfp:
winmakemakefile.makemakefile(outfp,
locals(),
frozen_extensions,
os.path.basename(target))
- finally:
- outfp.close()
return
# generate config.c and Makefile
builtins.sort()
- infp = open(config_c_in)
- outfp = bkfile.open(config_c, 'w')
- try:
+ with open(config_c_in) as infp, bkfile.open(config_c, 'w') as outfp:
makeconfig.makeconfig(infp, outfp, builtins)
- finally:
- outfp.close()
- infp.close()
cflags = ['$(OPT)']
cppflags = defines + includes
@@ -475,11 +469,8 @@ def main():
files + supp_sources + addfiles + libs + \
['$(MODLIBS)', '$(LIBS)', '$(SYSLIBS)']
- outfp = bkfile.open(makefile, 'w')
- try:
+ with bkfile.open(makefile, 'w') as outfp:
makemakefile.makemakefile(outfp, somevars, files, base_target)
- finally:
- outfp.close()
# Done!
diff --git a/Tools/freeze/makefreeze.py b/Tools/freeze/makefreeze.py
index ef18ec7b28..64e3e6bf71 100644
--- a/Tools/freeze/makefreeze.py
+++ b/Tools/freeze/makefreeze.py
@@ -39,36 +39,34 @@ def makefreeze(base, dict, debug=0, entry_point=None, fail_import=()):
mangled = "__".join(mod.split("."))
if m.__code__:
file = 'M_' + mangled + '.c'
- outfp = bkfile.open(base + file, 'w')
- files.append(file)
- if debug:
- print("freezing", mod, "...")
- str = marshal.dumps(m.__code__)
- size = len(str)
- if m.__path__:
- # Indicate package by negative size
- size = -size
- done.append((mod, mangled, size))
- writecode(outfp, mangled, str)
- outfp.close()
+ with bkfile.open(base + file, 'w') as outfp:
+ files.append(file)
+ if debug:
+ print("freezing", mod, "...")
+ str = marshal.dumps(m.__code__)
+ size = len(str)
+ if m.__path__:
+ # Indicate package by negative size
+ size = -size
+ done.append((mod, mangled, size))
+ writecode(outfp, mangled, str)
if debug:
print("generating table of frozen modules")
- outfp = bkfile.open(base + 'frozen.c', 'w')
- for mod, mangled, size in done:
- outfp.write('extern unsigned char M_%s[];\n' % mangled)
- outfp.write(header)
- for mod, mangled, size in done:
- outfp.write('\t{"%s", M_%s, %d},\n' % (mod, mangled, size))
- outfp.write('\n')
- # The following modules have a NULL code pointer, indicating
- # that the frozen program should not search for them on the host
- # system. Importing them will *always* raise an ImportError.
- # The zero value size is never used.
- for mod in fail_import:
- outfp.write('\t{"%s", NULL, 0},\n' % (mod,))
- outfp.write(trailer)
- outfp.write(entry_point)
- outfp.close()
+ with bkfile.open(base + 'frozen.c', 'w') as outfp:
+ for mod, mangled, size in done:
+ outfp.write('extern unsigned char M_%s[];\n' % mangled)
+ outfp.write(header)
+ for mod, mangled, size in done:
+ outfp.write('\t{"%s", M_%s, %d},\n' % (mod, mangled, size))
+ outfp.write('\n')
+ # The following modules have a NULL code pointer, indicating
+ # that the frozen program should not search for them on the host
+ # system. Importing them will *always* raise an ImportError.
+ # The zero value size is never used.
+ for mod in fail_import:
+ outfp.write('\t{"%s", NULL, 0},\n' % (mod,))
+ outfp.write(trailer)
+ outfp.write(entry_point)
return files
diff --git a/Tools/freeze/makemakefile.py b/Tools/freeze/makemakefile.py
index 32e804c551..fa43fafe1e 100644
--- a/Tools/freeze/makemakefile.py
+++ b/Tools/freeze/makemakefile.py
@@ -17,12 +17,12 @@ def makemakefile(outfp, makevars, files, target):
base = os.path.basename(file)
dest = base[:-2] + '.o'
outfp.write("%s: %s\n" % (dest, file))
- outfp.write("\t$(CC) $(CFLAGS) $(CPPFLAGS) -c %s\n" % file)
+ outfp.write("\t$(CC) $(PY_CFLAGS) $(PY_CPPFLAGS) -c %s\n" % file)
files[i] = dest
deps.append(dest)
outfp.write("\n%s: %s\n" % (target, ' '.join(deps)))
- outfp.write("\t$(LINKCC) $(LDFLAGS) $(LINKFORSHARED) %s -o %s $(LDLAST)\n" %
+ outfp.write("\t$(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) %s -o %s $(LDLAST)\n" %
(' '.join(files), target))
outfp.write("\nclean:\n\t-rm -f *.o %s\n" % target)
diff --git a/Tools/gdb/libpython.py b/Tools/gdb/libpython.py
index 32341e7794..75f1ccbd44 100755
--- a/Tools/gdb/libpython.py
+++ b/Tools/gdb/libpython.py
@@ -56,20 +56,33 @@ if sys.version_info[0] >= 3:
long = int
# Look up the gdb.Type for some standard types:
-_type_char_ptr = gdb.lookup_type('char').pointer() # char*
-_type_unsigned_char_ptr = gdb.lookup_type('unsigned char').pointer() # unsigned char*
-_type_void_ptr = gdb.lookup_type('void').pointer() # void*
-_type_unsigned_short_ptr = gdb.lookup_type('unsigned short').pointer()
-_type_unsigned_int_ptr = gdb.lookup_type('unsigned int').pointer()
+# Those need to be refreshed as types (pointer sizes) may change when
+# gdb loads different executables
-# value computed later, see PyUnicodeObjectPtr.proxy()
-_is_pep393 = None
+def _type_char_ptr():
+ return gdb.lookup_type('char').pointer() # char*
-SIZEOF_VOID_P = _type_void_ptr.sizeof
+def _type_unsigned_char_ptr():
+ return gdb.lookup_type('unsigned char').pointer() # unsigned char*
+
+
+def _type_unsigned_short_ptr():
+ return gdb.lookup_type('unsigned short').pointer()
+
+
+def _type_unsigned_int_ptr():
+ return gdb.lookup_type('unsigned int').pointer()
-Py_TPFLAGS_HEAPTYPE = (1 << 9)
+def _sizeof_void_p():
+ return gdb.lookup_type('void').pointer().sizeof
+
+
+# value computed later, see PyUnicodeObjectPtr.proxy()
+_is_pep393 = None
+
+Py_TPFLAGS_HEAPTYPE = (1 << 9)
Py_TPFLAGS_LONG_SUBCLASS = (1 << 24)
Py_TPFLAGS_LIST_SUBCLASS = (1 << 25)
Py_TPFLAGS_TUPLE_SUBCLASS = (1 << 26)
@@ -460,8 +473,8 @@ def _PyObject_VAR_SIZE(typeobj, nitems):
return ( ( typeobj.field('tp_basicsize') +
nitems * typeobj.field('tp_itemsize') +
- (SIZEOF_VOID_P - 1)
- ) & ~(SIZEOF_VOID_P - 1)
+ (_sizeof_void_p() - 1)
+ ) & ~(_sizeof_void_p() - 1)
).cast(_PyObject_VAR_SIZE._type_size_t)
_PyObject_VAR_SIZE._type_size_t = None
@@ -485,9 +498,9 @@ class HeapTypeObjectPtr(PyObjectPtr):
size = _PyObject_VAR_SIZE(typeobj, tsize)
dictoffset += size
assert dictoffset > 0
- assert dictoffset % SIZEOF_VOID_P == 0
+ assert dictoffset % _sizeof_void_p() == 0
- dictptr = self._gdbval.cast(_type_char_ptr) + dictoffset
+ dictptr = self._gdbval.cast(_type_char_ptr()) + dictoffset
PyObjectPtrPtr = PyObjectPtr.get_gdb_type().pointer()
dictptr = dictptr.cast(PyObjectPtrPtr)
return PyObjectPtr.from_pyobject_ptr(dictptr.dereference())
@@ -1004,7 +1017,7 @@ class PyBytesObjectPtr(PyObjectPtr):
def __str__(self):
field_ob_size = self.field('ob_size')
field_ob_sval = self.field('ob_sval')
- char_ptr = field_ob_sval.address.cast(_type_unsigned_char_ptr)
+ char_ptr = field_ob_sval.address.cast(_type_unsigned_char_ptr())
return ''.join([chr(char_ptr[i]) for i in safe_range(field_ob_size)])
def proxyval(self, visited):
@@ -1135,11 +1148,11 @@ class PyUnicodeObjectPtr(PyObjectPtr):
field_str = self.field('data')['any']
repr_kind = int(state['kind'])
if repr_kind == 1:
- field_str = field_str.cast(_type_unsigned_char_ptr)
+ field_str = field_str.cast(_type_unsigned_char_ptr())
elif repr_kind == 2:
- field_str = field_str.cast(_type_unsigned_short_ptr)
+ field_str = field_str.cast(_type_unsigned_short_ptr())
elif repr_kind == 4:
- field_str = field_str.cast(_type_unsigned_int_ptr)
+ field_str = field_str.cast(_type_unsigned_int_ptr())
else:
# Python 3.2 and earlier
field_length = long(self.field('length'))
diff --git a/Tools/i18n/makelocalealias.py b/Tools/i18n/makelocalealias.py
index 10887ce338..c7ecacec38 100755
--- a/Tools/i18n/makelocalealias.py
+++ b/Tools/i18n/makelocalealias.py
@@ -8,9 +8,12 @@
"""
import locale
import sys
+_locale = locale
-# Location of the alias file
+# Location of the X11 alias file.
LOCALE_ALIAS = '/usr/share/X11/locale/locale.alias'
+# Location of the glibc SUPPORTED locales file.
+SUPPORTED = '/usr/share/i18n/SUPPORTED'
def parse(filename):
@@ -44,10 +47,39 @@ def parse(filename):
encoding = encoding.replace('-', '')
encoding = encoding.replace('_', '')
locale = lang + '.' + encoding
- if encoding.lower() == 'utf8':
- # Ignore UTF-8 mappings - this encoding should be
- # available for all locales
- continue
+ data[locale] = alias
+ return data
+
+def parse_glibc_supported(filename):
+
+ with open(filename, encoding='latin1') as f:
+ lines = list(f)
+ data = {}
+ for line in lines:
+ line = line.strip()
+ if not line:
+ continue
+ if line[:1] == '#':
+ continue
+ line = line.replace('/', ' ').strip()
+ line = line.rstrip('\\').rstrip()
+ words = line.split()
+ if len(words) != 2:
+ continue
+ alias, alias_encoding = words
+ # Lower-case locale
+ locale = alias.lower()
+ # Normalize encoding, if given
+ if '.' in locale:
+ lang, encoding = locale.split('.')[:2]
+ encoding = encoding.replace('-', '')
+ encoding = encoding.replace('_', '')
+ locale = lang + '.' + encoding
+ # Add an encoding to alias
+ alias, _, modifier = alias.partition('@')
+ alias = _locale._replace_encoding(alias, alias_encoding)
+ if modifier and not (modifier == 'euro' and alias_encoding == 'ISO-8859-15'):
+ alias += '@' + modifier
data[locale] = alias
return data
@@ -92,9 +124,25 @@ def check(data):
return errors
if __name__ == '__main__':
+ import argparse
+ parser = argparse.ArgumentParser()
+ parser.add_argument('--locale-alias', default=LOCALE_ALIAS,
+ help='location of the X11 alias file '
+ '(default: %a)' % LOCALE_ALIAS)
+ parser.add_argument('--glibc-supported', default=SUPPORTED,
+ help='location of the glibc SUPPORTED locales file '
+ '(default: %a)' % SUPPORTED)
+ args = parser.parse_args()
+
data = locale.locale_alias.copy()
- data.update(parse(LOCALE_ALIAS))
- data = optimize(data)
+ data.update(parse_glibc_supported(args.glibc_supported))
+ data.update(parse(args.locale_alias))
+ while True:
+ # Repeat optimization while the size is decreased.
+ n = len(data)
+ data = optimize(data)
+ if len(data) == n:
+ break
print_differences(data, locale.locale_alias)
print()
print('locale_alias = {')
diff --git a/Tools/i18n/pygettext.py b/Tools/i18n/pygettext.py
index 9ffeb17d6b..3c6c14c836 100755
--- a/Tools/i18n/pygettext.py
+++ b/Tools/i18n/pygettext.py
@@ -441,9 +441,7 @@ class TokenEater:
def write(self, fp):
options = self.__options
- timestamp = time.strftime('%Y-%m-%d %H:%M+%Z')
- # The time stamp in the header doesn't have the same format as that
- # generated by xgettext...
+ timestamp = time.strftime('%Y-%m-%d %H:%M%z')
encoding = fp.encoding if fp.encoding else 'UTF-8'
print(pot_header % {'time': timestamp, 'version': __version__,
'charset': encoding,
diff --git a/Tools/msi/README.txt b/Tools/msi/README.txt
index dc4ae90cf2..7023b61181 100644
--- a/Tools/msi/README.txt
+++ b/Tools/msi/README.txt
@@ -1,25 +1,535 @@
-Packaging Python as a Microsoft Installer Package (MSI)
-=======================================================
-
-Using this library, Python can be packaged as a MS-Windows
-MSI file. To generate an installer package, you need
-a build tree. By default, the build tree root directory
-is assumed to be in "../..". This location can be changed
-by adding a file config.py; see the beginning of msi.py
-for additional customization options.
-
-The packaging process assumes that binaries have been
-generated according to the instructions in PCBuild/README.txt,
-and that you have either Visual Studio or the Platform SDK
-installed. In addition, you need the Python COM extensions,
-either from PythonWin, or from ActivePython.
-
-To invoke the script, open a cmd.exe window which has
-cabarc.exe in its PATH (e.g. "Visual Studio .NET 2003
-Command Prompt"). Then invoke
-
-<path-to-python.exe> msi.py
-
-If everything succeeds, pythonX.Y.Z.msi is generated
-in the current directory.
+Quick Build Info
+================
+
+For testing, the installer should be built with the Tools/msi/build.bat
+script:
+
+ build.bat [-x86] [-x64] [--doc]
+
+For an official release, the installer should be built with the
+Tools/msi/buildrelease.bat script and environment variables:
+
+ set PYTHON=<path to Python 2.7 or 3.4>
+ set SPHINXBUILD=<path to sphinx-build.exe>
+ set PATH=<path to Mercurial (hg.exe)>;
+ <path to HTML Help Compiler (hhc.exe)>;%PATH%
+
+ buildrelease.bat [-x86] [-x64] [-D] [-B]
+ [-o <output directory>] [-c <certificate name>]
+
+See the Building the Installer section for more information.
+
+Overview
+========
+
+Python is distributed on Windows as an installer that will configure the
+user's system. This allows users to have a functioning copy of Python
+without having to build it themselves.
+
+The main tasks of the installer are:
+
+* copy required files into the expected layout
+* configure system settings so the installation can be located by
+ other programs
+* add entry points for modifying, repairing and uninstalling Python
+* make it easy to launch Python, its documentation, and IDLE
+
+Each of these is discussed in a later section of this document.
+
+Structure of the Installer
+==========================
+
+The installer is structured as a 'layout', which consists of a number of
+CAB and MSI files and a single EXE.
+
+The EXE is the main entry point into the installer. It contains the UI
+and command-line logic, as well as the ability to locate and optionally
+download other parts of the layout.
+
+Each MSI contains the logic required to install a component or feature
+of Python. These MSIs should not be launched directly by users. MSIs can
+be embedded into the EXE or automatically downloaded as needed.
+
+Each CAB contains the files making up a Python installation. CABs are
+embedded into their associated MSI and are never seen by users.
+
+MSIs are only required when the related feature or component is being
+installed. When components are not selected for installation, the
+associated MSI is not downloaded. This allows the installer to offer
+options to install debugging symbols and binaries without increasing
+the initial download size by separating them into their own MSIs.
+
+Building the Installer
+======================
+
+Before building the installer, download extra build dependencies using
+Tools\msi\get_externals.bat. (Note that this is in addition to the
+similarly named file in PCBuild.)
+
+For testing, the installer should be built with the Tools/msi/build.bat
+script:
+
+ build.bat [-x86] [-x64] [--doc] [--test-marker] [--pack]
+
+This script will build the required configurations of Python and
+generate an installer layout in PCBuild/(win32|amd64)/en-us.
+
+Specify -x86 and/or -x64 to build for each platform. If neither is
+specified, both platforms will be built. Currently, both the debug and
+release versions of Python are required for the installer.
+
+Specify --doc to build the documentation (.chm) file. If the file is not
+available, it will simply be excluded from the installer. Ensure
+%PYTHON% and %SPHINXBUILD% are set when passing this option. You may
+also set %HTMLHELP% to the Html Help Compiler (hhc.exe), or put HHC on
+your PATH or in externals/.
+
+Specify --test-marker to build an installer that works side-by-side with
+an official Python release. All registry keys and install locations will
+include an extra marker to avoid overwriting files. This marker is
+currently an 'x' prefix, but may change at any time.
+
+Specify --pack to build an installer that does not require all MSIs to
+be available alongside. This takes longer, but is easier to share.
+
+
+For an official release, the installer should be built with the
+Tools/msi/buildrelease.bat script:
+
+ set PYTHON=<path to Python 2.7 or 3.4>
+ set SPHINXBUILD=<path to sphinx-build.exe>
+ set PATH=<path to Mercurial (hg.exe)>;
+ <path to HTML Help Compiler (hhc.exe)>;%PATH%
+
+ buildrelease.bat [-x86] [-x64] [-D] [-B]
+ [-o <output directory>] [-c <certificate name>]
+
+Specify -x86 and/or -x64 to build for each platform. If neither is
+specified, both platforms will be built. Currently, both the debug and
+release versions of Python are required for the installer.
+
+Specify -D to skip rebuilding the documentation. The documentation is
+required for a release and the build will fail if it is not available.
+
+Specify -B to skip rebuilding Python. This is useful to only rebuild the
+installer layout after a previous call to buildrelease.bat.
+
+Specify -o to set an output directory. The installer layouts will be
+copied to platform-specific subdirectories of this path.
+
+Specify -c to choose a code-signing certificate to be used for all the
+signable binaries in Python as well as each file making up the
+installer. Official releases of Python must be signed.
+
+Ensure %PYTHON% and %SPHINXBUILD% are set when passing this option. You
+may also set %HTMLHELP% to the Html Help Compiler (hhc.exe), or put HHC
+on your PATH or in externals/. You will also need Mercurial (hg.exe) on
+your PATH.
+
+If WiX is not found on your system, it will be automatically downloaded
+and extracted to the externals/ directory.
+
+To manually build layouts of the installer, build one of the projects in
+the bundle folder.
+
+ msbuild bundle\snapshot.wixproj
+ msbuild bundle\releaseweb.wixproj
+ msbuild bundle\releaselocal.wixproj
+ msbuild bundle\full.wixproj
+
+snapshot.wixproj produces a test installer versioned based on the date.
+
+releaseweb.wixproj produces a release installer that does not embed any
+of the layout.
+
+releaselocal.wixproj produces a release installer that embeds the files
+required for a default installation.
+
+full.wixproj produces a test installer that embeds the entire layout.
+
+The following properties may be passed when building these projects.
+
+ /p:BuildForRelease=(true|false)
+ When true, adds extra verification to ensure a complete installer is
+ produced. For example, binutils is required when building for a release
+ to generate MinGW-compatible libraries, and the build will be aborted if
+ this fails. Defaults to false.
+
+ /p:ReleaseUri=(any URI)
+ Used to generate unique IDs for the installers to allow side-by-side
+ installation. Forks of Python can use the same installer infrastructure
+ by providing a unique URI for this property. It does not need to be an
+ active internet address. Defaults to $(ComputerName).
+
+ Official releases use http://www.python.org/(architecture name)
+
+ /p:DownloadUrlBase=(any URI)
+ Specifies the base of a URL where missing parts of the installer layout
+ can be downloaded from. The build version and architecture will be
+ appended to create the full address. If omitted, missing components will
+ not be automatically downloaded.
+
+ /p:DownloadUrl=(any URI)
+ Specifies the full URL where missing parts of the installer layout can
+ be downloaded from. Should normally include '{2}', which will be
+ substituted for the filename. If omitted, missing components will not be
+ automatically downloaded. If specified, this value overrides
+ DownloadUrlBase.
+
+ /p:SigningCertificate=(certificate name)
+ Specifies the certificate to sign the installer layout with. If omitted,
+ the layout will not be signed.
+
+ /p:RebuildAll=(true|false)
+ When true, rebuilds all of the MSIs making up the layout. Defaults to
+ true.
+
+Uploading the Installer
+=======================
+
+For official releases, the uploadrelease.bat script should be used.
+
+You will require PuTTY so that plink.exe and pscp.exe can be used, and your
+SSH key can be activated in pageant.exe. PuTTY should be either on your path
+or in %ProgramFiles(x86)%\PuTTY.
+
+To include signatures for each uploaded file, you will need gpg2.exe on your
+path or have run get_externals.bat. You may also need to "gpg2.exe --import"
+your key before running the upload script.
+
+ uploadrelease.bat --host <host> --user <username> [--dry-run] [--no-gpg]
+
+The host is the URL to the server. This can be provided by the Release
+Manager. You should be able to SSH to this address.
+
+The username is your own username, which you have permission to SSH into
+the server containing downloads.
+
+Use --dry-run to display the generated upload commands without executing
+them. Signatures for each file will be generated but not uploaded unless
+--no-gpg is also passed.
+
+Use --no-gpg to suppress signature generation and upload.
+
+The default target directory (which appears in uploadrelease.proj) is
+correct for official Python releases, but may be overridden with
+--target <path> for other purposes. This path should generally not include
+any version specifier, as that will be added automatically.
+
+Modifying the Installer
+=======================
+
+The code for the installer is divided into three main groups: packages,
+the bundle and the bootstrap application.
+
+Packages
+--------
+
+Packages appear as subdirectories of Tools/msi (other than the bundle/
+directory). The project file is a .wixproj and the build output is a
+single MSI. Packages are built with the WiX Toolset. Some project files
+share source files and use preprocessor directives to enable particular
+features. These are typically used to keep the sources close when the
+files are related, but produce multiple independent packages.
+
+A package is the smallest element that may be independently installed or
+uninstalled (as used in this installer). For example, the test suite has
+its own package, as users can choose to add or remove it after the
+initial installation.
+
+All the files installed by a single package should be related, though
+some packages may not install any files. For example, the pip package
+executes the ensurepip package, but does not add or remove any of its
+own files. (It is represented as a package because of its
+installed/uninstalled nature, as opposed to the "precompile standard
+library" option, for example.) Dependencies between packages are handled
+by the bundle, but packages should detect when dependencies are missing
+and raise an error.
+
+Packages that include a lot of files may use an InstallFiles element in
+the .wixproj file to generate sources. See lib/lib.wixproj for an
+example, and msi.targets and csv_to_wxs.py for the implementation. This
+element is also responsible for generating the code for cleaning up and
+removing __pycache__ folders in any directory containing .py files.
+
+All packages are built with the Tools/msi/common.wxs file, and so any
+directory or property in this file may be referenced. Of particular
+interest:
+
+ REGISTRYKEY (property)
+ The registry key for the current installation.
+
+ InstallDirectory (directory)
+ The root install directory for the current installation. Subdirectories
+ are also specified in this file (DLLs, Lib, etc.)
+
+ MenuDir (directory)
+ The Start Menu folder for the current installation.
+
+ UpgradeTable (property)
+ Every package should reference this property to include upgrade
+ information.
+
+ OptionalFeature (Component)
+ Packages that may be enabled or disabled should reference this component
+ and have an OPTIONAL_FEATURES entry in the bootstrap application to
+ properly handle Modify and Upgrade.
+
+The .wxl_template file is specially handled by the build system for this
+project to perform {{substitutions}} as defined in msi.targets. They
+should be included in projects as <WxlTemplate> items, where .wxl files
+are normally included as <EmbeddedResource> items.
+
+Bundle
+------
+
+The bundle is compiled to the main EXE entry point that for most users
+will represent the Python installer. It is built from Tools/msi/bundle
+with packages references in Tools/msi/bundle/packagegroups.
+
+Build logic for the bundle is in bundle.targets, but should be invoked
+through one of the .wixproj files as described in Building the
+Installer.
+
+The UI is separated between Default.thm (UI layout), Default.wxl
+(strings), bundle.wxs (properties) and the bootstrap application.
+Bundle.wxs also contains the chain, which is the list of packages to
+install and the order they should be installed in. These refer to named
+package groups in bundle/packagegroups.
+
+Each package group specifies one or more packages to install. Most
+packages require two separate entries to support both per-user and
+all-users installations. Because these reuse the same package, it does
+not increase the overall size of the package.
+
+Package groups refer to payload groups, which allow better control over
+embedding and downloading files than the default settings. Whether files
+are embedded and where they are downloaded from depends on settings
+created by the project files.
+
+Package references can include install conditions that determine when to
+install the package. When a package is a dependency for others, the
+condition should be crafted to ensure it is installed.
+
+MSI packages are installed or uninstalled based on their current state
+and the install condition. This makes them most suitable for features
+that are clearly present or absent from the user's machine.
+
+EXE packages are executed based on a customisable condition that can be
+omitted. This makes them suitable for pre- or post-install tasks that
+need to run regardless of whether features have been added or removed.
+
+Bootstrap Application
+---------------------
+
+The bootstrap application is a C++ application that controls the UI and
+installation. While it does not directly compile into the main EXE of
+the installer, it forms the main active component. Most of the
+installation functionality is provided by WiX, and so the bootstrap
+application is predominantly responsible for the code behind the UI that
+is defined in the Default.thm file. The bootstrap application code is in
+bundle/bootstrap and is built automatically when building the bundle.
+
+Installation Layout
+===================
+
+There are two installation layouts for Python on Windows, with the only
+differences being supporting files. A layout is selected implicitly
+based on whether the install is for all users of the machine or just for
+the user performing the installation.
+
+The default installation location when installing for all users is
+"%ProgramFiles%\Python3X" for the 64-bit interpreter and
+"%ProgramFiles(x86)%\Python3X-32" for the 32-bit interpreter. (Note that
+the latter path is equivalent to "%ProgramFiles%\Python3X-32" when
+running a 32-bit version of Windows.) This location requires
+administrative privileges to install or later modify the installation.
+
+The default installation location when installing for the current user
+is "%LocalAppData%\Programs\Python\Python3X" for the 64-bit interpreter
+and "%LocalAppData%\Programs\Python\Python3X-32" for the 32-bit
+interpreter. Only the current user can access this location. This
+provides a suitable level of protection against malicious modification
+of Python's files.
+
+(Default installation locations are set in Tools\msi\bundle\bundle.wxs.)
+
+Within this install directory is the following approximate layout:
+
+.\python[w].exe The core executable files
+.\DLLs Stdlib extensions (*.pyd) and dependencies
+.\Doc Documentation (*.chm)
+.\include Development headers (*.h)
+.\Lib Standard library
+.\Lib\test Test suite
+.\libs Development libraries (*.lib)
+.\Scripts Launcher scripts (*.exe, *.py)
+.\tcl Tcl dependencies (*.dll, *.tcl and others)
+.\Tools Tool scripts (*.py)
+
+When installed for all users, the following files are installed to
+either "%SystemRoot%\System32" or "%SystemRoot%\SysWOW64" as
+appropriate. For the current user, they are installed in the Python
+install directory.
+
+.\python3x.dll The core interpreter
+.\python3.dll The stable ABI reference
+
+When installed for all users, the following files are installed to
+"%SystemRoot%" (typically "C:\Windows") to ensure they are always
+available on PATH. (See Launching Python below.) For the current user,
+they are installed in "%LocalAppData%\Programs\Python\PyLauncher".
+
+.\py[w].exe PEP 397 launcher
+
+System Settings
+===============
+
+On installation, registry keys are created so that other applications
+can locate and identify installations of Python. The locations of these
+keys vary based on the install type.
+
+For 64-bit interpreters installed for all users, the root key is:
+ HKEY_LOCAL_MACHINE\Software\Python\PythonCore\3.X
+
+For 32-bit interpreters installed for all users on a 64-bit operating
+system, the root key is:
+ HKEY_LOCAL_MACHINE\Software\Wow6432Node\Python\PythonCore\3.X-32
+
+For 32-bit interpreters installed for all users on a 32-bit operating
+system, the root key is:
+ HKEY_LOCAL_MACHINE\Software\Python\PythonCore\3.X-32
+
+For 64-bit interpreters installed for the current user:
+ HKEY_CURRENT_USER\Software\Python\PythonCore\3.X
+
+For 32-bit interpreters installed for the current user:
+ HKEY_CURRENT_USER\Software\Python\PythonCore\3.X-32
+
+When the core Python executables are installed, a key "InstallPath" is
+created within the root key with its default value set to the
+executable's install directory. A value named "ExecutablePath" is added
+with the full path to the main Python interpreter, and a key
+"InstallGroup" is created with its default value set to the product
+name "Python 3.X".
+
+When the Python standard library is installed, a key "PythonPath" is
+created within the root key with its default value set to the full path
+to the Lib folder followed by the path to the DLLs folder, separated by
+a semicolon.
+
+When the documentation is installed, a key "Help" is created within the
+root key, with a subkey "Main Python Documentation" with its default
+value set to the full path to the installed CHM file.
+
+
+The py.exe launcher is installed as part of a regular Python install,
+but using a separate mechanism that allows it to more easily span
+versions of Python. As a result, it has different root keys for its
+registry entries:
+
+When installed for all users on a 64-bit operating system, the
+launcher's root key is:
+ HKEY_LOCAL_MACHINE\Software\Wow6432Node\Python\Launcher
+
+When installed for all users on a 32-bit operating system, the
+launcher's root key is:
+ HKEY_LOCAL_MACHINE\Software\Python\Launcher
+
+When installed for the current user:
+ HKEY_CURRENT_USER\Software\Python\Launcher
+
+When the launcher is installed, a key "InstallPath" is created within
+its root key with its default value set to the launcher's install
+directory. File associations are also created for .py, .pyw, .pyc and
+.pyo files.
+
+Launching Python
+================
+
+When a feature offering user entry points in the Start Menu is
+installed, a folder "Python 3.X" is created. Every shortcut should be
+created within this folder, and each shortcut should include the version
+and platform to allow users to identify the shortcut in a search results
+page.
+
+The core Python executables creates a shortcut "Python 3.X (32-bit)" or
+"Python 3.X (64-bit)" depending on the interpreter.
+
+The documentation creates a shortcut "Python 3.X 32-bit Manuals" or
+"Python 3.X 64-bit Manuals". The documentation is identical for all
+platforms, but the shortcuts need to be separate to avoid uninstallation
+conflicts.
+
+Installing IDLE creates a shortcut "IDLE (Python 3.X 32-bit)" or "IDLE
+(Python 3.X 64-bit)" depending on the interpreter.
+
+
+For users who often launch Python from a Command Prompt, an option is
+provided to add the directory containing python.exe to the user or
+system PATH variable. If the option is selected, the install directory
+and the Scripts directory will be added at the start of the system PATH
+for an all users install and the user PATH for a per-user install.
+
+When the user only has one version of Python installed, this will behave
+as expected. However, because Windows searches the system PATH before
+the user PATH, users cannot override a system-wide installation of
+Python on their PATH. Further, because the installer can only prepend to
+the path, later installations of Python will take precedence over
+earlier installations, regardless of interpreter version.
+
+Because it is not possible to automatically create a sensible PATH
+configuration, users are recommended to use the py.exe launcher and
+manually modify their PATH variable to add Scripts directories in their
+preferred order. System-wide installations of Python should consider not
+modifying PATH, or using an alternative technology to modify their
+users' PATH variables.
+
+
+The py.exe launcher is recommended because it uses a consistent and
+sensible search order for Python installations. User installations are
+preferred over system-wide installs, and later versions are preferred
+regardless of installation order (with the exception that py.exe
+currently prefers 2.x versions over 3.x versions without the -3 command
+line argument).
+
+For both 32-bit and 64-bit interpreters, the 32-bit version of the
+launcher is installed. This ensures that the search order is always
+consistent (as the 64-bit launcher is subtly different from the 32-bit
+launcher) and also avoids the need to install it multiple times. Future
+versions of Python will upgrade the launcher in-place, using Windows
+Installer's upgrade functionality to avoid conflicts with earlier
+installed versions.
+
+When installed, file associations are created for .py, .pyc and .pyo
+files to launch with py.exe and .pyw files to launch with pyw.exe. This
+makes Python files respect shebang lines by default and also avoids
+conflicts between multiple Python installations.
+
+
+Repair, Modify and Uninstall
+============================
+
+After installation, Python may be modified, repaired or uninstalled by
+running the original EXE again or via the Programs and Features applet
+(formerly known as Add or Remove Programs).
+
+Modifications allow features to be added or removed. The install
+directory and kind (all users/single user) cannot be modified. Because
+Windows Installer caches installation packages, removing features will
+not require internet access unless the package cache has been corrupted
+or deleted. Adding features that were not previously installed and are
+not embedded or otherwise available will require internet access.
+
+Repairing will rerun the installation for all currently installed
+features, restoring files and registry keys that have been modified or
+removed. This operation generally will not redownload any files unless
+the cached packages have been corrupted or deleted.
+
+Removing Python will clean up all the files and registry keys that were
+created by the installer, as well as __pycache__ folders that are
+explicitly handled by the installer. Python packages installed later
+using a tool like pip will not be removed. Some components may be
+installed by other installers and these will not be removed if another
+product has a dependency on them.
diff --git a/Tools/msi/build.bat b/Tools/msi/build.bat
new file mode 100644
index 0000000000..a61ace8a95
--- /dev/null
+++ b/Tools/msi/build.bat
@@ -0,0 +1,76 @@
+@echo off
+setlocal
+set D=%~dp0
+set PCBUILD=%D%..\..\PCBuild\
+
+set BUILDX86=
+set BUILDX64=
+set BUILDDOC=
+set BUILDTEST=--test-marker
+set BUILDPACK=
+set REBUILD=
+
+:CheckOpts
+if "%~1" EQU "-h" goto Help
+if "%~1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts
+if "%~1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts
+if "%~1" EQU "--doc" (set BUILDDOC=1) && shift && goto CheckOpts
+if "%~1" EQU "--no-test-marker" (set BUILDTEST=) && shift && goto CheckOpts
+if "%~1" EQU "--pack" (set BUILDPACK=1) && shift && goto CheckOpts
+if "%~1" EQU "-r" (set REBUILD=-r) && shift && goto CheckOpts
+
+if not defined BUILDX86 if not defined BUILDX64 (set BUILDX86=1) && (set BUILDX64=1)
+
+call "%D%get_externals.bat"
+
+call "%PCBUILD%env.bat" x86
+
+if defined BUILDX86 (
+ call "%PCBUILD%build.bat" -d -e %REBUILD% %BUILDTEST%
+ if errorlevel 1 goto :eof
+ call "%PCBUILD%build.bat" -e %REBUILD% %BUILDTEST%
+ if errorlevel 1 goto :eof
+)
+if defined BUILDX64 (
+ call "%PCBUILD%build.bat" -p x64 -d -e %REBUILD% %BUILDTEST%
+ if errorlevel 1 goto :eof
+ call "%PCBUILD%build.bat" -p x64 -e %REBUILD% %BUILDTEST%
+ if errorlevel 1 goto :eof
+)
+
+if defined BUILDDOC (
+ call "%PCBUILD%..\Doc\make.bat" htmlhelp
+ if errorlevel 1 goto :eof
+)
+
+set BUILD_CMD="%D%bundle\snapshot.wixproj"
+if defined BUILDTEST (
+ set BUILD_CMD=%BUILD_CMD% /p:UseTestMarker=true
+)
+if defined BUILDPACK (
+ set BUILD_CMD=%BUILD_CMD% /p:Pack=true
+)
+if defined REBUILD (
+ set BUILD_CMD=%BUILD_CMD% /t:Rebuild
+)
+
+if defined BUILDX86 (
+ msbuild %BUILD_CMD%
+ if errorlevel 1 goto :eof
+)
+if defined BUILDX64 (
+ msbuild /p:Platform=x64 %BUILD_CMD%
+ if errorlevel 1 goto :eof
+)
+
+exit /B 0
+
+:Help
+echo build.bat [-x86] [-x64] [--doc] [-h] [--no-test-marker] [--pack] [-r]
+echo.
+echo -x86 Build x86 installers
+echo -x64 Build x64 installers
+echo --doc Build CHM documentation
+echo --no-test-marker Build without test markers
+echo --pack Embed core MSIs into installer
+echo -r Rebuild rather than incremental build
diff --git a/Tools/msi/buildrelease.bat b/Tools/msi/buildrelease.bat
new file mode 100644
index 0000000000..2eae07ad4a
--- /dev/null
+++ b/Tools/msi/buildrelease.bat
@@ -0,0 +1,228 @@
+@setlocal
+@echo off
+
+rem This script is intended for building official releases of Python.
+rem To use it to build alternative releases, you should clone this file
+rem and modify the following three URIs.
+
+rem These two will ensure that your release can be installed
+rem alongside an official Python release, by modifying the GUIDs used
+rem for all components.
+rem
+rem The following substitutions will be applied to the release URI:
+rem Variable Description Example
+rem {arch} architecture amd64, win32
+set RELEASE_URI=http://www.python.org/{arch}
+
+rem This is the URL that will be used to download installation files.
+rem The files available from the default URL *will* conflict with your
+rem installer. Trust me, you don't want them, even if it seems like a
+rem good idea.
+rem
+rem The following substitutions will be applied to the download URL:
+rem Variable Description Example
+rem {version} version number 3.5.0
+rem {arch} architecture amd64, win32
+rem {releasename} release name a1, b2, rc3 (or blank for final)
+rem {msi} MSI filename core.msi
+set DOWNLOAD_URL=https://www.python.org/ftp/python/{version}/{arch}{releasename}/{msi}
+
+set D=%~dp0
+set PCBUILD=%D%..\..\PCBuild\
+set EXTERNALS=%D%..\..\externals\windows-installer\
+
+set BUILDX86=
+set BUILDX64=
+set TARGET=Rebuild
+set TESTTARGETDIR=
+set PGO=
+
+
+:CheckOpts
+if "%1" EQU "-h" goto Help
+if "%1" EQU "-c" (set CERTNAME=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "--certificate" (set CERTNAME=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "-o" (set OUTDIR=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "--out" (set OUTDIR=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "-D" (set SKIPDOC=1) && shift && goto CheckOpts
+if "%1" EQU "--skip-doc" (set SKIPDOC=1) && shift && goto CheckOpts
+if "%1" EQU "-B" (set SKIPBUILD=1) && shift && goto CheckOpts
+if "%1" EQU "--skip-build" (set SKIPBUILD=1) && shift && goto CheckOpts
+if "%1" EQU "--download" (set DOWNLOAD_URL=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "--test" (set TESTTARGETDIR=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "-b" (set TARGET=Build) && shift && goto CheckOpts
+if "%1" EQU "--build" (set TARGET=Build) && shift && goto CheckOpts
+if "%1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts
+if "%1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts
+if "%1" EQU "--pgo" (set PGO=%~2) && shift && shift && goto CheckOpts
+
+if "%1" NEQ "" echo Invalid option: "%1" && exit /B 1
+
+if not defined BUILDX86 if not defined BUILDX64 (set BUILDX86=1) && (set BUILDX64=1)
+
+call "%D%get_externals.bat"
+
+:builddoc
+if "%SKIPBUILD%" EQU "1" goto skipdoc
+if "%SKIPDOC%" EQU "1" goto skipdoc
+
+if not defined PYTHON where py -q || echo Cannot find py on path and PYTHON is not set. && exit /B 1
+if not defined SPHINXBUILD where sphinx-build -q || echo Cannot find sphinx-build on path and SPHINXBUILD is not set. && exit /B 1
+
+call "%D%..\..\doc\make.bat" htmlhelp
+if errorlevel 1 goto :eof
+:skipdoc
+
+where hg /q || echo Cannot find Mercurial on PATH && exit /B 1
+
+where dlltool /q && goto skipdlltoolsearch
+set _DLLTOOL_PATH=
+where /R "%EXTERNALS%\" dlltool > "%TEMP%\dlltool.loc" 2> nul && set /P _DLLTOOL_PATH= < "%TEMP%\dlltool.loc" & del "%TEMP%\dlltool.loc"
+if not exist "%_DLLTOOL_PATH%" echo Cannot find binutils on PATH or in external && exit /B 1
+for %%f in (%_DLLTOOL_PATH%) do set PATH=%PATH%;%%~dpf
+set _DLLTOOL_PATH=
+:skipdlltoolsearch
+
+if defined BUILDX86 (
+ call :build x86
+ if errorlevel 1 exit /B
+)
+
+if defined BUILDX64 (
+ call :build x64 "%PGO%"
+ if errorlevel 1 exit /B
+)
+
+if defined TESTTARGETDIR (
+ call "%D%testrelease.bat" -t "%TESTTARGETDIR%"
+)
+
+exit /B 0
+
+:build
+@setlocal
+@echo off
+
+if "%1" EQU "x86" (
+ call "%PCBUILD%env.bat" x86
+ set BUILD=%PCBUILD%win32\
+ set BUILD_PLAT=Win32
+ set OUTDIR_PLAT=win32
+ set OBJDIR_PLAT=x86
+) else if "%~2" NEQ "" (
+ call "%PCBUILD%env.bat" amd64
+ set PGO=%~2
+ set BUILD=%PCBUILD%amd64-pgo\
+ set BUILD_PLAT=x64
+ set OUTDIR_PLAT=amd64
+ set OBJDIR_PLAT=x64
+) else (
+ call "%PCBUILD%env.bat" amd64
+ set BUILD=%PCBUILD%amd64\
+ set BUILD_PLAT=x64
+ set OUTDIR_PLAT=amd64
+ set OBJDIR_PLAT=x64
+)
+
+if exist "%BUILD%en-us" (
+ echo Deleting %BUILD%en-us
+ rmdir /q/s "%BUILD%en-us"
+ if errorlevel 1 exit /B
+)
+
+if exist "%D%obj\Release_%OBJDIR_PLAT%" (
+ echo Deleting "%D%obj\Release_%OBJDIR_PLAT%"
+ rmdir /q/s "%D%obj\Release_%OBJDIR_PLAT%"
+ if errorlevel 1 exit /B
+)
+
+if not "%CERTNAME%" EQU "" (
+ set CERTOPTS="/p:SigningCertificate=%CERTNAME%"
+) else (
+ set CERTOPTS=
+)
+
+if not "%SKIPBUILD%" EQU "1" (
+ @call "%PCBUILD%build.bat" -e -p %BUILD_PLAT% -d -t %TARGET% %CERTOPTS%
+ @if errorlevel 1 exit /B
+ @rem build.bat turns echo back on, so we disable it again
+ @echo off
+
+ if "%PGO%" EQU "" (
+ @call "%PCBUILD%build.bat" -e -p %BUILD_PLAT% -t %TARGET% %CERTOPTS%
+ ) else (
+ @call "%PCBUILD%build.bat" -e -p %BUILD_PLAT% -c PGInstrument -t %TARGET% %CERTOPTS%
+ @if errorlevel 1 exit /B
+
+ @del "%BUILD%*.pgc"
+ if "%PGO%" EQU "default" (
+ "%BUILD%python.exe" -m test -q --pgo
+ ) else if "%PGO%" EQU "default2" (
+ "%BUILD%python.exe" -m test -r -q --pgo
+ "%BUILD%python.exe" -m test -r -q --pgo
+ ) else if "%PGO%" EQU "default10" (
+ for /L %%i in (0, 1, 9) do "%BUILD%python.exe" -m test -q -r --pgo
+ ) else if "%PGO%" EQU "pybench" (
+ "%BUILD%python.exe" "%PCBUILD%..\Tools\pybench\pybench.py"
+ ) else (
+ "%BUILD%python.exe" %PGO%
+ )
+
+ @call "%PCBUILD%build.bat" -e -p %BUILD_PLAT% -c PGUpdate -t Build %CERTOPTS%
+ )
+ @if errorlevel 1 exit /B
+ @echo off
+)
+
+set BUILDOPTS=/p:Platform=%1 /p:BuildForRelease=true /p:DownloadUrl=%DOWNLOAD_URL% /p:DownloadUrlBase=%DOWNLOAD_URL_BASE% /p:ReleaseUri=%RELEASE_URI%
+if "%PGO%" NEQ "" set BUILDOPTS=%BUILDOPTS% /p:PGOBuildPath=%BUILD%
+msbuild "%D%bundle\releaselocal.wixproj" /t:Rebuild %BUILDOPTS% %CERTOPTS% /p:RebuildAll=true
+if errorlevel 1 exit /B
+msbuild "%D%bundle\releaseweb.wixproj" /t:Rebuild %BUILDOPTS% %CERTOPTS% /p:RebuildAll=false
+if errorlevel 1 exit /B
+
+msbuild "%D%make_zip.proj" /t:Build %BUILDOPTS% %CERTOPTS%
+
+if not "%OUTDIR%" EQU "" (
+ mkdir "%OUTDIR%\%OUTDIR_PLAT%"
+ copy /Y "%BUILD%en-us\*.cab" "%OUTDIR%\%OUTDIR_PLAT%"
+ copy /Y "%BUILD%en-us\*.exe" "%OUTDIR%\%OUTDIR_PLAT%"
+ copy /Y "%BUILD%en-us\*.msi" "%OUTDIR%\%OUTDIR_PLAT%"
+ copy /Y "%BUILD%en-us\*.msu" "%OUTDIR%\%OUTDIR_PLAT%"
+)
+
+exit /B 0
+
+:Help
+echo buildrelease.bat [--out DIR] [-x86] [-x64] [--certificate CERTNAME] [--build] [--skip-build]
+echo [--pgo COMMAND] [--skip-doc] [--download DOWNLOAD URL] [--test TARGETDIR]
+echo [-h]
+echo.
+echo --out (-o) Specify an additional output directory for installers
+echo -x86 Build x86 installers
+echo -x64 Build x64 installers
+echo --build (-b) Incrementally build Python rather than rebuilding
+echo --skip-build (-B) Do not build Python (just do the installers)
+echo --skip-doc (-D) Do not build documentation
+echo --pgo Build x64 installers using PGO
+echo --download Specify the full download URL for MSIs
+echo --test Specify the test directory to run the installer tests
+echo -h Display this help information
+echo.
+echo If no architecture is specified, all architectures will be built.
+echo If --test is not specified, the installer tests are not run.
+echo.
+echo For the --pgo option, any Python command line can be used as well as the
+echo following shortcuts:
+echo Shortcut Description
+echo default Test suite with --pgo
+echo default2 2x test suite with --pgo and randomized test order
+echo default10 10x test suite with --pgo and randomized test order
+echo pybench pybench script
+echo.
+echo The following substitutions will be applied to the download URL:
+echo Variable Description Example
+echo {version} version number 3.5.0
+echo {arch} architecture amd64, win32
+echo {releasename} release name a1, b2, rc3 (or blank for final)
+echo {msi} MSI filename core.msi
diff --git a/Tools/msi/bundle/Default.thm b/Tools/msi/bundle/Default.thm
new file mode 100644
index 0000000000..4d9c97a194
--- /dev/null
+++ b/Tools/msi/bundle/Default.thm
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Theme xmlns="http://wixtoolset.org/schemas/thmutil/2010">
+ <Window Width="670" Height="412" HexStyle="100a0000" FontId="0">#(loc.Caption)</Window>
+ <Font Id="0" Height="-14" Weight="500" Foreground="000000" Background="ffffff">Segoe UI</Font>
+ <Font Id="1" Height="-26" Weight="500" Foreground="000000" Background="ffffff">Segoe UI</Font>
+ <Font Id="2" Height="-24" Weight="500" Foreground="808080" Background="ffffff">Segoe UI</Font>
+ <Font Id="3" Height="-14" Weight="500" Foreground="000000" Background="ffffff">Segoe UI</Font>
+ <Font Id="4" Height="-14" Weight="500" Foreground="ff0000" Background="ffffff" Underline="yes">Segoe UI</Font>
+ <Font Id="5" Height="-14" Weight="500" Foreground="808080" Background="ffffff">Segoe UI</Font>
+
+ <Page Name="Help">
+ <Text X="185" Y="11" Width="-11" Height="36" FontId="1" DisablePrefix="yes">#(loc.HelpHeader)</Text>
+ <Image X="0" Y="0" Width="178" Height="382" ImageFile="SideBar.png"/>
+
+ <Hypertext X="185" Y="50" Width="-11" Height="-35" FontId="3" DisablePrefix="yes">#(loc.HelpText)</Hypertext>
+ <Button Name="SuccessCancelButton" X="-11" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CloseButton)</Button>
+ </Page>
+ <Page Name="Install">
+ <Text X="185" Y="11" Width="-11" Height="36" FontId="1" DisablePrefix="yes">#(loc.InstallHeader)</Text>
+ <Image X="0" Y="0" Width="178" Height="382" ImageFile="SideBar.png"/>
+
+ <Text X="185" Y="50" Width="-11" Height="50" FontId="3" TabStop="yes">#(loc.InstallMessage)</Text>
+
+ <Button Name="InstallButton" X="185" Y="101" Width="-11" Height="109" TabStop="yes" FontId="3" HexStyle="0xE">#(loc.InstallButton)</Button>
+ <Button Name="InstallCustomButton" X="185" Y="221" Width="-11" Height="59" TabStop="yes" FontId="3" HexStyle="0xE">#(loc.InstallCustomButton)</Button>
+
+ <Checkbox Name="InstallLauncherAllUsers" X="185" Y="-37" Width="-100" Height="24" TabStop="yes" FontId="3">#(loc.ShortInstallLauncherAllUsersLabel)</Checkbox>
+ <Checkbox Name="PrependPath" X="185" Y="-13" Width="-100" Height="24" TabStop="yes" FontId="3">#(loc.ShortPrependPathLabel)</Checkbox>
+
+ <Button Name="InstallCancelButton" X="-11" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CancelButton)</Button>
+ </Page>
+ <Page Name="Upgrade">
+ <Text X="185" Y="11" Width="-11" Height="36" FontId="1" DisablePrefix="yes">#(loc.InstallUpgradeHeader)</Text>
+ <Image X="0" Y="0" Width="178" Height="382" ImageFile="SideBar.png"/>
+
+ <Text X="185" Y="50" Width="-11" Height="50" FontId="3" TabStop="yes">#(loc.InstallUpgradeMessage)</Text>
+
+ <Button Name="InstallUpgradeButton" X="185" Y="101" Width="-11" Height="129" TabStop="yes" FontId="3" HexStyle="0xE">#(loc.InstallUpgradeButton)</Button>
+ <Button Name="InstallUpgradeCustomButton" X="185" Y="241" Width="-11" Height="59" TabStop="yes" FontId="3" HexStyle="0xE">#(loc.InstallUpgradeCustomButton)</Button>
+
+ <Button Name="InstallCancelButton" X="-11" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CancelButton)</Button>
+ </Page>
+ <Page Name="SimpleInstall">
+ <Text X="185" Y="11" Width="-11" Height="36" FontId="1" DisablePrefix="yes">#(loc.InstallHeader)</Text>
+ <Image X="0" Y="0" Width="178" Height="382" ImageFile="SideBar.png"/>
+
+ <Button Name="InstallSimpleButton" X="185" Y="101" Width="-11" Height="129" TabStop="yes" FontId="3" HideWhenDisabled="yes" HexStyle="0xF">#(loc.InstallSimpleButton)</Button>
+
+ <Button Name="InstallCancelButton" X="-11" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CancelButton)</Button>
+ </Page>
+ <Page Name="Custom1">
+ <Text X="185" Y="11" Width="-11" Height="36" FontId="1" DisablePrefix="yes">#(loc.Custom1Header)</Text>
+ <Image X="0" Y="0" Width="178" Height="382" ImageFile="SideBar.png"/>
+
+ <Checkbox Name="Include_doc" X="185" Y="51" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.Include_docLabel)</Checkbox>
+ <Text X="205" Y="76" Width="-11" Height="24" TabStop="no" FontId="5">#(loc.Include_docHelpLabel)</Text>
+
+ <Checkbox Name="Include_pip" X="185" Y="101" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.Include_pipLabel)</Checkbox>
+ <Text X="205" Y="126" Width="-11" Height="24" TabStop="no" FontId="5">#(loc.Include_pipHelpLabel)</Text>
+
+ <Checkbox Name="Include_tcltk" X="185" Y="151" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.Include_tcltkLabel)</Checkbox>
+ <Text X="205" Y="176" Width="-11" Height="24" TabStop="no" FontId="5">#(loc.Include_tcltkHelpLabel)</Text>
+
+ <Checkbox Name="Include_test" X="185" Y="201" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.Include_testLabel)</Checkbox>
+ <Text X="205" Y="226" Width="-11" Height="24" TabStop="no" FontId="5">#(loc.Include_testHelpLabel)</Text>
+
+ <Checkbox Name="Include_launcher" X="185" Y="251" Width="100" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.Include_launcherLabel)</Checkbox>
+ <Checkbox Name="CustomInstallLauncherAllUsers" X="285" Y="251" Width="-11" Height="24" TabStop="yes" FontId="3">#(loc.InstallLauncherAllUsersLabel)</Checkbox>
+ <Text Name="Include_launcherHelp" X="205" Y="276" Width="-11" Height="24" TabStop="no" FontId="5"></Text>
+
+ <Button Name="Custom1BackButton" X="185" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CustomBackButton)</Button>
+ <Button Name="CustomNextButton" X="-101" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CustomNextButton)</Button>
+ <Button Name="Custom1CancelButton" X="-11" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CancelButton)</Button>
+ </Page>
+ <Page Name="Custom2">
+ <Text X="185" Y="11" Width="-11" Height="36" FontId="1" DisablePrefix="yes">#(loc.Custom2Header)</Text>
+ <Image X="0" Y="0" Width="178" Height="382" ImageFile="SideBar.png"/>
+
+ <Checkbox Name="InstallAllUsers" X="185" Y="51" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.InstallAllUsersLabel)</Checkbox>
+ <Checkbox Name="AssociateFiles" X="185" Y="76" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.AssociateFilesLabel)</Checkbox>
+ <Checkbox Name="Shortcuts" X="185" Y="101" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.ShortcutsLabel)</Checkbox>
+ <Checkbox Name="PrependPath" X="185" Y="126" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.PrependPathLabel)</Checkbox>
+ <Checkbox Name="CompileAll" X="185" Y="151" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.PrecompileLabel)</Checkbox>
+ <Checkbox Name="Include_symbols" X="185" Y="176" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.Include_symbolsLabel)</Checkbox>
+ <Checkbox Name="Include_debug" X="185" Y="201" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.Include_debugLabel)</Checkbox>
+
+ <Text X="185" Y="256" Width="-11" Height="17" FontId="3">#(loc.CustomLocationLabel)</Text>
+ <Editbox Name="TargetDir" X="185" Y="277" Width="-101" Height="27" TabStop="yes" FontId="3" FileSystemAutoComplete="yes" />
+ <Button Name="CustomBrowseButton" X="-11" Y="276" Width="85" Height="27" TabStop="yes" FontId="3">#(loc.CustomBrowseButton)</Button>
+ <Text Name="CustomBrowseButtonLabel" X="185" Y="306" Width="-91" Height="35" FontId="5" HideWhenDisabled="yes">#(loc.CustomLocationHelpLabel)</Text>
+
+ <Button Name="Custom2BackButton" X="185" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CustomBackButton)</Button>
+ <Button Name="CustomInstallButton" X="-101" Y="-11" Width="95" Height="27" TabStop="yes" FontId="0">#(loc.CustomInstallButton)</Button>
+ <Button Name="Custom2CancelButton" X="-11" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CancelButton)</Button>
+ </Page>
+ <Page Name="Progress">
+ <Text X="185" Y="11" Width="-11" Height="36" FontId="1" DisablePrefix="yes">#(loc.ProgressHeader)</Text>
+ <Image X="0" Y="0" Width="178" Height="382" ImageFile="SideBar.png"/>
+
+ <Text X="185" Y="111" Width="-11" Height="20" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Text>
+ <Text Name="OverallProgressPackageText" X="185" Y="146" Width="-11" Height="20" FontId="3" DisablePrefix="yes">#(loc.OverallProgressPackageText)</Text>
+ <Progressbar Name="OverallCalculatedProgressbar" X="185" Y="171" Width="-11" Height="24" />
+ <Button Name="ProgressCancelButton" X="-11" Y="-11" Width="95" Height="27" TabStop="yes" FontId="0">#(loc.CancelButton)</Button>
+ </Page>
+ <Page Name="Modify">
+ <Text X="185" Y="11" Width="-11" Height="36" FontId="1" DisablePrefix="yes">#(loc.ModifyHeader)</Text>
+ <Image X="0" Y="0" Width="178" Height="382" ImageFile="SideBar.png"/>
+
+ <Button Name="ModifyButton" X="185" Y="101" Width="-11" Height="59" TabStop="yes" FontId="3" HexStyle="0xF">#(loc.ModifyModifyButton)</Button>
+ <Button Name="RepairButton" X="185" Y="171" Width="-11" Height="59" TabStop="yes" FontId="3" HexStyle="0xE">#(loc.ModifyRepairButton)</Button>
+ <Button Name="UninstallButton" X="185" Y="241" Width="-11" Height="59" TabStop="yes" FontId="3" HexStyle="0xE">#(loc.ModifyUninstallButton)</Button>
+
+ <Button Name="ModifyCancelButton" X="-11" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CancelButton)</Button>
+ </Page>
+ <Page Name="Success">
+ <Text X="185" Y="11" Width="-11" Height="36" FontId="1" DisablePrefix="yes">#(loc.SuccessHeader)</Text>
+ <Image X="0" Y="0" Width="178" Height="382" ImageFile="SideBar.png"/>
+
+ <Hypertext Name="SuccessText" X="205" Y="71" Width="-31" Height="100" FontId="3" DisablePrefix="yes"></Hypertext>
+
+ <Text Name="SuccessRestartText" X="205" Y="-100" Width="-11" Height="34" FontId="3" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessRestartText)</Text>
+ <Button Name="LaunchButton" X="185" Y="-50" Width="-11" Height="59" TabStop="yes" FontId="3" HexStyle="0xF" HideWhenDisabled="yes">#(loc.SuccessLaunchButton)</Button>
+ <Button Name="SuccessRestartButton" X="-101" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessRestartButton)</Button>
+ <Button Name="SuccessCancelButton" X="-11" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CloseButton)</Button>
+ </Page>
+ <Page Name="Failure">
+ <Text X="185" Y="11" Width="-11" Height="36" FontId="1" DisablePrefix="yes">#(loc.FailureHeader)</Text>
+ <Image X="0" Y="0" Width="178" Height="382" ImageFile="SideBar.png"/>
+
+ <Hypertext Name="FailureLogFileLink" X="205" Y="71" Width="-11" Height="60" FontId="3" TabStop="yes" HideWhenDisabled="yes">#(loc.FailureHyperlinkLogText)</Hypertext>
+ <Hypertext Name="FailureMessageText" X="205" Y="151" Width="-11" Height="120" FontId="3" TabStop="yes" HideWhenDisabled="yes"></Hypertext>
+ <Text Name="FailureRestartText" X="205" Y="-40" Width="-11" Height="34" FontId="3" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.FailureRestartText)</Text>
+ <Button Name="FailureRestartButton" X="-101" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FailureRestartButton)</Button>
+ <Button Name="FailureCancelButton" X="-11" Y="-11" Width="85" Height="27" TabStop="yes" FontId="0">#(loc.CloseButton)</Button>
+ </Page>
+</Theme> \ No newline at end of file
diff --git a/Tools/msi/bundle/Default.wxl b/Tools/msi/bundle/Default.wxl
new file mode 100644
index 0000000000..697066b2e1
--- /dev/null
+++ b/Tools/msi/bundle/Default.wxl
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="utf-8"?>
+<WixLocalization Culture="en-us" Language="1033" xmlns="http://schemas.microsoft.com/wix/2006/localization">
+ <String Id="Caption">[WixBundleName] Setup</String>
+ <String Id="Title">[WixBundleName]</String>
+ <String Id="Installing">Installing</String>
+ <String Id="Installation">Setup</String>
+ <String Id="Modifying">Updating</String>
+ <String Id="Modification">Modify</String>
+ <String Id="Repairing">Repairing</String>
+ <String Id="Repair">Repair</String>
+ <String Id="Uninstalling">Removing</String>
+ <String Id="Uninstallation">Uninstall</String>
+
+ <String Id="ElevateForCRTInstall">You will be prompted for Administrator privileges to install a C Runtime Library update (KB2999226).
+
+
+Continue?</String>
+
+ <String Id="CancelButton">&amp;Cancel</String>
+ <String Id="CloseButton">&amp;Close</String>
+ <String Id="InstallHeader">Install [WixBundleName]</String>
+ <String Id="InstallMessage">Select Install Now to install Python with default settings, or choose Customize to enable or disable features.</String>
+ <String Id="InstallVersion">Version [WixBundleVersion]</String>
+ <String Id="InstallUpgradeHeader">Upgrade to [WixBundleName]</String>
+ <String Id="InstallUpgradeMessage">Select Upgrade Now to keep your current settings, or choose Customize to enable or disable features.</String>
+ <String Id="ConfirmCancelMessage">Are you sure you want to cancel?</String>
+ <String Id="ExecuteUpgradeRelatedBundleMessage">Previous version</String>
+ <String Id="HelpHeader">Setup Help</String>
+ <String Id="HelpText">Visit &lt;a href="http://docs.python.org/[ShortVersion]/using/windows.html"&gt;docs.python.org/[ShortVersion]/using/windows.html&lt;/a&gt; for the full list of options, including the ability to enable and disable specific features.
+
+"/passive" to display progress without requiring user interaction
+
+"/quiet" to install/uninstall without displaying any UI
+
+"/simple" to prevent user customization
+
+"/uninstall" to remove Python (without confirmation)
+
+"/layout [\[]directory[\]]" to pre-download all components
+
+"/log [\[]filename[\]]" to specify log files location</String>
+ <String Id="InstallLicenseLinkText">[WixBundleName] &lt;a href="#"&gt;license terms&lt;/a&gt;.</String>
+ <String Id="InstallAcceptCheckbox">I &amp;agree to the license terms and conditions</String>
+ <String Id="InstallButton">&amp;Install Now</String>
+ <String Id="InstallButtonNote">[TargetDir]
+
+Includes IDLE, pip and documentation
+Creates shortcuts and file associations</String>
+ <String Id="InstallCustomButton">C&amp;ustomize installation</String>
+ <String Id="InstallCustomButtonNote">Choose location and features</String>
+ <String Id="InstallSimpleButton">&amp;Install</String>
+ <String Id="InstallSimpleButtonNote">Use settings preselected by your administrator
+
+[SimpleInstallDescription]</String>
+ <String Id="InstallUpgradeButton">Up&amp;grade Now</String>
+ <String Id="InstallUpgradeButtonNote">[TargetDir]
+
+Replaces your existing installation without changing settings.
+Select Customize to review current options.</String>
+ <String Id="InstallUpgradeCustomButton">C&amp;ustomize installation</String>
+ <String Id="InstallUpgradeCustomButtonNote">Choose location and features</String>
+ <String Id="Custom1Header">Optional Features</String>
+ <String Id="Custom2Header">Advanced Options</String>
+ <String Id="CustomLocationLabel">Customize install location</String>
+ <String Id="CustomLocationHelpLabel">You will require write permissions for the selected location.</String>
+ <String Id="CustomInstallButton">&amp;Install</String>
+ <String Id="CustomNextButton">&amp;Next</String>
+ <String Id="CustomBackButton">&amp;Back</String>
+ <String Id="CustomBrowseButton">B&amp;rowse</String>
+ <String Id="Include_docLabel">&amp;Documentation</String>
+ <String Id="Include_docHelpLabel">Installs the Python documentation file.</String>
+ <String Id="Include_pipLabel">&amp;pip</String>
+ <String Id="Include_pipHelpLabel">Installs pip, which can download and install other Python packages.</String>
+ <String Id="Include_tcltkLabel">tcl/tk and &amp;IDLE</String>
+ <String Id="Include_tcltkHelpLabel">Installs tkinter and the IDLE development environment.</String>
+ <String Id="Include_testLabel">Python &amp;test suite</String>
+ <String Id="Include_testHelpLabel">Installs the standard library test suite.</String>
+ <String Id="Include_launcherLabel">py &amp;launcher</String>
+ <String Id="Include_launcherHelp">Installs the global 'py' launcher to make it easier to start Python.</String>
+ <String Id="Include_launcherRemove">Use Programs and Features to remove the 'py' launcher.</String>
+ <String Id="Include_launcherUpgrade">Upgrades the global 'py' launcher from the previous version.</String>
+
+ <String Id="AssociateFilesLabel">Associate &amp;files with Python (requires the py launcher)</String>
+ <String Id="ShortcutsLabel">Create shortcuts for installed applications</String>
+ <String Id="PrependPathLabel">Add Python to &amp;environment variables</String>
+ <String Id="ShortPrependPathLabel">Add &amp;Python [ShortVersion] to PATH</String>
+ <String Id="InstallAllUsersLabel">Install for &amp;all users</String>
+ <String Id="InstallLauncherAllUsersLabel">for &amp;all users (requires elevation)</String>
+ <String Id="ShortInstallLauncherAllUsersLabel">Install &amp;launcher for all users (recommended)</String>
+ <String Id="PrecompileLabel">&amp;Precompile standard library</String>
+ <String Id="Include_symbolsLabel">Download debugging &amp;symbols</String>
+ <String Id="Include_debugLabel">Download debu&amp;g binaries (requires VS 2015 or later)</String>
+
+ <String Id="ProgressHeader">[ActionLikeInstallation] Progress</String>
+ <String Id="ProgressLabel">[ActionLikeInstalling]:</String>
+ <String Id="OverallProgressPackageText">Initializing...</String>
+ <String Id="ModifyHeader">Modify Setup</String>
+ <String Id="ModifyModifyButton">&amp;Modify</String>
+ <String Id="ModifyButtonNote">Add or remove individual features.</String>
+ <String Id="ModifyRepairButton">&amp;Repair</String>
+ <String Id="RepairButtonNote">Ensure all current features are correctly installed.</String>
+ <String Id="ModifyUninstallButton">&amp;Uninstall</String>
+ <String Id="UninstallButtonNote">Remove the entire [WixBundleName] installation.</String>
+ <String Id="SuccessHeader">[ActionLikeInstallation] was successful</String>
+ <String Id="SuccessLaunchButton">&amp;Launch</String>
+ <String Id="SuccessRestartText">You may need to restart your computer to finish updating files.</String>
+ <String Id="SuccessRestartButton">&amp;Restart</String>
+ <String Id="SuccessInstallMessage">Special thanks to Mark Hammond, without whose years of freely shared Windows expertise, Python for Windows would still be Python for DOS.
+
+New to Python? Start with the &lt;a href="https://docs.python.org/[ShortVersion]/tutorial/index.html"&gt;online tutorial&lt;/a&gt; and &lt;a href="https://docs.python.org/[ShortVersion]/index.html"&gt;documentation&lt;/a&gt;.
+
+See &lt;a href="https://docs.python.org/[ShortVersion]/whatsnew/[ShortVersion].html"&gt;what's new&lt;/a&gt; in this release.</String>
+ <String Id="SuccessModifyMessage">Thank you for using [WixBundleName].</String>
+ <String Id="SuccessRepairMessage">Thank you for using [WixBundleName].
+
+Feel free to email &lt;a href="mailto:python-list@python.org"&gt;python-list@python.org&lt;/a&gt; if you continue to encounter issues.</String>
+ <String Id="SuccessRemoveMessage">Thank you for using [WixBundleName].
+
+Feel free to email &lt;a href="mailto:python-list@python.org"&gt;python-list@python.org&lt;/a&gt; if you encountered problems.</String>
+ <String Id="FailureHeader">Setup failed</String>
+ <String Id="FailureHyperlinkLogText">One or more issues caused the setup to fail. Please fix the issues and then retry setup. For more information see the &lt;a href="#"&gt;log file&lt;/a&gt;.</String>
+ <String Id="FailureRestartText">You must restart your computer to complete the rollback of the software.</String>
+ <String Id="FailureRestartButton">&amp;Restart</String>
+ <String Id="FailureExistingInstall">Unable to install [WixBundleName] due to an existing install. Use Programs and Features to modify, repair or remove [WixBundleName].</String>
+
+ <String Id="FailureWin7MissingSP1">Windows 7 Service Pack 1 and all applicable updates are required to install [WixBundleName].
+
+Please &lt;a href="https://www.bing.com/search?q=how%20to%20install%20windows%207%20service%20pack%201"&gt;update your machine&lt;/a&gt; and then restart the installation.</String>
+ <String Id="FailureVistaMissingSP2">Windows Vista Service Pack 2 and all applicable updates are required to install [WixBundleName].
+
+Please &lt;a href="https://www.bing.com/search?q=how%20to%20install%20windows%20vista%20service%20pack%202"&gt;update your machine&lt;/a&gt; and then restart the installation.</String>
+ <String Id="FailureXPOrEarlier">Windows Vista or later is required to install and use [WixBundleName].
+
+Visit &lt;a href="https://www.python.org/"&gt;python.org&lt;/a&gt; to download Python 3.4.</String>
+</WixLocalization>
diff --git a/Tools/msi/bundle/SideBar.png b/Tools/msi/bundle/SideBar.png
new file mode 100644
index 0000000000..a23ce5e145
--- /dev/null
+++ b/Tools/msi/bundle/SideBar.png
Binary files differ
diff --git a/Tools/msi/bundle/bootstrap/LICENSE.txt b/Tools/msi/bundle/bootstrap/LICENSE.txt
new file mode 100644
index 0000000000..5791a7e81d
--- /dev/null
+++ b/Tools/msi/bundle/bootstrap/LICENSE.txt
@@ -0,0 +1,25 @@
+This license applies to the bootstrapper application that is embedded within the installer. It has no impact on the licensing for the rest of the installer or Python itself, as no code covered by this license exists in any other part of the product.
+
+---
+
+Microsoft Reciprocal License (MS-RL)
+
+This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.
+
+1. Definitions
+ The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.
+ A "contribution" is the original software, or any additions or changes to the software.
+ A "contributor" is any person that distributes its contribution under this license.
+ "Licensed patents" are a contributor's patent claims that read directly on its contribution.
+
+2. Grant of Rights
+ (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
+ (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.
+
+3. Conditions and Limitations
+ (A) Reciprocal Grants- For any file you distribute that contains code from the software (in source code or binary format), you must provide recipients the source code to that file along with a copy of this license, which license will govern that file. You may license other files that are entirely your own work and do not contain code from the software under any terms you choose.
+ (B) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
+ (C) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
+ (D) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
+ (E) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
+ (F) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
diff --git a/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
new file mode 100644
index 0000000000..1462d7b67e
--- /dev/null
+++ b/Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
@@ -0,0 +1,3257 @@
+//-------------------------------------------------------------------------------------------------
+// <copyright file="WixStandardBootstrapperApplication.cpp" company="Outercurve Foundation">
+// Copyright (c) 2004, Outercurve Foundation.
+// This software is released under Microsoft Reciprocal License (MS-RL).
+// The license and further copyright text can be found in the file
+// LICENSE.TXT at the root directory of the distribution.
+// </copyright>
+//-------------------------------------------------------------------------------------------------
+
+
+#include "pch.h"
+
+static const LPCWSTR PYBA_WINDOW_CLASS = L"PythonBA";
+static const LPCWSTR PYBA_VARIABLE_LAUNCH_TARGET_PATH = L"LaunchTarget";
+static const LPCWSTR PYBA_VARIABLE_LAUNCH_TARGET_ELEVATED_ID = L"LaunchTargetElevatedId";
+static const LPCWSTR PYBA_VARIABLE_LAUNCH_ARGUMENTS = L"LaunchArguments";
+static const LPCWSTR PYBA_VARIABLE_LAUNCH_HIDDEN = L"LaunchHidden";
+static const DWORD PYBA_ACQUIRE_PERCENTAGE = 30;
+static const LPCWSTR PYBA_VARIABLE_BUNDLE_FILE_VERSION = L"WixBundleFileVersion";
+
+enum PYBA_STATE {
+ PYBA_STATE_INITIALIZING,
+ PYBA_STATE_INITIALIZED,
+ PYBA_STATE_HELP,
+ PYBA_STATE_DETECTING,
+ PYBA_STATE_DETECTED,
+ PYBA_STATE_PLANNING,
+ PYBA_STATE_PLANNED,
+ PYBA_STATE_APPLYING,
+ PYBA_STATE_CACHING,
+ PYBA_STATE_CACHED,
+ PYBA_STATE_EXECUTING,
+ PYBA_STATE_EXECUTED,
+ PYBA_STATE_APPLIED,
+ PYBA_STATE_FAILED,
+};
+
+static const int WM_PYBA_SHOW_HELP = WM_APP + 100;
+static const int WM_PYBA_DETECT_PACKAGES = WM_APP + 101;
+static const int WM_PYBA_PLAN_PACKAGES = WM_APP + 102;
+static const int WM_PYBA_APPLY_PACKAGES = WM_APP + 103;
+static const int WM_PYBA_CHANGE_STATE = WM_APP + 104;
+static const int WM_PYBA_SHOW_FAILURE = WM_APP + 105;
+
+// This enum must be kept in the same order as the PAGE_NAMES array.
+enum PAGE {
+ PAGE_LOADING,
+ PAGE_HELP,
+ PAGE_INSTALL,
+ PAGE_UPGRADE,
+ PAGE_SIMPLE_INSTALL,
+ PAGE_CUSTOM1,
+ PAGE_CUSTOM2,
+ PAGE_MODIFY,
+ PAGE_PROGRESS,
+ PAGE_PROGRESS_PASSIVE,
+ PAGE_SUCCESS,
+ PAGE_FAILURE,
+ COUNT_PAGE,
+};
+
+// This array must be kept in the same order as the PAGE enum.
+static LPCWSTR PAGE_NAMES[] = {
+ L"Loading",
+ L"Help",
+ L"Install",
+ L"Upgrade",
+ L"SimpleInstall",
+ L"Custom1",
+ L"Custom2",
+ L"Modify",
+ L"Progress",
+ L"ProgressPassive",
+ L"Success",
+ L"Failure",
+};
+
+enum CONTROL_ID {
+ // Non-paged controls
+ ID_CLOSE_BUTTON = THEME_FIRST_ASSIGN_CONTROL_ID,
+ ID_MINIMIZE_BUTTON,
+
+ // Welcome page
+ ID_INSTALL_BUTTON,
+ ID_INSTALL_CUSTOM_BUTTON,
+ ID_INSTALL_SIMPLE_BUTTON,
+ ID_INSTALL_UPGRADE_BUTTON,
+ ID_INSTALL_UPGRADE_CUSTOM_BUTTON,
+ ID_INSTALL_CANCEL_BUTTON,
+ ID_INSTALL_LAUNCHER_ALL_USERS_CHECKBOX,
+
+ // Customize Page
+ ID_TARGETDIR_EDITBOX,
+ ID_CUSTOM_ASSOCIATE_FILES_CHECKBOX,
+ ID_CUSTOM_INSTALL_ALL_USERS_CHECKBOX,
+ ID_CUSTOM_INSTALL_LAUNCHER_ALL_USERS_CHECKBOX,
+ ID_CUSTOM_INCLUDE_LAUNCHER_HELP_LABEL,
+ ID_CUSTOM_COMPILE_ALL_CHECKBOX,
+ ID_CUSTOM_BROWSE_BUTTON,
+ ID_CUSTOM_BROWSE_BUTTON_LABEL,
+ ID_CUSTOM_INSTALL_BUTTON,
+ ID_CUSTOM_NEXT_BUTTON,
+ ID_CUSTOM1_BACK_BUTTON,
+ ID_CUSTOM2_BACK_BUTTON,
+ ID_CUSTOM1_CANCEL_BUTTON,
+ ID_CUSTOM2_CANCEL_BUTTON,
+
+ // Modify page
+ ID_MODIFY_BUTTON,
+ ID_REPAIR_BUTTON,
+ ID_UNINSTALL_BUTTON,
+ ID_MODIFY_CANCEL_BUTTON,
+
+ // Progress page
+ ID_CACHE_PROGRESS_PACKAGE_TEXT,
+ ID_CACHE_PROGRESS_BAR,
+ ID_CACHE_PROGRESS_TEXT,
+
+ ID_EXECUTE_PROGRESS_PACKAGE_TEXT,
+ ID_EXECUTE_PROGRESS_BAR,
+ ID_EXECUTE_PROGRESS_TEXT,
+ ID_EXECUTE_PROGRESS_ACTIONDATA_TEXT,
+
+ ID_OVERALL_PROGRESS_PACKAGE_TEXT,
+ ID_OVERALL_PROGRESS_BAR,
+ ID_OVERALL_CALCULATED_PROGRESS_BAR,
+ ID_OVERALL_PROGRESS_TEXT,
+
+ ID_PROGRESS_CANCEL_BUTTON,
+
+ // Success page
+ ID_LAUNCH_BUTTON,
+ ID_SUCCESS_TEXT,
+ ID_SUCCESS_RESTART_TEXT,
+ ID_SUCCESS_RESTART_BUTTON,
+ ID_SUCCESS_CANCEL_BUTTON,
+
+ // Failure page
+ ID_FAILURE_LOGFILE_LINK,
+ ID_FAILURE_MESSAGE_TEXT,
+ ID_FAILURE_RESTART_TEXT,
+ ID_FAILURE_RESTART_BUTTON,
+ ID_FAILURE_CANCEL_BUTTON
+};
+
+static THEME_ASSIGN_CONTROL_ID CONTROL_ID_NAMES[] = {
+ { ID_CLOSE_BUTTON, L"CloseButton" },
+ { ID_MINIMIZE_BUTTON, L"MinimizeButton" },
+
+ { ID_INSTALL_BUTTON, L"InstallButton" },
+ { ID_INSTALL_CUSTOM_BUTTON, L"InstallCustomButton" },
+ { ID_INSTALL_SIMPLE_BUTTON, L"InstallSimpleButton" },
+ { ID_INSTALL_UPGRADE_BUTTON, L"InstallUpgradeButton" },
+ { ID_INSTALL_UPGRADE_CUSTOM_BUTTON, L"InstallUpgradeCustomButton" },
+ { ID_INSTALL_CANCEL_BUTTON, L"InstallCancelButton" },
+ { ID_INSTALL_LAUNCHER_ALL_USERS_CHECKBOX, L"InstallLauncherAllUsers" },
+
+ { ID_TARGETDIR_EDITBOX, L"TargetDir" },
+ { ID_CUSTOM_ASSOCIATE_FILES_CHECKBOX, L"AssociateFiles" },
+ { ID_CUSTOM_INSTALL_ALL_USERS_CHECKBOX, L"InstallAllUsers" },
+ { ID_CUSTOM_INSTALL_LAUNCHER_ALL_USERS_CHECKBOX, L"CustomInstallLauncherAllUsers" },
+ { ID_CUSTOM_INCLUDE_LAUNCHER_HELP_LABEL, L"Include_launcherHelp" },
+ { ID_CUSTOM_COMPILE_ALL_CHECKBOX, L"CompileAll" },
+ { ID_CUSTOM_BROWSE_BUTTON, L"CustomBrowseButton" },
+ { ID_CUSTOM_BROWSE_BUTTON_LABEL, L"CustomBrowseButtonLabel" },
+ { ID_CUSTOM_INSTALL_BUTTON, L"CustomInstallButton" },
+ { ID_CUSTOM_NEXT_BUTTON, L"CustomNextButton" },
+ { ID_CUSTOM1_BACK_BUTTON, L"Custom1BackButton" },
+ { ID_CUSTOM2_BACK_BUTTON, L"Custom2BackButton" },
+ { ID_CUSTOM1_CANCEL_BUTTON, L"Custom1CancelButton" },
+ { ID_CUSTOM2_CANCEL_BUTTON, L"Custom2CancelButton" },
+
+ { ID_MODIFY_BUTTON, L"ModifyButton" },
+ { ID_REPAIR_BUTTON, L"RepairButton" },
+ { ID_UNINSTALL_BUTTON, L"UninstallButton" },
+ { ID_MODIFY_CANCEL_BUTTON, L"ModifyCancelButton" },
+
+ { ID_CACHE_PROGRESS_PACKAGE_TEXT, L"CacheProgressPackageText" },
+ { ID_CACHE_PROGRESS_BAR, L"CacheProgressbar" },
+ { ID_CACHE_PROGRESS_TEXT, L"CacheProgressText" },
+ { ID_EXECUTE_PROGRESS_PACKAGE_TEXT, L"ExecuteProgressPackageText" },
+ { ID_EXECUTE_PROGRESS_BAR, L"ExecuteProgressbar" },
+ { ID_EXECUTE_PROGRESS_TEXT, L"ExecuteProgressText" },
+ { ID_EXECUTE_PROGRESS_ACTIONDATA_TEXT, L"ExecuteProgressActionDataText" },
+ { ID_OVERALL_PROGRESS_PACKAGE_TEXT, L"OverallProgressPackageText" },
+ { ID_OVERALL_PROGRESS_BAR, L"OverallProgressbar" },
+ { ID_OVERALL_CALCULATED_PROGRESS_BAR, L"OverallCalculatedProgressbar" },
+ { ID_OVERALL_PROGRESS_TEXT, L"OverallProgressText" },
+ { ID_PROGRESS_CANCEL_BUTTON, L"ProgressCancelButton" },
+
+ { ID_LAUNCH_BUTTON, L"LaunchButton" },
+ { ID_SUCCESS_TEXT, L"SuccessText" },
+ { ID_SUCCESS_RESTART_TEXT, L"SuccessRestartText" },
+ { ID_SUCCESS_RESTART_BUTTON, L"SuccessRestartButton" },
+ { ID_SUCCESS_CANCEL_BUTTON, L"SuccessCancelButton" },
+
+ { ID_FAILURE_LOGFILE_LINK, L"FailureLogFileLink" },
+ { ID_FAILURE_MESSAGE_TEXT, L"FailureMessageText" },
+ { ID_FAILURE_RESTART_TEXT, L"FailureRestartText" },
+ { ID_FAILURE_RESTART_BUTTON, L"FailureRestartButton" },
+ { ID_FAILURE_CANCEL_BUTTON, L"FailureCancelButton" },
+};
+
+static struct { LPCWSTR regName; LPCWSTR variableName; } OPTIONAL_FEATURES[] = {
+ { L"core_d", L"Include_debug" },
+ { L"core_pdb", L"Include_symbols" },
+ { L"dev", L"Include_dev" },
+ { L"doc", L"Include_doc" },
+ { L"exe", L"Include_exe" },
+ { L"lib", L"Include_lib" },
+ { L"path", L"PrependPath" },
+ { L"pip", L"Include_pip" },
+ { L"tcltk", L"Include_tcltk" },
+ { L"test", L"Include_test" },
+ { L"tools", L"Include_tools" },
+ { L"Shortcuts", L"Shortcuts" },
+ // Include_launcher and AssociateFiles are handled separately and so do
+ // not need to be included in this list.
+ { nullptr, nullptr }
+};
+
+
+
+class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
+ void ShowPage(DWORD newPageId) {
+ // Process each control for special handling in the new page.
+ ProcessPageControls(ThemeGetPage(_theme, newPageId));
+
+ // Enable disable controls per-page.
+ if (_pageIds[PAGE_INSTALL] == newPageId ||
+ _pageIds[PAGE_SIMPLE_INSTALL] == newPageId ||
+ _pageIds[PAGE_UPGRADE] == newPageId) {
+ InstallPage_Show();
+ } else if (_pageIds[PAGE_CUSTOM1] == newPageId) {
+ Custom1Page_Show();
+ } else if (_pageIds[PAGE_CUSTOM2] == newPageId) {
+ Custom2Page_Show();
+ } else if (_pageIds[PAGE_MODIFY] == newPageId) {
+ ModifyPage_Show();
+ } else if (_pageIds[PAGE_SUCCESS] == newPageId) {
+ SuccessPage_Show();
+ } else if (_pageIds[PAGE_FAILURE] == newPageId) {
+ FailurePage_Show();
+ }
+
+ // Prevent repainting while switching page to avoid ugly flickering
+ _suppressPaint = TRUE;
+ ThemeShowPage(_theme, newPageId, SW_SHOW);
+ ThemeShowPage(_theme, _visiblePageId, SW_HIDE);
+ _suppressPaint = FALSE;
+ InvalidateRect(_theme->hwndParent, nullptr, TRUE);
+ _visiblePageId = newPageId;
+
+ // On the install page set the focus to the install button or
+ // the next enabled control if install is disabled
+ if (_pageIds[PAGE_INSTALL] == newPageId) {
+ ThemeSetFocus(_theme, ID_INSTALL_BUTTON);
+ } else if (_pageIds[PAGE_SIMPLE_INSTALL] == newPageId) {
+ ThemeSetFocus(_theme, ID_INSTALL_SIMPLE_BUTTON);
+ }
+ }
+
+ //
+ // Handles control clicks
+ //
+ void OnCommand(CONTROL_ID id) {
+ LPWSTR defaultDir = nullptr;
+ LPWSTR targetDir = nullptr;
+ LONGLONG elevated, crtInstalled, installAllUsers;
+ BOOL checked, launcherChecked;
+ WCHAR wzPath[MAX_PATH] = { };
+ BROWSEINFOW browseInfo = { };
+ PIDLIST_ABSOLUTE pidl = nullptr;
+ DWORD pageId;
+ HRESULT hr = S_OK;
+
+ switch(id) {
+ case ID_CLOSE_BUTTON:
+ OnClickCloseButton();
+ break;
+
+ // Install commands
+ case ID_INSTALL_SIMPLE_BUTTON: __fallthrough;
+ case ID_INSTALL_UPGRADE_BUTTON: __fallthrough;
+ case ID_INSTALL_BUTTON:
+ SavePageSettings();
+
+ if (!WillElevate() && !QueryElevateForCrtInstall()) {
+ break;
+ }
+
+ hr = BalGetNumericVariable(L"InstallAllUsers", &installAllUsers);
+ ExitOnFailure(hr, L"Failed to get install scope");
+
+ hr = _engine->SetVariableNumeric(L"CompileAll", installAllUsers);
+ ExitOnFailure(hr, L"Failed to update CompileAll");
+
+ hr = EnsureTargetDir();
+ ExitOnFailure(hr, L"Failed to set TargetDir");
+
+ OnPlan(BOOTSTRAPPER_ACTION_INSTALL);
+ break;
+
+ case ID_CUSTOM1_BACK_BUTTON:
+ SavePageSettings();
+ if (_modifying) {
+ GoToPage(PAGE_MODIFY);
+ } else if (_upgrading) {
+ GoToPage(PAGE_UPGRADE);
+ } else {
+ GoToPage(PAGE_INSTALL);
+ }
+ break;
+
+ case ID_INSTALL_CUSTOM_BUTTON: __fallthrough;
+ case ID_INSTALL_UPGRADE_CUSTOM_BUTTON: __fallthrough;
+ case ID_CUSTOM2_BACK_BUTTON:
+ SavePageSettings();
+ GoToPage(PAGE_CUSTOM1);
+ break;
+
+ case ID_CUSTOM_NEXT_BUTTON:
+ SavePageSettings();
+ GoToPage(PAGE_CUSTOM2);
+ break;
+
+ case ID_CUSTOM_INSTALL_BUTTON:
+ SavePageSettings();
+
+ hr = BalGetStringVariable(L"TargetDir", &targetDir);
+ if (SUCCEEDED(hr)) {
+ // TODO: Check whether directory exists and contains another installation
+ ReleaseStr(targetDir);
+ }
+
+ if (!WillElevate() && !QueryElevateForCrtInstall()) {
+ break;
+ }
+
+ OnPlan(_command.action);
+ break;
+
+ case ID_INSTALL_LAUNCHER_ALL_USERS_CHECKBOX:
+ checked = ThemeIsControlChecked(_theme, ID_INSTALL_LAUNCHER_ALL_USERS_CHECKBOX);
+ _engine->SetVariableNumeric(L"InstallLauncherAllUsers", checked);
+
+ ThemeControlElevates(_theme, ID_INSTALL_BUTTON, WillElevate());
+ break;
+
+ case ID_CUSTOM_INSTALL_LAUNCHER_ALL_USERS_CHECKBOX:
+ checked = ThemeIsControlChecked(_theme, ID_CUSTOM_INSTALL_LAUNCHER_ALL_USERS_CHECKBOX);
+ _engine->SetVariableNumeric(L"InstallLauncherAllUsers", checked);
+
+ ThemeControlElevates(_theme, ID_CUSTOM_INSTALL_BUTTON, WillElevate());
+ break;
+
+ case ID_CUSTOM_INSTALL_ALL_USERS_CHECKBOX:
+ checked = ThemeIsControlChecked(_theme, ID_CUSTOM_INSTALL_ALL_USERS_CHECKBOX);
+ _engine->SetVariableNumeric(L"InstallAllUsers", checked);
+
+ ThemeControlElevates(_theme, ID_CUSTOM_INSTALL_BUTTON, WillElevate());
+ ThemeControlEnable(_theme, ID_CUSTOM_BROWSE_BUTTON_LABEL, !checked);
+ if (checked) {
+ _engine->SetVariableNumeric(L"CompileAll", 1);
+ ThemeSendControlMessage(_theme, ID_CUSTOM_COMPILE_ALL_CHECKBOX, BM_SETCHECK, BST_CHECKED, 0);
+ }
+ ThemeGetTextControl(_theme, ID_TARGETDIR_EDITBOX, &targetDir);
+ if (targetDir) {
+ // Check the current value against the default to see
+ // if we should switch it automatically.
+ hr = BalGetStringVariable(
+ checked ? L"DefaultJustForMeTargetDir" : L"DefaultAllUsersTargetDir",
+ &defaultDir
+ );
+
+ if (SUCCEEDED(hr) && defaultDir) {
+ LPWSTR formatted = nullptr;
+ if (defaultDir[0] && SUCCEEDED(BalFormatString(defaultDir, &formatted))) {
+ if (wcscmp(formatted, targetDir) == 0) {
+ ReleaseStr(defaultDir);
+ defaultDir = nullptr;
+ ReleaseStr(formatted);
+ formatted = nullptr;
+
+ hr = BalGetStringVariable(
+ checked ? L"DefaultAllUsersTargetDir" : L"DefaultJustForMeTargetDir",
+ &defaultDir
+ );
+ if (SUCCEEDED(hr) && defaultDir && defaultDir[0] && SUCCEEDED(BalFormatString(defaultDir, &formatted))) {
+ ThemeSetTextControl(_theme, ID_TARGETDIR_EDITBOX, formatted);
+ ReleaseStr(formatted);
+ }
+ } else {
+ ReleaseStr(formatted);
+ }
+ }
+
+ ReleaseStr(defaultDir);
+ }
+ }
+ break;
+
+ case ID_CUSTOM_BROWSE_BUTTON:
+ browseInfo.hwndOwner = _hWnd;
+ browseInfo.pszDisplayName = wzPath;
+ browseInfo.lpszTitle = _theme->sczCaption;
+ browseInfo.ulFlags = BIF_RETURNONLYFSDIRS | BIF_USENEWUI;
+ pidl = ::SHBrowseForFolderW(&browseInfo);
+ if (pidl && ::SHGetPathFromIDListW(pidl, wzPath)) {
+ ThemeSetTextControl(_theme, ID_TARGETDIR_EDITBOX, wzPath);
+ }
+
+ if (pidl) {
+ ::CoTaskMemFree(pidl);
+ }
+ break;
+
+ // Modify commands
+ case ID_MODIFY_BUTTON:
+ // Some variables cannot be modified
+ _engine->SetVariableString(L"InstallAllUsersState", L"disable");
+ _engine->SetVariableString(L"InstallLauncherAllUsersState", L"disable");
+ _engine->SetVariableString(L"TargetDirState", L"disable");
+ _engine->SetVariableString(L"CustomBrowseButtonState", L"disable");
+ _modifying = TRUE;
+ GoToPage(PAGE_CUSTOM1);
+ break;
+
+ case ID_REPAIR_BUTTON:
+ OnPlan(BOOTSTRAPPER_ACTION_REPAIR);
+ break;
+
+ case ID_UNINSTALL_BUTTON:
+ OnPlan(BOOTSTRAPPER_ACTION_UNINSTALL);
+ break;
+ }
+
+ LExit:
+ return;
+ }
+
+ void InstallPage_Show() {
+ // Ensure the All Users install button has a UAC shield
+ BOOL elevated = WillElevate();
+ ThemeControlElevates(_theme, ID_INSTALL_BUTTON, elevated);
+ ThemeControlElevates(_theme, ID_INSTALL_SIMPLE_BUTTON, elevated);
+ ThemeControlElevates(_theme, ID_INSTALL_UPGRADE_BUTTON, elevated);
+ }
+
+ void Custom1Page_Show() {
+ LONGLONG installLauncherAllUsers;
+
+ if (FAILED(BalGetNumericVariable(L"InstallLauncherAllUsers", &installLauncherAllUsers))) {
+ installLauncherAllUsers = 0;
+ }
+
+ ThemeSendControlMessage(_theme, ID_CUSTOM_INSTALL_LAUNCHER_ALL_USERS_CHECKBOX, BM_SETCHECK,
+ installLauncherAllUsers ? BST_CHECKED : BST_UNCHECKED, 0);
+
+ LOC_STRING *pLocString = nullptr;
+ LPCWSTR locKey = L"#(loc.Include_launcherHelp)";
+ LONGLONG detectedLauncher;
+
+ if (SUCCEEDED(BalGetNumericVariable(L"DetectedLauncher", &detectedLauncher)) && detectedLauncher) {
+ locKey = L"#(loc.Include_launcherRemove)";
+ } else if (SUCCEEDED(BalGetNumericVariable(L"DetectedOldLauncher", &detectedLauncher)) && detectedLauncher) {
+ locKey = L"#(loc.Include_launcherUpgrade)";
+ }
+
+ if (SUCCEEDED(LocGetString(_wixLoc, locKey, &pLocString)) && pLocString) {
+ ThemeSetTextControl(_theme, ID_CUSTOM_INCLUDE_LAUNCHER_HELP_LABEL, pLocString->wzText);
+ }
+ }
+
+ void Custom2Page_Show() {
+ HRESULT hr;
+ LONGLONG installAll, includeLauncher;
+
+ if (FAILED(BalGetNumericVariable(L"InstallAllUsers", &installAll))) {
+ installAll = 0;
+ }
+
+ if (WillElevate()) {
+ ThemeControlElevates(_theme, ID_CUSTOM_INSTALL_BUTTON, TRUE);
+ ThemeShowControl(_theme, ID_CUSTOM_BROWSE_BUTTON_LABEL, SW_HIDE);
+ } else {
+ ThemeControlElevates(_theme, ID_CUSTOM_INSTALL_BUTTON, FALSE);
+ ThemeShowControl(_theme, ID_CUSTOM_BROWSE_BUTTON_LABEL, SW_SHOW);
+ }
+
+ if (SUCCEEDED(BalGetNumericVariable(L"Include_launcher", &includeLauncher)) && includeLauncher) {
+ ThemeControlEnable(_theme, ID_CUSTOM_ASSOCIATE_FILES_CHECKBOX, TRUE);
+ } else {
+ ThemeSendControlMessage(_theme, ID_CUSTOM_ASSOCIATE_FILES_CHECKBOX, BM_SETCHECK, BST_UNCHECKED, 0);
+ ThemeControlEnable(_theme, ID_CUSTOM_ASSOCIATE_FILES_CHECKBOX, FALSE);
+ }
+
+ LPWSTR targetDir = nullptr;
+ hr = BalGetStringVariable(L"TargetDir", &targetDir);
+ if (SUCCEEDED(hr) && targetDir && targetDir[0]) {
+ ThemeSetTextControl(_theme, ID_TARGETDIR_EDITBOX, targetDir);
+ StrFree(targetDir);
+ } else if (SUCCEEDED(hr)) {
+ StrFree(targetDir);
+ targetDir = nullptr;
+
+ LPWSTR defaultTargetDir = nullptr;
+ hr = BalGetStringVariable(L"DefaultCustomTargetDir", &defaultTargetDir);
+ if (SUCCEEDED(hr) && defaultTargetDir && !defaultTargetDir[0]) {
+ StrFree(defaultTargetDir);
+ defaultTargetDir = nullptr;
+
+ hr = BalGetStringVariable(
+ installAll ? L"DefaultAllUsersTargetDir" : L"DefaultJustForMeTargetDir",
+ &defaultTargetDir
+ );
+ }
+ if (SUCCEEDED(hr) && defaultTargetDir) {
+ if (defaultTargetDir[0] && SUCCEEDED(BalFormatString(defaultTargetDir, &targetDir))) {
+ ThemeSetTextControl(_theme, ID_TARGETDIR_EDITBOX, targetDir);
+ StrFree(targetDir);
+ }
+ StrFree(defaultTargetDir);
+ }
+ }
+ }
+
+ void ModifyPage_Show() {
+ ThemeControlEnable(_theme, ID_REPAIR_BUTTON, !_suppressRepair);
+ }
+
+ void SuccessPage_Show() {
+ // on the "Success" page, check if the restart or launch button should be enabled.
+ BOOL showRestartButton = FALSE;
+ BOOL launchTargetExists = FALSE;
+ LOC_STRING *successText = nullptr;
+ HRESULT hr = S_OK;
+
+ if (_restartRequired) {
+ if (BOOTSTRAPPER_RESTART_PROMPT == _command.restart) {
+ showRestartButton = TRUE;
+ }
+ } else if (ThemeControlExists(_theme, ID_LAUNCH_BUTTON)) {
+ launchTargetExists = BalStringVariableExists(PYBA_VARIABLE_LAUNCH_TARGET_PATH);
+ }
+
+ switch (_plannedAction) {
+ case BOOTSTRAPPER_ACTION_INSTALL:
+ hr = LocGetString(_wixLoc, L"#(loc.SuccessInstallMessage)", &successText);
+ break;
+ case BOOTSTRAPPER_ACTION_MODIFY:
+ hr = LocGetString(_wixLoc, L"#(loc.SuccessModifyMessage)", &successText);
+ break;
+ case BOOTSTRAPPER_ACTION_REPAIR:
+ hr = LocGetString(_wixLoc, L"#(loc.SuccessRepairMessage)", &successText);
+ break;
+ case BOOTSTRAPPER_ACTION_UNINSTALL:
+ hr = LocGetString(_wixLoc, L"#(loc.SuccessRemoveMessage)", &successText);
+ break;
+ }
+
+ if (successText) {
+ LPWSTR formattedString = nullptr;
+ BalFormatString(successText->wzText, &formattedString);
+ if (formattedString) {
+ ThemeSetTextControl(_theme, ID_SUCCESS_TEXT, formattedString);
+ StrFree(formattedString);
+ }
+ }
+
+ ThemeControlEnable(_theme, ID_LAUNCH_BUTTON, launchTargetExists && BOOTSTRAPPER_ACTION_UNINSTALL < _plannedAction);
+ ThemeControlEnable(_theme, ID_SUCCESS_RESTART_TEXT, showRestartButton);
+ ThemeControlEnable(_theme, ID_SUCCESS_RESTART_BUTTON, showRestartButton);
+ }
+
+ void FailurePage_Show() {
+ // on the "Failure" page, show error message and check if the restart button should be enabled.
+
+ // if there is a log file variable then we'll assume the log file exists.
+ BOOL showLogLink = (_bundle.sczLogVariable && *_bundle.sczLogVariable);
+ BOOL showErrorMessage = FALSE;
+ BOOL showRestartButton = FALSE;
+
+ if (FAILED(_hrFinal)) {
+ LPWSTR unformattedText = nullptr;
+ LPWSTR text = nullptr;
+
+ // If we know the failure message, use that.
+ if (_failedMessage && *_failedMessage) {
+ StrAllocString(&unformattedText, _failedMessage, 0);
+ } else {
+ // try to get the error message from the error code.
+ StrAllocFromError(&unformattedText, _hrFinal, nullptr);
+ if (!unformattedText || !*unformattedText) {
+ StrAllocFromError(&unformattedText, E_FAIL, nullptr);
+ }
+ }
+
+ if (E_WIXSTDBA_CONDITION_FAILED == _hrFinal) {
+ if (unformattedText) {
+ StrAllocString(&text, unformattedText, 0);
+ }
+ } else {
+ StrAllocFormatted(&text, L"0x%08x - %ls", _hrFinal, unformattedText);
+ }
+
+ if (text) {
+ ThemeSetTextControl(_theme, ID_FAILURE_MESSAGE_TEXT, text);
+ showErrorMessage = TRUE;
+ }
+
+ ReleaseStr(text);
+ ReleaseStr(unformattedText);
+ }
+
+ if (_restartRequired && BOOTSTRAPPER_RESTART_PROMPT == _command.restart) {
+ showRestartButton = TRUE;
+ }
+
+ ThemeControlEnable(_theme, ID_FAILURE_LOGFILE_LINK, showLogLink);
+ ThemeControlEnable(_theme, ID_FAILURE_MESSAGE_TEXT, showErrorMessage);
+ ThemeControlEnable(_theme, ID_FAILURE_RESTART_TEXT, showRestartButton);
+ ThemeControlEnable(_theme, ID_FAILURE_RESTART_BUTTON, showRestartButton);
+ }
+
+
+public: // IBootstrapperApplication
+ virtual STDMETHODIMP OnStartup() {
+ HRESULT hr = S_OK;
+ DWORD dwUIThreadId = 0;
+
+ // create UI thread
+ _hUiThread = ::CreateThread(nullptr, 0, UiThreadProc, this, 0, &dwUIThreadId);
+ if (!_hUiThread) {
+ ExitWithLastError(hr, "Failed to create UI thread.");
+ }
+
+ LExit:
+ return hr;
+ }
+
+
+ virtual STDMETHODIMP_(int) OnShutdown() {
+ int nResult = IDNOACTION;
+
+ // wait for UI thread to terminate
+ if (_hUiThread) {
+ ::WaitForSingleObject(_hUiThread, INFINITE);
+ ReleaseHandle(_hUiThread);
+ }
+
+ // If a restart was required.
+ if (_restartRequired && _allowRestart) {
+ nResult = IDRESTART;
+ }
+
+ return nResult;
+ }
+
+ virtual STDMETHODIMP_(int) OnDetectRelatedMsiPackage(
+ __in_z LPCWSTR wzPackageId,
+ __in_z LPCWSTR /*wzProductCode*/,
+ __in BOOL fPerMachine,
+ __in DWORD64 /*dw64Version*/,
+ __in BOOTSTRAPPER_RELATED_OPERATION operation
+ ) {
+ if (BOOTSTRAPPER_RELATED_OPERATION_MAJOR_UPGRADE == operation &&
+ (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzPackageId, -1, L"launcher_AllUsers", -1) ||
+ CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzPackageId, -1, L"launcher_JustForMe", -1))) {
+ auto hr = LoadAssociateFilesStateFromKey(_engine, fPerMachine ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER);
+ if (hr == S_OK) {
+ _engine->SetVariableNumeric(L"AssociateFiles", 1);
+ } else if (FAILED(hr)) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Failed to load AssociateFiles state: error code 0x%08X", hr);
+ }
+
+ _engine->SetVariableNumeric(L"Include_launcher", 1);
+ _engine->SetVariableNumeric(L"DetectedOldLauncher", 1);
+ _engine->SetVariableNumeric(L"InstallLauncherAllUsers", fPerMachine ? 1 : 0);
+ }
+ return CheckCanceled() ? IDCANCEL : IDNOACTION;
+ }
+
+ virtual STDMETHODIMP_(int) OnDetectRelatedBundle(
+ __in LPCWSTR wzBundleId,
+ __in BOOTSTRAPPER_RELATION_TYPE relationType,
+ __in LPCWSTR /*wzBundleTag*/,
+ __in BOOL fPerMachine,
+ __in DWORD64 /*dw64Version*/,
+ __in BOOTSTRAPPER_RELATED_OPERATION operation
+ ) {
+ BalInfoAddRelatedBundleAsPackage(&_bundle.packages, wzBundleId, relationType, fPerMachine);
+
+ // Remember when our bundle would cause a downgrade.
+ if (BOOTSTRAPPER_RELATED_OPERATION_DOWNGRADE == operation) {
+ _downgradingOtherVersion = TRUE;
+ } else if (BOOTSTRAPPER_RELATED_OPERATION_MAJOR_UPGRADE == operation) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Detected previous version - planning upgrade");
+ _upgrading = TRUE;
+
+ LoadOptionalFeatureStates(_engine);
+ } else if (BOOTSTRAPPER_RELATED_OPERATION_NONE == operation) {
+ if (_command.action == BOOTSTRAPPER_ACTION_INSTALL) {
+ LOC_STRING *pLocString = nullptr;
+ if (SUCCEEDED(LocGetString(_wixLoc, L"#(loc.FailureExistingInstall)", &pLocString)) && pLocString) {
+ BalFormatString(pLocString->wzText, &_failedMessage);
+ } else {
+ BalFormatString(L"Cannot install [WixBundleName] because it is already installed.", &_failedMessage);
+ }
+ BalLog(
+ BOOTSTRAPPER_LOG_LEVEL_ERROR,
+ "Related bundle %ls is preventing install",
+ wzBundleId
+ );
+ SetState(PYBA_STATE_FAILED, E_WIXSTDBA_CONDITION_FAILED);
+ }
+ }
+
+ return CheckCanceled() ? IDCANCEL : IDOK;
+ }
+
+
+ virtual STDMETHODIMP_(void) OnDetectPackageComplete(
+ __in LPCWSTR wzPackageId,
+ __in HRESULT hrStatus,
+ __in BOOTSTRAPPER_PACKAGE_STATE state
+ ) {
+ if (FAILED(hrStatus)) {
+ return;
+ }
+
+ BOOL detectedLauncher = FALSE;
+ HKEY hkey = HKEY_LOCAL_MACHINE;
+ if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzPackageId, -1, L"launcher_AllUsers", -1)) {
+ if (BOOTSTRAPPER_PACKAGE_STATE_PRESENT == state || BOOTSTRAPPER_PACKAGE_STATE_OBSOLETE == state) {
+ detectedLauncher = TRUE;
+ _engine->SetVariableNumeric(L"InstallLauncherAllUsers", 1);
+ }
+ } else if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzPackageId, -1, L"launcher_JustForMe", -1)) {
+ if (BOOTSTRAPPER_PACKAGE_STATE_PRESENT == state || BOOTSTRAPPER_PACKAGE_STATE_OBSOLETE == state) {
+ detectedLauncher = TRUE;
+ _engine->SetVariableNumeric(L"InstallLauncherAllUsers", 0);
+ }
+ }
+
+ if (detectedLauncher) {
+ /* When we detect the current version of the launcher. */
+ _engine->SetVariableNumeric(L"Include_launcher", 1);
+ _engine->SetVariableNumeric(L"DetectedLauncher", 1);
+ _engine->SetVariableString(L"Include_launcherState", L"disable");
+ _engine->SetVariableString(L"InstallLauncherAllUsersState", L"disable");
+
+ auto hr = LoadAssociateFilesStateFromKey(_engine, hkey);
+ if (hr == S_OK) {
+ _engine->SetVariableNumeric(L"AssociateFiles", 1);
+ } else if (FAILED(hr)) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Failed to load AssociateFiles state: error code 0x%08X", hr);
+ }
+ }
+ }
+
+
+ virtual STDMETHODIMP_(void) OnDetectComplete(__in HRESULT hrStatus) {
+ if (SUCCEEDED(hrStatus) && _baFunction) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Running detect complete BA function");
+ _baFunction->OnDetectComplete();
+ }
+
+ if (SUCCEEDED(hrStatus)) {
+ hrStatus = EvaluateConditions();
+ }
+
+ if (SUCCEEDED(hrStatus)) {
+ // Ensure the default path has been set
+ hrStatus = EnsureTargetDir();
+ }
+
+ SetState(PYBA_STATE_DETECTED, hrStatus);
+
+ // If we're not interacting with the user or we're doing a layout or we're just after a force restart
+ // then automatically start planning.
+ if (BOOTSTRAPPER_DISPLAY_FULL > _command.display ||
+ BOOTSTRAPPER_ACTION_LAYOUT == _command.action ||
+ BOOTSTRAPPER_ACTION_UNINSTALL == _command.action ||
+ BOOTSTRAPPER_RESUME_TYPE_REBOOT == _command.resumeType) {
+ if (SUCCEEDED(hrStatus)) {
+ ::PostMessageW(_hWnd, WM_PYBA_PLAN_PACKAGES, 0, _command.action);
+ }
+ }
+ }
+
+
+ virtual STDMETHODIMP_(int) OnPlanRelatedBundle(
+ __in_z LPCWSTR /*wzBundleId*/,
+ __inout_z BOOTSTRAPPER_REQUEST_STATE* pRequestedState
+ ) {
+ return CheckCanceled() ? IDCANCEL : IDOK;
+ }
+
+
+ virtual STDMETHODIMP_(int) OnPlanPackageBegin(
+ __in_z LPCWSTR wzPackageId,
+ __inout BOOTSTRAPPER_REQUEST_STATE *pRequestState
+ ) {
+ HRESULT hr = S_OK;
+ BAL_INFO_PACKAGE* pPackage = nullptr;
+
+ if (_nextPackageAfterRestart) {
+ // After restart we need to finish the dependency registration for our package so allow the package
+ // to go present.
+ if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzPackageId, -1, _nextPackageAfterRestart, -1)) {
+ // Do not allow a repair because that could put us in a perpetual restart loop.
+ if (BOOTSTRAPPER_REQUEST_STATE_REPAIR == *pRequestState) {
+ *pRequestState = BOOTSTRAPPER_REQUEST_STATE_PRESENT;
+ }
+
+ ReleaseNullStr(_nextPackageAfterRestart); // no more skipping now.
+ } else {
+ // not the matching package, so skip it.
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Skipping package: %ls, after restart because it was applied before the restart.", wzPackageId);
+
+ *pRequestState = BOOTSTRAPPER_REQUEST_STATE_NONE;
+ }
+ } else if ((_plannedAction == BOOTSTRAPPER_ACTION_INSTALL || _plannedAction == BOOTSTRAPPER_ACTION_MODIFY) &&
+ SUCCEEDED(BalInfoFindPackageById(&_bundle.packages, wzPackageId, &pPackage))) {
+ BOOL f = FALSE;
+ if (SUCCEEDED(_engine->EvaluateCondition(pPackage->sczInstallCondition, &f)) && f) {
+ *pRequestState = BOOTSTRAPPER_REQUEST_STATE_PRESENT;
+ }
+ }
+
+ return CheckCanceled() ? IDCANCEL : IDOK;
+ }
+
+ virtual STDMETHODIMP_(int) OnPlanMsiFeature(
+ __in_z LPCWSTR wzPackageId,
+ __in_z LPCWSTR wzFeatureId,
+ __inout BOOTSTRAPPER_FEATURE_STATE* pRequestedState
+ ) {
+ LONGLONG install;
+
+ if (wcscmp(wzFeatureId, L"AssociateFiles") == 0 || wcscmp(wzFeatureId, L"Shortcuts") == 0) {
+ if (SUCCEEDED(_engine->GetVariableNumeric(wzFeatureId, &install)) && install) {
+ *pRequestedState = BOOTSTRAPPER_FEATURE_STATE_LOCAL;
+ } else {
+ *pRequestedState = BOOTSTRAPPER_FEATURE_STATE_ABSENT;
+ }
+ } else {
+ *pRequestedState = BOOTSTRAPPER_FEATURE_STATE_LOCAL;
+ }
+ return CheckCanceled() ? IDCANCEL : IDNOACTION;
+ }
+
+ virtual STDMETHODIMP_(void) OnPlanComplete(__in HRESULT hrStatus) {
+ if (SUCCEEDED(hrStatus) && _baFunction) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Running plan complete BA function");
+ _baFunction->OnPlanComplete();
+ }
+
+ SetState(PYBA_STATE_PLANNED, hrStatus);
+
+ if (SUCCEEDED(hrStatus)) {
+ ::PostMessageW(_hWnd, WM_PYBA_APPLY_PACKAGES, 0, 0);
+ }
+
+ _startedExecution = FALSE;
+ _calculatedCacheProgress = 0;
+ _calculatedExecuteProgress = 0;
+ }
+
+
+ virtual STDMETHODIMP_(int) OnCachePackageBegin(
+ __in_z LPCWSTR wzPackageId,
+ __in DWORD cCachePayloads,
+ __in DWORD64 dw64PackageCacheSize
+ ) {
+ if (wzPackageId && *wzPackageId) {
+ BAL_INFO_PACKAGE* pPackage = nullptr;
+ HRESULT hr = BalInfoFindPackageById(&_bundle.packages, wzPackageId, &pPackage);
+ LPCWSTR wz = (SUCCEEDED(hr) && pPackage->sczDisplayName) ? pPackage->sczDisplayName : wzPackageId;
+
+ ThemeSetTextControl(_theme, ID_CACHE_PROGRESS_PACKAGE_TEXT, wz);
+
+ // If something started executing, leave it in the overall progress text.
+ if (!_startedExecution) {
+ ThemeSetTextControl(_theme, ID_OVERALL_PROGRESS_PACKAGE_TEXT, wz);
+ }
+ }
+
+ return __super::OnCachePackageBegin(wzPackageId, cCachePayloads, dw64PackageCacheSize);
+ }
+
+
+ virtual STDMETHODIMP_(int) OnCacheAcquireProgress(
+ __in_z LPCWSTR wzPackageOrContainerId,
+ __in_z_opt LPCWSTR wzPayloadId,
+ __in DWORD64 dw64Progress,
+ __in DWORD64 dw64Total,
+ __in DWORD dwOverallPercentage
+ ) {
+ WCHAR wzProgress[5] = { };
+
+#ifdef DEBUG
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "PYBA: OnCacheAcquireProgress() - container/package: %ls, payload: %ls, progress: %I64u, total: %I64u, overall progress: %u%%", wzPackageOrContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage);
+#endif
+
+ ::StringCchPrintfW(wzProgress, countof(wzProgress), L"%u%%", dwOverallPercentage);
+ ThemeSetTextControl(_theme, ID_CACHE_PROGRESS_TEXT, wzProgress);
+
+ ThemeSetProgressControl(_theme, ID_CACHE_PROGRESS_BAR, dwOverallPercentage);
+
+ _calculatedCacheProgress = dwOverallPercentage * PYBA_ACQUIRE_PERCENTAGE / 100;
+ ThemeSetProgressControl(_theme, ID_OVERALL_CALCULATED_PROGRESS_BAR, _calculatedCacheProgress + _calculatedExecuteProgress);
+
+ SetTaskbarButtonProgress(_calculatedCacheProgress + _calculatedExecuteProgress);
+
+ return __super::OnCacheAcquireProgress(wzPackageOrContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage);
+ }
+
+
+ virtual STDMETHODIMP_(int) OnCacheAcquireComplete(
+ __in_z LPCWSTR wzPackageOrContainerId,
+ __in_z_opt LPCWSTR wzPayloadId,
+ __in HRESULT hrStatus,
+ __in int nRecommendation
+ ) {
+ SetProgressState(hrStatus);
+ return __super::OnCacheAcquireComplete(wzPackageOrContainerId, wzPayloadId, hrStatus, nRecommendation);
+ }
+
+
+ virtual STDMETHODIMP_(int) OnCacheVerifyComplete(
+ __in_z LPCWSTR wzPackageId,
+ __in_z LPCWSTR wzPayloadId,
+ __in HRESULT hrStatus,
+ __in int nRecommendation
+ ) {
+ SetProgressState(hrStatus);
+ return __super::OnCacheVerifyComplete(wzPackageId, wzPayloadId, hrStatus, nRecommendation);
+ }
+
+
+ virtual STDMETHODIMP_(void) OnCacheComplete(__in HRESULT /*hrStatus*/) {
+ ThemeSetTextControl(_theme, ID_CACHE_PROGRESS_PACKAGE_TEXT, L"");
+ SetState(PYBA_STATE_CACHED, S_OK); // we always return success here and let OnApplyComplete() deal with the error.
+ }
+
+
+ virtual STDMETHODIMP_(int) OnError(
+ __in BOOTSTRAPPER_ERROR_TYPE errorType,
+ __in LPCWSTR wzPackageId,
+ __in DWORD dwCode,
+ __in_z LPCWSTR wzError,
+ __in DWORD dwUIHint,
+ __in DWORD /*cData*/,
+ __in_ecount_z_opt(cData) LPCWSTR* /*rgwzData*/,
+ __in int nRecommendation
+ ) {
+ int nResult = nRecommendation;
+ LPWSTR sczError = nullptr;
+
+ if (BOOTSTRAPPER_DISPLAY_EMBEDDED == _command.display) {
+ HRESULT hr = _engine->SendEmbeddedError(dwCode, wzError, dwUIHint, &nResult);
+ if (FAILED(hr)) {
+ nResult = IDERROR;
+ }
+ } else if (BOOTSTRAPPER_DISPLAY_FULL == _command.display) {
+ // If this is an authentication failure, let the engine try to handle it for us.
+ if (BOOTSTRAPPER_ERROR_TYPE_HTTP_AUTH_SERVER == errorType || BOOTSTRAPPER_ERROR_TYPE_HTTP_AUTH_PROXY == errorType) {
+ nResult = IDTRYAGAIN;
+ } else // show a generic error message box.
+ {
+ BalRetryErrorOccurred(wzPackageId, dwCode);
+
+ if (!_showingInternalUIThisPackage) {
+ // If no error message was provided, use the error code to try and get an error message.
+ if (!wzError || !*wzError || BOOTSTRAPPER_ERROR_TYPE_WINDOWS_INSTALLER != errorType) {
+ HRESULT hr = StrAllocFromError(&sczError, dwCode, nullptr);
+ if (FAILED(hr) || !sczError || !*sczError) {
+ StrAllocFormatted(&sczError, L"0x%x", dwCode);
+ }
+ }
+
+ nResult = ::MessageBoxW(_hWnd, sczError ? sczError : wzError, _theme->sczCaption, dwUIHint);
+ }
+ }
+
+ SetProgressState(HRESULT_FROM_WIN32(dwCode));
+ } else {
+ // just take note of the error code and let things continue.
+ BalRetryErrorOccurred(wzPackageId, dwCode);
+ }
+
+ ReleaseStr(sczError);
+ return nResult;
+ }
+
+
+ virtual STDMETHODIMP_(int) OnExecuteMsiMessage(
+ __in_z LPCWSTR wzPackageId,
+ __in INSTALLMESSAGE mt,
+ __in UINT uiFlags,
+ __in_z LPCWSTR wzMessage,
+ __in DWORD cData,
+ __in_ecount_z_opt(cData) LPCWSTR* rgwzData,
+ __in int nRecommendation
+ ) {
+#ifdef DEBUG
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "PYBA: OnExecuteMsiMessage() - package: %ls, message: %ls", wzPackageId, wzMessage);
+#endif
+ if (BOOTSTRAPPER_DISPLAY_FULL == _command.display && (INSTALLMESSAGE_WARNING == mt || INSTALLMESSAGE_USER == mt)) {
+ int nResult = ::MessageBoxW(_hWnd, wzMessage, _theme->sczCaption, uiFlags);
+ return nResult;
+ }
+
+ if (INSTALLMESSAGE_ACTIONSTART == mt) {
+ ThemeSetTextControl(_theme, ID_EXECUTE_PROGRESS_ACTIONDATA_TEXT, wzMessage);
+ }
+
+ return __super::OnExecuteMsiMessage(wzPackageId, mt, uiFlags, wzMessage, cData, rgwzData, nRecommendation);
+ }
+
+
+ virtual STDMETHODIMP_(int) OnProgress(__in DWORD dwProgressPercentage, __in DWORD dwOverallProgressPercentage) {
+ WCHAR wzProgress[5] = { };
+
+#ifdef DEBUG
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "PYBA: OnProgress() - progress: %u%%, overall progress: %u%%", dwProgressPercentage, dwOverallProgressPercentage);
+#endif
+
+ ::StringCchPrintfW(wzProgress, countof(wzProgress), L"%u%%", dwOverallProgressPercentage);
+ ThemeSetTextControl(_theme, ID_OVERALL_PROGRESS_TEXT, wzProgress);
+
+ ThemeSetProgressControl(_theme, ID_OVERALL_PROGRESS_BAR, dwOverallProgressPercentage);
+ SetTaskbarButtonProgress(dwOverallProgressPercentage);
+
+ return __super::OnProgress(dwProgressPercentage, dwOverallProgressPercentage);
+ }
+
+
+ virtual STDMETHODIMP_(int) OnExecutePackageBegin(__in_z LPCWSTR wzPackageId, __in BOOL fExecute) {
+ LPWSTR sczFormattedString = nullptr;
+
+ _startedExecution = TRUE;
+
+ if (wzPackageId && *wzPackageId) {
+ BAL_INFO_PACKAGE* pPackage = nullptr;
+ BalInfoFindPackageById(&_bundle.packages, wzPackageId, &pPackage);
+
+ LPCWSTR wz = wzPackageId;
+ if (pPackage) {
+ LOC_STRING* pLocString = nullptr;
+
+ switch (pPackage->type) {
+ case BAL_INFO_PACKAGE_TYPE_BUNDLE_ADDON:
+ LocGetString(_wixLoc, L"#(loc.ExecuteAddonRelatedBundleMessage)", &pLocString);
+ break;
+
+ case BAL_INFO_PACKAGE_TYPE_BUNDLE_PATCH:
+ LocGetString(_wixLoc, L"#(loc.ExecutePatchRelatedBundleMessage)", &pLocString);
+ break;
+
+ case BAL_INFO_PACKAGE_TYPE_BUNDLE_UPGRADE:
+ LocGetString(_wixLoc, L"#(loc.ExecuteUpgradeRelatedBundleMessage)", &pLocString);
+ break;
+ }
+
+ if (pLocString) {
+ // If the wix developer is showing a hidden variable in the UI, then obviously they don't care about keeping it safe
+ // so don't go down the rabbit hole of making sure that this is securely freed.
+ BalFormatString(pLocString->wzText, &sczFormattedString);
+ }
+
+ wz = sczFormattedString ? sczFormattedString : pPackage->sczDisplayName ? pPackage->sczDisplayName : wzPackageId;
+ }
+
+ _showingInternalUIThisPackage = pPackage && pPackage->fDisplayInternalUI;
+
+ ThemeSetTextControl(_theme, ID_EXECUTE_PROGRESS_PACKAGE_TEXT, wz);
+ ThemeSetTextControl(_theme, ID_OVERALL_PROGRESS_PACKAGE_TEXT, wz);
+ } else {
+ _showingInternalUIThisPackage = FALSE;
+ }
+
+ ReleaseStr(sczFormattedString);
+ return __super::OnExecutePackageBegin(wzPackageId, fExecute);
+ }
+
+
+ virtual int __stdcall OnExecuteProgress(
+ __in_z LPCWSTR wzPackageId,
+ __in DWORD dwProgressPercentage,
+ __in DWORD dwOverallProgressPercentage
+ ) {
+ WCHAR wzProgress[8] = { };
+
+#ifdef DEBUG
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "PYBA: OnExecuteProgress() - package: %ls, progress: %u%%, overall progress: %u%%", wzPackageId, dwProgressPercentage, dwOverallProgressPercentage);
+#endif
+
+ ::StringCchPrintfW(wzProgress, countof(wzProgress), L"%u%%", dwOverallProgressPercentage);
+ ThemeSetTextControl(_theme, ID_EXECUTE_PROGRESS_TEXT, wzProgress);
+
+ ThemeSetProgressControl(_theme, ID_EXECUTE_PROGRESS_BAR, dwOverallProgressPercentage);
+
+ _calculatedExecuteProgress = dwOverallProgressPercentage * (100 - PYBA_ACQUIRE_PERCENTAGE) / 100;
+ ThemeSetProgressControl(_theme, ID_OVERALL_CALCULATED_PROGRESS_BAR, _calculatedCacheProgress + _calculatedExecuteProgress);
+
+ SetTaskbarButtonProgress(_calculatedCacheProgress + _calculatedExecuteProgress);
+
+ return __super::OnExecuteProgress(wzPackageId, dwProgressPercentage, dwOverallProgressPercentage);
+ }
+
+
+ virtual STDMETHODIMP_(int) OnExecutePackageComplete(
+ __in_z LPCWSTR wzPackageId,
+ __in HRESULT hrExitCode,
+ __in BOOTSTRAPPER_APPLY_RESTART restart,
+ __in int nRecommendation
+ ) {
+ SetProgressState(hrExitCode);
+
+ if (_wcsnicmp(wzPackageId, L"path_", 5) == 0 && SUCCEEDED(hrExitCode)) {
+ SendMessageTimeoutW(
+ HWND_BROADCAST,
+ WM_SETTINGCHANGE,
+ 0,
+ reinterpret_cast<LPARAM>(L"Environment"),
+ SMTO_ABORTIFHUNG,
+ 1000,
+ nullptr
+ );
+ }
+
+ int nResult = __super::OnExecutePackageComplete(wzPackageId, hrExitCode, restart, nRecommendation);
+
+ return nResult;
+ }
+
+
+ virtual STDMETHODIMP_(void) OnExecuteComplete(__in HRESULT hrStatus) {
+ ThemeSetTextControl(_theme, ID_EXECUTE_PROGRESS_PACKAGE_TEXT, L"");
+ ThemeSetTextControl(_theme, ID_EXECUTE_PROGRESS_ACTIONDATA_TEXT, L"");
+ ThemeSetTextControl(_theme, ID_OVERALL_PROGRESS_PACKAGE_TEXT, L"");
+ ThemeControlEnable(_theme, ID_PROGRESS_CANCEL_BUTTON, FALSE); // no more cancel.
+
+ SetState(PYBA_STATE_EXECUTED, S_OK); // we always return success here and let OnApplyComplete() deal with the error.
+ SetProgressState(hrStatus);
+ }
+
+
+ virtual STDMETHODIMP_(int) OnResolveSource(
+ __in_z LPCWSTR wzPackageOrContainerId,
+ __in_z_opt LPCWSTR wzPayloadId,
+ __in_z LPCWSTR wzLocalSource,
+ __in_z_opt LPCWSTR wzDownloadSource
+ ) {
+ int nResult = IDERROR; // assume we won't resolve source and that is unexpected.
+
+ if (BOOTSTRAPPER_DISPLAY_FULL == _command.display) {
+ if (wzDownloadSource) {
+ nResult = IDDOWNLOAD;
+ } else {
+ // prompt to change the source location.
+ OPENFILENAMEW ofn = { };
+ WCHAR wzFile[MAX_PATH] = { };
+
+ ::StringCchCopyW(wzFile, countof(wzFile), wzLocalSource);
+
+ ofn.lStructSize = sizeof(ofn);
+ ofn.hwndOwner = _hWnd;
+ ofn.lpstrFile = wzFile;
+ ofn.nMaxFile = countof(wzFile);
+ ofn.lpstrFilter = L"All Files\0*.*\0";
+ ofn.nFilterIndex = 1;
+ ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST;
+ ofn.lpstrTitle = _theme->sczCaption;
+
+ if (::GetOpenFileNameW(&ofn)) {
+ HRESULT hr = _engine->SetLocalSource(wzPackageOrContainerId, wzPayloadId, ofn.lpstrFile);
+ nResult = SUCCEEDED(hr) ? IDRETRY : IDERROR;
+ } else {
+ nResult = IDCANCEL;
+ }
+ }
+ } else if (wzDownloadSource) {
+ // If doing a non-interactive install and download source is available, let's try downloading the package silently
+ nResult = IDDOWNLOAD;
+ }
+ // else there's nothing more we can do in non-interactive mode
+
+ return CheckCanceled() ? IDCANCEL : nResult;
+ }
+
+
+ virtual STDMETHODIMP_(int) OnApplyComplete(__in HRESULT hrStatus, __in BOOTSTRAPPER_APPLY_RESTART restart) {
+ _restartResult = restart; // remember the restart result so we return the correct error code no matter what the user chooses to do in the UI.
+
+ // If a restart was encountered and we are not suppressing restarts, then restart is required.
+ _restartRequired = (BOOTSTRAPPER_APPLY_RESTART_NONE != restart && BOOTSTRAPPER_RESTART_NEVER < _command.restart);
+ // If a restart is required and we're not displaying a UI or we are not supposed to prompt for restart then allow the restart.
+ _allowRestart = _restartRequired && (BOOTSTRAPPER_DISPLAY_FULL > _command.display || BOOTSTRAPPER_RESTART_PROMPT < _command.restart);
+
+ // If we are showing UI, wait a beat before moving to the final screen.
+ if (BOOTSTRAPPER_DISPLAY_NONE < _command.display) {
+ ::Sleep(250);
+ }
+
+ SetState(PYBA_STATE_APPLIED, hrStatus);
+ SetTaskbarButtonProgress(100); // show full progress bar, green, yellow, or red
+
+ return IDNOACTION;
+ }
+
+ virtual STDMETHODIMP_(void) OnLaunchApprovedExeComplete(__in HRESULT hrStatus, __in DWORD /*processId*/) {
+ if (HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED) == hrStatus) {
+ //try with ShelExec next time
+ OnClickLaunchButton();
+ } else {
+ ::PostMessageW(_hWnd, WM_CLOSE, 0, 0);
+ }
+ }
+
+
+private:
+ //
+ // UiThreadProc - entrypoint for UI thread.
+ //
+ static DWORD WINAPI UiThreadProc(__in LPVOID pvContext) {
+ HRESULT hr = S_OK;
+ PythonBootstrapperApplication* pThis = (PythonBootstrapperApplication*)pvContext;
+ BOOL comInitialized = FALSE;
+ BOOL ret = FALSE;
+ MSG msg = { };
+
+ // Initialize COM and theme.
+ hr = ::CoInitialize(nullptr);
+ BalExitOnFailure(hr, "Failed to initialize COM.");
+ comInitialized = TRUE;
+
+ hr = ThemeInitialize(pThis->_hModule);
+ BalExitOnFailure(hr, "Failed to initialize theme manager.");
+
+ hr = pThis->InitializeData();
+ BalExitOnFailure(hr, "Failed to initialize data in bootstrapper application.");
+
+ // Create main window.
+ pThis->InitializeTaskbarButton();
+ hr = pThis->CreateMainWindow();
+ BalExitOnFailure(hr, "Failed to create main window.");
+
+ pThis->ValidateOperatingSystem();
+
+ if (FAILED(pThis->_hrFinal)) {
+ pThis->SetState(PYBA_STATE_FAILED, hr);
+ ::PostMessageW(pThis->_hWnd, WM_PYBA_SHOW_FAILURE, 0, 0);
+ } else {
+ // Okay, we're ready for packages now.
+ pThis->SetState(PYBA_STATE_INITIALIZED, hr);
+ ::PostMessageW(pThis->_hWnd, BOOTSTRAPPER_ACTION_HELP == pThis->_command.action ? WM_PYBA_SHOW_HELP : WM_PYBA_DETECT_PACKAGES, 0, 0);
+ }
+
+ // message pump
+ while (0 != (ret = ::GetMessageW(&msg, nullptr, 0, 0))) {
+ if (-1 == ret) {
+ hr = E_UNEXPECTED;
+ BalExitOnFailure(hr, "Unexpected return value from message pump.");
+ } else if (!ThemeHandleKeyboardMessage(pThis->_theme, msg.hwnd, &msg)) {
+ ::TranslateMessage(&msg);
+ ::DispatchMessageW(&msg);
+ }
+ }
+
+ // Succeeded thus far, check to see if anything went wrong while actually
+ // executing changes.
+ if (FAILED(pThis->_hrFinal)) {
+ hr = pThis->_hrFinal;
+ } else if (pThis->CheckCanceled()) {
+ hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
+ }
+
+ LExit:
+ // destroy main window
+ pThis->DestroyMainWindow();
+
+ // initiate engine shutdown
+ DWORD dwQuit = HRESULT_CODE(hr);
+ if (BOOTSTRAPPER_APPLY_RESTART_INITIATED == pThis->_restartResult) {
+ dwQuit = ERROR_SUCCESS_REBOOT_INITIATED;
+ } else if (BOOTSTRAPPER_APPLY_RESTART_REQUIRED == pThis->_restartResult) {
+ dwQuit = ERROR_SUCCESS_REBOOT_REQUIRED;
+ }
+ pThis->_engine->Quit(dwQuit);
+
+ ReleaseTheme(pThis->_theme);
+ ThemeUninitialize();
+
+ // uninitialize COM
+ if (comInitialized) {
+ ::CoUninitialize();
+ }
+
+ return hr;
+ }
+
+ //
+ // ParseVariablesFromUnattendXml - reads options from unattend.xml if it
+ // exists
+ //
+ HRESULT ParseVariablesFromUnattendXml() {
+ HRESULT hr = S_OK;
+ LPWSTR sczUnattendXmlPath = nullptr;
+ IXMLDOMDocument *pixdUnattend = nullptr;
+ IXMLDOMNodeList *pNodes = nullptr;
+ IXMLDOMNode *pNode = nullptr;
+ long cNodes;
+ DWORD dwAttr;
+ LPWSTR scz = nullptr;
+ BOOL bValue;
+ int iValue;
+ BOOL tryConvert;
+ BSTR bstrValue = nullptr;
+
+ hr = BalFormatString(L"[WixBundleOriginalSourceFolder]unattend.xml", &sczUnattendXmlPath);
+ BalExitOnFailure(hr, "Failed to calculate path to unattend.xml");
+
+ if (!FileExistsEx(sczUnattendXmlPath, &dwAttr)) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_VERBOSE, "Did not find %ls", sczUnattendXmlPath);
+ hr = S_FALSE;
+ goto LExit;
+ }
+
+ hr = XmlLoadDocumentFromFile(sczUnattendXmlPath, &pixdUnattend);
+ BalExitOnFailure1(hr, "Failed to read %ls", sczUnattendXmlPath);
+
+ // get the list of variables users have overridden
+ hr = XmlSelectNodes(pixdUnattend, L"/Options/Option", &pNodes);
+ if (S_FALSE == hr) {
+ ExitFunction1(hr = S_OK);
+ }
+ BalExitOnFailure(hr, "Failed to select option nodes.");
+
+ hr = pNodes->get_length((long*)&cNodes);
+ BalExitOnFailure(hr, "Failed to get option node count.");
+
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Reading settings from %ls", sczUnattendXmlPath);
+
+ for (DWORD i = 0; i < cNodes; ++i) {
+ hr = XmlNextElement(pNodes, &pNode, nullptr);
+ BalExitOnFailure(hr, "Failed to get next node.");
+
+ // @Name
+ hr = XmlGetAttributeEx(pNode, L"Name", &scz);
+ BalExitOnFailure(hr, "Failed to get @Name.");
+
+ tryConvert = TRUE;
+ hr = XmlGetAttribute(pNode, L"Value", &bstrValue);
+ if (FAILED(hr) || !bstrValue || !*bstrValue) {
+ hr = XmlGetText(pNode, &bstrValue);
+ tryConvert = FALSE;
+ }
+ BalExitOnFailure(hr, "Failed to get @Value.");
+
+ if (tryConvert &&
+ CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, bstrValue, -1, L"yes", -1)) {
+ _engine->SetVariableNumeric(scz, 1);
+ } else if (tryConvert &&
+ CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, bstrValue, -1, L"no", -1)) {
+ _engine->SetVariableNumeric(scz, 0);
+ } else if (tryConvert && ::StrToIntExW(bstrValue, STIF_DEFAULT, &iValue)) {
+ _engine->SetVariableNumeric(scz, iValue);
+ } else {
+ _engine->SetVariableString(scz, bstrValue);
+ }
+
+ ReleaseNullBSTR(bstrValue);
+ ReleaseNullStr(scz);
+ ReleaseNullObject(pNode);
+ }
+
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Finished reading from %ls", sczUnattendXmlPath);
+
+ LExit:
+ ReleaseObject(pNode);
+ ReleaseObject(pNodes);
+ ReleaseObject(pixdUnattend);
+ ReleaseStr(sczUnattendXmlPath);
+
+ return hr;
+ }
+
+
+ //
+ // InitializeData - initializes all the package information.
+ //
+ HRESULT InitializeData() {
+ HRESULT hr = S_OK;
+ LPWSTR sczModulePath = nullptr;
+ IXMLDOMDocument *pixdManifest = nullptr;
+
+ hr = BalManifestLoad(_hModule, &pixdManifest);
+ BalExitOnFailure(hr, "Failed to load bootstrapper application manifest.");
+
+ hr = ParseOverridableVariablesFromXml(pixdManifest);
+ BalExitOnFailure(hr, "Failed to read overridable variables.");
+
+ hr = ParseVariablesFromUnattendXml();
+ ExitOnFailure(hr, "Failed to read unattend.ini file.");
+
+ hr = ProcessCommandLine(&_language);
+ ExitOnFailure(hr, "Unknown commandline parameters.");
+
+ hr = PathRelativeToModule(&sczModulePath, nullptr, _hModule);
+ BalExitOnFailure(hr, "Failed to get module path.");
+
+ hr = LoadLocalization(sczModulePath, _language);
+ ExitOnFailure(hr, "Failed to load localization.");
+
+ hr = LoadTheme(sczModulePath, _language);
+ ExitOnFailure(hr, "Failed to load theme.");
+
+ hr = BalInfoParseFromXml(&_bundle, pixdManifest);
+ BalExitOnFailure(hr, "Failed to load bundle information.");
+
+ hr = BalConditionsParseFromXml(&_conditions, pixdManifest, _wixLoc);
+ BalExitOnFailure(hr, "Failed to load conditions from XML.");
+
+ hr = LoadBootstrapperBAFunctions();
+ BalExitOnFailure(hr, "Failed to load bootstrapper functions.");
+
+ hr = UpdateUIStrings(_command.action);
+ BalExitOnFailure(hr, "Failed to load UI strings.");
+
+ if (_command.action == BOOTSTRAPPER_ACTION_MODIFY) {
+ LoadOptionalFeatureStates(_engine);
+ }
+
+ GetBundleFileVersion();
+ // don't fail if we couldn't get the version info; best-effort only
+ LExit:
+ ReleaseObject(pixdManifest);
+ ReleaseStr(sczModulePath);
+
+ return hr;
+ }
+
+
+ //
+ // ProcessCommandLine - process the provided command line arguments.
+ //
+ HRESULT ProcessCommandLine(__inout LPWSTR* psczLanguage) {
+ HRESULT hr = S_OK;
+ int argc = 0;
+ LPWSTR* argv = nullptr;
+ LPWSTR sczVariableName = nullptr;
+ LPWSTR sczVariableValue = nullptr;
+
+ if (_command.wzCommandLine && *_command.wzCommandLine) {
+ argv = ::CommandLineToArgvW(_command.wzCommandLine, &argc);
+ ExitOnNullWithLastError(argv, hr, "Failed to get command line.");
+
+ for (int i = 0; i < argc; ++i) {
+ if (argv[i][0] == L'-' || argv[i][0] == L'/') {
+ if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], -1, L"lang", -1)) {
+ if (i + 1 >= argc) {
+ hr = E_INVALIDARG;
+ BalExitOnFailure(hr, "Must specify a language.");
+ }
+
+ ++i;
+
+ hr = StrAllocString(psczLanguage, &argv[i][0], 0);
+ BalExitOnFailure(hr, "Failed to copy language.");
+ } else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], -1, L"simple", -1)) {
+ _engine->SetVariableNumeric(L"SimpleInstall", 1);
+ }
+ } else if (_overridableVariables) {
+ int value;
+ const wchar_t* pwc = wcschr(argv[i], L'=');
+ if (pwc) {
+ hr = StrAllocString(&sczVariableName, argv[i], pwc - argv[i]);
+ BalExitOnFailure(hr, "Failed to copy variable name.");
+
+ hr = DictKeyExists(_overridableVariables, sczVariableName);
+ if (E_NOTFOUND == hr) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Ignoring attempt to set non-overridable variable: '%ls'.", sczVariableName);
+ hr = S_OK;
+ continue;
+ }
+ ExitOnFailure(hr, "Failed to check the dictionary of overridable variables.");
+
+ hr = StrAllocString(&sczVariableValue, ++pwc, 0);
+ BalExitOnFailure(hr, "Failed to copy variable value.");
+
+ if (::StrToIntEx(sczVariableValue, STIF_DEFAULT, &value)) {
+ hr = _engine->SetVariableNumeric(sczVariableName, value);
+ } else {
+ hr = _engine->SetVariableString(sczVariableName, sczVariableValue);
+ }
+ BalExitOnFailure(hr, "Failed to set variable.");
+ } else {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Ignoring unknown argument: %ls", argv[i]);
+ }
+ }
+ }
+ }
+
+ LExit:
+ if (argv) {
+ ::LocalFree(argv);
+ }
+
+ ReleaseStr(sczVariableName);
+ ReleaseStr(sczVariableValue);
+
+ return hr;
+ }
+
+ HRESULT LoadLocalization(__in_z LPCWSTR wzModulePath, __in_z_opt LPCWSTR wzLanguage) {
+ HRESULT hr = S_OK;
+ LPWSTR sczLocPath = nullptr;
+ LPCWSTR wzLocFileName = L"Default.wxl";
+
+ hr = LocProbeForFile(wzModulePath, wzLocFileName, wzLanguage, &sczLocPath);
+ BalExitOnFailure2(hr, "Failed to probe for loc file: %ls in path: %ls", wzLocFileName, wzModulePath);
+
+ hr = LocLoadFromFile(sczLocPath, &_wixLoc);
+ BalExitOnFailure1(hr, "Failed to load loc file from path: %ls", sczLocPath);
+
+ if (WIX_LOCALIZATION_LANGUAGE_NOT_SET != _wixLoc->dwLangId) {
+ ::SetThreadLocale(_wixLoc->dwLangId);
+ }
+
+ hr = StrAllocString(&_confirmCloseMessage, L"#(loc.ConfirmCancelMessage)", 0);
+ ExitOnFailure(hr, "Failed to initialize confirm message loc identifier.");
+
+ hr = LocLocalizeString(_wixLoc, &_confirmCloseMessage);
+ BalExitOnFailure1(hr, "Failed to localize confirm close message: %ls", _confirmCloseMessage);
+
+ LExit:
+ ReleaseStr(sczLocPath);
+
+ return hr;
+ }
+
+
+ HRESULT LoadTheme(__in_z LPCWSTR wzModulePath, __in_z_opt LPCWSTR wzLanguage) {
+ HRESULT hr = S_OK;
+ LPWSTR sczThemePath = nullptr;
+ LPCWSTR wzThemeFileName = L"Default.thm";
+ LPWSTR sczCaption = nullptr;
+
+ hr = LocProbeForFile(wzModulePath, wzThemeFileName, wzLanguage, &sczThemePath);
+ BalExitOnFailure2(hr, "Failed to probe for theme file: %ls in path: %ls", wzThemeFileName, wzModulePath);
+
+ hr = ThemeLoadFromFile(sczThemePath, &_theme);
+ BalExitOnFailure1(hr, "Failed to load theme from path: %ls", sczThemePath);
+
+ hr = ThemeLocalize(_theme, _wixLoc);
+ BalExitOnFailure1(hr, "Failed to localize theme: %ls", sczThemePath);
+
+ // Update the caption if there are any formatted strings in it.
+ // If the wix developer is showing a hidden variable in the UI, then
+ // obviously they don't care about keeping it safe so don't go down the
+ // rabbit hole of making sure that this is securely freed.
+ hr = BalFormatString(_theme->sczCaption, &sczCaption);
+ if (SUCCEEDED(hr)) {
+ ThemeUpdateCaption(_theme, sczCaption);
+ }
+
+ LExit:
+ ReleaseStr(sczCaption);
+ ReleaseStr(sczThemePath);
+
+ return hr;
+ }
+
+
+ HRESULT ParseOverridableVariablesFromXml(__in IXMLDOMDocument* pixdManifest) {
+ HRESULT hr = S_OK;
+ IXMLDOMNode* pNode = nullptr;
+ IXMLDOMNodeList* pNodes = nullptr;
+ DWORD cNodes = 0;
+ LPWSTR scz = nullptr;
+ BOOL hidden = FALSE;
+
+ // get the list of variables users can override on the command line
+ hr = XmlSelectNodes(pixdManifest, L"/BootstrapperApplicationData/WixStdbaOverridableVariable", &pNodes);
+ if (S_FALSE == hr) {
+ ExitFunction1(hr = S_OK);
+ }
+ ExitOnFailure(hr, "Failed to select overridable variable nodes.");
+
+ hr = pNodes->get_length((long*)&cNodes);
+ ExitOnFailure(hr, "Failed to get overridable variable node count.");
+
+ if (cNodes) {
+ hr = DictCreateStringList(&_overridableVariables, 32, DICT_FLAG_NONE);
+ ExitOnFailure(hr, "Failed to create the string dictionary.");
+
+ for (DWORD i = 0; i < cNodes; ++i) {
+ hr = XmlNextElement(pNodes, &pNode, nullptr);
+ ExitOnFailure(hr, "Failed to get next node.");
+
+ // @Name
+ hr = XmlGetAttributeEx(pNode, L"Name", &scz);
+ ExitOnFailure(hr, "Failed to get @Name.");
+
+ hr = XmlGetYesNoAttribute(pNode, L"Hidden", &hidden);
+
+ if (!hidden) {
+ hr = DictAddKey(_overridableVariables, scz);
+ ExitOnFailure1(hr, "Failed to add \"%ls\" to the string dictionary.", scz);
+ }
+
+ // prepare next iteration
+ ReleaseNullObject(pNode);
+ }
+ }
+
+ LExit:
+ ReleaseObject(pNode);
+ ReleaseObject(pNodes);
+ ReleaseStr(scz);
+ return hr;
+ }
+
+
+ //
+ // Get the file version of the bootstrapper and record in bootstrapper log file
+ //
+ HRESULT GetBundleFileVersion() {
+ HRESULT hr = S_OK;
+ ULARGE_INTEGER uliVersion = { };
+ LPWSTR sczCurrentPath = nullptr;
+
+ hr = PathForCurrentProcess(&sczCurrentPath, nullptr);
+ BalExitOnFailure(hr, "Failed to get bundle path.");
+
+ hr = FileVersion(sczCurrentPath, &uliVersion.HighPart, &uliVersion.LowPart);
+ BalExitOnFailure(hr, "Failed to get bundle file version.");
+
+ hr = _engine->SetVariableVersion(PYBA_VARIABLE_BUNDLE_FILE_VERSION, uliVersion.QuadPart);
+ BalExitOnFailure(hr, "Failed to set WixBundleFileVersion variable.");
+
+ LExit:
+ ReleaseStr(sczCurrentPath);
+
+ return hr;
+ }
+
+
+ //
+ // CreateMainWindow - creates the main install window.
+ //
+ HRESULT CreateMainWindow() {
+ HRESULT hr = S_OK;
+ HICON hIcon = reinterpret_cast<HICON>(_theme->hIcon);
+ WNDCLASSW wc = { };
+ DWORD dwWindowStyle = 0;
+ int x = CW_USEDEFAULT;
+ int y = CW_USEDEFAULT;
+ POINT ptCursor = { };
+ HMONITOR hMonitor = nullptr;
+ MONITORINFO mi = { };
+ COLORREF fg, bg;
+ HBRUSH bgBrush;
+
+ // If the theme did not provide an icon, try using the icon from the bundle engine.
+ if (!hIcon) {
+ HMODULE hBootstrapperEngine = ::GetModuleHandleW(nullptr);
+ if (hBootstrapperEngine) {
+ hIcon = ::LoadIconW(hBootstrapperEngine, MAKEINTRESOURCEW(1));
+ }
+ }
+
+ fg = RGB(0, 0, 0);
+ bg = RGB(255, 255, 255);
+ bgBrush = (HBRUSH)(COLOR_WINDOW+1);
+ if (_theme->dwFontId < _theme->cFonts) {
+ THEME_FONT *font = &_theme->rgFonts[_theme->dwFontId];
+ fg = font->crForeground;
+ bg = font->crBackground;
+ bgBrush = font->hBackground;
+ RemapColor(&fg, &bg, &bgBrush);
+ }
+
+ // Register the window class and create the window.
+ wc.lpfnWndProc = PythonBootstrapperApplication::WndProc;
+ wc.hInstance = _hModule;
+ wc.hIcon = hIcon;
+ wc.hCursor = ::LoadCursorW(nullptr, (LPCWSTR)IDC_ARROW);
+ wc.hbrBackground = bgBrush;
+ wc.lpszMenuName = nullptr;
+ wc.lpszClassName = PYBA_WINDOW_CLASS;
+ if (!::RegisterClassW(&wc)) {
+ ExitWithLastError(hr, "Failed to register window.");
+ }
+
+ _registered = TRUE;
+
+ // Calculate the window style based on the theme style and command display value.
+ dwWindowStyle = _theme->dwStyle;
+ if (BOOTSTRAPPER_DISPLAY_NONE >= _command.display) {
+ dwWindowStyle &= ~WS_VISIBLE;
+ }
+
+ // Don't show the window if there is a splash screen (it will be made visible when the splash screen is hidden)
+ if (::IsWindow(_command.hwndSplashScreen)) {
+ dwWindowStyle &= ~WS_VISIBLE;
+ }
+
+ // Center the window on the monitor with the mouse.
+ if (::GetCursorPos(&ptCursor)) {
+ hMonitor = ::MonitorFromPoint(ptCursor, MONITOR_DEFAULTTONEAREST);
+ if (hMonitor) {
+ mi.cbSize = sizeof(mi);
+ if (::GetMonitorInfoW(hMonitor, &mi)) {
+ x = mi.rcWork.left + (mi.rcWork.right - mi.rcWork.left - _theme->nWidth) / 2;
+ y = mi.rcWork.top + (mi.rcWork.bottom - mi.rcWork.top - _theme->nHeight) / 2;
+ }
+ }
+ }
+
+ _hWnd = ::CreateWindowExW(
+ 0,
+ wc.lpszClassName,
+ _theme->sczCaption,
+ dwWindowStyle,
+ x,
+ y,
+ _theme->nWidth,
+ _theme->nHeight,
+ HWND_DESKTOP,
+ nullptr,
+ _hModule,
+ this
+ );
+ ExitOnNullWithLastError(_hWnd, hr, "Failed to create window.");
+
+ hr = S_OK;
+
+ LExit:
+ return hr;
+ }
+
+
+ //
+ // InitializeTaskbarButton - initializes taskbar button for progress.
+ //
+ void InitializeTaskbarButton() {
+ HRESULT hr = S_OK;
+
+ hr = ::CoCreateInstance(CLSID_TaskbarList, nullptr, CLSCTX_ALL, __uuidof(ITaskbarList3), reinterpret_cast<LPVOID*>(&_taskbarList));
+ if (REGDB_E_CLASSNOTREG == hr) {
+ // not supported before Windows 7
+ ExitFunction1(hr = S_OK);
+ }
+ BalExitOnFailure(hr, "Failed to create ITaskbarList3. Continuing.");
+
+ _taskbarButtonCreatedMessage = ::RegisterWindowMessageW(L"TaskbarButtonCreated");
+ BalExitOnNullWithLastError(_taskbarButtonCreatedMessage, hr, "Failed to get TaskbarButtonCreated message. Continuing.");
+
+ LExit:
+ return;
+ }
+
+ //
+ // DestroyMainWindow - clean up all the window registration.
+ //
+ void DestroyMainWindow() {
+ if (::IsWindow(_hWnd)) {
+ ::DestroyWindow(_hWnd);
+ _hWnd = nullptr;
+ _taskbarButtonOK = FALSE;
+ }
+
+ if (_registered) {
+ ::UnregisterClassW(PYBA_WINDOW_CLASS, _hModule);
+ _registered = FALSE;
+ }
+ }
+
+
+ //
+ // WndProc - standard windows message handler.
+ //
+ static LRESULT CALLBACK WndProc(
+ __in HWND hWnd,
+ __in UINT uMsg,
+ __in WPARAM wParam,
+ __in LPARAM lParam
+ ) {
+#pragma warning(suppress:4312)
+ auto pBA = reinterpret_cast<PythonBootstrapperApplication*>(::GetWindowLongPtrW(hWnd, GWLP_USERDATA));
+
+ switch (uMsg) {
+ case WM_NCCREATE: {
+ LPCREATESTRUCT lpcs = reinterpret_cast<LPCREATESTRUCT>(lParam);
+ pBA = reinterpret_cast<PythonBootstrapperApplication*>(lpcs->lpCreateParams);
+#pragma warning(suppress:4244)
+ ::SetWindowLongPtrW(hWnd, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(pBA));
+ break;
+ }
+
+ case WM_NCDESTROY: {
+ LRESULT lres = ThemeDefWindowProc(pBA ? pBA->_theme : nullptr, hWnd, uMsg, wParam, lParam);
+ ::SetWindowLongPtrW(hWnd, GWLP_USERDATA, 0);
+ return lres;
+ }
+
+ case WM_CREATE:
+ if (!pBA->OnCreate(hWnd)) {
+ return -1;
+ }
+ break;
+
+ case WM_QUERYENDSESSION:
+ return IDCANCEL != pBA->OnSystemShutdown(static_cast<DWORD>(lParam), IDCANCEL);
+
+ case WM_CLOSE:
+ // If the user chose not to close, do *not* let the default window proc handle the message.
+ if (!pBA->OnClose()) {
+ return 0;
+ }
+ break;
+
+ case WM_DESTROY:
+ ::PostQuitMessage(0);
+ break;
+
+ case WM_PAINT: __fallthrough;
+ case WM_ERASEBKGND:
+ if (pBA && pBA->_suppressPaint) {
+ return TRUE;
+ }
+ break;
+
+ case WM_PYBA_SHOW_HELP:
+ pBA->OnShowHelp();
+ return 0;
+
+ case WM_PYBA_DETECT_PACKAGES:
+ pBA->OnDetect();
+ return 0;
+
+ case WM_PYBA_PLAN_PACKAGES:
+ pBA->OnPlan(static_cast<BOOTSTRAPPER_ACTION>(lParam));
+ return 0;
+
+ case WM_PYBA_APPLY_PACKAGES:
+ pBA->OnApply();
+ return 0;
+
+ case WM_PYBA_CHANGE_STATE:
+ pBA->OnChangeState(static_cast<PYBA_STATE>(lParam));
+ return 0;
+
+ case WM_PYBA_SHOW_FAILURE:
+ pBA->OnShowFailure();
+ return 0;
+
+ case WM_COMMAND:
+ switch (LOWORD(wParam)) {
+ // Customize commands
+ // Success/failure commands
+ case ID_LAUNCH_BUTTON:
+ pBA->OnClickLaunchButton();
+ return 0;
+
+ case ID_SUCCESS_RESTART_BUTTON: __fallthrough;
+ case ID_FAILURE_RESTART_BUTTON:
+ pBA->OnClickRestartButton();
+ return 0;
+
+ case IDCANCEL: __fallthrough;
+ case ID_INSTALL_CANCEL_BUTTON: __fallthrough;
+ case ID_CUSTOM1_CANCEL_BUTTON: __fallthrough;
+ case ID_CUSTOM2_CANCEL_BUTTON: __fallthrough;
+ case ID_MODIFY_CANCEL_BUTTON: __fallthrough;
+ case ID_PROGRESS_CANCEL_BUTTON: __fallthrough;
+ case ID_SUCCESS_CANCEL_BUTTON: __fallthrough;
+ case ID_FAILURE_CANCEL_BUTTON: __fallthrough;
+ case ID_CLOSE_BUTTON:
+ pBA->OnCommand(ID_CLOSE_BUTTON);
+ return 0;
+
+ default:
+ pBA->OnCommand((CONTROL_ID)LOWORD(wParam));
+ }
+ break;
+
+ case WM_NOTIFY:
+ if (lParam) {
+ LPNMHDR pnmhdr = reinterpret_cast<LPNMHDR>(lParam);
+ switch (pnmhdr->code) {
+ case NM_CLICK: __fallthrough;
+ case NM_RETURN:
+ switch (static_cast<DWORD>(pnmhdr->idFrom)) {
+ case ID_FAILURE_LOGFILE_LINK:
+ pBA->OnClickLogFileLink();
+ return 1;
+ }
+ }
+ }
+ break;
+
+ case WM_CTLCOLORSTATIC:
+ case WM_CTLCOLORBTN:
+ if (pBA) {
+ HBRUSH brush = nullptr;
+ if (pBA->SetControlColor((HWND)lParam, (HDC)wParam, &brush)) {
+ return (LRESULT)brush;
+ }
+ }
+ break;
+ }
+
+ if (pBA && pBA->_taskbarList && uMsg == pBA->_taskbarButtonCreatedMessage) {
+ pBA->_taskbarButtonOK = TRUE;
+ return 0;
+ }
+
+ return ThemeDefWindowProc(pBA ? pBA->_theme : nullptr, hWnd, uMsg, wParam, lParam);
+ }
+
+ //
+ // OnCreate - finishes loading the theme.
+ //
+ BOOL OnCreate(__in HWND hWnd) {
+ HRESULT hr = S_OK;
+
+ hr = ThemeLoadControls(_theme, hWnd, CONTROL_ID_NAMES, countof(CONTROL_ID_NAMES));
+ BalExitOnFailure(hr, "Failed to load theme controls.");
+
+ C_ASSERT(COUNT_PAGE == countof(PAGE_NAMES));
+ C_ASSERT(countof(_pageIds) == countof(PAGE_NAMES));
+
+ ThemeGetPageIds(_theme, PAGE_NAMES, _pageIds, countof(_pageIds));
+
+ // Initialize the text on all "application" (non-page) controls.
+ for (DWORD i = 0; i < _theme->cControls; ++i) {
+ THEME_CONTROL* pControl = _theme->rgControls + i;
+ LPWSTR text = nullptr;
+
+ if (!pControl->wPageId && pControl->sczText && *pControl->sczText) {
+ HRESULT hrFormat;
+
+ // If the wix developer is showing a hidden variable in the UI,
+ // then obviously they don't care about keeping it safe so don't
+ // go down the rabbit hole of making sure that this is securely
+ // freed.
+ hrFormat = BalFormatString(pControl->sczText, &text);
+ if (SUCCEEDED(hrFormat)) {
+ ThemeSetTextControl(_theme, pControl->wId, text);
+ ReleaseStr(text);
+ }
+ }
+ }
+
+ LExit:
+ return SUCCEEDED(hr);
+ }
+
+ void RemapColor(COLORREF *fg, COLORREF *bg, HBRUSH *bgBrush) {
+ if (*fg == RGB(0, 0, 0)) {
+ *fg = GetSysColor(COLOR_WINDOWTEXT);
+ } else if (*fg == RGB(128, 128, 128)) {
+ *fg = GetSysColor(COLOR_GRAYTEXT);
+ }
+ if (*bgBrush && *bg == RGB(255, 255, 255)) {
+ *bg = GetSysColor(COLOR_WINDOW);
+ *bgBrush = GetSysColorBrush(COLOR_WINDOW);
+ }
+ }
+
+ BOOL SetControlColor(HWND hWnd, HDC hDC, HBRUSH *brush) {
+ for (int i = 0; i < _theme->cControls; ++i) {
+ if (_theme->rgControls[i].hWnd != hWnd) {
+ continue;
+ }
+
+ DWORD fontId = _theme->rgControls[i].dwFontId;
+ if (fontId > _theme->cFonts) {
+ fontId = 0;
+ }
+ THEME_FONT *fnt = &_theme->rgFonts[fontId];
+
+ COLORREF fg = fnt->crForeground, bg = fnt->crBackground;
+ *brush = fnt->hBackground;
+ RemapColor(&fg, &bg, brush);
+ ::SetTextColor(hDC, fg);
+ ::SetBkColor(hDC, bg);
+
+ return TRUE;
+ }
+ return FALSE;
+ }
+
+ //
+ // OnShowFailure - display the failure page.
+ //
+ void OnShowFailure() {
+ SetState(PYBA_STATE_FAILED, S_OK);
+
+ // If the UI should be visible, display it now and hide the splash screen
+ if (BOOTSTRAPPER_DISPLAY_NONE < _command.display) {
+ ::ShowWindow(_theme->hwndParent, SW_SHOW);
+ }
+
+ _engine->CloseSplashScreen();
+
+ return;
+ }
+
+
+ //
+ // OnShowHelp - display the help page.
+ //
+ void OnShowHelp() {
+ SetState(PYBA_STATE_HELP, S_OK);
+
+ // If the UI should be visible, display it now and hide the splash screen
+ if (BOOTSTRAPPER_DISPLAY_NONE < _command.display) {
+ ::ShowWindow(_theme->hwndParent, SW_SHOW);
+ }
+
+ _engine->CloseSplashScreen();
+
+ return;
+ }
+
+
+ //
+ // OnDetect - start the processing of packages.
+ //
+ void OnDetect() {
+ HRESULT hr = S_OK;
+
+ if (_baFunction) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Running detect BA function");
+ hr = _baFunction->OnDetect();
+ BalExitOnFailure(hr, "Failed calling detect BA function.");
+ }
+
+ SetState(PYBA_STATE_DETECTING, hr);
+
+ // If the UI should be visible, display it now and hide the splash screen
+ if (BOOTSTRAPPER_DISPLAY_NONE < _command.display) {
+ ::ShowWindow(_theme->hwndParent, SW_SHOW);
+ }
+
+ _engine->CloseSplashScreen();
+
+ // Tell the core we're ready for the packages to be processed now.
+ hr = _engine->Detect();
+ BalExitOnFailure(hr, "Failed to start detecting chain.");
+
+ LExit:
+ if (FAILED(hr)) {
+ SetState(PYBA_STATE_DETECTING, hr);
+ }
+
+ return;
+ }
+
+ HRESULT UpdateUIStrings(__in BOOTSTRAPPER_ACTION action) {
+ HRESULT hr = S_OK;
+ LPCWSTR likeInstalling = nullptr;
+ LPCWSTR likeInstallation = nullptr;
+ switch (action) {
+ case BOOTSTRAPPER_ACTION_INSTALL:
+ likeInstalling = L"Installing";
+ likeInstallation = L"Installation";
+ break;
+ case BOOTSTRAPPER_ACTION_MODIFY:
+ // For modify, we actually want to pass INSTALL
+ action = BOOTSTRAPPER_ACTION_INSTALL;
+ likeInstalling = L"Modifying";
+ likeInstallation = L"Modification";
+ break;
+ case BOOTSTRAPPER_ACTION_REPAIR:
+ likeInstalling = L"Repairing";
+ likeInstallation = L"Repair";
+ break;
+ case BOOTSTRAPPER_ACTION_UNINSTALL:
+ likeInstalling = L"Uninstalling";
+ likeInstallation = L"Uninstallation";
+ break;
+ }
+
+ if (likeInstalling) {
+ LPWSTR locName = nullptr;
+ LOC_STRING *locText = nullptr;
+ hr = StrAllocFormatted(&locName, L"#(loc.%ls)", likeInstalling);
+ if (SUCCEEDED(hr)) {
+ hr = LocGetString(_wixLoc, locName, &locText);
+ ReleaseStr(locName);
+ }
+ _engine->SetVariableString(
+ L"ActionLikeInstalling",
+ SUCCEEDED(hr) && locText ? locText->wzText : likeInstalling
+ );
+ }
+
+ if (likeInstallation) {
+ LPWSTR locName = nullptr;
+ LOC_STRING *locText = nullptr;
+ hr = StrAllocFormatted(&locName, L"#(loc.%ls)", likeInstallation);
+ if (SUCCEEDED(hr)) {
+ hr = LocGetString(_wixLoc, locName, &locText);
+ ReleaseStr(locName);
+ }
+ _engine->SetVariableString(
+ L"ActionLikeInstallation",
+ SUCCEEDED(hr) && locText ? locText->wzText : likeInstallation
+ );
+ }
+ return hr;
+ }
+
+ //
+ // OnPlan - plan the detected changes.
+ //
+ void OnPlan(__in BOOTSTRAPPER_ACTION action) {
+ HRESULT hr = S_OK;
+
+ _plannedAction = action;
+
+ hr = UpdateUIStrings(action);
+ BalExitOnFailure(hr, "Failed to update strings");
+
+ // If we are going to apply a downgrade, bail.
+ if (_downgradingOtherVersion && BOOTSTRAPPER_ACTION_UNINSTALL < action) {
+ if (_suppressDowngradeFailure) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "A newer version of this product is installed but downgrade failure has been suppressed; continuing...");
+ } else {
+ hr = HRESULT_FROM_WIN32(ERROR_PRODUCT_VERSION);
+ BalExitOnFailure(hr, "Cannot install a product when a newer version is installed.");
+ }
+ }
+
+ SetState(PYBA_STATE_PLANNING, hr);
+
+ if (_baFunction) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Running plan BA function");
+ _baFunction->OnPlan();
+ }
+
+ hr = _engine->Plan(action);
+ BalExitOnFailure(hr, "Failed to start planning packages.");
+
+ LExit:
+ if (FAILED(hr)) {
+ SetState(PYBA_STATE_PLANNING, hr);
+ }
+
+ return;
+ }
+
+
+ //
+ // OnApply - apply the packages.
+ //
+ void OnApply() {
+ HRESULT hr = S_OK;
+
+ SetState(PYBA_STATE_APPLYING, hr);
+ SetProgressState(hr);
+ SetTaskbarButtonProgress(0);
+
+ hr = _engine->Apply(_hWnd);
+ BalExitOnFailure(hr, "Failed to start applying packages.");
+
+ ThemeControlEnable(_theme, ID_PROGRESS_CANCEL_BUTTON, TRUE); // ensure the cancel button is enabled before starting.
+
+ LExit:
+ if (FAILED(hr)) {
+ SetState(PYBA_STATE_APPLYING, hr);
+ }
+
+ return;
+ }
+
+
+ //
+ // OnChangeState - change state.
+ //
+ void OnChangeState(__in PYBA_STATE state) {
+ LPWSTR unformattedText = nullptr;
+
+ _state = state;
+
+ // If our install is at the end (success or failure) and we're not showing full UI
+ // then exit (prompt for restart if required).
+ if ((PYBA_STATE_APPLIED <= _state && BOOTSTRAPPER_DISPLAY_FULL > _command.display)) {
+ // If a restart was required but we were not automatically allowed to
+ // accept the reboot then do the prompt.
+ if (_restartRequired && !_allowRestart) {
+ StrAllocFromError(&unformattedText, HRESULT_FROM_WIN32(ERROR_SUCCESS_REBOOT_REQUIRED), nullptr);
+
+ _allowRestart = IDOK == ::MessageBoxW(
+ _hWnd,
+ unformattedText ? unformattedText : L"The requested operation is successful. Changes will not be effective until the system is rebooted.",
+ _theme->sczCaption,
+ MB_ICONEXCLAMATION | MB_OKCANCEL
+ );
+ }
+
+ // Quietly exit.
+ ::PostMessageW(_hWnd, WM_CLOSE, 0, 0);
+ } else { // try to change the pages.
+ DWORD newPageId = 0;
+ DeterminePageId(_state, &newPageId);
+
+ if (_visiblePageId != newPageId) {
+ ShowPage(newPageId);
+ }
+ }
+
+ ReleaseStr(unformattedText);
+ }
+
+ //
+ // Called before showing a page to handle all controls.
+ //
+ void ProcessPageControls(THEME_PAGE *pPage) {
+ if (!pPage) {
+ return;
+ }
+
+ for (DWORD i = 0; i < pPage->cControlIndices; ++i) {
+ THEME_CONTROL* pControl = _theme->rgControls + pPage->rgdwControlIndices[i];
+ BOOL enableControl = TRUE;
+
+ // If this is a named control, try to set its default state.
+ if (pControl->sczName && *pControl->sczName) {
+ // If this is a checkable control, try to set its default state
+ // to the state of a matching named Burn variable.
+ if (IsCheckable(pControl)) {
+ LONGLONG llValue = 0;
+ HRESULT hr = BalGetNumericVariable(pControl->sczName, &llValue);
+
+ // If the control value isn't set then disable it.
+ if (!SUCCEEDED(hr)) {
+ enableControl = FALSE;
+ } else {
+ ThemeSendControlMessage(
+ _theme,
+ pControl->wId,
+ BM_SETCHECK,
+ SUCCEEDED(hr) && llValue ? BST_CHECKED : BST_UNCHECKED,
+ 0
+ );
+ }
+ }
+
+ // Hide or disable controls based on the control name with 'State' appended
+ LPWSTR controlName = nullptr;
+ HRESULT hr = StrAllocFormatted(&controlName, L"%lsState", pControl->sczName);
+ if (SUCCEEDED(hr)) {
+ LPWSTR controlState = nullptr;
+ hr = BalGetStringVariable(controlName, &controlState);
+ if (SUCCEEDED(hr) && controlState && *controlState) {
+ if (controlState[0] == '[') {
+ LPWSTR formatted = nullptr;
+ if (SUCCEEDED(BalFormatString(controlState, &formatted))) {
+ StrFree(controlState);
+ controlState = formatted;
+ }
+ }
+
+ if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, controlState, -1, L"disable", -1)) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Disable control %ls", pControl->sczName);
+ enableControl = FALSE;
+ } else if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, controlState, -1, L"hide", -1)) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Hide control %ls", pControl->sczName);
+ // TODO: This doesn't work
+ ThemeShowControl(_theme, pControl->wId, SW_HIDE);
+ } else {
+ // An explicit state can override the lack of a
+ // backing variable.
+ enableControl = TRUE;
+ }
+ }
+ StrFree(controlState);
+ }
+ StrFree(controlName);
+ controlName = nullptr;
+
+
+ // If a command link has a note, then add it.
+ if ((pControl->dwStyle & BS_TYPEMASK) == BS_COMMANDLINK ||
+ (pControl->dwStyle & BS_TYPEMASK) == BS_DEFCOMMANDLINK) {
+ hr = StrAllocFormatted(&controlName, L"#(loc.%lsNote)", pControl->sczName);
+ if (SUCCEEDED(hr)) {
+ LOC_STRING *locText = nullptr;
+ hr = LocGetString(_wixLoc, controlName, &locText);
+ if (SUCCEEDED(hr) && locText && locText->wzText && locText->wzText[0]) {
+ LPWSTR text = nullptr;
+ hr = BalFormatString(locText->wzText, &text);
+ if (SUCCEEDED(hr) && text && text[0]) {
+ ThemeSendControlMessage(_theme, pControl->wId, BCM_SETNOTE, 0, (LPARAM)text);
+ ReleaseStr(text);
+ text = nullptr;
+ }
+ }
+ ReleaseStr(controlName);
+ controlName = nullptr;
+ }
+ hr = S_OK;
+ }
+ }
+
+ ThemeControlEnable(_theme, pControl->wId, enableControl);
+
+ // Format the text in each of the new page's controls
+ if (pControl->sczText && *pControl->sczText) {
+ // If the wix developer is showing a hidden variable
+ // in the UI, then obviously they don't care about
+ // keeping it safe so don't go down the rabbit hole
+ // of making sure that this is securely freed.
+ LPWSTR text = nullptr;
+ HRESULT hr = BalFormatString(pControl->sczText, &text);
+ if (SUCCEEDED(hr)) {
+ ThemeSetTextControl(_theme, pControl->wId, text);
+ }
+ }
+ }
+ }
+
+ //
+ // OnClose - called when the window is trying to be closed.
+ //
+ BOOL OnClose() {
+ BOOL close = FALSE;
+
+ // If we've already succeeded or failed or showing the help page, just close (prompts are annoying if the bootstrapper is done).
+ if (PYBA_STATE_APPLIED <= _state || PYBA_STATE_HELP == _state) {
+ close = TRUE;
+ } else {
+ // prompt the user or force the cancel if there is no UI.
+ close = PromptCancel(
+ _hWnd,
+ BOOTSTRAPPER_DISPLAY_FULL != _command.display,
+ _confirmCloseMessage ? _confirmCloseMessage : L"Are you sure you want to cancel?",
+ _theme->sczCaption
+ );
+ }
+
+ // If we're doing progress then we never close, we just cancel to let rollback occur.
+ if (PYBA_STATE_APPLYING <= _state && PYBA_STATE_APPLIED > _state) {
+ // If we canceled disable cancel button since clicking it again is silly.
+ if (close) {
+ ThemeControlEnable(_theme, ID_PROGRESS_CANCEL_BUTTON, FALSE);
+ }
+
+ close = FALSE;
+ }
+
+ return close;
+ }
+
+ //
+ // OnClickCloseButton - close the application.
+ //
+ void OnClickCloseButton() {
+ ::SendMessageW(_hWnd, WM_CLOSE, 0, 0);
+ }
+
+
+ //
+ // OnClickLaunchButton - launch the app from the success page.
+ //
+ void OnClickLaunchButton() {
+ HRESULT hr = S_OK;
+ LPWSTR sczUnformattedLaunchTarget = nullptr;
+ LPWSTR sczLaunchTarget = nullptr;
+ LPWSTR sczLaunchTargetElevatedId = nullptr;
+ LPWSTR sczUnformattedArguments = nullptr;
+ LPWSTR sczArguments = nullptr;
+ int nCmdShow = SW_SHOWNORMAL;
+
+ hr = BalGetStringVariable(PYBA_VARIABLE_LAUNCH_TARGET_PATH, &sczUnformattedLaunchTarget);
+ BalExitOnFailure1(hr, "Failed to get launch target variable '%ls'.", PYBA_VARIABLE_LAUNCH_TARGET_PATH);
+
+ hr = BalFormatString(sczUnformattedLaunchTarget, &sczLaunchTarget);
+ BalExitOnFailure1(hr, "Failed to format launch target variable: %ls", sczUnformattedLaunchTarget);
+
+ if (BalStringVariableExists(PYBA_VARIABLE_LAUNCH_TARGET_ELEVATED_ID)) {
+ hr = BalGetStringVariable(PYBA_VARIABLE_LAUNCH_TARGET_ELEVATED_ID, &sczLaunchTargetElevatedId);
+ BalExitOnFailure1(hr, "Failed to get launch target elevated id '%ls'.", PYBA_VARIABLE_LAUNCH_TARGET_ELEVATED_ID);
+ }
+
+ if (BalStringVariableExists(PYBA_VARIABLE_LAUNCH_ARGUMENTS)) {
+ hr = BalGetStringVariable(PYBA_VARIABLE_LAUNCH_ARGUMENTS, &sczUnformattedArguments);
+ BalExitOnFailure1(hr, "Failed to get launch arguments '%ls'.", PYBA_VARIABLE_LAUNCH_ARGUMENTS);
+ }
+
+ if (BalStringVariableExists(PYBA_VARIABLE_LAUNCH_HIDDEN)) {
+ nCmdShow = SW_HIDE;
+ }
+
+ if (sczLaunchTargetElevatedId && !_triedToLaunchElevated) {
+ _triedToLaunchElevated = TRUE;
+ hr = _engine->LaunchApprovedExe(_hWnd, sczLaunchTargetElevatedId, sczUnformattedArguments, 0);
+ if (FAILED(hr)) {
+ BalLogError(hr, "Failed to launch elevated target: %ls", sczLaunchTargetElevatedId);
+
+ //try with ShelExec next time
+ OnClickLaunchButton();
+ }
+ } else {
+ if (sczUnformattedArguments) {
+ hr = BalFormatString(sczUnformattedArguments, &sczArguments);
+ BalExitOnFailure1(hr, "Failed to format launch arguments variable: %ls", sczUnformattedArguments);
+ }
+
+ hr = ShelExec(sczLaunchTarget, sczArguments, L"open", nullptr, nCmdShow, _hWnd, nullptr);
+ BalExitOnFailure1(hr, "Failed to launch target: %ls", sczLaunchTarget);
+
+ ::PostMessageW(_hWnd, WM_CLOSE, 0, 0);
+ }
+
+ LExit:
+ StrSecureZeroFreeString(sczArguments);
+ ReleaseStr(sczUnformattedArguments);
+ ReleaseStr(sczLaunchTargetElevatedId);
+ StrSecureZeroFreeString(sczLaunchTarget);
+ ReleaseStr(sczUnformattedLaunchTarget);
+
+ return;
+ }
+
+
+ //
+ // OnClickRestartButton - allows the restart and closes the app.
+ //
+ void OnClickRestartButton() {
+ AssertSz(_restartRequired, "Restart must be requested to be able to click on the restart button.");
+
+ _allowRestart = TRUE;
+ ::SendMessageW(_hWnd, WM_CLOSE, 0, 0);
+
+ return;
+ }
+
+
+ //
+ // OnClickLogFileLink - show the log file.
+ //
+ void OnClickLogFileLink() {
+ HRESULT hr = S_OK;
+ LPWSTR sczLogFile = nullptr;
+
+ hr = BalGetStringVariable(_bundle.sczLogVariable, &sczLogFile);
+ BalExitOnFailure1(hr, "Failed to get log file variable '%ls'.", _bundle.sczLogVariable);
+
+ hr = ShelExec(L"notepad.exe", sczLogFile, L"open", nullptr, SW_SHOWDEFAULT, _hWnd, nullptr);
+ BalExitOnFailure1(hr, "Failed to open log file target: %ls", sczLogFile);
+
+ LExit:
+ ReleaseStr(sczLogFile);
+
+ return;
+ }
+
+
+ //
+ // SetState
+ //
+ void SetState(__in PYBA_STATE state, __in HRESULT hrStatus) {
+ if (FAILED(hrStatus)) {
+ _hrFinal = hrStatus;
+ }
+
+ if (FAILED(_hrFinal)) {
+ state = PYBA_STATE_FAILED;
+ }
+
+ if (_state != state) {
+ ::PostMessageW(_hWnd, WM_PYBA_CHANGE_STATE, 0, state);
+ }
+ }
+
+ //
+ // GoToPage
+ //
+ void GoToPage(__in PAGE page) {
+ _installPage = page;
+ ::PostMessageW(_hWnd, WM_PYBA_CHANGE_STATE, 0, _state);
+ }
+
+ void DeterminePageId(__in PYBA_STATE state, __out DWORD* pdwPageId) {
+ LONGLONG simple;
+
+ if (BOOTSTRAPPER_DISPLAY_PASSIVE == _command.display) {
+ switch (state) {
+ case PYBA_STATE_INITIALIZED:
+ *pdwPageId = BOOTSTRAPPER_ACTION_HELP == _command.action
+ ? _pageIds[PAGE_HELP]
+ : _pageIds[PAGE_LOADING];
+ break;
+
+ case PYBA_STATE_HELP:
+ *pdwPageId = _pageIds[PAGE_HELP];
+ break;
+
+ case PYBA_STATE_DETECTING:
+ *pdwPageId = _pageIds[PAGE_LOADING]
+ ? _pageIds[PAGE_LOADING]
+ : _pageIds[PAGE_PROGRESS_PASSIVE]
+ ? _pageIds[PAGE_PROGRESS_PASSIVE]
+ : _pageIds[PAGE_PROGRESS];
+ break;
+
+ case PYBA_STATE_DETECTED: __fallthrough;
+ case PYBA_STATE_PLANNING: __fallthrough;
+ case PYBA_STATE_PLANNED: __fallthrough;
+ case PYBA_STATE_APPLYING: __fallthrough;
+ case PYBA_STATE_CACHING: __fallthrough;
+ case PYBA_STATE_CACHED: __fallthrough;
+ case PYBA_STATE_EXECUTING: __fallthrough;
+ case PYBA_STATE_EXECUTED:
+ *pdwPageId = _pageIds[PAGE_PROGRESS_PASSIVE]
+ ? _pageIds[PAGE_PROGRESS_PASSIVE]
+ : _pageIds[PAGE_PROGRESS];
+ break;
+
+ default:
+ *pdwPageId = 0;
+ break;
+ }
+ } else if (BOOTSTRAPPER_DISPLAY_FULL == _command.display) {
+ switch (state) {
+ case PYBA_STATE_INITIALIZING:
+ *pdwPageId = 0;
+ break;
+
+ case PYBA_STATE_INITIALIZED:
+ *pdwPageId = BOOTSTRAPPER_ACTION_HELP == _command.action
+ ? _pageIds[PAGE_HELP]
+ : _pageIds[PAGE_LOADING];
+ break;
+
+ case PYBA_STATE_HELP:
+ *pdwPageId = _pageIds[PAGE_HELP];
+ break;
+
+ case PYBA_STATE_DETECTING:
+ *pdwPageId = _pageIds[PAGE_LOADING];
+ break;
+
+ case PYBA_STATE_DETECTED:
+ if (_installPage == PAGE_LOADING) {
+ switch (_command.action) {
+ case BOOTSTRAPPER_ACTION_INSTALL:
+ if (_upgrading) {
+ _installPage = PAGE_UPGRADE;
+ } else if (SUCCEEDED(BalGetNumericVariable(L"SimpleInstall", &simple)) && simple) {
+ _installPage = PAGE_SIMPLE_INSTALL;
+ } else {
+ _installPage = PAGE_INSTALL;
+ }
+ break;
+
+ case BOOTSTRAPPER_ACTION_MODIFY: __fallthrough;
+ case BOOTSTRAPPER_ACTION_REPAIR: __fallthrough;
+ case BOOTSTRAPPER_ACTION_UNINSTALL:
+ _installPage = PAGE_MODIFY;
+ break;
+ }
+ }
+ *pdwPageId = _pageIds[_installPage];
+ break;
+
+ case PYBA_STATE_PLANNING: __fallthrough;
+ case PYBA_STATE_PLANNED: __fallthrough;
+ case PYBA_STATE_APPLYING: __fallthrough;
+ case PYBA_STATE_CACHING: __fallthrough;
+ case PYBA_STATE_CACHED: __fallthrough;
+ case PYBA_STATE_EXECUTING: __fallthrough;
+ case PYBA_STATE_EXECUTED:
+ *pdwPageId = _pageIds[PAGE_PROGRESS];
+ break;
+
+ case PYBA_STATE_APPLIED:
+ *pdwPageId = _pageIds[PAGE_SUCCESS];
+ break;
+
+ case PYBA_STATE_FAILED:
+ *pdwPageId = _pageIds[PAGE_FAILURE];
+ break;
+ }
+ }
+ }
+
+ BOOL WillElevate() {
+ static BAL_CONDITION WILL_ELEVATE_CONDITION = {
+ L"not WixBundleElevated and ("
+ /*Elevate when installing for all users*/
+ L"InstallAllUsers or "
+ /*Elevate when installing the launcher for all users and it was not detected*/
+ L"(Include_launcher and InstallLauncherAllUsers and not DetectedLauncher)"
+ L")",
+ L""
+ };
+ BOOL result;
+
+ return SUCCEEDED(BalConditionEvaluate(&WILL_ELEVATE_CONDITION, _engine, &result, nullptr)) && result;
+ }
+
+ BOOL IsCrtInstalled() {
+ if (_crtInstalledToken > 0) {
+ return TRUE;
+ } else if (_crtInstalledToken == 0) {
+ return FALSE;
+ }
+
+ // Check whether at least CRT v10.0.10137.0 is available.
+ // It should only be installed as a Windows Update package, which means
+ // we don't need to worry about 32-bit/64-bit.
+ LPCWSTR crtFile = L"ucrtbase.dll";
+
+ DWORD cbVer = GetFileVersionInfoSizeW(crtFile, nullptr);
+ if (!cbVer) {
+ _crtInstalledToken = 0;
+ return FALSE;
+ }
+
+ void *pData = malloc(cbVer);
+ if (!pData) {
+ _crtInstalledToken = 0;
+ return FALSE;
+ }
+
+ if (!GetFileVersionInfoW(crtFile, 0, cbVer, pData)) {
+ free(pData);
+ _crtInstalledToken = 0;
+ return FALSE;
+ }
+
+ VS_FIXEDFILEINFO *ffi;
+ UINT cb;
+ BOOL result = FALSE;
+
+ if (VerQueryValueW(pData, L"\\", (LPVOID*)&ffi, &cb) &&
+ ffi->dwFileVersionMS == 0x000A0000 && ffi->dwFileVersionLS >= 0x27990000) {
+ result = TRUE;
+ }
+
+ free(pData);
+ _crtInstalledToken = result ? 1 : 0;
+ return result;
+ }
+
+ BOOL QueryElevateForCrtInstall() {
+ // Called to prompt the user that even though they think they won't need
+ // to elevate, they actually will because of the CRT install.
+ if (IsCrtInstalled()) {
+ // CRT is already installed - no need to prompt
+ return TRUE;
+ }
+
+ LONGLONG elevated;
+ HRESULT hr = BalGetNumericVariable(L"WixBundleElevated", &elevated);
+ if (SUCCEEDED(hr) && elevated) {
+ // Already elevated - no need to prompt
+ return TRUE;
+ }
+
+ LOC_STRING *locStr;
+ hr = LocGetString(_wixLoc, L"#(loc.ElevateForCRTInstall)", &locStr);
+ if (FAILED(hr)) {
+ BalLogError(hr, "Failed to get ElevateForCRTInstall string");
+ return FALSE;
+ }
+ return ::MessageBoxW(_hWnd, locStr->wzText, _theme->sczCaption, MB_YESNO) != IDNO;
+ }
+
+ HRESULT EvaluateConditions() {
+ HRESULT hr = S_OK;
+ BOOL result = FALSE;
+
+ for (DWORD i = 0; i < _conditions.cConditions; ++i) {
+ BAL_CONDITION* pCondition = _conditions.rgConditions + i;
+
+ hr = BalConditionEvaluate(pCondition, _engine, &result, &_failedMessage);
+ BalExitOnFailure(hr, "Failed to evaluate condition.");
+
+ if (!result) {
+ // Hope they didn't have hidden variables in their message, because it's going in the log in plaintext.
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "%ls", _failedMessage);
+
+ hr = E_WIXSTDBA_CONDITION_FAILED;
+ // todo: remove in WiX v4, in case people are relying on v3.x logging behavior
+ BalExitOnFailure1(hr, "Bundle condition evaluated to false: %ls", pCondition->sczCondition);
+ }
+ }
+
+ ReleaseNullStrSecure(_failedMessage);
+
+ LExit:
+ return hr;
+ }
+
+
+ void SetTaskbarButtonProgress(__in DWORD dwOverallPercentage) {
+ HRESULT hr = S_OK;
+
+ if (_taskbarButtonOK) {
+ hr = _taskbarList->SetProgressValue(_hWnd, dwOverallPercentage, 100UL);
+ BalExitOnFailure1(hr, "Failed to set taskbar button progress to: %d%%.", dwOverallPercentage);
+ }
+
+ LExit:
+ return;
+ }
+
+
+ void SetTaskbarButtonState(__in TBPFLAG tbpFlags) {
+ HRESULT hr = S_OK;
+
+ if (_taskbarButtonOK) {
+ hr = _taskbarList->SetProgressState(_hWnd, tbpFlags);
+ BalExitOnFailure1(hr, "Failed to set taskbar button state.", tbpFlags);
+ }
+
+ LExit:
+ return;
+ }
+
+
+ void SetProgressState(__in HRESULT hrStatus) {
+ TBPFLAG flag = TBPF_NORMAL;
+
+ if (IsCanceled() || HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT) == hrStatus) {
+ flag = TBPF_PAUSED;
+ } else if (IsRollingBack() || FAILED(hrStatus)) {
+ flag = TBPF_ERROR;
+ }
+
+ SetTaskbarButtonState(flag);
+ }
+
+
+ HRESULT LoadBootstrapperBAFunctions() {
+ HRESULT hr = S_OK;
+ LPWSTR sczBafPath = nullptr;
+
+ hr = PathRelativeToModule(&sczBafPath, L"bafunctions.dll", _hModule);
+ BalExitOnFailure(hr, "Failed to get path to BA function DLL.");
+
+#ifdef DEBUG
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "PYBA: LoadBootstrapperBAFunctions() - BA function DLL %ls", sczBafPath);
+#endif
+
+ _hBAFModule = ::LoadLibraryW(sczBafPath);
+ if (_hBAFModule) {
+ auto pfnBAFunctionCreate = reinterpret_cast<PFN_BOOTSTRAPPER_BA_FUNCTION_CREATE>(::GetProcAddress(_hBAFModule, "CreateBootstrapperBAFunction"));
+ BalExitOnNullWithLastError1(pfnBAFunctionCreate, hr, "Failed to get CreateBootstrapperBAFunction entry-point from: %ls", sczBafPath);
+
+ hr = pfnBAFunctionCreate(_engine, _hBAFModule, &_baFunction);
+ BalExitOnFailure(hr, "Failed to create BA function.");
+ }
+#ifdef DEBUG
+ else {
+ BalLogError(HRESULT_FROM_WIN32(::GetLastError()), "PYBA: LoadBootstrapperBAFunctions() - Failed to load DLL %ls", sczBafPath);
+ }
+#endif
+
+ LExit:
+ if (_hBAFModule && !_baFunction) {
+ ::FreeLibrary(_hBAFModule);
+ _hBAFModule = nullptr;
+ }
+ ReleaseStr(sczBafPath);
+
+ return hr;
+ }
+
+ BOOL IsCheckable(THEME_CONTROL* pControl) {
+ if (!pControl->sczName || !pControl->sczName[0]) {
+ return FALSE;
+ }
+
+ if (pControl->type == THEME_CONTROL_TYPE_CHECKBOX) {
+ return TRUE;
+ }
+
+ if (pControl->type == THEME_CONTROL_TYPE_BUTTON) {
+ if ((pControl->dwStyle & BS_TYPEMASK) == BS_AUTORADIOBUTTON) {
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+ }
+
+ void SavePageSettings() {
+ DWORD pageId = 0;
+ THEME_PAGE* pPage = nullptr;
+
+ DeterminePageId(_state, &pageId);
+ pPage = ThemeGetPage(_theme, pageId);
+ if (!pPage) {
+ return;
+ }
+
+ for (DWORD i = 0; i < pPage->cControlIndices; ++i) {
+ // Loop through all the checkable controls and set a Burn variable
+ // with that name to true or false.
+ THEME_CONTROL* pControl = _theme->rgControls + pPage->rgdwControlIndices[i];
+ if (IsCheckable(pControl) && ThemeControlEnabled(_theme, pControl->wId)) {
+ BOOL checked = ThemeIsControlChecked(_theme, pControl->wId);
+ _engine->SetVariableNumeric(pControl->sczName, checked ? 1 : 0);
+ }
+
+ // Loop through all the editbox controls with names and set a
+ // Burn variable with that name to the contents.
+ if (THEME_CONTROL_TYPE_EDITBOX == pControl->type && pControl->sczName && *pControl->sczName) {
+ LPWSTR sczValue = nullptr;
+ ThemeGetTextControl(_theme, pControl->wId, &sczValue);
+ _engine->SetVariableString(pControl->sczName, sczValue);
+ }
+ }
+ }
+
+ static bool IsTargetPlatformx64(__in IBootstrapperEngine* pEngine) {
+ WCHAR platform[8];
+ DWORD platformLen = 8;
+
+ if (FAILED(pEngine->GetVariableString(L"TargetPlatform", platform, &platformLen))) {
+ return S_FALSE;
+ }
+
+ return ::CompareStringW(LOCALE_NEUTRAL, 0, platform, -1, L"x64", -1) == CSTR_EQUAL;
+ }
+
+ static HRESULT LoadOptionalFeatureStatesFromKey(
+ __in IBootstrapperEngine* pEngine,
+ __in HKEY hkHive,
+ __in LPCWSTR subkey
+ ) {
+ HKEY hKey;
+ LRESULT res;
+
+ if (IsTargetPlatformx64(pEngine)) {
+ res = RegOpenKeyExW(hkHive, subkey, 0, KEY_READ | KEY_WOW64_64KEY, &hKey);
+ } else {
+ res = RegOpenKeyExW(hkHive, subkey, 0, KEY_READ | KEY_WOW64_32KEY, &hKey);
+ }
+ if (res == ERROR_FILE_NOT_FOUND) {
+ return S_FALSE;
+ }
+ if (res != ERROR_SUCCESS) {
+ return HRESULT_FROM_WIN32(res);
+ }
+
+ for (auto p = OPTIONAL_FEATURES; p->regName; ++p) {
+ res = RegQueryValueExW(hKey, p->regName, nullptr, nullptr, nullptr, nullptr);
+ if (res == ERROR_FILE_NOT_FOUND) {
+ pEngine->SetVariableNumeric(p->variableName, 0);
+ } else if (res == ERROR_SUCCESS) {
+ pEngine->SetVariableNumeric(p->variableName, 1);
+ } else {
+ RegCloseKey(hKey);
+ return HRESULT_FROM_WIN32(res);
+ }
+ }
+
+ RegCloseKey(hKey);
+ return S_OK;
+ }
+
+ static HRESULT LoadTargetDirFromKey(
+ __in IBootstrapperEngine* pEngine,
+ __in HKEY hkHive,
+ __in LPCWSTR subkey
+ ) {
+ HKEY hKey;
+ LRESULT res;
+ DWORD dataType;
+ BYTE buffer[1024];
+ DWORD bufferLen = sizeof(buffer);
+
+ if (IsTargetPlatformx64(pEngine)) {
+ res = RegOpenKeyExW(hkHive, subkey, 0, KEY_READ | KEY_WOW64_64KEY, &hKey);
+ } else {
+ res = RegOpenKeyExW(hkHive, subkey, 0, KEY_READ | KEY_WOW64_32KEY, &hKey);
+ }
+ if (res == ERROR_FILE_NOT_FOUND) {
+ return S_FALSE;
+ }
+ if (res != ERROR_SUCCESS) {
+ return HRESULT_FROM_WIN32(res);
+ }
+
+ res = RegQueryValueExW(hKey, nullptr, nullptr, &dataType, buffer, &bufferLen);
+ if (res == ERROR_SUCCESS && dataType == REG_SZ && bufferLen < sizeof(buffer)) {
+ pEngine->SetVariableString(L"TargetDir", reinterpret_cast<wchar_t*>(buffer));
+ }
+ RegCloseKey(hKey);
+ return HRESULT_FROM_WIN32(res);
+ }
+
+ static HRESULT LoadAssociateFilesStateFromKey(
+ __in IBootstrapperEngine* pEngine,
+ __in HKEY hkHive
+ ) {
+ const LPCWSTR subkey = L"Software\\Python\\PyLauncher";
+ HKEY hKey;
+ LRESULT res;
+ HRESULT hr;
+
+ res = RegOpenKeyExW(hkHive, subkey, 0, KEY_READ | KEY_WOW64_32KEY, &hKey);
+
+ if (res == ERROR_FILE_NOT_FOUND) {
+ return S_FALSE;
+ }
+ if (res != ERROR_SUCCESS) {
+ return HRESULT_FROM_WIN32(res);
+ }
+
+ res = RegQueryValueExW(hKey, L"AssociateFiles", nullptr, nullptr, nullptr, nullptr);
+ if (res == ERROR_FILE_NOT_FOUND) {
+ hr = S_FALSE;
+ } else if (res == ERROR_SUCCESS) {
+ hr = S_OK;
+ } else {
+ hr = HRESULT_FROM_WIN32(res);
+ }
+
+ RegCloseKey(hKey);
+ return hr;
+ }
+
+ static void LoadOptionalFeatureStates(__in IBootstrapperEngine* pEngine) {
+ WCHAR subkeyFmt[256];
+ WCHAR subkey[256];
+ DWORD subkeyLen;
+ HRESULT hr;
+ HKEY hkHive;
+
+ // The launcher installation is separate from the Python install, so we
+ // check its state later. For now, assume we don't want the launcher or
+ // file associations, and if they have already been installed then
+ // loading the state will reactivate these settings.
+ pEngine->SetVariableNumeric(L"Include_launcher", 0);
+ pEngine->SetVariableNumeric(L"AssociateFiles", 0);
+
+ // Get the registry key from the bundle, to save having to duplicate it
+ // in multiple places.
+ subkeyLen = sizeof(subkeyFmt) / sizeof(subkeyFmt[0]);
+ hr = pEngine->GetVariableString(L"OptionalFeaturesRegistryKey", subkeyFmt, &subkeyLen);
+ BalExitOnFailure(hr, "Failed to locate registry key");
+ subkeyLen = sizeof(subkey) / sizeof(subkey[0]);
+ hr = pEngine->FormatString(subkeyFmt, subkey, &subkeyLen);
+ BalExitOnFailure1(hr, "Failed to format %ls", subkeyFmt);
+
+ // Check the current user's registry for existing features
+ hkHive = HKEY_CURRENT_USER;
+ hr = LoadOptionalFeatureStatesFromKey(pEngine, hkHive, subkey);
+ BalExitOnFailure1(hr, "Failed to read from HKCU\\%ls", subkey);
+ if (hr == S_FALSE) {
+ // Now check the local machine registry
+ hkHive = HKEY_LOCAL_MACHINE;
+ hr = LoadOptionalFeatureStatesFromKey(pEngine, hkHive, subkey);
+ BalExitOnFailure1(hr, "Failed to read from HKLM\\%ls", subkey);
+ if (hr == S_OK) {
+ // Found a system-wide install, so enable these settings.
+ pEngine->SetVariableNumeric(L"InstallAllUsers", 1);
+ pEngine->SetVariableNumeric(L"CompileAll", 1);
+ }
+ }
+
+ if (hr == S_OK) {
+ // Cannot change InstallAllUsersState when upgrading. While there's
+ // no good reason to not allow installing a per-user and an all-user
+ // version simultaneously, Burn can't handle the state management
+ // and will need to uninstall the old one.
+ pEngine->SetVariableString(L"InstallAllUsersState", L"disable");
+
+ // Get the previous install directory. This can be changed by the
+ // user.
+ subkeyLen = sizeof(subkeyFmt) / sizeof(subkeyFmt[0]);
+ hr = pEngine->GetVariableString(L"TargetDirRegistryKey", subkeyFmt, &subkeyLen);
+ BalExitOnFailure(hr, "Failed to locate registry key");
+ subkeyLen = sizeof(subkey) / sizeof(subkey[0]);
+ hr = pEngine->FormatString(subkeyFmt, subkey, &subkeyLen);
+ BalExitOnFailure1(hr, "Failed to format %ls", subkeyFmt);
+ LoadTargetDirFromKey(pEngine, hkHive, subkey);
+ }
+
+ LExit:
+ return;
+ }
+
+ HRESULT EnsureTargetDir() {
+ LONGLONG installAllUsers;
+ LPWSTR targetDir = nullptr, defaultDir = nullptr;
+ HRESULT hr = BalGetStringVariable(L"TargetDir", &targetDir);
+ if (FAILED(hr) || !targetDir || !targetDir[0]) {
+ ReleaseStr(targetDir);
+ targetDir = nullptr;
+
+ hr = BalGetNumericVariable(L"InstallAllUsers", &installAllUsers);
+ ExitOnFailure(hr, L"Failed to get install scope");
+
+ hr = BalGetStringVariable(
+ installAllUsers ? L"DefaultAllUsersTargetDir" : L"DefaultJustForMeTargetDir",
+ &defaultDir
+ );
+ BalExitOnFailure(hr, "Failed to get the default install directory");
+
+ if (!defaultDir || !defaultDir[0]) {
+ BalLogError(E_INVALIDARG, "Default install directory is blank");
+ }
+
+ hr = BalFormatString(defaultDir, &targetDir);
+ BalExitOnFailure1(hr, "Failed to format '%ls'", defaultDir);
+
+ hr = _engine->SetVariableString(L"TargetDir", targetDir);
+ BalExitOnFailure(hr, "Failed to set install target directory");
+ }
+ LExit:
+ ReleaseStr(defaultDir);
+ ReleaseStr(targetDir);
+ return hr;
+ }
+
+ void ValidateOperatingSystem() {
+ LOC_STRING *pLocString = nullptr;
+
+ if (IsWindows7SP1OrGreater()) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Target OS is Windows 7 SP1 or later");
+ return;
+ } else if (IsWindows7OrGreater()) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows 7 RTM");
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Service Pack 1 is required to continue installation");
+ LocGetString(_wixLoc, L"#(loc.FailureWin7MissingSP1)", &pLocString);
+ } else if (IsWindowsVistaSP2OrGreater()) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Target OS is Windows Vista SP2");
+ return;
+ } else if (IsWindowsVistaOrGreater()) {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows Vista RTM or SP1");
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Service Pack 2 is required to continue installation");
+ LocGetString(_wixLoc, L"#(loc.FailureVistaMissingSP2)", &pLocString);
+ } else {
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows XP or earlier");
+ BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Windows Vista SP2 or later is required to continue installation");
+ LocGetString(_wixLoc, L"#(loc.FailureXPOrEarlier)", &pLocString);
+ }
+
+ if (pLocString && pLocString->wzText) {
+ BalFormatString(pLocString->wzText, &_failedMessage);
+ }
+
+ _hrFinal = E_WIXSTDBA_CONDITION_FAILED;
+ }
+
+public:
+ //
+ // Constructor - initialize member variables.
+ //
+ PythonBootstrapperApplication(
+ __in HMODULE hModule,
+ __in BOOL fPrereq,
+ __in HRESULT hrHostInitialization,
+ __in IBootstrapperEngine* pEngine,
+ __in const BOOTSTRAPPER_COMMAND* pCommand
+ ) : CBalBaseBootstrapperApplication(pEngine, pCommand, 3, 3000) {
+ _hModule = hModule;
+ memcpy_s(&_command, sizeof(_command), pCommand, sizeof(BOOTSTRAPPER_COMMAND));
+
+ LONGLONG llInstalled = 0;
+ HRESULT hr = BalGetNumericVariable(L"WixBundleInstalled", &llInstalled);
+ if (SUCCEEDED(hr) && BOOTSTRAPPER_RESUME_TYPE_REBOOT != _command.resumeType && 0 < llInstalled && BOOTSTRAPPER_ACTION_INSTALL == _command.action) {
+ _command.action = BOOTSTRAPPER_ACTION_MODIFY;
+ } else if (0 == llInstalled && (BOOTSTRAPPER_ACTION_MODIFY == _command.action || BOOTSTRAPPER_ACTION_REPAIR == _command.action)) {
+ _command.action = BOOTSTRAPPER_ACTION_INSTALL;
+ }
+
+ _plannedAction = BOOTSTRAPPER_ACTION_UNKNOWN;
+
+
+ // When resuming from restart doing some install-like operation, try to find the package that forced the
+ // restart. We'll use this information during planning.
+ _nextPackageAfterRestart = nullptr;
+
+ if (BOOTSTRAPPER_RESUME_TYPE_REBOOT == _command.resumeType && BOOTSTRAPPER_ACTION_UNINSTALL < _command.action) {
+ // Ensure the forced restart package variable is null when it is an empty string.
+ HRESULT hr = BalGetStringVariable(L"WixBundleForcedRestartPackage", &_nextPackageAfterRestart);
+ if (FAILED(hr) || !_nextPackageAfterRestart || !*_nextPackageAfterRestart) {
+ ReleaseNullStr(_nextPackageAfterRestart);
+ }
+ }
+
+ _crtInstalledToken = -1;
+ pEngine->SetVariableNumeric(L"CRTInstalled", IsCrtInstalled() ? 1 : 0);
+
+ _wixLoc = nullptr;
+ memset(&_bundle, 0, sizeof(_bundle));
+ memset(&_conditions, 0, sizeof(_conditions));
+ _confirmCloseMessage = nullptr;
+ _failedMessage = nullptr;
+
+ _language = nullptr;
+ _theme = nullptr;
+ memset(_pageIds, 0, sizeof(_pageIds));
+ _hUiThread = nullptr;
+ _registered = FALSE;
+ _hWnd = nullptr;
+
+ _state = PYBA_STATE_INITIALIZING;
+ _visiblePageId = 0;
+ _installPage = PAGE_LOADING;
+ _hrFinal = hrHostInitialization;
+
+ _downgradingOtherVersion = FALSE;
+ _restartResult = BOOTSTRAPPER_APPLY_RESTART_NONE;
+ _restartRequired = FALSE;
+ _allowRestart = FALSE;
+
+ _suppressDowngradeFailure = FALSE;
+ _suppressRepair = FALSE;
+ _modifying = FALSE;
+ _upgrading = FALSE;
+
+ _overridableVariables = nullptr;
+ _taskbarList = nullptr;
+ _taskbarButtonCreatedMessage = UINT_MAX;
+ _taskbarButtonOK = FALSE;
+ _showingInternalUIThisPackage = FALSE;
+ _triedToLaunchElevated = FALSE;
+
+ _suppressPaint = FALSE;
+
+ pEngine->AddRef();
+ _engine = pEngine;
+
+ _hBAFModule = nullptr;
+ _baFunction = nullptr;
+ }
+
+
+ //
+ // Destructor - release member variables.
+ //
+ ~PythonBootstrapperApplication() {
+ AssertSz(!::IsWindow(_hWnd), "Window should have been destroyed before destructor.");
+ AssertSz(!_theme, "Theme should have been released before destructor.");
+
+ ReleaseObject(_taskbarList);
+ ReleaseDict(_overridableVariables);
+ ReleaseStr(_failedMessage);
+ ReleaseStr(_confirmCloseMessage);
+ BalConditionsUninitialize(&_conditions);
+ BalInfoUninitialize(&_bundle);
+ LocFree(_wixLoc);
+
+ ReleaseStr(_language);
+ ReleaseStr(_nextPackageAfterRestart);
+ ReleaseNullObject(_engine);
+
+ if (_hBAFModule) {
+ ::FreeLibrary(_hBAFModule);
+ _hBAFModule = nullptr;
+ }
+ }
+
+private:
+ HMODULE _hModule;
+ BOOTSTRAPPER_COMMAND _command;
+ IBootstrapperEngine* _engine;
+ BOOTSTRAPPER_ACTION _plannedAction;
+
+ LPWSTR _nextPackageAfterRestart;
+
+ WIX_LOCALIZATION* _wixLoc;
+ BAL_INFO_BUNDLE _bundle;
+ BAL_CONDITIONS _conditions;
+ LPWSTR _failedMessage;
+ LPWSTR _confirmCloseMessage;
+
+ LPWSTR _language;
+ THEME* _theme;
+ DWORD _pageIds[countof(PAGE_NAMES)];
+ HANDLE _hUiThread;
+ BOOL _registered;
+ HWND _hWnd;
+
+ PYBA_STATE _state;
+ HRESULT _hrFinal;
+ DWORD _visiblePageId;
+ PAGE _installPage;
+
+ BOOL _startedExecution;
+ DWORD _calculatedCacheProgress;
+ DWORD _calculatedExecuteProgress;
+
+ BOOL _downgradingOtherVersion;
+ BOOTSTRAPPER_APPLY_RESTART _restartResult;
+ BOOL _restartRequired;
+ BOOL _allowRestart;
+
+ BOOL _suppressDowngradeFailure;
+ BOOL _suppressRepair;
+ BOOL _modifying;
+ BOOL _upgrading;
+
+ int _crtInstalledToken;
+
+ STRINGDICT_HANDLE _overridableVariables;
+
+ ITaskbarList3* _taskbarList;
+ UINT _taskbarButtonCreatedMessage;
+ BOOL _taskbarButtonOK;
+ BOOL _showingInternalUIThisPackage;
+ BOOL _triedToLaunchElevated;
+
+ BOOL _suppressPaint;
+
+ HMODULE _hBAFModule;
+ IBootstrapperBAFunction* _baFunction;
+};
+
+//
+// CreateBootstrapperApplication - creates a new IBootstrapperApplication object.
+//
+HRESULT CreateBootstrapperApplication(
+ __in HMODULE hModule,
+ __in BOOL fPrereq,
+ __in HRESULT hrHostInitialization,
+ __in IBootstrapperEngine* pEngine,
+ __in const BOOTSTRAPPER_COMMAND* pCommand,
+ __out IBootstrapperApplication** ppApplication
+ ) {
+ HRESULT hr = S_OK;
+
+ if (fPrereq) {
+ hr = E_INVALIDARG;
+ ExitWithLastError(hr, "Failed to create UI thread.");
+ }
+
+ PythonBootstrapperApplication* pApplication = nullptr;
+
+ pApplication = new PythonBootstrapperApplication(hModule, fPrereq, hrHostInitialization, pEngine, pCommand);
+ ExitOnNull(pApplication, hr, E_OUTOFMEMORY, "Failed to create new standard bootstrapper application object.");
+
+ *ppApplication = pApplication;
+ pApplication = nullptr;
+
+LExit:
+ ReleaseObject(pApplication);
+ return hr;
+}
diff --git a/Tools/msi/bundle/bootstrap/pch.cpp b/Tools/msi/bundle/bootstrap/pch.cpp
new file mode 100644
index 0000000000..1d9f38c57d
--- /dev/null
+++ b/Tools/msi/bundle/bootstrap/pch.cpp
@@ -0,0 +1 @@
+#include "pch.h"
diff --git a/Tools/msi/bundle/bootstrap/pch.h b/Tools/msi/bundle/bootstrap/pch.h
new file mode 100644
index 0000000000..6a66fa5a51
--- /dev/null
+++ b/Tools/msi/bundle/bootstrap/pch.h
@@ -0,0 +1,60 @@
+//-------------------------------------------------------------------------------------------------
+// <copyright file="precomp.h" company="Outercurve Foundation">
+// Copyright (c) 2004, Outercurve Foundation.
+// This software is released under Microsoft Reciprocal License (MS-RL).
+// The license and further copyright text can be found in the file
+// LICENSE.TXT at the root directory of the distribution.
+// </copyright>
+//
+// <summary>
+// Precompiled header for standard bootstrapper application.
+// </summary>
+//-------------------------------------------------------------------------------------------------
+
+#pragma once
+
+#include <windows.h>
+#include <gdiplus.h>
+#include <Uxtheme.h>
+#include <msiquery.h>
+#include <objbase.h>
+#include <shlobj.h>
+#include <shlwapi.h>
+#include <stdlib.h>
+#include <strsafe.h>
+#include <stddef.h>
+#include <versionhelpers.h>
+
+#include "dutil.h"
+#include "memutil.h"
+#include "dictutil.h"
+#include "dirutil.h"
+#include "fileutil.h"
+#include "locutil.h"
+#include "logutil.h"
+#include "pathutil.h"
+#include "resrutil.h"
+#include "shelutil.h"
+#include "strutil.h"
+#include "thmutil.h"
+#include "uriutil.h"
+#include "xmlutil.h"
+
+#include "IBootstrapperEngine.h"
+#include "IBootstrapperApplication.h"
+
+#include "BalBaseBootstrapperApplication.h"
+#include "balinfo.h"
+#include "balcondition.h"
+
+HRESULT CreateBootstrapperApplication(
+ __in HMODULE hModule,
+ __in BOOL fPrereq,
+ __in HRESULT hrHostInitialization,
+ __in IBootstrapperEngine* pEngine,
+ __in const BOOTSTRAPPER_COMMAND* pCommand,
+ __out IBootstrapperApplication** ppApplication
+);
+
+#include "IBootstrapperBAFunction.h"
+
diff --git a/Tools/msi/bundle/bootstrap/pythonba.cpp b/Tools/msi/bundle/bootstrap/pythonba.cpp
new file mode 100644
index 0000000000..0ce45ad31d
--- /dev/null
+++ b/Tools/msi/bundle/bootstrap/pythonba.cpp
@@ -0,0 +1,76 @@
+//-------------------------------------------------------------------------------------------------
+// <copyright file="wixstdba.cpp" company="Outercurve Foundation">
+// Copyright (c) 2004, Outercurve Foundation.
+// This software is released under Microsoft Reciprocal License (MS-RL).
+// The license and further copyright text can be found in the file
+// LICENSE.TXT at the root directory of the distribution.
+// </copyright>
+//
+// <summary>
+// Setup chainer/bootstrapper standard UI for WiX toolset.
+// </summary>
+//-------------------------------------------------------------------------------------------------
+
+#include "pch.h"
+
+static HINSTANCE vhInstance = NULL;
+
+extern "C" BOOL WINAPI DllMain(
+ IN HINSTANCE hInstance,
+ IN DWORD dwReason,
+ IN LPVOID /* pvReserved */
+ )
+{
+ switch(dwReason)
+ {
+ case DLL_PROCESS_ATTACH:
+ ::DisableThreadLibraryCalls(hInstance);
+ vhInstance = hInstance;
+ break;
+
+ case DLL_PROCESS_DETACH:
+ vhInstance = NULL;
+ break;
+ }
+
+ return TRUE;
+}
+
+
+extern "C" HRESULT WINAPI BootstrapperApplicationCreate(
+ __in IBootstrapperEngine* pEngine,
+ __in const BOOTSTRAPPER_COMMAND* pCommand,
+ __out IBootstrapperApplication** ppApplication
+ )
+{
+ HRESULT hr = S_OK;
+
+ BalInitialize(pEngine);
+
+ hr = CreateBootstrapperApplication(vhInstance, FALSE, S_OK, pEngine, pCommand, ppApplication);
+ BalExitOnFailure(hr, "Failed to create bootstrapper application interface.");
+
+LExit:
+ return hr;
+}
+
+
+extern "C" void WINAPI BootstrapperApplicationDestroy()
+{
+ BalUninitialize();
+}
+
+
+extern "C" HRESULT WINAPI MbaPrereqBootstrapperApplicationCreate(
+ __in HRESULT hrHostInitialization,
+ __in IBootstrapperEngine* pEngine,
+ __in const BOOTSTRAPPER_COMMAND* pCommand,
+ __out IBootstrapperApplication** ppApplication
+ )
+{
+ return E_NOTIMPL;
+}
+
+
+extern "C" void WINAPI MbaPrereqBootstrapperApplicationDestroy()
+{ }
diff --git a/Tools/msi/bundle/bootstrap/pythonba.def b/Tools/msi/bundle/bootstrap/pythonba.def
new file mode 100644
index 0000000000..29b3fa50df
--- /dev/null
+++ b/Tools/msi/bundle/bootstrap/pythonba.def
@@ -0,0 +1,18 @@
+;-------------------------------------------------------------------------------------------------
+; <copyright file="wixstdba.def" company="Outercurve Foundation">
+; Copyright (c) 2004, Outercurve Foundation.
+; This software is released under Microsoft Reciprocal License (MS-RL).
+; The license and further copyright text can be found in the file
+; LICENSE.TXT at the root directory of the distribution.
+; </copyright>
+;
+; <summary>
+; WiX Standard Bootstrapper Application DLL entry points.
+; </summary>
+;-------------------------------------------------------------------------------------------------
+
+EXPORTS
+ BootstrapperApplicationCreate
+ BootstrapperApplicationDestroy
+ MbaPrereqBootstrapperApplicationCreate
+ MbaPrereqBootstrapperApplicationDestroy
diff --git a/Tools/msi/bundle/bootstrap/pythonba.sln b/Tools/msi/bundle/bootstrap/pythonba.sln
new file mode 100644
index 0000000000..bf43fed901
--- /dev/null
+++ b/Tools/msi/bundle/bootstrap/pythonba.sln
@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.30501.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonba", "pythonba.vcxproj", "{7A09B132-B3EE-499B-A700-A4B2157FEA3D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {7A09B132-B3EE-499B-A700-A4B2157FEA3D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {7A09B132-B3EE-499B-A700-A4B2157FEA3D}.Debug|Win32.Build.0 = Debug|Win32
+ {7A09B132-B3EE-499B-A700-A4B2157FEA3D}.Release|Win32.ActiveCfg = Release|Win32
+ {7A09B132-B3EE-499B-A700-A4B2157FEA3D}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Tools/msi/bundle/bootstrap/pythonba.vcxproj b/Tools/msi/bundle/bootstrap/pythonba.vcxproj
new file mode 100644
index 0000000000..be12957112
--- /dev/null
+++ b/Tools/msi/bundle/bootstrap/pythonba.vcxproj
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ <copyright file="wixstdba.vcxproj" company="Outercurve Foundation">
+ Copyright (c) 2004, Outercurve Foundation.
+ This software is released under Microsoft Reciprocal License (MS-RL).
+ The license and further copyright text can be found in the file
+ LICENSE.TXT at the root directory of the distribution.
+ </copyright>
+-->
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
+ <Platform Condition="'$(Platform)' == ''">Win32</Platform>
+ <PlatformToolset Condition="'$(PlatformToolset)' == '' and '$(VCTargetsPath14)' != ''">v140</PlatformToolset>
+ <PlatformToolset Condition="'$(PlatformToolset)' == '' and '$(VCTargetsPath12)' != ''">v120</PlatformToolset>
+ <ProjectGuid>{7A09B132-B3EE-499B-A700-A4B2157FEA3D}</ProjectGuid>
+ <TargetName>PythonBA</TargetName>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <Import Project="..\..\wix.props" />
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <IntDir>$(PySourcePath)PCBuild\obj\$(Configuration)_$(Platform)_Setup\Bootstrap\</IntDir>
+ <OutDir>$(IntDir)</OutDir>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <PreprocessorDefinitions>_CRT_STDIO_LEGACY_WIDE_SPECIFIERS=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(WixInstallPath)sdk\inc</AdditionalIncludeDirectories>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;gdiplus.lib;msimg32.lib;shlwapi.lib;wininet.lib;dutil.lib;balutil.lib;version.lib;uxtheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories Condition="'$(PlatformToolset)' == 'v140'">$(WixInstallPath)sdk\vs2015\lib\x86</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories Condition="'$(PlatformToolset)' == 'v120'">$(WixInstallPath)sdk\vs2013\lib\x86</AdditionalLibraryDirectories>
+ <ModuleDefinitionFile>pythonba.def</ModuleDefinitionFile>
+ <GenerateDebugInformation Condition="'$(Configuration)'=='Debug'">true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="PythonBootstrapperApplication.cpp" />
+ <ClCompile Include="pythonba.cpp" />
+ <ClCompile Include="pch.cpp">
+ <PrecompiledHeader>Create</PrecompiledHeader>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="pch.h" />
+ <ClInclude Include="resource.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="pythonba.def" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/bundle/bootstrap/resource.h b/Tools/msi/bundle/bootstrap/resource.h
new file mode 100644
index 0000000000..53c03c319f
--- /dev/null
+++ b/Tools/msi/bundle/bootstrap/resource.h
@@ -0,0 +1,25 @@
+//-------------------------------------------------------------------------------------------------
+// <copyright file="resource.h" company="Outercurve Foundation">
+// Copyright (c) 2004, Outercurve Foundation.
+// This software is released under Microsoft Reciprocal License (MS-RL).
+// The license and further copyright text can be found in the file
+// LICENSE.TXT at the root directory of the distribution.
+// </copyright>
+//-------------------------------------------------------------------------------------------------
+
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+//
+#define IDC_STATIC -1
+
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 102
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1003
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/Tools/msi/bundle/bundle.ico b/Tools/msi/bundle/bundle.ico
new file mode 100644
index 0000000000..1ab629eff2
--- /dev/null
+++ b/Tools/msi/bundle/bundle.ico
Binary files differ
diff --git a/Tools/msi/bundle/bundle.targets b/Tools/msi/bundle/bundle.targets
new file mode 100644
index 0000000000..aeeff3b710
--- /dev/null
+++ b/Tools/msi/bundle/bundle.targets
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" TreatAsLocalProperty="DownloadUrl">
+ <PropertyGroup>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputType>Bundle</OutputType>
+
+ <BootstrapConfiguration Condition="'$(BootstrapConfiguration)' == ''">Release</BootstrapConfiguration>
+ <LinkerSuppressSpecificWarnings>1132;1135;1140</LinkerSuppressSpecificWarnings>
+ <OutputName Condition="$(BuildForRelease)">$(OutputName)-$(PythonVersion)</OutputName>
+ <OutputName Condition="!$(BuildForRelease)">$(OutputName)-$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber).$(RevisionNumber)</OutputName>
+ <OutputName Condition="$(Platform) == 'x64'">$(OutputName)-amd64</OutputName>
+ <OutputName Condition="'$(OutputSuffix)' != ''">$(OutputName)-$(OutputSuffix)</OutputName>
+ <OutputName Condition="'$(Configuration)' == 'Debug'">$(OutputName)-d</OutputName>
+ <TargetName>$(OutputName)</TargetName>
+
+ <OutputPath>$(OutputPath)en-us\</OutputPath>
+ <OutDir>$(OutputPath)</OutDir>
+
+ <!-- See Tools/msi/buildrelease.bat for help on configuring the download URL -->
+ <DownloadUrl Condition="'$(DownloadUrl)' == '' and '$(DownloadUrlBase)' != ''">$(DownloadUrlBase.TrimEnd(`/`))/{version}/{arch}{releasename}/{msi}</DownloadUrl>
+ <DefineConstants Condition="'$(DownloadUrl)' != ''">$(DefineConstants);DownloadUrl=$(DownloadUrl.Replace(`{version}`, `$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)`).Replace(`{arch}`, `$(ArchName)`).Replace(`{releasename}`, `$(ReleaseLevelName)`).Replace(`{msi}`, `{2}`))</DefineConstants>
+ <DefineConstants Condition="'$(DownloadUrl)' == ''">$(DefineConstants);DownloadUrl={2}</DefineConstants>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <WixExtension Include="WixUtilExtension">
+ <HintPath>WixUtilExtension</HintPath>
+ <Name>WixUtilExtension</Name>
+ </WixExtension>
+ <WixExtension Include="WixDependencyExtension">
+ <HintPath>WixDependencyExtension</HintPath>
+ <Name>WixDependencyExtension</Name>
+ </WixExtension>
+ <WixExtension Include="WixBalExtension">
+ <HintPath>WixBalExtension</HintPath>
+ <Name>WixBalExtension</Name>
+ </WixExtension>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="bundle.wxs" />
+ <Compile Include="packagegroups\*.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="Default.thm" />
+ <Content Include="Default.wxl" />
+ <Content Include="SideBar.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="bundle.wxl" />
+ <WxlTemplate Include="*_en-US.wxl_template" />
+ </ItemGroup>
+ <ItemGroup>
+ <LinkerBindInputPaths Include="$(OutputPath)">
+ <BindName></BindName>
+ </LinkerBindInputPaths>
+ </ItemGroup>
+
+ <ItemDefinitionGroup>
+ <Package>
+ <Properties>BuildForRelease=$(BuildForRelease)</Properties>
+ </Package>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <Package Include="..\core\core*.wixproj" />
+ <Package Include="..\dev\dev*.wixproj" />
+ <Package Include="..\doc\doc*.wixproj" />
+ <Package Include="..\exe\exe*.wixproj" />
+ <Package Include="..\lib\lib*.wixproj" />
+ <Package Include="..\path\path*.wixproj" />
+ <Package Include="..\pip\pip*.wixproj" />
+ <Package Include="..\tcltk\tcltk*.wixproj" />
+ <Package Include="..\test\test*.wixproj" />
+ <Package Include="..\tools\tools*.wixproj" />
+ </ItemGroup>
+
+ <PropertyGroup>
+ <BuildPackagesTargets>Build</BuildPackagesTargets>
+ </PropertyGroup>
+
+ <Target Name="_SetRebuildTarget" BeforeTargets="BeforeRebuild">
+ <PropertyGroup>
+ <BuildPackagesTargets>Rebuild</BuildPackagesTargets>
+ </PropertyGroup>
+ </Target>
+
+ <Target Name="BuildPackages" BeforeTargets="BeforeBuild" Condition="'$(RebuildAll)' != 'false'">
+ <MSBuild Projects="@(Package)" Targets="$(BuildPackagesTargets)" BuildInParallel="true" />
+ </Target>
+
+ <Target Name="BuildLauncher" BeforeTargets="BeforeBuild" Condition="'$(RebuildAll)' != 'false'">
+ <!--
+ Build the launcher MSI using Exec rather than MSBuild
+ Also, never use the test marker for the launcher. It's going to corrupt things anyway, so we'll
+ just disable it by default.
+ -->
+ <Exec Command='msbuild ..\launcher\launcher.wixproj /p:Platform=x86 /p:ReleaseUri="$(ReleaseUri)" /p:OutputPath="$(BuildPath.TrimEnd(`\`))" /p:OutputSuffix=$(Platform) /p:BuildForRelease=$(BuildForRelease) /p:UseTestMarker=false'
+ ContinueOnError="false" />
+ </Target>
+
+ <Target Name="BuildBootstrapApplication" BeforeTargets="BeforeBuild">
+ <Message Text="Building bootstrap app" Importance="high" />
+
+ <MSBuild Projects="bootstrap\pythonba.vcxproj"
+ Targets="Build;GetNativeTargetPath"
+ UseResultsCache="true"
+ Properties="Configuration=$(BootstrapConfiguration);Platform=Win32">
+ <Output TaskParameter="TargetOutputs" PropertyName="BootstrapAppPath" />
+ </MSBuild>
+
+ <PropertyGroup>
+ <DefineConstants>$(DefineConstants);BootstrapApp=$(BootstrapAppPath)</DefineConstants>
+ </PropertyGroup>
+ </Target>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/bundle/bundle.wxl b/Tools/msi/bundle/bundle.wxl
new file mode 100644
index 0000000000..d7a65c48dc
--- /dev/null
+++ b/Tools/msi/bundle/bundle.wxl
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
+ <String Id="CRTDescription">C Runtime Update (KB2999226)</String>
+ <String Id="CompileAllDescription">Precompiling standard library</String>
+ <String Id="CompileAllODescription">Precompiling standard library (-O)</String>
+ <String Id="CompileAllOODescription">Precompiling standard library (-OO)</String>
+</WixLocalization>
diff --git a/Tools/msi/bundle/bundle.wxs b/Tools/msi/bundle/bundle.wxs
new file mode 100644
index 0000000000..38307e063c
--- /dev/null
+++ b/Tools/msi/bundle/bundle.wxs
@@ -0,0 +1,111 @@
+<?xml version="1.0"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
+ xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
+ <Bundle Name="!(loc.FullProductName)"
+ UpgradeCode="$(var.CoreUpgradeCode)"
+ Version="$(var.Version)"
+ IconSourceFile="bundle.ico"
+ Manufacturer="!(loc.Manufacturer)"
+ AboutUrl="http://www.python.org/"
+ DisableModify="button"
+ Compressed="no">
+ <BootstrapperApplication Id="PythonBA" SourceFile="$(var.BootstrapApp)">
+ <Payload Compressed='yes' SourceFile='Default.thm' />
+ <Payload Compressed='yes' SourceFile='Default.wxl' />
+ <Payload Compressed='yes' SourceFile='SideBar.png' />
+ </BootstrapperApplication>
+
+ <!-- May be set to "Removing" or "Repairing" -->
+ <Variable Name="ActionLikeInstalling" Value="Installing" />
+ <!-- May be set to "Uninstallation" or "Repair" -->
+ <Variable Name="ActionLikeInstallation" Value="Setup" />
+
+ <Variable Name="ShortVersion" Value="$(var.MajorVersionNumber).$(var.MinorVersionNumber)" />
+ <Variable Name="ShortVersionNoDot" Value="$(var.MajorVersionNumber)$(var.MinorVersionNumber)" />
+ <Variable Name="WinVer" Value="$(var.MajorVersionNumber).$(var.MinorVersionNumber)$(var.PyArchExt)$(var.PyTestExt)" />
+ <Variable Name="WinVerNoDot" Value="$(var.MajorVersionNumber)$(var.MinorVersionNumber)$(var.PyArchExt)$(var.PyTestExt)" />
+
+ <Variable Name="InstallAllUsers" Value="0" bal:Overridable="yes" />
+ <?if "$(var.PyTestExt)"="" ?>
+ <Variable Name="InstallLauncherAllUsers" Value="1" bal:Overridable="yes" />
+ <?else ?>
+ <Variable Name="InstallLauncherAllUsers" Value="0" />
+ <?endif ?>
+ <Variable Name="TargetDir" Value="" bal:Overridable="yes" />
+ <?if $(var.Platform)~="x64" ?>
+ <Variable Name="DefaultAllUsersTargetDir" Value="[ProgramFiles64Folder]Python[WinVerNoDot]" bal:Overridable="yes" />
+ <Variable Name="TargetPlatform" Value="x64" />
+ <?else ?>
+ <Variable Name="DefaultAllUsersTargetDir" Value="[ProgramFilesFolder]Python[WinVerNoDot]" bal:Overridable="yes" />
+ <Variable Name="TargetPlatform" Value="x86" />
+ <?endif ?>
+ <Variable Name="DefaultJustForMeTargetDir" Value="[LocalAppDataFolder]Programs\Python\Python[WinVerNoDot]" bal:Overridable="yes" />
+ <Variable Name="OptionalFeaturesRegistryKey" Value="Software\Python\PythonCore\[WinVer]\InstalledFeatures" />
+ <Variable Name="TargetDirRegistryKey" Value="Software\Python\PythonCore\[WinVer]\InstallPath" />
+
+ <!--
+ An empty string will use the other defaults based on InstallAllUsers
+ (and switch dynamically in the UI). To get the old default, pass
+ this property on the command line:
+ DefaultCustomTargetDir=[WindowsVolume]Python[ShortVersionNoDot]
+ -->
+ <Variable Name="DefaultCustomTargetDir" Value="" bal:Overridable="yes" />
+
+ <Variable Name="InstallAllUsersState" Value="enabled" bal:Overridable="yes" />
+ <?if "$(var.PyTestExt)"="" ?>
+ <Variable Name="InstallLauncherAllUsersState" Value="enabled" bal:Overridable="yes" />
+ <?else ?>
+ <Variable Name="InstallLauncherAllUsersState" Value="disable" bal:Overridable="yes" />
+ <?endif ?>
+ <Variable Name="CustomInstallLauncherAllUsersState" Value="[InstallLauncherAllUsersState]" />
+ <Variable Name="TargetDirState" Value="enabled" />
+ <Variable Name="CustomBrowseButtonState" Value="enabled" />
+
+ <Variable Name="Include_core" Value="1" />
+ <Variable Name="Include_exe" Value="1" bal:Overridable="yes" />
+ <Variable Name="Include_dev" Value="1" bal:Overridable="yes" />
+ <Variable Name="Include_lib" Value="1" bal:Overridable="yes" />
+ <Variable Name="Include_test" Value="1" bal:Overridable="yes" />
+ <Variable Name="Include_doc" Value="1" bal:Overridable="yes" />
+ <Variable Name="Include_tools" Value="1" bal:Overridable="yes" />
+ <Variable Name="Include_tcltk" Value="1" bal:Overridable="yes" />
+ <Variable Name="Include_pip" Value="1" bal:Overridable="yes" />
+ <?if "$(var.PyTestExt)"="" ?>
+ <Variable Name="Include_launcher" Value="1" bal:Overridable="yes" />
+ <Variable Name="Include_launcherState" Value="enabled" bal:Overridable="yes" />
+ <?else ?>
+ <Variable Name="Include_launcher" Value="0" />
+ <Variable Name="Include_launcherState" Value="disable" />
+ <?endif ?>
+ <Variable Name="Include_symbols" Value="0" bal:Overridable="yes" />
+ <Variable Name="Include_debug" Value="0" bal:Overridable="yes" />
+
+ <Variable Name="LauncherOnly" Value="0" bal:Overridable="yes" />
+ <Variable Name="DetectedLauncher" Value="0" />
+ <Variable Name="DetectedOldLauncher" Value="0" />
+
+ <Variable Name="AssociateFiles" Value="1" bal:Overridable="yes" />
+ <Variable Name="Shortcuts" Value="1" bal:Overridable="yes" />
+ <Variable Name="PrependPath" Value="0" bal:Overridable="yes" />
+ <Variable Name="CompileAll" Value="0" bal:Overridable="yes" />
+
+ <Variable Name="SimpleInstall" Value="0" bal:Overridable="yes" />
+ <Variable Name="SimpleInstallDescription" Value="" bal:Overridable="yes" />
+
+ <Chain ParallelCache="yes">
+ <PackageGroupRef Id="crt" />
+ <PackageGroupRef Id="core" />
+ <PackageGroupRef Id="dev" />
+ <PackageGroupRef Id="exe" />
+ <PackageGroupRef Id="lib" />
+ <PackageGroupRef Id="test" />
+ <PackageGroupRef Id="doc" />
+ <PackageGroupRef Id="tools" />
+ <PackageGroupRef Id="tcltk" />
+ <PackageGroupRef Id="launcher" />
+ <PackageGroupRef Id="pip" />
+ <PackageGroupRef Id="packageinstall" />
+ <PackageGroupRef Id="postinstall" />
+ </Chain>
+ </Bundle>
+</Wix>
diff --git a/Tools/msi/bundle/full.wixproj b/Tools/msi/bundle/full.wixproj
new file mode 100644
index 0000000000..bdbdd8e175
--- /dev/null
+++ b/Tools/msi/bundle/full.wixproj
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{3E204ADD-238D-4D10-852C-4F859325C839}</ProjectGuid>
+ <OutputName>python</OutputName>
+ <OutputSuffix>full</OutputSuffix>
+ </PropertyGroup>
+
+ <Import Project="..\msi.props" />
+
+ <PropertyGroup>
+ <DefineConstants>
+ $(DefineConstants);
+ CompressMSI=yes;
+ CompressPDB=yes;
+ CompressMSI_D=yes;
+ </DefineConstants>
+ </PropertyGroup>
+
+ <Import Project="bundle.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/bundle/packagegroups/core.wxs b/Tools/msi/bundle/packagegroups/core.wxs
new file mode 100644
index 0000000000..eb3d0b7733
--- /dev/null
+++ b/Tools/msi/bundle/packagegroups/core.wxs
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <PackageGroup Id="core">
+ <MsiPackage Id="core_AllUsers"
+ SourceFile="core.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ InstallCondition="InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip) and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="core_AllUsers_pdb"
+ SourceFile="core_pdb.msi"
+ Compressed="$(var.CompressPDB)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ InstallCondition="InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip) and Include_symbols and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="core_AllUsers_d"
+ SourceFile="core_d.msi"
+ Compressed="$(var.CompressMSI_D)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ InstallCondition="InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip) and Include_debug and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+
+ <MsiPackage Id="core_JustForMe"
+ SourceFile="core.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ InstallCondition="not InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip) and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="core_JustForMe_pdb"
+ SourceFile="core_pdb.msi"
+ Compressed="$(var.CompressPDB)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ InstallCondition="not InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip) and Include_symbols and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="core_JustForMe_d"
+ SourceFile="core_d.msi"
+ Compressed="$(var.CompressMSI_D)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ InstallCondition="not InstallAllUsers and (Include_core or Include_exe or Include_launcher or Include_pip) and Include_debug and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ </PackageGroup>
+ </Fragment>
+</Wix> \ No newline at end of file
diff --git a/Tools/msi/bundle/packagegroups/crt.wxs b/Tools/msi/bundle/packagegroups/crt.wxs
new file mode 100644
index 0000000000..dc4047590e
--- /dev/null
+++ b/Tools/msi/bundle/packagegroups/crt.wxs
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <PackageGroup Id="crt">
+ <PackageGroupRef Id="crt_14.0_v6.0" />
+ <PackageGroupRef Id="crt_14.0_v6.1" />
+ <PackageGroupRef Id="crt_14.0_v6.2" />
+ <PackageGroupRef Id="crt_14.0_v6.3" />
+ </PackageGroup>
+ </Fragment>
+
+ <?foreach ver in v6.0;v6.1;v6.2;v6.3 ?>
+ <?if "$(var.ver)" = "v6.0" ?>
+ <?define msuver=6.0 ?>
+ <?elseif "$(var.ver)" = "v6.1" ?>
+ <?define msuver=6.1 ?>
+ <?elseif "$(var.ver)" = "v6.2" ?>
+ <?define msuver=8-RT ?>
+ <?elseif "$(var.ver)" = "v6.3" ?>
+ <?define msuver=8.1 ?>
+ <?else ?>
+ <?error unknown version $(var.ver) ?>
+ <?endif ?>
+
+ <Fragment>
+ <PackageGroup Id="crt_14.0_$(var.ver)">
+ <MsuPackage Id="crt_14.0_$(var.ver)_x86"
+ KB="2999226"
+ SourceFile="!(bindpath.redist)\Windows$(var.msuver)-KB2999226-x86.msu"
+ DisplayName="!(loc.CRTDescription)"
+ Description="!(loc.CRTDescription)"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ InstallCondition="not CRTInstalled and VersionNT = $(var.ver) and not VersionNT64 and (Include_core or Include_exe or Include_launcher or Include_pip) and not LauncherOnly" />
+
+ <MsuPackage Id="crt_14.0_$(var.ver)_x64"
+ KB="2999226"
+ SourceFile="!(bindpath.redist)\Windows$(var.msuver)-KB2999226-x64.msu"
+ DisplayName="!(loc.CRTDescription)"
+ Description="!(loc.CRTDescription)"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ InstallCondition="not CRTInstalled and VersionNT64 = $(var.ver) and (Include_core or Include_exe or Include_launcher or Include_pip) and not LauncherOnly" />
+ </PackageGroup>
+ </Fragment>
+
+ <?undef msuver ?>
+ <?endforeach ?>
+</Wix> \ No newline at end of file
diff --git a/Tools/msi/bundle/packagegroups/dev.wxs b/Tools/msi/bundle/packagegroups/dev.wxs
new file mode 100644
index 0000000000..4284dba2c2
--- /dev/null
+++ b/Tools/msi/bundle/packagegroups/dev.wxs
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <PackageGroup Id="dev">
+ <MsiPackage Id="dev_AllUsers"
+ SourceFile="dev.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ InstallCondition="InstallAllUsers and Include_dev and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="dev_AllUsers_d"
+ SourceFile="dev_d.msi"
+ Compressed="$(var.CompressMSI_D)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ InstallCondition="InstallAllUsers and Include_dev and Include_debug and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+
+ <MsiPackage Id="dev_JustForMe"
+ SourceFile="dev.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ InstallCondition="not InstallAllUsers and Include_dev and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="dev_JustForMe_d"
+ SourceFile="dev_d.msi"
+ Compressed="$(var.CompressMSI_D)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ InstallCondition="not InstallAllUsers and Include_dev and Include_debug and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ </PackageGroup>
+ </Fragment>
+</Wix> \ No newline at end of file
diff --git a/Tools/msi/bundle/packagegroups/doc.wxs b/Tools/msi/bundle/packagegroups/doc.wxs
new file mode 100644
index 0000000000..6639ff5c25
--- /dev/null
+++ b/Tools/msi/bundle/packagegroups/doc.wxs
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <PackageGroup Id="doc">
+ <MsiPackage Id="doc_AllUsers"
+ SourceFile="doc.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ EnableFeatureSelection="yes"
+ ForcePerMachine="yes"
+ InstallCondition="InstallAllUsers and Include_doc and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+
+ <MsiPackage Id="doc_JustForMe"
+ SourceFile="doc.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ EnableFeatureSelection="yes"
+ ForcePerMachine="no"
+ InstallCondition="not InstallAllUsers and Include_doc and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ </PackageGroup>
+ </Fragment>
+</Wix> \ No newline at end of file
diff --git a/Tools/msi/bundle/packagegroups/exe.wxs b/Tools/msi/bundle/packagegroups/exe.wxs
new file mode 100644
index 0000000000..79464c4aca
--- /dev/null
+++ b/Tools/msi/bundle/packagegroups/exe.wxs
@@ -0,0 +1,64 @@
+<?xml version="1.0"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <PackageGroup Id="exe">
+ <MsiPackage Id="exe_AllUsers"
+ SourceFile="exe.msi"
+ ForcePerMachine="yes"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ EnableFeatureSelection="yes"
+ InstallCondition="InstallAllUsers and (Include_exe or Include_launcher or Include_pip) and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="exe_AllUsers_pdb"
+ SourceFile="exe_pdb.msi"
+ ForcePerMachine="yes"
+ Compressed="$(var.CompressPDB)"
+ DownloadUrl="$(var.DownloadUrl)"
+ InstallCondition="InstallAllUsers and (Include_exe or Include_launcher or Include_pip) and Include_symbols and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="exe_AllUsers_d"
+ SourceFile="exe_d.msi"
+ ForcePerMachine="yes"
+ Compressed="$(var.CompressMSI_D)"
+ DownloadUrl="$(var.DownloadUrl)"
+ InstallCondition="InstallAllUsers and (Include_exe or Include_launcher or Include_pip) and Include_debug and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+
+ <MsiPackage Id="exe_JustForMe"
+ SourceFile="exe.msi"
+ ForcePerMachine="no"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ EnableFeatureSelection="yes"
+ InstallCondition="not InstallAllUsers and (Include_exe or Include_launcher or Include_pip) and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="exe_JustForMe_pdb"
+ SourceFile="exe_pdb.msi"
+ ForcePerMachine="no"
+ Compressed="$(var.CompressPDB)"
+ DownloadUrl="$(var.DownloadUrl)"
+ InstallCondition="not InstallAllUsers and (Include_exe or Include_launcher or Include_pip) and Include_symbols and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="exe_JustForMe_d"
+ SourceFile="exe_d.msi"
+ ForcePerMachine="no"
+ Compressed="$(var.CompressMSI_D)"
+ DownloadUrl="$(var.DownloadUrl)"
+ InstallCondition="not InstallAllUsers and (Include_exe or Include_launcher or Include_pip) and Include_debug and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ </PackageGroup>
+ </Fragment>
+</Wix> \ No newline at end of file
diff --git a/Tools/msi/bundle/packagegroups/launcher.wxs b/Tools/msi/bundle/packagegroups/launcher.wxs
new file mode 100644
index 0000000000..4444f45a98
--- /dev/null
+++ b/Tools/msi/bundle/packagegroups/launcher.wxs
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <PackageGroup Id="launcher">
+ <!-- The All Users launcher is always the 32-bit version -->
+ <MsiPackage Id="launcher_AllUsers"
+ SourceFile="launcher.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ EnableFeatureSelection="yes"
+ Permanent="yes"
+ Visible="yes"
+ InstallCondition="(InstallAllUsers or InstallLauncherAllUsers) and Include_launcher and not DetectedLauncher" />
+
+ <MsiPackage Id="launcher_JustForMe"
+ SourceFile="launcher.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ EnableFeatureSelection="yes"
+ Permanent="yes"
+ Visible="yes"
+ InstallCondition="not (InstallAllUsers or InstallLauncherAllUsers) and Include_launcher and not DetectedLauncher" />
+ </PackageGroup>
+ </Fragment>
+</Wix> \ No newline at end of file
diff --git a/Tools/msi/bundle/packagegroups/lib.wxs b/Tools/msi/bundle/packagegroups/lib.wxs
new file mode 100644
index 0000000000..0b3fbc00c4
--- /dev/null
+++ b/Tools/msi/bundle/packagegroups/lib.wxs
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <PackageGroup Id="lib">
+ <MsiPackage Id="lib_AllUsers"
+ SourceFile="lib.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ InstallCondition="InstallAllUsers and Include_lib and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="lib_AllUsers_pdb"
+ SourceFile="lib_pdb.msi"
+ Compressed="$(var.CompressPDB)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ InstallCondition="InstallAllUsers and Include_lib and Include_symbols and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="lib_AllUsers_d"
+ SourceFile="lib_d.msi"
+ Compressed="$(var.CompressMSI_D)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ InstallCondition="InstallAllUsers and Include_lib and Include_debug and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+
+ <MsiPackage Id="lib_JustForMe"
+ SourceFile="lib.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ InstallCondition="not InstallAllUsers and Include_lib and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="lib_JustForMe_pdb"
+ SourceFile="lib_pdb.msi"
+ Compressed="$(var.CompressPDB)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ InstallCondition="not InstallAllUsers and Include_lib and Include_symbols and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="lib_JustForMe_d"
+ SourceFile="lib_d.msi"
+ Compressed="$(var.CompressMSI_D)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ InstallCondition="not InstallAllUsers and Include_lib and Include_debug and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ </PackageGroup>
+ </Fragment>
+</Wix> \ No newline at end of file
diff --git a/Tools/msi/bundle/packagegroups/packageinstall.wxs b/Tools/msi/bundle/packagegroups/packageinstall.wxs
new file mode 100644
index 0000000000..e5e7d4d1a9
--- /dev/null
+++ b/Tools/msi/bundle/packagegroups/packageinstall.wxs
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <PackageGroup Id="packageinstall">
+ <!--
+ This is an example of installing a package using pip as part of main install.
+
+ For a network-only install, remove the Payload element and change the install
+ command to specify the package and (optionally) version specifier.
+
+ <ExePackage Id="requests"
+ SourceFile="py.exe"
+ Compressed="yes"
+ DisplayName="!(loc.CompileAllDescription)"
+ InstallCommand='-[WinVer] -m pip install requests-2.7.0-py2.py3-none-any.whl'
+ UninstallCommand='-[WinVer] -m pip uninstall -y requests'
+ Vital="no"
+ InstallCondition="Include_pip and not LauncherOnly">
+ <Payload SourceFile="requests-2.7.0-py2.py3-none-any.whl"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)" />
+ </ExePackage>
+ -->
+ </PackageGroup>
+ </Fragment>
+</Wix> \ No newline at end of file
diff --git a/Tools/msi/bundle/packagegroups/pip.wxs b/Tools/msi/bundle/packagegroups/pip.wxs
new file mode 100644
index 0000000000..201a6c445b
--- /dev/null
+++ b/Tools/msi/bundle/packagegroups/pip.wxs
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <PackageGroup Id="pip">
+ <MsiPackage Id="pip_AllUsers"
+ SourceFile="pip.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ InstallCondition="InstallAllUsers and Include_pip and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="pip_JustForMe"
+ SourceFile="pip.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ InstallCondition="not InstallAllUsers and Include_pip and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ </PackageGroup>
+ </Fragment>
+</Wix> \ No newline at end of file
diff --git a/Tools/msi/bundle/packagegroups/postinstall.wxs b/Tools/msi/bundle/packagegroups/postinstall.wxs
new file mode 100644
index 0000000000..11ab673907
--- /dev/null
+++ b/Tools/msi/bundle/packagegroups/postinstall.wxs
@@ -0,0 +1,88 @@
+<?xml version="1.0"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <PackageGroup Id="postinstall">
+ <MsiPackage Id="path_AllUsers"
+ SourceFile="path.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ InstallCondition="InstallAllUsers and PrependPath and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="path_JustForMe"
+ SourceFile="path.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ InstallCondition="not InstallAllUsers and PrependPath and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+
+ <?define CompileAllCommand=-E -s -Wi "[TargetDir]\Lib\compileall.py" -f -x "bad_coding|badsyntax|site-packages|py2_|lib2to3\\tests|venv\\scripts" "[TargetDir]\Lib"?>
+ <ExePackage Id="compileall_AllUsers"
+ SourceFile="py.exe"
+ Compressed="yes"
+ DisplayName="!(loc.CompileAllDescription)"
+ InstallCommand='-[WinVer] $(var.CompileAllCommand)'
+ RepairCommand='-[WinVer] $(var.CompileAllCommand)'
+ Permanent="yes"
+ PerMachine="yes"
+ Vital="no"
+ InstallCondition="InstallAllUsers and CompileAll and not LauncherOnly" />
+ <ExePackage Id="compileallO_AllUsers"
+ SourceFile="py.exe"
+ Compressed="yes"
+ DisplayName="!(loc.CompileAllODescription)"
+ InstallCommand='-[WinVer] -O $(var.CompileAllCommand)'
+ RepairCommand='-[WinVer] -O $(var.CompileAllCommand)'
+ Permanent="yes"
+ PerMachine="yes"
+ Vital="no"
+ InstallCondition="InstallAllUsers and CompileAll and not LauncherOnly" />
+ <ExePackage Id="compileallOO_AllUsers"
+ SourceFile="py.exe"
+ Compressed="yes"
+ DisplayName="!(loc.CompileAllOODescription)"
+ InstallCommand='-[WinVer] -OO $(var.CompileAllCommand)'
+ RepairCommand='-[WinVer] -OO $(var.CompileAllCommand)'
+ Permanent="yes"
+ PerMachine="yes"
+ Vital="no"
+ InstallCondition="InstallAllUsers and CompileAll and not LauncherOnly" />
+
+ <ExePackage Id="compileall_JustForMe"
+ SourceFile="py.exe"
+ Compressed="yes"
+ DisplayName="!(loc.CompileAllDescription)"
+ InstallCommand='-[WinVer] $(var.CompileAllCommand)'
+ RepairCommand='-[WinVer] $(var.CompileAllCommand)'
+ Permanent="yes"
+ PerMachine="no"
+ Vital="no"
+ InstallCondition="not InstallAllUsers and CompileAll and not LauncherOnly" />
+ <ExePackage Id="compileallO_JustForMe"
+ SourceFile="py.exe"
+ Compressed="yes"
+ DisplayName="!(loc.CompileAllODescription)"
+ InstallCommand='-[WinVer] -O $(var.CompileAllCommand)'
+ RepairCommand='-[WinVer] -O $(var.CompileAllCommand)'
+ Permanent="yes"
+ PerMachine="no"
+ Vital="no"
+ InstallCondition="not InstallAllUsers and CompileAll and not LauncherOnly" />
+ <ExePackage Id="compileallOO_JustForMe"
+ SourceFile="py.exe"
+ Compressed="yes"
+ DisplayName="!(loc.CompileAllOODescription)"
+ InstallCommand='-[WinVer] -OO $(var.CompileAllCommand)'
+ RepairCommand='-[WinVer] -OO $(var.CompileAllCommand)'
+ Permanent="yes"
+ PerMachine="no"
+ Vital="no"
+ InstallCondition="not InstallAllUsers and CompileAll and not LauncherOnly" />
+ </PackageGroup>
+ </Fragment>
+</Wix> \ No newline at end of file
diff --git a/Tools/msi/bundle/packagegroups/tcltk.wxs b/Tools/msi/bundle/packagegroups/tcltk.wxs
new file mode 100644
index 0000000000..0d029a90cd
--- /dev/null
+++ b/Tools/msi/bundle/packagegroups/tcltk.wxs
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <PackageGroup Id="tcltk">
+ <MsiPackage Id="tcltk_AllUsers"
+ SourceFile="tcltk.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ EnableFeatureSelection="yes"
+ InstallCondition="InstallAllUsers and Include_tcltk and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="tcltk_AllUsers_pdb"
+ SourceFile="tcltk_pdb.msi"
+ Compressed="$(var.CompressPDB)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ EnableFeatureSelection="yes"
+ InstallCondition="InstallAllUsers and Include_tcltk and Include_symbols and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="tcltk_AllUsers_d"
+ SourceFile="tcltk_d.msi"
+ Compressed="$(var.CompressMSI_D)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ EnableFeatureSelection="yes"
+ InstallCondition="InstallAllUsers and Include_tcltk and Include_debug and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+
+ <MsiPackage Id="tcltk_JustForMe"
+ SourceFile="tcltk.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ EnableFeatureSelection="yes"
+ InstallCondition="not InstallAllUsers and Include_tcltk and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="tcltk_JustForMe_pdb"
+ SourceFile="tcltk_pdb.msi"
+ Compressed="$(var.CompressPDB)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ EnableFeatureSelection="yes"
+ InstallCondition="not InstallAllUsers and Include_tcltk and Include_symbols and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="tcltk_JustForMe_d"
+ SourceFile="tcltk_d.msi"
+ Compressed="$(var.CompressMSI_D)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ EnableFeatureSelection="yes"
+ InstallCondition="not InstallAllUsers and Include_tcltk and Include_debug and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ </PackageGroup>
+ </Fragment>
+</Wix> \ No newline at end of file
diff --git a/Tools/msi/bundle/packagegroups/test.wxs b/Tools/msi/bundle/packagegroups/test.wxs
new file mode 100644
index 0000000000..32acaef64e
--- /dev/null
+++ b/Tools/msi/bundle/packagegroups/test.wxs
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <PackageGroup Id="test">
+ <MsiPackage Id="test_AllUsers"
+ SourceFile="test.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ InstallCondition="InstallAllUsers and Include_test and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="test_AllUsers_pdb"
+ SourceFile="test_pdb.msi"
+ Compressed="$(var.CompressPDB)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ InstallCondition="InstallAllUsers and Include_test and Include_symbols and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="test_AllUsers_d"
+ SourceFile="test_d.msi"
+ Compressed="$(var.CompressMSI_D)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ InstallCondition="InstallAllUsers and Include_test and Include_debug and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+
+ <MsiPackage Id="test_JustForMe"
+ SourceFile="test.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ InstallCondition="not InstallAllUsers and Include_test and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="test_JustForMe_pdb"
+ SourceFile="test_pdb.msi"
+ Compressed="$(var.CompressPDB)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ InstallCondition="not InstallAllUsers and Include_test and Include_symbols and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ <MsiPackage Id="test_JustForMe_d"
+ SourceFile="test_d.msi"
+ Compressed="$(var.CompressMSI_D)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ InstallCondition="not InstallAllUsers and Include_test and Include_debug and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ </PackageGroup>
+ </Fragment>
+</Wix> \ No newline at end of file
diff --git a/Tools/msi/bundle/packagegroups/tools.wxs b/Tools/msi/bundle/packagegroups/tools.wxs
new file mode 100644
index 0000000000..1d9ab19f3e
--- /dev/null
+++ b/Tools/msi/bundle/packagegroups/tools.wxs
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <PackageGroup Id="tools">
+ <MsiPackage Id="tools_AllUsers"
+ SourceFile="tools.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="yes"
+ InstallCondition="InstallAllUsers and Include_tools and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+
+ <MsiPackage Id="tools_JustForMe"
+ SourceFile="tools.msi"
+ Compressed="$(var.CompressMSI)"
+ DownloadUrl="$(var.DownloadUrl)"
+ ForcePerMachine="no"
+ InstallCondition="not InstallAllUsers and Include_tools and not LauncherOnly">
+ <MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
+ <MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
+ </MsiPackage>
+ </PackageGroup>
+ </Fragment>
+</Wix> \ No newline at end of file
diff --git a/Tools/msi/bundle/releaselocal.wixproj b/Tools/msi/bundle/releaselocal.wixproj
new file mode 100644
index 0000000000..0c3dee7ad8
--- /dev/null
+++ b/Tools/msi/bundle/releaselocal.wixproj
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{FCD43AC9-969F-49A1-8AC5-EDC27599D1EB}</ProjectGuid>
+ <OutputName>python</OutputName>
+ <OutputSuffix></OutputSuffix>
+ </PropertyGroup>
+
+ <Import Project="..\msi.props" />
+
+ <PropertyGroup>
+ <DefineConstants>
+ $(DefineConstants);
+ CompressMSI=yes;
+ CompressPDB=no;
+ CompressMSI_D=no
+ </DefineConstants>
+ </PropertyGroup>
+
+ <Import Project="bundle.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/bundle/releaseweb.wixproj b/Tools/msi/bundle/releaseweb.wixproj
new file mode 100644
index 0000000000..350c735878
--- /dev/null
+++ b/Tools/msi/bundle/releaseweb.wixproj
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{71CDE213-CB39-4BD9-B89D-BBB878689144}</ProjectGuid>
+ <OutputName>python</OutputName>
+ <OutputSuffix>webinstall</OutputSuffix>
+ </PropertyGroup>
+
+ <Import Project="..\msi.props" />
+
+ <PropertyGroup>
+ <DefineConstants>
+ $(DefineConstants);
+ CompressMSI=no;
+ CompressPDB=no;
+ CompressMSI_D=no
+ </DefineConstants>
+ </PropertyGroup>
+
+ <Import Project="bundle.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/bundle/snapshot.wixproj b/Tools/msi/bundle/snapshot.wixproj
new file mode 100644
index 0000000000..cc45043299
--- /dev/null
+++ b/Tools/msi/bundle/snapshot.wixproj
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{8A4A1162-4BF9-4FF6-9A98-315F01E44932}</ProjectGuid>
+ <OutputName>python</OutputName>
+ <OutputSuffix></OutputSuffix>
+ </PropertyGroup>
+
+ <Import Project="..\msi.props" />
+
+ <PropertyGroup>
+ <DefineConstants Condition="'$(Pack)' != 'true'">
+ $(DefineConstants);CompressMSI=no;
+ </DefineConstants>
+ <DefineConstants Condition="'$(Pack)' == 'true'">
+ $(DefineConstants);CompressMSI=yes;
+ </DefineConstants>
+ <DefineConstants>
+ $(DefineConstants);
+ CompressPDB=no;
+ CompressMSI_D=no;
+ </DefineConstants>
+ </PropertyGroup>
+
+ <Import Project="bundle.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/common.wxs b/Tools/msi/common.wxs
new file mode 100644
index 0000000000..4efad6562a
--- /dev/null
+++ b/Tools/msi/common.wxs
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <Property Id="REGISTRYKEY" Value="Software\Python\PythonCore\$(var.ShortVersion)$(var.PyArchExt)$(var.PyTestExt)" />
+ </Fragment>
+
+ <Fragment>
+ <Component Id="OptionalFeature" Guid="*" Directory="InstallDirectory">
+ <Condition>OPTIONALFEATURESREGISTRYKEY</Condition>
+ <RegistryKey Root="HKMU" Key="[OPTIONALFEATURESREGISTRYKEY]">
+ <RegistryValue Type="string" Name="$(var.OptionalFeatureName)" Value="$(var.Version)" KeyPath="yes" />
+ </RegistryKey>
+ </Component>
+ </Fragment>
+
+ <Fragment>
+ <Property Id="UpgradeTable" Value="1" />
+
+ <Upgrade Id="$(var.UpgradeCode)">
+ <UpgradeVersion Property="DOWNGRADE" Minimum="$(var.Version)" IncludeMinimum="no" OnlyDetect="yes" />
+ <UpgradeVersion Property="UPGRADE" Minimum="$(var.UpgradeMinimumVersion)" IncludeMinimum="yes" Maximum="$(var.Version)" IncludeMaximum="no" />
+ </Upgrade>
+
+ <?ifdef CoreUpgradeCode ?>
+ <?if $(var.UpgradeCode)!=$(var.CoreUpgradeCode) ?>
+ <Upgrade Id="$(var.CoreUpgradeCode)">
+ <UpgradeVersion Property="MISSING_CORE" Minimum="$(var.Version)" IncludeMinimum="yes" Maximum="$(var.Version)" IncludeMaximum="yes" OnlyDetect="yes" />
+ </Upgrade>
+ <Condition Message="!(loc.IncorrectCore)">Installed OR NOT MISSING_CORE</Condition>
+ <?endif ?>
+ <?endif ?>
+
+ <Condition Message="!(loc.NoDowngrade)">Installed OR NOT DOWNGRADE</Condition>
+ <Condition Message="!(loc.NoTargetDir)">Installed OR TARGETDIR OR Suppress_TARGETDIR_Check</Condition>
+
+ <InstallExecuteSequence>
+ <RemoveExistingProducts After="InstallInitialize" Overridable="yes">UPGRADE</RemoveExistingProducts>
+ </InstallExecuteSequence>
+ </Fragment>
+
+ <Fragment>
+ <!-- Include an icon for the Programs and Features dialog -->
+ <Icon Id="ARPIcon" SourceFile="!(bindpath.src)PC\pycon.ico" />
+ <Property Id="ARPPRODUCTICON" Value="ARPIcon" />
+ <Property Id="ARPNOMODIFY" Value="1" />
+ <Property Id="DISABLEADVTSHORTCUTS" Value="1" />
+ </Fragment>
+
+ <Fragment>
+ <?ifdef InstallDirectoryGuidSeed ?>
+ <Directory Id="TARGETDIR" Name="SourceDir">
+ <Directory Id="InstallDirectory" ComponentGuidGenerationSeed="$(var.InstallDirectoryGuidSeed)" />
+ </Directory>
+ <?endif ?>
+ </Fragment>
+
+ <!-- Top-level directories -->
+ <Fragment>
+ <DirectoryRef Id="InstallDirectory">
+ <Directory Id="DLLs" Name="DLLs" />
+ </DirectoryRef>
+ </Fragment>
+
+ <Fragment>
+ <DirectoryRef Id="InstallDirectory">
+ <Directory Id="Doc" Name="Doc" />
+ </DirectoryRef>
+ </Fragment>
+
+ <Fragment>
+ <DirectoryRef Id="InstallDirectory">
+ <Directory Id="include" Name="include" />
+ </DirectoryRef>
+ </Fragment>
+
+ <Fragment>
+ <DirectoryRef Id="InstallDirectory">
+ <Directory Id="Lib" Name="Lib" />
+ </DirectoryRef>
+ </Fragment>
+
+ <Fragment>
+ <DirectoryRef Id="InstallDirectory">
+ <Directory Id="libs" Name="libs" />
+ </DirectoryRef>
+ </Fragment>
+
+ <Fragment>
+ <DirectoryRef Id="InstallDirectory">
+ <Directory Id="Scripts" Name="Scripts" />
+ </DirectoryRef>
+ </Fragment>
+
+ <Fragment>
+ <DirectoryRef Id="InstallDirectory">
+ <Directory Id="tcl" Name="tcl" />
+ </DirectoryRef>
+ </Fragment>
+
+ <Fragment>
+ <DirectoryRef Id="InstallDirectory">
+ <Directory Id="Tools" Name="Tools" />
+ </DirectoryRef>
+ </Fragment>
+
+ <!-- Start Menu folder -->
+ <Fragment>
+ <DirectoryRef Id="TARGETDIR">
+ <Directory Id="ProgramMenuFolder">
+ <Directory Id="MenuDir" Name="!(loc.ProductName)" />
+ </Directory>
+ </DirectoryRef>
+ </Fragment>
+</Wix>
diff --git a/Tools/msi/common_en-US.wxl_template b/Tools/msi/common_en-US.wxl_template
new file mode 100644
index 0000000000..8d03526882
--- /dev/null
+++ b/Tools/msi/common_en-US.wxl_template
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
+ <String Id="LCID">1033</String>
+ <String Id="Culture">en-us</String>
+ <String Id="ProductName">Python {{ShortVersion}}</String>
+ <String Id="FullProductName">Python {{LongVersion}} ({{Bitness}})</String>
+ <String Id="Title">Python {{LongVersion}} !(loc.Descriptor) ({{Bitness}})</String>
+ <String Id="Description">Python {{LongVersion}} !(loc.Descriptor) ({{Bitness}})</String>
+ <String Id="TitlePdb">Python {{LongVersion}} !(loc.Descriptor) ({{Bitness}} symbols)</String>
+ <String Id="DescriptionPdb">Python {{LongVersion}} !(loc.Descriptor) ({{Bitness}} symbols)</String>
+ <String Id="Title_d">Python {{LongVersion}} !(loc.Descriptor) ({{Bitness}} debug)</String>
+ <String Id="Description_d">Python {{LongVersion}} !(loc.Descriptor) ({{Bitness}} debug)</String>
+ <String Id="Manufacturer">Python Software Foundation</String>
+ <String Id="NoDowngrade">A newer version of !(loc.ProductName) is already installed.</String>
+ <String Id="IncorrectCore">An incorrect version of a prerequisite package is installed. Please uninstall any other versions of !(loc.ProductName) and try installing this again.</String>
+ <String Id="NoTargetDir">The TARGETDIR variable must be provided when invoking this installer.</String>
+</WixLocalization>
diff --git a/Tools/msi/core/core.wixproj b/Tools/msi/core/core.wixproj
new file mode 100644
index 0000000000..68e8bab310
--- /dev/null
+++ b/Tools/msi/core/core.wixproj
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{1B4502D5-B627-4F50-ABEA-4CC5A8E88265}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>core</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="core.wxs" />
+ <Compile Include="core_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/core/core.wxs b/Tools/msi/core/core.wxs
new file mode 100644
index 0000000000..0d4fbde978
--- /dev/null
+++ b/Tools/msi/core/core.wxs
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+
+ <Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <ComponentGroupRef Id="core_dll" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/core/core_d.wixproj b/Tools/msi/core/core_d.wixproj
new file mode 100644
index 0000000000..5b296bf35f
--- /dev/null
+++ b/Tools/msi/core/core_d.wixproj
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{D3677DCF-098A-4398-9FA5-8E74AC37E0DF}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>core_d</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="core_d.wxs" />
+ <Compile Include="core_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/core/core_d.wxs b/Tools/msi/core/core_d.wxs
new file mode 100644
index 0000000000..07e0397686
--- /dev/null
+++ b/Tools/msi/core/core_d.wxs
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title_d)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+
+ <Feature Id="DebugBinaries" AllowAdvertise="no" Title="!(loc.Title_d)" Description="!(loc.Description_d)">
+ <ComponentGroupRef Id="core_dll_d" />
+ <ComponentRef Id="OptionalFeature" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/core/core_en-US.wxl b/Tools/msi/core/core_en-US.wxl
new file mode 100644
index 0000000000..7977470d7c
--- /dev/null
+++ b/Tools/msi/core/core_en-US.wxl
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
+ <String Id="Descriptor">Core Interpreter</String>
+ <String Id="ShortDescriptor">core</String>
+</WixLocalization>
diff --git a/Tools/msi/core/core_files.wxs b/Tools/msi/core/core_files.wxs
new file mode 100644
index 0000000000..145e147124
--- /dev/null
+++ b/Tools/msi/core/core_files.wxs
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <ComponentGroup Id="core_dll">
+ <Component Id="python_stable.dll" Directory="InstallDirectory" Guid="*">
+ <File Id="python_stable.dll" Name="python$(var.MajorVersionNumber).dll" KeyPath="yes" />
+ </Component>
+ <Component Id="python.dll" Directory="InstallDirectory" Guid="*">
+ <File Id="python.dll" Name="python$(var.MajorVersionNumber)$(var.MinorVersionNumber).dll" KeyPath="yes" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+ <Fragment>
+ <ComponentGroup Id="core_symbols">
+ <Component Id="python.pdb" Directory="InstallDirectory" Guid="*">
+ <File Id="python.pdb" Name="python$(var.MajorVersionNumber)$(var.MinorVersionNumber).pdb" KeyPath="yes" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+ <Fragment>
+ <ComponentGroup Id="core_dll_d">
+ <Component Id="python_stable_d.dll" Directory="InstallDirectory" Guid="*">
+ <File Id="python_stable_d.dll" Name="python$(var.MajorVersionNumber)_d.dll" KeyPath="yes" />
+ </Component>
+ <Component Id="python_d.dll" Directory="InstallDirectory" Guid="*">
+ <File Id="python_d.dll" Name="python$(var.MajorVersionNumber)$(var.MinorVersionNumber)_d.dll" KeyPath="yes" />
+ <File Id="python_d.pdb" Name="python$(var.MajorVersionNumber)$(var.MinorVersionNumber)_d.pdb" KeyPath="no" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+</Wix>
diff --git a/Tools/msi/core/core_pdb.wixproj b/Tools/msi/core/core_pdb.wixproj
new file mode 100644
index 0000000000..9c8838970b
--- /dev/null
+++ b/Tools/msi/core/core_pdb.wixproj
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{E98E7539-64E7-4DCE-AACD-01E3ADE40EFD}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>core_pdb</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="core_pdb.wxs" />
+ <Compile Include="core_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/core/core_pdb.wxs b/Tools/msi/core/core_pdb.wxs
new file mode 100644
index 0000000000..c2c3178973
--- /dev/null
+++ b/Tools/msi/core/core_pdb.wxs
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.TitlePdb)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+
+ <Feature Id="Symbols" AllowAdvertise="no" Title="!(loc.TitlePdb)" Description="!(loc.DescriptionPdb)">
+ <ComponentGroupRef Id="core_symbols" />
+ <ComponentRef Id="OptionalFeature" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/csv_to_wxs.py b/Tools/msi/csv_to_wxs.py
new file mode 100644
index 0000000000..235c8f8b0b
--- /dev/null
+++ b/Tools/msi/csv_to_wxs.py
@@ -0,0 +1,127 @@
+'''
+Processes a CSV file containing a list of files into a WXS file with
+components for each listed file.
+
+The CSV columns are:
+ source of file, target for file, group name
+
+Usage::
+ py txt_to_wxs.py [path to file list .csv] [path to destination .wxs]
+
+This is necessary to handle structures where some directories only
+contain other directories. MSBuild is not able to generate the
+Directory entries in the WXS file correctly, as it operates on files.
+Python, however, can easily fill in the gap.
+'''
+
+__author__ = "Steve Dower <steve.dower@microsoft.com>"
+
+import csv
+import re
+import sys
+
+from collections import defaultdict
+from itertools import chain, zip_longest
+from pathlib import PureWindowsPath
+from uuid import uuid1
+
+ID_CHAR_SUBS = {
+ '-': '_',
+ '+': '_P',
+}
+
+def make_id(path):
+ return re.sub(
+ r'[^A-Za-z0-9_.]',
+ lambda m: ID_CHAR_SUBS.get(m.group(0), '_'),
+ str(path).rstrip('/\\'),
+ flags=re.I
+ )
+
+DIRECTORIES = set()
+
+def main(file_source, install_target):
+ with open(file_source, 'r', newline='') as f:
+ files = list(csv.reader(f))
+
+ assert len(files) == len(set(make_id(f[1]) for f in files)), "Duplicate file IDs exist"
+
+ directories = defaultdict(set)
+ cache_directories = defaultdict(set)
+ groups = defaultdict(list)
+ for source, target, group, disk_id, condition in files:
+ target = PureWindowsPath(target)
+ groups[group].append((source, target, disk_id, condition))
+
+ if target.suffix.lower() in {".py", ".pyw"}:
+ cache_directories[group].add(target.parent)
+
+ for dirname in target.parents:
+ parent = make_id(dirname.parent)
+ if parent and parent != '.':
+ directories[parent].add(dirname.name)
+
+ lines = [
+ '<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">',
+ ' <Fragment>',
+ ]
+ for dir_parent in sorted(directories):
+ lines.append(' <DirectoryRef Id="{}">'.format(dir_parent))
+ for dir_name in sorted(directories[dir_parent]):
+ lines.append(' <Directory Id="{}_{}" Name="{}" />'.format(dir_parent, make_id(dir_name), dir_name))
+ lines.append(' </DirectoryRef>')
+ for dir_parent in (make_id(d) for group in cache_directories.values() for d in group):
+ lines.append(' <DirectoryRef Id="{}">'.format(dir_parent))
+ lines.append(' <Directory Id="{}___pycache__" Name="__pycache__" />'.format(dir_parent))
+ lines.append(' </DirectoryRef>')
+ lines.append(' </Fragment>')
+
+ for group in sorted(groups):
+ lines.extend([
+ ' <Fragment>',
+ ' <ComponentGroup Id="{}">'.format(group),
+ ])
+ for source, target, disk_id, condition in groups[group]:
+ lines.append(' <Component Id="{}" Directory="{}" Guid="*">'.format(make_id(target), make_id(target.parent)))
+ if condition:
+ lines.append(' <Condition>{}</Condition>'.format(condition))
+
+ if disk_id:
+ lines.append(' <File Id="{}" Name="{}" Source="{}" DiskId="{}" />'.format(make_id(target), target.name, source, disk_id))
+ else:
+ lines.append(' <File Id="{}" Name="{}" Source="{}" />'.format(make_id(target), target.name, source))
+ lines.append(' </Component>')
+
+ create_folders = {make_id(p) + "___pycache__" for p in cache_directories[group]}
+ remove_folders = {make_id(p2) for p1 in cache_directories[group] for p2 in chain((p1,), p1.parents)}
+ create_folders.discard(".")
+ remove_folders.discard(".")
+ if create_folders or remove_folders:
+ lines.append(' <Component Id="{}__pycache__folders" Directory="TARGETDIR" Guid="{}">'.format(group, uuid1()))
+ lines.extend(' <CreateFolder Directory="{}" />'.format(p) for p in create_folders)
+ lines.extend(' <RemoveFile Id="Remove_{0}_files" Name="*" On="uninstall" Directory="{0}" />'.format(p) for p in create_folders)
+ lines.extend(' <RemoveFolder Id="Remove_{0}_folder" On="uninstall" Directory="{0}" />'.format(p) for p in create_folders | remove_folders)
+ lines.append(' </Component>')
+
+ lines.extend([
+ ' </ComponentGroup>',
+ ' </Fragment>',
+ ])
+ lines.append('</Wix>')
+
+ # Check if the file matches. If so, we don't want to touch it so
+ # that we can skip rebuilding.
+ try:
+ with open(install_target, 'r') as f:
+ if all(x.rstrip('\r\n') == y for x, y in zip_longest(f, lines)):
+ print('File is up to date')
+ return
+ except IOError:
+ pass
+
+ with open(install_target, 'w') as f:
+ f.writelines(line + '\n' for line in lines)
+ print('Wrote {} lines to {}'.format(len(lines), install_target))
+
+if __name__ == '__main__':
+ main(sys.argv[1], sys.argv[2])
diff --git a/Tools/msi/dev/dev.wixproj b/Tools/msi/dev/dev.wixproj
new file mode 100644
index 0000000000..682b66031f
--- /dev/null
+++ b/Tools/msi/dev/dev.wixproj
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{5F23F608-D74B-4259-A0CE-8DC65CC7FE53}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName Condition="'$(OutputName)' == ''">dev</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <PropertyGroup>
+ <DefineConstants Condition="$(BuildForRelease)">
+ $(DefineConstants);
+ IncludeMinGWLib=1;
+ </DefineConstants>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="dev.wxs" />
+ <Compile Include="dev_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ </ItemGroup>
+ <ItemGroup>
+ <InstallFiles Include="$(PySourcePath)include\*.h">
+ <SourceBase>$(PySourcePath)</SourceBase>
+ <Source>!(bindpath.src)</Source>
+ <TargetBase>$(PySourcePath)</TargetBase>
+ <Target_></Target_>
+ <Group>dev_include</Group>
+ </InstallFiles>
+ </ItemGroup>
+
+ <Target Name="BuildMinGWLib"
+ Inputs="$(BuildPath)$(PyDllName).dll"
+ Outputs="$(BuildPath)lib$(PyDllName).a"
+ AfterTargets="PrepareForBuild"
+ Condition="$(BuildForRelease)">
+ <!-- Build libpython##.a as part of this project. This requires gendef and dlltool on the path. -->
+ <PropertyGroup>
+ <_DllToolOpts>-m i386 --as-flags=--32</_DllToolOpts>
+ <_DllToolOpts Condition="$(Platform) == 'x64'">-m i386:x86-64</_DllToolOpts>
+ </PropertyGroup>
+
+ <Exec Command='gendef - "$(BuildPath)$(PyDllName).dll" &gt; "$(IntermediateOutputPath)mingwlib.def"' ContinueOnError="false" />
+ <Exec Command='dlltool --dllname $(PyDllName).dll --def "$(IntermediateOutputPath)mingwlib.def" --output-lib "$(BuildPath)lib$(PyDllName).a" $(_DllToolOpts)' />
+ </Target>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/dev/dev.wxs b/Tools/msi/dev/dev.wxs
new file mode 100644
index 0000000000..a09e139c42
--- /dev/null
+++ b/Tools/msi/dev/dev.wxs
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+
+ <Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <ComponentGroupRef Id="dev_include" />
+ <ComponentGroupRef Id="dev_pyconfig" />
+ <ComponentGroupRef Id="dev_libs" />
+<?ifdef IncludeMinGWLib ?>
+ <ComponentGroupRef Id="dev_mingw" />
+<?endif ?>
+ <ComponentRef Id="OptionalFeature" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/dev/dev_d.wixproj b/Tools/msi/dev/dev_d.wixproj
new file mode 100644
index 0000000000..b3b05326d4
--- /dev/null
+++ b/Tools/msi/dev/dev_d.wixproj
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{C11B4945-76BD-4137-B2E3-649460117A77}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>dev_d</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="dev_d.wxs" />
+ <Compile Include="dev_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/dev/dev_d.wxs b/Tools/msi/dev/dev_d.wxs
new file mode 100644
index 0000000000..c467aac57b
--- /dev/null
+++ b/Tools/msi/dev/dev_d.wxs
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title_d)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+
+ <Feature Id="DebugBinaries" AllowAdvertise="no" Title="!(loc.Title_d)" Description="!(loc.Description_d)">
+ <ComponentGroupRef Id="dev_libs_d" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/dev/dev_en-US.wxl b/Tools/msi/dev/dev_en-US.wxl
new file mode 100644
index 0000000000..2546e13e47
--- /dev/null
+++ b/Tools/msi/dev/dev_en-US.wxl
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
+ <String Id="Descriptor">Development Libraries</String>
+ <String Id="ShortDescriptor">dev</String>
+</WixLocalization>
diff --git a/Tools/msi/dev/dev_files.wxs b/Tools/msi/dev/dev_files.wxs
new file mode 100644
index 0000000000..9654d2e3e6
--- /dev/null
+++ b/Tools/msi/dev/dev_files.wxs
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <ComponentGroup Id="dev_pyconfig">
+ <Component Id="include_pyconfig.h" Directory="include" Guid="*">
+ <File Id="include_pyconfig.h" Name="pyconfig.h" Source="!(bindpath.src)PC\pyconfig.h" KeyPath="yes" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+
+ <Fragment>
+ <ComponentGroup Id="dev_libs">
+ <Component Id="libs_python3.lib" Directory="libs" Guid="*">
+ <File Id="libs_python_stable.lib" Name="python$(var.MajorVersionNumber).lib" KeyPath="yes" />
+ </Component>
+ <Component Id="libs_python.lib" Directory="libs" Guid="*">
+ <File Id="libs_python.lib" Name="python$(var.MajorVersionNumber)$(var.MinorVersionNumber).lib" KeyPath="yes" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+
+ <Fragment>
+ <ComponentGroup Id="dev_libs_d">
+ <Component Id="libs_python3_d.lib" Directory="libs" Guid="*">
+ <File Id="libs_python_stable_d.lib" Name="python$(var.MajorVersionNumber)_d.lib" />
+ </Component>
+ <Component Id="libs_python_d.lib" Directory="libs" Guid="*">
+ <File Id="libs_python_d.lib" Name="python$(var.MajorVersionNumber)$(var.MinorVersionNumber)_d.lib" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+
+ <?ifdef IncludeMinGWLib ?>
+ <Fragment>
+ <ComponentGroup Id="dev_mingw">
+ <Component Id="libs_libpython.a" Directory="libs" Guid="*">
+ <File Id="libs_libpython.a" Name="libpython$(var.MajorVersionNumber)$(var.MinorVersionNumber).a" KeyPath="yes" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+ <?endif ?>
+</Wix>
diff --git a/Tools/msi/doc/doc.wixproj b/Tools/msi/doc/doc.wixproj
new file mode 100644
index 0000000000..ea9929acd0
--- /dev/null
+++ b/Tools/msi/doc/doc.wixproj
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{0D62A2BB-5F71-4447-8C8C-9708407B3674}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>doc</OutputName>
+ <OutputType>Package</OutputType>
+ <!-- Shortcut validation is not necessary -->
+ <SuppressICEs>ICE43</SuppressICEs>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <PropertyGroup>
+ <DocFilename>python$(MajorVersionNumber)$(MinorVersionNumber)$(MicroVersionNumber)$(ReleaseLevelName).chm</DocFilename>
+ <IncludeDocFile>false</IncludeDocFile>
+ <IncludeDocFile Condition="$(BuildForRelease) or Exists('$(PySourcePath)Doc\build\htmlhelp\$(DocFilename)')">true</IncludeDocFile>
+ </PropertyGroup>
+ <PropertyGroup Condition="$(IncludeDocFile)">
+ <DefineConstants>$(DefineConstants);DocFilename=$(DocFilename);</DefineConstants>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="doc.wxs" />
+ <Compile Include="doc_files.wxs" Condition="$(IncludeDocFile)" />
+ <Compile Include="doc_no_files.wxs" Condition="!$(IncludeDocFile)" />
+ </ItemGroup>
+ <ItemGroup>
+ <WxlTemplate Include="*.wxl_template" />
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/doc/doc.wxs b/Tools/msi/doc/doc.wxs
new file mode 100644
index 0000000000..8dd0e21ae3
--- /dev/null
+++ b/Tools/msi/doc/doc.wxs
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+ <PropertyRef Id="REGISTRYKEY" />
+
+ <Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <ComponentGroupRef Id="doc" Primary="yes" />
+ <ComponentRef Id="OptionalFeature" />
+ </Feature>
+ <Feature Id="Shortcuts" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <ComponentGroupRef Id="doc" />
+
+ <?ifdef DocFilename ?>
+ <Component Id="doc_shortcut" Directory="MenuDir" Guid="*">
+ <RegistryKey Root="HKMU" Key="[OPTIONALFEATURESREGISTRYKEY]">
+ <RegistryValue Name="$(var.OptionalFeatureName)_shortcut" Type="string" Value="$(var.Version)" KeyPath="yes" />
+ </RegistryKey>
+ <Shortcut Id="python.chm"
+ Target="[#python.chm]"
+ Name="!(loc.ShortcutName)"
+ Description="!(loc.ShortcutDescription)"
+ WorkingDirectory="InstallDirectory" />
+ <RemoveFolder Id="Remove_MenuDir" On="uninstall" />
+ </Component>
+ <?endif ?>
+
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/doc/doc_en-US.wxl_template b/Tools/msi/doc/doc_en-US.wxl_template
new file mode 100644
index 0000000000..809556e29f
--- /dev/null
+++ b/Tools/msi/doc/doc_en-US.wxl_template
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
+ <String Id="ShortDescriptor">doc</String>
+ <String Id="Descriptor">Documentation</String>
+ <String Id="ShortcutName">Python {{ShortVersion}} Manuals ({{Bitness}})</String>
+ <String Id="ShortcutDescription">View the !(loc.ProductName) documentation.</String>
+</WixLocalization>
diff --git a/Tools/msi/doc/doc_files.wxs b/Tools/msi/doc/doc_files.wxs
new file mode 100644
index 0000000000..fe09afe4d3
--- /dev/null
+++ b/Tools/msi/doc/doc_files.wxs
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <PropertyRef Id="REGISTRYKEY" />
+
+ <ComponentGroup Id="doc">
+ <Component Id="python.chm" Directory="Doc" Guid="*">
+ <File Id="python.chm" Name="$(var.DocFilename)" KeyPath="yes" />
+ <RegistryKey Root="HKMU" Key="[REGISTRYKEY]">
+ <RegistryValue Key="Help\Main Python Documentation" Type="string" Value="[#python.chm]" />
+ </RegistryKey>
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+</Wix>
diff --git a/Tools/msi/doc/doc_no_files.wxs b/Tools/msi/doc/doc_no_files.wxs
new file mode 100644
index 0000000000..7ab7c26906
--- /dev/null
+++ b/Tools/msi/doc/doc_no_files.wxs
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <ComponentGroup Id="doc">
+ <!--
+ This file is included when the CHM is not available.
+
+ This way, snapshot builds can succeed without having to
+ build the docs.
+ -->
+ <Component Id="EmptyDocFolder" Directory="Doc" Guid="{22FD42DB-EC66-4B1C-B1FC-44E0CF7B2462}">
+ <CreateFolder />
+ <RemoveFolder Id="Remove_EmptyDocFolder" On="uninstall" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+</Wix>
diff --git a/Tools/msi/crtlicense.txt b/Tools/msi/exe/crtlicense.txt
index 936bc5ad53..f86841f263 100644
--- a/Tools/msi/crtlicense.txt
+++ b/Tools/msi/exe/crtlicense.txt
@@ -5,11 +5,8 @@ Additional Conditions for this Windows binary build
This program is linked with and uses Microsoft Distributable Code,
copyrighted by Microsoft Corporation. The Microsoft Distributable Code
-includes the following files:
-
-msvcr90.dll
-msvcp90.dll
-msvcm90.dll
+is embedded in each .exe, .dll and .pyd file as a result of running
+the code through a linker.
If you further distribute programs that include the Microsoft
Distributable Code, you must comply with the restrictions on
diff --git a/Tools/msi/exe/exe.wixproj b/Tools/msi/exe/exe.wixproj
new file mode 100644
index 0000000000..d26a603268
--- /dev/null
+++ b/Tools/msi/exe/exe.wixproj
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{6BD53305-B03E-49DC-85FB-5551B8CCC843}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>exe</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <PropertyGroup>
+ <!-- Shortcut validation is not necessary -->
+ <SuppressICEs>ICE43</SuppressICEs>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="exe.wxs" />
+ <Compile Include="exe_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ <WxlTemplate Include="*.wxl_template" />
+ </ItemGroup>
+
+ <Target Name="_GenerateLicense" AfterTargets="PrepareForBuild">
+ <ItemGroup>
+ <LicenseFiles Include="$(PySourcePath)LICENSE;
+ crtlicense.txt;
+ $(bz2Dir)LICENSE;
+ $(opensslDir)LICENSE;
+ $(tclDir)license.terms;
+ $(tkDir)license.terms;
+ $(tixDir)license.terms" />
+ <_LicenseFiles Include="@(LicenseFiles)">
+ <Content>$([System.IO.File]::ReadAllText(%(FullPath)))</Content>
+ </_LicenseFiles>
+ </ItemGroup>
+
+ <WriteLinesToFile File="$(BuildPath)LICENSE"
+ Overwrite="true"
+ Lines="@(_LicenseFiles->'%(Content)')" />
+ </Target>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/exe/exe.wxs b/Tools/msi/exe/exe.wxs
new file mode 100644
index 0000000000..154cee5c47
--- /dev/null
+++ b/Tools/msi/exe/exe.wxs
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+ <PropertyRef Id="REGISTRYKEY" />
+
+ <Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <ComponentGroupRef Id="exe_python" Primary="yes" />
+ <ComponentGroupRef Id="exe_txt" />
+ <ComponentGroupRef Id="exe_icons" />
+ <ComponentRef Id="OptionalFeature" />
+ </Feature>
+
+ <Feature Id="Shortcuts" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <ComponentGroupRef Id="exe_python" />
+ <Component Id="exe_shortcut" Directory="MenuDir" Guid="*">
+ <Shortcut Id="python.exe"
+ Target="[#python.exe]"
+ Name="!(loc.ShortcutName)"
+ Description="!(loc.ShortcutDescription)"
+ WorkingDirectory="InstallDirectory" />
+ <RemoveFolder Id="Remove_MenuDir" Directory="MenuDir" On="uninstall" />
+ <RegistryKey Root="HKMU" Key="[REGISTRYKEY]">
+ <RegistryValue Key="InstallPath\InstallGroup" Type="string" Value="!(loc.ProductName)" KeyPath="yes" />
+ <RegistryValue Key="InstalledFeatures" Name="Shortcuts" Type="string" Value="$(var.Version)" />
+ </RegistryKey>
+ </Component>
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/exe/exe_d.wixproj b/Tools/msi/exe/exe_d.wixproj
new file mode 100644
index 0000000000..27545caf7d
--- /dev/null
+++ b/Tools/msi/exe/exe_d.wixproj
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{B1CA739C-8DB0-403B-9010-D79507507CE9}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>exe_d</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="exe_d.wxs" />
+ <Compile Include="exe_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ <WxlTemplate Include="*.wxl_template" />
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/exe/exe_d.wxs b/Tools/msi/exe/exe_d.wxs
new file mode 100644
index 0000000000..eedb6bb640
--- /dev/null
+++ b/Tools/msi/exe/exe_d.wxs
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title_d)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+
+ <Feature Id="DebugBinaries" AllowAdvertise="no" Title="!(loc.Title_d)" Description="!(loc.Description_d)">
+ <ComponentGroupRef Id="exe_python_d" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/exe/exe_en-US.wxl_template b/Tools/msi/exe/exe_en-US.wxl_template
new file mode 100644
index 0000000000..577fbe51a5
--- /dev/null
+++ b/Tools/msi/exe/exe_en-US.wxl_template
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
+ <String Id="Descriptor">Executables</String>
+ <String Id="ShortDescriptor">executable</String>
+ <String Id="ShortcutName">Python {{ShortVersion}} ({{Bitness}})</String>
+ <String Id="ShortcutDescription">Launches the !(loc.ProductName) interpreter.</String>
+</WixLocalization>
diff --git a/Tools/msi/exe/exe_files.wxs b/Tools/msi/exe/exe_files.wxs
new file mode 100644
index 0000000000..9e47b5d980
--- /dev/null
+++ b/Tools/msi/exe/exe_files.wxs
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <ComponentGroup Id="exe_txt">
+ <Component Id="LICENSE.txt" Directory="InstallDirectory" Guid="*">
+ <File Name="LICENSE.txt" Source="LICENSE" KeyPath="yes" />
+ </Component>
+ <Component Id="NEWS.txt" Directory="InstallDirectory" Guid="*">
+ <File Name="NEWS.txt" Source="!(bindpath.src)Misc\NEWS" KeyPath="yes" />
+ </Component>
+ <Component Id="README.txt" Directory="InstallDirectory" Guid="*">
+ <File Name="README.txt" Source="!(bindpath.src)README" KeyPath="yes" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+
+ <Fragment>
+ <PropertyRef Id="REGISTRYKEY" />
+
+ <ComponentGroup Id="exe_python">
+ <Component Id="python.exe" Directory="InstallDirectory" Guid="$(var.PythonExeComponentGuid)">
+ <File Name="python.exe" KeyPath="yes" />
+
+ <RegistryKey Root="HKMU" Key="[REGISTRYKEY]">
+ <RegistryValue Key="InstallPath" Type="string" Value="[InstallDirectory]" KeyPath="no" />
+ <RegistryValue Key="InstallPath" Name="ExecutablePath" Type="string" Value="[#python.exe]" KeyPath="no" />
+ </RegistryKey>
+ </Component>
+ <Component Id="pythonw.exe" Directory="InstallDirectory" Guid="$(var.PythonwExeComponentGuid)">
+ <File Name="pythonw.exe" KeyPath="yes" />
+ </Component>
+ <Component Id="vcruntime140.dll" Directory="InstallDirectory" Guid="*">
+ <File Name="vcruntime140.dll" Source="!(bindpath.redist)vcruntime140.dll" KeyPath="yes" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+
+ <Fragment>
+ <ComponentGroup Id="exe_python_symbols">
+ <Component Id="python.pdb" Directory="InstallDirectory" Guid="*">
+ <File Name="python.pdb" />
+ </Component>
+ <Component Id="pythonw.pdb" Directory="InstallDirectory" Guid="*">
+ <File Name="pythonw.pdb" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+
+ <Fragment>
+ <ComponentGroup Id="exe_python_d">
+ <Component Id="python_d.exe" Directory="InstallDirectory" Guid="*">
+ <File Name="python_d.exe" />
+ </Component>
+ <Component Id="python_d.pdb" Directory="InstallDirectory" Guid="*">
+ <File Name="python_d.pdb" />
+ </Component>
+ <Component Id="pythonw_d.exe" Directory="InstallDirectory" Guid="*">
+ <File Name="pythonw_d.exe" />
+ </Component>
+ <Component Id="pythonw_d.pdb" Directory="InstallDirectory" Guid="*">
+ <File Name="pythonw_d.pdb" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+
+ <Fragment>
+ <ComponentGroup Id="exe_icons">
+ <Component Id="py.ico" Directory="DLLs" Guid="*">
+ <File Name="py.ico" Source="!(bindpath.src)PC\py.ico" KeyPath="yes" />
+ </Component>
+ <Component Id="pyc.ico" Directory="DLLs" Guid="*">
+ <File Name="pyc.ico" Source="!(bindpath.src)PC\pyc.ico" KeyPath="yes" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+</Wix>
diff --git a/Tools/msi/exe/exe_pdb.wixproj b/Tools/msi/exe/exe_pdb.wixproj
new file mode 100644
index 0000000000..4f4c869926
--- /dev/null
+++ b/Tools/msi/exe/exe_pdb.wixproj
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{4A1F7045-8EE2-4276-ABB8-5E0C40E5F38B}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>exe_pdb</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="exe_pdb.wxs" />
+ <Compile Include="exe_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ <WxlTemplate Include="*.wxl_template" />
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/exe/exe_pdb.wxs b/Tools/msi/exe/exe_pdb.wxs
new file mode 100644
index 0000000000..f25094f828
--- /dev/null
+++ b/Tools/msi/exe/exe_pdb.wxs
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.TitlePdb)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+
+ <Feature Id="Symbols" AllowAdvertise="no" Title="!(loc.TitlePdb)" Description="!(loc.DescriptionPdb)">
+ <ComponentGroupRef Id="exe_python_symbols" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/generate_md5.py b/Tools/msi/generate_md5.py
new file mode 100644
index 0000000000..9e4c14731b
--- /dev/null
+++ b/Tools/msi/generate_md5.py
@@ -0,0 +1,27 @@
+import hashlib
+import os
+import sys
+
+def main():
+ filenames, hashes, sizes = [], [], []
+
+ for file in sys.argv[1:]:
+ if not os.path.isfile(file):
+ continue
+
+ with open(file, 'rb') as f:
+ data = f.read()
+ md5 = hashlib.md5()
+ md5.update(data)
+ filenames.append(os.path.split(file)[1])
+ hashes.append(md5.hexdigest())
+ sizes.append(str(len(data)))
+
+ print('{:40s} {:<32s} {:<9s}'.format('File', 'MD5', 'Size'))
+ for f, h, s in zip(filenames, hashes, sizes):
+ print('{:40s} {:>32s} {:>9s}'.format(f, h, s))
+
+
+
+if __name__ == "__main__":
+ sys.exit(int(main() or 0))
diff --git a/Tools/msi/get_externals.bat b/Tools/msi/get_externals.bat
new file mode 100644
index 0000000000..4ead75e757
--- /dev/null
+++ b/Tools/msi/get_externals.bat
@@ -0,0 +1,27 @@
+@echo off
+setlocal
+rem Simple script to fetch source for external tools
+
+where /Q svn
+if ERRORLEVEL 1 (
+ echo.svn.exe must be on your PATH to get external tools.
+ echo.Try TortoiseSVN (http://tortoisesvn.net/^) and be sure to check the
+ echo.command line tools option.
+ popd
+ exit /b 1
+)
+
+if not exist "%~dp0..\..\externals" mkdir "%~dp0..\..\externals"
+pushd "%~dp0..\..\externals"
+
+if "%SVNROOT%"=="" set SVNROOT=http://svn.python.org/projects/external/
+
+if not exist "windows-installer\.svn" (
+ echo.Checking out installer dependencies to %CD%\windows-installer
+ svn co %SVNROOT%windows-installer
+) else (
+ echo.Updating installer dependencies in %CD%\windows-installer
+ svn up windows-installer
+)
+
+popd
diff --git a/Tools/msi/launcher/launcher.wixproj b/Tools/msi/launcher/launcher.wixproj
new file mode 100644
index 0000000000..67fb0255de
--- /dev/null
+++ b/Tools/msi/launcher/launcher.wixproj
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{921CF0E6-AEBC-4376-BA1D-CD46EBFE6DA5}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>launcher</OutputName>
+ <OutputType>Package</OutputType>
+ <DefineConstants>UpgradeCode=1B68A0EC-4DD3-5134-840E-73854B0863F1;$(DefineConstants)</DefineConstants>
+ <IgnoreCommonWxlTemplates>true</IgnoreCommonWxlTemplates>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="launcher.wxs" />
+ <Compile Include="launcher_files.wxs" />
+ <Compile Include="launcher_reg.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/launcher/launcher.wxs b/Tools/msi/launcher/launcher.wxs
new file mode 100644
index 0000000000..80e838afad
--- /dev/null
+++ b/Tools/msi/launcher/launcher.wxs
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <Property Id="Suppress_TARGETDIR_Check" Value="1" />
+ <PropertyRef Id="ARPPRODUCTICON" />
+
+ <Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <ComponentGroupRef Id="launcher_exe" Primary="yes" />
+ </Feature>
+ <Feature Id="AssociateFiles" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <ComponentGroupRef Id="launcher_exe" />
+ <ComponentGroupRef Id="launcher_reg" />
+ </Feature>
+
+ <Directory Id="TARGETDIR" Name="SourceDir">
+ <Directory Id="LauncherInstallDirectory" />
+ </Directory>
+
+ <CustomAction Id="SetLauncherInstallDirectoryLM" Property="LauncherInstallDirectory" Value="[WindowsFolder]" />
+ <CustomAction Id="SetLauncherInstallDirectoryCU" Property="LauncherInstallDirectory" Value="[LocalAppDataFolder]Programs\Python\Launcher" />
+
+ <InstallExecuteSequence>
+ <Custom Before="SetLauncherInstallDirectoryLM" Action="SetLauncherInstallDirectoryCU">NOT Installed AND NOT ALLUSERS=1</Custom>
+ <Custom Before="CostFinalize" Action="SetLauncherInstallDirectoryLM">NOT Installed AND ALLUSERS=1</Custom>
+
+ <RemoveExistingProducts After="InstallValidate">UPGRADE or REMOVE_350_LAUNCHER</RemoveExistingProducts>
+ </InstallExecuteSequence>
+
+ <!-- Python 3.5.0 shipped with a different UpgradeCode -->
+ <Upgrade Id="A71530B9-E89D-53DB-9C2D-C6D7551876D8">
+ <UpgradeVersion Minimum="0.0.0.0" Property="REMOVE_350_LAUNCHER" />
+ </Upgrade>
+ <!-- Python 3.6.0a1 shipped with a different UpgradeCode -->
+ <Upgrade Id="394750C0-7880-5A8F-999F-933965FBCFB4">
+ <UpgradeVersion Maximum="$(var.Version)" Property="REMOVE_360A1_LAUNCHER" />
+ <UpgradeVersion Minimum="$(var.Version)" Property="BLOCK_360A1_LAUNCHER" />
+ </Upgrade>
+ <Condition Message="!(loc.NoDowngrade)">Installed OR NOT BLOCK_360A1_LAUNCHER</Condition>
+ </Product>
+</Wix>
diff --git a/Tools/msi/launcher/launcher_en-US.wxl b/Tools/msi/launcher/launcher_en-US.wxl
new file mode 100644
index 0000000000..e4c1aaa9fa
--- /dev/null
+++ b/Tools/msi/launcher/launcher_en-US.wxl
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
+ <String Id="LCID">1033</String>
+ <String Id="Culture">en-us</String>
+ <String Id="ProductName">Python Launcher</String>
+ <String Id="Title">Python Launcher</String>
+ <String Id="Description">Python Launcher</String>
+ <String Id="Manufacturer">Python Software Foundation</String>
+ <String Id="NoDowngrade">A newer version of the Python launcher is already installed.</String>
+ <String Id="NoTargetDir">The TARGETDIR variable must be provided when invoking this installer.</String>
+ <String Id="PythonFileDescription">Python File</String>
+ <String Id="PythonNoConFileDescription">Python File (no console)</String>
+ <String Id="PythonCompiledFileDescription">Compiled Python File</String>
+ <String Id="PythonArchiveFileDescription">Python Zip Application File</String>
+ <String Id="PythonNoConArchiveFileDescription">Python Zip Application File (no console)</String>
+</WixLocalization>
diff --git a/Tools/msi/launcher/launcher_files.wxs b/Tools/msi/launcher/launcher_files.wxs
new file mode 100644
index 0000000000..589dee5654
--- /dev/null
+++ b/Tools/msi/launcher/launcher_files.wxs
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <ComponentGroup Id="launcher_exe">
+ <Component Id="py.exe" Directory="LauncherInstallDirectory" Guid="{B5107402-6958-461B-8B0A-4037D3327160}">
+ <File Id="py.exe" Name="py.exe" Source="py.exe" KeyPath="yes" />
+ <RegistryValue Root="HKMU" Key="Software\Python\PyLauncher" Value="[#py.exe]" Type="string" />
+ </Component>
+ <Component Id="pyw.exe" Directory="LauncherInstallDirectory" Guid="{8E52B8CD-48BB-4D74-84CD-6238BCD11F20}">
+ <File Id="pyw.exe" Name="pyw.exe" Source="pyw.exe" KeyPath="yes" />
+ </Component>
+
+ <Component Id="launcher_path_cu" Directory="LauncherInstallDirectory" Guid="{95AEB930-367C-475C-A17E-A89BFCD4C670}">
+ <Condition>NOT ALLUSERS=1</Condition>
+
+ <RegistryValue KeyPath="yes" Root="HKMU" Key="Software\Python\PyLauncher" Name="InstallDir" Value="[LauncherInstallDirectory]" Type="string" />
+ <Environment Id="PATH_CU" Action="set" Name="PATH" Part="first" Value="[LauncherInstallDirectory]" />
+ </Component>
+ <Component Id="launcher_path_lm" Directory="LauncherInstallDirectory" Guid="{4A41C365-4E27-4D38-A6D1-4A01B4A6500C}">
+ <Condition>ALLUSERS=1</Condition>
+ <RegistryValue KeyPath="yes" Root="HKMU" Key="Software\Python\PyLauncher" Name="InstallDir" Value="[LauncherInstallDirectory]" Type="string" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+</Wix>
diff --git a/Tools/msi/launcher/launcher_reg.wxs b/Tools/msi/launcher/launcher_reg.wxs
new file mode 100644
index 0000000000..bb42255b0a
--- /dev/null
+++ b/Tools/msi/launcher/launcher_reg.wxs
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <ComponentGroup Id="launcher_reg">
+ <Component Id="file_association" Directory="LauncherInstallDirectory" Guid="{5AF84D9A-D820-456B-B230-6E0105A50276}">
+ <RegistryValue KeyPath="yes" Root="HKMU" Key="Software\Python\PyLauncher" Name="AssociateFiles" Value="1" Type="integer" />
+
+ <ProgId Id="Python.File" Description="!(loc.PythonFileDescription)" Advertise="no" Icon="py.exe" IconIndex="1">
+ <Extension Id="py" ContentType="text/plain">
+ <Verb Id="open" TargetFile="py.exe" Argument="&quot;%L&quot; %*" />
+ </Extension>
+ </ProgId>
+ <RegistryValue Root="HKCR" Key="Python.File\shellex\DropHandler" Value="{60254CA5-953B-11CF-8C96-00AA00B8708C}" Type="string" />
+
+ <ProgId Id="Python.NoConFile" Description="!(loc.PythonNoConFileDescription)" Advertise="no" Icon="py.exe" IconIndex="1">
+ <Extension Id="pyw" ContentType="text/plain">
+ <Verb Id="open" TargetFile="pyw.exe" Argument="&quot;%L&quot; %*" />
+ </Extension>
+ </ProgId>
+ <RegistryValue Root="HKCR" Key="Python.NoConFile\shellex\DropHandler" Value="{60254CA5-953B-11CF-8C96-00AA00B8708C}" Type="string" />
+
+ <ProgId Id="Python.CompiledFile" Description="!(loc.PythonCompiledFileDescription)" Advertise="no" Icon="py.exe" IconIndex="2">
+ <Extension Id="pyc">
+ <Verb Id="open" TargetFile="py.exe" Argument="&quot;%L&quot; %*" />
+ </Extension>
+ <Extension Id="pyo" />
+ </ProgId>
+ <RegistryValue Root="HKCR" Key="Python.CompiledFile\shellex\DropHandler" Value="{60254CA5-953B-11CF-8C96-00AA00B8708C}" Type="string" />
+
+ <ProgId Id="Python.ArchiveFile" Description="!(loc.PythonArchiveFileDescription)" Advertise="no" Icon="py.exe" IconIndex="1">
+ <Extension Id="pyz" ContentType="application/x-zip-compressed">
+ <Verb Id="open" TargetFile="py.exe" Argument="&quot;%L&quot; %*" />
+ </Extension>
+ </ProgId>
+ <RegistryValue Root="HKCR" Key="Python.ArchiveFile\shellex\DropHandler" Value="{60254CA5-953B-11CF-8C96-00AA00B8708C}" Type="string" />
+
+ <ProgId Id="Python.NoConArchiveFile" Description="!(loc.PythonNoConArchiveFileDescription)" Advertise="no" Icon="py.exe" IconIndex="1">
+ <Extension Id="pyzw" ContentType="application/x-zip-compressed">
+ <Verb Id="open" TargetFile="pyw.exe" Argument="&quot;%L&quot; %*" />
+ </Extension>
+ </ProgId>
+ <RegistryValue Root="HKCR" Key="Python.NoConArchiveFile\shellex\DropHandler" Value="{60254CA5-953B-11CF-8C96-00AA00B8708C}" Type="string" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+</Wix>
diff --git a/Tools/msi/lib/lib.wixproj b/Tools/msi/lib/lib.wixproj
new file mode 100644
index 0000000000..64e58787b8
--- /dev/null
+++ b/Tools/msi/lib/lib.wixproj
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{11367E76-3337-4602-8F1E-77DB4F370D7E}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>lib</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="lib.wxs" />
+ <Compile Include="lib_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ </ItemGroup>
+ <ItemGroup>
+ <ExcludeFolders Include="Lib\test;Lib\tests;Lib\tkinter;Lib\idlelib;Lib\turtledemo" />
+ <InstallFiles Include="$(PySourcePath)Lib\**\*"
+ Exclude="$(PySourcePath)Lib\**\*.pyc;
+ $(PySourcePath)Lib\**\*.pyo;
+ $(PySourcePath)Lib\site-packages\README;
+ @(ExcludeFolders->'$(PySourcePath)%(Identity)\*');
+ @(ExcludeFolders->'$(PySourcePath)%(Identity)\**\*')">
+ <SourceBase>$(PySourcePath)Lib</SourceBase>
+ <Source>!(bindpath.src)Lib\</Source>
+ <TargetBase>$(PySourcePath)Lib</TargetBase>
+ <Target_>Lib\</Target_>
+ <Group>lib_py</Group>
+ </InstallFiles>
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/lib/lib.wxs b/Tools/msi/lib/lib.wxs
new file mode 100644
index 0000000000..2b04bcb304
--- /dev/null
+++ b/Tools/msi/lib/lib.wxs
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+ <PropertyRef Id="REGISTRYKEY" />
+
+ <Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <ComponentGroupRef Id="lib_py" />
+ <ComponentGroupRef Id="lib_files" />
+ <ComponentGroupRef Id="lib_extensions" />
+ <ComponentRef Id="OptionalFeature" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/lib/lib_d.wixproj b/Tools/msi/lib/lib_d.wixproj
new file mode 100644
index 0000000000..587a82c192
--- /dev/null
+++ b/Tools/msi/lib/lib_d.wixproj
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{6C443CD3-8258-4335-BA03-49DA9C34CE4D}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>lib_d</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="lib_d.wxs" />
+ <Compile Include="lib_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/lib/lib_d.wxs b/Tools/msi/lib/lib_d.wxs
new file mode 100644
index 0000000000..8a8a530d41
--- /dev/null
+++ b/Tools/msi/lib/lib_d.wxs
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title_d)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+
+ <Feature Id="DebugBinaries" AllowAdvertise="no" Title="!(loc.Title_d)" Description="!(loc.Description_d)">
+ <ComponentGroupRef Id="lib_extensions_d" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/lib/lib_en-US.wxl b/Tools/msi/lib/lib_en-US.wxl
new file mode 100644
index 0000000000..305bcc73af
--- /dev/null
+++ b/Tools/msi/lib/lib_en-US.wxl
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
+ <String Id="Descriptor">Standard Library</String>
+ <String Id="ShortDescriptor">lib</String>
+</WixLocalization>
diff --git a/Tools/msi/lib/lib_files.wxs b/Tools/msi/lib/lib_files.wxs
new file mode 100644
index 0000000000..fa79a8d692
--- /dev/null
+++ b/Tools/msi/lib/lib_files.wxs
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <?define exts=pyexpat;select;unicodedata;winsound;_bz2;_elementtree;_socket;_ssl;_msi;_ctypes;_hashlib;_multiprocessing;_lzma;_decimal;_overlapped;_sqlite3 ?>
+ <Fragment>
+ <ComponentGroup Id="lib_extensions">
+ <?foreach ext in $(var.exts)?>
+
+ <Component Id="$(var.ext).pyd" Directory="DLLs" Guid="*">
+ <File Name="$(var.ext).pyd" KeyPath="yes" />
+ </Component>
+
+ <?endforeach ?>
+
+ <Component Id="sqlite3.dll" Directory="DLLs" Guid="*">
+ <File Name="sqlite3.dll" KeyPath="yes" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+
+ <Fragment>
+ <ComponentGroup Id="lib_extensions_symbols">
+ <?foreach ext in $(var.exts)?>
+
+ <Component Id="$(var.ext).pdb" Directory="DLLs" Guid="*">
+ <Condition>SYMBOLS=1</Condition>
+ <File Name="$(var.ext).pdb" />
+ </Component>
+
+ <?endforeach ?>
+
+ <Component Id="sqlite3.pdb" Directory="DLLs" Guid="*">
+ <File Name="sqlite3.pdb" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+
+ <Fragment>
+ <ComponentGroup Id="lib_extensions_d">
+ <?foreach ext in $(var.exts)?>
+
+ <Component Id="$(var.ext)_d.pyd" Directory="DLLs" Guid="*">
+ <File Name="$(var.ext)_d.pyd" />
+ </Component>
+ <Component Id="$(var.ext)_d.pdb" Directory="DLLs" Guid="*">
+ <File Name="$(var.ext)_d.pdb" />
+ </Component>
+
+ <?endforeach ?>
+
+ <Component Id="sqlite3_d.dll" Directory="DLLs" Guid="*">
+ <File Name="sqlite3_d.dll" KeyPath="yes" />
+ </Component>
+ <Component Id="sqlite3_d.pdb" Directory="DLLs" Guid="*">
+ <File Name="sqlite3_d.pdb" KeyPath="yes" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+ <Fragment>
+ <PropertyRef Id="REGISTRYKEY" />
+
+ <ComponentGroup Id="lib_files">
+ <Component Id="PythonPathRegistry" Directory="Lib" Guid="*">
+ <RegistryKey Root="HKMU" Key="[REGISTRYKEY]">
+ <RegistryValue Key="PythonPath" Type="string" Value="[Lib];[DLLs]" />
+ </RegistryKey>
+ </Component>
+ <Component Id="Lib_site_packages_README" Directory="Lib_site_packages" Guid="*">
+ <File Id="Lib_site_packages_README" Name="README.txt" Source="!(bindpath.src)Lib\site-packages\README" KeyPath="yes" />
+ </Component>
+ <Component Id="Lib2to3_pickle_remove" Directory="Lib_lib2to3" Guid="$(var.RemoveLib2to3PickleComponentGuid)">
+ <RemoveFile Id="Lib2to3_pickle_remove_files" Name="*.pickle" On="uninstall" />
+ <RemoveFolder Id="Lib2to3_pickle_remove_folder" On="uninstall" />
+ </Component>
+ </ComponentGroup>
+ <DirectoryRef Id="Lib">
+ <Directory Id="Lib_site_packages" Name="site-packages" />
+ </DirectoryRef>
+ </Fragment>
+</Wix>
diff --git a/Tools/msi/lib/lib_pdb.wixproj b/Tools/msi/lib/lib_pdb.wixproj
new file mode 100644
index 0000000000..db1b5bb316
--- /dev/null
+++ b/Tools/msi/lib/lib_pdb.wixproj
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{5E0BCE93-D1AC-4591-BBCB-3A2BE5A4B3D1}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>lib_pdb</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="lib_pdb.wxs" />
+ <Compile Include="lib_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/lib/lib_pdb.wxs b/Tools/msi/lib/lib_pdb.wxs
new file mode 100644
index 0000000000..8839e8a429
--- /dev/null
+++ b/Tools/msi/lib/lib_pdb.wxs
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.TitlePdb)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+
+ <Feature Id="Symbols" AllowAdvertise="no" Title="!(loc.TitlePdb)" Description="!(loc.DescriptionPdb)">
+ <ComponentGroupRef Id="lib_extensions_symbols" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/make_zip.proj b/Tools/msi/make_zip.proj
new file mode 100644
index 0000000000..d2e031f6b6
--- /dev/null
+++ b/Tools/msi/make_zip.proj
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{10487945-15D1-4092-A214-338395C4116B}</ProjectGuid>
+ <OutputName>python</OutputName>
+ <OutputSuffix></OutputSuffix>
+ <SupportSigning>false</SupportSigning>
+ </PropertyGroup>
+
+ <Import Project="msi.props" />
+
+ <PropertyGroup>
+ <SignOutput>false</SignOutput>
+ <TargetName>python-$(PythonVersion)-embed-$(ArchName)</TargetName>
+ <TargetExt>.zip</TargetExt>
+ <TargetPath>$(OutputPath)\en-us\$(TargetName)$(TargetExt)</TargetPath>
+ <CleanCommand>rmdir /q/s "$(IntermediateOutputPath)\zip_$(ArchName)"</CleanCommand>
+ <Arguments>"$(PythonExe)" "$(MSBuildThisFileDirectory)\make_zip.py"</Arguments>
+ <Arguments>$(Arguments) -e -o "$(TargetPath)" -t "$(IntermediateOutputPath)\zip_$(ArchName)" -a $(ArchName)</Arguments>
+ <Environment>set DOC_FILENAME=python$(PythonVersion).chm
+set VCREDIST_PATH=$(VS140COMNTOOLS)\..\..\VC\redist\$(Platform)\Microsoft.VC140.CRT</Environment>
+ </PropertyGroup>
+
+ <Target Name="_Build">
+ <Exec Command="setlocal
+$(Environment)
+$(CleanCommand)
+$(Arguments)" />
+ </Target>
+
+ <Target Name="AfterBuild" />
+ <Target Name="Build" DependsOnTargets="_Build;AfterBuild" />
+
+ <Target Name="ShowHashes">
+ <ItemGroup>
+ <UserFiles Include="@(File)" Condition="'%(File.CopyTo)' == '$(EXETarget)'" />
+ </ItemGroup>
+
+ <Exec Command="&quot;$(PythonExe)&quot; generate_md5.py @(UserFiles->'&quot;%(FullPath)&quot;',' ')" />
+ </Target>
+</Project>
diff --git a/Tools/msi/make_zip.py b/Tools/msi/make_zip.py
new file mode 100644
index 0000000000..753ba0f787
--- /dev/null
+++ b/Tools/msi/make_zip.py
@@ -0,0 +1,201 @@
+import argparse
+import py_compile
+import re
+import sys
+import shutil
+import stat
+import os
+import tempfile
+
+from pathlib import Path
+from zipfile import ZipFile, ZIP_DEFLATED
+import subprocess
+
+TKTCL_RE = re.compile(r'^(_?tk|tcl).+\.(pyd|dll)', re.IGNORECASE)
+DEBUG_RE = re.compile(r'_d\.(pyd|dll|exe)$', re.IGNORECASE)
+PYTHON_DLL_RE = re.compile(r'python\d\d?\.dll$', re.IGNORECASE)
+
+EXCLUDE_FROM_LIBRARY = {
+ '__pycache__',
+ 'ensurepip',
+ 'idlelib',
+ 'pydoc_data',
+ 'site-packages',
+ 'tkinter',
+ 'turtledemo',
+ 'venv',
+}
+
+EXCLUDE_FILE_FROM_LIBRARY = {
+ 'bdist_wininst.py',
+}
+
+def is_not_debug(p):
+ if DEBUG_RE.search(p.name):
+ return False
+
+ if TKTCL_RE.search(p.name):
+ return False
+
+ return p.name.lower() not in {
+ '_ctypes_test.pyd',
+ '_testbuffer.pyd',
+ '_testcapi.pyd',
+ '_testimportmultiple.pyd',
+ '_testmultiphase.pyd',
+ 'xxlimited.pyd',
+ }
+
+def is_not_debug_or_python(p):
+ return is_not_debug(p) and not PYTHON_DLL_RE.search(p.name)
+
+def include_in_lib(p):
+ name = p.name.lower()
+ if p.is_dir():
+ if name in EXCLUDE_FROM_LIBRARY:
+ return False
+ if name.startswith('plat-'):
+ return False
+ if name == 'test' and p.parts[-2].lower() == 'lib':
+ return False
+ if name in {'test', 'tests'} and p.parts[-3].lower() == 'lib':
+ return False
+ return True
+
+ if name in EXCLUDE_FILE_FROM_LIBRARY:
+ return False
+
+ suffix = p.suffix.lower()
+ return suffix not in {'.pyc', '.pyo', '.exe'}
+
+def include_in_tools(p):
+ if p.is_dir() and p.name.lower() in {'scripts', 'i18n', 'pynche', 'demo', 'parser'}:
+ return True
+
+ return p.suffix.lower() in {'.py', '.pyw', '.txt'}
+
+FULL_LAYOUT = [
+ ('/', 'PCBuild/$arch', 'python*.exe', is_not_debug),
+ ('/', 'PCBuild/$arch', 'python*.dll', is_not_debug),
+ ('DLLs/', 'PCBuild/$arch', '*.pyd', is_not_debug),
+ ('DLLs/', 'PCBuild/$arch', '*.dll', is_not_debug),
+ ('include/', 'include', '*.h', None),
+ ('include/', 'PC', 'pyconfig.h', None),
+ ('Lib/', 'Lib', '**/*', include_in_lib),
+ ('Tools/', 'Tools', '**/*', include_in_tools),
+]
+
+EMBED_LAYOUT = [
+ ('/', 'PCBuild/$arch', 'python*.exe', is_not_debug),
+ ('/', 'PCBuild/$arch', '*.pyd', is_not_debug),
+ ('/', 'PCBuild/$arch', '*.dll', is_not_debug),
+ ('python{0.major}{0.minor}.zip'.format(sys.version_info), 'Lib', '**/*', include_in_lib),
+]
+
+if os.getenv('DOC_FILENAME'):
+ FULL_LAYOUT.append(('Doc/', 'Doc/build/htmlhelp', os.getenv('DOC_FILENAME'), None))
+if os.getenv('VCREDIST_PATH'):
+ FULL_LAYOUT.append(('/', os.getenv('VCREDIST_PATH'), 'vcruntime*.dll', None))
+ EMBED_LAYOUT.append(('/', os.getenv('VCREDIST_PATH'), 'vcruntime*.dll', None))
+
+def copy_to_layout(target, rel_sources):
+ count = 0
+
+ if target.suffix.lower() == '.zip':
+ if target.exists():
+ target.unlink()
+
+ with ZipFile(str(target), 'w', ZIP_DEFLATED) as f:
+ with tempfile.TemporaryDirectory() as tmpdir:
+ for s, rel in rel_sources:
+ if rel.suffix.lower() == '.py':
+ pyc = Path(tmpdir) / rel.with_suffix('.pyc').name
+ try:
+ py_compile.compile(str(s), str(pyc), str(rel), doraise=True, optimize=2)
+ except py_compile.PyCompileError:
+ f.write(str(s), str(rel))
+ else:
+ f.write(str(pyc), str(rel.with_suffix('.pyc')))
+ else:
+ f.write(str(s), str(rel))
+ count += 1
+
+ else:
+ for s, rel in rel_sources:
+ dest = target / rel
+ try:
+ dest.parent.mkdir(parents=True)
+ except FileExistsError:
+ pass
+ if dest.is_file():
+ dest.chmod(stat.S_IWRITE)
+ shutil.copy(str(s), str(dest))
+ if dest.is_file():
+ dest.chmod(stat.S_IWRITE)
+ count += 1
+
+ return count
+
+def rglob(root, pattern, condition):
+ dirs = [root]
+ recurse = pattern[:3] in {'**/', '**\\'}
+ while dirs:
+ d = dirs.pop(0)
+ for f in d.glob(pattern[3:] if recurse else pattern):
+ if recurse and f.is_dir() and (not condition or condition(f)):
+ dirs.append(f)
+ elif f.is_file() and (not condition or condition(f)):
+ yield f, f.relative_to(root)
+
+def main():
+ parser = argparse.ArgumentParser()
+ parser.add_argument('-s', '--source', metavar='dir', help='The directory containing the repository root', type=Path)
+ parser.add_argument('-o', '--out', metavar='file', help='The name of the output self-extracting archive', type=Path, required=True)
+ parser.add_argument('-t', '--temp', metavar='dir', help='A directory to temporarily extract files into', type=Path, default=None)
+ parser.add_argument('-e', '--embed', help='Create an embedding layout', action='store_true', default=False)
+ parser.add_argument('-a', '--arch', help='Specify the architecture to use (win32/amd64)', type=str, default="win32")
+ ns = parser.parse_args()
+
+ source = ns.source or (Path(__file__).parent.parent.parent)
+ out = ns.out
+ arch = ns.arch
+ assert isinstance(source, Path)
+ assert isinstance(out, Path)
+ assert isinstance(arch, str)
+
+ if ns.temp:
+ temp = ns.temp
+ delete_temp = False
+ else:
+ temp = Path(tempfile.mkdtemp())
+ delete_temp = True
+
+ try:
+ out.parent.mkdir(parents=True)
+ except FileExistsError:
+ pass
+ try:
+ temp.mkdir(parents=True)
+ except FileExistsError:
+ pass
+
+ layout = EMBED_LAYOUT if ns.embed else FULL_LAYOUT
+
+ try:
+ for t, s, p, c in layout:
+ s = source / s.replace("$arch", arch)
+ copied = copy_to_layout(temp / t.rstrip('/'), rglob(s, p, c))
+ print('Copied {} files'.format(copied))
+
+ with open(str(temp / 'pyvenv.cfg'), 'w') as f:
+ print('applocal = true', file=f)
+
+ total = copy_to_layout(out, rglob(temp, '*', None))
+ print('Wrote {} files to {}'.format(total, out))
+ finally:
+ if delete_temp:
+ shutil.rmtree(temp, True)
+
+
+if __name__ == "__main__":
+ sys.exit(int(main() or 0))
diff --git a/Tools/msi/msi.props b/Tools/msi/msi.props
new file mode 100644
index 0000000000..9ae6d9988e
--- /dev/null
+++ b/Tools/msi/msi.props
@@ -0,0 +1,171 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" TreatAsLocalProperty="ReleaseUri">
+ <PropertyGroup>
+ <TargetName>$(OutputName)</TargetName>
+ <DefineSolutionProperties>false</DefineSolutionProperties>
+ <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+ <SuppressIces>$(SuppressIces);ICE03;ICE57;ICE61</SuppressIces>
+ <CompilerSuppressSpecificWarnings>1026</CompilerSuppressSpecificWarnings>
+ <BuildForRelease Condition="'$(BuildForRelease)' == ''">false</BuildForRelease>
+ <SignOutput Condition="'$(SigningCertificate)' != ''">true</SignOutput>
+ <Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
+ <Platform Condition="'$(Platform)' == ''">x86</Platform>
+ <InstallScope Condition="'$(InstallScope)' != 'perMachine'">perUser</InstallScope>
+ </PropertyGroup>
+
+ <Import Project="wix.props" />
+ <Import Project="..\..\PCBuild\tcltk.props" />
+
+ <PropertyGroup>
+ <!--
+ This URI is used to generate the various GUIDs used by the installer.
+ Installers built with the same URI will upgrade each other or block
+ when attempting to downgrade.
+
+ By default, this is the local computer name, which will produce
+ installers that do not interfere with other installers. Products
+ that intend to bundle Python should rebuild these modules with their
+ own URI to avoid conflicting with the official releases.
+
+ The official releases use "http://www.python.org/$(ArchName)"
+
+ This is not the same as the DownloadUrl property used in the bundle
+ projects.
+ -->
+ <ReleaseUri Condition="'$(ReleaseUri)' == ''">$(ComputerName)/$(ArchName)/</ReleaseUri>
+ <ReleaseUri Condition="!$(ReleaseUri.EndsWith(`/`))">$(ReleaseUri)/</ReleaseUri>
+ </PropertyGroup>
+
+
+ <ItemGroup>
+ <Compile Include="$(MSBuildThisFileDirectory)common.wxs" />
+ <WxlTemplate Include="$(MSBuildThisFileDirectory)\*.wxl_template" Condition="$(IgnoreCommonWxlTemplates) != 'true'" />
+ <WixExtension Include="WixUtilExtension">
+ <HintPath>WixUtilExtension</HintPath>
+ <Name>WixUtilExtension</Name>
+ </WixExtension>
+ </ItemGroup>
+
+ <PropertyGroup>
+ <IntermediateOutputPath>$(PySourcePath)PCBuild\obj\$(Configuration)_$(Platform)_Setup\$(OutputName)</IntermediateOutputPath>
+ <IntermediateOutputPath Condition="'$(OutputSuffix)' != ''">$(IntermediateOutputPath)_$(OutputSuffix)</IntermediateOutputPath>
+ <OutputPath Condition="'$(OutputPath)' == ''">$(BuildPath)</OutputPath>
+ <OutputPath Condition="!HasTrailingSlash($(OutputPath))">$(OutputPath)\</OutputPath>
+ <OutDir>$(OutputPath)</OutDir>
+ <ReuseCabinetCache>true</ReuseCabinetCache>
+ <CRTRedist Condition="'$(CRTRedist)' == ''">$(ExternalsDir)\windows-installer\redist</CRTRedist>
+ <CRTRedist Condition="!Exists($(CRTRedist))"></CRTRedist>
+ <DocFilename>python$(MajorVersionNumber)$(MinorVersionNumber)$(MicroVersionNumber)$(ReleaseLevelName).chm</DocFilename>
+
+ <InstallerVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(Field3Value).0</InstallerVersion>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="!$(BuildForRelease)">
+ <RevisionNumber Condition="'$(RevisionNumber)' == ''">$([System.Math]::Floor($([System.DateTime]::Now.Subtract($([System.DateTime]::new(2001, 1, 1))).TotalDays)))</RevisionNumber>
+ <PythonVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)dev$(RevisionNumber)</PythonVersion>
+ <InstallerVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(RevisionNumber).0</InstallerVersion>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <Bitness>32-bit</Bitness>
+ <Bitness Condition="$(Platform) == 'x64'">64-bit</Bitness>
+ <DefineConstants>
+ $(DefineConstants);
+ Version=$(InstallerVersion);
+ ShortVersion=$(MajorVersionNumber).$(MinorVersionNumber);
+ LongVersion=$(PythonVersion);
+ MajorVersionNumber=$(MajorVersionNumber);
+ MinorVersionNumber=$(MinorVersionNumber);
+ UpgradeMinimumVersion=$(MajorVersionNumber).$(MinorVersionNumber).0.0;
+ NextMajorVersionNumber=$(MajorVersionNumber).$([msbuild]::Add($(MinorVersionNumber), 1)).0.0;
+ Bitness=$(Bitness);
+ PyDebugExt=$(PyDebugExt);
+ PyArchExt=$(PyArchExt);
+ PyTestExt=$(PyTestExt);
+ OptionalFeatureName=$(OutputName);
+ </DefineConstants>
+ <DefineConstants Condition="'$(CRTRedist)' != ''">
+ $(DefineConstants);CRTRedist=$(CRTRedist);
+ </DefineConstants>
+ <DefineConstants Condition="$(Platform) != 'x64'">
+ $(DefineConstants);Suffix32=-32;
+ </DefineConstants>
+ <DefineConstants Condition="$(Platform) == 'x64'">
+ $(DefineConstants);Suffix32=;
+ </DefineConstants>
+ </PropertyGroup>
+
+ <ItemDefinitionGroup>
+ <InstallFiles>
+ <Group>generated_filelist</Group>
+ <Condition></Condition>
+ <DiskId></DiskId>
+ </InstallFiles>
+ <LinkerBindInputPaths>
+ <Visible>false</Visible>
+ </LinkerBindInputPaths>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <LinkerBindInputPaths Include="$(PGOBuildPath);$(BuildPath)">
+ <BindName></BindName>
+ </LinkerBindInputPaths>
+ <LinkerBindInputPaths Include="$(PySourcePath)Doc\build\htmlhelp">
+ <BindName></BindName>
+ </LinkerBindInputPaths>
+ <LinkerBindInputPaths Include="$(PySourcePath)">
+ <BindName>src</BindName>
+ </LinkerBindInputPaths>
+ <LinkerBindInputPaths Include="$(tcltkDir)">
+ <BindName>tcltk</BindName>
+ </LinkerBindInputPaths>
+ <LinkerBindInputPaths Include="$(CRTRedist)" Condition="'$(CRTRedist)' != ''">
+ <BindName>redist</BindName>
+ </LinkerBindInputPaths>
+ <LinkerBindInputPaths Include="$(VS140COMNTOOLS)\..\..\VC\redist\$(Platform)\Microsoft.VC140.CRT">
+ <BindName>redist</BindName>
+ </LinkerBindInputPaths>
+ </ItemGroup>
+
+ <Target Name="_ValidateMsiProps" BeforeTargets="PrepareForBuild">
+ <Error Text="Platform '$(Platform)' is not supported. Use 'x86' or 'x64'." Condition="$(Platform) != 'x86' and $(Platform) != 'x64'" />
+ </Target>
+
+ <ItemGroup>
+ <_Uuid Include="CoreUpgradeCode">
+ <Uri>upgradecode</Uri>
+ </_Uuid>
+ <_Uuid Include="UpgradeCode">
+ <Uri>upgradecode/$(OutputName)</Uri>
+ </_Uuid>
+ <_Uuid Include="InstallDirectoryGuidSeed">
+ <Uri>installdirectoryseed</Uri>
+ </_Uuid>
+ <_Uuid Include="PythonExeComponentGuid">
+ <Uri>python.exe</Uri>
+ </_Uuid>
+ <_Uuid Include="PythonwExeComponentGuid">
+ <Uri>pythonw.exe</Uri>
+ </_Uuid>
+ <_Uuid Include="RemoveLib2to3PickleComponentGuid">
+ <Uri>lib2to3/pickles</Uri>
+ </_Uuid>
+ </ItemGroup>
+ <Target Name="_GenerateGuids" AfterTargets="PrepareForBuild" Condition="$(TargetName) != 'launcher'">
+ <PropertyGroup>
+ <_Uuids>@(_Uuid->'("%(Identity)", "$(MajorVersionNumber).$(MinorVersionNumber)/%(Uri)")',',')</_Uuids>
+ <_GenerateCommand>import uuid; print('\n'.join('{}={}'.format(i, uuid.uuid5(uuid.UUID('c8d9733e-a70c-43ff-ab0c-e26456f11083'), '$(ReleaseUri.Replace(`{arch}`, `$(ArchName)`))' + j)) for i,j in [$(_Uuids.Replace(`"`,`'`))]))</_GenerateCommand>
+ </PropertyGroup>
+
+ <Exec Command='"$(PythonExe)" -c "$(_GenerateCommand)" &gt; "$(IntermediateOutputPath)$(OutputName)guids.txt"'
+ WorkingDirectory="$(MSBuildThisFileDirectory)"
+ IgnoreExitCode="false" />
+
+ <ReadLinesFromFile File="$(IntermediateOutputPath)$(OutputName)guids.txt">
+ <Output TaskParameter="Lines" ItemName="_UuidValue" />
+ </ReadLinesFromFile>
+
+ <PropertyGroup>
+ <DefineConstants>$(DefineConstants);@(_UuidValue,';');</DefineConstants>
+ </PropertyGroup>
+ </Target>
+</Project> \ No newline at end of file
diff --git a/Tools/msi/msi.py b/Tools/msi/msi.py
deleted file mode 100644
index d7453a5cba..0000000000
--- a/Tools/msi/msi.py
+++ /dev/null
@@ -1,1456 +0,0 @@
-# Python MSI Generator
-# (C) 2003 Martin v. Loewis
-# See "FOO" in comments refers to MSDN sections with the title FOO.
-import msilib, schema, sequence, os, glob, time, re, shutil, zipfile
-import subprocess, tempfile
-from msilib import Feature, CAB, Directory, Dialog, Binary, add_data
-import uisample
-from win32com.client import constants
-from distutils.spawn import find_executable
-
-# Settings can be overridden in config.py below
-# 0 for official python.org releases
-# 1 for intermediate releases by anybody, with
-# a new product code for every package.
-snapshot = 1
-# 1 means that file extension is px, not py,
-# and binaries start with x
-testpackage = 0
-# Location of build tree
-srcdir = os.path.abspath("../..")
-# Text to be displayed as the version in dialogs etc.
-# goes into file name and ProductCode. Defaults to
-# current_version.day for Snapshot, current_version otherwise
-full_current_version = None
-# Is Tcl available at all?
-have_tcl = True
-# path to PCbuild directory
-PCBUILD="PCbuild"
-# msvcrt version
-MSVCR = "100"
-# Name of certificate in default store to sign MSI with
-certname = None
-# Make a zip file containing the PDB files for this build?
-pdbzip = True
-
-try:
- from config import *
-except ImportError:
- pass
-
-# Extract current version from Include/patchlevel.h
-lines = open(srcdir + "/Include/patchlevel.h").readlines()
-major = minor = micro = level = serial = None
-levels = {
- 'PY_RELEASE_LEVEL_ALPHA':0xA,
- 'PY_RELEASE_LEVEL_BETA': 0xB,
- 'PY_RELEASE_LEVEL_GAMMA':0xC,
- 'PY_RELEASE_LEVEL_FINAL':0xF
- }
-for l in lines:
- if not l.startswith("#define"):
- continue
- l = l.split()
- if len(l) != 3:
- continue
- _, name, value = l
- if name == 'PY_MAJOR_VERSION': major = value
- if name == 'PY_MINOR_VERSION': minor = value
- if name == 'PY_MICRO_VERSION': micro = value
- if name == 'PY_RELEASE_LEVEL': level = levels[value]
- if name == 'PY_RELEASE_SERIAL': serial = value
-
-short_version = major+"."+minor
-# See PC/make_versioninfo.c
-FIELD3 = 1000*int(micro) + 10*level + int(serial)
-current_version = "%s.%d" % (short_version, FIELD3)
-
-# This should never change. The UpgradeCode of this package can be
-# used in the Upgrade table of future packages to make the future
-# package replace this one. See "UpgradeCode Property".
-# upgrade_code gets set to upgrade_code_64 when we have determined
-# that the target is Win64.
-upgrade_code_snapshot='{92A24481-3ECB-40FC-8836-04B7966EC0D5}'
-upgrade_code='{65E6DE48-A358-434D-AA4F-4AF72DB4718F}'
-upgrade_code_64='{6A965A0C-6EE6-4E3A-9983-3263F56311EC}'
-
-if snapshot:
- current_version = "%s.%s.%s" % (major, minor, int(time.time()/3600/24))
-
-if full_current_version is None:
- full_current_version = current_version
-
-extensions = [
- 'pyexpat.pyd',
- 'select.pyd',
- 'unicodedata.pyd',
- 'winsound.pyd',
- '_bz2.pyd',
- '_elementtree.pyd',
- '_socket.pyd',
- '_ssl.pyd',
- '_testcapi.pyd',
- '_tkinter.pyd',
- '_msi.pyd',
- '_ctypes.pyd',
- '_ctypes_test.pyd',
- '_sqlite3.pyd',
- '_hashlib.pyd',
- '_multiprocessing.pyd',
- '_lzma.pyd',
- '_decimal.pyd',
- '_testbuffer.pyd',
- '_testimportmultiple.pyd',
- '_overlapped.pyd',
-]
-
-# Well-known component UUIDs
-# These are needed for SharedDLLs reference counter; if
-# a different UUID was used for each incarnation of, say,
-# python24.dll, an upgrade would set the reference counter
-# from 1 to 2 (due to what I consider a bug in MSI)
-# Using the same UUID is fine since these files are versioned,
-# so Installer will always keep the newest version.
-# NOTE: All uuids are self generated.
-pythondll_uuid = {
- "24":"{9B81E618-2301-4035-AC77-75D9ABEB7301}",
- "25":"{2e41b118-38bd-4c1b-a840-6977efd1b911}",
- "26":"{34ebecac-f046-4e1c-b0e3-9bac3cdaacfa}",
- "27":"{4fe21c76-1760-437b-a2f2-99909130a175}",
- "30":"{6953bc3b-6768-4291-8410-7914ce6e2ca8}",
- "31":"{4afcba0b-13e4-47c3-bebe-477428b46913}",
- "32":"{3ff95315-1096-4d31-bd86-601d5438ad5e}",
- "33":"{f7581ca4-d368-4eea-8f82-d48c64c4f047}",
- "34":"{7A0C5812-2583-40D9-BCBB-CD7485F11377}",
- } [major+minor]
-
-# Compute the name that Sphinx gives to the docfile
-docfile = micro
-if level < 0xf:
- if level == 0xC:
- docfile += "rc%s" % (serial,)
- else:
- docfile += '%x%s' % (level, serial)
-docfile = 'python%s%s%s.chm' % (major, minor, docfile)
-
-# Build the mingw import library, libpythonXY.a
-# This requires 'nm' and 'dlltool' executables on your PATH
-def build_mingw_lib(lib_file, def_file, dll_file, mingw_lib):
- warning = "WARNING: %s - libpythonXX.a not built"
- nm = find_executable('nm')
- dlltool = find_executable('dlltool')
-
- if not nm or not dlltool:
- print(warning % "nm and/or dlltool were not found")
- return False
-
- nm_command = '%s -Cs %s' % (nm, lib_file)
- dlltool_command = "%s --dllname %s --def %s --output-lib %s" % \
- (dlltool, dll_file, def_file, mingw_lib)
- export_match = re.compile(r"^_imp__(.*) in python\d+\.dll").match
-
- f = open(def_file,'w')
- f.write("LIBRARY %s\n" % dll_file)
- f.write("EXPORTS\n")
-
- nm_pipe = os.popen(nm_command)
- for line in nm_pipe.readlines():
- m = export_match(line)
- if m:
- f.write(m.group(1)+"\n")
- f.close()
- exit = nm_pipe.close()
-
- if exit:
- print(warning % "nm did not run successfully")
- return False
-
- if os.system(dlltool_command) != 0:
- print(warning % "dlltool did not run successfully")
- return False
-
- return True
-
-# Target files (.def and .a) go in PCBuild directory
-lib_file = os.path.join(srcdir, PCBUILD, "python%s%s.lib" % (major, minor))
-def_file = os.path.join(srcdir, PCBUILD, "python%s%s.def" % (major, minor))
-dll_file = "python%s%s.dll" % (major, minor)
-mingw_lib = os.path.join(srcdir, PCBUILD, "libpython%s%s.a" % (major, minor))
-
-have_mingw = build_mingw_lib(lib_file, def_file, dll_file, mingw_lib)
-
-# Determine the target architecture
-if os.system("nmake /nologo /c /f msisupport.mak") != 0:
- raise RuntimeError("'nmake /f msisupport.mak' failed")
-dll_path = os.path.join(srcdir, PCBUILD, dll_file)
-msilib.set_arch_from_file(dll_path)
-if msilib.pe_type(dll_path) != msilib.pe_type("msisupport.dll"):
- raise SystemError("msisupport.dll for incorrect architecture")
-
-if msilib.Win64:
- upgrade_code = upgrade_code_64
-
-if snapshot:
- product_code = msilib.gen_uuid()
-else:
- # official release: generate UUID from the download link that the file will have
- import uuid
- product_code = uuid.uuid3(uuid.NAMESPACE_URL,
- 'http://www.python.org/ftp/python/%s.%s.%s/python-%s%s.msi' %
- (major, minor, micro, full_current_version, msilib.arch_ext))
- product_code = '{%s}' % product_code
-
-if testpackage:
- ext = 'px'
- testprefix = 'x'
-else:
- ext = 'py'
- testprefix = ''
-
-if msilib.Win64:
- SystemFolderName = "[System64Folder]"
- registry_component = 4|256
-else:
- SystemFolderName = "[SystemFolder]"
- registry_component = 4
-
-msilib.reset()
-
-# condition in which to install pythonxy.dll in system32:
-# a) it is Windows 9x or
-# b) it is NT, the user is privileged, and has chosen per-machine installation
-sys32cond = "(Windows9x or (Privileged and ALLUSERS))"
-
-def build_database():
- """Generate an empty database, with just the schema and the
- Summary information stream."""
- if snapshot:
- uc = upgrade_code_snapshot
- else:
- uc = upgrade_code
- if msilib.Win64:
- productsuffix = " (64-bit)"
- else:
- productsuffix = ""
- # schema represents the installer 2.0 database schema.
- # sequence is the set of standard sequences
- # (ui/execute, admin/advt/install)
- msiname = "python-%s%s.msi" % (full_current_version, msilib.arch_ext)
- db = msilib.init_database(msiname,
- schema, ProductName="Python "+full_current_version+productsuffix,
- ProductCode=product_code,
- ProductVersion=current_version,
- Manufacturer=u"Python Software Foundation",
- request_uac = True)
- # The default sequencing of the RemoveExistingProducts action causes
- # removal of files that got just installed. Place it after
- # InstallInitialize, so we first uninstall everything, but still roll
- # back in case the installation is interrupted
- msilib.change_sequence(sequence.InstallExecuteSequence,
- "RemoveExistingProducts", 1510)
- msilib.add_tables(db, sequence)
- # We cannot set ALLUSERS in the property table, as this cannot be
- # reset if the user choses a per-user installation. Instead, we
- # maintain WhichUsers, which can be "ALL" or "JUSTME". The UI manages
- # this property, and when the execution starts, ALLUSERS is set
- # accordingly.
- add_data(db, "Property", [("UpgradeCode", uc),
- ("WhichUsers", "ALL"),
- ("ProductLine", "Python%s%s" % (major, minor)),
- ])
- db.Commit()
- return db, msiname
-
-def remove_old_versions(db):
- "Fill the upgrade table."
- start = "%s.%s.0" % (major, minor)
- # This requests that feature selection states of an older
- # installation should be forwarded into this one. Upgrading
- # requires that both the old and the new installation are
- # either both per-machine or per-user.
- migrate_features = 1
- # See "Upgrade Table". We remove releases with the same major and
- # minor version. For an snapshot, we remove all earlier snapshots. For
- # a release, we remove all snapshots, and all earlier releases.
- if snapshot:
- add_data(db, "Upgrade",
- [(upgrade_code_snapshot, start,
- current_version,
- None, # Ignore language
- migrate_features,
- None, # Migrate ALL features
- "REMOVEOLDSNAPSHOT")])
- props = "REMOVEOLDSNAPSHOT"
- else:
- add_data(db, "Upgrade",
- [(upgrade_code, start, current_version,
- None, migrate_features, None, "REMOVEOLDVERSION"),
- (upgrade_code_snapshot, start, "%s.%d.0" % (major, int(minor)+1),
- None, migrate_features, None, "REMOVEOLDSNAPSHOT")])
- props = "REMOVEOLDSNAPSHOT;REMOVEOLDVERSION"
-
- props += ";TARGETDIR;DLLDIR;LAUNCHERDIR"
- # Installer collects the product codes of the earlier releases in
- # these properties. In order to allow modification of the properties,
- # they must be declared as secure. See "SecureCustomProperties Property"
- add_data(db, "Property", [("SecureCustomProperties", props)])
-
-class PyDialog(Dialog):
- """Dialog class with a fixed layout: controls at the top, then a ruler,
- then a list of buttons: back, next, cancel. Optionally a bitmap at the
- left."""
- def __init__(self, *args, **kw):
- """Dialog(database, name, x, y, w, h, attributes, title, first,
- default, cancel, bitmap=true)"""
- Dialog.__init__(self, *args)
- ruler = self.h - 36
- bmwidth = 152*ruler/328
- if kw.get("bitmap", True):
- self.bitmap("Bitmap", 0, 0, bmwidth, ruler, "PythonWin")
- self.line("BottomLine", 0, ruler, self.w, 0)
-
- def title(self, title):
- "Set the title text of the dialog at the top."
- # name, x, y, w, h, flags=Visible|Enabled|Transparent|NoPrefix,
- # text, in VerdanaBold10
- self.text("Title", 135, 10, 220, 60, 0x30003,
- r"{\VerdanaBold10}%s" % title)
-
- def back(self, title, next, name = "Back", active = 1):
- """Add a back button with a given title, the tab-next button,
- its name in the Control table, possibly initially disabled.
-
- Return the button, so that events can be associated"""
- if active:
- flags = 3 # Visible|Enabled
- else:
- flags = 1 # Visible
- return self.pushbutton(name, 180, self.h-27 , 56, 17, flags, title, next)
-
- def cancel(self, title, next, name = "Cancel", active = 1):
- """Add a cancel button with a given title, the tab-next button,
- its name in the Control table, possibly initially disabled.
-
- Return the button, so that events can be associated"""
- if active:
- flags = 3 # Visible|Enabled
- else:
- flags = 1 # Visible
- return self.pushbutton(name, 304, self.h-27, 56, 17, flags, title, next)
-
- def next(self, title, next, name = "Next", active = 1):
- """Add a Next button with a given title, the tab-next button,
- its name in the Control table, possibly initially disabled.
-
- Return the button, so that events can be associated"""
- if active:
- flags = 3 # Visible|Enabled
- else:
- flags = 1 # Visible
- return self.pushbutton(name, 236, self.h-27, 56, 17, flags, title, next)
-
- def xbutton(self, name, title, next, xpos):
- """Add a button with a given title, the tab-next button,
- its name in the Control table, giving its x position; the
- y-position is aligned with the other buttons.
-
- Return the button, so that events can be associated"""
- return self.pushbutton(name, int(self.w*xpos - 28), self.h-27, 56, 17, 3, title, next)
-
-def add_ui(db):
- x = y = 50
- w = 370
- h = 300
- title = "[ProductName] Setup"
-
- # see "Dialog Style Bits"
- modal = 3 # visible | modal
- modeless = 1 # visible
- track_disk_space = 32
-
- add_data(db, 'ActionText', uisample.ActionText)
- add_data(db, 'UIText', uisample.UIText)
-
- # Bitmaps
- if not os.path.exists(srcdir+r"\PC\python_icon.exe"):
- raise RuntimeError("Run icons.mak in PC directory")
- add_data(db, "Binary",
- [("PythonWin", msilib.Binary(r"%s\PCbuild\installer.bmp" % srcdir)), # 152x328 pixels
- ("py.ico",msilib.Binary(srcdir+r"\PC\py.ico")),
- ])
- add_data(db, "Icon",
- [("python_icon.exe", msilib.Binary(srcdir+r"\PC\python_icon.exe"))])
-
- # Scripts
- # CheckDir sets TargetExists if TARGETDIR exists.
- # UpdateEditIDLE sets the REGISTRY.tcl component into
- # the installed/uninstalled state according to both the
- # Extensions and TclTk features.
- add_data(db, "Binary", [("Script", msilib.Binary("msisupport.dll"))])
- # See "Custom Action Type 1"
- if msilib.Win64:
- CheckDir = "CheckDir"
- UpdateEditIDLE = "UpdateEditIDLE"
- else:
- CheckDir = "_CheckDir@4"
- UpdateEditIDLE = "_UpdateEditIDLE@4"
- add_data(db, "CustomAction",
- [("CheckDir", 1, "Script", CheckDir)])
- if have_tcl:
- add_data(db, "CustomAction",
- [("UpdateEditIDLE", 1, "Script", UpdateEditIDLE)])
-
- # UI customization properties
- add_data(db, "Property",
- # See "DefaultUIFont Property"
- [("DefaultUIFont", "DlgFont8"),
- # See "ErrorDialog Style Bit"
- ("ErrorDialog", "ErrorDlg"),
- ("Progress1", "Install"), # modified in maintenance type dlg
- ("Progress2", "installs"),
- ("MaintenanceForm_Action", "Repair")])
-
- # Fonts, see "TextStyle Table"
- add_data(db, "TextStyle",
- [("DlgFont8", "Tahoma", 9, None, 0),
- ("DlgFontBold8", "Tahoma", 8, None, 1), #bold
- ("VerdanaBold10", "Verdana", 10, None, 1),
- ("VerdanaRed9", "Verdana", 9, 255, 0),
- ])
-
- compileargs = r'-Wi "[TARGETDIR]Lib\compileall.py" -f -x "bad_coding|badsyntax|site-packages|py2_|lib2to3\\tests|venv\\scripts" "[TARGETDIR]Lib"'
- lib2to3args = r'-c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"'
- updatepipargs = r'-m ensurepip -U --default-pip'
- removepipargs = r'-B -m ensurepip._uninstall'
- # See "CustomAction Table"
- add_data(db, "CustomAction", [
- # msidbCustomActionTypeFirstSequence + msidbCustomActionTypeTextData + msidbCustomActionTypeProperty
- # See "Custom Action Type 51",
- # "Custom Action Execution Scheduling Options"
- ("InitialTargetDir", 307, "TARGETDIR",
- "[WindowsVolume]Python%s%s" % (major, minor)),
- ("SetDLLDirToTarget", 307, "DLLDIR", "[TARGETDIR]"),
- ("SetDLLDirToSystem32", 307, "DLLDIR", SystemFolderName),
- ("SetLauncherDirToTarget", 307, "LAUNCHERDIR", "[TARGETDIR]"),
- ("SetLauncherDirToWindows", 307, "LAUNCHERDIR", "[WindowsFolder]"),
- # msidbCustomActionTypeExe + msidbCustomActionTypeSourceFile
- # See "Custom Action Type 18"
- # msidbCustomActionTypeInScript (1024); run during actual installation
- # msidbCustomActionTypeNoImpersonate (2048); run action in system account, not user account
- ("CompilePyc", 18+1024+2048, "python.exe", compileargs),
- ("CompilePyo", 18+1024+2048, "python.exe", "-O "+compileargs),
- ("CompileGrammar", 18+1024+2048, "python.exe", lib2to3args),
- ("UpdatePip", 18+1024+2048, "python.exe", updatepipargs),
- ("RemovePip", 18+1024+2048, "python.exe", removepipargs),
- ])
-
- # UI Sequences, see "InstallUISequence Table", "Using a Sequence Table"
- # Numbers indicate sequence; see sequence.py for how these action integrate
- add_data(db, "InstallUISequence",
- [("PrepareDlg", "Not Privileged or Windows9x or Installed", 140),
- ("WhichUsersDlg", "Privileged and not Windows9x and not Installed", 141),
- ("InitialTargetDir", 'TARGETDIR=""', 750),
- # In the user interface, assume all-users installation if privileged.
- ("SetDLLDirToSystem32", 'DLLDIR="" and ' + sys32cond, 751),
- ("SetDLLDirToTarget", 'DLLDIR="" and not ' + sys32cond, 752),
- ("SetLauncherDirToWindows", 'LAUNCHERDIR="" and ' + sys32cond, 753),
- ("SetLauncherDirToTarget", 'LAUNCHERDIR="" and not ' + sys32cond, 754),
- ("SelectDirectoryDlg", "Not Installed", 1230),
- # XXX no support for resume installations yet
- #("ResumeDlg", "Installed AND (RESUME OR Preselected)", 1240),
- ("MaintenanceTypeDlg", "Installed AND NOT RESUME AND NOT Preselected", 1250),
- ("ProgressDlg", None, 1280)])
- add_data(db, "AdminUISequence",
- [("InitialTargetDir", 'TARGETDIR=""', 750),
- ("SetDLLDirToTarget", 'DLLDIR=""', 751),
- ("SetLauncherDirToTarget", 'LAUNCHERDIR=""', 752),
- ])
-
- # Prepend TARGETDIR to the system path, and remove it on uninstall.
- add_data(db, "Environment",
- [("PathAddition", "=-*Path", "[TARGETDIR];[TARGETDIR]Scripts;[~]", "REGISTRY.path")])
-
- # Execute Sequences
- add_data(db, "InstallExecuteSequence",
- [("InitialTargetDir", 'TARGETDIR=""', 750),
- ("SetDLLDirToSystem32", 'DLLDIR="" and ' + sys32cond, 751),
- ("SetDLLDirToTarget", 'DLLDIR="" and not ' + sys32cond, 752),
- ("SetLauncherDirToWindows", 'LAUNCHERDIR="" and ' + sys32cond, 753),
- ("SetLauncherDirToTarget", 'LAUNCHERDIR="" and not ' + sys32cond, 754),
- ("UpdateEditIDLE", None, 1050),
- # run command if install state of pip changes to INSTALLSTATE_LOCAL
- # run after InstallFiles
- ("UpdatePip", "&pip_feature=3", 4001),
- # remove pip when state changes to INSTALLSTATE_ABSENT
- # run before RemoveFiles
- ("RemovePip", "&pip_feature=2", 3499),
- ("CompilePyc", "COMPILEALL", 4002),
- ("CompilePyo", "COMPILEALL", 4003),
- ("CompileGrammar", "COMPILEALL", 4004),
- ])
- add_data(db, "AdminExecuteSequence",
- [("InitialTargetDir", 'TARGETDIR=""', 750),
- ("SetDLLDirToTarget", 'DLLDIR=""', 751),
- ("SetLauncherDirToTarget", 'LAUNCHERDIR=""', 752),
- ])
-
- #####################################################################
- # Standard dialogs: FatalError, UserExit, ExitDialog
- fatal=PyDialog(db, "FatalError", x, y, w, h, modal, title,
- "Finish", "Finish", "Finish")
- fatal.title("[ProductName] Installer ended prematurely")
- fatal.back("< Back", "Finish", active = 0)
- fatal.cancel("Cancel", "Back", active = 0)
- fatal.text("Description1", 135, 70, 220, 80, 0x30003,
- "[ProductName] setup ended prematurely because of an error. Your system has not been modified. To install this program at a later time, please run the installation again.")
- fatal.text("Description2", 135, 155, 220, 20, 0x30003,
- "Click the Finish button to exit the Installer.")
- c=fatal.next("Finish", "Cancel", name="Finish")
- # See "ControlEvent Table". Parameters are the event, the parameter
- # to the action, and optionally the condition for the event, and the order
- # of events.
- c.event("EndDialog", "Exit")
-
- user_exit=PyDialog(db, "UserExit", x, y, w, h, modal, title,
- "Finish", "Finish", "Finish")
- user_exit.title("[ProductName] Installer was interrupted")
- user_exit.back("< Back", "Finish", active = 0)
- user_exit.cancel("Cancel", "Back", active = 0)
- user_exit.text("Description1", 135, 70, 220, 80, 0x30003,
- "[ProductName] setup was interrupted. Your system has not been modified. "
- "To install this program at a later time, please run the installation again.")
- user_exit.text("Description2", 135, 155, 220, 20, 0x30003,
- "Click the Finish button to exit the Installer.")
- c = user_exit.next("Finish", "Cancel", name="Finish")
- c.event("EndDialog", "Exit")
-
- exit_dialog = PyDialog(db, "ExitDialog", x, y, w, h, modal, title,
- "Finish", "Finish", "Finish")
- exit_dialog.title("Complete the [ProductName] Installer")
- exit_dialog.back("< Back", "Finish", active = 0)
- exit_dialog.cancel("Cancel", "Back", active = 0)
- exit_dialog.text("Acknowledgements", 135, 95, 220, 120, 0x30003,
- "Special Windows thanks to:\n"
- " Mark Hammond, without whose years of freely \n"
- " shared Windows expertise, Python for Windows \n"
- " would still be Python for DOS.")
-
- c = exit_dialog.text("warning", 135, 200, 220, 40, 0x30003,
- "{\\VerdanaRed9}Warning: Python 2.5.x is the last "
- "Python release for Windows 9x.")
- c.condition("Hide", "NOT Version9X")
-
- exit_dialog.text("Description", 135, 235, 220, 20, 0x30003,
- "Click the Finish button to exit the Installer.")
- c = exit_dialog.next("Finish", "Cancel", name="Finish")
- c.event("EndDialog", "Return")
-
- #####################################################################
- # Required dialog: FilesInUse, ErrorDlg
- inuse = PyDialog(db, "FilesInUse",
- x, y, w, h,
- 19, # KeepModeless|Modal|Visible
- title,
- "Retry", "Retry", "Retry", bitmap=False)
- inuse.text("Title", 15, 6, 200, 15, 0x30003,
- r"{\DlgFontBold8}Files in Use")
- inuse.text("Description", 20, 23, 280, 20, 0x30003,
- "Some files that need to be updated are currently in use.")
- inuse.text("Text", 20, 55, 330, 50, 3,
- "The following applications are using files that need to be updated by this setup. Close these applications and then click Retry to continue the installation or Cancel to exit it.")
- inuse.control("List", "ListBox", 20, 107, 330, 130, 7, "FileInUseProcess",
- None, None, None)
- c=inuse.back("Exit", "Ignore", name="Exit")
- c.event("EndDialog", "Exit")
- c=inuse.next("Ignore", "Retry", name="Ignore")
- c.event("EndDialog", "Ignore")
- c=inuse.cancel("Retry", "Exit", name="Retry")
- c.event("EndDialog","Retry")
-
-
- # See "Error Dialog". See "ICE20" for the required names of the controls.
- error = Dialog(db, "ErrorDlg",
- 50, 10, 330, 101,
- 65543, # Error|Minimize|Modal|Visible
- title,
- "ErrorText", None, None)
- error.text("ErrorText", 50,9,280,48,3, "")
- error.control("ErrorIcon", "Icon", 15, 9, 24, 24, 5242881, None, "py.ico", None, None)
- error.pushbutton("N",120,72,81,21,3,"No",None).event("EndDialog","ErrorNo")
- error.pushbutton("Y",240,72,81,21,3,"Yes",None).event("EndDialog","ErrorYes")
- error.pushbutton("A",0,72,81,21,3,"Abort",None).event("EndDialog","ErrorAbort")
- error.pushbutton("C",42,72,81,21,3,"Cancel",None).event("EndDialog","ErrorCancel")
- error.pushbutton("I",81,72,81,21,3,"Ignore",None).event("EndDialog","ErrorIgnore")
- error.pushbutton("O",159,72,81,21,3,"Ok",None).event("EndDialog","ErrorOk")
- error.pushbutton("R",198,72,81,21,3,"Retry",None).event("EndDialog","ErrorRetry")
-
- #####################################################################
- # Global "Query Cancel" dialog
- cancel = Dialog(db, "CancelDlg", 50, 10, 260, 85, 3, title,
- "No", "No", "No")
- cancel.text("Text", 48, 15, 194, 30, 3,
- "Are you sure you want to cancel [ProductName] installation?")
- cancel.control("Icon", "Icon", 15, 15, 24, 24, 5242881, None,
- "py.ico", None, None)
- c=cancel.pushbutton("Yes", 72, 57, 56, 17, 3, "Yes", "No")
- c.event("EndDialog", "Exit")
-
- c=cancel.pushbutton("No", 132, 57, 56, 17, 3, "No", "Yes")
- c.event("EndDialog", "Return")
-
- #####################################################################
- # Global "Wait for costing" dialog
- costing = Dialog(db, "WaitForCostingDlg", 50, 10, 260, 85, modal, title,
- "Return", "Return", "Return")
- costing.text("Text", 48, 15, 194, 30, 3,
- "Please wait while the installer finishes determining your disk space requirements.")
- costing.control("Icon", "Icon", 15, 15, 24, 24, 5242881, None,
- "py.ico", None, None)
- c = costing.pushbutton("Return", 102, 57, 56, 17, 3, "Return", None)
- c.event("EndDialog", "Exit")
-
- #####################################################################
- # Preparation dialog: no user input except cancellation
- prep = PyDialog(db, "PrepareDlg", x, y, w, h, modeless, title,
- "Cancel", "Cancel", "Cancel")
- prep.text("Description", 135, 70, 220, 40, 0x30003,
- "Please wait while the Installer prepares to guide you through the installation.")
- prep.title("Welcome to the [ProductName] Installer")
- c=prep.text("ActionText", 135, 110, 220, 20, 0x30003, "Pondering...")
- c.mapping("ActionText", "Text")
- c=prep.text("ActionData", 135, 135, 220, 30, 0x30003, None)
- c.mapping("ActionData", "Text")
- prep.back("Back", None, active=0)
- prep.next("Next", None, active=0)
- c=prep.cancel("Cancel", None)
- c.event("SpawnDialog", "CancelDlg")
-
- #####################################################################
- # Target directory selection
- seldlg = PyDialog(db, "SelectDirectoryDlg", x, y, w, h, modal, title,
- "Next", "Next", "Cancel")
- seldlg.title("Select Destination Directory")
- c = seldlg.text("Existing", 135, 25, 235, 30, 0x30003,
- "{\VerdanaRed9}This update will replace your existing [ProductLine] installation.")
- c.condition("Hide", 'REMOVEOLDVERSION="" and REMOVEOLDSNAPSHOT=""')
- seldlg.text("Description", 135, 50, 220, 40, 0x30003,
- "Please select a directory for the [ProductName] files.")
-
- seldlg.back("< Back", None, active=0)
- c = seldlg.next("Next >", "Cancel")
- c.event("DoAction", "CheckDir", "TargetExistsOk<>1", order=1)
- # If the target exists, but we found that we are going to remove old versions, don't bother
- # confirming that the target directory exists. Strictly speaking, we should determine that
- # the target directory is indeed the target of the product that we are going to remove, but
- # I don't know how to do that.
- c.event("SpawnDialog", "ExistingDirectoryDlg", 'TargetExists=1 and REMOVEOLDVERSION="" and REMOVEOLDSNAPSHOT=""', 2)
- c.event("SetTargetPath", "TARGETDIR", 'TargetExists=0 or REMOVEOLDVERSION<>"" or REMOVEOLDSNAPSHOT<>""', 3)
- c.event("SpawnWaitDialog", "WaitForCostingDlg", "CostingComplete=1", 4)
- c.event("NewDialog", "SelectFeaturesDlg", 'TargetExists=0 or REMOVEOLDVERSION<>"" or REMOVEOLDSNAPSHOT<>""', 5)
-
- c = seldlg.cancel("Cancel", "DirectoryCombo")
- c.event("SpawnDialog", "CancelDlg")
-
- seldlg.control("DirectoryCombo", "DirectoryCombo", 135, 70, 172, 80, 393219,
- "TARGETDIR", None, "DirectoryList", None)
- seldlg.control("DirectoryList", "DirectoryList", 135, 90, 208, 136, 3, "TARGETDIR",
- None, "PathEdit", None)
- seldlg.control("PathEdit", "PathEdit", 135, 230, 206, 16, 3, "TARGETDIR", None, "Next", None)
- c = seldlg.pushbutton("Up", 306, 70, 18, 18, 3, "Up", None)
- c.event("DirectoryListUp", "0")
- c = seldlg.pushbutton("NewDir", 324, 70, 30, 18, 3, "New", None)
- c.event("DirectoryListNew", "0")
-
- #####################################################################
- # SelectFeaturesDlg
- features = PyDialog(db, "SelectFeaturesDlg", x, y, w, h, modal|track_disk_space,
- title, "Tree", "Next", "Cancel")
- features.title("Customize [ProductName]")
- features.text("Description", 135, 35, 220, 15, 0x30003,
- "Select the way you want features to be installed.")
- features.text("Text", 135,45,220,30, 3,
- "Click on the icons in the tree below to change the way features will be installed.")
-
- c=features.back("< Back", "Next")
- c.event("NewDialog", "SelectDirectoryDlg")
-
- c=features.next("Next >", "Cancel")
- c.mapping("SelectionNoItems", "Enabled")
- c.event("SpawnDialog", "DiskCostDlg", "OutOfDiskSpace=1", order=1)
- c.event("EndDialog", "Return", "OutOfDiskSpace<>1", order=2)
-
- c=features.cancel("Cancel", "Tree")
- c.event("SpawnDialog", "CancelDlg")
-
- # The browse property is not used, since we have only a single target path (selected already)
- features.control("Tree", "SelectionTree", 135, 75, 220, 95, 7, "_BrowseProperty",
- "Tree of selections", "Back", None)
-
- #c=features.pushbutton("Reset", 42, 243, 56, 17, 3, "Reset", "DiskCost")
- #c.mapping("SelectionNoItems", "Enabled")
- #c.event("Reset", "0")
-
- features.control("Box", "GroupBox", 135, 170, 225, 90, 1, None, None, None, None)
-
- c=features.xbutton("DiskCost", "Disk &Usage", None, 0.10)
- c.mapping("SelectionNoItems","Enabled")
- c.event("SpawnDialog", "DiskCostDlg")
-
- c=features.xbutton("Advanced", "Advanced", None, 0.30)
- c.event("SpawnDialog", "AdvancedDlg")
-
- c=features.text("ItemDescription", 140, 180, 210, 40, 3,
- "Multiline description of the currently selected item.")
- c.mapping("SelectionDescription","Text")
-
- c=features.text("ItemSize", 140, 225, 210, 33, 3,
- "The size of the currently selected item.")
- c.mapping("SelectionSize", "Text")
-
- #####################################################################
- # Disk cost
- cost = PyDialog(db, "DiskCostDlg", x, y, w, h, modal, title,
- "OK", "OK", "OK", bitmap=False)
- cost.text("Title", 15, 6, 200, 15, 0x30003,
- "{\DlgFontBold8}Disk Space Requirements")
- cost.text("Description", 20, 20, 280, 20, 0x30003,
- "The disk space required for the installation of the selected features.")
- cost.text("Text", 20, 53, 330, 60, 3,
- "The highlighted volumes (if any) do not have enough disk space "
- "available for the currently selected features. You can either "
- "remove some files from the highlighted volumes, or choose to "
- "install less features onto local drive(s), or select different "
- "destination drive(s).")
- cost.control("VolumeList", "VolumeCostList", 20, 100, 330, 150, 393223,
- None, "{120}{70}{70}{70}{70}", None, None)
- cost.xbutton("OK", "Ok", None, 0.5).event("EndDialog", "Return")
-
- #####################################################################
- # WhichUsers Dialog. Only available on NT, and for privileged users.
- # This must be run before FindRelatedProducts, because that will
- # take into account whether the previous installation was per-user
- # or per-machine. We currently don't support going back to this
- # dialog after "Next" was selected; to support this, we would need to
- # find how to reset the ALLUSERS property, and how to re-run
- # FindRelatedProducts.
- # On Windows9x, the ALLUSERS property is ignored on the command line
- # and in the Property table, but installer fails according to the documentation
- # if a dialog attempts to set ALLUSERS.
- whichusers = PyDialog(db, "WhichUsersDlg", x, y, w, h, modal, title,
- "AdminInstall", "Next", "Cancel")
- whichusers.title("Select whether to install [ProductName] for all users of this computer.")
- # A radio group with two options: allusers, justme
- g = whichusers.radiogroup("AdminInstall", 135, 60, 235, 80, 3,
- "WhichUsers", "", "Next")
- g.condition("Disable", "VersionNT=600") # Not available on Vista and Windows 2008
- g.add("ALL", 0, 5, 150, 20, "Install for all users")
- g.add("JUSTME", 0, 25, 235, 20, "Install just for me (not available on Windows Vista)")
-
- whichusers.back("Back", None, active=0)
-
- c = whichusers.next("Next >", "Cancel")
- c.event("[ALLUSERS]", "1", 'WhichUsers="ALL"', 1)
- c.event("EndDialog", "Return", order = 2)
-
- c = whichusers.cancel("Cancel", "AdminInstall")
- c.event("SpawnDialog", "CancelDlg")
-
- #####################################################################
- # Advanced Dialog.
- advanced = PyDialog(db, "AdvancedDlg", x, y, w, h, modal, title,
- "CompilePyc", "Ok", "Ok")
- advanced.title("Advanced Options for [ProductName]")
-
- # A checkbox whether to build pyc files
- advanced.checkbox("CompilePyc", 135, 60, 230, 50, 3,
- "COMPILEALL", "Compile .py files to byte code after installation", "Ok")
-
- c = advanced.cancel("Ok", "CompilePyc", name="Ok") # Button just has location of cancel button.
- c.event("EndDialog", "Return")
-
- #####################################################################
- # Existing Directory dialog
- dlg = Dialog(db, "ExistingDirectoryDlg", 50, 30, 200, 80, modal, title,
- "No", "No", "No")
- dlg.text("Title", 10, 20, 180, 40, 3,
- "[TARGETDIR] exists. Are you sure you want to overwrite existing files?")
- c=dlg.pushbutton("Yes", 30, 60, 55, 17, 3, "Yes", "No")
- c.event("[TargetExists]", "0", order=1)
- c.event("[TargetExistsOk]", "1", order=2)
- c.event("EndDialog", "Return", order=3)
- c=dlg.pushbutton("No", 115, 60, 55, 17, 3, "No", "Yes")
- c.event("EndDialog", "Return")
-
- #####################################################################
- # Installation Progress dialog (modeless)
- progress = PyDialog(db, "ProgressDlg", x, y, w, h, modeless, title,
- "Cancel", "Cancel", "Cancel", bitmap=False)
- progress.text("Title", 20, 15, 200, 15, 0x30003,
- "{\DlgFontBold8}[Progress1] [ProductName]")
- progress.text("Text", 35, 65, 300, 30, 3,
- "Please wait while the Installer [Progress2] [ProductName]. "
- "This may take several minutes.")
- progress.text("StatusLabel", 35, 100, 35, 20, 3, "Status:")
-
- c=progress.text("ActionText", 70, 100, w-70, 20, 3, "Pondering...")
- c.mapping("ActionText", "Text")
-
- #c=progress.text("ActionData", 35, 140, 300, 20, 3, None)
- #c.mapping("ActionData", "Text")
-
- c=progress.control("ProgressBar", "ProgressBar", 35, 120, 300, 10, 65537,
- None, "Progress done", None, None)
- c.mapping("SetProgress", "Progress")
-
- progress.back("< Back", "Next", active=False)
- progress.next("Next >", "Cancel", active=False)
- progress.cancel("Cancel", "Back").event("SpawnDialog", "CancelDlg")
-
- # Maintenance type: repair/uninstall
- maint = PyDialog(db, "MaintenanceTypeDlg", x, y, w, h, modal, title,
- "Next", "Next", "Cancel")
- maint.title("Welcome to the [ProductName] Setup Wizard")
- maint.text("BodyText", 135, 63, 230, 42, 3,
- "Select whether you want to repair or remove [ProductName].")
- g=maint.radiogroup("RepairRadioGroup", 135, 108, 230, 60, 3,
- "MaintenanceForm_Action", "", "Next")
- g.add("Change", 0, 0, 200, 17, "&Change [ProductName]")
- g.add("Repair", 0, 18, 200, 17, "&Repair [ProductName]")
- g.add("Remove", 0, 36, 200, 17, "Re&move [ProductName]")
-
- maint.back("< Back", None, active=False)
- c=maint.next("Finish", "Cancel")
- # Change installation: Change progress dialog to "Change", then ask
- # for feature selection
- c.event("[Progress1]", "Change", 'MaintenanceForm_Action="Change"', 1)
- c.event("[Progress2]", "changes", 'MaintenanceForm_Action="Change"', 2)
-
- # Reinstall: Change progress dialog to "Repair", then invoke reinstall
- # Also set list of reinstalled features to "ALL"
- c.event("[REINSTALL]", "ALL", 'MaintenanceForm_Action="Repair"', 5)
- c.event("[Progress1]", "Repairing", 'MaintenanceForm_Action="Repair"', 6)
- c.event("[Progress2]", "repairs", 'MaintenanceForm_Action="Repair"', 7)
- c.event("Reinstall", "ALL", 'MaintenanceForm_Action="Repair"', 8)
-
- # Uninstall: Change progress to "Remove", then invoke uninstall
- # Also set list of removed features to "ALL"
- c.event("[REMOVE]", "ALL", 'MaintenanceForm_Action="Remove"', 11)
- c.event("[Progress1]", "Removing", 'MaintenanceForm_Action="Remove"', 12)
- c.event("[Progress2]", "removes", 'MaintenanceForm_Action="Remove"', 13)
- c.event("Remove", "ALL", 'MaintenanceForm_Action="Remove"', 14)
-
- # Close dialog when maintenance action scheduled
- c.event("EndDialog", "Return", 'MaintenanceForm_Action<>"Change"', 20)
- c.event("NewDialog", "SelectFeaturesDlg", 'MaintenanceForm_Action="Change"', 21)
-
- maint.cancel("Cancel", "RepairRadioGroup").event("SpawnDialog", "CancelDlg")
-
-
-# See "Feature Table". The feature level is 1 for all features,
-# and the feature attributes are 0 for the DefaultFeature, and
-# FollowParent for all other features. The numbers are the Display
-# column.
-def add_features(db):
- # feature attributes:
- # msidbFeatureAttributesFollowParent == 2
- # msidbFeatureAttributesDisallowAdvertise == 8
- # Features that need to be installed with together with the main feature
- # (i.e. additional Python libraries) need to follow the parent feature.
- # Features that have no advertisement trigger (e.g. the test suite)
- # must not support advertisement
- global default_feature, tcltk, htmlfiles, tools, testsuite
- global ext_feature, private_crt, prepend_path, pip_feature
- default_feature = Feature(db, "DefaultFeature", "Python",
- "Python Interpreter and Libraries",
- 1, directory = "TARGETDIR")
- shared_crt = Feature(db, "SharedCRT", "MSVCRT", "C Run-Time (system-wide)", 0,
- level=0)
- private_crt = Feature(db, "PrivateCRT", "MSVCRT", "C Run-Time (private)", 0,
- level=0)
- add_data(db, "Condition", [("SharedCRT", 1, sys32cond),
- ("PrivateCRT", 1, "not "+sys32cond)])
- # We don't support advertisement of extensions
- ext_feature = Feature(db, "Extensions", "Register Extensions",
- "Make this Python installation the default Python installation", 3,
- parent = default_feature, attributes=2|8)
- if have_tcl:
- tcltk = Feature(db, "TclTk", "Tcl/Tk", "Tkinter, IDLE, pydoc", 5,
- parent = default_feature, attributes=2)
- htmlfiles = Feature(db, "Documentation", "Documentation",
- "Python HTMLHelp File", 7, parent = default_feature)
- tools = Feature(db, "Tools", "Utility Scripts",
- "Python utility scripts (Tools/)", 9,
- parent = default_feature, attributes=2)
- # pip installation isn't enabled by default until a clean uninstall procedure
- # becomes possible
- pip_feature = Feature(db, "pip_feature", "pip",
- "Install (or upgrade from an earlier version) pip, "
- "a tool for installing and managing Python packages.", 11,
- parent = default_feature, attributes=2|8)
- testsuite = Feature(db, "Testsuite", "Test suite",
- "Python test suite (Lib/test/)", 13,
- parent = default_feature, attributes=2|8)
- # prepend_path is an additional feature which is to be off by default.
- # Since the default level for the above features is 1, this needs to be
- # at least level higher.
- prepend_path = Feature(db, "PrependPath", "Add python.exe to Path",
- "Prepend [TARGETDIR] to the system Path variable. "
- "This allows you to type 'python' into a command "
- "prompt without needing the full path.", 15,
- parent = default_feature, attributes=2|8,
- level=2)
-
-def extract_msvcr100():
- # Find the redistributable files
- if msilib.Win64:
- arch = "x64"
- else:
- arch = "x86"
- dir = os.path.join(os.environ['VS100COMNTOOLS'], r"..\..\VC\redist\%s\Microsoft.VC100.CRT" % arch)
-
- result = []
- installer = msilib.MakeInstaller()
- # At least for VS2010, manifests are no longer provided
- name = "msvcr100.dll"
- path = os.path.join(dir, name)
- kw = {'src':path}
- kw['version'] = installer.FileVersion(path, 0)
- kw['language'] = installer.FileVersion(path, 1)
- return name, kw
-
-def generate_license():
- import shutil, glob
- out = open("LICENSE.txt", "w")
- shutil.copyfileobj(open(os.path.join(srcdir, "LICENSE")), out)
- shutil.copyfileobj(open("crtlicense.txt"), out)
- for name, pat, file in (("bzip2","bzip2-*", "LICENSE"),
- ("openssl", "openssl-*", "LICENSE"),
- ("Tcl", "tcl8*", "license.terms"),
- ("Tk", "tk8*", "license.terms"),
- ("Tix", "tix-*", "license.terms")):
- out.write("\nThis copy of Python includes a copy of %s, which is licensed under the following terms:\n\n" % name)
- dirs = glob.glob(srcdir+"/externals/"+pat)
- if not dirs:
- raise ValueError, "Could not find "+srcdir+"/externals/"+pat
- if len(dirs) > 2 and not snapshot:
- raise ValueError, "Multiple copies of "+pat
- dir = dirs[0]
- shutil.copyfileobj(open(os.path.join(dir, file)), out)
- out.close()
-
-
-class PyDirectory(Directory):
- """By default, all components in the Python installer
- can run from source."""
- def __init__(self, *args, **kw):
- if "componentflags" not in kw:
- kw['componentflags'] = 2 #msidbComponentAttributesOptional
- Directory.__init__(self, *args, **kw)
-
-def hgmanifest():
- # Fetch file list from Mercurial
- process = subprocess.Popen(['hg', 'manifest'], stdout=subprocess.PIPE)
- stdout, stderr = process.communicate()
- # Create nested directories for file tree
- result = {}
- for line in stdout.splitlines():
- components = line.split('/')
- d = result
- while len(components) > 1:
- d1 = d.setdefault(components[0], {})
- d = d1
- del components[0]
- d[components[0]] = None
- return result
-
-
-# See "File Table", "Component Table", "Directory Table",
-# "FeatureComponents Table"
-def add_files(db):
- installer = msilib.MakeInstaller()
- hgfiles = hgmanifest()
- cab = CAB("python")
- tmpfiles = []
- # Add all executables, icons, text files into the TARGETDIR component
- root = PyDirectory(db, cab, None, srcdir, "TARGETDIR", "SourceDir")
- default_feature.set_current()
- root.add_file("README.txt", src="README")
- root.add_file("NEWS.txt", src="Misc/NEWS")
- generate_license()
- root.add_file("LICENSE.txt", src=os.path.abspath("LICENSE.txt"))
- root.start_component("python.exe", keyfile="python.exe")
- root.add_file("%s/python.exe" % PCBUILD)
- root.start_component("pythonw.exe", keyfile="pythonw.exe")
- root.add_file("%s/pythonw.exe" % PCBUILD)
-
- # msidbComponentAttributesSharedDllRefCount = 8, see "Component Table"
- dlldir = PyDirectory(db, cab, root, srcdir, "DLLDIR", ".")
- launcherdir = PyDirectory(db, cab, root, srcdir, "LAUNCHERDIR", ".")
-
- # msidbComponentAttributes64bit = 256; this disables registry redirection
- # to allow setting the SharedDLLs key in the 64-bit portion even for a
- # 32-bit installer.
- # XXX does this still allow to install the component on a 32-bit system?
- # Pick up 32-bit binary always
- launchersrc = PCBUILD
- if launchersrc.lower() == 'pcbuild\\x64-pgo':
- launchersrc = 'PCBuild\\win32-pgo'
- if launchersrc.lower() == 'pcbuild\\amd64':
- launchersrc = 'PCBuild'
- launcher = os.path.join(srcdir, launchersrc, "py.exe")
- launcherdir.start_component("launcher", flags = 8+256, keyfile="py.exe",
- uuid="{B5107402-6958-461B-8B0A-4037D3327160}")
- launcherdir.add_file(launcher,
- version=installer.FileVersion(launcher, 0),
- language=installer.FileVersion(launcher, 1))
- launcherw = os.path.join(srcdir, launchersrc, "pyw.exe")
- launcherdir.start_component("launcherw", flags = 8+256, keyfile="pyw.exe",
- uuid="{8E52B8CD-48BB-4D74-84CD-6238BCD11F20}")
- launcherdir.add_file(launcherw,
- version=installer.FileVersion(launcherw, 0),
- language=installer.FileVersion(launcherw, 1))
-
- pydll = "python%s%s.dll" % (major, minor)
- pydllsrc = os.path.join(srcdir, PCBUILD, pydll)
- dlldir.start_component("DLLDIR", flags = 8, keyfile = pydll, uuid = pythondll_uuid)
- pyversion = installer.FileVersion(pydllsrc, 0)
- if not snapshot:
- # For releases, the Python DLL has the same version as the
- # installer package.
- assert pyversion.split(".")[:3] == current_version.split(".")
- dlldir.add_file("%s/python%s%s.dll" % (PCBUILD, major, minor),
- version=pyversion,
- language=installer.FileVersion(pydllsrc, 1))
- DLLs = PyDirectory(db, cab, root, srcdir + "/" + PCBUILD, "DLLs", "DLLS|DLLs")
-
- # msvcr90.dll: Need to place the DLL and the manifest into the root directory,
- # plus another copy of the manifest in the DLLs directory, with the manifest
- # pointing to the root directory
- root.start_component("msvcr90", feature=private_crt)
- # Results are ID,keyword pairs
- crtdll, kwds = extract_msvcr100()
- root.add_file(crtdll, **kwds)
- # Copy the manifest
- # Actually, don't do that anymore - no DLL in DLLs should have a manifest
- # dependency on msvcr90.dll anymore, so this should not be necessary
- #manifest_dlls = manifest[0]+".root"
- #open(manifest_dlls, "w").write(open(manifest[1]['src']).read().replace("msvcr","../msvcr"))
- #DLLs.start_component("msvcr90_dlls", feature=private_crt)
- #DLLs.add_file(manifest[0], src=os.path.abspath(manifest_dlls))
-
- # Now start the main component for the DLLs directory;
- # no regular files have been added to the directory yet.
- DLLs.start_component()
-
- # Check if _ctypes.pyd exists
- have_ctypes = os.path.exists(srcdir+"/%s/_ctypes.pyd" % PCBUILD)
- if not have_ctypes:
- print("WARNING: _ctypes.pyd not found, ctypes will not be included")
- extensions.remove("_ctypes.pyd")
-
- # Add all .py files in Lib, except tkinter, test
- dirs = []
- pydirs = [(root, "Lib", hgfiles["Lib"], default_feature)]
- while pydirs:
- # Commit every now and then, or else installer will complain
- db.Commit()
- parent, dir, files, feature = pydirs.pop()
- if dir.startswith("plat-"):
- continue
- if dir in ["tkinter", "idlelib", "turtledemo"]:
- if not have_tcl:
- continue
- feature = tcltk
- tcltk.set_current()
- elif dir in ('test', 'tests'):
- feature = testsuite
- elif not have_ctypes and dir == "ctypes":
- continue
- feature.set_current()
- lib = PyDirectory(db, cab, parent, dir, dir, "%s|%s" % (parent.make_short(dir), dir))
- dirs.append(lib)
- has_py = False
- for name, subdir in files.items():
- if subdir is None:
- assert os.path.isfile(os.path.join(lib.absolute, name))
- if name == 'README':
- lib.add_file("README.txt", src="README")
- else:
- lib.add_file(name)
- has_py = has_py or name.endswith(".py") or name.endswith(".pyw")
- else:
- assert os.path.isdir(os.path.join(lib.absolute, name))
- pydirs.append((lib, name, subdir, feature))
-
- if has_py:
- lib.remove_pyc()
- # Add DLLs
- default_feature.set_current()
- lib = DLLs
- lib.add_file("py.ico", src=srcdir+"/PC/py.ico")
- lib.add_file("pyc.ico", src=srcdir+"/PC/pyc.ico")
- dlls = []
- tclfiles = []
- for f in extensions:
- if f=="_tkinter.pyd":
- continue
- if not os.path.exists(srcdir + "/" + PCBUILD + "/" + f):
- print("WARNING: Missing extension", f)
- continue
- dlls.append(f)
- lib.add_file(f)
- lib.add_file('python3.dll')
- # Add sqlite
- if msilib.msi_type=="Intel64;1033":
- sqlite_arch = "/ia64"
- elif msilib.msi_type=="x64;1033":
- sqlite_arch = "/amd64"
- tclsuffix = "64"
- else:
- sqlite_arch = ""
- tclsuffix = ""
- lib.add_file("sqlite3.dll")
- if have_tcl:
- if not os.path.exists("%s/%s/_tkinter.pyd" % (srcdir, PCBUILD)):
- print("WARNING: Missing _tkinter.pyd")
- else:
- lib.start_component("TkDLLs", tcltk)
- lib.add_file("_tkinter.pyd")
- dlls.append("_tkinter.pyd")
- tcldir = os.path.normpath(srcdir+("/externals/tcltk%s/bin" % tclsuffix))
- for f in glob.glob1(tcldir, "*.dll"):
- lib.add_file(f, src=os.path.join(tcldir, f))
- # check whether there are any unknown extensions
- for f in glob.glob1(srcdir+"/"+PCBUILD, "*.pyd"):
- if f.endswith("_d.pyd"): continue # debug version
- if f in dlls: continue
- print("WARNING: Unknown extension", f)
-
- # Add headers
- default_feature.set_current()
- lib = PyDirectory(db, cab, root, "include", "include", "INCLUDE|include")
- lib.glob("*.h")
- lib.add_file("pyconfig.h", src="../PC/pyconfig.h")
- # Add import libraries
- lib = PyDirectory(db, cab, root, PCBUILD, "libs", "LIBS|libs")
- for f in dlls:
- lib.add_file(f.replace('pyd','lib'))
- lib.add_file('python%s%s.lib' % (major, minor))
- lib.add_file('python3.lib')
- # Add the mingw-format library
- if have_mingw:
- lib.add_file('libpython%s%s.a' % (major, minor))
- if have_tcl:
- # Add Tcl/Tk
- tcldirs = [(root, 'externals/tcltk%s/lib' % tclsuffix, 'tcl')]
- tcltk.set_current()
- while tcldirs:
- parent, phys, dir = tcldirs.pop()
- lib = PyDirectory(db, cab, parent, phys, dir, "%s|%s" % (parent.make_short(dir), dir))
- if not os.path.exists(lib.absolute):
- continue
- for f in os.listdir(lib.absolute):
- if os.path.isdir(os.path.join(lib.absolute, f)):
- tcldirs.append((lib, f, f))
- else:
- lib.add_file(f)
- # Add tools
- tools.set_current()
- tooldir = PyDirectory(db, cab, root, "Tools", "Tools", "TOOLS|Tools")
- for f in ['i18n', 'pynche', 'Scripts']:
- lib = PyDirectory(db, cab, tooldir, f, f, "%s|%s" % (tooldir.make_short(f), f))
- lib.glob("*.py")
- lib.glob("*.pyw")
- lib.remove_pyc()
- lib.glob("*.txt")
- if f == "pynche":
- x = PyDirectory(db, cab, lib, "X", "X", "X|X")
- x.glob("*.txt")
- if os.path.exists(os.path.join(lib.absolute, "README")):
- lib.add_file("README.txt", src="README")
- if f == 'Scripts':
- lib.add_file("2to3.py", src="2to3")
- lib.add_file("pydoc3.py", src="pydoc3")
- lib.add_file("pyvenv.py", src="pyvenv")
- # Add documentation
- htmlfiles.set_current()
- lib = PyDirectory(db, cab, root, "Doc", "Doc", "DOC|Doc")
- lib.start_component("documentation", keyfile=docfile)
- lib.add_file(docfile, src="build/htmlhelp/"+docfile)
-
- cab.commit(db)
-
- for f in tmpfiles:
- os.unlink(f)
-
-# See "Registry Table", "Component Table"
-def add_registry(db):
- # File extensions, associated with the REGISTRY.def component
- # IDLE verbs depend on the tcltk feature.
- # msidbComponentAttributesRegistryKeyPath = 4
- # -1 for Root specifies "dependent on ALLUSERS property"
- tcldata = []
- if have_tcl:
- tcldata = [
- ("REGISTRY.tcl", msilib.gen_uuid(), "TARGETDIR", registry_component, None,
- "py.IDLE")]
- add_data(db, "Component",
- # msidbComponentAttributesRegistryKeyPath = 4
- [("REGISTRY", msilib.gen_uuid(), "TARGETDIR", registry_component, None,
- "InstallPath"),
- ("REGISTRY.doc", msilib.gen_uuid(), "TARGETDIR", registry_component, None,
- "Documentation"),
- ("REGISTRY.path", msilib.gen_uuid(), "TARGETDIR", registry_component, None,
- None),
- ("REGISTRY.ensurepip", msilib.gen_uuid(), "TARGETDIR", registry_component, "EnsurePipRun",
- None),
- ("REGISTRY.def", msilib.gen_uuid(), "TARGETDIR", registry_component,
- None, None)] + tcldata)
- # See "FeatureComponents Table".
- # The association between TclTk and pythonw.exe is necessary to make ICE59
- # happy, because the installer otherwise believes that the IDLE and PyDoc
- # shortcuts might get installed without pythonw.exe being install. This
- # is not true, since installing TclTk will install the default feature, which
- # will cause pythonw.exe to be installed.
- # REGISTRY.tcl is not associated with any feature, as it will be requested
- # through a custom action
- tcldata = []
- if have_tcl:
- tcldata = [(tcltk.id, "pythonw.exe")]
- add_data(db, "FeatureComponents",
- [(default_feature.id, "REGISTRY"),
- (htmlfiles.id, "REGISTRY.doc"),
- (prepend_path.id, "REGISTRY.path"),
- (pip_feature.id, "REGISTRY.ensurepip"),
- (ext_feature.id, "REGISTRY.def")] +
- tcldata
- )
- # Extensions are not advertised. For advertised extensions,
- # we would need separate binaries that install along with the
- # extension.
- pat = r"Software\Classes\%sPython.%sFile\shell\%s\command"
- ewi = "Edit with IDLE"
- pat2 = r"Software\Classes\%sPython.%sFile\DefaultIcon"
- pat3 = r"Software\Classes\%sPython.%sFile"
- pat4 = r"Software\Classes\%sPython.%sFile\shellex\DropHandler"
- tcl_verbs = []
- if have_tcl:
- tcl_verbs=[
- ("py.IDLE", -1, pat % (testprefix, "", ewi), "",
- r'"[TARGETDIR]pythonw.exe" "[TARGETDIR]Lib\idlelib\idle.pyw" -e "%1"',
- "REGISTRY.tcl"),
- ("pyw.IDLE", -1, pat % (testprefix, "NoCon", ewi), "",
- r'"[TARGETDIR]pythonw.exe" "[TARGETDIR]Lib\idlelib\idle.pyw" -e "%1"',
- "REGISTRY.tcl"),
- ]
- add_data(db, "Registry",
- [# Extensions
- ("py.ext", -1, r"Software\Classes\."+ext, "",
- "Python.File", "REGISTRY.def"),
- ("pyw.ext", -1, r"Software\Classes\."+ext+'w', "",
- "Python.NoConFile", "REGISTRY.def"),
- ("pyc.ext", -1, r"Software\Classes\."+ext+'c', "",
- "Python.CompiledFile", "REGISTRY.def"),
- ("pyo.ext", -1, r"Software\Classes\."+ext+'o', "",
- "Python.CompiledFile", "REGISTRY.def"),
- # MIME types
- ("py.mime", -1, r"Software\Classes\."+ext, "Content Type",
- "text/plain", "REGISTRY.def"),
- ("pyw.mime", -1, r"Software\Classes\."+ext+'w', "Content Type",
- "text/plain", "REGISTRY.def"),
- #Verbs
- ("py.open", -1, pat % (testprefix, "", "open"), "",
- r'"[LAUNCHERDIR]py.exe" "%1" %*', "REGISTRY.def"),
- ("pyw.open", -1, pat % (testprefix, "NoCon", "open"), "",
- r'"[LAUNCHERDIR]pyw.exe" "%1" %*', "REGISTRY.def"),
- ("pyc.open", -1, pat % (testprefix, "Compiled", "open"), "",
- r'"[LAUNCHERDIR]py.exe" "%1" %*', "REGISTRY.def"),
- ] + tcl_verbs + [
- #Icons
- ("py.icon", -1, pat2 % (testprefix, ""), "",
- r'[DLLs]py.ico', "REGISTRY.def"),
- ("pyw.icon", -1, pat2 % (testprefix, "NoCon"), "",
- r'[DLLs]py.ico', "REGISTRY.def"),
- ("pyc.icon", -1, pat2 % (testprefix, "Compiled"), "",
- r'[DLLs]pyc.ico', "REGISTRY.def"),
- # Descriptions
- ("py.txt", -1, pat3 % (testprefix, ""), "",
- "Python File", "REGISTRY.def"),
- ("pyw.txt", -1, pat3 % (testprefix, "NoCon"), "",
- "Python File (no console)", "REGISTRY.def"),
- ("pyc.txt", -1, pat3 % (testprefix, "Compiled"), "",
- "Compiled Python File", "REGISTRY.def"),
- # Drop Handler
- ("py.drop", -1, pat4 % (testprefix, ""), "",
- "{60254CA5-953B-11CF-8C96-00AA00B8708C}", "REGISTRY.def"),
- ("pyw.drop", -1, pat4 % (testprefix, "NoCon"), "",
- "{60254CA5-953B-11CF-8C96-00AA00B8708C}", "REGISTRY.def"),
- ("pyc.drop", -1, pat4 % (testprefix, "Compiled"), "",
- "{60254CA5-953B-11CF-8C96-00AA00B8708C}", "REGISTRY.def"),
- ])
-
- # PATHEXT
- add_data(db, "Environment",
- [("PathExtAddition", "=-*PathExt", "[~];.PY", "REGISTRY.def")])
-
- # Registry keys
- prefix = r"Software\%sPython\PythonCore\%s" % (testprefix, short_version)
- add_data(db, "Registry",
- [("InstallPath", -1, prefix+r"\InstallPath", "", "[TARGETDIR]", "REGISTRY"),
- ("InstallGroup", -1, prefix+r"\InstallPath\InstallGroup", "",
- "Python %s" % short_version, "REGISTRY"),
- ("PythonPath", -1, prefix+r"\PythonPath", "",
- r"[TARGETDIR]Lib;[TARGETDIR]DLLs", "REGISTRY"),
- ("Documentation", -1, prefix+r"\Help\Main Python Documentation", "",
- "[TARGETDIR]Doc\\"+docfile , "REGISTRY.doc"),
- ("Modules", -1, prefix+r"\Modules", "+", None, "REGISTRY"),
- ("AppPaths", -1, r"Software\Microsoft\Windows\CurrentVersion\App Paths\Python.exe",
- "", r"[TARGETDIR]Python.exe", "REGISTRY.def"),
- ("DisplayIcon", -1,
- r"Software\Microsoft\Windows\CurrentVersion\Uninstall\%s" % product_code,
- "DisplayIcon", "[TARGETDIR]python.exe", "REGISTRY"),
- # Fake registry entry to allow installer to track whether ensurepip has been run
- ("EnsurePipRun", -1, prefix+r"\EnsurePipRun", "", "#1", "REGISTRY.ensurepip"),
- ])
- # Shortcuts, see "Shortcut Table"
- add_data(db, "Directory",
- [("ProgramMenuFolder", "TARGETDIR", "."),
- ("MenuDir", "ProgramMenuFolder", "PY%s%s|%sPython %s.%s" % (major,minor,testprefix,major,minor))])
- add_data(db, "RemoveFile",
- [("MenuDir", "TARGETDIR", None, "MenuDir", 2)])
- tcltkshortcuts = []
- if msilib.Win64:
- bitted = "64 bit"
- else:
- bitted = "32 bit"
- if have_tcl:
- tcltkshortcuts = [
- ("IDLE", "MenuDir",
- "IDLE|IDLE (Python "+short_version+" GUI - "+bitted+")",
- "pythonw.exe", tcltk.id, r'"[TARGETDIR]Lib\idlelib\idle.pyw"',
- None, None, "python_icon.exe", 0, None, "TARGETDIR"),
- ]
- add_data(db, "Shortcut",
- tcltkshortcuts +
- [# Advertised shortcuts: targets are features, not files
- ("Python", "MenuDir",
- "PYTHON|Python "+short_version+" (command line - "+bitted+")",
- "python.exe", default_feature.id, None, None, None,
- "python_icon.exe", 2, None, "TARGETDIR"),
- # Advertising the Manual breaks on (some?) Win98, and the shortcut lacks an
- # icon first.
- #("Manual", "MenuDir", "MANUAL|Python Manuals", "documentation",
- # htmlfiles.id, None, None, None, None, None, None, None),
- ## Non-advertised shortcuts: must be associated with a registry component
- ("Manual", "MenuDir", "MANUAL|Python "+short_version+" Manuals",
- "REGISTRY.doc", "[#%s]" % docfile,
- None, None, None, None, None, None, None),
- ("PyDoc", "MenuDir",
- "MODDOCS|Python "+short_version+" Docs Server (pydoc - "+
- bitted+")", "python.exe", default_feature.id, r'-m pydoc -b',
- None, None, "python_icon.exe", 0, None, "TARGETDIR"),
- ("Uninstall", "MenuDir", "UNINST|Uninstall Python "+
- short_version+" ("+bitted+")", "REGISTRY",
- SystemFolderName+"msiexec", "/x%s" % product_code,
- None, None, None, None, None, None),
- ])
- db.Commit()
-
-def build_pdbzip():
- pdbexclude = ['kill_python.pdb', 'make_buildinfo.pdb',
- 'make_versioninfo.pdb']
- path = "python-%s%s-pdb.zip" % (full_current_version, msilib.arch_ext)
- pdbzip = zipfile.ZipFile(path, 'w')
- for f in glob.glob1(os.path.join(srcdir, PCBUILD), "*.pdb"):
- if f not in pdbexclude and not f.endswith('_d.pdb'):
- pdbzip.write(os.path.join(srcdir, PCBUILD, f), f)
- pdbzip.close()
-
-db,msiname = build_database()
-try:
- add_features(db)
- add_ui(db)
- add_files(db)
- add_registry(db)
- remove_old_versions(db)
- db.Commit()
-finally:
- del db
-
-# Merge CRT into MSI file. This requires the database to be closed.
-mod_dir = os.path.join(os.environ["ProgramFiles"], "Common Files", "Merge Modules")
-if msilib.Win64:
- modules = ["Microsoft_VC100_CRT_x64.msm"]
-else:
- modules = ["Microsoft_VC100_CRT_x86.msm"]
-
-for i, n in enumerate(modules):
- modules[i] = os.path.join(mod_dir, n)
-
-def merge(msi, feature, rootdir, modules):
- cab_and_filecount = []
- # Step 1: Merge databases, extract cabfiles
- m = msilib.MakeMerge2()
- m.OpenLog("merge.log")
- m.OpenDatabase(msi)
- for module in modules:
- print module
- m.OpenModule(module,0)
- m.Merge(feature, rootdir)
- print "Errors:"
- for e in m.Errors:
- print e.Type, e.ModuleTable, e.DatabaseTable
- print " Modkeys:",
- for s in e.ModuleKeys: print s,
- print
- print " DBKeys:",
- for s in e.DatabaseKeys: print s,
- print
- cabname = tempfile.mktemp(suffix=".cab")
- m.ExtractCAB(cabname)
- cab_and_filecount.append((cabname, len(m.ModuleFiles)))
- m.CloseModule()
- m.CloseDatabase(True)
- m.CloseLog()
-
- # Step 2: Add CAB files
- i = msilib.MakeInstaller()
- db = i.OpenDatabase(msi, constants.msiOpenDatabaseModeTransact)
-
- v = db.OpenView("SELECT LastSequence FROM Media")
- v.Execute(None)
- maxmedia = -1
- while 1:
- r = v.Fetch()
- if not r: break
- seq = r.IntegerData(1)
- if seq > maxmedia:
- maxmedia = seq
- print "Start of Media", maxmedia
-
- for cabname, count in cab_and_filecount:
- stream = "merged%d" % maxmedia
- msilib.add_data(db, "Media",
- [(maxmedia+1, maxmedia+count, None, "#"+stream, None, None)])
- msilib.add_stream(db, stream, cabname)
- os.unlink(cabname)
- maxmedia += count
- # The merge module sets ALLUSERS to 1 in the property table.
- # This is undesired; delete that
- v = db.OpenView("DELETE FROM Property WHERE Property='ALLUSERS'")
- v.Execute(None)
- v.Close()
- db.Commit()
-
-merge(msiname, "SharedCRT", "TARGETDIR", modules)
-
-# certname (from config.py) should be (a substring of)
-# the certificate subject, e.g. "Python Software Foundation"
-if certname:
- os.system('signtool sign /n "%s" '
- '/t http://timestamp.verisign.com/scripts/timestamp.dll '
- '/d "Python %s" '
- '%s' % (certname, full_current_version, msiname))
-
-if pdbzip:
- build_pdbzip()
diff --git a/Tools/msi/msi.targets b/Tools/msi/msi.targets
new file mode 100644
index 0000000000..86be35badb
--- /dev/null
+++ b/Tools/msi/msi.targets
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+
+ <Target Name="ProcessInstallFiles" AfterTargets="PrepareForBuild" Condition="@(InstallFiles) != ''">
+ <PropertyGroup>
+ <_FileListTarget>$(IntermediateOutputPath)$(MSBuildProjectName).g.csv</_FileListTarget>
+ <_InstallFilesTarget>$(IntermediateOutputPath)$(MSBuildProjectName).g.wxs</_InstallFilesTarget>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <InstallFiles>
+ <_Source>%(Source)$([msbuild]::MakeRelative(%(SourceBase), %(FullPath)))</_Source>
+ <_Target>%(Target_)$([msbuild]::MakeRelative(%(TargetBase), %(FullPath)))</_Target>
+ </InstallFiles>
+ </ItemGroup>
+
+ <WriteLinesToFile File="$(_FileListTarget)" Lines="@(InstallFiles->'&quot;%(_Source)&quot;,&quot;%(_Target)&quot;,&quot;%(Group)&quot;,&quot;%(DiskId)&quot;,&quot;%(Condition)&quot;')" Overwrite="true" />
+ <Exec Command='"$(PythonExe)" csv_to_wxs.py "$(_FileListTarget)" "$(_InstallFilesTarget)"'
+ WorkingDirectory="$(MSBuildThisFileDirectory)" />
+
+ <ItemGroup>
+ <FileWrites Include="$(_FileListTarget);$(_InstallFilesTarget)" />
+ <Compile Include="$(_InstallFilesTarget)" />
+ </ItemGroup>
+ </Target>
+
+ <Target Name="_TransformWxlTemplates" AfterTargets="PrepareForBuild" Inputs="@(WxlTemplate);$(PySourcePath)include\patchlevel.h" Outputs="$(IntermediateOutputPath)%(Filename).wxl">
+ <PropertyGroup Condition="'@(WxlTemplate)' != ''">
+ <_Content>$([System.IO.File]::ReadAllText(%(WxlTemplate.FullPath)).Replace(`{{ShortVersion}}`, `$(MajorVersionNumber).$(MinorVersionNumber)$(PyTestExt)`).Replace(`{{LongVersion}}`, `$(PythonVersion)$(PyTestExt)`).Replace(`{{Bitness}}`, `$(Bitness)`))</_Content>
+ <_ExistingContent Condition="Exists('$(IntermediateOutputPath)%(WxlTemplate.Filename).wxl')">$([System.IO.File]::ReadAllText($(IntermediateOutputPath)%(WxlTemplate.Filename).wxl))</_ExistingContent>
+ </PropertyGroup>
+
+ <WriteLinesToFile File="$(IntermediateOutputPath)%(WxlTemplate.Filename).wxl"
+ Lines="$(_Content)"
+ Overwrite="true"
+ Condition="$(_Content) != $(_ExistingContent)" />
+
+ <ItemGroup Condition="'@(WxlTemplate)' != ''">
+ <EmbeddedResource Include="$(IntermediateOutputPath)%(WxlTemplate.Filename).wxl" />
+ <FileWrites Include="$(IntermediateOutputPath)%(WxlTemplate.Filename).wxl" />
+ </ItemGroup>
+ </Target>
+
+ <Import Project="$(WixTargetsPath)" />
+
+ <Target Name="SignCabs">
+ <Error Text="Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition="'$(_SignCommand)' == ''" />
+ <Exec Command="$(_SignCommand) @(SignCabs->'&quot;%(FullPath)&quot;',' ')" ContinueOnError="false" />
+ </Target>
+ <Target Name="SignMsi">
+ <Error Text="Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition="'$(_SignCommand)' == ''" />
+ <Exec Command="$(_SignCommand) @(SignMsi->'&quot;%(FullPath)&quot;',' ')" ContinueOnError="false" />
+ </Target>
+ <Target Name="SignBundleEngine">
+ <Error Text="Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition="'$(_SignCommand)' == ''" />
+ <Exec Command="$(_SignCommand) @(SignBundleEngine->'&quot;%(FullPath)&quot;',' ')" ContinueOnError="false" />
+ </Target>
+ <Target Name="SignBundle">
+ <Error Text="Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition="'$(_SignCommand)' == ''" />
+ <Exec Command="$(_SignCommand) @(SignBundle->'&quot;%(FullPath)&quot;',' ')" ContinueOnError="false" />
+ </Target>
+</Project> \ No newline at end of file
diff --git a/Tools/msi/msilib.py b/Tools/msi/msilib.py
deleted file mode 100644
index c208b91074..0000000000
--- a/Tools/msi/msilib.py
+++ /dev/null
@@ -1,679 +0,0 @@
-# Microsoft Installer Library
-# (C) 2003 Martin v. Loewis
-
-import win32com.client.gencache
-import win32com.client
-import pythoncom, pywintypes
-from win32com.client import constants
-import re, string, os, sets, glob, subprocess, sys, _winreg, struct, _msi
-
-try:
- basestring
-except NameError:
- basestring = (str, unicode)
-
-# Partially taken from Wine
-datasizemask= 0x00ff
-type_valid= 0x0100
-type_localizable= 0x0200
-
-typemask= 0x0c00
-type_long= 0x0000
-type_short= 0x0400
-type_string= 0x0c00
-type_binary= 0x0800
-
-type_nullable= 0x1000
-type_key= 0x2000
-# XXX temporary, localizable?
-knownbits = datasizemask | type_valid | type_localizable | \
- typemask | type_nullable | type_key
-
-# Summary Info Property IDs
-PID_CODEPAGE=1
-PID_TITLE=2
-PID_SUBJECT=3
-PID_AUTHOR=4
-PID_KEYWORDS=5
-PID_COMMENTS=6
-PID_TEMPLATE=7
-PID_LASTAUTHOR=8
-PID_REVNUMBER=9
-PID_LASTPRINTED=11
-PID_CREATE_DTM=12
-PID_LASTSAVE_DTM=13
-PID_PAGECOUNT=14
-PID_WORDCOUNT=15
-PID_CHARCOUNT=16
-PID_APPNAME=18
-PID_SECURITY=19
-
-def reset():
- global _directories
- _directories = sets.Set()
-
-def EnsureMSI():
- win32com.client.gencache.EnsureModule('{000C1092-0000-0000-C000-000000000046}', 1033, 1, 0)
-
-def EnsureMSM():
- try:
- win32com.client.gencache.EnsureModule('{0ADDA82F-2C26-11D2-AD65-00A0C9AF11A6}', 0, 1, 0)
- except pywintypes.com_error:
- win32com.client.gencache.EnsureModule('{0ADDA82F-2C26-11D2-AD65-00A0C9AF11A6}', 0, 2, 0)
-
-_Installer=None
-def MakeInstaller():
- global _Installer
- if _Installer is None:
- EnsureMSI()
- _Installer = win32com.client.Dispatch('WindowsInstaller.Installer',
- resultCLSID='{000C1090-0000-0000-C000-000000000046}')
- return _Installer
-
-_Merge=None
-def MakeMerge2():
- global _Merge
- if _Merge is None:
- EnsureMSM()
- _Merge = win32com.client.Dispatch("Msm.Merge2.1")
- return _Merge
-
-class Table:
- def __init__(self, name):
- self.name = name
- self.fields = []
-
- def add_field(self, index, name, type):
- self.fields.append((index,name,type))
-
- def sql(self):
- fields = []
- keys = []
- self.fields.sort()
- fields = [None]*len(self.fields)
- for index, name, type in self.fields:
- index -= 1
- unk = type & ~knownbits
- if unk:
- print "%s.%s unknown bits %x" % (self.name, name, unk)
- size = type & datasizemask
- dtype = type & typemask
- if dtype == type_string:
- if size:
- tname="CHAR(%d)" % size
- else:
- tname="CHAR"
- elif dtype == type_short:
- assert size==2
- tname = "SHORT"
- elif dtype == type_long:
- assert size==4
- tname="LONG"
- elif dtype == type_binary:
- assert size==0
- tname="OBJECT"
- else:
- tname="unknown"
- print "%s.%sunknown integer type %d" % (self.name, name, size)
- if type & type_nullable:
- flags = ""
- else:
- flags = " NOT NULL"
- if type & type_localizable:
- flags += " LOCALIZABLE"
- fields[index] = "`%s` %s%s" % (name, tname, flags)
- if type & type_key:
- keys.append("`%s`" % name)
- fields = ", ".join(fields)
- keys = ", ".join(keys)
- return "CREATE TABLE %s (%s PRIMARY KEY %s)" % (self.name, fields, keys)
-
- def create(self, db):
- v = db.OpenView(self.sql())
- v.Execute(None)
- v.Close()
-
-class Binary:
- def __init__(self, fname):
- self.name = fname
- def __repr__(self):
- return 'msilib.Binary(os.path.join(dirname,"%s"))' % self.name
-
-def gen_schema(destpath, schemapath):
- d = MakeInstaller()
- schema = d.OpenDatabase(schemapath,
- win32com.client.constants.msiOpenDatabaseModeReadOnly)
-
- # XXX ORBER BY
- v=schema.OpenView("SELECT * FROM _Columns")
- curtable=None
- tables = []
- v.Execute(None)
- f = open(destpath, "wt")
- f.write("from msilib import Table\n")
- while 1:
- r=v.Fetch()
- if not r:break
- name=r.StringData(1)
- if curtable != name:
- f.write("\n%s = Table('%s')\n" % (name,name))
- curtable = name
- tables.append(name)
- f.write("%s.add_field(%d,'%s',%d)\n" %
- (name, r.IntegerData(2), r.StringData(3), r.IntegerData(4)))
- v.Close()
-
- f.write("\ntables=[%s]\n\n" % (", ".join(tables)))
-
- # Fill the _Validation table
- f.write("_Validation_records = [\n")
- v = schema.OpenView("SELECT * FROM _Validation")
- v.Execute(None)
- while 1:
- r = v.Fetch()
- if not r:break
- # Table, Column, Nullable
- f.write("(%s,%s,%s," %
- (`r.StringData(1)`, `r.StringData(2)`, `r.StringData(3)`))
- def put_int(i):
- if r.IsNull(i):f.write("None, ")
- else:f.write("%d," % r.IntegerData(i))
- def put_str(i):
- if r.IsNull(i):f.write("None, ")
- else:f.write("%s," % `r.StringData(i)`)
- put_int(4) # MinValue
- put_int(5) # MaxValue
- put_str(6) # KeyTable
- put_int(7) # KeyColumn
- put_str(8) # Category
- put_str(9) # Set
- put_str(10)# Description
- f.write("),\n")
- f.write("]\n\n")
-
- f.close()
-
-def gen_sequence(destpath, msipath):
- dir = os.path.dirname(destpath)
- d = MakeInstaller()
- seqmsi = d.OpenDatabase(msipath,
- win32com.client.constants.msiOpenDatabaseModeReadOnly)
-
- v = seqmsi.OpenView("SELECT * FROM _Tables");
- v.Execute(None)
- f = open(destpath, "w")
- print >>f, "import msilib,os;dirname=os.path.dirname(__file__)"
- tables = []
- while 1:
- r = v.Fetch()
- if not r:break
- table = r.StringData(1)
- tables.append(table)
- f.write("%s = [\n" % table)
- v1 = seqmsi.OpenView("SELECT * FROM `%s`" % table)
- v1.Execute(None)
- info = v1.ColumnInfo(constants.msiColumnInfoTypes)
- while 1:
- r = v1.Fetch()
- if not r:break
- rec = []
- for i in range(1,r.FieldCount+1):
- if r.IsNull(i):
- rec.append(None)
- elif info.StringData(i)[0] in "iI":
- rec.append(r.IntegerData(i))
- elif info.StringData(i)[0] in "slSL":
- rec.append(r.StringData(i))
- elif info.StringData(i)[0]=="v":
- size = r.DataSize(i)
- bytes = r.ReadStream(i, size, constants.msiReadStreamBytes)
- bytes = bytes.encode("latin-1") # binary data represented "as-is"
- if table == "Binary":
- fname = rec[0]+".bin"
- open(os.path.join(dir,fname),"wb").write(bytes)
- rec.append(Binary(fname))
- else:
- rec.append(bytes)
- else:
- raise "Unsupported column type", info.StringData(i)
- f.write(repr(tuple(rec))+",\n")
- v1.Close()
- f.write("]\n\n")
- v.Close()
- f.write("tables=%s\n" % repr(map(str,tables)))
- f.close()
-
-class _Unspecified:pass
-def change_sequence(seq, action, seqno=_Unspecified, cond = _Unspecified):
- "Change the sequence number of an action in a sequence list"
- for i in range(len(seq)):
- if seq[i][0] == action:
- if cond is _Unspecified:
- cond = seq[i][1]
- if seqno is _Unspecified:
- seqno = seq[i][2]
- seq[i] = (action, cond, seqno)
- return
- raise ValueError, "Action not found in sequence"
-
-def add_data(db, table, values):
- d = MakeInstaller()
- v = db.OpenView("SELECT * FROM `%s`" % table)
- count = v.ColumnInfo(0).FieldCount
- r = d.CreateRecord(count)
- for value in values:
- assert len(value) == count, value
- for i in range(count):
- field = value[i]
- if isinstance(field, (int, long)):
- r.SetIntegerData(i+1,field)
- elif isinstance(field, basestring):
- r.SetStringData(i+1,field)
- elif field is None:
- pass
- elif isinstance(field, Binary):
- r.SetStream(i+1, field.name)
- else:
- raise TypeError, "Unsupported type %s" % field.__class__.__name__
- v.Modify(win32com.client.constants.msiViewModifyInsert, r)
- r.ClearData()
- v.Close()
-
-def add_stream(db, name, path):
- d = MakeInstaller()
- v = db.OpenView("INSERT INTO _Streams (Name, Data) VALUES ('%s', ?)" % name)
- r = d.CreateRecord(1)
- r.SetStream(1, path)
- v.Execute(r)
- v.Close()
-
-def init_database(name, schema,
- ProductName, ProductCode, ProductVersion,
- Manufacturer,
- request_uac = False):
- try:
- os.unlink(name)
- except OSError:
- pass
- ProductCode = ProductCode.upper()
- d = MakeInstaller()
- # Create the database
- db = d.OpenDatabase(name,
- win32com.client.constants.msiOpenDatabaseModeCreate)
- # Create the tables
- for t in schema.tables:
- t.create(db)
- # Fill the validation table
- add_data(db, "_Validation", schema._Validation_records)
- # Initialize the summary information, allowing at most 20 properties
- si = db.GetSummaryInformation(20)
- si.SetProperty(PID_TITLE, "Installation Database")
- si.SetProperty(PID_SUBJECT, ProductName)
- si.SetProperty(PID_AUTHOR, Manufacturer)
- si.SetProperty(PID_TEMPLATE, msi_type)
- si.SetProperty(PID_REVNUMBER, gen_uuid())
- if request_uac:
- wc = 2 # long file names, compressed, original media
- else:
- wc = 2 | 8 # +never invoke UAC
- si.SetProperty(PID_WORDCOUNT, wc)
- si.SetProperty(PID_PAGECOUNT, 200)
- si.SetProperty(PID_APPNAME, "Python MSI Library")
- # XXX more properties
- si.Persist()
- add_data(db, "Property", [
- ("ProductName", ProductName),
- ("ProductCode", ProductCode),
- ("ProductVersion", ProductVersion),
- ("Manufacturer", Manufacturer),
- ("ProductLanguage", "1033")])
- db.Commit()
- return db
-
-def add_tables(db, module):
- for table in module.tables:
- add_data(db, table, getattr(module, table))
-
-def make_id(str):
- #str = str.replace(".", "_") # colons are allowed
- str = str.replace(" ", "_")
- str = str.replace("-", "_")
- str = str.replace("+", "_")
- if str[0] in string.digits:
- str = "_"+str
- assert re.match("^[A-Za-z_][A-Za-z0-9_.]*$", str), "FILE"+str
- return str
-
-def gen_uuid():
- return str(pythoncom.CreateGuid())
-
-class CAB:
- def __init__(self, name):
- self.name = name
- self.files = []
- self.filenames = sets.Set()
- self.index = 0
-
- def gen_id(self, dir, file):
- logical = _logical = make_id(file)
- pos = 1
- while logical in self.filenames:
- logical = "%s.%d" % (_logical, pos)
- pos += 1
- self.filenames.add(logical)
- return logical
-
- def append(self, full, file, logical = None):
- if os.path.isdir(full):
- return
- if not logical:
- logical = self.gen_id(dir, file)
- self.index += 1
- self.files.append((full, logical))
- return self.index, logical
-
- def commit(self, db):
- try:
- os.unlink(self.name+".cab")
- except OSError:
- pass
- _msi.FCICreate(self.name+".cab", self.files)
- add_data(db, "Media",
- [(1, self.index, None, "#"+self.name, None, None)])
- add_stream(db, self.name, self.name+".cab")
- os.unlink(self.name+".cab")
- db.Commit()
-
-_directories = sets.Set()
-class Directory:
- def __init__(self, db, cab, basedir, physical, _logical, default, componentflags=None):
- """Create a new directory in the Directory table. There is a current component
- at each point in time for the directory, which is either explicitly created
- through start_component, or implicitly when files are added for the first
- time. Files are added into the current component, and into the cab file.
- To create a directory, a base directory object needs to be specified (can be
- None), the path to the physical directory, and a logical directory name.
- Default specifies the DefaultDir slot in the directory table. componentflags
- specifies the default flags that new components get."""
- index = 1
- _logical = make_id(_logical)
- logical = _logical
- while logical in _directories:
- logical = "%s%d" % (_logical, index)
- index += 1
- _directories.add(logical)
- self.db = db
- self.cab = cab
- self.basedir = basedir
- self.physical = physical
- self.logical = logical
- self.component = None
- self.short_names = {}
- self.ids = sets.Set()
- self.keyfiles = {}
- self.componentflags = componentflags
- if basedir:
- self.absolute = os.path.join(basedir.absolute, physical)
- blogical = basedir.logical
- else:
- self.absolute = physical
- blogical = None
- # initially assume that all files in this directory are unpackaged
- # as files from self.absolute get added, this set is reduced
- self.unpackaged_files = set()
- for f in os.listdir(self.absolute):
- if os.path.isfile(os.path.join(self.absolute, f)):
- self.unpackaged_files.add(f)
- add_data(db, "Directory", [(logical, blogical, default)])
-
- def start_component(self, component = None, feature = None, flags = None, keyfile = None, uuid=None):
- """Add an entry to the Component table, and make this component the current for this
- directory. If no component name is given, the directory name is used. If no feature
- is given, the current feature is used. If no flags are given, the directory's default
- flags are used. If no keyfile is given, the KeyPath is left null in the Component
- table."""
- if flags is None:
- flags = self.componentflags
- if uuid is None:
- uuid = gen_uuid()
- else:
- uuid = uuid.upper()
- if component is None:
- component = self.logical
- self.component = component
- if Win64:
- flags |= 256
- if keyfile:
- keyid = self.cab.gen_id(self.absolute, keyfile)
- self.keyfiles[keyfile] = keyid
- else:
- keyid = None
- add_data(self.db, "Component",
- [(component, uuid, self.logical, flags, None, keyid)])
- if feature is None:
- feature = current_feature
- add_data(self.db, "FeatureComponents",
- [(feature.id, component)])
-
- def make_short(self, file):
- long = file
- file = re.sub(r'[\?|><:/*"+,;=\[\]]', '_', file) # restrictions on short names
- parts = file.split(".", 1)
- if len(parts)>1:
- suffix = parts[1].upper()
- else:
- suffix = ''
- prefix = parts[0].upper()
- if len(prefix) <= 8 and '.' not in suffix and len(suffix) <= 3:
- if suffix:
- file = prefix+"."+suffix
- else:
- file = prefix
- assert file not in self.short_names, (file, self.short_names[file])
- else:
- prefix = prefix[:6]
- if suffix:
- # last three characters of last suffix
- suffix = suffix.rsplit('.')[-1][:3]
- pos = 1
- while 1:
- if suffix:
- file = "%s~%d.%s" % (prefix, pos, suffix)
- else:
- file = "%s~%d" % (prefix, pos)
- if file not in self.short_names: break
- pos += 1
- assert pos < 10000
- if pos in (10, 100, 1000):
- prefix = prefix[:-1]
- self.short_names[file] = long
- return file
-
- def add_file(self, file, src=None, version=None, language=None):
- """Add a file to the current component of the directory, starting a new one
- if there is no current component. By default, the file name in the source
- and the file table will be identical. If the src file is specified, it is
- interpreted relative to the current directory. Optionally, a version and a
- language can be specified for the entry in the File table."""
- if not self.component:
- self.start_component(self.logical, current_feature)
- if not src:
- # Allow relative paths for file if src is not specified
- src = file
- file = os.path.basename(file)
- absolute = os.path.join(self.absolute, src)
- if absolute.startswith(self.absolute):
- # mark file as packaged
- relative = absolute[len(self.absolute)+1:]
- if relative in self.unpackaged_files:
- self.unpackaged_files.remove(relative)
- assert not re.search(r'[\?|><:/*]"', file) # restrictions on long names
- if self.keyfiles.has_key(file):
- logical = self.keyfiles[file]
- else:
- logical = None
- sequence, logical = self.cab.append(absolute, file, logical)
- assert logical not in self.ids
- self.ids.add(logical)
- short = self.make_short(file)
- full = "%s|%s" % (short, file)
- filesize = os.stat(absolute).st_size
- # constants.msidbFileAttributesVital
- # Compressed omitted, since it is the database default
- # could add r/o, system, hidden
- attributes = 512
- add_data(self.db, "File",
- [(logical, self.component, full, filesize, version,
- language, attributes, sequence)])
- if not version:
- # Add hash if the file is not versioned
- filehash = MakeInstaller().FileHash(absolute, 0)
- add_data(self.db, "MsiFileHash",
- [(logical, 0, filehash.IntegerData(1),
- filehash.IntegerData(2), filehash.IntegerData(3),
- filehash.IntegerData(4))])
- # Automatically remove .pyc/.pyo files on uninstall (2)
- # XXX: adding so many RemoveFile entries makes installer unbelievably
- # slow. So instead, we have to use wildcard remove entries
- # if file.endswith(".py"):
- # add_data(self.db, "RemoveFile",
- # [(logical+"c", self.component, "%sC|%sc" % (short, file),
- # self.logical, 2),
- # (logical+"o", self.component, "%sO|%so" % (short, file),
- # self.logical, 2)])
-
- def glob(self, pattern, exclude = None):
- """Add a list of files to the current component as specified in the
- glob pattern. Individual files can be excluded in the exclude list."""
- files = glob.glob1(self.absolute, pattern)
- for f in files:
- if exclude and f in exclude: continue
- self.add_file(f)
- return files
-
- def remove_pyc(self):
- "Remove .pyc/.pyo files from __pycache__ on uninstall"
- directory = self.logical + "_pycache"
- add_data(self.db, "Directory", [(directory, self.logical, "__PYCA~1|__pycache__")])
- flags = 256 if Win64 else 0
- add_data(self.db, "Component",
- [(directory, gen_uuid(), directory, flags, None, None)])
- add_data(self.db, "FeatureComponents", [(current_feature.id, directory)])
- add_data(self.db, "CreateFolder", [(directory, directory)])
- add_data(self.db, "RemoveFile",
- [(self.component, self.component, "*.*", directory, 2),
- ])
-
- def removefile(self, key, pattern):
- "Add a RemoveFile entry"
- add_data(self.db, "RemoveFile", [(self.component+key, self.component, pattern, self.logical, 2)])
-
-
-class Feature:
- def __init__(self, db, id, title, desc, display, level = 1,
- parent=None, directory = None, attributes=0):
- self.id = id
- if parent:
- parent = parent.id
- add_data(db, "Feature",
- [(id, parent, title, desc, display,
- level, directory, attributes)])
- def set_current(self):
- global current_feature
- current_feature = self
-
-class Control:
- def __init__(self, dlg, name):
- self.dlg = dlg
- self.name = name
-
- def event(self, ev, arg, cond = "1", order = None):
- add_data(self.dlg.db, "ControlEvent",
- [(self.dlg.name, self.name, ev, arg, cond, order)])
-
- def mapping(self, ev, attr):
- add_data(self.dlg.db, "EventMapping",
- [(self.dlg.name, self.name, ev, attr)])
-
- def condition(self, action, condition):
- add_data(self.dlg.db, "ControlCondition",
- [(self.dlg.name, self.name, action, condition)])
-
-class RadioButtonGroup(Control):
- def __init__(self, dlg, name, property):
- self.dlg = dlg
- self.name = name
- self.property = property
- self.index = 1
-
- def add(self, name, x, y, w, h, text, value = None):
- if value is None:
- value = name
- add_data(self.dlg.db, "RadioButton",
- [(self.property, self.index, value,
- x, y, w, h, text, None)])
- self.index += 1
-
-class Dialog:
- def __init__(self, db, name, x, y, w, h, attr, title, first, default, cancel):
- self.db = db
- self.name = name
- self.x, self.y, self.w, self.h = x,y,w,h
- add_data(db, "Dialog", [(name, x,y,w,h,attr,title,first,default,cancel)])
-
- def control(self, name, type, x, y, w, h, attr, prop, text, next, help):
- add_data(self.db, "Control",
- [(self.name, name, type, x, y, w, h, attr, prop, text, next, help)])
- return Control(self, name)
-
- def text(self, name, x, y, w, h, attr, text):
- return self.control(name, "Text", x, y, w, h, attr, None,
- text, None, None)
-
- def bitmap(self, name, x, y, w, h, text):
- return self.control(name, "Bitmap", x, y, w, h, 1, None, text, None, None)
-
- def line(self, name, x, y, w, h):
- return self.control(name, "Line", x, y, w, h, 1, None, None, None, None)
-
- def pushbutton(self, name, x, y, w, h, attr, text, next):
- return self.control(name, "PushButton", x, y, w, h, attr, None, text, next, None)
-
- def radiogroup(self, name, x, y, w, h, attr, prop, text, next):
- add_data(self.db, "Control",
- [(self.name, name, "RadioButtonGroup",
- x, y, w, h, attr, prop, text, next, None)])
- return RadioButtonGroup(self, name, prop)
-
- def checkbox(self, name, x, y, w, h, attr, prop, text, next):
- return self.control(name, "CheckBox", x, y, w, h, attr, prop, text, next, None)
-
-def pe_type(path):
- header = open(path, "rb").read(1000)
- # offset of PE header is at offset 0x3c
- pe_offset = struct.unpack("<i", header[0x3c:0x40])[0]
- assert header[pe_offset:pe_offset+4] == "PE\0\0"
- machine = struct.unpack("<H", header[pe_offset+4:pe_offset+6])[0]
- return machine
-
-def set_arch_from_file(path):
- global msi_type, Win64, arch_ext
- machine = pe_type(path)
- if machine == 0x14c:
- # i386
- msi_type = "Intel"
- Win64 = 0
- arch_ext = ''
- elif machine == 0x200:
- # Itanium
- msi_type = "Intel64"
- Win64 = 1
- arch_ext = '.ia64'
- elif machine == 0x8664:
- # AMD64
- msi_type = "x64"
- Win64 = 1
- arch_ext = '.amd64'
- else:
- raise ValueError, "Unsupported architecture"
- msi_type += ";1033"
diff --git a/Tools/msi/msisupport.c b/Tools/msi/msisupport.c
deleted file mode 100644
index 1fd2ee4156..0000000000
--- a/Tools/msi/msisupport.c
+++ /dev/null
@@ -1,93 +0,0 @@
-#include "windows.h"
-#include "msiquery.h"
-
-/* Print a debug message to the installer log file.
- * To see the debug messages, install with
- * msiexec /i pythonxy.msi /l*v python.log
- */
-static UINT debug(MSIHANDLE hInstall, LPCSTR msg)
-{
- MSIHANDLE hRec = MsiCreateRecord(1);
- if (!hRec || MsiRecordSetStringA(hRec, 1, msg) != ERROR_SUCCESS) {
- return ERROR_INSTALL_FAILURE;
- }
- MsiProcessMessage(hInstall, INSTALLMESSAGE_INFO, hRec);
- MsiCloseHandle(hRec);
- return ERROR_SUCCESS;
-}
-
-/* Check whether the TARGETDIR exists and is a directory.
- * Set TargetExists appropriately.
- */
-UINT __declspec(dllexport) __stdcall CheckDir(MSIHANDLE hInstall)
-{
-#define PSIZE 1024
- WCHAR wpath[PSIZE];
- char path[PSIZE];
- UINT result;
- DWORD size = PSIZE;
- DWORD attributes;
-
-
- result = MsiGetPropertyW(hInstall, L"TARGETDIR", wpath, &size);
- if (result != ERROR_SUCCESS)
- return result;
- wpath[size] = L'\0';
- path[size] = L'\0';
-
- attributes = GetFileAttributesW(wpath);
- if (attributes == INVALID_FILE_ATTRIBUTES ||
- !(attributes & FILE_ATTRIBUTE_DIRECTORY))
- {
- return MsiSetPropertyA(hInstall, "TargetExists", "0");
- } else {
- return MsiSetPropertyA(hInstall, "TargetExists", "1");
- }
-}
-
-/* Update the state of the REGISTRY.tcl component according to the
- * Extension and TclTk features. REGISTRY.tcl must be installed
- * if both features are installed, and must be absent otherwise.
- */
-UINT __declspec(dllexport) __stdcall UpdateEditIDLE(MSIHANDLE hInstall)
-{
- INSTALLSTATE ext_old, ext_new, tcl_old, tcl_new, reg_new;
- UINT result;
-
- result = MsiGetFeatureStateA(hInstall, "Extensions", &ext_old, &ext_new);
- if (result != ERROR_SUCCESS)
- return result;
- result = MsiGetFeatureStateA(hInstall, "TclTk", &tcl_old, &tcl_new);
- if (result != ERROR_SUCCESS)
- return result;
-
- /* If the current state is Absent, and the user did not select
- the feature in the UI, Installer apparently sets the "selected"
- state to unknown. Update it to the current value, then. */
- if (ext_new == INSTALLSTATE_UNKNOWN)
- ext_new = ext_old;
- if (tcl_new == INSTALLSTATE_UNKNOWN)
- tcl_new = tcl_old;
-
- // XXX consider current state of REGISTRY.tcl?
- if (((tcl_new == INSTALLSTATE_LOCAL) ||
- (tcl_new == INSTALLSTATE_SOURCE) ||
- (tcl_new == INSTALLSTATE_DEFAULT)) &&
- ((ext_new == INSTALLSTATE_LOCAL) ||
- (ext_new == INSTALLSTATE_SOURCE) ||
- (ext_new == INSTALLSTATE_DEFAULT))) {
- reg_new = INSTALLSTATE_SOURCE;
- } else {
- reg_new = INSTALLSTATE_ABSENT;
- }
- result = MsiSetComponentStateA(hInstall, "REGISTRY.tcl", reg_new);
- return result;
-}
-
-BOOL APIENTRY DllMain(HANDLE hModule,
- DWORD ul_reason_for_call,
- LPVOID lpReserved)
-{
- return TRUE;
-}
-
diff --git a/Tools/msi/msisupport.mak b/Tools/msi/msisupport.mak
deleted file mode 100644
index 2905dbe629..0000000000
--- a/Tools/msi/msisupport.mak
+++ /dev/null
@@ -1,9 +0,0 @@
-# /OPT: REF and ICF are added by VS.NET by default
-msisupport.dll: msisupport.obj
- link.exe /OUT:msisupport.dll /INCREMENTAL:NO /NOLOGO /DLL /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF msisupport.obj msi.lib kernel32.lib
-
-# We request a static CRT, so that there will be no CRT dependencies
-# for the target system. We cannot do without a CRT, since it provides
-# the DLL entry point.
-msisupport.obj: msisupport.c
- cl /O2 /D WIN32 /D NDEBUG /D _WINDOWS /MT /W3 /c msisupport.c
diff --git a/Tools/msi/path/path.wixproj b/Tools/msi/path/path.wixproj
new file mode 100644
index 0000000000..2792e14666
--- /dev/null
+++ b/Tools/msi/path/path.wixproj
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{91C99298-8E2E-4422-A5AF-CC4FFF9A58D3}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>path</OutputName>
+ <OutputType>Package</OutputType>
+ <SuppressIces>ICE71</SuppressIces>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="*.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/path/path.wxs b/Tools/msi/path/path.wxs
new file mode 100644
index 0000000000..8b37936cc9
--- /dev/null
+++ b/Tools/msi/path/path.wxs
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+
+ <PropertyRef Id="UpgradeTable" />
+ <PropertyRef Id="REGISTRYKEY" />
+
+ <Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <Component Id="PrependPath_CU" Directory="InstallDirectory" Guid="*">
+ <Condition>NOT ALLUSERS=1</Condition>
+ <RegistryKey Root="HKCU" Key="[REGISTRYKEY]">
+ <RegistryValue KeyPath="yes" Key="InstalledFeatures" Name="$(var.OptionalFeatureName)" Value="$(var.Version)" Type="string" />
+ </RegistryKey>
+
+ <CreateFolder Directory="Scripts" />
+ <RemoveFolder Id="Remove_Scripts_CU" Directory="Scripts" On="uninstall" />
+
+ <Environment Id="PATH_CU" Action="set" Name="PATH" Part="first" Value="[InstallDirectory]" />
+ <Environment Id="SCRIPTS_PATH_CU" Action="set" Name="PATH" Part="first" Value="[Scripts]" />
+ </Component>
+ <Component Id="PrependPath_LM" Directory="InstallDirectory" Guid="*">
+ <Condition>ALLUSERS=1</Condition>
+ <RegistryKey Root="HKLM" Key="[REGISTRYKEY]">
+ <RegistryValue KeyPath="yes" Key="InstalledFeatures" Name="$(var.OptionalFeatureName)" Value="$(var.Version)" Type="string" />
+ </RegistryKey>
+
+ <CreateFolder Directory="Scripts" />
+ <RemoveFolder Id="Remove_Scripts_LM" Directory="Scripts" On="uninstall" />
+
+ <Environment Id="PATH_LM" Action="set" Name="PATH" Part="first" Value="[InstallDirectory]" System="yes" />
+ <Environment Id="SCRIPTS_PATH_LM" Action="set" Name="PATH" Part="first" Value="[Scripts]" System="yes" />
+ <Environment Id="PY_PATHEXT_LM" Action="set" Name="PATHEXT" Part="last" Value=".PY" System="yes" />
+ <Environment Id="PYW_PATHEXT_LM" Action="set" Name="PATHEXT" Part="last" Value=".PYW" System="yes" />
+ </Component>
+ </Feature>
+ </Product>
+</Wix>
+
diff --git a/Tools/msi/path/path_en-US.wxl b/Tools/msi/path/path_en-US.wxl
new file mode 100644
index 0000000000..33a7886fe2
--- /dev/null
+++ b/Tools/msi/path/path_en-US.wxl
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
+ <String Id="Descriptor">Add to Path</String>
+ <String Id="ShortDescriptor">Path</String>
+ <String Id="NoPython">No !(loc.ProductName) installation was detected.</String>
+</WixLocalization>
diff --git a/Tools/msi/pip/pip.wixproj b/Tools/msi/pip/pip.wixproj
new file mode 100644
index 0000000000..718c02c032
--- /dev/null
+++ b/Tools/msi/pip/pip.wixproj
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{91C99298-8E2E-4422-A5AF-CC4FFF9A58D3}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>pip</OutputName>
+ <OutputType>Package</OutputType>
+ <SuppressIces>ICE71</SuppressIces>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="*.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/pip/pip.wxs b/Tools/msi/pip/pip.wxs
new file mode 100644
index 0000000000..19e9f5fd20
--- /dev/null
+++ b/Tools/msi/pip/pip.wxs
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+
+ <PropertyRef Id="UpgradeTable" />
+ <PropertyRef Id="REGISTRYKEY" />
+
+ <Property Id="PYTHON_EXE" Secure="yes">
+ <ComponentSearch Id="PythonExe" Guid="$(var.PythonExeComponentGuid)">
+ <FileSearch Name="python.exe" />
+ </ComponentSearch>
+ </Property>
+
+ <Condition Message="!(loc.NoPython)">PYTHON_EXE</Condition>
+
+ <Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <ComponentRef Id="OptionalFeature" />
+ </Feature>
+
+ <?if $(var.Platform)~="x64" ?>
+ <CustomAction Id="UpdatePip" BinaryKey="WixCA" DllEntry="CAQuietExec64" Execute="deferred" Return="ignore"/>
+ <?else ?>
+ <CustomAction Id="UpdatePip" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="ignore"/>
+ <?endif ?>
+
+ <!-- Install/uninstall pip -->
+ <CustomAction Id="SetUpdatePipCommandLine" Property="UpdatePip" Value='"[PYTHON_EXE]" -E -s -m ensurepip -U --default-pip' Execute="immediate" />
+ <CustomAction Id="SetRemovePipCommandLine" Property="UpdatePip" Value='"[PYTHON_EXE]" -E -s -B -m ensurepip._uninstall' Execute="immediate" />
+
+ <InstallExecuteSequence>
+ <Custom Action="SetUpdatePipCommandLine" Before="UpdatePip">(&amp;DefaultFeature=3) AND NOT (!DefaultFeature=3)</Custom>
+ <Custom Action="SetRemovePipCommandLine" Before="UpdatePip">(&amp;DefaultFeature=2) AND (!DefaultFeature=3)</Custom>
+
+ <Custom Action="UpdatePip" Before="InstallFinalize">UpdatePip</Custom>
+ </InstallExecuteSequence>
+ </Product>
+</Wix>
+
diff --git a/Tools/msi/pip/pip_en-US.wxl b/Tools/msi/pip/pip_en-US.wxl
new file mode 100644
index 0000000000..cd0d9edf3a
--- /dev/null
+++ b/Tools/msi/pip/pip_en-US.wxl
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
+ <String Id="Descriptor">pip Bootstrap</String>
+ <String Id="ShortDescriptor">pip</String>
+ <String Id="NoPython">No !(loc.ProductName) installation was detected.</String>
+</WixLocalization>
diff --git a/Tools/msi/schema.py b/Tools/msi/schema.py
deleted file mode 100644
index 1f72e5ac78..0000000000
--- a/Tools/msi/schema.py
+++ /dev/null
@@ -1,1007 +0,0 @@
-from msilib import Table
-
-_Validation = Table('_Validation')
-_Validation.add_field(1,'Table',11552)
-_Validation.add_field(2,'Column',11552)
-_Validation.add_field(3,'Nullable',3332)
-_Validation.add_field(4,'MinValue',4356)
-_Validation.add_field(5,'MaxValue',4356)
-_Validation.add_field(6,'KeyTable',7679)
-_Validation.add_field(7,'KeyColumn',5378)
-_Validation.add_field(8,'Category',7456)
-_Validation.add_field(9,'Set',7679)
-_Validation.add_field(10,'Description',7679)
-
-ActionText = Table('ActionText')
-ActionText.add_field(1,'Action',11592)
-ActionText.add_field(2,'Description',7936)
-ActionText.add_field(3,'Template',7936)
-
-AdminExecuteSequence = Table('AdminExecuteSequence')
-AdminExecuteSequence.add_field(1,'Action',0x2DFF)
-AdminExecuteSequence.add_field(2,'Condition',7679)
-AdminExecuteSequence.add_field(3,'Sequence',5378)
-
-Condition = Table('Condition')
-Condition.add_field(1,'Feature_',11558)
-Condition.add_field(2,'Level',9474)
-Condition.add_field(3,'Condition',7679)
-
-AdminUISequence = Table('AdminUISequence')
-AdminUISequence.add_field(1,'Action',0x2DFF)
-AdminUISequence.add_field(2,'Condition',7679)
-AdminUISequence.add_field(3,'Sequence',5378)
-
-AdvtExecuteSequence = Table('AdvtExecuteSequence')
-AdvtExecuteSequence.add_field(1,'Action',0x2DFF)
-AdvtExecuteSequence.add_field(2,'Condition',7679)
-AdvtExecuteSequence.add_field(3,'Sequence',5378)
-
-AdvtUISequence = Table('AdvtUISequence')
-AdvtUISequence.add_field(1,'Action',11592)
-AdvtUISequence.add_field(2,'Condition',7679)
-AdvtUISequence.add_field(3,'Sequence',5378)
-
-AppId = Table('AppId')
-AppId.add_field(1,'AppId',11558)
-AppId.add_field(2,'RemoteServerName',7679)
-AppId.add_field(3,'LocalService',7679)
-AppId.add_field(4,'ServiceParameters',7679)
-AppId.add_field(5,'DllSurrogate',7679)
-AppId.add_field(6,'ActivateAtStorage',5378)
-AppId.add_field(7,'RunAsInteractiveUser',5378)
-
-AppSearch = Table('AppSearch')
-AppSearch.add_field(1,'Property',11592)
-AppSearch.add_field(2,'Signature_',11592)
-
-Property = Table('Property')
-Property.add_field(1,'Property',11592)
-Property.add_field(2,'Value',3840)
-
-BBControl = Table('BBControl')
-BBControl.add_field(1,'Billboard_',11570)
-BBControl.add_field(2,'BBControl',11570)
-BBControl.add_field(3,'Type',3378)
-BBControl.add_field(4,'X',1282)
-BBControl.add_field(5,'Y',1282)
-BBControl.add_field(6,'Width',1282)
-BBControl.add_field(7,'Height',1282)
-BBControl.add_field(8,'Attributes',4356)
-BBControl.add_field(9,'Text',7986)
-
-Billboard = Table('Billboard')
-Billboard.add_field(1,'Billboard',11570)
-Billboard.add_field(2,'Feature_',3366)
-Billboard.add_field(3,'Action',7474)
-Billboard.add_field(4,'Ordering',5378)
-
-Feature = Table('Feature')
-Feature.add_field(1,'Feature',11558)
-Feature.add_field(2,'Feature_Parent',7462)
-Feature.add_field(3,'Title',8000)
-Feature.add_field(4,'Description',8191)
-Feature.add_field(5,'Display',5378)
-Feature.add_field(6,'Level',1282)
-Feature.add_field(7,'Directory_',0x1DFF)
-Feature.add_field(8,'Attributes',1282)
-
-Binary = Table('Binary')
-Binary.add_field(1,'Name',11592)
-Binary.add_field(2,'Data',2304)
-
-BindImage = Table('BindImage')
-BindImage.add_field(1,'File_',0x2DFF)
-BindImage.add_field(2,'Path',7679)
-
-File = Table('File')
-File.add_field(1,'File',0x2DFF)
-File.add_field(2,'Component_',0xDFF)
-File.add_field(3,'FileName',4095)
-File.add_field(4,'FileSize',260)
-File.add_field(5,'Version',0x1DFF)
-File.add_field(6,'Language',7444)
-File.add_field(7,'Attributes',5378)
-File.add_field(8,'Sequence',1282)
-
-CCPSearch = Table('CCPSearch')
-CCPSearch.add_field(1,'Signature_',11592)
-
-CheckBox = Table('CheckBox')
-CheckBox.add_field(1,'Property',11592)
-CheckBox.add_field(2,'Value',7488)
-
-Class = Table('Class')
-Class.add_field(1,'CLSID',11558)
-Class.add_field(2,'Context',11552)
-Class.add_field(3,'Component_',0x2DFF)
-Class.add_field(4,'ProgId_Default',7679)
-Class.add_field(5,'Description',8191)
-Class.add_field(6,'AppId_',7462)
-Class.add_field(7,'FileTypeMask',7679)
-Class.add_field(8,'Icon_',7496)
-Class.add_field(9,'IconIndex',5378)
-Class.add_field(10,'DefInprocHandler',7456)
-Class.add_field(11,'Argument',7679)
-Class.add_field(12,'Feature_',3366)
-Class.add_field(13,'Attributes',5378)
-
-Component = Table('Component')
-Component.add_field(1,'Component',0x2DFF)
-Component.add_field(2,'ComponentId',7462)
-Component.add_field(3,'Directory_',0xDFF)
-Component.add_field(4,'Attributes',1282)
-Component.add_field(5,'Condition',7679)
-Component.add_field(6,'KeyPath',0x1DFF)
-
-Icon = Table('Icon')
-Icon.add_field(1,'Name',11592)
-Icon.add_field(2,'Data',2304)
-
-ProgId = Table('ProgId')
-ProgId.add_field(1,'ProgId',11775)
-ProgId.add_field(2,'ProgId_Parent',7679)
-ProgId.add_field(3,'Class_',7462)
-ProgId.add_field(4,'Description',8191)
-ProgId.add_field(5,'Icon_',7496)
-ProgId.add_field(6,'IconIndex',5378)
-
-ComboBox = Table('ComboBox')
-ComboBox.add_field(1,'Property',11592)
-ComboBox.add_field(2,'Order',9474)
-ComboBox.add_field(3,'Value',3392)
-ComboBox.add_field(4,'Text',8000)
-
-CompLocator = Table('CompLocator')
-CompLocator.add_field(1,'Signature_',11592)
-CompLocator.add_field(2,'ComponentId',3366)
-CompLocator.add_field(3,'Type',5378)
-
-Complus = Table('Complus')
-Complus.add_field(1,'Component_',0x2DFF)
-Complus.add_field(2,'ExpType',13570)
-
-Directory = Table('Directory')
-Directory.add_field(1,'Directory',0x2DFF)
-Directory.add_field(2,'Directory_Parent',0x1DFF)
-Directory.add_field(3,'DefaultDir',4095)
-
-Control = Table('Control')
-Control.add_field(1,'Dialog_',11592)
-Control.add_field(2,'Control',11570)
-Control.add_field(3,'Type',3348)
-Control.add_field(4,'X',1282)
-Control.add_field(5,'Y',1282)
-Control.add_field(6,'Width',1282)
-Control.add_field(7,'Height',1282)
-Control.add_field(8,'Attributes',4356)
-Control.add_field(9,'Property',7474)
-Control.add_field(10,'Text',7936)
-Control.add_field(11,'Control_Next',7474)
-Control.add_field(12,'Help',7986)
-
-Dialog = Table('Dialog')
-Dialog.add_field(1,'Dialog',11592)
-Dialog.add_field(2,'HCentering',1282)
-Dialog.add_field(3,'VCentering',1282)
-Dialog.add_field(4,'Width',1282)
-Dialog.add_field(5,'Height',1282)
-Dialog.add_field(6,'Attributes',4356)
-Dialog.add_field(7,'Title',8064)
-Dialog.add_field(8,'Control_First',3378)
-Dialog.add_field(9,'Control_Default',7474)
-Dialog.add_field(10,'Control_Cancel',7474)
-
-ControlCondition = Table('ControlCondition')
-ControlCondition.add_field(1,'Dialog_',11592)
-ControlCondition.add_field(2,'Control_',11570)
-ControlCondition.add_field(3,'Action',11570)
-ControlCondition.add_field(4,'Condition',11775)
-
-ControlEvent = Table('ControlEvent')
-ControlEvent.add_field(1,'Dialog_',11592)
-ControlEvent.add_field(2,'Control_',11570)
-ControlEvent.add_field(3,'Event',11570)
-ControlEvent.add_field(4,'Argument',11775)
-ControlEvent.add_field(5,'Condition',15871)
-ControlEvent.add_field(6,'Ordering',5378)
-
-CreateFolder = Table('CreateFolder')
-CreateFolder.add_field(1,'Directory_',0x2DFF)
-CreateFolder.add_field(2,'Component_',0x2DFF)
-
-CustomAction = Table('CustomAction')
-CustomAction.add_field(1,'Action',0x2DFF)
-CustomAction.add_field(2,'Type',1282)
-CustomAction.add_field(3,'Source',0x1DFF)
-CustomAction.add_field(4,'Target',7679)
-
-DrLocator = Table('DrLocator')
-DrLocator.add_field(1,'Signature_',11592)
-DrLocator.add_field(2,'Parent',15688)
-DrLocator.add_field(3,'Path',15871)
-DrLocator.add_field(4,'Depth',5378)
-
-DuplicateFile = Table('DuplicateFile')
-DuplicateFile.add_field(1,'FileKey',11592)
-DuplicateFile.add_field(2,'Component_',0xDFF)
-DuplicateFile.add_field(3,'File_',0xDFF)
-DuplicateFile.add_field(4,'DestName',8191)
-DuplicateFile.add_field(5,'DestFolder',7496)
-
-Environment = Table('Environment')
-Environment.add_field(1,'Environment',11592)
-Environment.add_field(2,'Name',4095)
-Environment.add_field(3,'Value',8191)
-Environment.add_field(4,'Component_',0xDFF)
-
-Error = Table('Error')
-Error.add_field(1,'Error',9474)
-Error.add_field(2,'Message',7936)
-
-EventMapping = Table('EventMapping')
-EventMapping.add_field(1,'Dialog_',11592)
-EventMapping.add_field(2,'Control_',11570)
-EventMapping.add_field(3,'Event',11570)
-EventMapping.add_field(4,'Attribute',3378)
-
-Extension = Table('Extension')
-Extension.add_field(1,'Extension',11775)
-Extension.add_field(2,'Component_',0x2DFF)
-Extension.add_field(3,'ProgId_',7679)
-Extension.add_field(4,'MIME_',7488)
-Extension.add_field(5,'Feature_',3366)
-
-MIME = Table('MIME')
-MIME.add_field(1,'ContentType',11584)
-MIME.add_field(2,'Extension_',3583)
-MIME.add_field(3,'CLSID',7462)
-
-FeatureComponents = Table('FeatureComponents')
-FeatureComponents.add_field(1,'Feature_',11558)
-FeatureComponents.add_field(2,'Component_',0x2DFF)
-
-FileSFPCatalog = Table('FileSFPCatalog')
-FileSFPCatalog.add_field(1,'File_',0x2DFF)
-FileSFPCatalog.add_field(2,'SFPCatalog_',11775)
-
-SFPCatalog = Table('SFPCatalog')
-SFPCatalog.add_field(1,'SFPCatalog',11775)
-SFPCatalog.add_field(2,'Catalog',2304)
-SFPCatalog.add_field(3,'Dependency',7424)
-
-Font = Table('Font')
-Font.add_field(1,'File_',0x2DFF)
-Font.add_field(2,'FontTitle',7552)
-
-IniFile = Table('IniFile')
-IniFile.add_field(1,'IniFile',11592)
-IniFile.add_field(2,'FileName',4095)
-IniFile.add_field(3,'DirProperty',7496)
-IniFile.add_field(4,'Section',3936)
-IniFile.add_field(5,'Key',3968)
-IniFile.add_field(6,'Value',4095)
-IniFile.add_field(7,'Action',1282)
-IniFile.add_field(8,'Component_',0xDFF)
-
-IniLocator = Table('IniLocator')
-IniLocator.add_field(1,'Signature_',11592)
-IniLocator.add_field(2,'FileName',3583)
-IniLocator.add_field(3,'Section',3424)
-IniLocator.add_field(4,'Key',3456)
-IniLocator.add_field(5,'Field',5378)
-IniLocator.add_field(6,'Type',5378)
-
-InstallExecuteSequence = Table('InstallExecuteSequence')
-InstallExecuteSequence.add_field(1,'Action',0x2DFF)
-InstallExecuteSequence.add_field(2,'Condition',7679)
-InstallExecuteSequence.add_field(3,'Sequence',5378)
-
-InstallUISequence = Table('InstallUISequence')
-InstallUISequence.add_field(1,'Action',0x2DFF)
-InstallUISequence.add_field(2,'Condition',7679)
-InstallUISequence.add_field(3,'Sequence',5378)
-
-IsolatedComponent = Table('IsolatedComponent')
-IsolatedComponent.add_field(1,'Component_Shared',0x2DFF)
-IsolatedComponent.add_field(2,'Component_Application',0x2DFF)
-
-LaunchCondition = Table('LaunchCondition')
-LaunchCondition.add_field(1,'Condition',11775)
-LaunchCondition.add_field(2,'Description',4095)
-
-ListBox = Table('ListBox')
-ListBox.add_field(1,'Property',11592)
-ListBox.add_field(2,'Order',9474)
-ListBox.add_field(3,'Value',3392)
-ListBox.add_field(4,'Text',8000)
-
-ListView = Table('ListView')
-ListView.add_field(1,'Property',11592)
-ListView.add_field(2,'Order',9474)
-ListView.add_field(3,'Value',3392)
-ListView.add_field(4,'Text',8000)
-ListView.add_field(5,'Binary_',7496)
-
-LockPermissions = Table('LockPermissions')
-LockPermissions.add_field(1,'LockObject',11592)
-LockPermissions.add_field(2,'Table',11552)
-LockPermissions.add_field(3,'Domain',15871)
-LockPermissions.add_field(4,'User',11775)
-LockPermissions.add_field(5,'Permission',4356)
-
-Media = Table('Media')
-Media.add_field(1,'DiskId',9474)
-Media.add_field(2,'LastSequence',1282)
-Media.add_field(3,'DiskPrompt',8000)
-Media.add_field(4,'Cabinet',7679)
-Media.add_field(5,'VolumeLabel',7456)
-Media.add_field(6,'Source',7496)
-
-MoveFile = Table('MoveFile')
-MoveFile.add_field(1,'FileKey',11592)
-MoveFile.add_field(2,'Component_',0xDFF)
-MoveFile.add_field(3,'SourceName',8191)
-MoveFile.add_field(4,'DestName',8191)
-MoveFile.add_field(5,'SourceFolder',7496)
-MoveFile.add_field(6,'DestFolder',3400)
-MoveFile.add_field(7,'Options',1282)
-
-MsiAssembly = Table('MsiAssembly')
-MsiAssembly.add_field(1,'Component_',0x2DFF)
-MsiAssembly.add_field(2,'Feature_',3366)
-MsiAssembly.add_field(3,'File_Manifest',0x1DFF)
-MsiAssembly.add_field(4,'File_Application',0x1DFF)
-MsiAssembly.add_field(5,'Attributes',5378)
-
-MsiAssemblyName = Table('MsiAssemblyName')
-MsiAssemblyName.add_field(1,'Component_',0x2DFF)
-MsiAssemblyName.add_field(2,'Name',11775)
-MsiAssemblyName.add_field(3,'Value',3583)
-
-MsiDigitalCertificate = Table('MsiDigitalCertificate')
-MsiDigitalCertificate.add_field(1,'DigitalCertificate',11592)
-MsiDigitalCertificate.add_field(2,'CertData',2304)
-
-MsiDigitalSignature = Table('MsiDigitalSignature')
-MsiDigitalSignature.add_field(1,'Table',11552)
-MsiDigitalSignature.add_field(2,'SignObject',11592)
-MsiDigitalSignature.add_field(3,'DigitalCertificate_',3400)
-MsiDigitalSignature.add_field(4,'Hash',6400)
-
-MsiFileHash = Table('MsiFileHash')
-MsiFileHash.add_field(1,'File_',0x2DFF)
-MsiFileHash.add_field(2,'Options',1282)
-MsiFileHash.add_field(3,'HashPart1',260)
-MsiFileHash.add_field(4,'HashPart2',260)
-MsiFileHash.add_field(5,'HashPart3',260)
-MsiFileHash.add_field(6,'HashPart4',260)
-
-MsiPatchHeaders = Table('MsiPatchHeaders')
-MsiPatchHeaders.add_field(1,'StreamRef',11558)
-MsiPatchHeaders.add_field(2,'Header',2304)
-
-ODBCAttribute = Table('ODBCAttribute')
-ODBCAttribute.add_field(1,'Driver_',11592)
-ODBCAttribute.add_field(2,'Attribute',11560)
-ODBCAttribute.add_field(3,'Value',8191)
-
-ODBCDriver = Table('ODBCDriver')
-ODBCDriver.add_field(1,'Driver',11592)
-ODBCDriver.add_field(2,'Component_',0xDFF)
-ODBCDriver.add_field(3,'Description',3583)
-ODBCDriver.add_field(4,'File_',0xDFF)
-ODBCDriver.add_field(5,'File_Setup',0x1DFF)
-
-ODBCDataSource = Table('ODBCDataSource')
-ODBCDataSource.add_field(1,'DataSource',0x2DFF)
-ODBCDataSource.add_field(2,'Component_',0xDFF)
-ODBCDataSource.add_field(3,'Description',3583)
-ODBCDataSource.add_field(4,'DriverDescription',3583)
-ODBCDataSource.add_field(5,'Registration',1282)
-
-ODBCSourceAttribute = Table('ODBCSourceAttribute')
-ODBCSourceAttribute.add_field(1,'DataSource_',11592)
-ODBCSourceAttribute.add_field(2,'Attribute',11552)
-ODBCSourceAttribute.add_field(3,'Value',8191)
-
-ODBCTranslator = Table('ODBCTranslator')
-ODBCTranslator.add_field(1,'Translator',11592)
-ODBCTranslator.add_field(2,'Component_',0xDFF)
-ODBCTranslator.add_field(3,'Description',3583)
-ODBCTranslator.add_field(4,'File_',0xDFF)
-ODBCTranslator.add_field(5,'File_Setup',0x1DFF)
-
-Patch = Table('Patch')
-Patch.add_field(1,'File_',11592)
-Patch.add_field(2,'Sequence',9474)
-Patch.add_field(3,'PatchSize',260)
-Patch.add_field(4,'Attributes',1282)
-Patch.add_field(5,'Header',6400)
-Patch.add_field(6,'StreamRef_',7462)
-
-PatchPackage = Table('PatchPackage')
-PatchPackage.add_field(1,'PatchId',11558)
-PatchPackage.add_field(2,'Media_',1282)
-
-PublishComponent = Table('PublishComponent')
-PublishComponent.add_field(1,'ComponentId',11558)
-PublishComponent.add_field(2,'Qualifier',11775)
-PublishComponent.add_field(3,'Component_',0x2DFF)
-PublishComponent.add_field(4,'AppData',8191)
-PublishComponent.add_field(5,'Feature_',3366)
-
-RadioButton = Table('RadioButton')
-RadioButton.add_field(1,'Property',11592)
-RadioButton.add_field(2,'Order',9474)
-RadioButton.add_field(3,'Value',3392)
-RadioButton.add_field(4,'X',1282)
-RadioButton.add_field(5,'Y',1282)
-RadioButton.add_field(6,'Width',1282)
-RadioButton.add_field(7,'Height',1282)
-RadioButton.add_field(8,'Text',8000)
-RadioButton.add_field(9,'Help',7986)
-
-Registry = Table('Registry')
-Registry.add_field(1,'Registry',0x2DFF)
-Registry.add_field(2,'Root',1282)
-Registry.add_field(3,'Key',4095)
-Registry.add_field(4,'Name',8191)
-Registry.add_field(5,'Value',7936)
-Registry.add_field(6,'Component_',0xDFF)
-
-RegLocator = Table('RegLocator')
-RegLocator.add_field(1,'Signature_',11592)
-RegLocator.add_field(2,'Root',1282)
-RegLocator.add_field(3,'Key',3583)
-RegLocator.add_field(4,'Name',7679)
-RegLocator.add_field(5,'Type',5378)
-
-RemoveFile = Table('RemoveFile')
-RemoveFile.add_field(1,'FileKey',11592)
-RemoveFile.add_field(2,'Component_',0xDFF)
-RemoveFile.add_field(3,'FileName',8191)
-RemoveFile.add_field(4,'DirProperty',3400)
-RemoveFile.add_field(5,'InstallMode',1282)
-
-RemoveIniFile = Table('RemoveIniFile')
-RemoveIniFile.add_field(1,'RemoveIniFile',11592)
-RemoveIniFile.add_field(2,'FileName',4095)
-RemoveIniFile.add_field(3,'DirProperty',7496)
-RemoveIniFile.add_field(4,'Section',3936)
-RemoveIniFile.add_field(5,'Key',3968)
-RemoveIniFile.add_field(6,'Value',8191)
-RemoveIniFile.add_field(7,'Action',1282)
-RemoveIniFile.add_field(8,'Component_',0xDFF)
-
-RemoveRegistry = Table('RemoveRegistry')
-RemoveRegistry.add_field(1,'RemoveRegistry',11592)
-RemoveRegistry.add_field(2,'Root',1282)
-RemoveRegistry.add_field(3,'Key',4095)
-RemoveRegistry.add_field(4,'Name',8191)
-RemoveRegistry.add_field(5,'Component_',0xDFF)
-
-ReserveCost = Table('ReserveCost')
-ReserveCost.add_field(1,'ReserveKey',11592)
-ReserveCost.add_field(2,'Component_',0xDFF)
-ReserveCost.add_field(3,'ReserveFolder',7496)
-ReserveCost.add_field(4,'ReserveLocal',260)
-ReserveCost.add_field(5,'ReserveSource',260)
-
-SelfReg = Table('SelfReg')
-SelfReg.add_field(1,'File_',0x2DFF)
-SelfReg.add_field(2,'Cost',5378)
-
-ServiceControl = Table('ServiceControl')
-ServiceControl.add_field(1,'ServiceControl',11592)
-ServiceControl.add_field(2,'Name',4095)
-ServiceControl.add_field(3,'Event',1282)
-ServiceControl.add_field(4,'Arguments',8191)
-ServiceControl.add_field(5,'Wait',5378)
-ServiceControl.add_field(6,'Component_',0xDFF)
-
-ServiceInstall = Table('ServiceInstall')
-ServiceInstall.add_field(1,'ServiceInstall',11592)
-ServiceInstall.add_field(2,'Name',3583)
-ServiceInstall.add_field(3,'DisplayName',8191)
-ServiceInstall.add_field(4,'ServiceType',260)
-ServiceInstall.add_field(5,'StartType',260)
-ServiceInstall.add_field(6,'ErrorControl',260)
-ServiceInstall.add_field(7,'LoadOrderGroup',7679)
-ServiceInstall.add_field(8,'Dependencies',7679)
-ServiceInstall.add_field(9,'StartName',7679)
-ServiceInstall.add_field(10,'Password',7679)
-ServiceInstall.add_field(11,'Arguments',7679)
-ServiceInstall.add_field(12,'Component_',0xDFF)
-ServiceInstall.add_field(13,'Description',8191)
-
-Shortcut = Table('Shortcut')
-Shortcut.add_field(1,'Shortcut',11592)
-Shortcut.add_field(2,'Directory_',0xDFF)
-Shortcut.add_field(3,'Name',3968)
-Shortcut.add_field(4,'Component_',0xDFF)
-Shortcut.add_field(5,'Target',3400)
-Shortcut.add_field(6,'Arguments',7679)
-Shortcut.add_field(7,'Description',8191)
-Shortcut.add_field(8,'Hotkey',5378)
-Shortcut.add_field(9,'Icon_',7496)
-Shortcut.add_field(10,'IconIndex',5378)
-Shortcut.add_field(11,'ShowCmd',5378)
-Shortcut.add_field(12,'WkDir',7496)
-
-Signature = Table('Signature')
-Signature.add_field(1,'Signature',11592)
-Signature.add_field(2,'FileName',3583)
-Signature.add_field(3,'MinVersion',7444)
-Signature.add_field(4,'MaxVersion',7444)
-Signature.add_field(5,'MinSize',4356)
-Signature.add_field(6,'MaxSize',4356)
-Signature.add_field(7,'MinDate',4356)
-Signature.add_field(8,'MaxDate',4356)
-Signature.add_field(9,'Languages',7679)
-
-TextStyle = Table('TextStyle')
-TextStyle.add_field(1,'TextStyle',11592)
-TextStyle.add_field(2,'FaceName',3360)
-TextStyle.add_field(3,'Size',1282)
-TextStyle.add_field(4,'Color',4356)
-TextStyle.add_field(5,'StyleBits',5378)
-
-TypeLib = Table('TypeLib')
-TypeLib.add_field(1,'LibID',11558)
-TypeLib.add_field(2,'Language',9474)
-TypeLib.add_field(3,'Component_',0x2DFF)
-TypeLib.add_field(4,'Version',4356)
-TypeLib.add_field(5,'Description',8064)
-TypeLib.add_field(6,'Directory_',0x1DFF)
-TypeLib.add_field(7,'Feature_',3366)
-TypeLib.add_field(8,'Cost',4356)
-
-UIText = Table('UIText')
-UIText.add_field(1,'Key',11592)
-UIText.add_field(2,'Text',8191)
-
-Upgrade = Table('Upgrade')
-Upgrade.add_field(1,'UpgradeCode',11558)
-Upgrade.add_field(2,'VersionMin',15636)
-Upgrade.add_field(3,'VersionMax',15636)
-Upgrade.add_field(4,'Language',15871)
-Upgrade.add_field(5,'Attributes',8452)
-Upgrade.add_field(6,'Remove',7679)
-Upgrade.add_field(7,'ActionProperty',3400)
-
-Verb = Table('Verb')
-Verb.add_field(1,'Extension_',11775)
-Verb.add_field(2,'Verb',11552)
-Verb.add_field(3,'Sequence',5378)
-Verb.add_field(4,'Command',8191)
-Verb.add_field(5,'Argument',8191)
-
-tables=[_Validation, ActionText, AdminExecuteSequence, Condition, AdminUISequence, AdvtExecuteSequence, AdvtUISequence, AppId, AppSearch, Property, BBControl, Billboard, Feature, Binary, BindImage, File, CCPSearch, CheckBox, Class, Component, Icon, ProgId, ComboBox, CompLocator, Complus, Directory, Control, Dialog, ControlCondition, ControlEvent, CreateFolder, CustomAction, DrLocator, DuplicateFile, Environment, Error, EventMapping, Extension, MIME, FeatureComponents, FileSFPCatalog, SFPCatalog, Font, IniFile, IniLocator, InstallExecuteSequence, InstallUISequence, IsolatedComponent, LaunchCondition, ListBox, ListView, LockPermissions, Media, MoveFile, MsiAssembly, MsiAssemblyName, MsiDigitalCertificate, MsiDigitalSignature, MsiFileHash, MsiPatchHeaders, ODBCAttribute, ODBCDriver, ODBCDataSource, ODBCSourceAttribute, ODBCTranslator, Patch, PatchPackage, PublishComponent, RadioButton, Registry, RegLocator, RemoveFile, RemoveIniFile, RemoveRegistry, ReserveCost, SelfReg, ServiceControl, ServiceInstall, Shortcut, Signature, TextStyle, TypeLib, UIText, Upgrade, Verb]
-
-_Validation_records = [
-(u'_Validation',u'Table',u'N',None, None, None, None, u'Identifier',None, u'Name of table',),
-(u'_Validation',u'Column',u'N',None, None, None, None, u'Identifier',None, u'Name of column',),
-(u'_Validation',u'Description',u'Y',None, None, None, None, u'Text',None, u'Description of column',),
-(u'_Validation',u'Set',u'Y',None, None, None, None, u'Text',None, u'Set of values that are permitted',),
-(u'_Validation',u'Category',u'Y',None, None, None, None, None, u'Text;Formatted;Template;Condition;Guid;Path;Version;Language;Identifier;Binary;UpperCase;LowerCase;Filename;Paths;AnyPath;WildCardFilename;RegPath;KeyFormatted;CustomSource;Property;Cabinet;Shortcut;URL',u'String category',),
-(u'_Validation',u'KeyColumn',u'Y',1,32,None, None, None, None, u'Column to which foreign key connects',),
-(u'_Validation',u'KeyTable',u'Y',None, None, None, None, u'Identifier',None, u'For foreign key, Name of table to which data must link',),
-(u'_Validation',u'MaxValue',u'Y',-2147483647,2147483647,None, None, None, None, u'Maximum value allowed',),
-(u'_Validation',u'MinValue',u'Y',-2147483647,2147483647,None, None, None, None, u'Minimum value allowed',),
-(u'_Validation',u'Nullable',u'N',None, None, None, None, None, u'Y;N;@',u'Whether the column is nullable',),
-(u'ActionText',u'Description',u'Y',None, None, None, None, u'Text',None, u'Localized description displayed in progress dialog and log when action is executing.',),
-(u'ActionText',u'Action',u'N',None, None, None, None, u'Identifier',None, u'Name of action to be described.',),
-(u'ActionText',u'Template',u'Y',None, None, None, None, u'Template',None, u'Optional localized format template used to format action data records for display during action execution.',),
-(u'AdminExecuteSequence',u'Action',u'N',None, None, None, None, u'Identifier',None, u'Name of action to invoke, either in the engine or the handler DLL.',),
-(u'AdminExecuteSequence',u'Condition',u'Y',None, None, None, None, u'Condition',None, u'Optional expression which skips the action if evaluates to expFalse.If the expression syntax is invalid, the engine will terminate, returning iesBadActionData.',),
-(u'AdminExecuteSequence',u'Sequence',u'Y',-4,32767,None, None, None, None, u'Number that determines the sort order in which the actions are to be executed. Leave blank to suppress action.',),
-(u'Condition',u'Condition',u'Y',None, None, None, None, u'Condition',None, u'Expression evaluated to determine if Level in the Feature table is to change.',),
-(u'Condition',u'Feature_',u'N',None, None, u'Feature',1,u'Identifier',None, u'Reference to a Feature entry in Feature table.',),
-(u'Condition',u'Level',u'N',0,32767,None, None, None, None, u'New selection Level to set in Feature table if Condition evaluates to TRUE.',),
-(u'AdminUISequence',u'Action',u'N',None, None, None, None, u'Identifier',None, u'Name of action to invoke, either in the engine or the handler DLL.',),
-(u'AdminUISequence',u'Condition',u'Y',None, None, None, None, u'Condition',None, u'Optional expression which skips the action if evaluates to expFalse.If the expression syntax is invalid, the engine will terminate, returning iesBadActionData.',),
-(u'AdminUISequence',u'Sequence',u'Y',-4,32767,None, None, None, None, u'Number that determines the sort order in which the actions are to be executed. Leave blank to suppress action.',),
-(u'AdvtExecuteSequence',u'Action',u'N',None, None, None, None, u'Identifier',None, u'Name of action to invoke, either in the engine or the handler DLL.',),
-(u'AdvtExecuteSequence',u'Condition',u'Y',None, None, None, None, u'Condition',None, u'Optional expression which skips the action if evaluates to expFalse.If the expression syntax is invalid, the engine will terminate, returning iesBadActionData.',),
-(u'AdvtExecuteSequence',u'Sequence',u'Y',-4,32767,None, None, None, None, u'Number that determines the sort order in which the actions are to be executed. Leave blank to suppress action.',),
-(u'AdvtUISequence',u'Action',u'N',None, None, None, None, u'Identifier',None, u'Name of action to invoke, either in the engine or the handler DLL.',),
-(u'AdvtUISequence',u'Condition',u'Y',None, None, None, None, u'Condition',None, u'Optional expression which skips the action if evaluates to expFalse.If the expression syntax is invalid, the engine will terminate, returning iesBadActionData.',),
-(u'AdvtUISequence',u'Sequence',u'Y',-4,32767,None, None, None, None, u'Number that determines the sort order in which the actions are to be executed. Leave blank to suppress action.',),
-(u'AppId',u'AppId',u'N',None, None, None, None, u'Guid',None, None, ),
-(u'AppId',u'ActivateAtStorage',u'Y',0,1,None, None, None, None, None, ),
-(u'AppId',u'DllSurrogate',u'Y',None, None, None, None, u'Text',None, None, ),
-(u'AppId',u'LocalService',u'Y',None, None, None, None, u'Text',None, None, ),
-(u'AppId',u'RemoteServerName',u'Y',None, None, None, None, u'Formatted',None, None, ),
-(u'AppId',u'RunAsInteractiveUser',u'Y',0,1,None, None, None, None, None, ),
-(u'AppId',u'ServiceParameters',u'Y',None, None, None, None, u'Text',None, None, ),
-(u'AppSearch',u'Property',u'N',None, None, None, None, u'Identifier',None, u'The property associated with a Signature',),
-(u'AppSearch',u'Signature_',u'N',None, None, u'Signature;RegLocator;IniLocator;DrLocator;CompLocator',1,u'Identifier',None, u'The Signature_ represents a unique file signature and is also the foreign key in the Signature, RegLocator, IniLocator, CompLocator and the DrLocator tables.',),
-(u'Property',u'Property',u'N',None, None, None, None, u'Identifier',None, u'Name of property, uppercase if settable by launcher or loader.',),
-(u'Property',u'Value',u'N',None, None, None, None, u'Text',None, u'String value for property. Never null or empty.',),
-(u'BBControl',u'Type',u'N',None, None, None, None, u'Identifier',None, u'The type of the control.',),
-(u'BBControl',u'Y',u'N',0,32767,None, None, None, None, u'Vertical coordinate of the upper left corner of the bounding rectangle of the control.',),
-(u'BBControl',u'Text',u'Y',None, None, None, None, u'Text',None, u'A string used to set the initial text contained within a control (if appropriate).',),
-(u'BBControl',u'BBControl',u'N',None, None, None, None, u'Identifier',None, u'Name of the control. This name must be unique within a billboard, but can repeat on different billboard.',),
-(u'BBControl',u'Attributes',u'Y',0,2147483647,None, None, None, None, u'A 32-bit word that specifies the attribute flags to be applied to this control.',),
-(u'BBControl',u'Billboard_',u'N',None, None, u'Billboard',1,u'Identifier',None, u'External key to the Billboard table, name of the billboard.',),
-(u'BBControl',u'Height',u'N',0,32767,None, None, None, None, u'Height of the bounding rectangle of the control.',),
-(u'BBControl',u'Width',u'N',0,32767,None, None, None, None, u'Width of the bounding rectangle of the control.',),
-(u'BBControl',u'X',u'N',0,32767,None, None, None, None, u'Horizontal coordinate of the upper left corner of the bounding rectangle of the control.',),
-(u'Billboard',u'Action',u'Y',None, None, None, None, u'Identifier',None, u'The name of an action. The billboard is displayed during the progress messages received from this action.',),
-(u'Billboard',u'Billboard',u'N',None, None, None, None, u'Identifier',None, u'Name of the billboard.',),
-(u'Billboard',u'Feature_',u'N',None, None, u'Feature',1,u'Identifier',None, u'An external key to the Feature Table. The billboard is shown only if this feature is being installed.',),
-(u'Billboard',u'Ordering',u'Y',0,32767,None, None, None, None, u'A positive integer. If there is more than one billboard corresponding to an action they will be shown in the order defined by this column.',),
-(u'Feature',u'Description',u'Y',None, None, None, None, u'Text',None, u'Longer descriptive text describing a visible feature item.',),
-(u'Feature',u'Attributes',u'N',None, None, None, None, None, u'0;1;2;4;5;6;8;9;10;16;17;18;20;21;22;24;25;26;32;33;34;36;37;38;48;49;50;52;53;54',u'Feature attributes',),
-(u'Feature',u'Feature',u'N',None, None, None, None, u'Identifier',None, u'Primary key used to identify a particular feature record.',),
-(u'Feature',u'Directory_',u'Y',None, None, u'Directory',1,u'UpperCase',None, u'The name of the Directory that can be configured by the UI. A non-null value will enable the browse button.',),
-(u'Feature',u'Level',u'N',0,32767,None, None, None, None, u'The install level at which record will be initially selected. An install level of 0 will disable an item and prevent its display.',),
-(u'Feature',u'Title',u'Y',None, None, None, None, u'Text',None, u'Short text identifying a visible feature item.',),
-(u'Feature',u'Display',u'Y',0,32767,None, None, None, None, u'Numeric sort order, used to force a specific display ordering.',),
-(u'Feature',u'Feature_Parent',u'Y',None, None, u'Feature',1,u'Identifier',None, u'Optional key of a parent record in the same table. If the parent is not selected, then the record will not be installed. Null indicates a root item.',),
-(u'Binary',u'Name',u'N',None, None, None, None, u'Identifier',None, u'Unique key identifying the binary data.',),
-(u'Binary',u'Data',u'N',None, None, None, None, u'Binary',None, u'The unformatted binary data.',),
-(u'BindImage',u'File_',u'N',None, None, u'File',1,u'Identifier',None, u'The index into the File table. This must be an executable file.',),
-(u'BindImage',u'Path',u'Y',None, None, None, None, u'Paths',None, u'A list of ; delimited paths that represent the paths to be searched for the import DLLS. The list is usually a list of properties each enclosed within square brackets [] .',),
-(u'File',u'Sequence',u'N',1,32767,None, None, None, None, u'Sequence with respect to the media images; order must track cabinet order.',),
-(u'File',u'Attributes',u'Y',0,32767,None, None, None, None, u'Integer containing bit flags representing file attributes (with the decimal value of each bit position in parentheses)',),
-(u'File',u'File',u'N',None, None, None, None, u'Identifier',None, u'Primary key, non-localized token, must match identifier in cabinet. For uncompressed files, this field is ignored.',),
-(u'File',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Foreign key referencing Component that controls the file.',),
-(u'File',u'FileName',u'N',None, None, None, None, u'Filename',None, u'File name used for installation, may be localized. This may contain a "short name|long name" pair.',),
-(u'File',u'FileSize',u'N',0,2147483647,None, None, None, None, u'Size of file in bytes (long integer).',),
-(u'File',u'Language',u'Y',None, None, None, None, u'Language',None, u'List of decimal language Ids, comma-separated if more than one.',),
-(u'File',u'Version',u'Y',None, None, u'File',1,u'Version',None, u'Version string for versioned files; Blank for unversioned files.',),
-(u'CCPSearch',u'Signature_',u'N',None, None, u'Signature;RegLocator;IniLocator;DrLocator;CompLocator',1,u'Identifier',None, u'The Signature_ represents a unique file signature and is also the foreign key in the Signature, RegLocator, IniLocator, CompLocator and the DrLocator tables.',),
-(u'CheckBox',u'Property',u'N',None, None, None, None, u'Identifier',None, u'A named property to be tied to the item.',),
-(u'CheckBox',u'Value',u'Y',None, None, None, None, u'Formatted',None, u'The value string associated with the item.',),
-(u'Class',u'Description',u'Y',None, None, None, None, u'Text',None, u'Localized description for the Class.',),
-(u'Class',u'Attributes',u'Y',None, 32767,None, None, None, None, u'Class registration attributes.',),
-(u'Class',u'Feature_',u'N',None, None, u'Feature',1,u'Identifier',None, u'Required foreign key into the Feature Table, specifying the feature to validate or install in order for the CLSID factory to be operational.',),
-(u'Class',u'AppId_',u'Y',None, None, u'AppId',1,u'Guid',None, u'Optional AppID containing DCOM information for associated application (string GUID).',),
-(u'Class',u'Argument',u'Y',None, None, None, None, u'Formatted',None, u'optional argument for LocalServers.',),
-(u'Class',u'CLSID',u'N',None, None, None, None, u'Guid',None, u'The CLSID of an OLE factory.',),
-(u'Class',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Required foreign key into the Component Table, specifying the component for which to return a path when called through LocateComponent.',),
-(u'Class',u'Context',u'N',None, None, None, None, u'Identifier',None, u'The numeric server context for this server. CLSCTX_xxxx',),
-(u'Class',u'DefInprocHandler',u'Y',None, None, None, None, u'Filename',u'1;2;3',u'Optional default inproc handler. Only optionally provided if Context=CLSCTX_LOCAL_SERVER. Typically "ole32.dll" or "mapi32.dll"',),
-(u'Class',u'FileTypeMask',u'Y',None, None, None, None, u'Text',None, u'Optional string containing information for the HKCRthis CLSID) key. If multiple patterns exist, they must be delimited by a semicolon, and numeric subkeys will be generated: 0,1,2...',),
-(u'Class',u'Icon_',u'Y',None, None, u'Icon',1,u'Identifier',None, u'Optional foreign key into the Icon Table, specifying the icon file associated with this CLSID. Will be written under the DefaultIcon key.',),
-(u'Class',u'IconIndex',u'Y',-32767,32767,None, None, None, None, u'Optional icon index.',),
-(u'Class',u'ProgId_Default',u'Y',None, None, u'ProgId',1,u'Text',None, u'Optional ProgId associated with this CLSID.',),
-(u'Component',u'Condition',u'Y',None, None, None, None, u'Condition',None, u"A conditional statement that will disable this component if the specified condition evaluates to the 'True' state. If a component is disabled, it will not be installed, regardless of the 'Action' state associated with the component.",),
-(u'Component',u'Attributes',u'N',None, None, None, None, None, None, u'Remote execution option, one of irsEnum',),
-(u'Component',u'Component',u'N',None, None, None, None, u'Identifier',None, u'Primary key used to identify a particular component record.',),
-(u'Component',u'ComponentId',u'Y',None, None, None, None, u'Guid',None, u'A string GUID unique to this component, version, and language.',),
-(u'Component',u'Directory_',u'N',None, None, u'Directory',1,u'Identifier',None, u'Required key of a Directory table record. This is actually a property name whose value contains the actual path, set either by the AppSearch action or with the default setting obtained from the Directory table.',),
-(u'Component',u'KeyPath',u'Y',None, None, u'File;Registry;ODBCDataSource',1,u'Identifier',None, u'Either the primary key into the File table, Registry table, or ODBCDataSource table. This extract path is stored when the component is installed, and is used to detect the presence of the component and to return the path to it.',),
-(u'Icon',u'Name',u'N',None, None, None, None, u'Identifier',None, u'Primary key. Name of the icon file.',),
-(u'Icon',u'Data',u'N',None, None, None, None, u'Binary',None, u'Binary stream. The binary icon data in PE (.DLL or .EXE) or icon (.ICO) format.',),
-(u'ProgId',u'Description',u'Y',None, None, None, None, u'Text',None, u'Localized description for the Program identifier.',),
-(u'ProgId',u'Icon_',u'Y',None, None, u'Icon',1,u'Identifier',None, u'Optional foreign key into the Icon Table, specifying the icon file associated with this ProgId. Will be written under the DefaultIcon key.',),
-(u'ProgId',u'IconIndex',u'Y',-32767,32767,None, None, None, None, u'Optional icon index.',),
-(u'ProgId',u'ProgId',u'N',None, None, None, None, u'Text',None, u'The Program Identifier. Primary key.',),
-(u'ProgId',u'Class_',u'Y',None, None, u'Class',1,u'Guid',None, u'The CLSID of an OLE factory corresponding to the ProgId.',),
-(u'ProgId',u'ProgId_Parent',u'Y',None, None, u'ProgId',1,u'Text',None, u'The Parent Program Identifier. If specified, the ProgId column becomes a version independent prog id.',),
-(u'ComboBox',u'Text',u'Y',None, None, None, None, u'Formatted',None, u'The visible text to be assigned to the item. Optional. If this entry or the entire column is missing, the text is the same as the value.',),
-(u'ComboBox',u'Property',u'N',None, None, None, None, u'Identifier',None, u'A named property to be tied to this item. All the items tied to the same property become part of the same combobox.',),
-(u'ComboBox',u'Value',u'N',None, None, None, None, u'Formatted',None, u'The value string associated with this item. Selecting the line will set the associated property to this value.',),
-(u'ComboBox',u'Order',u'N',1,32767,None, None, None, None, u'A positive integer used to determine the ordering of the items within one list.\tThe integers do not have to be consecutive.',),
-(u'CompLocator',u'Type',u'Y',0,1,None, None, None, None, u'A boolean value that determines if the registry value is a filename or a directory location.',),
-(u'CompLocator',u'Signature_',u'N',None, None, None, None, u'Identifier',None, u'The table key. The Signature_ represents a unique file signature and is also the foreign key in the Signature table.',),
-(u'CompLocator',u'ComponentId',u'N',None, None, None, None, u'Guid',None, u'A string GUID unique to this component, version, and language.',),
-(u'Complus',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Foreign key referencing Component that controls the ComPlus component.',),
-(u'Complus',u'ExpType',u'Y',0,32767,None, None, None, None, u'ComPlus component attributes.',),
-(u'Directory',u'Directory',u'N',None, None, None, None, u'Identifier',None, u'Unique identifier for directory entry, primary key. If a property by this name is defined, it contains the full path to the directory.',),
-(u'Directory',u'DefaultDir',u'N',None, None, None, None, u'DefaultDir',None, u"The default sub-path under parent's path.",),
-(u'Directory',u'Directory_Parent',u'Y',None, None, u'Directory',1,u'Identifier',None, u'Reference to the entry in this table specifying the default parent directory. A record parented to itself or with a Null parent represents a root of the install tree.',),
-(u'Control',u'Type',u'N',None, None, None, None, u'Identifier',None, u'The type of the control.',),
-(u'Control',u'Y',u'N',0,32767,None, None, None, None, u'Vertical coordinate of the upper left corner of the bounding rectangle of the control.',),
-(u'Control',u'Text',u'Y',None, None, None, None, u'Formatted',None, u'A string used to set the initial text contained within a control (if appropriate).',),
-(u'Control',u'Property',u'Y',None, None, None, None, u'Identifier',None, u'The name of a defined property to be linked to this control. ',),
-(u'Control',u'Attributes',u'Y',0,2147483647,None, None, None, None, u'A 32-bit word that specifies the attribute flags to be applied to this control.',),
-(u'Control',u'Height',u'N',0,32767,None, None, None, None, u'Height of the bounding rectangle of the control.',),
-(u'Control',u'Width',u'N',0,32767,None, None, None, None, u'Width of the bounding rectangle of the control.',),
-(u'Control',u'X',u'N',0,32767,None, None, None, None, u'Horizontal coordinate of the upper left corner of the bounding rectangle of the control.',),
-(u'Control',u'Control',u'N',None, None, None, None, u'Identifier',None, u'Name of the control. This name must be unique within a dialog, but can repeat on different dialogs. ',),
-(u'Control',u'Control_Next',u'Y',None, None, u'Control',2,u'Identifier',None, u'The name of an other control on the same dialog. This link defines the tab order of the controls. The links have to form one or more cycles!',),
-(u'Control',u'Dialog_',u'N',None, None, u'Dialog',1,u'Identifier',None, u'External key to the Dialog table, name of the dialog.',),
-(u'Control',u'Help',u'Y',None, None, None, None, u'Text',None, u'The help strings used with the button. The text is optional. ',),
-(u'Dialog',u'Attributes',u'Y',0,2147483647,None, None, None, None, u'A 32-bit word that specifies the attribute flags to be applied to this dialog.',),
-(u'Dialog',u'Height',u'N',0,32767,None, None, None, None, u'Height of the bounding rectangle of the dialog.',),
-(u'Dialog',u'Width',u'N',0,32767,None, None, None, None, u'Width of the bounding rectangle of the dialog.',),
-(u'Dialog',u'Dialog',u'N',None, None, None, None, u'Identifier',None, u'Name of the dialog.',),
-(u'Dialog',u'Control_Cancel',u'Y',None, None, u'Control',2,u'Identifier',None, u'Defines the cancel control. Hitting escape or clicking on the close icon on the dialog is equivalent to pushing this button.',),
-(u'Dialog',u'Control_Default',u'Y',None, None, u'Control',2,u'Identifier',None, u'Defines the default control. Hitting return is equivalent to pushing this button.',),
-(u'Dialog',u'Control_First',u'N',None, None, u'Control',2,u'Identifier',None, u'Defines the control that has the focus when the dialog is created.',),
-(u'Dialog',u'HCentering',u'N',0,100,None, None, None, None, u'Horizontal position of the dialog on a 0-100 scale. 0 means left end, 100 means right end of the screen, 50 center.',),
-(u'Dialog',u'Title',u'Y',None, None, None, None, u'Formatted',None, u"A text string specifying the title to be displayed in the title bar of the dialog's window.",),
-(u'Dialog',u'VCentering',u'N',0,100,None, None, None, None, u'Vertical position of the dialog on a 0-100 scale. 0 means top end, 100 means bottom end of the screen, 50 center.',),
-(u'ControlCondition',u'Action',u'N',None, None, None, None, None, u'Default;Disable;Enable;Hide;Show',u'The desired action to be taken on the specified control.',),
-(u'ControlCondition',u'Condition',u'N',None, None, None, None, u'Condition',None, u'A standard conditional statement that specifies under which conditions the action should be triggered.',),
-(u'ControlCondition',u'Dialog_',u'N',None, None, u'Dialog',1,u'Identifier',None, u'A foreign key to the Dialog table, name of the dialog.',),
-(u'ControlCondition',u'Control_',u'N',None, None, u'Control',2,u'Identifier',None, u'A foreign key to the Control table, name of the control.',),
-(u'ControlEvent',u'Condition',u'Y',None, None, None, None, u'Condition',None, u'A standard conditional statement that specifies under which conditions an event should be triggered.',),
-(u'ControlEvent',u'Ordering',u'Y',0,2147483647,None, None, None, None, u'An integer used to order several events tied to the same control. Can be left blank.',),
-(u'ControlEvent',u'Argument',u'N',None, None, None, None, u'Formatted',None, u'A value to be used as a modifier when triggering a particular event.',),
-(u'ControlEvent',u'Dialog_',u'N',None, None, u'Dialog',1,u'Identifier',None, u'A foreign key to the Dialog table, name of the dialog.',),
-(u'ControlEvent',u'Control_',u'N',None, None, u'Control',2,u'Identifier',None, u'A foreign key to the Control table, name of the control',),
-(u'ControlEvent',u'Event',u'N',None, None, None, None, u'Formatted',None, u'An identifier that specifies the type of the event that should take place when the user interacts with control specified by the first two entries.',),
-(u'CreateFolder',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Foreign key into the Component table.',),
-(u'CreateFolder',u'Directory_',u'N',None, None, u'Directory',1,u'Identifier',None, u'Primary key, could be foreign key into the Directory table.',),
-(u'CustomAction',u'Type',u'N',1,16383,None, None, None, None, u'The numeric custom action type, consisting of source location, code type, entry, option flags.',),
-(u'CustomAction',u'Action',u'N',None, None, None, None, u'Identifier',None, u'Primary key, name of action, normally appears in sequence table unless private use.',),
-(u'CustomAction',u'Source',u'Y',None, None, None, None, u'CustomSource',None, u'The table reference of the source of the code.',),
-(u'CustomAction',u'Target',u'Y',None, None, None, None, u'Formatted',None, u'Excecution parameter, depends on the type of custom action',),
-(u'DrLocator',u'Signature_',u'N',None, None, None, None, u'Identifier',None, u'The Signature_ represents a unique file signature and is also the foreign key in the Signature table.',),
-(u'DrLocator',u'Path',u'Y',None, None, None, None, u'AnyPath',None, u'The path on the user system. This is a either a subpath below the value of the Parent or a full path. The path may contain properties enclosed within [ ] that will be expanded.',),
-(u'DrLocator',u'Depth',u'Y',0,32767,None, None, None, None, u'The depth below the path to which the Signature_ is recursively searched. If absent, the depth is assumed to be 0.',),
-(u'DrLocator',u'Parent',u'Y',None, None, None, None, u'Identifier',None, u'The parent file signature. It is also a foreign key in the Signature table. If null and the Path column does not expand to a full path, then all the fixed drives of the user system are searched using the Path.',),
-(u'DuplicateFile',u'File_',u'N',None, None, u'File',1,u'Identifier',None, u'Foreign key referencing the source file to be duplicated.',),
-(u'DuplicateFile',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Foreign key referencing Component that controls the duplicate file.',),
-(u'DuplicateFile',u'DestFolder',u'Y',None, None, None, None, u'Identifier',None, u'Name of a property whose value is assumed to resolve to the full pathname to a destination folder.',),
-(u'DuplicateFile',u'DestName',u'Y',None, None, None, None, u'Filename',None, u'Filename to be given to the duplicate file.',),
-(u'DuplicateFile',u'FileKey',u'N',None, None, None, None, u'Identifier',None, u'Primary key used to identify a particular file entry',),
-(u'Environment',u'Name',u'N',None, None, None, None, u'Text',None, u'The name of the environmental value.',),
-(u'Environment',u'Value',u'Y',None, None, None, None, u'Formatted',None, u'The value to set in the environmental settings.',),
-(u'Environment',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Foreign key into the Component table referencing component that controls the installing of the environmental value.',),
-(u'Environment',u'Environment',u'N',None, None, None, None, u'Identifier',None, u'Unique identifier for the environmental variable setting',),
-(u'Error',u'Error',u'N',0,32767,None, None, None, None, u'Integer error number, obtained from header file IError(...) macros.',),
-(u'Error',u'Message',u'Y',None, None, None, None, u'Template',None, u'Error formatting template, obtained from user ed. or localizers.',),
-(u'EventMapping',u'Dialog_',u'N',None, None, u'Dialog',1,u'Identifier',None, u'A foreign key to the Dialog table, name of the Dialog.',),
-(u'EventMapping',u'Control_',u'N',None, None, u'Control',2,u'Identifier',None, u'A foreign key to the Control table, name of the control.',),
-(u'EventMapping',u'Event',u'N',None, None, None, None, u'Identifier',None, u'An identifier that specifies the type of the event that the control subscribes to.',),
-(u'EventMapping',u'Attribute',u'N',None, None, None, None, u'Identifier',None, u'The name of the control attribute, that is set when this event is received.',),
-(u'Extension',u'Feature_',u'N',None, None, u'Feature',1,u'Identifier',None, u'Required foreign key into the Feature Table, specifying the feature to validate or install in order for the CLSID factory to be operational.',),
-(u'Extension',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Required foreign key into the Component Table, specifying the component for which to return a path when called through LocateComponent.',),
-(u'Extension',u'Extension',u'N',None, None, None, None, u'Text',None, u'The extension associated with the table row.',),
-(u'Extension',u'MIME_',u'Y',None, None, u'MIME',1,u'Text',None, u'Optional Context identifier, typically "type/format" associated with the extension',),
-(u'Extension',u'ProgId_',u'Y',None, None, u'ProgId',1,u'Text',None, u'Optional ProgId associated with this extension.',),
-(u'MIME',u'CLSID',u'Y',None, None, None, None, u'Guid',None, u'Optional associated CLSID.',),
-(u'MIME',u'ContentType',u'N',None, None, None, None, u'Text',None, u'Primary key. Context identifier, typically "type/format".',),
-(u'MIME',u'Extension_',u'N',None, None, u'Extension',1,u'Text',None, u'Optional associated extension (without dot)',),
-(u'FeatureComponents',u'Feature_',u'N',None, None, u'Feature',1,u'Identifier',None, u'Foreign key into Feature table.',),
-(u'FeatureComponents',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Foreign key into Component table.',),
-(u'FileSFPCatalog',u'File_',u'N',None, None, u'File',1,u'Identifier',None, u'File associated with the catalog',),
-(u'FileSFPCatalog',u'SFPCatalog_',u'N',None, None, u'SFPCatalog',1,u'Filename',None, u'Catalog associated with the file',),
-(u'SFPCatalog',u'SFPCatalog',u'N',None, None, None, None, u'Filename',None, u'File name for the catalog.',),
-(u'SFPCatalog',u'Catalog',u'N',None, None, None, None, u'Binary',None, u'SFP Catalog',),
-(u'SFPCatalog',u'Dependency',u'Y',None, None, None, None, u'Formatted',None, u'Parent catalog - only used by SFP',),
-(u'Font',u'File_',u'N',None, None, u'File',1,u'Identifier',None, u'Primary key, foreign key into File table referencing font file.',),
-(u'Font',u'FontTitle',u'Y',None, None, None, None, u'Text',None, u'Font name.',),
-(u'IniFile',u'Action',u'N',None, None, None, None, None, u'0;1;3',u'The type of modification to be made, one of iifEnum',),
-(u'IniFile',u'Value',u'N',None, None, None, None, u'Formatted',None, u'The value to be written.',),
-(u'IniFile',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Foreign key into the Component table referencing component that controls the installing of the .INI value.',),
-(u'IniFile',u'FileName',u'N',None, None, None, None, u'Filename',None, u'The .INI file name in which to write the information',),
-(u'IniFile',u'IniFile',u'N',None, None, None, None, u'Identifier',None, u'Primary key, non-localized token.',),
-(u'IniFile',u'DirProperty',u'Y',None, None, None, None, u'Identifier',None, u'Foreign key into the Directory table denoting the directory where the .INI file is.',),
-(u'IniFile',u'Key',u'N',None, None, None, None, u'Formatted',None, u'The .INI file key below Section.',),
-(u'IniFile',u'Section',u'N',None, None, None, None, u'Formatted',None, u'The .INI file Section.',),
-(u'IniLocator',u'Type',u'Y',0,2,None, None, None, None, u'An integer value that determines if the .INI value read is a filename or a directory location or to be used as is w/o interpretation.',),
-(u'IniLocator',u'Signature_',u'N',None, None, None, None, u'Identifier',None, u'The table key. The Signature_ represents a unique file signature and is also the foreign key in the Signature table.',),
-(u'IniLocator',u'FileName',u'N',None, None, None, None, u'Filename',None, u'The .INI file name.',),
-(u'IniLocator',u'Key',u'N',None, None, None, None, u'Text',None, u'Key value (followed by an equals sign in INI file).',),
-(u'IniLocator',u'Section',u'N',None, None, None, None, u'Text',None, u'Section name within in file (within square brackets in INI file).',),
-(u'IniLocator',u'Field',u'Y',0,32767,None, None, None, None, u'The field in the .INI line. If Field is null or 0 the entire line is read.',),
-(u'InstallExecuteSequence',u'Action',u'N',None, None, None, None, u'Identifier',None, u'Name of action to invoke, either in the engine or the handler DLL.',),
-(u'InstallExecuteSequence',u'Condition',u'Y',None, None, None, None, u'Condition',None, u'Optional expression which skips the action if evaluates to expFalse.If the expression syntax is invalid, the engine will terminate, returning iesBadActionData.',),
-(u'InstallExecuteSequence',u'Sequence',u'Y',-4,32767,None, None, None, None, u'Number that determines the sort order in which the actions are to be executed. Leave blank to suppress action.',),
-(u'InstallUISequence',u'Action',u'N',None, None, None, None, u'Identifier',None, u'Name of action to invoke, either in the engine or the handler DLL.',),
-(u'InstallUISequence',u'Condition',u'Y',None, None, None, None, u'Condition',None, u'Optional expression which skips the action if evaluates to expFalse.If the expression syntax is invalid, the engine will terminate, returning iesBadActionData.',),
-(u'InstallUISequence',u'Sequence',u'Y',-4,32767,None, None, None, None, u'Number that determines the sort order in which the actions are to be executed. Leave blank to suppress action.',),
-(u'IsolatedComponent',u'Component_Application',u'N',None, None, u'Component',1,u'Identifier',None, u'Key to Component table item for application',),
-(u'IsolatedComponent',u'Component_Shared',u'N',None, None, u'Component',1,u'Identifier',None, u'Key to Component table item to be isolated',),
-(u'LaunchCondition',u'Description',u'N',None, None, None, None, u'Formatted',None, u'Localizable text to display when condition fails and install must abort.',),
-(u'LaunchCondition',u'Condition',u'N',None, None, None, None, u'Condition',None, u'Expression which must evaluate to TRUE in order for install to commence.',),
-(u'ListBox',u'Text',u'Y',None, None, None, None, u'Text',None, u'The visible text to be assigned to the item. Optional. If this entry or the entire column is missing, the text is the same as the value.',),
-(u'ListBox',u'Property',u'N',None, None, None, None, u'Identifier',None, u'A named property to be tied to this item. All the items tied to the same property become part of the same listbox.',),
-(u'ListBox',u'Value',u'N',None, None, None, None, u'Formatted',None, u'The value string associated with this item. Selecting the line will set the associated property to this value.',),
-(u'ListBox',u'Order',u'N',1,32767,None, None, None, None, u'A positive integer used to determine the ordering of the items within one list..The integers do not have to be consecutive.',),
-(u'ListView',u'Text',u'Y',None, None, None, None, u'Text',None, u'The visible text to be assigned to the item. Optional. If this entry or the entire column is missing, the text is the same as the value.',),
-(u'ListView',u'Property',u'N',None, None, None, None, u'Identifier',None, u'A named property to be tied to this item. All the items tied to the same property become part of the same listview.',),
-(u'ListView',u'Value',u'N',None, None, None, None, u'Identifier',None, u'The value string associated with this item. Selecting the line will set the associated property to this value.',),
-(u'ListView',u'Order',u'N',1,32767,None, None, None, None, u'A positive integer used to determine the ordering of the items within one list..The integers do not have to be consecutive.',),
-(u'ListView',u'Binary_',u'Y',None, None, u'Binary',1,u'Identifier',None, u'The name of the icon to be displayed with the icon. The binary information is looked up from the Binary Table.',),
-(u'LockPermissions',u'Table',u'N',None, None, None, None, u'Identifier',u'Directory;File;Registry',u'Reference to another table name',),
-(u'LockPermissions',u'Domain',u'Y',None, None, None, None, u'Formatted',None, u'Domain name for user whose permissions are being set. (usually a property)',),
-(u'LockPermissions',u'LockObject',u'N',None, None, None, None, u'Identifier',None, u'Foreign key into Registry or File table',),
-(u'LockPermissions',u'Permission',u'Y',-2147483647,2147483647,None, None, None, None, u'Permission Access mask. Full Control = 268435456 (GENERIC_ALL = 0x10000000)',),
-(u'LockPermissions',u'User',u'N',None, None, None, None, u'Formatted',None, u'User for permissions to be set. (usually a property)',),
-(u'Media',u'Source',u'Y',None, None, None, None, u'Property',None, u'The property defining the location of the cabinet file.',),
-(u'Media',u'Cabinet',u'Y',None, None, None, None, u'Cabinet',None, u'If some or all of the files stored on the media are compressed in a cabinet, the name of that cabinet.',),
-(u'Media',u'DiskId',u'N',1,32767,None, None, None, None, u'Primary key, integer to determine sort order for table.',),
-(u'Media',u'DiskPrompt',u'Y',None, None, None, None, u'Text',None, u'Disk name: the visible text actually printed on the disk. This will be used to prompt the user when this disk needs to be inserted.',),
-(u'Media',u'LastSequence',u'N',0,32767,None, None, None, None, u'File sequence number for the last file for this media.',),
-(u'Media',u'VolumeLabel',u'Y',None, None, None, None, u'Text',None, u'The label attributed to the volume.',),
-(u'ModuleComponents',u'Component',u'N',None, None, u'Component',1,u'Identifier',None, u'Component contained in the module.',),
-(u'ModuleComponents',u'Language',u'N',None, None, u'ModuleSignature',2,None, None, u'Default language ID for module (may be changed by transform).',),
-(u'ModuleComponents',u'ModuleID',u'N',None, None, u'ModuleSignature',1,u'Identifier',None, u'Module containing the component.',),
-(u'ModuleSignature',u'Language',u'N',None, None, None, None, None, None, u'Default decimal language of module.',),
-(u'ModuleSignature',u'Version',u'N',None, None, None, None, u'Version',None, u'Version of the module.',),
-(u'ModuleSignature',u'ModuleID',u'N',None, None, None, None, u'Identifier',None, u'Module identifier (String.GUID).',),
-(u'ModuleDependency',u'ModuleID',u'N',None, None, u'ModuleSignature',1,u'Identifier',None, u'Module requiring the dependency.',),
-(u'ModuleDependency',u'ModuleLanguage',u'N',None, None, u'ModuleSignature',2,None, None, u'Language of module requiring the dependency.',),
-(u'ModuleDependency',u'RequiredID',u'N',None, None, None, None, None, None, u'String.GUID of required module.',),
-(u'ModuleDependency',u'RequiredLanguage',u'N',None, None, None, None, None, None, u'LanguageID of the required module.',),
-(u'ModuleDependency',u'RequiredVersion',u'Y',None, None, None, None, u'Version',None, u'Version of the required version.',),
-(u'ModuleExclusion',u'ModuleID',u'N',None, None, u'ModuleSignature',1,u'Identifier',None, u'String.GUID of module with exclusion requirement.',),
-(u'ModuleExclusion',u'ModuleLanguage',u'N',None, None, u'ModuleSignature',2,None, None, u'LanguageID of module with exclusion requirement.',),
-(u'ModuleExclusion',u'ExcludedID',u'N',None, None, None, None, None, None, u'String.GUID of excluded module.',),
-(u'ModuleExclusion',u'ExcludedLanguage',u'N',None, None, None, None, None, None, u'Language of excluded module.',),
-(u'ModuleExclusion',u'ExcludedMaxVersion',u'Y',None, None, None, None, u'Version',None, u'Maximum version of excluded module.',),
-(u'ModuleExclusion',u'ExcludedMinVersion',u'Y',None, None, None, None, u'Version',None, u'Minimum version of excluded module.',),
-(u'MoveFile',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'If this component is not "selected" for installation or removal, no action will be taken on the associated MoveFile entry',),
-(u'MoveFile',u'DestFolder',u'N',None, None, None, None, u'Identifier',None, u'Name of a property whose value is assumed to resolve to the full path to the destination directory',),
-(u'MoveFile',u'DestName',u'Y',None, None, None, None, u'Filename',None, u'Name to be given to the original file after it is moved or copied. If blank, the destination file will be given the same name as the source file',),
-(u'MoveFile',u'FileKey',u'N',None, None, None, None, u'Identifier',None, u'Primary key that uniquely identifies a particular MoveFile record',),
-(u'MoveFile',u'Options',u'N',0,1,None, None, None, None, u'Integer value specifying the MoveFile operating mode, one of imfoEnum',),
-(u'MoveFile',u'SourceFolder',u'Y',None, None, None, None, u'Identifier',None, u'Name of a property whose value is assumed to resolve to the full path to the source directory',),
-(u'MoveFile',u'SourceName',u'Y',None, None, None, None, u'Text',None, u"Name of the source file(s) to be moved or copied. Can contain the '*' or '?' wildcards.",),
-(u'MsiAssembly',u'Attributes',u'Y',None, None, None, None, None, None, u'Assembly attributes',),
-(u'MsiAssembly',u'Feature_',u'N',None, None, u'Feature',1,u'Identifier',None, u'Foreign key into Feature table.',),
-(u'MsiAssembly',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Foreign key into Component table.',),
-(u'MsiAssembly',u'File_Application',u'Y',None, None, u'File',1,u'Identifier',None, u'Foreign key into File table, denoting the application context for private assemblies. Null for global assemblies.',),
-(u'MsiAssembly',u'File_Manifest',u'Y',None, None, u'File',1,u'Identifier',None, u'Foreign key into the File table denoting the manifest file for the assembly.',),
-(u'MsiAssemblyName',u'Name',u'N',None, None, None, None, u'Text',None, u'The name part of the name-value pairs for the assembly name.',),
-(u'MsiAssemblyName',u'Value',u'N',None, None, None, None, u'Text',None, u'The value part of the name-value pairs for the assembly name.',),
-(u'MsiAssemblyName',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Foreign key into Component table.',),
-(u'MsiDigitalCertificate',u'CertData',u'N',None, None, None, None, u'Binary',None, u'A certificate context blob for a signer certificate',),
-(u'MsiDigitalCertificate',u'DigitalCertificate',u'N',None, None, None, None, u'Identifier',None, u'A unique identifier for the row',),
-(u'MsiDigitalSignature',u'Table',u'N',None, None, None, None, None, u'Media',u'Reference to another table name (only Media table is supported)',),
-(u'MsiDigitalSignature',u'DigitalCertificate_',u'N',None, None, u'MsiDigitalCertificate',1,u'Identifier',None, u'Foreign key to MsiDigitalCertificate table identifying the signer certificate',),
-(u'MsiDigitalSignature',u'Hash',u'Y',None, None, None, None, u'Binary',None, u'The encoded hash blob from the digital signature',),
-(u'MsiDigitalSignature',u'SignObject',u'N',None, None, None, None, u'Text',None, u'Foreign key to Media table',),
-(u'MsiFileHash',u'File_',u'N',None, None, u'File',1,u'Identifier',None, u'Primary key, foreign key into File table referencing file with this hash',),
-(u'MsiFileHash',u'Options',u'N',0,32767,None, None, None, None, u'Various options and attributes for this hash.',),
-(u'MsiFileHash',u'HashPart1',u'N',None, None, None, None, None, None, u'Size of file in bytes (long integer).',),
-(u'MsiFileHash',u'HashPart2',u'N',None, None, None, None, None, None, u'Size of file in bytes (long integer).',),
-(u'MsiFileHash',u'HashPart3',u'N',None, None, None, None, None, None, u'Size of file in bytes (long integer).',),
-(u'MsiFileHash',u'HashPart4',u'N',None, None, None, None, None, None, u'Size of file in bytes (long integer).',),
-(u'MsiPatchHeaders',u'StreamRef',u'N',None, None, None, None, u'Identifier',None, u'Primary key. A unique identifier for the row.',),
-(u'MsiPatchHeaders',u'Header',u'N',None, None, None, None, u'Binary',None, u'Binary stream. The patch header, used for patch validation.',),
-(u'ODBCAttribute',u'Value',u'Y',None, None, None, None, u'Text',None, u'Value for ODBC driver attribute',),
-(u'ODBCAttribute',u'Attribute',u'N',None, None, None, None, u'Text',None, u'Name of ODBC driver attribute',),
-(u'ODBCAttribute',u'Driver_',u'N',None, None, u'ODBCDriver',1,u'Identifier',None, u'Reference to ODBC driver in ODBCDriver table',),
-(u'ODBCDriver',u'Description',u'N',None, None, None, None, u'Text',None, u'Text used as registered name for driver, non-localized',),
-(u'ODBCDriver',u'File_',u'N',None, None, u'File',1,u'Identifier',None, u'Reference to key driver file',),
-(u'ODBCDriver',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Reference to associated component',),
-(u'ODBCDriver',u'Driver',u'N',None, None, None, None, u'Identifier',None, u'Primary key, non-localized.internal token for driver',),
-(u'ODBCDriver',u'File_Setup',u'Y',None, None, u'File',1,u'Identifier',None, u'Optional reference to key driver setup DLL',),
-(u'ODBCDataSource',u'Description',u'N',None, None, None, None, u'Text',None, u'Text used as registered name for data source',),
-(u'ODBCDataSource',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Reference to associated component',),
-(u'ODBCDataSource',u'DataSource',u'N',None, None, None, None, u'Identifier',None, u'Primary key, non-localized.internal token for data source',),
-(u'ODBCDataSource',u'DriverDescription',u'N',None, None, None, None, u'Text',None, u'Reference to driver description, may be existing driver',),
-(u'ODBCDataSource',u'Registration',u'N',0,1,None, None, None, None, u'Registration option: 0=machine, 1=user, others t.b.d.',),
-(u'ODBCSourceAttribute',u'Value',u'Y',None, None, None, None, u'Text',None, u'Value for ODBC data source attribute',),
-(u'ODBCSourceAttribute',u'Attribute',u'N',None, None, None, None, u'Text',None, u'Name of ODBC data source attribute',),
-(u'ODBCSourceAttribute',u'DataSource_',u'N',None, None, u'ODBCDataSource',1,u'Identifier',None, u'Reference to ODBC data source in ODBCDataSource table',),
-(u'ODBCTranslator',u'Description',u'N',None, None, None, None, u'Text',None, u'Text used as registered name for translator',),
-(u'ODBCTranslator',u'File_',u'N',None, None, u'File',1,u'Identifier',None, u'Reference to key translator file',),
-(u'ODBCTranslator',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Reference to associated component',),
-(u'ODBCTranslator',u'File_Setup',u'Y',None, None, u'File',1,u'Identifier',None, u'Optional reference to key translator setup DLL',),
-(u'ODBCTranslator',u'Translator',u'N',None, None, None, None, u'Identifier',None, u'Primary key, non-localized.internal token for translator',),
-(u'Patch',u'Sequence',u'N',0,32767,None, None, None, None, u'Primary key, sequence with respect to the media images; order must track cabinet order.',),
-(u'Patch',u'Attributes',u'N',0,32767,None, None, None, None, u'Integer containing bit flags representing patch attributes',),
-(u'Patch',u'File_',u'N',None, None, None, None, u'Identifier',None, u'Primary key, non-localized token, foreign key to File table, must match identifier in cabinet.',),
-(u'Patch',u'Header',u'Y',None, None, None, None, u'Binary',None, u'Binary stream. The patch header, used for patch validation.',),
-(u'Patch',u'PatchSize',u'N',0,2147483647,None, None, None, None, u'Size of patch in bytes (long integer).',),
-(u'Patch',u'StreamRef_',u'Y',None, None, None, None, u'Identifier',None, u'Identifier. Foreign key to the StreamRef column of the MsiPatchHeaders table.',),
-(u'PatchPackage',u'Media_',u'N',0,32767,None, None, None, None, u'Foreign key to DiskId column of Media table. Indicates the disk containing the patch package.',),
-(u'PatchPackage',u'PatchId',u'N',None, None, None, None, u'Guid',None, u'A unique string GUID representing this patch.',),
-(u'PublishComponent',u'Feature_',u'N',None, None, u'Feature',1,u'Identifier',None, u'Foreign key into the Feature table.',),
-(u'PublishComponent',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Foreign key into the Component table.',),
-(u'PublishComponent',u'ComponentId',u'N',None, None, None, None, u'Guid',None, u'A string GUID that represents the component id that will be requested by the alien product.',),
-(u'PublishComponent',u'AppData',u'Y',None, None, None, None, u'Text',None, u'This is localisable Application specific data that can be associated with a Qualified Component.',),
-(u'PublishComponent',u'Qualifier',u'N',None, None, None, None, u'Text',None, u'This is defined only when the ComponentId column is an Qualified Component Id. This is the Qualifier for ProvideComponentIndirect.',),
-(u'RadioButton',u'Y',u'N',0,32767,None, None, None, None, u'The vertical coordinate of the upper left corner of the bounding rectangle of the radio button.',),
-(u'RadioButton',u'Text',u'Y',None, None, None, None, u'Text',None, u'The visible title to be assigned to the radio button.',),
-(u'RadioButton',u'Property',u'N',None, None, None, None, u'Identifier',None, u'A named property to be tied to this radio button. All the buttons tied to the same property become part of the same group.',),
-(u'RadioButton',u'Height',u'N',0,32767,None, None, None, None, u'The height of the button.',),
-(u'RadioButton',u'Width',u'N',0,32767,None, None, None, None, u'The width of the button.',),
-(u'RadioButton',u'X',u'N',0,32767,None, None, None, None, u'The horizontal coordinate of the upper left corner of the bounding rectangle of the radio button.',),
-(u'RadioButton',u'Value',u'N',None, None, None, None, u'Formatted',None, u'The value string associated with this button. Selecting the button will set the associated property to this value.',),
-(u'RadioButton',u'Order',u'N',1,32767,None, None, None, None, u'A positive integer used to determine the ordering of the items within one list..The integers do not have to be consecutive.',),
-(u'RadioButton',u'Help',u'Y',None, None, None, None, u'Text',None, u'The help strings used with the button. The text is optional.',),
-(u'Registry',u'Name',u'Y',None, None, None, None, u'Formatted',None, u'The registry value name.',),
-(u'Registry',u'Value',u'Y',None, None, None, None, u'Formatted',None, u'The registry value.',),
-(u'Registry',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Foreign key into the Component table referencing component that controls the installing of the registry value.',),
-(u'Registry',u'Key',u'N',None, None, None, None, u'RegPath',None, u'The key for the registry value.',),
-(u'Registry',u'Registry',u'N',None, None, None, None, u'Identifier',None, u'Primary key, non-localized token.',),
-(u'Registry',u'Root',u'N',-1,3,None, None, None, None, u'The predefined root key for the registry value, one of rrkEnum.',),
-(u'RegLocator',u'Name',u'Y',None, None, None, None, u'Formatted',None, u'The registry value name.',),
-(u'RegLocator',u'Type',u'Y',0,18,None, None, None, None, u'An integer value that determines if the registry value is a filename or a directory location or to be used as is w/o interpretation.',),
-(u'RegLocator',u'Signature_',u'N',None, None, None, None, u'Identifier',None, u'The table key. The Signature_ represents a unique file signature and is also the foreign key in the Signature table. If the type is 0, the registry values refers a directory, and _Signature is not a foreign key.',),
-(u'RegLocator',u'Key',u'N',None, None, None, None, u'RegPath',None, u'The key for the registry value.',),
-(u'RegLocator',u'Root',u'N',0,3,None, None, None, None, u'The predefined root key for the registry value, one of rrkEnum.',),
-(u'RemoveFile',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Foreign key referencing Component that controls the file to be removed.',),
-(u'RemoveFile',u'FileKey',u'N',None, None, None, None, u'Identifier',None, u'Primary key used to identify a particular file entry',),
-(u'RemoveFile',u'FileName',u'Y',None, None, None, None, u'WildCardFilename',None, u'Name of the file to be removed.',),
-(u'RemoveFile',u'DirProperty',u'N',None, None, None, None, u'Identifier',None, u'Name of a property whose value is assumed to resolve to the full pathname to the folder of the file to be removed.',),
-(u'RemoveFile',u'InstallMode',u'N',None, None, None, None, None, u'1;2;3',u'Installation option, one of iimEnum.',),
-(u'RemoveIniFile',u'Action',u'N',None, None, None, None, None, u'2;4',u'The type of modification to be made, one of iifEnum.',),
-(u'RemoveIniFile',u'Value',u'Y',None, None, None, None, u'Formatted',None, u'The value to be deleted. The value is required when Action is iifIniRemoveTag',),
-(u'RemoveIniFile',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Foreign key into the Component table referencing component that controls the deletion of the .INI value.',),
-(u'RemoveIniFile',u'FileName',u'N',None, None, None, None, u'Filename',None, u'The .INI file name in which to delete the information',),
-(u'RemoveIniFile',u'DirProperty',u'Y',None, None, None, None, u'Identifier',None, u'Foreign key into the Directory table denoting the directory where the .INI file is.',),
-(u'RemoveIniFile',u'Key',u'N',None, None, None, None, u'Formatted',None, u'The .INI file key below Section.',),
-(u'RemoveIniFile',u'Section',u'N',None, None, None, None, u'Formatted',None, u'The .INI file Section.',),
-(u'RemoveIniFile',u'RemoveIniFile',u'N',None, None, None, None, u'Identifier',None, u'Primary key, non-localized token.',),
-(u'RemoveRegistry',u'Name',u'Y',None, None, None, None, u'Formatted',None, u'The registry value name.',),
-(u'RemoveRegistry',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Foreign key into the Component table referencing component that controls the deletion of the registry value.',),
-(u'RemoveRegistry',u'Key',u'N',None, None, None, None, u'RegPath',None, u'The key for the registry value.',),
-(u'RemoveRegistry',u'Root',u'N',-1,3,None, None, None, None, u'The predefined root key for the registry value, one of rrkEnum',),
-(u'RemoveRegistry',u'RemoveRegistry',u'N',None, None, None, None, u'Identifier',None, u'Primary key, non-localized token.',),
-(u'ReserveCost',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Reserve a specified amount of space if this component is to be installed.',),
-(u'ReserveCost',u'ReserveFolder',u'Y',None, None, None, None, u'Identifier',None, u'Name of a property whose value is assumed to resolve to the full path to the destination directory',),
-(u'ReserveCost',u'ReserveKey',u'N',None, None, None, None, u'Identifier',None, u'Primary key that uniquely identifies a particular ReserveCost record',),
-(u'ReserveCost',u'ReserveLocal',u'N',0,2147483647,None, None, None, None, u'Disk space to reserve if linked component is installed locally.',),
-(u'ReserveCost',u'ReserveSource',u'N',0,2147483647,None, None, None, None, u'Disk space to reserve if linked component is installed to run from the source location.',),
-(u'SelfReg',u'File_',u'N',None, None, u'File',1,u'Identifier',None, u'Foreign key into the File table denoting the module that needs to be registered.',),
-(u'SelfReg',u'Cost',u'Y',0,32767,None, None, None, None, u'The cost of registering the module.',),
-(u'ServiceControl',u'Name',u'N',None, None, None, None, u'Formatted',None, u'Name of a service. /, \\, comma and space are invalid',),
-(u'ServiceControl',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Required foreign key into the Component Table that controls the startup of the service',),
-(u'ServiceControl',u'Event',u'N',0,187,None, None, None, None, u'Bit field: Install: 0x1 = Start, 0x2 = Stop, 0x8 = Delete, Uninstall: 0x10 = Start, 0x20 = Stop, 0x80 = Delete',),
-(u'ServiceControl',u'ServiceControl',u'N',None, None, None, None, u'Identifier',None, u'Primary key, non-localized token.',),
-(u'ServiceControl',u'Arguments',u'Y',None, None, None, None, u'Formatted',None, u'Arguments for the service. Separate by [~].',),
-(u'ServiceControl',u'Wait',u'Y',0,1,None, None, None, None, u'Boolean for whether to wait for the service to fully start',),
-(u'ServiceInstall',u'Name',u'N',None, None, None, None, u'Formatted',None, u'Internal Name of the Service',),
-(u'ServiceInstall',u'Description',u'Y',None, None, None, None, u'Text',None, u'Description of service.',),
-(u'ServiceInstall',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Required foreign key into the Component Table that controls the startup of the service',),
-(u'ServiceInstall',u'Arguments',u'Y',None, None, None, None, u'Formatted',None, u'Arguments to include in every start of the service, passed to WinMain',),
-(u'ServiceInstall',u'ServiceInstall',u'N',None, None, None, None, u'Identifier',None, u'Primary key, non-localized token.',),
-(u'ServiceInstall',u'Dependencies',u'Y',None, None, None, None, u'Formatted',None, u'Other services this depends on to start. Separate by [~], and end with [~][~]',),
-(u'ServiceInstall',u'DisplayName',u'Y',None, None, None, None, u'Formatted',None, u'External Name of the Service',),
-(u'ServiceInstall',u'ErrorControl',u'N',-2147483647,2147483647,None, None, None, None, u'Severity of error if service fails to start',),
-(u'ServiceInstall',u'LoadOrderGroup',u'Y',None, None, None, None, u'Formatted',None, u'LoadOrderGroup',),
-(u'ServiceInstall',u'Password',u'Y',None, None, None, None, u'Formatted',None, u'password to run service with. (with StartName)',),
-(u'ServiceInstall',u'ServiceType',u'N',-2147483647,2147483647,None, None, None, None, u'Type of the service',),
-(u'ServiceInstall',u'StartName',u'Y',None, None, None, None, u'Formatted',None, u'User or object name to run service as',),
-(u'ServiceInstall',u'StartType',u'N',0,4,None, None, None, None, u'Type of the service',),
-(u'Shortcut',u'Name',u'N',None, None, None, None, u'Filename',None, u'The name of the shortcut to be created.',),
-(u'Shortcut',u'Description',u'Y',None, None, None, None, u'Text',None, u'The description for the shortcut.',),
-(u'Shortcut',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Foreign key into the Component table denoting the component whose selection gates the shortcut creation/deletion.',),
-(u'Shortcut',u'Icon_',u'Y',None, None, u'Icon',1,u'Identifier',None, u'Foreign key into the File table denoting the external icon file for the shortcut.',),
-(u'Shortcut',u'IconIndex',u'Y',-32767,32767,None, None, None, None, u'The icon index for the shortcut.',),
-(u'Shortcut',u'Directory_',u'N',None, None, u'Directory',1,u'Identifier',None, u'Foreign key into the Directory table denoting the directory where the shortcut file is created.',),
-(u'Shortcut',u'Target',u'N',None, None, None, None, u'Shortcut',None, u'The shortcut target. This is usually a property that is expanded to a file or a folder that the shortcut points to.',),
-(u'Shortcut',u'Arguments',u'Y',None, None, None, None, u'Formatted',None, u'The command-line arguments for the shortcut.',),
-(u'Shortcut',u'Shortcut',u'N',None, None, None, None, u'Identifier',None, u'Primary key, non-localized token.',),
-(u'Shortcut',u'Hotkey',u'Y',0,32767,None, None, None, None, u'The hotkey for the shortcut. It has the virtual-key code for the key in the low-order byte, and the modifier flags in the high-order byte. ',),
-(u'Shortcut',u'ShowCmd',u'Y',None, None, None, None, None, u'1;3;7',u'The show command for the application window.The following values may be used.',),
-(u'Shortcut',u'WkDir',u'Y',None, None, None, None, u'Identifier',None, u'Name of property defining location of working directory.',),
-(u'Signature',u'FileName',u'N',None, None, None, None, u'Filename',None, u'The name of the file. This may contain a "short name|long name" pair.',),
-(u'Signature',u'Signature',u'N',None, None, None, None, u'Identifier',None, u'The table key. The Signature represents a unique file signature.',),
-(u'Signature',u'Languages',u'Y',None, None, None, None, u'Language',None, u'The languages supported by the file.',),
-(u'Signature',u'MaxDate',u'Y',0,2147483647,None, None, None, None, u'The maximum creation date of the file.',),
-(u'Signature',u'MaxSize',u'Y',0,2147483647,None, None, None, None, u'The maximum size of the file. ',),
-(u'Signature',u'MaxVersion',u'Y',None, None, None, None, u'Text',None, u'The maximum version of the file.',),
-(u'Signature',u'MinDate',u'Y',0,2147483647,None, None, None, None, u'The minimum creation date of the file.',),
-(u'Signature',u'MinSize',u'Y',0,2147483647,None, None, None, None, u'The minimum size of the file.',),
-(u'Signature',u'MinVersion',u'Y',None, None, None, None, u'Text',None, u'The minimum version of the file.',),
-(u'TextStyle',u'TextStyle',u'N',None, None, None, None, u'Identifier',None, u'Name of the style. The primary key of this table. This name is embedded in the texts to indicate a style change.',),
-(u'TextStyle',u'Color',u'Y',0,16777215,None, None, None, None, u'A long integer indicating the color of the string in the RGB format (Red, Green, Blue each 0-255, RGB = R + 256*G + 256^2*B).',),
-(u'TextStyle',u'FaceName',u'N',None, None, None, None, u'Text',None, u'A string indicating the name of the font used. Required. The string must be at most 31 characters long.',),
-(u'TextStyle',u'Size',u'N',0,32767,None, None, None, None, u'The size of the font used. This size is given in our units (1/12 of the system font height). Assuming that the system font is set to 12 point size, this is equivalent to the point size.',),
-(u'TextStyle',u'StyleBits',u'Y',0,15,None, None, None, None, u'A combination of style bits.',),
-(u'TypeLib',u'Description',u'Y',None, None, None, None, u'Text',None, None, ),
-(u'TypeLib',u'Feature_',u'N',None, None, u'Feature',1,u'Identifier',None, u'Required foreign key into the Feature Table, specifying the feature to validate or install in order for the type library to be operational.',),
-(u'TypeLib',u'Component_',u'N',None, None, u'Component',1,u'Identifier',None, u'Required foreign key into the Component Table, specifying the component for which to return a path when called through LocateComponent.',),
-(u'TypeLib',u'Directory_',u'Y',None, None, u'Directory',1,u'Identifier',None, u'Optional. The foreign key into the Directory table denoting the path to the help file for the type library.',),
-(u'TypeLib',u'Language',u'N',0,32767,None, None, None, None, u'The language of the library.',),
-(u'TypeLib',u'Version',u'Y',0,16777215,None, None, None, None, u'The version of the library. The minor version is in the lower 8 bits of the integer. The major version is in the next 16 bits. ',),
-(u'TypeLib',u'Cost',u'Y',0,2147483647,None, None, None, None, u'The cost associated with the registration of the typelib. This column is currently optional.',),
-(u'TypeLib',u'LibID',u'N',None, None, None, None, u'Guid',None, u'The GUID that represents the library.',),
-(u'UIText',u'Text',u'Y',None, None, None, None, u'Text',None, u'The localized version of the string.',),
-(u'UIText',u'Key',u'N',None, None, None, None, u'Identifier',None, u'A unique key that identifies the particular string.',),
-(u'Upgrade',u'Attributes',u'N',0,2147483647,None, None, None, None, u'The attributes of this product set.',),
-(u'Upgrade',u'Language',u'Y',None, None, None, None, u'Language',None, u'A comma-separated list of languages for either products in this set or products not in this set.',),
-(u'Upgrade',u'ActionProperty',u'N',None, None, None, None, u'UpperCase',None, u'The property to set when a product in this set is found.',),
-(u'Upgrade',u'Remove',u'Y',None, None, None, None, u'Formatted',None, u'The list of features to remove when uninstalling a product from this set. The default is "ALL".',),
-(u'Upgrade',u'UpgradeCode',u'N',None, None, None, None, u'Guid',None, u'The UpgradeCode GUID belonging to the products in this set.',),
-(u'Upgrade',u'VersionMax',u'Y',None, None, None, None, u'Text',None, u'The maximum ProductVersion of the products in this set. The set may or may not include products with this particular version.',),
-(u'Upgrade',u'VersionMin',u'Y',None, None, None, None, u'Text',None, u'The minimum ProductVersion of the products in this set. The set may or may not include products with this particular version.',),
-(u'Verb',u'Sequence',u'Y',0,32767,None, None, None, None, u'Order within the verbs for a particular extension. Also used simply to specify the default verb.',),
-(u'Verb',u'Argument',u'Y',None, None, None, None, u'Formatted',None, u'Optional value for the command arguments.',),
-(u'Verb',u'Extension_',u'N',None, None, u'Extension',1,u'Text',None, u'The extension associated with the table row.',),
-(u'Verb',u'Verb',u'N',None, None, None, None, u'Text',None, u'The verb for the command.',),
-(u'Verb',u'Command',u'Y',None, None, None, None, u'Formatted',None, u'The command text.',),
-]
diff --git a/Tools/msi/sequence.py b/Tools/msi/sequence.py
deleted file mode 100644
index 1138f7a234..0000000000
--- a/Tools/msi/sequence.py
+++ /dev/null
@@ -1,126 +0,0 @@
-AdminExecuteSequence = [
-(u'InstallInitialize', None, 1500),
-(u'InstallFinalize', None, 6600),
-(u'InstallFiles', None, 4000),
-(u'InstallAdminPackage', None, 3900),
-(u'FileCost', None, 900),
-(u'CostInitialize', None, 800),
-(u'CostFinalize', None, 1000),
-(u'InstallValidate', None, 1400),
-]
-
-AdminUISequence = [
-(u'FileCost', None, 900),
-(u'CostInitialize', None, 800),
-(u'CostFinalize', None, 1000),
-(u'ExecuteAction', None, 1300),
-(u'ExitDialog', None, -1),
-(u'FatalError', None, -3),
-(u'UserExit', None, -2),
-]
-
-AdvtExecuteSequence = [
-(u'InstallInitialize', None, 1500),
-(u'InstallFinalize', None, 6600),
-(u'CostInitialize', None, 800),
-(u'CostFinalize', None, 1000),
-(u'InstallValidate', None, 1400),
-(u'CreateShortcuts', None, 4500),
-(u'MsiPublishAssemblies', None, 6250),
-(u'PublishComponents', None, 6200),
-(u'PublishFeatures', None, 6300),
-(u'PublishProduct', None, 6400),
-(u'RegisterClassInfo', None, 4600),
-(u'RegisterExtensionInfo', None, 4700),
-(u'RegisterMIMEInfo', None, 4900),
-(u'RegisterProgIdInfo', None, 4800),
-]
-
-InstallExecuteSequence = [
-(u'InstallInitialize', None, 1500),
-(u'InstallFinalize', None, 6600),
-(u'InstallFiles', None, 4000),
-(u'FileCost', None, 900),
-(u'CostInitialize', None, 800),
-(u'CostFinalize', None, 1000),
-(u'InstallValidate', None, 1400),
-(u'CreateShortcuts', None, 4500),
-(u'MsiPublishAssemblies', None, 6250),
-(u'PublishComponents', None, 6200),
-(u'PublishFeatures', None, 6300),
-(u'PublishProduct', None, 6400),
-(u'RegisterClassInfo', None, 4600),
-(u'RegisterExtensionInfo', None, 4700),
-(u'RegisterMIMEInfo', None, 4900),
-(u'RegisterProgIdInfo', None, 4800),
-(u'AllocateRegistrySpace', u'NOT Installed', 1550),
-(u'AppSearch', None, 400),
-(u'BindImage', None, 4300),
-(u'CCPSearch', u'NOT Installed', 500),
-(u'CreateFolders', None, 3700),
-(u'DeleteServices', u'VersionNT', 2000),
-(u'DuplicateFiles', None, 4210),
-(u'FindRelatedProducts', None, 200),
-(u'InstallODBC', None, 5400),
-(u'InstallServices', u'VersionNT', 5800),
-(u'IsolateComponents', None, 950),
-(u'LaunchConditions', None, 100),
-(u'MigrateFeatureStates', None, 1200),
-(u'MoveFiles', None, 3800),
-(u'PatchFiles', None, 4090),
-(u'ProcessComponents', None, 1600),
-(u'RegisterComPlus', None, 5700),
-(u'RegisterFonts', None, 5300),
-(u'RegisterProduct', None, 6100),
-(u'RegisterTypeLibraries', None, 5500),
-(u'RegisterUser', None, 6000),
-(u'RemoveDuplicateFiles', None, 3400),
-(u'RemoveEnvironmentStrings', None, 3300),
-(u'RemoveExistingProducts', None, 6700),
-(u'RemoveFiles', None, 3500),
-(u'RemoveFolders', None, 3600),
-(u'RemoveIniValues', None, 3100),
-(u'RemoveODBC', None, 2400),
-(u'RemoveRegistryValues', None, 2600),
-(u'RemoveShortcuts', None, 3200),
-(u'RMCCPSearch', u'NOT Installed', 600),
-(u'SelfRegModules', None, 5600),
-(u'SelfUnregModules', None, 2200),
-(u'SetODBCFolders', None, 1100),
-(u'StartServices', u'VersionNT', 5900),
-(u'StopServices', u'VersionNT', 1900),
-(u'MsiUnpublishAssemblies', None, 1750),
-(u'UnpublishComponents', None, 1700),
-(u'UnpublishFeatures', None, 1800),
-(u'UnregisterClassInfo', None, 2700),
-(u'UnregisterComPlus', None, 2100),
-(u'UnregisterExtensionInfo', None, 2800),
-(u'UnregisterFonts', None, 2500),
-(u'UnregisterMIMEInfo', None, 3000),
-(u'UnregisterProgIdInfo', None, 2900),
-(u'UnregisterTypeLibraries', None, 2300),
-(u'ValidateProductID', None, 700),
-(u'WriteEnvironmentStrings', None, 5200),
-(u'WriteIniValues', None, 5100),
-(u'WriteRegistryValues', None, 5000),
-]
-
-InstallUISequence = [
-(u'FileCost', None, 900),
-(u'CostInitialize', None, 800),
-(u'CostFinalize', None, 1000),
-(u'ExecuteAction', None, 1300),
-(u'ExitDialog', None, -1),
-(u'FatalError', None, -3),
-(u'UserExit', None, -2),
-(u'AppSearch', None, 400),
-(u'CCPSearch', u'NOT Installed', 500),
-(u'FindRelatedProducts', None, 200),
-(u'IsolateComponents', None, 950),
-(u'LaunchConditions', None, 100),
-(u'MigrateFeatureStates', None, 1200),
-(u'RMCCPSearch', u'NOT Installed', 600),
-(u'ValidateProductID', None, 700),
-]
-
-tables=['AdminExecuteSequence', 'AdminUISequence', 'AdvtExecuteSequence', 'InstallExecuteSequence', 'InstallUISequence']
diff --git a/Tools/msi/tcltk/tcltk.wixproj b/Tools/msi/tcltk/tcltk.wixproj
new file mode 100644
index 0000000000..f66fc14988
--- /dev/null
+++ b/Tools/msi/tcltk/tcltk.wixproj
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{DB350600-186C-4E52-BA98-26A7CECB067F}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>tcltk</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <PropertyGroup>
+ <!-- Shortcut validation is not necessary -->
+ <SuppressICEs>ICE43</SuppressICEs>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="tcltk.wxs" />
+ <Compile Include="tcltk_files.wxs" />
+ <Compile Include="tcltk_reg.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <WxlTemplate Include="*.wxl_template" />
+ </ItemGroup>
+ <ItemGroup>
+ <InstallFiles Include="$(tcltkDir)bin\*.dll" Exclude="$(tcltkDir)bin\*g.dll">
+ <SourceBase>$(tcltkDir)</SourceBase>
+ <Source>!(bindpath.tcltk)</Source>
+ <TargetBase>$(tcltkDir)bin</TargetBase>
+ <Target_>DLLs\</Target_>
+ <Group>tcltk_dlls</Group>
+ </InstallFiles>
+
+ <InstallFiles Include="$(tcltkDir)lib\**\*">
+ <SourceBase>$(tcltkDir)</SourceBase>
+ <Source>!(bindpath.tcltk)</Source>
+ <TargetBase>$(tcltkDir)lib</TargetBase>
+ <Target_>tcl\</Target_>
+ <Group>tcltk_lib</Group>
+ </InstallFiles>
+
+ <InstallFiles Include="$(PySourcePath)Lib\tkinter\**\*;$(PySourcePath)Lib\idlelib\**\*;$(PySourcePath)Lib\turtledemo\**\*"
+ Exclude="$(PySourcePath)Lib\**\*.pyc;$(PySourcePath)Lib\**\*.pyo">
+ <SourceBase>$(PySourcePath)</SourceBase>
+ <Source>!(bindpath.src)</Source>
+ <TargetBase>$(PySourcePath)</TargetBase>
+ <Target_></Target_>
+ <Group>tkinter_lib</Group>
+ </InstallFiles>
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/tcltk/tcltk.wxs b/Tools/msi/tcltk/tcltk.wxs
new file mode 100644
index 0000000000..eeae8e8b0d
--- /dev/null
+++ b/Tools/msi/tcltk/tcltk.wxs
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+ <PropertyRef Id="REGISTRYKEY" />
+
+ <Property Id="PYTHON_EXE" Secure="yes">
+ <ComponentSearch Id="PythonExe" Guid="$(var.PythonExeComponentGuid)">
+ <FileSearch Name="python.exe" />
+ </ComponentSearch>
+ </Property>
+
+ <Property Id="PYTHONW_EXE" Secure="yes">
+ <ComponentSearch Id="PythonwExe" Guid="$(var.PythonwExeComponentGuid)">
+ <FileSearch Name="pythonw.exe" />
+ </ComponentSearch>
+ </Property>
+
+ <Condition Message="!(loc.NoPython)">PYTHON_EXE and PYTHONW_EXE</Condition>
+
+ <Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <ComponentGroupRef Id="tkinter_extension" />
+ <ComponentGroupRef Id="tcltk_dlls" />
+ <ComponentGroupRef Id="tcltk_lib" />
+ <ComponentGroupRef Id="tkinter_lib" Primary="yes" />
+
+ <Component Id="idle_reg" Directory="InstallDirectory">
+ <RegistryValue KeyPath="yes" Root="HKMU" Key="[REGISTRYKEY]\Idle" Type="string" Value="[#Lib_idlelib_idle.pyw]" />
+ </Component>
+ <ComponentRef Id="OptionalFeature" />
+ </Feature>
+ <Feature Id="AssociateFiles" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <ComponentGroupRef Id="tkinter_lib" />
+ <ComponentGroupRef Id="idle_reg" />
+ </Feature>
+ <Feature Id="Shortcuts" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <ComponentGroupRef Id="tkinter_lib" />
+
+ <Component Id="idle_shortcut" Directory="MenuDir">
+ <RegistryValue Root="HKMU" Key="[REGISTRYKEY]\IdleShortcuts" Type="integer" Value="1" KeyPath="yes" />
+ <RemoveFolder Id="Remove_MenuDir" On="uninstall" />
+
+ <Shortcut Id="IDLE"
+ Directory="MenuDir"
+ Name="!(loc.ShortcutName)"
+ Description="!(loc.ShortcutDescription)"
+ Target="[PYTHONW_EXE]"
+ Arguments='"[#Lib_idlelib_idle.pyw]"'
+ Icon="idle.exe"
+ WorkingDirectory="InstallDirectory">
+ <Icon Id="idle.exe" SourceFile="!(bindpath.src)Lib\idlelib\Icons\idle.ico" />
+ </Shortcut>
+ <Shortcut Id="pydoc.py"
+ Target="[PYTHON_EXE]"
+ Arguments='-m pydoc -b'
+ Name="!(loc.PyDocShortcutName)"
+ Description="!(loc.PyDocShortcutDescription)"
+ Icon="idle.exe"
+ WorkingDirectory="InstallDirectory" />
+ </Component>
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/tcltk/tcltk_d.wixproj b/Tools/msi/tcltk/tcltk_d.wixproj
new file mode 100644
index 0000000000..3266190da0
--- /dev/null
+++ b/Tools/msi/tcltk/tcltk_d.wixproj
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{EDA1FA5A-E2AA-4EAF-B49B-87D981CD0F16}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>tcltk_d</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="tcltk_d.wxs" />
+ <Compile Include="tcltk_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <WxlTemplate Include="*.wxl_template" />
+ </ItemGroup>
+ <ItemGroup>
+ <InstallFiles Include="$(tcltkDir)bin\*g.dll">
+ <SourceBase>$(tcltkDir)</SourceBase>
+ <Source>!(bindpath.tcltk)</Source>
+ <TargetBase>$(tcltkDir)bin</TargetBase>
+ <Target_>DLLs\</Target_>
+ <Group>tcltk_dlls_d</Group>
+ </InstallFiles>
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/tcltk/tcltk_d.wxs b/Tools/msi/tcltk/tcltk_d.wxs
new file mode 100644
index 0000000000..01d0d2439d
--- /dev/null
+++ b/Tools/msi/tcltk/tcltk_d.wxs
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title_d)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+
+ <Feature Id="DebugBinaries" AllowAdvertise="no" Title="!(loc.Title_d)" Description="!(loc.Description_d)">
+ <ComponentGroupRef Id="tkinter_extension_d" />
+ <ComponentGroupRef Id="tcltk_dlls_d" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/tcltk/tcltk_en-US.wxl_template b/Tools/msi/tcltk/tcltk_en-US.wxl_template
new file mode 100644
index 0000000000..f40fd6239d
--- /dev/null
+++ b/Tools/msi/tcltk/tcltk_en-US.wxl_template
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
+ <String Id="Descriptor">Tcl/Tk Support</String>
+ <String Id="ShortDescriptor">tcltk</String>
+ <String Id="NoPython">No !(loc.ProductName) installation was detected.</String>
+ <String Id="ShortcutName">IDLE (Python {{ShortVersion}} {{Bitness}})</String>
+ <String Id="ShortcutDescription">Launches IDLE, the interactive environment for !(loc.ProductName).</String>
+ <String Id="PyDocShortcutName">Python {{ShortVersion}} Module Docs ({{Bitness}})</String>
+ <String Id="PyDocShortcutDescription">Start the !(loc.ProductName) documentation server.</String>
+ <String Id="EditMenu">&amp;Edit with IDLE</String>
+ <String Id="EditSubMenu">Edit with IDLE {{ShortVersion}} ({{Bitness}})</String>
+</WixLocalization>
diff --git a/Tools/msi/tcltk/tcltk_files.wxs b/Tools/msi/tcltk/tcltk_files.wxs
new file mode 100644
index 0000000000..0d1b4a93a3
--- /dev/null
+++ b/Tools/msi/tcltk/tcltk_files.wxs
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <ComponentGroup Id="tkinter_extension">
+ <Component Id="_tkinter.pyd" Directory="DLLs" Guid="*">
+ <File Name="_tkinter.pyd" KeyPath="yes" />
+ </Component>
+ <Component Id="_tkinter.lib" Directory="libs" Guid="*">
+ <File Name="_tkinter.lib" KeyPath="yes" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+
+ <Fragment>
+ <ComponentGroup Id="tkinter_extension_symbols">
+ <Component Id="_tkinter.pdb" Directory="DLLs" Guid="*">
+ <File Name="_tkinter.pdb" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+
+ <Fragment>
+ <ComponentGroup Id="tkinter_extension_d">
+ <Component Id="_tkinter_d.pyd" Directory="DLLs" Guid="*">
+ <File Name="_tkinter_d.pyd" />
+ </Component>
+ <Component Id="_tkinter_d.lib" Directory="DLLs" Guid="*">
+ <File Name="_tkinter_d.lib" />
+ </Component>
+ <Component Id="_tkinter_d.pdb" Directory="DLLs" Guid="*">
+ <File Name="_tkinter_d.pdb" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+</Wix>
diff --git a/Tools/msi/tcltk/tcltk_pdb.wixproj b/Tools/msi/tcltk/tcltk_pdb.wixproj
new file mode 100644
index 0000000000..3370798a05
--- /dev/null
+++ b/Tools/msi/tcltk/tcltk_pdb.wixproj
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{02053AFA-1831-499A-B3EA-D8B223D3C40D}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>tcltk_pdb</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="tcltk_pdb.wxs" />
+ <Compile Include="tcltk_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <WxlTemplate Include="*.wxl_template" />
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/tcltk/tcltk_pdb.wxs b/Tools/msi/tcltk/tcltk_pdb.wxs
new file mode 100644
index 0000000000..04454f3849
--- /dev/null
+++ b/Tools/msi/tcltk/tcltk_pdb.wxs
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.TitlePdb)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+
+ <Feature Id="Symbols" AllowAdvertise="no" Title="!(loc.TitlePdb)" Description="!(loc.DescriptionPdb)">
+ <ComponentGroupRef Id="tkinter_extension_symbols" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/tcltk/tcltk_reg.wxs b/Tools/msi/tcltk/tcltk_reg.wxs
new file mode 100644
index 0000000000..2778bcc806
--- /dev/null
+++ b/Tools/msi/tcltk/tcltk_reg.wxs
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <ComponentGroup Id="idle_reg">
+ <!-- We fix the guid of the Subcommands key so that it is correctly reference counted -->
+ <Component Id="assoc_subcommands" Directory="InstallDirectory" Guid="{57D47B4C-96E6-40A0-A958-57083D74423F}">
+ <Condition>VersionNT > 600</Condition>
+ <RegistryValue Root="HKCR" Key="Python.File\Shell\editwithidle$(var.PyTestExt)" Name="MUIVerb" Value="!(loc.EditMenu)" Type="string" KeyPath="yes" />
+ <RegistryValue Root="HKCR" Key="Python.File\Shell\editwithidle$(var.PyTestExt)" Name="Subcommands" Value="" Type="string" KeyPath="no" />
+ </Component>
+ <Component Id="assoc_subcommands_nocon" Directory="InstallDirectory" Guid="{07061D85-9151-4FC4-BB78-13628020D026}">
+ <Condition>VersionNT > 600</Condition>
+ <RegistryValue Root="HKCR" Key="Python.NoConFile\Shell\editwithidle$(var.PyTestExt)" Name="MUIVerb" Value="!(loc.EditMenu)" Type="string" KeyPath="yes" />
+ <RegistryValue Root="HKCR" Key="Python.NoConFile\Shell\editwithidle$(var.PyTestExt)" Name="Subcommands" Value="" Type="string" KeyPath="no" />
+ </Component>
+
+ <Component Id="assoc_editwithidle" Directory="InstallDirectory">
+ <Condition>VersionNT > 600</Condition>
+ <RegistryKey Root="HKCR" Key="Python.File\Shell\editwithidle\shell\edit$(var.MajorVersionNumber)$(var.MinorVersionNumber)$(var.PyArchExt)$(var.PyTestExt)">
+ <RegistryValue Name="MUIVerb" Value="!(loc.EditSubMenu)" Type="string" KeyPath="yes" />
+ <RegistryValue Key="command" Value='"[PYTHONW_EXE]" -m idlelib "%L" %*' Type="string" />
+ </RegistryKey>
+ </Component>
+ <Component Id="assoc_editwithidle_nocon" Directory="InstallDirectory">
+ <Condition>VersionNT > 600</Condition>
+ <RegistryKey Root="HKCR" Key="Python.NoConFile\Shell\editwithidle\shell\edit$(var.MajorVersionNumber)$(var.MinorVersionNumber)$(var.PyArchExt)$(var.PyTestExt)">
+ <RegistryValue Name="MUIVerb" Value="!(loc.EditSubMenu)" Type="string" KeyPath="yes" />
+ <RegistryValue Key="command" Value='"[PYTHONW_EXE]" -m idlelib "%L" %*' Type="string" />
+ </RegistryKey>
+ </Component>
+
+ <Component Id="assoc_editwithidle_vista" Directory="InstallDirectory">
+ <Condition>VersionNT = 600</Condition>
+ <RegistryKey Root="HKCR" Key="Python.File\Shell\editwithidle$(var.MajorVersionNumber)$(var.MinorVersionNumber)$(var.PyArchExt)$(var.PyTestExt)">
+ <RegistryValue Value="!(loc.EditSubMenu)" Type="string" KeyPath="yes" />
+ <RegistryValue Key="command" Value='"[PYTHONW_EXE]" -m idlelib "%L" %*' Type="string" />
+ </RegistryKey>
+ </Component>
+ <Component Id="assoc_editwithidle_nocon_vista" Directory="InstallDirectory">
+ <Condition>VersionNT = 600</Condition>
+ <RegistryKey Root="HKCR" Key="Python.NoConFile\Shell\editwithidle$(var.MajorVersionNumber)$(var.MinorVersionNumber)$(var.PyArchExt)$(var.PyTestExt)">
+ <RegistryValue Value="!(loc.EditSubMenu)" Type="string" KeyPath="yes" />
+ <RegistryValue Key="command" Value='"[PYTHONW_EXE]" -m idlelib "%L" %*' Type="string" />
+ </RegistryKey>
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+</Wix>
diff --git a/Tools/msi/test/test.wixproj b/Tools/msi/test/test.wixproj
new file mode 100644
index 0000000000..8347e3f1d3
--- /dev/null
+++ b/Tools/msi/test/test.wixproj
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{DE0B7CC2-4358-4131-B3F4-C31C7F2CD468}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>test</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="test.wxs" />
+ <Compile Include="test_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ </ItemGroup>
+ <ItemGroup>
+ <InstallFiles Include="$(PySourcePath)Lib\test\**\*"
+ Exclude="$(PySourcePath)Lib\**\*.pyc;$(PySourcePath)Lib\**\*.pyo">
+ <SourceBase>$(PySourcePath)</SourceBase>
+ <Source>!(bindpath.src)</Source>
+ <TargetBase>$(PySourcePath)</TargetBase>
+ <Target_></Target_>
+ <Group>test_py</Group>
+ </InstallFiles>
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/test/test.wxs b/Tools/msi/test/test.wxs
new file mode 100644
index 0000000000..f2ed64f07b
--- /dev/null
+++ b/Tools/msi/test/test.wxs
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+ <PropertyRef Id="REGISTRYKEY" />
+
+ <Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <ComponentGroupRef Id="test_py" />
+ <ComponentGroupRef Id="test_extensions" />
+ <ComponentRef Id="OptionalFeature" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/test/test_d.wixproj b/Tools/msi/test/test_d.wixproj
new file mode 100644
index 0000000000..33b04be1fe
--- /dev/null
+++ b/Tools/msi/test/test_d.wixproj
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{41F5AE8D-24CD-4D03-BE75-AA6F7FAB4097}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>test_d</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="test_d.wxs" />
+ <Compile Include="test_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/test/test_d.wxs b/Tools/msi/test/test_d.wxs
new file mode 100644
index 0000000000..a954876755
--- /dev/null
+++ b/Tools/msi/test/test_d.wxs
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title_d)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+
+ <Feature Id="DebugBinaries" AllowAdvertise="no" Title="!(loc.Title_d)" Description="!(loc.Description_d)">
+ <ComponentGroupRef Id="test_extensions_d" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/test/test_en-US.wxl b/Tools/msi/test/test_en-US.wxl
new file mode 100644
index 0000000000..e615c7a6b7
--- /dev/null
+++ b/Tools/msi/test/test_en-US.wxl
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
+ <String Id="Descriptor">Test Suite</String>
+ <String Id="ShortDescriptor">test</String>
+ <String Id="NativeModulesTitle">!(loc.FullProductName) native libtest</String>
+ <String Id="NativeModulesDescription">!(loc.ProductName) Native Test Modules</String>
+</WixLocalization>
diff --git a/Tools/msi/test/test_files.wxs b/Tools/msi/test/test_files.wxs
new file mode 100644
index 0000000000..e803aa0f55
--- /dev/null
+++ b/Tools/msi/test/test_files.wxs
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <ComponentGroup Id="test_extensions">
+ <Component Id="_testcapi.pyd" Directory="DLLs" Guid="*">
+ <File Id="_testcapi.pyd" Name="_testcapi.pyd" KeyPath="yes" />
+ </Component>
+ <Component Id="_ctypes_test.pyd" Directory="DLLs" Guid="*">
+ <File Id="_ctypes_test.pyd" Name="_ctypes_test.pyd" KeyPath="yes" />
+ </Component>
+ <Component Id="_testbuffer.pyd" Directory="DLLs" Guid="*">
+ <File Id="_testbuffer.pyd" Name="_testbuffer.pyd" KeyPath="yes" />
+ </Component>
+ <Component Id="_testimportmultiple.pyd" Directory="DLLs" Guid="*">
+ <File Id="_testimportmultiple.pyd" Name="_testimportmultiple.pyd" KeyPath="yes" />
+ </Component>
+ <Component Id="_testmultiphase.pyd" Directory="DLLs" Guid="*">
+ <File Id="_testmultiphase.pyd" Name="_testmultiphase.pyd" KeyPath="yes" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+
+ <Fragment>
+ <ComponentGroup Id="test_extensions_symbols">
+ <Component Id="_testcapi.pdb" Directory="DLLs" Guid="*">
+ <File Id="_testcapi.pdb" Name="_testcapi.pdb" />
+ </Component>
+ <Component Id="_ctypes_test.pdb" Directory="DLLs" Guid="*">
+ <File Id="_ctypes_test.pdb" Name="_ctypes_test.pdb" />
+ </Component>
+ <Component Id="_testbuffer.pdb" Directory="DLLs" Guid="*">
+ <File Id="_testbuffer.pdb" Name="_testbuffer.pdb" />
+ </Component>
+ <Component Id="_testimportmultiple.pdb" Directory="DLLs" Guid="*">
+ <File Id="_testimportmultiple.pdb" Name="_testimportmultiple.pdb" />
+ </Component>
+ <Component Id="_testmultiphase.pdb" Directory="DLLs" Guid="*">
+ <File Id="_testmultiphase.pdb" Name="_testmultiphase.pdb" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+
+ <Fragment>
+ <ComponentGroup Id="test_extensions_d">
+ <Component Id="_testcapi_d.pyd" Directory="DLLs" Guid="*">
+ <File Id="_testcapi_d.pyd" Name="_testcapi_d.pyd" />
+ </Component>
+ <Component Id="_ctypes_test_d.pyd" Directory="DLLs" Guid="*">
+ <File Id="_ctypes_test_d.pyd" Name="_ctypes_test_d.pyd" />
+ </Component>
+ <Component Id="_testbuffer_d.pyd" Directory="DLLs" Guid="*">
+ <File Id="_testbuffer_d.pyd" Name="_testbuffer_d.pyd" />
+ </Component>
+ <Component Id="_testimportmultiple_d.pyd" Directory="DLLs" Guid="*">
+ <File Id="_testimportmultiple_d.pyd" Name="_testimportmultiple_d.pyd" />
+ </Component>
+ <Component Id="_testmultiphase_d.pyd" Directory="DLLs" Guid="*">
+ <File Id="_testmultiphase_d.pyd" Name="_testmultiphase_d.pyd" />
+ </Component>
+ <Component Id="_testcapi_d.pdb" Directory="DLLs" Guid="*">
+ <File Id="_testcapi_d.pdb" Name="_testcapi_d.pdb" />
+ </Component>
+ <Component Id="_ctypes_test_d.pdb" Directory="DLLs" Guid="*">
+ <File Id="_ctypes_test_d.pdb" Name="_ctypes_test_d.pdb" />
+ </Component>
+ <Component Id="_testbuffer_d.pdb" Directory="DLLs" Guid="*">
+ <File Id="_testbuffer_d.pdb" Name="_testbuffer_d.pdb" />
+ </Component>
+ <Component Id="_testimportmultiple_d.pdb" Directory="DLLs" Guid="*">
+ <File Id="_testimportmultiple_d.pdb" Name="_testimportmultiple_d.pdb" />
+ </Component>
+ <Component Id="_testmultiphase_d.pdb" Directory="DLLs" Guid="*">
+ <File Id="_testmultiphase_d.pdb" Name="_testmultiphase_d.pdb" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+</Wix>
diff --git a/Tools/msi/test/test_pdb.wixproj b/Tools/msi/test/test_pdb.wixproj
new file mode 100644
index 0000000000..965f0edd9b
--- /dev/null
+++ b/Tools/msi/test/test_pdb.wixproj
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{7CF48ADD-CFAA-499F-9A05-BA18440A3344}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>test_pdb</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="test_pdb.wxs" />
+ <Compile Include="test_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/test/test_pdb.wxs b/Tools/msi/test/test_pdb.wxs
new file mode 100644
index 0000000000..de634a390b
--- /dev/null
+++ b/Tools/msi/test/test_pdb.wxs
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.TitlePdb)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+
+ <Feature Id="Symbols" AllowAdvertise="no" Title="!(loc.TitlePdb)" Description="!(loc.DescriptionPdb)">
+ <ComponentGroupRef Id="test_extensions_symbols" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/testrelease.bat b/Tools/msi/testrelease.bat
new file mode 100644
index 0000000000..a989575ed6
--- /dev/null
+++ b/Tools/msi/testrelease.bat
@@ -0,0 +1,117 @@
+@setlocal enableextensions
+@echo off
+
+set D=%~dp0
+set PCBUILD=%D%..\..\PCBuild\
+
+set TARGETDIR=%TEMP%
+set TESTX86=
+set TESTX64=
+set TESTALLUSER=
+set TESTPERUSER=
+
+:CheckOpts
+if "%1" EQU "-h" goto Help
+if "%1" EQU "-x86" (set TESTX86=1) && shift && goto CheckOpts
+if "%1" EQU "-x64" (set TESTX64=1) && shift && goto CheckOpts
+if "%1" EQU "-t" (set TARGETDIR=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "--target" (set TARGETDIR=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "-a" (set TESTALLUSER=1) && shift && goto CheckOpts
+if "%1" EQU "--alluser" (set TESTALLUSER=1) && shift && goto CheckOpts
+if "%1" EQU "-p" (set TESTPERUSER=1) && shift && goto CheckOpts
+if "%1" EQU "--peruser" (set TESTPERUSER=1) && shift && goto CheckOpts
+
+if not defined TESTX86 if not defined TESTX64 (set TESTX86=1) && (set TESTX64=1)
+if not defined TESTALLUSER if not defined TESTPERUSER (set TESTALLUSER=1) && (set TESTPERUSER=1)
+
+
+if defined TESTX86 (
+ for %%f in ("%PCBUILD%win32\en-us\*.exe") do (
+ if defined TESTALLUSER call :test "%%~ff" "%TARGETDIR%\%%~nf-alluser" "InstallAllUsers=1 CompileAll=1"
+ if errorlevel 1 exit /B
+ if defined TESTPERUSER call :test "%%~ff" "%TARGETDIR%\%%~nf-peruser" "InstallAllUsers=0 CompileAll=0"
+ if errorlevel 1 exit /B
+ )
+)
+
+if defined TESTX64 (
+ for %%f in ("%PCBUILD%amd64\en-us\*.exe") do (
+ if defined TESTALLUSER call :test "%%~ff" "%TARGETDIR%\%%~nf-alluser" "InstallAllUsers=1 CompileAll=1"
+ if errorlevel 1 exit /B
+ if defined TESTPERUSER call :test "%%~ff" "%TARGETDIR%\%%~nf-peruser" "InstallAllUsers=0 CompileAll=0"
+ if errorlevel 1 exit /B
+ )
+)
+
+exit /B 0
+
+:test
+@setlocal
+@echo on
+
+@if not exist "%~1" exit /B 1
+
+@set EXE=%~1
+@if not "%EXE:embed=%"=="%EXE%" exit /B 0
+
+@set EXITCODE=0
+@echo Installing %1 into %2
+"%~1" /passive /log "%~2\install\log.txt" TargetDir="%~2\Python" Include_debug=1 Include_symbols=1 %~3
+
+@if not errorlevel 1 (
+ @echo Printing version
+ "%~2\Python\python.exe" -c "import sys; print(sys.version)" > "%~2\version.txt" 2>&1
+)
+
+@if not errorlevel 1 (
+ @echo Capturing Start Menu
+ @dir /s/b "%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs" | findstr /ic:"python" > "%~2\startmenu.txt" 2>&1
+ @dir /s/b "%APPDATA%\Microsoft\Windows\Start Menu\Programs" | findstr /ic:"python" >> "%~2\startmenu.txt" 2>&1
+
+ @echo Capturing registry
+ @for /F "usebackq" %%f in (`reg query HKCR /s /f python /k`) do @(
+ echo %%f >> "%~2\hkcr.txt"
+ reg query "%%f" /s >> "%~2\hkcr.txt" 2>&1
+ )
+ @reg query HKCU\Software\Python /s > "%~2\hkcu.txt" 2>&1
+ @reg query HKLM\Software\Python /reg:32 /s > "%~2\hklm.txt" 2>&1
+ @reg query HKLM\Software\Python /reg:64 /s >> "%~2\hklm.txt" 2>&1
+ cmd /k exit 0
+)
+
+@if not errorlevel 1 (
+ @echo Installing package
+ "%~2\Python\python.exe" -m pip install "azure<0.10" > "%~2\pip.txt" 2>&1
+ @if not errorlevel 1 (
+ "%~2\Python\python.exe" -m pip uninstall -y azure python-dateutil six >> "%~2\pip.txt" 2>&1
+ )
+)
+@if not errorlevel 1 (
+ @echo Testing Tcl/tk
+ @set TCL_LIBRARY=%~2\Python\tcl\tcl8.6
+ "%~2\Python\python.exe" -m test -uall -v test_ttk_guionly test_tk test_idle > "%~2\tcltk.txt" 2>&1
+ @set TCL_LIBRARY=
+)
+
+@set EXITCODE=%ERRORLEVEL%
+
+@echo Result was %EXITCODE%
+@echo Removing %1
+"%~1" /passive /uninstall /log "%~2\uninstall\log.txt"
+
+@echo off
+exit /B %EXITCODE%
+
+:Help
+echo testrelease.bat [--target TARGET] [-x86] [-x64] [--alluser] [--peruser] [-h]
+echo.
+echo --target (-t) Specify the target directory for installs and logs
+echo -x86 Run tests for x86 installers
+echo -x64 Run tests for x64 installers
+echo --alluser (-a) Run tests for all-user installs (requires Administrator)
+echo --peruser (-p) Run tests for per-user installs
+echo -h Display this help information
+echo.
+echo If no test architecture is specified, all architectures will be tested.
+echo If no install type is selected, all install types will be tested.
+echo.
diff --git a/Tools/msi/tools/tools.wixproj b/Tools/msi/tools/tools.wixproj
new file mode 100644
index 0000000000..f43cf3309e
--- /dev/null
+++ b/Tools/msi/tools/tools.wixproj
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{24CBEB95-BC1E-4EA9-AEA9-33834BCCD0EC}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>tools</OutputName>
+ <OutputType>Package</OutputType>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="tools.wxs" />
+ <Compile Include="tools_files.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ </ItemGroup>
+ <ItemGroup>
+ <ToolDirectories Include="scripts;i18n;pynche;pynche\X;demo" />
+ </ItemGroup>
+ <ItemGroup>
+ <InstallFiles Include="$(PySourcePath)Tools\scripts\**\*.py;
+ $(PySourcePath)Tools\scripts\**\*.pyw;
+ $(PySourcePath)Tools\scripts\**\*.txt;
+ $(PySourcePath)Tools\i18n\**\*.py;
+ $(PySourcePath)Tools\i18n\**\*.pyw;
+ $(PySourcePath)Tools\i18n\**\*.txt;
+ $(PySourcePath)Tools\pynche\**\*.py;
+ $(PySourcePath)Tools\pynche\**\*.pyw;
+ $(PySourcePath)Tools\pynche\**\*.txt;
+ $(PySourcePath)Tools\demo\**\*.py;
+ $(PySourcePath)Tools\demo\**\*.pyw;
+ $(PySourcePath)Tools\demo\**\*.txt;
+ $(PySourcePath)Tools\parser\**\*.py">
+ <SourceBase>$(PySourcePath)</SourceBase>
+ <Source>!(bindpath.src)</Source>
+ <TargetBase>$(PySourcePath)</TargetBase>
+ <Target_></Target_>
+ <Group>tools_py</Group>
+ </InstallFiles>
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/tools/tools.wxs b/Tools/msi/tools/tools.wxs
new file mode 100644
index 0000000000..8f8418a46c
--- /dev/null
+++ b/Tools/msi/tools/tools.wxs
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
+ <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
+ <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
+
+ <PropertyRef Id="UpgradeTable" />
+
+ <Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
+ <ComponentGroupRef Id="tools_py" />
+ <ComponentGroupRef Id="tools_scripts" />
+ <ComponentRef Id="OptionalFeature" />
+ </Feature>
+ </Product>
+</Wix>
diff --git a/Tools/msi/tools/tools_en-US.wxl b/Tools/msi/tools/tools_en-US.wxl
new file mode 100644
index 0000000000..a1384177ea
--- /dev/null
+++ b/Tools/msi/tools/tools_en-US.wxl
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
+ <String Id="Descriptor">Utility Scripts</String>
+ <String Id="ShortDescriptor">tools</String>
+</WixLocalization>
diff --git a/Tools/msi/tools/tools_files.wxs b/Tools/msi/tools/tools_files.wxs
new file mode 100644
index 0000000000..3ae0db2e1f
--- /dev/null
+++ b/Tools/msi/tools/tools_files.wxs
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
+ <Fragment>
+ <ComponentGroup Id="tools_scripts">
+ <Component Id="Tools_scripts_2to3.py" Directory="Tools_scripts" Guid="*">
+ <File Id="Tools_scripts_2to3.py" Name="2to3.py" Source="!(bindpath.src)Tools\scripts\2to3" />
+ </Component>
+ <Component Id="Tools_scripts_pydoc3.py" Directory="Tools_scripts" Guid="*">
+ <File Id="Tools_scripts_pydoc3.py" Name="pydoc3.py" Source="!(bindpath.src)Tools\scripts\pydoc3" />
+ </Component>
+ <Component Id="Tools_scripts_pyvenv.py" Directory="Tools_scripts" Guid="*">
+ <File Id="Tools_scripts_pyvenv.py" Name="pyvenv.py" Source="!(bindpath.src)Tools\scripts\pyvenv" />
+ </Component>
+ </ComponentGroup>
+ </Fragment>
+</Wix>
diff --git a/Tools/msi/uisample.py b/Tools/msi/uisample.py
deleted file mode 100644
index 543080554e..0000000000
--- a/Tools/msi/uisample.py
+++ /dev/null
@@ -1,1400 +0,0 @@
-
-import msilib,os;dirname=os.path.dirname(__file__)
-AdminExecuteSequence = [
-(u'InstallValidate', None, 1400),
-(u'InstallInitialize', None, 1500),
-(u'InstallFinalize', None, 6600),
-(u'InstallFiles', None, 4000),
-(u'InstallAdminPackage', None, 3900),
-(u'FileCost', None, 900),
-(u'CostInitialize', None, 800),
-(u'CostFinalize', None, 1000),
-]
-
-AdminUISequence = [
-(u'AdminWelcomeDlg', None, 1230),
-(u'FileCost', None, 900),
-(u'CostInitialize', None, 800),
-(u'CostFinalize', None, 1000),
-(u'ExecuteAction', None, 1300),
-(u'ExitDialog', None, -1),
-(u'FatalError', None, -3),
-(u'PrepareDlg', None, 140),
-(u'ProgressDlg', None, 1280),
-(u'UserExit', None, -2),
-]
-
-AdvtExecuteSequence = [
-(u'InstallValidate', None, 1400),
-(u'InstallInitialize', None, 1500),
-(u'InstallFinalize', None, 6600),
-(u'CostInitialize', None, 800),
-(u'CostFinalize', None, 1000),
-(u'CreateShortcuts', None, 4500),
-(u'PublishComponents', None, 6200),
-(u'PublishFeatures', None, 6300),
-(u'PublishProduct', None, 6400),
-(u'RegisterClassInfo', None, 4600),
-(u'RegisterExtensionInfo', None, 4700),
-(u'RegisterMIMEInfo', None, 4900),
-(u'RegisterProgIdInfo', None, 4800),
-]
-
-BBControl = [
-]
-
-Billboard = [
-]
-
-Binary = [
-(u'bannrbmp', msilib.Binary(os.path.join(dirname,"bannrbmp.bin"))),
-(u'completi', msilib.Binary(os.path.join(dirname,"completi.bin"))),
-(u'custicon', msilib.Binary(os.path.join(dirname,"custicon.bin"))),
-(u'dlgbmp', msilib.Binary(os.path.join(dirname,"dlgbmp.bin"))),
-(u'exclamic', msilib.Binary(os.path.join(dirname,"exclamic.bin"))),
-(u'info', msilib.Binary(os.path.join(dirname,"info.bin"))),
-(u'insticon', msilib.Binary(os.path.join(dirname,"insticon.bin"))),
-(u'New', msilib.Binary(os.path.join(dirname,"New.bin"))),
-(u'removico', msilib.Binary(os.path.join(dirname,"removico.bin"))),
-(u'repairic', msilib.Binary(os.path.join(dirname,"repairic.bin"))),
-(u'Up', msilib.Binary(os.path.join(dirname,"Up.bin"))),
-]
-
-CheckBox = [
-]
-
-Property = [
-(u'BannerBitmap', u'bannrbmp'),
-(u'IAgree', u'No'),
-(u'ProductID', u'none'),
-(u'ARPHELPLINK', u'http://www.microsoft.com/management'),
-(u'ButtonText_Back', u'< &Back'),
-(u'ButtonText_Browse', u'Br&owse'),
-(u'ButtonText_Cancel', u'Cancel'),
-(u'ButtonText_Exit', u'&Exit'),
-(u'ButtonText_Finish', u'&Finish'),
-(u'ButtonText_Ignore', u'&Ignore'),
-(u'ButtonText_Install', u'&Install'),
-(u'ButtonText_Next', u'&Next >'),
-(u'ButtonText_No', u'&No'),
-(u'ButtonText_OK', u'OK'),
-(u'ButtonText_Remove', u'&Remove'),
-(u'ButtonText_Repair', u'&Repair'),
-(u'ButtonText_Reset', u'&Reset'),
-(u'ButtonText_Resume', u'&Resume'),
-(u'ButtonText_Retry', u'&Retry'),
-(u'ButtonText_Return', u'&Return'),
-(u'ButtonText_Yes', u'&Yes'),
-(u'CompleteSetupIcon', u'completi'),
-(u'ComponentDownload', u'ftp://anonymous@microsoft.com/components/'),
-(u'CustomSetupIcon', u'custicon'),
-(u'DefaultUIFont', u'DlgFont8'),
-(u'DialogBitmap', u'dlgbmp'),
-(u'DlgTitleFont', u'{&DlgFontBold8}'),
-(u'ErrorDialog', u'ErrorDlg'),
-(u'ExclamationIcon', u'exclamic'),
-(u'InfoIcon', u'info'),
-(u'InstallerIcon', u'insticon'),
-(u'INSTALLLEVEL', u'3'),
-(u'InstallMode', u'Typical'),
-(u'PIDTemplate', u'12345<###-%%%%%%%>@@@@@'),
-#(u'ProductLanguage', u'1033'),
-(u'Progress1', u'Installing'),
-(u'Progress2', u'installs'),
-(u'PROMPTROLLBACKCOST', u'P'),
-(u'RemoveIcon', u'removico'),
-(u'RepairIcon', u'repairic'),
-(u'Setup', u'Setup'),
-(u'ShowUserRegistrationDlg', u'1'),
-(u'Wizard', u'Setup Wizard'),
-]
-
-ComboBox = [
-]
-
-Control = [
-(u'AdminWelcomeDlg', u'Bitmap', u'Bitmap', 0, 0, 370, 234, 1, None, u'[DialogBitmap]', u'Back', None),
-(u'AdminWelcomeDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'AdminWelcomeDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'Bitmap', None),
-(u'AdminWelcomeDlg', u'Description', u'Text', 135, 70, 220, 30, 196611, None, u'The [Wizard] will create a server image of [ProductName], at a specified network location. Click Next to continue or Cancel to exit the [Wizard].', None, None),
-(u'AdminWelcomeDlg', u'Title', u'Text', 135, 20, 220, 60, 196611, None, u'{\\VerdanaBold13}Welcome to the [ProductName] [Wizard]', None, None),
-(u'AdminWelcomeDlg', u'Back', u'PushButton', 180, 243, 56, 17, 1, None, u'[ButtonText_Back]', u'Next', None),
-(u'AdminWelcomeDlg', u'Next', u'PushButton', 236, 243, 56, 17, 3, None, u'[ButtonText_Next]', u'Cancel', None),
-(u'ExitDialog', u'Bitmap', u'Bitmap', 0, 0, 370, 234, 1, None, u'[DialogBitmap]', u'Back', None),
-(u'ExitDialog', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'ExitDialog', u'Cancel', u'PushButton', 304, 243, 56, 17, 1, None, u'[ButtonText_Cancel]', u'Bitmap', None),
-(u'ExitDialog', u'Description', u'Text', 135, 70, 220, 20, 196611, None, u'Click the Finish button to exit the [Wizard].', None, None),
-(u'ExitDialog', u'Title', u'Text', 135, 20, 220, 60, 196611, None, u'{\\VerdanaBold13}Completing the [ProductName] [Wizard]', None, None),
-(u'ExitDialog', u'Back', u'PushButton', 180, 243, 56, 17, 1, None, u'[ButtonText_Back]', u'Finish', None),
-(u'ExitDialog', u'Finish', u'PushButton', 236, 243, 56, 17, 3, None, u'[ButtonText_Finish]', u'Cancel', None),
-(u'FatalError', u'Bitmap', u'Bitmap', 0, 0, 370, 234, 1, None, u'[DialogBitmap]', u'Back', None),
-(u'FatalError', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'FatalError', u'Cancel', u'PushButton', 304, 243, 56, 17, 1, None, u'[ButtonText_Cancel]', u'Bitmap', None),
-(u'FatalError', u'Title', u'Text', 135, 20, 220, 60, 196611, None, u'{\\VerdanaBold13}[ProductName] [Wizard] ended prematurely', None, None),
-(u'FatalError', u'Back', u'PushButton', 180, 243, 56, 17, 1, None, u'[ButtonText_Back]', u'Finish', None),
-(u'FatalError', u'Finish', u'PushButton', 236, 243, 56, 17, 3, None, u'[ButtonText_Finish]', u'Cancel', None),
-(u'FatalError', u'Description1', u'Text', 135, 70, 220, 40, 196611, None, u'[ProductName] setup ended prematurely because of an error. Your system has not been modified. To install this program at a later time, please run the installation again.', None, None),
-(u'FatalError', u'Description2', u'Text', 135, 115, 220, 20, 196611, None, u'Click the Finish button to exit the [Wizard].', None, None),
-(u'PrepareDlg', u'Bitmap', u'Bitmap', 0, 0, 370, 234, 1, None, u'[DialogBitmap]', u'Cancel', None),
-(u'PrepareDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'PrepareDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'Bitmap', None),
-(u'PrepareDlg', u'Description', u'Text', 135, 70, 220, 20, 196611, None, u'Please wait while the [Wizard] prepares to guide you through the installation.', None, None),
-(u'PrepareDlg', u'Title', u'Text', 135, 20, 220, 60, 196611, None, u'{\\VerdanaBold13}Welcome to the [ProductName] [Wizard]', None, None),
-(u'PrepareDlg', u'Back', u'PushButton', 180, 243, 56, 17, 1, None, u'[ButtonText_Back]', None, None),
-(u'PrepareDlg', u'Next', u'PushButton', 236, 243, 56, 17, 1, None, u'[ButtonText_Next]', None, None),
-(u'PrepareDlg', u'ActionData', u'Text', 135, 125, 220, 30, 196611, None, None, None, None),
-(u'PrepareDlg', u'ActionText', u'Text', 135, 100, 220, 20, 196611, None, None, None, None),
-(u'ProgressDlg', u'Text', u'Text', 35, 65, 300, 20, 3, None, u'Please wait while the [Wizard] [Progress2] [ProductName]. This may take several minutes.', None, None),
-(u'ProgressDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'Back', None),
-(u'ProgressDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'ProgressDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'ProgressDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'BannerBitmap', None),
-(u'ProgressDlg', u'Title', u'Text', 20, 15, 200, 15, 196611, None, u'[DlgTitleFont][Progress1] [ProductName]', None, None),
-(u'ProgressDlg', u'Back', u'PushButton', 180, 243, 56, 17, 1, None, u'[ButtonText_Back]', u'Next', None),
-(u'ProgressDlg', u'Next', u'PushButton', 236, 243, 56, 17, 1, None, u'[ButtonText_Next]', u'Cancel', None),
-(u'ProgressDlg', u'ActionText', u'Text', 70, 100, 265, 10, 3, None, None, None, None),
-(u'ProgressDlg', u'ProgressBar', u'ProgressBar', 35, 115, 300, 10, 65537, None, u'Progress done', None, None),
-(u'ProgressDlg', u'StatusLabel', u'Text', 35, 100, 35, 10, 3, None, u'Status:', None, None),
-(u'UserExit', u'Bitmap', u'Bitmap', 0, 0, 370, 234, 1, None, u'[DialogBitmap]', u'Back', None),
-(u'UserExit', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'UserExit', u'Cancel', u'PushButton', 304, 243, 56, 17, 1, None, u'[ButtonText_Cancel]', u'Bitmap', None),
-(u'UserExit', u'Title', u'Text', 135, 20, 220, 60, 196611, None, u'{\\VerdanaBold13}[ProductName] [Wizard] was interrupted', None, None),
-(u'UserExit', u'Back', u'PushButton', 180, 243, 56, 17, 1, None, u'[ButtonText_Back]', u'Finish', None),
-(u'UserExit', u'Finish', u'PushButton', 236, 243, 56, 17, 3, None, u'[ButtonText_Finish]', u'Cancel', None),
-(u'UserExit', u'Description1', u'Text', 135, 70, 220, 40, 196611, None, u'[ProductName] setup was interrupted. Your system has not been modified. To install this program at a later time, please run the installation again.', None, None),
-(u'UserExit', u'Description2', u'Text', 135, 115, 220, 20, 196611, None, u'Click the Finish button to exit the [Wizard].', None, None),
-(u'AdminBrowseDlg', u'Up', u'PushButton', 298, 55, 19, 19, 3670019, None, u'Up', u'NewFolder', u'Up One Level|'),
-(u'AdminBrowseDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'PathEdit', None),
-(u'AdminBrowseDlg', u'PathEdit', u'PathEdit', 84, 202, 261, 17, 3, u'TARGETDIR', None, u'OK', None),
-(u'AdminBrowseDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'AdminBrowseDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'AdminBrowseDlg', u'Cancel', u'PushButton', 240, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'ComboLabel', None),
-(u'AdminBrowseDlg', u'ComboLabel', u'Text', 25, 58, 44, 10, 3, None, u'&Look in:', u'DirectoryCombo', None),
-(u'AdminBrowseDlg', u'DirectoryCombo', u'DirectoryCombo', 70, 55, 220, 80, 458755, u'TARGETDIR', None, u'Up', None),
-(u'AdminBrowseDlg', u'Description', u'Text', 25, 23, 280, 15, 196611, None, u'Browse to the destination folder', None, None),
-(u'AdminBrowseDlg', u'DirectoryList', u'DirectoryList', 25, 83, 320, 110, 7, u'TARGETDIR', None, u'PathLabel', None),
-(u'AdminBrowseDlg', u'PathLabel', u'Text', 25, 205, 59, 10, 3, None, u'&Folder name:', u'BannerBitmap', None),
-(u'AdminBrowseDlg', u'NewFolder', u'PushButton', 325, 55, 19, 19, 3670019, None, u'New', u'DirectoryList', u'Create A New Folder|'),
-(u'AdminBrowseDlg', u'OK', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_OK]', u'Cancel', None),
-(u'AdminBrowseDlg', u'Title', u'Text', 15, 6, 200, 15, 196611, None, u'[DlgTitleFont]Change current destination folder', None, None),
-(u'AdminInstallPointDlg', u'Text', u'Text', 25, 80, 320, 10, 3, None, u'&Enter a new network location or click Browse to browse to one.', u'PathEdit', None),
-(u'AdminInstallPointDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'Text', None),
-(u'AdminInstallPointDlg', u'PathEdit', u'PathEdit', 25, 93, 320, 18, 3, u'TARGETDIR', None, u'Browse', None),
-(u'AdminInstallPointDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'AdminInstallPointDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'AdminInstallPointDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'BannerBitmap', None),
-(u'AdminInstallPointDlg', u'Description', u'Text', 25, 20, 280, 20, 196611, None, u'Please specify a network location for the server image of [ProductName] product', None, None),
-(u'AdminInstallPointDlg', u'Title', u'Text', 15, 6, 200, 15, 196611, None, u'[DlgTitleFont]Network Location', None, None),
-(u'AdminInstallPointDlg', u'Back', u'PushButton', 180, 243, 56, 17, 3, None, u'[ButtonText_Back]', u'Next', None),
-(u'AdminInstallPointDlg', u'Next', u'PushButton', 236, 243, 56, 17, 3, None, u'[ButtonText_Next]', u'Cancel', None),
-(u'AdminInstallPointDlg', u'Browse', u'PushButton', 289, 119, 56, 17, 3, None, u'[ButtonText_Browse]', u'Back', None),
-(u'AdminRegistrationDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'OrganizationLabel', None),
-(u'AdminRegistrationDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'AdminRegistrationDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'AdminRegistrationDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'BannerBitmap', None),
-(u'AdminRegistrationDlg', u'Description', u'Text', 25, 23, 280, 15, 196611, None, u'Please enter your company information', None, None),
-(u'AdminRegistrationDlg', u'Title', u'Text', 15, 6, 200, 15, 196611, None, u'[DlgTitleFont]Company Information', None, None),
-(u'AdminRegistrationDlg', u'Back', u'PushButton', 180, 243, 56, 17, 65539, None, u'[ButtonText_Back]', u'Next', None),
-(u'AdminRegistrationDlg', u'Next', u'PushButton', 236, 243, 56, 17, 3, None, u'[ButtonText_Next]', u'Cancel', None),
-(u'AdminRegistrationDlg', u'OrganizationLabel', u'Text', 45, 71, 285, 30, 3, None, u'&Please enter the name of your organization in the box below. This will be used as default company name for subsequent installations of [ProductName]:', u'OrganizationEdit', None),
-(u'AdminRegistrationDlg', u'CDKeyEdit', u'MaskedEdit', 45, 143, 250, 16, 3, u'PIDKEY', u'[PIDTemplate]', u'Back', None),
-(u'AdminRegistrationDlg', u'CDKeyLabel', u'Text', 45, 130, 50, 10, 3, None, u'CD &Key:', u'CDKeyEdit', None),
-(u'AdminRegistrationDlg', u'OrganizationEdit', u'Edit', 45, 105, 220, 18, 3, u'COMPANYNAME', u'{80}', u'CDKeyLabel', None),
-(u'BrowseDlg', u'Up', u'PushButton', 298, 55, 19, 19, 3670019, None, u'Up', u'NewFolder', u'Up One Level|'),
-(u'BrowseDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'PathEdit', None),
-(u'BrowseDlg', u'PathEdit', u'PathEdit', 84, 202, 261, 18, 11, u'_BrowseProperty', None, u'OK', None),
-(u'BrowseDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'BrowseDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'BrowseDlg', u'Cancel', u'PushButton', 240, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'ComboLabel', None),
-(u'BrowseDlg', u'ComboLabel', u'Text', 25, 58, 44, 10, 3, None, u'&Look in:', u'DirectoryCombo', None),
-(u'BrowseDlg', u'DirectoryCombo', u'DirectoryCombo', 70, 55, 220, 80, 393227, u'_BrowseProperty', None, u'Up', None),
-(u'BrowseDlg', u'Description', u'Text', 25, 23, 280, 15, 196611, None, u'Browse to the destination folder', None, None),
-(u'BrowseDlg', u'DirectoryList', u'DirectoryList', 25, 83, 320, 110, 15, u'_BrowseProperty', None, u'PathLabel', None),
-(u'BrowseDlg', u'PathLabel', u'Text', 25, 205, 59, 10, 3, None, u'&Folder name:', u'BannerBitmap', None),
-(u'BrowseDlg', u'NewFolder', u'PushButton', 325, 55, 19, 19, 3670019, None, u'New', u'DirectoryList', u'Create A New Folder|'),
-(u'BrowseDlg', u'OK', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_OK]', u'Cancel', None),
-(u'BrowseDlg', u'Title', u'Text', 15, 6, 200, 15, 196611, None, u'[DlgTitleFont]Change current destination folder', None, None),
-(u'CancelDlg', u'Text', u'Text', 48, 15, 194, 30, 3, None, u'Are you sure you want to cancel [ProductName] installation?', None, None),
-(u'CancelDlg', u'Icon', u'Icon', 15, 15, 24, 24, 5242881, None, u'[InfoIcon]', None, u'Information icon|'),
-(u'CancelDlg', u'No', u'PushButton', 132, 57, 56, 17, 3, None, u'[ButtonText_No]', u'Yes', None),
-(u'CancelDlg', u'Yes', u'PushButton', 72, 57, 56, 17, 3, None, u'[ButtonText_Yes]', u'No', None),
-(u'CustomizeDlg', u'Text', u'Text', 25, 55, 320, 20, 3, None, u'Click on the icons in the tree below to change the way features will be installed.', None, None),
-(u'CustomizeDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'Tree', None),
-(u'CustomizeDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'CustomizeDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'CustomizeDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'BannerBitmap', None),
-(u'CustomizeDlg', u'Description', u'Text', 25, 23, 280, 15, 196611, None, u'Select the way you want features to be installed.', None, None),
-(u'CustomizeDlg', u'Title', u'Text', 15, 6, 200, 15, 196611, None, u'[DlgTitleFont]Custom Setup', None, None),
-(u'CustomizeDlg', u'Back', u'PushButton', 180, 243, 56, 17, 3, None, u'[ButtonText_Back]', u'Next', None),
-(u'CustomizeDlg', u'Next', u'PushButton', 236, 243, 56, 17, 3, None, u'[ButtonText_Next]', u'Cancel', None),
-(u'CustomizeDlg', u'Browse', u'PushButton', 304, 200, 56, 17, 3, None, u'[ButtonText_Browse]', u'Reset', None),
-(u'CustomizeDlg', u'Tree', u'SelectionTree', 25, 85, 175, 95, 7, u'_BrowseProperty', u'Tree of selections', u'Browse', None),
-(u'CustomizeDlg', u'Box', u'GroupBox', 210, 81, 140, 98, 1, None, None, None, None),
-(u'CustomizeDlg', u'Reset', u'PushButton', 42, 243, 56, 17, 3, None, u'[ButtonText_Reset]', u'DiskCost', None),
-(u'CustomizeDlg', u'DiskCost', u'PushButton', 111, 243, 56, 17, 3, None, u'Disk &Usage', u'Back', None),
-(u'CustomizeDlg', u'ItemDescription', u'Text', 215, 90, 131, 30, 3, None, u'Multiline description of the currently selected item.', None, None),
-(u'CustomizeDlg', u'ItemSize', u'Text', 215, 130, 131, 45, 3, None, u'The size of the currently selected item.', None, None),
-(u'CustomizeDlg', u'Location', u'Text', 75, 200, 215, 20, 3, None, u"<The selection's path>", None, None),
-(u'CustomizeDlg', u'LocationLabel', u'Text', 25, 200, 50, 10, 3, None, u'Location:', None, None),
-(u'DiskCostDlg', u'Text', u'Text', 20, 53, 330, 40, 3, None, u'The highlighted volumes (if any) do not have enough disk space available for the currently selected features. You can either remove some files from the highlighted volumes, or choose to install less features onto local drive(s), or select different destination drive(s).', None, None),
-(u'DiskCostDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'OK', None),
-(u'DiskCostDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'DiskCostDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'DiskCostDlg', u'Description', u'Text', 20, 20, 280, 20, 196611, None, u'The disk space required for the installation of the selected features.', None, None),
-(u'DiskCostDlg', u'OK', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_OK]', u'BannerBitmap', None),
-(u'DiskCostDlg', u'Title', u'Text', 15, 6, 200, 15, 196611, None, u'[DlgTitleFont]Disk Space Requirements', None, None),
-(u'DiskCostDlg', u'VolumeList', u'VolumeCostList', 20, 100, 330, 120, 393223, None, u'{120}{70}{70}{70}{70}', None, None),
-(u'ErrorDlg', u'Y', u'PushButton', 100, 80, 56, 17, 3, None, u'[ButtonText_Yes]', None, None),
-(u'ErrorDlg', u'A', u'PushButton', 100, 80, 56, 17, 3, None, u'[ButtonText_Cancel]', None, None),
-(u'ErrorDlg', u'C', u'PushButton', 100, 80, 56, 17, 3, None, u'[ButtonText_Cancel]', None, None),
-(u'ErrorDlg', u'ErrorIcon', u'Icon', 15, 15, 24, 24, 5242881, None, u'[InfoIcon]', None, u'Information icon|'),
-(u'ErrorDlg', u'ErrorText', u'Text', 48, 15, 205, 60, 3, None, u'Information text', None, None),
-(u'ErrorDlg', u'I', u'PushButton', 100, 80, 56, 17, 3, None, u'[ButtonText_Ignore]', None, None),
-(u'ErrorDlg', u'N', u'PushButton', 100, 80, 56, 17, 3, None, u'[ButtonText_No]', None, None),
-(u'ErrorDlg', u'O', u'PushButton', 100, 80, 56, 17, 3, None, u'[ButtonText_OK]', None, None),
-(u'ErrorDlg', u'R', u'PushButton', 100, 80, 56, 17, 3, None, u'[ButtonText_Retry]', None, None),
-(u'FilesInUse', u'Text', u'Text', 20, 55, 330, 30, 3, None, u'The following applications are using files that need to be updated by this setup. Close these applications and then click Retry to continue the installation or Cancel to exit it.', None, None),
-(u'FilesInUse', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'Retry', None),
-(u'FilesInUse', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'FilesInUse', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'FilesInUse', u'Description', u'Text', 20, 23, 280, 20, 196611, None, u'Some files that need to be updated are currently in use.', None, None),
-(u'FilesInUse', u'Title', u'Text', 15, 6, 200, 15, 196611, None, u'[DlgTitleFont]Files in Use', None, None),
-(u'FilesInUse', u'Retry', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Retry]', u'Ignore', None),
-(u'FilesInUse', u'Exit', u'PushButton', 166, 243, 56, 17, 3, None, u'[ButtonText_Exit]', u'BannerBitmap', None),
-(u'FilesInUse', u'Ignore', u'PushButton', 235, 243, 56, 17, 3, None, u'[ButtonText_Ignore]', u'Exit', None),
-(u'FilesInUse', u'List', u'ListBox', 20, 87, 330, 130, 7, u'FileInUseProcess', None, None, None),
-(u'LicenseAgreementDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'AgreementText', None),
-(u'LicenseAgreementDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'LicenseAgreementDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'LicenseAgreementDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'BannerBitmap', None),
-(u'LicenseAgreementDlg', u'Description', u'Text', 25, 23, 280, 15, 196611, None, u'Please read the following license agreement carefully', None, None),
-(u'LicenseAgreementDlg', u'Title', u'Text', 15, 6, 200, 15, 196611, None, u'[DlgTitleFont]End-User License Agreement', None, None),
-(u'LicenseAgreementDlg', u'Back', u'PushButton', 180, 243, 56, 17, 3, None, u'[ButtonText_Back]', u'Next', None),
-(u'LicenseAgreementDlg', u'Next', u'PushButton', 236, 243, 56, 17, 3, None, u'[ButtonText_Next]', u'Cancel', None),
-(u'LicenseAgreementDlg', u'AgreementText', u'ScrollableText', 20, 60, 330, 120, 7, None, u'{\\rtf1\\ansi\\ansicpg1252\\deff0\\deftab720{\\fonttbl{\\f0\\froman\\fprq2 Times New Roman;}}{\\colortbl\\red0\\green0\\blue0;} \\deflang1033\\horzdoc{\\*\\fchars }{\\*\\lchars }\\pard\\plain\\f0\\fs20 <Your license agreement should go here.>\\par }', u'Buttons', None),
-(u'LicenseAgreementDlg', u'Buttons', u'RadioButtonGroup', 20, 187, 330, 40, 3, u'IAgree', None, u'Back', None),
-(u'MaintenanceTypeDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'ChangeLabel', None),
-(u'MaintenanceTypeDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'MaintenanceTypeDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'MaintenanceTypeDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'BannerBitmap', None),
-(u'MaintenanceTypeDlg', u'Description', u'Text', 25, 23, 280, 20, 196611, None, u'Select the operation you wish to perform.', None, None),
-(u'MaintenanceTypeDlg', u'Title', u'Text', 15, 6, 240, 15, 196611, None, u'[DlgTitleFont]Modify, Repair or Remove installation', None, None),
-(u'MaintenanceTypeDlg', u'Back', u'PushButton', 180, 243, 56, 17, 3, None, u'[ButtonText_Back]', u'Next', None),
-(u'MaintenanceTypeDlg', u'Next', u'PushButton', 236, 243, 56, 17, 1, None, u'[ButtonText_Next]', u'Cancel', None),
-(u'MaintenanceTypeDlg', u'ChangeLabel', u'Text', 105, 65, 100, 10, 3, None, u'[DlgTitleFont]&Modify', u'ChangeButton', None),
-(u'MaintenanceTypeDlg', u'ChangeButton', u'PushButton', 50, 65, 38, 38, 5767171, None, u'[CustomSetupIcon]', u'RepairLabel', u'Modify Installation|'),
-(u'MaintenanceTypeDlg', u'RepairLabel', u'Text', 105, 114, 100, 10, 3, None, u'[DlgTitleFont]Re&pair', u'RepairButton', None),
-(u'MaintenanceTypeDlg', u'ChangeText', u'Text', 105, 78, 230, 20, 3, None, u'Allows users to change the way features are installed.', None, None),
-(u'MaintenanceTypeDlg', u'RemoveButton', u'PushButton', 50, 163, 38, 38, 5767171, None, u'[RemoveIcon]', u'Back', u'Remove Installation|'),
-(u'MaintenanceTypeDlg', u'RemoveLabel', u'Text', 105, 163, 100, 10, 3, None, u'[DlgTitleFont]&Remove', u'RemoveButton', None),
-(u'MaintenanceTypeDlg', u'RemoveText', u'Text', 105, 176, 230, 20, 3, None, u'Removes [ProductName] from your computer.', None, None),
-(u'MaintenanceTypeDlg', u'RepairButton', u'PushButton', 50, 114, 38, 38, 5767171, None, u'[RepairIcon]', u'RemoveLabel', u'Repair Installation|'),
-(u'MaintenanceTypeDlg', u'RepairText', u'Text', 105, 127, 230, 30, 3, None, u'Repairs errors in the most recent installation state - fixes missing or corrupt files, shortcuts and registry entries.', None, None),
-(u'MaintenanceWelcomeDlg', u'Bitmap', u'Bitmap', 0, 0, 370, 234, 1, None, u'[DialogBitmap]', u'Back', None),
-(u'MaintenanceWelcomeDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'MaintenanceWelcomeDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'Bitmap', None),
-(u'MaintenanceWelcomeDlg', u'Description', u'Text', 135, 70, 220, 60, 196611, None, u'The [Wizard] will allow you to change the way [ProductName] features are installed on your computer or even to remove [ProductName] from your computer. Click Next to continue or Cancel to exit the [Wizard].', None, None),
-(u'MaintenanceWelcomeDlg', u'Title', u'Text', 135, 20, 220, 60, 196611, None, u'{\\VerdanaBold13}Welcome to the [ProductName] [Wizard]', None, None),
-(u'MaintenanceWelcomeDlg', u'Back', u'PushButton', 180, 243, 56, 17, 1, None, u'[ButtonText_Back]', u'Next', None),
-(u'MaintenanceWelcomeDlg', u'Next', u'PushButton', 236, 243, 56, 17, 3, None, u'[ButtonText_Next]', u'Cancel', None),
-(u'OutOfDiskDlg', u'Text', u'Text', 20, 53, 330, 40, 3, None, u'The highlighted volumes do not have enough disk space available for the currently selected features. You can either remove some files from the highlighted volumes, or choose to install less features onto local drive(s), or select different destination drive(s).', None, None),
-(u'OutOfDiskDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'OK', None),
-(u'OutOfDiskDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'OutOfDiskDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'OutOfDiskDlg', u'Description', u'Text', 20, 20, 280, 20, 196611, None, u'Disk space required for the installation exceeds available disk space.', None, None),
-(u'OutOfDiskDlg', u'OK', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_OK]', u'BannerBitmap', None),
-(u'OutOfDiskDlg', u'Title', u'Text', 15, 6, 200, 15, 196611, None, u'[DlgTitleFont]Out of Disk Space', None, None),
-(u'OutOfDiskDlg', u'VolumeList', u'VolumeCostList', 20, 100, 330, 120, 393223, None, u'{120}{70}{70}{70}{70}', None, None),
-(u'OutOfRbDiskDlg', u'Text', u'Text', 20, 53, 330, 40, 3, None, u'The highlighted volumes do not have enough disk space available for the currently selected features. You can either remove some files from the highlighted volumes, or choose to install less features onto local drive(s), or select different destination drive(s).', None, None),
-(u'OutOfRbDiskDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'No', None),
-(u'OutOfRbDiskDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'OutOfRbDiskDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'OutOfRbDiskDlg', u'Description', u'Text', 20, 20, 280, 20, 196611, None, u'Disk space required for the installation exceeds available disk space.', None, None),
-(u'OutOfRbDiskDlg', u'Title', u'Text', 15, 6, 200, 15, 196611, None, u'[DlgTitleFont]Out of Disk Space', None, None),
-(u'OutOfRbDiskDlg', u'No', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_No]', u'Yes', None),
-(u'OutOfRbDiskDlg', u'Yes', u'PushButton', 240, 243, 56, 17, 3, None, u'[ButtonText_Yes]', u'BannerBitmap', None),
-(u'OutOfRbDiskDlg', u'VolumeList', u'VolumeCostList', 20, 140, 330, 80, 4587527, None, u'{120}{70}{70}{70}{70}', None, None),
-(u'OutOfRbDiskDlg', u'Text2', u'Text', 20, 94, 330, 40, 3, None, u"Alternatively, you may choose to disable the installer's rollback functionality. This allows the installer to restore your computer's original state should the installation be interrupted in any way. Click Yes if you wish to take the risk to disable rollback.", None, None),
-(u'ResumeDlg', u'Bitmap', u'Bitmap', 0, 0, 370, 234, 1, None, u'[DialogBitmap]', u'Back', None),
-(u'ResumeDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'ResumeDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'Bitmap', None),
-(u'ResumeDlg', u'Description', u'Text', 135, 70, 220, 30, 196611, None, u'The [Wizard] will complete the installation of [ProductName] on your computer. Click Install to continue or Cancel to exit the [Wizard].', None, None),
-(u'ResumeDlg', u'Title', u'Text', 135, 20, 220, 60, 196611, None, u'{\\VerdanaBold13}Resuming the [ProductName] [Wizard]', None, None),
-(u'ResumeDlg', u'Back', u'PushButton', 180, 243, 56, 17, 1, None, u'[ButtonText_Back]', u'Install', None),
-(u'ResumeDlg', u'Install', u'PushButton', 236, 243, 56, 17, 3, None, u'[ButtonText_Install]', u'Cancel', None),
-(u'SetupTypeDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'TypicalLabel', None),
-(u'SetupTypeDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'SetupTypeDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'SetupTypeDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'BannerBitmap', None),
-(u'SetupTypeDlg', u'Description', u'Text', 25, 23, 280, 15, 196611, None, u'Choose the setup type that best suits your needs', None, None),
-(u'SetupTypeDlg', u'Title', u'Text', 15, 6, 200, 15, 196611, None, u'[DlgTitleFont]Choose Setup Type', None, None),
-(u'SetupTypeDlg', u'Back', u'PushButton', 180, 243, 56, 17, 3, None, u'[ButtonText_Back]', u'Next', None),
-(u'SetupTypeDlg', u'Next', u'PushButton', 236, 243, 56, 17, 1, None, u'[ButtonText_Next]', u'Cancel', None),
-(u'SetupTypeDlg', u'TypicalLabel', u'Text', 105, 65, 100, 10, 3, None, u'[DlgTitleFont]&Typical', u'TypicalButton', None),
-(u'SetupTypeDlg', u'CompleteButton', u'PushButton', 50, 171, 38, 38, 5767171, None, u'[CompleteSetupIcon]', u'Back', u'Complete Installation|'),
-(u'SetupTypeDlg', u'CompleteLabel', u'Text', 105, 171, 100, 10, 3, None, u'[DlgTitleFont]C&omplete', u'CompleteButton', None),
-(u'SetupTypeDlg', u'CompleteText', u'Text', 105, 184, 230, 20, 3, None, u'All program features will be installed. (Requires most disk space)', None, None),
-(u'SetupTypeDlg', u'CustomButton', u'PushButton', 50, 118, 38, 38, 5767171, None, u'[CustomSetupIcon]', u'CompleteLabel', u'Custom Installation|'),
-(u'SetupTypeDlg', u'CustomLabel', u'Text', 105, 118, 100, 10, 3, None, u'[DlgTitleFont]C&ustom', u'CustomButton', None),
-(u'SetupTypeDlg', u'CustomText', u'Text', 105, 131, 230, 30, 3, None, u'Allows users to choose which program features will be installed and where they will be installed. Recommended for advanced users.', None, None),
-(u'SetupTypeDlg', u'TypicalButton', u'PushButton', 50, 65, 38, 38, 5767171, None, u'[InstallerIcon]', u'CustomLabel', u'Typical Installation|'),
-(u'SetupTypeDlg', u'TypicalText', u'Text', 105, 78, 230, 20, 3, None, u'Installs the most common program features. Recommended for most users.', None, None),
-(u'UserRegistrationDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'NameLabel', None),
-(u'UserRegistrationDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'UserRegistrationDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'UserRegistrationDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'BannerBitmap', None),
-(u'UserRegistrationDlg', u'Description', u'Text', 25, 23, 280, 15, 196611, None, u'Please enter your customer information', None, None),
-(u'UserRegistrationDlg', u'Title', u'Text', 15, 6, 200, 15, 196611, None, u'[DlgTitleFont]Customer Information', None, None),
-(u'UserRegistrationDlg', u'Back', u'PushButton', 180, 243, 56, 17, 3, None, u'[ButtonText_Back]', u'Next', None),
-(u'UserRegistrationDlg', u'Next', u'PushButton', 236, 243, 56, 17, 3, None, u'[ButtonText_Next]', u'Cancel', None),
-(u'UserRegistrationDlg', u'OrganizationLabel', u'Text', 45, 110, 100, 15, 3, None, u'&Organization:', u'OrganizationEdit', None),
-(u'UserRegistrationDlg', u'CDKeyEdit', u'MaskedEdit', 45, 159, 250, 16, 3, u'PIDKEY', u'[PIDTemplate]', u'Back', None),
-(u'UserRegistrationDlg', u'CDKeyLabel', u'Text', 45, 147, 50, 10, 3, None, u'CD &Key:', u'CDKeyEdit', None),
-(u'UserRegistrationDlg', u'OrganizationEdit', u'Edit', 45, 122, 220, 18, 3, u'COMPANYNAME', u'{80}', u'CDKeyLabel', None),
-(u'UserRegistrationDlg', u'NameLabel', u'Text', 45, 73, 100, 15, 3, None, u'&User Name:', u'NameEdit', None),
-(u'UserRegistrationDlg', u'NameEdit', u'Edit', 45, 85, 220, 18, 3, u'USERNAME', u'{80}', u'OrganizationLabel', None),
-(u'VerifyReadyDlg', u'Text', u'Text', 25, 70, 320, 20, 3, None, u'Click Install to begin the installation. If you want to review or change any of your installation settings, click Back. Click Cancel to exit the wizard.', None, None),
-(u'VerifyReadyDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'Back', None),
-(u'VerifyReadyDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'VerifyReadyDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'VerifyReadyDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'BannerBitmap', None),
-(u'VerifyReadyDlg', u'Description', u'Text', 25, 23, 280, 15, 196611, None, u'The [Wizard] is ready to begin the [InstallMode] installation', None, None),
-(u'VerifyReadyDlg', u'Title', u'Text', 15, 6, 200, 15, 196611, None, u'[DlgTitleFont]Ready to Install', None, None),
-(u'VerifyReadyDlg', u'Back', u'PushButton', 180, 243, 56, 17, 3, None, u'[ButtonText_Back]', u'Install', None),
-(u'VerifyReadyDlg', u'Install', u'PushButton', 236, 243, 56, 17, 3, None, u'[ButtonText_Install]', u'Cancel', None),
-(u'VerifyRemoveDlg', u'Text', u'Text', 25, 70, 320, 30, 3, None, u'Click Remove to remove [ProductName] from your computer. If you want to review or change any of your installation settings, click Back. Click Cancel to exit the wizard.', None, None),
-(u'VerifyRemoveDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'Back', None),
-(u'VerifyRemoveDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'VerifyRemoveDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'VerifyRemoveDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'BannerBitmap', None),
-(u'VerifyRemoveDlg', u'Description', u'Text', 25, 23, 280, 15, 196611, None, u'You have chosen to remove the program from your computer.', None, None),
-(u'VerifyRemoveDlg', u'Title', u'Text', 15, 6, 200, 15, 196611, None, u'[DlgTitleFont]Remove [ProductName]', None, None),
-(u'VerifyRemoveDlg', u'Back', u'PushButton', 180, 243, 56, 17, 3, None, u'[ButtonText_Back]', u'Remove', None),
-(u'VerifyRemoveDlg', u'Remove', u'PushButton', 236, 243, 56, 17, 3, None, u'[ButtonText_Remove]', u'Cancel', None),
-(u'VerifyRepairDlg', u'Text', u'Text', 25, 70, 320, 30, 3, None, u'Click Repair to repair the installation of [ProductName]. If you want to review or change any of your installation settings, click Back. Click Cancel to exit the wizard.', None, None),
-(u'VerifyRepairDlg', u'BannerBitmap', u'Bitmap', 0, 0, 374, 44, 1, None, u'[BannerBitmap]', u'Back', None),
-(u'VerifyRepairDlg', u'BannerLine', u'Line', 0, 44, 374, 0, 1, None, None, None, None),
-(u'VerifyRepairDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'VerifyRepairDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'BannerBitmap', None),
-(u'VerifyRepairDlg', u'Description', u'Text', 25, 23, 280, 15, 196611, None, u'The [Wizard] is ready to begin the repair of [ProductName].', None, None),
-(u'VerifyRepairDlg', u'Title', u'Text', 15, 6, 200, 15, 196611, None, u'[DlgTitleFont]Repair [ProductName]', None, None),
-(u'VerifyRepairDlg', u'Back', u'PushButton', 180, 243, 56, 17, 3, None, u'[ButtonText_Back]', u'Repair', None),
-(u'VerifyRepairDlg', u'Repair', u'PushButton', 236, 243, 56, 17, 3, None, u'[ButtonText_Repair]', u'Cancel', None),
-(u'WaitForCostingDlg', u'Text', u'Text', 48, 15, 194, 30, 3, None, u'Please wait while the installer finishes determining your disk space requirements.', None, None),
-(u'WaitForCostingDlg', u'Icon', u'Icon', 15, 15, 24, 24, 5242881, None, u'[ExclamationIcon]', None, u'Exclamation icon|'),
-(u'WaitForCostingDlg', u'Return', u'PushButton', 102, 57, 56, 17, 3, None, u'[ButtonText_Return]', None, None),
-(u'WelcomeDlg', u'Bitmap', u'Bitmap', 0, 0, 370, 234, 1, None, u'[DialogBitmap]', u'Back', None),
-(u'WelcomeDlg', u'BottomLine', u'Line', 0, 234, 374, 0, 1, None, None, None, None),
-(u'WelcomeDlg', u'Cancel', u'PushButton', 304, 243, 56, 17, 3, None, u'[ButtonText_Cancel]', u'Bitmap', None),
-(u'WelcomeDlg', u'Description', u'Text', 135, 70, 220, 30, 196611, None, u'The [Wizard] will install [ProductName] on your computer. Click Next to continue or Cancel to exit the [Wizard].', None, None),
-(u'WelcomeDlg', u'Title', u'Text', 135, 20, 220, 60, 196611, None, u'{\\VerdanaBold13}Welcome to the [ProductName] [Wizard]', None, None),
-(u'WelcomeDlg', u'Back', u'PushButton', 180, 243, 56, 17, 1, None, u'[ButtonText_Back]', u'Next', None),
-(u'WelcomeDlg', u'Next', u'PushButton', 236, 243, 56, 17, 3, None, u'[ButtonText_Next]', u'Cancel', None),
-]
-
-ListBox = [
-]
-
-ActionText = [
-(u'InstallValidate', u'Validating install', None),
-(u'InstallFiles', u'Copying new files', u'File: [1], Directory: [9], Size: [6]'),
-(u'InstallAdminPackage', u'Copying network install files', u'File: [1], Directory: [9], Size: [6]'),
-(u'FileCost', u'Computing space requirements', None),
-(u'CostInitialize', u'Computing space requirements', None),
-(u'CostFinalize', u'Computing space requirements', None),
-(u'CreateShortcuts', u'Creating shortcuts', u'Shortcut: [1]'),
-(u'PublishComponents', u'Publishing Qualified Components', u'Component ID: [1], Qualifier: [2]'),
-(u'PublishFeatures', u'Publishing Product Features', u'Feature: [1]'),
-(u'PublishProduct', u'Publishing product information', None),
-(u'RegisterClassInfo', u'Registering Class servers', u'Class Id: [1]'),
-(u'RegisterExtensionInfo', u'Registering extension servers', u'Extension: [1]'),
-(u'RegisterMIMEInfo', u'Registering MIME info', u'MIME Content Type: [1], Extension: [2]'),
-(u'RegisterProgIdInfo', u'Registering program identifiers', u'ProgId: [1]'),
-(u'AllocateRegistrySpace', u'Allocating registry space', u'Free space: [1]'),
-(u'AppSearch', u'Searching for installed applications', u'Property: [1], Signature: [2]'),
-(u'BindImage', u'Binding executables', u'File: [1]'),
-(u'CCPSearch', u'Searching for qualifying products', None),
-(u'CreateFolders', u'Creating folders', u'Folder: [1]'),
-(u'DeleteServices', u'Deleting services', u'Service: [1]'),
-(u'DuplicateFiles', u'Creating duplicate files', u'File: [1], Directory: [9], Size: [6]'),
-(u'FindRelatedProducts', u'Searching for related applications', u'Found application: [1]'),
-(u'InstallODBC', u'Installing ODBC components', None),
-(u'InstallServices', u'Installing new services', u'Service: [2]'),
-(u'LaunchConditions', u'Evaluating launch conditions', None),
-(u'MigrateFeatureStates', u'Migrating feature states from related applications', u'Application: [1]'),
-(u'MoveFiles', u'Moving files', u'File: [1], Directory: [9], Size: [6]'),
-(u'PatchFiles', u'Patching files', u'File: [1], Directory: [2], Size: [3]'),
-(u'ProcessComponents', u'Updating component registration', None),
-(u'RegisterComPlus', u'Registering COM+ Applications and Components', u'AppId: [1]{{, AppType: [2], Users: [3], RSN: [4]}}'),
-(u'RegisterFonts', u'Registering fonts', u'Font: [1]'),
-(u'RegisterProduct', u'Registering product', u'[1]'),
-(u'RegisterTypeLibraries', u'Registering type libraries', u'LibID: [1]'),
-(u'RegisterUser', u'Registering user', u'[1]'),
-(u'RemoveDuplicateFiles', u'Removing duplicated files', u'File: [1], Directory: [9]'),
-(u'RemoveEnvironmentStrings', u'Updating environment strings', u'Name: [1], Value: [2], Action [3]'),
-(u'RemoveExistingProducts', u'Removing applications', u'Application: [1], Command line: [2]'),
-(u'RemoveFiles', u'Removing files', u'File: [1], Directory: [9]'),
-(u'RemoveFolders', u'Removing folders', u'Folder: [1]'),
-(u'RemoveIniValues', u'Removing INI files entries', u'File: [1], Section: [2], Key: [3], Value: [4]'),
-(u'RemoveODBC', u'Removing ODBC components', None),
-(u'RemoveRegistryValues', u'Removing system registry values', u'Key: [1], Name: [2]'),
-(u'RemoveShortcuts', u'Removing shortcuts', u'Shortcut: [1]'),
-(u'RMCCPSearch', u'Searching for qualifying products', None),
-(u'SelfRegModules', u'Registering modules', u'File: [1], Folder: [2]'),
-(u'SelfUnregModules', u'Unregistering modules', u'File: [1], Folder: [2]'),
-(u'SetODBCFolders', u'Initializing ODBC directories', None),
-(u'StartServices', u'Starting services', u'Service: [1]'),
-(u'StopServices', u'Stopping services', u'Service: [1]'),
-(u'UnpublishComponents', u'Unpublishing Qualified Components', u'Component ID: [1], Qualifier: [2]'),
-(u'UnpublishFeatures', u'Unpublishing Product Features', u'Feature: [1]'),
-(u'UnregisterClassInfo', u'Unregister Class servers', u'Class Id: [1]'),
-(u'UnregisterComPlus', u'Unregistering COM+ Applications and Components', u'AppId: [1]{{, AppType: [2]}}'),
-(u'UnregisterExtensionInfo', u'Unregistering extension servers', u'Extension: [1]'),
-(u'UnregisterFonts', u'Unregistering fonts', u'Font: [1]'),
-(u'UnregisterMIMEInfo', u'Unregistering MIME info', u'MIME Content Type: [1], Extension: [2]'),
-(u'UnregisterProgIdInfo', u'Unregistering program identifiers', u'ProgId: [1]'),
-(u'UnregisterTypeLibraries', u'Unregistering type libraries', u'LibID: [1]'),
-(u'WriteEnvironmentStrings', u'Updating environment strings', u'Name: [1], Value: [2], Action [3]'),
-(u'WriteIniValues', u'Writing INI files values', u'File: [1], Section: [2], Key: [3], Value: [4]'),
-(u'WriteRegistryValues', u'Writing system registry values', u'Key: [1], Name: [2], Value: [3]'),
-(u'Advertise', u'Advertising application', None),
-(u'GenerateScript', u'Generating script operations for action:', u'[1]'),
-(u'InstallSFPCatalogFile', u'Installing system catalog', u'File: [1], Dependencies: [2]'),
-(u'MsiPublishAssemblies', u'Publishing assembly information', u'Application Context:[1], Assembly Name:[2]'),
-(u'MsiUnpublishAssemblies', u'Unpublishing assembly information', u'Application Context:[1], Assembly Name:[2]'),
-(u'Rollback', u'Rolling back action:', u'[1]'),
-(u'RollbackCleanup', u'Removing backup files', u'File: [1]'),
-(u'UnmoveFiles', u'Removing moved files', u'File: [1], Directory: [9]'),
-(u'UnpublishProduct', u'Unpublishing product information', None),
-]
-
-ControlCondition = [
-(u'CustomizeDlg', u'Browse', u'Hide', u'Installed'),
-(u'CustomizeDlg', u'Location', u'Hide', u'Installed'),
-(u'CustomizeDlg', u'LocationLabel', u'Hide', u'Installed'),
-(u'LicenseAgreementDlg', u'Next', u'Disable', u'IAgree <> "Yes"'),
-(u'LicenseAgreementDlg', u'Next', u'Enable', u'IAgree = "Yes"'),
-]
-
-ControlEvent = [
-(u'AdminWelcomeDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'AdminWelcomeDlg', u'Next', u'NewDialog', u'AdminRegistrationDlg', u'1', 2),
-(u'AdminWelcomeDlg', u'Next', u'[InstallMode]', u'Server Image', u'1', 1),
-(u'ExitDialog', u'Finish', u'EndDialog', u'Return', u'1', None),
-(u'FatalError', u'Finish', u'EndDialog', u'Exit', u'1', None),
-(u'PrepareDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'ProgressDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'UserExit', u'Finish', u'EndDialog', u'Exit', u'1', None),
-(u'AdminBrowseDlg', u'Up', u'DirectoryListUp', u'0', u'1', None),
-(u'AdminBrowseDlg', u'Cancel', u'Reset', u'0', u'1', 1),
-(u'AdminBrowseDlg', u'Cancel', u'EndDialog', u'Return', u'1', 2),
-(u'AdminBrowseDlg', u'NewFolder', u'DirectoryListNew', u'0', u'1', None),
-(u'AdminBrowseDlg', u'OK', u'EndDialog', u'Return', u'1', 2),
-(u'AdminBrowseDlg', u'OK', u'SetTargetPath', u'TARGETDIR', u'1', 1),
-(u'AdminInstallPointDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'AdminInstallPointDlg', u'Back', u'NewDialog', u'AdminRegistrationDlg', u'1', None),
-(u'AdminInstallPointDlg', u'Next', u'SetTargetPath', u'TARGETDIR', u'1', 1),
-(u'AdminInstallPointDlg', u'Next', u'NewDialog', u'VerifyReadyDlg', u'1', 2),
-(u'AdminInstallPointDlg', u'Browse', u'SpawnDialog', u'AdminBrowseDlg', u'1', None),
-(u'AdminRegistrationDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'AdminRegistrationDlg', u'Back', u'NewDialog', u'AdminWelcomeDlg', u'1', None),
-(u'AdminRegistrationDlg', u'Next', u'NewDialog', u'AdminInstallPointDlg', u'ProductID', 2),
-(u'AdminRegistrationDlg', u'Next', u'ValidateProductID', u'0', u'0', 1),
-(u'BrowseDlg', u'Up', u'DirectoryListUp', u'0', u'1', None),
-(u'BrowseDlg', u'Cancel', u'Reset', u'0', u'1', 1),
-(u'BrowseDlg', u'Cancel', u'EndDialog', u'Return', u'1', 2),
-(u'BrowseDlg', u'NewFolder', u'DirectoryListNew', u'0', u'1', None),
-(u'BrowseDlg', u'OK', u'EndDialog', u'Return', u'1', 2),
-(u'BrowseDlg', u'OK', u'SetTargetPath', u'[_BrowseProperty]', u'1', 1),
-(u'CancelDlg', u'No', u'EndDialog', u'Return', u'1', None),
-(u'CancelDlg', u'Yes', u'EndDialog', u'Exit', u'1', None),
-(u'CustomizeDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'CustomizeDlg', u'Back', u'NewDialog', u'MaintenanceTypeDlg', u'InstallMode = "Change"', None),
-(u'CustomizeDlg', u'Back', u'NewDialog', u'SetupTypeDlg', u'InstallMode = "Custom"', None),
-(u'CustomizeDlg', u'Next', u'NewDialog', u'VerifyReadyDlg', u'1', None),
-(u'CustomizeDlg', u'Browse', u'SelectionBrowse', u'BrowseDlg', u'1', None),
-(u'CustomizeDlg', u'Reset', u'Reset', u'0', u'1', None),
-(u'CustomizeDlg', u'DiskCost', u'SpawnDialog', u'DiskCostDlg', u'1', 2),
-(u'DiskCostDlg', u'OK', u'EndDialog', u'Return', u'1', None),
-(u'ErrorDlg', u'Y', u'EndDialog', u'ErrorYes', u'1', None),
-(u'ErrorDlg', u'A', u'EndDialog', u'ErrorAbort', u'1', None),
-(u'ErrorDlg', u'C', u'EndDialog', u'ErrorCancel', u'1', None),
-(u'ErrorDlg', u'I', u'EndDialog', u'ErrorIgnore', u'1', None),
-(u'ErrorDlg', u'N', u'EndDialog', u'ErrorNo', u'1', None),
-(u'ErrorDlg', u'O', u'EndDialog', u'ErrorOk', u'1', None),
-(u'ErrorDlg', u'R', u'EndDialog', u'ErrorRetry', u'1', None),
-(u'FilesInUse', u'Retry', u'EndDialog', u'Retry', u'1', None),
-(u'FilesInUse', u'Exit', u'EndDialog', u'Exit', u'1', None),
-(u'FilesInUse', u'Ignore', u'EndDialog', u'Ignore', u'1', None),
-(u'LicenseAgreementDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'LicenseAgreementDlg', u'Back', u'NewDialog', u'WelcomeDlg', u'1', None),
-(u'LicenseAgreementDlg', u'Next', u'NewDialog', u'SetupTypeDlg', u'IAgree = "Yes" AND ShowUserRegistrationDlg <> 1', 3),
-(u'LicenseAgreementDlg', u'Next', u'NewDialog', u'UserRegistrationDlg', u'IAgree = "Yes" AND ShowUserRegistrationDlg = 1', 1),
-(u'LicenseAgreementDlg', u'Next', u'SpawnWaitDialog', u'WaitForCostingDlg', u'CostingComplete = 1', 2),
-(u'MaintenanceTypeDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'MaintenanceTypeDlg', u'Back', u'NewDialog', u'MaintenanceWelcomeDlg', u'1', None),
-(u'MaintenanceTypeDlg', u'ChangeButton', u'NewDialog', u'CustomizeDlg', u'1', 4),
-(u'MaintenanceTypeDlg', u'ChangeButton', u'[InstallMode]', u'Change', u'1', 1),
-(u'MaintenanceTypeDlg', u'ChangeButton', u'[Progress1]', u'Changing', u'1', 2),
-(u'MaintenanceTypeDlg', u'ChangeButton', u'[Progress2]', u'changes', u'1', 3),
-(u'MaintenanceTypeDlg', u'RemoveButton', u'NewDialog', u'VerifyRemoveDlg', u'1', 4),
-(u'MaintenanceTypeDlg', u'RemoveButton', u'[InstallMode]', u'Remove', u'1', 1),
-(u'MaintenanceTypeDlg', u'RemoveButton', u'[Progress1]', u'Removing', u'1', 2),
-(u'MaintenanceTypeDlg', u'RemoveButton', u'[Progress2]', u'removes', u'1', 3),
-(u'MaintenanceTypeDlg', u'RepairButton', u'NewDialog', u'VerifyRepairDlg', u'1', 4),
-(u'MaintenanceTypeDlg', u'RepairButton', u'[InstallMode]', u'Repair', u'1', 1),
-(u'MaintenanceTypeDlg', u'RepairButton', u'[Progress1]', u'Repairing', u'1', 2),
-(u'MaintenanceTypeDlg', u'RepairButton', u'[Progress2]', u'repairs', u'1', 3),
-(u'MaintenanceWelcomeDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'MaintenanceWelcomeDlg', u'Next', u'NewDialog', u'MaintenanceTypeDlg', u'1', 2),
-(u'MaintenanceWelcomeDlg', u'Next', u'SpawnWaitDialog', u'WaitForCostingDlg', u'CostingComplete = 1', 1),
-(u'OutOfDiskDlg', u'OK', u'EndDialog', u'Return', u'1', None),
-(u'OutOfRbDiskDlg', u'No', u'EndDialog', u'Return', u'1', None),
-(u'OutOfRbDiskDlg', u'Yes', u'EndDialog', u'Return', u'1', 2),
-(u'OutOfRbDiskDlg', u'Yes', u'EnableRollback', u'False', u'1', 1),
-(u'ResumeDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'ResumeDlg', u'Install', u'EndDialog', u'Return', u'OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"', 4),
-(u'ResumeDlg', u'Install', u'EndDialog', u'Return', u'OutOfDiskSpace <> 1', 2),
-(u'ResumeDlg', u'Install', u'SpawnDialog', u'OutOfDiskDlg', u'(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")', 6),
-(u'ResumeDlg', u'Install', u'SpawnDialog', u'OutOfRbDiskDlg', u'OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)', 3),
-(u'ResumeDlg', u'Install', u'SpawnWaitDialog', u'WaitForCostingDlg', u'CostingComplete = 1', 1),
-(u'ResumeDlg', u'Install', u'EnableRollback', u'False', u'OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"', 5),
-(u'SetupTypeDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'SetupTypeDlg', u'Back', u'NewDialog', u'LicenseAgreementDlg', u'ShowUserRegistrationDlg <> 1', None),
-(u'SetupTypeDlg', u'Back', u'NewDialog', u'UserRegistrationDlg', u'ShowUserRegistrationDlg = 1', None),
-(u'SetupTypeDlg', u'CompleteButton', u'NewDialog', u'VerifyReadyDlg', u'1', 3),
-(u'SetupTypeDlg', u'CompleteButton', u'[InstallMode]', u'Complete', u'1', 1),
-(u'SetupTypeDlg', u'CompleteButton', u'SetInstallLevel', u'1000', u'1', 2),
-(u'SetupTypeDlg', u'CustomButton', u'NewDialog', u'CustomizeDlg', u'1', 2),
-(u'SetupTypeDlg', u'CustomButton', u'[InstallMode]', u'Custom', u'1', 1),
-(u'SetupTypeDlg', u'TypicalButton', u'NewDialog', u'VerifyReadyDlg', u'1', 3),
-(u'SetupTypeDlg', u'TypicalButton', u'[InstallMode]', u'Typical', u'1', 1),
-(u'SetupTypeDlg', u'TypicalButton', u'SetInstallLevel', u'3', u'1', 2),
-(u'UserRegistrationDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'UserRegistrationDlg', u'Back', u'NewDialog', u'LicenseAgreementDlg', u'1', None),
-(u'UserRegistrationDlg', u'Next', u'NewDialog', u'SetupTypeDlg', u'ProductID', 3),
-(u'UserRegistrationDlg', u'Next', u'ValidateProductID', u'0', u'0', 1),
-(u'UserRegistrationDlg', u'Next', u'SpawnWaitDialog', u'WaitForCostingDlg', u'CostingComplete = 1', 2),
-(u'VerifyReadyDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'VerifyReadyDlg', u'Back', u'NewDialog', u'AdminInstallPointDlg', u'InstallMode = "Server Image"', None),
-(u'VerifyReadyDlg', u'Back', u'NewDialog', u'CustomizeDlg', u'InstallMode = "Custom" OR InstallMode = "Change"', None),
-(u'VerifyReadyDlg', u'Back', u'NewDialog', u'MaintenanceTypeDlg', u'InstallMode = "Repair"', None),
-(u'VerifyReadyDlg', u'Back', u'NewDialog', u'SetupTypeDlg', u'InstallMode = "Typical" OR InstallMode = "Complete"', None),
-(u'VerifyReadyDlg', u'Install', u'EndDialog', u'Return', u'OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"', 3),
-(u'VerifyReadyDlg', u'Install', u'EndDialog', u'Return', u'OutOfDiskSpace <> 1', 1),
-(u'VerifyReadyDlg', u'Install', u'SpawnDialog', u'OutOfDiskDlg', u'(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")', 5),
-(u'VerifyReadyDlg', u'Install', u'SpawnDialog', u'OutOfRbDiskDlg', u'OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)', 2),
-(u'VerifyReadyDlg', u'Install', u'EnableRollback', u'False', u'OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"', 4),
-(u'VerifyRemoveDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'VerifyRemoveDlg', u'Back', u'NewDialog', u'MaintenanceTypeDlg', u'1', None),
-(u'VerifyRemoveDlg', u'Remove', u'Remove', u'All', u'OutOfDiskSpace <> 1', 1),
-(u'VerifyRemoveDlg', u'Remove', u'EndDialog', u'Return', u'OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"', 4),
-(u'VerifyRemoveDlg', u'Remove', u'EndDialog', u'Return', u'OutOfDiskSpace <> 1', 2),
-(u'VerifyRemoveDlg', u'Remove', u'SpawnDialog', u'OutOfDiskDlg', u'(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")', 6),
-(u'VerifyRemoveDlg', u'Remove', u'SpawnDialog', u'OutOfRbDiskDlg', u'OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)', 3),
-(u'VerifyRemoveDlg', u'Remove', u'EnableRollback', u'False', u'OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"', 5),
-(u'VerifyRepairDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'VerifyRepairDlg', u'Back', u'NewDialog', u'MaintenanceTypeDlg', u'1', None),
-(u'VerifyRepairDlg', u'Repair', u'EndDialog', u'Return', u'OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"', 5),
-(u'VerifyRepairDlg', u'Repair', u'EndDialog', u'Return', u'OutOfDiskSpace <> 1', 3),
-(u'VerifyRepairDlg', u'Repair', u'SpawnDialog', u'OutOfDiskDlg', u'(OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 1) OR (OutOfDiskSpace = 1 AND PROMPTROLLBACKCOST="F")', 7),
-(u'VerifyRepairDlg', u'Repair', u'SpawnDialog', u'OutOfRbDiskDlg', u'OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND (PROMPTROLLBACKCOST="P" OR NOT PROMPTROLLBACKCOST)', 4),
-(u'VerifyRepairDlg', u'Repair', u'EnableRollback', u'False', u'OutOfDiskSpace = 1 AND OutOfNoRbDiskSpace = 0 AND PROMPTROLLBACKCOST="D"', 6),
-(u'VerifyRepairDlg', u'Repair', u'Reinstall', u'All', u'OutOfDiskSpace <> 1', 2),
-(u'VerifyRepairDlg', u'Repair', u'ReinstallMode', u'ecmus', u'OutOfDiskSpace <> 1', 1),
-(u'WaitForCostingDlg', u'Return', u'EndDialog', u'Exit', u'1', None),
-(u'WelcomeDlg', u'Cancel', u'SpawnDialog', u'CancelDlg', u'1', None),
-(u'WelcomeDlg', u'Next', u'NewDialog', u'LicenseAgreementDlg', u'1', None),
-]
-
-Dialog = [
-(u'AdminWelcomeDlg', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'Next', u'Next', u'Cancel'),
-(u'ExitDialog', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'Finish', u'Finish', u'Finish'),
-(u'FatalError', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'Finish', u'Finish', u'Finish'),
-(u'PrepareDlg', 50, 50, 370, 270, 1, u'[ProductName] [Setup]', u'Cancel', u'Cancel', u'Cancel'),
-(u'ProgressDlg', 50, 50, 370, 270, 1, u'[ProductName] [Setup]', u'Cancel', u'Cancel', u'Cancel'),
-(u'UserExit', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'Finish', u'Finish', u'Finish'),
-(u'AdminBrowseDlg', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'PathEdit', u'OK', u'Cancel'),
-(u'AdminInstallPointDlg', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'Text', u'Next', u'Cancel'),
-(u'AdminRegistrationDlg', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'OrganizationLabel', u'Next', u'Cancel'),
-(u'BrowseDlg', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'PathEdit', u'OK', u'Cancel'),
-(u'CancelDlg', 50, 10, 260, 85, 3, u'[ProductName] [Setup]', u'No', u'No', u'No'),
-(u'CustomizeDlg', 50, 50, 370, 270, 35, u'[ProductName] [Setup]', u'Tree', u'Next', u'Cancel'),
-(u'DiskCostDlg', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'OK', u'OK', u'OK'),
-(u'ErrorDlg', 50, 10, 270, 105, 65539, u'Installer Information', u'ErrorText', None, None),
-(u'FilesInUse', 50, 50, 370, 270, 19, u'[ProductName] [Setup]', u'Retry', u'Retry', u'Retry'),
-(u'LicenseAgreementDlg', 50, 50, 370, 270, 3, u'[ProductName] License Agreement', u'Buttons', u'Next', u'Cancel'),
-(u'MaintenanceTypeDlg', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'ChangeLabel', u'ChangeButton', u'Cancel'),
-(u'MaintenanceWelcomeDlg', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'Next', u'Next', u'Cancel'),
-(u'OutOfDiskDlg', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'OK', u'OK', u'OK'),
-(u'OutOfRbDiskDlg', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'No', u'No', u'No'),
-(u'ResumeDlg', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'Install', u'Install', u'Cancel'),
-(u'SetupTypeDlg', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'TypicalLabel', u'TypicalButton', u'Cancel'),
-(u'UserRegistrationDlg', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'NameLabel', u'Next', u'Cancel'),
-(u'VerifyReadyDlg', 50, 50, 370, 270, 35, u'[ProductName] [Setup]', u'Install', u'Install', u'Cancel'),
-(u'VerifyRemoveDlg', 50, 50, 370, 270, 35, u'[ProductName] [Setup]', u'Back', u'Back', u'Cancel'),
-(u'VerifyRepairDlg', 50, 50, 370, 270, 35, u'[ProductName] [Setup]', u'Repair', u'Repair', u'Cancel'),
-(u'WaitForCostingDlg', 50, 10, 260, 85, 3, u'[ProductName] [Setup]', u'Return', u'Return', u'Return'),
-(u'WelcomeDlg', 50, 50, 370, 270, 3, u'[ProductName] [Setup]', u'Next', u'Next', u'Cancel'),
-]
-
-EventMapping = [
-(u'PrepareDlg', u'ActionData', u'ActionData', u'Text'),
-(u'PrepareDlg', u'ActionText', u'ActionText', u'Text'),
-(u'ProgressDlg', u'ActionText', u'ActionText', u'Text'),
-(u'ProgressDlg', u'ProgressBar', u'SetProgress', u'Progress'),
-(u'AdminBrowseDlg', u'DirectoryCombo', u'IgnoreChange', u'IgnoreChange'),
-(u'BrowseDlg', u'DirectoryCombo', u'IgnoreChange', u'IgnoreChange'),
-(u'CustomizeDlg', u'Next', u'SelectionNoItems', u'Enabled'),
-(u'CustomizeDlg', u'Reset', u'SelectionNoItems', u'Enabled'),
-(u'CustomizeDlg', u'DiskCost', u'SelectionNoItems', u'Enabled'),
-(u'CustomizeDlg', u'ItemDescription', u'SelectionDescription', u'Text'),
-(u'CustomizeDlg', u'ItemSize', u'SelectionSize', u'Text'),
-(u'CustomizeDlg', u'Location', u'SelectionPath', u'Text'),
-(u'CustomizeDlg', u'Location', u'SelectionPathOn', u'Visible'),
-(u'CustomizeDlg', u'LocationLabel', u'SelectionPathOn', u'Visible'),
-]
-
-InstallExecuteSequence = [
-(u'InstallValidate', None, 1400),
-(u'InstallInitialize', None, 1500),
-(u'InstallFinalize', None, 6600),
-(u'InstallFiles', None, 4000),
-(u'FileCost', None, 900),
-(u'CostInitialize', None, 800),
-(u'CostFinalize', None, 1000),
-(u'CreateShortcuts', None, 4500),
-(u'PublishComponents', None, 6200),
-(u'PublishFeatures', None, 6300),
-(u'PublishProduct', None, 6400),
-(u'RegisterClassInfo', None, 4600),
-(u'RegisterExtensionInfo', None, 4700),
-(u'RegisterMIMEInfo', None, 4900),
-(u'RegisterProgIdInfo', None, 4800),
-(u'ValidateProductID', None, 700),
-(u'AllocateRegistrySpace', u'NOT Installed', 1550),
-(u'AppSearch', None, 400),
-(u'BindImage', None, 4300),
-(u'CCPSearch', u'NOT Installed', 500),
-(u'CreateFolders', None, 3700),
-(u'DeleteServices', u'VersionNT', 2000),
-(u'DuplicateFiles', None, 4210),
-(u'FindRelatedProducts', None, 200),
-(u'InstallODBC', None, 5400),
-(u'InstallServices', u'VersionNT', 5800),
-(u'LaunchConditions', None, 100),
-(u'MigrateFeatureStates', None, 1200),
-(u'MoveFiles', None, 3800),
-(u'PatchFiles', None, 4090),
-(u'ProcessComponents', None, 1600),
-(u'RegisterComPlus', None, 5700),
-(u'RegisterFonts', None, 5300),
-(u'RegisterProduct', None, 6100),
-(u'RegisterTypeLibraries', None, 5500),
-(u'RegisterUser', None, 6000),
-(u'RemoveDuplicateFiles', None, 3400),
-(u'RemoveEnvironmentStrings', None, 3300),
-(u'RemoveExistingProducts', None, 6700),
-(u'RemoveFiles', None, 3500),
-(u'RemoveFolders', None, 3600),
-(u'RemoveIniValues', None, 3100),
-(u'RemoveODBC', None, 2400),
-(u'RemoveRegistryValues', None, 2600),
-(u'RemoveShortcuts', None, 3200),
-(u'RMCCPSearch', u'NOT Installed', 600),
-(u'SelfRegModules', None, 5600),
-(u'SelfUnregModules', None, 2200),
-(u'SetODBCFolders', None, 1100),
-(u'StartServices', u'VersionNT', 5900),
-(u'StopServices', u'VersionNT', 1900),
-(u'UnpublishComponents', None, 1700),
-(u'UnpublishFeatures', None, 1800),
-(u'UnregisterClassInfo', None, 2700),
-(u'UnregisterComPlus', None, 2100),
-(u'UnregisterExtensionInfo', None, 2800),
-(u'UnregisterFonts', None, 2500),
-(u'UnregisterMIMEInfo', None, 3000),
-(u'UnregisterProgIdInfo', None, 2900),
-(u'UnregisterTypeLibraries', None, 2300),
-(u'WriteEnvironmentStrings', None, 5200),
-(u'WriteIniValues', None, 5100),
-(u'WriteRegistryValues', None, 5000),
-]
-
-InstallUISequence = [
-#(u'FileCost', None, 900),
-#(u'CostInitialize', None, 800),
-#(u'CostFinalize', None, 1000),
-#(u'ExecuteAction', None, 1300),
-#(u'ExitDialog', None, -1),
-#(u'FatalError', None, -3),
-(u'PrepareDlg', None, 140),
-(u'ProgressDlg', None, 1280),
-#(u'UserExit', None, -2),
-(u'MaintenanceWelcomeDlg', u'Installed AND NOT RESUME AND NOT Preselected', 1250),
-(u'ResumeDlg', u'Installed AND (RESUME OR Preselected)', 1240),
-(u'WelcomeDlg', u'NOT Installed', 1230),
-#(u'AppSearch', None, 400),
-#(u'CCPSearch', u'NOT Installed', 500),
-#(u'FindRelatedProducts', None, 200),
-#(u'LaunchConditions', None, 100),
-#(u'MigrateFeatureStates', None, 1200),
-#(u'RMCCPSearch', u'NOT Installed', 600),
-]
-
-ListView = [
-]
-
-RadioButton = [
-(u'IAgree', 1, u'Yes', 5, 0, 250, 15, u'{\\DlgFont8}I &accept the terms in the License Agreement', None),
-(u'IAgree', 2, u'No', 5, 20, 250, 15, u'{\\DlgFont8}I &do not accept the terms in the License Agreement', None),
-]
-
-TextStyle = [
-(u'DlgFont8', u'Tahoma', 8, None, 0),
-(u'DlgFontBold8', u'Tahoma', 8, None, 1),
-(u'VerdanaBold13', u'Verdana', 13, None, 1),
-]
-
-UIText = [
-(u'AbsentPath', None),
-(u'bytes', u'bytes'),
-(u'GB', u'GB'),
-(u'KB', u'KB'),
-(u'MB', u'MB'),
-(u'MenuAbsent', u'Entire feature will be unavailable'),
-(u'MenuAdvertise', u'Feature will be installed when required'),
-(u'MenuAllCD', u'Entire feature will be installed to run from CD'),
-(u'MenuAllLocal', u'Entire feature will be installed on local hard drive'),
-(u'MenuAllNetwork', u'Entire feature will be installed to run from network'),
-(u'MenuCD', u'Will be installed to run from CD'),
-(u'MenuLocal', u'Will be installed on local hard drive'),
-(u'MenuNetwork', u'Will be installed to run from network'),
-(u'ScriptInProgress', u'Gathering required information...'),
-(u'SelAbsentAbsent', u'This feature will remain uninstalled'),
-(u'SelAbsentAdvertise', u'This feature will be set to be installed when required'),
-(u'SelAbsentCD', u'This feature will be installed to run from CD'),
-(u'SelAbsentLocal', u'This feature will be installed on the local hard drive'),
-(u'SelAbsentNetwork', u'This feature will be installed to run from the network'),
-(u'SelAdvertiseAbsent', u'This feature will become unavailable'),
-(u'SelAdvertiseAdvertise', u'Will be installed when required'),
-(u'SelAdvertiseCD', u'This feature will be available to run from CD'),
-(u'SelAdvertiseLocal', u'This feature will be installed on your local hard drive'),
-(u'SelAdvertiseNetwork', u'This feature will be available to run from the network'),
-(u'SelCDAbsent', u"This feature will be uninstalled completely, you won't be able to run it from CD"),
-(u'SelCDAdvertise', u'This feature will change from run from CD state to set to be installed when required'),
-(u'SelCDCD', u'This feature will remain to be run from CD'),
-(u'SelCDLocal', u'This feature will change from run from CD state to be installed on the local hard drive'),
-(u'SelChildCostNeg', u'This feature frees up [1] on your hard drive.'),
-(u'SelChildCostPos', u'This feature requires [1] on your hard drive.'),
-(u'SelCostPending', u'Compiling cost for this feature...'),
-(u'SelLocalAbsent', u'This feature will be completely removed'),
-(u'SelLocalAdvertise', u'This feature will be removed from your local hard drive, but will be set to be installed when required'),
-(u'SelLocalCD', u'This feature will be removed from your local hard drive, but will be still available to run from CD'),
-(u'SelLocalLocal', u'This feature will remain on you local hard drive'),
-(u'SelLocalNetwork', u'This feature will be removed from your local hard drive, but will be still available to run from the network'),
-(u'SelNetworkAbsent', u"This feature will be uninstalled completely, you won't be able to run it from the network"),
-(u'SelNetworkAdvertise', u'This feature will change from run from network state to set to be installed when required'),
-(u'SelNetworkLocal', u'This feature will change from run from network state to be installed on the local hard drive'),
-(u'SelNetworkNetwork', u'This feature will remain to be run from the network'),
-(u'SelParentCostNegNeg', u'This feature frees up [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures free up [4] on your hard drive.'),
-(u'SelParentCostNegPos', u'This feature frees up [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures require [4] on your hard drive.'),
-(u'SelParentCostPosNeg', u'This feature requires [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures free up [4] on your hard drive.'),
-(u'SelParentCostPosPos', u'This feature requires [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures require [4] on your hard drive.'),
-(u'TimeRemaining', u'Time remaining: {[1] minutes }{[2] seconds}'),
-(u'VolumeCostAvailable', u'Available'),
-(u'VolumeCostDifference', u'Difference'),
-(u'VolumeCostRequired', u'Required'),
-(u'VolumeCostSize', u'Disk Size'),
-(u'VolumeCostVolume', u'Volume'),
-]
-
-_Validation = [
-(u'AdminExecuteSequence', u'Action', u'N', None, None, None, None, u'Identifier', None, u'Name of action to invoke, either in the engine or the handler DLL.'),
-(u'AdminExecuteSequence', u'Sequence', u'Y', -4, 32767, None, None, None, None, u'Number that determines the sort order in which the actions are to be executed. Leave blank to suppress action.'),
-(u'AdminExecuteSequence', u'Condition', u'Y', None, None, None, None, u'Condition', None, u'Optional expression which skips the action if evaluates to expFalse.If the expression syntax is invalid, the engine will terminate, returning iesBadActionData.'),
-(u'AdminUISequence', u'Action', u'N', None, None, None, None, u'Identifier', None, u'Name of action to invoke, either in the engine or the handler DLL.'),
-(u'AdminUISequence', u'Sequence', u'Y', -4, 32767, None, None, None, None, u'Number that determines the sort order in which the actions are to be executed. Leave blank to suppress action.'),
-(u'AdminUISequence', u'Condition', u'Y', None, None, None, None, u'Condition', None, u'Optional expression which skips the action if evaluates to expFalse.If the expression syntax is invalid, the engine will terminate, returning iesBadActionData.'),
-(u'Condition', u'Condition', u'Y', None, None, None, None, u'Condition', None, u'Expression evaluated to determine if Level in the Feature table is to change.'),
-(u'Condition', u'Feature_', u'N', None, None, u'Feature', 1, u'Identifier', None, u'Reference to a Feature entry in Feature table.'),
-(u'Condition', u'Level', u'N', 0, 32767, None, None, None, None, u'New selection Level to set in Feature table if Condition evaluates to TRUE.'),
-(u'AdvtExecuteSequence', u'Action', u'N', None, None, None, None, u'Identifier', None, u'Name of action to invoke, either in the engine or the handler DLL.'),
-(u'AdvtExecuteSequence', u'Sequence', u'Y', -4, 32767, None, None, None, None, u'Number that determines the sort order in which the actions are to be executed. Leave blank to suppress action.'),
-(u'AdvtExecuteSequence', u'Condition', u'Y', None, None, None, None, u'Condition', None, u'Optional expression which skips the action if evaluates to expFalse.If the expression syntax is invalid, the engine will terminate, returning iesBadActionData.'),
-(u'BBControl', u'Type', u'N', None, None, None, None, u'Identifier', None, u'The type of the control.'),
-(u'BBControl', u'BBControl', u'N', None, None, None, None, u'Identifier', None, u'Name of the control. This name must be unique within a billboard, but can repeat on different billboard.'),
-(u'BBControl', u'Billboard_', u'N', None, None, u'Billboard', 1, u'Identifier', None, u'External key to the Billboard table, name of the billboard.'),
-(u'BBControl', u'X', u'N', 0, 32767, None, None, None, None, u'Horizontal coordinate of the upper left corner of the bounding rectangle of the control.'),
-(u'BBControl', u'Y', u'N', 0, 32767, None, None, None, None, u'Vertical coordinate of the upper left corner of the bounding rectangle of the control.'),
-(u'BBControl', u'Width', u'N', 0, 32767, None, None, None, None, u'Width of the bounding rectangle of the control.'),
-(u'BBControl', u'Height', u'N', 0, 32767, None, None, None, None, u'Height of the bounding rectangle of the control.'),
-(u'BBControl', u'Attributes', u'Y', 0, 2147483647, None, None, None, None, u'A 32-bit word that specifies the attribute flags to be applied to this control.'),
-(u'BBControl', u'Text', u'Y', None, None, None, None, u'Text', None, u'A string used to set the initial text contained within a control (if appropriate).'),
-(u'Billboard', u'Action', u'Y', None, None, None, None, u'Identifier', None, u'The name of an action. The billboard is displayed during the progress messages received from this action.'),
-(u'Billboard', u'Billboard', u'N', None, None, None, None, u'Identifier', None, u'Name of the billboard.'),
-(u'Billboard', u'Feature_', u'N', None, None, u'Feature', 1, u'Identifier', None, u'An external key to the Feature Table. The billboard is shown only if this feature is being installed.'),
-(u'Billboard', u'Ordering', u'Y', 0, 32767, None, None, None, None, u'A positive integer. If there is more than one billboard corresponding to an action they will be shown in the order defined by this column.'),
-(u'Binary', u'Name', u'N', None, None, None, None, u'Identifier', None, u'Unique key identifying the binary data.'),
-(u'Binary', u'Data', u'N', None, None, None, None, u'Binary', None, u'The unformatted binary data.'),
-(u'CheckBox', u'Property', u'N', None, None, None, None, u'Identifier', None, u'A named property to be tied to the item.'),
-(u'CheckBox', u'Value', u'Y', None, None, None, None, u'Formatted', None, u'The value string associated with the item.'),
-(u'Property', u'Property', u'N', None, None, None, None, u'Identifier', None, u'Name of property, uppercase if settable by launcher or loader.'),
-(u'Property', u'Value', u'N', None, None, None, None, u'Text', None, u'String value for property. Never null or empty.'),
-(u'ComboBox', u'Text', u'Y', None, None, None, None, u'Formatted', None, u'The visible text to be assigned to the item. Optional. If this entry or the entire column is missing, the text is the same as the value.'),
-(u'ComboBox', u'Property', u'N', None, None, None, None, u'Identifier', None, u'A named property to be tied to this item. All the items tied to the same property become part of the same combobox.'),
-(u'ComboBox', u'Value', u'N', None, None, None, None, u'Formatted', None, u'The value string associated with this item. Selecting the line will set the associated property to this value.'),
-(u'ComboBox', u'Order', u'N', 1, 32767, None, None, None, None, u'A positive integer used to determine the ordering of the items within one list.\tThe integers do not have to be consecutive.'),
-(u'Control', u'Type', u'N', None, None, None, None, u'Identifier', None, u'The type of the control.'),
-(u'Control', u'X', u'N', 0, 32767, None, None, None, None, u'Horizontal coordinate of the upper left corner of the bounding rectangle of the control.'),
-(u'Control', u'Y', u'N', 0, 32767, None, None, None, None, u'Vertical coordinate of the upper left corner of the bounding rectangle of the control.'),
-(u'Control', u'Width', u'N', 0, 32767, None, None, None, None, u'Width of the bounding rectangle of the control.'),
-(u'Control', u'Height', u'N', 0, 32767, None, None, None, None, u'Height of the bounding rectangle of the control.'),
-(u'Control', u'Attributes', u'Y', 0, 2147483647, None, None, None, None, u'A 32-bit word that specifies the attribute flags to be applied to this control.'),
-(u'Control', u'Text', u'Y', None, None, None, None, u'Formatted', None, u'A string used to set the initial text contained within a control (if appropriate).'),
-(u'Control', u'Property', u'Y', None, None, None, None, u'Identifier', None, u'The name of a defined property to be linked to this control. '),
-(u'Control', u'Control', u'N', None, None, None, None, u'Identifier', None, u'Name of the control. This name must be unique within a dialog, but can repeat on different dialogs. '),
-(u'Control', u'Dialog_', u'N', None, None, u'Dialog', 1, u'Identifier', None, u'External key to the Dialog table, name of the dialog.'),
-(u'Control', u'Control_Next', u'Y', None, None, u'Control', 2, u'Identifier', None, u'The name of an other control on the same dialog. This link defines the tab order of the controls. The links have to form one or more cycles!'),
-(u'Control', u'Help', u'Y', None, None, None, None, u'Text', None, u'The help strings used with the button. The text is optional. '),
-(u'Icon', u'Name', u'N', None, None, None, None, u'Identifier', None, u'Primary key. Name of the icon file.'),
-(u'Icon', u'Data', u'N', None, None, None, None, u'Binary', None, u'Binary stream. The binary icon data in PE (.DLL or .EXE) or icon (.ICO) format.'),
-(u'ListBox', u'Text', u'Y', None, None, None, None, u'Text', None, u'The visible text to be assigned to the item. Optional. If this entry or the entire column is missing, the text is the same as the value.'),
-(u'ListBox', u'Property', u'N', None, None, None, None, u'Identifier', None, u'A named property to be tied to this item. All the items tied to the same property become part of the same listbox.'),
-(u'ListBox', u'Value', u'N', None, None, None, None, u'Formatted', None, u'The value string associated with this item. Selecting the line will set the associated property to this value.'),
-(u'ListBox', u'Order', u'N', 1, 32767, None, None, None, None, u'A positive integer used to determine the ordering of the items within one list..The integers do not have to be consecutive.'),
-(u'ActionText', u'Action', u'N', None, None, None, None, u'Identifier', None, u'Name of action to be described.'),
-(u'ActionText', u'Description', u'Y', None, None, None, None, u'Text', None, u'Localized description displayed in progress dialog and log when action is executing.'),
-(u'ActionText', u'Template', u'Y', None, None, None, None, u'Template', None, u'Optional localized format template used to format action data records for display during action execution.'),
-(u'ControlCondition', u'Action', u'N', None, None, None, None, None, u'Default;Disable;Enable;Hide;Show', u'The desired action to be taken on the specified control.'),
-(u'ControlCondition', u'Condition', u'N', None, None, None, None, u'Condition', None, u'A standard conditional statement that specifies under which conditions the action should be triggered.'),
-(u'ControlCondition', u'Dialog_', u'N', None, None, u'Dialog', 1, u'Identifier', None, u'A foreign key to the Dialog table, name of the dialog.'),
-(u'ControlCondition', u'Control_', u'N', None, None, u'Control', 2, u'Identifier', None, u'A foreign key to the Control table, name of the control.'),
-(u'ControlEvent', u'Condition', u'Y', None, None, None, None, u'Condition', None, u'A standard conditional statement that specifies under which conditions an event should be triggered.'),
-(u'ControlEvent', u'Ordering', u'Y', 0, 2147483647, None, None, None, None, u'An integer used to order several events tied to the same control. Can be left blank.'),
-(u'ControlEvent', u'Dialog_', u'N', None, None, u'Dialog', 1, u'Identifier', None, u'A foreign key to the Dialog table, name of the dialog.'),
-(u'ControlEvent', u'Control_', u'N', None, None, u'Control', 2, u'Identifier', None, u'A foreign key to the Control table, name of the control'),
-(u'ControlEvent', u'Event', u'N', None, None, None, None, u'Formatted', None, u'An identifier that specifies the type of the event that should take place when the user interacts with control specified by the first two entries.'),
-(u'ControlEvent', u'Argument', u'N', None, None, None, None, u'Formatted', None, u'A value to be used as a modifier when triggering a particular event.'),
-(u'Dialog', u'Width', u'N', 0, 32767, None, None, None, None, u'Width of the bounding rectangle of the dialog.'),
-(u'Dialog', u'Height', u'N', 0, 32767, None, None, None, None, u'Height of the bounding rectangle of the dialog.'),
-(u'Dialog', u'Attributes', u'Y', 0, 2147483647, None, None, None, None, u'A 32-bit word that specifies the attribute flags to be applied to this dialog.'),
-(u'Dialog', u'Title', u'Y', None, None, None, None, u'Formatted', None, u"A text string specifying the title to be displayed in the title bar of the dialog's window."),
-(u'Dialog', u'Dialog', u'N', None, None, None, None, u'Identifier', None, u'Name of the dialog.'),
-(u'Dialog', u'HCentering', u'N', 0, 100, None, None, None, None, u'Horizontal position of the dialog on a 0-100 scale. 0 means left end, 100 means right end of the screen, 50 center.'),
-(u'Dialog', u'VCentering', u'N', 0, 100, None, None, None, None, u'Vertical position of the dialog on a 0-100 scale. 0 means top end, 100 means bottom end of the screen, 50 center.'),
-(u'Dialog', u'Control_First', u'N', None, None, u'Control', 2, u'Identifier', None, u'Defines the control that has the focus when the dialog is created.'),
-(u'Dialog', u'Control_Default', u'Y', None, None, u'Control', 2, u'Identifier', None, u'Defines the default control. Hitting return is equivalent to pushing this button.'),
-(u'Dialog', u'Control_Cancel', u'Y', None, None, u'Control', 2, u'Identifier', None, u'Defines the cancel control. Hitting escape or clicking on the close icon on the dialog is equivalent to pushing this button.'),
-(u'EventMapping', u'Dialog_', u'N', None, None, u'Dialog', 1, u'Identifier', None, u'A foreign key to the Dialog table, name of the Dialog.'),
-(u'EventMapping', u'Control_', u'N', None, None, u'Control', 2, u'Identifier', None, u'A foreign key to the Control table, name of the control.'),
-(u'EventMapping', u'Event', u'N', None, None, None, None, u'Identifier', None, u'An identifier that specifies the type of the event that the control subscribes to.'),
-(u'EventMapping', u'Attribute', u'N', None, None, None, None, u'Identifier', None, u'The name of the control attribute, that is set when this event is received.'),
-(u'InstallExecuteSequence', u'Action', u'N', None, None, None, None, u'Identifier', None, u'Name of action to invoke, either in the engine or the handler DLL.'),
-(u'InstallExecuteSequence', u'Sequence', u'Y', -4, 32767, None, None, None, None, u'Number that determines the sort order in which the actions are to be executed. Leave blank to suppress action.'),
-(u'InstallExecuteSequence', u'Condition', u'Y', None, None, None, None, u'Condition', None, u'Optional expression which skips the action if evaluates to expFalse.If the expression syntax is invalid, the engine will terminate, returning iesBadActionData.'),
-(u'AppSearch', u'Property', u'N', None, None, None, None, u'Identifier', None, u'The property associated with a Signature'),
-(u'AppSearch', u'Signature_', u'N', None, None, u'Signature;RegLocator;IniLocator;DrLocator;CompLocator', 1, u'Identifier', None, u'The Signature_ represents a unique file signature and is also the foreign key in the Signature, RegLocator, IniLocator, CompLocator and the DrLocator tables.'),
-(u'BindImage', u'File_', u'N', None, None, u'File', 1, u'Identifier', None, u'The index into the File table. This must be an executable file.'),
-(u'BindImage', u'Path', u'Y', None, None, None, None, u'Paths', None, u'A list of ; delimited paths that represent the paths to be searched for the import DLLS. The list is usually a list of properties each enclosed within square brackets [] .'),
-(u'CCPSearch', u'Signature_', u'N', None, None, u'Signature;RegLocator;IniLocator;DrLocator;CompLocator', 1, u'Identifier', None, u'The Signature_ represents a unique file signature and is also the foreign key in the Signature, RegLocator, IniLocator, CompLocator and the DrLocator tables.'),
-(u'InstallUISequence', u'Action', u'N', None, None, None, None, u'Identifier', None, u'Name of action to invoke, either in the engine or the handler DLL.'),
-(u'InstallUISequence', u'Sequence', u'Y', -4, 32767, None, None, None, None, u'Number that determines the sort order in which the actions are to be executed. Leave blank to suppress action.'),
-(u'InstallUISequence', u'Condition', u'Y', None, None, None, None, u'Condition', None, u'Optional expression which skips the action if evaluates to expFalse.If the expression syntax is invalid, the engine will terminate, returning iesBadActionData.'),
-(u'ListView', u'Text', u'Y', None, None, None, None, u'Text', None, u'The visible text to be assigned to the item. Optional. If this entry or the entire column is missing, the text is the same as the value.'),
-(u'ListView', u'Property', u'N', None, None, None, None, u'Identifier', None, u'A named property to be tied to this item. All the items tied to the same property become part of the same listview.'),
-(u'ListView', u'Value', u'N', None, None, None, None, u'Identifier', None, u'The value string associated with this item. Selecting the line will set the associated property to this value.'),
-(u'ListView', u'Order', u'N', 1, 32767, None, None, None, None, u'A positive integer used to determine the ordering of the items within one list..The integers do not have to be consecutive.'),
-(u'ListView', u'Binary_', u'Y', None, None, u'Binary', 1, u'Identifier', None, u'The name of the icon to be displayed with the icon. The binary information is looked up from the Binary Table.'),
-(u'RadioButton', u'X', u'N', 0, 32767, None, None, None, None, u'The horizontal coordinate of the upper left corner of the bounding rectangle of the radio button.'),
-(u'RadioButton', u'Y', u'N', 0, 32767, None, None, None, None, u'The vertical coordinate of the upper left corner of the bounding rectangle of the radio button.'),
-(u'RadioButton', u'Width', u'N', 0, 32767, None, None, None, None, u'The width of the button.'),
-(u'RadioButton', u'Height', u'N', 0, 32767, None, None, None, None, u'The height of the button.'),
-(u'RadioButton', u'Text', u'Y', None, None, None, None, u'Text', None, u'The visible title to be assigned to the radio button.'),
-(u'RadioButton', u'Property', u'N', None, None, None, None, u'Identifier', None, u'A named property to be tied to this radio button. All the buttons tied to the same property become part of the same group.'),
-(u'RadioButton', u'Value', u'N', None, None, None, None, u'Formatted', None, u'The value string associated with this button. Selecting the button will set the associated property to this value.'),
-(u'RadioButton', u'Order', u'N', 1, 32767, None, None, None, None, u'A positive integer used to determine the ordering of the items within one list..The integers do not have to be consecutive.'),
-(u'RadioButton', u'Help', u'Y', None, None, None, None, u'Text', None, u'The help strings used with the button. The text is optional.'),
-(u'TextStyle', u'TextStyle', u'N', None, None, None, None, u'Identifier', None, u'Name of the style. The primary key of this table. This name is embedded in the texts to indicate a style change.'),
-(u'TextStyle', u'FaceName', u'N', None, None, None, None, u'Text', None, u'A string indicating the name of the font used. Required. The string must be at most 31 characters long.'),
-(u'TextStyle', u'Size', u'N', 0, 32767, None, None, None, None, u'The size of the font used. This size is given in our units (1/12 of the system font height). Assuming that the system font is set to 12 point size, this is equivalent to the point size.'),
-(u'TextStyle', u'Color', u'Y', 0, 16777215, None, None, None, None, u'A long integer indicating the color of the string in the RGB format (Red, Green, Blue each 0-255, RGB = R + 256*G + 256^2*B).'),
-(u'TextStyle', u'StyleBits', u'Y', 0, 15, None, None, None, None, u'A combination of style bits.'),
-(u'UIText', u'Text', u'Y', None, None, None, None, u'Text', None, u'The localized version of the string.'),
-(u'UIText', u'Key', u'N', None, None, None, None, u'Identifier', None, u'A unique key that identifies the particular string.'),
-(u'_Validation', u'Table', u'N', None, None, None, None, u'Identifier', None, u'Name of table'),
-(u'_Validation', u'Description', u'Y', None, None, None, None, u'Text', None, u'Description of column'),
-(u'_Validation', u'Column', u'N', None, None, None, None, u'Identifier', None, u'Name of column'),
-(u'_Validation', u'Nullable', u'N', None, None, None, None, None, u'Y;N;@', u'Whether the column is nullable'),
-(u'_Validation', u'MinValue', u'Y', -2147483647, 2147483647, None, None, None, None, u'Minimum value allowed'),
-(u'_Validation', u'MaxValue', u'Y', -2147483647, 2147483647, None, None, None, None, u'Maximum value allowed'),
-(u'_Validation', u'KeyTable', u'Y', None, None, None, None, u'Identifier', None, u'For foreign key, Name of table to which data must link'),
-(u'_Validation', u'KeyColumn', u'Y', 1, 32, None, None, None, None, u'Column to which foreign key connects'),
-(u'_Validation', u'Category', u'Y', None, None, None, None, None, u'Text;Formatted;Template;Condition;Guid;Path;Version;Language;Identifier;Binary;UpperCase;LowerCase;Filename;Paths;AnyPath;WildCardFilename;RegPath;KeyFormatted;CustomSource;Property;Cabinet;Shortcut;URL', u'String category'),
-(u'_Validation', u'Set', u'Y', None, None, None, None, u'Text', None, u'Set of values that are permitted'),
-(u'AdvtUISequence', u'Action', u'N', None, None, None, None, u'Identifier', None, u'Name of action to invoke, either in the engine or the handler DLL.'),
-(u'AdvtUISequence', u'Sequence', u'Y', -4, 32767, None, None, None, None, u'Number that determines the sort order in which the actions are to be executed. Leave blank to suppress action.'),
-(u'AdvtUISequence', u'Condition', u'Y', None, None, None, None, u'Condition', None, u'Optional expression which skips the action if evaluates to expFalse.If the expression syntax is invalid, the engine will terminate, returning iesBadActionData.'),
-(u'AppId', u'AppId', u'N', None, None, None, None, u'Guid', None, None),
-(u'AppId', u'ActivateAtStorage', u'Y', 0, 1, None, None, None, None, None),
-(u'AppId', u'DllSurrogate', u'Y', None, None, None, None, u'Text', None, None),
-(u'AppId', u'LocalService', u'Y', None, None, None, None, u'Text', None, None),
-(u'AppId', u'RemoteServerName', u'Y', None, None, None, None, u'Formatted', None, None),
-(u'AppId', u'RunAsInteractiveUser', u'Y', 0, 1, None, None, None, None, None),
-(u'AppId', u'ServiceParameters', u'Y', None, None, None, None, u'Text', None, None),
-(u'Feature', u'Attributes', u'N', None, None, None, None, None, u'0;1;2;4;5;6;8;9;10;16;17;18;20;21;22;24;25;26;32;33;34;36;37;38;48;49;50;52;53;54', u'Feature attributes'),
-(u'Feature', u'Description', u'Y', None, None, None, None, u'Text', None, u'Longer descriptive text describing a visible feature item.'),
-(u'Feature', u'Title', u'Y', None, None, None, None, u'Text', None, u'Short text identifying a visible feature item.'),
-(u'Feature', u'Feature', u'N', None, None, None, None, u'Identifier', None, u'Primary key used to identify a particular feature record.'),
-(u'Feature', u'Directory_', u'Y', None, None, u'Directory', 1, u'UpperCase', None, u'The name of the Directory that can be configured by the UI. A non-null value will enable the browse button.'),
-(u'Feature', u'Level', u'N', 0, 32767, None, None, None, None, u'The install level at which record will be initially selected. An install level of 0 will disable an item and prevent its display.'),
-(u'Feature', u'Display', u'Y', 0, 32767, None, None, None, None, u'Numeric sort order, used to force a specific display ordering.'),
-(u'Feature', u'Feature_Parent', u'Y', None, None, u'Feature', 1, u'Identifier', None, u'Optional key of a parent record in the same table. If the parent is not selected, then the record will not be installed. Null indicates a root item.'),
-(u'File', u'Sequence', u'N', 1, 32767, None, None, None, None, u'Sequence with respect to the media images; order must track cabinet order.'),
-(u'File', u'Attributes', u'Y', 0, 32767, None, None, None, None, u'Integer containing bit flags representing file attributes (with the decimal value of each bit position in parentheses)'),
-(u'File', u'File', u'N', None, None, None, None, u'Identifier', None, u'Primary key, non-localized token, must match identifier in cabinet. For uncompressed files, this field is ignored.'),
-(u'File', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Foreign key referencing Component that controls the file.'),
-(u'File', u'FileName', u'N', None, None, None, None, u'Filename', None, u'File name used for installation, may be localized. This may contain a "short name|long name" pair.'),
-(u'File', u'FileSize', u'N', 0, 2147483647, None, None, None, None, u'Size of file in bytes (long integer).'),
-(u'File', u'Language', u'Y', None, None, None, None, u'Language', None, u'List of decimal language Ids, comma-separated if more than one.'),
-(u'File', u'Version', u'Y', None, None, u'File', 1, u'Version', None, u'Version string for versioned files; Blank for unversioned files.'),
-(u'Class', u'Attributes', u'Y', None, 32767, None, None, None, None, u'Class registration attributes.'),
-(u'Class', u'Feature_', u'N', None, None, u'Feature', 1, u'Identifier', None, u'Required foreign key into the Feature Table, specifying the feature to validate or install in order for the CLSID factory to be operational.'),
-(u'Class', u'Description', u'Y', None, None, None, None, u'Text', None, u'Localized description for the Class.'),
-(u'Class', u'Argument', u'Y', None, None, None, None, u'Formatted', None, u'optional argument for LocalServers.'),
-(u'Class', u'AppId_', u'Y', None, None, u'AppId', 1, u'Guid', None, u'Optional AppID containing DCOM information for associated application (string GUID).'),
-(u'Class', u'CLSID', u'N', None, None, None, None, u'Guid', None, u'The CLSID of an OLE factory.'),
-(u'Class', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Required foreign key into the Component Table, specifying the component for which to return a path when called through LocateComponent.'),
-(u'Class', u'Context', u'N', None, None, None, None, u'Identifier', None, u'The numeric server context for this server. CLSCTX_xxxx'),
-(u'Class', u'DefInprocHandler', u'Y', None, None, None, None, u'Filename', u'1;2;3', u'Optional default inproc handler. Only optionally provided if Context=CLSCTX_LOCAL_SERVER. Typically "ole32.dll" or "mapi32.dll"'),
-(u'Class', u'FileTypeMask', u'Y', None, None, None, None, u'Text', None, u'Optional string containing information for the HKCRthis CLSID) key. If multiple patterns exist, they must be delimited by a semicolon, and numeric subkeys will be generated: 0,1,2...'),
-(u'Class', u'Icon_', u'Y', None, None, u'Icon', 1, u'Identifier', None, u'Optional foreign key into the Icon Table, specifying the icon file associated with this CLSID. Will be written under the DefaultIcon key.'),
-(u'Class', u'IconIndex', u'Y', -32767, 32767, None, None, None, None, u'Optional icon index.'),
-(u'Class', u'ProgId_Default', u'Y', None, None, u'ProgId', 1, u'Text', None, u'Optional ProgId associated with this CLSID.'),
-(u'Component', u'Condition', u'Y', None, None, None, None, u'Condition', None, u"A conditional statement that will disable this component if the specified condition evaluates to the 'True' state. If a component is disabled, it will not be installed, regardless of the 'Action' state associated with the component."),
-(u'Component', u'Attributes', u'N', None, None, None, None, None, None, u'Remote execution option, one of irsEnum'),
-(u'Component', u'Component', u'N', None, None, None, None, u'Identifier', None, u'Primary key used to identify a particular component record.'),
-(u'Component', u'ComponentId', u'Y', None, None, None, None, u'Guid', None, u'A string GUID unique to this component, version, and language.'),
-(u'Component', u'Directory_', u'N', None, None, u'Directory', 1, u'Identifier', None, u'Required key of a Directory table record. This is actually a property name whose value contains the actual path, set either by the AppSearch action or with the default setting obtained from the Directory table.'),
-(u'Component', u'KeyPath', u'Y', None, None, u'File;Registry;ODBCDataSource', 1, u'Identifier', None, u'Either the primary key into the File table, Registry table, or ODBCDataSource table. This extract path is stored when the component is installed, and is used to detect the presence of the component and to return the path to it.'),
-(u'ProgId', u'Description', u'Y', None, None, None, None, u'Text', None, u'Localized description for the Program identifier.'),
-(u'ProgId', u'Icon_', u'Y', None, None, u'Icon', 1, u'Identifier', None, u'Optional foreign key into the Icon Table, specifying the icon file associated with this ProgId. Will be written under the DefaultIcon key.'),
-(u'ProgId', u'IconIndex', u'Y', -32767, 32767, None, None, None, None, u'Optional icon index.'),
-(u'ProgId', u'ProgId', u'N', None, None, None, None, u'Text', None, u'The Program Identifier. Primary key.'),
-(u'ProgId', u'Class_', u'Y', None, None, u'Class', 1, u'Guid', None, u'The CLSID of an OLE factory corresponding to the ProgId.'),
-(u'ProgId', u'ProgId_Parent', u'Y', None, None, u'ProgId', 1, u'Text', None, u'The Parent Program Identifier. If specified, the ProgId column becomes a version independent prog id.'),
-(u'CompLocator', u'Type', u'Y', 0, 1, None, None, None, None, u'A boolean value that determines if the registry value is a filename or a directory location.'),
-(u'CompLocator', u'Signature_', u'N', None, None, None, None, u'Identifier', None, u'The table key. The Signature_ represents a unique file signature and is also the foreign key in the Signature table.'),
-(u'CompLocator', u'ComponentId', u'N', None, None, None, None, u'Guid', None, u'A string GUID unique to this component, version, and language.'),
-(u'Complus', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Foreign key referencing Component that controls the ComPlus component.'),
-(u'Complus', u'ExpType', u'Y', 0, 32767, None, None, None, None, u'ComPlus component attributes.'),
-(u'Directory', u'Directory', u'N', None, None, None, None, u'Identifier', None, u'Unique identifier for directory entry, primary key. If a property by this name is defined, it contains the full path to the directory.'),
-(u'Directory', u'DefaultDir', u'N', None, None, None, None, u'DefaultDir', None, u"The default sub-path under parent's path."),
-(u'Directory', u'Directory_Parent', u'Y', None, None, u'Directory', 1, u'Identifier', None, u'Reference to the entry in this table specifying the default parent directory. A record parented to itself or with a Null parent represents a root of the install tree.'),
-(u'CreateFolder', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Foreign key into the Component table.'),
-(u'CreateFolder', u'Directory_', u'N', None, None, u'Directory', 1, u'Identifier', None, u'Primary key, could be foreign key into the Directory table.'),
-(u'CustomAction', u'Type', u'N', 1, 16383, None, None, None, None, u'The numeric custom action type, consisting of source location, code type, entry, option flags.'),
-(u'CustomAction', u'Action', u'N', None, None, None, None, u'Identifier', None, u'Primary key, name of action, normally appears in sequence table unless private use.'),
-(u'CustomAction', u'Source', u'Y', None, None, None, None, u'CustomSource', None, u'The table reference of the source of the code.'),
-(u'CustomAction', u'Target', u'Y', None, None, None, None, u'Formatted', None, u'Excecution parameter, depends on the type of custom action'),
-(u'DrLocator', u'Signature_', u'N', None, None, None, None, u'Identifier', None, u'The Signature_ represents a unique file signature and is also the foreign key in the Signature table.'),
-(u'DrLocator', u'Path', u'Y', None, None, None, None, u'AnyPath', None, u'The path on the user system. This is a either a subpath below the value of the Parent or a full path. The path may contain properties enclosed within [ ] that will be expanded.'),
-(u'DrLocator', u'Depth', u'Y', 0, 32767, None, None, None, None, u'The depth below the path to which the Signature_ is recursively searched. If absent, the depth is assumed to be 0.'),
-(u'DrLocator', u'Parent', u'Y', None, None, None, None, u'Identifier', None, u'The parent file signature. It is also a foreign key in the Signature table. If null and the Path column does not expand to a full path, then all the fixed drives of the user system are searched using the Path.'),
-(u'DuplicateFile', u'File_', u'N', None, None, u'File', 1, u'Identifier', None, u'Foreign key referencing the source file to be duplicated.'),
-(u'DuplicateFile', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Foreign key referencing Component that controls the duplicate file.'),
-(u'DuplicateFile', u'DestFolder', u'Y', None, None, None, None, u'Identifier', None, u'Name of a property whose value is assumed to resolve to the full pathname to a destination folder.'),
-(u'DuplicateFile', u'DestName', u'Y', None, None, None, None, u'Filename', None, u'Filename to be given to the duplicate file.'),
-(u'DuplicateFile', u'FileKey', u'N', None, None, None, None, u'Identifier', None, u'Primary key used to identify a particular file entry'),
-(u'Environment', u'Name', u'N', None, None, None, None, u'Text', None, u'The name of the environmental value.'),
-(u'Environment', u'Value', u'Y', None, None, None, None, u'Formatted', None, u'The value to set in the environmental settings.'),
-(u'Environment', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Foreign key into the Component table referencing component that controls the installing of the environmental value.'),
-(u'Environment', u'Environment', u'N', None, None, None, None, u'Identifier', None, u'Unique identifier for the environmental variable setting'),
-(u'Error', u'Error', u'N', 0, 32767, None, None, None, None, u'Integer error number, obtained from header file IError(...) macros.'),
-(u'Error', u'Message', u'Y', None, None, None, None, u'Template', None, u'Error formatting template, obtained from user ed. or localizers.'),
-(u'Extension', u'Feature_', u'N', None, None, u'Feature', 1, u'Identifier', None, u'Required foreign key into the Feature Table, specifying the feature to validate or install in order for the CLSID factory to be operational.'),
-(u'Extension', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Required foreign key into the Component Table, specifying the component for which to return a path when called through LocateComponent.'),
-(u'Extension', u'Extension', u'N', None, None, None, None, u'Text', None, u'The extension associated with the table row.'),
-(u'Extension', u'MIME_', u'Y', None, None, u'MIME', 1, u'Text', None, u'Optional Context identifier, typically "type/format" associated with the extension'),
-(u'Extension', u'ProgId_', u'Y', None, None, u'ProgId', 1, u'Text', None, u'Optional ProgId associated with this extension.'),
-(u'MIME', u'CLSID', u'Y', None, None, None, None, u'Guid', None, u'Optional associated CLSID.'),
-(u'MIME', u'ContentType', u'N', None, None, None, None, u'Text', None, u'Primary key. Context identifier, typically "type/format".'),
-(u'MIME', u'Extension_', u'N', None, None, u'Extension', 1, u'Text', None, u'Optional associated extension (without dot)'),
-(u'FeatureComponents', u'Feature_', u'N', None, None, u'Feature', 1, u'Identifier', None, u'Foreign key into Feature table.'),
-(u'FeatureComponents', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Foreign key into Component table.'),
-(u'FileSFPCatalog', u'File_', u'N', None, None, u'File', 1, u'Identifier', None, u'File associated with the catalog'),
-(u'FileSFPCatalog', u'SFPCatalog_', u'N', None, None, u'SFPCatalog', 1, u'Filename', None, u'Catalog associated with the file'),
-(u'SFPCatalog', u'SFPCatalog', u'N', None, None, None, None, u'Filename', None, u'File name for the catalog.'),
-(u'SFPCatalog', u'Catalog', u'N', None, None, None, None, u'Binary', None, u'SFP Catalog'),
-(u'SFPCatalog', u'Dependency', u'Y', None, None, None, None, u'Formatted', None, u'Parent catalog - only used by SFP'),
-(u'Font', u'File_', u'N', None, None, u'File', 1, u'Identifier', None, u'Primary key, foreign key into File table referencing font file.'),
-(u'Font', u'FontTitle', u'Y', None, None, None, None, u'Text', None, u'Font name.'),
-(u'IniFile', u'Action', u'N', None, None, None, None, None, u'0;1;3', u'The type of modification to be made, one of iifEnum'),
-(u'IniFile', u'Value', u'N', None, None, None, None, u'Formatted', None, u'The value to be written.'),
-(u'IniFile', u'Key', u'N', None, None, None, None, u'Formatted', None, u'The .INI file key below Section.'),
-(u'IniFile', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Foreign key into the Component table referencing component that controls the installing of the .INI value.'),
-(u'IniFile', u'FileName', u'N', None, None, None, None, u'Filename', None, u'The .INI file name in which to write the information'),
-(u'IniFile', u'IniFile', u'N', None, None, None, None, u'Identifier', None, u'Primary key, non-localized token.'),
-(u'IniFile', u'DirProperty', u'Y', None, None, None, None, u'Identifier', None, u'Foreign key into the Directory table denoting the directory where the .INI file is.'),
-(u'IniFile', u'Section', u'N', None, None, None, None, u'Formatted', None, u'The .INI file Section.'),
-(u'IniLocator', u'Type', u'Y', 0, 2, None, None, None, None, u'An integer value that determines if the .INI value read is a filename or a directory location or to be used as is w/o interpretation.'),
-(u'IniLocator', u'Key', u'N', None, None, None, None, u'Text', None, u'Key value (followed by an equals sign in INI file).'),
-(u'IniLocator', u'Signature_', u'N', None, None, None, None, u'Identifier', None, u'The table key. The Signature_ represents a unique file signature and is also the foreign key in the Signature table.'),
-(u'IniLocator', u'FileName', u'N', None, None, None, None, u'Filename', None, u'The .INI file name.'),
-(u'IniLocator', u'Section', u'N', None, None, None, None, u'Text', None, u'Section name within in file (within square brackets in INI file).'),
-(u'IniLocator', u'Field', u'Y', 0, 32767, None, None, None, None, u'The field in the .INI line. If Field is null or 0 the entire line is read.'),
-(u'IsolatedComponent', u'Component_Application', u'N', None, None, u'Component', 1, u'Identifier', None, u'Key to Component table item for application'),
-(u'IsolatedComponent', u'Component_Shared', u'N', None, None, u'Component', 1, u'Identifier', None, u'Key to Component table item to be isolated'),
-(u'LaunchCondition', u'Condition', u'N', None, None, None, None, u'Condition', None, u'Expression which must evaluate to TRUE in order for install to commence.'),
-(u'LaunchCondition', u'Description', u'N', None, None, None, None, u'Formatted', None, u'Localizable text to display when condition fails and install must abort.'),
-(u'LockPermissions', u'Table', u'N', None, None, None, None, u'Identifier', u'Directory;File;Registry', u'Reference to another table name'),
-(u'LockPermissions', u'Domain', u'Y', None, None, None, None, u'Formatted', None, u'Domain name for user whose permissions are being set. (usually a property)'),
-(u'LockPermissions', u'LockObject', u'N', None, None, None, None, u'Identifier', None, u'Foreign key into Registry or File table'),
-(u'LockPermissions', u'Permission', u'Y', -2147483647, 2147483647, None, None, None, None, u'Permission Access mask. Full Control = 268435456 (GENERIC_ALL = 0x10000000)'),
-(u'LockPermissions', u'User', u'N', None, None, None, None, u'Formatted', None, u'User for permissions to be set. (usually a property)'),
-(u'Media', u'Source', u'Y', None, None, None, None, u'Property', None, u'The property defining the location of the cabinet file.'),
-(u'Media', u'Cabinet', u'Y', None, None, None, None, u'Cabinet', None, u'If some or all of the files stored on the media are compressed in a cabinet, the name of that cabinet.'),
-(u'Media', u'DiskId', u'N', 1, 32767, None, None, None, None, u'Primary key, integer to determine sort order for table.'),
-(u'Media', u'DiskPrompt', u'Y', None, None, None, None, u'Text', None, u'Disk name: the visible text actually printed on the disk. This will be used to prompt the user when this disk needs to be inserted.'),
-(u'Media', u'LastSequence', u'N', 0, 32767, None, None, None, None, u'File sequence number for the last file for this media.'),
-(u'Media', u'VolumeLabel', u'Y', None, None, None, None, u'Text', None, u'The label attributed to the volume.'),
-(u'ModuleComponents', u'Component', u'N', None, None, u'Component', 1, u'Identifier', None, u'Component contained in the module.'),
-(u'ModuleComponents', u'Language', u'N', None, None, u'ModuleSignature', 2, None, None, u'Default language ID for module (may be changed by transform).'),
-(u'ModuleComponents', u'ModuleID', u'N', None, None, u'ModuleSignature', 1, u'Identifier', None, u'Module containing the component.'),
-(u'ModuleSignature', u'Language', u'N', None, None, None, None, None, None, u'Default decimal language of module.'),
-(u'ModuleSignature', u'Version', u'N', None, None, None, None, u'Version', None, u'Version of the module.'),
-(u'ModuleSignature', u'ModuleID', u'N', None, None, None, None, u'Identifier', None, u'Module identifier (String.GUID).'),
-(u'ModuleDependency', u'ModuleID', u'N', None, None, u'ModuleSignature', 1, u'Identifier', None, u'Module requiring the dependency.'),
-(u'ModuleDependency', u'ModuleLanguage', u'N', None, None, u'ModuleSignature', 2, None, None, u'Language of module requiring the dependency.'),
-(u'ModuleDependency', u'RequiredID', u'N', None, None, None, None, None, None, u'String.GUID of required module.'),
-(u'ModuleDependency', u'RequiredLanguage', u'N', None, None, None, None, None, None, u'LanguageID of the required module.'),
-(u'ModuleDependency', u'RequiredVersion', u'Y', None, None, None, None, u'Version', None, u'Version of the required version.'),
-(u'ModuleExclusion', u'ModuleID', u'N', None, None, u'ModuleSignature', 1, u'Identifier', None, u'String.GUID of module with exclusion requirement.'),
-(u'ModuleExclusion', u'ModuleLanguage', u'N', None, None, u'ModuleSignature', 2, None, None, u'LanguageID of module with exclusion requirement.'),
-(u'ModuleExclusion', u'ExcludedID', u'N', None, None, None, None, None, None, u'String.GUID of excluded module.'),
-(u'ModuleExclusion', u'ExcludedLanguage', u'N', None, None, None, None, None, None, u'Language of excluded module.'),
-(u'ModuleExclusion', u'ExcludedMaxVersion', u'Y', None, None, None, None, u'Version', None, u'Maximum version of excluded module.'),
-(u'ModuleExclusion', u'ExcludedMinVersion', u'Y', None, None, None, None, u'Version', None, u'Minimum version of excluded module.'),
-(u'MoveFile', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'If this component is not "selected" for installation or removal, no action will be taken on the associated MoveFile entry'),
-(u'MoveFile', u'DestFolder', u'N', None, None, None, None, u'Identifier', None, u'Name of a property whose value is assumed to resolve to the full path to the destination directory'),
-(u'MoveFile', u'DestName', u'Y', None, None, None, None, u'Filename', None, u'Name to be given to the original file after it is moved or copied. If blank, the destination file will be given the same name as the source file'),
-(u'MoveFile', u'FileKey', u'N', None, None, None, None, u'Identifier', None, u'Primary key that uniquely identifies a particular MoveFile record'),
-(u'MoveFile', u'Options', u'N', 0, 1, None, None, None, None, u'Integer value specifying the MoveFile operating mode, one of imfoEnum'),
-(u'MoveFile', u'SourceFolder', u'Y', None, None, None, None, u'Identifier', None, u'Name of a property whose value is assumed to resolve to the full path to the source directory'),
-(u'MoveFile', u'SourceName', u'Y', None, None, None, None, u'Text', None, u"Name of the source file(s) to be moved or copied. Can contain the '*' or '?' wildcards."),
-(u'MsiAssembly', u'Attributes', u'Y', None, None, None, None, None, None, u'Assembly attributes'),
-(u'MsiAssembly', u'Feature_', u'N', None, None, u'Feature', 1, u'Identifier', None, u'Foreign key into Feature table.'),
-(u'MsiAssembly', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Foreign key into Component table.'),
-(u'MsiAssembly', u'File_Application', u'Y', None, None, u'File', 1, u'Identifier', None, u'Foreign key into File table, denoting the application context for private assemblies. Null for global assemblies.'),
-(u'MsiAssembly', u'File_Manifest', u'Y', None, None, u'File', 1, u'Identifier', None, u'Foreign key into the File table denoting the manifest file for the assembly.'),
-(u'MsiAssemblyName', u'Name', u'N', None, None, None, None, u'Text', None, u'The name part of the name-value pairs for the assembly name.'),
-(u'MsiAssemblyName', u'Value', u'N', None, None, None, None, u'Text', None, u'The value part of the name-value pairs for the assembly name.'),
-(u'MsiAssemblyName', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Foreign key into Component table.'),
-(u'MsiDigitalCertificate', u'CertData', u'N', None, None, None, None, u'Binary', None, u'A certificate context blob for a signer certificate'),
-(u'MsiDigitalCertificate', u'DigitalCertificate', u'N', None, None, None, None, u'Identifier', None, u'A unique identifier for the row'),
-(u'MsiDigitalSignature', u'Table', u'N', None, None, None, None, None, u'Media', u'Reference to another table name (only Media table is supported)'),
-(u'MsiDigitalSignature', u'DigitalCertificate_', u'N', None, None, u'MsiDigitalCertificate', 1, u'Identifier', None, u'Foreign key to MsiDigitalCertificate table identifying the signer certificate'),
-(u'MsiDigitalSignature', u'Hash', u'Y', None, None, None, None, u'Binary', None, u'The encoded hash blob from the digital signature'),
-(u'MsiDigitalSignature', u'SignObject', u'N', None, None, None, None, u'Text', None, u'Foreign key to Media table'),
-(u'MsiFileHash', u'File_', u'N', None, None, u'File', 1, u'Identifier', None, u'Primary key, foreign key into File table referencing file with this hash'),
-(u'MsiFileHash', u'Options', u'N', 0, 32767, None, None, None, None, u'Various options and attributes for this hash.'),
-(u'MsiFileHash', u'HashPart1', u'N', None, None, None, None, None, None, u'Size of file in bytes (long integer).'),
-(u'MsiFileHash', u'HashPart2', u'N', None, None, None, None, None, None, u'Size of file in bytes (long integer).'),
-(u'MsiFileHash', u'HashPart3', u'N', None, None, None, None, None, None, u'Size of file in bytes (long integer).'),
-(u'MsiFileHash', u'HashPart4', u'N', None, None, None, None, None, None, u'Size of file in bytes (long integer).'),
-(u'MsiPatchHeaders', u'StreamRef', u'N', None, None, None, None, u'Identifier', None, u'Primary key. A unique identifier for the row.'),
-(u'MsiPatchHeaders', u'Header', u'N', None, None, None, None, u'Binary', None, u'Binary stream. The patch header, used for patch validation.'),
-(u'ODBCAttribute', u'Value', u'Y', None, None, None, None, u'Text', None, u'Value for ODBC driver attribute'),
-(u'ODBCAttribute', u'Attribute', u'N', None, None, None, None, u'Text', None, u'Name of ODBC driver attribute'),
-(u'ODBCAttribute', u'Driver_', u'N', None, None, u'ODBCDriver', 1, u'Identifier', None, u'Reference to ODBC driver in ODBCDriver table'),
-(u'ODBCDriver', u'Description', u'N', None, None, None, None, u'Text', None, u'Text used as registered name for driver, non-localized'),
-(u'ODBCDriver', u'File_', u'N', None, None, u'File', 1, u'Identifier', None, u'Reference to key driver file'),
-(u'ODBCDriver', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Reference to associated component'),
-(u'ODBCDriver', u'Driver', u'N', None, None, None, None, u'Identifier', None, u'Primary key, non-localized.internal token for driver'),
-(u'ODBCDriver', u'File_Setup', u'Y', None, None, u'File', 1, u'Identifier', None, u'Optional reference to key driver setup DLL'),
-(u'ODBCDataSource', u'Description', u'N', None, None, None, None, u'Text', None, u'Text used as registered name for data source'),
-(u'ODBCDataSource', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Reference to associated component'),
-(u'ODBCDataSource', u'DataSource', u'N', None, None, None, None, u'Identifier', None, u'Primary key, non-localized.internal token for data source'),
-(u'ODBCDataSource', u'DriverDescription', u'N', None, None, None, None, u'Text', None, u'Reference to driver description, may be existing driver'),
-(u'ODBCDataSource', u'Registration', u'N', 0, 1, None, None, None, None, u'Registration option: 0=machine, 1=user, others t.b.d.'),
-(u'ODBCSourceAttribute', u'Value', u'Y', None, None, None, None, u'Text', None, u'Value for ODBC data source attribute'),
-(u'ODBCSourceAttribute', u'Attribute', u'N', None, None, None, None, u'Text', None, u'Name of ODBC data source attribute'),
-(u'ODBCSourceAttribute', u'DataSource_', u'N', None, None, u'ODBCDataSource', 1, u'Identifier', None, u'Reference to ODBC data source in ODBCDataSource table'),
-(u'ODBCTranslator', u'Description', u'N', None, None, None, None, u'Text', None, u'Text used as registered name for translator'),
-(u'ODBCTranslator', u'File_', u'N', None, None, u'File', 1, u'Identifier', None, u'Reference to key translator file'),
-(u'ODBCTranslator', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Reference to associated component'),
-(u'ODBCTranslator', u'File_Setup', u'Y', None, None, u'File', 1, u'Identifier', None, u'Optional reference to key translator setup DLL'),
-(u'ODBCTranslator', u'Translator', u'N', None, None, None, None, u'Identifier', None, u'Primary key, non-localized.internal token for translator'),
-(u'Patch', u'Sequence', u'N', 0, 32767, None, None, None, None, u'Primary key, sequence with respect to the media images; order must track cabinet order.'),
-(u'Patch', u'Attributes', u'N', 0, 32767, None, None, None, None, u'Integer containing bit flags representing patch attributes'),
-(u'Patch', u'File_', u'N', None, None, None, None, u'Identifier', None, u'Primary key, non-localized token, foreign key to File table, must match identifier in cabinet.'),
-(u'Patch', u'Header', u'Y', None, None, None, None, u'Binary', None, u'Binary stream. The patch header, used for patch validation.'),
-(u'Patch', u'PatchSize', u'N', 0, 2147483647, None, None, None, None, u'Size of patch in bytes (long integer).'),
-(u'Patch', u'StreamRef_', u'Y', None, None, None, None, u'Identifier', None, u'Identifier. Foreign key to the StreamRef column of the MsiPatchHeaders table.'),
-(u'PatchPackage', u'Media_', u'N', 0, 32767, None, None, None, None, u'Foreign key to DiskId column of Media table. Indicates the disk containing the patch package.'),
-(u'PatchPackage', u'PatchId', u'N', None, None, None, None, u'Guid', None, u'A unique string GUID representing this patch.'),
-(u'PublishComponent', u'Feature_', u'N', None, None, u'Feature', 1, u'Identifier', None, u'Foreign key into the Feature table.'),
-(u'PublishComponent', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Foreign key into the Component table.'),
-(u'PublishComponent', u'ComponentId', u'N', None, None, None, None, u'Guid', None, u'A string GUID that represents the component id that will be requested by the alien product.'),
-(u'PublishComponent', u'AppData', u'Y', None, None, None, None, u'Text', None, u'This is localisable Application specific data that can be associated with a Qualified Component.'),
-(u'PublishComponent', u'Qualifier', u'N', None, None, None, None, u'Text', None, u'This is defined only when the ComponentId column is an Qualified Component Id. This is the Qualifier for ProvideComponentIndirect.'),
-(u'Registry', u'Name', u'Y', None, None, None, None, u'Formatted', None, u'The registry value name.'),
-(u'Registry', u'Value', u'Y', None, None, None, None, u'Formatted', None, u'The registry value.'),
-(u'Registry', u'Key', u'N', None, None, None, None, u'RegPath', None, u'The key for the registry value.'),
-(u'Registry', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Foreign key into the Component table referencing component that controls the installing of the registry value.'),
-(u'Registry', u'Registry', u'N', None, None, None, None, u'Identifier', None, u'Primary key, non-localized token.'),
-(u'Registry', u'Root', u'N', -1, 3, None, None, None, None, u'The predefined root key for the registry value, one of rrkEnum.'),
-(u'RegLocator', u'Name', u'Y', None, None, None, None, u'Formatted', None, u'The registry value name.'),
-(u'RegLocator', u'Type', u'Y', 0, 18, None, None, None, None, u'An integer value that determines if the registry value is a filename or a directory location or to be used as is w/o interpretation.'),
-(u'RegLocator', u'Key', u'N', None, None, None, None, u'RegPath', None, u'The key for the registry value.'),
-(u'RegLocator', u'Signature_', u'N', None, None, None, None, u'Identifier', None, u'The table key. The Signature_ represents a unique file signature and is also the foreign key in the Signature table. If the type is 0, the registry values refers a directory, and _Signature is not a foreign key.'),
-(u'RegLocator', u'Root', u'N', 0, 3, None, None, None, None, u'The predefined root key for the registry value, one of rrkEnum.'),
-(u'RemoveFile', u'InstallMode', u'N', None, None, None, None, None, u'1;2;3', u'Installation option, one of iimEnum.'),
-(u'RemoveFile', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Foreign key referencing Component that controls the file to be removed.'),
-(u'RemoveFile', u'FileKey', u'N', None, None, None, None, u'Identifier', None, u'Primary key used to identify a particular file entry'),
-(u'RemoveFile', u'FileName', u'Y', None, None, None, None, u'WildCardFilename', None, u'Name of the file to be removed.'),
-(u'RemoveFile', u'DirProperty', u'N', None, None, None, None, u'Identifier', None, u'Name of a property whose value is assumed to resolve to the full pathname to the folder of the file to be removed.'),
-(u'RemoveIniFile', u'Action', u'N', None, None, None, None, None, u'2;4', u'The type of modification to be made, one of iifEnum.'),
-(u'RemoveIniFile', u'Value', u'Y', None, None, None, None, u'Formatted', None, u'The value to be deleted. The value is required when Action is iifIniRemoveTag'),
-(u'RemoveIniFile', u'Key', u'N', None, None, None, None, u'Formatted', None, u'The .INI file key below Section.'),
-(u'RemoveIniFile', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Foreign key into the Component table referencing component that controls the deletion of the .INI value.'),
-(u'RemoveIniFile', u'FileName', u'N', None, None, None, None, u'Filename', None, u'The .INI file name in which to delete the information'),
-(u'RemoveIniFile', u'DirProperty', u'Y', None, None, None, None, u'Identifier', None, u'Foreign key into the Directory table denoting the directory where the .INI file is.'),
-(u'RemoveIniFile', u'Section', u'N', None, None, None, None, u'Formatted', None, u'The .INI file Section.'),
-(u'RemoveIniFile', u'RemoveIniFile', u'N', None, None, None, None, u'Identifier', None, u'Primary key, non-localized token.'),
-(u'RemoveRegistry', u'Name', u'Y', None, None, None, None, u'Formatted', None, u'The registry value name.'),
-(u'RemoveRegistry', u'Key', u'N', None, None, None, None, u'RegPath', None, u'The key for the registry value.'),
-(u'RemoveRegistry', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Foreign key into the Component table referencing component that controls the deletion of the registry value.'),
-(u'RemoveRegistry', u'Root', u'N', -1, 3, None, None, None, None, u'The predefined root key for the registry value, one of rrkEnum'),
-(u'RemoveRegistry', u'RemoveRegistry', u'N', None, None, None, None, u'Identifier', None, u'Primary key, non-localized token.'),
-(u'ReserveCost', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Reserve a specified amount of space if this component is to be installed.'),
-(u'ReserveCost', u'ReserveFolder', u'Y', None, None, None, None, u'Identifier', None, u'Name of a property whose value is assumed to resolve to the full path to the destination directory'),
-(u'ReserveCost', u'ReserveKey', u'N', None, None, None, None, u'Identifier', None, u'Primary key that uniquely identifies a particular ReserveCost record'),
-(u'ReserveCost', u'ReserveLocal', u'N', 0, 2147483647, None, None, None, None, u'Disk space to reserve if linked component is installed locally.'),
-(u'ReserveCost', u'ReserveSource', u'N', 0, 2147483647, None, None, None, None, u'Disk space to reserve if linked component is installed to run from the source location.'),
-(u'SelfReg', u'File_', u'N', None, None, u'File', 1, u'Identifier', None, u'Foreign key into the File table denoting the module that needs to be registered.'),
-(u'SelfReg', u'Cost', u'Y', 0, 32767, None, None, None, None, u'The cost of registering the module.'),
-(u'ServiceControl', u'Name', u'N', None, None, None, None, u'Formatted', None, u'Name of a service. /, \\, comma and space are invalid'),
-(u'ServiceControl', u'Event', u'N', 0, 187, None, None, None, None, u'Bit field: Install: 0x1 = Start, 0x2 = Stop, 0x8 = Delete, Uninstall: 0x10 = Start, 0x20 = Stop, 0x80 = Delete'),
-(u'ServiceControl', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Required foreign key into the Component Table that controls the startup of the service'),
-(u'ServiceControl', u'ServiceControl', u'N', None, None, None, None, u'Identifier', None, u'Primary key, non-localized token.'),
-(u'ServiceControl', u'Arguments', u'Y', None, None, None, None, u'Formatted', None, u'Arguments for the service. Separate by [~].'),
-(u'ServiceControl', u'Wait', u'Y', 0, 1, None, None, None, None, u'Boolean for whether to wait for the service to fully start'),
-(u'ServiceInstall', u'Name', u'N', None, None, None, None, u'Formatted', None, u'Internal Name of the Service'),
-(u'ServiceInstall', u'Description', u'Y', None, None, None, None, u'Text', None, u'Description of service.'),
-(u'ServiceInstall', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Required foreign key into the Component Table that controls the startup of the service'),
-(u'ServiceInstall', u'Arguments', u'Y', None, None, None, None, u'Formatted', None, u'Arguments to include in every start of the service, passed to WinMain'),
-(u'ServiceInstall', u'ServiceInstall', u'N', None, None, None, None, u'Identifier', None, u'Primary key, non-localized token.'),
-(u'ServiceInstall', u'Dependencies', u'Y', None, None, None, None, u'Formatted', None, u'Other services this depends on to start. Separate by [~], and end with [~][~]'),
-(u'ServiceInstall', u'DisplayName', u'Y', None, None, None, None, u'Formatted', None, u'External Name of the Service'),
-(u'ServiceInstall', u'ErrorControl', u'N', -2147483647, 2147483647, None, None, None, None, u'Severity of error if service fails to start'),
-(u'ServiceInstall', u'LoadOrderGroup', u'Y', None, None, None, None, u'Formatted', None, u'LoadOrderGroup'),
-(u'ServiceInstall', u'Password', u'Y', None, None, None, None, u'Formatted', None, u'password to run service with. (with StartName)'),
-(u'ServiceInstall', u'ServiceType', u'N', -2147483647, 2147483647, None, None, None, None, u'Type of the service'),
-(u'ServiceInstall', u'StartName', u'Y', None, None, None, None, u'Formatted', None, u'User or object name to run service as'),
-(u'ServiceInstall', u'StartType', u'N', 0, 4, None, None, None, None, u'Type of the service'),
-(u'Shortcut', u'Name', u'N', None, None, None, None, u'Filename', None, u'The name of the shortcut to be created.'),
-(u'Shortcut', u'Description', u'Y', None, None, None, None, u'Text', None, u'The description for the shortcut.'),
-(u'Shortcut', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Foreign key into the Component table denoting the component whose selection gates the shortcut creation/deletion.'),
-(u'Shortcut', u'Icon_', u'Y', None, None, u'Icon', 1, u'Identifier', None, u'Foreign key into the File table denoting the external icon file for the shortcut.'),
-(u'Shortcut', u'IconIndex', u'Y', -32767, 32767, None, None, None, None, u'The icon index for the shortcut.'),
-(u'Shortcut', u'Directory_', u'N', None, None, u'Directory', 1, u'Identifier', None, u'Foreign key into the Directory table denoting the directory where the shortcut file is created.'),
-(u'Shortcut', u'Target', u'N', None, None, None, None, u'Shortcut', None, u'The shortcut target. This is usually a property that is expanded to a file or a folder that the shortcut points to.'),
-(u'Shortcut', u'Arguments', u'Y', None, None, None, None, u'Formatted', None, u'The command-line arguments for the shortcut.'),
-(u'Shortcut', u'Shortcut', u'N', None, None, None, None, u'Identifier', None, u'Primary key, non-localized token.'),
-(u'Shortcut', u'Hotkey', u'Y', 0, 32767, None, None, None, None, u'The hotkey for the shortcut. It has the virtual-key code for the key in the low-order byte, and the modifier flags in the high-order byte. '),
-(u'Shortcut', u'ShowCmd', u'Y', None, None, None, None, None, u'1;3;7', u'The show command for the application window.The following values may be used.'),
-(u'Shortcut', u'WkDir', u'Y', None, None, None, None, u'Identifier', None, u'Name of property defining location of working directory.'),
-(u'Signature', u'FileName', u'N', None, None, None, None, u'Filename', None, u'The name of the file. This may contain a "short name|long name" pair.'),
-(u'Signature', u'Signature', u'N', None, None, None, None, u'Identifier', None, u'The table key. The Signature represents a unique file signature.'),
-(u'Signature', u'Languages', u'Y', None, None, None, None, u'Language', None, u'The languages supported by the file.'),
-(u'Signature', u'MaxDate', u'Y', 0, 2147483647, None, None, None, None, u'The maximum creation date of the file.'),
-(u'Signature', u'MaxSize', u'Y', 0, 2147483647, None, None, None, None, u'The maximum size of the file. '),
-(u'Signature', u'MaxVersion', u'Y', None, None, None, None, u'Text', None, u'The maximum version of the file.'),
-(u'Signature', u'MinDate', u'Y', 0, 2147483647, None, None, None, None, u'The minimum creation date of the file.'),
-(u'Signature', u'MinSize', u'Y', 0, 2147483647, None, None, None, None, u'The minimum size of the file.'),
-(u'Signature', u'MinVersion', u'Y', None, None, None, None, u'Text', None, u'The minimum version of the file.'),
-(u'TypeLib', u'Feature_', u'N', None, None, u'Feature', 1, u'Identifier', None, u'Required foreign key into the Feature Table, specifying the feature to validate or install in order for the type library to be operational.'),
-(u'TypeLib', u'Description', u'Y', None, None, None, None, u'Text', None, None),
-(u'TypeLib', u'Component_', u'N', None, None, u'Component', 1, u'Identifier', None, u'Required foreign key into the Component Table, specifying the component for which to return a path when called through LocateComponent.'),
-(u'TypeLib', u'Directory_', u'Y', None, None, u'Directory', 1, u'Identifier', None, u'Optional. The foreign key into the Directory table denoting the path to the help file for the type library.'),
-(u'TypeLib', u'Language', u'N', 0, 32767, None, None, None, None, u'The language of the library.'),
-(u'TypeLib', u'Version', u'Y', 0, 16777215, None, None, None, None, u'The version of the library. The minor version is in the lower 8 bits of the integer. The major version is in the next 16 bits. '),
-(u'TypeLib', u'Cost', u'Y', 0, 2147483647, None, None, None, None, u'The cost associated with the registration of the typelib. This column is currently optional.'),
-(u'TypeLib', u'LibID', u'N', None, None, None, None, u'Guid', None, u'The GUID that represents the library.'),
-(u'Upgrade', u'Attributes', u'N', 0, 2147483647, None, None, None, None, u'The attributes of this product set.'),
-(u'Upgrade', u'Remove', u'Y', None, None, None, None, u'Formatted', None, u'The list of features to remove when uninstalling a product from this set. The default is "ALL".'),
-(u'Upgrade', u'Language', u'Y', None, None, None, None, u'Language', None, u'A comma-separated list of languages for either products in this set or products not in this set.'),
-(u'Upgrade', u'ActionProperty', u'N', None, None, None, None, u'UpperCase', None, u'The property to set when a product in this set is found.'),
-(u'Upgrade', u'UpgradeCode', u'N', None, None, None, None, u'Guid', None, u'The UpgradeCode GUID belonging to the products in this set.'),
-(u'Upgrade', u'VersionMax', u'Y', None, None, None, None, u'Text', None, u'The maximum ProductVersion of the products in this set. The set may or may not include products with this particular version.'),
-(u'Upgrade', u'VersionMin', u'Y', None, None, None, None, u'Text', None, u'The minimum ProductVersion of the products in this set. The set may or may not include products with this particular version.'),
-(u'Verb', u'Sequence', u'Y', 0, 32767, None, None, None, None, u'Order within the verbs for a particular extension. Also used simply to specify the default verb.'),
-(u'Verb', u'Argument', u'Y', None, None, None, None, u'Formatted', None, u'Optional value for the command arguments.'),
-(u'Verb', u'Extension_', u'N', None, None, u'Extension', 1, u'Text', None, u'The extension associated with the table row.'),
-(u'Verb', u'Verb', u'N', None, None, None, None, u'Text', None, u'The verb for the command.'),
-(u'Verb', u'Command', u'Y', None, None, None, None, u'Formatted', None, u'The command text.'),
-]
-
-Error = [
-(0, u'{{Fatal error: }}'),
-(1, u'{{Error [1]. }}'),
-(2, u'Warning [1]. '),
-(3, None),
-(4, u'Info [1]. '),
-(5, u'The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is [1]. {{The arguments are: [2], [3], [4]}}'),
-(6, None),
-(7, u'{{Disk full: }}'),
-(8, u'Action [Time]: [1]. [2]'),
-(9, u'[ProductName]'),
-(10, u'{[2]}{, [3]}{, [4]}'),
-(11, u'Message type: [1], Argument: [2]'),
-(12, u'=== Logging started: [Date] [Time] ==='),
-(13, u'=== Logging stopped: [Date] [Time] ==='),
-(14, u'Action start [Time]: [1].'),
-(15, u'Action ended [Time]: [1]. Return value [2].'),
-(16, u'Time remaining: {[1] minutes }{[2] seconds}'),
-(17, u'Out of memory. Shut down other applications before retrying.'),
-(18, u'Installer is no longer responding.'),
-(19, u'Installer stopped prematurely.'),
-(20, u'Please wait while Windows configures [ProductName]'),
-(21, u'Gathering required information...'),
-(22, u'Removing older versions of this application...'),
-(23, u'Preparing to remove older versions of this application...'),
-(32, u'{[ProductName] }Setup completed successfully.'),
-(33, u'{[ProductName] }Setup failed.'),
-(1101, u'Error reading from file: [2]. {{ System error [3].}} Verify that the file exists and that you can access it.'),
-(1301, u"Cannot create the file '[2]'. A directory with this name already exists. Cancel the install and try installing to a different location."),
-(1302, u'Please insert the disk: [2]'),
-(1303, u'The installer has insufficient privileges to access this directory: [2]. The installation cannot continue. Log on as administrator or contact your system administrator.'),
-(1304, u'Error writing to file: [2]. Verify that you have access to that directory.'),
-(1305, u'Error reading from file [2]. {{ System error [3].}} Verify that the file exists and that you can access it.'),
-(1306, u"Another application has exclusive access to the file '[2]'. Please shut down all other applications, then click Retry."),
-(1307, u'There is not enough disk space to install this file: [2]. Free some disk space and click Retry, or click Cancel to exit.'),
-(1308, u'Source file not found: [2]. Verify that the file exists and that you can access it.'),
-(1309, u'Error reading from file: [3]. {{ System error [2].}} Verify that the file exists and that you can access it.'),
-(1310, u'Error writing to file: [3]. {{ System error [2].}} Verify that you have access to that directory.'),
-(1311, u'Source file not found{{(cabinet)}}: [2]. Verify that the file exists and that you can access it.'),
-(1312, u"Cannot create the directory '[2]'. A file with this name already exists. Please rename or remove the file and click retry, or click Cancel to exit."),
-(1313, u'The volume [2] is currently unavailable. Please select another.'),
-(1314, u"The specified path '[2]' is unavailable."),
-(1315, u'Unable to write to the specified folder: [2].'),
-(1316, u'A network error occurred while attempting to read from the file: [2]'),
-(1317, u'An error occurred while attempting to create the directory: [2]'),
-(1318, u'A network error occurred while attempting to create the directory: [2]'),
-(1319, u'A network error occurred while attempting to open the source file cabinet: [2]'),
-(1320, u'The specified path is too long: [2]'),
-(1321, u'The Installer has insufficient privileges to modify this file: [2].'),
-(1322, u"A portion of the folder path '[2]' is invalid. It is either empty or exceeds the length allowed by the system."),
-(1323, u"The folder path '[2]' contains words that are not valid in folder paths."),
-(1324, u"The folder path '[2]' contains an invalid character."),
-(1325, u"'[2]' is not a valid short file name."),
-(1326, u'Error getting file security: [3] GetLastError: [2]'),
-(1327, u'Invalid Drive: [2]'),
-(1328, u'Error applying patch to file [2]. It has probably been updated by other means, and can no longer be modified by this patch. For more information contact your patch vendor. {{System Error: [3]}}'),
-(1329, u'A file that is required cannot be installed because the cabinet file [2] is not digitally signed. This may indicate that the cabinet file is corrupt.'),
-(1330, u'A file that is required cannot be installed because the cabinet file [2] has an invalid digital signature. This may indicate that the cabinet file is corrupt.{{ Error [3] was returned by WinVerifyTrust.}}'),
-(1331, u'Failed to correctly copy [2] file: CRC error.'),
-(1332, u'Failed to correctly move [2] file: CRC error.'),
-(1333, u'Failed to correctly patch [2] file: CRC error.'),
-(1334, u"The file '[2]' cannot be installed because the file cannot be found in cabinet file '[3]'. This could indicate a network error, an error reading from the CD-ROM, or a problem with this package."),
-(1335, u"The cabinet file '[2]' required for this installation is corrupt and cannot be used. This could indicate a network error, an error reading from the CD-ROM, or a problem with this package."),
-(1336, u'There was an error creating a temporary file that is needed to complete this installation.{{ Folder: [3]. System error code: [2]}}'),
-(1401, u'Could not create key: [2]. {{ System error [3].}} Verify that you have sufficient access to that key, or contact your support personnel. '),
-(1402, u'Could not open key: [2]. {{ System error [3].}} Verify that you have sufficient access to that key, or contact your support personnel. '),
-(1403, u'Could not delete value [2] from key [3]. {{ System error [4].}} Verify that you have sufficient access to that key, or contact your support personnel. '),
-(1404, u'Could not delete key [2]. {{ System error [3].}} Verify that you have sufficient access to that key, or contact your support personnel. '),
-(1405, u'Could not read value [2] from key [3]. {{ System error [4].}} Verify that you have sufficient access to that key, or contact your support personnel. '),
-(1406, u'Could not write value [2] to key [3]. {{ System error [4].}} Verify that you have sufficient access to that key, or contact your support personnel.'),
-(1407, u'Could not get value names for key [2]. {{ System error [3].}} Verify that you have sufficient access to that key, or contact your support personnel.'),
-(1408, u'Could not get sub key names for key [2]. {{ System error [3].}} Verify that you have sufficient access to that key, or contact your support personnel.'),
-(1409, u'Could not read security information for key [2]. {{ System error [3].}} Verify that you have sufficient access to that key, or contact your support personnel.'),
-(1410, u'Could not increase the available registry space. [2] KB of free registry space is required for the installation of this application.'),
-(1500, u'Another installation is in progress. You must complete that installation before continuing this one.'),
-(1501, u'Error accessing secured data. Please make sure the Windows Installer is configured properly and try the install again.'),
-(1502, u"User '[2]' has previously initiated an install for product '[3]'. That user will need to run that install again before they can use that product. Your current install will now continue."),
-(1503, u"User '[2]' has previously initiated an install for product '[3]'. That user will need to run that install again before they can use that product."),
-(1601, u"Out of disk space -- Volume: '[2]'; required space: [3] KB; available space: [4] KB. Free some disk space and retry."),
-(1602, u'Are you sure you want to cancel?'),
-(1603, u"The file [2][3] is being held in use{ by the following process: Name: [4], Id: [5], Window Title: '[6]'}. Close that application and retry."),
-(1604, u"The product '[2]' is already installed, preventing the installation of this product. The two products are incompatible."),
-(1605, u"There is not enough disk space on the volume '[2]' to continue the install with recovery enabled. [3] KB are required, but only [4] KB are available. Click Ignore to continue the install without saving recovery information, click Retry to check for available space again, or click Cancel to quit the installation."),
-(1606, u'Could not access network location [2].'),
-(1607, u'The following applications should be closed before continuing the install:'),
-(1608, u'Could not find any previously installed compliant products on the machine for installing this product.'),
-(1609, u"An error occurred while applying security settings. [2] is not a valid user or group. This could be a problem with the package, or a problem connecting to a domain controller on the network. Check your network connection and click Retry, or Cancel to end the install. {{Unable to locate the user's SID, system error [3]}}"),
-(1701, u'The key [2] is not valid. Verify that you entered the correct key.'),
-(1702, u'The installer must restart your system before configuration of [2] can continue. Click Yes to restart now or No if you plan to manually restart later.'),
-(1703, u'You must restart your system for the configuration changes made to [2] to take effect. Click Yes to restart now or No if you plan to manually restart later.'),
-(1704, u'An installation for [2] is currently suspended. You must undo the changes made by that installation to continue. Do you want to undo those changes?'),
-(1705, u'A previous installation for this product is in progress. You must undo the changes made by that installation to continue. Do you want to undo those changes?'),
-(1706, u"An installation package for the product [2] cannot be found. Try the installation again using a valid copy of the installation package '[3]'."),
-(1707, u'Installation completed successfully.'),
-(1708, u'Installation failed.'),
-(1709, u'Product: [2] -- [3]'),
-(1710, u'You may either restore your computer to its previous state or continue the install later. Would you like to restore?'),
-(1711, u'An error occurred while writing installation information to disk. Check to make sure enough disk space is available, and click Retry, or Cancel to end the install.'),
-(1712, u'One or more of the files required to restore your computer to its previous state could not be found. Restoration will not be possible.'),
-(1713, u'[2] cannot install one of its required products. Contact your technical support group. {{System Error: [3].}}'),
-(1714, u'The older version of [2] cannot be removed. Contact your technical support group. {{System Error [3].}}'),
-(1715, u'Installed [2]'),
-(1716, u'Configured [2]'),
-(1717, u'Removed [2]'),
-(1718, u'File [2] was rejected by digital signature policy.'),
-(1719, u'The Windows Installer Service could not be accessed. This can occur if you are running Windows in safe mode, or if the Windows Installer is not correctly installed. Contact your support personnel for assistance.'),
-(1720, u'There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor. {{Custom action [2] script error [3], [4]: [5] Line [6], Column [7], [8] }}'),
-(1721, u'There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. {{Action: [2], location: [3], command: [4] }}'),
-(1722, u'There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. {{Action [2], location: [3], command: [4] }}'),
-(1723, u'There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. {{Action [2], entry: [3], library: [4] }}'),
-(1724, u'Removal completed successfully.'),
-(1725, u'Removal failed.'),
-(1726, u'Advertisement completed successfully.'),
-(1727, u'Advertisement failed.'),
-(1728, u'Configuration completed successfully.'),
-(1729, u'Configuration failed.'),
-(1730, u'You must be an Administrator to remove this application. To remove this application, you can log on as an Administrator, or contact your technical support group for assistance.'),
-(1801, u'The path [2] is not valid. Please specify a valid path.'),
-(1802, u'Out of memory. Shut down other applications before retrying.'),
-(1803, u'There is no disk in drive [2]. Please insert one and click Retry, or click Cancel to go back to the previously selected volume.'),
-(1804, u'There is no disk in drive [2]. Please insert one and click Retry, or click Cancel to return to the browse dialog and select a different volume.'),
-(1805, u'The folder [2] does not exist. Please enter a path to an existing folder.'),
-(1806, u'You have insufficient privileges to read this folder.'),
-(1807, u'A valid destination folder for the install could not be determined.'),
-(1901, u'Error attempting to read from the source install database: [2].'),
-(1902, u'Scheduling reboot operation: Renaming file [2] to [3]. Must reboot to complete operation.'),
-(1903, u'Scheduling reboot operation: Deleting file [2]. Must reboot to complete operation.'),
-(1904, u'Module [2] failed to register. HRESULT [3]. Contact your support personnel.'),
-(1905, u'Module [2] failed to unregister. HRESULT [3]. Contact your support personnel.'),
-(1906, u'Failed to cache package [2]. Error: [3]. Contact your support personnel.'),
-(1907, u'Could not register font [2]. Verify that you have sufficient permissions to install fonts, and that the system supports this font.'),
-(1908, u'Could not unregister font [2]. Verify that you that you have sufficient permissions to remove fonts.'),
-(1909, u'Could not create Shortcut [2]. Verify that the destination folder exists and that you can access it.'),
-(1910, u'Could not remove Shortcut [2]. Verify that the shortcut file exists and that you can access it.'),
-(1911, u'Could not register type library for file [2]. Contact your support personnel.'),
-(1912, u'Could not unregister type library for file [2]. Contact your support personnel.'),
-(1913, u'Could not update the ini file [2][3]. Verify that the file exists and that you can access it.'),
-(1914, u'Could not schedule file [2] to replace file [3] on reboot. Verify that you have write permissions to file [3].'),
-(1915, u'Error removing ODBC driver manager, ODBC error [2]: [3]. Contact your support personnel.'),
-(1916, u'Error installing ODBC driver manager, ODBC error [2]: [3]. Contact your support personnel.'),
-(1917, u'Error removing ODBC driver: [4], ODBC error [2]: [3]. Verify that you have sufficient privileges to remove ODBC drivers.'),
-(1918, u'Error installing ODBC driver: [4], ODBC error [2]: [3]. Verify that the file [4] exists and that you can access it.'),
-(1919, u'Error configuring ODBC data source: [4], ODBC error [2]: [3]. Verify that the file [4] exists and that you can access it.'),
-(1920, u"Service '[2]' ([3]) failed to start. Verify that you have sufficient privileges to start system services."),
-(1921, u"Service '[2]' ([3]) could not be stopped. Verify that you have sufficient privileges to stop system services."),
-(1922, u"Service '[2]' ([3]) could not be deleted. Verify that you have sufficient privileges to remove system services."),
-(1923, u"Service '[2]' ([3]) could not be installed. Verify that you have sufficient privileges to install system services."),
-(1924, u"Could not update environment variable '[2]'. Verify that you have sufficient privileges to modify environment variables."),
-(1925, u'You do not have sufficient privileges to complete this installation for all users of the machine. Log on as administrator and then retry this installation.'),
-(1926, u"Could not set file security for file '[3]'. Error: [2]. Verify that you have sufficient privileges to modify the security permissions for this file."),
-(1927, u'Component Services (COM+ 1.0) are not installed on this computer. This installation requires Component Services in order to complete successfully. Component Services are available on Windows 2000.'),
-(1928, u'Error registering COM+ Application. Contact your support personnel for more information.'),
-(1929, u'Error unregistering COM+ Application. Contact your support personnel for more information.'),
-(1930, u"The description for service '[2]' ([3]) could not be changed."),
-(1931, u'The Windows Installer service cannot update the system file [2] because the file is protected by Windows. You may need to update your operating system for this program to work correctly. {{Package version: [3], OS Protected version: [4]}}'),
-(1932, u'The Windows Installer service cannot update the protected Windows file [2]. {{Package version: [3], OS Protected version: [4], SFP Error: [5]}}'),
-(1933, u'The Windows Installer service cannot update one or more protected Windows files. {{SFP Error: [2]. List of protected files:\\r\\n[3]}}'),
-(1934, u'User installations are disabled via policy on the machine.'),
-(1935, u'An error occurred during the installation of assembly component [2]. HRESULT: [3]. {{assembly interface: [4], function: [5], assembly name: [6]}}'),
-]
-
-tables=['AdminExecuteSequence', 'AdminUISequence', 'AdvtExecuteSequence', 'BBControl', 'Billboard', 'Binary', 'CheckBox', 'Property', 'ComboBox', 'Control', 'ListBox', 'ActionText', 'ControlCondition', 'ControlEvent', 'Dialog', 'EventMapping', 'InstallExecuteSequence', 'InstallUISequence', 'ListView', 'RadioButton', 'TextStyle', 'UIText', '_Validation', 'Error']
diff --git a/Tools/msi/uploadrelease.bat b/Tools/msi/uploadrelease.bat
new file mode 100644
index 0000000000..4e319ce4c9
--- /dev/null
+++ b/Tools/msi/uploadrelease.bat
@@ -0,0 +1,63 @@
+@setlocal
+@echo off
+
+set D=%~dp0
+set PCBUILD=%D%..\..\PCBuild\
+
+set HOST=
+set USER=
+set TARGET=
+set DRYRUN=false
+set NOGPG=
+
+:CheckOpts
+if "%1" EQU "-h" goto Help
+if "%1" EQU "-o" (set HOST=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "--host" (set HOST=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "-u" (set USER=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "--user" (set USER=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "-t" (set TARGET=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "--target" (set TARGET=%~2) && shift && shift && goto CheckOpts
+if "%1" EQU "--dry-run" (set DRYRUN=true) && shift && goto CheckOpts
+if "%1" EQU "--no-gpg" (set NOGPG=true) && shift && goto CheckOpts
+
+if not defined PLINK where plink > "%TEMP%\plink.loc" 2> nul && set /P PLINK= < "%TEMP%\plink.loc" & del "%TEMP%\plink.loc"
+if not defined PLINK where /R "%ProgramFiles(x86)%\PuTTY" plink > "%TEMP%\plink.loc" 2> nul && set /P PLINK= < "%TEMP%\plink.loc" & del "%TEMP%\plink.loc"
+if not defined PLINK where /R "%ProgramFiles(x86)%" plink > "%TEMP%\plink.loc" 2> nul && set /P PLINK= < "%TEMP%\plink.loc" & del "%TEMP%\plink.loc"
+if not defined PLINK echo Cannot locate plink.exe & exit /B 1
+echo Found plink.exe at %PLINK%
+
+if not defined PSCP where pscp > "%TEMP%\pscp.loc" 2> nul && set /P pscp= < "%TEMP%\pscp.loc" & del "%TEMP%\pscp.loc"
+if not defined PSCP where /R "%ProgramFiles(x86)%\PuTTY" pscp > "%TEMP%\pscp.loc" 2> nul && set /P pscp= < "%TEMP%\pscp.loc" & del "%TEMP%\pscp.loc"
+if not defined PSCP where /R "%ProgramFiles(x86)%" pscp > "%TEMP%\pscp.loc" 2> nul && set /P pscp= < "%TEMP%\pscp.loc" & del "%TEMP%\pscp.loc"
+if not defined PSCP echo Cannot locate pscp.exe & exit /B 1
+echo Found pscp.exe at %PSCP%
+
+if defined NOGPG (
+ set GPG=
+ echo Skipping GPG signature generation because of --no-gpg
+) else (
+ if not defined GPG where gpg2 > "%TEMP%\gpg.loc" 2> nul && set /P GPG= < "%TEMP%\gpg.loc" & del "%TEMP%\gpg.loc"
+ if not defined GPG where /R "%PCBUILD%..\externals\windows-installer" gpg2 > "%TEMP%\gpg.loc" 2> nul && set /P GPG= < "%TEMP%\gpg.loc" & del "%TEMP%\gpg.loc"
+ if not defined GPG echo Cannot locate gpg2.exe. Signatures will not be uploaded & pause
+ echo Found gpg2.exe at %GPG%
+)
+
+call "%PCBUILD%env.bat" > nul 2> nul
+pushd "%D%"
+msbuild /v:m /nologo uploadrelease.proj /t:Upload /p:Platform=x86
+msbuild /v:m /nologo uploadrelease.proj /t:Upload /p:Platform=x64 /p:IncludeDoc=false
+msbuild /v:m /nologo uploadrelease.proj /t:ShowHashes /p:Platform=x86
+msbuild /v:m /nologo uploadrelease.proj /t:ShowHashes /p:Platform=x64 /p:IncludeDoc=false
+popd
+exit /B 0
+
+:Help
+echo uploadrelease.bat --host HOST --user USERNAME [--target TARGET] [--dry-run] [-h]
+echo.
+echo --host (-o) Specify the upload host (required)
+echo --user (-u) Specify the user on the host (required)
+echo --target (-t) Specify the target directory on the host
+echo --dry-run Display commands and filenames without executing them
+echo -h Display this help information
+echo.
diff --git a/Tools/msi/uploadrelease.proj b/Tools/msi/uploadrelease.proj
new file mode 100644
index 0000000000..0d472dea54
--- /dev/null
+++ b/Tools/msi/uploadrelease.proj
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{2D69F2AB-D5D0-4344-84B5-EF6DB34A9BC9}</ProjectGuid>
+ <OutputName>python</OutputName>
+ <OutputSuffix></OutputSuffix>
+
+ <DownloadUrlBase Condition="'$(DownloadUrlBase)' == ''">$(TARGET)</DownloadUrlBase>
+ <DownloadUrlBase Condition="'$(DownloadUrlBase)' == ''">/srv/www.python.org/ftp/python</DownloadUrlBase>
+ <IncludeDoc Condition="'$(IncludeDoc)' == ''">true</IncludeDoc>
+ <DryRun Condition="'$(DryRun)' == ''">false</DryRun>
+ </PropertyGroup>
+
+ <Import Project="msi.props" />
+ <Import Project="bundle\bundle.targets" />
+
+ <PropertyGroup>
+ <EXETarget>$(DownloadUrlBase.TrimEnd(`/`))/$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)</EXETarget>
+ <MSITarget>$(DownloadUrl.Replace(`{version}`, `$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)`).Replace(`{arch}`, `$(ArchName)`).Replace(`{releasename}`, `$(ReleaseLevelName)`).Replace(`{msi}`, ``).TrimEnd(`/`))</MSITarget>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <File Include="$(OutputPath)\*.msi;$(OutputPath)\*.msu">
+ <CopyTo>$(MSITarget)</CopyTo>
+ </File>
+ <File Include="$(OutputPath)\*.exe;$(OutputPath)\*.zip">
+ <CopyTo>$(EXETarget)</CopyTo>
+ </File>
+ <File Include="$(PySourcePath)Doc\build\htmlhelp\python$(MajorVersionNumber)$(MinorVersionNumber)$(MicroVersionNumber)$(ReleaseLevelName).chm" Condition="$(IncludeDoc)">
+ <CopyTo>$(EXETarget)</CopyTo>
+ </File>
+ </ItemGroup>
+
+ <Target Name="_ValidateProperties">
+ <Error Text="No value for Host provided" Condition="'$(Host)' == ''" />
+ <Error Text="No value for User provided" Condition="'$(User)' == ''" />
+ <Error Text="No path for PSCP provided" Condition="'$(PSCP)' == ''" />
+ <Error Text="No path for PLINK provided" Condition="'$(PLINK)' == ''" />
+ </Target>
+
+ <Target Name="_RunGpg" Condition="'$(GPG)' != ''" Inputs="@(File)" Outputs="$(IntermediateOutputPath)\gpg\%(FileName)%(Extension).asc">
+ <MakeDir Directories="$(IntermediateOutputPath)gpg" />
+ <Delete Files="$(IntermediateOutputPath)\gpg\%(File.FileName)%(File.Extension).asc" Condition="Exists('$(IntermediateOutputPath)\gpg\%(File.FileName)%(File.Extension).asc')" />
+ <Exec Command="&quot;$(GPG)&quot; -ba -o &quot;$(IntermediateOutputPath)\gpg\%(File.FileName)%(File.Extension).asc&quot; &quot;%(File.FullPath)&quot;" />
+ <ItemGroup>
+ <File Include="$(IntermediateOutputPath)\gpg\%(File.FileName)%(File.Extension).asc">
+ <CopyTo>%(File.CopyTo)</CopyTo>
+ </File>
+ </ItemGroup>
+ </Target>
+
+ <Target Name="_Upload" Condition="!$(DryRun)">
+ <Exec Command="&quot;$(PLINK)&quot; $(User)@$(Host) mkdir %(File.CopyTo) ^&amp;^&amp; chgrp downloads %(File.CopyTo) ^&amp;^&amp; chmod g-w,o+rx %(File.CopyTo)
+&quot;$(PSCP)&quot; @(File,' ') $(User)@$(Host):%(File.CopyTo)
+&quot;$(PLINK)&quot; $(User)@$(Host) chgrp downloads %(File.CopyTo)/*; chmod g-w,o+r %(File.CopyTo)/*
+" />
+ </Target>
+
+ <Target Name="_PrintNames" Condition="$(DryRun)">
+ <Exec Command="echo &quot;$(PLINK)&quot; $(User)@$(Host) mkdir %(File.CopyTo) ^&amp;^&amp; chgrp downloads %(File.CopyTo) ^&amp;^&amp; chmod g-w,o+rx %(File.CopyTo)
+echo &quot;$(PSCP)&quot; @(File,' ') $(User)@$(Host):%(File.CopyTo)
+echo &quot;$(PLINK)&quot; $(User)@$(Host) chgrp downloads %(File.CopyTo)/*; chmod g-w,o+r %(File.CopyTo)/*
+echo.
+echo." />
+ </Target>
+
+ <Target Name="Upload" DependsOnTargets="_ValidateProperties;_RunGpg;_PrintNames;_Upload" />
+
+ <Target Name="ShowHashes">
+ <ItemGroup>
+ <UserFiles Include="@(File)" Condition="'%(File.CopyTo)' == '$(EXETarget)'" />
+ </ItemGroup>
+
+ <Exec Command="&quot;$(PythonExe)&quot; generate_md5.py @(UserFiles->'&quot;%(FullPath)&quot;',' ')" />
+ </Target>
+
+ <Target Name="Build">
+ <Error Text="This script should be invoked using uploadrelease.bat." />
+ </Target>
+</Project>
diff --git a/Tools/msi/wix.props b/Tools/msi/wix.props
new file mode 100644
index 0000000000..fbb2d1020e
--- /dev/null
+++ b/Tools/msi/wix.props
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="..\..\PCBuild\python.props" />
+
+ <PropertyGroup>
+ <WixInstallPath Condition="'$(WixInstallPath)' == '' and Exists('$(MSBuildThisFileDirectory)\Wix')">$(MSBuildThisFileDirectory)\Wix\</WixInstallPath>
+ <WixInstallPath Condition="'$(WixInstallPath)' == '' and Exists('$(ExternalsDir)\windows-installer\wix')">$(ExternalsDir)\windows-installer\wix\</WixInstallPath>
+ <WixInstallPath Condition="'$(WixInstallPath)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Installer XML\3.10@InstallRoot)</WixInstallPath>
+ <WixInstallPath Condition="'$(WixInstallPath)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows Installer XML\3.10@InstallRoot)</WixInstallPath>
+ <WixTargetsPath>$(WixInstallPath)\Wix.targets</WixTargetsPath>
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/parser/unparse.py b/Tools/parser/unparse.py
index 837cd81aaf..285030e792 100644
--- a/Tools/parser/unparse.py
+++ b/Tools/parser/unparse.py
@@ -138,6 +138,14 @@ class Unparser:
self.fill("nonlocal ")
interleave(lambda: self.write(", "), self.write, t.names)
+ def _Await(self, t):
+ self.write("(")
+ self.write("await")
+ if t.value:
+ self.write(" ")
+ self.dispatch(t.value)
+ self.write(")")
+
def _Yield(self, t):
self.write("(")
self.write("yield")
@@ -211,16 +219,6 @@ class Unparser:
if comma: self.write(", ")
else: comma = True
self.dispatch(e)
- if t.starargs:
- if comma: self.write(", ")
- else: comma = True
- self.write("*")
- self.dispatch(t.starargs)
- if t.kwargs:
- if comma: self.write(", ")
- else: comma = True
- self.write("**")
- self.dispatch(t.kwargs)
self.write(")")
self.enter()
@@ -228,11 +226,18 @@ class Unparser:
self.leave()
def _FunctionDef(self, t):
+ self.__FunctionDef_helper(t, "def")
+
+ def _AsyncFunctionDef(self, t):
+ self.__FunctionDef_helper(t, "async def")
+
+ def __FunctionDef_helper(self, t, fill_suffix):
self.write("\n")
for deco in t.decorator_list:
self.fill("@")
self.dispatch(deco)
- self.fill("def "+t.name + "(")
+ def_str = fill_suffix+" "+t.name + "("
+ self.fill(def_str)
self.dispatch(t.args)
self.write(")")
if t.returns:
@@ -243,7 +248,13 @@ class Unparser:
self.leave()
def _For(self, t):
- self.fill("for ")
+ self.__For_helper("for ", t)
+
+ def _AsyncFor(self, t):
+ self.__For_helper("async for ", t)
+
+ def __For_helper(self, fill, t):
+ self.fill(fill)
self.dispatch(t.target)
self.write(" in ")
self.dispatch(t.iter)
@@ -297,6 +308,13 @@ class Unparser:
self.dispatch(t.body)
self.leave()
+ def _AsyncWith(self, t):
+ self.fill("async with ")
+ interleave(lambda: self.write(", "), self.dispatch, t.items)
+ self.enter()
+ self.dispatch(t.body)
+ self.leave()
+
# expr
def _Bytes(self, t):
self.write(repr(t.s))
@@ -375,12 +393,21 @@ class Unparser:
def _Dict(self, t):
self.write("{")
- def write_pair(pair):
- (k, v) = pair
+ def write_key_value_pair(k, v):
self.dispatch(k)
self.write(": ")
self.dispatch(v)
- interleave(lambda: self.write(", "), write_pair, zip(t.keys, t.values))
+
+ def write_item(item):
+ k, v = item
+ if k is None:
+ # for dictionary unpacking operator in dicts {**{'y': 2}}
+ # see PEP 448 for details
+ self.write("**")
+ self.dispatch(v)
+ else:
+ write_key_value_pair(k, v)
+ interleave(lambda: self.write(", "), write_item, zip(t.keys, t.values))
self.write("}")
def _Tuple(self, t):
@@ -401,7 +428,7 @@ class Unparser:
self.dispatch(t.operand)
self.write(")")
- binop = { "Add":"+", "Sub":"-", "Mult":"*", "Div":"/", "Mod":"%",
+ binop = { "Add":"+", "Sub":"-", "Mult":"*", "MatMult":"@", "Div":"/", "Mod":"%",
"LShift":"<<", "RShift":">>", "BitOr":"|", "BitXor":"^", "BitAnd":"&",
"FloorDiv":"//", "Pow": "**"}
def _BinOp(self, t):
@@ -450,16 +477,6 @@ class Unparser:
if comma: self.write(", ")
else: comma = True
self.dispatch(e)
- if t.starargs:
- if comma: self.write(", ")
- else: comma = True
- self.write("*")
- self.dispatch(t.starargs)
- if t.kwargs:
- if comma: self.write(", ")
- else: comma = True
- self.write("**")
- self.dispatch(t.kwargs)
self.write(")")
def _Subscript(self, t):
@@ -543,8 +560,11 @@ class Unparser:
self.dispatch(t.kwarg.annotation)
def _keyword(self, t):
- self.write(t.arg)
- self.write("=")
+ if t.arg is None:
+ self.write("**")
+ else:
+ self.write(t.arg)
+ self.write("=")
self.dispatch(t.value)
def _Lambda(self, t):
diff --git a/Tools/pybench/README b/Tools/pybench/README
index e59e6c0ce6..40f7eec797 100644
--- a/Tools/pybench/README
+++ b/Tools/pybench/README
@@ -4,7 +4,7 @@ PYBENCH - A Python Benchmark Suite
________________________________________________________________________
Extendable suite of low-level benchmarks for measuring
- the performance of the Python implementation
+ the performance of the Python implementation
(interpreter, compiler or VM).
pybench is a collection of tests that provides a standardized way to
@@ -34,11 +34,11 @@ to have it store the results in a file too.
It is usually a good idea to run pybench.py multiple times to see
whether the environment, timers and benchmark run-times are suitable
-for doing benchmark tests.
+for doing benchmark tests.
You can use the comparison feature of pybench.py ('pybench.py -c
<file>') to check how well the system behaves in comparison to a
-reference run.
+reference run.
If the differences are well below 10% for each test, then you have a
system that is good for doing benchmark testings. Of you get random
@@ -232,7 +232,7 @@ class IntegerCounting(Test):
# for comparisons of benchmark runs - tests with unequal version
# number will not get compared.
version = 1.0
-
+
# The number of abstract operations done in each round of the
# test. An operation is the basic unit of what you want to
# measure. The benchmark will output the amount of run-time per
@@ -264,7 +264,7 @@ class IntegerCounting(Test):
# Repeat the operations per round to raise the run-time
# per operation significantly above the noise level of the
- # for-loop overhead.
+ # for-loop overhead.
# Execute 20 operations (a += 1):
a += 1
@@ -358,8 +358,8 @@ Version History
- changed the output format a bit to make it look
nicer
- refactored the APIs somewhat
- 1.3+: Steve Holden added the NewInstances test and the filtering
- option during the NeedForSpeed sprint; this also triggered a long
+ 1.3+: Steve Holden added the NewInstances test and the filtering
+ option during the NeedForSpeed sprint; this also triggered a long
discussion on how to improve benchmark timing and finally
resulted in the release of 2.0
1.3: initial checkin into the Python SVN repository
diff --git a/Tools/pynche/README b/Tools/pynche/README
index d20efc3164..e026159e3c 100644
--- a/Tools/pynche/README
+++ b/Tools/pynche/README
@@ -48,7 +48,7 @@ Running Standalone
--initfile file
-i file
- Alternate location of the persistent initialization file. See
+ Alternate location of the persistent initialization file. See
the section on Persistency below.
--ignore
@@ -80,7 +80,7 @@ Running as a Modal Dialog
pyColorChooser.askcolor()
- which will popup Pynche as a modal dialog, and return the selected
+ which will popup Pynche as a modal dialog, and return the selected
color.
There are some UI differences when running as a modal
@@ -106,7 +106,7 @@ Running as a Modal Dialog
master[*]
the master window to use as the parent of the modal
- dialog. Without this argument, pyColorChooser will create
+ dialog. Without this argument, pyColorChooser will create
its own Tkinter.Tk instance as the master. This may not
be what you want.
@@ -170,7 +170,7 @@ The Proof Window
Selected chip color exactly matches the Nearest chip color, you
will see the color name appear below the color specification for
the Selected chip.
-
+
Clicking on the Nearest color chip selects that color. Color
distance is calculated in the 3D space of the RGB color solid and
if more than one color name is the same distance from the selected
@@ -361,7 +361,7 @@ Color Name Database Files
format for both values and names
webcolors.txt -- The 140 color names that Tim Peters and his
- sister say NS and MSIE both understand (with some controversy over
+ sister say NS and MSIE both understand (with some controversy over
AliceBlue).
namedcolors.txt -- an alternative set of Netscape colors.
@@ -369,8 +369,8 @@ Color Name Database Files
You can switch between files by choosing "Load palette..." from
the "File" menu. This brings up a standard Tk file dialog.
Choose the file you want and then click "Ok". If Pynche
- understands the format in this file, it will load the database and
- update the appropriate windows. If not, it will bring up an error
+ understands the format in this file, it will load the database and
+ update the appropriate windows. If not, it will bring up an error
dialog.
diff --git a/Tools/scripts/diff.py b/Tools/scripts/diff.py
index 8be527fd62..9720a43155 100755
--- a/Tools/scripts/diff.py
+++ b/Tools/scripts/diff.py
@@ -8,7 +8,7 @@
"""
-import sys, os, time, difflib, optparse
+import sys, os, time, difflib, argparse
from datetime import datetime, timezone
def file_mtime(path):
@@ -18,23 +18,25 @@ def file_mtime(path):
def main():
- usage = "usage: %prog [options] fromfile tofile"
- parser = optparse.OptionParser(usage)
- parser.add_option("-c", action="store_true", default=False, help='Produce a context format diff (default)')
- parser.add_option("-u", action="store_true", default=False, help='Produce a unified format diff')
- parser.add_option("-m", action="store_true", default=False, help='Produce HTML side by side diff (can use -c and -l in conjunction)')
- parser.add_option("-n", action="store_true", default=False, help='Produce a ndiff format diff')
- parser.add_option("-l", "--lines", type="int", default=3, help='Set number of context lines (default 3)')
- (options, args) = parser.parse_args()
-
- if len(args) == 0:
- parser.print_help()
- sys.exit(1)
- if len(args) != 2:
- parser.error("need to specify both a fromfile and tofile")
+ parser = argparse.ArgumentParser()
+ parser.add_argument('-c', action='store_true', default=False,
+ help='Produce a context format diff (default)')
+ parser.add_argument('-u', action='store_true', default=False,
+ help='Produce a unified format diff')
+ parser.add_argument('-m', action='store_true', default=False,
+ help='Produce HTML side by side diff '
+ '(can use -c and -l in conjunction)')
+ parser.add_argument('-n', action='store_true', default=False,
+ help='Produce a ndiff format diff')
+ parser.add_argument('-l', '--lines', type=int, default=3,
+ help='Set number of context lines (default 3)')
+ parser.add_argument('fromfile')
+ parser.add_argument('tofile')
+ options = parser.parse_args()
n = options.lines
- fromfile, tofile = args
+ fromfile = options.fromfile
+ tofile = options.tofile
fromdate = file_mtime(fromfile)
todate = file_mtime(tofile)
diff --git a/Tools/scripts/dutree.doc b/Tools/scripts/dutree.doc
index 2a094261b1..97bd2e2e47 100644
--- a/Tools/scripts/dutree.doc
+++ b/Tools/scripts/dutree.doc
@@ -34,13 +34,13 @@ sometimes it's not worth it. I actually wrote a C program the other day
: | 1 sm.bak
At first I thought I could just keep one local list around
-at once, but this seems inherently recursive. Which means
+at once, but this seems inherently recursive. Which means
I need an real recursive data structure. Maybe you could
do it with one of the %assoc arrays Larry uses in the begat
programs, but I broke down and got dirty. I think the hardest
-part was matching Felix's desired output exactly. It's not
+part was matching Felix's desired output exactly. It's not
blazingly fast: I should probably inline the &childof routine,
-but it *was* faster to write than I could have written the
+but it *was* faster to write than I could have written the
equivalent C program.
diff --git a/Tools/scripts/eptags.py b/Tools/scripts/eptags.py
index 671ff11e65..401ac7e29c 100755
--- a/Tools/scripts/eptags.py
+++ b/Tools/scripts/eptags.py
@@ -25,7 +25,7 @@ def treat_file(filename, outfp):
"""Append tags found in file named 'filename' to the open file 'outfp'"""
try:
fp = open(filename, 'r')
- except:
+ except OSError:
sys.stderr.write('Cannot open %s\n'%filename)
return
charno = 0
diff --git a/Tools/scripts/find_recursionlimit.py b/Tools/scripts/find_recursionlimit.py
index 1171146421..b2842a62ef 100755
--- a/Tools/scripts/find_recursionlimit.py
+++ b/Tools/scripts/find_recursionlimit.py
@@ -92,7 +92,7 @@ def test_cpickle(_cache={}):
def test_compiler_recursion():
# The compiler uses a scaling factor to support additional levels
# of recursion. This is a sanity check of that scaling to ensure
- # it still raises RuntimeError even at higher recursion limits
+ # it still raises RecursionError even at higher recursion limits
compile("()" * (10 * sys.getrecursionlimit()), "<single>", "single")
def check_limit(n, test_func_name):
@@ -107,7 +107,7 @@ def check_limit(n, test_func_name):
# AttributeError can be raised because of the way e.g. PyDict_GetItem()
# silences all exceptions and returns NULL, which is usually interpreted
# as "missing attribute".
- except (RuntimeError, AttributeError):
+ except (RecursionError, AttributeError):
pass
else:
print("Yikes!")
diff --git a/Tools/scripts/findnocoding.py b/Tools/scripts/findnocoding.py
index 5f3795e657..6c16b1ce15 100755
--- a/Tools/scripts/findnocoding.py
+++ b/Tools/scripts/findnocoding.py
@@ -32,7 +32,7 @@ except ImportError:
"no sophisticated Python source file search will be done.", file=sys.stderr)
-decl_re = re.compile(rb'^[ \t\f]*#.*coding[:=][ \t]*([-\w.]+)')
+decl_re = re.compile(rb'^[ \t\f]*#.*?coding[:=][ \t]*([-\w.]+)')
blank_re = re.compile(rb'^[ \t\f]*(?:[#\r\n]|$)')
def get_declaration(line):
diff --git a/Tools/scripts/generate_opcode_h.py b/Tools/scripts/generate_opcode_h.py
new file mode 100644
index 0000000000..c62f9a5b23
--- /dev/null
+++ b/Tools/scripts/generate_opcode_h.py
@@ -0,0 +1,54 @@
+# This script generates the opcode.h header file.
+
+from __future__ import with_statement
+
+import sys
+header = """/* Auto-generated by Tools/scripts/generate_opcode_h.py */
+#ifndef Py_OPCODE_H
+#define Py_OPCODE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+ /* Instruction opcodes for compiled code */
+"""
+
+footer = """
+/* EXCEPT_HANDLER is a special, implicit block type which is created when
+ entering an except handler. It is not an opcode but we define it here
+ as we want it to be available to both frameobject.c and ceval.c, while
+ remaining private.*/
+#define EXCEPT_HANDLER 257
+
+
+enum cmp_op {PyCmp_LT=Py_LT, PyCmp_LE=Py_LE, PyCmp_EQ=Py_EQ, PyCmp_NE=Py_NE,
+ PyCmp_GT=Py_GT, PyCmp_GE=Py_GE, PyCmp_IN, PyCmp_NOT_IN,
+ PyCmp_IS, PyCmp_IS_NOT, PyCmp_EXC_MATCH, PyCmp_BAD};
+
+#define HAS_ARG(op) ((op) >= HAVE_ARGUMENT)
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_OPCODE_H */
+"""
+
+
+def main(opcode_py, outfile='Include/opcode.h'):
+ opcode = {}
+ exec(open(opcode_py).read(), opcode)
+ opmap = opcode['opmap']
+ with open(outfile, 'w') as fobj:
+ fobj.write(header)
+ for name in opcode['opname']:
+ if name in opmap:
+ fobj.write("#define %-23s %3s\n" % (name, opmap[name]))
+ if name == 'POP_EXCEPT': # Special entry for HAVE_ARGUMENT
+ fobj.write("#define %-23s %3d\n" %
+ ('HAVE_ARGUMENT', opcode['HAVE_ARGUMENT']))
+ fobj.write(footer)
+
+
+if __name__ == '__main__':
+ main(sys.argv[1], sys.argv[2])
diff --git a/Tools/scripts/run_tests.py b/Tools/scripts/run_tests.py
index a6c5da35e2..b582e13250 100644
--- a/Tools/scripts/run_tests.py
+++ b/Tools/scripts/run_tests.py
@@ -33,8 +33,6 @@ def main(regrtest_args):
# Allow user-specified interpreter options to override our defaults.
args.extend(test.support.args_from_interpreter_flags())
- # Workaround for issue #20355
- os.environ.pop("PYTHONWARNINGS", None)
# Workaround for issue #20361
args.extend(['-W', 'error::BytesWarning'])
@@ -50,7 +48,11 @@ def main(regrtest_args):
args.extend(['-u', 'all,-largefile,-audio,-gui'])
args.extend(regrtest_args)
print(' '.join(args))
- os.execv(sys.executable, args)
+ if sys.platform == 'win32':
+ from subprocess import call
+ sys.exit(call(args))
+ else:
+ os.execv(sys.executable, args)
if __name__ == '__main__':
diff --git a/Tools/scripts/win_add2path.py b/Tools/scripts/win_add2path.py
index c85bea576f..1c9aedc5ed 100644
--- a/Tools/scripts/win_add2path.py
+++ b/Tools/scripts/win_add2path.py
@@ -22,7 +22,8 @@ def modify():
scripts = os.path.join(pythonpath, "Scripts")
appdata = os.environ["APPDATA"]
if hasattr(site, "USER_SITE"):
- userpath = site.USER_SITE.replace(appdata, "%APPDATA%")
+ usersite = site.USER_SITE.replace(appdata, "%APPDATA%")
+ userpath = os.path.dirname(usersite)
userscripts = os.path.join(userpath, "Scripts")
else:
userscripts = None
diff --git a/Tools/ssl/sslspeed.vcxproj b/Tools/ssl/sslspeed.vcxproj
new file mode 100644
index 0000000000..8ec410681e
--- /dev/null
+++ b/Tools/ssl/sslspeed.vcxproj
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{F068BCCF-C0D6-478D-A2C5-26BA3237C992}</ProjectGuid>
+ <RootNamespace>sslspeed</RootNamespace>
+ </PropertyGroup>
+
+ <Import Project="..\..\PCBuild\python.props" />
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <Import Project="..\..\PCBuild\openssl.props" />
+
+ <PropertyGroup Label="Configuration">
+ <OriginalOutDir>$(OutDir)</OriginalOutDir>
+ <OutDir>$(MSBuildProjectDirectory)\$(ArchName)\</OutDir>
+ <IntDir>$(MSBuildProjectDirectory)\$(ArchName)\obj\</IntDir>
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+
+ <ItemGroup>
+ <ClCompile Include="$(opensslDir)apps\speed.c" />
+ <ClCompile Include="$(opensslDir)apps\apps.c" />
+ </ItemGroup>
+
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>$(opensslIncDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;crypt32.lib;libeay$(PyDebugExt).lib;ssleay$(PyDebugExt).lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>$(OriginalOutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <SubSystem>Console</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\..\PCBuild\ssleay.vcxproj">
+ <Project>{10615b24-73bf-4efa-93aa-236916321317}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ <ProjectReference Include="..\..\PCBuild\libeay.vcxproj">
+ <Project>{e5b04cc0-eb4c-42ab-b4dc-18ef95f864b0}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/unicode/gencodec.py b/Tools/unicode/gencodec.py
index 98b39758f9..4c214690d3 100644
--- a/Tools/unicode/gencodec.py
+++ b/Tools/unicode/gencodec.py
@@ -127,7 +127,7 @@ def hexrepr(t, precision=4):
return 'None'
try:
len(t)
- except:
+ except TypeError:
return '0x%0*X' % (precision, t)
try:
return '(' + ', '.join(['0x%0*X' % (precision, item)
diff --git a/Tools/unicode/makeunicodedata.py b/Tools/unicode/makeunicodedata.py
index 7636a958e2..713e175c50 100644
--- a/Tools/unicode/makeunicodedata.py
+++ b/Tools/unicode/makeunicodedata.py
@@ -42,7 +42,7 @@ VERSION = "3.2"
# * Doc/library/stdtypes.rst, and
# * Doc/library/unicodedata.rst
# * Doc/reference/lexical_analysis.rst (two occurrences)
-UNIDATA_VERSION = "6.3.0"
+UNIDATA_VERSION = "8.0.0"
UNICODE_DATA = "UnicodeData%s.txt"
COMPOSITION_EXCLUSIONS = "CompositionExclusions%s.txt"
EASTASIAN_WIDTH = "EastAsianWidth%s.txt"
@@ -99,10 +99,11 @@ EXTENDED_CASE_MASK = 0x4000
# these ranges need to match unicodedata.c:is_unified_ideograph
cjk_ranges = [
('3400', '4DB5'),
- ('4E00', '9FCC'),
+ ('4E00', '9FD5'),
('20000', '2A6D6'),
('2A700', '2B734'),
- ('2B740', '2B81D')
+ ('2B740', '2B81D'),
+ ('2B820', '2CEA1'),
]
def maketables(trace=0):
diff --git a/Tools/unittestgui/README.txt b/Tools/unittestgui/README.txt
index 4d809df870..0a477e167c 100644
--- a/Tools/unittestgui/README.txt
+++ b/Tools/unittestgui/README.txt
@@ -1,5 +1,5 @@
-unittestgui.py is GUI framework and application for use with Python unit
-testing framework. It executes tests written using the framework provided
+unittestgui.py is GUI framework and application for use with Python unit
+testing framework. It executes tests written using the framework provided
by the 'unittest' module.
Based on the original by Steve Purcell, from:
diff --git a/aclocal.m4 b/aclocal.m4
index 7d25fb9253..1f0e6f485c 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.15 -*- Autoconf -*-
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/configure b/configure
index 7b91f914d4..c892a99f9d 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for python 3.4.
+# Generated by GNU Autoconf 2.69 for python 3.5.
#
# Report bugs to <http://bugs.python.org/>.
#
@@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='python'
PACKAGE_TARNAME='python'
-PACKAGE_VERSION='3.4'
-PACKAGE_STRING='python 3.4'
+PACKAGE_VERSION='3.5'
+PACKAGE_STRING='python 3.5'
PACKAGE_BUGREPORT='http://bugs.python.org/'
PACKAGE_URL=''
@@ -667,12 +667,20 @@ UNIVERSAL_ARCH_FLAGS
CFLAGS_NODIST
BASECFLAGS
OPT
+LLVM_PROF_FOUND
+LLVM_PROF_ERR
+LLVM_PROF_FILE
+LLVM_PROF_MERGER
+PGO_PROF_USE_FLAG
+PGO_PROF_GEN_FLAG
+LTOFLAGS
ABIFLAGS
LN
MKDIR_P
INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
+OPCODEHGEN
PYTHON
ASDLGEN
ac_ct_READELF
@@ -693,15 +701,17 @@ BLDLIBRARY
DLLLIBRARY
LDLIBRARY
LIBRARY
-MULTIARCH
BUILDEXEEXT
EGREP
-GREP
-CPP
NO_AS_NEEDED
+PLATFORM_TRIPLET
+PLATDIR
+MULTIARCH
ac_ct_CXX
MAINCC
CXX
+GREP
+CPP
OBJEXT
EXEEXT
ac_ct_CC
@@ -711,7 +721,6 @@ CFLAGS
CC
EXPORT_MACOSX_DEPLOYMENT_TARGET
CONFIGURE_MACOSX_DEPLOYMENT_TARGET
-PLATDIR
SGI_ABI
_PYTHON_HOST_PLATFORM
MACHDEP
@@ -742,6 +751,7 @@ build_os
build_vendor
build_cpu
build
+cross_compiling
HAS_HG
HGBRANCH
HGTAG
@@ -793,12 +803,15 @@ with_universal_archs
with_framework_name
enable_framework
with_gcc
+with_icc
with_cxx_main
with_suffix
enable_shared
enable_profiling
with_pydebug
+with_lto
with_hash_algorithm
+with_address_sanitizer
with_libs
with_system_expat
with_system_ffi
@@ -1375,7 +1388,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures python 3.4 to adapt to many kinds of systems.
+\`configure' configures python 3.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1440,7 +1453,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of python 3.4:";;
+ short | recursive ) echo "Configuration of python 3.5:";;
esac
cat <<\_ACEOF
@@ -1471,13 +1484,18 @@ Optional Packages:
specify an alternate name of the framework built
with --enable-framework
--without-gcc never use gcc
+ --with-icc build with icc
--with-cxx-main=<compiler>
compile main() and link python executable with C++
compiler
--with-suffix=.exe set executable suffix
--with-pydebug build with Py_DEBUG defined
+ --with-lto Enable Link Time Optimization in PGO builds.
+ Disabled by default.
--with-hash-algorithm=[fnv|siphash24]
select hash algorithm
+ --with-address-sanitizer
+ enable AddressSanitizer
--with-libs='lib1 ...' link against additional libs
--with-system-expat build pyexpat module using an installed expat
library
@@ -1592,7 +1610,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-python configure 3.4
+python configure 3.5
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1644,21 +1662,20 @@ fi
} # ac_fn_c_try_compile
-# ac_fn_c_try_link LINENO
-# -----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_link ()
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { { ac_try="$ac_link"
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>conftest.err
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
grep -v '^ *+' conftest.err >conftest.er1
@@ -1666,44 +1683,37 @@ $as_echo "$ac_try_echo"; } >&5
mv -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_c_werror_flag" ||
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- test -x conftest$ac_exeext
}; then :
ac_retval=0
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_retval=1
+ ac_retval=1
fi
- # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
- # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
- # interfere with the next link command; also delete a directory that is
- # left behind by Apple's compiler. We do this before executing the actions.
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
-} # ac_fn_c_try_link
+} # ac_fn_c_try_cpp
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_cpp conftest.$ac_ext"
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ (eval "$ac_link") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
grep -v '^ *+' conftest.err >conftest.er1
@@ -1711,21 +1721,29 @@ $as_echo "$ac_try_echo"; } >&5
mv -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } > conftest.i && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ test -x conftest$ac_exeext
}; then :
ac_retval=0
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_retval=1
+ ac_retval=1
fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
-} # ac_fn_c_try_cpp
+} # ac_fn_c_try_link
# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
@@ -2431,7 +2449,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by python $as_me 3.4, which was
+It was created by python $as_me 3.5, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2858,6 +2876,7 @@ fi
ac_config_headers="$ac_config_headers pyconfig.h"
+
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
if test -f "$ac_dir/install-sh"; then
@@ -3004,7 +3023,7 @@ rm confdefs.h
mv confdefs.h.new confdefs.h
-VERSION=3.4
+VERSION=3.5
# Version number of Python's own shared library file.
@@ -3478,7 +3497,7 @@ fi
#
# SGI compilers allow the specification of the both the ABI and the
# ISA on the command line. Depending on the values of these switches,
-# different and often incompatable code will be generated.
+# different and often incompatible code will be generated.
#
# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
# thus supply support for various ABI/ISA combinations. The MACHDEP
@@ -3494,9 +3513,6 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
$as_echo "$MACHDEP" >&6; }
-
-PLATDIR=plat-$MACHDEP
-
# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
# it may influence the way we can build extensions, so distutils
# needs to check it
@@ -3541,6 +3557,29 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
$as_echo "$without_gcc" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
+$as_echo_n "checking for --with-icc... " >&6; }
+
+# Check whether --with-icc was given.
+if test "${with_icc+set}" = set; then :
+ withval=$with_icc;
+ case $withval in
+ no) CC=${CC:-cc}
+ with_icc=no;;
+ yes) CC=icc
+ CXX=icpc
+ with_icc=yes;;
+ *) CC=$withval
+ with_icc=$withval;;
+ esac
+else
+
+ with_icc=no
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
+$as_echo "$with_icc" >&6; }
+
# If the user switches compilers, we can't believe the cache
if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
then
@@ -4403,6 +4442,206 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if ${ac_cv_prog_CPP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
@@ -4733,6 +4972,104 @@ else
CXX="$ac_cv_path_CXX"
fi
;;
+ icc|*/icc) if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}icpc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $CXX in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in notfound
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+CXX=$ac_cv_path_CXX
+if test -n "$CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_CXX"; then
+ ac_pt_CXX=$CXX
+ # Extract the first word of "icpc", so it can be a program name with args.
+set dummy icpc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_CXX+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $ac_pt_CXX in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in notfound
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_CXX=$ac_cv_path_ac_pt_CXX
+if test -n "$ac_pt_CXX"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
+$as_echo "$ac_pt_CXX" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_pt_CXX" = x; then
+ CXX="icpc"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CXX=$ac_pt_CXX
+ fi
+else
+ CXX="$ac_cv_path_CXX"
+fi
+ ;;
esac
if test "$CXX" = "notfound"
then
@@ -4861,6 +5198,145 @@ $as_echo "$as_me:
fi
+MULTIARCH=$($CC --print-multiarch 2>/dev/null)
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
+$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
+cat >> conftest.c <<EOF
+#undef bfin
+#undef cris
+#undef fr30
+#undef linux
+#undef hppa
+#undef hpux
+#undef i386
+#undef mips
+#undef powerpc
+#undef sparc
+#undef unix
+#if defined(__linux__)
+# if defined(__x86_64__) && defined(__LP64__)
+ x86_64-linux-gnu
+# elif defined(__x86_64__) && defined(__ILP32__)
+ x86_64-linux-gnux32
+# elif defined(__i386__)
+ i386-linux-gnu
+# elif defined(__aarch64__) && defined(__AARCH64EL__)
+# if defined(__ILP32__)
+ aarch64_ilp32-linux-gnu
+# else
+ aarch64-linux-gnu
+# endif
+# elif defined(__aarch64__) && defined(__AARCH64EB__)
+# if defined(__ILP32__)
+ aarch64_be_ilp32-linux-gnu
+# else
+ aarch64_be-linux-gnu
+# endif
+# elif defined(__alpha__)
+ alpha-linux-gnu
+# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
+# if defined(__ARMEL__)
+ arm-linux-gnueabihf
+# else
+ armeb-linux-gnueabihf
+# endif
+# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
+# if defined(__ARMEL__)
+ arm-linux-gnueabi
+# else
+ armeb-linux-gnueabi
+# endif
+# elif defined(__hppa__)
+ hppa-linux-gnu
+# elif defined(__ia64__)
+ ia64-linux-gnu
+# elif defined(__m68k__) && !defined(__mcoldfire__)
+ m68k-linux-gnu
+# elif defined(__mips_hard_float) && defined(_MIPSEL)
+# if _MIPS_SIM == _ABIO32
+ mipsel-linux-gnu
+# elif _MIPS_SIM == _ABIN32
+ mips64el-linux-gnuabin32
+# elif _MIPS_SIM == _ABI64
+ mips64el-linux-gnuabi64
+# else
+# error unknown platform triplet
+# endif
+# elif defined(__mips_hard_float)
+# if _MIPS_SIM == _ABIO32
+ mips-linux-gnu
+# elif _MIPS_SIM == _ABIN32
+ mips64-linux-gnuabin32
+# elif _MIPS_SIM == _ABI64
+ mips64-linux-gnuabi64
+# else
+# error unknown platform triplet
+# endif
+# elif defined(__or1k__)
+ or1k-linux-gnu
+# elif defined(__powerpc__) && defined(__SPE__)
+ powerpc-linux-gnuspe
+# elif defined(__powerpc64__)
+# if defined(__LITTLE_ENDIAN__)
+ powerpc64le-linux-gnu
+# else
+ powerpc64-linux-gnu
+# endif
+# elif defined(__powerpc__)
+ powerpc-linux-gnu
+# elif defined(__s390x__)
+ s390x-linux-gnu
+# elif defined(__s390__)
+ s390-linux-gnu
+# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
+ sh4-linux-gnu
+# elif defined(__sparc__) && defined(__arch64__)
+ sparc64-linux-gnu
+# elif defined(__sparc__)
+ sparc-linux-gnu
+# else
+# error unknown platform triplet
+# endif
+#elif defined(__FreeBSD_kernel__)
+# if defined(__LP64__)
+ x86_64-kfreebsd-gnu
+# elif defined(__i386__)
+ i386-kfreebsd-gnu
+# else
+# error unknown platform triplet
+# endif
+#elif defined(__gnu_hurd__)
+ i386-gnu
+#elif defined(__APPLE__)
+ darwin
+#else
+# error unknown platform triplet
+#endif
+
+EOF
+
+if $CPP conftest.c >conftest.out 2>/dev/null; then
+ PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
+$as_echo "$PLATFORM_TRIPLET" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
+$as_echo "none" >&6; }
+fi
+rm -f conftest.c conftest.out
+
+if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
+ if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
+ as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
+ fi
+fi
+PLATDIR=plat-$MACHDEP
+
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
save_LDFLAGS="$LDFLAGS"
@@ -4893,206 +5369,6 @@ LDFLAGS="$save_LDFLAGS"
# checks for UNIX variants that set C preprocessor variables
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
- if ${ac_cv_prog_CPP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
- do
- ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
- break
-fi
-
- done
- ac_cv_prog_CPP=$CPP
-
-fi
- CPP=$ac_cv_prog_CPP
-else
- ac_cv_prog_CPP=$CPP
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if ${ac_cv_path_GREP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$GREP"; then
- ac_path_GREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in grep ggrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- as_fn_executable_p "$ac_path_GREP" || continue
-# Check for GNU ac_path_GREP and select it if it is found.
- # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'GREP' >> "conftest.nl"
- "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_GREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_GREP="$ac_path_GREP"
- ac_path_GREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_GREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_GREP"; then
- as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
$as_echo_n "checking for egrep... " >&6; }
@@ -5412,10 +5688,6 @@ hp*|HP*)
esac;;
esac
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
-
-
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
$as_echo_n "checking LIBRARY... " >&6; }
@@ -5654,11 +5926,6 @@ $as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
LDLIBRARY='libpython$(LDVERSION).so'
BLDLIBRARY='-L. -lpython$(LDVERSION)'
RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
- case $ac_sys_system in
- FreeBSD*)
- SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
- ;;
- esac
INSTSONAME="$LDLIBRARY".$SOVERSION
if test "$with_pydebug" != yes
then
@@ -6066,6 +6333,57 @@ else
fi
+for ac_prog in python$PACKAGE_VERSION python3 python
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_PYTHON+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PYTHON"; then
+ ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PYTHON="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+PYTHON=$ac_cv_prog_PYTHON
+if test -n "$PYTHON"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
+$as_echo "$PYTHON" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$PYTHON" && break
+done
+test -n "$PYTHON" || PYTHON="not-found"
+
+if test "$PYTHON" = not-found; then
+ OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py"
+else
+ OPCODEHGEN="$PYTHON"
+fi
+
+
+
case $MACHDEP in
bsdos*|hp*|HP*)
# install -d does not work on BSDI or HP-UX
@@ -6248,6 +6566,134 @@ $as_echo "no" >&6; }
fi
+# Enable LTO flags
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
+$as_echo_n "checking for --with-lto... " >&6; }
+
+# Check whether --with-lto was given.
+if test "${with_lto+set}" = set; then :
+ withval=$with_lto;
+if test "$withval" != no
+then
+ Py_LTO='true'
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; };
+else
+ Py_LTO='false'
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; };
+fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+if test "$Py_LTO" = 'true' ; then
+ case $CC in
+ *clang*)
+ # Any changes made here should be reflected in the GCC+Darwin case below
+ LTOFLAGS="-flto"
+ ;;
+ *gcc*)
+ case $ac_sys_system in
+ Darwin*)
+ LTOFLAGS="-flto"
+ ;;
+ *)
+ LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
+ ;;
+ esac
+ ;;
+ esac
+fi
+
+# Enable PGO flags.
+
+
+
+
+
+
+# Extract the first word of "llvm-profdata", so it can be a program name with args.
+set dummy llvm-profdata; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$LLVM_PROF_FOUND"; then
+ ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LLVM_PROF_FOUND="found"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
+fi
+fi
+LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
+if test -n "$LLVM_PROF_FOUND"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
+$as_echo "$LLVM_PROF_FOUND" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+LLVM_PROF_ERR=no
+case $CC in
+ *clang*)
+ # Any changes made here should be reflected in the GCC+Darwin case below
+ PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
+ PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
+ LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
+ LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
+ if test $LLVM_PROF_FOUND = not-found
+ then
+ LLVM_PROF_ERR=yes
+ fi
+ ;;
+ *gcc*)
+ case $ac_sys_system in
+ Darwin*)
+ PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
+ PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
+ LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
+ LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
+ if test $LLVM_PROF_FOUND = not-found
+ then
+ LLVM_PROF_ERR=yes
+ fi
+ ;;
+ *)
+ PGO_PROF_GEN_FLAG="-fprofile-generate"
+ PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
+ LLVM_PROF_MERGER="true"
+ LLVM_PROF_FILE=""
+ ;;
+ esac
+ ;;
+ *icc*)
+ PGO_PROF_GEN_FLAG="-prof-gen"
+ PGO_PROF_USE_FLAG="-prof-use"
+ LLVM_PROF_MERGER="true"
+ LLVM_PROF_FILE=""
+ ;;
+esac
+
# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
# merged with this chunk of code?
@@ -6392,6 +6838,13 @@ $as_echo "$ac_cv_no_strict_aliasing" >&6; }
BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
fi
+ # ICC doesn't recognize the option, but only emits a warning
+ ## XXX does it emit an unused result warning and can it be disabled?
+ case "$CC" in
+ *icc*)
+ ac_cv_disable_unused_result_warning=no
+ ;;
+ *)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
ac_save_cc="$CC"
@@ -6429,6 +6882,8 @@ fi
CC="$ac_save_cc"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
+ ;;
+ esac
if test $ac_cv_disable_unused_result_warning = yes
then
@@ -6478,6 +6933,103 @@ $as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
+$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
+ ac_save_cc="$CC"
+ CC="$CC -Wsign-compare"
+ save_CFLAGS="$CFLAGS"
+ if ${ac_cv_enable_sign_compare_warning+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ ac_cv_enable_sign_compare_warning=yes
+
+else
+
+ ac_cv_enable_sign_compare_warning=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ CFLAGS="$save_CFLAGS"
+ CC="$ac_save_cc"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
+$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
+
+ if test $ac_cv_enable_sign_compare_warning = yes
+ then
+ BASECFLAGS="$BASECFLAGS -Wsign-compare"
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
+$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
+ ac_save_cc="$CC"
+ CC="$CC -Wunreachable-code"
+ save_CFLAGS="$CFLAGS"
+ if ${ac_cv_enable_unreachable_code_warning+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ ac_cv_enable_unreachable_code_warning=yes
+
+else
+
+ ac_cv_enable_unreachable_code_warning=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ CFLAGS="$save_CFLAGS"
+ CC="$ac_save_cc"
+
+ # Don't enable unreachable code warning in debug mode, since it usually
+ # results in non-standard code paths.
+ # Issue #24324: Unfortunately, the unreachable code warning does not work
+ # correctly on gcc and has been silently removed from the compiler.
+ # It is supported on clang but on OS X systems gcc may be an alias
+ # for clang. Try to determine if the compiler is not really gcc and,
+ # if so, only then enable the warning.
+ if test $ac_cv_enable_unreachable_code_warning = yes && \
+ test "$Py_DEBUG" != "true" && \
+ test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
+ then
+ BASECFLAGS="$BASECFLAGS -Wunreachable-code"
+ else
+ ac_cv_enable_unreachable_code_warning=no
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
+$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
+
# if using gcc on alpha, use -mieee to get (near) full IEEE 754
# support. Without this, treatment of subnormals doesn't follow
# the standard.
@@ -6630,6 +7182,13 @@ $as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
;;
esac
+# ICC needs -fp-model strict or floats behave badly
+case "$CC" in
+*icc*)
+ CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
+ ;;
+esac
+
if test "$Py_DEBUG" = 'true'; then
:
else
@@ -7010,7 +7569,7 @@ sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
-bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
+bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
sys/endian.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -9180,6 +9739,23 @@ $as_echo "default" >&6; }
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
+$as_echo_n "checking for --with-address-sanitizer... " >&6; }
+
+# Check whether --with-address_sanitizer was given.
+if test "${with_address_sanitizer+set}" = set; then :
+ withval=$with_address_sanitizer;
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
+$as_echo "$withval" >&6; }
+BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
+LDFLAGS="-fsanitize=address $LDFLAGS"
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
$as_echo_n "checking for t_open in -lnsl... " >&6; }
@@ -10340,6 +10916,36 @@ if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
fi
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
+$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+ /* CAN_RAW_FD_FRAMES available check */
+#include <linux/can/raw.h>
+int
+main ()
+{
+int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+
+$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -11826,6 +12432,7 @@ fi
$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
+ LIBS="$LIBS -lrt"
$as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
@@ -12310,19 +12917,9 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
-$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
-
-else
- case " $LIBOBJS " in
- *" fileblocks.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
- ;;
-esac
-
fi
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
$as_echo_n "checking for time.h that defines altzone... " >&6; }
if ${ac_cv_header_time_altzone+:} false; then :
@@ -13078,12 +13675,13 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
have_gcc_asm_for_x64=yes
else
have_gcc_asm_for_x64=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
$as_echo "$have_gcc_asm_for_x64" >&6; }
if test "$have_gcc_asm_for_x64" = yes
@@ -13254,12 +13852,13 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
have_gcc_asm_for_x87=yes
else
have_gcc_asm_for_x87=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
$as_echo "$have_gcc_asm_for_x87" >&6; }
if test "$have_gcc_asm_for_x87" = yes
@@ -13269,6 +13868,39 @@ $as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
+$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ unsigned int fpcr;
+ __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
+ __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ have_gcc_asm_for_mc68881=yes
+else
+ have_gcc_asm_for_mc68881=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
+$as_echo "$have_gcc_asm_for_mc68881" >&6; }
+if test "$have_gcc_asm_for_mc68881" = yes
+then
+
+$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
+
+fi
+
# Detect whether system arithmetic is subject to x87-style double
# rounding issues. The result of this test has little meaning on non
# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
@@ -14011,13 +14643,13 @@ $as_echo_n "checking ABIFLAGS... " >&6; }
$as_echo "$ABIFLAGS" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
$as_echo_n "checking SOABI... " >&6; }
-SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
+SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
$as_echo "$SOABI" >&6; }
case $ac_sys_system in
- Linux*|GNU*)
+ Linux*|GNU*|Darwin)
EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
*)
EXT_SUFFIX=${SHLIB_SUFFIX};;
@@ -14345,6 +14977,50 @@ $as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
fi
+# also in 4.0, but not in editline
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
+$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
+if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lreadline $READLINE_LIBS $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char rl_resize_terminal ();
+int
+main ()
+{
+return rl_resize_terminal ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_readline_rl_resize_terminal=yes
+else
+ ac_cv_lib_readline_rl_resize_terminal=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
+$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
+if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
+
+$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
+
+fi
+
+
# check for readline 4.2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
@@ -14418,6 +15094,49 @@ rm -f conftest*
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
+$as_echo_n "checking for append_history in -lreadline... " >&6; }
+if ${ac_cv_lib_readline_append_history+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lreadline $READLINE_LIBS $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char append_history ();
+int
+main ()
+{
+return append_history ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_readline_append_history=yes
+else
+ ac_cv_lib_readline_append_history=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
+$as_echo "$ac_cv_lib_readline_append_history" >&6; }
+if test "x$ac_cv_lib_readline_append_history" = xyes; then :
+
+$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
+
+fi
+
+
# End of readline checks: restore LIBS
LIBS=$LIBS_no_readline
@@ -15334,7 +16053,7 @@ do
done
-SRCDIRS="Parser Grammar Objects Python Modules Mac"
+SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
$as_echo_n "checking for build directories... " >&6; }
for dir in $SRCDIRS; do
@@ -15475,6 +16194,72 @@ $as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
esac
fi
+# Check for stdatomic.h
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
+$as_echo_n "checking for stdatomic.h... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+ #include <stdatomic.h>
+ atomic_int value = ATOMIC_VAR_INIT(1);
+ _Atomic void *py_atomic_address = (void*) &value;
+ int main() {
+ int loaded_value = atomic_load(&value);
+ return 0;
+ }
+
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ have_stdatomic_h=yes
+else
+ have_stdatomic_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
+$as_echo "$have_stdatomic_h" >&6; }
+
+if test "$have_stdatomic_h" = yes; then
+
+$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
+
+fi
+
+# Check for GCC >= 4.7 __atomic builtins
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
+$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+ volatile int val = 1;
+ int main() {
+ __atomic_load_n(&val, __ATOMIC_SEQ_CST);
+ return 0;
+ }
+
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ have_builtin_atomic=yes
+else
+ have_builtin_atomic=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
+$as_echo "$have_builtin_atomic" >&6; }
+
+if test "$have_builtin_atomic" = yes; then
+
+$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
+
+fi
+
# ensurepip option
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
$as_echo_n "checking for ensurepip... " >&6; }
@@ -15500,6 +16285,113 @@ esac
$as_echo "$ENSUREPIP" >&6; }
+# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
+$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+ #include <dirent.h>
+
+ int main() {
+ struct dirent entry;
+ return entry.d_type == DT_UNKNOWN;
+ }
+
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ have_dirent_d_type=yes
+else
+ have_dirent_d_type=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
+$as_echo "$have_dirent_d_type" >&6; }
+
+if test "$have_dirent_d_type" = yes; then
+
+$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
+
+fi
+
+# check if the Linux getrandom() syscall is available
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
+$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+ #include <unistd.h>
+ #include <sys/syscall.h>
+ #include <linux/random.h>
+
+ int main() {
+ char buffer[1];
+ const size_t buflen = sizeof(buffer);
+ const int flags = GRND_NONBLOCK;
+ /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
+ (void)syscall(SYS_getrandom, buffer, buflen, flags);
+ return 0;
+ }
+
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ have_getrandom_syscall=yes
+else
+ have_getrandom_syscall=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
+$as_echo "$have_getrandom_syscall" >&6; }
+
+if test "$have_getrandom_syscall" = yes; then
+
+$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
+
+fi
+
+# check if the getrandom() function is available
+# the test was written for the Solaris function of <sys/random.h>
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
+$as_echo_n "checking for the getrandom() function... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+ #include <sys/random.h>
+
+ int main() {
+ char buffer[1];
+ const size_t buflen = sizeof(buffer);
+ const int flags = 0;
+ /* ignore the result, Python checks for ENOSYS at runtime */
+ (void)getrandom(buffer, buflen, flags);
+ return 0;
+ }
+
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ have_getrandom=yes
+else
+ have_getrandom=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
+$as_echo "$have_getrandom" >&6; }
+
+if test "$have_getrandom" = yes; then
+
+$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
+
+fi
+
# generate output files
ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh"
@@ -16012,7 +16904,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by python $as_me 3.4, which was
+This file was extended by python $as_me 3.5, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -16074,7 +16966,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-python config.status 3.4
+python config.status 3.5
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 3394d84ca3..1c07c0569d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ dnl * Please run autoreconf to test your changes! *
dnl ***********************************************
# Set VERSION so we only need to edit in one place (i.e., here)
-m4_define(PYTHON_VERSION, 3.4)
+m4_define(PYTHON_VERSION, 3.5)
AC_PREREQ(2.65)
@@ -49,6 +49,7 @@ fi
AC_CONFIG_SRCDIR([Include/object.h])
AC_CONFIG_HEADER(pyconfig.h)
+AC_SUBST(cross_compiling)
AC_CANONICAL_HOST
AC_SUBST(build)
AC_SUBST(host)
@@ -86,7 +87,7 @@ dnl can cause trouble.
dnl Last slash shouldn't be stripped if prefix=/
if test "$prefix" != "/"; then
prefix=`echo "$prefix" | sed -e 's/\/$//g'`
-fi
+fi
dnl This is for stuff that absolutely must end up in pyconfig.h.
dnl Please use pyport.h instead, if possible.
@@ -178,7 +179,7 @@ AC_ARG_ENABLE(universalsdk,
fi
;;
esac
-
+
],[
UNIVERSALSDK=
enable_universalsdk=
@@ -240,7 +241,7 @@ AC_ARG_ENABLE(framework,
AS_HELP_STRING([--enable-framework@<:@=INSTALLDIR@:>@], [Build (MacOSX|Darwin) framework]),
[
case $enableval in
- yes)
+ yes)
enableval=/Library/Frameworks
esac
case $enableval in
@@ -297,7 +298,7 @@ AC_ARG_ENABLE(framework,
FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
if test "${prefix}" = "NONE"; then
- # User hasn't specified the
+ # User hasn't specified the
# --prefix option, but wants to install
# the framework in a non-default location,
# ensure that the compatibility links get
@@ -425,7 +426,7 @@ if test "$cross_compiling" = yes; then
esac
_PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
fi
-
+
# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
# disable features if it is defined, without any means to access these
# features as extensions. For these systems, we skip the definition of
@@ -442,7 +443,7 @@ case $ac_sys_system/$ac_sys_release in
# Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
# In addition, Stefan Krah confirms that issue #1244610 exists through
# OpenBSD 4.6, but is fixed in 4.7.
- OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.@<:@0123456@:>@)
+ OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.@<:@0123456@:>@)
define_xopen_source=no
# OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
# also defined. This can be overridden by defining _BSD_SOURCE
@@ -480,12 +481,12 @@ case $ac_sys_system/$ac_sys_release in
# with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
FreeBSD/4.*)
define_xopen_source=no;;
- # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
+ # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
# _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
# identifies itself as Darwin/7.*
# On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
# disables platform specific features beyond repair.
- # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
+ # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
# has no effect, don't bother defining them
Darwin/@<:@6789@:>@.*)
define_xopen_source=no;;
@@ -541,7 +542,7 @@ fi
#
# SGI compilers allow the specification of the both the ABI and the
# ISA on the command line. Depending on the values of these switches,
-# different and often incompatable code will be generated.
+# different and often incompatible code will be generated.
#
# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
# thus supply support for various ABI/ISA combinations. The MACHDEP
@@ -556,9 +557,6 @@ then
fi
AC_MSG_RESULT($MACHDEP)
-AC_SUBST(PLATDIR)
-PLATDIR=plat-$MACHDEP
-
# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
# it may influence the way we can build extensions, so distutils
# needs to check it
@@ -596,6 +594,22 @@ AC_ARG_WITH(gcc,
esac])
AC_MSG_RESULT($without_gcc)
+AC_MSG_CHECKING(for --with-icc)
+AC_ARG_WITH(icc,
+ AS_HELP_STRING([--with-icc], [build with icc]),
+[
+ case $withval in
+ no) CC=${CC:-cc}
+ with_icc=no;;
+ yes) CC=icc
+ CXX=icpc
+ with_icc=yes;;
+ *) CC=$withval
+ with_icc=$withval;;
+ esac], [
+ with_icc=no])
+AC_MSG_RESULT($with_icc)
+
# If the user switches compilers, we can't believe the cache
if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
then
@@ -667,6 +681,8 @@ then
fi
fi
AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_GREP
AC_SUBST(CXX)
AC_SUBST(MAINCC)
@@ -675,7 +691,7 @@ AC_ARG_WITH(cxx_main,
AS_HELP_STRING([--with-cxx-main=<compiler>],
[compile main() and link python executable with C++ compiler]),
[
-
+
case $withval in
no) with_cxx_main=no
MAINCC='$(CC)';;
@@ -700,6 +716,7 @@ then
gcc) AC_PATH_TOOL(CXX, [g++], [g++], [notfound]) ;;
cc) AC_PATH_TOOL(CXX, [c++], [c++], [notfound]) ;;
clang|*/clang) AC_PATH_TOOL(CXX, [clang++], [clang++], [notfound]) ;;
+ icc|*/icc) AC_PATH_TOOL(CXX, [icpc], [icpc], [notfound]) ;;
esac
if test "$CXX" = "notfound"
then
@@ -724,6 +741,142 @@ then
fi
+MULTIARCH=$($CC --print-multiarch 2>/dev/null)
+AC_SUBST(MULTIARCH)
+
+AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
+cat >> conftest.c <<EOF
+#undef bfin
+#undef cris
+#undef fr30
+#undef linux
+#undef hppa
+#undef hpux
+#undef i386
+#undef mips
+#undef powerpc
+#undef sparc
+#undef unix
+#if defined(__linux__)
+# if defined(__x86_64__) && defined(__LP64__)
+ x86_64-linux-gnu
+# elif defined(__x86_64__) && defined(__ILP32__)
+ x86_64-linux-gnux32
+# elif defined(__i386__)
+ i386-linux-gnu
+# elif defined(__aarch64__) && defined(__AARCH64EL__)
+# if defined(__ILP32__)
+ aarch64_ilp32-linux-gnu
+# else
+ aarch64-linux-gnu
+# endif
+# elif defined(__aarch64__) && defined(__AARCH64EB__)
+# if defined(__ILP32__)
+ aarch64_be_ilp32-linux-gnu
+# else
+ aarch64_be-linux-gnu
+# endif
+# elif defined(__alpha__)
+ alpha-linux-gnu
+# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
+# if defined(__ARMEL__)
+ arm-linux-gnueabihf
+# else
+ armeb-linux-gnueabihf
+# endif
+# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
+# if defined(__ARMEL__)
+ arm-linux-gnueabi
+# else
+ armeb-linux-gnueabi
+# endif
+# elif defined(__hppa__)
+ hppa-linux-gnu
+# elif defined(__ia64__)
+ ia64-linux-gnu
+# elif defined(__m68k__) && !defined(__mcoldfire__)
+ m68k-linux-gnu
+# elif defined(__mips_hard_float) && defined(_MIPSEL)
+# if _MIPS_SIM == _ABIO32
+ mipsel-linux-gnu
+# elif _MIPS_SIM == _ABIN32
+ mips64el-linux-gnuabin32
+# elif _MIPS_SIM == _ABI64
+ mips64el-linux-gnuabi64
+# else
+# error unknown platform triplet
+# endif
+# elif defined(__mips_hard_float)
+# if _MIPS_SIM == _ABIO32
+ mips-linux-gnu
+# elif _MIPS_SIM == _ABIN32
+ mips64-linux-gnuabin32
+# elif _MIPS_SIM == _ABI64
+ mips64-linux-gnuabi64
+# else
+# error unknown platform triplet
+# endif
+# elif defined(__or1k__)
+ or1k-linux-gnu
+# elif defined(__powerpc__) && defined(__SPE__)
+ powerpc-linux-gnuspe
+# elif defined(__powerpc64__)
+# if defined(__LITTLE_ENDIAN__)
+ powerpc64le-linux-gnu
+# else
+ powerpc64-linux-gnu
+# endif
+# elif defined(__powerpc__)
+ powerpc-linux-gnu
+# elif defined(__s390x__)
+ s390x-linux-gnu
+# elif defined(__s390__)
+ s390-linux-gnu
+# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
+ sh4-linux-gnu
+# elif defined(__sparc__) && defined(__arch64__)
+ sparc64-linux-gnu
+# elif defined(__sparc__)
+ sparc-linux-gnu
+# else
+# error unknown platform triplet
+# endif
+#elif defined(__FreeBSD_kernel__)
+# if defined(__LP64__)
+ x86_64-kfreebsd-gnu
+# elif defined(__i386__)
+ i386-kfreebsd-gnu
+# else
+# error unknown platform triplet
+# endif
+#elif defined(__gnu_hurd__)
+ i386-gnu
+#elif defined(__APPLE__)
+ darwin
+#else
+# error unknown platform triplet
+#endif
+
+EOF
+
+if $CPP conftest.c >conftest.out 2>/dev/null; then
+ PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
+ AC_MSG_RESULT([$PLATFORM_TRIPLET])
+else
+ AC_MSG_RESULT([none])
+fi
+rm -f conftest.c conftest.out
+
+if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
+ if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
+ AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])
+ fi
+fi
+PLATDIR=plat-$MACHDEP
+AC_SUBST(PLATDIR)
+AC_SUBST(PLATFORM_TRIPLET)
+
+
AC_MSG_CHECKING([for -Wl,--no-as-needed])
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
@@ -791,10 +944,6 @@ hp*|HP*)
esac;;
esac
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
-AC_SUBST(MULTIARCH)
-
-
AC_SUBST(LIBRARY)
AC_MSG_CHECKING(LIBRARY)
if test -z "$LIBRARY"
@@ -811,7 +960,7 @@ AC_MSG_RESULT($LIBRARY)
# systems without shared libraries, LDLIBRARY is the same as LIBRARY
# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
# DLLLIBRARY is the shared (i.e., DLL) library.
-#
+#
# RUNSHARED is used to run shared python without installed libraries
#
# INSTSONAME is the name of the shared library that will be use to install
@@ -839,7 +988,7 @@ LDVERSION="$VERSION"
# If CXX is set, and if it is needed to link a main function that was
# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
# python might then depend on the C++ runtime
-# This is altered for AIX in order to build the export list before
+# This is altered for AIX in order to build the export list before
# linking.
AC_SUBST(LINKCC)
AC_MSG_CHECKING(LINKCC)
@@ -893,7 +1042,7 @@ AC_ARG_ENABLE(shared,
AS_HELP_STRING([--enable-shared], [disable/enable building shared python library]))
if test -z "$enable_shared"
-then
+then
case $ac_sys_system in
CYGWIN*)
enable_shared="yes";;
@@ -938,7 +1087,7 @@ then
BLDLIBRARY=''
else
BLDLIBRARY='$(LDLIBRARY)'
-fi
+fi
# Other platforms follow
if test $enable_shared = "yes"; then
@@ -963,11 +1112,6 @@ if test $enable_shared = "yes"; then
LDLIBRARY='libpython$(LDVERSION).so'
BLDLIBRARY='-L. -lpython$(LDVERSION)'
RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
- case $ac_sys_system in
- FreeBSD*)
- SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
- ;;
- esac
INSTSONAME="$LDLIBRARY".$SOVERSION
if test "$with_pydebug" != yes
then
@@ -1042,6 +1186,15 @@ else
ASDLGEN="$PYTHON"
fi
+AC_SUBST(OPCODEHGEN)
+AC_CHECK_PROGS(PYTHON, python$PACKAGE_VERSION python3 python, not-found)
+if test "$PYTHON" = not-found; then
+ OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py"
+else
+ OPCODEHGEN="$PYTHON"
+fi
+
+
case $MACHDEP in
bsdos*|hp*|HP*)
@@ -1069,20 +1222,102 @@ ABIFLAGS=""
# Check for --with-pydebug
AC_MSG_CHECKING(for --with-pydebug)
-AC_ARG_WITH(pydebug,
+AC_ARG_WITH(pydebug,
AS_HELP_STRING([--with-pydebug], [build with Py_DEBUG defined]),
[
if test "$withval" != no
-then
- AC_DEFINE(Py_DEBUG, 1,
- [Define if you want to build an interpreter with many run-time checks.])
- AC_MSG_RESULT(yes);
+then
+ AC_DEFINE(Py_DEBUG, 1,
+ [Define if you want to build an interpreter with many run-time checks.])
+ AC_MSG_RESULT(yes);
Py_DEBUG='true'
ABIFLAGS="${ABIFLAGS}d"
else AC_MSG_RESULT(no); Py_DEBUG='false'
fi],
[AC_MSG_RESULT(no)])
+# Enable LTO flags
+AC_SUBST(LTOFLAGS)
+AC_MSG_CHECKING(for --with-lto)
+AC_ARG_WITH(lto, AS_HELP_STRING([--with-lto], [Enable Link Time Optimization in PGO builds. Disabled by default.]),
+[
+if test "$withval" != no
+then
+ Py_LTO='true'
+ AC_MSG_RESULT(yes);
+else
+ Py_LTO='false'
+ AC_MSG_RESULT(no);
+fi],
+[AC_MSG_RESULT(no)])
+if test "$Py_LTO" = 'true' ; then
+ case $CC in
+ *clang*)
+ # Any changes made here should be reflected in the GCC+Darwin case below
+ LTOFLAGS="-flto"
+ ;;
+ *gcc*)
+ case $ac_sys_system in
+ Darwin*)
+ LTOFLAGS="-flto"
+ ;;
+ *)
+ LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
+ ;;
+ esac
+ ;;
+ esac
+fi
+
+# Enable PGO flags.
+AC_SUBST(PGO_PROF_GEN_FLAG)
+AC_SUBST(PGO_PROF_USE_FLAG)
+AC_SUBST(LLVM_PROF_MERGER)
+AC_SUBST(LLVM_PROF_FILE)
+AC_SUBST(LLVM_PROF_ERR)
+AC_SUBST(LLVM_PROF_FOUND)
+AC_CHECK_PROG(LLVM_PROF_FOUND, llvm-profdata, found, not-found)
+LLVM_PROF_ERR=no
+case $CC in
+ *clang*)
+ # Any changes made here should be reflected in the GCC+Darwin case below
+ PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
+ PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
+ LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
+ LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
+ if test $LLVM_PROF_FOUND = not-found
+ then
+ LLVM_PROF_ERR=yes
+ fi
+ ;;
+ *gcc*)
+ case $ac_sys_system in
+ Darwin*)
+ PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
+ PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
+ LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
+ LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
+ if test $LLVM_PROF_FOUND = not-found
+ then
+ LLVM_PROF_ERR=yes
+ fi
+ ;;
+ *)
+ PGO_PROF_GEN_FLAG="-fprofile-generate"
+ PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
+ LLVM_PROF_MERGER="true"
+ LLVM_PROF_FILE=""
+ ;;
+ esac
+ ;;
+ *icc*)
+ PGO_PROF_GEN_FLAG="-prof-gen"
+ PGO_PROF_USE_FLAG="-prof-use"
+ LLVM_PROF_MERGER="true"
+ LLVM_PROF_FILE=""
+ ;;
+esac
+
# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
# merged with this chunk of code?
@@ -1192,6 +1427,13 @@ yes)
BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
fi
+ # ICC doesn't recognize the option, but only emits a warning
+ ## XXX does it emit an unused result warning and can it be disabled?
+ case "$CC" in
+ *icc*)
+ ac_cv_disable_unused_result_warning=no
+ ;;
+ *)
AC_MSG_CHECKING(if we can turn off $CC unused result warning)
ac_save_cc="$CC"
CC="$CC -Wunused-result -Werror"
@@ -1208,6 +1450,8 @@ yes)
CFLAGS="$save_CFLAGS"
CC="$ac_save_cc"
AC_MSG_RESULT($ac_cv_disable_unused_result_warning)
+ ;;
+ esac
if test $ac_cv_disable_unused_result_warning = yes
then
@@ -1236,6 +1480,61 @@ yes)
CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
fi
+ AC_MSG_CHECKING(if we can turn on $CC mixed sign comparison warning)
+ ac_save_cc="$CC"
+ CC="$CC -Wsign-compare"
+ save_CFLAGS="$CFLAGS"
+ AC_CACHE_VAL(ac_cv_enable_sign_compare_warning,
+ AC_COMPILE_IFELSE(
+ [
+ AC_LANG_PROGRAM([[]], [[]])
+ ],[
+ ac_cv_enable_sign_compare_warning=yes
+ ],[
+ ac_cv_enable_sign_compare_warning=no
+ ]))
+ CFLAGS="$save_CFLAGS"
+ CC="$ac_save_cc"
+ AC_MSG_RESULT($ac_cv_enable_sign_compare_warning)
+
+ if test $ac_cv_enable_sign_compare_warning = yes
+ then
+ BASECFLAGS="$BASECFLAGS -Wsign-compare"
+ fi
+
+ AC_MSG_CHECKING(if we can turn on $CC unreachable code warning)
+ ac_save_cc="$CC"
+ CC="$CC -Wunreachable-code"
+ save_CFLAGS="$CFLAGS"
+ AC_CACHE_VAL(ac_cv_enable_unreachable_code_warning,
+ AC_COMPILE_IFELSE(
+ [
+ AC_LANG_PROGRAM([[]], [[]])
+ ],[
+ ac_cv_enable_unreachable_code_warning=yes
+ ],[
+ ac_cv_enable_unreachable_code_warning=no
+ ]))
+ CFLAGS="$save_CFLAGS"
+ CC="$ac_save_cc"
+
+ # Don't enable unreachable code warning in debug mode, since it usually
+ # results in non-standard code paths.
+ # Issue #24324: Unfortunately, the unreachable code warning does not work
+ # correctly on gcc and has been silently removed from the compiler.
+ # It is supported on clang but on OS X systems gcc may be an alias
+ # for clang. Try to determine if the compiler is not really gcc and,
+ # if so, only then enable the warning.
+ if test $ac_cv_enable_unreachable_code_warning = yes && \
+ test "$Py_DEBUG" != "true" && \
+ test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
+ then
+ BASECFLAGS="$BASECFLAGS -Wunreachable-code"
+ else
+ ac_cv_enable_unreachable_code_warning=no
+ fi
+ AC_MSG_RESULT($ac_cv_enable_unreachable_code_warning)
+
# if using gcc on alpha, use -mieee to get (near) full IEEE 754
# support. Without this, treatment of subnormals doesn't follow
# the standard.
@@ -1384,6 +1683,13 @@ yes)
;;
esac
+# ICC needs -fp-model strict or floats behave badly
+case "$CC" in
+*icc*)
+ CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
+ ;;
+esac
+
if test "$Py_DEBUG" = 'true'; then
:
else
@@ -1424,7 +1730,7 @@ int main(){
AC_MSG_RESULT($ac_cv_pthread_is_default)
-if test $ac_cv_pthread_is_default = yes
+if test $ac_cv_pthread_is_default = yes
then
ac_cv_kpthread=no
else
@@ -1523,14 +1829,14 @@ ac_save_cxx="$CXX"
if test "$ac_cv_kpthread" = "yes"
then
- CXX="$CXX -Kpthread"
+ CXX="$CXX -Kpthread"
ac_cv_cxx_thread=yes
elif test "$ac_cv_kthread" = "yes"
then
CXX="$CXX -Kthread"
ac_cv_cxx_thread=yes
elif test "$ac_cv_pthread" = "yes"
-then
+then
CXX="$CXX -pthread"
ac_cv_cxx_thread=yes
fi
@@ -1575,7 +1881,7 @@ sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
-bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
+bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
sys/endian.h)
AC_HEADER_DIRENT
AC_HEADER_MAJOR
@@ -1678,11 +1984,11 @@ if test "$use_lfs" = "yes"; then
# These may affect some typedefs
case $ac_sys_system/$ac_sys_release in
AIX*)
- AC_DEFINE(_LARGE_FILES, 1,
+ AC_DEFINE(_LARGE_FILES, 1,
[This must be defined on AIX systems to enable large file support.])
;;
esac
-AC_DEFINE(_LARGEFILE_SOURCE, 1,
+AC_DEFINE(_LARGEFILE_SOURCE, 1,
[This must be defined on some systems to enable large file support.])
AC_DEFINE(_FILE_OFFSET_BITS, 64,
[This must be set to 64 on some systems to enable large file support.])
@@ -1746,7 +2052,7 @@ AC_CHECK_SIZEOF(pid_t, 4)
AC_MSG_CHECKING(for long long support)
have_long_long=no
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[long long x; x = (long long)0;]])],[
- AC_DEFINE(HAVE_LONG_LONG, 1, [Define this if you have the type long long.])
+ AC_DEFINE(HAVE_LONG_LONG, 1, [Define this if you have the type long long.])
have_long_long=yes
],[])
AC_MSG_RESULT($have_long_long)
@@ -1757,7 +2063,7 @@ fi
AC_MSG_CHECKING(for long double support)
have_long_double=no
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[long double x; x = (long double)0;]])],[
- AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define this if you have the type long double.])
+ AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define this if you have the type long double.])
have_long_double=yes
],[])
AC_MSG_RESULT($have_long_double)
@@ -1769,7 +2075,7 @@ fi
AC_MSG_CHECKING(for _Bool support)
have_c99_bool=no
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[_Bool x; x = (_Bool)0;]])],[
- AC_DEFINE(HAVE_C99_BOOL, 1, [Define this if you have the type _Bool.])
+ AC_DEFINE(HAVE_C99_BOOL, 1, [Define this if you have the type _Bool.])
have_c99_bool=yes
],[])
AC_MSG_RESULT($have_c99_bool)
@@ -1777,8 +2083,8 @@ if test "$have_c99_bool" = yes ; then
AC_CHECK_SIZEOF(_Bool, 1)
fi
-AC_CHECK_TYPES(uintptr_t,
- [AC_CHECK_SIZEOF(uintptr_t, 4)],
+AC_CHECK_TYPES(uintptr_t,
+ [AC_CHECK_SIZEOF(uintptr_t, 4)],
[], [#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
@@ -1797,7 +2103,7 @@ if test "$have_long_long" = yes
then
if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
"$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
- AC_DEFINE(HAVE_LARGEFILE_SUPPORT, 1,
+ AC_DEFINE(HAVE_LARGEFILE_SUPPORT, 1,
[Defined to enable large file support when an off_t is bigger than a long
and long long is available and at least as big as an off_t. You may need
to add some flags for configuration and compilation to enable this mode.
@@ -1846,7 +2152,7 @@ CC="$ac_save_cc"
AC_SUBST(OTHER_LIBTOOL_OPT)
case $ac_sys_system/$ac_sys_release in
- Darwin/@<:@01567@:>@\..*)
+ Darwin/@<:@01567@:>@\..*)
OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
;;
Darwin/*)
@@ -1857,7 +2163,7 @@ esac
AC_SUBST(LIBTOOL_CRUFT)
case $ac_sys_system/$ac_sys_release in
- Darwin/@<:@01567@:>@\..*)
+ Darwin/@<:@01567@:>@\..*)
LIBTOOL_CRUFT="-framework System -lcc_dynamic"
if test "${enable_universalsdk}"; then
:
@@ -1871,7 +2177,7 @@ case $ac_sys_system/$ac_sys_release in
if test ${gcc_version} '<' 4.0
then
LIBTOOL_CRUFT="-lcc_dynamic"
- else
+ else
LIBTOOL_CRUFT=""
fi
AC_RUN_IFELSE([AC_LANG_SOURCE([[
@@ -1885,14 +2191,14 @@ case $ac_sys_system/$ac_sys_release in
}
}
]])],[ac_osx_32bit=yes],[ac_osx_32bit=no],[ac_osx_32bit=yes])
-
+
if test "${ac_osx_32bit}" = "yes"; then
case `/usr/bin/arch` in
- i386)
- MACOSX_DEFAULT_ARCH="i386"
+ i386)
+ MACOSX_DEFAULT_ARCH="i386"
;;
- ppc)
- MACOSX_DEFAULT_ARCH="ppc"
+ ppc)
+ MACOSX_DEFAULT_ARCH="ppc"
;;
*)
AC_MSG_ERROR([Unexpected output of 'arch' on OSX])
@@ -1900,11 +2206,11 @@ case $ac_sys_system/$ac_sys_release in
esac
else
case `/usr/bin/arch` in
- i386)
- MACOSX_DEFAULT_ARCH="x86_64"
+ i386)
+ MACOSX_DEFAULT_ARCH="x86_64"
;;
- ppc)
- MACOSX_DEFAULT_ARCH="ppc64"
+ ppc)
+ MACOSX_DEFAULT_ARCH="ppc64"
;;
*)
AC_MSG_ERROR([Unexpected output of 'arch' on OSX])
@@ -1921,9 +2227,9 @@ AC_MSG_CHECKING(for --enable-framework)
if test "$enable_framework"
then
BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
- # -F. is needed to allow linking to the framework while
+ # -F. is needed to allow linking to the framework while
# in the build location.
- AC_DEFINE(WITH_NEXT_FRAMEWORK, 1,
+ AC_DEFINE(WITH_NEXT_FRAMEWORK, 1,
[Define if you want to produce an OpenStep/Rhapsody framework
(shared library plus accessory files).])
AC_MSG_RESULT(yes)
@@ -1938,7 +2244,7 @@ fi
AC_MSG_CHECKING(for dyld)
case $ac_sys_system/$ac_sys_release in
Darwin/*)
- AC_DEFINE(WITH_DYLD, 1,
+ AC_DEFINE(WITH_DYLD, 1,
[Define if you want to use the new-style (Openstep, Rhapsody, MacOS)
dynamic linker (dyld) instead of the old-style (NextStep) dynamic
linker (rld). Dyld is necessary to support frameworks.])
@@ -1988,7 +2294,7 @@ then
;;
IRIX/5*) LDSHARED="ld -shared";;
IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
- SunOS/5*)
+ SunOS/5*)
if test "$GCC" = "yes" ; then
LDSHARED='$(CC) -shared'
LDCXXSHARED='$(CXX) -shared'
@@ -2164,7 +2470,7 @@ then
BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
# -u libsys_s pulls in all symbols in libsys
- Darwin/*)
+ Darwin/*)
LINKFORSHARED="$extra_undefs -framework CoreFoundation"
# Issue #18075: the default maximum stack size (8MBytes) is too
@@ -2180,7 +2486,7 @@ then
OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
- FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
+ FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
then
LINKFORSHARED="-Wl,--export-dynamic"
@@ -2332,6 +2638,17 @@ esac
],
[AC_MSG_RESULT(default)])
+AC_MSG_CHECKING(for --with-address-sanitizer)
+AC_ARG_WITH(address_sanitizer,
+ AS_HELP_STRING([--with-address-sanitizer],
+ [enable AddressSanitizer]),
+[
+AC_MSG_RESULT($withval)
+BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
+LDFLAGS="-fsanitize=address $LDFLAGS"
+],
+[AC_MSG_RESULT(no)])
+
# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
AC_CHECK_LIB(nsl, t_open, [LIBS="-lnsl $LIBS"]) # SVR4
AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets
@@ -2495,7 +2812,7 @@ then
# Defining _REENTRANT on system with POSIX threads should not hurt.
AC_DEFINE(_REENTRANT)
posix_threads=yes
- THREADOBJ="Python/thread.o"
+ THREADOBJ="Python/thread.o"
elif test "$ac_cv_kpthread" = "yes"
then
CC="$CC -Kpthread"
@@ -2589,7 +2906,7 @@ pthread_create (NULL, NULL, start_routine, NULL)]])],[
THREADOBJ="Python/thread.o"
USE_THREAD_MODULE=""])
- if test "$posix_threads" != "yes"; then
+ if test "$posix_threads" != "yes"; then
AC_CHECK_LIB(thread, thr_create, [AC_DEFINE(WITH_THREAD)
LIBS="$LIBS -lthread"
THREADOBJ="Python/thread.o"
@@ -2600,7 +2917,7 @@ fi
if test "$posix_threads" = "yes"; then
if test "$unistd_defines_pthreads" = "no"; then
AC_DEFINE(_POSIX_THREADS, 1,
- [Define if you have POSIX threads,
+ [Define if you have POSIX threads,
and your system does not define that.])
fi
@@ -2815,6 +3132,16 @@ if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
fi
fi
+AC_MSG_CHECKING(for CAN_RAW_FD_FRAMES)
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ /* CAN_RAW_FD_FRAMES available check */
+#include <linux/can/raw.h>]],
+[[int can_raw_fd_frames = CAN_RAW_FD_FRAMES;]])],[
+ AC_DEFINE(HAVE_LINUX_CAN_RAW_FD_FRAMES, 1, [Define if compiling using Linux 3.6 or later.])
+ AC_MSG_RESULT(yes)
+],[
+ AC_MSG_RESULT(no)
+])
+
AC_MSG_CHECKING(for OSX 10.5 SDK or later)
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[#include <Carbon/Carbon.h>]], [[FSIORefNum fRef = 0]])
@@ -2845,9 +3172,9 @@ AC_MSG_CHECKING(for --with-tsc)
AC_ARG_WITH(tsc,
AS_HELP_STRING([--with(out)-tsc],[enable/disable timestamp counter profile]),[
if test "$withval" != no
-then
- AC_DEFINE(WITH_TSC, 1,
- [Define to profile with the Pentium timestamp counter])
+then
+ AC_DEFINE(WITH_TSC, 1,
+ [Define to profile with the Pentium timestamp counter])
AC_MSG_RESULT(yes)
else AC_MSG_RESULT(no)
fi],
@@ -2864,7 +3191,7 @@ then
fi
if test "$with_pymalloc" != "no"
then
- AC_DEFINE(WITH_PYMALLOC, 1,
+ AC_DEFINE(WITH_PYMALLOC, 1,
[Define if you want to compile in Python-specific mallocs])
ABIFLAGS="${ABIFLAGS}m"
fi
@@ -3151,12 +3478,12 @@ dnl before searching for static libraries. setup.py adds -Wl,-search_paths_first
dnl to revert to a more traditional unix behaviour and make it possible to
dnl override the system libz with a local static library of libz. Temporarily
dnl add that flag to our CFLAGS as well to ensure that we check the version
-dnl of libz that will be used by setup.py.
-dnl The -L/usr/local/lib is needed as wel to get the same compilation
+dnl of libz that will be used by setup.py.
+dnl The -L/usr/local/lib is needed as wel to get the same compilation
dnl environment as setup.py (and leaving it out can cause configure to use the
dnl wrong version of the library)
case $ac_sys_system/$ac_sys_release in
-Darwin/*)
+Darwin/*)
_CUR_CFLAGS="${CFLAGS}"
_CUR_LDFLAGS="${LDFLAGS}"
CFLAGS="${CFLAGS} -Wl,-search_paths_first"
@@ -3167,7 +3494,7 @@ esac
AC_CHECK_LIB(z, inflateCopy, AC_DEFINE(HAVE_ZLIB_COPY, 1, [Define if the zlib library has inflateCopy]))
case $ac_sys_system/$ac_sys_release in
-Darwin/*)
+Darwin/*)
CFLAGS="${_CUR_CFLAGS}"
LDFLAGS="${_CUR_LDFLAGS}"
;;
@@ -3221,14 +3548,14 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
# check for openpty and forkpty
-AC_CHECK_FUNCS(openpty,,
+AC_CHECK_FUNCS(openpty,,
AC_CHECK_LIB(util,openpty,
[AC_DEFINE(HAVE_OPENPTY) LIBS="$LIBS -lutil"],
AC_CHECK_LIB(bsd,openpty, [AC_DEFINE(HAVE_OPENPTY) LIBS="$LIBS -lbsd"])
)
)
-AC_CHECK_FUNCS(forkpty,,
- AC_CHECK_LIB(util,forkpty,
+AC_CHECK_FUNCS(forkpty,,
+ AC_CHECK_LIB(util,forkpty,
[AC_DEFINE(HAVE_FORKPTY) LIBS="$LIBS -lutil"],
AC_CHECK_LIB(bsd,forkpty, [AC_DEFINE(HAVE_FORKPTY) LIBS="$LIBS -lbsd"])
)
@@ -3241,7 +3568,7 @@ AC_CHECK_FUNCS(memmove)
AC_CHECK_FUNCS(fseek64 fseeko fstatvfs ftell64 ftello statvfs)
AC_REPLACE_FUNCS(dup2 strdup)
-AC_CHECK_FUNCS(getpgrp,
+AC_CHECK_FUNCS(getpgrp,
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[getpgrp(0);]])],
[AC_DEFINE(GETPGRP_HAVE_ARG, 1, [Define if getpgrp() must be called as getpgrp(0).])],
[])
@@ -3251,7 +3578,7 @@ AC_CHECK_FUNCS(setpgrp,
[AC_DEFINE(SETPGRP_HAVE_ARG, 1, [Define if setpgrp() must be called as setpgrp(0, 0).])],
[])
)
-AC_CHECK_FUNCS(gettimeofday,
+AC_CHECK_FUNCS(gettimeofday,
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/time.h>]],
[[gettimeofday((struct timeval*)0,(struct timezone*)0);]])],
[],
@@ -3263,6 +3590,7 @@ AC_CHECK_FUNCS(gettimeofday,
AC_CHECK_FUNCS(clock_gettime, [], [
AC_CHECK_LIB(rt, clock_gettime, [
+ LIBS="$LIBS -lrt"
AC_DEFINE(HAVE_CLOCK_GETTIME, 1)
AC_DEFINE(TIMEMODULE_LIB, [rt],
[Library needed by timemodule.c: librt may be needed for clock_gettime()])
@@ -3295,7 +3623,7 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
])
# On OSF/1 V5.1, getaddrinfo is available, but a define
-# for [no]getaddrinfo in netdb.h.
+# for [no]getaddrinfo in netdb.h.
AC_MSG_CHECKING(for getaddrinfo)
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h>
@@ -3433,7 +3761,7 @@ AC_CHECK_MEMBERS([struct stat.st_blksize])
AC_CHECK_MEMBERS([struct stat.st_flags])
AC_CHECK_MEMBERS([struct stat.st_gen])
AC_CHECK_MEMBERS([struct stat.st_birthtime])
-AC_STRUCT_ST_BLOCKS
+AC_CHECK_MEMBERS([struct stat.st_blocks])
AC_MSG_CHECKING(for time.h that defines altzone)
AC_CACHE_VAL(ac_cv_header_time_altzone,[
@@ -3455,7 +3783,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
]], [[;]])],[
AC_DEFINE(SYS_SELECT_WITH_SYS_TIME, 1,
[Define if you can safely include both <sys/select.h> and <sys/time.h>
- (which you can't on SCO ODT 3.0).])
+ (which you can't on SCO ODT 3.0).])
was_it_defined=yes
],[])
AC_MSG_RESULT($was_it_defined)
@@ -3506,8 +3834,8 @@ AC_MSG_RESULT($works)
have_prototypes=no
AC_MSG_CHECKING(for prototypes)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[int foo(int x) { return 0; }]], [[return foo(10);]])],
- [AC_DEFINE(HAVE_PROTOTYPES, 1,
- [Define if your compiler supports function prototype])
+ [AC_DEFINE(HAVE_PROTOTYPES, 1,
+ [Define if your compiler supports function prototype])
have_prototypes=yes],
[]
)
@@ -3528,7 +3856,7 @@ int foo(int x, ...) {
]], [[return foo(10, "", 3.14);]])],[
AC_DEFINE(HAVE_STDARG_PROTOTYPES, 1,
[Define if your compiler supports variable length function prototypes
- (e.g. void fprintf(FILE *, char *, ...);) *and* <stdarg.h>])
+ (e.g. void fprintf(FILE *, char *, ...);) *and* <stdarg.h>])
works=yes
],[])
AC_MSG_RESULT($works)
@@ -3563,7 +3891,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <varargs.h>
#endif
]], [[va_list list1, list2; list1 = list2;]])],[],[
- AC_DEFINE(VA_LIST_IS_ARRAY, 1, [Define if a va_list is an array of some kind])
+ AC_DEFINE(VA_LIST_IS_ARRAY, 1, [Define if a va_list is an array of some kind])
va_list_is_array=yes
])
AC_MSG_RESULT($va_list_is_array)
@@ -3658,9 +3986,9 @@ AC_ARG_WITH(fpectl,
AS_HELP_STRING([--with-fpectl], [enable SIGFPE catching]),
[
if test "$withval" != no
-then
+then
AC_DEFINE(WANT_SIGFPE_HANDLER, 1,
- [Define if you want SIGFPE handled (see Include/pyfpe.h).])
+ [Define if you want SIGFPE handled (see Include/pyfpe.h).])
AC_MSG_RESULT(yes)
else AC_MSG_RESULT(no)
fi],
@@ -3707,7 +4035,7 @@ fi],
# **************************************
AC_MSG_CHECKING(for x64 gcc inline assembler)
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
+AC_LINK_IFELSE( [AC_LANG_PROGRAM([[]], [[
__asm__ __volatile__ ("movq %rcx, %rax");
]])],[have_gcc_asm_for_x64=yes],[have_gcc_asm_for_x64=no])
AC_MSG_RESULT($have_gcc_asm_for_x64)
@@ -3805,7 +4133,7 @@ fi
# so we try it on all platforms.
AC_MSG_CHECKING(whether we can use gcc inline assembler to get and set x87 control word)
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
+AC_LINK_IFELSE( [AC_LANG_PROGRAM([[]], [[
unsigned short cw;
__asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
__asm__ __volatile__ ("fldcw %0" : : "m" (cw));
@@ -3817,6 +4145,19 @@ then
[Define if we can use gcc inline assembler to get and set x87 control word])
fi
+AC_MSG_CHECKING(whether we can use gcc inline assembler to get and set mc68881 fpcr)
+AC_LINK_IFELSE( [AC_LANG_PROGRAM([[]], [[
+ unsigned int fpcr;
+ __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
+ __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
+]])],[have_gcc_asm_for_mc68881=yes],[have_gcc_asm_for_mc68881=no])
+AC_MSG_RESULT($have_gcc_asm_for_mc68881)
+if test "$have_gcc_asm_for_mc68881" = yes
+then
+ AC_DEFINE(HAVE_GCC_ASM_FOR_MC68881, 1,
+ [Define if we can use gcc inline assembler to get and set mc68881 fpcr])
+fi
+
# Detect whether system arithmetic is subject to x87-style double
# rounding issues. The result of this test has little meaning on non
# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
@@ -4018,8 +4359,8 @@ AC_DEFINE_UNQUOTED(PYLONG_BITS_IN_DIGIT, $enable_big_digits, [Define as the pref
# check for wchar.h
AC_CHECK_HEADER(wchar.h, [
- AC_DEFINE(HAVE_WCHAR_H, 1,
- [Define if the compiler provides a wchar.h header file.])
+ AC_DEFINE(HAVE_WCHAR_H, 1,
+ [Define if the compiler provides a wchar.h header file.])
wchar_h="yes"
],
wchar_h="no"
@@ -4098,12 +4439,12 @@ AC_SUBST(SOABI)
AC_MSG_CHECKING(ABIFLAGS)
AC_MSG_RESULT($ABIFLAGS)
AC_MSG_CHECKING(SOABI)
-SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
+SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
AC_MSG_RESULT($SOABI)
AC_SUBST(EXT_SUFFIX)
case $ac_sys_system in
- Linux*|GNU*)
+ Linux*|GNU*|Darwin)
EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
*)
EXT_SUFFIX=${SHLIB_SUFFIX};;
@@ -4220,6 +4561,11 @@ AC_CHECK_LIB(readline, rl_completion_display_matches_hook,
AC_DEFINE(HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK, 1,
[Define if you have readline 4.0]), ,$READLINE_LIBS)
+# also in 4.0, but not in editline
+AC_CHECK_LIB(readline, rl_resize_terminal,
+ AC_DEFINE(HAVE_RL_RESIZE_TERMINAL, 1,
+ [Define if you have readline 4.0]), ,$READLINE_LIBS)
+
# check for readline 4.2
AC_CHECK_LIB(readline, rl_completion_matches,
AC_DEFINE(HAVE_RL_COMPLETION_MATCHES, 1,
@@ -4238,6 +4584,10 @@ then
[Define if you can turn off readline's signal handling.]), )
fi
+AC_CHECK_LIB(readline, append_history,
+ AC_DEFINE(HAVE_RL_APPEND_HISTORY, 1,
+ [Define if readline supports append_history]), ,$READLINE_LIBS)
+
# End of readline checks: restore LIBS
LIBS=$LIBS_no_readline
@@ -4293,7 +4643,7 @@ then
[Define if poll() sets errno on invalid file descriptors.])
fi
-# Before we can test tzset, we need to check if struct tm has a tm_zone
+# Before we can test tzset, we need to check if struct tm has a tm_zone
# (which is not required by ISO C or UNIX spec) and/or if we support
# tzname[]
AC_STRUCT_TIMEZONE
@@ -4319,7 +4669,7 @@ int main()
tm->tm_zone does not exist since it is the alternative way
of getting timezone info.
- Red Hat 6.2 doesn't understand the southern hemisphere
+ Red Hat 6.2 doesn't understand the southern hemisphere
after New Year's Day.
*/
@@ -4332,7 +4682,7 @@ int main()
exit(1);
#if HAVE_TZNAME
/* For UTC, tzname[1] is sometimes "", sometimes " " */
- if (strcmp(tzname[0], "UTC") ||
+ if (strcmp(tzname[0], "UTC") ||
(tzname[1][0] != 0 && tzname[1][0] != ' '))
exit(1);
#endif
@@ -4450,7 +4800,7 @@ AC_MSG_RESULT($ac_cv_window_has_flags)
if test "$ac_cv_window_has_flags" = yes
then
- AC_DEFINE(WINDOW_HAS_FLAGS, 1,
+ AC_DEFINE(WINDOW_HAS_FLAGS, 1,
[Define if WINDOW in curses.h offers a field _flags.])
fi
@@ -4649,7 +4999,7 @@ AC_MSG_RESULT($ac_cv_broken_mbstowcs)
if test "$ac_cv_broken_mbstowcs" = yes
then
AC_DEFINE(HAVE_BROKEN_MBSTOWCS, 1,
- [Define if mbstowcs(NULL, "text", 0) does not return the number of
+ [Define if mbstowcs(NULL, "text", 0) does not return the number of
wide chars that would be converted.])
fi
@@ -4660,15 +5010,15 @@ AC_ARG_WITH(computed-gotos,
[Use computed gotos in evaluation loop (enabled by default on supported compilers)]),
[
if test "$withval" = yes
-then
+then
AC_DEFINE(USE_COMPUTED_GOTOS, 1,
- [Define if you want to use computed gotos in ceval.c.])
+ [Define if you want to use computed gotos in ceval.c.])
AC_MSG_RESULT(yes)
fi
if test "$withval" = no
-then
+then
AC_DEFINE(USE_COMPUTED_GOTOS, 0,
- [Define if you want to use computed gotos in ceval.c.])
+ [Define if you want to use computed gotos in ceval.c.])
AC_MSG_RESULT(no)
fi
],
@@ -4702,7 +5052,7 @@ case "$ac_cv_computed_gotos" in yes*)
esac
case $ac_sys_system in
-AIX*)
+AIX*)
AC_DEFINE(HAVE_BROKEN_PIPE_BUF, 1, [Define if the system reports an invalid PIPE_BUF value.]) ;;
esac
@@ -4715,7 +5065,7 @@ do
done
AC_SUBST(SRCDIRS)
-SRCDIRS="Parser Grammar Objects Python Modules Mac"
+SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
AC_MSG_CHECKING(for build directories)
for dir in $SRCDIRS; do
if test ! -d $dir; then
@@ -4807,6 +5157,47 @@ if test "$have_gcc_asm_for_x87" = yes; then
esac
fi
+# Check for stdatomic.h
+AC_MSG_CHECKING(for stdatomic.h)
+AC_LINK_IFELSE(
+[
+ AC_LANG_SOURCE([[
+ #include <stdatomic.h>
+ atomic_int value = ATOMIC_VAR_INIT(1);
+ _Atomic void *py_atomic_address = (void*) &value;
+ int main() {
+ int loaded_value = atomic_load(&value);
+ return 0;
+ }
+ ]])
+],[have_stdatomic_h=yes],[have_stdatomic_h=no])
+
+AC_MSG_RESULT($have_stdatomic_h)
+
+if test "$have_stdatomic_h" = yes; then
+ AC_DEFINE(HAVE_STD_ATOMIC, 1,
+ [Has stdatomic.h, atomic_int and _Atomic void* types work])
+fi
+
+# Check for GCC >= 4.7 __atomic builtins
+AC_MSG_CHECKING(for GCC >= 4.7 __atomic builtins)
+AC_LINK_IFELSE(
+[
+ AC_LANG_SOURCE([[
+ volatile int val = 1;
+ int main() {
+ __atomic_load_n(&val, __ATOMIC_SEQ_CST);
+ return 0;
+ }
+ ]])
+],[have_builtin_atomic=yes],[have_builtin_atomic=no])
+
+AC_MSG_RESULT($have_builtin_atomic)
+
+if test "$have_builtin_atomic" = yes; then
+ AC_DEFINE(HAVE_BUILTIN_ATOMIC, 1, [Has builtin atomics])
+fi
+
# ensurepip option
AC_MSG_CHECKING(for ensurepip)
AC_ARG_WITH(ensurepip,
@@ -4822,6 +5213,77 @@ AS_CASE($with_ensurepip,
AC_MSG_RESULT($ENSUREPIP)
AC_SUBST(ENSUREPIP)
+# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
+AC_MSG_CHECKING(if the dirent structure of a d_type field)
+AC_LINK_IFELSE(
+[
+ AC_LANG_SOURCE([[
+ #include <dirent.h>
+
+ int main() {
+ struct dirent entry;
+ return entry.d_type == DT_UNKNOWN;
+ }
+ ]])
+],[have_dirent_d_type=yes],[have_dirent_d_type=no])
+AC_MSG_RESULT($have_dirent_d_type)
+
+if test "$have_dirent_d_type" = yes; then
+ AC_DEFINE(HAVE_DIRENT_D_TYPE, 1,
+ [Define to 1 if the dirent structure has a d_type field])
+fi
+
+# check if the Linux getrandom() syscall is available
+AC_MSG_CHECKING(for the Linux getrandom() syscall)
+AC_LINK_IFELSE(
+[
+ AC_LANG_SOURCE([[
+ #include <unistd.h>
+ #include <sys/syscall.h>
+ #include <linux/random.h>
+
+ int main() {
+ char buffer[1];
+ const size_t buflen = sizeof(buffer);
+ const int flags = GRND_NONBLOCK;
+ /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
+ (void)syscall(SYS_getrandom, buffer, buflen, flags);
+ return 0;
+ }
+ ]])
+],[have_getrandom_syscall=yes],[have_getrandom_syscall=no])
+AC_MSG_RESULT($have_getrandom_syscall)
+
+if test "$have_getrandom_syscall" = yes; then
+ AC_DEFINE(HAVE_GETRANDOM_SYSCALL, 1,
+ [Define to 1 if the Linux getrandom() syscall is available])
+fi
+
+# check if the getrandom() function is available
+# the test was written for the Solaris function of <sys/random.h>
+AC_MSG_CHECKING(for the getrandom() function)
+AC_LINK_IFELSE(
+[
+ AC_LANG_SOURCE([[
+ #include <sys/random.h>
+
+ int main() {
+ char buffer[1];
+ const size_t buflen = sizeof(buffer);
+ const int flags = 0;
+ /* ignore the result, Python checks for ENOSYS at runtime */
+ (void)getrandom(buffer, buflen, flags);
+ return 0;
+ }
+ ]])
+],[have_getrandom=yes],[have_getrandom=no])
+AC_MSG_RESULT($have_getrandom)
+
+if test "$have_getrandom" = yes; then
+ AC_DEFINE(HAVE_GETRANDOM, 1,
+ [Define to 1 if the getrandom() function is available])
+fi
+
# generate output files
AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh)
AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix])
diff --git a/pyconfig.h.in b/pyconfig.h.in
index 85490c8351..7895535532 100644
--- a/pyconfig.h.in
+++ b/pyconfig.h.in
@@ -101,6 +101,9 @@
/* Define if `unsetenv` does not return an int. */
#undef HAVE_BROKEN_UNSETENV
+/* Has builtin atomics */
+#undef HAVE_BUILTIN_ATOMIC
+
/* Define this if you have the type _Bool. */
#undef HAVE_C99_BOOL
@@ -180,6 +183,9 @@
/* Define to 1 if you have the <direct.h> header file. */
#undef HAVE_DIRECT_H
+/* Define to 1 if the dirent structure has a d_type field */
+#undef HAVE_DIRENT_D_TYPE
+
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/
#undef HAVE_DIRENT_H
@@ -313,6 +319,9 @@
/* Define to 1 if you have the `gamma' function. */
#undef HAVE_GAMMA
+/* Define if we can use gcc inline assembler to get and set mc68881 fpcr */
+#undef HAVE_GCC_ASM_FOR_MC68881
+
/* Define if we can use x64 gcc inline assembler */
#undef HAVE_GCC_ASM_FOR_X64
@@ -386,6 +395,12 @@
/* Define to 1 if you have the `getpwent' function. */
#undef HAVE_GETPWENT
+/* Define to 1 if the getrandom() function is available */
+#undef HAVE_GETRANDOM
+
+/* Define to 1 if the Linux getrandom() syscall is available */
+#undef HAVE_GETRANDOM_SYSCALL
+
/* Define to 1 if you have the `getresgid' function. */
#undef HAVE_GETRESGID
@@ -519,6 +534,9 @@
/* Define to 1 if you have the <linux/can.h> header file. */
#undef HAVE_LINUX_CAN_H
+/* Define if compiling using Linux 3.6 or later. */
+#undef HAVE_LINUX_CAN_RAW_FD_FRAMES
+
/* Define to 1 if you have the <linux/can/raw.h> header file. */
#undef HAVE_LINUX_CAN_RAW_H
@@ -528,6 +546,9 @@
/* Define to 1 if you have the <linux/tipc.h> header file. */
#undef HAVE_LINUX_TIPC_H
+/* Define to 1 if you have the <linux/random.h> header file. */
+#undef HAVE_LINUX_RANDOM_H
+
/* Define to 1 if you have the `lockf' function. */
#undef HAVE_LOCKF
@@ -693,6 +714,9 @@
/* Define to 1 if you have the `renameat' function. */
#undef HAVE_RENAMEAT
+/* Define if readline supports append_history */
+#undef HAVE_RL_APPEND_HISTORY
+
/* Define if you have readline 2.1 */
#undef HAVE_RL_CALLBACK
@@ -714,6 +738,9 @@
/* Define if you have readline 4.0 */
#undef HAVE_RL_PRE_INPUT_HOOK
+/* Define if you have readline 4.0 */
+#undef HAVE_RL_RESIZE_TERMINAL
+
/* Define to 1 if you have the `round' function. */
#undef HAVE_ROUND
@@ -871,6 +898,9 @@
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
+/* Has stdatomic.h, atomic_int and _Atomic void* types work */
+#undef HAVE_STD_ATOMIC
+
/* Define to 1 if you have the `strdup' function. */
#undef HAVE_STRDUP
@@ -910,10 +940,6 @@
/* Define to 1 if `tm_zone' is a member of `struct tm'. */
#undef HAVE_STRUCT_TM_TM_ZONE
-/* Define to 1 if your `struct stat' has `st_blocks'. Deprecated, use
- `HAVE_STRUCT_STAT_ST_BLOCKS' instead. */
-#undef HAVE_ST_BLOCKS
-
/* Define if you have the 'symlink' function. */
#undef HAVE_SYMLINK
diff --git a/setup.py b/setup.py
index 277965837c..174ce720c8 100644
--- a/setup.py
+++ b/setup.py
@@ -25,6 +25,11 @@ cflags = sysconfig.get_config_var('CFLAGS')
py_cflags_nodist = sysconfig.get_config_var('PY_CFLAGS_NODIST')
sysconfig.get_config_vars()['CFLAGS'] = cflags + ' ' + py_cflags_nodist
+class Dummy:
+ """Hack for parallel build"""
+ ProcessPoolExecutor = None
+sys.modules['concurrent.futures.process'] = Dummy
+
def get_platform():
# cross build
if "_PYTHON_HOST_PLATFORM" in os.environ:
@@ -131,6 +136,22 @@ def find_library_file(compiler, libname, std_dirs, paths):
p = p.rstrip(os.sep)
if host_platform == 'darwin' and is_macosx_sdk_path(p):
+ # Note that, as of Xcode 7, Apple SDKs may contain textual stub
+ # libraries with .tbd extensions rather than the normal .dylib
+ # shared libraries installed in /. The Apple compiler tool
+ # chain handles this transparently but it can cause problems
+ # for programs that are being built with an SDK and searching
+ # for specific libraries. Distutils find_library_file() now
+ # knows to also search for and return .tbd files. But callers
+ # of find_library_file need to keep in mind that the base filename
+ # of the returned SDK library file might have a different extension
+ # from that of the library file installed on the running system,
+ # for example:
+ # /Applications/Xcode.app/Contents/Developer/Platforms/
+ # MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/
+ # usr/lib/libedit.tbd
+ # vs
+ # /usr/lib/libedit.dylib
if os.path.join(sysroot, p[1:]) == dirname:
return [ ]
@@ -173,6 +194,9 @@ class PyBuildExt(build_ext):
def __init__(self, dist):
build_ext.__init__(self, dist)
self.failed = []
+ self.failed_on_import = []
+ if '-j' in os.environ.get('MAKEFLAGS', ''):
+ self.parallel = True
def build_extensions(self):
@@ -252,9 +276,13 @@ class PyBuildExt(build_ext):
build_ext.build_extensions(self)
+ for ext in self.extensions:
+ self.check_extension_import(ext)
+
longest = max([len(e.name) for e in self.extensions], default=0)
- if self.failed:
- longest = max(longest, max([len(name) for name in self.failed]))
+ if self.failed or self.failed_on_import:
+ all_failed = self.failed + self.failed_on_import
+ longest = max(longest, max([len(name) for name in all_failed]))
def print_three_column(lst):
lst.sort(key=str.lower)
@@ -282,6 +310,14 @@ class PyBuildExt(build_ext):
print_three_column(failed)
print()
+ if self.failed_on_import:
+ failed = self.failed_on_import[:]
+ print()
+ print("Following modules built successfully"
+ " but were removed because they could not be imported:")
+ print_three_column(failed)
+ print()
+
def build_extension(self, ext):
if ext.name == '_ctypes':
@@ -295,6 +331,15 @@ class PyBuildExt(build_ext):
(ext.name, sys.exc_info()[1]))
self.failed.append(ext.name)
return
+
+ def check_extension_import(self, ext):
+ # Don't try to import an extension that has failed to compile
+ if ext.name in self.failed:
+ self.announce(
+ 'WARNING: skipping import check for failed build "%s"' %
+ ext.name, level=1)
+ return
+
# Workaround for Mac OS X: The Carbon-based modules cannot be
# reliably imported into a command-line Python
if 'Carbon' in ext.extra_link_args:
@@ -338,9 +383,9 @@ class PyBuildExt(build_ext):
spec = importlib.util.spec_from_file_location(ext.name, ext_filename,
loader=loader)
try:
- importlib._bootstrap._SpecMethods(spec).load()
+ importlib._bootstrap._load(spec)
except ImportError as why:
- self.failed.append(ext.name)
+ self.failed_on_import.append(ext.name)
self.announce('*** WARNING: renaming "%s" since importing it'
' failed: %s' % (ext.name, why), level=3)
assert not self.inplace
@@ -350,17 +395,6 @@ class PyBuildExt(build_ext):
os.remove(newname)
os.rename(ext_filename, newname)
- # XXX -- This relies on a Vile HACK in
- # distutils.command.build_ext.build_extension(). The
- # _built_objects attribute is stored there strictly for
- # use here.
- # If there is a failure, _built_objects may not be there,
- # so catch the AttributeError and move on.
- try:
- for filename in self._built_objects:
- os.remove(filename)
- except AttributeError:
- self.announce('unable to remove files (ignored)')
except:
exc_type, why, tb = sys.exc_info()
self.announce('*** WARNING: importing extension "%s" '
@@ -446,6 +480,13 @@ class PyBuildExt(build_ext):
finally:
os.unlink(tmpfile)
+ def detect_math_libs(self):
+ # Check for MacOS X, which doesn't need libm.a at all
+ if host_platform == 'darwin':
+ return []
+ else:
+ return ['m']
+
def detect_modules(self):
# Ensure that /usr/local is always used, but the local build
# directories (i.e. '.' and 'Include') must be first. See issue
@@ -550,10 +591,7 @@ class PyBuildExt(build_ext):
if item.startswith('-L'):
lib_dirs.append(item[2:])
- # Check for MacOS X, which doesn't need libm.a at all
- math_libs = ['m']
- if host_platform == 'darwin':
- math_libs = []
+ math_libs = self.detect_math_libs()
# XXX Omitted modules: gl, pure, dl, SGI-specific modules
@@ -564,13 +602,17 @@ class PyBuildExt(build_ext):
# array objects
exts.append( Extension('array', ['arraymodule.c']) )
+
+ shared_math = 'Modules/_math.o'
# complex math library functions
- exts.append( Extension('cmath', ['cmathmodule.c', '_math.c'],
- depends=['_math.h'],
+ exts.append( Extension('cmath', ['cmathmodule.c'],
+ extra_objects=[shared_math],
+ depends=['_math.h', shared_math],
libraries=math_libs) )
# math library functions, e.g. sin()
- exts.append( Extension('math', ['mathmodule.c', '_math.c'],
- depends=['_math.h'],
+ exts.append( Extension('math', ['mathmodule.c'],
+ extra_objects=[shared_math],
+ depends=['_math.h', shared_math],
libraries=math_libs) )
# time libraries: librt may be needed for clock_gettime()
@@ -582,7 +624,10 @@ class PyBuildExt(build_ext):
# time operations and variables
exts.append( Extension('time', ['timemodule.c'],
libraries=time_libs) )
- exts.append( Extension('_datetime', ['_datetimemodule.c']) )
+ # math_libs is needed by delta_new() that uses round() and by accum()
+ # that uses modf().
+ exts.append( Extension('_datetime', ['_datetimemodule.c'],
+ libraries=math_libs) )
# random number generator implemented in C
exts.append( Extension("_random", ["_randommodule.c"]) )
# bisect
@@ -602,6 +647,8 @@ class PyBuildExt(build_ext):
exts.append( Extension('_testbuffer', ['_testbuffer.c']) )
# Test loading multiple modules from one compiled file (http://bugs.python.org/issue16421)
exts.append( Extension('_testimportmultiple', ['_testimportmultiple.c']) )
+ # Test multi-phase extension module init (PEP 489)
+ exts.append( Extension('_testmultiphase', ['_testmultiphase.c']) )
# profiler (_lsprof is for cProfile.py)
exts.append( Extension('_lsprof', ['_lsprof.c', 'rotatingtree.c']) )
# static Unicode character database
@@ -651,11 +698,14 @@ class PyBuildExt(build_ext):
# Multimedia modules
# These don't work for 64-bit platforms!!!
# These represent audio samples or images as strings:
-
+ #
# Operations on audio samples
# According to #993173, this one should actually work fine on
# 64-bit platforms.
- exts.append( Extension('audioop', ['audioop.c']) )
+ #
+ # audioop needs math_libs for floor() in multiple functions.
+ exts.append( Extension('audioop', ['audioop.c'],
+ libraries=math_libs) )
# readline
do_readline = self.compiler.find_library_file(lib_dirs, 'readline')
@@ -718,7 +768,7 @@ class PyBuildExt(build_ext):
# In every directory on the search path search for a dynamic
# library and then a static library, instead of first looking
# for dynamic libraries on the entire path.
- # This way a staticly linked custom readline gets picked up
+ # This way a statically linked custom readline gets picked up
# before the (possibly broken) dynamic library in /usr/lib.
readline_extra_link_args = ('-Wl,-search_paths_first',)
else:
@@ -1557,7 +1607,7 @@ class PyBuildExt(build_ext):
if 'd' not in sys.abiflags:
ext = Extension('xxlimited', ['xxlimited.c'],
- define_macros=[('Py_LIMITED_API', '0x03040000')])
+ define_macros=[('Py_LIMITED_API', '0x03050000')])
self.extensions.append(ext)
return missing
@@ -1572,7 +1622,7 @@ class PyBuildExt(build_ext):
# --with-tcltk-libs="-L/path/to/tcllibs -ltclm.n \
# -L/path/to/tklibs -ltkm.n"
#
- # These values can also be specified or overriden via make:
+ # These values can also be specified or overridden via make:
# make TCLTK_INCLUDES="..." TCLTK_LIBS="..."
#
# This can be useful for building and testing tkinter with multiple
@@ -1897,6 +1947,7 @@ class PyBuildExt(build_ext):
'_ctypes/stgdict.c',
'_ctypes/cfield.c']
depends = ['_ctypes/ctypes.h']
+ math_libs = self.detect_math_libs()
if host_platform == 'darwin':
sources.append('_ctypes/malloc_closure.c')
@@ -1927,8 +1978,10 @@ class PyBuildExt(build_ext):
libraries=[],
sources=sources,
depends=depends)
+ # function my_sqrt() needs math library for sqrt()
ext_test = Extension('_ctypes_test',
- sources=['_ctypes/_ctypes_test.c'])
+ sources=['_ctypes/_ctypes_test.c'],
+ libraries=math_libs)
self.extensions.extend([ext, ext_test])
if not '--with-system-ffi' in sysconfig.get_config_var("CONFIG_ARGS"):